decocms 4.517.0 → 4.518.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (414) hide show
  1. package/dist/client/assets/{ActiveShapeUtils-BB436TvV.js → ActiveShapeUtils-DC4ySNWR.js} +1 -1
  2. package/dist/client/assets/{AlertCircle-Cch634f7.js → AlertCircle-DgnxHqxe.js} +1 -1
  3. package/dist/client/assets/{AreaChart-CpsihjcZ.js → AreaChart-Ccsbdjec.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-CohopnCT.js → ArrowLeft-BJ1448l4.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-DLUdomd9.js → ArrowUp-723TVuFG.js} +1 -1
  6. package/dist/client/assets/{BarChart-DC5-aC-9.js → BarChart-BdOKvWnK.js} +1 -1
  7. package/dist/client/assets/{Building02-BHJQSDUK.js → Building02-DU823ZCw.js} +1 -1
  8. package/dist/client/assets/{CartesianChart-dMOiAgfo.js → CartesianChart-3-g5kX2i.js} +1 -1
  9. package/dist/client/assets/{CategoricalChart-BCAB1JR1.js → CategoricalChart-CinaMpxG.js} +1 -1
  10. package/dist/client/assets/{CheckCircle-Cs8i9zYt.js → CheckCircle-C7csYE-y.js} +1 -1
  11. package/dist/client/assets/{ChevronSelectorVertical-C5d75KyY.js → ChevronSelectorVertical-B0Z7parR.js} +1 -1
  12. package/dist/client/assets/{ChevronUp-BT7eMKPK.js → ChevronUp-DiTVmUiH.js} +1 -1
  13. package/dist/client/assets/{Copy01-B341DqLV.js → Copy01-DRNuKy-h.js} +1 -1
  14. package/dist/client/assets/{CreditCard01-4Fwr0tNh.js → CreditCard01-C3f2i_qY.js} +1 -1
  15. package/dist/client/assets/{DotsVertical-DbrlDgFh.js → DotsVertical-eX97dPc6.js} +1 -1
  16. package/dist/client/assets/{ErrorBarContext-t45nElJh.js → ErrorBarContext-CCb5UZ88.js} +1 -1
  17. package/dist/client/assets/{Globe04-BE6c1UDj.js → Globe04-ByvV2bPX.js} +1 -1
  18. package/dist/client/assets/{Image01-hTzc15CE.js → Image01-QuVxFosz.js} +1 -1
  19. package/dist/client/assets/{Key01-kTu6t6u_.js → Key01-C-QXsN23.js} +1 -1
  20. package/dist/client/assets/{Link01-hfA48cFL.js → Link01-CbpFxbNY.js} +1 -1
  21. package/dist/client/assets/{LinkBroken01-Dioz3u9i.js → LinkBroken01-DDgMbBWJ.js} +1 -1
  22. package/dist/client/assets/{Minus-DqDPTtRG.js → Minus-DnJ8wbLv.js} +1 -1
  23. package/dist/client/assets/{Monitor01-Bz6QaUO4.js → Monitor01-DD5_JCl8.js} +1 -1
  24. package/dist/client/assets/{Play-CByslM3d.js → Play-BgEaB30r.js} +1 -1
  25. package/dist/client/assets/{Plus-Dewm72je.js → Plus-BnqPSlPj.js} +1 -1
  26. package/dist/client/assets/{ReferenceLine-DV9hYxt_.js → ReferenceLine-PgVE-Dmr.js} +1 -1
  27. package/dist/client/assets/{SearchMd-7Jo0ZofC.js → SearchMd-GQAKwnQD.js} +1 -1
  28. package/dist/client/assets/{Sector-D64VY8hG.js → Sector-DG1U_Qdd.js} +1 -1
  29. package/dist/client/assets/{ShoppingBag01-BStpgW0a.js → ShoppingBag01-DVHnZchK.js} +1 -1
  30. package/dist/client/assets/{Sun-C37Hpdko.js → Sun-Ct5gftPt.js} +1 -1
  31. package/dist/client/assets/{SwitchHorizontal01-CrC4ThKg.js → SwitchHorizontal01-_kdH1ete.js} +1 -1
  32. package/dist/client/assets/{Tool01-2gJDR0Ho.js → Tool01-rTZNmFct.js} +1 -1
  33. package/dist/client/assets/{Trash01-DjE7Raat.js → Trash01-TPK4gSsp.js} +1 -1
  34. package/dist/client/assets/{Upload01-CYfTR3aZ.js → Upload01-D6tRQTgc.js} +1 -1
  35. package/dist/client/assets/{User01-X6IeKYZH.js → User01-1q78INo2.js} +1 -1
  36. package/dist/client/assets/{UserSquare-pmxb5ZdZ.js → UserSquare-B_yRFcN6.js} +1 -1
  37. package/dist/client/assets/{Users01-uKJoVSle.js → Users01-D5MhP5r0.js} +1 -1
  38. package/dist/client/assets/{XClose-BVxVAZ6V.js → XClose-DOXmYMF_.js} +1 -1
  39. package/dist/client/assets/{ZoomOut-DixQygt2.js → ZoomOut-DLICjI1h.js} +1 -1
  40. package/dist/client/assets/{access-gate-BpfEc6VH.js → access-gate-p2OBWc28.js} +1 -1
  41. package/dist/client/assets/{add-connection-dialog-BZwLO1Ja.js → add-connection-dialog-BluC5xOJ.js} +1 -1
  42. package/dist/client/assets/agent-analytics-D7PovqhV.js +1 -0
  43. package/dist/client/assets/agent-app-DEsjnzHy.js +1 -0
  44. package/dist/client/assets/{agent-assets-e6Gk5J-Q.js → agent-assets-CsYWD2CR.js} +1 -1
  45. package/dist/client/assets/{agent-automation-jGwXvC8f.js → agent-automation-J7szToQ3.js} +1 -1
  46. package/dist/client/assets/{agent-automations-DzW1crP1.js → agent-automations-tGwSufFx.js} +1 -1
  47. package/dist/client/assets/agent-calendar-Co4HNR_x.js +1 -0
  48. package/dist/client/assets/{agent-connect-sources-6bCKMOK5.js → agent-connect-sources-Bf7YpJtB.js} +1 -1
  49. package/dist/client/assets/agent-deck-Bra-oqcr.js +1 -0
  50. package/dist/client/assets/{agent-e2e-DwASXEee.js → agent-e2e-B01kqUsN.js} +1 -1
  51. package/dist/client/assets/agent-experiments-W5vP2PHw.js +1 -0
  52. package/dist/client/assets/agent-file-_hkGq1Y2.js +1 -0
  53. package/dist/client/assets/{agent-hosting-BVT3wdCc.js → agent-hosting-8jYjdLhJ.js} +1 -1
  54. package/dist/client/assets/{agent-icon-CiKTiUdq.js → agent-icon-g2PIrjzs.js} +1 -1
  55. package/dist/client/assets/agent-library-BTKjZMW2.js +1 -0
  56. package/dist/client/assets/agent-library-file-ClGbfS7a.js +1 -0
  57. package/dist/client/assets/{agent-monitor-C_MtaF0x.js → agent-monitor-Dtdyok8Z.js} +1 -1
  58. package/dist/client/assets/{agent-overview-BaJQVLzH.js → agent-overview-uVNzU6d3.js} +1 -1
  59. package/dist/client/assets/agent-releases-DVFEJ-Ad.js +2 -0
  60. package/dist/client/assets/agent-settings-DQDpgZ05.js +1 -0
  61. package/dist/client/assets/{agent-site-editor-DGIssniL.js → agent-site-editor-DI9lfD7X.js} +2 -2
  62. package/dist/client/assets/agent-site-editor-code-CiWALb3j.js +2 -0
  63. package/dist/client/assets/agent-site-editor-content-BrDlLQPy.js +1 -0
  64. package/dist/client/assets/agent-site-editor-preview-Da7g0LlC.js +1 -0
  65. package/dist/client/assets/{agent-view-guard-Cz_9FSeB.js → agent-view-guard-Bhzmxyux.js} +1 -1
  66. package/dist/client/assets/agent-view-l1LYqbmp.js +1 -0
  67. package/dist/client/assets/{agents-list-BehVRlw8.js → agents-list-CbFcTa4A.js} +1 -1
  68. package/dist/client/assets/{ai-providers-Cfzh0dop.js → ai-providers-Da7yjmwG.js} +1 -1
  69. package/dist/client/assets/{alert-dialog-BdWXpnme.js → alert-dialog-KKnJELoX.js} +1 -1
  70. package/dist/client/assets/{alert-DlpN1nbO.js → alert-kpgdNVxk.js} +1 -1
  71. package/dist/client/assets/{analytics-sections-CBRurMfi.js → analytics-sections-DlComRmC.js} +1 -1
  72. package/dist/client/assets/{analytics-tab-Bu3yOSFE.js → analytics-tab-B_HbOlqF.js} +1 -1
  73. package/dist/client/assets/{api-keys-SwcfBYZn.js → api-keys-DNrkQCkt.js} +1 -1
  74. package/dist/client/assets/api-keys-kxUaur7Y.js +1 -0
  75. package/dist/client/assets/{app-editor-BzaLO82-.js → app-editor-CKdeak5r.js} +1 -1
  76. package/dist/client/assets/{asset-utils-CYj7sEud.js → asset-utils-CYyNDrFK.js} +1 -1
  77. package/dist/client/assets/{auth-DVebpHI3.js → auth-DHZfBLZ5.js} +1 -1
  78. package/dist/client/assets/{auth-catchall-CM988zgH.js → auth-catchall-BS8FAipd.js} +1 -1
  79. package/dist/client/assets/{auth-entry-BM6bA3ji.js → auth-entry-34SQAdx9.js} +1 -1
  80. package/dist/client/assets/{auth-split-layout-BnlVBIeL.js → auth-split-layout-DF-Z-sUB.js} +1 -1
  81. package/dist/client/assets/{authenticate-and-persist-oauth-qcbNyaRp.js → authenticate-and-persist-oauth-CbgraxNg.js} +1 -1
  82. package/dist/client/assets/{automation-list-row-BIlvc0v-.js → automation-list-row-DtCSZcdc.js} +1 -1
  83. package/dist/client/assets/{automation-runs-jRApvuta.js → automation-runs-Lelpmww0.js} +1 -1
  84. package/dist/client/assets/{automations-DMHgje9o.js → automations-CV4vMVkc.js} +1 -1
  85. package/dist/client/assets/{autosend-BTx7-p6a.js → autosend-Cwww7_9j.js} +1 -1
  86. package/dist/client/assets/{avatar-DjIkOwsx.js → avatar-BRRGslVN.js} +1 -1
  87. package/dist/client/assets/{badge-BfMggcm8.js → badge-DmeqGssZ.js} +1 -1
  88. package/dist/client/assets/{block-document-DKju3Lsl.js → block-document-DtA_3M8z.js} +1 -1
  89. package/dist/client/assets/{blocks-preview-workspace-context-AokvrTWO.js → blocks-preview-workspace-context--o78Y3yp.js} +1 -1
  90. package/dist/client/assets/{blocks-tab-states-5tpSikld.js → blocks-tab-states-Dps89GrH.js} +1 -1
  91. package/dist/client/assets/{blog-schema-B8hGgOKc.js → blog-schema-CEYO8j-N.js} +1 -1
  92. package/dist/client/assets/{buckets-DzW1ArnB.js → buckets-CXMlDLcD.js} +1 -1
  93. package/dist/client/assets/{build-improve-prompt-doc-BGKe2ED3.js → build-improve-prompt-doc-C7S9lWPM.js} +1 -1
  94. package/dist/client/assets/{calendar-kdikRXDO.js → calendar-B6BpOXfC.js} +1 -1
  95. package/dist/client/assets/{campaigns-view-CXUV2H04.js → campaigns-view-DtQvcOC6.js} +1 -1
  96. package/dist/client/assets/{capability-load-error-BuC7MxXm.js → capability-load-error-CDC4LjDf.js} +1 -1
  97. package/dist/client/assets/category-editor-BvoAtPRs.js +1 -0
  98. package/dist/client/assets/{chart-aHPEwhl0.js → chart-CTinHp-8.js} +1 -1
  99. package/dist/client/assets/{chat-context-BEyCIAaN.js → chat-context-DLezfYEa.js} +1 -1
  100. package/dist/client/assets/{chat-draft-Dql_zG1A.js → chat-draft-BlRnwK9v.js} +1 -1
  101. package/dist/client/assets/{checkbox-R6Pm_B33.js → checkbox-BlB_jfat.js} +1 -1
  102. package/dist/client/assets/{choose-editor-C1zV1Fp9.js → choose-editor-DHZGPvHu.js} +1 -1
  103. package/dist/client/assets/{cli-auth-success-Dw0y5N0L.js → cli-auth-success-DFaLHvgO.js} +1 -1
  104. package/dist/client/assets/{client-icons-C_WiAP0u.js → client-icons-CpqRIiQr.js} +1 -1
  105. package/dist/client/assets/cms-settings-editor-Dh-qBReE.js +1 -0
  106. package/dist/client/assets/{collapsible-BcZaehP2.js → collapsible-DZTt-UAc.js} +1 -1
  107. package/dist/client/assets/{collection-detail-AO17C_8B.js → collection-detail-BjUkXIkv.js} +1 -1
  108. package/dist/client/assets/{collection-display-button-C0cYhq66.js → collection-display-button-Dmr1DpXh.js} +1 -1
  109. package/dist/client/assets/{collection-search-7sBPioRN.js → collection-search-DcBOG84t.js} +1 -1
  110. package/dist/client/assets/{collection-table-wrapper-BzgZq6u7.js → collection-table-wrapper-CBLUEZ5z.js} +1 -1
  111. package/dist/client/assets/{collection-tabs-DMsbicTn.js → collection-tabs-D5lfCRgo.js} +1 -1
  112. package/dist/client/assets/{column-rules-CBkHBJjn.js → column-rules-B3eVnEiY.js} +1 -1
  113. package/dist/client/assets/{combobox-CEzxugDA.js → combobox-CVTULN6N.js} +1 -1
  114. package/dist/client/assets/{command-KmLWWmqo.js → command-R1e1yMQ9.js} +1 -1
  115. package/dist/client/assets/{companion-mcps-section-vJ3FRpYP.js → companion-mcps-section-hGQWfzwk.js} +1 -1
  116. package/dist/client/assets/{config-0t8v4_10.js → config-BWrcU7H3.js} +1 -1
  117. package/dist/client/assets/{connect-Ceo_a42v.js → connect-CNN0l2XT.js} +1 -1
  118. package/dist/client/assets/{connect-layout-DXn91Bwy.js → connect-layout-DiWD8YTg.js} +1 -1
  119. package/dist/client/assets/{connect-source-dialog-DCA13Vr9.js → connect-source-dialog-xgaD8LgG.js} +1 -1
  120. package/dist/client/assets/{connection-BXCm7RUN.js → connection-WJRbuDz1.js} +1 -1
  121. package/dist/client/assets/{connection-card-DudSxk_f.js → connection-card-DnICQFn9.js} +1 -1
  122. package/dist/client/assets/{connection-detail-Bzj7ZAYC.js → connection-detail-C0OJOuef.js} +1 -1
  123. package/dist/client/assets/{connection-form-helpers-BCgvOrMH.js → connection-form-helpers-CBYCAzPl.js} +1 -1
  124. package/dist/client/assets/{connections-DZsQ6PqI.js → connections-DjwbhWNZ.js} +1 -1
  125. package/dist/client/assets/{content-tab-B8CAyeYn.js → content-tab-CAJ559-P.js} +3 -3
  126. package/dist/client/assets/{context-Dxx9Nppi.js → context-BkZJrbqd.js} +1 -1
  127. package/dist/client/assets/{context-menu-Bup14w-O.js → context-menu-B7wqDsW2.js} +1 -1
  128. package/dist/client/assets/{context-shell-YuMc6M7u.js → context-shell-DkaK_BOn.js} +3 -3
  129. package/dist/client/assets/{core.esm-BmE_KURk.js → core.esm-DHAYYfZu.js} +1 -1
  130. package/dist/client/assets/{create-organization-dialog-oYjru5bh.js → create-organization-dialog-u0Ud2kaY.js} +1 -1
  131. package/dist/client/assets/{daily-pulse-Cj6zflmn.js → daily-pulse-DRJB1hcS.js} +1 -1
  132. package/dist/client/assets/{discover-BsfuhgQD.js → discover-gZu3Sfan.js} +1 -1
  133. package/dist/client/assets/{domain-settings-BCFlmNLU.js → domain-settings-USbT8NUs.js} +1 -1
  134. package/dist/client/assets/{drawer-Bi1-udV5.js → drawer-C9bfrQZ2.js} +1 -1
  135. package/dist/client/assets/{editor-DAekV0he.js → editor-4LyrkCqm.js} +1 -1
  136. package/dist/client/assets/{editor-classes-BaBC2QPU.js → editor-classes-_dczAbCq.js} +1 -1
  137. package/dist/client/assets/{empty-state-wXIjf_EN.js → empty-state-4Hlytpdt.js} +1 -1
  138. package/dist/client/assets/{empty-state-B4dSQMeM.js → empty-state-_a1QMwjl.js} +1 -1
  139. package/dist/client/assets/{experiments-tab-PntzDOfu.js → experiments-tab-DdHl8yk7.js} +1 -1
  140. package/dist/client/assets/{experiments-tab-choice-CQ5EsK8h.js → experiments-tab-choice-C9wWsYd4.js} +1 -1
  141. package/dist/client/assets/{extract-connection-data-Bg9K46Rs.js → extract-connection-data-mbA-zNaE.js} +1 -1
  142. package/dist/client/assets/{feature-gate-4u7sb4lR.js → feature-gate-iJnsMeBr.js} +1 -1
  143. package/dist/client/assets/{feature-paywall-BsVH1P4Z.js → feature-paywall-DcguOiJA.js} +1 -1
  144. package/dist/client/assets/{file-explorer-CsBngoR2.js → file-explorer-B_iKC9bp.js} +1 -1
  145. package/dist/client/assets/{file-preview-CVVpAx14.js → file-preview-Dy07kmgf.js} +1 -1
  146. package/dist/client/assets/{file-share-button-Dh2OblA7.js → file-share-button-DOM1SplI.js} +1 -1
  147. package/dist/client/assets/{file-type-icon-DYeFNgMs.js → file-type-icon-CP6Bm0Pm.js} +1 -1
  148. package/dist/client/assets/{folder-icon-CMfbCZZj.js → folder-icon-D_8O1LWU.js} +1 -1
  149. package/dist/client/assets/{form-BGI3x6he.js → form-B2fhil9l.js} +1 -1
  150. package/dist/client/assets/{general-AgdwRV2K.js → general-BE0anzP1.js} +1 -1
  151. package/dist/client/assets/{home-B3JLIiqG.js → home-Bb5YZQHS.js} +1 -1
  152. package/dist/client/assets/{icon-button-Du_O8eku.js → icon-button-BQwa115u.js} +1 -1
  153. package/dist/client/assets/{index-BnbMIYQC.js → index-B4yeJC5N.js} +1 -1
  154. package/dist/client/assets/{index-BEaGR-Ng.js → index-BWgOKGMR.js} +1 -1
  155. package/dist/client/assets/{index-CEnumkKh.js → index-CK40JGB6.js} +1 -1
  156. package/dist/client/assets/{index-CqX2WR0x.js → index-CO7uP6ut.js} +1 -1
  157. package/dist/client/assets/{index-CdhgpKbn.js → index-CXWqnDP7.js} +1 -1
  158. package/dist/client/assets/{index-BWEksKOa.js → index-CYHGIatu.js} +1 -1
  159. package/dist/client/assets/{index-Dw3D39xs.js → index-Ccma-e_l.js} +1 -1
  160. package/dist/client/assets/{index-DVxNOEMj.js → index-CeLGzS5y.js} +1 -1
  161. package/dist/client/assets/{index-CqllmV-p.js → index-Cs4qaYPX.js} +1 -1
  162. package/dist/client/assets/{index-BeWb3VLq.js → index-D2MFYEzD.js} +4 -4
  163. package/dist/client/assets/{index-BXwVgYyP.js → index-DU8BFhZD.js} +1 -1
  164. package/dist/client/assets/{index-CkwxAoM4.js → index-DXMlJvYf.js} +1 -1
  165. package/dist/client/assets/{index-BflgjdLH.js → index-DiVZA6vr.js} +1 -1
  166. package/dist/client/assets/{index-BliYmmPu.js → index-R_qB4INp.js} +1 -1
  167. package/dist/client/assets/{index-CcDpskhn.js → index-rKWXOhdZ.js} +1 -1
  168. package/dist/client/assets/{index-redirect-BpERt5XK.js → index-redirect-D2LQ3n9D.js} +1 -1
  169. package/dist/client/assets/{infiniteQueryObserver-BOCgDRcQ.js → infiniteQueryObserver-CaSjeDsE.js} +1 -1
  170. package/dist/client/assets/{infra-billing-443Q4BKf.js → infra-billing-_cCsUnUO.js} +1 -1
  171. package/dist/client/assets/{input-D9vH1igB.js → input-D43D11gI.js} +1 -1
  172. package/dist/client/assets/{input-D1nDj3Gx.js → input-D9iDAvwy.js} +3 -3
  173. package/dist/client/assets/{integration-icon-VoZokpOe.js → integration-icon-CqbOWyvX.js} +1 -1
  174. package/dist/client/assets/{jira-icon-BOD4UX3O.js → jira-icon-Y_2uACKb.js} +1 -1
  175. package/dist/client/assets/{label-TKhfC6jr.js → label-3hTmrxoy.js} +1 -1
  176. package/dist/client/assets/{layout-OvvfNrHJ.js → layout-EYuYXIPk.js} +1 -1
  177. package/dist/client/assets/{legacy-agents-deep-Bj2cFPCz.js → legacy-agents-deep-Y0g29rl5.js} +1 -1
  178. package/dist/client/assets/{legacy-main-redirect-Y-IABTgs.js → legacy-main-redirect-Pt1vRyf-.js} +1 -1
  179. package/dist/client/assets/library-DJ51ehEw.js +1 -0
  180. package/dist/client/assets/{login-d1G00P7v.js → login-DTF43M9h.js} +1 -1
  181. package/dist/client/assets/{markdown-D_Bab0vD.js → markdown-BeKN4MPt.js} +1 -1
  182. package/dist/client/assets/{mcp-app-renderer-C5DYTOzS.js → mcp-app-renderer-DcbWj_cd.js} +1 -1
  183. package/dist/client/assets/{mcp-oauth-Bv0ymH6e.js → mcp-oauth-BVLnM3ir.js} +1 -1
  184. package/dist/client/assets/{mcp-oauth-gJmjFND6.js → mcp-oauth-DQ__DCEs.js} +1 -1
  185. package/dist/client/assets/{members-CGCmgk2j.js → members-DdYed_-G.js} +1 -1
  186. package/dist/client/assets/{memory-DjHNNPOW.js → memory-CbDGJpdj.js} +1 -1
  187. package/dist/client/assets/{mini-report-page-BSYlfSmZ.js → mini-report-page-I5w2A9ue.js} +1 -1
  188. package/dist/client/assets/{mock-board-BCQJ9AHq.js → mock-board-D64wFJ9x.js} +3 -3
  189. package/dist/client/assets/{monaco-editor-CVRVgXSh.js → monaco-editor-DEU78sxw.js} +1 -1
  190. package/dist/client/assets/{monitoring-mogv5pNr.js → monitoring-Bklr39Mh.js} +1 -1
  191. package/dist/client/assets/{monitoring-stats-row-BEpenrU2.js → monitoring-stats-row-BLFmMtG4.js} +1 -1
  192. package/dist/client/assets/{multi-select-ZwwArowo.js → multi-select-DxNv8sxt.js} +1 -1
  193. package/dist/client/assets/{mustache-B20fDMb8.js → mustache-Cm6mC1mo.js} +2 -2
  194. package/dist/client/assets/{named-rule-uses-Bxr3PCeC.js → named-rule-uses-BBN_5zyZ.js} +1 -1
  195. package/dist/client/assets/{named-rule-view-pF5yBmDb.js → named-rule-view-Dgj56LCZ.js} +1 -1
  196. package/dist/client/assets/{new-project-dialog-DfI138Mw.js → new-project-dialog-qMTAvOP0.js} +1 -1
  197. package/dist/client/assets/{oauth-callback-C0l4AVA-.js → oauth-callback-DzKW1jLM.js} +1 -1
  198. package/dist/client/assets/{oauth-callback-ai-provider-DlpJWGZf.js → oauth-callback-ai-provider-BhTg9J9_.js} +1 -1
  199. package/dist/client/assets/{onboarding-DMkG4-4M.js → onboarding-CcHHvf_v.js} +1 -1
  200. package/dist/client/assets/{openai-conversation-BcQvnIOU.js → openai-conversation-X6iReX5A.js} +1 -1
  201. package/dist/client/assets/{optimistic-project-sidebar-views-CBzXyVUz.js → optimistic-project-sidebar-views-Wa4vMG32.js} +1 -1
  202. package/dist/client/assets/{order-monitor-day-raWLiT1v.js → order-monitor-day-d8yh4cv8.js} +1 -1
  203. package/dist/client/assets/{organization-choice-CSBUJWem.js → organization-choice-DKOeafiU.js} +1 -1
  204. package/dist/client/assets/{orgs-DYr5Iir2.js → orgs-CReR2HvS.js} +1 -1
  205. package/dist/client/assets/{page-seo-form-C0_Mzxj0.js → page-seo-form-BTZBPUqn.js} +1 -1
  206. package/dist/client/assets/{pair-v8_ULhan.js → pair-DSps2zoM.js} +1 -1
  207. package/dist/client/assets/{parse-sections-CigeyiXV.js → parse-sections-Bc_lvOtq.js} +1 -1
  208. package/dist/client/assets/{plan-BYiUi2-G.js → plan-CxnMa3En.js} +1 -1
  209. package/dist/client/assets/{plan-ladder-CtR99jrd.js → plan-ladder-7wUcVwfI.js} +1 -1
  210. package/dist/client/assets/{popover-s88DXvPL.js → popover-Dm_x8CV9.js} +1 -1
  211. package/dist/client/assets/{post-calendar-DbUDJn5r.js → post-calendar-BtFE-61n.js} +1 -1
  212. package/dist/client/assets/{post-editor-CdhtoksR.js → post-editor-QChnOq6Y.js} +2 -2
  213. package/dist/client/assets/{preview-content-BNZ95rhM.js → preview-content-BUlAqj-X.js} +1 -1
  214. package/dist/client/assets/{preview-dialog-BZcvH5f1.js → preview-dialog-39V6ZO2Y.js} +1 -1
  215. package/dist/client/assets/preview-link-C762yHOt.js +1 -0
  216. package/dist/client/assets/{preview-panel-CjWzxG-O.js → preview-panel-BvoYfTNF.js} +1 -1
  217. package/dist/client/assets/preview-tab-jmFSMM-R.js +551 -0
  218. package/dist/client/assets/{product-picker-dialog-CecFCJox.js → product-picker-dialog-iaXbdjia.js} +1 -1
  219. package/dist/client/assets/{profile-Bo384oXV.js → profile-IgWNvITK.js} +1 -1
  220. package/dist/client/assets/{project-app-view-C-JC6Lnp.js → project-app-view-Bc-wof7y.js} +1 -1
  221. package/dist/client/assets/{project-apps-BQ30Q_BX.js → project-apps-DVzn0z1g.js} +1 -1
  222. package/dist/client/assets/{project-feed--d7Txdh1.js → project-feed-BIwmxSQY.js} +1 -1
  223. package/dist/client/assets/{project-icon-Ds8VtVRG.js → project-icon-CJmvnLdz.js} +1 -1
  224. package/dist/client/assets/project-reports-DnaQ9nW_.js +1 -0
  225. package/dist/client/assets/project-tasks-cwxXGcyN.js +1 -0
  226. package/dist/client/assets/{projects-BN_UNvg1.js → projects-D8Cbhxnj.js} +1 -1
  227. package/dist/client/assets/{projects-empty-state-CmS_yrG7.js → projects-empty-state-CmtOjsbv.js} +1 -1
  228. package/dist/client/assets/{prompts-g_Bby1s0.js → prompts-BFb-SeSC.js} +1 -1
  229. package/dist/client/assets/record-editor-hWJJMGCG.js +1 -0
  230. package/dist/client/assets/{redirect-editor-CBEbRvVY.js → redirect-editor-XmMaGVJV.js} +1 -1
  231. package/dist/client/assets/releases-api-AYZ93qlv.js +1 -0
  232. package/dist/client/assets/{reports-Bgmc-lqT.js → reports-AyOb4hhI.js} +1 -1
  233. package/dist/client/assets/reports-BQij5juA.js +1 -0
  234. package/dist/client/assets/{reports-onboarding-D6-A2sL7.js → reports-onboarding-BDPMVaDo.js} +1 -1
  235. package/dist/client/assets/{reports-tab-B_Sk2TLl.js → reports-tab-D2iADtiN.js} +2 -2
  236. package/dist/client/assets/{repositories-C2vwcNjc.js → repositories-BNDNB0vE.js} +1 -1
  237. package/dist/client/assets/repositories-BiNU-Xfn.js +1 -0
  238. package/dist/client/assets/{repository-binding-Cf_thK-b.js → repository-binding-4nTgXz1S.js} +1 -1
  239. package/dist/client/assets/{repository-import-picker-BOku3VrR.js → repository-import-picker-De4sf2Gs.js} +1 -1
  240. package/dist/client/assets/{repository-picker-CeCsQGv8.js → repository-picker-HOHNvmaE.js} +1 -1
  241. package/dist/client/assets/{require-capability-DC_q9Xad.js → require-capability-ChTCz2WH.js} +1 -1
  242. package/dist/client/assets/{required-auth-layout-DhxdstQv.js → required-auth-layout-BZllo6Io.js} +1 -1
  243. package/dist/client/assets/{reset-password-BCS7WVZ6.js → reset-password-Ui3G6CJw.js} +1 -1
  244. package/dist/client/assets/{resizable-BySAwPSW.js → resizable-DAXTAODq.js} +1 -1
  245. package/dist/client/assets/{resolve-tab-icon-B7CsMGsC.js → resolve-tab-icon-CAixh6_W.js} +1 -1
  246. package/dist/client/assets/{review-settings-DtZi6zHg.js → review-settings-BDP4bMe5.js} +1 -1
  247. package/dist/client/assets/{roles-CGYNn4dv.js → roles-Clx4HYW_.js} +1 -1
  248. package/dist/client/assets/{route-ChD1cXkH.js → route-B9jYymiu.js} +1 -1
  249. package/dist/client/assets/route-BjK3qzB4.js +1 -0
  250. package/dist/client/assets/{route-ChLLCXC9.js → route-CaI6hSyT.js} +1 -1
  251. package/dist/client/assets/{runnable-block-editor-Bod17qTV.js → runnable-block-editor-LQjhwiX1.js} +6 -6
  252. package/dist/client/assets/{sandbox-lifecycle-context-CCjKxqdS.js → sandbox-lifecycle-context-CJodiAqU.js} +1 -1
  253. package/dist/client/assets/{schema-b5uziS6S.js → schema-DrNvzI26.js} +1 -1
  254. package/dist/client/assets/{schema-ClGCzPdy.js → schema-xPkTs0YZ.js} +1 -1
  255. package/dist/client/assets/{scroll-area-BVZXqx5M.js → scroll-area-BBBDJLpH.js} +1 -1
  256. package/dist/client/assets/{search-input-BL6XGlmm.js → search-input-DSx8LWNe.js} +1 -1
  257. package/dist/client/assets/{search-toggle-IRNGzCzn.js → search-toggle-B9X5GBEJ.js} +1 -1
  258. package/dist/client/assets/{secret-ciphertext-CKG2rzpX.js → secret-ciphertext-qv17emf3.js} +1 -1
  259. package/dist/client/assets/{secret-picker-NNIqKwTx.js → secret-picker-DBs-gr5P.js} +1 -1
  260. package/dist/client/assets/{secrets-BLs8g0Qc.js → secrets-5nLK_pSH.js} +1 -1
  261. package/dist/client/assets/{sections-Dw8sSpTv.js → sections-ALAbnAYY.js} +1 -1
  262. package/dist/client/assets/{sections-editor-IbsR8YsO.js → sections-editor-DVqxZTWF.js} +2 -2
  263. package/dist/client/assets/{select-H4FJk0rp.js → select-C9_0SSgH.js} +1 -1
  264. package/dist/client/assets/{select-model-VSltfcKe.js → select-model-BaxH4IRV.js} +1 -1
  265. package/dist/client/assets/{seo-editor-DJxK0wxd.js → seo-editor-Cd-ANp55.js} +1 -1
  266. package/dist/client/assets/{separator-l8ktDBQ-.js → separator-DXuISWBW.js} +1 -1
  267. package/dist/client/assets/settings-tab-D_D1vl9t.js +1 -0
  268. package/dist/client/assets/{sheet-DdrzSnyB.js → sheet-BQCLSAhw.js} +1 -1
  269. package/dist/client/assets/{shell-layout-Dpds4_um.js → shell-layout-CnXya3zZ.js} +1 -1
  270. package/dist/client/assets/site-draft-actions-BG_Fzxj9.js +12 -0
  271. package/dist/client/assets/site-draft-view-BYdCjysm.js +2 -0
  272. package/dist/client/assets/site-editor-B7kc0tIQ.js +1 -0
  273. package/dist/client/assets/{site-editor-toast-C48kJZ8y.js → site-editor-toast-BKVRfpA8.js} +1 -1
  274. package/dist/client/assets/{skills-F7XSMMWV.js → skills-mFhfnuy4.js} +1 -1
  275. package/dist/client/assets/{slider-tSRa1HDF.js → slider-DTKLr6aL.js} +1 -1
  276. package/dist/client/assets/{sortable.esm-CE2eXOQU.js → sortable.esm-D2---7Ab.js} +1 -1
  277. package/dist/client/assets/{sso-B_KsCvoW.js → sso-DrhiuaNt.js} +1 -1
  278. package/dist/client/assets/{suggestion-Bu3BweEe.js → suggestion-B0A7rwRG.js} +1 -1
  279. package/dist/client/assets/{switch-BI2l0q9a.js → switch-CESJ2RZK.js} +1 -1
  280. package/dist/client/assets/{symbol-CW0bfPL3.js → symbol-CYXY7_SE.js} +1 -1
  281. package/dist/client/assets/{synced-repos-BXQtYjtL.js → synced-repos--pWS_C_z.js} +1 -1
  282. package/dist/client/assets/{tab-icon-glyph-B_hAV_wB.js → tab-icon-glyph-Cjt9sANI.js} +1 -1
  283. package/dist/client/assets/{table-BI-3H0Nx.js → table-BkZK8rXZ.js} +1 -1
  284. package/dist/client/assets/{tabs-Cw5epDK7.js → tabs-B6EQUSl_.js} +1 -1
  285. package/dist/client/assets/{task-assignee-avatar-B4jYRjC8.js → task-assignee-avatar-Dodx9W4w.js} +1 -1
  286. package/dist/client/assets/{task-board-ByNQwZsl.js → task-board-6nf7vbPi.js} +1 -1
  287. package/dist/client/assets/{task-route-B8oSJFnj.js → task-route-BvbHuTGP.js} +1 -1
  288. package/dist/client/assets/{task-status-GAY2L2Vz.js → task-status-GUWtXwyC.js} +1 -1
  289. package/dist/client/assets/{taskboard-analytics-MtxZahkF.js → taskboard-analytics-BXSTC1m2.js} +1 -1
  290. package/dist/client/assets/tasks-Cd3DKWnU.js +1 -0
  291. package/dist/client/assets/{tasks-CaRFrr2H.js → tasks-DEvPbHif.js} +1 -1
  292. package/dist/client/assets/{textarea-7I-DLD6x.js → textarea-DG3FcnmS.js} +1 -1
  293. package/dist/client/assets/{thread-analytics-BhyMnytl.js → thread-analytics-BUqostwA.js} +1 -1
  294. package/dist/client/assets/{thread-intent-CoB1rbzj.js → thread-intent-Ds79TVrW.js} +1 -1
  295. package/dist/client/assets/{thread-route-Bjcqwe4C.js → thread-route-Cf5GTfDW.js} +1 -1
  296. package/dist/client/assets/{thread-route-BPSSuk8V.js → thread-route-UuA5SD5X.js} +1 -1
  297. package/dist/client/assets/{thread-sheet-body-DyDxpawL.js → thread-sheet-body-p9veuPgz.js} +1 -1
  298. package/dist/client/assets/{time-range-picker-DJ-TaM2M.js → time-range-picker-Bo0eqMw9.js} +1 -1
  299. package/dist/client/assets/{toggle-group-BngkTNsG.js → toggle-group-C7NFln-0.js} +1 -1
  300. package/dist/client/assets/{tool-namespace-DePiqr-m.js → tool-namespace-CMW8ZB5L.js} +1 -1
  301. package/dist/client/assets/{toolbar-icon-button-DKjsnGdZ.js → toolbar-icon-button-BiR5ntfC.js} +1 -1
  302. package/dist/client/assets/{tooltip-4vv5k-uR.js → tooltip-bQVm_Ope.js} +1 -1
  303. package/dist/client/assets/{tooltipContext-B3bWUtmi.js → tooltipContext-CMDZ9J9X.js} +1 -1
  304. package/dist/client/assets/{track-C0wfSYRO.js → track-COIlf0dl.js} +1 -1
  305. package/dist/client/assets/{types-CNU-uWw-.js → types-DLna4BAB.js} +1 -1
  306. package/dist/client/assets/{url-slug-DU3tFMUC.js → url-slug-BWq-dgp6.js} +1 -1
  307. package/dist/client/assets/{usage-stats-CKpL0uWf.js → usage-stats-CvT3PVJT.js} +1 -1
  308. package/dist/client/assets/{use-ai-providers-Ct47MIru.js → use-ai-providers-CzmKfSB9.js} +1 -1
  309. package/dist/client/assets/{use-apply-named-rule-R20A_NaL.js → use-apply-named-rule-BLEqLp1R.js} +1 -1
  310. package/dist/client/assets/{use-automations-Ho0ayZT_.js → use-automations-DHA5_uZh.js} +1 -1
  311. package/dist/client/assets/{use-autosave-DzNsVsl3.js → use-autosave-BlShc4A-.js} +1 -1
  312. package/dist/client/assets/{use-chat-layout-state-CWI-mwQI.js → use-chat-layout-state-BV7ldzPe.js} +1 -1
  313. package/dist/client/assets/{use-clock-tick-DE4s8Okz.js → use-clock-tick-C61VlTs_.js} +1 -1
  314. package/dist/client/assets/{use-connect-companion-Dmdscsai.js → use-connect-companion-DxCCqNf4.js} +1 -1
  315. package/dist/client/assets/{use-connection-HenJjVMr.js → use-connection-DTSe3r1K.js} +1 -1
  316. package/dist/client/assets/{use-content-sync-C0CqYtRD.js → use-content-sync-Dj6rb1LD.js} +1 -1
  317. package/dist/client/assets/{use-copy-C4LbXPXl.js → use-copy-Bc8JMSws.js} +1 -1
  318. package/dist/client/assets/{use-create-virtual-mcp-dBeQ8KM_.js → use-create-virtual-mcp-Dpe8iA_9.js} +1 -1
  319. package/dist/client/assets/{use-date-fns-locale-DBqQ9Xwt.js → use-date-fns-locale-BGkTB4Mm.js} +1 -1
  320. package/dist/client/assets/{use-debounced-autosave-B_kpX8YN.js → use-debounced-autosave-BhCHbQGN.js} +1 -1
  321. package/dist/client/assets/{use-debounced-value-Br6JzfN-.js → use-debounced-value-Cm7nwcam.js} +1 -1
  322. package/dist/client/assets/{use-deco-credits-DhL8Ql0T.js → use-deco-credits-BgLGkCcl.js} +1 -1
  323. package/dist/client/assets/{use-decopilot-events-CuBncVze.js → use-decopilot-events-C_BQo06W.js} +1 -1
  324. package/dist/client/assets/{use-delete-connection-DuErB0IF.js → use-delete-connection-BEv8pmzy.js} +1 -1
  325. package/dist/client/assets/{use-deployment-admin-BOXhbvir.js → use-deployment-admin-Ck9xx8zz.js} +1 -1
  326. package/dist/client/assets/use-fast-preview-draft-url-B7ECUHMP.js +1 -0
  327. package/dist/client/assets/{use-file-configs-B_k4AoEo.js → use-file-configs-C7kUU5_U.js} +1 -1
  328. package/dist/client/assets/{use-inbox-feed-D96kN3Ph.js → use-inbox-feed-U2BOY_0m.js} +1 -1
  329. package/dist/client/assets/{use-infinite-scroll-Ba0Xf9MO.js → use-infinite-scroll-CpvqXWve.js} +1 -1
  330. package/dist/client/assets/{use-join-requests-DNpCy_xv.js → use-join-requests-ldwvbhU3.js} +1 -1
  331. package/dist/client/assets/{use-main-panel-tabs-BndsHuRH.js → use-main-panel-tabs-BvDesOKd.js} +1 -1
  332. package/dist/client/assets/{use-mcp-auth-status-BOQ5PtOH.js → use-mcp-auth-status-D6FLEMEz.js} +1 -1
  333. package/dist/client/assets/{use-mcp-client-2WkK0AxE.js → use-mcp-client-Cby5XqT6.js} +1 -1
  334. package/dist/client/assets/{use-mcp-prompts-BY0itm-N.js → use-mcp-prompts-DpGHOlEI.js} +1 -1
  335. package/dist/client/assets/{use-mcp-tools-Wkfd46Rr.js → use-mcp-tools-7EpnWJvB.js} +1 -1
  336. package/dist/client/assets/{use-members-Cl1_-fx1.js → use-members-oF45MDF1.js} +1 -1
  337. package/dist/client/assets/{use-mobile-BAnIvR27.js → use-mobile-h4hHhZkm.js} +1 -1
  338. package/dist/client/assets/{use-move-blocks-lN8kagdi.js → use-move-blocks-DFQHiQ1n.js} +1 -1
  339. package/dist/client/assets/{use-navigate-to-agent-C2NQ-36B.js → use-navigate-to-agent-DwJfjSMG.js} +1 -1
  340. package/dist/client/assets/{use-open-billing-url-Bewtr0D-.js → use-open-billing-url-CjWCFQM1.js} +1 -1
  341. package/dist/client/assets/{use-org-auth-client-vWdVrvgR.js → use-org-auth-client-BFDehTsp.js} +1 -1
  342. package/dist/client/assets/{use-org-fs-CxjQMzFd.js → use-org-fs-CyxFz8rw.js} +1 -1
  343. package/dist/client/assets/{use-org-repo-syncs-dRJpc7Ti.js → use-org-repo-syncs-BsUWjWH7.js} +1 -1
  344. package/dist/client/assets/{use-org-sso-BnFa9r-G.js → use-org-sso-D5M4Sxwu.js} +1 -1
  345. package/dist/client/assets/{use-organization-roles-D9hV-WPT.js → use-organization-roles-t12r77qZ.js} +1 -1
  346. package/dist/client/assets/{use-organization-settings-CE5BJyh9.js → use-organization-settings-NOur1Lvu.js} +1 -1
  347. package/dist/client/assets/{use-panel-navigate-CXkMPISv.js → use-panel-navigate-DxGjTjIo.js} +1 -1
  348. package/dist/client/assets/{use-project-native-view-presence-D4-BL2Rg.js → use-project-native-view-presence-USh7_bNt.js} +1 -1
  349. package/dist/client/assets/{use-project-scope-BOj2O9A_.js → use-project-scope-CBw0FSEz.js} +1 -1
  350. package/dist/client/assets/{use-recent-apps-Cj-iBJUa.js → use-recent-apps-B2LVD6z4.js} +1 -1
  351. package/dist/client/assets/{use-releases-2-Z6BMdW.js → use-releases-x9nrIfuE.js} +1 -1
  352. package/dist/client/assets/{use-reports-diagnostic-D--oIp45.js → use-reports-diagnostic-qSw4HttT.js} +1 -1
  353. package/dist/client/assets/{use-sandbox-events-BVhJrX2Z.js → use-sandbox-events-D98uWMd_.js} +1 -1
  354. package/dist/client/assets/{use-secrets-CQ9dfY46.js → use-secrets-CvBGDTuP.js} +1 -1
  355. package/dist/client/assets/{use-section-preview-base-CrcAXE9z.js → use-section-preview-base-DmjOJ885.js} +1 -1
  356. package/dist/client/assets/{use-session-runtime-CqJF6neP.js → use-session-runtime-BrkTaSa6.js} +1 -1
  357. package/dist/client/assets/{use-sidebar-collapsed-NZNztmvG.js → use-sidebar-collapsed-Bijbdhqq.js} +1 -1
  358. package/dist/client/assets/{use-tags-BG7cxCCb.js → use-tags-BMQZw2TW.js} +1 -1
  359. package/dist/client/assets/{use-task-board-analytics-BhvhSxL9.js → use-task-board-analytics-DdtvZ4ju.js} +1 -1
  360. package/dist/client/assets/{use-task-board-events-CtQgceab.js → use-task-board-events-B5yNhg5i.js} +1 -1
  361. package/dist/client/assets/{use-task-board-item-prs-Dp099nXL.js → use-task-board-item-prs-D9gfgNig.js} +1 -1
  362. package/dist/client/assets/{use-task-metadata-BBoC1uvX.js → use-task-metadata-DuF2rBuH.js} +1 -1
  363. package/dist/client/assets/{use-thread-analytics-g0_FCkSl.js → use-thread-analytics-B03W7aQi.js} +1 -1
  364. package/dist/client/assets/{use-thread-outputs-C38yfNsJ.js → use-thread-outputs-D_k8NizM.js} +1 -1
  365. package/dist/client/assets/useInfiniteQuery-Dobhsojg.js +1 -0
  366. package/dist/client/assets/{useQueries-DSs3oNbf.js → useQueries-BSehCBUp.js} +1 -1
  367. package/dist/client/assets/useSuspenseInfiniteQuery-CqyfVE9R.js +1 -0
  368. package/dist/client/assets/{users-BAyRTNUi.js → users-Cej3U7P5.js} +1 -1
  369. package/dist/client/assets/{utils-t1gjPfET.js → utils-CkwBhBMS.js} +1 -1
  370. package/dist/client/assets/{variant-calendar-BYITnHO8.js → variant-calendar-kJB8Qi3I.js} +1 -1
  371. package/dist/client/assets/variant-draft-pointer-BeAKcq_c.js +1 -0
  372. package/dist/client/assets/variant-matcher-override-XY7K79P5.js +1 -0
  373. package/dist/client/assets/{virtual-mcp-cTWrWR4Y.js → virtual-mcp-BzmRbmfQ.js} +1 -1
  374. package/dist/client/assets/{watch-sse-pool-C9NPGTmI.js → watch-sse-pool-CmsmQLFo.js} +1 -1
  375. package/dist/client/index.html +1 -1
  376. package/dist/server/server.js +628 -628
  377. package/package.json +1 -1
  378. package/dist/client/assets/agent-analytics-Cb2tda3-.js +0 -1
  379. package/dist/client/assets/agent-app-HX00w6TV.js +0 -1
  380. package/dist/client/assets/agent-calendar-DCHNIRTc.js +0 -1
  381. package/dist/client/assets/agent-deck-BV-5B8og.js +0 -1
  382. package/dist/client/assets/agent-experiments-DetDutY3.js +0 -1
  383. package/dist/client/assets/agent-file-BvfhZ3mT.js +0 -1
  384. package/dist/client/assets/agent-library-DSuyqe6T.js +0 -1
  385. package/dist/client/assets/agent-library-file-B1l2ZLvA.js +0 -1
  386. package/dist/client/assets/agent-releases-rSbadgkl.js +0 -2
  387. package/dist/client/assets/agent-settings-DCjo4ZYC.js +0 -1
  388. package/dist/client/assets/agent-site-editor-code-BVwfCzHc.js +0 -2
  389. package/dist/client/assets/agent-site-editor-content-BU-vFmu-.js +0 -1
  390. package/dist/client/assets/agent-site-editor-preview-Coo-Ni4u.js +0 -1
  391. package/dist/client/assets/agent-view-CftHb5tC.js +0 -1
  392. package/dist/client/assets/api-keys-jGYtI-cW.js +0 -1
  393. package/dist/client/assets/category-editor-jRguVRoH.js +0 -1
  394. package/dist/client/assets/cms-settings-editor-BAGntXvx.js +0 -1
  395. package/dist/client/assets/hosted-publish-api-Cg6A3e6a.js +0 -1
  396. package/dist/client/assets/hosted-publish-feedback-R86hK4rw.js +0 -1
  397. package/dist/client/assets/library-CEpc5ko6.js +0 -1
  398. package/dist/client/assets/preview-tab-ztwq5J9Z.js +0 -551
  399. package/dist/client/assets/project-reports-BRMk8sbv.js +0 -1
  400. package/dist/client/assets/project-tasks-DPFfk-Co.js +0 -1
  401. package/dist/client/assets/record-editor-CmI7uwKH.js +0 -1
  402. package/dist/client/assets/releases-api-DbKlRR9w.js +0 -1
  403. package/dist/client/assets/reports-BKtNuFy0.js +0 -1
  404. package/dist/client/assets/repositories-CszhODTX.js +0 -1
  405. package/dist/client/assets/route-_su_B2um.js +0 -1
  406. package/dist/client/assets/settings-tab-D08h17sS.js +0 -1
  407. package/dist/client/assets/site-draft-actions-B1VIigls.js +0 -12
  408. package/dist/client/assets/site-draft-view-BvQXujRd.js +0 -2
  409. package/dist/client/assets/site-editor-B8qpeTpl.js +0 -1
  410. package/dist/client/assets/tasks-Zus8qgLK.js +0 -1
  411. package/dist/client/assets/use-fast-preview-draft-url-BPrZ2XMf.js +0 -1
  412. package/dist/client/assets/useInfiniteQuery-CxzyY6DS.js +0 -1
  413. package/dist/client/assets/useSuspenseInfiniteQuery-CWvS_hOW.js +0 -1
  414. package/dist/client/assets/variant-draft-pointer-Cjn_TXkR.js +0 -1
@@ -1 +0,0 @@
1
- import{c as m,j as r}from"./index-BeWb3VLq.js";import{C as i}from"./index-CqllmV-p.js";import{R as p}from"./reports-tab-B_Sk2TLl.js";import"./use-mobile-BAnIvR27.js";import"./use-sidebar-collapsed-NZNztmvG.js";import"./use-chat-layout-state-CWI-mwQI.js";import"./thread-route-BPSSuk8V.js";import"./use-panel-navigate-CXkMPISv.js";import"./use-project-scope-BOj2O9A_.js";import"./repository-binding-Cf_thK-b.js";import"./use-mcp-client-2WkK0AxE.js";import"./auth-DVebpHI3.js";import"./thread-intent-CoB1rbzj.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-C9NPGTmI.js";import"./task-board-ByNQwZsl.js";import"./schema-b5uziS6S.js";import"./slugify-CEUa2lfQ.js";import"./agent-icon-CiKTiUdq.js";import"./AlertCircle-Cch634f7.js";import"./Tool01-2gJDR0Ho.js";import"./ArrowUp-DLUdomd9.js";import"./ArrowLeft-CohopnCT.js";import"./LinkBroken01-Dioz3u9i.js";import"./ShoppingBag01-BStpgW0a.js";import"./ZoomOut-DixQygt2.js";import"./Building02-BHJQSDUK.js";import"./CheckCircle-Cs8i9zYt.js";import"./ChevronUp-BT7eMKPK.js";import"./ChevronSelectorVertical-C5d75KyY.js";import"./UserSquare-pmxb5ZdZ.js";import"./Copy01-B341DqLV.js";import"./CreditCard01-4Fwr0tNh.js";import"./DotsVertical-DbrlDgFh.js";import"./Image01-hTzc15CE.js";import"./Globe04-BE6c1UDj.js";import"./SwitchHorizontal01-CrC4ThKg.js";import"./Key01-kTu6t6u_.js";import"./Link01-hfA48cFL.js";import"./Minus-DqDPTtRG.js";import"./Monitor01-Bz6QaUO4.js";import"./Sun-C37Hpdko.js";import"./Play-CByslM3d.js";import"./Plus-Dewm72je.js";import"./SearchMd-7Jo0ZofC.js";import"./Trash01-DjE7Raat.js";import"./Upload01-CYfTR3aZ.js";import"./User01-X6IeKYZH.js";import"./Users01-uKJoVSle.js";import"./XClose-BVxVAZ6V.js";import"./tooltip-4vv5k-uR.js";import"./index-CdhgpKbn.js";import"./toolbar-icon-button-DKjsnGdZ.js";import"./shell-layout-Dpds4_um.js";import"./avatar-DjIkOwsx.js";import"./use-clock-tick-DE4s8Okz.js";import"./command-KmLWWmqo.js";import"./index-BliYmmPu.js";import"./integration-icon-VoZokpOe.js";import"./project-icon-Ds8VtVRG.js";import"./new-project-dialog-DfI138Mw.js";import"./label-TKhfC6jr.js";import"./repository-import-picker-BOku3VrR.js";import"./use-navigate-to-agent-C2NQ-36B.js";import"./repository-picker-CeCsQGv8.js";import"./useInfiniteQuery-CxzyY6DS.js";import"./infiniteQueryObserver-BOCgDRcQ.js";import"./collection-search-7sBPioRN.js";import"./use-debounced-value-Br6JzfN-.js";import"./use-organization-settings-CE5BJyh9.js";import"./required-auth-layout-DhxdstQv.js";import"./autosend-BTx7-p6a.js";import"./use-org-sso-BnFa9r-G.js";import"./sheet-DdrzSnyB.js";import"./resizable-BySAwPSW.js";import"./site-url-en5df9c-.js";import"./use-reports-diagnostic-D--oIp45.js";import"./companions-core-DzyeM-yJ.js";import"./metadata-D72DunRR.js";import"./github-repo-scope-ByTYKy_L.js";import"./mini-report-page-BSYlfSmZ.js";import"./self-tool-result-8OxPN9Nm.js";import"./site-error-Da6iapvu.js";import"./projects-empty-state-CmS_yrG7.js";import"./project-profile-Cc4MG3QN.js";function Ft(){const o=m.c(1);let t;return o[0]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx(i.Content,{children:r.jsx(p,{})}),o[0]=t):t=o[0],t}export{Ft as default};
@@ -1 +0,0 @@
1
- import{c as l,a2 as n,j as r,K as f}from"./index-BeWb3VLq.js";import{C as d}from"./index-CqllmV-p.js";import{m as u,P as x,T as h}from"./mock-board-BCQJ9AHq.js";import{F as j}from"./feature-gate-4u7sb4lR.js";import"./use-mobile-BAnIvR27.js";import"./use-sidebar-collapsed-NZNztmvG.js";import"./use-chat-layout-state-CWI-mwQI.js";import"./thread-route-BPSSuk8V.js";import"./use-panel-navigate-CXkMPISv.js";import"./use-project-scope-BOj2O9A_.js";import"./repository-binding-Cf_thK-b.js";import"./use-mcp-client-2WkK0AxE.js";import"./auth-DVebpHI3.js";import"./thread-intent-CoB1rbzj.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-C9NPGTmI.js";import"./task-board-ByNQwZsl.js";import"./schema-b5uziS6S.js";import"./slugify-CEUa2lfQ.js";import"./agent-icon-CiKTiUdq.js";import"./AlertCircle-Cch634f7.js";import"./Tool01-2gJDR0Ho.js";import"./ArrowUp-DLUdomd9.js";import"./ArrowLeft-CohopnCT.js";import"./LinkBroken01-Dioz3u9i.js";import"./ShoppingBag01-BStpgW0a.js";import"./ZoomOut-DixQygt2.js";import"./Building02-BHJQSDUK.js";import"./CheckCircle-Cs8i9zYt.js";import"./ChevronUp-BT7eMKPK.js";import"./ChevronSelectorVertical-C5d75KyY.js";import"./UserSquare-pmxb5ZdZ.js";import"./Copy01-B341DqLV.js";import"./CreditCard01-4Fwr0tNh.js";import"./DotsVertical-DbrlDgFh.js";import"./Image01-hTzc15CE.js";import"./Globe04-BE6c1UDj.js";import"./SwitchHorizontal01-CrC4ThKg.js";import"./Key01-kTu6t6u_.js";import"./Link01-hfA48cFL.js";import"./Minus-DqDPTtRG.js";import"./Monitor01-Bz6QaUO4.js";import"./Sun-C37Hpdko.js";import"./Play-CByslM3d.js";import"./Plus-Dewm72je.js";import"./SearchMd-7Jo0ZofC.js";import"./Trash01-DjE7Raat.js";import"./Upload01-CYfTR3aZ.js";import"./User01-X6IeKYZH.js";import"./Users01-uKJoVSle.js";import"./XClose-BVxVAZ6V.js";import"./tooltip-4vv5k-uR.js";import"./index-CdhgpKbn.js";import"./toolbar-icon-button-DKjsnGdZ.js";import"./shell-layout-Dpds4_um.js";import"./avatar-DjIkOwsx.js";import"./use-clock-tick-DE4s8Okz.js";import"./command-KmLWWmqo.js";import"./index-BliYmmPu.js";import"./integration-icon-VoZokpOe.js";import"./project-icon-Ds8VtVRG.js";import"./new-project-dialog-DfI138Mw.js";import"./label-TKhfC6jr.js";import"./repository-import-picker-BOku3VrR.js";import"./use-navigate-to-agent-C2NQ-36B.js";import"./repository-picker-CeCsQGv8.js";import"./useInfiniteQuery-CxzyY6DS.js";import"./infiniteQueryObserver-BOCgDRcQ.js";import"./collection-search-7sBPioRN.js";import"./use-debounced-value-Br6JzfN-.js";import"./use-organization-settings-CE5BJyh9.js";import"./required-auth-layout-DhxdstQv.js";import"./autosend-BTx7-p6a.js";import"./use-org-sso-BnFa9r-G.js";import"./sheet-DdrzSnyB.js";import"./resizable-BySAwPSW.js";import"./core.esm-BmE_KURk.js";import"./sortable.esm-CE2eXOQU.js";import"./use-task-board-analytics-BhvhSxL9.js";import"./combobox-CEzxugDA.js";import"./popover-s88DXvPL.js";import"./usage-stats-CKpL0uWf.js";import"./tool-namespace-DePiqr-m.js";import"./form-BGI3x6he.js";import"./utils-CVEq3hMx.js";import"./markdown-D_Bab0vD.js";import"./use-copy-C4LbXPXl.js";import"./location-V0VwTJTt.js";import"./format-time-Cq80KKvY.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-decopilot-events-CuBncVze.js";import"./chat-context-BEyCIAaN.js";import"./use-ai-providers-Ct47MIru.js";import"./suggestion-Bu3BweEe.js";import"./column-rules-CBkHBJjn.js";import"./badge-BfMggcm8.js";import"./icon-button-Du_O8eku.js";import"./switch-BI2l0q9a.js";import"./textarea-7I-DLD6x.js";import"./use-org-fs-CxjQMzFd.js";import"./use-automations-Ho0ayZT_.js";import"./search-toggle-IRNGzCzn.js";import"./daily-pulse-Cj6zflmn.js";import"./use-task-board-events-CtQgceab.js";import"./config-0t8v4_10.js";import"./use-members-Cl1_-fx1.js";import"./use-org-auth-client-vWdVrvgR.js";import"./select-H4FJk0rp.js";import"./index-BdQq_4o_.js";import"./task-route-B8oSJFnj.js";import"./task-key-BCHdFiOO.js";import"./task-assignee-avatar-B4jYRjC8.js";import"./use-tags-BG7cxCCb.js";import"./calendar-kdikRXDO.js";import"./alert-DlpN1nbO.js";import"./collapsible-BcZaehP2.js";import"./index-CkwxAoM4.js";import"./editor-classes-BaBC2QPU.js";import"./index-Dw3D39xs.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./use-task-board-item-prs-Dp099nXL.js";import"./use-connection-HenJjVMr.js";import"./github-repo-scope-ByTYKy_L.js";import"./thread-sheet-body-DyDxpawL.js";import"./useSuspenseInfiniteQuery-CWvS_hOW.js";import"./pair-v8_ULhan.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-C5DYTOzS.js";import"./types-CNU-uWw-.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./use-mcp-prompts-BY0itm-N.js";import"./use-thread-outputs-C38yfNsJ.js";import"./file-type-icon-DYeFNgMs.js";import"./use-infinite-scroll-Ba0Xf9MO.js";import"./task-status-GAY2L2Vz.js";import"./use-open-billing-url-Bewtr0D-.js";import"./chat-draft-Dql_zG1A.js";import"./separator-l8ktDBQ-.js";import"./feature-paywall-BsVH1P4Z.js";import"./plan-ladder-CtR99jrd.js";function a(){const t=l.c(1);let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx("div",{className:"flex h-full min-h-0 flex-col overflow-hidden",children:r.jsx(h,{})}),t[0]=o):o=t[0],o}function Xo(){const t=l.c(8),{locator:o}=n();let i;t[0]!==o?(i=c=>c.setQueryData(f.taskBoardItems(o),u()),t[0]=o,t[1]=i):i=t[1];let p;t[2]===Symbol.for("react.memo_cache_sentinel")?(p=r.jsx(a,{}),t[2]=p):p=t[2];let m;t[3]!==i?(m=r.jsx(x,{seed:i,children:p}),t[3]=i,t[4]=m):m=t[4];let e;t[5]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx(a,{}),t[5]=e):e=t[5];let s;return t[6]!==m?(s=r.jsx(d.Content,{children:r.jsx(j,{feature:"kanban",backdrop:m,children:e})}),t[6]=m,t[7]=s):s=t[7],s}export{Xo as default};
@@ -1 +0,0 @@
1
- import{c as _,b as $,j as o,I as q}from"./index-BeWb3VLq.js";import{L as J}from"./label-TKhfC6jr.js";import{S as G,b as H,a as Q,d as X,c as Y}from"./select-H4FJk0rp.js";import{T as Z}from"./textarea-7I-DLD6x.js";import{u as tt,E as et,a as ot,K as rt}from"./runnable-block-editor-Bod17qTV.js";import{u as it}from"./chat-context-BEyCIAaN.js";import{g as mt,O as pt,e as V}from"./content-tab-B8CAyeYn.js";import{b as at,C as st}from"./blog-schema-B8hGgOKc.js";import{u as lt}from"./use-autosave-DzNsVsl3.js";import"./index-BdQq_4o_.js";import"./index-CdhgpKbn.js";import"./ChevronUp-BT7eMKPK.js";import"./utils-t1gjPfET.js";import"./ZoomOut-DixQygt2.js";import"./Image01-hTzc15CE.js";import"./agent-icon-CiKTiUdq.js";import"./AlertCircle-Cch634f7.js";import"./Tool01-2gJDR0Ho.js";import"./ArrowUp-DLUdomd9.js";import"./ArrowLeft-CohopnCT.js";import"./LinkBroken01-Dioz3u9i.js";import"./ShoppingBag01-BStpgW0a.js";import"./Building02-BHJQSDUK.js";import"./CheckCircle-Cs8i9zYt.js";import"./ChevronSelectorVertical-C5d75KyY.js";import"./UserSquare-pmxb5ZdZ.js";import"./Copy01-B341DqLV.js";import"./CreditCard01-4Fwr0tNh.js";import"./DotsVertical-DbrlDgFh.js";import"./Globe04-BE6c1UDj.js";import"./SwitchHorizontal01-CrC4ThKg.js";import"./Key01-kTu6t6u_.js";import"./Link01-hfA48cFL.js";import"./Minus-DqDPTtRG.js";import"./Monitor01-Bz6QaUO4.js";import"./Sun-C37Hpdko.js";import"./Play-CByslM3d.js";import"./Plus-Dewm72je.js";import"./SearchMd-7Jo0ZofC.js";import"./Trash01-DjE7Raat.js";import"./Upload01-CYfTR3aZ.js";import"./User01-X6IeKYZH.js";import"./Users01-uKJoVSle.js";import"./XClose-BVxVAZ6V.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-v8_ULhan.js";import"./format-time-Cq80KKvY.js";import"./differenceInSeconds-C3x8sHUj.js";import"./collapsible-BcZaehP2.js";import"./use-copy-C4LbXPXl.js";import"./usage-stats-CKpL0uWf.js";import"./tool-namespace-DePiqr-m.js";import"./form-BGI3x6he.js";import"./utils-CVEq3hMx.js";import"./markdown-D_Bab0vD.js";import"./location-V0VwTJTt.js";import"./use-mobile-BAnIvR27.js";import"./use-panel-navigate-CXkMPISv.js";import"./thread-route-BPSSuk8V.js";import"./use-project-scope-BOj2O9A_.js";import"./repository-binding-Cf_thK-b.js";import"./use-mcp-client-2WkK0AxE.js";import"./auth-DVebpHI3.js";import"./tooltip-4vv5k-uR.js";import"./use-decopilot-events-CuBncVze.js";import"./thread-intent-CoB1rbzj.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-C9NPGTmI.js";import"./task-board-ByNQwZsl.js";import"./schema-b5uziS6S.js";import"./slugify-CEUa2lfQ.js";import"./use-clock-tick-DE4s8Okz.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-C5DYTOzS.js";import"./types-CNU-uWw-.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./shell-layout-Dpds4_um.js";import"./avatar-DjIkOwsx.js";import"./command-KmLWWmqo.js";import"./index-BliYmmPu.js";import"./integration-icon-VoZokpOe.js";import"./project-icon-Ds8VtVRG.js";import"./new-project-dialog-DfI138Mw.js";import"./repository-import-picker-BOku3VrR.js";import"./use-navigate-to-agent-C2NQ-36B.js";import"./repository-picker-CeCsQGv8.js";import"./useInfiniteQuery-CxzyY6DS.js";import"./infiniteQueryObserver-BOCgDRcQ.js";import"./collection-search-7sBPioRN.js";import"./use-debounced-value-Br6JzfN-.js";import"./use-organization-settings-CE5BJyh9.js";import"./required-auth-layout-DhxdstQv.js";import"./autosend-BTx7-p6a.js";import"./use-org-sso-BnFa9r-G.js";import"./sheet-DdrzSnyB.js";import"./use-connection-HenJjVMr.js";import"./use-mcp-prompts-BY0itm-N.js";import"./use-thread-outputs-C38yfNsJ.js";import"./file-type-icon-DYeFNgMs.js";import"./secret-ciphertext-CKG2rzpX.js";import"./alert-DlpN1nbO.js";import"./parse-sections-CigeyiXV.js";import"./switch-BI2l0q9a.js";import"./site-editor-toast-C48kJZ8y.js";import"./use-session-runtime-CqJF6neP.js";import"./experiments-tab-choice-CQ5EsK8h.js";import"./sandbox-url-D3mC8qhT.js";import"./use-sandbox-events-BVhJrX2Z.js";import"./sandbox-git-api-CH_-QFpD.js";import"./popover-s88DXvPL.js";import"./blocks-tab-states-5tpSikld.js";import"./slider-tSRa1HDF.js";import"./index-BEaGR-Ng.js";import"./tooltipContext-B3bWUtmi.js";import"./CategoricalChart-BCAB1JR1.js";import"./index-DVxNOEMj.js";import"./ActiveShapeUtils-BB436TvV.js";import"./Sector-D64VY8hG.js";import"./symbol-CW0bfPL3.js";import"./empty-state-B4dSQMeM.js";import"./scroll-area-BVZXqx5M.js";import"./monaco-editor-CVRVgXSh.js";import"./editor-DAekV0he.js";import"./calendar-kdikRXDO.js";import"./editor-classes-BaBC2QPU.js";import"./core.esm-BmE_KURk.js";import"./sortable.esm-CE2eXOQU.js";import"./toggle-group-BngkTNsG.js";import"./active-indicator-CCMhAsc_.js";import"./combobox-CEzxugDA.js";import"./alert-dialog-BdWXpnme.js";import"./search-input-BL6XGlmm.js";import"./tabs-Cw5epDK7.js";import"./use-file-configs-B_k4AoEo.js";import"./asset-utils-CYj7sEud.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-ai-providers-Ct47MIru.js";import"./mustache-B20fDMb8.js";import"./use-content-sync-C0CqYtRD.js";import"./sandbox-lifecycle-context-CCjKxqdS.js";import"./checkbox-R6Pm_B33.js";import"./date-utils-CrvIKg-s.js";import"./use-move-blocks-lN8kagdi.js";import"./badge-BfMggcm8.js";import"./empty-state-wXIjf_EN.js";const M={authors:[{key:"name",labelKey:"sandbox.recordEditor.fieldName",widget:"text"},{key:"type",labelKey:"sandbox.recordEditor.fieldType",widget:"select",options:[{value:"Person",labelKey:"sandbox.recordEditor.optionPerson"},{value:"Organization",labelKey:"sandbox.recordEditor.optionOrganization"}]},{key:"email",labelKey:"sandbox.recordEditor.fieldEmail",widget:"text",placeholderKey:"sandbox.recordEditor.placeholderEmail"},{key:"jobTitle",labelKey:"sandbox.recordEditor.fieldJobTitle",widget:"text"},{key:"company",labelKey:"sandbox.recordEditor.fieldCompany",widget:"text"},{key:"url",labelKey:"sandbox.recordEditor.fieldUrl",widget:"text",placeholderKey:"sandbox.recordEditor.placeholderUrl"},{key:"avatar",labelKey:"sandbox.recordEditor.fieldAvatar",widget:"image"}]},nt={authors:new Set(M.authors.map(T=>T.key))},ct={authors:"sandbox.recordEditor.titleAuthor"};function Xo(T){const t=_.c(61),{orgSlug:n,virtualMcpId:c,branch:d,kind:p,blockKey:K,block:B,meta:y,decofile:R}=T,i=$(),L=it()?.taskId??null;let f;t[0]!==d||t[1]!==n||t[2]!==c?(f={orgSlug:n,virtualMcpId:c,branch:d},t[0]=d,t[1]=n,t[2]=c,t[3]=f):f=t[3];const r=tt(f);let w;t[4]!==B||t[5]!==p?(w=mt(B,p),t[4]=B,t[5]=p,t[6]=w):w=t[6];const W=w,O=nt[p];let S;t[7]!==p||t[8]!==y||t[9]!==O?(S=at(p,y,O),t[7]=p,t[8]=y,t[9]=O,t[10]=S):S=t[10];const A=S;let P;t[11]!==r?(P=ot((s,e)=>r.mutate({blockKey:s,data:e})),t[11]=r,t[12]=P):P=t[12];const z=P;let C;t[13]!==K||t[14]!==p||t[15]!==r?(C=s=>{r.mutate({blockKey:K,data:pt(K,p,s)})},t[13]=K,t[14]=p,t[15]=r,t[16]=C):C=t[16];let F;t[17]!==r.isPending?(F={isSaving:r.isPending},t[17]=r.isPending,t[18]=F):F=t[18];const[m,x]=lt(W,C,F);let N;t[19]!==m||t[20]!==x?(N=(s,e)=>x({...m,[s]:e}),t[19]=m,t[20]=x,t[21]=N):N=t[21];const l=N,D=ct[p];let u;t[22]!==i||t[23]!==D?(u=i(D),t[22]=i,t[23]=D,t[24]=u):u=t[24];let h;t[25]!==u?(h=o.jsx("span",{className:"text-sm font-medium",children:u}),t[25]=u,t[26]=h):h=t[26];let b;t[27]!==r.isError||t[28]!==r.isPending?(b=o.jsx(et,{isPending:r.isPending,isError:r.isError}),t[27]=r.isError,t[28]=r.isPending,t[29]=b):b=t[29];let g;t[30]!==h||t[31]!==b?(g=o.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[h,b]}),t[30]=h,t[31]=b,t[32]=g):g=t[32];const U=M[p];let k;if(t[33]!==m||t[34]!==l||t[35]!==i||t[36]!==U){let s;t[38]!==m||t[39]!==l||t[40]!==i?(s=e=>o.jsx("div",{className:"space-y-2",children:e.widget==="image"?o.jsx(rt,{schema:{type:"string",format:"image-uri",title:i(e.labelKey)},value:m[e.key],onChange:a=>l(e.key,a),path:e.key,label:i(e.labelKey)}):e.widget==="select"?o.jsxs(o.Fragment,{children:[o.jsx(J,{htmlFor:e.key,children:i(e.labelKey)}),o.jsxs(G,{value:V(m[e.key])||e.options?.[0]?.value,onValueChange:a=>l(e.key,a),children:[o.jsx(H,{id:e.key,className:"h-10 w-full",children:o.jsx(Q,{placeholder:i(e.labelKey)})}),o.jsx(X,{children:(e.options??[]).map(a=>o.jsx(Y,{value:a.value,children:i(a.labelKey)},a.value))})]})]}):o.jsxs(o.Fragment,{children:[o.jsx(J,{htmlFor:e.key,children:i(e.labelKey)}),e.widget==="textarea"?o.jsx(Z,{id:e.key,value:V(m[e.key]),onChange:a=>l(e.key,a.target.value),rows:3}):o.jsx(q,{id:e.key,value:V(m[e.key]),placeholder:e.placeholderKey?i(e.placeholderKey):void 0,onChange:a=>l(e.key,a.target.value),className:"h-10"})]})},e.key),t[38]=m,t[39]=l,t[40]=i,t[41]=s):s=t[41],k=U.map(s),t[33]=m,t[34]=l,t[35]=i,t[36]=U,t[37]=k}else k=t[37];let v;t[42]!==d||t[43]!==n||t[44]!==L||t[45]!==c?(v={orgSlug:n,virtualMcpId:c,branch:d,threadId:L},t[42]=d,t[43]=n,t[44]=L,t[45]=c,t[46]=v):v=t[46];let E;t[47]!==A||t[48]!==R||t[49]!==y||t[50]!==m||t[51]!==z||t[52]!==x||t[53]!==v?(E=o.jsx(st,{schema:A,value:m,onChange:x,basePath:"author",meta:y,decofile:R,sandbox:v,onSaveReferencedBlock:z}),t[47]=A,t[48]=R,t[49]=y,t[50]=m,t[51]=z,t[52]=x,t[53]=v,t[54]=E):E=t[54];let j;t[55]!==k||t[56]!==E?(j=o.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto px-6 py-6",children:o.jsxs("div",{className:"mx-auto max-w-xl space-y-6",children:[k,E]})}),t[55]=k,t[56]=E,t[57]=j):j=t[57];let I;return t[58]!==g||t[59]!==j?(I=o.jsxs("div",{className:"flex h-full flex-col",children:[g,j]}),t[58]=g,t[59]=j,t[60]=I):I=t[60],I}export{Xo as RecordEditor};
@@ -1 +0,0 @@
1
- import{c as u,e as P,m as k,K as w}from"./index-BeWb3VLq.js";import{u as q}from"./useInfiniteQuery-CxzyY6DS.js";import{u as _}from"./chat-context-BEyCIAaN.js";import{G as d}from"./site-editor-toast-C48kJZ8y.js";import{u as C}from"./use-content-sync-C0CqYtRD.js";import{r as U}from"./hosted-publish-api-Cg6A3e6a.js";const O="__at=",E="__test=",x=/^[0-9a-f]{40}$/;function A(e){return e.at!==void 0||Object.keys(e.tests??{}).length>0}function l(e){return typeof e=="string"&&x.test(e)}function R(e){return encodeURIComponent(e).replace(/[!'()*]/g,r=>`%${r.charCodeAt(0).toString(16).toUpperCase()}`)}function j(e){const r=e.tests??{};return[...e.at!==void 0?[O+R(e.at)]:[],...Object.keys(r).map(t=>E+R(`${t}=${r[t]?"on":"off"}`))]}function p(e,r){const n=[...e.split("&").filter(s=>s&&!s.startsWith(O)&&!s.startsWith(E)),...r];return n.length>0?`?${n.join("&")}`:""}function $(e,r){const t=j(r),n=e.indexOf("?"),s=n===-1?e:e.slice(0,n);if(l(s))return s+p(n===-1?"":e.slice(n+1),t);const a=e.lastIndexOf("@");if(a<=0)return e;const o=e.slice(0,a),c=o.indexOf("?"),i=c===-1?o:o.slice(0,c),f=c===-1?"":o.slice(c+1);return`${i}${p(f,t)}${e.slice(a)}`}function W(e,r,t){if(!A(r))return e;try{const n=new URL(e),s=n.searchParams.get("__draft");return s&&s!=="off"?(n.searchParams.set("__draft",$(s,r)),n.toString()):l(t)?(n.searchParams.set("__draft",$(t,r)),n.toString()):e}catch{return e}}function Y(e,r,t="/"){if(!e||!l(r))return null;try{const n=new URL(t,e);return n.searchParams.set("__draft",r),n.toString()}catch{return null}}class F extends Error{constructor(r,t){super(r),this.code=t,this.name="HostedRequestError"}code}function m(e,r,t){return`/api/${e}/hosted/${encodeURIComponent(r)}/${t}`}async function h(e){const r=await e.json().catch(()=>({}));if(!e.ok)throw new F(r.error??`HTTP ${e.status}`,r.error??null);return r}function D(e,r,t){const n=u.c(12);let s;n[0]!==t?(s=t===void 0?{}:t,n[0]=t,n[1]=s):s=n[1];const a=s;let o;n[2]!==e||n[3]!==r?(o=w.hostedReleases(e,r),n[2]=e,n[3]=r,n[4]=o):o=n[4];const c=a.enabled??!0;let i;n[5]!==e||n[6]!==r?(i=async T=>{const{pageParam:y}=T,b=y?`?cursor=${encodeURIComponent(y)}`:"";return h(await fetch(m(e,r,`releases${b}`),{cache:"no-store"}))},n[5]=e,n[6]=r,n[7]=i):i=n[7];let f;return n[8]!==o||n[9]!==c||n[10]!==i?(f={queryKey:o,enabled:c,queryFn:i,initialPageParam:null,getNextPageParam:N},n[8]=o,n[9]=c,n[10]=i,n[11]=f):f=n[11],q(f)}function N(e){return e.nextCursor}function G(e,r,t,n){const s=u.c(13);let a;s[0]!==n||s[1]!==e||s[2]!==t||s[3]!==r?(a=w.hostedReapplyCheck(e,r,t,n),s[0]=n,s[1]=e,s[2]=t,s[3]=r,s[4]=a):a=s[4];const o=t!==null;let c;s[5]!==e||s[6]!==t||s[7]!==r?(c=async()=>h(await fetch(m(e,r,`releases/${encodeURIComponent(t??"")}/reapply`),{cache:"no-store"})),s[5]=e,s[6]=t,s[7]=r,s[8]=c):c=s[8];let i;return s[9]!==a||s[10]!==o||s[11]!==c?(i={queryKey:a,enabled:o,staleTime:Number.POSITIVE_INFINITY,retry:!1,queryFn:c},s[9]=a,s[10]=o,s[11]=c,s[12]=i):i=s[12],k(i)}function J(e,r){const t=u.c(8),n=_()?.currentBranch??null;let s;t[0]!==e||t[1]!==n||t[2]!==r?(s={orgSlug:e,virtualMcpId:r,branch:n},t[0]=e,t[1]=n,t[2]=r,t[3]=s):s=t[3];const a=C(s);let o;return t[4]!==a||t[5]!==e||t[6]!==r?(o={mutationFn:c=>d(a,{kind:"reapply",reread:!0,refreshOnError:!0,write:async()=>h(await fetch(m(e,r,`releases/${encodeURIComponent(c.sha)}/reapply`),{method:"POST"}))})},t[4]=a,t[5]=e,t[6]=r,t[7]=o):o=t[7],P(o)}function z(e,r){const t=u.c(8),n=_()?.currentBranch??null;let s;t[0]!==e||t[1]!==n||t[2]!==r?(s={orgSlug:e,virtualMcpId:r,branch:n},t[0]=e,t[1]=n,t[2]=r,t[3]=s):s=t[3];const a=C(s);let o;return t[4]!==a||t[5]!==e||t[6]!==r?(o={mutationFn:()=>d(a,{kind:"reapply",refreshOnError:!0,write:()=>U({orgSlug:e,virtualMcpId:r})})},t[4]=a,t[5]=e,t[6]=r,t[7]=o):o=t[7],P(o)}export{F as H,W as a,J as b,z as c,G as d,A as h,l as i,Y as r,D as u,$ as w};
@@ -1 +0,0 @@
1
- import{c as m,j as r}from"./index-BeWb3VLq.js";import{C as i}from"./index-CqllmV-p.js";import{R as p}from"./reports-tab-B_Sk2TLl.js";import"./use-mobile-BAnIvR27.js";import"./use-sidebar-collapsed-NZNztmvG.js";import"./use-chat-layout-state-CWI-mwQI.js";import"./thread-route-BPSSuk8V.js";import"./use-panel-navigate-CXkMPISv.js";import"./use-project-scope-BOj2O9A_.js";import"./repository-binding-Cf_thK-b.js";import"./use-mcp-client-2WkK0AxE.js";import"./auth-DVebpHI3.js";import"./thread-intent-CoB1rbzj.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-C9NPGTmI.js";import"./task-board-ByNQwZsl.js";import"./schema-b5uziS6S.js";import"./slugify-CEUa2lfQ.js";import"./agent-icon-CiKTiUdq.js";import"./AlertCircle-Cch634f7.js";import"./Tool01-2gJDR0Ho.js";import"./ArrowUp-DLUdomd9.js";import"./ArrowLeft-CohopnCT.js";import"./LinkBroken01-Dioz3u9i.js";import"./ShoppingBag01-BStpgW0a.js";import"./ZoomOut-DixQygt2.js";import"./Building02-BHJQSDUK.js";import"./CheckCircle-Cs8i9zYt.js";import"./ChevronUp-BT7eMKPK.js";import"./ChevronSelectorVertical-C5d75KyY.js";import"./UserSquare-pmxb5ZdZ.js";import"./Copy01-B341DqLV.js";import"./CreditCard01-4Fwr0tNh.js";import"./DotsVertical-DbrlDgFh.js";import"./Image01-hTzc15CE.js";import"./Globe04-BE6c1UDj.js";import"./SwitchHorizontal01-CrC4ThKg.js";import"./Key01-kTu6t6u_.js";import"./Link01-hfA48cFL.js";import"./Minus-DqDPTtRG.js";import"./Monitor01-Bz6QaUO4.js";import"./Sun-C37Hpdko.js";import"./Play-CByslM3d.js";import"./Plus-Dewm72je.js";import"./SearchMd-7Jo0ZofC.js";import"./Trash01-DjE7Raat.js";import"./Upload01-CYfTR3aZ.js";import"./User01-X6IeKYZH.js";import"./Users01-uKJoVSle.js";import"./XClose-BVxVAZ6V.js";import"./tooltip-4vv5k-uR.js";import"./index-CdhgpKbn.js";import"./toolbar-icon-button-DKjsnGdZ.js";import"./shell-layout-Dpds4_um.js";import"./avatar-DjIkOwsx.js";import"./use-clock-tick-DE4s8Okz.js";import"./command-KmLWWmqo.js";import"./index-BliYmmPu.js";import"./integration-icon-VoZokpOe.js";import"./project-icon-Ds8VtVRG.js";import"./new-project-dialog-DfI138Mw.js";import"./label-TKhfC6jr.js";import"./repository-import-picker-BOku3VrR.js";import"./use-navigate-to-agent-C2NQ-36B.js";import"./repository-picker-CeCsQGv8.js";import"./useInfiniteQuery-CxzyY6DS.js";import"./infiniteQueryObserver-BOCgDRcQ.js";import"./collection-search-7sBPioRN.js";import"./use-debounced-value-Br6JzfN-.js";import"./use-organization-settings-CE5BJyh9.js";import"./required-auth-layout-DhxdstQv.js";import"./autosend-BTx7-p6a.js";import"./use-org-sso-BnFa9r-G.js";import"./sheet-DdrzSnyB.js";import"./resizable-BySAwPSW.js";import"./site-url-en5df9c-.js";import"./use-reports-diagnostic-D--oIp45.js";import"./companions-core-DzyeM-yJ.js";import"./metadata-D72DunRR.js";import"./github-repo-scope-ByTYKy_L.js";import"./mini-report-page-BSYlfSmZ.js";import"./self-tool-result-8OxPN9Nm.js";import"./site-error-Da6iapvu.js";import"./projects-empty-state-CmS_yrG7.js";import"./project-profile-Cc4MG3QN.js";function Gt(){const o=m.c(1);let t;return o[0]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx(i.Content,{children:r.jsx(p,{})}),o[0]=t):t=o[0],t}export{Gt as default};
@@ -1 +0,0 @@
1
- import{c as r,j as t}from"./index-BeWb3VLq.js";import{OrgRepositoriesPage as m}from"./repositories-C2vwcNjc.js";import{R as p}from"./require-capability-DC_q9Xad.js";import"./repository-picker-CeCsQGv8.js";import"./ArrowLeft-CohopnCT.js";import"./Plus-Dewm72je.js";import"./tooltip-4vv5k-uR.js";import"./index-CdhgpKbn.js";import"./label-TKhfC6jr.js";import"./useInfiniteQuery-CxzyY6DS.js";import"./infiniteQueryObserver-BOCgDRcQ.js";import"./collection-search-7sBPioRN.js";import"./SearchMd-7Jo0ZofC.js";import"./ShoppingBag01-BStpgW0a.js";import"./avatar-DjIkOwsx.js";import"./User01-X6IeKYZH.js";import"./use-debounced-value-Br6JzfN-.js";import"./use-organization-settings-CE5BJyh9.js";import"./schema-b5uziS6S.js";import"./task-board-ByNQwZsl.js";import"./LinkBroken01-Dioz3u9i.js";import"./checkbox-R6Pm_B33.js";import"./Minus-DqDPTtRG.js";import"./Users01-uKJoVSle.js";import"./alert-dialog-BdWXpnme.js";import"./empty-state-wXIjf_EN.js";import"./badge-BfMggcm8.js";import"./alert-DlpN1nbO.js";import"./icon-button-Du_O8eku.js";import"./collapsible-BcZaehP2.js";import"./select-H4FJk0rp.js";import"./index-BdQq_4o_.js";import"./ChevronUp-BT7eMKPK.js";import"./textarea-7I-DLD6x.js";import"./Trash01-DjE7Raat.js";import"./secret-picker-NNIqKwTx.js";import"./use-secrets-CQ9dfY46.js";import"./access-gate-BpfEc6VH.js";import"./capability-load-error-BuC7MxXm.js";function N(){const o=r.c(1);let i;return o[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(p,{capability:"file-configs:manage",area:"files",children:t.jsx(m,{})}),o[0]=i):i=o[0],i}export{N as default};
@@ -1 +0,0 @@
1
- import{c,l as d,j as i,n as f,P as l,aK as u,O as x}from"./index-BeWb3VLq.js";import{u as j}from"./use-mobile-BAnIvR27.js";import{R as h}from"./index-CqllmV-p.js";import"./use-sidebar-collapsed-NZNztmvG.js";import"./use-chat-layout-state-CWI-mwQI.js";import"./thread-route-BPSSuk8V.js";import"./use-panel-navigate-CXkMPISv.js";import"./use-project-scope-BOj2O9A_.js";import"./repository-binding-Cf_thK-b.js";import"./use-mcp-client-2WkK0AxE.js";import"./auth-DVebpHI3.js";import"./thread-intent-CoB1rbzj.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-C9NPGTmI.js";import"./task-board-ByNQwZsl.js";import"./schema-b5uziS6S.js";import"./slugify-CEUa2lfQ.js";import"./agent-icon-CiKTiUdq.js";import"./AlertCircle-Cch634f7.js";import"./Tool01-2gJDR0Ho.js";import"./ArrowUp-DLUdomd9.js";import"./ArrowLeft-CohopnCT.js";import"./LinkBroken01-Dioz3u9i.js";import"./ShoppingBag01-BStpgW0a.js";import"./ZoomOut-DixQygt2.js";import"./Building02-BHJQSDUK.js";import"./CheckCircle-Cs8i9zYt.js";import"./ChevronUp-BT7eMKPK.js";import"./ChevronSelectorVertical-C5d75KyY.js";import"./UserSquare-pmxb5ZdZ.js";import"./Copy01-B341DqLV.js";import"./CreditCard01-4Fwr0tNh.js";import"./DotsVertical-DbrlDgFh.js";import"./Image01-hTzc15CE.js";import"./Globe04-BE6c1UDj.js";import"./SwitchHorizontal01-CrC4ThKg.js";import"./Key01-kTu6t6u_.js";import"./Link01-hfA48cFL.js";import"./Minus-DqDPTtRG.js";import"./Monitor01-Bz6QaUO4.js";import"./Sun-C37Hpdko.js";import"./Play-CByslM3d.js";import"./Plus-Dewm72je.js";import"./SearchMd-7Jo0ZofC.js";import"./Trash01-DjE7Raat.js";import"./Upload01-CYfTR3aZ.js";import"./User01-X6IeKYZH.js";import"./Users01-uKJoVSle.js";import"./XClose-BVxVAZ6V.js";import"./tooltip-4vv5k-uR.js";import"./index-CdhgpKbn.js";import"./toolbar-icon-button-DKjsnGdZ.js";import"./shell-layout-Dpds4_um.js";import"./avatar-DjIkOwsx.js";import"./use-clock-tick-DE4s8Okz.js";import"./command-KmLWWmqo.js";import"./index-BliYmmPu.js";import"./integration-icon-VoZokpOe.js";import"./project-icon-Ds8VtVRG.js";import"./new-project-dialog-DfI138Mw.js";import"./label-TKhfC6jr.js";import"./repository-import-picker-BOku3VrR.js";import"./use-navigate-to-agent-C2NQ-36B.js";import"./repository-picker-CeCsQGv8.js";import"./useInfiniteQuery-CxzyY6DS.js";import"./infiniteQueryObserver-BOCgDRcQ.js";import"./collection-search-7sBPioRN.js";import"./use-debounced-value-Br6JzfN-.js";import"./use-organization-settings-CE5BJyh9.js";import"./required-auth-layout-DhxdstQv.js";import"./autosend-BTx7-p6a.js";import"./use-org-sso-BnFa9r-G.js";import"./sheet-DdrzSnyB.js";import"./resizable-BySAwPSW.js";function zt(){const t=c.c(9),n=j(),s=!n&&"p-1.5";let r;t[0]!==s?(r=d("flex-1 min-h-0",s),t[0]=s,t[1]=r):r=t[1];const a=n?"plain":"card";let m;t[2]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(h,{}),t[2]=m):m=t[2];let p;t[3]===Symbol.for("react.memo_cache_sentinel")?(p=i.jsxs(f.Breadcrumbs.Provider,{children:[m,i.jsx(l.Content,{children:i.jsx(u,{children:i.jsx(x,{})})})]}),t[3]=p):p=t[3];let o;t[4]!==a?(o=i.jsx(l,{"data-testid":"settings-panel",variant:a,children:p}),t[4]=a,t[5]=o):o=t[5];let e;return t[6]!==r||t[7]!==o?(e=i.jsx("div",{className:r,children:o}),t[6]=r,t[7]=o,t[8]=e):e=t[8],e}export{zt as default};
@@ -1 +0,0 @@
1
- import{c as e,j as o}from"./index-BeWb3VLq.js";import{V as a}from"./index-BWEksKOa.js";function p(s){const t=e.c(2),{virtualMcpId:r}=s;let i;return t[0]!==r?(i=o.jsx(a,{virtualMcpId:r}),t[0]=r,t[1]=i):i=t[1],i}export{p as S};
@@ -1,12 +0,0 @@
1
- import{c as M,b as ve,r as z,j as a,B as we,l as Q,K as Ft,ap as Gs,av as ar,az as Fa,U as Ot,t as _e,T as xs,V as vs,X as ys,a as ws,a2 as js,bs as $a,h as Lt,aq as Ea,I as _a,a5 as Oa,o as Ps,R as lr,m as Rt,dX as Qs,F as ir,D as or,v as cr,q as dr,Q as ur,H as hr,a$ as fr,a3 as mr,aV as Ws,e as Tn,y as La,J as Ua}from"./index-BeWb3VLq.js";import{S as za}from"./separator-l8ktDBQ-.js";import{f as qa,u as Vt,r as pr,l as br,c as gr,b as Ha}from"./chat-context-BEyCIAaN.js";import{u as Ht,$ as Ka,c as xr,b as vr,a0 as Js,a1 as hs,a2 as In,a3 as Va,a4 as Ga,G as Ds,a5 as Qa,a6 as Bn,a7 as Wa,a8 as Ja,a9 as Xa,aa as Ya,ab as Za,ac as el,ad as tl,C as Xs,A as yr,ae as sl,af as wr,w as jr}from"./site-editor-toast-C48kJZ8y.js";import{L as nl,a as rl}from"./shell-layout-Dpds4_um.js";import{I as Pr}from"./toolbar-icon-button-DKjsnGdZ.js";import{P as al,a as ll,b as il}from"./popover-s88DXvPL.js";import{c as wt,T as jt,a as Pt,b as Ss}from"./tooltip-4vv5k-uR.js";import{A as Ys,a as Zs,b as en,c as tn,g as sn,d as nn,e as rn,f as an}from"./alert-dialog-BdWXpnme.js";import{d as ol,e as cl,c as dl,C as Dn,a as Mn,b as Fn}from"./command-KmLWWmqo.js";import{T as Dt,a as Sr,c as kr}from"./tabs-Cw5epDK7.js";import{t as Cr}from"./ChevronUp-BT7eMKPK.js";import{aH as ks,H as ul,a as Nr,aI as hl,b as fl,aJ as Ar,O as ml}from"./agent-icon-CiKTiUdq.js";import{i as Rr}from"./DotsVertical-DbrlDgFh.js";import{b as Tr}from"./Tool01-2gJDR0Ho.js";import{s as Ir}from"./Plus-Dewm72je.js";import{s as Cs}from"./Trash01-DjE7Raat.js";import{u as ln,r as Ms,a as $n,n as Fs,g as on,b as cn}from"./use-releases-2-Z6BMdW.js";import{u as pl}from"./use-members-Cl1_-fx1.js";import{n as bl,d as gl,l as xl,j as vl}from"./thread-intent-CoB1rbzj.js";import{h as Br,r as Dr,g as yl,f as Ye,a as dn,j as Mr}from"./repository-binding-Cf_thK-b.js";import{u as wl}from"./use-debounced-value-Br6JzfN-.js";import{u as jl}from"./use-clock-tick-DE4s8Okz.js";import{u as Pl}from"./useInfiniteQuery-CxzyY6DS.js";import{e as Sl,c as kl,p as Cl,g as Fr,h as $r,i as Er}from"./use-navigate-to-agent-C2NQ-36B.js";import{R as En}from"./virtual-mcp-cTWrWR4Y.js";import{u as _r,c as Nl,e as Al}from"./experiments-tab-choice-CQ5EsK8h.js";import{G as Or}from"./repository-picker-CeCsQGv8.js";import{u as un}from"./use-session-runtime-CqJF6neP.js";import{u as Rl,a as Tl}from"./use-fast-preview-draft-url-BPrZ2XMf.js";import{aG as Et,aH as Lr,A as fs,t as hn,aI as Ur,aJ as fn,$ as Il,b as Bl,aK as zr,ar as Dl,aL as Ml,o as Fl,z as At,f as mn,aM as $l}from"./parse-sections-CigeyiXV.js";import"./index-CEnumkKh.js";import{T as El}from"./textarea-7I-DLD6x.js";import{i as pn}from"./CheckCircle-Cs8i9zYt.js";import{s as ms}from"./Image01-hTzc15CE.js";import{b as _l}from"./format-time-Cq80KKvY.js";import{a as Ol,g as Ll}from"./UserSquare-pmxb5ZdZ.js";import{n as Ul,b as zl,m as ql}from"./named-rule-uses-Bxr3PCeC.js";import{S as Hl,e as Kl,a as Vl,R as qr}from"./secret-ciphertext-CKG2rzpX.js";import{f as bn,b as Hr,r as Ns,p as Gl,c as Kr,i as gn,d as Ql,e as Vr,m as Wl,h as Jl,g as Gr,j as Xl,n as Yl,k as Zl,l as ei,o as ti,q as xn,t as si,u as Qr,s as Wr,v as $s}from"./sandbox-git-api-CH_-QFpD.js";import{b as ni,g as ri}from"./utils-t1gjPfET.js";import{i as ai}from"./Monitor01-Bz6QaUO4.js";import{w as Jr,g as li,D as ii}from"./section-preview-url-7zfngvgW.js";import{w as vn}from"./device-hint-SeLRi17j.js";import{w as _n}from"./editor-DAekV0he.js";import{u as Xr}from"./use-content-sync-C0CqYtRD.js";import{p as oi,H as ci,r as di}from"./hosted-publish-api-Cg6A3e6a.js";import{h as ui,n as hi,a as fi}from"./hosted-publish-feedback-R86hK4rw.js";import{s as Yr}from"./save-changes-debug-nBi-n9eV.js";import{u as mi}from"./use-mcp-client-2WkK0AxE.js";import{u as pi}from"./use-sandbox-events-BVhJrX2Z.js";import{b as bi,a as gi}from"./sandbox-lifecycle-context-CCjKxqdS.js";import{b as xi}from"./thread-route-BPSSuk8V.js";const On=/[\r\n<>]/,vi=/^[^\s@<>]+@[^\s@<>]+\.[^\s@<>]+$/;function As(t){const e=t?.userName?.trim();if(!e||On.test(e))return null;const s=t?.userEmail?.trim();return!s||On.test(s)?{userName:e}:vi.test(s)?{userName:e,userEmail:s}:{userName:e}}function yi(t){return t.split(`
2
- `).filter(e=>!/^Co-authored-by:\s/i.test(e)).join(`
3
- `).trimEnd()}function wi(t){const e=t.userName.trim(),s=t.userEmail?.trim();return s?`Co-authored-by: ${e} <${s}>`:`Co-authored-by: ${e}`}function Zr(t,e){const s=As(e);if(!s)return t;const r=yi(t),n=wi(s);if(r.includes(n))return r;const o=r.trimEnd();return o.length>0?`${o}
4
-
5
- ${n}`:n}function ji(t,e){const s=t?.trim();return s?Zr(s,e):s||void 0}const Pi={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" "},Ln=1114111;function Un(t){return t?t.replace(/&(#x?[0-9a-fA-F]+|[a-zA-Z]+);/g,(e,s)=>{if(s.startsWith("#x")||s.startsWith("#X")){const r=Number.parseInt(s.slice(2),16);return!Number.isFinite(r)||r>Ln?e:String.fromCodePoint(r)}if(s.startsWith("#")){const r=Number.parseInt(s.slice(1),10);return!Number.isFinite(r)||r>Ln?e:String.fromCodePoint(r)}return Pi[s]??e}):""}function Si(t){const e=M.c(39),{url:s,onSave:r}=t,n=ve(),[o,d]=z.useState(s??"");let l;e[0]!==o?(l=o.trim(),e[0]=o,e[1]=l):l=e[1];const i=l;let c;e[2]!==r||e[3]!==i?(c=()=>r(i?bl(i):null),e[2]=r,e[3]=i,e[4]=c):c=e[4];const u=c;let h;e[5]!==n?(h=n("thread.branchPicker.localHint"),e[5]=n,e[6]=h):h=e[6];let m;e[7]!==h?(m=a.jsx("p",{className:"text-xs text-muted-foreground",children:h}),e[7]=h,e[8]=m):m=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 p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=k=>d(k.target.value),e[13]=p):p=e[13];let x;e[14]!==u||e[15]!==i?(x=k=>{k.key==="Enter"&&i&&u()},e[14]=u,e[15]=i,e[16]=x):x=e[16];let g;e[17]!==b||e[18]!==f||e[19]!==x||e[20]!==o?(g=a.jsx("input",{type:"url",inputMode:"url","aria-label":b,placeholder:f,value:o,onChange:p,onKeyDown:x,className:"h-8 w-full rounded-md border bg-transparent px-2 text-sm focus-ring"}),e[17]=b,e[18]=f,e[19]=x,e[20]=o,e[21]=g):g=e[21];let P;e[22]!==r||e[23]!==n||e[24]!==s?(P=s?a.jsx(we,{variant:"ghost",size:"sm",className:"text-xs text-destructive hover:text-destructive",onClick:()=>r(null),children:n("thread.branchPicker.localTurnOff")}):a.jsx("span",{}),e[22]=r,e[23]=n,e[24]=s,e[25]=P):P=e[25];const y=!i;let v;e[26]!==n?(v=n("thread.branchPicker.save"),e[26]=n,e[27]=v):v=e[27];let j;e[28]!==u||e[29]!==y||e[30]!==v?(j=a.jsx(we,{size:"sm",disabled:y,onClick:u,children:v}),e[28]=u,e[29]=y,e[30]=v,e[31]=j):j=e[31];let w;e[32]!==P||e[33]!==j?(w=a.jsxs("div",{className:"flex items-center justify-between gap-2",children:[P,j]}),e[32]=P,e[33]=j,e[34]=w):w=e[34];let N;return e[35]!==w||e[36]!==m||e[37]!==g?(N=a.jsxs("div",{className:"flex flex-col gap-2 p-2",children:[m,g,w]}),e[35]=w,e[36]=m,e[37]=g,e[38]=N):N=e[38],N}function ki(t){const e=M.c(8),{virtualMcpId:s,branch:r,serve:n,rowRef:o,onPicked:d}=t,l=Ht(s,r),i=!!n.connection,c=i&&l.kind==="protocol"&&l.source==="local";let u;e[0]!==d||e[1]!==n?(u=()=>Ci(n,d),e[0]=d,e[1]=n,e[2]=u):u=e[2];let h;return e[3]!==o||e[4]!==i||e[5]!==c||e[6]!==u?(h=a.jsx(Ni,{rowRef:o,selected:i,connected:c,onSelect:u}),e[3]=o,e[4]=i,e[5]=c,e[6]=u,e[7]=h):h=e[7],h}function Ci(t,e){e?.(),!t.connection&&t.set({endpoint:t.lastEndpoint??Ka})}function Ni(t){const e=M.c(19),{rowRef:s,selected:r,connected:n,onSelect:o}=t,d=ve(),l=r?"bg-accent":"hover:bg-accent";let i;e[0]!==l?(i=Q("flex rounded-lg",l),e[0]=l,e[1]=i):i=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=a.jsx("span",{"data-testid":"localhost-dot",className:"h-2 w-2 shrink-0 rounded-full bg-foreground"}),e[2]=c):c=e[2];let u;e[3]!==d?(u=d("thread.branchPicker.localhost.label"),e[3]=d,e[4]=u):u=e[4];let h;e[5]!==u?(h=a.jsx("span",{className:"min-w-0 flex-1 truncate",children:u}),e[5]=u,e[6]=h):h=e[6];let m;e[7]!==n||e[8]!==d?(m=n&&a.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:d("thread.branchPicker.localhost.connected")}),e[7]=n,e[8]=d,e[9]=m):m=e[9];let b;e[10]!==o||e[11]!==r||e[12]!==h||e[13]!==m?(b=a.jsxs("button",{type:"button","aria-pressed":r,onClick:o,className:"flex w-full min-w-0 items-center gap-2.5 px-2 py-2 text-left text-sm",children:[c,h,m]}),e[10]=o,e[11]=r,e[12]=h,e[13]=m,e[14]=b):b=e[14];let f;return e[15]!==s||e[16]!==i||e[17]!==b?(f=a.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 Ai=10080*60*1e3;function Ri({sandboxMap:t,userId:e,rawBranches:s,now:r}){const n=new Map;for(const[h,m]of Object.entries(t??{}))for(const[b,f]of Object.entries(m??{})){let p=n.get(b);p||(p={userIds:new Set,lastActiveAt:0},n.set(b,p)),p.userIds.add(h);for(const x of Object.values(f??{})){const g=x?.createdAt??0;g>p.lastActiveAt&&(p.lastActiveAt=g)}}const o=r-Ai,d=[...n.entries()].filter(([,h])=>h.lastActiveAt>=o).sort((h,m)=>m[1].lastActiveAt-h[1].lastActiveAt).map(([h,m])=>({name:h,source:"recent",contributors:[...m.userIds],lastActiveAt:m.lastActiveAt})),l=new Set(d.map(h=>h.name)),i=new Set(Object.keys(t?.[e]??{})),c=[...i].filter(h=>!l.has(h)).sort().map(h=>({name:h,source:"yours"})),u=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:c,others:u}}const Ti=100,Ii=50,Bi=300;function Us(t,e){const s=e.trim().toLowerCase();return s?t.toLowerCase().includes(s):!0}function Di(t){const e=M.c(39),{orgId:s,orgSlug:r,userId:n,target:o,sandboxMap:d,owner:l,repo:i,search:c,enabled:u}=t,h=c===void 0?"":c,m=u===void 0?!0:u;let b;e[0]!==h?(b=h.trim(),e[0]=h,e[1]=b):b=e[1];const f=b,p=wl(f,Bi);let x;e[2]!==o?(x=Br(o),e[2]=o,e[3]=x):x=e[3];const g=x,P=f.length>0;let y;e[4]!==p||e[5]!==s||e[6]!==r||e[7]!==l||e[8]!==i||e[9]!==o?(y=Ft.githubBranchSearch(s,r,Dr(o),l,i,p),e[4]=p,e[5]=s,e[6]=r,e[7]=l,e[8]=i,e[9]=o,e[10]=y):y=e[10];const v=m&&g;let j;e[11]!==p||e[12]!==r||e[13]!==o?(j=W=>{const{pageParam:q}=W;return Gs(r,"REPOSITORY_SEARCH_BRANCHES",{...o,query:p,limit:p?Ii:Ti,cursor:q})},e[11]=p,e[12]=r,e[13]=o,e[14]=j):j=e[14];let w;e[15]!==p?(w=W=>p?void 0:W.nextCursor??void 0,e[15]=p,e[16]=w):w=e[16];let N;e[17]!==y||e[18]!==v||e[19]!==j||e[20]!==w?(N={queryKey:y,enabled:v,staleTime:3e4,retry:!1,initialPageParam:null,queryFn:j,getNextPageParam:w},e[17]=y,e[18]=v,e[19]=j,e[20]=w,e[21]=N):N=e[21];const{data:k,isLoading:A,isError:S,isFetching:R,hasNextPage:T,isFetchingNextPage:B,fetchNextPage:D}=Pl(N),F=P&&(p!==f||R),C=(k?.pages??[]).flatMap(Mi),I=jl(6e4),$=Ri({sandboxMap:d,userId:n,rawBranches:C,now:I});let Z;e[22]!==f?(Z=W=>Us(W.name,f),e[22]=f,e[23]=Z):Z=e[23];const ee=$.recent.filter(Z);let H;e[24]!==f?(H=W=>Us(W.name,f),e[24]=f,e[25]=H):H=e[25];const J=$.yours.filter(H),_=$.others,G=k?.pages[0],ie=P&&G&&!F?Math.max(0,G.totalCount-G.branches.length):0,X=!P&&T;let V;e[26]!==D?(V=()=>{D()},e[26]=D,e[27]=V):V=e[27];let ae;return e[28]!==ie||e[29]!==S||e[30]!==B||e[31]!==A||e[32]!==F||e[33]!==_||e[34]!==ee||e[35]!==X||e[36]!==V||e[37]!==J?(ae={recent:ee,yours:J,others:_,isLoading:A,isError:S,isSearching:F,hiddenMatchCount:ie,hasMore:X,isFetchingMore:B,fetchMore:V},e[28]=ie,e[29]=S,e[30]=B,e[31]=A,e[32]=F,e[33]=_,e[34]=ee,e[35]=X,e[36]=V,e[37]=J,e[38]=ae):ae=e[38],ae}function Mi(t){return t.branches}function Fi(t){const e=M.c(241),{virtualMcpId:s,isV8:r,userLabel:n,value:o,baseBranch:d,orgId:l,orgSlug:i,userId:c,target:u,owner:h,repo:m,sandboxMap:b,onChange:f,onCreateBranch:p,onAdoptBranch:x,disabled:g,spawnsNewChat:P,placement:y}=t,v=r===void 0?!1:r,j=g===void 0?!1:g,w=P===void 0?!1:P,N=y===void 0?"chat":y,k=ve(),A=N==="header",[S,R]=z.useState(!1),[T,B]=z.useState(!1),[D,F]=z.useState("branches"),[C,I]=z.useState(null),[$,Z]=z.useState(""),[ee,H]=z.useState(null),J=z.useRef(null),{releases:_,createRelease:G,renameRelease:ie,deleteRelease:X}=ln(s),{url:V,setUrl:ae,clear:W}=xr(s),q=vr(s),de=v&&!!q.connection,me=v?q.connection?.endpoint??null:V,re=!!me;let oe;e[0]!==W||e[1]!==v||e[2]!==q?(oe=()=>{W(),v&&q.clear()},e[0]=W,e[1]=v,e[2]=q,e[3]=oe):oe=e[3];const Y=oe;let ue;e[4]!==S?(ue={enabled:S},e[4]=S,e[5]=ue):ue=e[5];const{data:je}=pl(ue);let O;e[6]!==je?.data?.members?(O=se=>se?je?.data?.members?.find(yt=>yt.userId===se)?.user?.name??void 0:void 0,e[6]=je?.data?.members,e[7]=O):O=e[7];const U=O,L=_.length>=En;let Pe;e[8]!==k?(Pe=k("thread.branchPicker.capReached",{max:En}),e[8]=k,e[9]=Pe):Pe=e[9];const he=Pe,te=!!o&&o===d;let fe,$e,ge,Te,De,Ne,Ee,Ie,Me,ut,Ce,le,Se,ht,E,xe,be,ye,Be,ft,mt,Ge,Ze,ke,et,tt,Qe,kt,st;if(e[10]!==L||e[11]!==d||e[12]!==he||e[13]!==Y||e[14]!==G||e[15]!==X||e[16]!==j||e[17]!==$||e[18]!==te||e[19]!==A||e[20]!==re||e[21]!==de||e[22]!==x||e[23]!==f||e[24]!==p||e[25]!==S||e[26]!==ee||e[27]!==_||e[28]!==ie||e[29]!==ae||e[30]!==k||e[31]!==c||e[32]!==n||e[33]!==o){let se;e[63]!==o?(se=ne=>ne.branch===o,e[63]=o,e[64]=se):se=e[64];const yt=_.find(se);st=!te&&!yt&&!!o;const Ba=te?k("thread.branchPicker.live"):yt?.name??k("thread.branchPicker.defaultVersionName");Ce=de?k("thread.branchPicker.localhost.label"):re?k("thread.branchPicker.localLabel"):o?Ba:k("thread.branchPicker.selectVersion");const Da=de?"bg-foreground":re?"bg-special":te?"bg-success":Ms(yt?.color??"orange");let Qt;e[65]!==Y||e[66]!==f?(Qt=ne=>{Y(),f(ne),R(!1)},e[65]=Y,e[66]=f,e[67]=Qt):Qt=e[67],Se=Qt;let Wt;e[68]!==k?(Wt=ne=>{_e.error(k("thread.branchPicker.saveError"),{description:Js(k,hs(ne))})},e[68]=k,e[69]=Wt):Wt=e[69];const Fe=Wt;let Jt;e[70]!==ae?(Jt=ne=>{ae(ne),B(!1),R(!1)},e[70]=ae,e[71]=Jt):Jt=e[71],Ne=Jt;let Xt;e[72]!==L||e[73]!==he||e[74]!==Y||e[75]!==G||e[76]!==x||e[77]!==f||e[78]!==_||e[79]!==Fe||e[80]!==c?(Xt=(ne,Bt)=>{if(Y(),x){x(ne),B(!1),R(!1);return}if(!_.some(Bs=>Bs.branch===ne)){if(L){_e.error(he);return}G({branch:ne,name:Bt.trim()||ne,color:Fs(_.length),createdBy:c,createdAt:new Date().toISOString()}).catch(Fe)}f(ne),B(!1),R(!1)},e[72]=L,e[73]=he,e[74]=Y,e[75]=G,e[76]=x,e[77]=f,e[78]=_,e[79]=Fe,e[80]=c,e[81]=Xt):Xt=e[81],Ee=Xt;let Yt;e[82]!==L||e[83]!==he||e[84]!==Y||e[85]!==G||e[86]!==f||e[87]!==p||e[88]!==_||e[89]!==Fe||e[90]!==k||e[91]!==c||e[92]!==n?(Yt=()=>{if(L){_e.error(he);return}Y();const ne=on(n);G({branch:ne,name:$n(_,k("thread.branchPicker.defaultVersionName")),color:Fs(_.length),createdBy:c,createdAt:new Date().toISOString()}).catch(Fe),(p??f)(ne),R(!1)},e[82]=L,e[83]=he,e[84]=Y,e[85]=G,e[86]=f,e[87]=p,e[88]=_,e[89]=Fe,e[90]=k,e[91]=c,e[92]=n,e[93]=Yt):Yt=e[93],ut=Yt;let Zt;e[94]===Symbol.for("react.memo_cache_sentinel")?(Zt=()=>{I(null),Z(""),B(!1),F("branches")},e[94]=Zt):Zt=e[94];const Ma=Zt;let es;e[95]===Symbol.for("react.memo_cache_sentinel")?(es=ne=>{F(ne),B(!0)},e[95]=es):es=e[95],le=es;let ts;e[96]===Symbol.for("react.memo_cache_sentinel")?(ts=ne=>{I(ne.branch),Z(ne.name)},e[96]=ts):ts=e[96],xe=ts;let ss;e[97]!==$||e[98]!==ie||e[99]!==Fe?(ss=ne=>{const Bt=$.trim();Bt&&ie(ne,Bt).catch(Fe),I(null),Z("")},e[97]=$,e[98]=ie,e[99]=Fe,e[100]=ss):ss=e[100],ht=ss;let ns;e[101]!==L||e[102]!==he||e[103]!==G||e[104]!==$||e[105]!==_.length||e[106]!==Fe||e[107]!==c||e[108]!==o?(ns=()=>{const ne=$.trim();if(ne&&o){if(L){_e.error(he),I(null),Z("");return}G({branch:o,name:ne,color:Fs(_.length),createdBy:c,createdAt:new Date().toISOString()}).catch(Fe)}I(null),Z("")},e[101]=L,e[102]=he,e[103]=G,e[104]=$,e[105]=_.length,e[106]=Fe,e[107]=c,e[108]=o,e[109]=ns):ns=e[109],E=ns;let rs;e[110]===Symbol.for("react.memo_cache_sentinel")?(rs=()=>{I(null),Z("")},e[110]=rs):rs=e[110],Ie=rs;let as;e[111]!==d||e[112]!==X||e[113]!==ee||e[114]!==Se||e[115]!==_||e[116]!==Fe||e[117]!==o?(as=()=>{const ne=ee;if(H(null),!!ne){if(ne.branch===o){const Bt=_.find(Bs=>Bs.branch!==ne.branch);Bt?Se(Bt.branch):d?Se(d):R(!1)}else R(!1);X(ne.branch).catch(Fe)}},e[111]=d,e[112]=X,e[113]=ee,e[114]=Se,e[115]=_,e[116]=Fe,e[117]=o,e[118]=as):as=e[118],Me=as,De=al,tt=S,e[119]!==j?(Qe=j?void 0:ne=>{ne||Ma(),R(ne)},e[119]=j,e[120]=Qe):Qe=e[120],Te=wt,ge=jt,et=!0,ke="inline-flex min-w-0 shrink",$e=ll,Ze=!0,fe=we,be=nl.branchPicker,ye=A?"outline":"ghost",Be=A?"sm":"default",ft=Ce,mt=j;const Is=A?"text-xs":"text-xs text-muted-foreground hover:text-foreground";e[121]!==Is?(Ge=Q("shrink min-w-0 max-w-[220px] gap-2",Is,Pr),e[121]=Is,e[122]=Ge):Ge=e[122],kt=Q("h-2 w-2 shrink-0 rounded-full",o||re?Da:"bg-muted-foreground"),e[10]=L,e[11]=d,e[12]=he,e[13]=Y,e[14]=G,e[15]=X,e[16]=j,e[17]=$,e[18]=te,e[19]=A,e[20]=re,e[21]=de,e[22]=x,e[23]=f,e[24]=p,e[25]=S,e[26]=ee,e[27]=_,e[28]=ie,e[29]=ae,e[30]=k,e[31]=c,e[32]=n,e[33]=o,e[34]=fe,e[35]=$e,e[36]=ge,e[37]=Te,e[38]=De,e[39]=Ne,e[40]=Ee,e[41]=Ie,e[42]=Me,e[43]=ut,e[44]=Ce,e[45]=le,e[46]=Se,e[47]=ht,e[48]=E,e[49]=xe,e[50]=be,e[51]=ye,e[52]=Be,e[53]=ft,e[54]=mt,e[55]=Ge,e[56]=Ze,e[57]=ke,e[58]=et,e[59]=tt,e[60]=Qe,e[61]=kt,e[62]=st}else fe=e[34],$e=e[35],ge=e[36],Te=e[37],De=e[38],Ne=e[39],Ee=e[40],Ie=e[41],Me=e[42],ut=e[43],Ce=e[44],le=e[45],Se=e[46],ht=e[47],E=e[48],xe=e[49],be=e[50],ye=e[51],Be=e[52],ft=e[53],mt=e[54],Ge=e[55],Ze=e[56],ke=e[57],et=e[58],tt=e[59],Qe=e[60],kt=e[61],st=e[62];let We;e[123]!==kt?(We=a.jsx("span",{className:kt}),e[123]=kt,e[124]=We):We=e[124];let Je;e[125]!==Ce?(Je=a.jsx("span",{className:"min-w-0 truncate @max-3xl/panel-header:hidden",children:Ce}),e[125]=Ce,e[126]=Je):Je=e[126];let pt;e[127]!==j?(pt=!j&&a.jsx(Cr,{size:12,className:"opacity-60 shrink-0"}),e[127]=j,e[128]=pt):pt=e[128];let nt;e[129]!==fe||e[130]!==be||e[131]!==ye||e[132]!==Be||e[133]!==ft||e[134]!==mt||e[135]!==Ge||e[136]!==We||e[137]!==Je||e[138]!==pt?(nt=a.jsxs(fe,{"data-tour":be,variant:ye,size:Be,"aria-label":ft,disabled:mt,className:Ge,children:[We,Je,pt]}),e[129]=fe,e[130]=be,e[131]=ye,e[132]=Be,e[133]=ft,e[134]=mt,e[135]=Ge,e[136]=We,e[137]=Je,e[138]=pt,e[139]=nt):nt=e[139];let bt;e[140]!==$e||e[141]!==Ze||e[142]!==nt?(bt=a.jsx($e,{asChild:Ze,children:nt}),e[140]=$e,e[141]=Ze,e[142]=nt,e[143]=bt):bt=e[143];let rt;e[144]!==ke||e[145]!==bt?(rt=a.jsx("span",{className:ke,children:bt}),e[144]=ke,e[145]=bt,e[146]=rt):rt=e[146];let gt;e[147]!==ge||e[148]!==et||e[149]!==rt?(gt=a.jsx(ge,{asChild:et,children:rt}),e[147]=ge,e[148]=et,e[149]=rt,e[150]=gt):gt=e[150];let at;e[151]!==Ce?(at=a.jsx(Pt,{children:Ce}),e[151]=Ce,e[152]=at):at=e[152];let xt;e[153]!==Te||e[154]!==gt||e[155]!==at?(xt=a.jsxs(Te,{children:[gt,at]}),e[153]=Te,e[154]=gt,e[155]=at,e[156]=xt):xt=e[156];let Ct;e[157]===Symbol.for("react.memo_cache_sentinel")?(Ct=se=>{se.preventDefault(),J.current?.scrollIntoView({block:"nearest"})},e[157]=Ct):Ct=e[157];let Xe;e[158]!==w||e[159]!==k?(Xe=w&&a.jsx("p",{className:"px-2 pb-1.5 pt-1 text-xs text-muted-foreground",children:k("thread.branchPicker.newChatHint")}),e[158]=w,e[159]=k,e[160]=Xe):Xe=e[160];let vt;e[161]!==Ne||e[162]!==Ee||e[163]!==T||e[164]!==D||e[165]!==L||e[166]!==Ie||e[167]!==he||e[168]!==Y||e[169]!==ut||e[170]!==U||e[171]!==$||e[172]!==C||e[173]!==v||e[174]!==re||e[175]!==me||e[176]!==de||e[177]!==S||e[178]!==le||e[179]!==l||e[180]!==i||e[181]!==h||e[182]!==Se||e[183]!==_||e[184]!==m||e[185]!==b||e[186]!==ht||e[187]!==E||e[188]!==q||e[189]!==xe||e[190]!==k||e[191]!==u||e[192]!==V||e[193]!==st||e[194]!==c||e[195]!==o||e[196]!==s?(vt=T?a.jsx(Ei,{orgId:l,orgSlug:i,userId:c,target:u,owner:h,repo:m,sandboxMap:b,enabled:S,tab:D,onTabChange:F,isV8:v,localUrl:V,onSaveLocal:Ne,onBack:()=>B(!1),onAdopt:Ee}):a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:Q("always-scrollbar flex max-h-[min(50vh,20rem)] flex-col overflow-y-auto",v&&"gap-1"),children:[!v&&re&&me&&a.jsx($i,{rowRef:J,url:me,onSelect:()=>le("local"),onEdit:()=>le("local"),onTurnOff:()=>Y()}),st&&o&&(C===o?a.jsx(zn,{value:$,onChange:Z,onSave:E,onCancel:Ie}):a.jsx(qn,{rowRef:re?void 0:J,dot:Ms("orange"),label:k("thread.branchPicker.defaultVersionName"),branch:o,selected:!re,onSelect:()=>Se(o),onRename:()=>{I(o),Z($n(_,k("thread.branchPicker.defaultVersionName")))}})),_.map(se=>C===se.branch?a.jsx(zn,{value:$,onChange:Z,onSave:()=>ht(se.branch),onCancel:Ie},se.branch):a.jsx(qn,{rowRef:!re&&se.branch===o?J:void 0,dot:Ms(se.color),label:se.name,creator:U(se.createdBy),branch:se.branch,selected:!re&&se.branch===o,onSelect:()=>Se(se.branch),onRename:()=>xe(se),onDelete:()=>H(se)},se.branch)),v&&a.jsx(ki,{virtualMcpId:s,branch:o,serve:q,rowRef:de?J:void 0,onPicked:()=>R(!1)})]}),(st||_.length>0||v)&&a.jsx("div",{className:"my-1 border-t"}),a.jsxs("button",{type:"button",onClick:()=>{ut()},disabled:L,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:[a.jsx(Ir,{className:"h-4 w-4 shrink-0"}),k("thread.branchPicker.newVersion")]}),L&&a.jsx("p",{className:"px-2 pb-1 pt-0.5 text-xs text-warning",children:he}),a.jsxs("button",{type:"button",onClick:()=>le("branches"),className:Q("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",v&&"mt-1"),children:[k("thread.branchPicker.advanced"),a.jsx(ar,{className:"h-4 w-4 shrink-0"})]})]}),e[161]=Ne,e[162]=Ee,e[163]=T,e[164]=D,e[165]=L,e[166]=Ie,e[167]=he,e[168]=Y,e[169]=ut,e[170]=U,e[171]=$,e[172]=C,e[173]=v,e[174]=re,e[175]=me,e[176]=de,e[177]=S,e[178]=le,e[179]=l,e[180]=i,e[181]=h,e[182]=Se,e[183]=_,e[184]=m,e[185]=b,e[186]=ht,e[187]=E,e[188]=q,e[189]=xe,e[190]=k,e[191]=u,e[192]=V,e[193]=st,e[194]=c,e[195]=o,e[196]=s,e[197]=vt):vt=e[197];let lt;e[198]!==Xe||e[199]!==vt?(lt=a.jsxs(il,{className:"w-[min(300px,calc(100vw-2rem))] p-1.5",align:"start",onOpenAutoFocus:Ct,children:[Xe,vt]}),e[198]=Xe,e[199]=vt,e[200]=lt):lt=e[200];let Nt;e[201]!==De||e[202]!==tt||e[203]!==Qe||e[204]!==xt||e[205]!==lt?(Nt=a.jsxs(De,{open:tt,onOpenChange:Qe,children:[xt,lt]}),e[201]=De,e[202]=tt,e[203]=Qe,e[204]=xt,e[205]=lt,e[206]=Nt):Nt=e[206];const Tt=Nt,It=ee!==null;let it;e[207]===Symbol.for("react.memo_cache_sentinel")?(it=se=>{se||H(null)},e[207]=it):it=e[207];let Oe;e[208]!==k?(Oe=k("thread.branchPicker.deleteTitle"),e[208]=k,e[209]=Oe):Oe=e[209];let Le;e[210]!==Oe?(Le=a.jsx(Ys,{children:Oe}),e[210]=Oe,e[211]=Le):Le=e[211];let Ue;e[212]!==ee||e[213]!==k?(Ue=ee&&k("thread.branchPicker.deleteConfirm",{name:ee.name}),e[212]=ee,e[213]=k,e[214]=Ue):Ue=e[214];let ze;e[215]!==Ue?(ze=a.jsx(Zs,{children:Ue}),e[215]=Ue,e[216]=ze):ze=e[216];let qe;e[217]!==Le||e[218]!==ze?(qe=a.jsxs(en,{children:[Le,ze]}),e[217]=Le,e[218]=ze,e[219]=qe):qe=e[219];let He;e[220]!==k?(He=k("thread.branchPicker.cancel"),e[220]=k,e[221]=He):He=e[221];let Ke;e[222]!==He?(Ke=a.jsx(tn,{children:He}),e[222]=He,e[223]=Ke):Ke=e[223];let Ve;e[224]!==k?(Ve=k("thread.branchPicker.delete"),e[224]=k,e[225]=Ve):Ve=e[225];let ot;e[226]!==Me||e[227]!==Ve?(ot=a.jsx(sn,{onClick:Me,variant:"destructive",children:Ve}),e[226]=Me,e[227]=Ve,e[228]=ot):ot=e[228];let K;e[229]!==Ke||e[230]!==ot?(K=a.jsxs(nn,{children:[Ke,ot]}),e[229]=Ke,e[230]=ot,e[231]=K):K=e[231];let ce;e[232]!==qe||e[233]!==K?(ce=a.jsxs(rn,{children:[qe,K]}),e[232]=qe,e[233]=K,e[234]=ce):ce=e[234];let pe;e[235]!==It||e[236]!==ce?(pe=a.jsx(an,{open:It,onOpenChange:it,children:ce}),e[235]=It,e[236]=ce,e[237]=pe):pe=e[237];let Ae;return e[238]!==Tt||e[239]!==pe?(Ae=a.jsxs(a.Fragment,{children:[Tt,pe]}),e[238]=Tt,e[239]=pe,e[240]=Ae):Ae=e[240],Ae}function zn(t){const e=M.c(20),{value:s,onChange:r,onSave:n,onCancel:o}=t,d=ve();let l;e[0]!==d?(l=d("thread.branchPicker.rename"),e[0]=d,e[1]=l):l=e[1];let i;e[2]!==r?(i=f=>r(f.target.value),e[2]=r,e[3]=i):i=e[3];let c;e[4]!==o||e[5]!==n?(c=f=>{f.key==="Enter"&&n(),f.key==="Escape"&&(f.preventDefault(),f.stopPropagation(),o())},e[4]=o,e[5]=n,e[6]=c):c=e[6];let u;e[7]!==l||e[8]!==i||e[9]!==c||e[10]!==s?(u=a.jsx("input",{autoFocus:!0,"aria-label":l,value:s,onChange:i,onKeyDown:c,className:"h-8 flex-1 rounded-md border bg-transparent px-2 text-sm focus-ring"}),e[7]=l,e[8]=i,e[9]=c,e[10]=s,e[11]=u):u=e[11];let h;e[12]!==d?(h=d("thread.branchPicker.save"),e[12]=d,e[13]=h):h=e[13];let m;e[14]!==n||e[15]!==h?(m=a.jsx(we,{size:"sm",onClick:n,children:h}),e[14]=n,e[15]=h,e[16]=m):m=e[16];let b;return e[17]!==u||e[18]!==m?(b=a.jsxs("div",{className:"flex items-center gap-1.5 p-1",children:[u,m]}),e[17]=u,e[18]=m,e[19]=b):b=e[19],b}function qn(t){const e=M.c(49),{rowRef:s,dot:r,label:n,creator:o,branch:d,selected:l,onSelect:i,onRename:c,onDelete:u}=t,h=ve(),m=l?"bg-accent":"hover:bg-accent";let b;e[0]!==m?(b=Q("group flex items-center rounded-lg",m),e[0]=m,e[1]=b):b=e[1];let f;e[2]!==r?(f=Q("h-2 w-2 shrink-0 rounded-full",r),e[2]=r,e[3]=f):f=e[3];let p;e[4]!==f?(p=a.jsx("span",{className:f}),e[4]=f,e[5]=p):p=e[5];let x;e[6]!==o?(x=o&&a.jsx("span",{className:"ml-1.5 text-xs font-normal text-muted-foreground/70",children:o}),e[6]=o,e[7]=x):x=e[7];let g;e[8]!==n||e[9]!==x?(g=a.jsxs("span",{className:"min-w-0 flex-1 truncate",children:[n,x]}),e[8]=n,e[9]=x,e[10]=g):g=e[10];let P;e[11]!==i||e[12]!==l||e[13]!==p||e[14]!==g?(P=a.jsx(jt,{asChild:!0,children:a.jsxs("button",{type:"button","aria-pressed":l,onClick:i,className:"flex min-w-0 flex-1 items-center gap-2.5 px-2 py-2 text-left text-sm",children:[p,g]})}),e[11]=i,e[12]=l,e[13]=p,e[14]=g,e[15]=P):P=e[15];let y;e[16]!==d||e[17]!==h?(y=h("thread.branchPicker.branchTooltip",{branch:d}),e[16]=d,e[17]=h,e[18]=y):y=e[18];let v;e[19]!==y?(v=a.jsx(Pt,{side:"bottom",className:"font-mono text-xs",children:y}),e[19]=y,e[20]=v):v=e[20];let j;e[21]!==P||e[22]!==v?(j=a.jsxs(wt,{children:[P,v]}),e[21]=P,e[22]=v,e[23]=j):j=e[23];let w;e[24]!==h?(w=h("thread.branchPicker.moreActions"),e[24]=h,e[25]=w):w=e[25];let N;e[26]===Symbol.for("react.memo_cache_sentinel")?(N=a.jsx(Rr,{className:"h-4 w-4"}),e[26]=N):N=e[26];let k;e[27]!==w?(k=a.jsx(xs,{asChild:!0,children:a.jsx(we,{variant:"ghost",size:"icon","aria-label":w,className:"mr-1 h-6 w-6 shrink-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100",children:N})}),e[27]=w,e[28]=k):k=e[28];let A;e[29]===Symbol.for("react.memo_cache_sentinel")?(A=a.jsx(Tr,{className:"h-4 w-4"}),e[29]=A):A=e[29];let S;e[30]!==h?(S=h("thread.branchPicker.rename"),e[30]=h,e[31]=S):S=e[31];let R;e[32]!==c||e[33]!==S?(R=a.jsxs(Ot,{onSelect:c,children:[A,S]}),e[32]=c,e[33]=S,e[34]=R):R=e[34];let T;e[35]!==u||e[36]!==h?(T=u&&a.jsxs(Ot,{onSelect:u,className:"text-destructive focus:text-destructive",children:[a.jsx(Cs,{className:"h-4 w-4"}),h("thread.branchPicker.delete")]}),e[35]=u,e[36]=h,e[37]=T):T=e[37];let B;e[38]!==R||e[39]!==T?(B=a.jsxs(vs,{align:"end",children:[R,T]}),e[38]=R,e[39]=T,e[40]=B):B=e[40];let D;e[41]!==k||e[42]!==B?(D=a.jsxs(ys,{children:[k,B]}),e[41]=k,e[42]=B,e[43]=D):D=e[43];let F;return e[44]!==s||e[45]!==j||e[46]!==D||e[47]!==b?(F=a.jsxs("div",{ref:s,className:b,children:[j,D]}),e[44]=s,e[45]=j,e[46]=D,e[47]=b,e[48]=F):F=e[48],F}function $i(t){const e=M.c(40),{rowRef:s,url:r,onSelect:n,onEdit:o,onTurnOff:d}=t,l=ve();let i;try{let R;e[0]!==r?(R=new URL(r),e[0]=r,e[1]=R):R=e[1],i=R.host}catch{i=r}const c=i;let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=a.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full bg-special"}),e[2]=u):u=e[2];let h;e[3]!==l?(h=l("thread.branchPicker.localLabel"),e[3]=l,e[4]=h):h=e[4];let m;e[5]!==c?(m=a.jsx("span",{className:"ml-1.5 text-xs font-normal text-muted-foreground/70",children:c}),e[5]=c,e[6]=m):m=e[6];let b;e[7]!==h||e[8]!==m?(b=a.jsxs("span",{className:"min-w-0 flex-1 truncate",children:[h,m]}),e[7]=h,e[8]=m,e[9]=b):b=e[9];let f;e[10]!==n||e[11]!==b?(f=a.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:[u,b]}),e[10]=n,e[11]=b,e[12]=f):f=e[12];let p;e[13]!==l?(p=l("thread.branchPicker.moreActions"),e[13]=l,e[14]=p):p=e[14];let x;e[15]===Symbol.for("react.memo_cache_sentinel")?(x=a.jsx(Rr,{className:"h-4 w-4"}),e[15]=x):x=e[15];let g;e[16]!==p?(g=a.jsx(xs,{asChild:!0,children:a.jsx(we,{variant:"ghost",size:"icon","aria-label":p,className:"mr-1 h-6 w-6 shrink-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100",children:x})}),e[16]=p,e[17]=g):g=e[17];let P;e[18]===Symbol.for("react.memo_cache_sentinel")?(P=a.jsx(Tr,{className:"h-4 w-4"}),e[18]=P):P=e[18];let y;e[19]!==l?(y=l("thread.branchPicker.rename"),e[19]=l,e[20]=y):y=e[20];let v;e[21]!==o||e[22]!==y?(v=a.jsxs(Ot,{onSelect:o,children:[P,y]}),e[21]=o,e[22]=y,e[23]=v):v=e[23];let j;e[24]===Symbol.for("react.memo_cache_sentinel")?(j=a.jsx(Cs,{className:"h-4 w-4"}),e[24]=j):j=e[24];let w;e[25]!==l?(w=l("thread.branchPicker.localTurnOff"),e[25]=l,e[26]=w):w=e[26];let N;e[27]!==d||e[28]!==w?(N=a.jsxs(Ot,{onSelect:d,className:"text-destructive focus:text-destructive",children:[j,w]}),e[27]=d,e[28]=w,e[29]=N):N=e[29];let k;e[30]!==v||e[31]!==N?(k=a.jsxs(vs,{align:"end",children:[v,N]}),e[30]=v,e[31]=N,e[32]=k):k=e[32];let A;e[33]!==k||e[34]!==g?(A=a.jsxs(ys,{children:[g,k]}),e[33]=k,e[34]=g,e[35]=A):A=e[35];let S;return e[36]!==s||e[37]!==A||e[38]!==f?(S=a.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 Ei(t){const e=M.c(73),{orgId:s,orgSlug:r,userId:n,target:o,owner:d,repo:l,sandboxMap:i,enabled:c,tab:u,onTabChange:h,isV8:m,localUrl:b,onSaveLocal:f,onBack:p,onAdopt:x}=t,g=ve(),[P,y]=z.useState(""),v=u==="branches"?P:"",j=c&&u==="branches";let w;e[0]!==s||e[1]!==r||e[2]!==d||e[3]!==l||e[4]!==i||e[5]!==v||e[6]!==j||e[7]!==o||e[8]!==n?(w={orgId:s,orgSlug:r,userId:n,target:o,sandboxMap:i,owner:d,repo:l,search:v,enabled:j},e[0]=s,e[1]=r,e[2]=d,e[3]=l,e[4]=i,e[5]=v,e[6]=j,e[7]=o,e[8]=n,e[9]=w):w=e[9];const{recent:N,yours:k,others:A,isLoading:S,hasMore:R,isFetchingMore:T,fetchMore:B}=Di(w),D=c&&u==="prs";let F;e[10]!==s||e[11]!==r||e[12]!==d||e[13]!==l||e[14]!==D||e[15]!==o?(F={orgId:s,orgSlug:r,target:o,owner:d,repo:l,enabled:D},e[10]=s,e[11]=r,e[12]=d,e[13]=l,e[14]=D,e[15]=o,e[16]=F):F=e[16];const{data:C,isLoading:I}=Sl(F);let $;if(e[17]!==B||e[18]!==R||e[19]!==T||e[20]!==S||e[21]!==m||e[22]!==b||e[23]!==x||e[24]!==p||e[25]!==f||e[26]!==h||e[27]!==A||e[28]!==d||e[29]!==I||e[30]!==N||e[31]!==l||e[32]!==P||e[33]!==g||e[34]!==C||e[35]!==u||e[36]!==k){const Z=C===void 0?[]:C,ee=`${d}/${l}`;let H;e[38]!==ee?(H=ee.toLowerCase(),e[38]=ee,e[39]=H):H=e[39];const J=H;let _;e[40]!==J?(_=O=>O.headRepoFullName?.toLowerCase()===J,e[40]=J,e[41]=_):_=e[41];const G=Z.filter(_);let ie;if(e[42]!==A||e[43]!==N||e[44]!==k){const O=new Set;ie=[...N,...k,...A].filter(U=>O.has(U.name)?!1:(O.add(U.name),!0)),e[42]=A,e[43]=N,e[44]=k,e[45]=ie}else ie=e[45];const X=ie;let V;e[46]===Symbol.for("react.memo_cache_sentinel")?(V=a.jsx(ul,{className:"h-4 w-4 shrink-0"}),e[46]=V):V=e[46];let ae;e[47]!==g?(ae=g("thread.branchPicker.advancedBack"),e[47]=g,e[48]=ae):ae=e[48];let W;e[49]!==p||e[50]!==ae?(W=a.jsxs("button",{type:"button",onClick:p,className:"flex items-center gap-1.5 px-2 py-1.5 text-xs text-muted-foreground hover:text-foreground",children:[V,ae]}),e[49]=p,e[50]=ae,e[51]=W):W=e[51];let q;e[52]!==h?(q=O=>{h(O),y("")},e[52]=h,e[53]=q):q=e[53];let de;e[54]!==g?(de=g("thread.branchPicker.branchesTab"),e[54]=g,e[55]=de):de=e[55];let me;e[56]!==de?(me=a.jsx(Dt,{value:"branches",className:"h-6 px-2.5 text-xs",children:de}),e[56]=de,e[57]=me):me=e[57];let re;e[58]!==g?(re=g("thread.branchPicker.prsTab"),e[58]=g,e[59]=re):re=e[59];let oe;e[60]!==re?(oe=a.jsx(Dt,{value:"prs",className:"h-6 px-2.5 text-xs",children:re}),e[60]=re,e[61]=oe):oe=e[61];let Y;e[62]!==m||e[63]!==g?(Y=!m&&a.jsx(Dt,{value:"local",className:"h-6 px-2.5 text-xs",children:g("thread.branchPicker.localTab")}),e[62]=m,e[63]=g,e[64]=Y):Y=e[64];let ue;e[65]!==me||e[66]!==oe||e[67]!==Y?(ue=a.jsxs(Sr,{className:"h-auto w-fit justify-start gap-1 bg-accent p-1",variant:"pill",children:[me,oe,Y]}),e[65]=me,e[66]=oe,e[67]=Y,e[68]=ue):ue=e[68];let je;e[69]!==q||e[70]!==ue||e[71]!==u?(je=a.jsx(kr,{className:"px-2 pt-2 pb-1",value:u,onValueChange:q,children:ue}),e[69]=q,e[70]=ue,e[71]=u,e[72]=je):je=e[72],$=a.jsxs("div",{className:"flex flex-col",children:[W,je,u==="local"&&!m?a.jsx(Si,{url:b,onSave:f}):a.jsxs(ol,{filter:u==="branches"?_i:void 0,children:[a.jsx(cl,{placeholder:g(u==="branches"?"thread.branchPicker.searchBranches":"thread.branchPicker.searchPullRequests"),value:P,onValueChange:y}),a.jsx(dl,{onScroll:O=>{const U=O.currentTarget;u==="branches"&&U.scrollHeight-U.scrollTop-U.clientHeight<48&&B()},children:u==="branches"?a.jsxs(a.Fragment,{children:[S&&a.jsx("div",{className:"p-3 text-xs text-muted-foreground",children:g("thread.branchPicker.loadingMore")}),!S&&X.length===0&&a.jsx(Dn,{children:g("thread.branchPicker.noBranchesFound")}),X.length>0&&a.jsx(Mn,{children:X.map(O=>a.jsxs(Fn,{value:O.name,className:"cursor-pointer",onSelect:()=>x(O.name,O.name),children:[a.jsx(Fa,{className:"mr-2 h-4 w-4 shrink-0"}),a.jsx("span",{className:"flex-1 truncate",children:O.name})]},O.name))}),R&&a.jsx("div",{className:"p-2",children:a.jsx(we,{variant:"ghost",size:"sm",className:"h-7 w-full text-xs",disabled:T,onClick:B,children:g(T?"thread.branchPicker.loadingMore":"thread.branchPicker.loadMoreBranches")})})]}):a.jsxs(a.Fragment,{children:[I&&a.jsx("div",{className:"p-3 text-xs text-muted-foreground",children:g("thread.branchPicker.loadingPullRequests")}),!I&&G.length===0&&a.jsx(Dn,{children:g("thread.branchPicker.noOpenPullRequests")}),G.length>0&&a.jsx(Mn,{children:G.map(O=>a.jsxs(Fn,{value:`#${O.number} ${O.title} ${O.head}`,className:"cursor-pointer",onSelect:()=>x(O.head,Un(O.title)),children:[a.jsx(ks,{className:"mr-2 h-4 w-4 shrink-0 text-muted-foreground"}),a.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[a.jsx("span",{className:"truncate",children:Un(O.title)}),a.jsxs("span",{className:"truncate text-xs text-muted-foreground",children:["#",O.number," · ",O.head]})]})]},O.number))})]})})]})]}),e[17]=B,e[18]=R,e[19]=T,e[20]=S,e[21]=m,e[22]=b,e[23]=x,e[24]=p,e[25]=f,e[26]=h,e[27]=A,e[28]=d,e[29]=I,e[30]=N,e[31]=l,e[32]=P,e[33]=g,e[34]=C,e[35]=u,e[36]=k,e[37]=$}else $=e[37];return $}function _i(t,e){return Us(t,e)?1:0}function Oi(t){const e=M.c(18),{locked:s,placement:r,value:n,virtualMcpId:o,isV8:d,userLabel:l,baseBranch:i,onChange:c,onCreateBranch:u,onAdoptBranch:h,orgId:m,orgSlug:b,userId:f,target:p,owner:x,repo:g,sandboxMap:P}=t;let y;return e[0]!==i||e[1]!==d||e[2]!==s||e[3]!==h||e[4]!==c||e[5]!==u||e[6]!==m||e[7]!==b||e[8]!==x||e[9]!==r||e[10]!==g||e[11]!==P||e[12]!==p||e[13]!==f||e[14]!==l||e[15]!==n||e[16]!==o?(y=a.jsx(Fi,{virtualMcpId:o,isV8:d,userLabel:l,value:n,baseBranch:i,orgId:m,orgSlug:b,userId:f,target:p,owner:x,repo:g,sandboxMap:P,onChange:c,onCreateBranch:u,onAdoptBranch:h,spawnsNewChat:s,placement:r}),e[0]=i,e[1]=d,e[2]=s,e[3]=h,e[4]=c,e[5]=u,e[6]=m,e[7]=b,e[8]=x,e[9]=r,e[10]=g,e[11]=P,e[12]=p,e[13]=f,e[14]=l,e[15]=n,e[16]=o,e[17]=y):y=e[17],y}function Li(t){const e=M.c(2),{branchPill:s}=t;if(!s)return null;let r;return e[0]!==s?(r=a.jsx(a.Fragment,{children:s}),e[0]=s,e[1]=r):r=e[1],r}function Ui(t){const e=M.c(21),{virtualMcp:s,currentBranch:r}=t,n=qa(),o=Vt();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,c=o?.createTask;let u;e[3]!==o?.activeTask?.metadata||e[4]!==s?.metadata?(u=gl(s?.metadata)==="cms"&&xl(o?.activeTask?.metadata,s?.metadata)==="sandbox",e[3]=o?.activeTask?.metadata,e[4]=s?.metadata,e[5]=u):u=e[5];const h=u,m=yl(s),b=Ye(m),{data:f}=ws.useSession(),p=f?.user;let x;e[6]!==p?(x=cn(p),e[6]=p,e[7]=x):x=e[7];const g=x,P=f?.user?.id??"",{org:y}=js(),v=kl(s,r),j=_r(s?.id);let w;e[8]!==c||e[9]!==l||e[10]!==i?(w=D=>{l&&c?c({branch:D}):i&&i(D)},e[8]=c,e[9]=l,e[10]=i,e[11]=w):w=e[11];const N=w;let k;e[12]!==h||e[13]!==c||e[14]!==l||e[15]!==i?(k=D=>{(l||h)&&c?c({branch:D}):i&&i(D)},e[12]=h,e[13]=c,e[14]=l,e[15]=i,e[16]=k):k=e[16];const A=k;let S;e[17]!==c?(S=c?D=>c({runtime:"sandbox",branch:D}):void 0,e[17]=c,e[18]=S):S=e[18];const R=S,T=m&&Br(b)?a.jsx(Oi,{userLabel:g,virtualMcpId:s?.id??"",isV8:j==="v8",value:r,baseBranch:v,orgId:y.id,orgSlug:y.slug,userId:P,target:b,owner:m.owner,repo:m.name,sandboxMap:s?.metadata?.sandboxMap,onChange:N,onCreateBranch:A,onAdoptBranch:R,locked:l,placement:"chat"},`${Dr(b)}:${m.owner}/${m.name}`):null;let B;return e[19]!==T?(B=a.jsx(Li,{branchPill:T}),e[19]=T,e[20]=B):B=e[20],B}const zi=$a("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 qi(t){const e=M.c(11);let s,r,n;e[0]!==t?({className:s,orientation:r,...n}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=n):(s=e[1],r=e[2],n=e[3]);let o;e[4]!==s||e[5]!==r?(o=Q(zi({orientation:r}),s),e[4]=s,e[5]=r,e[6]=o):o=e[6];let d;return e[7]!==r||e[8]!==n||e[9]!==o?(d=a.jsx("div",{role:"group","data-slot":"button-group","data-orientation":r,className:o,...n}),e[7]=r,e[8]=n,e[9]=o,e[10]=d):d=e[10],d}function Hi(t){const e=M.c(14),{item:s}=t;let r;e[0]!==s?(r=()=>{s.onSelect()},e[0]=s,e[1]=r):r=e[1];let n;e[2]!==s.disabled||e[3]!==s.icon||e[4]!==s.label||e[5]!==r?(n=a.jsxs(Ot,{disabled:s.disabled,onSelect:r,children:[s.icon,s.label]}),e[2]=s.disabled,e[3]=s.icon,e[4]=s.label,e[5]=r,e[6]=n):n=e[6];const o=n;if(!s.tooltip)return o;let d;e[7]!==o?(d=a.jsx(jt,{asChild:!0,children:o}),e[7]=o,e[8]=d):d=e[8];let l;e[9]!==s.tooltip?(l=a.jsx(Pt,{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=a.jsxs(wt,{children:[d,l]}),e[11]=d,e[12]=l,e[13]=i):i=e[13],i}function ea(t){const e=M.c(20),{label:s,onClick:r,variant:n,size:o,disabled:d,loading:l,pulse:i,tooltip:c,icon:u,items:h,menuAriaLabel:m,className:b}=t,f=n===void 0?"default":n,p=o===void 0?"default":o,x=d===void 0?!1:d,g=l===void 0?!1:l,P=i===void 0?!1:i,y=(h?.length??0)>0;let v;if(e[0]!==b||e[1]!==x||e[2]!==y||e[3]!==u||e[4]!==h||e[5]!==s||e[6]!==g||e[7]!==m||e[8]!==r||e[9]!==P||e[10]!==p||e[11]!==c||e[12]!==f){const j=Q(Pr,f==="default"&&"focus-visible:inset-ring-current");let w;e[14]!==u||e[15]!==g?(w=g?a.jsx(Lt,{size:"xs"}):u,e[14]=u,e[15]=g,e[16]=w):w=e[16];const N=a.jsxs(we,{type:"button",variant:f,size:p,disabled:x,"aria-busy":g||void 0,onClick:g?void 0:r,className:Q(j,y&&"rounded-r-none border-r border-current/20"),children:[w,s]}),k=P&&"animate-pulse-brightness motion-reduce:animate-none motion-reduce:opacity-80";let A;e[17]!==b||e[18]!==k?(A=Q(k,b),e[17]=b,e[18]=k,e[19]=A):A=e[19],v=a.jsxs(qi,{className:A,children:[c?a.jsxs(wt,{children:[a.jsx(jt,{asChild:!0,children:a.jsx("span",{className:Q("inline-flex rounded-lg outline-none",j,x&&"cursor-not-allowed"),tabIndex:x?0:void 0,role:x?"button":void 0,"aria-disabled":x||void 0,children:N})}),a.jsx(Pt,{children:c})]}):N,y?a.jsxs(ys,{children:[a.jsx(xs,{asChild:!0,children:a.jsx(we,{type:"button",variant:f,size:p,"aria-label":m,className:Q("has-[>svg]:px-2",j),children:a.jsx(Cr,{className:"size-3.5"})})}),a.jsx(vs,{align:"end",children:h?.map(Ki)})]}):null]}),e[0]=b,e[1]=x,e[2]=y,e[3]=u,e[4]=h,e[5]=s,e[6]=g,e[7]=m,e[8]=r,e[9]=P,e[10]=p,e[11]=c,e[12]=f,e[13]=v}else v=e[13];return v}function Ki(t){return a.jsx(Hi,{item:t},t.key)}function ta(t){return As({userName:t?.name,userEmail:t?.email})??void 0}function Rs(t){const e=M.c(18),{state:s,header:r,body:n,note:o,gate:d,footer:l}=t,i=s!=="ready";let c;e[0]!==r?(c=a.jsx("div",{className:"space-y-0.5 px-4 py-3",children:r}),e[0]=r,e[1]=c):c=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=a.jsx("div",{className:"border-t"}),e[2]=u):u=e[2];let h;e[3]!==o?(h=o?a.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 m;e[5]!==n||e[6]!==h?(m=a.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[n,h]}),e[5]=n,e[6]=h,e[7]=m):m=e[7];let b;e[8]===Symbol.for("react.memo_cache_sentinel")?(b=a.jsx("div",{className:"border-t"}),e[8]=b):b=e[8];let f;e[9]!==l?(f=a.jsx("div",{className:"space-y-2 px-4 py-3",children:l}),e[9]=l,e[10]=f):f=e[10];let p;return e[11]!==d||e[12]!==s||e[13]!==i||e[14]!==c||e[15]!==m||e[16]!==f?(p=a.jsxs("div",{className:"flex min-h-0 flex-1 flex-col","data-publish-state":s,"aria-busy":i,children:[c,u,m,d,b,f]}),e[11]=d,e[12]=s,e[13]=i,e[14]=c,e[15]=m,e[16]=f,e[17]=p):p=e[17],p}function Kt(t){const e=M.c(2),{children:s}=t;let r;return e[0]!==s?(r=a.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]=r):r=e[1],r}function sa(t){const e=M.c(10);let s,r,n;e[0]!==t?({className:r,children:s,...n}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=n):(s=e[1],r=e[2],n=e[3]);let o;e[4]!==r?(o=Q("rounded-lg border bg-card px-3 py-2.5",r),e[4]=r,e[5]=o):o=e[5];let d;return e[6]!==s||e[7]!==n||e[8]!==o?(d=a.jsx("div",{className:o,...n,children:s}),e[6]=s,e[7]=n,e[8]=o,e[9]=d):d=e[9],d}function dt(t){const e=M.c(4),{className:s}=t;let r;e[0]!==s?(r=Q("animate-pulse rounded bg-muted motion-reduce:animate-none",s),e[0]=s,e[1]=r):r=e[1];let n;return e[2]!==r?(n=a.jsx("div",{className:r}),e[2]=r,e[3]=n):n=e[3],n}function Mt(){const t=M.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=a.jsx(sa,{children:a.jsxs("div",{className:"flex items-center gap-2.5",children:[a.jsx(dt,{className:"size-4 rounded-md"}),a.jsx(dt,{className:"h-3 w-24"}),a.jsx(dt,{className:"h-2.5 w-16"}),a.jsx(dt,{className:"ml-auto size-6 rounded"})]})}),t[0]=e):e=t[0],e}async function Vi(t,e,s){const r=As(s.coAuthor),{changeRequest:n}=await Gs(t,"CHANGE_REQUEST_OPEN",{...e,head:s.branch,base:s.base,title:s.title,body:ji(s.body,r)||void 0});return{number:n.number,htmlUrl:n.url}}class na extends Error{reason;detail;constructor(e,s){super(s||`Merge refused: ${e}`),this.name="ChangeRequestMergeRefused",this.reason=e,this.detail=s}}async function ra(t,e,s){const r=As(s.coAuthor),n=r?Zr(s.commitMessage?.trim()??"",r):s.commitMessage?.trim()||void 0,o=await Gs(t,"CHANGE_REQUEST_MERGE",{...e,number:s.number,strategy:"squash",commitTitle:s.commitTitle,commitMessage:n});if(!o.merged)throw new na(o.reason??"error",o.detail)}function Gi(t,e){switch(t){case"conflict":return e("thread.mergeRefused.conflict");case"blocked":return e("thread.mergeRefused.blocked");case"rate_limited":return e("thread.mergeRefused.rateLimited");case"not_found":return e("thread.mergeRefused.notFound");default:return e("thread.mergeRefused.error")}}class zs extends Error{constructor(){super("The branch changed since these changes were shown"),this.name="PublishHeadMovedError"}}class yn extends Error{constructor(e,s,r){super(e),this.step=s,this.pr=r,this.name="PublishStepError"}step;pr}const ps=255;function aa(t){if(t.length<=ps)return t;const e=t.slice(0,ps-1),s=e.lastIndexOf(" ");return`${(s>0?e.slice(0,s):e).trimEnd()}…`}function Qi(t){const e=t.title.trim(),s=t.body.trim(),r=[e,s].filter(Boolean).join(`
6
-
7
- `);if(e.length>ps)return{title:aa(e),body:r,message:r};const n=e||t.fallbackTitle;return{title:n,body:s||void 0,message:r||n}}function Wi(t,e){const s=t.trim().split(`
8
- `);return Qi({title:s[0]??"",body:s.slice(1).join(`
9
- `),fallbackTitle:e})}function bs(t){return{orgSlug:t.orgSlug,virtualMcpId:t.virtualMcpId,branch:t.branch,threadId:t.threadId}}function Ji(t){return t.fastPreview?{fastPreview:!0}:void 0}async function Es(t,e,s){try{return await s()}catch(r){throw new yn(r instanceof Error?r.message:e,t)}}async function la(t){const{expectedHeadSha:e,expectedDiffSignature:s}=t;if(!e&&!s)return;const r=await bn(bs(t)).catch(()=>null);if(!r)return;if(e&&r.headSha&&r.headSha!==e)throw new zs;if(!s)return;const n=await Hr(bs(t),r,t.baseBranch,Ji(t)).catch(()=>null);if(n&&Ns(n)!==s)throw new zs}function ia(t,e){return Gl(bs(t),e)}function oa(t,e){return Vi(t.orgSlug,t.target,{branch:t.headBranch,title:e.title,body:e.body,base:t.baseBranch,coAuthor:t.coAuthor})}async function Xi(t,e,s){await la(t),await Es("push",s("thread.publishDialog.failedPushChanges"),()=>ia(t,e.message)),await Es("sync",s("thread.publishDialog.failedRebase"),()=>Kr(bs(t),t.baseBranch));const r=await Es("open-pr",s("thread.publishDialog.failedOpenPullRequest"),()=>oa(t,e));try{await ra(t.orgSlug,t.target,{number:r.number,commitTitle:e.title,commitMessage:e.body,coAuthor:t.coAuthor})}catch(n){throw new yn(n instanceof Error?n.message:s("thread.publishDialog.failedMergePullRequest"),"merge",r)}return r}async function Yi(t,e){return await la(t),await ia(t,e.message),oa(t,e)}function Hn(t,e){return t instanceof zs?{message:e("siteEditor.publish.changedMeanwhile"),pullRequest:null,headMoved:!0}:t instanceof yn&&t.step==="merge"&&t.pr?{message:e("thread.publishDialog.mergeFailed",{prNumber:t.pr.number,message:t.message}),pullRequest:t.pr,headMoved:!1}:{message:t instanceof Error?t.message:e("thread.publishDialog.failedPublish"),pullRequest:null,headMoved:!1}}function Zi(t,e){_e.success(e("thread.publishDialog.submittedForReview",{prNumber:t.number}),{action:{label:e("thread.publishDialog.viewOnProvider"),onClick:()=>window.open(t.htmlUrl,"_blank","noopener,noreferrer")}})}function ca(t){return t.kind!=="block"?null:t.namedRule??null}function eo(t,e){const s=e.find(r=>r&&typeof r=="object");return s?Ml(s.__resolveType):zr(t)}const to=/(?:^|\/)\.deco\/blocks\/([^/]+)\.json$/;function wn(t){const e=to.exec(t)?.[1];return e?ni(e):null}function gs(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 so(t,e){return t===null?"new":e===null?"removed":"edited"}function da(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 _t(t,e,s=!1){if(t&&typeof t=="object"&&!Array.isArray(t)){const r=t.__resolveType;if(typeof r=="string"&&r.trim()){if(s)return Il(r);const o=(r.split("/").pop()??r).replace(/\.[jt]sx?$/,"");return da(o)||o}}return`Section ${e+1}`}function jn(t){if(Ur(t))return t.value??null;const e=t.__resolveType;return typeof e=="string"&&Bl(e)?t.section??null:null}const ua=6;function ds(t,e=0){if(e>ua||!t||typeof t!="object")return[];if(Array.isArray(t))return t.flatMap(n=>ds(n,e+1));const s=t;if(fn(s.__resolveType))return qs(s).flatMap(n=>ds(n?.value,e+1));const r=jn(s);return r!==null?ds(r,e+1):[s]}function qs(t){const e=t?.variants;return Array.isArray(e)?e.map(s=>s&&typeof s=="object"&&!Array.isArray(s)?s:null):[]}function Kn(t){let e=t;for(let s=0;s<ua;s++){if(!e||typeof e!="object"||Array.isArray(e))return null;const r=e;if(fn(r.__resolveType))return r;const n=jn(r);if(n===null)return null;e=n}return null}function no(t,e,s){const r=qs(Kn(t)),n=e?qs(Kn(e)):[],o=e?Array.from({length:Math.max(r.length,n.length)},(i,c)=>c).filter(i=>!Ts(r[i],n[i])):[],l=[...o.map(i=>r[i]??n[i]),...r.filter((i,c)=>!o.includes(c))].flatMap(i=>ds(i?.value)).map(i=>_t(i,s,!0));return[...new Set(l)]}function _s(t,e,s,r,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 c=o;if(fn(c.__resolveType)){d=!0;break}const u=jn(c);if(u===null)break;o=u}const l=d?no(t,n,e):[];return{name:_t(d?t:o,e,!0),kind:"section",status:s,fields:r,...d?{wrapper:!0}:{},...l.length>0?{held:l}:{}}}function Hs(t,e){const s=t.sections;if(Array.isArray(s))return s.flatMap((r,n)=>r&&typeof r=="object"&&!Array.isArray(r)?[{section:r,basePath:["sections",n]}]:[]);if(s&&typeof s=="object"){const r=s.variants;if(Array.isArray(r))return r.flatMap((n,o)=>{const d=n&&typeof n=="object"&&!Array.isArray(n)?n.value:null,l=e&&Ur(d),i=l?d.value:d;if(!Array.isArray(i))return[];const c=l?["sections","variants",o,"value","value"]:["sections","variants",o,"value"];return i.flatMap((u,h)=>u&&typeof u=="object"&&!Array.isArray(u)?[{section:u,basePath:[...c,h]}]:[])})}return[]}function Vn(t){return JSON.stringify(t,(e,s)=>{if(s&&typeof s=="object"&&!Array.isArray(s)){const r=s;return Object.keys(r).sort().reduce((n,o)=>(n[o]=r[o],n),{})}return s})}function Ts(t,e){return t===void 0&&e===void 0?!0:Vn(t)===Vn(e)}function Ut(t,e,s,r=new Set){const n=new Set([...Object.keys(t??{}),...Object.keys(e??{})]),o=[];for(const d of n){if(d.startsWith("__")||r.has(d))continue;const l=t?t[d]:void 0,i=e?e[d]:void 0;Ts(l,i)||o.push({label:da(d),path:[...s,d],from:l,to:i})}return o}const ro=new Set(["sections"]);function Pn(t,e,s=!1){const r=t?Hs(t,s):[],n=e?Hs(e,s):[],o=[],d=Math.max(r.length,n.length);for(let i=0;i<d;i++){const c=r[i],u=n[i];if(!s){const h=ao(c,u,i);h&&o.push(h);continue}if(c&&u){if(Ts(c.section,u.section))continue;o.push(_s(u.section,i,"edited",Ut(c.section,u.section,u.basePath),c.section))}else u?o.push(_s(u.section,i,"new",[])):c&&o.push(_s(c.section,i,"removed",[]))}const l=Ut(t,e,[],ro);return l.length>0&&o.push({name:"Page settings",kind:"settings",status:"edited",fields:l}),o}function ao(t,e,s){return t&&e?Ts(t.section,e.section)?null:{name:_t(e.section,s),kind:"section",status:"edited",fields:Ut(t.section,e.section,e.basePath)}:e?{name:_t(e.section,s),kind:"section",status:"new",fields:[]}:t?{name:_t(t.section,s),kind:"section",status:"removed",fields:[]}:null}function Ks(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 lo(t){const e=[],s=[],r=[],n=[];for(const[o,d]of Object.entries(t?.diffs??{})){if(gn(o)){n.push(o);continue}const l=so(d.from,d.to),i=wn(o);if(!i){r.push(Ks(o,l));continue}const c=gs(d.from),u=gs(d.to),h=u??c;if(!h){r.push(Ks(o,l));continue}const m=Et(i,h);if(m){e.push({kind:"page",blockKey:i,name:m.name,pagePath:m.path,isSiteApp:!1,status:l,filepaths:[o],sections:l==="edited"?Pn(c,u):[],fromJson:c,toJson:u});continue}const b=hn(i,h);s.push({kind:"block",blockKey:i,name:fs(i,h),pagePath:null,isSiteApp:b,status:l,filepaths:[o],sections:l==="edited"?[{name:fs(i,h),kind:"section",status:"edited",fields:Ut(c,u,[])}].filter(f=>f.fields.length>0):[],fromJson:c,toJson:u})}return ha({pages:e,blocks:s,other:r,generated:n})}function Os(t,e){return(t.filepaths[0]??"").localeCompare(e.filepaths[0]??"")}function ha(t){const{pages:e,blocks:s,other:r,generated:n}=t;return e.sort(Os),s.sort(Os),r.sort(Os),{pages:e,blocks:s,other:r,generated:n,count:e.length+s.length+r.length}}function io(t){return t==="added"?"new":t==="removed"?"removed":"edited"}function fa(t){return t.startsWith("pages-")}function ma(t){const{files:e,lookup:s,diff:r}=t,n=[],o=[],d=[],l=[];for(const i of e){const c=i.path;if(gn(c)){l.push(c);continue}const u=io(i.status),h=wn(c);if(!h){d.push(Ks(c,u));continue}const m=r?.diffs[c],b=gs(m?.from??null),f=gs(m?.to??null),p=pa(s,h),x=p??f??b;if((p?Et(h,p):null)??(!p&&fa(h))){const y=x?Et(h,x):null;n.push({kind:"page",blockKey:h,name:y?.name??Lr(h),pagePath:y?.path??null,isSiteApp:!1,status:u,filepaths:[c],sections:u==="edited"?Pn(b,f):[],fromJson:b,toJson:f??(u==="new"?p:null)});continue}const P=fs(h,x??{});o.push({kind:"block",blockKey:h,name:P,pagePath:null,isSiteApp:hn(h,p??{}),status:u,filepaths:[c],sections:u==="edited"?[{name:P,kind:"section",status:"edited",fields:Ut(b,f,[])}].filter(y=>y.fields.length>0):[],fromJson:b,toJson:f})}return ha({pages:n,blocks:o,other:d,generated:l})}function pa(t,e){const s=t?.[e];return s&&typeof s=="object"&&!Array.isArray(s)?s:null}function oo(t,e){return t??e}function ba(t){return t.length<=1?t[0]??"":`${t.slice(0,-1).join(", ")} and ${t[t.length-1]}`}const Ls=3;function ls(t){if(t.length<=Ls)return ba(t);const e=t.length-Ls;return`${t.slice(0,Ls).join(", ")} and ${e} more`}function co(t,e){if(!e){const r=t.sections.filter(n=>n.kind==="section").map(n=>n.name).slice(0,3);return r.length>0?`${t.name} (${r.join(", ")})`:t.name}const s=[...new Set(t.sections.filter(r=>r.kind==="section").flatMap(r=>r.wrapper?r.held??[]:[r.name]))].slice(0,3);return s.length>0?`${t.name} (${s.join(", ")})`:t.name}function uo(t){const e=ca(t);return e==="experiments"?"A/B tests":e==="campaigns"?"Campaign dates":t.name}function ho(t){const e=[],s=t.pages.filter(l=>l.status==="edited"),r=t.pages.filter(l=>l.status==="new"),n=t.pages.filter(l=>l.status==="removed");if(s.length>0&&e.push(`updated ${ls(s.map(l=>co(l,!!t.v8)))}`),r.length>0){const l=r.length===1?"page":"pages";e.push(`added the ${ls(r.map(i=>i.name))} ${l}`)}if(n.length>0){const l=n.length===1?"page":"pages";e.push(`removed the ${ls(n.map(i=>i.name))} ${l}`)}const o=t.blocks.map(uo);if(o.length>0&&e.push(`changed ${ls(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=ba(e);return aa(d.charAt(0).toUpperCase()+d.slice(1))}function fo(t,e){return t?Hs(t,e).length:0}function mo(t,e=!1){const s={newPageSections:t.kind==="page"&&t.status==="new"?fo(t.toJson,e):null,sections:0,settings:!1,fields:0};if(s.newPageSections!==null)return s;for(const r of t.sections){if(r.kind==="settings"){s.settings=!0;continue}t.kind==="page"?s.sections+=1:s.fields+=r.fields.length}return s}const Gn="••••••";function zt(t){if(Array.isArray(t))return t.map(zt);if(!t||typeof t!="object")return t;const e=t,s={};for(const[r,n]of Object.entries(e))s[r]=zt(n);return e.__resolveType===Hl&&"ciphertext"in e&&(s.ciphertext=Gn),Dl(e)&&"encrypted"in e&&(s.encrypted=Gn),s}function Qn(t){return t.map(e=>({...e,from:zt(e.from),to:zt(e.to)}))}function po(t){const{changes:e,sides:s,lookup:r,meta:n,missingRules:o,missingRuleUses:d}=t,l=[],i=[],c=h=>[...new Set((s?.diagnostics??[]).filter(m=>In(Va(m.file))===In(h)).map(m=>m.side))],u=Object.keys(e).sort((h,m)=>h<m?-1:h>m?1:0);for(const h of u){const m=e[h],b=m.kind==="delete"?"removed":m.baseVersion===null?"new":"edited",f=s?.entries[h],p=f?.before??null,x=f?.after??null,g=pa(r,h),P=g??x??p,y=c(h),v=o?.get(h),j=zr(h),w=j?d?.get(j):void 0,N={blockKey:h,status:b,filepaths:[],entry:{name:h,version:m.version},...y.length>0?{unreadable:y}:{},...v&&v.length>0?{missingRules:v}:{},...j&&w&&w.pages+w.sections>0?{missingRuleUses:{kind:j,...w}}:{},fromJson:zt(p),toJson:zt(x??(b==="new"?g:null))},k=g?Et(h,g,n):null,A=!g&&P?Et(h,P,n):null;if(k??A??(!P&&fa(h))){const T=P?Et(h,P,n):null;l.push({...N,kind:"page",name:T?.name??Lr(h),pagePath:T?.path??null,isSiteApp:!1,sections:b==="edited"?Pn(p,x,!0).map(B=>({...B,fields:Qn(B.fields)})):[]});continue}const S=fs(h,P??{}),R=eo(h,[g,x,p]);i.push({...N,kind:"block",name:S,...R?{namedRule:R}:{},pagePath:null,isSiteApp:hn(h,g??P??{}),sections:b==="edited"?[{name:S,kind:"section",status:"edited",fields:Qn(Ut(p,x,[]))}].filter(T=>T.fields.length>0):[]})}return{pages:l,blocks:i,other:[],generated:[],count:l.length+i.length,v8:!0}}function Re(t){return t.filepaths[0]??t.blockKey??t.name}function bo(t){const e=t.pages+t.sections===1,s=t.names===1;return t.kind==="experiments"?s?e?"thread.publishPopover.missingTestUsesOne":"thread.publishPopover.missingTestUses":e?"thread.publishPopover.missingTestsUsesOne":"thread.publishPopover.missingTestsUses":s?e?"thread.publishPopover.missingCampaignUsesOne":"thread.publishPopover.missingCampaignUses":e?"thread.publishPopover.missingCampaignsUsesOne":"thread.publishPopover.missingCampaignsUses"}function go(t,e){return e(t==="new"?"thread.publishPopover.chipNew":t==="removed"?"thread.publishPopover.chipRemoved":"thread.publishPopover.chipEdited")}function xo(t,e){const s=t.kind==="block"?Ol:Nr;return a.jsx("span",{title:go(t.status,e),className:"flex shrink-0",children:a.jsx(s,{className:Q("size-4",t.status==="new"&&"text-brand",t.status==="edited"&&"text-warning",t.status==="removed"&&"text-destructive")})})}function vo(t,e){if(t.kind==="page")return t.pagePath;if(t.kind!=="block")return null;const s=ca(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 yo(t,e,s){const r=mo(t,s);if(r.newPageSections!==null)return[r.newPageSections===1?e("thread.publishPopover.newPageSectionOne"):e("thread.publishPopover.newPageSections",{count:r.newPageSections})];const n=[];return r.sections===1?n.push(e("thread.publishPopover.sectionChangedOne")):r.sections>1&&n.push(e("thread.publishPopover.sectionsChanged",{count:r.sections})),r.fields===1?n.push(e("thread.publishPopover.fieldChangedOne")):r.fields>1&&n.push(e("thread.publishPopover.fieldsChanged",{count:r.fields})),r.settings&&n.push(e("thread.publishPopover.pageSettingsChanged")),n}function ga(t){const e=M.c(47),{change:s,bodyPending:r,selected:n,onSelect:o,confirming:d,onConfirmingChange:l,onDiscard:i,isPublishing:c,isDiscarding:u,v8:h}=t,m=r===void 0?!1:r,b=h===void 0?!1:h,f=ve();let p;e[0]!==s||e[1]!==f?(p=vo(s,f),e[0]=s,e[1]=f,e[2]=p):p=e[2];const x=p;let g;if(e[3]!==m||e[4]!==s||e[5]!==d||e[6]!==x||e[7]!==u||e[8]!==c||e[9]!==l||e[10]!==i||e[11]!==o||e[12]!==n||e[13]!==f||e[14]!==b){const P=yo(s,f,b);let y;e[16]!==s.missingRules?(y=s.missingRules??[],e[16]=s.missingRules,e[17]=y):y=e[17];const v=y,j=s.missingRuleUses,w=j?Ul(f,j):null,N=m&&P.length===0&&s.status==="edited",k=n&&"border-foreground/30 bg-accent hover:bg-secondary-hover";let A;e[18]!==k?(A=Q("cursor-pointer transition-colors hover:bg-accent",k),e[18]=k,e[19]=A):A=e[19];let S;e[20]!==s?(S=Re(s),e[20]=s,e[21]=S):S=e[21];let R;e[22]!==s||e[23]!==f?(R=xo(s,f),e[22]=s,e[23]=f,e[24]=R):R=e[24];let T;e[25]!==s.name?(T=a.jsx("span",{className:"truncate text-sm font-medium",children:s.name}),e[25]=s.name,e[26]=T):T=e[26];let B;e[27]!==x?(B=x?a.jsx("span",{className:"truncate text-xs text-muted-foreground",children:x}):null,e[27]=x,e[28]=B):B=e[28];let D;e[29]!==n||e[30]!==T||e[31]!==B?(D=a.jsxs("button",{type:"button",className:"flex min-w-0 flex-1 items-center gap-2 text-left","aria-pressed":n,children:[T,B]}),e[29]=n,e[30]=T,e[31]=B,e[32]=D):D=e[32];let F;e[33]!==d||e[34]!==u||e[35]!==c||e[36]!==l||e[37]!==i||e[38]!==f?(F=d?a.jsxs("div",{className:"flex shrink-0 items-center gap-1.5",children:[a.jsx("button",{type:"button",className:"text-xs text-muted-foreground hover:text-foreground",onClick:$=>{$.stopPropagation(),l(!1)},children:f("thread.publishDialog.cancel")}),a.jsx("button",{type:"button",className:"text-xs font-medium text-destructive disabled:opacity-50",onClick:$=>{$.stopPropagation(),l(!1),i?.()},disabled:u,children:f("thread.publishPopover.discard")})]}):i?a.jsx(Ss,{children:a.jsxs(wt,{children:[a.jsx(jt,{asChild:!0,children:a.jsx(we,{type:"button",variant:"ghost-destructive",size:"icon-xs","aria-label":f("thread.publishPopover.discard"),className:"shrink-0 disabled:pointer-events-auto",onClick:$=>{$.stopPropagation(),l(!0)},disabled:c||u,children:a.jsx(Cs,{className:"size-3.5"})})}),a.jsx(Pt,{children:f("thread.publishPopover.discard")})]})}):null,e[33]=d,e[34]=u,e[35]=c,e[36]=l,e[37]=i,e[38]=f,e[39]=F):F=e[39];let C;e[40]!==D||e[41]!==F||e[42]!==R?(C=a.jsxs("div",{className:"flex items-center gap-2.5",children:[R,D,F]}),e[40]=D,e[41]=F,e[42]=R,e[43]=C):C=e[43];let I;e[44]!==v||e[45]!==f?(I=v.length>0?a.jsx("div",{className:"mt-1 space-y-0.5 pl-[26px] text-xs text-foreground","data-testid":"publish-change-missing-rule",children:v.map($=>a.jsx("div",{className:"truncate",children:f($==="experiments"?"thread.publishPopover.missingTest":"thread.publishPopover.missingCampaign")},$))}):null,e[44]=v,e[45]=f,e[46]=I):I=e[46],g=a.jsxs(sa,{className:A,"data-change-id":S,onClick:o,children:[C,P.length>0?a.jsx("div",{className:"mt-1 space-y-0.5 pl-[26px] text-xs text-muted-foreground",children:P.map(wo)}):N?a.jsx("div",{className:"mt-1 space-y-0.5 pl-[26px]",children:a.jsx(dt,{className:"h-4 w-2/3"})}):null,I,j&&w?a.jsx("div",{className:"mt-1 truncate pl-[26px] text-xs text-foreground","data-testid":"publish-change-missing-rule-uses",children:f(bo(j),{places:w.places})}):null]}),e[3]=m,e[4]=s,e[5]=d,e[6]=x,e[7]=u,e[8]=c,e[9]=l,e[10]=i,e[11]=o,e[12]=n,e[13]=f,e[14]=b,e[15]=g}else g=e[15];return g}function wo(t,e){return a.jsx("div",{className:"truncate",children:t},`${e}-${t}`)}function xa(){const t=M.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,r]=z.useState(e);let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=l=>{if(!l)return;const i=()=>r(u=>u.width===l.clientWidth&&u.height===l.clientHeight?u:{width:l.clientWidth,height:l.clientHeight});i();const c=new ResizeObserver(i);return c.observe(l),()=>c.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 jo(){return document.documentElement.classList.contains("dark")?"vs-dark":"vs"}const Po=[{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 Wn(t){const e=M.c(10),{height:s}=t,r=ve();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=Po.map(So),e[2]=o):o=e[2];let d;e[3]!==r?(d=r("thread.publishDialog.openingComparison"),e[3]=r,e[4]=d):d=e[4];let l;e[5]!==d?(l=a.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=a.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 So(t,e){return a.jsxs("div",{className:Q("flex items-center gap-2 rounded px-1 py-0.5",t.tone==="del"&&"bg-destructive/5",t.tone==="add"&&"bg-success/5"),children:[a.jsx("div",{className:Q("h-2 w-4 shrink-0 animate-pulse rounded-sm bg-muted",t.tone==="del"&&"bg-destructive/20",t.tone==="add"&&"bg-success/25")}),a.jsx("div",{className:Q("h-2 animate-pulse rounded-sm bg-muted",t.width,t.tone==="del"&&"bg-destructive/20",t.tone==="add"&&"bg-success/25")})]},e)}const va={readOnly:!0,renderSideBySide:!1,minimap:{enabled:!1},scrollBeyondLastLine:!1,fontSize:12},ko={...va,lineNumbersMinChars:3,lineDecorationsWidth:4,folding:!1,glyphMargin:!1,renderOverviewRuler:!1};function Co(t){const e=M.c(11),{diff:s,emptyMessage:r,rowClassName:n,onDiscardFile:o,hideFileRows:d,editorHeight:l}=t,i=r===void 0?"No file changes in the working tree":r,c=n===void 0?"px-6":n,u=d===void 0?!1:d,h=l===void 0?"380px":l,[m,b]=z.useState(null),[f,p]=z.useState(null);let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=jo(),e[0]=x):x=e[0];const g=x;if(!s||Object.keys(s.diffs).length===0){let y;return e[1]!==i?(y=a.jsx("div",{className:"flex items-center justify-center py-10 text-sm text-muted-foreground",children:i}),e[1]=i,e[2]=y):y=e[2],y}let P;return e[3]!==s.diffs||e[4]!==f||e[5]!==h||e[6]!==m||e[7]!==u||e[8]!==o||e[9]!==c?(P=a.jsx("div",{className:"divide-y",children:Object.entries(s.diffs).map(y=>{const[v,j]=y,{from:w,to:N}=j,k=m===v,A=w===null,S=N===null,R=v.startsWith("/")?v.slice(1):v,T=R.lastIndexOf("/"),B=T>=0?R.slice(T+1):R,D=T>=0?R.slice(0,T):null,F=ri(v),C=A?"bg-success":S?"bg-destructive":"bg-warning";return u?a.jsx("div",{children:a.jsx(_n,{original:w??"",modified:N??"",language:F,theme:g,height:h,loading:a.jsx(Wn,{height:h}),options:ko})},v):a.jsxs("div",{children:[a.jsxs("div",{className:Q("flex items-center gap-3 py-3 hover:bg-accent",c),children:[a.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(k?null:v),children:a.jsx(ar,{className:Q("h-3.5 w-3.5 transition-transform",k&&"rotate-90")})}),a.jsx("div",{className:Q("h-2.5 w-2.5 shrink-0 rounded-full",C)}),a.jsx(Nr,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),a.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:B}),D&&a.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:D}),o?a.jsxs(ys,{children:[a.jsx(xs,{asChild:!0,children:a.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:a.jsx(Ea,{className:"h-3.5 w-3.5"})})}),a.jsx(vs,{align:"end",children:a.jsx(Ot,{className:"text-destructive focus:text-destructive",onSelect:()=>p(v),children:"Discard changes"})})]}):null]}),f===v&&o?a.jsxs("div",{className:Q("flex items-center justify-between gap-3 border-t bg-destructive/5 py-2.5",c),children:[a.jsxs("span",{className:"text-xs text-destructive",children:["Discard all changes to"," ",a.jsx("span",{className:"font-medium",children:B}),"? This cannot be undone."]}),a.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[a.jsx(we,{type:"button",variant:"ghost",size:"sm",onClick:()=>p(null),children:"Cancel"}),a.jsx(we,{type:"button",variant:"destructive",size:"sm",onClick:()=>{p(null),o(v)},children:"Discard"})]})]}):null,k&&a.jsx("div",{className:"border-t",children:a.jsx(_n,{original:w??"",modified:N??"",language:F,theme:g,height:h,loading:a.jsx(Wn,{height:h}),options:va})})]},v)})}),e[3]=s.diffs,e[4]=f,e[5]=h,e[6]=m,e[7]=u,e[8]=o,e[9]=c,e[10]=P):P=e[10],P}function No(t){if(t.kind!=="block"||t.isSiteApp||!t.blockKey)return null;const e=(t.toJson??t.fromJson)?.__resolveType;return typeof e=="string"&&Kl(e)?t.blockKey:null}function Ao(t){return t.kind!=="page"?!0:!t.pagePath||At(t.pagePath).length>0}function Ro(t,e){try{return li(t,$l,e)}catch{return null}}function To(t,e,s){if(!e)return;const r=Fl(e,t);if(!r)return null;if(At(r.path).length===0||s?.path!==r.path)return r.path;const n=mn(r.path,s.params);return At(n).length===0?n:r.path}function Io(t){return t.sectionKey&&!t.v8?Ro(t.previewServerUrl,t.sectionKey):Do(t.previewServerUrl,t.path)}function Bo(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 r=mn(s,e.params);return At(r).length===0?r:""}function Do(t,e){const s=e.trim();if(!s||At(s).length>0)return null;try{const r=new URL(t),n=new URL(s.startsWith("/")?s:`/${s}`,r);return n.origin===r.origin?n:null}catch{return null}}function Mo(t,e){if(!e)return null;if(e.kind==="pointer")return Jr(t.toString(),e.pointer);try{return new URL(`${t.pathname}${t.search}`,e.previewUrl).href}catch{return null}}function Fo(t,e,s){return e===null?!1:t!=="other"||s?.kind==="sandbox"}function $o(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 ya=z.createContext(!0),Eo=["split","before","after","code"];function _o(t){return Eo.includes(t)}const wa={desktop:1280,mobile:412};function Oo(t,e){const s=(o,d)=>t.unreadable?.includes(d)?e:o?`${JSON.stringify(o,null,2)}
10
- `:null,r=t.status==="new"?null:s(t.fromJson,"before"),n=t.status==="removed"?null:s(t.toJson,"after");return r===null&&n===null?{diffs:{}}:t.status==="edited"&&(r===null||n===null)?{diffs:{}}:{diffs:{[Ga(t.entry.name)]:{from:r,to:n}}}}function ja(t){const e=M.c(76),{change:s,diff:r,bodyPending:n,previewServerUrl:o,draft:d,lastPage:l,v8:i,onReady:c}=t,u=ve(),h=z.use(ya),m=No(s),b=i?null:m,f=i?m:null,p=f?To(f,i?.blocks,l):void 0,x=f!==null&&p===null,g=Fo(s.kind,o,d)&&(f===null||typeof p=="string"),[P,y]=z.useState(null),v=g?P??"split":"code",[j,w]=z.useState("desktop"),[N,k]=z.useState(null),A=N??(f?p??"":Bo(s,l));let S;e[0]!==s?(S=Ao(s),e[0]=s,e[1]=S):S=e[1];const R=S,T=o?Io({previewServerUrl:o,sectionKey:m,path:A,v8:!!i}):null,B=T?Jr(T.toString(),ii):null,D=T?Mo(T,d):null;let F;e[2]!==s||e[3]!==r?.diffs||e[4]!==u?(F=s.entry?Oo(s,u("thread.publishCompare.sideUnreadable")):{diffs:Object.fromEntries(s.filepaths.flatMap(te=>{const fe=r?.diffs[te];return fe?[[te,fe]]:[]}))},e[2]=s,e[3]=r?.diffs,e[4]=u,e[5]=F):F=e[5];const C=F;let I;e[6]!==C.diffs?(I=Object.keys(C.diffs),e[6]=C.diffs,e[7]=I):I=e[7];const $=I.length>0;let Z;e:{if(b!==null){Z=null;break e}if(f!==null){const fe=A.trim();if(!fe){Z=null;break e}Z=At(fe).length>0?u("thread.publishCompare.dynamicHint",{template:fe}):u("thread.publishCompare.blockHint",{path:fe});break e}if(s.kind!=="page"){let fe;e[8]!==u?(fe=u("thread.publishCompare.globalHint"),e[8]=u,e[9]=fe):fe=e[9],Z=fe;break e}let te;e[10]!==s.pagePath||e[11]!==u?(te=s.pagePath&&At(s.pagePath).length>0?u("thread.publishCompare.dynamicHint",{template:s.pagePath}):null,e[10]=s.pagePath,e[11]=u,e[12]=te):te=e[12],Z=te}const ee=Z,H=$o(s,!!i),[J,_]=z.useState(Lo);let G;e[13]===Symbol.for("react.memo_cache_sentinel")?(G=te=>_(fe=>fe.has(te)?fe:new Set(fe).add(te)),e[13]=G):G=e[13];const ie=G;let X;e[14]!==i?(X=te=>i?a.jsx(qo,{...te,onLoaded:ie}):a.jsx(zo,{...te}),e[14]=i,e[15]=X):X=e[15];const V=X,W=(g?[H.before==="new"?null:B,H.after==="removed"?null:D].flatMap(te=>te?[vn(te,j)]:[]):[]).every(te=>J.has(te));let q;e[16]!==c||e[17]!==W?(q=W&&c?te=>{te&&c()}:void 0,e[16]=c,e[17]=W,e[18]=q):q=e[18];const de=q,me=H.before==="new"?a.jsx(is,{icon:a.jsx(Ir,{className:"size-5 text-brand"}),title:u("thread.publishCompare.newTitle"),description:u("thread.publishCompare.newDescription")}):V({url:B,device:j,title:u("thread.publishCompare.before"),missing:u("thread.publishCompare.enterPath")}),re=H.after==="removed"?a.jsx(is,{icon:a.jsx(Cs,{className:"size-5 text-destructive"}),title:u("thread.publishCompare.removedTitle"),description:u("thread.publishCompare.removedDescription")}):V({url:D,device:j,title:u("thread.publishCompare.after"),missing:u(T?"thread.publishCompare.draftUnavailable":"thread.publishCompare.enterPath")});let oe;e[19]!==g||e[20]!==y||e[21]!==h||e[22]!==u||e[23]!==v?(oe=g||h?a.jsx(kr,{value:v,onValueChange:te=>{_o(te)&&y(te)},children:a.jsxs(Sr,{className:"h-8 w-auto",variant:"pill",children:[g?a.jsxs(a.Fragment,{children:[a.jsx(Dt,{value:"split",className:"px-3 text-xs",children:u("thread.publishCompare.sideBySide")}),a.jsx(Dt,{value:"before",className:"px-3 text-xs",children:u("thread.publishCompare.before")}),a.jsx(Dt,{value:"after",className:"px-3 text-xs",children:u("thread.publishCompare.after")})]}):null,h?a.jsx(Dt,{value:"code",className:"px-3 text-xs",children:u("thread.publishCompare.code")}):null]})}):null,e[19]=g,e[20]=y,e[21]=h,e[22]=u,e[23]=v,e[24]=oe):oe=e[24];let Y;e[25]!==D||e[26]!==g||e[27]!==s.pagePath||e[28]!==j||e[29]!==A||e[30]!==R||e[31]!==b||e[32]!==w||e[33]!==k||e[34]!==u||e[35]!==v?(Y=g&&v!=="code"?a.jsxs(a.Fragment,{children:[b?null:R?a.jsx(_a,{value:A,onChange:te=>k(te.target.value),placeholder:s.pagePath??"/","aria-label":u("thread.publishCompare.pathLabel"),className:"h-8 w-56 font-mono text-xs"}):a.jsx("span",{className:"max-w-56 truncate px-1 font-mono text-xs text-muted-foreground",children:A}),a.jsxs("div",{className:"flex items-center rounded-lg border p-0.5",children:[a.jsx(Jn,{active:j==="desktop",label:u("thread.publishCompare.desktop"),onClick:()=>w("desktop"),children:a.jsx(ai,{className:"size-3.5"})}),a.jsx(Jn,{active:j==="mobile",label:u("thread.publishCompare.mobile"),onClick:()=>w("mobile"),children:a.jsx(hl,{className:"size-3.5"})})]}),D?a.jsxs("a",{href:D,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:[a.jsx(Oa,{className:"size-3.5"}),u("thread.publishCompare.openDraft")]}):null]}):null,e[25]=D,e[26]=g,e[27]=s.pagePath,e[28]=j,e[29]=A,e[30]=R,e[31]=b,e[32]=w,e[33]=k,e[34]=u,e[35]=v,e[36]=Y):Y=e[36];let ue;e[37]!==oe||e[38]!==Y?(ue=a.jsxs("div",{className:"flex flex-wrap items-center gap-2 border-b bg-background px-4 py-2.5 max-md:pr-12",children:[oe,Y]}),e[37]=oe,e[38]=Y,e[39]=ue):ue=e[39];let je;e[40]!==g||e[41]!==ee||e[42]!==v?(je=ee&&g&&v!=="code"?a.jsx("p",{className:"border-b bg-background px-4 py-1.5 text-2xs text-muted-foreground",children:ee}):null,e[40]=g,e[41]=ee,e[42]=v,e[43]=je):je=e[43];let O;e[44]!==x||e[45]!==h||e[46]!==u?(O=x&&h?a.jsx("p",{className:"border-b bg-background px-4 py-1.5 text-2xs text-muted-foreground",children:u("thread.publishCompare.notOnAnyPage")}):null,e[44]=x,e[45]=h,e[46]=u,e[47]=O):O=e[47];let U;e[48]!==o||e[49]!==h||e[50]!==u||e[51]!==f||e[52]!==p||e[53]!==v?(U=v==="code"&&!h?f!==null&&p===void 0?a.jsx(dt,{className:"m-4 h-64 rounded"}):o===null?a.jsx(is,{icon:a.jsx(ms,{className:"size-5 text-muted-foreground"}),title:u("thread.publishCompare.previewNotReadyTitle"),description:u("thread.publishCompare.draftUnavailable")}):a.jsx(is,{icon:a.jsx(ms,{className:"size-5 text-muted-foreground"}),title:u("thread.publishCompare.noPreviewTitle"),description:u("thread.publishCompare.noPreviewDescription")}):null,e[48]=o,e[49]=h,e[50]=u,e[51]=f,e[52]=p,e[53]=v,e[54]=U):U=e[54];let L;e[55]!==n||e[56]!==$||e[57]!==C||e[58]!==h||e[59]!==u||e[60]!==v?(L=v==="code"&&h?a.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto bg-background [scrollbar-width:thin]",children:$?a.jsx(Co,{diff:C,hideFileRows:!0,editorHeight:"70vh"}):n?a.jsx(dt,{className:"m-4 h-64 rounded"}):a.jsx("p",{className:"px-4 py-6 text-xs text-muted-foreground",children:u("thread.publishPopover.detailsUnavailable")})}):null,e[55]=n,e[56]=$,e[57]=C,e[58]=h,e[59]=u,e[60]=v,e[61]=L):L=e[61];let Pe;e[62]!==re||e[63]!==me||e[64]!==g||e[65]!==u||e[66]!==v?(Pe=g?a.jsxs("div",{className:Q("flex min-h-0 flex-1 gap-3 p-3",v==="code"&&"hidden"),children:[a.jsx(Xn,{label:u("thread.publishCompare.before"),hidden:v==="after",children:me}),a.jsx(Xn,{label:u("thread.publishCompare.after"),highlight:!0,hidden:v==="before",children:re})]}):null,e[62]=re,e[63]=me,e[64]=g,e[65]=u,e[66]=v,e[67]=Pe):Pe=e[67];let he;return e[68]!==de||e[69]!==ue||e[70]!==je||e[71]!==O||e[72]!==U||e[73]!==L||e[74]!==Pe?(he=a.jsxs("div",{ref:de,className:"flex min-h-0 min-w-0 flex-1 flex-col bg-muted/40",children:[ue,je,O,U,L,Pe]}),e[68]=de,e[69]=ue,e[70]=je,e[71]=O,e[72]=U,e[73]=L,e[74]=Pe,e[75]=he):he=e[75],he}function Lo(){return new Set}function Jn(t){const e=M.c(8),{active:s,label:r,onClick:n,children:o}=t,d=s&&"bg-accent text-foreground";let l;e[0]!==d?(l=Q("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]!==r||e[5]!==n||e[6]!==l?(i=a.jsx("button",{type:"button","aria-label":r,"aria-pressed":s,title:r,onClick:n,className:l,children:o}),e[2]=s,e[3]=o,e[4]=r,e[5]=n,e[6]=l,e[7]=i):i=e[7],i}function Xn(t){const e=M.c(18),{label:s,highlight:r,hidden:n,children:o}=t,d=r===void 0?!1:r,i=(n===void 0?!1:n)&&"hidden";let c;e[0]!==i?(c=Q("flex min-h-0 min-w-0 flex-1 flex-col gap-1.5",i),e[0]=i,e[1]=c):c=e[1];const u=d&&"bg-brand";let h;e[2]!==u?(h=Q("size-1.5 rounded-full bg-muted-foreground/50",u),e[2]=u,e[3]=h):h=e[3];let m;e[4]!==h?(m=a.jsx("span",{className:h}),e[4]=h,e[5]=m):m=e[5];let b;e[6]!==s||e[7]!==m?(b=a.jsxs("div",{className:"flex items-center gap-1.5 px-0.5 text-2xs font-medium text-muted-foreground",children:[m,s]}),e[6]=s,e[7]=m,e[8]=b):b=e[8];const f=d&&"border-brand/60";let p;e[9]!==f?(p=Q("relative min-h-0 flex-1 overflow-hidden rounded-lg border bg-background",f),e[9]=f,e[10]=p):p=e[10];let x;e[11]!==o||e[12]!==p?(x=a.jsx("div",{className:p,children:o}),e[11]=o,e[12]=p,e[13]=x):x=e[13];let g;return e[14]!==x||e[15]!==c||e[16]!==b?(g=a.jsxs("div",{className:c,children:[b,x]}),e[14]=x,e[15]=c,e[16]=b,e[17]=g):g=e[17],g}function is(t){const e=M.c(10),{icon:s,title:r,description:n}=t;let o;e[0]!==s?(o=a.jsx("div",{className:"mb-1",children:s}),e[0]=s,e[1]=o):o=e[1];let d;e[2]!==r?(d=a.jsx("p",{className:"text-sm font-medium",children:r}),e[2]=r,e[3]=d):d=e[3];let l;e[4]!==n?(l=a.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=a.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 Uo(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 zo(t){const e=M.c(24),{url:s,device:r,title:n,missing:o}=t,[d,l]=xa(),[i,c]=z.useState(null);if(!s){let w;return e[0]!==o?(w=a.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]=w):w=e[1],w}let u;e[2]!==r||e[3]!==s?(u=vn(s,r),e[2]=r,e[3]=s,e[4]=u):u=e[4];const h=u,m=wa[r],b=d.width>0?Math.min(d.width/m,1):1,f=d.width>0?Math.max((d.width-m*b)/2,0):0;let p;e[5]!==h?(p=()=>c(h),e[5]=h,e[6]=p):p=e[6];const x=d.height>0?d.height/b:"100%",g=`scale(${b})`;let P;e[7]!==m||e[8]!==f||e[9]!==x||e[10]!==g?(P={left:f,width:m,height:x,transform:g,transformOrigin:"top left"},e[7]=m,e[8]=f,e[9]=x,e[10]=g,e[11]=P):P=e[11];let y;e[12]!==h||e[13]!==p||e[14]!==P||e[15]!==n?(y=a.jsx("iframe",{src:h,title:n,sandbox:"allow-scripts allow-same-origin",onLoad:p,className:"absolute top-0 border-0 bg-white",style:P},h),e[12]=h,e[13]=p,e[14]=P,e[15]=n,e[16]=y):y=e[16];let v;e[17]!==i||e[18]!==h?(v=i!==h?a.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background/60",children:a.jsx(Lt,{className:"size-5 motion-reduce:animate-none"})}):null,e[17]=i,e[18]=h,e[19]=v):v=e[19];let j;return e[20]!==l||e[21]!==y||e[22]!==v?(j=a.jsxs("div",{ref:l,className:"absolute inset-0",children:[y,v]}),e[20]=l,e[21]=y,e[22]=v,e[23]=j):j=e[23],j}function qo(t){const e=M.c(21),{url:s,device:r,title:n,missing:o,onLoaded:d}=t,[l,i]=xa(),[c,u]=z.useState(null),[h,m]=z.useState(null),b=l.width>0&&l.height>0;b&&(c?.width!==l.width||c?.height!==l.height)&&u(l);const f=b?l:c;if(!s){let j;return e[0]!==o?(j=a.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]=j):j=e[1],j}let p,x,g,P;if(e[2]!==f||e[3]!==r||e[4]!==d||e[5]!==i||e[6]!==h||e[7]!==n||e[8]!==s){const j=vn(s,r),w=wa[r];p=h?.src!==j;const N=[...h&&p?[h]:[],{src:j,logicalWidth:w}];x=i,g="absolute inset-0",P=N.map(k=>{const A=k.src===j&&p;return a.jsx("iframe",{src:k.src,title:n,"aria-hidden":A&&h?!0:void 0,sandbox:"allow-scripts allow-same-origin",onLoad:()=>{k.src===j&&(m(k),d?.(k.src))},className:Q("absolute top-0 border-0 bg-white",A&&"pointer-events-none opacity-0"),style:Uo(f,k.logicalWidth)},k.src)}),e[2]=f,e[3]=r,e[4]=d,e[5]=i,e[6]=h,e[7]=n,e[8]=s,e[9]=p,e[10]=x,e[11]=g,e[12]=P}else p=e[9],x=e[10],g=e[11],P=e[12];let y;e[13]!==p||e[14]!==h?(y=p?h?a.jsx(Lt,{className:"absolute right-2 top-2 size-4 text-muted-foreground motion-reduce:animate-none"}):a.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background/60",children:a.jsx(Lt,{className:"size-5 motion-reduce:animate-none"})}):null,e[13]=p,e[14]=h,e[15]=y):y=e[15];let v;return e[16]!==x||e[17]!==g||e[18]!==P||e[19]!==y?(v=a.jsxs("div",{ref:x,className:g,children:[P,y]}),e[16]=x,e[17]=g,e[18]=P,e[19]=y,e[20]=v):v=e[20],v}const Ho=/^Co-authored-by:\s*([^<\r\n]+?)(?:\s*<[^>\r\n]*>)?\s*$/im;function Ko(t){if(!t)return null;const e=Ho.exec(t)?.[1]?.trim();return e||null}function Vo(t){return/\[bot\]$/i.test(t)||/-bot$/i.test(t)}function Go(t){const e=Ko(t.body);if(e)return e;const s=t.author.trim();return!s||Vo(s)?null:s}function Pa(t){const e=M.c(9),s=ve(),r=Ps();let n;e[0]!==t.branch||e[1]!==t.orgSlug||e[2]!==t.virtualMcpId?(n={orgSlug:t.orgSlug,virtualMcpId:t.virtualMcpId,branch:t.branch},e[0]=t.branch,e[1]=t.orgSlug,e[2]=t.virtualMcpId,e[3]=n):n=e[3];const o=Xr(n);let d;return e[4]!==t||e[5]!==o||e[6]!==r||e[7]!==s?(d=async(l,i,c)=>{try{await Wa(o,{blockKeys:i.map(Wo),write:()=>Ja(l.client,i)}),_e.success(c)}catch(u){const h=u;if(Xa(h)){_e.info(s("siteEditor.discard.changedMeanwhile")),await t.refresh().catch(Qo);return}l.source==="local"&&Ya(h)&&r.resetQueries({queryKey:Ft.contentBackend(t.orgSlug,t.virtualMcpId,"local")}),_e.error(s("siteEditor.discard.failed"),{description:Js(s,hs(h))})}},e[4]=t,e[5]=o,e[6]=r,e[7]=s,e[8]=d):d=e[8],d}function Qo(){}function Wo(t){return t.name}function Jo(t){const{mode:e,target:s,note:r,allPaths:n,destinationHost:o,publishLockRef:d,onOpenChange:l,refresh:i,onPullRequestChanged:c,onPublished:u,hosted:h=!1,authorName:m,protocol:b}=t,f=ve(),p=Ps(),[x,g]=z.useState(!1),[P,y]=z.useState(),[v,j]=z.useState(null),w=()=>Wi(r,h?m?f("siteEditor.publish.defaultNote",{name:m}):f("siteEditor.publish.defaultNoteAnonymous"):f("thread.publishDialog.changesFrom",{branch:s.headBranch})),N=async C=>{try{await C?.()}catch{}},k=Xr({orgSlug:s.orgSlug,virtualMcpId:s.virtualMcpId,branch:s.branch}),A=async()=>{try{await Ds(k,{kind:"publish",refreshOnError:!0,write:()=>di(s)}),Bn(f)}catch(C){fi(f,C,()=>{A()})}},S=async C=>{hi(f,C,()=>{A()}),l(!1),await N(u)},R=async()=>{d.current=!0,g(!0),y(void 0),j(null);try{const C=await Ds(k,{kind:"publish",reread:!0,refreshOnError:!0,write:()=>oi(s,w().message)});await S(C)}catch(C){C instanceof ci&&C.code===vl&&Qa(p,s.orgSlug,s.virtualMcpId);const I=ui(f,C);y(I.message),j(I.detail)}finally{d.current=!1,g(!1)}},T=async()=>{d.current=!0,g(!0),y(void 0),j(null);try{await Xi(s,w(),f),Bn(f,o),l(!1),await Promise.all([N(c),N(u)])}catch(C){const I=Hn(C,f);y(I.headMoved?I.message:f("siteEditor.publish.failed")),j(I.headMoved?null:[I.pullRequest?`#${I.pullRequest.number} ${I.pullRequest.htmlUrl}`:null,hs(C)].filter(Boolean).join(`
11
- `)||null),I.pullRequest&&await N(c),I.headMoved&&await i()}finally{d.current=!1,g(!1)}},B=async()=>{d.current=!0,g(!0),y(void 0),j(null);try{const C=await Yi(s,w());Zi(C,f),l(!1),await c?.()}catch(C){const I=Hn(C,f);y(I.message||f("thread.publishDialog.failedSubmitForReview")),I.headMoved&&await i()}finally{d.current=!1,g(!1)}},D=Pa({orgSlug:s.orgSlug,virtualMcpId:s.virtualMcpId,branch:s.branch,refresh:i}),F=async(C,I)=>{try{await Ds(k,{kind:"discard",reread:!0,write:()=>Ql({orgSlug:s.orgSlug,virtualMcpId:s.virtualMcpId,branch:s.branch,threadId:s.threadId},C)}),_e.success(I),await i()}catch($){_e.error(f("siteEditor.discard.failed"),{description:Js(f,hs($))})}};return{isPublishing:x,publishError:P,publishErrorDetail:v,submit:e==="review"?B:h?R:T,discardChange:C=>{const I=f("thread.publishPopover.discarded",{name:C.name});return b&&C.entry?D(b.backend,[C.entry],I):F(C.filepaths,I)},discardAll:async()=>{const C=f("thread.publishDialog.allChangesDiscarded");if(b){if(b.entries.length===0)return;await D(b.backend,b.entries,C);return}n.length!==0&&await F(n,C)}}}function Xo(t,e,s,r,n,o){return["cms-publish-bodies",t,e,s,r,n,o]}const Yo=6e4;function Zo(t,e){return e?null:t.files.map(s=>`${s.index}${s.working_dir} ${s.path}`).sort().join(`
12
- `)}function ec(t,e,s){const r=M.c(6);let n;r[0]!==s||r[1]!==t||r[2]!==e?(n=Ft.decofile(`${t}/${e}/${s}`),r[0]=s,r[1]=t,r[2]=e,r[3]=n):n=r[3];let o;r[4]!==n?(o={queryKey:n,queryFn:Qs},r[4]=n,r[5]=o):o=r[5];const{data:d}=Rt(o);return d}function Sa(t){const{orgSlug:e,virtualMcpId:s,branch:r,threadId:n,baseBranch:o,fastPreview:d,recoverSandbox:l}=t,i={orgSlug:e,virtualMcpId:s,branch:r,threadId:n},c=d?{fastPreview:!0}:void 0,u=z.useRef(null),h=async j=>{try{return await j()}catch(w){if(!l||!Gr(w))throw w;return u.current??=l(),await u.current,j()}},m=lr({...Vr(i),queryFn:()=>h(()=>bn(i))}),b=m.data,f=b.changedFiles??null,p=b.headSha??null,x=f?f.length>0:Wl(b)||Jl(b),g=Rt({queryKey:Xo(e,s,r,o,p,Zo(b,d)),queryFn:()=>h(()=>Hr(i,b,o,c)),enabled:x,staleTime:d?Yo:0,gcTime:d?void 0:0,throwOnError:(j,w)=>!f&&w.state.data===void 0}),P=ec(e,s,r),y=g.data??null,v=f?ma({files:f,lookup:P,diff:y}):lo(y);return{status:b,summary:v,allPaths:f?f.map(j=>j.path):Object.keys(y?.diffs??{}),discardablePaths:d?null:new Set(b.files.map(j=>j.path)),changedFilesTotal:b.changedFilesTotal??v.count,changedFilesTruncated:b.changedFilesTruncated??!1,headSha:p,diff:y,bodiesPending:x&&g.isPending,bodiesFailed:g.isError,cardsPending:!f&&x&&g.isPending,refresh:()=>Promise.all([m.refetch(),d?null:g.refetch()])}}function tc(t){const e=M.c(4);let s;e[0]!==t?(s=Ft.decofile(t),e[0]=t,e[1]=s):s=e[1];let r;e[2]!==s?(r={queryKey:s,queryFn:Qs},e[2]=s,e[3]=r):r=e[3];const{data:n}=Rt(r);return n}function sc(t,e){const s=M.c(5);let r;s[0]!==t||s[1]!==e?(r=e?el(e,t):Ft.liveMeta("","no-scope"),s[0]=t,s[1]=e,s[2]=r):r=s[2];let n;s[3]!==r?(n={queryKey:r,queryFn:Qs},s[3]=r,s[4]=n):n=s[4];const{data:o}=Rt(n);return o}function Sn(t){const e=M.c(26),{backend:s,cacheKey:r,scope:n}=t,o=Ps();let d;e[0]!==r?(d=Ft.contentChanges(r),e[0]=r,e[1]=d):d=e[1];let l;e[2]!==s||e[3]!==r||e[4]!==o?(l=()=>tl(o,s.client,r),e[2]=s,e[3]=r,e[4]=o,e[5]=l):l=e[5];let i;e[6]!==d||e[7]!==l?(i={queryKey:d,queryFn:l,staleTime:0},e[6]=d,e[7]=l,e[8]=i):i=e[8];const c=lr(i),u=c.data,h=Za(s,r,u),m=tc(r),b=sc(s,n);let f;if(e[9]!==u.changes||e[10]!==m||e[11]!==b||e[12]!==h.data){const j=m&&b?zl(m,b):null,w=m&&b?ql(m,b):null;f=po({changes:u.changes,sides:h.data??null,lookup:m,meta:b,...j?{missingRules:j}:{},...w?{missingRuleUses:w}:{}}),e[9]=u.changes,e[10]=m,e[11]=b,e[12]=h.data,e[13]=f}else f=e[13];const p=f;let x;e[14]!==u.changes?(x=Object.entries(u.changes).map(nc),e[14]=u.changes,e[15]=x):x=e[15];const g=p.count>0&&h.isPending,P=m??null;let y;e[16]!==c?(y=()=>c.refetch(),e[16]=c,e[17]=y):y=e[17];let v;return e[18]!==u||e[19]!==h.isError||e[20]!==p||e[21]!==x||e[22]!==g||e[23]!==P||e[24]!==y?(v={changes:u,summary:p,entries:x,sidesPending:g,sidesFailed:h.isError,blocks:P,refresh:y},e[18]=u,e[19]=h.isError,e[20]=p,e[21]=x,e[22]=g,e[23]=P,e[24]=y,e[25]=v):v=e[25],v}function nc(t){const[e,s]=t;return{name:e,version:s.version}}function rc(t){return["smart-review-verdict",t.orgSlug,t.virtualMcpId,t.branch,t.threadId,t.fastPreview?"fast-preview-upstream":"sandbox",t.signature,t.language]}function ac(t){const e=M.c(27),{orgSlug:s,virtualMcpId:r,branch:n,threadId:o,fastPreview:d,status:l,diff:i,enabled:c}=t,[u]=ir(),{language:h}=u;let m,b,f;if(e[0]!==n||e[1]!==i||e[2]!==c||e[3]!==d||e[4]!==h||e[5]!==s||e[6]!==l||e[7]!==o||e[8]!==r){const j=i?Ns(i):"";m=c&&!!n&&!!l&&!!i&&j!=="",f=Rt,b=rc({orgSlug:s,virtualMcpId:r,branch:n,threadId:o,fastPreview:d,signature:j,language:h}),e[0]=n,e[1]=i,e[2]=c,e[3]=d,e[4]=h,e[5]=s,e[6]=l,e[7]=o,e[8]=r,e[9]=m,e[10]=b,e[11]=f}else m=e[9],b=e[10],f=e[11];let p;e[12]!==n||e[13]!==i||e[14]!==h||e[15]!==s||e[16]!==l||e[17]!==o||e[18]!==r?(p=()=>Xl({orgSlug:s,virtualMcpId:r,branch:n,threadId:o},{status:l,diff:i,language:h}),e[12]=n,e[13]=i,e[14]=h,e[15]=s,e[16]=l,e[17]=o,e[18]=r,e[19]=p):p=e[19];let x;e[20]!==m||e[21]!==b||e[22]!==p?(x={queryKey:b,queryFn:p,enabled:m,staleTime:1/0,gcTime:6e5,retry:lc},e[20]=m,e[21]=b,e[22]=p,e[23]=x):x=e[23];const g=f(x),P=g.data??null,y=m&&g.isFetching&&!g.data;let v;return e[24]!==P||e[25]!==y?(v={verdict:P,loading:y},e[24]=P,e[25]=y,e[26]=v):v=e[26],v}function lc(t,e){return!Gr(e)&&t<1}function ka(t){const e=M.c(30),{orgSlug:s,virtualMcpId:r,branch:n,threadId:o,fastPreview:d,status:l,diff:i,policy:c,judgeEnabled:u,paths:h}=t,m=u===void 0?!0:u,b=h===void 0?null:h;let f;e[0]!==i||e[1]!==m||e[2]!==c?(f=m&&Yl(i,c),e[0]=i,e[1]=m,e[2]=c,e[3]=f):f=e[3];const p=f;let x;e[4]!==n||e[5]!==i||e[6]!==d||e[7]!==p||e[8]!==s||e[9]!==l||e[10]!==o||e[11]!==r?(x={orgSlug:s,virtualMcpId:r,branch:n,threadId:o,fastPreview:d,status:l,diff:i,enabled:p},e[4]=n,e[5]=i,e[6]=d,e[7]=p,e[8]=s,e[9]=l,e[10]=o,e[11]=r,e[12]=x):x=e[12];const{verdict:g,loading:P}=ac(x);if(!i&&b){let w;e[13]!==b||e[14]!==c?(w=Zl(b,c),e[13]=b,e[14]=c,e[15]=w):w=e[15];let N;return e[16]!==w?(N={gate:w,ready:!1},e[16]=w,e[17]=N):N=e[17],N}if(!i){let w;return e[18]===Symbol.for("react.memo_cache_sentinel")?(w={gate:{allowed:!0,reason:null},ready:!1},e[18]=w):w=e[18],w}if(!p){let w;e[19]!==i||e[20]!==c?(w=ei(i,c),e[19]=i,e[20]=c,e[21]=w):w=e[21];let N;return e[22]!==w?(N={gate:w,ready:!0},e[22]=w,e[23]=N):N=e[23],N}let y;e[24]!==P||e[25]!==g?(y=ti(g,P),e[24]=P,e[25]=g,e[26]=y):y=e[26];const v=!P;let j;return e[27]!==y||e[28]!==v?(j={gate:y,ready:v},e[27]=y,e[28]=v,e[29]=j):j=e[29],j}function ic(t){return["main","master"].includes(t.trim().toLowerCase())}function oc(t,e,s,r){return t===0?r("thread.publishPopover.publish"):s||!ic(e)?t===1?r("thread.publishPopover.publishOne"):r("thread.publishPopover.publishCount",{count:t}):t===1?r("thread.publishPopover.publishOneInProduction"):r("thread.publishPopover.publishCountInProduction",{count:t})}const cc=2500;function dc(t){const{selectedId:e,readyIds:s,lastShownId:r,liveIds:n}=t;return e===null||s.has(e)?e:r!==null&&r!==e&&n.includes(r)?r:e}function Ca(t){const e=M.c(16),s=z.useRef(!1),r=ve();let n;e[0]!==t?(n=h=>{!h&&s.current||t.onOpenChange(h)},e[0]=t,e[1]=n):n=e[1];const o=n;let d;e[2]!==t.mode||e[3]!==r?(d=t.mode==="review"?r("thread.publishPopover.submitForReview"):r("thread.publishPopover.publish"),e[2]=t.mode,e[3]=r,e[4]=d):d=e[4];let l;e[5]!==d?(l=a.jsx(cr,{className:"sr-only",children:d}),e[5]=d,e[6]=l):l=e[6];let i;e[7]!==t?(i=t.open?a.jsx(fc,{...t,publishLockRef:s}):null,e[7]=t,e[8]=i):i=e[8];let c;e[9]!==l||e[10]!==i?(c=a.jsxs(dr,{"aria-describedby":void 0,className:"flex h-[calc(100dvh-2rem)] w-[calc(100vw-2rem)] max-w-none flex-col md:flex-row md:h-[calc(100dvh-6rem)] md:w-[calc(100vw-6rem)] gap-0 overflow-hidden p-0 sm:max-w-none",closeButtonClassName:"top-3.5 right-3.5",children:[l,i]}),e[9]=l,e[10]=i,e[11]=c):c=e[11];let u;return e[12]!==o||e[13]!==t.open||e[14]!==c?(u=a.jsx(or,{open:t.open,onOpenChange:o,children:c}),e[12]=o,e[13]=t.open,e[14]=c,e[15]=u):u=e[15],u}const uc=4,qt="flex h-[45%] min-h-0 min-w-0 shrink-0 md:h-auto md:flex-1";function Gt(t){const e=M.c(5),{list:s,pane:r}=t;let n;e[0]!==s?(n=a.jsx("div",{className:"flex min-h-0 w-full flex-1 flex-col max-md:border-t md:w-[380px] md:flex-none md:shrink-0 md:border-l md:[&>[data-publish-state]>:first-child]:pr-12",children:s}),e[0]=s,e[1]=n):n=e[1];let o;return e[2]!==r||e[3]!==n?(o=a.jsxs(a.Fragment,{children:[r,n]}),e[2]=r,e[3]=n,e[4]=o):o=e[4],o}function kn(){const t=M.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=a.jsx("div",{className:Q(qt,"bg-muted/40 p-3"),children:a.jsx(dt,{className:"h-full w-full rounded-lg"})}),t[0]=e):e=t[0],e}function Cn(t){const e=M.c(11),{mode:s,title:r,subLine:n,trailing:o}=t,d=s==="review"?ks:fl;let l;e[0]!==d?(l=a.jsx(d,{className:"size-4 shrink-0 text-muted-foreground"}),e[0]=d,e[1]=l):l=e[1];let i;e[2]!==l||e[3]!==r||e[4]!==o?(i=a.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium",children:[l,r,o]}),e[2]=l,e[3]=r,e[4]=o,e[5]=i):i=e[5];let c;e[6]!==n?(c=n?a.jsx("div",{className:"pl-6 text-xs text-muted-foreground",children:n}):null,e[6]=n,e[7]=c):c=e[7];let u;return e[8]!==i||e[9]!==c?(u=a.jsxs(a.Fragment,{children:[i,c]}),e[8]=i,e[9]=c,e[10]=u):u=e[10],u}function Nn(t){const e=M.c(9),{draftPreviewUrl:s,t:r}=t;let n;e[0]!==s?(n=()=>{s&&window.open(s,"_blank","noopener,noreferrer")},e[0]=s,e[1]=n):n=e[1];const o=!s;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=a.jsx(ms,{className:"size-4"}),e[2]=d):d=e[2];let l;e[3]!==r?(l=r("thread.publishPopover.preview"),e[3]=r,e[4]=l):l=e[4];let i;return e[5]!==n||e[6]!==o||e[7]!==l?(i=a.jsxs(we,{type:"button",variant:"outline",onClick:n,disabled:o,children:[d,l]}),e[5]=n,e[6]=o,e[7]=l,e[8]=i):i=e[8],i}function Na(t){const e=M.c(21),{mode:s,draftPreviewUrl:r}=t,n=ve();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=a.jsx(kn,{}),e[0]=o):o=e[0];let d;e[1]===Symbol.for("react.memo_cache_sentinel")?(d=a.jsx(dt,{className:"h-3.5 w-48"}),e[1]=d):d=e[1];let l;e[2]!==s?(l=a.jsx(Cn,{mode:s,title:d}),e[2]=s,e[3]=l):l=e[3];let i,c;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(Kt,{children:a.jsxs("div",{className:"space-y-1.5",children:[a.jsx(Mt,{}),a.jsx(Mt,{}),a.jsx(Mt,{})]})}),c=a.jsxs(a.Fragment,{children:[a.jsx(dt,{className:"h-3 w-20"}),a.jsx(dt,{className:"h-14 w-full rounded-lg"})]}),e[4]=i,e[5]=c):(i=e[4],c=e[5]);let u;e[6]!==r||e[7]!==n?(u=a.jsx(Nn,{draftPreviewUrl:r,t:n}),e[6]=r,e[7]=n,e[8]=u):u=e[8];const h=s==="review"?"default":"brand";let m;e[9]!==s||e[10]!==n?(m=n(s==="review"?"thread.publishPopover.submitForReview":"thread.publishPopover.publish"),e[9]=s,e[10]=n,e[11]=m):m=e[11];let b;e[12]!==h||e[13]!==m?(b=a.jsx(we,{type:"button",variant:h,className:"flex-1",disabled:!0,children:m}),e[12]=h,e[13]=m,e[14]=b):b=e[14];let f;e[15]!==u||e[16]!==b?(f=a.jsxs("div",{className:"flex gap-2",children:[u,b]}),e[15]=u,e[16]=b,e[17]=f):f=e[17];let p;return e[18]!==f||e[19]!==l?(p=a.jsx(Gt,{pane:o,list:a.jsx(Rs,{state:"loading",header:l,body:i,note:c,footer:f})}),e[18]=f,e[19]=l,e[20]=p):p=e[20],p}function hc(t){const e=M.c(26),{mode:s,draftPreviewUrl:r,message:n,onRetry:o}=t,d=ve();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=a.jsx("div",{className:Q(qt,"bg-muted/40")}),e[0]=l):l=e[0];let i;e[1]!==d?(i=d("thread.publishPopover.loadFailed"),e[1]=d,e[2]=i):i=e[2];let c;e[3]!==i?(c=a.jsx("span",{className:"truncate",children:i}),e[3]=i,e[4]=c):c=e[4];let u;e[5]!==s||e[6]!==c?(u=a.jsx(Cn,{mode:s,title:c}),e[5]=s,e[6]=c,e[7]=u):u=e[7];let h;e[8]!==n?(h=a.jsx("p",{className:"px-4 py-6 text-xs text-destructive",children:n}),e[8]=n,e[9]=h):h=e[9];let m;e[10]!==r||e[11]!==d?(m=a.jsx(Nn,{draftPreviewUrl:r,t:d}),e[10]=r,e[11]=d,e[12]=m):m=e[12];let b;e[13]===Symbol.for("react.memo_cache_sentinel")?(b=a.jsx(Ws,{className:"size-4"}),e[13]=b):b=e[13];let f;e[14]!==d?(f=d("thread.publishPopover.retry"),e[14]=d,e[15]=f):f=e[15];let p;e[16]!==o||e[17]!==f?(p=a.jsxs(we,{type:"button",variant:"outline",className:"flex-1",onClick:o,children:[b,f]}),e[16]=o,e[17]=f,e[18]=p):p=e[18];let x;e[19]!==m||e[20]!==p?(x=a.jsxs("div",{className:"flex gap-2",children:[m,p]}),e[19]=m,e[20]=p,e[21]=x):x=e[21];let g;return e[22]!==x||e[23]!==u||e[24]!==h?(g=a.jsx(Gt,{pane:l,list:a.jsx(Rs,{state:"ready",header:u,body:h,footer:x})}),e[22]=x,e[23]=u,e[24]=h,e[25]=g):g=e[25],g}function fc(t){const e=M.c(3),s=t.mode??"publish";let r;return e[0]!==s||e[1]!==t?(r=a.jsx(ur,{children:n=>{const{reset:o}=n;return a.jsx(hr,{fallback:d=>{const{error:l,resetError:i}=d;return a.jsx(hc,{mode:s,draftPreviewUrl:t.draftPreviewUrl,message:l?.message??"",onRetry:()=>{o(),i()}})},children:a.jsx(z.Suspense,{fallback:a.jsx(Na,{mode:s,draftPreviewUrl:t.draftPreviewUrl}),children:a.jsx(mc,{...t})})})}}),e[0]=s,e[1]=t,e[2]=r):r=e[2],r}function mc(t){const e=M.c(13),s=Ht(t.virtualMcpId,t.branch);let r;e[0]!==t.branch||e[1]!==t.orgSlug||e[2]!==t.virtualMcpId?(r={orgSlug:t.orgSlug,virtualMcpId:t.virtualMcpId,branch:t.branch},e[0]=t.branch,e[1]=t.orgSlug,e[2]=t.virtualMcpId,e[3]=r):r=e[3];const n=Xs(r);if(s.kind==="protocol"&&n){let d;return e[4]!==s||e[5]!==n||e[6]!==t?(d=s.source==="sandbox"?a.jsx(gc,{...t,backend:s,cacheKey:n}):a.jsx(bc,{...t,backend:s,cacheKey:n}),e[4]=s,e[5]=n,e[6]=t,e[7]=d):d=e[7],d}if(s.kind!=="legacy"){const d=t.mode??"publish";let l;return e[8]!==t.draftPreviewUrl||e[9]!==d?(l=a.jsx(Na,{mode:d,draftPreviewUrl:t.draftPreviewUrl}),e[8]=t.draftPreviewUrl,e[9]=d,e[10]=l):l=e[10],l}let o;return e[11]!==t?(o=a.jsx(pc,{...t}),e[11]=t,e[12]=o):o=e[12],o}function pc(t){const e=M.c(52),s=Vt()?.taskId??null;let r;e[0]!==t.baseBranch||e[1]!==t.branch||e[2]!==t.fastPreview||e[3]!==t.orgSlug||e[4]!==t.recoverSandbox||e[5]!==t.virtualMcpId||e[6]!==s?(r={orgSlug:t.orgSlug,virtualMcpId:t.virtualMcpId,branch:t.branch,threadId:s,baseBranch:t.baseBranch,fastPreview:t.fastPreview,recoverSandbox:t.recoverSandbox},e[0]=t.baseBranch,e[1]=t.branch,e[2]=t.fastPreview,e[3]=t.orgSlug,e[4]=t.recoverSandbox,e[5]=t.virtualMcpId,e[6]=s,e[7]=r):r=e[7];const n=Sa(r),o=t.mode!=="review";let d;e[8]!==t.branch||e[9]!==t.fastPreview||e[10]!==t.orgSlug||e[11]!==t.publishPolicy||e[12]!==t.virtualMcpId||e[13]!==n.allPaths||e[14]!==n.diff||e[15]!==n.status||e[16]!==o||e[17]!==s?(d={orgSlug:t.orgSlug,virtualMcpId:t.virtualMcpId,branch:t.branch,threadId:s,fastPreview:t.fastPreview,status:n.status,diff:n.diff,paths:n.allPaths,policy:t.publishPolicy,judgeEnabled:o},e[8]=t.branch,e[9]=t.fastPreview,e[10]=t.orgSlug,e[11]=t.publishPolicy,e[12]=t.virtualMcpId,e[13]=n.allPaths,e[14]=n.diff,e[15]=n.status,e[16]=o,e[17]=s,e[18]=d):d=e[18];const{gate:l}=ka(d),i=n.discardablePaths;let c;e[19]!==i?(c=P=>i===null||P.every(y=>i.has(y)),e[19]=i,e[20]=c):c=e[20];const u=c;let h;e[21]!==u?(h=P=>u(P.filepaths),e[21]=u,e[22]=h):h=e[22];let m;e[23]!==u||e[24]!==n.allPaths||e[25]!==n.changedFilesTruncated?(m=!n.changedFilesTruncated&&u(n.allPaths),e[23]=u,e[24]=n.allPaths,e[25]=n.changedFilesTruncated,e[26]=m):m=e[26];let b;e[27]!==t.branch||e[28]!==n.status?(b=xn(n.status)??t.branch,e[27]=t.branch,e[28]=n.status,e[29]=b):b=e[29];const f=n.headSha??void 0;let p;e[30]!==t.fastPreview||e[31]!==n.diff?(p=!t.fastPreview&&n.diff?{expectedDiffSignature:Ns(n.diff)}:{},e[30]=t.fastPreview,e[31]=n.diff,e[32]=p):p=e[32];let x;e[33]!==l||e[34]!==n.allPaths||e[35]!==n.bodiesFailed||e[36]!==n.bodiesPending||e[37]!==n.cardsPending||e[38]!==n.changedFilesTotal||e[39]!==n.changedFilesTruncated||e[40]!==n.diff||e[41]!==n.refresh||e[42]!==n.summary||e[43]!==h||e[44]!==m||e[45]!==b||e[46]!==f||e[47]!==p?(x={summary:n.summary,allPaths:n.allPaths,canDiscard:h,canDiscardAll:m,changedFilesTotal:n.changedFilesTotal,changedFilesTruncated:n.changedFilesTruncated,diff:n.diff,bodiesPending:n.bodiesPending,bodiesFailed:n.bodiesFailed,cardsPending:n.cardsPending,refresh:n.refresh,gate:l,headBranch:b,expectedHeadSha:f,...p,hosted:!1,otherWork:!1},e[33]=l,e[34]=n.allPaths,e[35]=n.bodiesFailed,e[36]=n.bodiesPending,e[37]=n.cardsPending,e[38]=n.changedFilesTotal,e[39]=n.changedFilesTruncated,e[40]=n.diff,e[41]=n.refresh,e[42]=n.summary,e[43]=h,e[44]=m,e[45]=b,e[46]=f,e[47]=p,e[48]=x):x=e[48];let g;return e[49]!==t||e[50]!==x?(g=a.jsx(An,{...t,source:x}),e[49]=t,e[50]=x,e[51]=g):g=e[51],g}function Aa(t,e){return{summary:t.summary,allPaths:[],canDiscard:()=>!0,canDiscardAll:!0,changedFilesTotal:t.summary.count,changedFilesTruncated:!1,diff:null,bodiesPending:t.sidesPending,bodiesFailed:t.sidesFailed,cardsPending:!1,refresh:t.refresh,protocol:{backend:e,entries:t.entries},v8:{blocks:t.blocks}}}function bc(t){const e=M.c(23);let s,r,n;e[0]!==t?({backend:s,cacheKey:r,...n}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=n):(s=e[1],r=e[2],n=e[3]);let o;e[4]!==n.branch||e[5]!==n.orgSlug||e[6]!==n.virtualMcpId?(o={orgSlug:n.orgSlug,virtualMcpId:n.virtualMcpId,branch:n.branch},e[4]=n.branch,e[5]=n.orgSlug,e[6]=n.virtualMcpId,e[7]=o):o=e[7];let d;e[8]!==s||e[9]!==r||e[10]!==o?(d={backend:s,cacheKey:r,scope:o},e[8]=s,e[9]=r,e[10]=o,e[11]=d):d=e[11];const l=Sn(d);let i;e[12]!==s||e[13]!==l?(i=Aa(l,s),e[12]=s,e[13]=l,e[14]=i):i=e[14];let c;e[15]===Symbol.for("react.memo_cache_sentinel")?(c={allowed:!0,reason:null},e[15]=c):c=e[15];const u=s.source==="github";let h;e[16]!==n.branch||e[17]!==i||e[18]!==u?(h={...i,gate:c,headBranch:n.branch,hosted:u,otherWork:!1},e[16]=n.branch,e[17]=i,e[18]=u,e[19]=h):h=e[19];let m;return e[20]!==n||e[21]!==h?(m=a.jsx(An,{...n,source:h}),e[20]=n,e[21]=h,e[22]=m):m=e[22],m}function gc(t){const e=M.c(58);let s,r,n;e[0]!==t?({backend:s,cacheKey:r,...n}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=n):(s=e[1],r=e[2],n=e[3]);const o=Vt()?.taskId??null;let d;e[4]!==n.branch||e[5]!==n.orgSlug||e[6]!==n.virtualMcpId?(d={orgSlug:n.orgSlug,virtualMcpId:n.virtualMcpId,branch:n.branch},e[4]=n.branch,e[5]=n.orgSlug,e[6]=n.virtualMcpId,e[7]=d):d=e[7];let l;e[8]!==s||e[9]!==r||e[10]!==d?(l={backend:s,cacheKey:r,scope:d},e[8]=s,e[9]=r,e[10]=d,e[11]=l):l=e[11];const i=Sn(l);let c;e[12]!==n.baseBranch||e[13]!==n.branch||e[14]!==n.fastPreview||e[15]!==n.orgSlug||e[16]!==n.recoverSandbox||e[17]!==n.virtualMcpId||e[18]!==o?(c={orgSlug:n.orgSlug,virtualMcpId:n.virtualMcpId,branch:n.branch,threadId:o,baseBranch:n.baseBranch,fastPreview:n.fastPreview,recoverSandbox:n.recoverSandbox},e[12]=n.baseBranch,e[13]=n.branch,e[14]=n.fastPreview,e[15]=n.orgSlug,e[16]=n.recoverSandbox,e[17]=n.virtualMcpId,e[18]=o,e[19]=c):c=e[19];const u=Sa(c),h=n.mode!=="review";let m;e[20]!==u.allPaths||e[21]!==u.diff||e[22]!==u.status||e[23]!==n.branch||e[24]!==n.fastPreview||e[25]!==n.orgSlug||e[26]!==n.publishPolicy||e[27]!==n.virtualMcpId||e[28]!==h||e[29]!==o?(m={orgSlug:n.orgSlug,virtualMcpId:n.virtualMcpId,branch:n.branch,threadId:o,fastPreview:n.fastPreview,status:u.status,diff:u.diff,paths:u.allPaths,policy:n.publishPolicy,judgeEnabled:h},e[20]=u.allPaths,e[21]=u.diff,e[22]=u.status,e[23]=n.branch,e[24]=n.fastPreview,e[25]=n.orgSlug,e[26]=n.publishPolicy,e[27]=n.virtualMcpId,e[28]=h,e[29]=o,e[30]=m):m=e[30];const{gate:b}=ka(m);let f;if(e[31]!==u.allPaths||e[32]!==i){let N;e[34]!==i?(N=k=>{const A=wn(k);return A===null?!gn(k):!Object.hasOwn(i.changes.changes,A)},e[34]=i,e[35]=N):N=e[35],f=u.allPaths.some(N),e[31]=u.allPaths,e[32]=i,e[33]=f}else f=e[33];const p=f;let x;e[36]!==s||e[37]!==i?(x=Aa(i,s),e[36]=s,e[37]=i,e[38]=x):x=e[38];let g;e[39]!==u||e[40]!==i?(g=()=>Promise.all([i.refresh(),u.refresh()]),e[39]=u,e[40]=i,e[41]=g):g=e[41];let P;e[42]!==u.status||e[43]!==n.branch?(P=xn(u.status)??n.branch,e[42]=u.status,e[43]=n.branch,e[44]=P):P=e[44];const y=u.headSha??void 0;let v;e[45]!==u.diff?(v=u.diff?{expectedDiffSignature:Ns(u.diff)}:{},e[45]=u.diff,e[46]=v):v=e[46];let j;e[47]!==b||e[48]!==p||e[49]!==y||e[50]!==v||e[51]!==x||e[52]!==g||e[53]!==P?(j={...x,refresh:g,gate:b,headBranch:P,expectedHeadSha:y,...v,hosted:!1,otherWork:p},e[47]=b,e[48]=p,e[49]=y,e[50]=v,e[51]=x,e[52]=g,e[53]=P,e[54]=j):j=e[54];let w;return e[55]!==n||e[56]!==j?(w=a.jsx(An,{...n,source:j}),e[55]=n,e[56]=j,e[57]=w):w=e[57],w}function An(t){const e=M.c(122),{source:s,publishLockRef:r,onOpenChange:n,mode:o,fastPreview:d,orgSlug:l,virtualMcpId:i,branch:c,baseBranch:u,repoTarget:h,owner:m,repo:b,draftPreviewUrl:f,destinationHost:p,previewServerUrl:x,compareDraft:g,lastPublishedPr:P,onRequestApproval:y,openPullRequest:v,onPullRequestChanged:j,onPublished:w}=t,N=o===void 0?"publish":o,k=P===void 0?null:P,A=v===void 0?null:v,S=ve(),[R]=ir(),{language:T}=R,B=Vt()?.taskId??null,{data:D}=ws.useSession(),F=pr(br(l,i,c)),{summary:C,allPaths:I,changedFilesTotal:$,changedFilesTruncated:Z,diff:ee,bodiesPending:H,bodiesFailed:J,cardsPending:_,refresh:G,gate:ie,hosted:X,otherWork:V}=s,[ae,W]=z.useState(null),[q,de]=z.useState(!1),[me,re]=z.useState(xc);let oe;e[0]===Symbol.for("react.memo_cache_sentinel")?(oe=K=>re(ce=>ce.has(K)?ce:new Set(ce).add(K)),e[0]=oe):oe=e[0];const Y=oe,[ue,je]=z.useState(null);let O;e[1]===Symbol.for("react.memo_cache_sentinel")?(O=[],e[1]=O):O=e[1];const[U,L]=z.useState(O);let Pe;e[2]!==s.v8?(Pe=K=>{je(K),L(ce=>[K,...ce.filter(pe=>pe!==K)]),s.v8&&setTimeout(()=>Y(K),cc)},e[2]=s.v8,e[3]=Pe):Pe=e[3];const he=Pe,[te,fe]=z.useState(null);let $e;e[4]!==ae||e[5]!==C?($e=oo(ae,ho(C)),e[4]=ae,e[5]=C,e[6]=$e):$e=e[6];const ge=$e,Te=[...C.pages,...C.blocks,...C.other],De=Te.find(K=>Re(K)===ue)??Te[0]??null,Ne=De?Re(De):null,Ee=[...new Set([...Ne?[Ne]:[],...U,...Te.map(Re)])].filter(K=>Te.some(ce=>Re(ce)===K)).slice(0,uc),Ie=!!s.v8,[Me,ut]=z.useState(null),Ce=Ie?dc({selectedId:Ne,readyIds:me,lastShownId:Me,liveIds:Ee}):Ne;Ie&&Ce===Ne&&Ce!==Me&&ut(Ce);const le=N==="review"&&!X,Se=_?"loading":H?"manifest":"ready",ht=A?.state==="open",E=s.headBranch,xe=D?.user;let be;e[7]!==xe?(be=ta(xe),e[7]=xe,e[8]=be):be=e[8];let ye;e[9]!==s.expectedDiffSignature?(ye=s.expectedDiffSignature?{expectedDiffSignature:s.expectedDiffSignature}:{},e[9]=s.expectedDiffSignature,e[10]=ye):ye=e[10];let Be;e[11]!==u||e[12]!==c||e[13]!==d||e[14]!==l||e[15]!==m||e[16]!==b||e[17]!==h||e[18]!==s.expectedHeadSha||e[19]!==s.headBranch||e[20]!==be||e[21]!==ye||e[22]!==B||e[23]!==i?(Be={orgSlug:l,virtualMcpId:i,branch:c,threadId:B,fastPreview:d,baseBranch:u,target:h,owner:m,repo:b,headBranch:E,coAuthor:be,expectedHeadSha:s.expectedHeadSha,...ye},e[11]=u,e[12]=c,e[13]=d,e[14]=l,e[15]=m,e[16]=b,e[17]=h,e[18]=s.expectedHeadSha,e[19]=s.headBranch,e[20]=be,e[21]=ye,e[22]=B,e[23]=i,e[24]=Be):Be=e[24];const ft=Be,mt=le?"review":"publish",Ge=D?.user?.name;let Ze;e[25]!==I||e[26]!==p||e[27]!==X||e[28]!==ge||e[29]!==n||e[30]!==w||e[31]!==j||e[32]!==r||e[33]!==G||e[34]!==s.protocol||e[35]!==mt||e[36]!==Ge||e[37]!==ft?(Ze={mode:mt,target:ft,note:ge,allPaths:I,destinationHost:p,publishLockRef:r,onOpenChange:n,refresh:G,onPullRequestChanged:j,onPublished:w,hosted:X,authorName:Ge,protocol:s.protocol},e[25]=I,e[26]=p,e[27]=X,e[28]=ge,e[29]=n,e[30]=w,e[31]=j,e[32]=r,e[33]=G,e[34]=s.protocol,e[35]=mt,e[36]=Ge,e[37]=ft,e[38]=Ze):Ze=e[38];const{isPublishing:ke,publishError:et,publishErrorDetail:tt,submit:Qe,discardChange:kt,discardAll:st}=Jo(Ze),We=yr(l,i).phase==="saving",Je=C.count>0||V,pt=!ke&&Je&&(le||ie.allowed);let nt;e[39]!==u||e[40]!==le||e[41]!==s.v8||e[42]!==C.count||e[43]!==S?(nt=le?C.count===0?S("thread.publishPopover.submitForReview"):C.count===1?S("thread.publishPopover.submitOneForReview"):S("thread.publishPopover.submitCountForReview",{count:C.count}):oc(C.count,u,!!s.v8,S),e[39]=u,e[40]=le,e[41]=s.v8,e[42]=C.count,e[43]=S,e[44]=nt):nt=e[44];const bt=nt;let rt;e:{if(le&&ht){let pe;e[45]!==A.number||e[46]!==S?(pe=S("thread.publishPopover.updatesPullRequest",{number:A.number}),e[45]=A.number,e[46]=S,e[47]=pe):pe=e[47],rt=pe;break e}const K=k;if(!K?.mergedAt){rt=null;break e}let ce;if(e[48]!==T||e[49]!==K||e[50]!==S){const pe=_l(new Date(K.mergedAt),T),Ae=Go(K);ce=Ae?S("thread.publishPopover.lastPublishedBy",{when:pe,name:Ae}):S("thread.publishPopover.lastPublished",{when:pe}),e[48]=T,e[49]=K,e[50]=S,e[51]=ce}else ce=e[51];rt=ce}const gt=rt;let at;e[52]!==le||e[53]!==C.count||e[54]!==S?(at=le?S("thread.publishPopover.submitForReview"):C.count===1?S("thread.publishPopover.publishOne"):C.count>1?S("thread.publishPopover.publishCount",{count:C.count}):S("thread.publishPopover.publish"),e[52]=le,e[53]=C.count,e[54]=S,e[55]=at):at=e[55];const xt=at,Ct=(K,ce)=>ce.length===0?null:a.jsxs("div",{className:"space-y-1.5",children:[a.jsx("div",{className:"px-0.5 text-2xs font-medium text-muted-foreground",children:K}),ce.map(pe=>{const Ae=Re(pe);return a.jsx(ga,{change:pe,bodyPending:H,selected:De!==null&&Re(De)===Ae,onSelect:()=>he(Ae),confirming:te===Ae,onConfirmingChange:se=>fe(se?Ae:null),onDiscard:s.canDiscard(pe)?()=>{kt(pe)}:void 0,isPublishing:ke,isDiscarding:We,v8:!!s.v8},Ae)})]});let Xe;e:{if(le||!Je){Xe=null;break e}if(ie.pending){let Ae;e[56]===Symbol.for("react.memo_cache_sentinel")?(Ae=a.jsx(Lt,{className:"size-3.5 motion-reduce:animate-none"}),e[56]=Ae):Ae=e[56];let se;e[57]!==S?(se=S("thread.publishPopover.reviewing"),e[57]=S,e[58]=se):se=e[58];let yt;e[59]!==se?(yt=a.jsxs("div",{className:"flex items-center gap-2 border-t px-4 py-2.5 text-xs text-muted-foreground",children:[Ae,se]}),e[59]=se,e[60]=yt):yt=e[60],Xe=yt;break e}if(ie.allowed){Xe=null;break e}let K;e[61]===Symbol.for("react.memo_cache_sentinel")?(K=a.jsx(mr,{className:"mt-0.5 size-3.5 shrink-0"}),e[61]=K):K=e[61];let ce;e[62]!==ie.reason||e[63]!==S?(ce=ie.reason??S("thread.publishPopover.needsReviewGeneric"),e[62]=ie.reason,e[63]=S,e[64]=ce):ce=e[64];let pe;e[65]!==ce?(pe=a.jsxs("div",{className:"flex items-start gap-2 border-t px-4 py-2.5 text-xs text-warning",children:[K,a.jsx("span",{children:ce})]}),e[65]=ce,e[66]=pe):pe=e[66],Xe=pe}const vt=Xe;let lt;e[67]!==st||e[68]!==q||e[69]!==We||e[70]!==ke||e[71]!==s.canDiscardAll||e[72]!==C.count||e[73]!==S?(lt=C.count<=1||!s.canDiscardAll?null:a.jsxs(a.Fragment,{children:[a.jsx("button",{type:"button",className:"ml-auto shrink-0 text-2xs text-muted-foreground transition-colors hover:text-destructive disabled:opacity-50",onClick:()=>de(!0),disabled:ke||We,children:S("thread.publishPopover.discardAll")}),a.jsx(an,{open:q,onOpenChange:de,children:a.jsxs(rn,{children:[a.jsxs(en,{children:[a.jsx(Ys,{children:S("thread.publishPopover.discardAllTitle")}),a.jsx(Zs,{children:S("thread.publishPopover.discardAllConfirm")})]}),a.jsxs(nn,{children:[a.jsx(tn,{children:S("thread.publishDialog.cancel")}),a.jsx(sn,{onClick:()=>{st()},disabled:We,className:Q(fr({variant:"destructive"})),children:S("thread.publishPopover.discardAll")})]})]})})]}),e[67]=st,e[68]=q,e[69]=We,e[70]=ke,e[71]=s.canDiscardAll,e[72]=C.count,e[73]=S,e[74]=lt):lt=e[74];const Nt=lt,Tt=_?a.jsx(Kt,{children:a.jsxs("div",{className:"space-y-1.5",children:[a.jsx(Mt,{}),a.jsx(Mt,{})]})}):C.count===0&&V?a.jsx("p",{className:"px-4 py-6 text-xs text-muted-foreground",children:S("thread.publishPopover.onlyOtherWork")}):C.count===0?a.jsxs("div",{className:"flex flex-col items-center gap-1 py-10 text-center",children:[a.jsx(pn,{className:"mb-1 size-5 text-success"}),a.jsx("p",{className:"text-sm font-medium",children:S(le?"thread.publishPopover.nothingToSubmit":"thread.publishPopover.everythingLive")}),a.jsx("p",{className:"text-xs text-muted-foreground",children:S(le?"thread.publishPopover.submitEmptyHint":"thread.publishPopover.emptyHint")})]}):a.jsxs(Kt,{children:[Z?a.jsx("p",{className:"text-2xs text-muted-foreground",children:S("thread.publishPopover.showingFirst",{shown:C.count,total:$})}):null,Ct(S("thread.publishPopover.pagesGroup"),C.pages),Ct(S("thread.publishPopover.blocksGroup"),C.blocks),Ct(S("thread.publishPopover.otherGroup"),C.other),J?a.jsx("p",{className:"text-2xs text-muted-foreground",children:S("thread.publishPopover.detailsUnavailable")}):null,V?a.jsx("p",{className:"text-2xs text-muted-foreground",children:S("thread.publishPopover.alsoOtherWork")}):null]}),It=_?a.jsx(kn,{}):De?a.jsx("div",{className:Q(qt,"relative"),children:Te.filter(K=>Ee.includes(Re(K))).map(K=>a.jsx("div",{className:Q("absolute inset-0 flex",Ie?Re(K)===Ce?"z-10":"pointer-events-none opacity-0":Re(K)!==Ne&&"hidden"),inert:Ie&&Re(K)!==Ce,"aria-hidden":Ie&&Re(K)!==Ce?!0:void 0,children:a.jsx(ja,{change:K,diff:ee,bodyPending:H,previewServerUrl:x,draft:g,lastPage:F,v8:s.v8,onReady:Ie?()=>Y(Re(K)):void 0})},Re(K)))}):a.jsx("div",{className:Q(qt,"bg-muted/40")});let it;e[75]!==bt?(it=a.jsx("span",{className:"truncate",children:bt}),e[75]=bt,e[76]=it):it=e[76];let Oe;e[77]!==Nt||e[78]!==N||e[79]!==gt||e[80]!==it?(Oe=a.jsx(Cn,{mode:N,title:it,subLine:gt,trailing:Nt}),e[77]=Nt,e[78]=N,e[79]=gt,e[80]=it,e[81]=Oe):Oe=e[81];let Le;e[82]!==ke||e[83]!==le||e[84]!==ge||e[85]!==C.count||e[86]!==S?(Le=C.count===0?null:a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"text-sm font-medium",children:S(le?"thread.publishPopover.reviewNote":"thread.publishPopover.versionNote")}),a.jsx(El,{value:ge,onChange:K=>W(K.target.value),placeholder:S(le?"thread.publishPopover.reviewNotePlaceholder":"thread.publishPopover.versionNotePlaceholder"),rows:2,maxLength:ps,className:"resize-none text-sm",disabled:ke})]}),e[82]=ke,e[83]=le,e[84]=ge,e[85]=C.count,e[86]=S,e[87]=Le):Le=e[87];let Ue;e[88]!==f||e[89]!==S?(Ue=a.jsx(Nn,{draftPreviewUrl:f,t:S}),e[88]=f,e[89]=S,e[90]=Ue):Ue=e[90];let ze;e[91]!==pt||e[92]!==ie||e[93]!==Je||e[94]!==X||e[95]!==ke||e[96]!==le||e[97]!==y||e[98]!==xt||e[99]!==Qe||e[100]!==S?(ze=!le&&!X&&Je&&!ie.allowed&&!ie.pending?a.jsx(we,{type:"button",className:"flex-1",onClick:y,disabled:ke,children:S("thread.publishPopover.requestApproval")}):a.jsxs(we,{type:"button",variant:le?"default":"brand",className:"flex-1",onClick:()=>{Qe()},disabled:!pt,children:[ke?a.jsx(Lt,{className:"size-4 motion-reduce:animate-none"}):null,ke?S(le?"thread.publishPopover.submitting":"thread.publishPopover.publishing"):xt]}),e[91]=pt,e[92]=ie,e[93]=Je,e[94]=X,e[95]=ke,e[96]=le,e[97]=y,e[98]=xt,e[99]=Qe,e[100]=S,e[101]=ze):ze=e[101];let qe;e[102]!==Ue||e[103]!==ze?(qe=a.jsxs("div",{className:"flex gap-2",children:[Ue,ze]}),e[102]=Ue,e[103]=ze,e[104]=qe):qe=e[104];let He;e[105]!==et||e[106]!==tt||e[107]!==S?(He=et?a.jsxs("div",{children:[a.jsx("p",{className:"text-xs text-destructive",children:et}),tt?a.jsx(sl,{label:S("siteEditor.details"),detail:tt}):null]}):null,e[105]=et,e[106]=tt,e[107]=S,e[108]=He):He=e[108];let Ke;e[109]!==qe||e[110]!==He?(Ke=a.jsxs(a.Fragment,{children:[qe,He]}),e[109]=qe,e[110]=He,e[111]=Ke):Ke=e[111];let Ve;e[112]!==Tt||e[113]!==vt||e[114]!==Se||e[115]!==Oe||e[116]!==Le||e[117]!==Ke?(Ve=a.jsx(Rs,{state:Se,header:Oe,body:Tt,note:Le,gate:vt,footer:Ke}),e[112]=Tt,e[113]=vt,e[114]=Se,e[115]=Oe,e[116]=Le,e[117]=Ke,e[118]=Ve):Ve=e[118];let ot;return e[119]!==It||e[120]!==Ve?(ot=a.jsx(Gt,{pane:It,list:Ve}),e[119]=It,e[120]=Ve,e[121]=ot):ot=e[121],ot}function xc(){return new Set}function vc(t){if(!(t==="claiming"||t==="ready"||t==="failed"))return Vl[t].short}const yc=new Set(["failure","timed_out","cancelled","action_required"]);function Ra(t){return t.status==="completed"&&yc.has(t.conclusion)}function Rn(t){return t.status==="queued"||t.status==="in_progress"}function us(t){return t.isPending&&t.fetchStatus!=="idle"}function wc(t){return{key:"view-change-request",label:t("thread.cmsActions.viewOnProvider"),action:"open-pr-page"}}function St(t,e,s){return e?[...t,wc(s)]:t}function ct(t,e,s){return e.kind!=="ready"||e.behindBase<=0?t:[...t,{key:"get-latest",label:s("thread.cmsActions.getLatest"),action:"sync",tooltip:s("thread.cmsActions.getLatestTooltip")}]}function Yn(t){return{key:"submit-for-review",label:t("thread.headerActions.submitForReview"),action:"create-pr"}}function os(t,e,s){if(e.filter(Rn).length===0)return t;const n=e.filter(o=>o.status==="completed").length;return{...t,tooltip:s("thread.cmsActions.checksRunning",{done:n,total:e.length})}}function jc(t){const{lifecycle:e,branch:s,pr:r,checks:n,reviews:o,loading:d,t:l}=t;if(d)return{label:l("thread.headerActions.loading"),disabled:!0,loading:!0,variant:"outline",tooltip:l("thread.headerActions.loadingBranchTooltip"),menu:[]};switch(e.phase){case"idle":return{label:t.claimPhase&&vc(t.claimPhase.kind)||l("thread.headerActions.startingSandbox"),disabled:!0,loading:!0,variant:"outline",tooltip:l("thread.headerActions.waitingForDaemonTooltip"),menu:[]};case"cloning":return{label:l("thread.headerActions.cloningRepo"),disabled:!0,loading:!0,variant:"outline",tooltip:l("thread.headerActions.cloningRepoTooltip"),menu:[]};case"clone-failed":return{label:l("thread.headerActions.cloneFailed"),disabled:!0,variant:"outline",tooltip:e.error||l("thread.headerActions.cloneFailedDefaultTooltip"),menu:[]};case"checking-out":return{label:l("thread.headerActions.switchingTo",{branch:e.to}),disabled:!0,loading:!0,variant:"outline",tooltip:l("thread.headerActions.checkingOutTooltip",{branch:e.to}),menu:[]};case"installing":return{label:l("thread.headerActions.installingPackages"),disabled:!0,loading:!0,variant:"outline",tooltip:l("thread.headerActions.installingPackagesTooltip"),menu:[]};case"starting":{if(!(s.kind==="ready"&&(s.workingTreeDirty||s.aheadOfBase>0||s.unpushed>0))&&!t.noReviewableDiff)return{label:l("thread.headerActions.startingApp"),disabled:!0,loading:!0,variant:"outline",tooltip:l("thread.headerActions.startingAppTooltip"),menu:[]};break}}if(s.kind!=="ready")return{label:l("thread.headerActions.loadingBranch"),disabled:!0,loading:!0,variant:"outline",tooltip:l("thread.headerActions.waitingForBranchTooltip"),menu:[]};const i=s,c=i.unpushed>0&&!(r&&i.headSha&&r.headSha&&i.headSha===r.headSha);if(t.noReviewableDiff&&!r)return{label:l("thread.headerActions.upToDate"),disabled:!0,variant:"outline",tooltip:l("thread.headerActions.branchInSyncTooltip",{base:i.base}),menu:ct([],i,l)};if(i.workingTreeDirty||c)return{label:l("thread.cmsActions.reviewAndPublish"),action:"publish",variant:"brand",menu:ct(St([Yn(l)],r,l),i,l)};if(Yr("no local work — checking PR/sync state",{workingTreeDirty:i.workingTreeDirty,unpushed:i.unpushed,aheadOfBase:i.aheadOfBase,behindBase:i.behindBase,branch:i.branch,base:i.base,prMerged:r?.merged??null,prState:r?.state??null}),r?.merged)return!!i.headSha&&!!r.headSha&&i.headSha!==r.headSha?{label:l("thread.headerActions.continue"),action:"create-pr",variant:"special",tooltip:l("thread.headerActions.openNewPrTooltip"),menu:ct(St([],r,l),i,l)}:{label:l("thread.headerActions.upToDate"),disabled:!0,variant:"outline",tooltip:l("thread.headerActions.prMergedTooltip",{prNumber:String(r.number),base:r.base}),menu:ct(St([],r,l),i,l)};if(i.aheadOfBase>0){if(r&&r.state==="closed"&&!r.merged)return{label:l("thread.headerActions.reopenPr"),action:"reopen",variant:"default",tooltip:l("thread.headerActions.reopenPrTooltip",{prNumber:String(r.number)}),menu:ct(St([],r,l),i,l)};if(!r)return{label:l("thread.cmsActions.reviewAndPublish"),action:"publish",variant:"brand",menu:ct([Yn(l)],i,l)};if((o?.mergeableState??"unknown")==="dirty")return{label:l("thread.cmsActions.getLatest"),action:"rebase",variant:"default",tooltip:l("thread.cmsActions.getLatestTooltip"),menu:[{key:"resolve-on-provider",label:l("thread.cmsActions.resolveOnProvider"),action:"open-pr-page"}]};const h=n.filter(Rn).length,m=n.filter(Ra).map(f=>f.name);if(h===0&&m.length>0)return{label:l("thread.headerActions.fixChecks"),action:"fix-checks",variant:"default",tooltip:l("thread.headerActions.failingChecksTooltip",{checks:m.join(", ")}),meta:{failingChecks:m},menu:ct(St([{key:"publish-anyway",label:l("thread.headerActions.publishAnyway"),action:"merge",tooltip:l("thread.headerActions.squashMergeTooltip",{prNumber:String(r.number),base:r.base})}],r,l),i,l)};if(o?.draft)return os({label:l("thread.headerActions.markReady"),action:"mark-ready",variant:"default",tooltip:l("thread.headerActions.markDraftReadyTooltip"),menu:ct(St([],r,l),i,l)},n,l);const b=o?.unresolvedConversations??0;return b>0?os({label:l("thread.headerActions.addressFeedback"),action:"resolve-comments",variant:"default",tooltip:l("thread.headerActions.unresolvedConversationsTooltip",{count:String(b)}),menu:ct(St([],r,l),i,l)},n,l):o?.missingRequiredApprovals?os({label:l("thread.cmsActions.waitingForReview"),action:"open-pr-page",variant:"outline",tooltip:l("thread.headerActions.waitingForApprovalsTooltip"),menu:ct(St([],r,l),i,l)},n,l):os({label:l("thread.cmsActions.reviewAndPublish"),action:"publish",variant:"brand",meta:{publishPolicyOverride:"open"},menu:ct(St([{key:"review",label:l("thread.headerActions.review"),action:"review"}],r,l),i,l)},n,l)}return i.behindBase>0?{label:l("thread.cmsActions.getLatest"),action:"sync",variant:"default",tooltip:l("thread.cmsActions.getLatestTooltip"),menu:[]}:{label:l("thread.headerActions.upToDate"),disabled:!0,variant:"outline",tooltip:l("thread.headerActions.branchInSyncTooltip",{base:i.base}),menu:[]}}function Zn(t){return{key:"view-change-request",label:t("thread.cmsActions.viewOnProvider"),action:"open-pr"}}function cs(t,e,s){return e.kind!=="ready"||e.behindBase<=0?t:[...t,{key:"get-latest",label:s("thread.cmsActions.getLatest"),action:"get-latest",tooltip:s("thread.cmsActions.getLatestTooltip")}]}function er(t,e,s,r){const n=e.length;if(n===0)return t;if(e.filter(Rn).length>0){const l=e.filter(c=>c.status==="completed").length,i=r("thread.cmsActions.checksRunning",{done:l,total:n});return s==="loading"?{...t,loading:!0,tooltip:i}:{...t,tooltip:i}}const d=e.filter(Ra).length;return d>0?{...t,variant:"warning",tooltip:r("thread.cmsActions.checksFailing",{failed:d,total:n})}:t}function Pc(t,e){return!!(t?.merged&&t.headSha&&e.kind==="ready"&&!e.workingTreeDirty&&e.headSha===t.headSha)}function Sc(t){return us(t.prQuery)?!0:t.pr?.state!=="open"||t.pr.merged?!1:us(t.checksQuery)||us(t.reviewsQuery)}function kc(t,e){return t.workingTreeDirty?!0:e!==null?e>0:t.aheadOfBase>0}function Cc(t,e){if(!t)return{branchMeta:{kind:"unknown"},publishableChangeCount:null};const s=Object.keys(t.changes).length;return{branchMeta:{kind:"ready",branch:e,base:t.base.resolvedRef??"main",workingTreeDirty:!1,unpushed:0,aheadOfBase:s,behindBase:0,headSha:t.revision},publishableChangeCount:s}}function Nc(t){return{...t,menu:[]}}function Ac(t){const{branch:e,pr:s,checks:r,reviews:n,publishing:o,saving:d,loading:l,publishableChangeCount:i,t:c}=t;if(e.kind!=="ready"&&t.statusError)return{label:c("thread.cmsActions.retry"),action:"retry-status",variant:"outline",disabled:t.statusRetrying,loading:t.statusRetrying,tooltip:t.statusError,menu:[]};if(l||e.kind!=="ready")return{label:c("thread.headerActions.loading"),variant:"outline",disabled:!0,loading:!0,menu:[]};if(o)return{label:c("thread.cmsActions.publishing"),variant:"outline",disabled:!0,loading:!0,menu:[]};if(t.syncing)return{label:c("thread.cmsActions.gettingLatest"),variant:"outline",disabled:!0,loading:!0,menu:[]};if(d)return{label:c("thread.headerActions.saving"),variant:"outline",disabled:!0,loading:!0,menu:[]};if(s&&s.state==="open"&&!s.merged?s:null){const h=n?.mergeableState??"unknown";return h==="dirty"?{label:c("thread.cmsActions.getLatest"),action:"get-latest",variant:"default",tooltip:c("thread.cmsActions.getLatestTooltip"),menu:[{key:"resolve-on-provider",label:c("thread.cmsActions.resolveOnProvider"),action:"open-pr"}]}:h==="blocked"||n?.draft?er({label:c("thread.cmsActions.waitingForReview"),action:"open-pr",variant:"outline",menu:cs([Zn(c)],e,c)},r,"loading",c):er({label:c("thread.cmsActions.reviewAndPublish"),action:"publish",variant:"brand",menu:cs([Zn(c)],e,c)},r,"none",c)}return Pc(s,e)?{label:c("thread.headerActions.upToDate"),variant:"outline",disabled:!0,menu:cs([],e,c)}:kc(e,i)?{label:c("thread.cmsActions.reviewAndPublish"),action:"publish",variant:"brand",menu:cs([{key:"request-approval",label:c("thread.headerActions.submitForReview"),action:"request-approval"}],e,c)}:e.behindBase>0?{label:c("thread.cmsActions.getLatest"),action:"get-latest",variant:"default",tooltip:c("thread.cmsActions.getLatestTooltip"),menu:[],autoRun:e.aheadOfBase===0}:{label:c("thread.headerActions.upToDate"),variant:"outline",disabled:!0,menu:[]}}function Rc(t){return t.conflicting===!0?"dirty":t.conflicting===null?"unknown":t.reviewBlocked||t.unresolvedConversations>0?"blocked":"clean"}function Ta(t){const e=M.c(4);let s;e[0]!==t?(s=Cl(t),e[0]=t,e[1]=s):s=e[1];let r;return e[2]!==s?(r={...s,select:Tc},e[2]=s,e[3]=r):r=e[3],Rt(r)}function Tc(t){const e=t.changeRequest;return e?{draft:e.draft,mergeableState:Rc(e),unresolvedConversations:e.unresolvedConversations,missingRequiredApprovals:e.reviewBlocked}:null}function tr(t,e){return t==="open-pr"||e==="resolve-on-provider"?a.jsx(Or,{size:16}):t==="publish"?a.jsx(Ar,{className:"size-4"}):t==="get-latest"||t==="retry-status"?a.jsx(Ws,{className:"size-4"}):a.jsx(ks,{className:"size-4"})}function Ic(t){const e=M.c(70),{virtualMcpId:s}=t,r=ve(),{org:n}=js(),o=Ps(),d=dn(s),{data:l}=ws.useSession(),{deleteRelease:i}=ln(s),{currentBranch:c,setCurrentTaskBranch:u,taskId:h,createTask:m}=gr();let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b={open:!1,mode:"publish"},e[0]=b):b=e[0];const[f,p]=z.useState(b);let x;e[1]===Symbol.for("react.memo_cache_sentinel")?(x=E=>p({open:!0,mode:E}),e[1]=x):x=e[1];const g=x,P=Mr(d),y=P.status==="attached"||P.status==="public-clone"?P.repo:null,{previewServerUrl:v}=un(s);let j;if(e[2]!==c||e[3]!==n.slug||e[4]!==s){const E=c?pr(br(n.slug,s,c)):null;j=E?mn(E.path,E.params):"/",e[2]=c,e[3]=n.slug,e[4]=s,e[5]=j}else j=e[5];const w=j;let N;e[6]!==c||e[7]!==w||e[8]!==n.slug||e[9]!==v||e[10]!==s?(N=c?{orgSlug:n.slug,virtualMcpId:s,branch:c,previewServerUrl:v,path:w}:null,e[6]=c,e[7]=w,e[8]=n.slug,e[9]=v,e[10]=s,e[11]=N):N=e[11];const k=Rl(N);let A;e[12]!==c||e[13]!==n.slug||e[14]!==s?(A=c?{orgSlug:n.slug,virtualMcpId:s,branch:c}:null,e[12]=c,e[13]=n.slug,e[14]=s,e[15]=A):A=e[15];const S=Tl(A),R=Ht(s,c),T=R.kind==="protocol"&&R.source==="github";let B;e[16]!==c||e[17]!==n.slug||e[18]!==s?(B=c?{orgSlug:n.slug,virtualMcpId:s,branch:c}:null,e[16]=c,e[17]=n.slug,e[18]=s,e[19]=B):B=e[19];const D=Xs(B),F=wr(T?R:null,D),C=c??"",I=h??null;let $;e[20]!==n.slug||e[21]!==C||e[22]!==I||e[23]!==s?($=Vr({orgSlug:n.slug,virtualMcpId:s,branch:C,threadId:I}),e[20]=n.slug,e[21]=C,e[22]=I,e[23]=s,e[24]=$):$=e[24];const Z=!!c&&R.kind!=="pending"&&!T;let ee;e[25]!==Z||e[26]!==$?(ee={...$,enabled:Z},e[25]=Z,e[26]=$,e[27]=ee):ee=e[27];const H=Rt(ee),J=T?null:H.data??null,_=T?Cc(F.data,c??""):null,G=_?_.branchMeta:J?{kind:"ready",branch:xn(J)??c??"",base:J.base??"main",workingTreeDirty:si(J),unpushed:J.unpushed??0,aheadOfBase:J.aheadOfBase??0,behindBase:J.behindBase??0,headSha:J.headSha??""}:{kind:"unknown"},ie=_?_.publishableChangeCount:J?.changedFiles?ma({files:J.changedFiles}).count:null,X=T?F:H,V=(G.kind==="ready"?G.branch:null)??c??null,ae=G.kind==="ready"?G.base:"main",W=Fr({orgId:n.id,orgSlug:n.slug,target:Ye(y),owner:y?.owner??"",repo:y?.name??"",branch:V}),q=W.data??null,de=$r({orgId:n.id,orgSlug:n.slug,target:Ye(y),owner:y?.owner??"",repo:y?.name??"",base:ae}),me=Er({orgId:n.id,orgSlug:n.slug,target:Ye(y),owner:y?.owner??"",repo:y?.name??"",branch:V}),re=Ta({orgId:n.id,orgSlug:n.slug,target:Ye(y),owner:y?.owner??"",repo:y?.name??"",branch:V});let oe;e[28]!==me||e[29]!==q||e[30]!==W||e[31]!==re?(oe=Sc({pr:q,prQuery:W,checksQuery:me,reviewsQuery:re}),e[28]=me,e[29]=q,e[30]=W,e[31]=re,e[32]=oe):oe=e[32];const Y=oe;let ue;e[33]!==W?(ue=async()=>{await W.refetch()},e[33]=W,e[34]=ue):ue=e[34];const je=ue,O=Tn({mutationFn:async()=>{const E=c;await u(on(cn(l?.user))),E&&E!==ae&&await i(E)},onError:Mc});let U;e[35]!==n.slug||e[36]!==h||e[37]!==s?(U=async E=>(await Kr({orgSlug:n.slug,virtualMcpId:s,branch:E.branch,threadId:h??null},E.base),E),e[35]=n.slug,e[36]=h,e[37]=s,e[38]=U):U=e[38];let L;e[39]!==c||e[40]!==n.slug||e[41]!==o||e[42]!==r||e[43]!==h||e[44]!==s?(L=async E=>{_e.success(r("thread.headerActions.syncedWithBase",{base:E.base})),await Promise.all([o.invalidateQueries({queryKey:Wr({orgSlug:n.slug,virtualMcpId:s,branch:c??E.branch,threadId:h??null})}),o.invalidateQueries({queryKey:Ft.decofile(`${n.slug}/${s}/${E.branch}`)})])},e[39]=c,e[40]=n.slug,e[41]=o,e[42]=r,e[43]=h,e[44]=s,e[45]=L):L=e[45];let Pe;e[46]!==U||e[47]!==L?(Pe={mutationFn:U,onSuccess:L,onError:Dc},e[46]=U,e[47]=L,e[48]=Pe):Pe=e[48];const he=Tn(Pe),te=jr(n.slug,s),fe=O.isPending,$e=Ac({branch:G,pr:q,checks:me.data??[],reviews:re.data??null,publishing:fe,saving:te,syncing:he.isPending,statusRetrying:X.isFetching&&!!X.error,statusError:X.error instanceof Error?X.error.message:X.error?String(X.error):null,loading:!!Y,publishableChangeCount:ie,t:r}),ge=T?Nc($e):$e,Te=ge.autoRun&&G.kind==="ready"&&y&&v?`${V}@${G.headSha}`:null,De=z.useRef(null);if(z.useEffect(()=>{!Te||!V||De.current!==Te&&(De.current=Te,he.mutate({branch:V,base:ae}))},[Te,V,ae,he]),P.status==="detached"){let E;e[49]!==r?(E=r("thread.headerActions.reconnectGithub"),e[49]=r,e[50]=E):E=e[50];let xe;e[51]!==E?(xe=a.jsx(jt,{asChild:!0,children:a.jsx("span",{children:a.jsx(we,{size:"sm",variant:"outline",disabled:!0,children:E})})}),e[51]=E,e[52]=xe):xe=e[52];let be;e[53]!==r?(be=r("thread.headerActions.githubConnectionRemoved"),e[53]=r,e[54]=be):be=e[54];let ye;e[55]!==be?(ye=a.jsx(Pt,{children:be}),e[55]=be,e[56]=ye):ye=e[56];let Be;return e[57]!==xe||e[58]!==ye?(Be=a.jsx(Ss,{children:a.jsxs(wt,{children:[xe,ye]})}),e[57]=xe,e[58]=ye,e[59]=Be):Be=e[59],Be}if(!d)return null;if(!y||!v){const E=y?"noPreviewServer":"noRepo";let xe;e[60]!==c||e[61]!==m?(xe=c?()=>{const ye=m?.({runtime:"sandbox",branch:c});ye&&La("coding_session_started",{thread_id:ye})}:void 0,e[60]=c,e[61]=m,e[62]=xe):xe=e[62];let be;return e[63]!==E||e[64]!==xe?(be=a.jsx(Fc,{reason:E,onStartCodingSession:xe}),e[63]=E,e[64]=xe,e[65]=be):be=e[65],be}if(!c)return null;const Ne=E=>{switch(E){case"publish":{g("publish");return}case"request-approval":{g("review");return}case"get-latest":{if(!V||he.isPending)return;he.mutate({branch:V,base:ae});return}case"retry-status":{X.refetch();return}case"open-pr":{q?.htmlUrl&&window.open(q.htmlUrl,"_blank","noopener,noreferrer");return}}};let Ee;e[66]!==Ne?(Ee=E=>({key:E.key,label:E.label,icon:tr(E.action,E.key),...E.tooltip?{tooltip:E.tooltip}:{},onSelect:()=>Ne(E.action)}),e[66]=Ne,e[67]=Ee):Ee=e[67];const Ie=ge.menu.map(Ee),Me=ge.action,ut=ge.label,Ce=ge.variant,le=!!ge.loading;let Se;e[68]!==r?(Se=r("thread.cmsActions.moreActionsAriaLabel"),e[68]=r,e[69]=Se):Se=e[69];const ht=a.jsx(ea,{size:"sm",label:ut,variant:Ce,disabled:!!ge.disabled||!Me,loading:le,...Me&&!ge.loading?{icon:tr(Me)}:{},...ge.tooltip?{tooltip:ge.tooltip}:{},items:Ie,menuAriaLabel:Se,onClick:Me?()=>Ne(Me):void 0});return a.jsxs(a.Fragment,{children:[ht,c?a.jsx(Ca,{open:f.open,mode:f.mode,fastPreview:!0,onOpenChange:E=>{E||p(Bc)},orgSlug:n.slug,virtualMcpId:s,branch:c,baseBranch:ae,repoTarget:Ye(y),owner:y.owner,repo:y.name,publishPolicy:Qr(d?.metadata?.publishPolicy),draftPreviewUrl:k.url,destinationHost:k.host,previewServerUrl:v,compareDraft:S?{kind:"pointer",pointer:S}:null,lastPublishedPr:de.data??null,onRequestApproval:()=>g("review"),openPullRequest:q?.state==="open"?q:null,onPullRequestChanged:je,onPublished:()=>O.mutateAsync()}):null]})}function Bc(t){return{...t,open:!1}}function Dc(t){_e.error(t instanceof Error?t.message:String(t))}function Mc(t){console.error("site editor: settling after publish failed",t)}function Fc(t){const e=M.c(14),{reason:s,onStartCodingSession:r}=t,n=ve(),o=!r;let d;e[0]!==n?(d=n("sandbox.cmsUnavailable.startCodingSession"),e[0]=n,e[1]=d):d=e[1];let l;e[2]!==r||e[3]!==o||e[4]!==d?(l=a.jsx(jt,{asChild:!0,children:a.jsx("span",{children:a.jsx(we,{size:"sm",variant:"outline",disabled:o,onClick:r,children:d})})}),e[2]=r,e[3]=o,e[4]=d,e[5]=l):l=e[5];let i;e[6]!==s||e[7]!==n?(i=n(s==="noPreviewServer"?"sandbox.cmsUnavailable.noPreviewServer":"sandbox.cmsUnavailable.noRepo"),e[6]=s,e[7]=n,e[8]=i):i=e[8];let c;e[9]!==i?(c=a.jsx(Pt,{children:i}),e[9]=i,e[10]=c):c=e[10];let u;return e[11]!==l||e[12]!==c?(u=a.jsx(Ss,{children:a.jsxs(wt,{children:[l,c]})}),e[11]=l,e[12]=c,e[13]=u):u=e[13],u}const $t="The user clicked this action deliberately — execute directly. Do not call user_ask unless you hit an actual problem outside the scope of this intent (missing auth, unresolvable conflict, a check with multiple plausible fixes).";function $c(t){return`Reopen PR #${t.prNumber}. ${$t}`}function Ec(t){return`Rebase \`${t.branch}\` on the latest base and force-push with --force-with-lease. ${$t}`}function _c(t){return`Sync \`${t.branch}\` with everyone else's work: \`git add -A\`, commit any pending local changes with a concise conventional-commit message (skip if the working tree is clean), \`git pull --rebase\` to bring in anything pushed directly to \`origin/${t.branch}\`, then \`git rebase origin/${t.base}\` to catch up with the base branch. Resolve any conflicts that come up, then push the result (force-with-lease only if the rebase rewrote commits already on the remote). ${$t}`}function Oc(t){const e=(t.failingChecks??[]).map(s=>`\`${s}\``).join(", ");return`PR #${t.prNumber} has failing checks: ${e}. For each: read the logs, diagnose the root cause, apply the smallest fix that makes it pass, commit, and push. ${$t}`}function Lc(t){return`Mark PR #${t.prNumber} ready for review. ${$t}`}function Uc(t){return`Read the unresolved review threads on PR #${t.prNumber}. For each thread: understand the reviewer's ask, apply the needed changes, commit, push, reply explaining what changed, and resolve the thread. If a comment is a question that doesn't need a code change, reply with the answer and resolve. ${$t}`}function zc(t){return`Review PR #${t.prNumber}. Read the full diff, analyze every changed file for correctness, security, code quality, and alignment with the repo's patterns. Post specific line-level review comments on concerns, then submit an overall review (approve / request changes / comment) with a concise summary. Do not modify the code — this is a read-and-comment pass. ${$t}`}function sr(t){switch(t){case"publish":return a.jsx(Ar,{className:"size-4"});case"create-pr":case"reopen":return a.jsx(ks,{className:"size-4"});case"rebase":case"sync":return a.jsx(Ws,{className:"size-4"});case"fix-checks":return a.jsx(mr,{className:"size-4"});case"mark-ready":return a.jsx(pn,{className:"size-4"});case"resolve-comments":return a.jsx(ml,{className:"size-4"});case"merge":return a.jsx(Ll,{className:"size-4"});case"review":return a.jsx(ms,{className:"size-4"});case"open-pr-page":return a.jsx(Or,{size:16})}}const nr=new Set(["reopen","rebase","fix-checks","mark-ready","resolve-comments","review","sync"]),rr=new Set(["publish","create-pr"]);function qc(t){const e=M.c(44),{t:s,button:r,actionBusy:n,changeRequestPending:o,savePending:d,onAction:l}=t,i=r.action;let c;e[0]!==i||e[1]!==n?(c=n&&i!==void 0&&nr.has(i),e[0]=i,e[1]=n,e[2]=c):c=e[2];const u=c,h=o&&i==="merge";let m;e[3]!==i||e[4]!==d?(m=d&&i!==void 0&&rr.has(i),e[3]=i,e[4]=d,e[5]=m):m=e[5];const b=m,f=!!r.disabled||u||h||b||!i,p=!!r.loading||h;let x;e[6]!==r.tooltip||e[7]!==u||e[8]!==b||e[9]!==s?(x=u?s("thread.headerActions.chatIsRunning"):b?s("thread.headerActions.saving"):r.tooltip,e[6]=r.tooltip,e[7]=u,e[8]=b,e[9]=s,e[10]=x):x=e[10];const g=x;let P;if(e[11]!==n||e[12]!==r.menu||e[13]!==o||e[14]!==l||e[15]!==d||e[16]!==s){let R;e[18]!==n||e[19]!==o||e[20]!==l||e[21]!==d||e[22]!==s?(R=T=>{const B=n&&nr.has(T.action),D=d&&rr.has(T.action),F=T.action==="merge"&&o,C=D?s("thread.headerActions.saving"):B?s("thread.headerActions.chatIsRunning"):T.tooltip;return{key:T.key,label:T.label,icon:sr(T.action),disabled:!!(B||D||F),...C?{tooltip:C}:{},onSelect:()=>l(T.action)}},e[18]=n,e[19]=o,e[20]=l,e[21]=d,e[22]=s,e[23]=R):R=e[23],P=r.menu.map(R),e[11]=n,e[12]=r.menu,e[13]=o,e[14]=l,e[15]=d,e[16]=s,e[17]=P}else P=e[17];const y=P,v=r.label,j=r.variant;let w;e[24]!==i||e[25]!==p?(w=i&&!p?{icon:sr(i)}:{},e[24]=i,e[25]=p,e[26]=w):w=e[26];let N;e[27]!==g?(N=g?{tooltip:g}:{},e[27]=g,e[28]=N):N=e[28];let k;e[29]!==s?(k=s("thread.headerActions.moreActionsAriaLabel"),e[29]=s,e[30]=k):k=e[30];let A;e[31]!==i||e[32]!==l?(A=i?()=>l(i):void 0,e[31]=i,e[32]=l,e[33]=A):A=e[33];let S;return e[34]!==r.label||e[35]!==r.variant||e[36]!==f||e[37]!==y||e[38]!==p||e[39]!==w||e[40]!==N||e[41]!==k||e[42]!==A?(S=a.jsx(ea,{size:"sm",label:v,variant:j,disabled:f,loading:p,...w,...N,items:y,menuAriaLabel:k,onClick:A}),e[34]=r.label,e[35]=r.variant,e[36]=f,e[37]=y,e[38]=p,e[39]=w,e[40]=N,e[41]=k,e[42]=A,e[43]=S):S=e[43],S}function Hc(t){const e=M.c(9),{label:s,children:r}=t;if(!s){let l;return e[0]!==r?(l=a.jsx(a.Fragment,{children:r}),e[0]=r,e[1]=l):l=e[1],l}let n;e[2]!==r?(n=a.jsx(jt,{asChild:!0,children:a.jsx("span",{children:r})}),e[2]=r,e[3]=n):n=e[3];let o;e[4]!==s?(o=a.jsx(Pt,{children:s}),e[4]=s,e[5]=o):o=e[5];let d;return e[6]!==n||e[7]!==o?(d=a.jsx(Ss,{children:a.jsxs(wt,{children:[n,o]})}),e[6]=n,e[7]=o,e[8]=d):d=e[8],d}function Kc(t){return{label:t("thread.headerActions.loadingBranch"),disabled:!0,loading:!0,variant:"outline",tooltip:t("thread.headerActions.waitingForSandboxBranchTooltip"),menu:[]}}function Vc({virtualMcpId:t}){const e=ve(),{org:s}=js(),{data:r}=ws.useSession(),n=dn(t),{deleteRelease:o}=ln(t),{currentBranch:d,setCurrentTaskBranch:l,createTask:i,taskId:c}=gr(),u=Ha(),{openSidePanel:h}=rl(),[m,b]=z.useState({open:!1,mode:"publish",policyOverride:null}),f=mi({connectionId:Ua,orgId:s.id,orgSlug:s.slug}),p=bi(f),[x,g]=z.useState(!1),P=z.useRef(""),y=Mr(n),v=y.status==="attached"||y.status==="public-clone"?y.repo:null,{lifecycle:j,branch:w,phase:N}=pi(),k={orgSlug:s.slug,virtualMcpId:t,branch:d??"",threadId:c??null},S=Rt({queryKey:Wr(k),queryFn:()=>bn(k),enabled:!!d,staleTime:15e3,refetchInterval:U=>$s(U.state.data)?5e3:!1}).data??null,R=w,T=j,B=R.kind==="ready"?R.branch:null,D=d??B??void 0,F=(R.kind==="ready"?R.branch:null)??D??null,C=Fr({orgId:s.id,orgSlug:s.slug,target:Ye(v),owner:v?.owner??"",repo:v?.name??"",branch:F}),I=C.data??null,$=Er({orgId:s.id,orgSlug:s.slug,target:Ye(v),owner:v?.owner??"",repo:v?.name??"",branch:F}),Z=Ta({orgId:s.id,orgSlug:s.slug,target:Ye(v),owner:v?.owner??"",repo:v?.name??"",branch:F}),ee=$r({orgId:s.id,orgSlug:s.slug,target:Ye(v),owner:v?.owner??"",repo:v?.name??"",base:R.kind==="ready"?R.base:null}),H=R,J=Qr(n?.metadata?.publishPolicy),_=jr(s.slug,t),{previewUrl:G}=gi(),{previewServerUrl:ie,projectDefault:X}=un(t);if(y.status==="detached")return a.jsx(Hc,{label:e("thread.headerActions.githubConnectionRemoved"),children:a.jsx(we,{size:"sm",variant:"outline",disabled:!0,children:e("thread.headerActions.reconnectGithub")})});if(!v)return null;const V=F?jc({lifecycle:T,branch:H,claimPhase:N,pr:I,checks:$.data??[],reviews:Z.data??null,noReviewableDiff:$s(S),loading:us(C),t:e}):Kc(e),ae=JSON.stringify({label:V.label,branchKind:H.kind,workingTreeDirty:H.kind==="ready"?H.workingTreeDirty:null,unpushed:H.kind==="ready"?H.unpushed:null,aheadOfBase:H.kind==="ready"?H.aheadOfBase:null,lifecycle:T.phase,headBranch:F,noReviewableDiff:$s(S)});P.current!==ae&&(P.current=ae,Yr("header button",{label:V.label,tooltip:V.tooltip,action:V.action,chatBranch:d,sandboxBranch:B,sandboxRouteBranch:D,headBranch:F,branchMeta:R,effectiveBranchMeta:H,lifecyclePhase:T.phase,prNumber:I?.number??null,prState:I?.state??null}));const W=U=>(h(),u.sendMessage({parts:[{type:"text",text:U}]})),q=u.isStreaming,de=H.kind==="ready"?H.base:"main",me=async()=>{await C.refetch()},re=async()=>{const U=d,L=on(cn(r?.user));X==="cms"?i({runtime:"cms",branch:L}):await l(L),U&&U!==de&&await o(U)},oe=async U=>{if(!(!v||x)){g(!0);try{const L=ta(r?.user);await ra(s.slug,Ye(v),{number:U,coAuthor:L}),_e.success(e("thread.headerActions.publishedPr",{prNumber:String(U)})),await me(),await re()}catch(L){_e.error(L instanceof na?L.detail??Gi(L.reason,e):L instanceof Error?L.message:e("thread.headerActions.failedToMergePullRequest"))}finally{g(!1)}}},Y=(U,L)=>b({open:!0,mode:U,policyOverride:L}),ue=U=>{if(F)switch(U){case"publish":Y("publish",V.meta?.publishPolicyOverride??null);return;case"create-pr":Y("review",null);return;case"merge":I&&oe(I.number);return;case"sync":if(q)return;W(_c({branch:F,base:de}));return;case"open-pr-page":I?.htmlUrl&&window.open(I.htmlUrl,"_blank","noopener,noreferrer");return;case"review":if(q)return;I&&W(zc({prNumber:I.number}));return;case"reopen":if(q)return;I&&W($c({prNumber:I.number}));return;case"rebase":if(q)return;W(Ec({branch:F}));return;case"fix-checks":if(q)return;I&&W(Oc({prNumber:I.number,failingChecks:V.meta?.failingChecks??[]}));return;case"mark-ready":if(q)return;I&&W(Lc({prNumber:I.number}));return;case"resolve-comments":if(q)return;I&&W(Uc({prNumber:I.number}));return}},je=x||q,O=a.jsx(qc,{t:e,button:V,actionBusy:je,changeRequestPending:x,savePending:_,onAction:ue});return D?a.jsxs(a.Fragment,{children:[O,a.jsx(Ca,{open:m.open,mode:m.mode,fastPreview:!1,recoverSandbox:()=>p.mutateAsync({virtualMcpId:t,branch:D,...c?{threadId:c}:{}}),onOpenChange:U=>{U||b(L=>({...L,open:!1}))},orgSlug:s.slug,virtualMcpId:t,branch:D,baseBranch:de,repoTarget:Ye(v),owner:v.owner,repo:v.name,publishPolicy:m.policyOverride??J,draftPreviewUrl:G,destinationHost:null,previewServerUrl:ie,compareDraft:G?{kind:"sandbox",previewUrl:G}:null,lastPublishedPr:ee.data??null,onRequestApproval:()=>b(U=>({...U,open:!0,mode:"review"})),openPullRequest:I?.state==="open"?I:null,onPullRequestChanged:me,onPublished:re})]}):O}function Gc(t){const e=M.c(33),{orgSlug:s,virtualMcpId:r,branch:n}=t,o=ve(),[d,l]=z.useState(!1),i=Ht(r,n),c=i.kind==="protocol"&&i.source==="local"?i:null;let u;e[0]!==n||e[1]!==s||e[2]!==r?(u=n?{orgSlug:s,virtualMcpId:r,branch:n}:null,e[0]=n,e[1]=s,e[2]=r,e[3]=u):u=e[3];const h=Xs(u),{data:m}=wr(c,h);if(!c||!h||!n)return null;let b;e[4]!==m?(b=m?Object.keys(m.changes).length:0,e[4]=m,e[5]=b):b=e[5];const f=b;let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p=()=>l(!0),e[6]=p):p=e[6];let x;e[7]!==f||e[8]!==o?(x=f>0?o("decoServe.changes.buttonCount",{count:f}):o("decoServe.changes.button"),e[7]=f,e[8]=o,e[9]=x):x=e[9];let g;e[10]!==x?(g=a.jsx(we,{size:"sm",variant:"outline","data-testid":"local-changes-button",onClick:p,children:x}),e[10]=x,e[11]=g):g=e[11];let P;e[12]!==o?(P=o("decoServe.changes.title"),e[12]=o,e[13]=P):P=e[13];let y;e[14]!==P?(y=a.jsx(cr,{className:"sr-only",children:P}),e[14]=P,e[15]=y):y=e[15];let v;e[16]!==n||e[17]!==h||e[18]!==c||e[19]!==d||e[20]!==s||e[21]!==o||e[22]!==r?(v=d?a.jsx(ur,{children:k=>{const{reset:A}=k;return a.jsx(hr,{fallback:S=>{const{resetError:R}=S;return a.jsx(Vs,{title:o("decoServe.changes.title"),body:a.jsx("p",{className:"px-4 py-6 text-xs text-muted-foreground",children:o("decoServe.changes.loadFailed")}),onClose:()=>{A(),R(),l(!1)}})},children:a.jsx(z.Suspense,{fallback:a.jsx(Gt,{pane:a.jsx(kn,{}),list:a.jsx(Vs,{title:o("decoServe.changes.title"),loading:!0,body:a.jsx(Kt,{children:a.jsxs("div",{className:"space-y-1.5",children:[a.jsx(Mt,{}),a.jsx(Mt,{})]})}),onClose:()=>l(!1)})}),children:a.jsx(Qc,{orgSlug:s,virtualMcpId:r,branch:n,backend:c,cacheKey:h,onClose:()=>l(!1)})})})}}):null,e[16]=n,e[17]=h,e[18]=c,e[19]=d,e[20]=s,e[21]=o,e[22]=r,e[23]=v):v=e[23];let j;e[24]!==y||e[25]!==v?(j=a.jsxs(dr,{"aria-describedby":void 0,className:"flex h-[calc(100dvh-2rem)] w-[calc(100vw-2rem)] max-w-none flex-col md:flex-row md:h-[calc(100dvh-6rem)] md:w-[calc(100vw-6rem)] gap-0 overflow-hidden p-0 sm:max-w-none",closeButtonClassName:"top-3.5 right-3.5",children:[y,v]}),e[24]=y,e[25]=v,e[26]=j):j=e[26];let w;e[27]!==d||e[28]!==j?(w=a.jsx(or,{open:d,onOpenChange:l,children:j}),e[27]=d,e[28]=j,e[29]=w):w=e[29];let N;return e[30]!==w||e[31]!==g?(N=a.jsxs(a.Fragment,{children:[g,w]}),e[30]=w,e[31]=g,e[32]=N):N=e[32],N}function Vs(t){const e=M.c(22),{title:s,trailing:r,body:n,loading:o,onClose:d}=t,l=o===void 0?!1:o,i=ve(),c=l?"loading":"ready";let u;e[0]!==s?(u=a.jsx("span",{className:"truncate",children:s}),e[0]=s,e[1]=u):u=e[1];let h;e[2]!==u||e[3]!==r?(h=a.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium",children:[u,r]}),e[2]=u,e[3]=r,e[4]=h):h=e[4];let m;e[5]!==i?(m=i("decoServe.changes.hint"),e[5]=i,e[6]=m):m=e[6];let b;e[7]!==m?(b=a.jsx("p",{className:"text-2xs text-muted-foreground",children:a.jsx(qr,{text:m})}),e[7]=m,e[8]=b):b=e[8];let f;e[9]!==i?(f=i("decoServe.changes.close"),e[9]=i,e[10]=f):f=e[10];let p;e[11]!==d||e[12]!==f?(p=a.jsx(we,{type:"button",variant:"outline",className:"w-full",onClick:d,children:f}),e[11]=d,e[12]=f,e[13]=p):p=e[13];let x;e[14]!==b||e[15]!==p?(x=a.jsxs(a.Fragment,{children:[b,p]}),e[14]=b,e[15]=p,e[16]=x):x=e[16];let g;return e[17]!==n||e[18]!==c||e[19]!==h||e[20]!==x?(g=a.jsx(Rs,{state:c,header:h,body:n,footer:x}),e[17]=n,e[18]=c,e[19]=h,e[20]=x,e[21]=g):g=e[21],g}function Qc(t){const e=M.c(54),{orgSlug:s,virtualMcpId:r,branch:n,backend:o,cacheKey:d,onClose:l}=t,i=ve();let c;e[0]!==n||e[1]!==s||e[2]!==r?(c={orgSlug:s,virtualMcpId:r,branch:n},e[0]=n,e[1]=s,e[2]=r,e[3]=c):c=e[3];let u;e[4]!==o||e[5]!==d||e[6]!==c?(u={backend:o,cacheKey:d,scope:c},e[4]=o,e[5]=d,e[6]=c,e[7]=u):u=e[7];const h=Sn(u);let m;e[8]!==n||e[9]!==s||e[10]!==h.refresh||e[11]!==r?(m={orgSlug:s,virtualMcpId:r,branch:n,refresh:h.refresh},e[8]=n,e[9]=s,e[10]=h.refresh,e[11]=r,e[12]=m):m=e[12];const b=Pa(m),f=yr(s,r).phase==="saving",p=o.describe.readOnly,[x,g]=z.useState(null),[P,y]=z.useState(null),[v,j]=z.useState(!1),{summary:w}=h;let N,k,A,S,R;if(e[13]!==x||e[14]!==o||e[15]!==P||e[16]!==b||e[17]!==v||e[18]!==f||e[19]!==p||e[20]!==h.blocks||e[21]!==h.entries||e[22]!==h.sidesFailed||e[23]!==h.sidesPending||e[24]!==w.blocks||e[25]!==w.count||e[26]!==w.pages||e[27]!==i){const D=[...w.pages,...w.blocks],F=D.find(Z=>Re(Z)===x)??D[0]??null;let C;e[33]!==w.count||e[34]!==i?(C=w.count===0?i("decoServe.changes.title"):w.count===1?i("decoServe.changes.titleOne"):i("decoServe.changes.titleCount",{count:w.count}),e[33]=w.count,e[34]=i,e[35]=C):C=e[35],R=C;const I=(Z,ee)=>ee.length===0?null:a.jsxs("div",{className:"space-y-1.5",children:[a.jsx("div",{className:"px-0.5 text-2xs font-medium text-muted-foreground",children:Z}),ee.map(H=>{const J=Re(H);return a.jsx(ga,{change:H,bodyPending:h.sidesPending,v8:!0,selected:F!==null&&Re(F)===J,onSelect:()=>g(J),confirming:P===J,onConfirmingChange:_=>y(_?J:null),onDiscard:p||!H.entry?void 0:()=>{b(o,[H.entry],i("thread.publishPopover.discarded",{name:H.name}))},isPublishing:!1,isDiscarding:f},J)})]});let $;e[36]!==o||e[37]!==b||e[38]!==v||e[39]!==f||e[40]!==p||e[41]!==h.entries||e[42]!==w.count||e[43]!==i?($=p||w.count<=1?null:a.jsxs(a.Fragment,{children:[a.jsx("button",{type:"button",className:"ml-auto shrink-0 text-2xs text-muted-foreground transition-colors hover:text-destructive disabled:opacity-50",onClick:()=>j(!0),disabled:f,children:i("thread.publishPopover.discardAll")}),a.jsx(an,{open:v,onOpenChange:j,children:a.jsxs(rn,{children:[a.jsxs(en,{children:[a.jsx(Ys,{children:i("thread.publishPopover.discardAllTitle")}),a.jsx(Zs,{children:i("thread.publishPopover.discardAllConfirm")})]}),a.jsxs(nn,{children:[a.jsx(tn,{children:i("thread.publishDialog.cancel")}),a.jsx(sn,{onClick:()=>{b(o,h.entries,i("thread.publishDialog.allChangesDiscarded"))},disabled:f,className:Q(fr({variant:"destructive"})),children:i("thread.publishPopover.discardAll")})]})]})})]}),e[36]=o,e[37]=b,e[38]=v,e[39]=f,e[40]=p,e[41]=h.entries,e[42]=w.count,e[43]=i,e[44]=$):$=e[44],A=$,k=w.count===0?a.jsxs("div",{className:"flex flex-col items-center gap-1 py-10 text-center",children:[a.jsx(pn,{className:"mb-1 size-5 text-success"}),a.jsx("p",{className:"text-sm font-medium",children:i("decoServe.changes.empty")})]}):a.jsxs(Kt,{children:[I(i("thread.publishPopover.pagesGroup"),w.pages),I(i("thread.publishPopover.blocksGroup"),w.blocks),h.sidesFailed?a.jsx("p",{className:"text-2xs text-muted-foreground",children:i("thread.publishPopover.detailsUnavailable")}):null]}),N=Gt,S=F?a.jsx("div",{className:Q(qt,"relative flex"),children:a.jsx(ja,{change:F,diff:null,bodyPending:h.sidesPending,previewServerUrl:null,draft:null,lastPage:null,v8:{blocks:h.blocks}},Re(F))}):a.jsx("div",{className:Q(qt,"bg-muted/40")}),e[13]=x,e[14]=o,e[15]=P,e[16]=b,e[17]=v,e[18]=f,e[19]=p,e[20]=h.blocks,e[21]=h.entries,e[22]=h.sidesFailed,e[23]=h.sidesPending,e[24]=w.blocks,e[25]=w.count,e[26]=w.pages,e[27]=i,e[28]=N,e[29]=k,e[30]=A,e[31]=S,e[32]=R}else N=e[28],k=e[29],A=e[30],S=e[31],R=e[32];let T;e[45]!==k||e[46]!==A||e[47]!==l||e[48]!==R?(T=a.jsx(Vs,{title:R,trailing:A,body:k,onClose:l}),e[45]=k,e[46]=A,e[47]=l,e[48]=R,e[49]=T):T=e[49];let B;return e[50]!==N||e[51]!==S||e[52]!==T?(B=a.jsx(N,{pane:S,list:T}),e[50]=N,e[51]=S,e[52]=T,e[53]=B):B=e[53],B}function Wc(t){const e=M.c(5),{virtualMcpId:s,branch:r}=t,n=ve(),o=Ht(s,r);if(!Jc(o))return null;let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=a.jsx(jt,{asChild:!0,children:a.jsx("span",{"data-testid":"content-version-badge",className:"shrink-0 rounded border border-border px-1.5 py-px font-mono text-2xs leading-4 text-muted-foreground",children:"v8"})}),e[0]=d):d=e[0];let l;e[1]!==n?(l=n("decoServe.version.v8"),e[1]=n,e[2]=l):l=e[2];let i;return e[3]!==l?(i=a.jsxs(wt,{children:[d,a.jsx(Pt,{side:"bottom",className:"max-w-xs",children:l})]}),e[3]=l,e[4]=i):i=e[4],i}function Jc(t){return t.kind==="protocol"?t.hasSchema!==!1:t.kind==="unavailable"&&t.source!=="local"}function Xc(t){const e=M.c(11),{virtualMcpId:s,branch:r}=t,n=ve(),o=Ht(s,r);if(!(o.kind==="protocol"&&o.source==="local"&&o.describe.readOnly))return null;let l;e[0]!==n?(l=n("decoServe.readOnly.label"),e[0]=n,e[1]=l):l=e[1];let i;e[2]!==l?(i=a.jsx(jt,{asChild:!0,children:a.jsx("span",{tabIndex:0,"data-testid":"deco-serve-read-only",className:"shrink-0 rounded-full bg-warning/10 px-2 py-0.5 text-xs font-medium text-foreground",children:l})}),e[2]=l,e[3]=i):i=e[3];let c;e[4]!==n?(c=n("decoServe.readOnly.tooltip"),e[4]=n,e[5]=c):c=e[5];let u;e[6]!==c?(u=a.jsx(Pt,{side:"bottom",className:"max-w-xs",children:a.jsx(qr,{text:c})}),e[6]=c,e[7]=u):u=e[7];let h;return e[8]!==i||e[9]!==u?(h=a.jsxs(wt,{children:[i,u]}),e[8]=i,e[9]=u,e[10]=h):h=e[10],h}function Yc(t){const e=!t.hasEntity&&!t.servingLocally,s=t.hasEntity&&!t.localPreview&&!t.tunnelUndecided&&!t.servingLocally&&t.showsRepositoryActions;return{hidden:e,localFiles:!e&&t.servingLocally,draftSelect:!e&&t.hasEntity,publish:e||!s?null:t.runtime==="cms"?"cms":"code"}}function Zd(t){const e=M.c(2),{blocksOnly:s}=t;let r;return e[0]!==s?(r=s?a.jsx(Zc,{}):a.jsx(Ia,{}),e[0]=s,e[1]=r):r=e[1],r}function Zc(){const t=M.c(2),e=_r(xi());let s;return t[0]!==e?(s=Al(e)?a.jsx(ya,{value:!1,children:a.jsx(Ia,{})}):null,t[0]=e,t[1]=s):s=t[1],s}function Ia(){const t=M.c(32),e=Vt(),{org:s}=js(),r=dn(e?.virtualMcpId),n=e?.currentBranch??null,o=un(r?.id).runtime,{url:d,undecided:l}=xr(r?.id),{connection:i}=vr(r?.id??e?.virtualMcpId),c=r?.id??e?.virtualMcpId,u=!!r,h=!!i,m=!!d,b=!!l;let f;t[0]!==r||t[1]!==o||t[2]!==u||t[3]!==h||t[4]!==m||t[5]!==b?(f=Yc({hasEntity:u,servingLocally:h,localPreview:m,tunnelUndecided:b,showsRepositoryActions:!!r&&Nl(r),runtime:o}),t[0]=r,t[1]=o,t[2]=u,t[3]=h,t[4]=m,t[5]=b,t[6]=f):f=t[6];const p=f;if(!c||p.hidden)return null;let x;t[7]!==n||t[8]!==c?(x=a.jsx(Wc,{virtualMcpId:c,branch:n}),t[7]=n,t[8]=c,t[9]=x):x=t[9];let g;t[10]!==n||t[11]!==p.localFiles||t[12]!==c?(g=p.localFiles&&a.jsx(Xc,{virtualMcpId:c,branch:n}),t[10]=n,t[11]=p.localFiles,t[12]=c,t[13]=g):g=t[13];let P;t[14]!==n||t[15]!==s||t[16]!==p.localFiles||t[17]!==c?(P=p.localFiles&&a.jsx(Gc,{orgSlug:s.slug,virtualMcpId:c,branch:n}),t[14]=n,t[15]=s,t[16]=p.localFiles,t[17]=c,t[18]=P):P=t[18];let y;t[19]!==n||t[20]!==r||t[21]!==p.draftSelect?(y=r&&p.draftSelect&&a.jsx("div",{className:"flex min-w-0 shrink items-center justify-end",children:a.jsx(Ui,{virtualMcp:r,currentBranch:n})}),t[19]=n,t[20]=r,t[21]=p.draftSelect,t[22]=y):y=t[22];let v;t[23]!==r||t[24]!==p.publish?(v=r&&p.publish&&a.jsxs(a.Fragment,{children:[a.jsx(za,{orientation:"vertical",className:"mx-1 data-[orientation=vertical]:h-4"}),a.jsx("div",{className:"flex shrink-0 items-center justify-end gap-1",children:p.publish==="cms"?a.jsx(Ic,{virtualMcpId:r.id}):a.jsx(Vc,{virtualMcpId:r.id})})]}),t[23]=r,t[24]=p.publish,t[25]=v):v=t[25];let j;return t[26]!==x||t[27]!==g||t[28]!==P||t[29]!==y||t[30]!==v?(j=a.jsxs(a.Fragment,{children:[x,g,P,y,v]}),t[26]=x,t[27]=g,t[28]=P,t[29]=y,t[30]=v,t[31]=j):j=t[31],j}export{Zd as S};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/agent-site-editor-DGIssniL.js","assets/index-BeWb3VLq.js","assets/index-DjdMnw7p.css","assets/chat-context-BEyCIAaN.js","assets/use-panel-navigate-CXkMPISv.js","assets/thread-route-BPSSuk8V.js","assets/use-project-scope-BOj2O9A_.js","assets/repository-binding-Cf_thK-b.js","assets/use-mcp-client-2WkK0AxE.js","assets/auth-DVebpHI3.js","assets/autosend-BTx7-p6a.js","assets/thread-intent-CoB1rbzj.js","assets/delay-CnY5UFtP.js","assets/backoff-CrEUbyZT.js","assets/watch-sse-pool-C9NPGTmI.js","assets/task-board-ByNQwZsl.js","assets/schema-b5uziS6S.js","assets/slugify-CEUa2lfQ.js","assets/use-decopilot-events-CuBncVze.js","assets/use-ai-providers-Ct47MIru.js","assets/location-V0VwTJTt.js","assets/use-organization-settings-CE5BJyh9.js","assets/site-draft-actions-B1VIigls.js","assets/separator-l8ktDBQ-.js","assets/site-editor-toast-C48kJZ8y.js","assets/use-session-runtime-CqJF6neP.js","assets/experiments-tab-choice-CQ5EsK8h.js","assets/sandbox-url-D3mC8qhT.js","assets/utils-t1gjPfET.js","assets/ZoomOut-DixQygt2.js","assets/Image01-hTzc15CE.js","assets/use-sandbox-events-BVhJrX2Z.js","assets/sandbox-git-api-CH_-QFpD.js","assets/shell-layout-Dpds4_um.js","assets/avatar-DjIkOwsx.js","assets/User01-X6IeKYZH.js","assets/Building02-BHJQSDUK.js","assets/UserSquare-pmxb5ZdZ.js","assets/agent-icon-CiKTiUdq.js","assets/AlertCircle-Cch634f7.js","assets/Tool01-2gJDR0Ho.js","assets/ArrowUp-DLUdomd9.js","assets/ArrowLeft-CohopnCT.js","assets/LinkBroken01-Dioz3u9i.js","assets/ShoppingBag01-BStpgW0a.js","assets/CheckCircle-Cs8i9zYt.js","assets/ChevronUp-BT7eMKPK.js","assets/ChevronSelectorVertical-C5d75KyY.js","assets/Copy01-B341DqLV.js","assets/CreditCard01-4Fwr0tNh.js","assets/DotsVertical-DbrlDgFh.js","assets/Globe04-BE6c1UDj.js","assets/SwitchHorizontal01-CrC4ThKg.js","assets/Key01-kTu6t6u_.js","assets/Link01-hfA48cFL.js","assets/Minus-DqDPTtRG.js","assets/Monitor01-Bz6QaUO4.js","assets/Sun-C37Hpdko.js","assets/Play-CByslM3d.js","assets/Plus-Dewm72je.js","assets/SearchMd-7Jo0ZofC.js","assets/Trash01-DjE7Raat.js","assets/Upload01-CYfTR3aZ.js","assets/Users01-uKJoVSle.js","assets/XClose-BVxVAZ6V.js","assets/use-clock-tick-DE4s8Okz.js","assets/command-KmLWWmqo.js","assets/index-BliYmmPu.js","assets/integration-icon-VoZokpOe.js","assets/project-icon-Ds8VtVRG.js","assets/new-project-dialog-DfI138Mw.js","assets/label-TKhfC6jr.js","assets/repository-import-picker-BOku3VrR.js","assets/use-navigate-to-agent-C2NQ-36B.js","assets/repository-picker-CeCsQGv8.js","assets/tooltip-4vv5k-uR.js","assets/index-CdhgpKbn.js","assets/useInfiniteQuery-CxzyY6DS.js","assets/infiniteQueryObserver-BOCgDRcQ.js","assets/collection-search-7sBPioRN.js","assets/use-debounced-value-Br6JzfN-.js","assets/required-auth-layout-DhxdstQv.js","assets/use-org-sso-BnFa9r-G.js","assets/shell-layout-CE2Eihra.css","assets/toolbar-icon-button-DKjsnGdZ.js","assets/popover-s88DXvPL.js","assets/alert-dialog-BdWXpnme.js","assets/tabs-Cw5epDK7.js","assets/active-indicator-CCMhAsc_.js","assets/use-releases-2-Z6BMdW.js","assets/serial-task-queue-CGOeQgpr.js","assets/use-members-Cl1_-fx1.js","assets/use-org-auth-client-vWdVrvgR.js","assets/virtual-mcp-cTWrWR4Y.js","assets/url-slug-DU3tFMUC.js","assets/use-fast-preview-draft-url-BPrZ2XMf.js","assets/section-preview-url-7zfngvgW.js","assets/parse-sections-CigeyiXV.js","assets/index-CEnumkKh.js","assets/tool-namespace-DePiqr-m.js","assets/drawer-Bi1-udV5.js","assets/use-mobile-BAnIvR27.js","assets/use-mcp-prompts-BY0itm-N.js","assets/usage-stats-CKpL0uWf.js","assets/form-BGI3x6he.js","assets/utils-CVEq3hMx.js","assets/markdown-D_Bab0vD.js","assets/use-copy-C4LbXPXl.js","assets/format-time-Cq80KKvY.js","assets/differenceInSeconds-C3x8sHUj.js","assets/input-D1nDj3Gx.js","assets/icon-button-Du_O8eku.js","assets/file-type-icon-DYeFNgMs.js","assets/chat-draft-Dql_zG1A.js","assets/select-H4FJk0rp.js","assets/index-BdQq_4o_.js","assets/use-deco-credits-DhL8Ql0T.js","assets/toggle-group-BngkTNsG.js","assets/use-open-billing-url-Bewtr0D-.js","assets/index-BnbMIYQC.js","assets/checkbox-R6Pm_B33.js","assets/ai-providers-logos-DD3qZ33J.js","assets/input-D9vH1igB.js","assets/suggestion-Bu3BweEe.js","assets/use-org-fs-CxjQMzFd.js","assets/question-004-sINsf4GQ.js","assets/feature-paywall-BsVH1P4Z.js","assets/plan-ladder-CtR99jrd.js","assets/add-connection-dialog-BZwLO1Ja.js","assets/extract-connection-data-Bg9K46Rs.js","assets/metadata-D72DunRR.js","assets/connection-BXCm7RUN.js","assets/connection-card-DudSxk_f.js","assets/connection-slug-CITJ0kGN.js","assets/textarea-7I-DLD6x.js","assets/use-connection-HenJjVMr.js","assets/schema-ClGCzPdy.js","assets/connection-form-helpers-BCgvOrMH.js","assets/authenticate-and-persist-oauth-qcbNyaRp.js","assets/mcp-oauth-gJmjFND6.js","assets/mcp-oauth-Bv0ymH6e.js","assets/collection-tabs-DMsbicTn.js","assets/badge-BfMggcm8.js","assets/use-infinite-scroll-Ba0Xf9MO.js","assets/useSuspenseInfiniteQuery-CWvS_hOW.js","assets/use-task-board-events-CtQgceab.js","assets/use-chat-layout-state-CWI-mwQI.js","assets/input-Bwd_JSM8.css","assets/pair-v8_ULhan.js","assets/collapsible-BcZaehP2.js","assets/content-blocks-o63cs2vh.js","assets/mcp-app-renderer-C5DYTOzS.js","assets/types-CNU-uWw-.js","assets/omit-sandbox-map-jj4lCB2U.js","assets/sheet-DdrzSnyB.js","assets/use-thread-outputs-C38yfNsJ.js","assets/named-rule-uses-Bxr3PCeC.js","assets/secret-ciphertext-CKG2rzpX.js","assets/alert-DlpN1nbO.js","assets/device-hint-SeLRi17j.js","assets/editor-DAekV0he.js","assets/use-content-sync-C0CqYtRD.js","assets/hosted-publish-api-Cg6A3e6a.js","assets/hosted-publish-feedback-R86hK4rw.js","assets/save-changes-debug-nBi-n9eV.js","assets/sandbox-lifecycle-context-CCjKxqdS.js","assets/sandbox-start-errors-BK_aDCyt.js","assets/index-CqllmV-p.js","assets/use-sidebar-collapsed-NZNztmvG.js","assets/resizable-BySAwPSW.js","assets/agent-site-editor-DDGTF8rc.css","assets/agent-site-editor-content-BU-vFmu-.js","assets/agent-view-guard-Cz_9FSeB.js","assets/use-main-panel-tabs-BndsHuRH.js","assets/use-mcp-tools-Wkfd46Rr.js","assets/resolve-tab-icon-B7CsMGsC.js","assets/use-task-metadata-BBoC1uvX.js","assets/preview-source-BsRLGWUP.js","assets/use-project-native-view-presence-D4-BL2Rg.js","assets/match-site-slug-config-D3fUJ6vX.js","assets/use-file-configs-B_k4AoEo.js","assets/site-slug-DebpOoQq.js","assets/feature-gate-4u7sb4lR.js","assets/content-tab-B8CAyeYn.js","assets/blocks-tab-states-5tpSikld.js","assets/slider-tSRa1HDF.js","assets/index-BEaGR-Ng.js","assets/tooltipContext-B3bWUtmi.js","assets/CategoricalChart-BCAB1JR1.js","assets/index-DVxNOEMj.js","assets/ActiveShapeUtils-BB436TvV.js","assets/Sector-D64VY8hG.js","assets/symbol-CW0bfPL3.js","assets/empty-state-B4dSQMeM.js","assets/runnable-block-editor-Bod17qTV.js","assets/switch-BI2l0q9a.js","assets/scroll-area-BVZXqx5M.js","assets/monaco-editor-CVRVgXSh.js","assets/calendar-kdikRXDO.js","assets/editor-classes-BaBC2QPU.js","assets/core.esm-BmE_KURk.js","assets/sortable.esm-CE2eXOQU.js","assets/combobox-CEzxugDA.js","assets/search-input-BL6XGlmm.js","assets/asset-utils-CYj7sEud.js","assets/mustache-B20fDMb8.js","assets/date-utils-CrvIKg-s.js","assets/use-move-blocks-lN8kagdi.js","assets/empty-state-wXIjf_EN.js"])))=>i.map(i=>d[i]);
2
- import{k as O,l as N,m as V}from"./named-rule-view-pF5yBmDb.js";import{h as H}from"./named-rule-uses-Bxr3PCeC.js";import{aN as A,a_ as L}from"./parse-sections-CigeyiXV.js";import{aX as y,c as R,b as T,a2 as U,j as c,n as _}from"./index-BeWb3VLq.js";import{E as B}from"./empty-state-wXIjf_EN.js";import{u as K}from"./chat-context-BEyCIAaN.js";import{u as M,l as $}from"./site-editor-toast-C48kJZ8y.js";import{i as q,u as Q,S as G}from"./blocks-tab-states-5tpSikld.js";import{a as X}from"./use-panel-navigate-CXkMPISv.js";const P={running:0,everyone:1,off:2};function ae(s,e){const i=A(s,"experiments");if(i.kind==="conflict")return[];const o=e?.published??null;return Object.entries(i.values).map(([n,l],a)=>{const m=O(o,"experiments",n,l),x=m==="changed"?N(o,"experiments",n):void 0;return{order:a,row:{name:n,share:l,status:L(l),uses:e?H(e,"experiments",n):0,entryState:m,...x!==void 0?{publishedShare:x}:{}}}}).sort((n,l)=>P[n.row.status]-P[l.row.status]||n.order-l.order).map(n=>n.row)}function ce(s,e){return V(s,e?.published??null,"experiments")}function de(s){const e={contentPageVariant:s.focus?.pageVariant,contentSection:s.focus?.section,contentVariant:s.focus?.variant};return s.blockKind==="page"?{contentPageId:s.blockKey,contentCollection:void 0,contentItem:void 0,...e}:{contentPageId:void 0,contentCollection:"sections",contentItem:s.blockKey,...e}}let F=null;function z(){return F??=Promise.all([y(()=>import("./agent-site-editor-DGIssniL.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170])),y(()=>import("./agent-site-editor-content-BU-vFmu-.js"),__vite__mapDeps([171,1,2,172,173,146,5,4,6,7,8,9,11,12,13,14,15,16,17,38,39,40,41,42,43,44,29,36,45,46,47,37,48,49,50,30,51,52,53,54,55,56,57,58,59,60,61,62,35,63,64,135,174,152,105,26,98,3,10,18,19,20,21,99,75,76,100,79,101,102,103,104,71,106,107,108,109,110,111,112,33,34,65,66,67,68,69,70,72,73,74,77,78,80,81,82,83,113,25,114,115,87,88,116,117,118,119,120,121,85,122,123,124,125,91,92,126,127,128,129,130,131,94,132,133,134,136,137,138,139,140,141,142,143,144,145,147,148,149,150,151,153,154,155,31,27,175,176,177,178,179,180,181,93,182,183,184,185,186,187,188,189,190,191,192,97,24,28,32,193,194,166,157,158,195,196,197,160,198,199,200,201,202,86,203,204,205,161,165,206,207,208]))]).catch(s=>{throw F=null,s}),F}function J(s){return e=>{if(!e)return;const i=()=>{s().catch(()=>{})};if(typeof requestIdleCallback=="function"){const t=requestIdleCallback(i,{timeout:2e3});return()=>cancelIdleCallback(t)}const o=setTimeout(i,200);return()=>clearTimeout(o)}}const W=J(z);function I(s){const e=R.c(7),{icon:i,title:o,description:t,action:n}=s;let l;e[0]!==n?(l=n?{children:n.label,onClick:n.onClick}:void 0,e[0]=n,e[1]=l):l=e[1];let a;return e[2]!==t||e[3]!==i||e[4]!==l||e[5]!==o?(a=c.jsx(_,{children:c.jsx(_.Content,{children:c.jsx(_.Container,{children:c.jsx(B,{icon:i,title:o,description:t,buttonProps:l})})})}),e[2]=t,e[3]=i,e[4]=l,e[5]=o,e[6]=a):a=e[6],a}function ue(s){const e=R.c(28),{virtualMcpId:i,icon:o,copy:t,skeleton:n,children:l}=s,a=T(),{org:m}=U(),x=K(),p=x?.currentBranch??null,g=M(i,p),{openPanel:k}=X();if(!p){const r=t.noDraftTitle,v=t.noDraftDesc;let d;e[0]!==a?(d=a("sectionsEditor.namedRules.openEditor"),e[0]=a,e[1]=d):d=e[1];let u;e[2]!==k?(u=()=>k("content"),e[2]=k,e[3]=u):u=e[3];let f;e[4]!==d||e[5]!==u?(f={label:d,onClick:u},e[4]=d,e[5]=u,e[6]=f):f=e[6];let b;return e[7]!==t.noDraftDesc||e[8]!==t.noDraftTitle||e[9]!==o||e[10]!==f?(b=c.jsx(I,{icon:o,title:r,description:v,action:f}),e[7]=t.noDraftDesc,e[8]=t.noDraftTitle,e[9]=o,e[10]=f,e[11]=b):b=e[11],b}if(q(g)){let r;return e[12]===Symbol.for("react.memo_cache_sentinel")?(r=c.jsx(G,{}),e[12]=r):r=e[12],r}if(g.kind==="pending"){let r;return e[13]!==n?(r=c.jsx(c.Fragment,{children:n}),e[13]=n,e[14]=r):r=e[14],r}if(g.kind!=="protocol"){let r;return e[15]!==t.loadFailed||e[16]!==t.loadFailedHint||e[17]!==o?(r=c.jsx(I,{icon:o,title:t.loadFailed,description:t.loadFailedHint}),e[15]=t.loadFailed,e[16]=t.loadFailedHint,e[17]=o,e[18]=r):r=e[18],r}const S=x?.taskId??null;let h;return e[19]!==p||e[20]!==l||e[21]!==t||e[22]!==o||e[23]!==m.slug||e[24]!==n||e[25]!==S||e[26]!==i?(h=c.jsx(Y,{orgSlug:m.slug,virtualMcpId:i,branch:p,threadId:S,icon:o,copy:t,skeleton:n,children:l},p),e[19]=p,e[20]=l,e[21]=t,e[22]=o,e[23]=m.slug,e[24]=n,e[25]=S,e[26]=i,e[27]=h):h=e[27],h}function Y(s){const e=R.c(30),{orgSlug:i,virtualMcpId:o,branch:t,threadId:n,icon:l,copy:a,skeleton:m,children:x}=s,p=T();let g;e[0]!==t||e[1]!==i||e[2]!==n||e[3]!==o?(g={orgSlug:i,virtualMcpId:o,branch:t,threadId:n,previewUrl:null},e[0]=t,e[1]=i,e[2]=n,e[3]=o,e[4]=g):g=e[4];const k=g,S=$(k),h=Q(k),r=S.data,v=h.data;if(!r||!v){if(S.isError||h.isError){const b=a.loadFailed,w=a.loadFailedHint;let E;e[5]!==p?(E=p("sectionsEditor.namedRules.tryAgain"),e[5]=p,e[6]=E):E=e[6];let C;e[7]!==S||e[8]!==h?(C=()=>{S.refetch(),h.refetch()},e[7]=S,e[8]=h,e[9]=C):C=e[9];let D;e[10]!==E||e[11]!==C?(D={label:E,onClick:C},e[10]=E,e[11]=C,e[12]=D):D=e[12];let j;return e[13]!==a.loadFailed||e[14]!==a.loadFailedHint||e[15]!==l||e[16]!==D?(j=c.jsx(I,{icon:l,title:b,description:w,action:D}),e[13]=a.loadFailed,e[14]=a.loadFailedHint,e[15]=l,e[16]=D,e[17]=j):j=e[17],j}let f;return e[18]!==m?(f=c.jsx(c.Fragment,{children:m}),e[18]=m,e[19]=f):f=e[19],f}let d;e[20]!==t||e[21]!==x||e[22]!==r||e[23]!==v||e[24]!==i||e[25]!==n||e[26]!==o?(d=x({orgSlug:i,virtualMcpId:o,branch:t,threadId:n,decofile:r,meta:v}),e[20]=t,e[21]=x,e[22]=r,e[23]=v,e[24]=i,e[25]=n,e[26]=o,e[27]=d):d=e[27];let u;return e[28]!==d?(u=c.jsx("div",{className:"contents",ref:W,children:d}),e[28]=d,e[29]=u):u=e[29],u}export{ue as S,I as a,de as c,ae as e,ce as r};