decocms 4.619.3 → 4.619.4
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-DGhmQiH3.js → AlertCircle-BlMH0XE7.js} +1 -1
- package/dist/client/assets/{AreaChart-DKWsvY6W.js → AreaChart-CFi6-0Iq.js} +1 -1
- package/dist/client/assets/{ArrowLeft-FP_83xMo.js → ArrowLeft-B0PZnf1E.js} +1 -1
- package/dist/client/assets/{ArrowRight-c12L_DBI.js → ArrowRight-mzMrxxYI.js} +1 -1
- package/dist/client/assets/{ArrowUp-B0lRrz50.js → ArrowUp-D5DDc3Cp.js} +1 -1
- package/dist/client/assets/{BookOpen01-CGmiFh6c.js → BookOpen01-DU-B3R7s.js} +1 -1
- package/dist/client/assets/{CartesianChart-DwY6QAby.js → CartesianChart-fywgd4bq.js} +1 -1
- package/dist/client/assets/{CategoricalChart-CvWzaQub.js → CategoricalChart-wSsXuALZ.js} +1 -1
- package/dist/client/assets/{CheckCircle-DQx8J3sX.js → CheckCircle-DZ8MNpCP.js} +1 -1
- package/dist/client/assets/{ChevronDown-C2op7Ztq.js → ChevronDown-XsLJSrfl.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-B8fgmPce.js → ChevronSelectorVertical-CB0fn1Nq.js} +1 -1
- package/dist/client/assets/{ChevronUp-C6GRdhwz.js → ChevronUp-BQktpZWC.js} +1 -1
- package/dist/client/assets/{CreditCard01-BrYzNGv7.js → CreditCard01-MY4ouqtl.js} +1 -1
- package/dist/client/assets/{Eye-D1n0U2nr.js → Eye-kjjhS0vP.js} +1 -1
- package/dist/client/assets/{File02-lnmDsOIM.js → File02-DaYek2y9.js} +1 -1
- package/dist/client/assets/{Fingerprint04-DWY8-Yis.js → Fingerprint04-B2fDIuT8.js} +1 -1
- package/dist/client/assets/{Globe04-i-SMP1da.js → Globe04-CeAQ1YNm.js} +1 -1
- package/dist/client/assets/{Image01-D0d8t9Nf.js → Image01-BcIZ5mtf.js} +1 -1
- package/dist/client/assets/{Key01-BNFXrDTG.js → Key01-CaJGjh13.js} +1 -1
- package/dist/client/assets/{LayoutLeft-CzGwliNd.js → LayoutLeft-DDtN-od-.js} +1 -1
- package/dist/client/assets/{LinkBroken01-C-ZJkx1-.js → LinkBroken01-DfUhihLM.js} +1 -1
- package/dist/client/assets/{MessageCircle01-CmMj6zOJ.js → MessageCircle01-BG1RhOiZ.js} +1 -1
- package/dist/client/assets/{Minus-C12vvCq7.js → Minus-hZzPDO0w.js} +1 -1
- package/dist/client/assets/{Monitor01-DRn7cBTS.js → Monitor01-DMFbvudn.js} +1 -1
- package/dist/client/assets/{Play-LuTO-O0l.js → Play-BCFOaioW.js} +1 -1
- package/dist/client/assets/{Plus-lVBJlI-r.js → Plus-DWySsEmB.js} +1 -1
- package/dist/client/assets/{ReferenceLine-1BlSF-eI.js → ReferenceLine-CCZuWAGw.js} +1 -1
- package/dist/client/assets/{SearchMd-DlyifTmg.js → SearchMd-BD2qldmS.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-Cqxv0G3l.js → ShoppingBag01-BbjW7cod.js} +1 -1
- package/dist/client/assets/{Sun-CHBjoRg5.js → Sun-O9TdKcV_.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-B9k8zywr.js → SwitchHorizontal01-CMdpIiQk.js} +1 -1
- package/dist/client/assets/{Tool01-BCxvp4xD.js → Tool01-BCJ5kyrz.js} +1 -1
- package/dist/client/assets/{Tooltip-vc07534F.js → Tooltip-B-bKlk4E.js} +1 -1
- package/dist/client/assets/{Trash01-Tyi0X0KA.js → Trash01-BxBhF2b8.js} +1 -1
- package/dist/client/assets/{Upload01-BE_2AiDk.js → Upload01-q-rKSvZf.js} +1 -1
- package/dist/client/assets/{UserCheck01-BzJrArBA.js → UserCheck01-k-4bTA2h.js} +1 -1
- package/dist/client/assets/{UserSquare-Csaj5_OE.js → UserSquare-CafFh5_d.js} +1 -1
- package/dist/client/assets/{Users01-B0nNOy2m.js → Users01-DM58_gUL.js} +1 -1
- package/dist/client/assets/{XClose-BCBhmnTq.js → XClose-CmTuu4UN.js} +1 -1
- package/dist/client/assets/{Zap-DyZkYnvp.js → Zap-CBJ7My90.js} +1 -1
- package/dist/client/assets/{access-gate-CAG-WX8M.js → access-gate-ZixeoVbg.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-B3Q9C4ta.js → add-connection-dialog-CS6ZsWUV.js} +1 -1
- package/dist/client/assets/agent-app-BjFocMRF.js +1 -0
- package/dist/client/assets/{agent-assets-a3MaKVet.js → agent-assets-N3MVvFNQ.js} +1 -1
- package/dist/client/assets/{agent-automation-D6Kp8N6n.js → agent-automation-YRM59WCJ.js} +1 -1
- package/dist/client/assets/{agent-automations-uOc0h2-3.js → agent-automations-B6GbQ2NX.js} +1 -1
- package/dist/client/assets/{agent-blog-Q0x5W9bL.js → agent-blog-BZL3iqos.js} +2 -2
- package/dist/client/assets/{agent-blog-post-GPtAup4R.js → agent-blog-post-SleYRKhO.js} +2 -2
- package/dist/client/assets/{agent-business-case-BVl0QdPX.js → agent-business-case-D7hulp28.js} +1 -1
- package/dist/client/assets/{agent-calendar-BgUHNM1x.js → agent-calendar-C2aYQk1W.js} +1 -1
- package/dist/client/assets/{agent-capabilities-CwQVSwUn.js → agent-capabilities-CyWfHGWp.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-DFSqT3hY.js → agent-connect-sources-B3DsSlYx.js} +1 -1
- package/dist/client/assets/agent-deck-Bo3utH19.js +1 -0
- package/dist/client/assets/{agent-e2e-C6bQi5ly.js → agent-e2e-CL5z3KLl.js} +1 -1
- package/dist/client/assets/agent-experiments-DmxiioQQ.js +1 -0
- package/dist/client/assets/agent-file-DP9sslio.js +1 -0
- package/dist/client/assets/{agent-hosting-CitTgqFF.js → agent-hosting-o-mcw7Mt.js} +1 -1
- package/dist/client/assets/{agent-icon-BeQK1LIp.js → agent-icon-BYWtutu9.js} +1 -1
- package/dist/client/assets/agent-library-BXulc_Yl.js +1 -0
- package/dist/client/assets/agent-library-file-VKoA-2Ab.js +1 -0
- package/dist/client/assets/agent-overview-C34bZy3e.js +1 -0
- package/dist/client/assets/{agent-releases-Dh5QVSRR.js → agent-releases-CkoKmdtg.js} +1 -1
- package/dist/client/assets/agent-settings-C7Xi7GQ8.js +1 -0
- package/dist/client/assets/agent-site-editor-code-BARMlQvm.js +2 -0
- package/dist/client/assets/agent-site-editor-content-DzffF50u.js +1 -0
- package/dist/client/assets/{agent-site-editor-ieqFngGL.js → agent-site-editor-mx714_u8.js} +1 -1
- package/dist/client/assets/agent-site-editor-preview-Cb3Jb0dL.js +1 -0
- package/dist/client/assets/agent-view-D1SswljO.js +1 -0
- package/dist/client/assets/{agent-view-guard-BsFLMhUD.js → agent-view-guard-Du9KtXiN.js} +1 -1
- package/dist/client/assets/{ai-providers-C8OUzIy0.js → ai-providers-C5eMJ9gb.js} +1 -1
- package/dist/client/assets/{alert-qFpOptTR.js → alert-CxbB9CEj.js} +1 -1
- package/dist/client/assets/{analytics-sections-DY-sMeWR.js → analytics-sections-DxDApvgE.js} +1 -1
- package/dist/client/assets/api-keys-CyfopOCZ.js +1 -0
- package/dist/client/assets/{api-keys-BIZ19WbQ.js → api-keys-Dz9mRGTx.js} +1 -1
- package/dist/client/assets/{app-editor-DtEUS7gt.js → app-editor-CjwcCH9G.js} +1 -1
- package/dist/client/assets/{asset-utils-kGLknUlk.js → asset-utils-DP9aQr9Q.js} +1 -1
- package/dist/client/assets/{auth-D3aaR56V.js → auth-C82OPjUx.js} +1 -1
- package/dist/client/assets/{auth-catchall-DXHZSgRo.js → auth-catchall-BuOacwQW.js} +1 -1
- package/dist/client/assets/{auth-entry-teQchOi1.js → auth-entry-CvZftMoq.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DNwm7E6M.js → auth-split-layout-DSQvTHWS.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-CfD2cssG.js → authenticate-and-persist-oauth-87e1Ix6y.js} +1 -1
- package/dist/client/assets/{automation-list-row-DWVzdhwb.js → automation-list-row-4ox_h99L.js} +1 -1
- package/dist/client/assets/{automation-runs-Ctc1Vi83.js → automation-runs-Dto_jEAs.js} +1 -1
- package/dist/client/assets/{automations-2Gnmtaih.js → automations-C9HofLSf.js} +1 -1
- package/dist/client/assets/{badge-D4t_0yop.js → badge-DcUertOZ.js} +1 -1
- package/dist/client/assets/{block-document-CrxZdpMf.js → block-document-fIbF5XH6.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-DWu-3MoI.js → blocks-preview-workspace-context-ZEZYfsWp.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-CBGKB5th.js → blocks-tab-states-8lUCpJRf.js} +1 -1
- package/dist/client/assets/{blog-preview-url-C4jHo7Om.js → blog-preview-url-N6iQgPQK.js} +1 -1
- package/dist/client/assets/{blog-schema-Diy1WhGr.js → blog-schema-0s-6sCQz.js} +1 -1
- package/dist/client/assets/{blog-source-gate-Zm7I_b_g.js → blog-source-gate-BIpZ68Ul.js} +1 -1
- package/dist/client/assets/{blog-view-gate-2cHU2UiQ.js → blog-view-gate-D2LovAn5.js} +1 -1
- package/dist/client/assets/{buckets-Bgoscg8b.js → buckets-0rVmiN0b.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-D5lS20WO.js → build-improve-prompt-doc-BBeWkVDi.js} +1 -1
- package/dist/client/assets/{calendar-DqJcyMVN.js → calendar-DNzaYWCQ.js} +1 -1
- package/dist/client/assets/{capability-load-error-ntTl1fvk.js → capability-load-error-CCChPOz4.js} +1 -1
- package/dist/client/assets/{category-editor-DoyoJKV_.js → category-editor-BWoJzJlg.js} +1 -1
- package/dist/client/assets/{category-tree-BCyFM0Ok.js → category-tree-DGOo1BAt.js} +1 -1
- package/dist/client/assets/{chart-BbYeI8N4.js → chart-DsKJdJFH.js} +1 -1
- package/dist/client/assets/{chat-context-MoYYfmsS.js → chat-context-DFEln8mI.js} +1 -1
- package/dist/client/assets/{chat-draft-Gm7m0AHh.js → chat-draft-DNEqrl5p.js} +1 -1
- package/dist/client/assets/{checkbox-BB8KVrhZ.js → checkbox-QUuOza1H.js} +1 -1
- package/dist/client/assets/{choose-editor-B2XjwftL.js → choose-editor-Dn-Q9YwJ.js} +1 -1
- package/dist/client/assets/{cli-auth-success-DMaAArhS.js → cli-auth-success-r3ux6WHO.js} +1 -1
- package/dist/client/assets/{cms-settings-editor-DtfLPSh_.js → cms-settings-editor-CFS-nduu.js} +1 -1
- package/dist/client/assets/{cms-store-drafts-CwV6xthd.js → cms-store-drafts-_66Q7KaS.js} +1 -1
- package/dist/client/assets/{collapsible-CvOWSuY7.js → collapsible-CadTVXY4.js} +1 -1
- package/dist/client/assets/{collection-detail-BxBiaeiJ.js → collection-detail-Dx4tVGVC.js} +1 -1
- package/dist/client/assets/{collection-display-button-Dzwm3ZFp.js → collection-display-button-6TpQQrIO.js} +1 -1
- package/dist/client/assets/{collection-search-DqZnq1kz.js → collection-search-DkVgkcUC.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-D_jB2iSb.js → collection-table-wrapper-Ds5dhGJx.js} +1 -1
- package/dist/client/assets/{collection-tabs-CkIuyvEg.js → collection-tabs-Cju2BOrS.js} +1 -1
- package/dist/client/assets/{combobox-BTk2iFx5.js → combobox-2rKAfmHD.js} +1 -1
- package/dist/client/assets/{command-gq8mLEwk.js → command-C3tlrKUq.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-CoNKZ9Qf.js → companion-mcps-section-DtquKPaV.js} +1 -1
- package/dist/client/assets/{config-CKam44yj.js → config-LEYSFIMn.js} +1 -1
- package/dist/client/assets/{connect-BO9LGEER.js → connect-BKnKKYKQ.js} +1 -1
- package/dist/client/assets/{connect-key-CDyj_Wt6.js → connect-key-FoOHl5BZ.js} +1 -1
- package/dist/client/assets/{connect-layout-DkDpPrBE.js → connect-layout-CsTR3j4_.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-BNltPBvM.js → connect-source-dialog-KHsP3PRH.js} +1 -1
- package/dist/client/assets/{connection-PdY1jdjN.js → connection-C8I8wKeO.js} +1 -1
- package/dist/client/assets/{connection-card-rF-q91cm.js → connection-card-CTJwLo8p.js} +1 -1
- package/dist/client/assets/{connection-detail-C-csQnIc.js → connection-detail-CgH5yXt-.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-BbSye8zz.js → connection-form-helpers-BjSA2uCL.js} +1 -1
- package/dist/client/assets/{connection-slug-CLSeWQFu.js → connection-slug-BNBBglpK.js} +1 -1
- package/dist/client/assets/{connections-n1FwsJcU.js → connections-X4DjYIvQ.js} +1 -1
- package/dist/client/assets/{content-changes-B7QLNPm9.js → content-changes-BFwm7dNe.js} +1 -1
- package/dist/client/assets/{content-tab-CCuslwaK.js → content-tab-BPEA6p-v.js} +3 -3
- package/dist/client/assets/{context-YCyFfQO8.js → context-DUaIKdw9.js} +1 -1
- package/dist/client/assets/{context-menu-CYKN_FLZ.js → context-menu-DkaKc9e5.js} +1 -1
- package/dist/client/assets/{context-shell-Cg3iDcvG.js → context-shell-fpMmjICJ.js} +3 -3
- package/dist/client/assets/{create-organization-dialog-BGvuasWD.js → create-organization-dialog-BVTSqOJU.js} +1 -1
- package/dist/client/assets/{daily-pulse-CemPpz9a.js → daily-pulse-BkxIzWUm.js} +1 -1
- package/dist/client/assets/{delete-copy-CKxy6ck-.js → delete-copy-DdlDdNyl.js} +1 -1
- package/dist/client/assets/{device-hint-C_jFHzsP.js → device-hint-B3WnBHYf.js} +1 -1
- package/dist/client/assets/{discover-m_-jSxcN.js → discover-Ciw-8-nj.js} +1 -1
- package/dist/client/assets/{domain-settings-CQt8yuzL.js → domain-settings-D4e35lZa.js} +1 -1
- package/dist/client/assets/{drawer-DgvYa3k0.js → drawer-CROtV2u4.js} +1 -1
- package/dist/client/assets/{editor-classes-Ds44wzZG.js → editor-classes-DYlqLnQ7.js} +1 -1
- package/dist/client/assets/{editor-C2k7wzhY.js → editor-ipOJFDhA.js} +1 -1
- package/dist/client/assets/{empty-state-R8mrYCIa.js → empty-state-DM4xv3sa.js} +1 -1
- package/dist/client/assets/{empty-state-CAav-Xpz.js → empty-state-I_cTbW85.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-4aUPiLsm.js → experiments-tab-choice-C9Djubgs.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DJrQm_Aj.js → extract-connection-data-DjYTV7t7.js} +1 -1
- package/dist/client/assets/{feature-gate-CzNyzvDc.js → feature-gate-DMrFeUy1.js} +1 -1
- package/dist/client/assets/{feature-paywall-CIskqUv5.js → feature-paywall-DL1BXqDM.js} +1 -1
- package/dist/client/assets/{file-explorer-CFx-jGiv.js → file-explorer-QEFcL5Sf.js} +1 -1
- package/dist/client/assets/{file-preview-D23rhyCZ.js → file-preview-f1ZCefMe.js} +1 -1
- package/dist/client/assets/{file-share-button-Cdg8mRxK.js → file-share-button-C-f43toh.js} +1 -1
- package/dist/client/assets/{file-type-icon-CFo6D_mq.js → file-type-icon-CdjLDWdN.js} +1 -1
- package/dist/client/assets/{folder-icon-DCPIgOII.js → folder-icon-DjWOZO3O.js} +1 -1
- package/dist/client/assets/{form-lT2yclrj.js → form-DlZ0KMAb.js} +1 -1
- package/dist/client/assets/{frame-navigation-DDFtKbzS.js → frame-navigation-DMXKoo4B.js} +1 -1
- package/dist/client/assets/{gateway-client-BjTndvcO.js → gateway-client-B4qzR3sF.js} +1 -1
- package/dist/client/assets/{general-C9WlB8qj.js → general-CgIfCf24.js} +1 -1
- package/dist/client/assets/{github-icon-CXz0klo1.js → github-icon-Bq9Ot22_.js} +1 -1
- package/dist/client/assets/{held-block-view-Jaxz4Y5b.js → held-block-view-QD0AvQ2Q.js} +1 -1
- package/dist/client/assets/{home-BXZC4jI0.js → home-CfP1B6zJ.js} +1 -1
- package/dist/client/assets/{home-overview-feV5lz_7.js → home-overview-B7AwMB08.js} +1 -1
- package/dist/client/assets/{hosted-reconcile-LANuriok.js → hosted-reconcile-rjhKNGnc.js} +1 -1
- package/dist/client/assets/{icon-button-DnYO-W8b.js → icon-button-BH8Qviy5.js} +1 -1
- package/dist/client/assets/{index-BdizT4sC.js → index-5erPNBmj.js} +1 -1
- package/dist/client/assets/{index-CpCzT9a1.js → index-BL01DXCf.js} +1 -1
- package/dist/client/assets/{index-2cNmpT6g.js → index-BcACgHiu.js} +1 -1
- package/dist/client/assets/{index-BFdtW_Lt.js → index-CDQbtG2e.js} +1 -1
- package/dist/client/assets/{index-Cf6V_if2.js → index-CJKec1wg.js} +1 -1
- package/dist/client/assets/{index-B4E0TU9S.js → index-CLFrG0Qs.js} +1 -1
- package/dist/client/assets/{index-YMgj8hIR.js → index-Co7YBLf6.js} +1 -1
- package/dist/client/assets/{index-BKxKXWi8.js → index-D23-6Dnm.js} +1 -1
- package/dist/client/assets/{index-CfZknZT0.js → index-DDkGmjwq.js} +1 -1
- package/dist/client/assets/{index-CBBEwfQu.js → index-DGzw_xp5.js} +1 -1
- package/dist/client/assets/{index-CIjrpBSD.js → index-DMpANy5-.js} +1 -1
- package/dist/client/assets/{index-DjiY50Ig.js → index-DrJBZ2ZV.js} +1 -1
- package/dist/client/assets/{index-B--QVBAJ.js → index-MkoN5oFR.js} +1 -1
- package/dist/client/assets/{index-CC6YS-rB.js → index-g3eDw_KE.js} +1 -1
- package/dist/client/assets/{index-CDemOiV4.js → index-kCm_MC3x.js} +1 -1
- package/dist/client/assets/{index-redirect-CRqpPHp_.js → index-redirect-BxpEByen.js} +1 -1
- package/dist/client/assets/{index-CrQFnFIn.js → index-rjS4IUT9.js} +1 -1
- package/dist/client/assets/{index-CTKVsdNw.js → index-ztdGKvBm.js} +3 -3
- package/dist/client/assets/{infiniteQueryObserver-DpQtHqSr.js → infiniteQueryObserver-C3KEOANj.js} +1 -1
- package/dist/client/assets/{infra-billing-B6OZsXvT.js → infra-billing-BFFvEbBo.js} +1 -1
- package/dist/client/assets/{input-A0pROuXz.js → input-B2QsYffT.js} +3 -3
- package/dist/client/assets/{input-DGwNGk5F.js → input-aLblPHPG.js} +1 -1
- package/dist/client/assets/{integration-icon-CkDjbcLK.js → integration-icon-Bo-3z9o3.js} +1 -1
- package/dist/client/assets/{item-actions-KIdbZTtB.js → item-actions-BDi0HvuM.js} +1 -1
- package/dist/client/assets/{jira-icon-BMYvV1_v.js → jira-icon-CucNVYe0.js} +1 -1
- package/dist/client/assets/{label-DQEXoY6T.js → label-8UxgpYiA.js} +1 -1
- package/dist/client/assets/{layout-iVR8y_67.js → layout-CiYqNQ7K.js} +1 -1
- package/dist/client/assets/{legacy-admin-welcome-dialog-DwPqDRJj.js → legacy-admin-welcome-dialog-plmLACwz.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-CAYjJgJ0.js → legacy-agents-deep-DyZsDG6s.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-7oq1Xg-K.js → legacy-main-redirect-CRUswcYw.js} +1 -1
- package/dist/client/assets/library-DKz4y7U8.js +1 -0
- package/dist/client/assets/{library-tab-Cu5f_jPA.js → library-tab-DdqgBq7X.js} +1 -1
- package/dist/client/assets/{login-03pZYKr5.js → login-CSH2sxCM.js} +1 -1
- package/dist/client/assets/{markdown-CBsDAJwx.js → markdown-CJR_ooUO.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-GqMvWkA6.js → mcp-app-renderer-DU6s3Olv.js} +1 -1
- package/dist/client/assets/{mcp-oauth-JdceSX9b.js → mcp-oauth-Alln4VX8.js} +1 -1
- package/dist/client/assets/{mcp-oauth-n1oSp2-S.js → mcp-oauth-BBSVAQ62.js} +1 -1
- package/dist/client/assets/{members-CLfw7bse.js → members-NK4Xc07V.js} +1 -1
- package/dist/client/assets/{memory-C2r2x0xw.js → memory-DMWEEOEF.js} +1 -1
- package/dist/client/assets/{mock-board-Dd8r2LEz.js → mock-board-NMto_IE_.js} +3 -3
- package/dist/client/assets/{monaco-editor-BIu4Dvyb.js → monaco-editor-CLzWWWtl.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-D7PBO8sI.js → monitoring-stats-row-B4nREvBy.js} +1 -1
- package/dist/client/assets/{monitoring-CoMGNBw0.js → monitoring-tu8T670c.js} +1 -1
- package/dist/client/assets/{multi-select-CL-U4v6T.js → multi-select-DT2CaFLR.js} +1 -1
- package/dist/client/assets/{mustache-jt6LkG70.js → mustache-CNuJ7AZ0.js} +1 -1
- package/dist/client/assets/{named-rule-step-DUY-1xO9.js → named-rule-step-BUKBZ8bi.js} +1 -1
- package/dist/client/assets/{named-rule-view-BPYxwRaw.js → named-rule-view-B2F_JWdt.js} +1 -1
- package/dist/client/assets/{new-project-dialog-DGVfOfmA.js → new-project-dialog-BW6Lh52P.js} +1 -1
- package/dist/client/assets/{new-project-store-DAT5Euei.js → new-project-store-DID5OVrt.js} +1 -1
- package/dist/client/assets/{oauth-callback-Bn-MRrdp.js → oauth-callback-CaqSxMor.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CApiV1K6.js → oauth-callback-ai-provider-U0bkWwKJ.js} +1 -1
- package/dist/client/assets/{oauth-consent-D9k2Pclp.js → oauth-consent-BSgGE3Bs.js} +1 -1
- package/dist/client/assets/{onboarding-CuJzAlBZ.js → onboarding-DhuU_4Fu.js} +1 -1
- package/dist/client/assets/{openai-conversation-DZS79nav.js → openai-conversation-XKCKDcRG.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-DrPHYnmI.js → optimistic-project-sidebar-views-aXJkp7Aa.js} +1 -1
- package/dist/client/assets/{order-monitor-day-BZweP0_g.js → order-monitor-day-BS6DbEul.js} +1 -1
- package/dist/client/assets/{organization-choice-Co4VhRJ8.js → organization-choice-BA2J1Sub.js} +1 -1
- package/dist/client/assets/{orgs-DQU9n7nk.js → orgs-BM_ILPKb.js} +1 -1
- package/dist/client/assets/{own-accounts-section-CuZ-eqUG.js → own-accounts-section-C2hUsPB2.js} +1 -1
- package/dist/client/assets/{pair-BR0xVY7K.js → pair-DmyTA2cC.js} +1 -1
- package/dist/client/assets/{parse-sections-DwNpuqYY.js → parse-sections-Bun2U10n.js} +2 -2
- package/dist/client/assets/plan-BjkLd82J.js +1 -0
- package/dist/client/assets/{plan-ladder-CYLyF8a4.js → plan-ladder-C3ogU-RT.js} +1 -1
- package/dist/client/assets/{plan-page-CWIUB4vl.js → plan-page-CqrnghH1.js} +1 -1
- package/dist/client/assets/{plan-usage-card-D7CUbMYX.js → plan-usage-card-Cu6N697K.js} +1 -1
- package/dist/client/assets/{popover-DBuD8VkZ.js → popover-C4oz5B-L.js} +1 -1
- package/dist/client/assets/{post-calendar-C7KRPE_7.js → post-calendar-C9jkdGJh.js} +1 -1
- package/dist/client/assets/{post-editor-BTOUUukW.js → post-editor-cvzIrkiW.js} +1 -1
- package/dist/client/assets/{preview-content-CTLVXt4I.js → preview-content-f1yPbBN0.js} +1 -1
- package/dist/client/assets/{preview-dialog-Dp4GbSi5.js → preview-dialog-BPjf_vPa.js} +1 -1
- package/dist/client/assets/{preview-panel-CbnF0XdA.js → preview-panel-a1ouBSIL.js} +1 -1
- package/dist/client/assets/{preview-tab-CHmFDbc5.js → preview-tab-g0gk5kBr.js} +3 -3
- package/dist/client/assets/{primitives-B9kPUDQM.js → primitives-BbUqWJzg.js} +1 -1
- package/dist/client/assets/{product-picker-dialog-CUwMfU8B.js → product-picker-dialog-Bux2F3Cd.js} +1 -1
- package/dist/client/assets/{profile-CuhUpReQ.js → profile-Dc_5h7y4.js} +1 -1
- package/dist/client/assets/{project-app-view-BCEvOARd.js → project-app-view-9F75U5zq.js} +1 -1
- package/dist/client/assets/{project-apps-897ilIEF.js → project-apps-BcKyvp4E.js} +1 -1
- package/dist/client/assets/{project-icon-DWIG3WsN.js → project-icon-fQqckccl.js} +1 -1
- package/dist/client/assets/{project-index-BUfiy84V.js → project-index-C2IrSomv.js} +1 -1
- package/dist/client/assets/project-reports-B_rUnWW1.js +1 -0
- package/dist/client/assets/project-tasks-em-dO97Z.js +1 -0
- package/dist/client/assets/{projects-BWsFj0pV.js → projects-BMIqPW4r.js} +1 -1
- package/dist/client/assets/{projects-empty-state-IIoHkVX6.js → projects-empty-state-DXP1mqYF.js} +1 -1
- package/dist/client/assets/{prompts-CzjNQB4y.js → prompts-DpRerlb-.js} +1 -1
- package/dist/client/assets/record-editor-EDBIJjSW.js +1 -0
- package/dist/client/assets/{redirect-editor-Q4eWaKev.js → redirect-editor-C-75DqJ8.js} +1 -1
- package/dist/client/assets/reports-Bll5rys5.js +1 -0
- package/dist/client/assets/{reports-CPNIXsMR.js → reports-DrD55ws1.js} +1 -1
- package/dist/client/assets/{reports-onboarding-sOnle8tZ.js → reports-onboarding-wE7JwoZi.js} +1 -1
- package/dist/client/assets/{reports-tab-CmQl03Vu.js → reports-tab-Bm-CyJCU.js} +2 -2
- package/dist/client/assets/{repositories-BkFYZENo.js → repositories-DQbDt3rW.js} +1 -1
- package/dist/client/assets/repositories-V5ZADqdz.js +1 -0
- package/dist/client/assets/{repository-binding-C7rU_ngE.js → repository-binding-D_Xc1yRH.js} +1 -1
- package/dist/client/assets/{repository-picker-LXFO8bDM.js → repository-picker-CSaozawA.js} +1 -1
- package/dist/client/assets/{require-capability-3euEuxZx.js → require-capability-BvMWopKN.js} +1 -1
- package/dist/client/assets/{required-auth-layout-Xfd5oNH3.js → required-auth-layout-Cwtu4iIe.js} +1 -1
- package/dist/client/assets/{reset-password-DT6s-J5W.js → reset-password-CCjgtMBz.js} +1 -1
- package/dist/client/assets/{resizable-Bmb2XXOb.js → resizable-DNBx7bMi.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-NbNekjKu.js → resolve-tab-icon-XkjIOifK.js} +1 -1
- package/dist/client/assets/{review-settings-B1X3rfKZ.js → review-settings-DnBaXa8b.js} +1 -1
- package/dist/client/assets/{role-color-LobmKhmk.js → role-color-CCLGEajG.js} +1 -1
- package/dist/client/assets/{roles-vlbcWqYa.js → roles-DDL7RCB4.js} +1 -1
- package/dist/client/assets/route-BByW4wWq.js +1 -0
- package/dist/client/assets/{route-DZ15K8C3.js → route-Bz0dgJ2I.js} +1 -1
- package/dist/client/assets/{route-COPrIJ58.js → route-cP2t4t1J.js} +1 -1
- package/dist/client/assets/{route-page-header-DpYcASGe.js → route-page-header-CApA0aIo.js} +1 -1
- package/dist/client/assets/{sandbox-git-api-zgEm1abw.js → sandbox-git-api-BsG4EzUP.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-B8XBQ27H.js → sandbox-lifecycle-context-DbNrw8-a.js} +1 -1
- package/dist/client/assets/{save-status-P-MBD5-0.js → save-status-DhQhbNh0.js} +1 -1
- package/dist/client/assets/{schema-BNEJODyB.js → schema-Bb-DbvPZ.js} +1 -1
- package/dist/client/assets/{schema-DehrCLDJ.js → schema-D_OZwHJO.js} +1 -1
- package/dist/client/assets/{scroll-area-C9_ZoUPP.js → scroll-area-Dm3EbBj1.js} +1 -1
- package/dist/client/assets/{search-input-DlGuVm3Y.js → search-input-BQ8Dp8aD.js} +1 -1
- package/dist/client/assets/{search-toggle-CCoKiZr4.js → search-toggle-1gezrIbC.js} +1 -1
- package/dist/client/assets/{secret-picker--vdUnukB.js → secret-picker-Bjl5COEs.js} +1 -1
- package/dist/client/assets/{secrets-nwRSqY5_.js → secrets-k-1ebMsD.js} +1 -1
- package/dist/client/assets/{section-array-field-C-IVu4bI.js → section-array-field-uECXIzc8.js} +1 -1
- package/dist/client/assets/{sections-C-kr2WbP.js → sections-BA7rlacS.js} +1 -1
- package/dist/client/assets/{sections-editor-pzrzBV_6.js → sections-editor-DFekY7v1.js} +1 -1
- package/dist/client/assets/{select-DDLvK1MW.js → select-CxXZwsSr.js} +1 -1
- package/dist/client/assets/{select-model-9Qz7X06u.js → select-model-ocp0molk.js} +1 -1
- package/dist/client/assets/{seo-editor-D9YUlsJr.js → seo-editor-XFI4kpN6.js} +1 -1
- package/dist/client/assets/{separator-D4AcMC3Q.js → separator-BQ6pXQbe.js} +1 -1
- package/dist/client/assets/{session-runtime-DUDcoTOp.js → session-runtime-DBl1Hlcw.js} +1 -1
- package/dist/client/assets/settings-tab-DiVoBlPy.js +1 -0
- package/dist/client/assets/{sheet-DwYk86zq.js → sheet-C-umRrOH.js} +1 -1
- package/dist/client/assets/{shell-layout-DjDFDvAp.js → shell-layout-UF80oiAz.js} +1 -1
- package/dist/client/assets/{site-draft-actions-BFo_T6rU.js → site-draft-actions-FVwQt-Zd.js} +1 -1
- package/dist/client/assets/{site-draft-view-CKOJ4qSz.js → site-draft-view-BVBNZFVO.js} +1 -1
- package/dist/client/assets/site-editor-C1tqJ8tH.js +1 -0
- package/dist/client/assets/{site-editor-toast-CZULEbbj.js → site-editor-toast-Dq7SmLyr.js} +1 -1
- package/dist/client/assets/{skills-DE35uXBB.js → skills-Cpr_vZ7G.js} +1 -1
- package/dist/client/assets/{slider-BM8aiQga.js → slider-Cqj9bgcu.js} +1 -1
- package/dist/client/assets/{sortable.esm-Ci07B_Jj.js → sortable.esm-CKl9Rez4.js} +1 -1
- package/dist/client/assets/{sso-DYWJrGEf.js → sso-SC-6fSYF.js} +1 -1
- package/dist/client/assets/{suggestion-CFxVXMn8.js → suggestion-aR93AXr2.js} +1 -1
- package/dist/client/assets/{super-agent-icon-DnVZmS9i.js → super-agent-icon-JEja25un.js} +1 -1
- package/dist/client/assets/{switch-BOASvXY2.js → switch-B81oLbqr.js} +1 -1
- package/dist/client/assets/{synced-repos-CfF8I9P4.js → synced-repos-DXCIbAbx.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-BdM4WLaj.js → tab-icon-glyph-CYp2YuI5.js} +1 -1
- package/dist/client/assets/{table-DRfPsdaj.js → table-C3AdbrSy.js} +1 -1
- package/dist/client/assets/{tabs-BGcPqJhP.js → tabs-nQ7_UOyl.js} +1 -1
- package/dist/client/assets/{task-board-DHRO-oCR.js → task-board-i6qU2BVR.js} +1 -1
- package/dist/client/assets/{task-key-dODSqtOD.js → task-key-Bt60Ndov.js} +1 -1
- package/dist/client/assets/{task-route-Cy5WEzJq.js → task-route-C3cK6F8S.js} +1 -1
- package/dist/client/assets/{task-status-CfOd57tl.js → task-status-DYgcNbkh.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-O8vpzQJ4.js → taskboard-analytics-BQ6MoPkZ.js} +1 -1
- package/dist/client/assets/{tasks-BHJB1jJ_.js → tasks-BHVyL8aT.js} +1 -1
- package/dist/client/assets/tasks-DCmQbZqA.js +1 -0
- package/dist/client/assets/{textarea-CIDyBlnB.js → textarea-viSdm6BE.js} +1 -1
- package/dist/client/assets/{thread-analytics-B5D5JEsi.js → thread-analytics-Cpl3jv6S.js} +1 -1
- package/dist/client/assets/{thread-button-BjvcH6Vx.js → thread-button-CP83i3PG.js} +1 -1
- package/dist/client/assets/{thread-intent-D4UZcJTa.js → thread-intent-DyZ5A9F9.js} +1 -1
- package/dist/client/assets/{thread-route-BoKIU7Oy.js → thread-route-BbVh3366.js} +1 -1
- package/dist/client/assets/{thread-route-PqBNFZfw.js → thread-route-CfpvvkkL.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-SffXqBpH.js → thread-sheet-body-CC8y_ZHb.js} +1 -1
- package/dist/client/assets/{time-range-picker-BRE9Qg9V.js → time-range-picker-BJPUtKv4.js} +1 -1
- package/dist/client/assets/{toggle-group-BcyNxcnc.js → toggle-group-yQeAFu4u.js} +1 -1
- package/dist/client/assets/{tool-set-selector-CkNcSn8D.js → tool-set-selector-CRKf3QUk.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-B8gCtGPy.js → toolbar-icon-button-Cz-oOJ1w.js} +1 -1
- package/dist/client/assets/{tooltip-Cilmqep0.js → tooltip-Bm0P1gm_.js} +1 -1
- package/dist/client/assets/{tooltipContext-HNg68jH0.js → tooltipContext-CSDtg0Lk.js} +1 -1
- package/dist/client/assets/{track-CGCFac8w.js → track-DLNDfCEf.js} +1 -1
- package/dist/client/assets/{types-CnPGvQg1.js → types-5-cDe_8u.js} +1 -1
- package/dist/client/assets/{url-slug-ClELDWkv.js → url-slug-CII_0B7H.js} +1 -1
- package/dist/client/assets/{usage-stats-B3MiRtbE.js → usage-stats-B0_Yl-r0.js} +1 -1
- package/dist/client/assets/{use-ai-providers-zUKWfsvx.js → use-ai-providers-Ct2xvYDX.js} +1 -1
- package/dist/client/assets/{use-api-keys-BGtID6j7.js → use-api-keys-BXqgEl25.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule-M1kWOQUn.js → use-apply-named-rule-BXltW_Uu.js} +1 -1
- package/dist/client/assets/use-ask-in-chat-DiwquGLH.js +1 -0
- package/dist/client/assets/{use-automations-DNYDf9Ty.js → use-automations-BF2lxi1L.js} +1 -1
- package/dist/client/assets/{use-autosave-C_qxtxF5.js → use-autosave-3MAlhbEw.js} +1 -1
- package/dist/client/assets/use-blocks-v8-project-BPvEDyS9.js +1 -0
- package/dist/client/assets/use-blog-view-DMfZjkz0.js +1 -0
- package/dist/client/assets/{use-chat-layout-state-DyZj7x9R.js → use-chat-layout-state-Im_c7sw4.js} +1 -1
- package/dist/client/assets/{use-cms-publish-actions-CD9zGQ2J.js → use-cms-publish-actions-BWS3AiLQ.js} +1 -1
- package/dist/client/assets/{use-connect-companion-DfgT1HMG.js → use-connect-companion-6TAp--e4.js} +1 -1
- package/dist/client/assets/{use-connection-CZ1NbbVy.js → use-connection-CcG4QE1K.js} +1 -1
- package/dist/client/assets/{use-content-sync-Cq2aGUf5.js → use-content-sync-GJv8DmEo.js} +1 -1
- package/dist/client/assets/{use-copy-BktBumBM.js → use-copy-DT4_uVrH.js} +1 -1
- package/dist/client/assets/{use-current-view-EZITdVTI.js → use-current-view-DBmQQ8uy.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-Bv5Sdh_7.js → use-date-fns-locale-CloMwBOl.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-CPlvHHLn.js → use-debounced-autosave-CCeLz8XW.js} +1 -1
- package/dist/client/assets/{use-debounced-value-Dd9WXi-P.js → use-debounced-value-DO5dvp6c.js} +1 -1
- package/dist/client/assets/{use-deco-credits-C7fZIj6N.js → use-deco-credits-yGgE3j79.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-BnISHAGr.js → use-decopilot-events-43RPCkUH.js} +1 -1
- package/dist/client/assets/{use-delete-block-DTWO1nrc.js → use-delete-block-BDYGRW7T.js} +1 -1
- package/dist/client/assets/{use-delete-connection-mXUaCdnB.js → use-delete-connection-D6MGPJka.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-BPWk2wkA.js → use-deployment-admin-Cr4LWHG9.js} +1 -1
- package/dist/client/assets/{use-entitlements-CGKQp5Ve.js → use-entitlements-Gn1rhCN5.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-CPu4xvwz.js → use-fast-preview-draft-url-CpggWNTk.js} +1 -1
- package/dist/client/assets/{use-file-configs-CcLJWcIx.js → use-file-configs-3gwPBXwK.js} +1 -1
- package/dist/client/assets/{use-id-selection-Umi6LFyy.js → use-id-selection-DNp_iXDg.js} +1 -1
- package/dist/client/assets/{use-in-settings-DpMiymIv.js → use-in-settings-CFQ9B3W2.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-DQg2WX2L.js → use-inbox-feed-CbqA9xw0.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CycWyrzU.js → use-infinite-scroll-DdrDrAAo.js} +1 -1
- package/dist/client/assets/{use-join-requests-B4BhVPi4.js → use-join-requests-CNlmT1He.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-ZkgyCIQo.js → use-main-panel-tabs-BmILT_Hf.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-GMXu-v9L.js → use-mcp-auth-status-6sC2vB74.js} +1 -1
- package/dist/client/assets/{use-mcp-client-3JkIBVIw.js → use-mcp-client-2MG3LveS.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-BS4RJMA_.js → use-mcp-prompts-qJSiAdA5.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-ByvSnFS9.js → use-mcp-tools-DOqvKogJ.js} +1 -1
- package/dist/client/assets/{use-mobile-D4Z5otBR.js → use-mobile-C_hdQY5I.js} +1 -1
- package/dist/client/assets/{use-move-blocks-Brooe0Rr.js → use-move-blocks-Bu_TrzH9.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-DNuLTYeG.js → use-navigate-to-agent-Cw8_3uU5.js} +1 -1
- package/dist/client/assets/{use-never-published-CvngtHyh.js → use-never-published-BJeGnEQC.js} +1 -1
- package/dist/client/assets/{use-org-fs-BW-3KvTS.js → use-org-fs-D9dHgOYs.js} +1 -1
- package/dist/client/assets/{use-org-notice-BX7WVuqK.js → use-org-notice-Bg0zOPPj.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-D4v_lsZY.js → use-org-repo-syncs-DXtQY1Ns.js} +1 -1
- package/dist/client/assets/{use-org-sso-CGL9Mumz.js → use-org-sso-_fzcS8V-.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DkS8IzZH.js → use-organization-settings-C2vcrj4S.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-D_4zKcAV.js → use-panel-navigate-0z93k6Ut.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-BIR5C8xh.js → use-project-native-view-presence-C7OB-luC.js} +1 -1
- package/dist/client/assets/{use-project-scope-DR1wnfkK.js → use-project-scope-BwqdbGG4.js} +1 -1
- package/dist/client/assets/{use-recent-apps-CedAxvA5.js → use-recent-apps-DlYlQGYK.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-CyE2NKc1.js → use-reports-diagnostic-CHQxra4V.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-DWTS0v2d.js → use-sandbox-events-E6fWuIsO.js} +1 -1
- package/dist/client/assets/{use-secrets-gsSj0IoF.js → use-secrets-BUuPyfGX.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-Bc792c4s.js → use-section-preview-base-CWHJYT12.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-D2Rggp6e.js → use-sidebar-collapsed-Cy-mIzeN.js} +1 -1
- package/dist/client/assets/{use-tags-B-6GGTRQ.js → use-tags-FRfDz-by.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-BvySA9kr.js → use-task-board-analytics-ByUFAA_6.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-D66jIICd.js → use-task-board-item-prs-B5FCM085.js} +1 -1
- package/dist/client/assets/{use-task-board-items-D4msWN6P.js → use-task-board-items-D2aUd0HA.js} +1 -1
- package/dist/client/assets/{use-task-board-prompts-BiKBad5h.js → use-task-board-prompts-BVOJS_Xo.js} +1 -1
- package/dist/client/assets/{use-task-metadata-u5FWrVcz.js → use-task-metadata-DZBgcb3y.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-C9z66BGs.js → use-thread-outputs-BK5BfLdO.js} +1 -1
- package/dist/client/assets/{use-view-draft-kind-BqlsyAow.js → use-view-draft-kind-BopwZu5H.js} +1 -1
- package/dist/client/assets/{use-voice-input-BxiteUCw.js → use-voice-input-BMrsODyI.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-Ypmdjx1e.js +1 -0
- package/dist/client/assets/{useQueries-Cglcpn8c.js → useQueries-GZbpaWZ_.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-Pk4rU2Ft.js +1 -0
- package/dist/client/assets/{users-NOOsh3xZ.js → users-C3Vmpzra.js} +1 -1
- package/dist/client/assets/{utils-BTsdsvJd.js → utils-COdvgYqW.js} +1 -1
- package/dist/client/assets/{variant-calendar-fD7BE86h.js → variant-calendar-C0eDQjQb.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-CEYGMqhY.js → variant-matcher-override-BAo9iF1F.js} +1 -1
- package/dist/client/assets/{view-header-DzcnIXEq.js → view-header-CGFYM1jX.js} +1 -1
- package/dist/client/assets/{virtual-mcp-cDV9Te_c.js → virtual-mcp-CAb2l-zV.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-BkhdInio.js → watch-sse-pool-DdfLfQcH.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/server.js +378 -378
- package/package.json +1 -1
- package/dist/client/assets/agent-app-BRcFq3N_.js +0 -1
- package/dist/client/assets/agent-deck-DFZMd15r.js +0 -1
- package/dist/client/assets/agent-experiments-BwmqLj-j.js +0 -1
- package/dist/client/assets/agent-file-DrGdjV8i.js +0 -1
- package/dist/client/assets/agent-library-file-CmPv7Krc.js +0 -1
- package/dist/client/assets/agent-library-ql5PM1_p.js +0 -1
- package/dist/client/assets/agent-overview-DTDzoW5N.js +0 -1
- package/dist/client/assets/agent-settings-8YJX0S3n.js +0 -1
- package/dist/client/assets/agent-site-editor-code-BQI2D43u.js +0 -2
- package/dist/client/assets/agent-site-editor-content-CDmctPHk.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-CKC5QFTH.js +0 -1
- package/dist/client/assets/agent-view-FUSo29uN.js +0 -1
- package/dist/client/assets/api-keys-BbCRE0dt.js +0 -1
- package/dist/client/assets/library-CcUW4dD6.js +0 -1
- package/dist/client/assets/plan-CJ9mRGsN.js +0 -1
- package/dist/client/assets/project-reports-DyX_cnwF.js +0 -1
- package/dist/client/assets/project-tasks-ooMrzCbe.js +0 -1
- package/dist/client/assets/record-editor-DXGRK_O0.js +0 -1
- package/dist/client/assets/reports-Cxm5HLgj.js +0 -1
- package/dist/client/assets/repositories-cv2qvoSk.js +0 -1
- package/dist/client/assets/route-DBnYGUy3.js +0 -1
- package/dist/client/assets/settings-tab-BSv-jpzu.js +0 -1
- package/dist/client/assets/site-editor-yQW8pV2u.js +0 -1
- package/dist/client/assets/tasks-BsCMzq1D.js +0 -1
- package/dist/client/assets/use-ask-in-chat-DwZDq51q.js +0 -1
- package/dist/client/assets/use-blocks-v8-project-B_RMtP9Z.js +0 -1
- package/dist/client/assets/use-blog-view-Cf0gUXmH.js +0 -1
- package/dist/client/assets/useInfiniteQuery-C8AjoHI-.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DkDXLw8E.js +0 -1
package/dist/client/assets/{site-draft-actions-BFo_T6rU.js → site-draft-actions-FVwQt-Zd.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,ao as Ha,t as at,eR as Va,av as Pr,dQ as Sr,Y as ms,dR as Ga,aL as Ns,aM as Cs,aN as As,aO as Ws,bc as Js,aP as Rs,aQ as Ds,aR as Ts,X as tn,Z as sn,_ as nn,a as rn,a6 as Is,c1 as Wa,h as ps,eS as kr,eT as Nr,eU as Sn,bB as Ja,br as Qa,bw as Zn,eV as Ya,ap as Xa,I as Za,a9 as el,eW as tl,V as Cr,i as gt,eO as kn,q as Ar,J as Rr,D as Dr,x as Tr,v as Br,Q as Ir,R as $r,aZ as sl,bd as Fr,a7 as Nn,b9 as Cn,e as er,E as nl,T as rl}from"./index-CTKVsdNw.js";import{S as al}from"./separator-D4AcMC3Q.js";import{f as ll,u as vs,r as Lr,l as Or,c as Mr,b as il}from"./chat-context-MoYYfmsS.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-CZULEbbj.js";import{L as bl}from"./use-org-notice-BX7WVuqK.js";import{I as Kr}from"./toolbar-icon-button-B8gCtGPy.js";import{b as gl,P as xl,a as vl}from"./popover-DBuD8VkZ.js";import{c as lt,T as it,a as ot,b as an}from"./tooltip-Cilmqep0.js";import{f as yl,a as jl,c as wl,C as tr,e as sr,b as nr}from"./command-gq8mLEwk.js";import{T as Lt,a as qr,b as Hr}from"./tabs-BGcPqJhP.js";import{t as Vr}from"./ChevronDown-C2op7Ztq.js";import{b as Pl}from"./UserCheck01-BzJrArBA.js";import{L as Gr,ac as ln,a as Wr,G as Sl,b as kl,ad as Jr}from"./agent-icon-BeQK1LIp.js";import{a as Qr}from"./SwitchHorizontal01-B9k8zywr.js";import{b as Yr}from"./Tool01-BCxvp4xD.js";import{s as Xr}from"./Plus-lVBJlI-r.js";import{s as on}from"./Trash01-Tyi0X0KA.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-BqlsyAow.js";import{u as Bn}from"./use-blog-view-Cf0gUXmH.js";import{u as ys}from"./use-voice-input-BxiteUCw.js";import{b as Rl,d as ta}from"./session-runtime-DUDcoTOp.js";import{h as sa,r as na,b as $s,g as Dl,e as ze,f as ra}from"./repository-binding-C7rU_ngE.js";import{u as Tl}from"./use-debounced-value-Dd9WXi-P.js";import{a as Bl,u as Il}from"./shell-layout-DjDFDvAp.js";import{u as $l}from"./useInfiniteQuery-C8AjoHI-.js";import{d as Fl,b as Ll,p as Ol,e as aa,g as la,h as ia}from"./use-navigate-to-agent-DNuLTYeG.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-CwV6xthd.js";import{e as ql,g as Hl,f as In}from"./thread-intent-D4UZcJTa.js";import{a as Qs}from"./virtual-mcp-cDV9Te_c.js";import{u as $n}from"./use-blocks-v8-project-B_RMtP9Z.js";import{G as ca}from"./github-icon-CXz0klo1.js";import{f as Vl,r as Gl,u as da}from"./content-changes-B7QLNPm9.js";import{a as Wl,b as Jl}from"./use-fast-preview-draft-url-CPu4xvwz.js";import{a3 as hs,a4 as ua,A as Ys,q as Fn,a5 as Ql,a6 as Yl,F as Xl,a7 as Zl,a8 as ei,p as ti,e as At,f as Ln,a9 as si}from"./blocks-tab-states-CBGKB5th.js";import"./index-BdizT4sC.js";import{T as ni}from"./textarea-CIDyBlnB.js";import{i as On}from"./CheckCircle-DQx8J3sX.js";import{s as Xs}from"./Eye-D1n0U2nr.js";import{n as ri,s as ai,C as li,a as ii,b as oi,M as ci,c as di,d as ui,m as hi,u as fi}from"./use-cms-publish-actions-CD9zGQ2J.js";import{b as mi,j as pi}from"./UserSquare-Csaj5_OE.js";import{i as Mn,b as _n,m as bi,h as gi,c as ha,f as fa,d as xi,r as En,e as vi,n as yi,g as ji,j as wi,k as Pi,l as zn,o as Si,p as ma,q as ki,s as Un,B as Ni,t as fn}from"./sandbox-git-api-zgEm1abw.js";import{a as Ci,g as Ai}from"./utils-BTsdsvJd.js";import{i as Ri}from"./Monitor01-DRn7cBTS.js";import{w as Kn,R as pa}from"./device-hint-C_jFHzsP.js";import{w as rr}from"./editor-C2k7wzhY.js";import{i as Di,C as Ti}from"./section-array-field-C-IVu4bI.js";import{T as Bi,a as ar}from"./toggle-group-BcyNxcnc.js";import{s as ba}from"./save-changes-debug-nBi-n9eV.js";import{u as Ii}from"./use-mcp-client-3JkIBVIw.js";import{t as $i}from"./MessageCircle01-CmMj6zOJ.js";import{u as Fi}from"./use-sandbox-events-DWTS0v2d.js";import{b as Li,a as Oi}from"./sandbox-lifecycle-context-B8XBQ27H.js";import{b as Mi}from"./agent-capabilities-CwQVSwUn.js";import{c as _i}from"./thread-route-PqBNFZfw.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 Wi=100,Ji=50,Qi=300;function vn(t,e){const s=e.trim().toLowerCase();return s?t.toLowerCase().includes(s):!0}function Yi(t){const e=$.c(39),{orgId:s,orgSlug:a,userId:n,target:o,sandboxMap:d,owner:l,repo:i,search:u,enabled:c}=t,h=u===void 0?"":u,p=c===void 0?!0:c;let b;e[0]!==h?(b=h.trim(),e[0]=h,e[1]=b):b=e[1];const f=b,m=Tl(f,Qi);let g;e[2]!==o?(g=sa(o),e[2]=o,e[3]=g):g=e[3];const v=g,j=f.length>0;let w;e[4]!==m||e[5]!==s||e[6]!==a||e[7]!==l||e[8]!==i||e[9]!==o?(w=xs.githubBranchSearch(s,a,na(o),l,i,m),e[4]=m,e[5]=s,e[6]=a,e[7]=l,e[8]=i,e[9]=o,e[10]=w):w=e[10];const x=p&&v;let P;e[11]!==m||e[12]!==a||e[13]!==o?(P=T=>{const{pageParam:ee}=T;return Ha(a,"REPOSITORY_SEARCH_BRANCHES",{...o,query:m,limit:m?Ji:Wi,cursor:ee})},e[11]=m,e[12]=a,e[13]=o,e[14]=P):P=e[14];let y;e[15]!==m?(y=T=>m?void 0:T.nextCursor??void 0,e[15]=m,e[16]=y):y=e[16];let N;e[17]!==w||e[18]!==x||e[19]!==P||e[20]!==y?(N={queryKey:w,enabled:x,staleTime:3e4,retry:!1,initialPageParam:null,queryFn:P,getNextPageParam:y},e[17]=w,e[18]=x,e[19]=P,e[20]=y,e[21]=N):N=e[21];const{data:C,isLoading:A,isError:S,isFetching:D,hasNextPage:k,isFetchingNextPage:O,fetchNextPage:I}=$l(N),B=j&&(m!==f||D),F=(C?.pages??[]).flatMap(Xi),L=Bl(6e4),V=Gi({sandboxMap:d,userId:n,rawBranches:F,now:L});let z;e[22]!==f?(z=T=>vn(T.name,f),e[22]=f,e[23]=z):z=e[23];const te=V.recent.filter(z);let M;e[24]!==f?(M=T=>vn(T.name,f),e[24]=f,e[25]=M):M=e[25];const K=V.yours.filter(M),W=V.others,se=C?.pages[0],J=j&&se&&!B?Math.max(0,se.totalCount-se.branches.length):0,ue=!j&&k;let X;e[26]!==I?(X=()=>{I()},e[26]=I,e[27]=X):X=e[27];let le;return e[28]!==J||e[29]!==S||e[30]!==O||e[31]!==A||e[32]!==B||e[33]!==W||e[34]!==te||e[35]!==ue||e[36]!==X||e[37]!==K?(le={recent:te,yours:K,others:W,isLoading:A,isError:S,isSearching:B,hiddenMatchCount:J,hasMore:ue,isFetchingMore:O,fetchMore:X},e[28]=J,e[29]=S,e[30]=O,e[31]=A,e[32]=B,e[33]=W,e[34]=te,e[35]=ue,e[36]=X,e[37]=K,e[38]=le):le=e[38],le}function Xi(t){return t.branches}function Zi(t){const e=$.c(8),s=xe(),{releases:a,createRelease:n}=cn(t.virtualMcpId),o=$s(t.virtualMcpId);let d;return e[0]!==n||e[1]!==t.kind||e[2]!==t.userId||e[3]!==t.userLabel||e[4]!==o||e[5]!==a||e[6]!==s?(d=()=>{if(a.length>=Qs)return at.error(s("thread.branchPicker.capReached",{max:Qs})),null;const l=t.kind==="blog"?ql(t.userLabel):Hl(t.userLabel);return n({branch:l,name:oa(a,s(Hs(l))),color:ks(a.length),createdBy:t.userId,createdAt:new Date().toISOString(),...o?{runtime:ta(o.metadata)}:{}}).catch(i=>{at.error(s("thread.branchPicker.saveError"),{description:_r(s,Er(i))})}),l},e[0]=n,e[1]=t.kind,e[2]=t.userId,e[3]=t.userLabel,e[4]=o,e[5]=a,e[6]=s,e[7]=d):d=e[7],d}const Zs="-mx-[3px] h-3.5 w-3.5 shrink-0";function eo(t){const e=$.c(120),{virtualMcpId:s,isV8:a,userLabel:n,value:o,baseBranch:d,baseIsDraft:l,orgId:i,orgSlug:u,userId:c,target:h,owner:p,repo:b,sandboxMap:f,onChange:m,onCreateBranch:g,onAdoptBranch:v,disabled:j,spawnsNewChat:w,placement:x,draftKind:P}=t,y=a===void 0?!1:a,N=l===void 0?!1:l,C=j===void 0?!1:j,A=w===void 0?!1:w,S=x===void 0?"chat":x,D=P===void 0?"site":P,k=xe(),I=Bn()?D:null,B=S==="header",[F,L]=U.useState(!1),[V,z]=U.useState(!1),[te,M]=U.useState("branches"),[K,W]=U.useState(null),[se,J]=U.useState(""),[ue,X]=U.useState(null),[le,T]=U.useState(null),ee=U.useRef(null),{releases:G,createRelease:ne,renameRelease:re,deleteRelease:Se}=cn(s),he=I??void 0;let be;e[0]!==he||e[1]!==c||e[2]!==n||e[3]!==s?(be={virtualMcpId:s,userLabel:n,userId:c,kind:he},e[0]=he,e[1]=c,e[2]=n,e[3]=s,e[4]=be):be=e[4];const ce=Zi(be),{projectDefault:ie}=ys(s);let E;e[5]!==ie?(E=R=>Kl(R,ie)==="sandbox",e[5]=ie,e[6]=E):E=e[6];const fe=E,ke=Ml(s,y),me=y?_l(G,ke.data):[],Y=ke.refetch,Z=El(s),{url:Be,setUrl:Q,clear:oe}=An(s),Ne=Rn(s),xt=y&&!!Ne.connection,Ye=y?Ne.connection?.endpoint??null:Be,ye=!!Ye;let ve;e[7]!==oe||e[8]!==y||e[9]!==Ne?(ve=()=>{oe(),y&&Ne.clear()},e[7]=oe,e[8]=y,e[9]=Ne,e[10]=ve):ve=e[10];const Re=ve;let $e;e[11]!==F?($e={enabled:F},e[11]=F,e[12]=$e):$e=e[12];const{data:Ue}=Va($e);let Ie;e[13]!==Ue?.data?.members?(Ie=R=>R?Ue?.data?.members?.find(Pe=>Pe.userId===R)?.user?.name??void 0:void 0,e[13]=Ue?.data?.members,e[14]=Ie):Ie=e[14];const Dt=Ie,Ee=G.length>=Qs;let Le;e[15]!==I||e[16]!==ie||e[17]!==G?(Le=R=>!!_s(G,R.branch,I,ie),e[15]=I,e[16]=ie,e[17]=G,e[18]=Le):Le=e[18];const pe=Le,ct=k("thread.branchPicker.capReached",{max:Qs}),{isBase:Xe,current:dt,storeDraft:Oe,unlisted:_}=Ei({value:o,baseBranch:d,releases:G,baseIsDraft:N,storeDrafts:me}),ae=Nl(G,I,o);let je;e[19]!==I||e[20]!==o?(je=R=>I===null||Zr(R.name)===I||R.name===o,e[19]=I,e[20]=o,e[21]=je):je=e[21];const De=me.filter(je),Ze=Xe?k("thread.branchPicker.live"):dt?.name??Oe?.name??k(Hs(o)),ut=xt?k("thread.branchPicker.localhost.label"):ye?k("thread.branchPicker.localLabel"):o?Ze:k("thread.branchPicker.selectVersion"),Et=xt?"bg-foreground":ye?"bg-special":Xe?"bg-success":Oe?Ss(void 0):Ss(dt?.color??"orange"),Ce=!xt&&!ye&&!Xe&&!!dt&&fe(dt),et=R=>{Re();const Pe=me.some(Ct=>Ct.name===R)?{runtime:"cms"}:G.find(Ct=>Ct.branch===R);m(R,Pe&&{runtime:Pe.runtime}),L(!1)};let ht;e[22]!==k?(ht=R=>{at.error(k("thread.branchPicker.saveError"),{description:_r(k,Er(R))})},e[22]=k,e[23]=ht):ht=e[23];const tt=ht;let zt;e[24]!==Q?(zt=R=>{Q(R),z(!1),L(!1)},e[24]=Q,e[25]=zt):zt=e[25];const js=zt,Tt=(R,Pe)=>{if(Re(),v){v(R),z(!1),L(!1);return}if(!G.some(Ct=>Ct.branch===R)){if(Ee){at.error(ct);return}ne({branch:R,name:Pe.trim()||R,color:ks(G.length),createdBy:c,createdAt:new Date().toISOString()}).catch(tt)}m(R),z(!1),L(!1)};let vt;e[26]!==Re||e[27]!==m||e[28]!==g||e[29]!==ce?(vt=()=>{const R=ce();R&&(Re(),(g??m)(R),L(!1))},e[26]=Re,e[27]=m,e[28]=g,e[29]=ce,e[30]=vt):vt=e[30];const ws=vt;let st;e[31]===Symbol.for("react.memo_cache_sentinel")?(st=()=>{W(null),J(""),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=>{W(R.branch),J(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),W(null),J("")},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),W(null),J("");return}ne({branch:Pe,name:Ct,color:ks(G.length),createdBy:c,createdAt:new Date().toISOString()}).catch(tt)}W(null),J("")};let St;e[38]===Symbol.for("react.memo_cache_sentinel")?(St=()=>{W(null),J("")},e[38]=St):St=e[38];const ft=St,It=()=>{const R=ue;if(X(null),!(!R||!pe(R))){if(R.branch===o){const Pe=_s(G,R.branch,I,ie);Pe?et(Pe.branch):L(!1)}else L(!1);Se(R.branch).catch(tt)}},mt=zl(ae,ie),Ps=(mt.content.length>0||De.length>0)&&mt.code.length>0,$t=R=>K===R.branch?r.jsx(mn,{value:se,onChange:J,onSave:()=>Kt(R.branch),onCancel:ft},R.branch):r.jsx(pn,{rowRef:!ye&&R.branch===o?ee:void 0,dot:Ss(R.color),codeIcon:fe(R)?Es(R.color):void 0,label:R.name,creator:Dt(R.createdBy),originTooltip:y?k("thread.branchPicker.viaStudioUi"):void 0,branch:!y||fe(R)?R.branch:void 0,selected:!ye&&R.branch===o,onSelect:()=>et(R.branch),onRename:()=>Ut(R),onDelete:()=>X(R),deleteBlocked:!pe(R)},R.branch),Ft=()=>{const R=le;if(T(null),!!R){if(R.name===o){const Pe=_s(G,R.name,I,ie);if(!Pe)return;et(Pe.branch)}Z.mutateAsync(R.name).catch(Pe=>{at.error(k("thread.branchPicker.discardStoreDraftError"),{description:Pe instanceof Error?Pe.message:void 0})})}},pt=De.map(R=>K===R.name?r.jsx(mn,{value:se,onChange:J,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:()=>{W(R.name),J(R.name)},onDelete:()=>T(R),deleteBlocked:R.name===o&&!_s(G,R.name,I,ie)},`store:${R.name}`));let Ke;e[39]!==C||e[40]!==y||e[41]!==Y?(Ke=C?void 0:R=>{R?y&&Y():Bt(),L(R)},e[39]=C,e[40]=y,e[41]=Y,e[42]=Ke):Ke=e[42];const nt=B?"text-xs":"text-xs text-muted-foreground hover:text-foreground";let qe;e[43]!==nt?(qe=H("shrink min-w-0 max-w-[220px] gap-2",nt,Kr),e[43]=nt,e[44]=qe):qe=e[44];let He;e[45]!==C?(He=!C&&r.jsx(Vr,{size:12,className:"opacity-60 shrink-0"}),e[45]=C,e[46]=He):He=e[46];let Ve;e[47]!==ut?(Ve=r.jsx(ot,{children:ut}),e[47]=ut,e[48]=Ve):Ve=e[48];const rt=gl,kt="w-[min(300px,calc(100vw-2rem))] p-1.5",Nt="start";let Me;e[49]===Symbol.for("react.memo_cache_sentinel")?(Me=R=>{R.preventDefault(),ee.current?.scrollIntoView({block:"nearest"})},e[49]=Me):Me=e[49];let Ge;e[50]!==A||e[51]!==k?(Ge=A&&r.jsx("p",{className:"px-2 pb-1.5 pt-1 text-xs text-muted-foreground",children:k("thread.branchPicker.newChatHint")}),e[50]=A,e[51]=k,e[52]=Ge):Ge=e[52];const q=V?r.jsx(so,{orgId:i,orgSlug:u,userId:c,target:h,owner:p,repo:b,sandboxMap:f,enabled:F,tab:te,onTabChange:M,isV8:y,localUrl:Be,onSaveLocal:js,onBack:()=>z(!1),onAdopt:Tt,draftKind:I}):r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:H("always-scrollbar flex max-h-[min(50vh,20rem)] flex-col overflow-y-auto",y&&"gap-1"),children:[!y&&ye&&Ye&&r.jsx(to,{rowRef:ee,url:Ye,onSelect:()=>jt("local"),onEdit:()=>jt("local"),onTurnOff:()=>Re()}),_&&o&&(K===o?r.jsx(mn,{value:se,onChange:J,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:()=>{W(o),J(oa(G,k(Hs(o))))}})),Ps?r.jsxs(r.Fragment,{children:[r.jsx(or,{children:k("thread.branchPicker.groupContent")}),mt.content.map($t),pt,r.jsx(or,{divided:!0,children:k("thread.branchPicker.groupCode")}),mt.code.map($t)]}):r.jsxs(r.Fragment,{children:[ae.map($t),pt]}),y&&r.jsx(Ki,{virtualMcpId:s,branch:o,serve:Ne,rowRef:xt?ee:void 0,onPicked:()=>L(!1)})]}),(_||ae.length>0||De.length>0||y)&&r.jsx("div",{className:"my-1 border-t"}),r.jsxs("button",{type:"button",onClick:()=>{ws()},disabled:Ee,className:"flex w-full items-center gap-2 rounded-lg px-2 py-2 text-left text-sm text-muted-foreground hover:bg-accent hover:text-foreground disabled:pointer-events-none disabled:opacity-50",children:[r.jsx(Xr,{className:"h-4 w-4 shrink-0"}),k("thread.branchPicker.newVersion")]}),Ee&&r.jsx("p",{className:"px-2 pb-1 pt-0.5 text-xs text-warning",children:ct}),r.jsxs("button",{type:"button",onClick:()=>jt("branches"),className:H("flex w-full items-center justify-between gap-2 rounded-lg px-2 py-2 text-left text-xs text-muted-foreground hover:bg-accent hover:text-foreground",y&&"mt-1"),children:[k("thread.branchPicker.advanced"),r.jsx(Pr,{className:"h-4 w-4 shrink-0"})]})]});let de;e[53]!==rt||e[54]!==Me||e[55]!==Ge||e[56]!==q?(de=r.jsxs(rt,{className:kt,align:Nt,onOpenAutoFocus:Me,children:[Ge,q]}),e[53]=rt,e[54]=Me,e[55]=Ge,e[56]=q,e[57]=de):de=e[57];const we=r.jsxs(xl,{open:F,onOpenChange:Ke,children:[r.jsxs(lt,{children:[r.jsx(it,{asChild:!0,children:r.jsx("span",{className:"inline-flex min-w-0 shrink",children:r.jsx(vl,{asChild:!0,children:r.jsxs(ge,{"data-tour":bl.branchPicker,variant:B?"outline":"ghost",size:B?"sm":"default","aria-label":ut,disabled:C,className:qe,children:[Ce?r.jsx(Gr,{className:H(Zs,Es(dt?.color))}):Oe&&!ye?r.jsx(Sr,{className:H(Zs,Es(ks(me.indexOf(Oe))))}):r.jsx("span",{className:H("h-2 w-2 shrink-0 rounded-full",o||ye?Et:"bg-muted-foreground")}),r.jsx("span",{className:"min-w-0 truncate @max-3xl/panel-header:hidden",children:ut}),He]})})})}),Ve]}),de]}),Te=ue!==null;let _e;e[58]===Symbol.for("react.memo_cache_sentinel")?(_e=R=>{R||X(null)},e[58]=_e):_e=e[58];let We;e[59]!==k?(We=k("thread.branchPicker.deleteTitle"),e[59]=k,e[60]=We):We=e[60];let Ht;e[61]!==We?(Ht=r.jsx(Ns,{children:We}),e[61]=We,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 Wt;e[68]!==Ht||e[69]!==Gt?(Wt=r.jsxs(As,{children:[Ht,Gt]}),e[68]=Ht,e[69]=Gt,e[70]=Wt):Wt=e[70];let Jt;e[71]!==k?(Jt=k("thread.branchPicker.cancel"),e[71]=k,e[72]=Jt):Jt=e[72];let Qt;e[73]!==Jt?(Qt=r.jsx(Ws,{children:Jt}),e[73]=Jt,e[74]=Qt):Qt=e[74];let Yt;e[75]!==k?(Yt=k("thread.branchPicker.delete"),e[75]=k,e[76]=Yt):Yt=e[76];let Xt;e[77]!==It||e[78]!==Yt?(Xt=r.jsx(Js,{onClick:It,variant:"destructive",children:Yt}),e[77]=It,e[78]=Yt,e[79]=Xt):Xt=e[79];let Zt;e[80]!==Qt||e[81]!==Xt?(Zt=r.jsxs(Rs,{children:[Qt,Xt]}),e[80]=Qt,e[81]=Xt,e[82]=Zt):Zt=e[82];let es;e[83]!==Wt||e[84]!==Zt?(es=r.jsxs(Ds,{children:[Wt,Zt]}),e[83]=Wt,e[84]=Zt,e[85]=es):es=e[85];let Ls;e[86]!==Te||e[87]!==es?(Ls=r.jsx(Ts,{open:Te,onOpenChange:_e,children:es}),e[86]=Te,e[87]=es,e[88]=Ls):Ls=e[88];const hn=le!==null;let Os;e[89]===Symbol.for("react.memo_cache_sentinel")?(Os=R=>{R||T(null)},e[89]=Os):Os=e[89];let ts;e[90]!==k?(ts=k("thread.branchPicker.deleteTitle"),e[90]=k,e[91]=ts):ts=e[91];let ss;e[92]!==ts?(ss=r.jsx(Ns,{children:ts}),e[92]=ts,e[93]=ss):ss=e[93];let ns;e[94]!==le||e[95]!==k?(ns=le&&k("thread.branchPicker.discardStoreDraftConfirm",{name:le.name}),e[94]=le,e[95]=k,e[96]=ns):ns=e[96];let rs;e[97]!==ns?(rs=r.jsx(Cs,{children:ns}),e[97]=ns,e[98]=rs):rs=e[98];let as;e[99]!==ss||e[100]!==rs?(as=r.jsxs(As,{children:[ss,rs]}),e[99]=ss,e[100]=rs,e[101]=as):as=e[101];let ls;e[102]!==k?(ls=k("thread.branchPicker.cancel"),e[102]=k,e[103]=ls):ls=e[103];let is;e[104]!==ls?(is=r.jsx(Ws,{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(Js,{onClick:Ft,variant:"destructive",children:os}),e[108]=Ft,e[109]=os,e[110]=cs):cs=e[110];let ds;e[111]!==is||e[112]!==cs?(ds=r.jsxs(Rs,{children:[is,cs]}),e[111]=is,e[112]=cs,e[113]=ds):ds=e[113];let us;e[114]!==as||e[115]!==ds?(us=r.jsxs(Ds,{children:[as,ds]}),e[114]=as,e[115]=ds,e[116]=us):us=e[116];let Ms;return e[117]!==hn||e[118]!==us?(Ms=r.jsx(Ts,{open:hn,onOpenChange:Os,children:us}),e[117]=hn,e[118]=us,e[119]=Ms):Ms=e[119],r.jsxs(r.Fragment,{children:[we,Ls,Ms]})}function mn(t){const e=$.c(20),{value:s,onChange:a,onSave:n,onCancel:o}=t,d=xe();let l;e[0]!==d?(l=d("thread.branchPicker.rename"),e[0]=d,e[1]=l):l=e[1];let i;e[2]!==a?(i=f=>a(f.target.value),e[2]=a,e[3]=i):i=e[3];let u;e[4]!==o||e[5]!==n?(u=f=>{f.key==="Enter"&&n(),f.key==="Escape"&&(f.preventDefault(),f.stopPropagation(),o())},e[4]=o,e[5]=n,e[6]=u):u=e[6];let c;e[7]!==l||e[8]!==i||e[9]!==u||e[10]!==s?(c=r.jsx("input",{autoFocus:!0,"aria-label":l,value:s,onChange:i,onKeyDown:u,className:"h-8 flex-1 rounded-md border bg-transparent px-2 text-sm focus-ring"}),e[7]=l,e[8]=i,e[9]=u,e[10]=s,e[11]=c):c=e[11];let h;e[12]!==d?(h=d("thread.branchPicker.save"),e[12]=d,e[13]=h):h=e[13];let p;e[14]!==n||e[15]!==h?(p=r.jsx(ge,{size:"sm",onClick:n,children:h}),e[14]=n,e[15]=h,e[16]=p):p=e[16];let b;return e[17]!==c||e[18]!==p?(b=r.jsxs("div",{className:"flex items-center gap-1.5 p-1",children:[c,p]}),e[17]=c,e[18]=p,e[19]=b):b=e[19],b}function or(t){const e=$.c(5),{divided:s,children:a}=t,o=(s===void 0?!1:s)&&"mt-1 border-t";let d;e[0]!==o?(d=H("px-2 pb-1 pt-2 text-xs font-medium uppercase tracking-wide text-muted-foreground",o),e[0]=o,e[1]=d):d=e[1];let l;return e[2]!==a||e[3]!==d?(l=r.jsx("p",{className:d,children:a}),e[2]=a,e[3]=d,e[4]=l):l=e[4],l}function pn(t){const e=$.c(53),{rowRef:s,dot:a,codeIcon:n,agentIcon:o,originTooltip:d,label:l,creator:i,branch:u,selected:c,onSelect:h,onRename:p,onDelete:b,deleteBlocked:f}=t,m=f===void 0?!1:f,g=xe();let v;e[0]!==o||e[1]!==n||e[2]!==a?(v=n?r.jsx(Gr,{className:H(Zs,n)}):o?r.jsx(Sr,{className:H(Zs,o)}):r.jsx("span",{className:H("h-2 w-2 shrink-0 rounded-full",a)}),e[0]=o,e[1]=n,e[2]=a,e[3]=v):v=e[3];let j;e[4]!==i?(j=i&&r.jsx("span",{className:"ml-1.5 text-xs font-normal text-muted-foreground/70",children:i}),e[4]=i,e[5]=j):j=e[5];let w;e[6]!==l||e[7]!==j?(w=r.jsxs("span",{className:"min-w-0 flex-1 truncate",children:[l,j]}),e[6]=l,e[7]=j,e[8]=w):w=e[8];let x;e[9]!==h||e[10]!==c||e[11]!==v||e[12]!==w?(x=r.jsxs("button",{type:"button","aria-pressed":c,onClick:h,className:"flex min-w-0 flex-1 items-center gap-2.5 px-2 py-2 text-left text-sm",children:[v,w]}),e[9]=h,e[10]=c,e[11]=v,e[12]=w,e[13]=x):x=e[13];const P=x,y=c?"bg-accent":"hover:bg-accent";let N;e[14]!==y?(N=H("group flex items-center rounded-lg",y),e[14]=y,e[15]=N):N=e[15];let C;e[16]!==u||e[17]!==n||e[18]!==d||e[19]!==P||e[20]!==g?(C=u||d?r.jsxs(lt,{children:[r.jsx(it,{asChild:!0,children:P}),r.jsxs(ot,{side:"bottom",className:"text-xs",children:[n&&r.jsx("p",{className:"font-medium",children:g("thread.branchPicker.codeDraftTooltip")}),d&&r.jsx("p",{children:d}),u&&r.jsx("p",{className:"font-mono",children:g("thread.branchPicker.branchTooltip",{branch:u})})]})]}):P,e[16]=u,e[17]=n,e[18]=d,e[19]=P,e[20]=g,e[21]=C):C=e[21];let A;e[22]!==g?(A=g("thread.branchPicker.moreActions"),e[22]=g,e[23]=A):A=e[23];let S;e[24]===Symbol.for("react.memo_cache_sentinel")?(S=r.jsx(Qr,{className:"h-4 w-4"}),e[24]=S):S=e[24];let D;e[25]!==A?(D=r.jsx(tn,{asChild:!0,children:r.jsx(ge,{variant:"ghost",size:"icon","aria-label":A,className:"mr-1 h-6 w-6 shrink-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100",children:S})}),e[25]=A,e[26]=D):D=e[26];let k;e[27]===Symbol.for("react.memo_cache_sentinel")?(k=r.jsx(Yr,{className:"h-4 w-4"}),e[27]=k):k=e[27];let O;e[28]!==g?(O=g("thread.branchPicker.rename"),e[28]=g,e[29]=O):O=e[29];let I;e[30]!==p||e[31]!==O?(I=r.jsxs(ms,{onSelect:p,children:[k,O]}),e[30]=p,e[31]=O,e[32]=I):I=e[32];let B;e[33]!==m||e[34]!==b||e[35]!==g?(B=b&&r.jsxs(ms,{onSelect:b,disabled:m,className:"text-destructive focus:text-destructive",children:[r.jsx(on,{className:"h-4 w-4"}),g("thread.branchPicker.delete")]}),e[33]=m,e[34]=b,e[35]=g,e[36]=B):B=e[36];let F;e[37]!==m||e[38]!==b||e[39]!==g?(F=b&&m&&r.jsx("p",{className:"max-w-48 px-2 pb-1.5 text-xs text-muted-foreground",children:g("thread.branchPicker.keepOneDraft")}),e[37]=m,e[38]=b,e[39]=g,e[40]=F):F=e[40];let L;e[41]!==I||e[42]!==B||e[43]!==F?(L=r.jsxs(sn,{align:"end",children:[I,B,F]}),e[41]=I,e[42]=B,e[43]=F,e[44]=L):L=e[44];let V;e[45]!==D||e[46]!==L?(V=r.jsxs(nn,{children:[D,L]}),e[45]=D,e[46]=L,e[47]=V):V=e[47];let z;return e[48]!==s||e[49]!==V||e[50]!==N||e[51]!==C?(z=r.jsxs("div",{ref:s,className:N,children:[C,V]}),e[48]=s,e[49]=V,e[50]=N,e[51]=C,e[52]=z):z=e[52],z}function to(t){const e=$.c(40),{rowRef:s,url:a,onSelect:n,onEdit:o,onTurnOff:d}=t,l=xe();let i;try{let D;e[0]!==a?(D=new URL(a),e[0]=a,e[1]=D):D=e[1],i=D.host}catch{i=a}const u=i;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=r.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full bg-special"}),e[2]=c):c=e[2];let h;e[3]!==l?(h=l("thread.branchPicker.localLabel"),e[3]=l,e[4]=h):h=e[4];let p;e[5]!==u?(p=r.jsx("span",{className:"ml-1.5 text-xs font-normal text-muted-foreground/70",children:u}),e[5]=u,e[6]=p):p=e[6];let b;e[7]!==h||e[8]!==p?(b=r.jsxs("span",{className:"min-w-0 flex-1 truncate",children:[h,p]}),e[7]=h,e[8]=p,e[9]=b):b=e[9];let f;e[10]!==n||e[11]!==b?(f=r.jsxs("button",{type:"button","aria-pressed":!0,onClick:n,className:"flex min-w-0 flex-1 items-center gap-2.5 px-2 py-2 text-left text-sm",children:[c,b]}),e[10]=n,e[11]=b,e[12]=f):f=e[12];let m;e[13]!==l?(m=l("thread.branchPicker.moreActions"),e[13]=l,e[14]=m):m=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=r.jsx(Qr,{className:"h-4 w-4"}),e[15]=g):g=e[15];let v;e[16]!==m?(v=r.jsx(tn,{asChild:!0,children:r.jsx(ge,{variant:"ghost",size:"icon","aria-label":m,className:"mr-1 h-6 w-6 shrink-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100",children:g})}),e[16]=m,e[17]=v):v=e[17];let j;e[18]===Symbol.for("react.memo_cache_sentinel")?(j=r.jsx(Yr,{className:"h-4 w-4"}),e[18]=j):j=e[18];let w;e[19]!==l?(w=l("thread.branchPicker.rename"),e[19]=l,e[20]=w):w=e[20];let x;e[21]!==o||e[22]!==w?(x=r.jsxs(ms,{onSelect:o,children:[j,w]}),e[21]=o,e[22]=w,e[23]=x):x=e[23];let P;e[24]===Symbol.for("react.memo_cache_sentinel")?(P=r.jsx(on,{className:"h-4 w-4"}),e[24]=P):P=e[24];let y;e[25]!==l?(y=l("thread.branchPicker.localTurnOff"),e[25]=l,e[26]=y):y=e[26];let N;e[27]!==d||e[28]!==y?(N=r.jsxs(ms,{onSelect:d,className:"text-destructive focus:text-destructive",children:[P,y]}),e[27]=d,e[28]=y,e[29]=N):N=e[29];let C;e[30]!==x||e[31]!==N?(C=r.jsxs(sn,{align:"end",children:[x,N]}),e[30]=x,e[31]=N,e[32]=C):C=e[32];let A;e[33]!==C||e[34]!==v?(A=r.jsxs(nn,{children:[v,C]}),e[33]=C,e[34]=v,e[35]=A):A=e[35];let S;return e[36]!==s||e[37]!==A||e[38]!==f?(S=r.jsxs("div",{ref:s,className:"group flex items-center rounded-lg bg-accent",children:[f,A]}),e[36]=s,e[37]=A,e[38]=f,e[39]=S):S=e[39],S}function so(t){const e=$.c(75),{orgId:s,orgSlug:a,userId:n,target:o,owner:d,repo:l,sandboxMap:i,enabled:u,tab:c,onTabChange:h,isV8:p,localUrl:b,onSaveLocal:f,onBack:m,onAdopt:g,draftKind:v}=t,j=xe(),[w,x]=U.useState(""),P=c==="branches"?w:"",y=u&&c==="branches";let N;e[0]!==s||e[1]!==a||e[2]!==d||e[3]!==l||e[4]!==i||e[5]!==P||e[6]!==y||e[7]!==o||e[8]!==n?(N={orgId:s,orgSlug:a,userId:n,target:o,sandboxMap:i,owner:d,repo:l,search:P,enabled:y},e[0]=s,e[1]=a,e[2]=d,e[3]=l,e[4]=i,e[5]=P,e[6]=y,e[7]=o,e[8]=n,e[9]=N):N=e[9];const{recent:C,yours:A,others:S,isLoading:D,hasMore:k,isFetchingMore:O,fetchMore:I}=Yi(N),B=u&&c==="prs";let F;e[10]!==s||e[11]!==a||e[12]!==d||e[13]!==l||e[14]!==B||e[15]!==o?(F={orgId:s,orgSlug:a,target:o,owner:d,repo:l,enabled:B},e[10]=s,e[11]=a,e[12]=d,e[13]=l,e[14]=B,e[15]=o,e[16]=F):F=e[16];const{data:L,isLoading:V}=Fl(F);let z;if(e[17]!==v||e[18]!==I||e[19]!==k||e[20]!==O||e[21]!==D||e[22]!==p||e[23]!==b||e[24]!==g||e[25]!==m||e[26]!==f||e[27]!==h||e[28]!==S||e[29]!==d||e[30]!==V||e[31]!==C||e[32]!==l||e[33]!==w||e[34]!==j||e[35]!==L||e[36]!==c||e[37]!==A){const te=L===void 0?[]:L,M=`${d}/${l}`;let K;e[39]!==M?(K=M.toLowerCase(),e[39]=M,e[40]=K):K=e[40];const W=K;let se;e[41]!==W?(se=E=>E.headRepoFullName?.toLowerCase()===W,e[41]=W,e[42]=se):se=e[42];const J=te.filter(se);let ue;if(e[43]!==v||e[44]!==S||e[45]!==C||e[46]!==A){const E=new Set;ue=[...C,...A,...S].filter(fe=>E.has(fe.name)?!1:(E.add(fe.name),v!=="site"||Zr(fe.name)==="site")),e[43]=v,e[44]=S,e[45]=C,e[46]=A,e[47]=ue}else ue=e[47];const X=ue;let le;e[48]===Symbol.for("react.memo_cache_sentinel")?(le=r.jsx(Pl,{className:"h-4 w-4 shrink-0"}),e[48]=le):le=e[48];let T;e[49]!==j?(T=j("thread.branchPicker.advancedBack"),e[49]=j,e[50]=T):T=e[50];let ee;e[51]!==m||e[52]!==T?(ee=r.jsxs("button",{type:"button",onClick:m,className:"flex items-center gap-1.5 px-2 py-1.5 text-xs text-muted-foreground hover:text-foreground",children:[le,T]}),e[51]=m,e[52]=T,e[53]=ee):ee=e[53];let G;e[54]!==h?(G=E=>{h(E),x("")},e[54]=h,e[55]=G):G=e[55];let ne;e[56]!==j?(ne=j("thread.branchPicker.branchesTab"),e[56]=j,e[57]=ne):ne=e[57];let re;e[58]!==ne?(re=r.jsx(Lt,{value:"branches",className:"h-6 px-2.5 text-xs",children:ne}),e[58]=ne,e[59]=re):re=e[59];let Se;e[60]!==j?(Se=j("thread.branchPicker.prsTab"),e[60]=j,e[61]=Se):Se=e[61];let he;e[62]!==Se?(he=r.jsx(Lt,{value:"prs",className:"h-6 px-2.5 text-xs",children:Se}),e[62]=Se,e[63]=he):he=e[63];let be;e[64]!==p||e[65]!==j?(be=!p&&r.jsx(Lt,{value:"local",className:"h-6 px-2.5 text-xs",children:j("thread.branchPicker.localTab")}),e[64]=p,e[65]=j,e[66]=be):be=e[66];let ce;e[67]!==re||e[68]!==he||e[69]!==be?(ce=r.jsxs(qr,{className:"h-auto w-fit justify-start gap-1 bg-accent p-1",variant:"pill",children:[re,he,be]}),e[67]=re,e[68]=he,e[69]=be,e[70]=ce):ce=e[70];let ie;e[71]!==G||e[72]!==ce||e[73]!==c?(ie=r.jsx(Hr,{className:"px-2 pt-2 pb-1",value:c,onValueChange:G,children:ce}),e[71]=G,e[72]=ce,e[73]=c,e[74]=ie):ie=e[74],z=r.jsxs("div",{className:"flex flex-col",children:[ee,ie,c==="local"&&!p?r.jsx(Ui,{url:b,onSave:f}):r.jsxs(yl,{filter:c==="branches"?no:void 0,children:[r.jsx(jl,{placeholder:j(c==="branches"?"thread.branchPicker.searchBranches":"thread.branchPicker.searchPullRequests"),value:w,onValueChange:x}),r.jsx(wl,{onScroll:E=>{const fe=E.currentTarget;c==="branches"&&fe.scrollHeight-fe.scrollTop-fe.clientHeight<48&&I()},children:c==="branches"?r.jsxs(r.Fragment,{children:[D&&r.jsx("div",{className:"p-3 text-xs text-muted-foreground",children:j("thread.branchPicker.loadingMore")}),!D&&X.length===0&&r.jsx(tr,{children:j("thread.branchPicker.noBranchesFound")}),X.length>0&&r.jsx(sr,{children:X.map(E=>r.jsxs(nr,{value:E.name,className:"cursor-pointer",onSelect:()=>g(E.name,E.name),children:[r.jsx(Ga,{className:"mr-2 h-4 w-4 shrink-0"}),r.jsx("span",{className:"flex-1 truncate",children:E.name})]},E.name))}),k&&r.jsx("div",{className:"p-2",children:r.jsx(ge,{variant:"ghost",size:"sm",className:"h-7 w-full text-xs",disabled:O,onClick:I,children:j(O?"thread.branchPicker.loadingMore":"thread.branchPicker.loadMoreBranches")})})]}):r.jsxs(r.Fragment,{children:[V&&r.jsx("div",{className:"p-3 text-xs text-muted-foreground",children:j("thread.branchPicker.loadingPullRequests")}),!V&&J.length===0&&r.jsx(tr,{children:j("thread.branchPicker.noOpenPullRequests")}),J.length>0&&r.jsx(sr,{children:J.map(E=>r.jsxs(nr,{value:`#${E.number} ${E.title} ${E.head}`,className:"cursor-pointer",onSelect:()=>g(E.head,ir(E.title)),children:[r.jsx(ln,{className:"mr-2 h-4 w-4 shrink-0 text-muted-foreground"}),r.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[r.jsx("span",{className:"truncate",children:ir(E.title)}),r.jsxs("span",{className:"truncate text-xs text-muted-foreground",children:["#",E.number," · ",E.head]})]})]},E.number))})]})})]})]}),e[17]=v,e[18]=I,e[19]=k,e[20]=O,e[21]=D,e[22]=p,e[23]=b,e[24]=g,e[25]=m,e[26]=f,e[27]=h,e[28]=S,e[29]=d,e[30]=V,e[31]=C,e[32]=l,e[33]=w,e[34]=j,e[35]=L,e[36]=c,e[37]=A,e[38]=z}else z=e[38];return z}function no(t,e){return vn(t,e)?1:0}function ro(t){const e=$.c(20),{locked:s,placement:a,value:n,virtualMcpId:o,isV8:d,userLabel:l,baseBranch:i,baseIsDraft:u,onChange:c,onCreateBranch:h,onAdoptBranch:p,orgId:b,orgSlug:f,userId:m,target:g,owner:v,repo:j,sandboxMap:w,draftKind:x}=t;let P;return e[0]!==i||e[1]!==u||e[2]!==x||e[3]!==d||e[4]!==s||e[5]!==p||e[6]!==c||e[7]!==h||e[8]!==b||e[9]!==f||e[10]!==v||e[11]!==a||e[12]!==j||e[13]!==w||e[14]!==g||e[15]!==m||e[16]!==l||e[17]!==n||e[18]!==o?(P=r.jsx(eo,{virtualMcpId:o,isV8:d,userLabel:l,value:n,baseBranch:i,baseIsDraft:u,orgId:b,orgSlug:f,userId:m,target:g,owner:v,repo:j,sandboxMap:w,onChange:c,onCreateBranch:h,onAdoptBranch:p,spawnsNewChat:s,placement:a,draftKind:x}),e[0]=i,e[1]=u,e[2]=x,e[3]=d,e[4]=s,e[5]=p,e[6]=c,e[7]=h,e[8]=b,e[9]=f,e[10]=v,e[11]=a,e[12]=j,e[13]=w,e[14]=g,e[15]=m,e[16]=l,e[17]=n,e[18]=o,e[19]=P):P=e[19],P}function ao(t){const e=$.c(2),{branchPill:s}=t;if(!s)return null;let a;return e[0]!==s?(a=r.jsx(r.Fragment,{children:s}),e[0]=s,e[1]=a):a=e[1],a}function lo(t){const{locked:e,sessionRuntime:s,projectRuntime:a,draftRuntime:n,current:o}=t;return t.contentOnly&&n==="cms"?s==="cms"&&!e?{kind:"switch"}:{kind:"new-chat",runtime:"cms"}:n==="sandbox"&&s!=="sandbox"?{kind:"new-chat",runtime:"sandbox"}:n==="cms"&&s==="sandbox"&&a==="cms"&&!o?{kind:"new-chat"}:e?s==="sandbox"?{kind:"new-chat",runtime:"sandbox"}:{kind:"new-chat"}:{kind:"switch"}}function io(t){const e=$.c(25),{virtualMcp:s,currentBranch:a}=t,n=ll(),o=vs();let d;e[0]!==n?.messages||e[1]!==o?.isThreadLocked?(d=(n?.messages??[]).length>0||(o?.isThreadLocked??!1),e[0]=n?.messages,e[1]=o?.isThreadLocked,e[2]=d):d=e[2];const l=d,i=o?.setCurrentTaskBranch,u=o?.createTask,c=ea()==="blog"?"blog":"site",h=ys(s?.id),p=h.runtime,b=s?.metadata;let f;e[3]!==b?(f=ta(b),e[3]=b,e[4]=f):f=e[4];const m=f,g=m==="cms"&&p==="sandbox",v=Dl(s),j=ze(v),{data:w}=rn.useSession(),x=w?.user;let P;e[5]!==x?(P=In(x),e[5]=x,e[6]=P):P=e[6];const y=P,N=w?.user?.id??"",{org:C}=Is(),A=Ll(s,a),S=$n(s?.id),D=S&&p==="cms";let k;e[7]!==u||e[8]!==a||e[9]!==l||e[10]!==m||e[11]!==p||e[12]!==h.resolved||e[13]!==i||e[14]!==S?(k=(te,M)=>{const K=lo({locked:l,sessionRuntime:h.resolved?p:null,projectRuntime:m,draftRuntime:M&&(M.runtime??m),current:te===a,contentOnly:S});K.kind==="new-chat"&&u?u({branch:te,...K.runtime?{runtime:K.runtime}:{}}):i&&i(te)},e[7]=u,e[8]=a,e[9]=l,e[10]=m,e[11]=p,e[12]=h.resolved,e[13]=i,e[14]=S,e[15]=k):k=e[15];const O=k;let I;e[16]!==g||e[17]!==u||e[18]!==l||e[19]!==i?(I=te=>{(l||g)&&u?u({branch:te}):i&&i(te)},e[16]=g,e[17]=u,e[18]=l,e[19]=i,e[20]=I):I=e[20];const B=I;let F;e[21]!==u?(F=u?te=>u({runtime:"sandbox",branch:te}):void 0,e[21]=u,e[22]=F):F=e[22];const L=F,V=v&&sa(j)?r.jsx(ro,{userLabel:y,virtualMcpId:s?.id??"",isV8:S,value:a,baseBranch:A,baseIsDraft:D,orgId:C.id,orgSlug:C.slug,userId:N,target:j,owner:v.owner,repo:v.name,sandboxMap:s?.metadata?.sandboxMap,onChange:O,onCreateBranch:B,onAdoptBranch:L,locked:l,placement:"chat",draftKind:c},`${na(j)}:${v.owner}/${v.name}`):null;let z;return e[23]!==V?(z=r.jsx(ao,{branchPill:V}),e[23]=V,e[24]=z):z=e[24],z}const oo=Wa("flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg",{variants:{orientation:{horizontal:"[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",vertical:"flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none"}},defaultVariants:{orientation:"horizontal"}});function co(t){const e=$.c(11);let s,a,n;e[0]!==t?({className:s,orientation:a,...n}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=n):(s=e[1],a=e[2],n=e[3]);let o;e[4]!==s||e[5]!==a?(o=H(oo({orientation:a}),s),e[4]=s,e[5]=a,e[6]=o):o=e[6];let d;return e[7]!==a||e[8]!==n||e[9]!==o?(d=r.jsx("div",{role:"group","data-slot":"button-group","data-orientation":a,className:o,...n}),e[7]=a,e[8]=n,e[9]=o,e[10]=d):d=e[10],d}function uo(t){const e=$.c(14),{item:s}=t;let a;e[0]!==s?(a=()=>{s.onSelect()},e[0]=s,e[1]=a):a=e[1];let n;e[2]!==s.disabled||e[3]!==s.icon||e[4]!==s.label||e[5]!==a?(n=r.jsxs(ms,{disabled:s.disabled,onSelect:a,children:[s.icon,s.label]}),e[2]=s.disabled,e[3]=s.icon,e[4]=s.label,e[5]=a,e[6]=n):n=e[6];const o=n;if(!s.tooltip)return o;let d;e[7]!==o?(d=r.jsx(it,{asChild:!0,children:o}),e[7]=o,e[8]=d):d=e[8];let l;e[9]!==s.tooltip?(l=r.jsx(ot,{side:"right",children:s.tooltip}),e[9]=s.tooltip,e[10]=l):l=e[10];let i;return e[11]!==d||e[12]!==l?(i=r.jsxs(lt,{children:[d,l]}),e[11]=d,e[12]=l,e[13]=i):i=e[13],i}function ga(t){const e=$.c(20),{label:s,onClick:a,variant:n,size:o,disabled:d,loading:l,pulse:i,tooltip:u,icon:c,items:h,menuAriaLabel:p,className:b}=t,f=n===void 0?"default":n,m=o===void 0?"default":o,g=d===void 0?!1:d,v=l===void 0?!1:l,j=i===void 0?!1:i,w=(h?.length??0)>0;let x;if(e[0]!==b||e[1]!==g||e[2]!==w||e[3]!==c||e[4]!==h||e[5]!==s||e[6]!==v||e[7]!==p||e[8]!==a||e[9]!==j||e[10]!==m||e[11]!==u||e[12]!==f){const P=H(Kr,f==="default"&&"focus-visible:inset-ring-current");let y;e[14]!==c||e[15]!==v?(y=v?r.jsx(ps,{size:"xs"}):c,e[14]=c,e[15]=v,e[16]=y):y=e[16];const N=r.jsxs(ge,{type:"button",variant:f,size:m,disabled:g,"aria-busy":v||void 0,onClick:v?void 0:a,className:H(P,w&&"rounded-r-none border-r border-current/20"),children:[y,s]}),C=j&&"animate-pulse-brightness motion-reduce:animate-none motion-reduce:opacity-80";let A;e[17]!==b||e[18]!==C?(A=H(C,b),e[17]=b,e[18]=C,e[19]=A):A=e[19],x=r.jsxs(co,{className:A,children:[u?r.jsxs(lt,{children:[r.jsx(it,{asChild:!0,children:r.jsx("span",{className:H("inline-flex rounded-lg outline-none",P,g&&"cursor-not-allowed"),tabIndex:g?0:void 0,role:g?"button":void 0,"aria-disabled":g||void 0,children:N})}),r.jsx(ot,{children:u})]}):N,w?r.jsxs(nn,{children:[r.jsx(tn,{asChild:!0,children:r.jsx(ge,{type:"button",variant:f,size:m,"aria-label":p,className:H("has-[>svg]:px-2",P),children:r.jsx(Vr,{className:"size-3.5"})})}),r.jsx(sn,{align:"end",children:h?.map(ho)})]}):null]}),e[0]=b,e[1]=g,e[2]=w,e[3]=c,e[4]=h,e[5]=s,e[6]=v,e[7]=p,e[8]=a,e[9]=j,e[10]=m,e[11]=u,e[12]=f,e[13]=x}else x=e[13];return x}function ho(t){return r.jsx(uo,{item:t},t.key)}async function fo(t){if(t.hosted)return;const e=t.branch;await t.setCurrentTaskBranch(t.nextBranch()),e&&e!==t.baseBranch&&await t.deleteRelease(e)}function mo(t,e,{hosted:s}){return s&&t!==null?t:e}function po(t,e){const s=$.c(11),[a,n]=U.useState(null);let o;s[0]!==a||s[1]!==t||s[2]!==e?(o=mo(a,t,e),s[0]=a,s[1]=t,s[2]=e,s[3]=o):o=s[3];let d;s[4]!==t||s[5]!==e?(d=()=>n(e.hosted?t:null),s[4]=t,s[5]=e,s[6]=d):d=s[6];let l;s[7]===Symbol.for("react.memo_cache_sentinel")?(l=()=>n(null),s[7]=l):l=s[7];let i;return s[8]!==o||s[9]!==d?(i={shown:o,hold:d,release:l},s[8]=o,s[9]=d,s[10]=i):i=s[10],i}function bo({open:t,hosted:e}){return t||e}function xa(t){return ri({userName:t?.name,userEmail:t?.email})??void 0}function dn(t){const e=$.c(18),{state:s,header:a,body:n,note:o,gate:d,footer:l}=t,i=s!=="ready";let u;e[0]!==a?(u=r.jsx("div",{className:"space-y-0.5 px-4 py-3",children:a}),e[0]=a,e[1]=u):u=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=r.jsx("div",{className:"border-t"}),e[2]=c):c=e[2];let h;e[3]!==o?(h=o?r.jsx("div",{className:"space-y-1.5 border-t px-4 py-3",children:o}):null,e[3]=o,e[4]=h):h=e[4];let p;e[5]!==n||e[6]!==h?(p=r.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[n,h]}),e[5]=n,e[6]=h,e[7]=p):p=e[7];let b;e[8]===Symbol.for("react.memo_cache_sentinel")?(b=r.jsx("div",{className:"border-t"}),e[8]=b):b=e[8];let f;e[9]!==l?(f=r.jsx("div",{className:"space-y-2 px-4 py-3",children:l}),e[9]=l,e[10]=f):f=e[10];let m;return e[11]!==d||e[12]!==s||e[13]!==i||e[14]!==u||e[15]!==p||e[16]!==f?(m=r.jsxs("div",{className:"flex min-h-0 flex-1 flex-col","data-publish-state":s,"aria-busy":i,children:[u,c,p,d,b,f]}),e[11]=d,e[12]=s,e[13]=i,e[14]=u,e[15]=p,e[16]=f,e[17]=m):m=e[17],m}function Bs(t){const e=$.c(2),{children:s}=t;let a;return e[0]!==s?(a=r.jsx("div",{className:"scroll-fade min-h-0 flex-1 space-y-3 overflow-y-auto overscroll-contain px-4 pt-3 pb-2 [scrollbar-width:thin]",children:s}),e[0]=s,e[1]=a):a=e[1],a}function va(t){const e=$.c(10);let s,a,n;e[0]!==t?({className:a,children:s,...n}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=n):(s=e[1],a=e[2],n=e[3]);let o;e[4]!==a?(o=H("rounded-lg border bg-card px-3 py-2.5",a),e[4]=a,e[5]=o):o=e[5];let d;return e[6]!==s||e[7]!==n||e[8]!==o?(d=r.jsx("div",{className:o,...n,children:s}),e[6]=s,e[7]=n,e[8]=o,e[9]=d):d=e[9],d}function Qe(t){const e=$.c(4),{className:s}=t;let a;e[0]!==s?(a=H("animate-pulse rounded bg-muted motion-reduce:animate-none",s),e[0]=s,e[1]=a):a=e[1];let n;return e[2]!==a?(n=r.jsx("div",{className:a}),e[2]=a,e[3]=n):n=e[3],n}function Ot(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx(va,{children:r.jsxs("div",{className:"flex items-center gap-2.5",children:[r.jsx(Qe,{className:"size-4 rounded-md"}),r.jsx(Qe,{className:"h-3 w-24"}),r.jsx(Qe,{className:"h-2.5 w-16"}),r.jsx(Qe,{className:"ml-auto size-6 rounded"})]})}),t[0]=e):e=t[0],e}const ya="secret";function ja(t){return t.kind!=="block"?null:t.namedRule??null}function go(t,e){const s=e.find(a=>a&&typeof a=="object");return s?Xl(s.__resolveType):Zl(t)}const xo=/(?:^|\/)\.deco\/blocks\/([^/]+)\.json$/;function qn(t){const e=xo.exec(t)?.[1];return e?Ci(e):null}function en(t){if(!t)return null;try{const e=JSON.parse(t);if(e&&typeof e=="object"&&!Array.isArray(e))return e}catch{}return null}function vo(t,e){return t===null?"new":e===null?"removed":"edited"}function wa(t){const e=t.replace(/[_-]+/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").trim();return e?(e.charAt(0).toUpperCase()+e.slice(1)).replace(/\s+[A-Z](?=[a-z])/g,s=>s.toLowerCase()):t}function fs(t,e,s=!1){if(t&&typeof t=="object"&&!Array.isArray(t)){const a=t.__resolveType;if(typeof a=="string"&&a.trim()){if(s)return Ja(a);const o=(a.split("/").pop()??a).replace(/\.[jt]sx?$/,"");return wa(o)||o}}return`Section ${e+1}`}function Hn(t){if(Nr(t))return t.value??null;const e=t.__resolveType;return typeof e=="string"&&Qa(e)?t.section??null:null}const Pa=6;function Vs(t,e=0){if(e>Pa||!t||typeof t!="object")return[];if(Array.isArray(t))return t.flatMap(n=>Vs(n,e+1));const s=t;if(Sn(s.__resolveType))return yn(s).flatMap(n=>Vs(n?.value,e+1));const a=Hn(s);return a!==null?Vs(a,e+1):[s]}function yn(t){const e=t?.variants;return Array.isArray(e)?e.map(s=>s&&typeof s=="object"&&!Array.isArray(s)?s:null):[]}function cr(t){let e=t;for(let s=0;s<Pa;s++){if(!e||typeof e!="object"||Array.isArray(e))return null;const a=e;if(Sn(a.__resolveType))return a;const n=Hn(a);if(n===null)return null;e=n}return null}function yo(t,e,s){const a=yn(cr(t)),n=e?yn(cr(e)):[],o=e?Array.from({length:Math.max(a.length,n.length)},(i,u)=>u).filter(i=>!un(a[i],n[i])):[],l=[...o.map(i=>a[i]??n[i]),...a.filter((i,u)=>!o.includes(u))].flatMap(i=>Vs(i?.value)).map(i=>fs(i,s,!0));return[...new Set(l)]}function bn(t,e,s,a,n){let o=t,d=!1;for(let i=0;i<4;i++){if(!o||typeof o!="object"||Array.isArray(o)){d=!0;break}const u=o;if(Sn(u.__resolveType)){d=!0;break}const c=Hn(u);if(c===null)break;o=c}const l=d?yo(t,n,e):[];return{name:fs(d?t:o,e,!0),kind:"section",status:s,fields:a,...d?{wrapper:!0}:{},...l.length>0?{held:l}:{}}}function jn(t,e){const s=t.sections;if(Array.isArray(s))return s.flatMap((a,n)=>a&&typeof a=="object"&&!Array.isArray(a)?[{section:a,basePath:["sections",n]}]:[]);if(s&&typeof s=="object"){const a=s.variants;if(Array.isArray(a))return a.flatMap((n,o)=>{const d=n&&typeof n=="object"&&!Array.isArray(n)?n.value:null,l=e&&Nr(d),i=l?d.value:d;if(!Array.isArray(i))return[];const u=l?["sections","variants",o,"value","value"]:["sections","variants",o,"value"];return i.flatMap((c,h)=>c&&typeof c=="object"&&!Array.isArray(c)?[{section:c,basePath:[...u,h]}]:[])})}return[]}function dr(t){return JSON.stringify(t,(e,s)=>{if(s&&typeof s=="object"&&!Array.isArray(s)){const a=s;return Object.keys(a).sort().reduce((n,o)=>(n[o]=a[o],n),{})}return s})}function un(t,e){return t===void 0&&e===void 0?!0:dr(t)===dr(e)}function Rt(t,e,s,a=new Set){const n=new Set([...Object.keys(t??{}),...Object.keys(e??{})]),o=[];for(const d of n){if(d.startsWith("__")||a.has(d))continue;const l=t?t[d]:void 0,i=e?e[d]:void 0;un(l,i)||o.push({label:wa(d),path:[...s,d],from:l,to:i})}return o}function jo(t,e){const s=e.find(a=>a&&typeof a=="object");return s?s.__resolveType===li:t===ii}function wo(t,e){const s=n=>n===void 0||!!n&&typeof n=="object"&&!Array.isArray(n)&&!("__resolveType"in n),a=[];for(const n of Rt(t,e,[])){const o=String(n.path[0]);s(n.from)&&s(n.to)?a.push(...Rt(n.from??{},n.to??{},[o])):a.push(n)}return a}const Po=new Set(["sections"]);function Vn(t,e,s=!1){const a=t?jn(t,s):[],n=e?jn(e,s):[],o=[],d=Math.max(a.length,n.length);for(let i=0;i<d;i++){const u=a[i],c=n[i];if(!s){const h=So(u,c,i);h&&o.push(h);continue}if(u&&c){if(un(u.section,c.section))continue;o.push(bn(c.section,i,"edited",Rt(u.section,c.section,c.basePath),u.section))}else c?o.push(bn(c.section,i,"new",[])):u&&o.push(bn(u.section,i,"removed",[]))}const l=Rt(t,e,[],Po);return l.length>0&&o.push({name:"Page settings",kind:"settings",status:"edited",fields:l}),o}function So(t,e,s){return t&&e?un(t.section,e.section)?null:{name:fs(e.section,s),kind:"section",status:"edited",fields:Rt(t.section,e.section,e.basePath)}:e?{name:fs(e.section,s),kind:"section",status:"new",fields:[]}:t?{name:fs(t.section,s),kind:"section",status:"removed",fields:[]}:null}function wn(t,e){return{kind:"other",blockKey:null,name:t.split("/").pop()??t,pagePath:null,isSiteApp:!1,status:e,filepaths:[t],sections:[],fromJson:null,toJson:null}}function ko(t){const e=[],s=[],a=[],n=[];for(const[o,d]of Object.entries(t?.diffs??{})){if(Mn(o)){n.push(o);continue}const l=vo(d.from,d.to),i=qn(o);if(!i){a.push(wn(o,l));continue}const u=en(d.from),c=en(d.to),h=c??u;if(!h){a.push(wn(o,l));continue}const p=hs(i,h);if(p){e.push({kind:"page",blockKey:i,name:p.name,pagePath:p.path,isSiteApp:!1,status:l,filepaths:[o],sections:l==="edited"?Vn(u,c).map(f=>({...f,fields:bs(f.fields)})):[],fromJson:Fe(u),toJson:Fe(c)});continue}const b=Fn(i,h);s.push({kind:"block",blockKey:i,name:Ys(i,h),pagePath:null,isSiteApp:b,status:l,filepaths:[o],sections:l==="edited"?[{name:Ys(i,h),kind:"section",status:"edited",fields:bs(Rt(u,c,[]))}].filter(f=>f.fields.length>0):[],fromJson:Fe(u),toJson:Fe(c)})}return Sa({pages:e,blocks:s,other:a,generated:n})}function gn(t,e){return(t.filepaths[0]??"").localeCompare(e.filepaths[0]??"")}function Sa(t){const{pages:e,blocks:s,other:a,generated:n}=t;return e.sort(gn),s.sort(gn),a.sort(gn),{pages:e,blocks:s,other:a,generated:n,count:e.length+s.length+a.length}}function No(t){return t==="added"?"new":t==="removed"?"removed":"edited"}function ka(t){return t.startsWith("pages-")}function Na(t){const{files:e,lookup:s,diff:a}=t,n=[],o=[],d=[],l=[];for(const i of e){const u=i.path;if(Mn(u)){l.push(u);continue}const c=No(i.status),h=qn(u);if(!h){d.push(wn(u,c));continue}const p=a?.diffs[u],b=en(p?.from??null),f=en(p?.to??null),m=Ca(s,h),g=m??f??b;if((m?hs(h,m):null)??(!m&&ka(h))){const w=g?hs(h,g):null;n.push({kind:"page",blockKey:h,name:w?.name??ua(h),pagePath:w?.path??null,isSiteApp:!1,status:c,filepaths:[u],sections:c==="edited"?Vn(b,f).map(x=>({...x,fields:bs(x.fields)})):[],fromJson:Fe(b),toJson:Fe(f??(c==="new"?m:null))});continue}const j=Ys(h,g??{});o.push({kind:"block",blockKey:h,name:j,pagePath:null,isSiteApp:Fn(h,m??{}),status:c,filepaths:[u],sections:c==="edited"?[{name:j,kind:"section",status:"edited",fields:bs(Rt(b,f,[]))}].filter(w=>w.fields.length>0):[],fromJson:Fe(b),toJson:Fe(f)})}return Sa({pages:n,blocks:o,other:d,generated:l})}function Ca(t,e){const s=t?.[e];return s&&typeof s=="object"&&!Array.isArray(s)?s:null}function Co(t,e){return t??e}function Aa(t){return t.length<=1?t[0]??"":`${t.slice(0,-1).join(", ")} and ${t[t.length-1]}`}const xn=3;function zs(t){if(t.length<=xn)return Aa(t);const e=t.length-xn;return`${t.slice(0,xn).join(", ")} and ${e} more`}function Ao(t,e){if(!e){const a=t.sections.filter(n=>n.kind==="section").map(n=>n.name).slice(0,3);return a.length>0?`${t.name} (${a.join(", ")})`:t.name}const s=[...new Set(t.sections.filter(a=>a.kind==="section").flatMap(a=>a.wrapper?a.held??[]:[a.name]))].slice(0,3);return s.length>0?`${t.name} (${s.join(", ")})`:t.name}function Ro(t){const e=ja(t);return e==="experiments"?"A/B tests":e==="campaigns"?"Campaign dates":t.name}function Do(t){const e=[],s=t.pages.filter(l=>l.status==="edited"),a=t.pages.filter(l=>l.status==="new"),n=t.pages.filter(l=>l.status==="removed");if(s.length>0&&e.push(`updated ${zs(s.map(l=>Ao(l,!!t.v8)))}`),a.length>0){const l=a.length===1?"page":"pages";e.push(`added the ${zs(a.map(i=>i.name))} ${l}`)}if(n.length>0){const l=n.length===1?"page":"pages";e.push(`removed the ${zs(n.map(i=>i.name))} ${l}`)}const o=t.blocks.map(Ro);if(o.length>0&&e.push(`changed ${zs(o)}`),t.other.length>0){const l=t.other.length===1?"file":"files";e.push(`changed ${t.other.length} ${l}`)}if(e.length===0)return"";const d=Aa(e);return ai(d.charAt(0).toUpperCase()+d.slice(1))}function To(t,e){return t?jn(t,e).length:0}function Bo(t,e=!1){const s={newPageSections:t.kind==="page"&&t.status==="new"?To(t.toJson,e):null,sections:0,settings:!1,fields:0};if(s.newPageSections!==null)return s;for(const a of t.sections){if(a.kind==="settings"){s.settings=!0;continue}t.kind==="page"?s.sections+=1:s.fields+=a.fields.length}return s}const ur="••••••";function Fe(t){if(Array.isArray(t))return t.map(Fe);if(!t||typeof t!="object")return t;const e=t,s={};for(const[a,n]of Object.entries(e))s[a]=Fe(n);return e.__resolveType===ya&&"ciphertext"in e&&(s.ciphertext=ur),kr(e)&&"encrypted"in e&&(s.encrypted=ur),s}function Io(t){const e=t.toJson??t.fromJson;return!!e&&(e.__resolveType===ya||kr(e))}function bs(t){return t.map(e=>({...e,from:Fe(e.from),to:Fe(e.to)}))}function $o(t){const{changes:e,sides:s,lookup:a,meta:n,hosted:o}=t,d=[],l=[],i=c=>[...new Set((s?.diagnostics??[]).filter(h=>Zn(Ya(h.file))===Zn(c)).map(h=>h.side))],u=Object.keys(e).sort((c,h)=>c<h?-1:c>h?1:0);for(const c of u){const h=e[c],p=h.kind==="delete"?"removed":h.baseVersion===null?"new":"edited",b=s?.entries[c],f=b?.before??null,m=b?.after??null,g=Ca(a,c),v=g??m??f,j=i(c),w={blockKey:c,status:p,filepaths:[],entry:{name:c,version:h.version},...j.length>0?{unreadable:j}:{},fromJson:Fe(f),toJson:Fe(m??(p==="new"?g:null))},x=g?hs(c,g,n):null,P=!g&&v?hs(c,v,n):null;if(x??P??(!v&&ka(c))){const S=v?hs(c,v,n):null;d.push({...w,kind:"page",name:S?.name??ua(c),pagePath:S?.path??null,isSiteApp:!1,sections:p==="edited"?Vn(f,m,!0).map(D=>({...D,fields:bs(D.fields)})):[]});continue}const y=o?Ql(c,v,g,m,f):null,N=y?Yl(y,[v,g,m,f]):Ys(c,v??{}),C=go(c,[g,m,f]),A=jo(c,[g,m,f]);l.push({...w,kind:"block",name:A?"Settings":N,...A?{cmsSettings:!0}:{},...y?{blogKind:y}:{},...C?{namedRule:C}:{},pagePath:null,isSiteApp:Fn(c,g??v??{}),sections:p==="edited"?[{name:A?"Settings":N,kind:"section",status:"edited",fields:bs(A?wo(f,m):Rt(f,m,[]))}].filter(S=>S.fields.length>0):[]})}return{pages:d,blocks:l,other:[],generated:[],count:d.length+l.length,v8:!0}}function Ae(t){return t.filepaths[0]??t.blockKey??t.name}function Fo(t,e){return e(t==="new"?"thread.publishPopover.chipNew":t==="removed"?"thread.publishPopover.chipRemoved":"thread.publishPopover.chipEdited")}function Lo(t,e){const s=t.kind==="block"?mi:Wr;return r.jsx("span",{title:Fo(t.status,e),className:"flex shrink-0",children:r.jsx(s,{className:H("size-4",t.status==="new"&&"text-brand",t.status==="edited"&&"text-warning",t.status==="removed"&&"text-destructive")})})}function Oo(t,e){if(t.kind==="page")return t.pagePath;if(t.kind!=="block")return null;if(t.blogKind)return ei(t.blogKind,e);if(t.cmsSettings)return e("thread.publishPopover.settingsDetail");const s=ja(t);return s==="experiments"?e("thread.publishPopover.abTests"):s==="campaigns"?e("thread.publishPopover.campaignDates"):t.isSiteApp?e("thread.publishPopover.siteConfiguration"):e("thread.publishPopover.globalSection")}function Mo(t,e,s){const a=Bo(t,s);if(a.newPageSections!==null)return[a.newPageSections===1?e("thread.publishPopover.newPageSectionOne"):e("thread.publishPopover.newPageSections",{count:a.newPageSections})];const n=[];return a.sections===1?n.push(e("thread.publishPopover.sectionChangedOne")):a.sections>1&&n.push(e("thread.publishPopover.sectionsChanged",{count:a.sections})),a.fields===1?n.push(e("thread.publishPopover.fieldChangedOne")):a.fields>1&&n.push(e("thread.publishPopover.fieldsChanged",{count:a.fields})),a.settings&&n.push(e("thread.publishPopover.pageSettingsChanged")),n}function Ra(t){const e=$.c(46),{change:s,bodyPending:a,selected:n,onSelect:o,confirming:d,onConfirmingChange:l,onDiscard:i,isPublishing:u,isDiscarding:c,v8:h}=t,p=a===void 0?!1:a,b=h===void 0?!1:h,f=xe();let m;e[0]!==s||e[1]!==f?(m=Oo(s,f),e[0]=s,e[1]=f,e[2]=m):m=e[2];const g=m;let v;if(e[3]!==p||e[4]!==s||e[5]!==d||e[6]!==g||e[7]!==c||e[8]!==u||e[9]!==l||e[10]!==i||e[11]!==o||e[12]!==n||e[13]!==f||e[14]!==b){const j=Mo(s,f,b),w=p&&j.length===0&&s.status==="edited",x=n&&"border-foreground/30 bg-accent hover:bg-secondary-hover";let P;e[16]!==x?(P=H("cursor-pointer transition-colors hover:bg-accent",x),e[16]=x,e[17]=P):P=e[17];let y;e[18]!==s?(y=Ae(s),e[18]=s,e[19]=y):y=e[19];let N;e[20]!==s||e[21]!==f?(N=Lo(s,f),e[20]=s,e[21]=f,e[22]=N):N=e[22];let C;e[23]!==s.cmsSettings||e[24]!==s.name||e[25]!==f?(C=s.cmsSettings?f("thread.publishPopover.settings"):s.name,e[23]=s.cmsSettings,e[24]=s.name,e[25]=f,e[26]=C):C=e[26];let A;e[27]!==C?(A=r.jsx("span",{className:"truncate text-sm font-medium",children:C}),e[27]=C,e[28]=A):A=e[28];let S;e[29]!==g?(S=g?r.jsx("span",{className:"truncate text-xs text-muted-foreground",children:g}):null,e[29]=g,e[30]=S):S=e[30];let D;e[31]!==n||e[32]!==A||e[33]!==S?(D=r.jsxs("button",{type:"button",className:"flex min-w-0 flex-1 items-center gap-2 text-left","aria-pressed":n,children:[A,S]}),e[31]=n,e[32]=A,e[33]=S,e[34]=D):D=e[34];let k;e[35]!==d||e[36]!==c||e[37]!==u||e[38]!==l||e[39]!==i||e[40]!==f?(k=d?r.jsxs("div",{className:"flex shrink-0 items-center gap-1.5",children:[r.jsx("button",{type:"button",className:"text-xs text-muted-foreground hover:text-foreground",onClick:I=>{I.stopPropagation(),l(!1)},children:f("thread.publishDialog.cancel")}),r.jsx("button",{type:"button",className:"text-xs font-medium text-destructive disabled:opacity-50",onClick:I=>{I.stopPropagation(),l(!1),i?.()},disabled:c,children:f("thread.publishPopover.discard")})]}):i?r.jsx(an,{children:r.jsxs(lt,{children:[r.jsx(it,{asChild:!0,children:r.jsx(ge,{type:"button",variant:"ghost-destructive",size:"icon-xs","aria-label":f("thread.publishPopover.discard"),className:"shrink-0 disabled:pointer-events-auto",onClick:I=>{I.stopPropagation(),l(!0)},disabled:u||c,children:r.jsx(on,{className:"size-3.5"})})}),r.jsx(ot,{children:f("thread.publishPopover.discard")})]})}):null,e[35]=d,e[36]=c,e[37]=u,e[38]=l,e[39]=i,e[40]=f,e[41]=k):k=e[41];let O;e[42]!==D||e[43]!==k||e[44]!==N?(O=r.jsxs("div",{className:"flex items-center gap-2.5",children:[N,D,k]}),e[42]=D,e[43]=k,e[44]=N,e[45]=O):O=e[45],v=r.jsxs(va,{className:P,"data-change-id":y,onClick:o,children:[O,j.length>0?r.jsx("div",{className:"mt-1 space-y-0.5 pl-[26px] text-xs text-muted-foreground",children:j.map(_o)}):w?r.jsx("div",{className:"mt-1 space-y-0.5 pl-[26px]",children:r.jsx(Qe,{className:"h-4 w-2/3"})}):null]}),e[3]=p,e[4]=s,e[5]=d,e[6]=g,e[7]=c,e[8]=u,e[9]=l,e[10]=i,e[11]=o,e[12]=n,e[13]=f,e[14]=b,e[15]=v}else v=e[15];return v}function _o(t,e){return r.jsx("div",{className:"truncate",children:t},`${e}-${t}`)}function Da(){const t=$.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={width:-1,height:-1},t[0]=e):e=t[0];const[s,a]=U.useState(e);let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=l=>{if(!l)return;const i=()=>a(c=>c.width===l.clientWidth&&c.height===l.clientHeight?c:{width:l.clientWidth,height:l.clientHeight});i();const u=new ResizeObserver(i);return u.observe(l),()=>u.disconnect()},t[1]=n):n=t[1];const o=n;let d;return t[2]!==s?(d=[s,o],t[2]=s,t[3]=d):d=t[3],d}function Eo(){return document.documentElement.classList.contains("dark")?"vs-dark":"vs"}const zo=[{width:"w-3/4",tone:"ctx"},{width:"w-1/2",tone:"del"},{width:"w-3/5",tone:"add"},{width:"w-2/5",tone:"ctx"},{width:"w-4/5",tone:"add"},{width:"w-1/2",tone:"ctx"}];function hr(t){const e=$.c(10),{height:s}=t,a=xe();let n;e[0]!==s?(n={height:s},e[0]=s,e[1]=n):n=e[1];let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=zo.map(Uo),e[2]=o):o=e[2];let d;e[3]!==a?(d=a("thread.publishDialog.openingComparison"),e[3]=a,e[4]=d):d=e[4];let l;e[5]!==d?(l=r.jsx("div",{className:"flex items-center justify-center pt-1 text-2xs text-muted-foreground",children:d}),e[5]=d,e[6]=l):l=e[6];let i;return e[7]!==n||e[8]!==l?(i=r.jsxs("div",{style:n,className:"flex w-full flex-col gap-1.5 overflow-hidden px-3 py-2",children:[o,l]}),e[7]=n,e[8]=l,e[9]=i):i=e[9],i}function Uo(t,e){return r.jsxs("div",{className:H("flex items-center gap-2 rounded px-1 py-0.5",t.tone==="del"&&"bg-destructive/5",t.tone==="add"&&"bg-success/5"),children:[r.jsx("div",{className:H("h-2 w-4 shrink-0 animate-pulse rounded-sm bg-muted",t.tone==="del"&&"bg-destructive/20",t.tone==="add"&&"bg-success/25")}),r.jsx("div",{className:H("h-2 animate-pulse rounded-sm bg-muted",t.width,t.tone==="del"&&"bg-destructive/20",t.tone==="add"&&"bg-success/25")})]},e)}const Ta={readOnly:!0,renderSideBySide:!1,minimap:{enabled:!1},scrollBeyondLastLine:!1,fontSize:12},Ko={...Ta,lineNumbersMinChars:3,lineDecorationsWidth:4,folding:!1,glyphMargin:!1,renderOverviewRuler:!1};function qo(t){const e=$.c(11),{diff:s,emptyMessage:a,rowClassName:n,onDiscardFile:o,hideFileRows:d,editorHeight:l}=t,i=a===void 0?"No file changes in the working tree":a,u=n===void 0?"px-6":n,c=d===void 0?!1:d,h=l===void 0?"380px":l,[p,b]=U.useState(null),[f,m]=U.useState(null);let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g=Eo(),e[0]=g):g=e[0];const v=g;if(!s||Object.keys(s.diffs).length===0){let w;return e[1]!==i?(w=r.jsx("div",{className:"flex items-center justify-center py-10 text-sm text-muted-foreground",children:i}),e[1]=i,e[2]=w):w=e[2],w}let j;return e[3]!==s.diffs||e[4]!==f||e[5]!==h||e[6]!==p||e[7]!==c||e[8]!==o||e[9]!==u?(j=r.jsx("div",{className:"divide-y",children:Object.entries(s.diffs).map(w=>{const[x,P]=w,{from:y,to:N}=P,C=p===x,A=y===null,S=N===null,D=x.startsWith("/")?x.slice(1):x,k=D.lastIndexOf("/"),O=k>=0?D.slice(k+1):D,I=k>=0?D.slice(0,k):null,B=Ai(x),F=A?"bg-success":S?"bg-destructive":"bg-warning";return c?r.jsx("div",{children:r.jsx(rr,{original:y??"",modified:N??"",language:B,theme:v,height:h,loading:r.jsx(hr,{height:h}),options:Ko})},x):r.jsxs("div",{children:[r.jsxs("div",{className:H("flex items-center gap-3 py-3 hover:bg-accent",u),children:[r.jsx("button",{type:"button",className:"flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground transition-transform hover:text-foreground",onClick:()=>b(C?null:x),children:r.jsx(Pr,{className:H("h-3.5 w-3.5 transition-transform",C&&"rotate-90")})}),r.jsx("div",{className:H("h-2.5 w-2.5 shrink-0 rounded-full",F)}),r.jsx(Wr,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),r.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:O}),I&&r.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:I}),o?r.jsxs(nn,{children:[r.jsx(tn,{asChild:!0,children:r.jsx("button",{type:"button",className:"flex h-6 w-6 shrink-0 items-center justify-center text-muted-foreground hover:bg-accent hover:text-foreground rounded-lg",children:r.jsx(Xa,{className:"h-3.5 w-3.5"})})}),r.jsx(sn,{align:"end",children:r.jsx(ms,{className:"text-destructive focus:text-destructive",onSelect:()=>m(x),children:"Discard changes"})})]}):null]}),f===x&&o?r.jsxs("div",{className:H("flex items-center justify-between gap-3 border-t bg-destructive/5 py-2.5",u),children:[r.jsxs("span",{className:"text-xs text-destructive",children:["Discard all changes to"," ",r.jsx("span",{className:"font-medium",children:O}),"? This cannot be undone."]}),r.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[r.jsx(ge,{type:"button",variant:"ghost",size:"sm",onClick:()=>m(null),children:"Cancel"}),r.jsx(ge,{type:"button",variant:"destructive",size:"sm",onClick:()=>{m(null),o(x)},children:"Discard"})]})]}):null,C&&r.jsx("div",{className:"border-t",children:r.jsx(rr,{original:y??"",modified:N??"",language:B,theme:v,height:h,loading:r.jsx(hr,{height:h}),options:Ta})})]},x)})}),e[3]=s.diffs,e[4]=f,e[5]=h,e[6]=p,e[7]=c,e[8]=o,e[9]=u,e[10]=j):j=e[10],j}function Ho(t){if(t.kind!=="block"||t.isSiteApp||!t.blockKey)return null;const e=(t.toJson??t.fromJson)?.__resolveType;return typeof e=="string"&&Di(e)?t.blockKey:null}function Vo(t){return t.kind!=="page"?!0:!t.pagePath||At(t.pagePath).length>0}function Go(t,e){try{return cl(t,si,e)}catch{return null}}function Wo(t,e,s){if(!e)return;const a=ti(e,t);if(!a)return null;if(At(a.path).length===0||s?.path!==a.path)return a.path;const n=Ln(a.path,s.params);return At(n).length===0?n:a.path}function Jo(t){return t.sectionKey&&!t.v8?Go(t.previewServerUrl,t.sectionKey):Yo(t.previewServerUrl,t.path)}function Qo(t,e){if(t.kind!=="page")return"/";const s=t.pagePath;if(!s)return"";if(At(s).length===0)return s;if(e?.path!==s)return"";const a=Ln(s,e.params);return At(a).length===0?a:""}function Yo(t,e){const s=e.trim();if(!s||At(s).length>0)return null;try{const a=new URL(t),n=new URL(s.startsWith("/")?s:`/${s}`,a);return n.origin===a.origin?n:null}catch{return null}}function Xo(t,e){return e?.kind==="pointer"&&e.link?Dn(t.toString(),e.link):Ba(t,e)}function Ba(t,e){if(!e)return null;if(e.kind==="pointer")return Dn(t.toString(),e.pointer);try{return new URL(`${t.pathname}${t.search}`,e.previewUrl).href}catch{return null}}function Zo(t,e,s){return e===null?!1:t!=="other"||s?.kind==="sandbox"}function ec(t,e){const s=e?t.kind==="page":t.kind!=="other";return{before:s&&t.status==="new"?"new":null,after:s&&t.status==="removed"?"removed":null}}const Ia=U.createContext(!0),tc=["split","before","after","code"];function sc(t){return tc.includes(t)}const $a={desktop:1280,mobile:412};function nc(t,e){const s=(o,d)=>t.unreadable?.includes(d)?e:o?`${JSON.stringify(o,null,2)}
|
|
1
|
+
import{c as $,b as xe,r as U,j as r,B as ge,m as H,K as xs,ao as Ha,t as at,eR as Va,av as Pr,dQ as Sr,Y as ms,dR as Ga,aL as Ns,aM as Cs,aN as As,aO as Ws,bc as Js,aP as Rs,aQ as Ds,aR as Ts,X as tn,Z as sn,_ as nn,a as rn,a6 as Is,c1 as Wa,h as ps,eS as kr,eT as Nr,eU as Sn,bB as Ja,br as Qa,bw as Zn,eV as Ya,ap as Xa,I as Za,a9 as el,eW as tl,V as Cr,i as gt,eO as kn,q as Ar,J as Rr,D as Dr,x as Tr,v as Br,Q as Ir,R as $r,aZ as sl,bd as Fr,a7 as Nn,b9 as Cn,e as er,E as nl,T as rl}from"./index-ztdGKvBm.js";import{S as al}from"./separator-BQ6pXQbe.js";import{f as ll,u as vs,r as Lr,l as Or,c as Mr,b as il}from"./chat-context-DFEln8mI.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-Dq7SmLyr.js";import{L as bl}from"./use-org-notice-Bg0zOPPj.js";import{I as Kr}from"./toolbar-icon-button-Cz-oOJ1w.js";import{b as gl,P as xl,a as vl}from"./popover-C4oz5B-L.js";import{c as lt,T as it,a as ot,b as an}from"./tooltip-Bm0P1gm_.js";import{f as yl,a as jl,c as wl,C as tr,e as sr,b as nr}from"./command-C3tlrKUq.js";import{T as Lt,a as qr,b as Hr}from"./tabs-nQ7_UOyl.js";import{t as Vr}from"./ChevronDown-XsLJSrfl.js";import{b as Pl}from"./UserCheck01-k-4bTA2h.js";import{L as Gr,ac as ln,a as Wr,G as Sl,b as kl,ad as Jr}from"./agent-icon-BYWtutu9.js";import{a as Qr}from"./SwitchHorizontal01-CMdpIiQk.js";import{b as Yr}from"./Tool01-BCJ5kyrz.js";import{s as Xr}from"./Plus-DWySsEmB.js";import{s as on}from"./Trash01-BxBhF2b8.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-BopwZu5H.js";import{u as Bn}from"./use-blog-view-DMfZjkz0.js";import{u as ys}from"./use-voice-input-BMrsODyI.js";import{b as Rl,d as ta}from"./session-runtime-DBl1Hlcw.js";import{h as sa,r as na,b as $s,g as Dl,e as ze,f as ra}from"./repository-binding-D_Xc1yRH.js";import{u as Tl}from"./use-debounced-value-DO5dvp6c.js";import{a as Bl,u as Il}from"./shell-layout-UF80oiAz.js";import{u as $l}from"./useInfiniteQuery-Ypmdjx1e.js";import{d as Fl,b as Ll,p as Ol,e as aa,g as la,h as ia}from"./use-navigate-to-agent-Cw8_3uU5.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-_66Q7KaS.js";import{e as ql,g as Hl,f as In}from"./thread-intent-DyZ5A9F9.js";import{a as Qs}from"./virtual-mcp-CAb2l-zV.js";import{u as $n}from"./use-blocks-v8-project-BPvEDyS9.js";import{G as ca}from"./github-icon-Bq9Ot22_.js";import{f as Vl,r as Gl,u as da}from"./content-changes-BFwm7dNe.js";import{a as Wl,b as Jl}from"./use-fast-preview-draft-url-CpggWNTk.js";import{a3 as hs,a4 as ua,A as Ys,q as Fn,a5 as Ql,a6 as Yl,F as Xl,a7 as Zl,a8 as ei,p as ti,e as At,f as Ln,a9 as si}from"./blocks-tab-states-8lUCpJRf.js";import"./index-5erPNBmj.js";import{T as ni}from"./textarea-viSdm6BE.js";import{i as On}from"./CheckCircle-DZ8MNpCP.js";import{s as Xs}from"./Eye-kjjhS0vP.js";import{n as ri,s as ai,C as li,a as ii,b as oi,M as ci,c as di,d as ui,m as hi,u as fi}from"./use-cms-publish-actions-BWS3AiLQ.js";import{b as mi,j as pi}from"./UserSquare-CafFh5_d.js";import{i as Mn,b as _n,m as bi,h as gi,c as ha,f as fa,d as xi,r as En,e as vi,n as yi,g as ji,j as wi,k as Pi,l as zn,o as Si,p as ma,q as ki,s as Un,B as Ni,t as fn}from"./sandbox-git-api-BsG4EzUP.js";import{a as Ci,g as Ai}from"./utils-COdvgYqW.js";import{i as Ri}from"./Monitor01-DMFbvudn.js";import{w as Kn,R as pa}from"./device-hint-B3WnBHYf.js";import{w as rr}from"./editor-ipOJFDhA.js";import{i as Di,C as Ti}from"./section-array-field-uECXIzc8.js";import{T as Bi,a as ar}from"./toggle-group-yQeAFu4u.js";import{s as ba}from"./save-changes-debug-nBi-n9eV.js";import{u as Ii}from"./use-mcp-client-2MG3LveS.js";import{t as $i}from"./MessageCircle01-BG1RhOiZ.js";import{u as Fi}from"./use-sandbox-events-E6fWuIsO.js";import{b as Li,a as Oi}from"./sandbox-lifecycle-context-DbNrw8-a.js";import{b as Mi}from"./agent-capabilities-CyWfHGWp.js";import{c as _i}from"./thread-route-CfpvvkkL.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 Wi=100,Ji=50,Qi=300;function vn(t,e){const s=e.trim().toLowerCase();return s?t.toLowerCase().includes(s):!0}function Yi(t){const e=$.c(39),{orgId:s,orgSlug:a,userId:n,target:o,sandboxMap:d,owner:l,repo:i,search:u,enabled:c}=t,h=u===void 0?"":u,p=c===void 0?!0:c;let b;e[0]!==h?(b=h.trim(),e[0]=h,e[1]=b):b=e[1];const f=b,m=Tl(f,Qi);let g;e[2]!==o?(g=sa(o),e[2]=o,e[3]=g):g=e[3];const v=g,j=f.length>0;let w;e[4]!==m||e[5]!==s||e[6]!==a||e[7]!==l||e[8]!==i||e[9]!==o?(w=xs.githubBranchSearch(s,a,na(o),l,i,m),e[4]=m,e[5]=s,e[6]=a,e[7]=l,e[8]=i,e[9]=o,e[10]=w):w=e[10];const x=p&&v;let P;e[11]!==m||e[12]!==a||e[13]!==o?(P=T=>{const{pageParam:ee}=T;return Ha(a,"REPOSITORY_SEARCH_BRANCHES",{...o,query:m,limit:m?Ji:Wi,cursor:ee})},e[11]=m,e[12]=a,e[13]=o,e[14]=P):P=e[14];let y;e[15]!==m?(y=T=>m?void 0:T.nextCursor??void 0,e[15]=m,e[16]=y):y=e[16];let N;e[17]!==w||e[18]!==x||e[19]!==P||e[20]!==y?(N={queryKey:w,enabled:x,staleTime:3e4,retry:!1,initialPageParam:null,queryFn:P,getNextPageParam:y},e[17]=w,e[18]=x,e[19]=P,e[20]=y,e[21]=N):N=e[21];const{data:C,isLoading:A,isError:S,isFetching:D,hasNextPage:k,isFetchingNextPage:O,fetchNextPage:I}=$l(N),B=j&&(m!==f||D),F=(C?.pages??[]).flatMap(Xi),L=Bl(6e4),V=Gi({sandboxMap:d,userId:n,rawBranches:F,now:L});let z;e[22]!==f?(z=T=>vn(T.name,f),e[22]=f,e[23]=z):z=e[23];const te=V.recent.filter(z);let M;e[24]!==f?(M=T=>vn(T.name,f),e[24]=f,e[25]=M):M=e[25];const K=V.yours.filter(M),W=V.others,se=C?.pages[0],J=j&&se&&!B?Math.max(0,se.totalCount-se.branches.length):0,ue=!j&&k;let X;e[26]!==I?(X=()=>{I()},e[26]=I,e[27]=X):X=e[27];let le;return e[28]!==J||e[29]!==S||e[30]!==O||e[31]!==A||e[32]!==B||e[33]!==W||e[34]!==te||e[35]!==ue||e[36]!==X||e[37]!==K?(le={recent:te,yours:K,others:W,isLoading:A,isError:S,isSearching:B,hiddenMatchCount:J,hasMore:ue,isFetchingMore:O,fetchMore:X},e[28]=J,e[29]=S,e[30]=O,e[31]=A,e[32]=B,e[33]=W,e[34]=te,e[35]=ue,e[36]=X,e[37]=K,e[38]=le):le=e[38],le}function Xi(t){return t.branches}function Zi(t){const e=$.c(8),s=xe(),{releases:a,createRelease:n}=cn(t.virtualMcpId),o=$s(t.virtualMcpId);let d;return e[0]!==n||e[1]!==t.kind||e[2]!==t.userId||e[3]!==t.userLabel||e[4]!==o||e[5]!==a||e[6]!==s?(d=()=>{if(a.length>=Qs)return at.error(s("thread.branchPicker.capReached",{max:Qs})),null;const l=t.kind==="blog"?ql(t.userLabel):Hl(t.userLabel);return n({branch:l,name:oa(a,s(Hs(l))),color:ks(a.length),createdBy:t.userId,createdAt:new Date().toISOString(),...o?{runtime:ta(o.metadata)}:{}}).catch(i=>{at.error(s("thread.branchPicker.saveError"),{description:_r(s,Er(i))})}),l},e[0]=n,e[1]=t.kind,e[2]=t.userId,e[3]=t.userLabel,e[4]=o,e[5]=a,e[6]=s,e[7]=d):d=e[7],d}const Zs="-mx-[3px] h-3.5 w-3.5 shrink-0";function eo(t){const e=$.c(120),{virtualMcpId:s,isV8:a,userLabel:n,value:o,baseBranch:d,baseIsDraft:l,orgId:i,orgSlug:u,userId:c,target:h,owner:p,repo:b,sandboxMap:f,onChange:m,onCreateBranch:g,onAdoptBranch:v,disabled:j,spawnsNewChat:w,placement:x,draftKind:P}=t,y=a===void 0?!1:a,N=l===void 0?!1:l,C=j===void 0?!1:j,A=w===void 0?!1:w,S=x===void 0?"chat":x,D=P===void 0?"site":P,k=xe(),I=Bn()?D:null,B=S==="header",[F,L]=U.useState(!1),[V,z]=U.useState(!1),[te,M]=U.useState("branches"),[K,W]=U.useState(null),[se,J]=U.useState(""),[ue,X]=U.useState(null),[le,T]=U.useState(null),ee=U.useRef(null),{releases:G,createRelease:ne,renameRelease:re,deleteRelease:Se}=cn(s),he=I??void 0;let be;e[0]!==he||e[1]!==c||e[2]!==n||e[3]!==s?(be={virtualMcpId:s,userLabel:n,userId:c,kind:he},e[0]=he,e[1]=c,e[2]=n,e[3]=s,e[4]=be):be=e[4];const ce=Zi(be),{projectDefault:ie}=ys(s);let E;e[5]!==ie?(E=R=>Kl(R,ie)==="sandbox",e[5]=ie,e[6]=E):E=e[6];const fe=E,ke=Ml(s,y),me=y?_l(G,ke.data):[],Y=ke.refetch,Z=El(s),{url:Be,setUrl:Q,clear:oe}=An(s),Ne=Rn(s),xt=y&&!!Ne.connection,Ye=y?Ne.connection?.endpoint??null:Be,ye=!!Ye;let ve;e[7]!==oe||e[8]!==y||e[9]!==Ne?(ve=()=>{oe(),y&&Ne.clear()},e[7]=oe,e[8]=y,e[9]=Ne,e[10]=ve):ve=e[10];const Re=ve;let $e;e[11]!==F?($e={enabled:F},e[11]=F,e[12]=$e):$e=e[12];const{data:Ue}=Va($e);let Ie;e[13]!==Ue?.data?.members?(Ie=R=>R?Ue?.data?.members?.find(Pe=>Pe.userId===R)?.user?.name??void 0:void 0,e[13]=Ue?.data?.members,e[14]=Ie):Ie=e[14];const Dt=Ie,Ee=G.length>=Qs;let Le;e[15]!==I||e[16]!==ie||e[17]!==G?(Le=R=>!!_s(G,R.branch,I,ie),e[15]=I,e[16]=ie,e[17]=G,e[18]=Le):Le=e[18];const pe=Le,ct=k("thread.branchPicker.capReached",{max:Qs}),{isBase:Xe,current:dt,storeDraft:Oe,unlisted:_}=Ei({value:o,baseBranch:d,releases:G,baseIsDraft:N,storeDrafts:me}),ae=Nl(G,I,o);let je;e[19]!==I||e[20]!==o?(je=R=>I===null||Zr(R.name)===I||R.name===o,e[19]=I,e[20]=o,e[21]=je):je=e[21];const De=me.filter(je),Ze=Xe?k("thread.branchPicker.live"):dt?.name??Oe?.name??k(Hs(o)),ut=xt?k("thread.branchPicker.localhost.label"):ye?k("thread.branchPicker.localLabel"):o?Ze:k("thread.branchPicker.selectVersion"),Et=xt?"bg-foreground":ye?"bg-special":Xe?"bg-success":Oe?Ss(void 0):Ss(dt?.color??"orange"),Ce=!xt&&!ye&&!Xe&&!!dt&&fe(dt),et=R=>{Re();const Pe=me.some(Ct=>Ct.name===R)?{runtime:"cms"}:G.find(Ct=>Ct.branch===R);m(R,Pe&&{runtime:Pe.runtime}),L(!1)};let ht;e[22]!==k?(ht=R=>{at.error(k("thread.branchPicker.saveError"),{description:_r(k,Er(R))})},e[22]=k,e[23]=ht):ht=e[23];const tt=ht;let zt;e[24]!==Q?(zt=R=>{Q(R),z(!1),L(!1)},e[24]=Q,e[25]=zt):zt=e[25];const js=zt,Tt=(R,Pe)=>{if(Re(),v){v(R),z(!1),L(!1);return}if(!G.some(Ct=>Ct.branch===R)){if(Ee){at.error(ct);return}ne({branch:R,name:Pe.trim()||R,color:ks(G.length),createdBy:c,createdAt:new Date().toISOString()}).catch(tt)}m(R),z(!1),L(!1)};let vt;e[26]!==Re||e[27]!==m||e[28]!==g||e[29]!==ce?(vt=()=>{const R=ce();R&&(Re(),(g??m)(R),L(!1))},e[26]=Re,e[27]=m,e[28]=g,e[29]=ce,e[30]=vt):vt=e[30];const ws=vt;let st;e[31]===Symbol.for("react.memo_cache_sentinel")?(st=()=>{W(null),J(""),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=>{W(R.branch),J(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),W(null),J("")},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),W(null),J("");return}ne({branch:Pe,name:Ct,color:ks(G.length),createdBy:c,createdAt:new Date().toISOString()}).catch(tt)}W(null),J("")};let St;e[38]===Symbol.for("react.memo_cache_sentinel")?(St=()=>{W(null),J("")},e[38]=St):St=e[38];const ft=St,It=()=>{const R=ue;if(X(null),!(!R||!pe(R))){if(R.branch===o){const Pe=_s(G,R.branch,I,ie);Pe?et(Pe.branch):L(!1)}else L(!1);Se(R.branch).catch(tt)}},mt=zl(ae,ie),Ps=(mt.content.length>0||De.length>0)&&mt.code.length>0,$t=R=>K===R.branch?r.jsx(mn,{value:se,onChange:J,onSave:()=>Kt(R.branch),onCancel:ft},R.branch):r.jsx(pn,{rowRef:!ye&&R.branch===o?ee:void 0,dot:Ss(R.color),codeIcon:fe(R)?Es(R.color):void 0,label:R.name,creator:Dt(R.createdBy),originTooltip:y?k("thread.branchPicker.viaStudioUi"):void 0,branch:!y||fe(R)?R.branch:void 0,selected:!ye&&R.branch===o,onSelect:()=>et(R.branch),onRename:()=>Ut(R),onDelete:()=>X(R),deleteBlocked:!pe(R)},R.branch),Ft=()=>{const R=le;if(T(null),!!R){if(R.name===o){const Pe=_s(G,R.name,I,ie);if(!Pe)return;et(Pe.branch)}Z.mutateAsync(R.name).catch(Pe=>{at.error(k("thread.branchPicker.discardStoreDraftError"),{description:Pe instanceof Error?Pe.message:void 0})})}},pt=De.map(R=>K===R.name?r.jsx(mn,{value:se,onChange:J,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:()=>{W(R.name),J(R.name)},onDelete:()=>T(R),deleteBlocked:R.name===o&&!_s(G,R.name,I,ie)},`store:${R.name}`));let Ke;e[39]!==C||e[40]!==y||e[41]!==Y?(Ke=C?void 0:R=>{R?y&&Y():Bt(),L(R)},e[39]=C,e[40]=y,e[41]=Y,e[42]=Ke):Ke=e[42];const nt=B?"text-xs":"text-xs text-muted-foreground hover:text-foreground";let qe;e[43]!==nt?(qe=H("shrink min-w-0 max-w-[220px] gap-2",nt,Kr),e[43]=nt,e[44]=qe):qe=e[44];let He;e[45]!==C?(He=!C&&r.jsx(Vr,{size:12,className:"opacity-60 shrink-0"}),e[45]=C,e[46]=He):He=e[46];let Ve;e[47]!==ut?(Ve=r.jsx(ot,{children:ut}),e[47]=ut,e[48]=Ve):Ve=e[48];const rt=gl,kt="w-[min(300px,calc(100vw-2rem))] p-1.5",Nt="start";let Me;e[49]===Symbol.for("react.memo_cache_sentinel")?(Me=R=>{R.preventDefault(),ee.current?.scrollIntoView({block:"nearest"})},e[49]=Me):Me=e[49];let Ge;e[50]!==A||e[51]!==k?(Ge=A&&r.jsx("p",{className:"px-2 pb-1.5 pt-1 text-xs text-muted-foreground",children:k("thread.branchPicker.newChatHint")}),e[50]=A,e[51]=k,e[52]=Ge):Ge=e[52];const q=V?r.jsx(so,{orgId:i,orgSlug:u,userId:c,target:h,owner:p,repo:b,sandboxMap:f,enabled:F,tab:te,onTabChange:M,isV8:y,localUrl:Be,onSaveLocal:js,onBack:()=>z(!1),onAdopt:Tt,draftKind:I}):r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:H("always-scrollbar flex max-h-[min(50vh,20rem)] flex-col overflow-y-auto",y&&"gap-1"),children:[!y&&ye&&Ye&&r.jsx(to,{rowRef:ee,url:Ye,onSelect:()=>jt("local"),onEdit:()=>jt("local"),onTurnOff:()=>Re()}),_&&o&&(K===o?r.jsx(mn,{value:se,onChange:J,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:()=>{W(o),J(oa(G,k(Hs(o))))}})),Ps?r.jsxs(r.Fragment,{children:[r.jsx(or,{children:k("thread.branchPicker.groupContent")}),mt.content.map($t),pt,r.jsx(or,{divided:!0,children:k("thread.branchPicker.groupCode")}),mt.code.map($t)]}):r.jsxs(r.Fragment,{children:[ae.map($t),pt]}),y&&r.jsx(Ki,{virtualMcpId:s,branch:o,serve:Ne,rowRef:xt?ee:void 0,onPicked:()=>L(!1)})]}),(_||ae.length>0||De.length>0||y)&&r.jsx("div",{className:"my-1 border-t"}),r.jsxs("button",{type:"button",onClick:()=>{ws()},disabled:Ee,className:"flex w-full items-center gap-2 rounded-lg px-2 py-2 text-left text-sm text-muted-foreground hover:bg-accent hover:text-foreground disabled:pointer-events-none disabled:opacity-50",children:[r.jsx(Xr,{className:"h-4 w-4 shrink-0"}),k("thread.branchPicker.newVersion")]}),Ee&&r.jsx("p",{className:"px-2 pb-1 pt-0.5 text-xs text-warning",children:ct}),r.jsxs("button",{type:"button",onClick:()=>jt("branches"),className:H("flex w-full items-center justify-between gap-2 rounded-lg px-2 py-2 text-left text-xs text-muted-foreground hover:bg-accent hover:text-foreground",y&&"mt-1"),children:[k("thread.branchPicker.advanced"),r.jsx(Pr,{className:"h-4 w-4 shrink-0"})]})]});let de;e[53]!==rt||e[54]!==Me||e[55]!==Ge||e[56]!==q?(de=r.jsxs(rt,{className:kt,align:Nt,onOpenAutoFocus:Me,children:[Ge,q]}),e[53]=rt,e[54]=Me,e[55]=Ge,e[56]=q,e[57]=de):de=e[57];const we=r.jsxs(xl,{open:F,onOpenChange:Ke,children:[r.jsxs(lt,{children:[r.jsx(it,{asChild:!0,children:r.jsx("span",{className:"inline-flex min-w-0 shrink",children:r.jsx(vl,{asChild:!0,children:r.jsxs(ge,{"data-tour":bl.branchPicker,variant:B?"outline":"ghost",size:B?"sm":"default","aria-label":ut,disabled:C,className:qe,children:[Ce?r.jsx(Gr,{className:H(Zs,Es(dt?.color))}):Oe&&!ye?r.jsx(Sr,{className:H(Zs,Es(ks(me.indexOf(Oe))))}):r.jsx("span",{className:H("h-2 w-2 shrink-0 rounded-full",o||ye?Et:"bg-muted-foreground")}),r.jsx("span",{className:"min-w-0 truncate @max-3xl/panel-header:hidden",children:ut}),He]})})})}),Ve]}),de]}),Te=ue!==null;let _e;e[58]===Symbol.for("react.memo_cache_sentinel")?(_e=R=>{R||X(null)},e[58]=_e):_e=e[58];let We;e[59]!==k?(We=k("thread.branchPicker.deleteTitle"),e[59]=k,e[60]=We):We=e[60];let Ht;e[61]!==We?(Ht=r.jsx(Ns,{children:We}),e[61]=We,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 Wt;e[68]!==Ht||e[69]!==Gt?(Wt=r.jsxs(As,{children:[Ht,Gt]}),e[68]=Ht,e[69]=Gt,e[70]=Wt):Wt=e[70];let Jt;e[71]!==k?(Jt=k("thread.branchPicker.cancel"),e[71]=k,e[72]=Jt):Jt=e[72];let Qt;e[73]!==Jt?(Qt=r.jsx(Ws,{children:Jt}),e[73]=Jt,e[74]=Qt):Qt=e[74];let Yt;e[75]!==k?(Yt=k("thread.branchPicker.delete"),e[75]=k,e[76]=Yt):Yt=e[76];let Xt;e[77]!==It||e[78]!==Yt?(Xt=r.jsx(Js,{onClick:It,variant:"destructive",children:Yt}),e[77]=It,e[78]=Yt,e[79]=Xt):Xt=e[79];let Zt;e[80]!==Qt||e[81]!==Xt?(Zt=r.jsxs(Rs,{children:[Qt,Xt]}),e[80]=Qt,e[81]=Xt,e[82]=Zt):Zt=e[82];let es;e[83]!==Wt||e[84]!==Zt?(es=r.jsxs(Ds,{children:[Wt,Zt]}),e[83]=Wt,e[84]=Zt,e[85]=es):es=e[85];let Ls;e[86]!==Te||e[87]!==es?(Ls=r.jsx(Ts,{open:Te,onOpenChange:_e,children:es}),e[86]=Te,e[87]=es,e[88]=Ls):Ls=e[88];const hn=le!==null;let Os;e[89]===Symbol.for("react.memo_cache_sentinel")?(Os=R=>{R||T(null)},e[89]=Os):Os=e[89];let ts;e[90]!==k?(ts=k("thread.branchPicker.deleteTitle"),e[90]=k,e[91]=ts):ts=e[91];let ss;e[92]!==ts?(ss=r.jsx(Ns,{children:ts}),e[92]=ts,e[93]=ss):ss=e[93];let ns;e[94]!==le||e[95]!==k?(ns=le&&k("thread.branchPicker.discardStoreDraftConfirm",{name:le.name}),e[94]=le,e[95]=k,e[96]=ns):ns=e[96];let rs;e[97]!==ns?(rs=r.jsx(Cs,{children:ns}),e[97]=ns,e[98]=rs):rs=e[98];let as;e[99]!==ss||e[100]!==rs?(as=r.jsxs(As,{children:[ss,rs]}),e[99]=ss,e[100]=rs,e[101]=as):as=e[101];let ls;e[102]!==k?(ls=k("thread.branchPicker.cancel"),e[102]=k,e[103]=ls):ls=e[103];let is;e[104]!==ls?(is=r.jsx(Ws,{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(Js,{onClick:Ft,variant:"destructive",children:os}),e[108]=Ft,e[109]=os,e[110]=cs):cs=e[110];let ds;e[111]!==is||e[112]!==cs?(ds=r.jsxs(Rs,{children:[is,cs]}),e[111]=is,e[112]=cs,e[113]=ds):ds=e[113];let us;e[114]!==as||e[115]!==ds?(us=r.jsxs(Ds,{children:[as,ds]}),e[114]=as,e[115]=ds,e[116]=us):us=e[116];let Ms;return e[117]!==hn||e[118]!==us?(Ms=r.jsx(Ts,{open:hn,onOpenChange:Os,children:us}),e[117]=hn,e[118]=us,e[119]=Ms):Ms=e[119],r.jsxs(r.Fragment,{children:[we,Ls,Ms]})}function mn(t){const e=$.c(20),{value:s,onChange:a,onSave:n,onCancel:o}=t,d=xe();let l;e[0]!==d?(l=d("thread.branchPicker.rename"),e[0]=d,e[1]=l):l=e[1];let i;e[2]!==a?(i=f=>a(f.target.value),e[2]=a,e[3]=i):i=e[3];let u;e[4]!==o||e[5]!==n?(u=f=>{f.key==="Enter"&&n(),f.key==="Escape"&&(f.preventDefault(),f.stopPropagation(),o())},e[4]=o,e[5]=n,e[6]=u):u=e[6];let c;e[7]!==l||e[8]!==i||e[9]!==u||e[10]!==s?(c=r.jsx("input",{autoFocus:!0,"aria-label":l,value:s,onChange:i,onKeyDown:u,className:"h-8 flex-1 rounded-md border bg-transparent px-2 text-sm focus-ring"}),e[7]=l,e[8]=i,e[9]=u,e[10]=s,e[11]=c):c=e[11];let h;e[12]!==d?(h=d("thread.branchPicker.save"),e[12]=d,e[13]=h):h=e[13];let p;e[14]!==n||e[15]!==h?(p=r.jsx(ge,{size:"sm",onClick:n,children:h}),e[14]=n,e[15]=h,e[16]=p):p=e[16];let b;return e[17]!==c||e[18]!==p?(b=r.jsxs("div",{className:"flex items-center gap-1.5 p-1",children:[c,p]}),e[17]=c,e[18]=p,e[19]=b):b=e[19],b}function or(t){const e=$.c(5),{divided:s,children:a}=t,o=(s===void 0?!1:s)&&"mt-1 border-t";let d;e[0]!==o?(d=H("px-2 pb-1 pt-2 text-xs font-medium uppercase tracking-wide text-muted-foreground",o),e[0]=o,e[1]=d):d=e[1];let l;return e[2]!==a||e[3]!==d?(l=r.jsx("p",{className:d,children:a}),e[2]=a,e[3]=d,e[4]=l):l=e[4],l}function pn(t){const e=$.c(53),{rowRef:s,dot:a,codeIcon:n,agentIcon:o,originTooltip:d,label:l,creator:i,branch:u,selected:c,onSelect:h,onRename:p,onDelete:b,deleteBlocked:f}=t,m=f===void 0?!1:f,g=xe();let v;e[0]!==o||e[1]!==n||e[2]!==a?(v=n?r.jsx(Gr,{className:H(Zs,n)}):o?r.jsx(Sr,{className:H(Zs,o)}):r.jsx("span",{className:H("h-2 w-2 shrink-0 rounded-full",a)}),e[0]=o,e[1]=n,e[2]=a,e[3]=v):v=e[3];let j;e[4]!==i?(j=i&&r.jsx("span",{className:"ml-1.5 text-xs font-normal text-muted-foreground/70",children:i}),e[4]=i,e[5]=j):j=e[5];let w;e[6]!==l||e[7]!==j?(w=r.jsxs("span",{className:"min-w-0 flex-1 truncate",children:[l,j]}),e[6]=l,e[7]=j,e[8]=w):w=e[8];let x;e[9]!==h||e[10]!==c||e[11]!==v||e[12]!==w?(x=r.jsxs("button",{type:"button","aria-pressed":c,onClick:h,className:"flex min-w-0 flex-1 items-center gap-2.5 px-2 py-2 text-left text-sm",children:[v,w]}),e[9]=h,e[10]=c,e[11]=v,e[12]=w,e[13]=x):x=e[13];const P=x,y=c?"bg-accent":"hover:bg-accent";let N;e[14]!==y?(N=H("group flex items-center rounded-lg",y),e[14]=y,e[15]=N):N=e[15];let C;e[16]!==u||e[17]!==n||e[18]!==d||e[19]!==P||e[20]!==g?(C=u||d?r.jsxs(lt,{children:[r.jsx(it,{asChild:!0,children:P}),r.jsxs(ot,{side:"bottom",className:"text-xs",children:[n&&r.jsx("p",{className:"font-medium",children:g("thread.branchPicker.codeDraftTooltip")}),d&&r.jsx("p",{children:d}),u&&r.jsx("p",{className:"font-mono",children:g("thread.branchPicker.branchTooltip",{branch:u})})]})]}):P,e[16]=u,e[17]=n,e[18]=d,e[19]=P,e[20]=g,e[21]=C):C=e[21];let A;e[22]!==g?(A=g("thread.branchPicker.moreActions"),e[22]=g,e[23]=A):A=e[23];let S;e[24]===Symbol.for("react.memo_cache_sentinel")?(S=r.jsx(Qr,{className:"h-4 w-4"}),e[24]=S):S=e[24];let D;e[25]!==A?(D=r.jsx(tn,{asChild:!0,children:r.jsx(ge,{variant:"ghost",size:"icon","aria-label":A,className:"mr-1 h-6 w-6 shrink-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100",children:S})}),e[25]=A,e[26]=D):D=e[26];let k;e[27]===Symbol.for("react.memo_cache_sentinel")?(k=r.jsx(Yr,{className:"h-4 w-4"}),e[27]=k):k=e[27];let O;e[28]!==g?(O=g("thread.branchPicker.rename"),e[28]=g,e[29]=O):O=e[29];let I;e[30]!==p||e[31]!==O?(I=r.jsxs(ms,{onSelect:p,children:[k,O]}),e[30]=p,e[31]=O,e[32]=I):I=e[32];let B;e[33]!==m||e[34]!==b||e[35]!==g?(B=b&&r.jsxs(ms,{onSelect:b,disabled:m,className:"text-destructive focus:text-destructive",children:[r.jsx(on,{className:"h-4 w-4"}),g("thread.branchPicker.delete")]}),e[33]=m,e[34]=b,e[35]=g,e[36]=B):B=e[36];let F;e[37]!==m||e[38]!==b||e[39]!==g?(F=b&&m&&r.jsx("p",{className:"max-w-48 px-2 pb-1.5 text-xs text-muted-foreground",children:g("thread.branchPicker.keepOneDraft")}),e[37]=m,e[38]=b,e[39]=g,e[40]=F):F=e[40];let L;e[41]!==I||e[42]!==B||e[43]!==F?(L=r.jsxs(sn,{align:"end",children:[I,B,F]}),e[41]=I,e[42]=B,e[43]=F,e[44]=L):L=e[44];let V;e[45]!==D||e[46]!==L?(V=r.jsxs(nn,{children:[D,L]}),e[45]=D,e[46]=L,e[47]=V):V=e[47];let z;return e[48]!==s||e[49]!==V||e[50]!==N||e[51]!==C?(z=r.jsxs("div",{ref:s,className:N,children:[C,V]}),e[48]=s,e[49]=V,e[50]=N,e[51]=C,e[52]=z):z=e[52],z}function to(t){const e=$.c(40),{rowRef:s,url:a,onSelect:n,onEdit:o,onTurnOff:d}=t,l=xe();let i;try{let D;e[0]!==a?(D=new URL(a),e[0]=a,e[1]=D):D=e[1],i=D.host}catch{i=a}const u=i;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=r.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full bg-special"}),e[2]=c):c=e[2];let h;e[3]!==l?(h=l("thread.branchPicker.localLabel"),e[3]=l,e[4]=h):h=e[4];let p;e[5]!==u?(p=r.jsx("span",{className:"ml-1.5 text-xs font-normal text-muted-foreground/70",children:u}),e[5]=u,e[6]=p):p=e[6];let b;e[7]!==h||e[8]!==p?(b=r.jsxs("span",{className:"min-w-0 flex-1 truncate",children:[h,p]}),e[7]=h,e[8]=p,e[9]=b):b=e[9];let f;e[10]!==n||e[11]!==b?(f=r.jsxs("button",{type:"button","aria-pressed":!0,onClick:n,className:"flex min-w-0 flex-1 items-center gap-2.5 px-2 py-2 text-left text-sm",children:[c,b]}),e[10]=n,e[11]=b,e[12]=f):f=e[12];let m;e[13]!==l?(m=l("thread.branchPicker.moreActions"),e[13]=l,e[14]=m):m=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=r.jsx(Qr,{className:"h-4 w-4"}),e[15]=g):g=e[15];let v;e[16]!==m?(v=r.jsx(tn,{asChild:!0,children:r.jsx(ge,{variant:"ghost",size:"icon","aria-label":m,className:"mr-1 h-6 w-6 shrink-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100",children:g})}),e[16]=m,e[17]=v):v=e[17];let j;e[18]===Symbol.for("react.memo_cache_sentinel")?(j=r.jsx(Yr,{className:"h-4 w-4"}),e[18]=j):j=e[18];let w;e[19]!==l?(w=l("thread.branchPicker.rename"),e[19]=l,e[20]=w):w=e[20];let x;e[21]!==o||e[22]!==w?(x=r.jsxs(ms,{onSelect:o,children:[j,w]}),e[21]=o,e[22]=w,e[23]=x):x=e[23];let P;e[24]===Symbol.for("react.memo_cache_sentinel")?(P=r.jsx(on,{className:"h-4 w-4"}),e[24]=P):P=e[24];let y;e[25]!==l?(y=l("thread.branchPicker.localTurnOff"),e[25]=l,e[26]=y):y=e[26];let N;e[27]!==d||e[28]!==y?(N=r.jsxs(ms,{onSelect:d,className:"text-destructive focus:text-destructive",children:[P,y]}),e[27]=d,e[28]=y,e[29]=N):N=e[29];let C;e[30]!==x||e[31]!==N?(C=r.jsxs(sn,{align:"end",children:[x,N]}),e[30]=x,e[31]=N,e[32]=C):C=e[32];let A;e[33]!==C||e[34]!==v?(A=r.jsxs(nn,{children:[v,C]}),e[33]=C,e[34]=v,e[35]=A):A=e[35];let S;return e[36]!==s||e[37]!==A||e[38]!==f?(S=r.jsxs("div",{ref:s,className:"group flex items-center rounded-lg bg-accent",children:[f,A]}),e[36]=s,e[37]=A,e[38]=f,e[39]=S):S=e[39],S}function so(t){const e=$.c(75),{orgId:s,orgSlug:a,userId:n,target:o,owner:d,repo:l,sandboxMap:i,enabled:u,tab:c,onTabChange:h,isV8:p,localUrl:b,onSaveLocal:f,onBack:m,onAdopt:g,draftKind:v}=t,j=xe(),[w,x]=U.useState(""),P=c==="branches"?w:"",y=u&&c==="branches";let N;e[0]!==s||e[1]!==a||e[2]!==d||e[3]!==l||e[4]!==i||e[5]!==P||e[6]!==y||e[7]!==o||e[8]!==n?(N={orgId:s,orgSlug:a,userId:n,target:o,sandboxMap:i,owner:d,repo:l,search:P,enabled:y},e[0]=s,e[1]=a,e[2]=d,e[3]=l,e[4]=i,e[5]=P,e[6]=y,e[7]=o,e[8]=n,e[9]=N):N=e[9];const{recent:C,yours:A,others:S,isLoading:D,hasMore:k,isFetchingMore:O,fetchMore:I}=Yi(N),B=u&&c==="prs";let F;e[10]!==s||e[11]!==a||e[12]!==d||e[13]!==l||e[14]!==B||e[15]!==o?(F={orgId:s,orgSlug:a,target:o,owner:d,repo:l,enabled:B},e[10]=s,e[11]=a,e[12]=d,e[13]=l,e[14]=B,e[15]=o,e[16]=F):F=e[16];const{data:L,isLoading:V}=Fl(F);let z;if(e[17]!==v||e[18]!==I||e[19]!==k||e[20]!==O||e[21]!==D||e[22]!==p||e[23]!==b||e[24]!==g||e[25]!==m||e[26]!==f||e[27]!==h||e[28]!==S||e[29]!==d||e[30]!==V||e[31]!==C||e[32]!==l||e[33]!==w||e[34]!==j||e[35]!==L||e[36]!==c||e[37]!==A){const te=L===void 0?[]:L,M=`${d}/${l}`;let K;e[39]!==M?(K=M.toLowerCase(),e[39]=M,e[40]=K):K=e[40];const W=K;let se;e[41]!==W?(se=E=>E.headRepoFullName?.toLowerCase()===W,e[41]=W,e[42]=se):se=e[42];const J=te.filter(se);let ue;if(e[43]!==v||e[44]!==S||e[45]!==C||e[46]!==A){const E=new Set;ue=[...C,...A,...S].filter(fe=>E.has(fe.name)?!1:(E.add(fe.name),v!=="site"||Zr(fe.name)==="site")),e[43]=v,e[44]=S,e[45]=C,e[46]=A,e[47]=ue}else ue=e[47];const X=ue;let le;e[48]===Symbol.for("react.memo_cache_sentinel")?(le=r.jsx(Pl,{className:"h-4 w-4 shrink-0"}),e[48]=le):le=e[48];let T;e[49]!==j?(T=j("thread.branchPicker.advancedBack"),e[49]=j,e[50]=T):T=e[50];let ee;e[51]!==m||e[52]!==T?(ee=r.jsxs("button",{type:"button",onClick:m,className:"flex items-center gap-1.5 px-2 py-1.5 text-xs text-muted-foreground hover:text-foreground",children:[le,T]}),e[51]=m,e[52]=T,e[53]=ee):ee=e[53];let G;e[54]!==h?(G=E=>{h(E),x("")},e[54]=h,e[55]=G):G=e[55];let ne;e[56]!==j?(ne=j("thread.branchPicker.branchesTab"),e[56]=j,e[57]=ne):ne=e[57];let re;e[58]!==ne?(re=r.jsx(Lt,{value:"branches",className:"h-6 px-2.5 text-xs",children:ne}),e[58]=ne,e[59]=re):re=e[59];let Se;e[60]!==j?(Se=j("thread.branchPicker.prsTab"),e[60]=j,e[61]=Se):Se=e[61];let he;e[62]!==Se?(he=r.jsx(Lt,{value:"prs",className:"h-6 px-2.5 text-xs",children:Se}),e[62]=Se,e[63]=he):he=e[63];let be;e[64]!==p||e[65]!==j?(be=!p&&r.jsx(Lt,{value:"local",className:"h-6 px-2.5 text-xs",children:j("thread.branchPicker.localTab")}),e[64]=p,e[65]=j,e[66]=be):be=e[66];let ce;e[67]!==re||e[68]!==he||e[69]!==be?(ce=r.jsxs(qr,{className:"h-auto w-fit justify-start gap-1 bg-accent p-1",variant:"pill",children:[re,he,be]}),e[67]=re,e[68]=he,e[69]=be,e[70]=ce):ce=e[70];let ie;e[71]!==G||e[72]!==ce||e[73]!==c?(ie=r.jsx(Hr,{className:"px-2 pt-2 pb-1",value:c,onValueChange:G,children:ce}),e[71]=G,e[72]=ce,e[73]=c,e[74]=ie):ie=e[74],z=r.jsxs("div",{className:"flex flex-col",children:[ee,ie,c==="local"&&!p?r.jsx(Ui,{url:b,onSave:f}):r.jsxs(yl,{filter:c==="branches"?no:void 0,children:[r.jsx(jl,{placeholder:j(c==="branches"?"thread.branchPicker.searchBranches":"thread.branchPicker.searchPullRequests"),value:w,onValueChange:x}),r.jsx(wl,{onScroll:E=>{const fe=E.currentTarget;c==="branches"&&fe.scrollHeight-fe.scrollTop-fe.clientHeight<48&&I()},children:c==="branches"?r.jsxs(r.Fragment,{children:[D&&r.jsx("div",{className:"p-3 text-xs text-muted-foreground",children:j("thread.branchPicker.loadingMore")}),!D&&X.length===0&&r.jsx(tr,{children:j("thread.branchPicker.noBranchesFound")}),X.length>0&&r.jsx(sr,{children:X.map(E=>r.jsxs(nr,{value:E.name,className:"cursor-pointer",onSelect:()=>g(E.name,E.name),children:[r.jsx(Ga,{className:"mr-2 h-4 w-4 shrink-0"}),r.jsx("span",{className:"flex-1 truncate",children:E.name})]},E.name))}),k&&r.jsx("div",{className:"p-2",children:r.jsx(ge,{variant:"ghost",size:"sm",className:"h-7 w-full text-xs",disabled:O,onClick:I,children:j(O?"thread.branchPicker.loadingMore":"thread.branchPicker.loadMoreBranches")})})]}):r.jsxs(r.Fragment,{children:[V&&r.jsx("div",{className:"p-3 text-xs text-muted-foreground",children:j("thread.branchPicker.loadingPullRequests")}),!V&&J.length===0&&r.jsx(tr,{children:j("thread.branchPicker.noOpenPullRequests")}),J.length>0&&r.jsx(sr,{children:J.map(E=>r.jsxs(nr,{value:`#${E.number} ${E.title} ${E.head}`,className:"cursor-pointer",onSelect:()=>g(E.head,ir(E.title)),children:[r.jsx(ln,{className:"mr-2 h-4 w-4 shrink-0 text-muted-foreground"}),r.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[r.jsx("span",{className:"truncate",children:ir(E.title)}),r.jsxs("span",{className:"truncate text-xs text-muted-foreground",children:["#",E.number," · ",E.head]})]})]},E.number))})]})})]})]}),e[17]=v,e[18]=I,e[19]=k,e[20]=O,e[21]=D,e[22]=p,e[23]=b,e[24]=g,e[25]=m,e[26]=f,e[27]=h,e[28]=S,e[29]=d,e[30]=V,e[31]=C,e[32]=l,e[33]=w,e[34]=j,e[35]=L,e[36]=c,e[37]=A,e[38]=z}else z=e[38];return z}function no(t,e){return vn(t,e)?1:0}function ro(t){const e=$.c(20),{locked:s,placement:a,value:n,virtualMcpId:o,isV8:d,userLabel:l,baseBranch:i,baseIsDraft:u,onChange:c,onCreateBranch:h,onAdoptBranch:p,orgId:b,orgSlug:f,userId:m,target:g,owner:v,repo:j,sandboxMap:w,draftKind:x}=t;let P;return e[0]!==i||e[1]!==u||e[2]!==x||e[3]!==d||e[4]!==s||e[5]!==p||e[6]!==c||e[7]!==h||e[8]!==b||e[9]!==f||e[10]!==v||e[11]!==a||e[12]!==j||e[13]!==w||e[14]!==g||e[15]!==m||e[16]!==l||e[17]!==n||e[18]!==o?(P=r.jsx(eo,{virtualMcpId:o,isV8:d,userLabel:l,value:n,baseBranch:i,baseIsDraft:u,orgId:b,orgSlug:f,userId:m,target:g,owner:v,repo:j,sandboxMap:w,onChange:c,onCreateBranch:h,onAdoptBranch:p,spawnsNewChat:s,placement:a,draftKind:x}),e[0]=i,e[1]=u,e[2]=x,e[3]=d,e[4]=s,e[5]=p,e[6]=c,e[7]=h,e[8]=b,e[9]=f,e[10]=v,e[11]=a,e[12]=j,e[13]=w,e[14]=g,e[15]=m,e[16]=l,e[17]=n,e[18]=o,e[19]=P):P=e[19],P}function ao(t){const e=$.c(2),{branchPill:s}=t;if(!s)return null;let a;return e[0]!==s?(a=r.jsx(r.Fragment,{children:s}),e[0]=s,e[1]=a):a=e[1],a}function lo(t){const{locked:e,sessionRuntime:s,projectRuntime:a,draftRuntime:n,current:o}=t;return t.contentOnly&&n==="cms"?s==="cms"&&!e?{kind:"switch"}:{kind:"new-chat",runtime:"cms"}:n==="sandbox"&&s!=="sandbox"?{kind:"new-chat",runtime:"sandbox"}:n==="cms"&&s==="sandbox"&&a==="cms"&&!o?{kind:"new-chat"}:e?s==="sandbox"?{kind:"new-chat",runtime:"sandbox"}:{kind:"new-chat"}:{kind:"switch"}}function io(t){const e=$.c(25),{virtualMcp:s,currentBranch:a}=t,n=ll(),o=vs();let d;e[0]!==n?.messages||e[1]!==o?.isThreadLocked?(d=(n?.messages??[]).length>0||(o?.isThreadLocked??!1),e[0]=n?.messages,e[1]=o?.isThreadLocked,e[2]=d):d=e[2];const l=d,i=o?.setCurrentTaskBranch,u=o?.createTask,c=ea()==="blog"?"blog":"site",h=ys(s?.id),p=h.runtime,b=s?.metadata;let f;e[3]!==b?(f=ta(b),e[3]=b,e[4]=f):f=e[4];const m=f,g=m==="cms"&&p==="sandbox",v=Dl(s),j=ze(v),{data:w}=rn.useSession(),x=w?.user;let P;e[5]!==x?(P=In(x),e[5]=x,e[6]=P):P=e[6];const y=P,N=w?.user?.id??"",{org:C}=Is(),A=Ll(s,a),S=$n(s?.id),D=S&&p==="cms";let k;e[7]!==u||e[8]!==a||e[9]!==l||e[10]!==m||e[11]!==p||e[12]!==h.resolved||e[13]!==i||e[14]!==S?(k=(te,M)=>{const K=lo({locked:l,sessionRuntime:h.resolved?p:null,projectRuntime:m,draftRuntime:M&&(M.runtime??m),current:te===a,contentOnly:S});K.kind==="new-chat"&&u?u({branch:te,...K.runtime?{runtime:K.runtime}:{}}):i&&i(te)},e[7]=u,e[8]=a,e[9]=l,e[10]=m,e[11]=p,e[12]=h.resolved,e[13]=i,e[14]=S,e[15]=k):k=e[15];const O=k;let I;e[16]!==g||e[17]!==u||e[18]!==l||e[19]!==i?(I=te=>{(l||g)&&u?u({branch:te}):i&&i(te)},e[16]=g,e[17]=u,e[18]=l,e[19]=i,e[20]=I):I=e[20];const B=I;let F;e[21]!==u?(F=u?te=>u({runtime:"sandbox",branch:te}):void 0,e[21]=u,e[22]=F):F=e[22];const L=F,V=v&&sa(j)?r.jsx(ro,{userLabel:y,virtualMcpId:s?.id??"",isV8:S,value:a,baseBranch:A,baseIsDraft:D,orgId:C.id,orgSlug:C.slug,userId:N,target:j,owner:v.owner,repo:v.name,sandboxMap:s?.metadata?.sandboxMap,onChange:O,onCreateBranch:B,onAdoptBranch:L,locked:l,placement:"chat",draftKind:c},`${na(j)}:${v.owner}/${v.name}`):null;let z;return e[23]!==V?(z=r.jsx(ao,{branchPill:V}),e[23]=V,e[24]=z):z=e[24],z}const oo=Wa("flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg",{variants:{orientation:{horizontal:"[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",vertical:"flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none"}},defaultVariants:{orientation:"horizontal"}});function co(t){const e=$.c(11);let s,a,n;e[0]!==t?({className:s,orientation:a,...n}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=n):(s=e[1],a=e[2],n=e[3]);let o;e[4]!==s||e[5]!==a?(o=H(oo({orientation:a}),s),e[4]=s,e[5]=a,e[6]=o):o=e[6];let d;return e[7]!==a||e[8]!==n||e[9]!==o?(d=r.jsx("div",{role:"group","data-slot":"button-group","data-orientation":a,className:o,...n}),e[7]=a,e[8]=n,e[9]=o,e[10]=d):d=e[10],d}function uo(t){const e=$.c(14),{item:s}=t;let a;e[0]!==s?(a=()=>{s.onSelect()},e[0]=s,e[1]=a):a=e[1];let n;e[2]!==s.disabled||e[3]!==s.icon||e[4]!==s.label||e[5]!==a?(n=r.jsxs(ms,{disabled:s.disabled,onSelect:a,children:[s.icon,s.label]}),e[2]=s.disabled,e[3]=s.icon,e[4]=s.label,e[5]=a,e[6]=n):n=e[6];const o=n;if(!s.tooltip)return o;let d;e[7]!==o?(d=r.jsx(it,{asChild:!0,children:o}),e[7]=o,e[8]=d):d=e[8];let l;e[9]!==s.tooltip?(l=r.jsx(ot,{side:"right",children:s.tooltip}),e[9]=s.tooltip,e[10]=l):l=e[10];let i;return e[11]!==d||e[12]!==l?(i=r.jsxs(lt,{children:[d,l]}),e[11]=d,e[12]=l,e[13]=i):i=e[13],i}function ga(t){const e=$.c(20),{label:s,onClick:a,variant:n,size:o,disabled:d,loading:l,pulse:i,tooltip:u,icon:c,items:h,menuAriaLabel:p,className:b}=t,f=n===void 0?"default":n,m=o===void 0?"default":o,g=d===void 0?!1:d,v=l===void 0?!1:l,j=i===void 0?!1:i,w=(h?.length??0)>0;let x;if(e[0]!==b||e[1]!==g||e[2]!==w||e[3]!==c||e[4]!==h||e[5]!==s||e[6]!==v||e[7]!==p||e[8]!==a||e[9]!==j||e[10]!==m||e[11]!==u||e[12]!==f){const P=H(Kr,f==="default"&&"focus-visible:inset-ring-current");let y;e[14]!==c||e[15]!==v?(y=v?r.jsx(ps,{size:"xs"}):c,e[14]=c,e[15]=v,e[16]=y):y=e[16];const N=r.jsxs(ge,{type:"button",variant:f,size:m,disabled:g,"aria-busy":v||void 0,onClick:v?void 0:a,className:H(P,w&&"rounded-r-none border-r border-current/20"),children:[y,s]}),C=j&&"animate-pulse-brightness motion-reduce:animate-none motion-reduce:opacity-80";let A;e[17]!==b||e[18]!==C?(A=H(C,b),e[17]=b,e[18]=C,e[19]=A):A=e[19],x=r.jsxs(co,{className:A,children:[u?r.jsxs(lt,{children:[r.jsx(it,{asChild:!0,children:r.jsx("span",{className:H("inline-flex rounded-lg outline-none",P,g&&"cursor-not-allowed"),tabIndex:g?0:void 0,role:g?"button":void 0,"aria-disabled":g||void 0,children:N})}),r.jsx(ot,{children:u})]}):N,w?r.jsxs(nn,{children:[r.jsx(tn,{asChild:!0,children:r.jsx(ge,{type:"button",variant:f,size:m,"aria-label":p,className:H("has-[>svg]:px-2",P),children:r.jsx(Vr,{className:"size-3.5"})})}),r.jsx(sn,{align:"end",children:h?.map(ho)})]}):null]}),e[0]=b,e[1]=g,e[2]=w,e[3]=c,e[4]=h,e[5]=s,e[6]=v,e[7]=p,e[8]=a,e[9]=j,e[10]=m,e[11]=u,e[12]=f,e[13]=x}else x=e[13];return x}function ho(t){return r.jsx(uo,{item:t},t.key)}async function fo(t){if(t.hosted)return;const e=t.branch;await t.setCurrentTaskBranch(t.nextBranch()),e&&e!==t.baseBranch&&await t.deleteRelease(e)}function mo(t,e,{hosted:s}){return s&&t!==null?t:e}function po(t,e){const s=$.c(11),[a,n]=U.useState(null);let o;s[0]!==a||s[1]!==t||s[2]!==e?(o=mo(a,t,e),s[0]=a,s[1]=t,s[2]=e,s[3]=o):o=s[3];let d;s[4]!==t||s[5]!==e?(d=()=>n(e.hosted?t:null),s[4]=t,s[5]=e,s[6]=d):d=s[6];let l;s[7]===Symbol.for("react.memo_cache_sentinel")?(l=()=>n(null),s[7]=l):l=s[7];let i;return s[8]!==o||s[9]!==d?(i={shown:o,hold:d,release:l},s[8]=o,s[9]=d,s[10]=i):i=s[10],i}function bo({open:t,hosted:e}){return t||e}function xa(t){return ri({userName:t?.name,userEmail:t?.email})??void 0}function dn(t){const e=$.c(18),{state:s,header:a,body:n,note:o,gate:d,footer:l}=t,i=s!=="ready";let u;e[0]!==a?(u=r.jsx("div",{className:"space-y-0.5 px-4 py-3",children:a}),e[0]=a,e[1]=u):u=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=r.jsx("div",{className:"border-t"}),e[2]=c):c=e[2];let h;e[3]!==o?(h=o?r.jsx("div",{className:"space-y-1.5 border-t px-4 py-3",children:o}):null,e[3]=o,e[4]=h):h=e[4];let p;e[5]!==n||e[6]!==h?(p=r.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[n,h]}),e[5]=n,e[6]=h,e[7]=p):p=e[7];let b;e[8]===Symbol.for("react.memo_cache_sentinel")?(b=r.jsx("div",{className:"border-t"}),e[8]=b):b=e[8];let f;e[9]!==l?(f=r.jsx("div",{className:"space-y-2 px-4 py-3",children:l}),e[9]=l,e[10]=f):f=e[10];let m;return e[11]!==d||e[12]!==s||e[13]!==i||e[14]!==u||e[15]!==p||e[16]!==f?(m=r.jsxs("div",{className:"flex min-h-0 flex-1 flex-col","data-publish-state":s,"aria-busy":i,children:[u,c,p,d,b,f]}),e[11]=d,e[12]=s,e[13]=i,e[14]=u,e[15]=p,e[16]=f,e[17]=m):m=e[17],m}function Bs(t){const e=$.c(2),{children:s}=t;let a;return e[0]!==s?(a=r.jsx("div",{className:"scroll-fade min-h-0 flex-1 space-y-3 overflow-y-auto overscroll-contain px-4 pt-3 pb-2 [scrollbar-width:thin]",children:s}),e[0]=s,e[1]=a):a=e[1],a}function va(t){const e=$.c(10);let s,a,n;e[0]!==t?({className:a,children:s,...n}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=n):(s=e[1],a=e[2],n=e[3]);let o;e[4]!==a?(o=H("rounded-lg border bg-card px-3 py-2.5",a),e[4]=a,e[5]=o):o=e[5];let d;return e[6]!==s||e[7]!==n||e[8]!==o?(d=r.jsx("div",{className:o,...n,children:s}),e[6]=s,e[7]=n,e[8]=o,e[9]=d):d=e[9],d}function Qe(t){const e=$.c(4),{className:s}=t;let a;e[0]!==s?(a=H("animate-pulse rounded bg-muted motion-reduce:animate-none",s),e[0]=s,e[1]=a):a=e[1];let n;return e[2]!==a?(n=r.jsx("div",{className:a}),e[2]=a,e[3]=n):n=e[3],n}function Ot(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx(va,{children:r.jsxs("div",{className:"flex items-center gap-2.5",children:[r.jsx(Qe,{className:"size-4 rounded-md"}),r.jsx(Qe,{className:"h-3 w-24"}),r.jsx(Qe,{className:"h-2.5 w-16"}),r.jsx(Qe,{className:"ml-auto size-6 rounded"})]})}),t[0]=e):e=t[0],e}const ya="secret";function ja(t){return t.kind!=="block"?null:t.namedRule??null}function go(t,e){const s=e.find(a=>a&&typeof a=="object");return s?Xl(s.__resolveType):Zl(t)}const xo=/(?:^|\/)\.deco\/blocks\/([^/]+)\.json$/;function qn(t){const e=xo.exec(t)?.[1];return e?Ci(e):null}function en(t){if(!t)return null;try{const e=JSON.parse(t);if(e&&typeof e=="object"&&!Array.isArray(e))return e}catch{}return null}function vo(t,e){return t===null?"new":e===null?"removed":"edited"}function wa(t){const e=t.replace(/[_-]+/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").trim();return e?(e.charAt(0).toUpperCase()+e.slice(1)).replace(/\s+[A-Z](?=[a-z])/g,s=>s.toLowerCase()):t}function fs(t,e,s=!1){if(t&&typeof t=="object"&&!Array.isArray(t)){const a=t.__resolveType;if(typeof a=="string"&&a.trim()){if(s)return Ja(a);const o=(a.split("/").pop()??a).replace(/\.[jt]sx?$/,"");return wa(o)||o}}return`Section ${e+1}`}function Hn(t){if(Nr(t))return t.value??null;const e=t.__resolveType;return typeof e=="string"&&Qa(e)?t.section??null:null}const Pa=6;function Vs(t,e=0){if(e>Pa||!t||typeof t!="object")return[];if(Array.isArray(t))return t.flatMap(n=>Vs(n,e+1));const s=t;if(Sn(s.__resolveType))return yn(s).flatMap(n=>Vs(n?.value,e+1));const a=Hn(s);return a!==null?Vs(a,e+1):[s]}function yn(t){const e=t?.variants;return Array.isArray(e)?e.map(s=>s&&typeof s=="object"&&!Array.isArray(s)?s:null):[]}function cr(t){let e=t;for(let s=0;s<Pa;s++){if(!e||typeof e!="object"||Array.isArray(e))return null;const a=e;if(Sn(a.__resolveType))return a;const n=Hn(a);if(n===null)return null;e=n}return null}function yo(t,e,s){const a=yn(cr(t)),n=e?yn(cr(e)):[],o=e?Array.from({length:Math.max(a.length,n.length)},(i,u)=>u).filter(i=>!un(a[i],n[i])):[],l=[...o.map(i=>a[i]??n[i]),...a.filter((i,u)=>!o.includes(u))].flatMap(i=>Vs(i?.value)).map(i=>fs(i,s,!0));return[...new Set(l)]}function bn(t,e,s,a,n){let o=t,d=!1;for(let i=0;i<4;i++){if(!o||typeof o!="object"||Array.isArray(o)){d=!0;break}const u=o;if(Sn(u.__resolveType)){d=!0;break}const c=Hn(u);if(c===null)break;o=c}const l=d?yo(t,n,e):[];return{name:fs(d?t:o,e,!0),kind:"section",status:s,fields:a,...d?{wrapper:!0}:{},...l.length>0?{held:l}:{}}}function jn(t,e){const s=t.sections;if(Array.isArray(s))return s.flatMap((a,n)=>a&&typeof a=="object"&&!Array.isArray(a)?[{section:a,basePath:["sections",n]}]:[]);if(s&&typeof s=="object"){const a=s.variants;if(Array.isArray(a))return a.flatMap((n,o)=>{const d=n&&typeof n=="object"&&!Array.isArray(n)?n.value:null,l=e&&Nr(d),i=l?d.value:d;if(!Array.isArray(i))return[];const u=l?["sections","variants",o,"value","value"]:["sections","variants",o,"value"];return i.flatMap((c,h)=>c&&typeof c=="object"&&!Array.isArray(c)?[{section:c,basePath:[...u,h]}]:[])})}return[]}function dr(t){return JSON.stringify(t,(e,s)=>{if(s&&typeof s=="object"&&!Array.isArray(s)){const a=s;return Object.keys(a).sort().reduce((n,o)=>(n[o]=a[o],n),{})}return s})}function un(t,e){return t===void 0&&e===void 0?!0:dr(t)===dr(e)}function Rt(t,e,s,a=new Set){const n=new Set([...Object.keys(t??{}),...Object.keys(e??{})]),o=[];for(const d of n){if(d.startsWith("__")||a.has(d))continue;const l=t?t[d]:void 0,i=e?e[d]:void 0;un(l,i)||o.push({label:wa(d),path:[...s,d],from:l,to:i})}return o}function jo(t,e){const s=e.find(a=>a&&typeof a=="object");return s?s.__resolveType===li:t===ii}function wo(t,e){const s=n=>n===void 0||!!n&&typeof n=="object"&&!Array.isArray(n)&&!("__resolveType"in n),a=[];for(const n of Rt(t,e,[])){const o=String(n.path[0]);s(n.from)&&s(n.to)?a.push(...Rt(n.from??{},n.to??{},[o])):a.push(n)}return a}const Po=new Set(["sections"]);function Vn(t,e,s=!1){const a=t?jn(t,s):[],n=e?jn(e,s):[],o=[],d=Math.max(a.length,n.length);for(let i=0;i<d;i++){const u=a[i],c=n[i];if(!s){const h=So(u,c,i);h&&o.push(h);continue}if(u&&c){if(un(u.section,c.section))continue;o.push(bn(c.section,i,"edited",Rt(u.section,c.section,c.basePath),u.section))}else c?o.push(bn(c.section,i,"new",[])):u&&o.push(bn(u.section,i,"removed",[]))}const l=Rt(t,e,[],Po);return l.length>0&&o.push({name:"Page settings",kind:"settings",status:"edited",fields:l}),o}function So(t,e,s){return t&&e?un(t.section,e.section)?null:{name:fs(e.section,s),kind:"section",status:"edited",fields:Rt(t.section,e.section,e.basePath)}:e?{name:fs(e.section,s),kind:"section",status:"new",fields:[]}:t?{name:fs(t.section,s),kind:"section",status:"removed",fields:[]}:null}function wn(t,e){return{kind:"other",blockKey:null,name:t.split("/").pop()??t,pagePath:null,isSiteApp:!1,status:e,filepaths:[t],sections:[],fromJson:null,toJson:null}}function ko(t){const e=[],s=[],a=[],n=[];for(const[o,d]of Object.entries(t?.diffs??{})){if(Mn(o)){n.push(o);continue}const l=vo(d.from,d.to),i=qn(o);if(!i){a.push(wn(o,l));continue}const u=en(d.from),c=en(d.to),h=c??u;if(!h){a.push(wn(o,l));continue}const p=hs(i,h);if(p){e.push({kind:"page",blockKey:i,name:p.name,pagePath:p.path,isSiteApp:!1,status:l,filepaths:[o],sections:l==="edited"?Vn(u,c).map(f=>({...f,fields:bs(f.fields)})):[],fromJson:Fe(u),toJson:Fe(c)});continue}const b=Fn(i,h);s.push({kind:"block",blockKey:i,name:Ys(i,h),pagePath:null,isSiteApp:b,status:l,filepaths:[o],sections:l==="edited"?[{name:Ys(i,h),kind:"section",status:"edited",fields:bs(Rt(u,c,[]))}].filter(f=>f.fields.length>0):[],fromJson:Fe(u),toJson:Fe(c)})}return Sa({pages:e,blocks:s,other:a,generated:n})}function gn(t,e){return(t.filepaths[0]??"").localeCompare(e.filepaths[0]??"")}function Sa(t){const{pages:e,blocks:s,other:a,generated:n}=t;return e.sort(gn),s.sort(gn),a.sort(gn),{pages:e,blocks:s,other:a,generated:n,count:e.length+s.length+a.length}}function No(t){return t==="added"?"new":t==="removed"?"removed":"edited"}function ka(t){return t.startsWith("pages-")}function Na(t){const{files:e,lookup:s,diff:a}=t,n=[],o=[],d=[],l=[];for(const i of e){const u=i.path;if(Mn(u)){l.push(u);continue}const c=No(i.status),h=qn(u);if(!h){d.push(wn(u,c));continue}const p=a?.diffs[u],b=en(p?.from??null),f=en(p?.to??null),m=Ca(s,h),g=m??f??b;if((m?hs(h,m):null)??(!m&&ka(h))){const w=g?hs(h,g):null;n.push({kind:"page",blockKey:h,name:w?.name??ua(h),pagePath:w?.path??null,isSiteApp:!1,status:c,filepaths:[u],sections:c==="edited"?Vn(b,f).map(x=>({...x,fields:bs(x.fields)})):[],fromJson:Fe(b),toJson:Fe(f??(c==="new"?m:null))});continue}const j=Ys(h,g??{});o.push({kind:"block",blockKey:h,name:j,pagePath:null,isSiteApp:Fn(h,m??{}),status:c,filepaths:[u],sections:c==="edited"?[{name:j,kind:"section",status:"edited",fields:bs(Rt(b,f,[]))}].filter(w=>w.fields.length>0):[],fromJson:Fe(b),toJson:Fe(f)})}return Sa({pages:n,blocks:o,other:d,generated:l})}function Ca(t,e){const s=t?.[e];return s&&typeof s=="object"&&!Array.isArray(s)?s:null}function Co(t,e){return t??e}function Aa(t){return t.length<=1?t[0]??"":`${t.slice(0,-1).join(", ")} and ${t[t.length-1]}`}const xn=3;function zs(t){if(t.length<=xn)return Aa(t);const e=t.length-xn;return`${t.slice(0,xn).join(", ")} and ${e} more`}function Ao(t,e){if(!e){const a=t.sections.filter(n=>n.kind==="section").map(n=>n.name).slice(0,3);return a.length>0?`${t.name} (${a.join(", ")})`:t.name}const s=[...new Set(t.sections.filter(a=>a.kind==="section").flatMap(a=>a.wrapper?a.held??[]:[a.name]))].slice(0,3);return s.length>0?`${t.name} (${s.join(", ")})`:t.name}function Ro(t){const e=ja(t);return e==="experiments"?"A/B tests":e==="campaigns"?"Campaign dates":t.name}function Do(t){const e=[],s=t.pages.filter(l=>l.status==="edited"),a=t.pages.filter(l=>l.status==="new"),n=t.pages.filter(l=>l.status==="removed");if(s.length>0&&e.push(`updated ${zs(s.map(l=>Ao(l,!!t.v8)))}`),a.length>0){const l=a.length===1?"page":"pages";e.push(`added the ${zs(a.map(i=>i.name))} ${l}`)}if(n.length>0){const l=n.length===1?"page":"pages";e.push(`removed the ${zs(n.map(i=>i.name))} ${l}`)}const o=t.blocks.map(Ro);if(o.length>0&&e.push(`changed ${zs(o)}`),t.other.length>0){const l=t.other.length===1?"file":"files";e.push(`changed ${t.other.length} ${l}`)}if(e.length===0)return"";const d=Aa(e);return ai(d.charAt(0).toUpperCase()+d.slice(1))}function To(t,e){return t?jn(t,e).length:0}function Bo(t,e=!1){const s={newPageSections:t.kind==="page"&&t.status==="new"?To(t.toJson,e):null,sections:0,settings:!1,fields:0};if(s.newPageSections!==null)return s;for(const a of t.sections){if(a.kind==="settings"){s.settings=!0;continue}t.kind==="page"?s.sections+=1:s.fields+=a.fields.length}return s}const ur="••••••";function Fe(t){if(Array.isArray(t))return t.map(Fe);if(!t||typeof t!="object")return t;const e=t,s={};for(const[a,n]of Object.entries(e))s[a]=Fe(n);return e.__resolveType===ya&&"ciphertext"in e&&(s.ciphertext=ur),kr(e)&&"encrypted"in e&&(s.encrypted=ur),s}function Io(t){const e=t.toJson??t.fromJson;return!!e&&(e.__resolveType===ya||kr(e))}function bs(t){return t.map(e=>({...e,from:Fe(e.from),to:Fe(e.to)}))}function $o(t){const{changes:e,sides:s,lookup:a,meta:n,hosted:o}=t,d=[],l=[],i=c=>[...new Set((s?.diagnostics??[]).filter(h=>Zn(Ya(h.file))===Zn(c)).map(h=>h.side))],u=Object.keys(e).sort((c,h)=>c<h?-1:c>h?1:0);for(const c of u){const h=e[c],p=h.kind==="delete"?"removed":h.baseVersion===null?"new":"edited",b=s?.entries[c],f=b?.before??null,m=b?.after??null,g=Ca(a,c),v=g??m??f,j=i(c),w={blockKey:c,status:p,filepaths:[],entry:{name:c,version:h.version},...j.length>0?{unreadable:j}:{},fromJson:Fe(f),toJson:Fe(m??(p==="new"?g:null))},x=g?hs(c,g,n):null,P=!g&&v?hs(c,v,n):null;if(x??P??(!v&&ka(c))){const S=v?hs(c,v,n):null;d.push({...w,kind:"page",name:S?.name??ua(c),pagePath:S?.path??null,isSiteApp:!1,sections:p==="edited"?Vn(f,m,!0).map(D=>({...D,fields:bs(D.fields)})):[]});continue}const y=o?Ql(c,v,g,m,f):null,N=y?Yl(y,[v,g,m,f]):Ys(c,v??{}),C=go(c,[g,m,f]),A=jo(c,[g,m,f]);l.push({...w,kind:"block",name:A?"Settings":N,...A?{cmsSettings:!0}:{},...y?{blogKind:y}:{},...C?{namedRule:C}:{},pagePath:null,isSiteApp:Fn(c,g??v??{}),sections:p==="edited"?[{name:A?"Settings":N,kind:"section",status:"edited",fields:bs(A?wo(f,m):Rt(f,m,[]))}].filter(S=>S.fields.length>0):[]})}return{pages:d,blocks:l,other:[],generated:[],count:d.length+l.length,v8:!0}}function Ae(t){return t.filepaths[0]??t.blockKey??t.name}function Fo(t,e){return e(t==="new"?"thread.publishPopover.chipNew":t==="removed"?"thread.publishPopover.chipRemoved":"thread.publishPopover.chipEdited")}function Lo(t,e){const s=t.kind==="block"?mi:Wr;return r.jsx("span",{title:Fo(t.status,e),className:"flex shrink-0",children:r.jsx(s,{className:H("size-4",t.status==="new"&&"text-brand",t.status==="edited"&&"text-warning",t.status==="removed"&&"text-destructive")})})}function Oo(t,e){if(t.kind==="page")return t.pagePath;if(t.kind!=="block")return null;if(t.blogKind)return ei(t.blogKind,e);if(t.cmsSettings)return e("thread.publishPopover.settingsDetail");const s=ja(t);return s==="experiments"?e("thread.publishPopover.abTests"):s==="campaigns"?e("thread.publishPopover.campaignDates"):t.isSiteApp?e("thread.publishPopover.siteConfiguration"):e("thread.publishPopover.globalSection")}function Mo(t,e,s){const a=Bo(t,s);if(a.newPageSections!==null)return[a.newPageSections===1?e("thread.publishPopover.newPageSectionOne"):e("thread.publishPopover.newPageSections",{count:a.newPageSections})];const n=[];return a.sections===1?n.push(e("thread.publishPopover.sectionChangedOne")):a.sections>1&&n.push(e("thread.publishPopover.sectionsChanged",{count:a.sections})),a.fields===1?n.push(e("thread.publishPopover.fieldChangedOne")):a.fields>1&&n.push(e("thread.publishPopover.fieldsChanged",{count:a.fields})),a.settings&&n.push(e("thread.publishPopover.pageSettingsChanged")),n}function Ra(t){const e=$.c(46),{change:s,bodyPending:a,selected:n,onSelect:o,confirming:d,onConfirmingChange:l,onDiscard:i,isPublishing:u,isDiscarding:c,v8:h}=t,p=a===void 0?!1:a,b=h===void 0?!1:h,f=xe();let m;e[0]!==s||e[1]!==f?(m=Oo(s,f),e[0]=s,e[1]=f,e[2]=m):m=e[2];const g=m;let v;if(e[3]!==p||e[4]!==s||e[5]!==d||e[6]!==g||e[7]!==c||e[8]!==u||e[9]!==l||e[10]!==i||e[11]!==o||e[12]!==n||e[13]!==f||e[14]!==b){const j=Mo(s,f,b),w=p&&j.length===0&&s.status==="edited",x=n&&"border-foreground/30 bg-accent hover:bg-secondary-hover";let P;e[16]!==x?(P=H("cursor-pointer transition-colors hover:bg-accent",x),e[16]=x,e[17]=P):P=e[17];let y;e[18]!==s?(y=Ae(s),e[18]=s,e[19]=y):y=e[19];let N;e[20]!==s||e[21]!==f?(N=Lo(s,f),e[20]=s,e[21]=f,e[22]=N):N=e[22];let C;e[23]!==s.cmsSettings||e[24]!==s.name||e[25]!==f?(C=s.cmsSettings?f("thread.publishPopover.settings"):s.name,e[23]=s.cmsSettings,e[24]=s.name,e[25]=f,e[26]=C):C=e[26];let A;e[27]!==C?(A=r.jsx("span",{className:"truncate text-sm font-medium",children:C}),e[27]=C,e[28]=A):A=e[28];let S;e[29]!==g?(S=g?r.jsx("span",{className:"truncate text-xs text-muted-foreground",children:g}):null,e[29]=g,e[30]=S):S=e[30];let D;e[31]!==n||e[32]!==A||e[33]!==S?(D=r.jsxs("button",{type:"button",className:"flex min-w-0 flex-1 items-center gap-2 text-left","aria-pressed":n,children:[A,S]}),e[31]=n,e[32]=A,e[33]=S,e[34]=D):D=e[34];let k;e[35]!==d||e[36]!==c||e[37]!==u||e[38]!==l||e[39]!==i||e[40]!==f?(k=d?r.jsxs("div",{className:"flex shrink-0 items-center gap-1.5",children:[r.jsx("button",{type:"button",className:"text-xs text-muted-foreground hover:text-foreground",onClick:I=>{I.stopPropagation(),l(!1)},children:f("thread.publishDialog.cancel")}),r.jsx("button",{type:"button",className:"text-xs font-medium text-destructive disabled:opacity-50",onClick:I=>{I.stopPropagation(),l(!1),i?.()},disabled:c,children:f("thread.publishPopover.discard")})]}):i?r.jsx(an,{children:r.jsxs(lt,{children:[r.jsx(it,{asChild:!0,children:r.jsx(ge,{type:"button",variant:"ghost-destructive",size:"icon-xs","aria-label":f("thread.publishPopover.discard"),className:"shrink-0 disabled:pointer-events-auto",onClick:I=>{I.stopPropagation(),l(!0)},disabled:u||c,children:r.jsx(on,{className:"size-3.5"})})}),r.jsx(ot,{children:f("thread.publishPopover.discard")})]})}):null,e[35]=d,e[36]=c,e[37]=u,e[38]=l,e[39]=i,e[40]=f,e[41]=k):k=e[41];let O;e[42]!==D||e[43]!==k||e[44]!==N?(O=r.jsxs("div",{className:"flex items-center gap-2.5",children:[N,D,k]}),e[42]=D,e[43]=k,e[44]=N,e[45]=O):O=e[45],v=r.jsxs(va,{className:P,"data-change-id":y,onClick:o,children:[O,j.length>0?r.jsx("div",{className:"mt-1 space-y-0.5 pl-[26px] text-xs text-muted-foreground",children:j.map(_o)}):w?r.jsx("div",{className:"mt-1 space-y-0.5 pl-[26px]",children:r.jsx(Qe,{className:"h-4 w-2/3"})}):null]}),e[3]=p,e[4]=s,e[5]=d,e[6]=g,e[7]=c,e[8]=u,e[9]=l,e[10]=i,e[11]=o,e[12]=n,e[13]=f,e[14]=b,e[15]=v}else v=e[15];return v}function _o(t,e){return r.jsx("div",{className:"truncate",children:t},`${e}-${t}`)}function Da(){const t=$.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={width:-1,height:-1},t[0]=e):e=t[0];const[s,a]=U.useState(e);let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=l=>{if(!l)return;const i=()=>a(c=>c.width===l.clientWidth&&c.height===l.clientHeight?c:{width:l.clientWidth,height:l.clientHeight});i();const u=new ResizeObserver(i);return u.observe(l),()=>u.disconnect()},t[1]=n):n=t[1];const o=n;let d;return t[2]!==s?(d=[s,o],t[2]=s,t[3]=d):d=t[3],d}function Eo(){return document.documentElement.classList.contains("dark")?"vs-dark":"vs"}const zo=[{width:"w-3/4",tone:"ctx"},{width:"w-1/2",tone:"del"},{width:"w-3/5",tone:"add"},{width:"w-2/5",tone:"ctx"},{width:"w-4/5",tone:"add"},{width:"w-1/2",tone:"ctx"}];function hr(t){const e=$.c(10),{height:s}=t,a=xe();let n;e[0]!==s?(n={height:s},e[0]=s,e[1]=n):n=e[1];let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=zo.map(Uo),e[2]=o):o=e[2];let d;e[3]!==a?(d=a("thread.publishDialog.openingComparison"),e[3]=a,e[4]=d):d=e[4];let l;e[5]!==d?(l=r.jsx("div",{className:"flex items-center justify-center pt-1 text-2xs text-muted-foreground",children:d}),e[5]=d,e[6]=l):l=e[6];let i;return e[7]!==n||e[8]!==l?(i=r.jsxs("div",{style:n,className:"flex w-full flex-col gap-1.5 overflow-hidden px-3 py-2",children:[o,l]}),e[7]=n,e[8]=l,e[9]=i):i=e[9],i}function Uo(t,e){return r.jsxs("div",{className:H("flex items-center gap-2 rounded px-1 py-0.5",t.tone==="del"&&"bg-destructive/5",t.tone==="add"&&"bg-success/5"),children:[r.jsx("div",{className:H("h-2 w-4 shrink-0 animate-pulse rounded-sm bg-muted",t.tone==="del"&&"bg-destructive/20",t.tone==="add"&&"bg-success/25")}),r.jsx("div",{className:H("h-2 animate-pulse rounded-sm bg-muted",t.width,t.tone==="del"&&"bg-destructive/20",t.tone==="add"&&"bg-success/25")})]},e)}const Ta={readOnly:!0,renderSideBySide:!1,minimap:{enabled:!1},scrollBeyondLastLine:!1,fontSize:12},Ko={...Ta,lineNumbersMinChars:3,lineDecorationsWidth:4,folding:!1,glyphMargin:!1,renderOverviewRuler:!1};function qo(t){const e=$.c(11),{diff:s,emptyMessage:a,rowClassName:n,onDiscardFile:o,hideFileRows:d,editorHeight:l}=t,i=a===void 0?"No file changes in the working tree":a,u=n===void 0?"px-6":n,c=d===void 0?!1:d,h=l===void 0?"380px":l,[p,b]=U.useState(null),[f,m]=U.useState(null);let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g=Eo(),e[0]=g):g=e[0];const v=g;if(!s||Object.keys(s.diffs).length===0){let w;return e[1]!==i?(w=r.jsx("div",{className:"flex items-center justify-center py-10 text-sm text-muted-foreground",children:i}),e[1]=i,e[2]=w):w=e[2],w}let j;return e[3]!==s.diffs||e[4]!==f||e[5]!==h||e[6]!==p||e[7]!==c||e[8]!==o||e[9]!==u?(j=r.jsx("div",{className:"divide-y",children:Object.entries(s.diffs).map(w=>{const[x,P]=w,{from:y,to:N}=P,C=p===x,A=y===null,S=N===null,D=x.startsWith("/")?x.slice(1):x,k=D.lastIndexOf("/"),O=k>=0?D.slice(k+1):D,I=k>=0?D.slice(0,k):null,B=Ai(x),F=A?"bg-success":S?"bg-destructive":"bg-warning";return c?r.jsx("div",{children:r.jsx(rr,{original:y??"",modified:N??"",language:B,theme:v,height:h,loading:r.jsx(hr,{height:h}),options:Ko})},x):r.jsxs("div",{children:[r.jsxs("div",{className:H("flex items-center gap-3 py-3 hover:bg-accent",u),children:[r.jsx("button",{type:"button",className:"flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground transition-transform hover:text-foreground",onClick:()=>b(C?null:x),children:r.jsx(Pr,{className:H("h-3.5 w-3.5 transition-transform",C&&"rotate-90")})}),r.jsx("div",{className:H("h-2.5 w-2.5 shrink-0 rounded-full",F)}),r.jsx(Wr,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),r.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:O}),I&&r.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:I}),o?r.jsxs(nn,{children:[r.jsx(tn,{asChild:!0,children:r.jsx("button",{type:"button",className:"flex h-6 w-6 shrink-0 items-center justify-center text-muted-foreground hover:bg-accent hover:text-foreground rounded-lg",children:r.jsx(Xa,{className:"h-3.5 w-3.5"})})}),r.jsx(sn,{align:"end",children:r.jsx(ms,{className:"text-destructive focus:text-destructive",onSelect:()=>m(x),children:"Discard changes"})})]}):null]}),f===x&&o?r.jsxs("div",{className:H("flex items-center justify-between gap-3 border-t bg-destructive/5 py-2.5",u),children:[r.jsxs("span",{className:"text-xs text-destructive",children:["Discard all changes to"," ",r.jsx("span",{className:"font-medium",children:O}),"? This cannot be undone."]}),r.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[r.jsx(ge,{type:"button",variant:"ghost",size:"sm",onClick:()=>m(null),children:"Cancel"}),r.jsx(ge,{type:"button",variant:"destructive",size:"sm",onClick:()=>{m(null),o(x)},children:"Discard"})]})]}):null,C&&r.jsx("div",{className:"border-t",children:r.jsx(rr,{original:y??"",modified:N??"",language:B,theme:v,height:h,loading:r.jsx(hr,{height:h}),options:Ta})})]},x)})}),e[3]=s.diffs,e[4]=f,e[5]=h,e[6]=p,e[7]=c,e[8]=o,e[9]=u,e[10]=j):j=e[10],j}function Ho(t){if(t.kind!=="block"||t.isSiteApp||!t.blockKey)return null;const e=(t.toJson??t.fromJson)?.__resolveType;return typeof e=="string"&&Di(e)?t.blockKey:null}function Vo(t){return t.kind!=="page"?!0:!t.pagePath||At(t.pagePath).length>0}function Go(t,e){try{return cl(t,si,e)}catch{return null}}function Wo(t,e,s){if(!e)return;const a=ti(e,t);if(!a)return null;if(At(a.path).length===0||s?.path!==a.path)return a.path;const n=Ln(a.path,s.params);return At(n).length===0?n:a.path}function Jo(t){return t.sectionKey&&!t.v8?Go(t.previewServerUrl,t.sectionKey):Yo(t.previewServerUrl,t.path)}function Qo(t,e){if(t.kind!=="page")return"/";const s=t.pagePath;if(!s)return"";if(At(s).length===0)return s;if(e?.path!==s)return"";const a=Ln(s,e.params);return At(a).length===0?a:""}function Yo(t,e){const s=e.trim();if(!s||At(s).length>0)return null;try{const a=new URL(t),n=new URL(s.startsWith("/")?s:`/${s}`,a);return n.origin===a.origin?n:null}catch{return null}}function Xo(t,e){return e?.kind==="pointer"&&e.link?Dn(t.toString(),e.link):Ba(t,e)}function Ba(t,e){if(!e)return null;if(e.kind==="pointer")return Dn(t.toString(),e.pointer);try{return new URL(`${t.pathname}${t.search}`,e.previewUrl).href}catch{return null}}function Zo(t,e,s){return e===null?!1:t!=="other"||s?.kind==="sandbox"}function ec(t,e){const s=e?t.kind==="page":t.kind!=="other";return{before:s&&t.status==="new"?"new":null,after:s&&t.status==="removed"?"removed":null}}const Ia=U.createContext(!0),tc=["split","before","after","code"];function sc(t){return tc.includes(t)}const $a={desktop:1280,mobile:412};function nc(t,e){const s=(o,d)=>t.unreadable?.includes(d)?e:o?`${JSON.stringify(o,null,2)}
|
|
2
2
|
`:null,a=t.status==="new"?null:s(t.fromJson,"before"),n=t.status==="removed"?null:s(t.toJson,"after");return a===null&&n===null?{diffs:{}}:t.status==="edited"&&(a===null||n===null)?{diffs:{}}:{diffs:{[tl(t.entry.name)]:{from:a,to:n}}}}function rc(t,e){return{from:t.fromJson?`${JSON.stringify(t.fromJson,null,2)}
|
|
3
3
|
`:e.from,to:t.toJson?`${JSON.stringify(t.toJson,null,2)}
|
|
4
4
|
`:e.to}}function Fa(t){const e=$.c(79),{change:s,diff:a,bodyPending:n,previewServerUrl:o,draft:d,lastPage:l,v8:i,onReady:u}=t,c=xe(),h=U.use(Ia),p=Ho(s),b=i?null:p,f=i?p:null,m=f?Wo(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?Jo({previewServerUrl:o,sectionKey:p,path:A,v8:!!i}):null,O=k?Dn(k.toString(),dl):null,I=k?Ba(k,d):null,B=k?Xo(k,d):null;let F;e[2]!==s?(F=Io(s),e[2]=s,e[3]=F):F=e[3];const L=F;let V;e[4]!==s||e[5]!==a?.diffs||e[6]!==L||e[7]!==c?(V=s.entry?nc(s,c("thread.publishCompare.sideUnreadable")):{diffs:Object.fromEntries(s.filepaths.flatMap(Q=>{const oe=a?.diffs[Q];return oe?[[Q,L?rc(s,oe):oe]]:[]}))},e[4]=s,e[5]=a?.diffs,e[6]=L,e[7]=c,e[8]=V):V=e[8];const z=V;let te;e[9]!==z.diffs?(te=Object.keys(z.diffs),e[9]=z.diffs,e[10]=te):te=e[10];const M=te.length>0;let K;e:{if(b!==null){K=null;break e}if(f!==null){const oe=A.trim();if(!oe){K=null;break e}K=At(oe).length>0?c("thread.publishCompare.dynamicHint",{template:oe}):c("thread.publishCompare.blockHint",{path:oe});break e}if(s.kind!=="page"){let oe;e[11]!==c?(oe=c("thread.publishCompare.globalHint"),e[11]=c,e[12]=oe):oe=e[12],K=oe;break e}let Q;e[13]!==s.pagePath||e[14]!==c?(Q=s.pagePath&&At(s.pagePath).length>0?c("thread.publishCompare.dynamicHint",{template:s.pagePath}):null,e[13]=s.pagePath,e[14]=c,e[15]=Q):Q=e[15],K=Q}const W=K,se=ec(s,!!i),[J,ue]=U.useState(ac);let X;e[16]===Symbol.for("react.memo_cache_sentinel")?(X=Q=>ue(oe=>oe.has(Q)?oe:new Set(oe).add(Q)),e[16]=X):X=e[16];const le=X;let T;e[17]!==i?(T=Q=>i?r.jsx(oc,{...Q,onLoaded:le}):r.jsx(ic,{...Q}),e[17]=i,e[18]=T):T=e[18];const ee=T,ne=(v?[se.before==="new"?null:O,se.after==="removed"?null:I].flatMap(Q=>Q?[Kn(Q,P)]:[]):[]).every(Q=>J.has(Q));let re;e[19]!==u||e[20]!==ne?(re=ne&&u?Q=>{Q&&u()}:void 0,e[19]=u,e[20]=ne,e[21]=re):re=e[21];const Se=re,he=se.before==="new"?r.jsx(Us,{icon:r.jsx(Xr,{className:"size-5 text-brand"}),title:c("thread.publishCompare.newTitle"),description:c("thread.publishCompare.newDescription")}):ee({url:O,device:P,title:c("thread.publishCompare.before"),missing:c("thread.publishCompare.enterPath")}),be=se.after==="removed"?r.jsx(Us,{icon:r.jsx(on,{className:"size-5 text-destructive"}),title:c("thread.publishCompare.removedTitle"),description:c("thread.publishCompare.removedDescription")}):ee({url:I,device:P,title:c("thread.publishCompare.after"),missing:c(k?"thread.publishCompare.draftUnavailable":"thread.publishCompare.enterPath")});let ce;e[22]!==v||e[23]!==w||e[24]!==h||e[25]!==c||e[26]!==x?(ce=v||h?r.jsx(Hr,{value:x,onValueChange:Q=>{sc(Q)&&w(Q)},children:r.jsxs(qr,{className:"h-8 w-auto",variant:"pill",children:[v?r.jsxs(r.Fragment,{children:[r.jsx(Lt,{value:"split",className:"px-3 text-xs",children:c("thread.publishCompare.sideBySide")}),r.jsx(Lt,{value:"before",className:"px-3 text-xs",children:c("thread.publishCompare.before")}),r.jsx(Lt,{value:"after",className:"px-3 text-xs",children:c("thread.publishCompare.after")})]}):null,h?r.jsx(Lt,{value:"code",className:"px-3 text-xs",children:c("thread.publishCompare.code")}):null]})}):null,e[22]=v,e[23]=w,e[24]=h,e[25]=c,e[26]=x,e[27]=ce):ce=e[27];let ie;e[28]!==B||e[29]!==v||e[30]!==s.pagePath||e[31]!==P||e[32]!==A||e[33]!==D||e[34]!==b||e[35]!==y||e[36]!==C||e[37]!==c||e[38]!==x?(ie=v&&x!=="code"?r.jsxs(r.Fragment,{children:[b?null:D?r.jsx(Za,{value:A,onChange:Q=>C(Q.target.value),placeholder:s.pagePath??"/","aria-label":c("thread.publishCompare.pathLabel"),className:"h-8 w-56 font-mono text-xs"}):r.jsx("span",{className:"max-w-56 truncate px-1 font-mono text-xs text-muted-foreground",children:A}),r.jsxs("div",{className:"flex items-center rounded-lg border p-0.5",children:[r.jsx(fr,{active:P==="desktop",label:c("thread.publishCompare.desktop"),onClick:()=>y("desktop"),children:r.jsx(Ri,{className:"size-3.5"})}),r.jsx(fr,{active:P==="mobile",label:c("thread.publishCompare.mobile"),onClick:()=>y("mobile"),children:r.jsx(Sl,{className:"size-3.5"})})]}),B?r.jsxs("a",{href:B,target:"_blank",rel:"noopener noreferrer",className:"ml-auto flex items-center gap-1.5 text-xs text-muted-foreground transition-colors hover:text-foreground",children:[r.jsx(el,{className:"size-3.5"}),c("thread.publishCompare.openDraft")]}):null]}):null,e[28]=B,e[29]=v,e[30]=s.pagePath,e[31]=P,e[32]=A,e[33]=D,e[34]=b,e[35]=y,e[36]=C,e[37]=c,e[38]=x,e[39]=ie):ie=e[39];let E;e[40]!==ie||e[41]!==ce?(E=r.jsxs("div",{className:"flex flex-wrap items-center gap-2 border-b bg-background px-4 py-2.5 max-md:pr-12",children:[ce,ie]}),e[40]=ie,e[41]=ce,e[42]=E):E=e[42];let fe;e[43]!==v||e[44]!==W||e[45]!==x?(fe=W&&v&&x!=="code"?r.jsx("p",{className:"border-b bg-background px-4 py-1.5 text-2xs text-muted-foreground",children:W}):null,e[43]=v,e[44]=W,e[45]=x,e[46]=fe):fe=e[46];let ke;e[47]!==g||e[48]!==h||e[49]!==c?(ke=g&&h?r.jsx("p",{className:"border-b bg-background px-4 py-1.5 text-2xs text-muted-foreground",children:c("thread.publishCompare.notOnAnyPage")}):null,e[47]=g,e[48]=h,e[49]=c,e[50]=ke):ke=e[50];let me;e[51]!==o||e[52]!==h||e[53]!==c||e[54]!==f||e[55]!==m||e[56]!==x?(me=x==="code"&&!h?f!==null&&m===void 0?r.jsx(Qe,{className:"m-4 h-64 rounded"}):o===null?r.jsx(Us,{icon:r.jsx(Xs,{className:"size-5 text-muted-foreground"}),title:c("thread.publishCompare.previewNotReadyTitle"),description:c("thread.publishCompare.draftUnavailable")}):r.jsx(Us,{icon:r.jsx(Xs,{className:"size-5 text-muted-foreground"}),title:c("thread.publishCompare.noPreviewTitle"),description:c("thread.publishCompare.noPreviewDescription")}):null,e[51]=o,e[52]=h,e[53]=c,e[54]=f,e[55]=m,e[56]=x,e[57]=me):me=e[57];let Y;e[58]!==n||e[59]!==M||e[60]!==z||e[61]!==h||e[62]!==c||e[63]!==x?(Y=x==="code"&&h?r.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto bg-background [scrollbar-width:thin]",children:M?r.jsx(qo,{diff:z,hideFileRows:!0,editorHeight:"70vh"}):n?r.jsx(Qe,{className:"m-4 h-64 rounded"}):r.jsx("p",{className:"px-4 py-6 text-xs text-muted-foreground",children:c("thread.publishPopover.detailsUnavailable")})}):null,e[58]=n,e[59]=M,e[60]=z,e[61]=h,e[62]=c,e[63]=x,e[64]=Y):Y=e[64];let Z;e[65]!==be||e[66]!==he||e[67]!==v||e[68]!==c||e[69]!==x?(Z=v?r.jsxs("div",{className:H("flex min-h-0 flex-1 gap-3 p-3",x==="code"&&"hidden"),children:[r.jsx(mr,{label:c("thread.publishCompare.before"),hidden:x==="after",children:he}),r.jsx(mr,{label:c("thread.publishCompare.after"),highlight:!0,hidden:x==="before",children:be})]}):null,e[65]=be,e[66]=he,e[67]=v,e[68]=c,e[69]=x,e[70]=Z):Z=e[70];let Be;return e[71]!==Se||e[72]!==E||e[73]!==fe||e[74]!==ke||e[75]!==me||e[76]!==Y||e[77]!==Z?(Be=r.jsxs("div",{ref:Se,className:"flex min-h-0 min-w-0 flex-1 flex-col bg-muted/40",children:[E,fe,ke,me,Y,Z]}),e[71]=Se,e[72]=E,e[73]=fe,e[74]=ke,e[75]=me,e[76]=Y,e[77]=Z,e[78]=Be):Be=e[78],Be}function ac(){return new Set}function fr(t){const e=$.c(8),{active:s,label:a,onClick:n,children:o}=t,d=s&&"bg-accent text-foreground";let l;e[0]!==d?(l=H("flex size-7 items-center justify-center rounded-md text-muted-foreground transition-colors hover:text-foreground",d),e[0]=d,e[1]=l):l=e[1];let i;return e[2]!==s||e[3]!==o||e[4]!==a||e[5]!==n||e[6]!==l?(i=r.jsx("button",{type:"button","aria-label":a,"aria-pressed":s,title:a,onClick:n,className:l,children:o}),e[2]=s,e[3]=o,e[4]=a,e[5]=n,e[6]=l,e[7]=i):i=e[7],i}function mr(t){const e=$.c(18),{label:s,highlight:a,hidden:n,children:o}=t,d=a===void 0?!1:a,i=(n===void 0?!1:n)&&"hidden";let u;e[0]!==i?(u=H("flex min-h-0 min-w-0 flex-1 flex-col gap-1.5",i),e[0]=i,e[1]=u):u=e[1];const c=d&&"bg-brand";let h;e[2]!==c?(h=H("size-1.5 rounded-full bg-muted-foreground/50",c),e[2]=c,e[3]=h):h=e[3];let p;e[4]!==h?(p=r.jsx("span",{className:h}),e[4]=h,e[5]=p):p=e[5];let b;e[6]!==s||e[7]!==p?(b=r.jsxs("div",{className:"flex items-center gap-1.5 px-0.5 text-2xs font-medium text-muted-foreground",children:[p,s]}),e[6]=s,e[7]=p,e[8]=b):b=e[8];const f=d&&"border-brand/60";let m;e[9]!==f?(m=H("relative min-h-0 flex-1 overflow-hidden rounded-lg border bg-background",f),e[9]=f,e[10]=m):m=e[10];let g;e[11]!==o||e[12]!==m?(g=r.jsx("div",{className:m,children:o}),e[11]=o,e[12]=m,e[13]=g):g=e[13];let v;return e[14]!==g||e[15]!==u||e[16]!==b?(v=r.jsxs("div",{className:u,children:[b,g]}),e[14]=g,e[15]=u,e[16]=b,e[17]=v):v=e[17],v}function Us(t){const e=$.c(10),{icon:s,title:a,description:n}=t;let o;e[0]!==s?(o=r.jsx("div",{className:"mb-1",children:s}),e[0]=s,e[1]=o):o=e[1];let d;e[2]!==a?(d=r.jsx("p",{className:"text-sm font-medium",children:a}),e[2]=a,e[3]=d):d=e[3];let l;e[4]!==n?(l=r.jsx("p",{className:"text-xs text-muted-foreground",children:n}),e[4]=n,e[5]=l):l=e[5];let i;return e[6]!==o||e[7]!==d||e[8]!==l?(i=r.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-1 px-6 text-center",children:[o,d,l]}),e[6]=o,e[7]=d,e[8]=l,e[9]=i):i=e[9],i}function lc(t,e){if(!t)return{visibility:"hidden",width:e};const s=Math.min(t.width/e,1);return{left:Math.max((t.width-e*s)/2,0),width:e,height:t.height/s,transform:`scale(${s})`,transformOrigin:"top left"}}function ic(t){const e=$.c(24),{url:s,device:a,title:n,missing:o}=t,[d,l]=Da(),[i,u]=U.useState(null);if(!s){let y;return e[0]!==o?(y=r.jsx("p",{className:"flex h-full items-center justify-center px-6 text-center text-xs text-muted-foreground",children:o}),e[0]=o,e[1]=y):y=e[1],y}let c;e[2]!==a||e[3]!==s?(c=Kn(s,a),e[2]=a,e[3]=s,e[4]=c):c=e[4];const h=c,p=$a[a],b=d.width>0?Math.min(d.width/p,1):1,f=d.width>0?Math.max((d.width-p*b)/2,0):0;let m;e[5]!==h?(m=()=>u(h),e[5]=h,e[6]=m):m=e[6];const g=d.height>0?d.height/b:"100%",v=`scale(${b})`;let j;e[7]!==p||e[8]!==f||e[9]!==g||e[10]!==v?(j={left:f,width:p,height:g,transform:v,transformOrigin:"top left"},e[7]=p,e[8]=f,e[9]=g,e[10]=v,e[11]=j):j=e[11];let w;e[12]!==h||e[13]!==m||e[14]!==j||e[15]!==n?(w=r.jsx("iframe",{src:h,title:n,sandbox:"allow-scripts allow-same-origin",onLoad:m,className:"absolute top-0 border-0 bg-white",style:j},h),e[12]=h,e[13]=m,e[14]=j,e[15]=n,e[16]=w):w=e[16];let x;e[17]!==i||e[18]!==h?(x=i!==h?r.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background/60",children:r.jsx(ps,{className:"size-5 motion-reduce:animate-none"})}):null,e[17]=i,e[18]=h,e[19]=x):x=e[19];let P;return e[20]!==l||e[21]!==w||e[22]!==x?(P=r.jsxs("div",{ref:l,className:"absolute inset-0",children:[w,x]}),e[20]=l,e[21]=w,e[22]=x,e[23]=P):P=e[23],P}function oc(t){const e=$.c(21),{url:s,device:a,title:n,missing:o,onLoaded:d}=t,[l,i]=Da(),[u,c]=U.useState(null),[h,p]=U.useState(null),b=l.width>0&&l.height>0;b&&(u?.width!==l.width||u?.height!==l.height)&&c(l);const f=b?l:u;if(!s){let P;return e[0]!==o?(P=r.jsx("p",{className:"flex h-full items-center justify-center px-6 text-center text-xs text-muted-foreground",children:o}),e[0]=o,e[1]=P):P=e[1],P}let m,g,v,j;if(e[2]!==f||e[3]!==a||e[4]!==d||e[5]!==i||e[6]!==h||e[7]!==n||e[8]!==s){const P=Kn(s,a),y=$a[a];m=h?.src!==P;const N=[...h&&m?[h]:[],{src:P,logicalWidth:y}];g=i,v="absolute inset-0",j=N.map(C=>{const A=C.src===P&&m;return r.jsx("iframe",{src:C.src,title:n,"aria-hidden":A&&h?!0:void 0,sandbox:"allow-scripts allow-same-origin",onLoad:()=>{C.src===P&&(p(C),d?.(C.src))},className:H("absolute top-0 border-0 bg-white",A&&"pointer-events-none opacity-0"),style:lc(f,C.logicalWidth)},C.src)}),e[2]=f,e[3]=a,e[4]=d,e[5]=i,e[6]=h,e[7]=n,e[8]=s,e[9]=m,e[10]=g,e[11]=v,e[12]=j}else m=e[9],g=e[10],v=e[11],j=e[12];let w;e[13]!==m||e[14]!==h?(w=m?h?r.jsx(ps,{className:"absolute right-2 top-2 size-4 text-muted-foreground motion-reduce:animate-none"}):r.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background/60",children:r.jsx(ps,{className:"size-5 motion-reduce:animate-none"})}):null,e[13]=m,e[14]=h,e[15]=w):w=e[15];let x;return e[16]!==g||e[17]!==v||e[18]!==j||e[19]!==w?(x=r.jsxs("div",{ref:g,className:v,children:[j,w]}),e[16]=g,e[17]=v,e[18]=j,e[19]=w,e[20]=x):x=e[20],x}const cc=/^Co-authored-by:\s*([^<\r\n]+?)(?:\s*<[^>\r\n]*>)?\s*$/im;function dc(t){if(!t)return null;const e=cc.exec(t)?.[1]?.trim();return e||null}function uc(t){return/\[bot\]$/i.test(t)||/-bot$/i.test(t)}function hc(t){const e=dc(t.body);if(e)return e;const s=t.author.trim();return!s||uc(s)?null:s}function fc(t,e,s,a,n,o){return["cms-publish-bodies",t,e,s,a,n,o]}const mc=6e4;function pc(t,e){return e?null:t.files.map(s=>`${s.index}${s.working_dir} ${s.path}`).sort().join(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as I,j as r,n as v,b as M,a6 as P,bk as R}from"./index-
|
|
1
|
+
import{c as I,j as r,n as v,b as M,a6 as P,bk as R}from"./index-ztdGKvBm.js";import{E as T}from"./empty-state-DM4xv3sa.js";import{u as w}from"./chat-context-DFEln8mI.js";import{u as B,j as L,k as _}from"./site-editor-toast-Dq7SmLyr.js";import{i as $,u as A,k as Q,S as U}from"./blocks-tab-states-8lUCpJRf.js";import{a as G}from"./use-panel-navigate-0z93k6Ut.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-ztdGKvBm.js";import{C as M}from"./chat-context-DFEln8mI.js";import{ChatLayout as x}from"./index-Co7YBLf6.js";import{L}from"./index-kCm_MC3x.js";import{B as J}from"./blocks-preview-workspace-context-ZEZYfsWp.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-Dq7SmLyr.js";import{u as q,L as B,P as Q,S as X}from"./preview-tab-g0gk5kBr.js";import{C as Y}from"./content-tab-BPEA6p-v.js";import{T as Z}from"./tab-icon-glyph-CYp2YuI5.js";import{r as tt}from"./resolve-tab-icon-XkjIOifK.js";import ot from"./agent-site-editor-mx714_u8.js";import"./use-panel-navigate-0z93k6Ut.js";import"./thread-route-CfpvvkkL.js";import"./use-project-scope-BwqdbGG4.js";import"./repository-binding-D_Xc1yRH.js";import"./use-mcp-client-2MG3LveS.js";import"./auth-C82OPjUx.js";import"./use-view-draft-kind-BopwZu5H.js";import"./use-blog-view-DMfZjkz0.js";import"./use-organization-settings-C2vcrj4S.js";import"./schema-Bb-DbvPZ.js";import"./task-board-i6qU2BVR.js";import"./thread-intent-DyZ5A9F9.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-DdfLfQcH.js";import"./session-runtime-DBl1Hlcw.js";import"./use-entitlements-Gn1rhCN5.js";import"./use-ai-providers-Ct2xvYDX.js";import"./use-current-view-DBmQQ8uy.js";import"./use-in-settings-CFQ9B3W2.js";import"./use-decopilot-events-43RPCkUH.js";import"./use-org-fs-D9dHgOYs.js";import"./useInfiniteQuery-Ypmdjx1e.js";import"./infiniteQueryObserver-C3KEOANj.js";import"./use-mobile-C_hdQY5I.js";import"./tooltip-Bm0P1gm_.js";import"./index-CDQbtG2e.js";import"./MessageCircle01-BG1RhOiZ.js";import"./XClose-CmTuu4UN.js";import"./thread-button-CP83i3PG.js";import"./use-sidebar-collapsed-Cy-mIzeN.js";import"./sheet-C-umRrOH.js";import"./use-chat-layout-state-Im_c7sw4.js";import"./toolbar-icon-button-Cz-oOJ1w.js";import"./resizable-DNBx7bMi.js";import"./route-page-header-CApA0aIo.js";import"./LayoutLeft-DDtN-od-.js";import"./task-key-Bt60Ndov.js";import"./sortable.esm-CKl9Rez4.js";import"./Tool01-BCJ5kyrz.js";import"./agent-icon-BYWtutu9.js";import"./AlertCircle-BlMH0XE7.js";import"./UserCheck01-k-4bTA2h.js";import"./ArrowUp-D5DDc3Cp.js";import"./ArrowLeft-B0PZnf1E.js";import"./ArrowRight-mzMrxxYI.js";import"./BookOpen01-DU-B3R7s.js";import"./Globe04-CeAQ1YNm.js";import"./CheckCircle-DZ8MNpCP.js";import"./ChevronDown-XsLJSrfl.js";import"./ChevronSelectorVertical-CB0fn1Nq.js";import"./ChevronUp-BQktpZWC.js";import"./UserSquare-CafFh5_d.js";import"./LinkBroken01-DfUhihLM.js";import"./CreditCard01-MY4ouqtl.js";import"./File02-DaYek2y9.js";import"./SwitchHorizontal01-CMdpIiQk.js";import"./Eye-kjjhS0vP.js";import"./Fingerprint04-B2fDIuT8.js";import"./Image01-BcIZ5mtf.js";import"./Key01-CaJGjh13.js";import"./Minus-hZzPDO0w.js";import"./Monitor01-DMFbvudn.js";import"./Sun-O9TdKcV_.js";import"./Play-BCFOaioW.js";import"./Plus-DWySsEmB.js";import"./SearchMd-BD2qldmS.js";import"./ShoppingBag01-BbjW7cod.js";import"./Trash01-BxBhF2b8.js";import"./Upload01-q-rKSvZf.js";import"./Users01-DM58_gUL.js";import"./Zap-CBJ7My90.js";import"./context-menu-DkaKc9e5.js";import"./use-org-notice-Bg0zOPPj.js";import"./create-organization-dialog-BVTSqOJU.js";import"./form-DlZ0KMAb.js";import"./label-8UxgpYiA.js";import"./project-apps-BcKyvp4E.js";import"./use-recent-apps-DlYlQGYK.js";import"./use-navigate-to-agent-Cw8_3uU5.js";import"./command-C3tlrKUq.js";import"./index-DMpANy5-.js";import"./use-debounced-value-DO5dvp6c.js";import"./feedback-BqoIMOg7.js";import"./textarea-viSdm6BE.js";import"./content-changes-BFwm7dNe.js";import"./sandbox-url-D3mC8qhT.js";import"./use-sandbox-events-E6fWuIsO.js";import"./use-blocks-v8-project-BPvEDyS9.js";import"./use-voice-input-BMrsODyI.js";import"./popover-C4oz5B-L.js";import"./drawer-CROtV2u4.js";import"./index-CJKec1wg.js";import"./checkbox-QUuOza1H.js";import"./select-CxXZwsSr.js";import"./index-BdQq_4o_.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./utils-COdvgYqW.js";import"./sandbox-git-api-BsG4EzUP.js";import"./save-status-DhQhbNh0.js";import"./use-never-published-BJeGnEQC.js";import"./hosted-reconcile-rjhKNGnc.js";import"./blocks-tab-states-8lUCpJRf.js";import"./empty-state-I_cTbW85.js";import"./search-input-BQ8Dp8aD.js";import"./tabs-nQ7_UOyl.js";import"./active-indicator-CCMhAsc_.js";import"./use-file-configs-3gwPBXwK.js";import"./asset-utils-DP9aQr9Q.js";import"./usage-stats-B0_Yl-r0.js";import"./utils-CVEq3hMx.js";import"./markdown-CJR_ooUO.js";import"./use-copy-DT4_uVrH.js";import"./gateway-client-B4qzR3sF.js";import"./switch-B81oLbqr.js";import"./toggle-group-yQeAFu4u.js";import"./match-site-slug-config-B47_xZCi.js";import"./sandbox-lifecycle-context-DbNrw8-a.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./frame-navigation-DMXKoo4B.js";import"./variant-matcher-override-BAo9iF1F.js";import"./section-array-field-uECXIzc8.js";import"./use-fast-preview-draft-url-CpggWNTk.js";import"./parse-sections-Bun2U10n.js";import"./held-block-view-QD0AvQ2Q.js";import"./calendar-DNzaYWCQ.js";import"./editor-classes-DYlqLnQ7.js";import"./category-tree-DGOo1BAt.js";import"./pair-DmyTA2cC.js";import"./collapsible-CadTVXY4.js";import"./use-task-board-items-D2aUd0HA.js";import"./config-LEYSFIMn.js";import"./task-route-C3cK6F8S.js";import"./project-index-C2IrSomv.js";import"./shell-layout-UF80oiAz.js";import"./use-deployment-admin-Cr4LWHG9.js";import"./admin-fetch-BhTJlAsX.js";import"./integration-icon-Bo-3z9o3.js";import"./project-icon-fQqckccl.js";import"./new-project-dialog-BW6Lh52P.js";import"./repository-picker-CSaozawA.js";import"./github-icon-Bq9Ot22_.js";import"./collection-search-DkVgkcUC.js";import"./new-project-store-DID5OVrt.js";import"./legacy-admin-welcome-dialog-plmLACwz.js";import"./required-auth-layout-Cwtu4iIe.js";import"./use-org-sso-_fzcS8V-.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DU6s3Olv.js";import"./types-5-cDe_8u.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./use-connection-CcG4QE1K.js";import"./use-mcp-prompts-qJSiAdA5.js";import"./use-thread-outputs-BK5BfLdO.js";import"./file-type-icon-CdjLDWdN.js";import"./named-rule-step-BUKBZ8bi.js";import"./slider-Cqj9bgcu.js";import"./index-MkoN5oFR.js";import"./tooltipContext-CSDtg0Lk.js";import"./CategoricalChart-wSsXuALZ.js";import"./index-rjS4IUT9.js";import"./combobox-2rKAfmHD.js";import"./scroll-area-Dm3EbBj1.js";import"./monaco-editor-CLzWWWtl.js";import"./editor-ipOJFDhA.js";import"./useQueries-GZbpaWZ_.js";import"./blog-preview-url-N6iQgPQK.js";import"./device-hint-B3WnBHYf.js";import"./alert-CxbB9CEj.js";import"./virtual-mcp-CAb2l-zV.js";import"./url-slug-CII_0B7H.js";import"./app-preview-url-9Od4s8Sz.js";import"./agent-capabilities-CyWfHGWp.js";import"./preview-source-BsRLGWUP.js";import"./use-task-metadata-DZBgcb3y.js";import"./delete-copy-DdlDdNyl.js";import"./index-BL01DXCf.js";import"./view-header-CGFYM1jX.js";import"./use-cms-publish-actions-BWS3AiLQ.js";import"./use-content-sync-GJv8DmEo.js";import"./use-delete-block-BDYGRW7T.js";import"./item-actions-BDi0HvuM.js";import"./date-utils-CrvIKg-s.js";import"./badge-DcUertOZ.js";import"./empty-state-DM4xv3sa.js";import"./primitives-BbUqWJzg.js";import"./use-move-blocks-Bu_TrzH9.js";import"./mustache-CNuJ7AZ0.js";import"./collection-table-wrapper-Ds5dhGJx.js";import"./table-C3AdbrSy.js";import"./site-draft-actions-FVwQt-Zd.js";import"./separator-BQ6pXQbe.js";import"./cms-store-drafts-_66Q7KaS.js";import"./serial-task-queue-CGOeQgpr.js";import"./index-5erPNBmj.js";import"./input-B2QsYffT.js";import"./icon-button-BH8Qviy5.js";import"./chat-draft-DNEqrl5p.js";import"./use-deco-credits-yGgE3j79.js";import"./input-aLblPHPG.js";import"./suggestion-aR93AXr2.js";import"./question-004-sINsf4GQ.js";import"./feature-paywall-DL1BXqDM.js";import"./plan-ladder-C3ogU-RT.js";import"./add-connection-dialog-CS6ZsWUV.js";import"./extract-connection-data-DjYTV7t7.js";import"./metadata-D72DunRR.js";import"./connection-C8I8wKeO.js";import"./connection-card-CTJwLo8p.js";import"./connection-slug-BNBBglpK.js";import"./schema-D_OZwHJO.js";import"./connection-form-helpers-BjSA2uCL.js";import"./authenticate-and-persist-oauth-87e1Ix6y.js";import"./mcp-oauth-BBSVAQ62.js";import"./mcp-oauth-Alln4VX8.js";import"./collection-tabs-Cju2BOrS.js";import"./use-infinite-scroll-DdrDrAAo.js";import"./useSuspenseInfiniteQuery-Pk4rU2Ft.js";import"./save-changes-debug-nBi-n9eV.js";import"./site-draft-view-BVBNZFVO.js";import"./blog-view-gate-D2LovAn5.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:async()=>!1,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};
|