decocms 4.586.0 → 4.587.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-CGZfuvxJ.js → AlertCircle-gyZP8TIO.js} +1 -1
- package/dist/client/assets/{AreaChart-DXqVsicd.js → AreaChart-BmP0ImmP.js} +1 -1
- package/dist/client/assets/{ArrowLeft-XURGfwpG.js → ArrowLeft-BSzt3fBA.js} +1 -1
- package/dist/client/assets/{ArrowRight-ZoKxZa45.js → ArrowRight-BF8V67fk.js} +1 -1
- package/dist/client/assets/{ArrowUp-DJZ55cl-.js → ArrowUp-DYnF34lU.js} +1 -1
- package/dist/client/assets/{BookOpen01-gO5hgFUK.js → BookOpen01-CpYcxx0H.js} +1 -1
- package/dist/client/assets/{CartesianChart-B0LNjIyx.js → CartesianChart-Cflx4Yj4.js} +1 -1
- package/dist/client/assets/{CategoricalChart-CmAKQrAh.js → CategoricalChart-CIY6jBUR.js} +1 -1
- package/dist/client/assets/{CheckCircle-CmN8U1V5.js → CheckCircle-CyybvOiK.js} +1 -1
- package/dist/client/assets/{ChevronDown-ClblfTVV.js → ChevronDown-DldgAfZA.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-YxAp9GGa.js → ChevronSelectorVertical-BbGwltuJ.js} +1 -1
- package/dist/client/assets/{ChevronUp-0ZCAxpBW.js → ChevronUp-Bt9-G08q.js} +1 -1
- package/dist/client/assets/{CreditCard01-CcTQ1h3_.js → CreditCard01-vIJuQM5M.js} +1 -1
- package/dist/client/assets/{Eye-D5j_svLn.js → Eye-BLpLvSpN.js} +1 -1
- package/dist/client/assets/{File02-Cs751Kds.js → File02-EV4Uhu5z.js} +1 -1
- package/dist/client/assets/{Globe04-DO1uUwfE.js → Globe04-DzGa73Hy.js} +1 -1
- package/dist/client/assets/{Image01-CJL4B_rR.js → Image01-BqCHFUEp.js} +1 -1
- package/dist/client/assets/{Key01-fuHivqLl.js → Key01-KTk95wIy.js} +1 -1
- package/dist/client/assets/{LayoutLeft-CCeum9wV.js → LayoutLeft-_2SG51dD.js} +1 -1
- package/dist/client/assets/{LinkBroken01-cq4srxHs.js → LinkBroken01-Br9NMWkB.js} +1 -1
- package/dist/client/assets/{MessageCircle01-Bf6dD94_.js → MessageCircle01-D170V1-p.js} +1 -1
- package/dist/client/assets/{Minus-Cc21R1KY.js → Minus-D88-u0DO.js} +1 -1
- package/dist/client/assets/{Monitor01-DGdgEYxG.js → Monitor01-Df3mZyNU.js} +1 -1
- package/dist/client/assets/{Play-zYFs_vGL.js → Play-PdUxpWZE.js} +1 -1
- package/dist/client/assets/{Plus--DcN-eh1.js → Plus-BYodv7tE.js} +1 -1
- package/dist/client/assets/{ReferenceLine-D6M1JZR1.js → ReferenceLine-DrwOzdWE.js} +1 -1
- package/dist/client/assets/{SearchMd-BwYuN52e.js → SearchMd-Cuy8VOOG.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-D-gmqcz7.js → ShoppingBag01-pCIsQ-Jb.js} +1 -1
- package/dist/client/assets/{Sun-D9ql5ZlI.js → Sun-BABGQWS8.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-BQF84Li3.js → SwitchHorizontal01-Daz2EgW0.js} +1 -1
- package/dist/client/assets/{Tool01-BeDQSGiN.js → Tool01-D6InpKaj.js} +1 -1
- package/dist/client/assets/{Tooltip-C_RHysFo.js → Tooltip-CP1IpP66.js} +1 -1
- package/dist/client/assets/{Trash01-BmQrADz0.js → Trash01-LecfbxTv.js} +1 -1
- package/dist/client/assets/{TrendUp01-_SFSHjzO.js → TrendUp01-C_SySyBC.js} +1 -1
- package/dist/client/assets/{Upload01-DOfZqxci.js → Upload01-CABY93nl.js} +1 -1
- package/dist/client/assets/{UserCheck01-BMoOFYIZ.js → UserCheck01-Dqn7toBe.js} +1 -1
- package/dist/client/assets/{UserSquare-Dn1UPzSD.js → UserSquare-e0qIxN1Q.js} +1 -1
- package/dist/client/assets/{Users01-B_yoWxPn.js → Users01-UF7lWU9g.js} +1 -1
- package/dist/client/assets/{XClose-C4MsAn9v.js → XClose-C9ONGfkv.js} +1 -1
- package/dist/client/assets/{Zap-DoxB0q6B.js → Zap-D-fE_V4E.js} +1 -1
- package/dist/client/assets/{access-gate-DQ55JjgP.js → access-gate-EJXICSzm.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-D0PlxcOk.js → add-connection-dialog-CEukHWSz.js} +1 -1
- package/dist/client/assets/agent-app-CPNngTIj.js +1 -0
- package/dist/client/assets/{agent-assets-COp9WevM.js → agent-assets-IEsYbqYf.js} +1 -1
- package/dist/client/assets/{agent-automation-DRfIHgf4.js → agent-automation-iOzcLbza.js} +1 -1
- package/dist/client/assets/{agent-automations-C02SU72h.js → agent-automations-COHiMRwL.js} +1 -1
- package/dist/client/assets/{agent-blog-yxvdX-jE.js → agent-blog-ClTYnrpA.js} +2 -2
- package/dist/client/assets/{agent-blog-post-BOz0k9l4.js → agent-blog-post-BieKo5sU.js} +2 -2
- package/dist/client/assets/{agent-calendar-BrjcVSaH.js → agent-calendar-DrN9hKs4.js} +1 -1
- package/dist/client/assets/{agent-capabilities-Dh06TMfs.js → agent-capabilities-g1Ym1ZNZ.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-DhRc2-S_.js → agent-connect-sources-CZgCtVaH.js} +1 -1
- package/dist/client/assets/agent-deck-C63CWfE0.js +1 -0
- package/dist/client/assets/{agent-e2e-w331hEXE.js → agent-e2e-OCkFxgz-.js} +1 -1
- package/dist/client/assets/agent-experiments-BZeZuSr2.js +1 -0
- package/dist/client/assets/agent-file-BS83qFDk.js +1 -0
- package/dist/client/assets/{agent-hosting-Cf_5DVCs.js → agent-hosting-DnFnd1YM.js} +1 -1
- package/dist/client/assets/{agent-icon-DwJHakBB.js → agent-icon-CfdcYUE7.js} +1 -1
- package/dist/client/assets/agent-library-B6Vv6L3Y.js +1 -0
- package/dist/client/assets/agent-library-file-CVP6ClM5.js +1 -0
- package/dist/client/assets/agent-overview-C3EtX-Ab.js +1 -0
- package/dist/client/assets/{agent-releases-CQDLHf-9.js → agent-releases-AtVL__p1.js} +1 -1
- package/dist/client/assets/agent-settings-CEIvC9PJ.js +1 -0
- package/dist/client/assets/agent-site-editor-code-CP-GqZR-.js +2 -0
- package/dist/client/assets/agent-site-editor-content-BmdLBDYW.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-_kq8Kx6K.js +1 -0
- package/dist/client/assets/{agent-site-editor-Bn_zysVp.js → agent-site-editor-x-mpZE5Q.js} +1 -1
- package/dist/client/assets/agent-view-Ch4mKCK3.js +1 -0
- package/dist/client/assets/{agent-view-guard-_UB25wdA.js → agent-view-guard-DLjVinhc.js} +1 -1
- package/dist/client/assets/{ai-providers-BZmTFJ6J.js → ai-providers-DVYif0Pc.js} +1 -1
- package/dist/client/assets/{alert-Dl9RecsO.js → alert-CvRyYnph.js} +1 -1
- package/dist/client/assets/{analytics-sections-ChR-yKgZ.js → analytics-sections-DLx5rbIc.js} +1 -1
- package/dist/client/assets/{api-keys-BAKKjcCM.js → api-keys-CC3fBiOG.js} +1 -1
- package/dist/client/assets/api-keys-DW5FUpRL.js +1 -0
- package/dist/client/assets/{app-editor-aGjbireC.js → app-editor-D_fd99pv.js} +1 -1
- package/dist/client/assets/{asset-utils-C40qdOgS.js → asset-utils-CTFQl8QO.js} +1 -1
- package/dist/client/assets/{auth-catchall-CwzGmsez.js → auth-catchall-n3aaYtq8.js} +1 -1
- package/dist/client/assets/{auth-entry-QpiCG8Kt.js → auth-entry-DIN9lopt.js} +1 -1
- package/dist/client/assets/{auth-split-layout-D0SngsR5.js → auth-split-layout-C3JVxF8x.js} +1 -1
- package/dist/client/assets/{auth-DuSLyK-k.js → auth-vqpzzu5D.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-BrPxKw11.js → authenticate-and-persist-oauth-Bblph2Da.js} +1 -1
- package/dist/client/assets/{automation-list-row-C_0woHJW.js → automation-list-row-Bz8m8BYO.js} +1 -1
- package/dist/client/assets/{automation-runs-DwwK7nJ3.js → automation-runs-osLD86WP.js} +1 -1
- package/dist/client/assets/{automations-Dc36NZHt.js → automations-BVdNqAsv.js} +1 -1
- package/dist/client/assets/{badge-BvHOfdxU.js → badge-DCIHIkLr.js} +1 -1
- package/dist/client/assets/{block-document-CGK32I9G.js → block-document-Dbx69UMn.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-CN-ldvuU.js → blocks-preview-workspace-context-CK2OXCcd.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-DxLq1BL5.js → blocks-tab-states-DeaA94XX.js} +1 -1
- package/dist/client/assets/{blog-preview-url-cX5z_9aO.js → blog-preview-url-58BZuQLd.js} +1 -1
- package/dist/client/assets/{blog-schema-CTE9utzf.js → blog-schema-DfhHwBev.js} +1 -1
- package/dist/client/assets/{blog-source-gate-DWHD3Df5.js → blog-source-gate-CCV8MP-i.js} +1 -1
- package/dist/client/assets/{blog-view-gate-DT-8hHxE.js → blog-view-gate-o9mn9sNx.js} +1 -1
- package/dist/client/assets/{buckets-DMt9Xchk.js → buckets-RrYuA5vR.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-D0Nbi1s7.js → build-improve-prompt-doc-fsuyBe8R.js} +1 -1
- package/dist/client/assets/{calendar-BUgmhSfk.js → calendar-BbIAhjX6.js} +1 -1
- package/dist/client/assets/{capability-load-error-DCoklIp8.js → capability-load-error-C937GiKP.js} +1 -1
- package/dist/client/assets/{category-editor-B7D8BVkO.js → category-editor-BgCEgg9r.js} +1 -1
- package/dist/client/assets/{category-tree-BeXLYa5S.js → category-tree-yoWo8LKT.js} +1 -1
- package/dist/client/assets/{chart-DfTUTOGH.js → chart-R5Gu29E6.js} +1 -1
- package/dist/client/assets/{chat-context-DG5tQFfU.js → chat-context-DSu9o-d-.js} +1 -1
- package/dist/client/assets/{chat-draft-Bv2iw9Fr.js → chat-draft-BHCxr31Y.js} +1 -1
- package/dist/client/assets/{checkbox-DAnVkT6Q.js → checkbox-D4P_L8j1.js} +1 -1
- package/dist/client/assets/{choose-editor-DX9vd71s.js → choose-editor-DFX28kMs.js} +1 -1
- package/dist/client/assets/{cli-auth-success-CY4cK7Ok.js → cli-auth-success-DGIBfDO7.js} +1 -1
- package/dist/client/assets/{cms-settings-editor-Cj7WfazE.js → cms-settings-editor-1icUX_7B.js} +1 -1
- package/dist/client/assets/{cms-store-drafts-BDhAH5vV.js → cms-store-drafts-pPAksstG.js} +1 -1
- package/dist/client/assets/{collapsible-DifRD2Ww.js → collapsible-BJX4Hk9k.js} +1 -1
- package/dist/client/assets/{collection-detail-Bq38QGfT.js → collection-detail-Cnr4TuBK.js} +1 -1
- package/dist/client/assets/{collection-display-button-nfEDIRuH.js → collection-display-button-C2JNt8jM.js} +1 -1
- package/dist/client/assets/{collection-search-RWM-9f07.js → collection-search-DIaYviRG.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DVjGjn7R.js → collection-table-wrapper-DisSN_Gv.js} +1 -1
- package/dist/client/assets/{collection-tabs-BkmY1xp_.js → collection-tabs-CxgBigfA.js} +1 -1
- package/dist/client/assets/{combobox-D7DiHBHL.js → combobox-BCPDPSll.js} +1 -1
- package/dist/client/assets/{command-DHGFzOhP.js → command-DsEpQe7b.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-D7d32LFm.js → companion-mcps-section-CVk0MHqs.js} +1 -1
- package/dist/client/assets/{config-dB-x76iz.js → config-iR6MS3mx.js} +1 -1
- package/dist/client/assets/{connect-D-G-5Mck.js → connect-BJ6zbvIe.js} +1 -1
- package/dist/client/assets/{connect-key-DYxzA5cq.js → connect-key-R6CnqQKc.js} +1 -1
- package/dist/client/assets/{connect-layout-vX9TenPs.js → connect-layout-CWTX0XxP.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-hJXgVRU-.js → connect-source-dialog-DS1_5d5l.js} +1 -1
- package/dist/client/assets/{connection-CeuJqjaI.js → connection-Daz_MJgN.js} +1 -1
- package/dist/client/assets/{connection-card-bC9jkQR3.js → connection-card-BEkW2Rzt.js} +1 -1
- package/dist/client/assets/{connection-detail-BZxu1Il4.js → connection-detail-WE10lVgN.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-BVK3iXej.js → connection-form-helpers-BZyz8LC0.js} +1 -1
- package/dist/client/assets/{connection-slug-BofuMVWL.js → connection-slug-CvvLfpvw.js} +1 -1
- package/dist/client/assets/{connections-_2oGT26C.js → connections-8XSaqT9l.js} +1 -1
- package/dist/client/assets/{content-tab-B2YwxmJz.js → content-tab-C66XjEbc.js} +3 -3
- package/dist/client/assets/{context-RVZVsnak.js → context-DW5quhGR.js} +1 -1
- package/dist/client/assets/{context-menu-BgKzmvfA.js → context-menu-Dc1eMRQk.js} +1 -1
- package/dist/client/assets/{context-shell-Bnnp_FlP.js → context-shell-CnWm8Iac.js} +3 -3
- package/dist/client/assets/{create-organization-dialog-BeGGdtfc.js → create-organization-dialog-BditzGYJ.js} +1 -1
- package/dist/client/assets/{daily-pulse-D8S4f077.js → daily-pulse-CCUis9lD.js} +1 -1
- package/dist/client/assets/{delete-copy-C7-0DCkQ.js → delete-copy-B8O2OJ6R.js} +1 -1
- package/dist/client/assets/{device-hint-B6fw2qhI.js → device-hint-C-aumrOZ.js} +1 -1
- package/dist/client/assets/{discover-BhyJuEKB.js → discover-Dbo6G7J-.js} +1 -1
- package/dist/client/assets/{domain-settings-DWaq5CPi.js → domain-settings-D_KZc6yt.js} +1 -1
- package/dist/client/assets/{drawer-BXd80xtd.js → drawer-Ckz_nyBH.js} +1 -1
- package/dist/client/assets/{editor-DNZ-WgCS.js → editor-Dv1qkRGx.js} +1 -1
- package/dist/client/assets/{editor-classes-CzejjvgI.js → editor-classes-Bm1swfOR.js} +1 -1
- package/dist/client/assets/{empty-message-DVICFi26.js → empty-message-Cs32P_FY.js} +1 -1
- package/dist/client/assets/{empty-state-BK8GboWz.js → empty-state-DGaA5_7F.js} +1 -1
- package/dist/client/assets/{empty-state-LbEOn0Mj.js → empty-state-DvK349M1.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-DYGF6IS1.js → experiments-tab-choice-pZXd8Qq7.js} +1 -1
- package/dist/client/assets/{extract-connection-data-B1FMXoXK.js → extract-connection-data-DyZVXRSl.js} +1 -1
- package/dist/client/assets/{feature-gate-XyzkzO9l.js → feature-gate-Q3XqEiLe.js} +1 -1
- package/dist/client/assets/{feature-paywall-DQF2iJDP.js → feature-paywall-DLrDt0zj.js} +1 -1
- package/dist/client/assets/{file-explorer-DbKxpql5.js → file-explorer-DTnrhmiM.js} +1 -1
- package/dist/client/assets/{file-preview-A0GfMNED.js → file-preview-C3aAzbl2.js} +1 -1
- package/dist/client/assets/{file-share-button-pVEpOvSY.js → file-share-button-DchUqnxv.js} +1 -1
- package/dist/client/assets/{file-type-icon-CSrE_noX.js → file-type-icon-C1PmpIi5.js} +1 -1
- package/dist/client/assets/{folder-icon-CA298KqN.js → folder-icon-GDlGVc-z.js} +1 -1
- package/dist/client/assets/{form-Cxhh0mxt.js → form-B3cubXs5.js} +1 -1
- package/dist/client/assets/{frame-navigation--4kFXAAS.js → frame-navigation-CZuPAR0A.js} +1 -1
- package/dist/client/assets/{gateway-client-PdaGLWBA.js → gateway-client-DDICMs0d.js} +1 -1
- package/dist/client/assets/{general-CuKnI3HJ.js → general-Dm23uhl2.js} +1 -1
- package/dist/client/assets/{github-icon-h_xg-qFR.js → github-icon-lV5tv6c5.js} +1 -1
- package/dist/client/assets/{held-block-view-zi4CM-KX.js → held-block-view-KOyRMpy4.js} +1 -1
- package/dist/client/assets/{home-w1KhoL46.js → home-Bdn-v4eM.js} +1 -1
- package/dist/client/assets/{home-overview-DrWyW-2I.js → home-overview-_jWE4zXs.js} +1 -1
- package/dist/client/assets/{hosted-reconcile-uX15ZUhb.js → hosted-reconcile-CxvdumkL.js} +1 -1
- package/dist/client/assets/{icon-button-DzpdeaSs.js → icon-button-trmtAOaJ.js} +1 -1
- package/dist/client/assets/{index-BK93qS26.js → index-2abaLvjI.js} +1 -1
- package/dist/client/assets/{index-ba5Vf9vt.js → index-3YHObF9S.js} +1 -1
- package/dist/client/assets/{index-BpNyzjaQ.js → index-BBeGVRdq.js} +1 -1
- package/dist/client/assets/{index-SPj0mL-J.js → index-BBpZPks2.js} +1 -1
- package/dist/client/assets/{index-3e8V4Do_.js → index-C7CSN06D.js} +1 -1
- package/dist/client/assets/{index-SIZschZt.js → index-D7q4YJXJ.js} +1 -1
- package/dist/client/assets/{index-CZTrNcsP.js → index-DAKnsBwp.js} +1 -1
- package/dist/client/assets/{index-BYaF8G7R.js → index-DaFEqiTp.js} +1 -1
- package/dist/client/assets/{index-C_n-5x2E.js → index-DuvX09S7.js} +1 -1
- package/dist/client/assets/{index-rt88hTRg.js → index-NWJ7p_1D.js} +1 -1
- package/dist/client/assets/{index-DNuvhcDO.js → index-PcrdQb7V.js} +1 -1
- package/dist/client/assets/{index-Bld02Tnb.js → index-QCTvcBUO.js} +1 -1
- package/dist/client/assets/{index-BuZqAz74.js → index-_VeebRNE.js} +3 -3
- package/dist/client/assets/{index-DUn-LHzT.js → index-_m0OQ-gU.js} +1 -1
- package/dist/client/assets/{index-BwBEUlXI.js → index-j-nHo57s.js} +1 -1
- package/dist/client/assets/{index-redirect-DlIbuGOg.js → index-redirect-qshgZoiU.js} +1 -1
- package/dist/client/assets/{index-5KkkYmJi.js → index-wdSinBQm.js} +1 -1
- package/dist/client/assets/{index-DsWqYG3w.js → index-ykH_xCiZ.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-CHN_AvWa.js → infiniteQueryObserver-D7rUvD7y.js} +1 -1
- package/dist/client/assets/{infra-billing-DHY4EnRE.js → infra-billing-2jNYgPJB.js} +1 -1
- package/dist/client/assets/{input--XeG2v6T.js → input-CdG_yBtw.js} +1 -1
- package/dist/client/assets/{input-c6Cx2liY.js → input-DAVLPdNO.js} +3 -3
- package/dist/client/assets/{integration-icon-D7fga3kk.js → integration-icon-D8pA0JHG.js} +1 -1
- package/dist/client/assets/{item-actions-Dld5lBtQ.js → item-actions-0UZvaX_W.js} +1 -1
- package/dist/client/assets/{jira-icon-_W0tffOR.js → jira-icon-B6n8YNiL.js} +1 -1
- package/dist/client/assets/{label-Dm_T3WyF.js → label-DZkEI5Ke.js} +1 -1
- package/dist/client/assets/{layout-DhN3YXX3.js → layout-B_eV9tIt.js} +1 -1
- package/dist/client/assets/{legacy-admin-welcome-dialog-C0w-pw6s.js → legacy-admin-welcome-dialog-ZZ1Gngd8.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-ab_jOs-e.js → legacy-agents-deep-DIO9RwdG.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-ByIcJoSw.js → legacy-main-redirect-MYDZoBC6.js} +1 -1
- package/dist/client/assets/library-BGNgyVkv.js +1 -0
- package/dist/client/assets/{library-tab-Cui4e0pM.js → library-tab-1VGCJxXK.js} +1 -1
- package/dist/client/assets/{login-COwI3GAk.js → login-D1CbtJGZ.js} +1 -1
- package/dist/client/assets/{markdown-CwYBGb1B.js → markdown-CBoNEgkf.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-CLuYD3rD.js → mcp-app-renderer-DtOO8I9w.js} +1 -1
- package/dist/client/assets/{mcp-oauth-i1ZYjV6U.js → mcp-oauth-BHOMUKtj.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DZ8B5A_7.js → mcp-oauth-DGxlh_95.js} +1 -1
- package/dist/client/assets/{members-CvbIQPwh.js → members-DHWvHq5T.js} +1 -1
- package/dist/client/assets/{memory-BhMXHewc.js → memory-C6q4guqS.js} +1 -1
- package/dist/client/assets/{mock-board-DN7OLcTA.js → mock-board-ltUmj9_y.js} +3 -3
- package/dist/client/assets/{monaco-editor-CTONBla7.js → monaco-editor-D-AA2j7y.js} +1 -1
- package/dist/client/assets/{monitoring-DPSQDGbL.js → monitoring-DaONVMuI.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-BUZplGDl.js → monitoring-stats-row-DeZi5P6B.js} +1 -1
- package/dist/client/assets/{multi-select-BSuPEET4.js → multi-select-DUQRYjic.js} +1 -1
- package/dist/client/assets/{mustache-C50JF2sQ.js → mustache-uZ8plADR.js} +1 -1
- package/dist/client/assets/{named-rule-step-D8j_NuRK.js → named-rule-step-DreL1Pcr.js} +1 -1
- package/dist/client/assets/{named-rule-view-D9U19iHq.js → named-rule-view-DfnvZmuY.js} +1 -1
- package/dist/client/assets/{new-project-dialog-Bq2YhVDS.js → new-project-dialog-B9UZLlxE.js} +1 -1
- package/dist/client/assets/{new-project-store-C82itd6a.js → new-project-store-BzLAZn_u.js} +1 -1
- package/dist/client/assets/{oauth-callback-xH1_0Q9p.js → oauth-callback-DeF7HKPm.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-Dph1UX9E.js → oauth-callback-ai-provider-B-Qmx59a.js} +1 -1
- package/dist/client/assets/{oauth-consent-BJ9Jn7G7.js → oauth-consent-CwjN9gES.js} +1 -1
- package/dist/client/assets/{onboarding-tM_LYdg0.js → onboarding-vgMy4F5g.js} +1 -1
- package/dist/client/assets/{openai-conversation-DoQ_2Seq.js → openai-conversation-NvZqYcCK.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-TOzwQjCp.js → optimistic-project-sidebar-views-CBHDKL26.js} +1 -1
- package/dist/client/assets/{order-monitor-day-BqegE0N0.js → order-monitor-day-Txb2sZ3L.js} +1 -1
- package/dist/client/assets/{organization-choice-BzjQ0aL1.js → organization-choice-CP3Mtgeb.js} +1 -1
- package/dist/client/assets/{orgs-WruSV9A-.js → orgs-QZqcYIh_.js} +1 -1
- package/dist/client/assets/{own-accounts-section-TMVLN8mQ.js → own-accounts-section-B-xTQ1qC.js} +1 -1
- package/dist/client/assets/{pair-BYbJa99U.js → pair-CHh11R95.js} +1 -1
- package/dist/client/assets/{parse-sections-CVDx-uBN.js → parse-sections-BX1x8Bjk.js} +2 -2
- package/dist/client/assets/{plan-ladder-Ce2vSjaL.js → plan-ladder-Boo36Lf_.js} +1 -1
- package/dist/client/assets/{plan-DDx2VxJ0.js → plan-qEpUYs_C.js} +1 -1
- package/dist/client/assets/{plan-usage-card-CvxOK5ad.js → plan-usage-card-XvorW2R2.js} +1 -1
- package/dist/client/assets/{popover-D6EIL5sL.js → popover-CsisCWO2.js} +1 -1
- package/dist/client/assets/{post-calendar-J6Cs6vQ8.js → post-calendar-halP83kx.js} +1 -1
- package/dist/client/assets/{post-editor-v1jKXm9-.js → post-editor-S0aVTLKj.js} +1 -1
- package/dist/client/assets/{preview-content-9gQGJiFY.js → preview-content-5ttXljO9.js} +1 -1
- package/dist/client/assets/{preview-dialog-J4DJmy9P.js → preview-dialog-BclA8lM_.js} +1 -1
- package/dist/client/assets/{preview-panel-DLe0RaXg.js → preview-panel-DwKqGg2b.js} +1 -1
- package/dist/client/assets/{preview-tab-BxZksZBr.js → preview-tab-DY0X1Y__.js} +3 -3
- package/dist/client/assets/{product-picker-dialog-DCC_2JmD.js → product-picker-dialog-BYy8uc5-.js} +1 -1
- package/dist/client/assets/{profile-CU5pOHcx.js → profile-Bd_H-bJ-.js} +1 -1
- package/dist/client/assets/{project-app-view-Chii7rIX.js → project-app-view-C5QreDU8.js} +1 -1
- package/dist/client/assets/{project-apps-Dezyz6_N.js → project-apps-Qpq3Yqgk.js} +1 -1
- package/dist/client/assets/{project-icon-BHn6Xq54.js → project-icon-CoHnihPF.js} +1 -1
- package/dist/client/assets/{project-index-5c8GGatg.js → project-index-QHWJWseM.js} +1 -1
- package/dist/client/assets/project-reports-WCcwA84Y.js +1 -0
- package/dist/client/assets/project-tasks-DKIcBGE8.js +1 -0
- package/dist/client/assets/{projects-C19Wu8MK.js → projects-BH3mZwKm.js} +1 -1
- package/dist/client/assets/{projects-empty-state-Dh0sHuPd.js → projects-empty-state-DUNpLlKl.js} +1 -1
- package/dist/client/assets/{prompts-CYFmsiS6.js → prompts-DYNo1NOe.js} +1 -1
- package/dist/client/assets/record-editor-ruw8hHLO.js +1 -0
- package/dist/client/assets/{redirect-editor-D9WJKRVv.js → redirect-editor-9KKRUJjb.js} +1 -1
- package/dist/client/assets/reports-C98Nopj0.js +1 -0
- package/dist/client/assets/{reports-Cj91Mylc.js → reports-CIVLWAKU.js} +1 -1
- package/dist/client/assets/{reports-onboarding-gB4My80z.js → reports-onboarding-BvleSDU0.js} +1 -1
- package/dist/client/assets/{reports-tab-CsHbv07d.js → reports-tab-Cpactxak.js} +2 -2
- package/dist/client/assets/repositories-BUVT6KWE.js +1 -0
- package/dist/client/assets/{repositories-C_7l-hzO.js → repositories-D3sB2pcK.js} +1 -1
- package/dist/client/assets/{repository-binding-VVfcdUiy.js → repository-binding-Ct6tvS6k.js} +1 -1
- package/dist/client/assets/{repository-picker-By75IHJa.js → repository-picker-D7wgGSh_.js} +1 -1
- package/dist/client/assets/{require-capability-DEShAaY8.js → require-capability-psnJqvDd.js} +1 -1
- package/dist/client/assets/{required-auth-layout-GSSn-bTA.js → required-auth-layout-5KQLVPyY.js} +1 -1
- package/dist/client/assets/{reset-password-eGGPXuZQ.js → reset-password-CMUJSwol.js} +1 -1
- package/dist/client/assets/{resizable-XeFzd9pk.js → resizable-TldGXL10.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-DQMxOocF.js → resolve-tab-icon-Dx984IYY.js} +1 -1
- package/dist/client/assets/{review-settings-BOoUlwEx.js → review-settings-EAZgwqP6.js} +1 -1
- package/dist/client/assets/{role-color-D-S7Ra1A.js → role-color-Az77j5-3.js} +1 -1
- package/dist/client/assets/{roles-C8YQ1Aw2.js → roles-KaJOIApg.js} +1 -1
- package/dist/client/assets/route-CLOMEKRN.js +1 -0
- package/dist/client/assets/{route-ojZJTNbW.js → route-CsFahJR-.js} +1 -1
- package/dist/client/assets/{route-lr7i-nM3.js → route-DwgCQsMA.js} +1 -1
- package/dist/client/assets/{route-page-header-BqA32d57.js → route-page-header-B8Mmh-Yn.js} +1 -1
- package/dist/client/assets/{sandbox-git-api-CkSQDoxX.js → sandbox-git-api-DN6h_KqP.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-BBz4IKVo.js → sandbox-lifecycle-context-Ptllc8xw.js} +1 -1
- package/dist/client/assets/{save-status-CmYiPWXE.js → save-status-DI5XwwX3.js} +1 -1
- package/dist/client/assets/{schema-CCpL_LVZ.js → schema-Bawh3LAf.js} +1 -1
- package/dist/client/assets/{schema-B0biNpls.js → schema-Cp9WUmjR.js} +1 -1
- package/dist/client/assets/{scroll-area-bkCFS0v8.js → scroll-area-EnKfGRfx.js} +1 -1
- package/dist/client/assets/{search-input-C4sd-kKh.js → search-input-JNlnu1vU.js} +1 -1
- package/dist/client/assets/{search-toggle-rjC0c-Iy.js → search-toggle-Gczjy-6q.js} +1 -1
- package/dist/client/assets/{secret-picker-ujhqmuU6.js → secret-picker-DpLLS_i2.js} +1 -1
- package/dist/client/assets/{secrets-CUx_W408.js → secrets-BkICoFYK.js} +1 -1
- package/dist/client/assets/{section-array-field-DOngDm8U.js → section-array-field-DeIFn5hU.js} +1 -1
- package/dist/client/assets/{sections-DmtYqnPM.js → sections-DsIUB3iD.js} +1 -1
- package/dist/client/assets/{sections-editor-DsX6y72K.js → sections-editor-DQjh_kFR.js} +1 -1
- package/dist/client/assets/{select-BkYZ4NYA.js → select-QgdI1Rfc.js} +1 -1
- package/dist/client/assets/{select-model-BNVZsPuq.js → select-model-CRyWxfNm.js} +1 -1
- package/dist/client/assets/{seo-editor-D-DOTzeP.js → seo-editor-bIUZHc8M.js} +1 -1
- package/dist/client/assets/{separator-DTKXzVmt.js → separator-BEzt-XQG.js} +1 -1
- package/dist/client/assets/{session-runtime-HHtypsTM.js → session-runtime-DLIbUSWD.js} +1 -1
- package/dist/client/assets/settings-tab-DdQCVDpj.js +1 -0
- package/dist/client/assets/{sheet-Lq2qXLx8.js → sheet-8iInbf9D.js} +1 -1
- package/dist/client/assets/{shell-layout-rYoN4RTk.js → shell-layout-D8UbY9n5.js} +1 -1
- package/dist/client/assets/{site-draft-actions-D72ZWrGI.js → site-draft-actions-BVBEL1BN.js} +1 -1
- package/dist/client/assets/{site-draft-view-DdS4HrBp.js → site-draft-view-CU45gg4m.js} +1 -1
- package/dist/client/assets/site-editor-CyPykGup.js +1 -0
- package/dist/client/assets/{site-editor-toast-aupfR4Aq.js → site-editor-toast-Cjans_Z7.js} +1 -1
- package/dist/client/assets/{skills-Cyx-LBzb.js → skills-CznUJdJq.js} +1 -1
- package/dist/client/assets/{slider-B4bXP1H_.js → slider-CnikFjRE.js} +1 -1
- package/dist/client/assets/{sortable.esm-n9zdQXyB.js → sortable.esm-CW9y-Z65.js} +1 -1
- package/dist/client/assets/{sso-DIU8j1zk.js → sso-BUdWqS9w.js} +1 -1
- package/dist/client/assets/{suggestion-Nntdxi5T.js → suggestion-gEn2gqrr.js} +1 -1
- package/dist/client/assets/{super-agent-icon-DHSnZQuw.js → super-agent-icon-Dx5Acgbw.js} +1 -1
- package/dist/client/assets/{switch-COjzxQ39.js → switch-7uXAaerp.js} +1 -1
- package/dist/client/assets/{synced-repos-s5ovH7Qr.js → synced-repos-C29_oiY7.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-CvvfUXQl.js → tab-icon-glyph-CgM03OpD.js} +1 -1
- package/dist/client/assets/{table-DQIAY6r-.js → table-drGady29.js} +1 -1
- package/dist/client/assets/{tabs-CbfCGlFS.js → tabs-C9s0KY6N.js} +1 -1
- package/dist/client/assets/{task-board-DEUSGytR.js → task-board-CHctJwrW.js} +1 -1
- package/dist/client/assets/{task-key-DaPOId6s.js → task-key-B6H-3XJr.js} +1 -1
- package/dist/client/assets/{task-route-BJj40Yza.js → task-route-CBxVmSL7.js} +1 -1
- package/dist/client/assets/{task-status-B6WfZxUN.js → task-status-CRPxL8gs.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-UnAzvxoh.js → taskboard-analytics-DMGsXigW.js} +1 -1
- package/dist/client/assets/tasks-Cey8OfRa.js +1 -0
- package/dist/client/assets/{tasks-vny6IFm0.js → tasks-Dmvi9b_Y.js} +1 -1
- package/dist/client/assets/{textarea-CcO-rfag.js → textarea-Cimn1xhl.js} +1 -1
- package/dist/client/assets/{thread-analytics-BUAtXNjP.js → thread-analytics-BhURcKi_.js} +1 -1
- package/dist/client/assets/{thread-button-DbVaWztE.js → thread-button-DCHp9tO9.js} +1 -1
- package/dist/client/assets/{thread-intent-CyH0Z8_7.js → thread-intent-pC76uPwU.js} +1 -1
- package/dist/client/assets/{thread-route-BjDCYf6b.js → thread-route-BrFKkVcF.js} +1 -1
- package/dist/client/assets/{thread-route-Dw1cQjON.js → thread-route-D_C8d7xK.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-C6XCaB8H.js → thread-sheet-body-DAosbhoz.js} +1 -1
- package/dist/client/assets/{time-range-picker-C45MZ0gR.js → time-range-picker-9BtbKkzB.js} +1 -1
- package/dist/client/assets/{toggle-group-DFyE84bx.js → toggle-group-n8suP90I.js} +1 -1
- package/dist/client/assets/{tool-set-selector-BgHdncVU.js → tool-set-selector-DP0UayXg.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-BroRQfDx.js → toolbar-icon-button-BAHC2wln.js} +1 -1
- package/dist/client/assets/{tooltip-DnGqcvtu.js → tooltip-BYnWhoO-.js} +1 -1
- package/dist/client/assets/{tooltipContext-BVc6eTu_.js → tooltipContext-DqZT6jLi.js} +1 -1
- package/dist/client/assets/{track-ENeykFhY.js → track-BXFPt0jP.js} +1 -1
- package/dist/client/assets/{types-B4ln4I1a.js → types-CdP485rd.js} +1 -1
- package/dist/client/assets/{url-slug-BCxEu7m_.js → url-slug-BkKOqwJh.js} +1 -1
- package/dist/client/assets/{usage-stats-C5Wj6kIy.js → usage-stats-CCyq9Zgo.js} +1 -1
- package/dist/client/assets/{use-ai-providers-BG5EDM0R.js → use-ai-providers-D6peTC8u.js} +1 -1
- package/dist/client/assets/{use-api-keys-CjwRm6n8.js → use-api-keys-DUVyFEfc.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule-BH9tV1RN.js → use-apply-named-rule-D9dIZN02.js} +1 -1
- package/dist/client/assets/use-ask-in-chat-DINxvsUX.js +1 -0
- package/dist/client/assets/{use-automations-D4bJmUmE.js → use-automations-qL4OMGNt.js} +1 -1
- package/dist/client/assets/{use-autosave-Dq8gUNzN.js → use-autosave-DGPPxEGb.js} +1 -1
- package/dist/client/assets/use-blocks-v8-project-JOmELUJ6.js +1 -0
- package/dist/client/assets/use-blog-view-DQBrFMuV.js +1 -0
- package/dist/client/assets/{use-chat-layout-state-D38zRykR.js → use-chat-layout-state-DMWJLUZv.js} +1 -1
- package/dist/client/assets/{use-cms-publish-actions-Bf5Y1rJL.js → use-cms-publish-actions-DuI-swrZ.js} +1 -1
- package/dist/client/assets/{use-connect-companion-leNqQRzW.js → use-connect-companion-C9LfjXNg.js} +1 -1
- package/dist/client/assets/{use-connection-C4G0ZMoe.js → use-connection-cSaq7_i7.js} +1 -1
- package/dist/client/assets/{use-content-sync-CeYI53r8.js → use-content-sync-DElceZSb.js} +1 -1
- package/dist/client/assets/{use-copy-BFeXylk9.js → use-copy-DKfw8n-3.js} +1 -1
- package/dist/client/assets/{use-current-view-swKX6Bc6.js → use-current-view-a6HKOM5X.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-DX45EO9I.js → use-date-fns-locale-B_xn4WWe.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-BVXsg1Of.js → use-debounced-autosave-Dtb8gA2L.js} +1 -1
- package/dist/client/assets/{use-debounced-value-CPl0Wyl6.js → use-debounced-value-BAma3ogA.js} +1 -1
- package/dist/client/assets/{use-deco-credits-C4mVYU5r.js → use-deco-credits-BeQtkXPR.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-SRdggwTs.js → use-decopilot-events-B0JW1Gtz.js} +1 -1
- package/dist/client/assets/{use-delete-block-CRyG6Do-.js → use-delete-block-CUXsAbin.js} +1 -1
- package/dist/client/assets/{use-delete-connection-C-kXdkQA.js → use-delete-connection-DNw4luEn.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-Dwt-RYsg.js → use-deployment-admin-BENsmKZ2.js} +1 -1
- package/dist/client/assets/{use-entitlements-DgXhk8I6.js → use-entitlements-B6kax2f9.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-DtikvUh-.js → use-fast-preview-draft-url-fo8VZAME.js} +1 -1
- package/dist/client/assets/{use-file-configs-BlRaUlfc.js → use-file-configs-aENtp_va.js} +1 -1
- package/dist/client/assets/{use-id-selection-CJdNm4ZY.js → use-id-selection-DZH3hNJe.js} +1 -1
- package/dist/client/assets/{use-in-settings-cNZb_oio.js → use-in-settings-jNNDWh86.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-BKl_0o2v.js → use-inbox-feed-Axr6Wlqz.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-DgSz0aNh.js → use-infinite-scroll-DjPaD0kN.js} +1 -1
- package/dist/client/assets/{use-join-requests-pUhubFwu.js → use-join-requests-WKQMf9yH.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-B0lMlgyK.js → use-main-panel-tabs-DFx6VsI6.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-BLLNsVrE.js → use-mcp-auth-status-CCXu_Vmb.js} +1 -1
- package/dist/client/assets/{use-mcp-client-UWOU8UbZ.js → use-mcp-client-UP8_tZ9p.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-CjwiiUTx.js → use-mcp-prompts-BM9uSers.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-C7Kg2Nto.js → use-mcp-tools-mA41mojn.js} +1 -1
- package/dist/client/assets/{use-mobile-Cq1k3-Gk.js → use-mobile-FS1bh43h.js} +1 -1
- package/dist/client/assets/{use-move-blocks-DH3gSdil.js → use-move-blocks-DAGy4lk4.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-vJOwimSb.js → use-navigate-to-agent-Dg2qYHJi.js} +1 -1
- package/dist/client/assets/{use-never-published-BB5kYeS3.js → use-never-published-DDbQ0Vt8.js} +1 -1
- package/dist/client/assets/{use-org-fs-CAHuTLc_.js → use-org-fs-DbTl86_J.js} +1 -1
- package/dist/client/assets/{use-org-notice-D_lLzWXp.js → use-org-notice-D5zuQ4m5.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-BxGs1Gi_.js → use-org-repo-syncs-C8jG5KSy.js} +1 -1
- package/dist/client/assets/{use-org-sso-fZ2uDAIp.js → use-org-sso-QMFtipA-.js} +1 -1
- package/dist/client/assets/{use-organization-settings-D8JbZGlQ.js → use-organization-settings-ByKdFGhE.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-B3thngCs.js → use-panel-navigate-D4GuHOu1.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-BKZJ0lpX.js → use-project-native-view-presence-BEytngua.js} +1 -1
- package/dist/client/assets/{use-project-scope-CD-cb4-V.js → use-project-scope-CpfOkL8I.js} +1 -1
- package/dist/client/assets/{use-recent-apps-Co5DoIGT.js → use-recent-apps-Dt_ZPA-N.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-lGxrsSfr.js → use-reports-diagnostic-MEHXC7RY.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-BcrE-YTF.js → use-sandbox-events-CPKES4Ee.js} +1 -1
- package/dist/client/assets/{use-secrets-yIZbpwIn.js → use-secrets-BGup3PHO.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-C2vE3o4z.js → use-section-preview-base-CErD4C9a.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-Bo3tE9bK.js → use-sidebar-collapsed-9Vi_PrVo.js} +1 -1
- package/dist/client/assets/{use-tags-BQcMuDty.js → use-tags-CL2wnmn0.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-CIahrWuX.js → use-task-board-analytics-CGiNWJEU.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-W9kboyPg.js → use-task-board-item-prs-Mcp2690_.js} +1 -1
- package/dist/client/assets/{use-task-board-items-DP6ZFnrN.js → use-task-board-items-DxcJSuMX.js} +1 -1
- package/dist/client/assets/{use-task-board-prompts-qQB1KZ8p.js → use-task-board-prompts-CeUQeuL1.js} +1 -1
- package/dist/client/assets/{use-task-metadata-C2UpEUk-.js → use-task-metadata-CG-mCqhD.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-A3ms5KEO.js → use-thread-outputs-BRvk_pZG.js} +1 -1
- package/dist/client/assets/{use-view-draft-kind-CXMOqIBD.js → use-view-draft-kind-BLkqtU-Q.js} +1 -1
- package/dist/client/assets/{use-voice-input-poVZeRVs.js → use-voice-input-Dv1QYOod.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CuAeAzcr.js +1 -0
- package/dist/client/assets/{useQueries-DhONZGBj.js → useQueries-X3Wj3mkG.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-QLEux5C_.js +1 -0
- package/dist/client/assets/{users-B_cNHXhu.js → users-SsaEf6Es.js} +1 -1
- package/dist/client/assets/{utils-BdAsQahL.js → utils-Dovv0grx.js} +1 -1
- package/dist/client/assets/{variant-calendar-DkWaMyhm.js → variant-calendar-CtOZf_f5.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-CxSxAvsY.js → variant-matcher-override-CdFxQaGp.js} +1 -1
- package/dist/client/assets/{view-header-CZchRX7c.js → view-header-ByNTN-so.js} +1 -1
- package/dist/client/assets/{virtual-mcp-4VHtoaO4.js → virtual-mcp-BjSK3sGG.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-C7kLS2GY.js → watch-sse-pool-_tvuBMId.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agent-app-Ch0m8w-u.js +0 -1
- package/dist/client/assets/agent-deck-BEYLEOzY.js +0 -1
- package/dist/client/assets/agent-experiments-CIRveYjB.js +0 -1
- package/dist/client/assets/agent-file-CRD-Yf8v.js +0 -1
- package/dist/client/assets/agent-library-BDbVLVqf.js +0 -1
- package/dist/client/assets/agent-library-file-FdEtCyvQ.js +0 -1
- package/dist/client/assets/agent-overview-90jCAnhT.js +0 -1
- package/dist/client/assets/agent-settings-DazJIQdd.js +0 -1
- package/dist/client/assets/agent-site-editor-code-AxRnYsCW.js +0 -2
- package/dist/client/assets/agent-site-editor-content-Css28lBT.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-rUOwwi2z.js +0 -1
- package/dist/client/assets/agent-view-BwA2SWmb.js +0 -1
- package/dist/client/assets/api-keys-7ijHuhZV.js +0 -1
- package/dist/client/assets/library-LpeL-fNK.js +0 -1
- package/dist/client/assets/project-reports-BhJG82JT.js +0 -1
- package/dist/client/assets/project-tasks-AXDig_Zb.js +0 -1
- package/dist/client/assets/record-editor-D2NFDCNZ.js +0 -1
- package/dist/client/assets/reports-C-kEainI.js +0 -1
- package/dist/client/assets/repositories-L_Jm13il.js +0 -1
- package/dist/client/assets/route-DjlZ9cbf.js +0 -1
- package/dist/client/assets/settings-tab-B50Sia1R.js +0 -1
- package/dist/client/assets/site-editor-B6Bvzk4_.js +0 -1
- package/dist/client/assets/tasks-BtIOVSMQ.js +0 -1
- package/dist/client/assets/use-ask-in-chat-C6eCNqgR.js +0 -1
- package/dist/client/assets/use-blocks-v8-project-Dh0QtV4J.js +0 -1
- package/dist/client/assets/use-blog-view-w4rEUATy.js +0 -1
- package/dist/client/assets/useInfiniteQuery-CNxlkxws.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-FHN2hj19.js +0 -1
package/dist/client/assets/{analytics-sections-ChR-yKgZ.js → analytics-sections-DLx5rbIc.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as C,j as s,b as B,gV as Q,m as D,F as fe,r as Z,d as xe,hE as q,az as pe}from"./index-BuZqAz74.js";import{c as J,b as G,B as U,C as ee}from"./chart-DfTUTOGH.js";import{e as he,a as ge,b as W,T as je,d as be,c as ye}from"./table-DQIAY6r-.js";import{i as ve}from"./AlertCircle-CGZfuvxJ.js";import{i as ke,n as Ne}from"./ArrowUp-DJZ55cl-.js";import{n as Se,c as we,k as Ce,d as $e}from"./UserCheck01-BMoOFYIZ.js";import{T as te,a as se}from"./toggle-group-DFyE84bx.js";import{B as Y}from"./badge-BvHOfdxU.js";import{l as ne,T as Te,P as De,S as Oe}from"./config-dB-x76iz.js";import{C as H,X as P,Y as V}from"./CartesianChart-B0LNjIyx.js";import{A as Ie,a as Be}from"./AreaChart-DXqVsicd.js";function le(a){const e=C.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)?q(a):a}function _(a){const e=C.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 @container flex h-full w-full min-w-0 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 whitespace-nowrap text-4xl font-normal text-foreground @max-xs:text-3xl @max-3xs:text-2xl",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=C.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=C.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=C.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(ke,{size:12}):s.jsx(Ne,{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=C.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=C.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=C.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 w;e[16]!==$||e[17]!==S||e[18]!==g?(w=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]=w):w=e[19];const O=w;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(ee,{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(J,{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=C.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=C.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=C.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=C.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,w=t.rows.map(O=>O[g]).filter(et);return w.length>0&&w.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 w;e[29]!==g||e[30]!==t.units?(w=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]=w):w=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(w)})});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(he,{variant:"flush",children:[s.jsx(ge,{children:s.jsx(W,{children:k.map(S=>{const{c:g}=S;return s.jsx(je,{className:D("whitespace-nowrap first:pl-4 last:pr-4",$.has(g)&&"text-right"),children:g==="Thread"?"":g},g)})})}),s.jsx(be,{children:t.rows.map((S,g)=>s.jsx(W,{children:k.map((w,O)=>{const{c:T,j:I}=w,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(ye,{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 $t(a){const e=C.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"?q(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(ve,{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:$e,Priority:Ce,Tag:we,Sprint:Se,"Brief by":pe};function de(a){const e=C.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=C.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=C.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(te,{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(se,{value:a.label,children:[e&&s.jsx(e,{}),a.label]},a.label)}const ue=3;function ot(a){const e=C.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(te,{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(se,{value:a.key,children:a.label},a.key)}function ut(a){const e=C.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=C.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=C.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 w=t.categories[g];w&&L(d,w.drill,w.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(ee,{cursor:b,content:g=>{const{active:w,payload:O}=g;return s.jsx(oe,{active:w,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(J,{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,w)=>s.jsx(U,{dataKey:g,stackId:"all",fill:m(g),maxBarSize:22,radius:w===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:(w,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 Tt(a){return a.kind==="funnel"||a.kind==="bars"?"half":"full"}function Dt(a){const e=C.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{A,$t as D,_ as M,Dt as S,Tt as s};
|
|
1
|
+
import{c as C,j as s,b as B,gV as Q,m as D,F as fe,r as Z,d as xe,hE as q,az as pe}from"./index-_VeebRNE.js";import{c as J,b as G,B as U,C as ee}from"./chart-R5Gu29E6.js";import{e as he,a as ge,b as W,T as je,d as be,c as ye}from"./table-drGady29.js";import{i as ve}from"./AlertCircle-gyZP8TIO.js";import{i as ke,n as Ne}from"./ArrowUp-DYnF34lU.js";import{n as Se,c as we,k as Ce,d as $e}from"./UserCheck01-Dqn7toBe.js";import{T as te,a as se}from"./toggle-group-n8suP90I.js";import{B as Y}from"./badge-DCIHIkLr.js";import{l as ne,T as Te,P as De,S as Oe}from"./config-iR6MS3mx.js";import{C as H,X as P,Y as V}from"./CartesianChart-Cflx4Yj4.js";import{A as Ie,a as Be}from"./AreaChart-BmP0ImmP.js";function le(a){const e=C.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)?q(a):a}function _(a){const e=C.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 @container flex h-full w-full min-w-0 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 whitespace-nowrap text-4xl font-normal text-foreground @max-xs:text-3xl @max-3xs:text-2xl",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=C.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=C.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=C.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(ke,{size:12}):s.jsx(Ne,{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=C.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=C.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=C.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 w;e[16]!==$||e[17]!==S||e[18]!==g?(w=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]=w):w=e[19];const O=w;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(ee,{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(J,{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=C.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=C.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=C.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=C.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,w=t.rows.map(O=>O[g]).filter(et);return w.length>0&&w.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 w;e[29]!==g||e[30]!==t.units?(w=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]=w):w=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(w)})});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(he,{variant:"flush",children:[s.jsx(ge,{children:s.jsx(W,{children:k.map(S=>{const{c:g}=S;return s.jsx(je,{className:D("whitespace-nowrap first:pl-4 last:pr-4",$.has(g)&&"text-right"),children:g==="Thread"?"":g},g)})})}),s.jsx(be,{children:t.rows.map((S,g)=>s.jsx(W,{children:k.map((w,O)=>{const{c:T,j:I}=w,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(ye,{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 $t(a){const e=C.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"?q(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(ve,{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:$e,Priority:Ce,Tag:we,Sprint:Se,"Brief by":pe};function de(a){const e=C.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=C.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=C.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(te,{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(se,{value:a.label,children:[e&&s.jsx(e,{}),a.label]},a.label)}const ue=3;function ot(a){const e=C.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(te,{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(se,{value:a.key,children:a.label},a.key)}function ut(a){const e=C.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=C.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=C.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 w=t.categories[g];w&&L(d,w.drill,w.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(ee,{cursor:b,content:g=>{const{active:w,payload:O}=g;return s.jsx(oe,{active:w,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(J,{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,w)=>s.jsx(U,{dataKey:g,stackId:"all",fill:m(g),maxBarSize:22,radius:w===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:(w,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 Tt(a){return a.kind==="funnel"||a.kind==="bars"?"half":"full"}function Dt(a){const e=C.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{A,$t as D,_ as M,Dt as S,Tt as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as L,m as Ie,j as s,b as G,r as P,h as Re,a6 as ze,W as tt,au as st,T as Fe,dQ as it,i as lt,i4 as nt,gV as at,gG as Le,aP as ot,aO as rt,aL as ct,aJ as dt,aK as ut,aN as ft,aM as mt,b9 as pt,B as Q,t as ke,gh as xt,x as Be,aU as Ge,w as qe,I as Me,y as Qe,v as Ve,D as He}from"./index-BuZqAz74.js";import{i as gt}from"./AlertCircle-CGZfuvxJ.js";import{e as ht}from"./agent-icon-DwJHakBB.js";import{i as Ue}from"./Key01-fuHivqLl.js";import{s as Ye}from"./Plus--DcN-eh1.js";import{s as yt}from"./Trash01-BmQrADz0.js";import{E as jt}from"./empty-state-LbEOn0Mj.js";import{L as Ee}from"./label-Dm_T3WyF.js";import{B as Ae}from"./badge-BvHOfdxU.js";import{I as Kt,R as bt}from"./index-BYaF8G7R.js";import{c as vt,b as Ct,a as St,d as Nt,S as _t}from"./select-BkYZ4NYA.js";import{u as We}from"./use-mcp-client-UWOU8UbZ.js";import{u as Dt}from"./use-mcp-tools-C7Kg2Nto.js";import{t as wt}from"./ChevronDown-ClblfTVV.js";import{C as At}from"./checkbox-DAnVkT6Q.js";import{S as kt}from"./search-input-C4sd-kKh.js";import{I as Tt}from"./integration-icon-D7fga3kk.js";import{T as Ot}from"./tool-set-selector-BgHdncVU.js";import{b as Et}from"./use-connection-C4G0ZMoe.js";import{u as It,b as zt,a as Pt}from"./use-api-keys-CjwRm6n8.js";function Lt(o){const e=L.c(8);let l,i;e[0]!==o?({className:l,...i}=o,e[0]=o,e[1]=l,e[2]=i):(l=e[1],i=e[2]);let t;e[3]!==l?(t=Ie("grid gap-3",l),e[3]=l,e[4]=t):t=e[4];let a;return e[5]!==i||e[6]!==t?(a=s.jsx(bt,{"data-slot":"radio-group",className:t,...i}),e[5]=i,e[6]=t,e[7]=a):a=e[7],a}function $t(o){const e=L.c(9);let l,i;e[0]!==o?({className:l,...i}=o,e[0]=o,e[1]=l,e[2]=i):(l=e[1],i=e[2]);let t;e[3]!==l?(t=Ie("group relative inline-flex size-4 shrink-0 items-center justify-center rounded-full shadow-[inset_0_0_0_1.5px_var(--input)] transition-[background-color,box-shadow] duration-150 hover:shadow-[inset_0_0_0_1.5px_color-mix(in_oklch,var(--foreground)_30%,var(--input))] data-[state=checked]:bg-primary data-[state=checked]:shadow-[inset_0_0_0_1.5px_var(--primary)] aria-invalid:shadow-[inset_0_0_0_1.5px_var(--destructive)] focus-ring disabled:opacity-50 motion-reduce:transition-none",l),e[3]=l,e[4]=t):t=e[4];let a;e[5]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("span",{className:"bg-primary-foreground size-1.5 scale-0 rounded-full transition-transform duration-200 ease-[cubic-bezier(0.34,1.56,0.64,1)] group-data-[state=checked]:scale-100 motion-reduce:transition-none"}),e[5]=a):a=e[5];let n;return e[6]!==i||e[7]!==t?(n=s.jsx(Kt,{"data-slot":"radio-group-item",className:t,...i,children:a}),e[6]=i,e[7]=t,e[8]=n):n=e[8],n}const $e=["7","30","90","365","never"],Rt=86400;function Ft(o){return o.filter(e=>e.annotations?.readOnlyHint===!0).map(e=>e.name)}const Ne="self";function Bt(o,e,l){return o==="full"?{"*":["*"]}:o==="read-only"?{[Ne]:e}:Object.fromEntries(Object.entries(l).filter(([,i])=>i.length>0))}function Je(o){return Object.values(o).reduce((e,l)=>e+l.length,0)}function Gt(o){return o==="never"?void 0:Number(o)*Rt}function qt(o){const e=i=>{const t=o[i];return Array.isArray(t)?t:[]};if(e("*").includes("*")||e("self").includes("*"))return{kind:"full"};const l=new Set;for(const i of Object.keys(o))for(const t of e(i))t.startsWith("!")||l.add(`${i}:${t}`);return{kind:"tools",count:l.size}}function Mt(o,e){return o.name.toLowerCase().includes(e)||(o.description?.toLowerCase().includes(e)??!1)}function Xe(o){const e=L.c(56),{resource:l,title:i,icon:t,tools:a,selected:n,onChange:m,query:c,onExpand:r}=o,d=G(),[p,x]=P.useState(!1);let u;e[0]!==c||e[1]!==i?(u=!c||i.toLowerCase().includes(c),e[0]=c,e[1]=i,e[2]=u):u=e[2];const f=u;let j;e[3]!==c||e[4]!==f||e[5]!==a?(j=a===null?null:f?a:a.filter(A=>Mt(A,c)),e[3]=c,e[4]=f,e[5]=a,e[6]=j):j=e[6];const h=j,g=p||!!c&&(h?.length??0)>0,S=!f&&!h?.length;let K;e[7]!==n?(K=new Set(n),e[7]=n,e[8]=K):K=e[8];const y=K,v=a!==null&&a.length>0&&n.length>=a.length;let b;e[9]!==r||e[10]!==p?(b=()=>{p||r?.(),x(!p)},e[9]=r,e[10]=p,e[11]=b):b=e[11];const C=b;let N;e[12]!==m||e[13]!==r||e[14]!==n.length||e[15]!==a?(N=()=>{if(n.length>0){m([]);return}if(a===null){r?.(),x(!0);return}m(a.map(Qt))},e[12]=m,e[13]=r,e[14]=n.length,e[15]=a,e[16]=N):N=e[16];const _=N;if(S)return null;let w;e[17]!==g?(w=g?s.jsx(wt,{size:16,className:"shrink-0 text-muted-foreground"}):s.jsx(st,{size:16,className:"shrink-0 text-muted-foreground"}),e[17]=g,e[18]=w):w=e[18];let D;e[19]!==t||e[20]!==i?(D=s.jsx(Tt,{icon:t,name:i,size:"xs"}),e[19]=t,e[20]=i,e[21]=D):D=e[21];let k;e[22]!==i?(k=s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:i}),e[22]=i,e[23]=k):k=e[23];let T;e[24]!==n.length||e[25]!==d||e[26]!==a?(T=(a!==null||n.length>0)&&s.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:a===null?n.length:d("settings.apiKeys.toolsGroupCount",{count:n.length,total:a.length})}),e[24]=n.length,e[25]=d,e[26]=a,e[27]=T):T=e[27];let R;e[28]!==g||e[29]!==w||e[30]!==D||e[31]!==k||e[32]!==T||e[33]!==C?(R=s.jsxs("button",{type:"button",onClick:C,"aria-expanded":g,className:"flex min-w-0 flex-1 cursor-pointer items-center gap-3 py-2.5 pl-3 text-left",children:[w,D,k,T]}),e[28]=g,e[29]=w,e[30]=D,e[31]=k,e[32]=T,e[33]=C,e[34]=R):R=e[34];const F=v?!0:n.length>0?"indeterminate":!1;let O;e[35]!==d||e[36]!==i?(O=d("settings.apiKeys.toolsSelectGroup",{name:i}),e[35]=d,e[36]=i,e[37]=O):O=e[37];let E;e[38]!==F||e[39]!==O||e[40]!==_?(E=s.jsx(At,{checked:F,onCheckedChange:_,"aria-label":O}),e[38]=F,e[39]=O,e[40]=_,e[41]=E):E=e[41];let I;e[42]!==R||e[43]!==E?(I=s.jsxs("div",{className:"flex items-center gap-3 pr-4 hover:bg-accent",children:[R,E]}),e[42]=R,e[43]=E,e[44]=I):I=e[44];let z;e[45]!==g||e[46]!==m||e[47]!==l||e[48]!==n||e[49]!==y||e[50]!==d||e[51]!==h?(z=g&&s.jsx("div",{className:"space-y-1 border-t border-border p-1",children:h===null?s.jsx("div",{className:"flex justify-center py-4",children:s.jsx(Re,{className:"size-4 text-muted-foreground"})}):h.length===0?s.jsx("p",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:d("settings.apiKeys.toolsNone")}):h.map(A=>s.jsx(Ot,{connectionId:l,tool:A,isSelected:y.has(A.name),onToggle:()=>m(y.has(A.name)?n.filter(V=>V!==A.name):[...n,A.name]),badge:A.annotations?.readOnlyHint===!0&&s.jsx(Ae,{variant:"muted",size:"sm",children:d("settings.apiKeys.readOnlyBadge")})},A.name))}),e[45]=g,e[46]=m,e[47]=l,e[48]=n,e[49]=y,e[50]=d,e[51]=h,e[52]=z):z=e[52];let $;return e[53]!==I||e[54]!==z?($=s.jsxs("div",{className:"overflow-hidden rounded-lg border border-border bg-card",children:[I,z]}),e[53]=I,e[54]=z,e[55]=$):$=e[55],$}function Qt(o){return o.name}function Vt(o){const e=L.c(21),{connection:l,selected:i,onChange:t,query:a}=o,{org:n}=ze();let m;e[0]!==n.id||e[1]!==n.slug?(m={connectionId:Fe,orgId:n.id,orgSlug:n.slug},e[0]=n.id,e[1]=n.slug,e[2]=m):m=e[2];const c=We(m),[r,d]=P.useState(!1);let p;e[3]!==c||e[4]!==l.id||e[5]!==n.id?(p=it(n.id,"CONNECTIONS",l.id,c),e[3]=c,e[4]=l.id,e[5]=n.id,e[6]=p):p=e[6];let x;e[7]!==r||e[8]!==p?(x={...p,enabled:r},e[7]=r,e[8]=p,e[9]=x):x=e[9];const{data:u}=lt(x);let f;e[10]!==u?(f=u?u.item?.tools??[]:null,e[10]=u,e[11]=f):f=e[11];const j=f;let h;e[12]===Symbol.for("react.memo_cache_sentinel")?(h=()=>d(!0),e[12]=h):h=e[12];let g;return e[13]!==l.icon||e[14]!==l.id||e[15]!==l.title||e[16]!==t||e[17]!==a||e[18]!==i||e[19]!==j?(g=s.jsx(Xe,{resource:l.id,title:l.title,icon:l.icon,tools:j,selected:i,onChange:t,query:a,onExpand:h}),e[13]=l.icon,e[14]=l.id,e[15]=l.title,e[16]=t,e[17]=a,e[18]=i,e[19]=j,e[20]=g):g=e[20],g}function Ht(o){const e=L.c(14),{toolSet:l,onChange:i,query:t}=o,{org:a}=ze();let n;e[0]!==a.id?(n=tt.SELF(a.id),e[0]=a.id,e[1]=n):n=e[1];const m=n,c=Et();let r;if(e[2]!==i||e[3]!==t||e[4]!==m||e[5]!==c||e[6]!==l){let d;e[8]!==m?(d=u=>u.id!==m,e[8]=m,e[9]=d):d=e[9];const p=c.filter(d);let x;e[10]!==i||e[11]!==t||e[12]!==l?(x=u=>s.jsx(Vt,{connection:u,selected:l[u.id]??[],onChange:f=>i(u.id,f),query:t},u.id),e[10]=i,e[11]=t,e[12]=l,e[13]=x):x=e[13],r=p.map(x),e[2]=i,e[3]=t,e[4]=m,e[5]=c,e[6]=l,e[7]=r}else r=e[7];return r}function Ut(o){const e=L.c(41),{studioTools:l,toolSet:i,onChange:t}=o,a=G(),[n,m]=P.useState("");let c;e[0]!==n?(c=n.trim().toLowerCase(),e[0]=n,e[1]=c):c=e[1];const r=P.useDeferredValue(c);let d;e[2]!==t||e[3]!==i?(d=(_,w)=>t({...i,[_]:w}),e[2]=t,e[3]=i,e[4]=d):d=e[4];const p=d;let x;e[5]!==a?(x=a("settings.apiKeys.toolsSearch"),e[5]=a,e[6]=x):x=e[6];let u;e[7]!==n||e[8]!==x?(u=s.jsx(kt,{value:n,onChange:m,placeholder:x,className:"flex-1"}),e[7]=n,e[8]=x,e[9]=u):u=e[9];let f;e[10]!==a||e[11]!==i?(f=a("settings.apiKeys.toolsSelected",{count:Je(i)}),e[10]=a,e[11]=i,e[12]=f):f=e[12];let j;e[13]!==f?(j=s.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:f}),e[13]=f,e[14]=j):j=e[14];let h;e[15]!==u||e[16]!==j?(h=s.jsxs("div",{className:"flex items-center gap-3",children:[u,j]}),e[15]=u,e[16]=j,e[17]=h):h=e[17];let g;e[18]!==a?(g=a("settings.apiKeys.studioTools"),e[18]=a,e[19]=g):g=e[19];let S;e[20]!==i?(S=i[Ne]??[],e[20]=i,e[21]=S):S=e[21];let K;e[22]!==p?(K=_=>p(Ne,_),e[22]=p,e[23]=K):K=e[23];let y;e[24]!==r||e[25]!==l||e[26]!==K||e[27]!==g||e[28]!==S?(y=s.jsx(Xe,{resource:Ne,title:g,icon:"/favicon.svg",tools:l,selected:S,onChange:K,query:r}),e[24]=r,e[25]=l,e[26]=K,e[27]=g,e[28]=S,e[29]=y):y=e[29];let v;e[30]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx("div",{className:"flex justify-center py-3",children:s.jsx(Re,{className:"size-4 text-muted-foreground"})}),e[30]=v):v=e[30];let b;e[31]!==r||e[32]!==p||e[33]!==i?(b=s.jsx(P.Suspense,{fallback:v,children:s.jsx(Ht,{toolSet:i,onChange:p,query:r})}),e[31]=r,e[32]=p,e[33]=i,e[34]=b):b=e[34];let C;e[35]!==y||e[36]!==b?(C=s.jsxs("div",{className:"max-h-80 space-y-2 overflow-y-auto",children:[y,b]}),e[35]=y,e[36]=b,e[37]=C):C=e[37];let N;return e[38]!==C||e[39]!==h?(N=s.jsxs("div",{className:"space-y-2",children:[h,C]}),e[38]=C,e[39]=h,e[40]=N):N=e[40],N}function Ze(o){const e=L.c(6),{error:l}=o,i=G();let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(gt,{size:16}),e[0]=t):t=e[0];let a;e[1]!==l.message||e[2]!==i?(a=i("settings.apiKeys.failedToLoadError",{error:l.message}),e[1]=l.message,e[2]=i,e[3]=a):a=e[3];let n;return e[4]!==a?(n=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[t,s.jsx("span",{className:"text-sm font-medium",children:a})]}),e[4]=a,e[5]=n):n=e[5],n}function Yt(o){const e=L.c(31),{apiKey:l,onDelete:i}=o,t=G(),a=qt(l.permissions),n=l.expiresAt?new Date(l.expiresAt):null,[m]=P.useState(Wt),c=n!==null&&n.getTime()<=m,r=n?.toLocaleDateString()??"",d="flex items-center justify-between gap-4 px-4 py-3",p="flex items-center gap-3 min-w-0";let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:s.jsx(Ue,{size:16,className:"text-muted-foreground"})}),e[0]=x):x=e[0];const u="min-w-0";let f;e[1]!==l.name?(f=s.jsx("span",{className:"font-medium text-sm truncate",children:l.name}),e[1]=l.name,e[2]=f):f=e[2];const j=a.kind==="full"?s.jsx(Ae,{variant:"warning",size:"sm",children:t("settings.apiKeys.accessFull")}):s.jsx(Ae,{variant:"muted",size:"sm",children:t("settings.apiKeys.toolCount",{count:a.count})});let h;e[3]!==c||e[4]!==t?(h=c&&s.jsx(Ae,{variant:"destructive",size:"sm",children:t("settings.apiKeys.expired")}),e[3]=c,e[4]=t,e[5]=h):h=e[5];let g;e[6]!==f||e[7]!==j||e[8]!==h?(g=s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[f,j,h]}),e[6]=f,e[7]=j,e[8]=h,e[9]=g):g=e[9];const S="text-xs text-muted-foreground mt-0.5";let K;e[10]!==l.createdAt||e[11]!==t?(K=t("settings.apiKeys.createdAt",{date:new Date(l.createdAt).toLocaleDateString()}),e[10]=l.createdAt,e[11]=t,e[12]=K):K=e[12];const y=" · ",v=l.expiresAt?c?t("settings.apiKeys.expiredOn",{date:r}):t("settings.apiKeys.expiresOn",{date:r}):t("settings.apiKeys.neverExpires");let b;e[13]!==K||e[14]!==v?(b=s.jsxs("p",{className:S,children:[K,y,v]}),e[13]=K,e[14]=v,e[15]=b):b=e[15];let C;e[16]!==b||e[17]!==g?(C=s.jsxs("div",{className:u,children:[g,b]}),e[16]=b,e[17]=g,e[18]=C):C=e[18];let N;e[19]!==C||e[20]!==x?(N=s.jsxs("div",{className:p,children:[x,C]}),e[19]=C,e[20]=x,e[21]=N):N=e[21];let _;e[22]!==t?(_=t("settings.apiKeys.deleteKey"),e[22]=t,e[23]=_):_=e[23];let w;e[24]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(yt,{size:14}),e[24]=w):w=e[24];let D;e[25]!==i||e[26]!==_?(D=s.jsx(Q,{variant:"ghost-destructive",size:"icon",className:"shrink-0",onClick:i,"aria-label":_,children:w}),e[25]=i,e[26]=_,e[27]=D):D=e[27];let k;return e[28]!==N||e[29]!==D?(k=s.jsxs("li",{className:d,children:[N,D]}),e[28]=N,e[29]=D,e[30]=k):k=e[30],k}function Wt(){return Date.now()}function Jt(o){const e=L.c(15),{onCreate:l}=o,i=G();let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Ue,{}),e[0]=t):t=e[0];let a;e[1]!==i?(a=i("settings.apiKeys.emptyTitle"),e[1]=i,e[2]=a):a=e[2];let n;e[3]!==i?(n=i("settings.apiKeys.emptyDescription"),e[3]=i,e[4]=n):n=e[4];let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(Ye,{size:14}),e[5]=m):m=e[5];let c;e[6]!==i?(c=i("settings.apiKeys.newKey"),e[6]=i,e[7]=c):c=e[7];let r;e[8]!==l||e[9]!==c?(r=s.jsxs(Q,{onClick:l,size:"sm",children:[m,c]}),e[8]=l,e[9]=c,e[10]=r):r=e[10];let d;return e[11]!==a||e[12]!==n||e[13]!==r?(d=s.jsx(xt,{children:s.jsx(jt,{size:"inline",icon:t,title:a,description:n,children:r})}),e[11]=a,e[12]=n,e[13]=r,e[14]=d):d=e[14],d}function Xt(o){const e=L.c(40),{createdKey:l,onClose:i}=o,t=G(),a=l!==null;let n;e[0]!==i?(n=C=>!C&&i(),e[0]=i,e[1]=n):n=e[1];let m;e[2]!==t?(m=t("settings.apiKeys.createdTitle"),e[2]=t,e[3]=m):m=e[3];let c;e[4]!==m?(c=s.jsx(Be,{children:m}),e[4]=m,e[5]=c):c=e[5];let r;e[6]!==t?(r=t("settings.apiKeys.createdDescription"),e[6]=t,e[7]=r):r=e[7];let d;e[8]!==r?(d=s.jsx(Ge,{children:r}),e[8]=r,e[9]=d):d=e[9];let p;e[10]!==c||e[11]!==d?(p=s.jsxs(qe,{children:[c,d]}),e[10]=c,e[11]=d,e[12]=p):p=e[12];const x=l?.key??"";let u;e[13]!==x?(u=s.jsx(Me,{readOnly:!0,value:x,className:"font-mono text-xs"}),e[13]=x,e[14]=u):u=e[14];let f;e[15]!==l||e[16]!==t?(f=()=>{l&&(navigator.clipboard?.writeText(l.key),ke.success(t("settings.apiKeys.copied")))},e[15]=l,e[16]=t,e[17]=f):f=e[17];let j;e[18]!==t?(j=t("settings.apiKeys.copyKey"),e[18]=t,e[19]=j):j=e[19];let h;e[20]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(ht,{size:14}),e[20]=h):h=e[20];let g;e[21]!==f||e[22]!==j?(g=s.jsx(Q,{type:"button",variant:"outline",size:"icon",onClick:f,"aria-label":j,children:h}),e[21]=f,e[22]=j,e[23]=g):g=e[23];let S;e[24]!==g||e[25]!==u?(S=s.jsxs("div",{className:"flex items-center gap-2",children:[u,g]}),e[24]=g,e[25]=u,e[26]=S):S=e[26];let K;e[27]!==t?(K=t("settings.apiKeys.done"),e[27]=t,e[28]=K):K=e[28];let y;e[29]!==i||e[30]!==K?(y=s.jsx(Qe,{children:s.jsx(Q,{onClick:i,children:K})}),e[29]=i,e[30]=K,e[31]=y):y=e[31];let v;e[32]!==S||e[33]!==y||e[34]!==p?(v=s.jsxs(Ve,{className:"sm:max-w-lg",children:[p,S,y]}),e[32]=S,e[33]=y,e[34]=p,e[35]=v):v=e[35];let b;return e[36]!==a||e[37]!==v||e[38]!==n?(b=s.jsx(He,{open:a,onOpenChange:n,children:v}),e[36]=a,e[37]=v,e[38]=n,e[39]=b):b=e[39],b}function Zt(o){const e=L.c(131),{onClose:l,onCreated:i}=o,t=G(),{org:a}=ze();let n;e[0]!==a.id||e[1]!==a.slug?(n={connectionId:Fe,orgId:a.id,orgSlug:a.slug},e[0]=a.id,e[1]=a.slug,e[2]=n):n=e[2];const m=We(n);let c;e[3]!==m?(c={client:m},e[3]=m,e[4]=c):c=e[4];const r=Dt(c),d=[...r.data?.tools??[]].sort(ts),p=Ft(d),[x,u]=P.useState(""),[f,j]=P.useState("read-only"),[h,g]=P.useState(null),[S,K]=P.useState("90"),y=Pt(),v=h??{[Ne]:p},b=f!=="full",C=!b||r.isSuccess,N=f==="full"||(f==="read-only"?p.length:Je(v))>0;let _;e[5]!==y.isPending||e[6]!==N||e[7]!==x||e[8]!==C?(_=!!x.trim()&&C&&N&&!y.isPending,e[5]=y.isPending,e[6]=N,e[7]=x,e[8]=C,e[9]=_):_=e[9];const w=_,D=async function(q){if(q.preventDefault(),!!w)try{const M=await y.mutateAsync({name:x.trim(),permissions:Bt(f,p,v),expiresIn:Gt(S)});l(),i(M)}catch(M){const Pe=M;ke.error(Pe instanceof Error?Pe.message:t("settings.apiKeys.failedToCreateKey"))}},k="read-only";let T;e[10]!==t?(T=t("settings.apiKeys.accessReadOnly"),e[10]=t,e[11]=T):T=e[11];const R=t("settings.apiKeys.accessReadOnlyDescription",{count:p.length});let F;e[12]!==T||e[13]!==R?(F={value:k,label:T,description:R},e[12]=T,e[13]=R,e[14]=F):F=e[14];let O;e[15]!==t?(O=t("settings.apiKeys.accessCustom"),e[15]=t,e[16]=O):O=e[16];let E;e[17]!==t?(E=t("settings.apiKeys.accessCustomDescription"),e[17]=t,e[18]=E):E=e[18];let I;e[19]!==E||e[20]!==O?(I={value:"custom",label:O,description:E},e[19]=E,e[20]=O,e[21]=I):I=e[21];let z;e[22]!==t?(z=t("settings.apiKeys.accessFull"),e[22]=t,e[23]=z):z=e[23];let $;e[24]!==t?($=t("settings.apiKeys.accessFullDescription"),e[24]=t,e[25]=$):$=e[25];let A;e[26]!==z||e[27]!==$?(A={value:"full",label:z,description:$},e[26]=z,e[27]=$,e[28]=A):A=e[28];let V;e[29]!==I||e[30]!==A||e[31]!==F?(V=[F,I,A],e[29]=I,e[30]=A,e[31]=F,e[32]=V):V=e[32];const H=V;let U;e[33]!==t?(U=t("settings.apiKeys.expiryDays",{days:7}),e[33]=t,e[34]=U):U=e[34];let Y;e[35]!==t?(Y=t("settings.apiKeys.expiryDays",{days:30}),e[35]=t,e[36]=Y):Y=e[36];let W;e[37]!==t?(W=t("settings.apiKeys.expiryDays",{days:90}),e[37]=t,e[38]=W):W=e[38];let J;e[39]!==t?(J=t("settings.apiKeys.expiryYear"),e[39]=t,e[40]=J):J=e[40];let X;e[41]!==t?(X=t("settings.apiKeys.expiryNever"),e[41]=t,e[42]=X):X=e[42];let _e;e[43]!==U||e[44]!==Y||e[45]!==W||e[46]!==J||e[47]!==X?(_e={7:U,30:Y,90:W,365:J,never:X},e[43]=U,e[44]=Y,e[45]=W,e[46]=J,e[47]=X,e[48]=_e):_e=e[48];const Te=_e;let Z;e[49]!==t?(Z=t("settings.apiKeys.nameLabel"),e[49]=t,e[50]=Z):Z=e[50];let ee;e[51]!==Z?(ee=s.jsx(Ee,{htmlFor:"api-key-name",children:Z}),e[51]=Z,e[52]=ee):ee=e[52];let te;e[53]!==u?(te=B=>u(B.target.value),e[53]=u,e[54]=te):te=e[54];let se;e[55]!==t?(se=t("settings.apiKeys.namePlaceholder"),e[55]=t,e[56]=se):se=e[56];let ie;e[57]!==x||e[58]!==te||e[59]!==se?(ie=s.jsx(Me,{id:"api-key-name",value:x,onChange:te,placeholder:se,autoComplete:"off",required:!0}),e[57]=x,e[58]=te,e[59]=se,e[60]=ie):ie=e[60];let le;e[61]!==ee||e[62]!==ie?(le=s.jsxs("div",{className:"space-y-1.5",children:[ee,ie]}),e[61]=ee,e[62]=ie,e[63]=le):le=e[63];let ne;e[64]!==t?(ne=t("settings.apiKeys.accessLabel"),e[64]=t,e[65]=ne):ne=e[65];let ae;e[66]!==ne?(ae=s.jsx(Ee,{children:ne}),e[66]=ne,e[67]=ae):ae=e[67];let oe;e[68]!==H||e[69]!==j?(oe=B=>{const q=H.find(M=>M.value===B);q&&j(q.value)},e[68]=H,e[69]=j,e[70]=oe):oe=e[70];let re;e[71]!==H?(re=H.map(es),e[71]=H,e[72]=re):re=e[72];let ce;e[73]!==f||e[74]!==oe||e[75]!==re?(ce=s.jsx(Lt,{value:f,onValueChange:oe,className:"gap-2",children:re}),e[73]=f,e[74]=oe,e[75]=re,e[76]=ce):ce=e[76];let de;e[77]!==ae||e[78]!==ce?(de=s.jsxs("div",{className:"space-y-1.5",children:[ae,ce]}),e[77]=ae,e[78]=ce,e[79]=de):de=e[79];let ue;e[80]!==b||e[81]!==t||e[82]!==r.isError?(ue=b&&r.isError&&s.jsx("p",{className:"text-xs text-destructive",children:t("settings.apiKeys.toolsLoadFailed")}),e[80]=b,e[81]=t,e[82]=r.isError,e[83]=ue):ue=e[83];let fe;e[84]!==f||e[85]!==v||e[86]!==g||e[87]!==d||e[88]!==r.isSuccess?(fe=f==="custom"&&r.isSuccess&&s.jsx(Ut,{studioTools:d,toolSet:v,onChange:g}),e[84]=f,e[85]=v,e[86]=g,e[87]=d,e[88]=r.isSuccess,e[89]=fe):fe=e[89];let me;e[90]!==t?(me=t("settings.apiKeys.expiryLabel"),e[90]=t,e[91]=me):me=e[91];let pe;e[92]!==me?(pe=s.jsx(Ee,{htmlFor:"api-key-expiry",children:me}),e[92]=me,e[93]=pe):pe=e[93];let xe;e[94]!==K?(xe=B=>{const q=$e.find(M=>M===B);q&&K(q)},e[94]=K,e[95]=xe):xe=e[95];let De;e[96]===Symbol.for("react.memo_cache_sentinel")?(De=s.jsx(Ct,{id:"api-key-expiry",className:"w-full",children:s.jsx(St,{})}),e[96]=De):De=e[96];let ge;e[97]!==Te?(ge=$e.map(B=>s.jsx(vt,{value:B,children:Te[B]},B)),e[97]=Te,e[98]=ge):ge=e[98];let he;e[99]!==ge?(he=s.jsx(Nt,{children:ge}),e[99]=ge,e[100]=he):he=e[100];let ye;e[101]!==S||e[102]!==xe||e[103]!==he?(ye=s.jsxs(_t,{value:S,onValueChange:xe,children:[De,he]}),e[101]=S,e[102]=xe,e[103]=he,e[104]=ye):ye=e[104];let je;e[105]!==pe||e[106]!==ye?(je=s.jsxs("div",{className:"space-y-1.5",children:[pe,ye]}),e[105]=pe,e[106]=ye,e[107]=je):je=e[107];const et=y.isPending;let Ke;e[108]!==t?(Ke=t("settings.apiKeys.cancelButton"),e[108]=t,e[109]=Ke):Ke=e[109];let be;e[110]!==y.isPending||e[111]!==l||e[112]!==Ke?(be=s.jsx(Q,{type:"button",variant:"outline",onClick:l,disabled:et,children:Ke}),e[110]=y.isPending,e[111]=l,e[112]=Ke,e[113]=be):be=e[113];const Oe=!w;let ve;e[114]!==y.isPending||e[115]!==t?(ve=y.isPending?t("settings.apiKeys.creatingButton"):t("settings.apiKeys.createButton"),e[114]=y.isPending,e[115]=t,e[116]=ve):ve=e[116];let Ce;e[117]!==Oe||e[118]!==ve?(Ce=s.jsx(Q,{type:"submit",disabled:Oe,children:ve}),e[117]=Oe,e[118]=ve,e[119]=Ce):Ce=e[119];let Se;e[120]!==be||e[121]!==Ce?(Se=s.jsxs(Qe,{children:[be,Ce]}),e[120]=be,e[121]=Ce,e[122]=Se):Se=e[122];let we;return e[123]!==D||e[124]!==le||e[125]!==de||e[126]!==ue||e[127]!==fe||e[128]!==je||e[129]!==Se?(we=s.jsxs("form",{onSubmit:D,className:"space-y-4",children:[le,de,ue,fe,je,Se]}),e[123]=D,e[124]=le,e[125]=de,e[126]=ue,e[127]=fe,e[128]=je,e[129]=Se,e[130]=we):we=e[130],we}function es(o){return s.jsxs("label",{className:"flex cursor-pointer items-start gap-3 rounded-md border border-border px-3 py-2.5 hover:bg-accent has-[[data-state=checked]]:border-primary",children:[s.jsx($t,{value:o.value,className:"mt-0.5"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("span",{className:"block text-sm font-medium",children:o.label}),s.jsx("span",{className:Ie("block text-xs",o.value==="full"?"text-warning":"text-muted-foreground"),children:o.description})]})]},o.value)}function ts(o,e){return o.name.localeCompare(e.name)}function ss(o){const e=L.c(23),{open:l,onOpenChange:i,onCreated:t}=o,a=G();let n;e[0]!==a?(n=a("settings.apiKeys.newKeyTitle"),e[0]=a,e[1]=n):n=e[1];let m;e[2]!==n?(m=s.jsx(Be,{children:n}),e[2]=n,e[3]=m):m=e[3];let c;e[4]!==a?(c=a("settings.apiKeys.newKeyDescription"),e[4]=a,e[5]=c):c=e[5];let r;e[6]!==c?(r=s.jsx(Ge,{children:c}),e[6]=c,e[7]=r):r=e[7];let d;e[8]!==m||e[9]!==r?(d=s.jsxs(qe,{children:[m,r]}),e[8]=m,e[9]=r,e[10]=d):d=e[10];let p;e[11]!==i?(p=()=>i(!1),e[11]=i,e[12]=p):p=e[12];let x;e[13]!==t||e[14]!==p?(x=s.jsx(Zt,{onClose:p,onCreated:t}),e[13]=t,e[14]=p,e[15]=x):x=e[15];let u;e[16]!==d||e[17]!==x?(u=s.jsxs(Ve,{className:"sm:max-w-xl",children:[d,x]}),e[16]=d,e[17]=x,e[18]=u):u=e[18];let f;return e[19]!==i||e[20]!==l||e[21]!==u?(f=s.jsx(He,{open:l,onOpenChange:i,children:u}),e[19]=i,e[20]=l,e[21]=u,e[22]=f):f=e[22],f}function is(){const o=G(),{data:e,isLoading:l,error:i}=It(),t=zt(),[a,n]=P.useState(!1),[m,c]=P.useState(null),[r,d]=P.useState(null),p=e??[];async function x(){if(r)try{await t.mutateAsync(r.id),ke.success(o("settings.apiKeys.keyDeleted",{name:r.name}))}catch(u){ke.error(u instanceof Error?u.message:o("settings.apiKeys.failedToDeleteKey"))}finally{d(null)}}return s.jsxs(at,{title:o("settings.apiKeys.sectionTitle"),description:o("settings.apiKeys.sectionDescription"),actions:p.length>0?s.jsxs(Q,{onClick:()=>n(!0),size:"sm",children:[s.jsx(Ye,{size:14}),o("settings.apiKeys.newKey")]}):void 0,children:[l?s.jsx(Le,{className:"gap-0 overflow-hidden p-0",children:s.jsx("p",{className:"px-4 py-3 text-xs text-muted-foreground",children:o("settings.apiKeys.loading")})}):i&&p.length===0?s.jsx(Ze,{error:i}):p.length===0?s.jsx(Jt,{onCreate:()=>n(!0)}):s.jsx(Le,{className:"gap-0 overflow-hidden p-0",children:s.jsx("ul",{className:"divide-y divide-border",children:p.map(u=>s.jsx(Yt,{apiKey:u,onDelete:()=>d(u)},u.id))})}),s.jsx(ss,{open:a,onOpenChange:n,onCreated:c}),s.jsx(Xt,{createdKey:m,onClose:()=>c(null)}),s.jsx(ot,{open:r!==null,onOpenChange:u=>{u||d(null)},children:s.jsxs(rt,{children:[s.jsxs(ct,{children:[s.jsx(dt,{children:o("settings.apiKeys.deleteTitle",{name:r?.name??""})}),s.jsx(ut,{children:o("settings.apiKeys.deleteDescription")})]}),s.jsxs(ft,{children:[s.jsx(mt,{children:o("settings.apiKeys.cancelButton")}),s.jsx(pt,{onClick:x,children:o("settings.apiKeys.deleteKey")})]})]})})]})}function Ns(){const o=L.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(nt,{group:"connect",errorFallback:ls,children:s.jsx(is,{})}),o[0]=e):e=o[0],e}function ls(o){const{error:e}=o;return s.jsx(Ze,{error:e??new Error("Failed to load API keys")})}export{is as A,Ns as O};
|
|
1
|
+
import{c as L,m as Ie,j as s,b as G,r as P,h as Re,a6 as ze,W as tt,au as st,T as Fe,dQ as it,i as lt,i4 as nt,gV as at,gG as Le,aP as ot,aO as rt,aL as ct,aJ as dt,aK as ut,aN as ft,aM as mt,b9 as pt,B as Q,t as ke,gh as xt,x as Be,aU as Ge,w as qe,I as Me,y as Qe,v as Ve,D as He}from"./index-_VeebRNE.js";import{i as gt}from"./AlertCircle-gyZP8TIO.js";import{e as ht}from"./agent-icon-CfdcYUE7.js";import{i as Ue}from"./Key01-KTk95wIy.js";import{s as Ye}from"./Plus-BYodv7tE.js";import{s as yt}from"./Trash01-LecfbxTv.js";import{E as jt}from"./empty-state-DvK349M1.js";import{L as Ee}from"./label-DZkEI5Ke.js";import{B as Ae}from"./badge-DCIHIkLr.js";import{I as Kt,R as bt}from"./index-DaFEqiTp.js";import{c as vt,b as Ct,a as St,d as Nt,S as _t}from"./select-QgdI1Rfc.js";import{u as We}from"./use-mcp-client-UP8_tZ9p.js";import{u as Dt}from"./use-mcp-tools-mA41mojn.js";import{t as wt}from"./ChevronDown-DldgAfZA.js";import{C as At}from"./checkbox-D4P_L8j1.js";import{S as kt}from"./search-input-JNlnu1vU.js";import{I as Tt}from"./integration-icon-D8pA0JHG.js";import{T as Ot}from"./tool-set-selector-DP0UayXg.js";import{b as Et}from"./use-connection-cSaq7_i7.js";import{u as It,b as zt,a as Pt}from"./use-api-keys-DUVyFEfc.js";function Lt(o){const e=L.c(8);let l,i;e[0]!==o?({className:l,...i}=o,e[0]=o,e[1]=l,e[2]=i):(l=e[1],i=e[2]);let t;e[3]!==l?(t=Ie("grid gap-3",l),e[3]=l,e[4]=t):t=e[4];let a;return e[5]!==i||e[6]!==t?(a=s.jsx(bt,{"data-slot":"radio-group",className:t,...i}),e[5]=i,e[6]=t,e[7]=a):a=e[7],a}function $t(o){const e=L.c(9);let l,i;e[0]!==o?({className:l,...i}=o,e[0]=o,e[1]=l,e[2]=i):(l=e[1],i=e[2]);let t;e[3]!==l?(t=Ie("group relative inline-flex size-4 shrink-0 items-center justify-center rounded-full shadow-[inset_0_0_0_1.5px_var(--input)] transition-[background-color,box-shadow] duration-150 hover:shadow-[inset_0_0_0_1.5px_color-mix(in_oklch,var(--foreground)_30%,var(--input))] data-[state=checked]:bg-primary data-[state=checked]:shadow-[inset_0_0_0_1.5px_var(--primary)] aria-invalid:shadow-[inset_0_0_0_1.5px_var(--destructive)] focus-ring disabled:opacity-50 motion-reduce:transition-none",l),e[3]=l,e[4]=t):t=e[4];let a;e[5]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("span",{className:"bg-primary-foreground size-1.5 scale-0 rounded-full transition-transform duration-200 ease-[cubic-bezier(0.34,1.56,0.64,1)] group-data-[state=checked]:scale-100 motion-reduce:transition-none"}),e[5]=a):a=e[5];let n;return e[6]!==i||e[7]!==t?(n=s.jsx(Kt,{"data-slot":"radio-group-item",className:t,...i,children:a}),e[6]=i,e[7]=t,e[8]=n):n=e[8],n}const $e=["7","30","90","365","never"],Rt=86400;function Ft(o){return o.filter(e=>e.annotations?.readOnlyHint===!0).map(e=>e.name)}const Ne="self";function Bt(o,e,l){return o==="full"?{"*":["*"]}:o==="read-only"?{[Ne]:e}:Object.fromEntries(Object.entries(l).filter(([,i])=>i.length>0))}function Je(o){return Object.values(o).reduce((e,l)=>e+l.length,0)}function Gt(o){return o==="never"?void 0:Number(o)*Rt}function qt(o){const e=i=>{const t=o[i];return Array.isArray(t)?t:[]};if(e("*").includes("*")||e("self").includes("*"))return{kind:"full"};const l=new Set;for(const i of Object.keys(o))for(const t of e(i))t.startsWith("!")||l.add(`${i}:${t}`);return{kind:"tools",count:l.size}}function Mt(o,e){return o.name.toLowerCase().includes(e)||(o.description?.toLowerCase().includes(e)??!1)}function Xe(o){const e=L.c(56),{resource:l,title:i,icon:t,tools:a,selected:n,onChange:m,query:c,onExpand:r}=o,d=G(),[p,x]=P.useState(!1);let u;e[0]!==c||e[1]!==i?(u=!c||i.toLowerCase().includes(c),e[0]=c,e[1]=i,e[2]=u):u=e[2];const f=u;let j;e[3]!==c||e[4]!==f||e[5]!==a?(j=a===null?null:f?a:a.filter(A=>Mt(A,c)),e[3]=c,e[4]=f,e[5]=a,e[6]=j):j=e[6];const h=j,g=p||!!c&&(h?.length??0)>0,S=!f&&!h?.length;let K;e[7]!==n?(K=new Set(n),e[7]=n,e[8]=K):K=e[8];const y=K,v=a!==null&&a.length>0&&n.length>=a.length;let b;e[9]!==r||e[10]!==p?(b=()=>{p||r?.(),x(!p)},e[9]=r,e[10]=p,e[11]=b):b=e[11];const C=b;let N;e[12]!==m||e[13]!==r||e[14]!==n.length||e[15]!==a?(N=()=>{if(n.length>0){m([]);return}if(a===null){r?.(),x(!0);return}m(a.map(Qt))},e[12]=m,e[13]=r,e[14]=n.length,e[15]=a,e[16]=N):N=e[16];const _=N;if(S)return null;let w;e[17]!==g?(w=g?s.jsx(wt,{size:16,className:"shrink-0 text-muted-foreground"}):s.jsx(st,{size:16,className:"shrink-0 text-muted-foreground"}),e[17]=g,e[18]=w):w=e[18];let D;e[19]!==t||e[20]!==i?(D=s.jsx(Tt,{icon:t,name:i,size:"xs"}),e[19]=t,e[20]=i,e[21]=D):D=e[21];let k;e[22]!==i?(k=s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:i}),e[22]=i,e[23]=k):k=e[23];let T;e[24]!==n.length||e[25]!==d||e[26]!==a?(T=(a!==null||n.length>0)&&s.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:a===null?n.length:d("settings.apiKeys.toolsGroupCount",{count:n.length,total:a.length})}),e[24]=n.length,e[25]=d,e[26]=a,e[27]=T):T=e[27];let R;e[28]!==g||e[29]!==w||e[30]!==D||e[31]!==k||e[32]!==T||e[33]!==C?(R=s.jsxs("button",{type:"button",onClick:C,"aria-expanded":g,className:"flex min-w-0 flex-1 cursor-pointer items-center gap-3 py-2.5 pl-3 text-left",children:[w,D,k,T]}),e[28]=g,e[29]=w,e[30]=D,e[31]=k,e[32]=T,e[33]=C,e[34]=R):R=e[34];const F=v?!0:n.length>0?"indeterminate":!1;let O;e[35]!==d||e[36]!==i?(O=d("settings.apiKeys.toolsSelectGroup",{name:i}),e[35]=d,e[36]=i,e[37]=O):O=e[37];let E;e[38]!==F||e[39]!==O||e[40]!==_?(E=s.jsx(At,{checked:F,onCheckedChange:_,"aria-label":O}),e[38]=F,e[39]=O,e[40]=_,e[41]=E):E=e[41];let I;e[42]!==R||e[43]!==E?(I=s.jsxs("div",{className:"flex items-center gap-3 pr-4 hover:bg-accent",children:[R,E]}),e[42]=R,e[43]=E,e[44]=I):I=e[44];let z;e[45]!==g||e[46]!==m||e[47]!==l||e[48]!==n||e[49]!==y||e[50]!==d||e[51]!==h?(z=g&&s.jsx("div",{className:"space-y-1 border-t border-border p-1",children:h===null?s.jsx("div",{className:"flex justify-center py-4",children:s.jsx(Re,{className:"size-4 text-muted-foreground"})}):h.length===0?s.jsx("p",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:d("settings.apiKeys.toolsNone")}):h.map(A=>s.jsx(Ot,{connectionId:l,tool:A,isSelected:y.has(A.name),onToggle:()=>m(y.has(A.name)?n.filter(V=>V!==A.name):[...n,A.name]),badge:A.annotations?.readOnlyHint===!0&&s.jsx(Ae,{variant:"muted",size:"sm",children:d("settings.apiKeys.readOnlyBadge")})},A.name))}),e[45]=g,e[46]=m,e[47]=l,e[48]=n,e[49]=y,e[50]=d,e[51]=h,e[52]=z):z=e[52];let $;return e[53]!==I||e[54]!==z?($=s.jsxs("div",{className:"overflow-hidden rounded-lg border border-border bg-card",children:[I,z]}),e[53]=I,e[54]=z,e[55]=$):$=e[55],$}function Qt(o){return o.name}function Vt(o){const e=L.c(21),{connection:l,selected:i,onChange:t,query:a}=o,{org:n}=ze();let m;e[0]!==n.id||e[1]!==n.slug?(m={connectionId:Fe,orgId:n.id,orgSlug:n.slug},e[0]=n.id,e[1]=n.slug,e[2]=m):m=e[2];const c=We(m),[r,d]=P.useState(!1);let p;e[3]!==c||e[4]!==l.id||e[5]!==n.id?(p=it(n.id,"CONNECTIONS",l.id,c),e[3]=c,e[4]=l.id,e[5]=n.id,e[6]=p):p=e[6];let x;e[7]!==r||e[8]!==p?(x={...p,enabled:r},e[7]=r,e[8]=p,e[9]=x):x=e[9];const{data:u}=lt(x);let f;e[10]!==u?(f=u?u.item?.tools??[]:null,e[10]=u,e[11]=f):f=e[11];const j=f;let h;e[12]===Symbol.for("react.memo_cache_sentinel")?(h=()=>d(!0),e[12]=h):h=e[12];let g;return e[13]!==l.icon||e[14]!==l.id||e[15]!==l.title||e[16]!==t||e[17]!==a||e[18]!==i||e[19]!==j?(g=s.jsx(Xe,{resource:l.id,title:l.title,icon:l.icon,tools:j,selected:i,onChange:t,query:a,onExpand:h}),e[13]=l.icon,e[14]=l.id,e[15]=l.title,e[16]=t,e[17]=a,e[18]=i,e[19]=j,e[20]=g):g=e[20],g}function Ht(o){const e=L.c(14),{toolSet:l,onChange:i,query:t}=o,{org:a}=ze();let n;e[0]!==a.id?(n=tt.SELF(a.id),e[0]=a.id,e[1]=n):n=e[1];const m=n,c=Et();let r;if(e[2]!==i||e[3]!==t||e[4]!==m||e[5]!==c||e[6]!==l){let d;e[8]!==m?(d=u=>u.id!==m,e[8]=m,e[9]=d):d=e[9];const p=c.filter(d);let x;e[10]!==i||e[11]!==t||e[12]!==l?(x=u=>s.jsx(Vt,{connection:u,selected:l[u.id]??[],onChange:f=>i(u.id,f),query:t},u.id),e[10]=i,e[11]=t,e[12]=l,e[13]=x):x=e[13],r=p.map(x),e[2]=i,e[3]=t,e[4]=m,e[5]=c,e[6]=l,e[7]=r}else r=e[7];return r}function Ut(o){const e=L.c(41),{studioTools:l,toolSet:i,onChange:t}=o,a=G(),[n,m]=P.useState("");let c;e[0]!==n?(c=n.trim().toLowerCase(),e[0]=n,e[1]=c):c=e[1];const r=P.useDeferredValue(c);let d;e[2]!==t||e[3]!==i?(d=(_,w)=>t({...i,[_]:w}),e[2]=t,e[3]=i,e[4]=d):d=e[4];const p=d;let x;e[5]!==a?(x=a("settings.apiKeys.toolsSearch"),e[5]=a,e[6]=x):x=e[6];let u;e[7]!==n||e[8]!==x?(u=s.jsx(kt,{value:n,onChange:m,placeholder:x,className:"flex-1"}),e[7]=n,e[8]=x,e[9]=u):u=e[9];let f;e[10]!==a||e[11]!==i?(f=a("settings.apiKeys.toolsSelected",{count:Je(i)}),e[10]=a,e[11]=i,e[12]=f):f=e[12];let j;e[13]!==f?(j=s.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:f}),e[13]=f,e[14]=j):j=e[14];let h;e[15]!==u||e[16]!==j?(h=s.jsxs("div",{className:"flex items-center gap-3",children:[u,j]}),e[15]=u,e[16]=j,e[17]=h):h=e[17];let g;e[18]!==a?(g=a("settings.apiKeys.studioTools"),e[18]=a,e[19]=g):g=e[19];let S;e[20]!==i?(S=i[Ne]??[],e[20]=i,e[21]=S):S=e[21];let K;e[22]!==p?(K=_=>p(Ne,_),e[22]=p,e[23]=K):K=e[23];let y;e[24]!==r||e[25]!==l||e[26]!==K||e[27]!==g||e[28]!==S?(y=s.jsx(Xe,{resource:Ne,title:g,icon:"/favicon.svg",tools:l,selected:S,onChange:K,query:r}),e[24]=r,e[25]=l,e[26]=K,e[27]=g,e[28]=S,e[29]=y):y=e[29];let v;e[30]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx("div",{className:"flex justify-center py-3",children:s.jsx(Re,{className:"size-4 text-muted-foreground"})}),e[30]=v):v=e[30];let b;e[31]!==r||e[32]!==p||e[33]!==i?(b=s.jsx(P.Suspense,{fallback:v,children:s.jsx(Ht,{toolSet:i,onChange:p,query:r})}),e[31]=r,e[32]=p,e[33]=i,e[34]=b):b=e[34];let C;e[35]!==y||e[36]!==b?(C=s.jsxs("div",{className:"max-h-80 space-y-2 overflow-y-auto",children:[y,b]}),e[35]=y,e[36]=b,e[37]=C):C=e[37];let N;return e[38]!==C||e[39]!==h?(N=s.jsxs("div",{className:"space-y-2",children:[h,C]}),e[38]=C,e[39]=h,e[40]=N):N=e[40],N}function Ze(o){const e=L.c(6),{error:l}=o,i=G();let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(gt,{size:16}),e[0]=t):t=e[0];let a;e[1]!==l.message||e[2]!==i?(a=i("settings.apiKeys.failedToLoadError",{error:l.message}),e[1]=l.message,e[2]=i,e[3]=a):a=e[3];let n;return e[4]!==a?(n=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[t,s.jsx("span",{className:"text-sm font-medium",children:a})]}),e[4]=a,e[5]=n):n=e[5],n}function Yt(o){const e=L.c(31),{apiKey:l,onDelete:i}=o,t=G(),a=qt(l.permissions),n=l.expiresAt?new Date(l.expiresAt):null,[m]=P.useState(Wt),c=n!==null&&n.getTime()<=m,r=n?.toLocaleDateString()??"",d="flex items-center justify-between gap-4 px-4 py-3",p="flex items-center gap-3 min-w-0";let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:s.jsx(Ue,{size:16,className:"text-muted-foreground"})}),e[0]=x):x=e[0];const u="min-w-0";let f;e[1]!==l.name?(f=s.jsx("span",{className:"font-medium text-sm truncate",children:l.name}),e[1]=l.name,e[2]=f):f=e[2];const j=a.kind==="full"?s.jsx(Ae,{variant:"warning",size:"sm",children:t("settings.apiKeys.accessFull")}):s.jsx(Ae,{variant:"muted",size:"sm",children:t("settings.apiKeys.toolCount",{count:a.count})});let h;e[3]!==c||e[4]!==t?(h=c&&s.jsx(Ae,{variant:"destructive",size:"sm",children:t("settings.apiKeys.expired")}),e[3]=c,e[4]=t,e[5]=h):h=e[5];let g;e[6]!==f||e[7]!==j||e[8]!==h?(g=s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[f,j,h]}),e[6]=f,e[7]=j,e[8]=h,e[9]=g):g=e[9];const S="text-xs text-muted-foreground mt-0.5";let K;e[10]!==l.createdAt||e[11]!==t?(K=t("settings.apiKeys.createdAt",{date:new Date(l.createdAt).toLocaleDateString()}),e[10]=l.createdAt,e[11]=t,e[12]=K):K=e[12];const y=" · ",v=l.expiresAt?c?t("settings.apiKeys.expiredOn",{date:r}):t("settings.apiKeys.expiresOn",{date:r}):t("settings.apiKeys.neverExpires");let b;e[13]!==K||e[14]!==v?(b=s.jsxs("p",{className:S,children:[K,y,v]}),e[13]=K,e[14]=v,e[15]=b):b=e[15];let C;e[16]!==b||e[17]!==g?(C=s.jsxs("div",{className:u,children:[g,b]}),e[16]=b,e[17]=g,e[18]=C):C=e[18];let N;e[19]!==C||e[20]!==x?(N=s.jsxs("div",{className:p,children:[x,C]}),e[19]=C,e[20]=x,e[21]=N):N=e[21];let _;e[22]!==t?(_=t("settings.apiKeys.deleteKey"),e[22]=t,e[23]=_):_=e[23];let w;e[24]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(yt,{size:14}),e[24]=w):w=e[24];let D;e[25]!==i||e[26]!==_?(D=s.jsx(Q,{variant:"ghost-destructive",size:"icon",className:"shrink-0",onClick:i,"aria-label":_,children:w}),e[25]=i,e[26]=_,e[27]=D):D=e[27];let k;return e[28]!==N||e[29]!==D?(k=s.jsxs("li",{className:d,children:[N,D]}),e[28]=N,e[29]=D,e[30]=k):k=e[30],k}function Wt(){return Date.now()}function Jt(o){const e=L.c(15),{onCreate:l}=o,i=G();let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Ue,{}),e[0]=t):t=e[0];let a;e[1]!==i?(a=i("settings.apiKeys.emptyTitle"),e[1]=i,e[2]=a):a=e[2];let n;e[3]!==i?(n=i("settings.apiKeys.emptyDescription"),e[3]=i,e[4]=n):n=e[4];let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(Ye,{size:14}),e[5]=m):m=e[5];let c;e[6]!==i?(c=i("settings.apiKeys.newKey"),e[6]=i,e[7]=c):c=e[7];let r;e[8]!==l||e[9]!==c?(r=s.jsxs(Q,{onClick:l,size:"sm",children:[m,c]}),e[8]=l,e[9]=c,e[10]=r):r=e[10];let d;return e[11]!==a||e[12]!==n||e[13]!==r?(d=s.jsx(xt,{children:s.jsx(jt,{size:"inline",icon:t,title:a,description:n,children:r})}),e[11]=a,e[12]=n,e[13]=r,e[14]=d):d=e[14],d}function Xt(o){const e=L.c(40),{createdKey:l,onClose:i}=o,t=G(),a=l!==null;let n;e[0]!==i?(n=C=>!C&&i(),e[0]=i,e[1]=n):n=e[1];let m;e[2]!==t?(m=t("settings.apiKeys.createdTitle"),e[2]=t,e[3]=m):m=e[3];let c;e[4]!==m?(c=s.jsx(Be,{children:m}),e[4]=m,e[5]=c):c=e[5];let r;e[6]!==t?(r=t("settings.apiKeys.createdDescription"),e[6]=t,e[7]=r):r=e[7];let d;e[8]!==r?(d=s.jsx(Ge,{children:r}),e[8]=r,e[9]=d):d=e[9];let p;e[10]!==c||e[11]!==d?(p=s.jsxs(qe,{children:[c,d]}),e[10]=c,e[11]=d,e[12]=p):p=e[12];const x=l?.key??"";let u;e[13]!==x?(u=s.jsx(Me,{readOnly:!0,value:x,className:"font-mono text-xs"}),e[13]=x,e[14]=u):u=e[14];let f;e[15]!==l||e[16]!==t?(f=()=>{l&&(navigator.clipboard?.writeText(l.key),ke.success(t("settings.apiKeys.copied")))},e[15]=l,e[16]=t,e[17]=f):f=e[17];let j;e[18]!==t?(j=t("settings.apiKeys.copyKey"),e[18]=t,e[19]=j):j=e[19];let h;e[20]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(ht,{size:14}),e[20]=h):h=e[20];let g;e[21]!==f||e[22]!==j?(g=s.jsx(Q,{type:"button",variant:"outline",size:"icon",onClick:f,"aria-label":j,children:h}),e[21]=f,e[22]=j,e[23]=g):g=e[23];let S;e[24]!==g||e[25]!==u?(S=s.jsxs("div",{className:"flex items-center gap-2",children:[u,g]}),e[24]=g,e[25]=u,e[26]=S):S=e[26];let K;e[27]!==t?(K=t("settings.apiKeys.done"),e[27]=t,e[28]=K):K=e[28];let y;e[29]!==i||e[30]!==K?(y=s.jsx(Qe,{children:s.jsx(Q,{onClick:i,children:K})}),e[29]=i,e[30]=K,e[31]=y):y=e[31];let v;e[32]!==S||e[33]!==y||e[34]!==p?(v=s.jsxs(Ve,{className:"sm:max-w-lg",children:[p,S,y]}),e[32]=S,e[33]=y,e[34]=p,e[35]=v):v=e[35];let b;return e[36]!==a||e[37]!==v||e[38]!==n?(b=s.jsx(He,{open:a,onOpenChange:n,children:v}),e[36]=a,e[37]=v,e[38]=n,e[39]=b):b=e[39],b}function Zt(o){const e=L.c(131),{onClose:l,onCreated:i}=o,t=G(),{org:a}=ze();let n;e[0]!==a.id||e[1]!==a.slug?(n={connectionId:Fe,orgId:a.id,orgSlug:a.slug},e[0]=a.id,e[1]=a.slug,e[2]=n):n=e[2];const m=We(n);let c;e[3]!==m?(c={client:m},e[3]=m,e[4]=c):c=e[4];const r=Dt(c),d=[...r.data?.tools??[]].sort(ts),p=Ft(d),[x,u]=P.useState(""),[f,j]=P.useState("read-only"),[h,g]=P.useState(null),[S,K]=P.useState("90"),y=Pt(),v=h??{[Ne]:p},b=f!=="full",C=!b||r.isSuccess,N=f==="full"||(f==="read-only"?p.length:Je(v))>0;let _;e[5]!==y.isPending||e[6]!==N||e[7]!==x||e[8]!==C?(_=!!x.trim()&&C&&N&&!y.isPending,e[5]=y.isPending,e[6]=N,e[7]=x,e[8]=C,e[9]=_):_=e[9];const w=_,D=async function(q){if(q.preventDefault(),!!w)try{const M=await y.mutateAsync({name:x.trim(),permissions:Bt(f,p,v),expiresIn:Gt(S)});l(),i(M)}catch(M){const Pe=M;ke.error(Pe instanceof Error?Pe.message:t("settings.apiKeys.failedToCreateKey"))}},k="read-only";let T;e[10]!==t?(T=t("settings.apiKeys.accessReadOnly"),e[10]=t,e[11]=T):T=e[11];const R=t("settings.apiKeys.accessReadOnlyDescription",{count:p.length});let F;e[12]!==T||e[13]!==R?(F={value:k,label:T,description:R},e[12]=T,e[13]=R,e[14]=F):F=e[14];let O;e[15]!==t?(O=t("settings.apiKeys.accessCustom"),e[15]=t,e[16]=O):O=e[16];let E;e[17]!==t?(E=t("settings.apiKeys.accessCustomDescription"),e[17]=t,e[18]=E):E=e[18];let I;e[19]!==E||e[20]!==O?(I={value:"custom",label:O,description:E},e[19]=E,e[20]=O,e[21]=I):I=e[21];let z;e[22]!==t?(z=t("settings.apiKeys.accessFull"),e[22]=t,e[23]=z):z=e[23];let $;e[24]!==t?($=t("settings.apiKeys.accessFullDescription"),e[24]=t,e[25]=$):$=e[25];let A;e[26]!==z||e[27]!==$?(A={value:"full",label:z,description:$},e[26]=z,e[27]=$,e[28]=A):A=e[28];let V;e[29]!==I||e[30]!==A||e[31]!==F?(V=[F,I,A],e[29]=I,e[30]=A,e[31]=F,e[32]=V):V=e[32];const H=V;let U;e[33]!==t?(U=t("settings.apiKeys.expiryDays",{days:7}),e[33]=t,e[34]=U):U=e[34];let Y;e[35]!==t?(Y=t("settings.apiKeys.expiryDays",{days:30}),e[35]=t,e[36]=Y):Y=e[36];let W;e[37]!==t?(W=t("settings.apiKeys.expiryDays",{days:90}),e[37]=t,e[38]=W):W=e[38];let J;e[39]!==t?(J=t("settings.apiKeys.expiryYear"),e[39]=t,e[40]=J):J=e[40];let X;e[41]!==t?(X=t("settings.apiKeys.expiryNever"),e[41]=t,e[42]=X):X=e[42];let _e;e[43]!==U||e[44]!==Y||e[45]!==W||e[46]!==J||e[47]!==X?(_e={7:U,30:Y,90:W,365:J,never:X},e[43]=U,e[44]=Y,e[45]=W,e[46]=J,e[47]=X,e[48]=_e):_e=e[48];const Te=_e;let Z;e[49]!==t?(Z=t("settings.apiKeys.nameLabel"),e[49]=t,e[50]=Z):Z=e[50];let ee;e[51]!==Z?(ee=s.jsx(Ee,{htmlFor:"api-key-name",children:Z}),e[51]=Z,e[52]=ee):ee=e[52];let te;e[53]!==u?(te=B=>u(B.target.value),e[53]=u,e[54]=te):te=e[54];let se;e[55]!==t?(se=t("settings.apiKeys.namePlaceholder"),e[55]=t,e[56]=se):se=e[56];let ie;e[57]!==x||e[58]!==te||e[59]!==se?(ie=s.jsx(Me,{id:"api-key-name",value:x,onChange:te,placeholder:se,autoComplete:"off",required:!0}),e[57]=x,e[58]=te,e[59]=se,e[60]=ie):ie=e[60];let le;e[61]!==ee||e[62]!==ie?(le=s.jsxs("div",{className:"space-y-1.5",children:[ee,ie]}),e[61]=ee,e[62]=ie,e[63]=le):le=e[63];let ne;e[64]!==t?(ne=t("settings.apiKeys.accessLabel"),e[64]=t,e[65]=ne):ne=e[65];let ae;e[66]!==ne?(ae=s.jsx(Ee,{children:ne}),e[66]=ne,e[67]=ae):ae=e[67];let oe;e[68]!==H||e[69]!==j?(oe=B=>{const q=H.find(M=>M.value===B);q&&j(q.value)},e[68]=H,e[69]=j,e[70]=oe):oe=e[70];let re;e[71]!==H?(re=H.map(es),e[71]=H,e[72]=re):re=e[72];let ce;e[73]!==f||e[74]!==oe||e[75]!==re?(ce=s.jsx(Lt,{value:f,onValueChange:oe,className:"gap-2",children:re}),e[73]=f,e[74]=oe,e[75]=re,e[76]=ce):ce=e[76];let de;e[77]!==ae||e[78]!==ce?(de=s.jsxs("div",{className:"space-y-1.5",children:[ae,ce]}),e[77]=ae,e[78]=ce,e[79]=de):de=e[79];let ue;e[80]!==b||e[81]!==t||e[82]!==r.isError?(ue=b&&r.isError&&s.jsx("p",{className:"text-xs text-destructive",children:t("settings.apiKeys.toolsLoadFailed")}),e[80]=b,e[81]=t,e[82]=r.isError,e[83]=ue):ue=e[83];let fe;e[84]!==f||e[85]!==v||e[86]!==g||e[87]!==d||e[88]!==r.isSuccess?(fe=f==="custom"&&r.isSuccess&&s.jsx(Ut,{studioTools:d,toolSet:v,onChange:g}),e[84]=f,e[85]=v,e[86]=g,e[87]=d,e[88]=r.isSuccess,e[89]=fe):fe=e[89];let me;e[90]!==t?(me=t("settings.apiKeys.expiryLabel"),e[90]=t,e[91]=me):me=e[91];let pe;e[92]!==me?(pe=s.jsx(Ee,{htmlFor:"api-key-expiry",children:me}),e[92]=me,e[93]=pe):pe=e[93];let xe;e[94]!==K?(xe=B=>{const q=$e.find(M=>M===B);q&&K(q)},e[94]=K,e[95]=xe):xe=e[95];let De;e[96]===Symbol.for("react.memo_cache_sentinel")?(De=s.jsx(Ct,{id:"api-key-expiry",className:"w-full",children:s.jsx(St,{})}),e[96]=De):De=e[96];let ge;e[97]!==Te?(ge=$e.map(B=>s.jsx(vt,{value:B,children:Te[B]},B)),e[97]=Te,e[98]=ge):ge=e[98];let he;e[99]!==ge?(he=s.jsx(Nt,{children:ge}),e[99]=ge,e[100]=he):he=e[100];let ye;e[101]!==S||e[102]!==xe||e[103]!==he?(ye=s.jsxs(_t,{value:S,onValueChange:xe,children:[De,he]}),e[101]=S,e[102]=xe,e[103]=he,e[104]=ye):ye=e[104];let je;e[105]!==pe||e[106]!==ye?(je=s.jsxs("div",{className:"space-y-1.5",children:[pe,ye]}),e[105]=pe,e[106]=ye,e[107]=je):je=e[107];const et=y.isPending;let Ke;e[108]!==t?(Ke=t("settings.apiKeys.cancelButton"),e[108]=t,e[109]=Ke):Ke=e[109];let be;e[110]!==y.isPending||e[111]!==l||e[112]!==Ke?(be=s.jsx(Q,{type:"button",variant:"outline",onClick:l,disabled:et,children:Ke}),e[110]=y.isPending,e[111]=l,e[112]=Ke,e[113]=be):be=e[113];const Oe=!w;let ve;e[114]!==y.isPending||e[115]!==t?(ve=y.isPending?t("settings.apiKeys.creatingButton"):t("settings.apiKeys.createButton"),e[114]=y.isPending,e[115]=t,e[116]=ve):ve=e[116];let Ce;e[117]!==Oe||e[118]!==ve?(Ce=s.jsx(Q,{type:"submit",disabled:Oe,children:ve}),e[117]=Oe,e[118]=ve,e[119]=Ce):Ce=e[119];let Se;e[120]!==be||e[121]!==Ce?(Se=s.jsxs(Qe,{children:[be,Ce]}),e[120]=be,e[121]=Ce,e[122]=Se):Se=e[122];let we;return e[123]!==D||e[124]!==le||e[125]!==de||e[126]!==ue||e[127]!==fe||e[128]!==je||e[129]!==Se?(we=s.jsxs("form",{onSubmit:D,className:"space-y-4",children:[le,de,ue,fe,je,Se]}),e[123]=D,e[124]=le,e[125]=de,e[126]=ue,e[127]=fe,e[128]=je,e[129]=Se,e[130]=we):we=e[130],we}function es(o){return s.jsxs("label",{className:"flex cursor-pointer items-start gap-3 rounded-md border border-border px-3 py-2.5 hover:bg-accent has-[[data-state=checked]]:border-primary",children:[s.jsx($t,{value:o.value,className:"mt-0.5"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("span",{className:"block text-sm font-medium",children:o.label}),s.jsx("span",{className:Ie("block text-xs",o.value==="full"?"text-warning":"text-muted-foreground"),children:o.description})]})]},o.value)}function ts(o,e){return o.name.localeCompare(e.name)}function ss(o){const e=L.c(23),{open:l,onOpenChange:i,onCreated:t}=o,a=G();let n;e[0]!==a?(n=a("settings.apiKeys.newKeyTitle"),e[0]=a,e[1]=n):n=e[1];let m;e[2]!==n?(m=s.jsx(Be,{children:n}),e[2]=n,e[3]=m):m=e[3];let c;e[4]!==a?(c=a("settings.apiKeys.newKeyDescription"),e[4]=a,e[5]=c):c=e[5];let r;e[6]!==c?(r=s.jsx(Ge,{children:c}),e[6]=c,e[7]=r):r=e[7];let d;e[8]!==m||e[9]!==r?(d=s.jsxs(qe,{children:[m,r]}),e[8]=m,e[9]=r,e[10]=d):d=e[10];let p;e[11]!==i?(p=()=>i(!1),e[11]=i,e[12]=p):p=e[12];let x;e[13]!==t||e[14]!==p?(x=s.jsx(Zt,{onClose:p,onCreated:t}),e[13]=t,e[14]=p,e[15]=x):x=e[15];let u;e[16]!==d||e[17]!==x?(u=s.jsxs(Ve,{className:"sm:max-w-xl",children:[d,x]}),e[16]=d,e[17]=x,e[18]=u):u=e[18];let f;return e[19]!==i||e[20]!==l||e[21]!==u?(f=s.jsx(He,{open:l,onOpenChange:i,children:u}),e[19]=i,e[20]=l,e[21]=u,e[22]=f):f=e[22],f}function is(){const o=G(),{data:e,isLoading:l,error:i}=It(),t=zt(),[a,n]=P.useState(!1),[m,c]=P.useState(null),[r,d]=P.useState(null),p=e??[];async function x(){if(r)try{await t.mutateAsync(r.id),ke.success(o("settings.apiKeys.keyDeleted",{name:r.name}))}catch(u){ke.error(u instanceof Error?u.message:o("settings.apiKeys.failedToDeleteKey"))}finally{d(null)}}return s.jsxs(at,{title:o("settings.apiKeys.sectionTitle"),description:o("settings.apiKeys.sectionDescription"),actions:p.length>0?s.jsxs(Q,{onClick:()=>n(!0),size:"sm",children:[s.jsx(Ye,{size:14}),o("settings.apiKeys.newKey")]}):void 0,children:[l?s.jsx(Le,{className:"gap-0 overflow-hidden p-0",children:s.jsx("p",{className:"px-4 py-3 text-xs text-muted-foreground",children:o("settings.apiKeys.loading")})}):i&&p.length===0?s.jsx(Ze,{error:i}):p.length===0?s.jsx(Jt,{onCreate:()=>n(!0)}):s.jsx(Le,{className:"gap-0 overflow-hidden p-0",children:s.jsx("ul",{className:"divide-y divide-border",children:p.map(u=>s.jsx(Yt,{apiKey:u,onDelete:()=>d(u)},u.id))})}),s.jsx(ss,{open:a,onOpenChange:n,onCreated:c}),s.jsx(Xt,{createdKey:m,onClose:()=>c(null)}),s.jsx(ot,{open:r!==null,onOpenChange:u=>{u||d(null)},children:s.jsxs(rt,{children:[s.jsxs(ct,{children:[s.jsx(dt,{children:o("settings.apiKeys.deleteTitle",{name:r?.name??""})}),s.jsx(ut,{children:o("settings.apiKeys.deleteDescription")})]}),s.jsxs(ft,{children:[s.jsx(mt,{children:o("settings.apiKeys.cancelButton")}),s.jsx(pt,{onClick:x,children:o("settings.apiKeys.deleteKey")})]})]})})]})}function Ns(){const o=L.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(nt,{group:"connect",errorFallback:ls,children:s.jsx(is,{})}),o[0]=e):e=o[0],e}function ls(o){const{error:e}=o;return s.jsx(Ze,{error:e??new Error("Failed to load API keys")})}export{is as A,Ns as O};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as o,j as r}from"./index-_VeebRNE.js";import{O as m}from"./api-keys-CC3fBiOG.js";import{R as p}from"./require-capability-psnJqvDd.js";import"./AlertCircle-gyZP8TIO.js";import"./agent-icon-CfdcYUE7.js";import"./UserCheck01-Dqn7toBe.js";import"./Tool01-D6InpKaj.js";import"./ArrowUp-DYnF34lU.js";import"./ArrowLeft-BSzt3fBA.js";import"./ArrowRight-BF8V67fk.js";import"./BookOpen01-CpYcxx0H.js";import"./Globe04-DzGa73Hy.js";import"./CheckCircle-CyybvOiK.js";import"./TrendUp01-C_SySyBC.js";import"./ChevronDown-DldgAfZA.js";import"./ChevronSelectorVertical-BbGwltuJ.js";import"./ChevronUp-Bt9-G08q.js";import"./UserSquare-e0qIxN1Q.js";import"./LinkBroken01-Br9NMWkB.js";import"./CreditCard01-vIJuQM5M.js";import"./File02-EV4Uhu5z.js";import"./MessageCircle01-D170V1-p.js";import"./SwitchHorizontal01-Daz2EgW0.js";import"./Eye-BLpLvSpN.js";import"./Image01-BqCHFUEp.js";import"./Key01-KTk95wIy.js";import"./LayoutLeft-_2SG51dD.js";import"./Minus-D88-u0DO.js";import"./Monitor01-Df3mZyNU.js";import"./Sun-BABGQWS8.js";import"./Play-PdUxpWZE.js";import"./Plus-BYodv7tE.js";import"./SearchMd-Cuy8VOOG.js";import"./ShoppingBag01-pCIsQ-Jb.js";import"./Trash01-LecfbxTv.js";import"./Upload01-CABY93nl.js";import"./Users01-UF7lWU9g.js";import"./XClose-C9ONGfkv.js";import"./Zap-D-fE_V4E.js";import"./empty-state-DvK349M1.js";import"./label-DZkEI5Ke.js";import"./badge-DCIHIkLr.js";import"./index-DaFEqiTp.js";import"./select-QgdI1Rfc.js";import"./index-BdQq_4o_.js";import"./index-PcrdQb7V.js";import"./use-mcp-client-UP8_tZ9p.js";import"./auth-vqpzzu5D.js";import"./use-mcp-tools-mA41mojn.js";import"./checkbox-D4P_L8j1.js";import"./search-input-JNlnu1vU.js";import"./integration-icon-D8pA0JHG.js";import"./tool-set-selector-DP0UayXg.js";import"./use-infinite-scroll-DjPaD0kN.js";import"./useSuspenseInfiniteQuery-QLEux5C_.js";import"./infiniteQueryObserver-D7rUvD7y.js";import"./collection-search-DIaYviRG.js";import"./connection-Daz_MJgN.js";import"./url-slug-BkKOqwJh.js";import"./use-connection-cSaq7_i7.js";import"./use-api-keys-DUVyFEfc.js";import"./access-gate-EJXICSzm.js";import"./capability-load-error-C937GiKP.js";function xi(){const t=o.c(1);let i;return t[0]===Symbol.for("react.memo_cache_sentinel")?(i=r.jsx(p,{capability:"api-keys:manage",area:"api-keys",children:r.jsx(m,{})}),t[0]=i):i=t[0],i}export{xi as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as Et,j as s,b as Tt,r as _,au as It,m as Ot,h as Ft,t as wt}from"./index-BuZqAz74.js";import{u as Mt}from"./chat-context-DG5tQFfU.js";import{u as Pt}from"./use-voice-input-poVZeRVs.js";import{S as $t}from"./scroll-area-bkCFS0v8.js";import{u as Ut,A as Vt}from"./use-section-preview-base-C2vE3o4z.js";import{y as zt,l as Lt,t as qt}from"./blocks-tab-states-DxLq1BL5.js";import{H as Ht,u as Dt,c as Gt,b as Wt,S as Zt}from"./held-block-view-zi4CM-KX.js";import{b as Jt,u as Qt,k as Xt}from"./use-never-published-BB5kYeS3.js";import{n as Yt}from"./content-tab-B2YwxmJz.js";import{S as te}from"./save-status-CmYiPWXE.js";import"./use-panel-navigate-B3thngCs.js";import"./thread-route-Dw1cQjON.js";import"./use-project-scope-CD-cb4-V.js";import"./repository-binding-VVfcdUiy.js";import"./use-mcp-client-UWOU8UbZ.js";import"./auth-DuSLyK-k.js";import"./use-view-draft-kind-CXMOqIBD.js";import"./use-blog-view-w4rEUATy.js";import"./use-organization-settings-D8JbZGlQ.js";import"./schema-CCpL_LVZ.js";import"./task-board-DEUSGytR.js";import"./thread-intent-CyH0Z8_7.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-C7kLS2GY.js";import"./session-runtime-HHtypsTM.js";import"./use-entitlements-DgXhk8I6.js";import"./use-ai-providers-BG5EDM0R.js";import"./use-current-view-swKX6Bc6.js";import"./use-in-settings-cNZb_oio.js";import"./use-decopilot-events-SRdggwTs.js";import"./popover-D6EIL5sL.js";import"./drawer-BXd80xtd.js";import"./tooltip-DnGqcvtu.js";import"./index-DNuvhcDO.js";import"./use-mobile-Cq1k3-Gk.js";import"./agent-icon-DwJHakBB.js";import"./AlertCircle-CGZfuvxJ.js";import"./UserCheck01-BMoOFYIZ.js";import"./Tool01-BeDQSGiN.js";import"./ArrowUp-DJZ55cl-.js";import"./ArrowLeft-XURGfwpG.js";import"./ArrowRight-ZoKxZa45.js";import"./BookOpen01-gO5hgFUK.js";import"./Globe04-DO1uUwfE.js";import"./CheckCircle-CmN8U1V5.js";import"./TrendUp01-_SFSHjzO.js";import"./ChevronDown-ClblfTVV.js";import"./ChevronSelectorVertical-YxAp9GGa.js";import"./ChevronUp-0ZCAxpBW.js";import"./UserSquare-Dn1UPzSD.js";import"./LinkBroken01-cq4srxHs.js";import"./CreditCard01-CcTQ1h3_.js";import"./File02-Cs751Kds.js";import"./MessageCircle01-Bf6dD94_.js";import"./SwitchHorizontal01-BQF84Li3.js";import"./Eye-D5j_svLn.js";import"./Image01-CJL4B_rR.js";import"./Key01-fuHivqLl.js";import"./LayoutLeft-CCeum9wV.js";import"./Minus-Cc21R1KY.js";import"./Monitor01-DGdgEYxG.js";import"./Sun-D9ql5ZlI.js";import"./Play-zYFs_vGL.js";import"./Plus--DcN-eh1.js";import"./SearchMd-BwYuN52e.js";import"./ShoppingBag01-D-gmqcz7.js";import"./Trash01-BmQrADz0.js";import"./Upload01-DOfZqxci.js";import"./Users01-B_yoWxPn.js";import"./XClose-C4MsAn9v.js";import"./Zap-DoxB0q6B.js";import"./index-Bld02Tnb.js";import"./checkbox-DAnVkT6Q.js";import"./select-BkYZ4NYA.js";import"./index-BdQq_4o_.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./site-editor-toast-aupfR4Aq.js";import"./use-sandbox-events-BcrE-YTF.js";import"./sandbox-url-D3mC8qhT.js";import"./use-blocks-v8-project-Dh0QtV4J.js";import"./utils-BdAsQahL.js";import"./sandbox-git-api-CkSQDoxX.js";import"./empty-state-BK8GboWz.js";import"./calendar-BUgmhSfk.js";import"./textarea-CcO-rfag.js";import"./usage-stats-C5Wj6kIy.js";import"./utils-CVEq3hMx.js";import"./markdown-CwYBGb1B.js";import"./use-copy-BFeXylk9.js";import"./gateway-client-PdaGLWBA.js";import"./form-Cxhh0mxt.js";import"./label-Dm_T3WyF.js";import"./editor-classes-CzejjvgI.js";import"./switch-COjzxQ39.js";import"./task-key-DaPOId6s.js";import"./sortable.esm-n9zdQXyB.js";import"./toggle-group-DFyE84bx.js";import"./active-indicator-CCMhAsc_.js";import"./empty-message-DVICFi26.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-BYbJa99U.js";import"./collapsible-DifRD2Ww.js";import"./use-task-board-items-DP6ZFnrN.js";import"./config-dB-x76iz.js";import"./task-route-BJj40Yza.js";import"./project-index-5c8GGatg.js";import"./shell-layout-rYoN4RTk.js";import"./use-deployment-admin-Dwt-RYsg.js";import"./admin-fetch-BhTJlAsX.js";import"./use-org-notice-D_lLzWXp.js";import"./command-DHGFzOhP.js";import"./index-DsWqYG3w.js";import"./integration-icon-D7fga3kk.js";import"./project-icon-BHn6Xq54.js";import"./use-navigate-to-agent-vJOwimSb.js";import"./use-debounced-value-CPl0Wyl6.js";import"./new-project-dialog-Bq2YhVDS.js";import"./repository-picker-By75IHJa.js";import"./github-icon-h_xg-qFR.js";import"./useInfiniteQuery-CNxlkxws.js";import"./infiniteQueryObserver-CHN_AvWa.js";import"./collection-search-RWM-9f07.js";import"./new-project-store-C82itd6a.js";import"./legacy-admin-welcome-dialog-C0w-pw6s.js";import"./required-auth-layout-GSSn-bTA.js";import"./use-org-sso-fZ2uDAIp.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-CLuYD3rD.js";import"./types-B4ln4I1a.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./sheet-Lq2qXLx8.js";import"./use-connection-C4G0ZMoe.js";import"./use-mcp-prompts-CjwiiUTx.js";import"./use-thread-outputs-A3ms5KEO.js";import"./file-type-icon-CSrE_noX.js";import"./section-array-field-DOngDm8U.js";import"./named-rule-step-D8j_NuRK.js";import"./slider-B4bXP1H_.js";import"./index-rt88hTRg.js";import"./tooltipContext-BVc6eTu_.js";import"./CategoricalChart-CmAKQrAh.js";import"./index-BwBEUlXI.js";import"./combobox-D7DiHBHL.js";import"./match-site-slug-config-B47_xZCi.js";import"./use-file-configs-BlRaUlfc.js";import"./asset-utils-C40qdOgS.js";import"./hosted-reconcile-uX15ZUhb.js";import"./search-input-C4sd-kKh.js";import"./tabs-CbfCGlFS.js";import"./delete-copy-C7-0DCkQ.js";import"./category-tree-BeXLYa5S.js";import"./use-move-blocks-DH3gSdil.js";import"./index-CZTrNcsP.js";import"./view-header-CZchRX7c.js";import"./use-cms-publish-actions-Bf5Y1rJL.js";import"./use-content-sync-CeYI53r8.js";import"./use-delete-block-CRyG6Do-.js";import"./item-actions-Dld5lBtQ.js";import"./date-utils-CrvIKg-s.js";import"./badge-BvHOfdxU.js";import"./empty-state-LbEOn0Mj.js";import"./monaco-editor-CTONBla7.js";import"./editor-DNZ-WgCS.js";import"./sandbox-lifecycle-context-BBz4IKVo.js";import"./parse-sections-CVDx-uBN.js";import"./mustache-C50JF2sQ.js";import"./collection-table-wrapper-DVjGjn7R.js";import"./table-DQIAY6r-.js";import"./agent-capabilities-Dh06TMfs.js";function ee(e,t){if(!e||!t?.length)return e;const o=Object.fromEntries(Object.entries(e.properties??{}).filter(([r])=>!t.includes(r)));return Object.keys(o).length>0?{...e,properties:o}:e}function _t(e,t,o){return typeof e!="string"?null:ee(zt(e,t),o)}function re(e,t,o){if(!t||typeof e!="string")return!1;const r=_t(e,t,o);return!!r&&Object.keys(r.properties??{}).length>0}function oe(e,t){const o=(e.title||e.resolveType.split("/").pop()||"").replace(/\.(tsx?|jsx?)$/,"").replace(/[^A-Za-z0-9_-]/g,""),r=/^[A-Za-z]/.test(o)&&o.length>0?o:"Section",i=Yt(t,r);return{blockKey:i,data:{__resolveType:e.resolveType,name:i}}}function xi(e){const t=Et.c(10),o=e.saveGuard?void 0:e.block!==void 0;let r;t[0]!==e?(r=s.jsx(ie,{...e}),t[0]=e,t[1]=r):r=t[1];let i;return t[2]!==e.blockKey||t[3]!==e.branch||t[4]!==e.decofile||t[5]!==e.orgSlug||t[6]!==e.virtualMcpId||t[7]!==o||t[8]!==r?(i=s.jsx(Ht,{listing:e.decofile,orgSlug:e.orgSlug,virtualMcpId:e.virtualMcpId,branch:e.branch,blockKey:e.blockKey,present:o,children:r}),t[2]=e.blockKey,t[3]=e.branch,t[4]=e.decofile,t[5]=e.orgSlug,t[6]=e.virtualMcpId,t[7]=o,t[8]=r,t[9]=i):i=t[9],i}function ie(e){const t=Et.c(95),{orgSlug:o,virtualMcpId:r,branch:i,blockKey:a,block:b,meta:m,decofile:c,title:At,excludeFields:v,previewBaseUrl:gt,notice:Z,saveGuard:J,persistDefaults:Q,schemaWaiting:St}=e,X=gt===void 0?null:gt,Y=St===void 0?!0:St,tt=Mt()?.taskId??null,h=Tt(),K=Pt(r);let R;t[0]!==i||t[1]!==X||t[2]!==r?(R={virtualMcpId:r,branch:i,sandboxUrl:X},t[0]=i,t[1]=X,t[2]=r,t[3]=R):R=t[3];const x=Ut(R),l=typeof b?.__resolveType=="string"?b.__resolveType:"";let N;t[4]!==v||t[5]!==m||t[6]!==l?(N=_t(l,m,v),t[4]=v,t[5]=m,t[6]=l,t[7]=N):N=t[7];const et=N;let C;t[8]!==v||t[9]!==m||t[10]!==l?(C=re(l,m,v),t[8]=v,t[9]=m,t[10]=l,t[11]=C):C=t[11];const rt=C;let T;t[12]!==m||t[13]!==l||t[14]!==Y||t[15]!==K?(T=Y&&l!==""&&!(K.resolved&&K.runtime==="cms")&&!Lt(l,m),t[12]=m,t[13]=l,t[14]=Y,t[15]=K,t[16]=T):T=t[16];const I=T,yt=At??(b?qt(a,b,m):a);let O;t[17]!==i||t[18]!==o||t[19]!==r?(O={orgSlug:o,virtualMcpId:r,branch:i},t[17]=i,t[18]=o,t[19]=r,t[20]=O):O=t[20];let F;t[21]!==J?(F={guard:J,holdsCopy:!0},t[21]=J,t[22]=F):F=t[22];const{save:ot,flush:it,isPending:st}=Jt(O,F);let M;t[23]!==i||t[24]!==o||t[25]!==r?(M={orgSlug:o,virtualMcpId:r,branch:i},t[23]=i,t[24]=o,t[25]=r,t[26]=M):M=t[26];const mt=Qt(M);let P;t[27]!==i||t[28]!==o||t[29]!==r?(P={orgSlug:o,virtualMcpId:r,branch:i},t[27]=i,t[28]=o,t[29]=r,t[30]=P):P=t[30];const nt=Dt(P,c).save,[Kt,Rt]=_.useState(a),[lt,kt]=_.useState(null),[pt,jt]=_.useState(0);let $;t[31]===Symbol.for("react.memo_cache_sentinel")?($=[],t[31]=$):$=t[31];const[g,Bt]=_.useState($),[at,d]=_.useState(!1),U=_.useRef(null);Kt!==a&&(Rt(a),kt(null),jt(me),Bt([]));let V;t[32]!==b?(V=b??{},t[32]=b,t[33]=V):V=t[33];const ct=V;let S;t[34]!==lt?(S=lt??{},t[34]=lt,t[35]=S):S=t[35];let z;t[36]!==ct||t[37]!==S?(z={...ct,...S},t[36]=ct,t[37]=S,t[38]=z):z=t[38];const dt=z;let L;t[39]!==a||t[40]!==l||t[41]!==ot?(L=n=>{const p=n;kt(p),ot(a,{...p,__resolveType:l})},t[39]=a,t[40]=l,t[41]=ot,t[42]=L):L=t[42];const ut=L;let q;t[43]===Symbol.for("react.memo_cache_sentinel")?(q=n=>{Bt(n)},t[43]=q):q=t[43];const A=q;let H;t[44]!==c||t[45]!==it||t[46]!==mt||t[47]!==h?(H=async(n,p)=>{try{const{blockKey:u,data:f}=oe(n,c),vt=await mt.mutateAsync({blockKey:u,data:f});Xt(vt)||wt.success(h("sandbox.appEditor.createdSection",{name:u})),p({__resolveType:u}),it()}catch(u){const f=u,vt=f instanceof Error?f.message:h("sandbox.appEditor.failedAddSection");throw wt.error(vt),f}},t[44]=c,t[45]=it,t[46]=mt,t[47]=h,t[48]=H):H=t[48];const y=H;let D;t[49]!==d?(D=n=>{U.current=n.append,d(!0)},t[49]=d,t[50]=D):D=t[50];const ft=D;let G;t[51]!==y||t[52]!==d?(G=async n=>{const p=U.current;if(p)try{await y(n,u=>{p(u),d(!1),U.current=null})}catch{}},t[51]=y,t[52]=d,t[53]=G):G=t[53];const ht=G,bt=g.length>0?[yt,...g]:[],Nt="flex h-full flex-col",Ct="flex h-12 shrink-0 items-center justify-between border-b px-6",xt=bt.length>0?s.jsx("nav",{"aria-label":h("sandbox.appEditor.editingBreadcrumb"),className:"flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",children:bt.map((n,p)=>{const u=p===bt.length-1,f=Gt(n);return s.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[p>0&&s.jsx(It,{className:"size-3 shrink-0 text-muted-foreground/60"}),s.jsx("button",{type:"button",onClick:()=>{A(p===0?[]:Wt(g,p)),jt(se)},title:f,className:Ot("min-w-0 truncate rounded-lg px-1 py-0.5 text-left transition-colors",u?"font-medium text-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:f})]},`${f}-${p}`)})}):s.jsx("span",{className:"text-sm font-medium",children:yt});let k;t[54]!==st?(k=s.jsx(te,{isPending:st,isError:!1}),t[54]=st,t[55]=k):k=t[55];let j;t[56]!==xt||t[57]!==k?(j=s.jsxs("div",{className:Ct,children:[xt,k]}),t[56]=xt,t[57]=k,t[58]=j):j=t[58];let B;t[59]!==I||t[60]!==a||t[61]!==i||t[62]!==g||t[63]!==c||t[64]!==dt||t[65]!==pt||t[66]!==y||t[67]!==A||t[68]!==ut||t[69]!==ft||t[70]!==rt||t[71]!==m||t[72]!==o||t[73]!==Q||t[74]!==nt||t[75]!==et||t[76]!==x||t[77]!==h||t[78]!==tt||t[79]!==r?(B=rt?s.jsx(Zt,{schema:et,value:dt,onChange:ut,persistDefaults:Q,basePath:"",breadcrumbPath:g,onBreadcrumbChange:A,decofile:c,meta:m,onSaveReferencedBlock:nt,previewBaseUrl:x,onAddSectionItem:y,onRequestAddSection:ft,sandbox:{orgSlug:o,virtualMcpId:r,branch:i,threadId:tt}},`${a}:${pt}`):s.jsxs("div",{className:"flex flex-col items-center gap-3 py-6 text-center text-xs text-muted-foreground",children:[I&&s.jsx(Ft,{className:"size-4"}),s.jsx("p",{children:h(I?"sandbox.appEditor.schemaAwaitsBuild":"sandbox.appEditor.noEditableSchema")})]}),t[59]=I,t[60]=a,t[61]=i,t[62]=g,t[63]=c,t[64]=dt,t[65]=pt,t[66]=y,t[67]=A,t[68]=ut,t[69]=ft,t[70]=rt,t[71]=m,t[72]=o,t[73]=Q,t[74]=nt,t[75]=et,t[76]=x,t[77]=h,t[78]=tt,t[79]=r,t[80]=B):B=t[80];let w;t[81]!==Z||t[82]!==B?(w=s.jsx($t,{className:"min-h-0 min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:s.jsx("div",{className:"px-6 py-6",children:s.jsxs("div",{className:"mx-auto max-w-xl",children:[Z,B]})})}),t[81]=Z,t[82]=B,t[83]=w):w=t[83];let E;t[84]!==at||t[85]!==c||t[86]!==ht||t[87]!==m||t[88]!==x||t[89]!==d?(E=x&&s.jsx(Vt,{open:at,onOpenChange:n=>{d(n),n||(U.current=null)},meta:m,decofile:c,previewBaseUrl:x,onSelect:n=>{ht(n)}}),t[84]=at,t[85]=c,t[86]=ht,t[87]=m,t[88]=x,t[89]=d,t[90]=E):E=t[90];let W;return t[91]!==j||t[92]!==w||t[93]!==E?(W=s.jsxs("div",{className:Nt,children:[j,w,E]}),t[91]=j,t[92]=w,t[93]=E,t[94]=W):W=t[94],W}function se(e){return e+1}function me(e){return e+1}export{xi as AppEditor};
|
|
1
|
+
import{c as Et,j as s,b as Tt,r as _,au as It,m as Ot,h as Ft,t as wt}from"./index-_VeebRNE.js";import{u as Mt}from"./chat-context-DSu9o-d-.js";import{u as Pt}from"./use-voice-input-Dv1QYOod.js";import{S as $t}from"./scroll-area-EnKfGRfx.js";import{u as Ut,A as Vt}from"./use-section-preview-base-CErD4C9a.js";import{y as zt,l as Lt,t as qt}from"./blocks-tab-states-DeaA94XX.js";import{H as Ht,u as Dt,c as Gt,b as Wt,S as Zt}from"./held-block-view-KOyRMpy4.js";import{b as Jt,u as Qt,k as Xt}from"./use-never-published-DDbQ0Vt8.js";import{n as Yt}from"./content-tab-C66XjEbc.js";import{S as te}from"./save-status-DI5XwwX3.js";import"./use-panel-navigate-D4GuHOu1.js";import"./thread-route-D_C8d7xK.js";import"./use-project-scope-CpfOkL8I.js";import"./repository-binding-Ct6tvS6k.js";import"./use-mcp-client-UP8_tZ9p.js";import"./auth-vqpzzu5D.js";import"./use-view-draft-kind-BLkqtU-Q.js";import"./use-blog-view-DQBrFMuV.js";import"./use-organization-settings-ByKdFGhE.js";import"./schema-Bawh3LAf.js";import"./task-board-CHctJwrW.js";import"./thread-intent-pC76uPwU.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-_tvuBMId.js";import"./session-runtime-DLIbUSWD.js";import"./use-entitlements-B6kax2f9.js";import"./use-ai-providers-D6peTC8u.js";import"./use-current-view-a6HKOM5X.js";import"./use-in-settings-jNNDWh86.js";import"./use-decopilot-events-B0JW1Gtz.js";import"./popover-CsisCWO2.js";import"./drawer-Ckz_nyBH.js";import"./tooltip-BYnWhoO-.js";import"./index-PcrdQb7V.js";import"./use-mobile-FS1bh43h.js";import"./agent-icon-CfdcYUE7.js";import"./AlertCircle-gyZP8TIO.js";import"./UserCheck01-Dqn7toBe.js";import"./Tool01-D6InpKaj.js";import"./ArrowUp-DYnF34lU.js";import"./ArrowLeft-BSzt3fBA.js";import"./ArrowRight-BF8V67fk.js";import"./BookOpen01-CpYcxx0H.js";import"./Globe04-DzGa73Hy.js";import"./CheckCircle-CyybvOiK.js";import"./TrendUp01-C_SySyBC.js";import"./ChevronDown-DldgAfZA.js";import"./ChevronSelectorVertical-BbGwltuJ.js";import"./ChevronUp-Bt9-G08q.js";import"./UserSquare-e0qIxN1Q.js";import"./LinkBroken01-Br9NMWkB.js";import"./CreditCard01-vIJuQM5M.js";import"./File02-EV4Uhu5z.js";import"./MessageCircle01-D170V1-p.js";import"./SwitchHorizontal01-Daz2EgW0.js";import"./Eye-BLpLvSpN.js";import"./Image01-BqCHFUEp.js";import"./Key01-KTk95wIy.js";import"./LayoutLeft-_2SG51dD.js";import"./Minus-D88-u0DO.js";import"./Monitor01-Df3mZyNU.js";import"./Sun-BABGQWS8.js";import"./Play-PdUxpWZE.js";import"./Plus-BYodv7tE.js";import"./SearchMd-Cuy8VOOG.js";import"./ShoppingBag01-pCIsQ-Jb.js";import"./Trash01-LecfbxTv.js";import"./Upload01-CABY93nl.js";import"./Users01-UF7lWU9g.js";import"./XClose-C9ONGfkv.js";import"./Zap-D-fE_V4E.js";import"./index-QCTvcBUO.js";import"./checkbox-D4P_L8j1.js";import"./select-QgdI1Rfc.js";import"./index-BdQq_4o_.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./site-editor-toast-Cjans_Z7.js";import"./use-sandbox-events-CPKES4Ee.js";import"./sandbox-url-D3mC8qhT.js";import"./use-blocks-v8-project-JOmELUJ6.js";import"./utils-Dovv0grx.js";import"./sandbox-git-api-DN6h_KqP.js";import"./empty-state-DGaA5_7F.js";import"./calendar-BbIAhjX6.js";import"./textarea-Cimn1xhl.js";import"./usage-stats-CCyq9Zgo.js";import"./utils-CVEq3hMx.js";import"./markdown-CBoNEgkf.js";import"./use-copy-DKfw8n-3.js";import"./gateway-client-DDICMs0d.js";import"./form-B3cubXs5.js";import"./label-DZkEI5Ke.js";import"./editor-classes-Bm1swfOR.js";import"./switch-7uXAaerp.js";import"./task-key-B6H-3XJr.js";import"./sortable.esm-CW9y-Z65.js";import"./toggle-group-n8suP90I.js";import"./active-indicator-CCMhAsc_.js";import"./empty-message-Cs32P_FY.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-CHh11R95.js";import"./collapsible-BJX4Hk9k.js";import"./use-task-board-items-DxcJSuMX.js";import"./config-iR6MS3mx.js";import"./task-route-CBxVmSL7.js";import"./project-index-QHWJWseM.js";import"./shell-layout-D8UbY9n5.js";import"./use-deployment-admin-BENsmKZ2.js";import"./admin-fetch-BhTJlAsX.js";import"./use-org-notice-D5zuQ4m5.js";import"./command-DsEpQe7b.js";import"./index-ykH_xCiZ.js";import"./integration-icon-D8pA0JHG.js";import"./project-icon-CoHnihPF.js";import"./use-navigate-to-agent-Dg2qYHJi.js";import"./use-debounced-value-BAma3ogA.js";import"./new-project-dialog-B9UZLlxE.js";import"./repository-picker-D7wgGSh_.js";import"./github-icon-lV5tv6c5.js";import"./useInfiniteQuery-CuAeAzcr.js";import"./infiniteQueryObserver-D7rUvD7y.js";import"./collection-search-DIaYviRG.js";import"./new-project-store-BzLAZn_u.js";import"./legacy-admin-welcome-dialog-ZZ1Gngd8.js";import"./required-auth-layout-5KQLVPyY.js";import"./use-org-sso-QMFtipA-.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DtOO8I9w.js";import"./types-CdP485rd.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./sheet-8iInbf9D.js";import"./use-connection-cSaq7_i7.js";import"./use-mcp-prompts-BM9uSers.js";import"./use-thread-outputs-BRvk_pZG.js";import"./file-type-icon-C1PmpIi5.js";import"./section-array-field-DeIFn5hU.js";import"./named-rule-step-DreL1Pcr.js";import"./slider-CnikFjRE.js";import"./index-NWJ7p_1D.js";import"./tooltipContext-DqZT6jLi.js";import"./CategoricalChart-CIY6jBUR.js";import"./index-j-nHo57s.js";import"./combobox-BCPDPSll.js";import"./match-site-slug-config-B47_xZCi.js";import"./use-file-configs-aENtp_va.js";import"./asset-utils-CTFQl8QO.js";import"./hosted-reconcile-CxvdumkL.js";import"./search-input-JNlnu1vU.js";import"./tabs-C9s0KY6N.js";import"./delete-copy-B8O2OJ6R.js";import"./category-tree-yoWo8LKT.js";import"./use-move-blocks-DAGy4lk4.js";import"./index-DAKnsBwp.js";import"./view-header-ByNTN-so.js";import"./use-cms-publish-actions-DuI-swrZ.js";import"./use-content-sync-DElceZSb.js";import"./use-delete-block-CUXsAbin.js";import"./item-actions-0UZvaX_W.js";import"./date-utils-CrvIKg-s.js";import"./badge-DCIHIkLr.js";import"./empty-state-DvK349M1.js";import"./monaco-editor-D-AA2j7y.js";import"./editor-Dv1qkRGx.js";import"./sandbox-lifecycle-context-Ptllc8xw.js";import"./parse-sections-BX1x8Bjk.js";import"./mustache-uZ8plADR.js";import"./collection-table-wrapper-DisSN_Gv.js";import"./table-drGady29.js";import"./agent-capabilities-g1Ym1ZNZ.js";function ee(e,t){if(!e||!t?.length)return e;const o=Object.fromEntries(Object.entries(e.properties??{}).filter(([r])=>!t.includes(r)));return Object.keys(o).length>0?{...e,properties:o}:e}function _t(e,t,o){return typeof e!="string"?null:ee(zt(e,t),o)}function re(e,t,o){if(!t||typeof e!="string")return!1;const r=_t(e,t,o);return!!r&&Object.keys(r.properties??{}).length>0}function oe(e,t){const o=(e.title||e.resolveType.split("/").pop()||"").replace(/\.(tsx?|jsx?)$/,"").replace(/[^A-Za-z0-9_-]/g,""),r=/^[A-Za-z]/.test(o)&&o.length>0?o:"Section",i=Yt(t,r);return{blockKey:i,data:{__resolveType:e.resolveType,name:i}}}function xi(e){const t=Et.c(10),o=e.saveGuard?void 0:e.block!==void 0;let r;t[0]!==e?(r=s.jsx(ie,{...e}),t[0]=e,t[1]=r):r=t[1];let i;return t[2]!==e.blockKey||t[3]!==e.branch||t[4]!==e.decofile||t[5]!==e.orgSlug||t[6]!==e.virtualMcpId||t[7]!==o||t[8]!==r?(i=s.jsx(Ht,{listing:e.decofile,orgSlug:e.orgSlug,virtualMcpId:e.virtualMcpId,branch:e.branch,blockKey:e.blockKey,present:o,children:r}),t[2]=e.blockKey,t[3]=e.branch,t[4]=e.decofile,t[5]=e.orgSlug,t[6]=e.virtualMcpId,t[7]=o,t[8]=r,t[9]=i):i=t[9],i}function ie(e){const t=Et.c(95),{orgSlug:o,virtualMcpId:r,branch:i,blockKey:a,block:b,meta:m,decofile:c,title:At,excludeFields:v,previewBaseUrl:gt,notice:Z,saveGuard:J,persistDefaults:Q,schemaWaiting:St}=e,X=gt===void 0?null:gt,Y=St===void 0?!0:St,tt=Mt()?.taskId??null,h=Tt(),K=Pt(r);let R;t[0]!==i||t[1]!==X||t[2]!==r?(R={virtualMcpId:r,branch:i,sandboxUrl:X},t[0]=i,t[1]=X,t[2]=r,t[3]=R):R=t[3];const x=Ut(R),l=typeof b?.__resolveType=="string"?b.__resolveType:"";let N;t[4]!==v||t[5]!==m||t[6]!==l?(N=_t(l,m,v),t[4]=v,t[5]=m,t[6]=l,t[7]=N):N=t[7];const et=N;let C;t[8]!==v||t[9]!==m||t[10]!==l?(C=re(l,m,v),t[8]=v,t[9]=m,t[10]=l,t[11]=C):C=t[11];const rt=C;let T;t[12]!==m||t[13]!==l||t[14]!==Y||t[15]!==K?(T=Y&&l!==""&&!(K.resolved&&K.runtime==="cms")&&!Lt(l,m),t[12]=m,t[13]=l,t[14]=Y,t[15]=K,t[16]=T):T=t[16];const I=T,yt=At??(b?qt(a,b,m):a);let O;t[17]!==i||t[18]!==o||t[19]!==r?(O={orgSlug:o,virtualMcpId:r,branch:i},t[17]=i,t[18]=o,t[19]=r,t[20]=O):O=t[20];let F;t[21]!==J?(F={guard:J,holdsCopy:!0},t[21]=J,t[22]=F):F=t[22];const{save:ot,flush:it,isPending:st}=Jt(O,F);let M;t[23]!==i||t[24]!==o||t[25]!==r?(M={orgSlug:o,virtualMcpId:r,branch:i},t[23]=i,t[24]=o,t[25]=r,t[26]=M):M=t[26];const mt=Qt(M);let P;t[27]!==i||t[28]!==o||t[29]!==r?(P={orgSlug:o,virtualMcpId:r,branch:i},t[27]=i,t[28]=o,t[29]=r,t[30]=P):P=t[30];const nt=Dt(P,c).save,[Kt,Rt]=_.useState(a),[lt,kt]=_.useState(null),[pt,jt]=_.useState(0);let $;t[31]===Symbol.for("react.memo_cache_sentinel")?($=[],t[31]=$):$=t[31];const[g,Bt]=_.useState($),[at,d]=_.useState(!1),U=_.useRef(null);Kt!==a&&(Rt(a),kt(null),jt(me),Bt([]));let V;t[32]!==b?(V=b??{},t[32]=b,t[33]=V):V=t[33];const ct=V;let S;t[34]!==lt?(S=lt??{},t[34]=lt,t[35]=S):S=t[35];let z;t[36]!==ct||t[37]!==S?(z={...ct,...S},t[36]=ct,t[37]=S,t[38]=z):z=t[38];const dt=z;let L;t[39]!==a||t[40]!==l||t[41]!==ot?(L=n=>{const p=n;kt(p),ot(a,{...p,__resolveType:l})},t[39]=a,t[40]=l,t[41]=ot,t[42]=L):L=t[42];const ut=L;let q;t[43]===Symbol.for("react.memo_cache_sentinel")?(q=n=>{Bt(n)},t[43]=q):q=t[43];const A=q;let H;t[44]!==c||t[45]!==it||t[46]!==mt||t[47]!==h?(H=async(n,p)=>{try{const{blockKey:u,data:f}=oe(n,c),vt=await mt.mutateAsync({blockKey:u,data:f});Xt(vt)||wt.success(h("sandbox.appEditor.createdSection",{name:u})),p({__resolveType:u}),it()}catch(u){const f=u,vt=f instanceof Error?f.message:h("sandbox.appEditor.failedAddSection");throw wt.error(vt),f}},t[44]=c,t[45]=it,t[46]=mt,t[47]=h,t[48]=H):H=t[48];const y=H;let D;t[49]!==d?(D=n=>{U.current=n.append,d(!0)},t[49]=d,t[50]=D):D=t[50];const ft=D;let G;t[51]!==y||t[52]!==d?(G=async n=>{const p=U.current;if(p)try{await y(n,u=>{p(u),d(!1),U.current=null})}catch{}},t[51]=y,t[52]=d,t[53]=G):G=t[53];const ht=G,bt=g.length>0?[yt,...g]:[],Nt="flex h-full flex-col",Ct="flex h-12 shrink-0 items-center justify-between border-b px-6",xt=bt.length>0?s.jsx("nav",{"aria-label":h("sandbox.appEditor.editingBreadcrumb"),className:"flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",children:bt.map((n,p)=>{const u=p===bt.length-1,f=Gt(n);return s.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[p>0&&s.jsx(It,{className:"size-3 shrink-0 text-muted-foreground/60"}),s.jsx("button",{type:"button",onClick:()=>{A(p===0?[]:Wt(g,p)),jt(se)},title:f,className:Ot("min-w-0 truncate rounded-lg px-1 py-0.5 text-left transition-colors",u?"font-medium text-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:f})]},`${f}-${p}`)})}):s.jsx("span",{className:"text-sm font-medium",children:yt});let k;t[54]!==st?(k=s.jsx(te,{isPending:st,isError:!1}),t[54]=st,t[55]=k):k=t[55];let j;t[56]!==xt||t[57]!==k?(j=s.jsxs("div",{className:Ct,children:[xt,k]}),t[56]=xt,t[57]=k,t[58]=j):j=t[58];let B;t[59]!==I||t[60]!==a||t[61]!==i||t[62]!==g||t[63]!==c||t[64]!==dt||t[65]!==pt||t[66]!==y||t[67]!==A||t[68]!==ut||t[69]!==ft||t[70]!==rt||t[71]!==m||t[72]!==o||t[73]!==Q||t[74]!==nt||t[75]!==et||t[76]!==x||t[77]!==h||t[78]!==tt||t[79]!==r?(B=rt?s.jsx(Zt,{schema:et,value:dt,onChange:ut,persistDefaults:Q,basePath:"",breadcrumbPath:g,onBreadcrumbChange:A,decofile:c,meta:m,onSaveReferencedBlock:nt,previewBaseUrl:x,onAddSectionItem:y,onRequestAddSection:ft,sandbox:{orgSlug:o,virtualMcpId:r,branch:i,threadId:tt}},`${a}:${pt}`):s.jsxs("div",{className:"flex flex-col items-center gap-3 py-6 text-center text-xs text-muted-foreground",children:[I&&s.jsx(Ft,{className:"size-4"}),s.jsx("p",{children:h(I?"sandbox.appEditor.schemaAwaitsBuild":"sandbox.appEditor.noEditableSchema")})]}),t[59]=I,t[60]=a,t[61]=i,t[62]=g,t[63]=c,t[64]=dt,t[65]=pt,t[66]=y,t[67]=A,t[68]=ut,t[69]=ft,t[70]=rt,t[71]=m,t[72]=o,t[73]=Q,t[74]=nt,t[75]=et,t[76]=x,t[77]=h,t[78]=tt,t[79]=r,t[80]=B):B=t[80];let w;t[81]!==Z||t[82]!==B?(w=s.jsx($t,{className:"min-h-0 min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:s.jsx("div",{className:"px-6 py-6",children:s.jsxs("div",{className:"mx-auto max-w-xl",children:[Z,B]})})}),t[81]=Z,t[82]=B,t[83]=w):w=t[83];let E;t[84]!==at||t[85]!==c||t[86]!==ht||t[87]!==m||t[88]!==x||t[89]!==d?(E=x&&s.jsx(Vt,{open:at,onOpenChange:n=>{d(n),n||(U.current=null)},meta:m,decofile:c,previewBaseUrl:x,onSelect:n=>{ht(n)}}),t[84]=at,t[85]=c,t[86]=ht,t[87]=m,t[88]=x,t[89]=d,t[90]=E):E=t[90];let W;return t[91]!==j||t[92]!==w||t[93]!==E?(W=s.jsxs("div",{className:Nt,children:[j,w,E]}),t[91]=j,t[92]=w,t[93]=E,t[94]=W):W=t[94],W}function se(e){return e+1}function me(e){return e+1}export{xi as AppEditor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as d,a6 as m,e as p,am as y,K as I,q as P,b as $,j as g,B as v}from"./index-
|
|
1
|
+
import{c as d,a6 as m,e as p,am as y,K as I,q as P,b as $,j as g,B as v}from"./index-_VeebRNE.js";import{u as C}from"./useInfiniteQuery-CuAeAzcr.js";function k(t){const e=d.c(17),{org:r}=m(),i=y();let s,n,o,c;e[0]!==r.id||e[1]!==t.configId||e[2]!==t.imageOnly||e[3]!==t.search?(n=t.search?.trim()||void 0,s=t.imageOnly??!1,c=C,o=I.filePickerObjects(r.id,t.configId,n,s),e[0]=r.id,e[1]=t.configId,e[2]=t.imageOnly,e[3]=t.search,e[4]=s,e[5]=n,e[6]=o,e[7]=c):(s=e[4],n=e[5],o=e[6],c=e[7]);const a=t.enabled!==!1&&!!t.configId;let l;e[8]!==s||e[9]!==t.configId||e[10]!==n||e[11]!==i?(l=async u=>{const{pageParam:x}=u;return await i.call("FILE_OBJECTS_LIST",{configId:t.configId,cursor:x??void 0,search:n,imageOnly:s||void 0})},e[8]=s,e[9]=t.configId,e[10]=n,e[11]=i,e[12]=l):l=e[12];let f;return e[13]!==o||e[14]!==a||e[15]!==l?(f={queryKey:o,enabled:a,staleTime:3e4,initialPageParam:null,queryFn:l,getNextPageParam:E},e[13]=o,e[14]=a,e[15]=l,e[16]=f):f=e[16],c(f)}function E(t){return t.nextCursor??void 0}function D(){const t=d.c(2),{org:e}=m();let r;return t[0]!==e?(r={mutationFn:async i=>{const s=i.file.type||"application/octet-stream",n=i.replaceKey?`replace=${encodeURIComponent(i.replaceKey)}`:`filename=${encodeURIComponent(i.file.name)}`,o=await fetch(`/api/${encodeURIComponent(e.slug)}/file-configs/${encodeURIComponent(i.configId)}/upload?${n}`,{method:"POST",headers:{"Content-Type":s},body:i.file});if(!o.ok){const c=await o.text().catch(O);let a=`${o.status} ${o.statusText}`;try{const l=JSON.parse(c);l.message&&(a=l.message)}catch{c&&(a=c.slice(0,200))}throw new Error(`Upload failed: ${a}`)}return await o.json()}},t[0]=e,t[1]=r):r=t[1],p(r)}function O(){return""}function K(){const t=d.c(8),{org:e}=m(),r=y(),i=P();let s;t[0]!==r?(s=c=>r.call("FILE_OBJECT_DELETE",c),t[0]=r,t[1]=s):s=t[1];let n;t[2]!==e||t[3]!==i?(n=(c,a)=>{i.invalidateQueries({queryKey:I.filePickerObjectsByConfig(e.id,a.configId)})},t[2]=e,t[3]=i,t[4]=n):n=t[4];let o;return t[5]!==s||t[6]!==n?(o={mutationFn:s,onSuccess:n},t[5]=s,t[6]=n,t[7]=o):o=t[7],p(o)}function R(t){const e=d.c(14),{denied:r,retrying:i,onRetry:s}=t,n=$(),o=r?"filePicker.filePickerDialog.listingDenied":"filePicker.filePickerDialog.listingFailed";let c;e[0]!==n||e[1]!==o?(c=n(o),e[0]=n,e[1]=o,e[2]=c):c=e[2];let a;e[3]!==c?(a=g.jsx("p",{className:"text-sm text-muted-foreground",children:c}),e[3]=c,e[4]=a):a=e[4];let l;e[5]!==n?(l=n("filePicker.filePickerDialog.retryListing"),e[5]=n,e[6]=l):l=e[6];let f;e[7]!==s||e[8]!==i||e[9]!==l?(f=g.jsx(v,{type:"button",variant:"outline",size:"sm",disabled:i,onClick:s,children:l}),e[7]=s,e[8]=i,e[9]=l,e[10]=f):f=e[10];let u;return e[11]!==a||e[12]!==f?(u=g.jsxs("div",{role:"alert",className:"rounded-lg border border-border p-4 space-y-3",children:[a,f]}),e[11]=a,e[12]=f,e[13]=u):u=e[13],u}function j(t){return/\.(png|jpe?g|gif|webp|svg|avif|bmp)$/i.test(t)}function F(t){return/\.(mp4|webm|mov|m4v|ogv)$/i.test(t)}function _(t){return j(t)?"image":F(t)?"video":"document"}function b(t){const e=t.lastIndexOf(".");return e<0||e===t.length-1?"file":t.slice(e+1).toLowerCase()}function w(t){const e=t.split("/");return e[e.length-1]??t}const T=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}-(?=.)/i;function L(t){return w(t).replace(T,"")}function h(t){const e=b(t);return e==="jpeg"?"jpg":e}function S(t,e){return h(t)===h(e)}function U(t,e){const r=e?Date.parse(e):Number.NaN;return Number.isNaN(r)?t:`${t}${t.includes("?")?"&":"?"}v=${r}`}function q(t,e){if(t.height<=0||e.height<=0)return!1;const r=t.width/t.height,i=e.width/e.height;return Math.abs(r-i)/i>.01}function J(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/(1024*1024)).toFixed(1)} MB`}export{R as B,k as a,w as b,_ as c,L as d,b as e,J as f,q as g,K as h,j as i,U as p,S as s,D 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-_VeebRNE.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 M,c as oe,m as E,j as t,a3 as Be,a4 as ze,a5 as Pe,r as N,e as ie,E as W,B as ne,I as ee,b as _e,h as Ve}from"./index-BuZqAz74.js";import{e as He}from"./backoff-CrEUbyZT.js";import{d as Ge}from"./delay-CnY5UFtP.js";class Ae extends Error{constructor(e,r){super(`Retrying exceeded the maxAttempts (${r}).`),this.name="RetryError",this.cause=e}}async function Ke(i,e){const{multiplier:r=2,maxTimeout:l=6e4,maxAttempts:u=5,minTimeout:c=1e3,jitter:n=1,isRetriable:m=()=>!0,signal:d}=e??{};if(!Number.isInteger(u)||u<1)throw new RangeError(`Cannot retry as 'maxAttempts' must be a positive integer: current value is ${u}`);if(!Number.isFinite(r)||r<1)throw new RangeError(`Cannot retry as 'multiplier' must be a finite number >= 1: current value is ${r}`);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(c)||c<0)throw new RangeError(`Cannot retry as 'minTimeout' must be >= 0: current value is ${c}`);if(c>l)throw new RangeError(`Cannot retry as 'minTimeout' must be <= 'maxTimeout': current values 'minTimeout=${c}', 'maxTimeout=${l}'`);if(Number.isNaN(n)||n<0||n>1)throw new RangeError(`Cannot retry as 'jitter' must be between 0 and 1: current value is ${n}`);let v=0;for(;;){d?.throwIfAborted();try{return await i()}catch(x){if(!m(x))throw x;if(v+1>=u)throw new Ae(x,u);const b=He(l,c,v,r,n);await Ge(b,d?{signal:d}:void 0)}v++}}const Fe={submitEmailPassword:({mode:i,email:e,password:r,name:l})=>i==="sign_up"?M.signUp.email({email:e,password:r,name:l||""}):M.signIn.email({email:e,password:r}),requestPasswordReset:({email:i,redirectTo:e})=>M.requestPasswordReset({email:i,redirectTo:e}),sendOtp:({email:i})=>M.emailOtp.sendVerificationOtp({email:i,type:"sign-in"}),submitOtp:({email:i,otp:e})=>M.signIn.emailOtp({email:i,otp:e}),socialSignIn:({provider:i,callbackURL:e})=>M.signIn.social({provider:i,callbackURL:e}),ssoSignIn:({providerId:i,callbackURL:e})=>M.signIn.sso({providerId:i,callbackURL:e}),onAuthenticated:i=>{window.location.href=i}};function Ye(i){const e=oe.c(25);let r,l,u,c,n,m,d,v;e[0]!==i?({length:u,className:r,containerClassName:l,slotClassName:n,pattern:m,inputMode:d,autoComplete:v,...c}=i,e[0]=i,e[1]=r,e[2]=l,e[3]=u,e[4]=c,e[5]=n,e[6]=m,e[7]=d,e[8]=v):(r=e[1],l=e[2],u=e[3],c=e[4],n=e[5],m=e[6],d=e[7],v=e[8]);const x=m===void 0?ze:m,b=d===void 0?"numeric":d,p=v===void 0?"one-time-code":v;let g;e[9]!==l?(g=E("flex items-center gap-2 has-[:disabled]:opacity-50",l),e[9]=l,e[10]=g):g=e[10];let S;e[11]!==r?(S=E("disabled:cursor-not-allowed",r),e[11]=r,e[12]=S):S=e[12];let w;e[13]!==c||e[14]!==n?(w=C=>{const{slots:U}=C;return t.jsx(t.Fragment,{children:U.map((q,K)=>t.jsx(Je,{...q,invalid:c["aria-invalid"]===!0,className:n},K))})},e[13]=c,e[14]=n,e[15]=w):w=e[15];let h;return e[16]!==p||e[17]!==b||e[18]!==u||e[19]!==x||e[20]!==c||e[21]!==g||e[22]!==S||e[23]!==w?(h=t.jsx(Be,{"data-slot":"input-otp",maxLength:u,pattern:x,inputMode:b,autoComplete:p,containerClassName:g,className:S,render:w,...c}),e[16]=p,e[17]=b,e[18]=u,e[19]=x,e[20]=c,e[21]=g,e[22]=S,e[23]=w,e[24]=h):h=e[24],h}function Je(i){const e=oe.c(13),{char:r,placeholderChar:l,hasFakeCaret:u,isActive:c,invalid:n,className:m}=i,d=c||void 0,v=n&&"bg-destructive/10 shadow-[inset_0_0_0_1px_var(--destructive)]";let x;e[0]!==m||e[1]!==v?(x=E("relative flex h-12 w-10 flex-1 items-center justify-center text-xl font-medium tabular-nums text-foreground transition-[background-color,box-shadow]","rounded-[var(--studio-control-radius,var(--radius-lg))] bg-[var(--studio-input-background)] shadow-edge","data-active:shadow-[inset_0_0_0_2px_var(--ring)]",v,m),e[0]=m,e[1]=v,e[2]=x):x=e[2];let b;e[3]!==r||e[4]!==l?(b=r??t.jsx("span",{className:"text-subtle-foreground",children:l}),e[3]=r,e[4]=l,e[5]=b):b=e[5];let p;e[6]!==u?(p=u&&t.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:t.jsx("div",{className:"h-5 w-px animate-pulse bg-foreground"})}),e[6]=u,e[7]=p):p=e[7];let g;return e[8]!==d||e[9]!==x||e[10]!==b||e[11]!==p?(g=t.jsxs("div",{"data-slot":"input-otp-slot","data-active":d,className:x,children:[b,p]}),e[8]=d,e[9]=x,e[10]=b,e[11]=p,e[12]=g):g=e[12],g}const re="font-medium text-[#8CAA25] hover:underline disabled:opacity-50",Qe={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",verifying:"Verifying...",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 Xe({redirectUrl:i,callbackUrl:e="/",title:r,subtitle:l,brand:u,copy:c,variant:n="default",allowedSocialProviders:m,allowPassword:d=!0,onAuthEvent:v,actions:x}){const{emailAndPassword:b,resetPassword:p,emailOtp:g,socialProviders:S}=Pe(),w={...Fe,...x},h=s=>{try{v?.(s)}catch{}},C=n==="compact",U=m?S.providers.filter(s=>m.includes(s.name)):S.providers,q=S.enabled&&U.length>0,K=b.enabled&&(d||!g.enabled&&!q),te=S.enabled&&S.providers.length>0&&!q&&!g.enabled&&!K?S.providers:U,F=S.enabled&&te.length>0,k=b.enabled&&(d||!g.enabled&&!F),[f,A]=N.useState(""),[L,j]=N.useState(""),[le,pe]=N.useState(""),[de,se]=N.useState(""),[Y,ce]=N.useState(!1),[me,Le]=N.useState(()=>g.enabled?"emailOtp":globalThis.localStorage?.getItem("hasLoggedIn")!=="true"?"signUp":"signIn"),[P,D]=N.useState(""),[fe,xe]=N.useState(!1),[Oe,ue]=N.useState(null),a={...Qe,...c},B=N.useId(),z=`${B}-email`,V=`${B}-email-error`,ve=`${B}-name`,be=`${B}-password`,we=`${B}-otp`,ye=`${B}-otp-status`,I=me==="signUp",T=me==="forgotPassword",O=me==="emailOtp",J=ie({mutationFn:async({email:s,password:o,name:R})=>{try{const G=await w.submitEmailPassword({mode:I?"sign_up":"sign_in",email:s,password:o,name:R});if(G.error)throw new Error(G.error.message||(I?a.signUpFailed:a.signInFailed));return G}catch(G){throw G instanceof Error?G:new Error(a.authenticationFailed)}},onMutate:()=>{h({type:"started",method:"email_password",mode:I?"sign_up":"sign_in"})},onSuccess:()=>{h({type:"succeeded",method:"email_password",mode:I?"sign_up":"sign_in"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),w.onAuthenticated(i??e)},onError:s=>{h({type:"failed",method:"email_password",mode:I?"sign_up":"sign_in",stage:"authenticate",error:s instanceof Error?s.message:String(s)}),W(I?"user_signup_failed":"user_signin_failed",{error:s instanceof Error?s.message:String(s)})}}),Q=ie({mutationFn:async({email:s})=>{const o=await w.requestPasswordReset({email:s,redirectTo:"/reset-password"});if(o.error)throw new Error(o.error.message||a.resetEmailFailed);return o},onSuccess:()=>{W("password_reset_requested"),xe(!0)},onError:s=>{W("password_reset_request_failed",{error:s instanceof Error?s.message:String(s)})}}),$=ie({mutationFn:async({email:s})=>{const o=await w.sendOtp({email:s});if(o.error)throw new Error(o.error.message||a.otpSendFailed);return o},onMutate:()=>{h({type:"started",method:"email_otp"})},onSuccess:()=>{h({type:"otp_sent",method:"email_otp"}),W("email_otp_sent"),ce(!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)})}}),_=ie({mutationFn:async({email:s,otp:o})=>{const R=await w.submitOtp({email:s,otp:o});if(R.error)throw new Error(R.error.message||a.invalidCode);return R},onMutate:()=>{h({type:"otp_submitted",method:"email_otp"})},onSuccess:()=>{h({type:"succeeded",method:"email_otp"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),w.onAuthenticated(i??e)},onError:s=>{se(""),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)})}}),ae=s=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s),ge=()=>{f.trim()&&!ae(f)&&D(a.invalidEmail)},Re=s=>{if(s.preventDefault(),!ae(f)){D(a.invalidEmail),h({type:"failed",method:"email_password",mode:I?"sign_up":"sign_in",stage:"validation",error:"invalid_email"});return}J.mutate({email:f,password:L,name:le})},Te=s=>{if(s.preventDefault(),!ae(f)){D(a.invalidEmail);return}Q.mutate({email:f})},$e=s=>{if(s.preventDefault(),!ae(f)){D(a.invalidEmail),h({type:"failed",method:"email_otp",stage:"validation",error:"invalid_email"});return}$.mutate({email:f})},Ee=s=>{_.isPending||_.mutate({email:f,otp:s})},Me=s=>{s.preventDefault(),de.length===g.length&&Ee(de)},We=s=>{se(s),he&&($.reset(),_.reset())},X=s=>o=>{s(o.target.value),Se&&J.reset(),je&&Q.reset(),he&&($.reset(),_.reset()),s===A&&P&&D("")},Z=s=>{Le(s),pe(""),se(""),ce(!1),D(""),xe(!1),ue(null),J.reset(),Q.reset(),$.reset(),_.reset()},y=J.isPending||Q.isPending||$.isPending||_.isPending,Se=J.error,je=Q.error,he=$.error||_.error,H=I?f.trim()&&L.trim()&&le.trim():T||O?f.trim():f.trim()&&L.trim(),Ue=s=>{if(!s)return null;const o=s.message.toLowerCase();return o.includes("unauthorized")||o.includes("401")?a.invalidEmailOrPassword:o.includes("already exists")||o.includes("409")?a.accountExists:o.includes("network")||o.includes("fetch")?a.networkError:o.includes("rate limit")||o.includes("429")?a.tooManyAttempts:o.includes("invalid")&&o.includes("otp")?a.invalidOrExpiredCode:s.message||a.genericError},Ne=Se||je||he||Oe,qe=async s=>{h({type:"started",method:"social",provider:s}),ue(null);try{const o=await w.socialSignIn({provider:s,callbackURL:i??e});if(o.error)throw new Error(o.error.message||a.authenticationFailed)}catch(o){const R=o instanceof Error?o.message:String(o);h({type:"failed",method:"social",provider:s,stage:"redirect",error:R}),W("social_signin_failed",{provider:s,error:R}),ue(o instanceof Error?o:new Error(R))}},De=T?a.resetPasswordTitle:O&&Y?a.verificationCodeTitle:r??a.welcomeTitle,Ce=T?a.resetPasswordSubtitle:O&&Y?a.codeSentTo(f):l===void 0?a.defaultSubtitle:l;return t.jsxs("div",{className:E("grid w-full",C?"gap-5":"gap-10"),children:[u??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:E("font-medium",C?"text-xl leading-7":"text-2xl leading-8"),children:De}),Ce&&t.jsx("p",{className:E("text-muted-foreground",C?"text-sm leading-5":"text-base leading-6"),children:Ce})]}),Ne&&t.jsx("div",{role:"alert",className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:Ue(Ne)}),fe&&t.jsx("div",{role:"status",className:"rounded-xl bg-success/10 p-3 text-sm text-success text-center",children:a.resetEmailSent}),!T&&!(O&&Y)&&F&&t.jsx("div",{className:"grid gap-2",children:te.map(s=>t.jsxs(ne,{type:"button",variant:"outline",size:C?"lg":"xl",disabled:y,onClick:()=>{qe(s.name)},className:"w-full gap-3",children:[s.icon&&t.jsx("img",{src:s.icon,alt:"",className:E("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))}),!T&&!(O&&Y)&&F&&(k||g.enabled)&&t.jsxs("div",{className:E("flex items-center gap-2.5",C?"my-0":"-my-4"),children:[t.jsx("div",{className:"h-px flex-1 bg-border"}),t.jsx("span",{className:E("text-muted-foreground",C?"text-sm":"text-base"),children:a.divider}),t.jsx("div",{className:"h-px flex-1 bg-border"})]}),O&&g.enabled&&t.jsx(t.Fragment,{children:Y?t.jsxs("form",{onSubmit:Me,className:"grid gap-2",children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:we,className:E("text-sm font-medium text-foreground",C&&"sr-only"),children:a.verificationCodeLabel}),t.jsx(Ye,{id:we,length:g.length,value:de,onChange:We,onComplete:Ee,autoFocus:!0,"aria-invalid":!!_.error,"aria-describedby":_.isPending?ye:void 0}),t.jsx("p",{id:ye,role:"status",className:E("text-sm text-muted-foreground",!_.isPending&&"sr-only"),children:_.isPending?a.verifying:""})]}),t.jsx("button",{type:"button",onClick:()=>{ce(!1),se(""),$.reset(),_.reset()},disabled:y,className:"mt-1 text-sm text-muted-foreground transition-colors hover:text-foreground",children:a.useDifferentEmail})]}):t.jsxs("form",{onSubmit:$e,className:E("grid gap-2",C&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:z,className:E("text-sm font-medium text-foreground",C&&"sr-only"),children:a.emailLabel}),t.jsx(ee,{id:z,type:"email",placeholder:a.emailPlaceholder,value:f,onChange:X(A),onBlur:ge,required:!0,disabled:y,autoComplete:"email","aria-invalid":!!P,"aria-describedby":P?V:void 0,className:"h-11"}),P&&t.jsx("p",{id:V,role:"alert",className:"text-xs text-destructive",children:P})]}),t.jsx(ne,{type:"submit",size:C?"lg":"xl",disabled:y||!H,className:E(C?"sm:w-auto":"w-full"),children:y?a.sending:a.sendCode})]})}),T&&k&&!fe&&t.jsxs("form",{onSubmit:Te,className:"grid gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{htmlFor:z,className:"block text-sm font-medium text-foreground mb-2",children:a.emailLabel}),t.jsx(ee,{id:z,type:"email",placeholder:"you@example.com",value:f,onChange:X(A),onBlur:ge,required:!0,disabled:y,autoComplete:"email","aria-invalid":!!P,"aria-describedby":P?V:void 0,className:"h-11"}),P&&t.jsx("p",{id:V,role:"alert",className:"text-xs text-destructive mt-1.5",children:P})]}),t.jsx(ne,{type:"submit",disabled:y||!H,className:"w-full font-semibold",size:"xl",children:y?a.sending:a.sendResetLink})]}),!T&&!O&&k&&t.jsxs("form",{onSubmit:Re,className:"grid gap-5",children:[I&&t.jsxs("div",{children:[t.jsx("label",{htmlFor:ve,className:"block text-sm font-medium text-foreground mb-2",children:a.nameLabel}),t.jsx(ee,{id:ve,type:"text",placeholder:a.namePlaceholder,value:le,onChange:X(pe),required:!0,disabled:y,autoComplete:"name",className:"h-11"})]}),t.jsxs("div",{children:[t.jsx("label",{htmlFor:z,className:"block text-sm font-medium text-foreground mb-2",children:a.emailLabel}),t.jsx(ee,{id:z,type:"email",placeholder:"you@example.com",value:f,onChange:X(A),onBlur:ge,required:!0,disabled:y,autoComplete:"email","aria-invalid":!!P,"aria-describedby":P?V:void 0,className:"h-11"}),P&&t.jsx("p",{id:V,role:"alert",className:"text-xs text-destructive mt-1.5",children:P})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("label",{htmlFor:be,className:"block text-sm font-medium text-foreground",children:a.passwordLabel}),!I&&p.enabled&&t.jsx("button",{type:"button",onClick:()=>Z("forgotPassword"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:a.forgotPassword})]}),t.jsx(ee,{id:be,type:"password",placeholder:"••••••••",value:L,onChange:X(j),required:!0,disabled:y,autoComplete:I?"new-password":"current-password",className:"h-11"})]}),t.jsx("div",{className:E("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",H?"max-h-[100px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:t.jsx("div",{className:E("p-1",!H&&"pointer-events-none"),children:t.jsx(ne,{type:"submit",disabled:y||!H,className:E("w-full font-semibold"),size:"xl","aria-hidden":!H,children:y?I?a.creatingAccount:a.signingIn:a.continue})})})]}),t.jsx("div",{className:"text-sm text-muted-foreground",children:T?t.jsx("button",{type:"button",onClick:()=>Z("signIn"),disabled:y,className:re,children:a.backToSignIn}):O&&k?t.jsx("button",{type:"button",onClick:()=>Z("signIn"),disabled:y,className:re,children:a.signInWithPassword}):!O&&k?t.jsxs(t.Fragment,{children:[I?a.alreadyHaveAccount:a.dontHaveAccount,t.jsx("button",{type:"button",onClick:()=>Z(I?"signIn":"signUp"),disabled:y,className:re,children:I?a.signIn:a.signUp}),g.enabled&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"mx-2",children:"·"}),t.jsx("button",{type:"button",onClick:()=>Z("emailOtp"),disabled:y,className:re,children:a.signInWithEmailCode})]})]}):null})]})}class Ie{constructor(e){this.response=e}response}function Ze(i){return i.startsWith("/")&&!i.startsWith("//")&&!i.startsWith("/\\")?i:"/"}function et({redirectTo:i,onAuthEvent:e}){const r=_e(),[l,u]=N.useState(null),c=N.useEffectEvent(n=>{try{e?.(n)}catch{}});return N.useEffect(()=>{let n=!1;return(async()=>{c({type:"started",method:"local"});try{let m;try{m=await Ke(async()=>{const d=await fetch("/api/auth/custom/local-session",{method:"POST",credentials:"include"});if(d.status>=500)throw new Ie(d);return d},{maxAttempts:5,minTimeout:1e3,maxTimeout:1e4,multiplier:2,jitter:0})}catch(d){if(d instanceof Ae&&d.cause instanceof Ie)m=d.cause.response;else throw d}if(!m.ok){const d=await m.json().catch(()=>({}));throw new Error(d?.error||r("common.authEntry.autoLoginFailed"))}n||(c({type:"succeeded",method:"local"}),window.location.href=Ze(i))}catch(m){n||(c({type:"failed",method:"local",stage:"authenticate",error:m instanceof Error?m.message:String(m)}),u(m instanceof Error?m.message:r("common.authEntry.autoLoginFailed")))}})(),()=>{n=!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:r("common.authEntry.autoLoginFailedWithError",{error:l})}),t.jsx("p",{className:"text-muted-foreground text-sm",children:r("common.authEntry.tryRestartingServer")})]})}):t.jsx(ke,{})}function ke(){const i=oe.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(Ve,{size:"lg",label:"Signing in"})}),i[0]=e):e=i[0],e}function tt({callbackURL:i,providerId:e,ssoSignIn:r,onAuthEvent:l}){const u=N.useEffectEvent(n=>{try{l?.(n)}catch{}}),c=N.useEffectEvent(r);return N.useEffect(()=>{(async()=>{u({type:"started",method:"sso",provider:e});try{const n=await c({providerId:e,callbackURL:i});if(n.error)throw new Error(n.error.message||"SSO redirect failed")}catch(n){u({type:"failed",method:"sso",provider:e,stage:"redirect",error:n instanceof Error?n.message:String(n)})}})()},[e,i]),t.jsx(ke,{})}function nt(i){const e=oe.c(25),{callbackUrl:r,redirectUrl:l,allowAutoLogin:u,title:c,subtitle:n,brand:m,copy:d,variant:v,allowedSocialProviders:x,allowPassword:b,onAuthEvent:p,onAuthenticated:g}=i,S=u===void 0?!0:u,w=_e(),{sso:h,emailAndPassword:C,magicLink:U,emailOtp:q,socialProviders:K,localMode:te}=Pe(),F=l||r;let k;e[0]!==g?(k=g?{onAuthenticated:g}:void 0,e[0]=g,e[1]=k):k=e[1];const f=k;if(te&&S){let j;return e[2]!==p||e[3]!==F?(j=t.jsx(et,{redirectTo:F,onAuthEvent:p}),e[2]=p,e[3]=F,e[4]=j):j=e[4],j}if(h.enabled){let j;return e[5]!==p||e[6]!==F||e[7]!==h.providerId?(j=t.jsx(tt,{callbackURL:F,providerId:h.providerId,ssoSignIn:Fe.ssoSignIn,onAuthEvent:p}),e[5]=p,e[6]=F,e[7]=h.providerId,e[8]=j):j=e[8],j}if(C.enabled||U.enabled||q.enabled||K.enabled){let j;return e[9]!==b||e[10]!==x||e[11]!==m||e[12]!==r||e[13]!==f||e[14]!==d||e[15]!==p||e[16]!==l||e[17]!==n||e[18]!==c||e[19]!==v?(j=t.jsx(Xe,{redirectUrl:l,callbackUrl:r,title:c,subtitle:n,brand:m,copy:d,variant:v,allowedSocialProviders:x,allowPassword:b,onAuthEvent:p,actions:f}),e[9]=b,e[10]=x,e[11]=m,e[12]=r,e[13]=f,e[14]=d,e[15]=p,e[16]=l,e[17]=n,e[18]=c,e[19]=v,e[20]=j):j=e[20],j}let A;e[21]!==w?(A=w("common.authEntry.noLoginOptions"),e[21]=w,e[22]=A):A=e[22];let L;return e[23]!==A?(L=t.jsx("div",{children:A}),e[23]=A,e[24]=L):L=e[24],L}export{ke as A,nt as a};
|
|
1
|
+
import{a as M,c as oe,m as E,j as t,a3 as Be,a4 as ze,a5 as Pe,r as N,e as ie,E as W,B as ne,I as ee,b as _e,h as Ve}from"./index-_VeebRNE.js";import{e as He}from"./backoff-CrEUbyZT.js";import{d as Ge}from"./delay-CnY5UFtP.js";class Ae extends Error{constructor(e,r){super(`Retrying exceeded the maxAttempts (${r}).`),this.name="RetryError",this.cause=e}}async function Ke(i,e){const{multiplier:r=2,maxTimeout:l=6e4,maxAttempts:u=5,minTimeout:c=1e3,jitter:n=1,isRetriable:m=()=>!0,signal:d}=e??{};if(!Number.isInteger(u)||u<1)throw new RangeError(`Cannot retry as 'maxAttempts' must be a positive integer: current value is ${u}`);if(!Number.isFinite(r)||r<1)throw new RangeError(`Cannot retry as 'multiplier' must be a finite number >= 1: current value is ${r}`);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(c)||c<0)throw new RangeError(`Cannot retry as 'minTimeout' must be >= 0: current value is ${c}`);if(c>l)throw new RangeError(`Cannot retry as 'minTimeout' must be <= 'maxTimeout': current values 'minTimeout=${c}', 'maxTimeout=${l}'`);if(Number.isNaN(n)||n<0||n>1)throw new RangeError(`Cannot retry as 'jitter' must be between 0 and 1: current value is ${n}`);let v=0;for(;;){d?.throwIfAborted();try{return await i()}catch(x){if(!m(x))throw x;if(v+1>=u)throw new Ae(x,u);const b=He(l,c,v,r,n);await Ge(b,d?{signal:d}:void 0)}v++}}const Fe={submitEmailPassword:({mode:i,email:e,password:r,name:l})=>i==="sign_up"?M.signUp.email({email:e,password:r,name:l||""}):M.signIn.email({email:e,password:r}),requestPasswordReset:({email:i,redirectTo:e})=>M.requestPasswordReset({email:i,redirectTo:e}),sendOtp:({email:i})=>M.emailOtp.sendVerificationOtp({email:i,type:"sign-in"}),submitOtp:({email:i,otp:e})=>M.signIn.emailOtp({email:i,otp:e}),socialSignIn:({provider:i,callbackURL:e})=>M.signIn.social({provider:i,callbackURL:e}),ssoSignIn:({providerId:i,callbackURL:e})=>M.signIn.sso({providerId:i,callbackURL:e}),onAuthenticated:i=>{window.location.href=i}};function Ye(i){const e=oe.c(25);let r,l,u,c,n,m,d,v;e[0]!==i?({length:u,className:r,containerClassName:l,slotClassName:n,pattern:m,inputMode:d,autoComplete:v,...c}=i,e[0]=i,e[1]=r,e[2]=l,e[3]=u,e[4]=c,e[5]=n,e[6]=m,e[7]=d,e[8]=v):(r=e[1],l=e[2],u=e[3],c=e[4],n=e[5],m=e[6],d=e[7],v=e[8]);const x=m===void 0?ze:m,b=d===void 0?"numeric":d,p=v===void 0?"one-time-code":v;let g;e[9]!==l?(g=E("flex items-center gap-2 has-[:disabled]:opacity-50",l),e[9]=l,e[10]=g):g=e[10];let S;e[11]!==r?(S=E("disabled:cursor-not-allowed",r),e[11]=r,e[12]=S):S=e[12];let w;e[13]!==c||e[14]!==n?(w=C=>{const{slots:U}=C;return t.jsx(t.Fragment,{children:U.map((q,K)=>t.jsx(Je,{...q,invalid:c["aria-invalid"]===!0,className:n},K))})},e[13]=c,e[14]=n,e[15]=w):w=e[15];let h;return e[16]!==p||e[17]!==b||e[18]!==u||e[19]!==x||e[20]!==c||e[21]!==g||e[22]!==S||e[23]!==w?(h=t.jsx(Be,{"data-slot":"input-otp",maxLength:u,pattern:x,inputMode:b,autoComplete:p,containerClassName:g,className:S,render:w,...c}),e[16]=p,e[17]=b,e[18]=u,e[19]=x,e[20]=c,e[21]=g,e[22]=S,e[23]=w,e[24]=h):h=e[24],h}function Je(i){const e=oe.c(13),{char:r,placeholderChar:l,hasFakeCaret:u,isActive:c,invalid:n,className:m}=i,d=c||void 0,v=n&&"bg-destructive/10 shadow-[inset_0_0_0_1px_var(--destructive)]";let x;e[0]!==m||e[1]!==v?(x=E("relative flex h-12 w-10 flex-1 items-center justify-center text-xl font-medium tabular-nums text-foreground transition-[background-color,box-shadow]","rounded-[var(--studio-control-radius,var(--radius-lg))] bg-[var(--studio-input-background)] shadow-edge","data-active:shadow-[inset_0_0_0_2px_var(--ring)]",v,m),e[0]=m,e[1]=v,e[2]=x):x=e[2];let b;e[3]!==r||e[4]!==l?(b=r??t.jsx("span",{className:"text-subtle-foreground",children:l}),e[3]=r,e[4]=l,e[5]=b):b=e[5];let p;e[6]!==u?(p=u&&t.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:t.jsx("div",{className:"h-5 w-px animate-pulse bg-foreground"})}),e[6]=u,e[7]=p):p=e[7];let g;return e[8]!==d||e[9]!==x||e[10]!==b||e[11]!==p?(g=t.jsxs("div",{"data-slot":"input-otp-slot","data-active":d,className:x,children:[b,p]}),e[8]=d,e[9]=x,e[10]=b,e[11]=p,e[12]=g):g=e[12],g}const re="font-medium text-[#8CAA25] hover:underline disabled:opacity-50",Qe={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",verifying:"Verifying...",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 Xe({redirectUrl:i,callbackUrl:e="/",title:r,subtitle:l,brand:u,copy:c,variant:n="default",allowedSocialProviders:m,allowPassword:d=!0,onAuthEvent:v,actions:x}){const{emailAndPassword:b,resetPassword:p,emailOtp:g,socialProviders:S}=Pe(),w={...Fe,...x},h=s=>{try{v?.(s)}catch{}},C=n==="compact",U=m?S.providers.filter(s=>m.includes(s.name)):S.providers,q=S.enabled&&U.length>0,K=b.enabled&&(d||!g.enabled&&!q),te=S.enabled&&S.providers.length>0&&!q&&!g.enabled&&!K?S.providers:U,F=S.enabled&&te.length>0,k=b.enabled&&(d||!g.enabled&&!F),[f,A]=N.useState(""),[L,j]=N.useState(""),[le,pe]=N.useState(""),[de,se]=N.useState(""),[Y,ce]=N.useState(!1),[me,Le]=N.useState(()=>g.enabled?"emailOtp":globalThis.localStorage?.getItem("hasLoggedIn")!=="true"?"signUp":"signIn"),[P,D]=N.useState(""),[fe,xe]=N.useState(!1),[Oe,ue]=N.useState(null),a={...Qe,...c},B=N.useId(),z=`${B}-email`,V=`${B}-email-error`,ve=`${B}-name`,be=`${B}-password`,we=`${B}-otp`,ye=`${B}-otp-status`,I=me==="signUp",T=me==="forgotPassword",O=me==="emailOtp",J=ie({mutationFn:async({email:s,password:o,name:R})=>{try{const G=await w.submitEmailPassword({mode:I?"sign_up":"sign_in",email:s,password:o,name:R});if(G.error)throw new Error(G.error.message||(I?a.signUpFailed:a.signInFailed));return G}catch(G){throw G instanceof Error?G:new Error(a.authenticationFailed)}},onMutate:()=>{h({type:"started",method:"email_password",mode:I?"sign_up":"sign_in"})},onSuccess:()=>{h({type:"succeeded",method:"email_password",mode:I?"sign_up":"sign_in"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),w.onAuthenticated(i??e)},onError:s=>{h({type:"failed",method:"email_password",mode:I?"sign_up":"sign_in",stage:"authenticate",error:s instanceof Error?s.message:String(s)}),W(I?"user_signup_failed":"user_signin_failed",{error:s instanceof Error?s.message:String(s)})}}),Q=ie({mutationFn:async({email:s})=>{const o=await w.requestPasswordReset({email:s,redirectTo:"/reset-password"});if(o.error)throw new Error(o.error.message||a.resetEmailFailed);return o},onSuccess:()=>{W("password_reset_requested"),xe(!0)},onError:s=>{W("password_reset_request_failed",{error:s instanceof Error?s.message:String(s)})}}),$=ie({mutationFn:async({email:s})=>{const o=await w.sendOtp({email:s});if(o.error)throw new Error(o.error.message||a.otpSendFailed);return o},onMutate:()=>{h({type:"started",method:"email_otp"})},onSuccess:()=>{h({type:"otp_sent",method:"email_otp"}),W("email_otp_sent"),ce(!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)})}}),_=ie({mutationFn:async({email:s,otp:o})=>{const R=await w.submitOtp({email:s,otp:o});if(R.error)throw new Error(R.error.message||a.invalidCode);return R},onMutate:()=>{h({type:"otp_submitted",method:"email_otp"})},onSuccess:()=>{h({type:"succeeded",method:"email_otp"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),w.onAuthenticated(i??e)},onError:s=>{se(""),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)})}}),ae=s=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s),ge=()=>{f.trim()&&!ae(f)&&D(a.invalidEmail)},Re=s=>{if(s.preventDefault(),!ae(f)){D(a.invalidEmail),h({type:"failed",method:"email_password",mode:I?"sign_up":"sign_in",stage:"validation",error:"invalid_email"});return}J.mutate({email:f,password:L,name:le})},Te=s=>{if(s.preventDefault(),!ae(f)){D(a.invalidEmail);return}Q.mutate({email:f})},$e=s=>{if(s.preventDefault(),!ae(f)){D(a.invalidEmail),h({type:"failed",method:"email_otp",stage:"validation",error:"invalid_email"});return}$.mutate({email:f})},Ee=s=>{_.isPending||_.mutate({email:f,otp:s})},Me=s=>{s.preventDefault(),de.length===g.length&&Ee(de)},We=s=>{se(s),he&&($.reset(),_.reset())},X=s=>o=>{s(o.target.value),Se&&J.reset(),je&&Q.reset(),he&&($.reset(),_.reset()),s===A&&P&&D("")},Z=s=>{Le(s),pe(""),se(""),ce(!1),D(""),xe(!1),ue(null),J.reset(),Q.reset(),$.reset(),_.reset()},y=J.isPending||Q.isPending||$.isPending||_.isPending,Se=J.error,je=Q.error,he=$.error||_.error,H=I?f.trim()&&L.trim()&&le.trim():T||O?f.trim():f.trim()&&L.trim(),Ue=s=>{if(!s)return null;const o=s.message.toLowerCase();return o.includes("unauthorized")||o.includes("401")?a.invalidEmailOrPassword:o.includes("already exists")||o.includes("409")?a.accountExists:o.includes("network")||o.includes("fetch")?a.networkError:o.includes("rate limit")||o.includes("429")?a.tooManyAttempts:o.includes("invalid")&&o.includes("otp")?a.invalidOrExpiredCode:s.message||a.genericError},Ne=Se||je||he||Oe,qe=async s=>{h({type:"started",method:"social",provider:s}),ue(null);try{const o=await w.socialSignIn({provider:s,callbackURL:i??e});if(o.error)throw new Error(o.error.message||a.authenticationFailed)}catch(o){const R=o instanceof Error?o.message:String(o);h({type:"failed",method:"social",provider:s,stage:"redirect",error:R}),W("social_signin_failed",{provider:s,error:R}),ue(o instanceof Error?o:new Error(R))}},De=T?a.resetPasswordTitle:O&&Y?a.verificationCodeTitle:r??a.welcomeTitle,Ce=T?a.resetPasswordSubtitle:O&&Y?a.codeSentTo(f):l===void 0?a.defaultSubtitle:l;return t.jsxs("div",{className:E("grid w-full",C?"gap-5":"gap-10"),children:[u??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:E("font-medium",C?"text-xl leading-7":"text-2xl leading-8"),children:De}),Ce&&t.jsx("p",{className:E("text-muted-foreground",C?"text-sm leading-5":"text-base leading-6"),children:Ce})]}),Ne&&t.jsx("div",{role:"alert",className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:Ue(Ne)}),fe&&t.jsx("div",{role:"status",className:"rounded-xl bg-success/10 p-3 text-sm text-success text-center",children:a.resetEmailSent}),!T&&!(O&&Y)&&F&&t.jsx("div",{className:"grid gap-2",children:te.map(s=>t.jsxs(ne,{type:"button",variant:"outline",size:C?"lg":"xl",disabled:y,onClick:()=>{qe(s.name)},className:"w-full gap-3",children:[s.icon&&t.jsx("img",{src:s.icon,alt:"",className:E("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))}),!T&&!(O&&Y)&&F&&(k||g.enabled)&&t.jsxs("div",{className:E("flex items-center gap-2.5",C?"my-0":"-my-4"),children:[t.jsx("div",{className:"h-px flex-1 bg-border"}),t.jsx("span",{className:E("text-muted-foreground",C?"text-sm":"text-base"),children:a.divider}),t.jsx("div",{className:"h-px flex-1 bg-border"})]}),O&&g.enabled&&t.jsx(t.Fragment,{children:Y?t.jsxs("form",{onSubmit:Me,className:"grid gap-2",children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:we,className:E("text-sm font-medium text-foreground",C&&"sr-only"),children:a.verificationCodeLabel}),t.jsx(Ye,{id:we,length:g.length,value:de,onChange:We,onComplete:Ee,autoFocus:!0,"aria-invalid":!!_.error,"aria-describedby":_.isPending?ye:void 0}),t.jsx("p",{id:ye,role:"status",className:E("text-sm text-muted-foreground",!_.isPending&&"sr-only"),children:_.isPending?a.verifying:""})]}),t.jsx("button",{type:"button",onClick:()=>{ce(!1),se(""),$.reset(),_.reset()},disabled:y,className:"mt-1 text-sm text-muted-foreground transition-colors hover:text-foreground",children:a.useDifferentEmail})]}):t.jsxs("form",{onSubmit:$e,className:E("grid gap-2",C&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:z,className:E("text-sm font-medium text-foreground",C&&"sr-only"),children:a.emailLabel}),t.jsx(ee,{id:z,type:"email",placeholder:a.emailPlaceholder,value:f,onChange:X(A),onBlur:ge,required:!0,disabled:y,autoComplete:"email","aria-invalid":!!P,"aria-describedby":P?V:void 0,className:"h-11"}),P&&t.jsx("p",{id:V,role:"alert",className:"text-xs text-destructive",children:P})]}),t.jsx(ne,{type:"submit",size:C?"lg":"xl",disabled:y||!H,className:E(C?"sm:w-auto":"w-full"),children:y?a.sending:a.sendCode})]})}),T&&k&&!fe&&t.jsxs("form",{onSubmit:Te,className:"grid gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{htmlFor:z,className:"block text-sm font-medium text-foreground mb-2",children:a.emailLabel}),t.jsx(ee,{id:z,type:"email",placeholder:"you@example.com",value:f,onChange:X(A),onBlur:ge,required:!0,disabled:y,autoComplete:"email","aria-invalid":!!P,"aria-describedby":P?V:void 0,className:"h-11"}),P&&t.jsx("p",{id:V,role:"alert",className:"text-xs text-destructive mt-1.5",children:P})]}),t.jsx(ne,{type:"submit",disabled:y||!H,className:"w-full font-semibold",size:"xl",children:y?a.sending:a.sendResetLink})]}),!T&&!O&&k&&t.jsxs("form",{onSubmit:Re,className:"grid gap-5",children:[I&&t.jsxs("div",{children:[t.jsx("label",{htmlFor:ve,className:"block text-sm font-medium text-foreground mb-2",children:a.nameLabel}),t.jsx(ee,{id:ve,type:"text",placeholder:a.namePlaceholder,value:le,onChange:X(pe),required:!0,disabled:y,autoComplete:"name",className:"h-11"})]}),t.jsxs("div",{children:[t.jsx("label",{htmlFor:z,className:"block text-sm font-medium text-foreground mb-2",children:a.emailLabel}),t.jsx(ee,{id:z,type:"email",placeholder:"you@example.com",value:f,onChange:X(A),onBlur:ge,required:!0,disabled:y,autoComplete:"email","aria-invalid":!!P,"aria-describedby":P?V:void 0,className:"h-11"}),P&&t.jsx("p",{id:V,role:"alert",className:"text-xs text-destructive mt-1.5",children:P})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("label",{htmlFor:be,className:"block text-sm font-medium text-foreground",children:a.passwordLabel}),!I&&p.enabled&&t.jsx("button",{type:"button",onClick:()=>Z("forgotPassword"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:a.forgotPassword})]}),t.jsx(ee,{id:be,type:"password",placeholder:"••••••••",value:L,onChange:X(j),required:!0,disabled:y,autoComplete:I?"new-password":"current-password",className:"h-11"})]}),t.jsx("div",{className:E("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",H?"max-h-[100px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:t.jsx("div",{className:E("p-1",!H&&"pointer-events-none"),children:t.jsx(ne,{type:"submit",disabled:y||!H,className:E("w-full font-semibold"),size:"xl","aria-hidden":!H,children:y?I?a.creatingAccount:a.signingIn:a.continue})})})]}),t.jsx("div",{className:"text-sm text-muted-foreground",children:T?t.jsx("button",{type:"button",onClick:()=>Z("signIn"),disabled:y,className:re,children:a.backToSignIn}):O&&k?t.jsx("button",{type:"button",onClick:()=>Z("signIn"),disabled:y,className:re,children:a.signInWithPassword}):!O&&k?t.jsxs(t.Fragment,{children:[I?a.alreadyHaveAccount:a.dontHaveAccount,t.jsx("button",{type:"button",onClick:()=>Z(I?"signIn":"signUp"),disabled:y,className:re,children:I?a.signIn:a.signUp}),g.enabled&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"mx-2",children:"·"}),t.jsx("button",{type:"button",onClick:()=>Z("emailOtp"),disabled:y,className:re,children:a.signInWithEmailCode})]})]}):null})]})}class Ie{constructor(e){this.response=e}response}function Ze(i){return i.startsWith("/")&&!i.startsWith("//")&&!i.startsWith("/\\")?i:"/"}function et({redirectTo:i,onAuthEvent:e}){const r=_e(),[l,u]=N.useState(null),c=N.useEffectEvent(n=>{try{e?.(n)}catch{}});return N.useEffect(()=>{let n=!1;return(async()=>{c({type:"started",method:"local"});try{let m;try{m=await Ke(async()=>{const d=await fetch("/api/auth/custom/local-session",{method:"POST",credentials:"include"});if(d.status>=500)throw new Ie(d);return d},{maxAttempts:5,minTimeout:1e3,maxTimeout:1e4,multiplier:2,jitter:0})}catch(d){if(d instanceof Ae&&d.cause instanceof Ie)m=d.cause.response;else throw d}if(!m.ok){const d=await m.json().catch(()=>({}));throw new Error(d?.error||r("common.authEntry.autoLoginFailed"))}n||(c({type:"succeeded",method:"local"}),window.location.href=Ze(i))}catch(m){n||(c({type:"failed",method:"local",stage:"authenticate",error:m instanceof Error?m.message:String(m)}),u(m instanceof Error?m.message:r("common.authEntry.autoLoginFailed")))}})(),()=>{n=!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:r("common.authEntry.autoLoginFailedWithError",{error:l})}),t.jsx("p",{className:"text-muted-foreground text-sm",children:r("common.authEntry.tryRestartingServer")})]})}):t.jsx(ke,{})}function ke(){const i=oe.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(Ve,{size:"lg",label:"Signing in"})}),i[0]=e):e=i[0],e}function tt({callbackURL:i,providerId:e,ssoSignIn:r,onAuthEvent:l}){const u=N.useEffectEvent(n=>{try{l?.(n)}catch{}}),c=N.useEffectEvent(r);return N.useEffect(()=>{(async()=>{u({type:"started",method:"sso",provider:e});try{const n=await c({providerId:e,callbackURL:i});if(n.error)throw new Error(n.error.message||"SSO redirect failed")}catch(n){u({type:"failed",method:"sso",provider:e,stage:"redirect",error:n instanceof Error?n.message:String(n)})}})()},[e,i]),t.jsx(ke,{})}function nt(i){const e=oe.c(25),{callbackUrl:r,redirectUrl:l,allowAutoLogin:u,title:c,subtitle:n,brand:m,copy:d,variant:v,allowedSocialProviders:x,allowPassword:b,onAuthEvent:p,onAuthenticated:g}=i,S=u===void 0?!0:u,w=_e(),{sso:h,emailAndPassword:C,magicLink:U,emailOtp:q,socialProviders:K,localMode:te}=Pe(),F=l||r;let k;e[0]!==g?(k=g?{onAuthenticated:g}:void 0,e[0]=g,e[1]=k):k=e[1];const f=k;if(te&&S){let j;return e[2]!==p||e[3]!==F?(j=t.jsx(et,{redirectTo:F,onAuthEvent:p}),e[2]=p,e[3]=F,e[4]=j):j=e[4],j}if(h.enabled){let j;return e[5]!==p||e[6]!==F||e[7]!==h.providerId?(j=t.jsx(tt,{callbackURL:F,providerId:h.providerId,ssoSignIn:Fe.ssoSignIn,onAuthEvent:p}),e[5]=p,e[6]=F,e[7]=h.providerId,e[8]=j):j=e[8],j}if(C.enabled||U.enabled||q.enabled||K.enabled){let j;return e[9]!==b||e[10]!==x||e[11]!==m||e[12]!==r||e[13]!==f||e[14]!==d||e[15]!==p||e[16]!==l||e[17]!==n||e[18]!==c||e[19]!==v?(j=t.jsx(Xe,{redirectUrl:l,callbackUrl:r,title:c,subtitle:n,brand:m,copy:d,variant:v,allowedSocialProviders:x,allowPassword:b,onAuthEvent:p,actions:f}),e[9]=b,e[10]=x,e[11]=m,e[12]=r,e[13]=f,e[14]=d,e[15]=p,e[16]=l,e[17]=n,e[18]=c,e[19]=v,e[20]=j):j=e[20],j}let A;e[21]!==w?(A=w("common.authEntry.noLoginOptions"),e[21]=w,e[22]=A):A=e[22];let L;return e[23]!==A?(L=t.jsx("div",{children:A}),e[23]=A,e[24]=L):L=e[24],L}export{ke as A,nt as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as g,m as p,j as f}from"./index-
|
|
1
|
+
import{c as g,m as p,j as f}from"./index-_VeebRNE.js";function w(b){const e=g.c(20),{children:m,visual:r,align:j}=b,d=(j===void 0?"center":j)==="fill",x=d?"min-h-[100dvh] md:min-h-screen":"min-h-screen";let l;e[0]!==x?(l=p("flex w-full",x),e[0]=x,e[1]=l):l=e[1];const h=d?"h-[100dvh] justify-start pt-4 pb-8 md:h-auto":"justify-center py-6";let t;e[2]!==h?(t=p("flex flex-1 flex-col items-center bg-sidebar px-6 md:justify-center md:px-10 md:py-10",h),e[2]=h,e[3]=t):t=e[3];const u=d&&"flex min-h-0 flex-1 flex-col md:block md:flex-none";let s;e[4]!==u?(s=p("w-full max-w-[440px]",u),e[4]=u,e[5]=s):s=e[5];let i;e[6]!==m||e[7]!==s?(i=f.jsx("div",{className:s,children:m}),e[6]=m,e[7]=s,e[8]=i):i=e[8];let n;e[9]!==t||e[10]!==i?(n=f.jsx("section",{className:t,children:i}),e[9]=t,e[10]=i,e[11]=n):n=e[11];let c;e[12]!==r?(c=r??f.jsx("img",{src:"/onboarding-placeholder.png",alt:"",className:"absolute inset-0 h-full w-full object-cover"}),e[12]=r,e[13]=c):c=e[13];let a;e[14]!==c?(a=f.jsx("aside",{className:"relative hidden flex-1 overflow-hidden bg-muted md:flex",children:c}),e[14]=c,e[15]=a):a=e[15];let o;return e[16]!==a||e[17]!==l||e[18]!==n?(o=f.jsxs("main",{className:l,children:[n,a]}),e[16]=a,e[17]=l,e[18]=n,e[19]=o):o=e[19],o}export{w as A};
|