decocms 4.594.0 → 4.594.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-kHXzu73r.js → AlertCircle-CngNmW3n.js} +1 -1
- package/dist/client/assets/{AreaChart-CJxx8aiG.js → AreaChart-w2QCUzTm.js} +1 -1
- package/dist/client/assets/{ArrowLeft-DcKid1bz.js → ArrowLeft-7wIIyF4Y.js} +1 -1
- package/dist/client/assets/{ArrowRight-ajc9j6D-.js → ArrowRight-Dyuh-rXZ.js} +1 -1
- package/dist/client/assets/{ArrowUp-CjAvmMLL.js → ArrowUp-C9hRfWJJ.js} +1 -1
- package/dist/client/assets/{BookOpen01-CdH9hkvz.js → BookOpen01-Bov9QL4X.js} +1 -1
- package/dist/client/assets/{CartesianChart-BRKqG5iH.js → CartesianChart-DZFTbe0Q.js} +1 -1
- package/dist/client/assets/{CategoricalChart-DW_7VziR.js → CategoricalChart-BJA3WMzp.js} +1 -1
- package/dist/client/assets/{CheckCircle-DG9pUM8a.js → CheckCircle-C0mDI2jO.js} +1 -1
- package/dist/client/assets/{ChevronDown-CWnE_Wmz.js → ChevronDown-Cz82ih9S.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-ByCpNum0.js → ChevronSelectorVertical-B_wf9OPd.js} +1 -1
- package/dist/client/assets/{ChevronUp-C_rAiuf1.js → ChevronUp-CLsy4_cr.js} +1 -1
- package/dist/client/assets/{CreditCard01-C6eDo3p0.js → CreditCard01-C7XdJQOf.js} +1 -1
- package/dist/client/assets/{Eye-DFeDq2Hx.js → Eye-BoMcImel.js} +1 -1
- package/dist/client/assets/{File02-R0RW2VCN.js → File02-BmbcQ1JX.js} +1 -1
- package/dist/client/assets/{Fingerprint04-D-EFj_6a.js → Fingerprint04-CeWGcIpe.js} +1 -1
- package/dist/client/assets/{Globe04-DudUQgTy.js → Globe04-_51WnfFJ.js} +1 -1
- package/dist/client/assets/{Image01-Dfaw0Ysf.js → Image01-nL5rafgN.js} +1 -1
- package/dist/client/assets/{Key01-9JQCF719.js → Key01-DPEcpDw6.js} +1 -1
- package/dist/client/assets/{LayoutLeft-B-cVGLzN.js → LayoutLeft-DFrTynS3.js} +1 -1
- package/dist/client/assets/{LinkBroken01-CpDM6pG5.js → LinkBroken01-BPaKcMJ1.js} +1 -1
- package/dist/client/assets/{MessageCircle01-44De_8cO.js → MessageCircle01-DEwhGd-N.js} +1 -1
- package/dist/client/assets/{Minus-09UkIbMe.js → Minus-CZtTY14n.js} +1 -1
- package/dist/client/assets/{Monitor01-BPQw3JGv.js → Monitor01-Dzk9r8YI.js} +1 -1
- package/dist/client/assets/{Play-BRDYCYl7.js → Play-BNkIfSsq.js} +1 -1
- package/dist/client/assets/{Plus-BJfG2DpW.js → Plus-WQeLSh07.js} +1 -1
- package/dist/client/assets/{ReferenceLine-KUFosDOj.js → ReferenceLine-Kl_nxn9t.js} +1 -1
- package/dist/client/assets/{SearchMd-DioGBYbO.js → SearchMd-CrM5HGUz.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-CdQhBv_H.js → ShoppingBag01-Dvi8noNw.js} +1 -1
- package/dist/client/assets/{Sun-U7FHkItb.js → Sun-BUSaNVU-.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-sPBj-OL8.js → SwitchHorizontal01-HaaMuIs0.js} +1 -1
- package/dist/client/assets/{Tool01-BEo5XKkS.js → Tool01-9Nk8XcOI.js} +1 -1
- package/dist/client/assets/{Tooltip-2A3BALIx.js → Tooltip--i_yceGL.js} +1 -1
- package/dist/client/assets/{Trash01-l4iOtEBN.js → Trash01-By8obgKt.js} +1 -1
- package/dist/client/assets/{TrendUp01-aviiZW6M.js → TrendUp01-D-BYwryf.js} +1 -1
- package/dist/client/assets/{Upload01-BhvyPM8u.js → Upload01-BPnZnmHF.js} +1 -1
- package/dist/client/assets/{UserCheck01-B1rJ65So.js → UserCheck01-CuByTN5F.js} +1 -1
- package/dist/client/assets/{UserSquare-D44lppb_.js → UserSquare-T90Jaoc-.js} +1 -1
- package/dist/client/assets/{Users01-CxQycal6.js → Users01-D1-vaLa3.js} +1 -1
- package/dist/client/assets/{XClose-BwokcWjs.js → XClose-Bomoew3H.js} +1 -1
- package/dist/client/assets/{Zap-DoXbwvKP.js → Zap-lo-lOcPp.js} +1 -1
- package/dist/client/assets/{access-gate-Cb6wrWbo.js → access-gate-D9gT0mCZ.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-AJ93ohYz.js → add-connection-dialog-Bn6L9Ywx.js} +1 -1
- package/dist/client/assets/agent-app-BBl0rE0n.js +1 -0
- package/dist/client/assets/{agent-assets-BjERacII.js → agent-assets-BLuZ1J0l.js} +1 -1
- package/dist/client/assets/{agent-automation-lPIiQ1-S.js → agent-automation-C0jF6GoO.js} +1 -1
- package/dist/client/assets/{agent-automations-DChAwthU.js → agent-automations-CIknlYgn.js} +1 -1
- package/dist/client/assets/agent-blog-Dz0ZGfFq.js +2 -0
- package/dist/client/assets/agent-blog-post-r0FRVJ6G.js +2 -0
- package/dist/client/assets/{agent-calendar-DVTbFVx4.js → agent-calendar-eiAtEeXX.js} +1 -1
- package/dist/client/assets/{agent-capabilities-CJLhsDjp.js → agent-capabilities-DWZ6HVp_.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-BUkRDeee.js → agent-connect-sources-tGjfqQgF.js} +1 -1
- package/dist/client/assets/agent-deck-Bhm8TGFo.js +1 -0
- package/dist/client/assets/{agent-e2e-DBAmX-ay.js → agent-e2e-ba5rV3St.js} +1 -1
- package/dist/client/assets/agent-experiments-D8dPEPBA.js +1 -0
- package/dist/client/assets/agent-file-n_x6LXzO.js +1 -0
- package/dist/client/assets/{agent-hosting-KJs4AVma.js → agent-hosting-D6vOkjJV.js} +1 -1
- package/dist/client/assets/{agent-icon-BS6RPQ_A.js → agent-icon-zvo6Zsex.js} +1 -1
- package/dist/client/assets/agent-library-BM2Fah9h.js +1 -0
- package/dist/client/assets/agent-library-file-BO40iakQ.js +1 -0
- package/dist/client/assets/agent-overview-CJRKK7hh.js +1 -0
- package/dist/client/assets/{agent-releases-BwIrRp2G.js → agent-releases-CjP_903O.js} +1 -1
- package/dist/client/assets/agent-settings-CE2XV9z9.js +1 -0
- package/dist/client/assets/{agent-site-editor-CyUzqfPD.js → agent-site-editor-CRCOwi7y.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-1w7lcxGQ.js +2 -0
- package/dist/client/assets/agent-site-editor-content-BU4N-bBf.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-D9XYlGea.js +1 -0
- package/dist/client/assets/agent-view-B4jYgL5h.js +1 -0
- package/dist/client/assets/{agent-view-guard-dXJW4cSq.js → agent-view-guard-DupPwYUR.js} +1 -1
- package/dist/client/assets/{ai-providers-CoJXv_AA.js → ai-providers-P9lSOFin.js} +1 -1
- package/dist/client/assets/{alert-hKxZXEZZ.js → alert-QfzOpdUg.js} +1 -1
- package/dist/client/assets/{analytics-sections-D8qsQ7bM.js → analytics-sections-at8BigEj.js} +1 -1
- package/dist/client/assets/api-keys-BoLbPekZ.js +1 -0
- package/dist/client/assets/{api-keys-BpcBSUmB.js → api-keys-yj-YvHdL.js} +1 -1
- package/dist/client/assets/app-editor-CALR-Eh0.js +1 -0
- package/dist/client/assets/{asset-utils-CdU3Ttfs.js → asset-utils-BDYUvtkF.js} +1 -1
- package/dist/client/assets/{auth-C3yWOKhG.js → auth--2gxCib9.js} +1 -1
- package/dist/client/assets/{auth-catchall-DheSxLuf.js → auth-catchall-BwHg1hCN.js} +1 -1
- package/dist/client/assets/{auth-entry-C5exDM0H.js → auth-entry-8MjIvWkA.js} +1 -1
- package/dist/client/assets/{auth-split-layout-Hg6hlPX8.js → auth-split-layout-DP2m0wm-.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-CIyQIb0N.js → authenticate-and-persist-oauth-GGQFCWKI.js} +1 -1
- package/dist/client/assets/{automation-list-row-BYtaYJm7.js → automation-list-row-BJoBOS8m.js} +1 -1
- package/dist/client/assets/{automation-runs-DvuKFaor.js → automation-runs-ComF4nUM.js} +1 -1
- package/dist/client/assets/{automations-D70iF6cO.js → automations-C5fxNUIr.js} +1 -1
- package/dist/client/assets/{badge-wWozseh3.js → badge-Di6qp_17.js} +1 -1
- package/dist/client/assets/{block-document-CQOXOWIP.js → block-document-D7KablrH.js} +3 -3
- package/dist/client/assets/{blocks-preview-workspace-context-BmhSK0mg.js → blocks-preview-workspace-context-JYcUL0TS.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-CDYT4Ypi.js → blocks-tab-states-D8VyxdkW.js} +1 -1
- package/dist/client/assets/blog-preview-url-DwcMPB8a.js +1 -0
- package/dist/client/assets/blog-schema-Dhm1FJA9.js +1 -0
- package/dist/client/assets/blog-source-gate-B93Jk1n3.js +1 -0
- package/dist/client/assets/{blog-view-gate-WETs9z4-.js → blog-view-gate-BDjHkxlS.js} +1 -1
- package/dist/client/assets/{buckets-BcxYNwzK.js → buckets-DAeP-NAt.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-BpGLSKmi.js → build-improve-prompt-doc-WLZ-Q0Fx.js} +1 -1
- package/dist/client/assets/{calendar-Sr3cNZGh.js → calendar-CqkLsAo9.js} +1 -1
- package/dist/client/assets/{capability-load-error-Cwe4uK-x.js → capability-load-error-j4JpxktV.js} +1 -1
- package/dist/client/assets/category-editor-BblvA1zP.js +1 -0
- package/dist/client/assets/category-tree-DSsAlLjn.js +18 -0
- package/dist/client/assets/{chart-D0It11Pz.js → chart-BZy9kWyI.js} +1 -1
- package/dist/client/assets/{chat-context-B6UvvRRf.js → chat-context-CxkYg5uT.js} +1 -1
- package/dist/client/assets/{chat-draft-D0WJnhz_.js → chat-draft-DzaoNZT_.js} +1 -1
- package/dist/client/assets/{checkbox-Cs2Li62P.js → checkbox-C-dWRGEo.js} +1 -1
- package/dist/client/assets/{choose-editor-Cwvr5cPX.js → choose-editor-DS4c61th.js} +1 -1
- package/dist/client/assets/{cli-auth-success-DjQMGZUD.js → cli-auth-success-DV77yJjs.js} +1 -1
- package/dist/client/assets/cms-settings-editor-DaqJeGro.js +1 -0
- package/dist/client/assets/{cms-store-drafts-DDk2L1_s.js → cms-store-drafts-5dkWWhlw.js} +1 -1
- package/dist/client/assets/{collapsible-D4n-ssmc.js → collapsible-BSD-rIyq.js} +1 -1
- package/dist/client/assets/{collection-detail-CWZme-FJ.js → collection-detail-wkxjhC55.js} +1 -1
- package/dist/client/assets/{collection-display-button--oxelZ8R.js → collection-display-button-JBmYQ-27.js} +1 -1
- package/dist/client/assets/{collection-search-CDDauqCr.js → collection-search-BpNjeFlC.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-B8osPBIm.js → collection-table-wrapper-BmrrNnjL.js} +1 -1
- package/dist/client/assets/{collection-tabs-B1EmRyNS.js → collection-tabs-CmuugrOY.js} +1 -1
- package/dist/client/assets/{combobox-LL4GsRoi.js → combobox-D_fSr7_C.js} +1 -1
- package/dist/client/assets/{command-DQwD4jPt.js → command-CwP4XJhp.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-aZ0yAV9m.js → companion-mcps-section-CG0lncr5.js} +1 -1
- package/dist/client/assets/{config-zmlExYow.js → config-4NBdyaeh.js} +1 -1
- package/dist/client/assets/{connect-C2FkNxOj.js → connect-ChCcHtpb.js} +1 -1
- package/dist/client/assets/{connect-key-MUQgzDUZ.js → connect-key-CJ6TvBP8.js} +1 -1
- package/dist/client/assets/{connect-layout-C10vBM31.js → connect-layout-DTpwfpPI.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-DZFw66w3.js → connect-source-dialog-_ChBZ2Vd.js} +1 -1
- package/dist/client/assets/{connection-B7vXPxEB.js → connection-DezKWiQc.js} +1 -1
- package/dist/client/assets/{connection-card-DqrVYaVF.js → connection-card-CxiJ1Nzx.js} +1 -1
- package/dist/client/assets/{connection-detail-BhmikSW0.js → connection-detail-CYCmhAUL.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-CipIPASt.js → connection-form-helpers-UXeTmEmu.js} +1 -1
- package/dist/client/assets/{connection-slug-DgGnB6qk.js → connection-slug-DWaKdRBx.js} +1 -1
- package/dist/client/assets/{connections-BH6dclGQ.js → connections-Bc9bEkOC.js} +1 -1
- package/dist/client/assets/{content-tab-CMouaD3S.js → content-tab-ChWZ09d_.js} +4 -4
- package/dist/client/assets/{context-BXIwVeKt.js → context-1XEBvNOV.js} +1 -1
- package/dist/client/assets/{context-menu-BTcjoIYF.js → context-menu-haKBWhFK.js} +1 -1
- package/dist/client/assets/{context-shell-Bh2U1zxs.js → context-shell-DApzBqkB.js} +3 -3
- package/dist/client/assets/{create-organization-dialog-Dbp2Y7NH.js → create-organization-dialog-BXvqxw2I.js} +1 -1
- package/dist/client/assets/{daily-pulse-BiRUE30R.js → daily-pulse-Dpm7YKyw.js} +1 -1
- package/dist/client/assets/{delete-copy-BH5xrx9H.js → delete-copy-L_pixdww.js} +2 -2
- package/dist/client/assets/{device-hint-CMC1mr9e.js → device-hint-DfNddHqx.js} +1 -1
- package/dist/client/assets/{discover-DN_s50Be.js → discover-CDF3_FOL.js} +1 -1
- package/dist/client/assets/{domain-settings-DBexbsXu.js → domain-settings-SR0-GydA.js} +1 -1
- package/dist/client/assets/{drawer-BMY0wk6r.js → drawer-CmJXwXhP.js} +1 -1
- package/dist/client/assets/{editor-classes-BygI_Lvg.js → editor-classes-C_k7lpha.js} +1 -1
- package/dist/client/assets/{editor-C6mSxTrt.js → editor-stZYyxdg.js} +1 -1
- package/dist/client/assets/{empty-state-C4vGG4yC.js → empty-state-BP4JRDLR.js} +1 -1
- package/dist/client/assets/{empty-state-hp9a4BQn.js → empty-state-DlNabApi.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-a808JseX.js → experiments-tab-choice-DZp7Pnbi.js} +1 -1
- package/dist/client/assets/{extract-connection-data-B_eUCQ7e.js → extract-connection-data-CzqnFJl9.js} +1 -1
- package/dist/client/assets/{feature-gate-DtqeHOu4.js → feature-gate-C_eiJnqB.js} +1 -1
- package/dist/client/assets/{feature-paywall-BGOy9Z00.js → feature-paywall-CBOn7yV2.js} +1 -1
- package/dist/client/assets/{file-explorer-q1C_0Dfl.js → file-explorer-BrZ-CG01.js} +1 -1
- package/dist/client/assets/{file-preview-Cid_-Y34.js → file-preview-PTP8hmPn.js} +1 -1
- package/dist/client/assets/{file-share-button-eK3lxbyf.js → file-share-button-BegoNidK.js} +1 -1
- package/dist/client/assets/{file-type-icon-DOJ02s9h.js → file-type-icon-M87xyG0K.js} +1 -1
- package/dist/client/assets/{folder-icon-4Pb3O8qn.js → folder-icon-Dcx7O7hC.js} +1 -1
- package/dist/client/assets/{form-BZ2nSi_9.js → form-CJTkS9yd.js} +1 -1
- package/dist/client/assets/{frame-navigation-C3j5rPCM.js → frame-navigation-BZ8W_2dq.js} +1 -1
- package/dist/client/assets/{gateway-client-8UpI_Rdq.js → gateway-client-zPU6BhGI.js} +1 -1
- package/dist/client/assets/{general-bkCbo1TA.js → general-CvWpV1rC.js} +1 -1
- package/dist/client/assets/{github-icon-C-V2EETw.js → github-icon-D3IlXxDN.js} +1 -1
- package/dist/client/assets/{held-block-view-xCVzC3Lr.js → held-block-view-CEue5DyE.js} +1 -1
- package/dist/client/assets/{home-Dgh1Wb3u.js → home-CBhOYnUz.js} +1 -1
- package/dist/client/assets/{home-overview-CzbNLHJq.js → home-overview-nMDmkNSh.js} +1 -1
- package/dist/client/assets/{hosted-reconcile-DS6ZmO5s.js → hosted-reconcile-CC64pDxA.js} +1 -1
- package/dist/client/assets/{icon-button-CFamiizZ.js → icon-button-C9InOUgM.js} +1 -1
- package/dist/client/assets/{index-B4YS6GMo.js → index-B6vsr4i3.js} +1 -1
- package/dist/client/assets/{index-BFjuxezw.js → index-B8ZkvDME.js} +1 -1
- package/dist/client/assets/{index-GMDFirHC.js → index-BIBRRoOW.js} +1 -1
- package/dist/client/assets/{index-CqlRRF6p.js → index-BPvzZzln.js} +1 -1
- package/dist/client/assets/{index-6V91lP75.js → index-C-bUN66r.js} +1 -1
- package/dist/client/assets/{index-CJQHYkKb.js → index-CY-w4kYr.js} +1 -1
- package/dist/client/assets/{index-B9tCllzH.js → index-Cdf0nHrK.js} +1 -1
- package/dist/client/assets/{index-DwIomefI.js → index-CiG92g6c.js} +1 -1
- package/dist/client/assets/{index-D_u7RJfU.js → index-CnFOA69K.js} +1 -1
- package/dist/client/assets/{index-BesTmknq.js → index-CyK1A-PV.js} +1 -1
- package/dist/client/assets/{index-D9WtqDmJ.js → index-D2FJssDQ.js} +1 -1
- package/dist/client/assets/{index-B-PIhH8l.js → index-Dy0Aphio.js} +1 -1
- package/dist/client/assets/{index-BYQu9U5P.js → index-OaQ5Wven.js} +1 -1
- package/dist/client/assets/{index-cjnTxfp5.js → index-g0fJQ3Ik.js} +1 -1
- package/dist/client/assets/{index-BeSn1lKu.js → index-hl8iFWLs.js} +1 -1
- package/dist/client/assets/{index--r4E_gW7.js → index-kPKwu4SB.js} +1 -1
- package/dist/client/assets/{index-BVZH8mqe.js → index-mb-jxjEy.js} +6 -6
- package/dist/client/assets/{index-redirect-BMGe_utm.js → index-redirect-Cc2j63PQ.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-f5kG4cIT.js → infiniteQueryObserver-Dfcni9SV.js} +1 -1
- package/dist/client/assets/{infra-billing-DaAfhBWg.js → infra-billing-BYZXmRJD.js} +1 -1
- package/dist/client/assets/{input-o0eNZBV4.js → input-BUC-cGry.js} +3 -3
- package/dist/client/assets/{input-A20A_mwu.js → input-DjfzIqsk.js} +1 -1
- package/dist/client/assets/{integration-icon-CcV5frEs.js → integration-icon-DRbGJhQo.js} +1 -1
- package/dist/client/assets/item-actions-CDU7n7Cr.js +1 -0
- package/dist/client/assets/{jira-icon-DlgPbK3F.js → jira-icon-DdgjDC_T.js} +1 -1
- package/dist/client/assets/{label-Dc_tSb6f.js → label-DFYaZzfV.js} +1 -1
- package/dist/client/assets/{layout-514nGx9I.js → layout-C1ShA0A2.js} +1 -1
- package/dist/client/assets/{legacy-admin-welcome-dialog-DtYrilLw.js → legacy-admin-welcome-dialog-C0rLwEhl.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-DS7wnjib.js → legacy-agents-deep-0KD5AZ-a.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-BQ-dfJNU.js → legacy-main-redirect-DsJJQAHz.js} +1 -1
- package/dist/client/assets/library-DKYFm9Uv.js +1 -0
- package/dist/client/assets/{library-tab-CZB0EHNl.js → library-tab-BttdbOwT.js} +1 -1
- package/dist/client/assets/{login-BVGV6SaO.js → login-DkrQRBM-.js} +1 -1
- package/dist/client/assets/{markdown-DvUyMKlV.js → markdown-B-EQMrBl.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-CRu4PbUr.js → mcp-app-renderer-B8_THT37.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CIY9YLWi.js → mcp-oauth-Cya-fh0P.js} +1 -1
- package/dist/client/assets/{mcp-oauth-NdGb5Zj9.js → mcp-oauth-_iPR8QjI.js} +1 -1
- package/dist/client/assets/{members-CgoGmOSR.js → members-BVOPoO_W.js} +1 -1
- package/dist/client/assets/{memory-BfzundeZ.js → memory-C23hLBrZ.js} +1 -1
- package/dist/client/assets/{mock-board-D8DOoo_p.js → mock-board-BcZu24PK.js} +3 -3
- package/dist/client/assets/{monaco-editor-C3D0iT4a.js → monaco-editor-DttATUsj.js} +1 -1
- package/dist/client/assets/{monitoring-BvN0RJq0.js → monitoring-CLDBgSzo.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-By2SXcyl.js → monitoring-stats-row-CRxmylqh.js} +1 -1
- package/dist/client/assets/{multi-select-Dak9eW6K.js → multi-select-CSOG3KaA.js} +1 -1
- package/dist/client/assets/{mustache-CMgVEDUc.js → mustache-clchl4ci.js} +1 -1
- package/dist/client/assets/{named-rule-step-BnN-hlGb.js → named-rule-step-C-_N0SXT.js} +1 -1
- package/dist/client/assets/{named-rule-view-hUwolemN.js → named-rule-view-DrUf_Aau.js} +1 -1
- package/dist/client/assets/{new-project-dialog-BeD2i_Hm.js → new-project-dialog-KtG8l1yi.js} +1 -1
- package/dist/client/assets/{new-project-store-BfrY24D-.js → new-project-store-DDZH8miu.js} +1 -1
- package/dist/client/assets/{oauth-callback-CNqxDLu3.js → oauth-callback-B-J4rjBS.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-0KF_xg3k.js → oauth-callback-ai-provider-DCheihxt.js} +1 -1
- package/dist/client/assets/{oauth-consent-li4JOhlZ.js → oauth-consent-P6jhSz87.js} +1 -1
- package/dist/client/assets/{onboarding-CzP4oXTn.js → onboarding-BoQQb_DJ.js} +1 -1
- package/dist/client/assets/{openai-conversation-BMsTp1zg.js → openai-conversation-BRIcN7ns.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-C29BxST1.js → optimistic-project-sidebar-views-BhBXjk9R.js} +1 -1
- package/dist/client/assets/{order-monitor-day-D910WxJ3.js → order-monitor-day-DEr2FQ1w.js} +1 -1
- package/dist/client/assets/{organization-choice-BhMXPFKX.js → organization-choice-NHrCNKHD.js} +1 -1
- package/dist/client/assets/{orgs-ZZqk-o74.js → orgs-oDKfi1NH.js} +1 -1
- package/dist/client/assets/{own-accounts-section-4_Hp7fJv.js → own-accounts-section-DfQklfiL.js} +1 -1
- package/dist/client/assets/{pair-C4tumP78.js → pair-CI1Rts6X.js} +1 -1
- package/dist/client/assets/{parse-sections-B5REiM5j.js → parse-sections-Cv7KSMgB.js} +3 -3
- package/dist/client/assets/{plan-vUNQzJtH.js → plan-DhBEXV7d.js} +1 -1
- package/dist/client/assets/{plan-ladder-BlcJL4hV.js → plan-ladder-Dn1mCpkd.js} +1 -1
- package/dist/client/assets/{plan-usage-card-DW3wLLQF.js → plan-usage-card-CoidaM8B.js} +1 -1
- package/dist/client/assets/{popover-9q-VKuQx.js → popover-D73VbCM5.js} +1 -1
- package/dist/client/assets/post-calendar-bB_dTysf.js +1 -0
- package/dist/client/assets/{post-editor-BUxXB6Uz.js → post-editor-DJgKYRYW.js} +2 -2
- package/dist/client/assets/{preview-content-aN9ghsH_.js → preview-content-g2WEpueQ.js} +1 -1
- package/dist/client/assets/{preview-dialog-DqNYRBay.js → preview-dialog-DEGn7q2O.js} +1 -1
- package/dist/client/assets/{preview-panel-DV1FaRUZ.js → preview-panel-BWh6T2ND.js} +1 -1
- package/dist/client/assets/preview-tab-BFrQickY.js +557 -0
- package/dist/client/assets/primitives-BHTaKbue.js +1 -0
- package/dist/client/assets/{product-picker-dialog-DVs_Kuee.js → product-picker-dialog-B1FnNY41.js} +1 -1
- package/dist/client/assets/{profile-DbdvfkDI.js → profile-KHrko28l.js} +1 -1
- package/dist/client/assets/{project-app-view-Cfrp6muY.js → project-app-view-CEsZ7pyQ.js} +1 -1
- package/dist/client/assets/{project-apps-z0dBtbP_.js → project-apps-BFfwYw5p.js} +1 -1
- package/dist/client/assets/{project-icon-C8Sq9Uyo.js → project-icon-Bl4IAncl.js} +1 -1
- package/dist/client/assets/{project-index-BOyydKXT.js → project-index-DyqPLhTf.js} +1 -1
- package/dist/client/assets/project-reports-Bo9Tf1zF.js +1 -0
- package/dist/client/assets/project-tasks-t-YvuQ_q.js +1 -0
- package/dist/client/assets/{projects-B5BvS56N.js → projects-D4oIfDMZ.js} +1 -1
- package/dist/client/assets/{projects-empty-state-CDTj5tcd.js → projects-empty-state-PFeDurZg.js} +1 -1
- package/dist/client/assets/{prompts-DfS9pOYH.js → prompts-TmqmoJme.js} +1 -1
- package/dist/client/assets/record-editor-WmiU2d6T.js +1 -0
- package/dist/client/assets/redirect-editor-BlBcxP_z.js +1 -0
- package/dist/client/assets/reports-Cb0Mwz-u.js +1 -0
- package/dist/client/assets/{reports-C624VFLj.js → reports-DxGhEr3Y.js} +1 -1
- package/dist/client/assets/{reports-onboarding-_pxt1WkF.js → reports-onboarding-CM7YPxA7.js} +1 -1
- package/dist/client/assets/{reports-tab-BBmHq9vJ.js → reports-tab-DLrLzkx3.js} +2 -2
- package/dist/client/assets/{repositories-B7d9yCxo.js → repositories-67wiZj2r.js} +1 -1
- package/dist/client/assets/repositories-CDNeFlHK.js +1 -0
- package/dist/client/assets/{repository-binding-BIfwJXBl.js → repository-binding-w-FCDYuS.js} +1 -1
- package/dist/client/assets/{repository-picker-vN0XhyKR.js → repository-picker-DF0-TGsg.js} +1 -1
- package/dist/client/assets/{require-capability-B6_v4BKo.js → require-capability-7Xn2Fb3C.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BXbkUsYd.js → required-auth-layout-B1owCwtw.js} +1 -1
- package/dist/client/assets/{reset-password-DPvgQ5Qd.js → reset-password-BvZRYC01.js} +1 -1
- package/dist/client/assets/{resizable-AytQ6SyX.js → resizable-CJbr1Nyi.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-BzV0wsYq.js → resolve-tab-icon-3aZJM1BR.js} +1 -1
- package/dist/client/assets/{review-settings-BTg5QElS.js → review-settings-CISstknV.js} +1 -1
- package/dist/client/assets/{role-color-CNGxunw8.js → role-color-CW1lGNZj.js} +1 -1
- package/dist/client/assets/{roles-DrWSfOhb.js → roles-D7rYnEMh.js} +1 -1
- package/dist/client/assets/route-CFBPrBcw.js +1 -0
- package/dist/client/assets/{route-BX1VK4D8.js → route-CPaIZZ88.js} +1 -1
- package/dist/client/assets/{route-IYkPM4iL.js → route-CT0-z-8-.js} +1 -1
- package/dist/client/assets/{route-page-header-DnxbH76I.js → route-page-header-CRzmHOKm.js} +1 -1
- package/dist/client/assets/{sandbox-git-api-CvJPOlyv.js → sandbox-git-api-1xYJwdHB.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-CO9pd80k.js → sandbox-lifecycle-context-CxRkhFod.js} +1 -1
- package/dist/client/assets/{save-status-eUv6TQpr.js → save-status-Csuo4rYY.js} +1 -1
- package/dist/client/assets/{schema-C2ft4i4u.js → schema-BluyjH2z.js} +1 -1
- package/dist/client/assets/{schema-CATZG76m.js → schema-DU3GC-Ez.js} +1 -1
- package/dist/client/assets/{scroll-area-w9_Bvwmf.js → scroll-area-D9mVov2B.js} +1 -1
- package/dist/client/assets/{search-input-D3b0Dc5Y.js → search-input-D-gp-h4P.js} +1 -1
- package/dist/client/assets/{search-toggle-DBEAkZhz.js → search-toggle-C1j-Ki1u.js} +1 -1
- package/dist/client/assets/{secret-picker-CVfi84wZ.js → secret-picker-BoQX39kK.js} +1 -1
- package/dist/client/assets/{secrets-Bxh8ZQN1.js → secrets-BZwPjTxC.js} +1 -1
- package/dist/client/assets/section-array-field-4siTAXTX.js +1 -0
- package/dist/client/assets/{sections-BS4WKjIk.js → sections-Cwqt7k6K.js} +1 -1
- package/dist/client/assets/sections-editor-B2wYNbjz.js +1 -0
- package/dist/client/assets/{select-BJ7g3jt1.js → select-DnlDCB9E.js} +1 -1
- package/dist/client/assets/{select-model-CIoiyBbQ.js → select-model-Cm1Kbu8h.js} +1 -1
- package/dist/client/assets/seo-editor-DbLTH9Vw.js +1 -0
- package/dist/client/assets/{separator-DUnD5wBI.js → separator-DsSANYB0.js} +1 -1
- package/dist/client/assets/{session-runtime-CRv5j4jh.js → session-runtime-D2GKulko.js} +1 -1
- package/dist/client/assets/settings-tab-CSzHYez6.js +1 -0
- package/dist/client/assets/{sheet-B1zTFenO.js → sheet-Ctckoytn.js} +1 -1
- package/dist/client/assets/{shell-layout-BT6RZJ9X.js → shell-layout-BS_Y65pV.js} +1 -1
- package/dist/client/assets/{site-draft-actions-BhvNLFOt.js → site-draft-actions-BZf0yVqo.js} +1 -1
- package/dist/client/assets/{site-draft-view-D89p35uK.js → site-draft-view-NypTEK1x.js} +1 -1
- package/dist/client/assets/site-editor-BbPLQWC_.js +1 -0
- package/dist/client/assets/{site-editor-toast-vvVLBG6s.js → site-editor-toast-DfzFv4iY.js} +1 -1
- package/dist/client/assets/{skills-C22XOkU8.js → skills-2_Ugx28k.js} +1 -1
- package/dist/client/assets/{slider-46E0vJw8.js → slider-Bqy5W8RM.js} +1 -1
- package/dist/client/assets/{sortable.esm-BzU9NXcP.js → sortable.esm-Cl-YQgc8.js} +1 -1
- package/dist/client/assets/{sso-zNrVMXEh.js → sso-CdbJh-Eu.js} +1 -1
- package/dist/client/assets/{suggestion-B9N6oqkG.js → suggestion-BoV2NIg6.js} +1 -1
- package/dist/client/assets/{super-agent-icon-AyK0wzxQ.js → super-agent-icon-CDA5EiNS.js} +1 -1
- package/dist/client/assets/{switch-BX8b8tB6.js → switch--3C-A5oU.js} +1 -1
- package/dist/client/assets/{synced-repos-DS_Rsdst.js → synced-repos-BpiKoBMD.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-DpR7ri7q.js → tab-icon-glyph-CEoTzCNL.js} +1 -1
- package/dist/client/assets/{table-DNvSx4nT.js → table-Cy5fo0ER.js} +1 -1
- package/dist/client/assets/{tabs-ClkuSww4.js → tabs-DJ6SkMve.js} +1 -1
- package/dist/client/assets/{task-board-DLNmAHmR.js → task-board-CShHcm1L.js} +1 -1
- package/dist/client/assets/{task-key-BjUMQvHV.js → task-key-BP2--GY6.js} +1 -1
- package/dist/client/assets/{task-route-B6gZ9LxC.js → task-route-BDNP9yC7.js} +1 -1
- package/dist/client/assets/{task-status-CvKutQFi.js → task-status-GPS8HLw1.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-BgegxTfw.js → taskboard-analytics-DPlKE9oq.js} +1 -1
- package/dist/client/assets/tasks-Coh8-0jv.js +1 -0
- package/dist/client/assets/{tasks-VtqJyf5J.js → tasks-DQ5zrDt3.js} +1 -1
- package/dist/client/assets/{textarea-BnYcD_gb.js → textarea-BCGFjA5F.js} +1 -1
- package/dist/client/assets/{thread-analytics-CHgBpfHv.js → thread-analytics-B5IqH-5A.js} +1 -1
- package/dist/client/assets/{thread-button-Cra7mRSW.js → thread-button-Dw70OEJl.js} +1 -1
- package/dist/client/assets/{thread-intent-CYNXEfHP.js → thread-intent-BQWCtBA_.js} +1 -1
- package/dist/client/assets/{thread-route-muzc431X.js → thread-route-DRsKlO-E.js} +1 -1
- package/dist/client/assets/{thread-route-D00Shirq.js → thread-route-Dix8r-rB.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-B4d3KSH7.js → thread-sheet-body-iwOtv26B.js} +1 -1
- package/dist/client/assets/{time-range-picker-BzLGuV9Q.js → time-range-picker-CUAzqD4s.js} +1 -1
- package/dist/client/assets/{toggle-group-Cu3LE1oL.js → toggle-group-jkikwCcL.js} +1 -1
- package/dist/client/assets/{tool-set-selector-DpIP2fev.js → tool-set-selector-Clh56c6v.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-Bo8OSaqx.js → toolbar-icon-button-DcIFSTOI.js} +1 -1
- package/dist/client/assets/{tooltip-CfeBMv8z.js → tooltip-DCzbfwd7.js} +1 -1
- package/dist/client/assets/{tooltipContext-BMU8k-Rs.js → tooltipContext-2wUW4UR-.js} +1 -1
- package/dist/client/assets/{track-DWmwuKVj.js → track-D4IkVAbh.js} +1 -1
- package/dist/client/assets/{types-D_vNw-3-.js → types-BQYXFpO6.js} +1 -1
- package/dist/client/assets/{url-slug-BOPVIawN.js → url-slug-E3otz4_J.js} +1 -1
- package/dist/client/assets/{usage-stats-Dzci2XGy.js → usage-stats-CiB8uQLm.js} +1 -1
- package/dist/client/assets/{use-ai-providers-C30oeluP.js → use-ai-providers-CTbi7eSd.js} +1 -1
- package/dist/client/assets/{use-api-keys-CK1ZH-th.js → use-api-keys-CuxnpyDB.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule-DGYGOn-1.js → use-apply-named-rule-BroFciug.js} +1 -1
- package/dist/client/assets/use-ask-in-chat-vlpFfAp7.js +1 -0
- package/dist/client/assets/{use-automations-CtbjaE6m.js → use-automations-BdniAcmH.js} +1 -1
- package/dist/client/assets/{use-autosave-Bpr4B2YO.js → use-autosave-C9MsBAi1.js} +1 -1
- package/dist/client/assets/use-blocks-v8-project-BloQ91Xb.js +1 -0
- package/dist/client/assets/use-blog-view-Bi3aoju6.js +1 -0
- package/dist/client/assets/{use-chat-layout-state-DBVzfsNg.js → use-chat-layout-state-77HNlix_.js} +1 -1
- package/dist/client/assets/{use-cms-publish-actions-CWkUAckV.js → use-cms-publish-actions-DGO40mZ2.js} +1 -1
- package/dist/client/assets/{use-connect-companion-iGJRty2G.js → use-connect-companion-BkEQhdBC.js} +1 -1
- package/dist/client/assets/{use-connection-C-m8b2Fk.js → use-connection-DxwzNo03.js} +1 -1
- package/dist/client/assets/{use-content-sync-BJ7PE3PC.js → use-content-sync-C9H2kDwl.js} +1 -1
- package/dist/client/assets/{use-copy-BHPkBnZF.js → use-copy-DSNmvH9L.js} +1 -1
- package/dist/client/assets/{use-current-view-CHhVzMwk.js → use-current-view-DvszbK0Z.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-Cn791fqZ.js → use-date-fns-locale-BSsydU_s.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-C6OCZte6.js → use-debounced-autosave-D6iRm-Vv.js} +1 -1
- package/dist/client/assets/{use-debounced-value-By7KggQt.js → use-debounced-value-CAOKwJaL.js} +1 -1
- package/dist/client/assets/{use-deco-credits-19cW8oHb.js → use-deco-credits-DnZKzVHP.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-BxfGa0_j.js → use-decopilot-events-BhcT5RAV.js} +1 -1
- package/dist/client/assets/{use-delete-block-3AD9rKWc.js → use-delete-block-Bd0Db3-p.js} +1 -1
- package/dist/client/assets/{use-delete-connection-Cma0d5Z7.js → use-delete-connection-BMDl_PP-.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-COmgwPUq.js → use-deployment-admin-DCWHLNad.js} +1 -1
- package/dist/client/assets/{use-entitlements-B8D7pawV.js → use-entitlements-CzwT7L5B.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-BQhDGlp9.js → use-fast-preview-draft-url-DbEjmD3f.js} +1 -1
- package/dist/client/assets/{use-file-configs-CCo70YSN.js → use-file-configs-yKe4yLHn.js} +1 -1
- package/dist/client/assets/{use-id-selection-BOT74h8X.js → use-id-selection-DmcvY3GI.js} +1 -1
- package/dist/client/assets/{use-in-settings-qQ2sbeu5.js → use-in-settings-BTBVzmbg.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-CIBoyRh8.js → use-inbox-feed-BOy7gIMv.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-Ct_PbHT3.js → use-infinite-scroll-DnhPBPks.js} +1 -1
- package/dist/client/assets/{use-join-requests-CbaI0xCz.js → use-join-requests-C0zVtdAh.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-CPcNwsEn.js → use-main-panel-tabs-BCg6GLFm.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-BfHI4tpd.js → use-mcp-auth-status-BZRJODR4.js} +1 -1
- package/dist/client/assets/{use-mcp-client-7NPwItGN.js → use-mcp-client-4k5JKqzF.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-C7QHdaI_.js → use-mcp-prompts-pJuJ9yii.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DqnFukoV.js → use-mcp-tools-Dh4scI4V.js} +1 -1
- package/dist/client/assets/{use-mobile-5e0sSd3X.js → use-mobile-CBwmaBFU.js} +1 -1
- package/dist/client/assets/{use-move-blocks-Cqt9Q8CZ.js → use-move-blocks-D8MFSTf7.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-CtsEyeFb.js → use-navigate-to-agent-H87rWFYJ.js} +1 -1
- package/dist/client/assets/{use-never-published-BK3TeRer.js → use-never-published-Db-SviVk.js} +1 -1
- package/dist/client/assets/{use-org-fs-Cq9dcDh3.js → use-org-fs-CbXrwKDd.js} +1 -1
- package/dist/client/assets/{use-org-notice-Dvph2j3S.js → use-org-notice-BLDWm2ef.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-CCuZhNZU.js → use-org-repo-syncs-BLfbsB0Y.js} +1 -1
- package/dist/client/assets/{use-org-sso-BKXSOEb_.js → use-org-sso-Cfy5SkJ5.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BoOQOwrg.js → use-organization-settings-UrGbnM2k.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-DPGDB1T1.js → use-panel-navigate-B5u6ws6M.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-SSp2DD_u.js → use-project-native-view-presence-Cww1Huve.js} +1 -1
- package/dist/client/assets/{use-project-scope-BIucgFKc.js → use-project-scope-Dydp2D08.js} +1 -1
- package/dist/client/assets/{use-recent-apps-4zSmjU-Q.js → use-recent-apps-B6ojF6fA.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-DWL8tyP6.js → use-reports-diagnostic-EfyKTU1j.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-TxpzU2Iw.js → use-sandbox-events-DEHux0gs.js} +1 -1
- package/dist/client/assets/{use-secrets-CsCKmxLc.js → use-secrets-G3Yo5eAI.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-BxFRvYUl.js → use-section-preview-base-C2ASOAPw.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-DHFFs76T.js → use-sidebar-collapsed-DgMGLJyh.js} +1 -1
- package/dist/client/assets/{use-tags-aDaEeB96.js → use-tags-laGjgQqt.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-XXuDuH8s.js → use-task-board-analytics-Ct6FAXeB.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-CLDgREI3.js → use-task-board-item-prs-BbVn1nYd.js} +1 -1
- package/dist/client/assets/{use-task-board-items-D4fdH47R.js → use-task-board-items-B_EMxvU9.js} +1 -1
- package/dist/client/assets/{use-task-board-prompts-DRYQb2DR.js → use-task-board-prompts-CE2PVOHH.js} +1 -1
- package/dist/client/assets/{use-task-metadata-CSvrbSt0.js → use-task-metadata-L0GKyc-x.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-CrNLjxTt.js → use-thread-outputs-B9502nWa.js} +1 -1
- package/dist/client/assets/{use-view-draft-kind-BG3Ihm6n.js → use-view-draft-kind-CZT4hOaN.js} +1 -1
- package/dist/client/assets/{use-voice-input-BspgCDOI.js → use-voice-input-Nzha8Za1.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-FxnnBp9W.js +1 -0
- package/dist/client/assets/{useQueries-DGhxO9Ry.js → useQueries-CQ0xJF7W.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CtWAJlQZ.js +1 -0
- package/dist/client/assets/{users-CC1uXfIH.js → users-C_-sgV42.js} +1 -1
- package/dist/client/assets/{utils-JVZxV40b.js → utils-pe9cqItP.js} +1 -1
- package/dist/client/assets/{variant-calendar-COAsXla8.js → variant-calendar-d5m67-k3.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-Dm9kjKRy.js → variant-matcher-override-DoPQRIHU.js} +1 -1
- package/dist/client/assets/{view-header-d4Obd__T.js → view-header-B0xV_oWh.js} +1 -1
- package/dist/client/assets/{virtual-mcp-TQWeP4ry.js → virtual-mcp-DN6fu9Nf.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-CWcYbOm5.js → watch-sse-pool-7J-tc7Ge.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-BwabK-EN.js +0 -1
- package/dist/client/assets/agent-blog-BAFEHC3F.js +0 -2
- package/dist/client/assets/agent-blog-post-BfZLJHCc.js +0 -2
- package/dist/client/assets/agent-deck-FkIcljPu.js +0 -1
- package/dist/client/assets/agent-experiments-DDePdz1s.js +0 -1
- package/dist/client/assets/agent-file-Dq7RwOoN.js +0 -1
- package/dist/client/assets/agent-library-C06De_Om.js +0 -1
- package/dist/client/assets/agent-library-file-DZtwB2bP.js +0 -1
- package/dist/client/assets/agent-overview-3kq8I1YX.js +0 -1
- package/dist/client/assets/agent-settings-CQxH-SU4.js +0 -1
- package/dist/client/assets/agent-site-editor-code-lMnnKFV4.js +0 -2
- package/dist/client/assets/agent-site-editor-content-BQ-pFVV_.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-Dipnwf9A.js +0 -1
- package/dist/client/assets/agent-view-D74Nsx4n.js +0 -1
- package/dist/client/assets/api-keys-B9w3P2co.js +0 -1
- package/dist/client/assets/app-editor-DLwnlaqE.js +0 -1
- package/dist/client/assets/blog-preview-url-D1Gi50Jy.js +0 -1
- package/dist/client/assets/blog-schema-G_pvuSAo.js +0 -1
- package/dist/client/assets/blog-source-gate-Z08IMogx.js +0 -1
- package/dist/client/assets/category-editor-DZLdQENU.js +0 -1
- package/dist/client/assets/category-tree-oBVfCVRR.js +0 -4
- package/dist/client/assets/cms-settings-editor-h4wDmiSv.js +0 -1
- package/dist/client/assets/empty-message-B3ykEghT.js +0 -15
- package/dist/client/assets/item-actions-CZD9JeRy.js +0 -1
- package/dist/client/assets/library-Cy3CmAZa.js +0 -1
- package/dist/client/assets/post-calendar-Cw6GB31X.js +0 -1
- package/dist/client/assets/preview-tab-CNYeoSqY.js +0 -557
- package/dist/client/assets/project-reports-CN1JvK97.js +0 -1
- package/dist/client/assets/project-tasks-Cimkg6Js.js +0 -1
- package/dist/client/assets/record-editor-BC_pgxjj.js +0 -1
- package/dist/client/assets/redirect-editor-CJJivlqw.js +0 -1
- package/dist/client/assets/reports-BU9i6BvT.js +0 -1
- package/dist/client/assets/repositories-D-ngJeYU.js +0 -1
- package/dist/client/assets/route-DxNP7FKc.js +0 -1
- package/dist/client/assets/section-array-field-CkDPdYBe.js +0 -1
- package/dist/client/assets/sections-editor-CLaZ0j6X.js +0 -1
- package/dist/client/assets/seo-editor-C5CvtZIp.js +0 -1
- package/dist/client/assets/settings-tab-k_yzR7TC.js +0 -1
- package/dist/client/assets/site-editor-DO2-FIjd.js +0 -1
- package/dist/client/assets/tasks-BZlAEaTY.js +0 -1
- package/dist/client/assets/use-ask-in-chat-Cp6wJI2T.js +0 -1
- package/dist/client/assets/use-blocks-v8-project-DUe21BCo.js +0 -1
- package/dist/client/assets/use-blog-view-D_--u8j_.js +0 -1
- package/dist/client/assets/useInfiniteQuery-BJoJv4VQ.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BFQG7J82.js +0 -1
package/dist/client/assets/{site-draft-actions-BhvNLFOt.js → site-draft-actions-BZf0yVqo.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as $,b as xe,r as U,j as r,B as ge,m as H,K as xs,an as Ha,t as at,eN as Va,au as Pr,dN as Sr,Y as ms,dO as Ga,aJ as Ns,aK as Cs,aL as As,aM as Js,b9 as Ws,aN as Rs,aO as Ds,aP as Ts,X as tn,Z as sn,_ as nn,a as rn,a6 as Is,b_ as Ja,h as ps,eO as kr,eP as Nr,eQ as Sn,bz as Wa,bo as Qa,bt as Zn,eR as Xa,ao as Ya,I as Za,a9 as el,eS as tl,V as Cr,i as gt,eK as kn,q as Ar,J as Rr,D as Dr,x as Tr,v as Br,Q as Ir,R as $r,aX as sl,ba as Fr,a7 as Nn,b6 as Cn,e as er,E as nl,T as rl}from"./index-BVZH8mqe.js";import{S as al}from"./separator-DUnD5wBI.js";import{f as ll,u as vs,r as Or,l as Lr,c as Mr,b as il}from"./chat-context-B6UvvRRf.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-vvVLBG6s.js";import{L as bl}from"./use-org-notice-Dvph2j3S.js";import{I as Kr}from"./toolbar-icon-button-Bo8OSaqx.js";import{b as gl,P as xl,a as vl}from"./popover-9q-VKuQx.js";import{c as lt,T as it,a as ot,b as an}from"./tooltip-CfeBMv8z.js";import{f as yl,a as jl,c as wl,C as tr,e as sr,b as nr}from"./command-DQwD4jPt.js";import{T as Ot,a as qr,b as Hr}from"./tabs-ClkuSww4.js";import{t as Vr}from"./ChevronDown-CWnE_Wmz.js";import{b as Pl}from"./UserCheck01-B1rJ65So.js";import{K as Gr,ab as ln,a as Jr,F as Sl,b as kl,ac as Wr}from"./agent-icon-BS6RPQ_A.js";import{a as Qr}from"./SwitchHorizontal01-sPBj-OL8.js";import{b as Xr}from"./Tool01-BEo5XKkS.js";import{s as Yr}from"./Plus-BJfG2DpW.js";import{s as on}from"./Trash01-l4iOtEBN.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-BG3Ihm6n.js";import{u as Bn}from"./use-blog-view-D_--u8j_.js";import{u as ys}from"./use-voice-input-BspgCDOI.js";import{b as Rl,d as ta}from"./session-runtime-CRv5j4jh.js";import{h as sa,r as na,b as $s,g as Dl,e as ze,f as ra}from"./repository-binding-BIfwJXBl.js";import{u as Tl}from"./use-debounced-value-By7KggQt.js";import{a as Bl,u as Il}from"./shell-layout-BT6RZJ9X.js";import{u as $l}from"./useInfiniteQuery-BJoJv4VQ.js";import{d as Fl,b as Ol,p as Ll,e as aa,g as la,h as ia}from"./use-navigate-to-agent-CtsEyeFb.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-DDk2L1_s.js";import{e as ql,g as Hl,f as In}from"./thread-intent-CYNXEfHP.js";import{a as Qs}from"./virtual-mcp-TQWeP4ry.js";import{u as $n}from"./use-blocks-v8-project-DUe21BCo.js";import{G as ca}from"./github-icon-C-V2EETw.js";import{k as Vl,r as Gl,c as da,u as Jl}from"./use-sandbox-events-TxpzU2Iw.js";import{a as Wl,b as Ql}from"./use-fast-preview-draft-url-BQhDGlp9.js";import{a3 as hs,a4 as ua,z as Xs,o as Fn,a5 as Xl,a6 as Yl,E as Zl,a7 as ei,a8 as ti,p as si,W as At,f as On,a9 as ni}from"./blocks-tab-states-CDYT4Ypi.js";import"./index-D_u7RJfU.js";import{T as ri}from"./textarea-BnYcD_gb.js";import{i as Ln}from"./CheckCircle-DG9pUM8a.js";import{s as Ys}from"./Eye-DFeDq2Hx.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-CWkUAckV.js";import{a as pi,h as bi}from"./UserSquare-D44lppb_.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-CvJPOlyv.js";import{a as Ai,g as Ri}from"./utils-JVZxV40b.js";import{i as Di}from"./Monitor01-BPQw3JGv.js";import{w as Kn,R as pa}from"./device-hint-CMC1mr9e.js";import{w as rr}from"./editor-C6mSxTrt.js";import{i as Ti,C as Bi}from"./section-array-field-CkDPdYBe.js";import{T as Ii,a as ar}from"./toggle-group-Cu3LE1oL.js";import{s as ba}from"./save-changes-debug-nBi-n9eV.js";import{u as $i}from"./use-mcp-client-7NPwItGN.js";import{t as Fi}from"./MessageCircle01-44De_8cO.js";import{b as Oi,a as Li}from"./sandbox-lifecycle-context-CO9pd80k.js";import{b as Mi}from"./agent-capabilities-CJLhsDjp.js";import{c as _i}from"./thread-route-muzc431X.js";function Ei(t){const{value:e,baseBranch:s,releases:a,baseIsDraft:n=!1,storeDrafts:o=[]}=t,d=!n&&!!e&&e===s,l=a.find(c=>c.branch===e),i=d||l?void 0:o.find(c=>c.name===e),u=!d&&!l&&!i&&!!e;return i?{isBase:d,current:l,storeDraft:i,unlisted:u}:{isBase:d,current:l,unlisted:u}}const zi={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" "},lr=1114111;function ir(t){return t?t.replace(/&(#x?[0-9a-fA-F]+|[a-zA-Z]+);/g,(e,s)=>{if(s.startsWith("#x")||s.startsWith("#X")){const a=Number.parseInt(s.slice(2),16);return!Number.isFinite(a)||a>lr?e:String.fromCodePoint(a)}if(s.startsWith("#")){const a=Number.parseInt(s.slice(1),10);return!Number.isFinite(a)||a>lr?e:String.fromCodePoint(a)}return zi[s]??e}):""}function Ui(t){const e=$.c(39),{url:s,onSave:a}=t,n=xe(),[o,d]=U.useState(s??"");let l;e[0]!==o?(l=o.trim(),e[0]=o,e[1]=l):l=e[1];const i=l;let u;e[2]!==a||e[3]!==i?(u=()=>a(i?Rl(i):null),e[2]=a,e[3]=i,e[4]=u):u=e[4];const c=u;let h;e[5]!==n?(h=n("thread.branchPicker.localHint"),e[5]=n,e[6]=h):h=e[6];let p;e[7]!==h?(p=r.jsx("p",{className:"text-xs text-muted-foreground",children:h}),e[7]=h,e[8]=p):p=e[8];let b;e[9]!==n?(b=n("thread.branchPicker.localUrlLabel"),e[9]=n,e[10]=b):b=e[10];let f;e[11]!==n?(f=n("thread.branchPicker.localUrlPlaceholder"),e[11]=n,e[12]=f):f=e[12];let m;e[13]===Symbol.for("react.memo_cache_sentinel")?(m=C=>d(C.target.value),e[13]=m):m=e[13];let g;e[14]!==c||e[15]!==i?(g=C=>{C.key==="Enter"&&i&&c()},e[14]=c,e[15]=i,e[16]=g):g=e[16];let v;e[17]!==b||e[18]!==f||e[19]!==g||e[20]!==o?(v=r.jsx("input",{type:"url",inputMode:"url","aria-label":b,placeholder:f,value:o,onChange:m,onKeyDown:g,className:"h-8 w-full rounded-md border bg-transparent px-2 text-sm focus-ring"}),e[17]=b,e[18]=f,e[19]=g,e[20]=o,e[21]=v):v=e[21];let j;e[22]!==a||e[23]!==n||e[24]!==s?(j=s?r.jsx(ge,{variant:"ghost",size:"sm",className:"text-xs text-destructive hover:text-destructive",onClick:()=>a(null),children:n("thread.branchPicker.localTurnOff")}):r.jsx("span",{}),e[22]=a,e[23]=n,e[24]=s,e[25]=j):j=e[25];const w=!i;let x;e[26]!==n?(x=n("thread.branchPicker.save"),e[26]=n,e[27]=x):x=e[27];let P;e[28]!==c||e[29]!==w||e[30]!==x?(P=r.jsx(ge,{size:"sm",disabled:w,onClick:c,children:x}),e[28]=c,e[29]=w,e[30]=x,e[31]=P):P=e[31];let y;e[32]!==j||e[33]!==P?(y=r.jsxs("div",{className:"flex items-center justify-between gap-2",children:[j,P]}),e[32]=j,e[33]=P,e[34]=y):y=e[34];let N;return e[35]!==y||e[36]!==p||e[37]!==v?(N=r.jsxs("div",{className:"flex flex-col gap-2 p-2",children:[p,v,y]}),e[35]=y,e[36]=p,e[37]=v,e[38]=N):N=e[38],N}function Ki(t){const e=$.c(8),{virtualMcpId:s,branch:a,serve:n,rowRef:o,onPicked:d}=t,l=Mt(s,a),i=!!n.connection,u=i&&l.kind==="protocol"&&l.source==="local";let c;e[0]!==d||e[1]!==n?(c=()=>qi(n,d),e[0]=d,e[1]=n,e[2]=c):c=e[2];let h;return e[3]!==o||e[4]!==i||e[5]!==u||e[6]!==c?(h=r.jsx(Hi,{rowRef:o,selected:i,connected:u,onSelect:c}),e[3]=o,e[4]=i,e[5]=u,e[6]=c,e[7]=h):h=e[7],h}function qi(t,e){e?.(),!t.connection&&t.set({endpoint:t.lastEndpoint??ol})}function Hi(t){const e=$.c(19),{rowRef:s,selected:a,connected:n,onSelect:o}=t,d=xe(),l=a?"bg-accent":"hover:bg-accent";let i;e[0]!==l?(i=H("flex rounded-lg",l),e[0]=l,e[1]=i):i=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=r.jsx("span",{"data-testid":"localhost-dot",className:"h-2 w-2 shrink-0 rounded-full bg-foreground"}),e[2]=u):u=e[2];let c;e[3]!==d?(c=d("thread.branchPicker.localhost.label"),e[3]=d,e[4]=c):c=e[4];let h;e[5]!==c?(h=r.jsx("span",{className:"min-w-0 flex-1 truncate",children:c}),e[5]=c,e[6]=h):h=e[6];let p;e[7]!==n||e[8]!==d?(p=n&&r.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:d("thread.branchPicker.localhost.connected")}),e[7]=n,e[8]=d,e[9]=p):p=e[9];let b;e[10]!==o||e[11]!==a||e[12]!==h||e[13]!==p?(b=r.jsxs("button",{type:"button","aria-pressed":a,onClick:o,className:"flex w-full min-w-0 items-center gap-2.5 px-2 py-2 text-left text-sm",children:[u,h,p]}),e[10]=o,e[11]=a,e[12]=h,e[13]=p,e[14]=b):b=e[14];let f;return e[15]!==s||e[16]!==i||e[17]!==b?(f=r.jsx("div",{ref:s,className:i,children:b}),e[15]=s,e[16]=i,e[17]=b,e[18]=f):f=e[18],f}const Vi=10080*60*1e3;function Gi({sandboxMap:t,userId:e,rawBranches:s,now:a}){const n=new Map;for(const[h,p]of Object.entries(t??{}))for(const[b,f]of Object.entries(p??{})){let m=n.get(b);m||(m={userIds:new Set,lastActiveAt:0},n.set(b,m)),m.userIds.add(h);for(const g of Object.values(f??{})){const v=g?.createdAt??0;v>m.lastActiveAt&&(m.lastActiveAt=v)}}const o=a-Vi,d=[...n.entries()].filter(([,h])=>h.lastActiveAt>=o).sort((h,p)=>p[1].lastActiveAt-h[1].lastActiveAt).map(([h,p])=>({name:h,source:"recent",contributors:[...p.userIds],lastActiveAt:p.lastActiveAt})),l=new Set(d.map(h=>h.name)),i=new Set(Object.keys(t?.[e]??{})),u=[...i].filter(h=>!l.has(h)).sort().map(h=>({name:h,source:"yours"})),c=s.filter(h=>!i.has(h.name)&&!l.has(h.name)).map(h=>({name:h.name,source:"other",author:h.author??null}));return{recent:d,yours:u,others:c}}const Ji=100,Wi=50,Qi=300;function vn(t,e){const s=e.trim().toLowerCase();return s?t.toLowerCase().includes(s):!0}function Xi(t){const e=$.c(39),{orgId:s,orgSlug:a,userId:n,target:o,sandboxMap:d,owner:l,repo:i,search:u,enabled:c}=t,h=u===void 0?"":u,p=c===void 0?!0:c;let b;e[0]!==h?(b=h.trim(),e[0]=h,e[1]=b):b=e[1];const f=b,m=Tl(f,Qi);let g;e[2]!==o?(g=sa(o),e[2]=o,e[3]=g):g=e[3];const v=g,j=f.length>0;let w;e[4]!==m||e[5]!==s||e[6]!==a||e[7]!==l||e[8]!==i||e[9]!==o?(w=xs.githubBranchSearch(s,a,na(o),l,i,m),e[4]=m,e[5]=s,e[6]=a,e[7]=l,e[8]=i,e[9]=o,e[10]=w):w=e[10];const x=p&&v;let P;e[11]!==m||e[12]!==a||e[13]!==o?(P=T=>{const{pageParam:ee}=T;return Ha(a,"REPOSITORY_SEARCH_BRANCHES",{...o,query:m,limit:m?Wi:Ji,cursor:ee})},e[11]=m,e[12]=a,e[13]=o,e[14]=P):P=e[14];let y;e[15]!==m?(y=T=>m?void 0:T.nextCursor??void 0,e[15]=m,e[16]=y):y=e[16];let N;e[17]!==w||e[18]!==x||e[19]!==P||e[20]!==y?(N={queryKey:w,enabled:x,staleTime:3e4,retry:!1,initialPageParam:null,queryFn:P,getNextPageParam:y},e[17]=w,e[18]=x,e[19]=P,e[20]=y,e[21]=N):N=e[21];const{data:C,isLoading:A,isError:S,isFetching:D,hasNextPage:k,isFetchingNextPage:L,fetchNextPage:I}=$l(N),B=j&&(m!==f||D),F=(C?.pages??[]).flatMap(Yi),O=Bl(6e4),V=Gi({sandboxMap:d,userId:n,rawBranches:F,now:O});let z;e[22]!==f?(z=T=>vn(T.name,f),e[22]=f,e[23]=z):z=e[23];const te=V.recent.filter(z);let M;e[24]!==f?(M=T=>vn(T.name,f),e[24]=f,e[25]=M):M=e[25];const K=V.yours.filter(M),J=V.others,se=C?.pages[0],W=j&&se&&!B?Math.max(0,se.totalCount-se.branches.length):0,ue=!j&&k;let Y;e[26]!==I?(Y=()=>{I()},e[26]=I,e[27]=Y):Y=e[27];let le;return e[28]!==W||e[29]!==S||e[30]!==L||e[31]!==A||e[32]!==B||e[33]!==J||e[34]!==te||e[35]!==ue||e[36]!==Y||e[37]!==K?(le={recent:te,yours:K,others:J,isLoading:A,isError:S,isSearching:B,hiddenMatchCount:W,hasMore:ue,isFetchingMore:L,fetchMore:Y},e[28]=W,e[29]=S,e[30]=L,e[31]=A,e[32]=B,e[33]=J,e[34]=te,e[35]=ue,e[36]=Y,e[37]=K,e[38]=le):le=e[38],le}function Yi(t){return t.branches}function Zi(t){const e=$.c(8),s=xe(),{releases:a,createRelease:n}=cn(t.virtualMcpId),o=$s(t.virtualMcpId);let d;return e[0]!==n||e[1]!==t.kind||e[2]!==t.userId||e[3]!==t.userLabel||e[4]!==o||e[5]!==a||e[6]!==s?(d=()=>{if(a.length>=Qs)return at.error(s("thread.branchPicker.capReached",{max:Qs})),null;const l=t.kind==="blog"?ql(t.userLabel):Hl(t.userLabel);return n({branch:l,name:oa(a,s(Hs(l))),color:ks(a.length),createdBy:t.userId,createdAt:new Date().toISOString(),...o?{runtime:ta(o.metadata)}:{}}).catch(i=>{at.error(s("thread.branchPicker.saveError"),{description:_r(s,Er(i))})}),l},e[0]=n,e[1]=t.kind,e[2]=t.userId,e[3]=t.userLabel,e[4]=o,e[5]=a,e[6]=s,e[7]=d):d=e[7],d}const Zs="-mx-[3px] h-3.5 w-3.5 shrink-0";function eo(t){const e=$.c(120),{virtualMcpId:s,isV8:a,userLabel:n,value:o,baseBranch:d,baseIsDraft:l,orgId:i,orgSlug:u,userId:c,target:h,owner:p,repo:b,sandboxMap:f,onChange:m,onCreateBranch:g,onAdoptBranch:v,disabled:j,spawnsNewChat:w,placement:x,draftKind:P}=t,y=a===void 0?!1:a,N=l===void 0?!1:l,C=j===void 0?!1:j,A=w===void 0?!1:w,S=x===void 0?"chat":x,D=P===void 0?"site":P,k=xe(),I=Bn()?D:null,B=S==="header",[F,O]=U.useState(!1),[V,z]=U.useState(!1),[te,M]=U.useState("branches"),[K,J]=U.useState(null),[se,W]=U.useState(""),[ue,Y]=U.useState(null),[le,T]=U.useState(null),ee=U.useRef(null),{releases:G,createRelease:ne,renameRelease:re,deleteRelease:Se}=cn(s),he=I??void 0;let be;e[0]!==he||e[1]!==c||e[2]!==n||e[3]!==s?(be={virtualMcpId:s,userLabel:n,userId:c,kind:he},e[0]=he,e[1]=c,e[2]=n,e[3]=s,e[4]=be):be=e[4];const ce=Zi(be),{projectDefault:ie}=ys(s);let E;e[5]!==ie?(E=R=>Kl(R,ie)==="sandbox",e[5]=ie,e[6]=E):E=e[6];const fe=E,ke=Ml(s,y),me=y?_l(G,ke.data):[],X=ke.refetch,Z=El(s),{url:Be,setUrl:Q,clear:oe}=An(s),Ne=Rn(s),xt=y&&!!Ne.connection,Xe=y?Ne.connection?.endpoint??null:Be,ye=!!Xe;let ve;e[7]!==oe||e[8]!==y||e[9]!==Ne?(ve=()=>{oe(),y&&Ne.clear()},e[7]=oe,e[8]=y,e[9]=Ne,e[10]=ve):ve=e[10];const Re=ve;let $e;e[11]!==F?($e={enabled:F},e[11]=F,e[12]=$e):$e=e[12];const{data:Ue}=Va($e);let Ie;e[13]!==Ue?.data?.members?(Ie=R=>R?Ue?.data?.members?.find(Pe=>Pe.userId===R)?.user?.name??void 0:void 0,e[13]=Ue?.data?.members,e[14]=Ie):Ie=e[14];const Dt=Ie,Ee=G.length>=Qs;let Oe;e[15]!==I||e[16]!==ie||e[17]!==G?(Oe=R=>!!_s(G,R.branch,I,ie),e[15]=I,e[16]=ie,e[17]=G,e[18]=Oe):Oe=e[18];const pe=Oe,ct=k("thread.branchPicker.capReached",{max:Qs}),{isBase:Ye,current:dt,storeDraft:Le,unlisted:_}=Ei({value:o,baseBranch:d,releases:G,baseIsDraft:N,storeDrafts:me}),ae=Nl(G,I,o);let je;e[19]!==I||e[20]!==o?(je=R=>I===null||Zr(R.name)===I||R.name===o,e[19]=I,e[20]=o,e[21]=je):je=e[21];const De=me.filter(je),Ze=Ye?k("thread.branchPicker.live"):dt?.name??Le?.name??k(Hs(o)),ut=xt?k("thread.branchPicker.localhost.label"):ye?k("thread.branchPicker.localLabel"):o?Ze:k("thread.branchPicker.selectVersion"),Et=xt?"bg-foreground":ye?"bg-special":Ye?"bg-success":Le?Ss(void 0):Ss(dt?.color??"orange"),Ce=!xt&&!ye&&!Ye&&!!dt&&fe(dt),et=R=>{Re();const Pe=me.some(Ct=>Ct.name===R)?{runtime:"cms"}:G.find(Ct=>Ct.branch===R);m(R,Pe&&{runtime:Pe.runtime}),O(!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),O(!1)},e[24]=Q,e[25]=zt):zt=e[25];const js=zt,Tt=(R,Pe)=>{if(Re(),v){v(R),z(!1),O(!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),O(!1)};let vt;e[26]!==Re||e[27]!==m||e[28]!==g||e[29]!==ce?(vt=()=>{const R=ce();R&&(Re(),(g??m)(R),O(!1))},e[26]=Re,e[27]=m,e[28]=g,e[29]=ce,e[30]=vt):vt=e[30];const ws=vt;let st;e[31]===Symbol.for("react.memo_cache_sentinel")?(st=()=>{J(null),W(""),z(!1),M("branches")},e[31]=st):st=e[31];const Bt=st;let yt;e[32]===Symbol.for("react.memo_cache_sentinel")?(yt=R=>{M(R),z(!0)},e[32]=yt):yt=e[32];const jt=yt;let wt;e[33]===Symbol.for("react.memo_cache_sentinel")?(wt=R=>{J(R.branch),W(R.name)},e[33]=wt):wt=e[33];const Ut=wt;let Pt;e[34]!==se||e[35]!==re||e[36]!==tt?(Pt=R=>{const Pe=se.trim();Pe&&re(R,Pe).catch(tt),J(null),W("")},e[34]=se,e[35]=re,e[36]=tt,e[37]=Pt):Pt=e[37];const Kt=Pt,qt=R=>{const Pe=R===void 0?o:R,Ct=se.trim();if(Ct&&Pe){if(Ee){at.error(ct),J(null),W("");return}ne({branch:Pe,name:Ct,color:ks(G.length),createdBy:c,createdAt:new Date().toISOString()}).catch(tt)}J(null),W("")};let St;e[38]===Symbol.for("react.memo_cache_sentinel")?(St=()=>{J(null),W("")},e[38]=St):St=e[38];const ft=St,It=()=>{const R=ue;if(Y(null),!(!R||!pe(R))){if(R.branch===o){const Pe=_s(G,R.branch,I,ie);Pe?et(Pe.branch):O(!1)}else O(!1);Se(R.branch).catch(tt)}},mt=zl(ae,ie),Ps=(mt.content.length>0||De.length>0)&&mt.code.length>0,$t=R=>K===R.branch?r.jsx(mn,{value:se,onChange:W,onSave:()=>Kt(R.branch),onCancel:ft},R.branch):r.jsx(pn,{rowRef:!ye&&R.branch===o?ee:void 0,dot:Ss(R.color),codeIcon:fe(R)?Es(R.color):void 0,label:R.name,creator:Dt(R.createdBy),originTooltip:y?k("thread.branchPicker.viaStudioUi"):void 0,branch:!y||fe(R)?R.branch:void 0,selected:!ye&&R.branch===o,onSelect:()=>et(R.branch),onRename:()=>Ut(R),onDelete:()=>Y(R),deleteBlocked:!pe(R)},R.branch),Ft=()=>{const R=le;if(T(null),!!R){if(R.name===o){const Pe=_s(G,R.name,I,ie);if(!Pe)return;et(Pe.branch)}Z.mutateAsync(R.name).catch(Pe=>{at.error(k("thread.branchPicker.discardStoreDraftError"),{description:Pe instanceof Error?Pe.message:void 0})})}},pt=De.map(R=>K===R.name?r.jsx(mn,{value:se,onChange:W,onSave:()=>qt(R.name),onCancel:ft},`store:${R.name}`):r.jsx(pn,{rowRef:!ye&&R.name===o?ee:void 0,dot:Ss(void 0),label:R.name,creator:Dt(R.createdBy),agentIcon:Es(ks(me.indexOf(R))),originTooltip:k("thread.branchPicker.storeDraftVia",{via:Ul(R.via)}),selected:!ye&&R.name===o,onSelect:()=>et(R.name),onRename:()=>{J(R.name),W(R.name)},onDelete:()=>T(R),deleteBlocked:R.name===o&&!_s(G,R.name,I,ie)},`store:${R.name}`));let Ke;e[39]!==C||e[40]!==y||e[41]!==X?(Ke=C?void 0:R=>{R?y&&X():Bt(),O(R)},e[39]=C,e[40]=y,e[41]=X,e[42]=Ke):Ke=e[42];const nt=B?"text-xs":"text-xs text-muted-foreground hover:text-foreground";let qe;e[43]!==nt?(qe=H("shrink min-w-0 max-w-[220px] gap-2",nt,Kr),e[43]=nt,e[44]=qe):qe=e[44];let He;e[45]!==C?(He=!C&&r.jsx(Vr,{size:12,className:"opacity-60 shrink-0"}),e[45]=C,e[46]=He):He=e[46];let Ve;e[47]!==ut?(Ve=r.jsx(ot,{children:ut}),e[47]=ut,e[48]=Ve):Ve=e[48];const rt=gl,kt="w-[min(300px,calc(100vw-2rem))] p-1.5",Nt="start";let Me;e[49]===Symbol.for("react.memo_cache_sentinel")?(Me=R=>{R.preventDefault(),ee.current?.scrollIntoView({block:"nearest"})},e[49]=Me):Me=e[49];let Ge;e[50]!==A||e[51]!==k?(Ge=A&&r.jsx("p",{className:"px-2 pb-1.5 pt-1 text-xs text-muted-foreground",children:k("thread.branchPicker.newChatHint")}),e[50]=A,e[51]=k,e[52]=Ge):Ge=e[52];const q=V?r.jsx(so,{orgId:i,orgSlug:u,userId:c,target:h,owner:p,repo:b,sandboxMap:f,enabled:F,tab:te,onTabChange:M,isV8:y,localUrl:Be,onSaveLocal:js,onBack:()=>z(!1),onAdopt:Tt,draftKind:I}):r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:H("always-scrollbar flex max-h-[min(50vh,20rem)] flex-col overflow-y-auto",y&&"gap-1"),children:[!y&&ye&&Xe&&r.jsx(to,{rowRef:ee,url:Xe,onSelect:()=>jt("local"),onEdit:()=>jt("local"),onTurnOff:()=>Re()}),_&&o&&(K===o?r.jsx(mn,{value:se,onChange:W,onSave:()=>qt(),onCancel:ft}):r.jsx(pn,{rowRef:ye?void 0:ee,dot:Ss("orange"),label:k(Hs(o)),branch:y?void 0:o,originTooltip:y?k("thread.branchPicker.viaStudioUi"):void 0,selected:!ye,onSelect:()=>et(o),onRename:()=>{J(o),W(oa(G,k(Hs(o))))}})),Ps?r.jsxs(r.Fragment,{children:[r.jsx(or,{children:k("thread.branchPicker.groupContent")}),mt.content.map($t),pt,r.jsx(or,{divided:!0,children:k("thread.branchPicker.groupCode")}),mt.code.map($t)]}):r.jsxs(r.Fragment,{children:[ae.map($t),pt]}),y&&r.jsx(Ki,{virtualMcpId:s,branch:o,serve:Ne,rowRef:xt?ee:void 0,onPicked:()=>O(!1)})]}),(_||ae.length>0||De.length>0||y)&&r.jsx("div",{className:"my-1 border-t"}),r.jsxs("button",{type:"button",onClick:()=>{ws()},disabled:Ee,className:"flex w-full items-center gap-2 rounded-lg px-2 py-2 text-left text-sm text-muted-foreground hover:bg-accent hover:text-foreground disabled:pointer-events-none disabled:opacity-50",children:[r.jsx(Yr,{className:"h-4 w-4 shrink-0"}),k("thread.branchPicker.newVersion")]}),Ee&&r.jsx("p",{className:"px-2 pb-1 pt-0.5 text-xs text-warning",children:ct}),r.jsxs("button",{type:"button",onClick:()=>jt("branches"),className:H("flex w-full items-center justify-between gap-2 rounded-lg px-2 py-2 text-left text-xs text-muted-foreground hover:bg-accent hover:text-foreground",y&&"mt-1"),children:[k("thread.branchPicker.advanced"),r.jsx(Pr,{className:"h-4 w-4 shrink-0"})]})]});let de;e[53]!==rt||e[54]!==Me||e[55]!==Ge||e[56]!==q?(de=r.jsxs(rt,{className:kt,align:Nt,onOpenAutoFocus:Me,children:[Ge,q]}),e[53]=rt,e[54]=Me,e[55]=Ge,e[56]=q,e[57]=de):de=e[57];const we=r.jsxs(xl,{open:F,onOpenChange:Ke,children:[r.jsxs(lt,{children:[r.jsx(it,{asChild:!0,children:r.jsx("span",{className:"inline-flex min-w-0 shrink",children:r.jsx(vl,{asChild:!0,children:r.jsxs(ge,{"data-tour":bl.branchPicker,variant:B?"outline":"ghost",size:B?"sm":"default","aria-label":ut,disabled:C,className:qe,children:[Ce?r.jsx(Gr,{className:H(Zs,Es(dt?.color))}):Le&&!ye?r.jsx(Sr,{className:H(Zs,Es(ks(me.indexOf(Le))))}):r.jsx("span",{className:H("h-2 w-2 shrink-0 rounded-full",o||ye?Et:"bg-muted-foreground")}),r.jsx("span",{className:"min-w-0 truncate @max-3xl/panel-header:hidden",children:ut}),He]})})})}),Ve]}),de]}),Te=ue!==null;let _e;e[58]===Symbol.for("react.memo_cache_sentinel")?(_e=R=>{R||Y(null)},e[58]=_e):_e=e[58];let Je;e[59]!==k?(Je=k("thread.branchPicker.deleteTitle"),e[59]=k,e[60]=Je):Je=e[60];let Ht;e[61]!==Je?(Ht=r.jsx(Ns,{children:Je}),e[61]=Je,e[62]=Ht):Ht=e[62];let Vt;e[63]!==ue||e[64]!==k?(Vt=ue&&k("thread.branchPicker.deleteConfirm",{name:ue.name}),e[63]=ue,e[64]=k,e[65]=Vt):Vt=e[65];let Gt;e[66]!==Vt?(Gt=r.jsx(Cs,{children:Vt}),e[66]=Vt,e[67]=Gt):Gt=e[67];let Jt;e[68]!==Ht||e[69]!==Gt?(Jt=r.jsxs(As,{children:[Ht,Gt]}),e[68]=Ht,e[69]=Gt,e[70]=Jt):Jt=e[70];let Wt;e[71]!==k?(Wt=k("thread.branchPicker.cancel"),e[71]=k,e[72]=Wt):Wt=e[72];let Qt;e[73]!==Wt?(Qt=r.jsx(Js,{children:Wt}),e[73]=Wt,e[74]=Qt):Qt=e[74];let Xt;e[75]!==k?(Xt=k("thread.branchPicker.delete"),e[75]=k,e[76]=Xt):Xt=e[76];let Yt;e[77]!==It||e[78]!==Xt?(Yt=r.jsx(Ws,{onClick:It,variant:"destructive",children:Xt}),e[77]=It,e[78]=Xt,e[79]=Yt):Yt=e[79];let Zt;e[80]!==Qt||e[81]!==Yt?(Zt=r.jsxs(Rs,{children:[Qt,Yt]}),e[80]=Qt,e[81]=Yt,e[82]=Zt):Zt=e[82];let es;e[83]!==Jt||e[84]!==Zt?(es=r.jsxs(Ds,{children:[Jt,Zt]}),e[83]=Jt,e[84]=Zt,e[85]=es):es=e[85];let Os;e[86]!==Te||e[87]!==es?(Os=r.jsx(Ts,{open:Te,onOpenChange:_e,children:es}),e[86]=Te,e[87]=es,e[88]=Os):Os=e[88];const hn=le!==null;let Ls;e[89]===Symbol.for("react.memo_cache_sentinel")?(Ls=R=>{R||T(null)},e[89]=Ls):Ls=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:Ls,children:us}),e[117]=hn,e[118]=us,e[119]=Ms):Ms=e[119],r.jsxs(r.Fragment,{children:[we,Os,Ms]})}function mn(t){const e=$.c(20),{value:s,onChange:a,onSave:n,onCancel:o}=t,d=xe();let l;e[0]!==d?(l=d("thread.branchPicker.rename"),e[0]=d,e[1]=l):l=e[1];let i;e[2]!==a?(i=f=>a(f.target.value),e[2]=a,e[3]=i):i=e[3];let u;e[4]!==o||e[5]!==n?(u=f=>{f.key==="Enter"&&n(),f.key==="Escape"&&(f.preventDefault(),f.stopPropagation(),o())},e[4]=o,e[5]=n,e[6]=u):u=e[6];let c;e[7]!==l||e[8]!==i||e[9]!==u||e[10]!==s?(c=r.jsx("input",{autoFocus:!0,"aria-label":l,value:s,onChange:i,onKeyDown:u,className:"h-8 flex-1 rounded-md border bg-transparent px-2 text-sm focus-ring"}),e[7]=l,e[8]=i,e[9]=u,e[10]=s,e[11]=c):c=e[11];let h;e[12]!==d?(h=d("thread.branchPicker.save"),e[12]=d,e[13]=h):h=e[13];let p;e[14]!==n||e[15]!==h?(p=r.jsx(ge,{size:"sm",onClick:n,children:h}),e[14]=n,e[15]=h,e[16]=p):p=e[16];let b;return e[17]!==c||e[18]!==p?(b=r.jsxs("div",{className:"flex items-center gap-1.5 p-1",children:[c,p]}),e[17]=c,e[18]=p,e[19]=b):b=e[19],b}function or(t){const e=$.c(5),{divided:s,children:a}=t,o=(s===void 0?!1:s)&&"mt-1 border-t";let d;e[0]!==o?(d=H("px-2 pb-1 pt-2 text-xs font-medium uppercase tracking-wide text-muted-foreground",o),e[0]=o,e[1]=d):d=e[1];let l;return e[2]!==a||e[3]!==d?(l=r.jsx("p",{className:d,children:a}),e[2]=a,e[3]=d,e[4]=l):l=e[4],l}function pn(t){const e=$.c(53),{rowRef:s,dot:a,codeIcon:n,agentIcon:o,originTooltip:d,label:l,creator:i,branch:u,selected:c,onSelect:h,onRename:p,onDelete:b,deleteBlocked:f}=t,m=f===void 0?!1:f,g=xe();let v;e[0]!==o||e[1]!==n||e[2]!==a?(v=n?r.jsx(Gr,{className:H(Zs,n)}):o?r.jsx(Sr,{className:H(Zs,o)}):r.jsx("span",{className:H("h-2 w-2 shrink-0 rounded-full",a)}),e[0]=o,e[1]=n,e[2]=a,e[3]=v):v=e[3];let j;e[4]!==i?(j=i&&r.jsx("span",{className:"ml-1.5 text-xs font-normal text-muted-foreground/70",children:i}),e[4]=i,e[5]=j):j=e[5];let w;e[6]!==l||e[7]!==j?(w=r.jsxs("span",{className:"min-w-0 flex-1 truncate",children:[l,j]}),e[6]=l,e[7]=j,e[8]=w):w=e[8];let x;e[9]!==h||e[10]!==c||e[11]!==v||e[12]!==w?(x=r.jsxs("button",{type:"button","aria-pressed":c,onClick:h,className:"flex min-w-0 flex-1 items-center gap-2.5 px-2 py-2 text-left text-sm",children:[v,w]}),e[9]=h,e[10]=c,e[11]=v,e[12]=w,e[13]=x):x=e[13];const P=x,y=c?"bg-accent":"hover:bg-accent";let N;e[14]!==y?(N=H("group flex items-center rounded-lg",y),e[14]=y,e[15]=N):N=e[15];let C;e[16]!==u||e[17]!==n||e[18]!==d||e[19]!==P||e[20]!==g?(C=u||d?r.jsxs(lt,{children:[r.jsx(it,{asChild:!0,children:P}),r.jsxs(ot,{side:"bottom",className:"text-xs",children:[n&&r.jsx("p",{className:"font-medium",children:g("thread.branchPicker.codeDraftTooltip")}),d&&r.jsx("p",{children:d}),u&&r.jsx("p",{className:"font-mono",children:g("thread.branchPicker.branchTooltip",{branch:u})})]})]}):P,e[16]=u,e[17]=n,e[18]=d,e[19]=P,e[20]=g,e[21]=C):C=e[21];let A;e[22]!==g?(A=g("thread.branchPicker.moreActions"),e[22]=g,e[23]=A):A=e[23];let S;e[24]===Symbol.for("react.memo_cache_sentinel")?(S=r.jsx(Qr,{className:"h-4 w-4"}),e[24]=S):S=e[24];let D;e[25]!==A?(D=r.jsx(tn,{asChild:!0,children:r.jsx(ge,{variant:"ghost",size:"icon","aria-label":A,className:"mr-1 h-6 w-6 shrink-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100",children:S})}),e[25]=A,e[26]=D):D=e[26];let k;e[27]===Symbol.for("react.memo_cache_sentinel")?(k=r.jsx(Xr,{className:"h-4 w-4"}),e[27]=k):k=e[27];let L;e[28]!==g?(L=g("thread.branchPicker.rename"),e[28]=g,e[29]=L):L=e[29];let I;e[30]!==p||e[31]!==L?(I=r.jsxs(ms,{onSelect:p,children:[k,L]}),e[30]=p,e[31]=L,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 O;e[41]!==I||e[42]!==B||e[43]!==F?(O=r.jsxs(sn,{align:"end",children:[I,B,F]}),e[41]=I,e[42]=B,e[43]=F,e[44]=O):O=e[44];let V;e[45]!==D||e[46]!==O?(V=r.jsxs(nn,{children:[D,O]}),e[45]=D,e[46]=O,e[47]=V):V=e[47];let z;return e[48]!==s||e[49]!==V||e[50]!==N||e[51]!==C?(z=r.jsxs("div",{ref:s,className:N,children:[C,V]}),e[48]=s,e[49]=V,e[50]=N,e[51]=C,e[52]=z):z=e[52],z}function to(t){const e=$.c(40),{rowRef:s,url:a,onSelect:n,onEdit:o,onTurnOff:d}=t,l=xe();let i;try{let D;e[0]!==a?(D=new URL(a),e[0]=a,e[1]=D):D=e[1],i=D.host}catch{i=a}const u=i;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=r.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full bg-special"}),e[2]=c):c=e[2];let h;e[3]!==l?(h=l("thread.branchPicker.localLabel"),e[3]=l,e[4]=h):h=e[4];let p;e[5]!==u?(p=r.jsx("span",{className:"ml-1.5 text-xs font-normal text-muted-foreground/70",children:u}),e[5]=u,e[6]=p):p=e[6];let b;e[7]!==h||e[8]!==p?(b=r.jsxs("span",{className:"min-w-0 flex-1 truncate",children:[h,p]}),e[7]=h,e[8]=p,e[9]=b):b=e[9];let f;e[10]!==n||e[11]!==b?(f=r.jsxs("button",{type:"button","aria-pressed":!0,onClick:n,className:"flex min-w-0 flex-1 items-center gap-2.5 px-2 py-2 text-left text-sm",children:[c,b]}),e[10]=n,e[11]=b,e[12]=f):f=e[12];let m;e[13]!==l?(m=l("thread.branchPicker.moreActions"),e[13]=l,e[14]=m):m=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=r.jsx(Qr,{className:"h-4 w-4"}),e[15]=g):g=e[15];let v;e[16]!==m?(v=r.jsx(tn,{asChild:!0,children:r.jsx(ge,{variant:"ghost",size:"icon","aria-label":m,className:"mr-1 h-6 w-6 shrink-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100",children:g})}),e[16]=m,e[17]=v):v=e[17];let j;e[18]===Symbol.for("react.memo_cache_sentinel")?(j=r.jsx(Xr,{className:"h-4 w-4"}),e[18]=j):j=e[18];let w;e[19]!==l?(w=l("thread.branchPicker.rename"),e[19]=l,e[20]=w):w=e[20];let x;e[21]!==o||e[22]!==w?(x=r.jsxs(ms,{onSelect:o,children:[j,w]}),e[21]=o,e[22]=w,e[23]=x):x=e[23];let P;e[24]===Symbol.for("react.memo_cache_sentinel")?(P=r.jsx(on,{className:"h-4 w-4"}),e[24]=P):P=e[24];let y;e[25]!==l?(y=l("thread.branchPicker.localTurnOff"),e[25]=l,e[26]=y):y=e[26];let N;e[27]!==d||e[28]!==y?(N=r.jsxs(ms,{onSelect:d,className:"text-destructive focus:text-destructive",children:[P,y]}),e[27]=d,e[28]=y,e[29]=N):N=e[29];let C;e[30]!==x||e[31]!==N?(C=r.jsxs(sn,{align:"end",children:[x,N]}),e[30]=x,e[31]=N,e[32]=C):C=e[32];let A;e[33]!==C||e[34]!==v?(A=r.jsxs(nn,{children:[v,C]}),e[33]=C,e[34]=v,e[35]=A):A=e[35];let S;return e[36]!==s||e[37]!==A||e[38]!==f?(S=r.jsxs("div",{ref:s,className:"group flex items-center rounded-lg bg-accent",children:[f,A]}),e[36]=s,e[37]=A,e[38]=f,e[39]=S):S=e[39],S}function so(t){const e=$.c(75),{orgId:s,orgSlug:a,userId:n,target:o,owner:d,repo:l,sandboxMap:i,enabled:u,tab:c,onTabChange:h,isV8:p,localUrl:b,onSaveLocal:f,onBack:m,onAdopt:g,draftKind:v}=t,j=xe(),[w,x]=U.useState(""),P=c==="branches"?w:"",y=u&&c==="branches";let N;e[0]!==s||e[1]!==a||e[2]!==d||e[3]!==l||e[4]!==i||e[5]!==P||e[6]!==y||e[7]!==o||e[8]!==n?(N={orgId:s,orgSlug:a,userId:n,target:o,sandboxMap:i,owner:d,repo:l,search:P,enabled:y},e[0]=s,e[1]=a,e[2]=d,e[3]=l,e[4]=i,e[5]=P,e[6]=y,e[7]=o,e[8]=n,e[9]=N):N=e[9];const{recent:C,yours:A,others:S,isLoading:D,hasMore:k,isFetchingMore:L,fetchMore:I}=Xi(N),B=u&&c==="prs";let F;e[10]!==s||e[11]!==a||e[12]!==d||e[13]!==l||e[14]!==B||e[15]!==o?(F={orgId:s,orgSlug:a,target:o,owner:d,repo:l,enabled:B},e[10]=s,e[11]=a,e[12]=d,e[13]=l,e[14]=B,e[15]=o,e[16]=F):F=e[16];const{data:O,isLoading:V}=Fl(F);let z;if(e[17]!==v||e[18]!==I||e[19]!==k||e[20]!==L||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]!==O||e[36]!==c||e[37]!==A){const te=O===void 0?[]:O,M=`${d}/${l}`;let K;e[39]!==M?(K=M.toLowerCase(),e[39]=M,e[40]=K):K=e[40];const J=K;let se;e[41]!==J?(se=E=>E.headRepoFullName?.toLowerCase()===J,e[41]=J,e[42]=se):se=e[42];const W=te.filter(se);let ue;if(e[43]!==v||e[44]!==S||e[45]!==C||e[46]!==A){const E=new Set;ue=[...C,...A,...S].filter(fe=>E.has(fe.name)?!1:(E.add(fe.name),v!=="site"||Zr(fe.name)==="site")),e[43]=v,e[44]=S,e[45]=C,e[46]=A,e[47]=ue}else ue=e[47];const Y=ue;let le;e[48]===Symbol.for("react.memo_cache_sentinel")?(le=r.jsx(Pl,{className:"h-4 w-4 shrink-0"}),e[48]=le):le=e[48];let T;e[49]!==j?(T=j("thread.branchPicker.advancedBack"),e[49]=j,e[50]=T):T=e[50];let ee;e[51]!==m||e[52]!==T?(ee=r.jsxs("button",{type:"button",onClick:m,className:"flex items-center gap-1.5 px-2 py-1.5 text-xs text-muted-foreground hover:text-foreground",children:[le,T]}),e[51]=m,e[52]=T,e[53]=ee):ee=e[53];let G;e[54]!==h?(G=E=>{h(E),x("")},e[54]=h,e[55]=G):G=e[55];let ne;e[56]!==j?(ne=j("thread.branchPicker.branchesTab"),e[56]=j,e[57]=ne):ne=e[57];let re;e[58]!==ne?(re=r.jsx(Ot,{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(Ot,{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(Ot,{value:"local",className:"h-6 px-2.5 text-xs",children:j("thread.branchPicker.localTab")}),e[64]=p,e[65]=j,e[66]=be):be=e[66];let ce;e[67]!==re||e[68]!==he||e[69]!==be?(ce=r.jsxs(qr,{className:"h-auto w-fit justify-start gap-1 bg-accent p-1",variant:"pill",children:[re,he,be]}),e[67]=re,e[68]=he,e[69]=be,e[70]=ce):ce=e[70];let ie;e[71]!==G||e[72]!==ce||e[73]!==c?(ie=r.jsx(Hr,{className:"px-2 pt-2 pb-1",value:c,onValueChange:G,children:ce}),e[71]=G,e[72]=ce,e[73]=c,e[74]=ie):ie=e[74],z=r.jsxs("div",{className:"flex flex-col",children:[ee,ie,c==="local"&&!p?r.jsx(Ui,{url:b,onSave:f}):r.jsxs(yl,{filter:c==="branches"?no:void 0,children:[r.jsx(jl,{placeholder:j(c==="branches"?"thread.branchPicker.searchBranches":"thread.branchPicker.searchPullRequests"),value:w,onValueChange:x}),r.jsx(wl,{onScroll:E=>{const fe=E.currentTarget;c==="branches"&&fe.scrollHeight-fe.scrollTop-fe.clientHeight<48&&I()},children:c==="branches"?r.jsxs(r.Fragment,{children:[D&&r.jsx("div",{className:"p-3 text-xs text-muted-foreground",children:j("thread.branchPicker.loadingMore")}),!D&&Y.length===0&&r.jsx(tr,{children:j("thread.branchPicker.noBranchesFound")}),Y.length>0&&r.jsx(sr,{children:Y.map(E=>r.jsxs(nr,{value:E.name,className:"cursor-pointer",onSelect:()=>g(E.name,E.name),children:[r.jsx(Ga,{className:"mr-2 h-4 w-4 shrink-0"}),r.jsx("span",{className:"flex-1 truncate",children:E.name})]},E.name))}),k&&r.jsx("div",{className:"p-2",children:r.jsx(ge,{variant:"ghost",size:"sm",className:"h-7 w-full text-xs",disabled:L,onClick:I,children:j(L?"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]=L,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]=O,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=Ol(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 L=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 O=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:L,onCreateBranch:B,onAdoptBranch:O,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 Lt(){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:Xs(i,h),pagePath:null,isSiteApp:b,status:l,filepaths:[o],sections:l==="edited"?[{name:Xs(i,h),kind:"section",status:"edited",fields:bs(Rt(u,c,[]))}].filter(f=>f.fields.length>0):[],fromJson:Fe(u),toJson:Fe(c)})}return Sa({pages:e,blocks:s,other:a,generated:n})}function gn(t,e){return(t.filepaths[0]??"").localeCompare(e.filepaths[0]??"")}function Sa(t){const{pages:e,blocks:s,other:a,generated:n}=t;return e.sort(gn),s.sort(gn),a.sort(gn),{pages:e,blocks:s,other:a,generated:n,count:e.length+s.length+a.length}}function No(t){return t==="added"?"new":t==="removed"?"removed":"edited"}function ka(t){return t.startsWith("pages-")}function Na(t){const{files:e,lookup:s,diff:a}=t,n=[],o=[],d=[],l=[];for(const i of e){const u=i.path;if(Mn(u)){l.push(u);continue}const c=No(i.status),h=qn(u);if(!h){d.push(wn(u,c));continue}const p=a?.diffs[u],b=en(p?.from??null),f=en(p?.to??null),m=Ca(s,h),g=m??f??b;if((m?hs(h,m):null)??(!m&&ka(h))){const w=g?hs(h,g):null;n.push({kind:"page",blockKey:h,name:w?.name??ua(h),pagePath:w?.path??null,isSiteApp:!1,status:c,filepaths:[u],sections:c==="edited"?Vn(b,f).map(x=>({...x,fields:bs(x.fields)})):[],fromJson:Fe(b),toJson:Fe(f??(c==="new"?m:null))});continue}const j=Xs(h,g??{});o.push({kind:"block",blockKey:h,name:j,pagePath:null,isSiteApp:Fn(h,m??{}),status:c,filepaths:[u],sections:c==="edited"?[{name:j,kind:"section",status:"edited",fields:bs(Rt(b,f,[]))}].filter(w=>w.fields.length>0):[],fromJson:Fe(b),toJson:Fe(f)})}return Sa({pages:n,blocks:o,other:d,generated:l})}function Ca(t,e){const s=t?.[e];return s&&typeof s=="object"&&!Array.isArray(s)?s:null}function Co(t,e){return t??e}function Aa(t){return t.length<=1?t[0]??"":`${t.slice(0,-1).join(", ")} and ${t[t.length-1]}`}const xn=3;function zs(t){if(t.length<=xn)return Aa(t);const e=t.length-xn;return`${t.slice(0,xn).join(", ")} and ${e} more`}function Ao(t,e){if(!e){const a=t.sections.filter(n=>n.kind==="section").map(n=>n.name).slice(0,3);return a.length>0?`${t.name} (${a.join(", ")})`:t.name}const s=[...new Set(t.sections.filter(a=>a.kind==="section").flatMap(a=>a.wrapper?a.held??[]:[a.name]))].slice(0,3);return s.length>0?`${t.name} (${s.join(", ")})`:t.name}function Ro(t){const e=ja(t);return e==="experiments"?"A/B tests":e==="campaigns"?"Campaign dates":t.name}function Do(t){const e=[],s=t.pages.filter(l=>l.status==="edited"),a=t.pages.filter(l=>l.status==="new"),n=t.pages.filter(l=>l.status==="removed");if(s.length>0&&e.push(`updated ${zs(s.map(l=>Ao(l,!!t.v8)))}`),a.length>0){const l=a.length===1?"page":"pages";e.push(`added the ${zs(a.map(i=>i.name))} ${l}`)}if(n.length>0){const l=n.length===1?"page":"pages";e.push(`removed the ${zs(n.map(i=>i.name))} ${l}`)}const o=t.blocks.map(Ro);if(o.length>0&&e.push(`changed ${zs(o)}`),t.other.length>0){const l=t.other.length===1?"file":"files";e.push(`changed ${t.other.length} ${l}`)}if(e.length===0)return"";const d=Aa(e);return 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(Xa(h.file))===Zn(c)).map(h=>h.side))],u=Object.keys(e).sort((c,h)=>c<h?-1:c>h?1:0);for(const c of u){const h=e[c],p=h.kind==="delete"?"removed":h.baseVersion===null?"new":"edited",b=s?.entries[c],f=b?.before??null,m=b?.after??null,g=Ca(a,c),v=g??m??f,j=i(c),w={blockKey:c,status:p,filepaths:[],entry:{name:c,version:h.version},...j.length>0?{unreadable:j}:{},fromJson:Fe(f),toJson:Fe(m??(p==="new"?g:null))},x=g?hs(c,g,n):null,P=!g&&v?hs(c,v,n):null;if(x??P??(!v&&ka(c))){const S=v?hs(c,v,n):null;d.push({...w,kind:"page",name:S?.name??ua(c),pagePath:S?.path??null,isSiteApp:!1,sections:p==="edited"?Vn(f,m,!0).map(D=>({...D,fields:bs(D.fields)})):[]});continue}const y=o?Xl(c,v,g,m,f):null,N=y?Yl(y,[v,g,m,f]):Xs(c,v??{}),C=go(c,[g,m,f]),A=jo(c,[g,m,f]);l.push({...w,kind:"block",name:A?"Settings":N,...A?{cmsSettings:!0}:{},...y?{blogKind:y}:{},...C?{namedRule:C}:{},pagePath:null,isSiteApp:Fn(c,g??v??{}),sections:p==="edited"?[{name:A?"Settings":N,kind:"section",status:"edited",fields:bs(A?wo(f,m):Rt(f,m,[]))}].filter(S=>S.fields.length>0):[]})}return{pages:d,blocks:l,other:[],generated:[],count:d.length+l.length,v8:!0}}function Ae(t){return t.filepaths[0]??t.blockKey??t.name}function Fo(t,e){return e(t==="new"?"thread.publishPopover.chipNew":t==="removed"?"thread.publishPopover.chipRemoved":"thread.publishPopover.chipEdited")}function Oo(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 Lo(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=Lo(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=Oo(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 L;e[42]!==D||e[43]!==k||e[44]!==N?(L=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]=L):L=e[45],v=r.jsxs(va,{className:P,"data-change-id":y,onClick:o,children:[L,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("/"),L=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:L}),I&&r.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:I}),o?r.jsxs(nn,{children:[r.jsx(tn,{asChild:!0,children:r.jsx("button",{type:"button",className:"flex h-6 w-6 shrink-0 items-center justify-center text-muted-foreground hover:bg-accent hover:text-foreground rounded-lg",children:r.jsx(Ya,{className:"h-3.5 w-3.5"})})}),r.jsx(sn,{align:"end",children:r.jsx(ms,{className:"text-destructive focus:text-destructive",onSelect:()=>m(x),children:"Discard changes"})})]}):null]}),f===x&&o?r.jsxs("div",{className:H("flex items-center justify-between gap-3 border-t bg-destructive/5 py-2.5",u),children:[r.jsxs("span",{className:"text-xs text-destructive",children:["Discard all changes to"," ",r.jsx("span",{className:"font-medium",children:L}),"? 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=On(a.path,s.params);return At(n).length===0?n:a.path}function Wo(t){return t.sectionKey&&!t.v8?Go(t.previewServerUrl,t.sectionKey):Xo(t.previewServerUrl,t.path)}function Qo(t,e){if(t.kind!=="page")return"/";const s=t.pagePath;if(!s)return"";if(At(s).length===0)return s;if(e?.path!==s)return"";const a=On(s,e.params);return At(a).length===0?a:""}function Xo(t,e){const s=e.trim();if(!s||At(s).length>0)return null;try{const a=new URL(t),n=new URL(s.startsWith("/")?s:`/${s}`,a);return n.origin===a.origin?n:null}catch{return null}}function Yo(t,e){return e?.kind==="pointer"&&e.link?Dn(t.toString(),e.link):Ba(t,e)}function Ba(t,e){if(!e)return null;if(e.kind==="pointer")return Dn(t.toString(),e.pointer);try{return new URL(`${t.pathname}${t.search}`,e.previewUrl).href}catch{return null}}function Zo(t,e,s){return e===null?!1:t!=="other"||s?.kind==="sandbox"}function ec(t,e){const s=e?t.kind==="page":t.kind!=="other";return{before:s&&t.status==="new"?"new":null,after:s&&t.status==="removed"?"removed":null}}const Ia=U.createContext(!0),tc=["split","before","after","code"];function sc(t){return tc.includes(t)}const $a={desktop:1280,mobile:412};function nc(t,e){const s=(o,d)=>t.unreadable?.includes(d)?e:o?`${JSON.stringify(o,null,2)}
|
|
1
|
+
import{c as $,b as xe,r as U,j as r,B as ge,m as H,K as xs,an as Ha,t as at,eN as Va,au as Pr,dN as Sr,Y as ms,dO as Ga,aJ as Ns,aK as Cs,aL as As,aM as Js,b9 as Ws,aN as Rs,aO as Ds,aP as Ts,X as tn,Z as sn,_ as nn,a as rn,a6 as Is,b_ as Ja,h as ps,eO as kr,eP as Nr,eQ as Sn,by as Wa,bo as Qa,bt as Zn,eR as Xa,ao as Ya,I as Za,a9 as el,eS as tl,V as Cr,i as gt,eK as kn,q as Ar,J as Rr,D as Dr,x as Tr,v as Br,Q as Ir,R as $r,aX as sl,ba as Fr,a7 as Nn,b6 as Cn,e as er,E as nl,T as rl}from"./index-mb-jxjEy.js";import{S as al}from"./separator-DsSANYB0.js";import{f as ll,u as vs,r as Or,l as Lr,c as Mr,b as il}from"./chat-context-CxkYg5uT.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-DfzFv4iY.js";import{L as bl}from"./use-org-notice-BLDWm2ef.js";import{I as Kr}from"./toolbar-icon-button-DcIFSTOI.js";import{b as gl,P as xl,a as vl}from"./popover-D73VbCM5.js";import{c as lt,T as it,a as ot,b as an}from"./tooltip-DCzbfwd7.js";import{f as yl,a as jl,c as wl,C as tr,e as sr,b as nr}from"./command-CwP4XJhp.js";import{T as Ot,a as qr,b as Hr}from"./tabs-DJ6SkMve.js";import{t as Vr}from"./ChevronDown-Cz82ih9S.js";import{b as Pl}from"./UserCheck01-CuByTN5F.js";import{K as Gr,ab as ln,a as Jr,F as Sl,b as kl,ac as Wr}from"./agent-icon-zvo6Zsex.js";import{a as Qr}from"./SwitchHorizontal01-HaaMuIs0.js";import{b as Xr}from"./Tool01-9Nk8XcOI.js";import{s as Yr}from"./Plus-WQeLSh07.js";import{s as on}from"./Trash01-By8obgKt.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-CZT4hOaN.js";import{u as Bn}from"./use-blog-view-Bi3aoju6.js";import{u as ys}from"./use-voice-input-Nzha8Za1.js";import{b as Rl,d as ta}from"./session-runtime-D2GKulko.js";import{h as sa,r as na,b as $s,g as Dl,e as ze,f as ra}from"./repository-binding-w-FCDYuS.js";import{u as Tl}from"./use-debounced-value-CAOKwJaL.js";import{a as Bl,u as Il}from"./shell-layout-BS_Y65pV.js";import{u as $l}from"./useInfiniteQuery-FxnnBp9W.js";import{d as Fl,b as Ol,p as Ll,e as aa,g as la,h as ia}from"./use-navigate-to-agent-H87rWFYJ.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-5dkWWhlw.js";import{e as ql,g as Hl,f as In}from"./thread-intent-BQWCtBA_.js";import{a as Qs}from"./virtual-mcp-DN6fu9Nf.js";import{u as $n}from"./use-blocks-v8-project-BloQ91Xb.js";import{G as ca}from"./github-icon-D3IlXxDN.js";import{k as Vl,r as Gl,c as da,u as Jl}from"./use-sandbox-events-DEHux0gs.js";import{a as Wl,b as Ql}from"./use-fast-preview-draft-url-DbEjmD3f.js";import{a3 as hs,a4 as ua,A as Xs,q as Fn,a5 as Xl,a6 as Yl,F as Zl,a7 as ei,a8 as ti,p as si,e as At,f as On,a9 as ni}from"./blocks-tab-states-D8VyxdkW.js";import"./index-CnFOA69K.js";import{T as ri}from"./textarea-BCGFjA5F.js";import{i as Ln}from"./CheckCircle-C0mDI2jO.js";import{s as Ys}from"./Eye-BoMcImel.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-DGO40mZ2.js";import{a as pi,h as bi}from"./UserSquare-T90Jaoc-.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-1xYJwdHB.js";import{a as Ai,g as Ri}from"./utils-pe9cqItP.js";import{i as Di}from"./Monitor01-Dzk9r8YI.js";import{w as Kn,R as pa}from"./device-hint-DfNddHqx.js";import{w as rr}from"./editor-stZYyxdg.js";import{i as Ti,C as Bi}from"./section-array-field-4siTAXTX.js";import{T as Ii,a as ar}from"./toggle-group-jkikwCcL.js";import{s as ba}from"./save-changes-debug-nBi-n9eV.js";import{u as $i}from"./use-mcp-client-4k5JKqzF.js";import{t as Fi}from"./MessageCircle01-DEwhGd-N.js";import{b as Oi,a as Li}from"./sandbox-lifecycle-context-CxRkhFod.js";import{b as Mi}from"./agent-capabilities-DWZ6HVp_.js";import{c as _i}from"./thread-route-DRsKlO-E.js";function Ei(t){const{value:e,baseBranch:s,releases:a,baseIsDraft:n=!1,storeDrafts:o=[]}=t,d=!n&&!!e&&e===s,l=a.find(c=>c.branch===e),i=d||l?void 0:o.find(c=>c.name===e),u=!d&&!l&&!i&&!!e;return i?{isBase:d,current:l,storeDraft:i,unlisted:u}:{isBase:d,current:l,unlisted:u}}const zi={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" "},lr=1114111;function ir(t){return t?t.replace(/&(#x?[0-9a-fA-F]+|[a-zA-Z]+);/g,(e,s)=>{if(s.startsWith("#x")||s.startsWith("#X")){const a=Number.parseInt(s.slice(2),16);return!Number.isFinite(a)||a>lr?e:String.fromCodePoint(a)}if(s.startsWith("#")){const a=Number.parseInt(s.slice(1),10);return!Number.isFinite(a)||a>lr?e:String.fromCodePoint(a)}return zi[s]??e}):""}function Ui(t){const e=$.c(39),{url:s,onSave:a}=t,n=xe(),[o,d]=U.useState(s??"");let l;e[0]!==o?(l=o.trim(),e[0]=o,e[1]=l):l=e[1];const i=l;let u;e[2]!==a||e[3]!==i?(u=()=>a(i?Rl(i):null),e[2]=a,e[3]=i,e[4]=u):u=e[4];const c=u;let h;e[5]!==n?(h=n("thread.branchPicker.localHint"),e[5]=n,e[6]=h):h=e[6];let p;e[7]!==h?(p=r.jsx("p",{className:"text-xs text-muted-foreground",children:h}),e[7]=h,e[8]=p):p=e[8];let b;e[9]!==n?(b=n("thread.branchPicker.localUrlLabel"),e[9]=n,e[10]=b):b=e[10];let f;e[11]!==n?(f=n("thread.branchPicker.localUrlPlaceholder"),e[11]=n,e[12]=f):f=e[12];let m;e[13]===Symbol.for("react.memo_cache_sentinel")?(m=C=>d(C.target.value),e[13]=m):m=e[13];let g;e[14]!==c||e[15]!==i?(g=C=>{C.key==="Enter"&&i&&c()},e[14]=c,e[15]=i,e[16]=g):g=e[16];let v;e[17]!==b||e[18]!==f||e[19]!==g||e[20]!==o?(v=r.jsx("input",{type:"url",inputMode:"url","aria-label":b,placeholder:f,value:o,onChange:m,onKeyDown:g,className:"h-8 w-full rounded-md border bg-transparent px-2 text-sm focus-ring"}),e[17]=b,e[18]=f,e[19]=g,e[20]=o,e[21]=v):v=e[21];let j;e[22]!==a||e[23]!==n||e[24]!==s?(j=s?r.jsx(ge,{variant:"ghost",size:"sm",className:"text-xs text-destructive hover:text-destructive",onClick:()=>a(null),children:n("thread.branchPicker.localTurnOff")}):r.jsx("span",{}),e[22]=a,e[23]=n,e[24]=s,e[25]=j):j=e[25];const w=!i;let x;e[26]!==n?(x=n("thread.branchPicker.save"),e[26]=n,e[27]=x):x=e[27];let P;e[28]!==c||e[29]!==w||e[30]!==x?(P=r.jsx(ge,{size:"sm",disabled:w,onClick:c,children:x}),e[28]=c,e[29]=w,e[30]=x,e[31]=P):P=e[31];let y;e[32]!==j||e[33]!==P?(y=r.jsxs("div",{className:"flex items-center justify-between gap-2",children:[j,P]}),e[32]=j,e[33]=P,e[34]=y):y=e[34];let N;return e[35]!==y||e[36]!==p||e[37]!==v?(N=r.jsxs("div",{className:"flex flex-col gap-2 p-2",children:[p,v,y]}),e[35]=y,e[36]=p,e[37]=v,e[38]=N):N=e[38],N}function Ki(t){const e=$.c(8),{virtualMcpId:s,branch:a,serve:n,rowRef:o,onPicked:d}=t,l=Mt(s,a),i=!!n.connection,u=i&&l.kind==="protocol"&&l.source==="local";let c;e[0]!==d||e[1]!==n?(c=()=>qi(n,d),e[0]=d,e[1]=n,e[2]=c):c=e[2];let h;return e[3]!==o||e[4]!==i||e[5]!==u||e[6]!==c?(h=r.jsx(Hi,{rowRef:o,selected:i,connected:u,onSelect:c}),e[3]=o,e[4]=i,e[5]=u,e[6]=c,e[7]=h):h=e[7],h}function qi(t,e){e?.(),!t.connection&&t.set({endpoint:t.lastEndpoint??ol})}function Hi(t){const e=$.c(19),{rowRef:s,selected:a,connected:n,onSelect:o}=t,d=xe(),l=a?"bg-accent":"hover:bg-accent";let i;e[0]!==l?(i=H("flex rounded-lg",l),e[0]=l,e[1]=i):i=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=r.jsx("span",{"data-testid":"localhost-dot",className:"h-2 w-2 shrink-0 rounded-full bg-foreground"}),e[2]=u):u=e[2];let c;e[3]!==d?(c=d("thread.branchPicker.localhost.label"),e[3]=d,e[4]=c):c=e[4];let h;e[5]!==c?(h=r.jsx("span",{className:"min-w-0 flex-1 truncate",children:c}),e[5]=c,e[6]=h):h=e[6];let p;e[7]!==n||e[8]!==d?(p=n&&r.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:d("thread.branchPicker.localhost.connected")}),e[7]=n,e[8]=d,e[9]=p):p=e[9];let b;e[10]!==o||e[11]!==a||e[12]!==h||e[13]!==p?(b=r.jsxs("button",{type:"button","aria-pressed":a,onClick:o,className:"flex w-full min-w-0 items-center gap-2.5 px-2 py-2 text-left text-sm",children:[u,h,p]}),e[10]=o,e[11]=a,e[12]=h,e[13]=p,e[14]=b):b=e[14];let f;return e[15]!==s||e[16]!==i||e[17]!==b?(f=r.jsx("div",{ref:s,className:i,children:b}),e[15]=s,e[16]=i,e[17]=b,e[18]=f):f=e[18],f}const Vi=10080*60*1e3;function Gi({sandboxMap:t,userId:e,rawBranches:s,now:a}){const n=new Map;for(const[h,p]of Object.entries(t??{}))for(const[b,f]of Object.entries(p??{})){let m=n.get(b);m||(m={userIds:new Set,lastActiveAt:0},n.set(b,m)),m.userIds.add(h);for(const g of Object.values(f??{})){const v=g?.createdAt??0;v>m.lastActiveAt&&(m.lastActiveAt=v)}}const o=a-Vi,d=[...n.entries()].filter(([,h])=>h.lastActiveAt>=o).sort((h,p)=>p[1].lastActiveAt-h[1].lastActiveAt).map(([h,p])=>({name:h,source:"recent",contributors:[...p.userIds],lastActiveAt:p.lastActiveAt})),l=new Set(d.map(h=>h.name)),i=new Set(Object.keys(t?.[e]??{})),u=[...i].filter(h=>!l.has(h)).sort().map(h=>({name:h,source:"yours"})),c=s.filter(h=>!i.has(h.name)&&!l.has(h.name)).map(h=>({name:h.name,source:"other",author:h.author??null}));return{recent:d,yours:u,others:c}}const Ji=100,Wi=50,Qi=300;function vn(t,e){const s=e.trim().toLowerCase();return s?t.toLowerCase().includes(s):!0}function Xi(t){const e=$.c(39),{orgId:s,orgSlug:a,userId:n,target:o,sandboxMap:d,owner:l,repo:i,search:u,enabled:c}=t,h=u===void 0?"":u,p=c===void 0?!0:c;let b;e[0]!==h?(b=h.trim(),e[0]=h,e[1]=b):b=e[1];const f=b,m=Tl(f,Qi);let g;e[2]!==o?(g=sa(o),e[2]=o,e[3]=g):g=e[3];const v=g,j=f.length>0;let w;e[4]!==m||e[5]!==s||e[6]!==a||e[7]!==l||e[8]!==i||e[9]!==o?(w=xs.githubBranchSearch(s,a,na(o),l,i,m),e[4]=m,e[5]=s,e[6]=a,e[7]=l,e[8]=i,e[9]=o,e[10]=w):w=e[10];const x=p&&v;let P;e[11]!==m||e[12]!==a||e[13]!==o?(P=T=>{const{pageParam:ee}=T;return Ha(a,"REPOSITORY_SEARCH_BRANCHES",{...o,query:m,limit:m?Wi:Ji,cursor:ee})},e[11]=m,e[12]=a,e[13]=o,e[14]=P):P=e[14];let y;e[15]!==m?(y=T=>m?void 0:T.nextCursor??void 0,e[15]=m,e[16]=y):y=e[16];let N;e[17]!==w||e[18]!==x||e[19]!==P||e[20]!==y?(N={queryKey:w,enabled:x,staleTime:3e4,retry:!1,initialPageParam:null,queryFn:P,getNextPageParam:y},e[17]=w,e[18]=x,e[19]=P,e[20]=y,e[21]=N):N=e[21];const{data:C,isLoading:A,isError:S,isFetching:D,hasNextPage:k,isFetchingNextPage:L,fetchNextPage:I}=$l(N),B=j&&(m!==f||D),F=(C?.pages??[]).flatMap(Yi),O=Bl(6e4),V=Gi({sandboxMap:d,userId:n,rawBranches:F,now:O});let z;e[22]!==f?(z=T=>vn(T.name,f),e[22]=f,e[23]=z):z=e[23];const te=V.recent.filter(z);let M;e[24]!==f?(M=T=>vn(T.name,f),e[24]=f,e[25]=M):M=e[25];const K=V.yours.filter(M),J=V.others,se=C?.pages[0],W=j&&se&&!B?Math.max(0,se.totalCount-se.branches.length):0,ue=!j&&k;let Y;e[26]!==I?(Y=()=>{I()},e[26]=I,e[27]=Y):Y=e[27];let le;return e[28]!==W||e[29]!==S||e[30]!==L||e[31]!==A||e[32]!==B||e[33]!==J||e[34]!==te||e[35]!==ue||e[36]!==Y||e[37]!==K?(le={recent:te,yours:K,others:J,isLoading:A,isError:S,isSearching:B,hiddenMatchCount:W,hasMore:ue,isFetchingMore:L,fetchMore:Y},e[28]=W,e[29]=S,e[30]=L,e[31]=A,e[32]=B,e[33]=J,e[34]=te,e[35]=ue,e[36]=Y,e[37]=K,e[38]=le):le=e[38],le}function Yi(t){return t.branches}function Zi(t){const e=$.c(8),s=xe(),{releases:a,createRelease:n}=cn(t.virtualMcpId),o=$s(t.virtualMcpId);let d;return e[0]!==n||e[1]!==t.kind||e[2]!==t.userId||e[3]!==t.userLabel||e[4]!==o||e[5]!==a||e[6]!==s?(d=()=>{if(a.length>=Qs)return at.error(s("thread.branchPicker.capReached",{max:Qs})),null;const l=t.kind==="blog"?ql(t.userLabel):Hl(t.userLabel);return n({branch:l,name:oa(a,s(Hs(l))),color:ks(a.length),createdBy:t.userId,createdAt:new Date().toISOString(),...o?{runtime:ta(o.metadata)}:{}}).catch(i=>{at.error(s("thread.branchPicker.saveError"),{description:_r(s,Er(i))})}),l},e[0]=n,e[1]=t.kind,e[2]=t.userId,e[3]=t.userLabel,e[4]=o,e[5]=a,e[6]=s,e[7]=d):d=e[7],d}const Zs="-mx-[3px] h-3.5 w-3.5 shrink-0";function eo(t){const e=$.c(120),{virtualMcpId:s,isV8:a,userLabel:n,value:o,baseBranch:d,baseIsDraft:l,orgId:i,orgSlug:u,userId:c,target:h,owner:p,repo:b,sandboxMap:f,onChange:m,onCreateBranch:g,onAdoptBranch:v,disabled:j,spawnsNewChat:w,placement:x,draftKind:P}=t,y=a===void 0?!1:a,N=l===void 0?!1:l,C=j===void 0?!1:j,A=w===void 0?!1:w,S=x===void 0?"chat":x,D=P===void 0?"site":P,k=xe(),I=Bn()?D:null,B=S==="header",[F,O]=U.useState(!1),[V,z]=U.useState(!1),[te,M]=U.useState("branches"),[K,J]=U.useState(null),[se,W]=U.useState(""),[ue,Y]=U.useState(null),[le,T]=U.useState(null),ee=U.useRef(null),{releases:G,createRelease:ne,renameRelease:re,deleteRelease:Se}=cn(s),he=I??void 0;let be;e[0]!==he||e[1]!==c||e[2]!==n||e[3]!==s?(be={virtualMcpId:s,userLabel:n,userId:c,kind:he},e[0]=he,e[1]=c,e[2]=n,e[3]=s,e[4]=be):be=e[4];const ce=Zi(be),{projectDefault:ie}=ys(s);let E;e[5]!==ie?(E=R=>Kl(R,ie)==="sandbox",e[5]=ie,e[6]=E):E=e[6];const fe=E,ke=Ml(s,y),me=y?_l(G,ke.data):[],X=ke.refetch,Z=El(s),{url:Be,setUrl:Q,clear:oe}=An(s),Ne=Rn(s),xt=y&&!!Ne.connection,Xe=y?Ne.connection?.endpoint??null:Be,ye=!!Xe;let ve;e[7]!==oe||e[8]!==y||e[9]!==Ne?(ve=()=>{oe(),y&&Ne.clear()},e[7]=oe,e[8]=y,e[9]=Ne,e[10]=ve):ve=e[10];const Re=ve;let $e;e[11]!==F?($e={enabled:F},e[11]=F,e[12]=$e):$e=e[12];const{data:Ue}=Va($e);let Ie;e[13]!==Ue?.data?.members?(Ie=R=>R?Ue?.data?.members?.find(Pe=>Pe.userId===R)?.user?.name??void 0:void 0,e[13]=Ue?.data?.members,e[14]=Ie):Ie=e[14];const Dt=Ie,Ee=G.length>=Qs;let Oe;e[15]!==I||e[16]!==ie||e[17]!==G?(Oe=R=>!!_s(G,R.branch,I,ie),e[15]=I,e[16]=ie,e[17]=G,e[18]=Oe):Oe=e[18];const pe=Oe,ct=k("thread.branchPicker.capReached",{max:Qs}),{isBase:Ye,current:dt,storeDraft:Le,unlisted:_}=Ei({value:o,baseBranch:d,releases:G,baseIsDraft:N,storeDrafts:me}),ae=Nl(G,I,o);let je;e[19]!==I||e[20]!==o?(je=R=>I===null||Zr(R.name)===I||R.name===o,e[19]=I,e[20]=o,e[21]=je):je=e[21];const De=me.filter(je),Ze=Ye?k("thread.branchPicker.live"):dt?.name??Le?.name??k(Hs(o)),ut=xt?k("thread.branchPicker.localhost.label"):ye?k("thread.branchPicker.localLabel"):o?Ze:k("thread.branchPicker.selectVersion"),Et=xt?"bg-foreground":ye?"bg-special":Ye?"bg-success":Le?Ss(void 0):Ss(dt?.color??"orange"),Ce=!xt&&!ye&&!Ye&&!!dt&&fe(dt),et=R=>{Re();const Pe=me.some(Ct=>Ct.name===R)?{runtime:"cms"}:G.find(Ct=>Ct.branch===R);m(R,Pe&&{runtime:Pe.runtime}),O(!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),O(!1)},e[24]=Q,e[25]=zt):zt=e[25];const js=zt,Tt=(R,Pe)=>{if(Re(),v){v(R),z(!1),O(!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),O(!1)};let vt;e[26]!==Re||e[27]!==m||e[28]!==g||e[29]!==ce?(vt=()=>{const R=ce();R&&(Re(),(g??m)(R),O(!1))},e[26]=Re,e[27]=m,e[28]=g,e[29]=ce,e[30]=vt):vt=e[30];const ws=vt;let st;e[31]===Symbol.for("react.memo_cache_sentinel")?(st=()=>{J(null),W(""),z(!1),M("branches")},e[31]=st):st=e[31];const Bt=st;let yt;e[32]===Symbol.for("react.memo_cache_sentinel")?(yt=R=>{M(R),z(!0)},e[32]=yt):yt=e[32];const jt=yt;let wt;e[33]===Symbol.for("react.memo_cache_sentinel")?(wt=R=>{J(R.branch),W(R.name)},e[33]=wt):wt=e[33];const Ut=wt;let Pt;e[34]!==se||e[35]!==re||e[36]!==tt?(Pt=R=>{const Pe=se.trim();Pe&&re(R,Pe).catch(tt),J(null),W("")},e[34]=se,e[35]=re,e[36]=tt,e[37]=Pt):Pt=e[37];const Kt=Pt,qt=R=>{const Pe=R===void 0?o:R,Ct=se.trim();if(Ct&&Pe){if(Ee){at.error(ct),J(null),W("");return}ne({branch:Pe,name:Ct,color:ks(G.length),createdBy:c,createdAt:new Date().toISOString()}).catch(tt)}J(null),W("")};let St;e[38]===Symbol.for("react.memo_cache_sentinel")?(St=()=>{J(null),W("")},e[38]=St):St=e[38];const ft=St,It=()=>{const R=ue;if(Y(null),!(!R||!pe(R))){if(R.branch===o){const Pe=_s(G,R.branch,I,ie);Pe?et(Pe.branch):O(!1)}else O(!1);Se(R.branch).catch(tt)}},mt=zl(ae,ie),Ps=(mt.content.length>0||De.length>0)&&mt.code.length>0,$t=R=>K===R.branch?r.jsx(mn,{value:se,onChange:W,onSave:()=>Kt(R.branch),onCancel:ft},R.branch):r.jsx(pn,{rowRef:!ye&&R.branch===o?ee:void 0,dot:Ss(R.color),codeIcon:fe(R)?Es(R.color):void 0,label:R.name,creator:Dt(R.createdBy),originTooltip:y?k("thread.branchPicker.viaStudioUi"):void 0,branch:!y||fe(R)?R.branch:void 0,selected:!ye&&R.branch===o,onSelect:()=>et(R.branch),onRename:()=>Ut(R),onDelete:()=>Y(R),deleteBlocked:!pe(R)},R.branch),Ft=()=>{const R=le;if(T(null),!!R){if(R.name===o){const Pe=_s(G,R.name,I,ie);if(!Pe)return;et(Pe.branch)}Z.mutateAsync(R.name).catch(Pe=>{at.error(k("thread.branchPicker.discardStoreDraftError"),{description:Pe instanceof Error?Pe.message:void 0})})}},pt=De.map(R=>K===R.name?r.jsx(mn,{value:se,onChange:W,onSave:()=>qt(R.name),onCancel:ft},`store:${R.name}`):r.jsx(pn,{rowRef:!ye&&R.name===o?ee:void 0,dot:Ss(void 0),label:R.name,creator:Dt(R.createdBy),agentIcon:Es(ks(me.indexOf(R))),originTooltip:k("thread.branchPicker.storeDraftVia",{via:Ul(R.via)}),selected:!ye&&R.name===o,onSelect:()=>et(R.name),onRename:()=>{J(R.name),W(R.name)},onDelete:()=>T(R),deleteBlocked:R.name===o&&!_s(G,R.name,I,ie)},`store:${R.name}`));let Ke;e[39]!==C||e[40]!==y||e[41]!==X?(Ke=C?void 0:R=>{R?y&&X():Bt(),O(R)},e[39]=C,e[40]=y,e[41]=X,e[42]=Ke):Ke=e[42];const nt=B?"text-xs":"text-xs text-muted-foreground hover:text-foreground";let qe;e[43]!==nt?(qe=H("shrink min-w-0 max-w-[220px] gap-2",nt,Kr),e[43]=nt,e[44]=qe):qe=e[44];let He;e[45]!==C?(He=!C&&r.jsx(Vr,{size:12,className:"opacity-60 shrink-0"}),e[45]=C,e[46]=He):He=e[46];let Ve;e[47]!==ut?(Ve=r.jsx(ot,{children:ut}),e[47]=ut,e[48]=Ve):Ve=e[48];const rt=gl,kt="w-[min(300px,calc(100vw-2rem))] p-1.5",Nt="start";let Me;e[49]===Symbol.for("react.memo_cache_sentinel")?(Me=R=>{R.preventDefault(),ee.current?.scrollIntoView({block:"nearest"})},e[49]=Me):Me=e[49];let Ge;e[50]!==A||e[51]!==k?(Ge=A&&r.jsx("p",{className:"px-2 pb-1.5 pt-1 text-xs text-muted-foreground",children:k("thread.branchPicker.newChatHint")}),e[50]=A,e[51]=k,e[52]=Ge):Ge=e[52];const q=V?r.jsx(so,{orgId:i,orgSlug:u,userId:c,target:h,owner:p,repo:b,sandboxMap:f,enabled:F,tab:te,onTabChange:M,isV8:y,localUrl:Be,onSaveLocal:js,onBack:()=>z(!1),onAdopt:Tt,draftKind:I}):r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:H("always-scrollbar flex max-h-[min(50vh,20rem)] flex-col overflow-y-auto",y&&"gap-1"),children:[!y&&ye&&Xe&&r.jsx(to,{rowRef:ee,url:Xe,onSelect:()=>jt("local"),onEdit:()=>jt("local"),onTurnOff:()=>Re()}),_&&o&&(K===o?r.jsx(mn,{value:se,onChange:W,onSave:()=>qt(),onCancel:ft}):r.jsx(pn,{rowRef:ye?void 0:ee,dot:Ss("orange"),label:k(Hs(o)),branch:y?void 0:o,originTooltip:y?k("thread.branchPicker.viaStudioUi"):void 0,selected:!ye,onSelect:()=>et(o),onRename:()=>{J(o),W(oa(G,k(Hs(o))))}})),Ps?r.jsxs(r.Fragment,{children:[r.jsx(or,{children:k("thread.branchPicker.groupContent")}),mt.content.map($t),pt,r.jsx(or,{divided:!0,children:k("thread.branchPicker.groupCode")}),mt.code.map($t)]}):r.jsxs(r.Fragment,{children:[ae.map($t),pt]}),y&&r.jsx(Ki,{virtualMcpId:s,branch:o,serve:Ne,rowRef:xt?ee:void 0,onPicked:()=>O(!1)})]}),(_||ae.length>0||De.length>0||y)&&r.jsx("div",{className:"my-1 border-t"}),r.jsxs("button",{type:"button",onClick:()=>{ws()},disabled:Ee,className:"flex w-full items-center gap-2 rounded-lg px-2 py-2 text-left text-sm text-muted-foreground hover:bg-accent hover:text-foreground disabled:pointer-events-none disabled:opacity-50",children:[r.jsx(Yr,{className:"h-4 w-4 shrink-0"}),k("thread.branchPicker.newVersion")]}),Ee&&r.jsx("p",{className:"px-2 pb-1 pt-0.5 text-xs text-warning",children:ct}),r.jsxs("button",{type:"button",onClick:()=>jt("branches"),className:H("flex w-full items-center justify-between gap-2 rounded-lg px-2 py-2 text-left text-xs text-muted-foreground hover:bg-accent hover:text-foreground",y&&"mt-1"),children:[k("thread.branchPicker.advanced"),r.jsx(Pr,{className:"h-4 w-4 shrink-0"})]})]});let de;e[53]!==rt||e[54]!==Me||e[55]!==Ge||e[56]!==q?(de=r.jsxs(rt,{className:kt,align:Nt,onOpenAutoFocus:Me,children:[Ge,q]}),e[53]=rt,e[54]=Me,e[55]=Ge,e[56]=q,e[57]=de):de=e[57];const we=r.jsxs(xl,{open:F,onOpenChange:Ke,children:[r.jsxs(lt,{children:[r.jsx(it,{asChild:!0,children:r.jsx("span",{className:"inline-flex min-w-0 shrink",children:r.jsx(vl,{asChild:!0,children:r.jsxs(ge,{"data-tour":bl.branchPicker,variant:B?"outline":"ghost",size:B?"sm":"default","aria-label":ut,disabled:C,className:qe,children:[Ce?r.jsx(Gr,{className:H(Zs,Es(dt?.color))}):Le&&!ye?r.jsx(Sr,{className:H(Zs,Es(ks(me.indexOf(Le))))}):r.jsx("span",{className:H("h-2 w-2 shrink-0 rounded-full",o||ye?Et:"bg-muted-foreground")}),r.jsx("span",{className:"min-w-0 truncate @max-3xl/panel-header:hidden",children:ut}),He]})})})}),Ve]}),de]}),Te=ue!==null;let _e;e[58]===Symbol.for("react.memo_cache_sentinel")?(_e=R=>{R||Y(null)},e[58]=_e):_e=e[58];let Je;e[59]!==k?(Je=k("thread.branchPicker.deleteTitle"),e[59]=k,e[60]=Je):Je=e[60];let Ht;e[61]!==Je?(Ht=r.jsx(Ns,{children:Je}),e[61]=Je,e[62]=Ht):Ht=e[62];let Vt;e[63]!==ue||e[64]!==k?(Vt=ue&&k("thread.branchPicker.deleteConfirm",{name:ue.name}),e[63]=ue,e[64]=k,e[65]=Vt):Vt=e[65];let Gt;e[66]!==Vt?(Gt=r.jsx(Cs,{children:Vt}),e[66]=Vt,e[67]=Gt):Gt=e[67];let Jt;e[68]!==Ht||e[69]!==Gt?(Jt=r.jsxs(As,{children:[Ht,Gt]}),e[68]=Ht,e[69]=Gt,e[70]=Jt):Jt=e[70];let Wt;e[71]!==k?(Wt=k("thread.branchPicker.cancel"),e[71]=k,e[72]=Wt):Wt=e[72];let Qt;e[73]!==Wt?(Qt=r.jsx(Js,{children:Wt}),e[73]=Wt,e[74]=Qt):Qt=e[74];let Xt;e[75]!==k?(Xt=k("thread.branchPicker.delete"),e[75]=k,e[76]=Xt):Xt=e[76];let Yt;e[77]!==It||e[78]!==Xt?(Yt=r.jsx(Ws,{onClick:It,variant:"destructive",children:Xt}),e[77]=It,e[78]=Xt,e[79]=Yt):Yt=e[79];let Zt;e[80]!==Qt||e[81]!==Yt?(Zt=r.jsxs(Rs,{children:[Qt,Yt]}),e[80]=Qt,e[81]=Yt,e[82]=Zt):Zt=e[82];let es;e[83]!==Jt||e[84]!==Zt?(es=r.jsxs(Ds,{children:[Jt,Zt]}),e[83]=Jt,e[84]=Zt,e[85]=es):es=e[85];let Os;e[86]!==Te||e[87]!==es?(Os=r.jsx(Ts,{open:Te,onOpenChange:_e,children:es}),e[86]=Te,e[87]=es,e[88]=Os):Os=e[88];const hn=le!==null;let Ls;e[89]===Symbol.for("react.memo_cache_sentinel")?(Ls=R=>{R||T(null)},e[89]=Ls):Ls=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:Ls,children:us}),e[117]=hn,e[118]=us,e[119]=Ms):Ms=e[119],r.jsxs(r.Fragment,{children:[we,Os,Ms]})}function mn(t){const e=$.c(20),{value:s,onChange:a,onSave:n,onCancel:o}=t,d=xe();let l;e[0]!==d?(l=d("thread.branchPicker.rename"),e[0]=d,e[1]=l):l=e[1];let i;e[2]!==a?(i=f=>a(f.target.value),e[2]=a,e[3]=i):i=e[3];let u;e[4]!==o||e[5]!==n?(u=f=>{f.key==="Enter"&&n(),f.key==="Escape"&&(f.preventDefault(),f.stopPropagation(),o())},e[4]=o,e[5]=n,e[6]=u):u=e[6];let c;e[7]!==l||e[8]!==i||e[9]!==u||e[10]!==s?(c=r.jsx("input",{autoFocus:!0,"aria-label":l,value:s,onChange:i,onKeyDown:u,className:"h-8 flex-1 rounded-md border bg-transparent px-2 text-sm focus-ring"}),e[7]=l,e[8]=i,e[9]=u,e[10]=s,e[11]=c):c=e[11];let h;e[12]!==d?(h=d("thread.branchPicker.save"),e[12]=d,e[13]=h):h=e[13];let p;e[14]!==n||e[15]!==h?(p=r.jsx(ge,{size:"sm",onClick:n,children:h}),e[14]=n,e[15]=h,e[16]=p):p=e[16];let b;return e[17]!==c||e[18]!==p?(b=r.jsxs("div",{className:"flex items-center gap-1.5 p-1",children:[c,p]}),e[17]=c,e[18]=p,e[19]=b):b=e[19],b}function or(t){const e=$.c(5),{divided:s,children:a}=t,o=(s===void 0?!1:s)&&"mt-1 border-t";let d;e[0]!==o?(d=H("px-2 pb-1 pt-2 text-xs font-medium uppercase tracking-wide text-muted-foreground",o),e[0]=o,e[1]=d):d=e[1];let l;return e[2]!==a||e[3]!==d?(l=r.jsx("p",{className:d,children:a}),e[2]=a,e[3]=d,e[4]=l):l=e[4],l}function pn(t){const e=$.c(53),{rowRef:s,dot:a,codeIcon:n,agentIcon:o,originTooltip:d,label:l,creator:i,branch:u,selected:c,onSelect:h,onRename:p,onDelete:b,deleteBlocked:f}=t,m=f===void 0?!1:f,g=xe();let v;e[0]!==o||e[1]!==n||e[2]!==a?(v=n?r.jsx(Gr,{className:H(Zs,n)}):o?r.jsx(Sr,{className:H(Zs,o)}):r.jsx("span",{className:H("h-2 w-2 shrink-0 rounded-full",a)}),e[0]=o,e[1]=n,e[2]=a,e[3]=v):v=e[3];let j;e[4]!==i?(j=i&&r.jsx("span",{className:"ml-1.5 text-xs font-normal text-muted-foreground/70",children:i}),e[4]=i,e[5]=j):j=e[5];let w;e[6]!==l||e[7]!==j?(w=r.jsxs("span",{className:"min-w-0 flex-1 truncate",children:[l,j]}),e[6]=l,e[7]=j,e[8]=w):w=e[8];let x;e[9]!==h||e[10]!==c||e[11]!==v||e[12]!==w?(x=r.jsxs("button",{type:"button","aria-pressed":c,onClick:h,className:"flex min-w-0 flex-1 items-center gap-2.5 px-2 py-2 text-left text-sm",children:[v,w]}),e[9]=h,e[10]=c,e[11]=v,e[12]=w,e[13]=x):x=e[13];const P=x,y=c?"bg-accent":"hover:bg-accent";let N;e[14]!==y?(N=H("group flex items-center rounded-lg",y),e[14]=y,e[15]=N):N=e[15];let C;e[16]!==u||e[17]!==n||e[18]!==d||e[19]!==P||e[20]!==g?(C=u||d?r.jsxs(lt,{children:[r.jsx(it,{asChild:!0,children:P}),r.jsxs(ot,{side:"bottom",className:"text-xs",children:[n&&r.jsx("p",{className:"font-medium",children:g("thread.branchPicker.codeDraftTooltip")}),d&&r.jsx("p",{children:d}),u&&r.jsx("p",{className:"font-mono",children:g("thread.branchPicker.branchTooltip",{branch:u})})]})]}):P,e[16]=u,e[17]=n,e[18]=d,e[19]=P,e[20]=g,e[21]=C):C=e[21];let A;e[22]!==g?(A=g("thread.branchPicker.moreActions"),e[22]=g,e[23]=A):A=e[23];let S;e[24]===Symbol.for("react.memo_cache_sentinel")?(S=r.jsx(Qr,{className:"h-4 w-4"}),e[24]=S):S=e[24];let D;e[25]!==A?(D=r.jsx(tn,{asChild:!0,children:r.jsx(ge,{variant:"ghost",size:"icon","aria-label":A,className:"mr-1 h-6 w-6 shrink-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100",children:S})}),e[25]=A,e[26]=D):D=e[26];let k;e[27]===Symbol.for("react.memo_cache_sentinel")?(k=r.jsx(Xr,{className:"h-4 w-4"}),e[27]=k):k=e[27];let L;e[28]!==g?(L=g("thread.branchPicker.rename"),e[28]=g,e[29]=L):L=e[29];let I;e[30]!==p||e[31]!==L?(I=r.jsxs(ms,{onSelect:p,children:[k,L]}),e[30]=p,e[31]=L,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 O;e[41]!==I||e[42]!==B||e[43]!==F?(O=r.jsxs(sn,{align:"end",children:[I,B,F]}),e[41]=I,e[42]=B,e[43]=F,e[44]=O):O=e[44];let V;e[45]!==D||e[46]!==O?(V=r.jsxs(nn,{children:[D,O]}),e[45]=D,e[46]=O,e[47]=V):V=e[47];let z;return e[48]!==s||e[49]!==V||e[50]!==N||e[51]!==C?(z=r.jsxs("div",{ref:s,className:N,children:[C,V]}),e[48]=s,e[49]=V,e[50]=N,e[51]=C,e[52]=z):z=e[52],z}function to(t){const e=$.c(40),{rowRef:s,url:a,onSelect:n,onEdit:o,onTurnOff:d}=t,l=xe();let i;try{let D;e[0]!==a?(D=new URL(a),e[0]=a,e[1]=D):D=e[1],i=D.host}catch{i=a}const u=i;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=r.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full bg-special"}),e[2]=c):c=e[2];let h;e[3]!==l?(h=l("thread.branchPicker.localLabel"),e[3]=l,e[4]=h):h=e[4];let p;e[5]!==u?(p=r.jsx("span",{className:"ml-1.5 text-xs font-normal text-muted-foreground/70",children:u}),e[5]=u,e[6]=p):p=e[6];let b;e[7]!==h||e[8]!==p?(b=r.jsxs("span",{className:"min-w-0 flex-1 truncate",children:[h,p]}),e[7]=h,e[8]=p,e[9]=b):b=e[9];let f;e[10]!==n||e[11]!==b?(f=r.jsxs("button",{type:"button","aria-pressed":!0,onClick:n,className:"flex min-w-0 flex-1 items-center gap-2.5 px-2 py-2 text-left text-sm",children:[c,b]}),e[10]=n,e[11]=b,e[12]=f):f=e[12];let m;e[13]!==l?(m=l("thread.branchPicker.moreActions"),e[13]=l,e[14]=m):m=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=r.jsx(Qr,{className:"h-4 w-4"}),e[15]=g):g=e[15];let v;e[16]!==m?(v=r.jsx(tn,{asChild:!0,children:r.jsx(ge,{variant:"ghost",size:"icon","aria-label":m,className:"mr-1 h-6 w-6 shrink-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100",children:g})}),e[16]=m,e[17]=v):v=e[17];let j;e[18]===Symbol.for("react.memo_cache_sentinel")?(j=r.jsx(Xr,{className:"h-4 w-4"}),e[18]=j):j=e[18];let w;e[19]!==l?(w=l("thread.branchPicker.rename"),e[19]=l,e[20]=w):w=e[20];let x;e[21]!==o||e[22]!==w?(x=r.jsxs(ms,{onSelect:o,children:[j,w]}),e[21]=o,e[22]=w,e[23]=x):x=e[23];let P;e[24]===Symbol.for("react.memo_cache_sentinel")?(P=r.jsx(on,{className:"h-4 w-4"}),e[24]=P):P=e[24];let y;e[25]!==l?(y=l("thread.branchPicker.localTurnOff"),e[25]=l,e[26]=y):y=e[26];let N;e[27]!==d||e[28]!==y?(N=r.jsxs(ms,{onSelect:d,className:"text-destructive focus:text-destructive",children:[P,y]}),e[27]=d,e[28]=y,e[29]=N):N=e[29];let C;e[30]!==x||e[31]!==N?(C=r.jsxs(sn,{align:"end",children:[x,N]}),e[30]=x,e[31]=N,e[32]=C):C=e[32];let A;e[33]!==C||e[34]!==v?(A=r.jsxs(nn,{children:[v,C]}),e[33]=C,e[34]=v,e[35]=A):A=e[35];let S;return e[36]!==s||e[37]!==A||e[38]!==f?(S=r.jsxs("div",{ref:s,className:"group flex items-center rounded-lg bg-accent",children:[f,A]}),e[36]=s,e[37]=A,e[38]=f,e[39]=S):S=e[39],S}function so(t){const e=$.c(75),{orgId:s,orgSlug:a,userId:n,target:o,owner:d,repo:l,sandboxMap:i,enabled:u,tab:c,onTabChange:h,isV8:p,localUrl:b,onSaveLocal:f,onBack:m,onAdopt:g,draftKind:v}=t,j=xe(),[w,x]=U.useState(""),P=c==="branches"?w:"",y=u&&c==="branches";let N;e[0]!==s||e[1]!==a||e[2]!==d||e[3]!==l||e[4]!==i||e[5]!==P||e[6]!==y||e[7]!==o||e[8]!==n?(N={orgId:s,orgSlug:a,userId:n,target:o,sandboxMap:i,owner:d,repo:l,search:P,enabled:y},e[0]=s,e[1]=a,e[2]=d,e[3]=l,e[4]=i,e[5]=P,e[6]=y,e[7]=o,e[8]=n,e[9]=N):N=e[9];const{recent:C,yours:A,others:S,isLoading:D,hasMore:k,isFetchingMore:L,fetchMore:I}=Xi(N),B=u&&c==="prs";let F;e[10]!==s||e[11]!==a||e[12]!==d||e[13]!==l||e[14]!==B||e[15]!==o?(F={orgId:s,orgSlug:a,target:o,owner:d,repo:l,enabled:B},e[10]=s,e[11]=a,e[12]=d,e[13]=l,e[14]=B,e[15]=o,e[16]=F):F=e[16];const{data:O,isLoading:V}=Fl(F);let z;if(e[17]!==v||e[18]!==I||e[19]!==k||e[20]!==L||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]!==O||e[36]!==c||e[37]!==A){const te=O===void 0?[]:O,M=`${d}/${l}`;let K;e[39]!==M?(K=M.toLowerCase(),e[39]=M,e[40]=K):K=e[40];const J=K;let se;e[41]!==J?(se=E=>E.headRepoFullName?.toLowerCase()===J,e[41]=J,e[42]=se):se=e[42];const W=te.filter(se);let ue;if(e[43]!==v||e[44]!==S||e[45]!==C||e[46]!==A){const E=new Set;ue=[...C,...A,...S].filter(fe=>E.has(fe.name)?!1:(E.add(fe.name),v!=="site"||Zr(fe.name)==="site")),e[43]=v,e[44]=S,e[45]=C,e[46]=A,e[47]=ue}else ue=e[47];const Y=ue;let le;e[48]===Symbol.for("react.memo_cache_sentinel")?(le=r.jsx(Pl,{className:"h-4 w-4 shrink-0"}),e[48]=le):le=e[48];let T;e[49]!==j?(T=j("thread.branchPicker.advancedBack"),e[49]=j,e[50]=T):T=e[50];let ee;e[51]!==m||e[52]!==T?(ee=r.jsxs("button",{type:"button",onClick:m,className:"flex items-center gap-1.5 px-2 py-1.5 text-xs text-muted-foreground hover:text-foreground",children:[le,T]}),e[51]=m,e[52]=T,e[53]=ee):ee=e[53];let G;e[54]!==h?(G=E=>{h(E),x("")},e[54]=h,e[55]=G):G=e[55];let ne;e[56]!==j?(ne=j("thread.branchPicker.branchesTab"),e[56]=j,e[57]=ne):ne=e[57];let re;e[58]!==ne?(re=r.jsx(Ot,{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(Ot,{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(Ot,{value:"local",className:"h-6 px-2.5 text-xs",children:j("thread.branchPicker.localTab")}),e[64]=p,e[65]=j,e[66]=be):be=e[66];let ce;e[67]!==re||e[68]!==he||e[69]!==be?(ce=r.jsxs(qr,{className:"h-auto w-fit justify-start gap-1 bg-accent p-1",variant:"pill",children:[re,he,be]}),e[67]=re,e[68]=he,e[69]=be,e[70]=ce):ce=e[70];let ie;e[71]!==G||e[72]!==ce||e[73]!==c?(ie=r.jsx(Hr,{className:"px-2 pt-2 pb-1",value:c,onValueChange:G,children:ce}),e[71]=G,e[72]=ce,e[73]=c,e[74]=ie):ie=e[74],z=r.jsxs("div",{className:"flex flex-col",children:[ee,ie,c==="local"&&!p?r.jsx(Ui,{url:b,onSave:f}):r.jsxs(yl,{filter:c==="branches"?no:void 0,children:[r.jsx(jl,{placeholder:j(c==="branches"?"thread.branchPicker.searchBranches":"thread.branchPicker.searchPullRequests"),value:w,onValueChange:x}),r.jsx(wl,{onScroll:E=>{const fe=E.currentTarget;c==="branches"&&fe.scrollHeight-fe.scrollTop-fe.clientHeight<48&&I()},children:c==="branches"?r.jsxs(r.Fragment,{children:[D&&r.jsx("div",{className:"p-3 text-xs text-muted-foreground",children:j("thread.branchPicker.loadingMore")}),!D&&Y.length===0&&r.jsx(tr,{children:j("thread.branchPicker.noBranchesFound")}),Y.length>0&&r.jsx(sr,{children:Y.map(E=>r.jsxs(nr,{value:E.name,className:"cursor-pointer",onSelect:()=>g(E.name,E.name),children:[r.jsx(Ga,{className:"mr-2 h-4 w-4 shrink-0"}),r.jsx("span",{className:"flex-1 truncate",children:E.name})]},E.name))}),k&&r.jsx("div",{className:"p-2",children:r.jsx(ge,{variant:"ghost",size:"sm",className:"h-7 w-full text-xs",disabled:L,onClick:I,children:j(L?"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]=L,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]=O,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=Ol(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 L=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 O=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:L,onCreateBranch:B,onAdoptBranch:O,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 Lt(){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:Xs(i,h),pagePath:null,isSiteApp:b,status:l,filepaths:[o],sections:l==="edited"?[{name:Xs(i,h),kind:"section",status:"edited",fields:bs(Rt(u,c,[]))}].filter(f=>f.fields.length>0):[],fromJson:Fe(u),toJson:Fe(c)})}return Sa({pages:e,blocks:s,other:a,generated:n})}function gn(t,e){return(t.filepaths[0]??"").localeCompare(e.filepaths[0]??"")}function Sa(t){const{pages:e,blocks:s,other:a,generated:n}=t;return e.sort(gn),s.sort(gn),a.sort(gn),{pages:e,blocks:s,other:a,generated:n,count:e.length+s.length+a.length}}function No(t){return t==="added"?"new":t==="removed"?"removed":"edited"}function ka(t){return t.startsWith("pages-")}function Na(t){const{files:e,lookup:s,diff:a}=t,n=[],o=[],d=[],l=[];for(const i of e){const u=i.path;if(Mn(u)){l.push(u);continue}const c=No(i.status),h=qn(u);if(!h){d.push(wn(u,c));continue}const p=a?.diffs[u],b=en(p?.from??null),f=en(p?.to??null),m=Ca(s,h),g=m??f??b;if((m?hs(h,m):null)??(!m&&ka(h))){const w=g?hs(h,g):null;n.push({kind:"page",blockKey:h,name:w?.name??ua(h),pagePath:w?.path??null,isSiteApp:!1,status:c,filepaths:[u],sections:c==="edited"?Vn(b,f).map(x=>({...x,fields:bs(x.fields)})):[],fromJson:Fe(b),toJson:Fe(f??(c==="new"?m:null))});continue}const j=Xs(h,g??{});o.push({kind:"block",blockKey:h,name:j,pagePath:null,isSiteApp:Fn(h,m??{}),status:c,filepaths:[u],sections:c==="edited"?[{name:j,kind:"section",status:"edited",fields:bs(Rt(b,f,[]))}].filter(w=>w.fields.length>0):[],fromJson:Fe(b),toJson:Fe(f)})}return Sa({pages:n,blocks:o,other:d,generated:l})}function Ca(t,e){const s=t?.[e];return s&&typeof s=="object"&&!Array.isArray(s)?s:null}function Co(t,e){return t??e}function Aa(t){return t.length<=1?t[0]??"":`${t.slice(0,-1).join(", ")} and ${t[t.length-1]}`}const xn=3;function zs(t){if(t.length<=xn)return Aa(t);const e=t.length-xn;return`${t.slice(0,xn).join(", ")} and ${e} more`}function Ao(t,e){if(!e){const a=t.sections.filter(n=>n.kind==="section").map(n=>n.name).slice(0,3);return a.length>0?`${t.name} (${a.join(", ")})`:t.name}const s=[...new Set(t.sections.filter(a=>a.kind==="section").flatMap(a=>a.wrapper?a.held??[]:[a.name]))].slice(0,3);return s.length>0?`${t.name} (${s.join(", ")})`:t.name}function Ro(t){const e=ja(t);return e==="experiments"?"A/B tests":e==="campaigns"?"Campaign dates":t.name}function Do(t){const e=[],s=t.pages.filter(l=>l.status==="edited"),a=t.pages.filter(l=>l.status==="new"),n=t.pages.filter(l=>l.status==="removed");if(s.length>0&&e.push(`updated ${zs(s.map(l=>Ao(l,!!t.v8)))}`),a.length>0){const l=a.length===1?"page":"pages";e.push(`added the ${zs(a.map(i=>i.name))} ${l}`)}if(n.length>0){const l=n.length===1?"page":"pages";e.push(`removed the ${zs(n.map(i=>i.name))} ${l}`)}const o=t.blocks.map(Ro);if(o.length>0&&e.push(`changed ${zs(o)}`),t.other.length>0){const l=t.other.length===1?"file":"files";e.push(`changed ${t.other.length} ${l}`)}if(e.length===0)return"";const d=Aa(e);return 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(Xa(h.file))===Zn(c)).map(h=>h.side))],u=Object.keys(e).sort((c,h)=>c<h?-1:c>h?1:0);for(const c of u){const h=e[c],p=h.kind==="delete"?"removed":h.baseVersion===null?"new":"edited",b=s?.entries[c],f=b?.before??null,m=b?.after??null,g=Ca(a,c),v=g??m??f,j=i(c),w={blockKey:c,status:p,filepaths:[],entry:{name:c,version:h.version},...j.length>0?{unreadable:j}:{},fromJson:Fe(f),toJson:Fe(m??(p==="new"?g:null))},x=g?hs(c,g,n):null,P=!g&&v?hs(c,v,n):null;if(x??P??(!v&&ka(c))){const S=v?hs(c,v,n):null;d.push({...w,kind:"page",name:S?.name??ua(c),pagePath:S?.path??null,isSiteApp:!1,sections:p==="edited"?Vn(f,m,!0).map(D=>({...D,fields:bs(D.fields)})):[]});continue}const y=o?Xl(c,v,g,m,f):null,N=y?Yl(y,[v,g,m,f]):Xs(c,v??{}),C=go(c,[g,m,f]),A=jo(c,[g,m,f]);l.push({...w,kind:"block",name:A?"Settings":N,...A?{cmsSettings:!0}:{},...y?{blogKind:y}:{},...C?{namedRule:C}:{},pagePath:null,isSiteApp:Fn(c,g??v??{}),sections:p==="edited"?[{name:A?"Settings":N,kind:"section",status:"edited",fields:bs(A?wo(f,m):Rt(f,m,[]))}].filter(S=>S.fields.length>0):[]})}return{pages:d,blocks:l,other:[],generated:[],count:d.length+l.length,v8:!0}}function Ae(t){return t.filepaths[0]??t.blockKey??t.name}function Fo(t,e){return e(t==="new"?"thread.publishPopover.chipNew":t==="removed"?"thread.publishPopover.chipRemoved":"thread.publishPopover.chipEdited")}function Oo(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 Lo(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=Lo(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=Oo(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 L;e[42]!==D||e[43]!==k||e[44]!==N?(L=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]=L):L=e[45],v=r.jsxs(va,{className:P,"data-change-id":y,onClick:o,children:[L,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("/"),L=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:L}),I&&r.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:I}),o?r.jsxs(nn,{children:[r.jsx(tn,{asChild:!0,children:r.jsx("button",{type:"button",className:"flex h-6 w-6 shrink-0 items-center justify-center text-muted-foreground hover:bg-accent hover:text-foreground rounded-lg",children:r.jsx(Ya,{className:"h-3.5 w-3.5"})})}),r.jsx(sn,{align:"end",children:r.jsx(ms,{className:"text-destructive focus:text-destructive",onSelect:()=>m(x),children:"Discard changes"})})]}):null]}),f===x&&o?r.jsxs("div",{className:H("flex items-center justify-between gap-3 border-t bg-destructive/5 py-2.5",u),children:[r.jsxs("span",{className:"text-xs text-destructive",children:["Discard all changes to"," ",r.jsx("span",{className:"font-medium",children:L}),"? 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=On(a.path,s.params);return At(n).length===0?n:a.path}function Wo(t){return t.sectionKey&&!t.v8?Go(t.previewServerUrl,t.sectionKey):Xo(t.previewServerUrl,t.path)}function Qo(t,e){if(t.kind!=="page")return"/";const s=t.pagePath;if(!s)return"";if(At(s).length===0)return s;if(e?.path!==s)return"";const a=On(s,e.params);return At(a).length===0?a:""}function Xo(t,e){const s=e.trim();if(!s||At(s).length>0)return null;try{const a=new URL(t),n=new URL(s.startsWith("/")?s:`/${s}`,a);return n.origin===a.origin?n:null}catch{return null}}function Yo(t,e){return e?.kind==="pointer"&&e.link?Dn(t.toString(),e.link):Ba(t,e)}function Ba(t,e){if(!e)return null;if(e.kind==="pointer")return Dn(t.toString(),e.pointer);try{return new URL(`${t.pathname}${t.search}`,e.previewUrl).href}catch{return null}}function Zo(t,e,s){return e===null?!1:t!=="other"||s?.kind==="sandbox"}function ec(t,e){const s=e?t.kind==="page":t.kind!=="other";return{before:s&&t.status==="new"?"new":null,after:s&&t.status==="removed"?"removed":null}}const Ia=U.createContext(!0),tc=["split","before","after","code"];function sc(t){return tc.includes(t)}const $a={desktop:1280,mobile:412};function nc(t,e){const s=(o,d)=>t.unreadable?.includes(d)?e:o?`${JSON.stringify(o,null,2)}
|
|
2
2
|
`:null,a=t.status==="new"?null:s(t.fromJson,"before"),n=t.status==="removed"?null:s(t.toJson,"after");return a===null&&n===null?{diffs:{}}:t.status==="edited"&&(a===null||n===null)?{diffs:{}}:{diffs:{[tl(t.entry.name)]:{from:a,to:n}}}}function rc(t,e){return{from:t.fromJson?`${JSON.stringify(t.fromJson,null,2)}
|
|
3
3
|
`:e.from,to:t.toJson?`${JSON.stringify(t.toJson,null,2)}
|
|
4
4
|
`:e.to}}function Fa(t){const e=$.c(79),{change:s,diff:a,bodyPending:n,previewServerUrl:o,draft:d,lastPage:l,v8:i,onReady:u}=t,c=xe(),h=U.use(Ia),p=Ho(s),b=i?null:p,f=i?p:null,m=f?Jo(f,i?.blocks,l):void 0,g=f!==null&&m===null,v=Zo(s.kind,o,d)&&(f===null||typeof m=="string"),[j,w]=U.useState(null),x=v?j??"split":"code",[P,y]=U.useState("desktop"),[N,C]=U.useState(null),A=N??(f?m??"":Qo(s,l));let S;e[0]!==s?(S=Vo(s),e[0]=s,e[1]=S):S=e[1];const D=S,k=o?Wo({previewServerUrl:o,sectionKey:p,path:A,v8:!!i}):null,L=k?Dn(k.toString(),dl):null,I=k?Ba(k,d):null,B=k?Yo(k,d):null;let F;e[2]!==s?(F=Io(s),e[2]=s,e[3]=F):F=e[3];const O=F;let V;e[4]!==s||e[5]!==a?.diffs||e[6]!==O||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,O?rc(s,oe):oe]]:[]}))},e[4]=s,e[5]=a?.diffs,e[6]=O,e[7]=c,e[8]=V):V=e[8];const z=V;let te;e[9]!==z.diffs?(te=Object.keys(z.diffs),e[9]=z.diffs,e[10]=te):te=e[10];const M=te.length>0;let K;e:{if(b!==null){K=null;break e}if(f!==null){const oe=A.trim();if(!oe){K=null;break e}K=At(oe).length>0?c("thread.publishCompare.dynamicHint",{template:oe}):c("thread.publishCompare.blockHint",{path:oe});break e}if(s.kind!=="page"){let oe;e[11]!==c?(oe=c("thread.publishCompare.globalHint"),e[11]=c,e[12]=oe):oe=e[12],K=oe;break e}let Q;e[13]!==s.pagePath||e[14]!==c?(Q=s.pagePath&&At(s.pagePath).length>0?c("thread.publishCompare.dynamicHint",{template:s.pagePath}):null,e[13]=s.pagePath,e[14]=c,e[15]=Q):Q=e[15],K=Q}const J=K,se=ec(s,!!i),[W,ue]=U.useState(ac);let Y;e[16]===Symbol.for("react.memo_cache_sentinel")?(Y=Q=>ue(oe=>oe.has(Q)?oe:new Set(oe).add(Q)),e[16]=Y):Y=e[16];const le=Y;let T;e[17]!==i?(T=Q=>i?r.jsx(oc,{...Q,onLoaded:le}):r.jsx(ic,{...Q}),e[17]=i,e[18]=T):T=e[18];const ee=T,ne=(v?[se.before==="new"?null:L,se.after==="removed"?null:I].flatMap(Q=>Q?[Kn(Q,P)]:[]):[]).every(Q=>W.has(Q));let re;e[19]!==u||e[20]!==ne?(re=ne&&u?Q=>{Q&&u()}:void 0,e[19]=u,e[20]=ne,e[21]=re):re=e[21];const Se=re,he=se.before==="new"?r.jsx(Us,{icon:r.jsx(Yr,{className:"size-5 text-brand"}),title:c("thread.publishCompare.newTitle"),description:c("thread.publishCompare.newDescription")}):ee({url:L,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(Ot,{value:"split",className:"px-3 text-xs",children:c("thread.publishCompare.sideBySide")}),r.jsx(Ot,{value:"before",className:"px-3 text-xs",children:c("thread.publishCompare.before")}),r.jsx(Ot,{value:"after",className:"px-3 text-xs",children:c("thread.publishCompare.after")})]}):null,h?r.jsx(Ot,{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(Ys,{className:"size-5 text-muted-foreground"}),title:c("thread.publishCompare.previewNotReadyTitle"),description:c("thread.publishCompare.draftUnavailable")}):r.jsx(Us,{icon:r.jsx(Ys,{className:"size-5 text-muted-foreground"}),title:c("thread.publishCompare.noPreviewTitle"),description:c("thread.publishCompare.noPreviewDescription")}):null,e[51]=o,e[52]=h,e[53]=c,e[54]=f,e[55]=m,e[56]=x,e[57]=me):me=e[57];let X;e[58]!==n||e[59]!==M||e[60]!==z||e[61]!==h||e[62]!==c||e[63]!==x?(X=x==="code"&&h?r.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto bg-background [scrollbar-width:thin]",children:M?r.jsx(qo,{diff:z,hideFileRows:!0,editorHeight:"70vh"}):n?r.jsx(Qe,{className:"m-4 h-64 rounded"}):r.jsx("p",{className:"px-4 py-6 text-xs text-muted-foreground",children:c("thread.publishPopover.detailsUnavailable")})}):null,e[58]=n,e[59]=M,e[60]=z,e[61]=h,e[62]=c,e[63]=x,e[64]=X):X=e[64];let Z;e[65]!==be||e[66]!==he||e[67]!==v||e[68]!==c||e[69]!==x?(Z=v?r.jsxs("div",{className:H("flex min-h-0 flex-1 gap-3 p-3",x==="code"&&"hidden"),children:[r.jsx(mr,{label:c("thread.publishCompare.before"),hidden:x==="after",children:he}),r.jsx(mr,{label:c("thread.publishCompare.after"),highlight:!0,hidden:x==="before",children:be})]}):null,e[65]=be,e[66]=he,e[67]=v,e[68]=c,e[69]=x,e[70]=Z):Z=e[70];let Be;return e[71]!==Se||e[72]!==E||e[73]!==fe||e[74]!==ke||e[75]!==me||e[76]!==X||e[77]!==Z?(Be=r.jsxs("div",{ref:Se,className:"flex min-h-0 min-w-0 flex-1 flex-col bg-muted/40",children:[E,fe,ke,me,X,Z]}),e[71]=Se,e[72]=E,e[73]=fe,e[74]=ke,e[75]=me,e[76]=X,e[77]=Z,e[78]=Be):Be=e[78],Be}function ac(){return new Set}function fr(t){const e=$.c(8),{active:s,label:a,onClick:n,children:o}=t,d=s&&"bg-accent text-foreground";let l;e[0]!==d?(l=H("flex size-7 items-center justify-center rounded-md text-muted-foreground transition-colors hover:text-foreground",d),e[0]=d,e[1]=l):l=e[1];let i;return e[2]!==s||e[3]!==o||e[4]!==a||e[5]!==n||e[6]!==l?(i=r.jsx("button",{type:"button","aria-label":a,"aria-pressed":s,title:a,onClick:n,className:l,children:o}),e[2]=s,e[3]=o,e[4]=a,e[5]=n,e[6]=l,e[7]=i):i=e[7],i}function mr(t){const e=$.c(18),{label:s,highlight:a,hidden:n,children:o}=t,d=a===void 0?!1:a,i=(n===void 0?!1:n)&&"hidden";let u;e[0]!==i?(u=H("flex min-h-0 min-w-0 flex-1 flex-col gap-1.5",i),e[0]=i,e[1]=u):u=e[1];const c=d&&"bg-brand";let h;e[2]!==c?(h=H("size-1.5 rounded-full bg-muted-foreground/50",c),e[2]=c,e[3]=h):h=e[3];let p;e[4]!==h?(p=r.jsx("span",{className:h}),e[4]=h,e[5]=p):p=e[5];let b;e[6]!==s||e[7]!==p?(b=r.jsxs("div",{className:"flex items-center gap-1.5 px-0.5 text-2xs font-medium text-muted-foreground",children:[p,s]}),e[6]=s,e[7]=p,e[8]=b):b=e[8];const f=d&&"border-brand/60";let m;e[9]!==f?(m=H("relative min-h-0 flex-1 overflow-hidden rounded-lg border bg-background",f),e[9]=f,e[10]=m):m=e[10];let g;e[11]!==o||e[12]!==m?(g=r.jsx("div",{className:m,children:o}),e[11]=o,e[12]=m,e[13]=g):g=e[13];let v;return e[14]!==g||e[15]!==u||e[16]!==b?(v=r.jsxs("div",{className:u,children:[b,g]}),e[14]=g,e[15]=u,e[16]=b,e[17]=v):v=e[17],v}function Us(t){const e=$.c(10),{icon:s,title:a,description:n}=t;let o;e[0]!==s?(o=r.jsx("div",{className:"mb-1",children:s}),e[0]=s,e[1]=o):o=e[1];let d;e[2]!==a?(d=r.jsx("p",{className:"text-sm font-medium",children:a}),e[2]=a,e[3]=d):d=e[3];let l;e[4]!==n?(l=r.jsx("p",{className:"text-xs text-muted-foreground",children:n}),e[4]=n,e[5]=l):l=e[5];let i;return e[6]!==o||e[7]!==d||e[8]!==l?(i=r.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-1 px-6 text-center",children:[o,d,l]}),e[6]=o,e[7]=d,e[8]=l,e[9]=i):i=e[9],i}function lc(t,e){if(!t)return{visibility:"hidden",width:e};const s=Math.min(t.width/e,1);return{left:Math.max((t.width-e*s)/2,0),width:e,height:t.height/s,transform:`scale(${s})`,transformOrigin:"top left"}}function ic(t){const e=$.c(24),{url:s,device:a,title:n,missing:o}=t,[d,l]=Da(),[i,u]=U.useState(null);if(!s){let y;return e[0]!==o?(y=r.jsx("p",{className:"flex h-full items-center justify-center px-6 text-center text-xs text-muted-foreground",children:o}),e[0]=o,e[1]=y):y=e[1],y}let c;e[2]!==a||e[3]!==s?(c=Kn(s,a),e[2]=a,e[3]=s,e[4]=c):c=e[4];const h=c,p=$a[a],b=d.width>0?Math.min(d.width/p,1):1,f=d.width>0?Math.max((d.width-p*b)/2,0):0;let m;e[5]!==h?(m=()=>u(h),e[5]=h,e[6]=m):m=e[6];const g=d.height>0?d.height/b:"100%",v=`scale(${b})`;let j;e[7]!==p||e[8]!==f||e[9]!==g||e[10]!==v?(j={left:f,width:p,height:g,transform:v,transformOrigin:"top left"},e[7]=p,e[8]=f,e[9]=g,e[10]=v,e[11]=j):j=e[11];let w;e[12]!==h||e[13]!==m||e[14]!==j||e[15]!==n?(w=r.jsx("iframe",{src:h,title:n,sandbox:"allow-scripts allow-same-origin",onLoad:m,className:"absolute top-0 border-0 bg-white",style:j},h),e[12]=h,e[13]=m,e[14]=j,e[15]=n,e[16]=w):w=e[16];let x;e[17]!==i||e[18]!==h?(x=i!==h?r.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background/60",children:r.jsx(ps,{className:"size-5 motion-reduce:animate-none"})}):null,e[17]=i,e[18]=h,e[19]=x):x=e[19];let P;return e[20]!==l||e[21]!==w||e[22]!==x?(P=r.jsxs("div",{ref:l,className:"absolute inset-0",children:[w,x]}),e[20]=l,e[21]=w,e[22]=x,e[23]=P):P=e[23],P}function oc(t){const e=$.c(21),{url:s,device:a,title:n,missing:o,onLoaded:d}=t,[l,i]=Da(),[u,c]=U.useState(null),[h,p]=U.useState(null),b=l.width>0&&l.height>0;b&&(u?.width!==l.width||u?.height!==l.height)&&c(l);const f=b?l:u;if(!s){let P;return e[0]!==o?(P=r.jsx("p",{className:"flex h-full items-center justify-center px-6 text-center text-xs text-muted-foreground",children:o}),e[0]=o,e[1]=P):P=e[1],P}let m,g,v,j;if(e[2]!==f||e[3]!==a||e[4]!==d||e[5]!==i||e[6]!==h||e[7]!==n||e[8]!==s){const P=Kn(s,a),y=$a[a];m=h?.src!==P;const N=[...h&&m?[h]:[],{src:P,logicalWidth:y}];g=i,v="absolute inset-0",j=N.map(C=>{const A=C.src===P&&m;return r.jsx("iframe",{src:C.src,title:n,"aria-hidden":A&&h?!0:void 0,sandbox:"allow-scripts allow-same-origin",onLoad:()=>{C.src===P&&(p(C),d?.(C.src))},className:H("absolute top-0 border-0 bg-white",A&&"pointer-events-none opacity-0"),style:lc(f,C.logicalWidth)},C.src)}),e[2]=f,e[3]=a,e[4]=d,e[5]=i,e[6]=h,e[7]=n,e[8]=s,e[9]=m,e[10]=g,e[11]=v,e[12]=j}else m=e[9],g=e[10],v=e[11],j=e[12];let w;e[13]!==m||e[14]!==h?(w=m?h?r.jsx(ps,{className:"absolute right-2 top-2 size-4 text-muted-foreground motion-reduce:animate-none"}):r.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background/60",children:r.jsx(ps,{className:"size-5 motion-reduce:animate-none"})}):null,e[13]=m,e[14]=h,e[15]=w):w=e[15];let x;return e[16]!==g||e[17]!==v||e[18]!==j||e[19]!==w?(x=r.jsxs("div",{ref:g,className:v,children:[j,w]}),e[16]=g,e[17]=v,e[18]=j,e[19]=w,e[20]=x):x=e[20],x}const cc=/^Co-authored-by:\s*([^<\r\n]+?)(?:\s*<[^>\r\n]*>)?\s*$/im;function dc(t){if(!t)return null;const e=cc.exec(t)?.[1]?.trim();return e||null}function uc(t){return/\[bot\]$/i.test(t)||/-bot$/i.test(t)}function hc(t){const e=dc(t.body);if(e)return e;const s=t.author.trim();return!s||uc(s)?null:s}function fc(t,e,s,a,n,o){return["cms-publish-bodies",t,e,s,a,n,o]}const mc=6e4;function pc(t,e){return e?null:t.files.map(s=>`${s.index}${s.working_dir} ${s.path}`).sort().join(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as I,j as r,n as v,b as M,a6 as P,bh as R}from"./index-
|
|
1
|
+
import{c as I,j as r,n as v,b as M,a6 as P,bh as R}from"./index-mb-jxjEy.js";import{E as T}from"./empty-state-BP4JRDLR.js";import{u as w}from"./chat-context-CxkYg5uT.js";import{u as B,j as L,k as _}from"./site-editor-toast-DfzFv4iY.js";import{i as $,u as A,k as Q,S as U}from"./blocks-tab-states-D8VyxdkW.js";import{a as G}from"./use-panel-navigate-B5u6ws6M.js";function H(C){const e=I.c(7),{icon:l,title:i,description:t,action:n}=C;let a;e[0]!==n?(a=n?{children:n.label,onClick:n.onClick,disabled:n.disabled}:void 0,e[0]=n,e[1]=a):a=e[1];let o;return e[2]!==t||e[3]!==l||e[4]!==a||e[5]!==i?(o=r.jsx(v,{children:r.jsx(v.Content,{children:r.jsx(v.Container,{children:r.jsx(T,{icon:l,title:i,description:t,buttonProps:a})})})}),e[2]=t,e[3]=l,e[4]=a,e[5]=i,e[6]=o):o=e[6],o}function Y(C){const e=I.c(33),{virtualMcpId:l,icon:i,copy:t,skeleton:n,children:a}=C,o=M(),{org:p}=P(),j=w(),u=j?.currentBranch??null,g=B(l,u);R(g.kind==="protocol"&&g.source==="github");const{openPanel:D}=G();if(!u){const s=t.noDraftTitle,F=t.noDraftDesc;let d;e[0]!==o?(d=o("sectionsEditor.namedRules.openEditor"),e[0]=o,e[1]=d):d=e[1];let f;e[2]!==D?(f=()=>D("content"),e[2]=D,e[3]=f):f=e[3];let m;e[4]!==d||e[5]!==f?(m={label:d,onClick:f},e[4]=d,e[5]=f,e[6]=m):m=e[6];let x;return e[7]!==t.noDraftDesc||e[8]!==t.noDraftTitle||e[9]!==i||e[10]!==m?(x=r.jsx(H,{icon:i,title:s,description:F,action:m}),e[7]=t.noDraftDesc,e[8]=t.noDraftTitle,e[9]=i,e[10]=m,e[11]=x):x=e[11],x}if($(g)){let s;return e[12]===Symbol.for("react.memo_cache_sentinel")?(s=r.jsx(U,{}),e[12]=s):s=e[12],s}if(g.kind==="pending"){let s;return e[13]!==n?(s=r.jsx(r.Fragment,{children:n}),e[13]=n,e[14]=s):s=e[14],s}if(g.kind!=="protocol"){let s;return e[15]!==t.loadFailed||e[16]!==t.loadFailedHint||e[17]!==i?(s=r.jsx(H,{icon:i,title:t.loadFailed,description:t.loadFailedHint}),e[15]=t.loadFailed,e[16]=t.loadFailedHint,e[17]=i,e[18]=s):s=e[18],s}let c;e[19]!==u||e[20]!==p.slug||e[21]!==l?(c=JSON.stringify([p.slug,l,u]),e[19]=u,e[20]=p.slug,e[21]=l,e[22]=c):c=e[22];const h=j?.taskId??null;let k;return e[23]!==u||e[24]!==a||e[25]!==t||e[26]!==i||e[27]!==p.slug||e[28]!==n||e[29]!==c||e[30]!==h||e[31]!==l?(k=r.jsx(J,{orgSlug:p.slug,virtualMcpId:l,branch:u,threadId:h,icon:i,copy:t,skeleton:n,children:a},c),e[23]=u,e[24]=a,e[25]=t,e[26]=i,e[27]=p.slug,e[28]=n,e[29]=c,e[30]=h,e[31]=l,e[32]=k):k=e[32],k}function J(C){const e=I.c(35),{orgSlug:l,virtualMcpId:i,branch:t,threadId:n,icon:a,copy:o,skeleton:p,children:j}=C,u=M();let g;e[0]!==t||e[1]!==l||e[2]!==n||e[3]!==i?(g={orgSlug:l,virtualMcpId:i,branch:t,threadId:n,previewUrl:null},e[0]=t,e[1]=l,e[2]=n,e[3]=i,e[4]=g):g=e[4];const D=g,c=L(D),h=A(D),k=c.data,s=h.data;let F;e[5]!==t||e[6]!==l||e[7]!==i?(F={orgSlug:l,virtualMcpId:i,branch:t},e[5]=t,e[6]=l,e[7]=i,e[8]=F):F=e[8];const d=_(F,Q);if(!k||!s||!d.ready){if(c.isError||h.isError||d.failed){const N=o.loadFailed,O=o.loadFailedHint;let b;e[9]!==u?(b=u("sectionsEditor.namedRules.tryAgain"),e[9]=u,e[10]=b):b=e[10];let E;e[11]!==c||e[12]!==d||e[13]!==h?(E=()=>{c.isError&&c.refetch(),h.isError&&h.refetch(),d.failed&&d.retry()},e[11]=c,e[12]=d,e[13]=h,e[14]=E):E=e[14];let S;e[15]!==b||e[16]!==E?(S={label:b,onClick:E},e[15]=b,e[16]=E,e[17]=S):S=e[17];let y;return e[18]!==o.loadFailed||e[19]!==o.loadFailedHint||e[20]!==a||e[21]!==S?(y=r.jsx(H,{icon:a,title:N,description:O,action:S}),e[18]=o.loadFailed,e[19]=o.loadFailedHint,e[20]=a,e[21]=S,e[22]=y):y=e[22],y}let x;return e[23]!==p?(x=r.jsx(r.Fragment,{children:p}),e[23]=p,e[24]=x):x=e[24],x}let f;e[25]!==t||e[26]!==j||e[27]!==k||e[28]!==s||e[29]!==l||e[30]!==n||e[31]!==i?(f=j({orgSlug:l,virtualMcpId:i,branch:t,threadId:n,decofile:k,meta:s}),e[25]=t,e[26]=j,e[27]=k,e[28]=s,e[29]=l,e[30]=n,e[31]=i,e[32]=f):f=e[32];let m;return e[33]!==f?(m=r.jsx(r.Fragment,{children:f}),e[33]=f,e[34]=m):m=e[34],m}export{H as S,Y as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as u,r as g,j as n,J as G,a0 as F,a as E,l as O,b as P,n as y,L as H}from"./index-mb-jxjEy.js";import{C as M}from"./chat-context-CxkYg5uT.js";import{ChatLayout as x}from"./index-hl8iFWLs.js";import{L}from"./index-CyK1A-PV.js";import{B as J}from"./blocks-preview-workspace-context-JYcUL0TS.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-DfzFv4iY.js";import{u as q,L as B,P as Q,S as X}from"./preview-tab-BFrQickY.js";import{C as Y}from"./content-tab-ChWZ09d_.js";import{T as Z}from"./tab-icon-glyph-CEoTzCNL.js";import{r as tt}from"./resolve-tab-icon-3aZJM1BR.js";import ot from"./agent-site-editor-CRCOwi7y.js";import"./use-panel-navigate-B5u6ws6M.js";import"./thread-route-DRsKlO-E.js";import"./use-project-scope-Dydp2D08.js";import"./repository-binding-w-FCDYuS.js";import"./use-mcp-client-4k5JKqzF.js";import"./auth--2gxCib9.js";import"./use-view-draft-kind-CZT4hOaN.js";import"./use-blog-view-Bi3aoju6.js";import"./use-organization-settings-UrGbnM2k.js";import"./schema-BluyjH2z.js";import"./task-board-CShHcm1L.js";import"./thread-intent-BQWCtBA_.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-7J-tc7Ge.js";import"./session-runtime-D2GKulko.js";import"./use-entitlements-CzwT7L5B.js";import"./use-ai-providers-CTbi7eSd.js";import"./use-current-view-DvszbK0Z.js";import"./use-in-settings-BTBVzmbg.js";import"./use-decopilot-events-BhcT5RAV.js";import"./use-mobile-CBwmaBFU.js";import"./tooltip-DCzbfwd7.js";import"./index-B8ZkvDME.js";import"./MessageCircle01-DEwhGd-N.js";import"./XClose-Bomoew3H.js";import"./thread-button-Dw70OEJl.js";import"./use-sidebar-collapsed-DgMGLJyh.js";import"./sheet-Ctckoytn.js";import"./use-chat-layout-state-77HNlix_.js";import"./toolbar-icon-button-DcIFSTOI.js";import"./resizable-CJbr1Nyi.js";import"./route-page-header-CRzmHOKm.js";import"./LayoutLeft-DFrTynS3.js";import"./task-key-BP2--GY6.js";import"./sortable.esm-Cl-YQgc8.js";import"./Tool01-9Nk8XcOI.js";import"./agent-icon-zvo6Zsex.js";import"./AlertCircle-CngNmW3n.js";import"./UserCheck01-CuByTN5F.js";import"./ArrowUp-C9hRfWJJ.js";import"./ArrowLeft-7wIIyF4Y.js";import"./ArrowRight-Dyuh-rXZ.js";import"./BookOpen01-Bov9QL4X.js";import"./Globe04-_51WnfFJ.js";import"./CheckCircle-C0mDI2jO.js";import"./TrendUp01-D-BYwryf.js";import"./ChevronDown-Cz82ih9S.js";import"./ChevronSelectorVertical-B_wf9OPd.js";import"./ChevronUp-CLsy4_cr.js";import"./UserSquare-T90Jaoc-.js";import"./LinkBroken01-BPaKcMJ1.js";import"./CreditCard01-C7XdJQOf.js";import"./File02-BmbcQ1JX.js";import"./SwitchHorizontal01-HaaMuIs0.js";import"./Eye-BoMcImel.js";import"./Fingerprint04-CeWGcIpe.js";import"./Image01-nL5rafgN.js";import"./Key01-DPEcpDw6.js";import"./Minus-CZtTY14n.js";import"./Monitor01-Dzk9r8YI.js";import"./Sun-BUSaNVU-.js";import"./Play-BNkIfSsq.js";import"./Plus-WQeLSh07.js";import"./SearchMd-CrM5HGUz.js";import"./ShoppingBag01-Dvi8noNw.js";import"./Trash01-By8obgKt.js";import"./Upload01-BPnZnmHF.js";import"./Users01-D1-vaLa3.js";import"./Zap-lo-lOcPp.js";import"./context-menu-haKBWhFK.js";import"./use-org-notice-BLDWm2ef.js";import"./create-organization-dialog-BXvqxw2I.js";import"./form-CJTkS9yd.js";import"./label-DFYaZzfV.js";import"./project-apps-BFfwYw5p.js";import"./use-recent-apps-B6ojF6fA.js";import"./use-navigate-to-agent-H87rWFYJ.js";import"./command-CwP4XJhp.js";import"./index-Dy0Aphio.js";import"./use-debounced-value-CAOKwJaL.js";import"./feedback-BqoIMOg7.js";import"./textarea-BCGFjA5F.js";import"./use-sandbox-events-DEHux0gs.js";import"./sandbox-url-D3mC8qhT.js";import"./use-blocks-v8-project-BloQ91Xb.js";import"./use-voice-input-Nzha8Za1.js";import"./popover-D73VbCM5.js";import"./drawer-CmJXwXhP.js";import"./index-BIBRRoOW.js";import"./checkbox-C-dWRGEo.js";import"./select-DnlDCB9E.js";import"./index-BdQq_4o_.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./utils-pe9cqItP.js";import"./sandbox-git-api-1xYJwdHB.js";import"./save-status-Csuo4rYY.js";import"./use-never-published-Db-SviVk.js";import"./hosted-reconcile-CC64pDxA.js";import"./blocks-tab-states-D8VyxdkW.js";import"./empty-state-DlNabApi.js";import"./search-input-D-gp-h4P.js";import"./tabs-DJ6SkMve.js";import"./active-indicator-CCMhAsc_.js";import"./use-file-configs-yKe4yLHn.js";import"./asset-utils-BDYUvtkF.js";import"./useInfiniteQuery-FxnnBp9W.js";import"./infiniteQueryObserver-Dfcni9SV.js";import"./usage-stats-CiB8uQLm.js";import"./utils-CVEq3hMx.js";import"./markdown-B-EQMrBl.js";import"./use-copy-DSNmvH9L.js";import"./gateway-client-zPU6BhGI.js";import"./switch--3C-A5oU.js";import"./toggle-group-jkikwCcL.js";import"./match-site-slug-config-B47_xZCi.js";import"./sandbox-lifecycle-context-CxRkhFod.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./frame-navigation-BZ8W_2dq.js";import"./variant-matcher-override-DoPQRIHU.js";import"./section-array-field-4siTAXTX.js";import"./use-fast-preview-draft-url-DbEjmD3f.js";import"./parse-sections-Cv7KSMgB.js";import"./held-block-view-CEue5DyE.js";import"./calendar-CqkLsAo9.js";import"./editor-classes-C_k7lpha.js";import"./category-tree-DSsAlLjn.js";import"./pair-CI1Rts6X.js";import"./collapsible-BSD-rIyq.js";import"./use-task-board-items-B_EMxvU9.js";import"./config-4NBdyaeh.js";import"./task-route-BDNP9yC7.js";import"./project-index-DyqPLhTf.js";import"./shell-layout-BS_Y65pV.js";import"./use-deployment-admin-DCWHLNad.js";import"./admin-fetch-BhTJlAsX.js";import"./integration-icon-DRbGJhQo.js";import"./project-icon-Bl4IAncl.js";import"./new-project-dialog-KtG8l1yi.js";import"./repository-picker-DF0-TGsg.js";import"./github-icon-D3IlXxDN.js";import"./collection-search-BpNjeFlC.js";import"./new-project-store-DDZH8miu.js";import"./legacy-admin-welcome-dialog-C0rLwEhl.js";import"./required-auth-layout-B1owCwtw.js";import"./use-org-sso-Cfy5SkJ5.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-B8_THT37.js";import"./types-BQYXFpO6.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./use-connection-DxwzNo03.js";import"./use-mcp-prompts-pJuJ9yii.js";import"./use-thread-outputs-B9502nWa.js";import"./file-type-icon-M87xyG0K.js";import"./named-rule-step-C-_N0SXT.js";import"./slider-Bqy5W8RM.js";import"./index-kPKwu4SB.js";import"./tooltipContext-2wUW4UR-.js";import"./CategoricalChart-BJA3WMzp.js";import"./index-OaQ5Wven.js";import"./combobox-D_fSr7_C.js";import"./scroll-area-D9mVov2B.js";import"./monaco-editor-DttATUsj.js";import"./editor-stZYyxdg.js";import"./useQueries-CQ0xJF7W.js";import"./blog-preview-url-DwcMPB8a.js";import"./device-hint-DfNddHqx.js";import"./alert-QfzOpdUg.js";import"./virtual-mcp-DN6fu9Nf.js";import"./url-slug-E3otz4_J.js";import"./app-preview-url-9Od4s8Sz.js";import"./agent-capabilities-DWZ6HVp_.js";import"./preview-source-BsRLGWUP.js";import"./use-task-metadata-L0GKyc-x.js";import"./delete-copy-L_pixdww.js";import"./index-B6vsr4i3.js";import"./view-header-B0xV_oWh.js";import"./use-cms-publish-actions-DGO40mZ2.js";import"./use-content-sync-C9H2kDwl.js";import"./use-delete-block-Bd0Db3-p.js";import"./item-actions-CDU7n7Cr.js";import"./date-utils-CrvIKg-s.js";import"./badge-Di6qp_17.js";import"./empty-state-BP4JRDLR.js";import"./primitives-BHTaKbue.js";import"./use-move-blocks-D8MFSTf7.js";import"./mustache-clchl4ci.js";import"./collection-table-wrapper-BmrrNnjL.js";import"./table-Cy5fo0ER.js";import"./site-draft-actions-BZf0yVqo.js";import"./separator-DsSANYB0.js";import"./cms-store-drafts-5dkWWhlw.js";import"./serial-task-queue-CGOeQgpr.js";import"./index-CnFOA69K.js";import"./input-BUC-cGry.js";import"./icon-button-C9InOUgM.js";import"./chat-draft-DzaoNZT_.js";import"./use-deco-credits-DnZKzVHP.js";import"./input-DjfzIqsk.js";import"./suggestion-BoV2NIg6.js";import"./use-org-fs-CbXrwKDd.js";import"./question-004-sINsf4GQ.js";import"./feature-paywall-CBOn7yV2.js";import"./plan-ladder-Dn1mCpkd.js";import"./add-connection-dialog-Bn6L9Ywx.js";import"./extract-connection-data-CzqnFJl9.js";import"./metadata-D72DunRR.js";import"./connection-DezKWiQc.js";import"./connection-card-CxiJ1Nzx.js";import"./connection-slug-DWaKdRBx.js";import"./schema-DU3GC-Ez.js";import"./connection-form-helpers-UXeTmEmu.js";import"./authenticate-and-persist-oauth-GGQFCWKI.js";import"./mcp-oauth-Cya-fh0P.js";import"./mcp-oauth-_iPR8QjI.js";import"./collection-tabs-CmuugrOY.js";import"./use-infinite-scroll-DnhPBPks.js";import"./useSuspenseInfiniteQuery-CtWAJlQZ.js";import"./save-changes-debug-nBi-n9eV.js";import"./site-draft-view-NypTEK1x.js";import"./blog-view-gate-BDjHkxlS.js";function I(o){return o.kind==="unavailable"&&o.source==="local"&&(o.problem?.reason??"not-answering")==="not-answering"}const it=o=>o;function et(o){const t=u.c(10),{candidates:i,invalidLink:c,shell:s,editor:e}=o,r=c===void 0?!1:c,m=s===void 0?it:s,[p,a]=g.useState(null);if(p){let f;t[0]===Symbol.for("react.memo_cache_sentinel")?(f=()=>a(null),t[0]=f):f=t[0];let h;return t[1]!==p||t[2]!==e?(h=e(p,f),t[1]=p,t[2]=e,t[3]=h):h=t[3],h}let l;t[4]!==i||t[5]!==r?(l=n.jsx(rt,{candidates:i,invalidLink:r,onConnect:a}),t[4]=i,t[5]=r,t[6]=l):l=t[6];let d;return t[7]!==m||t[8]!==l?(d=m(l),t[7]=m,t[8]=l,t[9]=d):d=t[9],d}function rt(o){const t=u.c(17),{candidates:i,invalidLink:c,onConnect:s}=o,e=c===void 0?!1:c,[r]=G(),{language:m}=r;let p;t[0]!==s?(p=N=>s({endpoint:N}),t[0]=s,t[1]=p):p=t[1];let a;t[2]!==i||t[3]!==p?(a={candidates:i,onFound:p},t[2]=i,t[3]=p,t[4]=a):a=t[4];const l=q(a),{state:d,access:f,needsGesture:h}=l;let k;t[5]!==i||t[6]!==m?(k=new Intl.ListFormat(m,{style:"long",type:"conjunction"}).format(i.map(T)),t[5]=i,t[6]=m,t[7]=k):k=t[7];const C=k;let S;t[8]!==f||t[9]!==l.start||t[10]!==h||t[11]!==d?(S=f==="denied"?{kind:"denied"}:h?{kind:"needs-gesture",onStart:l.start}:d.problem?{kind:"problem",problem:d.problem,host:T(d.problem.endpoint)}:{kind:"looking",paused:d.status==="paused"},t[8]=f,t[9]=l.start,t[10]=h,t[11]=d,t[12]=S):S=t[12];const _=S;let j;return t[13]!==C||t[14]!==e||t[15]!==_?(j=n.jsx(B,{wait:_,hosts:C,invalidLink:e}),t[13]=C,t[14]=e,t[15]=_,t[16]=j):j=t[16],j}const v="deco-serve",w="working-tree",nt={id:"",slug:"",name:"",logo:null},st={id:v,slug:v},mt={virtualMcpId:v,taskId:null,openTask:()=>{},createTask:()=>"",createTaskWithMessage:()=>{},activeTask:null,isThreadLocked:!1,lockedHarness:null,lockedBranch:null,currentBranch:w,setCurrentTaskBranch:()=>{}};function pt(){const o=window.location.hash,t=new URLSearchParams(o.replace(/^#/,"")).has("endpoint"),i=t?K(o):null;return t&&window.history.replaceState(null,"",window.location.pathname+window.location.search),i&&V(i),{candidates:W(i,U()),invalidLink:t&&!i}}const at=[{id:"site-editor",to:"/site-editor",label:"preview"},{id:"content",to:"/site-editor/content",label:"content"}];function lt(){const o=u.c(6),t=P();let i;o[0]===Symbol.for("react.memo_cache_sentinel")?(i={select:ct},o[0]=i):i=o[0];const c=O(i);let s;o[1]!==t||o[2]!==c?(s=at.map(r=>n.jsx(y.Tab,{asChild:!0,active:c==="content"==(r.id==="content"),children:n.jsxs(H,{to:r.to,activeOptions:{exact:!0},children:[n.jsx("span",{"aria-hidden":"true",className:"flex size-4 shrink-0 items-center justify-center",children:n.jsx(Z,{icon:tt({tabId:r.id,kind:"system",connections:[]})})}),t(`common.mainPanelTabs.${r.label}`)]})},r.id)),o[1]=t,o[2]=c,o[3]=s):s=o[3];let e;return o[4]!==s?(e=n.jsx(y.Tabs,{children:s}),o[4]=s,o[5]=e):e=o[5],e}function ct(o){return o.matches.at(-1)?.staticData.siteEditorView}function A(o){const t=u.c(14),{children:i}=o,c=P(),{connection:s}=z(v),e=R(v,w);let r,m;if(t[0]!==e||t[1]!==i||t[2]!==s||t[3]!==c){m=Symbol.for("react.early_return_sentinel");t:{if(r=s?T(s.endpoint):"",e.kind==="protocol"){m=i;break t}if(e.kind!=="unavailable"||I(e)){m=n.jsx(X,{headingLevel:2,waiting:!0,title:c("decoServe.connect.reaching",{host:r})});break t}}t[0]=e,t[1]=i,t[2]=s,t[3]=c,t[4]=r,t[5]=m}else r=t[4],m=t[5];if(m!==Symbol.for("react.early_return_sentinel"))return m;let p;t[6]!==e.problem?(p=e.problem??{reason:"not-answering"},t[6]=e.problem,t[7]=p):p=t[7];let a;t[8]!==r||t[9]!==p?(a={kind:"problem",problem:p,host:r},t[8]=r,t[9]=p,t[10]=a):a=t[10];let l;return t[11]!==r||t[12]!==a?(l=n.jsx(B,{wait:a,hosts:r}),t[11]=r,t[12]=a,t[13]=l):l=t[13],l}function dt(o){const t=u.c(6),{onLost:i}=o,c=R(v,w);let s;t[0]!==c?(s=I(c),t[0]=c,t[1]=s):s=t[1];const e=s;let r,m;return t[2]!==e||t[3]!==i?(r=()=>{e&&i()},m=[e,i],t[2]=e,t[3]=i,t[4]=r,t[5]=m):(r=t[4],m=t[5]),g.useEffect(r,m),null}const D={threadOpen:!1,contentOpen:!0,toggleFullscreen:()=>{},toggleContent:()=>{}};function ut(){const o=u.c(11),{data:t}=E.useSession();let i;o[0]===Symbol.for("react.memo_cache_sentinel")?(i={select:ft},o[0]=i):i=o[0];const c=O(i),s=!!t?.user;let e;o[1]!==s?(e={rail:s},o[1]=s,o[2]=e):e=o[2];const r=c??"preview";let m,p,a;o[3]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(lt,{}),p=n.jsx(ot,{}),a=n.jsx(x.Thread,{children:null}),o[3]=m,o[4]=p,o[5]=a):(m=o[3],p=o[4],a=o[5]);let l;o[6]!==r?(l=n.jsx(L.Content,{children:n.jsxs(x,{...D,threadless:!0,contentKey:r,contentNavigation:m,children:[p,a]})}),o[6]=r,o[7]=l):l=o[7];let d;return o[8]!==e||o[9]!==l?(d=n.jsx(L,{outsideOrg:e,children:l}),o[8]=e,o[9]=l,o[10]=d):d=o[10],d}function ft(o){return o.matches.at(-1)?.staticData.siteEditorView}function ht(o){const t=u.c(10),{children:i}=o,{data:c}=E.useSession(),s=!!c?.user;let e;t[0]!==s?(e={rail:s},t[0]=s,t[1]=e):e=t[1];let r;t[2]!==i?(r=n.jsx(x.Content,{children:i}),t[2]=i,t[3]=r):r=t[3];let m;t[4]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(x.Thread,{children:null}),t[4]=m):m=t[4];let p;t[5]!==r?(p=n.jsx(L.Content,{children:n.jsxs(x,{...D,threadless:!0,contentKey:"guide",children:[r,m]})}),t[5]=r,t[6]=p):p=t[6];let a;return t[7]!==e||t[8]!==p?(a=n.jsx(L,{outsideOrg:e,children:p}),t[7]=e,t[8]=p,t[9]=a):a=t[9],a}const b=()=>{},vt={connection:null,set:b,clear:b};function Dr(){const o=u.c(3),[t]=g.useState(pt);let i;return o[0]!==t.candidates||o[1]!==t.invalidLink?(i=n.jsx(F,{org:nt,project:st,children:n.jsx(et,{candidates:t.candidates,invalidLink:t.invalidLink,shell:kt,editor:xt})}),o[0]=t.candidates,o[1]=t.invalidLink,o[2]=i):i=o[2],i}function xt(o,t){return n.jsxs($.Provider,{value:{connection:o,set:b,clear:b},children:[n.jsx(dt,{onLost:t}),n.jsx(M,{value:mt,children:n.jsx(J,{children:n.jsx(ut,{})})})]})}function kt(o){return n.jsx($.Provider,{value:vt,children:n.jsx(ht,{children:o})})}function Nr(){const o=u.c(1);let t;return o[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(A,{children:n.jsx(Q,{virtualMcpId:v})}),o[0]=t):t=o[0],t}function Gr(){const o=u.c(1);let t;return o[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(A,{children:n.jsx(Y,{virtualMcpId:v})}),o[0]=t):t=o[0],t}export{Gr as SiteEditorContent,Nr as SiteEditorPreview,Dr as default};
|