decocms 4.604.0 → 4.605.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/{AlertCircle-DOl7I58f.js → AlertCircle-BodtFcwa.js} +1 -1
- package/dist/client/assets/{AreaChart-CHROtZD-.js → AreaChart-CjbFb_L6.js} +1 -1
- package/dist/client/assets/{ArrowLeft-BmWvQCuj.js → ArrowLeft-DgzOetZ9.js} +1 -1
- package/dist/client/assets/{ArrowRight-hKo-D3nP.js → ArrowRight-aDVZWC-C.js} +1 -1
- package/dist/client/assets/{ArrowUp-DjdsK6g2.js → ArrowUp-BYGtX-_f.js} +1 -1
- package/dist/client/assets/{BookOpen01-7rkhx8M3.js → BookOpen01-HlvgQjwt.js} +1 -1
- package/dist/client/assets/{CartesianChart-OsEP4Qzo.js → CartesianChart-CaDm2fjm.js} +1 -1
- package/dist/client/assets/{CategoricalChart-BnAT_zaF.js → CategoricalChart-sHldvFcC.js} +1 -1
- package/dist/client/assets/{CheckCircle-Dc3WHxxP.js → CheckCircle-Dah9jeY2.js} +1 -1
- package/dist/client/assets/{ChevronDown-DL6BIz5f.js → ChevronDown-CXawdj31.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-DG5kbzU4.js → ChevronSelectorVertical-Ch5nmynK.js} +1 -1
- package/dist/client/assets/{ChevronUp-raY54gH6.js → ChevronUp-x4csN1P_.js} +1 -1
- package/dist/client/assets/{CreditCard01-CbsMKYPA.js → CreditCard01-DNyFsaCV.js} +1 -1
- package/dist/client/assets/{Eye-C0HPiOiR.js → Eye-DteZLUM4.js} +1 -1
- package/dist/client/assets/{File02-Cq5pqf-S.js → File02-CC-U2Arr.js} +1 -1
- package/dist/client/assets/{Fingerprint04-CgjCScjZ.js → Fingerprint04-BvJCAFqB.js} +1 -1
- package/dist/client/assets/{Globe04-BNrVMBgu.js → Globe04-DVM4g6bL.js} +1 -1
- package/dist/client/assets/{Image01-B9u1sRLC.js → Image01-BhokHisl.js} +1 -1
- package/dist/client/assets/{Key01-CimmnNZ7.js → Key01-uSPI1gT_.js} +1 -1
- package/dist/client/assets/{LayoutLeft-DntDUImX.js → LayoutLeft-BxDKRvBF.js} +1 -1
- package/dist/client/assets/{LinkBroken01-CVzXRHEr.js → LinkBroken01-DXtz62mO.js} +1 -1
- package/dist/client/assets/{MessageCircle01-BhIvz7K8.js → MessageCircle01-B4UE40aX.js} +1 -1
- package/dist/client/assets/{Minus-2Ocru1Vv.js → Minus-BzXBzVF-.js} +1 -1
- package/dist/client/assets/{Monitor01-B6F_ox0H.js → Monitor01-C5ZEAMCm.js} +1 -1
- package/dist/client/assets/{Play-CXqP7dUq.js → Play-BjXL9p8F.js} +1 -1
- package/dist/client/assets/{Plus-C3X8_FHI.js → Plus-D3LlERXJ.js} +1 -1
- package/dist/client/assets/{ReferenceLine-NPuou87Q.js → ReferenceLine-Bc5LuluP.js} +1 -1
- package/dist/client/assets/{SearchMd-DhrULjIK.js → SearchMd-DnS7d9Ee.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-Bvv8RGv1.js → ShoppingBag01-D-D7_e-d.js} +1 -1
- package/dist/client/assets/{Sun-8WH0s68D.js → Sun-BMzx7_fZ.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-DgSPPtsf.js → SwitchHorizontal01-CNZW6LKe.js} +1 -1
- package/dist/client/assets/{Tool01-Behnzz1u.js → Tool01-BA13F6bw.js} +1 -1
- package/dist/client/assets/{Tooltip-Dc0P19dp.js → Tooltip-Dii1B-fM.js} +1 -1
- package/dist/client/assets/{Trash01-PZdGVeLy.js → Trash01-C1JB_HDr.js} +1 -1
- package/dist/client/assets/{Upload01-Bkeloppd.js → Upload01-CwC3e55G.js} +1 -1
- package/dist/client/assets/{UserCheck01-C_H-l_wV.js → UserCheck01-DywBSoK3.js} +1 -1
- package/dist/client/assets/{UserSquare-B41X0756.js → UserSquare-BzfdCQlh.js} +1 -1
- package/dist/client/assets/{Users01-DQ_THwqW.js → Users01-DndLVpMW.js} +1 -1
- package/dist/client/assets/{XClose-Bj-C863w.js → XClose-CcCbyQh_.js} +1 -1
- package/dist/client/assets/{Zap-BkyYaQsJ.js → Zap-Btccd9_S.js} +1 -1
- package/dist/client/assets/{access-gate-eWIkeT9E.js → access-gate-D5qI5wB4.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-NzJ7NedS.js → add-connection-dialog-Bnb6aupI.js} +1 -1
- package/dist/client/assets/agent-app-B9GB6fEl.js +1 -0
- package/dist/client/assets/{agent-assets-BbBAbjVC.js → agent-assets-B-rLBlTy.js} +1 -1
- package/dist/client/assets/{agent-automation-DCxEPkPB.js → agent-automation-BMU9KNaW.js} +1 -1
- package/dist/client/assets/{agent-automations-odNdy5iD.js → agent-automations-CIAtGC14.js} +1 -1
- package/dist/client/assets/{agent-blog-CScrLQSN.js → agent-blog-BruAd36b.js} +2 -2
- package/dist/client/assets/{agent-blog-post-h32FyYTX.js → agent-blog-post-ozyqXXfJ.js} +2 -2
- package/dist/client/assets/{agent-business-case-kU44KOYR.js → agent-business-case-C0zc7nTc.js} +1 -1
- package/dist/client/assets/{agent-calendar-BaQiRVwa.js → agent-calendar-C18_UufH.js} +1 -1
- package/dist/client/assets/{agent-capabilities-DvWcNy_n.js → agent-capabilities-BcU9kHgo.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-BlrAmQSh.js → agent-connect-sources-DYUlg0UE.js} +1 -1
- package/dist/client/assets/agent-deck-ChszJ4B8.js +1 -0
- package/dist/client/assets/{agent-e2e-rlhoyHNn.js → agent-e2e-BEXnNXca.js} +1 -1
- package/dist/client/assets/agent-experiments-BFPj5r86.js +1 -0
- package/dist/client/assets/agent-file-D-Wz10r1.js +1 -0
- package/dist/client/assets/{agent-hosting-xIODr6dk.js → agent-hosting-DtzRZLa6.js} +1 -1
- package/dist/client/assets/{agent-icon-CRYupZK6.js → agent-icon-BG1i7gmz.js} +1 -1
- package/dist/client/assets/agent-library-VzpziyQd.js +1 -0
- package/dist/client/assets/agent-library-file-B1D_eHhP.js +1 -0
- package/dist/client/assets/agent-overview-CSdXbhm3.js +1 -0
- package/dist/client/assets/{agent-releases-Ds8xMFb7.js → agent-releases-D1hqnO7h.js} +1 -1
- package/dist/client/assets/agent-settings-TZwg6GKA.js +1 -0
- package/dist/client/assets/agent-site-editor-code-BeTZbXtt.js +2 -0
- package/dist/client/assets/agent-site-editor-content-CsAYeYao.js +1 -0
- package/dist/client/assets/{agent-site-editor-BelQhrYx.js → agent-site-editor-pauq_N3M.js} +1 -1
- package/dist/client/assets/agent-site-editor-preview-CywvRqkg.js +1 -0
- package/dist/client/assets/agent-view-B-JpvHx2.js +1 -0
- package/dist/client/assets/{agent-view-guard-BAEBWQAm.js → agent-view-guard-C3B555p9.js} +1 -1
- package/dist/client/assets/{ai-providers-C-smMnWX.js → ai-providers-CdyxU1aA.js} +1 -1
- package/dist/client/assets/{alert-Bs4Syrmu.js → alert-Cu41JnRH.js} +1 -1
- package/dist/client/assets/{analytics-sections-Bawwr646.js → analytics-sections-D_EBoYd3.js} +1 -1
- package/dist/client/assets/{api-keys-U-JlvfTL.js → api-keys-C9NPLrPS.js} +1 -1
- package/dist/client/assets/api-keys-CWdWXFb8.js +1 -0
- package/dist/client/assets/{app-editor-WCrTicET.js → app-editor-BYo2sxJ4.js} +1 -1
- package/dist/client/assets/{asset-utils-DoL_7JcS.js → asset-utils-CQQKj4KP.js} +1 -1
- package/dist/client/assets/{auth-DGjdHSEc.js → auth-VFTZl0UB.js} +1 -1
- package/dist/client/assets/{auth-catchall-BWASEMo1.js → auth-catchall-AjsrlVu9.js} +1 -1
- package/dist/client/assets/{auth-entry-dIBGSy6P.js → auth-entry-EGyQ7lfC.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DDrzNH-L.js → auth-split-layout-8naxbL-2.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-CjHuO6dU.js → authenticate-and-persist-oauth-CkNJzR5A.js} +1 -1
- package/dist/client/assets/{automation-list-row-DcNq7Z4r.js → automation-list-row-CyKk1lZD.js} +1 -1
- package/dist/client/assets/{automation-runs-BC4l1zMu.js → automation-runs-CFCkwC0j.js} +1 -1
- package/dist/client/assets/{automations-Dc5cIs_X.js → automations-Dl-Dvtjk.js} +1 -1
- package/dist/client/assets/{badge-BGQjXG0j.js → badge-CE7YbwTl.js} +1 -1
- package/dist/client/assets/{block-document-CGUsaamm.js → block-document-BppzVZrG.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-BGA1iNqV.js → blocks-preview-workspace-context-PyxPfBnd.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-D1zjsV30.js → blocks-tab-states-CuLvvePK.js} +1 -1
- package/dist/client/assets/{blog-preview-url--uTbBsfv.js → blog-preview-url-0gexiswS.js} +1 -1
- package/dist/client/assets/{blog-schema-C6967KEc.js → blog-schema-BxBrPQZf.js} +1 -1
- package/dist/client/assets/{blog-source-gate-BXjDbubC.js → blog-source-gate-Kj-x0Y5Q.js} +1 -1
- package/dist/client/assets/{blog-view-gate-DsWcmH7R.js → blog-view-gate-D2LfYCHB.js} +1 -1
- package/dist/client/assets/{buckets-OSyRMTtV.js → buckets-Ci_C-byl.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-BQOPGw-y.js → build-improve-prompt-doc-DP9H3Qex.js} +1 -1
- package/dist/client/assets/{calendar-B6JrW2Q2.js → calendar-kDAoF41r.js} +1 -1
- package/dist/client/assets/{capability-load-error-42G-R10i.js → capability-load-error-Tn6fWbpS.js} +1 -1
- package/dist/client/assets/{category-editor-MmJTq52p.js → category-editor-CS5ulD2U.js} +1 -1
- package/dist/client/assets/{category-tree-ByM1arx3.js → category-tree-D2tyKDuY.js} +1 -1
- package/dist/client/assets/{chart-DQuSYpgP.js → chart-Byf4XQVN.js} +1 -1
- package/dist/client/assets/{chat-context-hCQ1mfTr.js → chat-context-DheRYNZa.js} +1 -1
- package/dist/client/assets/{chat-draft-BMedUjWc.js → chat-draft-DKmtgP4M.js} +1 -1
- package/dist/client/assets/{checkbox-gfRmCHgt.js → checkbox-I411NqYX.js} +1 -1
- package/dist/client/assets/{choose-editor-CyxpRT6n.js → choose-editor-DlarvvQ-.js} +1 -1
- package/dist/client/assets/{cli-auth-success-C2Sv7dRn.js → cli-auth-success--pONcgi1.js} +1 -1
- package/dist/client/assets/{cms-settings-editor-CBaVB0n1.js → cms-settings-editor-C7EucVm7.js} +1 -1
- package/dist/client/assets/{cms-store-drafts-BNUrt0he.js → cms-store-drafts-92haPQGD.js} +1 -1
- package/dist/client/assets/{collapsible-9A7TtF9U.js → collapsible-DwaxmoW1.js} +1 -1
- package/dist/client/assets/{collection-detail-BClDIo_j.js → collection-detail-SmQFH-qD.js} +1 -1
- package/dist/client/assets/{collection-display-button-B0r3Zm1X.js → collection-display-button-DuvAHqCY.js} +1 -1
- package/dist/client/assets/{collection-search-BO1f-lS0.js → collection-search-CGbA6B6M.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-Dydnztie.js → collection-table-wrapper-3it25vl7.js} +1 -1
- package/dist/client/assets/{collection-tabs-CdNYsFdX.js → collection-tabs-DltCAINe.js} +1 -1
- package/dist/client/assets/{combobox-CVSWURlo.js → combobox-CYpYC39f.js} +1 -1
- package/dist/client/assets/{command-B2QNmjQS.js → command-D5KKg7Po.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-BaMmvy2q.js → companion-mcps-section-BwxmUMIN.js} +1 -1
- package/dist/client/assets/{config-BREyAdNr.js → config-P-h3mlnU.js} +1 -1
- package/dist/client/assets/{connect-key-B0zKFgzW.js → connect-key-ukXJzEF6.js} +1 -1
- package/dist/client/assets/{connect-layout-rhUcxeLp.js → connect-layout-CzRgax0u.js} +1 -1
- package/dist/client/assets/{connect-BcWscn1t.js → connect-nUq612aL.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-D4HLTtef.js → connect-source-dialog-HdWrxtI3.js} +1 -1
- package/dist/client/assets/{connection-DZKAjgLL.js → connection-Dc06pK8f.js} +1 -1
- package/dist/client/assets/{connection-card-CmxtqmDv.js → connection-card-Bp8kpfAc.js} +1 -1
- package/dist/client/assets/{connection-detail-BLP0uW7Y.js → connection-detail-Bsa4T07R.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-DUSDhzNd.js → connection-form-helpers-9IiTX-RV.js} +1 -1
- package/dist/client/assets/{connection-slug-DJTdEjhG.js → connection-slug-BfMtrnxd.js} +1 -1
- package/dist/client/assets/{connections-DrdA1hf2.js → connections-DMCgaaZj.js} +1 -1
- package/dist/client/assets/{content-changes-BqXl80v8.js → content-changes-Dilm5O36.js} +1 -1
- package/dist/client/assets/{content-tab-BEf-lhCQ.js → content-tab-pPR3n-pk.js} +3 -3
- package/dist/client/assets/{context-CPurNnFb.js → context-DDJLQasP.js} +1 -1
- package/dist/client/assets/{context-menu-DweTBGtJ.js → context-menu-D_0JWbxu.js} +1 -1
- package/dist/client/assets/{context-shell-CWTDaTXc.js → context-shell-UYzArPpn.js} +3 -3
- package/dist/client/assets/{create-organization-dialog-C_3ruR8s.js → create-organization-dialog-Bnctzg-m.js} +1 -1
- package/dist/client/assets/{daily-pulse-Bcg8lP8r.js → daily-pulse-tvArjFu0.js} +1 -1
- package/dist/client/assets/{delete-copy-BGgLzwd2.js → delete-copy-Duz9BHwC.js} +1 -1
- package/dist/client/assets/{device-hint-DnbqoU71.js → device-hint-DEag8WwZ.js} +1 -1
- package/dist/client/assets/{discover-Dsw6AIzG.js → discover-DdUPAsXz.js} +1 -1
- package/dist/client/assets/{domain-settings-DjCfB1kU.js → domain-settings-CHK45Pfw.js} +1 -1
- package/dist/client/assets/{drawer-BNjWjF9M.js → drawer--kiS5dBn.js} +1 -1
- package/dist/client/assets/{editor-B0cDiaJa.js → editor-C1KY7pbs.js} +1 -1
- package/dist/client/assets/{editor-classes-C7OZWc8j.js → editor-classes-DpiMJloW.js} +1 -1
- package/dist/client/assets/{empty-state-CFi8rSdz.js → empty-state-C2fGsW3_.js} +1 -1
- package/dist/client/assets/{empty-state-TATcP6j6.js → empty-state-CKNJFM0g.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-DT0xlF2U.js → experiments-tab-choice-B9mDPy3T.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DBf70_By.js → extract-connection-data-Bbqi9tlA.js} +1 -1
- package/dist/client/assets/{feature-gate-ELdJQBJt.js → feature-gate-0i5hB25s.js} +1 -1
- package/dist/client/assets/{feature-paywall-D1djKiP_.js → feature-paywall-NMojxqZr.js} +1 -1
- package/dist/client/assets/{file-explorer-BW2uODO-.js → file-explorer-B4YpDjaM.js} +1 -1
- package/dist/client/assets/{file-preview-CUUPp-37.js → file-preview-D6CfQViG.js} +1 -1
- package/dist/client/assets/{file-share-button-CApR6POs.js → file-share-button-B2vaDTgQ.js} +1 -1
- package/dist/client/assets/{file-type-icon-CwbVdKyV.js → file-type-icon-CNhs2rM5.js} +1 -1
- package/dist/client/assets/{folder-icon-DXxFgD1Q.js → folder-icon-M6nLjZmy.js} +1 -1
- package/dist/client/assets/{form-Pa5TasVH.js → form-CzPbiwCk.js} +1 -1
- package/dist/client/assets/{frame-navigation-C7ZkDufj.js → frame-navigation-D3BFl5rC.js} +1 -1
- package/dist/client/assets/{gateway-client-Bys0ijDk.js → gateway-client-BVjB9G0S.js} +1 -1
- package/dist/client/assets/{general-Bh7AigA1.js → general-D5_o0sLN.js} +1 -1
- package/dist/client/assets/{github-icon-B__6ogZQ.js → github-icon-Dum7qGK9.js} +1 -1
- package/dist/client/assets/{held-block-view-DbLxQ9uU.js → held-block-view-Y8q8NQwP.js} +1 -1
- package/dist/client/assets/{home-GNj9GQN2.js → home-CP-V93PA.js} +1 -1
- package/dist/client/assets/{home-overview-D8MBYfsN.js → home-overview-gvFUR_9e.js} +1 -1
- package/dist/client/assets/{hosted-reconcile-D6Q09K-j.js → hosted-reconcile-C-7rKCsW.js} +1 -1
- package/dist/client/assets/{icon-button-QNTv5QKa.js → icon-button-DHp8_9LF.js} +1 -1
- package/dist/client/assets/{index-fkcdmHCO.js → index-BFDOeyWj.js} +1 -1
- package/dist/client/assets/{index-BuJZ15yz.js → index-BMZ0iqFK.js} +1 -1
- package/dist/client/assets/{index-IhqNI3vv.js → index-Bcg9QrdK.js} +1 -1
- package/dist/client/assets/{index-SpspP6ks.js → index-BfX-079M.js} +1 -1
- package/dist/client/assets/{index-MLF30Ige.js → index-CLY9DSuT.js} +1 -1
- package/dist/client/assets/{index-Dws-zNMb.js → index-CMOYwhXD.js} +3 -3
- package/dist/client/assets/{index-De0nOX9a.js → index-CVJXgdNU.js} +1 -1
- package/dist/client/assets/{index-c8rWa20q.js → index-CcUHZJh_.js} +1 -1
- package/dist/client/assets/{index-BrKquY8S.js → index-CgKFiwIf.js} +1 -1
- package/dist/client/assets/{index-Bf4OrjgG.js → index-DHeyTtUa.js} +1 -1
- package/dist/client/assets/{index-CgGY_MUf.js → index-DQWDDBEh.js} +1 -1
- package/dist/client/assets/{index-Dn-dq-as.js → index-DWyOfEFs.js} +1 -1
- package/dist/client/assets/{index-Bu31SDiQ.js → index-DygnKuGF.js} +1 -1
- package/dist/client/assets/{index-C2oHODUV.js → index-DzFzFcy8.js} +1 -1
- package/dist/client/assets/{index-B1J4AkqW.js → index-FlVkgqB3.js} +1 -1
- package/dist/client/assets/{index-CnCdfGnF.js → index-bTk-uf2S.js} +1 -1
- package/dist/client/assets/{index-redirect-CKWg5EUm.js → index-redirect-DBi2Ms9H.js} +1 -1
- package/dist/client/assets/{index-_f9s6__b.js → index-sKHGQ8bA.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-BpNLIIMd.js → infiniteQueryObserver-CWkvrMky.js} +1 -1
- package/dist/client/assets/{infra-billing-BD3cfGA0.js → infra-billing-BL2eqgHh.js} +1 -1
- package/dist/client/assets/{input-BhEEornx.js → input-4eZkb8k7.js} +3 -3
- package/dist/client/assets/{input-D3Q9ceVY.js → input-Dywy3XfP.js} +1 -1
- package/dist/client/assets/{integration-icon-Dtv10prb.js → integration-icon-C2Up_E6S.js} +1 -1
- package/dist/client/assets/{item-actions-DkT2jQ2-.js → item-actions-DqwEF8yZ.js} +1 -1
- package/dist/client/assets/{jira-icon-BdyWZd_c.js → jira-icon-DOX7QGTN.js} +1 -1
- package/dist/client/assets/{label-DKw_OehI.js → label-Bww6rH3P.js} +1 -1
- package/dist/client/assets/{layout-BrYSk9r1.js → layout-B-4k0t5s.js} +1 -1
- package/dist/client/assets/{legacy-admin-welcome-dialog-DEMRqSrw.js → legacy-admin-welcome-dialog-B8zKoY6V.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-CgBlx1CF.js → legacy-agents-deep-BpacK6Ur.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-C1wo3-kp.js → legacy-main-redirect-C6lQumIx.js} +1 -1
- package/dist/client/assets/library-BPT6inpT.js +1 -0
- package/dist/client/assets/{library-tab-Dkg9kVd0.js → library-tab-EtzsJ1Jx.js} +1 -1
- package/dist/client/assets/{login-D6GGUA0-.js → login-CPxJ3_Su.js} +1 -1
- package/dist/client/assets/{markdown-I8GzTJiA.js → markdown-Bi25DZW_.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-DK2j0Tue.js → mcp-app-renderer-_y7Sc4cz.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BBOvXanh.js → mcp-oauth-BtlUP1pO.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CkvfyqHv.js → mcp-oauth-DTqz3wMv.js} +1 -1
- package/dist/client/assets/{members-B4o6EiqS.js → members-Cb4H-FJq.js} +1 -1
- package/dist/client/assets/{memory-Djy6FgRy.js → memory-BEOd7AZb.js} +1 -1
- package/dist/client/assets/{mock-board-Cpnf4v2l.js → mock-board-N4fziTJI.js} +3 -3
- package/dist/client/assets/{monaco-editor-xIopiH53.js → monaco-editor-BM7hKlAv.js} +1 -1
- package/dist/client/assets/{monitoring-CYlEmiQJ.js → monitoring-TgRk1dxf.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-C_1DRrgj.js → monitoring-stats-row-BEEQEqRT.js} +1 -1
- package/dist/client/assets/{multi-select-DtgGxgFU.js → multi-select-Cc4yf040.js} +1 -1
- package/dist/client/assets/{mustache-D-BETM-H.js → mustache-DUlmsVay.js} +1 -1
- package/dist/client/assets/{named-rule-step-CTOrHhtq.js → named-rule-step-K3CcxhyF.js} +1 -1
- package/dist/client/assets/{named-rule-view-Dqd8JDXo.js → named-rule-view-B9rNMjLf.js} +1 -1
- package/dist/client/assets/{new-project-dialog-By4VEC8c.js → new-project-dialog-e39xBQJC.js} +1 -1
- package/dist/client/assets/{new-project-store-CUdxp2Iq.js → new-project-store-CsdnPKbV.js} +1 -1
- package/dist/client/assets/{oauth-callback-3aGVKy0C.js → oauth-callback-BYJovxS4.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-ZYl2SIBX.js → oauth-callback-ai-provider-exavX_0Q.js} +1 -1
- package/dist/client/assets/{oauth-consent-DpgwsgKr.js → oauth-consent-C8hvHu-0.js} +1 -1
- package/dist/client/assets/{onboarding-DMrvJ-1o.js → onboarding-BlaowvYa.js} +1 -1
- package/dist/client/assets/{openai-conversation-FoZ_S--c.js → openai-conversation--MkAx84L.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-p1mhNVPC.js → optimistic-project-sidebar-views-BOQrFlQO.js} +1 -1
- package/dist/client/assets/{order-monitor-day-dq36PLvw.js → order-monitor-day-kmYzdtqG.js} +1 -1
- package/dist/client/assets/{organization-choice-DgqvLrXA.js → organization-choice-B-zd_KAX.js} +1 -1
- package/dist/client/assets/{orgs-DRJMoNSK.js → orgs-oaO_8QY5.js} +1 -1
- package/dist/client/assets/{own-accounts-section-DMwQVXvm.js → own-accounts-section-bypdWKM1.js} +1 -1
- package/dist/client/assets/{pair-DpQo0BNT.js → pair-Cemt435C.js} +1 -1
- package/dist/client/assets/{parse-sections-DXT317Uu.js → parse-sections-2nDwNbo9.js} +2 -2
- package/dist/client/assets/plan-OCKI8REL.js +1 -0
- package/dist/client/assets/{plan-ladder-CnLJjRvN.js → plan-ladder-9FSbsZ90.js} +1 -1
- package/dist/client/assets/{plan-page-DnL7Do53.js → plan-page-4ipv35o3.js} +1 -1
- package/dist/client/assets/{plan-usage-card-B34rpydZ.js → plan-usage-card-BZQRnP8G.js} +1 -1
- package/dist/client/assets/{popover-DYPQiSv-.js → popover-3vnisGas.js} +1 -1
- package/dist/client/assets/{post-calendar-Hw4CH9hh.js → post-calendar-rp2Q0Cne.js} +1 -1
- package/dist/client/assets/{post-editor-IcyR5Vhc.js → post-editor-D0JA7IdJ.js} +1 -1
- package/dist/client/assets/{preview-content-BAdlr8nf.js → preview-content-DEWZ8-QL.js} +1 -1
- package/dist/client/assets/{preview-dialog-KktCHUW7.js → preview-dialog-DTnbkcnt.js} +1 -1
- package/dist/client/assets/{preview-panel-CNDYDX6W.js → preview-panel-D7xxYiPP.js} +1 -1
- package/dist/client/assets/{preview-tab-B7EBuwmn.js → preview-tab-6sB-rRtC.js} +3 -3
- package/dist/client/assets/{primitives-BaWMtJkC.js → primitives-0TaeqUnu.js} +1 -1
- package/dist/client/assets/{product-picker-dialog-CxX3Naw5.js → product-picker-dialog-DxYLlxvO.js} +1 -1
- package/dist/client/assets/{profile-hGi6FGDf.js → profile-7B8EkJP4.js} +1 -1
- package/dist/client/assets/{project-app-view-Bdd69u96.js → project-app-view-D0Cj42bt.js} +1 -1
- package/dist/client/assets/{project-apps-Cg1RITYg.js → project-apps-ClncucSz.js} +1 -1
- package/dist/client/assets/{project-icon-CnIB282t.js → project-icon-BOqN9iGS.js} +1 -1
- package/dist/client/assets/{project-index-8q3yX-Uv.js → project-index-YBf8huk1.js} +1 -1
- package/dist/client/assets/project-reports-BLjEcb9u.js +1 -0
- package/dist/client/assets/project-tasks-B8Je1HsY.js +1 -0
- package/dist/client/assets/{projects-DUFVb_Eu.js → projects-BLn-8LM1.js} +1 -1
- package/dist/client/assets/{projects-empty-state-AcD2jgiE.js → projects-empty-state-B-KEGV2n.js} +1 -1
- package/dist/client/assets/{prompts-uwcT3BPA.js → prompts-DGsvCI2x.js} +1 -1
- package/dist/client/assets/record-editor-DQ4KAAEQ.js +1 -0
- package/dist/client/assets/{redirect-editor-DY-z2TOu.js → redirect-editor-TS2CsYRg.js} +1 -1
- package/dist/client/assets/reports-CNHr6m-v.js +1 -0
- package/dist/client/assets/{reports-D1w053nd.js → reports-CRuiHeGZ.js} +1 -1
- package/dist/client/assets/{reports-onboarding-GadOWDmM.js → reports-onboarding-DMv3jeqG.js} +1 -1
- package/dist/client/assets/{reports-tab-aeJlri8p.js → reports-tab-Bv0JG6qL.js} +2 -2
- package/dist/client/assets/{repositories-1nzckZN-.js → repositories-Cpl1g-Ko.js} +1 -1
- package/dist/client/assets/repositories-yt309Hzu.js +1 -0
- package/dist/client/assets/{repository-binding-CWC5A7qh.js → repository-binding-BiNVfbBv.js} +1 -1
- package/dist/client/assets/{repository-picker-D7iBCD48.js → repository-picker-Cd-PmC2o.js} +1 -1
- package/dist/client/assets/{require-capability-3oK6BlmT.js → require-capability-C2hCZcnC.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BZu2puaM.js → required-auth-layout-BmmWSkIy.js} +1 -1
- package/dist/client/assets/{reset-password-AIsPR66k.js → reset-password-Dff8ZPlR.js} +1 -1
- package/dist/client/assets/{resizable-CoEd5jC-.js → resizable-BjhtG9yT.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-C5OdYCvh.js → resolve-tab-icon-DXA13f0E.js} +1 -1
- package/dist/client/assets/{review-settings-Bl4aIl2S.js → review-settings-R42PKAM7.js} +1 -1
- package/dist/client/assets/{role-color-BCrv5q_m.js → role-color-BDZwLjyA.js} +1 -1
- package/dist/client/assets/{roles-DsDYBJkJ.js → roles-ABW_QEyF.js} +1 -1
- package/dist/client/assets/route-BEpgl_sU.js +1 -0
- package/dist/client/assets/{route-4dsNdFR2.js → route-DHUajtJx.js} +1 -1
- package/dist/client/assets/{route-tOhzLIKu.js → route-Dc9WBi8C.js} +1 -1
- package/dist/client/assets/{route-page-header-CNcRyRHi.js → route-page-header-BXGE6enK.js} +1 -1
- package/dist/client/assets/{sandbox-git-api--HjjhyJS.js → sandbox-git-api-ErB8jUx9.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-CRW6W9ms.js → sandbox-lifecycle-context-Ct_XfgIm.js} +1 -1
- package/dist/client/assets/{save-status-CgoD-OSr.js → save-status-DTq1bu6x.js} +1 -1
- package/dist/client/assets/{schema-Dd9rXy7Q.js → schema-BGVGnZwu.js} +1 -1
- package/dist/client/assets/{schema-DE06prrW.js → schema-CkSRwqRJ.js} +1 -1
- package/dist/client/assets/{scroll-area-yE4b8t8z.js → scroll-area-ClzBCgdN.js} +1 -1
- package/dist/client/assets/{search-input-BvwG9Gpz.js → search-input-Bo0uqwe-.js} +1 -1
- package/dist/client/assets/{search-toggle-wnRo19F5.js → search-toggle-BRau5xEg.js} +1 -1
- package/dist/client/assets/{secret-picker-C2R7R70s.js → secret-picker-D0n9Jwi0.js} +1 -1
- package/dist/client/assets/{secrets-DajbQRIu.js → secrets-BFL3lhbk.js} +1 -1
- package/dist/client/assets/{section-array-field-BSa-R005.js → section-array-field-Dpm3s7El.js} +1 -1
- package/dist/client/assets/{sections-TTZmo3Uk.js → sections-BQaXnbhd.js} +1 -1
- package/dist/client/assets/{sections-editor-BohUjqh9.js → sections-editor-CxkTMJ2B.js} +1 -1
- package/dist/client/assets/{select-DV3WaQz3.js → select-D37YvXxG.js} +1 -1
- package/dist/client/assets/{select-model-iXYRhSz0.js → select-model-T5CTSywR.js} +1 -1
- package/dist/client/assets/{seo-editor-CeAq3tF_.js → seo-editor-D7Dzvtbw.js} +1 -1
- package/dist/client/assets/{separator-CUTgb7jC.js → separator-W1Ytw6Rk.js} +1 -1
- package/dist/client/assets/{session-runtime-RbvUuwNa.js → session-runtime-S41xxwFW.js} +1 -1
- package/dist/client/assets/settings-tab-CCix6tDV.js +1 -0
- package/dist/client/assets/{sheet-L4HTwl4r.js → sheet-DCIpFtpL.js} +1 -1
- package/dist/client/assets/{shell-layout-C_SGZ8Vi.js → shell-layout-BhLm3ode.js} +1 -1
- package/dist/client/assets/{site-draft-actions-C6crz6qr.js → site-draft-actions-Caiw1yL8.js} +1 -1
- package/dist/client/assets/{site-draft-view-D1iHHLaq.js → site-draft-view-qY6zhziP.js} +1 -1
- package/dist/client/assets/site-editor-DNdaUyms.js +1 -0
- package/dist/client/assets/{site-editor-toast-BymLOidH.js → site-editor-toast-CP-wSW1F.js} +1 -1
- package/dist/client/assets/{skills-Cn593LLq.js → skills-4X8RWGvf.js} +1 -1
- package/dist/client/assets/{slider--vRmZyWu.js → slider-DwNcNhts.js} +1 -1
- package/dist/client/assets/{sortable.esm-CTCpd14C.js → sortable.esm-hazIEYqc.js} +1 -1
- package/dist/client/assets/{sso-DjJBDShv.js → sso-Dxa6I4YM.js} +1 -1
- package/dist/client/assets/{suggestion-BJmzO7o_.js → suggestion-B07rb2U_.js} +1 -1
- package/dist/client/assets/{super-agent-icon-DJgXomde.js → super-agent-icon-BS1zWxbv.js} +1 -1
- package/dist/client/assets/{switch-Df6W8JM9.js → switch-DcLJMUn8.js} +1 -1
- package/dist/client/assets/{synced-repos-ClA2yzHM.js → synced-repos-CJhn3IHR.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-BXcMIo0P.js → tab-icon-glyph-Bhavy4w9.js} +1 -1
- package/dist/client/assets/{table-W-puqNkZ.js → table-BJ-6z4Ka.js} +1 -1
- package/dist/client/assets/{tabs-CbftHH4j.js → tabs-kd1a9On_.js} +1 -1
- package/dist/client/assets/{task-board-nmvAE1np.js → task-board-8fcnKTrC.js} +1 -1
- package/dist/client/assets/{task-key-CttVN38p.js → task-key-VQg9Ju40.js} +1 -1
- package/dist/client/assets/{task-route-DZSYzo3l.js → task-route-L7m6ODZa.js} +1 -1
- package/dist/client/assets/{task-status-Bmh-WAjR.js → task-status-DTLTGOFU.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-BvcboYkx.js → taskboard-analytics-Ct0IjM7e.js} +1 -1
- package/dist/client/assets/tasks-1QjKeGd4.js +1 -0
- package/dist/client/assets/{tasks-ohHQM8n8.js → tasks-2k22R0vc.js} +1 -1
- package/dist/client/assets/{textarea-DiEPPUlb.js → textarea-hqqjHxii.js} +1 -1
- package/dist/client/assets/{thread-analytics-DYMj4eii.js → thread-analytics-BDoq_FPE.js} +1 -1
- package/dist/client/assets/{thread-button-CsQNPyA8.js → thread-button-CkhkITiW.js} +1 -1
- package/dist/client/assets/{thread-intent-Cpu3ihkE.js → thread-intent-DzUkMPY5.js} +1 -1
- package/dist/client/assets/{thread-route-DrRW7paz.js → thread-route-BRDDKbpn.js} +1 -1
- package/dist/client/assets/{thread-route-CfOc-Skq.js → thread-route-URWAxCjm.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-CUwl_XRe.js → thread-sheet-body-Bl5B_SDh.js} +1 -1
- package/dist/client/assets/{time-range-picker-hUiPtWcr.js → time-range-picker-D2mzSAw4.js} +1 -1
- package/dist/client/assets/{toggle-group-D4LrchJT.js → toggle-group-BdbLr32c.js} +1 -1
- package/dist/client/assets/{tool-set-selector-BaDWzQDx.js → tool-set-selector-B4tylXwF.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-B9KCgsM0.js → toolbar-icon-button-BnrqNtsd.js} +1 -1
- package/dist/client/assets/{tooltip-DlU94Hgw.js → tooltip-BPmKwLsN.js} +1 -1
- package/dist/client/assets/{tooltipContext-D60le1gJ.js → tooltipContext-2YdcjubR.js} +1 -1
- package/dist/client/assets/{track-CNDVG92Y.js → track-BaQRy_Qu.js} +1 -1
- package/dist/client/assets/{types-DFah_SNi.js → types-BWwlrwgL.js} +1 -1
- package/dist/client/assets/{url-slug-Cjk5fXnU.js → url-slug-BlC0E0S4.js} +1 -1
- package/dist/client/assets/{usage-stats-D5XufpdL.js → usage-stats-CCyrHbOC.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CZZKXVB1.js → use-ai-providers-BS3OOjFt.js} +1 -1
- package/dist/client/assets/{use-api-keys-CIEmL_L8.js → use-api-keys-DxNv5Hd6.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule-D1K-CTJc.js → use-apply-named-rule-DagKa0bY.js} +1 -1
- package/dist/client/assets/use-ask-in-chat-DkE-lLcV.js +1 -0
- package/dist/client/assets/{use-automations-D9G2aQtg.js → use-automations-DUIR4t6J.js} +1 -1
- package/dist/client/assets/{use-autosave-DA0iUsFs.js → use-autosave-D_JOPQmj.js} +1 -1
- package/dist/client/assets/use-blocks-v8-project-DvTBxIPw.js +1 -0
- package/dist/client/assets/use-blog-view-BnDurHBG.js +1 -0
- package/dist/client/assets/{use-chat-layout-state-BRzFXpfg.js → use-chat-layout-state-DDFKjNIl.js} +1 -1
- package/dist/client/assets/{use-cms-publish-actions-Bpr8vfHu.js → use-cms-publish-actions-drU_bgxQ.js} +1 -1
- package/dist/client/assets/{use-connect-companion-Bqq_EO2v.js → use-connect-companion-CzR8AETN.js} +1 -1
- package/dist/client/assets/{use-connection-CIMAuSK_.js → use-connection-lIDtpp77.js} +1 -1
- package/dist/client/assets/{use-content-sync-B6dUTcmO.js → use-content-sync-BYPhpgAW.js} +1 -1
- package/dist/client/assets/{use-copy-Ch95imPZ.js → use-copy-D5LfgK5z.js} +1 -1
- package/dist/client/assets/{use-current-view-TPfqtmJr.js → use-current-view-BBuaPVrA.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-DZrLBHYK.js → use-date-fns-locale-0Y6GsIOR.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-kLGb03O4.js → use-debounced-autosave-0zBtHryK.js} +1 -1
- package/dist/client/assets/{use-debounced-value-BACx1z3V.js → use-debounced-value-C26MvSJn.js} +1 -1
- package/dist/client/assets/{use-deco-credits-B2sBSPka.js → use-deco-credits-DeC-swUL.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CTU1ebGV.js → use-decopilot-events-BPn3pCjJ.js} +1 -1
- package/dist/client/assets/{use-delete-block-D3LZPXdf.js → use-delete-block-CiafX579.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BWUexbsc.js → use-delete-connection-BKoKp6zr.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-BFYSoSrq.js → use-deployment-admin-ermoXf--.js} +1 -1
- package/dist/client/assets/{use-entitlements-D5byd2v_.js → use-entitlements-BF3joBL4.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-CwAURvyZ.js → use-fast-preview-draft-url-CjZjepWx.js} +1 -1
- package/dist/client/assets/{use-file-configs-PWDcgSOC.js → use-file-configs-ChPJPjIZ.js} +1 -1
- package/dist/client/assets/{use-id-selection-DiGQvESY.js → use-id-selection-D-wGx9VN.js} +1 -1
- package/dist/client/assets/{use-in-settings--CBG8Ce6.js → use-in-settings-BofilH1v.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-Bz282qCn.js → use-inbox-feed-DEhnw0lh.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-Tsjw8bRi.js → use-infinite-scroll-C5BHcO3d.js} +1 -1
- package/dist/client/assets/{use-join-requests-BX1q4JJR.js → use-join-requests-Btrh5AlT.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-xL_Tdyig.js → use-main-panel-tabs--2UAdIkm.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-DtZK1ooz.js → use-mcp-auth-status-CB9ZkdO5.js} +1 -1
- package/dist/client/assets/{use-mcp-client-Dj93nKzQ.js → use-mcp-client-C2KQU7c3.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-C96c-FQr.js → use-mcp-prompts-BOa13e9x.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BayWRNGV.js → use-mcp-tools-DY99iUOI.js} +1 -1
- package/dist/client/assets/{use-mobile-BKxwZ6y7.js → use-mobile-nGgejGlo.js} +1 -1
- package/dist/client/assets/{use-move-blocks-DJWtOlrn.js → use-move-blocks-BNfPEh8Z.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-Cs2gjUt8.js → use-navigate-to-agent-PmeOctb2.js} +1 -1
- package/dist/client/assets/{use-never-published-ajD1yeUg.js → use-never-published-jINFwhsG.js} +1 -1
- package/dist/client/assets/{use-org-fs-Bus57BBg.js → use-org-fs-DTKINC-x.js} +1 -1
- package/dist/client/assets/{use-org-notice-150NxgCA.js → use-org-notice-COy-LgRB.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-BF-Ps9GL.js → use-org-repo-syncs-DqVrFcdi.js} +1 -1
- package/dist/client/assets/{use-org-sso-DriBivLP.js → use-org-sso-B3VN_T5G.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DgQPa1gy.js → use-organization-settings-uZzqpAbZ.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-cnbfkht1.js → use-panel-navigate-BYtmBtcy.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-BuRns7cy.js → use-project-native-view-presence-Cqg4qfrc.js} +1 -1
- package/dist/client/assets/{use-project-scope-pykFyq6n.js → use-project-scope-D8JxWW5D.js} +1 -1
- package/dist/client/assets/{use-recent-apps-1MfPlw9-.js → use-recent-apps-DoFE2306.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-D0uhQ6j7.js → use-reports-diagnostic-CrBDmt5W.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-CzU-CIRU.js → use-sandbox-events-BjMmIgSO.js} +1 -1
- package/dist/client/assets/{use-secrets-COcd5rI3.js → use-secrets-BvHgGE_b.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-CucfwoLI.js → use-section-preview-base-DS1uAb22.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-okJvs--c.js → use-sidebar-collapsed-VC4tdttc.js} +1 -1
- package/dist/client/assets/{use-tags-Dp6RVKXN.js → use-tags-BSbXAABz.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-ByzD69on.js → use-task-board-analytics-C4L8m8ha.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-63C3B6MK.js → use-task-board-item-prs-BcU73eKI.js} +1 -1
- package/dist/client/assets/{use-task-board-items-3Ud_roVn.js → use-task-board-items-DNNdhRtP.js} +1 -1
- package/dist/client/assets/{use-task-board-prompts-DXjJFXo8.js → use-task-board-prompts-DixNvU7R.js} +1 -1
- package/dist/client/assets/{use-task-metadata-CkxNf4wa.js → use-task-metadata-BnrMMEXM.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-CPRCvFuj.js → use-thread-outputs-CqJLmjLP.js} +1 -1
- package/dist/client/assets/{use-view-draft-kind-BuUq_bMk.js → use-view-draft-kind-CJTuI6yS.js} +1 -1
- package/dist/client/assets/{use-voice-input-BXZD6ZnT.js → use-voice-input-R6pqWjLx.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CnX3zUSi.js +1 -0
- package/dist/client/assets/{useQueries-DAkF7mLh.js → useQueries-Cv4H9o8h.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CqJmXMzX.js +1 -0
- package/dist/client/assets/{users-CriUhQwd.js → users-26Q8gQUp.js} +1 -1
- package/dist/client/assets/{utils-CWb2jsOo.js → utils-BWLamjlv.js} +1 -1
- package/dist/client/assets/{variant-calendar--k3aMV8i.js → variant-calendar-CKpEfG0P.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-DqN6Qt3p.js → variant-matcher-override-D2LCPF3g.js} +1 -1
- package/dist/client/assets/{view-header-Yb7KWXjt.js → view-header-BxUAMOxx.js} +1 -1
- package/dist/client/assets/{virtual-mcp-fhoMEN4c.js → virtual-mcp-BOM6yP8Q.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-BSVBaC3o.js → watch-sse-pool-CuFl2xd0.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/server.js +815 -789
- package/package.json +1 -1
- package/dist/client/assets/agent-app-C71SvJ1z.js +0 -1
- package/dist/client/assets/agent-deck-BjDvpfbk.js +0 -1
- package/dist/client/assets/agent-experiments-ByuIsZp1.js +0 -1
- package/dist/client/assets/agent-file-jUy0J5UO.js +0 -1
- package/dist/client/assets/agent-library-3pKzgj4X.js +0 -1
- package/dist/client/assets/agent-library-file-DMOMvX_-.js +0 -1
- package/dist/client/assets/agent-overview-BgGz6mht.js +0 -1
- package/dist/client/assets/agent-settings-Dig5NHoM.js +0 -1
- package/dist/client/assets/agent-site-editor-code-h78IlWiZ.js +0 -2
- package/dist/client/assets/agent-site-editor-content-2ZBJ4zZj.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-BraJrHar.js +0 -1
- package/dist/client/assets/agent-view-B3lvytKO.js +0 -1
- package/dist/client/assets/api-keys-B_GgSNFa.js +0 -1
- package/dist/client/assets/library-DsfxsidZ.js +0 -1
- package/dist/client/assets/plan-CMRFe-mo.js +0 -1
- package/dist/client/assets/project-reports-Db6zzNbO.js +0 -1
- package/dist/client/assets/project-tasks-CF_ifB3s.js +0 -1
- package/dist/client/assets/record-editor-CEdK2d-r.js +0 -1
- package/dist/client/assets/reports-RNPSh_Zh.js +0 -1
- package/dist/client/assets/repositories-BqlH0wbe.js +0 -1
- package/dist/client/assets/route-Cg85sfCm.js +0 -1
- package/dist/client/assets/settings-tab-CfKJzzcy.js +0 -1
- package/dist/client/assets/site-editor-Bv6Kdh6u.js +0 -1
- package/dist/client/assets/tasks-BgFuMCZO.js +0 -1
- package/dist/client/assets/use-ask-in-chat-CSsADPkf.js +0 -1
- package/dist/client/assets/use-blocks-v8-project-BD5Jh-pP.js +0 -1
- package/dist/client/assets/use-blog-view-D1-0qsnM.js +0 -1
- package/dist/client/assets/useInfiniteQuery-B0htY_KT.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BoJ8nJIB.js +0 -1
package/dist/client/assets/{site-draft-actions-C6crz6qr.js → site-draft-actions-Caiw1yL8.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as $,b as xe,r as U,j as r,B as ge,m as H,K as xs,an as Ha,t as at,eO as Va,au as Pr,dN as Sr,Y as ms,dO as Ga,aJ as Ns,aK as Cs,aL as As,aM as Js,b9 as Ws,aN as Rs,aO as Ds,aP as Ts,X as tn,Z as sn,_ as nn,a as rn,a6 as Is,b_ as Ja,h as ps,eP as kr,eQ as Nr,eR as Sn,by as Wa,bo as Qa,bt as Zn,eS as Xa,ao as Ya,I as Za,a9 as el,eT as tl,V as Cr,i as gt,eL as kn,q as Ar,J as Rr,D as Dr,x as Tr,v as Br,Q as Ir,R as $r,aX as sl,ba as Fr,a7 as Nn,b6 as Cn,e as er,E as nl,T as rl}from"./index-Dws-zNMb.js";import{S as al}from"./separator-CUTgb7jC.js";import{f as ll,u as vs,r as Lr,l as Or,c as Mr,b as il}from"./chat-context-hCQ1mfTr.js";import{u as Mt,a8 as ol,a9 as _r,aa as Er,c as An,b as Rn,N as Dn,ab as cl,M as dl,ac as ul,v as Tn,U as zr,ad as hl,H as fl,ae as ml,af as pl,g as Ur}from"./site-editor-toast-BymLOidH.js";import{L as bl}from"./use-org-notice-150NxgCA.js";import{I as Kr}from"./toolbar-icon-button-B9KCgsM0.js";import{b as gl,P as xl,a as vl}from"./popover-DYPQiSv-.js";import{c as lt,T as it,a as ot,b as an}from"./tooltip-DlU94Hgw.js";import{f as yl,a as jl,c as wl,C as tr,e as sr,b as nr}from"./command-B2QNmjQS.js";import{T as Lt,a as qr,b as Hr}from"./tabs-CbftHH4j.js";import{t as Vr}from"./ChevronDown-DL6BIz5f.js";import{b as Pl}from"./UserCheck01-C_H-l_wV.js";import{L as Gr,ac as ln,a as Jr,G as Sl,b as kl,ad as Wr}from"./agent-icon-CRYupZK6.js";import{a as Qr}from"./SwitchHorizontal01-DgSPPtsf.js";import{b as Xr}from"./Tool01-Behnzz1u.js";import{s as Yr}from"./Plus-C3X8_FHI.js";import{s as on}from"./Trash01-PZdGVeLy.js";import{d as Hs,e as Nl,s as _s,f as Zr,u as ea,n as Cl,g as Al}from"./use-view-draft-kind-BuUq_bMk.js";import{u as Bn}from"./use-blog-view-D1-0qsnM.js";import{u as ys}from"./use-voice-input-BXZD6ZnT.js";import{b as Rl,d as ta}from"./session-runtime-RbvUuwNa.js";import{h as sa,r as na,b as $s,g as Dl,e as ze,f as ra}from"./repository-binding-CWC5A7qh.js";import{u as Tl}from"./use-debounced-value-BACx1z3V.js";import{a as Bl,u as Il}from"./shell-layout-C_SGZ8Vi.js";import{u as $l}from"./useInfiniteQuery-B0htY_KT.js";import{d as Fl,b as Ll,p as Ol,e as aa,g as la,h as ia}from"./use-navigate-to-agent-Cs2gjUt8.js";import{u as cn,n as ks,b as oa,a as Ml,c as _l,d as El,r as Ss,g as zl,s as Ul,e as Es,f as Kl}from"./cms-store-drafts-BNUrt0he.js";import{e as ql,g as Hl,f as In}from"./thread-intent-Cpu3ihkE.js";import{a as Qs}from"./virtual-mcp-fhoMEN4c.js";import{u as $n}from"./use-blocks-v8-project-BD5Jh-pP.js";import{G as ca}from"./github-icon-B__6ogZQ.js";import{f as Vl,r as Gl,u as da}from"./content-changes-BqXl80v8.js";import{a as Jl,b as Wl}from"./use-fast-preview-draft-url-CwAURvyZ.js";import{a3 as hs,a4 as ua,A as Xs,q as Fn,a5 as Ql,a6 as Xl,F as Yl,a7 as Zl,a8 as ei,p as ti,e as At,f as Ln,a9 as si}from"./blocks-tab-states-D1zjsV30.js";import"./index-Dn-dq-as.js";import{T as ni}from"./textarea-DiEPPUlb.js";import{i as On}from"./CheckCircle-Dc3WHxxP.js";import{s as Ys}from"./Eye-C0HPiOiR.js";import{n as ri,s as ai,C as li,a as ii,b as oi,M as ci,c as di,d as ui,m as hi,u as fi}from"./use-cms-publish-actions-Bpr8vfHu.js";import{b as mi,j as pi}from"./UserSquare-B41X0756.js";import{i as Mn,b as _n,m as bi,h as gi,c as ha,f as fa,d as xi,r as En,e as vi,n as yi,g as ji,j as wi,k as Pi,l as zn,o as Si,p as ma,q as ki,s as Un,B as Ni,t as fn}from"./sandbox-git-api--HjjhyJS.js";import{a as Ci,g as Ai}from"./utils-CWb2jsOo.js";import{i as Ri}from"./Monitor01-B6F_ox0H.js";import{w as Kn,R as pa}from"./device-hint-DnbqoU71.js";import{w as rr}from"./editor-B0cDiaJa.js";import{i as Di,C as Ti}from"./section-array-field-BSa-R005.js";import{T as Bi,a as ar}from"./toggle-group-D4LrchJT.js";import{s as ba}from"./save-changes-debug-nBi-n9eV.js";import{u as Ii}from"./use-mcp-client-Dj93nKzQ.js";import{t as $i}from"./MessageCircle01-BhIvz7K8.js";import{u as Fi}from"./use-sandbox-events-CzU-CIRU.js";import{b as Li,a as Oi}from"./sandbox-lifecycle-context-CRW6W9ms.js";import{b as Mi}from"./agent-capabilities-DvWcNy_n.js";import{c as _i}from"./thread-route-CfOc-Skq.js";function Ei(t){const{value:e,baseBranch:s,releases:a,baseIsDraft:n=!1,storeDrafts:o=[]}=t,d=!n&&!!e&&e===s,l=a.find(c=>c.branch===e),i=d||l?void 0:o.find(c=>c.name===e),u=!d&&!l&&!i&&!!e;return i?{isBase:d,current:l,storeDraft:i,unlisted:u}:{isBase:d,current:l,unlisted:u}}const zi={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" "},lr=1114111;function ir(t){return t?t.replace(/&(#x?[0-9a-fA-F]+|[a-zA-Z]+);/g,(e,s)=>{if(s.startsWith("#x")||s.startsWith("#X")){const a=Number.parseInt(s.slice(2),16);return!Number.isFinite(a)||a>lr?e:String.fromCodePoint(a)}if(s.startsWith("#")){const a=Number.parseInt(s.slice(1),10);return!Number.isFinite(a)||a>lr?e:String.fromCodePoint(a)}return zi[s]??e}):""}function Ui(t){const e=$.c(39),{url:s,onSave:a}=t,n=xe(),[o,d]=U.useState(s??"");let l;e[0]!==o?(l=o.trim(),e[0]=o,e[1]=l):l=e[1];const i=l;let u;e[2]!==a||e[3]!==i?(u=()=>a(i?Rl(i):null),e[2]=a,e[3]=i,e[4]=u):u=e[4];const c=u;let h;e[5]!==n?(h=n("thread.branchPicker.localHint"),e[5]=n,e[6]=h):h=e[6];let p;e[7]!==h?(p=r.jsx("p",{className:"text-xs text-muted-foreground",children:h}),e[7]=h,e[8]=p):p=e[8];let b;e[9]!==n?(b=n("thread.branchPicker.localUrlLabel"),e[9]=n,e[10]=b):b=e[10];let f;e[11]!==n?(f=n("thread.branchPicker.localUrlPlaceholder"),e[11]=n,e[12]=f):f=e[12];let m;e[13]===Symbol.for("react.memo_cache_sentinel")?(m=C=>d(C.target.value),e[13]=m):m=e[13];let g;e[14]!==c||e[15]!==i?(g=C=>{C.key==="Enter"&&i&&c()},e[14]=c,e[15]=i,e[16]=g):g=e[16];let v;e[17]!==b||e[18]!==f||e[19]!==g||e[20]!==o?(v=r.jsx("input",{type:"url",inputMode:"url","aria-label":b,placeholder:f,value:o,onChange:m,onKeyDown:g,className:"h-8 w-full rounded-md border bg-transparent px-2 text-sm focus-ring"}),e[17]=b,e[18]=f,e[19]=g,e[20]=o,e[21]=v):v=e[21];let j;e[22]!==a||e[23]!==n||e[24]!==s?(j=s?r.jsx(ge,{variant:"ghost",size:"sm",className:"text-xs text-destructive hover:text-destructive",onClick:()=>a(null),children:n("thread.branchPicker.localTurnOff")}):r.jsx("span",{}),e[22]=a,e[23]=n,e[24]=s,e[25]=j):j=e[25];const w=!i;let x;e[26]!==n?(x=n("thread.branchPicker.save"),e[26]=n,e[27]=x):x=e[27];let P;e[28]!==c||e[29]!==w||e[30]!==x?(P=r.jsx(ge,{size:"sm",disabled:w,onClick:c,children:x}),e[28]=c,e[29]=w,e[30]=x,e[31]=P):P=e[31];let y;e[32]!==j||e[33]!==P?(y=r.jsxs("div",{className:"flex items-center justify-between gap-2",children:[j,P]}),e[32]=j,e[33]=P,e[34]=y):y=e[34];let N;return e[35]!==y||e[36]!==p||e[37]!==v?(N=r.jsxs("div",{className:"flex flex-col gap-2 p-2",children:[p,v,y]}),e[35]=y,e[36]=p,e[37]=v,e[38]=N):N=e[38],N}function Ki(t){const e=$.c(8),{virtualMcpId:s,branch:a,serve:n,rowRef:o,onPicked:d}=t,l=Mt(s,a),i=!!n.connection,u=i&&l.kind==="protocol"&&l.source==="local";let c;e[0]!==d||e[1]!==n?(c=()=>qi(n,d),e[0]=d,e[1]=n,e[2]=c):c=e[2];let h;return e[3]!==o||e[4]!==i||e[5]!==u||e[6]!==c?(h=r.jsx(Hi,{rowRef:o,selected:i,connected:u,onSelect:c}),e[3]=o,e[4]=i,e[5]=u,e[6]=c,e[7]=h):h=e[7],h}function qi(t,e){e?.(),!t.connection&&t.set({endpoint:t.lastEndpoint??ol})}function Hi(t){const e=$.c(19),{rowRef:s,selected:a,connected:n,onSelect:o}=t,d=xe(),l=a?"bg-accent":"hover:bg-accent";let i;e[0]!==l?(i=H("flex rounded-lg",l),e[0]=l,e[1]=i):i=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=r.jsx("span",{"data-testid":"localhost-dot",className:"h-2 w-2 shrink-0 rounded-full bg-foreground"}),e[2]=u):u=e[2];let c;e[3]!==d?(c=d("thread.branchPicker.localhost.label"),e[3]=d,e[4]=c):c=e[4];let h;e[5]!==c?(h=r.jsx("span",{className:"min-w-0 flex-1 truncate",children:c}),e[5]=c,e[6]=h):h=e[6];let p;e[7]!==n||e[8]!==d?(p=n&&r.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:d("thread.branchPicker.localhost.connected")}),e[7]=n,e[8]=d,e[9]=p):p=e[9];let b;e[10]!==o||e[11]!==a||e[12]!==h||e[13]!==p?(b=r.jsxs("button",{type:"button","aria-pressed":a,onClick:o,className:"flex w-full min-w-0 items-center gap-2.5 px-2 py-2 text-left text-sm",children:[u,h,p]}),e[10]=o,e[11]=a,e[12]=h,e[13]=p,e[14]=b):b=e[14];let f;return e[15]!==s||e[16]!==i||e[17]!==b?(f=r.jsx("div",{ref:s,className:i,children:b}),e[15]=s,e[16]=i,e[17]=b,e[18]=f):f=e[18],f}const Vi=10080*60*1e3;function Gi({sandboxMap:t,userId:e,rawBranches:s,now:a}){const n=new Map;for(const[h,p]of Object.entries(t??{}))for(const[b,f]of Object.entries(p??{})){let m=n.get(b);m||(m={userIds:new Set,lastActiveAt:0},n.set(b,m)),m.userIds.add(h);for(const g of Object.values(f??{})){const v=g?.createdAt??0;v>m.lastActiveAt&&(m.lastActiveAt=v)}}const o=a-Vi,d=[...n.entries()].filter(([,h])=>h.lastActiveAt>=o).sort((h,p)=>p[1].lastActiveAt-h[1].lastActiveAt).map(([h,p])=>({name:h,source:"recent",contributors:[...p.userIds],lastActiveAt:p.lastActiveAt})),l=new Set(d.map(h=>h.name)),i=new Set(Object.keys(t?.[e]??{})),u=[...i].filter(h=>!l.has(h)).sort().map(h=>({name:h,source:"yours"})),c=s.filter(h=>!i.has(h.name)&&!l.has(h.name)).map(h=>({name:h.name,source:"other",author:h.author??null}));return{recent:d,yours:u,others:c}}const Ji=100,Wi=50,Qi=300;function vn(t,e){const s=e.trim().toLowerCase();return s?t.toLowerCase().includes(s):!0}function Xi(t){const e=$.c(39),{orgId:s,orgSlug:a,userId:n,target:o,sandboxMap:d,owner:l,repo:i,search:u,enabled:c}=t,h=u===void 0?"":u,p=c===void 0?!0:c;let b;e[0]!==h?(b=h.trim(),e[0]=h,e[1]=b):b=e[1];const f=b,m=Tl(f,Qi);let g;e[2]!==o?(g=sa(o),e[2]=o,e[3]=g):g=e[3];const v=g,j=f.length>0;let w;e[4]!==m||e[5]!==s||e[6]!==a||e[7]!==l||e[8]!==i||e[9]!==o?(w=xs.githubBranchSearch(s,a,na(o),l,i,m),e[4]=m,e[5]=s,e[6]=a,e[7]=l,e[8]=i,e[9]=o,e[10]=w):w=e[10];const x=p&&v;let P;e[11]!==m||e[12]!==a||e[13]!==o?(P=T=>{const{pageParam:ee}=T;return Ha(a,"REPOSITORY_SEARCH_BRANCHES",{...o,query:m,limit:m?Wi:Ji,cursor:ee})},e[11]=m,e[12]=a,e[13]=o,e[14]=P):P=e[14];let y;e[15]!==m?(y=T=>m?void 0:T.nextCursor??void 0,e[15]=m,e[16]=y):y=e[16];let N;e[17]!==w||e[18]!==x||e[19]!==P||e[20]!==y?(N={queryKey:w,enabled:x,staleTime:3e4,retry:!1,initialPageParam:null,queryFn:P,getNextPageParam:y},e[17]=w,e[18]=x,e[19]=P,e[20]=y,e[21]=N):N=e[21];const{data:C,isLoading:A,isError:S,isFetching:D,hasNextPage:k,isFetchingNextPage:O,fetchNextPage:I}=$l(N),B=j&&(m!==f||D),F=(C?.pages??[]).flatMap(Yi),L=Bl(6e4),V=Gi({sandboxMap:d,userId:n,rawBranches:F,now:L});let z;e[22]!==f?(z=T=>vn(T.name,f),e[22]=f,e[23]=z):z=e[23];const te=V.recent.filter(z);let M;e[24]!==f?(M=T=>vn(T.name,f),e[24]=f,e[25]=M):M=e[25];const K=V.yours.filter(M),J=V.others,se=C?.pages[0],W=j&&se&&!B?Math.max(0,se.totalCount-se.branches.length):0,ue=!j&&k;let Y;e[26]!==I?(Y=()=>{I()},e[26]=I,e[27]=Y):Y=e[27];let le;return e[28]!==W||e[29]!==S||e[30]!==O||e[31]!==A||e[32]!==B||e[33]!==J||e[34]!==te||e[35]!==ue||e[36]!==Y||e[37]!==K?(le={recent:te,yours:K,others:J,isLoading:A,isError:S,isSearching:B,hiddenMatchCount:W,hasMore:ue,isFetchingMore:O,fetchMore:Y},e[28]=W,e[29]=S,e[30]=O,e[31]=A,e[32]=B,e[33]=J,e[34]=te,e[35]=ue,e[36]=Y,e[37]=K,e[38]=le):le=e[38],le}function Yi(t){return t.branches}function Zi(t){const e=$.c(8),s=xe(),{releases:a,createRelease:n}=cn(t.virtualMcpId),o=$s(t.virtualMcpId);let d;return e[0]!==n||e[1]!==t.kind||e[2]!==t.userId||e[3]!==t.userLabel||e[4]!==o||e[5]!==a||e[6]!==s?(d=()=>{if(a.length>=Qs)return at.error(s("thread.branchPicker.capReached",{max:Qs})),null;const l=t.kind==="blog"?ql(t.userLabel):Hl(t.userLabel);return n({branch:l,name:oa(a,s(Hs(l))),color:ks(a.length),createdBy:t.userId,createdAt:new Date().toISOString(),...o?{runtime:ta(o.metadata)}:{}}).catch(i=>{at.error(s("thread.branchPicker.saveError"),{description:_r(s,Er(i))})}),l},e[0]=n,e[1]=t.kind,e[2]=t.userId,e[3]=t.userLabel,e[4]=o,e[5]=a,e[6]=s,e[7]=d):d=e[7],d}const Zs="-mx-[3px] h-3.5 w-3.5 shrink-0";function eo(t){const e=$.c(120),{virtualMcpId:s,isV8:a,userLabel:n,value:o,baseBranch:d,baseIsDraft:l,orgId:i,orgSlug:u,userId:c,target:h,owner:p,repo:b,sandboxMap:f,onChange:m,onCreateBranch:g,onAdoptBranch:v,disabled:j,spawnsNewChat:w,placement:x,draftKind:P}=t,y=a===void 0?!1:a,N=l===void 0?!1:l,C=j===void 0?!1:j,A=w===void 0?!1:w,S=x===void 0?"chat":x,D=P===void 0?"site":P,k=xe(),I=Bn()?D:null,B=S==="header",[F,L]=U.useState(!1),[V,z]=U.useState(!1),[te,M]=U.useState("branches"),[K,J]=U.useState(null),[se,W]=U.useState(""),[ue,Y]=U.useState(null),[le,T]=U.useState(null),ee=U.useRef(null),{releases:G,createRelease:ne,renameRelease:re,deleteRelease:Se}=cn(s),he=I??void 0;let be;e[0]!==he||e[1]!==c||e[2]!==n||e[3]!==s?(be={virtualMcpId:s,userLabel:n,userId:c,kind:he},e[0]=he,e[1]=c,e[2]=n,e[3]=s,e[4]=be):be=e[4];const ce=Zi(be),{projectDefault:ie}=ys(s);let E;e[5]!==ie?(E=R=>Kl(R,ie)==="sandbox",e[5]=ie,e[6]=E):E=e[6];const fe=E,ke=Ml(s,y),me=y?_l(G,ke.data):[],X=ke.refetch,Z=El(s),{url:Be,setUrl:Q,clear:oe}=An(s),Ne=Rn(s),xt=y&&!!Ne.connection,Xe=y?Ne.connection?.endpoint??null:Be,ye=!!Xe;let ve;e[7]!==oe||e[8]!==y||e[9]!==Ne?(ve=()=>{oe(),y&&Ne.clear()},e[7]=oe,e[8]=y,e[9]=Ne,e[10]=ve):ve=e[10];const Re=ve;let $e;e[11]!==F?($e={enabled:F},e[11]=F,e[12]=$e):$e=e[12];const{data:Ue}=Va($e);let Ie;e[13]!==Ue?.data?.members?(Ie=R=>R?Ue?.data?.members?.find(Pe=>Pe.userId===R)?.user?.name??void 0:void 0,e[13]=Ue?.data?.members,e[14]=Ie):Ie=e[14];const Dt=Ie,Ee=G.length>=Qs;let Le;e[15]!==I||e[16]!==ie||e[17]!==G?(Le=R=>!!_s(G,R.branch,I,ie),e[15]=I,e[16]=ie,e[17]=G,e[18]=Le):Le=e[18];const pe=Le,ct=k("thread.branchPicker.capReached",{max:Qs}),{isBase:Ye,current:dt,storeDraft:Oe,unlisted:_}=Ei({value:o,baseBranch:d,releases:G,baseIsDraft:N,storeDrafts:me}),ae=Nl(G,I,o);let je;e[19]!==I||e[20]!==o?(je=R=>I===null||Zr(R.name)===I||R.name===o,e[19]=I,e[20]=o,e[21]=je):je=e[21];const De=me.filter(je),Ze=Ye?k("thread.branchPicker.live"):dt?.name??Oe?.name??k(Hs(o)),ut=xt?k("thread.branchPicker.localhost.label"):ye?k("thread.branchPicker.localLabel"):o?Ze:k("thread.branchPicker.selectVersion"),Et=xt?"bg-foreground":ye?"bg-special":Ye?"bg-success":Oe?Ss(void 0):Ss(dt?.color??"orange"),Ce=!xt&&!ye&&!Ye&&!!dt&&fe(dt),et=R=>{Re();const Pe=me.some(Ct=>Ct.name===R)?{runtime:"cms"}:G.find(Ct=>Ct.branch===R);m(R,Pe&&{runtime:Pe.runtime}),L(!1)};let ht;e[22]!==k?(ht=R=>{at.error(k("thread.branchPicker.saveError"),{description:_r(k,Er(R))})},e[22]=k,e[23]=ht):ht=e[23];const tt=ht;let zt;e[24]!==Q?(zt=R=>{Q(R),z(!1),L(!1)},e[24]=Q,e[25]=zt):zt=e[25];const js=zt,Tt=(R,Pe)=>{if(Re(),v){v(R),z(!1),L(!1);return}if(!G.some(Ct=>Ct.branch===R)){if(Ee){at.error(ct);return}ne({branch:R,name:Pe.trim()||R,color:ks(G.length),createdBy:c,createdAt:new Date().toISOString()}).catch(tt)}m(R),z(!1),L(!1)};let vt;e[26]!==Re||e[27]!==m||e[28]!==g||e[29]!==ce?(vt=()=>{const R=ce();R&&(Re(),(g??m)(R),L(!1))},e[26]=Re,e[27]=m,e[28]=g,e[29]=ce,e[30]=vt):vt=e[30];const ws=vt;let st;e[31]===Symbol.for("react.memo_cache_sentinel")?(st=()=>{J(null),W(""),z(!1),M("branches")},e[31]=st):st=e[31];const Bt=st;let yt;e[32]===Symbol.for("react.memo_cache_sentinel")?(yt=R=>{M(R),z(!0)},e[32]=yt):yt=e[32];const jt=yt;let wt;e[33]===Symbol.for("react.memo_cache_sentinel")?(wt=R=>{J(R.branch),W(R.name)},e[33]=wt):wt=e[33];const Ut=wt;let Pt;e[34]!==se||e[35]!==re||e[36]!==tt?(Pt=R=>{const Pe=se.trim();Pe&&re(R,Pe).catch(tt),J(null),W("")},e[34]=se,e[35]=re,e[36]=tt,e[37]=Pt):Pt=e[37];const Kt=Pt,qt=R=>{const Pe=R===void 0?o:R,Ct=se.trim();if(Ct&&Pe){if(Ee){at.error(ct),J(null),W("");return}ne({branch:Pe,name:Ct,color:ks(G.length),createdBy:c,createdAt:new Date().toISOString()}).catch(tt)}J(null),W("")};let St;e[38]===Symbol.for("react.memo_cache_sentinel")?(St=()=>{J(null),W("")},e[38]=St):St=e[38];const ft=St,It=()=>{const R=ue;if(Y(null),!(!R||!pe(R))){if(R.branch===o){const Pe=_s(G,R.branch,I,ie);Pe?et(Pe.branch):L(!1)}else L(!1);Se(R.branch).catch(tt)}},mt=zl(ae,ie),Ps=(mt.content.length>0||De.length>0)&&mt.code.length>0,$t=R=>K===R.branch?r.jsx(mn,{value:se,onChange:W,onSave:()=>Kt(R.branch),onCancel:ft},R.branch):r.jsx(pn,{rowRef:!ye&&R.branch===o?ee:void 0,dot:Ss(R.color),codeIcon:fe(R)?Es(R.color):void 0,label:R.name,creator:Dt(R.createdBy),originTooltip:y?k("thread.branchPicker.viaStudioUi"):void 0,branch:!y||fe(R)?R.branch:void 0,selected:!ye&&R.branch===o,onSelect:()=>et(R.branch),onRename:()=>Ut(R),onDelete:()=>Y(R),deleteBlocked:!pe(R)},R.branch),Ft=()=>{const R=le;if(T(null),!!R){if(R.name===o){const Pe=_s(G,R.name,I,ie);if(!Pe)return;et(Pe.branch)}Z.mutateAsync(R.name).catch(Pe=>{at.error(k("thread.branchPicker.discardStoreDraftError"),{description:Pe instanceof Error?Pe.message:void 0})})}},pt=De.map(R=>K===R.name?r.jsx(mn,{value:se,onChange:W,onSave:()=>qt(R.name),onCancel:ft},`store:${R.name}`):r.jsx(pn,{rowRef:!ye&&R.name===o?ee:void 0,dot:Ss(void 0),label:R.name,creator:Dt(R.createdBy),agentIcon:Es(ks(me.indexOf(R))),originTooltip:k("thread.branchPicker.storeDraftVia",{via:Ul(R.via)}),selected:!ye&&R.name===o,onSelect:()=>et(R.name),onRename:()=>{J(R.name),W(R.name)},onDelete:()=>T(R),deleteBlocked:R.name===o&&!_s(G,R.name,I,ie)},`store:${R.name}`));let Ke;e[39]!==C||e[40]!==y||e[41]!==X?(Ke=C?void 0:R=>{R?y&&X():Bt(),L(R)},e[39]=C,e[40]=y,e[41]=X,e[42]=Ke):Ke=e[42];const nt=B?"text-xs":"text-xs text-muted-foreground hover:text-foreground";let qe;e[43]!==nt?(qe=H("shrink min-w-0 max-w-[220px] gap-2",nt,Kr),e[43]=nt,e[44]=qe):qe=e[44];let He;e[45]!==C?(He=!C&&r.jsx(Vr,{size:12,className:"opacity-60 shrink-0"}),e[45]=C,e[46]=He):He=e[46];let Ve;e[47]!==ut?(Ve=r.jsx(ot,{children:ut}),e[47]=ut,e[48]=Ve):Ve=e[48];const rt=gl,kt="w-[min(300px,calc(100vw-2rem))] p-1.5",Nt="start";let Me;e[49]===Symbol.for("react.memo_cache_sentinel")?(Me=R=>{R.preventDefault(),ee.current?.scrollIntoView({block:"nearest"})},e[49]=Me):Me=e[49];let Ge;e[50]!==A||e[51]!==k?(Ge=A&&r.jsx("p",{className:"px-2 pb-1.5 pt-1 text-xs text-muted-foreground",children:k("thread.branchPicker.newChatHint")}),e[50]=A,e[51]=k,e[52]=Ge):Ge=e[52];const q=V?r.jsx(so,{orgId:i,orgSlug:u,userId:c,target:h,owner:p,repo:b,sandboxMap:f,enabled:F,tab:te,onTabChange:M,isV8:y,localUrl:Be,onSaveLocal:js,onBack:()=>z(!1),onAdopt:Tt,draftKind:I}):r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:H("always-scrollbar flex max-h-[min(50vh,20rem)] flex-col overflow-y-auto",y&&"gap-1"),children:[!y&&ye&&Xe&&r.jsx(to,{rowRef:ee,url:Xe,onSelect:()=>jt("local"),onEdit:()=>jt("local"),onTurnOff:()=>Re()}),_&&o&&(K===o?r.jsx(mn,{value:se,onChange:W,onSave:()=>qt(),onCancel:ft}):r.jsx(pn,{rowRef:ye?void 0:ee,dot:Ss("orange"),label:k(Hs(o)),branch:y?void 0:o,originTooltip:y?k("thread.branchPicker.viaStudioUi"):void 0,selected:!ye,onSelect:()=>et(o),onRename:()=>{J(o),W(oa(G,k(Hs(o))))}})),Ps?r.jsxs(r.Fragment,{children:[r.jsx(or,{children:k("thread.branchPicker.groupContent")}),mt.content.map($t),pt,r.jsx(or,{divided:!0,children:k("thread.branchPicker.groupCode")}),mt.code.map($t)]}):r.jsxs(r.Fragment,{children:[ae.map($t),pt]}),y&&r.jsx(Ki,{virtualMcpId:s,branch:o,serve:Ne,rowRef:xt?ee:void 0,onPicked:()=>L(!1)})]}),(_||ae.length>0||De.length>0||y)&&r.jsx("div",{className:"my-1 border-t"}),r.jsxs("button",{type:"button",onClick:()=>{ws()},disabled:Ee,className:"flex w-full items-center gap-2 rounded-lg px-2 py-2 text-left text-sm text-muted-foreground hover:bg-accent hover:text-foreground disabled:pointer-events-none disabled:opacity-50",children:[r.jsx(Yr,{className:"h-4 w-4 shrink-0"}),k("thread.branchPicker.newVersion")]}),Ee&&r.jsx("p",{className:"px-2 pb-1 pt-0.5 text-xs text-warning",children:ct}),r.jsxs("button",{type:"button",onClick:()=>jt("branches"),className:H("flex w-full items-center justify-between gap-2 rounded-lg px-2 py-2 text-left text-xs text-muted-foreground hover:bg-accent hover:text-foreground",y&&"mt-1"),children:[k("thread.branchPicker.advanced"),r.jsx(Pr,{className:"h-4 w-4 shrink-0"})]})]});let de;e[53]!==rt||e[54]!==Me||e[55]!==Ge||e[56]!==q?(de=r.jsxs(rt,{className:kt,align:Nt,onOpenAutoFocus:Me,children:[Ge,q]}),e[53]=rt,e[54]=Me,e[55]=Ge,e[56]=q,e[57]=de):de=e[57];const we=r.jsxs(xl,{open:F,onOpenChange:Ke,children:[r.jsxs(lt,{children:[r.jsx(it,{asChild:!0,children:r.jsx("span",{className:"inline-flex min-w-0 shrink",children:r.jsx(vl,{asChild:!0,children:r.jsxs(ge,{"data-tour":bl.branchPicker,variant:B?"outline":"ghost",size:B?"sm":"default","aria-label":ut,disabled:C,className:qe,children:[Ce?r.jsx(Gr,{className:H(Zs,Es(dt?.color))}):Oe&&!ye?r.jsx(Sr,{className:H(Zs,Es(ks(me.indexOf(Oe))))}):r.jsx("span",{className:H("h-2 w-2 shrink-0 rounded-full",o||ye?Et:"bg-muted-foreground")}),r.jsx("span",{className:"min-w-0 truncate @max-3xl/panel-header:hidden",children:ut}),He]})})})}),Ve]}),de]}),Te=ue!==null;let _e;e[58]===Symbol.for("react.memo_cache_sentinel")?(_e=R=>{R||Y(null)},e[58]=_e):_e=e[58];let Je;e[59]!==k?(Je=k("thread.branchPicker.deleteTitle"),e[59]=k,e[60]=Je):Je=e[60];let Ht;e[61]!==Je?(Ht=r.jsx(Ns,{children:Je}),e[61]=Je,e[62]=Ht):Ht=e[62];let Vt;e[63]!==ue||e[64]!==k?(Vt=ue&&k("thread.branchPicker.deleteConfirm",{name:ue.name}),e[63]=ue,e[64]=k,e[65]=Vt):Vt=e[65];let Gt;e[66]!==Vt?(Gt=r.jsx(Cs,{children:Vt}),e[66]=Vt,e[67]=Gt):Gt=e[67];let Jt;e[68]!==Ht||e[69]!==Gt?(Jt=r.jsxs(As,{children:[Ht,Gt]}),e[68]=Ht,e[69]=Gt,e[70]=Jt):Jt=e[70];let Wt;e[71]!==k?(Wt=k("thread.branchPicker.cancel"),e[71]=k,e[72]=Wt):Wt=e[72];let Qt;e[73]!==Wt?(Qt=r.jsx(Js,{children:Wt}),e[73]=Wt,e[74]=Qt):Qt=e[74];let Xt;e[75]!==k?(Xt=k("thread.branchPicker.delete"),e[75]=k,e[76]=Xt):Xt=e[76];let Yt;e[77]!==It||e[78]!==Xt?(Yt=r.jsx(Ws,{onClick:It,variant:"destructive",children:Xt}),e[77]=It,e[78]=Xt,e[79]=Yt):Yt=e[79];let Zt;e[80]!==Qt||e[81]!==Yt?(Zt=r.jsxs(Rs,{children:[Qt,Yt]}),e[80]=Qt,e[81]=Yt,e[82]=Zt):Zt=e[82];let es;e[83]!==Jt||e[84]!==Zt?(es=r.jsxs(Ds,{children:[Jt,Zt]}),e[83]=Jt,e[84]=Zt,e[85]=es):es=e[85];let Ls;e[86]!==Te||e[87]!==es?(Ls=r.jsx(Ts,{open:Te,onOpenChange:_e,children:es}),e[86]=Te,e[87]=es,e[88]=Ls):Ls=e[88];const hn=le!==null;let Os;e[89]===Symbol.for("react.memo_cache_sentinel")?(Os=R=>{R||T(null)},e[89]=Os):Os=e[89];let ts;e[90]!==k?(ts=k("thread.branchPicker.deleteTitle"),e[90]=k,e[91]=ts):ts=e[91];let ss;e[92]!==ts?(ss=r.jsx(Ns,{children:ts}),e[92]=ts,e[93]=ss):ss=e[93];let ns;e[94]!==le||e[95]!==k?(ns=le&&k("thread.branchPicker.discardStoreDraftConfirm",{name:le.name}),e[94]=le,e[95]=k,e[96]=ns):ns=e[96];let rs;e[97]!==ns?(rs=r.jsx(Cs,{children:ns}),e[97]=ns,e[98]=rs):rs=e[98];let as;e[99]!==ss||e[100]!==rs?(as=r.jsxs(As,{children:[ss,rs]}),e[99]=ss,e[100]=rs,e[101]=as):as=e[101];let ls;e[102]!==k?(ls=k("thread.branchPicker.cancel"),e[102]=k,e[103]=ls):ls=e[103];let is;e[104]!==ls?(is=r.jsx(Js,{children:ls}),e[104]=ls,e[105]=is):is=e[105];let os;e[106]!==k?(os=k("thread.branchPicker.delete"),e[106]=k,e[107]=os):os=e[107];let cs;e[108]!==Ft||e[109]!==os?(cs=r.jsx(Ws,{onClick:Ft,variant:"destructive",children:os}),e[108]=Ft,e[109]=os,e[110]=cs):cs=e[110];let ds;e[111]!==is||e[112]!==cs?(ds=r.jsxs(Rs,{children:[is,cs]}),e[111]=is,e[112]=cs,e[113]=ds):ds=e[113];let us;e[114]!==as||e[115]!==ds?(us=r.jsxs(Ds,{children:[as,ds]}),e[114]=as,e[115]=ds,e[116]=us):us=e[116];let Ms;return e[117]!==hn||e[118]!==us?(Ms=r.jsx(Ts,{open:hn,onOpenChange:Os,children:us}),e[117]=hn,e[118]=us,e[119]=Ms):Ms=e[119],r.jsxs(r.Fragment,{children:[we,Ls,Ms]})}function mn(t){const e=$.c(20),{value:s,onChange:a,onSave:n,onCancel:o}=t,d=xe();let l;e[0]!==d?(l=d("thread.branchPicker.rename"),e[0]=d,e[1]=l):l=e[1];let i;e[2]!==a?(i=f=>a(f.target.value),e[2]=a,e[3]=i):i=e[3];let u;e[4]!==o||e[5]!==n?(u=f=>{f.key==="Enter"&&n(),f.key==="Escape"&&(f.preventDefault(),f.stopPropagation(),o())},e[4]=o,e[5]=n,e[6]=u):u=e[6];let c;e[7]!==l||e[8]!==i||e[9]!==u||e[10]!==s?(c=r.jsx("input",{autoFocus:!0,"aria-label":l,value:s,onChange:i,onKeyDown:u,className:"h-8 flex-1 rounded-md border bg-transparent px-2 text-sm focus-ring"}),e[7]=l,e[8]=i,e[9]=u,e[10]=s,e[11]=c):c=e[11];let h;e[12]!==d?(h=d("thread.branchPicker.save"),e[12]=d,e[13]=h):h=e[13];let p;e[14]!==n||e[15]!==h?(p=r.jsx(ge,{size:"sm",onClick:n,children:h}),e[14]=n,e[15]=h,e[16]=p):p=e[16];let b;return e[17]!==c||e[18]!==p?(b=r.jsxs("div",{className:"flex items-center gap-1.5 p-1",children:[c,p]}),e[17]=c,e[18]=p,e[19]=b):b=e[19],b}function or(t){const e=$.c(5),{divided:s,children:a}=t,o=(s===void 0?!1:s)&&"mt-1 border-t";let d;e[0]!==o?(d=H("px-2 pb-1 pt-2 text-xs font-medium uppercase tracking-wide text-muted-foreground",o),e[0]=o,e[1]=d):d=e[1];let l;return e[2]!==a||e[3]!==d?(l=r.jsx("p",{className:d,children:a}),e[2]=a,e[3]=d,e[4]=l):l=e[4],l}function pn(t){const e=$.c(53),{rowRef:s,dot:a,codeIcon:n,agentIcon:o,originTooltip:d,label:l,creator:i,branch:u,selected:c,onSelect:h,onRename:p,onDelete:b,deleteBlocked:f}=t,m=f===void 0?!1:f,g=xe();let v;e[0]!==o||e[1]!==n||e[2]!==a?(v=n?r.jsx(Gr,{className:H(Zs,n)}):o?r.jsx(Sr,{className:H(Zs,o)}):r.jsx("span",{className:H("h-2 w-2 shrink-0 rounded-full",a)}),e[0]=o,e[1]=n,e[2]=a,e[3]=v):v=e[3];let j;e[4]!==i?(j=i&&r.jsx("span",{className:"ml-1.5 text-xs font-normal text-muted-foreground/70",children:i}),e[4]=i,e[5]=j):j=e[5];let w;e[6]!==l||e[7]!==j?(w=r.jsxs("span",{className:"min-w-0 flex-1 truncate",children:[l,j]}),e[6]=l,e[7]=j,e[8]=w):w=e[8];let x;e[9]!==h||e[10]!==c||e[11]!==v||e[12]!==w?(x=r.jsxs("button",{type:"button","aria-pressed":c,onClick:h,className:"flex min-w-0 flex-1 items-center gap-2.5 px-2 py-2 text-left text-sm",children:[v,w]}),e[9]=h,e[10]=c,e[11]=v,e[12]=w,e[13]=x):x=e[13];const P=x,y=c?"bg-accent":"hover:bg-accent";let N;e[14]!==y?(N=H("group flex items-center rounded-lg",y),e[14]=y,e[15]=N):N=e[15];let C;e[16]!==u||e[17]!==n||e[18]!==d||e[19]!==P||e[20]!==g?(C=u||d?r.jsxs(lt,{children:[r.jsx(it,{asChild:!0,children:P}),r.jsxs(ot,{side:"bottom",className:"text-xs",children:[n&&r.jsx("p",{className:"font-medium",children:g("thread.branchPicker.codeDraftTooltip")}),d&&r.jsx("p",{children:d}),u&&r.jsx("p",{className:"font-mono",children:g("thread.branchPicker.branchTooltip",{branch:u})})]})]}):P,e[16]=u,e[17]=n,e[18]=d,e[19]=P,e[20]=g,e[21]=C):C=e[21];let A;e[22]!==g?(A=g("thread.branchPicker.moreActions"),e[22]=g,e[23]=A):A=e[23];let S;e[24]===Symbol.for("react.memo_cache_sentinel")?(S=r.jsx(Qr,{className:"h-4 w-4"}),e[24]=S):S=e[24];let D;e[25]!==A?(D=r.jsx(tn,{asChild:!0,children:r.jsx(ge,{variant:"ghost",size:"icon","aria-label":A,className:"mr-1 h-6 w-6 shrink-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100",children:S})}),e[25]=A,e[26]=D):D=e[26];let k;e[27]===Symbol.for("react.memo_cache_sentinel")?(k=r.jsx(Xr,{className:"h-4 w-4"}),e[27]=k):k=e[27];let O;e[28]!==g?(O=g("thread.branchPicker.rename"),e[28]=g,e[29]=O):O=e[29];let I;e[30]!==p||e[31]!==O?(I=r.jsxs(ms,{onSelect:p,children:[k,O]}),e[30]=p,e[31]=O,e[32]=I):I=e[32];let B;e[33]!==m||e[34]!==b||e[35]!==g?(B=b&&r.jsxs(ms,{onSelect:b,disabled:m,className:"text-destructive focus:text-destructive",children:[r.jsx(on,{className:"h-4 w-4"}),g("thread.branchPicker.delete")]}),e[33]=m,e[34]=b,e[35]=g,e[36]=B):B=e[36];let F;e[37]!==m||e[38]!==b||e[39]!==g?(F=b&&m&&r.jsx("p",{className:"max-w-48 px-2 pb-1.5 text-xs text-muted-foreground",children:g("thread.branchPicker.keepOneDraft")}),e[37]=m,e[38]=b,e[39]=g,e[40]=F):F=e[40];let L;e[41]!==I||e[42]!==B||e[43]!==F?(L=r.jsxs(sn,{align:"end",children:[I,B,F]}),e[41]=I,e[42]=B,e[43]=F,e[44]=L):L=e[44];let V;e[45]!==D||e[46]!==L?(V=r.jsxs(nn,{children:[D,L]}),e[45]=D,e[46]=L,e[47]=V):V=e[47];let z;return e[48]!==s||e[49]!==V||e[50]!==N||e[51]!==C?(z=r.jsxs("div",{ref:s,className:N,children:[C,V]}),e[48]=s,e[49]=V,e[50]=N,e[51]=C,e[52]=z):z=e[52],z}function to(t){const e=$.c(40),{rowRef:s,url:a,onSelect:n,onEdit:o,onTurnOff:d}=t,l=xe();let i;try{let D;e[0]!==a?(D=new URL(a),e[0]=a,e[1]=D):D=e[1],i=D.host}catch{i=a}const u=i;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=r.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full bg-special"}),e[2]=c):c=e[2];let h;e[3]!==l?(h=l("thread.branchPicker.localLabel"),e[3]=l,e[4]=h):h=e[4];let p;e[5]!==u?(p=r.jsx("span",{className:"ml-1.5 text-xs font-normal text-muted-foreground/70",children:u}),e[5]=u,e[6]=p):p=e[6];let b;e[7]!==h||e[8]!==p?(b=r.jsxs("span",{className:"min-w-0 flex-1 truncate",children:[h,p]}),e[7]=h,e[8]=p,e[9]=b):b=e[9];let f;e[10]!==n||e[11]!==b?(f=r.jsxs("button",{type:"button","aria-pressed":!0,onClick:n,className:"flex min-w-0 flex-1 items-center gap-2.5 px-2 py-2 text-left text-sm",children:[c,b]}),e[10]=n,e[11]=b,e[12]=f):f=e[12];let m;e[13]!==l?(m=l("thread.branchPicker.moreActions"),e[13]=l,e[14]=m):m=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=r.jsx(Qr,{className:"h-4 w-4"}),e[15]=g):g=e[15];let v;e[16]!==m?(v=r.jsx(tn,{asChild:!0,children:r.jsx(ge,{variant:"ghost",size:"icon","aria-label":m,className:"mr-1 h-6 w-6 shrink-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100",children:g})}),e[16]=m,e[17]=v):v=e[17];let j;e[18]===Symbol.for("react.memo_cache_sentinel")?(j=r.jsx(Xr,{className:"h-4 w-4"}),e[18]=j):j=e[18];let w;e[19]!==l?(w=l("thread.branchPicker.rename"),e[19]=l,e[20]=w):w=e[20];let x;e[21]!==o||e[22]!==w?(x=r.jsxs(ms,{onSelect:o,children:[j,w]}),e[21]=o,e[22]=w,e[23]=x):x=e[23];let P;e[24]===Symbol.for("react.memo_cache_sentinel")?(P=r.jsx(on,{className:"h-4 w-4"}),e[24]=P):P=e[24];let y;e[25]!==l?(y=l("thread.branchPicker.localTurnOff"),e[25]=l,e[26]=y):y=e[26];let N;e[27]!==d||e[28]!==y?(N=r.jsxs(ms,{onSelect:d,className:"text-destructive focus:text-destructive",children:[P,y]}),e[27]=d,e[28]=y,e[29]=N):N=e[29];let C;e[30]!==x||e[31]!==N?(C=r.jsxs(sn,{align:"end",children:[x,N]}),e[30]=x,e[31]=N,e[32]=C):C=e[32];let A;e[33]!==C||e[34]!==v?(A=r.jsxs(nn,{children:[v,C]}),e[33]=C,e[34]=v,e[35]=A):A=e[35];let S;return e[36]!==s||e[37]!==A||e[38]!==f?(S=r.jsxs("div",{ref:s,className:"group flex items-center rounded-lg bg-accent",children:[f,A]}),e[36]=s,e[37]=A,e[38]=f,e[39]=S):S=e[39],S}function so(t){const e=$.c(75),{orgId:s,orgSlug:a,userId:n,target:o,owner:d,repo:l,sandboxMap:i,enabled:u,tab:c,onTabChange:h,isV8:p,localUrl:b,onSaveLocal:f,onBack:m,onAdopt:g,draftKind:v}=t,j=xe(),[w,x]=U.useState(""),P=c==="branches"?w:"",y=u&&c==="branches";let N;e[0]!==s||e[1]!==a||e[2]!==d||e[3]!==l||e[4]!==i||e[5]!==P||e[6]!==y||e[7]!==o||e[8]!==n?(N={orgId:s,orgSlug:a,userId:n,target:o,sandboxMap:i,owner:d,repo:l,search:P,enabled:y},e[0]=s,e[1]=a,e[2]=d,e[3]=l,e[4]=i,e[5]=P,e[6]=y,e[7]=o,e[8]=n,e[9]=N):N=e[9];const{recent:C,yours:A,others:S,isLoading:D,hasMore:k,isFetchingMore:O,fetchMore:I}=Xi(N),B=u&&c==="prs";let F;e[10]!==s||e[11]!==a||e[12]!==d||e[13]!==l||e[14]!==B||e[15]!==o?(F={orgId:s,orgSlug:a,target:o,owner:d,repo:l,enabled:B},e[10]=s,e[11]=a,e[12]=d,e[13]=l,e[14]=B,e[15]=o,e[16]=F):F=e[16];const{data:L,isLoading:V}=Fl(F);let z;if(e[17]!==v||e[18]!==I||e[19]!==k||e[20]!==O||e[21]!==D||e[22]!==p||e[23]!==b||e[24]!==g||e[25]!==m||e[26]!==f||e[27]!==h||e[28]!==S||e[29]!==d||e[30]!==V||e[31]!==C||e[32]!==l||e[33]!==w||e[34]!==j||e[35]!==L||e[36]!==c||e[37]!==A){const te=L===void 0?[]:L,M=`${d}/${l}`;let K;e[39]!==M?(K=M.toLowerCase(),e[39]=M,e[40]=K):K=e[40];const J=K;let se;e[41]!==J?(se=E=>E.headRepoFullName?.toLowerCase()===J,e[41]=J,e[42]=se):se=e[42];const W=te.filter(se);let ue;if(e[43]!==v||e[44]!==S||e[45]!==C||e[46]!==A){const E=new Set;ue=[...C,...A,...S].filter(fe=>E.has(fe.name)?!1:(E.add(fe.name),v!=="site"||Zr(fe.name)==="site")),e[43]=v,e[44]=S,e[45]=C,e[46]=A,e[47]=ue}else ue=e[47];const Y=ue;let le;e[48]===Symbol.for("react.memo_cache_sentinel")?(le=r.jsx(Pl,{className:"h-4 w-4 shrink-0"}),e[48]=le):le=e[48];let T;e[49]!==j?(T=j("thread.branchPicker.advancedBack"),e[49]=j,e[50]=T):T=e[50];let ee;e[51]!==m||e[52]!==T?(ee=r.jsxs("button",{type:"button",onClick:m,className:"flex items-center gap-1.5 px-2 py-1.5 text-xs text-muted-foreground hover:text-foreground",children:[le,T]}),e[51]=m,e[52]=T,e[53]=ee):ee=e[53];let G;e[54]!==h?(G=E=>{h(E),x("")},e[54]=h,e[55]=G):G=e[55];let ne;e[56]!==j?(ne=j("thread.branchPicker.branchesTab"),e[56]=j,e[57]=ne):ne=e[57];let re;e[58]!==ne?(re=r.jsx(Lt,{value:"branches",className:"h-6 px-2.5 text-xs",children:ne}),e[58]=ne,e[59]=re):re=e[59];let Se;e[60]!==j?(Se=j("thread.branchPicker.prsTab"),e[60]=j,e[61]=Se):Se=e[61];let he;e[62]!==Se?(he=r.jsx(Lt,{value:"prs",className:"h-6 px-2.5 text-xs",children:Se}),e[62]=Se,e[63]=he):he=e[63];let be;e[64]!==p||e[65]!==j?(be=!p&&r.jsx(Lt,{value:"local",className:"h-6 px-2.5 text-xs",children:j("thread.branchPicker.localTab")}),e[64]=p,e[65]=j,e[66]=be):be=e[66];let ce;e[67]!==re||e[68]!==he||e[69]!==be?(ce=r.jsxs(qr,{className:"h-auto w-fit justify-start gap-1 bg-accent p-1",variant:"pill",children:[re,he,be]}),e[67]=re,e[68]=he,e[69]=be,e[70]=ce):ce=e[70];let ie;e[71]!==G||e[72]!==ce||e[73]!==c?(ie=r.jsx(Hr,{className:"px-2 pt-2 pb-1",value:c,onValueChange:G,children:ce}),e[71]=G,e[72]=ce,e[73]=c,e[74]=ie):ie=e[74],z=r.jsxs("div",{className:"flex flex-col",children:[ee,ie,c==="local"&&!p?r.jsx(Ui,{url:b,onSave:f}):r.jsxs(yl,{filter:c==="branches"?no:void 0,children:[r.jsx(jl,{placeholder:j(c==="branches"?"thread.branchPicker.searchBranches":"thread.branchPicker.searchPullRequests"),value:w,onValueChange:x}),r.jsx(wl,{onScroll:E=>{const fe=E.currentTarget;c==="branches"&&fe.scrollHeight-fe.scrollTop-fe.clientHeight<48&&I()},children:c==="branches"?r.jsxs(r.Fragment,{children:[D&&r.jsx("div",{className:"p-3 text-xs text-muted-foreground",children:j("thread.branchPicker.loadingMore")}),!D&&Y.length===0&&r.jsx(tr,{children:j("thread.branchPicker.noBranchesFound")}),Y.length>0&&r.jsx(sr,{children:Y.map(E=>r.jsxs(nr,{value:E.name,className:"cursor-pointer",onSelect:()=>g(E.name,E.name),children:[r.jsx(Ga,{className:"mr-2 h-4 w-4 shrink-0"}),r.jsx("span",{className:"flex-1 truncate",children:E.name})]},E.name))}),k&&r.jsx("div",{className:"p-2",children:r.jsx(ge,{variant:"ghost",size:"sm",className:"h-7 w-full text-xs",disabled:O,onClick:I,children:j(O?"thread.branchPicker.loadingMore":"thread.branchPicker.loadMoreBranches")})})]}):r.jsxs(r.Fragment,{children:[V&&r.jsx("div",{className:"p-3 text-xs text-muted-foreground",children:j("thread.branchPicker.loadingPullRequests")}),!V&&W.length===0&&r.jsx(tr,{children:j("thread.branchPicker.noOpenPullRequests")}),W.length>0&&r.jsx(sr,{children:W.map(E=>r.jsxs(nr,{value:`#${E.number} ${E.title} ${E.head}`,className:"cursor-pointer",onSelect:()=>g(E.head,ir(E.title)),children:[r.jsx(ln,{className:"mr-2 h-4 w-4 shrink-0 text-muted-foreground"}),r.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[r.jsx("span",{className:"truncate",children:ir(E.title)}),r.jsxs("span",{className:"truncate text-xs text-muted-foreground",children:["#",E.number," · ",E.head]})]})]},E.number))})]})})]})]}),e[17]=v,e[18]=I,e[19]=k,e[20]=O,e[21]=D,e[22]=p,e[23]=b,e[24]=g,e[25]=m,e[26]=f,e[27]=h,e[28]=S,e[29]=d,e[30]=V,e[31]=C,e[32]=l,e[33]=w,e[34]=j,e[35]=L,e[36]=c,e[37]=A,e[38]=z}else z=e[38];return z}function no(t,e){return vn(t,e)?1:0}function ro(t){const e=$.c(20),{locked:s,placement:a,value:n,virtualMcpId:o,isV8:d,userLabel:l,baseBranch:i,baseIsDraft:u,onChange:c,onCreateBranch:h,onAdoptBranch:p,orgId:b,orgSlug:f,userId:m,target:g,owner:v,repo:j,sandboxMap:w,draftKind:x}=t;let P;return e[0]!==i||e[1]!==u||e[2]!==x||e[3]!==d||e[4]!==s||e[5]!==p||e[6]!==c||e[7]!==h||e[8]!==b||e[9]!==f||e[10]!==v||e[11]!==a||e[12]!==j||e[13]!==w||e[14]!==g||e[15]!==m||e[16]!==l||e[17]!==n||e[18]!==o?(P=r.jsx(eo,{virtualMcpId:o,isV8:d,userLabel:l,value:n,baseBranch:i,baseIsDraft:u,orgId:b,orgSlug:f,userId:m,target:g,owner:v,repo:j,sandboxMap:w,onChange:c,onCreateBranch:h,onAdoptBranch:p,spawnsNewChat:s,placement:a,draftKind:x}),e[0]=i,e[1]=u,e[2]=x,e[3]=d,e[4]=s,e[5]=p,e[6]=c,e[7]=h,e[8]=b,e[9]=f,e[10]=v,e[11]=a,e[12]=j,e[13]=w,e[14]=g,e[15]=m,e[16]=l,e[17]=n,e[18]=o,e[19]=P):P=e[19],P}function ao(t){const e=$.c(2),{branchPill:s}=t;if(!s)return null;let a;return e[0]!==s?(a=r.jsx(r.Fragment,{children:s}),e[0]=s,e[1]=a):a=e[1],a}function lo(t){const{locked:e,sessionRuntime:s,projectRuntime:a,draftRuntime:n,current:o}=t;return t.contentOnly&&n==="cms"?s==="cms"&&!e?{kind:"switch"}:{kind:"new-chat",runtime:"cms"}:n==="sandbox"&&s!=="sandbox"?{kind:"new-chat",runtime:"sandbox"}:n==="cms"&&s==="sandbox"&&a==="cms"&&!o?{kind:"new-chat"}:e?s==="sandbox"?{kind:"new-chat",runtime:"sandbox"}:{kind:"new-chat"}:{kind:"switch"}}function io(t){const e=$.c(25),{virtualMcp:s,currentBranch:a}=t,n=ll(),o=vs();let d;e[0]!==n?.messages||e[1]!==o?.isThreadLocked?(d=(n?.messages??[]).length>0||(o?.isThreadLocked??!1),e[0]=n?.messages,e[1]=o?.isThreadLocked,e[2]=d):d=e[2];const l=d,i=o?.setCurrentTaskBranch,u=o?.createTask,c=ea()==="blog"?"blog":"site",h=ys(s?.id),p=h.runtime,b=s?.metadata;let f;e[3]!==b?(f=ta(b),e[3]=b,e[4]=f):f=e[4];const m=f,g=m==="cms"&&p==="sandbox",v=Dl(s),j=ze(v),{data:w}=rn.useSession(),x=w?.user;let P;e[5]!==x?(P=In(x),e[5]=x,e[6]=P):P=e[6];const y=P,N=w?.user?.id??"",{org:C}=Is(),A=Ll(s,a),S=$n(s?.id),D=S&&p==="cms";let k;e[7]!==u||e[8]!==a||e[9]!==l||e[10]!==m||e[11]!==p||e[12]!==h.resolved||e[13]!==i||e[14]!==S?(k=(te,M)=>{const K=lo({locked:l,sessionRuntime:h.resolved?p:null,projectRuntime:m,draftRuntime:M&&(M.runtime??m),current:te===a,contentOnly:S});K.kind==="new-chat"&&u?u({branch:te,...K.runtime?{runtime:K.runtime}:{}}):i&&i(te)},e[7]=u,e[8]=a,e[9]=l,e[10]=m,e[11]=p,e[12]=h.resolved,e[13]=i,e[14]=S,e[15]=k):k=e[15];const O=k;let I;e[16]!==g||e[17]!==u||e[18]!==l||e[19]!==i?(I=te=>{(l||g)&&u?u({branch:te}):i&&i(te)},e[16]=g,e[17]=u,e[18]=l,e[19]=i,e[20]=I):I=e[20];const B=I;let F;e[21]!==u?(F=u?te=>u({runtime:"sandbox",branch:te}):void 0,e[21]=u,e[22]=F):F=e[22];const L=F,V=v&&sa(j)?r.jsx(ro,{userLabel:y,virtualMcpId:s?.id??"",isV8:S,value:a,baseBranch:A,baseIsDraft:D,orgId:C.id,orgSlug:C.slug,userId:N,target:j,owner:v.owner,repo:v.name,sandboxMap:s?.metadata?.sandboxMap,onChange:O,onCreateBranch:B,onAdoptBranch:L,locked:l,placement:"chat",draftKind:c},`${na(j)}:${v.owner}/${v.name}`):null;let z;return e[23]!==V?(z=r.jsx(ao,{branchPill:V}),e[23]=V,e[24]=z):z=e[24],z}const oo=Ja("flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg",{variants:{orientation:{horizontal:"[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",vertical:"flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none"}},defaultVariants:{orientation:"horizontal"}});function co(t){const e=$.c(11);let s,a,n;e[0]!==t?({className:s,orientation:a,...n}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=n):(s=e[1],a=e[2],n=e[3]);let o;e[4]!==s||e[5]!==a?(o=H(oo({orientation:a}),s),e[4]=s,e[5]=a,e[6]=o):o=e[6];let d;return e[7]!==a||e[8]!==n||e[9]!==o?(d=r.jsx("div",{role:"group","data-slot":"button-group","data-orientation":a,className:o,...n}),e[7]=a,e[8]=n,e[9]=o,e[10]=d):d=e[10],d}function uo(t){const e=$.c(14),{item:s}=t;let a;e[0]!==s?(a=()=>{s.onSelect()},e[0]=s,e[1]=a):a=e[1];let n;e[2]!==s.disabled||e[3]!==s.icon||e[4]!==s.label||e[5]!==a?(n=r.jsxs(ms,{disabled:s.disabled,onSelect:a,children:[s.icon,s.label]}),e[2]=s.disabled,e[3]=s.icon,e[4]=s.label,e[5]=a,e[6]=n):n=e[6];const o=n;if(!s.tooltip)return o;let d;e[7]!==o?(d=r.jsx(it,{asChild:!0,children:o}),e[7]=o,e[8]=d):d=e[8];let l;e[9]!==s.tooltip?(l=r.jsx(ot,{side:"right",children:s.tooltip}),e[9]=s.tooltip,e[10]=l):l=e[10];let i;return e[11]!==d||e[12]!==l?(i=r.jsxs(lt,{children:[d,l]}),e[11]=d,e[12]=l,e[13]=i):i=e[13],i}function ga(t){const e=$.c(20),{label:s,onClick:a,variant:n,size:o,disabled:d,loading:l,pulse:i,tooltip:u,icon:c,items:h,menuAriaLabel:p,className:b}=t,f=n===void 0?"default":n,m=o===void 0?"default":o,g=d===void 0?!1:d,v=l===void 0?!1:l,j=i===void 0?!1:i,w=(h?.length??0)>0;let x;if(e[0]!==b||e[1]!==g||e[2]!==w||e[3]!==c||e[4]!==h||e[5]!==s||e[6]!==v||e[7]!==p||e[8]!==a||e[9]!==j||e[10]!==m||e[11]!==u||e[12]!==f){const P=H(Kr,f==="default"&&"focus-visible:inset-ring-current");let y;e[14]!==c||e[15]!==v?(y=v?r.jsx(ps,{size:"xs"}):c,e[14]=c,e[15]=v,e[16]=y):y=e[16];const N=r.jsxs(ge,{type:"button",variant:f,size:m,disabled:g,"aria-busy":v||void 0,onClick:v?void 0:a,className:H(P,w&&"rounded-r-none border-r border-current/20"),children:[y,s]}),C=j&&"animate-pulse-brightness motion-reduce:animate-none motion-reduce:opacity-80";let A;e[17]!==b||e[18]!==C?(A=H(C,b),e[17]=b,e[18]=C,e[19]=A):A=e[19],x=r.jsxs(co,{className:A,children:[u?r.jsxs(lt,{children:[r.jsx(it,{asChild:!0,children:r.jsx("span",{className:H("inline-flex rounded-lg outline-none",P,g&&"cursor-not-allowed"),tabIndex:g?0:void 0,role:g?"button":void 0,"aria-disabled":g||void 0,children:N})}),r.jsx(ot,{children:u})]}):N,w?r.jsxs(nn,{children:[r.jsx(tn,{asChild:!0,children:r.jsx(ge,{type:"button",variant:f,size:m,"aria-label":p,className:H("has-[>svg]:px-2",P),children:r.jsx(Vr,{className:"size-3.5"})})}),r.jsx(sn,{align:"end",children:h?.map(ho)})]}):null]}),e[0]=b,e[1]=g,e[2]=w,e[3]=c,e[4]=h,e[5]=s,e[6]=v,e[7]=p,e[8]=a,e[9]=j,e[10]=m,e[11]=u,e[12]=f,e[13]=x}else x=e[13];return x}function ho(t){return r.jsx(uo,{item:t},t.key)}async function fo(t){if(t.hosted)return;const e=t.branch;await t.setCurrentTaskBranch(t.nextBranch()),e&&e!==t.baseBranch&&await t.deleteRelease(e)}function mo(t,e,{hosted:s}){return s&&t!==null?t:e}function po(t,e){const s=$.c(11),[a,n]=U.useState(null);let o;s[0]!==a||s[1]!==t||s[2]!==e?(o=mo(a,t,e),s[0]=a,s[1]=t,s[2]=e,s[3]=o):o=s[3];let d;s[4]!==t||s[5]!==e?(d=()=>n(e.hosted?t:null),s[4]=t,s[5]=e,s[6]=d):d=s[6];let l;s[7]===Symbol.for("react.memo_cache_sentinel")?(l=()=>n(null),s[7]=l):l=s[7];let i;return s[8]!==o||s[9]!==d?(i={shown:o,hold:d,release:l},s[8]=o,s[9]=d,s[10]=i):i=s[10],i}function bo({open:t,hosted:e}){return t||e}function xa(t){return ri({userName:t?.name,userEmail:t?.email})??void 0}function dn(t){const e=$.c(18),{state:s,header:a,body:n,note:o,gate:d,footer:l}=t,i=s!=="ready";let u;e[0]!==a?(u=r.jsx("div",{className:"space-y-0.5 px-4 py-3",children:a}),e[0]=a,e[1]=u):u=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=r.jsx("div",{className:"border-t"}),e[2]=c):c=e[2];let h;e[3]!==o?(h=o?r.jsx("div",{className:"space-y-1.5 border-t px-4 py-3",children:o}):null,e[3]=o,e[4]=h):h=e[4];let p;e[5]!==n||e[6]!==h?(p=r.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[n,h]}),e[5]=n,e[6]=h,e[7]=p):p=e[7];let b;e[8]===Symbol.for("react.memo_cache_sentinel")?(b=r.jsx("div",{className:"border-t"}),e[8]=b):b=e[8];let f;e[9]!==l?(f=r.jsx("div",{className:"space-y-2 px-4 py-3",children:l}),e[9]=l,e[10]=f):f=e[10];let m;return e[11]!==d||e[12]!==s||e[13]!==i||e[14]!==u||e[15]!==p||e[16]!==f?(m=r.jsxs("div",{className:"flex min-h-0 flex-1 flex-col","data-publish-state":s,"aria-busy":i,children:[u,c,p,d,b,f]}),e[11]=d,e[12]=s,e[13]=i,e[14]=u,e[15]=p,e[16]=f,e[17]=m):m=e[17],m}function Bs(t){const e=$.c(2),{children:s}=t;let a;return e[0]!==s?(a=r.jsx("div",{className:"scroll-fade min-h-0 flex-1 space-y-3 overflow-y-auto overscroll-contain px-4 pt-3 pb-2 [scrollbar-width:thin]",children:s}),e[0]=s,e[1]=a):a=e[1],a}function va(t){const e=$.c(10);let s,a,n;e[0]!==t?({className:a,children:s,...n}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=n):(s=e[1],a=e[2],n=e[3]);let o;e[4]!==a?(o=H("rounded-lg border bg-card px-3 py-2.5",a),e[4]=a,e[5]=o):o=e[5];let d;return e[6]!==s||e[7]!==n||e[8]!==o?(d=r.jsx("div",{className:o,...n,children:s}),e[6]=s,e[7]=n,e[8]=o,e[9]=d):d=e[9],d}function Qe(t){const e=$.c(4),{className:s}=t;let a;e[0]!==s?(a=H("animate-pulse rounded bg-muted motion-reduce:animate-none",s),e[0]=s,e[1]=a):a=e[1];let n;return e[2]!==a?(n=r.jsx("div",{className:a}),e[2]=a,e[3]=n):n=e[3],n}function Ot(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx(va,{children:r.jsxs("div",{className:"flex items-center gap-2.5",children:[r.jsx(Qe,{className:"size-4 rounded-md"}),r.jsx(Qe,{className:"h-3 w-24"}),r.jsx(Qe,{className:"h-2.5 w-16"}),r.jsx(Qe,{className:"ml-auto size-6 rounded"})]})}),t[0]=e):e=t[0],e}const ya="secret";function ja(t){return t.kind!=="block"?null:t.namedRule??null}function go(t,e){const s=e.find(a=>a&&typeof a=="object");return s?Yl(s.__resolveType):Zl(t)}const xo=/(?:^|\/)\.deco\/blocks\/([^/]+)\.json$/;function qn(t){const e=xo.exec(t)?.[1];return e?Ci(e):null}function en(t){if(!t)return null;try{const e=JSON.parse(t);if(e&&typeof e=="object"&&!Array.isArray(e))return e}catch{}return null}function vo(t,e){return t===null?"new":e===null?"removed":"edited"}function wa(t){const e=t.replace(/[_-]+/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").trim();return e?(e.charAt(0).toUpperCase()+e.slice(1)).replace(/\s+[A-Z](?=[a-z])/g,s=>s.toLowerCase()):t}function fs(t,e,s=!1){if(t&&typeof t=="object"&&!Array.isArray(t)){const a=t.__resolveType;if(typeof a=="string"&&a.trim()){if(s)return Wa(a);const o=(a.split("/").pop()??a).replace(/\.[jt]sx?$/,"");return wa(o)||o}}return`Section ${e+1}`}function Hn(t){if(Nr(t))return t.value??null;const e=t.__resolveType;return typeof e=="string"&&Qa(e)?t.section??null:null}const Pa=6;function Vs(t,e=0){if(e>Pa||!t||typeof t!="object")return[];if(Array.isArray(t))return t.flatMap(n=>Vs(n,e+1));const s=t;if(Sn(s.__resolveType))return yn(s).flatMap(n=>Vs(n?.value,e+1));const a=Hn(s);return a!==null?Vs(a,e+1):[s]}function yn(t){const e=t?.variants;return Array.isArray(e)?e.map(s=>s&&typeof s=="object"&&!Array.isArray(s)?s:null):[]}function cr(t){let e=t;for(let s=0;s<Pa;s++){if(!e||typeof e!="object"||Array.isArray(e))return null;const a=e;if(Sn(a.__resolveType))return a;const n=Hn(a);if(n===null)return null;e=n}return null}function yo(t,e,s){const a=yn(cr(t)),n=e?yn(cr(e)):[],o=e?Array.from({length:Math.max(a.length,n.length)},(i,u)=>u).filter(i=>!un(a[i],n[i])):[],l=[...o.map(i=>a[i]??n[i]),...a.filter((i,u)=>!o.includes(u))].flatMap(i=>Vs(i?.value)).map(i=>fs(i,s,!0));return[...new Set(l)]}function bn(t,e,s,a,n){let o=t,d=!1;for(let i=0;i<4;i++){if(!o||typeof o!="object"||Array.isArray(o)){d=!0;break}const u=o;if(Sn(u.__resolveType)){d=!0;break}const c=Hn(u);if(c===null)break;o=c}const l=d?yo(t,n,e):[];return{name:fs(d?t:o,e,!0),kind:"section",status:s,fields:a,...d?{wrapper:!0}:{},...l.length>0?{held:l}:{}}}function jn(t,e){const s=t.sections;if(Array.isArray(s))return s.flatMap((a,n)=>a&&typeof a=="object"&&!Array.isArray(a)?[{section:a,basePath:["sections",n]}]:[]);if(s&&typeof s=="object"){const a=s.variants;if(Array.isArray(a))return a.flatMap((n,o)=>{const d=n&&typeof n=="object"&&!Array.isArray(n)?n.value:null,l=e&&Nr(d),i=l?d.value:d;if(!Array.isArray(i))return[];const u=l?["sections","variants",o,"value","value"]:["sections","variants",o,"value"];return i.flatMap((c,h)=>c&&typeof c=="object"&&!Array.isArray(c)?[{section:c,basePath:[...u,h]}]:[])})}return[]}function dr(t){return JSON.stringify(t,(e,s)=>{if(s&&typeof s=="object"&&!Array.isArray(s)){const a=s;return Object.keys(a).sort().reduce((n,o)=>(n[o]=a[o],n),{})}return s})}function un(t,e){return t===void 0&&e===void 0?!0:dr(t)===dr(e)}function Rt(t,e,s,a=new Set){const n=new Set([...Object.keys(t??{}),...Object.keys(e??{})]),o=[];for(const d of n){if(d.startsWith("__")||a.has(d))continue;const l=t?t[d]:void 0,i=e?e[d]:void 0;un(l,i)||o.push({label:wa(d),path:[...s,d],from:l,to:i})}return o}function jo(t,e){const s=e.find(a=>a&&typeof a=="object");return s?s.__resolveType===li:t===ii}function wo(t,e){const s=n=>n===void 0||!!n&&typeof n=="object"&&!Array.isArray(n)&&!("__resolveType"in n),a=[];for(const n of Rt(t,e,[])){const o=String(n.path[0]);s(n.from)&&s(n.to)?a.push(...Rt(n.from??{},n.to??{},[o])):a.push(n)}return a}const Po=new Set(["sections"]);function Vn(t,e,s=!1){const a=t?jn(t,s):[],n=e?jn(e,s):[],o=[],d=Math.max(a.length,n.length);for(let i=0;i<d;i++){const u=a[i],c=n[i];if(!s){const h=So(u,c,i);h&&o.push(h);continue}if(u&&c){if(un(u.section,c.section))continue;o.push(bn(c.section,i,"edited",Rt(u.section,c.section,c.basePath),u.section))}else c?o.push(bn(c.section,i,"new",[])):u&&o.push(bn(u.section,i,"removed",[]))}const l=Rt(t,e,[],Po);return l.length>0&&o.push({name:"Page settings",kind:"settings",status:"edited",fields:l}),o}function So(t,e,s){return t&&e?un(t.section,e.section)?null:{name:fs(e.section,s),kind:"section",status:"edited",fields:Rt(t.section,e.section,e.basePath)}:e?{name:fs(e.section,s),kind:"section",status:"new",fields:[]}:t?{name:fs(t.section,s),kind:"section",status:"removed",fields:[]}:null}function wn(t,e){return{kind:"other",blockKey:null,name:t.split("/").pop()??t,pagePath:null,isSiteApp:!1,status:e,filepaths:[t],sections:[],fromJson:null,toJson:null}}function ko(t){const e=[],s=[],a=[],n=[];for(const[o,d]of Object.entries(t?.diffs??{})){if(Mn(o)){n.push(o);continue}const l=vo(d.from,d.to),i=qn(o);if(!i){a.push(wn(o,l));continue}const u=en(d.from),c=en(d.to),h=c??u;if(!h){a.push(wn(o,l));continue}const p=hs(i,h);if(p){e.push({kind:"page",blockKey:i,name:p.name,pagePath:p.path,isSiteApp:!1,status:l,filepaths:[o],sections:l==="edited"?Vn(u,c).map(f=>({...f,fields:bs(f.fields)})):[],fromJson:Fe(u),toJson:Fe(c)});continue}const b=Fn(i,h);s.push({kind:"block",blockKey:i,name:Xs(i,h),pagePath:null,isSiteApp:b,status:l,filepaths:[o],sections:l==="edited"?[{name:Xs(i,h),kind:"section",status:"edited",fields:bs(Rt(u,c,[]))}].filter(f=>f.fields.length>0):[],fromJson:Fe(u),toJson:Fe(c)})}return Sa({pages:e,blocks:s,other:a,generated:n})}function gn(t,e){return(t.filepaths[0]??"").localeCompare(e.filepaths[0]??"")}function Sa(t){const{pages:e,blocks:s,other:a,generated:n}=t;return e.sort(gn),s.sort(gn),a.sort(gn),{pages:e,blocks:s,other:a,generated:n,count:e.length+s.length+a.length}}function No(t){return t==="added"?"new":t==="removed"?"removed":"edited"}function ka(t){return t.startsWith("pages-")}function Na(t){const{files:e,lookup:s,diff:a}=t,n=[],o=[],d=[],l=[];for(const i of e){const u=i.path;if(Mn(u)){l.push(u);continue}const c=No(i.status),h=qn(u);if(!h){d.push(wn(u,c));continue}const p=a?.diffs[u],b=en(p?.from??null),f=en(p?.to??null),m=Ca(s,h),g=m??f??b;if((m?hs(h,m):null)??(!m&&ka(h))){const w=g?hs(h,g):null;n.push({kind:"page",blockKey:h,name:w?.name??ua(h),pagePath:w?.path??null,isSiteApp:!1,status:c,filepaths:[u],sections:c==="edited"?Vn(b,f).map(x=>({...x,fields:bs(x.fields)})):[],fromJson:Fe(b),toJson:Fe(f??(c==="new"?m:null))});continue}const j=Xs(h,g??{});o.push({kind:"block",blockKey:h,name:j,pagePath:null,isSiteApp:Fn(h,m??{}),status:c,filepaths:[u],sections:c==="edited"?[{name:j,kind:"section",status:"edited",fields:bs(Rt(b,f,[]))}].filter(w=>w.fields.length>0):[],fromJson:Fe(b),toJson:Fe(f)})}return Sa({pages:n,blocks:o,other:d,generated:l})}function Ca(t,e){const s=t?.[e];return s&&typeof s=="object"&&!Array.isArray(s)?s:null}function Co(t,e){return t??e}function Aa(t){return t.length<=1?t[0]??"":`${t.slice(0,-1).join(", ")} and ${t[t.length-1]}`}const xn=3;function zs(t){if(t.length<=xn)return Aa(t);const e=t.length-xn;return`${t.slice(0,xn).join(", ")} and ${e} more`}function Ao(t,e){if(!e){const a=t.sections.filter(n=>n.kind==="section").map(n=>n.name).slice(0,3);return a.length>0?`${t.name} (${a.join(", ")})`:t.name}const s=[...new Set(t.sections.filter(a=>a.kind==="section").flatMap(a=>a.wrapper?a.held??[]:[a.name]))].slice(0,3);return s.length>0?`${t.name} (${s.join(", ")})`:t.name}function Ro(t){const e=ja(t);return e==="experiments"?"A/B tests":e==="campaigns"?"Campaign dates":t.name}function Do(t){const e=[],s=t.pages.filter(l=>l.status==="edited"),a=t.pages.filter(l=>l.status==="new"),n=t.pages.filter(l=>l.status==="removed");if(s.length>0&&e.push(`updated ${zs(s.map(l=>Ao(l,!!t.v8)))}`),a.length>0){const l=a.length===1?"page":"pages";e.push(`added the ${zs(a.map(i=>i.name))} ${l}`)}if(n.length>0){const l=n.length===1?"page":"pages";e.push(`removed the ${zs(n.map(i=>i.name))} ${l}`)}const o=t.blocks.map(Ro);if(o.length>0&&e.push(`changed ${zs(o)}`),t.other.length>0){const l=t.other.length===1?"file":"files";e.push(`changed ${t.other.length} ${l}`)}if(e.length===0)return"";const d=Aa(e);return ai(d.charAt(0).toUpperCase()+d.slice(1))}function To(t,e){return t?jn(t,e).length:0}function Bo(t,e=!1){const s={newPageSections:t.kind==="page"&&t.status==="new"?To(t.toJson,e):null,sections:0,settings:!1,fields:0};if(s.newPageSections!==null)return s;for(const a of t.sections){if(a.kind==="settings"){s.settings=!0;continue}t.kind==="page"?s.sections+=1:s.fields+=a.fields.length}return s}const ur="••••••";function Fe(t){if(Array.isArray(t))return t.map(Fe);if(!t||typeof t!="object")return t;const e=t,s={};for(const[a,n]of Object.entries(e))s[a]=Fe(n);return e.__resolveType===ya&&"ciphertext"in e&&(s.ciphertext=ur),kr(e)&&"encrypted"in e&&(s.encrypted=ur),s}function Io(t){const e=t.toJson??t.fromJson;return!!e&&(e.__resolveType===ya||kr(e))}function bs(t){return t.map(e=>({...e,from:Fe(e.from),to:Fe(e.to)}))}function $o(t){const{changes:e,sides:s,lookup:a,meta:n,hosted:o}=t,d=[],l=[],i=c=>[...new Set((s?.diagnostics??[]).filter(h=>Zn(Xa(h.file))===Zn(c)).map(h=>h.side))],u=Object.keys(e).sort((c,h)=>c<h?-1:c>h?1:0);for(const c of u){const h=e[c],p=h.kind==="delete"?"removed":h.baseVersion===null?"new":"edited",b=s?.entries[c],f=b?.before??null,m=b?.after??null,g=Ca(a,c),v=g??m??f,j=i(c),w={blockKey:c,status:p,filepaths:[],entry:{name:c,version:h.version},...j.length>0?{unreadable:j}:{},fromJson:Fe(f),toJson:Fe(m??(p==="new"?g:null))},x=g?hs(c,g,n):null,P=!g&&v?hs(c,v,n):null;if(x??P??(!v&&ka(c))){const S=v?hs(c,v,n):null;d.push({...w,kind:"page",name:S?.name??ua(c),pagePath:S?.path??null,isSiteApp:!1,sections:p==="edited"?Vn(f,m,!0).map(D=>({...D,fields:bs(D.fields)})):[]});continue}const y=o?Ql(c,v,g,m,f):null,N=y?Xl(y,[v,g,m,f]):Xs(c,v??{}),C=go(c,[g,m,f]),A=jo(c,[g,m,f]);l.push({...w,kind:"block",name:A?"Settings":N,...A?{cmsSettings:!0}:{},...y?{blogKind:y}:{},...C?{namedRule:C}:{},pagePath:null,isSiteApp:Fn(c,g??v??{}),sections:p==="edited"?[{name:A?"Settings":N,kind:"section",status:"edited",fields:bs(A?wo(f,m):Rt(f,m,[]))}].filter(S=>S.fields.length>0):[]})}return{pages:d,blocks:l,other:[],generated:[],count:d.length+l.length,v8:!0}}function Ae(t){return t.filepaths[0]??t.blockKey??t.name}function Fo(t,e){return e(t==="new"?"thread.publishPopover.chipNew":t==="removed"?"thread.publishPopover.chipRemoved":"thread.publishPopover.chipEdited")}function Lo(t,e){const s=t.kind==="block"?mi:Jr;return r.jsx("span",{title:Fo(t.status,e),className:"flex shrink-0",children:r.jsx(s,{className:H("size-4",t.status==="new"&&"text-brand",t.status==="edited"&&"text-warning",t.status==="removed"&&"text-destructive")})})}function Oo(t,e){if(t.kind==="page")return t.pagePath;if(t.kind!=="block")return null;if(t.blogKind)return ei(t.blogKind,e);if(t.cmsSettings)return e("thread.publishPopover.settingsDetail");const s=ja(t);return s==="experiments"?e("thread.publishPopover.abTests"):s==="campaigns"?e("thread.publishPopover.campaignDates"):t.isSiteApp?e("thread.publishPopover.siteConfiguration"):e("thread.publishPopover.globalSection")}function Mo(t,e,s){const a=Bo(t,s);if(a.newPageSections!==null)return[a.newPageSections===1?e("thread.publishPopover.newPageSectionOne"):e("thread.publishPopover.newPageSections",{count:a.newPageSections})];const n=[];return a.sections===1?n.push(e("thread.publishPopover.sectionChangedOne")):a.sections>1&&n.push(e("thread.publishPopover.sectionsChanged",{count:a.sections})),a.fields===1?n.push(e("thread.publishPopover.fieldChangedOne")):a.fields>1&&n.push(e("thread.publishPopover.fieldsChanged",{count:a.fields})),a.settings&&n.push(e("thread.publishPopover.pageSettingsChanged")),n}function Ra(t){const e=$.c(46),{change:s,bodyPending:a,selected:n,onSelect:o,confirming:d,onConfirmingChange:l,onDiscard:i,isPublishing:u,isDiscarding:c,v8:h}=t,p=a===void 0?!1:a,b=h===void 0?!1:h,f=xe();let m;e[0]!==s||e[1]!==f?(m=Oo(s,f),e[0]=s,e[1]=f,e[2]=m):m=e[2];const g=m;let v;if(e[3]!==p||e[4]!==s||e[5]!==d||e[6]!==g||e[7]!==c||e[8]!==u||e[9]!==l||e[10]!==i||e[11]!==o||e[12]!==n||e[13]!==f||e[14]!==b){const j=Mo(s,f,b),w=p&&j.length===0&&s.status==="edited",x=n&&"border-foreground/30 bg-accent hover:bg-secondary-hover";let P;e[16]!==x?(P=H("cursor-pointer transition-colors hover:bg-accent",x),e[16]=x,e[17]=P):P=e[17];let y;e[18]!==s?(y=Ae(s),e[18]=s,e[19]=y):y=e[19];let N;e[20]!==s||e[21]!==f?(N=Lo(s,f),e[20]=s,e[21]=f,e[22]=N):N=e[22];let C;e[23]!==s.cmsSettings||e[24]!==s.name||e[25]!==f?(C=s.cmsSettings?f("thread.publishPopover.settings"):s.name,e[23]=s.cmsSettings,e[24]=s.name,e[25]=f,e[26]=C):C=e[26];let A;e[27]!==C?(A=r.jsx("span",{className:"truncate text-sm font-medium",children:C}),e[27]=C,e[28]=A):A=e[28];let S;e[29]!==g?(S=g?r.jsx("span",{className:"truncate text-xs text-muted-foreground",children:g}):null,e[29]=g,e[30]=S):S=e[30];let D;e[31]!==n||e[32]!==A||e[33]!==S?(D=r.jsxs("button",{type:"button",className:"flex min-w-0 flex-1 items-center gap-2 text-left","aria-pressed":n,children:[A,S]}),e[31]=n,e[32]=A,e[33]=S,e[34]=D):D=e[34];let k;e[35]!==d||e[36]!==c||e[37]!==u||e[38]!==l||e[39]!==i||e[40]!==f?(k=d?r.jsxs("div",{className:"flex shrink-0 items-center gap-1.5",children:[r.jsx("button",{type:"button",className:"text-xs text-muted-foreground hover:text-foreground",onClick:I=>{I.stopPropagation(),l(!1)},children:f("thread.publishDialog.cancel")}),r.jsx("button",{type:"button",className:"text-xs font-medium text-destructive disabled:opacity-50",onClick:I=>{I.stopPropagation(),l(!1),i?.()},disabled:c,children:f("thread.publishPopover.discard")})]}):i?r.jsx(an,{children:r.jsxs(lt,{children:[r.jsx(it,{asChild:!0,children:r.jsx(ge,{type:"button",variant:"ghost-destructive",size:"icon-xs","aria-label":f("thread.publishPopover.discard"),className:"shrink-0 disabled:pointer-events-auto",onClick:I=>{I.stopPropagation(),l(!0)},disabled:u||c,children:r.jsx(on,{className:"size-3.5"})})}),r.jsx(ot,{children:f("thread.publishPopover.discard")})]})}):null,e[35]=d,e[36]=c,e[37]=u,e[38]=l,e[39]=i,e[40]=f,e[41]=k):k=e[41];let O;e[42]!==D||e[43]!==k||e[44]!==N?(O=r.jsxs("div",{className:"flex items-center gap-2.5",children:[N,D,k]}),e[42]=D,e[43]=k,e[44]=N,e[45]=O):O=e[45],v=r.jsxs(va,{className:P,"data-change-id":y,onClick:o,children:[O,j.length>0?r.jsx("div",{className:"mt-1 space-y-0.5 pl-[26px] text-xs text-muted-foreground",children:j.map(_o)}):w?r.jsx("div",{className:"mt-1 space-y-0.5 pl-[26px]",children:r.jsx(Qe,{className:"h-4 w-2/3"})}):null]}),e[3]=p,e[4]=s,e[5]=d,e[6]=g,e[7]=c,e[8]=u,e[9]=l,e[10]=i,e[11]=o,e[12]=n,e[13]=f,e[14]=b,e[15]=v}else v=e[15];return v}function _o(t,e){return r.jsx("div",{className:"truncate",children:t},`${e}-${t}`)}function Da(){const t=$.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={width:-1,height:-1},t[0]=e):e=t[0];const[s,a]=U.useState(e);let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=l=>{if(!l)return;const i=()=>a(c=>c.width===l.clientWidth&&c.height===l.clientHeight?c:{width:l.clientWidth,height:l.clientHeight});i();const u=new ResizeObserver(i);return u.observe(l),()=>u.disconnect()},t[1]=n):n=t[1];const o=n;let d;return t[2]!==s?(d=[s,o],t[2]=s,t[3]=d):d=t[3],d}function Eo(){return document.documentElement.classList.contains("dark")?"vs-dark":"vs"}const zo=[{width:"w-3/4",tone:"ctx"},{width:"w-1/2",tone:"del"},{width:"w-3/5",tone:"add"},{width:"w-2/5",tone:"ctx"},{width:"w-4/5",tone:"add"},{width:"w-1/2",tone:"ctx"}];function hr(t){const e=$.c(10),{height:s}=t,a=xe();let n;e[0]!==s?(n={height:s},e[0]=s,e[1]=n):n=e[1];let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=zo.map(Uo),e[2]=o):o=e[2];let d;e[3]!==a?(d=a("thread.publishDialog.openingComparison"),e[3]=a,e[4]=d):d=e[4];let l;e[5]!==d?(l=r.jsx("div",{className:"flex items-center justify-center pt-1 text-2xs text-muted-foreground",children:d}),e[5]=d,e[6]=l):l=e[6];let i;return e[7]!==n||e[8]!==l?(i=r.jsxs("div",{style:n,className:"flex w-full flex-col gap-1.5 overflow-hidden px-3 py-2",children:[o,l]}),e[7]=n,e[8]=l,e[9]=i):i=e[9],i}function Uo(t,e){return r.jsxs("div",{className:H("flex items-center gap-2 rounded px-1 py-0.5",t.tone==="del"&&"bg-destructive/5",t.tone==="add"&&"bg-success/5"),children:[r.jsx("div",{className:H("h-2 w-4 shrink-0 animate-pulse rounded-sm bg-muted",t.tone==="del"&&"bg-destructive/20",t.tone==="add"&&"bg-success/25")}),r.jsx("div",{className:H("h-2 animate-pulse rounded-sm bg-muted",t.width,t.tone==="del"&&"bg-destructive/20",t.tone==="add"&&"bg-success/25")})]},e)}const Ta={readOnly:!0,renderSideBySide:!1,minimap:{enabled:!1},scrollBeyondLastLine:!1,fontSize:12},Ko={...Ta,lineNumbersMinChars:3,lineDecorationsWidth:4,folding:!1,glyphMargin:!1,renderOverviewRuler:!1};function qo(t){const e=$.c(11),{diff:s,emptyMessage:a,rowClassName:n,onDiscardFile:o,hideFileRows:d,editorHeight:l}=t,i=a===void 0?"No file changes in the working tree":a,u=n===void 0?"px-6":n,c=d===void 0?!1:d,h=l===void 0?"380px":l,[p,b]=U.useState(null),[f,m]=U.useState(null);let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g=Eo(),e[0]=g):g=e[0];const v=g;if(!s||Object.keys(s.diffs).length===0){let w;return e[1]!==i?(w=r.jsx("div",{className:"flex items-center justify-center py-10 text-sm text-muted-foreground",children:i}),e[1]=i,e[2]=w):w=e[2],w}let j;return e[3]!==s.diffs||e[4]!==f||e[5]!==h||e[6]!==p||e[7]!==c||e[8]!==o||e[9]!==u?(j=r.jsx("div",{className:"divide-y",children:Object.entries(s.diffs).map(w=>{const[x,P]=w,{from:y,to:N}=P,C=p===x,A=y===null,S=N===null,D=x.startsWith("/")?x.slice(1):x,k=D.lastIndexOf("/"),O=k>=0?D.slice(k+1):D,I=k>=0?D.slice(0,k):null,B=Ai(x),F=A?"bg-success":S?"bg-destructive":"bg-warning";return c?r.jsx("div",{children:r.jsx(rr,{original:y??"",modified:N??"",language:B,theme:v,height:h,loading:r.jsx(hr,{height:h}),options:Ko})},x):r.jsxs("div",{children:[r.jsxs("div",{className:H("flex items-center gap-3 py-3 hover:bg-accent",u),children:[r.jsx("button",{type:"button",className:"flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground transition-transform hover:text-foreground",onClick:()=>b(C?null:x),children:r.jsx(Pr,{className:H("h-3.5 w-3.5 transition-transform",C&&"rotate-90")})}),r.jsx("div",{className:H("h-2.5 w-2.5 shrink-0 rounded-full",F)}),r.jsx(Jr,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),r.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:O}),I&&r.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:I}),o?r.jsxs(nn,{children:[r.jsx(tn,{asChild:!0,children:r.jsx("button",{type:"button",className:"flex h-6 w-6 shrink-0 items-center justify-center text-muted-foreground hover:bg-accent hover:text-foreground rounded-lg",children:r.jsx(Ya,{className:"h-3.5 w-3.5"})})}),r.jsx(sn,{align:"end",children:r.jsx(ms,{className:"text-destructive focus:text-destructive",onSelect:()=>m(x),children:"Discard changes"})})]}):null]}),f===x&&o?r.jsxs("div",{className:H("flex items-center justify-between gap-3 border-t bg-destructive/5 py-2.5",u),children:[r.jsxs("span",{className:"text-xs text-destructive",children:["Discard all changes to"," ",r.jsx("span",{className:"font-medium",children:O}),"? This cannot be undone."]}),r.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[r.jsx(ge,{type:"button",variant:"ghost",size:"sm",onClick:()=>m(null),children:"Cancel"}),r.jsx(ge,{type:"button",variant:"destructive",size:"sm",onClick:()=>{m(null),o(x)},children:"Discard"})]})]}):null,C&&r.jsx("div",{className:"border-t",children:r.jsx(rr,{original:y??"",modified:N??"",language:B,theme:v,height:h,loading:r.jsx(hr,{height:h}),options:Ta})})]},x)})}),e[3]=s.diffs,e[4]=f,e[5]=h,e[6]=p,e[7]=c,e[8]=o,e[9]=u,e[10]=j):j=e[10],j}function Ho(t){if(t.kind!=="block"||t.isSiteApp||!t.blockKey)return null;const e=(t.toJson??t.fromJson)?.__resolveType;return typeof e=="string"&&Di(e)?t.blockKey:null}function Vo(t){return t.kind!=="page"?!0:!t.pagePath||At(t.pagePath).length>0}function Go(t,e){try{return cl(t,si,e)}catch{return null}}function Jo(t,e,s){if(!e)return;const a=ti(e,t);if(!a)return null;if(At(a.path).length===0||s?.path!==a.path)return a.path;const n=Ln(a.path,s.params);return At(n).length===0?n:a.path}function Wo(t){return t.sectionKey&&!t.v8?Go(t.previewServerUrl,t.sectionKey):Xo(t.previewServerUrl,t.path)}function Qo(t,e){if(t.kind!=="page")return"/";const s=t.pagePath;if(!s)return"";if(At(s).length===0)return s;if(e?.path!==s)return"";const a=Ln(s,e.params);return At(a).length===0?a:""}function Xo(t,e){const s=e.trim();if(!s||At(s).length>0)return null;try{const a=new URL(t),n=new URL(s.startsWith("/")?s:`/${s}`,a);return n.origin===a.origin?n:null}catch{return null}}function Yo(t,e){return e?.kind==="pointer"&&e.link?Dn(t.toString(),e.link):Ba(t,e)}function Ba(t,e){if(!e)return null;if(e.kind==="pointer")return Dn(t.toString(),e.pointer);try{return new URL(`${t.pathname}${t.search}`,e.previewUrl).href}catch{return null}}function Zo(t,e,s){return e===null?!1:t!=="other"||s?.kind==="sandbox"}function ec(t,e){const s=e?t.kind==="page":t.kind!=="other";return{before:s&&t.status==="new"?"new":null,after:s&&t.status==="removed"?"removed":null}}const Ia=U.createContext(!0),tc=["split","before","after","code"];function sc(t){return tc.includes(t)}const $a={desktop:1280,mobile:412};function nc(t,e){const s=(o,d)=>t.unreadable?.includes(d)?e:o?`${JSON.stringify(o,null,2)}
|
|
1
|
+
import{c as $,b as xe,r as U,j as r,B as ge,m as H,K as xs,an as Ha,t as at,eO as Va,au as Pr,dN as Sr,Y as ms,dO as Ga,aJ as Ns,aK as Cs,aL as As,aM as Js,b9 as Ws,aN as Rs,aO as Ds,aP as Ts,X as tn,Z as sn,_ as nn,a as rn,a6 as Is,b_ as Ja,h as ps,eP as kr,eQ as Nr,eR as Sn,by as Wa,bo as Qa,bt as Zn,eS as Xa,ao as Ya,I as Za,a9 as el,eT as tl,V as Cr,i as gt,eL as kn,q as Ar,J as Rr,D as Dr,x as Tr,v as Br,Q as Ir,R as $r,aX as sl,ba as Fr,a7 as Nn,b6 as Cn,e as er,E as nl,T as rl}from"./index-CMOYwhXD.js";import{S as al}from"./separator-W1Ytw6Rk.js";import{f as ll,u as vs,r as Lr,l as Or,c as Mr,b as il}from"./chat-context-DheRYNZa.js";import{u as Mt,a8 as ol,a9 as _r,aa as Er,c as An,b as Rn,N as Dn,ab as cl,M as dl,ac as ul,v as Tn,U as zr,ad as hl,H as fl,ae as ml,af as pl,g as Ur}from"./site-editor-toast-CP-wSW1F.js";import{L as bl}from"./use-org-notice-COy-LgRB.js";import{I as Kr}from"./toolbar-icon-button-BnrqNtsd.js";import{b as gl,P as xl,a as vl}from"./popover-3vnisGas.js";import{c as lt,T as it,a as ot,b as an}from"./tooltip-BPmKwLsN.js";import{f as yl,a as jl,c as wl,C as tr,e as sr,b as nr}from"./command-D5KKg7Po.js";import{T as Lt,a as qr,b as Hr}from"./tabs-kd1a9On_.js";import{t as Vr}from"./ChevronDown-CXawdj31.js";import{b as Pl}from"./UserCheck01-DywBSoK3.js";import{L as Gr,ac as ln,a as Jr,G as Sl,b as kl,ad as Wr}from"./agent-icon-BG1i7gmz.js";import{a as Qr}from"./SwitchHorizontal01-CNZW6LKe.js";import{b as Xr}from"./Tool01-BA13F6bw.js";import{s as Yr}from"./Plus-D3LlERXJ.js";import{s as on}from"./Trash01-C1JB_HDr.js";import{d as Hs,e as Nl,s as _s,f as Zr,u as ea,n as Cl,g as Al}from"./use-view-draft-kind-CJTuI6yS.js";import{u as Bn}from"./use-blog-view-BnDurHBG.js";import{u as ys}from"./use-voice-input-R6pqWjLx.js";import{b as Rl,d as ta}from"./session-runtime-S41xxwFW.js";import{h as sa,r as na,b as $s,g as Dl,e as ze,f as ra}from"./repository-binding-BiNVfbBv.js";import{u as Tl}from"./use-debounced-value-C26MvSJn.js";import{a as Bl,u as Il}from"./shell-layout-BhLm3ode.js";import{u as $l}from"./useInfiniteQuery-CnX3zUSi.js";import{d as Fl,b as Ll,p as Ol,e as aa,g as la,h as ia}from"./use-navigate-to-agent-PmeOctb2.js";import{u as cn,n as ks,b as oa,a as Ml,c as _l,d as El,r as Ss,g as zl,s as Ul,e as Es,f as Kl}from"./cms-store-drafts-92haPQGD.js";import{e as ql,g as Hl,f as In}from"./thread-intent-DzUkMPY5.js";import{a as Qs}from"./virtual-mcp-BOM6yP8Q.js";import{u as $n}from"./use-blocks-v8-project-DvTBxIPw.js";import{G as ca}from"./github-icon-Dum7qGK9.js";import{f as Vl,r as Gl,u as da}from"./content-changes-Dilm5O36.js";import{a as Jl,b as Wl}from"./use-fast-preview-draft-url-CjZjepWx.js";import{a3 as hs,a4 as ua,A as Xs,q as Fn,a5 as Ql,a6 as Xl,F as Yl,a7 as Zl,a8 as ei,p as ti,e as At,f as Ln,a9 as si}from"./blocks-tab-states-CuLvvePK.js";import"./index-DWyOfEFs.js";import{T as ni}from"./textarea-hqqjHxii.js";import{i as On}from"./CheckCircle-Dah9jeY2.js";import{s as Ys}from"./Eye-DteZLUM4.js";import{n as ri,s as ai,C as li,a as ii,b as oi,M as ci,c as di,d as ui,m as hi,u as fi}from"./use-cms-publish-actions-drU_bgxQ.js";import{b as mi,j as pi}from"./UserSquare-BzfdCQlh.js";import{i as Mn,b as _n,m as bi,h as gi,c as ha,f as fa,d as xi,r as En,e as vi,n as yi,g as ji,j as wi,k as Pi,l as zn,o as Si,p as ma,q as ki,s as Un,B as Ni,t as fn}from"./sandbox-git-api-ErB8jUx9.js";import{a as Ci,g as Ai}from"./utils-BWLamjlv.js";import{i as Ri}from"./Monitor01-C5ZEAMCm.js";import{w as Kn,R as pa}from"./device-hint-DEag8WwZ.js";import{w as rr}from"./editor-C1KY7pbs.js";import{i as Di,C as Ti}from"./section-array-field-Dpm3s7El.js";import{T as Bi,a as ar}from"./toggle-group-BdbLr32c.js";import{s as ba}from"./save-changes-debug-nBi-n9eV.js";import{u as Ii}from"./use-mcp-client-C2KQU7c3.js";import{t as $i}from"./MessageCircle01-B4UE40aX.js";import{u as Fi}from"./use-sandbox-events-BjMmIgSO.js";import{b as Li,a as Oi}from"./sandbox-lifecycle-context-Ct_XfgIm.js";import{b as Mi}from"./agent-capabilities-BcU9kHgo.js";import{c as _i}from"./thread-route-URWAxCjm.js";function Ei(t){const{value:e,baseBranch:s,releases:a,baseIsDraft:n=!1,storeDrafts:o=[]}=t,d=!n&&!!e&&e===s,l=a.find(c=>c.branch===e),i=d||l?void 0:o.find(c=>c.name===e),u=!d&&!l&&!i&&!!e;return i?{isBase:d,current:l,storeDraft:i,unlisted:u}:{isBase:d,current:l,unlisted:u}}const zi={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" "},lr=1114111;function ir(t){return t?t.replace(/&(#x?[0-9a-fA-F]+|[a-zA-Z]+);/g,(e,s)=>{if(s.startsWith("#x")||s.startsWith("#X")){const a=Number.parseInt(s.slice(2),16);return!Number.isFinite(a)||a>lr?e:String.fromCodePoint(a)}if(s.startsWith("#")){const a=Number.parseInt(s.slice(1),10);return!Number.isFinite(a)||a>lr?e:String.fromCodePoint(a)}return zi[s]??e}):""}function Ui(t){const e=$.c(39),{url:s,onSave:a}=t,n=xe(),[o,d]=U.useState(s??"");let l;e[0]!==o?(l=o.trim(),e[0]=o,e[1]=l):l=e[1];const i=l;let u;e[2]!==a||e[3]!==i?(u=()=>a(i?Rl(i):null),e[2]=a,e[3]=i,e[4]=u):u=e[4];const c=u;let h;e[5]!==n?(h=n("thread.branchPicker.localHint"),e[5]=n,e[6]=h):h=e[6];let p;e[7]!==h?(p=r.jsx("p",{className:"text-xs text-muted-foreground",children:h}),e[7]=h,e[8]=p):p=e[8];let b;e[9]!==n?(b=n("thread.branchPicker.localUrlLabel"),e[9]=n,e[10]=b):b=e[10];let f;e[11]!==n?(f=n("thread.branchPicker.localUrlPlaceholder"),e[11]=n,e[12]=f):f=e[12];let m;e[13]===Symbol.for("react.memo_cache_sentinel")?(m=C=>d(C.target.value),e[13]=m):m=e[13];let g;e[14]!==c||e[15]!==i?(g=C=>{C.key==="Enter"&&i&&c()},e[14]=c,e[15]=i,e[16]=g):g=e[16];let v;e[17]!==b||e[18]!==f||e[19]!==g||e[20]!==o?(v=r.jsx("input",{type:"url",inputMode:"url","aria-label":b,placeholder:f,value:o,onChange:m,onKeyDown:g,className:"h-8 w-full rounded-md border bg-transparent px-2 text-sm focus-ring"}),e[17]=b,e[18]=f,e[19]=g,e[20]=o,e[21]=v):v=e[21];let j;e[22]!==a||e[23]!==n||e[24]!==s?(j=s?r.jsx(ge,{variant:"ghost",size:"sm",className:"text-xs text-destructive hover:text-destructive",onClick:()=>a(null),children:n("thread.branchPicker.localTurnOff")}):r.jsx("span",{}),e[22]=a,e[23]=n,e[24]=s,e[25]=j):j=e[25];const w=!i;let x;e[26]!==n?(x=n("thread.branchPicker.save"),e[26]=n,e[27]=x):x=e[27];let P;e[28]!==c||e[29]!==w||e[30]!==x?(P=r.jsx(ge,{size:"sm",disabled:w,onClick:c,children:x}),e[28]=c,e[29]=w,e[30]=x,e[31]=P):P=e[31];let y;e[32]!==j||e[33]!==P?(y=r.jsxs("div",{className:"flex items-center justify-between gap-2",children:[j,P]}),e[32]=j,e[33]=P,e[34]=y):y=e[34];let N;return e[35]!==y||e[36]!==p||e[37]!==v?(N=r.jsxs("div",{className:"flex flex-col gap-2 p-2",children:[p,v,y]}),e[35]=y,e[36]=p,e[37]=v,e[38]=N):N=e[38],N}function Ki(t){const e=$.c(8),{virtualMcpId:s,branch:a,serve:n,rowRef:o,onPicked:d}=t,l=Mt(s,a),i=!!n.connection,u=i&&l.kind==="protocol"&&l.source==="local";let c;e[0]!==d||e[1]!==n?(c=()=>qi(n,d),e[0]=d,e[1]=n,e[2]=c):c=e[2];let h;return e[3]!==o||e[4]!==i||e[5]!==u||e[6]!==c?(h=r.jsx(Hi,{rowRef:o,selected:i,connected:u,onSelect:c}),e[3]=o,e[4]=i,e[5]=u,e[6]=c,e[7]=h):h=e[7],h}function qi(t,e){e?.(),!t.connection&&t.set({endpoint:t.lastEndpoint??ol})}function Hi(t){const e=$.c(19),{rowRef:s,selected:a,connected:n,onSelect:o}=t,d=xe(),l=a?"bg-accent":"hover:bg-accent";let i;e[0]!==l?(i=H("flex rounded-lg",l),e[0]=l,e[1]=i):i=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=r.jsx("span",{"data-testid":"localhost-dot",className:"h-2 w-2 shrink-0 rounded-full bg-foreground"}),e[2]=u):u=e[2];let c;e[3]!==d?(c=d("thread.branchPicker.localhost.label"),e[3]=d,e[4]=c):c=e[4];let h;e[5]!==c?(h=r.jsx("span",{className:"min-w-0 flex-1 truncate",children:c}),e[5]=c,e[6]=h):h=e[6];let p;e[7]!==n||e[8]!==d?(p=n&&r.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:d("thread.branchPicker.localhost.connected")}),e[7]=n,e[8]=d,e[9]=p):p=e[9];let b;e[10]!==o||e[11]!==a||e[12]!==h||e[13]!==p?(b=r.jsxs("button",{type:"button","aria-pressed":a,onClick:o,className:"flex w-full min-w-0 items-center gap-2.5 px-2 py-2 text-left text-sm",children:[u,h,p]}),e[10]=o,e[11]=a,e[12]=h,e[13]=p,e[14]=b):b=e[14];let f;return e[15]!==s||e[16]!==i||e[17]!==b?(f=r.jsx("div",{ref:s,className:i,children:b}),e[15]=s,e[16]=i,e[17]=b,e[18]=f):f=e[18],f}const Vi=10080*60*1e3;function Gi({sandboxMap:t,userId:e,rawBranches:s,now:a}){const n=new Map;for(const[h,p]of Object.entries(t??{}))for(const[b,f]of Object.entries(p??{})){let m=n.get(b);m||(m={userIds:new Set,lastActiveAt:0},n.set(b,m)),m.userIds.add(h);for(const g of Object.values(f??{})){const v=g?.createdAt??0;v>m.lastActiveAt&&(m.lastActiveAt=v)}}const o=a-Vi,d=[...n.entries()].filter(([,h])=>h.lastActiveAt>=o).sort((h,p)=>p[1].lastActiveAt-h[1].lastActiveAt).map(([h,p])=>({name:h,source:"recent",contributors:[...p.userIds],lastActiveAt:p.lastActiveAt})),l=new Set(d.map(h=>h.name)),i=new Set(Object.keys(t?.[e]??{})),u=[...i].filter(h=>!l.has(h)).sort().map(h=>({name:h,source:"yours"})),c=s.filter(h=>!i.has(h.name)&&!l.has(h.name)).map(h=>({name:h.name,source:"other",author:h.author??null}));return{recent:d,yours:u,others:c}}const Ji=100,Wi=50,Qi=300;function vn(t,e){const s=e.trim().toLowerCase();return s?t.toLowerCase().includes(s):!0}function Xi(t){const e=$.c(39),{orgId:s,orgSlug:a,userId:n,target:o,sandboxMap:d,owner:l,repo:i,search:u,enabled:c}=t,h=u===void 0?"":u,p=c===void 0?!0:c;let b;e[0]!==h?(b=h.trim(),e[0]=h,e[1]=b):b=e[1];const f=b,m=Tl(f,Qi);let g;e[2]!==o?(g=sa(o),e[2]=o,e[3]=g):g=e[3];const v=g,j=f.length>0;let w;e[4]!==m||e[5]!==s||e[6]!==a||e[7]!==l||e[8]!==i||e[9]!==o?(w=xs.githubBranchSearch(s,a,na(o),l,i,m),e[4]=m,e[5]=s,e[6]=a,e[7]=l,e[8]=i,e[9]=o,e[10]=w):w=e[10];const x=p&&v;let P;e[11]!==m||e[12]!==a||e[13]!==o?(P=T=>{const{pageParam:ee}=T;return Ha(a,"REPOSITORY_SEARCH_BRANCHES",{...o,query:m,limit:m?Wi:Ji,cursor:ee})},e[11]=m,e[12]=a,e[13]=o,e[14]=P):P=e[14];let y;e[15]!==m?(y=T=>m?void 0:T.nextCursor??void 0,e[15]=m,e[16]=y):y=e[16];let N;e[17]!==w||e[18]!==x||e[19]!==P||e[20]!==y?(N={queryKey:w,enabled:x,staleTime:3e4,retry:!1,initialPageParam:null,queryFn:P,getNextPageParam:y},e[17]=w,e[18]=x,e[19]=P,e[20]=y,e[21]=N):N=e[21];const{data:C,isLoading:A,isError:S,isFetching:D,hasNextPage:k,isFetchingNextPage:O,fetchNextPage:I}=$l(N),B=j&&(m!==f||D),F=(C?.pages??[]).flatMap(Yi),L=Bl(6e4),V=Gi({sandboxMap:d,userId:n,rawBranches:F,now:L});let z;e[22]!==f?(z=T=>vn(T.name,f),e[22]=f,e[23]=z):z=e[23];const te=V.recent.filter(z);let M;e[24]!==f?(M=T=>vn(T.name,f),e[24]=f,e[25]=M):M=e[25];const K=V.yours.filter(M),J=V.others,se=C?.pages[0],W=j&&se&&!B?Math.max(0,se.totalCount-se.branches.length):0,ue=!j&&k;let Y;e[26]!==I?(Y=()=>{I()},e[26]=I,e[27]=Y):Y=e[27];let le;return e[28]!==W||e[29]!==S||e[30]!==O||e[31]!==A||e[32]!==B||e[33]!==J||e[34]!==te||e[35]!==ue||e[36]!==Y||e[37]!==K?(le={recent:te,yours:K,others:J,isLoading:A,isError:S,isSearching:B,hiddenMatchCount:W,hasMore:ue,isFetchingMore:O,fetchMore:Y},e[28]=W,e[29]=S,e[30]=O,e[31]=A,e[32]=B,e[33]=J,e[34]=te,e[35]=ue,e[36]=Y,e[37]=K,e[38]=le):le=e[38],le}function Yi(t){return t.branches}function Zi(t){const e=$.c(8),s=xe(),{releases:a,createRelease:n}=cn(t.virtualMcpId),o=$s(t.virtualMcpId);let d;return e[0]!==n||e[1]!==t.kind||e[2]!==t.userId||e[3]!==t.userLabel||e[4]!==o||e[5]!==a||e[6]!==s?(d=()=>{if(a.length>=Qs)return at.error(s("thread.branchPicker.capReached",{max:Qs})),null;const l=t.kind==="blog"?ql(t.userLabel):Hl(t.userLabel);return n({branch:l,name:oa(a,s(Hs(l))),color:ks(a.length),createdBy:t.userId,createdAt:new Date().toISOString(),...o?{runtime:ta(o.metadata)}:{}}).catch(i=>{at.error(s("thread.branchPicker.saveError"),{description:_r(s,Er(i))})}),l},e[0]=n,e[1]=t.kind,e[2]=t.userId,e[3]=t.userLabel,e[4]=o,e[5]=a,e[6]=s,e[7]=d):d=e[7],d}const Zs="-mx-[3px] h-3.5 w-3.5 shrink-0";function eo(t){const e=$.c(120),{virtualMcpId:s,isV8:a,userLabel:n,value:o,baseBranch:d,baseIsDraft:l,orgId:i,orgSlug:u,userId:c,target:h,owner:p,repo:b,sandboxMap:f,onChange:m,onCreateBranch:g,onAdoptBranch:v,disabled:j,spawnsNewChat:w,placement:x,draftKind:P}=t,y=a===void 0?!1:a,N=l===void 0?!1:l,C=j===void 0?!1:j,A=w===void 0?!1:w,S=x===void 0?"chat":x,D=P===void 0?"site":P,k=xe(),I=Bn()?D:null,B=S==="header",[F,L]=U.useState(!1),[V,z]=U.useState(!1),[te,M]=U.useState("branches"),[K,J]=U.useState(null),[se,W]=U.useState(""),[ue,Y]=U.useState(null),[le,T]=U.useState(null),ee=U.useRef(null),{releases:G,createRelease:ne,renameRelease:re,deleteRelease:Se}=cn(s),he=I??void 0;let be;e[0]!==he||e[1]!==c||e[2]!==n||e[3]!==s?(be={virtualMcpId:s,userLabel:n,userId:c,kind:he},e[0]=he,e[1]=c,e[2]=n,e[3]=s,e[4]=be):be=e[4];const ce=Zi(be),{projectDefault:ie}=ys(s);let E;e[5]!==ie?(E=R=>Kl(R,ie)==="sandbox",e[5]=ie,e[6]=E):E=e[6];const fe=E,ke=Ml(s,y),me=y?_l(G,ke.data):[],X=ke.refetch,Z=El(s),{url:Be,setUrl:Q,clear:oe}=An(s),Ne=Rn(s),xt=y&&!!Ne.connection,Xe=y?Ne.connection?.endpoint??null:Be,ye=!!Xe;let ve;e[7]!==oe||e[8]!==y||e[9]!==Ne?(ve=()=>{oe(),y&&Ne.clear()},e[7]=oe,e[8]=y,e[9]=Ne,e[10]=ve):ve=e[10];const Re=ve;let $e;e[11]!==F?($e={enabled:F},e[11]=F,e[12]=$e):$e=e[12];const{data:Ue}=Va($e);let Ie;e[13]!==Ue?.data?.members?(Ie=R=>R?Ue?.data?.members?.find(Pe=>Pe.userId===R)?.user?.name??void 0:void 0,e[13]=Ue?.data?.members,e[14]=Ie):Ie=e[14];const Dt=Ie,Ee=G.length>=Qs;let Le;e[15]!==I||e[16]!==ie||e[17]!==G?(Le=R=>!!_s(G,R.branch,I,ie),e[15]=I,e[16]=ie,e[17]=G,e[18]=Le):Le=e[18];const pe=Le,ct=k("thread.branchPicker.capReached",{max:Qs}),{isBase:Ye,current:dt,storeDraft:Oe,unlisted:_}=Ei({value:o,baseBranch:d,releases:G,baseIsDraft:N,storeDrafts:me}),ae=Nl(G,I,o);let je;e[19]!==I||e[20]!==o?(je=R=>I===null||Zr(R.name)===I||R.name===o,e[19]=I,e[20]=o,e[21]=je):je=e[21];const De=me.filter(je),Ze=Ye?k("thread.branchPicker.live"):dt?.name??Oe?.name??k(Hs(o)),ut=xt?k("thread.branchPicker.localhost.label"):ye?k("thread.branchPicker.localLabel"):o?Ze:k("thread.branchPicker.selectVersion"),Et=xt?"bg-foreground":ye?"bg-special":Ye?"bg-success":Oe?Ss(void 0):Ss(dt?.color??"orange"),Ce=!xt&&!ye&&!Ye&&!!dt&&fe(dt),et=R=>{Re();const Pe=me.some(Ct=>Ct.name===R)?{runtime:"cms"}:G.find(Ct=>Ct.branch===R);m(R,Pe&&{runtime:Pe.runtime}),L(!1)};let ht;e[22]!==k?(ht=R=>{at.error(k("thread.branchPicker.saveError"),{description:_r(k,Er(R))})},e[22]=k,e[23]=ht):ht=e[23];const tt=ht;let zt;e[24]!==Q?(zt=R=>{Q(R),z(!1),L(!1)},e[24]=Q,e[25]=zt):zt=e[25];const js=zt,Tt=(R,Pe)=>{if(Re(),v){v(R),z(!1),L(!1);return}if(!G.some(Ct=>Ct.branch===R)){if(Ee){at.error(ct);return}ne({branch:R,name:Pe.trim()||R,color:ks(G.length),createdBy:c,createdAt:new Date().toISOString()}).catch(tt)}m(R),z(!1),L(!1)};let vt;e[26]!==Re||e[27]!==m||e[28]!==g||e[29]!==ce?(vt=()=>{const R=ce();R&&(Re(),(g??m)(R),L(!1))},e[26]=Re,e[27]=m,e[28]=g,e[29]=ce,e[30]=vt):vt=e[30];const ws=vt;let st;e[31]===Symbol.for("react.memo_cache_sentinel")?(st=()=>{J(null),W(""),z(!1),M("branches")},e[31]=st):st=e[31];const Bt=st;let yt;e[32]===Symbol.for("react.memo_cache_sentinel")?(yt=R=>{M(R),z(!0)},e[32]=yt):yt=e[32];const jt=yt;let wt;e[33]===Symbol.for("react.memo_cache_sentinel")?(wt=R=>{J(R.branch),W(R.name)},e[33]=wt):wt=e[33];const Ut=wt;let Pt;e[34]!==se||e[35]!==re||e[36]!==tt?(Pt=R=>{const Pe=se.trim();Pe&&re(R,Pe).catch(tt),J(null),W("")},e[34]=se,e[35]=re,e[36]=tt,e[37]=Pt):Pt=e[37];const Kt=Pt,qt=R=>{const Pe=R===void 0?o:R,Ct=se.trim();if(Ct&&Pe){if(Ee){at.error(ct),J(null),W("");return}ne({branch:Pe,name:Ct,color:ks(G.length),createdBy:c,createdAt:new Date().toISOString()}).catch(tt)}J(null),W("")};let St;e[38]===Symbol.for("react.memo_cache_sentinel")?(St=()=>{J(null),W("")},e[38]=St):St=e[38];const ft=St,It=()=>{const R=ue;if(Y(null),!(!R||!pe(R))){if(R.branch===o){const Pe=_s(G,R.branch,I,ie);Pe?et(Pe.branch):L(!1)}else L(!1);Se(R.branch).catch(tt)}},mt=zl(ae,ie),Ps=(mt.content.length>0||De.length>0)&&mt.code.length>0,$t=R=>K===R.branch?r.jsx(mn,{value:se,onChange:W,onSave:()=>Kt(R.branch),onCancel:ft},R.branch):r.jsx(pn,{rowRef:!ye&&R.branch===o?ee:void 0,dot:Ss(R.color),codeIcon:fe(R)?Es(R.color):void 0,label:R.name,creator:Dt(R.createdBy),originTooltip:y?k("thread.branchPicker.viaStudioUi"):void 0,branch:!y||fe(R)?R.branch:void 0,selected:!ye&&R.branch===o,onSelect:()=>et(R.branch),onRename:()=>Ut(R),onDelete:()=>Y(R),deleteBlocked:!pe(R)},R.branch),Ft=()=>{const R=le;if(T(null),!!R){if(R.name===o){const Pe=_s(G,R.name,I,ie);if(!Pe)return;et(Pe.branch)}Z.mutateAsync(R.name).catch(Pe=>{at.error(k("thread.branchPicker.discardStoreDraftError"),{description:Pe instanceof Error?Pe.message:void 0})})}},pt=De.map(R=>K===R.name?r.jsx(mn,{value:se,onChange:W,onSave:()=>qt(R.name),onCancel:ft},`store:${R.name}`):r.jsx(pn,{rowRef:!ye&&R.name===o?ee:void 0,dot:Ss(void 0),label:R.name,creator:Dt(R.createdBy),agentIcon:Es(ks(me.indexOf(R))),originTooltip:k("thread.branchPicker.storeDraftVia",{via:Ul(R.via)}),selected:!ye&&R.name===o,onSelect:()=>et(R.name),onRename:()=>{J(R.name),W(R.name)},onDelete:()=>T(R),deleteBlocked:R.name===o&&!_s(G,R.name,I,ie)},`store:${R.name}`));let Ke;e[39]!==C||e[40]!==y||e[41]!==X?(Ke=C?void 0:R=>{R?y&&X():Bt(),L(R)},e[39]=C,e[40]=y,e[41]=X,e[42]=Ke):Ke=e[42];const nt=B?"text-xs":"text-xs text-muted-foreground hover:text-foreground";let qe;e[43]!==nt?(qe=H("shrink min-w-0 max-w-[220px] gap-2",nt,Kr),e[43]=nt,e[44]=qe):qe=e[44];let He;e[45]!==C?(He=!C&&r.jsx(Vr,{size:12,className:"opacity-60 shrink-0"}),e[45]=C,e[46]=He):He=e[46];let Ve;e[47]!==ut?(Ve=r.jsx(ot,{children:ut}),e[47]=ut,e[48]=Ve):Ve=e[48];const rt=gl,kt="w-[min(300px,calc(100vw-2rem))] p-1.5",Nt="start";let Me;e[49]===Symbol.for("react.memo_cache_sentinel")?(Me=R=>{R.preventDefault(),ee.current?.scrollIntoView({block:"nearest"})},e[49]=Me):Me=e[49];let Ge;e[50]!==A||e[51]!==k?(Ge=A&&r.jsx("p",{className:"px-2 pb-1.5 pt-1 text-xs text-muted-foreground",children:k("thread.branchPicker.newChatHint")}),e[50]=A,e[51]=k,e[52]=Ge):Ge=e[52];const q=V?r.jsx(so,{orgId:i,orgSlug:u,userId:c,target:h,owner:p,repo:b,sandboxMap:f,enabled:F,tab:te,onTabChange:M,isV8:y,localUrl:Be,onSaveLocal:js,onBack:()=>z(!1),onAdopt:Tt,draftKind:I}):r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:H("always-scrollbar flex max-h-[min(50vh,20rem)] flex-col overflow-y-auto",y&&"gap-1"),children:[!y&&ye&&Xe&&r.jsx(to,{rowRef:ee,url:Xe,onSelect:()=>jt("local"),onEdit:()=>jt("local"),onTurnOff:()=>Re()}),_&&o&&(K===o?r.jsx(mn,{value:se,onChange:W,onSave:()=>qt(),onCancel:ft}):r.jsx(pn,{rowRef:ye?void 0:ee,dot:Ss("orange"),label:k(Hs(o)),branch:y?void 0:o,originTooltip:y?k("thread.branchPicker.viaStudioUi"):void 0,selected:!ye,onSelect:()=>et(o),onRename:()=>{J(o),W(oa(G,k(Hs(o))))}})),Ps?r.jsxs(r.Fragment,{children:[r.jsx(or,{children:k("thread.branchPicker.groupContent")}),mt.content.map($t),pt,r.jsx(or,{divided:!0,children:k("thread.branchPicker.groupCode")}),mt.code.map($t)]}):r.jsxs(r.Fragment,{children:[ae.map($t),pt]}),y&&r.jsx(Ki,{virtualMcpId:s,branch:o,serve:Ne,rowRef:xt?ee:void 0,onPicked:()=>L(!1)})]}),(_||ae.length>0||De.length>0||y)&&r.jsx("div",{className:"my-1 border-t"}),r.jsxs("button",{type:"button",onClick:()=>{ws()},disabled:Ee,className:"flex w-full items-center gap-2 rounded-lg px-2 py-2 text-left text-sm text-muted-foreground hover:bg-accent hover:text-foreground disabled:pointer-events-none disabled:opacity-50",children:[r.jsx(Yr,{className:"h-4 w-4 shrink-0"}),k("thread.branchPicker.newVersion")]}),Ee&&r.jsx("p",{className:"px-2 pb-1 pt-0.5 text-xs text-warning",children:ct}),r.jsxs("button",{type:"button",onClick:()=>jt("branches"),className:H("flex w-full items-center justify-between gap-2 rounded-lg px-2 py-2 text-left text-xs text-muted-foreground hover:bg-accent hover:text-foreground",y&&"mt-1"),children:[k("thread.branchPicker.advanced"),r.jsx(Pr,{className:"h-4 w-4 shrink-0"})]})]});let de;e[53]!==rt||e[54]!==Me||e[55]!==Ge||e[56]!==q?(de=r.jsxs(rt,{className:kt,align:Nt,onOpenAutoFocus:Me,children:[Ge,q]}),e[53]=rt,e[54]=Me,e[55]=Ge,e[56]=q,e[57]=de):de=e[57];const we=r.jsxs(xl,{open:F,onOpenChange:Ke,children:[r.jsxs(lt,{children:[r.jsx(it,{asChild:!0,children:r.jsx("span",{className:"inline-flex min-w-0 shrink",children:r.jsx(vl,{asChild:!0,children:r.jsxs(ge,{"data-tour":bl.branchPicker,variant:B?"outline":"ghost",size:B?"sm":"default","aria-label":ut,disabled:C,className:qe,children:[Ce?r.jsx(Gr,{className:H(Zs,Es(dt?.color))}):Oe&&!ye?r.jsx(Sr,{className:H(Zs,Es(ks(me.indexOf(Oe))))}):r.jsx("span",{className:H("h-2 w-2 shrink-0 rounded-full",o||ye?Et:"bg-muted-foreground")}),r.jsx("span",{className:"min-w-0 truncate @max-3xl/panel-header:hidden",children:ut}),He]})})})}),Ve]}),de]}),Te=ue!==null;let _e;e[58]===Symbol.for("react.memo_cache_sentinel")?(_e=R=>{R||Y(null)},e[58]=_e):_e=e[58];let Je;e[59]!==k?(Je=k("thread.branchPicker.deleteTitle"),e[59]=k,e[60]=Je):Je=e[60];let Ht;e[61]!==Je?(Ht=r.jsx(Ns,{children:Je}),e[61]=Je,e[62]=Ht):Ht=e[62];let Vt;e[63]!==ue||e[64]!==k?(Vt=ue&&k("thread.branchPicker.deleteConfirm",{name:ue.name}),e[63]=ue,e[64]=k,e[65]=Vt):Vt=e[65];let Gt;e[66]!==Vt?(Gt=r.jsx(Cs,{children:Vt}),e[66]=Vt,e[67]=Gt):Gt=e[67];let Jt;e[68]!==Ht||e[69]!==Gt?(Jt=r.jsxs(As,{children:[Ht,Gt]}),e[68]=Ht,e[69]=Gt,e[70]=Jt):Jt=e[70];let Wt;e[71]!==k?(Wt=k("thread.branchPicker.cancel"),e[71]=k,e[72]=Wt):Wt=e[72];let Qt;e[73]!==Wt?(Qt=r.jsx(Js,{children:Wt}),e[73]=Wt,e[74]=Qt):Qt=e[74];let Xt;e[75]!==k?(Xt=k("thread.branchPicker.delete"),e[75]=k,e[76]=Xt):Xt=e[76];let Yt;e[77]!==It||e[78]!==Xt?(Yt=r.jsx(Ws,{onClick:It,variant:"destructive",children:Xt}),e[77]=It,e[78]=Xt,e[79]=Yt):Yt=e[79];let Zt;e[80]!==Qt||e[81]!==Yt?(Zt=r.jsxs(Rs,{children:[Qt,Yt]}),e[80]=Qt,e[81]=Yt,e[82]=Zt):Zt=e[82];let es;e[83]!==Jt||e[84]!==Zt?(es=r.jsxs(Ds,{children:[Jt,Zt]}),e[83]=Jt,e[84]=Zt,e[85]=es):es=e[85];let Ls;e[86]!==Te||e[87]!==es?(Ls=r.jsx(Ts,{open:Te,onOpenChange:_e,children:es}),e[86]=Te,e[87]=es,e[88]=Ls):Ls=e[88];const hn=le!==null;let Os;e[89]===Symbol.for("react.memo_cache_sentinel")?(Os=R=>{R||T(null)},e[89]=Os):Os=e[89];let ts;e[90]!==k?(ts=k("thread.branchPicker.deleteTitle"),e[90]=k,e[91]=ts):ts=e[91];let ss;e[92]!==ts?(ss=r.jsx(Ns,{children:ts}),e[92]=ts,e[93]=ss):ss=e[93];let ns;e[94]!==le||e[95]!==k?(ns=le&&k("thread.branchPicker.discardStoreDraftConfirm",{name:le.name}),e[94]=le,e[95]=k,e[96]=ns):ns=e[96];let rs;e[97]!==ns?(rs=r.jsx(Cs,{children:ns}),e[97]=ns,e[98]=rs):rs=e[98];let as;e[99]!==ss||e[100]!==rs?(as=r.jsxs(As,{children:[ss,rs]}),e[99]=ss,e[100]=rs,e[101]=as):as=e[101];let ls;e[102]!==k?(ls=k("thread.branchPicker.cancel"),e[102]=k,e[103]=ls):ls=e[103];let is;e[104]!==ls?(is=r.jsx(Js,{children:ls}),e[104]=ls,e[105]=is):is=e[105];let os;e[106]!==k?(os=k("thread.branchPicker.delete"),e[106]=k,e[107]=os):os=e[107];let cs;e[108]!==Ft||e[109]!==os?(cs=r.jsx(Ws,{onClick:Ft,variant:"destructive",children:os}),e[108]=Ft,e[109]=os,e[110]=cs):cs=e[110];let ds;e[111]!==is||e[112]!==cs?(ds=r.jsxs(Rs,{children:[is,cs]}),e[111]=is,e[112]=cs,e[113]=ds):ds=e[113];let us;e[114]!==as||e[115]!==ds?(us=r.jsxs(Ds,{children:[as,ds]}),e[114]=as,e[115]=ds,e[116]=us):us=e[116];let Ms;return e[117]!==hn||e[118]!==us?(Ms=r.jsx(Ts,{open:hn,onOpenChange:Os,children:us}),e[117]=hn,e[118]=us,e[119]=Ms):Ms=e[119],r.jsxs(r.Fragment,{children:[we,Ls,Ms]})}function mn(t){const e=$.c(20),{value:s,onChange:a,onSave:n,onCancel:o}=t,d=xe();let l;e[0]!==d?(l=d("thread.branchPicker.rename"),e[0]=d,e[1]=l):l=e[1];let i;e[2]!==a?(i=f=>a(f.target.value),e[2]=a,e[3]=i):i=e[3];let u;e[4]!==o||e[5]!==n?(u=f=>{f.key==="Enter"&&n(),f.key==="Escape"&&(f.preventDefault(),f.stopPropagation(),o())},e[4]=o,e[5]=n,e[6]=u):u=e[6];let c;e[7]!==l||e[8]!==i||e[9]!==u||e[10]!==s?(c=r.jsx("input",{autoFocus:!0,"aria-label":l,value:s,onChange:i,onKeyDown:u,className:"h-8 flex-1 rounded-md border bg-transparent px-2 text-sm focus-ring"}),e[7]=l,e[8]=i,e[9]=u,e[10]=s,e[11]=c):c=e[11];let h;e[12]!==d?(h=d("thread.branchPicker.save"),e[12]=d,e[13]=h):h=e[13];let p;e[14]!==n||e[15]!==h?(p=r.jsx(ge,{size:"sm",onClick:n,children:h}),e[14]=n,e[15]=h,e[16]=p):p=e[16];let b;return e[17]!==c||e[18]!==p?(b=r.jsxs("div",{className:"flex items-center gap-1.5 p-1",children:[c,p]}),e[17]=c,e[18]=p,e[19]=b):b=e[19],b}function or(t){const e=$.c(5),{divided:s,children:a}=t,o=(s===void 0?!1:s)&&"mt-1 border-t";let d;e[0]!==o?(d=H("px-2 pb-1 pt-2 text-xs font-medium uppercase tracking-wide text-muted-foreground",o),e[0]=o,e[1]=d):d=e[1];let l;return e[2]!==a||e[3]!==d?(l=r.jsx("p",{className:d,children:a}),e[2]=a,e[3]=d,e[4]=l):l=e[4],l}function pn(t){const e=$.c(53),{rowRef:s,dot:a,codeIcon:n,agentIcon:o,originTooltip:d,label:l,creator:i,branch:u,selected:c,onSelect:h,onRename:p,onDelete:b,deleteBlocked:f}=t,m=f===void 0?!1:f,g=xe();let v;e[0]!==o||e[1]!==n||e[2]!==a?(v=n?r.jsx(Gr,{className:H(Zs,n)}):o?r.jsx(Sr,{className:H(Zs,o)}):r.jsx("span",{className:H("h-2 w-2 shrink-0 rounded-full",a)}),e[0]=o,e[1]=n,e[2]=a,e[3]=v):v=e[3];let j;e[4]!==i?(j=i&&r.jsx("span",{className:"ml-1.5 text-xs font-normal text-muted-foreground/70",children:i}),e[4]=i,e[5]=j):j=e[5];let w;e[6]!==l||e[7]!==j?(w=r.jsxs("span",{className:"min-w-0 flex-1 truncate",children:[l,j]}),e[6]=l,e[7]=j,e[8]=w):w=e[8];let x;e[9]!==h||e[10]!==c||e[11]!==v||e[12]!==w?(x=r.jsxs("button",{type:"button","aria-pressed":c,onClick:h,className:"flex min-w-0 flex-1 items-center gap-2.5 px-2 py-2 text-left text-sm",children:[v,w]}),e[9]=h,e[10]=c,e[11]=v,e[12]=w,e[13]=x):x=e[13];const P=x,y=c?"bg-accent":"hover:bg-accent";let N;e[14]!==y?(N=H("group flex items-center rounded-lg",y),e[14]=y,e[15]=N):N=e[15];let C;e[16]!==u||e[17]!==n||e[18]!==d||e[19]!==P||e[20]!==g?(C=u||d?r.jsxs(lt,{children:[r.jsx(it,{asChild:!0,children:P}),r.jsxs(ot,{side:"bottom",className:"text-xs",children:[n&&r.jsx("p",{className:"font-medium",children:g("thread.branchPicker.codeDraftTooltip")}),d&&r.jsx("p",{children:d}),u&&r.jsx("p",{className:"font-mono",children:g("thread.branchPicker.branchTooltip",{branch:u})})]})]}):P,e[16]=u,e[17]=n,e[18]=d,e[19]=P,e[20]=g,e[21]=C):C=e[21];let A;e[22]!==g?(A=g("thread.branchPicker.moreActions"),e[22]=g,e[23]=A):A=e[23];let S;e[24]===Symbol.for("react.memo_cache_sentinel")?(S=r.jsx(Qr,{className:"h-4 w-4"}),e[24]=S):S=e[24];let D;e[25]!==A?(D=r.jsx(tn,{asChild:!0,children:r.jsx(ge,{variant:"ghost",size:"icon","aria-label":A,className:"mr-1 h-6 w-6 shrink-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100",children:S})}),e[25]=A,e[26]=D):D=e[26];let k;e[27]===Symbol.for("react.memo_cache_sentinel")?(k=r.jsx(Xr,{className:"h-4 w-4"}),e[27]=k):k=e[27];let O;e[28]!==g?(O=g("thread.branchPicker.rename"),e[28]=g,e[29]=O):O=e[29];let I;e[30]!==p||e[31]!==O?(I=r.jsxs(ms,{onSelect:p,children:[k,O]}),e[30]=p,e[31]=O,e[32]=I):I=e[32];let B;e[33]!==m||e[34]!==b||e[35]!==g?(B=b&&r.jsxs(ms,{onSelect:b,disabled:m,className:"text-destructive focus:text-destructive",children:[r.jsx(on,{className:"h-4 w-4"}),g("thread.branchPicker.delete")]}),e[33]=m,e[34]=b,e[35]=g,e[36]=B):B=e[36];let F;e[37]!==m||e[38]!==b||e[39]!==g?(F=b&&m&&r.jsx("p",{className:"max-w-48 px-2 pb-1.5 text-xs text-muted-foreground",children:g("thread.branchPicker.keepOneDraft")}),e[37]=m,e[38]=b,e[39]=g,e[40]=F):F=e[40];let L;e[41]!==I||e[42]!==B||e[43]!==F?(L=r.jsxs(sn,{align:"end",children:[I,B,F]}),e[41]=I,e[42]=B,e[43]=F,e[44]=L):L=e[44];let V;e[45]!==D||e[46]!==L?(V=r.jsxs(nn,{children:[D,L]}),e[45]=D,e[46]=L,e[47]=V):V=e[47];let z;return e[48]!==s||e[49]!==V||e[50]!==N||e[51]!==C?(z=r.jsxs("div",{ref:s,className:N,children:[C,V]}),e[48]=s,e[49]=V,e[50]=N,e[51]=C,e[52]=z):z=e[52],z}function to(t){const e=$.c(40),{rowRef:s,url:a,onSelect:n,onEdit:o,onTurnOff:d}=t,l=xe();let i;try{let D;e[0]!==a?(D=new URL(a),e[0]=a,e[1]=D):D=e[1],i=D.host}catch{i=a}const u=i;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=r.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full bg-special"}),e[2]=c):c=e[2];let h;e[3]!==l?(h=l("thread.branchPicker.localLabel"),e[3]=l,e[4]=h):h=e[4];let p;e[5]!==u?(p=r.jsx("span",{className:"ml-1.5 text-xs font-normal text-muted-foreground/70",children:u}),e[5]=u,e[6]=p):p=e[6];let b;e[7]!==h||e[8]!==p?(b=r.jsxs("span",{className:"min-w-0 flex-1 truncate",children:[h,p]}),e[7]=h,e[8]=p,e[9]=b):b=e[9];let f;e[10]!==n||e[11]!==b?(f=r.jsxs("button",{type:"button","aria-pressed":!0,onClick:n,className:"flex min-w-0 flex-1 items-center gap-2.5 px-2 py-2 text-left text-sm",children:[c,b]}),e[10]=n,e[11]=b,e[12]=f):f=e[12];let m;e[13]!==l?(m=l("thread.branchPicker.moreActions"),e[13]=l,e[14]=m):m=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=r.jsx(Qr,{className:"h-4 w-4"}),e[15]=g):g=e[15];let v;e[16]!==m?(v=r.jsx(tn,{asChild:!0,children:r.jsx(ge,{variant:"ghost",size:"icon","aria-label":m,className:"mr-1 h-6 w-6 shrink-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100",children:g})}),e[16]=m,e[17]=v):v=e[17];let j;e[18]===Symbol.for("react.memo_cache_sentinel")?(j=r.jsx(Xr,{className:"h-4 w-4"}),e[18]=j):j=e[18];let w;e[19]!==l?(w=l("thread.branchPicker.rename"),e[19]=l,e[20]=w):w=e[20];let x;e[21]!==o||e[22]!==w?(x=r.jsxs(ms,{onSelect:o,children:[j,w]}),e[21]=o,e[22]=w,e[23]=x):x=e[23];let P;e[24]===Symbol.for("react.memo_cache_sentinel")?(P=r.jsx(on,{className:"h-4 w-4"}),e[24]=P):P=e[24];let y;e[25]!==l?(y=l("thread.branchPicker.localTurnOff"),e[25]=l,e[26]=y):y=e[26];let N;e[27]!==d||e[28]!==y?(N=r.jsxs(ms,{onSelect:d,className:"text-destructive focus:text-destructive",children:[P,y]}),e[27]=d,e[28]=y,e[29]=N):N=e[29];let C;e[30]!==x||e[31]!==N?(C=r.jsxs(sn,{align:"end",children:[x,N]}),e[30]=x,e[31]=N,e[32]=C):C=e[32];let A;e[33]!==C||e[34]!==v?(A=r.jsxs(nn,{children:[v,C]}),e[33]=C,e[34]=v,e[35]=A):A=e[35];let S;return e[36]!==s||e[37]!==A||e[38]!==f?(S=r.jsxs("div",{ref:s,className:"group flex items-center rounded-lg bg-accent",children:[f,A]}),e[36]=s,e[37]=A,e[38]=f,e[39]=S):S=e[39],S}function so(t){const e=$.c(75),{orgId:s,orgSlug:a,userId:n,target:o,owner:d,repo:l,sandboxMap:i,enabled:u,tab:c,onTabChange:h,isV8:p,localUrl:b,onSaveLocal:f,onBack:m,onAdopt:g,draftKind:v}=t,j=xe(),[w,x]=U.useState(""),P=c==="branches"?w:"",y=u&&c==="branches";let N;e[0]!==s||e[1]!==a||e[2]!==d||e[3]!==l||e[4]!==i||e[5]!==P||e[6]!==y||e[7]!==o||e[8]!==n?(N={orgId:s,orgSlug:a,userId:n,target:o,sandboxMap:i,owner:d,repo:l,search:P,enabled:y},e[0]=s,e[1]=a,e[2]=d,e[3]=l,e[4]=i,e[5]=P,e[6]=y,e[7]=o,e[8]=n,e[9]=N):N=e[9];const{recent:C,yours:A,others:S,isLoading:D,hasMore:k,isFetchingMore:O,fetchMore:I}=Xi(N),B=u&&c==="prs";let F;e[10]!==s||e[11]!==a||e[12]!==d||e[13]!==l||e[14]!==B||e[15]!==o?(F={orgId:s,orgSlug:a,target:o,owner:d,repo:l,enabled:B},e[10]=s,e[11]=a,e[12]=d,e[13]=l,e[14]=B,e[15]=o,e[16]=F):F=e[16];const{data:L,isLoading:V}=Fl(F);let z;if(e[17]!==v||e[18]!==I||e[19]!==k||e[20]!==O||e[21]!==D||e[22]!==p||e[23]!==b||e[24]!==g||e[25]!==m||e[26]!==f||e[27]!==h||e[28]!==S||e[29]!==d||e[30]!==V||e[31]!==C||e[32]!==l||e[33]!==w||e[34]!==j||e[35]!==L||e[36]!==c||e[37]!==A){const te=L===void 0?[]:L,M=`${d}/${l}`;let K;e[39]!==M?(K=M.toLowerCase(),e[39]=M,e[40]=K):K=e[40];const J=K;let se;e[41]!==J?(se=E=>E.headRepoFullName?.toLowerCase()===J,e[41]=J,e[42]=se):se=e[42];const W=te.filter(se);let ue;if(e[43]!==v||e[44]!==S||e[45]!==C||e[46]!==A){const E=new Set;ue=[...C,...A,...S].filter(fe=>E.has(fe.name)?!1:(E.add(fe.name),v!=="site"||Zr(fe.name)==="site")),e[43]=v,e[44]=S,e[45]=C,e[46]=A,e[47]=ue}else ue=e[47];const Y=ue;let le;e[48]===Symbol.for("react.memo_cache_sentinel")?(le=r.jsx(Pl,{className:"h-4 w-4 shrink-0"}),e[48]=le):le=e[48];let T;e[49]!==j?(T=j("thread.branchPicker.advancedBack"),e[49]=j,e[50]=T):T=e[50];let ee;e[51]!==m||e[52]!==T?(ee=r.jsxs("button",{type:"button",onClick:m,className:"flex items-center gap-1.5 px-2 py-1.5 text-xs text-muted-foreground hover:text-foreground",children:[le,T]}),e[51]=m,e[52]=T,e[53]=ee):ee=e[53];let G;e[54]!==h?(G=E=>{h(E),x("")},e[54]=h,e[55]=G):G=e[55];let ne;e[56]!==j?(ne=j("thread.branchPicker.branchesTab"),e[56]=j,e[57]=ne):ne=e[57];let re;e[58]!==ne?(re=r.jsx(Lt,{value:"branches",className:"h-6 px-2.5 text-xs",children:ne}),e[58]=ne,e[59]=re):re=e[59];let Se;e[60]!==j?(Se=j("thread.branchPicker.prsTab"),e[60]=j,e[61]=Se):Se=e[61];let he;e[62]!==Se?(he=r.jsx(Lt,{value:"prs",className:"h-6 px-2.5 text-xs",children:Se}),e[62]=Se,e[63]=he):he=e[63];let be;e[64]!==p||e[65]!==j?(be=!p&&r.jsx(Lt,{value:"local",className:"h-6 px-2.5 text-xs",children:j("thread.branchPicker.localTab")}),e[64]=p,e[65]=j,e[66]=be):be=e[66];let ce;e[67]!==re||e[68]!==he||e[69]!==be?(ce=r.jsxs(qr,{className:"h-auto w-fit justify-start gap-1 bg-accent p-1",variant:"pill",children:[re,he,be]}),e[67]=re,e[68]=he,e[69]=be,e[70]=ce):ce=e[70];let ie;e[71]!==G||e[72]!==ce||e[73]!==c?(ie=r.jsx(Hr,{className:"px-2 pt-2 pb-1",value:c,onValueChange:G,children:ce}),e[71]=G,e[72]=ce,e[73]=c,e[74]=ie):ie=e[74],z=r.jsxs("div",{className:"flex flex-col",children:[ee,ie,c==="local"&&!p?r.jsx(Ui,{url:b,onSave:f}):r.jsxs(yl,{filter:c==="branches"?no:void 0,children:[r.jsx(jl,{placeholder:j(c==="branches"?"thread.branchPicker.searchBranches":"thread.branchPicker.searchPullRequests"),value:w,onValueChange:x}),r.jsx(wl,{onScroll:E=>{const fe=E.currentTarget;c==="branches"&&fe.scrollHeight-fe.scrollTop-fe.clientHeight<48&&I()},children:c==="branches"?r.jsxs(r.Fragment,{children:[D&&r.jsx("div",{className:"p-3 text-xs text-muted-foreground",children:j("thread.branchPicker.loadingMore")}),!D&&Y.length===0&&r.jsx(tr,{children:j("thread.branchPicker.noBranchesFound")}),Y.length>0&&r.jsx(sr,{children:Y.map(E=>r.jsxs(nr,{value:E.name,className:"cursor-pointer",onSelect:()=>g(E.name,E.name),children:[r.jsx(Ga,{className:"mr-2 h-4 w-4 shrink-0"}),r.jsx("span",{className:"flex-1 truncate",children:E.name})]},E.name))}),k&&r.jsx("div",{className:"p-2",children:r.jsx(ge,{variant:"ghost",size:"sm",className:"h-7 w-full text-xs",disabled:O,onClick:I,children:j(O?"thread.branchPicker.loadingMore":"thread.branchPicker.loadMoreBranches")})})]}):r.jsxs(r.Fragment,{children:[V&&r.jsx("div",{className:"p-3 text-xs text-muted-foreground",children:j("thread.branchPicker.loadingPullRequests")}),!V&&W.length===0&&r.jsx(tr,{children:j("thread.branchPicker.noOpenPullRequests")}),W.length>0&&r.jsx(sr,{children:W.map(E=>r.jsxs(nr,{value:`#${E.number} ${E.title} ${E.head}`,className:"cursor-pointer",onSelect:()=>g(E.head,ir(E.title)),children:[r.jsx(ln,{className:"mr-2 h-4 w-4 shrink-0 text-muted-foreground"}),r.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[r.jsx("span",{className:"truncate",children:ir(E.title)}),r.jsxs("span",{className:"truncate text-xs text-muted-foreground",children:["#",E.number," · ",E.head]})]})]},E.number))})]})})]})]}),e[17]=v,e[18]=I,e[19]=k,e[20]=O,e[21]=D,e[22]=p,e[23]=b,e[24]=g,e[25]=m,e[26]=f,e[27]=h,e[28]=S,e[29]=d,e[30]=V,e[31]=C,e[32]=l,e[33]=w,e[34]=j,e[35]=L,e[36]=c,e[37]=A,e[38]=z}else z=e[38];return z}function no(t,e){return vn(t,e)?1:0}function ro(t){const e=$.c(20),{locked:s,placement:a,value:n,virtualMcpId:o,isV8:d,userLabel:l,baseBranch:i,baseIsDraft:u,onChange:c,onCreateBranch:h,onAdoptBranch:p,orgId:b,orgSlug:f,userId:m,target:g,owner:v,repo:j,sandboxMap:w,draftKind:x}=t;let P;return e[0]!==i||e[1]!==u||e[2]!==x||e[3]!==d||e[4]!==s||e[5]!==p||e[6]!==c||e[7]!==h||e[8]!==b||e[9]!==f||e[10]!==v||e[11]!==a||e[12]!==j||e[13]!==w||e[14]!==g||e[15]!==m||e[16]!==l||e[17]!==n||e[18]!==o?(P=r.jsx(eo,{virtualMcpId:o,isV8:d,userLabel:l,value:n,baseBranch:i,baseIsDraft:u,orgId:b,orgSlug:f,userId:m,target:g,owner:v,repo:j,sandboxMap:w,onChange:c,onCreateBranch:h,onAdoptBranch:p,spawnsNewChat:s,placement:a,draftKind:x}),e[0]=i,e[1]=u,e[2]=x,e[3]=d,e[4]=s,e[5]=p,e[6]=c,e[7]=h,e[8]=b,e[9]=f,e[10]=v,e[11]=a,e[12]=j,e[13]=w,e[14]=g,e[15]=m,e[16]=l,e[17]=n,e[18]=o,e[19]=P):P=e[19],P}function ao(t){const e=$.c(2),{branchPill:s}=t;if(!s)return null;let a;return e[0]!==s?(a=r.jsx(r.Fragment,{children:s}),e[0]=s,e[1]=a):a=e[1],a}function lo(t){const{locked:e,sessionRuntime:s,projectRuntime:a,draftRuntime:n,current:o}=t;return t.contentOnly&&n==="cms"?s==="cms"&&!e?{kind:"switch"}:{kind:"new-chat",runtime:"cms"}:n==="sandbox"&&s!=="sandbox"?{kind:"new-chat",runtime:"sandbox"}:n==="cms"&&s==="sandbox"&&a==="cms"&&!o?{kind:"new-chat"}:e?s==="sandbox"?{kind:"new-chat",runtime:"sandbox"}:{kind:"new-chat"}:{kind:"switch"}}function io(t){const e=$.c(25),{virtualMcp:s,currentBranch:a}=t,n=ll(),o=vs();let d;e[0]!==n?.messages||e[1]!==o?.isThreadLocked?(d=(n?.messages??[]).length>0||(o?.isThreadLocked??!1),e[0]=n?.messages,e[1]=o?.isThreadLocked,e[2]=d):d=e[2];const l=d,i=o?.setCurrentTaskBranch,u=o?.createTask,c=ea()==="blog"?"blog":"site",h=ys(s?.id),p=h.runtime,b=s?.metadata;let f;e[3]!==b?(f=ta(b),e[3]=b,e[4]=f):f=e[4];const m=f,g=m==="cms"&&p==="sandbox",v=Dl(s),j=ze(v),{data:w}=rn.useSession(),x=w?.user;let P;e[5]!==x?(P=In(x),e[5]=x,e[6]=P):P=e[6];const y=P,N=w?.user?.id??"",{org:C}=Is(),A=Ll(s,a),S=$n(s?.id),D=S&&p==="cms";let k;e[7]!==u||e[8]!==a||e[9]!==l||e[10]!==m||e[11]!==p||e[12]!==h.resolved||e[13]!==i||e[14]!==S?(k=(te,M)=>{const K=lo({locked:l,sessionRuntime:h.resolved?p:null,projectRuntime:m,draftRuntime:M&&(M.runtime??m),current:te===a,contentOnly:S});K.kind==="new-chat"&&u?u({branch:te,...K.runtime?{runtime:K.runtime}:{}}):i&&i(te)},e[7]=u,e[8]=a,e[9]=l,e[10]=m,e[11]=p,e[12]=h.resolved,e[13]=i,e[14]=S,e[15]=k):k=e[15];const O=k;let I;e[16]!==g||e[17]!==u||e[18]!==l||e[19]!==i?(I=te=>{(l||g)&&u?u({branch:te}):i&&i(te)},e[16]=g,e[17]=u,e[18]=l,e[19]=i,e[20]=I):I=e[20];const B=I;let F;e[21]!==u?(F=u?te=>u({runtime:"sandbox",branch:te}):void 0,e[21]=u,e[22]=F):F=e[22];const L=F,V=v&&sa(j)?r.jsx(ro,{userLabel:y,virtualMcpId:s?.id??"",isV8:S,value:a,baseBranch:A,baseIsDraft:D,orgId:C.id,orgSlug:C.slug,userId:N,target:j,owner:v.owner,repo:v.name,sandboxMap:s?.metadata?.sandboxMap,onChange:O,onCreateBranch:B,onAdoptBranch:L,locked:l,placement:"chat",draftKind:c},`${na(j)}:${v.owner}/${v.name}`):null;let z;return e[23]!==V?(z=r.jsx(ao,{branchPill:V}),e[23]=V,e[24]=z):z=e[24],z}const oo=Ja("flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg",{variants:{orientation:{horizontal:"[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",vertical:"flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none"}},defaultVariants:{orientation:"horizontal"}});function co(t){const e=$.c(11);let s,a,n;e[0]!==t?({className:s,orientation:a,...n}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=n):(s=e[1],a=e[2],n=e[3]);let o;e[4]!==s||e[5]!==a?(o=H(oo({orientation:a}),s),e[4]=s,e[5]=a,e[6]=o):o=e[6];let d;return e[7]!==a||e[8]!==n||e[9]!==o?(d=r.jsx("div",{role:"group","data-slot":"button-group","data-orientation":a,className:o,...n}),e[7]=a,e[8]=n,e[9]=o,e[10]=d):d=e[10],d}function uo(t){const e=$.c(14),{item:s}=t;let a;e[0]!==s?(a=()=>{s.onSelect()},e[0]=s,e[1]=a):a=e[1];let n;e[2]!==s.disabled||e[3]!==s.icon||e[4]!==s.label||e[5]!==a?(n=r.jsxs(ms,{disabled:s.disabled,onSelect:a,children:[s.icon,s.label]}),e[2]=s.disabled,e[3]=s.icon,e[4]=s.label,e[5]=a,e[6]=n):n=e[6];const o=n;if(!s.tooltip)return o;let d;e[7]!==o?(d=r.jsx(it,{asChild:!0,children:o}),e[7]=o,e[8]=d):d=e[8];let l;e[9]!==s.tooltip?(l=r.jsx(ot,{side:"right",children:s.tooltip}),e[9]=s.tooltip,e[10]=l):l=e[10];let i;return e[11]!==d||e[12]!==l?(i=r.jsxs(lt,{children:[d,l]}),e[11]=d,e[12]=l,e[13]=i):i=e[13],i}function ga(t){const e=$.c(20),{label:s,onClick:a,variant:n,size:o,disabled:d,loading:l,pulse:i,tooltip:u,icon:c,items:h,menuAriaLabel:p,className:b}=t,f=n===void 0?"default":n,m=o===void 0?"default":o,g=d===void 0?!1:d,v=l===void 0?!1:l,j=i===void 0?!1:i,w=(h?.length??0)>0;let x;if(e[0]!==b||e[1]!==g||e[2]!==w||e[3]!==c||e[4]!==h||e[5]!==s||e[6]!==v||e[7]!==p||e[8]!==a||e[9]!==j||e[10]!==m||e[11]!==u||e[12]!==f){const P=H(Kr,f==="default"&&"focus-visible:inset-ring-current");let y;e[14]!==c||e[15]!==v?(y=v?r.jsx(ps,{size:"xs"}):c,e[14]=c,e[15]=v,e[16]=y):y=e[16];const N=r.jsxs(ge,{type:"button",variant:f,size:m,disabled:g,"aria-busy":v||void 0,onClick:v?void 0:a,className:H(P,w&&"rounded-r-none border-r border-current/20"),children:[y,s]}),C=j&&"animate-pulse-brightness motion-reduce:animate-none motion-reduce:opacity-80";let A;e[17]!==b||e[18]!==C?(A=H(C,b),e[17]=b,e[18]=C,e[19]=A):A=e[19],x=r.jsxs(co,{className:A,children:[u?r.jsxs(lt,{children:[r.jsx(it,{asChild:!0,children:r.jsx("span",{className:H("inline-flex rounded-lg outline-none",P,g&&"cursor-not-allowed"),tabIndex:g?0:void 0,role:g?"button":void 0,"aria-disabled":g||void 0,children:N})}),r.jsx(ot,{children:u})]}):N,w?r.jsxs(nn,{children:[r.jsx(tn,{asChild:!0,children:r.jsx(ge,{type:"button",variant:f,size:m,"aria-label":p,className:H("has-[>svg]:px-2",P),children:r.jsx(Vr,{className:"size-3.5"})})}),r.jsx(sn,{align:"end",children:h?.map(ho)})]}):null]}),e[0]=b,e[1]=g,e[2]=w,e[3]=c,e[4]=h,e[5]=s,e[6]=v,e[7]=p,e[8]=a,e[9]=j,e[10]=m,e[11]=u,e[12]=f,e[13]=x}else x=e[13];return x}function ho(t){return r.jsx(uo,{item:t},t.key)}async function fo(t){if(t.hosted)return;const e=t.branch;await t.setCurrentTaskBranch(t.nextBranch()),e&&e!==t.baseBranch&&await t.deleteRelease(e)}function mo(t,e,{hosted:s}){return s&&t!==null?t:e}function po(t,e){const s=$.c(11),[a,n]=U.useState(null);let o;s[0]!==a||s[1]!==t||s[2]!==e?(o=mo(a,t,e),s[0]=a,s[1]=t,s[2]=e,s[3]=o):o=s[3];let d;s[4]!==t||s[5]!==e?(d=()=>n(e.hosted?t:null),s[4]=t,s[5]=e,s[6]=d):d=s[6];let l;s[7]===Symbol.for("react.memo_cache_sentinel")?(l=()=>n(null),s[7]=l):l=s[7];let i;return s[8]!==o||s[9]!==d?(i={shown:o,hold:d,release:l},s[8]=o,s[9]=d,s[10]=i):i=s[10],i}function bo({open:t,hosted:e}){return t||e}function xa(t){return ri({userName:t?.name,userEmail:t?.email})??void 0}function dn(t){const e=$.c(18),{state:s,header:a,body:n,note:o,gate:d,footer:l}=t,i=s!=="ready";let u;e[0]!==a?(u=r.jsx("div",{className:"space-y-0.5 px-4 py-3",children:a}),e[0]=a,e[1]=u):u=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=r.jsx("div",{className:"border-t"}),e[2]=c):c=e[2];let h;e[3]!==o?(h=o?r.jsx("div",{className:"space-y-1.5 border-t px-4 py-3",children:o}):null,e[3]=o,e[4]=h):h=e[4];let p;e[5]!==n||e[6]!==h?(p=r.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[n,h]}),e[5]=n,e[6]=h,e[7]=p):p=e[7];let b;e[8]===Symbol.for("react.memo_cache_sentinel")?(b=r.jsx("div",{className:"border-t"}),e[8]=b):b=e[8];let f;e[9]!==l?(f=r.jsx("div",{className:"space-y-2 px-4 py-3",children:l}),e[9]=l,e[10]=f):f=e[10];let m;return e[11]!==d||e[12]!==s||e[13]!==i||e[14]!==u||e[15]!==p||e[16]!==f?(m=r.jsxs("div",{className:"flex min-h-0 flex-1 flex-col","data-publish-state":s,"aria-busy":i,children:[u,c,p,d,b,f]}),e[11]=d,e[12]=s,e[13]=i,e[14]=u,e[15]=p,e[16]=f,e[17]=m):m=e[17],m}function Bs(t){const e=$.c(2),{children:s}=t;let a;return e[0]!==s?(a=r.jsx("div",{className:"scroll-fade min-h-0 flex-1 space-y-3 overflow-y-auto overscroll-contain px-4 pt-3 pb-2 [scrollbar-width:thin]",children:s}),e[0]=s,e[1]=a):a=e[1],a}function va(t){const e=$.c(10);let s,a,n;e[0]!==t?({className:a,children:s,...n}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=n):(s=e[1],a=e[2],n=e[3]);let o;e[4]!==a?(o=H("rounded-lg border bg-card px-3 py-2.5",a),e[4]=a,e[5]=o):o=e[5];let d;return e[6]!==s||e[7]!==n||e[8]!==o?(d=r.jsx("div",{className:o,...n,children:s}),e[6]=s,e[7]=n,e[8]=o,e[9]=d):d=e[9],d}function Qe(t){const e=$.c(4),{className:s}=t;let a;e[0]!==s?(a=H("animate-pulse rounded bg-muted motion-reduce:animate-none",s),e[0]=s,e[1]=a):a=e[1];let n;return e[2]!==a?(n=r.jsx("div",{className:a}),e[2]=a,e[3]=n):n=e[3],n}function Ot(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx(va,{children:r.jsxs("div",{className:"flex items-center gap-2.5",children:[r.jsx(Qe,{className:"size-4 rounded-md"}),r.jsx(Qe,{className:"h-3 w-24"}),r.jsx(Qe,{className:"h-2.5 w-16"}),r.jsx(Qe,{className:"ml-auto size-6 rounded"})]})}),t[0]=e):e=t[0],e}const ya="secret";function ja(t){return t.kind!=="block"?null:t.namedRule??null}function go(t,e){const s=e.find(a=>a&&typeof a=="object");return s?Yl(s.__resolveType):Zl(t)}const xo=/(?:^|\/)\.deco\/blocks\/([^/]+)\.json$/;function qn(t){const e=xo.exec(t)?.[1];return e?Ci(e):null}function en(t){if(!t)return null;try{const e=JSON.parse(t);if(e&&typeof e=="object"&&!Array.isArray(e))return e}catch{}return null}function vo(t,e){return t===null?"new":e===null?"removed":"edited"}function wa(t){const e=t.replace(/[_-]+/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").trim();return e?(e.charAt(0).toUpperCase()+e.slice(1)).replace(/\s+[A-Z](?=[a-z])/g,s=>s.toLowerCase()):t}function fs(t,e,s=!1){if(t&&typeof t=="object"&&!Array.isArray(t)){const a=t.__resolveType;if(typeof a=="string"&&a.trim()){if(s)return Wa(a);const o=(a.split("/").pop()??a).replace(/\.[jt]sx?$/,"");return wa(o)||o}}return`Section ${e+1}`}function Hn(t){if(Nr(t))return t.value??null;const e=t.__resolveType;return typeof e=="string"&&Qa(e)?t.section??null:null}const Pa=6;function Vs(t,e=0){if(e>Pa||!t||typeof t!="object")return[];if(Array.isArray(t))return t.flatMap(n=>Vs(n,e+1));const s=t;if(Sn(s.__resolveType))return yn(s).flatMap(n=>Vs(n?.value,e+1));const a=Hn(s);return a!==null?Vs(a,e+1):[s]}function yn(t){const e=t?.variants;return Array.isArray(e)?e.map(s=>s&&typeof s=="object"&&!Array.isArray(s)?s:null):[]}function cr(t){let e=t;for(let s=0;s<Pa;s++){if(!e||typeof e!="object"||Array.isArray(e))return null;const a=e;if(Sn(a.__resolveType))return a;const n=Hn(a);if(n===null)return null;e=n}return null}function yo(t,e,s){const a=yn(cr(t)),n=e?yn(cr(e)):[],o=e?Array.from({length:Math.max(a.length,n.length)},(i,u)=>u).filter(i=>!un(a[i],n[i])):[],l=[...o.map(i=>a[i]??n[i]),...a.filter((i,u)=>!o.includes(u))].flatMap(i=>Vs(i?.value)).map(i=>fs(i,s,!0));return[...new Set(l)]}function bn(t,e,s,a,n){let o=t,d=!1;for(let i=0;i<4;i++){if(!o||typeof o!="object"||Array.isArray(o)){d=!0;break}const u=o;if(Sn(u.__resolveType)){d=!0;break}const c=Hn(u);if(c===null)break;o=c}const l=d?yo(t,n,e):[];return{name:fs(d?t:o,e,!0),kind:"section",status:s,fields:a,...d?{wrapper:!0}:{},...l.length>0?{held:l}:{}}}function jn(t,e){const s=t.sections;if(Array.isArray(s))return s.flatMap((a,n)=>a&&typeof a=="object"&&!Array.isArray(a)?[{section:a,basePath:["sections",n]}]:[]);if(s&&typeof s=="object"){const a=s.variants;if(Array.isArray(a))return a.flatMap((n,o)=>{const d=n&&typeof n=="object"&&!Array.isArray(n)?n.value:null,l=e&&Nr(d),i=l?d.value:d;if(!Array.isArray(i))return[];const u=l?["sections","variants",o,"value","value"]:["sections","variants",o,"value"];return i.flatMap((c,h)=>c&&typeof c=="object"&&!Array.isArray(c)?[{section:c,basePath:[...u,h]}]:[])})}return[]}function dr(t){return JSON.stringify(t,(e,s)=>{if(s&&typeof s=="object"&&!Array.isArray(s)){const a=s;return Object.keys(a).sort().reduce((n,o)=>(n[o]=a[o],n),{})}return s})}function un(t,e){return t===void 0&&e===void 0?!0:dr(t)===dr(e)}function Rt(t,e,s,a=new Set){const n=new Set([...Object.keys(t??{}),...Object.keys(e??{})]),o=[];for(const d of n){if(d.startsWith("__")||a.has(d))continue;const l=t?t[d]:void 0,i=e?e[d]:void 0;un(l,i)||o.push({label:wa(d),path:[...s,d],from:l,to:i})}return o}function jo(t,e){const s=e.find(a=>a&&typeof a=="object");return s?s.__resolveType===li:t===ii}function wo(t,e){const s=n=>n===void 0||!!n&&typeof n=="object"&&!Array.isArray(n)&&!("__resolveType"in n),a=[];for(const n of Rt(t,e,[])){const o=String(n.path[0]);s(n.from)&&s(n.to)?a.push(...Rt(n.from??{},n.to??{},[o])):a.push(n)}return a}const Po=new Set(["sections"]);function Vn(t,e,s=!1){const a=t?jn(t,s):[],n=e?jn(e,s):[],o=[],d=Math.max(a.length,n.length);for(let i=0;i<d;i++){const u=a[i],c=n[i];if(!s){const h=So(u,c,i);h&&o.push(h);continue}if(u&&c){if(un(u.section,c.section))continue;o.push(bn(c.section,i,"edited",Rt(u.section,c.section,c.basePath),u.section))}else c?o.push(bn(c.section,i,"new",[])):u&&o.push(bn(u.section,i,"removed",[]))}const l=Rt(t,e,[],Po);return l.length>0&&o.push({name:"Page settings",kind:"settings",status:"edited",fields:l}),o}function So(t,e,s){return t&&e?un(t.section,e.section)?null:{name:fs(e.section,s),kind:"section",status:"edited",fields:Rt(t.section,e.section,e.basePath)}:e?{name:fs(e.section,s),kind:"section",status:"new",fields:[]}:t?{name:fs(t.section,s),kind:"section",status:"removed",fields:[]}:null}function wn(t,e){return{kind:"other",blockKey:null,name:t.split("/").pop()??t,pagePath:null,isSiteApp:!1,status:e,filepaths:[t],sections:[],fromJson:null,toJson:null}}function ko(t){const e=[],s=[],a=[],n=[];for(const[o,d]of Object.entries(t?.diffs??{})){if(Mn(o)){n.push(o);continue}const l=vo(d.from,d.to),i=qn(o);if(!i){a.push(wn(o,l));continue}const u=en(d.from),c=en(d.to),h=c??u;if(!h){a.push(wn(o,l));continue}const p=hs(i,h);if(p){e.push({kind:"page",blockKey:i,name:p.name,pagePath:p.path,isSiteApp:!1,status:l,filepaths:[o],sections:l==="edited"?Vn(u,c).map(f=>({...f,fields:bs(f.fields)})):[],fromJson:Fe(u),toJson:Fe(c)});continue}const b=Fn(i,h);s.push({kind:"block",blockKey:i,name:Xs(i,h),pagePath:null,isSiteApp:b,status:l,filepaths:[o],sections:l==="edited"?[{name:Xs(i,h),kind:"section",status:"edited",fields:bs(Rt(u,c,[]))}].filter(f=>f.fields.length>0):[],fromJson:Fe(u),toJson:Fe(c)})}return Sa({pages:e,blocks:s,other:a,generated:n})}function gn(t,e){return(t.filepaths[0]??"").localeCompare(e.filepaths[0]??"")}function Sa(t){const{pages:e,blocks:s,other:a,generated:n}=t;return e.sort(gn),s.sort(gn),a.sort(gn),{pages:e,blocks:s,other:a,generated:n,count:e.length+s.length+a.length}}function No(t){return t==="added"?"new":t==="removed"?"removed":"edited"}function ka(t){return t.startsWith("pages-")}function Na(t){const{files:e,lookup:s,diff:a}=t,n=[],o=[],d=[],l=[];for(const i of e){const u=i.path;if(Mn(u)){l.push(u);continue}const c=No(i.status),h=qn(u);if(!h){d.push(wn(u,c));continue}const p=a?.diffs[u],b=en(p?.from??null),f=en(p?.to??null),m=Ca(s,h),g=m??f??b;if((m?hs(h,m):null)??(!m&&ka(h))){const w=g?hs(h,g):null;n.push({kind:"page",blockKey:h,name:w?.name??ua(h),pagePath:w?.path??null,isSiteApp:!1,status:c,filepaths:[u],sections:c==="edited"?Vn(b,f).map(x=>({...x,fields:bs(x.fields)})):[],fromJson:Fe(b),toJson:Fe(f??(c==="new"?m:null))});continue}const j=Xs(h,g??{});o.push({kind:"block",blockKey:h,name:j,pagePath:null,isSiteApp:Fn(h,m??{}),status:c,filepaths:[u],sections:c==="edited"?[{name:j,kind:"section",status:"edited",fields:bs(Rt(b,f,[]))}].filter(w=>w.fields.length>0):[],fromJson:Fe(b),toJson:Fe(f)})}return Sa({pages:n,blocks:o,other:d,generated:l})}function Ca(t,e){const s=t?.[e];return s&&typeof s=="object"&&!Array.isArray(s)?s:null}function Co(t,e){return t??e}function Aa(t){return t.length<=1?t[0]??"":`${t.slice(0,-1).join(", ")} and ${t[t.length-1]}`}const xn=3;function zs(t){if(t.length<=xn)return Aa(t);const e=t.length-xn;return`${t.slice(0,xn).join(", ")} and ${e} more`}function Ao(t,e){if(!e){const a=t.sections.filter(n=>n.kind==="section").map(n=>n.name).slice(0,3);return a.length>0?`${t.name} (${a.join(", ")})`:t.name}const s=[...new Set(t.sections.filter(a=>a.kind==="section").flatMap(a=>a.wrapper?a.held??[]:[a.name]))].slice(0,3);return s.length>0?`${t.name} (${s.join(", ")})`:t.name}function Ro(t){const e=ja(t);return e==="experiments"?"A/B tests":e==="campaigns"?"Campaign dates":t.name}function Do(t){const e=[],s=t.pages.filter(l=>l.status==="edited"),a=t.pages.filter(l=>l.status==="new"),n=t.pages.filter(l=>l.status==="removed");if(s.length>0&&e.push(`updated ${zs(s.map(l=>Ao(l,!!t.v8)))}`),a.length>0){const l=a.length===1?"page":"pages";e.push(`added the ${zs(a.map(i=>i.name))} ${l}`)}if(n.length>0){const l=n.length===1?"page":"pages";e.push(`removed the ${zs(n.map(i=>i.name))} ${l}`)}const o=t.blocks.map(Ro);if(o.length>0&&e.push(`changed ${zs(o)}`),t.other.length>0){const l=t.other.length===1?"file":"files";e.push(`changed ${t.other.length} ${l}`)}if(e.length===0)return"";const d=Aa(e);return ai(d.charAt(0).toUpperCase()+d.slice(1))}function To(t,e){return t?jn(t,e).length:0}function Bo(t,e=!1){const s={newPageSections:t.kind==="page"&&t.status==="new"?To(t.toJson,e):null,sections:0,settings:!1,fields:0};if(s.newPageSections!==null)return s;for(const a of t.sections){if(a.kind==="settings"){s.settings=!0;continue}t.kind==="page"?s.sections+=1:s.fields+=a.fields.length}return s}const ur="••••••";function Fe(t){if(Array.isArray(t))return t.map(Fe);if(!t||typeof t!="object")return t;const e=t,s={};for(const[a,n]of Object.entries(e))s[a]=Fe(n);return e.__resolveType===ya&&"ciphertext"in e&&(s.ciphertext=ur),kr(e)&&"encrypted"in e&&(s.encrypted=ur),s}function Io(t){const e=t.toJson??t.fromJson;return!!e&&(e.__resolveType===ya||kr(e))}function bs(t){return t.map(e=>({...e,from:Fe(e.from),to:Fe(e.to)}))}function $o(t){const{changes:e,sides:s,lookup:a,meta:n,hosted:o}=t,d=[],l=[],i=c=>[...new Set((s?.diagnostics??[]).filter(h=>Zn(Xa(h.file))===Zn(c)).map(h=>h.side))],u=Object.keys(e).sort((c,h)=>c<h?-1:c>h?1:0);for(const c of u){const h=e[c],p=h.kind==="delete"?"removed":h.baseVersion===null?"new":"edited",b=s?.entries[c],f=b?.before??null,m=b?.after??null,g=Ca(a,c),v=g??m??f,j=i(c),w={blockKey:c,status:p,filepaths:[],entry:{name:c,version:h.version},...j.length>0?{unreadable:j}:{},fromJson:Fe(f),toJson:Fe(m??(p==="new"?g:null))},x=g?hs(c,g,n):null,P=!g&&v?hs(c,v,n):null;if(x??P??(!v&&ka(c))){const S=v?hs(c,v,n):null;d.push({...w,kind:"page",name:S?.name??ua(c),pagePath:S?.path??null,isSiteApp:!1,sections:p==="edited"?Vn(f,m,!0).map(D=>({...D,fields:bs(D.fields)})):[]});continue}const y=o?Ql(c,v,g,m,f):null,N=y?Xl(y,[v,g,m,f]):Xs(c,v??{}),C=go(c,[g,m,f]),A=jo(c,[g,m,f]);l.push({...w,kind:"block",name:A?"Settings":N,...A?{cmsSettings:!0}:{},...y?{blogKind:y}:{},...C?{namedRule:C}:{},pagePath:null,isSiteApp:Fn(c,g??v??{}),sections:p==="edited"?[{name:A?"Settings":N,kind:"section",status:"edited",fields:bs(A?wo(f,m):Rt(f,m,[]))}].filter(S=>S.fields.length>0):[]})}return{pages:d,blocks:l,other:[],generated:[],count:d.length+l.length,v8:!0}}function Ae(t){return t.filepaths[0]??t.blockKey??t.name}function Fo(t,e){return e(t==="new"?"thread.publishPopover.chipNew":t==="removed"?"thread.publishPopover.chipRemoved":"thread.publishPopover.chipEdited")}function Lo(t,e){const s=t.kind==="block"?mi:Jr;return r.jsx("span",{title:Fo(t.status,e),className:"flex shrink-0",children:r.jsx(s,{className:H("size-4",t.status==="new"&&"text-brand",t.status==="edited"&&"text-warning",t.status==="removed"&&"text-destructive")})})}function Oo(t,e){if(t.kind==="page")return t.pagePath;if(t.kind!=="block")return null;if(t.blogKind)return ei(t.blogKind,e);if(t.cmsSettings)return e("thread.publishPopover.settingsDetail");const s=ja(t);return s==="experiments"?e("thread.publishPopover.abTests"):s==="campaigns"?e("thread.publishPopover.campaignDates"):t.isSiteApp?e("thread.publishPopover.siteConfiguration"):e("thread.publishPopover.globalSection")}function Mo(t,e,s){const a=Bo(t,s);if(a.newPageSections!==null)return[a.newPageSections===1?e("thread.publishPopover.newPageSectionOne"):e("thread.publishPopover.newPageSections",{count:a.newPageSections})];const n=[];return a.sections===1?n.push(e("thread.publishPopover.sectionChangedOne")):a.sections>1&&n.push(e("thread.publishPopover.sectionsChanged",{count:a.sections})),a.fields===1?n.push(e("thread.publishPopover.fieldChangedOne")):a.fields>1&&n.push(e("thread.publishPopover.fieldsChanged",{count:a.fields})),a.settings&&n.push(e("thread.publishPopover.pageSettingsChanged")),n}function Ra(t){const e=$.c(46),{change:s,bodyPending:a,selected:n,onSelect:o,confirming:d,onConfirmingChange:l,onDiscard:i,isPublishing:u,isDiscarding:c,v8:h}=t,p=a===void 0?!1:a,b=h===void 0?!1:h,f=xe();let m;e[0]!==s||e[1]!==f?(m=Oo(s,f),e[0]=s,e[1]=f,e[2]=m):m=e[2];const g=m;let v;if(e[3]!==p||e[4]!==s||e[5]!==d||e[6]!==g||e[7]!==c||e[8]!==u||e[9]!==l||e[10]!==i||e[11]!==o||e[12]!==n||e[13]!==f||e[14]!==b){const j=Mo(s,f,b),w=p&&j.length===0&&s.status==="edited",x=n&&"border-foreground/30 bg-accent hover:bg-secondary-hover";let P;e[16]!==x?(P=H("cursor-pointer transition-colors hover:bg-accent",x),e[16]=x,e[17]=P):P=e[17];let y;e[18]!==s?(y=Ae(s),e[18]=s,e[19]=y):y=e[19];let N;e[20]!==s||e[21]!==f?(N=Lo(s,f),e[20]=s,e[21]=f,e[22]=N):N=e[22];let C;e[23]!==s.cmsSettings||e[24]!==s.name||e[25]!==f?(C=s.cmsSettings?f("thread.publishPopover.settings"):s.name,e[23]=s.cmsSettings,e[24]=s.name,e[25]=f,e[26]=C):C=e[26];let A;e[27]!==C?(A=r.jsx("span",{className:"truncate text-sm font-medium",children:C}),e[27]=C,e[28]=A):A=e[28];let S;e[29]!==g?(S=g?r.jsx("span",{className:"truncate text-xs text-muted-foreground",children:g}):null,e[29]=g,e[30]=S):S=e[30];let D;e[31]!==n||e[32]!==A||e[33]!==S?(D=r.jsxs("button",{type:"button",className:"flex min-w-0 flex-1 items-center gap-2 text-left","aria-pressed":n,children:[A,S]}),e[31]=n,e[32]=A,e[33]=S,e[34]=D):D=e[34];let k;e[35]!==d||e[36]!==c||e[37]!==u||e[38]!==l||e[39]!==i||e[40]!==f?(k=d?r.jsxs("div",{className:"flex shrink-0 items-center gap-1.5",children:[r.jsx("button",{type:"button",className:"text-xs text-muted-foreground hover:text-foreground",onClick:I=>{I.stopPropagation(),l(!1)},children:f("thread.publishDialog.cancel")}),r.jsx("button",{type:"button",className:"text-xs font-medium text-destructive disabled:opacity-50",onClick:I=>{I.stopPropagation(),l(!1),i?.()},disabled:c,children:f("thread.publishPopover.discard")})]}):i?r.jsx(an,{children:r.jsxs(lt,{children:[r.jsx(it,{asChild:!0,children:r.jsx(ge,{type:"button",variant:"ghost-destructive",size:"icon-xs","aria-label":f("thread.publishPopover.discard"),className:"shrink-0 disabled:pointer-events-auto",onClick:I=>{I.stopPropagation(),l(!0)},disabled:u||c,children:r.jsx(on,{className:"size-3.5"})})}),r.jsx(ot,{children:f("thread.publishPopover.discard")})]})}):null,e[35]=d,e[36]=c,e[37]=u,e[38]=l,e[39]=i,e[40]=f,e[41]=k):k=e[41];let O;e[42]!==D||e[43]!==k||e[44]!==N?(O=r.jsxs("div",{className:"flex items-center gap-2.5",children:[N,D,k]}),e[42]=D,e[43]=k,e[44]=N,e[45]=O):O=e[45],v=r.jsxs(va,{className:P,"data-change-id":y,onClick:o,children:[O,j.length>0?r.jsx("div",{className:"mt-1 space-y-0.5 pl-[26px] text-xs text-muted-foreground",children:j.map(_o)}):w?r.jsx("div",{className:"mt-1 space-y-0.5 pl-[26px]",children:r.jsx(Qe,{className:"h-4 w-2/3"})}):null]}),e[3]=p,e[4]=s,e[5]=d,e[6]=g,e[7]=c,e[8]=u,e[9]=l,e[10]=i,e[11]=o,e[12]=n,e[13]=f,e[14]=b,e[15]=v}else v=e[15];return v}function _o(t,e){return r.jsx("div",{className:"truncate",children:t},`${e}-${t}`)}function Da(){const t=$.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={width:-1,height:-1},t[0]=e):e=t[0];const[s,a]=U.useState(e);let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=l=>{if(!l)return;const i=()=>a(c=>c.width===l.clientWidth&&c.height===l.clientHeight?c:{width:l.clientWidth,height:l.clientHeight});i();const u=new ResizeObserver(i);return u.observe(l),()=>u.disconnect()},t[1]=n):n=t[1];const o=n;let d;return t[2]!==s?(d=[s,o],t[2]=s,t[3]=d):d=t[3],d}function Eo(){return document.documentElement.classList.contains("dark")?"vs-dark":"vs"}const zo=[{width:"w-3/4",tone:"ctx"},{width:"w-1/2",tone:"del"},{width:"w-3/5",tone:"add"},{width:"w-2/5",tone:"ctx"},{width:"w-4/5",tone:"add"},{width:"w-1/2",tone:"ctx"}];function hr(t){const e=$.c(10),{height:s}=t,a=xe();let n;e[0]!==s?(n={height:s},e[0]=s,e[1]=n):n=e[1];let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=zo.map(Uo),e[2]=o):o=e[2];let d;e[3]!==a?(d=a("thread.publishDialog.openingComparison"),e[3]=a,e[4]=d):d=e[4];let l;e[5]!==d?(l=r.jsx("div",{className:"flex items-center justify-center pt-1 text-2xs text-muted-foreground",children:d}),e[5]=d,e[6]=l):l=e[6];let i;return e[7]!==n||e[8]!==l?(i=r.jsxs("div",{style:n,className:"flex w-full flex-col gap-1.5 overflow-hidden px-3 py-2",children:[o,l]}),e[7]=n,e[8]=l,e[9]=i):i=e[9],i}function Uo(t,e){return r.jsxs("div",{className:H("flex items-center gap-2 rounded px-1 py-0.5",t.tone==="del"&&"bg-destructive/5",t.tone==="add"&&"bg-success/5"),children:[r.jsx("div",{className:H("h-2 w-4 shrink-0 animate-pulse rounded-sm bg-muted",t.tone==="del"&&"bg-destructive/20",t.tone==="add"&&"bg-success/25")}),r.jsx("div",{className:H("h-2 animate-pulse rounded-sm bg-muted",t.width,t.tone==="del"&&"bg-destructive/20",t.tone==="add"&&"bg-success/25")})]},e)}const Ta={readOnly:!0,renderSideBySide:!1,minimap:{enabled:!1},scrollBeyondLastLine:!1,fontSize:12},Ko={...Ta,lineNumbersMinChars:3,lineDecorationsWidth:4,folding:!1,glyphMargin:!1,renderOverviewRuler:!1};function qo(t){const e=$.c(11),{diff:s,emptyMessage:a,rowClassName:n,onDiscardFile:o,hideFileRows:d,editorHeight:l}=t,i=a===void 0?"No file changes in the working tree":a,u=n===void 0?"px-6":n,c=d===void 0?!1:d,h=l===void 0?"380px":l,[p,b]=U.useState(null),[f,m]=U.useState(null);let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g=Eo(),e[0]=g):g=e[0];const v=g;if(!s||Object.keys(s.diffs).length===0){let w;return e[1]!==i?(w=r.jsx("div",{className:"flex items-center justify-center py-10 text-sm text-muted-foreground",children:i}),e[1]=i,e[2]=w):w=e[2],w}let j;return e[3]!==s.diffs||e[4]!==f||e[5]!==h||e[6]!==p||e[7]!==c||e[8]!==o||e[9]!==u?(j=r.jsx("div",{className:"divide-y",children:Object.entries(s.diffs).map(w=>{const[x,P]=w,{from:y,to:N}=P,C=p===x,A=y===null,S=N===null,D=x.startsWith("/")?x.slice(1):x,k=D.lastIndexOf("/"),O=k>=0?D.slice(k+1):D,I=k>=0?D.slice(0,k):null,B=Ai(x),F=A?"bg-success":S?"bg-destructive":"bg-warning";return c?r.jsx("div",{children:r.jsx(rr,{original:y??"",modified:N??"",language:B,theme:v,height:h,loading:r.jsx(hr,{height:h}),options:Ko})},x):r.jsxs("div",{children:[r.jsxs("div",{className:H("flex items-center gap-3 py-3 hover:bg-accent",u),children:[r.jsx("button",{type:"button",className:"flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground transition-transform hover:text-foreground",onClick:()=>b(C?null:x),children:r.jsx(Pr,{className:H("h-3.5 w-3.5 transition-transform",C&&"rotate-90")})}),r.jsx("div",{className:H("h-2.5 w-2.5 shrink-0 rounded-full",F)}),r.jsx(Jr,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),r.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:O}),I&&r.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:I}),o?r.jsxs(nn,{children:[r.jsx(tn,{asChild:!0,children:r.jsx("button",{type:"button",className:"flex h-6 w-6 shrink-0 items-center justify-center text-muted-foreground hover:bg-accent hover:text-foreground rounded-lg",children:r.jsx(Ya,{className:"h-3.5 w-3.5"})})}),r.jsx(sn,{align:"end",children:r.jsx(ms,{className:"text-destructive focus:text-destructive",onSelect:()=>m(x),children:"Discard changes"})})]}):null]}),f===x&&o?r.jsxs("div",{className:H("flex items-center justify-between gap-3 border-t bg-destructive/5 py-2.5",u),children:[r.jsxs("span",{className:"text-xs text-destructive",children:["Discard all changes to"," ",r.jsx("span",{className:"font-medium",children:O}),"? This cannot be undone."]}),r.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[r.jsx(ge,{type:"button",variant:"ghost",size:"sm",onClick:()=>m(null),children:"Cancel"}),r.jsx(ge,{type:"button",variant:"destructive",size:"sm",onClick:()=>{m(null),o(x)},children:"Discard"})]})]}):null,C&&r.jsx("div",{className:"border-t",children:r.jsx(rr,{original:y??"",modified:N??"",language:B,theme:v,height:h,loading:r.jsx(hr,{height:h}),options:Ta})})]},x)})}),e[3]=s.diffs,e[4]=f,e[5]=h,e[6]=p,e[7]=c,e[8]=o,e[9]=u,e[10]=j):j=e[10],j}function Ho(t){if(t.kind!=="block"||t.isSiteApp||!t.blockKey)return null;const e=(t.toJson??t.fromJson)?.__resolveType;return typeof e=="string"&&Di(e)?t.blockKey:null}function Vo(t){return t.kind!=="page"?!0:!t.pagePath||At(t.pagePath).length>0}function Go(t,e){try{return cl(t,si,e)}catch{return null}}function Jo(t,e,s){if(!e)return;const a=ti(e,t);if(!a)return null;if(At(a.path).length===0||s?.path!==a.path)return a.path;const n=Ln(a.path,s.params);return At(n).length===0?n:a.path}function Wo(t){return t.sectionKey&&!t.v8?Go(t.previewServerUrl,t.sectionKey):Xo(t.previewServerUrl,t.path)}function Qo(t,e){if(t.kind!=="page")return"/";const s=t.pagePath;if(!s)return"";if(At(s).length===0)return s;if(e?.path!==s)return"";const a=Ln(s,e.params);return At(a).length===0?a:""}function Xo(t,e){const s=e.trim();if(!s||At(s).length>0)return null;try{const a=new URL(t),n=new URL(s.startsWith("/")?s:`/${s}`,a);return n.origin===a.origin?n:null}catch{return null}}function Yo(t,e){return e?.kind==="pointer"&&e.link?Dn(t.toString(),e.link):Ba(t,e)}function Ba(t,e){if(!e)return null;if(e.kind==="pointer")return Dn(t.toString(),e.pointer);try{return new URL(`${t.pathname}${t.search}`,e.previewUrl).href}catch{return null}}function Zo(t,e,s){return e===null?!1:t!=="other"||s?.kind==="sandbox"}function ec(t,e){const s=e?t.kind==="page":t.kind!=="other";return{before:s&&t.status==="new"?"new":null,after:s&&t.status==="removed"?"removed":null}}const Ia=U.createContext(!0),tc=["split","before","after","code"];function sc(t){return tc.includes(t)}const $a={desktop:1280,mobile:412};function nc(t,e){const s=(o,d)=>t.unreadable?.includes(d)?e:o?`${JSON.stringify(o,null,2)}
|
|
2
2
|
`:null,a=t.status==="new"?null:s(t.fromJson,"before"),n=t.status==="removed"?null:s(t.toJson,"after");return a===null&&n===null?{diffs:{}}:t.status==="edited"&&(a===null||n===null)?{diffs:{}}:{diffs:{[tl(t.entry.name)]:{from:a,to:n}}}}function rc(t,e){return{from:t.fromJson?`${JSON.stringify(t.fromJson,null,2)}
|
|
3
3
|
`:e.from,to:t.toJson?`${JSON.stringify(t.toJson,null,2)}
|
|
4
4
|
`:e.to}}function Fa(t){const e=$.c(79),{change:s,diff:a,bodyPending:n,previewServerUrl:o,draft:d,lastPage:l,v8:i,onReady:u}=t,c=xe(),h=U.use(Ia),p=Ho(s),b=i?null:p,f=i?p:null,m=f?Jo(f,i?.blocks,l):void 0,g=f!==null&&m===null,v=Zo(s.kind,o,d)&&(f===null||typeof m=="string"),[j,w]=U.useState(null),x=v?j??"split":"code",[P,y]=U.useState("desktop"),[N,C]=U.useState(null),A=N??(f?m??"":Qo(s,l));let S;e[0]!==s?(S=Vo(s),e[0]=s,e[1]=S):S=e[1];const D=S,k=o?Wo({previewServerUrl:o,sectionKey:p,path:A,v8:!!i}):null,O=k?Dn(k.toString(),dl):null,I=k?Ba(k,d):null,B=k?Yo(k,d):null;let F;e[2]!==s?(F=Io(s),e[2]=s,e[3]=F):F=e[3];const L=F;let V;e[4]!==s||e[5]!==a?.diffs||e[6]!==L||e[7]!==c?(V=s.entry?nc(s,c("thread.publishCompare.sideUnreadable")):{diffs:Object.fromEntries(s.filepaths.flatMap(Q=>{const oe=a?.diffs[Q];return oe?[[Q,L?rc(s,oe):oe]]:[]}))},e[4]=s,e[5]=a?.diffs,e[6]=L,e[7]=c,e[8]=V):V=e[8];const z=V;let te;e[9]!==z.diffs?(te=Object.keys(z.diffs),e[9]=z.diffs,e[10]=te):te=e[10];const M=te.length>0;let K;e:{if(b!==null){K=null;break e}if(f!==null){const oe=A.trim();if(!oe){K=null;break e}K=At(oe).length>0?c("thread.publishCompare.dynamicHint",{template:oe}):c("thread.publishCompare.blockHint",{path:oe});break e}if(s.kind!=="page"){let oe;e[11]!==c?(oe=c("thread.publishCompare.globalHint"),e[11]=c,e[12]=oe):oe=e[12],K=oe;break e}let Q;e[13]!==s.pagePath||e[14]!==c?(Q=s.pagePath&&At(s.pagePath).length>0?c("thread.publishCompare.dynamicHint",{template:s.pagePath}):null,e[13]=s.pagePath,e[14]=c,e[15]=Q):Q=e[15],K=Q}const J=K,se=ec(s,!!i),[W,ue]=U.useState(ac);let Y;e[16]===Symbol.for("react.memo_cache_sentinel")?(Y=Q=>ue(oe=>oe.has(Q)?oe:new Set(oe).add(Q)),e[16]=Y):Y=e[16];const le=Y;let T;e[17]!==i?(T=Q=>i?r.jsx(oc,{...Q,onLoaded:le}):r.jsx(ic,{...Q}),e[17]=i,e[18]=T):T=e[18];const ee=T,ne=(v?[se.before==="new"?null:O,se.after==="removed"?null:I].flatMap(Q=>Q?[Kn(Q,P)]:[]):[]).every(Q=>W.has(Q));let re;e[19]!==u||e[20]!==ne?(re=ne&&u?Q=>{Q&&u()}:void 0,e[19]=u,e[20]=ne,e[21]=re):re=e[21];const Se=re,he=se.before==="new"?r.jsx(Us,{icon:r.jsx(Yr,{className:"size-5 text-brand"}),title:c("thread.publishCompare.newTitle"),description:c("thread.publishCompare.newDescription")}):ee({url:O,device:P,title:c("thread.publishCompare.before"),missing:c("thread.publishCompare.enterPath")}),be=se.after==="removed"?r.jsx(Us,{icon:r.jsx(on,{className:"size-5 text-destructive"}),title:c("thread.publishCompare.removedTitle"),description:c("thread.publishCompare.removedDescription")}):ee({url:I,device:P,title:c("thread.publishCompare.after"),missing:c(k?"thread.publishCompare.draftUnavailable":"thread.publishCompare.enterPath")});let ce;e[22]!==v||e[23]!==w||e[24]!==h||e[25]!==c||e[26]!==x?(ce=v||h?r.jsx(Hr,{value:x,onValueChange:Q=>{sc(Q)&&w(Q)},children:r.jsxs(qr,{className:"h-8 w-auto",variant:"pill",children:[v?r.jsxs(r.Fragment,{children:[r.jsx(Lt,{value:"split",className:"px-3 text-xs",children:c("thread.publishCompare.sideBySide")}),r.jsx(Lt,{value:"before",className:"px-3 text-xs",children:c("thread.publishCompare.before")}),r.jsx(Lt,{value:"after",className:"px-3 text-xs",children:c("thread.publishCompare.after")})]}):null,h?r.jsx(Lt,{value:"code",className:"px-3 text-xs",children:c("thread.publishCompare.code")}):null]})}):null,e[22]=v,e[23]=w,e[24]=h,e[25]=c,e[26]=x,e[27]=ce):ce=e[27];let ie;e[28]!==B||e[29]!==v||e[30]!==s.pagePath||e[31]!==P||e[32]!==A||e[33]!==D||e[34]!==b||e[35]!==y||e[36]!==C||e[37]!==c||e[38]!==x?(ie=v&&x!=="code"?r.jsxs(r.Fragment,{children:[b?null:D?r.jsx(Za,{value:A,onChange:Q=>C(Q.target.value),placeholder:s.pagePath??"/","aria-label":c("thread.publishCompare.pathLabel"),className:"h-8 w-56 font-mono text-xs"}):r.jsx("span",{className:"max-w-56 truncate px-1 font-mono text-xs text-muted-foreground",children:A}),r.jsxs("div",{className:"flex items-center rounded-lg border p-0.5",children:[r.jsx(fr,{active:P==="desktop",label:c("thread.publishCompare.desktop"),onClick:()=>y("desktop"),children:r.jsx(Ri,{className:"size-3.5"})}),r.jsx(fr,{active:P==="mobile",label:c("thread.publishCompare.mobile"),onClick:()=>y("mobile"),children:r.jsx(Sl,{className:"size-3.5"})})]}),B?r.jsxs("a",{href:B,target:"_blank",rel:"noopener noreferrer",className:"ml-auto flex items-center gap-1.5 text-xs text-muted-foreground transition-colors hover:text-foreground",children:[r.jsx(el,{className:"size-3.5"}),c("thread.publishCompare.openDraft")]}):null]}):null,e[28]=B,e[29]=v,e[30]=s.pagePath,e[31]=P,e[32]=A,e[33]=D,e[34]=b,e[35]=y,e[36]=C,e[37]=c,e[38]=x,e[39]=ie):ie=e[39];let E;e[40]!==ie||e[41]!==ce?(E=r.jsxs("div",{className:"flex flex-wrap items-center gap-2 border-b bg-background px-4 py-2.5 max-md:pr-12",children:[ce,ie]}),e[40]=ie,e[41]=ce,e[42]=E):E=e[42];let fe;e[43]!==v||e[44]!==J||e[45]!==x?(fe=J&&v&&x!=="code"?r.jsx("p",{className:"border-b bg-background px-4 py-1.5 text-2xs text-muted-foreground",children:J}):null,e[43]=v,e[44]=J,e[45]=x,e[46]=fe):fe=e[46];let ke;e[47]!==g||e[48]!==h||e[49]!==c?(ke=g&&h?r.jsx("p",{className:"border-b bg-background px-4 py-1.5 text-2xs text-muted-foreground",children:c("thread.publishCompare.notOnAnyPage")}):null,e[47]=g,e[48]=h,e[49]=c,e[50]=ke):ke=e[50];let me;e[51]!==o||e[52]!==h||e[53]!==c||e[54]!==f||e[55]!==m||e[56]!==x?(me=x==="code"&&!h?f!==null&&m===void 0?r.jsx(Qe,{className:"m-4 h-64 rounded"}):o===null?r.jsx(Us,{icon:r.jsx(Ys,{className:"size-5 text-muted-foreground"}),title:c("thread.publishCompare.previewNotReadyTitle"),description:c("thread.publishCompare.draftUnavailable")}):r.jsx(Us,{icon:r.jsx(Ys,{className:"size-5 text-muted-foreground"}),title:c("thread.publishCompare.noPreviewTitle"),description:c("thread.publishCompare.noPreviewDescription")}):null,e[51]=o,e[52]=h,e[53]=c,e[54]=f,e[55]=m,e[56]=x,e[57]=me):me=e[57];let X;e[58]!==n||e[59]!==M||e[60]!==z||e[61]!==h||e[62]!==c||e[63]!==x?(X=x==="code"&&h?r.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto bg-background [scrollbar-width:thin]",children:M?r.jsx(qo,{diff:z,hideFileRows:!0,editorHeight:"70vh"}):n?r.jsx(Qe,{className:"m-4 h-64 rounded"}):r.jsx("p",{className:"px-4 py-6 text-xs text-muted-foreground",children:c("thread.publishPopover.detailsUnavailable")})}):null,e[58]=n,e[59]=M,e[60]=z,e[61]=h,e[62]=c,e[63]=x,e[64]=X):X=e[64];let Z;e[65]!==be||e[66]!==he||e[67]!==v||e[68]!==c||e[69]!==x?(Z=v?r.jsxs("div",{className:H("flex min-h-0 flex-1 gap-3 p-3",x==="code"&&"hidden"),children:[r.jsx(mr,{label:c("thread.publishCompare.before"),hidden:x==="after",children:he}),r.jsx(mr,{label:c("thread.publishCompare.after"),highlight:!0,hidden:x==="before",children:be})]}):null,e[65]=be,e[66]=he,e[67]=v,e[68]=c,e[69]=x,e[70]=Z):Z=e[70];let Be;return e[71]!==Se||e[72]!==E||e[73]!==fe||e[74]!==ke||e[75]!==me||e[76]!==X||e[77]!==Z?(Be=r.jsxs("div",{ref:Se,className:"flex min-h-0 min-w-0 flex-1 flex-col bg-muted/40",children:[E,fe,ke,me,X,Z]}),e[71]=Se,e[72]=E,e[73]=fe,e[74]=ke,e[75]=me,e[76]=X,e[77]=Z,e[78]=Be):Be=e[78],Be}function ac(){return new Set}function fr(t){const e=$.c(8),{active:s,label:a,onClick:n,children:o}=t,d=s&&"bg-accent text-foreground";let l;e[0]!==d?(l=H("flex size-7 items-center justify-center rounded-md text-muted-foreground transition-colors hover:text-foreground",d),e[0]=d,e[1]=l):l=e[1];let i;return e[2]!==s||e[3]!==o||e[4]!==a||e[5]!==n||e[6]!==l?(i=r.jsx("button",{type:"button","aria-label":a,"aria-pressed":s,title:a,onClick:n,className:l,children:o}),e[2]=s,e[3]=o,e[4]=a,e[5]=n,e[6]=l,e[7]=i):i=e[7],i}function mr(t){const e=$.c(18),{label:s,highlight:a,hidden:n,children:o}=t,d=a===void 0?!1:a,i=(n===void 0?!1:n)&&"hidden";let u;e[0]!==i?(u=H("flex min-h-0 min-w-0 flex-1 flex-col gap-1.5",i),e[0]=i,e[1]=u):u=e[1];const c=d&&"bg-brand";let h;e[2]!==c?(h=H("size-1.5 rounded-full bg-muted-foreground/50",c),e[2]=c,e[3]=h):h=e[3];let p;e[4]!==h?(p=r.jsx("span",{className:h}),e[4]=h,e[5]=p):p=e[5];let b;e[6]!==s||e[7]!==p?(b=r.jsxs("div",{className:"flex items-center gap-1.5 px-0.5 text-2xs font-medium text-muted-foreground",children:[p,s]}),e[6]=s,e[7]=p,e[8]=b):b=e[8];const f=d&&"border-brand/60";let m;e[9]!==f?(m=H("relative min-h-0 flex-1 overflow-hidden rounded-lg border bg-background",f),e[9]=f,e[10]=m):m=e[10];let g;e[11]!==o||e[12]!==m?(g=r.jsx("div",{className:m,children:o}),e[11]=o,e[12]=m,e[13]=g):g=e[13];let v;return e[14]!==g||e[15]!==u||e[16]!==b?(v=r.jsxs("div",{className:u,children:[b,g]}),e[14]=g,e[15]=u,e[16]=b,e[17]=v):v=e[17],v}function Us(t){const e=$.c(10),{icon:s,title:a,description:n}=t;let o;e[0]!==s?(o=r.jsx("div",{className:"mb-1",children:s}),e[0]=s,e[1]=o):o=e[1];let d;e[2]!==a?(d=r.jsx("p",{className:"text-sm font-medium",children:a}),e[2]=a,e[3]=d):d=e[3];let l;e[4]!==n?(l=r.jsx("p",{className:"text-xs text-muted-foreground",children:n}),e[4]=n,e[5]=l):l=e[5];let i;return e[6]!==o||e[7]!==d||e[8]!==l?(i=r.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-1 px-6 text-center",children:[o,d,l]}),e[6]=o,e[7]=d,e[8]=l,e[9]=i):i=e[9],i}function lc(t,e){if(!t)return{visibility:"hidden",width:e};const s=Math.min(t.width/e,1);return{left:Math.max((t.width-e*s)/2,0),width:e,height:t.height/s,transform:`scale(${s})`,transformOrigin:"top left"}}function ic(t){const e=$.c(24),{url:s,device:a,title:n,missing:o}=t,[d,l]=Da(),[i,u]=U.useState(null);if(!s){let y;return e[0]!==o?(y=r.jsx("p",{className:"flex h-full items-center justify-center px-6 text-center text-xs text-muted-foreground",children:o}),e[0]=o,e[1]=y):y=e[1],y}let c;e[2]!==a||e[3]!==s?(c=Kn(s,a),e[2]=a,e[3]=s,e[4]=c):c=e[4];const h=c,p=$a[a],b=d.width>0?Math.min(d.width/p,1):1,f=d.width>0?Math.max((d.width-p*b)/2,0):0;let m;e[5]!==h?(m=()=>u(h),e[5]=h,e[6]=m):m=e[6];const g=d.height>0?d.height/b:"100%",v=`scale(${b})`;let j;e[7]!==p||e[8]!==f||e[9]!==g||e[10]!==v?(j={left:f,width:p,height:g,transform:v,transformOrigin:"top left"},e[7]=p,e[8]=f,e[9]=g,e[10]=v,e[11]=j):j=e[11];let w;e[12]!==h||e[13]!==m||e[14]!==j||e[15]!==n?(w=r.jsx("iframe",{src:h,title:n,sandbox:"allow-scripts allow-same-origin",onLoad:m,className:"absolute top-0 border-0 bg-white",style:j},h),e[12]=h,e[13]=m,e[14]=j,e[15]=n,e[16]=w):w=e[16];let x;e[17]!==i||e[18]!==h?(x=i!==h?r.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background/60",children:r.jsx(ps,{className:"size-5 motion-reduce:animate-none"})}):null,e[17]=i,e[18]=h,e[19]=x):x=e[19];let P;return e[20]!==l||e[21]!==w||e[22]!==x?(P=r.jsxs("div",{ref:l,className:"absolute inset-0",children:[w,x]}),e[20]=l,e[21]=w,e[22]=x,e[23]=P):P=e[23],P}function oc(t){const e=$.c(21),{url:s,device:a,title:n,missing:o,onLoaded:d}=t,[l,i]=Da(),[u,c]=U.useState(null),[h,p]=U.useState(null),b=l.width>0&&l.height>0;b&&(u?.width!==l.width||u?.height!==l.height)&&c(l);const f=b?l:u;if(!s){let P;return e[0]!==o?(P=r.jsx("p",{className:"flex h-full items-center justify-center px-6 text-center text-xs text-muted-foreground",children:o}),e[0]=o,e[1]=P):P=e[1],P}let m,g,v,j;if(e[2]!==f||e[3]!==a||e[4]!==d||e[5]!==i||e[6]!==h||e[7]!==n||e[8]!==s){const P=Kn(s,a),y=$a[a];m=h?.src!==P;const N=[...h&&m?[h]:[],{src:P,logicalWidth:y}];g=i,v="absolute inset-0",j=N.map(C=>{const A=C.src===P&&m;return r.jsx("iframe",{src:C.src,title:n,"aria-hidden":A&&h?!0:void 0,sandbox:"allow-scripts allow-same-origin",onLoad:()=>{C.src===P&&(p(C),d?.(C.src))},className:H("absolute top-0 border-0 bg-white",A&&"pointer-events-none opacity-0"),style:lc(f,C.logicalWidth)},C.src)}),e[2]=f,e[3]=a,e[4]=d,e[5]=i,e[6]=h,e[7]=n,e[8]=s,e[9]=m,e[10]=g,e[11]=v,e[12]=j}else m=e[9],g=e[10],v=e[11],j=e[12];let w;e[13]!==m||e[14]!==h?(w=m?h?r.jsx(ps,{className:"absolute right-2 top-2 size-4 text-muted-foreground motion-reduce:animate-none"}):r.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background/60",children:r.jsx(ps,{className:"size-5 motion-reduce:animate-none"})}):null,e[13]=m,e[14]=h,e[15]=w):w=e[15];let x;return e[16]!==g||e[17]!==v||e[18]!==j||e[19]!==w?(x=r.jsxs("div",{ref:g,className:v,children:[j,w]}),e[16]=g,e[17]=v,e[18]=j,e[19]=w,e[20]=x):x=e[20],x}const cc=/^Co-authored-by:\s*([^<\r\n]+?)(?:\s*<[^>\r\n]*>)?\s*$/im;function dc(t){if(!t)return null;const e=cc.exec(t)?.[1]?.trim();return e||null}function uc(t){return/\[bot\]$/i.test(t)||/-bot$/i.test(t)}function hc(t){const e=dc(t.body);if(e)return e;const s=t.author.trim();return!s||uc(s)?null:s}function fc(t,e,s,a,n,o){return["cms-publish-bodies",t,e,s,a,n,o]}const mc=6e4;function pc(t,e){return e?null:t.files.map(s=>`${s.index}${s.working_dir} ${s.path}`).sort().join(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as I,j as r,n as v,b as M,a6 as P,bh as R}from"./index-
|
|
1
|
+
import{c as I,j as r,n as v,b as M,a6 as P,bh as R}from"./index-CMOYwhXD.js";import{E as T}from"./empty-state-C2fGsW3_.js";import{u as w}from"./chat-context-DheRYNZa.js";import{u as B,j as L,k as _}from"./site-editor-toast-CP-wSW1F.js";import{i as $,u as A,k as Q,S as U}from"./blocks-tab-states-CuLvvePK.js";import{a as G}from"./use-panel-navigate-BYtmBtcy.js";function H(C){const e=I.c(7),{icon:l,title:i,description:t,action:n}=C;let a;e[0]!==n?(a=n?{children:n.label,onClick:n.onClick,disabled:n.disabled}:void 0,e[0]=n,e[1]=a):a=e[1];let o;return e[2]!==t||e[3]!==l||e[4]!==a||e[5]!==i?(o=r.jsx(v,{children:r.jsx(v.Content,{children:r.jsx(v.Container,{children:r.jsx(T,{icon:l,title:i,description:t,buttonProps:a})})})}),e[2]=t,e[3]=l,e[4]=a,e[5]=i,e[6]=o):o=e[6],o}function Y(C){const e=I.c(33),{virtualMcpId:l,icon:i,copy:t,skeleton:n,children:a}=C,o=M(),{org:p}=P(),j=w(),u=j?.currentBranch??null,g=B(l,u);R(g.kind==="protocol"&&g.source==="github");const{openPanel:D}=G();if(!u){const s=t.noDraftTitle,F=t.noDraftDesc;let d;e[0]!==o?(d=o("sectionsEditor.namedRules.openEditor"),e[0]=o,e[1]=d):d=e[1];let f;e[2]!==D?(f=()=>D("content"),e[2]=D,e[3]=f):f=e[3];let m;e[4]!==d||e[5]!==f?(m={label:d,onClick:f},e[4]=d,e[5]=f,e[6]=m):m=e[6];let x;return e[7]!==t.noDraftDesc||e[8]!==t.noDraftTitle||e[9]!==i||e[10]!==m?(x=r.jsx(H,{icon:i,title:s,description:F,action:m}),e[7]=t.noDraftDesc,e[8]=t.noDraftTitle,e[9]=i,e[10]=m,e[11]=x):x=e[11],x}if($(g)){let s;return e[12]===Symbol.for("react.memo_cache_sentinel")?(s=r.jsx(U,{}),e[12]=s):s=e[12],s}if(g.kind==="pending"){let s;return e[13]!==n?(s=r.jsx(r.Fragment,{children:n}),e[13]=n,e[14]=s):s=e[14],s}if(g.kind!=="protocol"){let s;return e[15]!==t.loadFailed||e[16]!==t.loadFailedHint||e[17]!==i?(s=r.jsx(H,{icon:i,title:t.loadFailed,description:t.loadFailedHint}),e[15]=t.loadFailed,e[16]=t.loadFailedHint,e[17]=i,e[18]=s):s=e[18],s}let c;e[19]!==u||e[20]!==p.slug||e[21]!==l?(c=JSON.stringify([p.slug,l,u]),e[19]=u,e[20]=p.slug,e[21]=l,e[22]=c):c=e[22];const h=j?.taskId??null;let k;return e[23]!==u||e[24]!==a||e[25]!==t||e[26]!==i||e[27]!==p.slug||e[28]!==n||e[29]!==c||e[30]!==h||e[31]!==l?(k=r.jsx(J,{orgSlug:p.slug,virtualMcpId:l,branch:u,threadId:h,icon:i,copy:t,skeleton:n,children:a},c),e[23]=u,e[24]=a,e[25]=t,e[26]=i,e[27]=p.slug,e[28]=n,e[29]=c,e[30]=h,e[31]=l,e[32]=k):k=e[32],k}function J(C){const e=I.c(35),{orgSlug:l,virtualMcpId:i,branch:t,threadId:n,icon:a,copy:o,skeleton:p,children:j}=C,u=M();let g;e[0]!==t||e[1]!==l||e[2]!==n||e[3]!==i?(g={orgSlug:l,virtualMcpId:i,branch:t,threadId:n,previewUrl:null},e[0]=t,e[1]=l,e[2]=n,e[3]=i,e[4]=g):g=e[4];const D=g,c=L(D),h=A(D),k=c.data,s=h.data;let F;e[5]!==t||e[6]!==l||e[7]!==i?(F={orgSlug:l,virtualMcpId:i,branch:t},e[5]=t,e[6]=l,e[7]=i,e[8]=F):F=e[8];const d=_(F,Q);if(!k||!s||!d.ready){if(c.isError||h.isError||d.failed){const N=o.loadFailed,O=o.loadFailedHint;let b;e[9]!==u?(b=u("sectionsEditor.namedRules.tryAgain"),e[9]=u,e[10]=b):b=e[10];let E;e[11]!==c||e[12]!==d||e[13]!==h?(E=()=>{c.isError&&c.refetch(),h.isError&&h.refetch(),d.failed&&d.retry()},e[11]=c,e[12]=d,e[13]=h,e[14]=E):E=e[14];let S;e[15]!==b||e[16]!==E?(S={label:b,onClick:E},e[15]=b,e[16]=E,e[17]=S):S=e[17];let y;return e[18]!==o.loadFailed||e[19]!==o.loadFailedHint||e[20]!==a||e[21]!==S?(y=r.jsx(H,{icon:a,title:N,description:O,action:S}),e[18]=o.loadFailed,e[19]=o.loadFailedHint,e[20]=a,e[21]=S,e[22]=y):y=e[22],y}let x;return e[23]!==p?(x=r.jsx(r.Fragment,{children:p}),e[23]=p,e[24]=x):x=e[24],x}let f;e[25]!==t||e[26]!==j||e[27]!==k||e[28]!==s||e[29]!==l||e[30]!==n||e[31]!==i?(f=j({orgSlug:l,virtualMcpId:i,branch:t,threadId:n,decofile:k,meta:s}),e[25]=t,e[26]=j,e[27]=k,e[28]=s,e[29]=l,e[30]=n,e[31]=i,e[32]=f):f=e[32];let m;return e[33]!==f?(m=r.jsx(r.Fragment,{children:f}),e[33]=f,e[34]=m):m=e[34],m}export{H as S,Y as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as u,r as g,j as n,J as G,a0 as F,a as E,l as O,b as P,n as y,L as H}from"./index-CMOYwhXD.js";import{C as M}from"./chat-context-DheRYNZa.js";import{ChatLayout as x}from"./index-DQWDDBEh.js";import{L}from"./index-CVJXgdNU.js";import{B as J}from"./blocks-preview-workspace-context-PyxPfBnd.js";import{e as T,p as K,s as V,a as W,r as U,T as $,u as R,b as z}from"./site-editor-toast-CP-wSW1F.js";import{u as q,L as B,P as Q,S as X}from"./preview-tab-6sB-rRtC.js";import{C as Y}from"./content-tab-pPR3n-pk.js";import{T as Z}from"./tab-icon-glyph-Bhavy4w9.js";import{r as tt}from"./resolve-tab-icon-DXA13f0E.js";import ot from"./agent-site-editor-pauq_N3M.js";import"./use-panel-navigate-BYtmBtcy.js";import"./thread-route-URWAxCjm.js";import"./use-project-scope-D8JxWW5D.js";import"./repository-binding-BiNVfbBv.js";import"./use-mcp-client-C2KQU7c3.js";import"./auth-VFTZl0UB.js";import"./use-view-draft-kind-CJTuI6yS.js";import"./use-blog-view-BnDurHBG.js";import"./use-organization-settings-uZzqpAbZ.js";import"./schema-BGVGnZwu.js";import"./task-board-8fcnKTrC.js";import"./thread-intent-DzUkMPY5.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-CuFl2xd0.js";import"./session-runtime-S41xxwFW.js";import"./use-entitlements-BF3joBL4.js";import"./use-ai-providers-BS3OOjFt.js";import"./use-current-view-BBuaPVrA.js";import"./use-in-settings-BofilH1v.js";import"./use-decopilot-events-BPn3pCjJ.js";import"./use-org-fs-DTKINC-x.js";import"./useInfiniteQuery-CnX3zUSi.js";import"./infiniteQueryObserver-CWkvrMky.js";import"./use-mobile-nGgejGlo.js";import"./tooltip-BPmKwLsN.js";import"./index-FlVkgqB3.js";import"./MessageCircle01-B4UE40aX.js";import"./XClose-CcCbyQh_.js";import"./thread-button-CkhkITiW.js";import"./use-sidebar-collapsed-VC4tdttc.js";import"./sheet-DCIpFtpL.js";import"./use-chat-layout-state-DDFKjNIl.js";import"./toolbar-icon-button-BnrqNtsd.js";import"./resizable-BjhtG9yT.js";import"./route-page-header-BXGE6enK.js";import"./LayoutLeft-BxDKRvBF.js";import"./task-key-VQg9Ju40.js";import"./sortable.esm-hazIEYqc.js";import"./Tool01-BA13F6bw.js";import"./agent-icon-BG1i7gmz.js";import"./AlertCircle-BodtFcwa.js";import"./UserCheck01-DywBSoK3.js";import"./ArrowUp-BYGtX-_f.js";import"./ArrowLeft-DgzOetZ9.js";import"./ArrowRight-aDVZWC-C.js";import"./BookOpen01-HlvgQjwt.js";import"./Globe04-DVM4g6bL.js";import"./CheckCircle-Dah9jeY2.js";import"./ChevronDown-CXawdj31.js";import"./ChevronSelectorVertical-Ch5nmynK.js";import"./ChevronUp-x4csN1P_.js";import"./UserSquare-BzfdCQlh.js";import"./LinkBroken01-DXtz62mO.js";import"./CreditCard01-DNyFsaCV.js";import"./File02-CC-U2Arr.js";import"./SwitchHorizontal01-CNZW6LKe.js";import"./Eye-DteZLUM4.js";import"./Fingerprint04-BvJCAFqB.js";import"./Image01-BhokHisl.js";import"./Key01-uSPI1gT_.js";import"./Minus-BzXBzVF-.js";import"./Monitor01-C5ZEAMCm.js";import"./Sun-BMzx7_fZ.js";import"./Play-BjXL9p8F.js";import"./Plus-D3LlERXJ.js";import"./SearchMd-DnS7d9Ee.js";import"./ShoppingBag01-D-D7_e-d.js";import"./Trash01-C1JB_HDr.js";import"./Upload01-CwC3e55G.js";import"./Users01-DndLVpMW.js";import"./Zap-Btccd9_S.js";import"./context-menu-D_0JWbxu.js";import"./use-org-notice-COy-LgRB.js";import"./create-organization-dialog-Bnctzg-m.js";import"./form-CzPbiwCk.js";import"./label-Bww6rH3P.js";import"./project-apps-ClncucSz.js";import"./use-recent-apps-DoFE2306.js";import"./use-navigate-to-agent-PmeOctb2.js";import"./command-D5KKg7Po.js";import"./index-BFDOeyWj.js";import"./use-debounced-value-C26MvSJn.js";import"./feedback-BqoIMOg7.js";import"./textarea-hqqjHxii.js";import"./content-changes-Dilm5O36.js";import"./sandbox-url-D3mC8qhT.js";import"./use-sandbox-events-BjMmIgSO.js";import"./use-blocks-v8-project-DvTBxIPw.js";import"./use-voice-input-R6pqWjLx.js";import"./popover-3vnisGas.js";import"./drawer--kiS5dBn.js";import"./index-BMZ0iqFK.js";import"./checkbox-I411NqYX.js";import"./select-D37YvXxG.js";import"./index-BdQq_4o_.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./utils-BWLamjlv.js";import"./sandbox-git-api-ErB8jUx9.js";import"./save-status-DTq1bu6x.js";import"./use-never-published-jINFwhsG.js";import"./hosted-reconcile-C-7rKCsW.js";import"./blocks-tab-states-CuLvvePK.js";import"./empty-state-CKNJFM0g.js";import"./search-input-Bo0uqwe-.js";import"./tabs-kd1a9On_.js";import"./active-indicator-CCMhAsc_.js";import"./use-file-configs-ChPJPjIZ.js";import"./asset-utils-CQQKj4KP.js";import"./usage-stats-CCyrHbOC.js";import"./utils-CVEq3hMx.js";import"./markdown-Bi25DZW_.js";import"./use-copy-D5LfgK5z.js";import"./gateway-client-BVjB9G0S.js";import"./switch-DcLJMUn8.js";import"./toggle-group-BdbLr32c.js";import"./match-site-slug-config-B47_xZCi.js";import"./sandbox-lifecycle-context-Ct_XfgIm.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./frame-navigation-D3BFl5rC.js";import"./variant-matcher-override-D2LCPF3g.js";import"./section-array-field-Dpm3s7El.js";import"./use-fast-preview-draft-url-CjZjepWx.js";import"./parse-sections-2nDwNbo9.js";import"./held-block-view-Y8q8NQwP.js";import"./calendar-kDAoF41r.js";import"./editor-classes-DpiMJloW.js";import"./category-tree-D2tyKDuY.js";import"./pair-Cemt435C.js";import"./collapsible-DwaxmoW1.js";import"./use-task-board-items-DNNdhRtP.js";import"./config-P-h3mlnU.js";import"./task-route-L7m6ODZa.js";import"./project-index-YBf8huk1.js";import"./shell-layout-BhLm3ode.js";import"./use-deployment-admin-ermoXf--.js";import"./admin-fetch-BhTJlAsX.js";import"./integration-icon-C2Up_E6S.js";import"./project-icon-BOqN9iGS.js";import"./new-project-dialog-e39xBQJC.js";import"./repository-picker-Cd-PmC2o.js";import"./github-icon-Dum7qGK9.js";import"./collection-search-CGbA6B6M.js";import"./new-project-store-CsdnPKbV.js";import"./legacy-admin-welcome-dialog-B8zKoY6V.js";import"./required-auth-layout-BmmWSkIy.js";import"./use-org-sso-B3VN_T5G.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-_y7Sc4cz.js";import"./types-BWwlrwgL.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./use-connection-lIDtpp77.js";import"./use-mcp-prompts-BOa13e9x.js";import"./use-thread-outputs-CqJLmjLP.js";import"./file-type-icon-CNhs2rM5.js";import"./named-rule-step-K3CcxhyF.js";import"./slider-DwNcNhts.js";import"./index-CLY9DSuT.js";import"./tooltipContext-2YdcjubR.js";import"./CategoricalChart-sHldvFcC.js";import"./index-DygnKuGF.js";import"./combobox-CYpYC39f.js";import"./scroll-area-ClzBCgdN.js";import"./monaco-editor-BM7hKlAv.js";import"./editor-C1KY7pbs.js";import"./useQueries-Cv4H9o8h.js";import"./blog-preview-url-0gexiswS.js";import"./device-hint-DEag8WwZ.js";import"./alert-Cu41JnRH.js";import"./virtual-mcp-BOM6yP8Q.js";import"./url-slug-BlC0E0S4.js";import"./app-preview-url-9Od4s8Sz.js";import"./agent-capabilities-BcU9kHgo.js";import"./preview-source-BsRLGWUP.js";import"./use-task-metadata-BnrMMEXM.js";import"./delete-copy-Duz9BHwC.js";import"./index-sKHGQ8bA.js";import"./view-header-BxUAMOxx.js";import"./use-cms-publish-actions-drU_bgxQ.js";import"./use-content-sync-BYPhpgAW.js";import"./use-delete-block-CiafX579.js";import"./item-actions-DqwEF8yZ.js";import"./date-utils-CrvIKg-s.js";import"./badge-CE7YbwTl.js";import"./empty-state-C2fGsW3_.js";import"./primitives-0TaeqUnu.js";import"./use-move-blocks-BNfPEh8Z.js";import"./mustache-DUlmsVay.js";import"./collection-table-wrapper-3it25vl7.js";import"./table-BJ-6z4Ka.js";import"./site-draft-actions-Caiw1yL8.js";import"./separator-W1Ytw6Rk.js";import"./cms-store-drafts-92haPQGD.js";import"./serial-task-queue-CGOeQgpr.js";import"./index-DWyOfEFs.js";import"./input-4eZkb8k7.js";import"./icon-button-DHp8_9LF.js";import"./chat-draft-DKmtgP4M.js";import"./use-deco-credits-DeC-swUL.js";import"./input-Dywy3XfP.js";import"./suggestion-B07rb2U_.js";import"./question-004-sINsf4GQ.js";import"./feature-paywall-NMojxqZr.js";import"./plan-ladder-9FSbsZ90.js";import"./add-connection-dialog-Bnb6aupI.js";import"./extract-connection-data-Bbqi9tlA.js";import"./metadata-D72DunRR.js";import"./connection-Dc06pK8f.js";import"./connection-card-Bp8kpfAc.js";import"./connection-slug-BfMtrnxd.js";import"./schema-CkSRwqRJ.js";import"./connection-form-helpers-9IiTX-RV.js";import"./authenticate-and-persist-oauth-CkNJzR5A.js";import"./mcp-oauth-BtlUP1pO.js";import"./mcp-oauth-DTqz3wMv.js";import"./collection-tabs-DltCAINe.js";import"./use-infinite-scroll-C5BHcO3d.js";import"./useSuspenseInfiniteQuery-CqJmXMzX.js";import"./save-changes-debug-nBi-n9eV.js";import"./site-draft-view-qY6zhziP.js";import"./blog-view-gate-D2LfYCHB.js";function I(o){return o.kind==="unavailable"&&o.source==="local"&&(o.problem?.reason??"not-answering")==="not-answering"}const it=o=>o;function et(o){const t=u.c(10),{candidates:i,invalidLink:c,shell:s,editor:e}=o,r=c===void 0?!1:c,m=s===void 0?it:s,[p,a]=g.useState(null);if(p){let f;t[0]===Symbol.for("react.memo_cache_sentinel")?(f=()=>a(null),t[0]=f):f=t[0];let h;return t[1]!==p||t[2]!==e?(h=e(p,f),t[1]=p,t[2]=e,t[3]=h):h=t[3],h}let l;t[4]!==i||t[5]!==r?(l=n.jsx(rt,{candidates:i,invalidLink:r,onConnect:a}),t[4]=i,t[5]=r,t[6]=l):l=t[6];let d;return t[7]!==m||t[8]!==l?(d=m(l),t[7]=m,t[8]=l,t[9]=d):d=t[9],d}function rt(o){const t=u.c(17),{candidates:i,invalidLink:c,onConnect:s}=o,e=c===void 0?!1:c,[r]=G(),{language:m}=r;let p;t[0]!==s?(p=N=>s({endpoint:N}),t[0]=s,t[1]=p):p=t[1];let a;t[2]!==i||t[3]!==p?(a={candidates:i,onFound:p},t[2]=i,t[3]=p,t[4]=a):a=t[4];const l=q(a),{state:d,access:f,needsGesture:h}=l;let k;t[5]!==i||t[6]!==m?(k=new Intl.ListFormat(m,{style:"long",type:"conjunction"}).format(i.map(T)),t[5]=i,t[6]=m,t[7]=k):k=t[7];const C=k;let S;t[8]!==f||t[9]!==l.start||t[10]!==h||t[11]!==d?(S=f==="denied"?{kind:"denied"}:h?{kind:"needs-gesture",onStart:l.start}:d.problem?{kind:"problem",problem:d.problem,host:T(d.problem.endpoint)}:{kind:"looking",paused:d.status==="paused"},t[8]=f,t[9]=l.start,t[10]=h,t[11]=d,t[12]=S):S=t[12];const _=S;let j;return t[13]!==C||t[14]!==e||t[15]!==_?(j=n.jsx(B,{wait:_,hosts:C,invalidLink:e}),t[13]=C,t[14]=e,t[15]=_,t[16]=j):j=t[16],j}const v="deco-serve",w="working-tree",nt={id:"",slug:"",name:"",logo:null},st={id:v,slug:v},mt={virtualMcpId:v,taskId:null,openTask:()=>{},createTask:()=>"",createTaskWithMessage:()=>{},activeTask:null,isThreadLocked:!1,lockedHarness:null,lockedBranch:null,currentBranch:w,setCurrentTaskBranch:()=>{}};function pt(){const o=window.location.hash,t=new URLSearchParams(o.replace(/^#/,"")).has("endpoint"),i=t?K(o):null;return t&&window.history.replaceState(null,"",window.location.pathname+window.location.search),i&&V(i),{candidates:W(i,U()),invalidLink:t&&!i}}const at=[{id:"site-editor",to:"/site-editor",label:"preview"},{id:"content",to:"/site-editor/content",label:"content"}];function lt(){const o=u.c(6),t=P();let i;o[0]===Symbol.for("react.memo_cache_sentinel")?(i={select:ct},o[0]=i):i=o[0];const c=O(i);let s;o[1]!==t||o[2]!==c?(s=at.map(r=>n.jsx(y.Tab,{asChild:!0,active:c==="content"==(r.id==="content"),children:n.jsxs(H,{to:r.to,activeOptions:{exact:!0},children:[n.jsx("span",{"aria-hidden":"true",className:"flex size-4 shrink-0 items-center justify-center",children:n.jsx(Z,{icon:tt({tabId:r.id,kind:"system",connections:[]})})}),t(`common.mainPanelTabs.${r.label}`)]})},r.id)),o[1]=t,o[2]=c,o[3]=s):s=o[3];let e;return o[4]!==s?(e=n.jsx(y.Tabs,{children:s}),o[4]=s,o[5]=e):e=o[5],e}function ct(o){return o.matches.at(-1)?.staticData.siteEditorView}function A(o){const t=u.c(14),{children:i}=o,c=P(),{connection:s}=z(v),e=R(v,w);let r,m;if(t[0]!==e||t[1]!==i||t[2]!==s||t[3]!==c){m=Symbol.for("react.early_return_sentinel");t:{if(r=s?T(s.endpoint):"",e.kind==="protocol"){m=i;break t}if(e.kind!=="unavailable"||I(e)){m=n.jsx(X,{headingLevel:2,waiting:!0,title:c("decoServe.connect.reaching",{host:r})});break t}}t[0]=e,t[1]=i,t[2]=s,t[3]=c,t[4]=r,t[5]=m}else r=t[4],m=t[5];if(m!==Symbol.for("react.early_return_sentinel"))return m;let p;t[6]!==e.problem?(p=e.problem??{reason:"not-answering"},t[6]=e.problem,t[7]=p):p=t[7];let a;t[8]!==r||t[9]!==p?(a={kind:"problem",problem:p,host:r},t[8]=r,t[9]=p,t[10]=a):a=t[10];let l;return t[11]!==r||t[12]!==a?(l=n.jsx(B,{wait:a,hosts:r}),t[11]=r,t[12]=a,t[13]=l):l=t[13],l}function dt(o){const t=u.c(6),{onLost:i}=o,c=R(v,w);let s;t[0]!==c?(s=I(c),t[0]=c,t[1]=s):s=t[1];const e=s;let r,m;return t[2]!==e||t[3]!==i?(r=()=>{e&&i()},m=[e,i],t[2]=e,t[3]=i,t[4]=r,t[5]=m):(r=t[4],m=t[5]),g.useEffect(r,m),null}const D={threadOpen:!1,contentOpen:!0,toggleFullscreen:()=>{},toggleContent:()=>{}};function ut(){const o=u.c(11),{data:t}=E.useSession();let i;o[0]===Symbol.for("react.memo_cache_sentinel")?(i={select:ft},o[0]=i):i=o[0];const c=O(i),s=!!t?.user;let e;o[1]!==s?(e={rail:s},o[1]=s,o[2]=e):e=o[2];const r=c??"preview";let m,p,a;o[3]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(lt,{}),p=n.jsx(ot,{}),a=n.jsx(x.Thread,{children:null}),o[3]=m,o[4]=p,o[5]=a):(m=o[3],p=o[4],a=o[5]);let l;o[6]!==r?(l=n.jsx(L.Content,{children:n.jsxs(x,{...D,threadless:!0,contentKey:r,contentNavigation:m,children:[p,a]})}),o[6]=r,o[7]=l):l=o[7];let d;return o[8]!==e||o[9]!==l?(d=n.jsx(L,{outsideOrg:e,children:l}),o[8]=e,o[9]=l,o[10]=d):d=o[10],d}function ft(o){return o.matches.at(-1)?.staticData.siteEditorView}function ht(o){const t=u.c(10),{children:i}=o,{data:c}=E.useSession(),s=!!c?.user;let e;t[0]!==s?(e={rail:s},t[0]=s,t[1]=e):e=t[1];let r;t[2]!==i?(r=n.jsx(x.Content,{children:i}),t[2]=i,t[3]=r):r=t[3];let m;t[4]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(x.Thread,{children:null}),t[4]=m):m=t[4];let p;t[5]!==r?(p=n.jsx(L.Content,{children:n.jsxs(x,{...D,threadless:!0,contentKey:"guide",children:[r,m]})}),t[5]=r,t[6]=p):p=t[6];let a;return t[7]!==e||t[8]!==p?(a=n.jsx(L,{outsideOrg:e,children:p}),t[7]=e,t[8]=p,t[9]=a):a=t[9],a}const b=()=>{},vt={connection:null,set:b,clear:b};function Dr(){const o=u.c(3),[t]=g.useState(pt);let i;return o[0]!==t.candidates||o[1]!==t.invalidLink?(i=n.jsx(F,{org:nt,project:st,children:n.jsx(et,{candidates:t.candidates,invalidLink:t.invalidLink,shell:kt,editor:xt})}),o[0]=t.candidates,o[1]=t.invalidLink,o[2]=i):i=o[2],i}function xt(o,t){return n.jsxs($.Provider,{value:{connection:o,set:b,clear:b},children:[n.jsx(dt,{onLost:t}),n.jsx(M,{value:mt,children:n.jsx(J,{children:n.jsx(ut,{})})})]})}function kt(o){return n.jsx($.Provider,{value:vt,children:n.jsx(ht,{children:o})})}function Nr(){const o=u.c(1);let t;return o[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(A,{children:n.jsx(Q,{virtualMcpId:v})}),o[0]=t):t=o[0],t}function Gr(){const o=u.c(1);let t;return o[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(A,{children:n.jsx(Y,{virtualMcpId:v})}),o[0]=t):t=o[0],t}export{Gr as SiteEditorContent,Nr as SiteEditorPreview,Dr as default};
|