decocms 4.325.2 → 4.325.4
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-B0exjy2G.js → AlertCircle-BZibQS6l.js} +1 -1
- package/dist/client/assets/{AreaChart-BbyZpwNl.js → AreaChart-DwclBQnZ.js} +1 -1
- package/dist/client/assets/{ArrowLeft-DDVITG8K.js → ArrowLeft-1ioAxcgp.js} +1 -1
- package/dist/client/assets/{ArrowUp-DY0nxQiU.js → ArrowUp-DxWROabW.js} +1 -1
- package/dist/client/assets/{Check-DFnPCTEg.js → Check-C9k3b0xF.js} +1 -1
- package/dist/client/assets/{CheckCircle-DLOuSHro.js → CheckCircle-E6Bt207M.js} +1 -1
- package/dist/client/assets/{ChevronRight-BcTQG1DI.js → ChevronRight-BhkB_Th7.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-DMK3FCxp.js → ChevronSelectorVertical-BEXVc_wK.js} +1 -1
- package/dist/client/assets/{ChevronUp-CVSn4-gi.js → ChevronUp-D2wB8a9j.js} +1 -1
- package/dist/client/assets/{Copy01-DXf2ReD_.js → Copy01-Bx16MZFI.js} +1 -1
- package/dist/client/assets/{CreditCard01-Dufq2QQE.js → CreditCard01-BcvswQbc.js} +1 -1
- package/dist/client/assets/{DotsVertical-CqFpz0HG.js → DotsVertical-DoCfmL61.js} +1 -1
- package/dist/client/assets/{Download01-GnhueTng.js → Download01-BLz55nuh.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-7Y0x3JBZ.js → ErrorBarContext-2cOYCebz.js} +1 -1
- package/dist/client/assets/{Eye-CHLagXa7.js → Eye-BZLIrwb8.js} +1 -1
- package/dist/client/assets/{GitBranch01-CQRzbSyx.js → GitBranch01-C1N5u-hF.js} +1 -1
- package/dist/client/assets/{Globe01-DyhA33s1.js → Globe01-C6vdj6_t.js} +1 -1
- package/dist/client/assets/{HardDrive-eC4I4aqw.js → HardDrive-BlJm1PU-.js} +1 -1
- package/dist/client/assets/{Image01-D6KzR28r.js → Image01-CXwPO47D.js} +1 -1
- package/dist/client/assets/{Key01-CNitiCfD.js → Key01-Jj8g7um1.js} +1 -1
- package/dist/client/assets/{Link01-BHe0dd0_.js → Link01-Bttvkt0n.js} +1 -1
- package/dist/client/assets/{LinkExternal01-CvQ-ylaK.js → LinkExternal01-Cz00pZ6m.js} +1 -1
- package/dist/client/assets/{Monitor01-SbvebE9T.js → Monitor01-Dar1Xf9i.js} +1 -1
- package/dist/client/assets/{Package-BIDQhscg.js → Package-D6f7Gz9h.js} +1 -1
- package/dist/client/assets/{Palette-DgVW07vN.js → Palette-BLqAE5nC.js} +1 -1
- package/dist/client/assets/{Play-CR4MAXKW.js → Play-BVR395V8.js} +1 -1
- package/dist/client/assets/{Plus-D-mogJXC.js → Plus-CZ_I_jMH.js} +1 -1
- package/dist/client/assets/{SearchMd-BYpvO9Ao.js → SearchMd-CuLT9xTw.js} +1 -1
- package/dist/client/assets/{Sector-CorkPUdM.js → Sector-CVQFpr4C.js} +1 -1
- package/dist/client/assets/{Settings02-B2gnPQ3Q.js → Settings02-Et0xZ0an.js} +1 -1
- package/dist/client/assets/{Share07-Bu5e840D.js → Share07-C5MjGLbI.js} +1 -1
- package/dist/client/assets/{Shield01-BAHmK5_B.js → Shield01-Bz4qlfhz.js} +1 -1
- package/dist/client/assets/{Stars01-CCTPiWmK.js → Stars01-CvUPzrhu.js} +1 -1
- package/dist/client/assets/{Sun-aWHPBk6T.js → Sun-C4_6mK-D.js} +1 -1
- package/dist/client/assets/{Tool01-DbPhfEvg.js → Tool01-DlLdz7vO.js} +1 -1
- package/dist/client/assets/{Tool02-8qVRgTeE.js → Tool02-DIx6fYLD.js} +1 -1
- package/dist/client/assets/{Trash01-CV8Q1VzZ.js → Trash01-BNSeiqMU.js} +1 -1
- package/dist/client/assets/{TrendUp01-yPe3UG0T.js → TrendUp01-BBMfE0el.js} +1 -1
- package/dist/client/assets/{Upload01-B1Qytz_u.js → Upload01-kh3Bw8YA.js} +1 -1
- package/dist/client/assets/{User01-DmJKrYPV.js → User01-B3uv9Rr7.js} +1 -1
- package/dist/client/assets/{UserSquare-HSvWRq_9.js → UserSquare-DWl0WT5G.js} +1 -1
- package/dist/client/assets/{Users01-B4HgX8Cb.js → Users01-CQxnQ5jK.js} +1 -1
- package/dist/client/assets/{Users03-CMpVHpdR.js → Users03-Cnoyj4yB.js} +1 -1
- package/dist/client/assets/{XCircle-BN22j-Jn.js → XCircle-DnGzeVrl.js} +1 -1
- package/dist/client/assets/{XClose-N8lMtUXr.js → XClose-DBV4Myez.js} +1 -1
- package/dist/client/assets/{Zap-BMyl5tLM.js → Zap-Ba59qw7p.js} +1 -1
- package/dist/client/assets/{ZoomOut-BUSsAg6c.js → ZoomOut-CVaJEeGI.js} +1 -1
- package/dist/client/assets/{access-gate-BsoMn5at.js → access-gate-CbdSvI2f.js} +1 -1
- package/dist/client/assets/{agent-icon-DyMYbwSC.js → agent-icon-D1Gf-C9m.js} +1 -1
- package/dist/client/assets/agents-list-ehYidOHO.js +1 -0
- package/dist/client/assets/ai-providers-CsbJvkZK.js +1 -0
- package/dist/client/assets/{alert-dialog-Bb1OlmEm.js → alert-dialog-De4XvZ0N.js} +1 -1
- package/dist/client/assets/{alert-vGXUrUMH.js → alert-mxZ-1ArC.js} +1 -1
- package/dist/client/assets/{analytics-tab-CLBd26bq.js → analytics-tab-Bp2zmTDf.js} +1 -1
- package/dist/client/assets/api-keys-6RN3Er1j.js +1 -0
- package/dist/client/assets/{api-keys-AQ1KvOAI.js → api-keys-BYVxiuWa.js} +1 -1
- package/dist/client/assets/app-editor-B2PPoAku.js +1 -0
- package/dist/client/assets/{auth-Dy3Ai_hi.js → auth-DzMOav3z.js} +1 -1
- package/dist/client/assets/{auth-catchall-CAeQDale.js → auth-catchall-DUlrU9SG.js} +1 -1
- package/dist/client/assets/{auth-entry-Bw_OxH2J.js → auth-entry-DuyCxScx.js} +1 -1
- package/dist/client/assets/{auth-split-layout-zISyI7ol.js → auth-split-layout-BAqypSlx.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-DBIvzM9b.js → authenticate-and-persist-oauth-Cqac9KKn.js} +1 -1
- package/dist/client/assets/{automation-list-row-Cm527FOk.js → automation-list-row-C7Dh5NyQ.js} +1 -1
- package/dist/client/assets/{automation-runs-CHfOqm8r.js → automation-runs-raC-h5Jn.js} +1 -1
- package/dist/client/assets/automations-BkYcgUve.js +1 -0
- package/dist/client/assets/{avatar-B8b2hWV1.js → avatar-YAHRhIuN.js} +1 -1
- package/dist/client/assets/{badge-DiXK5Efu.js → badge-BIaWrpUu.js} +1 -1
- package/dist/client/assets/{block-document-ItsWS1DV.js → block-document-Cwn0OdqQ.js} +1 -1
- package/dist/client/assets/{breadcrumb-C5kFXgQY.js → breadcrumb-nTIxzLsK.js} +1 -1
- package/dist/client/assets/{buckets-BapAtm2k.js → buckets-BVxuD_rq.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-D9GBldVp.js → bulk-category-panel-BGozg7py.js} +1 -1
- package/dist/client/assets/{capability-load-error-RzShLZ2L.js → capability-load-error-CJT8KySI.js} +1 -1
- package/dist/client/assets/{cards-BdTZBvrL.js → cards-AvyIUQi1.js} +1 -1
- package/dist/client/assets/category-editor-C0-FCupn.js +1 -0
- package/dist/client/assets/{cdn-tab-BL4NoAOo.js → cdn-tab-D6t-WrA-.js} +1 -1
- package/dist/client/assets/{chart-kfhwAaMN.js → chart-Y0E7BMCW.js} +1 -1
- package/dist/client/assets/chat-context-BtHwkWcX.js +35 -0
- package/dist/client/assets/{checkbox-CusZZICa.js → checkbox-CwmYA6Jd.js} +1 -1
- package/dist/client/assets/{choose-editor-Cojs0lHL.js → choose-editor-ClUp7ZXj.js} +1 -1
- package/dist/client/assets/{cli-auth-success-DtWzwr_V.js → cli-auth-success-BxedA-6o.js} +1 -1
- package/dist/client/assets/{client-icons-CIbINaqs.js → client-icons-Dw09gNj5.js} +1 -1
- package/dist/client/assets/collection-detail-DpQTA-_f.js +1 -0
- package/dist/client/assets/{collection-display-button-BA2fqyxJ.js → collection-display-button-D_jq2x8E.js} +1 -1
- package/dist/client/assets/{collection-search-gbLnoGWa.js → collection-search-ChJr-79G.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-C4Ljyh7l.js → collection-table-wrapper-DqXm0Y6Y.js} +1 -1
- package/dist/client/assets/{collection-tabs-BGNThV3i.js → collection-tabs-CMRlU3gp.js} +1 -1
- package/dist/client/assets/{command-CeyGqPmM.js → command-DfLG1FxV.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-YVPg5HyO.js → commerce-onboarding-CBF4kwsv.js} +1 -1
- package/dist/client/assets/{connect-D9TGqvpE.js → connect-Cc-OntJF.js} +2 -2
- package/dist/client/assets/{connect-layout-fngCpQZ1.js → connect-layout-8hBlTXjK.js} +1 -1
- package/dist/client/assets/{connection-pv2H4wMd.js → connection-BkGgnU6r.js} +1 -1
- package/dist/client/assets/{connection-card-D-rWqndL.js → connection-card-BZHdykVW.js} +1 -1
- package/dist/client/assets/connection-detail-h2Y1_DTU.js +1 -0
- package/dist/client/assets/{connection-form-helpers-nmBh-twk.js → connection-form-helpers-rYUfb-w-.js} +1 -1
- package/dist/client/assets/{connections-C6rPB7TJ.js → connections-BNso6Hbr.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-BZKwvpuX.js → create-organization-dialog-BxhXVXF9.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-xVL-mPxb.js → decopilot-sse-pool-DtTK0pZU.js} +1 -1
- package/dist/client/assets/{dialog-Do-ZnJpa.js → dialog-CaH8_RMM.js} +1 -1
- package/dist/client/assets/{domain-settings-gHV_ko81.js → domain-settings-CjpuW1Sa.js} +1 -1
- package/dist/client/assets/download-app-dialog-C0YnGdN-.js +1 -0
- package/dist/client/assets/{drawer-D4J_5BCc.js → drawer-C6re6wd2.js} +1 -1
- package/dist/client/assets/{dropdown-menu-C9hHhEdP.js → dropdown-menu-BflUhgiK.js} +1 -1
- package/dist/client/assets/e2e-tab-DMewmAX8.js +1 -0
- package/dist/client/assets/{editor-CgtWB5x3.js → editor-BoScMhx-.js} +1 -1
- package/dist/client/assets/{empty-state-CRtvF4Xb.js → empty-state-CX1uxbK1.js} +1 -1
- package/dist/client/assets/{empty-state-BPIeTQLP.js → empty-state-c8xeVzKg.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Cq3FrLyn.js → extract-connection-data-Du_Vb9x3.js} +1 -1
- package/dist/client/assets/file-explorer-CD07na3N.js +2 -0
- package/dist/client/assets/{file-type-icon-BoulZj-0.js → file-type-icon-DvKrWOvb.js} +1 -1
- package/dist/client/assets/{folder-icon-P0KHTdfp.js → folder-icon-BCUkLbpj.js} +1 -1
- package/dist/client/assets/{form-j23QTiVs.js → form-BIru9Ejf.js} +1 -1
- package/dist/client/assets/{general-BNkDnICW.js → general-BC13E11w.js} +1 -1
- package/dist/client/assets/github-repo-picker-DoAhzCe2.js +1 -0
- package/dist/client/assets/hooks-CDrhME-H.js +15 -0
- package/dist/client/assets/{hosting-tab-Bvp0zXsU.js → hosting-tab-3cBAyGJb.js} +1 -1
- package/dist/client/assets/{index-BMAJGR3J.js → index-BOCwMQDk.js} +1 -1
- package/dist/client/assets/index-C--jf1YA.js +1 -0
- package/dist/client/assets/{index-CaFXU7vU.js → index-C15cP5aW.js} +1 -1
- package/dist/client/assets/{index-DkQlXscT.js → index-CTBOP6Q0.js} +1 -1
- package/dist/client/assets/index-Cz20izfF.js +1 -0
- package/dist/client/assets/index-DNyCARO9.js +823 -0
- package/dist/client/assets/{index-Bmvq3ihr.js → index-DYT9gn4s.js} +1 -1
- package/dist/client/assets/{index-SiTXPFii.js → index-PM7Zl2HP.js} +2 -2
- package/dist/client/assets/{index-BVzdbF4_.js → index-c7ieU1f-.js} +1 -1
- package/dist/client/assets/{index-redirect-CJiAolND.js → index-redirect-UqaYSaGP.js} +1 -1
- package/dist/client/assets/{index-CxLq_ov_.js → index-wEg9Lr80.js} +5 -5
- package/dist/client/assets/{infra-billing-Y3GfCRPw.js → infra-billing-DBs9nM0S.js} +1 -1
- package/dist/client/assets/{input-t2vq_Yhz.js → input-CqiIGd5s.js} +1 -1
- package/dist/client/assets/{integration-icon-Cr-roc4W.js → integration-icon-Cu8aHcVH.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-CEk-b8tU.js → invite-member-dialog-CYguT5xl.js} +1 -1
- package/dist/client/assets/{label-HkRxmwei.js → label-CAw_FVDl.js} +1 -1
- package/dist/client/assets/{layout-Dxu31OnK.js → layout-2uoa3Pzh.js} +1 -1
- package/dist/client/assets/{login-Cx8SbtxE.js → login-CB0zY4pg.js} +1 -1
- package/dist/client/assets/{markdown-DFiEgKZj.js → markdown-C9ZK5o68.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BHYwKN2k.js → mcp-oauth-BeLH5xoD.js} +1 -1
- package/dist/client/assets/{members-D2oEyQo4.js → members-C91vIt8F.js} +1 -1
- package/dist/client/assets/{monaco-editor-BFa0VsLo.js → monaco-editor-DHvhRvRA.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-BQP-lBLM.js → monitoring-stats-row-49IeTiUW.js} +1 -1
- package/dist/client/assets/{multi-select-DtPXBo_Z.js → multi-select-CqMoldOk.js} +1 -1
- package/dist/client/assets/{oauth-callback-ccYetd0V.js → oauth-callback-TMqHyqAo.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-9CMbhleP.js → oauth-callback-ai-provider-B9uq62Aj.js} +1 -1
- package/dist/client/assets/{onboarding-BFJvKMEA.js → onboarding-BOQGcKeh.js} +1 -1
- package/dist/client/assets/org-layout-Bive16Uf.js +1 -0
- package/dist/client/assets/{organization-choice-VRNC0lDk.js → organization-choice-BIf8qDdI.js} +1 -1
- package/dist/client/assets/{orgs-C2coJyQH.js → orgs-wEmHjVgI.js} +1 -1
- package/dist/client/assets/{page-seo-form-C6r-7uaM.js → page-seo-form-DGCacFrm.js} +1 -1
- package/dist/client/assets/{popover-CpTW2alp.js → popover-BWsYC54c.js} +1 -1
- package/dist/client/assets/post-calendar-DIFgMk59.js +1 -0
- package/dist/client/assets/post-editor-BvxzsweG.js +1 -0
- package/dist/client/assets/{primitives-MHQnCsXb.js → primitives-Dowdg5ry.js} +1 -1
- package/dist/client/assets/{profile-A_0trZ37.js → profile-8R8rcV8T.js} +1 -1
- package/dist/client/assets/project-app-view-DPNT8KII.js +1 -0
- package/dist/client/assets/{project-icon-BY6MP5uE.js → project-icon-077KLYbf.js} +1 -1
- package/dist/client/assets/{prompts-DM7CdEW3.js → prompts-BMNNx1GE.js} +1 -1
- package/dist/client/assets/record-editor-Dn8x_Z41.js +1 -0
- package/dist/client/assets/redirect-editor-D1xPk16D.js +1 -0
- package/dist/client/assets/registry-BazMF7Xb.js +2 -0
- package/dist/client/assets/{registry-layout-f961NKWZ.js → registry-layout-BxV9B6af.js} +1 -1
- package/dist/client/assets/{reports-Cs0DFjxC.js → reports-B2AwrVqs.js} +1 -1
- package/dist/client/assets/{require-capability-B5tbYFX0.js → require-capability-C5d4IeCt.js} +1 -1
- package/dist/client/assets/{required-auth-layout-LhCq4pE1.js → required-auth-layout-DKi_A4hE.js} +1 -1
- package/dist/client/assets/{reset-password-CCpghMSK.js → reset-password-CbwJJQoi.js} +1 -1
- package/dist/client/assets/{review-settings-CDYWi0EQ.js → review-settings-Cmaa1BrH.js} +1 -1
- package/dist/client/assets/{roles-BBW1oHcq.js → roles-CSMYfdC4.js} +1 -1
- package/dist/client/assets/{schema-ChmhgfCW.js → schema-D1X6zCb1.js} +1 -1
- package/dist/client/assets/{scroll-area-B3TTluOZ.js → scroll-area-Brtk0yVT.js} +1 -1
- package/dist/client/assets/{search-input-D0Aw5sb3.js → search-input-hC6VHV5g.js} +1 -1
- package/dist/client/assets/{secrets-CgpThP8p.js → secrets-DF8RHKHn.js} +1 -1
- package/dist/client/assets/{sections-editor-CBOJB7Hp.js → sections-editor-Dz3UsqXI.js} +2 -2
- package/dist/client/assets/{select-CNhOTIVN.js → select-CCM2zxU_.js} +1 -1
- package/dist/client/assets/{select-model-BHenBcjH.js → select-model-DzfbqjNd.js} +1 -1
- package/dist/client/assets/{self-tool-result-gsJsfaVf.js → self-tool-result-Bk4OLOAg.js} +1 -1
- package/dist/client/assets/seo-editor-CrbBdBTe.js +1 -0
- package/dist/client/assets/settings-layout-BRWbntFl.js +1 -0
- package/dist/client/assets/{settings-sidebar-CqkH_Jwa.js → settings-sidebar-D35OVA4c.js} +1 -1
- package/dist/client/assets/{shell-controls-DnEVv7XR.js → shell-controls-DkBucIzz.js} +1 -1
- package/dist/client/assets/shell-layout-C9g09O-6.js +1 -0
- package/dist/client/assets/{skill-preview-D5ZuDhd0.js → skill-preview-Cf4vvbey.js} +1 -1
- package/dist/client/assets/{skills-BjJLGoK9.js → skills-n6-H6IY7.js} +1 -1
- package/dist/client/assets/{sso-BEJGla7K.js → sso-C8oKJxoU.js} +1 -1
- package/dist/client/assets/{store-DDqzPQql.js → store-Be6c6nQQ.js} +1 -1
- package/dist/client/assets/store-registry-CCTryZgA.js +2 -0
- package/dist/client/assets/{switch--G1maXos.js → switch-G2a0CjWN.js} +1 -1
- package/dist/client/assets/synced-repos-BV1f9M9p.js +1 -0
- package/dist/client/assets/{table-Bi-psIbe.js → table-SxTGh2Q5.js} +1 -1
- package/dist/client/assets/{tabs-DZInEuUb.js → tabs-CmPMqzNR.js} +1 -1
- package/dist/client/assets/{task-board-CcPPQONZ.js → task-board-DZBwwl6w.js} +1 -1
- package/dist/client/assets/task-route-B1uUoaQf.js +1 -0
- package/dist/client/assets/{tasks-CTHZjHVD.js → tasks-aTggodNx.js} +1 -1
- package/dist/client/assets/{textarea-DFMKKUyA.js → textarea-D9OkEmwC.js} +1 -1
- package/dist/client/assets/{toggle-group-HQ3bB1sR.js → toggle-group-e5hQchff.js} +1 -1
- package/dist/client/assets/{toolbar-CSNy9NkF.js → toolbar-Cp_b-9qg.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-DEqW4Jpo.js → toolbar-icon-button-DioFS17L.js} +1 -1
- package/dist/client/assets/{track-C5SbOoh_.js → track-wgw3m4cl.js} +1 -1
- package/dist/client/assets/{types-hwFA5Ktg.js → types-DSw-Km2F.js} +1 -1
- package/dist/client/assets/{use-ai-providers-DRa-WP8c.js → use-ai-providers-DmfroPz0.js} +1 -1
- package/dist/client/assets/{use-automations-Cppk9Xar.js → use-automations-CnYS71fM.js} +1 -1
- package/dist/client/assets/{use-autosave-H5fEY0zQ.js → use-autosave-kD5aifo1.js} +1 -1
- package/dist/client/assets/use-connection-CushqqRv.js +1 -0
- package/dist/client/assets/{use-copy-DvOjkuTL.js → use-copy-CnHfZb13.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-59Af3Rsa.js → use-create-virtual-mcp-B7tJsKls.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DQmx8pBf.js → use-debounced-autosave-Cp1kunab.js} +1 -1
- package/dist/client/assets/{use-debounced-value-BLtVz2Ja.js → use-debounced-value-Be-28JI6.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CkAI1xCS.js → use-decopilot-events-Dif4m15L.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BdxhtyUk.js → use-delete-connection-Ci2QeGgI.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-DSVf8vXV.js → use-deployment-admin-B3Q2GsPF.js} +1 -1
- package/dist/client/assets/{use-destination-route-BePPmQxb.js → use-destination-route-BuD3Ntdc.js} +1 -1
- package/dist/client/assets/{use-file-configs-BEZ_kwp8.js → use-file-configs-DAMN6ZTL.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-D8hgBz9p.js → use-infinite-scroll-Bl5BTtvu.js} +1 -1
- package/dist/client/assets/{use-join-requests-D-_6MxTr.js → use-join-requests-BrlwAHvL.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-CC8-P5tO.js → use-mcp-auth-status-BFFdf1vm.js} +1 -1
- package/dist/client/assets/{use-mcp-client-Bzii9bW9.js → use-mcp-client-BZ7O5VJN.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-BTyLUk2o.js → use-mcp-prompts-8KmTzsC5.js} +1 -1
- package/dist/client/assets/{use-members-CEM7zlP_.js → use-members-xVQSHn0k.js} +1 -1
- package/dist/client/assets/use-navigate-to-agent-B1U6cA61.js +5 -0
- package/dist/client/assets/{use-org-auth-client-Crsb07JJ.js → use-org-auth-client-CpPRGhlr.js} +1 -1
- package/dist/client/assets/{use-org-sso-DTBnbTx7.js → use-org-sso-CizonPle.js} +1 -1
- package/dist/client/assets/{use-organization-roles-6Vfaalz_.js → use-organization-roles-D3Zoctqc.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DRchtNm3.js → use-organization-settings-DHj1Z1Ef.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-DSf87ewD.js → use-panel-navigate-Cgvk8PHP.js} +1 -1
- package/dist/client/assets/{use-registry-connections-DndEI7JT.js → use-registry-connections-DGooKvuH.js} +1 -1
- package/dist/client/assets/{use-secrets-DmVRsGO4.js → use-secrets-CpLcmjzK.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-Z9XEvq4w.js → use-section-preview-base-DkKNhpfG.js} +1 -1
- package/dist/client/assets/{use-status-sounds-D9cQQiox.js → use-status-sounds-CQqrdqpV.js} +1 -1
- package/dist/client/assets/{use-tags-C4M9TEep.js → use-tags-BsICx--m.js} +1 -1
- package/dist/client/assets/{use-view-mode-BVUyWYvX.js → use-view-mode-DYVaa41C.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-Drh4_cTK.js → use-virtual-mcp-TBOtkuWu.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CiTlR-Uk.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-BrjYMPz-.js +1 -0
- package/dist/client/assets/{users-CxuT9c7Z.js → users-DAtK3yVR.js} +1 -1
- package/dist/client/assets/variant-calendar-Cj6fpy_0.js +1 -0
- package/dist/client/assets/{view-mode-toggle-DdtTJc3o.js → view-mode-toggle-DxIxEUzB.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agents-list-DS28B9dy.js +0 -1
- package/dist/client/assets/ai-providers-D5QrIBul.js +0 -1
- package/dist/client/assets/api-keys-onistOjb.js +0 -1
- package/dist/client/assets/app-editor-CO72zzFt.js +0 -1
- package/dist/client/assets/automations-ZjgouUBF.js +0 -1
- package/dist/client/assets/category-editor-C2R7fccg.js +0 -1
- package/dist/client/assets/chat-context-D2SP0J5D.js +0 -35
- package/dist/client/assets/collection-detail-BW5w3jba.js +0 -1
- package/dist/client/assets/connection-detail-eknzRIjb.js +0 -1
- package/dist/client/assets/e2e-tab-0aOWE4gZ.js +0 -1
- package/dist/client/assets/file-explorer-DFCGDD7E.js +0 -2
- package/dist/client/assets/github-repo-picker-CuXoDtLm.js +0 -1
- package/dist/client/assets/hooks-D1D8x6_l.js +0 -15
- package/dist/client/assets/index-B1coIP-x.js +0 -827
- package/dist/client/assets/index-CeYSBtaz.js +0 -1
- package/dist/client/assets/index-ZeDNJ_1q.js +0 -1
- package/dist/client/assets/org-layout-DY_zUSdZ.js +0 -1
- package/dist/client/assets/post-calendar-op-KKH1q.js +0 -1
- package/dist/client/assets/post-editor-ClKCgdAj.js +0 -1
- package/dist/client/assets/project-app-view-CsHhCOz6.js +0 -1
- package/dist/client/assets/record-editor-BTQg6PKa.js +0 -1
- package/dist/client/assets/redirect-editor-CXHphZOh.js +0 -1
- package/dist/client/assets/registry-CT_YquLV.js +0 -2
- package/dist/client/assets/seo-editor-CXcll4p8.js +0 -1
- package/dist/client/assets/settings-layout-BuGaWoZD.js +0 -1
- package/dist/client/assets/shell-layout-CAB27XFS.js +0 -1
- package/dist/client/assets/store-registry-Ds5fAPeG.js +0 -2
- package/dist/client/assets/synced-repos-_n1sYI3v.js +0 -1
- package/dist/client/assets/task-route-GdQl-L3H.js +0 -1
- package/dist/client/assets/thread-intent-BCmi7agT.js +0 -1
- package/dist/client/assets/thread-route-Ckn7Kp8P.js +0 -1
- package/dist/client/assets/use-connection-B3hf1saX.js +0 -1
- package/dist/client/assets/use-mcp-tools-3xoGjo6f.js +0 -1
- package/dist/client/assets/use-navigate-to-agent-CUFdthzD.js +0 -1
- package/dist/client/assets/useInfiniteQuery-Cy80sU-k.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DKd6bR20.js +0 -1
- package/dist/client/assets/variant-calendar-CGeSmoC0.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as R,b as Y,e as qe,j as n,B as z,t as Fe,cP as Re,z as pt,a as $e,w as Mt,x as yt,K as Be,cQ as Ft,cR as zt,J as De,l as et,bm as qt,r as H,d as bt,W as ot,m as Ke,o as tt,b8 as at,v as Kt,cS as Bt,cT as Ht,cU as Ut,cV as Jt,cW as Gt,u as Vt,Z as Wt,ca as Yt,cX as Qt,cY as Xe,cZ as Xt,k as Zt,c_ as en,O as tn,c$ as nn}from"./index-CxLq_ov_.js";import{A as Qe}from"./avatar-B8b2hWV1.js";import{t as xt,b as rt}from"./Users03-CMpVHpdR.js";import{d as sn}from"./TrendUp01-yPe3UG0T.js";import{b5 as on,az as an,b2 as Z,b6 as rn,n as ln,b7 as cn,f as lt,h as dn,g as un,b8 as mn,d as fn}from"./agent-icon-DyMYbwSC.js";import{s as gn}from"./XClose-N8lMtUXr.js";import{D as hn,u as pn,c as yn,d as bn,b as xn,A as Sn}from"./thread-route-Ckn7Kp8P.js";import{l as St,a as wn,u as vn,P as jn}from"./project-icon-BY6MP5uE.js";import{u as kn,D as ee}from"./use-destination-route-BePPmQxb.js";import{u as wt,a as Tn}from"./use-panel-navigate-DSf87ewD.js";import{i as ne}from"./CheckCircle-DLOuSHro.js";import{i as ct}from"./Tool02-8qVRgTeE.js";import{i as Ze}from"./Monitor01-SbvebE9T.js";import{i as se}from"./Zap-BMyl5tLM.js";import{c as vt,d as jt,b as kt,D as Tt,h as Nn,e as _n}from"./dialog-Do-ZnJpa.js";import{i as An}from"./Share07-Bu5e840D.js";import{s as dt}from"./Plus-D-mogJXC.js";import{a as Pn}from"./Settings02-B2gnPQ3Q.js";import{d as ie,e as We,a as Cn,c as En,b as On,f as In}from"./command-CeyGqPmM.js";import{e as Ln,m as Dn}from"./use-mcp-client-Bzii9bW9.js";import{S as Nt,a as $n}from"./constants-DNuUCxmW.js";import{S as Rn,a as Mn}from"./hooks-D1D8x6_l.js";import{u as Fn}from"./use-is-desktop-app-BNujXJc_.js";import{R as zn}from"./required-auth-layout-LhCq4pE1.js";import{f as qn}from"./use-organization-settings-DRchtNm3.js";import{u as Kn}from"./use-org-sso-DTBnbTx7.js";function Bn(t){const e=R.c(49),{orgName:o,orgSlug:a,orgLogo:s,domain:r}=t,i=Y();let u;e[0]!==a||e[1]!==i?(u=async()=>{const k=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:a})}),A=await k.json();if(!k.ok||!A.success)throw new Error(A.error??i("common.autoDomainJoinScreen.joinError"));return A},e[0]=a,e[1]=i,e[2]=u):u=e[2];let f;e[3]!==a?(f=k=>{window.location.href=`/${k.slug??a}`},e[3]=a,e[4]=f):f=e[4];let b;e[5]!==i?(b=k=>{Fe.error(k instanceof Error?k.message:i("common.autoDomainJoinScreen.joinError"))},e[5]=i,e[6]=b):b=e[6];let j;e[7]!==u||e[8]!==f||e[9]!==b?(j={mutationFn:u,onSuccess:f,onError:b},e[7]=u,e[8]=f,e[9]=b,e[10]=j):j=e[10];const c=qe(j),w=Hn;let p;e[11]!==s||e[12]!==o?(p=s?n.jsx(Qe,{url:s,fallback:o.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(xt,{className:"h-6 w-6 text-primary"})}),e[11]=s,e[12]=o,e[13]=p):p=e[13];let l;e[14]!==o||e[15]!==i?(l=i("common.autoDomainJoinScreen.joinPrompt",{orgName:o}),e[14]=o,e[15]=i,e[16]=l):l=e[16];let g;e[17]!==l?(g=n.jsx("h3",{className:"text-lg font-medium",children:l}),e[17]=l,e[18]=g):g=e[18];let d;e[19]!==r||e[20]!==i?(d=i("common.autoDomainJoinScreen.joinDescription",{domain:r}),e[19]=r,e[20]=i,e[21]=d):d=e[21];let x;e[22]!==d?(x=n.jsx("p",{className:"text-sm text-muted-foreground",children:d}),e[22]=d,e[23]=x):x=e[23];let S;e[24]!==g||e[25]!==x?(S=n.jsxs("div",{className:"space-y-2",children:[g,x]}),e[24]=g,e[25]=x,e[26]=S):S=e[26];let y;e[27]!==c?(y=()=>c.mutate(),e[27]=c,e[28]=y):y=e[28];let m;e[29]!==c.isPending||e[30]!==o||e[31]!==i?(m=c.isPending?i("common.autoDomainJoinScreen.joining"):i("common.autoDomainJoinScreen.enterOrg",{orgName:o}),e[29]=c.isPending,e[30]=o,e[31]=i,e[32]=m):m=e[32];let _;e[33]!==c.isPending||e[34]!==y||e[35]!==m?(_=n.jsx(z,{onClick:y,disabled:c.isPending,children:m}),e[33]=c.isPending,e[34]=y,e[35]=m,e[36]=_):_=e[36];const P=c.isPending;let T;e[37]!==i?(T=i("common.autoDomainJoinScreen.goHome"),e[37]=i,e[38]=T):T=e[38];let v;e[39]!==c.isPending||e[40]!==T?(v=n.jsx(z,{variant:"ghost",onClick:w,disabled:P,children:T}),e[39]=c.isPending,e[40]=T,e[41]=v):v=e[41];let h;e[42]!==_||e[43]!==v?(h=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[_,v]}),e[42]=_,e[43]=v,e[44]=h):h=e[44];let N;return e[45]!==S||e[46]!==h||e[47]!==p?(N=n.jsxs(Re,{children:[p,S,h]}),e[45]=S,e[46]=h,e[47]=p,e[48]=N):N=e[48],N}function Hn(){window.location.href="/"}function ut(t){const e=R.c(25),{orgSlug:o,orgName:a,reason:s}=t,r=Y(),i=Un,u=s==="not-found",f=u?sn:pt;let b;e[0]!==u||e[1]!==r?(b=r(u?"common.noAccessScreen.organizationNotFound":"common.noAccessScreen.noAccess"),e[0]=u,e[1]=r,e[2]=b):b=e[2];const j=b;let c;e[3]!==u||e[4]!==a||e[5]!==o||e[6]!==r?(c=u?n.jsxs(n.Fragment,{children:[r("common.noAccessScreen.couldNotFind")," ",n.jsx("strong",{children:o}),"."]}):n.jsxs(n.Fragment,{children:[r("common.noAccessScreen.noAccessTo")," ",n.jsx("strong",{children:a??o}),".",n.jsx("br",{}),r("common.noAccessScreen.askAdminToInvite")]}),e[3]=u,e[4]=a,e[5]=o,e[6]=r,e[7]=c):c=e[7];const w=c;let p;e[8]!==f?(p=n.jsx("div",{className:"bg-muted p-3 rounded-full",children:n.jsx(f,{className:"h-6 w-6 text-muted-foreground"})}),e[8]=f,e[9]=p):p=e[9];let l;e[10]!==j?(l=n.jsx("h3",{className:"text-lg font-medium",children:j}),e[10]=j,e[11]=l):l=e[11];let g;e[12]!==w?(g=n.jsx("p",{className:"text-sm text-muted-foreground",children:w}),e[12]=w,e[13]=g):g=e[13];let d;e[14]!==l||e[15]!==g?(d=n.jsxs("div",{className:"space-y-2",children:[l,g]}),e[14]=l,e[15]=g,e[16]=d):d=e[16];let x;e[17]!==r?(x=r("common.noAccessScreen.goToHome"),e[17]=r,e[18]=x):x=e[18];let S;e[19]!==x?(S=n.jsx(z,{onClick:i,children:x}),e[19]=x,e[20]=S):S=e[20];let y;return e[21]!==p||e[22]!==d||e[23]!==S?(y=n.jsxs(Re,{children:[p,d,S]}),e[21]=p,e[22]=d,e[23]=S,e[24]=y):y=e[24],y}function Un(){window.location.href="/"}function Jn(t){const e=R.c(59),{invitationId:o,orgName:a,orgSlug:s,orgLogo:r}=t,i=Y();let u;e[0]!==o?(u=async()=>{const O=await $e.organization.acceptInvitation({invitationId:o});if(O.error)throw new Error(O.error.message);return O.data},e[0]=o,e[1]=u):u=e[1];let f;e[2]!==s?(f=()=>{Mt(),window.location.href=`/${s}`},e[2]=s,e[3]=f):f=e[3];let b;e[4]!==i?(b=O=>{Fe.error(O instanceof Error?O.message:i("common.pendingInviteScreen.failedToAccept"))},e[4]=i,e[5]=b):b=e[5];let j;e[6]!==u||e[7]!==f||e[8]!==b?(j={mutationFn:u,onSuccess:f,onError:b},e[6]=u,e[7]=f,e[8]=b,e[9]=j):j=e[9];const c=qe(j);let w;e[10]!==o?(w=async()=>{const O=await $e.organization.rejectInvitation({invitationId:o});if(O.error)throw new Error(O.error.message);return O.data},e[10]=o,e[11]=w):w=e[11];let p,l;e[12]!==i?(p=()=>{Fe.success(i("common.pendingInviteScreen.invitationDeclined")),window.location.href="/"},l=O=>{Fe.error(O instanceof Error?O.message:i("common.pendingInviteScreen.failedToDecline"))},e[12]=i,e[13]=p,e[14]=l):(p=e[13],l=e[14]);let g;e[15]!==w||e[16]!==p||e[17]!==l?(g={mutationFn:w,onSuccess:p,onError:l},e[15]=w,e[16]=p,e[17]=l,e[18]=g):g=e[18];const d=qe(g),x=c.isPending||d.isPending;let S;e[19]!==r||e[20]!==a?(S=r?n.jsx(Qe,{url:r,fallback:a.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(on,{className:"h-6 w-6 text-primary"})}),e[19]=r,e[20]=a,e[21]=S):S=e[21];let y;e[22]!==a||e[23]!==i?(y=i("common.pendingInviteScreen.invitedTo",{orgName:a}),e[22]=a,e[23]=i,e[24]=y):y=e[24];let m;e[25]!==y?(m=n.jsx("h3",{className:"text-lg font-medium",children:y}),e[25]=y,e[26]=m):m=e[26];let _;e[27]!==i?(_=i("common.pendingInviteScreen.acceptDescription"),e[27]=i,e[28]=_):_=e[28];let P;e[29]!==_?(P=n.jsx("p",{className:"text-sm text-muted-foreground",children:_}),e[29]=_,e[30]=P):P=e[30];let T;e[31]!==m||e[32]!==P?(T=n.jsxs("div",{className:"space-y-2",children:[m,P]}),e[31]=m,e[32]=P,e[33]=T):T=e[33];let v;e[34]!==c?(v=()=>c.mutate(),e[34]=c,e[35]=v):v=e[35];let h;e[36]!==c.isPending||e[37]!==i?(h=c.isPending?i("common.pendingInviteScreen.acceptingButton"):i("common.pendingInviteScreen.acceptButton"),e[36]=c.isPending,e[37]=i,e[38]=h):h=e[38];let N;e[39]!==x||e[40]!==v||e[41]!==h?(N=n.jsx(z,{onClick:v,disabled:x,children:h}),e[39]=x,e[40]=v,e[41]=h,e[42]=N):N=e[42];let k;e[43]!==d?(k=()=>d.mutate(),e[43]=d,e[44]=k):k=e[44];let A;e[45]!==d.isPending||e[46]!==i?(A=d.isPending?i("common.pendingInviteScreen.decliningButton"):i("common.pendingInviteScreen.declineButton"),e[45]=d.isPending,e[46]=i,e[47]=A):A=e[47];let E;e[48]!==x||e[49]!==k||e[50]!==A?(E=n.jsx(z,{variant:"ghost",onClick:k,disabled:x,children:A}),e[48]=x,e[49]=k,e[50]=A,e[51]=E):E=e[51];let C;e[52]!==N||e[53]!==E?(C=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[N,E]}),e[52]=N,e[53]=E,e[54]=C):C=e[54];let I;return e[55]!==T||e[56]!==C||e[57]!==S?(I=n.jsxs(Re,{children:[S,T,C]}),e[55]=T,e[56]=C,e[57]=S,e[58]=I):I=e[58],I}function Gn(t){const e=R.c(23),{orgName:o,orgLogo:a}=t,s=Y();let r;e[0]!==a||e[1]!==o?(r=a?n.jsx(Qe,{url:a,fallback:o.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(an,{className:"h-6 w-6 text-primary"})}),e[0]=a,e[1]=o,e[2]=r):r=e[2];let i;e[3]!==s?(i=s("common.requestPendingScreen.title"),e[3]=s,e[4]=i):i=e[4];let u;e[5]!==i?(u=n.jsx("h3",{className:"text-lg font-medium",children:i}),e[5]=i,e[6]=u):u=e[6];let f;e[7]!==o||e[8]!==s?(f=s("common.requestPendingScreen.description",{orgName:o}),e[7]=o,e[8]=s,e[9]=f):f=e[9];let b;e[10]!==f?(b=n.jsx("p",{className:"text-sm text-muted-foreground",children:f}),e[10]=f,e[11]=b):b=e[11];let j;e[12]!==u||e[13]!==b?(j=n.jsxs("div",{className:"space-y-2",children:[u,b]}),e[12]=u,e[13]=b,e[14]=j):j=e[14];let c;e[15]!==s?(c=s("common.requestPendingScreen.goHome"),e[15]=s,e[16]=c):c=e[16];let w;e[17]!==c?(w=n.jsx(z,{variant:"ghost",onClick:Vn,children:c}),e[17]=c,e[18]=w):w=e[18];let p;return e[19]!==r||e[20]!==j||e[21]!==w?(p=n.jsxs(Re,{children:[r,j,w]}),e[19]=r,e[20]=j,e[21]=w,e[22]=p):p=e[22],p}function Vn(){window.location.href="/"}function Wn(t){const e=R.c(45),{orgName:o,orgSlug:a,orgLogo:s,domain:r}=t,i=Y();let u;e[0]!==a?(u=async()=>{const N=await fetch("/api/auth/custom/domain-request-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:a})}),k=await N.json();if(!N.ok||!k.success)throw new Error(k.error??"Failed to request access");return k},e[0]=a,e[1]=u):u=e[1];let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=Qn,e[2]=f):f=e[2];let b;e[3]!==i?(b=N=>{Fe.error(N instanceof Error?N.message:i("common.requestToJoinScreen.failedToRequest"))},e[3]=i,e[4]=b):b=e[4];let j;e[5]!==u||e[6]!==b?(j={mutationFn:u,onSuccess:f,onError:b},e[5]=u,e[6]=b,e[7]=j):j=e[7];const c=qe(j);let w;e[8]!==s||e[9]!==o?(w=s?n.jsx(Qe,{url:s,fallback:o.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(xt,{className:"h-6 w-6 text-primary"})}),e[8]=s,e[9]=o,e[10]=w):w=e[10];let p;e[11]!==o||e[12]!==i?(p=i("common.requestToJoinScreen.title",{orgName:o}),e[11]=o,e[12]=i,e[13]=p):p=e[13];let l;e[14]!==p?(l=n.jsx("h3",{className:"text-lg font-medium",children:p}),e[14]=p,e[15]=l):l=e[15];let g;e[16]!==r||e[17]!==i?(g=i("common.requestToJoinScreen.description",{domain:r}),e[16]=r,e[17]=i,e[18]=g):g=e[18];let d;e[19]!==g?(d=n.jsx("p",{className:"text-sm text-muted-foreground",children:g}),e[19]=g,e[20]=d):d=e[20];let x;e[21]!==l||e[22]!==d?(x=n.jsxs("div",{className:"space-y-2",children:[l,d]}),e[21]=l,e[22]=d,e[23]=x):x=e[23];let S;e[24]!==c?(S=()=>c.mutate(),e[24]=c,e[25]=S):S=e[25];let y;e[26]!==c.isPending||e[27]!==i?(y=c.isPending?i("common.requestToJoinScreen.requesting"):i("common.requestToJoinScreen.requestButton"),e[26]=c.isPending,e[27]=i,e[28]=y):y=e[28];let m;e[29]!==c.isPending||e[30]!==S||e[31]!==y?(m=n.jsx(z,{onClick:S,disabled:c.isPending,children:y}),e[29]=c.isPending,e[30]=S,e[31]=y,e[32]=m):m=e[32];const _=c.isPending;let P;e[33]!==i?(P=i("common.requestToJoinScreen.goToHome"),e[33]=i,e[34]=P):P=e[34];let T;e[35]!==c.isPending||e[36]!==P?(T=n.jsx(z,{variant:"ghost",onClick:Yn,disabled:_,children:P}),e[35]=c.isPending,e[36]=P,e[37]=T):T=e[37];let v;e[38]!==m||e[39]!==T?(v=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[m,T]}),e[38]=m,e[39]=T,e[40]=v):v=e[40];let h;return e[41]!==x||e[42]!==v||e[43]!==w?(h=n.jsxs(Re,{children:[w,x,v]}),e[41]=x,e[42]=v,e[43]=w,e[44]=h):h=e[44],h}function Yn(){window.location.href="/"}function Qn(t){if(t.alreadyMember&&t.slug){window.location.href=`/${t.slug}`;return}window.location.reload()}function Xn(t){const e=R.c(7);let o;e[0]!==t?(o=Be.orgAccessStatus(t),e[0]=t,e[1]=o):o=e[1];let a;e[2]!==t?(a=async()=>{const r=await fetch(`/api/auth/custom/org-access-status/${encodeURIComponent(t)}`,{credentials:"include"});if(!r.ok)throw new Error(`org-access-status failed (${r.status})`);return await r.json()},e[2]=t,e[3]=a):a=e[3];let s;return e[4]!==o||e[5]!==a?(s={queryKey:o,queryFn:a,refetchOnWindowFocus:!1},e[4]=o,e[5]=a,e[6]=s):s=e[6],yt(s)}function Zn({orgSlug:t}){const{data:e}=Xn(t);if(e.status!=="member"){Ft()?.org===t&&zt();const o=localStorage.getItem(De.lastOrgSlug())===t;if(o&&localStorage.removeItem(De.lastOrgSlug()),o&&(e.status==="not-found"||e.status==="no-access"))return window.location.href="/",null}return e.status==="not-found"?n.jsx(ut,{orgSlug:t,reason:"not-found"}):e.status==="pending-invite"?n.jsx(Jn,{invitationId:e.invitation.id,orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo}):e.status==="auto-domain-join"?n.jsx(Bn,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="can-request"?n.jsx(Wn,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="request-pending"?n.jsx(Gn,{orgName:e.organization.name,orgLogo:e.organization.logo}):e.status==="member"?(window.location.reload(),null):n.jsx(ut,{orgSlug:t,orgName:e.organization.name,reason:"no-access"})}function _t(t){const e=R.c(42),{ariaLabel:o,dismissLabel:a,eyebrow:s,title:r,description:i,icon:u,children:f,footerLeading:b,actions:j,onDismiss:c,tone:w}=t,p=w===void 0?"neutral":w,l=b||j;let g;e[0]!==p?(g=p==="system"&&n.jsx("div",{className:"h-0.5 bg-special"}),e[0]=p,e[1]=g):g=e[1];let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(gn,{size:14}),e[2]=d):d=e[2];let x;e[3]!==a||e[4]!==c?(x=n.jsx(z,{size:"icon-sm",variant:"ghost","aria-label":a,className:"absolute right-2 top-2 z-10 text-muted-foreground",onClick:c,children:d}),e[3]=a,e[4]=c,e[5]=x):x=e[5];const S=u&&"flex items-start gap-3",y=f&&"pb-3";let m;e[6]!==S||e[7]!==y?(m=et("p-4 pr-11",S,y),e[6]=S,e[7]=y,e[8]=m):m=e[8];let _;e[9]!==u?(_=u&&n.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-special/10 text-special",children:u}),e[9]=u,e[10]=_):_=e[10];let P;e[11]!==s?(P=s&&n.jsx("p",{className:"text-xs text-muted-foreground",children:s}),e[11]=s,e[12]=P):P=e[12];let T;e[13]!==r?(T=n.jsx("h3",{className:"text-base font-semibold text-foreground",children:r}),e[13]=r,e[14]=T):T=e[14];let v;e[15]!==i?(v=i&&n.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:i}),e[15]=i,e[16]=v):v=e[16];let h;e[17]!==T||e[18]!==v||e[19]!==P?(h=n.jsxs("div",{children:[P,T,v]}),e[17]=T,e[18]=v,e[19]=P,e[20]=h):h=e[20];let N;e[21]!==f?(N=f&&n.jsx("div",{className:"mt-3",children:f}),e[21]=f,e[22]=N):N=e[22];let k;e[23]!==h||e[24]!==N?(k=n.jsxs("div",{className:"min-w-0 flex-1",children:[h,N]}),e[23]=h,e[24]=N,e[25]=k):k=e[25];let A;e[26]!==k||e[27]!==m||e[28]!==_?(A=n.jsxs("div",{className:m,children:[_,k]}),e[26]=k,e[27]=m,e[28]=_,e[29]=A):A=e[29];let E;e[30]!==j||e[31]!==b||e[32]!==l||e[33]!==p?(E=l&&n.jsxs("div",{className:et("flex items-center justify-between gap-3 px-4 py-2.5",p==="system"?"border-t border-border bg-muted/50":"pt-0"),children:[n.jsx("div",{className:"min-w-0 text-xs text-muted-foreground",children:b}),n.jsx("div",{className:"flex shrink-0 items-center gap-2",children:j})]}),e[30]=j,e[31]=b,e[32]=l,e[33]=p,e[34]=E):E=e[34];let C;return e[35]!==o||e[36]!==A||e[37]!==E||e[38]!==g||e[39]!==x||e[40]!==p?(C=n.jsxs("div",{role:"dialog","aria-label":o,"data-slot":"announcement-card","data-tone":p,className:"relative w-full overflow-hidden rounded-lg border border-border bg-background shadow-lg animate-in fade-in slide-in-from-bottom-2 duration-300",children:[g,x,A,E]}),e[35]=o,e[36]=A,e[37]=E,e[38]=g,e[39]=x,e[40]=p,e[41]=C):C=e[41],C}const es=[{scope:"shell",anchor:"switcher",titleKey:"layoutTour.switcher.title",descKey:"layoutTour.switcher.description",side:"right"},{scope:"shell",anchor:"nav",titleKey:"layoutTour.nav.title",descKey:"layoutTour.nav.description",side:"right"},{scope:"shell",anchor:"tasks",titleKey:"layoutTour.tasks.title",descKey:"layoutTour.tasks.description",side:"right"},{scope:"project",anchor:"siteEditor",titleKey:"layoutTour.siteEditor.title",descKey:"layoutTour.siteEditor.description",side:"right"},{scope:"project",anchor:"automations",titleKey:"layoutTour.automations.title",descKey:"layoutTour.automations.description",side:"right"},{scope:"shell",anchor:"settings",titleKey:"layoutTour.settings.title",descKey:"layoutTour.settings.description",side:"right"},{scope:"shell",anchor:"projects",titleKey:"layoutTour.projects.title",descKey:"layoutTour.projects.description",side:"right"},{scope:"shell",anchor:"account",titleKey:"layoutTour.account.title",descKey:"layoutTour.account.description",side:"right"},{scope:"siteEditor",anchor:"surfaceTabs",titleKey:"layoutTour.surfaceTabs.title",descKey:"layoutTour.surfaceTabs.description",side:"bottom"},{scope:"siteEditor",anchor:"branchPicker",titleKey:"layoutTour.branchPicker.title",descKey:"layoutTour.branchPicker.description",side:"bottom"},{scope:"orgHome",anchor:"recentActivity",titleKey:"layoutTour.recentActivity.title",descKey:"layoutTour.recentActivity.description",side:"top"}];function ts(t){return es.filter(e=>e.scope==="shell"||e.scope==="orgHome"&&t.onOrgHome||e.scope==="project"&&t.inProject||e.scope==="siteEditor"&&t.onSiteEditor)}function ns(t,e){return ts(e).map(o=>({element:St(o.anchor),popover:{title:t(o.titleKey),description:t(o.descKey),side:o.side,align:"center"}}))}const ss=St("switcher"),os=30;function At(t){const e=document.querySelector(t);return e instanceof HTMLElement&&e.offsetParent!==null}function is(t,e){return ns(t,e).filter(o=>typeof o.element=="string"&&At(o.element))}function as(t,e){return{showProgress:!0,progressText:t("layoutTour.progress"),nextBtnText:t("layoutTour.next"),prevBtnText:t("layoutTour.prev"),doneBtnText:t("layoutTour.done"),showButtons:["next","previous"],smoothScroll:!0,allowClose:!0,disableActiveInteraction:!0,stagePadding:6,stageRadius:8,waitForElement:0,skipMissingElement:!0,popoverClass:"layout-tour-popover",onPopoverRender:(o,{driver:a})=>{if(o.footerButtons.querySelector(".layout-tour-skip"))return;const s=document.createElement("button");s.type="button",s.className="driver-popover-footer-btn layout-tour-skip",s.textContent=t("layoutTour.skip"),s.addEventListener("click",()=>a.destroy()),o.footerButtons.insertBefore(s,o.footerButtons.firstChild)},onDestroyed:()=>{Me=!1},steps:e}}let Me=!1;async function rs(){return(await qt(()=>import("./driver.js-Dj4CfABu.js"),[])).driver}function ls(t,e){if(Me)return;Me=!0;let o=0;const a=()=>{if(!At(ss)&&o++<os){requestAnimationFrame(a);return}const s=is(t,e);if(s.length===0){Me=!1;return}rs().then(r=>{r(as(t,s)).drive()}).catch(()=>{Me=!1})};a()}function Ro(t){if(!t.hasSource)return[];const e=["site-editor"];return t.cmsMode!=="off"&&e.push("content"),t.runtime==="sandbox"&&e.push("code"),e}function Pt(t){return t==="site-editor"||t==="content"||t==="code"||t.startsWith("code:")}function Mo(t){return t.reportsOnly&&!t.onReportAgent&&Pt(t.tabId)}const cs=[{id:"unified-workspace-layout",date:"2026-09-01",eyebrow:"Now Available",title:"A new way around Studio",bullets:[{icon:rt,title:"Unified org switcher",body:"Organizations and agents now share one control at the top of the sidebar. Search it to jump straight to any agent, including ones in your other organizations."},{icon:Z,title:"Your org at a glance",body:"The organization home now opens on the agents your team built and the tasks they are running — no empty board to fill in first."},{icon:Ze,title:"Simplified CMS",body:"The CMS opens over the page you are previewing rather than somewhere else, so changing a section never costs you your place."}],cta:{label:"Take the tour",action:"start-tour"}},{id:"native-app-linux-beta",date:"2026-08-20",eyebrow:"Now Available",title:"Studio for Linux is now in beta",bullets:[{icon:Ze,title:"Native Linux desktop app",body:"Studio now ships as an AppImage for 64-bit x86 Linux, bringing the local desktop workflow to Linux."},{icon:ne,title:"Verified, no-root install",body:"The installer verifies the download, installs Studio to ~/.local/bin, and adds it to your application launcher without sudo."},{icon:se,title:"Beta today, broader support next",body:"We're validating more distributions and desktop environments. Arm builds are not available yet, and your feedback will shape general availability."}],cta:{label:"Install Studio",action:"download-app"},learnMoreHref:"https://github.com/decocms/studio/releases/tag/native-v4.242.0"},{id:"native-app-macos",date:"2026-07-30",eyebrow:"Now Available",title:"New beta studio app",bullets:[{icon:se,title:"Faster CMS previews",body:"Every draft gets its own git worktree on your machine, so previews render instantly as you edit."},{icon:Z,title:"Native Claude Code & Codex support",body:"State-of-the-art coding agents, running natively against your local files."},{icon:rn,title:"Boosted performance",body:"Entirely rewritten in Rust with a smaller memory footprint than the Bun-based runtime — fast even on modest machines."},{icon:Ze,title:"Apple Silicon only — Windows coming soon",body:"Today's builds target macOS on Apple Silicon; Windows is next."}],cta:{label:"Install on Mac",action:"download-app"},learnMoreHref:"https://github.com/decocms/studio/releases"},{id:"codex-gpt-5-6-defaults",date:"2026-07-13",eyebrow:"Now Available",title:"Codex defaults move to GPT-5.6",bullets:[{icon:Z,title:"Sol leads Thinking",body:"Codex Thinking now defaults to `gpt-5.6-sol` for deeper coding and reasoning work."},{icon:ne,title:"Terra balances Smart",body:"The Smart tier now uses `gpt-5.6-terra`, replacing GPT-5.4 as the default balanced Codex model."},{icon:se,title:"Luna speeds up Fast",body:"The Fast tier and lightweight Codex title generation now use `gpt-5.6-luna`. Existing threads that reference older GPT-5.4 or GPT-5.5 model IDs remain supported."}]},{id:"claude-sonnet-5",date:"2026-06-30",eyebrow:"Now Available",title:"Claude Sonnet 5 powers the Smart tier",bullets:[{icon:Z,title:"More agentic coding",body:"Sonnet 5 is Anthropic's strongest Sonnet model yet, with improved reasoning, tool use, coding, and knowledge work compared with Sonnet 4.6."},{icon:ne,title:"Available in Claude Code",body:"The Claude Code harness now pins the Smart tier to the new `claude-sonnet-5` model id so new sessions use Sonnet 5 by default."},{icon:se,title:"Nothing to change",body:"Existing Smart-tier chats and agents pick up Sonnet 5 automatically. Thinking remains on Opus 4.8 1M."}],learnMoreHref:"https://www.anthropic.com/news/claude-sonnet-5"},{id:"fable-5-suspension",date:"2026-06-13",eyebrow:"Important Update",title:"Fable 5 & Mythos 5 suspended — Opus 4.8 takes over",bullets:[{icon:ne,title:"US government directive",body:"Anthropic received an export control directive requiring the suspension of Fable 5 and Mythos 5 access for all users, citing national security concerns. Anthropic is complying while it works to resolve the matter."},{icon:Z,title:"Opus 4.8 steps in as the Thinking tier",body:"The Thinking tier now runs on Claude Opus 4.8, which remains fully operational. Performance on most tasks is comparable, and Anthropic reports more than 95% of sessions were unaffected by the Fable 5 classifiers anyway."},{icon:se,title:"Nothing to change",body:"The switch is automatic — any chat or agent already using the Thinking tier is now served by Opus 4.8. Anthropic will share further details within 24 hours."}],learnMoreHref:"https://www.anthropic.com/news/fable-mythos-access"},{id:"claude-fable-5",date:"2026-06-09",eyebrow:"Now Available",title:"Claude Fable 5 leads the Thinking tier",bullets:[{icon:Z,title:"State-of-the-art reasoning",body:"Fable 5 takes the Thinking tier, posting top scores across software engineering, knowledge work, and vision — and outperforming Opus 4.8 on nearly every benchmark Anthropic tested."},{icon:ne,title:"Safety without the slowdown",body:"New classifiers route the small slice of high-risk requests (cybersecurity, bio/chem) back to Opus 4.8. Anthropic reports more than 95% of sessions never trigger a fallback."},{icon:se,title:"Nothing to change",body:"Chats and agents pick up Fable 5 automatically wherever the Thinking tier is selected. Opus 4.8 stays available as the safety fallback."}],learnMoreHref:"https://www.anthropic.com/news/claude-fable-5-mythos-5"},{id:"claude-opus-4-8",date:"2026-05-28",eyebrow:"Now Available",title:"Claude Opus 4.8 is the new default",bullets:[{icon:Z,title:"Smarter thinking, same price",body:"Opus 4.8 now leads the Thinking and Smarter tiers, outperforming Opus 4.7 on coding, reasoning, and agent tasks at the same cost."},{icon:ne,title:"More honest answers",body:"It's about 4× less likely to let a code flaw slip through unflagged, and surfaces uncertainty instead of making unsupported claims."},{icon:se,title:"Nothing to change",body:"Chats and agents pick up Opus 4.8 automatically wherever the Thinking or Smarter tier is selected."}],learnMoreHref:"https://www.anthropic.com/news/claude-opus-4-8"},{id:"enhanced-sidebar",date:"2026-05-28",eyebrow:"Now Available",title:"Enhanced sidebar",bullets:[{icon:Z,title:"A clearer view of what's running",body:"See every task in your organization at a glance, with each agent and status group laid out so you can spot active work without hunting for it."},{icon:ct,title:"Browse one group at a time",body:"Expand the groups you care about and pull in more results on demand — no more endless scrolling to find an older conversation."},{icon:ne,title:"Polished and steadier",body:"Several sidebar bugs are fixed, including empty agent groups showing the right action and status filters returning the right tasks."}]},{id:"smarter-task-delegation",date:"2026-05-27",eyebrow:"Now Available",title:"Smarter task delegation",bullets:[{icon:rt,title:"Real results from delegated agents",body:"When one agent hands work to another, you'll see the full report inline — no more empty replies hiding the work that was done."},{icon:se,title:"Same powers, top to bottom",body:"Delegated agents now work with the same tools, context, and memory as the agent that called them, so complex multi-agent investigations finish on the first try."},{icon:ne,title:"Clearer progress signals",body:"When a delegated task hits its limit or runs into a problem, you get a plain-language message instead of a silent stall."}]},{id:"sidebar-task-groups",date:"2026-05-27",eyebrow:"Now Available",title:"Redesigned sidebar",bullets:[{icon:Z,title:"Group by agent or status",body:"Switch the task list between grouping by agent or by status — pick whichever matches how you're working right now."},{icon:ct,title:"Sharper filters",body:"Narrow the list to your tasks, manual chats, or automations from a compact filter row above the groups."}]},{id:"release-channel",date:"2026-05-26",eyebrow:"Now Available",title:"Release announcements",bullets:[{icon:Z,title:"Heads-up when features ship",body:"New releases surface in a corner card the first time you see them, then stick around in your inbox."},{icon:ln,title:"Unified inbox",body:"Org invitations and product updates now share one chronological feed in the sidebar."}]}],Ct=cs,Ye="studio.release-feed.v1",nt=new Set;let ae="",re={},st=!1;function ds(){if(st)return ae||"{}";try{return localStorage.getItem(Ye)??"{}"}catch{return ae||"{}"}}function Et(t){try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function mt(){const t=ds();return t!==ae&&(ae=t,re=Et(t)),re}function us(t){nt.add(t);const e=o=>{if(!(o.key!==Ye&&o.key!==null)){try{const a=localStorage.getItem(Ye)??"{}",r={...Et(a),...re};re=r,ae=JSON.stringify(r)}catch{}t()}};return window.addEventListener("storage",e),()=>{nt.delete(t),window.removeEventListener("storage",e)}}function ms(t){re=t,ae=JSON.stringify(t);try{localStorage.setItem(Ye,ae),st=!1}catch{st=!0}nt.forEach(e=>e())}function fs(){const t=R.c(7),e=H.useSyncExternalStore(us,mt,mt);let o;t[0]!==e?(o=f=>!!e[f],t[0]=e,t[1]=o):o=t[1];const a=o,s=gs;let r;t[2]!==e?(r=Ct.reduce((f,b)=>e[b.id]?f:f+1,0),t[2]=e,t[3]=r):r=t[3];const i=r;let u;return t[4]!==a||t[5]!==i?(u={isSeen:a,markSeen:s,unseenCount:i},t[4]=a,t[5]=i,t[6]=u):u=t[6],u}function gs(t){re[t]||ms({...re,[t]:{seenAt:new Date().toISOString()}})}const hs=720*60*60*1e3,ps=10080*60*1e3;function ys(t){const[e,o,a]=t.split("-").map(Number);return!e||!o||!a?new Date(t).getTime():new Date(e,o-1,a).getTime()}function bs(t){const e=Ct[0];if(!e)return null;const o=ys(e.date),a=t-o;return a<0||a>hs?null:e}function xs(t){if(t instanceof Date)return t.getTime();if(typeof t=="string"||typeof t=="number"){const e=new Date(t).getTime();return Number.isFinite(e)?e:null}return null}function Ss(t,e){const o=xs(t);return o===null?!1:e-o>=ps}function ws(){const t=R.c(52),e=Y(),o=wn(),a=kn(),s=wt(),r=!!o,i=a===ee.home&&!o;let u;t[0]!==s||t[1]!==r?(u=r&&!!s&&Pt(s),t[0]=s,t[1]=r,t[2]=u):u=t[2];const f=u,{data:b}=$e.useSession(),{isSeen:j,markSeen:c}=fs(),[w,p]=H.useState(!1);let l,g,d;if(t[3]!==j||t[4]!==b?.user?.createdAt){d=Symbol.for("react.early_return_sentinel");e:{const I=Date.now();if(l=bs(I),!l){d=null;break e}if(!Ss(b?.user?.createdAt,I)){d=null;break e}g=j(l.id)}t[3]=j,t[4]=b?.user?.createdAt,t[5]=l,t[6]=g,t[7]=d}else l=t[5],g=t[6],d=t[7];if(d!==Symbol.for("react.early_return_sentinel"))return d;if(g)return null;let x;t[8]!==l.id||t[9]!==r||t[10]!==c||t[11]!==i||t[12]!==f||t[13]!==e?(x=()=>{c(l.id),ls(e,{onOrgHome:i,inProject:r,onSiteEditor:f})},t[8]=l.id,t[9]=r,t[10]=c,t[11]=i,t[12]=f,t[13]=e,t[14]=x):x=t[14];const S=x;let y;t[15]!==e?(y=e("announcements.release.ariaLabel"),t[15]=e,t[16]=y):y=t[16];let m;t[17]!==e?(m=e("announcements.release.dismiss"),t[17]=e,t[18]=m):m=t[18];const _=l.eyebrow,P=l.title;let T;t[19]!==l.id||t[20]!==c?(T=()=>c(l.id),t[19]=l.id,t[20]=c,t[21]=T):T=t[21];let v;t[22]!==l.id||t[23]!==l.learnMoreHref||t[24]!==c||t[25]!==e?(v=l.learnMoreHref?n.jsx("a",{href:l.learnMoreHref,target:"_blank",rel:"noreferrer",onClick:()=>c(l.id),className:"underline-offset-2 hover:text-foreground hover:underline",children:e("announcements.release.learnMore")}):null,t[22]=l.id,t[23]=l.learnMoreHref,t[24]=c,t[25]=e,t[26]=v):v=t[26];let h;t[27]!==l.cta||t[28]!==l.id||t[29]!==c||t[30]!==S?(h=l.cta?"href"in l.cta?n.jsx(z,{asChild:!0,size:"sm",onClick:()=>c(l.id),children:n.jsx("a",{href:l.cta.href,children:l.cta.label})}):l.cta.action==="start-tour"?n.jsx(z,{size:"sm",onClick:S,children:l.cta.label}):n.jsx(z,{size:"sm",onClick:()=>p(!0),children:l.cta.label}):null,t[27]=l.cta,t[28]=l.id,t[29]=c,t[30]=S,t[31]=h):h=t[31];let N;t[32]!==l.bullets?(N=l.bullets.map(vs),t[32]=l.bullets,t[33]=N):N=t[33];let k;t[34]!==N?(k=n.jsx("ul",{className:"flex flex-col gap-3",children:N}),t[34]=N,t[35]=k):k=t[35];let A;t[36]!==l.id||t[37]!==c?(A=I=>{p(I),I||c(l.id)},t[36]=l.id,t[37]=c,t[38]=A):A=t[38];let E;t[39]!==w||t[40]!==A?(E=n.jsx(hn,{open:w,onOpenChange:A}),t[39]=w,t[40]=A,t[41]=E):E=t[41];let C;return t[42]!==l.eyebrow||t[43]!==l.title||t[44]!==h||t[45]!==k||t[46]!==E||t[47]!==y||t[48]!==m||t[49]!==T||t[50]!==v?(C=n.jsxs(_t,{ariaLabel:y,dismissLabel:m,eyebrow:_,title:P,onDismiss:T,footerLeading:v,actions:h,children:[k,E]}),t[42]=l.eyebrow,t[43]=l.title,t[44]=h,t[45]=k,t[46]=E,t[47]=y,t[48]=m,t[49]=T,t[50]=v,t[51]=C):C=t[51],C}function vs(t,e){return n.jsxs("li",{className:"flex items-start gap-3",children:[n.jsx(t.icon,{size:20,className:"mt-0.5 shrink-0 text-muted-foreground"}),n.jsxs("div",{className:"min-w-0",children:[n.jsx("p",{className:"text-sm font-medium text-foreground",children:t.title}),n.jsx("p",{className:"text-xs text-muted-foreground",children:t.body})]})]},e)}const Ot=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform),oe=Ot?"⌘":"Ctrl",B={commandPalette:{keys:[oe,"K"],description:"Command palette"},keyboardShortcuts:{keys:["?"],description:"Keyboard shortcuts"},back:{keys:[oe,"["],description:"Back to previous"},focusChatInput:{keys:[oe,"L"],description:"Focus chat input"},saveAndFormat:{keys:[oe,"S"],description:"Save & format"},sendMessage:{keys:["Enter"],description:"Send message"},newLine:{keys:["Shift","Enter"],description:"New line"},selectOption:{keys:["1-9"],description:"Select option"},applyFilter:{keys:[oe,"Enter"],description:"Apply filter"},togglePlanMode:{keys:[oe,"Shift","L"],description:"Toggle plan mode"},newTask:{keys:["Shift",oe,"S"],description:"New task"},toggleDaemon:{keys:[oe,"D"],description:"Toggle daemon logs"}},js=[{label:"General",shortcuts:[B.commandPalette,B.keyboardShortcuts,B.back,B.newTask,B.toggleDaemon]},{label:"Editor",shortcuts:[B.saveAndFormat]},{label:"Chat",shortcuts:[B.focusChatInput,B.togglePlanMode,B.sendMessage,B.newLine]},{label:"Questions",shortcuts:[B.selectOption]},{label:"Monitoring",shortcuts:[B.applyFilter]}];function ft(t){return Ot?t.metaKey:t.ctrlKey}function ks(t){if(!(t instanceof HTMLElement))return!1;if(t.isContentEditable)return!0;const e=t.tagName;return e==="INPUT"||e==="TEXTAREA"||e==="SELECT"}function Ts(t){const e=R.c(11),{open:o,onOpenChange:a}=t,s=Y();let r;e[0]!==s?(r=s("common.keyboardShortcutsDialog.title"),e[0]=s,e[1]=r):r=e[1];let i;e[2]!==r?(i=n.jsx(vt,{children:n.jsx(jt,{children:r})}),e[2]=r,e[3]=i):i=e[3];let u;e[4]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx("div",{className:"flex flex-col gap-4",children:js.map(Ns)}),e[4]=u):u=e[4];let f;e[5]!==i?(f=n.jsxs(kt,{className:"sm:max-w-md",children:[i,u]}),e[5]=i,e[6]=f):f=e[6];let b;return e[7]!==a||e[8]!==o||e[9]!==f?(b=n.jsx(Tt,{open:o,onOpenChange:a,children:f}),e[7]=a,e[8]=o,e[9]=f,e[10]=b):b=e[10],b}function Ns(t){return n.jsxs("div",{children:[n.jsx("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:t.label}),n.jsx("div",{className:"flex flex-col gap-1.5",children:t.shortcuts.map(_s)})]},t.label)}function _s(t){return n.jsxs("div",{className:"flex items-center justify-between py-1",children:[n.jsx("span",{className:"text-sm",children:t.description}),n.jsx("div",{className:"flex items-center gap-1",children:t.keys.map(As)})]},t.description)}function As(t){return n.jsx("kbd",{className:"inline-flex items-center justify-center min-w-6 h-6 px-1.5 rounded-sm border border-border bg-muted text-muted-foreground text-xs font-mono",children:t},t)}const gt=8;function Ps(t){const{org:e}=ot(),o=Ln({connectionId:Nt,orgId:e.id,orgSlug:e.slug}),{data:a}=Ke({queryKey:Be.globalSearch(e.id,t,gt),enabled:!!o&&t.trim().length>=2,staleTime:15e3,retry:!1,queryFn:async()=>{if(!o)return[];try{return(await o.callTool({name:"GLOBAL_SEARCH",arguments:{query:t,limit:gt}})).structuredContent?.items??[]}catch{return[]}}});return a??[]}function Cs(t){const e=R.c(165),{open:o,onOpenChange:a}=t,s=Y(),r=bt(),{org:i}=ot(),{projects:u,hasProjects:f}=vn(),[b,j]=H.useState(""),c=H.useDeferredValue(b),w=Ps(c);let p;e[0]!==a?(p=()=>{a(!1),j("")},e[0]=a,e[1]=p):p=e[1];const l=p;let g;e[2]!==l?(g=(L,Rt)=>{tt("command_palette_used",{kind:Rt}),L(),l()},e[2]=l,e[3]=g):g=e[3];const d=g;let x;e[4]!==r||e[5]!==i.slug?(x=L=>{if(L.type==="task"){r({to:ee.tasks,params:{org:i.slug,taskKey:L.key??void 0}});return}r({to:ee.agents,params:{org:i.slug,panel:void 0},search:{virtualmcpid:L.virtual_mcp_id??void 0,thread:L.id}})},e[4]=r,e[5]=i.slug,e[6]=x):x=e[6];const S=x;let y;e[7]!==i.slug?(y={org:i.slug},e[7]=i.slug,e[8]=y):y=e[8];const m=y;let _;e[9]!==s?(_=s("sidebar.navDestinations.home"),e[9]=s,e[10]=_):_=e[10];let P;e[11]===Symbol.for("react.memo_cache_sentinel")?(P=n.jsx(dn,{}),e[11]=P):P=e[11];let T;e[12]!==m||e[13]!==_?(T={key:"home",label:_,icon:P,to:ee.home,params:m},e[12]=m,e[13]=_,e[14]=T):T=e[14];let v;e[15]!==s?(v=s("sidebar.navDestinations.reports"),e[15]=s,e[16]=v):v=e[16];let h;e[17]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(un,{}),e[17]=h):h=e[17];let N;e[18]!==m||e[19]!==v?(N={key:"reports",label:v,icon:h,to:ee.reports,params:m},e[18]=m,e[19]=v,e[20]=N):N=e[20];let k;e[21]!==s?(k=s("sidebar.navDestinations.tasks"),e[21]=s,e[22]=k):k=e[22];let A;e[23]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx(lt,{}),e[23]=A):A=e[23];let E;e[24]!==i.slug?(E={org:i.slug,taskKey:void 0},e[24]=i.slug,e[25]=E):E=e[25];let C;e[26]!==k||e[27]!==E?(C={key:"tasks",label:k,icon:A,to:ee.tasks,params:E},e[26]=k,e[27]=E,e[28]=C):C=e[28];let I;e[29]!==s?(I=s("sidebar.navDestinations.library"),e[29]=s,e[30]=I):I=e[30];let O;e[31]===Symbol.for("react.memo_cache_sentinel")?(O=n.jsx(An,{}),e[31]=O):O=e[31];let $;e[32]!==m||e[33]!==I?($={key:"library",label:I,icon:O,to:ee.library,params:m},e[32]=m,e[33]=I,e[34]=$):$=e[34];let M;e[35]!==s?(M=s("sidebar.navDestinations.discover"),e[35]=s,e[36]=M):M=e[36];let te;e[37]===Symbol.for("react.memo_cache_sentinel")?(te=n.jsx(mn,{}),e[37]=te):te=e[37];let Q;e[38]!==m||e[39]!==M?(Q={key:"discover",label:M,icon:te,to:ee.discover,params:m},e[38]=m,e[39]=M,e[40]=Q):Q=e[40];let U;e[41]!==N||e[42]!==C||e[43]!==$||e[44]!==Q||e[45]!==T?(U=[T,N,C,$,Q],e[41]=N,e[42]=C,e[43]=$,e[44]=Q,e[45]=T,e[46]=U):U=e[46];const X=U;let J;e[47]!==l||e[48]!==a?(J=L=>L?a(!0):l(),e[47]=l,e[48]=a,e[49]=J):J=e[49];let G;e[50]!==s?(G=s("commandPalette.title"),e[50]=s,e[51]=G):G=e[51];let q;e[52]!==s?(q=s("commandPalette.description"),e[52]=s,e[53]=q):q=e[53];let K;e[54]!==s?(K=s("commandPalette.placeholder"),e[54]=s,e[55]=K):K=e[55];let V;e[56]!==K||e[57]!==b?(V=n.jsx(Cn,{placeholder:K,value:b,onValueChange:j}),e[56]=K,e[57]=b,e[58]=V):V=e[58];let W;e[59]!==s?(W=s("commandPalette.empty"),e[59]=s,e[60]=W):W=e[60];let D;e[61]!==W?(D=n.jsx(En,{children:W}),e[61]=W,e[62]=D):D=e[62];let F;e[63]!==s?(F=s("commandPalette.goTo"),e[63]=s,e[64]=F):F=e[64];let le;e[65]!==X||e[66]!==d||e[67]!==r?(le=X.map(L=>n.jsxs(ie,{onSelect:()=>d(()=>r({to:L.to,params:L.params}),"destination"),children:[L.icon,n.jsx("span",{children:L.label})]},L.key)),e[65]=X,e[66]=d,e[67]=r,e[68]=le):le=e[68];let ce;e[69]!==F||e[70]!==le?(ce=n.jsx(We,{heading:F,children:le}),e[69]=F,e[70]=le,e[71]=ce):ce=e[71];let de;e[72]!==d||e[73]!==f||e[74]!==r||e[75]!==i.slug||e[76]!==u||e[77]!==s?(de=f&&n.jsx(We,{heading:s("commandPalette.projects"),children:u.map(L=>n.jsxs(ie,{value:`project ${L.title}`,onSelect:()=>d(()=>r({to:ee.agents,params:{org:i.slug,panel:void 0},search:{virtualmcpid:L.id}}),"project"),children:[n.jsx(jn,{icon:L.icon,name:L.title}),n.jsx("span",{children:L.title})]},L.id))}),e[72]=d,e[73]=f,e[74]=r,e[75]=i.slug,e[76]=u,e[77]=s,e[78]=de):de=e[78];let ue;e[79]!==s?(ue=s("commandPalette.actions"),e[79]=s,e[80]=ue):ue=e[80];let me;e[81]!==s?(me=s("commandPalette.newProject"),e[81]=s,e[82]=me):me=e[82];let fe;e[83]!==d||e[84]!==r||e[85]!==i.slug?(fe=()=>d(()=>r({to:ee.agents,params:{org:i.slug,panel:void 0},search:{virtualmcpid:void 0}}),"new_project"),e[83]=d,e[84]=r,e[85]=i.slug,e[86]=fe):fe=e[86];let He;e[87]===Symbol.for("react.memo_cache_sentinel")?(He=n.jsx(dt,{}),e[87]=He):He=e[87];let ge;e[88]!==s?(ge=s("commandPalette.newProject"),e[88]=s,e[89]=ge):ge=e[89];let he;e[90]!==ge?(he=n.jsx("span",{children:ge}),e[90]=ge,e[91]=he):he=e[91];let pe;e[92]!==me||e[93]!==fe||e[94]!==he?(pe=n.jsxs(ie,{value:me,onSelect:fe,children:[He,he]}),e[92]=me,e[93]=fe,e[94]=he,e[95]=pe):pe=e[95];let ye;e[96]!==s?(ye=s("commandPalette.inviteTeammate"),e[96]=s,e[97]=ye):ye=e[97];let be;e[98]!==d||e[99]!==r||e[100]!==m?(be=()=>d(()=>r({to:"/$org/settings/members",params:m}),"invite"),e[98]=d,e[99]=r,e[100]=m,e[101]=be):be=e[101];let Ue;e[102]===Symbol.for("react.memo_cache_sentinel")?(Ue=n.jsx(fn,{}),e[102]=Ue):Ue=e[102];let xe;e[103]!==s?(xe=s("commandPalette.inviteTeammate"),e[103]=s,e[104]=xe):xe=e[104];let Se;e[105]!==xe?(Se=n.jsx("span",{children:xe}),e[105]=xe,e[106]=Se):Se=e[106];let we;e[107]!==ye||e[108]!==be||e[109]!==Se?(we=n.jsxs(ie,{value:ye,onSelect:be,children:[Ue,Se]}),e[107]=ye,e[108]=be,e[109]=Se,e[110]=we):we=e[110];let ve;e[111]!==s?(ve=s("commandPalette.addConnection"),e[111]=s,e[112]=ve):ve=e[112];let je;e[113]!==d||e[114]!==r||e[115]!==m?(je=()=>d(()=>r({to:"/$org/settings/connections",params:m,search:{tab:"all"}}),"add_connection"),e[113]=d,e[114]=r,e[115]=m,e[116]=je):je=e[116];let Je;e[117]===Symbol.for("react.memo_cache_sentinel")?(Je=n.jsx(dt,{}),e[117]=Je):Je=e[117];let ke;e[118]!==s?(ke=s("commandPalette.addConnection"),e[118]=s,e[119]=ke):ke=e[119];let Te;e[120]!==ke?(Te=n.jsx("span",{children:ke}),e[120]=ke,e[121]=Te):Te=e[121];let Ne;e[122]!==ve||e[123]!==je||e[124]!==Te?(Ne=n.jsxs(ie,{value:ve,onSelect:je,children:[Je,Te]}),e[122]=ve,e[123]=je,e[124]=Te,e[125]=Ne):Ne=e[125];let _e;e[126]!==s?(_e=s("commandPalette.settings"),e[126]=s,e[127]=_e):_e=e[127];let Ae;e[128]!==d||e[129]!==r||e[130]!==m?(Ae=()=>d(()=>r({to:"/$org/settings/general",params:m}),"settings"),e[128]=d,e[129]=r,e[130]=m,e[131]=Ae):Ae=e[131];let Ge;e[132]===Symbol.for("react.memo_cache_sentinel")?(Ge=n.jsx(Pn,{}),e[132]=Ge):Ge=e[132];let Pe;e[133]!==s?(Pe=s("commandPalette.settings"),e[133]=s,e[134]=Pe):Pe=e[134];let Ce;e[135]!==Pe?(Ce=n.jsx("span",{children:Pe}),e[135]=Pe,e[136]=Ce):Ce=e[136];let Ee;e[137]!==_e||e[138]!==Ae||e[139]!==Ce?(Ee=n.jsxs(ie,{value:_e,onSelect:Ae,children:[Ge,Ce]}),e[137]=_e,e[138]=Ae,e[139]=Ce,e[140]=Ee):Ee=e[140];let Oe;e[141]!==ue||e[142]!==pe||e[143]!==we||e[144]!==Ne||e[145]!==Ee?(Oe=n.jsxs(We,{heading:ue,children:[pe,we,Ne,Ee]}),e[141]=ue,e[142]=pe,e[143]=we,e[144]=Ne,e[145]=Ee,e[146]=Oe):Oe=e[146];let Ie;e[147]!==d||e[148]!==w||e[149]!==S||e[150]!==s?(Ie=w.length>0&&n.jsx(We,{heading:s("commandPalette.results"),children:w.map(L=>n.jsxs(ie,{value:`${L.title} ${L.id}`,onSelect:()=>d(()=>S(L),L.type),children:[L.type==="thread"?n.jsx(cn,{}):n.jsx(lt,{}),n.jsx("span",{className:"truncate",children:L.title}),L.type==="task"&&L.key&&n.jsx("span",{className:"ml-auto shrink-0 font-mono text-xs text-muted-foreground",children:L.key})]},`${L.type}:${L.id}`))}),e[147]=d,e[148]=w,e[149]=S,e[150]=s,e[151]=Ie):Ie=e[151];let Le;e[152]!==D||e[153]!==ce||e[154]!==de||e[155]!==Oe||e[156]!==Ie?(Le=n.jsxs(On,{children:[D,ce,de,Oe,Ie]}),e[152]=D,e[153]=ce,e[154]=de,e[155]=Oe,e[156]=Ie,e[157]=Le):Le=e[157];let Ve;return e[158]!==o||e[159]!==J||e[160]!==G||e[161]!==q||e[162]!==V||e[163]!==Le?(Ve=n.jsxs(In,{open:o,onOpenChange:J,title:G,description:q,shouldFilter:!1,children:[V,Le]}),e[158]=o,e[159]=J,e[160]=G,e[161]=q,e[162]=V,e[163]=Le,e[164]=Ve):Ve=e[164],Ve}const ze=new Rn(!1);function Es(){ze.set(!0)}function Os(){ze.set(!1)}function Is(){const t=R.c(2),e=H.useSyncExternalStore(ze.subscribe,ze.get);let o;return t[0]!==e?(o=[e,ze.set],t[0]=e,t[1]=o):o=t[1],o}const Ls=300*1e3,Ds=2;function $s(t,e,o){return!e||e===o?{version:null,count:0}:t.version===e?{version:e,count:t.count+1}:{version:e,count:1}}function Rs(t,e){return t.count>=Ds&&t.version!==null&&t.version!==e}function Ms(){const t=R.c(43),e=Y(),o=Fn();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={mutationFn:zs},t[0]=a):a=t[0];const s=qe(a);let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r={queryKey:Be.appVersionCheck(),queryFn:Fs,refetchInterval:Ls,refetchIntervalInBackground:!0,staleTime:0},t[1]=r):r=t[1];const{data:i,dataUpdatedAt:u}=Ke(r),[f,b]=H.useState(0);let j;t[2]===Symbol.for("react.memo_cache_sentinel")?(j={version:null,count:0},t[2]=j):j=t[2];const[c,w]=H.useState(j);u!==f&&(b(u),w(M=>$s(M,i,"4.325.2")));const[p,l]=H.useState(null),g=o;let d;t[3]!==o||t[4]!==s?(d=()=>window.location.reload(),t[3]=o,t[4]=s,t[5]=d):d=t[5];const x=d,S="announcements.version.refresh";if(!Rs(c,p))return null;let y;t[6]!==e?(y=e("announcements.version.ariaLabel"),t[6]=e,t[7]=y):y=t[7];let m;t[8]!==e?(m=e("announcements.version.dismiss"),t[8]=e,t[9]=m):m=t[9];let _;t[10]!==e?(_=e("announcements.version.eyebrow"),t[10]=e,t[11]=_):_=t[11];let P;t[12]!==e?(P=e("announcements.version.title"),t[12]=e,t[13]=P):P=t[13];const T="announcements.version.description";let v;t[14]!==e||t[15]!==T?(v=e(T),t[14]=e,t[15]=T,t[16]=v):v=t[16];let h;t[17]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(at,{size:16}),t[17]=h):h=t[17];let N;t[18]!==c.version?(N=()=>l(c.version),t[18]=c.version,t[19]=N):N=t[19];let k;t[20]!==e?(k=e("announcements.version.currentSession",{version:"4.325.2"}),t[20]=e,t[21]=k):k=t[21];let A;t[22]!==S||t[23]!==e?(A=e(S),t[22]=S,t[23]=e,t[24]=A):A=t[24];const E=g;let C;t[25]!==E?(C=et(E),t[25]=E,t[26]=C):C=t[26];let I;t[27]!==C?(I=n.jsx(at,{size:14,className:C}),t[27]=C,t[28]=I):I=t[28];let O;t[29]!==x||t[30]!==g||t[31]!==A||t[32]!==I?(O=n.jsxs(z,{size:"sm",disabled:g,onClick:x,children:[A,I]}),t[29]=x,t[30]=g,t[31]=A,t[32]=I,t[33]=O):O=t[33];let $;return t[34]!==N||t[35]!==k||t[36]!==O||t[37]!==y||t[38]!==m||t[39]!==_||t[40]!==P||t[41]!==v?($=n.jsx(_t,{ariaLabel:y,dismissLabel:m,eyebrow:_,title:P,description:v,icon:h,tone:"system",onDismiss:N,footerLeading:k,actions:O}),t[34]=N,t[35]=k,t[36]=O,t[37]=y,t[38]=m,t[39]=_,t[40]=P,t[41]=v,t[42]=$):$=t[42],$}async function Fs(){const t=await fetch("/api/config",{cache:"no-store"}),{config:e}=await t.json();return e.version}async function zs(){const t=await fetch("/_local/update/restart",{method:"POST"});if(!t.ok)throw new Error(`restart failed: ${t.status}`)}function qs(t){return{has(){try{return localStorage.getItem(t)==="1"}catch{return!1}},mark(){try{localStorage.setItem(t,"1")}catch{}}}}const Ks=Date.parse("2026-07-21T00:00:00Z"),ht=t=>qs(De.ptBrAnnouncementSeen(t));function Bs(){const t=R.c(35),e=Y(),[o,a]=Kt(),{data:s,isPending:r}=$e.useSession(),i=s?.user,u=i?.id,f=i?.createdAt,b=f!=null&&new Date(f).getTime()<Ks,j=Bt()==="pt-BR",c=!r&&!!u&&b&&j&&o.language==="en"&&!ht(u).has(),[w,p]=H.useState(!1),[l,g]=H.useState(!1);!w&&!r&&(p(!0),c&&u&&(ht(u).mark(),a(Us),g(!0),tt("pt_br_auto_switch_shown")));let d;t[0]===Symbol.for("react.memo_cache_sentinel")?(d=te=>{tt("pt_br_auto_switch_closed",{action:te}),g(!1)},t[0]=d):d=t[0];const x=d;let S;t[1]!==a?(S=()=>{a(Hs),x("switch-back")},t[1]=a,t[2]=S):S=t[2];const y=S;let m;t[3]===Symbol.for("react.memo_cache_sentinel")?(m=te=>!te&&x("dismiss"),t[3]=m):m=t[3];let _;t[4]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx("div",{className:"text-4xl","aria-hidden":"true",children:"🇧🇷"}),t[4]=_):_=t[4];let P;t[5]!==e?(P=e("announcements.ptBr.title"),t[5]=e,t[6]=P):P=t[6];let T;t[7]!==P?(T=n.jsx(jt,{children:P}),t[7]=P,t[8]=T):T=t[8];let v;t[9]!==e?(v=e("announcements.ptBr.description"),t[9]=e,t[10]=v):v=t[10];let h;t[11]!==v?(h=n.jsx(Nn,{children:v}),t[11]=v,t[12]=h):h=t[12];let N;t[13]!==T||t[14]!==h?(N=n.jsxs(vt,{children:[T,h]}),t[13]=T,t[14]=h,t[15]=N):N=t[15];let k;t[16]!==e?(k=e("announcements.ptBr.switchBack"),t[16]=e,t[17]=k):k=t[17];let A;t[18]!==y||t[19]!==k?(A=n.jsx(z,{variant:"outline",onClick:y,children:k}),t[18]=y,t[19]=k,t[20]=A):A=t[20];let E;t[21]===Symbol.for("react.memo_cache_sentinel")?(E=()=>x("ok"),t[21]=E):E=t[21];let C;t[22]!==e?(C=e("announcements.ptBr.ok"),t[22]=e,t[23]=C):C=t[23];let I;t[24]!==C?(I=n.jsx(z,{onClick:E,children:C}),t[24]=C,t[25]=I):I=t[25];let O;t[26]!==A||t[27]!==I?(O=n.jsxs(_n,{children:[A,I]}),t[26]=A,t[27]=I,t[28]=O):O=t[28];let $;t[29]!==O||t[30]!==N?($=n.jsxs(kt,{className:"sm:max-w-md",children:[_,N,O]}),t[29]=O,t[30]=N,t[31]=$):$=t[31];let M;return t[32]!==l||t[33]!==$?(M=n.jsx(Tt,{open:l,onOpenChange:m,children:$}),t[32]=l,t[33]=$,t[34]=M):M=t[34],M}function Hs(t){return{...t,language:"en"}}function Us(t){return{...t,language:"pt-BR"}}function Js(t){const e=Ht(t);return typeof e=="string"?e:void 0}function Gs(){return Js("experiment-pipeline-check"),null}function Vs(t){const e=R.c(1),{activeOrg:o}=t;if(!o)return null;Ut(o.id,{name:o.name??void 0,slug:o.slug??void 0}),Jt();let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(Gs,{}),e[0]=a):a=e[0],a}function Ws(t){const{prev:e,virtualMcpId:o,decopilotId:a,savedLayout:s,opts:r,autosendValue:i}=t,u={mainpanel:void 0};o?u.virtualmcpid=o:e.virtualmcpid&&(u.virtualmcpid=e.virtualmcpid);const f=typeof e.virtualmcpid=="string"?e.virtualmcpid:a,j=(o??f)!==f;let c,w;return r?.panel?w=r.panel:s?(w=s.tab,s.sidepanel!==void 0&&(c=s.sidepanel),s.mainpanel!==void 0&&(u.mainpanel=s.mainpanel)):!j&&e.tabId&&!Gt(e.tabId)&&(w=e.tabId),c!==void 0&&(u.sidepanel=c),r?.autosend&&(u.autosend=i),{tabId:w,search:u}}const It="studio:thread-layout:v3",Ys=50;function Lt(t){const e={};return t===null||typeof t!="object"||(typeof t.tab=="string"&&(e.tab=t.tab),typeof t.mainpanel=="boolean"&&(e.mainpanel=t.mainpanel),typeof t.sidepanel=="boolean"&&(e.sidepanel=t.sidepanel)),e}function Qs(t,e,o,a=Ys){const s=t.filter(([r])=>r!==e);for(s.push([e,Lt(o)]);s.length>a;)s.shift();return s}function it(){try{const t=sessionStorage.getItem(It);if(!t)return[];const e=JSON.parse(t);return Array.isArray(e)?e.filter(o=>Array.isArray(o)&&o.length===2&&typeof o[0]=="string"):[]}catch{return[]}}function Dt(t){try{sessionStorage.setItem(It,JSON.stringify(t))}catch{}}function Xs(t,e){t&&Dt(Qs(it(),t,e))}function Zs(t){if(!t)return null;const e=it().find(([o])=>o===t);return e?Lt(e[1]):null}function Fo(t){if(!t)return;const e=it(),o=e.filter(([a])=>a!==t);o.length!==e.length&&Dt(o)}function $t(t){return{queryKey:Be.homeNextActions(t),queryFn:async()=>{const e=await fetch(`/api/${t}/home-next-actions`,{cache:"no-store"});if(!e.ok)throw new Error("Failed to load home next actions");return await e.json()},staleTime:0,refetchOnWindowFocus:"always"}}function zo(t){const e=R.c(10);let o;e[0]!==t?(o=$t(t),e[0]=t,e[1]=o):o=e[1];const a=Ke(o);let s;e[2]!==a.data?.prompts?(s=a.data?.prompts??[],e[2]=a.data?.prompts,e[3]=s):s=e[3];let r;e[4]!==a.data?.tiles?(r=a.data?.tiles??[],e[4]=a.data?.tiles,e[5]=r):r=e[5];let i;return e[6]!==a.isLoading||e[7]!==s||e[8]!==r?(i={isLoading:a.isLoading,prompts:s,tiles:r},e[6]=a.isLoading,e[7]=s,e[8]=r,e[9]=i):i=e[9],i}function eo(t){const e=R.c(31),{orgSlug:o,orgName:a,domain:s}=t,r=Y();let i;e[0]!==o?(i=()=>{window.location.href=`/api/${encodeURIComponent(o)}/sso/authorize`},e[0]=o,e[1]=i):i=e[1];const u=i,f=to;let b;e[2]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(pt,{className:"h-6 w-6 text-primary"})}),e[2]=b):b=e[2];let j;e[3]!==r?(j=r("common.ssoRequiredScreen.title"),e[3]=r,e[4]=j):j=e[4];let c;e[5]!==j?(c=n.jsx("h3",{className:"text-lg font-medium",children:j}),e[5]=j,e[6]=c):c=e[6];let w;e[7]!==s||e[8]!==a||e[9]!==r?(w=a?n.jsxs(n.Fragment,{children:[n.jsx("strong",{children:a})," ",r("common.ssoRequiredScreen.requiresSsoAuth"),s?` ${r("common.ssoRequiredScreen.via",{domain:s})}`:"","."]}):r("common.ssoRequiredScreen.orgRequiresSsoAuth"),e[7]=s,e[8]=a,e[9]=r,e[10]=w):w=e[10];let p;e[11]!==w?(p=n.jsx("p",{className:"text-sm text-muted-foreground",children:w}),e[11]=w,e[12]=p):p=e[12];let l;e[13]!==c||e[14]!==p?(l=n.jsxs("div",{className:"space-y-2",children:[c,p]}),e[13]=c,e[14]=p,e[15]=l):l=e[15];let g;e[16]!==r?(g=r("common.ssoRequiredScreen.signInWithSso"),e[16]=r,e[17]=g):g=e[17];let d;e[18]!==u||e[19]!==g?(d=n.jsx(z,{onClick:u,children:g}),e[18]=u,e[19]=g,e[20]=d):d=e[20];let x;e[21]!==r?(x=r("common.ssoRequiredScreen.goBack"),e[21]=r,e[22]=x):x=e[22];let S;e[23]!==x?(S=n.jsx(z,{variant:"ghost",onClick:f,children:x}),e[23]=x,e[24]=S):S=e[24];let y;e[25]!==S||e[26]!==d?(y=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[d,S]}),e[25]=S,e[26]=d,e[27]=y):y=e[27];let m;return e[28]!==y||e[29]!==l?(m=n.jsxs(Re,{children:[b,l,y]}),e[28]=y,e[29]=l,e[30]=m):m=e[30],m}function to(){window.location.href="/"}function no(t){const e=R.c(8),{org:o,children:a}=t,r=qn(o.id,o.slug)?.enabled_plugins??null;let i;e[0]!==o.id||e[1]!==o.name||e[2]!==r?(i={id:o.id,organizationId:o.id,slug:"_org",name:o.name,enabledPlugins:r,ui:null},e[0]=o.id,e[1]=o.name,e[2]=r,e[3]=i):i=e[3];const u=i;let f;return e[4]!==a||e[5]!==o||e[6]!==u?(f=n.jsx(nn,{org:o,project:u,children:a}),e[4]=a,e[5]=o,e[6]=u,e[7]=f):f=e[7],f}function so(){const t=bt(),e=Mn(),{org:o}=ot(),a=Vt({strict:!1}),s=wt(),{openPanel:r,closePanel:i}=Tn(),u=pn(),f=yn(),b=bn(),j=xn(),c=(g,d=!0)=>t({to:".",search:g,replace:d}),w=()=>c(g=>({...g,sidepanel:!0})),p=(g,d,x)=>{const S=!!f&&f===g;f&&!S&&Xs(f,{tab:s,mainpanel:a.mainpanel,sidepanel:a.sidepanel});const y=S?null:Zs(g),m=$n(o.id).id,_=Ws({prev:{virtualmcpid:u,tabId:s},virtualMcpId:d,decopilotId:m,savedLayout:y,opts:x,autosendValue:Sn});return j(g,()=>_.search,{virtualMcpId:d,view:{tabId:_.tabId}})};return{openSidePanel:w,setTaskId:p,createNewTask:async(g,d,x)=>{const S=crypto.randomUUID(),y=g??b;try{await e?.create({id:S,virtual_mcp_id:y,...d?{branch:d}:{}})}catch{}p(S,y,x)},openTab:r,closeTab:i}}const oo=new Set(["/$org/","/$org/home"]);function io(){const t=R.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e={select:ao},t[0]=e):e=t[0],Zt(e)}function ao(t){const e=t.matches.at(-1)?.fullPath;return e!==void 0&&oo.has(e)}function ro(){const t=R.c(55);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org",shouldThrow:!1},t[0]=e):e=t[0];const a=Wt(e)?.params.org,[s,r]=H.useState(!1),[i,u]=Is(),f=Yt(),b=io(),j=a??"";let c;t[1]!==j?(c=$t(j),t[1]=j,t[2]=c):c=t[2];const w=!!a&&b;let p;t[3]!==c||t[4]!==w?(p={...c,enabled:w},t[3]=c,t[4]=w,t[5]=p):p=t[5],Ke(p);const{data:l}=$e.useSession(),g=l?.user?.id;let d;t[6]!==a||t[7]!==g?(d=a&&g?Qt(g,a):null,t[6]=a,t[7]=g,t[8]=d):d=t[8];const x=d;let S,y;t[9]!==f?(S=()=>{const D=F=>{if(ft(F)&&F.code==="KeyK"){F.preventDefault(),Es();return}if(F.key==="?"&&!ks(F.target)){F.preventDefault(),r(!0);return}ft(F)&&F.code==="BracketLeft"&&f.history.canGoBack()&&(F.preventDefault(),f.history.back())};return document.addEventListener("keydown",D),()=>document.removeEventListener("keydown",D)},y=[f],t[9]=f,t[10]=S,t[11]=y):(S=t[10],y=t[11]),H.useEffect(S,y);let m;t[12]!==a?(m=Be.activeOrganization(a),t[12]=a,t[13]=m):m=t[13];let _;t[14]!==a||t[15]!==g?(_=async()=>{if(!a)return null;performance.mark("mesh:active-org-fetch:start");const{data:D}=await $e.organization.getFullOrganization({query:{organizationSlug:a}}).finally(lo),F=Xe(D);return D&&!F&&localStorage.setItem(De.lastOrgSlug(),a),g&&D&&en(g,a,D),D},t[14]=a,t[15]=g,t[16]=_):_=t[16];const P=x?x.data:void 0,T=x?.updatedAt;let v;t[17]!==P||t[18]!==T||t[19]!==m||t[20]!==_?(v={queryKey:m,queryFn:_,initialData:P,initialDataUpdatedAt:T,gcTime:1/0,refetchOnWindowFocus:!1},t[17]=P,t[18]=T,t[19]=m,t[20]=_,t[21]=v):v=t[21];const{data:h}=yt(v),N=h?.id,k=h?.slug,{data:A}=Kn(N,k),E=!!A?.ssoRequired&&!A.authenticated,C=N??"",I=k??"";let O;t[22]!==C||t[23]!==I?(O=Dn({connectionId:Nt,orgId:C,orgSlug:I}),t[22]=C,t[23]=I,t[24]=O):O=t[24];const $=!!N&&!!k;let M;if(t[25]!==O||t[26]!==$?(M={...O,enabled:$},t[25]=O,t[26]=$,t[27]=M):M=t[27],Ke(M),(!h||Xe(h)||E)&&Os(),!h){let D;return t[28]!==a?(D=n.jsx(Zn,{orgSlug:a}),t[28]=a,t[29]=D):D=t[29],D}if(Xe(h)){localStorage.getItem(De.lastOrgSlug())===a&&localStorage.removeItem(De.lastOrgSlug());let D;return t[30]!==h.name?(D=n.jsx(Xt,{orgName:h.name}),t[30]=h.name,t[31]=D):D=t[31],D}if(E){let D;return t[32]!==h.id||t[33]!==h.name||t[34]!==h.slug||t[35]!==A.domain?(D=n.jsx(eo,{orgId:h.id,orgSlug:h.slug,orgName:h.name,domain:A.domain}),t[32]=h.id,t[33]=h.name,t[34]=h.slug,t[35]=A.domain,t[36]=D):D=t[36],D}const Q=h.logo??null;let U;t[37]!==h||t[38]!==Q?(U={...h,logo:Q},t[37]=h,t[38]=Q,t[39]=U):U=t[39];let X;t[40]!==h?(X=n.jsx(Vs,{activeOrg:h}),t[40]=h,t[41]=X):X=t[41];let J;t[42]===Symbol.for("react.memo_cache_sentinel")?(J=n.jsx(tn,{}),t[42]=J):J=t[42];let G;t[43]===Symbol.for("react.memo_cache_sentinel")?(G=n.jsxs("div",{className:"fixed bottom-6 right-6 z-50 flex w-[min(360px,calc(100vw-3rem))] flex-col gap-3",children:[n.jsx(ws,{}),n.jsx(Ms,{})]}),t[43]=G):G=t[43];let q;t[44]!==i||t[45]!==u?(q=i&&n.jsx(Cs,{open:i,onOpenChange:u}),t[44]=i,t[45]=u,t[46]=q):q=t[46];let K;t[47]!==s?(K=n.jsx(Ts,{open:s,onOpenChange:r}),t[47]=s,t[48]=K):K=t[48];let V;t[49]===Symbol.for("react.memo_cache_sentinel")?(V=n.jsx(Bs,{}),t[49]=V):V=t[49];let W;return t[50]!==U||t[51]!==X||t[52]!==q||t[53]!==K?(W=n.jsxs(no,{org:U,children:[X,J,G,q,K,V]}),t[50]=U,t[51]=X,t[52]=q,t[53]=K,t[54]=W):W=t[54],W}function lo(){performance.mark("mesh:active-org-fetch:end"),performance.measure("mesh:active-org-fetch","mesh:active-org-fetch:start","mesh:active-org-fetch:end")}function co(){const t=R.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(zn,{children:n.jsx(ro,{})}),t[0]=e):e=t[0],e}const qo=Object.freeze(Object.defineProperty({__proto__:null,default:co,usePanelActions:so},Symbol.toStringTag,{value:"Module"}));export{B as K,ft as a,zo as b,qo as c,Fo as f,Pt as i,Es as o,Ro as r,Mo as s,so as u};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-f961NKWZ.js","assets/index-CxLq_ov_.js","assets/index-CiiXjYYX.css","assets/Tool02-8qVRgTeE.js","assets/CheckCircle-DLOuSHro.js","assets/Settings02-B2gnPQ3Q.js","assets/use-mcp-client-Bzii9bW9.js","assets/constants-DNuUCxmW.js","assets/auth-Dy3Ai_hi.js","assets/useInfiniteQuery-Cy80sU-k.js","assets/use-infinite-scroll-D8hgBz9p.js","assets/badge-DiXK5Efu.js","assets/input-t2vq_Yhz.js","assets/dropdown-menu-C9hHhEdP.js","assets/Check-DFnPCTEg.js","assets/ChevronRight-BcTQG1DI.js","assets/DotsVertical-CqFpz0HG.js","assets/table-Bi-psIbe.js","assets/toggle-group-HQ3bB1sR.js","assets/use-view-mode-BVUyWYvX.js","assets/Globe01-DyhA33s1.js","assets/SearchMd-BYpvO9Ao.js","assets/dialog-Do-ZnJpa.js","assets/AlertCircle-B0exjy2G.js","assets/Download01-GnhueTng.js","assets/Upload01-B1Qytz_u.js","assets/metadata-dUsYcpuu.js","assets/alert-dialog-Bb1OlmEm.js","assets/Trash01-CV8Q1VzZ.js","assets/label-HkRxmwei.js","assets/select-CNhOTIVN.js","assets/ChevronUp-CVSn4-gi.js","assets/switch--G1maXos.js","assets/textarea-DFMKKUyA.js","assets/ArrowLeft-DDVITG8K.js","assets/XCircle-BN22j-Jn.js","assets/Link01-BHe0dd0_.js","assets/safe-image-url-D5z803Ot.js","assets/checkbox-CusZZICa.js","assets/Eye-CHLagXa7.js","assets/LinkExternal01-CvQ-ylaK.js","assets/use-copy-DvOjkuTL.js","assets/Copy01-DXf2ReD_.js","assets/Key01-CNitiCfD.js","assets/Plus-D-mogJXC.js","assets/mcp-oauth-BHYwKN2k.js","assets/Play-CR4MAXKW.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{c as n,d as c,f as m,j as t,h as f,r as l,bm as p}from"./index-CxLq_ov_.js";import{R as u}from"./require-capability-B5tbYFX0.js";import"./access-gate-BsoMn5at.js";import"./capability-load-error-RzShLZ2L.js";const g=l.lazy(()=>p(()=>import("./registry-layout-f961NKWZ.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46])));function h(){const e=n.c(5),i=c();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org"},e[0]=s):s=e[0];const{org:o}=m(s);let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"h-full flex items-center justify-center",children:t.jsx(f,{className:"size-5 text-muted-foreground"})}),e[1]=r):r=e[1];let a;return e[2]!==i||e[3]!==o?(a=t.jsx(u,{capability:"registry:manage",area:"the registry",children:t.jsx(l.Suspense,{fallback:r,children:t.jsx(g,{onBack:()=>i({to:"/$org/settings/store",params:{org:o}})})})}),e[2]=i,e[3]=o,e[4]=a):a=e[4],a}export{h as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as te,j as s,du as ye,b as ue,r as ce,B as ee,l as je,t as ae,b5 as be}from"./index-CxLq_ov_.js";import{s as ge}from"./Plus-D-mogJXC.js";import{c as Re,d as ve,b as Se,f as De,g as Ne,e as _e,a as Ce,A as Pe}from"./alert-dialog-Bb1OlmEm.js";import{d as Ae,h as ke,c as we,e as Oe,b as ze,D as Ee}from"./dialog-Do-ZnJpa.js";import{I as Ie}from"./input-t2vq_Yhz.js";import{G as xe,a as $e}from"./github-repo-picker-CuXoDtLm.js";import{a as Fe,d as Te,h as Ge,t as He}from"./cards-BdTZBvrL.js";import{R as Be}from"./require-capability-B5tbYFX0.js";import"./collection-search-gbLnoGWa.js";import"./SearchMd-BYpvO9Ao.js";import"./use-debounced-value-BLtVz2Ja.js";import"./use-connection-B3hf1saX.js";import"./use-mcp-client-Bzii9bW9.js";import"./constants-DNuUCxmW.js";import"./auth-Dy3Ai_hi.js";import"./authenticate-and-persist-oauth-DBIvzM9b.js";import"./mcp-oauth-BHYwKN2k.js";import"./ArrowLeft-DDVITG8K.js";import"./LinkExternal01-CvQ-ylaK.js";import"./Share07-Bu5e840D.js";import"./use-mcp-tools-3xoGjo6f.js";import"./extract-connection-data-Cq3FrLyn.js";import"./metadata-dUsYcpuu.js";import"./connection-pv2H4wMd.js";import"./use-navigate-to-agent-CUFdthzD.js";import"./use-destination-route-BePPmQxb.js";import"./use-virtual-mcp-Drh4_cTK.js";import"./hooks-D1D8x6_l.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-xVL-mPxb.js";import"./task-board-CcPPQONZ.js";import"./schema-ChmhgfCW.js";import"./thread-intent-BCmi7agT.js";import"./slugify-CEUa2lfQ.js";import"./github-repo-COLY3wWI.js";import"./provision-repo-scoped-github-connection-WQFARyHG.js";import"./folder-icon-P0KHTdfp.js";import"./Eye-CHLagXa7.js";import"./DotsVertical-CqFpz0HG.js";import"./Download01-GnhueTng.js";import"./Globe01-DyhA33s1.js";import"./Key01-CNitiCfD.js";import"./Palette-DgVW07vN.js";import"./Trash01-CV8Q1VzZ.js";import"./Zap-BMyl5tLM.js";import"./dropdown-menu-C9hHhEdP.js";import"./Check-DFnPCTEg.js";import"./ChevronRight-BcTQG1DI.js";import"./file-type-icon-BoulZj-0.js";import"./access-gate-BsoMn5at.js";import"./capability-load-error-RzShLZ2L.js";function qe(e){return e.toLowerCase().replace(/[^a-z0-9_.-]+/g,"-").replace(/^[.-]+|[.-]+$/g,"").slice(0,128)}function Le(e,t){return e.lastSyncError?{label:e.lastSyncError,error:!0}:e.lastSyncedAt?{label:t("library.syncedRepos.syncedAgo",{ago:He(e.lastSyncedAt)}),error:!1}:{label:t("library.syncedRepos.waitingFirstSync"),error:!1}}function Ve(e){const t=te.c(32),{config:l,onRemove:i}=e,c=ue();let u;t[0]!==l||t[1]!==c?(u=Le(l,c),t[0]=l,t[1]=c,t[2]=u):u=t[2];const p=u;let o;t[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:s.jsx(xe,{size:16,className:"text-muted-foreground"})}),t[3]=o):o=t[3];let a;t[4]!==l.repoName||t[5]!==l.repoOwner?(a=s.jsxs("span",{className:"font-medium text-sm truncate",children:[l.repoOwner,"/",l.repoName]}),t[4]=l.repoName,t[5]=l.repoOwner,t[6]=a):a=t[6];let n;t[7]!==l.ref?(n=s.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:["@",l.ref]}),t[7]=l.ref,t[8]=n):n=t[8];let g;t[9]!==a||t[10]!==n?(g=s.jsxs("div",{className:"flex items-center gap-2",children:[a,n]}),t[9]=a,t[10]=n,t[11]=g):g=t[11];const m=p.error?"text-destructive":"text-muted-foreground";let d;t[12]!==m?(d=je("text-xs mt-0.5 truncate",m),t[12]=m,t[13]=d):d=t[13];let f;t[14]!==l.volume||t[15]!==c?(f=c("settings.syncedRepos.rowSubtitle",{volume:l.volume}),t[14]=l.volume,t[15]=c,t[16]=f):f=t[16];let y;t[17]!==p.label||t[18]!==d||t[19]!==f?(y=s.jsxs("p",{className:d,children:[f," ·"," ",p.label]}),t[17]=p.label,t[18]=d,t[19]=f,t[20]=y):y=t[20];let x;t[21]!==g||t[22]!==y?(x=s.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[o,s.jsxs("div",{className:"min-w-0",children:[g,y]})]}),t[21]=g,t[22]=y,t[23]=x):x=t[23];let j;t[24]!==c?(j=c("settings.syncedRepos.remove"),t[24]=c,t[25]=j):j=t[25];let h;t[26]!==i||t[27]!==j?(h=s.jsx(ee,{variant:"outline",size:"sm",onClick:i,children:j}),t[26]=i,t[27]=j,t[28]=h):h=t[28];let b;return t[29]!==x||t[30]!==h?(b=s.jsxs("div",{className:"flex items-center justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[x,h]}),t[29]=x,t[30]=h,t[31]=b):b=t[31],b}function Je(e){const t=te.c(21),{onAdd:l}=e,i=ue();let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:s.jsx(xe,{size:20,className:"text-muted-foreground"})}),t[0]=c):c=t[0];let u;t[1]!==i?(u=i("settings.syncedRepos.emptyTitle"),t[1]=i,t[2]=u):u=t[2];let p;t[3]!==u?(p=s.jsx("p",{className:"font-medium text-sm",children:u}),t[3]=u,t[4]=p):p=t[4];let o;t[5]!==i?(o=i("settings.syncedRepos.emptyDescription"),t[5]=i,t[6]=o):o=t[6];let a;t[7]!==o?(a=s.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:o}),t[7]=o,t[8]=a):a=t[8];let n;t[9]!==p||t[10]!==a?(n=s.jsxs("div",{children:[p,a]}),t[9]=p,t[10]=a,t[11]=n):n=t[11];let g;t[12]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(ge,{size:14}),t[12]=g):g=t[12];let m;t[13]!==i?(m=i("settings.syncedRepos.addRepo"),t[13]=i,t[14]=m):m=t[14];let d;t[15]!==l||t[16]!==m?(d=s.jsxs(ee,{onClick:l,size:"sm",className:"mt-2",children:[g,m]}),t[15]=l,t[16]=m,t[17]=d):d=t[17];let f;return t[18]!==n||t[19]!==d?(f=s.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[c,n,d]}),t[18]=n,t[19]=d,t[20]=f):f=t[20],f}function Ke(){const e=te.c(107),t=ue(),l=Fe(),i=Te(),c=Ge(),[u,p]=ce.useState(!1),[o,a]=ce.useState(null),[n,g]=ce.useState(""),[m,d]=ce.useState(null);let f;e[0]!==i||e[1]!==o||e[2]!==t||e[3]!==n?(f=function(){!o||!n.trim()||i.mutate({connectionId:o.connectionId,volume:n.trim()},{onSuccess:R=>{a(null),ae.success(t("settings.syncedRepos.created",{volume:R.volume}))},onError:R=>{ae.error(R instanceof Error?R.message:t("settings.syncedRepos.failed"))}})},e[0]=i,e[1]=o,e[2]=t,e[3]=n,e[4]=f):f=e[4];const y=f;let x;e[5]!==m||e[6]!==c||e[7]!==t?(x=function(){m&&c.mutate(m.id,{onSuccess:()=>ae.success(t("settings.syncedRepos.removed")),onError:R=>ae.error(R instanceof Error?R.message:t("settings.syncedRepos.failed")),onSettled:()=>d(null)})},e[5]=m,e[6]=c,e[7]=t,e[8]=x):x=e[8];const j=x;if(l.isPending){let r;return e[9]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(be,{className:"h-32 w-full"}),e[9]=r):r=e[9],r}let h;e[10]!==l.data?(h=l.data??[],e[10]=l.data,e[11]=h):h=e[11];const b=h;let v;e[12]!==t?(v=t("settings.syncedRepos.pageDescription"),e[12]=t,e[13]=v):v=e[13];let S;e[14]!==v?(S=s.jsx("p",{className:"text-sm text-muted-foreground",children:v}),e[14]=v,e[15]=S):S=e[15];let D;e[16]!==b||e[17]!==t?(D=b.length===0?s.jsx(Je,{onAdd:()=>p(!0)}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"flex items-center justify-end",children:s.jsxs(ee,{onClick:()=>p(!0),size:"sm",children:[s.jsx(ge,{size:14}),t("settings.syncedRepos.addRepo")]})}),s.jsx("section",{className:"rounded-2xl border border-border/60 bg-background px-5 py-2",children:b.map(r=>s.jsx(Ve,{config:r,onRemove:()=>d(r)},r.id))})]}),e[16]=b,e[17]=t,e[18]=D):D=e[18];let N;e[19]!==t?(N=t("settings.syncedRepos.pickerTitle"),e[19]=t,e[20]=N):N=e[20];let se;e[21]===Symbol.for("react.memo_cache_sentinel")?(se=r=>{p(!1),a(r),g(qe(r.repo.name))},e[21]=se):se=e[21];let _;e[22]!==u||e[23]!==N?(_=s.jsx($e,{mode:"connection",open:u,onOpenChange:p,title:N,onImportComplete:se}),e[22]=u,e[23]=N,e[24]=_):_=e[24];const me=o!==null;let ie;e[25]===Symbol.for("react.memo_cache_sentinel")?(ie=r=>{r||a(null)},e[25]=ie):ie=e[25];let C;e[26]!==t?(C=t("settings.syncedRepos.nameDialogTitle"),e[26]=t,e[27]=C):C=e[27];let P;e[28]!==C?(P=s.jsx(Ae,{children:C}),e[28]=C,e[29]=P):P=e[29];const de=o?`${o.repo.owner}/${o.repo.name}`:"";let A;e[30]!==t||e[31]!==de?(A=t("settings.syncedRepos.nameDialogDescription",{repo:de}),e[30]=t,e[31]=de,e[32]=A):A=e[32];let k;e[33]!==A?(k=s.jsx(ke,{children:A}),e[33]=A,e[34]=k):k=e[34];let w;e[35]!==P||e[36]!==k?(w=s.jsxs(we,{children:[P,k]}),e[35]=P,e[36]=k,e[37]=w):w=e[37];let le;e[38]===Symbol.for("react.memo_cache_sentinel")?(le=r=>g(r.target.value),e[38]=le):le=e[38];let O;e[39]!==t?(O=t("settings.syncedRepos.namePlaceholder"),e[39]=t,e[40]=O):O=e[40];let z;e[41]!==O||e[42]!==n?(z=s.jsx(Ie,{value:n,onChange:le,placeholder:O,autoFocus:!0}),e[41]=O,e[42]=n,e[43]=z):z=e[43];let ne;e[44]===Symbol.for("react.memo_cache_sentinel")?(ne=()=>a(null),e[44]=ne):ne=e[44];const he=i.isPending;let E;e[45]!==t?(E=t("settings.syncedRepos.cancel"),e[45]=t,e[46]=E):E=e[46];let I;e[47]!==i.isPending||e[48]!==E?(I=s.jsx(ee,{variant:"outline",onClick:ne,disabled:he,children:E}),e[47]=i.isPending,e[48]=E,e[49]=I):I=e[49];let $;e[50]!==i.isPending||e[51]!==n?($=!n.trim()||i.isPending,e[50]=i.isPending,e[51]=n,e[52]=$):$=e[52];let F;e[53]!==i.isPending||e[54]!==t?(F=i.isPending?t("settings.syncedRepos.creating"):t("settings.syncedRepos.create"),e[53]=i.isPending,e[54]=t,e[55]=F):F=e[55];let T;e[56]!==y||e[57]!==$||e[58]!==F?(T=s.jsx(ee,{disabled:$,onClick:y,children:F}),e[56]=y,e[57]=$,e[58]=F,e[59]=T):T=e[59];let G;e[60]!==I||e[61]!==T?(G=s.jsxs(Oe,{children:[I,T]}),e[60]=I,e[61]=T,e[62]=G):G=e[62];let H;e[63]!==w||e[64]!==z||e[65]!==G?(H=s.jsxs(ze,{className:"sm:max-w-sm",children:[w,z,G]}),e[63]=w,e[64]=z,e[65]=G,e[66]=H):H=e[66];let B;e[67]!==H||e[68]!==me?(B=s.jsx(Ee,{open:me,onOpenChange:ie,children:H}),e[67]=H,e[68]=me,e[69]=B):B=e[69];const pe=m!==null;let oe;e[70]===Symbol.for("react.memo_cache_sentinel")?(oe=r=>{r||d(null)},e[70]=oe):oe=e[70];const fe=m?.volume??"";let q;e[71]!==t||e[72]!==fe?(q=t("settings.syncedRepos.removeTitle",{volume:fe}),e[71]=t,e[72]=fe,e[73]=q):q=e[73];let L;e[74]!==q?(L=s.jsx(Re,{children:q}),e[74]=q,e[75]=L):L=e[75];let V;e[76]!==t?(V=t("settings.syncedRepos.removeDescription"),e[76]=t,e[77]=V):V=e[77];let J;e[78]!==V?(J=s.jsx(ve,{children:V}),e[78]=V,e[79]=J):J=e[79];let K;e[80]!==L||e[81]!==J?(K=s.jsxs(Se,{children:[L,J]}),e[80]=L,e[81]=J,e[82]=K):K=e[82];let M;e[83]!==t?(M=t("settings.syncedRepos.cancel"),e[83]=t,e[84]=M):M=e[84];let Q;e[85]!==M?(Q=s.jsx(De,{children:M}),e[85]=M,e[86]=Q):Q=e[86];let U;e[87]!==t?(U=t("settings.syncedRepos.remove"),e[87]=t,e[88]=U):U=e[88];let W;e[89]!==j||e[90]!==U?(W=s.jsx(Ne,{onClick:j,children:U}),e[89]=j,e[90]=U,e[91]=W):W=e[91];let X;e[92]!==Q||e[93]!==W?(X=s.jsxs(_e,{children:[Q,W]}),e[92]=Q,e[93]=W,e[94]=X):X=e[94];let Y;e[95]!==K||e[96]!==X?(Y=s.jsxs(Ce,{children:[K,X]}),e[95]=K,e[96]=X,e[97]=Y):Y=e[97];let Z;e[98]!==pe||e[99]!==Y?(Z=s.jsx(Pe,{open:pe,onOpenChange:oe,children:Y}),e[98]=pe,e[99]=Y,e[100]=Z):Z=e[100];let re;return e[101]!==B||e[102]!==S||e[103]!==Z||e[104]!==D||e[105]!==_?(re=s.jsxs(s.Fragment,{children:[S,D,_,B,Z]}),e[101]=B,e[102]=S,e[103]=Z,e[104]=D,e[105]=_,e[106]=re):re=e[106],re}function Me(){const e=te.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(ye,{group:"storage",children:s.jsx(Ke,{})}),e[0]=t):t=e[0],t}function Kt(){const e=te.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Be,{capability:"file-configs:manage",area:"files",children:s.jsx(Me,{})}),e[0]=t):t=e[0],t}export{Kt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{bW as Us,c as O,l as J,j as n,h as Qe,r as G,I as ss,G as Gs,o as oe,b as Q,b5 as Hs,W as le,d as ns,a6 as os,_ as is,L as Qs,a1 as Le,a2 as Me,a4 as Re,a as Dt,F as qs,ar as Ws,as as Ys,B as ye,t as de,H as Xs,J as Js,K as fe,n as at,a7 as At,m as lt,bv as Zs,e as Oe,bl as en,ap as tn}from"./index-CxLq_ov_.js";import{c as rs,u as sn,d as as}from"./thread-route-Ckn7Kp8P.js";import{t as Ge}from"./ChevronUp-CVSn4-gi.js";import{A as ls,N as nn,s as jt,aJ as on,aK as rn,aL as Kt,aM as an,t as ln,aN as cn,a6 as dn,aO as un,p as fn,aP as mn,a4 as bt,a3 as pn,aa as gn}from"./agent-icon-DyMYbwSC.js";import{a as cs,i as hn,e as xn,S as jn,f as bn}from"./constants-DNuUCxmW.js";import{b as Tt,u as yn}from"./use-virtual-mcp-Drh4_cTK.js";import{g as vn,p as Cn,r as kn}from"./github-repo-COLY3wWI.js";import{T as ds}from"./toolbar-icon-button-DEqW4Jpo.js";import{P as ct,a as Ue,b as dt}from"./popover-CpTW2alp.js";import{D as It,a as Ft,b as Bt,c as Nn,e as Sn,f as us,g as fs,d as wn}from"./drawer-D4J_5BCc.js";import{i as _n}from"./SearchMd-BYpvO9Ao.js";import{i as qe}from"./Check-DFnPCTEg.js";import{s as Ye}from"./Plus-D-mogJXC.js";import{G as ms,a as Dn}from"./github-repo-picker-CuXoDtLm.js";import{g as An,u as Tn,b as ps}from"./hooks-D1D8x6_l.js";import{g as In,b as gs,P as Fn}from"./project-icon-BY6MP5uE.js";import{u as hs}from"./shell-layout-CAB27XFS.js";import{a as Bn}from"./use-navigate-to-agent-CUFdthzD.js";import{d as Pn}from"./thread-intent-BCmi7agT.js";import{C as En}from"./collection-search-gbLnoGWa.js";import{g as Vn,b as $n,a as On,e as Ln}from"./extract-connection-data-Cq3FrLyn.js";import{u as xs,a as js,g as Mn,C as yt}from"./connection-card-D-rWqndL.js";import{D as bs,b as ys,c as vs,d as Cs,h as Rn,e as Kn}from"./dialog-Do-ZnJpa.js";import{d as pe,a as ge,e as he,b as xe,c as je,F as zt}from"./form-j23QTiVs.js";import{I as Se}from"./input-t2vq_Yhz.js";import{S as zn,a as Un,b as Gn,c as Hn,d as He}from"./select-CNhOTIVN.js";import{T as Qn}from"./textarea-DFMKKUyA.js";import{b as ks}from"./use-connection-B3hf1saX.js";import{n as ot,a as vt,i as Ns}from"./Tool02-8qVRgTeE.js";import{b as qn,d as Wn}from"./UserSquare-HSvWRq_9.js";import{s as Yn}from"./XClose-N8lMtUXr.js";import{c as Xn,i as et,a as Ut,E as Jn,p as Zn,b as eo,d as to}from"./connection-form-helpers-nmBh-twk.js";import{a as Ct}from"./authenticate-and-persist-oauth-DBIvzM9b.js";import{g as so}from"./connection-slug-CITJ0kGN.js";import{C as no}from"./collection-tabs-BGNThV3i.js";import{u as Gt}from"./use-infinite-scroll-D8hgBz9p.js";import{B as tt}from"./badge-DiXK5Efu.js";import{u as oo}from"./useSuspenseInfiniteQuery-DKd6bR20.js";import{u as io}from"./use-mcp-client-Bzii9bW9.js";import{g as it}from"./metadata-dUsYcpuu.js";import{u as ro}from"./use-ai-providers-DRa-WP8c.js";import{a as ao}from"./use-file-configs-BEZ_kwp8.js";import{d as lo}from"./use-organization-settings-DRchtNm3.js";import{r as co}from"./site-slug-uya6Wp4-.js";import{T as uo,C as Pt,c as fo,d as mo,S as Nt}from"./task-board-CcPPQONZ.js";import{t as po}from"./decopilot-sse-pool-xVL-mPxb.js";import{u as go}from"./use-decopilot-events-CkAI1xCS.js";import{A as Ht}from"./avatar-B8b2hWV1.js";import{h as rt,D as Ss,b as ws,g as _s,c as Ds}from"./dropdown-menu-C9hHhEdP.js";import{e as Ke,a as Et,c as Vt,d as Ce,b as $t,C as Ot}from"./command-CeyGqPmM.js";import{s as ho}from"./TrendUp01-yPe3UG0T.js";import{a as xo}from"./Settings02-B2gnPQ3Q.js";import{s as Qt}from"./User01-DmJKrYPV.js";import{g as qt}from"./get-initials-D-f_fDFw.js";import{i as jo}from"./AlertCircle-B0exjy2G.js";import{i as bo}from"./CheckCircle-DLOuSHro.js";import{a as As}from"./DotsVertical-CqFpz0HG.js";import{s as yo}from"./Eye-CHLagXa7.js";import{i as vo}from"./Shield01-BAHmK5_B.js";const Co=Us("Bug",[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]]);function ko(t){const e=O.c(21),{value:s,onChange:o,placeholder:a,onKeyDown:r,className:i,isSearching:c,disabled:l}=t,f=a===void 0?"Search...":a;let u;e[0]!==i?(u=J("shrink-0 w-full border-b border-border h-12",i),e[0]=i,e[1]=u):u=e[1];const m=l?"cursor-not-allowed opacity-50":"cursor-text";let d;e[2]!==m?(d=J("flex items-center gap-2.5 h-12 px-4",m),e[2]=m,e[3]=d):d=e[3];let p;e[4]!==c?(p=c?n.jsx(Qe,{className:"size-4 text-muted-foreground shrink-0"}):n.jsx(_n,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=c,e[5]=p):p=e[5];let g;e[6]!==o?(g=N=>o(N.target.value),e[6]=o,e[7]=g):g=e[7];let h;e[8]!==l||e[9]!==r||e[10]!==f||e[11]!==g||e[12]!==s?(h=n.jsx("input",{type:"text",value:s,onChange:g,onKeyDown:r,placeholder:f,disabled:l,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=l,e[9]=r,e[10]=f,e[11]=g,e[12]=s,e[13]=h):h=e[13];let x;e[14]!==d||e[15]!==p||e[16]!==h?(x=n.jsxs("label",{className:d,children:[p,h]}),e[14]=d,e[15]=p,e[16]=h,e[17]=x):x=e[17];let j;return e[18]!==u||e[19]!==x?(j=n.jsx("div",{className:u,children:x}),e[18]=u,e[19]=x,e[20]=j):j=e[20],j}function No(t,e,s){if(!s)return null;const o=An(t,e);return o?o.threads.get().find(r=>r.id===s)?.branch??null:null}const Ts=G.createContext(null);function aa(t){const e=O.c(5),{children:s}=t,[o,a]=G.useState(!1);let r;e[0]!==o?(r={empty:o,setEmpty:a},e[0]=o,e[1]=r):r=e[1];let i;return e[2]!==s||e[3]!==r?(i=n.jsx(Ts.Provider,{value:r,children:s}),e[2]=s,e[3]=r,e[4]=i):i=e[4],i}function So(){return G.useContext(Ts)?.empty??!1}function wo(t){const e=O.c(6),{value:s,onChange:o}=t,a=Q();let r;e[0]!==a?(r=a("sidebar.agentsSection.searchAgents"),e[0]=a,e[1]=r):r=e[1];let i;return e[2]!==o||e[3]!==r||e[4]!==s?(i=n.jsx(ko,{value:s,onChange:o,placeholder:r}),e[2]=o,e[3]=r,e[4]=s,e[5]=i):i=e[5],i}function _o(){const t=O.c(4),e=Q();let s;t[0]!==e?(s=e("sidebar.agentsSection.noAgentsFound"),t[0]=e,t[1]=s):s=t[1];let o;return t[2]!==s?(o=n.jsx("div",{className:"flex items-center justify-center py-6 text-xs text-muted-foreground",children:s}),t[2]=s,t[3]=o):o=t[3],o}function Do(t){const e=O.c(10),{org:s,onClose:o}=t,a=Q();let r;e[0]!==s.slug?(r={org:s.slug},e[0]=s.slug,e[1]=r):r=e[1];let i;e[2]!==o?(i=()=>o(),e[2]=o,e[3]=i):i=e[3];let c;e[4]!==a?(c=a("sidebar.agentsSection.seeAllAgents"),e[4]=a,e[5]=c):c=e[5];let l;return e[6]!==r||e[7]!==i||e[8]!==c?(l=n.jsx("div",{className:"border-t border-border px-3 py-2.5",children:n.jsx(Qs,{to:"/$org/settings/agents",params:r,onClick:i,className:"text-xs text-muted-foreground hover:text-foreground transition-colors flex items-center justify-center",children:c})}),e[6]=r,e[7]=i,e[8]=c,e[9]=l):l=e[9],l}function Ao(){const t=O.c(4),e=Q();let s;t[0]!==e?(s=e("sidebar.agentsSection.agents"),t[0]=e,t[1]=s):s=t[1];let o;return t[2]!==s?(o=n.jsx(Is,{children:s}),t[2]=s,t[3]=o):o=t[3],o}function To(t){const e=O.c(11),{onImportFromGithub:s}=t,o=Q();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(ms,{className:"size-3.5"}),e[0]=a):a=e[0];let r;e[1]!==o?(r=o("sidebar.agentsSection.import"),e[1]=o,e[2]=r):r=e[2];let i;e[3]!==s||e[4]!==r?(i=n.jsxs("button",{type:"button",onClick:s,className:"flex items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground",children:[a,r]}),e[3]=s,e[4]=r,e[5]=i):i=e[5];let c;e[6]!==o?(c=o("sidebar.agentsSection.codeAgents"),e[6]=o,e[7]=c):c=e[7];let l;return e[8]!==i||e[9]!==c?(l=n.jsx(Is,{action:i,children:c}),e[8]=i,e[9]=c,e[10]=l):l=e[10],l}function Io(t){const e=O.c(11),{setOpen:s,emptyCtaClass:o}=t,a=Q();let r;e[0]!==a?(r=a("sidebar.agentsSection.browseAgents"),e[0]=a,e[1]=r):r=e[1];let i;e[2]!==o?(i=J(o),e[2]=o,e[3]=i):i=e[3];let c;e[4]!==s?(c=()=>{oe("agent_browser_opened",{surface:"mobile_drawer"}),s(!0)},e[4]=s,e[5]=c):c=e[5];let l;e[6]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Ye,{className:"size-4"}),e[6]=l):l=e[6];let f;return e[7]!==r||e[8]!==i||e[9]!==c?(f=n.jsx(ds,{"aria-label":r,className:i,onClick:c,children:l}),e[7]=r,e[8]=i,e[9]=c,e[10]=f):f=e[10],f}function Fo(t){const e=O.c(17),{setOpen:s,highlightEmpty:o,emptyCtaClass:a}=t,r=Q();let i;e[0]!==o||e[1]!==r?(i=o?void 0:r("sidebar.agentsSection.browseAgents"),e[0]=o,e[1]=r,e[2]=i):i=e[2];let c;e[3]!==a?(c=J(a),e[3]=a,e[4]=c):c=e[4];let l;e[5]!==s?(l=()=>{oe("agent_browser_opened",{surface:"mobile_drawer"}),s(!0)},e[5]=s,e[6]=l):l=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(Ye,{}),e[7]=f):f=e[7];let u;e[8]!==r?(u=r("sidebar.agentsSection.newAgent"),e[8]=r,e[9]=u):u=e[9];let m;e[10]!==u?(m=n.jsx("span",{children:u}),e[10]=u,e[11]=m):m=e[11];let d;return e[12]!==i||e[13]!==c||e[14]!==l||e[15]!==m?(d=n.jsx(os,{children:n.jsxs(is,{tooltip:i,className:c,onClick:l,children:[f,m]})}),e[12]=i,e[13]=c,e[14]=l,e[15]=m,e[16]=d):d=e[16],d}function Bo(){const t=O.c(4),e=Q();let s;t[0]!==e?(s=e("sidebar.agentsSection.browseAgents"),t[0]=e,t[1]=s):s=t[1];let o;return t[2]!==s?(o=n.jsx(Bt,{className:"sr-only",children:s}),t[2]=s,t[3]=o):o=t[3],o}function Po(t){const e=O.c(8),{emptyCtaClass:s}=t,o=Q();let a;e[0]!==o?(a=o("sidebar.agentsSection.browseAgents"),e[0]=o,e[1]=a):a=e[1];let r;e[2]!==s?(r=J(s),e[2]=s,e[3]=r):r=e[3];let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(Ye,{className:"size-4"}),e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==r?(c=n.jsx(ds,{"aria-label":a,className:r,children:i}),e[5]=a,e[6]=r,e[7]=c):c=e[7],c}function Eo(t){const e=O.c(19),{wrapEmptyHint:s,highlightEmpty:o,emptyCtaClass:a}=t,r=Q();let i;e[0]!==o||e[1]!==r?(i=o?void 0:r("sidebar.agentsSection.browseAgents"),e[0]=o,e[1]=r,e[2]=i):i=e[2];let c;e[3]!==a?(c=J(a),e[3]=a,e[4]=c):c=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Ye,{}),e[5]=l):l=e[5];let f;e[6]!==r?(f=r("sidebar.agentsSection.newAgent"),e[6]=r,e[7]=f):f=e[7];let u;e[8]!==f?(u=n.jsx("span",{children:f}),e[8]=f,e[9]=u):u=e[9];let m;e[10]!==i||e[11]!==c||e[12]!==u?(m=n.jsx(Ue,{asChild:!0,children:n.jsxs(is,{tooltip:i,className:c,children:[l,u]})}),e[10]=i,e[11]=c,e[12]=u,e[13]=m):m=e[13];let d;e[14]!==m||e[15]!==s?(d=s(m),e[14]=m,e[15]=s,e[16]=d):d=e[16];let p;return e[17]!==d?(p=n.jsx(os,{children:d}),e[17]=d,e[18]=p):p=e[18],p}function Vo(t){const e=O.c(9),{children:s}=t,o=Q();let a;e[0]!==s?(a=n.jsx(Le,{asChild:!0,children:s}),e[0]=s,e[1]=a):a=e[1];let r;e[2]!==o?(r=o("sidebar.agentsSection.selectAnExistingAgent"),e[2]=o,e[3]=r):r=e[3];let i;e[4]!==r?(i=n.jsx(Me,{side:"right",sideOffset:8,children:r}),e[4]=r,e[5]=i):i=e[5];let c;return e[6]!==a||e[7]!==i?(c=n.jsxs(Re,{defaultOpen:!0,delayDuration:0,children:[a,i]}),e[6]=a,e[7]=i,e[8]=c):c=e[8],c}function $o(t){const e=ns(),{create:s}=Tn(),{locator:o}=le(),a=rs(),r=sn();return async i=>{const c=crypto.randomUUID(),l=i===r?No(t,o,a??""):null;try{await s({id:c,virtual_mcp_id:i,...l?{branch:l}:{}})}catch{}e({to:"/$org/$taskId",params:{org:t,taskId:c},search:{virtualmcpid:i}})}}function kt(t){const e=O.c(20),{agent:s,selected:o,onClick:a}=t,r=o?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50";let i;e[0]!==r?(i=J("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",r),e[0]=r,e[1]=i):i=e[1];let c;e[2]!==s.icon||e[3]!==s.title?(c=n.jsx(ls,{icon:s.icon,name:s.title,size:"xs",className:"shrink-0"}),e[2]=s.icon,e[3]=s.title,e[4]=c):c=e[4];let l;e[5]!==s.title?(l=n.jsx("p",{className:"text-sm font-medium truncate",children:s.title}),e[5]=s.title,e[6]=l):l=e[6];let f;e[7]!==s.description?(f=s.description&&n.jsx("p",{className:"text-xs text-muted-foreground truncate",children:s.description}),e[7]=s.description,e[8]=f):f=e[8];let u;e[9]!==l||e[10]!==f?(u=n.jsxs("div",{className:"flex-1 min-w-0",children:[l,f]}),e[9]=l,e[10]=f,e[11]=u):u=e[11];let m;e[12]!==o?(m=o&&n.jsx(qe,{size:14,className:"ml-auto text-muted-foreground shrink-0"}),e[12]=o,e[13]=m):m=e[13];let d;return e[14]!==a||e[15]!==i||e[16]!==c||e[17]!==u||e[18]!==m?(d=n.jsxs("button",{type:"button",onClick:a,className:i,children:[c,u,m]}),e[14]=a,e[15]=i,e[16]=c,e[17]=u,e[18]=m,e[19]=d):d=e[19],d}function Is(t){const e=O.c(5),{children:s,action:o}=t;let a;e[0]!==s?(a=n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:s}),e[0]=s,e[1]=a):a=e[1];let r;return e[2]!==o||e[3]!==a?(r=n.jsxs("div",{className:"flex items-center justify-between px-3 pb-1 pt-2",children:[a,o]}),e[2]=o,e[3]=a,e[4]=r):r=e[4],r}function Oo(t){const e=O.c(43),{onClose:s,onSelectAgent:o,selectedAgentId:a,onImportFromGithub:r}=t,[i,c]=G.useState(""),l=G.useDeferredValue(i),f=l||void 0;let u;e[0]!==f?(u={searchTerm:f},e[0]=f,e[1]=u):u=e[1];const m=Tt(u),d=m??[],{org:p}=le(),g=$o(p.slug),h=In(m),x=l.toLowerCase(),j=d.filter(Ko).filter(z=>!h.has(z.id)).filter(Ro),N=j.filter(Mo),y=j.filter(Lo),v=cs(p.id),k=!l||v.title.toLowerCase().includes(x),C=!!(o&&k);let D;e[2]!==s||e[3]!==o?(D=()=>{o?.(null),s(),c("")},e[2]=s,e[3]=o,e[4]=D):D=e[4];const b=D;let w;e[5]!==g||e[6]!==s||e[7]!==o?(w=z=>{if(o){o(z.id),s(),c("");return}s(),c(""),g(z.id)},e[5]=g,e[6]=s,e[7]=o,e[8]=w):w=e[8];const _=w,I="flex flex-col max-h-[min(640px,80dvh)]";let P;e[9]!==i?(P=n.jsx(wo,{value:i,onChange:c}),e[9]=i,e[10]=P):P=e[10];const S="overflow-y-auto flex-1 min-h-0 p-1.5 flex flex-col gap-0.5";let A;e[11]!==v||e[12]!==o||e[13]!==b||e[14]!==a||e[15]!==k?(A=o&&k&&v&&n.jsx(kt,{agent:v,selected:!a||a===v.id,onClick:b}),e[11]=v,e[12]=o,e[13]=b,e[14]=a,e[15]=k,e[16]=A):A=e[16];const T=(N.length>0||!l)&&n.jsx(To,{onImportFromGithub:r});let R;e[17]!==_||e[18]!==o||e[19]!==a?(R=z=>n.jsx(kt,{agent:z,selected:o?a===z.id:void 0,onClick:()=>_(z)},z.id),e[17]=_,e[18]=o,e[19]=a,e[20]=R):R=e[20];const E=N.map(R),F=y.length>0&&n.jsx(Ao,{});let L;e[21]!==_||e[22]!==o||e[23]!==a?(L=z=>n.jsx(kt,{agent:z,selected:o?a===z.id:void 0,onClick:()=>_(z)},z.id),e[21]=_,e[22]=o,e[23]=a,e[24]=L):L=e[24];const q=y.map(L);let B;e[25]!==C||e[26]!==l||e[27]!==j.length?(B=j.length===0&&!C&&l&&n.jsx(_o,{}),e[25]=C,e[26]=l,e[27]=j.length,e[28]=B):B=e[28];let U;e[29]!==E||e[30]!==F||e[31]!==q||e[32]!==B||e[33]!==A||e[34]!==T?(U=n.jsxs("div",{className:S,children:[A,T,E,F,q,B]}),e[29]=E,e[30]=F,e[31]=q,e[32]=B,e[33]=A,e[34]=T,e[35]=U):U=e[35];let $;e[36]!==s||e[37]!==p?($=n.jsx(Do,{org:p,onClose:s}),e[36]=s,e[37]=p,e[38]=$):$=e[38];let H;return e[39]!==U||e[40]!==$||e[41]!==P?(H=n.jsxs("div",{className:I,children:[P,U,$]}),e[39]=U,e[40]=$,e[41]=P,e[42]=H):H=e[42],H}function Lo(t){return!gs(t.metadata)}function Mo(t){return gs(t.metadata)}function Ro(t){return!xn(t.id)}function Ko(t){return!hn(t.id)}function zo(t){const e=O.c(14),{compact:s,trigger:o,onSelectAgent:a,selectedAgentId:r,side:i,align:c}=t===void 0?{}:t,l=s===void 0?!1:s,f=i===void 0?"right":i,u=c===void 0?"start":c,[m,d]=G.useState(!1),[p,g]=G.useState(!1),h=ss(),{setOpenMobile:x}=Gs(),j=So(),N=j?"border border-border":void 0;let y;e[0]!==j?(y=S=>j?n.jsx(Vo,{children:S}):S,e[0]=j,e[1]=y):y=e[1];const v=y;let k;e[2]!==h||e[3]!==x?(k=()=>{d(!1),h&&x(!1)},e[2]=h,e[3]=x,e[4]=k):k=e[4];const C=k;let D;e[5]!==C||e[6]!==g?(D=()=>{C(),g(!0)},e[5]=C,e[6]=g,e[7]=D):D=e[7];const b=D,w=m&&n.jsx(G.Suspense,{fallback:n.jsx("div",{className:"flex items-center justify-center py-8",children:n.jsx(Hs,{className:"h-4 w-24"})}),children:n.jsx(Oo,{onClose:C,onSelectAgent:a,selectedAgentId:r,onImportFromGithub:b})}),_=h?n.jsxs(n.Fragment,{children:[o?G.cloneElement(o,{onClick:S=>{o.props.onClick?.(S),d(!0)}}):l?v(n.jsx(Io,{setOpen:d,emptyCtaClass:N})):n.jsx(Fo,{setOpen:d,highlightEmpty:j,emptyCtaClass:N}),n.jsx(It,{open:m,onOpenChange:d,direction:"bottom",children:n.jsxs(Ft,{className:"max-h-[85dvh] p-0",children:[n.jsx(Bo,{}),w]})})]}):n.jsxs(ct,{open:m,onOpenChange:S=>{S&&!m&&oe("agent_browser_opened",{surface:"desktop_popover"}),d(S)},children:[o?n.jsx(Ue,{asChild:!0,children:o}):l?v(n.jsx(Ue,{asChild:!0,children:n.jsx(Po,{emptyCtaClass:N})})):n.jsx(Eo,{wrapEmptyHint:v,highlightEmpty:j,emptyCtaClass:N}),n.jsx(dt,{className:"w-[380px] p-0 overflow-hidden",side:f,align:u,children:w})]});let I;e[8]!==p||e[9]!==g?(I=n.jsx(Dn,{open:p,onOpenChange:g,mode:"agent"}),e[8]=p,e[9]=g,e[10]=I):I=e[10];let P;return e[11]!==_||e[12]!==I?(P=n.jsxs(n.Fragment,{children:[_,I]}),e[11]=_,e[12]=I,e[13]=P):P=e[13],P}function Uo(){const t=O.c(2),e=Tt()??[];let s;return t[0]!==e?(s=o=>{if(!o)return;const a=e.find(r=>r.id===o);return a?Pn(a.metadata):void 0},t[0]=e,t[1]=s):s=t[1],s}const Go="inline-flex items-center gap-1.5 min-w-0 rounded-md pl-1 pr-2 py-1.5 text-sm text-foreground hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50";function Ho(t){const e=O.c(29),{agentId:s,fallback:o,onOpenHome:a,onPick:r}=t,i=Q(),c=yn(s)??o??null;let l,f,u,m,d;e[0]!==c?.title||e[1]!==a||e[2]!==i?(d=c?.title??i("header.shellBreadcrumb.superAgentDefaultName"),m="flex min-w-0 items-center gap-0",l="button",f=a,u=i("header.shellBreadcrumb.openAgentHome",{name:d}),e[0]=c?.title,e[1]=a,e[2]=i,e[3]=l,e[4]=f,e[5]=u,e[6]=m,e[7]=d):(l=e[3],f=e[4],u=e[5],m=e[6],d=e[7]);const p=c?.icon??null;let g;e[8]!==p||e[9]!==d?(g=n.jsx(ls,{icon:p,name:d,size:"xs"}),e[8]=p,e[9]=d,e[10]=g):g=e[10];let h;e[11]!==l||e[12]!==f||e[13]!==u||e[14]!==g?(h=n.jsx("button",{type:l,onClick:f,"aria-label":u,className:"flex items-center shrink-0 rounded-md p-1 hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:g}),e[11]=l,e[12]=f,e[13]=u,e[14]=g,e[15]=h):h=e[15];let x;e[16]!==d?(x=n.jsx("span",{className:"truncate font-medium max-w-[8rem]",children:d}),e[16]=d,e[17]=x):x=e[17];let j;e[18]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx(Ge,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),e[18]=j):j=e[18];let N;e[19]!==x?(N=n.jsxs("button",{type:"button",className:Go,children:[x,j]}),e[19]=x,e[20]=N):N=e[20];let y;e[21]!==s||e[22]!==r||e[23]!==N?(y=n.jsx(zo,{side:"bottom",align:"start",selectedAgentId:s,onSelectAgent:r,trigger:N}),e[21]=s,e[22]=r,e[23]=N,e[24]=y):y=e[24];let v;return e[25]!==y||e[26]!==m||e[27]!==h?(v=n.jsxs("div",{className:m,children:[h,y]}),e[25]=y,e[26]=m,e[27]=h,e[28]=v):v=e[28],v}function la(t){const e=O.c(22);let s;e[0]!==t?(s=t===void 0?{}:t,e[0]=t,e[1]=s):s=e[1];const{onNavigate:o}=s,{org:a}=le(),{threads:r}=ps(),i=Tt(),{data:c}=Dt.useSession(),{setTaskId:l,createNewTask:f}=hs(),u=Uo();let m;e[2]!==a.id?(m=cs(a.id),e[2]=a.id,e[3]=m):m=e[3];const d=m,p=d.id,g=as();let h;e[4]!==i||e[5]!==f||e[6]!==p||e[7]!==o||e[8]!==u||e[9]!==c?.user?.id||e[10]!==l||e[11]!==r?(h=k=>{const C=k??p,D=(i??[]).find(w=>w.id===C),b=Bn(r,C,c?.user?.id,u(C),!!(D&&vn(D)));b?l(b.id,C):f(C),o?.()},e[4]=i,e[5]=f,e[6]=p,e[7]=o,e[8]=u,e[9]=c?.user?.id,e[10]=l,e[11]=r,e[12]=h):h=e[12];const x=h;let j;e[13]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx("span",{className:"h-5 w-24 rounded bg-muted animate-pulse"}),e[13]=j):j=e[13];const N=g===p?d:void 0;let y;e[14]!==g||e[15]!==x?(y=()=>x(g),e[14]=g,e[15]=x,e[16]=y):y=e[16];let v;return e[17]!==g||e[18]!==x||e[19]!==N||e[20]!==y?(v=n.jsx(G.Suspense,{fallback:j,children:n.jsx(Ho,{agentId:g,fallback:N,onOpenHome:y,onPick:x})}),e[17]=g,e[18]=x,e[19]=N,e[20]=y,e[21]=v):v=e[21],v}function ca(){const t=O.c(20),e=Q(),{threads:s}=ps(),{createNewTask:o}=hs(),a=as(),r=rs();let i;t[0]!==r||t[1]!==s?(i=s.find(x=>x.id===r)?.branch??null,t[0]=r,t[1]=s,t[2]=i):i=t[2];const c=i;let l;t[3]!==a||t[4]!==o||t[5]!==c?(l=()=>{o(a,c)},t[3]=a,t[4]=o,t[5]=c,t[6]=l):l=t[6];const f=l;let u;t[7]!==e?(u=e("sidebar.taskGroupsList.newChat"),t[7]=e,t[8]=u):u=t[8];let m;t[9]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(nn,{size:16}),t[9]=m):m=t[9];let d;t[10]!==f||t[11]!==u?(d=n.jsx(Le,{asChild:!0,children:n.jsx("button",{type:"button",onClick:f,"aria-label":u,className:"flex shrink-0 items-center rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:m})}),t[10]=f,t[11]=u,t[12]=d):d=t[12];let p;t[13]!==e?(p=e("sidebar.taskGroupsList.newChat"),t[13]=e,t[14]=p):p=t[14];let g;t[15]!==p?(g=n.jsx(Me,{side:"bottom",children:p}),t[15]=p,t[16]=g):g=t[16];let h;return t[17]!==d||t[18]!==g?(h=n.jsxs(Re,{children:[d,g]}),t[17]=d,t[18]=g,t[19]=h):h=t[19],h}function Qo({open:t,onOpenChange:e,onCreated:s}){const o=Q(),{org:a}=le(),{data:r}=Dt.useSession(),{stdioEnabled:i}=qs(),c=ss(),l=ks(),f=xs(),m=js(f,"").items,d=Ws({resolver:Ys(Xn),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),p=d.watch("ui_type"),g=d.watch("connection_url"),h=d.watch("npx_package"),x=et({uiType:p,connectionUrl:g??"",npxPackage:h??""})??Ut({uiType:p,connectionUrl:g??"",registryItems:m}),j=b=>{const w=b.trim();if(!w)return;const _=!!d.formState.dirtyFields.title,I=!!d.formState.dirtyFields.description,P=!!d.formState.dirtyFields.env_vars,S=T=>{if(T&&(!_&&!d.getValues("title").trim()&&T.title&&d.setValue("title",T.title,{shouldDirty:!1}),!I&&!(d.getValues("description")??"").trim()&&T.description&&d.setValue("description",T.description,{shouldDirty:!1}),!P&&T.envVarKeys?.length)){const R=d.getValues("env_vars")??[],E=new Set(R.map(L=>L.key)),F=T.envVarKeys.filter(L=>!E.has(L));F.length>0&&d.setValue("env_vars",[...R,...F.map(L=>({key:L,value:""}))],{shouldDirty:!0})}},A=Zn(w);if(A&&i){d.setValue("ui_type","NPX",{shouldDirty:!0}),d.setValue("npx_package",A.packageName,{shouldDirty:!0}),d.setValue("connection_url","",{shouldDirty:!0}),d.setValue("connection_token",null,{shouldDirty:!0}),S(et({uiType:"NPX",npxPackage:A.packageName}));return}if(w.startsWith("http://")||w.startsWith("https://")){const T=p==="HTTP"||p==="SSE"||p==="Websocket"?p:"HTTP";d.setValue("ui_type",T,{shouldDirty:!0}),d.setValue("connection_url",w,{shouldDirty:!0}),S(et({uiType:T,connectionUrl:w})??Ut({uiType:T,connectionUrl:w,registryItems:m}));return}p==="NPX"&&S(et({uiType:"NPX",npxPackage:w}))},N=b=>{b||d.reset(),e(b)},y=async b=>{let w,_=null,I=null,P=null;b.ui_type==="NPX"?(w="STDIO",_="",P=eo(b.npx_package||"",b.env_vars||[])):b.ui_type==="STDIO"?(w="STDIO",_="",P=to(b.stdio_command||"",b.stdio_args||"",b.stdio_cwd,b.env_vars||[])):(w=b.ui_type,_=b.connection_url||"",I=b.connection_token||null);const S=Vn("conn");try{await l.create.mutateAsync({id:S,title:b.title,description:b.description||null,connection_type:w,connection_url:_,connection_token:I,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:r?.user?.id||"system",organization_id:a.id,icon:b.icon??null,app_name:null,app_id:null,connection_headers:P,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),d.reset(),e(!1),s?.(S)}catch{de.error(o("connections.createConnectionDialog.failedToCreateConnection"))}},v=o("connections.createConnectionDialog.title"),k=o("connections.createConnectionDialog.description"),C=d.formState.isSubmitting?o("connections.createConnectionDialog.saving"):o("connections.createConnectionDialog.createButton"),D=n.jsxs("div",{className:"grid gap-4",children:[n.jsx(pe,{control:d.control,name:"ui_type",render:({field:b})=>n.jsxs(ge,{children:[n.jsx(he,{children:o("connections.createConnectionDialog.typeLabel")}),n.jsxs(zn,{value:b.value,onValueChange:b.onChange,children:[n.jsx(xe,{children:n.jsx(Un,{children:n.jsx(Gn,{})})}),n.jsxs(Hn,{children:[n.jsx(He,{value:"HTTP",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(jt,{className:"w-4 h-4"}),o("connections.createConnectionDialog.httpType")]})}),n.jsx(He,{value:"SSE",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(jt,{className:"w-4 h-4"}),o("connections.createConnectionDialog.sseType")]})}),n.jsx(He,{value:"Websocket",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(jt,{className:"w-4 h-4"}),o("connections.createConnectionDialog.websocketType")]})}),i&&n.jsxs(n.Fragment,{children:[n.jsx(He,{value:"NPX",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(ot,{className:"w-4 h-4"}),o("connections.createConnectionDialog.npxPackageType")]})}),n.jsx(He,{value:"STDIO",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(qn,{className:"w-4 h-4"}),o("connections.createConnectionDialog.customCommandType")]})})]})]})]}),n.jsx(je,{})]})}),p==="NPX"&&n.jsx(pe,{control:d.control,name:"npx_package",render:({field:b})=>n.jsxs(ge,{children:[n.jsx(he,{children:o("connections.createConnectionDialog.npmPackageLabel")}),n.jsx(xe,{children:n.jsx(Se,{placeholder:o("connections.createConnectionDialog.npmPackagePlaceholder"),...b,value:b.value??"",onPaste:w=>{const _=w.clipboardData.getData("text");_&&(w.preventDefault(),d.setValue("npx_package",_.trim(),{shouldDirty:!0}),j(_))},onBlur:w=>{j(w.target.value),b.onBlur()}})}),n.jsx(je,{})]})}),p==="STDIO"&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[n.jsx(pe,{control:d.control,name:"stdio_command",render:({field:b})=>n.jsxs(ge,{children:[n.jsx(he,{children:o("connections.createConnectionDialog.commandLabel")}),n.jsx(xe,{children:n.jsx(Se,{placeholder:o("connections.createConnectionDialog.commandPlaceholder"),...b,value:b.value??""})}),n.jsx(je,{})]})}),n.jsx(pe,{control:d.control,name:"stdio_args",render:({field:b})=>n.jsxs(ge,{children:[n.jsx(he,{children:o("connections.createConnectionDialog.argumentsLabel")}),n.jsx(xe,{children:n.jsx(Se,{placeholder:o("connections.createConnectionDialog.argumentsPlaceholder"),...b,value:b.value??""})}),n.jsx(je,{})]})})]}),n.jsx(pe,{control:d.control,name:"stdio_cwd",render:({field:b})=>n.jsxs(ge,{children:[n.jsx(he,{children:o("connections.createConnectionDialog.workingDirectoryLabel")}),n.jsx(xe,{children:n.jsx(Se,{placeholder:o("connections.createConnectionDialog.workingDirectoryPlaceholder"),...b,value:b.value??""})}),n.jsx("p",{className:"text-xs text-muted-foreground",children:o("connections.createConnectionDialog.workingDirectoryDescription")}),n.jsx(je,{})]})})]}),(p==="NPX"||p==="STDIO")&&n.jsx(pe,{control:d.control,name:"env_vars",render:({field:b})=>n.jsxs(ge,{children:[n.jsx(he,{children:o("connections.createConnectionDialog.environmentVariablesLabel")}),n.jsx(xe,{children:n.jsx(Jn,{value:b.value??[],onChange:b.onChange})}),n.jsx(je,{})]})}),p!=="NPX"&&p!=="STDIO"&&n.jsxs(n.Fragment,{children:[n.jsx(pe,{control:d.control,name:"connection_url",render:({field:b})=>n.jsxs(ge,{children:[n.jsx(he,{children:o("connections.createConnectionDialog.urlLabel")}),n.jsx(xe,{children:n.jsx(Se,{placeholder:o("connections.createConnectionDialog.urlPlaceholder"),...b,value:b.value??"",onPaste:w=>{const _=w.clipboardData.getData("text");_&&(w.preventDefault(),d.setValue("connection_url",_.trim(),{shouldDirty:!0}),j(_))},onBlur:w=>{j(w.target.value),b.onBlur()}})}),n.jsx(je,{})]})}),n.jsx(pe,{control:d.control,name:"connection_token",render:({field:b})=>n.jsxs(ge,{children:[n.jsx(he,{children:x?.token?.label??o("connections.createConnectionDialog.tokenLabelDefault")}),n.jsx(xe,{children:n.jsx(Se,{type:"password",placeholder:x?.token?.placeholder??o("connections.createConnectionDialog.tokenPlaceholderDefault"),className:"ph-no-capture",...b,value:b.value??""})}),x?.token?.helperText&&n.jsxs("p",{className:"text-xs text-muted-foreground",children:[x.token.helperText,x.id==="github"&&n.jsxs(n.Fragment,{children:[" ","·"," ",n.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:o("connections.createConnectionDialog.openGitHubPatSettings")})]})]}),n.jsx(je,{})]})})]}),n.jsx(pe,{control:d.control,name:"title",render:({field:b})=>n.jsxs(ge,{children:[n.jsx(he,{children:o("connections.createConnectionDialog.nameLabel")}),n.jsx(xe,{children:n.jsx(Se,{placeholder:o("connections.createConnectionDialog.namePlaceholder"),...b})}),n.jsx(je,{})]})}),n.jsx(pe,{control:d.control,name:"description",render:({field:b})=>n.jsxs(ge,{children:[n.jsx(he,{children:o("connections.createConnectionDialog.descriptionLabel")}),n.jsx(xe,{children:n.jsx(Qn,{placeholder:o("connections.createConnectionDialog.descriptionPlaceholder"),rows:3,...b,value:b.value??""})}),n.jsx(je,{})]})})]});return c?n.jsx(It,{open:t,onOpenChange:N,children:n.jsxs(Ft,{className:"max-h-[90vh]",children:[n.jsx(Nn,{className:"pb-2",children:n.jsxs("div",{className:"flex items-start justify-between gap-4",children:[n.jsxs("div",{className:"flex-1 text-left",children:[n.jsx(Bt,{children:v}),n.jsx(Sn,{className:"mt-1",children:k})]}),n.jsx(us,{asChild:!0,children:n.jsx(ye,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:n.jsx(Yn,{size:16})})})]})}),n.jsx(zt,{...d,children:n.jsxs("form",{onSubmit:d.handleSubmit(y),children:[n.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:D}),n.jsx(fs,{children:n.jsx(ye,{type:"submit",disabled:d.formState.isSubmitting,className:"w-full",children:C})})]})})]})}):n.jsx(bs,{open:t,onOpenChange:N,children:n.jsxs(ys,{className:"sm:max-w-[525px]",children:[n.jsxs(vs,{children:[n.jsx(Cs,{children:v}),n.jsx(Rn,{children:k})]}),n.jsx(zt,{...d,children:n.jsxs("form",{onSubmit:d.handleSubmit(y),children:[n.jsx("div",{className:"py-4",children:D}),n.jsxs(Kn,{children:[n.jsx(ye,{type:"button",variant:"outline",onClick:()=>N(!1),children:o("connections.createConnectionDialog.cancelButton")}),n.jsx(ye,{type:"submit",disabled:d.formState.isSubmitting,className:"min-w-40",children:C})]})]})})]})})}function qo(t){const e=O.c(72),{mode:s,agentId:o,addedConnectionIds:a,onAdd:r,onCloneAndAdd:i,onConnectAndAdd:c,connectingItemId:l,search:f,onCreateConnection:u,onBrowseNavigate:m,defaultTab:d}=t,p=s===void 0?"add":s,g=d===void 0?"connected":d,h=Q(),{org:x}=le(),j=G.useDeferredValue(f),N=f!==j;let y;e[0]!==j?(y=j.trim().toLowerCase(),e[0]=j,e[1]=y):y=e[1];const v=y;let k;e[2]!==g?(k=V=>V??g,e[2]=g,e[3]=k):k=e[3];const[C,D]=Xs(Js.connectionsTab(x.slug)+(g==="all"?":home-modal":":agent-modal"),k);let b;e[4]!==C||e[5]!==D?(b=V=>{V!==C&&oe("connections_dialog_tab_changed",{to_tab:V}),D(V)},e[4]=C,e[5]=D,e[6]=b):b=e[6];const w=b;let _;e[7]!==x.id||e[8]!==x.slug?(_={connectionId:jn,orgId:x.id,orgSlug:x.slug},e[7]=x.id,e[8]=x.slug,e[9]=_):_=e[9];const I=io(_),P=j?.trim().split(/\s+/).filter(Boolean)??[],S=P.length>0?{operator:"or",conditions:P.flatMap(si)}:void 0,A={...S&&{where:S},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},T=JSON.stringify(A),{data:R,fetchNextPage:E,hasNextPage:F,isFetchingNextPage:L}=oo({queryKey:fe.collectionListInfinite(I,x.id,"","CONNECTIONS",T),queryFn:async V=>{const{pageParam:X}=V,be=X===void 0?0:X;return(await I.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...S&&{where:S},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:be}})).structuredContent},initialPageParam:0,getNextPageParam:ei,staleTime:3e4}),q=R?.pages.flatMap(Zo)??[],B=Mn(q),U=new Set(q.filter(Jo).map(Xo)),$=xs(),H=js($,j),z=Gt(H.loadMore,H.hasMore,H.isLoadingMore),se=Gt(E,F??!1,L),W=C==="all"||!!v,ie=W?H.items.filter(V=>{const X=$n(V);if(X&&U.has(X))return!1;if(!v)return!0;const be=it(V._meta),ke=[V.title,V.description,V.name,V.server?.title,V.server?.description,V.server?.name,be?.friendly_name,be?.friendlyName].filter(Boolean).join(" ").toLowerCase();return P.some(me=>ke.includes(me.toLowerCase()))}):[],Z=ie.filter(Yo),ee=ie.filter(Wo);let te;e[10]!==a?(te=V=>V.some(X=>a.has(X.id)),e[10]=a,e[11]=te):te=e[11];const ne=te;let re;e[12]!==a||e[13]!==o||e[14]!==l||e[15]!==ne||e[16]!==p||e[17]!==r||e[18]!==m||e[19]!==i||e[20]!==h?(re=(V,X,be,ke,me)=>{const Ze=ne(me),$e=me.find(Ne=>!a.has(Ne.id)),ce=me[0];if(p==="browse"){const Ne=so(ce);return n.jsx(yt,{connection:{title:X,icon:be,description:me.length>1?`${me.length} instances`:ke??void 0},fallbackIcon:n.jsx(ot,{}),headerActionsAlwaysVisible:!0,headerActions:n.jsxs(tt,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[n.jsx(qe,{size:11})," ",h("virtualMcp.connectionDialogContent.connected")]}),onClick:()=>{oe("connection_browse_clicked",{app_name:ce.app_name??null,connection_id:ce.id,instances_count:me.length}),m?.(Ne)}},V)}return n.jsx(yt,{connection:{title:X,icon:be,description:ke},fallbackIcon:n.jsx(ot,{}),headerActionsAlwaysVisible:!0,headerActions:n.jsxs("div",{className:"flex items-center gap-1.5",children:[Ze&&n.jsxs(tt,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[n.jsx(qe,{size:11})," ",h("virtualMcp.connectionDialogContent.added")]}),n.jsx(ye,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:Ne=>{Ne.stopPropagation(),$e?(oe("connection_add_clicked",{action:"use_existing",app_name:ce.app_name??null,connection_id:$e.id}),o&&oe("agent_connection_attached",{agent_id:o,connection_id:$e.id,app_name:ce.app_name??null,mode:"existing"}),r($e.id)):(oe("connection_add_clicked",{action:"clone",app_name:ce.app_name??null,base_connection_id:ce.id}),i(ce))},children:h("virtualMcp.connectionDialogContent.add")})]})},V)},e[12]=a,e[13]=o,e[14]=l,e[15]=ne,e[16]=p,e[17]=r,e[18]=m,e[19]=i,e[20]=h,e[21]=re):re=e[21];const M=re;let K;e[22]!==l||e[23]!==p||e[24]!==c||e[25]!==h?(K=V=>{const X=it(V._meta),be=X?.friendlyName||X?.friendly_name||V.server?.title||V.title||V.server?.name||V.name||V.id||"",ke=V.server?.description||V.description||null,me=V.server?.icons?.[0]?.src||On(V.server?.repository)||null,Ze=X?.official===!0,$e=X?.verified===!0,ce=X?.owner==="deco";return n.jsx(yt,{connection:{title:be,description:ke,icon:me},fallbackIcon:n.jsx(ot,{}),headerActionsAlwaysVisible:!0,headerActions:n.jsxs("div",{className:"flex items-center gap-1.5",children:[ce&&n.jsxs(Re,{children:[n.jsx(Le,{asChild:!0,children:n.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:n.jsx("img",{src:"/logos/deco logo.svg",alt:h("virtualMcp.connectionDialogContent.madeByDeco"),className:"size-3"})})}),n.jsx(Me,{children:h("virtualMcp.connectionDialogContent.builtByDeco")})]}),!ce&&Ze&&n.jsxs(Re,{children:[n.jsx(Le,{asChild:!0,children:n.jsx(tt,{variant:"outline",size:"icon",children:n.jsx(vt,{})})}),n.jsx(Me,{children:h("virtualMcp.connectionDialogContent.builtByOfficial")})]}),!ce&&!Ze&&$e&&n.jsxs(Re,{children:[n.jsx(Le,{asChild:!0,children:n.jsx(tt,{variant:"outline",size:"icon",children:n.jsx(vt,{})})}),n.jsx(Me,{children:h("virtualMcp.connectionDialogContent.verifiedByDeco")})]}),n.jsx(ye,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:Ne=>{Ne.stopPropagation(),oe("connection_add_clicked",{action:"connect_new",registry_item_id:V.id,app_name:X?.friendlyName||V.server?.name||V.name||null}),c(V)},children:l===V.id?n.jsx(Qe,{className:"size-3.5"}):h(p==="browse"?"virtualMcp.connectionDialogContent.connect":"virtualMcp.connectionDialogContent.add")})]})},`catalog-${V.id}`)},e[22]=l,e[23]=p,e[24]=c,e[25]=h,e[26]=K):K=e[26];const ae=K;let Y;e[27]!==C||e[28]!==w||e[29]!==u||e[30]!==v||e[31]!==h?(Y=!v&&n.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[n.jsx(no,{tabs:[{id:"all",label:h("virtualMcp.connectionDialogContent.tabAll")},{id:"connected",label:h("virtualMcp.connectionDialogContent.tabConnected")}],activeTab:C,onTabChange:V=>w(V)}),n.jsxs(ye,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{oe("connections_dialog_custom_clicked"),u()},children:[n.jsx(Ye,{size:12}),h("virtualMcp.connectionDialogContent.customConnection")]})]}),e[27]=C,e[28]=w,e[29]=u,e[30]=v,e[31]=h,e[32]=Y):Y=e[32];const ve=N&&"opacity-50 pointer-events-none";let ue;e[33]!==ve?(ue=J("flex-1 overflow-auto p-5 transition-opacity duration-150",ve),e[33]=ve,e[34]=ue):ue=e[34];const De="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let Ae;e[35]!==M?(Ae=V=>{if(V.type==="group")return M(V.key,V.title,V.icon,null,V.connections);const X=V.connection;return M(X.id,X.title,X.icon,X.description??null,[X])},e[35]=M,e[36]=Ae):Ae=e[36];const mt=B.map(Ae);let Te;e[37]!==se?(Te=n.jsx("div",{ref:se,className:"col-span-full h-1"}),e[37]=se,e[38]=Te):Te=e[38];let Ie;e[39]!==L?(Ie=L&&n.jsx("div",{className:"col-span-full flex justify-center py-6",children:n.jsx(Qe,{className:"size-6 text-muted-foreground"})}),e[39]=L,e[40]=Ie):Ie=e[40];const pt=W&&Z.length>0&&n.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[n.jsx(vt,{size:13,className:"text-muted-foreground shrink-0"}),n.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:h("virtualMcp.connectionDialogContent.sectionVerified")}),n.jsx("div",{className:"flex-1 h-px bg-border"})]}),gt=W&&Z.map(ae),ht=W&&ee.length>0&&n.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[n.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:h("virtualMcp.connectionDialogContent.sectionAllConnections")}),n.jsx("div",{className:"flex-1 h-px bg-border"})]}),xt=W&&ee.map(ae);let Fe;e[41]!==z||e[42]!==$||e[43]!==W?(Fe=W&&$.length>0&&n.jsx("div",{ref:z,className:"col-span-full h-1"}),e[41]=z,e[42]=$,e[43]=W,e[44]=Fe):Fe=e[44];let Be;e[45]!==H.isLoadingMore||e[46]!==W?(Be=W&&H.isLoadingMore&&n.jsx("div",{className:"col-span-full flex justify-center py-6",children:n.jsx(Qe,{className:"size-6 text-muted-foreground"})}),e[45]=H.isLoadingMore,e[46]=W,e[47]=Be):Be=e[47];let Pe;e[48]!==mt||e[49]!==Te||e[50]!==Ie||e[51]!==pt||e[52]!==gt||e[53]!==ht||e[54]!==xt||e[55]!==Fe||e[56]!==Be?(Pe=n.jsxs("div",{className:De,children:[mt,Te,Ie,pt,gt,ht,xt,Fe,Be]}),e[48]=mt,e[49]=Te,e[50]=Ie,e[51]=pt,e[52]=gt,e[53]=ht,e[54]=xt,e[55]=Fe,e[56]=Be,e[57]=Pe):Pe=e[57];let Ee;e[58]!==C||e[59]!==B.length||e[60]!==ee||e[61]!==f||e[62]!==h||e[63]!==Z?(Ee=B.length===0&&Z.length===0&&ee.length===0&&n.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:f?h("virtualMcp.connectionDialogContent.emptyStateSearchNoMatch",{search:f}):h(C==="connected"?"virtualMcp.connectionDialogContent.emptyStateNoConnectionsYet":"virtualMcp.connectionDialogContent.emptyStateNoConnectionsAvailable")}),e[58]=C,e[59]=B.length,e[60]=ee,e[61]=f,e[62]=h,e[63]=Z,e[64]=Ee):Ee=e[64];let Ve;e[65]!==ue||e[66]!==Pe||e[67]!==Ee?(Ve=n.jsxs("div",{className:ue,children:[Pe,Ee]}),e[65]=ue,e[66]=Pe,e[67]=Ee,e[68]=Ve):Ve=e[68];let Je;return e[69]!==Y||e[70]!==Ve?(Je=n.jsxs(n.Fragment,{children:[Y,Ve]}),e[69]=Y,e[70]=Ve,e[71]=Je):Je=e[71],Je}function Wo(t){return!t.verified&&!it(t._meta)?.verified&&!t.meta?.verified}function Yo(t){return t.verified||it(t._meta)?.verified||t.meta?.verified}function Xo(t){return t.app_name}function Jo(t){return t.app_name}function Zo(t){return t?.items??[]}function ei(t,e){if(t?.hasMore)return e.reduce(ti,0)}function ti(t,e){return t+(e?.items?.length??0)}function si(t){return[{field:["title"],operator:"contains",value:t},{field:["description"],operator:"contains",value:t}]}function da({open:t,onOpenChange:e,defaultTab:s,initialSearch:o="",...a}){const r=Q(),i=a.mode??"add",c="agentId"in a?a.agentId:void 0,l="addedConnectionIds"in a?a.addedConnectionIds??new Set:new Set,f="onAdd"in a&&a.onAdd?a.onAdd:S=>{},u=(S,A,T)=>{c&&oe("agent_connection_attached",{agent_id:c,connection_id:S,app_name:A,mode:T})},[m,d]=G.useState(null),[p,g]=G.useState(o),[h,x]=G.useState(!1),[j,N]=G.useState(t);t!==j&&(N(t),t&&g(o));const{org:y}=le(),{data:v}=Dt.useSession(),k=ks(),C=at(),D=ns(),b=S=>{e(!1),D({to:"/$org/settings/connections/$appSlug",params:{org:y.slug,appSlug:S}})},w=()=>{C.invalidateQueries({predicate:S=>{const A=S.queryKey;return A[1]===y.id&&A[3]==="collection"&&A[4]==="CONNECTIONS"}})},_=async(S,A)=>{oe("connection_oauth_succeeded",{connection_id:S,flow:A});const T=new URL(`/api/${y.slug}/mcp/${S}`,window.location.origin);await C.invalidateQueries({queryKey:fe.isMCPAuthenticated(T.href,null)}),w()},I=async S=>{d(S.app_name??S.id);try{const T=`${S.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,E=(await k.create.mutateAsync({title:T,description:S.description??null,connection_type:S.connection_type,connection_url:S.connection_url??null,connection_token:null,icon:S.icon??null,app_name:S.app_name??null,app_id:S.app_id??null,connection_headers:S.connection_headers??null})).id,F=await Ct({connectionId:E,orgId:y.id,orgSlug:y.slug,persistFallback:L=>k.update.mutateAsync({id:E,data:{connection_token:L}}).then(()=>{})});if(F.ran&&!F.ok){oe("connection_oauth_failed",{connection_id:E,flow:"clone",error:F.error??"no_token"}),de.error(r("virtualMcp.addConnectionDialog.authenticationFailedError",{error:F.error??"no token received"})),await k.delete.mutateAsync(E);return}F.ran&&await _(E,"clone"),u(E,S.app_name??null,"clone"),f(E)}catch(A){console.error("Failed to add connection:",A),de.error(r("virtualMcp.addConnectionDialog.failedToAddConnection"))}finally{d(null)}},P=async S=>{if(!(!y||!v?.user?.id)){d(S.id);try{const A=Ln(S,y.id,v.user.id,{remoteIndex:0}),T=A.connection_type==="STDIO",R=!!A.connection_url,E=T&&A.connection_headers&&typeof A.connection_headers=="object"&&"command"in A.connection_headers;if(!R&&!E){de.error(r("virtualMcp.addConnectionDialog.mcpServerConnectionError")),d(null);return}const{id:F}=await k.create.mutateAsync(A),L=await Ct({connectionId:F,orgId:y.id,orgSlug:y.slug,persistFallback:q=>k.update.mutateAsync({id:F,data:{connection_token:q}}).then(()=>{})});if(L.ran&&!L.ok){oe("connection_oauth_failed",{connection_id:F,flow:"connect_new",error:L.error??"no_token"}),de.warning(r("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:r("virtualMcp.addConnectionDialog.signInFailedDescription",{error:L.error??"no token received"})}),u(F,A.app_name??null,"new"),f(F);return}L.ran?(await _(F,"connect_new"),de.success(r("virtualMcp.addConnectionDialog.connectedAuthenticated"))):de.success(r("virtualMcp.addConnectionDialog.connected")),u(F,A.app_name??null,"new"),f(F)}catch(A){console.error("Failed to connect:",A),de.error(r("virtualMcp.addConnectionDialog.failedToConnect"))}finally{d(null)}}};return n.jsxs(bs,{open:t,onOpenChange:e,children:[n.jsxs(ys,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[n.jsx(vs,{className:"px-6 pt-5 pb-0 shrink-0",children:n.jsx(Cs,{className:"text-base font-semibold",children:r(i==="browse"?"virtualMcp.addConnectionDialog.connectionsTitle":"virtualMcp.addConnectionDialog.addConnectionTitle")})}),n.jsx("div",{className:"pt-3 shrink-0",children:n.jsx(En,{value:p,onChange:g,placeholder:r("virtualMcp.addConnectionDialog.searchConnectionsPlaceholder")})}),n.jsx(G.Suspense,{fallback:n.jsx("div",{className:"flex-1 flex items-center justify-center",children:n.jsx(Qe,{className:"size-6 text-muted-foreground"})}),children:n.jsx(qo,{mode:i,agentId:c,addedConnectionIds:l,onAdd:f,onCloneAndAdd:I,onConnectAndAdd:P,connectingItemId:m,search:p,onCreateConnection:()=>x(!0),onBrowseNavigate:b,defaultTab:s})})]}),n.jsx(Qo,{open:h,onOpenChange:x,onCreated:async S=>{x(!1);const A=await Ct({connectionId:S,orgId:y.id,orgSlug:y.slug,persistFallback:T=>k.update.mutateAsync({id:S,data:{connection_token:T}}).then(()=>{})});if(A.ran&&!A.ok){oe("connection_oauth_failed",{connection_id:S,flow:"custom_create",error:A.error??"no_token"}),de.warning(r("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:r("virtualMcp.addConnectionDialog.signInFailedDescription",{error:A.error??"no token received"})}),u(S,null,"custom"),f(S),e(!1);return}A.ran&&await _(S,"custom_create"),u(S,null,"custom"),f(S),e(!1)}})]})}const Wt=new Map;function ua(){const{org:t}=le(),e=At(),s=ro(),o=s.find(x=>x.providerId==="deco"),{data:a,isLoading:r,refetch:i,isFetching:c}=lt({queryKey:fe.aiProviderCredits(t.id,"deco"),enabled:!!o,staleTime:6e4,queryFn:async()=>{try{return await e.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),l=a?.balanceCents??null,f=l!=null?l/100:null,u=G.useRef(new Map);if(l!=null){const x=Wt.get(t.id);u.current.get(t.id)&&x!=null&&l>x&&oe("credits_topped_up_detected",{organization_id:t.id,delta_cents:l-x,previous_balance_cents:x,new_balance_cents:l}),Wt.set(t.id,l),u.current.set(t.id,!0)}const m=!!o,d=l!=null&&l>0,p=l!=null&&l===0,g=l!=null&&l===200,h=s.length>0&&s.every(x=>x.providerId==="deco");return{hasDecoKey:m,decoKeyId:o?.id??null,balanceCents:l,balanceDollars:f,hasCredits:d,isZeroBalance:p,isInitialFreeCredit:g,hasOnlyDecoProvider:h,isLoading:r,isFetching:c,refetch:i}}const ni=4,oi="TASK";function ii(t){return t.replace(/[^a-zA-Z]/g,"").toUpperCase().slice(0,ni)||oi}function ri(t,e){return e==null?null:`${ii(t)}-${String(e).padStart(2,"0")}`}const ai=/^(?:[a-z]{1,8}-)?0*(\d+)$/i;function li(t){const e=ai.exec(t.trim())?.[1];return e===void 0?null:Number(e)}function Yt(t){const e=O.c(8),{size:s,className:o}=t,a=s===void 0?16:s;let r;e[0]!==a?(r={width:a,height:a},e[0]=a,e[1]=r):r=e[1];let i;e[2]!==o?(i=J("shrink-0 rounded-full object-cover",o),e[2]=o,e[3]=i):i=e[3];let c;return e[4]!==a||e[5]!==r||e[6]!==i?(c=n.jsx("img",{src:bn,alt:"Super Agent",width:a,height:a,style:r,className:i}),e[4]=a,e[5]=r,e[6]=i,e[7]=c):c=e[7],c}const Xe=["overview","reports","board","site-editor","assets","hosting","e2e","analytics","cdn","automations"],ci=["overview","reports","board","site-editor"],Lt=1,di=["assets","hosting","e2e","analytics","cdn"];function fa(t,e,s){if(!t)return{project:s??null,resolvedScopeId:null};const o=e?.id===t?e:s?.id===t?s:null;return{project:o,resolvedScopeId:o?t:null}}function ma(t){return t?.sidebarViews!==void 0?t.sidebarViews:t?.ui?.layout?.sidebarViews}function Fs(t,e){const s=new Set(t??[]);if(e!==Lt)for(const o of ci)s.add(o);return Xe.filter(o=>s.has(o))}function ui(t){return Xe.some(e=>e===t)}function fi(t){return di.some(e=>e===t)}function mi(t,e){return{overview:t,reports:t,board:t,"site-editor":t,assets:e.assets,hosting:e.hosting,e2e:e.e2e,analytics:e.analytics,cdn:e.cdn,automations:!0}}function pa(t,e,s){const o=mi(e,s);return t?o:{...o,overview:!0,reports:!0,board:!0}}function ga(t,e,s){const o=new Set(Fs(t,s));return Xe.filter(a=>e[a]&&o.has(a))}function ha(t,e,s){return s||!t?t:(t.type==="preview"||t.type==="content"||t.type==="code"?"site-editor":t.type)===e?{type:"settings"}:t}function xa(t){return Xe.filter(e=>t[e])}function pi(t,e,s){return!ui(t)||e[t]?!1:fi(t)?!(t==="assets"?s.assets:s.siteAccess):!0}function ja(t,e,s,o,a){return pi(t==="preview"||t==="content"||t==="code"?"site-editor":t,e,s)||t==="content"&&!o.includes("content")||t==="code"&&a&&!o.includes("code")}function ba(t,e,s,o){const a=new Set(Fs(t,o));return s?a.add(e):a.delete(e),Xe.filter(r=>a.has(r))}function We(t,e){return fe.optimisticProjectSidebarViews(t,e)}function st(t){return typeof t=="object"&&t!==null}function Bs(t,e){return t[1]===e&&t[3]==="collection"&&t[4]==="VIRTUAL_MCP"}function gi(t,e){if(!st(t))return t;if("item"in t&&st(t.item)&&t.item.id===e.id)return{...t,item:e};if(!("structuredContent"in t)||!st(t.structuredContent))return t;const s=t.structuredContent.items;if(!Array.isArray(s))return t;let o=!1;const a=s.map(r=>!st(r)||r.id!==e.id?r:(o=!0,e));return o?{...t,structuredContent:{...t.structuredContent,items:a}}:t}function ya(t,e,s){t.setQueriesData({predicate:o=>Bs(o.queryKey,e)},o=>gi(o,s))}function va(t,e,s){const o=t.getQueriesData({predicate:a=>Bs(a.queryKey,e)&&a.queryKey[5]===s});for(const[,a]of o)if(a?.item?.id===s)return a.item;return null}function Mt(t,e,s){return t.getQueryData(We(e,s))??null}function hi(t,e){if(e)return{sidebarViews:[...e.views],sidebarViewsVersion:Lt};const s=t?.sidebarViews;return{sidebarViews:s===null?null:s?[...s]:void 0,sidebarViewsVersion:t?.sidebarViewsVersion}}function Ca(t,e,s){return e?{sidebarViews:[...e.views],sidebarViewsVersion:Lt}:s===void 0?{sidebarViews:t.sidebarViews===null?null:t.sidebarViews?[...t.sidebarViews]:void 0,sidebarViewsVersion:t.sidebarViewsVersion}:hi(s,null)}function xi(t,e,s,o,a){const r=Mt(t,e,s),i={revision:(r?.revision??0)+1,views:[...o],rollbackViews:r?[...r.rollbackViews]:[...a]};return t.setQueryData(We(e,s),i),{revision:i.revision,views:[...i.views],persistedViews:[...i.rollbackViews]}}function ji(t,e,s){const o=Mt(t,e,s);return o?{revision:o.revision,views:[...o.views],persistedViews:[...o.rollbackViews]}:null}function Ps(t,e){const s=new Set(t),o=new Set(e);return s.size===o.size&&[...s].every(a=>o.has(a))}function ka(t){return t?!Ps(t.views,t.persistedViews):!1}function bi(t,e,s,{snapshot:o,saved:a,authoritativeViews:r}){if(!o)return{settledLatest:!1,reconciledViews:null};const i=Mt(t,e,s);if(!i||o.revision>i.revision)return{settledLatest:!1,reconciledViews:null};const c=r!==void 0?[...r]:a?[...o.views]:null,l={...i,rollbackViews:c??i.rollbackViews};return l.rollbackViews!==i.rollbackViews&&t.setQueryData(We(e,s),l),o.revision!==i.revision?{settledLatest:!1,reconciledViews:null}:(t.setQueryData(We(e,s),null),{settledLatest:!0,reconciledViews:a?c&&!Ps(c,o.views)?c:null:[...l.rollbackViews]})}function Na(t){const e=O.c(5),{org:s}=le(),o=t??"";let a;e[0]!==s.id||e[1]!==o?(a=We(s.id,o),e[0]=s.id,e[1]=o,e[2]=a):a=e[2];let r;e[3]!==a?(r={queryKey:a,queryFn:yi,enabled:!1,staleTime:Number.POSITIVE_INFINITY},e[3]=a,e[4]=r):r=e[4];const{data:i}=lt(r);return i?.views}async function yi(){return null}function Sa(t){const e=O.c(4),{org:s}=le(),o=at();let a;return e[0]!==s||e[1]!==o||e[2]!==t?(a={stage:(r,i)=>xi(o,s.id,t,r,i),snapshot:()=>ji(o,s.id,t),settle:r=>bi(o,s.id,t,r)},e[0]=s,e[1]=o,e[2]=t,e[3]=a):a=e[3],a}function vi(t,e){if(!e)return null;const s=e.toLowerCase();return t.find(o=>{const a=o.bucket.toLowerCase();return o.siteSlug?.toLowerCase()===s||a===s||a===`deco-assets-${s}`})??null}function wa(t){const e=O.c(10),{org:s}=le(),o=Zs(),a=lo(),r=ao(),i=co(t),c=o.hostingEnabled===!0,l=o.monitorEnabled===!0||o.auth.localMode===!0,f=(c||l)&&!!i,u=lt({queryKey:fe.hostingAccess(s.slug,i??""),queryFn:async()=>{const k=await fetch(`/api/${s.slug}/hosting/${encodeURIComponent(i??"")}/access`);return k.ok?await k.json():{owned:!1,canWrite:!1}},enabled:f,staleTime:6e4}),m=u.data?.owned===!0,d=!!vi(r.data?.configs??[],i),p=c&&m&&a.hosting,g=c&&m&&a.e2e,h=c&&m&&a.analytics,x=l&&m&&a.monitor;let j;e[0]!==d||e[1]!==p||e[2]!==g||e[3]!==h||e[4]!==x?(j={assets:d,hosting:p,e2e:g,analytics:h,cdn:x},e[0]=d,e[1]=p,e[2]=g,e[3]=h,e[4]=x,e[5]=j):j=e[5];const N=!!i&&r.isPending,y=f&&u.isPending;let v;return e[6]!==j||e[7]!==N||e[8]!==y?(v={presence:j,assetsPending:N,siteAccessPending:y},e[6]=j,e[7]=N,e[8]=y,e[9]=v):v=e[9],v}const Xt=()=>0;function Ci(t){const{orgSlug:e,enabled:s=!0,onUpdate:o,onDelete:a,onResync:r}=t,i=G.useRef(o);i.current=o;const c=G.useRef(a);c.current=a;const l=G.useRef(r);l.current=r;const f=G.useRef(null),u=G.useRef(s),m=G.useRef(e);(!f.current||u.current!==s||m.current!==e)&&(u.current=s,m.current=e,f.current=p=>{if(!s||!e)return()=>{};const g=h=>{let x;try{x=JSON.parse(h.data)}catch{return}x.data&&(h.type===uo?c.current?.(x.data.id):i.current(x.data)),p()};return po.subscribe(e,g,()=>l.current?.())}),G.useSyncExternalStore(f.current,Xt,Xt)}function ki(t,e){return{queryKey:fe.taskBoardItems(t),refetchInterval:6e4,queryFn:async()=>{const{items:s}=await e.call("TASK_BOARD_ITEM_LIST",{});return{items:s}}}}function Ni(){const t=O.c(21),{org:e,locator:s}=le(),o=at();let a;t[0]!==s?(a=fe.taskBoardItems(s),t[0]=s,t[1]=a):a=t[1];const r=a;let i;t[2]!==s||t[3]!==o||t[4]!==r?(i=d=>{o.cancelQueries({queryKey:r}),o.setQueryData(r,p=>p&&{...p,items:p.items.some(g=>g.id===d.id)?p.items.map(g=>g.id===d.id?d:g):[d,...p.items]}),o.invalidateQueries({queryKey:fe.taskBoardActivity(s,d.id)})},t[2]=s,t[3]=o,t[4]=r,t[5]=i):i=t[5];let c,l;t[6]!==o||t[7]!==r?(c=()=>{o.invalidateQueries({queryKey:r})},l=d=>{o.cancelQueries({queryKey:r}),o.setQueryData(r,p=>p&&{...p,items:p.items.filter(g=>g.id!==d)})},t[6]=o,t[7]=r,t[8]=c,t[9]=l):(c=t[8],l=t[9]);let f;t[10]!==e.slug||t[11]!==i||t[12]!==c||t[13]!==l?(f={orgSlug:e.slug,onUpdate:i,onResync:c,onDelete:l},t[10]=e.slug,t[11]=i,t[12]=c,t[13]=l,t[14]=f):f=t[14],Ci(f);let u;t[15]!==o||t[16]!==r?(u=d=>{const p=d.subject,g=d.data.status;o.cancelQueries({queryKey:r}),o.setQueryData(r,h=>h&&{...h,items:h.items.map(x=>x.threads.some(j=>j.threadId===p)?{...x,threads:x.threads.map(j=>j.threadId===p?{...j,status:g}:j)}:x)})},t[15]=o,t[16]=r,t[17]=u):u=t[17];let m;t[18]!==e.slug||t[19]!==u?(m={orgSlug:e.slug,onTaskStatus:u},t[18]=e.slug,t[19]=u,t[20]=m):m=t[20],go(m)}function _a(){const t=O.c(9),{locator:e}=le(),s=At();let o;t[0]!==e||t[1]!==s?(o=ki(e,s),t[0]=e,t[1]=s,t[2]=o):o=t[2];const a=lt(o);Ni();let r;t[3]!==a.data?.items?(r=a.data?.items??[],t[3]=a.data?.items,t[4]=r):r=t[4];let i;return t[5]!==a.error||t[6]!==a.isLoading||t[7]!==r?(i={items:r,isLoading:a.isLoading,error:a.error},t[5]=a.error,t[6]=a.isLoading,t[7]=r,t[8]=i):i=t[8],i}function Da(){const t=O.c(70),{org:e,locator:s}=le(),o=At(),a=at(),r=Q();let i;t[0]!==s?(i=fe.taskBoardItems(s),t[0]=s,t[1]=i):i=t[1];const c=i;let l;t[2]!==a||t[3]!==c?(l=()=>a.invalidateQueries({queryKey:c}),t[2]=a,t[3]=c,t[4]=l):l=t[4];const f=l;let u;t[5]!==o?(u=B=>o.call("TASK_BOARD_ITEM_CREATE",B),t[5]=o,t[6]=u):u=t[6];let m;t[7]!==f||t[8]!==u?(m={mutationFn:u,onSuccess:f},t[7]=f,t[8]=u,t[9]=m):m=t[9];const d=Oe(m);let p;t[10]!==o?(p=B=>o.call("TASK_BOARD_ITEM_UPDATE",B),t[10]=o,t[11]=p):p=t[11];let g;t[12]!==a||t[13]!==c?(g=async B=>{await a.cancelQueries({queryKey:c});const U=a.getQueryData(c);return a.setQueryData(c,$=>$&&{...$,items:$.items.map(H=>H.id===B.id?{...H,...B}:H)}),{previous:U}},t[12]=a,t[13]=c,t[14]=g):g=t[14];let h;t[15]!==e?(h=(B,U)=>{U.status==="done"&&oe("task_marked_done",{organization_id:e.id,task_board_item_id:U.id})},t[15]=e,t[16]=h):h=t[16];let x;t[17]!==a||t[18]!==c?(x=(B,U,$)=>{$?.previous&&a.setQueryData(c,$.previous)},t[17]=a,t[18]=c,t[19]=x):x=t[19];let j;t[20]!==f||t[21]!==s||t[22]!==a?(j=(B,U,$)=>{f(),a.invalidateQueries({queryKey:fe.taskBoardActivity(s,$.id)})},t[20]=f,t[21]=s,t[22]=a,t[23]=j):j=t[23];let N;t[24]!==p||t[25]!==g||t[26]!==h||t[27]!==x||t[28]!==j?(N={mutationFn:p,onMutate:g,onSuccess:h,onError:x,onSettled:j},t[24]=p,t[25]=g,t[26]=h,t[27]=x,t[28]=j,t[29]=N):N=t[29];const y=Oe(N);let v;t[30]!==o?(v=B=>o.call("TASK_BOARD_ITEM_DELETE",{id:B}),t[30]=o,t[31]=v):v=t[31];let k;t[32]!==f||t[33]!==r?(k=B=>{de.error(B instanceof Error&&B.message?B.message:r("taskBoard.taskBoard.deleteError")),f()},t[32]=f,t[33]=r,t[34]=k):k=t[34];let C;t[35]!==f||t[36]!==v||t[37]!==k?(C={mutationFn:v,onSuccess:f,onError:k},t[35]=f,t[36]=v,t[37]=k,t[38]=C):C=t[38];const D=Oe(C);let b;t[39]!==o?(b=async B=>{const U=await Promise.allSettled(B.map($=>o.call("TASK_BOARD_ITEM_DELETE",{id:$})));return{total:B.length,failed:U.filter(Si).length}},t[39]=o,t[40]=b):b=t[40];let w,_;t[41]!==r?(w=B=>{const{total:U,failed:$}=B;$!==0&&de.error(r("taskBoard.taskBoard.deleteBulkError",{failed:String($),total:String(U)}))},_=()=>de.error(r("taskBoard.taskBoard.deleteError")),t[41]=r,t[42]=w,t[43]=_):(w=t[42],_=t[43]);let I;t[44]!==f||t[45]!==b||t[46]!==w||t[47]!==_?(I={mutationFn:b,onSuccess:w,onError:_,onSettled:f},t[44]=f,t[45]=b,t[46]=w,t[47]=_,t[48]=I):I=t[48];const P=Oe(I);let S;t[49]!==o?(S=B=>o.call("TASK_BOARD_ITEM_UPDATE",B),t[49]=o,t[50]=S):S=t[50];let A;t[51]!==f||t[52]!==S?(A={mutationFn:S,onSuccess:f},t[51]=f,t[52]=S,t[53]=A):A=t[53];const T=Oe(A);let R;t[54]!==o?(R=B=>o.call("TASK_BOARD_ITEM_RERUN",B),t[54]=o,t[55]=R):R=t[55];let E;t[56]!==f||t[57]!==s||t[58]!==a?(E=(B,U,$)=>{f(),a.invalidateQueries({queryKey:fe.taskBoardActivity(s,$.id)})},t[56]=f,t[57]=s,t[58]=a,t[59]=E):E=t[59];let F;t[60]!==R||t[61]!==E?(F={mutationFn:R,onSettled:E},t[60]=R,t[61]=E,t[62]=F):F=t[62];const L=Oe(F);let q;return t[63]!==d||t[64]!==T||t[65]!==D||t[66]!==P||t[67]!==L||t[68]!==y?(q={create:d,update:y,remove:D,removeMany:P,link:T,rerun:L},t[63]=d,t[64]=T,t[65]=D,t[66]=P,t[67]=L,t[68]=y,t[69]=q):q=t[69],q}function Si(t){return t.status==="rejected"}const wi=["ended_after_delivery","superseded"];function _i(t){return!!t&&wi.includes(t)}function Aa(t){return!(t.action==="status_changed"&&typeof t.data?.retry=="number")}function Ta(t){return t.failureKind!=="superseded"}function Es(t){return t.threads.some(e=>e.status==="requires_action")}function Ia(t){return t.status==="in_review"&&!t.assigneeId}function Fa(t){return Es(t)}function Ba(t){return t.status==="in_progress"&&Es(t)?"text-warning animate-pulse":$s(t.status).iconClassName}function Pa(t){return t.threads.some(s=>s.status==="in_progress")?"running":t.threads.some(s=>s.status==="failed"&&!_i(s.failureKind))?"failed":null}function Ea(t,e,s){const o=t.findIndex(u=>u.id===s),a=e===s?t[o+1]?.id??null:e,r=t.filter(u=>u.id!==s),i=a?r.findIndex(u=>u.id===a):-1,c=i===-1?r.length:i,l=r[c-1],f=r[c];return l&&f?(l.sortOrder+f.sortOrder)/2:l?l.sortOrder+1:f?f.sortOrder-1:0}function Va(t,e){return Array.from({length:e},(s,o)=>t-(e-1-o)*1e-4)}const Di=["archived"],Vs={triage:{labelKey:"taskBoard.config.statusBacklog",icon:jo,iconClassName:"text-muted-foreground"},todo:{labelKey:"taskBoard.config.statusTodo",icon:As,iconClassName:"text-muted-foreground"},in_progress:{labelKey:"taskBoard.config.statusInProgress",icon:dn,iconClassName:"text-primary"},in_review:{labelKey:"taskBoard.config.statusInReview",icon:yo,iconClassName:"text-warning"},approved:{labelKey:"taskBoard.config.statusApproved",icon:cn,iconClassName:"text-success"},merged:{labelKey:"taskBoard.config.statusMerged",icon:Wn,iconClassName:"text-primary"},post_deploy_validation:{labelKey:"taskBoard.config.statusPostDeployValidation",icon:ln,iconClassName:"text-warning"},done:{labelKey:"taskBoard.config.statusDone",icon:bo,iconClassName:"text-success"},archived:{labelKey:"taskBoard.config.statusArchived",icon:en,iconClassName:"text-muted-foreground"}},Ai={icon:As,iconClassName:"text-muted-foreground"},Ti=Vs;function $s(t){return Ti[t]??Ai}function $a(t,e){const s=Vs[t];return{label:s?e(s.labelKey):t,visual:$s(t)}}const Oa=["bug","feature","chore","spike","security"],La={bug:{labelKey:"taskBoard.config.typeBug",icon:Co,iconClassName:"text-destructive"},feature:{labelKey:"taskBoard.config.typeFeature",icon:mn,iconClassName:"text-success"},chore:{labelKey:"taskBoard.config.typeChore",icon:fn,iconClassName:"text-muted-foreground"},spike:{labelKey:"taskBoard.config.typeSpike",icon:un,iconClassName:"text-yellow-500"},security:{labelKey:"taskBoard.config.typeSecurity",icon:vo,iconClassName:"text-purple-500"}};function St(t){return mo.includes(t)}function Ma(t){return Pt.filter(e=>t||!St(e))}function Ra({deliveryEnabled:t,shownLanes:e,occupied:s}){const o=Pt.filter(i=>t||!St(i)||s.includes(i)),a=o.filter(i=>Di.includes(i)||!t&&St(i)),r=a.filter(i=>!e.includes(i));return{lanes:o.filter(i=>!r.includes(i)),hidden:r,hideable:a}}const Jt="lane:";function Ii(t){return Pt.includes(t)}function Ka({overId:t,statusOf:e}){if(t===void 0)return null;const s=String(t),o=s.startsWith(Jt)?s.slice(Jt.length):e(s);return o!==void 0&&Ii(o)?o:null}const Fi=["none","low","medium","high","urgent"],nt={none:{labelKey:"taskBoard.config.priorityNone",flagClassName:"text-muted-foreground",dotClassName:"border border-muted-foreground/50",icon:Kt,iconClassName:"text-muted-foreground/40"},low:{labelKey:"taskBoard.config.priorityLow",flagClassName:"text-muted-foreground",dotClassName:"bg-muted-foreground/40",icon:an,iconClassName:"text-muted-foreground"},medium:{labelKey:"taskBoard.config.priorityMedium",flagClassName:"text-blue-500",dotClassName:"bg-blue-500",icon:Kt,iconClassName:"text-blue-500"},high:{labelKey:"taskBoard.config.priorityHigh",flagClassName:"text-warning",dotClassName:"bg-warning",icon:rn,iconClassName:"text-warning"},urgent:{labelKey:"taskBoard.config.priorityUrgent",flagClassName:"text-destructive",dotClassName:"bg-destructive",icon:on,iconClassName:"text-destructive"}};function za(t,e=Date.now()){const s=new Date(t).getTime();return Number.isNaN(s)?null:s<e?"overdue":s-e<=Bi*864e5?"soon":null}const Bi=3;function Zt(t){return`color-mix(in oklab, ${t??fo} var(--user-color-strength), transparent)`}function Os(t){return t?.projects.length===1?t.projects[0]:void 0}function Pi(t){return Os(t)?t.repo:t.projects.length>1?t.projects.map(e=>e.title).join(", "):null}function Ls(t){const e=O.c(6),{entry:s}=t;let o;e[0]!==s?(o=Os(s),e[0]=s,e[1]=o):o=e[1];const a=o;if(a){let i;return e[2]!==a.icon||e[3]!==a.title?(i=n.jsx(Fn,{icon:a.icon,name:a.title}),e[2]=a.icon,e[3]=a.title,e[4]=i):i=e[4],i}let r;return e[5]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center",children:n.jsx(ms,{className:"size-3"})}),e[5]=r):r=e[5],r}function Ei(t){const e=O.c(14),{entry:s}=t;let o;e[0]!==s?(o=Pi(s),e[0]=s,e[1]=o):o=e[1];const a=o;let r;e[2]!==s?(r=n.jsx(Ls,{entry:s}),e[2]=s,e[3]=r):r=e[3];let i;e[4]!==s.title?(i=n.jsx("span",{className:"truncate",children:s.title}),e[4]=s.title,e[5]=i):i=e[5];let c;e[6]!==a?(c=a&&n.jsx("span",{className:"truncate text-xs text-muted-foreground",children:a}),e[6]=a,e[7]=c):c=e[7];let l;e[8]!==i||e[9]!==c?(l=n.jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[i,c]}),e[8]=i,e[9]=c,e[10]=l):l=e[10];let f;return e[11]!==r||e[12]!==l?(f=n.jsxs(n.Fragment,{children:[r,l]}),e[11]=r,e[12]=l,e[13]=f):f=e[13],f}const ut="__no_repo__";function we(t){return(t??"").trim().toLowerCase()}function Vi(t,e){const s=(t.created_at??"").localeCompare(e.created_at??"");return s!==0?s:t.id.localeCompare(e.id)}function $i(t){return t.projects.length===1?t.projects[0]?.title??t.repo??t.id:t.repo??t.id}function Ua(t,e=[]){const s=new Map,o=new Map,a=[],r=u=>{const m=we(u),d=s.get(m);if(d)return d;const p={id:m,kind:"repo",repo:u.trim(),title:u.trim(),projects:[]};return s.set(m,p),p};for(const u of t){const m=Cn(u);if(m){const p=r(m);p.projects.push(u),o.set(u.id,p);continue}const d={id:u.id,kind:"project",repo:null,title:u.title,projects:[u]};a.push(d),o.set(u.id,d)}for(const u of e){const m=(u??"").trim();m&&r(m)}for(const u of s.values())u.projects.sort(Vi),u.title=$i(u);const i=[...s.values()].filter(u=>u.projects.length>0),c=[...s.values()].filter(u=>u.projects.length===0),l=(u,m)=>u.title.localeCompare(m.title),f=[...[...i,...a].sort(l),...c.sort(l)];return{entries:f,byId:new Map(f.map(u=>[u.id,u])),byRepo:s,byProject:o}}function wt(t,e){for(const o of t.threads??[]){const a=o.virtualMcpId?e.byProject.get(o.virtualMcpId):void 0;if(a)return a}const s=we(t.repo);return(s?e.byRepo.get(s):void 0)??null}function Oi(t,e){const s=wt(t,e);if(!s)return[];if(s.projects.length<=1)return s.projects;for(const o of t.threads??[]){const a=o.virtualMcpId?s.projects.find(r=>r.id===o.virtualMcpId):void 0;if(a)return[a]}return s.projects}function Ga(t,e){const s=Oi(t,e);return s.length===1?s[0]??null:null}function Rt(t,e){return e.byId.get(t)??e.byRepo.get(we(t))??e.byProject.get(t)}function Ms(t,e,s){if(e===null)return!0;if(e===ut)return wt(t,s)===null;const o=Rt(e,s);return o?o.repo&&we(t.repo)===we(o.repo)?!0:wt(t,s)===o:e.includes("/")?we(t.repo)===we(e):!0}function ft(t,e){return t===null?!1:t===ut?!0:!!Rt(t,e)||t.includes("/")}function Ha(t,e,s){return e===null?null:Ms(t,e,s)?e:null}function Qa(t){return t.entries.filter(e=>e.repo!==null&&(e.projects.length===0||e.projects.some(s=>kn(s).status!=="detached")))}const _t="__unassigned__",ze="__any__",Rs={assignee:null,priority:null,due:null,tags:[],project:null,search:""};function Li(t,e){return t.assignee!==null||t.priority!==null||t.due!==null||t.tags.length>0||ft(t.project,e)||t.search.trim()!==""}function Mi(t,e){return(t.assignee!==null?1:0)+(t.priority!==null?1:0)+(t.due!==null?1:0)+(t.tags.length>0?1:0)+(ft(t.project,e)?1:0)+(t.search.trim()!==""?1:0)}const Ri=864e5;function Ki(t,e){const s=new Date(t),o=new Date(e);return s.getFullYear()===o.getFullYear()&&s.getMonth()===o.getMonth()&&s.getDate()===o.getDate()}function Ks(t,e){const s=t.trim();return s===""?!1:e!=null&&li(s)===e}function zi(t,e){return t.assigneeId===e?!0:t.assigneeId===Nt&&t.assignedBy===e}function qa(t,e,s){const o=e.search.trim().toLowerCase();if(o!==""&&!`${t.title} ${t.description??""}`.toLowerCase().includes(o)&&!Ks(o,t.keySeq))return!1;if(e.assignee!==null){if(e.assignee===_t){if(t.assigneeId!==null)return!1}else if(!zi(t,e.assignee))return!1}if(e.priority!==null&&t.priority!==e.priority)return!1;if(e.due!==null)if(e.due==="none"){if(t.dueDate)return!1}else{if(!t.dueDate)return!1;const a=new Date(t.dueDate).getTime(),r=Date.now();if(e.due==="overdue"&&a>=r||e.due==="today"&&!Ki(a,r)||e.due==="week"&&(a<r||a>r+7*Ri))return!1}if(e.tags.length>0){const a=t.tags.map(r=>r.id);if(!e.tags.some(r=>a.includes(r)))return!1}return!!Ms(t,e.project,s)}const es={overdue:"taskBoard.taskFilters.dueDateFilterOverdue",today:"taskBoard.taskFilters.dueDateFilterDueToday",week:"taskBoard.taskFilters.dueDateFilterDueThisWeek",none:"taskBoard.taskFilters.dueDateFilterNoDueDate"};function _e(t,e=!1){return J("inline-flex h-8 items-center gap-1.5 rounded-lg border px-2.5 text-xs font-medium outline-none transition-colors focus-visible:border-ring focus-visible:ring-[2px] focus-visible:ring-ring/20",e&&"h-10 w-full justify-start px-3 text-sm",t?"border-transparent bg-accent text-foreground":"border-border text-muted-foreground hover:bg-muted/60 hover:text-foreground")}function Ui(t){const e=O.c(107),{value:s,members:o,onChange:a,block:r}=t,i=Q(),[c,l]=G.useState(!1);let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(Qt,{size:14,className:"shrink-0"}),e[0]=f):f=e[0];let u=f,m;e[1]!==i?(m=i("taskBoard.taskFilters.assigneeLabel"),e[1]=i,e[2]=m):m=e[2];let d=m;if(s===_t){let M;e[3]!==i?(M=i("taskBoard.taskFilters.assigneeUnassigned"),e[3]=i,e[4]=M):M=e[4],d=M}else if(s===Nt){let M;e[5]===Symbol.for("react.memo_cache_sentinel")?(M=n.jsx(Yt,{size:14}),e[5]=M):M=e[5],u=M;let K;e[6]!==i?(K=i("taskBoard.taskFilters.assigneeSuperAgent"),e[6]=i,e[7]=K):K=e[7],d=K}else if(s){let M,K,ae,Y;if(e[8]!==o||e[9]!==s){let De;e[14]!==s?(De=Ae=>Ae.userId===s,e[14]=s,e[15]=De):De=e[15],K=o.find(De),M=Ht,ae=K?.user?.image??void 0,Y=qt(K?.user?.name),e[8]=o,e[9]=s,e[10]=M,e[11]=K,e[12]=ae,e[13]=Y}else M=e[10],K=e[11],ae=e[12],Y=e[13];let ve;e[16]!==M||e[17]!==ae||e[18]!==Y?(ve=n.jsx(M,{url:ae,fallback:Y,shape:"circle",size:"2xs"}),e[16]=M,e[17]=ae,e[18]=Y,e[19]=ve):ve=e[19],u=ve;let ue;e[20]!==K?.user?.name||e[21]!==i?(ue=K?.user?.name??i("taskBoard.taskFilters.assigneeMember"),e[20]=K?.user?.name,e[21]=i,e[22]=ue):ue=e[22],d=ue}let p;e[23]!==a?(p=M=>{a(M),l(!1)},e[23]=a,e[24]=p):p=e[24];const g=p,h=s!==null;let x;e[25]!==r||e[26]!==h?(x=_e(h,r),e[25]=r,e[26]=h,e[27]=x):x=e[27];const j=x,N=r&&"ml-auto";let y;e[28]!==N?(y=J("shrink-0 opacity-60",N),e[28]=N,e[29]=y):y=e[29];const v=y;let k;e[30]!==d?(k=n.jsx("span",{className:"max-w-[10rem] truncate",children:d}),e[30]=d,e[31]=k):k=e[31];let C;e[32]!==v?(C=n.jsx(Ge,{size:12,className:v}),e[32]=v,e[33]=C):C=e[33];let D;e[34]!==u||e[35]!==k||e[36]!==C||e[37]!==j?(D=n.jsx(Ue,{asChild:!0,children:n.jsxs("button",{type:"button",className:j,children:[u,k,C]})}),e[34]=u,e[35]=k,e[36]=C,e[37]=j,e[38]=D):D=e[38];let b;e[39]!==i?(b=i("taskBoard.taskFilters.assigneeFilterPlaceholder"),e[39]=i,e[40]=b):b=e[40];let w;e[41]!==i?(w=i("taskBoard.taskFilters.assigneeFilterPlaceholder"),e[41]=i,e[42]=w):w=e[42];let _;e[43]!==b||e[44]!==w?(_=n.jsx(Et,{placeholder:b,"aria-label":w,className:"h-9"}),e[43]=b,e[44]=w,e[45]=_):_=e[45];let I;e[46]!==i?(I=i("taskBoard.taskFilters.assigneeNoMembersFound"),e[46]=i,e[47]=I):I=e[47];let P;e[48]!==I?(P=n.jsx(Vt,{children:I}),e[48]=I,e[49]=P):P=e[49];let S;e[50]!==i?(S=i("taskBoard.taskFilters.assigneeAnyone"),e[50]=i,e[51]=S):S=e[51];let A;e[52]!==g?(A=()=>g(null),e[52]=g,e[53]=A):A=e[53];let T;e[54]!==i?(T=i("taskBoard.taskFilters.assigneeAnyone"),e[54]=i,e[55]=T):T=e[55];let R;e[56]!==S||e[57]!==A||e[58]!==T?(R=n.jsx(Ce,{value:S,onSelect:A,children:T}),e[56]=S,e[57]=A,e[58]=T,e[59]=R):R=e[59];let E;e[60]!==i?(E=i("taskBoard.taskFilters.assigneeUnassigned"),e[60]=i,e[61]=E):E=e[61];let F;e[62]!==g?(F=()=>g(_t),e[62]=g,e[63]=F):F=e[63];let L;e[64]===Symbol.for("react.memo_cache_sentinel")?(L=n.jsx(Qt,{size:16,className:"text-muted-foreground"}),e[64]=L):L=e[64];let q;e[65]!==i?(q=i("taskBoard.taskFilters.assigneeUnassigned"),e[65]=i,e[66]=q):q=e[66];let B;e[67]!==E||e[68]!==F||e[69]!==q?(B=n.jsxs(Ce,{value:E,onSelect:F,className:"gap-2",children:[L,q]}),e[67]=E,e[68]=F,e[69]=q,e[70]=B):B=e[70];let U;e[71]!==i?(U=i("taskBoard.taskFilters.assigneeSuperAgent"),e[71]=i,e[72]=U):U=e[72];let $;e[73]!==g?($=()=>g(Nt),e[73]=g,e[74]=$):$=e[74];let H;e[75]===Symbol.for("react.memo_cache_sentinel")?(H=n.jsx(Yt,{size:16}),e[75]=H):H=e[75];let z;e[76]!==i?(z=i("taskBoard.taskFilters.assigneeSuperAgent"),e[76]=i,e[77]=z):z=e[77];let se;e[78]!==U||e[79]!==$||e[80]!==z?(se=n.jsxs(Ce,{value:U,onSelect:$,className:"gap-2",children:[H,z]}),e[78]=U,e[79]=$,e[80]=z,e[81]=se):se=e[81];let W;e[82]!==R||e[83]!==B||e[84]!==se?(W=n.jsxs(Ke,{children:[R,B,se]}),e[82]=R,e[83]=B,e[84]=se,e[85]=W):W=e[85];let ie;e[86]!==i?(ie=i("taskBoard.taskFilters.assigneeGroupMembers"),e[86]=i,e[87]=ie):ie=e[87];let Z;if(e[88]!==o||e[89]!==g){let M;e[91]!==g?(M=K=>n.jsxs(Ce,{value:K.user?.name??K.userId,onSelect:()=>g(K.userId),className:"gap-2",children:[n.jsx(Ht,{url:K.user?.image??void 0,fallback:qt(K.user?.name),shape:"circle",size:"2xs"}),n.jsx("span",{className:"truncate",children:K.user?.name??K.userId})]},K.userId),e[91]=g,e[92]=M):M=e[92],Z=o.map(M),e[88]=o,e[89]=g,e[90]=Z}else Z=e[90];let ee;e[93]!==ie||e[94]!==Z?(ee=n.jsx(Ke,{heading:ie,children:Z}),e[93]=ie,e[94]=Z,e[95]=ee):ee=e[95];let te;e[96]!==P||e[97]!==W||e[98]!==ee?(te=n.jsxs($t,{children:[P,W,ee]}),e[96]=P,e[97]=W,e[98]=ee,e[99]=te):te=e[99];let ne;e[100]!==_||e[101]!==te?(ne=n.jsx(dt,{align:"start",className:"w-56 p-0",children:n.jsxs(Ot,{children:[_,te]})}),e[100]=_,e[101]=te,e[102]=ne):ne=e[102];let re;return e[103]!==c||e[104]!==D||e[105]!==ne?(re=n.jsxs(ct,{open:c,onOpenChange:l,children:[D,ne]}),e[103]=c,e[104]=D,e[105]=ne,e[106]=re):re=e[106],re}function Gi(t){const e=O.c(33),{value:s,onChange:o,block:a}=t,r=Q(),i=s!==null;let c;e[0]!==a||e[1]!==i?(c=_e(i,a),e[0]=a,e[1]=i,e[2]=c):c=e[2];const l=c,f=a&&"ml-auto";let u;e[3]!==f?(u=J("shrink-0 opacity-60",f),e[3]=f,e[4]=u):u=e[4];const m=u;let d;e[5]!==s?(d=s?n.jsx("span",{className:J("size-2 shrink-0 rounded-full",nt[s].dotClassName)}):n.jsx(ho,{size:14,className:"shrink-0"}),e[5]=s,e[6]=d):d=e[6];let p;e[7]!==r||e[8]!==s?(p=r(s?nt[s].labelKey:"taskBoard.taskFilters.priorityLabel"),e[7]=r,e[8]=s,e[9]=p):p=e[9];let g;e[10]!==m?(g=n.jsx(Ge,{size:12,className:m}),e[10]=m,e[11]=g):g=e[11];let h;e[12]!==d||e[13]!==p||e[14]!==g||e[15]!==l?(h=n.jsx(Ss,{asChild:!0,children:n.jsxs("button",{type:"button",className:l,children:[d,p,g]})}),e[12]=d,e[13]=p,e[14]=g,e[15]=l,e[16]=h):h=e[16];const x=s??ze;let j;e[17]!==o?(j=D=>o(D===ze?null:D),e[17]=o,e[18]=j):j=e[18];let N;e[19]!==r?(N=r("taskBoard.taskFilters.priorityAnyPriority"),e[19]=r,e[20]=N):N=e[20];let y;e[21]!==N?(y=n.jsx(rt,{value:ze,children:N}),e[21]=N,e[22]=y):y=e[22];let v;e[23]!==r?(v=Fi.map(D=>n.jsxs(rt,{value:D,className:"gap-2",children:[n.jsx("span",{className:J("size-2 rounded-full",nt[D].dotClassName)}),r(nt[D].labelKey)]},D)),e[23]=r,e[24]=v):v=e[24];let k;e[25]!==j||e[26]!==y||e[27]!==v||e[28]!==x?(k=n.jsx(ws,{align:"start",className:"w-40",children:n.jsxs(_s,{value:x,onValueChange:j,children:[y,v]})}),e[25]=j,e[26]=y,e[27]=v,e[28]=x,e[29]=k):k=e[29];let C;return e[30]!==k||e[31]!==h?(C=n.jsxs(Ds,{children:[h,k]}),e[30]=k,e[31]=h,e[32]=C):C=e[32],C}function Hi(t){const e=O.c(35),{value:s,onChange:o,block:a}=t,r=Q();let i;e[0]!==r||e[1]!==s?(i=s?r(es[s]):void 0,e[0]=r,e[1]=s,e[2]=i):i=e[2];const c=i,l=s!==null;let f;e[3]!==a||e[4]!==l?(f=_e(l,a),e[3]=a,e[4]=l,e[5]=f):f=e[5];const u=f,m=a&&"ml-auto";let d;e[6]!==m?(d=J("shrink-0 opacity-60",m),e[6]=m,e[7]=d):d=e[7];const p=d;let g;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(bt,{size:14,className:"shrink-0"}),e[8]=g):g=e[8];let h;e[9]!==c||e[10]!==r?(h=c??r("taskBoard.taskFilters.dueDateLabel"),e[9]=c,e[10]=r,e[11]=h):h=e[11];let x;e[12]!==p?(x=n.jsx(Ge,{size:12,className:p}),e[12]=p,e[13]=x):x=e[13];let j;e[14]!==h||e[15]!==x||e[16]!==u?(j=n.jsx(Ss,{asChild:!0,children:n.jsxs("button",{type:"button",className:u,children:[g,h,x]})}),e[14]=h,e[15]=x,e[16]=u,e[17]=j):j=e[17];const N=s??ze;let y;e[18]!==o?(y=_=>o(_===ze?null:_),e[18]=o,e[19]=y):y=e[19];let v;e[20]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(bt,{size:16,className:"text-muted-foreground"}),e[20]=v):v=e[20];let k;e[21]!==r?(k=r("taskBoard.taskFilters.dueDateAnyTime"),e[21]=r,e[22]=k):k=e[22];let C;e[23]!==k?(C=n.jsxs(rt,{value:ze,className:"gap-2",children:[v,k]}),e[23]=k,e[24]=C):C=e[24];let D;e[25]!==r?(D=Object.entries(es).map(_=>{const[I,P]=_,S=I==="overdue";return n.jsxs(rt,{value:I,className:J("gap-2",S&&"text-destructive"),children:[n.jsx(bt,{size:16,className:J("shrink-0",S?"text-destructive":"text-muted-foreground")}),r(P)]},I)}),e[25]=r,e[26]=D):D=e[26];let b;e[27]!==N||e[28]!==y||e[29]!==C||e[30]!==D?(b=n.jsx(ws,{align:"start",className:"w-44",children:n.jsxs(_s,{value:N,onValueChange:y,children:[C,D]})}),e[27]=N,e[28]=y,e[29]=C,e[30]=D,e[31]=b):b=e[31];let w;return e[32]!==b||e[33]!==j?(w=n.jsxs(Ds,{children:[j,b]}),e[32]=b,e[33]=j,e[34]=w):w=e[34],w}function Qi(t){const e=O.c(56),{value:s,tags:o,onChange:a,block:r}=t,i=Q(),[c,l]=G.useState(!1);let f;e[0]!==a||e[1]!==s?(f=E=>a(s.includes(E)?s.filter(F=>F!==E):[...s,E]),e[0]=a,e[1]=s,e[2]=f):f=e[2];const u=f;let m;e[3]!==i||e[4]!==o||e[5]!==s[0]||e[6]!==s.length?(m=s.length===0?i("taskBoard.taskFilters.tagsLabel"):s.length===1?o.find(E=>E.id===s[0])?.name??i("taskBoard.taskFilters.tagsLabel"):i("taskBoard.taskFilters.tagsSelectedCount",{count:s.length}),e[3]=i,e[4]=o,e[5]=s[0],e[6]=s.length,e[7]=m):m=e[7];const d=m,p=s.length>0;let g;e[8]!==r||e[9]!==p?(g=_e(p,r),e[8]=r,e[9]=p,e[10]=g):g=e[10];const h=g,x=r&&"ml-auto";let j;e[11]!==x?(j=J("shrink-0 opacity-60",x),e[11]=x,e[12]=j):j=e[12];const N=j;let y;e[13]!==o||e[14]!==s[0]||e[15]!==s.length?(y=s.length===1?n.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:Zt(o.find(E=>E.id===s[0])?.color)}}):n.jsx(pn,{size:14,className:"shrink-0"}),e[13]=o,e[14]=s[0],e[15]=s.length,e[16]=y):y=e[16];let v;e[17]!==d?(v=n.jsx("span",{className:"max-w-[10rem] truncate",children:d}),e[17]=d,e[18]=v):v=e[18];let k;e[19]!==N?(k=n.jsx(Ge,{size:12,className:N}),e[19]=N,e[20]=k):k=e[20];let C;e[21]!==y||e[22]!==v||e[23]!==k||e[24]!==h?(C=n.jsx(Ue,{asChild:!0,children:n.jsxs("button",{type:"button",className:h,children:[y,v,k]})}),e[21]=y,e[22]=v,e[23]=k,e[24]=h,e[25]=C):C=e[25];let D;e[26]!==i?(D=i("taskBoard.taskFilters.tagsFilterPlaceholder"),e[26]=i,e[27]=D):D=e[27];let b;e[28]!==i?(b=i("taskBoard.taskFilters.tagsFilterPlaceholder"),e[28]=i,e[29]=b):b=e[29];let w;e[30]!==D||e[31]!==b?(w=n.jsx(Et,{placeholder:D,"aria-label":b,className:"h-9"}),e[30]=D,e[31]=b,e[32]=w):w=e[32];let _;e[33]!==i?(_=i("taskBoard.taskFilters.tagsNoTagsFound"),e[33]=i,e[34]=_):_=e[34];let I;e[35]!==_?(I=n.jsx(Vt,{children:_}),e[35]=_,e[36]=I):I=e[36];let P;if(e[37]!==o||e[38]!==u||e[39]!==s){let E;e[41]!==u||e[42]!==s?(E=F=>n.jsxs(Ce,{value:F.name,onSelect:()=>u(F.id),className:"gap-2",children:[n.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:Zt(F.color)}}),n.jsx("span",{className:"flex-1 truncate",children:F.name}),s.includes(F.id)&&n.jsx(qe,{size:14,className:"shrink-0 text-foreground"})]},F.id),e[41]=u,e[42]=s,e[43]=E):E=e[43],P=o.map(E),e[37]=o,e[38]=u,e[39]=s,e[40]=P}else P=e[40];let S;e[44]!==P?(S=n.jsx(Ke,{children:P}),e[44]=P,e[45]=S):S=e[45];let A;e[46]!==I||e[47]!==S?(A=n.jsxs($t,{children:[I,S]}),e[46]=I,e[47]=S,e[48]=A):A=e[48];let T;e[49]!==w||e[50]!==A?(T=n.jsx(dt,{align:"start",className:"w-56 p-0",children:n.jsxs(Ot,{children:[w,A]})}),e[49]=w,e[50]=A,e[51]=T):T=e[51];let R;return e[52]!==c||e[53]!==C||e[54]!==T?(R=n.jsxs(ct,{open:c,onOpenChange:l,children:[C,T]}),e[52]=c,e[53]=C,e[54]=T,e[55]=R):R=e[55],R}function ts(t){const e=O.c(11),{entry:s,selected:o,onSelect:a}=t,r=s.id,i=s.title;let c;e[0]!==s.projects?(c=s.projects.map(qi).join(" "),e[0]=s.projects,e[1]=c):c=e[1];const l=`${r} ${i} ${s.repo??""} ${c}`;let f;e[2]!==s?(f=n.jsx(Ei,{entry:s}),e[2]=s,e[3]=f):f=e[3];let u;e[4]!==o?(u=o&&n.jsx(qe,{size:14,className:"shrink-0 text-foreground"}),e[4]=o,e[5]=u):u=e[5];let m;return e[6]!==a||e[7]!==l||e[8]!==f||e[9]!==u?(m=n.jsxs(Ce,{value:l,onSelect:a,className:"gap-2",children:[f,u]}),e[6]=a,e[7]=l,e[8]=f,e[9]=u,e[10]=m):m=e[10],m}function qi(t){return t.title}function Wi(t,e,s,o){return t===null||!s?o("taskBoard.taskFilters.projectLabel"):t===ut?o("taskBoard.taskFilters.projectNone"):e?.title??t}function Yi(t){const e=O.c(90),{value:s,index:o,onChange:a,block:r}=t,i=Q(),[c,l]=G.useState(!1);let f,u,m,d,p,g,h,x,j,N,y,v,k,C;if(e[0]!==r||e[1]!==o||e[2]!==a||e[3]!==c||e[4]!==i||e[5]!==s){const I=s===null?void 0:Rt(s,o),P=ft(s,o),S=Wi(s,I,P,i);let A;e[20]!==a?(A=Y=>{a(Y),l(!1)},e[20]=a,e[21]=A):A=e[21];const T=A,R=o.entries.filter(Ji),E=o.entries.filter(Xi),F=_e(P,r),L=r&&"ml-auto";let q;e[22]!==L?(q=J("shrink-0 opacity-60",L),e[22]=L,e[23]=q):q=e[23];const B=q;d=ct,k=c,C=l;const U=P?I:void 0;let $;e[24]!==U?($=n.jsx(Ls,{entry:U}),e[24]=U,e[25]=$):$=e[25];let H;e[26]!==S?(H=n.jsx("span",{className:"max-w-[12rem] truncate",children:S}),e[26]=S,e[27]=H):H=e[27];let z;e[28]!==B?(z=n.jsx(Ge,{size:12,className:B}),e[28]=B,e[29]=z):z=e[29],e[30]!==$||e[31]!==H||e[32]!==z||e[33]!==F?(g=n.jsx(Ue,{asChild:!0,children:n.jsxs("button",{type:"button",className:F,children:[$,H,z]})}),e[30]=$,e[31]=H,e[32]=z,e[33]=F,e[34]=g):g=e[34],m=dt,y="start",v="w-72 p-0",u=Ot;let se;e[35]!==i?(se=i("taskBoard.taskFilters.projectFilterPlaceholder"),e[35]=i,e[36]=se):se=e[36];let W;e[37]!==i?(W=i("taskBoard.taskFilters.projectFilterPlaceholder"),e[37]=i,e[38]=W):W=e[38],e[39]!==se||e[40]!==W?(N=n.jsx(Et,{placeholder:se,"aria-label":W,className:"h-9"}),e[39]=se,e[40]=W,e[41]=N):N=e[41],f=$t;let ie;e[42]!==i?(ie=i("taskBoard.taskFilters.projectNoneFound"),e[42]=i,e[43]=ie):ie=e[43],e[44]!==ie?(p=n.jsx(Vt,{children:ie}),e[44]=ie,e[45]=p):p=e[45];let Z;e[46]!==i?(Z=i("taskBoard.taskFilters.projectAny"),e[46]=i,e[47]=Z):Z=e[47];let ee;e[48]!==T?(ee=()=>T(null),e[48]=T,e[49]=ee):ee=e[49];let te;e[50]!==i?(te=i("taskBoard.taskFilters.projectAny"),e[50]=i,e[51]=te):te=e[51];let ne;e[52]!==Z||e[53]!==ee||e[54]!==te?(ne=n.jsx(Ce,{value:Z,onSelect:ee,children:te}),e[52]=Z,e[53]=ee,e[54]=te,e[55]=ne):ne=e[55];let re;e[56]!==i?(re=i("taskBoard.taskFilters.projectNone"),e[56]=i,e[57]=re):re=e[57];let M;e[58]!==T?(M=()=>T(ut),e[58]=T,e[59]=M):M=e[59];let K;e[60]!==i?(K=i("taskBoard.taskFilters.projectNone"),e[60]=i,e[61]=K):K=e[61];let ae;e[62]!==re||e[63]!==M||e[64]!==K?(ae=n.jsx(Ce,{value:re,onSelect:M,children:K}),e[62]=re,e[63]=M,e[64]=K,e[65]=ae):ae=e[65],e[66]!==ne||e[67]!==ae?(h=n.jsxs(Ke,{children:[ne,ae]}),e[66]=ne,e[67]=ae,e[68]=h):h=e[68],x=R.length>0&&n.jsx(Ke,{heading:i("taskBoard.taskFilters.projectGroupProjects"),children:R.map(Y=>n.jsx(ts,{entry:Y,selected:I===Y,onSelect:()=>T(Y.id)},Y.id))}),j=E.length>0&&n.jsx(Ke,{heading:i("taskBoard.taskFilters.projectGroupRepos"),children:E.map(Y=>n.jsx(ts,{entry:Y,selected:I===Y,onSelect:()=>T(Y.id)},Y.id))}),e[0]=r,e[1]=o,e[2]=a,e[3]=c,e[4]=i,e[5]=s,e[6]=f,e[7]=u,e[8]=m,e[9]=d,e[10]=p,e[11]=g,e[12]=h,e[13]=x,e[14]=j,e[15]=N,e[16]=y,e[17]=v,e[18]=k,e[19]=C}else f=e[6],u=e[7],m=e[8],d=e[9],p=e[10],g=e[11],h=e[12],x=e[13],j=e[14],N=e[15],y=e[16],v=e[17],k=e[18],C=e[19];let D;e[69]!==f||e[70]!==p||e[71]!==h||e[72]!==x||e[73]!==j?(D=n.jsxs(f,{children:[p,h,x,j]}),e[69]=f,e[70]=p,e[71]=h,e[72]=x,e[73]=j,e[74]=D):D=e[74];let b;e[75]!==u||e[76]!==D||e[77]!==N?(b=n.jsxs(u,{children:[N,D]}),e[75]=u,e[76]=D,e[77]=N,e[78]=b):b=e[78];let w;e[79]!==m||e[80]!==b||e[81]!==y||e[82]!==v?(w=n.jsx(m,{align:y,className:v,children:b}),e[79]=m,e[80]=b,e[81]=y,e[82]=v,e[83]=w):w=e[83];let _;return e[84]!==d||e[85]!==g||e[86]!==w||e[87]!==k||e[88]!==C?(_=n.jsxs(d,{open:k,onOpenChange:C,children:[g,w]}),e[84]=d,e[85]=g,e[86]=w,e[87]=k,e[88]=C,e[89]=_):_=e[89],_}function Xi(t){return t.projects.length===0}function Ji(t){return t.projects.length>0}function Zi(t){const e=O.c(25),{value:s,onChange:o,block:a}=t,r=Q(),[i,c]=G.useState(s!==""),[l,f]=G.useState(!1),[u,m]=G.useState(s);s!==u&&(m(s),s===""&&!l&&c(!1));const d=i||a,p=d?"w-32 sm:w-44":"w-8 px-0 justify-center",g=a&&"h-10 w-full px-3 text-sm sm:w-full";let h;e[0]!==p||e[1]!==g?(h=J("inline-flex h-8 shrink-0 items-center gap-1.5 overflow-hidden rounded-lg border border-border px-2.5 text-xs text-foreground transition-all duration-200 ease-out",p,g),e[0]=p,e[1]=g,e[2]=h):h=e[2];let x;e[3]!==r?(x=r("taskBoard.taskFilters.searchLabel"),e[3]=r,e[4]=x):x=e[4];let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=()=>c(!0),e[5]=j):j=e[5];let N;e[6]===Symbol.for("react.memo_cache_sentinel")?(N=n.jsx(gn,{size:14}),e[6]=N):N=e[6];let y;e[7]!==x?(y=n.jsx("button",{type:"button","aria-label":x,onClick:j,className:"shrink-0 text-muted-foreground transition-colors hover:text-foreground",children:N}),e[7]=x,e[8]=y):y=e[8];let v;e[9]!==a||e[10]!==d||e[11]!==o||e[12]!==r||e[13]!==s?(v=d&&n.jsx("input",{autoFocus:!a,value:s,onChange:D=>o(D.target.value),onFocus:()=>f(!0),onBlur:()=>{f(!1),s===""&&c(!1)},placeholder:r("taskBoard.taskFilters.searchPlaceholder"),"aria-label":r("taskBoard.taskFilters.searchPlaceholder"),className:"w-full min-w-0 bg-transparent text-xs outline-none placeholder:text-muted-foreground"}),e[9]=a,e[10]=d,e[11]=o,e[12]=r,e[13]=s,e[14]=v):v=e[14];let k;e[15]!==a||e[16]!==o||e[17]!==r||e[18]!==s?(k=s!==""&&n.jsx("button",{type:"button","aria-label":r("taskBoard.taskFilters.searchClearLabel"),onMouseDown:er,onClick:()=>{o(""),a||c(!1)},className:"shrink-0 text-muted-foreground hover:text-foreground",children:n.jsx(tn,{size:14})}),e[15]=a,e[16]=o,e[17]=r,e[18]=s,e[19]=k):k=e[19];let C;return e[20]!==h||e[21]!==y||e[22]!==v||e[23]!==k?(C=n.jsxs("div",{className:h,children:[y,v,k]}),e[20]=h,e[21]=y,e[22]=v,e[23]=k,e[24]=C):C=e[24],C}function er(t){return t.preventDefault()}function tr(t){const e=O.c(20),{block:s,onClick:o}=t,a=Q();let r;e[0]!==a?(r=a("taskBoard.taskFilters.boardSettingsLabel"),e[0]=a,e[1]=r):r=e[1];const i=r;let c;e[2]!==s?(c=J(_e(!1,s),s?"h-10 w-full":"w-8 justify-center px-0"),e[2]=s,e[3]=c):c=e[3];let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(xo,{size:14,className:"shrink-0"}),e[4]=l):l=e[4];let f;e[5]!==s||e[6]!==i?(f=s&&n.jsx("span",{children:i}),e[5]=s,e[6]=i,e[7]=f):f=e[7];let u;e[8]!==i||e[9]!==o||e[10]!==c||e[11]!==f?(u=n.jsxs("button",{type:"button",onClick:o,"aria-label":i,className:c,children:[l,f]}),e[8]=i,e[9]=o,e[10]=c,e[11]=f,e[12]=u):u=e[12];const m=u;if(s)return m;let d;e[13]!==m?(d=n.jsx(Le,{asChild:!0,children:m}),e[13]=m,e[14]=d):d=e[14];let p;e[15]!==i?(p=n.jsx(Me,{side:"top",children:i}),e[15]=i,e[16]=p):p=e[16];let g;return e[17]!==d||e[18]!==p?(g=n.jsxs(Re,{children:[d,p]}),e[17]=d,e[18]=p,e[19]=g):g=e[19],g}function zs(t){const e=O.c(53),{filters:s,members:o,tags:a,index:r,onChange:i,onOpenBoardSettings:c,block:l}=t;let f;e[0]!==s||e[1]!==i?(f=C=>i({...s,search:C}),e[0]=s,e[1]=i,e[2]=f):f=e[2];let u;e[3]!==l||e[4]!==s.search||e[5]!==f?(u=n.jsx(Zi,{block:l,value:s.search,onChange:f}),e[3]=l,e[4]=s.search,e[5]=f,e[6]=u):u=e[6];let m;e[7]!==s||e[8]!==i?(m=C=>i({...s,assignee:C}),e[7]=s,e[8]=i,e[9]=m):m=e[9];let d;e[10]!==l||e[11]!==s.assignee||e[12]!==o||e[13]!==m?(d=n.jsx(Ui,{block:l,value:s.assignee,members:o,onChange:m}),e[10]=l,e[11]=s.assignee,e[12]=o,e[13]=m,e[14]=d):d=e[14];let p;e[15]!==s||e[16]!==i?(p=C=>i({...s,priority:C}),e[15]=s,e[16]=i,e[17]=p):p=e[17];let g;e[18]!==l||e[19]!==s.priority||e[20]!==p?(g=n.jsx(Gi,{block:l,value:s.priority,onChange:p}),e[18]=l,e[19]=s.priority,e[20]=p,e[21]=g):g=e[21];let h;e[22]!==s||e[23]!==i?(h=C=>i({...s,due:C}),e[22]=s,e[23]=i,e[24]=h):h=e[24];let x;e[25]!==l||e[26]!==s.due||e[27]!==h?(x=n.jsx(Hi,{block:l,value:s.due,onChange:h}),e[25]=l,e[26]=s.due,e[27]=h,e[28]=x):x=e[28];let j;e[29]!==s||e[30]!==i?(j=C=>i({...s,tags:C}),e[29]=s,e[30]=i,e[31]=j):j=e[31];let N;e[32]!==l||e[33]!==s.tags||e[34]!==j||e[35]!==a?(N=n.jsx(Qi,{block:l,value:s.tags,tags:a,onChange:j}),e[32]=l,e[33]=s.tags,e[34]=j,e[35]=a,e[36]=N):N=e[36];let y;e[37]!==l||e[38]!==s||e[39]!==r||e[40]!==i?(y=(r.entries.length>0||ft(s.project,r))&&n.jsx(Yi,{block:l,value:s.project,index:r,onChange:C=>i({...s,project:C})}),e[37]=l,e[38]=s,e[39]=r,e[40]=i,e[41]=y):y=e[41];let v;e[42]!==l||e[43]!==c?(v=n.jsx(tr,{block:l,onClick:c}),e[42]=l,e[43]=c,e[44]=v):v=e[44];let k;return e[45]!==N||e[46]!==y||e[47]!==v||e[48]!==u||e[49]!==d||e[50]!==g||e[51]!==x?(k=n.jsxs(n.Fragment,{children:[u,d,g,x,N,y,v]}),e[45]=N,e[46]=y,e[47]=v,e[48]=u,e[49]=d,e[50]=g,e[51]=x,e[52]=k):k=e[52],k}function Wa(t){const e=O.c(16),{filters:s,members:o,tags:a,index:r,onChange:i,onOpenBoardSettings:c}=t,l=Q();let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(Ns,{size:16,className:"mr-0.5 shrink-0 text-muted-foreground"}),e[0]=f):f=e[0];let u;e[1]!==s||e[2]!==r||e[3]!==o||e[4]!==i||e[5]!==c||e[6]!==a?(u=n.jsx(zs,{filters:s,members:o,tags:a,index:r,onChange:i,onOpenBoardSettings:c}),e[1]=s,e[2]=r,e[3]=o,e[4]=i,e[5]=c,e[6]=a,e[7]=u):u=e[7];let m;e[8]!==s||e[9]!==r||e[10]!==i||e[11]!==l?(m=Li(s,r)&&n.jsx("button",{type:"button",onClick:()=>i(Rs),className:"ml-1 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground",children:l("taskBoard.taskFilters.clearButton")}),e[8]=s,e[9]=r,e[10]=i,e[11]=l,e[12]=m):m=e[12];let d;return e[13]!==u||e[14]!==m?(d=n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[f,u,m]}),e[13]=u,e[14]=m,e[15]=d):d=e[15],d}function Ya(t){const e=O.c(41),{filters:s,members:o,tags:a,index:r,onChange:i,onOpenBoardSettings:c}=t,l=Q(),[f,u]=G.useState(!1),m=Mi(s,r),d=m>0;let p;e[0]!==d?(p=_e(d),e[0]=d,e[1]=p):p=e[1];const g=p;let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(Ns,{size:14,className:"shrink-0"}),e[2]=h):h=e[2];let x;e[3]!==l?(x=l("taskBoard.taskFilters.filterDrawerButtonLabel"),e[3]=l,e[4]=x):x=e[4];let j;e[5]!==m?(j=m>0&&n.jsx("span",{className:"ml-0.5 flex size-4 items-center justify-center rounded-full bg-foreground text-[10px] font-semibold text-background",children:m}),e[5]=m,e[6]=j):j=e[6];let N;e[7]!==x||e[8]!==j||e[9]!==g?(N=n.jsx(wn,{asChild:!0,children:n.jsxs("button",{type:"button",className:g,children:[h,x,j]})}),e[7]=x,e[8]=j,e[9]=g,e[10]=N):N=e[10];let y;e[11]!==l?(y=l("taskBoard.taskFilters.filterDrawerTitle"),e[11]=l,e[12]=y):y=e[12];let v;e[13]!==y?(v=n.jsx(Bt,{className:"px-4 pt-4 text-base font-medium text-foreground",children:y}),e[13]=y,e[14]=v):v=e[14];let k;e[15]!==s||e[16]!==r||e[17]!==o||e[18]!==i||e[19]!==c||e[20]!==a?(k=n.jsx("div",{className:"flex flex-col gap-2 p-4",children:n.jsx(zs,{block:!0,filters:s,members:o,tags:a,index:r,onChange:i,onOpenBoardSettings:c})}),e[15]=s,e[16]=r,e[17]=o,e[18]=i,e[19]=c,e[20]=a,e[21]=k):k=e[21];let C;e[22]!==m||e[23]!==i||e[24]!==l?(C=m>0&&n.jsx(ye,{variant:"outline",className:"flex-1",onClick:()=>i(Rs),children:l("taskBoard.taskFilters.clearAllButton")}),e[22]=m,e[23]=i,e[24]=l,e[25]=C):C=e[25];let D;e[26]!==l?(D=l("taskBoard.taskFilters.doneButton"),e[26]=l,e[27]=D):D=e[27];let b;e[28]!==D?(b=n.jsx(us,{asChild:!0,children:n.jsx(ye,{className:"flex-1",children:D})}),e[28]=D,e[29]=b):b=e[29];let w;e[30]!==C||e[31]!==b?(w=n.jsxs(fs,{className:"flex-row gap-2",children:[C,b]}),e[30]=C,e[31]=b,e[32]=w):w=e[32];let _;e[33]!==w||e[34]!==v||e[35]!==k?(_=n.jsxs(Ft,{className:"p-0",children:[v,k,w]}),e[33]=w,e[34]=v,e[35]=k,e[36]=_):_=e[36];let I;return e[37]!==f||e[38]!==_||e[39]!==N?(I=n.jsxs(It,{open:f,onOpenChange:u,direction:"bottom",children:[N,_]}),e[37]=f,e[38]=_,e[39]=N,e[40]=I):I=e[40],I}function Xa(t,e){return ri(t,e.keySeq)??e.id}function Ja(t,e){const s=e?.trim();if(s)return t.find(o=>Ks(s,o.keySeq))??t.find(o=>o.id===s)}export{_i as $,da as A,va as B,Ca as C,ya as D,Bs as E,Lt as F,Ni as G,wt as H,Ga as I,$a as J,nt as K,Rt as L,Da as M,Fi as N,Oa as O,di as P,Zt as Q,Qa as R,Yt as S,La as T,Ba as U,$s as V,Ma as W,Ls as X,Ei as Y,Aa as Z,Ta as _,Na as a,Vs as a0,_a as a1,Ja as a2,Ya as a3,Wa as a4,Va as a5,Ra as a6,Rs as a7,Pa as a8,Fa as a9,Jt as aa,Ea as ab,Ka as ac,qa as ad,Di as ae,Ha as af,za as ag,vi as ah,Uo as ai,ca as aj,wa as b,Ua as c,Oi as d,Fs as e,Xa as f,Ia as g,ki as h,Es as i,aa as j,la as k,fa as l,pa as m,ja as n,pi as o,mi as p,Sa as q,ma as r,ga as s,ri as t,ua as u,xa as v,ba as w,ha as x,hi as y,ka as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as h}from"./slugify-CEUa2lfQ.js";import{J as m}from"./index-CxLq_ov_.js";function c(r){const t=r?.trim();if(!t)return null;try{const n=new URL(t);return n.protocol!=="http:"&&n.protocol!=="https:"?null:n.href}catch{return null}}function d(r){return c(r?.previewServerUrl)??c(r?.productionUrl)}function I(r){return r?.find(t=>t.production)?.domain??r?.[0]?.domain}function p(r){const t=r?.trim();if(!t)return null;const n=/^https?:\/\//i.test(t)?t:`https://${t}`;return c(n)}function S(r){const t=h(r??"");return t?p(`${t}.deco.site`):null}function l(r){return r==="cms"||r==="sandbox"?r:null}function w(r){return!!d(r)&&r?.fastPreview===!0}function y(r){return w(r)?"cms":"sandbox"}function T(r,t){return l(r?.runtime)??y(t)}function a(r,t){return m.chatThreadIntent(r,t)}function U(r,t,n,e){if(!(!e.runtime&&!e.branch))try{r.setItem(a(t,n),JSON.stringify(e))}catch{}}function g(r,t,n){try{r.removeItem(a(t,n))}catch{}}function P(r,t,n){const e=a(t,n);let u=null;try{u=r.getItem(e),r.removeItem(e)}catch{return{}}if(!u)return{};let i;try{i=JSON.parse(u)}catch{return{}}if(!i||typeof i!="object")return{};const o=i,s=l(o.runtime),f=typeof o.branch=="string"&&o.branch?o.branch:void 0;return{...s?{runtime:s}:{},...f?{branch:f}:{}}}export{d as a,p as b,P as c,y as d,g as e,S as f,I as g,l as p,T as r,c as s,U as w};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as y,b as T,j as i,B as L,r as O,J as U,u as k,f as D,W as E,d as V,Z as H,y as z,dz as B}from"./index-CxLq_ov_.js";import{d as J,h as K,c as F,b as G,D as W}from"./dialog-Do-ZnJpa.js";import{i as Y}from"./Check-DFnPCTEg.js";import{a as Q}from"./Copy01-DXf2ReD_.js";import{n as X}from"./Download01-GnhueTng.js";import{u as M,D as j}from"./use-destination-route-BePPmQxb.js";import{a as $}from"./constants-DNuUCxmW.js";const Z="https://github.com/decocms/studio/releases";function q(){return`curl -fsSL ${window.location.origin}/install.sh | sh`}function ee(e){return`https://github.com/decocms/studio/releases/download/native-v${e}/deco-${e}-linux-x86_64.AppImage`}function we(){return typeof navigator<"u"&&/Mac/.test(navigator.platform)&&!("ontouchend"in document)}function te(){return typeof navigator<"u"&&/Linux/.test(navigator.platform)&&!/Android/.test(navigator.userAgent)&&!("ontouchend"in document)}async function ne(e,t){if(!e)return!1;try{return await e.writeText(t),!0}catch{return!1}}function P(e){const t=y.c(12),{copiedLabel:n}=e,s=T(),[o,r]=O.useState(!1);let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=q(),t[0]=l):l=t[0];const a=l;let c;t[1]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx("code",{className:"block rounded-md border bg-muted px-3 py-2.5 font-mono text-xs leading-relaxed break-all whitespace-pre-wrap select-all",children:a}),t[1]=c):c=t[1];let d;t[2]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{ne(navigator.clipboard,a).then(p=>{p&&(r(!0),setTimeout(()=>r(!1),2e3))})},t[2]=d):d=t[2];let u;t[3]!==o?(u=o?i.jsx(Y,{size:16}):i.jsx(Q,{size:16}),t[3]=o,t[4]=u):u=t[4];let f;t[5]!==o||t[6]!==n||t[7]!==s?(f=o?n:s("downloadApp.copyLabel"),t[5]=o,t[6]=n,t[7]=s,t[8]=f):f=t[8];let m;return t[9]!==u||t[10]!==f?(m=i.jsxs("div",{className:"flex flex-col gap-3",children:[c,i.jsxs(L,{type:"button",className:"w-full gap-2",onClick:d,children:[u,f]})]}),t[9]=u,t[10]=f,t[11]=m):m=t[11],m}function oe(){const e=y.c(18),t=T();let n;e[0]!==t?(n=t("downloadApp.copiedLabel"),e[0]=t,e[1]=n):n=e[1];let s;e[2]!==n?(s=i.jsx(P,{copiedLabel:n}),e[2]=n,e[3]=s):s=e[3];let o;e[4]!==t?(o=t("downloadApp.terminalHint"),e[4]=t,e[5]=o):o=e[5];let r;e[6]!==o?(r=i.jsx("p",{children:o}),e[6]=o,e[7]=r):r=e[7];let l;e[8]!==t?(l=t("downloadApp.appleSiliconNote"),e[8]=t,e[9]=l):l=e[9];let a;e[10]!==l?(a=i.jsx("p",{children:l}),e[10]=l,e[11]=a):a=e[11];let c;e[12]!==r||e[13]!==a?(c=i.jsxs("div",{className:"flex flex-col gap-1 text-xs text-muted-foreground",children:[r,a]}),e[12]=r,e[13]=a,e[14]=c):c=e[14];let d;return e[15]!==s||e[16]!==c?(d=i.jsxs(i.Fragment,{children:[s,c]}),e[15]=s,e[16]=c,e[17]=d):d=e[17],d}function se(){const e=y.c(42),t=T();let n;e[0]!==t?(n=t("downloadApp.copiedLabelLinux"),e[0]=t,e[1]=n):n=e[1];let s;e[2]!==n?(s=i.jsx(P,{copiedLabel:n}),e[2]=n,e[3]=s):s=e[3];let o;e[4]!==t?(o=t("downloadApp.linuxInstallerHint"),e[4]=t,e[5]=o):o=e[5];let r;e[6]!==o?(r=i.jsx("p",{children:o}),e[6]=o,e[7]=r):r=e[7];let l;e[8]!==t?(l=t("downloadApp.linuxArchNote"),e[8]=t,e[9]=l):l=e[9];let a;e[10]!==l?(a=i.jsx("p",{children:l}),e[10]=l,e[11]=a):a=e[11];let c;e[12]!==r||e[13]!==a?(c=i.jsxs("div",{className:"flex flex-col gap-1 text-xs text-muted-foreground",children:[r,a]}),e[12]=r,e[13]=a,e[14]=c):c=e[14];let d;e[15]!==t?(d=t("downloadApp.linuxDirectDownloadHint"),e[15]=t,e[16]=d):d=e[16];let u;e[17]!==d?(u=i.jsx("p",{children:d}),e[17]=d,e[18]=u):u=e[18];let f;e[19]===Symbol.for("react.memo_cache_sentinel")?(f=ee("4.325.2"),e[19]=f):f=e[19];let m;e[20]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(X,{size:14}),e[20]=m):m=e[20];let p;e[21]!==t?(p=t("downloadApp.downloadAppImage"),e[21]=t,e[22]=p):p=e[22];let h;e[23]!==p?(h=i.jsx(L,{asChild:!0,variant:"outline",size:"sm",className:"gap-2",children:i.jsxs("a",{href:f,rel:"noreferrer",children:[m,p]})}),e[23]=p,e[24]=h):h=e[24];let S;e[25]!==t?(S=t("downloadApp.linuxChmodHint"),e[25]=t,e[26]=S):S=e[26];let I;e[27]!==S?(I=i.jsx("p",{children:S}),e[27]=S,e[28]=I):I=e[28];let g;e[29]!==t?(g=t("downloadApp.allReleases"),e[29]=t,e[30]=g):g=e[30];let x;e[31]!==g?(x=i.jsx("a",{href:Z,target:"_blank",rel:"noreferrer",className:"underline-offset-2 hover:text-foreground hover:underline",children:g}),e[31]=g,e[32]=x):x=e[32];let A;e[33]!==h||e[34]!==I||e[35]!==x||e[36]!==u?(A=i.jsxs("div",{className:"flex flex-col items-start gap-2 border-t pt-4 text-xs text-muted-foreground",children:[u,h,I,x]}),e[33]=h,e[34]=I,e[35]=x,e[36]=u,e[37]=A):A=e[37];let _;return e[38]!==s||e[39]!==A||e[40]!==c?(_=i.jsxs(i.Fragment,{children:[s,c,A]}),e[38]=s,e[39]=A,e[40]=c,e[41]=_):_=e[41],_}function je(e){const t=y.c(19),{open:n,onOpenChange:s}=e,o=T();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=te(),t[0]=r):r=t[0];const l=r;let a;t[1]!==o?(a=o("downloadApp.title"),t[1]=o,t[2]=a):a=t[2];let c;t[3]!==a?(c=i.jsx(J,{children:a}),t[3]=a,t[4]=c):c=t[4];let d;t[5]!==o?(d=o(l?"downloadApp.linuxDescription":"downloadApp.description"),t[5]=o,t[6]=d):d=t[6];let u;t[7]!==d?(u=i.jsx(K,{children:d}),t[7]=d,t[8]=u):u=t[8];let f;t[9]!==c||t[10]!==u?(f=i.jsxs(F,{children:[c,u]}),t[9]=c,t[10]=u,t[11]=f):f=t[11];let m;t[12]===Symbol.for("react.memo_cache_sentinel")?(m=l?i.jsx(se,{}):i.jsx(oe,{}),t[12]=m):m=t[12];let p;t[13]!==f?(p=i.jsxs(G,{className:"sm:max-w-md",children:[f,m]}),t[13]=f,t[14]=p):p=t[14];let h;return t[15]!==s||t[16]!==n||t[17]!==p?(h=i.jsx(W,{open:n,onOpenChange:s,children:p}),t[15]=s,t[16]=n,t[17]=p,t[18]=h):h=t[18],h}const re=1e4,Te="true",R=2;function N(e,t){return U.chatAutosend(e,t)}function ae(e){return e==="pending"||e==="sending"}function le(e){if(!e)return null;let t;try{t=JSON.parse(e)}catch{return null}if(!t||typeof t!="object")return null;const n=t;let s=0;n.status==="sending"?s=n.retryAt===void 0?1:R:n.retryAt!==void 0&&(s=1);const o=n.attempt===void 0?s:n.attempt;return typeof n.createdAt!="number"||typeof n.message!="object"||!ae(n.status)||n.retryAt!==void 0&&typeof n.retryAt!="number"||typeof o!="number"||!Number.isInteger(o)||o<0||o>R?null:{...t,attempt:o}}function De(e,t,n,s,o=Date.now()){const r={message:s,createdAt:o,status:"pending",attempt:0};return e.setItem(N(t,n),JSON.stringify(r)),r}function ie(e,t,n){const s=N(t,n),o=le(e.getItem(s));return o||(e.removeItem(s),null)}function Ne(e,t,n,s=Date.now()){const o=N(t,n),r=ie(e,t,n);if(!r||r.status!=="pending")return null;if(r.attempt>=R)return e.removeItem(o),null;const l=r.retryAt??r.createdAt;if(s-l>=re)return e.removeItem(o),null;const a={...r,status:"sending",attempt:r.attempt+1};return e.setItem(o,JSON.stringify(a)),{message:a.message,createdAt:a.createdAt,attempt:a.attempt}}function Re(e,t,n){e.removeItem(N(t,n))}const ce="/shell/$org/org-shell/agent-shell";function de(e){return e.threadInSearch||!e.threadId?{to:"."}:{to:"/$org/$taskId",params:{org:e.orgSlug,taskId:e.threadId}}}function ue(e){return e.taskIdParam??e.threadSearch??null}function ke(){const e=y.c(5);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const n=D(t);let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},e[1]=s):s=e[1];const o=k(s);let r;return e[2]!==n.taskId||e[3]!==o.thread?(r=ue({taskIdParam:n.taskId,threadSearch:o.thread}),e[2]=n.taskId,e[3]=o.thread,e[4]=r):r=e[4],r}function fe(e){return(e.onAgentsRoute||e.onHomeRoute||e.legacyRoute)&&e.virtualMcpIdSearch||void 0}function me(){const e=y.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0],D(t).taskId!==void 0}function pe(){const e=y.c(6);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const n=k(t),s=M(),o=me(),r=s===j.agents,l=s===j.home;let a;return e[1]!==o||e[2]!==n.virtualmcpid||e[3]!==r||e[4]!==l?(a=fe({virtualMcpIdSearch:n.virtualmcpid,onAgentsRoute:r,onHomeRoute:l,legacyRoute:o}),e[1]=o,e[2]=n.virtualmcpid,e[3]=r,e[4]=l,e[5]=a):a=e[5],a}function Le(){const e=y.c(3),{org:t}=E(),n=pe();let s;return e[0]!==t||e[1]!==n?(s=n??$(t.id).id,e[0]=t,e[1]=n,e[2]=s):s=e[2],s}function he(e){const{virtualmcpid:t,...n}=e.changes;return{...e.prev,...n,thread:e.threadId}}function Ee(e){return e.routeAgentId??e.threadVirtualMcpId??null}function ge(e){if(e.targetVirtualMcpId===void 0)return{kind:"stay",project:e.currentProject};const t=e.targetVirtualMcpId===e.decopilotId?void 0:e.targetVirtualMcpId;return t!==void 0&&e.currentProject===void 0?{kind:"relocate",project:t}:{kind:"stay",project:t}}function xe(){const e=y.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const n=D(t);let s;return e[1]===Symbol.for("react.memo_cache_sentinel")?(s={from:ce,shouldThrow:!1},e[1]=s):s=e[1],!!H(s)&&n.taskId===void 0}function Me(){const e=y.c(12),t=V();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[0]=n):n=e[0];const s=D(n),o=xe(),{org:r}=E(),l=s.org??"",a=M()===j.agents;let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c={strict:!1},e[1]=c):c=e[1];const d=k(c),u=a?d.virtualmcpid:void 0,f=s.panel;let m;e[2]!==r.id?(m=$(r.id),e[2]=r.id,e[3]=m):m=e[3];const p=m.id;let h;return e[4]!==f||e[5]!==u||e[6]!==p||e[7]!==t||e[8]!==a||e[9]!==l||e[10]!==o?(h=(S,I,g)=>{const x=de({threadInSearch:o,orgSlug:l,threadId:S}),A=g?.replace??!1;if(x.to==="/$org/$taskId")return t({to:x.to,params:x.params,search:I,replace:A});const _=ge({currentProject:u,targetVirtualMcpId:g?.virtualMcpId,decopilotId:p}),w=g?.view&&g.view.tabId!==void 0?z(g.view.tabId):g?.view?{panel:void 0,payload:B()}:null,C=_.kind==="relocate"&&!a,b=v=>he({prev:C?{sidepanel:v.sidepanel}:v,changes:{...I(v),...w?.payload??{}},threadId:S});return _.kind==="relocate"?t({to:j.agents,params:{org:l,panel:w?w.panel:f},search:v=>({...typeof b=="function"?b(v):b,virtualmcpid:_.project}),replace:A}):t({to:".",params:v=>w?{...v,panel:w.panel}:v,search:v=>({...typeof b=="function"?b(v):b,...a?{virtualmcpid:_.project}:{}}),replace:A})},e[4]=f,e[5]=u,e[6]=p,e[7]=t,e[8]=a,e[9]=l,e[10]=o,e[11]=h):h=e[11],h}export{Te as A,je as D,te as a,Me as b,ke as c,Le as d,Ne as e,Re as f,we as i,Ee as r,pe as u,De as w};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as f,W as C,c9 as N,eP as O,c8 as S}from"./index-CxLq_ov_.js";import{u as I}from"./use-mcp-client-Bzii9bW9.js";import{S as m}from"./constants-DNuUCxmW.js";function b(t){const o=f.c(20);let i;o[0]!==t?(i=t===void 0?{}:t,o[0]=t,o[1]=i):i=o[1];const n=i;let l,s,c,d;o[2]!==n?({binding:l,includeVirtual:c,slug:d,...s}=n,o[2]=n,o[3]=l,o[4]=s,o[5]=c,o[6]=d):(l=o[3],s=o[4],c=o[5],d=o[6]);let e;o[7]!==l||o[8]!==s.additionalToolArgs||o[9]!==c||o[10]!==d?(e={...s.additionalToolArgs},l!==void 0&&(e.binding=l),c!==void 0&&(e.include_virtual=c),d!==void 0&&(e.slug=d),o[7]=l,o[8]=s.additionalToolArgs,o[9]=c,o[10]=d,o[11]=e):e=o[11];let r;o[12]!==e?(r=Object.keys(e).length>0?e:void 0,o[12]=e,o[13]=r):r=o[13];let g;o[14]!==s||o[15]!==r?(g={...s,additionalToolArgs:r},o[14]=s,o[15]=r,o[16]=g):g=o[16];const p=g,{org:u}=C();let a;o[17]!==u.id||o[18]!==u.slug?(a={connectionId:m,orgId:u.id,orgSlug:u.slug},o[17]=u.id,o[18]=u.slug,o[19]=a):a=o[19];const A=I(a);return O(u.id,"CONNECTIONS",A,p)}function P(t){const o=f.c(3),{org:i}=C();let n;o[0]!==i.id||o[1]!==i.slug?(n={connectionId:m,orgId:i.id,orgSlug:i.slug},o[0]=i.id,o[1]=i.slug,o[2]=n):n=o[2];const l=I(n);return S(i.id,"CONNECTIONS",t,l)}function _(){const t=f.c(3),{org:o}=C();let i;t[0]!==o.id||t[1]!==o.slug?(i={connectionId:m,orgId:o.id,orgSlug:o.slug},t[0]=o.id,t[1]=o.slug,t[2]=i):i=t[2];const n=I(i);return N(o.id,"CONNECTIONS",n)}export{P as a,_ as b,b as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as m,m as p,x as q,K as T}from"./index-CxLq_ov_.js";function C(n){const e=m.c(12);let t,o;e[0]!==n?({client:t,...o}=n,e[0]=n,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let l;e[3]!==t?(l=T.mcpToolsList(t),e[3]=t,e[4]=l):l=e[4];let s;e[5]!==t?(s=async()=>await t.listTools(),e[5]=t,e[6]=s):s=e[6];const r=o.staleTime??3e4;let i;return e[7]!==o||e[8]!==l||e[9]!==s||e[10]!==r?(i={...o,queryKey:l,queryFn:s,staleTime:r,retry:!1},e[7]=o,e[8]=l,e[9]=s,e[10]=r,e[11]=i):i=e[11],q(i)}function K(n){const e=m.c(12);let t,o;e[0]!==n?({client:t,...o}=n,e[0]=n,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let l;e[3]!==t?(l=T.mcpToolsList(t),e[3]=t,e[4]=l):l=e[4];let s;e[5]!==t?(s=async()=>await t.listTools(),e[5]=t,e[6]=s):s=e[6];const r=o.staleTime??3e4;let i;return e[7]!==o||e[8]!==l||e[9]!==s||e[10]!==r?(i={...o,queryKey:l,queryFn:s,staleTime:r,retry:!1},e[7]=o,e[8]=l,e[9]=s,e[10]=r,e[11]=i):i=e[11],p(i)}function O(n){const e=m.c(21);let t,o,l,s;e[0]!==n?({client:t,toolName:s,toolArguments:l,...o}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=l,e[4]=s):(t=e[1],o=e[2],l=e[3],s=e[4]);let r,i,u;if(e[5]!==t||e[6]!==o||e[7]!==l||e[8]!==s){const f=JSON.stringify(l??{});u=q,r=o,i=T.mcpToolCall(t,s,f),e[5]=t,e[6]=o,e[7]=l,e[8]=s,e[9]=r,e[10]=i,e[11]=u}else r=e[9],i=e[10],u=e[11];let a;e[12]!==t||e[13]!==l||e[14]!==s?(a=async()=>await t.callTool({name:s,arguments:l}),e[12]=t,e[13]=l,e[14]=s,e[15]=a):a=e[15];const y=o.staleTime??3e4;let c;return e[16]!==r||e[17]!==i||e[18]!==a||e[19]!==y?(c={...r,queryKey:i,queryFn:a,staleTime:y,retry:!1},e[16]=r,e[17]=i,e[18]=a,e[19]=y,e[20]=c):c=e[20],u(c)}function w(n){const e=m.c(21);let t,o,l,s;e[0]!==n?({client:t,toolName:s,toolArguments:l,...o}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=l,e[4]=s):(t=e[1],o=e[2],l=e[3],s=e[4]);let r,i,u;if(e[5]!==t||e[6]!==o||e[7]!==l||e[8]!==s){const f=JSON.stringify(l??{});u=p,r=o,i=T.mcpToolCall(t,s,f),e[5]=t,e[6]=o,e[7]=l,e[8]=s,e[9]=r,e[10]=i,e[11]=u}else r=e[9],i=e[10],u=e[11];let a;e[12]!==t||e[13]!==l||e[14]!==s?(a=async()=>await t.callTool({name:s,arguments:l}),e[12]=t,e[13]=l,e[14]=s,e[15]=a):a=e[15];const y=o.staleTime??3e4;let c;return e[16]!==r||e[17]!==i||e[18]!==a||e[19]!==y?(c={...r,queryKey:i,queryFn:a,staleTime:y,retry:!1},e[16]=r,e[17]=i,e[18]=a,e[19]=y,e[20]=c):c=e[20],u(c)}export{K as a,C as b,O as c,w as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as R,d as w,W as E,n as v,a as D,y as O}from"./index-CxLq_ov_.js";import{D as N}from"./use-destination-route-BePPmQxb.js";import{d as S,g as P}from"./use-virtual-mcp-Drh4_cTK.js";import{a as U}from"./hooks-D1D8x6_l.js";import{p as _,d as y,w as k}from"./thread-intent-BCmi7agT.js";import{g as F}from"./github-repo-COLY3wWI.js";function C(t,n){if(!n)return!0;if(t.partial)return!1;const e=_(t.metadata?.runtime);return e===null||e===n}function L(t,n,e,i){let a=null;for(const r of t)r.virtual_mcp_id===n&&r.created_by===e&&(r.hidden||C(r,i)&&(!a||r.updated_at>a.updated_at)&&(a=r));return a}function A(t,n,e,i){return t.find(a=>!a.hidden&&a.virtual_mcp_id===n&&a.created_by===e&&a.title==="New chat"&&!a.harness_id&&C(a,i))}function V(t,n,e,i,a){return a?L(t,n,e,i)??A(t,n,e,i):A(t,n,e,i)}const j=[];function x(){const t=R.c(12),n=w(),{org:e,locator:i}=E(),a=v(),r=S(),{data:h}=D.useSession(),g=U();let d;t[0]!==r||t[1]!==i||t[2]!==g?.threads||t[3]!==n||t[4]!==e.slug||t[5]!==h?.user?.id?(d=(o,u,m)=>{const s=(r??[]).find(b=>b.id===o),l=V(g?.threads.get()??j,o,h?.user?.id,m??(s?y(s.metadata):void 0),!!(s&&F(s))),p=l?.id??crypto.randomUUID();!l&&u?.runtime&&k(sessionStorage,i,p,{runtime:u.runtime});const T=u?.panel?O(u.panel):null;if(!T?.panel){n({to:N.home,params:{org:e.slug},search:{virtualmcpid:o,thread:p}});return}n({to:N.agents,params:{org:e.slug,panel:T.panel},search:{...T.payload,virtualmcpid:o,thread:p}})},t[0]=r,t[1]=i,t[2]=g?.threads,t[3]=n,t[4]=e.slug,t[5]=h?.user?.id,t[6]=d):d=t[6];const c=d;let f;return t[7]!==r||t[8]!==c||t[9]!==e||t[10]!==a?(f=(o,u)=>{const m=r.find(s=>s.id===o);if(u?.runtime)return c(o,u,u.runtime);if(m)return c(o,u,y(m.metadata));P(a,e).then(s=>s.find(l=>l.id===o)).catch(q).then(s=>c(o,u,s?y(s.metadata):void 0))},t[7]=r,t[8]=c,t[9]=e,t[10]=a,t[11]=f):f=t[11],f}function q(){}export{V as a,A as f,x as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as u}from"./use-infinite-scroll-D8hgBz9p.js";import{fg as i}from"./index-CxLq_ov_.js";function t(e,r){return i(e,u,r)}export{t as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as s}from"./use-infinite-scroll-D8hgBz9p.js";import{fg as u,bU as n}from"./index-CxLq_ov_.js";function a(r,e){return u({...r,enabled:!0,suspense:!0,throwOnError:n},s,e)}export{a as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as K,b as X,r as Z,j as n,l as rt,a1 as ut,a4 as ht,B as tt,a2 as xt}from"./index-CxLq_ov_.js";import{z as gt,a4 as at,aF as bt}from"./agent-icon-DyMYbwSC.js";import{i as vt}from"./ChevronRight-BcTQG1DI.js";import{L as yt}from"./label-HkRxmwei.js";import{S as lt}from"./scroll-area-B3TTluOZ.js";import{S as jt}from"./switch--G1maXos.js";import{V as Tt}from"./view-mode-toggle-DdtTJc3o.js";import{bv as ct,bw as mt,bx as Nt,by as _t,bz as kt,bA as U,bB as wt}from"./index-B1coIP-x.js";import"./AlertCircle-B0exjy2G.js";import"./Tool01-DbPhfEvg.js";import"./ArrowUp-DY0nxQiU.js";import"./ArrowLeft-DDVITG8K.js";import"./Tool02-8qVRgTeE.js";import"./XCircle-BN22j-Jn.js";import"./TrendUp01-yPe3UG0T.js";import"./ZoomOut-BUSsAg6c.js";import"./Users03-CMpVHpdR.js";import"./CheckCircle-DLOuSHro.js";import"./Check-DFnPCTEg.js";import"./ChevronUp-CVSn4-gi.js";import"./ChevronSelectorVertical-DMK3FCxp.js";import"./DotsVertical-CqFpz0HG.js";import"./UserSquare-HSvWRq_9.js";import"./Copy01-DXf2ReD_.js";import"./CreditCard01-Dufq2QQE.js";import"./Download01-GnhueTng.js";import"./Settings02-B2gnPQ3Q.js";import"./Eye-CHLagXa7.js";import"./Share07-Bu5e840D.js";import"./GitBranch01-CQRzbSyx.js";import"./Globe01-DyhA33s1.js";import"./XClose-N8lMtUXr.js";import"./HardDrive-eC4I4aqw.js";import"./Image01-D6KzR28r.js";import"./Key01-CNitiCfD.js";import"./Link01-BHe0dd0_.js";import"./LinkExternal01-CvQ-ylaK.js";import"./Monitor01-SbvebE9T.js";import"./Sun-aWHPBk6T.js";import"./Package-BIDQhscg.js";import"./Palette-DgVW07vN.js";import"./Play-CR4MAXKW.js";import"./Plus-D-mogJXC.js";import"./SearchMd-BYpvO9Ao.js";import"./Shield01-BAHmK5_B.js";import"./Stars01-CCTPiWmK.js";import"./Trash01-CV8Q1VzZ.js";import"./Upload01-B1Qytz_u.js";import"./User01-DmJKrYPV.js";import"./Users01-B4HgX8Cb.js";import"./Zap-BMyl5tLM.js";import"./select-CNhOTIVN.js";import"./chat-context-D2SP0J5D.js";import"./use-panel-navigate-DSf87ewD.js";import"./use-destination-route-BePPmQxb.js";import"./thread-route-Ckn7Kp8P.js";import"./dialog-Do-ZnJpa.js";import"./constants-DNuUCxmW.js";import"./thread-intent-BCmi7agT.js";import"./slugify-CEUa2lfQ.js";import"./hooks-D1D8x6_l.js";import"./use-mcp-client-Bzii9bW9.js";import"./auth-Dy3Ai_hi.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-xVL-mPxb.js";import"./task-board-CcPPQONZ.js";import"./schema-ChmhgfCW.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-Drh4_cTK.js";import"./use-ai-providers-DRa-WP8c.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-CkAI1xCS.js";import"./use-organization-settings-DRchtNm3.js";import"./automation-runs-CHfOqm8r.js";import"./useInfiniteQuery-Cy80sU-k.js";import"./use-infinite-scroll-D8hgBz9p.js";import"./use-connection-B3hf1saX.js";import"./table-Bi-psIbe.js";import"./empty-state-BPIeTQLP.js";import"./use-members-CEM7zlP_.js";import"./use-org-auth-client-Crsb07JJ.js";import"./use-automations-Cppk9Xar.js";import"./useSuspenseInfiniteQuery-DKd6bR20.js";import"./avatar-B8b2hWV1.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-DvOjkuTL.js";import"./markdown-DFiEgKZj.js";import"./monaco-editor-BFa0VsLo.js";import"./editor-CgtWB5x3.js";import"./types-hwFA5Ktg.js";import"./shell-layout-CAB27XFS.js";import"./project-icon-BY6MP5uE.js";import"./github-repo-COLY3wWI.js";import"./command-CeyGqPmM.js";import"./index-DkQlXscT.js";import"./required-auth-layout-LhCq4pE1.js";import"./use-org-sso-DTBnbTx7.js";import"./integration-icon-Cr-roc4W.js";import"./use-navigate-to-agent-CUFdthzD.js";import"./use-mcp-prompts-BTyLUk2o.js";import"./form-j23QTiVs.js";import"./input-t2vq_Yhz.js";import"./file-type-icon-BoulZj-0.js";import"./drawer-D4J_5BCc.js";import"./collection-search-gbLnoGWa.js";import"./use-mcp-tools-3xoGjo6f.js";import"./tabs-DZInEuUb.js";import"./toggle-group-HQ3bB1sR.js";import"./task-route-GdQl-L3H.js";import"./toolbar-icon-button-DEqW4Jpo.js";import"./popover-CpTW2alp.js";import"./github-repo-picker-CuXoDtLm.js";import"./use-debounced-value-BLtVz2Ja.js";import"./authenticate-and-persist-oauth-DBIvzM9b.js";import"./mcp-oauth-BHYwKN2k.js";import"./extract-connection-data-Cq3FrLyn.js";import"./metadata-dUsYcpuu.js";import"./connection-pv2H4wMd.js";import"./provision-repo-scoped-github-connection-WQFARyHG.js";import"./connection-card-D-rWqndL.js";import"./use-registry-connections-DndEI7JT.js";import"./retry-CErkP7V6.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-DFMKKUyA.js";import"./connection-form-helpers-nmBh-twk.js";import"./collection-tabs-BGNThV3i.js";import"./badge-DiXK5Efu.js";import"./use-file-configs-BEZ_kwp8.js";import"./site-slug-uya6Wp4-.js";import"./dropdown-menu-C9hHhEdP.js";import"./get-initials-D-f_fDFw.js";import"./select-model-BHenBcjH.js";import"./checkbox-CusZZICa.js";import"./ai-providers-logos-DD3qZ33J.js";import"./folder-icon-P0KHTdfp.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-D9cQQiox.js";import"./toolbar-CSNy9NkF.js";import"./skill-preview-D5ZuDhd0.js";import"./pt-BR-CLy76QW2.js";import"./alert-dialog-Bb1OlmEm.js";import"./use-debounced-autosave-DQmx8pBf.js";import"./search-input-D0Aw5sb3.js";import"./use-mcp-auth-status-CC8-P5tO.js";import"./use-secrets-DmVRsGO4.js";import"./client-icons-CIbINaqs.js";import"./connect-layout-fngCpQZ1.js";import"./self-tool-result-gsJsfaVf.js";import"./track-C5SbOoh_.js";import"./use-tags-C4M9TEep.js";import"./breadcrumb-C5kFXgQY.js";import"./safe-image-url-D5z803Ot.js";import"./automation-list-row-Cm527FOk.js";import"./site-error--i37Vnuw.js";import"./cards-BdTZBvrL.js";const Et=new Set(["website/matchers/date.ts","$live/matchers/MatchDate.ts"]),St=new Set(["website/matchers/multi.ts","$live/matchers/MatchMulti.ts"]),Ct=new Date(-864e13),Mt=new Date(864e13),At=/\/flags\/multivariate(?:\/[^/]+)?\.ts$/,$t=/\/flags\/multivariate\.ts$/;function Lt(e){let t=e;t.startsWith("pages-")&&(t=t.slice(6).replace(/-\d+$/,""));try{t=decodeURIComponent(t)}catch{}return t}function Rt(e){if(!e||typeof e!="object")return null;const{start:t,end:r}=e,o=typeof t=="string",s=typeof r=="string";if(!o&&!s)return null;const i=o?new Date(t):Ct,a=s?new Date(r):Mt;return Number.isNaN(i.getTime())||Number.isNaN(a.getTime())||o&&s&&a.getTime()<=i.getTime()?null:{start:i,end:a,openStart:!o,openEnd:!s}}function pt(e,t){if(!e||typeof e!="object")return;const r=e.__resolveType;if(typeof r=="string"){if(Et.has(r)){const o=Rt(e);o&&t.push(o);return}if(St.has(r)){const o=e.matchers;if(Array.isArray(o))for(const s of o)pt(s,t)}}}function Dt(e){if(!e||typeof e!="object")return!1;const t=e.__resolveType;if(typeof t!="string"||!At.test(t))return!1;const r=e.variants;return Array.isArray(r)}function Ot(e){if(typeof e=="string"){const c=e.trim();if(c.length===0)return null;try{const m=new URL(c).pathname.split("/").filter(Boolean),p=m[m.length-1];if(p)return decodeURIComponent(p)}catch{}return c.length>80?`${c.slice(0,77)}…`:c}if(!e||typeof e!="object")return null;const t=e,r=t.config,s=t.desktop?.media,i=[t.title,t.name,t.label,t.alt,r?.title,r?.name,r?.typeAlert?.message,s?.alt,Array.isArray(t.matcher)?t.matcher[0]:void 0];for(const c of i)if(typeof c=="string"&&c.trim().length>0)return c.trim();const a=t.__resolveType;if(typeof a=="string"){const l=(a.split("/").pop()??a).replace(/\.(tsx?|jsx?)$/i,"");if(l.length>0)return l}return null}function Pt(e){const t=[];for(let r=0;r<e.length;r++){const o=e[r];typeof o=="number"?t.length>0?t[t.length-1]+=`[${o}]`:t.push(`[${o}]`):t.push(o)}return t.join(" · ")}function Q(e,t,r,o,s){if(Dt(e)){const i=e.variants,a=e.__resolveType,c=$t.test(a)?"":Pt(o);i.forEach((l,m)=>{if(!l||typeof l!="object")return;const p=l,h=[];if(pt(p.rule,h),h.length===0)return;const g=Ot(p.value)??(c||r);for(const u of h)s.push({blockKey:t,blockLabel:r,innerPath:c,variantIndex:m,start:u.start,end:u.end,openStart:u.openStart,openEnd:u.openEnd,label:g,flagResolveType:a})});for(let l=0;l<i.length;l++){const m=i[l];m&&typeof m=="object"&&Q(m.value,t,r,[...o,"variants",l,"value"],s)}return}if(Array.isArray(e)){for(let i=0;i<e.length;i++)Q(e[i],t,r,[...o,i],s);return}if(e&&typeof e=="object")for(const[i,a]of Object.entries(e))i!=="__resolveType"&&Q(a,t,r,[...o,i],s)}function It(e){if(!e)return[];const t=[];for(const[r,o]of Object.entries(e))Q(o,r,Lt(r),[],t);return t.sort((r,o)=>r.start.getTime()-o.start.getTime())}function Vt(e){const t=[...new Set(e)].sort(),r=new Map;return t.forEach((o,s)=>{const i=s*137.508%360;r.set(o,{bg:`oklch(0.62 0.14 ${i})`,text:"white",border:`oklch(0.50 0.14 ${i})`})}),r}const Bt={bg:"oklch(0.62 0.14 0)",text:"white",border:"oklch(0.50 0.14 0)"};function dt(e,t){return e.get(t)??Bt}const ot=new Intl.DateTimeFormat("en",{dateStyle:"medium",timeStyle:"short"});function Ht(e,t){const r=e.openStart?t("sandbox.variantCalendar.always"):ot.format(e.start),o=e.openEnd?t("sandbox.variantCalendar.ongoing"):ot.format(e.end);return`${r} → ${o}`}function Ft(e){const t=K.c(18),{variant:r}=e,o=X();let s;t[0]!==r.blockLabel?(s=n.jsx("div",{className:"font-semibold",children:r.blockLabel}),t[0]=r.blockLabel,t[1]=s):s=t[1];let i;t[2]!==r.innerPath?(i=r.innerPath&&n.jsx("div",{className:"text-muted-foreground",children:r.innerPath}),t[2]=r.innerPath,t[3]=i):i=t[3];let a;t[4]!==r.blockLabel||t[5]!==r.innerPath||t[6]!==r.label?(a=r.label!==r.blockLabel&&r.label!==r.innerPath&&n.jsx("div",{className:"text-muted-foreground",children:r.label}),t[4]=r.blockLabel,t[5]=r.innerPath,t[6]=r.label,t[7]=a):a=t[7];let c;t[8]!==o||t[9]!==r?(c=Ht(r,o),t[8]=o,t[9]=r,t[10]=c):c=t[10];let l;t[11]!==c?(l=n.jsx("div",{className:"mt-1",children:c}),t[11]=c,t[12]=l):l=t[12];let m;return t[13]!==s||t[14]!==i||t[15]!==a||t[16]!==l?(m=n.jsx(xt,{children:n.jsxs("div",{className:"text-xs",children:[s,i,a,l]})}),t[13]=s,t[14]=i,t[15]=a,t[16]=l,t[17]=m):m=t[17],m}const nt=16;function zt(e,t){const r=e?"transparent":"#000 0",o=t?"transparent":"#000 100%";if(!(!e&&!t))return`linear-gradient(to right, ${r}, #000 ${nt}px, #000 calc(100% - ${nt}px), ${o})`}function ft(e){const t=K.c(26),{variant:r,color:o,style:s,children:i,fadeStart:a,fadeEnd:c}=e,l=a===void 0?!1:a,m=c===void 0?!1:c;let p;t[0]!==m||t[1]!==l?(p=zt(l,m),t[0]=m,t[1]=l,t[2]=p):p=t[2];const h=p;let f;t[3]!==l?(f=l&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},t[3]=l,t[4]=f):f=t[4];let g;t[5]!==m?(g=m&&{borderTopRightRadius:0,borderBottomRightRadius:0},t[5]=m,t[6]=g):g=t[6];let u;t[7]!==h?(u=h&&{maskImage:h,WebkitMaskImage:h},t[7]=h,t[8]=u):u=t[8];let x;t[9]!==o.bg||t[10]!==o.text||t[11]!==s||t[12]!==f||t[13]!==g||t[14]!==u?(x={background:o.bg,color:o.text,borderRadius:4,...f,...g,...u,...s},t[9]=o.bg,t[10]=o.text,t[11]=s,t[12]=f,t[13]=g,t[14]=u,t[15]=x):x=t[15];let b;t[16]!==i?(b=n.jsx("span",{className:"truncate",children:i}),t[16]=i,t[17]=b):b=t[17];let E;t[18]!==x||t[19]!==b?(E=n.jsx(ut,{asChild:!0,children:n.jsx("div",{className:"absolute flex items-center px-2 text-[11px] font-medium truncate cursor-default",style:x,children:b})}),t[18]=x,t[19]=b,t[20]=E):E=t[20];let T;t[21]!==r?(T=n.jsx(Ft,{variant:r}),t[21]=r,t[22]=T):T=t[22];let d;return t[23]!==T||t[24]!==E?(d=n.jsxs(ht,{children:[E,T]}),t[23]=T,t[24]=E,t[25]=d):d=t[25],d}function tn(e){const t=K.c(72),{decofile:r}=e,o=X(),[s,i]=Z.useState("calendar"),[a,c]=Z.useState(Kt),[l,m]=Z.useState(!1);let p,h,f;if(t[0]!==r||t[1]!==l){const I=It(r);p=I.filter(Ut).length,f=l?I:I.filter(Gt),h=Vt(f.map(Wt)),t[0]=r,t[1]=l,t[2]=p,t[3]=h,t[4]=f}else p=t[2],h=t[3],f=t[4];const g=h;let u;t[5]===Symbol.for("react.memo_cache_sentinel")?(u=()=>c(mt(new Date)),t[5]=u):u=t[5];const x=u;let b;t[6]!==s?(b=()=>c(I=>s==="calendar"?U(I,-1):U(I,-3)),t[6]=s,t[7]=b):b=t[7];const E=b;let T;t[8]!==s?(T=()=>c(I=>s==="calendar"?U(I,1):U(I,3)),t[8]=s,t[9]=T):T=t[9];const d=T;let v;t[10]!==o?(v=o("sandbox.variantCalendar.today"),t[10]=o,t[11]=v):v=t[11];let y;t[12]!==v?(y=n.jsx(tt,{variant:"outline",size:"sm",onClick:x,children:v}),t[12]=v,t[13]=y):y=t[13];let N;t[14]!==o?(N=o("sandbox.variantCalendar.previous"),t[14]=o,t[15]=N):N=t[15];let A;t[16]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx(gt,{size:16}),t[16]=A):A=t[16];let _;t[17]!==E||t[18]!==N?(_=n.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:E,"aria-label":N,children:A}),t[17]=E,t[18]=N,t[19]=_):_=t[19];let k;t[20]!==o?(k=o("sandbox.variantCalendar.next"),t[20]=o,t[21]=k):k=t[21];let C;t[22]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx(vt,{size:16}),t[22]=C):C=t[22];let $;t[23]!==d||t[24]!==k?($=n.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:d,"aria-label":k,children:C}),t[23]=d,t[24]=k,t[25]=$):$=t[25];const L=ct[a.getMonth()];let M;t[26]!==a?(M=a.getFullYear(),t[26]=a,t[27]=M):M=t[27];let w;t[28]!==L||t[29]!==M?(w=n.jsxs("h2",{className:"ml-2 text-base font-semibold",children:[L," ",M]}),t[28]=L,t[29]=M,t[30]=w):w=t[30];let j;t[31]!==$||t[32]!==w||t[33]!==y||t[34]!==_?(j=n.jsxs("div",{className:"flex items-center gap-2",children:[y,_,$,w]}),t[31]=$,t[32]=w,t[33]=y,t[34]=_,t[35]=j):j=t[35];let R;t[36]!==p||t[37]!==l||t[38]!==o?(R=p>0&&n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(jt,{id:"show-ongoing",checked:l,onCheckedChange:m}),n.jsx(yt,{htmlFor:"show-ongoing",className:"text-xs text-muted-foreground cursor-pointer",children:o("sandbox.variantCalendar.showOngoing",{count:p})})]}),t[36]=p,t[37]=l,t[38]=o,t[39]=R):R=t[39];let H;t[40]===Symbol.for("react.memo_cache_sentinel")?(H=n.jsx(at,{}),t[40]=H):H=t[40];let V;t[41]!==o?(V=o("sandbox.variantCalendar.calendarMode"),t[41]=o,t[42]=V):V=t[42];let S;t[43]!==V?(S={value:"calendar",icon:H,label:V},t[43]=V,t[44]=S):S=t[44];let F;t[45]===Symbol.for("react.memo_cache_sentinel")?(F=n.jsx(bt,{}),t[45]=F):F=t[45];let D;t[46]!==o?(D=o("sandbox.variantCalendar.timelineMode"),t[46]=o,t[47]=D):D=t[47];let O;t[48]!==D?(O={value:"timeline",icon:F,label:D},t[48]=D,t[49]=O):O=t[49];let P;t[50]!==S||t[51]!==O?(P=[S,O],t[50]=S,t[51]=O,t[52]=P):P=t[52];let B;t[53]!==P||t[54]!==s?(B=n.jsx(Tt,{value:s,onValueChange:i,options:P}),t[53]=P,t[54]=s,t[55]=B):B=t[55];let z;t[56]!==R||t[57]!==B?(z=n.jsxs("div",{className:"flex items-center gap-4",children:[R,B]}),t[56]=R,t[57]=B,t[58]=z):z=t[58];let W;t[59]!==j||t[60]!==z?(W=n.jsxs("div",{className:"flex items-center justify-between px-4 h-12 border-b shrink-0",children:[j,z]}),t[59]=j,t[60]=z,t[61]=W):W=t[61];let G;t[62]!==g||t[63]!==a||t[64]!==p||t[65]!==l||t[66]!==f||t[67]!==s?(G=f.length===0?n.jsx(Yt,{hiddenOngoing:l?0:p}):s==="calendar"?n.jsx(Jt,{monthStart:a,variants:f,colorMap:g}):n.jsx(te,{monthStart:a,variants:f,colorMap:g}),t[62]=g,t[63]=a,t[64]=p,t[65]=l,t[66]=f,t[67]=s,t[68]=G):G=t[68];let q;return t[69]!==W||t[70]!==G?(q=n.jsxs("div",{className:"flex h-full w-full flex-col",children:[W,G]}),t[69]=W,t[70]=G,t[71]=q):q=t[71],q}function Wt(e){return e.blockKey}function Gt(e){return!e.openEnd}function Ut(e){return e.openEnd}function Kt(){return mt(new Date)}function Yt(e){const t=K.c(4),{hiddenOngoing:r}=e,o=r===void 0?0:r,s=X();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(at,{size:24,className:"text-muted-foreground/60"}),t[0]=i):i=t[0];let a;return t[1]!==o||t[2]!==s?(a=n.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-2 text-center text-sm text-muted-foreground p-6",children:[i,o>0?n.jsxs(n.Fragment,{children:[n.jsx("div",{children:s("sandbox.variantCalendar.noDatedVariants")}),n.jsx("div",{className:"text-xs text-muted-foreground/80",children:s("sandbox.variantCalendar.hiddenOngoingVariants",{count:o})})]}):n.jsxs(n.Fragment,{children:[n.jsx("div",{children:s("sandbox.variantCalendar.noScheduledVariants")}),n.jsx("div",{className:"text-xs text-muted-foreground/80",children:s("sandbox.variantCalendar.dateMatcherInfo")})]})]}),t[1]=o,t[2]=s,t[3]=a):a=t[3],a}const et=20,it=2,st=28,qt=6;function Jt(e){const t=K.c(17),{monthStart:r,variants:o,colorMap:s}=e;let i,a,c,l,m;if(t[0]!==s||t[1]!==r||t[2]!==o){const f=Nt(r),g=_t(new Date);i=lt,m="flex-1 min-h-0",a="min-w-[840px]",t[8]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx("div",{className:"grid grid-cols-7 border-b text-xs text-muted-foreground sticky top-0 bg-background z-10",children:wt.map(Xt)}),t[8]=c):c=t[8],l=f.map((u,x)=>{const b=kt(u,o),E=b.reduce(Qt,0),T=st+E*(et+it)+8;return n.jsxs("div",{className:"grid grid-cols-7 relative border-b",style:{height:T},children:[u.map((d,v)=>{const y=d.getMonth()===r.getMonth(),N=d.getTime()===g.getTime();return n.jsx("div",{className:rt("border-r last:border-r-0 px-2 pt-1.5 text-xs",y?"bg-background":"bg-muted/30 text-muted-foreground"),children:n.jsx("span",{className:rt("inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1",N&&"bg-primary text-primary-foreground font-semibold"),children:d.getDate()})},v)}),b.map((d,v)=>{const y=dt(s,d.variant.blockKey),N=st+d.lane*(et+it),A=d.leftUnits/7*100,_=d.widthUnits/7*100,k=d.variant.openStart&&x===0,C=d.variant.openEnd&&x===f.length-1;return n.jsxs(ft,{variant:d.variant,color:y,fadeStart:k,fadeEnd:C,style:{top:N,left:`calc(${A}% + 2px)`,width:`calc(${_}% - 4px)`,minWidth:qt,height:et},children:[d.variant.blockLabel,d.variant.label!==d.variant.blockLabel&&n.jsxs("span",{className:"opacity-70",children:[" · ",d.variant.label]})]},`${x}-${v}`)})]},x)}),t[0]=s,t[1]=r,t[2]=o,t[3]=i,t[4]=a,t[5]=c,t[6]=l,t[7]=m}else i=t[3],a=t[4],c=t[5],l=t[6],m=t[7];let p;t[9]!==a||t[10]!==c||t[11]!==l?(p=n.jsxs("div",{className:a,children:[c,l]}),t[9]=a,t[10]=c,t[11]=l,t[12]=p):p=t[12];let h;return t[13]!==i||t[14]!==m||t[15]!==p?(h=n.jsx(i,{className:m,children:p}),t[13]=i,t[14]=m,t[15]=p,t[16]=h):h=t[16],h}function Qt(e,t){return Math.max(e,t.lane+1)}function Xt(e){return n.jsx("div",{className:"px-2 py-2 text-center uppercase tracking-wide",children:e},e)}const J=4,Zt=32,Y=240;function te(e){const t=K.c(23),{monthStart:r,variants:o,colorMap:s}=e,i=r,a=U(r,J),c=new Date,l=new Map;for(const w of o){const j=l.get(w.blockKey)??[];j.push(w),l.set(w.blockKey,j)}const m=Array.from(l.entries()).sort(oe),p=a.getTime()-i.getTime(),h=w=>(Math.max(i.getTime(),Math.min(a.getTime(),w.getTime()))-i.getTime())/p*100;let f;t[0]!==i?(f=(w,j)=>U(i,j),t[0]=i,t[1]=f):f=t[1];const g=Array.from({length:J},f),u=c.getTime()>=i.getTime()&&c.getTime()<=a.getTime()?h(c):null,x=X(),b=lt,E="flex-1 min-h-0",T="min-w-[900px] relative";let d;t[2]===Symbol.for("react.memo_cache_sentinel")?(d={width:Y},t[2]=d):d=t[2];let v;t[3]!==x?(v=x("sandbox.variantCalendar.variantBlock"),t[3]=x,t[4]=v):v=t[4];let y;t[5]!==v?(y=n.jsx("div",{className:"shrink-0 px-3 py-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground border-r",style:d,children:v}),t[5]=v,t[6]=y):y=t[6];let N;t[7]===Symbol.for("react.memo_cache_sentinel")?(N={gridTemplateColumns:`repeat(${J}, minmax(0, 1fr))`},t[7]=N):N=t[7];const A=g.map(re);let _;t[8]!==A?(_=n.jsx("div",{className:"flex-1 grid",style:N,children:A}),t[8]=A,t[9]=_):_=t[9];let k;t[10]!==y||t[11]!==_?(k=n.jsxs("div",{className:"flex border-b sticky top-0 bg-background z-10",children:[y,_]}),t[10]=y,t[11]=_,t[12]=k):k=t[12];let C;t[13]!==x||t[14]!==u?(C=u!==null&&n.jsx("div",{className:"pointer-events-none absolute top-0 bottom-0 w-px bg-primary/70 z-[5]",style:{left:`calc(${Y}px + (100% - ${Y}px) * ${u} / 100)`},children:n.jsx("span",{className:"absolute -top-0.5 -translate-x-1/2 rounded-sm bg-primary px-1.5 py-px text-[10px] font-medium text-primary-foreground",children:x("sandbox.variantCalendar.todayLabel")})}),t[13]=x,t[14]=u,t[15]=C):C=t[15];const $=m.map(w=>{const[j,R]=w,H=dt(s,j),V=R[0]?.blockLabel??j;return n.jsxs("div",{children:[n.jsx("div",{className:"flex items-center bg-muted/40 border-b text-xs font-semibold uppercase tracking-wide text-muted-foreground",style:{height:28},children:n.jsx("div",{className:"px-3 truncate",style:{width:Y},children:V})}),R.map((S,F)=>n.jsxs("div",{className:"flex border-b items-center",style:{height:Zt},children:[n.jsxs("div",{className:"flex items-center gap-2 px-3 text-sm border-r shrink-0",style:{width:Y},children:[n.jsx("span",{className:"inline-block h-2 w-2 rounded-full shrink-0",style:{background:H.bg}}),n.jsx("span",{className:"truncate text-foreground/80",children:S.label})]}),n.jsxs("div",{className:"relative flex-1 h-full",children:[n.jsx("div",{className:"absolute inset-0 grid",style:{gridTemplateColumns:`repeat(${J}, minmax(0, 1fr))`},children:g.map(ee)}),(()=>{const D=Math.max(S.start.getTime(),i.getTime()),O=Math.min(S.end.getTime(),a.getTime());if(O<=D)return null;const P=h(new Date(D)),B=h(new Date(O))-P;return n.jsx(ft,{variant:S,color:H,fadeStart:S.openStart,fadeEnd:S.openEnd,style:{top:"50%",transform:"translateY(-50%)",left:`${P}%`,width:`calc(${B}% - 2px)`,height:22},children:S.label})})()]})]},F))]},j)});let L;t[16]!==k||t[17]!==C||t[18]!==$?(L=n.jsxs("div",{className:T,children:[k,C,$]}),t[16]=k,t[17]=C,t[18]=$,t[19]=L):L=t[19];let M;return t[20]!==b||t[21]!==L?(M=n.jsx(b,{className:E,children:L}),t[20]=b,t[21]=L,t[22]=M):M=t[22],M}function ee(e,t){return n.jsx("div",{className:"border-r last:border-r-0 border-border/40"},t)}function re(e,t){return n.jsxs("div",{className:"px-2 py-2 text-xs uppercase tracking-wide text-muted-foreground border-r last:border-r-0",children:[ct[e.getMonth()]?.slice(0,3)," ",e.getFullYear()]},t)}function oe(e,t){return e[0].localeCompare(t[0])}export{tn as VariantCalendar};
|