decocms 4.584.15 → 4.584.16
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-xcW2fRsN.js → AlertCircle-ee1sjQGr.js} +1 -1
- package/dist/client/assets/{AreaChart-B2pMCC5D.js → AreaChart-CNSKfZ8O.js} +1 -1
- package/dist/client/assets/{ArrowLeft-BCdlXJnc.js → ArrowLeft-BhV4BHrM.js} +1 -1
- package/dist/client/assets/{ArrowRight-CNfAAPFn.js → ArrowRight-3kziivNC.js} +1 -1
- package/dist/client/assets/{ArrowUp-NxqJFghp.js → ArrowUp-DgFMMMBQ.js} +1 -1
- package/dist/client/assets/{BookOpen01-ByHdrfXb.js → BookOpen01-C9X5S-cQ.js} +1 -1
- package/dist/client/assets/{CartesianChart-Bandx1cs.js → CartesianChart-DuA35Ksh.js} +1 -1
- package/dist/client/assets/{CategoricalChart-W2F9o7wJ.js → CategoricalChart-cy5wvzih.js} +1 -1
- package/dist/client/assets/{CheckCircle-CGiVBHq1.js → CheckCircle-CGqAjggj.js} +1 -1
- package/dist/client/assets/{ChevronDown-L1RduSWg.js → ChevronDown-CGJhfuSb.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-R-v88Ujt.js → ChevronSelectorVertical-5-TBPpUz.js} +1 -1
- package/dist/client/assets/{ChevronUp-hn_BcMX-.js → ChevronUp-BO9DemUb.js} +1 -1
- package/dist/client/assets/{CreditCard01-I11lzZp8.js → CreditCard01-BLkqiDJW.js} +1 -1
- package/dist/client/assets/{Eye-BgZwKqY2.js → Eye-CO_nPZKQ.js} +1 -1
- package/dist/client/assets/{File02-Cq4haxMC.js → File02-DclovfNb.js} +1 -1
- package/dist/client/assets/{Globe04-Gqo8FWLb.js → Globe04-Cx-w92u5.js} +1 -1
- package/dist/client/assets/{Image01-B1gTxSfc.js → Image01-CeQMNu9o.js} +1 -1
- package/dist/client/assets/{Key01-V-plVH8s.js → Key01-DMjKHzPy.js} +1 -1
- package/dist/client/assets/{LayoutLeft-Dh-xvGQJ.js → LayoutLeft-BPF5UUkD.js} +1 -1
- package/dist/client/assets/{LinkBroken01-C4BH9PJk.js → LinkBroken01-BN3icH6a.js} +1 -1
- package/dist/client/assets/{MessageCircle01-BXDua8oN.js → MessageCircle01-jm5EAYEs.js} +1 -1
- package/dist/client/assets/{Minus-CPSsigVU.js → Minus-DoUm1n95.js} +1 -1
- package/dist/client/assets/{Monitor01-FVdupyIO.js → Monitor01-CM0DIJ9E.js} +1 -1
- package/dist/client/assets/{Play-B48hJa64.js → Play-I05hjYId.js} +1 -1
- package/dist/client/assets/{Plus-Bvk6TEoj.js → Plus-B_KK3A4P.js} +1 -1
- package/dist/client/assets/{ReferenceLine-Dlp-ZxjE.js → ReferenceLine-DxKvZdt8.js} +1 -1
- package/dist/client/assets/{SearchMd-lJZx4ys3.js → SearchMd-BlPJmXQo.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-Ce-IsP1d.js → ShoppingBag01-XH61oInk.js} +1 -1
- package/dist/client/assets/{Sun-DDXuqLa1.js → Sun-CYr05wwt.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-BTEqc04d.js → SwitchHorizontal01-CGFn_psg.js} +1 -1
- package/dist/client/assets/{Tool01-CuK8_xpK.js → Tool01-Cnkd4pP7.js} +1 -1
- package/dist/client/assets/{Tooltip-CpE-GuZ-.js → Tooltip-CwwzGu8p.js} +1 -1
- package/dist/client/assets/{Trash01-C00iOBQB.js → Trash01-CnPGIwZe.js} +1 -1
- package/dist/client/assets/{TrendUp01-D52fc-S-.js → TrendUp01-BlwMDcra.js} +1 -1
- package/dist/client/assets/{Upload01-CF0QTA2R.js → Upload01-Bfre-QV-.js} +1 -1
- package/dist/client/assets/{UserCheck01-Dnnv6qzl.js → UserCheck01-CcIH7s2N.js} +1 -1
- package/dist/client/assets/{UserSquare-Br0ylxlC.js → UserSquare-CUb4s2-c.js} +1 -1
- package/dist/client/assets/{Users01-WL4ZoQTM.js → Users01-BaPkNO1v.js} +1 -1
- package/dist/client/assets/{XClose-CE6c7i3i.js → XClose-CtxnajtG.js} +1 -1
- package/dist/client/assets/{Zap-CkG3OOIL.js → Zap-D4dSEKpa.js} +1 -1
- package/dist/client/assets/{access-gate-CJyV2IQK.js → access-gate-BcSivdgh.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-BZ9UFs6m.js → add-connection-dialog-BqEJyMSP.js} +1 -1
- package/dist/client/assets/agent-app--sGlyuqH.js +1 -0
- package/dist/client/assets/{agent-assets-Cl6G12zC.js → agent-assets-D9OfQf2S.js} +1 -1
- package/dist/client/assets/{agent-automation-EzohnRR8.js → agent-automation-CJwwEuNT.js} +1 -1
- package/dist/client/assets/{agent-automations-ClpjK4LJ.js → agent-automations-CQfQpku1.js} +1 -1
- package/dist/client/assets/{agent-blog-9KrbWIUt.js → agent-blog-BdGPQ8_2.js} +2 -2
- package/dist/client/assets/{agent-blog-post-BYOGSBaB.js → agent-blog-post-B9pgUtDH.js} +2 -2
- package/dist/client/assets/{agent-calendar-DqPeqbu1.js → agent-calendar-JLP2GBTa.js} +1 -1
- package/dist/client/assets/{agent-capabilities-CD1cAeZo.js → agent-capabilities-CYFGwKOQ.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-BQuw4St5.js → agent-connect-sources-DDUrjmJD.js} +1 -1
- package/dist/client/assets/agent-deck-BFHNNp62.js +1 -0
- package/dist/client/assets/{agent-e2e-Ch1bhbzr.js → agent-e2e-R2Brb1AY.js} +1 -1
- package/dist/client/assets/agent-experiments-Bv_v3TAO.js +1 -0
- package/dist/client/assets/agent-file-BXKcmB2N.js +1 -0
- package/dist/client/assets/{agent-hosting-CSEquLBT.js → agent-hosting-ZtddB8HN.js} +1 -1
- package/dist/client/assets/{agent-icon-CBIv-AL5.js → agent-icon-DFyNTmmD.js} +1 -1
- package/dist/client/assets/agent-library-Czsy6k8l.js +1 -0
- package/dist/client/assets/agent-library-file-BbS3HgpC.js +1 -0
- package/dist/client/assets/agent-overview-DM_uEEtA.js +1 -0
- package/dist/client/assets/{agent-releases-D4sRdBns.js → agent-releases-CSV4AdrC.js} +1 -1
- package/dist/client/assets/agent-settings-BnZZ1J30.js +1 -0
- package/dist/client/assets/{agent-site-editor-BUj6gcVv.js → agent-site-editor-Du4ljJT4.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-DalNbqMF.js +2 -0
- package/dist/client/assets/agent-site-editor-content-C86oatUw.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-CNy-hy9W.js +1 -0
- package/dist/client/assets/agent-view-BnzkhKY4.js +1 -0
- package/dist/client/assets/{agent-view-guard-gO2YEwTt.js → agent-view-guard-BkW43e8G.js} +1 -1
- package/dist/client/assets/{ai-providers-DZ-PP7L6.js → ai-providers-B2F4VTfq.js} +1 -1
- package/dist/client/assets/{alert-BmJHuGNf.js → alert-DaQbIayT.js} +1 -1
- package/dist/client/assets/{analytics-sections-Dd4lvqQU.js → analytics-sections-CDIiyHbJ.js} +1 -1
- package/dist/client/assets/api-keys-BWtdycqJ.js +1 -0
- package/dist/client/assets/{api-keys-vP92rWqP.js → api-keys-DV2qjs1c.js} +1 -1
- package/dist/client/assets/app-editor-CsjRVENv.js +1 -0
- package/dist/client/assets/{asset-utils-KljyOq-J.js → asset-utils-545UDhWA.js} +1 -1
- package/dist/client/assets/{auth-catchall-D78z1E8-.js → auth-catchall-C4NbHq82.js} +1 -1
- package/dist/client/assets/{auth-entry-Cc4-G00H.js → auth-entry-CeA6avaA.js} +1 -1
- package/dist/client/assets/{auth-CBSiR73H.js → auth-sBxX13D1.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DdhtzfQ9.js → auth-split-layout-DFVyplfm.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-Du2u48Vp.js → authenticate-and-persist-oauth-Cd-20mVj.js} +1 -1
- package/dist/client/assets/{automation-list-row-DzzmT3Oi.js → automation-list-row-DIz_7uV6.js} +1 -1
- package/dist/client/assets/{automation-runs-DZfSB9de.js → automation-runs-U9DXMN_I.js} +1 -1
- package/dist/client/assets/{automations-Crn6lgen.js → automations-DLrTFxh8.js} +1 -1
- package/dist/client/assets/{badge-CamJsKC8.js → badge-Ba_DCLD5.js} +1 -1
- package/dist/client/assets/{block-document-ChoiQUgI.js → block-document-Aq3OAP33.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-5BkSbFn-.js → blocks-preview-workspace-context-1Hmusp23.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-wy6ydHCy.js → blocks-tab-states-0NdQhV1f.js} +1 -1
- package/dist/client/assets/{blog-preview-url-CHbTdKzq.js → blog-preview-url-Dih-dMCw.js} +1 -1
- package/dist/client/assets/{blog-schema-CUiUhTk6.js → blog-schema-CYnX2CMq.js} +1 -1
- package/dist/client/assets/{blog-source-gate-0m13vigg.js → blog-source-gate-CWWyUoRi.js} +1 -1
- package/dist/client/assets/{blog-view-gate-N4SCXaqe.js → blog-view-gate-oE1gHZMz.js} +1 -1
- package/dist/client/assets/{buckets-BM_771lX.js → buckets-Bh4QpekX.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-CY7-PCrM.js → build-improve-prompt-doc-CPww4N3Z.js} +1 -1
- package/dist/client/assets/{calendar-HgHcy92P.js → calendar-i6vH9oRA.js} +1 -1
- package/dist/client/assets/{capability-load-error-B3ALNSsg.js → capability-load-error-LShIU80A.js} +1 -1
- package/dist/client/assets/category-editor-BLagxgQw.js +1 -0
- package/dist/client/assets/{category-tree-DCyh5lbD.js → category-tree-CO_9m-hw.js} +1 -1
- package/dist/client/assets/{chart-DXZAnmcF.js → chart-C99PxQ8i.js} +1 -1
- package/dist/client/assets/{chat-context-kuwat9Zp.js → chat-context-ZeSpVj2j.js} +1 -1
- package/dist/client/assets/{chat-draft-B1cM3_nz.js → chat-draft-DixXhuAl.js} +1 -1
- package/dist/client/assets/{checkbox-DfLNNBpA.js → checkbox-yHZpOTt9.js} +1 -1
- package/dist/client/assets/{choose-editor-CAA10rVn.js → choose-editor-Ow8vFSp1.js} +1 -1
- package/dist/client/assets/{cli-auth-success-CQWZ58qi.js → cli-auth-success-DRGrIbSu.js} +1 -1
- package/dist/client/assets/{cms-settings-editor-XDcwl9D1.js → cms-settings-editor-D6qGypvL.js} +1 -1
- package/dist/client/assets/{cms-store-drafts-xU8H47hr.js → cms-store-drafts-CLXsr0b9.js} +1 -1
- package/dist/client/assets/{collapsible-fh6xE0W6.js → collapsible-Dc4ca33I.js} +1 -1
- package/dist/client/assets/{collection-detail-Cp_igxDT.js → collection-detail-D2do5Te9.js} +1 -1
- package/dist/client/assets/{collection-display-button-DETjtRN2.js → collection-display-button-R9esRwsq.js} +1 -1
- package/dist/client/assets/{collection-search-CMQBkzx4.js → collection-search-CWJ6AHHK.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-BpB2_r7K.js → collection-table-wrapper-D1qYH_Vr.js} +1 -1
- package/dist/client/assets/{collection-tabs-Do3VaUL9.js → collection-tabs-CCJoVQ-t.js} +1 -1
- package/dist/client/assets/{combobox-DYbtPcjA.js → combobox-Cc5RijV8.js} +1 -1
- package/dist/client/assets/{command-C5c9xxo6.js → command-Dg1M4JCf.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-CJAT7S2N.js → companion-mcps-section-DWH_OPav.js} +1 -1
- package/dist/client/assets/{config-BdmxgNpF.js → config-CMcG5aXE.js} +1 -1
- package/dist/client/assets/{connect-CEjscMvd.js → connect-DTJ8Lb0Z.js} +1 -1
- package/dist/client/assets/{connect-key-Bwz15Ohl.js → connect-key-DwcLwXDe.js} +1 -1
- package/dist/client/assets/{connect-layout-CtpXfA3_.js → connect-layout-B9Ri51_N.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-DOKgnbNI.js → connect-source-dialog-DFoGY0c6.js} +1 -1
- package/dist/client/assets/{connection-DU27jsWQ.js → connection-D2P4B1Vm.js} +1 -1
- package/dist/client/assets/{connection-card-CRqpyo-Z.js → connection-card-CTimlD0g.js} +1 -1
- package/dist/client/assets/{connection-detail-D61-TPzv.js → connection-detail-CLq96SZi.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-C90068pd.js → connection-form-helpers-C0MTL33k.js} +1 -1
- package/dist/client/assets/{connection-slug-C6S0oQlj.js → connection-slug-CGQkx9BD.js} +1 -1
- package/dist/client/assets/{connections-BLeMCW0D.js → connections-Blix3sTM.js} +1 -1
- package/dist/client/assets/content-tab-DksWOtkz.js +19 -0
- package/dist/client/assets/{context-BHZhIUrX.js → context-UEmVvZBl.js} +1 -1
- package/dist/client/assets/{context-menu-DvQobFsl.js → context-menu-77Z4mScR.js} +1 -1
- package/dist/client/assets/{context-shell-DDVKJzlv.js → context-shell-n2LQX250.js} +3 -3
- package/dist/client/assets/{create-organization-dialog-BKb453UR.js → create-organization-dialog-5XUNCI8z.js} +1 -1
- package/dist/client/assets/{daily-pulse-Dm2jHqb7.js → daily-pulse-B11Ng0jZ.js} +1 -1
- package/dist/client/assets/{delete-copy-DOI5IATW.js → delete-copy-B5PbKStF.js} +1 -1
- package/dist/client/assets/{device-hint-B3K0oDUI.js → device-hint-BlkEtJOD.js} +1 -1
- package/dist/client/assets/{discover-uKP20dNQ.js → discover-76bH9Npb.js} +1 -1
- package/dist/client/assets/{domain-settings-BHlcjWV3.js → domain-settings-DMjKDVZw.js} +1 -1
- package/dist/client/assets/{drawer-DmBGYsSI.js → drawer-DVCuatiz.js} +1 -1
- package/dist/client/assets/{editor-cG8bavVY.js → editor-DKlObXWN.js} +1 -1
- package/dist/client/assets/{editor-classes-CoJAO_Ub.js → editor-classes-DlTZqfff.js} +1 -1
- package/dist/client/assets/{empty-message-BdIshsTe.js → empty-message-BydjGtkz.js} +1 -1
- package/dist/client/assets/{empty-state-i0RgGtWw.js → empty-state-B87jIRUF.js} +1 -1
- package/dist/client/assets/{empty-state-BQ3leEYD.js → empty-state-DrDY2Uvy.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-BmcEGamZ.js → experiments-tab-choice-B92_kGiq.js} +1 -1
- package/dist/client/assets/{extract-connection-data-_3AypHFf.js → extract-connection-data-BBZ3NAYt.js} +1 -1
- package/dist/client/assets/{feature-gate-CUzBYSVg.js → feature-gate-BldXfjSV.js} +1 -1
- package/dist/client/assets/{feature-paywall-Da0veXE_.js → feature-paywall-CYTrb2Hp.js} +1 -1
- package/dist/client/assets/{file-explorer-96x1wzeg.js → file-explorer-BMmUp2yA.js} +1 -1
- package/dist/client/assets/{file-preview-C5chvmXN.js → file-preview-DGOqiP3N.js} +1 -1
- package/dist/client/assets/{file-share-button-CwDU4cYY.js → file-share-button-BAKT8NFv.js} +1 -1
- package/dist/client/assets/{file-type-icon-6cUnbJSX.js → file-type-icon-sj_ejObJ.js} +1 -1
- package/dist/client/assets/{folder-icon-BcfGWwUV.js → folder-icon-B9awY_eB.js} +1 -1
- package/dist/client/assets/{form-CWHbQDen.js → form-FAPXIq7O.js} +1 -1
- package/dist/client/assets/{frame-navigation-CUIfPm6x.js → frame-navigation-CoYMhBUE.js} +1 -1
- package/dist/client/assets/{gateway-client-DGLOUuHv.js → gateway-client-BVWghiMF.js} +1 -1
- package/dist/client/assets/{general-DkMSa9su.js → general-DMcbEh6R.js} +1 -1
- package/dist/client/assets/{github-icon-tttsztW4.js → github-icon-KEAtk4MX.js} +1 -1
- package/dist/client/assets/{held-block-view-Dl38oGTS.js → held-block-view-DDQtd2bN.js} +3 -3
- package/dist/client/assets/{home-DsMWZSyz.js → home-BemwUTPY.js} +1 -1
- package/dist/client/assets/{home-overview-B4l35Rx7.js → home-overview-DJ3gY2Dz.js} +1 -1
- package/dist/client/assets/{hosted-reconcile-C9sT156Y.js → hosted-reconcile-DVbA9MCD.js} +1 -1
- package/dist/client/assets/{icon-button-C2DemlVA.js → icon-button-DmJB3HO5.js} +1 -1
- package/dist/client/assets/{index-BI2o-nvw.js → index-0S6WDYoC.js} +1 -1
- package/dist/client/assets/{index-D07va7UH.js → index-3k_nlNc7.js} +1 -1
- package/dist/client/assets/{index-Dgf1S0ZI.js → index-779PVYGV.js} +1 -1
- package/dist/client/assets/{index-D4zAZEeh.js → index-BRgWMc-5.js} +4 -4
- package/dist/client/assets/{index-CO_aaGMC.js → index-BiVCuU3V.js} +1 -1
- package/dist/client/assets/{index-DuBBqs4L.js → index-Bjhw4G6x.js} +1 -1
- package/dist/client/assets/{index-L2OEH3-g.js → index-CEBVkeBV.js} +1 -1
- package/dist/client/assets/{index-DsnO5Dzk.js → index-CER3O-Er.js} +1 -1
- package/dist/client/assets/{index-jrf1krh5.js → index-CH8HRuHa.js} +1 -1
- package/dist/client/assets/{index-CQzwsfZW.js → index-CSZLbM2Z.js} +1 -1
- package/dist/client/assets/{index-KtshGmmg.js → index-CV9lAciS.js} +1 -1
- package/dist/client/assets/{index-MyJJE1Ld.js → index-CsHIpbTc.js} +1 -1
- package/dist/client/assets/{index-CAbU9kcc.js → index-DAQFQP6X.js} +1 -1
- package/dist/client/assets/{index-CagbqgF3.js → index-DBsxQlkE.js} +1 -1
- package/dist/client/assets/{index-BC7uKBKA.js → index-EBRxzWbP.js} +1 -1
- package/dist/client/assets/{index-C07Jp7YW.js → index-YHYnj2N1.js} +1 -1
- package/dist/client/assets/{index-DyGSejEm.js → index-g6kNIQoA.js} +1 -1
- package/dist/client/assets/{index-redirect-BXbxct_U.js → index-redirect-DLAKhZQB.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-CNIZET2k.js → infiniteQueryObserver-DXDiLGwX.js} +1 -1
- package/dist/client/assets/{infra-billing-FOqOn27t.js → infra-billing-Ch38HLtg.js} +1 -1
- package/dist/client/assets/{input-Gi15aI0l.js → input-CCPCHy_J.js} +1 -1
- package/dist/client/assets/{input-C0dfZdZM.js → input-Do8NvE59.js} +3 -3
- package/dist/client/assets/{integration-icon-BIDY0_8Y.js → integration-icon-Cu3N1muw.js} +1 -1
- package/dist/client/assets/{item-actions-BP-bCtQy.js → item-actions-C0r-FbzQ.js} +1 -1
- package/dist/client/assets/{jira-icon-BCYN6YMQ.js → jira-icon-D0RV1z5x.js} +1 -1
- package/dist/client/assets/{label-BpM98tac.js → label-DJG2lJG2.js} +1 -1
- package/dist/client/assets/{layout-DCvRYnRd.js → layout-ChdcSvGo.js} +1 -1
- package/dist/client/assets/{legacy-admin-welcome-dialog-B20HwZP4.js → legacy-admin-welcome-dialog-BY_2I8tZ.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-BmvQrVmH.js → legacy-agents-deep-DDm5GBaQ.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-Djk4-r9-.js → legacy-main-redirect-D850qNA8.js} +1 -1
- package/dist/client/assets/library-UhxMQ0oL.js +1 -0
- package/dist/client/assets/{library-tab-Cn42i7-6.js → library-tab-D8k_wDzC.js} +1 -1
- package/dist/client/assets/{login-DitP5zKx.js → login-C5GNgjpJ.js} +1 -1
- package/dist/client/assets/{markdown-DWN586Xq.js → markdown-DPpPArEp.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-C48AtEQ1.js → mcp-app-renderer-D-1Hpjx-.js} +1 -1
- package/dist/client/assets/{mcp-oauth-4c-GNDKK.js → mcp-oauth-DAw9xmxO.js} +1 -1
- package/dist/client/assets/{mcp-oauth-wEukEOTE.js → mcp-oauth-DMi3oCsH.js} +1 -1
- package/dist/client/assets/{members-BlNBiH3z.js → members-laM8OLrZ.js} +1 -1
- package/dist/client/assets/{memory-C9em5dKf.js → memory-DAAWauU_.js} +1 -1
- package/dist/client/assets/{mock-board-BUSCP4L7.js → mock-board-DVLeWzDj.js} +3 -3
- package/dist/client/assets/{monaco-editor-DFVcXi2W.js → monaco-editor-BHpOPihN.js} +1 -1
- package/dist/client/assets/{monitoring-B_UThcMp.js → monitoring-D3l_Jm2m.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-oEVqK40A.js → monitoring-stats-row-Ri6ispwa.js} +1 -1
- package/dist/client/assets/{multi-select-v2MphKjq.js → multi-select-8e4MeokI.js} +1 -1
- package/dist/client/assets/{mustache-vrrp1dXV.js → mustache-DnvmVEAI.js} +1 -1
- package/dist/client/assets/{named-rule-step-Z9Y46qyC.js → named-rule-step-WtjJX5Mv.js} +1 -1
- package/dist/client/assets/{named-rule-view-Cz1WvHGI.js → named-rule-view-DZ8Gl6w8.js} +1 -1
- package/dist/client/assets/{new-project-dialog-BB7lkc90.js → new-project-dialog-DEBFbTK4.js} +1 -1
- package/dist/client/assets/{new-project-store-AGiWlTxK.js → new-project-store-CgLzwcjn.js} +1 -1
- package/dist/client/assets/{oauth-callback-CzLPh840.js → oauth-callback--6BD_yzu.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CNqW8YVb.js → oauth-callback-ai-provider-CcAwHHuH.js} +1 -1
- package/dist/client/assets/{oauth-consent-C6x21DQ7.js → oauth-consent-DU2TXlly.js} +1 -1
- package/dist/client/assets/{onboarding-B55TDmFS.js → onboarding-CA0lTQst.js} +1 -1
- package/dist/client/assets/{openai-conversation-D9EaNCT2.js → openai-conversation-kPp7_oUZ.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-D7Ad1MQo.js → optimistic-project-sidebar-views-C9pyPAzF.js} +1 -1
- package/dist/client/assets/{order-monitor-day-DvFuV37x.js → order-monitor-day-xeVDnHLL.js} +1 -1
- package/dist/client/assets/{organization-choice-yRGUIZ_J.js → organization-choice-CKU82eUy.js} +1 -1
- package/dist/client/assets/{orgs-Cf6BX6NO.js → orgs-a8ldZbiZ.js} +1 -1
- package/dist/client/assets/{own-accounts-section-CT2yRyP_.js → own-accounts-section-DhFCn8gz.js} +1 -1
- package/dist/client/assets/{pair-B9VTopdR.js → pair-C-KXBar9.js} +1 -1
- package/dist/client/assets/{parse-sections-BMAn9SGR.js → parse-sections-DPGRvqbM.js} +2 -2
- package/dist/client/assets/{plan-TSEvOlrg.js → plan-D6JDzYbv.js} +1 -1
- package/dist/client/assets/{plan-ladder-BQRozUnr.js → plan-ladder-DuXPk4c4.js} +1 -1
- package/dist/client/assets/{plan-usage-card-DbJ1AqbM.js → plan-usage-card-BdC1KTye.js} +1 -1
- package/dist/client/assets/{popover-DKQLETgP.js → popover-DGvrj6fy.js} +1 -1
- package/dist/client/assets/{post-calendar-3H45objU.js → post-calendar-DKGqFmih.js} +1 -1
- package/dist/client/assets/post-editor-7oUWGzCY.js +2 -0
- package/dist/client/assets/{preview-content-DtzvMyU3.js → preview-content-abo2ryKK.js} +1 -1
- package/dist/client/assets/{preview-dialog-CZcHPcyw.js → preview-dialog-CQi5mIZh.js} +1 -1
- package/dist/client/assets/{preview-panel-Cf_qbsOk.js → preview-panel-CjmJmEqS.js} +1 -1
- package/dist/client/assets/preview-tab-DA1SyRp5.js +557 -0
- package/dist/client/assets/{product-picker-dialog-DiScKAnl.js → product-picker-dialog-BXRcAQat.js} +1 -1
- package/dist/client/assets/{profile-D4cDJxA7.js → profile-DUghMPNx.js} +1 -1
- package/dist/client/assets/{project-app-view-BV--yKg5.js → project-app-view-DVY_pI8M.js} +1 -1
- package/dist/client/assets/{project-apps-B-BQ_WLB.js → project-apps-DiSx-TBF.js} +1 -1
- package/dist/client/assets/{project-icon-U6Iksgvy.js → project-icon-D6jtLreJ.js} +1 -1
- package/dist/client/assets/{project-index-W8FXW-6M.js → project-index-pgEW44Q9.js} +1 -1
- package/dist/client/assets/project-reports-CvZYitaI.js +1 -0
- package/dist/client/assets/project-tasks-Cm1BxQuv.js +1 -0
- package/dist/client/assets/{projects-UB1Iv8yC.js → projects-CoL2Czss.js} +1 -1
- package/dist/client/assets/{projects-empty-state-CIR-WrUv.js → projects-empty-state-dMAfSAvA.js} +1 -1
- package/dist/client/assets/{prompts-DAfUBNaO.js → prompts-C1nJJ4vm.js} +1 -1
- package/dist/client/assets/record-editor-DUtpG1M4.js +1 -0
- package/dist/client/assets/{redirect-editor-Chr5rAav.js → redirect-editor-v_Pws7YC.js} +1 -1
- package/dist/client/assets/reports-CRpT9Jvs.js +1 -0
- package/dist/client/assets/{reports-DNNF1b9v.js → reports-DeRFKvgR.js} +1 -1
- package/dist/client/assets/{reports-onboarding-8yxwk401.js → reports-onboarding-ByH6wjdu.js} +1 -1
- package/dist/client/assets/{reports-tab-BWTBFwIS.js → reports-tab-DNq4qxR5.js} +2 -2
- package/dist/client/assets/repositories-BimQNbUT.js +1 -0
- package/dist/client/assets/{repositories-DLsDU_5G.js → repositories-CshiRVJO.js} +1 -1
- package/dist/client/assets/{repository-binding-n3PcTj5W.js → repository-binding-Drae9jEJ.js} +1 -1
- package/dist/client/assets/{repository-picker-D6iz0LSt.js → repository-picker-DcoNDHNX.js} +1 -1
- package/dist/client/assets/{require-capability-DnyEZ3xe.js → require-capability-58lj_sLx.js} +1 -1
- package/dist/client/assets/{required-auth-layout-DyjCxKYD.js → required-auth-layout-coJLhqjq.js} +1 -1
- package/dist/client/assets/{reset-password-DTzJYy8y.js → reset-password-DmNJhZP_.js} +1 -1
- package/dist/client/assets/{resizable-CcVTuTxq.js → resizable-a5ed0aFn.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-MEE2P75Q.js → resolve-tab-icon-aSYnYRbW.js} +1 -1
- package/dist/client/assets/{review-settings-Bf0p0wLB.js → review-settings-M_0Lgvos.js} +1 -1
- package/dist/client/assets/{role-color-B2mF5Vo7.js → role-color-B1bQbhLW.js} +1 -1
- package/dist/client/assets/{roles-ezntvUY8.js → roles-Cfs4KbFC.js} +1 -1
- package/dist/client/assets/route-BIUN__VF.js +1 -0
- package/dist/client/assets/{route-DUzlT2px.js → route-CKUHS8mK.js} +1 -1
- package/dist/client/assets/{route-BUfQW8qo.js → route-ln57uUdJ.js} +1 -1
- package/dist/client/assets/{route-page-header-NJcm4Djx.js → route-page-header-Dm04mhuj.js} +1 -1
- package/dist/client/assets/{sandbox-git-api-BfQhG8Sq.js → sandbox-git-api-CPqBqV0G.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-CH7BXWjg.js → sandbox-lifecycle-context-PaxLnfD4.js} +1 -1
- package/dist/client/assets/{save-status-DI48JmZF.js → save-status-BXFvRkAL.js} +1 -1
- package/dist/client/assets/{schema-BG6AHPWD.js → schema-BSbCYY9y.js} +1 -1
- package/dist/client/assets/{schema-CpAYIyCk.js → schema-DgI3qSqy.js} +1 -1
- package/dist/client/assets/{scroll-area-v2fkoJDu.js → scroll-area-B2d6jFzS.js} +1 -1
- package/dist/client/assets/{search-input-C2L58fvI.js → search-input-XDrQYhil.js} +1 -1
- package/dist/client/assets/{search-toggle-BseJQJ3D.js → search-toggle-CBe-B-W_.js} +1 -1
- package/dist/client/assets/{secret-picker-DKGfGpF9.js → secret-picker-6lDKLE0I.js} +1 -1
- package/dist/client/assets/{secrets-Bi0_8npG.js → secrets-mRfQ2zYn.js} +1 -1
- package/dist/client/assets/{section-array-field-0_ZQBUjD.js → section-array-field-DRYut2dk.js} +1 -1
- package/dist/client/assets/{sections-CS7IpWui.js → sections-2LOxZNGC.js} +1 -1
- package/dist/client/assets/sections-editor-DSw0gf5K.js +1 -0
- package/dist/client/assets/{select-49MR6azA.js → select-B282Slsg.js} +1 -1
- package/dist/client/assets/{select-model-BI9Cqkmj.js → select-model-YSEeD0Az.js} +1 -1
- package/dist/client/assets/{seo-editor-C2RgUFJu.js → seo-editor-SlMH3Ndc.js} +1 -1
- package/dist/client/assets/{separator-DpOO1i0C.js → separator-C2ELigwU.js} +1 -1
- package/dist/client/assets/{session-runtime-cbg630xz.js → session-runtime-BH3ADRqu.js} +1 -1
- package/dist/client/assets/settings-tab-CtAuHkvY.js +1 -0
- package/dist/client/assets/{sheet-DLoxxUKp.js → sheet-BqPaRS1I.js} +1 -1
- package/dist/client/assets/{shell-layout-DRrSF92W.js → shell-layout-2a3HocEU.js} +1 -1
- package/dist/client/assets/{site-draft-actions-B9cG-u-X.js → site-draft-actions-BNgtZ_kM.js} +1 -1
- package/dist/client/assets/{site-draft-view-B0Fqqz0n.js → site-draft-view-59J3TeYY.js} +1 -1
- package/dist/client/assets/site-editor-DwanunsO.js +1 -0
- package/dist/client/assets/{site-editor-toast-D0pe87Fd.js → site-editor-toast-CkAw1Cwp.js} +1 -1
- package/dist/client/assets/{skills-B6AixETp.js → skills-BzPEtrNZ.js} +1 -1
- package/dist/client/assets/{slider-CAIOMJ6O.js → slider-wN_aQalr.js} +1 -1
- package/dist/client/assets/{sortable.esm-DgdmBaPW.js → sortable.esm-DPJjIjEU.js} +1 -1
- package/dist/client/assets/{sso-D5fb_ilb.js → sso-Bs5CI3h8.js} +1 -1
- package/dist/client/assets/{suggestion-CL--hguC.js → suggestion-DWkqugbN.js} +1 -1
- package/dist/client/assets/{super-agent-icon-CXirshAk.js → super-agent-icon-D0WeAH15.js} +1 -1
- package/dist/client/assets/{switch-DK7LFSes.js → switch-CfemO1do.js} +1 -1
- package/dist/client/assets/{synced-repos-CLaC8meB.js → synced-repos-BKKcIPbN.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-BGYGkGrT.js → tab-icon-glyph-CNySjp_I.js} +1 -1
- package/dist/client/assets/{table-zwIDqi9O.js → table-C9du40XO.js} +1 -1
- package/dist/client/assets/{tabs-Ls9GPDHI.js → tabs-D6Pnw7es.js} +1 -1
- package/dist/client/assets/{task-board-C24cF7O1.js → task-board-CZErK_3f.js} +1 -1
- package/dist/client/assets/{task-key-WwiMwV7X.js → task-key-BWUT6sLU.js} +1 -1
- package/dist/client/assets/{task-route-BmUnrQXR.js → task-route-CGCjMBBZ.js} +1 -1
- package/dist/client/assets/{task-status-BGN7G1ph.js → task-status-DdY5hqAG.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-BBqPAQnV.js → taskboard-analytics-BUGSR3Oh.js} +1 -1
- package/dist/client/assets/{tasks-CfYwFKuf.js → tasks-Cn9XhG4H.js} +1 -1
- package/dist/client/assets/tasks-qN1qstWv.js +1 -0
- package/dist/client/assets/{textarea-7Sqa9SEq.js → textarea-shjcg83Q.js} +1 -1
- package/dist/client/assets/{thread-analytics-BYs34KPS.js → thread-analytics-nP1khI2z.js} +1 -1
- package/dist/client/assets/{thread-button-B0qrnEQv.js → thread-button-BT5IYGed.js} +1 -1
- package/dist/client/assets/{thread-intent-C7XVii2Y.js → thread-intent-MQDkwS2K.js} +1 -1
- package/dist/client/assets/{thread-route-DotOHAlX.js → thread-route-C18glt36.js} +1 -1
- package/dist/client/assets/{thread-route-cOJYb9VT.js → thread-route-CwpmRNHh.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-aHZtFnUd.js → thread-sheet-body-BY8zn-2X.js} +1 -1
- package/dist/client/assets/{time-range-picker-ChDJ8FPk.js → time-range-picker-BcBC6ty0.js} +1 -1
- package/dist/client/assets/{toggle-group-DgmU9Ik4.js → toggle-group-BnrXGKKY.js} +1 -1
- package/dist/client/assets/{tool-set-selector-DS4N_IFT.js → tool-set-selector-DUOMDF3r.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-BJwXZ1OF.js → toolbar-icon-button-2ueMvkvI.js} +1 -1
- package/dist/client/assets/{tooltip-DGF6yL8r.js → tooltip-DgFM5mQB.js} +1 -1
- package/dist/client/assets/{tooltipContext-BTH1KLDy.js → tooltipContext-BvjdDC28.js} +1 -1
- package/dist/client/assets/{track-CzLbsWR6.js → track-CDbXIh-t.js} +1 -1
- package/dist/client/assets/{types-cMCbWf0m.js → types-Bca8rqtc.js} +1 -1
- package/dist/client/assets/{url-slug-Ycbe1Rvc.js → url-slug-0nYVauKi.js} +1 -1
- package/dist/client/assets/{usage-stats-BiXE7t-o.js → usage-stats-DyR6Kq74.js} +1 -1
- package/dist/client/assets/{use-ai-providers-BPDfMGmO.js → use-ai-providers-BM99Jk3f.js} +1 -1
- package/dist/client/assets/{use-api-keys-Ee4WtIpF.js → use-api-keys-CwsBcAgd.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule-DDMjfVAa.js → use-apply-named-rule-D90SDfPC.js} +1 -1
- package/dist/client/assets/use-ask-in-chat-B4aJKUoO.js +1 -0
- package/dist/client/assets/{use-automations-BGPanOv6.js → use-automations-Co69mrXt.js} +1 -1
- package/dist/client/assets/{use-autosave-uQmwsIRK.js → use-autosave-BoR4WbwP.js} +1 -1
- package/dist/client/assets/use-blocks-v8-project-Dq4zh0zX.js +1 -0
- package/dist/client/assets/use-blog-view-DuKgZxsq.js +1 -0
- package/dist/client/assets/{use-chat-layout-state-CuCbgNpm.js → use-chat-layout-state-v3ZvRKOT.js} +1 -1
- package/dist/client/assets/{use-cms-publish-actions-CpjyT0k4.js → use-cms-publish-actions-tt3YVYFN.js} +1 -1
- package/dist/client/assets/{use-connect-companion-BxzWZXBm.js → use-connect-companion-isIbV5OV.js} +1 -1
- package/dist/client/assets/{use-connection-Df_9bnNn.js → use-connection-wSXmVdCY.js} +1 -1
- package/dist/client/assets/{use-content-sync-TRRinsXK.js → use-content-sync-BDeJ_Jgu.js} +1 -1
- package/dist/client/assets/{use-copy-DmG9bn6Y.js → use-copy-CQS-1CPQ.js} +1 -1
- package/dist/client/assets/{use-current-view-BpjWsRmy.js → use-current-view-C8Qn7lu6.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-DjxdJjlF.js → use-date-fns-locale-rXGxQCgx.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-YRLt5iYQ.js → use-debounced-autosave-C2p5-3yn.js} +1 -1
- package/dist/client/assets/{use-debounced-value-CzRJcWqp.js → use-debounced-value-sPPLBdJe.js} +1 -1
- package/dist/client/assets/{use-deco-credits-BkWjJR12.js → use-deco-credits-Cd6Vxe2k.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CJGAurUR.js → use-decopilot-events-Dn0Dm68W.js} +1 -1
- package/dist/client/assets/{use-delete-block-2g7g3klO.js → use-delete-block-MPbaqrna.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BXs5Hc_Q.js → use-delete-connection-EcnpG53Z.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-BX2qXW-2.js → use-deployment-admin-CTEsKWeV.js} +1 -1
- package/dist/client/assets/{use-entitlements-BBAwS2JD.js → use-entitlements-BXMPYOBS.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-BY0ndfYB.js → use-fast-preview-draft-url-BpA0y2aq.js} +1 -1
- package/dist/client/assets/{use-file-configs-BS_YcmBF.js → use-file-configs-Df-dqKVI.js} +1 -1
- package/dist/client/assets/{use-id-selection-d9WtjRjN.js → use-id-selection-3iTAqvRR.js} +1 -1
- package/dist/client/assets/{use-in-settings-ClwRJ_Tc.js → use-in-settings-D_BySurP.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-C7YunCP0.js → use-inbox-feed-B-8Gmjeu.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-B9PxMRZD.js → use-infinite-scroll-C-t0_BGl.js} +1 -1
- package/dist/client/assets/{use-join-requests-CANQ78P4.js → use-join-requests-B0limBIJ.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-Dav7mets.js → use-main-panel-tabs-N1__ahB3.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-CXGwjE9l.js → use-mcp-auth-status-Buwa7u45.js} +1 -1
- package/dist/client/assets/{use-mcp-client-DWGLQdXd.js → use-mcp-client-OYKYr7Zc.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-BEtNL37X.js → use-mcp-prompts-XeLNsblN.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BottG2O1.js → use-mcp-tools-Ben5ajiJ.js} +1 -1
- package/dist/client/assets/{use-mobile-Cxsh7m9X.js → use-mobile-MVZR2Lhp.js} +1 -1
- package/dist/client/assets/{use-move-blocks-TXQsGjBm.js → use-move-blocks-DNt_Qh-7.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-BIZctK6l.js → use-navigate-to-agent-0LtKWlxa.js} +1 -1
- package/dist/client/assets/use-never-published-DCVDrsUC.js +1 -0
- package/dist/client/assets/{use-org-fs-D389k80k.js → use-org-fs-Dj5ea7Pp.js} +1 -1
- package/dist/client/assets/{use-org-notice-DwvEJ13u.js → use-org-notice-Csddyapx.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-Jx7MyyHn.js → use-org-repo-syncs-8CH2dV_u.js} +1 -1
- package/dist/client/assets/{use-org-sso-CY5B45CW.js → use-org-sso-DXCHIqdV.js} +1 -1
- package/dist/client/assets/{use-organization-settings-OVUaywhs.js → use-organization-settings-BTioDTeC.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-Cr2v02C3.js → use-panel-navigate-B_099k7i.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-ewWALD0x.js → use-project-native-view-presence-BCWndDk0.js} +1 -1
- package/dist/client/assets/{use-project-scope-BXRinCYb.js → use-project-scope-BaNhjjkU.js} +1 -1
- package/dist/client/assets/{use-recent-apps-GE97XkJ8.js → use-recent-apps-DKTzlYg2.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-BWMlNkeF.js → use-reports-diagnostic-tqk6GkvN.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-BCRFFvvv.js → use-sandbox-events-DkGz3U_g.js} +1 -1
- package/dist/client/assets/{use-secrets-B6enX6Ym.js → use-secrets-DsTJ_f5f.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-Bgm0Lp29.js → use-section-preview-base-BFP7PpkG.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-DK4JHLku.js → use-sidebar-collapsed-Cyq98Qgp.js} +1 -1
- package/dist/client/assets/{use-tags-CvwYS8eS.js → use-tags-D58r0dtz.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-DLq03qK9.js → use-task-board-analytics-Q05GDgAf.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-DIPZ6jIw.js → use-task-board-item-prs-Y4mOP7Qi.js} +1 -1
- package/dist/client/assets/{use-task-board-items-CmA9KjLs.js → use-task-board-items-DHvwjetN.js} +1 -1
- package/dist/client/assets/{use-task-board-prompts-CkYS6_8J.js → use-task-board-prompts-Ds3v5gjb.js} +1 -1
- package/dist/client/assets/{use-task-metadata-Beq3R9jr.js → use-task-metadata-bPw-hNrv.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-Dl2UvcUX.js → use-thread-outputs-I2kuvS72.js} +1 -1
- package/dist/client/assets/{use-view-draft-kind-BLecf4F_.js → use-view-draft-kind-DcHRrUPD.js} +1 -1
- package/dist/client/assets/{use-voice-input-D0aJ7Wh3.js → use-voice-input-ClQF7v9Y.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CoeKNdsU.js +1 -0
- package/dist/client/assets/{useQueries-DLlqEm7S.js → useQueries-Q6q16yJQ.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-hY0KLY7U.js +1 -0
- package/dist/client/assets/{users-I7lrwNfV.js → users-BBdssw6s.js} +1 -1
- package/dist/client/assets/{utils-B_oMvMQ4.js → utils-BaccrSLZ.js} +1 -1
- package/dist/client/assets/{variant-calendar-CXBg42EW.js → variant-calendar-DLupNn-U.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-DZytsOwn.js → variant-matcher-override-3ayykvcg.js} +1 -1
- package/dist/client/assets/{view-header-BWLCH3xe.js → view-header-BIqV3RdZ.js} +1 -1
- package/dist/client/assets/{virtual-mcp-DouGbsHq.js → virtual-mcp-DyF6IEhr.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-B9QxkAI3.js → watch-sse-pool-DTFf-OSe.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agent-app-UoRF36vk.js +0 -1
- package/dist/client/assets/agent-deck-BLJ8bj-K.js +0 -1
- package/dist/client/assets/agent-experiments-Ml6bqFss.js +0 -1
- package/dist/client/assets/agent-file-CmlDrUHs.js +0 -1
- package/dist/client/assets/agent-library-BjjruHtQ.js +0 -1
- package/dist/client/assets/agent-library-file-CNoJ54Ee.js +0 -1
- package/dist/client/assets/agent-overview-Dk4XJQcT.js +0 -1
- package/dist/client/assets/agent-settings-CC2rPZBi.js +0 -1
- package/dist/client/assets/agent-site-editor-code-BvrpoBJL.js +0 -2
- package/dist/client/assets/agent-site-editor-content-QmRWPMOR.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-CKHTHvrW.js +0 -1
- package/dist/client/assets/agent-view-BBdmo6o1.js +0 -1
- package/dist/client/assets/api-keys-BvVFCute.js +0 -1
- package/dist/client/assets/app-editor-D6TvV1oi.js +0 -1
- package/dist/client/assets/category-editor-P8EZIJ92.js +0 -1
- package/dist/client/assets/content-tab-Cx-DPILX.js +0 -19
- package/dist/client/assets/library-B-HyC9ob.js +0 -1
- package/dist/client/assets/post-editor-Dpy18Hkp.js +0 -2
- package/dist/client/assets/preview-tab-qmFbN81d.js +0 -557
- package/dist/client/assets/project-reports-D8A_7LbK.js +0 -1
- package/dist/client/assets/project-tasks-CtIWIKHg.js +0 -1
- package/dist/client/assets/record-editor-CdqMsRzX.js +0 -1
- package/dist/client/assets/reports-BMsIz_tG.js +0 -1
- package/dist/client/assets/repositories-DkJSjoVA.js +0 -1
- package/dist/client/assets/route-ByacllZq.js +0 -1
- package/dist/client/assets/sections-editor-CueAfisQ.js +0 -1
- package/dist/client/assets/settings-tab-DGbxLWDH.js +0 -1
- package/dist/client/assets/site-editor-DVxTBxx-.js +0 -1
- package/dist/client/assets/tasks-BJyP5v8a.js +0 -1
- package/dist/client/assets/use-ask-in-chat-Bq_Pbquv.js +0 -1
- package/dist/client/assets/use-blocks-v8-project-BB5VrS43.js +0 -1
- package/dist/client/assets/use-blog-view-Cxdj4uSu.js +0 -1
- package/dist/client/assets/use-never-published-0j7xzTQG.js +0 -1
- package/dist/client/assets/useInfiniteQuery-K8oCvn2v.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-D5Kn6VyM.js +0 -1
package/dist/client/assets/{site-draft-actions-B9cG-u-X.js → site-draft-actions-BNgtZ_kM.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,al as Ha,t as at,eL as Va,as as Pr,dL as Sr,Y as ms,dM as Ga,aH as Ns,aI as Cs,aJ as As,aK as Js,b7 as Ws,aL as Rs,aM as Ds,aN as Ts,X as tn,Z as sn,_ as nn,a as rn,a4 as Is,bY as Ja,h as ps,eM as kr,eN as Nr,eO as Sn,bx as Wa,bm as Qa,br as Zn,eP as Ya,am as Xa,I as Za,a7 as el,eQ as tl,V as Cr,i as gt,eI as kn,q as Ar,J as Rr,D as Dr,x as Tr,v as Br,Q as Ir,R as $r,aV as sl,b8 as Fr,a5 as Nn,b4 as Cn,e as er,E as nl,T as rl}from"./index-D4zAZEeh.js";import{S as al}from"./separator-DpOO1i0C.js";import{f as ll,u as vs,r as Lr,l as Or,c as Mr,b as il}from"./chat-context-kuwat9Zp.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-D0pe87Fd.js";import{L as bl}from"./use-org-notice-DwvEJ13u.js";import{I as Kr}from"./toolbar-icon-button-BJwXZ1OF.js";import{b as gl,P as xl,a as vl}from"./popover-DKQLETgP.js";import{c as lt,T as it,a as ot,b as an}from"./tooltip-DGF6yL8r.js";import{f as yl,a as jl,c as wl,C as tr,e as sr,b as nr}from"./command-C5c9xxo6.js";import{T as Lt,a as qr,b as Hr}from"./tabs-Ls9GPDHI.js";import{t as Vr}from"./ChevronDown-L1RduSWg.js";import{b as Pl}from"./UserCheck01-Dnnv6qzl.js";import{K as Gr,ac as ln,a as Jr,F as Sl,b as kl,ad as Wr}from"./agent-icon-CBIv-AL5.js";import{a as Qr}from"./SwitchHorizontal01-BTEqc04d.js";import{b as Yr}from"./Tool01-CuK8_xpK.js";import{s as Xr}from"./Plus-Bvk6TEoj.js";import{s as on}from"./Trash01-C00iOBQB.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-BLecf4F_.js";import{u as Bn}from"./use-blog-view-Cxdj4uSu.js";import{u as ys}from"./use-voice-input-D0aJ7Wh3.js";import{b as Rl,d as ta}from"./session-runtime-cbg630xz.js";import{h as sa,r as na,b as $s,g as Dl,e as ze,f as ra}from"./repository-binding-n3PcTj5W.js";import{u as Tl}from"./use-debounced-value-CzRJcWqp.js";import{a as Bl,u as Il}from"./shell-layout-DRrSF92W.js";import{u as $l}from"./useInfiniteQuery-K8oCvn2v.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-BIZctK6l.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-xU8H47hr.js";import{e as ql,g as Hl,f as In}from"./thread-intent-C7XVii2Y.js";import{a as Qs}from"./virtual-mcp-DouGbsHq.js";import{u as $n}from"./use-blocks-v8-project-BB5VrS43.js";import{G as ca}from"./github-icon-tttsztW4.js";import{k as Vl,r as Gl,c as da,u as Jl}from"./use-sandbox-events-BCRFFvvv.js";import{a as Wl,b as Ql}from"./use-fast-preview-draft-url-BY0ndfYB.js";import{a3 as hs,a4 as ua,z as Ys,o as Fn,a5 as Yl,a6 as Xl,E as Zl,a7 as ei,a8 as ti,p as si,W as At,f as Ln,a9 as ni}from"./blocks-tab-states-wy6ydHCy.js";import"./index-DsnO5Dzk.js";import{T as ri}from"./textarea-7Sqa9SEq.js";import{i as On}from"./CheckCircle-CGiVBHq1.js";import{s as Xs}from"./Eye-BgZwKqY2.js";import{n as ai,s as li,C as ii,a as oi,b as ci,M as di,c as ui,d as hi,m as fi,u as mi}from"./use-cms-publish-actions-CpjyT0k4.js";import{a as pi,h as bi}from"./UserSquare-Br0ylxlC.js";import{i as Mn,b as _n,m as gi,h as xi,c as ha,f as fa,d as vi,r as En,e as yi,n as ji,g as wi,j as Pi,k as Si,l as zn,o as ki,p as ma,q as Ni,s as Un,B as Ci,t as fn}from"./sandbox-git-api-BfQhG8Sq.js";import{a as Ai,g as Ri}from"./utils-B_oMvMQ4.js";import{i as Di}from"./Monitor01-FVdupyIO.js";import{w as Kn,R as pa}from"./device-hint-B3K0oDUI.js";import{w as rr}from"./editor-cG8bavVY.js";import{i as Ti,C as Bi}from"./section-array-field-0_ZQBUjD.js";import{T as Ii,a as ar}from"./toggle-group-DgmU9Ik4.js";import{s as ba}from"./save-changes-debug-nBi-n9eV.js";import{u as $i}from"./use-mcp-client-DWGLQdXd.js";import{t as Fi}from"./MessageCircle01-BXDua8oN.js";import{b as Li,a as Oi}from"./sandbox-lifecycle-context-CH7BXWjg.js";import{b as Mi}from"./agent-capabilities-CD1cAeZo.js";import{c as _i}from"./thread-route-DotOHAlX.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 Yi(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(Xi),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 X;e[26]!==I?(X=()=>{I()},e[26]=I,e[27]=X):X=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]!==X||e[37]!==K?(le={recent:te,yours:K,others:J,isLoading:A,isError:S,isSearching:B,hiddenMatchCount:W,hasMore:ue,isFetchingMore:O,fetchMore:X},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]=X,e[37]=K,e[38]=le):le=e[38],le}function Xi(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,X]=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):[],Y=ke.refetch,Z=El(s),{url:Be,setUrl:Q,clear:oe}=An(s),Ne=Rn(s),xt=y&&!!Ne.connection,Ye=y?Ne.connection?.endpoint??null:Be,ye=!!Ye;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:Xe,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=Xe?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":Xe?"bg-success":Oe?Ss(void 0):Ss(dt?.color??"orange"),Ce=!xt&&!ye&&!Xe&&!!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(X(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:()=>X(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]!==Y?(Ke=C?void 0:R=>{R?y&&Y():Bt(),L(R)},e[39]=C,e[40]=y,e[41]=Y,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&&Ye&&r.jsx(to,{rowRef:ee,url:Ye,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(Xr,{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||X(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 Yt;e[75]!==k?(Yt=k("thread.branchPicker.delete"),e[75]=k,e[76]=Yt):Yt=e[76];let Xt;e[77]!==It||e[78]!==Yt?(Xt=r.jsx(Ws,{onClick:It,variant:"destructive",children:Yt}),e[77]=It,e[78]=Yt,e[79]=Xt):Xt=e[79];let Zt;e[80]!==Qt||e[81]!==Xt?(Zt=r.jsxs(Rs,{children:[Qt,Xt]}),e[80]=Qt,e[81]=Xt,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(Yr,{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(Yr,{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}=Yi(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 X=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&&X.length===0&&r.jsx(tr,{children:j("thread.branchPicker.noBranchesFound")}),X.length>0&&r.jsx(sr,{children:X.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 ai({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?Zl(s.__resolveType):ei(t)}const xo=/(?:^|\/)\.deco\/blocks\/([^/]+)\.json$/;function qn(t){const e=xo.exec(t)?.[1];return e?Ai(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===ii:t===oi}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:Ys(i,h),pagePath:null,isSiteApp:b,status:l,filepaths:[o],sections:l==="edited"?[{name:Ys(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=Ys(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 li(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(Ya(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?Yl(c,v,g,m,f):null,N=y?Xl(y,[v,g,m,f]):Ys(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"?pi: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 ti(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=Ri(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(Xa,{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"&&Ti(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,ni,e)}catch{return null}}function Jo(t,e,s){if(!e)return;const a=si(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):Yo(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 Yo(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 Xo(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,al as Ha,t as at,eL as Va,as as Pr,dL as Sr,Y as ms,dM as Ga,aH as Ns,aI as Cs,aJ as As,aK as Js,b7 as Ws,aL as Rs,aM as Ds,aN as Ts,X as tn,Z as sn,_ as nn,a as rn,a4 as Is,bY as Ja,h as ps,eM as kr,eN as Nr,eO as Sn,bx as Wa,bm as Qa,br as Zn,eP as Ya,am as Xa,I as Za,a7 as el,eQ as tl,V as Cr,i as gt,eI as kn,q as Ar,J as Rr,D as Dr,x as Tr,v as Br,Q as Ir,R as $r,aV as sl,b8 as Fr,a5 as Nn,b4 as Cn,e as er,E as nl,T as rl}from"./index-BRgWMc-5.js";import{S as al}from"./separator-C2ELigwU.js";import{f as ll,u as vs,r as Lr,l as Or,c as Mr,b as il}from"./chat-context-ZeSpVj2j.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-CkAw1Cwp.js";import{L as bl}from"./use-org-notice-Csddyapx.js";import{I as Kr}from"./toolbar-icon-button-2ueMvkvI.js";import{b as gl,P as xl,a as vl}from"./popover-DGvrj6fy.js";import{c as lt,T as it,a as ot,b as an}from"./tooltip-DgFM5mQB.js";import{f as yl,a as jl,c as wl,C as tr,e as sr,b as nr}from"./command-Dg1M4JCf.js";import{T as Lt,a as qr,b as Hr}from"./tabs-D6Pnw7es.js";import{t as Vr}from"./ChevronDown-CGJhfuSb.js";import{b as Pl}from"./UserCheck01-CcIH7s2N.js";import{K as Gr,ac as ln,a as Jr,F as Sl,b as kl,ad as Wr}from"./agent-icon-DFyNTmmD.js";import{a as Qr}from"./SwitchHorizontal01-CGFn_psg.js";import{b as Yr}from"./Tool01-Cnkd4pP7.js";import{s as Xr}from"./Plus-B_KK3A4P.js";import{s as on}from"./Trash01-CnPGIwZe.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-DcHRrUPD.js";import{u as Bn}from"./use-blog-view-DuKgZxsq.js";import{u as ys}from"./use-voice-input-ClQF7v9Y.js";import{b as Rl,d as ta}from"./session-runtime-BH3ADRqu.js";import{h as sa,r as na,b as $s,g as Dl,e as ze,f as ra}from"./repository-binding-Drae9jEJ.js";import{u as Tl}from"./use-debounced-value-sPPLBdJe.js";import{a as Bl,u as Il}from"./shell-layout-2a3HocEU.js";import{u as $l}from"./useInfiniteQuery-CoeKNdsU.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-0LtKWlxa.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-CLXsr0b9.js";import{e as ql,g as Hl,f as In}from"./thread-intent-MQDkwS2K.js";import{a as Qs}from"./virtual-mcp-DyF6IEhr.js";import{u as $n}from"./use-blocks-v8-project-Dq4zh0zX.js";import{G as ca}from"./github-icon-KEAtk4MX.js";import{k as Vl,r as Gl,c as da,u as Jl}from"./use-sandbox-events-DkGz3U_g.js";import{a as Wl,b as Ql}from"./use-fast-preview-draft-url-BpA0y2aq.js";import{a3 as hs,a4 as ua,z as Ys,o as Fn,a5 as Yl,a6 as Xl,E as Zl,a7 as ei,a8 as ti,p as si,W as At,f as Ln,a9 as ni}from"./blocks-tab-states-0NdQhV1f.js";import"./index-CER3O-Er.js";import{T as ri}from"./textarea-shjcg83Q.js";import{i as On}from"./CheckCircle-CGqAjggj.js";import{s as Xs}from"./Eye-CO_nPZKQ.js";import{n as ai,s as li,C as ii,a as oi,b as ci,M as di,c as ui,d as hi,m as fi,u as mi}from"./use-cms-publish-actions-tt3YVYFN.js";import{a as pi,h as bi}from"./UserSquare-CUb4s2-c.js";import{i as Mn,b as _n,m as gi,h as xi,c as ha,f as fa,d as vi,r as En,e as yi,n as ji,g as wi,j as Pi,k as Si,l as zn,o as ki,p as ma,q as Ni,s as Un,B as Ci,t as fn}from"./sandbox-git-api-CPqBqV0G.js";import{a as Ai,g as Ri}from"./utils-BaccrSLZ.js";import{i as Di}from"./Monitor01-CM0DIJ9E.js";import{w as Kn,R as pa}from"./device-hint-BlkEtJOD.js";import{w as rr}from"./editor-DKlObXWN.js";import{i as Ti,C as Bi}from"./section-array-field-DRYut2dk.js";import{T as Ii,a as ar}from"./toggle-group-BnrXGKKY.js";import{s as ba}from"./save-changes-debug-nBi-n9eV.js";import{u as $i}from"./use-mcp-client-OYKYr7Zc.js";import{t as Fi}from"./MessageCircle01-jm5EAYEs.js";import{b as Li,a as Oi}from"./sandbox-lifecycle-context-PaxLnfD4.js";import{b as Mi}from"./agent-capabilities-CYFGwKOQ.js";import{c as _i}from"./thread-route-C18glt36.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 Yi(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(Xi),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 X;e[26]!==I?(X=()=>{I()},e[26]=I,e[27]=X):X=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]!==X||e[37]!==K?(le={recent:te,yours:K,others:J,isLoading:A,isError:S,isSearching:B,hiddenMatchCount:W,hasMore:ue,isFetchingMore:O,fetchMore:X},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]=X,e[37]=K,e[38]=le):le=e[38],le}function Xi(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,X]=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):[],Y=ke.refetch,Z=El(s),{url:Be,setUrl:Q,clear:oe}=An(s),Ne=Rn(s),xt=y&&!!Ne.connection,Ye=y?Ne.connection?.endpoint??null:Be,ye=!!Ye;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:Xe,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=Xe?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":Xe?"bg-success":Oe?Ss(void 0):Ss(dt?.color??"orange"),Ce=!xt&&!ye&&!Xe&&!!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(X(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:()=>X(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]!==Y?(Ke=C?void 0:R=>{R?y&&Y():Bt(),L(R)},e[39]=C,e[40]=y,e[41]=Y,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&&Ye&&r.jsx(to,{rowRef:ee,url:Ye,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(Xr,{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||X(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 Yt;e[75]!==k?(Yt=k("thread.branchPicker.delete"),e[75]=k,e[76]=Yt):Yt=e[76];let Xt;e[77]!==It||e[78]!==Yt?(Xt=r.jsx(Ws,{onClick:It,variant:"destructive",children:Yt}),e[77]=It,e[78]=Yt,e[79]=Xt):Xt=e[79];let Zt;e[80]!==Qt||e[81]!==Xt?(Zt=r.jsxs(Rs,{children:[Qt,Xt]}),e[80]=Qt,e[81]=Xt,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(Yr,{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(Yr,{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}=Yi(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 X=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&&X.length===0&&r.jsx(tr,{children:j("thread.branchPicker.noBranchesFound")}),X.length>0&&r.jsx(sr,{children:X.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 ai({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?Zl(s.__resolveType):ei(t)}const xo=/(?:^|\/)\.deco\/blocks\/([^/]+)\.json$/;function qn(t){const e=xo.exec(t)?.[1];return e?Ai(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===ii:t===oi}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:Ys(i,h),pagePath:null,isSiteApp:b,status:l,filepaths:[o],sections:l==="edited"?[{name:Ys(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=Ys(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 li(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(Ya(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?Yl(c,v,g,m,f):null,N=y?Xl(y,[v,g,m,f]):Ys(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"?pi: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 ti(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=Ri(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(Xa,{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"&&Ti(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,ni,e)}catch{return null}}function Jo(t,e,s){if(!e)return;const a=si(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):Yo(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 Yo(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 Xo(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?Xo(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 X;e[16]===Symbol.for("react.memo_cache_sentinel")?(X=Q=>ue(oe=>oe.has(Q)?oe:new Set(oe).add(Q)),e[16]=X):X=e[16];const le=X;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(Xr,{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(Di,{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(Xs,{className:"size-5 text-muted-foreground"}),title:c("thread.publishCompare.previewNotReadyTitle"),description:c("thread.publishCompare.draftUnavailable")}):r.jsx(Us,{icon:r.jsx(Xs,{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 Y;e[58]!==n||e[59]!==M||e[60]!==z||e[61]!==h||e[62]!==c||e[63]!==x?(Y=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]=Y):Y=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]!==Y||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,Y,Z]}),e[71]=Se,e[72]=E,e[73]=fe,e[74]=ke,e[75]=me,e[76]=Y,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,a4 as P,bf as R}from"./index-
|
|
1
|
+
import{c as I,j as r,n as v,b as M,a4 as P,bf as R}from"./index-BRgWMc-5.js";import{E as T}from"./empty-state-DrDY2Uvy.js";import{u as w}from"./chat-context-ZeSpVj2j.js";import{u as B,j as L,k as _}from"./site-editor-toast-CkAw1Cwp.js";import{i as $,u as A,j as Q,S as U}from"./blocks-tab-states-0NdQhV1f.js";import{a as G}from"./use-panel-navigate-B_099k7i.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(),k=w(),u=k?.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=k?.taskId??null;let j;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?(j=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]=j):j=e[32],j}function J(C){const e=I.c(35),{orgSlug:l,virtualMcpId:i,branch:t,threadId:n,icon:a,copy:o,skeleton:p,children:k}=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),j=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(!j||!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]!==k||e[27]!==j||e[28]!==s||e[29]!==l||e[30]!==n||e[31]!==i?(f=k({orgSlug:l,virtualMcpId:i,branch:t,threadId:n,decofile:j,meta:s}),e[25]=t,e[26]=k,e[27]=j,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-BRgWMc-5.js";import{C as M}from"./chat-context-ZeSpVj2j.js";import{ChatLayout as x}from"./index-Bjhw4G6x.js";import{L}from"./index-CEBVkeBV.js";import{B as J}from"./blocks-preview-workspace-context-1Hmusp23.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-CkAw1Cwp.js";import{u as q,L as B,P as Q,S as X}from"./preview-tab-DA1SyRp5.js";import{C as Y}from"./content-tab-DksWOtkz.js";import{T as Z}from"./tab-icon-glyph-CNySjp_I.js";import{r as tt}from"./resolve-tab-icon-aSYnYRbW.js";import ot from"./agent-site-editor-Du4ljJT4.js";import"./use-panel-navigate-B_099k7i.js";import"./thread-route-C18glt36.js";import"./use-project-scope-BaNhjjkU.js";import"./repository-binding-Drae9jEJ.js";import"./use-mcp-client-OYKYr7Zc.js";import"./auth-sBxX13D1.js";import"./use-view-draft-kind-DcHRrUPD.js";import"./use-blog-view-DuKgZxsq.js";import"./use-organization-settings-BTioDTeC.js";import"./schema-BSbCYY9y.js";import"./task-board-CZErK_3f.js";import"./thread-intent-MQDkwS2K.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-DTFf-OSe.js";import"./session-runtime-BH3ADRqu.js";import"./use-entitlements-BXMPYOBS.js";import"./use-ai-providers-BM99Jk3f.js";import"./use-current-view-C8Qn7lu6.js";import"./use-in-settings-D_BySurP.js";import"./use-decopilot-events-Dn0Dm68W.js";import"./use-mobile-MVZR2Lhp.js";import"./tooltip-DgFM5mQB.js";import"./index-3k_nlNc7.js";import"./MessageCircle01-jm5EAYEs.js";import"./XClose-CtxnajtG.js";import"./thread-button-BT5IYGed.js";import"./use-sidebar-collapsed-Cyq98Qgp.js";import"./sheet-BqPaRS1I.js";import"./use-chat-layout-state-v3ZvRKOT.js";import"./toolbar-icon-button-2ueMvkvI.js";import"./resizable-a5ed0aFn.js";import"./route-page-header-Dm04mhuj.js";import"./LayoutLeft-BPF5UUkD.js";import"./task-key-BWUT6sLU.js";import"./sortable.esm-DPJjIjEU.js";import"./Tool01-Cnkd4pP7.js";import"./agent-icon-DFyNTmmD.js";import"./AlertCircle-ee1sjQGr.js";import"./UserCheck01-CcIH7s2N.js";import"./ArrowUp-DgFMMMBQ.js";import"./ArrowLeft-BhV4BHrM.js";import"./ArrowRight-3kziivNC.js";import"./BookOpen01-C9X5S-cQ.js";import"./Globe04-Cx-w92u5.js";import"./CheckCircle-CGqAjggj.js";import"./TrendUp01-BlwMDcra.js";import"./ChevronDown-CGJhfuSb.js";import"./ChevronSelectorVertical-5-TBPpUz.js";import"./ChevronUp-BO9DemUb.js";import"./UserSquare-CUb4s2-c.js";import"./LinkBroken01-BN3icH6a.js";import"./CreditCard01-BLkqiDJW.js";import"./File02-DclovfNb.js";import"./SwitchHorizontal01-CGFn_psg.js";import"./Eye-CO_nPZKQ.js";import"./Image01-CeQMNu9o.js";import"./Key01-DMjKHzPy.js";import"./Minus-DoUm1n95.js";import"./Monitor01-CM0DIJ9E.js";import"./Sun-CYr05wwt.js";import"./Play-I05hjYId.js";import"./Plus-B_KK3A4P.js";import"./SearchMd-BlPJmXQo.js";import"./ShoppingBag01-XH61oInk.js";import"./Trash01-CnPGIwZe.js";import"./Upload01-Bfre-QV-.js";import"./Users01-BaPkNO1v.js";import"./Zap-D4dSEKpa.js";import"./context-menu-77Z4mScR.js";import"./use-org-notice-Csddyapx.js";import"./create-organization-dialog-5XUNCI8z.js";import"./form-FAPXIq7O.js";import"./label-DJG2lJG2.js";import"./project-apps-DiSx-TBF.js";import"./use-recent-apps-DKTzlYg2.js";import"./use-navigate-to-agent-0LtKWlxa.js";import"./command-Dg1M4JCf.js";import"./index-BiVCuU3V.js";import"./use-debounced-value-sPPLBdJe.js";import"./feedback-BqoIMOg7.js";import"./textarea-shjcg83Q.js";import"./use-sandbox-events-DkGz3U_g.js";import"./sandbox-url-D3mC8qhT.js";import"./use-blocks-v8-project-Dq4zh0zX.js";import"./use-voice-input-ClQF7v9Y.js";import"./popover-DGvrj6fy.js";import"./drawer-DVCuatiz.js";import"./index-0S6WDYoC.js";import"./checkbox-yHZpOTt9.js";import"./select-B282Slsg.js";import"./index-BdQq_4o_.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./utils-BaccrSLZ.js";import"./sandbox-git-api-CPqBqV0G.js";import"./save-status-BXFvRkAL.js";import"./use-never-published-DCVDrsUC.js";import"./hosted-reconcile-DVbA9MCD.js";import"./blocks-tab-states-0NdQhV1f.js";import"./empty-state-B87jIRUF.js";import"./search-input-XDrQYhil.js";import"./tabs-D6Pnw7es.js";import"./active-indicator-CCMhAsc_.js";import"./use-file-configs-Df-dqKVI.js";import"./asset-utils-545UDhWA.js";import"./useInfiniteQuery-CoeKNdsU.js";import"./infiniteQueryObserver-DXDiLGwX.js";import"./usage-stats-DyR6Kq74.js";import"./utils-CVEq3hMx.js";import"./markdown-DPpPArEp.js";import"./use-copy-CQS-1CPQ.js";import"./gateway-client-BVWghiMF.js";import"./switch-CfemO1do.js";import"./toggle-group-BnrXGKKY.js";import"./match-site-slug-config-B47_xZCi.js";import"./sandbox-lifecycle-context-PaxLnfD4.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./frame-navigation-CoYMhBUE.js";import"./variant-matcher-override-3ayykvcg.js";import"./section-array-field-DRYut2dk.js";import"./use-fast-preview-draft-url-BpA0y2aq.js";import"./parse-sections-DPGRvqbM.js";import"./held-block-view-DDQtd2bN.js";import"./calendar-i6vH9oRA.js";import"./editor-classes-DlTZqfff.js";import"./empty-message-BydjGtkz.js";import"./pair-C-KXBar9.js";import"./collapsible-Dc4ca33I.js";import"./use-task-board-items-DHvwjetN.js";import"./config-CMcG5aXE.js";import"./task-route-CGCjMBBZ.js";import"./project-index-pgEW44Q9.js";import"./shell-layout-2a3HocEU.js";import"./use-deployment-admin-CTEsKWeV.js";import"./admin-fetch-BhTJlAsX.js";import"./integration-icon-Cu3N1muw.js";import"./project-icon-D6jtLreJ.js";import"./new-project-dialog-DEBFbTK4.js";import"./repository-picker-DcoNDHNX.js";import"./github-icon-KEAtk4MX.js";import"./collection-search-CWJ6AHHK.js";import"./new-project-store-CgLzwcjn.js";import"./legacy-admin-welcome-dialog-BY_2I8tZ.js";import"./required-auth-layout-coJLhqjq.js";import"./use-org-sso-DXCHIqdV.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-D-1Hpjx-.js";import"./types-Bca8rqtc.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./use-connection-wSXmVdCY.js";import"./use-mcp-prompts-XeLNsblN.js";import"./use-thread-outputs-I2kuvS72.js";import"./file-type-icon-sj_ejObJ.js";import"./named-rule-step-WtjJX5Mv.js";import"./slider-wN_aQalr.js";import"./index-CH8HRuHa.js";import"./tooltipContext-BvjdDC28.js";import"./CategoricalChart-cy5wvzih.js";import"./index-779PVYGV.js";import"./combobox-Cc5RijV8.js";import"./scroll-area-B2d6jFzS.js";import"./monaco-editor-BHpOPihN.js";import"./editor-DKlObXWN.js";import"./useQueries-Q6q16yJQ.js";import"./device-hint-BlkEtJOD.js";import"./alert-DaQbIayT.js";import"./virtual-mcp-DyF6IEhr.js";import"./url-slug-0nYVauKi.js";import"./app-preview-url-9Od4s8Sz.js";import"./agent-capabilities-CYFGwKOQ.js";import"./preview-source-BsRLGWUP.js";import"./use-task-metadata-bPw-hNrv.js";import"./delete-copy-B5PbKStF.js";import"./category-tree-CO_9m-hw.js";import"./use-move-blocks-DNt_Qh-7.js";import"./index-DAQFQP6X.js";import"./view-header-BIqV3RdZ.js";import"./use-cms-publish-actions-tt3YVYFN.js";import"./use-content-sync-BDeJ_Jgu.js";import"./use-delete-block-MPbaqrna.js";import"./item-actions-C0r-FbzQ.js";import"./date-utils-CrvIKg-s.js";import"./badge-Ba_DCLD5.js";import"./empty-state-DrDY2Uvy.js";import"./mustache-DnvmVEAI.js";import"./collection-table-wrapper-D1qYH_Vr.js";import"./table-C9du40XO.js";import"./site-draft-actions-BNgtZ_kM.js";import"./separator-C2ELigwU.js";import"./cms-store-drafts-CLXsr0b9.js";import"./serial-task-queue-CGOeQgpr.js";import"./index-CER3O-Er.js";import"./input-Do8NvE59.js";import"./icon-button-DmJB3HO5.js";import"./chat-draft-DixXhuAl.js";import"./use-deco-credits-Cd6Vxe2k.js";import"./input-CCPCHy_J.js";import"./suggestion-DWkqugbN.js";import"./use-org-fs-Dj5ea7Pp.js";import"./question-004-sINsf4GQ.js";import"./feature-paywall-CYTrb2Hp.js";import"./plan-ladder-DuXPk4c4.js";import"./add-connection-dialog-BqEJyMSP.js";import"./extract-connection-data-BBZ3NAYt.js";import"./metadata-D72DunRR.js";import"./connection-D2P4B1Vm.js";import"./connection-card-CTimlD0g.js";import"./connection-slug-CGQkx9BD.js";import"./schema-DgI3qSqy.js";import"./connection-form-helpers-C0MTL33k.js";import"./authenticate-and-persist-oauth-Cd-20mVj.js";import"./mcp-oauth-DAw9xmxO.js";import"./mcp-oauth-DMi3oCsH.js";import"./collection-tabs-CCJoVQ-t.js";import"./use-infinite-scroll-C-t0_BGl.js";import"./useSuspenseInfiniteQuery-hY0KLY7U.js";import"./save-changes-debug-nBi-n9eV.js";import"./site-draft-view-59J3TeYY.js";import"./blog-view-gate-oE1gHZMz.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 Ir(){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 Ar(){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 Dr(){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{Dr as SiteEditorContent,Ar as SiteEditorPreview,Ir as default};
|