decocms 4.463.0 → 4.463.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-DWiDp-f1.js → AlertCircle-B5TmAHNM.js} +1 -1
- package/dist/client/assets/{AreaChart-wG4ny1PS.js → AreaChart-CVuOnHQX.js} +1 -1
- package/dist/client/assets/{ArrowLeft-BMW9utAL.js → ArrowLeft-9GJFW4LS.js} +1 -1
- package/dist/client/assets/{ArrowUp-BuOxK3Pf.js → ArrowUp-Cib8ewx4.js} +1 -1
- package/dist/client/assets/{Building02-Dyi9ronc.js → Building02-CEVEDOME.js} +1 -1
- package/dist/client/assets/{CartesianChart-vlTqQf6R.js → CartesianChart-BTuTtPIG.js} +1 -1
- package/dist/client/assets/{Check-CXicUAOa.js → Check-BvCNBJe8.js} +1 -1
- package/dist/client/assets/{CheckCircle-YnBoZGaI.js → CheckCircle-DpemfJ5S.js} +1 -1
- package/dist/client/assets/{ChevronUp-DBFnJWSs.js → ChevronUp-BwSgHBqC.js} +1 -1
- package/dist/client/assets/{Copy01-Dr3v4gYp.js → Copy01-B3CEXdpv.js} +1 -1
- package/dist/client/assets/{CreditCard01-C2A37qQR.js → CreditCard01-DFj0HUwR.js} +1 -1
- package/dist/client/assets/{DotsVertical-OvfvRPcf.js → DotsVertical-CvByrwlw.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-CzSXgWcn.js → ErrorBarContext-nupiMjtH.js} +1 -1
- package/dist/client/assets/{Image01-nUj6_DO-.js → Image01-CPJAhPOP.js} +1 -1
- package/dist/client/assets/{Key01-HuTENYPy.js → Key01-D3KdqQRK.js} +1 -1
- package/dist/client/assets/{Line-C_bImwm0.js → Line-BPqpw5U0.js} +1 -1
- package/dist/client/assets/{Link01-cjx77r4E.js → Link01-VVuQkQsn.js} +1 -1
- package/dist/client/assets/{LinkBroken01-CaB2I9G0.js → LinkBroken01-CjBq0lbN.js} +1 -1
- package/dist/client/assets/{LinkExternal01-CSoQ_DGP.js → LinkExternal01-CLi_LJ2y.js} +1 -1
- package/dist/client/assets/{Monitor01-D19plyaf.js → Monitor01-DO03hBU2.js} +1 -1
- package/dist/client/assets/{Palette-DA_Dzon5.js → Palette-uTBuV6eG.js} +1 -1
- package/dist/client/assets/{Plus-CuK8nNcu.js → Plus-DLW5olp7.js} +1 -1
- package/dist/client/assets/{SearchMd-24zvxDRs.js → SearchMd-BNPYUXLP.js} +1 -1
- package/dist/client/assets/{Sector-C0T4f5Eo.js → Sector-Dx6NP_My.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-DUKvQNmb.js → ShoppingBag01-b9-BhwDR.js} +1 -1
- package/dist/client/assets/{Sun-Dl2R87Eo.js → Sun-BF4Eks2R.js} +1 -1
- package/dist/client/assets/{Tool01-BrjR3c4R.js → Tool01-3oVxsToy.js} +1 -1
- package/dist/client/assets/{Trash01-CuaXxM5C.js → Trash01-D7ylqCya.js} +1 -1
- package/dist/client/assets/{Upload01-DrihoScl.js → Upload01-DNxaQbwq.js} +1 -1
- package/dist/client/assets/{User01-BDAGl75t.js → User01-Bsraudto.js} +1 -1
- package/dist/client/assets/{UserSquare-DdE8MrwD.js → UserSquare-DeLx8WzD.js} +1 -1
- package/dist/client/assets/{Users01-BjhYFiAu.js → Users01-iXRnCXY-.js} +1 -1
- package/dist/client/assets/{X-Dv9AnRlg.js → X-BQNprmBf.js} +1 -1
- package/dist/client/assets/{XAxis-DXXRhBFV.js → XAxis-h1--j8He.js} +1 -1
- package/dist/client/assets/{XClose-BCVhz-Kf.js → XClose-BpmmlEY3.js} +1 -1
- package/dist/client/assets/{ZoomOut-DGJt2ZOH.js → ZoomOut-C7AJpRh5.js} +1 -1
- package/dist/client/assets/{access-gate-E54qpcq4.js → access-gate-DtOf3EFS.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-D8GNVhEw.js → add-connection-dialog-Cs7zmh4q.js} +1 -1
- package/dist/client/assets/{agent-analytics-CVJIJ1Qw.js → agent-analytics-_8EkEzff.js} +1 -1
- package/dist/client/assets/agent-app-yXeZxYeB.js +1 -0
- package/dist/client/assets/{agent-assets-Cfox23r3.js → agent-assets-KsfZNiX2.js} +1 -1
- package/dist/client/assets/{agent-automation-D9cSpEhM.js → agent-automation-BbzR1k2i.js} +1 -1
- package/dist/client/assets/{agent-automations-COtVvppU.js → agent-automations-BCo8Ch44.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-BEMCbzGF.js → agent-connect-sources-C9x8XmMh.js} +1 -1
- package/dist/client/assets/agent-deck-B2pNzx_r.js +1 -0
- package/dist/client/assets/{agent-e2e-Wqxn9jg8.js → agent-e2e-XMCI0UQl.js} +1 -1
- package/dist/client/assets/{agent-experiments-BASXy9kl.js → agent-experiments-B6l4hX1w.js} +1 -1
- package/dist/client/assets/{agent-file-BOh5OW0h.js → agent-file-DH_lUKXM.js} +1 -1
- package/dist/client/assets/{agent-hosting-BIJRB3GM.js → agent-hosting-B9W8d0kn.js} +1 -1
- package/dist/client/assets/{agent-icon-B_AZohhm.js → agent-icon-CbXn8VZK.js} +1 -1
- package/dist/client/assets/agent-library-ZfS11Ca2.js +1 -0
- package/dist/client/assets/agent-library-file-Dt5WQhqR.js +1 -0
- package/dist/client/assets/{agent-monitor-CJmv9IPY.js → agent-monitor-AbeIW_Ai.js} +1 -1
- package/dist/client/assets/{agent-overview-BEv7N4NA.js → agent-overview-CP7eXdGD.js} +1 -1
- package/dist/client/assets/agent-settings-Cksb01KL.js +1 -0
- package/dist/client/assets/{agent-site-editor-BtM-oYes.js → agent-site-editor-CXjzupfF.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-yaxPYyX2.js +2 -0
- package/dist/client/assets/{agent-site-editor-content-DIb9jcK9.js → agent-site-editor-content-DVxq2O4-.js} +3 -3
- package/dist/client/assets/{agent-site-editor-preview-DjU9ncCA.js → agent-site-editor-preview-5OyybmdQ.js} +3 -3
- package/dist/client/assets/agent-view-DIIzNnG2.js +1 -0
- package/dist/client/assets/{agent-view-guard-BwQRC7Wk.js → agent-view-guard-BELRPlW2.js} +1 -1
- package/dist/client/assets/{agents-list-UliOXq_N.js → agents-list-BFuTgO9u.js} +1 -1
- package/dist/client/assets/{ai-providers-D2IUVIa0.js → ai-providers-sAl5iN13.js} +1 -1
- package/dist/client/assets/{alert-DbQbBKPW.js → alert-Ckg4hU0z.js} +1 -1
- package/dist/client/assets/{alert-dialog-DNPqbgpS.js → alert-dialog-BR8K4NXo.js} +1 -1
- package/dist/client/assets/{analytics-sections-SJnL8lbj.js → analytics-sections-DF3Z3b79.js} +1 -1
- package/dist/client/assets/{api-keys-BoG6C1mH.js → api-keys-DNNJK348.js} +1 -1
- package/dist/client/assets/api-keys-Dfu07QXr.js +1 -0
- package/dist/client/assets/app-editor-DPt5aHSL.js +1 -0
- package/dist/client/assets/{asset-utils-BY1ew-Kc.js → asset-utils-B3OWlMwT.js} +1 -1
- package/dist/client/assets/{auth-DDpWnpgU.js → auth-cALcTtmh.js} +1 -1
- package/dist/client/assets/{auth-catchall-BZKEkBRf.js → auth-catchall-RnxJnMWm.js} +1 -1
- package/dist/client/assets/{auth-entry-iEMBYP-8.js → auth-entry-RJjANTAz.js} +1 -1
- package/dist/client/assets/{auth-split-layout-BlHy1ceM.js → auth-split-layout-BzqlAJfR.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-BnkSFHoe.js → authenticate-and-persist-oauth-D4ybQZrl.js} +1 -1
- package/dist/client/assets/{automation-list-row-BqrGkFet.js → automation-list-row-C8pHu8df.js} +1 -1
- package/dist/client/assets/{automation-runs-2GByVaGU.js → automation-runs-DbMMtDPh.js} +1 -1
- package/dist/client/assets/{automations-B6vr6PHF.js → automations-Bs5g1ha0.js} +1 -1
- package/dist/client/assets/{autosend-xivc0lOT.js → autosend-05UC4VjF.js} +1 -1
- package/dist/client/assets/{avatar-Ctu5Wczb.js → avatar-D8csOeeF.js} +1 -1
- package/dist/client/assets/{badge-BHUGKNWs.js → badge-Hx3u6P7O.js} +1 -1
- package/dist/client/assets/{block-document-CQvkKfRq.js → block-document-Ku1oysrM.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-CjmwOatj.js → blocks-preview-workspace-context-Ddh7SseB.js} +1 -1
- package/dist/client/assets/{blog-schema-Cjm5UW7b.js → blog-schema-DHwYJOyB.js} +1 -1
- package/dist/client/assets/{buckets-CckyUpV8.js → buckets-pKKwZjvN.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-mQFDIfqK.js → build-improve-prompt-doc-CnVRLk9u.js} +1 -1
- package/dist/client/assets/{calendar-C5AAXd6o.js → calendar-TwuiVpjf.js} +1 -1
- package/dist/client/assets/{capability-load-error-Dd-CbUlr.js → capability-load-error-BmxCCm5y.js} +1 -1
- package/dist/client/assets/{category-editor-Cn3peeDB.js → category-editor-BZw-XttL.js} +1 -1
- package/dist/client/assets/{chart-Cckr6Rhu.js → chart-YvkP6Rx2.js} +1 -1
- package/dist/client/assets/{chat-context-BOhnLSkM.js → chat-context-CikhzUxM.js} +1 -1
- package/dist/client/assets/{chat-draft-DGXb0HEl.js → chat-draft-DMMAinxT.js} +1 -1
- package/dist/client/assets/{checkbox-B6iJHz55.js → checkbox-Bo7NjQSg.js} +1 -1
- package/dist/client/assets/{choose-editor-CUuoO_B4.js → choose-editor-CrJY1sxE.js} +1 -1
- package/dist/client/assets/{claim-phase-copy-BPQnqmjZ.js → claim-phase-copy-DnP-cI_8.js} +1 -1
- package/dist/client/assets/{cli-auth-success-DMprEBtN.js → cli-auth-success-978JfJBE.js} +1 -1
- package/dist/client/assets/{client-icons-CitpbYhD.js → client-icons-ma8_2UIe.js} +1 -1
- package/dist/client/assets/{collapsible-BKVhHdmh.js → collapsible-DVB6AYNV.js} +1 -1
- package/dist/client/assets/{collection-detail-CkhetvNl.js → collection-detail-CSot03uC.js} +1 -1
- package/dist/client/assets/{collection-display-button-CkYwx2c-.js → collection-display-button-Bd647egA.js} +1 -1
- package/dist/client/assets/{collection-search-Ca5RdqHn.js → collection-search-D5sWxiI_.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DVKvHA40.js → collection-table-wrapper-BTjhjNWL.js} +1 -1
- package/dist/client/assets/{collection-tabs-DvLdBj3Z.js → collection-tabs-C89tqghq.js} +1 -1
- package/dist/client/assets/{column-rules-BJsI1Zvq.js → column-rules-BMCfx_gP.js} +1 -1
- package/dist/client/assets/{combobox-PZk6KTm8.js → combobox-sNdZN9XI.js} +1 -1
- package/dist/client/assets/{command-__KQqh6Y.js → command-H0OtsxUs.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-BmUUkMTw.js → companion-mcps-section-vQA3DOhf.js} +1 -1
- package/dist/client/assets/{config-BUhboKJz.js → config-maKPj7tB.js} +1 -1
- package/dist/client/assets/{connect-CLgSvuZK.js → connect-BRZ2U-RU.js} +1 -1
- package/dist/client/assets/{connect-layout-Bef3Vcoz.js → connect-layout-BCUOkWSA.js} +1 -1
- package/dist/client/assets/{connection-B_CnJB72.js → connection-D_rVWA-L.js} +1 -1
- package/dist/client/assets/{connection-card-COXkS8Eb.js → connection-card-lEfV14ps.js} +1 -1
- package/dist/client/assets/{connection-detail-CqAB54TD.js → connection-detail-Bkpj1hPa.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-CmM6esb0.js → connection-form-helpers-DzSY7y5N.js} +1 -1
- package/dist/client/assets/{connections-ctwClS3Y.js → connections-D2ChZKJ9.js} +1 -1
- package/dist/client/assets/{context-BrMbDozZ.js → context-BYAhF2ih.js} +1 -1
- package/dist/client/assets/{context-menu-D5LE-zYl.js → context-menu-54o-CErg.js} +1 -1
- package/dist/client/assets/{core.esm-Bm8Mdq22.js → core.esm-DbtknlhF.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-j0D-TCSt.js → create-organization-dialog-Cr3N9hYb.js} +1 -1
- package/dist/client/assets/{daily-pulse-Cd5PQB45.js → daily-pulse-CcX5tKuX.js} +1 -1
- package/dist/client/assets/{decopilot-XH4QWeAH.js → decopilot-CBk7MsQQ.js} +1 -1
- package/dist/client/assets/{device-hint-sfxTtdjc.js → device-hint-BPZC2UIh.js} +1 -1
- package/dist/client/assets/{dialog-BaUTSxMN.js → dialog-Cx4yDOtp.js} +1 -1
- package/dist/client/assets/{discover-CDpA1vFz.js → discover-BJ8uKTXr.js} +1 -1
- package/dist/client/assets/{domain-settings-B-7NWnKQ.js → domain-settings-5_gXdfZO.js} +1 -1
- package/dist/client/assets/{download-app-dialog-Do4LLhVR.js → download-app-dialog-CddOOzn5.js} +1 -1
- package/dist/client/assets/{drawer-B9dwTNY5.js → drawer-lUKd8lKU.js} +1 -1
- package/dist/client/assets/{editor-ByUsSScY.js → editor-CDzOZBXR.js} +1 -1
- package/dist/client/assets/{empty-state-C3ObDFbb.js → empty-state-B5RpF5dw.js} +1 -1
- package/dist/client/assets/{empty-state-BLBbHDRF.js → empty-state-CRgX-H4d.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BKPLoQfG.js → extract-connection-data-DKbP-JSI.js} +1 -1
- package/dist/client/assets/{feature-gate-DIRzfv1T.js → feature-gate-DYDN-f8K.js} +1 -1
- package/dist/client/assets/{feature-paywall-Bj36swPZ.js → feature-paywall-CwJeuIRd.js} +1 -1
- package/dist/client/assets/{file-explorer-CTmYwWxQ.js → file-explorer-Dy6k9N2q.js} +1 -1
- package/dist/client/assets/{file-preview-DKsb5sxq.js → file-preview--_ce6-u1.js} +1 -1
- package/dist/client/assets/{file-share-button-CAJ6q_i3.js → file-share-button-DkX33WID.js} +1 -1
- package/dist/client/assets/{file-type-icon-BslTQPeb.js → file-type-icon-z_VVXBs0.js} +1 -1
- package/dist/client/assets/flat-project-D11si8ND.js +1 -0
- package/dist/client/assets/{folder-icon-DI8RbZE8.js → folder-icon-Dl76i-NI.js} +1 -1
- package/dist/client/assets/{form-CX1qK1yv.js → form-PsTlToCZ.js} +1 -1
- package/dist/client/assets/{gateway-client-BvHlKdmu.js → gateway-client-O3BwGZz4.js} +1 -1
- package/dist/client/assets/{general-B3HHRd07.js → general-DWo8L8D2.js} +1 -1
- package/dist/client/assets/{home-BJBtZM7W.js → home-DCoYzUty.js} +1 -1
- package/dist/client/assets/{icon-button-BBOHlA6G.js → icon-button-CtkCoho4.js} +1 -1
- package/dist/client/assets/{index-Df0sPq1p.js → index-B92tQhk2.js} +1 -1
- package/dist/client/assets/{index-DDpEXUJ_.js → index-BZOFys5V.js} +1 -1
- package/dist/client/assets/{index-CO_AXaPm.js → index-BuPiMHa9.js} +1 -1
- package/dist/client/assets/{index-BuCSZoG-.js → index-CNKB9BLC.js} +1 -1
- package/dist/client/assets/{index-_Sxk3cnc.js → index-CNlcFUXI.js} +1 -1
- package/dist/client/assets/{index-BqIvBG3L.js → index-CX9nJVrp.js} +1 -1
- package/dist/client/assets/{index-CEnW1hdR.js → index-Cehs1FbF.js} +1 -1
- package/dist/client/assets/{index-BMDxYXCC.js → index-CqROczuR.js} +1 -1
- package/dist/client/assets/{index-DAsfUatQ.js → index-CqoWQKAL.js} +1 -1
- package/dist/client/assets/{index-BER7cxzg.js → index-DbInOaDT.js} +3 -3
- package/dist/client/assets/{index-CU39nsZn.js → index-DkbR1nSx.js} +1 -1
- package/dist/client/assets/{index-LBqA-ZwS.js → index-Dp_K-tWq.js} +4 -4
- package/dist/client/assets/{index-C3kLhdFk.js → index-atJuiikW.js} +1 -1
- package/dist/client/assets/{index-GtGSryeO.js → index-oQ2UbXRU.js} +1 -1
- package/dist/client/assets/{index-redirect-O6bjnqnz.js → index-redirect-CuIBqkGB.js} +1 -1
- package/dist/client/assets/{index-royPJMuT.js → index-s00oD-Jd.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-BOfNlSlD.js → infiniteQueryObserver-cPdLUo2i.js} +1 -1
- package/dist/client/assets/{infra-billing-C01AiIAF.js → infra-billing-CMOusNuI.js} +1 -1
- package/dist/client/assets/{input-BaULnlTy.js → input-CuvBF_Ph.js} +1 -1
- package/dist/client/assets/{input-B5aqwsZt.js → input-DMPfmuCm.js} +1 -1
- package/dist/client/assets/{input-NGWnA1zm.js → input-Dz9vjpZr.js} +3 -3
- package/dist/client/assets/{integration-icon-DBB4e_3T.js → integration-icon-C4a6DmNa.js} +1 -1
- package/dist/client/assets/{label-B_gun1QM.js → label-IzmYRV1z.js} +1 -1
- package/dist/client/assets/{layout-CroKjGpx.js → layout-B3a4jG3v.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-CoX6cUW4.js → legacy-agents-deep-2AHQu7JX.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-BICndawD.js → legacy-main-redirect-QbN2kRww.js} +1 -1
- package/dist/client/assets/library-CkyuDdBe.js +1 -0
- package/dist/client/assets/{library-tab-BR0DXbhB.js → library-tab-CTbP1WqV.js} +1 -1
- package/dist/client/assets/{login-DOWqx3ut.js → login-DFPUDsmw.js} +1 -1
- package/dist/client/assets/{markdown-U5k2vy3J.js → markdown-CbWncYsp.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-CKBkqc3B.js → mcp-app-renderer-dVJ57955.js} +1 -1
- package/dist/client/assets/{mcp-oauth-HStEMAmd.js → mcp-oauth-CaFmRQFB.js} +1 -1
- package/dist/client/assets/{members-DNyZa-XF.js → members-C66PZkTp.js} +1 -1
- package/dist/client/assets/{memory-OOka5CRZ.js → memory-COrpidSd.js} +1 -1
- package/dist/client/assets/{mini-report-page-COzp9QDI.js → mini-report-page-BIpwSm2B.js} +1 -1
- package/dist/client/assets/{mock-board-CfkC340s.js → mock-board-I7CG5ZZk.js} +1 -1
- package/dist/client/assets/{monaco-editor-39OIr0EW.js → monaco-editor-BfDinEqB.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-hFVlSsvr.js → monitoring-stats-row-DpliLE6w.js} +1 -1
- package/dist/client/assets/{multi-select-Dq20jLV8.js → multi-select-CdUvVLnd.js} +1 -1
- package/dist/client/assets/{mustache-Cp6gU8R-.js → mustache-BCjs42fS.js} +1 -1
- package/dist/client/assets/{new-project-dialog-GBb33kNc.js → new-project-dialog-BrBcYgwV.js} +1 -1
- package/dist/client/assets/{oauth-callback-Bm96J_76.js → oauth-callback-VghnKX5V.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-Bw_B2ld4.js → oauth-callback-ai-provider-CHo0gJqB.js} +1 -1
- package/dist/client/assets/{onboarding-DidfktKN.js → onboarding-CCfkb-5i.js} +1 -1
- package/dist/client/assets/{openai-conversation-BKeUiEz7.js → openai-conversation-CBNQtuep.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-D6hnV0TB.js → optimistic-project-sidebar-views-DO48tEtU.js} +1 -1
- package/dist/client/assets/{org-file-open-context-BtoXgtv0.js → org-file-open-context-CTB-BA9v.js} +1 -1
- package/dist/client/assets/{organization-choice-BoiiDDpR.js → organization-choice-B_JYNF9C.js} +1 -1
- package/dist/client/assets/{orgs-BMfaOlil.js → orgs-CEe5T0Jp.js} +1 -1
- package/dist/client/assets/{page-seo-form-l195NMEg.js → page-seo-form-ZXtL1SS1.js} +1 -1
- package/dist/client/assets/{pair-DrA4hmPx.js → pair-DK0B0mc4.js} +1 -1
- package/dist/client/assets/{plan-ladder-raSzhtyN.js → plan-ladder-DV7XXfLd.js} +1 -1
- package/dist/client/assets/{popover-CeeSO9_9.js → popover-CTR7iqtU.js} +1 -1
- package/dist/client/assets/{post-calendar-BaiUUJmh.js → post-calendar-Cj6mtuXm.js} +1 -1
- package/dist/client/assets/{post-editor-BQ1ukEYL.js → post-editor-CkUCYO4l.js} +1 -1
- package/dist/client/assets/{preview-content-CIoLsvsV.js → preview-content-BYxJoP40.js} +1 -1
- package/dist/client/assets/{preview-dialog-9biwdpbK.js → preview-dialog-CYLdM3p6.js} +1 -1
- package/dist/client/assets/{preview-panel-DAYrsAZ_.js → preview-panel-CuZzv1pv.js} +1 -1
- package/dist/client/assets/{profile-BrT6Fi4g.js → profile-BCXXDsmg.js} +1 -1
- package/dist/client/assets/{project-app-view-eDaYLCna.js → project-app-view-CDuxE_ml.js} +1 -1
- package/dist/client/assets/{project-feed-BuPVvKIN.js → project-feed-DIsrBxNw.js} +1 -1
- package/dist/client/assets/{project-icon-RPHlWMLn.js → project-icon-TzEHFIiY.js} +1 -1
- package/dist/client/assets/project-reports-CtWvQy-H.js +1 -0
- package/dist/client/assets/project-tasks-CpBAPqu4.js +1 -0
- package/dist/client/assets/{projects-Cgs0BGd1.js → projects-D87yg2cy.js} +1 -1
- package/dist/client/assets/{projects-empty-state-D6K9KKqm.js → projects-empty-state-EB5DtkKb.js} +1 -1
- package/dist/client/assets/{prompts-Bj9DEWHy.js → prompts-BskO422j.js} +1 -1
- package/dist/client/assets/record-editor-RPRDtY57.js +1 -0
- package/dist/client/assets/{redirect-editor-CFDCaCx_.js → redirect-editor-BKJweHyd.js} +1 -1
- package/dist/client/assets/{reports-BgW9aNAq.js → reports-BLAtFH6q.js} +1 -1
- package/dist/client/assets/reports-BtbcBBMJ.js +1 -0
- package/dist/client/assets/{reports-onboarding-KuQ-B5Nd.js → reports-onboarding-wPSrs32l.js} +1 -1
- package/dist/client/assets/{reports-tab-Bof1mzjv.js → reports-tab-B72VUoH-.js} +2 -2
- package/dist/client/assets/{repositories-DmphBx57.js → repositories-Bl2pBl-f.js} +1 -1
- package/dist/client/assets/{repository-binding-D1nnAWYo.js → repository-binding-CzSKWD7H.js} +1 -1
- package/dist/client/assets/{repository-import-picker-DRqtS9NW.js → repository-import-picker-D0LwcFNO.js} +1 -1
- package/dist/client/assets/{repository-picker-Dg10f9--.js → repository-picker-DQFzR9xt.js} +1 -1
- package/dist/client/assets/{require-capability-Dfqs0tLP.js → require-capability-CMxqoohm.js} +1 -1
- package/dist/client/assets/{required-auth-layout-CfNBeMt4.js → required-auth-layout-Cketary5.js} +1 -1
- package/dist/client/assets/{reset-password-ZSZOruiu.js → reset-password-DxGEn2uN.js} +1 -1
- package/dist/client/assets/{resizable-BrB6X38q.js → resizable-DCMgjOKZ.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-CXpd70Ay.js → resolve-tab-icon-Bn2NKJjD.js} +1 -1
- package/dist/client/assets/{review-settings-BMWXlktJ.js → review-settings-BDC004dc.js} +1 -1
- package/dist/client/assets/{rich-text-link-control-BiLYq_Ss.js → rich-text-link-control-oDq426wL.js} +1 -1
- package/dist/client/assets/{roles-DYnLkqNH.js → roles-D2mAbmyg.js} +1 -1
- package/dist/client/assets/{route-Dom1EKxW.js → route-CItSJgD4.js} +1 -1
- package/dist/client/assets/route-_gNd_u_g.js +1 -0
- package/dist/client/assets/{route-Dza1mPMZ.js → route-n1Sub2zH.js} +1 -1
- package/dist/client/assets/{runnable-block-editor-CX0ovMOm.js → runnable-block-editor-CWjhiXNQ.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-B1Nt4uWC.js → sandbox-lifecycle-context-DfJeOjj9.js} +1 -1
- package/dist/client/assets/{schema-BuM44BeJ.js → schema-Ca8VbB6Z.js} +1 -1
- package/dist/client/assets/{scroll-area-CwucKMgJ.js → scroll-area-B7qC_9nb.js} +1 -1
- package/dist/client/assets/{search-input-DNCPqRQn.js → search-input-B1vfwvsf.js} +1 -1
- package/dist/client/assets/{search-toggle-QfO4rJO-.js → search-toggle-bwYqrVmX.js} +1 -1
- package/dist/client/assets/{secret-picker-CPcltp8E.js → secret-picker-BpYrwXvM.js} +1 -1
- package/dist/client/assets/{secrets-Dj3-an7_.js → secrets-DQZRb7E3.js} +1 -1
- package/dist/client/assets/{sections-editor-CDa_uUSk.js → sections-editor-Db9a1-Bt.js} +1 -1
- package/dist/client/assets/{select-imMlkJoM.js → select-CoyCwgyB.js} +1 -1
- package/dist/client/assets/{select-model-cT4UKPXZ.js → select-model-CNFYkJTw.js} +1 -1
- package/dist/client/assets/{seo-editor-D_2QNoVA.js → seo-editor-FBgQQ6Ao.js} +1 -1
- package/dist/client/assets/{separator-BZ4lzGmd.js → separator-B3bsYN0c.js} +1 -1
- package/dist/client/assets/settings-tab-DkTXor6H.js +4 -0
- package/dist/client/assets/{sheet-AzJgkdm-.js → sheet-CcwsfSuf.js} +1 -1
- package/dist/client/assets/{shell-layout-CSJSyeoD.js → shell-layout-D0qEeQ00.js} +1 -1
- package/dist/client/assets/{skills-BOZArdy5.js → skills-D_NPHApF.js} +1 -1
- package/dist/client/assets/{sso-B5yqnj7z.js → sso--qAyKDeI.js} +1 -1
- package/dist/client/assets/{suggestion-CcJQPlSS.js → suggestion-BZACoewj.js} +1 -1
- package/dist/client/assets/{switch-xoTVq7WM.js → switch-BsrLPJk-.js} +1 -1
- package/dist/client/assets/{synced-repos-BMmzq47r.js → synced-repos-BBnTf72q.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-vQF0_Xqb.js → tab-icon-glyph-BpobhcK9.js} +1 -1
- package/dist/client/assets/{table-MT321DSd.js → table-CDAJcCRP.js} +1 -1
- package/dist/client/assets/{tabs-CicgJ10_.js → tabs-_ZXrvPf9.js} +1 -1
- package/dist/client/assets/{task-board-Cs1-7PpN.js → task-board-Be84bQr5.js} +1 -1
- package/dist/client/assets/{task-route-m4lCwB0h.js → task-route-BVDlBu3j.js} +1 -1
- package/dist/client/assets/{task-status-XbY5QJOl.js → task-status-w_ipGIcW.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-DVoQg8Rb.js → taskboard-analytics-DZIIOtRa.js} +1 -1
- package/dist/client/assets/{tasks-D5XhFaqg.js → tasks-DfnBdP8M.js} +1 -1
- package/dist/client/assets/tasks-JiH0eBli.js +1 -0
- package/dist/client/assets/{textarea-CJdXmj_-.js → textarea-D_qYz289.js} +1 -1
- package/dist/client/assets/{thread-analytics-R7Zql4Jr.js → thread-analytics-DUtz7u4O.js} +1 -1
- package/dist/client/assets/{thread-button-CbH7XjU-.js → thread-button-e1WPL34D.js} +1 -1
- package/dist/client/assets/{thread-intent-B1ICFt86.js → thread-intent-CQTmnksY.js} +1 -1
- package/dist/client/assets/{thread-route-Bb8c02GG.js → thread-route-BqkWVw2J.js} +1 -1
- package/dist/client/assets/{thread-route-BcHLmvou.js → thread-route-DDpItDrx.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-DUB9B_nE.js → thread-sheet-body-jgcoBFMz.js} +1 -1
- package/dist/client/assets/{toggle-group-C9ZX2RgM.js → toggle-group-C6cnvdcW.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-Daq-5ocJ.js → toolbar-icon-button-C3ZwIJAh.js} +1 -1
- package/dist/client/assets/{tooltip-BwTRkM37.js → tooltip-volhiTDm.js} +1 -1
- package/dist/client/assets/{track-pLWJ-wXy.js → track-CHLcK5Xr.js} +1 -1
- package/dist/client/assets/{types-6q3fiU58.js → types-BfHWRRMs.js} +1 -1
- package/dist/client/assets/{usage-stats-DqkDEQoU.js → usage-stats-u1xk4pvh.js} +1 -1
- package/dist/client/assets/{use-ai-providers-B1J7ouSE.js → use-ai-providers-DSD7VYyN.js} +1 -1
- package/dist/client/assets/{use-automations-m8Hu0y6o.js → use-automations-DxuURK9w.js} +1 -1
- package/dist/client/assets/{use-autosave-BXMlnNye.js → use-autosave-BXGIoabR.js} +1 -1
- package/dist/client/assets/{use-chat-layout-state-D_r1YjBG.js → use-chat-layout-state-CD_0Irhr.js} +1 -1
- package/dist/client/assets/{use-chat-navigation-NXmBPBJ5.js → use-chat-navigation-jtlOMVJv.js} +1 -1
- package/dist/client/assets/{use-clock-tick-Ce_NiOa_.js → use-clock-tick-B9pwHzMq.js} +1 -1
- package/dist/client/assets/{use-connect-companion-CMe2Cke9.js → use-connect-companion-1m-Flriq.js} +1 -1
- package/dist/client/assets/{use-connection-D9TU1G8g.js → use-connection-BxvBZ4tG.js} +1 -1
- package/dist/client/assets/{use-copy-CwGCL7_G.js → use-copy-FUDPi7ru.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-BEb1SxP-.js → use-create-virtual-mcp-BMOl2YsQ.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-CncfJZ-Y.js → use-date-fns-locale-CZfaxMtC.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-V9REzK1K.js → use-debounced-autosave-DyqWcQ6u.js} +1 -1
- package/dist/client/assets/{use-debounced-value-TVa8ke9i.js → use-debounced-value-2SotiCO2.js} +1 -1
- package/dist/client/assets/{use-deco-credits-BxH5tRJq.js → use-deco-credits-B3LiNfwz.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-ByD6TF3m.js → use-decopilot-events-D3zb74bk.js} +1 -1
- package/dist/client/assets/{use-delete-connection-DwzWoBly.js → use-delete-connection-DiRBraYP.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-C2pzXDr2.js → use-deployment-admin-hh-oYei0.js} +1 -1
- package/dist/client/assets/{use-ensure-project-folder-AK-c3A_w.js → use-ensure-project-folder-C8p35UA1.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-CyfuYiZy.js → use-fast-preview-draft-url-BKk6i5QK.js} +1 -1
- package/dist/client/assets/{use-file-configs-HSDXp3dR.js → use-file-configs-BHY4DaxL.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-Di73ngUh.js → use-infinite-scroll-CbWvVc4J.js} +1 -1
- package/dist/client/assets/{use-join-requests-SyFADpZF.js → use-join-requests-DbAhSRzF.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-C9rsMyw4.js → use-main-panel-tabs-CYEpq4x2.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-DKj9l4Q_.js → use-mcp-auth-status-B94ukkEm.js} +1 -1
- package/dist/client/assets/{use-mcp-client-DEGTm1W0.js → use-mcp-client-BUFdpLoI.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-CZuYjuRv.js → use-mcp-prompts-PtK6U83h.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DGilpnId.js → use-mcp-tools-fP36UUt2.js} +1 -1
- package/dist/client/assets/{use-members-nuYKaBVx.js → use-members-CfUgcELO.js} +1 -1
- package/dist/client/assets/{use-mobile-D86gQiqH.js → use-mobile-D_zVYgcY.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-C1uAfvXQ.js → use-navigate-to-agent-D3FqrHHq.js} +1 -1
- package/dist/client/assets/use-new-blocks-editor-B2vcRo3Z.js +1 -0
- package/dist/client/assets/{use-open-billing-url-DrFUthpb.js → use-open-billing-url-D9fhhg-C.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-Ctvz1VPK.js → use-org-auth-client-uVDfk1J4.js} +1 -1
- package/dist/client/assets/{use-org-fs-BK-5u4MR.js → use-org-fs-BIChLUk1.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-DCT7Auvn.js → use-org-repo-syncs-USNvar5i.js} +1 -1
- package/dist/client/assets/{use-org-sso-Dvki5yin.js → use-org-sso-BeqR2AAG.js} +1 -1
- package/dist/client/assets/{use-organization-roles-CdiXw9NI.js → use-organization-roles-Bx8bGE-Q.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BB1edQnb.js → use-organization-settings-BScH3qwG.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-FaJ2R6On.js → use-panel-navigate-f5p30JNB.js} +1 -1
- package/dist/client/assets/{use-project-scope-CJdExTjB.js → use-project-scope-Bc3Mf8u8.js} +1 -1
- package/dist/client/assets/{use-releases-CkCV1BPi.js → use-releases-C_be6yuh.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-BjS1JWZX.js → use-reports-diagnostic-C3lq-p41.js} +1 -1
- package/dist/client/assets/{use-secrets-BLWrq5Zi.js → use-secrets-Bg6EZdq0.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-DtBKzuHi.js → use-section-preview-base-DIGhBQOo.js} +1 -1
- package/dist/client/assets/{use-session-runtime-Ciro8eXk.js → use-session-runtime-D-oBtWdP.js} +1 -1
- package/dist/client/assets/{use-tags-CZ_bS51l.js → use-tags-CW71Fix3.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-Caaew7r_.js → use-task-board-analytics-D5zyKXHr.js} +1 -1
- package/dist/client/assets/{use-task-board-events-nMb8vMzh.js → use-task-board-events-CGpFuIoH.js} +1 -1
- package/dist/client/assets/{use-task-metadata-DdniinOi.js → use-task-metadata-BB48G_ju.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-D7pEB2b_.js → use-thread-analytics-DglDjnAj.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-BvePWXQr.js → use-thread-outputs-DOxiz9iU.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-LSeshq9l.js +1 -0
- package/dist/client/assets/{useQueries-CqRixoL5.js → useQueries-Bf6inKuU.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DDa2NwUG.js +1 -0
- package/dist/client/assets/{users-DqUzzC71.js → users-Bhyogzga.js} +1 -1
- package/dist/client/assets/{utils-CVtWzP8U.js → utils-CbyoMcko.js} +1 -1
- package/dist/client/assets/{variant-calendar-B-8vmp-z.js → variant-calendar-DccOv2cj.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-BHQrQ-er.js → variant-matcher-override-0eTJWiNi.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-C6y0Ak_X.js → view-mode-toggle-BBW6uQ5m.js} +1 -1
- package/dist/client/assets/{virtual-mcp-BnTPAygc.js → virtual-mcp-DyQGypdD.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/agent-app-Cv42eUOK.js +0 -1
- package/dist/client/assets/agent-deck-CkaxqPyQ.js +0 -1
- package/dist/client/assets/agent-library-e9R2mrHA.js +0 -1
- package/dist/client/assets/agent-library-file-CWWZkSXi.js +0 -1
- package/dist/client/assets/agent-settings-xa5u31eL.js +0 -1
- package/dist/client/assets/agent-site-editor-code-BGhosgRZ.js +0 -2
- package/dist/client/assets/agent-view-B5JwJu5a.js +0 -1
- package/dist/client/assets/api-keys-B8m8i5RY.js +0 -1
- package/dist/client/assets/app-editor-C9lJAIxk.js +0 -1
- package/dist/client/assets/flat-project-Dm5v-WoJ.js +0 -1
- package/dist/client/assets/library-CJbNbaaz.js +0 -1
- package/dist/client/assets/project-reports-BX_a8I4H.js +0 -1
- package/dist/client/assets/project-tasks-D4VJ7ObB.js +0 -1
- package/dist/client/assets/record-editor-BXHnPoZS.js +0 -1
- package/dist/client/assets/reports-CsbUc9gb.js +0 -1
- package/dist/client/assets/route-yo_gVgXO.js +0 -1
- package/dist/client/assets/settings-tab-B-9vMsZ9.js +0 -5
- package/dist/client/assets/tasks-BhdUS3SM.js +0 -1
- package/dist/client/assets/use-new-blocks-editor-NIzs9JOH.js +0 -1
- package/dist/client/assets/useInfiniteQuery-fv1BKri9.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BRIV-VAB.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as M,b as V,e as Qe,j as n,B as F,t as We,bP as he,a7 as Tt,a as Ke,y as Vt,D as Nt,K as Ue,bQ as Wt,bR as Yt,V as Be,l as dt,aL as Qt,p as pt,bS as Xt,r as J,a4 as Zt,a6 as re,d as _t,X as ht,z as At,m as He,q as ut,ay as Pt,bT as en,aE as tn,aJ as yt,x as nn,bU as sn,bV as on,bW as an,bX as rn,bY as ln,Z as cn,u as dn,_ as un,bZ as mn,b_ as fn,k as Ct,b$ as lt,c0 as hn,c1 as gn,O as pn,c2 as yn}from"./index-LBqA-ZwS.js";import{A as at}from"./avatar-Ctu5Wczb.js";import{t as Et}from"./Building02-Dyi9ronc.js";import{i as bn}from"./UserSquare-DdE8MrwD.js";import{at as xn,K as wn,B as ct,a6 as Sn,X as ie,E as vn,au as jn,n as bt,g as kn,m as Tn,h as Nn,av as _n,j as An}from"./agent-icon-B_AZohhm.js";import{s as Pn}from"./XClose-BCVhz-Kf.js";import{D as Cn}from"./download-app-dialog-Do4LLhVR.js";import{a as En,u as On}from"./use-project-scope-CJdExTjB.js";import{u as Ot,a as In}from"./use-panel-navigate-FaJ2R6On.js";import{i as le}from"./CheckCircle-YnBoZGaI.js";import{i as ot}from"./Monitor01-D19plyaf.js";import{i as ce}from"./ZoomOut-DGJt2ZOH.js";import{u as Ln}from"./use-clock-tick-Ce_NiOa_.js";import{c as It,d as Lt,b as $t,D as Dt,h as $n,e as Dn}from"./dialog-BaUTSxMN.js";import{s as xt}from"./Plus-CuK8nNcu.js";import{a as Rn}from"./Tool01-BrjR3c4R.js";import{b as de,e as Je,d as Mn,C as Fn,c as zn,a as qn}from"./command-__KQqh6Y.js";import{I as Bn}from"./integration-icon-DBB4e_3T.js";import{P as Kn}from"./project-icon-RPHlWMLn.js";import{a as Hn,m as Un}from"./use-mcp-client-DEGTm1W0.js";import{u as Gn,a as Jn,n as Vn}from"./new-project-dialog-GBb33kNc.js";import{S as Wn,u as Yn}from"./thread-intent-B1ICFt86.js";import{u as Qn}from"./use-is-desktop-app-BNujXJc_.js";import{R as Xn}from"./required-auth-layout-CfNBeMt4.js";import{A as Zn}from"./autosend-xivc0lOT.js";import{u as es,a as ts,b as ns,c as ss}from"./thread-route-BcHLmvou.js";import{u as os}from"./use-org-sso-Dvki5yin.js";function is(t){const e=M.c(49),{orgName:o,orgSlug:r,orgLogo:s,domain:a}=t,i=V();let d;e[0]!==r||e[1]!==i?(d=async()=>{const m=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:r})}),P=await m.json();if(!m.ok||!P.success)throw new Error(P.error??i("common.autoDomainJoinScreen.joinError"));return P},e[0]=r,e[1]=i,e[2]=d):d=e[2];let f;e[3]!==r?(f=m=>{window.location.href=`/${m.slug??r}`},e[3]=r,e[4]=f):f=e[4];let h;e[5]!==i?(h=m=>{We.error(m instanceof Error?m.message:i("common.autoDomainJoinScreen.joinError"))},e[5]=i,e[6]=h):h=e[6];let w;e[7]!==d||e[8]!==f||e[9]!==h?(w={mutationFn:d,onSuccess:f,onError:h},e[7]=d,e[8]=f,e[9]=h,e[10]=w):w=e[10];const c=Qe(w),x=as;let g;e[11]!==s||e[12]!==o?(g=s?n.jsx(at,{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(Et,{className:"h-6 w-6 text-primary"})}),e[11]=s,e[12]=o,e[13]=g):g=e[13];let y;e[14]!==o||e[15]!==i?(y=i("common.autoDomainJoinScreen.joinPrompt",{orgName:o}),e[14]=o,e[15]=i,e[16]=y):y=e[16];let l;e[17]!==y?(l=n.jsx("h3",{className:"text-lg font-medium",children:y}),e[17]=y,e[18]=l):l=e[18];let u;e[19]!==a||e[20]!==i?(u=i("common.autoDomainJoinScreen.joinDescription",{domain:a}),e[19]=a,e[20]=i,e[21]=u):u=e[21];let p;e[22]!==u?(p=n.jsx("p",{className:"text-sm text-muted-foreground",children:u}),e[22]=u,e[23]=p):p=e[23];let b;e[24]!==l||e[25]!==p?(b=n.jsxs("div",{className:"space-y-2",children:[l,p]}),e[24]=l,e[25]=p,e[26]=b):b=e[26];let S;e[27]!==c?(S=()=>c.mutate(),e[27]=c,e[28]=S):S=e[28];let v;e[29]!==c.isPending||e[30]!==o||e[31]!==i?(v=c.isPending?i("common.autoDomainJoinScreen.joining"):i("common.autoDomainJoinScreen.enterOrg",{orgName:o}),e[29]=c.isPending,e[30]=o,e[31]=i,e[32]=v):v=e[32];let N;e[33]!==c.isPending||e[34]!==S||e[35]!==v?(N=n.jsx(F,{onClick:S,disabled:c.isPending,children:v}),e[33]=c.isPending,e[34]=S,e[35]=v,e[36]=N):N=e[36];const A=c.isPending;let _;e[37]!==i?(_=i("common.goHome"),e[37]=i,e[38]=_):_=e[38];let j;e[39]!==c.isPending||e[40]!==_?(j=n.jsx(F,{variant:"ghost",onClick:x,disabled:A,children:_}),e[39]=c.isPending,e[40]=_,e[41]=j):j=e[41];let T;e[42]!==N||e[43]!==j?(T=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[N,j]}),e[42]=N,e[43]=j,e[44]=T):T=e[44];let k;return e[45]!==b||e[46]!==T||e[47]!==g?(k=n.jsxs(he,{children:[g,b,T]}),e[45]=b,e[46]=T,e[47]=g,e[48]=k):k=e[48],k}function as(){window.location.href="/"}function wt(t){const e=M.c(25),{orgSlug:o,orgName:r,reason:s}=t,a=V(),i=rs,d=s==="not-found",f=d?bn:Tt;let h;e[0]!==d||e[1]!==a?(h=a(d?"common.noAccessScreen.organizationNotFound":"common.noAccessScreen.noAccess"),e[0]=d,e[1]=a,e[2]=h):h=e[2];const w=h;let c;e[3]!==d||e[4]!==r||e[5]!==o||e[6]!==a?(c=d?n.jsxs(n.Fragment,{children:[a("common.noAccessScreen.couldNotFind")," ",n.jsx("strong",{children:o}),"."]}):n.jsxs(n.Fragment,{children:[a("common.noAccessScreen.noAccessTo")," ",n.jsx("strong",{children:r??o}),".",n.jsx("br",{}),a("common.noAccessScreen.askAdminToInvite")]}),e[3]=d,e[4]=r,e[5]=o,e[6]=a,e[7]=c):c=e[7];const x=c;let g;e[8]!==f?(g=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]=g):g=e[9];let y;e[10]!==w?(y=n.jsx("h3",{className:"text-lg font-medium",children:w}),e[10]=w,e[11]=y):y=e[11];let l;e[12]!==x?(l=n.jsx("p",{className:"text-sm text-muted-foreground",children:x}),e[12]=x,e[13]=l):l=e[13];let u;e[14]!==y||e[15]!==l?(u=n.jsxs("div",{className:"space-y-2",children:[y,l]}),e[14]=y,e[15]=l,e[16]=u):u=e[16];let p;e[17]!==a?(p=a("common.goHome"),e[17]=a,e[18]=p):p=e[18];let b;e[19]!==p?(b=n.jsx(F,{onClick:i,children:p}),e[19]=p,e[20]=b):b=e[20];let S;return e[21]!==g||e[22]!==u||e[23]!==b?(S=n.jsxs(he,{children:[g,u,b]}),e[21]=g,e[22]=u,e[23]=b,e[24]=S):S=e[24],S}function rs(){window.location.href="/"}function ls(t){const e=M.c(59),{invitationId:o,orgName:r,orgSlug:s,orgLogo:a}=t,i=V();let d;e[0]!==o?(d=async()=>{const E=await Ke.organization.acceptInvitation({invitationId:o});if(E.error)throw new Error(E.error.message);return E.data},e[0]=o,e[1]=d):d=e[1];let f;e[2]!==s?(f=()=>{Vt(),window.location.href=`/${s}`},e[2]=s,e[3]=f):f=e[3];let h;e[4]!==i?(h=E=>{We.error(E instanceof Error?E.message:i("common.pendingInviteScreen.failedToAccept"))},e[4]=i,e[5]=h):h=e[5];let w;e[6]!==d||e[7]!==f||e[8]!==h?(w={mutationFn:d,onSuccess:f,onError:h},e[6]=d,e[7]=f,e[8]=h,e[9]=w):w=e[9];const c=Qe(w);let x;e[10]!==o?(x=async()=>{const E=await Ke.organization.rejectInvitation({invitationId:o});if(E.error)throw new Error(E.error.message);return E.data},e[10]=o,e[11]=x):x=e[11];let g,y;e[12]!==i?(g=()=>{We.success(i("common.pendingInviteScreen.invitationDeclined")),window.location.href="/"},y=E=>{We.error(E instanceof Error?E.message:i("common.pendingInviteScreen.failedToDecline"))},e[12]=i,e[13]=g,e[14]=y):(g=e[13],y=e[14]);let l;e[15]!==x||e[16]!==g||e[17]!==y?(l={mutationFn:x,onSuccess:g,onError:y},e[15]=x,e[16]=g,e[17]=y,e[18]=l):l=e[18];const u=Qe(l),p=c.isPending||u.isPending;let b;e[19]!==a||e[20]!==r?(b=a?n.jsx(at,{url:a,fallback:r.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(xn,{className:"h-6 w-6 text-primary"})}),e[19]=a,e[20]=r,e[21]=b):b=e[21];let S;e[22]!==r||e[23]!==i?(S=i("common.pendingInviteScreen.invitedTo",{orgName:r}),e[22]=r,e[23]=i,e[24]=S):S=e[24];let v;e[25]!==S?(v=n.jsx("h3",{className:"text-lg font-medium",children:S}),e[25]=S,e[26]=v):v=e[26];let N;e[27]!==i?(N=i("common.pendingInviteScreen.acceptDescription"),e[27]=i,e[28]=N):N=e[28];let A;e[29]!==N?(A=n.jsx("p",{className:"text-sm text-muted-foreground",children:N}),e[29]=N,e[30]=A):A=e[30];let _;e[31]!==v||e[32]!==A?(_=n.jsxs("div",{className:"space-y-2",children:[v,A]}),e[31]=v,e[32]=A,e[33]=_):_=e[33];let j;e[34]!==c?(j=()=>c.mutate(),e[34]=c,e[35]=j):j=e[35];let T;e[36]!==c.isPending||e[37]!==i?(T=c.isPending?i("common.pendingInviteScreen.acceptingButton"):i("common.pendingInviteScreen.acceptButton"),e[36]=c.isPending,e[37]=i,e[38]=T):T=e[38];let k;e[39]!==p||e[40]!==j||e[41]!==T?(k=n.jsx(F,{onClick:j,disabled:p,children:T}),e[39]=p,e[40]=j,e[41]=T,e[42]=k):k=e[42];let m;e[43]!==u?(m=()=>u.mutate(),e[43]=u,e[44]=m):m=e[44];let P;e[45]!==u.isPending||e[46]!==i?(P=u.isPending?i("common.pendingInviteScreen.decliningButton"):i("common.pendingInviteScreen.declineButton"),e[45]=u.isPending,e[46]=i,e[47]=P):P=e[47];let O;e[48]!==p||e[49]!==m||e[50]!==P?(O=n.jsx(F,{variant:"ghost",onClick:m,disabled:p,children:P}),e[48]=p,e[49]=m,e[50]=P,e[51]=O):O=e[51];let C;e[52]!==k||e[53]!==O?(C=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[k,O]}),e[52]=k,e[53]=O,e[54]=C):C=e[54];let I;return e[55]!==_||e[56]!==C||e[57]!==b?(I=n.jsxs(he,{children:[b,_,C]}),e[55]=_,e[56]=C,e[57]=b,e[58]=I):I=e[58],I}function cs(t){const e=M.c(23),{orgName:o,orgLogo:r}=t,s=V();let a;e[0]!==r||e[1]!==o?(a=r?n.jsx(at,{url:r,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","aria-hidden":"true",children:n.jsx(wn,{className:"h-6 w-6 text-primary"})}),e[0]=r,e[1]=o,e[2]=a):a=e[2];let i;e[3]!==s?(i=s("common.requestPendingScreen.title"),e[3]=s,e[4]=i):i=e[4];let d;e[5]!==i?(d=n.jsx("h3",{className:"text-lg font-medium",children:i}),e[5]=i,e[6]=d):d=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 h;e[10]!==f?(h=n.jsx("p",{className:"text-sm text-muted-foreground",children:f}),e[10]=f,e[11]=h):h=e[11];let w;e[12]!==d||e[13]!==h?(w=n.jsxs("div",{className:"space-y-2",children:[d,h]}),e[12]=d,e[13]=h,e[14]=w):w=e[14];let c;e[15]!==s?(c=s("common.goHome"),e[15]=s,e[16]=c):c=e[16];let x;e[17]!==c?(x=n.jsx(F,{variant:"ghost",onClick:ds,children:c}),e[17]=c,e[18]=x):x=e[18];let g;return e[19]!==a||e[20]!==w||e[21]!==x?(g=n.jsxs(he,{children:[a,w,x]}),e[19]=a,e[20]=w,e[21]=x,e[22]=g):g=e[22],g}function ds(){window.location.href="/"}function us(t){const e=M.c(45),{orgName:o,orgSlug:r,orgLogo:s,domain:a}=t,i=V();let d;e[0]!==r?(d=async()=>{const k=await fetch("/api/auth/custom/domain-request-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:r})}),m=await k.json();if(!k.ok||!m.success)throw new Error(m.error??"Failed to request access");return m},e[0]=r,e[1]=d):d=e[1];let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=fs,e[2]=f):f=e[2];let h;e[3]!==i?(h=k=>{We.error(k instanceof Error?k.message:i("common.requestToJoinScreen.failedToRequest"))},e[3]=i,e[4]=h):h=e[4];let w;e[5]!==d||e[6]!==h?(w={mutationFn:d,onSuccess:f,onError:h},e[5]=d,e[6]=h,e[7]=w):w=e[7];const c=Qe(w);let x;e[8]!==s||e[9]!==o?(x=s?n.jsx(at,{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(Et,{className:"h-6 w-6 text-primary"})}),e[8]=s,e[9]=o,e[10]=x):x=e[10];let g;e[11]!==o||e[12]!==i?(g=i("common.requestToJoinScreen.title",{orgName:o}),e[11]=o,e[12]=i,e[13]=g):g=e[13];let y;e[14]!==g?(y=n.jsx("h3",{className:"text-lg font-medium",children:g}),e[14]=g,e[15]=y):y=e[15];let l;e[16]!==a||e[17]!==i?(l=i("common.requestToJoinScreen.description",{domain:a}),e[16]=a,e[17]=i,e[18]=l):l=e[18];let u;e[19]!==l?(u=n.jsx("p",{className:"text-sm text-muted-foreground",children:l}),e[19]=l,e[20]=u):u=e[20];let p;e[21]!==y||e[22]!==u?(p=n.jsxs("div",{className:"space-y-2",children:[y,u]}),e[21]=y,e[22]=u,e[23]=p):p=e[23];let b;e[24]!==c?(b=()=>c.mutate(),e[24]=c,e[25]=b):b=e[25];let S;e[26]!==c.isPending||e[27]!==i?(S=c.isPending?i("common.requestToJoinScreen.requesting"):i("common.requestToJoinScreen.requestButton"),e[26]=c.isPending,e[27]=i,e[28]=S):S=e[28];let v;e[29]!==c.isPending||e[30]!==b||e[31]!==S?(v=n.jsx(F,{onClick:b,disabled:c.isPending,children:S}),e[29]=c.isPending,e[30]=b,e[31]=S,e[32]=v):v=e[32];const N=c.isPending;let A;e[33]!==i?(A=i("common.goHome"),e[33]=i,e[34]=A):A=e[34];let _;e[35]!==c.isPending||e[36]!==A?(_=n.jsx(F,{variant:"ghost",onClick:ms,disabled:N,children:A}),e[35]=c.isPending,e[36]=A,e[37]=_):_=e[37];let j;e[38]!==v||e[39]!==_?(j=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[v,_]}),e[38]=v,e[39]=_,e[40]=j):j=e[40];let T;return e[41]!==p||e[42]!==j||e[43]!==x?(T=n.jsxs(he,{children:[x,p,j]}),e[41]=p,e[42]=j,e[43]=x,e[44]=T):T=e[44],T}function ms(){window.location.href="/"}function fs(t){if(t.alreadyMember&&t.slug){window.location.href=`/${t.slug}`;return}window.location.reload()}function hs(t){const e=M.c(7);let o;e[0]!==t?(o=Ue.orgAccessStatus(t),e[0]=t,e[1]=o):o=e[1];let r;e[2]!==t?(r=async()=>{const a=await fetch(`/api/auth/custom/org-access-status/${encodeURIComponent(t)}`,{credentials:"include"});if(!a.ok)throw new Error(`org-access-status failed (${a.status})`);return await a.json()},e[2]=t,e[3]=r):r=e[3];let s;return e[4]!==o||e[5]!==r?(s={queryKey:o,queryFn:r,refetchOnWindowFocus:!1},e[4]=o,e[5]=r,e[6]=s):s=e[6],Nt(s)}function gs({orgSlug:t}){const{data:e}=hs(t);if(e.status!=="member"){Wt()?.org===t&&Yt();const o=localStorage.getItem(Be.lastOrgSlug())===t;if(o&&localStorage.removeItem(Be.lastOrgSlug()),o&&(e.status==="not-found"||e.status==="no-access"))return window.location.href="/",null}return e.status==="not-found"?n.jsx(wt,{orgSlug:t,reason:"not-found"}):e.status==="pending-invite"?n.jsx(ls,{invitationId:e.invitation.id,orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo}):e.status==="auto-domain-join"?n.jsx(is,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="can-request"?n.jsx(us,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="request-pending"?n.jsx(cs,{orgName:e.organization.name,orgLogo:e.organization.logo}):e.status==="member"?(window.location.reload(),null):n.jsx(wt,{orgSlug:t,orgName:e.organization.name,reason:"no-access"})}function Rt(t){const e=M.c(42),{ariaLabel:o,dismissLabel:r,eyebrow:s,title:a,description:i,icon:d,children:f,footerLeading:h,actions:w,onDismiss:c,tone:x}=t,g=x===void 0?"neutral":x,y=h||w;let l;e[0]!==g?(l=g==="system"&&n.jsx("div",{className:"h-0.5 bg-special"}),e[0]=g,e[1]=l):l=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(Pn,{size:14}),e[2]=u):u=e[2];let p;e[3]!==r||e[4]!==c?(p=n.jsx(F,{size:"icon-sm",variant:"ghost","aria-label":r,className:"absolute right-2 top-2 z-10 text-muted-foreground",onClick:c,children:u}),e[3]=r,e[4]=c,e[5]=p):p=e[5];const b=d&&"flex items-start gap-3",S=f&&"pb-3";let v;e[6]!==b||e[7]!==S?(v=dt("p-4 pr-11",b,S),e[6]=b,e[7]=S,e[8]=v):v=e[8];let N;e[9]!==d?(N=d&&n.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-special/10 text-special",children:d}),e[9]=d,e[10]=N):N=e[10];let A;e[11]!==s?(A=s&&n.jsx("p",{className:"text-xs text-muted-foreground",children:s}),e[11]=s,e[12]=A):A=e[12];let _;e[13]!==a?(_=n.jsx("h3",{className:"text-base font-semibold text-foreground",children:a}),e[13]=a,e[14]=_):_=e[14];let j;e[15]!==i?(j=i&&n.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:i}),e[15]=i,e[16]=j):j=e[16];let T;e[17]!==_||e[18]!==j||e[19]!==A?(T=n.jsxs("div",{children:[A,_,j]}),e[17]=_,e[18]=j,e[19]=A,e[20]=T):T=e[20];let k;e[21]!==f?(k=f&&n.jsx("div",{className:"mt-3",children:f}),e[21]=f,e[22]=k):k=e[22];let m;e[23]!==T||e[24]!==k?(m=n.jsxs("div",{className:"min-w-0 flex-1",children:[T,k]}),e[23]=T,e[24]=k,e[25]=m):m=e[25];let P;e[26]!==m||e[27]!==v||e[28]!==N?(P=n.jsxs("div",{className:v,children:[N,m]}),e[26]=m,e[27]=v,e[28]=N,e[29]=P):P=e[29];let O;e[30]!==w||e[31]!==h||e[32]!==y||e[33]!==g?(O=y&&n.jsxs("div",{className:dt("flex items-center justify-between gap-3 px-4 py-2.5",g==="system"?"border-t border-border bg-muted/50":"pt-0"),children:[n.jsx("div",{className:"min-w-0 text-xs text-muted-foreground",children:h}),n.jsx("div",{className:"flex shrink-0 items-center gap-2",children:w})]}),e[30]=w,e[31]=h,e[32]=y,e[33]=g,e[34]=O):O=e[34];let C;return e[35]!==o||e[36]!==P||e[37]!==O||e[38]!==l||e[39]!==p||e[40]!==g?(C=n.jsxs("div",{role:"dialog","aria-label":o,"data-slot":"announcement-card","data-tone":g,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:[l,p,P,O]}),e[35]=o,e[36]=P,e[37]=O,e[38]=l,e[39]=p,e[40]=g,e[41]=C):C=e[41],C}const ps={switcher:"tour-layout-switcher",nav:"tour-layout-nav",tasks:"tour-layout-tasks",projects:"tour-layout-projects",account:"tour-layout-account",recentActivity:"tour-layout-recent-activity",siteEditor:"tour-layout-site-editor",surfaceTabs:"tour-layout-surface-tabs",branchPicker:"tour-layout-branch-picker",automations:"tour-layout-automations",settings:"tour-layout-settings"};function Mt(t){return`[data-tour="${ps[t]}"]`}const ys=[{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 bs(t){return ys.filter(e=>e.scope==="shell"||e.scope==="orgHome"&&t.onOrgHome||e.scope==="project"&&t.inProject||e.scope==="siteEditor"&&t.onSiteEditor)}function xs(t,e){return bs(e).map(o=>({element:Mt(o.anchor),popover:{title:t(o.titleKey),description:t(o.descKey),side:o.side,align:"center"}}))}const ws=Mt("switcher"),Ss=30;function Ft(t){const e=document.querySelector(t);return e instanceof HTMLElement&&e.offsetParent!==null}function vs(t,e){return xs(t,e).filter(o=>typeof o.element=="string"&&Ft(o.element))}function js(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:r})=>{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",()=>r.destroy()),o.footerButtons.insertBefore(s,o.footerButtons.firstChild)},onDestroyed:()=>{Ve=!1},steps:e}}let Ve=!1;async function ks(){return(await Qt(()=>import("./driver.js-Dj4CfABu.js"),[])).driver}function Ts(t,e){if(Ve)return;Ve=!0;let o=0;const r=()=>{if(!Ft(ws)&&o++<Ss){requestAnimationFrame(r);return}const s=vs(t,e);if(s.length===0){Ve=!1;return}ks().then(a=>{a(js(t,s)).drive()}).catch(()=>{Ve=!1})};r()}function Ns(t){return t!=="off"}function ci(t){if(!t.hasSource)return[];const e=["site-editor"];return Ns(t.cmsMode)&&e.push("content"),t.runtime==="sandbox"&&e.push("code"),e}function zt(t){return t==="site-editor"||t==="content"||t==="code"||t.startsWith("code:")}function di(t){return t.reportsOnly&&!t.onReportAgent&&zt(t.tabId)}const _s=[{id:"new-layout",date:"2026-09-22",eyebrow:"Now Available",title:"New Layout",bullets:[{icon:ot,title:"Unified page headers",body:"Every page now has a clear header with navigation breadcrumbs and actions, making it easy to orient yourself and move around."},{icon:ct,title:"Consistent navigation and controls",body:"Settings and project pages use a predictable sidebar instead of scattered tabs. Buttons, inputs and toolbars share one shape and one height, and the layout adapts to smaller screens."},{icon:Sn,title:"Site editor redesigned",body:"Try the redesigned blocks editor from Profile & Preferences. Blocks share consistent actions, variants appear beside their block in the header, and section selection is searchable."}],cta:{label:"Take a tour",action:"start-tour"}},{id:"unified-workspace-layout",date:"2026-09-01",eyebrow:"Now Available",title:"A new way around Studio",bullets:[{icon:pt,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:ie,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:ot,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:ot,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:le,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:ce,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:ce,title:"Faster CMS previews",body:"Every draft gets its own git worktree on your machine, so previews render instantly as you edit."},{icon:ie,title:"Native Claude Code & Codex support",body:"State-of-the-art coding agents, running natively against your local files."},{icon:Xt,title:"Boosted performance",body:"Entirely rewritten in Rust with a smaller memory footprint than the Bun-based runtime — fast even on modest machines."},{icon:ot,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:ie,title:"Sol leads Thinking",body:"Codex Thinking now defaults to `gpt-5.6-sol` for deeper coding and reasoning work."},{icon:le,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:ce,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:ie,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:le,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:ce,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:le,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:ie,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:ce,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:ie,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:le,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:ce,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:ie,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:le,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:ce,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:ie,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:le,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:pt,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:ce,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:le,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:ie,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:ie,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:vn,title:"Unified inbox",body:"Org invitations and product updates now share one chronological feed in the sidebar."}]}],qt=_s,it="studio.release-feed.v1",mt=new Set;let me="",fe={},ft=!1;function As(){if(ft)return me||"{}";try{return localStorage.getItem(it)??"{}"}catch{return me||"{}"}}function Bt(t){try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function St(){const t=As();return t!==me&&(me=t,fe=Bt(t)),fe}function Ps(t){mt.add(t);const e=o=>{if(!(o.key!==it&&o.key!==null)){try{const r=localStorage.getItem(it)??"{}",a={...Bt(r),...fe};fe=a,me=JSON.stringify(a)}catch{}t()}};return window.addEventListener("storage",e),()=>{mt.delete(t),window.removeEventListener("storage",e)}}function Cs(t){fe=t,me=JSON.stringify(t);try{localStorage.setItem(it,me),ft=!1}catch{ft=!0}mt.forEach(e=>e())}function Es(){const t=M.c(7),e=J.useSyncExternalStore(Ps,St,St);let o;t[0]!==e?(o=f=>!!e[f],t[0]=e,t[1]=o):o=t[1];const r=o,s=Os;let a;t[2]!==e?(a=qt.reduce((f,h)=>e[h.id]?f:f+1,0),t[2]=e,t[3]=a):a=t[3];const i=a;let d;return t[4]!==r||t[5]!==i?(d={isSeen:r,markSeen:s,unseenCount:i},t[4]=r,t[5]=i,t[6]=d):d=t[6],d}function Os(t){fe[t]||Cs({...fe,[t]:{seenAt:new Date().toISOString()}})}const Is=720*60*60*1e3,Ls=10080*60*1e3;function $s(t){const[e,o,r]=t.split("-").map(Number);return!e||!o||!r?new Date(t).getTime():new Date(e,o-1,r).getTime()}function Ds(t){const e=qt[0];if(!e)return null;const o=$s(e.date),r=t-o;return r<0||r>Is?null:e}function Rs(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 Ms(t,e){const o=Rs(t);return o===null?!1:e-o>=Ls}function Fs(){const t=M.c(53),e=V(),o=En(),r=Zt(),s=Ot(),a=!!o,i=r===re.home&&!o;let d;t[0]!==s||t[1]!==a?(d=a&&!!s&&zt(s),t[0]=s,t[1]=a,t[2]=d):d=t[2];const f=d,{data:h}=Ke.useSession(),{isSeen:w,markSeen:c}=Es(),[x,g]=J.useState(!1),y=Ln(6e4);let l,u,p;if(t[3]!==w||t[4]!==y||t[5]!==h?.user?.createdAt){p=Symbol.for("react.early_return_sentinel");e:{if(l=Ds(y),!l){p=null;break e}if(!Ms(h?.user?.createdAt,y)){p=null;break e}u=w(l.id)}t[3]=w,t[4]=y,t[5]=h?.user?.createdAt,t[6]=l,t[7]=u,t[8]=p}else l=t[6],u=t[7],p=t[8];if(p!==Symbol.for("react.early_return_sentinel"))return p;if(u)return null;let b;t[9]!==l.id||t[10]!==a||t[11]!==c||t[12]!==i||t[13]!==f||t[14]!==e?(b=()=>{c(l.id),Ts(e,{onOrgHome:i,inProject:a,onSiteEditor:f})},t[9]=l.id,t[10]=a,t[11]=c,t[12]=i,t[13]=f,t[14]=e,t[15]=b):b=t[15];const S=b;let v;t[16]!==e?(v=e("announcements.release.ariaLabel"),t[16]=e,t[17]=v):v=t[17];let N;t[18]!==e?(N=e("announcements.release.dismiss"),t[18]=e,t[19]=N):N=t[19];const A=l.eyebrow,_=l.title;let j;t[20]!==l.id||t[21]!==c?(j=()=>c(l.id),t[20]=l.id,t[21]=c,t[22]=j):j=t[22];let T;t[23]!==l.id||t[24]!==l.learnMoreHref||t[25]!==c||t[26]!==e?(T=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[23]=l.id,t[24]=l.learnMoreHref,t[25]=c,t[26]=e,t[27]=T):T=t[27];let k;t[28]!==l.cta||t[29]!==l.id||t[30]!==c||t[31]!==S?(k=l.cta?"href"in l.cta?n.jsx(F,{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(F,{size:"sm",onClick:S,children:l.cta.label}):n.jsx(F,{size:"sm",onClick:()=>g(!0),children:l.cta.label}):null,t[28]=l.cta,t[29]=l.id,t[30]=c,t[31]=S,t[32]=k):k=t[32];let m;t[33]!==l.bullets?(m=l.bullets.map(zs),t[33]=l.bullets,t[34]=m):m=t[34];let P;t[35]!==m?(P=n.jsx("ul",{className:"flex flex-col gap-3",children:m}),t[35]=m,t[36]=P):P=t[36];let O;t[37]!==l.id||t[38]!==c?(O=E=>{g(E),E||c(l.id)},t[37]=l.id,t[38]=c,t[39]=O):O=t[39];let C;t[40]!==x||t[41]!==O?(C=n.jsx(Cn,{open:x,onOpenChange:O}),t[40]=x,t[41]=O,t[42]=C):C=t[42];let I;return t[43]!==l.eyebrow||t[44]!==l.title||t[45]!==k||t[46]!==P||t[47]!==C||t[48]!==v||t[49]!==N||t[50]!==j||t[51]!==T?(I=n.jsxs(Rt,{ariaLabel:v,dismissLabel:N,eyebrow:A,title:_,onDismiss:j,footerLeading:T,actions:k,children:[P,C]}),t[43]=l.eyebrow,t[44]=l.title,t[45]=k,t[46]=P,t[47]=C,t[48]=v,t[49]=N,t[50]=j,t[51]=T,t[52]=I):I=t[52],I}function zs(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 Kt=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform),ue=Kt?"⌘":"Ctrl",G={commandPalette:{keys:[ue,"K"],description:"Command palette"},keyboardShortcuts:{keys:["?"],description:"Keyboard shortcuts"},back:{keys:[ue,"["],description:"Back to previous"},focusChatInput:{keys:[ue,"L"],description:"Focus chat input"},saveAndFormat:{keys:[ue,"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:[ue,"Enter"],description:"Apply filter"},togglePlanMode:{keys:[ue,"Shift","L"],description:"Toggle plan mode"},newTask:{keys:["Shift",ue,"S"],description:"New task"},toggleDaemon:{keys:[ue,"D"],description:"Toggle daemon logs"}},qs=[{label:"General",shortcuts:[G.commandPalette,G.keyboardShortcuts,G.back,G.newTask,G.toggleDaemon]},{label:"Editor",shortcuts:[G.saveAndFormat]},{label:"Chat",shortcuts:[G.focusChatInput,G.togglePlanMode,G.sendMessage,G.newLine]},{label:"Questions",shortcuts:[G.selectOption]},{label:"Monitoring",shortcuts:[G.applyFilter]}];function vt(t){return Kt?t.metaKey:t.ctrlKey}function Bs(t){if(!(t instanceof HTMLElement))return!1;if(t.isContentEditable)return!0;const e=t.tagName;return e==="INPUT"||e==="TEXTAREA"||e==="SELECT"}function Ks(t){const e=M.c(11),{open:o,onOpenChange:r}=t,s=V();let a;e[0]!==s?(a=s("common.keyboardShortcutsDialog.title"),e[0]=s,e[1]=a):a=e[1];let i;e[2]!==a?(i=n.jsx(It,{children:n.jsx(Lt,{children:a})}),e[2]=a,e[3]=i):i=e[3];let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx("div",{className:"flex flex-col gap-4",children:qs.map(Hs)}),e[4]=d):d=e[4];let f;e[5]!==i?(f=n.jsxs($t,{className:"sm:max-w-md",children:[i,d]}),e[5]=i,e[6]=f):f=e[6];let h;return e[7]!==r||e[8]!==o||e[9]!==f?(h=n.jsx(Dt,{open:o,onOpenChange:r,children:f}),e[7]=r,e[8]=o,e[9]=f,e[10]=h):h=e[10],h}function Hs(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(Us)})]},t.label)}function Us(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(Gs)})]},t.description)}function Gs(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 jt=8;function Js(t){const{org:e}=ht(),o=Hn({connectionId:At,orgId:e.id,orgSlug:e.slug}),{data:r}=He({queryKey:Ue.globalSearch(e.id,t,jt),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:jt}})).structuredContent?.items??[]}catch{return[]}}});return r??[]}function Vs(t){const e=M.c(195),{open:o,onOpenChange:r}=t,s=V(),a=_t(),{org:i}=ht(),{projects:d,hasProjects:f}=On(),[h,w]=J.useState(""),c=J.useDeferredValue(h),x=Js(c);let g;e[0]!==r?(g=()=>{r(!1),w("")},e[0]=r,e[1]=g):g=e[1];const y=g;let l;e[2]!==y?(l=(q,Y)=>{ut("command_palette_used",{kind:Y}),q(),y()},e[2]=y,e[3]=l):l=e[3];const u=l;let p;e[4]!==a||e[5]!==i.id||e[6]!==i.slug?(p=q=>{if(q.type==="connection"){if(!q.slug){a({to:"/$org/settings/connections",params:{org:i.slug},search:{tab:"all"}});return}a({to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:q.slug}});return}if(q.type==="task"){a({to:re.tasks,params:{org:i.slug,taskKey:q.key??void 0}});return}const Y=Pt(i.id).id;en(a,tn({org:i.slug,agentId:q.virtual_mcp_id??Y,superAgentId:Y}),{search:()=>({thread:q.id}),replace:!1})},e[4]=a,e[5]=i.id,e[6]=i.slug,e[7]=p):p=e[7];const b=p;let S;e[8]!==h?(S=[h],e[8]=h,e[9]=S):S=e[9];const v=S;let N,A,_,j,T,k,m,P,O,C,I,E,R;if(e[10]!==y||e[11]!==u||e[12]!==f||e[13]!==x||e[14]!==a||e[15]!==r||e[16]!==o||e[17]!==b||e[18]!==i.slug||e[19]!==d||e[20]!==v||e[21]!==s||e[22]!==h){const q=x.filter(Ys),Y=x.filter(Ws);let Q;e[36]!==i.slug?(Q={org:i.slug},e[36]=i.slug,e[37]=Q):Q=e[37];const D=Q;let X;e[38]!==s?(X=s("sidebar.navDestinations.home"),e[38]=s,e[39]=X):X=e[39];let Ge;e[40]===Symbol.for("react.memo_cache_sentinel")?(Ge=n.jsx(kn,{"aria-hidden":"true"}),e[40]=Ge):Ge=e[40];let oe;e[41]!==D||e[42]!==X?(oe={key:"home",label:X,icon:Ge,to:re.home,params:D},e[41]=D,e[42]=X,e[43]=oe):oe=e[43];let K;e[44]!==s?(K=s("sidebar.navDestinations.reports"),e[44]=s,e[45]=K):K=e[45];let Z;e[46]===Symbol.for("react.memo_cache_sentinel")?(Z=n.jsx(Tn,{"aria-hidden":"true"}),e[46]=Z):Z=e[46];let ee;e[47]!==D||e[48]!==K?(ee={key:"reports",label:K,icon:Z,to:re.reports,params:D},e[47]=D,e[48]=K,e[49]=ee):ee=e[49];let te;e[50]!==s?(te=s("sidebar.navDestinations.tasks"),e[50]=s,e[51]=te):te=e[51];let ne;e[52]===Symbol.for("react.memo_cache_sentinel")?(ne=n.jsx(bt,{"aria-hidden":"true"}),e[52]=ne):ne=e[52];let H;e[53]!==i.slug?(H={org:i.slug,taskKey:void 0},e[53]=i.slug,e[54]=H):H=e[54];let U;e[55]!==te||e[56]!==H?(U={key:"tasks",label:te,icon:ne,to:re.tasks,params:H},e[55]=te,e[56]=H,e[57]=U):U=e[57];let se;e[58]!==s?(se=s("sidebar.navDestinations.library"),e[58]=s,e[59]=se):se=e[59];let ae;e[60]===Symbol.for("react.memo_cache_sentinel")?(ae=n.jsx(Nn,{"aria-hidden":"true"}),e[60]=ae):ae=e[60];let L;e[61]!==D||e[62]!==se?(L={key:"library",label:se,icon:ae,to:re.library,params:D},e[61]=D,e[62]=se,e[63]=L):L=e[63];let z;e[64]!==s?(z=s("sidebar.navDestinations.discover"),e[64]=s,e[65]=z):z=e[65];let Xe;e[66]===Symbol.for("react.memo_cache_sentinel")?(Xe=n.jsx(_n,{"aria-hidden":"true"}),e[66]=Xe):Xe=e[66];let ge;e[67]!==D||e[68]!==z?(ge={key:"discover",label:z,icon:Xe,to:re.discover,params:D},e[67]=D,e[68]=z,e[69]=ge):ge=e[69];let Ze;e[70]!==oe||e[71]!==ee||e[72]!==U||e[73]!==L||e[74]!==ge?(Ze=[oe,ee,U,L,ge],e[70]=oe,e[71]=ee,e[72]=U,e[73]=L,e[74]=ge,e[75]=Ze):Ze=e[75];const rt=Ze;A=Mn,j=o,e[76]!==y||e[77]!==r?(T=$=>$?r(!0):y(),e[76]=y,e[77]=r,e[78]=T):T=e[78],e[79]!==s?(k=s("commandPalette.title"),e[79]=s,e[80]=k):k=e[80],e[81]!==s?(m=s("commandPalette.description"),e[81]=s,e[82]=m):m=e[82];let pe;e[83]!==s?(pe=s("commandPalette.placeholder"),e[83]=s,e[84]=pe):pe=e[84];let ye;e[85]!==s?(ye=s("commandPalette.placeholder"),e[85]=s,e[86]=ye):ye=e[86],e[87]!==pe||e[88]!==ye||e[89]!==h?(P=n.jsx(Fn,{placeholder:pe,"aria-label":ye,value:h,onValueChange:w}),e[87]=pe,e[88]=ye,e[89]=h,e[90]=P):P=e[90],N=zn;let be;e[91]!==s?(be=s("commandPalette.empty"),e[91]=s,e[92]=be):be=e[92],e[93]!==be?(O=n.jsx(qn,{children:be}),e[93]=be,e[94]=O):O=e[94];let xe;e[95]!==s?(xe=s("commandPalette.goTo"),e[95]=s,e[96]=xe):xe=e[96];let we;e[97]!==rt||e[98]!==u||e[99]!==a?(we=rt.map($=>n.jsxs(de,{onSelect:()=>u(()=>a({to:$.to,params:$.params}),"destination"),children:[$.icon,n.jsx("span",{children:$.label})]},$.key)),e[97]=rt,e[98]=u,e[99]=a,e[100]=we):we=e[100],e[101]!==xe||e[102]!==we?(C=n.jsx(Je,{heading:xe,children:we}),e[101]=xe,e[102]=we,e[103]=C):C=e[103],e[104]!==u||e[105]!==f||e[106]!==a||e[107]!==i.slug||e[108]!==d||e[109]!==s?(I=f&&n.jsx(Je,{heading:s("commandPalette.projects"),children:d.map($=>n.jsxs(de,{value:`project ${$.title}`,onSelect:()=>u(()=>a({to:re.projects,params:{org:i.slug,agentId:$.id}}),"project"),children:[n.jsx(Kn,{icon:$.icon,name:$.title,"aria-hidden":"true"}),n.jsx("span",{children:$.title})]},$.id))}),e[104]=u,e[105]=f,e[106]=a,e[107]=i.slug,e[108]=d,e[109]=s,e[110]=I):I=e[110];let Se;e[111]!==s?(Se=s("commandPalette.actions"),e[111]=s,e[112]=Se):Se=e[112];let ve;e[113]!==s?(ve=s("commandPalette.newProject"),e[113]=s,e[114]=ve):ve=e[114];let je;e[115]!==u||e[116]!==a||e[117]!==D?(je=()=>u(()=>a({to:re.home,params:D}),"new_project"),e[115]=u,e[116]=a,e[117]=D,e[118]=je):je=e[118];let et;e[119]===Symbol.for("react.memo_cache_sentinel")?(et=n.jsx(xt,{"aria-hidden":"true"}),e[119]=et):et=e[119];let ke;e[120]!==s?(ke=s("commandPalette.newProject"),e[120]=s,e[121]=ke):ke=e[121];let Te;e[122]!==ke?(Te=n.jsx("span",{children:ke}),e[122]=ke,e[123]=Te):Te=e[123];let Ne;e[124]!==ve||e[125]!==je||e[126]!==Te?(Ne=n.jsxs(de,{value:ve,onSelect:je,children:[et,Te]}),e[124]=ve,e[125]=je,e[126]=Te,e[127]=Ne):Ne=e[127];let _e;e[128]!==s?(_e=s("commandPalette.inviteTeammate"),e[128]=s,e[129]=_e):_e=e[129];let Ae;e[130]!==u||e[131]!==a||e[132]!==D?(Ae=()=>u(()=>a({to:"/$org/settings/members",params:D}),"invite"),e[130]=u,e[131]=a,e[132]=D,e[133]=Ae):Ae=e[133];let tt;e[134]===Symbol.for("react.memo_cache_sentinel")?(tt=n.jsx(An,{"aria-hidden":"true"}),e[134]=tt):tt=e[134];let Pe;e[135]!==s?(Pe=s("commandPalette.inviteTeammate"),e[135]=s,e[136]=Pe):Pe=e[136];let Ce;e[137]!==Pe?(Ce=n.jsx("span",{children:Pe}),e[137]=Pe,e[138]=Ce):Ce=e[138];let Ee;e[139]!==_e||e[140]!==Ae||e[141]!==Ce?(Ee=n.jsxs(de,{value:_e,onSelect:Ae,children:[tt,Ce]}),e[139]=_e,e[140]=Ae,e[141]=Ce,e[142]=Ee):Ee=e[142];let Oe;e[143]!==s?(Oe=s("commandPalette.addConnection"),e[143]=s,e[144]=Oe):Oe=e[144];let Ie;e[145]!==u||e[146]!==a||e[147]!==D?(Ie=()=>u(()=>a({to:"/$org/settings/connections",params:D,search:{tab:"all"}}),"add_connection"),e[145]=u,e[146]=a,e[147]=D,e[148]=Ie):Ie=e[148];let nt;e[149]===Symbol.for("react.memo_cache_sentinel")?(nt=n.jsx(xt,{"aria-hidden":"true"}),e[149]=nt):nt=e[149];let Le;e[150]!==s?(Le=s("commandPalette.addConnection"),e[150]=s,e[151]=Le):Le=e[151];let $e;e[152]!==Le?($e=n.jsx("span",{children:Le}),e[152]=Le,e[153]=$e):$e=e[153];let De;e[154]!==Oe||e[155]!==Ie||e[156]!==$e?(De=n.jsxs(de,{value:Oe,onSelect:Ie,children:[nt,$e]}),e[154]=Oe,e[155]=Ie,e[156]=$e,e[157]=De):De=e[157];let Re;e[158]!==s?(Re=s("commandPalette.settings"),e[158]=s,e[159]=Re):Re=e[159];let Me;e[160]!==u||e[161]!==a||e[162]!==D?(Me=()=>u(()=>a({to:"/$org/settings/general",params:D}),"settings"),e[160]=u,e[161]=a,e[162]=D,e[163]=Me):Me=e[163];let st;e[164]===Symbol.for("react.memo_cache_sentinel")?(st=n.jsx(Rn,{"aria-hidden":"true"}),e[164]=st):st=e[164];let Fe;e[165]!==s?(Fe=s("commandPalette.settings"),e[165]=s,e[166]=Fe):Fe=e[166];let ze;e[167]!==Fe?(ze=n.jsx("span",{children:Fe}),e[167]=Fe,e[168]=ze):ze=e[168];let qe;e[169]!==Re||e[170]!==Me||e[171]!==ze?(qe=n.jsxs(de,{value:Re,onSelect:Me,children:[st,ze]}),e[169]=Re,e[170]=Me,e[171]=ze,e[172]=qe):qe=e[172],e[173]!==Se||e[174]!==Ne||e[175]!==Ee||e[176]!==De||e[177]!==qe?(E=n.jsxs(Je,{heading:Se,children:[Ne,Ee,De,qe]}),e[173]=Se,e[174]=Ne,e[175]=Ee,e[176]=De,e[177]=qe,e[178]=E):E=e[178],R=q.length>0&&n.jsx(Je,{heading:s("commandPalette.connections"),children:q.map($=>n.jsxs(de,{value:`${$.title} ${$.id}`,keywords:v,onSelect:()=>u(()=>b($),"connection"),children:[n.jsx(Bn,{icon:$.icon,name:$.title,size:"2xs","aria-hidden":"true"}),n.jsx("span",{className:"truncate",children:$.title})]},`connection:${$.id}`))}),_=Y.length>0&&n.jsx(Je,{heading:s("commandPalette.results"),children:Y.map($=>n.jsxs(de,{value:`${$.title} ${$.id}`,keywords:v,onSelect:()=>u(()=>b($),$.type),children:[$.type==="thread"?n.jsx(jn,{"aria-hidden":"true"}):n.jsx(bt,{"aria-hidden":"true"}),n.jsx("span",{className:"truncate",children:$.title}),$.type==="task"&&$.key&&n.jsx("span",{className:"ml-auto shrink-0 font-mono text-xs text-muted-foreground",children:$.key})]},`${$.type}:${$.id}`))}),e[10]=y,e[11]=u,e[12]=f,e[13]=x,e[14]=a,e[15]=r,e[16]=o,e[17]=b,e[18]=i.slug,e[19]=d,e[20]=v,e[21]=s,e[22]=h,e[23]=N,e[24]=A,e[25]=_,e[26]=j,e[27]=T,e[28]=k,e[29]=m,e[30]=P,e[31]=O,e[32]=C,e[33]=I,e[34]=E,e[35]=R}else N=e[23],A=e[24],_=e[25],j=e[26],T=e[27],k=e[28],m=e[29],P=e[30],O=e[31],C=e[32],I=e[33],E=e[34],R=e[35];let B;e[179]!==N||e[180]!==_||e[181]!==O||e[182]!==C||e[183]!==I||e[184]!==E||e[185]!==R?(B=n.jsxs(N,{children:[O,C,I,E,R,_]}),e[179]=N,e[180]=_,e[181]=O,e[182]=C,e[183]=I,e[184]=E,e[185]=R,e[186]=B):B=e[186];let W;return e[187]!==A||e[188]!==j||e[189]!==T||e[190]!==k||e[191]!==m||e[192]!==P||e[193]!==B?(W=n.jsxs(A,{open:j,onOpenChange:T,title:k,description:m,children:[P,B]}),e[187]=A,e[188]=j,e[189]=T,e[190]=k,e[191]=m,e[192]=P,e[193]=B,e[194]=W):W=e[194],W}function Ws(t){return t.type!=="connection"}function Ys(t){return t.type==="connection"}const Ye=new Wn(!1);function Qs(){Ye.set(!0)}function Xs(){Ye.set(!1)}function Zs(){const t=M.c(2),e=J.useSyncExternalStore(Ye.subscribe,Ye.get);let o;return t[0]!==e?(o=[e,Ye.set],t[0]=e,t[1]=o):o=t[1],o}const eo=300*1e3,to=2;function no(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 so(t,e){return t.count>=to&&t.version!==null&&t.version!==e}function oo(){const t=M.c(43),e=V(),o=Qn();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={mutationFn:ao},t[0]=r):r=t[0];const s=Qe(r);let a;t[1]===Symbol.for("react.memo_cache_sentinel")?(a={queryKey:Ue.appVersionCheck(),queryFn:io,refetchInterval:eo,refetchIntervalInBackground:!0,staleTime:0},t[1]=a):a=t[1];const{data:i,dataUpdatedAt:d}=He(a),[f,h]=J.useState(0);let w;t[2]===Symbol.for("react.memo_cache_sentinel")?(w={version:null,count:0},t[2]=w):w=t[2];const[c,x]=J.useState(w);d!==f&&(h(d),x(B=>no(B,i,"4.463.0")));const[g,y]=J.useState(null),l=o;let u;t[3]!==o||t[4]!==s?(u=()=>window.location.reload(),t[3]=o,t[4]=s,t[5]=u):u=t[5];const p=u,b="announcements.version.refresh";if(!so(c,g))return null;let S;t[6]!==e?(S=e("announcements.version.ariaLabel"),t[6]=e,t[7]=S):S=t[7];let v;t[8]!==e?(v=e("announcements.version.dismiss"),t[8]=e,t[9]=v):v=t[9];let N;t[10]!==e?(N=e("announcements.version.eyebrow"),t[10]=e,t[11]=N):N=t[11];let A;t[12]!==e?(A=e("announcements.version.title"),t[12]=e,t[13]=A):A=t[13];const _="announcements.version.description";let j;t[14]!==e||t[15]!==_?(j=e(_),t[14]=e,t[15]=_,t[16]=j):j=t[16];let T;t[17]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsx(yt,{size:16}),t[17]=T):T=t[17];let k;t[18]!==c.version?(k=()=>y(c.version),t[18]=c.version,t[19]=k):k=t[19];let m;t[20]!==e?(m=e("announcements.version.currentSession",{version:"4.463.0"}),t[20]=e,t[21]=m):m=t[21];let P;t[22]!==b||t[23]!==e?(P=e(b),t[22]=b,t[23]=e,t[24]=P):P=t[24];const O=l;let C;t[25]!==O?(C=dt(O),t[25]=O,t[26]=C):C=t[26];let I;t[27]!==C?(I=n.jsx(yt,{size:14,className:C}),t[27]=C,t[28]=I):I=t[28];let E;t[29]!==p||t[30]!==l||t[31]!==P||t[32]!==I?(E=n.jsxs(F,{size:"sm",disabled:l,onClick:p,children:[P,I]}),t[29]=p,t[30]=l,t[31]=P,t[32]=I,t[33]=E):E=t[33];let R;return t[34]!==k||t[35]!==m||t[36]!==E||t[37]!==S||t[38]!==v||t[39]!==N||t[40]!==A||t[41]!==j?(R=n.jsx(Rt,{ariaLabel:S,dismissLabel:v,eyebrow:N,title:A,description:j,icon:T,tone:"system",onDismiss:k,footerLeading:m,actions:E}),t[34]=k,t[35]=m,t[36]=E,t[37]=S,t[38]=v,t[39]=N,t[40]=A,t[41]=j,t[42]=R):R=t[42],R}async function io(){const t=await fetch("/api/config",{cache:"no-store"}),{config:e}=await t.json();return e.version}async function ao(){const t=await fetch("/_local/update/restart",{method:"POST"});if(!t.ok)throw new Error(`restart failed: ${t.status}`)}function ro(t){return{has(){try{return localStorage.getItem(t)==="1"}catch{return!1}},mark(){try{localStorage.setItem(t,"1")}catch{}}}}const lo=Date.parse("2026-07-21T00:00:00Z"),kt=t=>ro(Be.ptBrAnnouncementSeen(t));function co(){const t=M.c(35),e=V(),[o,r]=nn(),{data:s,isPending:a}=Ke.useSession(),i=s?.user,d=i?.id,f=i?.createdAt,h=f!=null&&new Date(f).getTime()<lo,w=sn()==="pt-BR",c=!a&&!!d&&h&&w&&o.language==="en"&&!kt(d).has(),[x,g]=J.useState(!1),[y,l]=J.useState(!1);!x&&!a&&(g(!0),c&&d&&(kt(d).mark(),r(mo),l(!0),ut("pt_br_auto_switch_shown")));let u;t[0]===Symbol.for("react.memo_cache_sentinel")?(u=W=>{ut("pt_br_auto_switch_closed",{action:W}),l(!1)},t[0]=u):u=t[0];const p=u;let b;t[1]!==r?(b=()=>{r(uo),p("switch-back")},t[1]=r,t[2]=b):b=t[2];const S=b;let v;t[3]===Symbol.for("react.memo_cache_sentinel")?(v=W=>!W&&p("dismiss"),t[3]=v):v=t[3];let N;t[4]===Symbol.for("react.memo_cache_sentinel")?(N=n.jsx("div",{className:"text-4xl","aria-hidden":"true",children:"🇧🇷"}),t[4]=N):N=t[4];let A;t[5]!==e?(A=e("announcements.ptBr.title"),t[5]=e,t[6]=A):A=t[6];let _;t[7]!==A?(_=n.jsx(Lt,{children:A}),t[7]=A,t[8]=_):_=t[8];let j;t[9]!==e?(j=e("announcements.ptBr.description"),t[9]=e,t[10]=j):j=t[10];let T;t[11]!==j?(T=n.jsx($n,{children:j}),t[11]=j,t[12]=T):T=t[12];let k;t[13]!==_||t[14]!==T?(k=n.jsxs(It,{children:[_,T]}),t[13]=_,t[14]=T,t[15]=k):k=t[15];let m;t[16]!==e?(m=e("announcements.ptBr.switchBack"),t[16]=e,t[17]=m):m=t[17];let P;t[18]!==S||t[19]!==m?(P=n.jsx(F,{variant:"outline",onClick:S,children:m}),t[18]=S,t[19]=m,t[20]=P):P=t[20];let O;t[21]===Symbol.for("react.memo_cache_sentinel")?(O=()=>p("ok"),t[21]=O):O=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(F,{onClick:O,children:C}),t[24]=C,t[25]=I):I=t[25];let E;t[26]!==P||t[27]!==I?(E=n.jsxs(Dn,{children:[P,I]}),t[26]=P,t[27]=I,t[28]=E):E=t[28];let R;t[29]!==E||t[30]!==k?(R=n.jsxs($t,{className:"sm:max-w-md",children:[N,k,E]}),t[29]=E,t[30]=k,t[31]=R):R=t[31];let B;return t[32]!==y||t[33]!==R?(B=n.jsx(Dt,{open:y,onOpenChange:v,children:R}),t[32]=y,t[33]=R,t[34]=B):B=t[34],B}function uo(t){return{...t,language:"en"}}function mo(t){return{...t,language:"pt-BR"}}function fo(t){const e=on(t);return typeof e=="string"?e:void 0}function ho(){return fo("experiment-pipeline-check"),null}function go(t){const e=M.c(1),{activeOrg:o}=t;if(!o)return null;an(o.id,{name:o.name??void 0,slug:o.slug??void 0}),rn();let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(ho,{}),e[0]=r):r=e[0],r}function po(t){const{prev:e,virtualMcpId:o,decopilotId:r,savedLayout:s,opts:a,autosendValue:i}=t,d={mainpanel:void 0};o?d.virtualmcpid=o:e.virtualmcpid&&(d.virtualmcpid=e.virtualmcpid);const f=typeof e.virtualmcpid=="string"?e.virtualmcpid:r,w=(o??f)!==f;let c,x;return a?.panel?x=a.panel:s?(x=s.tab,s.sidepanel!==void 0&&(c=s.sidepanel),s.mainpanel!==void 0&&(d.mainpanel=s.mainpanel)):!w&&e.tabId&&!ln(e.tabId)&&(x=e.tabId),c!==void 0&&(d.sidepanel=c),a?.autosend&&(d.autosend=i),{tabId:x,search:d}}const Ht="studio:thread-layout:v4",yo=50;function Ut(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 bo(t,e,o,r=yo){const s=t.filter(([a])=>a!==e);for(s.push([e,Ut(o)]);s.length>r;)s.shift();return s}function gt(){try{const t=sessionStorage.getItem(Ht);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 Gt(t){try{sessionStorage.setItem(Ht,JSON.stringify(t))}catch{}}function xo(t,e){t&&Gt(bo(gt(),t,e))}function wo(t){if(!t)return null;const e=gt().find(([o])=>o===t);return e?Ut(e[1]):null}function ui(t){if(!t)return;const e=gt(),o=e.filter(([r])=>r!==t);o.length!==e.length&&Gt(o)}function Jt(t){return{queryKey:Ue.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 mi(t){const e=M.c(10);let o;e[0]!==t?(o=Jt(t),e[0]=t,e[1]=o):o=e[1];const r=He(o);let s;e[2]!==r.data?.prompts?(s=r.data?.prompts??[],e[2]=r.data?.prompts,e[3]=s):s=e[3];let a;e[4]!==r.data?.tiles?(a=r.data?.tiles??[],e[4]=r.data?.tiles,e[5]=a):a=e[5];let i;return e[6]!==r.isLoading||e[7]!==s||e[8]!==a?(i={isLoading:r.isLoading,prompts:s,tiles:a},e[6]=r.isLoading,e[7]=s,e[8]=a,e[9]=i):i=e[9],i}function So(t){const e=M.c(31),{orgSlug:o,orgName:r,domain:s}=t,a=V();let i;e[0]!==o?(i=()=>{window.location.href=`/api/${encodeURIComponent(o)}/sso/authorize`},e[0]=o,e[1]=i):i=e[1];const d=i,f=vo;let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx("div",{className:"bg-primary/10 p-3 rounded-full","aria-hidden":"true",children:n.jsx(Tt,{className:"h-6 w-6 text-primary"})}),e[2]=h):h=e[2];let w;e[3]!==a?(w=a("common.ssoRequiredScreen.title"),e[3]=a,e[4]=w):w=e[4];let c;e[5]!==w?(c=n.jsx("h3",{className:"text-lg font-medium",children:w}),e[5]=w,e[6]=c):c=e[6];let x;e[7]!==s||e[8]!==r||e[9]!==a?(x=r?n.jsxs(n.Fragment,{children:[n.jsx("strong",{children:r})," ",a("common.ssoRequiredScreen.requiresSsoAuth"),s?` ${a("common.ssoRequiredScreen.via",{domain:s})}`:"","."]}):a("common.ssoRequiredScreen.orgRequiresSsoAuth"),e[7]=s,e[8]=r,e[9]=a,e[10]=x):x=e[10];let g;e[11]!==x?(g=n.jsx("p",{className:"text-sm text-muted-foreground",children:x}),e[11]=x,e[12]=g):g=e[12];let y;e[13]!==c||e[14]!==g?(y=n.jsxs("div",{className:"space-y-2",children:[c,g]}),e[13]=c,e[14]=g,e[15]=y):y=e[15];let l;e[16]!==a?(l=a("common.ssoRequiredScreen.signInWithSso"),e[16]=a,e[17]=l):l=e[17];let u;e[18]!==d||e[19]!==l?(u=n.jsx(F,{onClick:d,children:l}),e[18]=d,e[19]=l,e[20]=u):u=e[20];let p;e[21]!==a?(p=a("common.goBack"),e[21]=a,e[22]=p):p=e[22];let b;e[23]!==p?(b=n.jsx(F,{variant:"ghost",onClick:f,children:p}),e[23]=p,e[24]=b):b=e[24];let S;e[25]!==b||e[26]!==u?(S=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[u,b]}),e[25]=b,e[26]=u,e[27]=S):S=e[27];let v;return e[28]!==S||e[29]!==y?(v=n.jsxs(he,{children:[h,y,S]}),e[28]=S,e[29]=y,e[30]=v):v=e[30],v}function vo(){window.location.href="/"}function jo(t){const e=M.c(27),{notice:o,orgSlug:r}=t,s=V();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:n.jsx(cn,{className:"h-6 w-6 text-destructive"})}),e[0]=a):a=e[0];let i;e[1]!==o.title?(i=n.jsx("h3",{className:"text-lg font-medium",children:o.title}),e[1]=o.title,e[2]=i):i=e[2];let d;e[3]!==o.message?(d=n.jsx("p",{className:"text-sm text-muted-foreground whitespace-pre-line",children:o.message}),e[3]=o.message,e[4]=d):d=e[4];let f;e[5]!==i||e[6]!==d?(f=n.jsxs("div",{className:"space-y-2",children:[i,d]}),e[5]=i,e[6]=d,e[7]=f):f=e[7];let h;e[8]!==o.ctaLabel||e[9]!==o.ctaUrl?(h=o.ctaUrl&&o.ctaLabel?n.jsx(F,{asChild:!0,children:n.jsx("a",{href:o.ctaUrl,target:"_blank",rel:"noreferrer noopener",children:o.ctaLabel})}):null,e[8]=o.ctaLabel,e[9]=o.ctaUrl,e[10]=h):h=e[10];const w=`/${encodeURIComponent(r)}/settings/infra-billing`;let c;e[11]!==s?(c=s("common.blockedOrgScreen.goToBilling"),e[11]=s,e[12]=c):c=e[12];let x;e[13]!==w||e[14]!==c?(x=n.jsx(F,{variant:"outline",asChild:!0,children:n.jsx("a",{href:w,children:c})}),e[13]=w,e[14]=c,e[15]=x):x=e[15];let g;e[16]!==s?(g=s("common.blockedOrgScreen.switchOrg"),e[16]=s,e[17]=g):g=e[17];let y;e[18]!==g?(y=n.jsx(F,{variant:"ghost",asChild:!0,children:n.jsx("a",{href:"/",children:g})}),e[18]=g,e[19]=y):y=e[19];let l;e[20]!==y||e[21]!==h||e[22]!==x?(l=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[h,x,y]}),e[20]=y,e[21]=h,e[22]=x,e[23]=l):l=e[23];let u;return e[24]!==l||e[25]!==f?(u=n.jsxs(he,{children:[a,f,l]}),e[24]=l,e[25]=f,e[26]=u):u=e[26],u}function ko(t){const e=M.c(8);let o;e[0]!==t?(o=Ue.orgNotice(t??""),e[0]=t,e[1]=o):o=e[1];let r;e[2]!==t?(r=async()=>{const i=await fetch(`/api/${t}/notice`,{credentials:"include"});return i.ok?(await i.json()).notice??null:null},e[2]=t,e[3]=r):r=e[3];const s=!!t;let a;return e[4]!==o||e[5]!==r||e[6]!==s?(a={queryKey:o,queryFn:r,enabled:s,staleTime:6e4},e[4]=o,e[5]=r,e[6]=s,e[7]=a):a=e[7],He(a)}const To="/settings/infra-billing";function No(t){return(t.endsWith("/")?t.slice(0,-1):t).endsWith(To)}function _o(t){const e=M.c(7),{org:o,children:r}=t;let s;e[0]!==o.id||e[1]!==o.name?(s={id:o.id,organizationId:o.id,slug:"_org",name:o.name,ui:null},e[0]=o.id,e[1]=o.name,e[2]=s):s=e[2];const a=s;let i;return e[3]!==r||e[4]!==o||e[5]!==a?(i=n.jsx(yn,{org:o,project:a,children:r}),e[3]=r,e[4]=o,e[5]=a,e[6]=i):i=e[6],i}function Ao(){const t=_t(),e=Yn(),{org:o}=ht(),r=dn({strict:!1}),s=Ot(),{openPanel:a,closePanel:i}=In(),d=es(),f=ts(),h=ns(),w=ss(),c=(l,u=!0)=>t({to:".",search:l,replace:u}),x=()=>c(l=>({...l,sidepanel:!0})),g=(l,u,p)=>{const b=!!f&&f===l;f&&!b&&xo(f,{tab:s,mainpanel:r.mainpanel,sidepanel:r.sidepanel});const S=b?null:wo(l),v=Pt(o.id).id,N=po({prev:{virtualmcpid:d,tabId:s},virtualMcpId:u,decopilotId:v,savedLayout:S,opts:p,autosendValue:Zn});return w(l,()=>N.search,{virtualMcpId:u,view:{tabId:N.tabId}})};return{openSidePanel:x,setTaskId:g,createNewTask:async(l,u,p)=>{const b=crypto.randomUUID(),S=l??h;try{await e?.create({id:b,virtual_mcp_id:S,...u?{branch:u}:{}})}catch{}g(b,S,p)},openTab:a,closeTab:i}}const Po=new Set(["/$org/","/$org/home"]);function Co(){const t=M.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e={select:Eo},t[0]=e):e=t[0],Ct(e)}function Eo(t){const e=t.matches.at(-1)?.fullPath;return e!==void 0&&Po.has(e)}function Oo(){const t=M.c(63);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org",shouldThrow:!1},t[0]=e):e=t[0];const r=un(e)?.params.org,[s,a]=J.useState(!1),[i,d]=Zs(),[f,h]=Gn(),w=mn(),c=Co(),x=r??"";let g;t[1]!==x?(g=Jt(x),t[1]=x,t[2]=g):g=t[2];const y=!!r&&c;let l;t[3]!==g||t[4]!==y?(l={...g,enabled:y},t[3]=g,t[4]=y,t[5]=l):l=t[5],He(l);const{data:u}=Ke.useSession(),p=u?.user?.id;let b;t[6]!==r||t[7]!==p?(b=r&&p?fn(p,r):null,t[6]=r,t[7]=p,t[8]=b):b=t[8];const S=b;let v,N;t[9]!==w?(v=()=>{const L=z=>{if(vt(z)&&z.code==="KeyK"){z.preventDefault(),Qs();return}if(z.key==="?"&&!Bs(z.target)){z.preventDefault(),a(!0);return}vt(z)&&z.code==="BracketLeft"&&w.history.canGoBack()&&(z.preventDefault(),w.history.back())};return document.addEventListener("keydown",L),()=>document.removeEventListener("keydown",L)},N=[w],t[9]=w,t[10]=v,t[11]=N):(v=t[10],N=t[11]),J.useEffect(v,N);let A;t[12]!==r?(A=Ue.activeOrganization(r),t[12]=r,t[13]=A):A=t[13];let _;t[14]!==r||t[15]!==p?(_=async()=>{if(!r)return null;performance.mark("mesh:active-org-fetch:start");const{data:L}=await Ke.organization.getFullOrganization({query:{organizationSlug:r}}).finally(Lo),z=lt(L);return L&&!z&&localStorage.setItem(Be.lastOrgSlug(),r),p&&L&&gn(p,r,L),L},t[14]=r,t[15]=p,t[16]=_):_=t[16];const j=S?S.data:void 0,T=S?.updatedAt;let k;t[17]!==j||t[18]!==T||t[19]!==A||t[20]!==_?(k={queryKey:A,queryFn:_,initialData:j,initialDataUpdatedAt:T,gcTime:1/0,refetchOnWindowFocus:!1},t[17]=j,t[18]=T,t[19]=A,t[20]=_,t[21]=k):k=t[21];const{data:m}=Nt(k),P=m?.id,O=m?.slug,{data:C}=os(P,O),I=!!C?.ssoRequired&&!C.authenticated,{data:E}=ko(O);let R;t[22]===Symbol.for("react.memo_cache_sentinel")?(R={select:Io},t[22]=R):R=t[22];const B=Ct(R),W=E?.severity==="block"&&!No(B),q=P??"",Y=O??"";let Q;t[23]!==q||t[24]!==Y?(Q=Un({connectionId:At,orgId:q,orgSlug:Y}),t[23]=q,t[24]=Y,t[25]=Q):Q=t[25];const D=!!P&&!!O;let X;if(t[26]!==Q||t[27]!==D?(X={...Q,enabled:D},t[26]=Q,t[27]=D,t[28]=X):X=t[28],He(X),(!m||lt(m)||I||W)&&Xs(),!m){let L;return t[29]!==r?(L=n.jsx(gs,{orgSlug:r}),t[29]=r,t[30]=L):L=t[30],L}if(lt(m)){localStorage.getItem(Be.lastOrgSlug())===r&&localStorage.removeItem(Be.lastOrgSlug());let L;return t[31]!==m.name?(L=n.jsx(hn,{orgName:m.name}),t[31]=m.name,t[32]=L):L=t[32],L}if(W&&E){let L;return t[33]!==m.slug||t[34]!==E?(L=n.jsx(jo,{notice:E,orgSlug:m.slug}),t[33]=m.slug,t[34]=E,t[35]=L):L=t[35],L}if(I){let L;return t[36]!==m.id||t[37]!==m.name||t[38]!==m.slug||t[39]!==C.domain?(L=n.jsx(So,{orgId:m.id,orgSlug:m.slug,orgName:m.name,domain:C.domain}),t[36]=m.id,t[37]=m.name,t[38]=m.slug,t[39]=C.domain,t[40]=L):L=t[40],L}const oe=m.logo??null;let K;t[41]!==m||t[42]!==oe?(K={...m,logo:oe},t[41]=m,t[42]=oe,t[43]=K):K=t[43];let Z;t[44]!==m?(Z=n.jsx(go,{activeOrg:m}),t[44]=m,t[45]=Z):Z=t[45];let ee;t[46]===Symbol.for("react.memo_cache_sentinel")?(ee=n.jsx(pn,{}),t[46]=ee):ee=t[46];let te;t[47]===Symbol.for("react.memo_cache_sentinel")?(te=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(Fs,{}),n.jsx(oo,{})]}),t[47]=te):te=t[47];let ne;t[48]!==i||t[49]!==d?(ne=i&&n.jsx(Vs,{open:i,onOpenChange:d}),t[48]=i,t[49]=d,t[50]=ne):ne=t[50];let H;t[51]!==f||t[52]!==h?(H=f&&n.jsx(Jn,{open:!0,onOpenChange:h,source:Vn()}),t[51]=f,t[52]=h,t[53]=H):H=t[53];let U;t[54]!==s?(U=n.jsx(Ks,{open:s,onOpenChange:a}),t[54]=s,t[55]=U):U=t[55];let se;t[56]===Symbol.for("react.memo_cache_sentinel")?(se=n.jsx(co,{}),t[56]=se):se=t[56];let ae;return t[57]!==K||t[58]!==Z||t[59]!==ne||t[60]!==H||t[61]!==U?(ae=n.jsxs(_o,{org:K,children:[Z,ee,te,ne,H,U,se]}),t[57]=K,t[58]=Z,t[59]=ne,t[60]=H,t[61]=U,t[62]=ae):ae=t[62],ae}function Io(t){return t.location.pathname}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 $o(){const t=M.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Xn,{children:n.jsx(Oo,{})}),t[0]=e):e=t[0],e}const fi=Object.freeze(Object.defineProperty({__proto__:null,default:$o,usePanelActions:Ao},Symbol.toStringTag,{value:"Module"}));export{G as K,ps as L,Ao as a,vt as b,Ns as c,Bs as d,mi as e,ui as f,fi as g,zt as i,Qs as o,ci as r,di as s,ko as u};
|
|
1
|
+
import{c as M,b as V,e as Qe,j as n,B as F,t as We,bP as he,a7 as Tt,a as Ke,y as Vt,D as Nt,K as Ue,bQ as Wt,bR as Yt,V as Be,l as dt,aL as Qt,p as pt,bS as Xt,r as J,a4 as Zt,a6 as re,d as _t,X as ht,z as At,m as He,q as ut,ay as Pt,bT as en,aE as tn,aJ as yt,x as nn,bU as sn,bV as on,bW as an,bX as rn,bY as ln,Z as cn,u as dn,_ as un,bZ as mn,b_ as fn,k as Ct,b$ as lt,c0 as hn,c1 as gn,O as pn,c2 as yn}from"./index-Dp_K-tWq.js";import{A as at}from"./avatar-D8csOeeF.js";import{t as Et}from"./Building02-CEVEDOME.js";import{i as bn}from"./UserSquare-DeLx8WzD.js";import{at as xn,K as wn,B as ct,a6 as Sn,X as ie,E as vn,au as jn,n as bt,g as kn,m as Tn,h as Nn,av as _n,j as An}from"./agent-icon-CbXn8VZK.js";import{s as Pn}from"./XClose-BpmmlEY3.js";import{D as Cn}from"./download-app-dialog-CddOOzn5.js";import{a as En,u as On}from"./use-project-scope-Bc3Mf8u8.js";import{u as Ot,a as In}from"./use-panel-navigate-f5p30JNB.js";import{i as le}from"./CheckCircle-DpemfJ5S.js";import{i as ot}from"./Monitor01-DO03hBU2.js";import{i as ce}from"./ZoomOut-C7AJpRh5.js";import{u as Ln}from"./use-clock-tick-B9pwHzMq.js";import{c as It,d as Lt,b as $t,D as Dt,h as $n,e as Dn}from"./dialog-Cx4yDOtp.js";import{s as xt}from"./Plus-DLW5olp7.js";import{a as Rn}from"./Tool01-3oVxsToy.js";import{b as de,e as Je,d as Mn,C as Fn,c as zn,a as qn}from"./command-H0OtsxUs.js";import{I as Bn}from"./integration-icon-C4a6DmNa.js";import{P as Kn}from"./project-icon-TzEHFIiY.js";import{a as Hn,m as Un}from"./use-mcp-client-BUFdpLoI.js";import{u as Gn,a as Jn,n as Vn}from"./new-project-dialog-BrBcYgwV.js";import{S as Wn,u as Yn}from"./thread-intent-CQTmnksY.js";import{u as Qn}from"./use-is-desktop-app-BNujXJc_.js";import{R as Xn}from"./required-auth-layout-Cketary5.js";import{A as Zn}from"./autosend-05UC4VjF.js";import{u as es,a as ts,b as ns,c as ss}from"./thread-route-DDpItDrx.js";import{u as os}from"./use-org-sso-BeqR2AAG.js";function is(t){const e=M.c(49),{orgName:o,orgSlug:r,orgLogo:s,domain:a}=t,i=V();let d;e[0]!==r||e[1]!==i?(d=async()=>{const m=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:r})}),P=await m.json();if(!m.ok||!P.success)throw new Error(P.error??i("common.autoDomainJoinScreen.joinError"));return P},e[0]=r,e[1]=i,e[2]=d):d=e[2];let f;e[3]!==r?(f=m=>{window.location.href=`/${m.slug??r}`},e[3]=r,e[4]=f):f=e[4];let h;e[5]!==i?(h=m=>{We.error(m instanceof Error?m.message:i("common.autoDomainJoinScreen.joinError"))},e[5]=i,e[6]=h):h=e[6];let w;e[7]!==d||e[8]!==f||e[9]!==h?(w={mutationFn:d,onSuccess:f,onError:h},e[7]=d,e[8]=f,e[9]=h,e[10]=w):w=e[10];const c=Qe(w),x=as;let g;e[11]!==s||e[12]!==o?(g=s?n.jsx(at,{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(Et,{className:"h-6 w-6 text-primary"})}),e[11]=s,e[12]=o,e[13]=g):g=e[13];let y;e[14]!==o||e[15]!==i?(y=i("common.autoDomainJoinScreen.joinPrompt",{orgName:o}),e[14]=o,e[15]=i,e[16]=y):y=e[16];let l;e[17]!==y?(l=n.jsx("h3",{className:"text-lg font-medium",children:y}),e[17]=y,e[18]=l):l=e[18];let u;e[19]!==a||e[20]!==i?(u=i("common.autoDomainJoinScreen.joinDescription",{domain:a}),e[19]=a,e[20]=i,e[21]=u):u=e[21];let p;e[22]!==u?(p=n.jsx("p",{className:"text-sm text-muted-foreground",children:u}),e[22]=u,e[23]=p):p=e[23];let b;e[24]!==l||e[25]!==p?(b=n.jsxs("div",{className:"space-y-2",children:[l,p]}),e[24]=l,e[25]=p,e[26]=b):b=e[26];let S;e[27]!==c?(S=()=>c.mutate(),e[27]=c,e[28]=S):S=e[28];let v;e[29]!==c.isPending||e[30]!==o||e[31]!==i?(v=c.isPending?i("common.autoDomainJoinScreen.joining"):i("common.autoDomainJoinScreen.enterOrg",{orgName:o}),e[29]=c.isPending,e[30]=o,e[31]=i,e[32]=v):v=e[32];let N;e[33]!==c.isPending||e[34]!==S||e[35]!==v?(N=n.jsx(F,{onClick:S,disabled:c.isPending,children:v}),e[33]=c.isPending,e[34]=S,e[35]=v,e[36]=N):N=e[36];const A=c.isPending;let _;e[37]!==i?(_=i("common.goHome"),e[37]=i,e[38]=_):_=e[38];let j;e[39]!==c.isPending||e[40]!==_?(j=n.jsx(F,{variant:"ghost",onClick:x,disabled:A,children:_}),e[39]=c.isPending,e[40]=_,e[41]=j):j=e[41];let T;e[42]!==N||e[43]!==j?(T=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[N,j]}),e[42]=N,e[43]=j,e[44]=T):T=e[44];let k;return e[45]!==b||e[46]!==T||e[47]!==g?(k=n.jsxs(he,{children:[g,b,T]}),e[45]=b,e[46]=T,e[47]=g,e[48]=k):k=e[48],k}function as(){window.location.href="/"}function wt(t){const e=M.c(25),{orgSlug:o,orgName:r,reason:s}=t,a=V(),i=rs,d=s==="not-found",f=d?bn:Tt;let h;e[0]!==d||e[1]!==a?(h=a(d?"common.noAccessScreen.organizationNotFound":"common.noAccessScreen.noAccess"),e[0]=d,e[1]=a,e[2]=h):h=e[2];const w=h;let c;e[3]!==d||e[4]!==r||e[5]!==o||e[6]!==a?(c=d?n.jsxs(n.Fragment,{children:[a("common.noAccessScreen.couldNotFind")," ",n.jsx("strong",{children:o}),"."]}):n.jsxs(n.Fragment,{children:[a("common.noAccessScreen.noAccessTo")," ",n.jsx("strong",{children:r??o}),".",n.jsx("br",{}),a("common.noAccessScreen.askAdminToInvite")]}),e[3]=d,e[4]=r,e[5]=o,e[6]=a,e[7]=c):c=e[7];const x=c;let g;e[8]!==f?(g=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]=g):g=e[9];let y;e[10]!==w?(y=n.jsx("h3",{className:"text-lg font-medium",children:w}),e[10]=w,e[11]=y):y=e[11];let l;e[12]!==x?(l=n.jsx("p",{className:"text-sm text-muted-foreground",children:x}),e[12]=x,e[13]=l):l=e[13];let u;e[14]!==y||e[15]!==l?(u=n.jsxs("div",{className:"space-y-2",children:[y,l]}),e[14]=y,e[15]=l,e[16]=u):u=e[16];let p;e[17]!==a?(p=a("common.goHome"),e[17]=a,e[18]=p):p=e[18];let b;e[19]!==p?(b=n.jsx(F,{onClick:i,children:p}),e[19]=p,e[20]=b):b=e[20];let S;return e[21]!==g||e[22]!==u||e[23]!==b?(S=n.jsxs(he,{children:[g,u,b]}),e[21]=g,e[22]=u,e[23]=b,e[24]=S):S=e[24],S}function rs(){window.location.href="/"}function ls(t){const e=M.c(59),{invitationId:o,orgName:r,orgSlug:s,orgLogo:a}=t,i=V();let d;e[0]!==o?(d=async()=>{const E=await Ke.organization.acceptInvitation({invitationId:o});if(E.error)throw new Error(E.error.message);return E.data},e[0]=o,e[1]=d):d=e[1];let f;e[2]!==s?(f=()=>{Vt(),window.location.href=`/${s}`},e[2]=s,e[3]=f):f=e[3];let h;e[4]!==i?(h=E=>{We.error(E instanceof Error?E.message:i("common.pendingInviteScreen.failedToAccept"))},e[4]=i,e[5]=h):h=e[5];let w;e[6]!==d||e[7]!==f||e[8]!==h?(w={mutationFn:d,onSuccess:f,onError:h},e[6]=d,e[7]=f,e[8]=h,e[9]=w):w=e[9];const c=Qe(w);let x;e[10]!==o?(x=async()=>{const E=await Ke.organization.rejectInvitation({invitationId:o});if(E.error)throw new Error(E.error.message);return E.data},e[10]=o,e[11]=x):x=e[11];let g,y;e[12]!==i?(g=()=>{We.success(i("common.pendingInviteScreen.invitationDeclined")),window.location.href="/"},y=E=>{We.error(E instanceof Error?E.message:i("common.pendingInviteScreen.failedToDecline"))},e[12]=i,e[13]=g,e[14]=y):(g=e[13],y=e[14]);let l;e[15]!==x||e[16]!==g||e[17]!==y?(l={mutationFn:x,onSuccess:g,onError:y},e[15]=x,e[16]=g,e[17]=y,e[18]=l):l=e[18];const u=Qe(l),p=c.isPending||u.isPending;let b;e[19]!==a||e[20]!==r?(b=a?n.jsx(at,{url:a,fallback:r.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(xn,{className:"h-6 w-6 text-primary"})}),e[19]=a,e[20]=r,e[21]=b):b=e[21];let S;e[22]!==r||e[23]!==i?(S=i("common.pendingInviteScreen.invitedTo",{orgName:r}),e[22]=r,e[23]=i,e[24]=S):S=e[24];let v;e[25]!==S?(v=n.jsx("h3",{className:"text-lg font-medium",children:S}),e[25]=S,e[26]=v):v=e[26];let N;e[27]!==i?(N=i("common.pendingInviteScreen.acceptDescription"),e[27]=i,e[28]=N):N=e[28];let A;e[29]!==N?(A=n.jsx("p",{className:"text-sm text-muted-foreground",children:N}),e[29]=N,e[30]=A):A=e[30];let _;e[31]!==v||e[32]!==A?(_=n.jsxs("div",{className:"space-y-2",children:[v,A]}),e[31]=v,e[32]=A,e[33]=_):_=e[33];let j;e[34]!==c?(j=()=>c.mutate(),e[34]=c,e[35]=j):j=e[35];let T;e[36]!==c.isPending||e[37]!==i?(T=c.isPending?i("common.pendingInviteScreen.acceptingButton"):i("common.pendingInviteScreen.acceptButton"),e[36]=c.isPending,e[37]=i,e[38]=T):T=e[38];let k;e[39]!==p||e[40]!==j||e[41]!==T?(k=n.jsx(F,{onClick:j,disabled:p,children:T}),e[39]=p,e[40]=j,e[41]=T,e[42]=k):k=e[42];let m;e[43]!==u?(m=()=>u.mutate(),e[43]=u,e[44]=m):m=e[44];let P;e[45]!==u.isPending||e[46]!==i?(P=u.isPending?i("common.pendingInviteScreen.decliningButton"):i("common.pendingInviteScreen.declineButton"),e[45]=u.isPending,e[46]=i,e[47]=P):P=e[47];let O;e[48]!==p||e[49]!==m||e[50]!==P?(O=n.jsx(F,{variant:"ghost",onClick:m,disabled:p,children:P}),e[48]=p,e[49]=m,e[50]=P,e[51]=O):O=e[51];let C;e[52]!==k||e[53]!==O?(C=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[k,O]}),e[52]=k,e[53]=O,e[54]=C):C=e[54];let I;return e[55]!==_||e[56]!==C||e[57]!==b?(I=n.jsxs(he,{children:[b,_,C]}),e[55]=_,e[56]=C,e[57]=b,e[58]=I):I=e[58],I}function cs(t){const e=M.c(23),{orgName:o,orgLogo:r}=t,s=V();let a;e[0]!==r||e[1]!==o?(a=r?n.jsx(at,{url:r,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","aria-hidden":"true",children:n.jsx(wn,{className:"h-6 w-6 text-primary"})}),e[0]=r,e[1]=o,e[2]=a):a=e[2];let i;e[3]!==s?(i=s("common.requestPendingScreen.title"),e[3]=s,e[4]=i):i=e[4];let d;e[5]!==i?(d=n.jsx("h3",{className:"text-lg font-medium",children:i}),e[5]=i,e[6]=d):d=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 h;e[10]!==f?(h=n.jsx("p",{className:"text-sm text-muted-foreground",children:f}),e[10]=f,e[11]=h):h=e[11];let w;e[12]!==d||e[13]!==h?(w=n.jsxs("div",{className:"space-y-2",children:[d,h]}),e[12]=d,e[13]=h,e[14]=w):w=e[14];let c;e[15]!==s?(c=s("common.goHome"),e[15]=s,e[16]=c):c=e[16];let x;e[17]!==c?(x=n.jsx(F,{variant:"ghost",onClick:ds,children:c}),e[17]=c,e[18]=x):x=e[18];let g;return e[19]!==a||e[20]!==w||e[21]!==x?(g=n.jsxs(he,{children:[a,w,x]}),e[19]=a,e[20]=w,e[21]=x,e[22]=g):g=e[22],g}function ds(){window.location.href="/"}function us(t){const e=M.c(45),{orgName:o,orgSlug:r,orgLogo:s,domain:a}=t,i=V();let d;e[0]!==r?(d=async()=>{const k=await fetch("/api/auth/custom/domain-request-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:r})}),m=await k.json();if(!k.ok||!m.success)throw new Error(m.error??"Failed to request access");return m},e[0]=r,e[1]=d):d=e[1];let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=fs,e[2]=f):f=e[2];let h;e[3]!==i?(h=k=>{We.error(k instanceof Error?k.message:i("common.requestToJoinScreen.failedToRequest"))},e[3]=i,e[4]=h):h=e[4];let w;e[5]!==d||e[6]!==h?(w={mutationFn:d,onSuccess:f,onError:h},e[5]=d,e[6]=h,e[7]=w):w=e[7];const c=Qe(w);let x;e[8]!==s||e[9]!==o?(x=s?n.jsx(at,{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(Et,{className:"h-6 w-6 text-primary"})}),e[8]=s,e[9]=o,e[10]=x):x=e[10];let g;e[11]!==o||e[12]!==i?(g=i("common.requestToJoinScreen.title",{orgName:o}),e[11]=o,e[12]=i,e[13]=g):g=e[13];let y;e[14]!==g?(y=n.jsx("h3",{className:"text-lg font-medium",children:g}),e[14]=g,e[15]=y):y=e[15];let l;e[16]!==a||e[17]!==i?(l=i("common.requestToJoinScreen.description",{domain:a}),e[16]=a,e[17]=i,e[18]=l):l=e[18];let u;e[19]!==l?(u=n.jsx("p",{className:"text-sm text-muted-foreground",children:l}),e[19]=l,e[20]=u):u=e[20];let p;e[21]!==y||e[22]!==u?(p=n.jsxs("div",{className:"space-y-2",children:[y,u]}),e[21]=y,e[22]=u,e[23]=p):p=e[23];let b;e[24]!==c?(b=()=>c.mutate(),e[24]=c,e[25]=b):b=e[25];let S;e[26]!==c.isPending||e[27]!==i?(S=c.isPending?i("common.requestToJoinScreen.requesting"):i("common.requestToJoinScreen.requestButton"),e[26]=c.isPending,e[27]=i,e[28]=S):S=e[28];let v;e[29]!==c.isPending||e[30]!==b||e[31]!==S?(v=n.jsx(F,{onClick:b,disabled:c.isPending,children:S}),e[29]=c.isPending,e[30]=b,e[31]=S,e[32]=v):v=e[32];const N=c.isPending;let A;e[33]!==i?(A=i("common.goHome"),e[33]=i,e[34]=A):A=e[34];let _;e[35]!==c.isPending||e[36]!==A?(_=n.jsx(F,{variant:"ghost",onClick:ms,disabled:N,children:A}),e[35]=c.isPending,e[36]=A,e[37]=_):_=e[37];let j;e[38]!==v||e[39]!==_?(j=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[v,_]}),e[38]=v,e[39]=_,e[40]=j):j=e[40];let T;return e[41]!==p||e[42]!==j||e[43]!==x?(T=n.jsxs(he,{children:[x,p,j]}),e[41]=p,e[42]=j,e[43]=x,e[44]=T):T=e[44],T}function ms(){window.location.href="/"}function fs(t){if(t.alreadyMember&&t.slug){window.location.href=`/${t.slug}`;return}window.location.reload()}function hs(t){const e=M.c(7);let o;e[0]!==t?(o=Ue.orgAccessStatus(t),e[0]=t,e[1]=o):o=e[1];let r;e[2]!==t?(r=async()=>{const a=await fetch(`/api/auth/custom/org-access-status/${encodeURIComponent(t)}`,{credentials:"include"});if(!a.ok)throw new Error(`org-access-status failed (${a.status})`);return await a.json()},e[2]=t,e[3]=r):r=e[3];let s;return e[4]!==o||e[5]!==r?(s={queryKey:o,queryFn:r,refetchOnWindowFocus:!1},e[4]=o,e[5]=r,e[6]=s):s=e[6],Nt(s)}function gs({orgSlug:t}){const{data:e}=hs(t);if(e.status!=="member"){Wt()?.org===t&&Yt();const o=localStorage.getItem(Be.lastOrgSlug())===t;if(o&&localStorage.removeItem(Be.lastOrgSlug()),o&&(e.status==="not-found"||e.status==="no-access"))return window.location.href="/",null}return e.status==="not-found"?n.jsx(wt,{orgSlug:t,reason:"not-found"}):e.status==="pending-invite"?n.jsx(ls,{invitationId:e.invitation.id,orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo}):e.status==="auto-domain-join"?n.jsx(is,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="can-request"?n.jsx(us,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="request-pending"?n.jsx(cs,{orgName:e.organization.name,orgLogo:e.organization.logo}):e.status==="member"?(window.location.reload(),null):n.jsx(wt,{orgSlug:t,orgName:e.organization.name,reason:"no-access"})}function Rt(t){const e=M.c(42),{ariaLabel:o,dismissLabel:r,eyebrow:s,title:a,description:i,icon:d,children:f,footerLeading:h,actions:w,onDismiss:c,tone:x}=t,g=x===void 0?"neutral":x,y=h||w;let l;e[0]!==g?(l=g==="system"&&n.jsx("div",{className:"h-0.5 bg-special"}),e[0]=g,e[1]=l):l=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(Pn,{size:14}),e[2]=u):u=e[2];let p;e[3]!==r||e[4]!==c?(p=n.jsx(F,{size:"icon-sm",variant:"ghost","aria-label":r,className:"absolute right-2 top-2 z-10 text-muted-foreground",onClick:c,children:u}),e[3]=r,e[4]=c,e[5]=p):p=e[5];const b=d&&"flex items-start gap-3",S=f&&"pb-3";let v;e[6]!==b||e[7]!==S?(v=dt("p-4 pr-11",b,S),e[6]=b,e[7]=S,e[8]=v):v=e[8];let N;e[9]!==d?(N=d&&n.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-special/10 text-special",children:d}),e[9]=d,e[10]=N):N=e[10];let A;e[11]!==s?(A=s&&n.jsx("p",{className:"text-xs text-muted-foreground",children:s}),e[11]=s,e[12]=A):A=e[12];let _;e[13]!==a?(_=n.jsx("h3",{className:"text-base font-semibold text-foreground",children:a}),e[13]=a,e[14]=_):_=e[14];let j;e[15]!==i?(j=i&&n.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:i}),e[15]=i,e[16]=j):j=e[16];let T;e[17]!==_||e[18]!==j||e[19]!==A?(T=n.jsxs("div",{children:[A,_,j]}),e[17]=_,e[18]=j,e[19]=A,e[20]=T):T=e[20];let k;e[21]!==f?(k=f&&n.jsx("div",{className:"mt-3",children:f}),e[21]=f,e[22]=k):k=e[22];let m;e[23]!==T||e[24]!==k?(m=n.jsxs("div",{className:"min-w-0 flex-1",children:[T,k]}),e[23]=T,e[24]=k,e[25]=m):m=e[25];let P;e[26]!==m||e[27]!==v||e[28]!==N?(P=n.jsxs("div",{className:v,children:[N,m]}),e[26]=m,e[27]=v,e[28]=N,e[29]=P):P=e[29];let O;e[30]!==w||e[31]!==h||e[32]!==y||e[33]!==g?(O=y&&n.jsxs("div",{className:dt("flex items-center justify-between gap-3 px-4 py-2.5",g==="system"?"border-t border-border bg-muted/50":"pt-0"),children:[n.jsx("div",{className:"min-w-0 text-xs text-muted-foreground",children:h}),n.jsx("div",{className:"flex shrink-0 items-center gap-2",children:w})]}),e[30]=w,e[31]=h,e[32]=y,e[33]=g,e[34]=O):O=e[34];let C;return e[35]!==o||e[36]!==P||e[37]!==O||e[38]!==l||e[39]!==p||e[40]!==g?(C=n.jsxs("div",{role:"dialog","aria-label":o,"data-slot":"announcement-card","data-tone":g,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:[l,p,P,O]}),e[35]=o,e[36]=P,e[37]=O,e[38]=l,e[39]=p,e[40]=g,e[41]=C):C=e[41],C}const ps={switcher:"tour-layout-switcher",nav:"tour-layout-nav",tasks:"tour-layout-tasks",projects:"tour-layout-projects",account:"tour-layout-account",recentActivity:"tour-layout-recent-activity",siteEditor:"tour-layout-site-editor",surfaceTabs:"tour-layout-surface-tabs",branchPicker:"tour-layout-branch-picker",automations:"tour-layout-automations",settings:"tour-layout-settings"};function Mt(t){return`[data-tour="${ps[t]}"]`}const ys=[{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 bs(t){return ys.filter(e=>e.scope==="shell"||e.scope==="orgHome"&&t.onOrgHome||e.scope==="project"&&t.inProject||e.scope==="siteEditor"&&t.onSiteEditor)}function xs(t,e){return bs(e).map(o=>({element:Mt(o.anchor),popover:{title:t(o.titleKey),description:t(o.descKey),side:o.side,align:"center"}}))}const ws=Mt("switcher"),Ss=30;function Ft(t){const e=document.querySelector(t);return e instanceof HTMLElement&&e.offsetParent!==null}function vs(t,e){return xs(t,e).filter(o=>typeof o.element=="string"&&Ft(o.element))}function js(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:r})=>{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",()=>r.destroy()),o.footerButtons.insertBefore(s,o.footerButtons.firstChild)},onDestroyed:()=>{Ve=!1},steps:e}}let Ve=!1;async function ks(){return(await Qt(()=>import("./driver.js-Dj4CfABu.js"),[])).driver}function Ts(t,e){if(Ve)return;Ve=!0;let o=0;const r=()=>{if(!Ft(ws)&&o++<Ss){requestAnimationFrame(r);return}const s=vs(t,e);if(s.length===0){Ve=!1;return}ks().then(a=>{a(js(t,s)).drive()}).catch(()=>{Ve=!1})};r()}function Ns(t){return t!=="off"}function ci(t){if(!t.hasSource)return[];const e=["site-editor"];return Ns(t.cmsMode)&&e.push("content"),t.runtime==="sandbox"&&e.push("code"),e}function zt(t){return t==="site-editor"||t==="content"||t==="code"||t.startsWith("code:")}function di(t){return t.reportsOnly&&!t.onReportAgent&&zt(t.tabId)}const _s=[{id:"new-layout",date:"2026-09-22",eyebrow:"Now Available",title:"New Layout",bullets:[{icon:ot,title:"Unified page headers",body:"Every page now has a clear header with navigation breadcrumbs and actions, making it easy to orient yourself and move around."},{icon:ct,title:"Consistent navigation and controls",body:"Settings and project pages use a predictable sidebar instead of scattered tabs. Buttons, inputs and toolbars share one shape and one height, and the layout adapts to smaller screens."},{icon:Sn,title:"Site editor redesigned",body:"Try the redesigned blocks editor from Profile & Preferences. Blocks share consistent actions, variants appear beside their block in the header, and section selection is searchable."}],cta:{label:"Take a tour",action:"start-tour"}},{id:"unified-workspace-layout",date:"2026-09-01",eyebrow:"Now Available",title:"A new way around Studio",bullets:[{icon:pt,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:ie,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:ot,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:ot,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:le,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:ce,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:ce,title:"Faster CMS previews",body:"Every draft gets its own git worktree on your machine, so previews render instantly as you edit."},{icon:ie,title:"Native Claude Code & Codex support",body:"State-of-the-art coding agents, running natively against your local files."},{icon:Xt,title:"Boosted performance",body:"Entirely rewritten in Rust with a smaller memory footprint than the Bun-based runtime — fast even on modest machines."},{icon:ot,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:ie,title:"Sol leads Thinking",body:"Codex Thinking now defaults to `gpt-5.6-sol` for deeper coding and reasoning work."},{icon:le,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:ce,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:ie,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:le,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:ce,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:le,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:ie,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:ce,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:ie,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:le,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:ce,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:ie,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:le,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:ce,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:ie,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:le,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:pt,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:ce,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:le,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:ie,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:ie,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:vn,title:"Unified inbox",body:"Org invitations and product updates now share one chronological feed in the sidebar."}]}],qt=_s,it="studio.release-feed.v1",mt=new Set;let me="",fe={},ft=!1;function As(){if(ft)return me||"{}";try{return localStorage.getItem(it)??"{}"}catch{return me||"{}"}}function Bt(t){try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function St(){const t=As();return t!==me&&(me=t,fe=Bt(t)),fe}function Ps(t){mt.add(t);const e=o=>{if(!(o.key!==it&&o.key!==null)){try{const r=localStorage.getItem(it)??"{}",a={...Bt(r),...fe};fe=a,me=JSON.stringify(a)}catch{}t()}};return window.addEventListener("storage",e),()=>{mt.delete(t),window.removeEventListener("storage",e)}}function Cs(t){fe=t,me=JSON.stringify(t);try{localStorage.setItem(it,me),ft=!1}catch{ft=!0}mt.forEach(e=>e())}function Es(){const t=M.c(7),e=J.useSyncExternalStore(Ps,St,St);let o;t[0]!==e?(o=f=>!!e[f],t[0]=e,t[1]=o):o=t[1];const r=o,s=Os;let a;t[2]!==e?(a=qt.reduce((f,h)=>e[h.id]?f:f+1,0),t[2]=e,t[3]=a):a=t[3];const i=a;let d;return t[4]!==r||t[5]!==i?(d={isSeen:r,markSeen:s,unseenCount:i},t[4]=r,t[5]=i,t[6]=d):d=t[6],d}function Os(t){fe[t]||Cs({...fe,[t]:{seenAt:new Date().toISOString()}})}const Is=720*60*60*1e3,Ls=10080*60*1e3;function $s(t){const[e,o,r]=t.split("-").map(Number);return!e||!o||!r?new Date(t).getTime():new Date(e,o-1,r).getTime()}function Ds(t){const e=qt[0];if(!e)return null;const o=$s(e.date),r=t-o;return r<0||r>Is?null:e}function Rs(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 Ms(t,e){const o=Rs(t);return o===null?!1:e-o>=Ls}function Fs(){const t=M.c(53),e=V(),o=En(),r=Zt(),s=Ot(),a=!!o,i=r===re.home&&!o;let d;t[0]!==s||t[1]!==a?(d=a&&!!s&&zt(s),t[0]=s,t[1]=a,t[2]=d):d=t[2];const f=d,{data:h}=Ke.useSession(),{isSeen:w,markSeen:c}=Es(),[x,g]=J.useState(!1),y=Ln(6e4);let l,u,p;if(t[3]!==w||t[4]!==y||t[5]!==h?.user?.createdAt){p=Symbol.for("react.early_return_sentinel");e:{if(l=Ds(y),!l){p=null;break e}if(!Ms(h?.user?.createdAt,y)){p=null;break e}u=w(l.id)}t[3]=w,t[4]=y,t[5]=h?.user?.createdAt,t[6]=l,t[7]=u,t[8]=p}else l=t[6],u=t[7],p=t[8];if(p!==Symbol.for("react.early_return_sentinel"))return p;if(u)return null;let b;t[9]!==l.id||t[10]!==a||t[11]!==c||t[12]!==i||t[13]!==f||t[14]!==e?(b=()=>{c(l.id),Ts(e,{onOrgHome:i,inProject:a,onSiteEditor:f})},t[9]=l.id,t[10]=a,t[11]=c,t[12]=i,t[13]=f,t[14]=e,t[15]=b):b=t[15];const S=b;let v;t[16]!==e?(v=e("announcements.release.ariaLabel"),t[16]=e,t[17]=v):v=t[17];let N;t[18]!==e?(N=e("announcements.release.dismiss"),t[18]=e,t[19]=N):N=t[19];const A=l.eyebrow,_=l.title;let j;t[20]!==l.id||t[21]!==c?(j=()=>c(l.id),t[20]=l.id,t[21]=c,t[22]=j):j=t[22];let T;t[23]!==l.id||t[24]!==l.learnMoreHref||t[25]!==c||t[26]!==e?(T=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[23]=l.id,t[24]=l.learnMoreHref,t[25]=c,t[26]=e,t[27]=T):T=t[27];let k;t[28]!==l.cta||t[29]!==l.id||t[30]!==c||t[31]!==S?(k=l.cta?"href"in l.cta?n.jsx(F,{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(F,{size:"sm",onClick:S,children:l.cta.label}):n.jsx(F,{size:"sm",onClick:()=>g(!0),children:l.cta.label}):null,t[28]=l.cta,t[29]=l.id,t[30]=c,t[31]=S,t[32]=k):k=t[32];let m;t[33]!==l.bullets?(m=l.bullets.map(zs),t[33]=l.bullets,t[34]=m):m=t[34];let P;t[35]!==m?(P=n.jsx("ul",{className:"flex flex-col gap-3",children:m}),t[35]=m,t[36]=P):P=t[36];let O;t[37]!==l.id||t[38]!==c?(O=E=>{g(E),E||c(l.id)},t[37]=l.id,t[38]=c,t[39]=O):O=t[39];let C;t[40]!==x||t[41]!==O?(C=n.jsx(Cn,{open:x,onOpenChange:O}),t[40]=x,t[41]=O,t[42]=C):C=t[42];let I;return t[43]!==l.eyebrow||t[44]!==l.title||t[45]!==k||t[46]!==P||t[47]!==C||t[48]!==v||t[49]!==N||t[50]!==j||t[51]!==T?(I=n.jsxs(Rt,{ariaLabel:v,dismissLabel:N,eyebrow:A,title:_,onDismiss:j,footerLeading:T,actions:k,children:[P,C]}),t[43]=l.eyebrow,t[44]=l.title,t[45]=k,t[46]=P,t[47]=C,t[48]=v,t[49]=N,t[50]=j,t[51]=T,t[52]=I):I=t[52],I}function zs(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 Kt=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform),ue=Kt?"⌘":"Ctrl",G={commandPalette:{keys:[ue,"K"],description:"Command palette"},keyboardShortcuts:{keys:["?"],description:"Keyboard shortcuts"},back:{keys:[ue,"["],description:"Back to previous"},focusChatInput:{keys:[ue,"L"],description:"Focus chat input"},saveAndFormat:{keys:[ue,"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:[ue,"Enter"],description:"Apply filter"},togglePlanMode:{keys:[ue,"Shift","L"],description:"Toggle plan mode"},newTask:{keys:["Shift",ue,"S"],description:"New task"},toggleDaemon:{keys:[ue,"D"],description:"Toggle daemon logs"}},qs=[{label:"General",shortcuts:[G.commandPalette,G.keyboardShortcuts,G.back,G.newTask,G.toggleDaemon]},{label:"Editor",shortcuts:[G.saveAndFormat]},{label:"Chat",shortcuts:[G.focusChatInput,G.togglePlanMode,G.sendMessage,G.newLine]},{label:"Questions",shortcuts:[G.selectOption]},{label:"Monitoring",shortcuts:[G.applyFilter]}];function vt(t){return Kt?t.metaKey:t.ctrlKey}function Bs(t){if(!(t instanceof HTMLElement))return!1;if(t.isContentEditable)return!0;const e=t.tagName;return e==="INPUT"||e==="TEXTAREA"||e==="SELECT"}function Ks(t){const e=M.c(11),{open:o,onOpenChange:r}=t,s=V();let a;e[0]!==s?(a=s("common.keyboardShortcutsDialog.title"),e[0]=s,e[1]=a):a=e[1];let i;e[2]!==a?(i=n.jsx(It,{children:n.jsx(Lt,{children:a})}),e[2]=a,e[3]=i):i=e[3];let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx("div",{className:"flex flex-col gap-4",children:qs.map(Hs)}),e[4]=d):d=e[4];let f;e[5]!==i?(f=n.jsxs($t,{className:"sm:max-w-md",children:[i,d]}),e[5]=i,e[6]=f):f=e[6];let h;return e[7]!==r||e[8]!==o||e[9]!==f?(h=n.jsx(Dt,{open:o,onOpenChange:r,children:f}),e[7]=r,e[8]=o,e[9]=f,e[10]=h):h=e[10],h}function Hs(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(Us)})]},t.label)}function Us(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(Gs)})]},t.description)}function Gs(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 jt=8;function Js(t){const{org:e}=ht(),o=Hn({connectionId:At,orgId:e.id,orgSlug:e.slug}),{data:r}=He({queryKey:Ue.globalSearch(e.id,t,jt),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:jt}})).structuredContent?.items??[]}catch{return[]}}});return r??[]}function Vs(t){const e=M.c(195),{open:o,onOpenChange:r}=t,s=V(),a=_t(),{org:i}=ht(),{projects:d,hasProjects:f}=On(),[h,w]=J.useState(""),c=J.useDeferredValue(h),x=Js(c);let g;e[0]!==r?(g=()=>{r(!1),w("")},e[0]=r,e[1]=g):g=e[1];const y=g;let l;e[2]!==y?(l=(q,Y)=>{ut("command_palette_used",{kind:Y}),q(),y()},e[2]=y,e[3]=l):l=e[3];const u=l;let p;e[4]!==a||e[5]!==i.id||e[6]!==i.slug?(p=q=>{if(q.type==="connection"){if(!q.slug){a({to:"/$org/settings/connections",params:{org:i.slug},search:{tab:"all"}});return}a({to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:q.slug}});return}if(q.type==="task"){a({to:re.tasks,params:{org:i.slug,taskKey:q.key??void 0}});return}const Y=Pt(i.id).id;en(a,tn({org:i.slug,agentId:q.virtual_mcp_id??Y,superAgentId:Y}),{search:()=>({thread:q.id}),replace:!1})},e[4]=a,e[5]=i.id,e[6]=i.slug,e[7]=p):p=e[7];const b=p;let S;e[8]!==h?(S=[h],e[8]=h,e[9]=S):S=e[9];const v=S;let N,A,_,j,T,k,m,P,O,C,I,E,R;if(e[10]!==y||e[11]!==u||e[12]!==f||e[13]!==x||e[14]!==a||e[15]!==r||e[16]!==o||e[17]!==b||e[18]!==i.slug||e[19]!==d||e[20]!==v||e[21]!==s||e[22]!==h){const q=x.filter(Ys),Y=x.filter(Ws);let Q;e[36]!==i.slug?(Q={org:i.slug},e[36]=i.slug,e[37]=Q):Q=e[37];const D=Q;let X;e[38]!==s?(X=s("sidebar.navDestinations.home"),e[38]=s,e[39]=X):X=e[39];let Ge;e[40]===Symbol.for("react.memo_cache_sentinel")?(Ge=n.jsx(kn,{"aria-hidden":"true"}),e[40]=Ge):Ge=e[40];let oe;e[41]!==D||e[42]!==X?(oe={key:"home",label:X,icon:Ge,to:re.home,params:D},e[41]=D,e[42]=X,e[43]=oe):oe=e[43];let K;e[44]!==s?(K=s("sidebar.navDestinations.reports"),e[44]=s,e[45]=K):K=e[45];let Z;e[46]===Symbol.for("react.memo_cache_sentinel")?(Z=n.jsx(Tn,{"aria-hidden":"true"}),e[46]=Z):Z=e[46];let ee;e[47]!==D||e[48]!==K?(ee={key:"reports",label:K,icon:Z,to:re.reports,params:D},e[47]=D,e[48]=K,e[49]=ee):ee=e[49];let te;e[50]!==s?(te=s("sidebar.navDestinations.tasks"),e[50]=s,e[51]=te):te=e[51];let ne;e[52]===Symbol.for("react.memo_cache_sentinel")?(ne=n.jsx(bt,{"aria-hidden":"true"}),e[52]=ne):ne=e[52];let H;e[53]!==i.slug?(H={org:i.slug,taskKey:void 0},e[53]=i.slug,e[54]=H):H=e[54];let U;e[55]!==te||e[56]!==H?(U={key:"tasks",label:te,icon:ne,to:re.tasks,params:H},e[55]=te,e[56]=H,e[57]=U):U=e[57];let se;e[58]!==s?(se=s("sidebar.navDestinations.library"),e[58]=s,e[59]=se):se=e[59];let ae;e[60]===Symbol.for("react.memo_cache_sentinel")?(ae=n.jsx(Nn,{"aria-hidden":"true"}),e[60]=ae):ae=e[60];let L;e[61]!==D||e[62]!==se?(L={key:"library",label:se,icon:ae,to:re.library,params:D},e[61]=D,e[62]=se,e[63]=L):L=e[63];let z;e[64]!==s?(z=s("sidebar.navDestinations.discover"),e[64]=s,e[65]=z):z=e[65];let Xe;e[66]===Symbol.for("react.memo_cache_sentinel")?(Xe=n.jsx(_n,{"aria-hidden":"true"}),e[66]=Xe):Xe=e[66];let ge;e[67]!==D||e[68]!==z?(ge={key:"discover",label:z,icon:Xe,to:re.discover,params:D},e[67]=D,e[68]=z,e[69]=ge):ge=e[69];let Ze;e[70]!==oe||e[71]!==ee||e[72]!==U||e[73]!==L||e[74]!==ge?(Ze=[oe,ee,U,L,ge],e[70]=oe,e[71]=ee,e[72]=U,e[73]=L,e[74]=ge,e[75]=Ze):Ze=e[75];const rt=Ze;A=Mn,j=o,e[76]!==y||e[77]!==r?(T=$=>$?r(!0):y(),e[76]=y,e[77]=r,e[78]=T):T=e[78],e[79]!==s?(k=s("commandPalette.title"),e[79]=s,e[80]=k):k=e[80],e[81]!==s?(m=s("commandPalette.description"),e[81]=s,e[82]=m):m=e[82];let pe;e[83]!==s?(pe=s("commandPalette.placeholder"),e[83]=s,e[84]=pe):pe=e[84];let ye;e[85]!==s?(ye=s("commandPalette.placeholder"),e[85]=s,e[86]=ye):ye=e[86],e[87]!==pe||e[88]!==ye||e[89]!==h?(P=n.jsx(Fn,{placeholder:pe,"aria-label":ye,value:h,onValueChange:w}),e[87]=pe,e[88]=ye,e[89]=h,e[90]=P):P=e[90],N=zn;let be;e[91]!==s?(be=s("commandPalette.empty"),e[91]=s,e[92]=be):be=e[92],e[93]!==be?(O=n.jsx(qn,{children:be}),e[93]=be,e[94]=O):O=e[94];let xe;e[95]!==s?(xe=s("commandPalette.goTo"),e[95]=s,e[96]=xe):xe=e[96];let we;e[97]!==rt||e[98]!==u||e[99]!==a?(we=rt.map($=>n.jsxs(de,{onSelect:()=>u(()=>a({to:$.to,params:$.params}),"destination"),children:[$.icon,n.jsx("span",{children:$.label})]},$.key)),e[97]=rt,e[98]=u,e[99]=a,e[100]=we):we=e[100],e[101]!==xe||e[102]!==we?(C=n.jsx(Je,{heading:xe,children:we}),e[101]=xe,e[102]=we,e[103]=C):C=e[103],e[104]!==u||e[105]!==f||e[106]!==a||e[107]!==i.slug||e[108]!==d||e[109]!==s?(I=f&&n.jsx(Je,{heading:s("commandPalette.projects"),children:d.map($=>n.jsxs(de,{value:`project ${$.title}`,onSelect:()=>u(()=>a({to:re.projects,params:{org:i.slug,agentId:$.id}}),"project"),children:[n.jsx(Kn,{icon:$.icon,name:$.title,"aria-hidden":"true"}),n.jsx("span",{children:$.title})]},$.id))}),e[104]=u,e[105]=f,e[106]=a,e[107]=i.slug,e[108]=d,e[109]=s,e[110]=I):I=e[110];let Se;e[111]!==s?(Se=s("commandPalette.actions"),e[111]=s,e[112]=Se):Se=e[112];let ve;e[113]!==s?(ve=s("commandPalette.newProject"),e[113]=s,e[114]=ve):ve=e[114];let je;e[115]!==u||e[116]!==a||e[117]!==D?(je=()=>u(()=>a({to:re.home,params:D}),"new_project"),e[115]=u,e[116]=a,e[117]=D,e[118]=je):je=e[118];let et;e[119]===Symbol.for("react.memo_cache_sentinel")?(et=n.jsx(xt,{"aria-hidden":"true"}),e[119]=et):et=e[119];let ke;e[120]!==s?(ke=s("commandPalette.newProject"),e[120]=s,e[121]=ke):ke=e[121];let Te;e[122]!==ke?(Te=n.jsx("span",{children:ke}),e[122]=ke,e[123]=Te):Te=e[123];let Ne;e[124]!==ve||e[125]!==je||e[126]!==Te?(Ne=n.jsxs(de,{value:ve,onSelect:je,children:[et,Te]}),e[124]=ve,e[125]=je,e[126]=Te,e[127]=Ne):Ne=e[127];let _e;e[128]!==s?(_e=s("commandPalette.inviteTeammate"),e[128]=s,e[129]=_e):_e=e[129];let Ae;e[130]!==u||e[131]!==a||e[132]!==D?(Ae=()=>u(()=>a({to:"/$org/settings/members",params:D}),"invite"),e[130]=u,e[131]=a,e[132]=D,e[133]=Ae):Ae=e[133];let tt;e[134]===Symbol.for("react.memo_cache_sentinel")?(tt=n.jsx(An,{"aria-hidden":"true"}),e[134]=tt):tt=e[134];let Pe;e[135]!==s?(Pe=s("commandPalette.inviteTeammate"),e[135]=s,e[136]=Pe):Pe=e[136];let Ce;e[137]!==Pe?(Ce=n.jsx("span",{children:Pe}),e[137]=Pe,e[138]=Ce):Ce=e[138];let Ee;e[139]!==_e||e[140]!==Ae||e[141]!==Ce?(Ee=n.jsxs(de,{value:_e,onSelect:Ae,children:[tt,Ce]}),e[139]=_e,e[140]=Ae,e[141]=Ce,e[142]=Ee):Ee=e[142];let Oe;e[143]!==s?(Oe=s("commandPalette.addConnection"),e[143]=s,e[144]=Oe):Oe=e[144];let Ie;e[145]!==u||e[146]!==a||e[147]!==D?(Ie=()=>u(()=>a({to:"/$org/settings/connections",params:D,search:{tab:"all"}}),"add_connection"),e[145]=u,e[146]=a,e[147]=D,e[148]=Ie):Ie=e[148];let nt;e[149]===Symbol.for("react.memo_cache_sentinel")?(nt=n.jsx(xt,{"aria-hidden":"true"}),e[149]=nt):nt=e[149];let Le;e[150]!==s?(Le=s("commandPalette.addConnection"),e[150]=s,e[151]=Le):Le=e[151];let $e;e[152]!==Le?($e=n.jsx("span",{children:Le}),e[152]=Le,e[153]=$e):$e=e[153];let De;e[154]!==Oe||e[155]!==Ie||e[156]!==$e?(De=n.jsxs(de,{value:Oe,onSelect:Ie,children:[nt,$e]}),e[154]=Oe,e[155]=Ie,e[156]=$e,e[157]=De):De=e[157];let Re;e[158]!==s?(Re=s("commandPalette.settings"),e[158]=s,e[159]=Re):Re=e[159];let Me;e[160]!==u||e[161]!==a||e[162]!==D?(Me=()=>u(()=>a({to:"/$org/settings/general",params:D}),"settings"),e[160]=u,e[161]=a,e[162]=D,e[163]=Me):Me=e[163];let st;e[164]===Symbol.for("react.memo_cache_sentinel")?(st=n.jsx(Rn,{"aria-hidden":"true"}),e[164]=st):st=e[164];let Fe;e[165]!==s?(Fe=s("commandPalette.settings"),e[165]=s,e[166]=Fe):Fe=e[166];let ze;e[167]!==Fe?(ze=n.jsx("span",{children:Fe}),e[167]=Fe,e[168]=ze):ze=e[168];let qe;e[169]!==Re||e[170]!==Me||e[171]!==ze?(qe=n.jsxs(de,{value:Re,onSelect:Me,children:[st,ze]}),e[169]=Re,e[170]=Me,e[171]=ze,e[172]=qe):qe=e[172],e[173]!==Se||e[174]!==Ne||e[175]!==Ee||e[176]!==De||e[177]!==qe?(E=n.jsxs(Je,{heading:Se,children:[Ne,Ee,De,qe]}),e[173]=Se,e[174]=Ne,e[175]=Ee,e[176]=De,e[177]=qe,e[178]=E):E=e[178],R=q.length>0&&n.jsx(Je,{heading:s("commandPalette.connections"),children:q.map($=>n.jsxs(de,{value:`${$.title} ${$.id}`,keywords:v,onSelect:()=>u(()=>b($),"connection"),children:[n.jsx(Bn,{icon:$.icon,name:$.title,size:"2xs","aria-hidden":"true"}),n.jsx("span",{className:"truncate",children:$.title})]},`connection:${$.id}`))}),_=Y.length>0&&n.jsx(Je,{heading:s("commandPalette.results"),children:Y.map($=>n.jsxs(de,{value:`${$.title} ${$.id}`,keywords:v,onSelect:()=>u(()=>b($),$.type),children:[$.type==="thread"?n.jsx(jn,{"aria-hidden":"true"}):n.jsx(bt,{"aria-hidden":"true"}),n.jsx("span",{className:"truncate",children:$.title}),$.type==="task"&&$.key&&n.jsx("span",{className:"ml-auto shrink-0 font-mono text-xs text-muted-foreground",children:$.key})]},`${$.type}:${$.id}`))}),e[10]=y,e[11]=u,e[12]=f,e[13]=x,e[14]=a,e[15]=r,e[16]=o,e[17]=b,e[18]=i.slug,e[19]=d,e[20]=v,e[21]=s,e[22]=h,e[23]=N,e[24]=A,e[25]=_,e[26]=j,e[27]=T,e[28]=k,e[29]=m,e[30]=P,e[31]=O,e[32]=C,e[33]=I,e[34]=E,e[35]=R}else N=e[23],A=e[24],_=e[25],j=e[26],T=e[27],k=e[28],m=e[29],P=e[30],O=e[31],C=e[32],I=e[33],E=e[34],R=e[35];let B;e[179]!==N||e[180]!==_||e[181]!==O||e[182]!==C||e[183]!==I||e[184]!==E||e[185]!==R?(B=n.jsxs(N,{children:[O,C,I,E,R,_]}),e[179]=N,e[180]=_,e[181]=O,e[182]=C,e[183]=I,e[184]=E,e[185]=R,e[186]=B):B=e[186];let W;return e[187]!==A||e[188]!==j||e[189]!==T||e[190]!==k||e[191]!==m||e[192]!==P||e[193]!==B?(W=n.jsxs(A,{open:j,onOpenChange:T,title:k,description:m,children:[P,B]}),e[187]=A,e[188]=j,e[189]=T,e[190]=k,e[191]=m,e[192]=P,e[193]=B,e[194]=W):W=e[194],W}function Ws(t){return t.type!=="connection"}function Ys(t){return t.type==="connection"}const Ye=new Wn(!1);function Qs(){Ye.set(!0)}function Xs(){Ye.set(!1)}function Zs(){const t=M.c(2),e=J.useSyncExternalStore(Ye.subscribe,Ye.get);let o;return t[0]!==e?(o=[e,Ye.set],t[0]=e,t[1]=o):o=t[1],o}const eo=300*1e3,to=2;function no(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 so(t,e){return t.count>=to&&t.version!==null&&t.version!==e}function oo(){const t=M.c(43),e=V(),o=Qn();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={mutationFn:ao},t[0]=r):r=t[0];const s=Qe(r);let a;t[1]===Symbol.for("react.memo_cache_sentinel")?(a={queryKey:Ue.appVersionCheck(),queryFn:io,refetchInterval:eo,refetchIntervalInBackground:!0,staleTime:0},t[1]=a):a=t[1];const{data:i,dataUpdatedAt:d}=He(a),[f,h]=J.useState(0);let w;t[2]===Symbol.for("react.memo_cache_sentinel")?(w={version:null,count:0},t[2]=w):w=t[2];const[c,x]=J.useState(w);d!==f&&(h(d),x(B=>no(B,i,"4.463.1")));const[g,y]=J.useState(null),l=o;let u;t[3]!==o||t[4]!==s?(u=()=>window.location.reload(),t[3]=o,t[4]=s,t[5]=u):u=t[5];const p=u,b="announcements.version.refresh";if(!so(c,g))return null;let S;t[6]!==e?(S=e("announcements.version.ariaLabel"),t[6]=e,t[7]=S):S=t[7];let v;t[8]!==e?(v=e("announcements.version.dismiss"),t[8]=e,t[9]=v):v=t[9];let N;t[10]!==e?(N=e("announcements.version.eyebrow"),t[10]=e,t[11]=N):N=t[11];let A;t[12]!==e?(A=e("announcements.version.title"),t[12]=e,t[13]=A):A=t[13];const _="announcements.version.description";let j;t[14]!==e||t[15]!==_?(j=e(_),t[14]=e,t[15]=_,t[16]=j):j=t[16];let T;t[17]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsx(yt,{size:16}),t[17]=T):T=t[17];let k;t[18]!==c.version?(k=()=>y(c.version),t[18]=c.version,t[19]=k):k=t[19];let m;t[20]!==e?(m=e("announcements.version.currentSession",{version:"4.463.1"}),t[20]=e,t[21]=m):m=t[21];let P;t[22]!==b||t[23]!==e?(P=e(b),t[22]=b,t[23]=e,t[24]=P):P=t[24];const O=l;let C;t[25]!==O?(C=dt(O),t[25]=O,t[26]=C):C=t[26];let I;t[27]!==C?(I=n.jsx(yt,{size:14,className:C}),t[27]=C,t[28]=I):I=t[28];let E;t[29]!==p||t[30]!==l||t[31]!==P||t[32]!==I?(E=n.jsxs(F,{size:"sm",disabled:l,onClick:p,children:[P,I]}),t[29]=p,t[30]=l,t[31]=P,t[32]=I,t[33]=E):E=t[33];let R;return t[34]!==k||t[35]!==m||t[36]!==E||t[37]!==S||t[38]!==v||t[39]!==N||t[40]!==A||t[41]!==j?(R=n.jsx(Rt,{ariaLabel:S,dismissLabel:v,eyebrow:N,title:A,description:j,icon:T,tone:"system",onDismiss:k,footerLeading:m,actions:E}),t[34]=k,t[35]=m,t[36]=E,t[37]=S,t[38]=v,t[39]=N,t[40]=A,t[41]=j,t[42]=R):R=t[42],R}async function io(){const t=await fetch("/api/config",{cache:"no-store"}),{config:e}=await t.json();return e.version}async function ao(){const t=await fetch("/_local/update/restart",{method:"POST"});if(!t.ok)throw new Error(`restart failed: ${t.status}`)}function ro(t){return{has(){try{return localStorage.getItem(t)==="1"}catch{return!1}},mark(){try{localStorage.setItem(t,"1")}catch{}}}}const lo=Date.parse("2026-07-21T00:00:00Z"),kt=t=>ro(Be.ptBrAnnouncementSeen(t));function co(){const t=M.c(35),e=V(),[o,r]=nn(),{data:s,isPending:a}=Ke.useSession(),i=s?.user,d=i?.id,f=i?.createdAt,h=f!=null&&new Date(f).getTime()<lo,w=sn()==="pt-BR",c=!a&&!!d&&h&&w&&o.language==="en"&&!kt(d).has(),[x,g]=J.useState(!1),[y,l]=J.useState(!1);!x&&!a&&(g(!0),c&&d&&(kt(d).mark(),r(mo),l(!0),ut("pt_br_auto_switch_shown")));let u;t[0]===Symbol.for("react.memo_cache_sentinel")?(u=W=>{ut("pt_br_auto_switch_closed",{action:W}),l(!1)},t[0]=u):u=t[0];const p=u;let b;t[1]!==r?(b=()=>{r(uo),p("switch-back")},t[1]=r,t[2]=b):b=t[2];const S=b;let v;t[3]===Symbol.for("react.memo_cache_sentinel")?(v=W=>!W&&p("dismiss"),t[3]=v):v=t[3];let N;t[4]===Symbol.for("react.memo_cache_sentinel")?(N=n.jsx("div",{className:"text-4xl","aria-hidden":"true",children:"🇧🇷"}),t[4]=N):N=t[4];let A;t[5]!==e?(A=e("announcements.ptBr.title"),t[5]=e,t[6]=A):A=t[6];let _;t[7]!==A?(_=n.jsx(Lt,{children:A}),t[7]=A,t[8]=_):_=t[8];let j;t[9]!==e?(j=e("announcements.ptBr.description"),t[9]=e,t[10]=j):j=t[10];let T;t[11]!==j?(T=n.jsx($n,{children:j}),t[11]=j,t[12]=T):T=t[12];let k;t[13]!==_||t[14]!==T?(k=n.jsxs(It,{children:[_,T]}),t[13]=_,t[14]=T,t[15]=k):k=t[15];let m;t[16]!==e?(m=e("announcements.ptBr.switchBack"),t[16]=e,t[17]=m):m=t[17];let P;t[18]!==S||t[19]!==m?(P=n.jsx(F,{variant:"outline",onClick:S,children:m}),t[18]=S,t[19]=m,t[20]=P):P=t[20];let O;t[21]===Symbol.for("react.memo_cache_sentinel")?(O=()=>p("ok"),t[21]=O):O=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(F,{onClick:O,children:C}),t[24]=C,t[25]=I):I=t[25];let E;t[26]!==P||t[27]!==I?(E=n.jsxs(Dn,{children:[P,I]}),t[26]=P,t[27]=I,t[28]=E):E=t[28];let R;t[29]!==E||t[30]!==k?(R=n.jsxs($t,{className:"sm:max-w-md",children:[N,k,E]}),t[29]=E,t[30]=k,t[31]=R):R=t[31];let B;return t[32]!==y||t[33]!==R?(B=n.jsx(Dt,{open:y,onOpenChange:v,children:R}),t[32]=y,t[33]=R,t[34]=B):B=t[34],B}function uo(t){return{...t,language:"en"}}function mo(t){return{...t,language:"pt-BR"}}function fo(t){const e=on(t);return typeof e=="string"?e:void 0}function ho(){return fo("experiment-pipeline-check"),null}function go(t){const e=M.c(1),{activeOrg:o}=t;if(!o)return null;an(o.id,{name:o.name??void 0,slug:o.slug??void 0}),rn();let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(ho,{}),e[0]=r):r=e[0],r}function po(t){const{prev:e,virtualMcpId:o,decopilotId:r,savedLayout:s,opts:a,autosendValue:i}=t,d={mainpanel:void 0};o?d.virtualmcpid=o:e.virtualmcpid&&(d.virtualmcpid=e.virtualmcpid);const f=typeof e.virtualmcpid=="string"?e.virtualmcpid:r,w=(o??f)!==f;let c,x;return a?.panel?x=a.panel:s?(x=s.tab,s.sidepanel!==void 0&&(c=s.sidepanel),s.mainpanel!==void 0&&(d.mainpanel=s.mainpanel)):!w&&e.tabId&&!ln(e.tabId)&&(x=e.tabId),c!==void 0&&(d.sidepanel=c),a?.autosend&&(d.autosend=i),{tabId:x,search:d}}const Ht="studio:thread-layout:v4",yo=50;function Ut(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 bo(t,e,o,r=yo){const s=t.filter(([a])=>a!==e);for(s.push([e,Ut(o)]);s.length>r;)s.shift();return s}function gt(){try{const t=sessionStorage.getItem(Ht);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 Gt(t){try{sessionStorage.setItem(Ht,JSON.stringify(t))}catch{}}function xo(t,e){t&&Gt(bo(gt(),t,e))}function wo(t){if(!t)return null;const e=gt().find(([o])=>o===t);return e?Ut(e[1]):null}function ui(t){if(!t)return;const e=gt(),o=e.filter(([r])=>r!==t);o.length!==e.length&&Gt(o)}function Jt(t){return{queryKey:Ue.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 mi(t){const e=M.c(10);let o;e[0]!==t?(o=Jt(t),e[0]=t,e[1]=o):o=e[1];const r=He(o);let s;e[2]!==r.data?.prompts?(s=r.data?.prompts??[],e[2]=r.data?.prompts,e[3]=s):s=e[3];let a;e[4]!==r.data?.tiles?(a=r.data?.tiles??[],e[4]=r.data?.tiles,e[5]=a):a=e[5];let i;return e[6]!==r.isLoading||e[7]!==s||e[8]!==a?(i={isLoading:r.isLoading,prompts:s,tiles:a},e[6]=r.isLoading,e[7]=s,e[8]=a,e[9]=i):i=e[9],i}function So(t){const e=M.c(31),{orgSlug:o,orgName:r,domain:s}=t,a=V();let i;e[0]!==o?(i=()=>{window.location.href=`/api/${encodeURIComponent(o)}/sso/authorize`},e[0]=o,e[1]=i):i=e[1];const d=i,f=vo;let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx("div",{className:"bg-primary/10 p-3 rounded-full","aria-hidden":"true",children:n.jsx(Tt,{className:"h-6 w-6 text-primary"})}),e[2]=h):h=e[2];let w;e[3]!==a?(w=a("common.ssoRequiredScreen.title"),e[3]=a,e[4]=w):w=e[4];let c;e[5]!==w?(c=n.jsx("h3",{className:"text-lg font-medium",children:w}),e[5]=w,e[6]=c):c=e[6];let x;e[7]!==s||e[8]!==r||e[9]!==a?(x=r?n.jsxs(n.Fragment,{children:[n.jsx("strong",{children:r})," ",a("common.ssoRequiredScreen.requiresSsoAuth"),s?` ${a("common.ssoRequiredScreen.via",{domain:s})}`:"","."]}):a("common.ssoRequiredScreen.orgRequiresSsoAuth"),e[7]=s,e[8]=r,e[9]=a,e[10]=x):x=e[10];let g;e[11]!==x?(g=n.jsx("p",{className:"text-sm text-muted-foreground",children:x}),e[11]=x,e[12]=g):g=e[12];let y;e[13]!==c||e[14]!==g?(y=n.jsxs("div",{className:"space-y-2",children:[c,g]}),e[13]=c,e[14]=g,e[15]=y):y=e[15];let l;e[16]!==a?(l=a("common.ssoRequiredScreen.signInWithSso"),e[16]=a,e[17]=l):l=e[17];let u;e[18]!==d||e[19]!==l?(u=n.jsx(F,{onClick:d,children:l}),e[18]=d,e[19]=l,e[20]=u):u=e[20];let p;e[21]!==a?(p=a("common.goBack"),e[21]=a,e[22]=p):p=e[22];let b;e[23]!==p?(b=n.jsx(F,{variant:"ghost",onClick:f,children:p}),e[23]=p,e[24]=b):b=e[24];let S;e[25]!==b||e[26]!==u?(S=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[u,b]}),e[25]=b,e[26]=u,e[27]=S):S=e[27];let v;return e[28]!==S||e[29]!==y?(v=n.jsxs(he,{children:[h,y,S]}),e[28]=S,e[29]=y,e[30]=v):v=e[30],v}function vo(){window.location.href="/"}function jo(t){const e=M.c(27),{notice:o,orgSlug:r}=t,s=V();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:n.jsx(cn,{className:"h-6 w-6 text-destructive"})}),e[0]=a):a=e[0];let i;e[1]!==o.title?(i=n.jsx("h3",{className:"text-lg font-medium",children:o.title}),e[1]=o.title,e[2]=i):i=e[2];let d;e[3]!==o.message?(d=n.jsx("p",{className:"text-sm text-muted-foreground whitespace-pre-line",children:o.message}),e[3]=o.message,e[4]=d):d=e[4];let f;e[5]!==i||e[6]!==d?(f=n.jsxs("div",{className:"space-y-2",children:[i,d]}),e[5]=i,e[6]=d,e[7]=f):f=e[7];let h;e[8]!==o.ctaLabel||e[9]!==o.ctaUrl?(h=o.ctaUrl&&o.ctaLabel?n.jsx(F,{asChild:!0,children:n.jsx("a",{href:o.ctaUrl,target:"_blank",rel:"noreferrer noopener",children:o.ctaLabel})}):null,e[8]=o.ctaLabel,e[9]=o.ctaUrl,e[10]=h):h=e[10];const w=`/${encodeURIComponent(r)}/settings/infra-billing`;let c;e[11]!==s?(c=s("common.blockedOrgScreen.goToBilling"),e[11]=s,e[12]=c):c=e[12];let x;e[13]!==w||e[14]!==c?(x=n.jsx(F,{variant:"outline",asChild:!0,children:n.jsx("a",{href:w,children:c})}),e[13]=w,e[14]=c,e[15]=x):x=e[15];let g;e[16]!==s?(g=s("common.blockedOrgScreen.switchOrg"),e[16]=s,e[17]=g):g=e[17];let y;e[18]!==g?(y=n.jsx(F,{variant:"ghost",asChild:!0,children:n.jsx("a",{href:"/",children:g})}),e[18]=g,e[19]=y):y=e[19];let l;e[20]!==y||e[21]!==h||e[22]!==x?(l=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[h,x,y]}),e[20]=y,e[21]=h,e[22]=x,e[23]=l):l=e[23];let u;return e[24]!==l||e[25]!==f?(u=n.jsxs(he,{children:[a,f,l]}),e[24]=l,e[25]=f,e[26]=u):u=e[26],u}function ko(t){const e=M.c(8);let o;e[0]!==t?(o=Ue.orgNotice(t??""),e[0]=t,e[1]=o):o=e[1];let r;e[2]!==t?(r=async()=>{const i=await fetch(`/api/${t}/notice`,{credentials:"include"});return i.ok?(await i.json()).notice??null:null},e[2]=t,e[3]=r):r=e[3];const s=!!t;let a;return e[4]!==o||e[5]!==r||e[6]!==s?(a={queryKey:o,queryFn:r,enabled:s,staleTime:6e4},e[4]=o,e[5]=r,e[6]=s,e[7]=a):a=e[7],He(a)}const To="/settings/infra-billing";function No(t){return(t.endsWith("/")?t.slice(0,-1):t).endsWith(To)}function _o(t){const e=M.c(7),{org:o,children:r}=t;let s;e[0]!==o.id||e[1]!==o.name?(s={id:o.id,organizationId:o.id,slug:"_org",name:o.name,ui:null},e[0]=o.id,e[1]=o.name,e[2]=s):s=e[2];const a=s;let i;return e[3]!==r||e[4]!==o||e[5]!==a?(i=n.jsx(yn,{org:o,project:a,children:r}),e[3]=r,e[4]=o,e[5]=a,e[6]=i):i=e[6],i}function Ao(){const t=_t(),e=Yn(),{org:o}=ht(),r=dn({strict:!1}),s=Ot(),{openPanel:a,closePanel:i}=In(),d=es(),f=ts(),h=ns(),w=ss(),c=(l,u=!0)=>t({to:".",search:l,replace:u}),x=()=>c(l=>({...l,sidepanel:!0})),g=(l,u,p)=>{const b=!!f&&f===l;f&&!b&&xo(f,{tab:s,mainpanel:r.mainpanel,sidepanel:r.sidepanel});const S=b?null:wo(l),v=Pt(o.id).id,N=po({prev:{virtualmcpid:d,tabId:s},virtualMcpId:u,decopilotId:v,savedLayout:S,opts:p,autosendValue:Zn});return w(l,()=>N.search,{virtualMcpId:u,view:{tabId:N.tabId}})};return{openSidePanel:x,setTaskId:g,createNewTask:async(l,u,p)=>{const b=crypto.randomUUID(),S=l??h;try{await e?.create({id:b,virtual_mcp_id:S,...u?{branch:u}:{}})}catch{}g(b,S,p)},openTab:a,closeTab:i}}const Po=new Set(["/$org/","/$org/home"]);function Co(){const t=M.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e={select:Eo},t[0]=e):e=t[0],Ct(e)}function Eo(t){const e=t.matches.at(-1)?.fullPath;return e!==void 0&&Po.has(e)}function Oo(){const t=M.c(63);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org",shouldThrow:!1},t[0]=e):e=t[0];const r=un(e)?.params.org,[s,a]=J.useState(!1),[i,d]=Zs(),[f,h]=Gn(),w=mn(),c=Co(),x=r??"";let g;t[1]!==x?(g=Jt(x),t[1]=x,t[2]=g):g=t[2];const y=!!r&&c;let l;t[3]!==g||t[4]!==y?(l={...g,enabled:y},t[3]=g,t[4]=y,t[5]=l):l=t[5],He(l);const{data:u}=Ke.useSession(),p=u?.user?.id;let b;t[6]!==r||t[7]!==p?(b=r&&p?fn(p,r):null,t[6]=r,t[7]=p,t[8]=b):b=t[8];const S=b;let v,N;t[9]!==w?(v=()=>{const L=z=>{if(vt(z)&&z.code==="KeyK"){z.preventDefault(),Qs();return}if(z.key==="?"&&!Bs(z.target)){z.preventDefault(),a(!0);return}vt(z)&&z.code==="BracketLeft"&&w.history.canGoBack()&&(z.preventDefault(),w.history.back())};return document.addEventListener("keydown",L),()=>document.removeEventListener("keydown",L)},N=[w],t[9]=w,t[10]=v,t[11]=N):(v=t[10],N=t[11]),J.useEffect(v,N);let A;t[12]!==r?(A=Ue.activeOrganization(r),t[12]=r,t[13]=A):A=t[13];let _;t[14]!==r||t[15]!==p?(_=async()=>{if(!r)return null;performance.mark("mesh:active-org-fetch:start");const{data:L}=await Ke.organization.getFullOrganization({query:{organizationSlug:r}}).finally(Lo),z=lt(L);return L&&!z&&localStorage.setItem(Be.lastOrgSlug(),r),p&&L&&gn(p,r,L),L},t[14]=r,t[15]=p,t[16]=_):_=t[16];const j=S?S.data:void 0,T=S?.updatedAt;let k;t[17]!==j||t[18]!==T||t[19]!==A||t[20]!==_?(k={queryKey:A,queryFn:_,initialData:j,initialDataUpdatedAt:T,gcTime:1/0,refetchOnWindowFocus:!1},t[17]=j,t[18]=T,t[19]=A,t[20]=_,t[21]=k):k=t[21];const{data:m}=Nt(k),P=m?.id,O=m?.slug,{data:C}=os(P,O),I=!!C?.ssoRequired&&!C.authenticated,{data:E}=ko(O);let R;t[22]===Symbol.for("react.memo_cache_sentinel")?(R={select:Io},t[22]=R):R=t[22];const B=Ct(R),W=E?.severity==="block"&&!No(B),q=P??"",Y=O??"";let Q;t[23]!==q||t[24]!==Y?(Q=Un({connectionId:At,orgId:q,orgSlug:Y}),t[23]=q,t[24]=Y,t[25]=Q):Q=t[25];const D=!!P&&!!O;let X;if(t[26]!==Q||t[27]!==D?(X={...Q,enabled:D},t[26]=Q,t[27]=D,t[28]=X):X=t[28],He(X),(!m||lt(m)||I||W)&&Xs(),!m){let L;return t[29]!==r?(L=n.jsx(gs,{orgSlug:r}),t[29]=r,t[30]=L):L=t[30],L}if(lt(m)){localStorage.getItem(Be.lastOrgSlug())===r&&localStorage.removeItem(Be.lastOrgSlug());let L;return t[31]!==m.name?(L=n.jsx(hn,{orgName:m.name}),t[31]=m.name,t[32]=L):L=t[32],L}if(W&&E){let L;return t[33]!==m.slug||t[34]!==E?(L=n.jsx(jo,{notice:E,orgSlug:m.slug}),t[33]=m.slug,t[34]=E,t[35]=L):L=t[35],L}if(I){let L;return t[36]!==m.id||t[37]!==m.name||t[38]!==m.slug||t[39]!==C.domain?(L=n.jsx(So,{orgId:m.id,orgSlug:m.slug,orgName:m.name,domain:C.domain}),t[36]=m.id,t[37]=m.name,t[38]=m.slug,t[39]=C.domain,t[40]=L):L=t[40],L}const oe=m.logo??null;let K;t[41]!==m||t[42]!==oe?(K={...m,logo:oe},t[41]=m,t[42]=oe,t[43]=K):K=t[43];let Z;t[44]!==m?(Z=n.jsx(go,{activeOrg:m}),t[44]=m,t[45]=Z):Z=t[45];let ee;t[46]===Symbol.for("react.memo_cache_sentinel")?(ee=n.jsx(pn,{}),t[46]=ee):ee=t[46];let te;t[47]===Symbol.for("react.memo_cache_sentinel")?(te=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(Fs,{}),n.jsx(oo,{})]}),t[47]=te):te=t[47];let ne;t[48]!==i||t[49]!==d?(ne=i&&n.jsx(Vs,{open:i,onOpenChange:d}),t[48]=i,t[49]=d,t[50]=ne):ne=t[50];let H;t[51]!==f||t[52]!==h?(H=f&&n.jsx(Jn,{open:!0,onOpenChange:h,source:Vn()}),t[51]=f,t[52]=h,t[53]=H):H=t[53];let U;t[54]!==s?(U=n.jsx(Ks,{open:s,onOpenChange:a}),t[54]=s,t[55]=U):U=t[55];let se;t[56]===Symbol.for("react.memo_cache_sentinel")?(se=n.jsx(co,{}),t[56]=se):se=t[56];let ae;return t[57]!==K||t[58]!==Z||t[59]!==ne||t[60]!==H||t[61]!==U?(ae=n.jsxs(_o,{org:K,children:[Z,ee,te,ne,H,U,se]}),t[57]=K,t[58]=Z,t[59]=ne,t[60]=H,t[61]=U,t[62]=ae):ae=t[62],ae}function Io(t){return t.location.pathname}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 $o(){const t=M.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Xn,{children:n.jsx(Oo,{})}),t[0]=e):e=t[0],e}const fi=Object.freeze(Object.defineProperty({__proto__:null,default:$o,usePanelActions:Ao},Symbol.toStringTag,{value:"Module"}));export{G as K,ps as L,Ao as a,vt as b,Ns as c,Bs as d,mi as e,ui as f,fi as g,zt as i,Qs as o,ci as r,di as s,ko as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as ee,X as te,o as oe,r as M,j as t,B as Q,n as _,aS as ae,Z as ce,t as w,ao as de,c as se,l as me,I as ue,F as pe,H as ge,G as fe,K as G,e$ as he}from"./index-LBqA-ZwS.js";import{i as xe}from"./DotsVertical-OvfvRPcf.js";import{i as ie,a as je}from"./ZoomOut-DGJt2ZOH.js";import{s as ke}from"./Trash01-CuaXxM5C.js";import{i as ve}from"./Upload01-DrihoScl.js";import{S as ye}from"./search-input-DNCPqRQn.js";import{f as Se,e as be,b as we,A as Ce,a as De,d as Ne,c as Pe,g as Ae}from"./alert-dialog-DNPqbgpS.js";import{E as Y}from"./empty-state-C3ObDFbb.js";import{C as Ee}from"./collection-tabs-DvLdBj3Z.js";import{S as Me,F as Te}from"./folder-icon-DI8RbZE8.js";import{p as Oe,i as Ie,r as $e}from"./use-org-fs-BK-5u4MR.js";import{S as Re,H as Z,d as ze}from"./location-zK0I9Ia6.js";import{p as Fe}from"./skill-md-ChfVs4uF.js";import"./SearchMd-24zvxDRs.js";import"./badge-BHUGKNWs.js";import"./dialog-BaUTSxMN.js";import"./X-Dv9AnRlg.js";import"./markdown-U5k2vy3J.js";import"./Check-CXicUAOa.js";import"./Copy01-Dr3v4gYp.js";import"./Image01-nUj6_DO-.js";import"./org-file-open-context-BtoXgtv0.js";import"./use-mobile-D86gQiqH.js";import"./use-panel-navigate-FaJ2R6On.js";import"./thread-route-BcHLmvou.js";import"./use-project-scope-CJdExTjB.js";import"./repository-binding-D1nnAWYo.js";import"./use-mcp-client-DEGTm1W0.js";import"./auth-DDpWnpgU.js";import"./file-preview-DKsb5sxq.js";import"./utils-CVtWzP8U.js";import"./editor-ByUsSScY.js";import"./file-type-icon-BslTQPeb.js";import"./useInfiniteQuery-fv1BKri9.js";import"./infiniteQueryObserver-BOfNlSlD.js";const J=200,_e=new Set(["node_modules","__pycache__"]);function q(s){const[,...e]=s.webkitRelativePath.split("/");return e.length>0?e.join("/"):s.name}function Le(s){return q(s).split("/").every(e=>!e.startsWith(".")&&!_e.has(e))}function Be(s){return s.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"skill"}function Ke(s,e){const l=new Map;for(const r of s){const c=q(r).split("/");c.pop();const a=["skills",e,...c].join("/");l.set(a,[...l.get(a)??[],r])}return l}async function He(s,e){const r=(await Promise.allSettled([...s].map(([c,a])=>e({dir:c,files:a})))).find(c=>c.status==="rejected");if(r)throw r.reason}function Ge(s,e){const l=Fe(e),r=`skills/${s}`;return{id:`home/${r}`,name:l.name??s,description:l.description,disableModelInvocation:l.disableModelInvocation,source:"home",volume:Z,path:r,sandboxPath:`${Re}/${Z}/${r}`}}const L="*";function B(s){return s.volume==="home"}function le(s,e){const l=s.indexOf(":");return l===-1?{label:e,glyph:ie}:{label:s.slice(l+1),glyph:s.startsWith("repo:")?de:je}}function Qe(s){const e=se.c(48),{entry:l,pending:r,onOpen:c,onDelete:a}=s,o=ee(),{org:g}=te();let C;e[0]!==l.source||e[1]!==g.name?(C=le(l.source,g.name),e[0]=l.source,e[1]=g.name,e[2]=C):C=e[2];const{label:T,glyph:I}=C;let D;e[3]!==l?(D=B(l),e[3]=l,e[4]=D):D=e[4];const $=D,N=r?"opacity-60":"hover:bg-muted/50";let f;e[5]!==N?(f=me("relative transition-colors group overflow-hidden flex flex-col h-full",N),e[5]=N,e[6]=f):f=e[6];let d;e[7]!==l.name||e[8]!==c||e[9]!==r?(d=!r&&t.jsx("button",{type:"button",onClick:c,className:"absolute inset-0 z-0","aria-label":l.name}),e[7]=l.name,e[8]=c,e[9]=r,e[10]=d):d=e[10];const P=$?"default":"system",R=!$;let h;e[11]!==I||e[12]!==P||e[13]!==R?(h=t.jsx(Te,{glyph:I,tone:P,readOnly:R,className:"size-8 shrink-0"}),e[11]=I,e[12]=P,e[13]=R,e[14]=h):h=e[14];let x;e[15]!==a||e[16]!==o?(x=a&&t.jsx("div",{className:"relative z-10 pointer-events-auto transition-opacity sm:opacity-0 sm:group-hover:opacity-100",children:t.jsxs(ue,{children:[t.jsx(pe,{asChild:!0,children:t.jsx(Q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:t.jsx(xe,{size:16})})}),t.jsx(ge,{align:"end",children:t.jsxs(fe,{variant:"destructive",onClick:K=>{K.stopPropagation(),a()},children:[t.jsx(ke,{size:16}),o("settings.skills.deleteButton")]})})]})}),e[15]=a,e[16]=o,e[17]=x):x=e[17];let j;e[18]!==h||e[19]!==x?(j=t.jsxs("div",{className:"flex items-start justify-between",children:[h,x]}),e[18]=h,e[19]=x,e[20]=j):j=e[20];let b;e[21]!==l.name?(b=t.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:l.name}),e[21]=l.name,e[22]=b):b=e[22];let k;e[23]!==l.description||e[24]!==o?(k=l.description||o("settings.skills.noDescription"),e[23]=l.description,e[24]=o,e[25]=k):k=e[25];let m;e[26]!==k?(m=t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:k}),e[26]=k,e[27]=m):m=e[27];let v;e[28]!==b||e[29]!==m?(v=t.jsxs("div",{className:"flex flex-col gap-1",children:[b,m]}),e[28]=b,e[29]=m,e[30]=v):v=e[30];let u;e[31]!==j||e[32]!==v?(u=t.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[j,v]}),e[31]=j,e[32]=v,e[33]=u):u=e[33];let y;e[34]!==T||e[35]!==r||e[36]!==o?(y=r?o("settings.skills.importing"):T,e[34]=T,e[35]=r,e[36]=o,e[37]=y):y=e[37];let p;e[38]!==y?(p=t.jsx("div",{className:"border-t border-border mt-auto",children:t.jsx("div",{className:"h-10 flex items-center px-4.5",children:t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:y})})}),e[38]=y,e[39]=p):p=e[39];let S;e[40]!==u||e[41]!==p?(S=t.jsxs("div",{className:"flex flex-col flex-1 pointer-events-none",children:[u,p]}),e[40]=u,e[41]=p,e[42]=S):S=e[42];let O;return e[43]!==r||e[44]!==S||e[45]!==f||e[46]!==d?(O=t.jsxs(he,{"aria-busy":r,className:f,children:[d,S]}),e[43]=r,e[44]=S,e[45]=f,e[46]=d,e[47]=O):O=e[47],O}function V(s){const e=se.c(2),{children:l}=s;let r;return e[0]!==l?(r=t.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:l}),e[0]=l,e[1]=r):r=e[1],r}function Nt(){const s=ee(),{org:e}=te(),l=Oe(),{remove:r,upload:c}=Ie("home"),a=oe(),o=M.useRef(null),[g,C]=M.useState(""),[T,I]=M.useState(L),[D,$]=M.useState(!1),[N,f]=M.useState(null),[d,P]=M.useState(null),[R,h]=M.useState(null),x=()=>{a.invalidateQueries({queryKey:G.slashSkills(e.id)}),a.invalidateQueries({queryKey:G.orgFsSkills(e.id)})},j=i=>a.setQueryData(G.slashSkills(e.id),n=>i(n??[]));async function b(i){const n=[...i??[]];if(o.current&&(o.current.value=""),n.length===0)return;const A=n[0]?.webkitRelativePath??"";if(!A){w.error(s("settings.skills.importNeedsFolder"));return}const H=A.split("/")[0]??"",F=n.filter(Le),U=F.find(E=>q(E)==="SKILL.md");if(!U){w.error(s("settings.skills.importMissingSkillMd"));return}if(F.length>J){w.error(s("settings.skills.importTooManyFiles",{count:String(F.length),max:String(J)}));return}const z=Be(H),X=`skills/${z}`;let W=!1;$(!0);try{if(await $e(e.slug,"home",X)){w.error(s("settings.skills.importSlugTaken",{slug:z}));return}W=!0;const E=Ge(z,await U.text());j(ne=>[E,...ne]),h(E.id),await He(Ke(F,z),c.mutateAsync),w.success(s("settings.skills.importSuccess",{name:z}))}catch(E){W&&await r.mutateAsync(X).catch(()=>{}),w.error(E instanceof Error?E.message:s("settings.skills.importError"))}finally{h(null),x(),$(!1)}}const k=g.toLowerCase(),m=(l.data??[]).filter(i=>i.name.toLowerCase().includes(k)||(i.description??"").toLowerCase().includes(k)).sort((i,n)=>Number(B(n))-Number(B(i))||i.name.localeCompare(n.name)),v=new Set((l.data??[]).map(i=>i.source)),u=new Map;for(const i of m)u.set(i.source,(u.get(i.source)??0)+1);const y=[{id:L,label:s("settings.skills.filterAll"),count:m.length},...[...v].map(i=>({id:i,label:le(i,e.name).label,count:u.get(i)??0}))],p=v.has(T)?T:L,S=p===L?m:m.filter(i=>i.source===p),O=i=>f(ze(i.volume,i.path)),K=async()=>{if(!d)return;const{id:i,path:n}=d;P(null),j(A=>A.filter(H=>H.id!==i));try{await r.mutateAsync(n),w.success(s("settings.skills.deleteSuccess"))}catch(A){w.error(A instanceof Error?A.message:s("settings.skills.deleteError"))}finally{x()}},re=t.jsxs(Q,{size:"sm",disabled:D,onClick:()=>o.current?.click(),children:[t.jsx(ve,{size:14}),s(D?"settings.skills.importing":"settings.skills.importButton")]});return t.jsxs(_,{children:[t.jsx(_.Content,{children:t.jsx(_.Container,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[t.jsx(_.Title,{actions:re,children:s("settings.skills.pageTitle")}),t.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[t.jsx(ye,{value:g,onChange:C,placeholder:s("settings.skills.searchPlaceholder"),className:"w-full md:w-[375px]",onKeyDown:i=>{i.key==="Escape"&&(C(""),i.target.blur())}}),t.jsx("input",{ref:o,type:"file",multiple:!0,webkitdirectory:"",className:"hidden",onChange:i=>{b(i.target.files)}})]}),y.length>2&&t.jsx(Ee,{placement:"page",tabs:y,activeTab:p,onTabChange:I}),l.isPending?t.jsx("div",{className:"@container",children:t.jsx(V,{children:Array.from({length:8},(i,n)=>t.jsx(ae,{className:"h-[168px] rounded-xl"},n))})}):l.isError?t.jsx("div",{className:"flex items-center justify-center py-20",children:t.jsx(Y,{image:t.jsx(ce,{size:48,className:"text-muted-foreground"}),title:s("settings.skills.errorTitle"),description:l.error instanceof Error?l.error.message:s("settings.skills.errorDescription"),actions:t.jsx(Q,{size:"sm",variant:"outline",onClick:()=>{l.refetch()},children:s("settings.skills.retry")})})}):S.length===0?t.jsx("div",{className:"flex items-center justify-center py-20",children:t.jsx(Y,{image:t.jsx(ie,{size:48,className:"text-muted-foreground"}),title:s(g?"settings.skills.noResultsTitle":"settings.skills.emptyTitle"),description:g?s("settings.skills.noResultsDescription",{search:g}):s("settings.skills.emptyDescription"),actions:!1})}):t.jsx("div",{className:"@container",children:t.jsx(V,{children:S.map(i=>{const n=i.id===R;return t.jsx(Qe,{entry:i,pending:n,onOpen:()=>O(i),onDelete:B(i)&&!n?()=>P(i):void 0},i.id)})})})]})})}),N&&t.jsx(Me,{skillPath:N,onClose:()=>f(null)},N),t.jsx(Se,{open:d!==null,onOpenChange:i=>!i&&P(null),children:t.jsxs(be,{children:[t.jsxs(we,{children:[t.jsx(Ce,{children:s("settings.skills.deleteDialogTitle")}),t.jsx(De,{children:s("settings.skills.deleteDialogDescription",{name:d?.name??""})})]}),t.jsxs(Ne,{children:[t.jsx(Pe,{children:s("settings.skills.cancel")}),t.jsx(Ae,{onClick:K,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:s("settings.skills.deleteButton")})]})]})})]})}export{Nt as default};
|
|
1
|
+
import{b as ee,X as te,o as oe,r as M,j as t,B as Q,n as _,aS as ae,Z as ce,t as w,ao as de,c as se,l as me,I as ue,F as pe,H as ge,G as fe,K as G,e$ as he}from"./index-Dp_K-tWq.js";import{i as xe}from"./DotsVertical-CvByrwlw.js";import{i as ie,a as je}from"./ZoomOut-C7AJpRh5.js";import{s as ke}from"./Trash01-D7ylqCya.js";import{i as ve}from"./Upload01-DNxaQbwq.js";import{S as ye}from"./search-input-B1vfwvsf.js";import{f as Se,e as be,b as we,A as Ce,a as De,d as Ne,c as Pe,g as Ae}from"./alert-dialog-BR8K4NXo.js";import{E as Y}from"./empty-state-B5RpF5dw.js";import{C as Ee}from"./collection-tabs-C89tqghq.js";import{S as Me,F as Te}from"./folder-icon-Dl76i-NI.js";import{p as Oe,i as Ie,r as $e}from"./use-org-fs-BIChLUk1.js";import{S as Re,H as Z,d as ze}from"./location-zK0I9Ia6.js";import{p as Fe}from"./skill-md-ChfVs4uF.js";import"./SearchMd-BNPYUXLP.js";import"./badge-Hx3u6P7O.js";import"./dialog-Cx4yDOtp.js";import"./X-BQNprmBf.js";import"./markdown-CbWncYsp.js";import"./Check-BvCNBJe8.js";import"./Copy01-B3CEXdpv.js";import"./Image01-CPJAhPOP.js";import"./org-file-open-context-CTB-BA9v.js";import"./use-mobile-D_zVYgcY.js";import"./use-panel-navigate-f5p30JNB.js";import"./thread-route-DDpItDrx.js";import"./use-project-scope-Bc3Mf8u8.js";import"./repository-binding-CzSKWD7H.js";import"./use-mcp-client-BUFdpLoI.js";import"./auth-cALcTtmh.js";import"./file-preview--_ce6-u1.js";import"./utils-CbyoMcko.js";import"./editor-CDzOZBXR.js";import"./file-type-icon-z_VVXBs0.js";import"./useInfiniteQuery-LSeshq9l.js";import"./infiniteQueryObserver-cPdLUo2i.js";const J=200,_e=new Set(["node_modules","__pycache__"]);function q(s){const[,...e]=s.webkitRelativePath.split("/");return e.length>0?e.join("/"):s.name}function Le(s){return q(s).split("/").every(e=>!e.startsWith(".")&&!_e.has(e))}function Be(s){return s.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"skill"}function Ke(s,e){const l=new Map;for(const r of s){const c=q(r).split("/");c.pop();const a=["skills",e,...c].join("/");l.set(a,[...l.get(a)??[],r])}return l}async function He(s,e){const r=(await Promise.allSettled([...s].map(([c,a])=>e({dir:c,files:a})))).find(c=>c.status==="rejected");if(r)throw r.reason}function Ge(s,e){const l=Fe(e),r=`skills/${s}`;return{id:`home/${r}`,name:l.name??s,description:l.description,disableModelInvocation:l.disableModelInvocation,source:"home",volume:Z,path:r,sandboxPath:`${Re}/${Z}/${r}`}}const L="*";function B(s){return s.volume==="home"}function le(s,e){const l=s.indexOf(":");return l===-1?{label:e,glyph:ie}:{label:s.slice(l+1),glyph:s.startsWith("repo:")?de:je}}function Qe(s){const e=se.c(48),{entry:l,pending:r,onOpen:c,onDelete:a}=s,o=ee(),{org:g}=te();let C;e[0]!==l.source||e[1]!==g.name?(C=le(l.source,g.name),e[0]=l.source,e[1]=g.name,e[2]=C):C=e[2];const{label:T,glyph:I}=C;let D;e[3]!==l?(D=B(l),e[3]=l,e[4]=D):D=e[4];const $=D,N=r?"opacity-60":"hover:bg-muted/50";let f;e[5]!==N?(f=me("relative transition-colors group overflow-hidden flex flex-col h-full",N),e[5]=N,e[6]=f):f=e[6];let d;e[7]!==l.name||e[8]!==c||e[9]!==r?(d=!r&&t.jsx("button",{type:"button",onClick:c,className:"absolute inset-0 z-0","aria-label":l.name}),e[7]=l.name,e[8]=c,e[9]=r,e[10]=d):d=e[10];const P=$?"default":"system",R=!$;let h;e[11]!==I||e[12]!==P||e[13]!==R?(h=t.jsx(Te,{glyph:I,tone:P,readOnly:R,className:"size-8 shrink-0"}),e[11]=I,e[12]=P,e[13]=R,e[14]=h):h=e[14];let x;e[15]!==a||e[16]!==o?(x=a&&t.jsx("div",{className:"relative z-10 pointer-events-auto transition-opacity sm:opacity-0 sm:group-hover:opacity-100",children:t.jsxs(ue,{children:[t.jsx(pe,{asChild:!0,children:t.jsx(Q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:t.jsx(xe,{size:16})})}),t.jsx(ge,{align:"end",children:t.jsxs(fe,{variant:"destructive",onClick:K=>{K.stopPropagation(),a()},children:[t.jsx(ke,{size:16}),o("settings.skills.deleteButton")]})})]})}),e[15]=a,e[16]=o,e[17]=x):x=e[17];let j;e[18]!==h||e[19]!==x?(j=t.jsxs("div",{className:"flex items-start justify-between",children:[h,x]}),e[18]=h,e[19]=x,e[20]=j):j=e[20];let b;e[21]!==l.name?(b=t.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:l.name}),e[21]=l.name,e[22]=b):b=e[22];let k;e[23]!==l.description||e[24]!==o?(k=l.description||o("settings.skills.noDescription"),e[23]=l.description,e[24]=o,e[25]=k):k=e[25];let m;e[26]!==k?(m=t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:k}),e[26]=k,e[27]=m):m=e[27];let v;e[28]!==b||e[29]!==m?(v=t.jsxs("div",{className:"flex flex-col gap-1",children:[b,m]}),e[28]=b,e[29]=m,e[30]=v):v=e[30];let u;e[31]!==j||e[32]!==v?(u=t.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[j,v]}),e[31]=j,e[32]=v,e[33]=u):u=e[33];let y;e[34]!==T||e[35]!==r||e[36]!==o?(y=r?o("settings.skills.importing"):T,e[34]=T,e[35]=r,e[36]=o,e[37]=y):y=e[37];let p;e[38]!==y?(p=t.jsx("div",{className:"border-t border-border mt-auto",children:t.jsx("div",{className:"h-10 flex items-center px-4.5",children:t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:y})})}),e[38]=y,e[39]=p):p=e[39];let S;e[40]!==u||e[41]!==p?(S=t.jsxs("div",{className:"flex flex-col flex-1 pointer-events-none",children:[u,p]}),e[40]=u,e[41]=p,e[42]=S):S=e[42];let O;return e[43]!==r||e[44]!==S||e[45]!==f||e[46]!==d?(O=t.jsxs(he,{"aria-busy":r,className:f,children:[d,S]}),e[43]=r,e[44]=S,e[45]=f,e[46]=d,e[47]=O):O=e[47],O}function V(s){const e=se.c(2),{children:l}=s;let r;return e[0]!==l?(r=t.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:l}),e[0]=l,e[1]=r):r=e[1],r}function Nt(){const s=ee(),{org:e}=te(),l=Oe(),{remove:r,upload:c}=Ie("home"),a=oe(),o=M.useRef(null),[g,C]=M.useState(""),[T,I]=M.useState(L),[D,$]=M.useState(!1),[N,f]=M.useState(null),[d,P]=M.useState(null),[R,h]=M.useState(null),x=()=>{a.invalidateQueries({queryKey:G.slashSkills(e.id)}),a.invalidateQueries({queryKey:G.orgFsSkills(e.id)})},j=i=>a.setQueryData(G.slashSkills(e.id),n=>i(n??[]));async function b(i){const n=[...i??[]];if(o.current&&(o.current.value=""),n.length===0)return;const A=n[0]?.webkitRelativePath??"";if(!A){w.error(s("settings.skills.importNeedsFolder"));return}const H=A.split("/")[0]??"",F=n.filter(Le),U=F.find(E=>q(E)==="SKILL.md");if(!U){w.error(s("settings.skills.importMissingSkillMd"));return}if(F.length>J){w.error(s("settings.skills.importTooManyFiles",{count:String(F.length),max:String(J)}));return}const z=Be(H),X=`skills/${z}`;let W=!1;$(!0);try{if(await $e(e.slug,"home",X)){w.error(s("settings.skills.importSlugTaken",{slug:z}));return}W=!0;const E=Ge(z,await U.text());j(ne=>[E,...ne]),h(E.id),await He(Ke(F,z),c.mutateAsync),w.success(s("settings.skills.importSuccess",{name:z}))}catch(E){W&&await r.mutateAsync(X).catch(()=>{}),w.error(E instanceof Error?E.message:s("settings.skills.importError"))}finally{h(null),x(),$(!1)}}const k=g.toLowerCase(),m=(l.data??[]).filter(i=>i.name.toLowerCase().includes(k)||(i.description??"").toLowerCase().includes(k)).sort((i,n)=>Number(B(n))-Number(B(i))||i.name.localeCompare(n.name)),v=new Set((l.data??[]).map(i=>i.source)),u=new Map;for(const i of m)u.set(i.source,(u.get(i.source)??0)+1);const y=[{id:L,label:s("settings.skills.filterAll"),count:m.length},...[...v].map(i=>({id:i,label:le(i,e.name).label,count:u.get(i)??0}))],p=v.has(T)?T:L,S=p===L?m:m.filter(i=>i.source===p),O=i=>f(ze(i.volume,i.path)),K=async()=>{if(!d)return;const{id:i,path:n}=d;P(null),j(A=>A.filter(H=>H.id!==i));try{await r.mutateAsync(n),w.success(s("settings.skills.deleteSuccess"))}catch(A){w.error(A instanceof Error?A.message:s("settings.skills.deleteError"))}finally{x()}},re=t.jsxs(Q,{size:"sm",disabled:D,onClick:()=>o.current?.click(),children:[t.jsx(ve,{size:14}),s(D?"settings.skills.importing":"settings.skills.importButton")]});return t.jsxs(_,{children:[t.jsx(_.Content,{children:t.jsx(_.Container,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[t.jsx(_.Title,{actions:re,children:s("settings.skills.pageTitle")}),t.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[t.jsx(ye,{value:g,onChange:C,placeholder:s("settings.skills.searchPlaceholder"),className:"w-full md:w-[375px]",onKeyDown:i=>{i.key==="Escape"&&(C(""),i.target.blur())}}),t.jsx("input",{ref:o,type:"file",multiple:!0,webkitdirectory:"",className:"hidden",onChange:i=>{b(i.target.files)}})]}),y.length>2&&t.jsx(Ee,{placement:"page",tabs:y,activeTab:p,onTabChange:I}),l.isPending?t.jsx("div",{className:"@container",children:t.jsx(V,{children:Array.from({length:8},(i,n)=>t.jsx(ae,{className:"h-[168px] rounded-xl"},n))})}):l.isError?t.jsx("div",{className:"flex items-center justify-center py-20",children:t.jsx(Y,{image:t.jsx(ce,{size:48,className:"text-muted-foreground"}),title:s("settings.skills.errorTitle"),description:l.error instanceof Error?l.error.message:s("settings.skills.errorDescription"),actions:t.jsx(Q,{size:"sm",variant:"outline",onClick:()=>{l.refetch()},children:s("settings.skills.retry")})})}):S.length===0?t.jsx("div",{className:"flex items-center justify-center py-20",children:t.jsx(Y,{image:t.jsx(ie,{size:48,className:"text-muted-foreground"}),title:s(g?"settings.skills.noResultsTitle":"settings.skills.emptyTitle"),description:g?s("settings.skills.noResultsDescription",{search:g}):s("settings.skills.emptyDescription"),actions:!1})}):t.jsx("div",{className:"@container",children:t.jsx(V,{children:S.map(i=>{const n=i.id===R;return t.jsx(Qe,{entry:i,pending:n,onOpen:()=>O(i),onDelete:B(i)&&!n?()=>P(i):void 0},i.id)})})})]})})}),N&&t.jsx(Me,{skillPath:N,onClose:()=>f(null)},N),t.jsx(Se,{open:d!==null,onOpenChange:i=>!i&&P(null),children:t.jsxs(be,{children:[t.jsxs(we,{children:[t.jsx(Ce,{children:s("settings.skills.deleteDialogTitle")}),t.jsx(De,{children:s("settings.skills.deleteDialogDescription",{name:d?.name??""})})]}),t.jsxs(Ne,{children:[t.jsx(Pe,{children:s("settings.skills.cancel")}),t.jsx(Ae,{onClick:K,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:s("settings.skills.deleteButton")})]})]})})]})}export{Nt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as B,X as L,r as v,j as e,n as x,fp as k,ee as E,ef as y,eg as a,fP as D,B as u,q as C,t as c,c as z}from"./index-
|
|
1
|
+
import{b as B,X as L,r as v,j as e,n as x,fp as k,ee as E,ef as y,eg as a,fP as D,B as u,q as C,t as c,c as z}from"./index-Dp_K-tWq.js";import{D as T}from"./domain-settings-5_gXdfZO.js";import{f as O,e as R,b as q,A as F,d as M,c as U,g as $}from"./alert-dialog-BR8K4NXo.js";import{I as d}from"./input-DMPfmuCm.js";import{S as H}from"./switch-BsrLPJk-.js";import{a as X,b as G,c as J,d as K}from"./use-org-sso-BeqR2AAG.js";import{s as Q}from"./Trash01-D7ylqCya.js";import{R as V}from"./require-capability-CMxqoohm.js";import"./badge-Hx3u6P7O.js";import"./select-CoyCwgyB.js";import"./index-atJuiikW.js";import"./Check-BvCNBJe8.js";import"./ChevronUp-BwSgHBqC.js";import"./access-gate-DtOf3EFS.js";import"./capability-load-error-BmxCCm5y.js";function W(){const s=B(),{org:o}=L(),{data:f,isLoading:P}=X(o.id,o.slug),h=G(o.id,o.slug),S=J(o.id,o.slug),b=K(o.id,o.slug),[i,l]=v.useState({issuer:"",clientId:"",clientSecret:"",discoveryEndpoint:"",domain:"",scopes:"openid email profile"}),[g,p]=v.useState(!1),[I,j]=v.useState(!1),m=f?.configured&&f.config,n=f?.config,N=()=>{n&&l({issuer:n.issuer,clientId:n.clientId,clientSecret:"",discoveryEndpoint:n.discoveryEndpoint??"",domain:n.domain,scopes:n.scopes.join(" ")}),p(!0)},_=async()=>{if(!i.issuer||!i.clientId||!i.domain){c.error(s("settings.orgSso.requiredFieldsError"));return}if(!m&&!i.clientSecret){c.error(s("settings.orgSso.clientSecretRequiredError"));return}try{await h.mutateAsync({issuer:i.issuer,clientId:i.clientId,clientSecret:i.clientSecret,discoveryEndpoint:i.discoveryEndpoint||void 0,scopes:i.scopes.split(/\s+/).filter(Boolean),domain:i.domain,enforced:n?.enforced??!1}),C(m?"sso_config_updated":"sso_configured",{organization_id:o.id,email_domain:i.domain}),c.success(s("settings.orgSso.configurationSavedSuccess")),p(!1)}catch(t){c.error(t instanceof Error?t.message:s("settings.orgSso.saveSsoConfigError"))}},w=async()=>{try{await S.mutateAsync(),C("sso_config_removed",{organization_id:o.id}),c.success(s("settings.orgSso.configurationRemovedSuccess")),p(!1),j(!1)}catch{c.error(s("settings.orgSso.removeSsoConfigError"))}},A=async t=>{try{await b.mutateAsync(t),C("sso_enforcement_toggled",{organization_id:o.id,enforced:t}),c.success(s(t?"settings.orgSso.enforcementEnabledSuccess":"settings.orgSso.enforcementDisabledSuccess"))}catch{c.error(s("settings.orgSso.toggleEnforcementError"))}};return e.jsxs(x,{children:[e.jsx(x.Content,{children:e.jsx(x.Container,{children:e.jsxs(k,{children:[e.jsx(x.Title,{children:s("settings.orgSso.securityTitle")}),e.jsx(T,{}),P?e.jsx("div",{className:"text-sm text-muted-foreground",children:s("settings.orgSso.loading")}):e.jsxs(e.Fragment,{children:[m&&!g&&e.jsx(E,{title:s("settings.orgSso.sectionTitle"),children:e.jsxs(y,{children:[e.jsx(a,{title:s("settings.orgSso.providerLabel"),action:e.jsx("span",{className:"font-medium",children:n.issuer})}),e.jsx(a,{title:s("settings.orgSso.clientIdLabel"),action:e.jsx("span",{className:"font-mono text-xs",children:n.clientId})}),e.jsx(a,{title:s("settings.orgSso.domainLabel"),action:e.jsx("span",{className:"font-medium",children:n.domain})}),e.jsx(a,{title:s("settings.orgSso.scopesLabel"),action:e.jsx("span",{className:"font-mono text-xs",children:n.scopes.join(" ")})}),e.jsx("div",{className:"h-px bg-border mx-5"}),e.jsx(a,{title:s("settings.orgSso.enforceSsoLabel"),description:s("settings.orgSso.enforceSsoDescription"),action:e.jsx(H,{checked:n.enforced,onCheckedChange:A,disabled:b.isPending})}),e.jsxs(D,{children:[e.jsxs(u,{variant:"ghost",size:"sm",onClick:()=>j(!0),disabled:S.isPending,className:"text-destructive hover:text-destructive mr-auto",children:[e.jsx(Q,{size:14}),s("settings.orgSso.removeButton")]}),e.jsx(u,{variant:"outline",size:"sm",onClick:()=>{window.open(`/api/${o.slug}/sso/authorize`,"_blank")},children:s("settings.orgSso.testSsoButton")}),e.jsx(u,{variant:"outline",size:"sm",onClick:N,children:s("settings.orgSso.editConfigButton")})]})]})}),(!m||g)&&e.jsx(E,{title:s("settings.orgSso.sectionTitle"),children:e.jsxs(y,{children:[e.jsx(a,{title:s("settings.orgSso.issuerUrlLabel"),description:s("settings.orgSso.issuerUrlDescription"),action:e.jsx(d,{id:"sso-issuer",placeholder:s("settings.orgSso.issuerUrlPlaceholder"),value:i.issuer,onChange:t=>l(r=>({...r,issuer:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.clientIdLabel"),action:e.jsx(d,{id:"sso-client-id",placeholder:s("settings.orgSso.clientIdPlaceholder"),value:i.clientId,onChange:t=>l(r=>({...r,clientId:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.clientSecretLabel"),description:g&&m?s("settings.orgSso.clientSecretEditDescription"):void 0,action:e.jsx(d,{id:"sso-client-secret",type:"password",placeholder:s("settings.orgSso.clientSecretPlaceholder"),value:i.clientSecret,onChange:t=>l(r=>({...r,clientSecret:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.emailDomainLabel"),description:s("settings.orgSso.emailDomainDescription"),action:e.jsx(d,{id:"sso-domain",placeholder:s("settings.orgSso.emailDomainPlaceholder"),value:i.domain,onChange:t=>l(r=>({...r,domain:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.scopesLabel"),action:e.jsx(d,{id:"sso-scopes",placeholder:s("settings.orgSso.scopesPlaceholder"),value:i.scopes,onChange:t=>l(r=>({...r,scopes:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.discoveryEndpointLabel"),description:s("settings.orgSso.discoveryEndpointDescription"),action:e.jsx(d,{id:"sso-discovery",placeholder:s("settings.orgSso.discoveryEndpointPlaceholder"),value:i.discoveryEndpoint,onChange:t=>l(r=>({...r,discoveryEndpoint:t.target.value})),className:"w-[280px]"})}),e.jsxs(D,{children:[g&&e.jsx(u,{variant:"outline",size:"sm",onClick:()=>p(!1),children:s("settings.orgSso.cancelButton")}),e.jsx(u,{onClick:_,disabled:h.isPending,size:"sm",children:h.isPending?s("settings.orgSso.savingButton"):s(g?"settings.orgSso.updateButton":"settings.orgSso.configureSsoButton")})]})]})})]})]})})}),e.jsx(O,{open:I,onOpenChange:j,children:e.jsxs(R,{children:[e.jsx(q,{children:e.jsx(F,{children:s("settings.orgSso.removeConfirmation")})}),e.jsxs(M,{children:[e.jsx(U,{disabled:S.isPending,children:s("settings.orgSso.cancelButton")}),e.jsx($,{onClick:w,disabled:S.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:s("settings.orgSso.removeButton")})]})]})})]})}function ue(){const s=z.c(1);let o;return s[0]===Symbol.for("react.memo_cache_sentinel")?(o=e.jsx(V,{capability:"org:manage",area:"security",children:e.jsx(W,{})}),s[0]=o):o=s[0],o}export{ue as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{o as Ye,j as Qe,h as ie,D as Ge,p as ze,q as Ze}from"./index-BuCSZoG-.js";import{r as p,eJ as Je,eK as we,eL as et,eM as j,eN as te,j as I,aR as tt,eO as nt,eP as ne,eQ as ot,eR as rt,eS as st,eT as it,eU as at,eV as lt,eW as Ce,eX as ct,c as X,D as ut,K as dt,eY as ft,eZ as gt,e_ as mt,b as pt,l as vt,h as ht}from"./index-LBqA-ZwS.js";import{g as bt,d as xt}from"./gateway-client-BvHlKdmu.js";import{A as yt}from"./agent-icon-B_AZohhm.js";var Xn=Ye;var Rt=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],ae=Rt.join(","),Ie=typeof Element>"u",G=Ie?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,J=!Ie&&Element.prototype.getRootNode?function(n){var e;return n==null||(e=n.getRootNode)===null||e===void 0?void 0:e.call(n)}:function(n){return n?.ownerDocument},ee=function(e,t){var o;t===void 0&&(t=!0);var r=e==null||(o=e.getAttribute)===null||o===void 0?void 0:o.call(e,"inert"),s=r===""||r==="true",i=s||t&&e&&(typeof e.closest=="function"?e.closest("[inert]"):ee(e.parentNode));return i},St=function(e){var t,o=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return o===""||o==="true"},Et=function(e,t,o){if(ee(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(ae));return t&&G.call(e,ae)&&r.unshift(e),r=r.filter(o),r},le=function(e,t,o){for(var r=[],s=Array.from(e);s.length;){var i=s.shift();if(!ee(i,!1))if(i.tagName==="SLOT"){var a=i.assignedElements(),l=a.length?a:i.children,c=le(l,!0,o);o.flatten?r.push.apply(r,c):r.push({scopeParent:i,candidates:c})}else{var d=G.call(i,ae);d&&o.filter(i)&&(t||!e.includes(i))&&r.push(i);var u=i.shadowRoot||typeof o.getShadowRoot=="function"&&o.getShadowRoot(i),g=!ee(u,!1)&&(!o.shadowRootFilter||o.shadowRootFilter(i));if(u&&g){var h=le(u===!0?i.children:u.children,!0,o);o.flatten?r.push.apply(r,h):r.push({scopeParent:i,candidates:h})}else s.unshift.apply(s,i.children)}}return r},Te=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Pe=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||St(e))&&!Te(e)?0:e.tabIndex},wt=function(e,t){var o=Pe(e);return o<0&&t&&!Te(e)?0:o},Ct=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Ae=function(e){return e.tagName==="INPUT"},It=function(e){return Ae(e)&&e.type==="hidden"},Tt=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(o){return o.tagName==="SUMMARY"});return t},Pt=function(e,t){for(var o=0;o<e.length;o++)if(e[o].checked&&e[o].form===t)return e[o]},At=function(e){if(!e.name)return!0;var t=e.form||J(e),o=function(a){return t.querySelectorAll('input[type="radio"][name="'+a+'"]')},r;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")r=o(window.CSS.escape(e.name));else try{r=o(e.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var s=Pt(r,e.form);return!s||s===e},Nt=function(e){return Ae(e)&&e.type==="radio"},Dt=function(e){return Nt(e)&&!At(e)},Mt=function(e){var t,o=e&&J(e),r=(t=o)===null||t===void 0?void 0:t.host,s=!1;if(o&&o!==e){var i,a,l;for(s=!!((i=r)!==null&&i!==void 0&&(a=i.ownerDocument)!==null&&a!==void 0&&a.contains(r)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!s&&r;){var c,d,u;o=J(r),r=(c=o)===null||c===void 0?void 0:c.host,s=!!((d=r)!==null&&d!==void 0&&(u=d.ownerDocument)!==null&&u!==void 0&&u.contains(r))}}return s},ge=function(e){var t=e.getBoundingClientRect(),o=t.width,r=t.height;return o===0&&r===0},Ot=function(e,t){var o=t.displayCheck,r=t.getShadowRoot;if(o==="full-native"&&"checkVisibility"in e){var s=e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}if(getComputedStyle(e).visibility==="hidden")return!0;var i=G.call(e,"details>summary:first-of-type"),a=i?e.parentElement:e;if(G.call(a,"details:not([open]) *"))return!0;if(!o||o==="full"||o==="full-native"||o==="legacy-full"){if(typeof r=="function"){for(var l=e;e;){var c=e.parentElement,d=J(e);if(c&&!c.shadowRoot&&r(c)===!0)return ge(e);e.assignedSlot?e=e.assignedSlot:!c&&d!==e.ownerDocument?e=d.host:e=c}e=l}if(Mt(e))return!e.getClientRects().length;if(o!=="legacy-full")return!0}else if(o==="non-zero-area")return ge(e);return!1},Ft=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var o=0;o<t.children.length;o++){var r=t.children.item(o);if(r.tagName==="LEGEND")return G.call(t,"fieldset[disabled] *")?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},qt=function(e,t){return!(t.disabled||It(t)||Ot(t,e)||Tt(t)||Ft(t))},me=function(e,t){return!(Dt(t)||Pe(t)<0||!qt(e,t))},$t=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},Ne=function(e){var t=[],o=[];return e.forEach(function(r,s){var i=!!r.scopeParent,a=i?r.scopeParent:r,l=wt(a,i),c=i?Ne(r.candidates):a;l===0?i?t.push.apply(t,c):t.push(a):o.push({documentOrder:s,tabIndex:l,item:r,isScope:i,content:c})}),o.sort(Ct).reduce(function(r,s){return s.isScope?r.push.apply(r,s.content):r.push(s.content),r},[]).concat(t)},De=function(e,t){t=t||{};var o;return t.getShadowRoot?o=le([e],t.includeContainer,{filter:me.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:$t}):o=Et(e,t.includeContainer,me.bind(null,t)),Ne(o)};function _t(){return/apple/i.test(navigator.vendor)}const pe="data-floating-ui-focusable";function kt(n){let e=n.activeElement;for(;((t=e)==null||(t=t.shadowRoot)==null?void 0:t.activeElement)!=null;){var t;e=e.shadowRoot.activeElement}return e}function ce(n,e){if(!n||!e)return!1;const t=e.getRootNode==null?void 0:e.getRootNode();if(n.contains(e))return!0;if(t&&Je(t)){let o=e;for(;o;){if(n===o)return!0;o=o.parentNode||o.host}}return!1}function Q(n){return"composedPath"in n?n.composedPath()[0]:n.target}function oe(n,e){if(e==null)return!1;if("composedPath"in n)return n.composedPath().includes(e);const t=n;return t.target!=null&&e.contains(t.target)}function Lt(n){return n.matches("html,body")}function z(n){return n?.ownerDocument||document}function jt(n){return n?n.hasAttribute(pe)?n:n.querySelector("["+pe+"]")||n:null}function Z(n,e,t){return t===void 0&&(t=!0),n.filter(r=>{var s;return r.parentId===e&&(!t||((s=r.context)==null?void 0:s.open))}).flatMap(r=>[r,...Z(n,r.id,t)])}function Kt(n){return"nativeEvent"in n}var Bt=typeof document<"u",Ut=function(){},V=Bt?p.useLayoutEffect:Ut;const Vt={...we},Wt=Vt.useInsertionEffect,Xt=Wt||(n=>n());function W(n){const e=p.useRef(()=>{});return Xt(()=>{e.current=n}),p.useCallback(function(){for(var t=arguments.length,o=new Array(t),r=0;r<t;r++)o[r]=arguments[r];return e.current==null?void 0:e.current(...o)},[])}const Me=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Oe(n,e){const t=De(n,Me()),o=t.length;if(o===0)return;const r=kt(z(n)),s=t.indexOf(r),i=s===-1?e===1?0:o-1:s+e;return t[i]}function Ht(n){return Oe(z(n).body,1)||n}function Yt(n){return Oe(z(n).body,-1)||n}function re(n,e){const t=e||n.currentTarget,o=n.relatedTarget;return!o||!ce(t,o)}function Qt(n){De(n,Me()).forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")})}function ve(n){n.querySelectorAll("[data-tabindex]").forEach(t=>{const o=t.dataset.tabindex;delete t.dataset.tabindex,o?t.setAttribute("tabindex",o):t.removeAttribute("tabindex")})}const Gt="data-floating-ui-focusable",he="active",be="selected",zt={...we};let xe=!1,Zt=0;const ye=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Zt++;function Jt(){const[n,e]=p.useState(()=>xe?ye():void 0);return V(()=>{n==null&&e(ye())},[]),p.useEffect(()=>{xe=!0},[]),n}const en=zt.useId,ue=en||Jt;function tn(){const n=new Map;return{emit(e,t){var o;(o=n.get(e))==null||o.forEach(r=>r(t))},on(e,t){n.has(e)||n.set(e,new Set),n.get(e).add(t)},off(e,t){var o;(o=n.get(e))==null||o.delete(t)}}}const nn=p.createContext(null),on=p.createContext(null),Fe=()=>{var n;return((n=p.useContext(nn))==null?void 0:n.id)||null},qe=()=>p.useContext(on);function de(n){return"data-floating-ui-"+n}const rn={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},Re=p.forwardRef(function(e,t){const[o,r]=p.useState();V(()=>{_t()&&r("button")},[]);const s={ref:t,tabIndex:0,role:o,"aria-hidden":o?void 0:!0,[de("focus-guard")]:"",style:rn};return I.jsx("span",{...e,...s})}),sn={clipPath:"inset(50%)",position:"fixed",top:0,left:0},$e=p.createContext(null),Se=de("portal");function an(n){n===void 0&&(n={});const{id:e,root:t}=n,o=ue(),r=cn(),[s,i]=p.useState(null),a=p.useRef(null);return V(()=>()=>{s?.remove(),queueMicrotask(()=>{a.current=null})},[s]),V(()=>{if(!o||a.current)return;const l=e?document.getElementById(e):null;if(!l)return;const c=document.createElement("div");c.id=o,c.setAttribute(Se,""),l.appendChild(c),a.current=c,i(c)},[e,o]),V(()=>{if(t===null||!o||a.current)return;let l=t||r?.portalNode;l&&!it(l)&&(l=l.current),l=l||document.body;let c=null;e&&(c=document.createElement("div"),c.id=e,l.appendChild(c));const d=document.createElement("div");d.id=o,d.setAttribute(Se,""),l=c||l,l.appendChild(d),a.current=d,i(d)},[e,t,o,r]),s}function ln(n){const{children:e,id:t,root:o,preserveTabOrder:r=!0}=n,s=an({id:t,root:o}),[i,a]=p.useState(null),l=p.useRef(null),c=p.useRef(null),d=p.useRef(null),u=p.useRef(null),g=i?.modal,h=i?.open,y=!!i&&!i.modal&&i.open&&r&&!!(o||s);return p.useEffect(()=>{if(!s||!r||g)return;function m(f){s&&re(f)&&(f.type==="focusin"?ve:Qt)(s)}return s.addEventListener("focusin",m,!0),s.addEventListener("focusout",m,!0),()=>{s.removeEventListener("focusin",m,!0),s.removeEventListener("focusout",m,!0)}},[s,r,g]),p.useEffect(()=>{s&&(h||ve(s))},[h,s]),I.jsxs($e.Provider,{value:p.useMemo(()=>({preserveTabOrder:r,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:d,afterInsideRef:u,portalNode:s,setFocusManagerState:a}),[r,s]),children:[y&&s&&I.jsx(Re,{"data-type":"outside",ref:l,onFocus:m=>{if(re(m,s)){var f;(f=d.current)==null||f.focus()}else{const x=i?i.domReference:null,b=Yt(x);b?.focus()}}}),y&&s&&I.jsx("span",{"aria-owns":s.id,style:sn}),s&&tt.createPortal(e,s),y&&s&&I.jsx(Re,{"data-type":"outside",ref:c,onFocus:m=>{if(re(m,s)){var f;(f=u.current)==null||f.focus()}else{const x=i?i.domReference:null,b=Ht(x);b?.focus(),i?.closeOnFocusOut&&i?.onOpenChange(!1,m.nativeEvent,"focus-out")}}})]})}const cn=()=>p.useContext($e),un={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},dn={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Ee=n=>{var e,t;return{escapeKey:typeof n=="boolean"?n:(e=n?.escapeKey)!=null?e:!1,outsidePress:typeof n=="boolean"?n:(t=n?.outsidePress)!=null?t:!0}};function fn(n,e){e===void 0&&(e={});const{open:t,onOpenChange:o,elements:r,dataRef:s}=n,{enabled:i=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:d=!1,referencePressEvent:u="pointerdown",ancestorScroll:g=!1,bubbles:h,capture:y}=e,m=qe(),f=W(typeof l=="function"?l:()=>!1),x=typeof l=="function"?f:l,b=p.useRef(!1),{escapeKey:R,outsidePress:v}=Ee(h),{escapeKey:D,outsidePress:C}=Ee(y),O=p.useRef(!1),A=W(S=>{var E;if(!t||!i||!a||S.key!=="Escape"||O.current)return;const P=(E=s.current.floatingContext)==null?void 0:E.nodeId,M=m?Z(m.nodesRef.current,P):[];if(!R&&(S.stopPropagation(),M.length>0)){let w=!0;if(M.forEach(N=>{var q;if((q=N.context)!=null&&q.open&&!N.context.dataRef.current.__escapeKeyBubbles){w=!1;return}}),!w)return}o(!1,Kt(S)?S.nativeEvent:S,"escape-key")}),F=W(S=>{var E;const P=()=>{var M;A(S),(M=Q(S))==null||M.removeEventListener("keydown",P)};(E=Q(S))==null||E.addEventListener("keydown",P)}),T=W(S=>{var E;const P=s.current.insideReactTree;s.current.insideReactTree=!1;const M=b.current;if(b.current=!1,c==="click"&&M||P||typeof x=="function"&&!x(S))return;const w=Q(S),N="["+de("inert")+"]",q=z(r.floating).querySelectorAll(N);let L=j(w)?w:null;for(;L&&!ne(L);){const _=ot(L);if(ne(_)||!j(_))break;L=_}if(q.length&&j(w)&&!Lt(w)&&!ce(w,r.floating)&&Array.from(q).every(_=>!ce(L,_)))return;if(rt(w)&&K){const _=ne(w),B=st(w),Y=/auto|scroll/,Ke=_||Y.test(B.overflowX),Be=_||Y.test(B.overflowY),Ue=Ke&&w.clientWidth>0&&w.scrollWidth>w.clientWidth,Ve=Be&&w.clientHeight>0&&w.scrollHeight>w.clientHeight,We=B.direction==="rtl",Xe=Ve&&(We?S.offsetX<=w.offsetWidth-w.clientWidth:S.offsetX>w.clientWidth),He=Ue&&S.offsetY>w.clientHeight;if(Xe||He)return}const U=(E=s.current.floatingContext)==null?void 0:E.nodeId,H=m&&Z(m.nodesRef.current,U).some(_=>{var B;return oe(S,(B=_.context)==null?void 0:B.elements.floating)});if(oe(S,r.floating)||oe(S,r.domReference)||H)return;const fe=m?Z(m.nodesRef.current,U):[];if(fe.length>0){let _=!0;if(fe.forEach(B=>{var Y;if((Y=B.context)!=null&&Y.open&&!B.context.dataRef.current.__outsidePressBubbles){_=!1;return}}),!_)return}o(!1,S,"outside-press")}),$=W(S=>{var E;const P=()=>{var M;T(S),(M=Q(S))==null||M.removeEventListener(c,P)};(E=Q(S))==null||E.addEventListener(c,P)});p.useEffect(()=>{if(!t||!i)return;s.current.__escapeKeyBubbles=R,s.current.__outsidePressBubbles=v;let S=-1;function E(q){o(!1,q,"ancestor-scroll")}function P(){window.clearTimeout(S),O.current=!0}function M(){S=window.setTimeout(()=>{O.current=!1},nt()?5:0)}const w=z(r.floating);a&&(w.addEventListener("keydown",D?F:A,D),w.addEventListener("compositionstart",P),w.addEventListener("compositionend",M)),x&&w.addEventListener(c,C?$:T,C);let N=[];return g&&(j(r.domReference)&&(N=te(r.domReference)),j(r.floating)&&(N=N.concat(te(r.floating))),!j(r.reference)&&r.reference&&r.reference.contextElement&&(N=N.concat(te(r.reference.contextElement)))),N=N.filter(q=>{var L;return q!==((L=w.defaultView)==null?void 0:L.visualViewport)}),N.forEach(q=>{q.addEventListener("scroll",E,{passive:!0})}),()=>{a&&(w.removeEventListener("keydown",D?F:A,D),w.removeEventListener("compositionstart",P),w.removeEventListener("compositionend",M)),x&&w.removeEventListener(c,C?$:T,C),N.forEach(q=>{q.removeEventListener("scroll",E)}),window.clearTimeout(S)}},[s,r,a,x,c,t,o,g,i,R,v,A,D,F,T,C,$]),p.useEffect(()=>{s.current.insideReactTree=!1},[s,x,c]);const k=p.useMemo(()=>({onKeyDown:A,...d&&{[un[u]]:S=>{o(!1,S.nativeEvent,"reference-press")},...u!=="click"&&{onClick(S){o(!1,S.nativeEvent,"reference-press")}}}}),[A,o,d,u]),K=p.useMemo(()=>{function S(E){E.button===0&&(b.current=!0)}return{onKeyDown:A,onMouseDown:S,onMouseUp:S,[dn[c]]:()=>{s.current.insideReactTree=!0}}},[A,c,s]);return p.useMemo(()=>i?{reference:k,floating:K}:{},[i,k,K])}function gn(n){const{open:e=!1,onOpenChange:t,elements:o}=n,r=ue(),s=p.useRef({}),[i]=p.useState(()=>tn()),a=Fe()!=null,[l,c]=p.useState(o.reference),d=W((h,y,m)=>{s.current.openEvent=h?y:void 0,i.emit("openchange",{open:h,event:y,reason:m,nested:a}),t?.(h,y,m)}),u=p.useMemo(()=>({setPositionReference:c}),[]),g=p.useMemo(()=>({reference:l||o.reference||null,floating:o.floating||null,domReference:o.reference}),[l,o.reference,o.floating]);return p.useMemo(()=>({dataRef:s,open:e,onOpenChange:d,elements:g,events:i,floatingId:r,refs:u}),[e,d,g,i,r,u])}function mn(n){n===void 0&&(n={});const{nodeId:e}=n,t=gn({...n,elements:{reference:null,floating:null,...n.elements}}),o=n.rootContext||t,r=o.elements,[s,i]=p.useState(null),[a,l]=p.useState(null),d=r?.domReference||s,u=p.useRef(null),g=qe();V(()=>{d&&(u.current=d)},[d]);const h=et({...n,elements:{...r,...a&&{reference:a}}}),y=p.useCallback(R=>{const v=j(R)?{getBoundingClientRect:()=>R.getBoundingClientRect(),getClientRects:()=>R.getClientRects(),contextElement:R}:R;l(v),h.refs.setReference(v)},[h.refs]),m=p.useCallback(R=>{(j(R)||R===null)&&(u.current=R,i(R)),(j(h.refs.reference.current)||h.refs.reference.current===null||R!==null&&!j(R))&&h.refs.setReference(R)},[h.refs]),f=p.useMemo(()=>({...h.refs,setReference:m,setPositionReference:y,domReference:u}),[h.refs,m,y]),x=p.useMemo(()=>({...h.elements,domReference:d}),[h.elements,d]),b=p.useMemo(()=>({...h,...o,refs:f,elements:x,nodeId:e}),[h,f,x,e,o]);return V(()=>{o.dataRef.current.floatingContext=b;const R=g?.nodesRef.current.find(v=>v.id===e);R&&(R.context=b)}),p.useMemo(()=>({...h,context:b,refs:f,elements:x}),[h,f,x,b])}function se(n,e,t){const o=new Map,r=t==="item";let s=n;if(r&&n){const{[he]:i,[be]:a,...l}=n;s=l}return{...t==="floating"&&{tabIndex:-1,[Gt]:""},...s,...e.map(i=>{const a=i?i[t]:null;return typeof a=="function"?n?a(n):null:a}).concat(n).reduce((i,a)=>(a&&Object.entries(a).forEach(l=>{let[c,d]=l;if(!(r&&[he,be].includes(c)))if(c.indexOf("on")===0){if(o.has(c)||o.set(c,[]),typeof d=="function"){var u;(u=o.get(c))==null||u.push(d),i[c]=function(){for(var g,h=arguments.length,y=new Array(h),m=0;m<h;m++)y[m]=arguments[m];return(g=o.get(c))==null?void 0:g.map(f=>f(...y)).find(f=>f!==void 0)}}}else i[c]=d}),i),{})}}function pn(n){n===void 0&&(n=[]);const e=n.map(a=>a?.reference),t=n.map(a=>a?.floating),o=n.map(a=>a?.item),r=p.useCallback(a=>se(a,n,"reference"),e),s=p.useCallback(a=>se(a,n,"floating"),t),i=p.useCallback(a=>se(a,n,"item"),o);return p.useMemo(()=>({getReferenceProps:r,getFloatingProps:s,getItemProps:i}),[r,s,i])}const vn=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function hn(n,e){var t,o;e===void 0&&(e={});const{open:r,elements:s,floatingId:i}=n,{enabled:a=!0,role:l="dialog"}=e,c=ue(),d=((t=s.domReference)==null?void 0:t.id)||c,u=p.useMemo(()=>{var b;return((b=jt(s.floating))==null?void 0:b.id)||i},[s.floating,i]),g=(o=vn.get(l))!=null?o:l,y=Fe()!=null,m=p.useMemo(()=>g==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:r?u:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":g==="alertdialog"?"dialog":g,"aria-controls":r?u:void 0,...g==="listbox"&&{role:"combobox"},...g==="menu"&&{id:d},...g==="menu"&&y&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[g,u,y,r,d,l]),f=p.useMemo(()=>{const b={id:u,...g&&{role:g}};return g==="tooltip"||l==="label"?b:{...b,...g==="menu"&&{"aria-labelledby":d}}},[g,u,d,l]),x=p.useCallback(b=>{let{active:R,selected:v}=b;const D={role:"option",...R&&{id:u+"-fui-option"}};switch(l){case"select":case"combobox":return{...D,"aria-selected":v}}return{}},[u,l]);return p.useMemo(()=>a?{reference:m,floating:f,item:x}:{},[a,m,f,x])}function bn(n){var e;const{char:t,allowSpaces:o,allowToIncludeChar:r,allowedPrefixes:s,startOfLine:i,$position:a}=n,l=o&&!r,c=Ze(t),d=new RegExp(`\\s${c}$`),u=i?"^":"",g=r?"":c,h=l?new RegExp(`${u}${c}.*?(?=\\s${g}|$)`,"gm"):new RegExp(`${u}(?:^)?${c}[^\\s${g}]*`,"gm"),y=((e=a.nodeBefore)===null||e===void 0?void 0:e.isText)&&a.nodeBefore.text;if(!y)return null;const m=a.pos-y.length,f=Array.from(y.matchAll(h)).pop();if(!f||f.input===void 0||f.index===void 0)return null;const x=f.input.slice(Math.max(0,f.index-1),f.index),b=new RegExp(`^[${s?.join("")}\0]?$`).test(x);if(s!==null&&!b)return null;const R=m+f.index;let v=R+f[0].length;return l&&d.test(y.slice(v-1,v+1))&&(f[0]+=" ",v+=1),R<a.pos&&v>=a.pos?{range:{from:R,to:v},query:f[0].slice(t.length),text:f[0]}:null}function xn(n){return n.docChanged?n.steps.some(e=>{const t=e.slice;if(!t?.content)return!1;const o=t.content.textBetween(0,t.content.size,`
|
|
1
|
+
import{o as Ye,j as Qe,h as ie,D as Ge,p as ze,q as Ze}from"./index-CNKB9BLC.js";import{r as p,eJ as Je,eK as we,eL as et,eM as j,eN as te,j as I,aR as tt,eO as nt,eP as ne,eQ as ot,eR as rt,eS as st,eT as it,eU as at,eV as lt,eW as Ce,eX as ct,c as X,D as ut,K as dt,eY as ft,eZ as gt,e_ as mt,b as pt,l as vt,h as ht}from"./index-Dp_K-tWq.js";import{g as bt,d as xt}from"./gateway-client-O3BwGZz4.js";import{A as yt}from"./agent-icon-CbXn8VZK.js";var Xn=Ye;var Rt=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],ae=Rt.join(","),Ie=typeof Element>"u",G=Ie?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,J=!Ie&&Element.prototype.getRootNode?function(n){var e;return n==null||(e=n.getRootNode)===null||e===void 0?void 0:e.call(n)}:function(n){return n?.ownerDocument},ee=function(e,t){var o;t===void 0&&(t=!0);var r=e==null||(o=e.getAttribute)===null||o===void 0?void 0:o.call(e,"inert"),s=r===""||r==="true",i=s||t&&e&&(typeof e.closest=="function"?e.closest("[inert]"):ee(e.parentNode));return i},St=function(e){var t,o=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return o===""||o==="true"},Et=function(e,t,o){if(ee(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(ae));return t&&G.call(e,ae)&&r.unshift(e),r=r.filter(o),r},le=function(e,t,o){for(var r=[],s=Array.from(e);s.length;){var i=s.shift();if(!ee(i,!1))if(i.tagName==="SLOT"){var a=i.assignedElements(),l=a.length?a:i.children,c=le(l,!0,o);o.flatten?r.push.apply(r,c):r.push({scopeParent:i,candidates:c})}else{var d=G.call(i,ae);d&&o.filter(i)&&(t||!e.includes(i))&&r.push(i);var u=i.shadowRoot||typeof o.getShadowRoot=="function"&&o.getShadowRoot(i),g=!ee(u,!1)&&(!o.shadowRootFilter||o.shadowRootFilter(i));if(u&&g){var h=le(u===!0?i.children:u.children,!0,o);o.flatten?r.push.apply(r,h):r.push({scopeParent:i,candidates:h})}else s.unshift.apply(s,i.children)}}return r},Te=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Pe=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||St(e))&&!Te(e)?0:e.tabIndex},wt=function(e,t){var o=Pe(e);return o<0&&t&&!Te(e)?0:o},Ct=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Ae=function(e){return e.tagName==="INPUT"},It=function(e){return Ae(e)&&e.type==="hidden"},Tt=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(o){return o.tagName==="SUMMARY"});return t},Pt=function(e,t){for(var o=0;o<e.length;o++)if(e[o].checked&&e[o].form===t)return e[o]},At=function(e){if(!e.name)return!0;var t=e.form||J(e),o=function(a){return t.querySelectorAll('input[type="radio"][name="'+a+'"]')},r;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")r=o(window.CSS.escape(e.name));else try{r=o(e.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var s=Pt(r,e.form);return!s||s===e},Nt=function(e){return Ae(e)&&e.type==="radio"},Dt=function(e){return Nt(e)&&!At(e)},Mt=function(e){var t,o=e&&J(e),r=(t=o)===null||t===void 0?void 0:t.host,s=!1;if(o&&o!==e){var i,a,l;for(s=!!((i=r)!==null&&i!==void 0&&(a=i.ownerDocument)!==null&&a!==void 0&&a.contains(r)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!s&&r;){var c,d,u;o=J(r),r=(c=o)===null||c===void 0?void 0:c.host,s=!!((d=r)!==null&&d!==void 0&&(u=d.ownerDocument)!==null&&u!==void 0&&u.contains(r))}}return s},ge=function(e){var t=e.getBoundingClientRect(),o=t.width,r=t.height;return o===0&&r===0},Ot=function(e,t){var o=t.displayCheck,r=t.getShadowRoot;if(o==="full-native"&&"checkVisibility"in e){var s=e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}if(getComputedStyle(e).visibility==="hidden")return!0;var i=G.call(e,"details>summary:first-of-type"),a=i?e.parentElement:e;if(G.call(a,"details:not([open]) *"))return!0;if(!o||o==="full"||o==="full-native"||o==="legacy-full"){if(typeof r=="function"){for(var l=e;e;){var c=e.parentElement,d=J(e);if(c&&!c.shadowRoot&&r(c)===!0)return ge(e);e.assignedSlot?e=e.assignedSlot:!c&&d!==e.ownerDocument?e=d.host:e=c}e=l}if(Mt(e))return!e.getClientRects().length;if(o!=="legacy-full")return!0}else if(o==="non-zero-area")return ge(e);return!1},Ft=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var o=0;o<t.children.length;o++){var r=t.children.item(o);if(r.tagName==="LEGEND")return G.call(t,"fieldset[disabled] *")?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},qt=function(e,t){return!(t.disabled||It(t)||Ot(t,e)||Tt(t)||Ft(t))},me=function(e,t){return!(Dt(t)||Pe(t)<0||!qt(e,t))},$t=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},Ne=function(e){var t=[],o=[];return e.forEach(function(r,s){var i=!!r.scopeParent,a=i?r.scopeParent:r,l=wt(a,i),c=i?Ne(r.candidates):a;l===0?i?t.push.apply(t,c):t.push(a):o.push({documentOrder:s,tabIndex:l,item:r,isScope:i,content:c})}),o.sort(Ct).reduce(function(r,s){return s.isScope?r.push.apply(r,s.content):r.push(s.content),r},[]).concat(t)},De=function(e,t){t=t||{};var o;return t.getShadowRoot?o=le([e],t.includeContainer,{filter:me.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:$t}):o=Et(e,t.includeContainer,me.bind(null,t)),Ne(o)};function _t(){return/apple/i.test(navigator.vendor)}const pe="data-floating-ui-focusable";function kt(n){let e=n.activeElement;for(;((t=e)==null||(t=t.shadowRoot)==null?void 0:t.activeElement)!=null;){var t;e=e.shadowRoot.activeElement}return e}function ce(n,e){if(!n||!e)return!1;const t=e.getRootNode==null?void 0:e.getRootNode();if(n.contains(e))return!0;if(t&&Je(t)){let o=e;for(;o;){if(n===o)return!0;o=o.parentNode||o.host}}return!1}function Q(n){return"composedPath"in n?n.composedPath()[0]:n.target}function oe(n,e){if(e==null)return!1;if("composedPath"in n)return n.composedPath().includes(e);const t=n;return t.target!=null&&e.contains(t.target)}function Lt(n){return n.matches("html,body")}function z(n){return n?.ownerDocument||document}function jt(n){return n?n.hasAttribute(pe)?n:n.querySelector("["+pe+"]")||n:null}function Z(n,e,t){return t===void 0&&(t=!0),n.filter(r=>{var s;return r.parentId===e&&(!t||((s=r.context)==null?void 0:s.open))}).flatMap(r=>[r,...Z(n,r.id,t)])}function Kt(n){return"nativeEvent"in n}var Bt=typeof document<"u",Ut=function(){},V=Bt?p.useLayoutEffect:Ut;const Vt={...we},Wt=Vt.useInsertionEffect,Xt=Wt||(n=>n());function W(n){const e=p.useRef(()=>{});return Xt(()=>{e.current=n}),p.useCallback(function(){for(var t=arguments.length,o=new Array(t),r=0;r<t;r++)o[r]=arguments[r];return e.current==null?void 0:e.current(...o)},[])}const Me=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Oe(n,e){const t=De(n,Me()),o=t.length;if(o===0)return;const r=kt(z(n)),s=t.indexOf(r),i=s===-1?e===1?0:o-1:s+e;return t[i]}function Ht(n){return Oe(z(n).body,1)||n}function Yt(n){return Oe(z(n).body,-1)||n}function re(n,e){const t=e||n.currentTarget,o=n.relatedTarget;return!o||!ce(t,o)}function Qt(n){De(n,Me()).forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")})}function ve(n){n.querySelectorAll("[data-tabindex]").forEach(t=>{const o=t.dataset.tabindex;delete t.dataset.tabindex,o?t.setAttribute("tabindex",o):t.removeAttribute("tabindex")})}const Gt="data-floating-ui-focusable",he="active",be="selected",zt={...we};let xe=!1,Zt=0;const ye=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Zt++;function Jt(){const[n,e]=p.useState(()=>xe?ye():void 0);return V(()=>{n==null&&e(ye())},[]),p.useEffect(()=>{xe=!0},[]),n}const en=zt.useId,ue=en||Jt;function tn(){const n=new Map;return{emit(e,t){var o;(o=n.get(e))==null||o.forEach(r=>r(t))},on(e,t){n.has(e)||n.set(e,new Set),n.get(e).add(t)},off(e,t){var o;(o=n.get(e))==null||o.delete(t)}}}const nn=p.createContext(null),on=p.createContext(null),Fe=()=>{var n;return((n=p.useContext(nn))==null?void 0:n.id)||null},qe=()=>p.useContext(on);function de(n){return"data-floating-ui-"+n}const rn={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},Re=p.forwardRef(function(e,t){const[o,r]=p.useState();V(()=>{_t()&&r("button")},[]);const s={ref:t,tabIndex:0,role:o,"aria-hidden":o?void 0:!0,[de("focus-guard")]:"",style:rn};return I.jsx("span",{...e,...s})}),sn={clipPath:"inset(50%)",position:"fixed",top:0,left:0},$e=p.createContext(null),Se=de("portal");function an(n){n===void 0&&(n={});const{id:e,root:t}=n,o=ue(),r=cn(),[s,i]=p.useState(null),a=p.useRef(null);return V(()=>()=>{s?.remove(),queueMicrotask(()=>{a.current=null})},[s]),V(()=>{if(!o||a.current)return;const l=e?document.getElementById(e):null;if(!l)return;const c=document.createElement("div");c.id=o,c.setAttribute(Se,""),l.appendChild(c),a.current=c,i(c)},[e,o]),V(()=>{if(t===null||!o||a.current)return;let l=t||r?.portalNode;l&&!it(l)&&(l=l.current),l=l||document.body;let c=null;e&&(c=document.createElement("div"),c.id=e,l.appendChild(c));const d=document.createElement("div");d.id=o,d.setAttribute(Se,""),l=c||l,l.appendChild(d),a.current=d,i(d)},[e,t,o,r]),s}function ln(n){const{children:e,id:t,root:o,preserveTabOrder:r=!0}=n,s=an({id:t,root:o}),[i,a]=p.useState(null),l=p.useRef(null),c=p.useRef(null),d=p.useRef(null),u=p.useRef(null),g=i?.modal,h=i?.open,y=!!i&&!i.modal&&i.open&&r&&!!(o||s);return p.useEffect(()=>{if(!s||!r||g)return;function m(f){s&&re(f)&&(f.type==="focusin"?ve:Qt)(s)}return s.addEventListener("focusin",m,!0),s.addEventListener("focusout",m,!0),()=>{s.removeEventListener("focusin",m,!0),s.removeEventListener("focusout",m,!0)}},[s,r,g]),p.useEffect(()=>{s&&(h||ve(s))},[h,s]),I.jsxs($e.Provider,{value:p.useMemo(()=>({preserveTabOrder:r,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:d,afterInsideRef:u,portalNode:s,setFocusManagerState:a}),[r,s]),children:[y&&s&&I.jsx(Re,{"data-type":"outside",ref:l,onFocus:m=>{if(re(m,s)){var f;(f=d.current)==null||f.focus()}else{const x=i?i.domReference:null,b=Yt(x);b?.focus()}}}),y&&s&&I.jsx("span",{"aria-owns":s.id,style:sn}),s&&tt.createPortal(e,s),y&&s&&I.jsx(Re,{"data-type":"outside",ref:c,onFocus:m=>{if(re(m,s)){var f;(f=u.current)==null||f.focus()}else{const x=i?i.domReference:null,b=Ht(x);b?.focus(),i?.closeOnFocusOut&&i?.onOpenChange(!1,m.nativeEvent,"focus-out")}}})]})}const cn=()=>p.useContext($e),un={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},dn={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Ee=n=>{var e,t;return{escapeKey:typeof n=="boolean"?n:(e=n?.escapeKey)!=null?e:!1,outsidePress:typeof n=="boolean"?n:(t=n?.outsidePress)!=null?t:!0}};function fn(n,e){e===void 0&&(e={});const{open:t,onOpenChange:o,elements:r,dataRef:s}=n,{enabled:i=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:d=!1,referencePressEvent:u="pointerdown",ancestorScroll:g=!1,bubbles:h,capture:y}=e,m=qe(),f=W(typeof l=="function"?l:()=>!1),x=typeof l=="function"?f:l,b=p.useRef(!1),{escapeKey:R,outsidePress:v}=Ee(h),{escapeKey:D,outsidePress:C}=Ee(y),O=p.useRef(!1),A=W(S=>{var E;if(!t||!i||!a||S.key!=="Escape"||O.current)return;const P=(E=s.current.floatingContext)==null?void 0:E.nodeId,M=m?Z(m.nodesRef.current,P):[];if(!R&&(S.stopPropagation(),M.length>0)){let w=!0;if(M.forEach(N=>{var q;if((q=N.context)!=null&&q.open&&!N.context.dataRef.current.__escapeKeyBubbles){w=!1;return}}),!w)return}o(!1,Kt(S)?S.nativeEvent:S,"escape-key")}),F=W(S=>{var E;const P=()=>{var M;A(S),(M=Q(S))==null||M.removeEventListener("keydown",P)};(E=Q(S))==null||E.addEventListener("keydown",P)}),T=W(S=>{var E;const P=s.current.insideReactTree;s.current.insideReactTree=!1;const M=b.current;if(b.current=!1,c==="click"&&M||P||typeof x=="function"&&!x(S))return;const w=Q(S),N="["+de("inert")+"]",q=z(r.floating).querySelectorAll(N);let L=j(w)?w:null;for(;L&&!ne(L);){const _=ot(L);if(ne(_)||!j(_))break;L=_}if(q.length&&j(w)&&!Lt(w)&&!ce(w,r.floating)&&Array.from(q).every(_=>!ce(L,_)))return;if(rt(w)&&K){const _=ne(w),B=st(w),Y=/auto|scroll/,Ke=_||Y.test(B.overflowX),Be=_||Y.test(B.overflowY),Ue=Ke&&w.clientWidth>0&&w.scrollWidth>w.clientWidth,Ve=Be&&w.clientHeight>0&&w.scrollHeight>w.clientHeight,We=B.direction==="rtl",Xe=Ve&&(We?S.offsetX<=w.offsetWidth-w.clientWidth:S.offsetX>w.clientWidth),He=Ue&&S.offsetY>w.clientHeight;if(Xe||He)return}const U=(E=s.current.floatingContext)==null?void 0:E.nodeId,H=m&&Z(m.nodesRef.current,U).some(_=>{var B;return oe(S,(B=_.context)==null?void 0:B.elements.floating)});if(oe(S,r.floating)||oe(S,r.domReference)||H)return;const fe=m?Z(m.nodesRef.current,U):[];if(fe.length>0){let _=!0;if(fe.forEach(B=>{var Y;if((Y=B.context)!=null&&Y.open&&!B.context.dataRef.current.__outsidePressBubbles){_=!1;return}}),!_)return}o(!1,S,"outside-press")}),$=W(S=>{var E;const P=()=>{var M;T(S),(M=Q(S))==null||M.removeEventListener(c,P)};(E=Q(S))==null||E.addEventListener(c,P)});p.useEffect(()=>{if(!t||!i)return;s.current.__escapeKeyBubbles=R,s.current.__outsidePressBubbles=v;let S=-1;function E(q){o(!1,q,"ancestor-scroll")}function P(){window.clearTimeout(S),O.current=!0}function M(){S=window.setTimeout(()=>{O.current=!1},nt()?5:0)}const w=z(r.floating);a&&(w.addEventListener("keydown",D?F:A,D),w.addEventListener("compositionstart",P),w.addEventListener("compositionend",M)),x&&w.addEventListener(c,C?$:T,C);let N=[];return g&&(j(r.domReference)&&(N=te(r.domReference)),j(r.floating)&&(N=N.concat(te(r.floating))),!j(r.reference)&&r.reference&&r.reference.contextElement&&(N=N.concat(te(r.reference.contextElement)))),N=N.filter(q=>{var L;return q!==((L=w.defaultView)==null?void 0:L.visualViewport)}),N.forEach(q=>{q.addEventListener("scroll",E,{passive:!0})}),()=>{a&&(w.removeEventListener("keydown",D?F:A,D),w.removeEventListener("compositionstart",P),w.removeEventListener("compositionend",M)),x&&w.removeEventListener(c,C?$:T,C),N.forEach(q=>{q.removeEventListener("scroll",E)}),window.clearTimeout(S)}},[s,r,a,x,c,t,o,g,i,R,v,A,D,F,T,C,$]),p.useEffect(()=>{s.current.insideReactTree=!1},[s,x,c]);const k=p.useMemo(()=>({onKeyDown:A,...d&&{[un[u]]:S=>{o(!1,S.nativeEvent,"reference-press")},...u!=="click"&&{onClick(S){o(!1,S.nativeEvent,"reference-press")}}}}),[A,o,d,u]),K=p.useMemo(()=>{function S(E){E.button===0&&(b.current=!0)}return{onKeyDown:A,onMouseDown:S,onMouseUp:S,[dn[c]]:()=>{s.current.insideReactTree=!0}}},[A,c,s]);return p.useMemo(()=>i?{reference:k,floating:K}:{},[i,k,K])}function gn(n){const{open:e=!1,onOpenChange:t,elements:o}=n,r=ue(),s=p.useRef({}),[i]=p.useState(()=>tn()),a=Fe()!=null,[l,c]=p.useState(o.reference),d=W((h,y,m)=>{s.current.openEvent=h?y:void 0,i.emit("openchange",{open:h,event:y,reason:m,nested:a}),t?.(h,y,m)}),u=p.useMemo(()=>({setPositionReference:c}),[]),g=p.useMemo(()=>({reference:l||o.reference||null,floating:o.floating||null,domReference:o.reference}),[l,o.reference,o.floating]);return p.useMemo(()=>({dataRef:s,open:e,onOpenChange:d,elements:g,events:i,floatingId:r,refs:u}),[e,d,g,i,r,u])}function mn(n){n===void 0&&(n={});const{nodeId:e}=n,t=gn({...n,elements:{reference:null,floating:null,...n.elements}}),o=n.rootContext||t,r=o.elements,[s,i]=p.useState(null),[a,l]=p.useState(null),d=r?.domReference||s,u=p.useRef(null),g=qe();V(()=>{d&&(u.current=d)},[d]);const h=et({...n,elements:{...r,...a&&{reference:a}}}),y=p.useCallback(R=>{const v=j(R)?{getBoundingClientRect:()=>R.getBoundingClientRect(),getClientRects:()=>R.getClientRects(),contextElement:R}:R;l(v),h.refs.setReference(v)},[h.refs]),m=p.useCallback(R=>{(j(R)||R===null)&&(u.current=R,i(R)),(j(h.refs.reference.current)||h.refs.reference.current===null||R!==null&&!j(R))&&h.refs.setReference(R)},[h.refs]),f=p.useMemo(()=>({...h.refs,setReference:m,setPositionReference:y,domReference:u}),[h.refs,m,y]),x=p.useMemo(()=>({...h.elements,domReference:d}),[h.elements,d]),b=p.useMemo(()=>({...h,...o,refs:f,elements:x,nodeId:e}),[h,f,x,e,o]);return V(()=>{o.dataRef.current.floatingContext=b;const R=g?.nodesRef.current.find(v=>v.id===e);R&&(R.context=b)}),p.useMemo(()=>({...h,context:b,refs:f,elements:x}),[h,f,x,b])}function se(n,e,t){const o=new Map,r=t==="item";let s=n;if(r&&n){const{[he]:i,[be]:a,...l}=n;s=l}return{...t==="floating"&&{tabIndex:-1,[Gt]:""},...s,...e.map(i=>{const a=i?i[t]:null;return typeof a=="function"?n?a(n):null:a}).concat(n).reduce((i,a)=>(a&&Object.entries(a).forEach(l=>{let[c,d]=l;if(!(r&&[he,be].includes(c)))if(c.indexOf("on")===0){if(o.has(c)||o.set(c,[]),typeof d=="function"){var u;(u=o.get(c))==null||u.push(d),i[c]=function(){for(var g,h=arguments.length,y=new Array(h),m=0;m<h;m++)y[m]=arguments[m];return(g=o.get(c))==null?void 0:g.map(f=>f(...y)).find(f=>f!==void 0)}}}else i[c]=d}),i),{})}}function pn(n){n===void 0&&(n=[]);const e=n.map(a=>a?.reference),t=n.map(a=>a?.floating),o=n.map(a=>a?.item),r=p.useCallback(a=>se(a,n,"reference"),e),s=p.useCallback(a=>se(a,n,"floating"),t),i=p.useCallback(a=>se(a,n,"item"),o);return p.useMemo(()=>({getReferenceProps:r,getFloatingProps:s,getItemProps:i}),[r,s,i])}const vn=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function hn(n,e){var t,o;e===void 0&&(e={});const{open:r,elements:s,floatingId:i}=n,{enabled:a=!0,role:l="dialog"}=e,c=ue(),d=((t=s.domReference)==null?void 0:t.id)||c,u=p.useMemo(()=>{var b;return((b=jt(s.floating))==null?void 0:b.id)||i},[s.floating,i]),g=(o=vn.get(l))!=null?o:l,y=Fe()!=null,m=p.useMemo(()=>g==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:r?u:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":g==="alertdialog"?"dialog":g,"aria-controls":r?u:void 0,...g==="listbox"&&{role:"combobox"},...g==="menu"&&{id:d},...g==="menu"&&y&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[g,u,y,r,d,l]),f=p.useMemo(()=>{const b={id:u,...g&&{role:g}};return g==="tooltip"||l==="label"?b:{...b,...g==="menu"&&{"aria-labelledby":d}}},[g,u,d,l]),x=p.useCallback(b=>{let{active:R,selected:v}=b;const D={role:"option",...R&&{id:u+"-fui-option"}};switch(l){case"select":case"combobox":return{...D,"aria-selected":v}}return{}},[u,l]);return p.useMemo(()=>a?{reference:m,floating:f,item:x}:{},[a,m,f,x])}function bn(n){var e;const{char:t,allowSpaces:o,allowToIncludeChar:r,allowedPrefixes:s,startOfLine:i,$position:a}=n,l=o&&!r,c=Ze(t),d=new RegExp(`\\s${c}$`),u=i?"^":"",g=r?"":c,h=l?new RegExp(`${u}${c}.*?(?=\\s${g}|$)`,"gm"):new RegExp(`${u}(?:^)?${c}[^\\s${g}]*`,"gm"),y=((e=a.nodeBefore)===null||e===void 0?void 0:e.isText)&&a.nodeBefore.text;if(!y)return null;const m=a.pos-y.length,f=Array.from(y.matchAll(h)).pop();if(!f||f.input===void 0||f.index===void 0)return null;const x=f.input.slice(Math.max(0,f.index-1),f.index),b=new RegExp(`^[${s?.join("")}\0]?$`).test(x);if(s!==null&&!b)return null;const R=m+f.index;let v=R+f[0].length;return l&&d.test(y.slice(v-1,v+1))&&(f[0]+=" ",v+=1),R<a.pos&&v>=a.pos?{range:{from:R,to:v},query:f[0].slice(t.length),text:f[0]}:null}function xn(n){return n.docChanged?n.steps.some(e=>{const t=e.slice;if(!t?.content)return!1;const o=t.content.textBetween(0,t.content.size,`
|
|
2
2
|
`);return/\s/.test(o)}):!1}function yn(n){return()=>{const e=n.state.selection.$anchor.pos,{top:t,right:o,bottom:r,left:s}=n.view.coordsAtPos(e);try{return new DOMRect(s,t,o-s,r-t)}catch{return null}}}function Rn(n,e,t,o){return t?()=>{const r=o.getState(n.state),s=r?.decorationId,i=e.dom.querySelector(`[data-decoration-id="${s}"]`);return i?.getBoundingClientRect()||null}:yn(n)}function Sn({match:n,dismissedRange:e,state:t,transaction:o,editor:r,shouldResetDismissed:s,effectiveAllowSpaces:i}){return s?.({editor:r,state:t,range:e,match:n,transaction:o,allowSpaces:i})?!1:i?n.range.from===e.from:n.range.from===e.from&&!xn(o)}function En({view:n,pluginKeyRef:e}){const t=n.state.tr.setMeta(e,{exit:!0});n.dispatch(t)}function wn({pluginKey:n,decorationTag:e,decorationClass:t,decorationContent:o,decorationEmptyClass:r,renderer:s,dispatchExit:i}){return{handleKeyDown(a,l){var c;const d=n.getState(a.state);if(!d.active)return!1;if(l.key==="Escape"||l.key==="Esc"){var u;return s==null||(u=s.onKeyDown)===null||u===void 0||u.call(s,{view:a,event:l,range:d.range}),i(a),!0}return(s==null||(c=s.onKeyDown)===null||c===void 0?void 0:c.call(s,{view:a,event:l,range:d.range}))||!1},decorations(a){const{active:l,range:c,decorationId:d,query:u}=n.getState(a);if(!l)return null;const g=!u?.length,h=[t];return g&&h.push(r),Ge.create(a.doc,[ze.inline(c.from,c.to,{nodeName:e,class:h.join(" "),"data-decoration-id":d||void 0,"data-decoration-content":o})])}}}function Cn({editor:n,char:e,effectiveAllowSpaces:t,allowToIncludeChar:o,allowedPrefixes:r,startOfLine:s,findSuggestionMatch:i,allow:a,shouldShow:l,shouldKeepDismissed:c,pluginKey:d}){return{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1,dismissedRange:null}},apply(u,g,h,y){const{isEditable:m}=n,{composing:f}=n.view,{selection:x}=u,{empty:b,from:R}=x,v={...g},D=u.getMeta(d);if(D&&D.exit)return v.active=!1,v.decorationId=null,v.range={from:0,to:0},v.query=null,v.text=null,v.dismissedRange=g.active?{...g.range}:g.dismissedRange,v;if(v.composing=f,u.docChanged&&v.dismissedRange!==null&&(v.dismissedRange={from:u.mapping.map(v.dismissedRange.from),to:u.mapping.map(v.dismissedRange.to)}),m&&(b||n.view.composing)){(R<g.range.from||R>g.range.to)&&!f&&!g.composing&&(v.active=!1);const C=i({char:e,allowSpaces:t,allowToIncludeChar:o,allowedPrefixes:r,startOfLine:s,$position:x.$from}),O=`id_${Math.floor(Math.random()*4294967295)}`;C&&a({editor:n,state:y,range:C.range,isActive:g.active})&&(!l||l({editor:n,range:C.range,query:C.query,text:C.text,transaction:u}))?(v.dismissedRange!==null&&!c({match:C,dismissedRange:v.dismissedRange,state:y,transaction:u})&&(v.dismissedRange=null),v.dismissedRange===null?(v.active=!0,v.decorationId=g.decorationId||O,v.range=C.range,v.query=C.query,v.text=C.text):v.active=!1):(C||(v.dismissedRange=null),v.active=!1)}else v.active=!1;return v.active||(v.decorationId=null,v.range={from:0,to:0},v.query=null,v.text=null),v}}}function In({editor:n,items:e}){let t=null,o=null,r=null;const s=()=>{o!==null&&(clearTimeout(o),o=null),r?.(),r=null},i=c=>new Promise(d=>{r=d,o=setTimeout(()=>{o=null;const u=r;r=null,u?.()},c)}),a=()=>{t?.abort(),s(),t=null};return{abort:a,fetch:async(c,d)=>{a(),t=new AbortController;const u=t;if(d>0&&await i(d),t!==u||u.signal.aborted)return{status:"aborted"};try{const g=await e({editor:n,query:c,signal:u.signal});return t!==u||u.signal.aborted?{status:"aborted"}:{status:"resolved",items:g}}catch{return t!==u||u.signal.aborted?{status:"aborted"}:{status:"error"}}}}}function Tn({placement:n,offset:e,flip:t,floatingUi:o}){var r,s,i,a;const l=[at({mainAxis:(r=e.mainAxis)!==null&&r!==void 0?r:4,crossAxis:(s=e.crossAxis)!==null&&s!==void 0?s:0})];return t&&l.push(lt()),!(o==null||(i=o.middleware)===null||i===void 0)&&i.length&&l.push(...o.middleware),{placement:n,strategy:(a=o?.strategy)!==null&&a!==void 0?a:"absolute",middleware:l}}function Pn(n){if(n instanceof HTMLElement)return n;if(typeof n=="string")try{const e=document.querySelector(n);if(e)return e}catch{return document.body}return document.body}function An({getReferenceRect:n,contextElement:e,config:t,container:o,dismissOnOutsideClick:r,dismiss:s}){return(i,a={})=>{const l={getBoundingClientRect:()=>{var y;return(y=n())!==null&&y!==void 0?y:new DOMRect},contextElement:e};let c=!1;const d=!i.isConnected;d&&Pn(o).appendChild(i),a.onPosition||(i.style.visibility="hidden",i.style.width="max-content");const g=Ce(l,i,()=>{ct(l,i,{placement:t.placement,strategy:t.strategy,middleware:t.middleware}).then(({x:y,y:m,placement:f,strategy:x})=>{if(a.onPosition){a.onPosition({x:y,y:m,placement:f,strategy:x});return}Object.assign(i.style,{position:x,left:`${y}px`,top:`${m}px`}),c||(c=!0,i.style.visibility="")})},a.autoUpdate);let h;return r&&(h=y=>{const m=y.target;!(m instanceof Node)||i.contains(m)||e.contains(m)||s()},document.addEventListener("pointerdown",h,!0)),()=>{g(),h&&document.removeEventListener("pointerdown",h,!0),d&&i.remove()}}}function Nn({editor:n,pluginKey:e,items:t,renderer:o,minQueryLength:r,debounce:s,initialItems:i,placement:a,offset:l,container:c,flip:d,floatingUi:u,dismissOnOutsideClick:g,command:h,clientRectFor:y,dispatchExit:m}){let f;const x=In({editor:n,items:t}),b=Tn({placement:a,offset:l,flip:d,floatingUi:u});function R(v,D){switch(v){case"started":var C;o==null||(C=o.onStart)===null||C===void 0||C.call(o,D);break;case"updated":var O;o==null||(O=o.onUpdate)===null||O===void 0||O.call(o,D);break;case"stopped":var A;o==null||(A=o.onExit)===null||A===void 0||A.call(o,D)}}return{update:async(v,D)=>{var C,O;const A=e.getState(D),F=e.getState(v.state);if(!A||!F)return;let T=null;const $=A.query!==F.query,k=A.text!==F.text,K=A.range.from!==F.range.from||A.range.to!==F.range.to,S=$||k||K;if(!A.active&&F.active)T="started";else if(A.active&&!F.active)T="stopped";else if(F.active&&S)T="updated";else return;const E=T==="stopped"?A:F,P=v.dom.querySelector(`[data-decoration-id="${E.decorationId}"]`),M=y(v,P),w=r===0||(E.query?E.query.length>=r:!1),N=(T==="started"||T==="updated")&&w;if(f={editor:n,range:E.range,query:E.query||"",text:E.text||"",items:i??[],command:U=>h({editor:n,range:E.range,props:U}),decorationNode:P,clientRect:M,loading:N,placement:a,offset:{mainAxis:(C=l.mainAxis)!==null&&C!==void 0?C:4,crossAxis:(O=l.crossAxis)!==null&&O!==void 0?O:0},container:c,flip:d,floatingUi:b,mount:An({getReferenceRect:M,contextElement:v.dom,config:b,container:c,dismissOnOutsideClick:g,dismiss:()=>m(n.view)})},T==="started"){var q;o==null||(q=o.onBeforeStart)===null||q===void 0||q.call(o,f)}if(T==="updated"){var L;o==null||(L=o.onBeforeUpdate)===null||L===void 0||L.call(o,f)}if(T==="started"&&R(T,f),T==="started"||T==="updated")if(!N)x.abort(),f={...f,items:i??[],loading:!1};else{f={...f,items:i??[],loading:!0},T="updated",R(T,f);const U=await x.fetch(E.query||"",s);if(U.status==="aborted")return;const H=e.getState(v.state);if(!H?.active){x.abort();return}f=U.status==="resolved"?{...f,items:U.items,loading:!1}:{...f,loading:!1}}if(T==="stopped"){x.abort(),R(T,f),f=void 0;return}T==="updated"&&R(T,f)},destroy:()=>{var v;x.abort(),f&&(o==null||(v=o.onExit)===null||v===void 0||v.call(o,f))}}}const _e=new ie("suggestion");function ke({pluginKey:n=_e,editor:e,char:t="@",allowSpaces:o=!1,allowToIncludeChar:r=!1,allowedPrefixes:s=[" "],startOfLine:i=!1,decorationTag:a="span",decorationClass:l="suggestion",decorationContent:c="",decorationEmptyClass:d="is-empty",command:u=()=>null,items:g=()=>[],minQueryLength:h=0,debounce:y=0,initialItems:m,placement:f="bottom-start",offset:x={},container:b,flip:R=!0,floatingUi:v,dismissOnOutsideClick:D=!0,render:C=()=>({}),allow:O=()=>!0,findSuggestionMatch:A=bn,shouldShow:F,shouldResetDismissed:T}){const $=C?.(),k=o&&!r,K=(P,M)=>Rn(e,P,M,n);function S(P){return Sn({...P,editor:e,shouldResetDismissed:T,effectiveAllowSpaces:k})}const E=P=>En({view:P,pluginKeyRef:n});return new Qe({key:n,view:()=>Nn({editor:e,pluginKey:n,items:g,renderer:$,minQueryLength:h,debounce:y,initialItems:m,placement:f,offset:x,container:b,flip:R,floatingUi:v,dismissOnOutsideClick:D,command:u,clientRectFor:K,dispatchExit:E}),state:Cn({editor:e,char:t,effectiveAllowSpaces:k,allowToIncludeChar:r,allowedPrefixes:s,startOfLine:i,findSuggestionMatch:A,allow:O,shouldShow:F,shouldKeepDismissed:S,pluginKey:n}),props:wn({pluginKey:n,decorationTag:a,decorationClass:l,decorationContent:c,decorationEmptyClass:d,renderer:$,dispatchExit:E})})}function Hn(n,e=_e){const t=n.state.tr.setMeta(e,{exit:!0});n.dispatch(t)}var Yn=ke;function Dn(n){const e=X.c(17),{editor:t,query:o,items:r,onSelect:s,onClose:i}=n,[a,l]=p.useState(0),c=p.useRef(r),d=p.useRef(a),u=p.useRef(s),g=p.useRef(i),h=p.useDeferredValue(o),[y,m]=p.useState(h);y!==h&&(m(h),l(0)),a>=r.length&&r.length>0&&l(0);let f,x;e[0]!==r?(f=()=>{c.current=r},x=[r],e[0]=r,e[1]=f,e[2]=x):(f=e[1],x=e[2]),p.useEffect(f,x);let b,R;e[3]!==a?(b=()=>{d.current=a},R=[a],e[3]=a,e[4]=b,e[5]=R):(b=e[4],R=e[5]),p.useEffect(b,R);let v,D;e[6]!==s?(v=()=>{u.current=s},D=[s],e[6]=s,e[7]=v,e[8]=D):(v=e[7],D=e[8]),p.useEffect(v,D);let C,O;e[9]!==i?(C=()=>{g.current=i},O=[i],e[9]=i,e[10]=C,e[11]=O):(C=e[10],O=e[11]),p.useEffect(C,O);let A,F;e[12]!==t?(F=()=>{if(t?.isDestroyed)return;let k;try{k=t.view.dom}catch{return}if(!k)return;const K=E=>{const P=c.current;if(!P.length)return!1;const M=()=>l(N=>(N+1)%P.length),w=()=>l(N=>(N-1+P.length)%P.length);switch(E.key){case"ArrowUp":return E.preventDefault(),w(),!0;case"ArrowDown":return E.preventDefault(),M(),!0;case"Tab":return E.preventDefault(),E.shiftKey?w():M(),!0;case"Home":return E.preventDefault(),l(0),!0;case"End":return E.preventDefault(),l(P.length-1),!0;case"Enter":{if(E.isComposing)return!1;E.preventDefault();const N=d.current;return N!==-1&&P[N]&&u.current?.(P[N],N),!0}case"Escape":return E.preventDefault(),g.current?.(),!0;default:return!1}},S=E=>{K(E)};return k.addEventListener("keydown",S,!0),()=>{k?.removeEventListener("keydown",S,!0)}},A=[t],e[12]=t,e[13]=A,e[14]=F):(A=e[13],F=e[14]),p.useEffect(F,A);const T=r.length?a:void 0;let $;return e[15]!==T?($={selectedIndex:T,setSelectedIndex:l},e[15]=T,e[16]=$):$=e[16],$}function Mn(n,e){switch(e.type){case"SET_SELECTED_ITEM":return{...n,selectedItem:e.payload};case"ON_START":return{...n,open:!0,selectedItem:null,element:e.payload.element,query:e.payload.query,range:e.payload.range};case"ON_UPDATE":return{...n,element:e.payload.element,query:e.payload.query,range:e.payload.range};case"ON_EXIT":return{open:!1,element:null,query:"",range:null,selectedItem:null};default:return n}}const Le=p.createContext(void 0);function je(){const n=p.useContext(Le);if(!n)throw new Error("useSuggestionContext must be used within a SuggestionContext.Provider");return n}function On(n){const e=X.c(16),{editor:t,char:o,pluginKey:r,allow:s,onOpenChange:i}=n;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={open:!1,element:null,query:"",range:null,selectedItem:null},e[0]=a):a=e[0];const[l,c]=p.useReducer(Mn,a);let d;e[1]!==i?(d=m=>{i?.(m)},e[1]=i,e[2]=d):d=e[2];const u=p.useEffectEvent(d);let g;e[3]!==o||e[4]!==s||e[5]!==t||e[6]!==u||e[7]!==r?(g=()=>{if(t?.isDestroyed)return;const m=r instanceof ie?r:new ie(r);t.state.plugins.find(b=>b.spec.key===m)&&t.unregisterPlugin(m);const x=ke({pluginKey:m,editor:t,char:o,allow(b){const R=t.state.doc.resolve(b.range.from);for(let v=R.depth;v>0;v--)if(R.node(v).type.name==="image")return!1;return!(s&&!s(b))},command(){},render:()=>({onStart:b=>{c({type:"ON_START",payload:{element:b.decorationNode??null,query:b.query,range:b.range}}),u(!0)},onUpdate:b=>{c({type:"ON_UPDATE",payload:{element:b.decorationNode??null,query:b.query,range:b.range}})},onKeyDown:b=>b.event.key==="Escape"?(c({type:"ON_EXIT"}),!0):!1,onExit:()=>{c({type:"ON_EXIT"}),u(!1)}}),items:Fn});return t.registerPlugin(x),()=>{t?.isDestroyed||t.unregisterPlugin(m)}},e[3]=o,e[4]=s,e[5]=t,e[6]=u,e[7]=r,e[8]=g):g=e[8];let h;e[9]!==o||e[10]!==s||e[11]!==t||e[12]!==r?(h=[t,r,o,c,s],e[9]=o,e[10]=s,e[11]=t,e[12]=r,e[13]=h):h=e[13],p.useEffect(g,h);let y;return e[14]!==l?(y={state:l,dispatch:c},e[14]=l,e[15]=y):y=e[15],y}function Fn(){return[]}function qn({editor:n,queryKey:e,queryFn:t,onSelect:o}){const{state:r,dispatch:s}=je(),i=p.useDeferredValue(r.query),{data:a}=ut({queryKey:dt.suggestionItems(e,r.open,i),queryFn:()=>r.open?t({query:i}):[]}),l=()=>{s({type:"ON_EXIT"})},c=async(u,g)=>{if(!(r.selectedItem!==null||!r.range)){s({type:"SET_SELECTED_ITEM",payload:u});try{const{view:h}=n,m=h.state.selection.$to.nodeAfter?.text?.startsWith(" "),f=r.range?{...r.range}:{from:0,to:0};m&&r.range&&(f.to+=1),await o({range:f,item:u})===!1?s({type:"SET_SELECTED_ITEM",payload:null}):l()}catch{l()}}},{selectedIndex:d}=Dn({editor:n,query:i,items:a,onSelect:c,onClose:l});return{selectedItem:r.selectedItem,items:a,selectedIndex:d,close:l,onSelect:c}}function $n({children:n}){const{state:e,dispatch:t}=je(),{open:o,element:r}=e,s=()=>{t({type:"ON_EXIT"})},{refs:i,floatingStyles:a,context:l}=mn({placement:"bottom-start",open:o,onOpenChange:g=>{g||s()},elements:{reference:r},middleware:[ft(10),gt(),mt()],whileElementsMounted:Ce}),c=fn(l,{outsidePress:g=>!(g.target instanceof Element&&g.target.closest(".ProseMirror"))}),d=hn(l,{role:"listbox"}),{getFloatingProps:u}=pn([c,d]);return o?I.jsx(ln,{children:I.jsx("div",{ref:i.setFloating,style:a,...u(),className:"z-50 w-auto min-w-[360px] max-w-[520px] rounded-lg border bg-popover p-0 text-popover-foreground shadow-md outline-hidden overflow-hidden",children:n})}):null}const _n=n=>{const e=X.c(17),{item:t,isSelected:o,onSelect:r,isLoading:s,ref:i,renderItem:a}=n;let l;if(e[0]!==t){const x=bt(t._meta);l=t.title||xt(t.name,x),e[0]=t,e[1]=l}else l=e[1];const c=l,d=t.description||null,u=t.icon,g=o&&"bg-accent text-accent-foreground",h=s&&"pointer-events-none opacity-50";let y;e[2]!==g||e[3]!==h?(y=vt("relative flex w-full cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors","hover:bg-accent hover:text-accent-foreground","focus:bg-accent focus:text-accent-foreground",g,h),e[2]=g,e[3]=h,e[4]=y):y=e[4];let m;e[5]!==d||e[6]!==u||e[7]!==s||e[8]!==t||e[9]!==c||e[10]!==a?(m=a?a(t):I.jsxs(I.Fragment,{children:[u!==void 0&&I.jsx(yt,{icon:u,name:c,size:"xs",className:"mr-2"}),I.jsxs("div",{className:"flex flex-col gap-0.5 flex-1 min-w-0",children:[I.jsxs("div",{className:"flex items-center justify-between gap-2",children:[I.jsx("span",{className:"font-medium flex items-center truncate capitalize",children:c}),s&&I.jsx(ht,{size:"xs"})]}),d&&I.jsx("div",{className:"text-xs text-muted-foreground line-clamp-1",children:d})]}),t.drillable&&I.jsx("kbd",{className:"shrink-0 ml-2 px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground bg-muted border border-border rounded",children:"↵"})]}),e[5]=d,e[6]=u,e[7]=s,e[8]=t,e[9]=c,e[10]=a,e[11]=m):m=e[11];let f;return e[12]!==r||e[13]!==i||e[14]!==y||e[15]!==m?(f=I.jsx("div",{ref:i,onClick:r,className:y,children:m}),e[12]=r,e[13]=i,e[14]=y,e[15]=m,e[16]=f):f=e[16],f},kn=n=>{const e=X.c(24),{editor:t,queryKey:o,queryFn:r,onSelect:s,renderItem:i,emptyLabel:a}=n,l=pt();let c;e[0]!==t||e[1]!==s||e[2]!==r||e[3]!==o?(c={editor:t,queryKey:o,queryFn:r,onSelect:s},e[0]=t,e[1]=s,e[2]=r,e[3]=o,e[4]=c):c=e[4];const{items:d,selectedIndex:u,onSelect:g,selectedItem:h}=qn(c);if(!d.length){let x;e[5]!==a||e[6]!==l?(x=a??l("chat.mention.noItemsFound"),e[5]=a,e[6]=l,e[7]=x):x=e[7];let b;return e[8]!==x?(b=I.jsx("div",{className:"min-w-[360px] max-w-[520px] bg-popover text-popover-foreground rounded-md border shadow-md p-3 text-sm",children:x}),e[8]=x,e[9]=b):b=e[9],b}let y;e[10]===Symbol.for("react.memo_cache_sentinel")?(y={maxHeight:"min(320px, var(--radix-popover-content-available-height, 320px))"},e[10]=y):y=e[10];let m;if(e[11]!==g||e[12]!==d||e[13]!==i||e[14]!==u||e[15]!==h?.name){let x;e[17]!==g||e[18]!==i||e[19]!==u||e[20]!==h?.name?(x=(b,R)=>I.jsx(_n,{item:b,isSelected:R===u,ref:R===u?Kn:void 0,onSelect:()=>g(b,R),isLoading:h?.name===b.name,renderItem:i},`${b.kind??"item"}:${b.name}`),e[17]=g,e[18]=i,e[19]=u,e[20]=h?.name,e[21]=x):x=e[21],m=d.map(x),e[11]=g,e[12]=d,e[13]=i,e[14]=u,e[15]=h?.name,e[16]=m}else m=e[16];let f;return e[22]!==m?(f=I.jsx("div",{className:"min-w-[360px] max-w-[520px] bg-popover text-popover-foreground rounded-md overflow-y-auto",style:y,children:I.jsx("div",{className:"p-1",children:m})}),e[22]=m,e[23]=f):f=e[23],f};function Ln(){const n=X.c(1);let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=I.jsx("div",{className:"p-1",children:[...Array(3)].map(jn)}),n[0]=e):e=n[0],e}function jn(n,e){return I.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-1.5 animate-pulse",children:[I.jsx("div",{className:"h-4 w-24 bg-muted rounded"}),I.jsx("div",{className:"h-3 w-32 bg-muted rounded"})]},e)}function Qn(n){const e=X.c(20),{editor:t,char:o,pluginKey:r,queryKey:s,queryFn:i,onSelect:a,allow:l,onOpenChange:c,renderItem:d,emptyLabel:u}=n;let g;e[0]!==l||e[1]!==o||e[2]!==t||e[3]!==c||e[4]!==r?(g={editor:t,char:o,pluginKey:r,allow:l,onOpenChange:c},e[0]=l,e[1]=o,e[2]=t,e[3]=c,e[4]=r,e[5]=g):g=e[5];const{state:h,dispatch:y}=On(g);let m;e[6]!==y||e[7]!==h?(m={state:h,dispatch:y},e[6]=y,e[7]=h,e[8]=m):m=e[8];let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=I.jsx(Ln,{}),e[9]=f):f=e[9];let x;e[10]!==t||e[11]!==u||e[12]!==a||e[13]!==i||e[14]!==s||e[15]!==d?(x=I.jsx($n,{children:I.jsx(p.Suspense,{fallback:f,children:I.jsx(kn,{editor:t,queryKey:s,queryFn:i,onSelect:a,renderItem:d,emptyLabel:u})})}),e[10]=t,e[11]=u,e[12]=a,e[13]=i,e[14]=s,e[15]=d,e[16]=x):x=e[16];let b;return e[17]!==m||e[18]!==x?(b=I.jsx(Le.Provider,{value:m,children:x}),e[17]=m,e[18]=x,e[19]=b):b=e[19],b}function Kn(n){n&&n.scrollIntoView({block:"center",behavior:"smooth"})}export{Qn as S,Yn as a,Hn as e,Xn as s};
|