decocms 4.523.1 → 4.524.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{ActiveShapeUtils-3iGXaBcM.js → ActiveShapeUtils-gwLrBsiR.js} +1 -1
- package/dist/client/assets/{AlertCircle-BoecRmSu.js → AlertCircle-COLuN3Qe.js} +1 -1
- package/dist/client/assets/{AreaChart-MrowY4g3.js → AreaChart-Dud7jvcC.js} +1 -1
- package/dist/client/assets/{ArrowLeft-CqjWe78l.js → ArrowLeft-BYNlToA0.js} +1 -1
- package/dist/client/assets/{ArrowUp-YHdDe54G.js → ArrowUp-CRFAWnPc.js} +1 -1
- package/dist/client/assets/{BarChart-BouCSNlP.js → BarChart-JFNliGSV.js} +1 -1
- package/dist/client/assets/{Building02-jY0EsZ3c.js → Building02-DinMBe3_.js} +1 -1
- package/dist/client/assets/{CartesianChart-YzghzaT-.js → CartesianChart-Cjgu2ECY.js} +1 -1
- package/dist/client/assets/{CategoricalChart-DSicPUkM.js → CategoricalChart-Bx8yFu23.js} +1 -1
- package/dist/client/assets/{CheckCircle-Bjd4331B.js → CheckCircle-DCMOdEuL.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-C8DO4Eax.js → ChevronSelectorVertical-Dwu4Nr-2.js} +1 -1
- package/dist/client/assets/{ChevronUp-D732cexR.js → ChevronUp-4EkxqYyz.js} +1 -1
- package/dist/client/assets/{Copy01-BNgQXLom.js → Copy01-Tog1jA1S.js} +1 -1
- package/dist/client/assets/{CreditCard01-BI7UbDnJ.js → CreditCard01-B7MC6SfH.js} +1 -1
- package/dist/client/assets/{DotsVertical-B4rKTO-K.js → DotsVertical-qUaZHjqd.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-DusfmiIN.js → ErrorBarContext-C1p765z-.js} +1 -1
- package/dist/client/assets/{Globe04-BZtelxuk.js → Globe04-CGEgYyKw.js} +1 -1
- package/dist/client/assets/{Image01-3jSbcDWw.js → Image01-CW7Pcq-W.js} +1 -1
- package/dist/client/assets/{Key01-bgf7_Io3.js → Key01-D_nzK0xg.js} +1 -1
- package/dist/client/assets/{Link01-CwY3-TdS.js → Link01-CpcYQ7Qt.js} +1 -1
- package/dist/client/assets/{LinkBroken01-gZ_Womsg.js → LinkBroken01-Ctb4MZUK.js} +1 -1
- package/dist/client/assets/{Minus-Cg_Z4UVA.js → Minus-DoRDGpun.js} +1 -1
- package/dist/client/assets/{Monitor01-DfNea12c.js → Monitor01-L9jyZGZ2.js} +1 -1
- package/dist/client/assets/{Play-C58uA1z7.js → Play-Du5BNsRy.js} +1 -1
- package/dist/client/assets/{Plus-BjxA_ka5.js → Plus-BfnmJh1R.js} +1 -1
- package/dist/client/assets/{ReferenceLine-kghB-Ev4.js → ReferenceLine-DCCnHWMQ.js} +1 -1
- package/dist/client/assets/{SearchMd-BYu5iUPZ.js → SearchMd-JUAl7Zv6.js} +1 -1
- package/dist/client/assets/{Sector-B82IN8wU.js → Sector-DL6Ad47o.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-D6PcFAZ3.js → ShoppingBag01-usYkWunw.js} +1 -1
- package/dist/client/assets/{Sun-ryrPGG0o.js → Sun-B7TolJAG.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-OacdCVpa.js → SwitchHorizontal01-DcP8c_x_.js} +1 -1
- package/dist/client/assets/{Tool01-CcNuzAHc.js → Tool01-Bon-ixH5.js} +1 -1
- package/dist/client/assets/{Trash01-B_y6cnc0.js → Trash01-cH2tYIUn.js} +1 -1
- package/dist/client/assets/{Upload01-C8k7ObxF.js → Upload01-Bo60o4T6.js} +1 -1
- package/dist/client/assets/{UserSquare-DvQcif2z.js → UserSquare-DsAVH788.js} +1 -1
- package/dist/client/assets/{Users01-BuIADxiS.js → Users01-Bo_9DitT.js} +1 -1
- package/dist/client/assets/{XClose-CE-051ne.js → XClose-DhoOL-T1.js} +1 -1
- package/dist/client/assets/{ZoomOut-BBaDHidP.js → ZoomOut-B1U_CHeD.js} +1 -1
- package/dist/client/assets/access-gate-CGDwkzkf.js +1 -0
- package/dist/client/assets/{add-connection-dialog-CBWhQLk7.js → add-connection-dialog-8gQOdlVv.js} +1 -1
- package/dist/client/assets/agent-analytics-Bd5QSkcr.js +1 -0
- package/dist/client/assets/agent-app-DSGhLy_N.js +1 -0
- package/dist/client/assets/agent-assets-Q4lV98mF.js +1 -0
- package/dist/client/assets/agent-automation-Dsupi3DF.js +20 -0
- package/dist/client/assets/agent-automations-BonoDEyJ.js +1 -0
- package/dist/client/assets/agent-calendar-WpcQ_E3l.js +1 -0
- package/dist/client/assets/agent-connect-sources-C0oR1IIZ.js +1 -0
- package/dist/client/assets/agent-deck-Y0SX6UB9.js +1 -0
- package/dist/client/assets/agent-e2e-nbY2lllw.js +1 -0
- package/dist/client/assets/agent-experiments-XS7LGaQh.js +1 -0
- package/dist/client/assets/agent-file-DKmgj6b-.js +1 -0
- package/dist/client/assets/agent-hosting-BC5YnVoX.js +1 -0
- package/dist/client/assets/agent-icon-CVEMdYFU.js +1 -0
- package/dist/client/assets/agent-library-CYxkIVFl.js +1 -0
- package/dist/client/assets/agent-library-file-DPhxbUtG.js +1 -0
- package/dist/client/assets/agent-monitor-C01cwPL-.js +1 -0
- package/dist/client/assets/agent-overview-DU1IP4XS.js +1 -0
- package/dist/client/assets/agent-releases-BuXXsH8W.js +2 -0
- package/dist/client/assets/agent-settings-B7CchDfJ.js +1 -0
- package/dist/client/assets/{agent-site-editor-DrsYL7Qi.js → agent-site-editor-DSqJlDXx.js} +2 -2
- package/dist/client/assets/agent-site-editor-code-uiPbclqT.js +2 -0
- package/dist/client/assets/agent-site-editor-content-B9B2SztQ.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-CQGXtn5w.js +1 -0
- package/dist/client/assets/agent-view-BNK8YJ86.js +1 -0
- package/dist/client/assets/{agent-view-guard-Dw8f_Dem.js → agent-view-guard-Bvqt9A7d.js} +1 -1
- package/dist/client/assets/agents-list-BV-RY6eO.js +1 -0
- package/dist/client/assets/{ai-providers-DGU07bIw.js → ai-providers-D8opLVHp.js} +2 -2
- package/dist/client/assets/{alert-CXq7wXAP.js → alert-CYZdSIKq.js} +1 -1
- package/dist/client/assets/analytics-sections-BqhdlzKZ.js +1 -0
- package/dist/client/assets/analytics-tab-BWgFTW72.js +2 -0
- package/dist/client/assets/api-keys-Dj50tYQ9.js +1 -0
- package/dist/client/assets/api-keys-MofJBQfW.js +1 -0
- package/dist/client/assets/app-editor-BcJaA3eR.js +1 -0
- package/dist/client/assets/{asset-utils-CkfOjXdG.js → asset-utils-DcPLl2K6.js} +1 -1
- package/dist/client/assets/{auth-D_mwvS_K.js → auth-CEIITB7d.js} +1 -1
- package/dist/client/assets/{auth-catchall-ZO5v_1d8.js → auth-catchall-CEBn1SGS.js} +1 -1
- package/dist/client/assets/{auth-entry-B0W-KcwY.js → auth-entry-iXHgBQJV.js} +1 -1
- package/dist/client/assets/{auth-split-layout-EIGtHpJt.js → auth-split-layout-CsXqgaOS.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-BNMqjh7K.js → authenticate-and-persist-oauth-CN-ocXe3.js} +1 -1
- package/dist/client/assets/automation-list-row-JOMePUFR.js +1 -0
- package/dist/client/assets/automation-runs-KPGkDZAM.js +1 -0
- package/dist/client/assets/automations-BTtfVGNa.js +1 -0
- package/dist/client/assets/{autosend-Rn3iicpQ.js → autosend-CbkP_bEt.js} +1 -1
- package/dist/client/assets/{badge-CDGhoWxi.js → badge-DeNt4-FX.js} +1 -1
- package/dist/client/assets/{block-document-CwibGNVI.js → block-document-BzAW7wGZ.js} +3 -3
- package/dist/client/assets/{blocks-preview-workspace-context-D4YnI8VN.js → blocks-preview-workspace-context-aUwmyorT.js} +1 -1
- package/dist/client/assets/blocks-tab-states-PBqE8hLO.js +1 -0
- package/dist/client/assets/blog-schema-BYLQdC9S.js +1 -0
- package/dist/client/assets/buckets-CFL4z0d-.js +1 -0
- package/dist/client/assets/build-improve-prompt-doc-BpkVMxpg.js +2 -0
- package/dist/client/assets/{calendar-DlQTMw7m.js → calendar-GMyXKkbA.js} +1 -1
- package/dist/client/assets/campaigns-view-iaGM9YLd.js +1 -0
- package/dist/client/assets/{capability-load-error-DZqK06os.js → capability-load-error-juzFeQ-_.js} +1 -1
- package/dist/client/assets/category-editor-lTx7E71S.js +1 -0
- package/dist/client/assets/{cdn-tab-CtqgvIhC.js → cdn-tab-QH34WF_J.js} +1 -1
- package/dist/client/assets/{chart-Dh4qH5Sx.js → chart-D9k22T0E.js} +1 -1
- package/dist/client/assets/{chat-context-CEf_lJrx.js → chat-context-C56OVvQP.js} +7 -7
- package/dist/client/assets/{chat-draft-BWhaChdV.js → chat-draft-DNgi8tda.js} +1 -1
- package/dist/client/assets/{checkbox-B-X9akcX.js → checkbox-B6N4ay58.js} +1 -1
- package/dist/client/assets/choose-editor-CcEH03W4.js +1 -0
- package/dist/client/assets/{cli-auth-success-WALyW8uQ.js → cli-auth-success-CkyWspHU.js} +1 -1
- package/dist/client/assets/{client-icons-CrD_By3h.js → client-icons-DyjyTud6.js} +1 -1
- package/dist/client/assets/cms-settings-editor-CjDcV3Uq.js +1 -0
- package/dist/client/assets/{collapsible-D5FtbLtM.js → collapsible-D3gNdr7N.js} +1 -1
- package/dist/client/assets/collection-detail-D66AIxA0.js +1 -0
- package/dist/client/assets/collection-display-button-C28fH98T.js +1 -0
- package/dist/client/assets/{collection-search-RQehoVFG.js → collection-search-BIuQ3VPN.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-BHmn2oUB.js → collection-table-wrapper-7w5ciWB4.js} +1 -1
- package/dist/client/assets/{collection-tabs-BnX5iP1F.js → collection-tabs-m2567Q_Z.js} +1 -1
- package/dist/client/assets/{column-rules-B40MgWVZ.js → column-rules-DsLrWs5p.js} +2 -2
- package/dist/client/assets/{combobox-C3ljSkZg.js → combobox-BEVN0Tvl.js} +1 -1
- package/dist/client/assets/{command-CMb7suOV.js → command-N9BazZHl.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-DR1Vwqzz.js → companion-mcps-section-BQyuFD3F.js} +1 -1
- package/dist/client/assets/{config-DqTkCyHb.js → config-BmN9tmsx.js} +1 -1
- package/dist/client/assets/{connect-DIta94zG.js → connect-CefgSXIv.js} +3 -3
- package/dist/client/assets/{connect-layout-0Ai7RfSp.js → connect-layout-CUTmKBkE.js} +1 -1
- package/dist/client/assets/connect-source-dialog-CBjVXCAe.js +1 -0
- package/dist/client/assets/{connection-DECdok_z.js → connection-CQKYiXol.js} +1 -1
- package/dist/client/assets/{connection-card-ygPiujfi.js → connection-card-CvmG6XsV.js} +1 -1
- package/dist/client/assets/connection-detail-BloLauxz.js +1 -0
- package/dist/client/assets/{connection-form-helpers-WwsXdB5F.js → connection-form-helpers-ytOA1Nl6.js} +1 -1
- package/dist/client/assets/connections-BxS3FS9g.js +1 -0
- package/dist/client/assets/content-tab-BwyJP-DI.js +22 -0
- package/dist/client/assets/context-BakNzIE5.js +1 -0
- package/dist/client/assets/{context-menu-DbcS2c7t.js → context-menu-C4h1P6Vl.js} +1 -1
- package/dist/client/assets/{context-shell-CIQyklqt.js → context-shell-BxB7W0br.js} +5 -5
- package/dist/client/assets/{core.esm-BtSOaBaE.js → core.esm-BYOMVmVh.js} +1 -1
- package/dist/client/assets/create-organization-dialog-DqU6G9od.js +1 -0
- package/dist/client/assets/{daily-pulse-CH8DO0J_.js → daily-pulse-BlxIy31E.js} +1 -1
- package/dist/client/assets/discover-DMRyKZWE.js +1 -0
- package/dist/client/assets/{domain-settings-CuqQkLLJ.js → domain-settings-Cj-cRa8T.js} +1 -1
- package/dist/client/assets/{drawer-CBUeIn2K.js → drawer-B7ajVnwC.js} +1 -1
- package/dist/client/assets/{editor-CxPe-Q-E.js → editor-B7sIq_vQ.js} +1 -1
- package/dist/client/assets/{editor-classes-BSm-iwgQ.js → editor-classes-BinXFbFk.js} +1 -1
- package/dist/client/assets/{empty-state-BUdzXSg1.js → empty-state-Cc_qF1X6.js} +1 -1
- package/dist/client/assets/{empty-state-BzCZ0bf5.js → empty-state-RpLaBfip.js} +1 -1
- package/dist/client/assets/experiments-tab-BlgfPezU.js +1 -0
- package/dist/client/assets/experiments-tab-choice-DZqY092h.js +1 -0
- package/dist/client/assets/{extract-connection-data-DewBd7fP.js → extract-connection-data-ClMH8dL9.js} +1 -1
- package/dist/client/assets/{feature-gate-Dof2Z5sB.js → feature-gate-Wo8Dn-M0.js} +1 -1
- package/dist/client/assets/{feature-paywall-BQmjnHPQ.js → feature-paywall-C1_xpbwO.js} +1 -1
- package/dist/client/assets/file-explorer-DCgzwH3u.js +2 -0
- package/dist/client/assets/{file-preview-BnQW8KsX.js → file-preview-DFHvVsCR.js} +1 -1
- package/dist/client/assets/{file-share-button-zgq85Ppa.js → file-share-button-DMtXDXf3.js} +2 -2
- package/dist/client/assets/{file-type-icon-CnMrgPAl.js → file-type-icon-may_hs3N.js} +1 -1
- package/dist/client/assets/{folder-icon-3zXSNb7F.js → folder-icon-DREaQWIx.js} +2 -2
- package/dist/client/assets/{form-DWfSZ-uy.js → form-Gz8fbLdb.js} +1 -1
- package/dist/client/assets/general-DBULqBSQ.js +1 -0
- package/dist/client/assets/held-block-view-DTUWWRfL.js +20 -0
- package/dist/client/assets/home-DnXsGhyo.js +1 -0
- package/dist/client/assets/{icon-button-DBmNh0NJ.js → icon-button-TQkFyvqB.js} +1 -1
- package/dist/client/assets/{index-cD72qupV.js → index-B9NLvHLf.js} +1 -1
- package/dist/client/assets/index-BEX8cmtV.js +1 -0
- package/dist/client/assets/index-BGcfYf5c.js +4 -0
- package/dist/client/assets/index-BNmzMNlZ.js +253 -0
- package/dist/client/assets/{index-DipIYjGn.js → index-BNtuHmZB.js} +2 -2
- package/dist/client/assets/{index-x6QXFiYo.js → index-C6_m0mjP.js} +1 -1
- package/dist/client/assets/{index-BauMDA_C.js → index-CaH8ekvn.js} +1 -1
- package/dist/client/assets/{index-CH1yVrTT.js → index-CqFACk2B.js} +3 -3
- package/dist/client/assets/{index-DPQJRb2f.js → index-DENKa8lW.js} +6 -6
- package/dist/client/assets/{index-Bs2VsSFp.js → index-DNHxXhrW.js} +9 -9
- package/dist/client/assets/{index-C6RphnDz.js → index-DgWAoWIc.js} +1 -1
- package/dist/client/assets/{index-Nse4lEE5.js → index-DusHyRie.js} +1 -1
- package/dist/client/assets/{index-DFiVcvs1.js → index-bf-OLKAU.js} +1 -1
- package/dist/client/assets/{index-DdwTulXb.js → index-iynQP1if.js} +1 -1
- package/dist/client/assets/{index-CzAA1Ftq.js → index-kd3fyZ9a.js} +1 -1
- package/dist/client/assets/{index-redirect-Svh2E4vz.js → index-redirect-DAPRiYQw.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-BxY60Pl8.js → infiniteQueryObserver-ClGIthQz.js} +1 -1
- package/dist/client/assets/{infra-billing-DEwuRVXP.js → infra-billing-Bn8rlKTp.js} +1 -1
- package/dist/client/assets/{input-Y4nlSnES.js → input-BS4EACP3.js} +7 -7
- package/dist/client/assets/{input-boV3L7bW.js → input-DZSiMfCa.js} +1 -1
- package/dist/client/assets/{integration-icon-oEHZLv8F.js → integration-icon-BrTM8z-s.js} +1 -1
- package/dist/client/assets/{jira-icon-BkogXsHX.js → jira-icon-CvveHm37.js} +1 -1
- package/dist/client/assets/{label-C6V9azY9.js → label-BCxqhVIq.js} +1 -1
- package/dist/client/assets/{layout-D4-0fnKG.js → layout-C_-T37yU.js} +1 -1
- package/dist/client/assets/legacy-agents-deep-HN0h-Vgf.js +1 -0
- package/dist/client/assets/{legacy-main-redirect-DPDO4jzz.js → legacy-main-redirect-HqwAGFUC.js} +1 -1
- package/dist/client/assets/library-D2Mrm5WM.js +1 -0
- package/dist/client/assets/{login-QwQdytNu.js → login-D25rkjo_.js} +1 -1
- package/dist/client/assets/{markdown-DVKH1IaR.js → markdown-P8cO0xLZ.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-DXX6eros.js → mcp-app-renderer-CKUvsXnq.js} +2 -2
- package/dist/client/assets/{mcp-oauth-BT1yV9Hn.js → mcp-oauth-C9hLQucs.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CP_tf4jd.js → mcp-oauth-DBMA8wIh.js} +1 -1
- package/dist/client/assets/members-C_tx9w5g.js +1 -0
- package/dist/client/assets/{memory-C50Pawnh.js → memory-CsXGZJq1.js} +2 -2
- package/dist/client/assets/{mini-report-page-CAjqwv4W.js → mini-report-page-DGZYey3l.js} +1 -1
- package/dist/client/assets/{mock-board-D3aM5LBD.js → mock-board-BWzTY2k-.js} +5 -5
- package/dist/client/assets/{monaco-editor-LiopisRR.js → monaco-editor-CBJkBgIU.js} +2 -2
- package/dist/client/assets/monitoring-BLnrFAQj.js +1 -0
- package/dist/client/assets/{monitoring-stats-row-zg7N0blo.js → monitoring-stats-row-vWHUOUB3.js} +1 -1
- package/dist/client/assets/{multi-select-lVxVaMtl.js → multi-select-BNfLnIfI.js} +1 -1
- package/dist/client/assets/mustache-Crsi4VAX.js +4 -0
- package/dist/client/assets/{named-rule-uses-BeXmyiue.js → named-rule-uses-D5gjZwOp.js} +1 -1
- package/dist/client/assets/named-rule-view-BVCpec2I.js +1 -0
- package/dist/client/assets/{new-project-dialog-DmsgoraK.js → new-project-dialog-BzJmdXI6.js} +1 -1
- package/dist/client/assets/{oauth-callback-Bs2w3d0I.js → oauth-callback-CwZ-b3nE.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CUCvxuBI.js → oauth-callback-ai-provider-CujNNAU2.js} +1 -1
- package/dist/client/assets/onboarding-Csy3KW6h.js +1 -0
- package/dist/client/assets/openai-conversation-DJfgyA82.js +3 -0
- package/dist/client/assets/{optimistic-project-sidebar-views-C7cacXI0.js → optimistic-project-sidebar-views-XzUayXF_.js} +1 -1
- package/dist/client/assets/{order-monitor-day-D34Jke5D.js → order-monitor-day-BUk1fjA6.js} +1 -1
- package/dist/client/assets/organization-choice-BG-EMl8L.js +1 -0
- package/dist/client/assets/orgs-BOi51Yxa.js +1 -0
- package/dist/client/assets/page-seo-form-D4gneorY.js +1 -0
- package/dist/client/assets/{pair-71Dh0mlf.js → pair-Dh_1oqHi.js} +8 -8
- package/dist/client/assets/parse-sections-B30A8ECY.js +1 -0
- package/dist/client/assets/plan-BXu8SQ3T.js +1 -0
- package/dist/client/assets/{plan-ladder-DMra4X10.js → plan-ladder-CN5p5ylK.js} +1 -1
- package/dist/client/assets/{popover-DClINcvR.js → popover-DauDBkON.js} +1 -1
- package/dist/client/assets/post-calendar-Ceopsk1u.js +1 -0
- package/dist/client/assets/post-editor-BChaRDNt.js +2 -0
- package/dist/client/assets/{preview-content-T_PMJBX-.js → preview-content-BvhoJjFR.js} +1 -1
- package/dist/client/assets/{preview-dialog-BZFfGFuX.js → preview-dialog-iRKqzeeN.js} +1 -1
- package/dist/client/assets/{preview-panel-DlTtP1Ms.js → preview-panel-DcbhbW1H.js} +1 -1
- package/dist/client/assets/preview-tab-ClK0lOMy.js +551 -0
- package/dist/client/assets/{product-picker-dialog-BpSOLmzl.js → product-picker-dialog-CsTqbwXT.js} +1 -1
- package/dist/client/assets/profile-DE1V4tEF.js +1 -0
- package/dist/client/assets/project-app-view-BpeI5cMf.js +1 -0
- package/dist/client/assets/{project-apps-Dm5IS3KO.js → project-apps-CNRV3DAE.js} +1 -1
- package/dist/client/assets/project-feed-BcaTqzKD.js +1 -0
- package/dist/client/assets/{project-icon-DuRHj8pv.js → project-icon-9kbQzXfH.js} +1 -1
- package/dist/client/assets/project-reports-DZCmLCmE.js +1 -0
- package/dist/client/assets/project-tasks-D6qNETK3.js +1 -0
- package/dist/client/assets/projects-Kz2HQD_e.js +1 -0
- package/dist/client/assets/{projects-empty-state-QJ0Cx8Z2.js → projects-empty-state-Df7eS0pA.js} +1 -1
- package/dist/client/assets/{prompts-C9l1TNag.js → prompts-B4KLkb4I.js} +1 -1
- package/dist/client/assets/record-editor-C5XOx_LV.js +1 -0
- package/dist/client/assets/redirect-editor-BxKT3ntE.js +1 -0
- package/dist/client/assets/releases-api-BDl7LEw1.js +1 -0
- package/dist/client/assets/{reports-BOvqWT5T.js → reports-Cp14zg57.js} +1 -1
- package/dist/client/assets/reports-DBFNTtm-.js +1 -0
- package/dist/client/assets/reports-onboarding-D2UqC4mS.js +1 -0
- package/dist/client/assets/reports-tab-C51R-6vi.js +2 -0
- package/dist/client/assets/repositories-C77B6dOt.js +1 -0
- package/dist/client/assets/repositories-CHKGn0VU.js +1 -0
- package/dist/client/assets/repository-binding-BZ7FmJ0X.js +1 -0
- package/dist/client/assets/{repository-import-picker-DmCy1J1K.js → repository-import-picker-Bjws7k2-.js} +1 -1
- package/dist/client/assets/repository-picker-DkvIZLAj.js +1 -0
- package/dist/client/assets/{require-capability-Bij86NMO.js → require-capability-Bm5pde_M.js} +1 -1
- package/dist/client/assets/{required-auth-layout-FVugTURm.js → required-auth-layout-Dn8nNstE.js} +1 -1
- package/dist/client/assets/{reset-password-DT6AfwVB.js → reset-password-CHMCFAp9.js} +1 -1
- package/dist/client/assets/{resizable-DgP86V61.js → resizable-BYZDi11K.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-D9iIIIDe.js → resolve-tab-icon-DLcHhSBW.js} +1 -1
- package/dist/client/assets/review-settings-DEFTQSp0.js +1 -0
- package/dist/client/assets/roles-BIj8m30-.js +1 -0
- package/dist/client/assets/route-CwIKlFpH.js +1 -0
- package/dist/client/assets/route-DQxiKHs8.js +1 -0
- package/dist/client/assets/route-L2EzRsks.js +1 -0
- package/dist/client/assets/{sandbox-lifecycle-context-q0eTvNvQ.js → sandbox-lifecycle-context-DMfngoi-.js} +1 -1
- package/dist/client/assets/{schema-CJ53G47b.js → schema-DEyBWI2y.js} +1 -1
- package/dist/client/assets/{schema-DNweLWtn.js → schema-DoiqvTL7.js} +1 -1
- package/dist/client/assets/{scroll-area-BHIKiLUM.js → scroll-area-Cfsm1vBV.js} +1 -1
- package/dist/client/assets/search-input-DBKkXR0y.js +1 -0
- package/dist/client/assets/{search-toggle-DzUrEZFD.js → search-toggle-CzYTwp_L.js} +1 -1
- package/dist/client/assets/secret-ciphertext-cTA7BSVY.js +1 -0
- package/dist/client/assets/secret-picker-CqxG24X7.js +1 -0
- package/dist/client/assets/secrets-CtByih4R.js +1 -0
- package/dist/client/assets/{sections-DHvRm7bA.js → sections-CCcpB_PT.js} +1 -1
- package/dist/client/assets/sections-editor-DpO_mTF7.js +1 -0
- package/dist/client/assets/{select-BvUL0HyR.js → select-CTAm_W2d.js} +1 -1
- package/dist/client/assets/{select-model-Szkl3757.js → select-model-Cvj2OnbU.js} +1 -1
- package/dist/client/assets/seo-editor-BPToAJRY.js +1 -0
- package/dist/client/assets/{separator-vlhb1Tzj.js → separator-BeYssz5V.js} +1 -1
- package/dist/client/assets/settings-tab-BRtykuoH.js +1 -0
- package/dist/client/assets/{sheet-D1CAQsjr.js → sheet-C52S-h6R.js} +1 -1
- package/dist/client/assets/shell-layout-DYY0I41_.js +1 -0
- package/dist/client/assets/site-draft-actions-DwqQ-cQC.js +12 -0
- package/dist/client/assets/site-draft-view-CiKU2Icp.js +2 -0
- package/dist/client/assets/site-editor-CuXmo07G.js +1 -0
- package/dist/client/assets/site-editor-toast-CT4NtD1f.js +1 -0
- package/dist/client/assets/skills-_WDetSCi.js +1 -0
- package/dist/client/assets/{slider-EpxmA7ZL.js → slider-rNbrBC-4.js} +1 -1
- package/dist/client/assets/{sortable.esm-CpdZxqSN.js → sortable.esm-Cw5kBwgn.js} +1 -1
- package/dist/client/assets/sso-DSG3YPMw.js +1 -0
- package/dist/client/assets/{suggestion-DqRsSpc-.js → suggestion-Dd_Uy5Bv.js} +2 -2
- package/dist/client/assets/{switch-BudKCJf7.js → switch-nUFQi60k.js} +1 -1
- package/dist/client/assets/{symbol-CYQiJJdu.js → symbol-C3kEOGZ_.js} +1 -1
- package/dist/client/assets/synced-repos-DBmibobg.js +1 -0
- package/dist/client/assets/{tab-icon-glyph-BGGv8hr_.js → tab-icon-glyph-Bzpngl6a.js} +1 -1
- package/dist/client/assets/{table-Bo_p8Wa3.js → table-CxQHf5NT.js} +1 -1
- package/dist/client/assets/{tabs-BTB5YGW1.js → tabs-BwD6LFyC.js} +1 -1
- package/dist/client/assets/task-assignee-avatar-Bg9ijzoY.js +1 -0
- package/dist/client/assets/{task-board-Ds21WWvc.js → task-board-DreQgJBj.js} +1 -1
- package/dist/client/assets/{task-route-BUL4mDi5.js → task-route-B6QYswnx.js} +1 -1
- package/dist/client/assets/{task-status-CK5oSIgi.js → task-status-DcCdeelW.js} +1 -1
- package/dist/client/assets/taskboard-analytics-C_aUAX7S.js +1 -0
- package/dist/client/assets/tasks-CYY9XlJ3.js +4 -0
- package/dist/client/assets/tasks-CeouZ3tS.js +1 -0
- package/dist/client/assets/{textarea-BS7I3MZL.js → textarea-y7TWtoua.js} +1 -1
- package/dist/client/assets/thread-analytics-BD8n1a8E.js +1 -0
- package/dist/client/assets/{thread-intent-C0R8BtBw.js → thread-intent-cB2EtHpg.js} +6 -6
- package/dist/client/assets/thread-route-Cr5f3jw8.js +1 -0
- package/dist/client/assets/{thread-route-yHr3Xqpq.js → thread-route-D01w_vQB.js} +1 -1
- package/dist/client/assets/thread-sheet-body-C0IyWshl.js +1 -0
- package/dist/client/assets/{time-range-picker-C_RAU_JZ.js → time-range-picker-bp6BeGMC.js} +1 -1
- package/dist/client/assets/toggle-group-BIu6qfZV.js +1 -0
- package/dist/client/assets/{tool-namespace-B1sVq59x.js → tool-namespace-Crbzrqv8.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-D4YToeEY.js → toolbar-icon-button-ByMmG3VL.js} +1 -1
- package/dist/client/assets/{tooltip-CmTwSHYA.js → tooltip-DibJz0Jl.js} +1 -1
- package/dist/client/assets/{tooltipContext-C41VBtBA.js → tooltipContext-BzrsG1UN.js} +1 -1
- package/dist/client/assets/track-C-8tVJFa.js +1 -0
- package/dist/client/assets/{types-05YrcBTZ.js → types-BdOsWOEi.js} +9 -9
- package/dist/client/assets/{url-slug-BQQBxd5s.js → url-slug-CPCergXm.js} +1 -1
- package/dist/client/assets/{usage-stats-DTNxQXdY.js → usage-stats-DDafRqWC.js} +7 -7
- package/dist/client/assets/{use-ai-providers-BdMI1dJ8.js → use-ai-providers-Bsehd5pg.js} +1 -1
- package/dist/client/assets/use-apply-named-rule-CeNTU7vM.js +1 -0
- package/dist/client/assets/{use-automations-7sML6axw.js → use-automations-BscjsX1o.js} +1 -1
- package/dist/client/assets/use-autosave-D0y0c0lt.js +1 -0
- package/dist/client/assets/{use-chat-layout-state-DuWKLw_d.js → use-chat-layout-state-DpOxQYv4.js} +1 -1
- package/dist/client/assets/{use-clock-tick-Cqy994m5.js → use-clock-tick-jRUiEK1v.js} +1 -1
- package/dist/client/assets/{use-connect-companion-B7-Rnq6I.js → use-connect-companion-BGtpVGmA.js} +1 -1
- package/dist/client/assets/use-connection-CAR6Cxbr.js +1 -0
- package/dist/client/assets/{use-content-sync-DxuiTsAP.js → use-content-sync-bYlxy6np.js} +1 -1
- package/dist/client/assets/{use-copy-ByMN8ZBl.js → use-copy-Dpm_jhm-.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-UGWMFU-8.js → use-create-virtual-mcp-DcCX7uo7.js} +1 -1
- package/dist/client/assets/use-date-fns-locale-hUyExEVb.js +1 -0
- package/dist/client/assets/{use-debounced-autosave-DN6l6XR3.js → use-debounced-autosave-By6os5xD.js} +1 -1
- package/dist/client/assets/{use-debounced-value-3kPVK8wc.js → use-debounced-value-BtR2lyTj.js} +1 -1
- package/dist/client/assets/use-deco-credits-DRIA1g3T.js +1 -0
- package/dist/client/assets/{use-decopilot-events-DH9vtuqj.js → use-decopilot-events-C4OBhauN.js} +1 -1
- package/dist/client/assets/use-delete-connection-BM5PcuGQ.js +1 -0
- package/dist/client/assets/{use-deployment-admin-BlS14Krh.js → use-deployment-admin-BmDeutjQ.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-8Q6wI_7_.js → use-fast-preview-draft-url-BUDoPHon.js} +1 -1
- package/dist/client/assets/{use-file-configs-BJwH2-6c.js → use-file-configs-CuVchUT-.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-BbsXPNFF.js → use-inbox-feed-Bi03vVLM.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-D-NkL7pd.js → use-infinite-scroll-0YRynoMy.js} +1 -1
- package/dist/client/assets/use-join-requests-BhMSzUBO.js +1 -0
- package/dist/client/assets/use-main-panel-tabs-QcdwwtJ8.js +1 -0
- package/dist/client/assets/{use-mcp-auth-status-SDpJIu0o.js → use-mcp-auth-status-Ddp-NElL.js} +1 -1
- package/dist/client/assets/{use-mcp-client-CqNgp7C3.js → use-mcp-client-ClU7gdfw.js} +10 -10
- package/dist/client/assets/{use-mcp-prompts-_OL9f0kB.js → use-mcp-prompts-CFFfSPcj.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CzxPUwUO.js → use-mcp-tools-CsGOzrhW.js} +1 -1
- package/dist/client/assets/{use-mobile-DpTfSAm7.js → use-mobile-nW9hYb6L.js} +1 -1
- package/dist/client/assets/use-move-blocks-BKlQlSno.js +1 -0
- package/dist/client/assets/{use-navigate-to-agent-CblBUgFe.js → use-navigate-to-agent-CvuO-uuz.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-C8vpSsvJ.js → use-open-billing-url-6zduD8ZA.js} +1 -1
- package/dist/client/assets/{use-org-fs-BwLqCU_I.js → use-org-fs-BcT14y41.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-Cg7khzRw.js → use-org-repo-syncs-BdTpYW4-.js} +1 -1
- package/dist/client/assets/{use-org-sso-CXvlVlUi.js → use-org-sso-DdzTjSOo.js} +1 -1
- package/dist/client/assets/use-organization-roles-DQlsWqEE.js +1 -0
- package/dist/client/assets/{use-organization-settings-R35CeX0x.js → use-organization-settings-DeXdcCtZ.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-DcAwEhOb.js → use-panel-navigate-BrjENNrA.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-B1h5Pugj.js → use-project-native-view-presence-OgGOYaV4.js} +1 -1
- package/dist/client/assets/{use-project-scope-COq2XQVT.js → use-project-scope-DryffHrf.js} +1 -1
- package/dist/client/assets/{use-recent-apps-DQiepK1I.js → use-recent-apps-CMgGjBH4.js} +1 -1
- package/dist/client/assets/{use-releases-CXFA4FcN.js → use-releases-BQePeR_j.js} +1 -1
- package/dist/client/assets/use-reports-diagnostic-KZB3C_26.js +1 -0
- package/dist/client/assets/{use-sandbox-events-wT6wBZge.js → use-sandbox-events-ClbDdVRn.js} +2 -2
- package/dist/client/assets/{use-secrets-Dti2Zjt-.js → use-secrets-Cjihb12f.js} +1 -1
- package/dist/client/assets/use-section-preview-base-go9VMYa4.js +1 -0
- package/dist/client/assets/use-session-runtime-CQOTzbKn.js +1 -0
- package/dist/client/assets/{use-sidebar-collapsed-DCvF-wFz.js → use-sidebar-collapsed-CUSnfCt-.js} +1 -1
- package/dist/client/assets/{use-tags-Dkh7i4b9.js → use-tags-CMyUN8Qd.js} +1 -1
- package/dist/client/assets/use-task-board-analytics-BWzR51Kh.js +1 -0
- package/dist/client/assets/{use-task-board-events-BTnll7tY.js → use-task-board-events-DlFBtyOL.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-DV52O8jk.js → use-task-board-item-prs-D9Aj6NRX.js} +1 -1
- package/dist/client/assets/{use-task-metadata-L677N_ml.js → use-task-metadata-DcdDwiSS.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-BZBVj7t2.js → use-thread-analytics-cLhxQI8B.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-DkwE9vVN.js → use-thread-outputs-D8Bvo55q.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DWVaUM2t.js +1 -0
- package/dist/client/assets/useQueries-B8DPRYfS.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-6Ovi3jRe.js +1 -0
- package/dist/client/assets/users-BIP3dsuH.js +1 -0
- package/dist/client/assets/{utils-JJWwAhjH.js → utils-DeFulDMz.js} +1 -1
- package/dist/client/assets/variant-calendar-C37bfPDk.js +1 -0
- package/dist/client/assets/variant-matcher-override-B4pYtxaz.js +1 -0
- package/dist/client/assets/{virtual-mcp-DhxG1LUt.js → virtual-mcp-D_aBBfQL.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-HmUSWdEg.js → watch-sse-pool-Bk0Yni6j.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/server.js +783 -783
- package/package.json +1 -1
- package/dist/client/assets/User01-B5NngWXw.js +0 -1
- package/dist/client/assets/access-gate-CXvtA9IQ.js +0 -1
- package/dist/client/assets/agent-analytics-BRVR9Nm7.js +0 -1
- package/dist/client/assets/agent-app-Wibq0OFa.js +0 -1
- package/dist/client/assets/agent-assets-Bj5Luz-W.js +0 -1
- package/dist/client/assets/agent-automation-Dr4Y6VGJ.js +0 -20
- package/dist/client/assets/agent-automations-FAc-0hCc.js +0 -1
- package/dist/client/assets/agent-calendar-D7DufZS_.js +0 -1
- package/dist/client/assets/agent-connect-sources-B2TBus9P.js +0 -1
- package/dist/client/assets/agent-deck-BQ7xD_0N.js +0 -1
- package/dist/client/assets/agent-e2e-Xz5_DbBd.js +0 -1
- package/dist/client/assets/agent-experiments-DMb-JH-W.js +0 -1
- package/dist/client/assets/agent-file-jmWEmVy9.js +0 -1
- package/dist/client/assets/agent-hosting-Jt1eRL4L.js +0 -1
- package/dist/client/assets/agent-icon-D9qv9iJQ.js +0 -1
- package/dist/client/assets/agent-library-CYOoJcrp.js +0 -1
- package/dist/client/assets/agent-library-file-CHPq6ELL.js +0 -1
- package/dist/client/assets/agent-monitor-Bxvs2XHa.js +0 -1
- package/dist/client/assets/agent-overview-BNrr8sDt.js +0 -1
- package/dist/client/assets/agent-releases-BusIaoNs.js +0 -2
- package/dist/client/assets/agent-settings-CCQqUf-q.js +0 -1
- package/dist/client/assets/agent-site-editor-code-CX9PY1d_.js +0 -2
- package/dist/client/assets/agent-site-editor-content-qNC8jZls.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-DhMNzXt9.js +0 -1
- package/dist/client/assets/agent-view-CI9h5gAx.js +0 -1
- package/dist/client/assets/agents-list-DYyNDxTw.js +0 -1
- package/dist/client/assets/alert-dialog-BBFgXAmX.js +0 -7
- package/dist/client/assets/analytics-sections-czReTaOZ.js +0 -1
- package/dist/client/assets/analytics-tab-C1nax7x3.js +0 -2
- package/dist/client/assets/api-keys-f3ViWnh0.js +0 -1
- package/dist/client/assets/api-keys-qNGMRqbx.js +0 -1
- package/dist/client/assets/app-editor-D1Zrm2TM.js +0 -1
- package/dist/client/assets/automation-list-row-CiF6h_o_.js +0 -1
- package/dist/client/assets/automation-runs-BqVYPzh9.js +0 -1
- package/dist/client/assets/automations-BHFkDeZ2.js +0 -1
- package/dist/client/assets/avatar-DsyxJdd5.js +0 -1
- package/dist/client/assets/blocks-tab-states-_rQb-3nf.js +0 -1
- package/dist/client/assets/blog-schema-hiJ1VvK3.js +0 -1
- package/dist/client/assets/buckets-Cgqz5f6M.js +0 -1
- package/dist/client/assets/build-improve-prompt-doc-Cx1NA6_T.js +0 -2
- package/dist/client/assets/campaigns-view-Bn067WyB.js +0 -1
- package/dist/client/assets/category-editor-Co3bRfpu.js +0 -1
- package/dist/client/assets/choose-editor-DZmSFlJ2.js +0 -1
- package/dist/client/assets/cms-settings-editor-B1PCbkSm.js +0 -1
- package/dist/client/assets/collection-detail-DtWJ8lB6.js +0 -1
- package/dist/client/assets/collection-display-button-BaC3Lby-.js +0 -1
- package/dist/client/assets/connect-source-dialog-DjtB0gt2.js +0 -1
- package/dist/client/assets/connection-detail-C9scWK5j.js +0 -1
- package/dist/client/assets/connections-BQjNaGS9.js +0 -1
- package/dist/client/assets/content-tab-CAW0Bhf6.js +0 -22
- package/dist/client/assets/context-ddLbYTQy.js +0 -1
- package/dist/client/assets/create-organization-dialog-B1J3dbRj.js +0 -1
- package/dist/client/assets/differenceInSeconds-C3x8sHUj.js +0 -1
- package/dist/client/assets/discover-DORJ6GMD.js +0 -1
- package/dist/client/assets/experiments-tab-WOPYssza.js +0 -1
- package/dist/client/assets/experiments-tab-choice-CI25uYfH.js +0 -1
- package/dist/client/assets/file-explorer-CtLkW4hH.js +0 -2
- package/dist/client/assets/format-time-Cq80KKvY.js +0 -1
- package/dist/client/assets/general-CANWkC13.js +0 -1
- package/dist/client/assets/home-BFodRKhb.js +0 -1
- package/dist/client/assets/index-5D9wIy3o.js +0 -1
- package/dist/client/assets/index-BAmB740B.js +0 -243
- package/dist/client/assets/index-CkPVfANw.js +0 -4
- package/dist/client/assets/legacy-agents-deep-oTGqQAve.js +0 -1
- package/dist/client/assets/library-BNLBVJPY.js +0 -1
- package/dist/client/assets/members-B1ZJujYN.js +0 -1
- package/dist/client/assets/monitoring-B7vBtbj0.js +0 -1
- package/dist/client/assets/mustache-D4PpoYZo.js +0 -4
- package/dist/client/assets/named-rule-view-BD9ako2G.js +0 -1
- package/dist/client/assets/onboarding-BUhC7Axs.js +0 -1
- package/dist/client/assets/openai-conversation-D40-j2aL.js +0 -3
- package/dist/client/assets/organization-choice-CZm6-Lsp.js +0 -1
- package/dist/client/assets/orgs-BzS4vgpT.js +0 -1
- package/dist/client/assets/page-seo-form-UBTBjVc2.js +0 -1
- package/dist/client/assets/parse-sections-C7SJnlZ7.js +0 -1
- package/dist/client/assets/plan-6YWkk0Z5.js +0 -1
- package/dist/client/assets/post-calendar-l09Ocu-Z.js +0 -1
- package/dist/client/assets/post-editor-B5DakPnS.js +0 -2
- package/dist/client/assets/preview-tab-DE5CyvZI.js +0 -551
- package/dist/client/assets/profile-l7YzIikv.js +0 -1
- package/dist/client/assets/project-app-view-CZ4ncHJw.js +0 -1
- package/dist/client/assets/project-feed-B429synm.js +0 -1
- package/dist/client/assets/project-reports-BqcstnBp.js +0 -1
- package/dist/client/assets/project-tasks-0lrWUpFL.js +0 -1
- package/dist/client/assets/projects-s6UXfr6V.js +0 -1
- package/dist/client/assets/record-editor-BBAM6dba.js +0 -1
- package/dist/client/assets/redirect-editor-Da8bdxGX.js +0 -1
- package/dist/client/assets/releases-api-BTCDyPHo.js +0 -1
- package/dist/client/assets/reports-CBo7lxtK.js +0 -1
- package/dist/client/assets/reports-onboarding-D9oUufsD.js +0 -1
- package/dist/client/assets/reports-tab-DT51kjgE.js +0 -2
- package/dist/client/assets/repositories-CM9WvII2.js +0 -1
- package/dist/client/assets/repositories-bGHlY3pM.js +0 -1
- package/dist/client/assets/repository-binding-BgJ8uAoU.js +0 -1
- package/dist/client/assets/repository-picker-BvSncDst.js +0 -1
- package/dist/client/assets/review-settings-DdYgJGVz.js +0 -1
- package/dist/client/assets/roles-CgVcsOdT.js +0 -1
- package/dist/client/assets/route-CkFix_vP.js +0 -1
- package/dist/client/assets/route-DODiDy-j.js +0 -1
- package/dist/client/assets/route-DVi1VWR6.js +0 -1
- package/dist/client/assets/runnable-block-editor-dRq9eTzq.js +0 -20
- package/dist/client/assets/search-input-BAISJ9LS.js +0 -1
- package/dist/client/assets/secret-ciphertext-BoA15qGd.js +0 -1
- package/dist/client/assets/secret-picker-Cdv3xW0U.js +0 -1
- package/dist/client/assets/secrets-C7hm_npZ.js +0 -1
- package/dist/client/assets/sections-editor-DgEGZXcq.js +0 -4
- package/dist/client/assets/seo-editor-BLHMI9qj.js +0 -1
- package/dist/client/assets/settings-tab-Dx6WgZsi.js +0 -1
- package/dist/client/assets/shell-layout-B5jnML3d.js +0 -1
- package/dist/client/assets/site-draft-actions-D1d2wytY.js +0 -12
- package/dist/client/assets/site-draft-view-DmMlvXzq.js +0 -2
- package/dist/client/assets/site-editor-eGFXfzA8.js +0 -1
- package/dist/client/assets/site-editor-toast-CGZS9BwD.js +0 -1
- package/dist/client/assets/skills-NSxr4Z0X.js +0 -1
- package/dist/client/assets/sso-BHFwYob2.js +0 -1
- package/dist/client/assets/synced-repos-D-U5QZg2.js +0 -1
- package/dist/client/assets/task-assignee-avatar-CAj5yPyc.js +0 -1
- package/dist/client/assets/taskboard-analytics-D6UWbvQC.js +0 -1
- package/dist/client/assets/tasks-CMUaHBkk.js +0 -4
- package/dist/client/assets/tasks-D5WIQI-o.js +0 -1
- package/dist/client/assets/thread-analytics-Cqdeb287.js +0 -1
- package/dist/client/assets/thread-route-DnoU0Lqn.js +0 -1
- package/dist/client/assets/thread-sheet-body-BBHV5kVE.js +0 -1
- package/dist/client/assets/toggle-group-BcfSAKQP.js +0 -1
- package/dist/client/assets/track-DZvu8ree.js +0 -1
- package/dist/client/assets/use-apply-named-rule-pRgVjxXf.js +0 -1
- package/dist/client/assets/use-autosave-DMApQf0t.js +0 -1
- package/dist/client/assets/use-connection-DQSt0eTw.js +0 -1
- package/dist/client/assets/use-date-fns-locale-C0oymQ59.js +0 -1
- package/dist/client/assets/use-deco-credits-CT72rZSv.js +0 -1
- package/dist/client/assets/use-delete-connection-D5mcm_l_.js +0 -1
- package/dist/client/assets/use-join-requests-C-xyNeji.js +0 -1
- package/dist/client/assets/use-main-panel-tabs-DvsYVOuQ.js +0 -1
- package/dist/client/assets/use-members-CTltnPbx.js +0 -1
- package/dist/client/assets/use-move-blocks-YDfVWv8x.js +0 -1
- package/dist/client/assets/use-org-auth-client-Bi3e38-G.js +0 -1
- package/dist/client/assets/use-organization-roles-zn84F9HK.js +0 -1
- package/dist/client/assets/use-reports-diagnostic-Dwax0vDS.js +0 -1
- package/dist/client/assets/use-section-preview-base-CFzMfuNP.js +0 -1
- package/dist/client/assets/use-session-runtime-Ba_EwQTc.js +0 -1
- package/dist/client/assets/use-task-board-analytics-Bqx8wPMm.js +0 -1
- package/dist/client/assets/useInfiniteQuery-D-VWsr8W.js +0 -1
- package/dist/client/assets/useQueries-jXxHGDMF.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-mJC6qHan.js +0 -1
- package/dist/client/assets/users-T5camo9f.js +0 -1
- package/dist/client/assets/variant-calendar-BgT-KS6e.js +0 -1
- package/dist/client/assets/variant-matcher-override-CgViiiNQ.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as f,j as a,bo as j,h as I,bp as S,bq as b}from"./index-BAmB740B.js";import{i as g}from"./SearchMd-BYu5iUPZ.js";function N(x){const e=f.c(14),{value:r,onChange:l,placeholder:h,onKeyDown:i,className:p,isSearching:c,disabled:u}=x,m=h===void 0?"Search...":h;let s;e[0]!==c?(s=a.jsx(j,{className:"pr-0",children:c?a.jsx(I,{className:"size-4"}):a.jsx(g,{})}),e[0]=c,e[1]=s):s=e[1];let t;e[2]!==l?(t=d=>l(d.target.value),e[2]=l,e[3]=t):t=e[3];let n;e[4]!==u||e[5]!==i||e[6]!==m||e[7]!==t||e[8]!==r?(n=a.jsx(S,{type:"text",value:r,onChange:t,onKeyDown:i,placeholder:m,disabled:u}),e[4]=u,e[5]=i,e[6]=m,e[7]=t,e[8]=r,e[9]=n):n=e[9];let o;return e[10]!==p||e[11]!==s||e[12]!==n?(o=a.jsxs(b,{size:"sm",className:p,children:[s,n]}),e[10]=p,e[11]=s,e[12]=n,e[13]=o):o=e[13],o}export{N as S};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as S,b as j,j as i,r as C,af as A,B as E,l as w,a5 as R}from"./index-BAmB740B.js";import{a as T}from"./Copy01-BNgQXLom.js";import{a as N,b as L,A as k}from"./alert-CXq7wXAP.js";import{u as O}from"./use-copy-ByMN8ZBl.js";import{a3 as $,aF as B}from"./parse-sections-C7SJnlZ7.js";const x="https://docs.decocms.com/storefront/blocks",D={quickstart:`${x}/next/quickstart`,siteEditor:`${x}/next/site-editor#edit-on-your-machine`,serve:`${x}/next/cli#deco-serve`,schema:`${x}/next/cli#deco-schema-and-deco-content`,troubleshooting:`${x}/next/troubleshooting#site-editor`};function Q(t){const e=S.c(4),{text:s}=t;let n;e[0]!==s?(n=s.split("`").map(P),e[0]=s,e[1]=n):n=e[1];let r;return e[2]!==n?(r=i.jsx(i.Fragment,{children:n}),e[2]=n,e[3]=r):r=e[3],r}function P(t,e){return e%2===1?i.jsx("code",{className:"whitespace-nowrap rounded bg-muted px-1 py-px font-mono text-[0.85em] text-foreground",children:t},e):i.jsx(C.Fragment,{children:t},e)}function ee(t){const e=S.c(31),{command:s}=t,n=j(),{handleCopy:r,copied:o}=O();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsxs("span",{"aria-hidden":"true",className:"select-none text-muted-foreground",children:["$"," "]}),e[0]=a):a=e[0];let c;e[1]!==s?(c=s.split(" ").map(I),e[1]=s,e[2]=c):c=e[2];let l;e[3]!==c?(l=i.jsxs("code",{className:"min-w-0 flex-1 overflow-x-auto py-1.5 font-mono text-xs leading-5 text-foreground",children:[a,c]}),e[3]=c,e[4]=l):l=e[4];let d;e[5]!==n?(d=n("decoServe.guide.copy"),e[5]=n,e[6]=d):d=e[6];let u;e[7]!==s||e[8]!==r?(u=()=>{r(s).catch(F)},e[7]=s,e[8]=r,e[9]=u):u=e[9];let f;e[10]!==o?(f=o?i.jsx(A,{className:"text-success"}):i.jsx(T,{}),e[10]=o,e[11]=f):f=e[11];let p;e[12]!==o||e[13]!==n?(p=n(o?"decoServe.guide.copied":"decoServe.guide.copyShort"),e[12]=o,e[13]=n,e[14]=p):p=e[14];let m;e[15]!==p?(m=i.jsx("span",{"aria-hidden":"true",children:p}),e[15]=p,e[16]=m):m=e[16];let g;e[17]!==d||e[18]!==u||e[19]!==f||e[20]!==m?(g=i.jsxs(E,{type:"button",variant:"ghost",size:"sm",className:"shrink-0 self-start","aria-label":d,onClick:u,children:[f,m]}),e[17]=d,e[18]=u,e[19]=f,e[20]=m,e[21]=g):g=e[21];let h;e[22]!==o||e[23]!==n?(h=o?n("decoServe.guide.copiedAnnouncement"):"",e[22]=o,e[23]=n,e[24]=h):h=e[24];let v;e[25]!==h?(v=i.jsx("span",{className:"sr-only","aria-live":"polite",children:h}),e[25]=h,e[26]=v):v=e[26];let y;return e[27]!==v||e[28]!==l||e[29]!==g?(y=i.jsxs("div",{className:"flex items-center gap-1 rounded-lg border border-border bg-muted/60 py-1 pr-1 pl-3",children:[l,g,v]}),e[27]=v,e[28]=l,e[29]=g,e[30]=y):y=e[30],y}function F(){}function I(t,e){return i.jsxs(C.Fragment,{children:[e>0&&" ",i.jsx("span",{className:"whitespace-nowrap",children:t})]},e)}const Y={quickstart:"decoServe.docs.quickstart",siteEditor:"decoServe.docs.siteEditor",serve:"decoServe.docs.serve",schema:"decoServe.docs.schema",troubleshooting:"decoServe.docs.troubleshooting"};function te(t){const e=S.c(20),{links:s,className:n}=t,r=j();let o;e[0]!==r?(o=r("decoServe.docs.heading"),e[0]=r,e[1]=o):o=e[1];let a;e[2]!==n?(a=w("flex flex-col gap-2 text-sm",n),e[2]=n,e[3]=a):a=e[3];let c;e[4]!==r?(c=r("decoServe.docs.heading"),e[4]=r,e[5]=c):c=e[5];let l;e[6]!==c?(l=i.jsx("span",{className:"text-muted-foreground",children:c}),e[6]=c,e[7]=l):l=e[7];let d;if(e[8]!==s||e[9]!==r){let p;e[11]!==r?(p=m=>i.jsxs("a",{href:D[m],target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-foreground underline-offset-4 hover:underline focus-visible:underline",children:[r(Y[m]),i.jsx(R,{"aria-hidden":"true",className:"size-3.5"}),i.jsx("span",{className:"sr-only",children:r("decoServe.docs.newTab")})]},m),e[11]=r,e[12]=p):p=e[12],d=s.map(p),e[8]=s,e[9]=r,e[10]=d}else d=e[10];let u;e[13]!==d?(u=i.jsx("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1",children:d}),e[13]=d,e[14]=u):u=e[14];let f;return e[15]!==o||e[16]!==a||e[17]!==l||e[18]!==u?(f=i.jsxs("nav",{"aria-label":o,className:a,children:[l,u]}),e[15]=o,e[16]=a,e[17]=l,e[18]=u,e[19]=f):f=e[19],f}function se(t,e,s){switch(e.reason){case"not-answering":return{title:t("decoServe.state.notAnswering.title"),body:t("decoServe.state.notAnswering.short",{host:s})};case"outdated":return{title:t("decoServe.state.outdated.title"),body:t("decoServe.state.outdated.body",{host:s})};case"version-mismatch":return{title:t("decoServe.state.versionMismatch.title"),body:t("decoServe.state.versionMismatch.body",{host:s})};case"not-deco-serve":return{title:t("decoServe.state.notDecoServe.title",{host:s}),body:t("decoServe.state.notDecoServe.body",{host:s})};case"not-v8":return{title:t("decoServe.state.notV8.title"),body:t("decoServe.state.notV8.body",{host:s})};case"error":return{title:t("decoServe.state.error.title"),body:t("decoServe.state.error.body",{detail:e.detail??""})}}}function re(){const t=S.c(11),e=j();let s;t[0]!==e?(s=e("decoServe.lna.deniedTitle"),t[0]=e,t[1]=s):s=t[1];let n;t[2]!==s?(n=i.jsx(N,{className:"line-clamp-none",children:s}),t[2]=s,t[3]=n):n=t[3];let r;t[4]!==e?(r=e("decoServe.lna.deniedBody"),t[4]=e,t[5]=r):r=t[5];let o;t[6]!==r?(o=i.jsx(L,{children:r}),t[6]=r,t[7]=o):o=t[7];let a;return t[8]!==n||t[9]!==o?(a=i.jsx(k,{variant:"destructive",children:i.jsxs("div",{className:"flex min-w-0 flex-col gap-1",children:[n,o]})}),t[8]=n,t[9]=o,t[10]=a):a=t[10],a}const ne={claiming:{long:"Reserving sandbox",short:"Reserving sandbox"},"waiting-for-capacity":{long:"Waiting for cluster capacity",short:"Waiting for capacity"},"pulling-image":{long:"Downloading sandbox image",short:"Downloading image"},"starting-container":{long:"Starting your sandbox",short:"Starting container"},"warming-daemon":{long:"Connecting to your sandbox",short:"Connecting to sandbox"}};function _(t){return t.includes("/sections/")||t.includes("multivariate/section")||t===B}function z(t){if(t.anyOfRefs?.length)return t.anyOfRefs.some(s=>_(s.resolveType));const e=t.properties?.__resolveType;return e?.type==="block-ref"&&e.anyOfRefs?.length?e.anyOfRefs.some(s=>_(s.resolveType)):!1}function oe(t){return t.type!=="block-ref"||!t.anyOfRefs?.length?!1:t.anyOfRefs.some(e=>_(e.resolveType))}function ie(t,e){if(e==="global"||e==="sections"||$(t))return!0;const s=t.type==="array"?t.items:void 0;return s?z(s):!1}const ae="secret",M=[256,384,512],U=12,V=16,q=/^v1\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+$/;function K(t){let e="";for(const s of t)e+=String.fromCharCode(s);return btoa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function b(t){if(!/^[A-Za-z0-9_-]*$/.test(t)||t.length%4===1)return null;const e=t.replace(/-/g,"+").replace(/_/g,"/")+"=".repeat((4-t.length%4)%4);let s;try{s=atob(e)}catch{return null}const n=Uint8Array.from(s,r=>r.charCodeAt(0));return K(n)===t?n:null}function W(t){if(typeof t!="string"||!q.test(t))return null;const[,e="",s="",n=""]=t.split("."),r=b(e),o=b(s),a=b(n);return!r||!o||!a||!M.includes(r.byteLength)||o.byteLength!==U||a.byteLength<V?null:{wrappedKey:r,iv:o,ciphertext:a}}function ce(t){return W(t)!==null}export{ee as C,te as D,re as L,Q as R,ae as S,ne as a,D as b,oe as c,ce as d,_ as e,ie as i,se as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as x,b as d,j as l}from"./index-BAmB740B.js";import{s as j}from"./User01-B5NngWXw.js";import{t as E}from"./Users01-BuIADxiS.js";const b=/^[A-Za-z0-9_.-]+$/;function h(u){const e=x.c(15),{field:p,secretById:t}=u,s=d(),n=p.value||"";if(!n)return null;let a;e[0]!==n||e[1]!==t?(a=t.get(n),e[0]=n,e[1]=t,e[2]=a):a=e[2];const c=a;if(!c){let i;e[3]!==n||e[4]!==s?(i=s("sandbox.envVarsField.missingSecret",{id:n}),e[3]=n,e[4]=s,e[5]=i):i=e[5];let f;return e[6]!==i?(f=l.jsx("span",{className:"text-destructive",children:i}),e[6]=i,e[7]=f):f=e[7],f}let o;e[8]!==c.scope?(o=l.jsx(N,{scope:c.scope}),e[8]=c.scope,e[9]=o):o=e[9];let r;e[10]!==c.name?(r=l.jsx("span",{className:"truncate font-mono",children:c.name}),e[10]=c.name,e[11]=r):r=e[11];let m;return e[12]!==o||e[13]!==r?(m=l.jsxs("span",{className:"inline-flex items-center gap-1.5 truncate",children:[o,r]}),e[12]=o,e[13]=r,e[14]=m):m=e[14],m}function N(u){const e=x.c(2),{scope:p}=u,t=p==="user"?j:E;let s;return e[0]!==t?(s=l.jsx(t,{className:"size-3 text-muted-foreground"}),e[0]=t,e[1]=s):s=e[1],s}export{h as S,b as a,N as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as j,b as N,j as s,n as C,fM as F,H as k,r as y,b2 as L,B as D,ad as T,D as O,q as B,s as A,v as R,aN as q,I as _,w as I,t as z,ex as H}from"./index-BAmB740B.js";import{i as V}from"./AlertCircle-BoecRmSu.js";import{s as M}from"./Plus-BjxA_ka5.js";import{s as G}from"./User01-B5NngWXw.js";import{t as J}from"./Users01-BuIADxiS.js";import{E as K}from"./empty-state-BzCZ0bf5.js";import{L as w}from"./label-C6V9azY9.js";import{S as Q,b as U,a as W,d as X,c as P}from"./select-BvUL0HyR.js";import{T as Y}from"./textarea-BS7I3MZL.js";import{u as Z,a as ee}from"./use-secrets-Dti2Zjt-.js";import{R as te}from"./require-capability-Bij86NMO.js";import"./index-BdQq_4o_.js";import"./index-BauMDA_C.js";import"./ChevronUp-D732cexR.js";import"./access-gate-CXvtA9IQ.js";import"./capability-load-error-DZqK06os.js";function se(t){const e=j.c(6),{error:r}=t,i=N();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(V,{size:16}),e[0]=c):c=e[0];let n;e[1]!==r.message||e[2]!==i?(n=i("settings.secrets.failedToLoadError",{error:r.message}),e[1]=r.message,e[2]=i,e[3]=n):n=e[3];let l;return e[4]!==n?(l=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[c,s.jsx("span",{className:"text-sm font-medium",children:n})]}),e[4]=n,e[5]=l):l=e[5],l}function re(t){const e=j.c(8),{scope:r}=t,i=N(),c=r==="user"?G:J;let n;e[0]!==r||e[1]!==i?(n=i(r==="user"?"settings.secrets.scopePrivate":"settings.secrets.scopeOrganization"),e[0]=r,e[1]=i,e[2]=n):n=e[2];const l=n;let a;e[3]!==c?(a=s.jsx(c,{size:12}),e[3]=c,e[4]=a):a=e[4];let m;return e[5]!==l||e[6]!==a?(m=s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-md bg-muted text-muted-foreground text-xs",children:[a,l]}),e[5]=l,e[6]=a,e[7]=m):m=e[7],m}function $(t){const e=j.c(20),{secret:r}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:s.jsx(T,{size:16,className:"text-muted-foreground"})}),e[0]=i):i=e[0];let c;e[1]!==r.name?(c=s.jsx("span",{className:"font-medium text-sm truncate",children:r.name}),e[1]=r.name,e[2]=c):c=e[2];let n;e[3]!==r.scope?(n=s.jsx(re,{scope:r.scope}),e[3]=r.scope,e[4]=n):n=e[4];let l;e[5]!==c||e[6]!==n?(l=s.jsxs("div",{className:"flex items-center gap-2",children:[c,n]}),e[5]=c,e[6]=n,e[7]=l):l=e[7];let a;e[8]!==r.description?(a=r.description?s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:r.description}):null,e[8]=r.description,e[9]=a):a=e[9];let m;e[10]!==l||e[11]!==a?(m=s.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[i,s.jsxs("div",{className:"min-w-0",children:[l,a]})]}),e[10]=l,e[11]=a,e[12]=m):m=e[12];let d;e[13]!==r.createdAt?(d=new Date(r.createdAt).toLocaleDateString(),e[13]=r.createdAt,e[14]=d):d=e[14];let u;e[15]!==d?(u=s.jsx("div",{className:"text-xs text-muted-foreground shrink-0",children:d}),e[15]=d,e[16]=u):u=e[16];let x;return e[17]!==m||e[18]!==u?(x=s.jsxs("div",{className:"flex items-start justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[m,u]}),e[17]=m,e[18]=u,e[19]=x):x=e[19],x}function ne(t){const e=j.c(9),{action:r}=t,i=N();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(T,{}),e[0]=c):c=e[0];let n;e[1]!==i?(n=i("settings.secrets.emptyTitle"),e[1]=i,e[2]=n):n=e[2];let l;e[3]!==i?(l=i("settings.secrets.emptyDescription"),e[3]=i,e[4]=l):l=e[4];let a;return e[5]!==r||e[6]!==n||e[7]!==l?(a=s.jsx(H,{children:s.jsx(K,{size:"inline",icon:c,title:n,description:l,children:r})}),e[5]=r,e[6]=n,e[7]=l,e[8]=a):a=e[8],a}function E({open:t,onOpenChange:e}){const r=N(),[i,c]=y.useState("organization"),[n,l]=y.useState(""),[a,m]=y.useState(""),[d,u]=y.useState(""),x=ee();function g(){c("organization"),l(""),m(""),u("")}function p(){g(),e(!1)}async function S(o){if(o.preventDefault(),!(!n.trim()||!a))try{await x.mutateAsync({scope:i,name:n.trim(),value:a,description:d.trim()||void 0}),z.success(r("settings.secrets.secretCreated",{name:n.trim()})),p()}catch(f){z.error(f instanceof Error?f.message:r("settings.secrets.failedToCreateSecret"))}}return s.jsx(O,{open:t,onOpenChange:o=>{o?e(o):p()},children:s.jsxs(B,{className:"sm:max-w-lg",children:[s.jsxs(A,{children:[s.jsx(R,{children:r("settings.secrets.newSecretTitle")}),s.jsx(q,{children:r("settings.secrets.newSecretDescription")})]}),s.jsxs("form",{onSubmit:S,className:"space-y-4",children:[s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(w,{htmlFor:"secret-scope",children:r("settings.secrets.scopeLabel")}),s.jsxs(Q,{value:i,onValueChange:o=>c(o),children:[s.jsx(U,{id:"secret-scope",children:s.jsx(W,{})}),s.jsxs(X,{children:[s.jsx(P,{value:"organization",children:r("settings.secrets.scopeOrganizationDescription")}),s.jsx(P,{value:"user",children:r("settings.secrets.scopePrivateDescription")})]})]})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(w,{htmlFor:"secret-name",children:r("settings.secrets.nameLabel")}),s.jsx(_,{id:"secret-name",value:n,onChange:o=>l(o.target.value),placeholder:r("settings.secrets.namePlaceholder"),autoComplete:"off",required:!0}),s.jsx("p",{className:"text-xs text-muted-foreground",children:r("settings.secrets.nameHelp")})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(w,{htmlFor:"secret-value",children:r("settings.secrets.valueLabel")}),s.jsx(_,{id:"secret-value",type:"password",value:a,onChange:o=>m(o.target.value),autoComplete:"new-password",required:!0})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(w,{htmlFor:"secret-description",children:r("settings.secrets.descriptionLabel")}),s.jsx(Y,{id:"secret-description",value:d,onChange:o=>u(o.target.value),rows:2,placeholder:r("settings.secrets.descriptionPlaceholder")})]}),s.jsxs(I,{children:[s.jsx(D,{type:"button",variant:"outline",onClick:p,disabled:x.isPending,children:r("settings.secrets.cancelButton")}),s.jsx(D,{type:"submit",disabled:x.isPending||!n.trim()||!a,children:x.isPending?r("settings.secrets.creatingButton"):r("settings.secrets.createButton")})]})]})]})})}function ie(){const t=j.c(34),e=N(),r=Z(),[i,c]=y.useState(!1);let n,l;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=()=>c(!0),l=s.jsx(M,{size:14}),t[0]=n,t[1]=l):(n=t[0],l=t[1]);let a;t[2]!==e?(a=e("settings.secrets.newSecret"),t[2]=e,t[3]=a):a=t[3];let m;t[4]!==a?(m=s.jsx(C.Actions,{children:s.jsxs(D,{size:"sm",onClick:n,children:[l,a]})}),t[4]=a,t[5]=m):m=t[5];const d=m;if(r.length===0){let o;t[6]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ne,{action:!1}),t[6]=o):o=t[6];let f;t[7]!==i?(f=s.jsx(E,{open:i,onOpenChange:c}),t[7]=i,t[8]=f):f=t[8];let h;return t[9]!==d||t[10]!==f?(h=s.jsxs(s.Fragment,{children:[d,o,f]}),t[9]=d,t[10]=f,t[11]=h):h=t[11],h}let u,x,g;if(t[12]!==d||t[13]!==r||t[14]!==e){const o=r.filter(oe),f=r.filter(ae),h=r.length===1?"settings.secrets.secretsCountSingular":"settings.secrets.secretsCountPlural";let b;t[18]!==r.length||t[19]!==e||t[20]!==h?(b=e(h,{count:r.length}),t[18]=r.length,t[19]=e,t[20]=h,t[21]=b):b=t[21];let v;t[22]!==b?(v=s.jsx("p",{className:"text-sm text-muted-foreground",children:b}),t[22]=b,t[23]=v):v=t[23],t[24]!==d||t[25]!==v?(u=s.jsxs("div",{className:"flex items-center justify-between",children:[v,d]}),t[24]=d,t[25]=v,t[26]=u):u=t[26],x=o.length>0?s.jsxs("section",{className:"surface p-5",children:[s.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:e("settings.secrets.sectionOrganization")}),s.jsx("div",{children:o.map(le)})]}):null,g=f.length>0?s.jsxs("section",{className:"surface p-5",children:[s.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:e("settings.secrets.sectionPrivate")}),s.jsx("div",{children:f.map(ce)})]}):null,t[12]=d,t[13]=r,t[14]=e,t[15]=u,t[16]=x,t[17]=g}else u=t[15],x=t[16],g=t[17];let p;t[27]!==i?(p=s.jsx(E,{open:i,onOpenChange:c}),t[27]=i,t[28]=p):p=t[28];let S;return t[29]!==u||t[30]!==x||t[31]!==g||t[32]!==p?(S=s.jsxs(s.Fragment,{children:[u,x,g,p]}),t[29]=u,t[30]=x,t[31]=g,t[32]=p,t[33]=S):S=t[33],S}function ce(t){return s.jsx($,{secret:t},t.id)}function le(t){return s.jsx($,{secret:t},t.id)}function ae(t){return t.scope==="user"}function oe(t){return t.scope==="organization"}function me(){const t=j.c(7),e=N();let r;t[0]!==e?(r=e("settings.nav.secrets"),t[0]=e,t[1]=r):r=t[1];let i;t[2]!==r?(i=s.jsx(C.Title,{children:r}),t[2]=r,t[3]=i):i=t[3];let c;t[4]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(k,{fallback:de,children:s.jsx(y.Suspense,{fallback:s.jsx(L,{className:"h-32 w-full"}),children:s.jsx(ie,{})})}),t[4]=c):c=t[4];let n;return t[5]!==i?(n=s.jsx(C,{children:s.jsx(C.Content,{children:s.jsx(C.Container,{children:s.jsxs(F,{children:[i,c]})})})}),t[5]=i,t[6]=n):n=t[6],n}function de(t){const{error:e}=t;return s.jsx(se,{error:e??new Error("Failed to load secrets")})}function ze(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(te,{capability:"secrets:manage",area:"secrets",children:s.jsx(me,{})}),t[0]=e):e=t[0],e}export{ze as default};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{c as ct,b as Lt,r as R,l as me,j as o,b3 as li,B as Et,U as ln,ag as ci,X as ui,V as di,a as Ko,F as fi,K as Io,m as mi,o as pi,h as hi,t as ae}from"./index-BAmB740B.js";import{u as gi}from"./chat-context-CEf_lJrx.js";import{$ as vi,H as Zn,a0 as yi,a1 as xi,a2 as bi,a3 as Si,a4 as _i,a5 as wi,a6 as Xr,a7 as ji,a8 as ki,y as kt,a9 as Le,aa as Ei,z as Gn,w as Un,d as Ri,u as Ai,ab as Zr,i as Ci,ac as Ni,k as Ti,h as Vi,ad as Fo,ae as Pi,af as Mi,t as eo,ag as Di,ah as Ki,ai as Wn,aj as to,ak as no,al as so,am as vs,an as Ii,C as Fi,ao as Bi,x as Oi,ap as ro,aq as Li,ar as oo,as as ao,at as io,M as $i,au as lo,a as zi,av as cn,aw as Hi,ax as Wi,ay as jn,az as ys}from"./runnable-block-editor-dRq9eTzq.js";import{c as qi}from"./repository-binding-BgJ8uAoU.js";import{n as Gi,t as Ui}from"./ChevronUp-D732cexR.js";import{aa as Bo,b as Qn,ap as Yi,H as Ji,a4 as co,a0 as uo}from"./agent-icon-D9qv9iJQ.js";import{S as un}from"./scroll-area-BHIKiLUM.js";import{c as At,T as Ct,a as Nt}from"./tooltip-CmTwSHYA.js";import{an as Qi,a3 as fo,l as Xi,u as Zi,m as el,D as tl,R as nl,B as sl,a1 as It,a2 as Ft,as as mo,K as rl,au as ol}from"./site-editor-toast-CGZS9BwD.js";import{f as al,u as il,G as ll,t as xs,H as po,s as cl,m as ul,I as dl}from"./blocks-tab-states-_rQb-3nf.js";import{m as fl,u as ml,P as pl}from"./mustache-D4PpoYZo.js";import{b0 as hl,b as Ks,b2 as Oo,G as gl,b3 as ot,b4 as Es,b5 as Lo,al as Qt,a7 as Rs,b6 as As,am as Ot,a8 as dn,e as vl,j as yl,A as xl,q as qn,p as En,ax as bl,aj as Jt,aa as bs,ai as St,ah as kn,b7 as Sl,H as _l,an as ho,ao as go,ak as wl,b8 as jl,b9 as Bt,ba as kl,bb as El,bc as Rl,ag as vo,bd as Ss,be as Al,bf as Cl,bg as Nl,ae as Tl,aN as Vl,aP as Pl,aI as Ml,bh as Dl,bi as Kl,bj as Il,a9 as yo,bk as Fl,ad as Bl,bl as Ol}from"./parse-sections-C7SJnlZ7.js";import{a as Ll}from"./Copy01-BNgQXLom.js";import{a as Cs,e as $o}from"./UserSquare-DvQcif2z.js";import{i as xo}from"./Tool01-CcNuzAHc.js";import{s as bo}from"./Image01-3jSbcDWw.js";import{s as $l}from"./Plus-BjxA_ka5.js";import{s as zl}from"./Trash01-B_y6cnc0.js";import{i as Ns}from"./ZoomOut-BBaDHidP.js";import{u as Hl,a as So,K as Wl,P as ql,b as Gl,C as Ul,D as Yl,c as Jl}from"./core.esm-BtSOaBaE.js";import{u as Ql,s as Xl,a as Yn,S as Zl,v as ec}from"./sortable.esm-CpdZxqSN.js";import{s as tc,g as nc,u as sc,A as rc}from"./use-section-preview-base-CFzMfuNP.js";import{i as oc}from"./thread-intent-C0R8BtBw.js";import{A as _s}from"./avatar-DsyxJdd5.js";import{e as ac,d as _o,b as ic,A as lc,a as cc,f as uc}from"./alert-dialog-BBFgXAmX.js";import{b as dc}from"./format-time-Cq80KKvY.js";import{e as fc}from"./shell-layout-B5jnML3d.js";import{u as mc}from"./use-members-CTltnPbx.js";import{a as pc,P as wo,w as hc,b as gc}from"./page-seo-form-UBTBjVc2.js";import{u as vc}from"./use-apply-named-rule-pRgVjxXf.js";import{b as jo,a as yc}from"./variant-matcher-override-CgViiiNQ.js";import{c as ko,d as xc,e as bc}from"./variant-draft-pointer-BeAKcq_c.js";import"./use-panel-navigate-DcAwEhOb.js";import"./thread-route-yHr3Xqpq.js";import"./use-project-scope-COq2XQVT.js";import"./autosend-Rn3iicpQ.js";import"./use-mcp-client-CqNgp7C3.js";import"./auth-D_mwvS_K.js";import"./use-decopilot-events-DH9vtuqj.js";import"./watch-sse-pool-HmUSWdEg.js";import"./task-board-Ds21WWvc.js";import"./schema-DNweLWtn.js";import"./backoff-CrEUbyZT.js";import"./use-ai-providers-BdMI1dJ8.js";import"./location-V0VwTJTt.js";import"./use-organization-settings-R35CeX0x.js";import"./utils-JJWwAhjH.js";import"./Play-C58uA1z7.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-71Dh0mlf.js";import"./LinkBroken01-gZ_Womsg.js";import"./collapsible-D5FtbLtM.js";import"./use-copy-ByMN8ZBl.js";import"./usage-stats-DTNxQXdY.js";import"./tool-namespace-B1sVq59x.js";import"./form-DWfSZ-uy.js";import"./label-C6V9azY9.js";import"./utils-CVEq3hMx.js";import"./markdown-DVKH1IaR.js";import"./use-mobile-DpTfSAm7.js";import"./use-clock-tick-Cqy994m5.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DXX6eros.js";import"./types-05YrcBTZ.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./AlertCircle-BoecRmSu.js";import"./XClose-CE-051ne.js";import"./ShoppingBag01-D6PcFAZ3.js";import"./SearchMd-BYu5iUPZ.js";import"./sheet-D1CAQsjr.js";import"./integration-icon-oEHZLv8F.js";import"./use-connection-DQSt0eTw.js";import"./use-navigate-to-agent-CblBUgFe.js";import"./Link01-CwY3-TdS.js";import"./use-mcp-prompts-_OL9f0kB.js";import"./Monitor01-DfNea12c.js";import"./use-thread-outputs-DkwE9vVN.js";import"./file-type-icon-CnMrgPAl.js";import"./secret-ciphertext-BoA15qGd.js";import"./alert-CXq7wXAP.js";import"./switch-BudKCJf7.js";import"./textarea-BS7I3MZL.js";import"./ChevronSelectorVertical-C8DO4Eax.js";import"./command-CMb7suOV.js";import"./index-CzAA1Ftq.js";import"./popover-DClINcvR.js";import"./monaco-editor-LiopisRR.js";import"./editor-CxPe-Q-E.js";import"./delay-CnY5UFtP.js";import"./calendar-DlQTMw7m.js";import"./SwitchHorizontal01-OacdCVpa.js";import"./Minus-Cg_Z4UVA.js";import"./select-BvUL0HyR.js";import"./index-BdQq_4o_.js";import"./index-BauMDA_C.js";import"./editor-classes-BSm-iwgQ.js";import"./toggle-group-BcfSAKQP.js";import"./active-indicator-CCMhAsc_.js";import"./combobox-C3ljSkZg.js";import"./Upload01-C8k7ObxF.js";import"./DotsVertical-B4rKTO-K.js";import"./search-input-BAISJ9LS.js";import"./tabs-BTB5YGW1.js";import"./use-debounced-value-3kPVK8wc.js";import"./use-file-configs-BJwH2-6c.js";import"./asset-utils-CkfOjXdG.js";import"./useInfiniteQuery-D-VWsr8W.js";import"./infiniteQueryObserver-BxY60Pl8.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-session-runtime-Ba_EwQTc.js";import"./sandbox-git-api-CH_-QFpD.js";import"./sandbox-url-D3mC8qhT.js";import"./ArrowUp-YHdDe54G.js";import"./ArrowLeft-CqjWe78l.js";import"./Building02-jY0EsZ3c.js";import"./CheckCircle-Bjd4331B.js";import"./CreditCard01-BI7UbDnJ.js";import"./Globe04-BZtelxuk.js";import"./Key01-bgf7_Io3.js";import"./Sun-ryrPGG0o.js";import"./User01-B5NngWXw.js";import"./Users01-BuIADxiS.js";import"./experiments-tab-choice-CI25uYfH.js";import"./use-sandbox-events-wT6wBZge.js";import"./slider-EpxmA7ZL.js";import"./index-x6QXFiYo.js";import"./tooltipContext-C41VBtBA.js";import"./CategoricalChart-DSicPUkM.js";import"./index-C6RphnDz.js";import"./ActiveShapeUtils-3iGXaBcM.js";import"./Sector-B82IN8wU.js";import"./symbol-CYQiJJdu.js";import"./empty-state-BUdzXSg1.js";import"./section-preview-url-7zfngvgW.js";import"./slugify-CEUa2lfQ.js";import"./differenceInSeconds-C3x8sHUj.js";import"./project-icon-DuRHj8pv.js";import"./new-project-dialog-DmsgoraK.js";import"./repository-import-picker-DmCy1J1K.js";import"./repository-picker-BvSncDst.js";import"./collection-search-RQehoVFG.js";import"./required-auth-layout-FVugTURm.js";import"./use-org-sso-CXvlVlUi.js";import"./use-org-auth-client-Bi3e38-G.js";import"./use-move-blocks-YDfVWv8x.js";const Sc={escape:vi};function _c(n,e){for(const r of tc(n,e)){const a=typeof r.title=="string"?r.title:void 0;if(a?.includes("{{"))return a}}function wc(n,e){if(!e)return;const r=hl(n,oc(e));if(r)try{const a=_c(r.resolveType,e);return a&&fl.render(a,r.data,{},Sc).trim()||void 0}catch{return}}function jc(n){const e=ct.c(13),{icon:r,label:a,className:l}=n;let u;e[0]!==l?(u=me("size-3.5",l),e[0]=l,e[1]=u):u=e[1];let y;e[2]!==r||e[3]!==u?(y=o.jsx(r,{className:u}),e[2]=r,e[3]=u,e[4]=y):y=e[4];let m;e[5]!==a||e[6]!==y?(m=o.jsx(Ct,{asChild:!0,children:o.jsx("span",{role:"img","aria-label":a,className:"shrink-0 cursor-help",children:y})}),e[5]=a,e[6]=y,e[7]=m):m=e[7];let b;e[8]!==a?(b=o.jsx(Nt,{className:"max-w-56",children:a}),e[8]=a,e[9]=b):b=e[9];let h;return e[10]!==m||e[11]!==b?(h=o.jsxs(At,{children:[m,b]}),e[10]=m,e[11]=b,e[12]=h):h=e[12],h}const kc="text-global-section-fg focus:bg-global-section/12 focus:text-global-section-fg dark:text-global-section-fg-dark dark:focus:bg-global-section/15 dark:focus:text-global-section-fg-dark [&_svg]:!text-global-section";function Eo(n){return Array.from({length:n},(e,r)=>({id:crypto.randomUUID(),index:r}))}function zo(n){return n.map((e,r)=>({...e,index:r}))}function Ec(n,e){if(e===n.length)return n;if(e<n.length)return zo(n.slice(0,e));const r=Array.from({length:e-n.length},(a,l)=>({id:crypto.randomUUID(),index:n.length+l}));return[...n,...r]}function Ho(n){const e=ct.c(44),{section:r,raw:a,meta:l,decofile:u}=n,y=Lt(),m=Zn(),b=r.isSavedBlock===!0,h=r.isMultivariate===!0;let k;e[0]!==l||e[1]!==a?(k=a&&l?nc(a,l):void 0,e[0]=l,e[1]=a,e[2]=k):k=e[2];const N=k;let L;e[3]!==l||e[4]!==h||e[5]!==a||e[6]!==b?(L=a&&l&&!b&&!h?wc(a,l):void 0,e[3]=l,e[4]=h,e[5]=a,e[6]=b,e[7]=L):L=e[7];const z=L;let H;e[8]!==u||e[9]!==l||e[10]!==a||e[11]!==r?(H=wi(a,r,u,l),e[8]=u,e[9]=l,e[10]=a,e[11]=r,e[12]=H):H=e[12];const B=H;let w;e[13]!==h||e[14]!==a?.__resolveType?(w=!h&&Ks(a?.__resolveType??""),e[13]=h,e[14]=a?.__resolveType,e[15]=w):w=e[15];const p=w,te=b?Qn:h?Bo:$o;let E;e[16]!==h||e[17]!==b?(E=b?{color:gl}:h?{color:"oklch(0.65 0.15 160)"}:void 0,e[16]=h,e[17]=b,e[18]=E):E=e[18];const W=E;let V;e[19]!==te||e[20]!==m?(V=m?o.jsxs("span",{className:"relative size-4 shrink-0",children:[o.jsx(te,{className:"absolute inset-0 size-4 text-muted-foreground transition-opacity group-hover:opacity-0 group-has-[:focus-visible]:opacity-0"}),o.jsx(ki,{"aria-hidden":!0,className:"absolute inset-0 size-4 opacity-0 transition-opacity group-hover:opacity-100 group-has-[:focus-visible]:opacity-100"})]}):o.jsx(Yi,{className:"h-4 w-4 shrink-0 text-muted-foreground/40"}),e[19]=te,e[20]=m,e[21]=V):V=e[21];let J;e[22]!==N?(J=N&&o.jsx("img",{src:N,alt:"",referrerPolicy:"no-referrer",className:"h-12 max-w-[100px] shrink-0 rounded-[var(--studio-control-radius,var(--radius))] object-cover"}),e[22]=N,e[23]=J):J=e[23];let g;e[24]!==m||e[25]!==W?(g=!m&&o.jsx(Cs,{className:"h-4 w-4 shrink-0",style:W}),e[24]=m,e[25]=W,e[26]=g):g=e[26];const Q=m?"shrink":"flex-1",x=r.isHidden&&"line-through opacity-50";let Z;e[27]!==x||e[28]!==Q?(Z=me("min-w-0 truncate text-sm font-medium",Q,x),e[27]=x,e[28]=Q,e[29]=Z):Z=e[29];const q=z??r.label;let pe;e[30]!==Z||e[31]!==q?(pe=o.jsx("span",{className:Z,children:q}),e[30]=Z,e[31]=q,e[32]=pe):pe=e[32];let ye;e[33]!==p||e[34]!==m||e[35]!==B||e[36]!==y?(ye=m?o.jsxs(o.Fragment,{children:[p&&o.jsx(jc,{icon:Ns,label:y("sectionsEditor.sectionList.asyncBadge"),className:"text-muted-foreground"}),B&&o.jsx(Xr,{}),o.jsx("span",{className:"min-w-0 flex-1"})]}):B&&o.jsx(Xr,{className:"absolute -right-0.5 -top-0.5"}),e[33]=p,e[34]=m,e[35]=B,e[36]=y,e[37]=ye):ye=e[37];let ue;return e[38]!==pe||e[39]!==ye||e[40]!==V||e[41]!==J||e[42]!==g?(ue=o.jsxs(o.Fragment,{children:[V,J,g,pe,ye]}),e[38]=pe,e[39]=ye,e[40]=V,e[41]=J,e[42]=g,e[43]=ue):ue=e[43],ue}const Rc="text-global-section-fg hover:bg-global-section/12 dark:text-global-section-fg-dark dark:hover:bg-global-section/15",Ac="text-[oklch(0.45_0.15_160)] hover:bg-[oklch(0.65_0.15_160/0.12)] dark:text-[oklch(0.78_0.15_160)] dark:hover:bg-[oklch(0.65_0.15_160/0.15)]";function Wo(n,e,r){if(r)return ji({selected:e});const a=n.isSavedBlock===!0,l=n.isMultivariate===!0;return me("group relative flex select-none items-center gap-2 rounded-[var(--studio-control-radius,var(--radius-md))] px-2 py-2.5",e?"bg-accent text-accent-foreground":a?Rc:l?Ac:"text-foreground/80 hover:bg-accent hover:text-accent-foreground")}function ws(n,e){return me("h-7 shrink-0 overflow-hidden",e?"w-7 ml-0 opacity-100 [transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]":n?"w-7 ml-0 opacity-0 [transition:opacity_150ms_ease-out,width_0ms_150ms,margin-left_0ms_150ms] group-hover:opacity-100 group-has-[:focus-visible]:opacity-100":"w-0 -ml-2 opacity-0 [transition:opacity_150ms_ease-out,width_0ms_150ms,margin-left_0ms_150ms] group-hover:ml-0 group-hover:w-7 group-hover:opacity-100 group-hover:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms] group-has-[:focus-visible]:ml-0 group-has-[:focus-visible]:w-7 group-has-[:focus-visible]:opacity-100 group-has-[:focus-visible]:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]")}function Cc(n){const e=ct.c(90),{section:r,raw:a,meta:l,decofile:u,sortableId:y,selected:m,onSelect:b,onDelete:h,onDuplicate:k,onMakeReusable:N,onToggleHidden:L,onToggleLazy:z,onAddVariant:H,onDetach:B}=n,w=Lt(),p=Zn(),te=a?Ks(a.__resolveType??""):!1,E=r.isHidden===!0,W=te||E;let V;e[0]!==r?(V=Oo(r),e[0]=r,e[1]=V):V=e[1];const J=V,g=!!z&&!r.isMultivariate;let Q;e[2]!==y?(Q={id:y,animateLayoutChanges:Vc},e[2]=y,e[3]=Q):Q=e[3];const{attributes:x,listeners:Z,setNodeRef:q,transform:pe,isDragging:ye}=Ql(Q);let ue;e[4]!==pe?(ue=Ul.Transform.toString(pe?{...pe,x:0}:null),e[4]=pe,e[5]=ue):ue=e[5];const fe=ye?0:void 0;let Re;e[6]!==ue||e[7]!==fe?(Re={transform:ue,opacity:fe},e[6]=ue,e[7]=fe,e[8]=Re):Re=e[8];const j=Re;let re;e[9]!==r?(re=xi(r),e[9]=r,e[10]=re):re=e[10];const Ae=re,Ce="button",S=0;let K;e[11]!==b?(K=I=>{(I.key==="Enter"||I.key===" ")&&(I.preventDefault(),b())},e[11]=b,e[12]=K):K=e[12];const he=ye?"cursor-grabbing":"cursor-pointer";let M;e[13]!==p||e[14]!==r||e[15]!==m||e[16]!==he?(M=me("touch-none transition-colors",he,Wo(r,m,p)),e[13]=p,e[14]=r,e[15]=m,e[16]=he,e[17]=M):M=e[17];let xe;e[18]!==u||e[19]!==l||e[20]!==a||e[21]!==r?(xe=o.jsx(Ho,{section:r,raw:a,meta:l,decofile:u}),e[18]=u,e[19]=l,e[20]=a,e[21]=r,e[22]=xe):xe=e[22];const O=!p&&g&&o.jsxs(At,{children:[o.jsx(Ct,{asChild:!0,children:o.jsx(Et,{type:"button",variant:"ghost",size:"icon","aria-label":w(te?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender"),className:me(ws(W,te)),onClick:I=>{I.stopPropagation(),z?.()},onPointerDown:Tc,children:o.jsx(Ns,{className:me("h-3.5 w-3.5",te&&"text-warning")})})}),o.jsx(Nt,{side:"bottom",children:w(te?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")})]}),oe=p?o.jsx(bi,{label:w(E?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),active:E,onToggle:L,children:E?o.jsx(xo,{className:"h-3.5 w-3.5"}):o.jsx(bo,{className:"h-3.5 w-3.5"})}):o.jsxs(At,{children:[o.jsx(Ct,{asChild:!0,children:o.jsx(Et,{type:"button",variant:"ghost",size:"icon","aria-label":w(E?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),className:me(ws(W,E)),onClick:I=>{I.stopPropagation(),L()},onPointerDown:Nc,children:E?o.jsx(xo,{className:"h-3.5 w-3.5"}):o.jsx(bo,{className:"h-3.5 w-3.5"})})}),o.jsx(Nt,{side:"bottom",children:w(E?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection")})]}),G=ui,Ke=Si;let ke;e[23]!==w?(ke=w("sectionsEditor.sectionList.sectionActionsMenu"),e[23]=w,e[24]=ke):ke=e[24];const ut=me(ws(W,!1),"data-[state=open]:ml-0 data-[state=open]:w-7 data-[state=open]:opacity-100 data-[state=open]:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]");let Ze;e[25]!==Ke||e[26]!==ke||e[27]!==ut?(Ze=o.jsx(Ke,{label:ke,classicClassName:ut}),e[25]=Ke,e[26]=ke,e[27]=ut,e[28]=Ze):Ze=e[28];let $e;e[29]!==p||e[30]!==g||e[31]!==te||e[32]!==z||e[33]!==w?($e=p&&g&&o.jsxs(o.Fragment,{children:[o.jsxs(ln,{onClick:I=>{I.stopPropagation(),z?.()},children:[o.jsx(Ns,{className:"h-4 w-4"}),w(te?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")]}),o.jsx(ci,{})]}),e[29]=p,e[30]=g,e[31]=te,e[32]=z,e[33]=w,e[34]=$e):$e=e[34];let qe;e[35]!==k?(qe=I=>{I.stopPropagation(),k()},e[35]=k,e[36]=qe):qe=e[36];let at;e[37]===Symbol.for("react.memo_cache_sentinel")?(at=o.jsx(Ll,{className:"h-4 w-4"}),e[37]=at):at=e[37];let Ge;e[38]!==w?(Ge=w("sectionsEditor.sectionList.duplicateMenuItem"),e[38]=w,e[39]=Ge):Ge=e[39];let Ue;e[40]!==qe||e[41]!==Ge?(Ue=o.jsxs(ln,{onClick:qe,children:[at,Ge]}),e[40]=qe,e[41]=Ge,e[42]=Ue):Ue=e[42];let Ye;e[43]!==p||e[44]!==J||e[45]!==H||e[46]!==w?(Ye=J&&o.jsxs(ln,{className:me(!p&&_i),onClick:I=>{I.stopPropagation(),H()},children:[o.jsx(Bo,{className:"h-4 w-4"}),w("sectionsEditor.sectionList.addVariantMenuItem")]}),e[43]=p,e[44]=J,e[45]=H,e[46]=w,e[47]=Ye):Ye=e[47];let de;e[48]!==p||e[49]!==Ae||e[50]!==N||e[51]!==w?(de=Ae&&o.jsxs(ln,{className:me(!p&&kc),onClick:I=>{I.stopPropagation(),N()},children:[p?o.jsx(Qn,{className:"h-4 w-4"}):o.jsx(Cs,{className:"h-4 w-4"}),w("sectionsEditor.sectionList.makeReusableMenuItem")]}),e[48]=p,e[49]=Ae,e[50]=N,e[51]=w,e[52]=de):de=e[52];let ge;e[53]!==p||e[54]!==B||e[55]!==r.isMultivariate||e[56]!==r.isSavedBlock||e[57]!==w?(ge=r.isSavedBlock===!0&&!r.isMultivariate&&o.jsxs(ln,{onClick:I=>{I.stopPropagation(),B()},children:[p?o.jsx($o,{className:"h-4 w-4"}):o.jsx(Cs,{className:"h-4 w-4"}),w("sectionsEditor.sectionList.detachMenuItem")]}),e[53]=p,e[54]=B,e[55]=r.isMultivariate,e[56]=r.isSavedBlock,e[57]=w,e[58]=ge):ge=e[58];let be;e[59]!==h?(be=I=>{I.stopPropagation(),h()},e[59]=h,e[60]=be):be=e[60];let ee;e[61]===Symbol.for("react.memo_cache_sentinel")?(ee=o.jsx(zl,{className:"h-4 w-4"}),e[61]=ee):ee=e[61];let F;e[62]!==w?(F=w("sectionsEditor.sectionList.deleteMenuItem"),e[62]=w,e[63]=F):F=e[63];let De;e[64]!==be||e[65]!==F?(De=o.jsxs(ln,{variant:"destructive",onClick:be,children:[ee,F]}),e[64]=be,e[65]=F,e[66]=De):De=e[66];let et;e[67]!==$e||e[68]!==Ue||e[69]!==Ye||e[70]!==de||e[71]!==ge||e[72]!==De?(et=o.jsxs(di,{align:"end",className:"w-44",children:[$e,Ue,Ye,de,ge,De]}),e[67]=$e,e[68]=Ue,e[69]=Ye,e[70]=de,e[71]=ge,e[72]=De,e[73]=et):et=e[73];let tt;e[74]!==G||e[75]!==Ze||e[76]!==et?(tt=o.jsxs(G,{children:[Ze,et]}),e[74]=G,e[75]=Ze,e[76]=et,e[77]=tt):tt=e[77];let st;return e[78]!==x||e[79]!==Z||e[80]!==b||e[81]!==q||e[82]!==j||e[83]!==M||e[84]!==xe||e[85]!==O||e[86]!==oe||e[87]!==tt||e[88]!==K?(st=o.jsxs("div",{ref:q,style:j,...x,...Z,role:Ce,tabIndex:S,onClick:b,onKeyDown:K,className:M,children:[xe,O,oe,tt]}),e[78]=x,e[79]=Z,e[80]=b,e[81]=q,e[82]=j,e[83]=M,e[84]=xe,e[85]=O,e[86]=oe,e[87]=tt,e[88]=K,e[89]=st):st=e[89],st}function Nc(n){return n.stopPropagation()}function Tc(n){return n.stopPropagation()}function Vc(){return!1}function Ts(n){const e=ct.c(11),{canAddSection:r,onAddSection:a,className:l,size:u}=n,y=Lt();let m;e[0]!==l?(m=me("w-full",l),e[0]=l,e[1]=m):m=e[1];const b=!r;let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsx($l,{size:14}),e[2]=h):h=e[2];let k;e[3]!==y?(k=y("sectionsEditor.sectionList.addSectionButton"),e[3]=y,e[4]=k):k=e[4];let N;return e[5]!==a||e[6]!==u||e[7]!==m||e[8]!==b||e[9]!==k?(N=o.jsxs(Et,{type:"button",variant:"outline",size:u,className:m,disabled:b,onClick:a,children:[h,k]}),e[5]=a,e[6]=u,e[7]=m,e[8]=b,e[9]=k,e[10]=N):N=e[10],N}function Pc(n){const e=ct.c(101),{listKey:r,rawSections:a,sections:l,meta:u,decofile:y,selectedIndex:m,onSelect:b,onReorder:h,onDelete:k,onDuplicate:N,onMakeReusable:L,onToggleHidden:z,onToggleLazy:H,onAddVariant:B,onDetach:w,onAddSection:p,canAddSection:te}=n,E=te===void 0?!0:te,W=Lt(),V=Zn();let J;e[0]!==l.length?(J=()=>Eo(l.length),e[0]=l.length,e[1]=J):J=e[1];const[g,Q]=R.useState(J),[x,Z]=R.useState(null),[q,pe]=R.useState(r),[ye,ue]=R.useState(l.length),fe=R.useRef(!1);q!==r?(pe(r),ue(l.length),Q(Eo(l.length))):ye!==l.length&&(ue(l.length),Q(Je=>Ec(Je,l.length)));let Re;e[2]===Symbol.for("react.memo_cache_sentinel")?(Re={activationConstraint:{distance:8}},e[2]=Re):Re=e[2];let j;e[3]===Symbol.for("react.memo_cache_sentinel")?(j={coordinateGetter:Xl},e[3]=j):j=e[3];const re=Hl(So(ql,Re),So(Wl,j));let Ae;e[4]!==g?(Ae=g.map(Mc),e[4]=g,e[5]=Ae):Ae=e[5];const Ce=Ae;let S;e[6]===Symbol.for("react.memo_cache_sentinel")?(S=Je=>{Z(String(Je.active.id))},e[6]=S):S=e[6];const K=S;let he;e[7]!==Ce||e[8]!==h?(he=Je=>{Z(null);const{active:ie,over:Ne}=Je;if(!Ne||ie.id===Ne.id)return;const ze=Ce.indexOf(String(ie.id)),rt=Ce.indexOf(String(Ne.id));ze===-1||rt===-1||(Q(it=>zo(Yn([...it],ze,rt))),fe.current=!0,requestAnimationFrame(()=>{fe.current=!1}),h?.(ze,rt))},e[7]=Ce,e[8]=h,e[9]=he):he=e[9];const M=he;let xe;e[10]===Symbol.for("react.memo_cache_sentinel")?(xe=()=>{Z(null)},e[10]=xe):xe=e[10];const O=xe;let oe,G,Ke,ke,ut,Ze,$e,qe,at,Ge,Ue,Ye,de,ge,be;if(e[11]!==x||e[12]!==E||e[13]!==V||e[14]!==y||e[15]!==g||e[16]!==Ce||e[17]!==M||e[18]!==u||e[19]!==p||e[20]!==B||e[21]!==k||e[22]!==w||e[23]!==N||e[24]!==L||e[25]!==b||e[26]!==z||e[27]!==H||e[28]!==a||e[29]!==l||e[30]!==m||e[31]!==re||e[32]!==W){ge=Symbol.for("react.early_return_sentinel");e:{const Je=ie=>{fe.current||b(ie)};if(e[48]!==x||e[49]!==E||e[50]!==V||e[51]!==g||e[52]!==p||e[53]!==a||e[54]!==l||e[55]!==W){const ie=x?g.find(Ne=>Ne.id===x):null;if(ke=ie!=null?l[ie.index]:null,Ke=ie!=null?a[ie.index]:void 0,g.length===0){let Ne;e[59]!==W?(Ne=W("sectionsEditor.sectionList.noSections"),e[59]=W,e[60]=Ne):Ne=e[60];let ze;e[61]!==Ne?(ze=o.jsx("p",{className:"px-2 py-3 text-xs text-muted-foreground",children:Ne}),e[61]=Ne,e[62]=ze):ze=e[62];const rt=ze;let it;e[63]!==E||e[64]!==V||e[65]!==rt||e[66]!==p?(it=V?rt:o.jsxs("div",{className:"space-y-2",children:[rt,o.jsx(Ts,{canAddSection:E,onAddSection:p,size:"sm"})]}),e[63]=E,e[64]=V,e[65]=rt,e[66]=p,e[67]=it):it=e[67],ge=it;break e}de=me(ie&&"cursor-grabbing"),e[48]=x,e[49]=E,e[50]=V,e[51]=g,e[52]=p,e[53]=a,e[54]=l,e[55]=W,e[56]=Ke,e[57]=ke,e[58]=de}else Ke=e[56],ke=e[57],de=e[58];G=Yl,qe=re,at=Jl,Ge=K,Ue=M,Ye=O,oe=Zl,Ze=Ce,$e=ec,be="space-y-1",ut=g.map(ie=>{const Ne=l[ie.index];return Ne?o.jsx(Cc,{sortableId:ie.id,section:Ne,raw:a[ie.index],meta:u,decofile:y,selected:m===ie.index,onSelect:()=>Je(ie.index),onDelete:()=>k(ie.index),onDuplicate:()=>N(ie.index),onMakeReusable:()=>L(ie.index),onToggleHidden:()=>z(ie.index),onToggleLazy:H?()=>H(ie.index):void 0,onAddVariant:()=>B(ie.index),onDetach:()=>w(ie.index)},ie.id):null})}e[11]=x,e[12]=E,e[13]=V,e[14]=y,e[15]=g,e[16]=Ce,e[17]=M,e[18]=u,e[19]=p,e[20]=B,e[21]=k,e[22]=w,e[23]=N,e[24]=L,e[25]=b,e[26]=z,e[27]=H,e[28]=a,e[29]=l,e[30]=m,e[31]=re,e[32]=W,e[33]=oe,e[34]=G,e[35]=Ke,e[36]=ke,e[37]=ut,e[38]=Ze,e[39]=$e,e[40]=qe,e[41]=at,e[42]=Ge,e[43]=Ue,e[44]=Ye,e[45]=de,e[46]=ge,e[47]=be}else oe=e[33],G=e[34],Ke=e[35],ke=e[36],ut=e[37],Ze=e[38],$e=e[39],qe=e[40],at=e[41],Ge=e[42],Ue=e[43],Ye=e[44],de=e[45],ge=e[46],be=e[47];if(ge!==Symbol.for("react.early_return_sentinel"))return ge;let ee;e[68]!==ut||e[69]!==be?(ee=o.jsx("div",{className:be,children:ut}),e[68]=ut,e[69]=be,e[70]=ee):ee=e[70];let F;e[71]!==oe||e[72]!==Ze||e[73]!==$e||e[74]!==ee?(F=o.jsx(oe,{items:Ze,strategy:$e,children:ee}),e[71]=oe,e[72]=Ze,e[73]=$e,e[74]=ee,e[75]=F):F=e[75];let De;e[76]!==Ke||e[77]!==ke||e[78]!==V||e[79]!==y||e[80]!==u?(De=ke?o.jsx("div",{className:me("cursor-grabbing shadow-lift",Wo(ke,!1,V)),children:o.jsx(Ho,{section:ke,raw:Ke,meta:u,decofile:y})}):null,e[76]=Ke,e[77]=ke,e[78]=V,e[79]=y,e[80]=u,e[81]=De):De=e[81];let et;e[82]!==De?(et=li.createPortal(o.jsx(Gl,{dropAnimation:yi,children:De}),document.body),e[82]=De,e[83]=et):et=e[83];let tt;e[84]!==G||e[85]!==qe||e[86]!==at||e[87]!==Ge||e[88]!==Ue||e[89]!==Ye||e[90]!==F||e[91]!==et?(tt=o.jsxs(G,{sensors:qe,collisionDetection:at,onDragStart:Ge,onDragEnd:Ue,onDragCancel:Ye,children:[F,et]}),e[84]=G,e[85]=qe,e[86]=at,e[87]=Ge,e[88]=Ue,e[89]=Ye,e[90]=F,e[91]=et,e[92]=tt):tt=e[92];let st;e[93]!==E||e[94]!==V||e[95]!==p?(st=!V&&o.jsx(Ts,{canAddSection:E,onAddSection:p,size:"sm",className:"mt-2"}),e[93]=E,e[94]=V,e[95]=p,e[96]=st):st=e[96];let I;return e[97]!==de||e[98]!==tt||e[99]!==st?(I=o.jsxs("div",{className:de,children:[tt,st]}),e[97]=de,e[98]=tt,e[99]=st,e[100]=I):I=e[100],I}function Mc(n){return n.id}function js(n,e,r,a,l){if(!n||!e)return null;if(!e.isMultivariate)return kt(n,e,a,l)?.data??null;const u=ot(n,e),y=u?Es(u,al)[r]:void 0;return y?Lo(y.value,a)?.data??null:null}const Dc=50;function Kc(n,e){n.own.push(Le(e)),n.own.length>Dc&&n.own.shift()}function Ro(n,e){return n.own.includes(Le(e))}function Ic(n,e){const{sectionIndex:r,variantIndex:a,shown:l,next:u,sectionCount:y}=e;return n&&n.sectionIndex===r&&n.variantIndex===a&&n.emitted===l?(n.emitted=u,n):l?{sectionIndex:r,variantIndex:a,base:l,emitted:u,sectionCount:y,own:[Le(l)]}:null}function qo(n,e){return e!==null&&Le(n)!==Le(e)}function Go(n,e){return n.__resolveType!==e.__resolveType}function Fc(n,e,r,a){if(e.length===a)return"here";const l=Le(n),u=e.flatMap((y,m)=>m!==r&&y!==null&&Le(y)===l?[m]:[]);return u.length===1?u[0]:"unknown"}function Ao({formBase:n,rebased:e,versionOf:r}){let a=null;return{ifMatch:l=>{a=l,n&&(n.version===void 0||e)&&(n.version=r(l));const u=n?n.version:r(l);return u===void 0?void 0:{[l]:u}},onApplied:l=>{n&&a!==null&&Object.hasOwn(l,a)&&(n.version=l[a])},reloadOnConflict:!0}}function Bc({merged:n,tracked:e,current:r,saved:a}){return!!n&&!!e&&r===e&&e.emitted===a}function Co(n,e){return!!n&&!!e&&n.contains(e)}function Vs(n){const e=[],r=Ps("",n.ancestor,n.mine,n.theirs,e);return{...n,merged:r,pointers:e}}function Ps(n,e,r,a,l){const u=(y,m)=>Le(y)===Le(m);if(u(r,a)||u(e,a))return r;if(u(e,r))return a;if(ks(r)&&ks(a)){const y=ks(e)?e:{},m={},b=[...Object.keys(r),...Object.keys(a).filter(h=>!(h in r))];for(const h of b){const k=Ps(`${n}/${h.replaceAll("~","~0").replaceAll("/","~1")}`,y[h],r[h],a[h],l);k!==void 0&&(m[h]=k)}return m}return Array.isArray(e)&&Array.isArray(r)&&Array.isArray(a)&&r.length===e.length&&a.length===e.length?e.map((y,m)=>Ps(`${n}/${m}`,y,r[m],a[m],l)):(l.push(n),a)}function ks(n){return!!n&&typeof n=="object"&&!Array.isArray(n)}function Oc(n,e){let r=n.merged;for(const a of n.pointers)e[a]==="mine"&&(r=Hc(r,a,Xt(n.mine,a)));return r}function Lc(n,e){return Object.fromEntries(n.pointers.map(r=>[r,e]))}function Uo(n){return Lc(n,"mine")}function Ms(n,e,r){const a=Uo(r);for(const l of r.pointers){const u=e[l];if(!u||!n.pointers.includes(l))continue;["mine","theirs"].every(m=>Le(Xt(n[m],l))===Le(Xt(r[m],l)))&&(a[l]=u)}return a}function Yo(n,e,r={}){const a=e.pointers.filter(l=>!n.pointers.includes(l)||Le(Xt(n.theirs,l))!==Le(Xt(e.theirs,l)));return a.length===0?r:{...r,...Object.fromEntries(a.map(l=>[l,(r[l]??0)+1]))}}function $c(n,e,r){if(!e||Go(n.plan.ancestor,e)||!qo(n.plan.theirs,e)||r(e))return null;const a=Vs({...n.plan,theirs:e});return a.pointers.length===0?null:{plan:a,choices:Ms(n.plan,n.choices,a),fresh:Yo(n.plan,a,n.fresh)}}function zc(n,e){return n.pointers.map(r=>({pointer:r,label:Ei(r,e),mine:Xt(n.mine,r),theirs:Xt(n.theirs,r),schema:Wc(e??null,r)}))}function Is(n){return n.split("/").slice(1).map(e=>e.replaceAll("~1","/").replaceAll("~0","~"))}function Xt(n,e){let r=n;for(const a of Is(e))if(Array.isArray(r))r=r[Number(a)];else if(r&&typeof r=="object")r=r[a];else return;return r}function Hc(n,e,r){const a=Is(e),l=(u,y)=>{if(y===a.length)return r;const m=a[y];if(Array.isArray(u)){const k=[...u];return k[Number(m)]=l(u[Number(m)],y+1),k}const b=u&&typeof u=="object"?{...u}:{},h=l(b[m],y+1);return h===void 0?delete b[m]:b[m]=h,b};return l(n,0)}function Wc(n,e){let r=n;for(const a of Is(e)){if(!r)return null;r=/^\d+$/.test(a)&&!r.properties?.[a]?r.items:r.properties?.[a]}return r??null}const qc=/\.(png|jpe?g|gif|webp|avif|svg)(\?.*)?$/i,No=60,Gc=3;function Jo(n,e){return e?.format==="image-uri"?!0:n.startsWith("data:image/")||/^(https?:)?\/\//.test(n)&&qc.test(n)}function Ds(n,e){if(!(e?.format==="rich-text"||e?.format==="rich-text-inline"||e?.format==="html"||/<\/?[a-z][^>]*>/i.test(n)))return n;const a=n.replace(/<br\s*\/?>/gi,`
|
|
2
|
-
`).replace(/<\/(p|div|li|h[1-6])>/gi,`
|
|
3
|
-
`);return Yc(a).replace(/\u00a0/g," ").replace(/\n{2,}/g,`
|
|
4
|
-
`).trim()}const Uc={" ":" ","&":"&","<":"<",">":">",""":'"',"'":"'"};function Yc(n){if(typeof DOMParser<"u")return new DOMParser().parseFromString(n,"text/html").body.textContent??"";let e=n;for(let r="";r!==e;)r=e,e=e.replace(/<[^<>]*>/g,"");return e.replace(/<|>/g,"").replace(/&(nbsp|amp|lt|gt|quot|#39);/g,r=>Uc[r]??r)}function Jn(n){const e=n.replace(/\s+/g," ").trim();return e.length>No?`${e.slice(0,No-1)}…`:e}function Jc(n){if(n.startsWith("data:"))return"image";const e=n.split(/[?#]/)[0]??n;return decodeURIComponent(e.split("/").pop()||n)}function Xn(n,e){if(n==null||n==="")return{kind:"empty"};if(typeof n=="string")return Jo(n,e)?{kind:"image",src:n}:{kind:"text",text:Ds(n,e)};if(typeof n=="number"||typeof n=="bigint")return{kind:"text",text:String(n)};if(typeof n=="boolean")return{kind:"yesNo",value:n};if(Array.isArray(n)){const r=e?.items??null;return{kind:"list",count:n.length,items:n.slice(0,Gc).map(a=>Qc(a,r)??"")}}if(typeof n=="object"){const r=n;if("value"in r&&Object.keys(r).length<=2)return Xn(r.value,e?.properties?.value??e);const a=Object.entries(r).filter(([l,u])=>!l.startsWith("__")&&u!==void 0).flatMap(([l,u])=>{const y=e?.properties?.[l]??null,m=Xn(u,y);if(m.kind==="empty")return[];const b=m.kind==="text"?Jn(m.text):m.kind==="image"?Jc(m.src):m.kind==="yesNo"?m.value?"✓":"✗":m.kind==="list"?`${m.count}`:"…";return[{label:y?.title?.trim()||l,text:b}]}).slice(0,4);return a.length>0?{kind:"fields",entries:a}:{kind:"empty"}}return{kind:"text",text:String(n)}}function Qc(n,e){if(typeof n=="string")return Jn(Ds(n,e));if(!n||typeof n!="object"||Array.isArray(n))return null;const r=n,a=e?.titleBy,l=a?r[a]:void 0;if(typeof l=="string"&&l.trim())return Jn(l);for(const[u,y]of Object.entries(r))if(!(u.startsWith("__")||typeof y!="string"||!y.trim())&&!Jo(y,e?.properties?.[u]??null))return Jn(Ds(y,null));return null}const To=1500;function Xc(n,e){const r=n.split(/(\s+)/).filter(k=>k!==""),a=e.split(/(\s+)/).filter(k=>k!=="");if(r.length>To||a.length>To)return{mine:[{text:n,kind:"changed"}],theirs:[{text:e,kind:"changed"}]};const l=Array.from({length:r.length+1},()=>new Array(a.length+1).fill(0));for(let k=r.length-1;k>=0;k--)for(let N=a.length-1;N>=0;N--){const L=l[k];L[N]=r[k]===a[N]?l[k+1][N+1]+1:Math.max(l[k+1][N],L[N+1])}const u=[],y=[],m=(k,N,L)=>{const z=k.at(-1);z&&(z.kind===L||L==="same"&&!N.trim())?z.text+=N:k.push({text:N,kind:L})};let b=0,h=0;for(;b<r.length&&h<a.length;)r[b]===a[h]?(m(u,r[b],"same"),m(y,a[h],"same"),b++,h++):l[b+1][h]>=l[b][h+1]?(m(u,r[b],"changed"),b++):(m(y,a[h],"changed"),h++);for(;b<r.length;b++)m(u,r[b],"changed");for(;h<a.length;h++)m(y,a[h],"changed");return{mine:u,theirs:y}}function Zc(n){const e=ct.c(10);let r,a;e[0]!==n?({open:r,...a}=n,e[0]=n,e[1]=r,e[2]=a):(r=e[1],a=e[2]);const{data:l}=Ko.useSession();let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u=me("max-h-[85vh] grid-rows-[auto_minmax(0,1fr)_auto] sm:max-w-lg"),e[3]=u):u=e[3];const y=l?.user??null;let m;e[4]!==a||e[5]!==y?(m=o.jsx(ac,{className:u,"data-testid":"form-conflict-dialog",onEscapeKeyDown:tu,children:o.jsx(iu,{...a,viewer:y,heading:eu})}),e[4]=a,e[5]=y,e[6]=m):m=e[6];let b;return e[7]!==r||e[8]!==m?(b=o.jsx(uc,{open:r,children:m}),e[7]=r,e[8]=m,e[9]=b):b=e[9],b}function eu(n,e){return o.jsxs(ic,{className:"text-left",children:[o.jsx(lc,{children:n}),o.jsx(cc,{children:e})]})}function tu(n){return n.preventDefault()}const nu={},su=(n,e)=>o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsx("h2",{className:"text-lg font-semibold",children:n}),o.jsx("p",{className:"text-sm text-muted-foreground",children:e})]});function ru(n,e,r=0,a={},l=null){const u=e[Math.min(r,e.length-1)],y=l?.you?void 0:l?.name?.split(/\s+/)[0],m={field:u?au(u.label):"",label:u?.label??"",name:y??""},b=(h,k,N)=>n(l?.you?N:y?k:h,m);return e.length<=1?{title:b("sectionsEditor.formConflict.titleOne","sectionsEditor.formConflict.titleOneNamed","sectionsEditor.formConflict.titleOneYou"),description:n("sectionsEditor.formConflict.descriptionOne")}:{title:b("sectionsEditor.formConflict.titleStep","sectionsEditor.formConflict.titleStepNamed","sectionsEditor.formConflict.titleStepYou"),description:r>=e.length-1?o.jsx(ou,{t:n,fields:e,choices:a,name:y}):n("sectionsEditor.formConflict.descriptionStep")}}function ou(n){const e=ct.c(11),{t:r,fields:a,choices:l,name:u}=n;let y;if(e[0]!==l||e[1]!==a||e[2]!==u||e[3]!==r){let b;e[5]!==l||e[6]!==u||e[7]!==r?(b=(h,k)=>o.jsxs(R.Fragment,{children:[k>0&&" · ",`${h.label}: `,o.jsx("span",{className:"font-medium text-foreground",children:r((l[h.pointer]??"mine")==="mine"?"sectionsEditor.formConflict.summaryYours":u?"sectionsEditor.formConflict.summaryTheirsNamed":"sectionsEditor.formConflict.summaryTheirs",{name:u??""})})]},h.pointer),e[5]=l,e[6]=u,e[7]=r,e[8]=b):b=e[8],y=a.map(b),e[0]=l,e[1]=a,e[2]=u,e[3]=r,e[4]=y}else y=e[4];let m;return e[9]!==y?(m=o.jsx("span",{"data-testid":"form-conflict-summary",children:y}),e[9]=y,e[10]=m):m=e[10],m}function au(n){return/^[A-Z][a-z]/.test(n)&&!n.includes("›")?n.charAt(0).toLowerCase()+n.slice(1):n}function iu(n){const e=ct.c(68),r=Lt(),{fields:a,choices:l,changedAgain:u,fresh:y,heading:m}=n,b=u===void 0?!1:u,h=y===void 0?nu:y,k=m===void 0?su:m,N=a.length>1,[L,z]=R.useState(0),[H,B]=R.useState(lu);let w;e[0]===Symbol.for("react.memo_cache_sentinel")?(w={},e[0]=w):w=e[0];const[p,te]=R.useState(w),E=Math.max(0,Math.min(L,a.length-1)),W=a[E],V=E===a.length-1;let J;e[1]!==E||e[2]!==a||e[3]!==h?(J=xe=>{const O=a[E],oe=a[xe];!O||!oe||xe===E||(B(G=>new Set(G).add(O.pointer)),te(G=>({...G,[O.pointer]:h[O.pointer]??0,[oe.pointer]:h[oe.pointer]??0})),z(xe))},e[1]=E,e[2]=a,e[3]=h,e[4]=J):J=e[4];const g=J;let Q;e[5]!==E||e[6]!==g?(Q=xe=>{if(!xe)return;const O=oe=>{const G={ArrowLeft:-1,ArrowRight:1}[oe.key];!G||oe.defaultPrevented||oe.altKey||oe.ctrlKey||oe.metaKey||oe.shiftKey||fc(oe.target)||(oe.preventDefault(),g(E+G))};return xe.ownerDocument.addEventListener("keydown",O),()=>xe.ownerDocument.removeEventListener("keydown",O)},e[5]=E,e[6]=g,e[7]=Q):Q=e[7];const x=Q;if(!W)return null;let Z,q,pe,ye,ue;if(e[8]!==H||e[9]!==E||e[10]!==l||e[11]!==a||e[12]!==h||e[13]!==g||e[14]!==k||e[15]!==x||e[16]!==N||e[17]!==n||e[18]!==p||e[19]!==r){const{title:xe,description:O}=ru(r,a,E,l,n.author??null);let oe;e[25]!==n?(oe=G=>{G.detail>1||n.onApply()},e[25]=n,e[26]=oe):oe=e[26],Z=oe,q=N?x:void 0,pe="flex min-w-0 flex-col gap-3",e[27]!==H||e[28]!==E||e[29]!==a||e[30]!==h||e[31]!==g||e[32]!==N||e[33]!==p||e[34]!==r?(ye=N&&o.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o.jsx("div",{role:"group","aria-label":r("sectionsEditor.formConflict.steps"),className:"-m-1 flex flex-wrap items-center",children:a.map((G,Ke)=>{const ke=Ke!==E&&(h[G.pointer]??0)>(p[G.pointer]??0);return o.jsx("button",{type:"button","aria-label":ke?r("sectionsEditor.formConflict.stepChangedAgain",{label:G.label}):G.label,"aria-current":Ke===E?"step":void 0,"data-answered":Ke!==E&&H.has(G.pointer)?"":void 0,"data-changed-again":ke?"":void 0,onClick:()=>g(Ke),className:"group cursor-pointer rounded-full p-1 focus-ring",children:o.jsx("span",{className:me("block h-2 w-2 rounded-full bg-border transition-[width,background-color,box-shadow] motion-reduce:transition-none","group-hover:bg-muted-foreground/60","group-data-[answered]:bg-foreground/45","group-aria-[current=step]:w-5 group-aria-[current=step]:bg-foreground","group-data-[changed-again]:ring-2 group-data-[changed-again]:ring-warning group-data-[changed-again]:ring-offset-1 group-data-[changed-again]:ring-offset-background")})},G.pointer)})}),o.jsx("span",{className:"shrink-0 text-xs tabular-nums text-muted-foreground",children:r("sectionsEditor.formConflict.stepCount",{step:String(E+1),count:String(a.length)})})]}),e[27]=H,e[28]=E,e[29]=a,e[30]=h,e[31]=g,e[32]=N,e[33]=p,e[34]=r,e[35]=ye):ye=e[35],ue=k(xe,O),e[8]=H,e[9]=E,e[10]=l,e[11]=a,e[12]=h,e[13]=g,e[14]=k,e[15]=x,e[16]=N,e[17]=n,e[18]=p,e[19]=r,e[20]=Z,e[21]=q,e[22]=pe,e[23]=ye,e[24]=ue}else Z=e[20],q=e[21],pe=e[22],ye=e[23],ue=e[24];let fe;e[36]!==q||e[37]!==pe||e[38]!==ye||e[39]!==ue?(fe=o.jsxs("div",{ref:q,className:pe,children:[ye,ue]}),e[36]=q,e[37]=pe,e[38]=ye,e[39]=ue,e[40]=fe):fe=e[40];const Re=!b&&"sr-only";let j;e[41]!==Re?(j=me("text-sm text-muted-foreground",Re),e[41]=Re,e[42]=j):j=e[42];let re;e[43]!==b||e[44]!==N||e[45]!==r?(re=b?r(N?"sectionsEditor.formConflict.changedAgainSteps":"sectionsEditor.formConflict.changedAgain"):"",e[43]=b,e[44]=N,e[45]=r,e[46]=re):re=e[46];let Ae;e[47]!==j||e[48]!==re?(Ae=o.jsx("p",{role:"status",className:j,children:re}),e[47]=j,e[48]=re,e[49]=Ae):Ae=e[49];const Ce=N?"vertical":"all";let S;e[50]!==W||e[51]!==n||e[52]!==Ce?(S=o.jsx(fu,{field:W,...n,arrows:Ce}),e[50]=W,e[51]=n,e[52]=Ce,e[53]=S):S=e[53];let K;e[54]!==Ae||e[55]!==S?(K=o.jsxs("div",{className:"-mx-2 flex min-h-0 flex-col gap-3 overflow-y-auto px-2 py-1",children:[Ae,S]}),e[54]=Ae,e[55]=S,e[56]=K):K=e[56];let he;e[57]!==Z||e[58]!==E||e[59]!==g||e[60]!==V||e[61]!==N||e[62]!==r?(he=N?o.jsxs(_o,{className:"flex-row flex-wrap items-center justify-between gap-2 sm:justify-between",children:[o.jsx(Et,{type:"button",variant:"outline","aria-disabled":E===0,onClick:()=>g(E-1),className:"aria-disabled:cursor-default aria-disabled:opacity-45",children:r("sectionsEditor.formConflict.back")}),o.jsx(Et,{type:"button","data-testid":"form-conflict-primary",onClick:V?Z:()=>g(E+1),children:r(V?"sectionsEditor.formConflict.ok":"sectionsEditor.formConflict.next")})]}):o.jsx(_o,{className:"items-center gap-2",children:o.jsx(Et,{type:"button","data-testid":"form-conflict-primary",onClick:Z,children:r("sectionsEditor.formConflict.ok")})}),e[57]=Z,e[58]=E,e[59]=g,e[60]=V,e[61]=N,e[62]=r,e[63]=he):he=e[63];let M;return e[64]!==fe||e[65]!==K||e[66]!==he?(M=o.jsxs(o.Fragment,{children:[fe,K,he]}),e[64]=fe,e[65]=K,e[66]=he,e[67]=M):M=e[67],M}function lu(){return new Set}function cu(n){const e=Xn(n.mine,n.schema),r=Xn(n.theirs,n.schema),a=e.kind==="text"&&r.kind==="text"?Xc(e.text,r.text):null;return l=>a?o.jsx(pu,{parts:a[l]}):o.jsx(gu,{preview:l==="mine"?e:r})}const uu={all:{ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1},vertical:{ArrowDown:1,ArrowUp:-1}};function du(n,e){const r=uu[e][n.key];if(!r)return;const a=[...n.currentTarget.querySelectorAll('[role="radio"]')],l=a.indexOf(document.activeElement);if(l<0)return;n.preventDefault();const u=a[(l+r+a.length)%a.length];u?.focus(),u?.click()}function fu(n){const e=ct.c(65),{field:r,choices:a,viewer:l,author:u,onChoose:y,arrows:m}=n,b=u===void 0?null:u,h=Lt(),[k]=fi(),{language:N}=k;let L,z,H,B,w,p,te,E,W,V,J,g,Q,x;if(e[0]!==m||e[1]!==b||e[2]!==a||e[3]!==r||e[4]!==N||e[5]!==y||e[6]!==h||e[7]!==l?.image||e[8]!==l?.name){const pe=cu(r),ye=a[r.pointer]??"mine",ue=l?.image??void 0;let fe;e[23]!==h||e[24]!==l?.name?(fe=l?.name?.trim()||h("sectionsEditor.formConflict.you"),e[23]=h,e[24]=l?.name,e[25]=fe):fe=e[25];let Re;e[26]!==ue||e[27]!==fe?(Re=o.jsx(_s,{url:ue,fallback:fe,shape:"circle",size:"sm",className:"text-xs"}),e[26]=ue,e[27]=fe,e[28]=Re):Re=e[28];const j=Re;let re;e[29]!==b||e[30]!==j?(re=b?.you?j:b?.name?o.jsx(_s,{url:b.avatarUrl,fallback:b.name,shape:"circle",size:"sm",className:"text-xs"}):o.jsx(_s,{url:"icon://user",fallback:"",muted:!0,shape:"circle",size:"sm"}),e[29]=b,e[30]=j,e[31]=re):re=e[31];const Ae=re,Ce=b?new Date(b.at):null;H="radiogroup",B=r.label,w="flex flex-col gap-2",e[32]!==m?(p=M=>du(M,m),e[32]=m,e[33]=p):p=e[33];let S;e[34]!==r.pointer||e[35]!==y?(S=()=>y(r.pointer,"mine"),e[34]=r.pointer,e[35]=y,e[36]=S):S=e[36];let K;e[37]!==h?(K=h("sectionsEditor.formConflict.you"),e[37]=h,e[38]=K):K=e[38];let he;e[39]!==h?(he=h("sectionsEditor.formConflict.yourVersionNotSaved"),e[39]=h,e[40]=he):he=e[40],te=o.jsx(Vo,{side:"mine",checked:ye==="mine",onChoose:S,avatar:j,who:K,meta:he,children:pe("mine")}),L=Vo,E="theirs",W=ye==="theirs",e[41]!==r.pointer||e[42]!==y?(V=()=>y(r.pointer,"theirs"),e[41]=r.pointer,e[42]=y,e[43]=V):V=e[43],J=Ae,e[44]!==b?.name||e[45]!==b?.you||e[46]!==h?(g=b?.you?h("sectionsEditor.formConflict.youElsewhere"):b?.name||h("sectionsEditor.formConflict.someoneElse"),e[44]=b?.name,e[45]=b?.you,e[46]=h,e[47]=g):g=e[47],Q=Ce?h("sectionsEditor.formConflict.savedAt",{when:dc(Ce,N)}):h("sectionsEditor.formConflict.theirVersionSaved"),x=Ce?mu(Ce,N):void 0,z=pe("theirs"),e[0]=m,e[1]=b,e[2]=a,e[3]=r,e[4]=N,e[5]=y,e[6]=h,e[7]=l?.image,e[8]=l?.name,e[9]=L,e[10]=z,e[11]=H,e[12]=B,e[13]=w,e[14]=p,e[15]=te,e[16]=E,e[17]=W,e[18]=V,e[19]=J,e[20]=g,e[21]=Q,e[22]=x}else L=e[9],z=e[10],H=e[11],B=e[12],w=e[13],p=e[14],te=e[15],E=e[16],W=e[17],V=e[18],J=e[19],g=e[20],Q=e[21],x=e[22];let Z;e[48]!==L||e[49]!==z||e[50]!==E||e[51]!==W||e[52]!==V||e[53]!==J||e[54]!==g||e[55]!==Q||e[56]!==x?(Z=o.jsx(L,{side:E,checked:W,onChoose:V,avatar:J,who:g,meta:Q,metaTitle:x,children:z}),e[48]=L,e[49]=z,e[50]=E,e[51]=W,e[52]=V,e[53]=J,e[54]=g,e[55]=Q,e[56]=x,e[57]=Z):Z=e[57];let q;return e[58]!==H||e[59]!==B||e[60]!==w||e[61]!==p||e[62]!==te||e[63]!==Z?(q=o.jsxs("div",{role:H,"aria-label":B,className:w,onKeyDown:p,children:[te,Z]}),e[58]=H,e[59]=B,e[60]=w,e[61]=p,e[62]=te,e[63]=Z,e[64]=q):q=e[64],q}const mu=(n,e)=>n.toLocaleString(e,{dateStyle:"medium",timeStyle:"short"});function Vo(n){const e=ct.c(28),{side:r,checked:a,onChoose:l,avatar:u,who:y,meta:m,metaTitle:b,children:h}=n,k=R.useId(),N=`${k}-who`,L=`${k}-meta ${k}-value`,z=a?0:-1,H=a?"border-primary bg-primary/5 ring-1 ring-primary":"hover:bg-accent";let B;e[0]!==H?(B=me("grid w-full cursor-pointer grid-cols-[auto_minmax(0,1fr)] items-start gap-3 rounded-xl border bg-background p-3 text-left transition-[border-color,box-shadow,background-color] focus-ring",H),e[0]=H,e[1]=B):B=e[1];const w=`${k}-who`;let p;e[2]!==w||e[3]!==y?(p=o.jsx("span",{id:w,className:"text-sm font-medium text-foreground",children:y}),e[2]=w,e[3]=y,e[4]=p):p=e[4];const te=`${k}-meta`;let E;e[5]!==m||e[6]!==b||e[7]!==te?(E=o.jsx("span",{id:te,title:b,children:m}),e[5]=m,e[6]=b,e[7]=te,e[8]=E):E=e[8];let W;e[9]!==p||e[10]!==E?(W=o.jsxs("span",{className:"flex flex-wrap items-baseline gap-x-1.5 text-xs text-muted-foreground",children:[p,E]}),e[9]=p,e[10]=E,e[11]=W):W=e[11];const V=`${k}-value`,J=`conflict-${r}`;let g;e[12]!==h||e[13]!==V||e[14]!==J?(g=o.jsx("span",{id:V,"data-testid":J,className:"min-w-0 text-sm",children:h}),e[12]=h,e[13]=V,e[14]=J,e[15]=g):g=e[15];let Q;e[16]!==W||e[17]!==g?(Q=o.jsxs("span",{className:"flex min-w-0 flex-col gap-1",children:[W,g]}),e[16]=W,e[17]=g,e[18]=Q):Q=e[18];let x;return e[19]!==u||e[20]!==a||e[21]!==l||e[22]!==N||e[23]!==Q||e[24]!==L||e[25]!==z||e[26]!==B?(x=o.jsxs("button",{type:"button",role:"radio","aria-checked":a,"aria-labelledby":N,"aria-describedby":L,tabIndex:z,onClick:l,className:B,children:[u,Q]}),e[19]=u,e[20]=a,e[21]=l,e[22]=N,e[23]=Q,e[24]=L,e[25]=z,e[26]=B,e[27]=x):x=e[27],x}function pu(n){const e=ct.c(4),{parts:r}=n;let a;e[0]!==r?(a=r.map(hu),e[0]=r,e[1]=a):a=e[1];let l;return e[2]!==a?(l=o.jsx("span",{className:"whitespace-pre-wrap break-words",children:a}),e[2]=a,e[3]=l):l=e[3],l}function hu(n,e){return n.kind==="changed"?o.jsx("mark",{className:"rounded-sm bg-warning/20 px-0.5 text-foreground",children:n.text},e):o.jsx("span",{children:n.text},e)}function gu(n){const e=ct.c(29),{preview:r}=n,a=Lt();switch(r.kind){case"empty":{let l;e[0]!==a?(l=a("sectionsEditor.formConflict.empty"),e[0]=a,e[1]=l):l=e[1];let u;return e[2]!==l?(u=o.jsx("span",{className:"italic text-muted-foreground",children:l}),e[2]=l,e[3]=u):u=e[3],u}case"text":{let l;return e[4]!==r.text?(l=o.jsx("span",{className:"whitespace-pre-wrap break-words",children:r.text}),e[4]=r.text,e[5]=l):l=e[5],l}case"image":{let l;return e[6]!==r.src?(l=o.jsx("img",{src:r.src,alt:"",className:"max-h-24 max-w-full rounded border object-contain"}),e[6]=r.src,e[7]=l):l=e[7],l}case"yesNo":{const l=r.value?"sectionsEditor.formConflict.yes":"sectionsEditor.formConflict.no";let u;e[8]!==a||e[9]!==l?(u=a(l),e[8]=a,e[9]=l,e[10]=u):u=e[10];let y;return e[11]!==u?(y=o.jsx("span",{children:u}),e[11]=u,e[12]=y):y=e[12],y}case"list":{const l=r.count===1?"sectionsEditor.formConflict.oneItem":"sectionsEditor.formConflict.items",u=String(r.count);let y;e[13]!==a||e[14]!==l||e[15]!==u?(y=a(l,{count:u}),e[13]=a,e[14]=l,e[15]=u,e[16]=y):y=e[16];let m;e[17]!==y?(m=o.jsx("span",{className:"text-muted-foreground",children:y}),e[17]=y,e[18]=m):m=e[18];let b;e[19]!==r.count||e[20]!==r.items?(b=r.items.some(Boolean)&&o.jsxs("span",{className:"flex flex-col",children:[r.items.map(yu),r.count>r.items.length&&o.jsx("span",{children:"…"})]}),e[19]=r.count,e[20]=r.items,e[21]=b):b=e[21];let h;return e[22]!==m||e[23]!==b?(h=o.jsxs("span",{className:"flex flex-col gap-1",children:[m,b]}),e[22]=m,e[23]=b,e[24]=h):h=e[24],h}case"fields":{let l;e[25]!==r.entries?(l=r.entries.map(vu),e[25]=r.entries,e[26]=l):l=e[26];let u;return e[27]!==l?(u=o.jsx("dl",{className:"grid grid-cols-[auto_minmax(0,1fr)] gap-x-2 gap-y-0.5",children:l}),e[27]=l,e[28]=u):u=e[28],u}}}function vu(n){return o.jsxs("div",{className:"contents",children:[o.jsx("dt",{className:"text-muted-foreground",children:n.label}),o.jsx("dd",{className:"truncate",children:n.text})]},n.label)}function yu(n,e){return o.jsx("span",{className:"truncate",children:`${e+1}. ${n||"…"}`},e)}function xu(n,e){return n.kind==="protocol"&&n.source==="github"?e:null}function bu(n,e){if(Object.hasOwn(n,e))return n[e]??null;const r=fo(e),a=Object.keys(n).find(l=>fo(l)===r);return a===void 0?null:n[a]??null}async function Su(n,e){try{const r=await fetch(`/api/${n.orgSlug}/decofile/${encodeURIComponent(n.virtualMcpId)}/${encodeURIComponent(n.branch)}`,{cache:"no-store",headers:Qi("v8")});if(!r.ok)return null;const a=await r.json().catch(()=>({})),l=bu(a.changedBy??{},e);return l&&typeof l.userId=="string"&&Number.isFinite(Date.parse(l.at))?l:null}catch{return null}}function _u(n,e,r){const a=e.find(y=>y.userId===n.userId),l=a?.user?.name?.trim(),u=a?.user?.image??void 0;return{...l?{name:l}:{},...u?{avatarUrl:u}:{},at:n.at,you:!!r&&n.userId===r}}function wu(n){let e=2166136261,r=0;for(let a=0;a<n.length;a++){const l=n.charCodeAt(a);e=Math.imul(e^l,16777619),r=Math.imul(r,31)+l|0}return`${(e>>>0).toString(36)}${(r>>>0).toString(36)}:${n.length}`}function ju(n,e,r){const a=ct.c(19),l=!!n&&!!e&&r!==null;let u;a[0]!==e||a[1]!==n||a[2]!==r?(u=Io.conflictAuthor(n?`${n.orgSlug}/${n.virtualMcpId}/${n.branch}`:"",e??"",r??""),a[0]=e,a[1]=n,a[2]=r,a[3]=u):u=a[3];let y;a[4]!==e||a[5]!==n?(y=()=>Su(n,e),a[4]=e,a[5]=n,a[6]=y):y=a[6];let m;a[7]!==l||a[8]!==u||a[9]!==y?(m={queryKey:u,queryFn:y,enabled:l,staleTime:Number.POSITIVE_INFINITY,gcTime:6e5,retry:!1,refetchOnWindowFocus:!1},a[7]=l,a[8]=u,a[9]=y,a[10]=m):m=a[10];const{data:b}=mi(m),h=l?b??null:null,k=!!h;let N;a[11]!==k?(N={enabled:k},a[11]=k,a[12]=N):N=a[12];const{data:L}=mc(N);let z;a[13]!==L?(z=L?.data?.members??[],a[13]=L,a[14]=z):z=a[14];const H=z,{data:B}=Ko.useSession();if(!h)return null;const w=B?.user?.id??null;let p;return a[15]!==h||a[16]!==H||a[17]!==w?(p=_u(h,H,w),a[15]=h,a[16]=H,a[17]=w,a[18]=p):p=a[18],p}function ku(n,e,r,a){if(!n||typeof n!="object")return{kind:"error",reason:"no-matcher-rule"};const l=e.trim();if(!l)return Qt(n,r,a)?{kind:"inline",blockKey:n.__resolveType??"",inlinedRule:Rs(n,r,a)}:{kind:"noop"};const u=As(n,r,a);if(!u)return{kind:"error",reason:"unreadable-rule"};if(u.blockKey)return{kind:"updateBlock",blockKey:u.blockKey,blockData:Ot(u.resolveType,u.data,l)};const y=Gn(l),m=Un(y,r);return m?{kind:"error",reason:"invalid-block-id",message:m}:{kind:"createBlock",blockId:y,blockData:Ot(u.resolveType,u.data,l),reference:dn(y)}}const Po="section-form-stale-save",Eu=3,Ru=1e3;function Mo(n,e,r){const a=e.global&&e.pageKey?[{label:"Default",sections:[{__resolveType:e.pageKey}]}]:Fo(e.pageKey?n[e.pageKey]?.sections:void 0,n,r),l=Math.max(0,Math.min(e.pageVariantIndex,a.length-1)),u=a[l]?.sections??[];return{pageVariants:a,variantIndex:l,rawSections:u,parsedSections:En(u,n,r)}}const Do=new WeakMap;let Au=0;function Cu(n){let e=Do.get(n);return e===void 0&&(e=++Au,Do.set(n,e)),e}function vm({orgSlug:n,virtualMcpId:e,branch:r,previewReady:a=!0,previewUrl:l,currentPath:u,activePageBlockKey:y=null,activeGlobalBlockKey:m=null,externalSelection:b,onSaved:h,initialEditSeo:k=!1,onExitSeo:N,onSelectRoot:L,onViewJsonFile:z,onFocusedBlockChange:H,onVariantPreviewOverride:B,focusVariant:w}){const p=Lt(),te=gi(),E=te?.taskId??null,W=a?{orgSlug:n,virtualMcpId:e,branch:r,threadId:E,previewUrl:l}:null,[V,J]=R.useState([]),{data:g,isLoading:Q}=Xi(W,{pollWhile:V.length>0}),{data:x,isLoading:Z}=il(W),q=Zn(),pe=te?.virtualMcpId,ue=qi(pe===e?e:null)?.metadata?.siteSlug??null,fe=sc({virtualMcpId:e,branch:r,sandboxUrl:l}),Re=Zi(e,r),j=el(Re),re=ul(j),Ae=!j,Ce=!!fe||j,[S,K]=R.useState(null),[he,M]=R.useState(null),[xe,O]=R.useState(null),[oe,G]=R.useState(0),[Ke,ke]=R.useState(void 0),[ut,Ze]=R.useState(null),[$e,qe]=R.useState(null);w&&w.seq!==ut&&(Ze(w.seq),qe(w));const[at,Ge]=R.useState(null),Ue={index:at,remember:Ge},[Ye,de]=R.useState(null),[ge,be]=R.useState(null),[ee,F]=R.useState([]),De=R.useRef(null),[et,tt]=R.useState(ee.length);et!==ee.length&&(tt(ee.length),requestAnimationFrame(()=>{De.current&&(De.current.scrollTop=0)}));const[st,I]=R.useState(0),[Je,ie]=R.useState(null),[Ne,ze]=R.useState(null),[rt,it]=R.useState(null),[Qo,Zt]=R.useState(!1),[Fs,es]=R.useState(!1),Rn=R.useRef(null),[An,Xo]=R.useState(!0),[en,Cn]=R.useState(!1),[$t,Nn]=R.useState(!1),[He,fn]=R.useState(k),[Bs,Os]=R.useState(k);k&&!Bs&&(Os(!0),fn(!0),K(null),M(null),O(null),F([])),!k&&Bs&&Os(!1);const[Zo,mn]=R.useState(null),[Ls,Tn]=R.useState(void 0),[$s,zt]=R.useState([]),[zs,tn]=R.useState(0),[Qe,dt]=R.useState(0),[ea,Xe]=R.useState(null),[nn,nt]=R.useState(null),[Hs,Ws]=R.useState(null),qs=pi(),Gs=tl({orgSlug:n,virtualMcpId:e,branch:r},{tunnel:!1}),pn=Ri({orgSlug:n,virtualMcpId:e,branch:r}),[ta,na]=R.useState(u),[sa,ra]=R.useState(y),[oa,aa]=R.useState(m);(ta!==u||sa!==y||oa!==m)&&(queueMicrotask(()=>pn.flush()),na(u),ra(y),aa(m),K(null),M(null),O(null),G(0),de(null),be(null),dt(0),Xe(null),nt(null),F([]),I(t=>t+1),fn(!1),mn(null),Tn(void 0),zt([]),tn(t=>t+1));const X=Ai({orgSlug:n,virtualMcpId:e,branch:r}),hn=zi((t,s)=>{X.mutate({blockKey:t,data:s},{onSuccess:()=>h?.(),onError:X.reportError})}),Vn=ml({orgSlug:n,virtualMcpId:e,branch:r}),Us=vc({orgSlug:n,virtualMcpId:e,branch:r}),[sn,rn]=R.useState(!1),$=R.useRef(null),Tt=R.useRef(null),ht=R.useRef(null),gt=R.useRef(null),Pn=R.useRef({}),Ht=R.useRef(null),gn=R.useRef(!1),vn=R.useRef(!1),Ie=R.useRef(new Map),on=R.useRef(!1),_t=R.useRef([]),ts=R.useRef(new WeakSet);nl(n,e,t=>{const{activePageKey:s,rawSections:i,parsedSections:c,selectedSectionIndex:d}=Se.current,v=new Set;s&&v.add(s);for(const f of[Tt.current?.sectionIndex,d]){const _=f==null?void 0:i[f],D=f==null?void 0:c[f],A=_&&D?.isSavedBlock?ys(_,D):null;A&&v.add(A)}if([...v].some(f=>t.has(f))){for(const f of[$,ht,gt])f.current&&clearTimeout(f.current),f.current=null;Tt.current=null,Ie.current.clear(),s&&t.has(s)&&(Pn.current={})}});const Se=R.useRef({rawSections:[],parsedSections:[],decofile:{},activePageKey:null,pageVariants:[],variantIndex:0,sectionVariantIndex:0,selectedSectionIndex:null}),[Ys,Js]=R.useState(0),[ia,la]=R.useState(0),ca=ju(xu(Re,{orgSlug:n,virtualMcpId:e,branch:r}),V[0]?.blockKey??null,V[0]?wu(Le(V[0].plan.theirs)):null),[ua,da]=R.useState(null),ns=sl(n,e).epoch,[fa,ma]=R.useState(ns);if(!a||Q||Z)return o.jsx("div",{className:"h-full w-full flex items-center justify-center",children:o.jsx(hi,{className:"size-5 text-muted-foreground"})});if(!g||!x)return o.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:p("sectionsEditor.sectionsEditor.couldNotLoadSiteData")});const pa=vl(g,x),ne=!!m,_e=ne?null:yl(pa,u,y),C=ne?m:_e?.key??null,Mn=ne&&m?g[m]:void 0,Qs=ne&&m&&Mn?xl(m,Mn):ne&&m?m:"",Wt=!ne&&C&&g[C]?g[C]:null,ss=He&&g&&x&&C&&_e?Zr(g,{kind:"page",pageKey:C,pageName:String(_e.name??""),path:String(_e.path??"")},x):null,ha=He?Wt?.seo:void 0,Dn=Ls!==void 0?Ls:ha,ga=He?Ci(Dn):void 0,Xs=ss?.seoTypeOptions??[],Zs=He&&x?Ni(x):"",rs=Zo??ga??{},Kn=He&&ss?pc(rs,ss):null,er=He&&Kn&&Ti(Dn)?qn(Kn,x):null,tr=He?Vi(g,x)?.seoData:void 0,Te=ne?[{label:"Default",sections:[{__resolveType:m}]}]:Fo(Wt?.sections,g??{},j),vt=Te.length>1,ve=Math.min(oe,Te.length-1),Fe=Te[ve],U=Fe?.sections??[],Ve=En(U,g,j),In=!ne&&bl(Wt?.sections,j);if(ne&&m&&Hs!==m){Ws(m);const t=U[0],s=Ve[0];if(t&&s){K(0),dt(0),F([]);const i=kt(t,s,g,j);i&&(M(i.data),O(i.resolveType),nt(null),Xe(null))}}!ne&&Hs!==null&&Ws(null),Se.current={rawSections:U,parsedSections:Ve,decofile:g??{},activePageKey:C,pageVariants:Te,variantIndex:ve,sectionVariantIndex:Qe,selectedSectionIndex:S};const va=()=>({multivariate:In,index:ve,variants:Te.map(t=>({rule:t.rule})),lazyValues:j&&In&&Ml(Wt?.sections?.variants?.[ve]?.value)}),os=(t,s)=>{if(!B)return;if(!C||!In||t.length<=1){B(null);return}const i={multivariate:!0,index:s,variants:t},c=j?ko(C,i):jo(C,i,g,x);B(c.length>0?c:null)},as=B&&C&&In&&vt&&!Q&&!Z?C:null;if(as!==ua&&(da(as),as)){const t=Te.map(i=>({rule:i.rule})),s=ve;queueMicrotask(()=>os(t,s))}const qt=(t,s,i)=>{if(!B)return;if(!C){B(null);return}const c=va(),d=j?ko(C,c):jo(C,c,g,x);if(!t||s<0){B(d.length>0?d:null);return}const v={pageKey:C,page:c,sectionIndex:s,sectionLazy:Ve[s]?.isLazy??!1,mvObj:t,selectedVariantIndex:i},f=j?xc(v):yc({...v,decofile:g,meta:x}),_=j?bc(d,f):[...d,...f];B(_.length>0?_:null)},wt=(t,s,i,c=S??-1,d=!1)=>{const v=ot(t,s);if(!v){M(null),O(null),nt(null),Xe(null),d&&qt(null,c,i);return}const _=Es(v,re)[i];if(!_){M(null),O(null),nt(null),Xe(null),d&&qt(null,c,i);return}const D=Lo(_.value,g);M(D?.data??null),O(D?.resolveType??null);const{resolveType:A,formValue:T}=Jt(_.rule,g,x??void 0);nt(A),Xe(T),d&&qt(v,c,i)},yn=t=>{ze(null),G(t),K(null),M(null),O(null),F([]);const s=Te[t]?.rule,{resolveType:i,formValue:c}=Jt(s,g??{},x??void 0);be(i),de(c),os(Te.map(d=>({rule:d.rule})),t)},nr=(t,s)=>{const i=U[t],c=Ve[t];if(!i||!c)return!1;const d=c.isMultivariate?ot(i,c)?.variants?.length??0:0,v=s<d?s:0;if(K(t),dt(v),F([]),I(f=>f+1),c.isMultivariate)wt(i,c,v,t);else{const f=kt(i,c,g,j);f?(M(f.data),O(f.resolveType)):(M(null),O(null)),nt(null),Xe(null)}return!0},sr=b?.index;if(b!==void 0&&(b?.seq??null)!==Ke&&(ke(b?.seq??null),typeof sr=="number"&&nr(sr,0)),$e&&(ne?Mn:Wt)){const t=$e.pageVariant,s=!ne&&t!==void 0&&t<Te.length;if(s&&t!==ve)yn(t);else{qe(null);const{section:i,variant:c}=$e;if(ne)c!==void 0&&(Ge(c),F([]),I(d=>d+1));else if(i!==void 0&&nr(i,c??0)){const d=U[i],v=Ve[i],f=v.isMultivariate?ot(d,v):null;f&&c!==void 0&&queueMicrotask(()=>qt(f,i,c))}else s&&yn(t)}}if(ns!==fa){ma(ns);const t=$.current!==null||Ie.current.size>0||gt.current!==null||ht.current!==null||X.isPending||pn.isPending||V.length>0,s=S!==null&&Co(De.current,document.activeElement);if(!t&&s&&(on.current=!0),!t&&!s&&S!==null){const i=U[S],c=Ve[S];if(F([]),I(d=>d+1),!i||!c)K(null),M(null),O(null);else if(c.isMultivariate)wt(i,c,Qe,S);else{const d=kt(i,c,g,j);M(d?.data??null),O(d?.resolveType??null)}}!t&&He&&(mn(null),Tn(void 0),tn(i=>i+1))}if(Ys!==ia){la(Ys);const t=S!==null?U[S]:null,s=S!==null?Ve[S]:null;if(t&&s&&S!==null)if(F([]),I(i=>i+1),s.isMultivariate)wt(t,s,Qe,S);else{const i=kt(t,s,g,j);M(i?.data??null),O(i?.resolveType??null)}}const ft=V[0];if(ft){const{formBase:t,target:s}=ft,i=Mo(g,s,j),c=t.sectionIndex,d=i.rawSections.length===t.sectionCount?js(i.rawSections[c],i.parsedSections[c],s.sectionVariantIndex,g,j):null,v=$c(ft,d,f=>Ro(t,f));if(v){const _=[{...ft,...v,changedAgain:!0},...V.slice(1)];_t.current=_,J(_)}}const xn={orgSlug:n,virtualMcpId:e,branch:r,threadId:E,previewUrl:j?void 0:l??void 0,siteSlug:ue},Fn=xe&&x?qn(xe,x):null,mt=(t,s)=>{if(!C)return;$.current&&(clearTimeout($.current),$.current=null),Ie.current.clear(),gt.current&&(clearTimeout(gt.current),gt.current=null),ht.current&&(clearTimeout(ht.current),ht.current=null);const i=cn(g,C,t,ve,Te);X.mutate({blockKey:C,data:i},{onSuccess:()=>s?.onSuccess?.()??h?.(),onError:c=>{s?.onError?.(),X.reportError(c)}})},Gt=()=>{H?.(null),K(null),Nn(!1),M(null),O(null),dt(0),Xe(null),nt(null),F([]),I(t=>t+1)},rr=()=>Co(De.current,document.activeElement),is=(t=p("sectionsEditor.sectionsEditor.blockChangedElsewhere"))=>{if($.current&&(clearTimeout($.current),$.current=null),Ie.current.clear(),Tt.current=null,ae.error(t,{id:Po}),rr()){on.current=!0;return}Js(s=>s+1)},or=()=>{!on.current||rr()||_t.current.length>0||$.current!==null||gn.current||vn.current||Ie.current.size>0||(on.current=!1,Js(t=>t+1))},ar=()=>{on.current&&setTimeout(or,0)},ir=t=>ol(qs,Gs,t),lr=t=>{Ie.current.size!==0&&setTimeout(()=>{if(gn.current||vn.current)return;const s=[...Ie.current.values()];Ie.current.clear();for(const i of s)i()},t)},ya=t=>{const{activePageKey:s,variantIndex:i,sectionVariantIndex:c}=Se.current,d=Ht.current;return{formBase:d?.sectionIndex===t&&d.variantIndex===c?d:null,pageKey:s,global:ne,pageVariantIndex:i,sectionVariantIndex:c,schema:Fn}},bn=t=>{_t.current=t,J(t)},xa=t=>{const s=_t.current,i=s.findIndex(v=>v.formBase===t.formBase),c=i>=0?s[i]:void 0,d=c?s.with(i,{...t,choices:Ms(c.plan,c.choices,t.plan),fresh:Yo(c.plan,t.plan,c.fresh),changedAgain:c.changedAgain||Le(c.plan.theirs)!==Le(t.plan.theirs)}):[...s,{...t,changedAgain:ts.current.has(t.formBase)}];bn(d)},cr=(t,s)=>{const i=_t.current,c=i.findIndex(f=>f.formBase===t),d=i[c];if(!d)return!1;if(Le(d.plan.mine)===Le(s))return!0;const v=Vs({...d.plan,mine:s});if(v.pointers.length===0){const f=i.filter(_=>_!==d);return bn(f),!1}return bn(i.with(c,{...d,plan:v,choices:Ms(d.plan,d.choices,v)})),!0},ba=t=>{const s=Se.current;return s.selectedSectionIndex===t.formBase.sectionIndex&&s.activePageKey===t.target.pageKey&&s.variantIndex===t.target.pageVariantIndex&&s.sectionVariantIndex===t.target.sectionVariantIndex},Sa=()=>{const t=_t.current[0];if(!t)return null;const{formBase:s,target:i}=t;$.current&&Tt.current?.sectionIndex===s.sectionIndex&&Tt.current.sectionVariantIndex===i.sectionVariantIndex&&(clearTimeout($.current),$.current=null,Tt.current=null),Ie.current.delete(`${i.pageKey}:${s.sectionIndex}:${i.sectionVariantIndex}`);const c=s.emitted;return c&&typeof c=="object"&&!cr(s,c)&&Sn(c,s.sectionIndex,0,i),_t.current[0]??null},_a=()=>{const t=_t.current[0],s=Sa();if(!s||!t||s.formBase!==t.formBase||s.plan.pointers.some(v=>!t.plan.pointers.includes(v)))return;const i=Oc(s.plan,s.choices);bn(_t.current.slice(1));const{formBase:c,target:d}=s;c.base=s.plan.theirs,c.version=void 0,c.emitted=i,ts.current.add(c),(Ht.current===c||ba(s))&&(Ht.current=c,M(i),I(v=>v+1)),Sn(i,c.sectionIndex,0,d)},wa=t=>{const[s,...i]=_t.current;s&&bn([{...s,choices:t},...i])},Sn=(t,s,i=0,c)=>{const d=c??ya(s),v=d.sectionVariantIndex,f=d.formBase,_=Tt.current;$.current&&(clearTimeout($.current),$.current=null,_&&(_.sectionIndex!==s||_.sectionVariantIndex!==v)&&_.write());const D=`${d.pageKey}:${s}:${v}`,A=()=>{if(gn.current||vn.current){Ie.current.set(D,A);return}const T=typeof t=="function"?t():t;if(f&&cr(f,T))return;const P=Se.current.decofile,{rawSections:se,parsedSections:le,pageVariants:Be,variantIndex:we}=Mo(P,d,j),Pe=d.pageKey,Y=se[s];if(!Y)return;const ce=le[s];if(!ce)return;const Me=f?.base,We=js(Y,ce,v,P,j),xt=!!Me&&!!We&&qo(Me,We)&&!(f&&Ro(f,We));if(xt&&Me&&We){if(Go(Me,We)){is(p("sectionsEditor.sectionsEditor.sectionReplacedElsewhere"));return}const je=ce.isSavedBlock?"here":Fc(Me,se.map((Ee,Kt)=>js(Ee,le[Kt],v,P,j)),s,f?.sectionCount??se.length);if(je==="unknown"){is(p("sectionsEditor.sectionsEditor.sectionReplacedElsewhere"));return}if(typeof je=="number"&&f){f.sectionCount=se.length,f.sectionIndex=je,Ht.current===f&&K(je),Sn(T,je,i,d);return}}const lt=xt&&Me&&We?Vs({ancestor:Me,mine:T,theirs:We}):null;if(lt&<.pointers.length>0&&f){f.sectionCount=se.length,xa({plan:lt,formBase:f,target:d,sectionIndex:s,choices:Uo(lt),changedAgain:!1,blockKey:ce.isSavedBlock?ys(Y,ce):Pe,fresh:{}});return}const bt=lt?lt.merged:null,Dt=bt??T,Yr=Bc({merged:!!bt,tracked:f,current:Ht.current,saved:T});bt&&ae.info(p("sectionsEditor.sectionsEditor.blockMergedWithOthers"),{id:Po}),Yr&&f&&(f.emitted=bt,M(bt));const gs=Yr||!bt?Dt:T;f&&(f.base=gs,f.sectionCount=se.length,Kc(f,gs));const Jr={onSuccess:()=>{f&&ts.current.delete(f),h?.()},onError:je=>{if(f?.base===gs&&Me&&(f.base=Me),je instanceof rl){f&&(f.version=void 0),i<Eu?(Ie.current.delete(D),vn.current=!0,setTimeout(()=>{vn.current=!1,Sn(()=>{const Ee=f?.emitted;return Ee&&typeof Ee=="object"?Ee:T},s,i+1,d),Ie.current.delete(D),lr(jn)},Ru*2**i)):is();return}X.reportError(je)}},Qr=je=>{gn.current=!0;let Ee=!1;X.mutateAsync(je).then(()=>Jr.onSuccess(),Kt=>{Ee=!0,Jr.onError(Kt)}).finally(()=>{gn.current=!1,lr(Ee?jn:0),or()})};if(ce.isSavedBlock){const je=ys(Y,ce);if(!je)return;Qr({blockKey:je,data:Dt,...Me?{base:{value:bt?We:Me}}:{},rebaseOnConflict:!1,guard:Ao({formBase:f,rebased:!!bt,versionOf:ir})});return}if(!Pe)return;const Hn={...P[Pe]},Yt=[...se];if(ce.isMultivariate){const je=ot(Y,ce);if(!je||!Pe)return;const Ee=Il(je,v,Dt);Yt[s]=Bt(Y,ce,Ee)}else if(ce.isHidden){const je=Ks(Y.__resolveType),Ee=je?{...Y.section}:{...Y},Kt=Array.isArray(Ee.variants)?[...Ee.variants]:[];Kt[0]&&(Kt[0]=yo(Ee.__resolveType,Kt[0],Dt)),Ee.variants=Kt,je?Yt[s]={...Y,section:Ee}:Yt[s]=Ee}else ce.isLazy?Yt[s]={...Y,section:Dt}:Yt[s]=Dt;if(Be.length>1){const je=Hn.sections,Ee=[...je?.variants??[]];Ee[we]&&(Ee[we]=yo(je?.__resolveType,Ee[we],Yt)),Hn.sections={...je,variants:Ee}}else Hn.sections=Yt;Qr({blockKey:Pe,data:Hn,rebaseOnConflict:!1,guard:Ao({formBase:null,rebased:!1,versionOf:ir})})};Tt.current={sectionIndex:s,sectionVariantIndex:v,write:A},$.current=setTimeout(()=>{$.current=null,A()},jn)},ja=t=>{on.current=!1,K(t),dt(0),F([]),I(d=>d+1);const s=U[t],i=Ve[t];if(H?.(i?.isSavedBlock?i.resolveType??null:null),!s||!i)return;if(i.isMultivariate){wt(s,i,0,t);return}const c=kt(s,i,g,j);if(!c){M(null),O(null),nt(null),Xe(null),qt(null,t,0);return}M(c.data),O(c.resolveType),nt(null),Xe(null),qt(null,t,0)},ur=t=>{const s=t;S!==null&&(Ht.current=Ic(Ht.current,{sectionIndex:S,variantIndex:Se.current.sectionVariantIndex,shown:he,next:s,sectionCount:Se.current.rawSections.length})),M(s),S!==null&&Sn(s,S)},ls=t=>{if(!C||!g||!x||!_e)return;const s={kind:"page",pageKey:C,pageName:String(_e.name??""),path:String(_e.path??"")},i=Zr(g,s,x);i&&pn.save(C,()=>{const c=qs.getQueryData(Io.decofile(Gs))?.[C];if(!c||typeof c!="object"||c===null||Array.isArray(c))return null;const d={...c,...Pn.current};return Pn.current={},t?.raw!==void 0?hc(d,t.raw,x):t?.inner!==void 0?gc(s,i,d,t.inner):d})},dr=(t,s)=>{C&&(Pn.current[t]=s,ls())},ka=(t,s)=>{if(!C)return;const i=Yn([...U],t,s);S!==null&&(S===t?K(s):t<S&&s>=S?K(S-1):t>S&&s<=S&&K(S+1)),mt(i)},Ea=t=>{if(!C)return;const s=U.filter((i,c)=>c!==t);S===t?Gt():S!==null&&S>t&&K(S-1),mt(s)},Ra=t=>{if(!C)return;const s=U[t];if(!s)return;const i=[...U];i.splice(t+1,0,Hi(s)),S!==null&&S>t&&K(S+1),mt(i)},Aa=t=>{if(!C)return;const s=U[t],i=Ve[t];if(!s||!i)return;const c=i.isHidden?Cl(s,j):Nl(s,x);if(!c)return;const d=[...U];d[t]=c,S===t&&Gt(),mt(d)},Ca=t=>{if(!C)return;const s=U[t],i=Ve[t];if(!s||!i||i.isMultivariate)return;const c=Al(s);if(!c)return;const d=[...U];d[t]=c,S===t&&Gt(),mt(d)},Na=t=>{if(!C)return;const s=U[t],i=Ve[t];if(!s||!i?.isSavedBlock)return;const c=kt(s,i,g,j);if(!c?.data)return;const{name:d,...v}=c.data,f=[...U];i.isLazy?f[t]={...s,section:v}:f[t]=v,S===t&&Gt(),mt(f)},Ta=t=>{if(!C)return;const s=[...U,{__resolveType:t.resolveType}],i=s.length-1;mt(s,{onError:()=>{Se.current.selectedSectionIndex===i&&Gt()}}),Zt(!1),K(i),dt(0),F([]),I(f=>f+1);const c=s[i],d=En(s,g,j)[i];if(!c||!d)return;if(d.isMultivariate){wt(c,d,0);return}const v=kt(c,d,g,j);if(!v){M(null),O(null),nt(null),Xe(null);return}M(v.data),O(v.resolveType),nt(null),Xe(null)},fr=t=>{Rn.current=t.append,Zt(!0)},Va=t=>{const s=Rn.current;if(!s){Ta(t);return}s({__resolveType:t.resolveType}),Zt(!1),Rn.current=null},mr=t=>{if(S===null)return;const s=U[S],i=Ve[S];!s||!i?.isMultivariate||(dt(t),F([]),I(c=>c+1),wt(s,i,t,S,!0))},Pa=t=>{if(S===null||!C)return;const s=U[S],i=Ve[S];if(!s||!i?.isMultivariate)return;const c=ot(s,i);if(!c)return;const d=El(c,t);if(!d){ae.error(p("sectionsEditor.sectionsEditor.cannotDeleteOnlyVariant"));return}const v=[...U];v[S]=Bt(s,i,d);const f=d.variants;let _=Qe;t===Qe?_=Math.min(t,f.length-1):t<Qe&&(_=Qe-1),dt(_),F([]),I(D=>D+1),wt(v[S],i,_),mt(v)},Ma=t=>{if(S===null||!C)return;const s=U[S],i=Ve[S];if(!s||!i?.isMultivariate)return;const c=ot(s,i);if(!c)return;const d=Rl(c,t,j),v=[...U];v[S]=Bt(s,i,d);const f=vo(c.variants??[],t,j);dt(f),F([]),I(_=>_+1),wt(v[S],i,f,S,j),mt(v)},Da=(t,s)=>{if(S===null||!C||t===s)return;const i=U[S],c=Ve[S];if(!i||!c?.isMultivariate)return;const d=ot(i,c);if(!d)return;const v=jl(d,t,s),f=[...U];f[S]=Bt(i,c,v);let _=Qe;Qe===t?_=s:t<Qe&&s>=Qe?_=Qe-1:t>Qe&&s<=Qe&&(_=Qe+1),dt(_),wt(f[S],c,_,S,j),mt(f)},_n=t=>{const s=t??S;if(s===null||!C)return;const i=U[s],c=Ve[s];if(!i||!c)return;const d=Sl(i,c,void 0,x,j);if(!d){ae.error(p("sectionsEditor.sectionsEditor.sectionCannotHaveVariants"));return}const v=[...U];v[s]=d.section;const f=En(v,g,j)[s];if(!f?.isMultivariate){ae.error(p("sectionsEditor.sectionsEditor.couldNotAddVariant"));return}K(s),dt(d.newVariantIndex),F([]),I(_=>_+1),wt(d.section,f,d.newVariantIndex,s,j),mt(v)},pr=()=>{if(S===null||!C)return;const t=U[S],s=Ve[S];if(!t||!s?.isMultivariate)return;const i=ot(t,s);if(!i)return;const c=kl(t,s,i);if(!c){ae.error(p("sectionsEditor.sectionsEditor.couldNotRemoveVariants"));return}const d=[...U];d[S]=c;const v=En(d,g,j)[S];if(!v)return;dt(0),nt(null),Xe(null),F([]),I(_=>_+1);const f=kt(c,v,g,j);f?(M(f.data),O(f.resolveType)):(M(null),O(null)),qt(null,S,0),mt(d)},Ka=async t=>{if(Je===null||!C)return;const s=Un(t,g,x);if(s){ae.error(s);return}const i=U[Je],c=Ve[Je];if(!i||!c)return;const d=kt(i,c,g,j);if(!d){ae.error(p("sectionsEditor.sectionsEditor.sectionCannotBeSavedAsGlobal"));return}const v={...d.data,name:t};try{await X.mutateAsync({blockKey:t,data:v});const f=[...U];f[Je]={__resolveType:t},await X.mutateAsync({blockKey:C,data:cn(g,C,f,ve,Te)}),S===Je&&Gt(),ie(null),ae.success(p("sectionsEditor.sectionsEditor.savedGlobalBlock",{blockId:t})),h?.()}catch(f){ae.error(p("sectionsEditor.sectionsEditor.failedToSaveGlobalBlock"),{description:It(p,Ft(f))})}},hr=Fe?.rule;if(vt&&S===null&&ge===null&&hr){const{resolveType:t,formValue:s}=Jt(hr,g??{},x??void 0);be(t),de(s)}const an=x?Pi(x):[],cs=x&&g?Mi(x,g):[],Ut=j&&x&&g?ll(x,g):[],us=(t,s)=>{if(Ut.length===0)return;const i=wl(t);return{kinds:Ut,selected:i,campaignPrefill:cl(t),onPick:s}},gr=!ne&&!!(Ce&&x&&g),vr=ge&&x?qn(ge,x):null,yt=()=>{ht.current&&(clearTimeout(ht.current),ht.current=null),gt.current&&(clearTimeout(gt.current),gt.current=null)},jt=async(t,s)=>{if(!(Kl(s,t,x)>0))try{await Vn.mutateAsync({blockKey:t})}catch(i){ae.error(p("sectionsEditor.sectionsEditor.couldNotDeleteMatcherBlock"),{description:It(p,Ft(i))})}},yr=t=>{ht.current&&clearTimeout(ht.current),ht.current=setTimeout(()=>{const{activePageKey:s,decofile:i,variantIndex:c}=Se.current;if(!s)return;const d={...i[s]},v={...d.sections},f=[...v.variants??[]],_=f[c],D=_?.rule;if(Qt(D,i,x)){const A=D?.__resolveType??"",T=i[A],P=typeof T?.name=="string"?T.name:A,{__resolveType:se,...le}=t;X.mutate({blockKey:A,data:Ot(se??"",le,P)},{onSuccess:()=>h?.(),onError:X.reportError});return}_&&(f[c]={..._,rule:t}),d.sections={...v,variants:f},X.mutate({blockKey:s,data:d},{onSuccess:()=>h?.(),onError:X.reportError})},jn)},xr=t=>{be(t);const s=t?ho(t,x):{__resolveType:go(x)};de(t?s:{}),yr(s)},br=t=>{const s=t;de(s);const i=ge?{__resolveType:ge,...s}:{...s};yr(i)},Bn=async(t,s,i)=>{const c=dl(s,t);if(!c.ok)return c.reason==="conflict"&&ae.info(t.kind==="experiments"?p("sectionsEditor.namedRulePicker.conflictTests"):p("sectionsEditor.namedRulePicker.conflictCampaigns"),mo),null;const d={};if(i){const v=i(c.rule);if(!v)return null;d[v.blockKey]=v.data}return c.blockWrite&&(d[c.blockWrite.blockKey]=c.blockWrite.block),Object.keys(d).length>0&&!(await Us.apply({writes:d})).ok?null:(c.blockWrite&&ae.success(t.kind==="experiments"?p("sectionsEditor.namedRulePicker.createdTest",{name:t.name.trim()}):p("sectionsEditor.namedRulePicker.createdCampaign",{name:t.name.trim()}),{...mo,description:p("sectionsEditor.namedRulePicker.createdHint")}),{rule:c.rule,projected:{...s,...d}})},Sr=Ut.length>0?{kinds:Ut,prepare:async t=>(await Bn(t,Se.current.decofile,void 0))?.rule??null,ensureBlock:async t=>{const s=Vl(Se.current.decofile,t);return s.kind==="saved"?!0:s.kind==="conflict"?!1:(await Us.apply({writes:{[Pl(t).blockKey]:s.block}})).ok}}:null,_r=async t=>{yt();const{activePageKey:s,decofile:i,variantIndex:c}=Se.current;if(!s)return;let d=null;const v=await Bn(t,i,D=>{const A=i[s],T=A?.sections;if(!T||typeof T!="object"||Array.isArray(T))return null;const P=T;if(!Array.isArray(P.variants))return null;const se=[...P.variants],le=se[c];return le?(d=St(le.rule,i,x),se[c]={...le,rule:D},{blockKey:s,data:{...A,sections:{...P,variants:se}}}):null});if(!v)return;const{resolveType:f,formValue:_}=Jt(v.rule,v.projected,x??void 0);be(f),de(_),d&&await jt(d,v.projected),h?.()},wr=async t=>{yt();const{activePageKey:s,decofile:i,variantIndex:c}=Se.current;if(!s)return;const d=i[s],v=d?.sections;if(!v||typeof v!="object"||Array.isArray(v))return;const f=v;if(!Array.isArray(f.variants))return;const _=[...f.variants],D=_[c];if(!D)return;const A=St(D.rule,i,x),T=dn(t);_[c]={...D,rule:T};const P={...i,[s]:{...d,sections:{...f,variants:_}}},{resolveType:se,formValue:le}=Jt(T,P,x??void 0);be(se),de(le);try{await X.mutateAsync({blockKey:s,data:P[s]}),A&&A!==t&&await jt(A,P),h?.()}catch(Be){ae.error(p("sectionsEditor.sectionsEditor.couldNotApplySavedRule"),{description:It(p,Ft(Be))})}},jr=t=>{gt.current&&clearTimeout(gt.current);const{selectedSectionIndex:s,sectionVariantIndex:i}=Se.current;s!==null&&(gt.current=setTimeout(()=>{const{rawSections:c,parsedSections:d,decofile:v,activePageKey:f,pageVariants:_,variantIndex:D}=Se.current;if(!f)return;const A=c[s],T=d[s];if(!A||!T?.isMultivariate)return;const P=ot(A,T);if(!P)return;const le=(P.variants??[])[i]?.rule;if(Qt(le,v,x)){const Y=le?.__resolveType??"",ce=v[Y],Me=typeof ce?.name=="string"?ce.name:Y,{__resolveType:We,...xt}=t;X.mutate({blockKey:Y,data:Ot(We??"",xt,Me)},{onSuccess:()=>h?.(),onError:X.reportError});return}const Be=Ss(P,i,t),we=[...c];we[s]=Bt(A,T,Be);const Pe=cn(v,f,we,D,_);X.mutate({blockKey:f,data:Pe},{onSuccess:()=>h?.(),onError:X.reportError})},jn))},Ia=t=>{nt(t);const s=t?ho(t,x):{__resolveType:go(x)};Xe(t?s:{}),jr(s)},Fa=t=>{const s=t;Xe(s);const i=nn?{__resolveType:nn,...s}:{...s};jr(i)},Ba=async t=>{yt();const{selectedSectionIndex:s,sectionVariantIndex:i,rawSections:c,parsedSections:d,decofile:v,activePageKey:f,pageVariants:_,variantIndex:D}=Se.current;if(s===null||!f)return;let A=null;const T=await Bn(t,v,le=>{const Be=c[s],we=d[s];if(!Be||!we?.isMultivariate)return null;const Pe=ot(Be,we);if(!Pe)return null;const Y=Pe.variants??[];A=St(Y[i]?.rule,v,x);const ce=[...c];return ce[s]=Bt(Be,we,Ss(Pe,i,le)),{blockKey:f,data:cn(v,f,ce,D,_)}});if(!T)return;const{resolveType:P,formValue:se}=Jt(T.rule,T.projected,x??void 0);nt(P),Xe(se),A&&await jt(A,T.projected),h?.()},Oa=async t=>{yt();const{selectedSectionIndex:s,sectionVariantIndex:i,rawSections:c,parsedSections:d,decofile:v,activePageKey:f,pageVariants:_,variantIndex:D}=Se.current;if(s===null||!f)return;const A=c[s],T=d[s];if(!A||!T?.isMultivariate)return;const P=ot(A,T);if(!P)return;const se=P.variants??[],le=St(se[i]?.rule,v,x),Be=dn(t),we=Ss(P,i,Be),Pe=[...c];Pe[s]=Bt(A,T,we);const Y=cn(v,f,Pe,D,_),ce={...v,[f]:Y},{resolveType:Me,formValue:We}=Jt(Be,ce,x??void 0);nt(Me),Xe(We);try{await X.mutateAsync({blockKey:f,data:Y}),le&&le!==t&&await jt(le,ce),h?.()}catch(xt){ae.error(p("sectionsEditor.sectionsEditor.couldNotApplySavedRule"),{description:It(p,Ft(xt))})}};if(!ne&&!_e)return o.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:p("sectionsEditor.sectionsEditor.noPageFound",{currentPath:u})});if(ne&&!Mn)return o.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:p("sectionsEditor.sectionsEditor.globalBlockNotFound")});const Oe=S!==null?Ve[S]??null:null,kr=S!==null?U[S]:null,Er=kr&&Oe?.isMultivariate?ot(kr,Oe):null,Vt=Er?Es(Er,re):[],On=Math.min(Qe,Math.max(Vt.length-1,0)),Rt=Vt[On]??null,Pt=Oe?.isMultivariate===!0,ds=S!==null&&Oe!==null,Mt=ds&&(Pt||!!(Fn&&he)),La=Mt&&!ne&&Oe?.isSavedBlock===!0,pt=ne||La,Rr=ne?Qs:Oe?.label??"",$a=nn&&x?qn(nn,x):null,Ar=(t,s)=>s&&q?`${t} · ${s}`:t,Cr=Oe?Oe.variantOf??Oe.label:"",za=(()=>{const t=Pt&&Rt?Rt.label:null;return t?q?[Ar(Cr,t)]:[Oe.label,t]:[Oe?.label??""]})(),fs=Ar(_e?.name??"",vt?Fe?.label:null),Ln=Mt&&(!ne||ee.length>0)?ne?[Qs,...ee]:[fs,...za,...ee]:[],Nr=He&&_e?[_e.name,"SEO",...$s]:[],Tr=p("sectionsEditor.pageVariantTabs.variantsLabel"),Vr=en&&_e?[_e.name,Tr]:$t&&_e&&Oe?[fs,Cr,Tr]:[],$n=Vr.length>0?Vr:Nr.length>0?Nr:pt?Ln.length>0?Ln:[Rr]:Ln.length>0?Ln:[fs],Pr=ds&&!Pt&&!Oe?.isHidden&&!!C,Ha=pt||!ne&&vt&&!!Fe||Pr,Wa=ds&&!Pt&&!ne&&ee.length===0&&!!Oe&&Oo(Oe)&&!!C,qa=q&&Mt&&!$t&&Pt&&ee.length===0&&!!Rt,Mr=q&&ee.length>0?eo(ee[ee.length-1]):null,Ga=ee.length>1?eo(ee[ee.length-2]):null,Dr=pt?Rr:Mt?Oe?.label??"":_e?.name??"",Ua=en||$t?p("sectionsEditor.pageVariantTabs.variantsLabel"):He?p("sectionsEditor.panelSections.seo"):Mr??Dr,Kr=$t?Oe?.variantOf??Oe?.label??"":en||He?_e?.name??"":Mr?Ga??Dr:pt?p("sectionsEditor.sectionsEditor.globalSectionSubtitle"):Mt?_e?.name??"":_e?.path??"",ms=!en&&!$t&&!He&&!Mt&&!pt,Ya=!q&&!He&&!ne&&Pt&&ee.length===0,wn=()=>{if(!C)return;yt(),$.current&&(clearTimeout($.current),$.current=null),Ie.current.clear();const t=g[C],s=_l(t.sections,U,x,j);if(!s)return;const{sections:i,newVariantIndex:c}=s;X.mutate({blockKey:C,data:{...t,sections:i}},{onSuccess:()=>{G(c),K(null),M(null),O(null),F([]),de(null),be(null)},onError:X.reportError})},zn=(t,s,i)=>{if(!C)return;yt(),$.current&&(clearTimeout($.current),$.current=null),Ie.current.clear();const c=g[C],d=c.sections;if(!d||typeof d!="object"||Array.isArray(d))return;const v=d;if(!Array.isArray(v.variants))return;const f=t([...v.variants]);if(!f)return;const _=Dl(v,f),D={...g,[C]:{...c,sections:_}};X.mutate({blockKey:C,data:D[C]},{onSuccess:()=>{s?.();const A=typeof i=="string"?[i]:i??[];(async()=>{for(const T of A)await jt(T,D)})()},onError:X.reportError})},Ir=(t,s)=>{if(t===s)return;let i=ve;ve===t?i=s:t<ve&&s>=ve?i=ve-1:t>ve&&s<=ve&&(i=ve+1),G(i);const c=Yn(Te.map(d=>({rule:d.rule})),t,s);os(c,i),zn(d=>Yn(d,t,s))},Fr=t=>{const s=Te[t]?.rule,i=St(s,g??{},x??void 0);zn(c=>c.length<=1?null:(c.splice(t,1),c),()=>{Te.length-1===1?G(0):t<ve?G(ve-1):t===ve&&G(Math.max(0,t-1)),K(null),M(null),O(null),F([]),de(null),be(null)},i)},Ja=()=>{const t=Te.map((s,i)=>({variant:s,index:i})).filter(({variant:s})=>!Tl(s.rule)).map(({variant:s})=>St(s.rule,g??{},x??void 0)).filter(s=>!!s);zn(s=>{const i=Fl({variants:s}),c=s[i];return c?[{...c,rule:Bl(x)}]:null},()=>{G(0),K(null),M(null),O(null),F([]),de(null),be(null),Cn(!1)},t)},Br=t=>{let s=t+1;zn(i=>(s=vo(i,t,j),Ol(i,t,j)),()=>{G(s),K(null),M(null),O(null),F([]),de(null),be(null)})},Qa=async(t,s)=>{yt(),$.current&&(clearTimeout($.current),$.current=null),Ie.current.clear();const i=Se.current.activePageKey,c=Se.current.decofile;if(!i)return;const d=c[i],v=d.sections;if(!v||typeof v!="object"||Array.isArray(v))return;const f=v;if(!Array.isArray(f.variants))return;const _=[...f.variants],D=_[t];if(!D?.rule||typeof D.rule!="object"){ae.error(p("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"));return}const A=D.rule,T=s.trim();rn(!0);try{if(!T){if(!Qt(A,c,x)){ze(null);return}const Pe=A.__resolveType??"";_[t]={...D,rule:Rs(A,c,x)};const Y={...c,[i]:{...d,sections:{...f,variants:_}}};await X.mutateAsync({blockKey:i,data:Y[i]}),await jt(Pe,Y),ze(null),h?.();return}const P=As(A,c,x);if(!P){ae.error(p("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"));return}if(P.blockKey){await X.mutateAsync({blockKey:P.blockKey,data:Ot(P.resolveType,P.data,T)}),ze(null),h?.();return}const se=Gn(T),le=Un(se,c,x);if(le){ae.error(le);return}const Be=Ot(P.resolveType,P.data,T);let we=null;try{await X.mutateAsync({blockKey:se,data:Be}),we=se,_[t]={...D,rule:dn(se)},await X.mutateAsync({blockKey:i,data:{...d,sections:{...f,variants:_}}}),we=null}catch(Pe){throw we&&await Vn.mutateAsync({blockKey:we}).catch(()=>{}),Pe}ze(null),ae.success(p("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:T})),h?.()}catch(P){ae.error(p("sectionsEditor.sectionsEditor.failedToRenameVariant"),{description:It(p,Ft(P))})}finally{rn(!1)}},Xa=async(t,s)=>{yt(),$.current&&(clearTimeout($.current),$.current=null),Ie.current.clear();const{selectedSectionIndex:i,rawSections:c,parsedSections:d,decofile:v,activePageKey:f,pageVariants:_,variantIndex:D}=Se.current;if(i===null||!f)return;const A=c[i],T=d[i];if(!A||!T?.isMultivariate)return;const P=ot(A,T);if(!P)return;const se=P.variants??[],le=se[t];if(!le?.rule||typeof le.rule!="object"){ae.error(p("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"));return}const Be=le.rule,we=s.trim();rn(!0);const Pe=async Y=>{const ce={...P,variants:Y},Me=[...c];Me[i]=Bt(A,T,ce);const We=cn(v,f,Me,D,_);return await X.mutateAsync({blockKey:f,data:We}),{...v,[f]:We}};try{if(!we){if(!Qt(Be,v,x)){it(null);return}const lt=Be.__resolveType??"",bt=[...se];bt[t]={...le,rule:Rs(Be,v,x)};const Dt=await Pe(bt);await jt(lt,Dt),it(null),h?.();return}const Y=As(Be,v,x);if(!Y){ae.error(p("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"));return}if(Y.blockKey){await X.mutateAsync({blockKey:Y.blockKey,data:Ot(Y.resolveType,Y.data,we)}),it(null),h?.();return}const ce=Gn(we),Me=Un(ce,v,x);if(Me){ae.error(Me);return}const We=Ot(Y.resolveType,Y.data,we);let xt=null;try{await X.mutateAsync({blockKey:ce,data:We}),xt=ce;const lt=[...se];lt[t]={...le,rule:dn(ce)},await Pe(lt),xt=null}catch(lt){throw xt&&await Vn.mutateAsync({blockKey:xt}).catch(()=>{}),lt}it(null),ae.success(p("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:we})),h?.()}catch(Y){ae.error(p("sectionsEditor.sectionsEditor.failedToRenameVariant"),{description:It(p,Ft(Y))})}finally{rn(!1)}},Or=async(t,s,i)=>{M(i);try{await X.mutateAsync({blockKey:t,data:i})}catch(c){throw M(d=>d===i?s:d),c}},Za={rename:async(t,s,i)=>{yt(),$.current&&(clearTimeout($.current),$.current=null),Ie.current.clear();const{activePageKey:c,decofile:d}=Se.current;if(!c)return;const v=Array.isArray(t.variants)?[...t.variants]:[],f=v[s],_=f?.rule&&typeof f.rule=="object"?f.rule:void 0,D=async T=>{const P={...t,variants:T};return await Or(c,t,P),{...d,[c]:P}},A=ku(_,i,d,x);if(A.kind!=="noop"){if(A.kind==="error"){ae.error(A.reason==="no-matcher-rule"?p("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"):A.reason==="unreadable-rule"?p("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"):A.message??p("sectionsEditor.sectionsEditor.failedToRenameVariant"));return}rn(!0);try{if(A.kind==="inline"){const P=[...v];P[s]={...f,rule:A.inlinedRule};const se=await D(P);await jt(A.blockKey,se),h?.();return}if(A.kind==="updateBlock"){await X.mutateAsync({blockKey:A.blockKey,data:A.blockData}),h?.();return}let T=null;try{await X.mutateAsync({blockKey:A.blockId,data:A.blockData}),T=A.blockId;const P=[...v];P[s]={...f,rule:A.reference},await D(P),T=null}catch(P){throw T&&await Vn.mutateAsync({blockKey:T}).catch(()=>{}),P}ae.success(p("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:i.trim()})),h?.()}catch(T){ae.error(p("sectionsEditor.sectionsEditor.failedToRenameVariant"),{description:It(p,Ft(T))})}finally{rn(!1)}}},selectGlobal:async(t,s,i)=>{yt(),$.current&&(clearTimeout($.current),$.current=null),Ie.current.clear();const{activePageKey:c,decofile:d}=Se.current;if(!c)return;const v=Array.isArray(t.variants)?[...t.variants]:[],f=v[s];if(!f)return;const _=St(f.rule,d,x);v[s]={...f,rule:dn(i)};const D={...t,variants:v},A={...d,[c]:D};try{await Or(c,t,D),_&&_!==i&&await jt(_,A),h?.()}catch(T){ae.error(p("sectionsEditor.sectionsEditor.couldNotApplySavedRule"),{description:It(p,Ft(T))})}},selectNamedRule:async(t,s,i)=>{yt(),$.current&&(clearTimeout($.current),$.current=null),Ie.current.clear();const{activePageKey:c,decofile:d}=Se.current;if(!c)return;let v=null,f=null;const _=await Bn(i,d,D=>{const A=Array.isArray(t.variants)?[...t.variants]:[],T=A[s];return T?(v=St(T.rule,d,x),A[s]={...T,rule:D},f={...t,variants:A},{blockKey:c,data:f}):null});!_||!f||(M(f),v&&await jt(v,_.projected),h?.())}},Lr=()=>{Gt()},$r=t=>{mn(t),ls({inner:t})},zr=t=>{Tn(t),ls({raw:t})},Hr=()=>{mn(null),zt([])},Wr=()=>tn(t=>t+1),qr=()=>{pn.flush(),fn(!1),mn(null),Tn(void 0),zt([]),tn(t=>t+1),N?.()},ei=()=>{Cn(!1),Nn(!1),K(null),fn(!0)},ti=()=>{He&&qr(),K(null),Cn(!0)},ni=()=>Nn(!0),ps=t=>{if(en&&t===0){Cn(!1);return}if($t&&t<2){Nn(!1),t===0&&K(null);return}if(He){if(t===0){qr();return}if(t===1){zt([]),tn(i=>i+1);return}zt($s.slice(0,t-1)),tn(i=>i+1);return}if(ne){F(ee.slice(0,t)),I(i=>i+1);return}if(t===0){Lr();return}if(t===1){F([]),I(i=>i+1);return}const s=!q&&Pt&&Rt?1:0;if(s===1&&t===2){F([]),I(i=>i+1);return}F(ee.slice(0,t-1-s))},hs=$n.length>1?o.jsx("button",{type:"button",onClick:()=>ps(Wi($n.length,{isMultivariateSectionTop:Ya})),title:p("sectionsEditor.sectionsEditor.back"),"aria-label":p("sectionsEditor.sectionsEditor.back"),className:me("shrink-0 inline-flex size-6 items-center justify-center rounded-[var(--studio-control-radius,var(--radius-md))] transition-colors",pt?"text-foreground/80 hover:bg-global-section/15":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:o.jsx(Ji,{className:"size-4"})}):null,si=pt||Mt||He?Ha&&o.jsxs("div",{className:me("border-b px-3 py-2.5",pt&&"border-global-section/22 bg-global-section/12 dark:bg-global-section/16"),children:[o.jsxs("div",{className:"flex min-w-0 items-center gap-2 overflow-hidden",children:[!ne&&vt&&Fe&&o.jsxs("button",{type:"button",onClick:Lr,title:p("sectionsEditor.sectionsEditor.editingInVariant",{variant:Fe.label}),className:me("shrink-0 inline-flex items-center gap-1 rounded-lg h-6 px-1.5 text-xs font-medium cursor-pointer transition-opacity hover:opacity-80",Ki),children:[o.jsx(Di,{rule:bs(Fe.rule,g??{},x??void 0),matchers:an}),o.jsx("span",{className:"max-w-[160px] truncate",children:Fe.label})]}),o.jsx("div",{className:"flex-1"}),pt&&o.jsxs(At,{children:[o.jsx(Ct,{asChild:!0,children:o.jsx("span",{className:"shrink-0 cursor-help",children:o.jsx(Qn,{className:"size-4 text-global-section-fg dark:text-global-section-fg-dark"})})}),o.jsx(Nt,{side:"bottom",className:"max-w-[260px]",children:p("sectionsEditor.sectionsEditor.globalSectionTooltip")})]}),Pr&&o.jsx(Wn,{onClick:()=>_n()})]}),pt&&o.jsx("p",{className:"mt-1.5 py-1.5 pl-1 text-sm leading-snug text-foreground",children:p("sectionsEditor.sectionsEditor.globalSectionBanner")})]}):o.jsxs("div",{className:"flex items-center gap-2 border-b px-3 py-2.5",children:[o.jsx("div",{className:"flex-1 min-w-0",children:o.jsx(to,{pageKey:C,initialName:_e.name,initialPath:_e.path,onFieldChange:dr,variant:"header"})}),o.jsxs(At,{children:[o.jsx(Ct,{asChild:!0,children:o.jsx(Et,{type:"button",variant:"ghost",size:"icon-sm","aria-label":p("sectionsEditor.sectionsEditor.editSeo"),className:"shrink-0",onClick:()=>fn(!0),children:o.jsx(co,{size:14})})}),o.jsx(Nt,{side:"bottom",children:p("sectionsEditor.sectionsEditor.editSeo")})]}),o.jsxs(At,{children:[o.jsx(Ct,{asChild:!0,children:o.jsx(Et,{type:"button",variant:"ghost",size:"icon-sm","aria-label":p("sectionsEditor.sectionsEditor.viewJson"),className:"shrink-0",onClick:()=>z&&C?z():es(!0),children:o.jsx(uo,{size:14})})}),o.jsx(Nt,{side:"bottom",children:p("sectionsEditor.sectionsEditor.viewJson")})]}),o.jsx(Wn,{onClick:wn})]}),ri=o.jsxs(o.Fragment,{children:[vt&&C&&o.jsx(no,{listKey:C,variants:Te,activeIndex:ve,decofile:g??{},meta:x,matchers:an,onSelect:yn,onReorder:Ir,onRename:ze,onDuplicate:Br,onDelete:Fr,onAdd:wn}),vt&&ge!==null&&o.jsx(so,{className:"mt-3",children:o.jsx("div",{className:me("space-y-3",sn&&"pointer-events-none opacity-50"),children:o.jsx(vs,{currentRt:ge,currentLabel:kn(Fe?.rule,g??{},re,x??void 0),currentGlobalKey:St(Fe?.rule,g??{},x??void 0)??void 0,matchers:an,globals:cs,onSelect:xr,onSelectGlobal:wr,named:us(Fe?.rule,_r),namedRow:xs(Fe?.rule,Ut),rule:Fe?.rule,schema:vr,formValue:Ye,onChange:br,formKey:`${ve}:${ge??""}`,formWrapperClassName:"space-y-3",meta:x??void 0,decofile:g,onSaveReferencedBlock:hn,sandbox:xn})})})]}),Gr=o.jsxs(o.Fragment,{children:[o.jsx(Ii,{listKey:`${C??""}:${S??""}`,variants:Vt.map((t,s)=>({index:s,label:t.label})),selectedIndex:On,onSelect:mr,onRename:it,onDuplicate:Ma,onDelete:Pa,onRemoveAll:pr,onReorder:Da,onAdd:()=>_n()}),o.jsx(so,{children:o.jsx(vs,{currentRt:nn??"",currentLabel:kn(Rt?.rule,g??{},re,x??void 0),currentGlobalKey:St(Rt?.rule,g??{},x??void 0)??void 0,matchers:an,globals:cs,onSelect:Ia,onSelectGlobal:Oa,named:us(Rt?.rule,Ba),namedRow:xs(Rt?.rule,Ut),rule:Rt?.rule,schema:$a,formValue:ea,onChange:Fa,formKey:`${S??"none"}:${On}:${nn??""}`,formWrapperClassName:"pt-1",meta:x??void 0,decofile:g,onSaveReferencedBlock:hn,sandbox:xn})})]}),Ur=o.jsx("div",{className:me(q?"px-2":"p-2 pt-3"),children:o.jsx(Pc,{listKey:`${C??""}-${ve}`,rawSections:U,sections:Ve,meta:x,decofile:g,selectedIndex:S,onSelect:ja,onReorder:ka,onDelete:Ea,onDuplicate:Ra,onMakeReusable:ie,onToggleHidden:Aa,onToggleLazy:Ae?Ca:void 0,onAddVariant:_n,onDetach:Na,onAddSection:()=>Zt(!0),canAddSection:gr})}),oi=o.jsxs("div",{className:"min-w-0 max-w-full space-y-4 overflow-x-hidden px-3",children:[C&&_e&&o.jsx(to,{pageKey:C,initialName:_e.name,initialPath:_e.path,onFieldChange:dr}),Wt&&C?o.jsx(wo,{rawSeo:Dn,innerSeo:rs,defaultResolveType:Zs,seoTypesLoading:j&&!x,seoSchema:er,activeResolveType:Kn,seoTypeOptions:Xs,formResetKey:zs,siteDefaultSeo:tr,onBreadcrumbChange:zt,onPersistRaw:zr,onInnerChange:$r,onClearForm:Hr,onBumpFormKey:Wr,asyncRenderAvailable:Ae}):o.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:p("sectionsEditor.sectionsEditor.seoSchemaNotFound")})]}),ai=o.jsx(un,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"min-w-0 max-w-full overflow-x-hidden px-6 py-4",children:o.jsx("div",{className:"mx-auto max-w-2xl",children:Wt&&C?o.jsx(wo,{rawSeo:Dn,innerSeo:rs,defaultResolveType:Zs,seoTypesLoading:j&&!x,seoSchema:er,activeResolveType:Kn,seoTypeOptions:Xs,formResetKey:zs,siteDefaultSeo:tr,onBreadcrumbChange:zt,onPersistRaw:zr,onInnerChange:$r,onClearForm:Hr,onBumpFormKey:Wr,asyncRenderAvailable:Ae}):o.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:p("sectionsEditor.sectionsEditor.seoSchemaNotFound")})})})},"editor-seo"),ii=o.jsxs(un,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[vt&&C&&o.jsx(no,{listKey:C,variants:Te,activeIndex:ve,decofile:g??{},meta:x,matchers:an,onSelect:yn,onReorder:Ir,onRename:ze,onDuplicate:Br,onDelete:Fr,onAdd:wn}),vt&&ge!==null&&o.jsxs("div",{className:me("px-3 border-b",An?"pt-3 pb-5 space-y-3":"py-2"),children:[o.jsxs("button",{type:"button",onClick:()=>Xo(t=>!t),className:"flex w-full items-center justify-between gap-2 text-left cursor-pointer rounded-[var(--studio-control-radius,var(--radius-sm))] py-0.5 hover:bg-accent","aria-expanded":An,children:[o.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:p("sectionsEditor.sectionsEditor.variantRule")}),An?o.jsx(Gi,{className:"size-3.5 shrink-0 text-muted-foreground"}):o.jsx(Ui,{className:"size-3.5 shrink-0 text-muted-foreground"})]}),An&&o.jsx("div",{className:me("space-y-3",sn&&"pointer-events-none opacity-50"),children:o.jsx(vs,{currentRt:ge,currentLabel:kn(Fe?.rule,g??{},re,x??void 0),currentGlobalKey:St(Fe?.rule,g??{},x??void 0)??void 0,matchers:an,globals:cs,onSelect:xr,onSelectGlobal:wr,named:us(Fe?.rule,_r),namedRow:xs(Fe?.rule,Ut),rule:Fe?.rule,schema:vr,formValue:Ye,onChange:br,formKey:`${ve}:${ge??""}`,formWrapperClassName:"space-y-3",meta:x??void 0,decofile:g,onSaveReferencedBlock:hn,sandbox:xn})})]}),Ur]},"editor-section-list");return o.jsx(Fi,{value:j,children:o.jsx(Bi,{children:o.jsxs("div",{className:"flex h-full min-w-0 w-full flex-col",children:[!q&&hs&&o.jsx("div",{className:"flex min-w-0 shrink-0 items-center gap-2 px-3 py-2",children:hs}),(q||$n.length>1)&&o.jsx(Oi,{crumbs:$n,onSelect:ps,onSelectRoot:()=>{pn.flush(),L?L():ps(0)}}),o.jsx("div",{className:"shrink-0",children:q?o.jsxs("div",{className:me("flex items-center gap-2 border-b px-3 py-2.5",pt&&"border-global-section/22 bg-global-section/12 dark:bg-global-section/16"),children:[q&&hs,pt&&o.jsxs(At,{children:[o.jsx(Ct,{asChild:!0,children:o.jsx("span",{className:"shrink-0 cursor-help",children:o.jsx(Qn,{className:"size-4 text-global-section-fg dark:text-global-section-fg-dark"})})}),o.jsx(Nt,{side:"bottom",className:"max-w-[260px]",children:p("sectionsEditor.sectionsEditor.globalSectionTooltip")})]}),o.jsxs("div",{className:"flex min-w-0 flex-1 flex-col leading-tight",children:[o.jsx("span",{className:"truncate text-sm font-semibold",children:Ua}),Kr&&o.jsx("span",{className:"truncate text-xs text-muted-foreground",children:Kr})]}),ms&&vt&&Fe&&o.jsx(ro,{variants:Te,activeIndex:ve,onSelect:yn,onManage:ti,onRemoveAll:Ja}),qa&&o.jsx(ro,{variants:Vt,activeIndex:On,onSelect:mr,onManage:ni,onRemoveAll:pr}),ms&&!vt&&o.jsx(Wn,{onClick:wn}),Wa&&o.jsx(Wn,{onClick:()=>_n()}),o.jsx(Li,{}),ms&&o.jsxs(o.Fragment,{children:[o.jsxs(At,{children:[o.jsx(Ct,{asChild:!0,children:o.jsx(Et,{type:"button",variant:"outline",size:"icon-sm","aria-label":p("sectionsEditor.sectionsEditor.editSeo"),className:"shrink-0",onClick:ei,children:o.jsx(co,{size:14})})}),o.jsx(Nt,{side:"bottom",children:p("sectionsEditor.sectionsEditor.editSeo")})]}),!z&&o.jsxs(At,{children:[o.jsx(Ct,{asChild:!0,children:o.jsx(Et,{type:"button",variant:"outline",size:"icon-sm","aria-label":p("sectionsEditor.sectionsEditor.viewJson"),className:"shrink-0",onClick:()=>es(!0),children:o.jsx(uo,{size:14})})}),o.jsx(Nt,{side:"bottom",children:p("sectionsEditor.sectionsEditor.viewJson")})]})]})]}):si}),ft&&o.jsx(Zc,{open:!0,fields:zc(ft.plan,ft.target.schema),choices:ft.choices,changedAgain:ft.changedAgain,author:ca,fresh:ft.fresh,onChoose:(t,s)=>wa({...ft.choices,[t]:s}),onApply:_a},Cu(ft.formBase)),$t?o.jsx(oo,{onAdd:()=>_n(),children:Gr},"editor-section-variants"):Mt?o.jsxs(un,{viewportRef:De,onBlur:ar,className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[!q&&Pt&&Vt.length>0&&ee.length===0&&Gr,o.jsx(po,{value:Sr,children:o.jsx(ao,{value:ne&&j?Ue:null,children:o.jsx(io,{activeSchema:Fn,formValue:he,formResetKey:st,onFormChange:ur,onBreadcrumbChange:F,breadcrumbPath:ee,emptyMessage:p("sectionsEditor.sectionsEditor.noEditableFieldsForVariant"),meta:x,decofile:g,onSaveReferencedBlock:hn,sandbox:xn,previewBaseUrl:fe,onRequestAddSection:fr,onVariantMatcherOp:ne?Za:void 0})})})]},"editor-section-form"):ne?o.jsx(un,{viewportRef:De,onBlur:ar,className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx(po,{value:Sr,children:o.jsx(ao,{value:ne&&j?Ue:null,children:o.jsx(io,{activeSchema:Fn,formValue:he,formResetKey:st,onFormChange:ur,onBreadcrumbChange:F,breadcrumbPath:ee,emptyMessage:p("sectionsEditor.sectionsEditor.noEditableFieldsForGlobalBlock"),meta:x,decofile:g,onSaveReferencedBlock:hn,sandbox:xn,previewBaseUrl:fe,onRequestAddSection:fr})})})},"editor-global-block"):He?q?o.jsx(un,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"p-3",children:oi})},"editor-seo"):ai:en?o.jsx(oo,{onAdd:wn,children:ri},"editor-variants"):q?o.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[o.jsx(un,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"py-2",children:Ur})}),o.jsx("div",{className:"shrink-0 border-t p-2",children:o.jsx(Ts,{canAddSection:gr,onAddSection:()=>Zt(!0)})})]},"editor-section-list"):ii,o.jsx($i,{open:Je!==null,onOpenChange:t=>{t||ie(null)},defaultBlockId:Je!==null?Gn(Ve[Je]?.label??""):"",isPending:X.isPending,onSubmit:Ka}),Ce&&o.jsx(rc,{open:Qo,onOpenChange:t=>{Zt(t),t||(Rn.current=null)},meta:x,decofile:g,previewBaseUrl:fe,onSelect:Va}),Fs&&C&&g&&o.jsx(pl,{open:Fs,onOpenChange:es,pageKey:C,decofile:g}),Ne!==null&&o.jsx(lo,{open:!0,initialName:Qt(Te[Ne]?.rule,g??{},x??void 0)?kn(Te[Ne]?.rule,g??{},re,x??void 0):"",autoLabel:re(bs(Te[Ne]?.rule,g??{},x??void 0)),isPending:sn,onSubmit:async t=>{await Qa(Ne,t)},onOpenChange:t=>{!t&&!sn&&ze(null)}}),rt!==null&&o.jsx(lo,{open:!0,initialName:Qt(Vt[rt]?.rule,g??{},x??void 0)?kn(Vt[rt]?.rule,g??{},re,x??void 0):"",autoLabel:re(bs(Vt[rt]?.rule,g??{},x??void 0)),isPending:sn,onSubmit:async t=>{await Xa(rt,t)},onOpenChange:t=>{!t&&!sn&&it(null)}})]})})})}export{vm as SectionsEditor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as T,b as be,j as o,r as te,av as Ne,B as we,h as _e}from"./index-BAmB740B.js";import{a4 as he}from"./agent-icon-D9qv9iJQ.js";import{S as ve}from"./scroll-area-BHIKiLUM.js";import{F as ye,ab as Ee,i as Pe,k as Te,ac as Fe,h as Re,aE as Ce}from"./runnable-block-editor-dRq9eTzq.js";import{q as Ke}from"./parse-sections-C7SJnlZ7.js";import{u as ze,a as De,P as $e}from"./page-seo-form-UBTBjVc2.js";import{a as je}from"./Image01-3jSbcDWw.js";import{u as Be,m as Ie}from"./site-editor-toast-CGZS9BwD.js";import"./AlertCircle-BoecRmSu.js";import"./Tool01-CcNuzAHc.js";import"./ArrowUp-YHdDe54G.js";import"./ArrowLeft-CqjWe78l.js";import"./LinkBroken01-gZ_Womsg.js";import"./ShoppingBag01-D6PcFAZ3.js";import"./ZoomOut-BBaDHidP.js";import"./Building02-jY0EsZ3c.js";import"./CheckCircle-Bjd4331B.js";import"./ChevronUp-D732cexR.js";import"./ChevronSelectorVertical-C8DO4Eax.js";import"./UserSquare-DvQcif2z.js";import"./Copy01-BNgQXLom.js";import"./CreditCard01-BI7UbDnJ.js";import"./DotsVertical-B4rKTO-K.js";import"./Globe04-BZtelxuk.js";import"./SwitchHorizontal01-OacdCVpa.js";import"./Key01-bgf7_Io3.js";import"./Link01-CwY3-TdS.js";import"./Minus-Cg_Z4UVA.js";import"./Monitor01-DfNea12c.js";import"./Sun-ryrPGG0o.js";import"./Play-C58uA1z7.js";import"./Plus-BjxA_ka5.js";import"./SearchMd-BYu5iUPZ.js";import"./Trash01-B_y6cnc0.js";import"./Upload01-C8k7ObxF.js";import"./User01-B5NngWXw.js";import"./Users01-BuIADxiS.js";import"./XClose-CE-051ne.js";import"./index-BdQq_4o_.js";import"./utils-JJWwAhjH.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-71Dh0mlf.js";import"./format-time-Cq80KKvY.js";import"./differenceInSeconds-C3x8sHUj.js";import"./collapsible-D5FtbLtM.js";import"./use-copy-ByMN8ZBl.js";import"./usage-stats-DTNxQXdY.js";import"./tool-namespace-B1sVq59x.js";import"./form-DWfSZ-uy.js";import"./label-C6V9azY9.js";import"./utils-CVEq3hMx.js";import"./markdown-DVKH1IaR.js";import"./location-V0VwTJTt.js";import"./use-mobile-DpTfSAm7.js";import"./use-panel-navigate-DcAwEhOb.js";import"./thread-route-yHr3Xqpq.js";import"./use-project-scope-COq2XQVT.js";import"./repository-binding-BgJ8uAoU.js";import"./use-mcp-client-CqNgp7C3.js";import"./auth-D_mwvS_K.js";import"./tooltip-CmTwSHYA.js";import"./index-BauMDA_C.js";import"./use-decopilot-events-DH9vtuqj.js";import"./thread-intent-C0R8BtBw.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-HmUSWdEg.js";import"./task-board-Ds21WWvc.js";import"./schema-DNweLWtn.js";import"./slugify-CEUa2lfQ.js";import"./chat-context-CEf_lJrx.js";import"./autosend-Rn3iicpQ.js";import"./use-ai-providers-BdMI1dJ8.js";import"./use-organization-settings-R35CeX0x.js";import"./use-clock-tick-Cqy994m5.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DXX6eros.js";import"./types-05YrcBTZ.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./shell-layout-B5jnML3d.js";import"./avatar-DsyxJdd5.js";import"./command-CMb7suOV.js";import"./index-CzAA1Ftq.js";import"./integration-icon-oEHZLv8F.js";import"./project-icon-DuRHj8pv.js";import"./new-project-dialog-DmsgoraK.js";import"./repository-import-picker-DmCy1J1K.js";import"./use-navigate-to-agent-CblBUgFe.js";import"./repository-picker-BvSncDst.js";import"./useInfiniteQuery-D-VWsr8W.js";import"./infiniteQueryObserver-BxY60Pl8.js";import"./collection-search-RQehoVFG.js";import"./use-debounced-value-3kPVK8wc.js";import"./required-auth-layout-FVugTURm.js";import"./use-org-sso-CXvlVlUi.js";import"./sheet-D1CAQsjr.js";import"./use-connection-DQSt0eTw.js";import"./use-mcp-prompts-_OL9f0kB.js";import"./use-thread-outputs-DkwE9vVN.js";import"./file-type-icon-CnMrgPAl.js";import"./secret-ciphertext-BoA15qGd.js";import"./alert-CXq7wXAP.js";import"./switch-BudKCJf7.js";import"./textarea-BS7I3MZL.js";import"./popover-DClINcvR.js";import"./blocks-tab-states-_rQb-3nf.js";import"./slider-EpxmA7ZL.js";import"./index-x6QXFiYo.js";import"./tooltipContext-C41VBtBA.js";import"./CategoricalChart-DSicPUkM.js";import"./index-C6RphnDz.js";import"./ActiveShapeUtils-3iGXaBcM.js";import"./Sector-B82IN8wU.js";import"./symbol-CYQiJJdu.js";import"./use-session-runtime-Ba_EwQTc.js";import"./empty-state-BUdzXSg1.js";import"./monaco-editor-LiopisRR.js";import"./editor-CxPe-Q-E.js";import"./calendar-DlQTMw7m.js";import"./select-BvUL0HyR.js";import"./editor-classes-BSm-iwgQ.js";import"./core.esm-BtSOaBaE.js";import"./sortable.esm-CpdZxqSN.js";import"./toggle-group-BcfSAKQP.js";import"./active-indicator-CCMhAsc_.js";import"./combobox-C3ljSkZg.js";import"./alert-dialog-BBFgXAmX.js";import"./search-input-BAISJ9LS.js";import"./tabs-BTB5YGW1.js";import"./use-file-configs-BJwH2-6c.js";import"./asset-utils-CkfOjXdG.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./sandbox-git-api-CH_-QFpD.js";import"./sandbox-url-D3mC8qhT.js";import"./experiments-tab-choice-CI25uYfH.js";import"./use-sandbox-events-wT6wBZge.js";function M(d){return typeof d=="string"&&d.trim()?d:void 0}function ge(d,e){if(d){if(e)try{const t=new URL(d,e).href;return ye(t)}catch{return}return ye(d)}}function Le(d){if(!d)return{};const e=M(d.title),t=M(d.titleTemplate);return{title:e&&t?.includes("%s")?t.replace(/%s/g,e):e,description:M(d.description),image:M(d.image),favicon:M(d.favicon)}}function Oe(d){if(!d)return"example.com";try{return new URL(d).host}catch{return"example.com"}}const Ue=[{id:"google",labelKey:"sectionsEditor.seoPreview.platformGoogle",color:"#4285F4",layout:"search"},{id:"facebook",labelKey:"sectionsEditor.seoPreview.platformFacebook",color:"#1877F2",layout:"card"},{id:"twitter",labelKey:"sectionsEditor.seoPreview.platformTwitter",color:"#0f1419",layout:"card"},{id:"linkedin",labelKey:"sectionsEditor.seoPreview.platformLinkedin",color:"#0A66C2",layout:"card"},{id:"whatsapp",labelKey:"sectionsEditor.seoPreview.platformWhatsapp",color:"#25D366",layout:"chat"},{id:"telegram",labelKey:"sectionsEditor.seoPreview.platformTelegram",color:"#229ED9",layout:"chat"},{id:"slack",labelKey:"sectionsEditor.seoPreview.platformSlack",color:"#611f69",layout:"attachment"},{id:"discord",labelKey:"sectionsEditor.seoPreview.platformDiscord",color:"#5865F2",layout:"attachment"}];function ue(d){const e=T.c(10),{src:t,className:a,iconSize:y}=d,r=y===void 0?20:y;if(t){let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={objectFit:"cover"},e[0]=m):m=e[0];let p;return e[1]!==a||e[2]!==t?(p=o.jsx("img",{src:t,alt:"",referrerPolicy:"no-referrer",className:a,style:m}),e[1]=a,e[2]=t,e[3]=p):p=e[3],p}let s;e[4]===Symbol.for("react.memo_cache_sentinel")?(s={display:"flex",alignItems:"center",justifyContent:"center",background:"#e5e7eb",color:"#9ca3af"},e[4]=s):s=e[4];let i;e[5]!==r?(i=o.jsx(je,{size:r}),e[5]=r,e[6]=i):i=e[6];let n;return e[7]!==a||e[8]!==i?(n=o.jsx("div",{className:a,style:s,children:i}),e[7]=a,e[8]=i,e[9]=n):n=e[9],n}function Ae(d){const e=T.c(33),{seo:t,host:a,path:y,t:r}=d;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={background:"#fff",border:"1px solid #dadce0"},e[0]=s):s=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i={background:"#f1f3f4"},e[1]=i):i=e[1];let n;e[2]!==t.favicon?(n=o.jsx("div",{className:"flex size-6 shrink-0 items-center justify-center overflow-hidden rounded-full",style:i,children:t.favicon?o.jsx("img",{src:t.favicon,alt:"",className:"size-full object-cover"}):o.jsx(je,{size:12,color:"#9aa0a6"})}),e[2]=t.favicon,e[3]=n):n=e[3];let m;e[4]===Symbol.for("react.memo_cache_sentinel")?(m={color:"#202124"},e[4]=m):m=e[4];let p;e[5]!==a?(p=o.jsx("div",{className:"truncate text-[13px] leading-tight",style:m,children:a}),e[5]=a,e[6]=p):p=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f={color:"#4d5156"},e[7]=f):f=e[7];let l;e[8]!==a||e[9]!==y?(l=o.jsxs("div",{className:"truncate text-[12px] leading-tight",style:f,children:[a,y]}),e[8]=a,e[9]=y,e[10]=l):l=e[10];let c;e[11]!==p||e[12]!==l?(c=o.jsxs("div",{className:"min-w-0",children:[p,l]}),e[11]=p,e[12]=l,e[13]=c):c=e[13];let x;e[14]!==n||e[15]!==c?(x=o.jsxs("div",{className:"flex items-center gap-2",children:[n,c]}),e[14]=n,e[15]=c,e[16]=x):x=e[16];let u;e[17]===Symbol.for("react.memo_cache_sentinel")?(u={color:"#1a0dab"},e[17]=u):u=e[17];let h;e[18]!==t.title||e[19]!==r?(h=t.title??r("sectionsEditor.seoPreview.fallbackTitle"),e[18]=t.title,e[19]=r,e[20]=h):h=e[20];let v;e[21]!==h?(v=o.jsx("div",{className:"mt-1.5 truncate text-[18px] leading-snug",style:u,children:h}),e[21]=h,e[22]=v):v=e[22];let b;e[23]===Symbol.for("react.memo_cache_sentinel")?(b={color:"#4d5156"},e[23]=b):b=e[23];let S;e[24]!==t.description||e[25]!==r?(S=t.description??r("sectionsEditor.seoPreview.fallbackDescription"),e[24]=t.description,e[25]=r,e[26]=S):S=e[26];let j;e[27]!==S?(j=o.jsx("div",{className:"mt-0.5 line-clamp-2 text-[13px] leading-snug",style:b,children:S}),e[27]=S,e[28]=j):j=e[28];let k;return e[29]!==v||e[30]!==j||e[31]!==x?(k=o.jsxs("div",{className:"rounded-lg p-3 text-left",style:s,children:[x,v,j]}),e[29]=v,e[30]=j,e[31]=x,e[32]=k):k=e[32],k}function Me(d){const e=T.c(26),{seo:t,host:a,t:y}=d;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={background:"#fff",border:"1px solid #e2e8f0"},e[0]=r):r=e[0];let s;e[1]!==t.image?(s=o.jsx(ue,{src:t.image,className:"h-40 w-full"}),e[1]=t.image,e[2]=s):s=e[2];let i;e[3]===Symbol.for("react.memo_cache_sentinel")?(i={borderTop:"1px solid #e2e8f0"},e[3]=i):i=e[3];let n;e[4]===Symbol.for("react.memo_cache_sentinel")?(n={color:"#8a9099"},e[4]=n):n=e[4];let m;e[5]!==a?(m=o.jsx("div",{className:"truncate text-[11px]",style:n,children:a}),e[5]=a,e[6]=m):m=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p={color:"#1c2024"},e[7]=p):p=e[7];let f;e[8]!==t.title||e[9]!==y?(f=t.title??y("sectionsEditor.seoPreview.fallbackTitle"),e[8]=t.title,e[9]=y,e[10]=f):f=e[10];let l;e[11]!==f?(l=o.jsx("div",{className:"line-clamp-1 text-[14px] font-semibold",style:p,children:f}),e[11]=f,e[12]=l):l=e[12];let c;e[13]===Symbol.for("react.memo_cache_sentinel")?(c={color:"#60666c"},e[13]=c):c=e[13];let x;e[14]!==t.description||e[15]!==y?(x=t.description??y("sectionsEditor.seoPreview.fallbackDescription"),e[14]=t.description,e[15]=y,e[16]=x):x=e[16];let u;e[17]!==x?(u=o.jsx("div",{className:"line-clamp-2 text-[12px]",style:c,children:x}),e[17]=x,e[18]=u):u=e[18];let h;e[19]!==u||e[20]!==m||e[21]!==l?(h=o.jsxs("div",{className:"px-3 py-2",style:i,children:[m,l,u]}),e[19]=u,e[20]=m,e[21]=l,e[22]=h):h=e[22];let v;return e[23]!==h||e[24]!==s?(v=o.jsxs("div",{className:"overflow-hidden rounded-lg text-left",style:r,children:[s,h]}),e[23]=h,e[24]=s,e[25]=v):v=e[25],v}function Ge(d){const e=T.c(36),{seo:t,host:a,accent:y,t:r}=d;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={background:"#f0f2f5"},e[0]=s):s=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i={color:"#3b4045"},e[1]=i):i=e[1];let n;e[2]!==r?(n=r("sectionsEditor.seoPreview.chatCardHint"),e[2]=r,e[3]=n):n=e[3];let m;e[4]!==n?(m=o.jsx("p",{className:"px-1 pb-1.5 text-[12px]",style:i,children:n}),e[4]=n,e[5]=m):m=e[5];const p=`3px solid ${y}`;let f;e[6]!==p?(f={background:"#fff",borderLeft:p},e[6]=p,e[7]=f):f=e[7];let l;e[8]!==t.image?(l=o.jsx(ue,{src:t.image,className:"h-28 w-full",iconSize:18}),e[8]=t.image,e[9]=l):l=e[9];let c;e[10]===Symbol.for("react.memo_cache_sentinel")?(c={color:"#1c2024"},e[10]=c):c=e[10];let x;e[11]!==t.title||e[12]!==r?(x=t.title??r("sectionsEditor.seoPreview.fallbackTitle"),e[11]=t.title,e[12]=r,e[13]=x):x=e[13];let u;e[14]!==x?(u=o.jsx("div",{className:"line-clamp-1 text-[12px] font-semibold",style:c,children:x}),e[14]=x,e[15]=u):u=e[15];let h;e[16]===Symbol.for("react.memo_cache_sentinel")?(h={color:"#60666c"},e[16]=h):h=e[16];let v;e[17]!==t.description||e[18]!==r?(v=t.description??r("sectionsEditor.seoPreview.fallbackDescription"),e[17]=t.description,e[18]=r,e[19]=v):v=e[19];let b;e[20]!==v?(b=o.jsx("div",{className:"line-clamp-2 text-[11px]",style:h,children:v}),e[20]=v,e[21]=b):b=e[21];let S;e[22]===Symbol.for("react.memo_cache_sentinel")?(S={color:"#8a9099"},e[22]=S):S=e[22];let j;e[23]!==a?(j=o.jsx("div",{className:"mt-0.5 text-[10px]",style:S,children:a}),e[23]=a,e[24]=j):j=e[24];let k;e[25]!==u||e[26]!==b||e[27]!==j?(k=o.jsxs("div",{className:"px-2.5 py-1.5",children:[u,b,j]}),e[25]=u,e[26]=b,e[27]=j,e[28]=k):k=e[28];let g;e[29]!==k||e[30]!==f||e[31]!==l?(g=o.jsxs("div",{className:"overflow-hidden rounded-[var(--studio-surface-radius,var(--radius-md))]",style:f,children:[l,k]}),e[29]=k,e[30]=f,e[31]=l,e[32]=g):g=e[32];let N;return e[33]!==g||e[34]!==m?(N=o.jsxs("div",{className:"rounded-lg p-2 text-left",style:s,children:[m,g]}),e[33]=g,e[34]=m,e[35]=N):N=e[35],N}function He(d){const e=T.c(39),{seo:t,host:a,accent:y,dark:r,t:s}=d,i=r?"#2b2d31":"#fff",n=r?"#00a8fc":"#1264a3",m=r?"#dbdee1":"#3b4045",p=r?"#949ba4":"#8a9099",f=r?"none":"1px solid #e2e8f0";let l;e[0]!==i||e[1]!==f?(l={background:i,border:f},e[0]=i,e[1]=f,e[2]=l):l=e[2];const c=`3px solid ${y}`;let x;e[3]!==c?(x={borderLeft:c,borderRadius:2},e[3]=c,e[4]=x):x=e[4];let u;e[5]!==p?(u={color:p},e[5]=p,e[6]=u):u=e[6];let h;e[7]!==a||e[8]!==u?(h=o.jsx("div",{className:"text-[10px]",style:u,children:a}),e[7]=a,e[8]=u,e[9]=h):h=e[9];let v;e[10]!==n?(v={color:n},e[10]=n,e[11]=v):v=e[11];let b;e[12]!==t.title||e[13]!==s?(b=t.title??s("sectionsEditor.seoPreview.fallbackTitle"),e[12]=t.title,e[13]=s,e[14]=b):b=e[14];let S;e[15]!==v||e[16]!==b?(S=o.jsx("div",{className:"line-clamp-1 text-[13px] font-semibold",style:v,children:b}),e[15]=v,e[16]=b,e[17]=S):S=e[17];let j;e[18]!==m?(j={color:m},e[18]=m,e[19]=j):j=e[19];let k;e[20]!==t.description||e[21]!==s?(k=t.description??s("sectionsEditor.seoPreview.fallbackDescription"),e[20]=t.description,e[21]=s,e[22]=k):k=e[22];let g;e[23]!==j||e[24]!==k?(g=o.jsx("div",{className:"line-clamp-2 text-[12px]",style:j,children:k}),e[23]=j,e[24]=k,e[25]=g):g=e[25];let N;e[26]!==g||e[27]!==h||e[28]!==S?(N=o.jsxs("div",{className:"min-w-0 flex-1",children:[h,S,g]}),e[26]=g,e[27]=h,e[28]=S,e[29]=N):N=e[29];let w;e[30]!==t.image?(w=o.jsx(ue,{src:t.image,className:"size-14 shrink-0 rounded-[var(--studio-control-radius,var(--radius))]",iconSize:16}),e[30]=t.image,e[31]=w):w=e[31];let _;e[32]!==N||e[33]!==w||e[34]!==x?(_=o.jsxs("div",{className:"flex gap-2.5 pl-2.5",style:x,children:[N,w]}),e[32]=N,e[33]=w,e[34]=x,e[35]=_):_=e[35];let E;return e[36]!==_||e[37]!==l?(E=o.jsx("div",{className:"rounded-lg p-2.5 text-left",style:l,children:_}),e[36]=_,e[37]=l,e[38]=E):E=e[38],E}function Ve(d){const e=T.c(21),{platform:t,seo:a,host:y,path:r,t:s}=d;let i;e[0]!==y||e[1]!==r||e[2]!==t.color||e[3]!==t.id||e[4]!==t.layout||e[5]!==a||e[6]!==s?(i=t.layout==="search"?o.jsx(Ae,{seo:a,host:y,path:r,t:s}):t.layout==="card"?o.jsx(Me,{seo:a,host:y,path:r,t:s}):t.layout==="chat"?o.jsx(Ge,{seo:a,host:y,path:r,accent:t.color,t:s}):o.jsx(He,{seo:a,host:y,path:r,accent:t.color,dark:t.id==="discord",t:s}),e[0]=y,e[1]=r,e[2]=t.color,e[3]=t.id,e[4]=t.layout,e[5]=a,e[6]=s,e[7]=i):i=e[7];const n=i;let m;e[8]!==t.color?(m=o.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{background:t.color}}),e[8]=t.color,e[9]=m):m=e[9];let p;e[10]!==t.labelKey||e[11]!==s?(p=s(t.labelKey),e[10]=t.labelKey,e[11]=s,e[12]=p):p=e[12];let f;e[13]!==p?(f=o.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:p}),e[13]=p,e[14]=f):f=e[14];let l;e[15]!==m||e[16]!==f?(l=o.jsxs("div",{className:"mb-1.5 flex items-center gap-1.5",children:[m,f]}),e[15]=m,e[16]=f,e[17]=l):l=e[17];let c;return e[18]!==n||e[19]!==l?(c=o.jsxs("div",{children:[l,n]}),e[18]=n,e[19]=l,e[20]=c):c=e[20],c}function qe(d){const e=T.c(18),{seo:t,url:a,path:y}=d,r=y===void 0?"/":y,s=be();let i,n,m;if(e[0]!==t||e[1]!==a){const v=Le(t);i=v,n=ge(v.image,a),m=ge(v.favicon,a),e[0]=t,e[1]=a,e[2]=i,e[3]=n,e[4]=m}else i=e[2],n=e[3],m=e[4];let p;e[5]!==i||e[6]!==n||e[7]!==m?(p={...i,image:n,favicon:m},e[5]=i,e[6]=n,e[7]=m,e[8]=p):p=e[8];const f=p;let l;e[9]!==a?(l=Oe(a),e[9]=a,e[10]=l):l=e[10];const c=l,x=r==="/"?"":r;let u;e[11]!==x||e[12]!==c||e[13]!==s||e[14]!==f?(u=Ue.map(v=>o.jsx(Ve,{platform:v,seo:f,host:c,path:x,t:s},v.id)),e[11]=x,e[12]=c,e[13]=s,e[14]=f,e[15]=u):u=e[15];let h;return e[16]!==u?(h=o.jsx("div",{className:"grid grid-cols-1 gap-4 @2xl:grid-cols-2",children:u}),e[16]=u,e[17]=h):h=e[17],h}function Ei(d){const e=T.c(73),{orgSlug:t,virtualMcpId:a,branch:y,decofile:r,meta:s,target:i,previewBaseUrl:n,onSaved:m,onEditDefaultSeo:p,onBack:f}=d,l=be(),c=Ee(r,i,s),x=Be(a,y);let u;e[0]!==x?(u=Ie(x),e[0]=x,e[1]=u):u=e[1];const h=!u,v=c?.seoData,b=i.kind==="site"?"site":i.pageKey,[S,j]=te.useState(b),[k,g]=te.useState(null),[N,w]=te.useState(0),[_,E]=te.useState(void 0);S!==b&&(j(b),g(null),E(void 0),w(Je));const{persistSeo:K,persistRawSeo:oe,flush:ie,isPending:se}=ze({orgSlug:t,virtualMcpId:a,branch:y,target:i,resolved:c,meta:s,onSaved:m}),G=i.kind==="page",Se=G?c?.rawSeoData:void 0,A=_!==void 0?_:Se,ke=G?Pe(A)??void 0:void 0,P=k??ke??v??{},F=c?De(P,c):null,z=F&&(!G||Te(A))?Ke(F,s):null;let H;e[2]!==s?(H=Fe(s),e[2]=s,e[3]=H):H=e[3];const le=H;let R,V;e[4]!==r||e[5]!==P||e[6]!==s||e[7]!==i.kind?(R=i.kind==="page"?Re(r,s)?.seoData??{}:{},V=i.kind==="page"?Xe(R,P):P,e[4]=r,e[5]=P,e[6]=s,e[7]=i.kind,e[8]=R,e[9]=V):(R=e[8],V=e[9]);const re=V;let q;e[10]!==K||e[11]!==c||e[12]!==g?(q=C=>{if(!c)return;const xe=C;g(xe),K(xe)},e[10]=K,e[11]=c,e[12]=g,e[13]=q):q=e[13];const ae=q;let W;e[14]!==g?(W=()=>g(null),e[14]=g,e[15]=W):W=e[15];const ce=W;let J;e[16]!==w?(J=()=>w(We),e[16]=w,e[17]=J):J=e[17];const ne=J;let Q;e[18]!==ie||e[19]!==f?(Q=()=>{ie(),f?.()},e[18]=ie,e[19]=f,e[20]=Q):Q=e[20];const me=Q,D=i.kind==="page"?i.path:"/";let X;e[21]!==D||e[22]!==n||e[23]!==i.kind?(X=i.kind==="page"&&n?Qe(D,n):n??null,e[21]=D,e[22]=n,e[23]=i.kind,e[24]=X):X=e[24];const de=X;let Y;e[25]!==c||e[26]!==l||e[27]!==i.kind?(Y=i.kind==="site"?l("sectionsEditor.seoEditor.noSiteSeoBlock"):l(c?"sectionsEditor.seoEditor.noSeoSchema":"sectionsEditor.seoEditor.couldNotLoadSeo"),e[25]=c,e[26]=l,e[27]=i.kind,e[28]=Y):Y=e[28];const pe=Y,Z=G&&c,fe=i.kind==="site"&&c&&z;let $;e[29]!==me||e[30]!==l||e[31]!==i.kind||e[32]!==i.pageName?($=i.kind==="page"?o.jsxs("nav",{className:"flex min-w-0 items-center gap-1 text-sm",children:[o.jsx("button",{type:"button",onClick:me,title:i.pageName,className:"min-w-0 truncate rounded-[var(--studio-control-radius,var(--radius-md))] px-1 py-0.5 text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground",children:i.pageName}),o.jsx(Ne,{className:"size-3 shrink-0 text-muted-foreground/60"}),o.jsx("span",{className:"px-1 py-0.5 font-medium text-foreground",children:"SEO"})]}):o.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[o.jsx(he,{size:16,className:"shrink-0 text-muted-foreground"}),o.jsx("span",{className:"text-sm font-medium",children:l("sectionsEditor.seoEditor.defaultSeoLabel")}),o.jsxs("span",{className:"hidden truncate text-xs text-muted-foreground sm:inline",children:["· ",l("sectionsEditor.seoEditor.appliedToEveryPage")]})]}),e[29]=me,e[30]=l,e[31]=i.kind,e[32]=i.pageName,e[33]=$):$=e[33];let B;e[34]!==se?(B=se&&o.jsx(_e,{className:"size-3.5 text-muted-foreground"}),e[34]=se,e[35]=B):B=e[35];let I;e[36]!==p||e[37]!==l||e[38]!==i.kind?(I=i.kind==="page"&&p&&o.jsxs(we,{type:"button",variant:"outline",size:"sm",onClick:p,children:[o.jsx(he,{size:14}),l("sectionsEditor.seoEditor.editDefaultSeoButton")]}),e[36]=p,e[37]=l,e[38]=i.kind,e[39]=I):I=e[39];let L;e[40]!==B||e[41]!==I?(L=o.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-2",children:[B,I]}),e[40]=B,e[41]=I,e[42]=L):L=e[42];let O;e[43]!==$||e[44]!==L?(O=o.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-2 border-b px-4",children:[$,L]}),e[43]=$,e[44]=L,e[45]=O):O=e[45];let U;e[46]!==F||e[47]!==h||e[48]!==ne||e[49]!==ce||e[50]!==le||e[51]!==A||e[52]!==P||e[53]!==pe||e[54]!==N||e[55]!==ae||e[56]!==D||e[57]!==oe||e[58]!==K||e[59]!==re||e[60]!==de||e[61]!==c||e[62]!==z||e[63]!==g||e[64]!==E||e[65]!==Z||e[66]!==fe||e[67]!==R||e[68]!==l?(U=!c||!Z&&!fe?o.jsx("div",{className:"flex flex-1 items-center justify-center px-6 text-center text-sm text-muted-foreground",children:pe}):o.jsxs("div",{className:"flex min-h-0 flex-1",children:[o.jsx(ve,{className:"w-full max-w-md shrink-0 border-r [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"px-5 py-4",children:Z?o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"mb-3 text-xs text-muted-foreground",children:l("sectionsEditor.seoEditor.emptyFieldsHint")}),o.jsx($e,{rawSeo:A,innerSeo:P,defaultResolveType:le,seoSchema:z,activeResolveType:F,seoTypeOptions:c.seoTypeOptions,formResetKey:N,siteDefaultSeo:R,onPersistRaw:C=>{E(C),oe(C)},onInnerChange:C=>{g(C),K(C)},onClearForm:ce,onBumpFormKey:ne,asyncRenderAvailable:h})]}):z&&F&&o.jsx(Ce,{schema:z,resolveType:F,value:P,formResetKey:N,onChange:ae})})}),o.jsx(ve,{className:"min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"@container px-5 py-4",children:o.jsx(qe,{seo:re,url:de,path:D})})})]}),e[46]=F,e[47]=h,e[48]=ne,e[49]=ce,e[50]=le,e[51]=A,e[52]=P,e[53]=pe,e[54]=N,e[55]=ae,e[56]=D,e[57]=oe,e[58]=K,e[59]=re,e[60]=de,e[61]=c,e[62]=z,e[63]=g,e[64]=E,e[65]=Z,e[66]=fe,e[67]=R,e[68]=l,e[69]=U):U=e[69];let ee;return e[70]!==O||e[71]!==U?(ee=o.jsxs("div",{className:"flex h-full w-full flex-col",children:[O,U]}),e[70]=O,e[71]=U,e[72]=ee):ee=e[72],ee}function We(d){return d+1}function Je(d){return d+1}function Qe(d,e){try{return new URL(d,e).href}catch{return e}}function Xe(d,e){const t=e.__resolveType,a=d.__resolveType;if(typeof t=="string"&&typeof a=="string"&&t!==a)return{...e};const y={...d};for(const[r,s]of Object.entries(e))r!=="__resolveType"&&s!=null&&(typeof s=="string"&&s.trim()===""||(y[r]=s));return y}export{Ei as SeoEditor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as e,j as o}from"./index-BAmB740B.js";import{V as a}from"./index-CkPVfANw.js";function p(s){const t=e.c(2),{virtualMcpId:r}=s;let i;return t[0]!==r?(i=o.jsx(a,{virtualMcpId:r}),t[0]=r,t[1]=i):i=t[1],i}export{p as S};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as R,b as J,e as st,j as n,B as M,t as Ue,bY as le,ad as Tt,a as Je,G as Vt,R as Nt,K as We,bZ as Wt,b_ as Yt,aw as Ve,l as ft,aZ as Qt,x as ht,r as X,ab as Xt,ac as ne,s as _t,v as Pt,q as At,D as Et,d as Ct,a2 as ut,J as Ot,m as qe,y as lt,aM as It,b$ as Zt,aS as en,aX as gt,F as tn,c0 as nn,aN as sn,w as on,c1 as an,c2 as rn,c3 as ln,c4 as cn,c5 as dn,a3 as un,u as mn,a4 as fn,c6 as hn,c7 as gn,k as $t,c8 as pt,c9 as pn,O as yn,_ as bn}from"./index-BAmB740B.js";import{A as it}from"./avatar-DsyxJdd5.js";import{t as Lt}from"./Building02-jY0EsZ3c.js";import{i as xn,s as te}from"./UserSquare-DvQcif2z.js";import{aA as Sn,W as wn,I as rt,aa as vn,K as jn,aB as kn,n as yt,g as Tn,p as Nn,k as _n,aC as Pn,l as An}from"./agent-icon-D9qv9iJQ.js";import{s as En}from"./XClose-CE-051ne.js";import{a as Cn,u as On}from"./use-project-scope-COq2XQVT.js";import{u as Dt,a as In}from"./use-panel-navigate-DcAwEhOb.js";import{i as ie}from"./CheckCircle-Bjd4331B.js";import{i as bt}from"./Monitor01-DfNea12c.js";import{i as Ke}from"./ZoomOut-BBaDHidP.js";import{u as $n}from"./use-clock-tick-Cqy994m5.js";import{s as xt}from"./Plus-BjxA_ka5.js";import{a as Ln}from"./Tool01-CcNuzAHc.js";import{b as se,a as Be,f as Dn,e as Rn,c as Mn,C as Fn}from"./command-CMb7suOV.js";import{I as zn}from"./integration-icon-oEHZLv8F.js";import{P as Kn}from"./project-icon-DuRHj8pv.js";import{a as qn,m as Bn}from"./use-mcp-client-CqNgp7C3.js";import{u as Hn,a as Un,n as Gn}from"./new-project-dialog-DmsgoraK.js";import{S as Jn,u as Vn}from"./thread-intent-C0R8BtBw.js";import{R as Wn}from"./required-auth-layout-FVugTURm.js";import{A as Yn}from"./autosend-Rn3iicpQ.js";import{u as Qn,a as Xn,b as Zn,c as es}from"./thread-route-yHr3Xqpq.js";import{u as ts}from"./use-org-sso-CXvlVlUi.js";function ns(t){const e=R.c(49),{orgName:o,orgSlug:r,orgLogo:s,domain:a}=t,i=J();let c;e[0]!==r||e[1]!==i?(c=async()=>{const P=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:r})}),E=await P.json();if(!P.ok||!E.success)throw new Error(E.error??i("common.autoDomainJoinScreen.joinError"));return E},e[0]=r,e[1]=i,e[2]=c):c=e[2];let m;e[3]!==r?(m=P=>{window.location.href=`/${P.slug??r}`},e[3]=r,e[4]=m):m=e[4];let h;e[5]!==i?(h=P=>{Ue.error(P instanceof Error?P.message:i("common.autoDomainJoinScreen.joinError"))},e[5]=i,e[6]=h):h=e[6];let w;e[7]!==c||e[8]!==m||e[9]!==h?(w={mutationFn:c,onSuccess:m,onError:h},e[7]=c,e[8]=m,e[9]=h,e[10]=w):w=e[10];const u=st(w),p=ss;let l;e[11]!==s||e[12]!==o?(l=s?n.jsx(it,{url:s,fallback:o,shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(Lt,{className:"h-6 w-6 text-primary"})}),e[11]=s,e[12]=o,e[13]=l):l=e[13];let g;e[14]!==o||e[15]!==i?(g=i("common.autoDomainJoinScreen.joinPrompt",{orgName:o}),e[14]=o,e[15]=i,e[16]=g):g=e[16];let f;e[17]!==g?(f=n.jsx("h3",{className:"text-lg font-medium",children:g}),e[17]=g,e[18]=f):f=e[18];let d;e[19]!==a||e[20]!==i?(d=i("common.autoDomainJoinScreen.joinDescription",{domain:a}),e[19]=a,e[20]=i,e[21]=d):d=e[21];let S;e[22]!==d?(S=n.jsx("p",{className:"text-sm text-muted-foreground",children:d}),e[22]=d,e[23]=S):S=e[23];let y;e[24]!==f||e[25]!==S?(y=n.jsxs("div",{className:"space-y-2",children:[f,S]}),e[24]=f,e[25]=S,e[26]=y):y=e[26];let x;e[27]!==u?(x=()=>u.mutate(),e[27]=u,e[28]=x):x=e[28];let v;e[29]!==u.isPending||e[30]!==o||e[31]!==i?(v=u.isPending?i("common.autoDomainJoinScreen.joining"):i("common.autoDomainJoinScreen.enterOrg",{orgName:o}),e[29]=u.isPending,e[30]=o,e[31]=i,e[32]=v):v=e[32];let b;e[33]!==u.isPending||e[34]!==x||e[35]!==v?(b=n.jsx(M,{onClick:x,disabled:u.isPending,children:v}),e[33]=u.isPending,e[34]=x,e[35]=v,e[36]=b):b=e[36];const T=u.isPending;let j;e[37]!==i?(j=i("common.goHome"),e[37]=i,e[38]=j):j=e[38];let k;e[39]!==u.isPending||e[40]!==j?(k=n.jsx(M,{variant:"ghost",onClick:p,disabled:T,children:j}),e[39]=u.isPending,e[40]=j,e[41]=k):k=e[41];let _;e[42]!==b||e[43]!==k?(_=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[b,k]}),e[42]=b,e[43]=k,e[44]=_):_=e[44];let N;return e[45]!==y||e[46]!==_||e[47]!==l?(N=n.jsxs(le,{children:[l,y,_]}),e[45]=y,e[46]=_,e[47]=l,e[48]=N):N=e[48],N}function ss(){window.location.href="/"}function St(t){const e=R.c(25),{orgSlug:o,orgName:r,reason:s}=t,a=J(),i=os,c=s==="not-found",m=c?xn:Tt;let h;e[0]!==c||e[1]!==a?(h=a(c?"common.noAccessScreen.organizationNotFound":"common.noAccessScreen.noAccess"),e[0]=c,e[1]=a,e[2]=h):h=e[2];const w=h;let u;e[3]!==c||e[4]!==r||e[5]!==o||e[6]!==a?(u=c?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]=c,e[4]=r,e[5]=o,e[6]=a,e[7]=u):u=e[7];const p=u;let l;e[8]!==m?(l=n.jsx("div",{className:"bg-muted p-3 rounded-full",children:n.jsx(m,{className:"h-6 w-6 text-muted-foreground"})}),e[8]=m,e[9]=l):l=e[9];let g;e[10]!==w?(g=n.jsx("h3",{className:"text-lg font-medium",children:w}),e[10]=w,e[11]=g):g=e[11];let f;e[12]!==p?(f=n.jsx("p",{className:"text-sm text-muted-foreground",children:p}),e[12]=p,e[13]=f):f=e[13];let d;e[14]!==g||e[15]!==f?(d=n.jsxs("div",{className:"space-y-2",children:[g,f]}),e[14]=g,e[15]=f,e[16]=d):d=e[16];let S;e[17]!==a?(S=a("common.goHome"),e[17]=a,e[18]=S):S=e[18];let y;e[19]!==S?(y=n.jsx(M,{onClick:i,children:S}),e[19]=S,e[20]=y):y=e[20];let x;return e[21]!==l||e[22]!==d||e[23]!==y?(x=n.jsxs(le,{children:[l,d,y]}),e[21]=l,e[22]=d,e[23]=y,e[24]=x):x=e[24],x}function os(){window.location.href="/"}function is(t){const e=R.c(59),{invitationId:o,orgName:r,orgSlug:s,orgLogo:a}=t,i=J();let c;e[0]!==o?(c=async()=>{const A=await Je.organization.acceptInvitation({invitationId:o});if(A.error)throw new Error(A.error.message);return A.data},e[0]=o,e[1]=c):c=e[1];let m;e[2]!==s?(m=()=>{Vt(),window.location.href=`/${s}`},e[2]=s,e[3]=m):m=e[3];let h;e[4]!==i?(h=A=>{Ue.error(A instanceof Error?A.message:i("common.pendingInviteScreen.failedToAccept"))},e[4]=i,e[5]=h):h=e[5];let w;e[6]!==c||e[7]!==m||e[8]!==h?(w={mutationFn:c,onSuccess:m,onError:h},e[6]=c,e[7]=m,e[8]=h,e[9]=w):w=e[9];const u=st(w);let p;e[10]!==o?(p=async()=>{const A=await Je.organization.rejectInvitation({invitationId:o});if(A.error)throw new Error(A.error.message);return A.data},e[10]=o,e[11]=p):p=e[11];let l,g;e[12]!==i?(l=()=>{Ue.success(i("common.pendingInviteScreen.invitationDeclined")),window.location.href="/"},g=A=>{Ue.error(A instanceof Error?A.message:i("common.pendingInviteScreen.failedToDecline"))},e[12]=i,e[13]=l,e[14]=g):(l=e[13],g=e[14]);let f;e[15]!==p||e[16]!==l||e[17]!==g?(f={mutationFn:p,onSuccess:l,onError:g},e[15]=p,e[16]=l,e[17]=g,e[18]=f):f=e[18];const d=st(f),S=u.isPending||d.isPending;let y;e[19]!==a||e[20]!==r?(y=a?n.jsx(it,{url:a,fallback:r,shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(Sn,{className:"h-6 w-6 text-primary"})}),e[19]=a,e[20]=r,e[21]=y):y=e[21];let x;e[22]!==r||e[23]!==i?(x=i("common.pendingInviteScreen.invitedTo",{orgName:r}),e[22]=r,e[23]=i,e[24]=x):x=e[24];let v;e[25]!==x?(v=n.jsx("h3",{className:"text-lg font-medium",children:x}),e[25]=x,e[26]=v):v=e[26];let b;e[27]!==i?(b=i("common.pendingInviteScreen.acceptDescription"),e[27]=i,e[28]=b):b=e[28];let T;e[29]!==b?(T=n.jsx("p",{className:"text-sm text-muted-foreground",children:b}),e[29]=b,e[30]=T):T=e[30];let j;e[31]!==v||e[32]!==T?(j=n.jsxs("div",{className:"space-y-2",children:[v,T]}),e[31]=v,e[32]=T,e[33]=j):j=e[33];let k;e[34]!==u?(k=()=>u.mutate(),e[34]=u,e[35]=k):k=e[35];let _;e[36]!==u.isPending||e[37]!==i?(_=u.isPending?i("common.pendingInviteScreen.acceptingButton"):i("common.pendingInviteScreen.acceptButton"),e[36]=u.isPending,e[37]=i,e[38]=_):_=e[38];let N;e[39]!==S||e[40]!==k||e[41]!==_?(N=n.jsx(M,{onClick:k,disabled:S,children:_}),e[39]=S,e[40]=k,e[41]=_,e[42]=N):N=e[42];let P;e[43]!==d?(P=()=>d.mutate(),e[43]=d,e[44]=P):P=e[44];let E;e[45]!==d.isPending||e[46]!==i?(E=d.isPending?i("common.pendingInviteScreen.decliningButton"):i("common.pendingInviteScreen.declineButton"),e[45]=d.isPending,e[46]=i,e[47]=E):E=e[47];let I;e[48]!==S||e[49]!==P||e[50]!==E?(I=n.jsx(M,{variant:"ghost",onClick:P,disabled:S,children:E}),e[48]=S,e[49]=P,e[50]=E,e[51]=I):I=e[51];let O;e[52]!==N||e[53]!==I?(O=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[N,I]}),e[52]=N,e[53]=I,e[54]=O):O=e[54];let D;return e[55]!==j||e[56]!==O||e[57]!==y?(D=n.jsxs(le,{children:[y,j,O]}),e[55]=j,e[56]=O,e[57]=y,e[58]=D):D=e[58],D}function as(t){const e=R.c(23),{orgName:o,orgLogo:r}=t,s=J();let a;e[0]!==r||e[1]!==o?(a=r?n.jsx(it,{url:r,fallback:o,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 c;e[5]!==i?(c=n.jsx("h3",{className:"text-lg font-medium",children:i}),e[5]=i,e[6]=c):c=e[6];let m;e[7]!==o||e[8]!==s?(m=s("common.requestPendingScreen.description",{orgName:o}),e[7]=o,e[8]=s,e[9]=m):m=e[9];let h;e[10]!==m?(h=n.jsx("p",{className:"text-sm text-muted-foreground",children:m}),e[10]=m,e[11]=h):h=e[11];let w;e[12]!==c||e[13]!==h?(w=n.jsxs("div",{className:"space-y-2",children:[c,h]}),e[12]=c,e[13]=h,e[14]=w):w=e[14];let u;e[15]!==s?(u=s("common.goHome"),e[15]=s,e[16]=u):u=e[16];let p;e[17]!==u?(p=n.jsx(M,{variant:"ghost",onClick:rs,children:u}),e[17]=u,e[18]=p):p=e[18];let l;return e[19]!==a||e[20]!==w||e[21]!==p?(l=n.jsxs(le,{children:[a,w,p]}),e[19]=a,e[20]=w,e[21]=p,e[22]=l):l=e[22],l}function rs(){window.location.href="/"}function ls(t){const e=R.c(45),{orgName:o,orgSlug:r,orgLogo:s,domain:a}=t,i=J();let c;e[0]!==r?(c=async()=>{const N=await fetch("/api/auth/custom/domain-request-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:r})}),P=await N.json();if(!N.ok||!P.success)throw new Error(P.error??"Failed to request access");return P},e[0]=r,e[1]=c):c=e[1];let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=ds,e[2]=m):m=e[2];let h;e[3]!==i?(h=N=>{Ue.error(N instanceof Error?N.message:i("common.requestToJoinScreen.failedToRequest"))},e[3]=i,e[4]=h):h=e[4];let w;e[5]!==c||e[6]!==h?(w={mutationFn:c,onSuccess:m,onError:h},e[5]=c,e[6]=h,e[7]=w):w=e[7];const u=st(w);let p;e[8]!==s||e[9]!==o?(p=s?n.jsx(it,{url:s,fallback:o,shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(Lt,{className:"h-6 w-6 text-primary"})}),e[8]=s,e[9]=o,e[10]=p):p=e[10];let l;e[11]!==o||e[12]!==i?(l=i("common.requestToJoinScreen.title",{orgName:o}),e[11]=o,e[12]=i,e[13]=l):l=e[13];let g;e[14]!==l?(g=n.jsx("h3",{className:"text-lg font-medium",children:l}),e[14]=l,e[15]=g):g=e[15];let f;e[16]!==a||e[17]!==i?(f=i("common.requestToJoinScreen.description",{domain:a}),e[16]=a,e[17]=i,e[18]=f):f=e[18];let d;e[19]!==f?(d=n.jsx("p",{className:"text-sm text-muted-foreground",children:f}),e[19]=f,e[20]=d):d=e[20];let S;e[21]!==g||e[22]!==d?(S=n.jsxs("div",{className:"space-y-2",children:[g,d]}),e[21]=g,e[22]=d,e[23]=S):S=e[23];let y;e[24]!==u?(y=()=>u.mutate(),e[24]=u,e[25]=y):y=e[25];let x;e[26]!==u.isPending||e[27]!==i?(x=u.isPending?i("common.requestToJoinScreen.requesting"):i("common.requestToJoinScreen.requestButton"),e[26]=u.isPending,e[27]=i,e[28]=x):x=e[28];let v;e[29]!==u.isPending||e[30]!==y||e[31]!==x?(v=n.jsx(M,{onClick:y,disabled:u.isPending,children:x}),e[29]=u.isPending,e[30]=y,e[31]=x,e[32]=v):v=e[32];const b=u.isPending;let T;e[33]!==i?(T=i("common.goHome"),e[33]=i,e[34]=T):T=e[34];let j;e[35]!==u.isPending||e[36]!==T?(j=n.jsx(M,{variant:"ghost",onClick:cs,disabled:b,children:T}),e[35]=u.isPending,e[36]=T,e[37]=j):j=e[37];let k;e[38]!==v||e[39]!==j?(k=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[v,j]}),e[38]=v,e[39]=j,e[40]=k):k=e[40];let _;return e[41]!==S||e[42]!==k||e[43]!==p?(_=n.jsxs(le,{children:[p,S,k]}),e[41]=S,e[42]=k,e[43]=p,e[44]=_):_=e[44],_}function cs(){window.location.href="/"}function ds(t){if(t.alreadyMember&&t.slug){window.location.href=`/${t.slug}`;return}window.location.reload()}function us(t){const e=R.c(7);let o;e[0]!==t?(o=We.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 ms({orgSlug:t}){const{data:e}=us(t);if(e.status!=="member"){Wt()?.org===t&&Yt();const o=localStorage.getItem(Ve.lastOrgSlug())===t;if(o&&localStorage.removeItem(Ve.lastOrgSlug()),o&&(e.status==="not-found"||e.status==="no-access"))return window.location.href="/",null}return e.status==="not-found"?n.jsx(St,{orgSlug:t,reason:"not-found"}):e.status==="pending-invite"?n.jsx(is,{invitationId:e.invitation.id,orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo}):e.status==="auto-domain-join"?n.jsx(ns,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="can-request"?n.jsx(ls,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="request-pending"?n.jsx(as,{orgName:e.organization.name,orgLogo:e.organization.logo}):e.status==="member"?(window.location.reload(),null):n.jsx(St,{orgSlug:t,orgName:e.organization.name,reason:"no-access"})}function Rt(t){const e=R.c(42),{ariaLabel:o,dismissLabel:r,eyebrow:s,title:a,description:i,icon:c,children:m,footerLeading:h,actions:w,onDismiss:u,tone:p}=t,l=p===void 0?"neutral":p,g=h||w;let f;e[0]!==l?(f=l==="system"&&n.jsx("div",{className:"h-0.5 bg-special"}),e[0]=l,e[1]=f):f=e[1];let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(En,{size:14}),e[2]=d):d=e[2];let S;e[3]!==r||e[4]!==u?(S=n.jsx(M,{size:"icon-sm",variant:"ghost","aria-label":r,className:"absolute right-2 top-2 z-10 text-muted-foreground",onClick:u,children:d}),e[3]=r,e[4]=u,e[5]=S):S=e[5];const y=c&&"flex items-start gap-3",x=m&&"pb-3";let v;e[6]!==y||e[7]!==x?(v=ft("p-4 pr-11",y,x),e[6]=y,e[7]=x,e[8]=v):v=e[8];let b;e[9]!==c?(b=c&&n.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-special/10 text-special",children:c}),e[9]=c,e[10]=b):b=e[10];let T;e[11]!==s?(T=s&&n.jsx("p",{className:"text-xs text-muted-foreground",children:s}),e[11]=s,e[12]=T):T=e[12];let j;e[13]!==a?(j=n.jsx("h3",{className:"text-base font-semibold text-foreground",children:a}),e[13]=a,e[14]=j):j=e[14];let k;e[15]!==i?(k=i&&n.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:i}),e[15]=i,e[16]=k):k=e[16];let _;e[17]!==j||e[18]!==k||e[19]!==T?(_=n.jsxs("div",{children:[T,j,k]}),e[17]=j,e[18]=k,e[19]=T,e[20]=_):_=e[20];let N;e[21]!==m?(N=m&&n.jsx("div",{className:"mt-3",children:m}),e[21]=m,e[22]=N):N=e[22];let P;e[23]!==_||e[24]!==N?(P=n.jsxs("div",{className:"min-w-0 flex-1",children:[_,N]}),e[23]=_,e[24]=N,e[25]=P):P=e[25];let E;e[26]!==P||e[27]!==v||e[28]!==b?(E=n.jsxs("div",{className:v,children:[b,P]}),e[26]=P,e[27]=v,e[28]=b,e[29]=E):E=e[29];let I;e[30]!==w||e[31]!==h||e[32]!==g||e[33]!==l?(I=g&&n.jsxs("div",{className:ft("flex items-center justify-between gap-3 px-4 py-2.5",l==="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]=g,e[33]=l,e[34]=I):I=e[34];let O;return e[35]!==o||e[36]!==E||e[37]!==I||e[38]!==f||e[39]!==S||e[40]!==l?(O=n.jsxs("div",{role:"dialog","aria-label":o,"data-slot":"announcement-card","data-tone":l,className:"relative w-full overflow-hidden rounded-lg bg-popover shadow-soft animate-in fade-in slide-in-from-bottom-2 duration-300",children:[f,S,E,I]}),e[35]=o,e[36]=E,e[37]=I,e[38]=f,e[39]=S,e[40]=l,e[41]=O):O=e[41],O}const fs={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="${fs[t]}"]`}const hs=[{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 gs(t){return hs.filter(e=>e.scope==="shell"||e.scope==="orgHome"&&t.onOrgHome||e.scope==="project"&&t.inProject||e.scope==="siteEditor"&&t.onSiteEditor)}function ps(t,e){return gs(e).map(o=>({element:Mt(o.anchor),popover:{title:t(o.titleKey),description:t(o.descKey),side:o.side,align:"center"}}))}const ys=Mt("switcher"),bs=30;function Ft(t){const e=document.querySelector(t);return e instanceof HTMLElement&&e.offsetParent!==null}function xs(t,e){return ps(t,e).filter(o=>typeof o.element=="string"&&Ft(o.element))}function Ss(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:()=>{He=!1},steps:e}}let He=!1;async function ws(){return(await Qt(()=>import("./driver.js-Dj4CfABu.js"),[])).driver}function vs(t,e){if(He)return;He=!0;let o=0;const r=()=>{if(!Ft(ys)&&o++<bs){requestAnimationFrame(r);return}const s=xs(t,e);if(s.length===0){He=!1;return}ws().then(a=>{a(Ss(t,s)).drive()}).catch(()=>{He=!1})};r()}function js(t){return t!=="off"}function ti(t){if(!t.hasSource)return[];const e=["site-editor"];return js(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 ni(t){return t.reportsOnly&&!t.onReportAgent&&zt(t.tabId)}const Kt=[{id:"new-layout",date:"2026-09-22",eyebrow:"Now Available",title:"New Layout",bullets:[{icon:bt,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:rt,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:vn,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:ht,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:te,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:bt,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:"codex-gpt-5-6-defaults",date:"2026-07-13",eyebrow:"Now Available",title:"Codex defaults move to GPT-5.6",bullets:[{icon:te,title:"Sol leads Thinking",body:"Codex Thinking now defaults to `gpt-5.6-sol` for deeper coding and reasoning work."},{icon:ie,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:Ke,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:te,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:ie,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:Ke,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:ie,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:te,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:Ke,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:te,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:ie,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:Ke,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:te,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:ie,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:Ke,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:te,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:rt,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:ie,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:ht,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:Ke,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:ie,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:te,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:rt,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:te,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:jn,title:"Unified inbox",body:"Org invitations and product updates now share one chronological feed in the sidebar."}]}],ot="studio.release-feed.v1",ct=new Set;let ae="",re={},dt=!1;function ks(){if(dt)return ae||"{}";try{return localStorage.getItem(ot)??"{}"}catch{return ae||"{}"}}function qt(t){try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function wt(){const t=ks();return t!==ae&&(ae=t,re=qt(t)),re}function Ts(t){ct.add(t);const e=o=>{if(!(o.key!==ot&&o.key!==null)){try{const r=localStorage.getItem(ot)??"{}",a={...qt(r),...re};re=a,ae=JSON.stringify(a)}catch{}t()}};return window.addEventListener("storage",e),()=>{ct.delete(t),window.removeEventListener("storage",e)}}function Ns(t){re=t,ae=JSON.stringify(t);try{localStorage.setItem(ot,ae),dt=!1}catch{dt=!0}ct.forEach(e=>e())}function _s(){const t=R.c(7),e=X.useSyncExternalStore(Ts,wt,wt);let o;t[0]!==e?(o=m=>!!e[m],t[0]=e,t[1]=o):o=t[1];const r=o,s=Ps;let a;t[2]!==e?(a=Kt.reduce((m,h)=>e[h.id]?m:m+1,0),t[2]=e,t[3]=a):a=t[3];const i=a;let c;return t[4]!==r||t[5]!==i?(c={isSeen:r,markSeen:s,unseenCount:i},t[4]=r,t[5]=i,t[6]=c):c=t[6],c}function Ps(t){re[t]||Ns({...re,[t]:{seenAt:new Date().toISOString()}})}const As=720*60*60*1e3,Es=10080*60*1e3;function Cs(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 Os(t){const e=Kt[0];if(!e)return null;const o=Cs(e.date),r=t-o;return r<0||r>As?null:e}function Is(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 $s(t,e){const o=Is(t);return o===null?!1:e-o>=Es}function Ls(){const t=R.c(46),e=J(),o=Cn(),r=Xt(),s=Dt(),a=!!o,i=r===ne.home&&!o;let c;t[0]!==s||t[1]!==a?(c=a&&!!s&&zt(s),t[0]=s,t[1]=a,t[2]=c):c=t[2];const m=c,{data:h}=Je.useSession(),{isSeen:w,markSeen:u}=_s(),p=$n(6e4);let l,g,f;if(t[3]!==w||t[4]!==p||t[5]!==h?.user?.createdAt){f=Symbol.for("react.early_return_sentinel");e:{if(l=Os(p),!l){f=null;break e}if(!$s(h?.user?.createdAt,p)){f=null;break e}g=w(l.id)}t[3]=w,t[4]=p,t[5]=h?.user?.createdAt,t[6]=l,t[7]=g,t[8]=f}else l=t[6],g=t[7],f=t[8];if(f!==Symbol.for("react.early_return_sentinel"))return f;if(g)return null;let d;t[9]!==l.id||t[10]!==a||t[11]!==u||t[12]!==i||t[13]!==m||t[14]!==e?(d=()=>{u(l.id),vs(e,{onOrgHome:i,inProject:a,onSiteEditor:m})},t[9]=l.id,t[10]=a,t[11]=u,t[12]=i,t[13]=m,t[14]=e,t[15]=d):d=t[15];const S=d;let y;t[16]!==e?(y=e("announcements.release.ariaLabel"),t[16]=e,t[17]=y):y=t[17];let x;t[18]!==e?(x=e("announcements.release.dismiss"),t[18]=e,t[19]=x):x=t[19];const v=l.eyebrow,b=l.title;let T;t[20]!==l.id||t[21]!==u?(T=()=>u(l.id),t[20]=l.id,t[21]=u,t[22]=T):T=t[22];let j;t[23]!==l.id||t[24]!==l.learnMoreHref||t[25]!==u||t[26]!==e?(j=l.learnMoreHref?n.jsx("a",{href:l.learnMoreHref,target:"_blank",rel:"noreferrer",onClick:()=>u(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]=u,t[26]=e,t[27]=j):j=t[27];let k;t[28]!==l.cta||t[29]!==l.id||t[30]!==u||t[31]!==S?(k=l.cta?"href"in l.cta?n.jsx(M,{asChild:!0,size:"sm",onClick:()=>u(l.id),children:n.jsx("a",{href:l.cta.href,children:l.cta.label})}):n.jsx(M,{size:"sm",onClick:S,children:l.cta.label}):null,t[28]=l.cta,t[29]=l.id,t[30]=u,t[31]=S,t[32]=k):k=t[32];let _;t[33]!==l.bullets?(_=l.bullets.map(Ds),t[33]=l.bullets,t[34]=_):_=t[34];let N;t[35]!==_?(N=n.jsx("ul",{className:"flex flex-col gap-3",children:_}),t[35]=_,t[36]=N):N=t[36];let P;return t[37]!==l.eyebrow||t[38]!==l.title||t[39]!==k||t[40]!==N||t[41]!==y||t[42]!==x||t[43]!==T||t[44]!==j?(P=n.jsx(Rt,{ariaLabel:y,dismissLabel:x,eyebrow:v,title:b,onDismiss:T,footerLeading:j,actions:k,children:N}),t[37]=l.eyebrow,t[38]=l.title,t[39]=k,t[40]=N,t[41]=y,t[42]=x,t[43]=T,t[44]=j,t[45]=P):P=t[45],P}function Ds(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 Bt=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform),oe=Bt?"⌘":"Ctrl",G={commandPalette:{keys:[oe,"K"],description:"Command palette"},keyboardShortcuts:{keys:["?"],description:"Keyboard shortcuts"},back:{keys:[oe,"["],description:"Back to previous"},focusChatInput:{keys:[oe,"L"],description:"Focus chat input"},saveAndFormat:{keys:[oe,"S"],description:"Save & format"},sendMessage:{keys:["Enter"],description:"Send message"},newLine:{keys:["Shift","Enter"],description:"New line"},selectOption:{keys:["1-9"],description:"Select option"},applyFilter:{keys:[oe,"Enter"],description:"Apply filter"},togglePlanMode:{keys:[oe,"Shift","L"],description:"Toggle plan mode"},newTask:{keys:["Shift",oe,"S"],description:"New task"},toggleDaemon:{keys:[oe,"D"],description:"Toggle daemon logs"}},Rs=[{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 Bt?t.metaKey:t.ctrlKey}function Ms(t){if(!(t instanceof HTMLElement))return!1;if(t.isContentEditable)return!0;const e=t.tagName;return e==="INPUT"||e==="TEXTAREA"||e==="SELECT"}function Fs(t){const e=R.c(11),{open:o,onOpenChange:r}=t,s=J();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(_t,{children:n.jsx(Pt,{children:a})}),e[2]=a,e[3]=i):i=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx("div",{className:"flex flex-col gap-4",children:Rs.map(zs)}),e[4]=c):c=e[4];let m;e[5]!==i?(m=n.jsxs(At,{className:"sm:max-w-md",children:[i,c]}),e[5]=i,e[6]=m):m=e[6];let h;return e[7]!==r||e[8]!==o||e[9]!==m?(h=n.jsx(Et,{open:o,onOpenChange:r,children:m}),e[7]=r,e[8]=o,e[9]=m,e[10]=h):h=e[10],h}function zs(t){return n.jsxs("div",{children:[n.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:t.label}),n.jsx("div",{className:"flex flex-col gap-1.5",children:t.shortcuts.map(Ks)})]},t.label)}function Ks(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(qs)})]},t.description)}function qs(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 Bs(t){const{org:e}=ut(),o=qn({connectionId:Ot,orgId:e.id,orgSlug:e.slug}),{data:r}=qe({queryKey:We.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 Hs(t){const e=R.c(195),{open:o,onOpenChange:r}=t,s=J(),a=Ct(),{org:i}=ut(),{projects:c,hasProjects:m}=On(),[h,w]=X.useState(""),u=X.useDeferredValue(h),p=Bs(u);let l;e[0]!==r?(l=()=>{r(!1),w("")},e[0]=r,e[1]=l):l=e[1];const g=l;let f;e[2]!==g?(f=(K,q)=>{lt("command_palette_used",{kind:q}),K(),g()},e[2]=g,e[3]=f):f=e[3];const d=f;let S;e[4]!==a||e[5]!==i.id||e[6]!==i.slug?(S=K=>{if(K.type==="connection"){if(!K.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:K.slug}});return}if(K.type==="task"){a({to:ne.tasks,params:{org:i.slug,taskKey:K.key??void 0}});return}const q=It(i.id).id;Zt(a,en({org:i.slug,agentId:K.virtual_mcp_id??q,superAgentId:q}),{search:()=>({thread:K.id}),replace:!1})},e[4]=a,e[5]=i.id,e[6]=i.slug,e[7]=S):S=e[7];const y=S;let x;e[8]!==h?(x=[h],e[8]=h,e[9]=x):x=e[9];const v=x;let b,T,j,k,_,N,P,E,I,O,D,A,F;if(e[10]!==g||e[11]!==d||e[12]!==m||e[13]!==p||e[14]!==a||e[15]!==r||e[16]!==o||e[17]!==y||e[18]!==i.slug||e[19]!==c||e[20]!==v||e[21]!==s||e[22]!==h){const K=p.filter(Gs),q=p.filter(Us);let V;e[36]!==i.slug?(V={org:i.slug},e[36]=i.slug,e[37]=V):V=e[37];const $=V;let W;e[38]!==s?(W=s("sidebar.navDestinations.home"),e[38]=s,e[39]=W):W=e[39];let Y;e[40]===Symbol.for("react.memo_cache_sentinel")?(Y=n.jsx(Tn,{"aria-hidden":"true"}),e[40]=Y):Y=e[40];let H;e[41]!==$||e[42]!==W?(H={key:"home",label:W,icon:Y,to:ne.home,params:$},e[41]=$,e[42]=W,e[43]=H):H=e[43];let U;e[44]!==s?(U=s("sidebar.navDestinations.reports"),e[44]=s,e[45]=U):U=e[45];let ee;e[46]===Symbol.for("react.memo_cache_sentinel")?(ee=n.jsx(Nn,{"aria-hidden":"true"}),e[46]=ee):ee=e[46];let Q;e[47]!==$||e[48]!==U?(Q={key:"reports",label:U,icon:ee,to:ne.reports,params:$},e[47]=$,e[48]=U,e[49]=Q):Q=e[49];let L;e[50]!==s?(L=s("sidebar.navDestinations.tasks"),e[50]=s,e[51]=L):L=e[51];let B;e[52]===Symbol.for("react.memo_cache_sentinel")?(B=n.jsx(yt,{"aria-hidden":"true"}),e[52]=B):B=e[52];let ce;e[53]!==i.slug?(ce={org:i.slug,taskKey:void 0},e[53]=i.slug,e[54]=ce):ce=e[54];let de;e[55]!==L||e[56]!==ce?(de={key:"tasks",label:L,icon:B,to:ne.tasks,params:ce},e[55]=L,e[56]=ce,e[57]=de):de=e[57];let ue;e[58]!==s?(ue=s("sidebar.navDestinations.library"),e[58]=s,e[59]=ue):ue=e[59];let Ye;e[60]===Symbol.for("react.memo_cache_sentinel")?(Ye=n.jsx(_n,{"aria-hidden":"true"}),e[60]=Ye):Ye=e[60];let me;e[61]!==$||e[62]!==ue?(me={key:"library",label:ue,icon:Ye,to:ne.library,params:$},e[61]=$,e[62]=ue,e[63]=me):me=e[63];let fe;e[64]!==s?(fe=s("sidebar.navDestinations.discover"),e[64]=s,e[65]=fe):fe=e[65];let Qe;e[66]===Symbol.for("react.memo_cache_sentinel")?(Qe=n.jsx(Pn,{"aria-hidden":"true"}),e[66]=Qe):Qe=e[66];let he;e[67]!==$||e[68]!==fe?(he={key:"discover",label:fe,icon:Qe,to:ne.discover,params:$},e[67]=$,e[68]=fe,e[69]=he):he=e[69];let Xe;e[70]!==H||e[71]!==Q||e[72]!==de||e[73]!==me||e[74]!==he?(Xe=[H,Q,de,me,he],e[70]=H,e[71]=Q,e[72]=de,e[73]=me,e[74]=he,e[75]=Xe):Xe=e[75];const at=Xe;T=Dn,k=o,e[76]!==g||e[77]!==r?(_=C=>C?r(!0):g(),e[76]=g,e[77]=r,e[78]=_):_=e[78],e[79]!==s?(N=s("commandPalette.title"),e[79]=s,e[80]=N):N=e[80],e[81]!==s?(P=s("commandPalette.description"),e[81]=s,e[82]=P):P=e[82];let ge;e[83]!==s?(ge=s("commandPalette.placeholder"),e[83]=s,e[84]=ge):ge=e[84];let pe;e[85]!==s?(pe=s("commandPalette.placeholder"),e[85]=s,e[86]=pe):pe=e[86],e[87]!==ge||e[88]!==pe||e[89]!==h?(E=n.jsx(Rn,{placeholder:ge,"aria-label":pe,value:h,onValueChange:w}),e[87]=ge,e[88]=pe,e[89]=h,e[90]=E):E=e[90],b=Mn;let ye;e[91]!==s?(ye=s("commandPalette.empty"),e[91]=s,e[92]=ye):ye=e[92],e[93]!==ye?(I=n.jsx(Fn,{children:ye}),e[93]=ye,e[94]=I):I=e[94];let be;e[95]!==s?(be=s("commandPalette.goTo"),e[95]=s,e[96]=be):be=e[96];let xe;e[97]!==at||e[98]!==d||e[99]!==a?(xe=at.map(C=>n.jsxs(se,{onSelect:()=>d(()=>a({to:C.to,params:C.params}),"destination"),children:[C.icon,n.jsx("span",{children:C.label})]},C.key)),e[97]=at,e[98]=d,e[99]=a,e[100]=xe):xe=e[100],e[101]!==be||e[102]!==xe?(O=n.jsx(Be,{heading:be,children:xe}),e[101]=be,e[102]=xe,e[103]=O):O=e[103],e[104]!==d||e[105]!==m||e[106]!==a||e[107]!==i.slug||e[108]!==c||e[109]!==s?(D=m&&n.jsx(Be,{heading:s("commandPalette.projects"),children:c.map(C=>n.jsxs(se,{value:`project ${C.title}`,onSelect:()=>d(()=>a({to:ne.projects,params:{org:i.slug,agentId:C.id}}),"project"),children:[n.jsx(Kn,{icon:C.icon,name:C.title,"aria-hidden":"true"}),n.jsx("span",{children:C.title})]},C.id))}),e[104]=d,e[105]=m,e[106]=a,e[107]=i.slug,e[108]=c,e[109]=s,e[110]=D):D=e[110];let Se;e[111]!==s?(Se=s("commandPalette.actions"),e[111]=s,e[112]=Se):Se=e[112];let we;e[113]!==s?(we=s("commandPalette.newProject"),e[113]=s,e[114]=we):we=e[114];let ve;e[115]!==d||e[116]!==a||e[117]!==$?(ve=()=>d(()=>a({to:ne.home,params:$}),"new_project"),e[115]=d,e[116]=a,e[117]=$,e[118]=ve):ve=e[118];let Ze;e[119]===Symbol.for("react.memo_cache_sentinel")?(Ze=n.jsx(xt,{"aria-hidden":"true"}),e[119]=Ze):Ze=e[119];let je;e[120]!==s?(je=s("commandPalette.newProject"),e[120]=s,e[121]=je):je=e[121];let ke;e[122]!==je?(ke=n.jsx("span",{children:je}),e[122]=je,e[123]=ke):ke=e[123];let Te;e[124]!==we||e[125]!==ve||e[126]!==ke?(Te=n.jsxs(se,{value:we,onSelect:ve,children:[Ze,ke]}),e[124]=we,e[125]=ve,e[126]=ke,e[127]=Te):Te=e[127];let Ne;e[128]!==s?(Ne=s("commandPalette.inviteTeammate"),e[128]=s,e[129]=Ne):Ne=e[129];let _e;e[130]!==d||e[131]!==a||e[132]!==$?(_e=()=>d(()=>a({to:"/$org/settings/members",params:$}),"invite"),e[130]=d,e[131]=a,e[132]=$,e[133]=_e):_e=e[133];let et;e[134]===Symbol.for("react.memo_cache_sentinel")?(et=n.jsx(An,{"aria-hidden":"true"}),e[134]=et):et=e[134];let Pe;e[135]!==s?(Pe=s("commandPalette.inviteTeammate"),e[135]=s,e[136]=Pe):Pe=e[136];let Ae;e[137]!==Pe?(Ae=n.jsx("span",{children:Pe}),e[137]=Pe,e[138]=Ae):Ae=e[138];let Ee;e[139]!==Ne||e[140]!==_e||e[141]!==Ae?(Ee=n.jsxs(se,{value:Ne,onSelect:_e,children:[et,Ae]}),e[139]=Ne,e[140]=_e,e[141]=Ae,e[142]=Ee):Ee=e[142];let Ce;e[143]!==s?(Ce=s("commandPalette.addConnection"),e[143]=s,e[144]=Ce):Ce=e[144];let Oe;e[145]!==d||e[146]!==a||e[147]!==$?(Oe=()=>d(()=>a({to:"/$org/settings/connections",params:$,search:{tab:"all"}}),"add_connection"),e[145]=d,e[146]=a,e[147]=$,e[148]=Oe):Oe=e[148];let tt;e[149]===Symbol.for("react.memo_cache_sentinel")?(tt=n.jsx(xt,{"aria-hidden":"true"}),e[149]=tt):tt=e[149];let Ie;e[150]!==s?(Ie=s("commandPalette.addConnection"),e[150]=s,e[151]=Ie):Ie=e[151];let $e;e[152]!==Ie?($e=n.jsx("span",{children:Ie}),e[152]=Ie,e[153]=$e):$e=e[153];let Le;e[154]!==Ce||e[155]!==Oe||e[156]!==$e?(Le=n.jsxs(se,{value:Ce,onSelect:Oe,children:[tt,$e]}),e[154]=Ce,e[155]=Oe,e[156]=$e,e[157]=Le):Le=e[157];let De;e[158]!==s?(De=s("commandPalette.settings"),e[158]=s,e[159]=De):De=e[159];let Re;e[160]!==d||e[161]!==a||e[162]!==$?(Re=()=>d(()=>a({to:"/$org/settings/general",params:$}),"settings"),e[160]=d,e[161]=a,e[162]=$,e[163]=Re):Re=e[163];let nt;e[164]===Symbol.for("react.memo_cache_sentinel")?(nt=n.jsx(Ln,{"aria-hidden":"true"}),e[164]=nt):nt=e[164];let Me;e[165]!==s?(Me=s("commandPalette.settings"),e[165]=s,e[166]=Me):Me=e[166];let Fe;e[167]!==Me?(Fe=n.jsx("span",{children:Me}),e[167]=Me,e[168]=Fe):Fe=e[168];let ze;e[169]!==De||e[170]!==Re||e[171]!==Fe?(ze=n.jsxs(se,{value:De,onSelect:Re,children:[nt,Fe]}),e[169]=De,e[170]=Re,e[171]=Fe,e[172]=ze):ze=e[172],e[173]!==Se||e[174]!==Te||e[175]!==Ee||e[176]!==Le||e[177]!==ze?(A=n.jsxs(Be,{heading:Se,children:[Te,Ee,Le,ze]}),e[173]=Se,e[174]=Te,e[175]=Ee,e[176]=Le,e[177]=ze,e[178]=A):A=e[178],F=K.length>0&&n.jsx(Be,{heading:s("commandPalette.connections"),children:K.map(C=>n.jsxs(se,{value:`${C.title} ${C.id}`,keywords:v,onSelect:()=>d(()=>y(C),"connection"),children:[n.jsx(zn,{icon:C.icon,name:C.title,size:"2xs","aria-hidden":"true"}),n.jsx("span",{className:"truncate",children:C.title})]},`connection:${C.id}`))}),j=q.length>0&&n.jsx(Be,{heading:s("commandPalette.results"),children:q.map(C=>n.jsxs(se,{value:`${C.title} ${C.id}`,keywords:v,onSelect:()=>d(()=>y(C),C.type),children:[C.type==="thread"?n.jsx(kn,{"aria-hidden":"true"}):n.jsx(yt,{"aria-hidden":"true"}),n.jsx("span",{className:"truncate",children:C.title}),C.type==="task"&&C.key&&n.jsx("span",{className:"ml-auto shrink-0 font-mono text-xs text-muted-foreground",children:C.key})]},`${C.type}:${C.id}`))}),e[10]=g,e[11]=d,e[12]=m,e[13]=p,e[14]=a,e[15]=r,e[16]=o,e[17]=y,e[18]=i.slug,e[19]=c,e[20]=v,e[21]=s,e[22]=h,e[23]=b,e[24]=T,e[25]=j,e[26]=k,e[27]=_,e[28]=N,e[29]=P,e[30]=E,e[31]=I,e[32]=O,e[33]=D,e[34]=A,e[35]=F}else b=e[23],T=e[24],j=e[25],k=e[26],_=e[27],N=e[28],P=e[29],E=e[30],I=e[31],O=e[32],D=e[33],A=e[34],F=e[35];let z;e[179]!==b||e[180]!==j||e[181]!==I||e[182]!==O||e[183]!==D||e[184]!==A||e[185]!==F?(z=n.jsxs(b,{children:[I,O,D,A,F,j]}),e[179]=b,e[180]=j,e[181]=I,e[182]=O,e[183]=D,e[184]=A,e[185]=F,e[186]=z):z=e[186];let Z;return e[187]!==T||e[188]!==k||e[189]!==_||e[190]!==N||e[191]!==P||e[192]!==E||e[193]!==z?(Z=n.jsxs(T,{open:k,onOpenChange:_,title:N,description:P,children:[E,z]}),e[187]=T,e[188]=k,e[189]=_,e[190]=N,e[191]=P,e[192]=E,e[193]=z,e[194]=Z):Z=e[194],Z}function Us(t){return t.type!=="connection"}function Gs(t){return t.type==="connection"}const Ge=new Jn(!1);function Js(){Ge.set(!0)}function Vs(){Ge.set(!1)}function Ws(){const t=R.c(2),e=X.useSyncExternalStore(Ge.subscribe,Ge.get);let o;return t[0]!==e?(o=[e,Ge.set],t[0]=e,t[1]=o):o=t[1],o}const Ys=300*1e3,Qs=2;function Xs(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 Zs(t,e){return t.count>=Qs&&t.version!==null&&t.version!==e}function eo(){const t=R.c(31),e=J();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={queryKey:We.appVersionCheck(),queryFn:no,refetchInterval:Ys,refetchIntervalInBackground:!0,staleTime:0},t[0]=o):o=t[0];const{data:r,dataUpdatedAt:s}=qe(o),[a,i]=X.useState(0);let c;t[1]===Symbol.for("react.memo_cache_sentinel")?(c={version:null,count:0},t[1]=c):c=t[1];const[m,h]=X.useState(c);s!==a&&(i(s),h(k=>Xs(k,r,"4.523.1")));const[w,u]=X.useState(null);if(!Zs(m,w))return null;let p;t[2]!==e?(p=e("announcements.version.ariaLabel"),t[2]=e,t[3]=p):p=t[3];let l;t[4]!==e?(l=e("announcements.version.dismiss"),t[4]=e,t[5]=l):l=t[5];let g;t[6]!==e?(g=e("announcements.version.eyebrow"),t[6]=e,t[7]=g):g=t[7];let f;t[8]!==e?(f=e("announcements.version.title"),t[8]=e,t[9]=f):f=t[9];let d;t[10]!==e?(d=e("announcements.version.description"),t[10]=e,t[11]=d):d=t[11];let S;t[12]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(gt,{size:16}),t[12]=S):S=t[12];let y;t[13]!==m.version?(y=()=>u(m.version),t[13]=m.version,t[14]=y):y=t[14];let x;t[15]!==e?(x=e("announcements.version.currentSession",{version:"4.523.1"}),t[15]=e,t[16]=x):x=t[16];let v;t[17]!==e?(v=e("announcements.version.refresh"),t[17]=e,t[18]=v):v=t[18];let b;t[19]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx(gt,{size:14}),t[19]=b):b=t[19];let T;t[20]!==v?(T=n.jsxs(M,{size:"sm",onClick:to,children:[v,b]}),t[20]=v,t[21]=T):T=t[21];let j;return t[22]!==T||t[23]!==p||t[24]!==l||t[25]!==g||t[26]!==f||t[27]!==d||t[28]!==y||t[29]!==x?(j=n.jsx(Rt,{ariaLabel:p,dismissLabel:l,eyebrow:g,title:f,description:d,icon:S,tone:"system",onDismiss:y,footerLeading:x,actions:T}),t[22]=T,t[23]=p,t[24]=l,t[25]=g,t[26]=f,t[27]=d,t[28]=y,t[29]=x,t[30]=j):j=t[30],j}function to(){return window.location.reload()}async function no(){const t=await fetch("/api/config",{cache:"no-store"}),{config:e}=await t.json();return e.version}function so(t){return{has(){try{return localStorage.getItem(t)==="1"}catch{return!1}},mark(){try{localStorage.setItem(t,"1")}catch{}}}}const oo=Date.parse("2026-07-21T00:00:00Z"),kt=t=>so(Ve.ptBrAnnouncementSeen(t));function io(){const t=R.c(35),e=J(),[o,r]=tn(),{data:s,isPending:a}=Je.useSession(),i=s?.user,c=i?.id,m=i?.createdAt,h=m!=null&&new Date(m).getTime()<oo,w=nn()==="pt-BR",u=!a&&!!c&&h&&w&&o.language==="en"&&!kt(c).has(),[p,l]=X.useState(!1),[g,f]=X.useState(!1);!p&&!a&&(l(!0),u&&c&&(kt(c).mark(),r(ro),f(!0),lt("pt_br_auto_switch_shown")));let d;t[0]===Symbol.for("react.memo_cache_sentinel")?(d=Z=>{lt("pt_br_auto_switch_closed",{action:Z}),f(!1)},t[0]=d):d=t[0];const S=d;let y;t[1]!==r?(y=()=>{r(ao),S("switch-back")},t[1]=r,t[2]=y):y=t[2];const x=y;let v;t[3]===Symbol.for("react.memo_cache_sentinel")?(v=Z=>!Z&&S("dismiss"),t[3]=v):v=t[3];let b;t[4]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx("div",{className:"text-4xl","aria-hidden":"true",children:"🇧🇷"}),t[4]=b):b=t[4];let T;t[5]!==e?(T=e("announcements.ptBr.title"),t[5]=e,t[6]=T):T=t[6];let j;t[7]!==T?(j=n.jsx(Pt,{children:T}),t[7]=T,t[8]=j):j=t[8];let k;t[9]!==e?(k=e("announcements.ptBr.description"),t[9]=e,t[10]=k):k=t[10];let _;t[11]!==k?(_=n.jsx(sn,{children:k}),t[11]=k,t[12]=_):_=t[12];let N;t[13]!==j||t[14]!==_?(N=n.jsxs(_t,{children:[j,_]}),t[13]=j,t[14]=_,t[15]=N):N=t[15];let P;t[16]!==e?(P=e("announcements.ptBr.switchBack"),t[16]=e,t[17]=P):P=t[17];let E;t[18]!==x||t[19]!==P?(E=n.jsx(M,{variant:"outline",onClick:x,children:P}),t[18]=x,t[19]=P,t[20]=E):E=t[20];let I;t[21]===Symbol.for("react.memo_cache_sentinel")?(I=()=>S("ok"),t[21]=I):I=t[21];let O;t[22]!==e?(O=e("announcements.ptBr.ok"),t[22]=e,t[23]=O):O=t[23];let D;t[24]!==O?(D=n.jsx(M,{onClick:I,children:O}),t[24]=O,t[25]=D):D=t[25];let A;t[26]!==E||t[27]!==D?(A=n.jsxs(on,{children:[E,D]}),t[26]=E,t[27]=D,t[28]=A):A=t[28];let F;t[29]!==A||t[30]!==N?(F=n.jsxs(At,{className:"sm:max-w-md",children:[b,N,A]}),t[29]=A,t[30]=N,t[31]=F):F=t[31];let z;return t[32]!==g||t[33]!==F?(z=n.jsx(Et,{open:g,onOpenChange:v,children:F}),t[32]=g,t[33]=F,t[34]=z):z=t[34],z}function ao(t){return{...t,language:"en"}}function ro(t){return{...t,language:"pt-BR"}}function lo(t){const e=an(t);return typeof e=="string"?e:void 0}function co(){return lo("experiment-pipeline-check"),null}function uo(t){const e=R.c(1),{activeOrg:o}=t;if(!o)return null;rn(o.id,{name:o.name??void 0,slug:o.slug??void 0}),ln();let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(co,{}),e[0]=r):r=e[0],r}function mo(t){const{prev:e,virtualMcpId:o,decopilotId:r,savedLayout:s,opts:a,autosendValue:i}=t,c={mainpanel:void 0};o?c.virtualmcpid=o:e.virtualmcpid&&(c.virtualmcpid=e.virtualmcpid);const m=typeof e.virtualmcpid=="string"?e.virtualmcpid:r,w=(o??m)!==m;let u,p;return a?.panel?p=a.panel:a?.newThread&&!w&&cn(e.tabId)?(p=e.tabId,c.mainpanel=e.mainpanel,u=e.sidepanel):s?(p=s.tab,s.sidepanel!==void 0&&(u=s.sidepanel),s.mainpanel!==void 0&&(c.mainpanel=s.mainpanel)):!w&&e.tabId&&!dn(e.tabId)&&(p=e.tabId),u!==void 0&&(c.sidepanel=u),a?.autosend&&(c.autosend=i),{tabId:p,search:c}}const Ht="studio:thread-layout:v4",fo=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 ho(t,e,o,r=fo){const s=t.filter(([a])=>a!==e);for(s.push([e,Ut(o)]);s.length>r;)s.shift();return s}function mt(){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 go(t,e){t&&Gt(ho(mt(),t,e))}function po(t){if(!t)return null;const e=mt().find(([o])=>o===t);return e?Ut(e[1]):null}function si(t){if(!t)return;const e=mt(),o=e.filter(([r])=>r!==t);o.length!==e.length&&Gt(o)}function Jt(t){return{queryKey:We.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 oi(t){const e=R.c(10);let o;e[0]!==t?(o=Jt(t),e[0]=t,e[1]=o):o=e[1];const r=qe(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 yo(t){const e=R.c(31),{orgSlug:o,orgName:r,domain:s}=t,a=J();let i;e[0]!==o?(i=()=>{window.location.href=`/api/${encodeURIComponent(o)}/sso/authorize`},e[0]=o,e[1]=i):i=e[1];const c=i,m=bo;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 u;e[5]!==w?(u=n.jsx("h3",{className:"text-lg font-medium",children:w}),e[5]=w,e[6]=u):u=e[6];let p;e[7]!==s||e[8]!==r||e[9]!==a?(p=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]=p):p=e[10];let l;e[11]!==p?(l=n.jsx("p",{className:"text-sm text-muted-foreground",children:p}),e[11]=p,e[12]=l):l=e[12];let g;e[13]!==u||e[14]!==l?(g=n.jsxs("div",{className:"space-y-2",children:[u,l]}),e[13]=u,e[14]=l,e[15]=g):g=e[15];let f;e[16]!==a?(f=a("common.ssoRequiredScreen.signInWithSso"),e[16]=a,e[17]=f):f=e[17];let d;e[18]!==c||e[19]!==f?(d=n.jsx(M,{onClick:c,children:f}),e[18]=c,e[19]=f,e[20]=d):d=e[20];let S;e[21]!==a?(S=a("common.goBack"),e[21]=a,e[22]=S):S=e[22];let y;e[23]!==S?(y=n.jsx(M,{variant:"ghost",onClick:m,children:S}),e[23]=S,e[24]=y):y=e[24];let x;e[25]!==y||e[26]!==d?(x=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[d,y]}),e[25]=y,e[26]=d,e[27]=x):x=e[27];let v;return e[28]!==x||e[29]!==g?(v=n.jsxs(le,{children:[h,g,x]}),e[28]=x,e[29]=g,e[30]=v):v=e[30],v}function bo(){window.location.href="/"}function xo(t){const e=R.c(27),{notice:o,orgSlug:r}=t,s=J();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(un,{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 c;e[3]!==o.message?(c=n.jsx("p",{className:"text-sm text-muted-foreground whitespace-pre-line",children:o.message}),e[3]=o.message,e[4]=c):c=e[4];let m;e[5]!==i||e[6]!==c?(m=n.jsxs("div",{className:"space-y-2",children:[i,c]}),e[5]=i,e[6]=c,e[7]=m):m=e[7];let h;e[8]!==o.ctaLabel||e[9]!==o.ctaUrl?(h=o.ctaUrl&&o.ctaLabel?n.jsx(M,{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 u;e[11]!==s?(u=s("common.blockedOrgScreen.goToBilling"),e[11]=s,e[12]=u):u=e[12];let p;e[13]!==w||e[14]!==u?(p=n.jsx(M,{variant:"outline",asChild:!0,children:n.jsx("a",{href:w,children:u})}),e[13]=w,e[14]=u,e[15]=p):p=e[15];let l;e[16]!==s?(l=s("common.blockedOrgScreen.switchOrg"),e[16]=s,e[17]=l):l=e[17];let g;e[18]!==l?(g=n.jsx(M,{variant:"ghost",asChild:!0,children:n.jsx("a",{href:"/",children:l})}),e[18]=l,e[19]=g):g=e[19];let f;e[20]!==g||e[21]!==h||e[22]!==p?(f=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[h,p,g]}),e[20]=g,e[21]=h,e[22]=p,e[23]=f):f=e[23];let d;return e[24]!==f||e[25]!==m?(d=n.jsxs(le,{children:[a,m,f]}),e[24]=f,e[25]=m,e[26]=d):d=e[26],d}function So(t){const e=R.c(8);let o;e[0]!==t?(o=We.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],qe(a)}const wo="/settings/infra-billing";function vo(t){return(t.endsWith("/")?t.slice(0,-1):t).endsWith(wo)}function jo(t){const e=R.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(bn,{org:o,project:a,children:r}),e[3]=r,e[4]=o,e[5]=a,e[6]=i):i=e[6],i}function ko(){const t=Ct(),e=Vn(),{org:o}=ut(),r=mn({strict:!1}),s=Dt(),{openPanel:a,closePanel:i}=In(),c=Qn(),m=Xn(),h=Zn(),w=es(),u=(f,d=!0)=>t({to:".",search:f,replace:d}),p=()=>u(f=>({...f,sidepanel:!0})),l=(f,d,S)=>{const y=!!m&&m===f;m&&!y&&go(m,{tab:s,mainpanel:r.mainpanel,sidepanel:r.sidepanel});const x=y?null:po(f),v=It(o.id).id,b=mo({prev:{virtualmcpid:c,tabId:s,mainpanel:r.mainpanel,sidepanel:r.sidepanel},virtualMcpId:d,decopilotId:v,savedLayout:x,opts:S,autosendValue:Yn});return w(f,()=>b.search,{virtualMcpId:d,view:{tabId:b.tabId}})};return{openSidePanel:p,setTaskId:l,createNewTask:async(f,d,S)=>{const y=crypto.randomUUID(),x=f??h;try{await e?.create({id:y,virtual_mcp_id:x,...d?{branch:d}:{}})}catch{}l(y,x,{...S,newThread:!0})},openTab:a,closeTab:i}}const To=new Set(["/$org/","/$org/home"]);function No(){const t=R.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e={select:_o},t[0]=e):e=t[0],$t(e)}function _o(t){const e=t.matches.at(-1)?.fullPath;return e!==void 0&&To.has(e)}function Po(){const t=R.c(53);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org",shouldThrow:!1},t[0]=e):e=t[0];const r=fn(e)?.params.org,[s,a]=X.useState(!1),[i,c]=Ws(),[m,h]=Hn(),w=hn(),u=No(),p=r??"";let l;t[1]!==p?(l=Jt(p),t[1]=p,t[2]=l):l=t[2];const g=!!r&&u;let f;t[3]!==l||t[4]!==g?(f={...l,enabled:g},t[3]=l,t[4]=g,t[5]=f):f=t[5],qe(f);const{data:d}=Je.useSession(),S=d?.user?.id;let y,x;t[6]!==w?(y=()=>{const L=B=>{if(vt(B)&&B.code==="KeyK"){B.preventDefault(),Js();return}if(B.key==="?"&&!Ms(B.target)){B.preventDefault(),a(!0);return}vt(B)&&B.code==="BracketLeft"&&w.history.canGoBack()&&(B.preventDefault(),w.history.back())};return document.addEventListener("keydown",L),()=>document.removeEventListener("keydown",L)},x=[w],t[6]=w,t[7]=y,t[8]=x):(y=t[7],x=t[8]),X.useEffect(y,x);let v;t[9]!==r||t[10]!==S?(v=gn(r,S),t[9]=r,t[10]=S,t[11]=v):v=t[11];const{data:b}=Nt(v),T=b?.id,j=b?.slug,{data:k}=ts(T,j),_=!!k?.ssoRequired&&!k.authenticated,{data:N}=So(j);let P;t[12]===Symbol.for("react.memo_cache_sentinel")?(P={select:Ao},t[12]=P):P=t[12];const E=$t(P),I=N?.severity==="block"&&!vo(E),O=T??"",D=j??"";let A;t[13]!==D||t[14]!==O?(A=Bn({connectionId:Ot,orgId:O,orgSlug:D}),t[13]=D,t[14]=O,t[15]=A):A=t[15];const F=!!T&&!!j;let z;if(t[16]!==A||t[17]!==F?(z={...A,enabled:F},t[16]=A,t[17]=F,t[18]=z):z=t[18],qe(z),(!b||pt(b)||_||I)&&Vs(),!b){let L;return t[19]!==r?(L=n.jsx(ms,{orgSlug:r}),t[19]=r,t[20]=L):L=t[20],L}if(pt(b)){localStorage.getItem(Ve.lastOrgSlug())===r&&localStorage.removeItem(Ve.lastOrgSlug());let L;return t[21]!==b.name?(L=n.jsx(pn,{orgName:b.name}),t[21]=b.name,t[22]=L):L=t[22],L}if(I&&N){let L;return t[23]!==b.slug||t[24]!==N?(L=n.jsx(xo,{notice:N,orgSlug:b.slug}),t[23]=b.slug,t[24]=N,t[25]=L):L=t[25],L}if(_){let L;return t[26]!==b.id||t[27]!==b.name||t[28]!==b.slug||t[29]!==k.domain?(L=n.jsx(yo,{orgId:b.id,orgSlug:b.slug,orgName:b.name,domain:k.domain}),t[26]=b.id,t[27]=b.name,t[28]=b.slug,t[29]=k.domain,t[30]=L):L=t[30],L}const K=b.logo??null;let q;t[31]!==b||t[32]!==K?(q={...b,logo:K},t[31]=b,t[32]=K,t[33]=q):q=t[33];let V;t[34]!==b?(V=n.jsx(uo,{activeOrg:b}),t[34]=b,t[35]=V):V=t[35];let $;t[36]===Symbol.for("react.memo_cache_sentinel")?($=n.jsx(yn,{}),t[36]=$):$=t[36];let W;t[37]===Symbol.for("react.memo_cache_sentinel")?(W=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(Ls,{}),n.jsx(eo,{})]}),t[37]=W):W=t[37];let Y;t[38]!==i||t[39]!==c?(Y=i&&n.jsx(Hs,{open:i,onOpenChange:c}),t[38]=i,t[39]=c,t[40]=Y):Y=t[40];let H;t[41]!==m||t[42]!==h?(H=m&&n.jsx(Un,{open:!0,onOpenChange:h,source:Gn()}),t[41]=m,t[42]=h,t[43]=H):H=t[43];let U;t[44]!==s?(U=n.jsx(Fs,{open:s,onOpenChange:a}),t[44]=s,t[45]=U):U=t[45];let ee;t[46]===Symbol.for("react.memo_cache_sentinel")?(ee=n.jsx(io,{}),t[46]=ee):ee=t[46];let Q;return t[47]!==q||t[48]!==V||t[49]!==Y||t[50]!==H||t[51]!==U?(Q=n.jsxs(jo,{org:q,children:[V,$,W,Y,H,U,ee]}),t[47]=q,t[48]=V,t[49]=Y,t[50]=H,t[51]=U,t[52]=Q):Q=t[52],Q}function Ao(t){return t.location.pathname}function Eo(){const t=R.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Wn,{children:n.jsx(Po,{})}),t[0]=e):e=t[0],e}const ii=Object.freeze(Object.defineProperty({__proto__:null,default:Eo,usePanelActions:ko},Symbol.toStringTag,{value:"Module"}));export{G as K,fs as L,ko as a,vt as b,js as c,oi as d,Ms as e,si as f,ii as g,zt as i,Js as o,ti as r,ni as s,So as u};
|