decocms 4.541.0 → 4.542.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 (448) hide show
  1. package/dist/client/assets/{ActiveShapeUtils-HI4PJ-HL.js → ActiveShapeUtils-ppN64tl0.js} +1 -1
  2. package/dist/client/assets/{AlertCircle-Pu-QR8hS.js → AlertCircle-RV4AM_8y.js} +1 -1
  3. package/dist/client/assets/{AreaChart-DJ3vI97z.js → AreaChart-B5eHYCMZ.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-CiCYDVFq.js → ArrowLeft-XO66B9Td.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-bMBjrwqG.js → ArrowUp-DpQ-09y4.js} +1 -1
  6. package/dist/client/assets/{BarChart-DW5fB9sQ.js → BarChart-rvb3yNLn.js} +1 -1
  7. package/dist/client/assets/{Building02-BejNykWR.js → Building02-NRzC_IEp.js} +1 -1
  8. package/dist/client/assets/{CartesianChart-BfqGbR2p.js → CartesianChart-BVsrzbFJ.js} +1 -1
  9. package/dist/client/assets/{CategoricalChart-1g-OhB34.js → CategoricalChart-64zykerQ.js} +1 -1
  10. package/dist/client/assets/{CheckCircle-CiBrtkwP.js → CheckCircle-CfYD_Bi6.js} +1 -1
  11. package/dist/client/assets/{ChevronSelectorVertical-Bb_Zani-.js → ChevronSelectorVertical-C5MARPJN.js} +1 -1
  12. package/dist/client/assets/{ChevronUp-D3pnxmNi.js → ChevronUp-xR4eZngE.js} +1 -1
  13. package/dist/client/assets/{Copy01-BEOZtg79.js → Copy01-Dy1KrWO0.js} +1 -1
  14. package/dist/client/assets/{CreditCard01-C2H6wRye.js → CreditCard01-DVN26JVZ.js} +1 -1
  15. package/dist/client/assets/{DotsVertical-DddKhPwC.js → DotsVertical-CncVW4wJ.js} +1 -1
  16. package/dist/client/assets/{ErrorBarContext-CUSRsGW6.js → ErrorBarContext-C5dp8Quc.js} +1 -1
  17. package/dist/client/assets/{Globe04-CR7aWwIq.js → Globe04-BxFc3HLH.js} +1 -1
  18. package/dist/client/assets/{Image01-D9f6XNAl.js → Image01-CaawlkVR.js} +1 -1
  19. package/dist/client/assets/{Key01-BGQzZTLx.js → Key01-FaGRi3tG.js} +1 -1
  20. package/dist/client/assets/{Link01-_AjEk0aG.js → Link01-B_YWUHoH.js} +1 -1
  21. package/dist/client/assets/{LinkBroken01-BeLPonYT.js → LinkBroken01-z_Mm0CSf.js} +1 -1
  22. package/dist/client/assets/{Minus-DRtjDVr0.js → Minus-yAYwM_Ty.js} +1 -1
  23. package/dist/client/assets/{Monitor01-CMcPb3p-.js → Monitor01-Bl7f7T5L.js} +1 -1
  24. package/dist/client/assets/{Play-Bon9Nn-R.js → Play-OByKGnTy.js} +1 -1
  25. package/dist/client/assets/{Plus-DZ8OV5bq.js → Plus-Ccck99Do.js} +1 -1
  26. package/dist/client/assets/{ReferenceLine-CduNCTtx.js → ReferenceLine-BxNBuCjR.js} +1 -1
  27. package/dist/client/assets/{SearchMd-Coxjt-Zl.js → SearchMd-BAGHgvYw.js} +1 -1
  28. package/dist/client/assets/{Sector-CNB3zVjr.js → Sector-BCmuavOw.js} +1 -1
  29. package/dist/client/assets/{ShoppingBag01-CeVNpa4z.js → ShoppingBag01-BhoOjVkp.js} +1 -1
  30. package/dist/client/assets/{Sun-E-EbUc0n.js → Sun-CZRF_565.js} +1 -1
  31. package/dist/client/assets/{SwitchHorizontal01-B8-pBEhT.js → SwitchHorizontal01-Ce37vA9c.js} +1 -1
  32. package/dist/client/assets/{Tool01-CkZTily1.js → Tool01-CHLDtlIL.js} +1 -1
  33. package/dist/client/assets/{Trash01-C8OxhBl3.js → Trash01-BQBP0tUM.js} +1 -1
  34. package/dist/client/assets/{Upload01-Bt37Plwz.js → Upload01-D_q00M49.js} +1 -1
  35. package/dist/client/assets/{UserSquare-D7fSnIn3.js → UserSquare-BSsT3MHy.js} +1 -1
  36. package/dist/client/assets/{Users01-DVEy527M.js → Users01-C6bE7RDt.js} +1 -1
  37. package/dist/client/assets/{XClose-Bvl4KGPV.js → XClose-BjZnEBvF.js} +1 -1
  38. package/dist/client/assets/Zap-CHuT8W6R.js +1 -0
  39. package/dist/client/assets/{ZoomOut-9x8WuC5l.js → ZoomOut-CBOWQYet.js} +1 -1
  40. package/dist/client/assets/{access-gate-DaxHYIBB.js → access-gate-BU0Til0A.js} +1 -1
  41. package/dist/client/assets/{add-connection-dialog-CjJZP05X.js → add-connection-dialog-BB5lDWHR.js} +1 -1
  42. package/dist/client/assets/agent-analytics-DvRSJxx0.js +2 -0
  43. package/dist/client/assets/agent-app-B0uhmcWv.js +1 -0
  44. package/dist/client/assets/agent-assets-DtVY4a5g.js +1 -0
  45. package/dist/client/assets/{agent-automation-CI0Nub-n.js → agent-automation-DcUA7Zto.js} +2 -2
  46. package/dist/client/assets/agent-automations-C9tGxGRj.js +1 -0
  47. package/dist/client/assets/agent-calendar-D4_LWZH3.js +1 -0
  48. package/dist/client/assets/agent-connect-sources-BJ3ZDaf3.js +1 -0
  49. package/dist/client/assets/agent-deck-CACa1iZR.js +1 -0
  50. package/dist/client/assets/agent-e2e-Cn5SS6MS.js +1 -0
  51. package/dist/client/assets/agent-experiments-TwOhraCy.js +1 -0
  52. package/dist/client/assets/agent-file-W_Lb3P1H.js +1 -0
  53. package/dist/client/assets/agent-hosting-CP_GZV0j.js +1 -0
  54. package/dist/client/assets/agent-icon-nQ1AH9dU.js +1 -0
  55. package/dist/client/assets/agent-library-BvH-Q75b.js +1 -0
  56. package/dist/client/assets/agent-library-file-BC8zk1Dl.js +1 -0
  57. package/dist/client/assets/agent-monitor-UYQNblqG.js +1 -0
  58. package/dist/client/assets/agent-overview-BlaBQIjD.js +1 -0
  59. package/dist/client/assets/{agent-releases-CEzBKX-V.js → agent-releases-CAYqdnuz.js} +2 -2
  60. package/dist/client/assets/agent-settings-Lu1EqGNe.js +1 -0
  61. package/dist/client/assets/agent-site-editor-code-BAyfkSPu.js +2 -0
  62. package/dist/client/assets/agent-site-editor-content-CKgCOX3-.js +1 -0
  63. package/dist/client/assets/{agent-site-editor-Du4tKYJz.js → agent-site-editor-dBOL06nH.js} +2 -2
  64. package/dist/client/assets/agent-site-editor-preview-B9oFLAt2.js +1 -0
  65. package/dist/client/assets/agent-view-D-sscasX.js +1 -0
  66. package/dist/client/assets/{agent-view-guard-B04R8Znt.js → agent-view-guard-B4NqxjMv.js} +1 -1
  67. package/dist/client/assets/agents-list-DYMJQcr6.js +1 -0
  68. package/dist/client/assets/{ai-providers-aETP-f64.js → ai-providers-Ci2k4cWf.js} +1 -1
  69. package/dist/client/assets/{alert-BF8n9shl.js → alert-Bsjmz-OK.js} +1 -1
  70. package/dist/client/assets/{analytics-sections-SZXfO52-.js → analytics-sections-Nw_65a4t.js} +1 -1
  71. package/dist/client/assets/{api-keys-CiBjRrwV.js → api-keys-D4BF_tKg.js} +1 -1
  72. package/dist/client/assets/api-keys-D_tuzPJP.js +1 -0
  73. package/dist/client/assets/app-editor-hRLD7Ehq.js +1 -0
  74. package/dist/client/assets/{asset-utils-7zQmpZtP.js → asset-utils-BSDCnt-j.js} +1 -1
  75. package/dist/client/assets/{auth-Dt9DGFhA.js → auth-CK6AyRu5.js} +1 -1
  76. package/dist/client/assets/{auth-catchall-APuNzDqf.js → auth-catchall-CJTrtQsq.js} +1 -1
  77. package/dist/client/assets/{auth-entry-Dt8D4c49.js → auth-entry-CPeTN7o5.js} +1 -1
  78. package/dist/client/assets/{auth-split-layout-DKGBUJmn.js → auth-split-layout-BGf8-EnP.js} +1 -1
  79. package/dist/client/assets/{authenticate-and-persist-oauth-CzFtziag.js → authenticate-and-persist-oauth-Bb8BBbsA.js} +1 -1
  80. package/dist/client/assets/automation-list-row-B9IR9kWn.js +1 -0
  81. package/dist/client/assets/{automation-runs-rp2R5GSb.js → automation-runs-DnR9pxm5.js} +1 -1
  82. package/dist/client/assets/automations-Bxg30h3H.js +1 -0
  83. package/dist/client/assets/{autosend-BYljpA5c.js → autosend-DTWIjCgK.js} +1 -1
  84. package/dist/client/assets/{badge-CMgWUKiX.js → badge-BV7rxTvN.js} +1 -1
  85. package/dist/client/assets/{block-document-ClAOKgf4.js → block-document-CQARMaA2.js} +3 -3
  86. package/dist/client/assets/{blocks-preview-workspace-context-DQj4RBd8.js → blocks-preview-workspace-context-C2nnj0H9.js} +1 -1
  87. package/dist/client/assets/{blocks-tab-states-CQydf1x6.js → blocks-tab-states-DhR3pyff.js} +1 -1
  88. package/dist/client/assets/{blog-schema-BOqVZaeF.js → blog-schema-YJUL-tEX.js} +1 -1
  89. package/dist/client/assets/{buckets-qwGMsdZj.js → buckets-C4JU-8qW.js} +1 -1
  90. package/dist/client/assets/{build-improve-prompt-doc-B2MxMIfa.js → build-improve-prompt-doc-Bv3kayMV.js} +1 -1
  91. package/dist/client/assets/{calendar-gk2fXc2c.js → calendar-ym6zGcEl.js} +1 -1
  92. package/dist/client/assets/{capability-load-error-D2UF4Aw2.js → capability-load-error-7V5aWr5c.js} +1 -1
  93. package/dist/client/assets/category-editor-CdId4wR5.js +1 -0
  94. package/dist/client/assets/{cdn-tab-BJ_vvsuv.js → cdn-tab-2DyF7VRR.js} +1 -1
  95. package/dist/client/assets/{chart-orNTiDQv.js → chart-eh3rIFzp.js} +1 -1
  96. package/dist/client/assets/{chat-context-Cbn1d2gD.js → chat-context-kqrW-XPR.js} +1 -1
  97. package/dist/client/assets/{chat-draft-Dz-8ZkTL.js → chat-draft-CRTo5XoS.js} +1 -1
  98. package/dist/client/assets/{checkbox-CA6aWe75.js → checkbox-aDQexY19.js} +1 -1
  99. package/dist/client/assets/choose-editor-D9t0sU_N.js +1 -0
  100. package/dist/client/assets/{cli-auth-success-BwZvMY9K.js → cli-auth-success-BSvz1123.js} +1 -1
  101. package/dist/client/assets/{client-icons-BokFUC05.js → client-icons-DGnfsAP4.js} +1 -1
  102. package/dist/client/assets/cms-settings-editor-BCSWQ-Po.js +1 -0
  103. package/dist/client/assets/{collapsible-DMa5aTxw.js → collapsible-Cx6KFD5C.js} +1 -1
  104. package/dist/client/assets/collection-detail-ZxhaHEpw.js +1 -0
  105. package/dist/client/assets/{collection-display-button-CO0G5HBN.js → collection-display-button-Bswg3uCR.js} +1 -1
  106. package/dist/client/assets/{collection-search-BtpA2Lei.js → collection-search-B3vfcK1n.js} +1 -1
  107. package/dist/client/assets/{collection-table-wrapper-zNmZhsyo.js → collection-table-wrapper-Cs4FMkXQ.js} +1 -1
  108. package/dist/client/assets/{collection-tabs-CSXR7UYb.js → collection-tabs-BdhCjBRd.js} +1 -1
  109. package/dist/client/assets/{combobox-BwKhFDqj.js → combobox-DXDZmm8e.js} +1 -1
  110. package/dist/client/assets/{command-lP5P8rqX.js → command-De9pJLwH.js} +1 -1
  111. package/dist/client/assets/{companion-mcps-section-CvFB8u3v.js → companion-mcps-section-B-ueLE1c.js} +1 -1
  112. package/dist/client/assets/{config-B8-1YX-t.js → config-Bakd4Y8w.js} +1 -1
  113. package/dist/client/assets/{connect-D2iiXOSY.js → connect-BMYdSTT8.js} +1 -1
  114. package/dist/client/assets/{connect-layout-HGVTLejY.js → connect-layout-BpMetD5F.js} +1 -1
  115. package/dist/client/assets/{connect-source-dialog-DXGOBfjT.js → connect-source-dialog-BkUskMwn.js} +1 -1
  116. package/dist/client/assets/{connection-Cn9FrEsZ.js → connection-C-NllGni.js} +1 -1
  117. package/dist/client/assets/{connection-card-DlWLwRKA.js → connection-card-DZD_rAWh.js} +1 -1
  118. package/dist/client/assets/connection-detail-BRz9FZ83.js +1 -0
  119. package/dist/client/assets/{connection-form-helpers-DdDJu97E.js → connection-form-helpers-DmavsUyJ.js} +1 -1
  120. package/dist/client/assets/connections-Cj6HJEn1.js +1 -0
  121. package/dist/client/assets/{content-tab-B-LNJbd9.js → content-tab-DkKuIDyy.js} +8 -8
  122. package/dist/client/assets/context-C2r290S4.js +1 -0
  123. package/dist/client/assets/{context-menu-gvTbM_VP.js → context-menu-CiH3Gj0R.js} +1 -1
  124. package/dist/client/assets/{context-shell-BdVWw-gN.js → context-shell-BwT70eIn.js} +3 -3
  125. package/dist/client/assets/{core.esm-M1IJOkIH.js → core.esm-DQyn-kJS.js} +1 -1
  126. package/dist/client/assets/{create-organization-dialog-DNvzT5i-.js → create-organization-dialog-CiZys2Ku.js} +1 -1
  127. package/dist/client/assets/{daily-pulse-DOHhxMy1.js → daily-pulse-CMy69HGI.js} +1 -1
  128. package/dist/client/assets/discover-DQ9dXI7n.js +1 -0
  129. package/dist/client/assets/{domain-settings-DRphZ3mS.js → domain-settings-5g_MWfwe.js} +1 -1
  130. package/dist/client/assets/{drawer-Bsnw19SA.js → drawer-DDmudFbW.js} +1 -1
  131. package/dist/client/assets/{editor-Z7h3tdjo.js → editor-BqqnxL88.js} +1 -1
  132. package/dist/client/assets/{editor-classes-CIysMLqw.js → editor-classes-D-ez-qBv.js} +1 -1
  133. package/dist/client/assets/{empty-state-CEJi6IVu.js → empty-state-C7LII3ZM.js} +1 -1
  134. package/dist/client/assets/{empty-state-EpAwETL4.js → empty-state-iEpXVBwd.js} +1 -1
  135. package/dist/client/assets/{experiments-tab-BKBmpbQS.js → experiments-tab-DGo_lvyv.js} +1 -1
  136. package/dist/client/assets/{experiments-tab-choice-EKyQNqty.js → experiments-tab-choice-B_rL9_Nx.js} +1 -1
  137. package/dist/client/assets/{extract-connection-data-CGOVIYLF.js → extract-connection-data-DYwFbKkm.js} +1 -1
  138. package/dist/client/assets/{feature-gate-DXCleAqA.js → feature-gate-E1LoWMx3.js} +1 -1
  139. package/dist/client/assets/{feature-paywall-4QJAn2z5.js → feature-paywall-CDMJv8wq.js} +1 -1
  140. package/dist/client/assets/file-explorer-CsD267WS.js +2 -0
  141. package/dist/client/assets/{file-preview-CCmllyvi.js → file-preview-Cj5pBQv2.js} +1 -1
  142. package/dist/client/assets/{file-share-button-DbPRyXAD.js → file-share-button-DOup2WzD.js} +1 -1
  143. package/dist/client/assets/{file-type-icon-CiMMiUYO.js → file-type-icon-BgzyV542.js} +1 -1
  144. package/dist/client/assets/folder-icon-DY3kBxQc.js +1 -0
  145. package/dist/client/assets/{form-Bk9ymCIS.js → form-gDNfP07W.js} +1 -1
  146. package/dist/client/assets/{general-Cr_ASK52.js → general-CWpdg4Hl.js} +1 -1
  147. package/dist/client/assets/{github-icon-EmEurWMX.js → github-icon-DAxkwypb.js} +1 -1
  148. package/dist/client/assets/{held-block-view-BDu8bj-6.js → held-block-view-C3Ird9F-.js} +3 -3
  149. package/dist/client/assets/home-TaMnsEq5.js +1 -0
  150. package/dist/client/assets/{hosted-publish-feedback-C3S_f767.js → hosted-publish-feedback-CVQKURab.js} +1 -1
  151. package/dist/client/assets/{icon-button-CcHZO8e6.js → icon-button-CTmBGRaQ.js} +1 -1
  152. package/dist/client/assets/{index-DMJwbqhe.js → index-15xKR9ar.js} +1 -1
  153. package/dist/client/assets/{index-LISCRMKT.js → index-BWpKrclg.js} +5 -5
  154. package/dist/client/assets/{index-BaOc9Ezz.js → index-C-GH7ZUH.js} +1 -1
  155. package/dist/client/assets/{index-CcyUawfW.js → index-CFDA2Gyk.js} +1 -1
  156. package/dist/client/assets/{index-BGKyyvyC.js → index-CXhEXTV0.js} +1 -1
  157. package/dist/client/assets/{index-DGAfs5q1.js → index-Cbe7caeT.js} +1 -1
  158. package/dist/client/assets/{index-Bd1JsEWx.js → index-Cjtut9JA.js} +1 -1
  159. package/dist/client/assets/{index-CRt26OMk.js → index-CzqNFJgA.js} +1 -1
  160. package/dist/client/assets/{index-Bek871Hp.js → index-D3fuewCp.js} +1 -1
  161. package/dist/client/assets/{index-DvPTtoj9.js → index-DGoeX32I.js} +1 -1
  162. package/dist/client/assets/{index-DMN6-ViK.js → index-DKRm_nGH.js} +2 -2
  163. package/dist/client/assets/{index-D_GgrLpt.js → index-G8_ivZDF.js} +1 -1
  164. package/dist/client/assets/{index-KxuowPl9.js → index-Qn_AZuwz.js} +1 -1
  165. package/dist/client/assets/index-_wqQ3Hkr.css +1 -0
  166. package/dist/client/assets/{index-KpWMq2p9.js → index-lchr3O79.js} +1 -1
  167. package/dist/client/assets/{index-redirect-C_c-8-0u.js → index-redirect-COc2iMJs.js} +1 -1
  168. package/dist/client/assets/{index-Rjs_bdr_.js → index-ylByMMZI.js} +1 -1
  169. package/dist/client/assets/{infiniteQueryObserver-DGdbL4U6.js → infiniteQueryObserver-CbIPWgZj.js} +1 -1
  170. package/dist/client/assets/{infra-billing-CkpqPi0H.js → infra-billing-gMBDswwS.js} +1 -1
  171. package/dist/client/assets/{input-Cgw3HqQu.js → input-Cf50b9sU.js} +3 -3
  172. package/dist/client/assets/{input-BhbajINs.js → input-CgS5sNmj.js} +1 -1
  173. package/dist/client/assets/{integration-icon-msZhQ6E3.js → integration-icon-BQ9jVlvt.js} +1 -1
  174. package/dist/client/assets/{jira-icon-C8kN-yG2.js → jira-icon-CzGOnWKo.js} +1 -1
  175. package/dist/client/assets/{label-BfYbFBpZ.js → label-DzRNwB_s.js} +1 -1
  176. package/dist/client/assets/{layout-DFaNAdKK.js → layout-d2_2jbV9.js} +1 -1
  177. package/dist/client/assets/{legacy-agents-deep-BQflSkhZ.js → legacy-agents-deep-CyFzwt79.js} +1 -1
  178. package/dist/client/assets/{legacy-main-redirect-DaGWGhtf.js → legacy-main-redirect-B0hY-Z0B.js} +1 -1
  179. package/dist/client/assets/library-CS74d8fl.js +1 -0
  180. package/dist/client/assets/{library-tab-4UasD5Mp.js → library-tab-cQd24fFO.js} +3 -3
  181. package/dist/client/assets/{login-DtccMmUF.js → login-BB7FreRC.js} +1 -1
  182. package/dist/client/assets/{markdown-CGLGjJUn.js → markdown-CkZaCBow.js} +1 -1
  183. package/dist/client/assets/{mcp-app-renderer-BmH0oH65.js → mcp-app-renderer-BVLr3WK6.js} +1 -1
  184. package/dist/client/assets/{mcp-oauth-CDHHl2AY.js → mcp-oauth-DWlxkjKx.js} +1 -1
  185. package/dist/client/assets/{mcp-oauth-D5bTwzBt.js → mcp-oauth-KJGfGjkD.js} +1 -1
  186. package/dist/client/assets/{members-CqaIW0DL.js → members-BvQ1xqU5.js} +1 -1
  187. package/dist/client/assets/{memory-DoZ_Hb59.js → memory-_Oguj4if.js} +1 -1
  188. package/dist/client/assets/{mini-report-page-CWBsLXpy.js → mini-report-page-BC7L0ipE.js} +1 -1
  189. package/dist/client/assets/mock-board-BC3rEvaU.js +81 -0
  190. package/dist/client/assets/{monaco-editor-B_hB8uvI.js → monaco-editor-zzUPRyBn.js} +1 -1
  191. package/dist/client/assets/monitoring-ilB7hU6H.js +1 -0
  192. package/dist/client/assets/{monitoring-stats-row-va93h-kh.js → monitoring-stats-row-DZ9HvRuy.js} +1 -1
  193. package/dist/client/assets/{multi-select-DqoGBuJR.js → multi-select-D2pKycte.js} +1 -1
  194. package/dist/client/assets/{mustache-YJnhKKzZ.js → mustache-BBgPaDqo.js} +1 -1
  195. package/dist/client/assets/{named-rule-uses-B5UiiWoJ.js → named-rule-uses-8PEXqP7W.js} +1 -1
  196. package/dist/client/assets/{new-project-dialog-BrtI6GgZ.js → new-project-dialog-Dd5pVssc.js} +1 -1
  197. package/dist/client/assets/{oauth-callback-DvCUGRkg.js → oauth-callback-DIj2YLwh.js} +1 -1
  198. package/dist/client/assets/{oauth-callback-ai-provider-IxBLpV6t.js → oauth-callback-ai-provider-zp6PPNfP.js} +1 -1
  199. package/dist/client/assets/{onboarding-CqirqsHd.js → onboarding-CSUeJ8OK.js} +1 -1
  200. package/dist/client/assets/openai-conversation-CT9LWWrS.js +3 -0
  201. package/dist/client/assets/{optimistic-project-sidebar-views-CPWt9LH6.js → optimistic-project-sidebar-views-BhoNMrVo.js} +1 -1
  202. package/dist/client/assets/{order-monitor-day-or-R9J0S.js → order-monitor-day-D-Ti4NDE.js} +1 -1
  203. package/dist/client/assets/{organization-choice-CeZ3suN4.js → organization-choice-Bs2Llr3r.js} +1 -1
  204. package/dist/client/assets/{orgs-iTHfKpGx.js → orgs-Bs_15YVG.js} +1 -1
  205. package/dist/client/assets/{page-seo-form-CdFLhDD2.js → page-seo-form-DizfAl8r.js} +1 -1
  206. package/dist/client/assets/{pair-B_hske_9.js → pair-BFVxcKKp.js} +1 -1
  207. package/dist/client/assets/{parse-sections-rTJ9Vxva.js → parse-sections-BVn3AvAz.js} +1 -1
  208. package/dist/client/assets/plan-_57doTJd.js +1 -0
  209. package/dist/client/assets/{plan-ladder-ROI7a8rc.js → plan-ladder-DVSwNgR2.js} +1 -1
  210. package/dist/client/assets/{plan-usage-card-DmpNxqNF.js → plan-usage-card-B64WjIMI.js} +1 -1
  211. package/dist/client/assets/{popover-D6dCz_8d.js → popover-ClEv7Zyf.js} +1 -1
  212. package/dist/client/assets/post-calendar-CMHuZuip.js +1 -0
  213. package/dist/client/assets/{post-editor-C9guOY0S.js → post-editor-CqgW2_fW.js} +2 -2
  214. package/dist/client/assets/{preview-content-DFI0aQf4.js → preview-content-BSsfQ6ZE.js} +1 -1
  215. package/dist/client/assets/{preview-dialog-D2HjzZ1B.js → preview-dialog-DBnDC8gE.js} +1 -1
  216. package/dist/client/assets/{preview-panel-0VJe1FDB.js → preview-panel-DQBuS4_f.js} +1 -1
  217. package/dist/client/assets/{preview-tab-CpG9tuu6.js → preview-tab-_86kIh0E.js} +3 -3
  218. package/dist/client/assets/{product-picker-dialog-CFjl9WR-.js → product-picker-dialog-C8oMVTn6.js} +1 -1
  219. package/dist/client/assets/{profile-CY0p7UGQ.js → profile-Bsx5sLNH.js} +1 -1
  220. package/dist/client/assets/project-app-view-C5QghQe6.js +1 -0
  221. package/dist/client/assets/project-apps-oe6VMb11.js +1 -0
  222. package/dist/client/assets/{project-feed-Cqb3oD2R.js → project-feed-DAjFP_Ib.js} +1 -1
  223. package/dist/client/assets/{project-icon-As9MoCET.js → project-icon-BKeF243f.js} +1 -1
  224. package/dist/client/assets/project-reports-uzkOMqSE.js +1 -0
  225. package/dist/client/assets/project-tasks-jNTlksUk.js +1 -0
  226. package/dist/client/assets/projects-BaKJExhs.js +1 -0
  227. package/dist/client/assets/{projects-empty-state-B4wHwi2Z.js → projects-empty-state-B_kHw_MZ.js} +1 -1
  228. package/dist/client/assets/{prompts-f4GajLV5.js → prompts-Br3MvaH9.js} +1 -1
  229. package/dist/client/assets/record-editor-B5oAS_5D.js +1 -0
  230. package/dist/client/assets/redirect-editor-CSg_SJ3I.js +1 -0
  231. package/dist/client/assets/{releases-api-kH_Ed6eO.js → releases-api-DwHPczFb.js} +1 -1
  232. package/dist/client/assets/reports-CL4pYm69.js +1 -0
  233. package/dist/client/assets/{reports-D2UCpDap.js → reports-iqRQlH1z.js} +1 -1
  234. package/dist/client/assets/reports-onboarding-Bm9Wvkaq.js +1 -0
  235. package/dist/client/assets/reports-tab-DesQ1SQx.js +2 -0
  236. package/dist/client/assets/repositories-C-WO-gxz.js +1 -0
  237. package/dist/client/assets/{repositories-DzOMkV9O.js → repositories-DUBWep32.js} +1 -1
  238. package/dist/client/assets/{repository-binding-N72ZtnJ7.js → repository-binding-Bpq6heaQ.js} +1 -1
  239. package/dist/client/assets/{repository-import-picker-CNVRTxph.js → repository-import-picker-DxJJpcCz.js} +1 -1
  240. package/dist/client/assets/{repository-picker-CW0SaV-m.js → repository-picker-P8Asvsk4.js} +1 -1
  241. package/dist/client/assets/{require-capability-C2GXhzLq.js → require-capability-B-uxpRvL.js} +1 -1
  242. package/dist/client/assets/{required-auth-layout-BwkU_8aI.js → required-auth-layout-DYZU5vk_.js} +1 -1
  243. package/dist/client/assets/{reset-password-gBMO6F0r.js → reset-password-Bs_JmNWK.js} +1 -1
  244. package/dist/client/assets/{resizable-WR3fdR8J.js → resizable-vbjrp9Su.js} +1 -1
  245. package/dist/client/assets/{resolve-tab-icon-DS-pAijm.js → resolve-tab-icon-CzFxm7IQ.js} +1 -1
  246. package/dist/client/assets/{review-settings-DcaJvbTX.js → review-settings-CsHCgNLm.js} +1 -1
  247. package/dist/client/assets/roles-C-6Op6OQ.js +1 -0
  248. package/dist/client/assets/route-Bdui6QXz.js +1 -0
  249. package/dist/client/assets/route-BlJ-TDEK.js +1 -0
  250. package/dist/client/assets/route-Cr42SuLO.js +1 -0
  251. package/dist/client/assets/{sandbox-lifecycle-context-BBDd5Vd6.js → sandbox-lifecycle-context-D9eDp86x.js} +1 -1
  252. package/dist/client/assets/{schema-cjQbFYEA.js → schema-Cd1llToh.js} +1 -1
  253. package/dist/client/assets/{schema-C2dfCTpF.js → schema-DzZBw0EW.js} +1 -1
  254. package/dist/client/assets/{scroll-area-DYvdRQ3X.js → scroll-area-CwuazZb5.js} +1 -1
  255. package/dist/client/assets/{search-input-DfJJHgak.js → search-input-D2iQ_3lu.js} +1 -1
  256. package/dist/client/assets/{search-toggle-K39LDgc3.js → search-toggle-Cw7hl_Xx.js} +1 -1
  257. package/dist/client/assets/{secret-picker-COEpc_Br.js → secret-picker-Ct1DoTR9.js} +1 -1
  258. package/dist/client/assets/{secrets-DpnxLirI.js → secrets-CBPyw7ba.js} +1 -1
  259. package/dist/client/assets/{section-array-field-cPwKvhUj.js → section-array-field-BXLl3jB0.js} +1 -1
  260. package/dist/client/assets/{sections-DQYOsFQr.js → sections-DRD1aU5D.js} +1 -1
  261. package/dist/client/assets/sections-editor-B628EbZ4.js +1 -0
  262. package/dist/client/assets/{select-Ce8n-RXJ.js → select-BMteQTWS.js} +1 -1
  263. package/dist/client/assets/{select-model-DrlCeL1J.js → select-model-ujDDmA_R.js} +1 -1
  264. package/dist/client/assets/seo-editor-nXgc_X38.js +1 -0
  265. package/dist/client/assets/{separator-CMPRlDqA.js → separator-l2LsOpLi.js} +1 -1
  266. package/dist/client/assets/settings-tab-Cj4D3Abl.js +1 -0
  267. package/dist/client/assets/{sheet-C1Iz_daC.js → sheet-BW-FxyJZ.js} +1 -1
  268. package/dist/client/assets/shell-layout-BbFvnpcf.js +1 -0
  269. package/dist/client/assets/{site-draft-actions-Cwq-m4rQ.js → site-draft-actions-9GNFURGo.js} +1 -1
  270. package/dist/client/assets/{site-draft-view-BGk8W1nm.js → site-draft-view-DhCorNAk.js} +2 -2
  271. package/dist/client/assets/site-editor-8rMP2pUf.js +1 -0
  272. package/dist/client/assets/{site-editor-toast-BZwEeugO.js → site-editor-toast-QHleRFN5.js} +1 -1
  273. package/dist/client/assets/skills-ApZ_uT4M.js +1 -0
  274. package/dist/client/assets/{slider-BRlhk1I_.js → slider-DtzvJZ1j.js} +1 -1
  275. package/dist/client/assets/{sortable.esm-DfWQuMf-.js → sortable.esm-DNzjY6xb.js} +1 -1
  276. package/dist/client/assets/{sso-Bl0_X14P.js → sso-Con6Y9JD.js} +1 -1
  277. package/dist/client/assets/{suggestion-C79o6bsf.js → suggestion-BgdlUdcB.js} +1 -1
  278. package/dist/client/assets/{switch-B5fLkk4G.js → switch-Bv0wLEBx.js} +1 -1
  279. package/dist/client/assets/{symbol-AaQxOm0Y.js → symbol-CJoI4vsX.js} +1 -1
  280. package/dist/client/assets/{synced-repos-Bes2Akem.js → synced-repos-Bdx0Lzti.js} +1 -1
  281. package/dist/client/assets/{tab-icon-glyph-X9RKDulT.js → tab-icon-glyph-CSlj-TVq.js} +1 -1
  282. package/dist/client/assets/{table-CR0vxly9.js → table-CheWM6KL.js} +1 -1
  283. package/dist/client/assets/{tabs-BeQ3GpBj.js → tabs-CjWwohzM.js} +1 -1
  284. package/dist/client/assets/{task-assignee-avatar-BxtkZ6j_.js → task-assignee-avatar-DwSiTsoy.js} +1 -1
  285. package/dist/client/assets/{task-board-DfACAZyY.js → task-board-L6ZGzY-s.js} +1 -1
  286. package/dist/client/assets/{task-route-CEMyrZwM.js → task-route-D7Tzzgt_.js} +1 -1
  287. package/dist/client/assets/{task-status-CwtxChqi.js → task-status-FHJjKh4u.js} +1 -1
  288. package/dist/client/assets/taskboard-analytics-kV8i_37N.js +1 -0
  289. package/dist/client/assets/{tasks-5giK8VZS.js → tasks-3fvPlwxK.js} +3 -3
  290. package/dist/client/assets/tasks-BImUOCfZ.js +1 -0
  291. package/dist/client/assets/{textarea-1B6eWYpg.js → textarea-BNvvIWSZ.js} +1 -1
  292. package/dist/client/assets/thread-analytics-DOn_63z0.js +1 -0
  293. package/dist/client/assets/{thread-intent-ptqgtSKo.js → thread-intent-DjvP3GsU.js} +1 -1
  294. package/dist/client/assets/thread-route-B3uNqVbb.js +1 -0
  295. package/dist/client/assets/{thread-route-CCN9I68_.js → thread-route-BOOkt7de.js} +1 -1
  296. package/dist/client/assets/{thread-sheet-body-Opalk3rB.js → thread-sheet-body-sjcfE700.js} +1 -1
  297. package/dist/client/assets/{time-range-picker-D-3pTVaL.js → time-range-picker-BostqQTB.js} +1 -1
  298. package/dist/client/assets/{toggle-group-DhjHoFhg.js → toggle-group-BAFBdL9F.js} +1 -1
  299. package/dist/client/assets/{tool-namespace-EPn7Kyb1.js → tool-namespace-CG1Oreso.js} +1 -1
  300. package/dist/client/assets/{toolbar-icon-button-DOtu5VNi.js → toolbar-icon-button-CnXJyVJt.js} +1 -1
  301. package/dist/client/assets/{tooltip-DiW2ytsS.js → tooltip-D2ANqV2w.js} +1 -1
  302. package/dist/client/assets/{tooltipContext-Boh-kskS.js → tooltipContext-DvKfbID4.js} +1 -1
  303. package/dist/client/assets/{track-DDsr4-8X.js → track-BA-6upge.js} +1 -1
  304. package/dist/client/assets/{types-CAqly_33.js → types-BNmsSext.js} +1 -1
  305. package/dist/client/assets/{url-slug-BimzZyel.js → url-slug-DcB6_J0W.js} +1 -1
  306. package/dist/client/assets/{usage-stats-DyqnqVDM.js → usage-stats-I2nqy87E.js} +1 -1
  307. package/dist/client/assets/{use-ai-providers-DGRaKYBP.js → use-ai-providers-BcLfhqAn.js} +1 -1
  308. package/dist/client/assets/{use-apply-named-rule-TltIMgYp.js → use-apply-named-rule-CdtINk0A.js} +1 -1
  309. package/dist/client/assets/{use-automations-DcNzV0FS.js → use-automations-DX8SlLEI.js} +1 -1
  310. package/dist/client/assets/{use-autosave-DQJxV1eg.js → use-autosave-c4cGzjJa.js} +1 -1
  311. package/dist/client/assets/{use-chat-layout-state-lg3L3DSm.js → use-chat-layout-state-CyqukwDV.js} +1 -1
  312. package/dist/client/assets/{use-clock-tick-BXkjZk4h.js → use-clock-tick-CXtcWsca.js} +1 -1
  313. package/dist/client/assets/{use-cms-publish-actions-Cg-2YJOJ.js → use-cms-publish-actions-BDOdjoX5.js} +1 -1
  314. package/dist/client/assets/{use-connect-companion-FMSyv7iG.js → use-connect-companion-pjD5dMZl.js} +1 -1
  315. package/dist/client/assets/{use-connection-DZPkoV0a.js → use-connection-CZNQu-z2.js} +1 -1
  316. package/dist/client/assets/{use-copy-Bb3ge3Jw.js → use-copy-Bq-mz0ld.js} +1 -1
  317. package/dist/client/assets/{use-create-virtual-mcp-CFxxMtOW.js → use-create-virtual-mcp-BVwiobb2.js} +1 -1
  318. package/dist/client/assets/{use-date-fns-locale-DTg1snyT.js → use-date-fns-locale-CLYhNSnw.js} +1 -1
  319. package/dist/client/assets/{use-debounced-autosave-DKsafE_B.js → use-debounced-autosave-Cxe8yde_.js} +1 -1
  320. package/dist/client/assets/{use-debounced-value-DBl2u8Ax.js → use-debounced-value-CqLWq6L2.js} +1 -1
  321. package/dist/client/assets/{use-deco-credits-CHyZsaQg.js → use-deco-credits-C26dK60_.js} +1 -1
  322. package/dist/client/assets/{use-decopilot-events-ChnGZu8F.js → use-decopilot-events-Dg011Qgn.js} +1 -1
  323. package/dist/client/assets/{use-delete-connection-Txpqn3lI.js → use-delete-connection-DzeFDNj4.js} +1 -1
  324. package/dist/client/assets/{use-deployment-admin-Do6VU3ed.js → use-deployment-admin-COukxauw.js} +1 -1
  325. package/dist/client/assets/{use-entitlements-9vbVfq68.js → use-entitlements-Bxptpo8e.js} +1 -1
  326. package/dist/client/assets/{use-fast-preview-draft-url-CXQ7cT85.js → use-fast-preview-draft-url-DWrGmO4E.js} +1 -1
  327. package/dist/client/assets/{use-file-configs-Dn7YLM4Z.js → use-file-configs-DAoix9gu.js} +1 -1
  328. package/dist/client/assets/{use-inbox-feed-BZyJNQXN.js → use-inbox-feed-CEHyMhUC.js} +1 -1
  329. package/dist/client/assets/{use-infinite-scroll-CB0WyAlc.js → use-infinite-scroll-CojsIRJO.js} +1 -1
  330. package/dist/client/assets/{use-join-requests-CW_FogGu.js → use-join-requests-GMVGPaSk.js} +1 -1
  331. package/dist/client/assets/{use-main-panel-tabs-BtH_KnVM.js → use-main-panel-tabs-DXx3VvH2.js} +1 -1
  332. package/dist/client/assets/{use-mcp-auth-status-CKDFCOAa.js → use-mcp-auth-status-CvV54_ol.js} +1 -1
  333. package/dist/client/assets/{use-mcp-client-0e8NRgfT.js → use-mcp-client-zIBQco5Q.js} +1 -1
  334. package/dist/client/assets/{use-mcp-prompts-B2c7TGKV.js → use-mcp-prompts-XayY9yfQ.js} +1 -1
  335. package/dist/client/assets/{use-mcp-tools-BWk4AICK.js → use-mcp-tools-BmZF8fTN.js} +1 -1
  336. package/dist/client/assets/{use-mobile-BJBInbLU.js → use-mobile-CoPLJ8cu.js} +1 -1
  337. package/dist/client/assets/{use-move-blocks-sjThA1Ew.js → use-move-blocks-Ck5rS_vn.js} +1 -1
  338. package/dist/client/assets/{use-navigate-to-agent-CpRnIp1k.js → use-navigate-to-agent-DqWY18b4.js} +1 -1
  339. package/dist/client/assets/{use-org-fs-B8r-1D4b.js → use-org-fs-B4wvUwJj.js} +1 -1
  340. package/dist/client/assets/{use-org-repo-syncs-Dq0Qf-et.js → use-org-repo-syncs-D-0WnIj6.js} +1 -1
  341. package/dist/client/assets/{use-org-sso-DVHlBcmx.js → use-org-sso-sTi3oL5_.js} +1 -1
  342. package/dist/client/assets/{use-organization-roles-DYmDerrq.js → use-organization-roles-DXXkhsvq.js} +1 -1
  343. package/dist/client/assets/{use-organization-settings-CK8r9oqu.js → use-organization-settings-D_5fr-OI.js} +1 -1
  344. package/dist/client/assets/{use-panel-navigate-CnrhnUVG.js → use-panel-navigate-nriEb2Qz.js} +1 -1
  345. package/dist/client/assets/{use-project-native-view-presence-DnAEbSTa.js → use-project-native-view-presence-Bdl4n5BM.js} +1 -1
  346. package/dist/client/assets/{use-project-scope-LiKIXaiK.js → use-project-scope-CdqclLu1.js} +1 -1
  347. package/dist/client/assets/{use-recent-apps-Dbpw5TB5.js → use-recent-apps-6oU0G5sy.js} +1 -1
  348. package/dist/client/assets/{use-releases-ClTQL_RZ.js → use-releases-CjPNvHz7.js} +1 -1
  349. package/dist/client/assets/{use-reports-diagnostic-DVwMPgD_.js → use-reports-diagnostic-CbLn3JeW.js} +1 -1
  350. package/dist/client/assets/{use-sandbox-events-BAik2LAS.js → use-sandbox-events-C3mgE5Ut.js} +1 -1
  351. package/dist/client/assets/{use-secrets-ZlehcjzW.js → use-secrets-DMgYR7J2.js} +1 -1
  352. package/dist/client/assets/{use-section-preview-base-CLumQxEU.js → use-section-preview-base-CJSLbEeV.js} +1 -1
  353. package/dist/client/assets/{use-session-runtime-PX0UU1rX.js → use-session-runtime-HJpkQoy0.js} +1 -1
  354. package/dist/client/assets/{use-sidebar-collapsed-ByUss2bb.js → use-sidebar-collapsed-DGKLEITN.js} +1 -1
  355. package/dist/client/assets/{use-tags-CeuMPNMY.js → use-tags-C5S50qhF.js} +1 -1
  356. package/dist/client/assets/{use-task-board-analytics-DzVWF5Q4.js → use-task-board-analytics-BhLHNvA-.js} +1 -1
  357. package/dist/client/assets/{use-task-board-events-Cuq4HTGo.js → use-task-board-events-CWQQpnEy.js} +1 -1
  358. package/dist/client/assets/{use-task-board-item-prs-BZA4s0mM.js → use-task-board-item-prs-a7ezuDRL.js} +1 -1
  359. package/dist/client/assets/use-task-board-prompts-DonCfR5m.js +1 -0
  360. package/dist/client/assets/{use-task-metadata-De52Dfmg.js → use-task-metadata-MAOPH7xT.js} +1 -1
  361. package/dist/client/assets/{use-thread-analytics-HQsRrHEt.js → use-thread-analytics-B2fKyMxQ.js} +1 -1
  362. package/dist/client/assets/{use-thread-outputs-BT4PyLKe.js → use-thread-outputs-vH0sJUqm.js} +1 -1
  363. package/dist/client/assets/useInfiniteQuery-CFafSHXd.js +1 -0
  364. package/dist/client/assets/{useQueries-nk-gppMK.js → useQueries-Qve4MUYw.js} +1 -1
  365. package/dist/client/assets/useSuspenseInfiniteQuery-D_oVQ9bL.js +1 -0
  366. package/dist/client/assets/{users-CLgvJMnS.js → users-DHtbHEKw.js} +1 -1
  367. package/dist/client/assets/{utils-BDRBqTP5.js → utils-BoR7m7ir.js} +1 -1
  368. package/dist/client/assets/variant-calendar-DSZCP6Sl.js +1 -0
  369. package/dist/client/assets/{variant-matcher-override-D6IszGLS.js → variant-matcher-override-Cvh79vYa.js} +1 -1
  370. package/dist/client/assets/{view-header-Ce7a2voT.js → view-header-DTW0kjf6.js} +1 -1
  371. package/dist/client/assets/{virtual-mcp-C5JzNRIg.js → virtual-mcp-RiqyMxQd.js} +1 -1
  372. package/dist/client/assets/{watch-sse-pool-CBQ2__fw.js → watch-sse-pool-6veZzsu7.js} +1 -1
  373. package/dist/client/index.html +2 -2
  374. package/dist/server/server.js +1 -1
  375. package/package.json +1 -1
  376. package/dist/client/assets/agent-analytics-BEKl1X8N.js +0 -2
  377. package/dist/client/assets/agent-app-8j-E-hT5.js +0 -1
  378. package/dist/client/assets/agent-assets-DQ6hVD8p.js +0 -1
  379. package/dist/client/assets/agent-automations-DzkmpBZa.js +0 -1
  380. package/dist/client/assets/agent-calendar-BC2tVvZL.js +0 -1
  381. package/dist/client/assets/agent-connect-sources-Dh7wTbNs.js +0 -1
  382. package/dist/client/assets/agent-deck-07no_3NQ.js +0 -1
  383. package/dist/client/assets/agent-e2e-Ds3Fe2AE.js +0 -1
  384. package/dist/client/assets/agent-experiments-DofmmJcd.js +0 -1
  385. package/dist/client/assets/agent-file-6W_Gnaal.js +0 -1
  386. package/dist/client/assets/agent-hosting-vZ66b5t2.js +0 -1
  387. package/dist/client/assets/agent-icon-Co7E9kYl.js +0 -1
  388. package/dist/client/assets/agent-library-R2xLquH1.js +0 -1
  389. package/dist/client/assets/agent-library-file-BXlKOL8M.js +0 -1
  390. package/dist/client/assets/agent-monitor-BoyNxcz1.js +0 -1
  391. package/dist/client/assets/agent-overview-CSwJW27z.js +0 -1
  392. package/dist/client/assets/agent-settings-BGDVCihC.js +0 -1
  393. package/dist/client/assets/agent-site-editor-code-FDZ6QYUh.js +0 -2
  394. package/dist/client/assets/agent-site-editor-content-kP1qC2rB.js +0 -1
  395. package/dist/client/assets/agent-site-editor-preview-DmkFZKpC.js +0 -1
  396. package/dist/client/assets/agent-view-CH596Gq0.js +0 -1
  397. package/dist/client/assets/agents-list-CBfEPAhK.js +0 -1
  398. package/dist/client/assets/api-keys-9pHr3QlX.js +0 -1
  399. package/dist/client/assets/app-editor-BVC0eWvP.js +0 -1
  400. package/dist/client/assets/automation-list-row-BvcdSOir.js +0 -1
  401. package/dist/client/assets/automations-C2DGayAE.js +0 -1
  402. package/dist/client/assets/category-editor-BaE2uAd6.js +0 -1
  403. package/dist/client/assets/choose-editor-C2L8nFMF.js +0 -1
  404. package/dist/client/assets/cms-settings-editor-DTAdiNDN.js +0 -1
  405. package/dist/client/assets/collection-detail-tC_GRfYF.js +0 -1
  406. package/dist/client/assets/column-rules-C63NCpq3.js +0 -3
  407. package/dist/client/assets/connection-detail-C98bDTVH.js +0 -1
  408. package/dist/client/assets/connections-C6M8AgjO.js +0 -1
  409. package/dist/client/assets/context-CPd4zSV0.js +0 -1
  410. package/dist/client/assets/discover-COhVLrYW.js +0 -1
  411. package/dist/client/assets/file-explorer-Bd3gIXGV.js +0 -2
  412. package/dist/client/assets/folder-icon-rxpoDvAE.js +0 -1
  413. package/dist/client/assets/home-DGMtvNuq.js +0 -1
  414. package/dist/client/assets/index-By_-wb1N.css +0 -1
  415. package/dist/client/assets/library-CdfdY0qf.js +0 -1
  416. package/dist/client/assets/mock-board-piOcYIBD.js +0 -81
  417. package/dist/client/assets/monitoring-3dbLT4OM.js +0 -1
  418. package/dist/client/assets/openai-conversation-DGR8tfoH.js +0 -3
  419. package/dist/client/assets/plan-CKUD-2iO.js +0 -1
  420. package/dist/client/assets/post-calendar-DkrNCJu_.js +0 -1
  421. package/dist/client/assets/project-app-view-Cf1gd22p.js +0 -1
  422. package/dist/client/assets/project-apps-X2VfH52k.js +0 -1
  423. package/dist/client/assets/project-reports-BVlytfOe.js +0 -1
  424. package/dist/client/assets/project-tasks-BGW3O_F5.js +0 -1
  425. package/dist/client/assets/projects-oKJE7kAY.js +0 -1
  426. package/dist/client/assets/record-editor-BOGjSPiY.js +0 -1
  427. package/dist/client/assets/redirect-editor-DxMUngFX.js +0 -1
  428. package/dist/client/assets/reports-N81wb4Wq.js +0 -1
  429. package/dist/client/assets/reports-onboarding-CljQnv9P.js +0 -1
  430. package/dist/client/assets/reports-tab-CSx5fOj6.js +0 -2
  431. package/dist/client/assets/repositories-DL-11--e.js +0 -1
  432. package/dist/client/assets/roles-Brhhqsw3.js +0 -1
  433. package/dist/client/assets/route-BmSXOav-.js +0 -1
  434. package/dist/client/assets/route-C51vZk3q.js +0 -1
  435. package/dist/client/assets/route-D_u0Bw_R.js +0 -1
  436. package/dist/client/assets/sections-editor-p5iYgj5l.js +0 -1
  437. package/dist/client/assets/seo-editor-BtHI4gWU.js +0 -1
  438. package/dist/client/assets/settings-tab-qkoZ5Hhk.js +0 -1
  439. package/dist/client/assets/shell-layout-DUwEP5qi.js +0 -1
  440. package/dist/client/assets/site-editor-DBH3tuRQ.js +0 -1
  441. package/dist/client/assets/skills-CmU0q2d6.js +0 -1
  442. package/dist/client/assets/taskboard-analytics-nTEghmrx.js +0 -1
  443. package/dist/client/assets/tasks-sE4UNYKk.js +0 -1
  444. package/dist/client/assets/thread-analytics-DRVZv6bu.js +0 -1
  445. package/dist/client/assets/thread-route-BnB8pcK6.js +0 -1
  446. package/dist/client/assets/useInfiniteQuery-ChletbBT.js +0 -1
  447. package/dist/client/assets/useSuspenseInfiniteQuery-BJjYTjXx.js +0 -1
  448. package/dist/client/assets/variant-calendar-DOQE-pkF.js +0 -1
@@ -0,0 +1 @@
1
+ import{hN as Ho,bh as Wo,c as jn,b as Rn,r as S,l as ae,j as r,bQ as qo,bd as Vs,hO as Ra,B as Ut,X as rn,az as Go,Z as Uo,bg as Yo,Y as Zo,q as Jo,hm as Qo,hP as Xo,hQ as ei,bp as xn,h as ti,bi as Rt,hR as st,hS as Wr,hT as gs,hU as ni,hV as qr,hW as si,bw as ri,hX as ai,hY as Gr,hZ as oi,t as q,bZ as Ur,h_ as ii,h$ as Kt,i0 as li,i1 as ci,i2 as ui,bY as Yr,i3 as vs,i4 as di,i5 as fi,i6 as mi,bW as pi,bx as hi,i7 as gi,i8 as vi,bT as Si,f7 as yi,K as bi,bu as Zr,i9 as Jr,ia as xi,ib as _i,ic as ki,id as Ss,ie as wi,ig as ji,ih as Ri,ii as Ei,bR as Qr,ij as Vi,ik as Ti,il as Xr,im as Ai,bV as Ni}from"./index-BWpKrclg.js";import{u as Ci}from"./chat-context-kqrW-XPR.js";import{a2 as Pi,K as Qn,a3 as Ki,a4 as Mi,a5 as Bi,a6 as Di,a7 as Fi,a8 as Ii,a9 as ea,aa as Li,ab as Oi,z as Un,x as Yn,d as zi,u as $i,ac as ta,i as Hi,ad as Wi,k as qi,h as Gi,ae as Ea,af as Ui,ag as Yi,v as na,ah as Zi,ai as Ji,aj as Wn,ak as sa,al as ra,am as aa,an as ys,ao as Qi,D as Xi,ap as el,y as tl,aq as oa,ar as nl,as as ia,at as la,au as ca,M as sl,av as ua,a as rl,aw as an,ax as al,ay as ol,t as qn,az as _n}from"./held-block-view-C3Ird9F-.js";import{c as il}from"./repository-binding-Bpq6heaQ.js";import{n as ll,t as cl}from"./ChevronUp-xR4eZngE.js";import{a9 as Va,b as Jn,ao as ul,H as dl,a3 as da,$ as fa}from"./agent-icon-nQ1AH9dU.js";import{S as on}from"./scroll-area-CwuazZb5.js";import{c as Et,T as Vt,a as Tt}from"./tooltip-D2ANqV2w.js";import{l as fl,u as ml,m as pl,D as hl,a1 as gl,B as vl,ac as Mt,ad as Bt,N as Sl,ay as ma,Q as yl,Z as bl}from"./site-editor-toast-QHleRFN5.js";import{u as xl,X as _l,E as bs,Y as pa,A as kl,Z as wl}from"./blocks-tab-states-DhR3pyff.js";import{m as jl,u as Rl,P as El}from"./mustache-BBgPaDqo.js";import{a0 as Gt,T as ks,az as ws,a1 as Dt,U as ln,e as Vl,c as Tl,w as Al,k as Gn,p as wn,a4 as Nl,_ as qt,V as xs,Z as bt,Y as kn,F as Cl,a2 as ha,$ as Pl,ai as Kl,ak as Ml,aA as Bl,aB as Dl,aC as Fl}from"./parse-sections-BVn3AvAz.js";import{a as Il}from"./Copy01-Dy1KrWO0.js";import{a as js,e as Ta}from"./UserSquare-BSsT3MHy.js";import{i as ga}from"./Tool01-CHLDtlIL.js";import{s as va}from"./Image01-CaawlkVR.js";import{s as Ll}from"./Plus-Ccck99Do.js";import{s as Ol}from"./Trash01-BQBP0tUM.js";import{i as Rs}from"./Zap-CHuT8W6R.js";import{u as zl,a as Sa,K as $l,P as Hl,b as Wl,C as ql,D as Gl,c as Ul}from"./core.esm-DQyn-kJS.js";import{u as Yl,s as Zl,a as Zn,S as Jl,v as Ql}from"./sortable.esm-DNzjY6xb.js";import{s as Xl,g as ec,u as tc,A as nc}from"./use-section-preview-base-CJSLbEeV.js";import{a as sc,P as ya,w as rc,b as ac}from"./page-seo-form-DizfAl8r.js";import{u as oc}from"./use-apply-named-rule-CdtINk0A.js";import{b as ba,a as ic}from"./variant-matcher-override-Cvh79vYa.js";import{c as xa,d as lc,e as cc}from"./variant-draft-pointer-BeAKcq_c.js";import"./use-panel-navigate-nriEb2Qz.js";import"./thread-route-BOOkt7de.js";import"./use-project-scope-CdqclLu1.js";import"./autosend-DTWIjCgK.js";import"./thread-intent-DjvP3GsU.js";import"./use-mcp-client-zIBQco5Q.js";import"./auth-CK6AyRu5.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-6veZzsu7.js";import"./task-board-L6ZGzY-s.js";import"./schema-DzZBw0EW.js";import"./slugify-CEUa2lfQ.js";import"./use-entitlements-Bxptpo8e.js";import"./use-ai-providers-BcLfhqAn.js";import"./location-V0VwTJTt.js";import"./use-decopilot-events-Dg011Qgn.js";import"./use-organization-settings-D_5fr-OI.js";import"./utils-BoR7m7ir.js";import"./ZoomOut-CBOWQYet.js";import"./Play-OByKGnTy.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-BFVxcKKp.js";import"./LinkBroken01-z_Mm0CSf.js";import"./collapsible-Cx6KFD5C.js";import"./use-copy-Bq-mz0ld.js";import"./usage-stats-I2nqy87E.js";import"./tool-namespace-CG1Oreso.js";import"./form-gDNfP07W.js";import"./label-DzRNwB_s.js";import"./utils-CVEq3hMx.js";import"./markdown-CkZaCBow.js";import"./use-mobile-CoPLJ8cu.js";import"./use-clock-tick-CXtcWsca.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BVLr3WK6.js";import"./types-BNmsSext.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./AlertCircle-RV4AM_8y.js";import"./XClose-BjZnEBvF.js";import"./ShoppingBag01-BhoOjVkp.js";import"./SearchMd-BAGHgvYw.js";import"./shell-layout-BbFvnpcf.js";import"./Building02-NRzC_IEp.js";import"./use-deployment-admin-COukxauw.js";import"./admin-fetch-BhTJlAsX.js";import"./CheckCircle-CfYD_Bi6.js";import"./Monitor01-Bl7f7T5L.js";import"./command-De9pJLwH.js";import"./index-C-GH7ZUH.js";import"./integration-icon-BQ9jVlvt.js";import"./project-icon-BKeF243f.js";import"./new-project-dialog-Dd5pVssc.js";import"./ArrowLeft-XO66B9Td.js";import"./repository-import-picker-DxJJpcCz.js";import"./use-navigate-to-agent-DqWY18b4.js";import"./repository-picker-P8Asvsk4.js";import"./github-icon-DAxkwypb.js";import"./useInfiniteQuery-CFafSHXd.js";import"./infiniteQueryObserver-CbIPWgZj.js";import"./collection-search-B3vfcK1n.js";import"./use-debounced-value-CqLWq6L2.js";import"./required-auth-layout-DYZU5vk_.js";import"./use-org-sso-sTi3oL5_.js";import"./sheet-BW-FxyJZ.js";import"./use-connection-CZNQu-z2.js";import"./Link01-B_YWUHoH.js";import"./use-mcp-prompts-XayY9yfQ.js";import"./use-thread-outputs-vH0sJUqm.js";import"./file-type-icon-BgzyV542.js";import"./section-array-field-BXLl3jB0.js";import"./alert-Bsjmz-OK.js";import"./switch-Bv0wLEBx.js";import"./textarea-BNvvIWSZ.js";import"./ChevronSelectorVertical-C5MARPJN.js";import"./popover-ClEv7Zyf.js";import"./monaco-editor-zzUPRyBn.js";import"./editor-BqqnxL88.js";import"./calendar-ym6zGcEl.js";import"./SwitchHorizontal01-Ce37vA9c.js";import"./Minus-yAYwM_Ty.js";import"./select-BMteQTWS.js";import"./index-BdQq_4o_.js";import"./index-lchr3O79.js";import"./editor-classes-D-ez-qBv.js";import"./toggle-group-BAFBdL9F.js";import"./active-indicator-CCMhAsc_.js";import"./combobox-DXDZmm8e.js";import"./Upload01-D_q00M49.js";import"./DotsVertical-CncVW4wJ.js";import"./search-input-D2iQ_3lu.js";import"./tabs-CjWwohzM.js";import"./use-file-configs-DAoix9gu.js";import"./asset-utils-BSDCnt-j.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-session-runtime-HJpkQoy0.js";import"./sandbox-git-api-DcqI6XE4.js";import"./sandbox-url-D3mC8qhT.js";import"./ArrowUp-DpQ-09y4.js";import"./CreditCard01-DVN26JVZ.js";import"./Globe04-BxFc3HLH.js";import"./Key01-FaGRi3tG.js";import"./Sun-CZRF_565.js";import"./Users01-C6bE7RDt.js";import"./experiments-tab-choice-B_rL9_Nx.js";import"./use-sandbox-events-C3mgE5Ut.js";import"./slider-DtzvJZ1j.js";import"./index-Cjtut9JA.js";import"./tooltipContext-DvKfbID4.js";import"./CategoricalChart-64zykerQ.js";import"./index-15xKR9ar.js";import"./ActiveShapeUtils-ppN64tl0.js";import"./Sector-BCmuavOw.js";import"./symbol-CJoI4vsX.js";import"./empty-state-C7LII3ZM.js";import"./section-preview-url-7zfngvgW.js";import"./use-move-blocks-Ck5rS_vn.js";const uc={escape:Pi};function dc(v,e){for(const p of Xl(v,e)){const y=typeof p.title=="string"?p.title:void 0;if(y?.includes("{{"))return y}}function fc(v,e){if(!e)return;const p=Ho(v,Wo(e));if(p)try{const y=dc(p.resolveType,e);return y&&jl.render(y,p.data,{},uc).trim()||void 0}catch{return}}function mc(v){const e=jn.c(13),{icon:p,label:y,className:b}=v;let V;e[0]!==b?(V=ae("size-3.5",b),e[0]=b,e[1]=V):V=e[1];let B;e[2]!==p||e[3]!==V?(B=r.jsx(p,{className:V}),e[2]=p,e[3]=V,e[4]=B):B=e[4];let w;e[5]!==y||e[6]!==B?(w=r.jsx(Vt,{asChild:!0,children:r.jsx("span",{role:"img","aria-label":y,className:"shrink-0 cursor-help",children:B})}),e[5]=y,e[6]=B,e[7]=w):w=e[7];let K;e[8]!==y?(K=r.jsx(Tt,{className:"max-w-56",children:y}),e[8]=y,e[9]=K):K=e[9];let k;return e[10]!==w||e[11]!==K?(k=r.jsxs(Et,{children:[w,K]}),e[10]=w,e[11]=K,e[12]=k):k=e[12],k}const pc="text-global-section-fg focus:bg-global-section/12 focus:text-global-section-fg dark:text-global-section-fg-dark dark:focus:bg-global-section/15 dark:focus:text-global-section-fg-dark [&_svg]:!text-global-section";function _a(v){return Array.from({length:v},(e,p)=>({id:crypto.randomUUID(),index:p}))}function Aa(v){return v.map((e,p)=>({...e,index:p}))}function hc(v,e){if(e===v.length)return v;if(e<v.length)return Aa(v.slice(0,e));const p=Array.from({length:e-v.length},(y,b)=>({id:crypto.randomUUID(),index:v.length+b}));return[...v,...p]}function Na(v){const e=jn.c(44),{section:p,raw:y,meta:b,decofile:V}=v,B=Rn(),w=Qn(),K=p.isSavedBlock===!0,k=p.isMultivariate===!0;let Q;e[0]!==b||e[1]!==y?(Q=y&&b?ec(y,b):void 0,e[0]=b,e[1]=y,e[2]=Q):Q=e[2];const ge=Q;let Ue;e[3]!==b||e[4]!==k||e[5]!==y||e[6]!==K?(Ue=y&&b&&!K&&!k?fc(y,b):void 0,e[3]=b,e[4]=k,e[5]=y,e[6]=K,e[7]=Ue):Ue=e[7];const Oe=Ue;let Ne;e[8]!==V||e[9]!==b||e[10]!==y||e[11]!==p?(Ne=Ii(y,p,V,b),e[8]=V,e[9]=b,e[10]=y,e[11]=p,e[12]=Ne):Ne=e[12];const oe=Ne;let R;e[13]!==k||e[14]!==y?.__resolveType?(R=!k&&Vs(y?.__resolveType??""),e[13]=k,e[14]=y?.__resolveType,e[15]=R):R=e[15];const c=R,xe=K?Jn:k?Va:Ta;let U;e[16]!==k||e[17]!==K?(U=K?{color:Yo}:k?{color:"oklch(0.65 0.15 160)"}:void 0,e[16]=k,e[17]=K,e[18]=U):U=e[18];const _e=U;let F;e[19]!==xe||e[20]!==w?(F=w?r.jsxs("span",{className:"relative size-4 shrink-0",children:[r.jsx(xe,{className:"absolute inset-0 size-4 text-muted-foreground transition-opacity group-hover:opacity-0 group-has-[:focus-visible]:opacity-0"}),r.jsx(Oi,{"aria-hidden":!0,className:"absolute inset-0 size-4 opacity-0 transition-opacity group-hover:opacity-100 group-has-[:focus-visible]:opacity-100"})]}):r.jsx(ul,{className:"h-4 w-4 shrink-0 text-muted-foreground/40"}),e[19]=xe,e[20]=w,e[21]=F):F=e[21];let ke;e[22]!==ge?(ke=ge&&r.jsx("img",{src:ge,alt:"",referrerPolicy:"no-referrer",className:"h-12 max-w-[100px] shrink-0 rounded-[var(--studio-control-radius,var(--radius))] object-cover"}),e[22]=ge,e[23]=ke):ke=e[23];let f;e[24]!==w||e[25]!==_e?(f=!w&&r.jsx(js,{className:"h-4 w-4 shrink-0",style:_e}),e[24]=w,e[25]=_e,e[26]=f):f=e[26];const ze=w?"shrink":"flex-1",u=p.isHidden&&"line-through opacity-50";let Re;e[27]!==u||e[28]!==ze?(Re=ae("min-w-0 truncate text-sm font-medium",ze,u),e[27]=u,e[28]=ze,e[29]=Re):Re=e[29];const X=Oe??p.label;let $e;e[30]!==Re||e[31]!==X?($e=r.jsx("span",{className:Re,children:X}),e[30]=Re,e[31]=X,e[32]=$e):$e=e[32];let rt;e[33]!==c||e[34]!==w||e[35]!==oe||e[36]!==B?(rt=w?r.jsxs(r.Fragment,{children:[c&&r.jsx(mc,{icon:Rs,label:B("sectionsEditor.sectionList.asyncBadge"),className:"text-muted-foreground"}),oe&&r.jsx(ea,{}),r.jsx("span",{className:"min-w-0 flex-1"})]}):oe&&r.jsx(ea,{className:"absolute -right-0.5 -top-0.5"}),e[33]=c,e[34]=w,e[35]=oe,e[36]=B,e[37]=rt):rt=e[37];let Ce;return e[38]!==$e||e[39]!==rt||e[40]!==F||e[41]!==ke||e[42]!==f?(Ce=r.jsxs(r.Fragment,{children:[F,ke,f,$e,rt]}),e[38]=$e,e[39]=rt,e[40]=F,e[41]=ke,e[42]=f,e[43]=Ce):Ce=e[43],Ce}const gc="text-global-section-fg hover:bg-global-section/12 dark:text-global-section-fg-dark dark:hover:bg-global-section/15",vc="text-[oklch(0.45_0.15_160)] hover:bg-[oklch(0.65_0.15_160/0.12)] dark:text-[oklch(0.78_0.15_160)] dark:hover:bg-[oklch(0.65_0.15_160/0.15)]";function Ca(v,e,p){if(p)return Li({selected:e});const y=v.isSavedBlock===!0,b=v.isMultivariate===!0;return ae("group relative flex select-none items-center gap-2 rounded-[var(--studio-control-radius,var(--radius-md))] px-2 py-2.5",e?"bg-accent text-accent-foreground":y?gc:b?vc:"text-foreground/80 hover:bg-accent hover:text-accent-foreground")}function _s(v,e){return ae("h-7 shrink-0 overflow-hidden",e?"w-7 ml-0 opacity-100 [transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]":v?"w-7 ml-0 opacity-0 [transition:opacity_150ms_ease-out,width_0ms_150ms,margin-left_0ms_150ms] group-hover:opacity-100 group-has-[:focus-visible]:opacity-100":"w-0 -ml-2 opacity-0 [transition:opacity_150ms_ease-out,width_0ms_150ms,margin-left_0ms_150ms] group-hover:ml-0 group-hover:w-7 group-hover:opacity-100 group-hover:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms] group-has-[:focus-visible]:ml-0 group-has-[:focus-visible]:w-7 group-has-[:focus-visible]:opacity-100 group-has-[:focus-visible]:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]")}function Sc(v){const e=jn.c(90),{section:p,raw:y,meta:b,decofile:V,sortableId:B,selected:w,onSelect:K,onDelete:k,onDuplicate:Q,onMakeReusable:ge,onToggleHidden:Ue,onToggleLazy:Oe,onAddVariant:Ne,onDetach:oe}=v,R=Rn(),c=Qn(),xe=y?Vs(y.__resolveType??""):!1,U=p.isHidden===!0,_e=xe||U;let F;e[0]!==p?(F=Ra(p),e[0]=p,e[1]=F):F=e[1];const ke=F,f=!!Oe&&!p.isMultivariate;let ze;e[2]!==B?(ze={id:B,animateLayoutChanges:xc},e[2]=B,e[3]=ze):ze=e[3];const{attributes:u,listeners:Re,setNodeRef:X,transform:$e,isDragging:rt}=Yl(ze);let Ce;e[4]!==$e?(Ce=ql.Transform.toString($e?{...$e,x:0}:null),e[4]=$e,e[5]=Ce):Ce=e[5];const at=rt?0:void 0;let Pe;e[6]!==Ce||e[7]!==at?(Pe={transform:Ce,opacity:at},e[6]=Ce,e[7]=at,e[8]=Pe):Pe=e[8];const _=Pe;let we;e[9]!==p?(we=Mi(p),e[9]=p,e[10]=we):we=e[10];const ot=we,it="button",m=0;let L;e[11]!==K?(L=T=>{(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),K())},e[11]=K,e[12]=L):L=e[12];const et=rt?"cursor-grabbing":"cursor-pointer";let A;e[13]!==c||e[14]!==p||e[15]!==w||e[16]!==et?(A=ae("touch-none transition-colors",et,Ca(p,w,c)),e[13]=c,e[14]=p,e[15]=w,e[16]=et,e[17]=A):A=e[17];let Ye;e[18]!==V||e[19]!==b||e[20]!==y||e[21]!==p?(Ye=r.jsx(Na,{section:p,raw:y,meta:b,decofile:V}),e[18]=V,e[19]=b,e[20]=y,e[21]=p,e[22]=Ye):Ye=e[22];const W=!c&&f&&r.jsxs(Et,{children:[r.jsx(Vt,{asChild:!0,children:r.jsx(Ut,{type:"button",variant:"ghost",size:"icon","aria-label":R(xe?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender"),className:ae(_s(_e,xe)),onClick:T=>{T.stopPropagation(),Oe?.()},onPointerDown:bc,children:r.jsx(Rs,{className:ae("h-3.5 w-3.5",xe&&"text-warning")})})}),r.jsx(Tt,{side:"bottom",children:R(xe?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")})]}),lt=c?r.jsx(Bi,{label:R(U?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),active:U,onToggle:Ue,children:U?r.jsx(ga,{className:"h-3.5 w-3.5"}):r.jsx(va,{className:"h-3.5 w-3.5"})}):r.jsxs(Et,{children:[r.jsx(Vt,{asChild:!0,children:r.jsx(Ut,{type:"button",variant:"ghost",size:"icon","aria-label":R(U?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),className:ae(_s(_e,U)),onClick:T=>{T.stopPropagation(),Ue()},onPointerDown:yc,children:U?r.jsx(ga,{className:"h-3.5 w-3.5"}):r.jsx(va,{className:"h-3.5 w-3.5"})})}),r.jsx(Tt,{side:"bottom",children:R(U?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection")})]}),fe=Uo,Ze=Di;let ve;e[23]!==R?(ve=R("sectionsEditor.sectionList.sectionActionsMenu"),e[23]=R,e[24]=ve):ve=e[24];const ct=ae(_s(_e,!1),"data-[state=open]:ml-0 data-[state=open]:w-7 data-[state=open]:opacity-100 data-[state=open]:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]");let He;e[25]!==Ze||e[26]!==ve||e[27]!==ct?(He=r.jsx(Ze,{label:ve,classicClassName:ct}),e[25]=Ze,e[26]=ve,e[27]=ct,e[28]=He):He=e[28];let Ee;e[29]!==c||e[30]!==f||e[31]!==xe||e[32]!==Oe||e[33]!==R?(Ee=c&&f&&r.jsxs(r.Fragment,{children:[r.jsxs(rn,{onClick:T=>{T.stopPropagation(),Oe?.()},children:[r.jsx(Rs,{className:"h-4 w-4"}),R(xe?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")]}),r.jsx(Go,{})]}),e[29]=c,e[30]=f,e[31]=xe,e[32]=Oe,e[33]=R,e[34]=Ee):Ee=e[34];let Ke;e[35]!==Q?(Ke=T=>{T.stopPropagation(),Q()},e[35]=Q,e[36]=Ke):Ke=e[36];let tt;e[37]===Symbol.for("react.memo_cache_sentinel")?(tt=r.jsx(Il,{className:"h-4 w-4"}),e[37]=tt):tt=e[37];let Me;e[38]!==R?(Me=R("sectionsEditor.sectionList.duplicateMenuItem"),e[38]=R,e[39]=Me):Me=e[39];let Be;e[40]!==Ke||e[41]!==Me?(Be=r.jsxs(rn,{onClick:Ke,children:[tt,Me]}),e[40]=Ke,e[41]=Me,e[42]=Be):Be=e[42];let De;e[43]!==c||e[44]!==ke||e[45]!==Ne||e[46]!==R?(De=ke&&r.jsxs(rn,{className:ae(!c&&Fi),onClick:T=>{T.stopPropagation(),Ne()},children:[r.jsx(Va,{className:"h-4 w-4"}),R("sectionsEditor.sectionList.addVariantMenuItem")]}),e[43]=c,e[44]=ke,e[45]=Ne,e[46]=R,e[47]=De):De=e[47];let Y;e[48]!==c||e[49]!==ot||e[50]!==ge||e[51]!==R?(Y=ot&&r.jsxs(rn,{className:ae(!c&&pc),onClick:T=>{T.stopPropagation(),ge()},children:[c?r.jsx(Jn,{className:"h-4 w-4"}):r.jsx(js,{className:"h-4 w-4"}),R("sectionsEditor.sectionList.makeReusableMenuItem")]}),e[48]=c,e[49]=ot,e[50]=ge,e[51]=R,e[52]=Y):Y=e[52];let Z;e[53]!==c||e[54]!==oe||e[55]!==p.isMultivariate||e[56]!==p.isSavedBlock||e[57]!==R?(Z=p.isSavedBlock===!0&&!p.isMultivariate&&r.jsxs(rn,{onClick:T=>{T.stopPropagation(),oe()},children:[c?r.jsx(Ta,{className:"h-4 w-4"}):r.jsx(js,{className:"h-4 w-4"}),R("sectionsEditor.sectionList.detachMenuItem")]}),e[53]=c,e[54]=oe,e[55]=p.isMultivariate,e[56]=p.isSavedBlock,e[57]=R,e[58]=Z):Z=e[58];let ee;e[59]!==k?(ee=T=>{T.stopPropagation(),k()},e[59]=k,e[60]=ee):ee=e[60];let O;e[61]===Symbol.for("react.memo_cache_sentinel")?(O=r.jsx(Ol,{className:"h-4 w-4"}),e[61]=O):O=e[61];let N;e[62]!==R?(N=R("sectionsEditor.sectionList.deleteMenuItem"),e[62]=R,e[63]=N):N=e[63];let me;e[64]!==ee||e[65]!==N?(me=r.jsxs(rn,{variant:"destructive",onClick:ee,children:[O,N]}),e[64]=ee,e[65]=N,e[66]=me):me=e[66];let We;e[67]!==Ee||e[68]!==Be||e[69]!==De||e[70]!==Y||e[71]!==Z||e[72]!==me?(We=r.jsxs(Zo,{align:"end",className:"w-44",children:[Ee,Be,De,Y,Z,me]}),e[67]=Ee,e[68]=Be,e[69]=De,e[70]=Y,e[71]=Z,e[72]=me,e[73]=We):We=e[73];let qe;e[74]!==fe||e[75]!==He||e[76]!==We?(qe=r.jsxs(fe,{children:[He,We]}),e[74]=fe,e[75]=He,e[76]=We,e[77]=qe):qe=e[77];let Je;return e[78]!==u||e[79]!==Re||e[80]!==K||e[81]!==X||e[82]!==_||e[83]!==A||e[84]!==Ye||e[85]!==W||e[86]!==lt||e[87]!==qe||e[88]!==L?(Je=r.jsxs("div",{ref:X,style:_,...u,...Re,role:it,tabIndex:m,onClick:K,onKeyDown:L,className:A,children:[Ye,W,lt,qe]}),e[78]=u,e[79]=Re,e[80]=K,e[81]=X,e[82]=_,e[83]=A,e[84]=Ye,e[85]=W,e[86]=lt,e[87]=qe,e[88]=L,e[89]=Je):Je=e[89],Je}function yc(v){return v.stopPropagation()}function bc(v){return v.stopPropagation()}function xc(){return!1}function Es(v){const e=jn.c(11),{canAddSection:p,onAddSection:y,className:b,size:V}=v,B=Rn();let w;e[0]!==b?(w=ae("w-full",b),e[0]=b,e[1]=w):w=e[1];const K=!p;let k;e[2]===Symbol.for("react.memo_cache_sentinel")?(k=r.jsx(Ll,{size:14}),e[2]=k):k=e[2];let Q;e[3]!==B?(Q=B("sectionsEditor.sectionList.addSectionButton"),e[3]=B,e[4]=Q):Q=e[4];let ge;return e[5]!==y||e[6]!==V||e[7]!==w||e[8]!==K||e[9]!==Q?(ge=r.jsxs(Ut,{type:"button",variant:"outline",size:V,className:w,disabled:K,onClick:y,children:[k,Q]}),e[5]=y,e[6]=V,e[7]=w,e[8]=K,e[9]=Q,e[10]=ge):ge=e[10],ge}function _c(v){const e=jn.c(101),{listKey:p,rawSections:y,sections:b,meta:V,decofile:B,selectedIndex:w,onSelect:K,onReorder:k,onDelete:Q,onDuplicate:ge,onMakeReusable:Ue,onToggleHidden:Oe,onToggleLazy:Ne,onAddVariant:oe,onDetach:R,onAddSection:c,canAddSection:xe}=v,U=xe===void 0?!0:xe,_e=Rn(),F=Qn();let ke;e[0]!==b.length?(ke=()=>_a(b.length),e[0]=b.length,e[1]=ke):ke=e[1];const[f,ze]=S.useState(ke),[u,Re]=S.useState(null),[X,$e]=S.useState(p),[rt,Ce]=S.useState(b.length),at=S.useRef(!1);X!==p?($e(p),Ce(b.length),ze(_a(b.length))):rt!==b.length&&(Ce(b.length),ze(Fe=>hc(Fe,b.length)));let Pe;e[2]===Symbol.for("react.memo_cache_sentinel")?(Pe={activationConstraint:{distance:8}},e[2]=Pe):Pe=e[2];let _;e[3]===Symbol.for("react.memo_cache_sentinel")?(_={coordinateGetter:Zl},e[3]=_):_=e[3];const we=zl(Sa(Hl,Pe),Sa($l,_));let ot;e[4]!==f?(ot=f.map(kc),e[4]=f,e[5]=ot):ot=e[5];const it=ot;let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=Fe=>{Re(String(Fe.active.id))},e[6]=m):m=e[6];const L=m;let et;e[7]!==it||e[8]!==k?(et=Fe=>{Re(null);const{active:G,over:ie}=Fe;if(!ie||G.id===ie.id)return;const Ve=it.indexOf(String(G.id)),Qe=it.indexOf(String(ie.id));Ve===-1||Qe===-1||(ze(nt=>Aa(Zn([...nt],Ve,Qe))),at.current=!0,requestAnimationFrame(()=>{at.current=!1}),k?.(Ve,Qe))},e[7]=it,e[8]=k,e[9]=et):et=e[9];const A=et;let Ye;e[10]===Symbol.for("react.memo_cache_sentinel")?(Ye=()=>{Re(null)},e[10]=Ye):Ye=e[10];const W=Ye;let lt,fe,Ze,ve,ct,He,Ee,Ke,tt,Me,Be,De,Y,Z,ee;if(e[11]!==u||e[12]!==U||e[13]!==F||e[14]!==B||e[15]!==f||e[16]!==it||e[17]!==A||e[18]!==V||e[19]!==c||e[20]!==oe||e[21]!==Q||e[22]!==R||e[23]!==ge||e[24]!==Ue||e[25]!==K||e[26]!==Oe||e[27]!==Ne||e[28]!==y||e[29]!==b||e[30]!==w||e[31]!==we||e[32]!==_e){Z=Symbol.for("react.early_return_sentinel");e:{const Fe=G=>{at.current||K(G)};if(e[48]!==u||e[49]!==U||e[50]!==F||e[51]!==f||e[52]!==c||e[53]!==y||e[54]!==b||e[55]!==_e){const G=u?f.find(ie=>ie.id===u):null;if(ve=G!=null?b[G.index]:null,Ze=G!=null?y[G.index]:void 0,f.length===0){let ie;e[59]!==_e?(ie=_e("sectionsEditor.sectionList.noSections"),e[59]=_e,e[60]=ie):ie=e[60];let Ve;e[61]!==ie?(Ve=r.jsx("p",{className:"px-2 py-3 text-xs text-muted-foreground",children:ie}),e[61]=ie,e[62]=Ve):Ve=e[62];const Qe=Ve;let nt;e[63]!==U||e[64]!==F||e[65]!==Qe||e[66]!==c?(nt=F?Qe:r.jsxs("div",{className:"space-y-2",children:[Qe,r.jsx(Es,{canAddSection:U,onAddSection:c,size:"sm"})]}),e[63]=U,e[64]=F,e[65]=Qe,e[66]=c,e[67]=nt):nt=e[67],Z=nt;break e}Y=ae(G&&"cursor-grabbing"),e[48]=u,e[49]=U,e[50]=F,e[51]=f,e[52]=c,e[53]=y,e[54]=b,e[55]=_e,e[56]=Ze,e[57]=ve,e[58]=Y}else Ze=e[56],ve=e[57],Y=e[58];fe=Gl,Ke=we,tt=Ul,Me=L,Be=A,De=W,lt=Jl,He=it,Ee=Ql,ee="space-y-1",ct=f.map(G=>{const ie=b[G.index];return ie?r.jsx(Sc,{sortableId:G.id,section:ie,raw:y[G.index],meta:V,decofile:B,selected:w===G.index,onSelect:()=>Fe(G.index),onDelete:()=>Q(G.index),onDuplicate:()=>ge(G.index),onMakeReusable:()=>Ue(G.index),onToggleHidden:()=>Oe(G.index),onToggleLazy:Ne?()=>Ne(G.index):void 0,onAddVariant:()=>oe(G.index),onDetach:()=>R(G.index)},G.id):null})}e[11]=u,e[12]=U,e[13]=F,e[14]=B,e[15]=f,e[16]=it,e[17]=A,e[18]=V,e[19]=c,e[20]=oe,e[21]=Q,e[22]=R,e[23]=ge,e[24]=Ue,e[25]=K,e[26]=Oe,e[27]=Ne,e[28]=y,e[29]=b,e[30]=w,e[31]=we,e[32]=_e,e[33]=lt,e[34]=fe,e[35]=Ze,e[36]=ve,e[37]=ct,e[38]=He,e[39]=Ee,e[40]=Ke,e[41]=tt,e[42]=Me,e[43]=Be,e[44]=De,e[45]=Y,e[46]=Z,e[47]=ee}else lt=e[33],fe=e[34],Ze=e[35],ve=e[36],ct=e[37],He=e[38],Ee=e[39],Ke=e[40],tt=e[41],Me=e[42],Be=e[43],De=e[44],Y=e[45],Z=e[46],ee=e[47];if(Z!==Symbol.for("react.early_return_sentinel"))return Z;let O;e[68]!==ct||e[69]!==ee?(O=r.jsx("div",{className:ee,children:ct}),e[68]=ct,e[69]=ee,e[70]=O):O=e[70];let N;e[71]!==lt||e[72]!==He||e[73]!==Ee||e[74]!==O?(N=r.jsx(lt,{items:He,strategy:Ee,children:O}),e[71]=lt,e[72]=He,e[73]=Ee,e[74]=O,e[75]=N):N=e[75];let me;e[76]!==Ze||e[77]!==ve||e[78]!==F||e[79]!==B||e[80]!==V?(me=ve?r.jsx("div",{className:ae("cursor-grabbing shadow-lift",Ca(ve,!1,F)),children:r.jsx(Na,{section:ve,raw:Ze,meta:V,decofile:B})}):null,e[76]=Ze,e[77]=ve,e[78]=F,e[79]=B,e[80]=V,e[81]=me):me=e[81];let We;e[82]!==me?(We=qo.createPortal(r.jsx(Wl,{dropAnimation:Ki,children:me}),document.body),e[82]=me,e[83]=We):We=e[83];let qe;e[84]!==fe||e[85]!==Ke||e[86]!==tt||e[87]!==Me||e[88]!==Be||e[89]!==De||e[90]!==N||e[91]!==We?(qe=r.jsxs(fe,{sensors:Ke,collisionDetection:tt,onDragStart:Me,onDragEnd:Be,onDragCancel:De,children:[N,We]}),e[84]=fe,e[85]=Ke,e[86]=tt,e[87]=Me,e[88]=Be,e[89]=De,e[90]=N,e[91]=We,e[92]=qe):qe=e[92];let Je;e[93]!==U||e[94]!==F||e[95]!==c?(Je=!F&&r.jsx(Es,{canAddSection:U,onAddSection:c,size:"sm",className:"mt-2"}),e[93]=U,e[94]=F,e[95]=c,e[96]=Je):Je=e[96];let T;return e[97]!==Y||e[98]!==qe||e[99]!==Je?(T=r.jsxs("div",{className:Y,children:[qe,Je]}),e[97]=Y,e[98]=qe,e[99]=Je,e[100]=T):T=e[100],T}function kc(v){return v.id}function wc(v,e,p,y){if(!v||typeof v!="object")return{kind:"error",reason:"no-matcher-rule"};const b=e.trim();if(!b)return Gt(v,p,y)?{kind:"inline",blockKey:v.__resolveType??"",inlinedRule:ks(v,p,y)}:{kind:"noop"};const V=ws(v,p,y);if(!V)return{kind:"error",reason:"unreadable-rule"};if(V.blockKey)return{kind:"updateBlock",blockKey:V.blockKey,blockData:Dt(V.resolveType,V.data,b)};const B=Un(b),w=Yn(B,p);return w?{kind:"error",reason:"invalid-block-id",message:w}:{kind:"createBlock",blockId:B,blockData:Dt(V.resolveType,V.data,b),reference:ln(B)}}const ka="section-form-stale-save",jc=3;function wa(v,e,p){const y=e.global&&e.pageKey?[{label:"Default",sections:[{__resolveType:e.pageKey}]}]:Ea(e.pageKey?v[e.pageKey]?.sections:void 0,v,p),b=Math.max(0,Math.min(e.pageVariantIndex,y.length-1)),V=y[b]?.sections??[];return{pageVariants:y,variantIndex:b,rawSections:V,parsedSections:wn(V,v,p)}}const ja=new WeakMap;let Rc=0;function Ec(v){let e=ja.get(v);return e===void 0&&(e=++Rc,ja.set(v,e)),e}function mf({orgSlug:v,virtualMcpId:e,branch:p,previewReady:y=!0,previewUrl:b,currentPath:V,activePageBlockKey:B=null,activeGlobalBlockKey:w=null,externalSelection:K,onSaved:k,initialEditSeo:Q=!1,onExitSeo:ge,onSelectRoot:Ue,onViewJsonFile:Oe,onFocusedBlockChange:Ne,onVariantPreviewOverride:oe,focusVariant:R}){const c=Rn(),xe=Ci(),U=xe?.taskId??null,_e=y?{orgSlug:v,virtualMcpId:e,branch:p,threadId:U,previewUrl:b}:null,[F,ke]=S.useState([]),{data:f,isLoading:ze}=fl(_e,{pollWhile:F.length>0}),{data:u,isLoading:Re}=xl(_e),X=Qn(),$e=xe?.virtualMcpId,Ce=il($e===e?e:null)?.metadata?.siteSlug??null,at=tc({virtualMcpId:e,branch:p,sandboxUrl:b}),Pe=ml(e,p),_=pl(Pe),we=Si(_),ot=!_,it=!!at||_,[m,L]=S.useState(null),[et,A]=S.useState(null),[Ye,W]=S.useState(null),[lt,fe]=S.useState(0),[Ze,ve]=S.useState(void 0),[ct,He]=S.useState(null),[Ee,Ke]=S.useState(null);R&&R.seq!==ct&&(He(R.seq),Ke(R));const[tt,Me]=S.useState(null),Be={index:tt,remember:Me},[De,Y]=S.useState(null),[Z,ee]=S.useState(null),[O,N]=S.useState([]),me=S.useRef(null),[We,qe]=S.useState(O.length);We!==O.length&&(qe(O.length),requestAnimationFrame(()=>{me.current&&(me.current.scrollTop=0)}));const[Je,T]=S.useState(0),[Fe,G]=S.useState(null),[ie,Ve]=S.useState(null),[Qe,nt]=S.useState(null),[Pa,Yt]=S.useState(!1),[Ts,Xn]=S.useState(!1),En=S.useRef(null),[Vn,Ka]=S.useState(!0),[Zt,Tn]=S.useState(!1),[Ft,An]=S.useState(!1),[Te,cn]=S.useState(Q),[As,Ns]=S.useState(Q);Q&&!As&&(Ns(!0),cn(!0),L(null),A(null),W(null),N([])),!Q&&As&&Ns(!1);const[Ma,un]=S.useState(null),[Cs,Nn]=S.useState(void 0),[Ps,It]=S.useState([]),[Ks,Jt]=S.useState(0),[Ie,ut]=S.useState(0),[Ba,Le]=S.useState(null),[Qt,Ge]=S.useState(null),[Ms,Bs]=S.useState(null),Ds=Jo(),Fs=hl({orgSlug:v,virtualMcpId:e,branch:p},{tunnel:!1}),dn=zi({orgSlug:v,virtualMcpId:e,branch:p}),[Da,Fa]=S.useState(V),[Ia,La]=S.useState(B),[Oa,za]=S.useState(w);(Da!==V||Ia!==B||Oa!==w)&&(queueMicrotask(()=>dn.flush()),Fa(V),La(B),za(w),L(null),A(null),W(null),fe(0),Y(null),ee(null),ut(0),Le(null),Ge(null),N([]),T(t=>t+1),cn(!1),un(null),Nn(void 0),It([]),Jt(t=>t+1));const D=$i({orgSlug:v,virtualMcpId:e,branch:p}),fn=rl((t,n)=>{D.mutate({blockKey:t,data:n},{onSuccess:()=>k?.(),onError:D.reportError})}),Cn=Rl({orgSlug:v,virtualMcpId:e,branch:p}),Is=oc({orgSlug:v,virtualMcpId:e,branch:p}),[Xt,en]=S.useState(!1),C=S.useRef(null),wt=S.useRef(null),gt=S.useRef(null),vt=S.useRef(null),Pn=S.useRef({}),Lt=S.useRef(null),mn=S.useRef(!1),pn=S.useRef(!1),Se=S.useRef(new Map),tn=S.useRef(!1),xt=S.useRef([]),es=S.useRef(new WeakSet);gl(v,e,t=>{const{activePageKey:n,rawSections:s,parsedSections:a,selectedSectionIndex:o}=ne.current,i=new Set;n&&i.add(n);for(const l of[wt.current?.sectionIndex,o]){const d=l==null?void 0:s[l],E=l==null?void 0:a[l],h=d&&E?.isSavedBlock?Ss(d,E):null;h&&i.add(h)}if([...i].some(l=>t.has(l))){for(const l of[C,gt,vt])l.current&&clearTimeout(l.current),l.current=null;wt.current=null,Se.current.clear(),n&&t.has(n)&&(Pn.current={})}});const ne=S.useRef({rawSections:[],parsedSections:[],decofile:{},activePageKey:null,pageVariants:[],variantIndex:0,sectionVariantIndex:0,selectedSectionIndex:null}),[Ls,Os]=S.useState(0),[$a,Ha]=S.useState(0),zs=Qo(Pe,{orgSlug:v,virtualMcpId:e,branch:p}),$s=Xo(zs,F[0]?.blockKey??null,F[0]?ei(xn(F[0].plan.theirs)):null),[Wa,qa]=S.useState(null),ts=vl(v,e).epoch,[Ga,Ua]=S.useState(ts);if(!y||ze||Re)return r.jsx("div",{className:"h-full w-full flex items-center justify-center",children:r.jsx(ti,{className:"size-5 text-muted-foreground"})});if(!f||!u)return r.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:c("sectionsEditor.sectionsEditor.couldNotLoadSiteData")});const Ya=Vl(f,u),$=!!w,se=$?null:Tl(Ya,V,B),g=$?w:se?.key??null,Kn=$&&w?f[w]:void 0,Hs=$&&w&&Kn?Al(w,Kn):$&&w?w:"",Ot=!$&&g&&f[g]?f[g]:null,ns=Te&&f&&u&&g&&se?ta(f,{kind:"page",pageKey:g,pageName:String(se.name??""),path:String(se.path??"")},u):null,Za=Te?Ot?.seo:void 0,Mn=Cs!==void 0?Cs:Za,Ja=Te?Hi(Mn):void 0,Ws=ns?.seoTypeOptions??[],qs=Te&&u?Wi(u):"",ss=Ma??Ja??{},Bn=Te&&ns?sc(ss,ns):null,Gs=Te&&Bn&&qi(Mn)?Gn(Bn,u):null,Us=Te?Gi(f,u)?.seoData:void 0,le=$?[{label:"Default",sections:[{__resolveType:w}]}]:Ea(Ot?.sections,f??{},_),St=le.length>1,J=Math.min(lt,le.length-1),ye=le[J],M=ye?.sections??[],ce=wn(M,f,_),Dn=!$&&Nl(Ot?.sections,_);if($&&w&&Ms!==w){Bs(w);const t=M[0],n=ce[0];if(t&&n){L(0),ut(0),N([]);const s=Rt(t,n,f,_);s&&(A(s.data),W(s.resolveType),Ge(null),Le(null))}}!$&&Ms!==null&&Bs(null),ne.current={rawSections:M,parsedSections:ce,decofile:f??{},activePageKey:g,pageVariants:le,variantIndex:J,sectionVariantIndex:Ie,selectedSectionIndex:m};const Qa=()=>({multivariate:Dn,index:J,variants:le.map(t=>({rule:t.rule})),lazyValues:_&&Dn&&yi(Ot?.sections?.variants?.[J]?.value)}),rs=(t,n)=>{if(!oe)return;if(!g||!Dn||t.length<=1){oe(null);return}const s={multivariate:!0,index:n,variants:t},a=_?xa(g,s):ba(g,s,f,u);oe(a.length>0?a:null)},as=oe&&g&&Dn&&St&&!ze&&!Re?g:null;if(as!==Wa&&(qa(as),as)){const t=le.map(s=>({rule:s.rule})),n=J;queueMicrotask(()=>rs(t,n))}const zt=(t,n,s)=>{if(!oe)return;if(!g){oe(null);return}const a=Qa(),o=_?xa(g,a):ba(g,a,f,u);if(!t||n<0){oe(o.length>0?o:null);return}const i={pageKey:g,page:a,sectionIndex:n,sectionLazy:ce[n]?.isLazy??!1,mvObj:t,selectedVariantIndex:s},l=_?lc(i):ic({...i,decofile:f,meta:u}),d=_?cc(o,l):[...o,...l];oe(d.length>0?d:null)},_t=(t,n,s,a=m??-1,o=!1)=>{const i=st(t,n);if(!i){A(null),W(null),Ge(null),Le(null),o&&zt(null,a,s);return}const d=qr(i,we)[s];if(!d){A(null),W(null),Ge(null),Le(null),o&&zt(null,a,s);return}const E=ai(d.value,f);A(E?.data??null),W(E?.resolveType??null);const{resolveType:h,formValue:x}=qt(d.rule,f,u??void 0);Ge(h),Le(x),o&&zt(i,a,s)},hn=t=>{Ve(null),fe(t),L(null),A(null),W(null),N([]);const n=le[t]?.rule,{resolveType:s,formValue:a}=qt(n,f??{},u??void 0);ee(s),Y(a),rs(le.map(o=>({rule:o.rule})),t)},Ys=(t,n)=>{const s=M[t],a=ce[t];if(!s||!a)return!1;const o=a.isMultivariate?st(s,a)?.variants?.length??0:0,i=n<o?n:0;if(L(t),ut(i),N([]),T(l=>l+1),a.isMultivariate)_t(s,a,i,t);else{const l=Rt(s,a,f,_);l?(A(l.data),W(l.resolveType)):(A(null),W(null)),Ge(null),Le(null)}return!0},Zs=K?.index;if(K!==void 0&&(K?.seq??null)!==Ze&&(ve(K?.seq??null),typeof Zs=="number"&&Ys(Zs,0)),Ee&&($?Kn:Ot)){const t=Ee.pageVariant,n=!$&&t!==void 0&&t<le.length;if(n&&t!==J)hn(t);else{Ke(null);const{section:s,variant:a}=Ee;if($)a!==void 0&&(Me(a),N([]),T(o=>o+1));else if(s!==void 0&&Ys(s,a??0)){const o=M[s],i=ce[s],l=i.isMultivariate?st(o,i):null;l&&a!==void 0&&queueMicrotask(()=>zt(l,s,a))}else n&&hn(t)}}if(ts!==Ga){Ua(ts);const t=C.current!==null||Se.current.size>0||vt.current!==null||gt.current!==null||D.isPending||dn.isPending||F.length>0,n=m!==null&&Wr(me.current,document.activeElement);if(!t&&n&&(tn.current=!0),!t&&!n&&m!==null){const s=M[m],a=ce[m];if(N([]),T(o=>o+1),!s||!a)L(null),A(null),W(null);else if(a.isMultivariate)_t(s,a,Ie,m);else{const o=Rt(s,a,f,_);A(o?.data??null),W(o?.resolveType??null)}}!t&&Te&&(un(null),Nn(void 0),Jt(s=>s+1))}if(Ls!==$a){Ha(Ls);const t=m!==null?M[m]:null,n=m!==null?ce[m]:null;if(t&&n&&m!==null)if(N([]),T(s=>s+1),n.isMultivariate)_t(t,n,Ie,m);else{const s=Rt(t,n,f,_);A(s?.data??null),W(s?.resolveType??null)}}const dt=F[0];if(dt){const{formBase:t,target:n}=dt,s=wa(f,n,_),a=t.sectionIndex,o=s.rawSections.length===t.sectionCount?gs(s.rawSections[a],s.parsedSections[a],n.sectionVariantIndex,f,_):null,i=ni(dt,o,l=>Gr(t,l));if(i){const d=[{...dt,...i,changedAgain:!0},...F.slice(1)];xt.current=d,ke(d)}}const gn={orgSlug:v,virtualMcpId:e,branch:p,threadId:U,previewUrl:_?void 0:b??void 0,siteSlug:Ce},Fn=Ye&&u?Gn(Ye,u):null,ft=(t,n)=>{if(!g)return;C.current&&(clearTimeout(C.current),C.current=null),Se.current.clear(),vt.current&&(clearTimeout(vt.current),vt.current=null),gt.current&&(clearTimeout(gt.current),gt.current=null);const s=an(f,g,t,J,le);D.mutate({blockKey:g,data:s},{onSuccess:()=>n?.onSuccess?.()??k?.(),onError:a=>{n?.onError?.(),D.reportError(a)}})},$t=()=>{Ne?.(null),L(null),An(!1),A(null),W(null),ut(0),Le(null),Ge(null),N([]),T(t=>t+1)},Js=()=>Wr(me.current,document.activeElement),os=(t=c("sectionsEditor.sectionsEditor.blockChangedElsewhere"))=>{if(C.current&&(clearTimeout(C.current),C.current=null),Se.current.clear(),wt.current=null,q.error(t,{id:ka}),Js()){tn.current=!0;return}Os(n=>n+1)},Qs=()=>{!tn.current||Js()||xt.current.length>0||C.current!==null||mn.current||pn.current||Se.current.size>0||(tn.current=!1,Os(t=>t+1))},Xs=()=>{tn.current&&setTimeout(Qs,0)},er=t=>bl(Ds,Fs,t,Pe.kind==="protocol"?Pe:null),tr=t=>{Se.current.size!==0&&setTimeout(()=>{if(mn.current||pn.current)return;const n=[...Se.current.values()];Se.current.clear();for(const s of n)s()},t)},Xa=t=>{const{activePageKey:n,variantIndex:s,sectionVariantIndex:a}=ne.current,o=Lt.current;return{formBase:o?.sectionIndex===t&&o.variantIndex===a?o:null,pageKey:n,global:$,pageVariantIndex:s,sectionVariantIndex:a,schema:Fn}},vn=t=>{xt.current=t,ke(t)},eo=t=>{const n=xt.current,s=n.findIndex(i=>i.formBase===t.formBase),a=s>=0?n[s]:void 0,o=a?n.with(s,{...t,choices:Jr(a.plan,a.choices,t.plan),fresh:Vi(a.plan,t.plan,a.fresh),changedAgain:a.changedAgain||xn(a.plan.theirs)!==xn(t.plan.theirs)}):[...n,{...t,changedAgain:es.current.has(t.formBase)}];vn(o)},nr=(t,n)=>{const s=xt.current,a=s.findIndex(l=>l.formBase===t),o=s[a];if(!o)return!1;if(xn(o.plan.mine)===xn(n))return!0;const i=Zr({...o.plan,mine:n});if(i.pointers.length===0){const l=s.filter(d=>d!==o);return vn(l),!1}return vn(s.with(a,{...o,plan:i,choices:Jr(o.plan,o.choices,i)})),!0},to=t=>{const n=ne.current;return n.selectedSectionIndex===t.formBase.sectionIndex&&n.activePageKey===t.target.pageKey&&n.variantIndex===t.target.pageVariantIndex&&n.sectionVariantIndex===t.target.sectionVariantIndex},no=()=>{const t=xt.current[0];if(!t)return null;const{formBase:n,target:s}=t;C.current&&wt.current?.sectionIndex===n.sectionIndex&&wt.current.sectionVariantIndex===s.sectionVariantIndex&&(clearTimeout(C.current),C.current=null,wt.current=null),Se.current.delete(`${s.pageKey}:${n.sectionIndex}:${s.sectionVariantIndex}`);const a=n.emitted;return a&&typeof a=="object"&&!nr(n,a)&&Sn(a,n.sectionIndex,0,s),xt.current[0]??null},so=()=>{const t=xt.current[0],n=no();if(!n||!t||n.formBase!==t.formBase||n.plan.pointers.some(i=>!t.plan.pointers.includes(i)))return;const s=hi(n.plan,n.choices);Pe.kind==="protocol"&&Pe.source==="github"&&gi(n.plan,n.choices)&&Sl(c,!1),vn(xt.current.slice(1));const{formBase:a,target:o}=n;a.base=n.plan.theirs,a.version=void 0,a.emitted=s,es.current.add(a),(Lt.current===a||to(n))&&(Lt.current=a,A(s),T(i=>i+1)),Sn(s,a.sectionIndex,0,o)},ro=t=>{const[n,...s]=xt.current;n&&vn([{...n,choices:t},...s])},Sn=(t,n,s=0,a,o=!1)=>{const i=a??Xa(n),l=i.sectionVariantIndex,d=i.formBase,E=wt.current;C.current&&(clearTimeout(C.current),C.current=null,E&&(E.sectionIndex!==n||E.sectionVariantIndex!==l)&&E.write());const h=`${i.pageKey}:${n}:${l}`,x=()=>{if(mn.current||pn.current){Se.current.set(h,x);return}const j=typeof t=="function"?t():t;if(d&&nr(d,j))return;const I=ne.current.decofile,{rawSections:P,parsedSections:pe,pageVariants:ue,variantIndex:be}=wa(I,i,_),z=i.pageKey,H=P[n];if(!H)return;const re=pe[n];if(!re)return;const he=d?.base,Ae=gs(H,re,l,I,_),sn=!!he&&!!Ae&&xi(he,Ae)&&!(d&&Gr(d,Ae));if(sn&&he&&Ae){if(_i(he,Ae)){os(c("sectionsEditor.sectionsEditor.sectionReplacedElsewhere"));return}const te=re.isSavedBlock?"here":ki(he,P.map((de,ht)=>gs(de,pe[ht],l,I,_)),n,d?.sectionCount??P.length);if(te==="unknown"){os(c("sectionsEditor.sectionsEditor.sectionReplacedElsewhere"));return}if(typeof te=="number"&&d){d.sectionCount=P.length,d.sectionIndex=te,Lt.current===d&&L(te),Sn(j,te,s,i);return}}const pt=sn&&he&&Ae?Zr({ancestor:he,mine:j,theirs:Ae}):null;if(pt&&pt.pointers.length>0&&d){d.sectionCount=P.length,eo({plan:pt,formBase:d,target:i,sectionIndex:n,choices:wi(pt),changedAgain:!1,blockKey:re.isSavedBlock?Ss(H,re):z,fresh:{}});return}const Xe=pt?pt.merged:null,Pt=Xe??j,zr=ji({merged:!!Xe,tracked:d,current:Lt.current,saved:j});Xe&&q.info(c("sectionsEditor.sectionsEditor.blockMergedWithOthers"),{id:ka}),zr&&d&&(d.emitted=Xe,A(Xe));const hs=zr||!Xe?Pt:j;d&&(d.base=hs,d.sectionCount=P.length,Ri(d,hs));const $r={onSuccess:()=>{d&&es.current.delete(d),k?.()},onError:te=>{if(d?.base===hs&&he&&(d.base=he),te instanceof yl){if(d&&(d.version=void 0),s<jc){Se.current.delete(h),pn.current=!0;const de=Ti(s,te.carriedStored);setTimeout(()=>{pn.current=!1,Sn(()=>{const ht=d?.emitted;return ht&&typeof ht=="object"?ht:j},n,s+1,i,de.immediate),Se.current.delete(h),tr(_n)},de.delay)}else os();return}D.reportError(te)}},Hr=te=>{mn.current=!0;let de=!1;D.mutateAsync(te).then(()=>$r.onSuccess(),ht=>{de=!0,$r.onError(ht)}).finally(()=>{mn.current=!1,tr(de?_n:0),Qs()})};if(re.isSavedBlock){const te=Ss(H,re);if(!te)return;Hr({blockKey:te,data:Pt,...he?{base:{value:Xe?Ae:he}}:{},rebaseOnConflict:!1,guard:Xr({formBase:d,rebased:!!Xe,versionOf:er})});return}if(!z)return;const Hn={...I[z]},Wt=[...P];if(re.isMultivariate){const te=st(H,re);if(!te||!z)return;const de=Ei(te,l,Pt);Wt[n]=Kt(H,re,de)}else if(re.isHidden){const te=Vs(H.__resolveType),de=te?{...H.section}:{...H},ht=Array.isArray(de.variants)?[...de.variants]:[];ht[0]&&(ht[0]=Qr(de.__resolveType,ht[0],Pt)),de.variants=ht,te?Wt[n]={...H,section:de}:Wt[n]=de}else re.isLazy?Wt[n]={...H,section:Pt}:Wt[n]=Pt;if(ue.length>1){const te=Hn.sections,de=[...te?.variants??[]];de[be]&&(de[be]=Qr(te?.__resolveType,de[be],Wt)),Hn.sections={...te,variants:de}}else Hn.sections=Wt;Hr({blockKey:z,data:Hn,rebaseOnConflict:!1,guard:Xr({formBase:null,rebased:!1,versionOf:er})})};if(wt.current={sectionIndex:n,sectionVariantIndex:l,write:x},o){wt.current=null,x();return}C.current=setTimeout(()=>{C.current=null,x()},_n)},ao=t=>{tn.current=!1,L(t),ut(0),N([]),T(o=>o+1);const n=M[t],s=ce[t];if(Ne?.(s?.isSavedBlock?s.resolveType??null:null),!n||!s)return;if(s.isMultivariate){_t(n,s,0,t);return}const a=Rt(n,s,f,_);if(!a){A(null),W(null),Ge(null),Le(null),zt(null,t,0);return}A(a.data),W(a.resolveType),Ge(null),Le(null),zt(null,t,0)},sr=t=>{const n=t;m!==null&&(Lt.current=vi(Lt.current,{sectionIndex:m,variantIndex:ne.current.sectionVariantIndex,shown:et,next:n,sectionCount:ne.current.rawSections.length})),A(n),m!==null&&Sn(n,m)},is=t=>{if(!g||!f||!u||!se)return;const n={kind:"page",pageKey:g,pageName:String(se.name??""),path:String(se.path??"")},s=ta(f,n,u);s&&dn.save(g,()=>{const a=Ds.getQueryData(bi.decofile(Fs))?.[g];if(!a||typeof a!="object"||a===null||Array.isArray(a))return null;const o={...a,...Pn.current};return Pn.current={},t?.raw!==void 0?rc(o,t.raw,u):t?.inner!==void 0?ac(n,s,o,t.inner):o})},rr=(t,n)=>{g&&(Pn.current[t]=n,is())},oo=(t,n)=>{if(!g)return;const s=Zn([...M],t,n);m!==null&&(m===t?L(n):t<m&&n>=m?L(m-1):t>m&&n<=m&&L(m+1)),ft(s)},io=t=>{if(!g)return;const n=M.filter((s,a)=>a!==t);m===t?$t():m!==null&&m>t&&L(m-1),ft(n)},lo=t=>{if(!g)return;const n=M[t];if(!n)return;const s=[...M];s.splice(t+1,0,al(n)),m!==null&&m>t&&L(m+1),ft(s)},co=t=>{if(!g)return;const n=M[t],s=ce[t];if(!n||!s)return;const a=s.isHidden?fi(n,_):mi(n,u);if(!a)return;const o=[...M];o[t]=a,m===t&&$t(),ft(o)},uo=t=>{if(!g)return;const n=M[t],s=ce[t];if(!n||!s||s.isMultivariate)return;const a=di(n);if(!a)return;const o=[...M];o[t]=a,m===t&&$t(),ft(o)},fo=t=>{if(!g)return;const n=M[t],s=ce[t];if(!n||!s?.isSavedBlock)return;const a=Rt(n,s,f,_);if(!a?.data)return;const{name:o,...i}=a.data,l=[...M];s.isLazy?l[t]={...n,section:i}:l[t]=i,m===t&&$t(),ft(l)},mo=t=>{if(!g)return;const n=[...M,{__resolveType:t.resolveType}],s=n.length-1;ft(n,{onError:()=>{ne.current.selectedSectionIndex===s&&$t()}}),Yt(!1),L(s),ut(0),N([]),T(l=>l+1);const a=n[s],o=wn(n,f,_)[s];if(!a||!o)return;if(o.isMultivariate){_t(a,o,0);return}const i=Rt(a,o,f,_);if(!i){A(null),W(null),Ge(null),Le(null);return}A(i.data),W(i.resolveType),Ge(null),Le(null)},ar=t=>{En.current=t.append,Yt(!0)},po=t=>{const n=En.current;if(!n){mo(t);return}n({__resolveType:t.resolveType}),Yt(!1),En.current=null},or=t=>{if(m===null)return;const n=M[m],s=ce[m];!n||!s?.isMultivariate||(ut(t),N([]),T(a=>a+1),_t(n,s,t,m,!0))},ho=t=>{if(m===null||!g)return;const n=M[m],s=ce[m];if(!n||!s?.isMultivariate)return;const a=st(n,s);if(!a)return;const o=ci(a,t);if(!o){q.error(c("sectionsEditor.sectionsEditor.cannotDeleteOnlyVariant"));return}const i=[...M];i[m]=Kt(n,s,o);const l=o.variants;let d=Ie;t===Ie?d=Math.min(t,l.length-1):t<Ie&&(d=Ie-1),ut(d),N([]),T(E=>E+1),_t(i[m],s,d),ft(i)},go=t=>{if(m===null||!g)return;const n=M[m],s=ce[m];if(!n||!s?.isMultivariate)return;const a=st(n,s);if(!a)return;const o=ui(a,t,_),i=[...M];i[m]=Kt(n,s,o);const l=Yr(a.variants??[],t,_);ut(l),N([]),T(d=>d+1),_t(i[m],s,l,m,_),ft(i)},vo=(t,n)=>{if(m===null||!g||t===n)return;const s=M[m],a=ce[m];if(!s||!a?.isMultivariate)return;const o=st(s,a);if(!o)return;const i=ii(o,t,n),l=[...M];l[m]=Kt(s,a,i);let d=Ie;Ie===t?d=n:t<Ie&&n>=Ie?d=Ie-1:t>Ie&&n<=Ie&&(d=Ie+1),ut(d),_t(l[m],a,d,m,_),ft(l)},yn=t=>{const n=t??m;if(n===null||!g)return;const s=M[n],a=ce[n];if(!s||!a)return;const o=oi(s,a,void 0,u,_);if(!o){q.error(c("sectionsEditor.sectionsEditor.sectionCannotHaveVariants"));return}const i=[...M];i[n]=o.section;const l=wn(i,f,_)[n];if(!l?.isMultivariate){q.error(c("sectionsEditor.sectionsEditor.couldNotAddVariant"));return}L(n),ut(o.newVariantIndex),N([]),T(d=>d+1),_t(o.section,l,o.newVariantIndex,n,_),ft(i)},ir=()=>{if(m===null||!g)return;const t=M[m],n=ce[m];if(!t||!n?.isMultivariate)return;const s=st(t,n);if(!s)return;const a=li(t,n,s);if(!a){q.error(c("sectionsEditor.sectionsEditor.couldNotRemoveVariants"));return}const o=[...M];o[m]=a;const i=wn(o,f,_)[m];if(!i)return;ut(0),Ge(null),Le(null),N([]),T(d=>d+1);const l=Rt(a,i,f,_);l?(A(l.data),W(l.resolveType)):(A(null),W(null)),zt(null,m,0),ft(o)},So=async t=>{if(Fe===null||!g)return;const n=Yn(t,f,u);if(n){q.error(n);return}const s=M[Fe],a=ce[Fe];if(!s||!a)return;const o=Rt(s,a,f,_);if(!o){q.error(c("sectionsEditor.sectionsEditor.sectionCannotBeSavedAsGlobal"));return}const i={...o.data,name:t};try{const l=await D.mutateAsync({blockKey:t,data:i,create:!0}),d=[...M];d[Fe]={__resolveType:t},await D.mutateAsync({blockKey:g,data:an(f,g,d,J,le)}),m===Fe&&$t(),G(null),qn(l)||q.success(c("sectionsEditor.sectionsEditor.savedGlobalBlock",{blockId:t})),k?.()}catch(l){q.error(c("sectionsEditor.sectionsEditor.failedToSaveGlobalBlock"),{description:Mt(c,Bt(l))})}},lr=ye?.rule;if(St&&m===null&&Z===null&&lr){const{resolveType:t,formValue:n}=qt(lr,f??{},u??void 0);ee(t),Y(n)}const nn=u?Ui(u):[],ls=u&&f?Yi(u,f):[],Ht=_&&u&&f?_l(u,f):[],cs=(t,n)=>{if(Ht.length===0)return;const s=Pl(t);return{kinds:Ht,selected:s,campaignPrefill:kl(t),onPick:n}},cr=!$&&!!(it&&u&&f),ur=Z&&u?Gn(Z,u):null,yt=()=>{gt.current&&(clearTimeout(gt.current),gt.current=null),vt.current&&(clearTimeout(vt.current),vt.current=null)},kt=async(t,n)=>{if(!(Dl(n,t,u)>0))try{await Cn.mutateAsync({blockKey:t})}catch(s){q.error(c("sectionsEditor.sectionsEditor.couldNotDeleteMatcherBlock"),{description:Mt(c,Bt(s))})}},dr=t=>{gt.current&&clearTimeout(gt.current),gt.current=setTimeout(()=>{const{activePageKey:n,decofile:s,variantIndex:a}=ne.current;if(!n)return;const o={...s[n]},i={...o.sections},l=[...i.variants??[]],d=l[a],E=d?.rule;if(Gt(E,s,u)){const h=E?.__resolveType??"",x=s[h],j=typeof x?.name=="string"?x.name:h,{__resolveType:I,...P}=t;D.mutate({blockKey:h,data:Dt(I??"",P,j)},{onSuccess:()=>k?.(),onError:D.reportError});return}d&&(l[a]={...d,rule:t}),o.sections={...i,variants:l},D.mutate({blockKey:n,data:o},{onSuccess:()=>k?.(),onError:D.reportError})},_n)},fr=t=>{ee(t);const n=t?ha(t,u):{__resolveType:Ur(u)};Y(t?n:{}),dr(n)},mr=t=>{const n=t;Y(n);const s=Z?{__resolveType:Z,...n}:{...n};dr(s)},In=async(t,n,s)=>{const a=wl(n,t);if(!a.ok)return a.reason==="conflict"&&q.info(t.kind==="experiments"?c("sectionsEditor.namedRulePicker.conflictTests"):c("sectionsEditor.namedRulePicker.conflictCampaigns"),ma),null;const o={};if(s){const i=s(a.rule);if(!i)return null;o[i.blockKey]=i.data}return a.blockWrite&&(o[a.blockWrite.blockKey]=a.blockWrite.block),Object.keys(o).length>0&&!(await Is.apply({writes:o})).ok?null:(a.blockWrite&&q.success(t.kind==="experiments"?c("sectionsEditor.namedRulePicker.createdTest",{name:t.name.trim()}):c("sectionsEditor.namedRulePicker.createdCampaign",{name:t.name.trim()}),{...ma,description:c("sectionsEditor.namedRulePicker.createdHint")}),{rule:a.rule,projected:{...n,...o}})},pr=Ht.length>0?{kinds:Ht,prepare:async t=>(await In(t,ne.current.decofile,void 0))?.rule??null,ensureBlock:async t=>{const n=Kl(ne.current.decofile,t);return n.kind==="saved"?!0:n.kind==="conflict"?!1:(await Is.apply({writes:{[Ml(t).blockKey]:n.block}})).ok}}:null,hr=async t=>{yt();const{activePageKey:n,decofile:s,variantIndex:a}=ne.current;if(!n)return;let o=null;const i=await In(t,s,E=>{const h=s[n],x=h?.sections;if(!x||typeof x!="object"||Array.isArray(x))return null;const j=x;if(!Array.isArray(j.variants))return null;const I=[...j.variants],P=I[a];return P?(o=bt(P.rule,s,u),I[a]={...P,rule:E},{blockKey:n,data:{...h,sections:{...j,variants:I}}}):null});if(!i)return;const{resolveType:l,formValue:d}=qt(i.rule,i.projected,u??void 0);ee(l),Y(d),o&&await kt(o,i.projected),k?.()},gr=async t=>{yt();const{activePageKey:n,decofile:s,variantIndex:a}=ne.current;if(!n)return;const o=s[n],i=o?.sections;if(!i||typeof i!="object"||Array.isArray(i))return;const l=i;if(!Array.isArray(l.variants))return;const d=[...l.variants],E=d[a];if(!E)return;const h=bt(E.rule,s,u),x=ln(t);d[a]={...E,rule:x};const j={...s,[n]:{...o,sections:{...l,variants:d}}},{resolveType:I,formValue:P}=qt(x,j,u??void 0);ee(I),Y(P);try{await D.mutateAsync({blockKey:n,data:j[n]}),h&&h!==t&&await kt(h,j),k?.()}catch(pe){q.error(c("sectionsEditor.sectionsEditor.couldNotApplySavedRule"),{description:Mt(c,Bt(pe))})}},vr=t=>{vt.current&&clearTimeout(vt.current);const{selectedSectionIndex:n,sectionVariantIndex:s}=ne.current;n!==null&&(vt.current=setTimeout(()=>{const{rawSections:a,parsedSections:o,decofile:i,activePageKey:l,pageVariants:d,variantIndex:E}=ne.current;if(!l)return;const h=a[n],x=o[n];if(!h||!x?.isMultivariate)return;const j=st(h,x);if(!j)return;const P=(j.variants??[])[s]?.rule;if(Gt(P,i,u)){const z=P?.__resolveType??"",H=i[z],re=typeof H?.name=="string"?H.name:z,{__resolveType:he,...Ae}=t;D.mutate({blockKey:z,data:Dt(he??"",Ae,re)},{onSuccess:()=>k?.(),onError:D.reportError});return}const pe=vs(j,s,t),ue=[...a];ue[n]=Kt(h,x,pe);const be=an(i,l,ue,E,d);D.mutate({blockKey:l,data:be},{onSuccess:()=>k?.(),onError:D.reportError})},_n))},yo=t=>{Ge(t);const n=t?ha(t,u):{__resolveType:Ur(u)};Le(t?n:{}),vr(n)},bo=t=>{const n=t;Le(n);const s=Qt?{__resolveType:Qt,...n}:{...n};vr(s)},xo=async t=>{yt();const{selectedSectionIndex:n,sectionVariantIndex:s,rawSections:a,parsedSections:o,decofile:i,activePageKey:l,pageVariants:d,variantIndex:E}=ne.current;if(n===null||!l)return;let h=null;const x=await In(t,i,P=>{const pe=a[n],ue=o[n];if(!pe||!ue?.isMultivariate)return null;const be=st(pe,ue);if(!be)return null;const z=be.variants??[];h=bt(z[s]?.rule,i,u);const H=[...a];return H[n]=Kt(pe,ue,vs(be,s,P)),{blockKey:l,data:an(i,l,H,E,d)}});if(!x)return;const{resolveType:j,formValue:I}=qt(x.rule,x.projected,u??void 0);Ge(j),Le(I),h&&await kt(h,x.projected),k?.()},_o=async t=>{yt();const{selectedSectionIndex:n,sectionVariantIndex:s,rawSections:a,parsedSections:o,decofile:i,activePageKey:l,pageVariants:d,variantIndex:E}=ne.current;if(n===null||!l)return;const h=a[n],x=o[n];if(!h||!x?.isMultivariate)return;const j=st(h,x);if(!j)return;const I=j.variants??[],P=bt(I[s]?.rule,i,u),pe=ln(t),ue=vs(j,s,pe),be=[...a];be[n]=Kt(h,x,ue);const z=an(i,l,be,E,d),H={...i,[l]:z},{resolveType:re,formValue:he}=qt(pe,H,u??void 0);Ge(re),Le(he);try{await D.mutateAsync({blockKey:l,data:z}),P&&P!==t&&await kt(P,H),k?.()}catch(Ae){q.error(c("sectionsEditor.sectionsEditor.couldNotApplySavedRule"),{description:Mt(c,Bt(Ae))})}};if(!$&&!se)return r.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:c("sectionsEditor.sectionsEditor.noPageFound",{currentPath:V})});if($&&!Kn)return r.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:c("sectionsEditor.sectionsEditor.globalBlockNotFound")});const je=m!==null?ce[m]??null:null,Sr=m!==null?M[m]:null,yr=Sr&&je?.isMultivariate?st(Sr,je):null,At=yr?qr(yr,we):[],Ln=Math.min(Ie,Math.max(At.length-1,0)),jt=At[Ln]??null,Nt=je?.isMultivariate===!0,us=m!==null&&je!==null,Ct=us&&(Nt||!!(Fn&&et)),ko=Ct&&!$&&je?.isSavedBlock===!0,mt=$||ko,br=$?Hs:je?.label??"",wo=Qt&&u?Gn(Qt,u):null,xr=(t,n)=>n&&X?`${t} · ${n}`:t,_r=je?je.variantOf??je.label:"",jo=(()=>{const t=Nt&&jt?jt.label:null;return t?X?[xr(_r,t)]:[je.label,t]:[je?.label??""]})(),ds=xr(se?.name??"",St?ye?.label:null),On=Ct&&(!$||O.length>0)?$?[Hs,...O]:[ds,...jo,...O]:[],kr=Te&&se?[se.name,"SEO",...Ps]:[],wr=c("sectionsEditor.pageVariantTabs.variantsLabel"),jr=Zt&&se?[se.name,wr]:Ft&&se&&je?[ds,_r,wr]:[],zn=jr.length>0?jr:kr.length>0?kr:mt?On.length>0?On:[br]:On.length>0?On:[ds],Rr=us&&!Nt&&!je?.isHidden&&!!g,Ro=mt||!$&&St&&!!ye||Rr,Eo=us&&!Nt&&!$&&O.length===0&&!!je&&Ra(je)&&!!g,Vo=X&&Ct&&!Ft&&Nt&&O.length===0&&!!jt,Er=X&&O.length>0?na(O[O.length-1]):null,To=O.length>1?na(O[O.length-2]):null,Vr=mt?br:Ct?je?.label??"":se?.name??"",Ao=Zt||Ft?c("sectionsEditor.pageVariantTabs.variantsLabel"):Te?c("sectionsEditor.panelSections.seo"):Er??Vr,Tr=Ft?je?.variantOf??je?.label??"":Zt||Te?se?.name??"":Er?To??Vr:mt?c("sectionsEditor.sectionsEditor.globalSectionSubtitle"):Ct?se?.name??"":se?.path??"",fs=!Zt&&!Ft&&!Te&&!Ct&&!mt,No=!X&&!Te&&!$&&Nt&&O.length===0,bn=()=>{if(!g)return;yt(),C.current&&(clearTimeout(C.current),C.current=null),Se.current.clear();const t=f[g],n=Cl(t.sections,M,u,_);if(!n)return;const{sections:s,newVariantIndex:a}=n;D.mutate({blockKey:g,data:{...t,sections:s}},{onSuccess:()=>{fe(a),L(null),A(null),W(null),N([]),Y(null),ee(null)},onError:D.reportError})},$n=(t,n,s)=>{if(!g)return;yt(),C.current&&(clearTimeout(C.current),C.current=null),Se.current.clear();const a=f[g],o=a.sections;if(!o||typeof o!="object"||Array.isArray(o))return;const i=o;if(!Array.isArray(i.variants))return;const l=t([...i.variants]);if(!l)return;const d=Bl(i,l),E={...f,[g]:{...a,sections:d}};D.mutate({blockKey:g,data:E[g]},{onSuccess:()=>{n?.();const h=typeof s=="string"?[s]:s??[];(async()=>{for(const x of h)await kt(x,E)})()},onError:D.reportError})},Ar=(t,n)=>{if(t===n)return;let s=J;J===t?s=n:t<J&&n>=J?s=J-1:t>J&&n<=J&&(s=J+1),fe(s);const a=Zn(le.map(o=>({rule:o.rule})),t,n);rs(a,s),$n(o=>Zn(o,t,n))},Nr=t=>{const n=le[t]?.rule,s=bt(n,f??{},u??void 0);$n(a=>a.length<=1?null:(a.splice(t,1),a),()=>{le.length-1===1?fe(0):t<J?fe(J-1):t===J&&fe(Math.max(0,t-1)),L(null),A(null),W(null),N([]),Y(null),ee(null)},s)},Co=()=>{const t=le.map((n,s)=>({variant:n,index:s})).filter(({variant:n})=>!pi(n.rule)).map(({variant:n})=>bt(n.rule,f??{},u??void 0)).filter(n=>!!n);$n(n=>{const s=Ai({variants:n}),a=n[s];return a?[{...a,rule:Ni(u)}]:null},()=>{fe(0),L(null),A(null),W(null),N([]),Y(null),ee(null),Tn(!1)},t)},Cr=t=>{let n=t+1;$n(s=>(n=Yr(s,t,_),Fl(s,t,_)),()=>{fe(n),L(null),A(null),W(null),N([]),Y(null),ee(null)})},Po=async(t,n)=>{yt(),C.current&&(clearTimeout(C.current),C.current=null),Se.current.clear();const s=ne.current.activePageKey,a=ne.current.decofile;if(!s)return;const o=a[s],i=o.sections;if(!i||typeof i!="object"||Array.isArray(i))return;const l=i;if(!Array.isArray(l.variants))return;const d=[...l.variants],E=d[t];if(!E?.rule||typeof E.rule!="object"){q.error(c("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"));return}const h=E.rule,x=n.trim();en(!0);try{if(!x){if(!Gt(h,a,u)){Ve(null);return}const z=h.__resolveType??"";d[t]={...E,rule:ks(h,a,u)};const H={...a,[s]:{...o,sections:{...l,variants:d}}};await D.mutateAsync({blockKey:s,data:H[s]}),await kt(z,H),Ve(null),k?.();return}const j=ws(h,a,u);if(!j){q.error(c("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"));return}if(j.blockKey){await D.mutateAsync({blockKey:j.blockKey,data:Dt(j.resolveType,j.data,x)}),Ve(null),k?.();return}const I=Un(x),P=Yn(I,a,u);if(P){q.error(P);return}const pe=Dt(j.resolveType,j.data,x);let ue=null,be=!1;try{const z=await D.mutateAsync({blockKey:I,data:pe,create:!0});be=qn(z),ue=be?null:I,d[t]={...E,rule:ln(I)},await D.mutateAsync({blockKey:s,data:{...o,sections:{...l,variants:d}}}),ue=null}catch(z){throw ue&&await Cn.mutateAsync({blockKey:ue}).catch(()=>{}),z}Ve(null),be||q.success(c("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:x})),k?.()}catch(j){q.error(c("sectionsEditor.sectionsEditor.failedToRenameVariant"),{description:Mt(c,Bt(j))})}finally{en(!1)}},Ko=async(t,n)=>{yt(),C.current&&(clearTimeout(C.current),C.current=null),Se.current.clear();const{selectedSectionIndex:s,rawSections:a,parsedSections:o,decofile:i,activePageKey:l,pageVariants:d,variantIndex:E}=ne.current;if(s===null||!l)return;const h=a[s],x=o[s];if(!h||!x?.isMultivariate)return;const j=st(h,x);if(!j)return;const I=j.variants??[],P=I[t];if(!P?.rule||typeof P.rule!="object"){q.error(c("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"));return}const pe=P.rule,ue=n.trim();en(!0);const be=async z=>{const H={...j,variants:z},re=[...a];re[s]=Kt(h,x,H);const he=an(i,l,re,E,d);return await D.mutateAsync({blockKey:l,data:he}),{...i,[l]:he}};try{if(!ue){if(!Gt(pe,i,u)){nt(null);return}const pt=pe.__resolveType??"",Xe=[...I];Xe[t]={...P,rule:ks(pe,i,u)};const Pt=await be(Xe);await kt(pt,Pt),nt(null),k?.();return}const z=ws(pe,i,u);if(!z){q.error(c("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"));return}if(z.blockKey){await D.mutateAsync({blockKey:z.blockKey,data:Dt(z.resolveType,z.data,ue)}),nt(null),k?.();return}const H=Un(ue),re=Yn(H,i,u);if(re){q.error(re);return}const he=Dt(z.resolveType,z.data,ue);let Ae=null,sn=!1;try{const pt=await D.mutateAsync({blockKey:H,data:he,create:!0});sn=qn(pt),Ae=sn?null:H;const Xe=[...I];Xe[t]={...P,rule:ln(H)},await be(Xe),Ae=null}catch(pt){throw Ae&&await Cn.mutateAsync({blockKey:Ae}).catch(()=>{}),pt}nt(null),sn||q.success(c("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:ue})),k?.()}catch(z){q.error(c("sectionsEditor.sectionsEditor.failedToRenameVariant"),{description:Mt(c,Bt(z))})}finally{en(!1)}},Pr=async(t,n,s)=>{A(s);try{await D.mutateAsync({blockKey:t,data:s})}catch(a){throw A(o=>o===s?n:o),a}},Mo={rename:async(t,n,s)=>{yt(),C.current&&(clearTimeout(C.current),C.current=null),Se.current.clear();const{activePageKey:a,decofile:o}=ne.current;if(!a)return;const i=Array.isArray(t.variants)?[...t.variants]:[],l=i[n],d=l?.rule&&typeof l.rule=="object"?l.rule:void 0,E=async x=>{const j={...t,variants:x};return await Pr(a,t,j),{...o,[a]:j}},h=wc(d,s,o,u);if(h.kind!=="noop"){if(h.kind==="error"){q.error(h.reason==="no-matcher-rule"?c("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"):h.reason==="unreadable-rule"?c("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"):h.message??c("sectionsEditor.sectionsEditor.failedToRenameVariant"));return}en(!0);try{if(h.kind==="inline"){const I=[...i];I[n]={...l,rule:h.inlinedRule};const P=await E(I);await kt(h.blockKey,P),k?.();return}if(h.kind==="updateBlock"){await D.mutateAsync({blockKey:h.blockKey,data:h.blockData}),k?.();return}let x=null,j=!1;try{const I=await D.mutateAsync({blockKey:h.blockId,data:h.blockData,create:!0});j=qn(I),x=j?null:h.blockId;const P=[...i];P[n]={...l,rule:h.reference},await E(P),x=null}catch(I){throw x&&await Cn.mutateAsync({blockKey:x}).catch(()=>{}),I}j||q.success(c("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:s.trim()})),k?.()}catch(x){q.error(c("sectionsEditor.sectionsEditor.failedToRenameVariant"),{description:Mt(c,Bt(x))})}finally{en(!1)}}},selectGlobal:async(t,n,s)=>{yt(),C.current&&(clearTimeout(C.current),C.current=null),Se.current.clear();const{activePageKey:a,decofile:o}=ne.current;if(!a)return;const i=Array.isArray(t.variants)?[...t.variants]:[],l=i[n];if(!l)return;const d=bt(l.rule,o,u);i[n]={...l,rule:ln(s)};const E={...t,variants:i},h={...o,[a]:E};try{await Pr(a,t,E),d&&d!==s&&await kt(d,h),k?.()}catch(x){q.error(c("sectionsEditor.sectionsEditor.couldNotApplySavedRule"),{description:Mt(c,Bt(x))})}},selectNamedRule:async(t,n,s)=>{yt(),C.current&&(clearTimeout(C.current),C.current=null),Se.current.clear();const{activePageKey:a,decofile:o}=ne.current;if(!a)return;let i=null,l=null;const d=await In(s,o,E=>{const h=Array.isArray(t.variants)?[...t.variants]:[],x=h[n];return x?(i=bt(x.rule,o,u),h[n]={...x,rule:E},l={...t,variants:h},{blockKey:a,data:l}):null});!d||!l||(A(l),i&&await kt(i,d.projected),k?.())}},Kr=()=>{$t()},Mr=t=>{un(t),is({inner:t})},Br=t=>{Nn(t),is({raw:t})},Dr=()=>{un(null),It([])},Fr=()=>Jt(t=>t+1),Ir=()=>{dn.flush(),cn(!1),un(null),Nn(void 0),It([]),Jt(t=>t+1),ge?.()},Bo=()=>{Tn(!1),An(!1),L(null),cn(!0)},Do=()=>{Te&&Ir(),L(null),Tn(!0)},Fo=()=>An(!0),ms=t=>{if(Zt&&t===0){Tn(!1);return}if(Ft&&t<2){An(!1),t===0&&L(null);return}if(Te){if(t===0){Ir();return}if(t===1){It([]),Jt(s=>s+1);return}It(Ps.slice(0,t-1)),Jt(s=>s+1);return}if($){N(O.slice(0,t)),T(s=>s+1);return}if(t===0){Kr();return}if(t===1){N([]),T(s=>s+1);return}const n=!X&&Nt&&jt?1:0;if(n===1&&t===2){N([]),T(s=>s+1);return}N(O.slice(0,t-1-n))},ps=zn.length>1?r.jsx("button",{type:"button",onClick:()=>ms(ol(zn.length,{isMultivariateSectionTop:No})),title:c("sectionsEditor.sectionsEditor.back"),"aria-label":c("sectionsEditor.sectionsEditor.back"),className:ae("shrink-0 inline-flex size-6 items-center justify-center rounded-[var(--studio-control-radius,var(--radius-md))] transition-colors",mt?"text-foreground/80 hover:bg-global-section/15":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:r.jsx(dl,{className:"size-4"})}):null,Io=mt||Ct||Te?Ro&&r.jsxs("div",{className:ae("border-b px-3 py-2.5",mt&&"border-global-section/22 bg-global-section/12 dark:bg-global-section/16"),children:[r.jsxs("div",{className:"flex min-w-0 items-center gap-2 overflow-hidden",children:[!$&&St&&ye&&r.jsxs("button",{type:"button",onClick:Kr,title:c("sectionsEditor.sectionsEditor.editingInVariant",{variant:ye.label}),className:ae("shrink-0 inline-flex items-center gap-1 rounded-lg h-6 px-1.5 text-xs font-medium cursor-pointer transition-opacity hover:opacity-80",Ji),children:[r.jsx(Zi,{rule:xs(ye.rule,f??{},u??void 0),matchers:nn}),r.jsx("span",{className:"max-w-[160px] truncate",children:ye.label})]}),r.jsx("div",{className:"flex-1"}),mt&&r.jsxs(Et,{children:[r.jsx(Vt,{asChild:!0,children:r.jsx("span",{className:"shrink-0 cursor-help",children:r.jsx(Jn,{className:"size-4 text-global-section-fg dark:text-global-section-fg-dark"})})}),r.jsx(Tt,{side:"bottom",className:"max-w-[260px]",children:c("sectionsEditor.sectionsEditor.globalSectionTooltip")})]}),Rr&&r.jsx(Wn,{onClick:()=>yn()})]}),mt&&r.jsx("p",{className:"mt-1.5 py-1.5 pl-1 text-sm leading-snug text-foreground",children:c("sectionsEditor.sectionsEditor.globalSectionBanner")})]}):r.jsxs("div",{className:"flex items-center gap-2 border-b px-3 py-2.5",children:[r.jsx("div",{className:"flex-1 min-w-0",children:r.jsx(sa,{pageKey:g,initialName:se.name,initialPath:se.path,onFieldChange:rr,variant:"header"})}),r.jsxs(Et,{children:[r.jsx(Vt,{asChild:!0,children:r.jsx(Ut,{type:"button",variant:"ghost",size:"icon-sm","aria-label":c("sectionsEditor.sectionsEditor.editSeo"),className:"shrink-0",onClick:()=>cn(!0),children:r.jsx(da,{size:14})})}),r.jsx(Tt,{side:"bottom",children:c("sectionsEditor.sectionsEditor.editSeo")})]}),r.jsxs(Et,{children:[r.jsx(Vt,{asChild:!0,children:r.jsx(Ut,{type:"button",variant:"ghost",size:"icon-sm","aria-label":c("sectionsEditor.sectionsEditor.viewJson"),className:"shrink-0",onClick:()=>Oe&&g?Oe():Xn(!0),children:r.jsx(fa,{size:14})})}),r.jsx(Tt,{side:"bottom",children:c("sectionsEditor.sectionsEditor.viewJson")})]}),r.jsx(Wn,{onClick:bn})]}),Lo=r.jsxs(r.Fragment,{children:[St&&g&&r.jsx(ra,{listKey:g,variants:le,activeIndex:J,decofile:f??{},meta:u,matchers:nn,onSelect:hn,onReorder:Ar,onRename:Ve,onDuplicate:Cr,onDelete:Nr,onAdd:bn}),St&&Z!==null&&r.jsx(aa,{className:"mt-3",children:r.jsx("div",{className:ae("space-y-3",Xt&&"pointer-events-none opacity-50"),children:r.jsx(ys,{currentRt:Z,currentLabel:kn(ye?.rule,f??{},we,u??void 0),currentGlobalKey:bt(ye?.rule,f??{},u??void 0)??void 0,matchers:nn,globals:ls,onSelect:fr,onSelectGlobal:gr,named:cs(ye?.rule,hr),namedRow:bs(ye?.rule,Ht),rule:ye?.rule,schema:ur,formValue:De,onChange:mr,formKey:`${J}:${Z??""}`,formWrapperClassName:"space-y-3",meta:u??void 0,decofile:f,onSaveReferencedBlock:fn,sandbox:gn})})})]}),Lr=r.jsxs(r.Fragment,{children:[r.jsx(Qi,{listKey:`${g??""}:${m??""}`,variants:At.map((t,n)=>({index:n,label:t.label})),selectedIndex:Ln,onSelect:or,onRename:nt,onDuplicate:go,onDelete:ho,onRemoveAll:ir,onReorder:vo,onAdd:()=>yn()}),r.jsx(aa,{children:r.jsx(ys,{currentRt:Qt??"",currentLabel:kn(jt?.rule,f??{},we,u??void 0),currentGlobalKey:bt(jt?.rule,f??{},u??void 0)??void 0,matchers:nn,globals:ls,onSelect:yo,onSelectGlobal:_o,named:cs(jt?.rule,xo),namedRow:bs(jt?.rule,Ht),rule:jt?.rule,schema:wo,formValue:Ba,onChange:bo,formKey:`${m??"none"}:${Ln}:${Qt??""}`,formWrapperClassName:"pt-1",meta:u??void 0,decofile:f,onSaveReferencedBlock:fn,sandbox:gn})})]}),Or=r.jsx("div",{className:ae(X?"px-2":"p-2 pt-3"),children:r.jsx(_c,{listKey:`${g??""}-${J}`,rawSections:M,sections:ce,meta:u,decofile:f,selectedIndex:m,onSelect:ao,onReorder:oo,onDelete:io,onDuplicate:lo,onMakeReusable:G,onToggleHidden:co,onToggleLazy:ot?uo:void 0,onAddVariant:yn,onDetach:fo,onAddSection:()=>Yt(!0),canAddSection:cr})}),Oo=r.jsxs("div",{className:"min-w-0 max-w-full space-y-4 overflow-x-hidden px-3",children:[g&&se&&r.jsx(sa,{pageKey:g,initialName:se.name,initialPath:se.path,onFieldChange:rr}),Ot&&g?r.jsx(ya,{rawSeo:Mn,innerSeo:ss,defaultResolveType:qs,seoTypesLoading:_&&!u,seoSchema:Gs,activeResolveType:Bn,seoTypeOptions:Ws,formResetKey:Ks,siteDefaultSeo:Us,onBreadcrumbChange:It,onPersistRaw:Br,onInnerChange:Mr,onClearForm:Dr,onBumpFormKey:Fr,asyncRenderAvailable:ot}):r.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:c("sectionsEditor.sectionsEditor.seoSchemaNotFound")})]}),zo=r.jsx(on,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:r.jsx("div",{className:"min-w-0 max-w-full overflow-x-hidden px-6 py-4",children:r.jsx("div",{className:"mx-auto max-w-2xl",children:Ot&&g?r.jsx(ya,{rawSeo:Mn,innerSeo:ss,defaultResolveType:qs,seoTypesLoading:_&&!u,seoSchema:Gs,activeResolveType:Bn,seoTypeOptions:Ws,formResetKey:Ks,siteDefaultSeo:Us,onBreadcrumbChange:It,onPersistRaw:Br,onInnerChange:Mr,onClearForm:Dr,onBumpFormKey:Fr,asyncRenderAvailable:ot}):r.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:c("sectionsEditor.sectionsEditor.seoSchemaNotFound")})})})},"editor-seo"),$o=r.jsxs(on,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[St&&g&&r.jsx(ra,{listKey:g,variants:le,activeIndex:J,decofile:f??{},meta:u,matchers:nn,onSelect:hn,onReorder:Ar,onRename:Ve,onDuplicate:Cr,onDelete:Nr,onAdd:bn}),St&&Z!==null&&r.jsxs("div",{className:ae("px-3 border-b",Vn?"pt-3 pb-5 space-y-3":"py-2"),children:[r.jsxs("button",{type:"button",onClick:()=>Ka(t=>!t),className:"flex w-full items-center justify-between gap-2 text-left cursor-pointer rounded-[var(--studio-control-radius,var(--radius-sm))] py-0.5 hover:bg-accent","aria-expanded":Vn,children:[r.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:c("sectionsEditor.sectionsEditor.variantRule")}),Vn?r.jsx(ll,{className:"size-3.5 shrink-0 text-muted-foreground"}):r.jsx(cl,{className:"size-3.5 shrink-0 text-muted-foreground"})]}),Vn&&r.jsx("div",{className:ae("space-y-3",Xt&&"pointer-events-none opacity-50"),children:r.jsx(ys,{currentRt:Z,currentLabel:kn(ye?.rule,f??{},we,u??void 0),currentGlobalKey:bt(ye?.rule,f??{},u??void 0)??void 0,matchers:nn,globals:ls,onSelect:fr,onSelectGlobal:gr,named:cs(ye?.rule,hr),namedRow:bs(ye?.rule,Ht),rule:ye?.rule,schema:ur,formValue:De,onChange:mr,formKey:`${J}:${Z??""}`,formWrapperClassName:"space-y-3",meta:u??void 0,decofile:f,onSaveReferencedBlock:fn,sandbox:gn})})]}),Or]},"editor-section-list");return r.jsx(Xi,{value:_,children:r.jsx(el,{children:r.jsxs("div",{className:"flex h-full min-w-0 w-full flex-col",children:[!X&&ps&&r.jsx("div",{className:"flex min-w-0 shrink-0 items-center gap-2 px-3 py-2",children:ps}),(X||zn.length>1)&&r.jsx(tl,{crumbs:zn,onSelect:ms,onSelectRoot:()=>{dn.flush(),Ue?Ue():ms(0)}}),r.jsx("div",{className:"shrink-0",children:X?r.jsxs("div",{className:ae("flex items-center gap-2 border-b px-3 py-2.5",mt&&"border-global-section/22 bg-global-section/12 dark:bg-global-section/16"),children:[X&&ps,mt&&r.jsxs(Et,{children:[r.jsx(Vt,{asChild:!0,children:r.jsx("span",{className:"shrink-0 cursor-help",children:r.jsx(Jn,{className:"size-4 text-global-section-fg dark:text-global-section-fg-dark"})})}),r.jsx(Tt,{side:"bottom",className:"max-w-[260px]",children:c("sectionsEditor.sectionsEditor.globalSectionTooltip")})]}),r.jsxs("div",{className:"flex min-w-0 flex-1 flex-col leading-tight",children:[r.jsx("span",{className:"truncate text-sm font-semibold",children:Ao}),Tr&&r.jsx("span",{className:"truncate text-xs text-muted-foreground",children:Tr})]}),fs&&St&&ye&&r.jsx(oa,{variants:le,activeIndex:J,onSelect:hn,onManage:Do,onRemoveAll:Co}),Vo&&r.jsx(oa,{variants:At,activeIndex:Ln,onSelect:or,onManage:Fo,onRemoveAll:ir}),fs&&!St&&r.jsx(Wn,{onClick:bn}),Eo&&r.jsx(Wn,{onClick:()=>yn()}),r.jsx(nl,{}),fs&&r.jsxs(r.Fragment,{children:[r.jsxs(Et,{children:[r.jsx(Vt,{asChild:!0,children:r.jsx(Ut,{type:"button",variant:"outline",size:"icon-sm","aria-label":c("sectionsEditor.sectionsEditor.editSeo"),className:"shrink-0",onClick:Bo,children:r.jsx(da,{size:14})})}),r.jsx(Tt,{side:"bottom",children:c("sectionsEditor.sectionsEditor.editSeo")})]}),!Oe&&r.jsxs(Et,{children:[r.jsx(Vt,{asChild:!0,children:r.jsx(Ut,{type:"button",variant:"outline",size:"icon-sm","aria-label":c("sectionsEditor.sectionsEditor.viewJson"),className:"shrink-0",onClick:()=>Xn(!0),children:r.jsx(fa,{size:14})})}),r.jsx(Tt,{side:"bottom",children:c("sectionsEditor.sectionsEditor.viewJson")})]})]})]}):Io}),dt&&r.jsx(si,{open:!0,fields:ri(dt.plan,dt.target.schema),choices:dt.choices,changedAgain:dt.changedAgain,author:$s??null,authorPending:$s===void 0,fieldsAsLabeled:zs!==null,fresh:dt.fresh,onChoose:(t,n)=>ro({...dt.choices,[t]:n}),onApply:so},Ec(dt.formBase)),Ft?r.jsx(ia,{onAdd:()=>yn(),children:Lr},"editor-section-variants"):Ct?r.jsxs(on,{viewportRef:me,onBlur:Xs,className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[!X&&Nt&&At.length>0&&O.length===0&&Lr,r.jsx(pa,{value:pr,children:r.jsx(la,{value:$&&_?Be:null,children:r.jsx(ca,{activeSchema:Fn,formValue:et,formResetKey:Je,onFormChange:sr,onBreadcrumbChange:N,breadcrumbPath:O,emptyMessage:c("sectionsEditor.sectionsEditor.noEditableFieldsForVariant"),meta:u,decofile:f,onSaveReferencedBlock:fn,sandbox:gn,previewBaseUrl:at,onRequestAddSection:ar,onVariantMatcherOp:$?Mo:void 0})})})]},"editor-section-form"):$?r.jsx(on,{viewportRef:me,onBlur:Xs,className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:r.jsx(pa,{value:pr,children:r.jsx(la,{value:$&&_?Be:null,children:r.jsx(ca,{activeSchema:Fn,formValue:et,formResetKey:Je,onFormChange:sr,onBreadcrumbChange:N,breadcrumbPath:O,emptyMessage:c("sectionsEditor.sectionsEditor.noEditableFieldsForGlobalBlock"),meta:u,decofile:f,onSaveReferencedBlock:fn,sandbox:gn,previewBaseUrl:at,onRequestAddSection:ar})})})},"editor-global-block"):Te?X?r.jsx(on,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:r.jsx("div",{className:"p-3",children:Oo})},"editor-seo"):zo:Zt?r.jsx(ia,{onAdd:bn,children:Lo},"editor-variants"):X?r.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[r.jsx(on,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:r.jsx("div",{className:"py-2",children:Or})}),r.jsx("div",{className:"shrink-0 border-t p-2",children:r.jsx(Es,{canAddSection:cr,onAddSection:()=>Yt(!0)})})]},"editor-section-list"):$o,r.jsx(sl,{open:Fe!==null,onOpenChange:t=>{t||G(null)},defaultBlockId:Fe!==null?Un(ce[Fe]?.label??""):"",isPending:D.isPending,onSubmit:So}),it&&r.jsx(nc,{open:Pa,onOpenChange:t=>{Yt(t),t||(En.current=null)},meta:u,decofile:f,previewBaseUrl:at,onSelect:po}),Ts&&g&&f&&r.jsx(El,{open:Ts,onOpenChange:Xn,pageKey:g,decofile:f}),ie!==null&&r.jsx(ua,{open:!0,initialName:Gt(le[ie]?.rule,f??{},u??void 0)?kn(le[ie]?.rule,f??{},we,u??void 0):"",autoLabel:we(xs(le[ie]?.rule,f??{},u??void 0)),isPending:Xt,onSubmit:async t=>{await Po(ie,t)},onOpenChange:t=>{!t&&!Xt&&Ve(null)}}),Qe!==null&&r.jsx(ua,{open:!0,initialName:Gt(At[Qe]?.rule,f??{},u??void 0)?kn(At[Qe]?.rule,f??{},we,u??void 0):"",autoLabel:we(xs(At[Qe]?.rule,f??{},u??void 0)),isPending:Xt,onSubmit:async t=>{await Ko(Qe,t)},onOpenChange:t=>{!t&&!Xt&&nt(null)}})]})})})}export{mf as SectionsEditor};
@@ -1 +1 @@
1
- import{r as d,cu as rt,cv as _e,j as c,cw as st,cx as be,cy as k,cz as lt,cA as j,cB as N,cC as $,cD as at,bQ as Ee,cE as Re,cF as it,cG as ct,cH as dt,cI as ut,cJ as pt,cK as ft,cL as mt,cM as ht,cN as vt,cO as gt,cP as xt,cQ as St,c as ee,l as oe,ai as wt}from"./index-LISCRMKT.js";import{c as Ne}from"./index-BdQq_4o_.js";import{V as Ct}from"./index-KpWMq2p9.js";import{t as je,n as yt}from"./ChevronUp-D3pnxmNi.js";var It=[" ","Enter","ArrowUp","ArrowDown"],bt=[" ","Enter"],Q="Select",[de,ue,Tt]=it(Q),[ne]=vt(Q,[Tt,Re]),pe=Re(),[_t,G]=ne(Q),[Nt,Pt]=ne(Q),Me=r=>{const{__scopeSelect:e,children:t,open:o,defaultOpen:n,onOpenChange:l,value:s,defaultValue:a,onValueChange:i,dir:u,name:f,autoComplete:m,disabled:w,required:C,form:S}=r,p=pe(e),[g,y]=d.useState(null),[v,x]=d.useState(null),[F,M]=d.useState(!1),re=rt(u),[P,O]=_e({prop:o,defaultProp:n??!1,onChange:l,caller:Q}),[U,q]=_e({prop:s,defaultProp:a,onChange:i,caller:Q}),L=d.useRef(null),B=g?S||!!g.closest("form"):!0,[W,V]=d.useState(new Set),H=Array.from(W).map(E=>E.props.value).join(";");return c.jsx(st,{...p,children:c.jsxs(_t,{required:C,scope:e,trigger:g,onTriggerChange:y,valueNode:v,onValueNodeChange:x,valueNodeHasChildren:F,onValueNodeHasChildrenChange:M,contentId:be(),value:U,onValueChange:q,open:P,onOpenChange:O,dir:re,triggerPointerDownPosRef:L,disabled:w,children:[c.jsx(de.Provider,{scope:e,children:c.jsx(Nt,{scope:r.__scopeSelect,onNativeOptionAdd:d.useCallback(E=>{V(D=>new Set(D).add(E))},[]),onNativeOptionRemove:d.useCallback(E=>{V(D=>{const z=new Set(D);return z.delete(E),z})},[]),children:t})}),B?c.jsxs(et,{"aria-hidden":!0,required:C,tabIndex:-1,name:f,autoComplete:m,value:U,onChange:E=>q(E.target.value),disabled:w,form:S,children:[U===void 0?c.jsx("option",{value:""}):null,Array.from(W)]},H):null]})})};Me.displayName=Q;var Ae="SelectTrigger",Oe=d.forwardRef((r,e)=>{const{__scopeSelect:t,disabled:o=!1,...n}=r,l=pe(t),s=G(Ae,t),a=s.disabled||o,i=k(e,s.onTriggerChange),u=ue(t),f=d.useRef("touch"),[m,w,C]=ot(p=>{const g=u().filter(x=>!x.disabled),y=g.find(x=>x.value===s.value),v=nt(g,p,y);v!==void 0&&s.onValueChange(v.value)}),S=p=>{a||(s.onOpenChange(!0),C()),p&&(s.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return c.jsx(lt,{asChild:!0,...l,children:c.jsx(j.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":tt(s.value)?"":void 0,...n,ref:i,onClick:N(n.onClick,p=>{p.currentTarget.focus(),f.current!=="mouse"&&S(p)}),onPointerDown:N(n.onPointerDown,p=>{f.current=p.pointerType;const g=p.target;g.hasPointerCapture(p.pointerId)&&g.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(S(p),p.preventDefault())}),onKeyDown:N(n.onKeyDown,p=>{const g=m.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&w(p.key),!(g&&p.key===" ")&&It.includes(p.key)&&(S(),p.preventDefault())})})})});Oe.displayName=Ae;var De="SelectValue",ke=d.forwardRef((r,e)=>{const{__scopeSelect:t,className:o,style:n,children:l,placeholder:s="",...a}=r,i=G(De,t),{onValueNodeHasChildrenChange:u}=i,f=l!==void 0,m=k(e,i.onValueNodeChange);return $(()=>{u(f)},[u,f]),c.jsx(j.span,{...a,ref:m,style:{pointerEvents:"none"},children:tt(i.value)?c.jsx(c.Fragment,{children:s}):l})});ke.displayName=De;var Et="SelectIcon",Le=d.forwardRef((r,e)=>{const{__scopeSelect:t,children:o,...n}=r;return c.jsx(j.span,{"aria-hidden":!0,...n,ref:e,children:o||"▼"})});Le.displayName=Et;var Rt="SelectPortal",Be=r=>c.jsx(at,{asChild:!0,...r});Be.displayName=Rt;var J="SelectContent",Ve=d.forwardRef((r,e)=>{const t=G(J,r.__scopeSelect),[o,n]=d.useState();if($(()=>{n(new DocumentFragment)},[]),!t.open){const l=o;return l?Ee.createPortal(c.jsx(He,{scope:r.__scopeSelect,children:c.jsx(de.Slot,{scope:r.__scopeSelect,children:c.jsx("div",{children:r.children})})}),l):null}return c.jsx(ze,{...r,ref:e})});Ve.displayName=J;var A=10,[He,Y]=ne(J),jt="SelectContentImpl",Mt=gt("SelectContent.RemoveScroll"),ze=d.forwardRef((r,e)=>{const{__scopeSelect:t,position:o="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:l,onPointerDownOutside:s,side:a,sideOffset:i,align:u,alignOffset:f,arrowPadding:m,collisionBoundary:w,collisionPadding:C,sticky:S,hideWhenDetached:p,avoidCollisions:g,...y}=r,v=G(J,t),[x,F]=d.useState(null),[M,re]=d.useState(null),P=k(e,h=>F(h)),[O,U]=d.useState(null),[q,L]=d.useState(null),B=ue(t),[W,V]=d.useState(!1),H=d.useRef(!1);d.useEffect(()=>{if(x)return ut(x)},[x]),pt();const E=d.useCallback(h=>{const[T,...R]=B().map(_=>_.ref.current),[I]=R.slice(-1),b=document.activeElement;for(const _ of h)if(_===b||(_?.scrollIntoView({block:"nearest"}),_===T&&M&&(M.scrollTop=0),_===I&&M&&(M.scrollTop=M.scrollHeight),_?.focus(),document.activeElement!==b))return},[B,M]),D=d.useCallback(()=>E([O,x]),[E,O,x]);d.useEffect(()=>{W&&D()},[W,D]);const{onOpenChange:z,triggerPointerDownPosRef:K}=v;d.useEffect(()=>{if(x){let h={x:0,y:0};const T=I=>{h={x:Math.abs(Math.round(I.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(I.pageY)-(K.current?.y??0))}},R=I=>{h.x<=10&&h.y<=10?I.preventDefault():x.contains(I.target)||z(!1),document.removeEventListener("pointermove",T),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",T),document.addEventListener("pointerup",R,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",R,{capture:!0})}}},[x,z,K]),d.useEffect(()=>{const h=()=>z(!1);return window.addEventListener("blur",h),window.addEventListener("resize",h),()=>{window.removeEventListener("blur",h),window.removeEventListener("resize",h)}},[z]);const[fe,ae]=ot(h=>{const T=B().filter(b=>!b.disabled),R=T.find(b=>b.ref.current===document.activeElement),I=nt(T,h,R);I&&setTimeout(()=>I.ref.current.focus())}),me=d.useCallback((h,T,R)=>{const I=!H.current&&!R;(v.value!==void 0&&v.value===T||I)&&(U(h),I&&(H.current=!0))},[v.value]),he=d.useCallback(()=>x?.focus(),[x]),te=d.useCallback((h,T,R)=>{const I=!H.current&&!R;(v.value!==void 0&&v.value===T||I)&&L(h)},[v.value]),ie=o==="popper"?Se:Fe,se=ie===Se?{side:a,sideOffset:i,align:u,alignOffset:f,arrowPadding:m,collisionBoundary:w,collisionPadding:C,sticky:S,hideWhenDetached:p,avoidCollisions:g}:{};return c.jsx(He,{scope:t,content:x,viewport:M,onViewportChange:re,itemRefCallback:me,selectedItem:O,onItemLeave:he,itemTextRefCallback:te,focusSelectedItem:D,selectedItemText:q,position:o,isPositioned:W,searchRef:fe,children:c.jsx(ft,{as:Mt,allowPinchZoom:!0,children:c.jsx(mt,{asChild:!0,trapped:v.open,onMountAutoFocus:h=>{h.preventDefault()},onUnmountAutoFocus:N(n,h=>{v.trigger?.focus({preventScroll:!0}),h.preventDefault()}),children:c.jsx(ht,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:h=>h.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:c.jsx(ie,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:h=>h.preventDefault(),...y,...se,onPlaced:()=>V(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:N(y.onKeyDown,h=>{const T=h.ctrlKey||h.altKey||h.metaKey;if(h.key==="Tab"&&h.preventDefault(),!T&&h.key.length===1&&ae(h.key),["ArrowUp","ArrowDown","Home","End"].includes(h.key)){let I=B().filter(b=>!b.disabled).map(b=>b.ref.current);if(["ArrowUp","End"].includes(h.key)&&(I=I.slice().reverse()),["ArrowUp","ArrowDown"].includes(h.key)){const b=h.target,_=I.indexOf(b);I=I.slice(_+1)}setTimeout(()=>E(I)),h.preventDefault()}})})})})})})});ze.displayName=jt;var At="SelectItemAlignedPosition",Fe=d.forwardRef((r,e)=>{const{__scopeSelect:t,onPlaced:o,...n}=r,l=G(J,t),s=Y(J,t),[a,i]=d.useState(null),[u,f]=d.useState(null),m=k(e,P=>f(P)),w=ue(t),C=d.useRef(!1),S=d.useRef(!0),{viewport:p,selectedItem:g,selectedItemText:y,focusSelectedItem:v}=s,x=d.useCallback(()=>{if(l.trigger&&l.valueNode&&a&&u&&p&&g&&y){const P=l.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),U=l.valueNode.getBoundingClientRect(),q=y.getBoundingClientRect();if(l.dir!=="rtl"){const b=q.left-O.left,_=U.left-b,X=P.left-_,Z=P.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=Ne(_,[A,Math.max(A,ge-ve)]);a.style.minWidth=Z+"px",a.style.left=xe+"px"}else{const b=O.right-q.right,_=window.innerWidth-U.right-b,X=window.innerWidth-P.right-_,Z=P.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=Ne(_,[A,Math.max(A,ge-ve)]);a.style.minWidth=Z+"px",a.style.right=xe+"px"}const L=w(),B=window.innerHeight-A*2,W=p.scrollHeight,V=window.getComputedStyle(u),H=parseInt(V.borderTopWidth,10),E=parseInt(V.paddingTop,10),D=parseInt(V.borderBottomWidth,10),z=parseInt(V.paddingBottom,10),K=H+E+W+z+D,fe=Math.min(g.offsetHeight*5,K),ae=window.getComputedStyle(p),me=parseInt(ae.paddingTop,10),he=parseInt(ae.paddingBottom,10),te=P.top+P.height/2-A,ie=B-te,se=g.offsetHeight/2,h=g.offsetTop+se,T=H+E+h,R=K-T;if(T<=te){const b=L.length>0&&g===L[L.length-1].ref.current;a.style.bottom="0px";const _=u.clientHeight-p.offsetTop-p.offsetHeight,X=Math.max(ie,se+(b?he:0)+_+D),Z=T+X;a.style.height=Z+"px"}else{const b=L.length>0&&g===L[0].ref.current;a.style.top="0px";const X=Math.max(te,H+p.offsetTop+(b?me:0)+se)+R;a.style.height=X+"px",p.scrollTop=T-te+p.offsetTop}a.style.margin=`${A}px 0`,a.style.minHeight=fe+"px",a.style.maxHeight=B+"px",o?.(),requestAnimationFrame(()=>C.current=!0)}},[w,l.trigger,l.valueNode,a,u,p,g,y,l.dir,o]);$(()=>x(),[x]);const[F,M]=d.useState();$(()=>{u&&M(window.getComputedStyle(u).zIndex)},[u]);const re=d.useCallback(P=>{P&&S.current===!0&&(x(),v?.(),S.current=!1)},[x,v]);return c.jsx(Dt,{scope:t,contentWrapper:a,shouldExpandOnScrollRef:C,onScrollButtonChange:re,children:c.jsx("div",{ref:i,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:F},children:c.jsx(j.div,{...n,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});Fe.displayName=At;var Ot="SelectPopperPosition",Se=d.forwardRef((r,e)=>{const{__scopeSelect:t,align:o="start",collisionPadding:n=A,...l}=r,s=pe(t);return c.jsx(xt,{...s,...l,ref:e,align:o,collisionPadding:n,style:{boxSizing:"border-box",...l.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Se.displayName=Ot;var[Dt,Te]=ne(J,{}),we="SelectViewport",Ue=d.forwardRef((r,e)=>{const{__scopeSelect:t,nonce:o,...n}=r,l=Y(we,t),s=Te(we,t),a=k(e,l.onViewportChange),i=d.useRef(0);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),c.jsx(de.Slot,{scope:t,children:c.jsx(j.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:N(n.onScroll,u=>{const f=u.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:w}=s;if(w?.current&&m){const C=Math.abs(i.current-f.scrollTop);if(C>0){const S=window.innerHeight-A*2,p=parseFloat(m.style.minHeight),g=parseFloat(m.style.height),y=Math.max(p,g);if(y<S){const v=y+C,x=Math.min(S,v),F=v-x;m.style.height=x+"px",m.style.bottom==="0px"&&(f.scrollTop=F>0?F:0,m.style.justifyContent="flex-end")}}}i.current=f.scrollTop})})})]})});Ue.displayName=we;var We="SelectGroup",[kt,Lt]=ne(We),Bt=d.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=be();return c.jsx(kt,{scope:t,id:n,children:c.jsx(j.div,{role:"group","aria-labelledby":n,...o,ref:e})})});Bt.displayName=We;var Ke="SelectLabel",Vt=d.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=Lt(Ke,t);return c.jsx(j.div,{id:n.id,...o,ref:e})});Vt.displayName=Ke;var ce="SelectItem",[Ht,$e]=ne(ce),Ge=d.forwardRef((r,e)=>{const{__scopeSelect:t,value:o,disabled:n=!1,textValue:l,...s}=r,a=G(ce,t),i=Y(ce,t),u=a.value===o,[f,m]=d.useState(l??""),[w,C]=d.useState(!1),S=k(e,v=>i.itemRefCallback?.(v,o,n)),p=be(),g=d.useRef("touch"),y=()=>{n||(a.onValueChange(o),a.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return c.jsx(Ht,{scope:t,value:o,disabled:n,textId:p,isSelected:u,onItemTextChange:d.useCallback(v=>{m(x=>x||(v?.textContent??"").trim())},[]),children:c.jsx(de.ItemSlot,{scope:t,value:o,disabled:n,textValue:f,children:c.jsx(j.div,{role:"option","aria-labelledby":p,"data-highlighted":w?"":void 0,"aria-selected":u&&w,"data-state":u?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...s,ref:S,onFocus:N(s.onFocus,()=>C(!0)),onBlur:N(s.onBlur,()=>C(!1)),onClick:N(s.onClick,()=>{g.current!=="mouse"&&y()}),onPointerUp:N(s.onPointerUp,()=>{g.current==="mouse"&&y()}),onPointerDown:N(s.onPointerDown,v=>{g.current=v.pointerType}),onPointerMove:N(s.onPointerMove,v=>{g.current=v.pointerType,n?i.onItemLeave?.():g.current==="mouse"&&v.currentTarget.focus({preventScroll:!0})}),onPointerLeave:N(s.onPointerLeave,v=>{v.currentTarget===document.activeElement&&i.onItemLeave?.()}),onKeyDown:N(s.onKeyDown,v=>{i.searchRef?.current!==""&&v.key===" "||(bt.includes(v.key)&&y(),v.key===" "&&v.preventDefault())})})})})});Ge.displayName=ce;var le="SelectItemText",Ye=d.forwardRef((r,e)=>{const{__scopeSelect:t,className:o,style:n,...l}=r,s=G(le,t),a=Y(le,t),i=$e(le,t),u=Pt(le,t),[f,m]=d.useState(null),w=k(e,y=>m(y),i.onItemTextChange,y=>a.itemTextRefCallback?.(y,i.value,i.disabled)),C=f?.textContent,S=d.useMemo(()=>c.jsx("option",{value:i.value,disabled:i.disabled,children:C},i.value),[i.disabled,i.value,C]),{onNativeOptionAdd:p,onNativeOptionRemove:g}=u;return $(()=>(p(S),()=>g(S)),[p,g,S]),c.jsxs(c.Fragment,{children:[c.jsx(j.span,{id:i.textId,...l,ref:w}),i.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Ee.createPortal(l.children,s.valueNode):null]})});Ye.displayName=le;var qe="SelectItemIndicator",Xe=d.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r;return $e(qe,t).isSelected?c.jsx(j.span,{"aria-hidden":!0,...o,ref:e}):null});Xe.displayName=qe;var Ce="SelectScrollUpButton",Ze=d.forwardRef((r,e)=>{const t=Y(Ce,r.__scopeSelect),o=Te(Ce,r.__scopeSelect),[n,l]=d.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let a=function(){const u=i.scrollTop>0;l(u)};const i=t.viewport;return a(),i.addEventListener("scroll",a),()=>i.removeEventListener("scroll",a)}},[t.viewport,t.isPositioned]),n?c.jsx(Je,{...r,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:i}=t;a&&i&&(a.scrollTop=a.scrollTop-i.offsetHeight)}}):null});Ze.displayName=Ce;var ye="SelectScrollDownButton",Qe=d.forwardRef((r,e)=>{const t=Y(ye,r.__scopeSelect),o=Te(ye,r.__scopeSelect),[n,l]=d.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let a=function(){const u=i.scrollHeight-i.clientHeight,f=Math.ceil(i.scrollTop)<u;l(f)};const i=t.viewport;return a(),i.addEventListener("scroll",a),()=>i.removeEventListener("scroll",a)}},[t.viewport,t.isPositioned]),n?c.jsx(Je,{...r,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:i}=t;a&&i&&(a.scrollTop=a.scrollTop+i.offsetHeight)}}):null});Qe.displayName=ye;var Je=d.forwardRef((r,e)=>{const{__scopeSelect:t,onAutoScroll:o,...n}=r,l=Y("SelectScrollButton",t),s=d.useRef(null),a=ue(t),i=d.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return d.useEffect(()=>()=>i(),[i]),$(()=>{a().find(f=>f.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[a]),c.jsx(j.div,{"aria-hidden":!0,...n,ref:e,style:{flexShrink:0,...n.style},onPointerDown:N(n.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:N(n.onPointerMove,()=>{l.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:N(n.onPointerLeave,()=>{i()})})}),zt="SelectSeparator",Ft=d.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r;return c.jsx(j.div,{"aria-hidden":!0,...o,ref:e})});Ft.displayName=zt;var Ie="SelectArrow",Ut=d.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=pe(t),l=G(Ie,t),s=Y(Ie,t);return l.open&&s.position==="popper"?c.jsx(St,{...n,...o,ref:e}):null});Ut.displayName=Ie;var Wt="SelectBubbleInput",et=d.forwardRef(({__scopeSelect:r,value:e,...t},o)=>{const n=d.useRef(null),l=k(o,n),s=ct(e);return d.useEffect(()=>{const a=n.current;if(!a)return;const i=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(i,"value").set;if(s!==e&&f){const m=new Event("change",{bubbles:!0});f.call(a,e),a.dispatchEvent(m)}},[s,e]),c.jsx(j.select,{...t,style:{...Ct,...t.style},ref:l,defaultValue:e})});et.displayName=Wt;function tt(r){return r===""||r===void 0}function ot(r){const e=dt(r),t=d.useRef(""),o=d.useRef(0),n=d.useCallback(s=>{const a=t.current+s;e(a),(function i(u){t.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>i(""),1e3))})(a)},[e]),l=d.useCallback(()=>{t.current="",window.clearTimeout(o.current)},[]);return d.useEffect(()=>()=>window.clearTimeout(o.current),[]),[t,n,l]}function nt(r,e,t){const n=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,l=t?r.indexOf(t):-1;let s=Kt(r,Math.max(l,0));n.length===1&&(s=s.filter(u=>u!==t));const i=s.find(u=>u.textValue.toLowerCase().startsWith(n.toLowerCase()));return i!==t?i:void 0}function Kt(r,e){return r.map((t,o)=>r[(e+o)%r.length])}var $t=Me,Gt=Oe,Yt=ke,qt=Le,Xt=Be,Zt=Ve,Qt=Ue,Jt=Ge,Pe=Ye,eo=Xe,to=Ze,oo=Qe;function co(r){const e=ee.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let o;return e[2]!==t?(o=c.jsx($t,{"data-slot":"select",...t}),e[2]=t,e[3]=o):o=e[3],o}function uo(r){const e=ee.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let o;return e[2]!==t?(o=c.jsx(Yt,{"data-slot":"select-value",...t}),e[2]=t,e[3]=o):o=e[3],o}function po(r){const e=ee.c(15);let t,o,n,l,s;e[0]!==r?({className:o,size:l,variant:s,children:t,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=l,e[5]=s):(t=e[1],o=e[2],n=e[3],l=e[4],s=e[5]);const a=l===void 0?"default":l,i=s===void 0?"outline":s;let u;e[6]!==o?(u=oe("data-[placeholder]:text-subtle-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-ring aria-invalid:bg-destructive/10 aria-invalid:shadow-[inset_0_0_0_1px_var(--destructive)] flex w-fit items-center justify-between gap-1.5 px-3 text-sm whitespace-nowrap transition-[color,background-color,box-shadow] outline-none disabled:text-subtle-foreground disabled:pointer-events-none","data-[variant=outline]:rounded-[var(--studio-control-radius,var(--radius-lg))] data-[variant=outline]:bg-[var(--studio-input-background)] data-[variant=outline]:shadow-edge data-[variant=outline]:hover:bg-sidebar","data-[variant=filled]:rounded-full data-[variant=filled]:bg-muted data-[variant=filled]:hover:bg-secondary-hover","data-[variant=pill]:rounded-full data-[variant=pill]:bg-card data-[variant=pill]:shadow-edge data-[variant=pill]:hover:bg-[var(--studio-outline-hover-background)]","data-[size=default]:h-[var(--studio-control-height,2.25rem)] data-[size=default]:pl-4 data-[size=sm]:h-8 data-[size=xs]:h-7 data-[size=xs]:px-2.5 data-[size=xs]:text-xs data-[size=xs]:font-medium","*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",o),e[6]=o,e[7]=u):u=e[7];let f;e[8]===Symbol.for("react.memo_cache_sentinel")?(f=c.jsx(qt,{asChild:!0,children:c.jsx(je,{className:"size-3.5 stroke-[1.5]"})}),e[8]=f):f=e[8];let m;return e[9]!==t||e[10]!==n||e[11]!==a||e[12]!==u||e[13]!==i?(m=c.jsxs(Gt,{"data-slot":"select-trigger","data-size":a,"data-variant":i,className:u,...n,children:[t,f]}),e[9]=t,e[10]=n,e[11]=a,e[12]=u,e[13]=i,e[14]=m):m=e[14],m}function fo(r){const e=ee.c(25);let t,o,n,l,s;e[0]!==r?({className:o,children:t,position:l,hideScrollButtons:s,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=l,e[5]=s):(t=e[1],o=e[2],n=e[3],l=e[4],s=e[5]);const a=l===void 0?"popper":l,i=s===void 0?!1:s,u=a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let f;e[6]!==o||e[7]!==u?(f=oe("notranslate bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-[var(--studio-surface-radius,var(--radius-lg))] border shadow-md",u,o),e[6]=o,e[7]=u,e[8]=f):f=e[8];let m;e[9]!==i?(m=!i&&c.jsx(no,{}),e[9]=i,e[10]=m):m=e[10];const w=a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1";let C;e[11]!==w?(C=oe("p-1",w),e[11]=w,e[12]=C):C=e[12];let S;e[13]!==t||e[14]!==C?(S=c.jsx(Qt,{className:C,children:t}),e[13]=t,e[14]=C,e[15]=S):S=e[15];let p;e[16]!==i?(p=!i&&c.jsx(ro,{}),e[16]=i,e[17]=p):p=e[17];let g;return e[18]!==a||e[19]!==n||e[20]!==f||e[21]!==m||e[22]!==S||e[23]!==p?(g=c.jsx(Xt,{children:c.jsxs(Zt,{"data-slot":"select-content",translate:"no",className:f,position:a,...n,children:[m,S,p]})}),e[18]=a,e[19]=n,e[20]=f,e[21]=m,e[22]=S,e[23]=p,e[24]=g):g=e[24],g}function mo(r){const e=ee.c(19);let t,o,n,l,s;e[0]!==r?({className:o,children:t,description:n,hideCheck:s,...l}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=l,e[5]=s):(t=e[1],o=e[2],n=e[3],l=e[4],s=e[5]);const a=s===void 0?!1:s,i=n&&"items-start py-2";let u;e[6]!==o||e[7]!==i?(u=oe("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",i,o),e[6]=o,e[7]=i,e[8]=u):u=e[8];let f;e[9]!==a?(f=!a&&c.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:c.jsx(eo,{children:c.jsx(wt,{className:"size-4"})})}),e[9]=a,e[10]=f):f=e[10];let m;e[11]!==t||e[12]!==n?(m=n?c.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[c.jsx(Pe,{children:t}),c.jsx("span",{className:"text-xs text-muted-foreground whitespace-normal",children:n})]}):c.jsx(Pe,{children:t}),e[11]=t,e[12]=n,e[13]=m):m=e[13];let w;return e[14]!==l||e[15]!==u||e[16]!==f||e[17]!==m?(w=c.jsxs(Jt,{"data-slot":"select-item",className:u,...l,children:[f,m]}),e[14]=l,e[15]=u,e[16]=f,e[17]=m,e[18]=w):w=e[18],w}function no(r){const e=ee.c(9);let t,o;e[0]!==r?({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=c.jsx(yt,{className:"size-4"}),e[5]=l):l=e[5];let s;return e[6]!==o||e[7]!==n?(s=c.jsx(to,{"data-slot":"select-scroll-up-button",className:n,...o,children:l}),e[6]=o,e[7]=n,e[8]=s):s=e[8],s}function ro(r){const e=ee.c(9);let t,o;e[0]!==r?({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=c.jsx(je,{className:"size-4"}),e[5]=l):l=e[5];let s;return e[6]!==o||e[7]!==n?(s=c.jsx(oo,{"data-slot":"select-scroll-down-button",className:n,...o,children:l}),e[6]=o,e[7]=n,e[8]=s):s=e[8],s}export{co as S,uo as a,po as b,mo as c,fo as d};
1
+ import{r as d,cu as rt,cv as _e,j as c,cw as st,cx as be,cy as k,cz as lt,cA as j,cB as N,cC as $,cD as at,bQ as Ee,cE as Re,cF as it,cG as ct,cH as dt,cI as ut,cJ as pt,cK as ft,cL as mt,cM as ht,cN as vt,cO as gt,cP as xt,cQ as St,c as ee,l as oe,ai as wt}from"./index-BWpKrclg.js";import{c as Ne}from"./index-BdQq_4o_.js";import{V as Ct}from"./index-lchr3O79.js";import{t as je,n as yt}from"./ChevronUp-xR4eZngE.js";var It=[" ","Enter","ArrowUp","ArrowDown"],bt=[" ","Enter"],Q="Select",[de,ue,Tt]=it(Q),[ne]=vt(Q,[Tt,Re]),pe=Re(),[_t,G]=ne(Q),[Nt,Pt]=ne(Q),Me=r=>{const{__scopeSelect:e,children:t,open:o,defaultOpen:n,onOpenChange:l,value:s,defaultValue:a,onValueChange:i,dir:u,name:f,autoComplete:m,disabled:w,required:C,form:S}=r,p=pe(e),[g,y]=d.useState(null),[v,x]=d.useState(null),[F,M]=d.useState(!1),re=rt(u),[P,O]=_e({prop:o,defaultProp:n??!1,onChange:l,caller:Q}),[U,q]=_e({prop:s,defaultProp:a,onChange:i,caller:Q}),L=d.useRef(null),B=g?S||!!g.closest("form"):!0,[W,V]=d.useState(new Set),H=Array.from(W).map(E=>E.props.value).join(";");return c.jsx(st,{...p,children:c.jsxs(_t,{required:C,scope:e,trigger:g,onTriggerChange:y,valueNode:v,onValueNodeChange:x,valueNodeHasChildren:F,onValueNodeHasChildrenChange:M,contentId:be(),value:U,onValueChange:q,open:P,onOpenChange:O,dir:re,triggerPointerDownPosRef:L,disabled:w,children:[c.jsx(de.Provider,{scope:e,children:c.jsx(Nt,{scope:r.__scopeSelect,onNativeOptionAdd:d.useCallback(E=>{V(D=>new Set(D).add(E))},[]),onNativeOptionRemove:d.useCallback(E=>{V(D=>{const z=new Set(D);return z.delete(E),z})},[]),children:t})}),B?c.jsxs(et,{"aria-hidden":!0,required:C,tabIndex:-1,name:f,autoComplete:m,value:U,onChange:E=>q(E.target.value),disabled:w,form:S,children:[U===void 0?c.jsx("option",{value:""}):null,Array.from(W)]},H):null]})})};Me.displayName=Q;var Ae="SelectTrigger",Oe=d.forwardRef((r,e)=>{const{__scopeSelect:t,disabled:o=!1,...n}=r,l=pe(t),s=G(Ae,t),a=s.disabled||o,i=k(e,s.onTriggerChange),u=ue(t),f=d.useRef("touch"),[m,w,C]=ot(p=>{const g=u().filter(x=>!x.disabled),y=g.find(x=>x.value===s.value),v=nt(g,p,y);v!==void 0&&s.onValueChange(v.value)}),S=p=>{a||(s.onOpenChange(!0),C()),p&&(s.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return c.jsx(lt,{asChild:!0,...l,children:c.jsx(j.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":tt(s.value)?"":void 0,...n,ref:i,onClick:N(n.onClick,p=>{p.currentTarget.focus(),f.current!=="mouse"&&S(p)}),onPointerDown:N(n.onPointerDown,p=>{f.current=p.pointerType;const g=p.target;g.hasPointerCapture(p.pointerId)&&g.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(S(p),p.preventDefault())}),onKeyDown:N(n.onKeyDown,p=>{const g=m.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&w(p.key),!(g&&p.key===" ")&&It.includes(p.key)&&(S(),p.preventDefault())})})})});Oe.displayName=Ae;var De="SelectValue",ke=d.forwardRef((r,e)=>{const{__scopeSelect:t,className:o,style:n,children:l,placeholder:s="",...a}=r,i=G(De,t),{onValueNodeHasChildrenChange:u}=i,f=l!==void 0,m=k(e,i.onValueNodeChange);return $(()=>{u(f)},[u,f]),c.jsx(j.span,{...a,ref:m,style:{pointerEvents:"none"},children:tt(i.value)?c.jsx(c.Fragment,{children:s}):l})});ke.displayName=De;var Et="SelectIcon",Le=d.forwardRef((r,e)=>{const{__scopeSelect:t,children:o,...n}=r;return c.jsx(j.span,{"aria-hidden":!0,...n,ref:e,children:o||"▼"})});Le.displayName=Et;var Rt="SelectPortal",Be=r=>c.jsx(at,{asChild:!0,...r});Be.displayName=Rt;var J="SelectContent",Ve=d.forwardRef((r,e)=>{const t=G(J,r.__scopeSelect),[o,n]=d.useState();if($(()=>{n(new DocumentFragment)},[]),!t.open){const l=o;return l?Ee.createPortal(c.jsx(He,{scope:r.__scopeSelect,children:c.jsx(de.Slot,{scope:r.__scopeSelect,children:c.jsx("div",{children:r.children})})}),l):null}return c.jsx(ze,{...r,ref:e})});Ve.displayName=J;var A=10,[He,Y]=ne(J),jt="SelectContentImpl",Mt=gt("SelectContent.RemoveScroll"),ze=d.forwardRef((r,e)=>{const{__scopeSelect:t,position:o="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:l,onPointerDownOutside:s,side:a,sideOffset:i,align:u,alignOffset:f,arrowPadding:m,collisionBoundary:w,collisionPadding:C,sticky:S,hideWhenDetached:p,avoidCollisions:g,...y}=r,v=G(J,t),[x,F]=d.useState(null),[M,re]=d.useState(null),P=k(e,h=>F(h)),[O,U]=d.useState(null),[q,L]=d.useState(null),B=ue(t),[W,V]=d.useState(!1),H=d.useRef(!1);d.useEffect(()=>{if(x)return ut(x)},[x]),pt();const E=d.useCallback(h=>{const[T,...R]=B().map(_=>_.ref.current),[I]=R.slice(-1),b=document.activeElement;for(const _ of h)if(_===b||(_?.scrollIntoView({block:"nearest"}),_===T&&M&&(M.scrollTop=0),_===I&&M&&(M.scrollTop=M.scrollHeight),_?.focus(),document.activeElement!==b))return},[B,M]),D=d.useCallback(()=>E([O,x]),[E,O,x]);d.useEffect(()=>{W&&D()},[W,D]);const{onOpenChange:z,triggerPointerDownPosRef:K}=v;d.useEffect(()=>{if(x){let h={x:0,y:0};const T=I=>{h={x:Math.abs(Math.round(I.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(I.pageY)-(K.current?.y??0))}},R=I=>{h.x<=10&&h.y<=10?I.preventDefault():x.contains(I.target)||z(!1),document.removeEventListener("pointermove",T),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",T),document.addEventListener("pointerup",R,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",R,{capture:!0})}}},[x,z,K]),d.useEffect(()=>{const h=()=>z(!1);return window.addEventListener("blur",h),window.addEventListener("resize",h),()=>{window.removeEventListener("blur",h),window.removeEventListener("resize",h)}},[z]);const[fe,ae]=ot(h=>{const T=B().filter(b=>!b.disabled),R=T.find(b=>b.ref.current===document.activeElement),I=nt(T,h,R);I&&setTimeout(()=>I.ref.current.focus())}),me=d.useCallback((h,T,R)=>{const I=!H.current&&!R;(v.value!==void 0&&v.value===T||I)&&(U(h),I&&(H.current=!0))},[v.value]),he=d.useCallback(()=>x?.focus(),[x]),te=d.useCallback((h,T,R)=>{const I=!H.current&&!R;(v.value!==void 0&&v.value===T||I)&&L(h)},[v.value]),ie=o==="popper"?Se:Fe,se=ie===Se?{side:a,sideOffset:i,align:u,alignOffset:f,arrowPadding:m,collisionBoundary:w,collisionPadding:C,sticky:S,hideWhenDetached:p,avoidCollisions:g}:{};return c.jsx(He,{scope:t,content:x,viewport:M,onViewportChange:re,itemRefCallback:me,selectedItem:O,onItemLeave:he,itemTextRefCallback:te,focusSelectedItem:D,selectedItemText:q,position:o,isPositioned:W,searchRef:fe,children:c.jsx(ft,{as:Mt,allowPinchZoom:!0,children:c.jsx(mt,{asChild:!0,trapped:v.open,onMountAutoFocus:h=>{h.preventDefault()},onUnmountAutoFocus:N(n,h=>{v.trigger?.focus({preventScroll:!0}),h.preventDefault()}),children:c.jsx(ht,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:h=>h.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:c.jsx(ie,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:h=>h.preventDefault(),...y,...se,onPlaced:()=>V(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:N(y.onKeyDown,h=>{const T=h.ctrlKey||h.altKey||h.metaKey;if(h.key==="Tab"&&h.preventDefault(),!T&&h.key.length===1&&ae(h.key),["ArrowUp","ArrowDown","Home","End"].includes(h.key)){let I=B().filter(b=>!b.disabled).map(b=>b.ref.current);if(["ArrowUp","End"].includes(h.key)&&(I=I.slice().reverse()),["ArrowUp","ArrowDown"].includes(h.key)){const b=h.target,_=I.indexOf(b);I=I.slice(_+1)}setTimeout(()=>E(I)),h.preventDefault()}})})})})})})});ze.displayName=jt;var At="SelectItemAlignedPosition",Fe=d.forwardRef((r,e)=>{const{__scopeSelect:t,onPlaced:o,...n}=r,l=G(J,t),s=Y(J,t),[a,i]=d.useState(null),[u,f]=d.useState(null),m=k(e,P=>f(P)),w=ue(t),C=d.useRef(!1),S=d.useRef(!0),{viewport:p,selectedItem:g,selectedItemText:y,focusSelectedItem:v}=s,x=d.useCallback(()=>{if(l.trigger&&l.valueNode&&a&&u&&p&&g&&y){const P=l.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),U=l.valueNode.getBoundingClientRect(),q=y.getBoundingClientRect();if(l.dir!=="rtl"){const b=q.left-O.left,_=U.left-b,X=P.left-_,Z=P.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=Ne(_,[A,Math.max(A,ge-ve)]);a.style.minWidth=Z+"px",a.style.left=xe+"px"}else{const b=O.right-q.right,_=window.innerWidth-U.right-b,X=window.innerWidth-P.right-_,Z=P.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=Ne(_,[A,Math.max(A,ge-ve)]);a.style.minWidth=Z+"px",a.style.right=xe+"px"}const L=w(),B=window.innerHeight-A*2,W=p.scrollHeight,V=window.getComputedStyle(u),H=parseInt(V.borderTopWidth,10),E=parseInt(V.paddingTop,10),D=parseInt(V.borderBottomWidth,10),z=parseInt(V.paddingBottom,10),K=H+E+W+z+D,fe=Math.min(g.offsetHeight*5,K),ae=window.getComputedStyle(p),me=parseInt(ae.paddingTop,10),he=parseInt(ae.paddingBottom,10),te=P.top+P.height/2-A,ie=B-te,se=g.offsetHeight/2,h=g.offsetTop+se,T=H+E+h,R=K-T;if(T<=te){const b=L.length>0&&g===L[L.length-1].ref.current;a.style.bottom="0px";const _=u.clientHeight-p.offsetTop-p.offsetHeight,X=Math.max(ie,se+(b?he:0)+_+D),Z=T+X;a.style.height=Z+"px"}else{const b=L.length>0&&g===L[0].ref.current;a.style.top="0px";const X=Math.max(te,H+p.offsetTop+(b?me:0)+se)+R;a.style.height=X+"px",p.scrollTop=T-te+p.offsetTop}a.style.margin=`${A}px 0`,a.style.minHeight=fe+"px",a.style.maxHeight=B+"px",o?.(),requestAnimationFrame(()=>C.current=!0)}},[w,l.trigger,l.valueNode,a,u,p,g,y,l.dir,o]);$(()=>x(),[x]);const[F,M]=d.useState();$(()=>{u&&M(window.getComputedStyle(u).zIndex)},[u]);const re=d.useCallback(P=>{P&&S.current===!0&&(x(),v?.(),S.current=!1)},[x,v]);return c.jsx(Dt,{scope:t,contentWrapper:a,shouldExpandOnScrollRef:C,onScrollButtonChange:re,children:c.jsx("div",{ref:i,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:F},children:c.jsx(j.div,{...n,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});Fe.displayName=At;var Ot="SelectPopperPosition",Se=d.forwardRef((r,e)=>{const{__scopeSelect:t,align:o="start",collisionPadding:n=A,...l}=r,s=pe(t);return c.jsx(xt,{...s,...l,ref:e,align:o,collisionPadding:n,style:{boxSizing:"border-box",...l.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Se.displayName=Ot;var[Dt,Te]=ne(J,{}),we="SelectViewport",Ue=d.forwardRef((r,e)=>{const{__scopeSelect:t,nonce:o,...n}=r,l=Y(we,t),s=Te(we,t),a=k(e,l.onViewportChange),i=d.useRef(0);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),c.jsx(de.Slot,{scope:t,children:c.jsx(j.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:N(n.onScroll,u=>{const f=u.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:w}=s;if(w?.current&&m){const C=Math.abs(i.current-f.scrollTop);if(C>0){const S=window.innerHeight-A*2,p=parseFloat(m.style.minHeight),g=parseFloat(m.style.height),y=Math.max(p,g);if(y<S){const v=y+C,x=Math.min(S,v),F=v-x;m.style.height=x+"px",m.style.bottom==="0px"&&(f.scrollTop=F>0?F:0,m.style.justifyContent="flex-end")}}}i.current=f.scrollTop})})})]})});Ue.displayName=we;var We="SelectGroup",[kt,Lt]=ne(We),Bt=d.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=be();return c.jsx(kt,{scope:t,id:n,children:c.jsx(j.div,{role:"group","aria-labelledby":n,...o,ref:e})})});Bt.displayName=We;var Ke="SelectLabel",Vt=d.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=Lt(Ke,t);return c.jsx(j.div,{id:n.id,...o,ref:e})});Vt.displayName=Ke;var ce="SelectItem",[Ht,$e]=ne(ce),Ge=d.forwardRef((r,e)=>{const{__scopeSelect:t,value:o,disabled:n=!1,textValue:l,...s}=r,a=G(ce,t),i=Y(ce,t),u=a.value===o,[f,m]=d.useState(l??""),[w,C]=d.useState(!1),S=k(e,v=>i.itemRefCallback?.(v,o,n)),p=be(),g=d.useRef("touch"),y=()=>{n||(a.onValueChange(o),a.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return c.jsx(Ht,{scope:t,value:o,disabled:n,textId:p,isSelected:u,onItemTextChange:d.useCallback(v=>{m(x=>x||(v?.textContent??"").trim())},[]),children:c.jsx(de.ItemSlot,{scope:t,value:o,disabled:n,textValue:f,children:c.jsx(j.div,{role:"option","aria-labelledby":p,"data-highlighted":w?"":void 0,"aria-selected":u&&w,"data-state":u?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...s,ref:S,onFocus:N(s.onFocus,()=>C(!0)),onBlur:N(s.onBlur,()=>C(!1)),onClick:N(s.onClick,()=>{g.current!=="mouse"&&y()}),onPointerUp:N(s.onPointerUp,()=>{g.current==="mouse"&&y()}),onPointerDown:N(s.onPointerDown,v=>{g.current=v.pointerType}),onPointerMove:N(s.onPointerMove,v=>{g.current=v.pointerType,n?i.onItemLeave?.():g.current==="mouse"&&v.currentTarget.focus({preventScroll:!0})}),onPointerLeave:N(s.onPointerLeave,v=>{v.currentTarget===document.activeElement&&i.onItemLeave?.()}),onKeyDown:N(s.onKeyDown,v=>{i.searchRef?.current!==""&&v.key===" "||(bt.includes(v.key)&&y(),v.key===" "&&v.preventDefault())})})})})});Ge.displayName=ce;var le="SelectItemText",Ye=d.forwardRef((r,e)=>{const{__scopeSelect:t,className:o,style:n,...l}=r,s=G(le,t),a=Y(le,t),i=$e(le,t),u=Pt(le,t),[f,m]=d.useState(null),w=k(e,y=>m(y),i.onItemTextChange,y=>a.itemTextRefCallback?.(y,i.value,i.disabled)),C=f?.textContent,S=d.useMemo(()=>c.jsx("option",{value:i.value,disabled:i.disabled,children:C},i.value),[i.disabled,i.value,C]),{onNativeOptionAdd:p,onNativeOptionRemove:g}=u;return $(()=>(p(S),()=>g(S)),[p,g,S]),c.jsxs(c.Fragment,{children:[c.jsx(j.span,{id:i.textId,...l,ref:w}),i.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Ee.createPortal(l.children,s.valueNode):null]})});Ye.displayName=le;var qe="SelectItemIndicator",Xe=d.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r;return $e(qe,t).isSelected?c.jsx(j.span,{"aria-hidden":!0,...o,ref:e}):null});Xe.displayName=qe;var Ce="SelectScrollUpButton",Ze=d.forwardRef((r,e)=>{const t=Y(Ce,r.__scopeSelect),o=Te(Ce,r.__scopeSelect),[n,l]=d.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let a=function(){const u=i.scrollTop>0;l(u)};const i=t.viewport;return a(),i.addEventListener("scroll",a),()=>i.removeEventListener("scroll",a)}},[t.viewport,t.isPositioned]),n?c.jsx(Je,{...r,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:i}=t;a&&i&&(a.scrollTop=a.scrollTop-i.offsetHeight)}}):null});Ze.displayName=Ce;var ye="SelectScrollDownButton",Qe=d.forwardRef((r,e)=>{const t=Y(ye,r.__scopeSelect),o=Te(ye,r.__scopeSelect),[n,l]=d.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let a=function(){const u=i.scrollHeight-i.clientHeight,f=Math.ceil(i.scrollTop)<u;l(f)};const i=t.viewport;return a(),i.addEventListener("scroll",a),()=>i.removeEventListener("scroll",a)}},[t.viewport,t.isPositioned]),n?c.jsx(Je,{...r,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:i}=t;a&&i&&(a.scrollTop=a.scrollTop+i.offsetHeight)}}):null});Qe.displayName=ye;var Je=d.forwardRef((r,e)=>{const{__scopeSelect:t,onAutoScroll:o,...n}=r,l=Y("SelectScrollButton",t),s=d.useRef(null),a=ue(t),i=d.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return d.useEffect(()=>()=>i(),[i]),$(()=>{a().find(f=>f.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[a]),c.jsx(j.div,{"aria-hidden":!0,...n,ref:e,style:{flexShrink:0,...n.style},onPointerDown:N(n.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:N(n.onPointerMove,()=>{l.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:N(n.onPointerLeave,()=>{i()})})}),zt="SelectSeparator",Ft=d.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r;return c.jsx(j.div,{"aria-hidden":!0,...o,ref:e})});Ft.displayName=zt;var Ie="SelectArrow",Ut=d.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=pe(t),l=G(Ie,t),s=Y(Ie,t);return l.open&&s.position==="popper"?c.jsx(St,{...n,...o,ref:e}):null});Ut.displayName=Ie;var Wt="SelectBubbleInput",et=d.forwardRef(({__scopeSelect:r,value:e,...t},o)=>{const n=d.useRef(null),l=k(o,n),s=ct(e);return d.useEffect(()=>{const a=n.current;if(!a)return;const i=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(i,"value").set;if(s!==e&&f){const m=new Event("change",{bubbles:!0});f.call(a,e),a.dispatchEvent(m)}},[s,e]),c.jsx(j.select,{...t,style:{...Ct,...t.style},ref:l,defaultValue:e})});et.displayName=Wt;function tt(r){return r===""||r===void 0}function ot(r){const e=dt(r),t=d.useRef(""),o=d.useRef(0),n=d.useCallback(s=>{const a=t.current+s;e(a),(function i(u){t.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>i(""),1e3))})(a)},[e]),l=d.useCallback(()=>{t.current="",window.clearTimeout(o.current)},[]);return d.useEffect(()=>()=>window.clearTimeout(o.current),[]),[t,n,l]}function nt(r,e,t){const n=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,l=t?r.indexOf(t):-1;let s=Kt(r,Math.max(l,0));n.length===1&&(s=s.filter(u=>u!==t));const i=s.find(u=>u.textValue.toLowerCase().startsWith(n.toLowerCase()));return i!==t?i:void 0}function Kt(r,e){return r.map((t,o)=>r[(e+o)%r.length])}var $t=Me,Gt=Oe,Yt=ke,qt=Le,Xt=Be,Zt=Ve,Qt=Ue,Jt=Ge,Pe=Ye,eo=Xe,to=Ze,oo=Qe;function co(r){const e=ee.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let o;return e[2]!==t?(o=c.jsx($t,{"data-slot":"select",...t}),e[2]=t,e[3]=o):o=e[3],o}function uo(r){const e=ee.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let o;return e[2]!==t?(o=c.jsx(Yt,{"data-slot":"select-value",...t}),e[2]=t,e[3]=o):o=e[3],o}function po(r){const e=ee.c(15);let t,o,n,l,s;e[0]!==r?({className:o,size:l,variant:s,children:t,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=l,e[5]=s):(t=e[1],o=e[2],n=e[3],l=e[4],s=e[5]);const a=l===void 0?"default":l,i=s===void 0?"outline":s;let u;e[6]!==o?(u=oe("data-[placeholder]:text-subtle-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-ring aria-invalid:bg-destructive/10 aria-invalid:shadow-[inset_0_0_0_1px_var(--destructive)] flex w-fit items-center justify-between gap-1.5 px-3 text-sm whitespace-nowrap transition-[color,background-color,box-shadow] outline-none disabled:text-subtle-foreground disabled:pointer-events-none","data-[variant=outline]:rounded-[var(--studio-control-radius,var(--radius-lg))] data-[variant=outline]:bg-[var(--studio-input-background)] data-[variant=outline]:shadow-edge data-[variant=outline]:hover:bg-sidebar","data-[variant=filled]:rounded-full data-[variant=filled]:bg-muted data-[variant=filled]:hover:bg-secondary-hover","data-[variant=pill]:rounded-full data-[variant=pill]:bg-card data-[variant=pill]:shadow-edge data-[variant=pill]:hover:bg-[var(--studio-outline-hover-background)]","data-[size=default]:h-[var(--studio-control-height,2.25rem)] data-[size=default]:pl-4 data-[size=sm]:h-8 data-[size=xs]:h-7 data-[size=xs]:px-2.5 data-[size=xs]:text-xs data-[size=xs]:font-medium","*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",o),e[6]=o,e[7]=u):u=e[7];let f;e[8]===Symbol.for("react.memo_cache_sentinel")?(f=c.jsx(qt,{asChild:!0,children:c.jsx(je,{className:"size-3.5 stroke-[1.5]"})}),e[8]=f):f=e[8];let m;return e[9]!==t||e[10]!==n||e[11]!==a||e[12]!==u||e[13]!==i?(m=c.jsxs(Gt,{"data-slot":"select-trigger","data-size":a,"data-variant":i,className:u,...n,children:[t,f]}),e[9]=t,e[10]=n,e[11]=a,e[12]=u,e[13]=i,e[14]=m):m=e[14],m}function fo(r){const e=ee.c(25);let t,o,n,l,s;e[0]!==r?({className:o,children:t,position:l,hideScrollButtons:s,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=l,e[5]=s):(t=e[1],o=e[2],n=e[3],l=e[4],s=e[5]);const a=l===void 0?"popper":l,i=s===void 0?!1:s,u=a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let f;e[6]!==o||e[7]!==u?(f=oe("notranslate bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-[var(--studio-surface-radius,var(--radius-lg))] border shadow-md",u,o),e[6]=o,e[7]=u,e[8]=f):f=e[8];let m;e[9]!==i?(m=!i&&c.jsx(no,{}),e[9]=i,e[10]=m):m=e[10];const w=a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1";let C;e[11]!==w?(C=oe("p-1",w),e[11]=w,e[12]=C):C=e[12];let S;e[13]!==t||e[14]!==C?(S=c.jsx(Qt,{className:C,children:t}),e[13]=t,e[14]=C,e[15]=S):S=e[15];let p;e[16]!==i?(p=!i&&c.jsx(ro,{}),e[16]=i,e[17]=p):p=e[17];let g;return e[18]!==a||e[19]!==n||e[20]!==f||e[21]!==m||e[22]!==S||e[23]!==p?(g=c.jsx(Xt,{children:c.jsxs(Zt,{"data-slot":"select-content",translate:"no",className:f,position:a,...n,children:[m,S,p]})}),e[18]=a,e[19]=n,e[20]=f,e[21]=m,e[22]=S,e[23]=p,e[24]=g):g=e[24],g}function mo(r){const e=ee.c(19);let t,o,n,l,s;e[0]!==r?({className:o,children:t,description:n,hideCheck:s,...l}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=l,e[5]=s):(t=e[1],o=e[2],n=e[3],l=e[4],s=e[5]);const a=s===void 0?!1:s,i=n&&"items-start py-2";let u;e[6]!==o||e[7]!==i?(u=oe("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",i,o),e[6]=o,e[7]=i,e[8]=u):u=e[8];let f;e[9]!==a?(f=!a&&c.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:c.jsx(eo,{children:c.jsx(wt,{className:"size-4"})})}),e[9]=a,e[10]=f):f=e[10];let m;e[11]!==t||e[12]!==n?(m=n?c.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[c.jsx(Pe,{children:t}),c.jsx("span",{className:"text-xs text-muted-foreground whitespace-normal",children:n})]}):c.jsx(Pe,{children:t}),e[11]=t,e[12]=n,e[13]=m):m=e[13];let w;return e[14]!==l||e[15]!==u||e[16]!==f||e[17]!==m?(w=c.jsxs(Jt,{"data-slot":"select-item",className:u,...l,children:[f,m]}),e[14]=l,e[15]=u,e[16]=f,e[17]=m,e[18]=w):w=e[18],w}function no(r){const e=ee.c(9);let t,o;e[0]!==r?({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=c.jsx(yt,{className:"size-4"}),e[5]=l):l=e[5];let s;return e[6]!==o||e[7]!==n?(s=c.jsx(to,{"data-slot":"select-scroll-up-button",className:n,...o,children:l}),e[6]=o,e[7]=n,e[8]=s):s=e[8],s}function ro(r){const e=ee.c(9);let t,o;e[0]!==r?({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=c.jsx(je,{className:"size-4"}),e[5]=l):l=e[5];let s;return e[6]!==o||e[7]!==n?(s=c.jsx(oo,{"data-slot":"select-scroll-down-button",className:n,...o,children:l}),e[6]=o,e[7]=n,e[8]=s):s=e[8],s}export{co as S,uo as a,po as b,mo as c,fo as d};
@@ -1 +1 @@
1
- import{c as $,b as A,r as R,l as G,j as l,B as H,s as J,x as K,v as Q,D as U}from"./index-LISCRMKT.js";import{c as V,b as W,a as X,D as Y}from"./drawer-Bsnw19SA.js";import{u as Z}from"./use-mobile-BJBInbLU.js";import{d as ee}from"./chat-context-Cbn1d2gD.js";import{S as F,a as le,M as se,c as te}from"./index-D_GgrLpt.js";function me(L){const e=$.c(48),{variant:o,className:t,placeholder:n,model:s,isLoading:I,credentialId:P,onCredentialChange:k,onModelChange:b,filterModels:E}=L,z=o===void 0?"borderless":o,w=n===void 0?"Select model":n,r=A(),[a,S]=R.useState(!1),i=b!==void 0,q=Z(),O=z==="borderless"?"ghost":"outline",_=z==="borderless"&&"md:border-none";let d;e[0]!==t||e[1]!==_?(d=G("text-sm hover:bg-accent py-0.5 px-1 gap-1 shadow-none cursor-pointer border-0 group min-w-0 shrink justify-start overflow-hidden",_,t),e[0]=t,e[1]=_,e[2]=d):d=e[2];let c;e[3]!==I||e[4]!==s||e[5]!==w||e[6]!==i?(c=i?l.jsx(F,{model:s??null,placeholder:w,isLoading:I}):l.jsx(ne,{placeholder:w}),e[3]=I,e[4]=s,e[5]=w,e[6]=i,e[7]=c):c=e[7];let D;e[8]!==O||e[9]!==d||e[10]!==c?(D=l.jsx(H,{variant:O,size:"sm",className:d,children:c}),e[8]=O,e[9]=d,e[10]=c,e[11]=D):D=e[11];const m=D;let y;e[12]===Symbol.for("react.memo_cache_sentinel")?(y=l.jsx(le,{}),e[12]=y):y=e[12];let N;e[13]!==P||e[14]!==E||e[15]!==s||e[16]!==k||e[17]!==b||e[18]!==i?(N=l.jsx(R.Suspense,{fallback:y,children:i?l.jsx(se,{onClose:()=>S(!1),credentialId:P??null,onCredentialChange:k??oe,selectedModel:s??null,onModelChange:b,filterModels:E}):l.jsx(te,{onClose:()=>S(!1)})}),e[13]=P,e[14]=E,e[15]=s,e[16]=k,e[17]=b,e[18]=i,e[19]=N):N=e[19];const f=N;if(q){let g;e[20]!==m?(g=l.jsx(V,{asChild:!0,children:m}),e[20]=m,e[21]=g):g=e[21];let j;e[22]!==r?(j=r("chat.selectModel.selectModel"),e[22]=r,e[23]=j):j=e[23];let M;e[24]!==j?(M=l.jsx(W,{className:"sr-only",children:j}),e[24]=j,e[25]=M):M=e[25];let C;e[26]!==f?(C=l.jsx("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden",children:f}),e[26]=f,e[27]=C):C=e[27];let v;e[28]!==M||e[29]!==C?(v=l.jsxs(X,{className:"p-0 flex flex-col max-h-[95vh]",children:[M,C]}),e[28]=M,e[29]=C,e[30]=v):v=e[30];let T;return e[31]!==a||e[32]!==g||e[33]!==v?(T=l.jsxs(Y,{open:a,onOpenChange:S,children:[g,v]}),e[31]=a,e[32]=g,e[33]=v,e[34]=T):T=e[34],T}let h;e[35]!==m?(h=l.jsx(J,{asChild:!0,children:m}),e[35]=m,e[36]=h):h=e[36];let x;e[37]!==r?(x=r("chat.selectModel.selectModel"),e[37]=r,e[38]=x):x=e[38];let p;e[39]!==x?(p=l.jsx(K,{className:"sr-only",children:x}),e[39]=x,e[40]=p):p=e[40];let u;e[41]!==f||e[42]!==p?(u=l.jsxs(Q,{className:"p-0 gap-0 sm:max-w-fit overflow-hidden h-[100dvh] sm:h-auto max-h-[100dvh] sm:max-h-[85vh] w-full max-w-full sm:max-w-fit rounded-none sm:rounded-xl border-0 sm:border",closeButtonClassName:"top-3.5 right-3.5 z-20",children:[p,f]}),e[41]=f,e[42]=p,e[43]=u):u=e[43];let B;return e[44]!==a||e[45]!==h||e[46]!==u?(B=l.jsxs(U,{open:a,onOpenChange:S,children:[h,u]}),e[44]=a,e[45]=h,e[46]=u,e[47]=B):B=e[47],B}function oe(){}function ne(L){const e=$.c(4),{placeholder:o}=L,{selectedModel:t,isModelsLoading:n}=ee();let s;return e[0]!==n||e[1]!==t||e[2]!==o?(s=l.jsx(F,{model:t,placeholder:o,isLoading:n}),e[0]=n,e[1]=t,e[2]=o,e[3]=s):s=e[3],s}export{me as M};
1
+ import{c as $,b as A,r as R,l as G,j as l,B as H,s as J,x as K,v as Q,D as U}from"./index-BWpKrclg.js";import{c as V,b as W,a as X,D as Y}from"./drawer-DDmudFbW.js";import{u as Z}from"./use-mobile-CoPLJ8cu.js";import{d as ee}from"./chat-context-kqrW-XPR.js";import{S as F,a as le,M as se,c as te}from"./index-G8_ivZDF.js";function me(L){const e=$.c(48),{variant:o,className:t,placeholder:n,model:s,isLoading:I,credentialId:P,onCredentialChange:k,onModelChange:b,filterModels:E}=L,z=o===void 0?"borderless":o,w=n===void 0?"Select model":n,r=A(),[a,S]=R.useState(!1),i=b!==void 0,q=Z(),O=z==="borderless"?"ghost":"outline",_=z==="borderless"&&"md:border-none";let d;e[0]!==t||e[1]!==_?(d=G("text-sm hover:bg-accent py-0.5 px-1 gap-1 shadow-none cursor-pointer border-0 group min-w-0 shrink justify-start overflow-hidden",_,t),e[0]=t,e[1]=_,e[2]=d):d=e[2];let c;e[3]!==I||e[4]!==s||e[5]!==w||e[6]!==i?(c=i?l.jsx(F,{model:s??null,placeholder:w,isLoading:I}):l.jsx(ne,{placeholder:w}),e[3]=I,e[4]=s,e[5]=w,e[6]=i,e[7]=c):c=e[7];let D;e[8]!==O||e[9]!==d||e[10]!==c?(D=l.jsx(H,{variant:O,size:"sm",className:d,children:c}),e[8]=O,e[9]=d,e[10]=c,e[11]=D):D=e[11];const m=D;let y;e[12]===Symbol.for("react.memo_cache_sentinel")?(y=l.jsx(le,{}),e[12]=y):y=e[12];let N;e[13]!==P||e[14]!==E||e[15]!==s||e[16]!==k||e[17]!==b||e[18]!==i?(N=l.jsx(R.Suspense,{fallback:y,children:i?l.jsx(se,{onClose:()=>S(!1),credentialId:P??null,onCredentialChange:k??oe,selectedModel:s??null,onModelChange:b,filterModels:E}):l.jsx(te,{onClose:()=>S(!1)})}),e[13]=P,e[14]=E,e[15]=s,e[16]=k,e[17]=b,e[18]=i,e[19]=N):N=e[19];const f=N;if(q){let g;e[20]!==m?(g=l.jsx(V,{asChild:!0,children:m}),e[20]=m,e[21]=g):g=e[21];let j;e[22]!==r?(j=r("chat.selectModel.selectModel"),e[22]=r,e[23]=j):j=e[23];let M;e[24]!==j?(M=l.jsx(W,{className:"sr-only",children:j}),e[24]=j,e[25]=M):M=e[25];let C;e[26]!==f?(C=l.jsx("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden",children:f}),e[26]=f,e[27]=C):C=e[27];let v;e[28]!==M||e[29]!==C?(v=l.jsxs(X,{className:"p-0 flex flex-col max-h-[95vh]",children:[M,C]}),e[28]=M,e[29]=C,e[30]=v):v=e[30];let T;return e[31]!==a||e[32]!==g||e[33]!==v?(T=l.jsxs(Y,{open:a,onOpenChange:S,children:[g,v]}),e[31]=a,e[32]=g,e[33]=v,e[34]=T):T=e[34],T}let h;e[35]!==m?(h=l.jsx(J,{asChild:!0,children:m}),e[35]=m,e[36]=h):h=e[36];let x;e[37]!==r?(x=r("chat.selectModel.selectModel"),e[37]=r,e[38]=x):x=e[38];let p;e[39]!==x?(p=l.jsx(K,{className:"sr-only",children:x}),e[39]=x,e[40]=p):p=e[40];let u;e[41]!==f||e[42]!==p?(u=l.jsxs(Q,{className:"p-0 gap-0 sm:max-w-fit overflow-hidden h-[100dvh] sm:h-auto max-h-[100dvh] sm:max-h-[85vh] w-full max-w-full sm:max-w-fit rounded-none sm:rounded-xl border-0 sm:border",closeButtonClassName:"top-3.5 right-3.5 z-20",children:[p,f]}),e[41]=f,e[42]=p,e[43]=u):u=e[43];let B;return e[44]!==a||e[45]!==h||e[46]!==u?(B=l.jsxs(U,{open:a,onOpenChange:S,children:[h,u]}),e[44]=a,e[45]=h,e[46]=u,e[47]=B):B=e[47],B}function oe(){}function ne(L){const e=$.c(4),{placeholder:o}=L,{selectedModel:t,isModelsLoading:n}=ee();let s;return e[0]!==n||e[1]!==t||e[2]!==o?(s=l.jsx(F,{model:t,placeholder:o,isLoading:n}),e[0]=n,e[1]=t,e[2]=o,e[3]=s):s=e[3],s}export{me as M};
@@ -0,0 +1 @@
1
+ import{c as T,b as Se,j as o,r as M,ax as Te,B as Ce,h as Re}from"./index-BWpKrclg.js";import{a3 as ye}from"./agent-icon-nQ1AH9dU.js";import{S as ge}from"./scroll-area-CwuazZb5.js";import{I as be,ac as Fe,i as Ke,k as ze,ad as De,h as $e,aE as Ie}from"./held-block-view-C3Ird9F-.js";import{k as Be}from"./parse-sections-BVn3AvAz.js";import{u as Le,a as Oe,P as Ue}from"./page-seo-form-DizfAl8r.js";import{c as Ae,b as Me}from"./blocks-tab-states-DhR3pyff.js";import{a as ke}from"./Image01-CaawlkVR.js";import{u as Ge,m as He}from"./site-editor-toast-QHleRFN5.js";import"./AlertCircle-RV4AM_8y.js";import"./Tool01-CHLDtlIL.js";import"./ArrowUp-DpQ-09y4.js";import"./ArrowLeft-XO66B9Td.js";import"./LinkBroken01-z_Mm0CSf.js";import"./ShoppingBag01-BhoOjVkp.js";import"./ZoomOut-CBOWQYet.js";import"./Building02-NRzC_IEp.js";import"./CheckCircle-CfYD_Bi6.js";import"./ChevronUp-xR4eZngE.js";import"./ChevronSelectorVertical-C5MARPJN.js";import"./UserSquare-BSsT3MHy.js";import"./Copy01-Dy1KrWO0.js";import"./CreditCard01-DVN26JVZ.js";import"./DotsVertical-CncVW4wJ.js";import"./Globe04-BxFc3HLH.js";import"./SwitchHorizontal01-Ce37vA9c.js";import"./Key01-FaGRi3tG.js";import"./Link01-B_YWUHoH.js";import"./Minus-yAYwM_Ty.js";import"./Monitor01-Bl7f7T5L.js";import"./Sun-CZRF_565.js";import"./Play-OByKGnTy.js";import"./Plus-Ccck99Do.js";import"./SearchMd-BAGHgvYw.js";import"./Trash01-BQBP0tUM.js";import"./Upload01-D_q00M49.js";import"./Users01-C6bE7RDt.js";import"./XClose-BjZnEBvF.js";import"./Zap-CHuT8W6R.js";import"./index-BdQq_4o_.js";import"./utils-BoR7m7ir.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-BFVxcKKp.js";import"./collapsible-Cx6KFD5C.js";import"./use-copy-Bq-mz0ld.js";import"./usage-stats-I2nqy87E.js";import"./tool-namespace-CG1Oreso.js";import"./form-gDNfP07W.js";import"./label-DzRNwB_s.js";import"./utils-CVEq3hMx.js";import"./markdown-CkZaCBow.js";import"./location-V0VwTJTt.js";import"./use-mobile-CoPLJ8cu.js";import"./use-panel-navigate-nriEb2Qz.js";import"./thread-route-BOOkt7de.js";import"./use-project-scope-CdqclLu1.js";import"./repository-binding-Bpq6heaQ.js";import"./use-mcp-client-zIBQco5Q.js";import"./auth-CK6AyRu5.js";import"./tooltip-D2ANqV2w.js";import"./index-lchr3O79.js";import"./use-entitlements-Bxptpo8e.js";import"./chat-context-kqrW-XPR.js";import"./autosend-DTWIjCgK.js";import"./thread-intent-DjvP3GsU.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-6veZzsu7.js";import"./task-board-L6ZGzY-s.js";import"./schema-DzZBw0EW.js";import"./slugify-CEUa2lfQ.js";import"./use-ai-providers-BcLfhqAn.js";import"./use-decopilot-events-Dg011Qgn.js";import"./use-organization-settings-D_5fr-OI.js";import"./use-clock-tick-CXtcWsca.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BVLr3WK6.js";import"./types-BNmsSext.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./shell-layout-BbFvnpcf.js";import"./use-deployment-admin-COukxauw.js";import"./admin-fetch-BhTJlAsX.js";import"./command-De9pJLwH.js";import"./index-C-GH7ZUH.js";import"./integration-icon-BQ9jVlvt.js";import"./project-icon-BKeF243f.js";import"./new-project-dialog-Dd5pVssc.js";import"./repository-import-picker-DxJJpcCz.js";import"./use-navigate-to-agent-DqWY18b4.js";import"./repository-picker-P8Asvsk4.js";import"./github-icon-DAxkwypb.js";import"./useInfiniteQuery-CFafSHXd.js";import"./infiniteQueryObserver-CbIPWgZj.js";import"./collection-search-B3vfcK1n.js";import"./use-debounced-value-CqLWq6L2.js";import"./required-auth-layout-DYZU5vk_.js";import"./use-org-sso-sTi3oL5_.js";import"./sheet-BW-FxyJZ.js";import"./use-connection-CZNQu-z2.js";import"./use-mcp-prompts-XayY9yfQ.js";import"./use-thread-outputs-vH0sJUqm.js";import"./file-type-icon-BgzyV542.js";import"./section-array-field-BXLl3jB0.js";import"./alert-Bsjmz-OK.js";import"./switch-Bv0wLEBx.js";import"./textarea-BNvvIWSZ.js";import"./popover-ClEv7Zyf.js";import"./monaco-editor-zzUPRyBn.js";import"./editor-BqqnxL88.js";import"./calendar-ym6zGcEl.js";import"./select-BMteQTWS.js";import"./editor-classes-D-ez-qBv.js";import"./core.esm-DQyn-kJS.js";import"./sortable.esm-DNzjY6xb.js";import"./toggle-group-BAFBdL9F.js";import"./active-indicator-CCMhAsc_.js";import"./combobox-DXDZmm8e.js";import"./search-input-D2iQ_3lu.js";import"./tabs-CjWwohzM.js";import"./use-file-configs-DAoix9gu.js";import"./asset-utils-BSDCnt-j.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-session-runtime-HJpkQoy0.js";import"./sandbox-git-api-DcqI6XE4.js";import"./sandbox-url-D3mC8qhT.js";import"./slider-DtzvJZ1j.js";import"./index-Cjtut9JA.js";import"./tooltipContext-DvKfbID4.js";import"./CategoricalChart-64zykerQ.js";import"./index-15xKR9ar.js";import"./ActiveShapeUtils-ppN64tl0.js";import"./Sector-BCmuavOw.js";import"./symbol-CJoI4vsX.js";import"./empty-state-C7LII3ZM.js";import"./experiments-tab-choice-B_rL9_Nx.js";import"./use-sandbox-events-C3mgE5Ut.js";function G(d){return typeof d=="string"&&d.trim()?d:void 0}function je(d,e){if(d){if(e)try{const t=new URL(d,e).href;return be(t)}catch{return}return be(d)}}function Ve(d){if(!d)return{};const e=G(d.title),t=G(d.titleTemplate);return{title:e&&t?.includes("%s")?t.replace(/%s/g,e):e,description:G(d.description),image:G(d.image),favicon:G(d.favicon)}}function We(d){if(!d)return"example.com";try{return new URL(d).host}catch{return"example.com"}}const qe=[{id:"google",labelKey:"sectionsEditor.seoPreview.platformGoogle",color:"#4285F4",layout:"search"},{id:"facebook",labelKey:"sectionsEditor.seoPreview.platformFacebook",color:"#1877F2",layout:"card"},{id:"twitter",labelKey:"sectionsEditor.seoPreview.platformTwitter",color:"#0f1419",layout:"card"},{id:"linkedin",labelKey:"sectionsEditor.seoPreview.platformLinkedin",color:"#0A66C2",layout:"card"},{id:"whatsapp",labelKey:"sectionsEditor.seoPreview.platformWhatsapp",color:"#25D366",layout:"chat"},{id:"telegram",labelKey:"sectionsEditor.seoPreview.platformTelegram",color:"#229ED9",layout:"chat"},{id:"slack",labelKey:"sectionsEditor.seoPreview.platformSlack",color:"#611f69",layout:"attachment"},{id:"discord",labelKey:"sectionsEditor.seoPreview.platformDiscord",color:"#5865F2",layout:"attachment"}];function he(d){const e=T.c(10),{src:t,className:r,iconSize:x}=d,a=x===void 0?20:x;if(t){let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={objectFit:"cover"},e[0]=m):m=e[0];let p;return e[1]!==r||e[2]!==t?(p=o.jsx("img",{src:t,alt:"",referrerPolicy:"no-referrer",className:r,style:m}),e[1]=r,e[2]=t,e[3]=p):p=e[3],p}let s;e[4]===Symbol.for("react.memo_cache_sentinel")?(s={display:"flex",alignItems:"center",justifyContent:"center",background:"#e5e7eb",color:"#9ca3af"},e[4]=s):s=e[4];let i;e[5]!==a?(i=o.jsx(ke,{size:a}),e[5]=a,e[6]=i):i=e[6];let n;return e[7]!==r||e[8]!==i?(n=o.jsx("div",{className:r,style:s,children:i}),e[7]=r,e[8]=i,e[9]=n):n=e[9],n}function Je(d){const e=T.c(33),{seo:t,host:r,path:x,t:a}=d;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={background:"#fff",border:"1px solid #dadce0"},e[0]=s):s=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i={background:"#f1f3f4"},e[1]=i):i=e[1];let n;e[2]!==t.favicon?(n=o.jsx("div",{className:"flex size-6 shrink-0 items-center justify-center overflow-hidden rounded-full",style:i,children:t.favicon?o.jsx("img",{src:t.favicon,alt:"",className:"size-full object-cover"}):o.jsx(ke,{size:12,color:"#9aa0a6"})}),e[2]=t.favicon,e[3]=n):n=e[3];let m;e[4]===Symbol.for("react.memo_cache_sentinel")?(m={color:"#202124"},e[4]=m):m=e[4];let p;e[5]!==r?(p=o.jsx("div",{className:"truncate text-[13px] leading-tight",style:m,children:r}),e[5]=r,e[6]=p):p=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f={color:"#4d5156"},e[7]=f):f=e[7];let l;e[8]!==r||e[9]!==x?(l=o.jsxs("div",{className:"truncate text-[12px] leading-tight",style:f,children:[r,x]}),e[8]=r,e[9]=x,e[10]=l):l=e[10];let c;e[11]!==p||e[12]!==l?(c=o.jsxs("div",{className:"min-w-0",children:[p,l]}),e[11]=p,e[12]=l,e[13]=c):c=e[13];let h;e[14]!==n||e[15]!==c?(h=o.jsxs("div",{className:"flex items-center gap-2",children:[n,c]}),e[14]=n,e[15]=c,e[16]=h):h=e[16];let u;e[17]===Symbol.for("react.memo_cache_sentinel")?(u={color:"#1a0dab"},e[17]=u):u=e[17];let v;e[18]!==t.title||e[19]!==a?(v=t.title??a("sectionsEditor.seoPreview.fallbackTitle"),e[18]=t.title,e[19]=a,e[20]=v):v=e[20];let y;e[21]!==v?(y=o.jsx("div",{className:"mt-1.5 truncate text-[18px] leading-snug",style:u,children:v}),e[21]=v,e[22]=y):y=e[22];let b;e[23]===Symbol.for("react.memo_cache_sentinel")?(b={color:"#4d5156"},e[23]=b):b=e[23];let S;e[24]!==t.description||e[25]!==a?(S=t.description??a("sectionsEditor.seoPreview.fallbackDescription"),e[24]=t.description,e[25]=a,e[26]=S):S=e[26];let j;e[27]!==S?(j=o.jsx("div",{className:"mt-0.5 line-clamp-2 text-[13px] leading-snug",style:b,children:S}),e[27]=S,e[28]=j):j=e[28];let k;return e[29]!==y||e[30]!==j||e[31]!==h?(k=o.jsxs("div",{className:"rounded-lg p-3 text-left",style:s,children:[h,y,j]}),e[29]=y,e[30]=j,e[31]=h,e[32]=k):k=e[32],k}function Qe(d){const e=T.c(26),{seo:t,host:r,t:x}=d;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={background:"#fff",border:"1px solid #e2e8f0"},e[0]=a):a=e[0];let s;e[1]!==t.image?(s=o.jsx(he,{src:t.image,className:"h-40 w-full"}),e[1]=t.image,e[2]=s):s=e[2];let i;e[3]===Symbol.for("react.memo_cache_sentinel")?(i={borderTop:"1px solid #e2e8f0"},e[3]=i):i=e[3];let n;e[4]===Symbol.for("react.memo_cache_sentinel")?(n={color:"#8a9099"},e[4]=n):n=e[4];let m;e[5]!==r?(m=o.jsx("div",{className:"truncate text-[11px]",style:n,children:r}),e[5]=r,e[6]=m):m=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p={color:"#1c2024"},e[7]=p):p=e[7];let f;e[8]!==t.title||e[9]!==x?(f=t.title??x("sectionsEditor.seoPreview.fallbackTitle"),e[8]=t.title,e[9]=x,e[10]=f):f=e[10];let l;e[11]!==f?(l=o.jsx("div",{className:"line-clamp-1 text-[14px] font-semibold",style:p,children:f}),e[11]=f,e[12]=l):l=e[12];let c;e[13]===Symbol.for("react.memo_cache_sentinel")?(c={color:"#60666c"},e[13]=c):c=e[13];let h;e[14]!==t.description||e[15]!==x?(h=t.description??x("sectionsEditor.seoPreview.fallbackDescription"),e[14]=t.description,e[15]=x,e[16]=h):h=e[16];let u;e[17]!==h?(u=o.jsx("div",{className:"line-clamp-2 text-[12px]",style:c,children:h}),e[17]=h,e[18]=u):u=e[18];let v;e[19]!==u||e[20]!==m||e[21]!==l?(v=o.jsxs("div",{className:"px-3 py-2",style:i,children:[m,l,u]}),e[19]=u,e[20]=m,e[21]=l,e[22]=v):v=e[22];let y;return e[23]!==v||e[24]!==s?(y=o.jsxs("div",{className:"overflow-hidden rounded-lg text-left",style:a,children:[s,v]}),e[23]=v,e[24]=s,e[25]=y):y=e[25],y}function Xe(d){const e=T.c(36),{seo:t,host:r,accent:x,t:a}=d;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={background:"#f0f2f5"},e[0]=s):s=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i={color:"#3b4045"},e[1]=i):i=e[1];let n;e[2]!==a?(n=a("sectionsEditor.seoPreview.chatCardHint"),e[2]=a,e[3]=n):n=e[3];let m;e[4]!==n?(m=o.jsx("p",{className:"px-1 pb-1.5 text-[12px]",style:i,children:n}),e[4]=n,e[5]=m):m=e[5];const p=`3px solid ${x}`;let f;e[6]!==p?(f={background:"#fff",borderLeft:p},e[6]=p,e[7]=f):f=e[7];let l;e[8]!==t.image?(l=o.jsx(he,{src:t.image,className:"h-28 w-full",iconSize:18}),e[8]=t.image,e[9]=l):l=e[9];let c;e[10]===Symbol.for("react.memo_cache_sentinel")?(c={color:"#1c2024"},e[10]=c):c=e[10];let h;e[11]!==t.title||e[12]!==a?(h=t.title??a("sectionsEditor.seoPreview.fallbackTitle"),e[11]=t.title,e[12]=a,e[13]=h):h=e[13];let u;e[14]!==h?(u=o.jsx("div",{className:"line-clamp-1 text-[12px] font-semibold",style:c,children:h}),e[14]=h,e[15]=u):u=e[15];let v;e[16]===Symbol.for("react.memo_cache_sentinel")?(v={color:"#60666c"},e[16]=v):v=e[16];let y;e[17]!==t.description||e[18]!==a?(y=t.description??a("sectionsEditor.seoPreview.fallbackDescription"),e[17]=t.description,e[18]=a,e[19]=y):y=e[19];let b;e[20]!==y?(b=o.jsx("div",{className:"line-clamp-2 text-[11px]",style:v,children:y}),e[20]=y,e[21]=b):b=e[21];let S;e[22]===Symbol.for("react.memo_cache_sentinel")?(S={color:"#8a9099"},e[22]=S):S=e[22];let j;e[23]!==r?(j=o.jsx("div",{className:"mt-0.5 text-[10px]",style:S,children:r}),e[23]=r,e[24]=j):j=e[24];let k;e[25]!==u||e[26]!==b||e[27]!==j?(k=o.jsxs("div",{className:"px-2.5 py-1.5",children:[u,b,j]}),e[25]=u,e[26]=b,e[27]=j,e[28]=k):k=e[28];let g;e[29]!==k||e[30]!==f||e[31]!==l?(g=o.jsxs("div",{className:"overflow-hidden rounded-[var(--studio-surface-radius,var(--radius-md))]",style:f,children:[l,k]}),e[29]=k,e[30]=f,e[31]=l,e[32]=g):g=e[32];let N;return e[33]!==g||e[34]!==m?(N=o.jsxs("div",{className:"rounded-lg p-2 text-left",style:s,children:[m,g]}),e[33]=g,e[34]=m,e[35]=N):N=e[35],N}function Ye(d){const e=T.c(39),{seo:t,host:r,accent:x,dark:a,t:s}=d,i=a?"#2b2d31":"#fff",n=a?"#00a8fc":"#1264a3",m=a?"#dbdee1":"#3b4045",p=a?"#949ba4":"#8a9099",f=a?"none":"1px solid #e2e8f0";let l;e[0]!==i||e[1]!==f?(l={background:i,border:f},e[0]=i,e[1]=f,e[2]=l):l=e[2];const c=`3px solid ${x}`;let h;e[3]!==c?(h={borderLeft:c,borderRadius:2},e[3]=c,e[4]=h):h=e[4];let u;e[5]!==p?(u={color:p},e[5]=p,e[6]=u):u=e[6];let v;e[7]!==r||e[8]!==u?(v=o.jsx("div",{className:"text-[10px]",style:u,children:r}),e[7]=r,e[8]=u,e[9]=v):v=e[9];let y;e[10]!==n?(y={color:n},e[10]=n,e[11]=y):y=e[11];let b;e[12]!==t.title||e[13]!==s?(b=t.title??s("sectionsEditor.seoPreview.fallbackTitle"),e[12]=t.title,e[13]=s,e[14]=b):b=e[14];let S;e[15]!==y||e[16]!==b?(S=o.jsx("div",{className:"line-clamp-1 text-[13px] font-semibold",style:y,children:b}),e[15]=y,e[16]=b,e[17]=S):S=e[17];let j;e[18]!==m?(j={color:m},e[18]=m,e[19]=j):j=e[19];let k;e[20]!==t.description||e[21]!==s?(k=t.description??s("sectionsEditor.seoPreview.fallbackDescription"),e[20]=t.description,e[21]=s,e[22]=k):k=e[22];let g;e[23]!==j||e[24]!==k?(g=o.jsx("div",{className:"line-clamp-2 text-[12px]",style:j,children:k}),e[23]=j,e[24]=k,e[25]=g):g=e[25];let N;e[26]!==g||e[27]!==v||e[28]!==S?(N=o.jsxs("div",{className:"min-w-0 flex-1",children:[v,S,g]}),e[26]=g,e[27]=v,e[28]=S,e[29]=N):N=e[29];let w;e[30]!==t.image?(w=o.jsx(he,{src:t.image,className:"size-14 shrink-0 rounded-[var(--studio-control-radius,var(--radius))]",iconSize:16}),e[30]=t.image,e[31]=w):w=e[31];let E;e[32]!==N||e[33]!==w||e[34]!==h?(E=o.jsxs("div",{className:"flex gap-2.5 pl-2.5",style:h,children:[N,w]}),e[32]=N,e[33]=w,e[34]=h,e[35]=E):E=e[35];let _;return e[36]!==E||e[37]!==l?(_=o.jsx("div",{className:"rounded-lg p-2.5 text-left",style:l,children:E}),e[36]=E,e[37]=l,e[38]=_):_=e[38],_}function Ze(d){const e=T.c(21),{platform:t,seo:r,host:x,path:a,t:s}=d;let i;e[0]!==x||e[1]!==a||e[2]!==t.color||e[3]!==t.id||e[4]!==t.layout||e[5]!==r||e[6]!==s?(i=t.layout==="search"?o.jsx(Je,{seo:r,host:x,path:a,t:s}):t.layout==="card"?o.jsx(Qe,{seo:r,host:x,path:a,t:s}):t.layout==="chat"?o.jsx(Xe,{seo:r,host:x,path:a,accent:t.color,t:s}):o.jsx(Ye,{seo:r,host:x,path:a,accent:t.color,dark:t.id==="discord",t:s}),e[0]=x,e[1]=a,e[2]=t.color,e[3]=t.id,e[4]=t.layout,e[5]=r,e[6]=s,e[7]=i):i=e[7];const n=i;let m;e[8]!==t.color?(m=o.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{background:t.color}}),e[8]=t.color,e[9]=m):m=e[9];let p;e[10]!==t.labelKey||e[11]!==s?(p=s(t.labelKey),e[10]=t.labelKey,e[11]=s,e[12]=p):p=e[12];let f;e[13]!==p?(f=o.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:p}),e[13]=p,e[14]=f):f=e[14];let l;e[15]!==m||e[16]!==f?(l=o.jsxs("div",{className:"mb-1.5 flex items-center gap-1.5",children:[m,f]}),e[15]=m,e[16]=f,e[17]=l):l=e[17];let c;return e[18]!==n||e[19]!==l?(c=o.jsxs("div",{children:[l,n]}),e[18]=n,e[19]=l,e[20]=c):c=e[20],c}function et(d){const e=T.c(18),{seo:t,url:r,path:x}=d,a=x===void 0?"/":x,s=Se();let i,n,m;if(e[0]!==t||e[1]!==r){const y=Ve(t);i=y,n=je(y.image,r),m=je(y.favicon,r),e[0]=t,e[1]=r,e[2]=i,e[3]=n,e[4]=m}else i=e[2],n=e[3],m=e[4];let p;e[5]!==i||e[6]!==n||e[7]!==m?(p={...i,image:n,favicon:m},e[5]=i,e[6]=n,e[7]=m,e[8]=p):p=e[8];const f=p;let l;e[9]!==r?(l=We(r),e[9]=r,e[10]=l):l=e[10];const c=l,h=a==="/"?"":a;let u;e[11]!==h||e[12]!==c||e[13]!==s||e[14]!==f?(u=qe.map(y=>o.jsx(Ze,{platform:y,seo:f,host:c,path:h,t:s},y.id)),e[11]=h,e[12]=c,e[13]=s,e[14]=f,e[15]=u):u=e[15];let v;return e[16]!==u?(v=o.jsx("div",{className:"grid grid-cols-1 gap-4 @2xl:grid-cols-2",children:u}),e[16]=u,e[17]=v):v=e[17],v}function zi(d){const e=T.c(77),{orgSlug:t,virtualMcpId:r,branch:x,decofile:a,meta:s,target:i,previewBaseUrl:n,onSaved:m,onEditDefaultSeo:p,onBack:f}=d,l=Se(),c=Fe(a,i,s),h=Ge(r,x);let u;e[0]!==h?(u=He(h),e[0]=h,e[1]=u):u=e[1];const v=!u,y=c?.seoData,b=i.kind==="site"?"site":i.pageKey,[S,j]=M.useState(b),[k,g]=M.useState(null),[N,w]=M.useState(0),[E,_]=M.useState(void 0),{persistSeo:K,persistRawSeo:ie,flush:se,isPending:le,hold:Ne}=Le({orgSlug:t,virtualMcpId:r,branch:x,target:i,resolved:c,meta:s,onSaved:m});let H;e[2]!==x||e[3]!==t||e[4]!==r?(H=Ae({orgSlug:t,virtualMcpId:r,branch:x}),e[2]=x,e[3]=t,e[4]=r,e[5]=H):H=e[5];const re=Me(H)(c?.blockKey??""),[we,Ee]=M.useState(re);(S!==b||we!==re)&&(c&&Ne(c.blockKey),j(b),Ee(re),g(null),_(void 0),w(ot));const V=i.kind==="page",_e=V?c?.rawSeoData:void 0,A=E!==void 0?E:_e,Pe=V?Ke(A)??void 0:void 0,P=k??Pe??y??{},C=c?Oe(P,c):null,z=C&&(!V||ze(A))?Be(C,s):null;let W;e[6]!==s?(W=De(s),e[6]=s,e[7]=W):W=e[7];const ce=W;let R,q;e[8]!==a||e[9]!==P||e[10]!==s||e[11]!==i.kind?(R=i.kind==="page"?$e(a,s)?.seoData??{}:{},q=i.kind==="page"?st(R,P):P,e[8]=a,e[9]=P,e[10]=s,e[11]=i.kind,e[12]=R,e[13]=q):(R=e[12],q=e[13]);const ae=q;let J;e[14]!==K||e[15]!==c||e[16]!==g?(J=F=>{if(!c)return;const ve=F;g(ve),K(ve)},e[14]=K,e[15]=c,e[16]=g,e[17]=J):J=e[17];const ne=J;let Q;e[18]!==g?(Q=()=>g(null),e[18]=g,e[19]=Q):Q=e[19];const me=Q;let X;e[20]!==w?(X=()=>w(tt),e[20]=w,e[21]=X):X=e[21];const de=X;let Y;e[22]!==se||e[23]!==f?(Y=()=>{se(),f?.()},e[22]=se,e[23]=f,e[24]=Y):Y=e[24];const pe=Y,D=i.kind==="page"?i.path:"/";let Z;e[25]!==D||e[26]!==n||e[27]!==i.kind?(Z=i.kind==="page"&&n?it(D,n):n??null,e[25]=D,e[26]=n,e[27]=i.kind,e[28]=Z):Z=e[28];const fe=Z;let ee;e[29]!==c||e[30]!==l||e[31]!==i.kind?(ee=i.kind==="site"?l("sectionsEditor.seoEditor.noSiteSeoBlock"):l(c?"sectionsEditor.seoEditor.noSeoSchema":"sectionsEditor.seoEditor.couldNotLoadSeo"),e[29]=c,e[30]=l,e[31]=i.kind,e[32]=ee):ee=e[32];const ue=ee,te=V&&c,xe=i.kind==="site"&&c&&z;let $;e[33]!==pe||e[34]!==l||e[35]!==i.kind||e[36]!==i.pageName?($=i.kind==="page"?o.jsxs("nav",{className:"flex min-w-0 items-center gap-1 text-sm",children:[o.jsx("button",{type:"button",onClick:pe,title:i.pageName,className:"min-w-0 truncate rounded-[var(--studio-control-radius,var(--radius-md))] px-1 py-0.5 text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground",children:i.pageName}),o.jsx(Te,{className:"size-3 shrink-0 text-muted-foreground/60"}),o.jsx("span",{className:"px-1 py-0.5 font-medium text-foreground",children:"SEO"})]}):o.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[o.jsx(ye,{size:16,className:"shrink-0 text-muted-foreground"}),o.jsx("span",{className:"text-sm font-medium",children:l("sectionsEditor.seoEditor.defaultSeoLabel")}),o.jsxs("span",{className:"hidden truncate text-xs text-muted-foreground sm:inline",children:["· ",l("sectionsEditor.seoEditor.appliedToEveryPage")]})]}),e[33]=pe,e[34]=l,e[35]=i.kind,e[36]=i.pageName,e[37]=$):$=e[37];let I;e[38]!==le?(I=le&&o.jsx(Re,{className:"size-3.5 text-muted-foreground"}),e[38]=le,e[39]=I):I=e[39];let B;e[40]!==p||e[41]!==l||e[42]!==i.kind?(B=i.kind==="page"&&p&&o.jsxs(Ce,{type:"button",variant:"outline",size:"sm",onClick:p,children:[o.jsx(ye,{size:14}),l("sectionsEditor.seoEditor.editDefaultSeoButton")]}),e[40]=p,e[41]=l,e[42]=i.kind,e[43]=B):B=e[43];let L;e[44]!==I||e[45]!==B?(L=o.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-2",children:[I,B]}),e[44]=I,e[45]=B,e[46]=L):L=e[46];let O;e[47]!==$||e[48]!==L?(O=o.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-2 border-b px-4",children:[$,L]}),e[47]=$,e[48]=L,e[49]=O):O=e[49];let U;e[50]!==C||e[51]!==v||e[52]!==de||e[53]!==me||e[54]!==ce||e[55]!==A||e[56]!==P||e[57]!==ue||e[58]!==N||e[59]!==ne||e[60]!==D||e[61]!==ie||e[62]!==K||e[63]!==ae||e[64]!==fe||e[65]!==c||e[66]!==z||e[67]!==g||e[68]!==_||e[69]!==te||e[70]!==xe||e[71]!==R||e[72]!==l?(U=!c||!te&&!xe?o.jsx("div",{className:"flex flex-1 items-center justify-center px-6 text-center text-sm text-muted-foreground",children:ue}):o.jsxs("div",{className:"flex min-h-0 flex-1",children:[o.jsx(ge,{className:"w-full max-w-md shrink-0 border-r [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"px-5 py-4",children:te?o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"mb-3 text-xs text-muted-foreground",children:l("sectionsEditor.seoEditor.emptyFieldsHint")}),o.jsx(Ue,{rawSeo:A,innerSeo:P,defaultResolveType:ce,seoSchema:z,activeResolveType:C,seoTypeOptions:c.seoTypeOptions,formResetKey:N,siteDefaultSeo:R,onPersistRaw:F=>{_(F),ie(F)},onInnerChange:F=>{g(F),K(F)},onClearForm:me,onBumpFormKey:de,asyncRenderAvailable:v})]}):z&&C&&o.jsx(Ie,{schema:z,resolveType:C,value:P,formResetKey:N,onChange:ne})})}),o.jsx(ge,{className:"min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"@container px-5 py-4",children:o.jsx(et,{seo:ae,url:fe,path:D})})})]}),e[50]=C,e[51]=v,e[52]=de,e[53]=me,e[54]=ce,e[55]=A,e[56]=P,e[57]=ue,e[58]=N,e[59]=ne,e[60]=D,e[61]=ie,e[62]=K,e[63]=ae,e[64]=fe,e[65]=c,e[66]=z,e[67]=g,e[68]=_,e[69]=te,e[70]=xe,e[71]=R,e[72]=l,e[73]=U):U=e[73];let oe;return e[74]!==O||e[75]!==U?(oe=o.jsxs("div",{className:"flex h-full w-full flex-col",children:[O,U]}),e[74]=O,e[75]=U,e[76]=oe):oe=e[76],oe}function tt(d){return d+1}function ot(d){return d+1}function it(d,e){try{return new URL(d,e).href}catch{return e}}function st(d,e){const t=e.__resolveType,r=d.__resolveType;if(typeof t=="string"&&typeof r=="string"&&t!==r)return{...e};const x={...d};for(const[a,s]of Object.entries(e))a!=="__resolveType"&&s!=null&&(typeof s=="string"&&s.trim()===""||(x[a]=s));return x}export{zi as SeoEditor};
@@ -1 +1 @@
1
- import{c as p,l as d,j as f,fC as m}from"./index-LISCRMKT.js";function x(l){const t=p.c(12);let o,a,r,i;t[0]!==l?({className:o,orientation:r,decorative:i,...a}=l,t[0]=l,t[1]=o,t[2]=a,t[3]=r,t[4]=i):(o=t[1],a=t[2],r=t[3],i=t[4]);const s=r===void 0?"horizontal":r,c=i===void 0?!0:i;let e;t[5]!==o?(e=d("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",o),t[5]=o,t[6]=e):e=t[6];let n;return t[7]!==c||t[8]!==s||t[9]!==a||t[10]!==e?(n=f.jsx(m,{"data-slot":"separator-root",decorative:c,orientation:s,className:e,...a}),t[7]=c,t[8]=s,t[9]=a,t[10]=e,t[11]=n):n=t[11],n}export{x as S};
1
+ import{c as p,l as d,j as f,fC as m}from"./index-BWpKrclg.js";function x(l){const t=p.c(12);let o,a,r,i;t[0]!==l?({className:o,orientation:r,decorative:i,...a}=l,t[0]=l,t[1]=o,t[2]=a,t[3]=r,t[4]=i):(o=t[1],a=t[2],r=t[3],i=t[4]);const s=r===void 0?"horizontal":r,c=i===void 0?!0:i;let e;t[5]!==o?(e=d("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",o),t[5]=o,t[6]=e):e=t[6];let n;return t[7]!==c||t[8]!==s||t[9]!==a||t[10]!==e?(n=f.jsx(m,{"data-slot":"separator-root",decorative:c,orientation:s,className:e,...a}),t[7]=c,t[8]=s,t[9]=a,t[10]=e,t[11]=n):n=t[11],n}export{x as S};
@@ -0,0 +1 @@
1
+ import{c as e,j as o}from"./index-BWpKrclg.js";import{V as a}from"./index-D3fuewCp.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 +1 @@
1
- import{c as n,l as f,j as i,f0 as S,el as $,aV as w,f1 as C,em as z,f2 as R,b7 as k,en as B}from"./index-LISCRMKT.js";function P(o){const e=n.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx($,{"data-slot":"sheet",...t}),e[2]=t,e[3]=s):s=e[3],s}function D(o){const e=n.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(z,{"data-slot":"sheet-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function E(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx(B,{"data-slot":"sheet-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function T(o){const e=n.c(22);let t,s,a,l,p,m;e[0]!==o?({className:s,children:t,side:l,size:p,hideCloseButton:m,...a}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=p,e[6]=m):(t=e[1],s=e[2],a=e[3],l=e[4],p=e[5],m=e[6]);const r=l===void 0?"right":l,v=p===void 0?"sm":p,x=m===void 0?!1:m;let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=i.jsx(E,{}),e[7]=u):u=e[7];const b=r==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l",g=r==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r",j=(r==="left"||r==="right")&&(v==="lg"?"w-full sm:max-w-xl":"sm:max-w-sm"),N=r==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",y=r==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let c;e[8]!==s||e[9]!==b||e[10]!==g||e[11]!==j||e[12]!==N||e[13]!==y?(c=f("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-200 data-[state=open]:duration-200",b,g,j,N,y,s),e[8]=s,e[9]=b,e[10]=g,e[11]=j,e[12]=N,e[13]=y,e[14]=c):c=e[14];let d;e[15]!==x?(d=!x&&i.jsxs(R,{className:"data-[state=open]:bg-secondary absolute top-4 right-4 opacity-70 transition-opacity hover:opacity-100 focus-ring disabled:pointer-events-none rounded-lg",children:[i.jsx(k,{className:"size-4"}),i.jsx("span",{className:"sr-only",children:"Close"})]}),e[15]=x,e[16]=d):d=e[16];let h;return e[17]!==t||e[18]!==a||e[19]!==c||e[20]!==d?(h=i.jsxs(D,{children:[u,i.jsxs(w,{"data-slot":"sheet-content",className:c,...a,children:[t,d]})]}),e[17]=t,e[18]=a,e[19]=c,e[20]=d,e[21]=h):h=e[21],h}function _(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("flex flex-col gap-1.5 p-4",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx("div",{"data-slot":"sheet-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function F(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("mt-auto flex flex-col gap-2 p-4",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx("div",{"data-slot":"sheet-footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function H(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("text-foreground font-semibold",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx(S,{"data-slot":"sheet-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function V(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx(C,{"data-slot":"sheet-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}export{H as S,T as a,P as b,_ as c,V as d,F as e};
1
+ import{c as n,l as m,j as i,f0 as S,el as $,aV as w,f1 as C,em as z,f2 as R,b7 as k,en as B}from"./index-BWpKrclg.js";function P(o){const e=n.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx($,{"data-slot":"sheet",...t}),e[2]=t,e[3]=s):s=e[3],s}function D(o){const e=n.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(z,{"data-slot":"sheet-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function E(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=m("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx(B,{"data-slot":"sheet-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function T(o){const e=n.c(22);let t,s,a,l,f,p;e[0]!==o?({className:s,children:t,side:l,size:f,hideCloseButton:p,...a}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=f,e[6]=p):(t=e[1],s=e[2],a=e[3],l=e[4],f=e[5],p=e[6]);const r=l===void 0?"right":l,v=f===void 0?"sm":f,x=p===void 0?!1:p;let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=i.jsx(E,{}),e[7]=u):u=e[7];const b=r==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l",g=r==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r",j=(r==="left"||r==="right")&&(v==="lg"?"w-full sm:max-w-xl":"sm:max-w-sm"),N=r==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",y=r==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let d;e[8]!==s||e[9]!==b||e[10]!==g||e[11]!==j||e[12]!==N||e[13]!==y?(d=m("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-200 data-[state=open]:duration-200",b,g,j,N,y,s),e[8]=s,e[9]=b,e[10]=g,e[11]=j,e[12]=N,e[13]=y,e[14]=d):d=e[14];let c;e[15]!==x?(c=!x&&i.jsxs(R,{className:"data-[state=open]:bg-secondary absolute top-4 right-4 opacity-70 transition-opacity hover:opacity-100 focus-ring disabled:pointer-events-none rounded-lg",children:[i.jsx(k,{className:"size-4"}),i.jsx("span",{className:"sr-only",children:"Close"})]}),e[15]=x,e[16]=c):c=e[16];let h;return e[17]!==t||e[18]!==a||e[19]!==d||e[20]!==c?(h=i.jsxs(D,{children:[u,i.jsxs(w,{"data-slot":"sheet-content",className:d,...a,children:[t,c]})]}),e[17]=t,e[18]=a,e[19]=d,e[20]=c,e[21]=h):h=e[21],h}function _(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=m("flex flex-col gap-1.5 p-4",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx("div",{"data-slot":"sheet-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function H(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=m("text-foreground font-semibold",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx(S,{"data-slot":"sheet-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function V(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=m("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx(C,{"data-slot":"sheet-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}export{H as S,T as a,P as b,_ as c,V as d};
@@ -0,0 +1 @@
1
+ import{c as R,b as J,e as Je,j as n,B as z,t as qe,o as st,cV as ae,ag as vt,a as Be,J as Ut,U as kt,K as Ve,cW as Jt,cX as Gt,ay as Ge,l as ut,be as Vt,z as mt,r as Q,ae as Wt,af as te,cY as Yt,w as Tt,x as Nt,v as _t,D as Pt,d as At,a4 as ct,R as Ct,m as Me,C as at,aX as Et,cZ as Qt,b1 as Xt,b8 as ft,H as Zt,c_ as en,aY as tn,y as nn,c$ as sn,d0 as on,d1 as an,d2 as rn,d3 as ln,a5 as cn,u as dn,a6 as un,d4 as mn,d5 as fn,k as Ot,d6 as ht,d7 as hn,O as gn,b3 as gt,d8 as pn,a0 as yn}from"./index-BWpKrclg.js";import{t as It}from"./Building02-NRzC_IEp.js";import{i as bn,s as ee}from"./UserSquare-BSsT3MHy.js";import{u as xn}from"./use-deployment-admin-COukxauw.js";import{a as Sn}from"./admin-fetch-BhTJlAsX.js";import{ay as wn,V as jn,I as it,a9 as vn,K as kn,az as Tn,n as pt,g as Nn,q as _n,l as Pn,aA as An,m as Cn}from"./agent-icon-nQ1AH9dU.js";import{s as En}from"./XClose-BjZnEBvF.js";import{a as On,u as In}from"./use-project-scope-CdqclLu1.js";import{u as $t,a as $n}from"./use-panel-navigate-nriEb2Qz.js";import{i as se}from"./CheckCircle-CfYD_Bi6.js";import{i as yt}from"./Monitor01-Bl7f7T5L.js";import{i as Fe}from"./Zap-CHuT8W6R.js";import{u as Ln}from"./use-clock-tick-CXtcWsca.js";import{s as bt}from"./Plus-Ccck99Do.js";import{a as Dn}from"./Tool01-CHLDtlIL.js";import{b as ne,a as Ke,f as Rn,e as zn,c as Fn,C as qn}from"./command-De9pJLwH.js";import{I as Bn}from"./integration-icon-BQ9jVlvt.js";import{P as Mn}from"./project-icon-BKeF243f.js";import{a as Kn,m as Hn}from"./use-mcp-client-zIBQco5Q.js";import{u as Un,a as Jn,n as Gn}from"./new-project-dialog-Dd5pVssc.js";import{S as Vn,u as Wn}from"./thread-intent-DjvP3GsU.js";import{R as Yn}from"./required-auth-layout-DYZU5vk_.js";import{A as Qn}from"./autosend-DTWIjCgK.js";import{u as Xn,a as Zn,b as es,c as ts}from"./thread-route-BOOkt7de.js";import{u as ns}from"./use-org-sso-sTi3oL5_.js";function ss(t){const e=R.c(49),{orgName:o,orgSlug:a,orgLogo:s,domain:r}=t,i=J();let c;e[0]!==a||e[1]!==i?(c=async()=>{const P=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:a})}),C=await P.json();if(!P.ok||!C.success)throw new Error(C.error??i("common.autoDomainJoinScreen.joinError"));return C},e[0]=a,e[1]=i,e[2]=c):c=e[2];let m;e[3]!==a?(m=P=>{window.location.href=`/${P.slug??a}`},e[3]=a,e[4]=m):m=e[4];let f;e[5]!==i?(f=P=>{qe.error(P instanceof Error?P.message:i("common.autoDomainJoinScreen.joinError"))},e[5]=i,e[6]=f):f=e[6];let S;e[7]!==c||e[8]!==m||e[9]!==f?(S={mutationFn:c,onSuccess:m,onError:f},e[7]=c,e[8]=m,e[9]=f,e[10]=S):S=e[10];const d=Je(S),g=os;let l;e[11]!==s||e[12]!==o?(l=s?n.jsx(st,{url:s,fallback:o,shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(It,{className:"h-6 w-6 text-primary"})}),e[11]=s,e[12]=o,e[13]=l):l=e[13];let p;e[14]!==o||e[15]!==i?(p=i("common.autoDomainJoinScreen.joinPrompt",{orgName:o}),e[14]=o,e[15]=i,e[16]=p):p=e[16];let h;e[17]!==p?(h=n.jsx("h3",{className:"text-lg font-medium",children:p}),e[17]=p,e[18]=h):h=e[18];let u;e[19]!==r||e[20]!==i?(u=i("common.autoDomainJoinScreen.joinDescription",{domain:r}),e[19]=r,e[20]=i,e[21]=u):u=e[21];let w;e[22]!==u?(w=n.jsx("p",{className:"text-sm text-muted-foreground",children:u}),e[22]=u,e[23]=w):w=e[23];let y;e[24]!==h||e[25]!==w?(y=n.jsxs("div",{className:"space-y-2",children:[h,w]}),e[24]=h,e[25]=w,e[26]=y):y=e[26];let x;e[27]!==d?(x=()=>d.mutate(),e[27]=d,e[28]=x):x=e[28];let j;e[29]!==d.isPending||e[30]!==o||e[31]!==i?(j=d.isPending?i("common.autoDomainJoinScreen.joining"):i("common.autoDomainJoinScreen.enterOrg",{orgName:o}),e[29]=d.isPending,e[30]=o,e[31]=i,e[32]=j):j=e[32];let b;e[33]!==d.isPending||e[34]!==x||e[35]!==j?(b=n.jsx(z,{onClick:x,disabled:d.isPending,children:j}),e[33]=d.isPending,e[34]=x,e[35]=j,e[36]=b):b=e[36];const T=d.isPending;let v;e[37]!==i?(v=i("common.goHome"),e[37]=i,e[38]=v):v=e[38];let k;e[39]!==d.isPending||e[40]!==v?(k=n.jsx(z,{variant:"ghost",onClick:g,disabled:T,children:v}),e[39]=d.isPending,e[40]=v,e[41]=k):k=e[41];let _;e[42]!==b||e[43]!==k?(_=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[b,k]}),e[42]=b,e[43]=k,e[44]=_):_=e[44];let N;return e[45]!==y||e[46]!==_||e[47]!==l?(N=n.jsxs(ae,{children:[l,y,_]}),e[45]=y,e[46]=_,e[47]=l,e[48]=N):N=e[48],N}function os(){window.location.href="/"}function xt(t){const e=R.c(26),{orgSlug:o,orgId:a,orgName:s,reason:r}=t,i=J(),{isAdmin:c}=xn(),m=is,f=r==="not-found",S=f?bn:vt;let d;e[0]!==f||e[1]!==i?(d=i(f?"common.noAccessScreen.organizationNotFound":"common.noAccessScreen.noAccess"),e[0]=f,e[1]=i,e[2]=d):d=e[2];const g=d;let l;e[3]!==f||e[4]!==s||e[5]!==o||e[6]!==i?(l=f?n.jsxs(n.Fragment,{children:[i("common.noAccessScreen.couldNotFind")," ",n.jsx("strong",{children:o}),"."]}):n.jsxs(n.Fragment,{children:[i("common.noAccessScreen.noAccessTo")," ",n.jsx("strong",{children:s??o}),".",n.jsx("br",{}),i("common.noAccessScreen.askAdminToInvite")]}),e[3]=f,e[4]=s,e[5]=o,e[6]=i,e[7]=l):l=e[7];const p=l;let h;e[8]!==S?(h=n.jsx("div",{className:"bg-muted p-3 rounded-full",children:n.jsx(S,{className:"h-6 w-6 text-muted-foreground"})}),e[8]=S,e[9]=h):h=e[9];let u;e[10]!==g?(u=n.jsx("h3",{className:"text-lg font-medium",children:g}),e[10]=g,e[11]=u):u=e[11];let w;e[12]!==p?(w=n.jsx("p",{className:"text-sm text-muted-foreground",children:p}),e[12]=p,e[13]=w):w=e[13];let y;e[14]!==u||e[15]!==w?(y=n.jsxs("div",{className:"space-y-2",children:[u,w]}),e[14]=u,e[15]=w,e[16]=y):y=e[16];let x;e[17]!==c||e[18]!==a||e[19]!==o||e[20]!==i?(x=c&&a?n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[n.jsx(as,{orgId:a,orgSlug:o}),n.jsx(z,{variant:"ghost",onClick:m,children:i("common.goHome")})]}):n.jsx(z,{onClick:m,children:i("common.goHome")}),e[17]=c,e[18]=a,e[19]=o,e[20]=i,e[21]=x):x=e[21];let j;return e[22]!==h||e[23]!==y||e[24]!==x?(j=n.jsxs(ae,{children:[h,y,x]}),e[22]=h,e[23]=y,e[24]=x,e[25]=j):j=e[25],j}function is(){window.location.href="/"}function as(t){const e=R.c(20),{orgId:o,orgSlug:a}=t,s=J(),{data:r}=Be.useSession(),i=r?.user.email;let c;e[0]!==i||e[1]!==o?(c=()=>Sn(`/api/_admin/orgs/${o}/members`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:i,role:"admin"})}),e[0]=i,e[1]=o,e[2]=c):c=e[2];let m;e[3]!==a?(m=()=>{window.location.href=`/${a}`},e[3]=a,e[4]=m):m=e[4];let f;e[5]!==s?(f=u=>{qe.error(u instanceof Error?u.message:s("common.noAccessScreen.adminJoinFailed"))},e[5]=s,e[6]=f):f=e[6];let S;e[7]!==c||e[8]!==m||e[9]!==f?(S={mutationFn:c,onSuccess:m,onError:f},e[7]=c,e[8]=m,e[9]=f,e[10]=S):S=e[10];const d=Je(S);let g;e[11]!==d?(g=()=>d.mutate(),e[11]=d,e[12]=g):g=e[12];const l=!i||d.isPending;let p;e[13]!==d.isPending||e[14]!==s?(p=d.isPending?s("common.noAccessScreen.adminJoining"):s("common.noAccessScreen.adminJoin"),e[13]=d.isPending,e[14]=s,e[15]=p):p=e[15];let h;return e[16]!==g||e[17]!==l||e[18]!==p?(h=n.jsx(z,{onClick:g,disabled:l,children:p}),e[16]=g,e[17]=l,e[18]=p,e[19]=h):h=e[19],h}function rs(t){const e=R.c(59),{invitationId:o,orgName:a,orgSlug:s,orgLogo:r}=t,i=J();let c;e[0]!==o?(c=async()=>{const A=await Be.organization.acceptInvitation({invitationId:o});if(A.error)throw new Error(A.error.message);return A.data},e[0]=o,e[1]=c):c=e[1];let m;e[2]!==s?(m=()=>{Ut(),window.location.href=`/${s}`},e[2]=s,e[3]=m):m=e[3];let f;e[4]!==i?(f=A=>{qe.error(A instanceof Error?A.message:i("common.pendingInviteScreen.failedToAccept"))},e[4]=i,e[5]=f):f=e[5];let S;e[6]!==c||e[7]!==m||e[8]!==f?(S={mutationFn:c,onSuccess:m,onError:f},e[6]=c,e[7]=m,e[8]=f,e[9]=S):S=e[9];const d=Je(S);let g;e[10]!==o?(g=async()=>{const A=await Be.organization.rejectInvitation({invitationId:o});if(A.error)throw new Error(A.error.message);return A.data},e[10]=o,e[11]=g):g=e[11];let l,p;e[12]!==i?(l=()=>{qe.success(i("common.pendingInviteScreen.invitationDeclined")),window.location.href="/"},p=A=>{qe.error(A instanceof Error?A.message:i("common.pendingInviteScreen.failedToDecline"))},e[12]=i,e[13]=l,e[14]=p):(l=e[13],p=e[14]);let h;e[15]!==g||e[16]!==l||e[17]!==p?(h={mutationFn:g,onSuccess:l,onError:p},e[15]=g,e[16]=l,e[17]=p,e[18]=h):h=e[18];const u=Je(h),w=d.isPending||u.isPending;let y;e[19]!==r||e[20]!==a?(y=r?n.jsx(st,{url:r,fallback:a,shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(wn,{className:"h-6 w-6 text-primary"})}),e[19]=r,e[20]=a,e[21]=y):y=e[21];let x;e[22]!==a||e[23]!==i?(x=i("common.pendingInviteScreen.invitedTo",{orgName:a}),e[22]=a,e[23]=i,e[24]=x):x=e[24];let j;e[25]!==x?(j=n.jsx("h3",{className:"text-lg font-medium",children:x}),e[25]=x,e[26]=j):j=e[26];let b;e[27]!==i?(b=i("common.pendingInviteScreen.acceptDescription"),e[27]=i,e[28]=b):b=e[28];let T;e[29]!==b?(T=n.jsx("p",{className:"text-sm text-muted-foreground",children:b}),e[29]=b,e[30]=T):T=e[30];let v;e[31]!==j||e[32]!==T?(v=n.jsxs("div",{className:"space-y-2",children:[j,T]}),e[31]=j,e[32]=T,e[33]=v):v=e[33];let k;e[34]!==d?(k=()=>d.mutate(),e[34]=d,e[35]=k):k=e[35];let _;e[36]!==d.isPending||e[37]!==i?(_=d.isPending?i("common.pendingInviteScreen.acceptingButton"):i("common.pendingInviteScreen.acceptButton"),e[36]=d.isPending,e[37]=i,e[38]=_):_=e[38];let N;e[39]!==w||e[40]!==k||e[41]!==_?(N=n.jsx(z,{onClick:k,disabled:w,children:_}),e[39]=w,e[40]=k,e[41]=_,e[42]=N):N=e[42];let P;e[43]!==u?(P=()=>u.mutate(),e[43]=u,e[44]=P):P=e[44];let C;e[45]!==u.isPending||e[46]!==i?(C=u.isPending?i("common.pendingInviteScreen.decliningButton"):i("common.pendingInviteScreen.declineButton"),e[45]=u.isPending,e[46]=i,e[47]=C):C=e[47];let I;e[48]!==w||e[49]!==P||e[50]!==C?(I=n.jsx(z,{variant:"ghost",onClick:P,disabled:w,children:C}),e[48]=w,e[49]=P,e[50]=C,e[51]=I):I=e[51];let O;e[52]!==N||e[53]!==I?(O=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[N,I]}),e[52]=N,e[53]=I,e[54]=O):O=e[54];let D;return e[55]!==v||e[56]!==O||e[57]!==y?(D=n.jsxs(ae,{children:[y,v,O]}),e[55]=v,e[56]=O,e[57]=y,e[58]=D):D=e[58],D}function ls(t){const e=R.c(23),{orgName:o,orgLogo:a}=t,s=J();let r;e[0]!==a||e[1]!==o?(r=a?n.jsx(st,{url:a,fallback:o,shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full","aria-hidden":"true",children:n.jsx(jn,{className:"h-6 w-6 text-primary"})}),e[0]=a,e[1]=o,e[2]=r):r=e[2];let i;e[3]!==s?(i=s("common.requestPendingScreen.title"),e[3]=s,e[4]=i):i=e[4];let c;e[5]!==i?(c=n.jsx("h3",{className:"text-lg font-medium",children:i}),e[5]=i,e[6]=c):c=e[6];let m;e[7]!==o||e[8]!==s?(m=s("common.requestPendingScreen.description",{orgName:o}),e[7]=o,e[8]=s,e[9]=m):m=e[9];let f;e[10]!==m?(f=n.jsx("p",{className:"text-sm text-muted-foreground",children:m}),e[10]=m,e[11]=f):f=e[11];let S;e[12]!==c||e[13]!==f?(S=n.jsxs("div",{className:"space-y-2",children:[c,f]}),e[12]=c,e[13]=f,e[14]=S):S=e[14];let d;e[15]!==s?(d=s("common.goHome"),e[15]=s,e[16]=d):d=e[16];let g;e[17]!==d?(g=n.jsx(z,{variant:"ghost",onClick:cs,children:d}),e[17]=d,e[18]=g):g=e[18];let l;return e[19]!==r||e[20]!==S||e[21]!==g?(l=n.jsxs(ae,{children:[r,S,g]}),e[19]=r,e[20]=S,e[21]=g,e[22]=l):l=e[22],l}function cs(){window.location.href="/"}function ds(t){const e=R.c(45),{orgName:o,orgSlug:a,orgLogo:s,domain:r}=t,i=J();let c;e[0]!==a?(c=async()=>{const N=await fetch("/api/auth/custom/domain-request-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:a})}),P=await N.json();if(!N.ok||!P.success)throw new Error(P.error??"Failed to request access");return P},e[0]=a,e[1]=c):c=e[1];let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=ms,e[2]=m):m=e[2];let f;e[3]!==i?(f=N=>{qe.error(N instanceof Error?N.message:i("common.requestToJoinScreen.failedToRequest"))},e[3]=i,e[4]=f):f=e[4];let S;e[5]!==c||e[6]!==f?(S={mutationFn:c,onSuccess:m,onError:f},e[5]=c,e[6]=f,e[7]=S):S=e[7];const d=Je(S);let g;e[8]!==s||e[9]!==o?(g=s?n.jsx(st,{url:s,fallback:o,shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(It,{className:"h-6 w-6 text-primary"})}),e[8]=s,e[9]=o,e[10]=g):g=e[10];let l;e[11]!==o||e[12]!==i?(l=i("common.requestToJoinScreen.title",{orgName:o}),e[11]=o,e[12]=i,e[13]=l):l=e[13];let p;e[14]!==l?(p=n.jsx("h3",{className:"text-lg font-medium",children:l}),e[14]=l,e[15]=p):p=e[15];let h;e[16]!==r||e[17]!==i?(h=i("common.requestToJoinScreen.description",{domain:r}),e[16]=r,e[17]=i,e[18]=h):h=e[18];let u;e[19]!==h?(u=n.jsx("p",{className:"text-sm text-muted-foreground",children:h}),e[19]=h,e[20]=u):u=e[20];let w;e[21]!==p||e[22]!==u?(w=n.jsxs("div",{className:"space-y-2",children:[p,u]}),e[21]=p,e[22]=u,e[23]=w):w=e[23];let y;e[24]!==d?(y=()=>d.mutate(),e[24]=d,e[25]=y):y=e[25];let x;e[26]!==d.isPending||e[27]!==i?(x=d.isPending?i("common.requestToJoinScreen.requesting"):i("common.requestToJoinScreen.requestButton"),e[26]=d.isPending,e[27]=i,e[28]=x):x=e[28];let j;e[29]!==d.isPending||e[30]!==y||e[31]!==x?(j=n.jsx(z,{onClick:y,disabled:d.isPending,children:x}),e[29]=d.isPending,e[30]=y,e[31]=x,e[32]=j):j=e[32];const b=d.isPending;let T;e[33]!==i?(T=i("common.goHome"),e[33]=i,e[34]=T):T=e[34];let v;e[35]!==d.isPending||e[36]!==T?(v=n.jsx(z,{variant:"ghost",onClick:us,disabled:b,children:T}),e[35]=d.isPending,e[36]=T,e[37]=v):v=e[37];let k;e[38]!==j||e[39]!==v?(k=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[j,v]}),e[38]=j,e[39]=v,e[40]=k):k=e[40];let _;return e[41]!==w||e[42]!==k||e[43]!==g?(_=n.jsxs(ae,{children:[g,w,k]}),e[41]=w,e[42]=k,e[43]=g,e[44]=_):_=e[44],_}function us(){window.location.href="/"}function ms(t){if(t.alreadyMember&&t.slug){window.location.href=`/${t.slug}`;return}window.location.reload()}function fs(t){const e=R.c(7);let o;e[0]!==t?(o=Ve.orgAccessStatus(t),e[0]=t,e[1]=o):o=e[1];let a;e[2]!==t?(a=async()=>{const r=await fetch(`/api/auth/custom/org-access-status/${encodeURIComponent(t)}`,{credentials:"include"});if(!r.ok)throw new Error(`org-access-status failed (${r.status})`);return await r.json()},e[2]=t,e[3]=a):a=e[3];let s;return e[4]!==o||e[5]!==a?(s={queryKey:o,queryFn:a,refetchOnWindowFocus:!1},e[4]=o,e[5]=a,e[6]=s):s=e[6],kt(s)}function hs({orgSlug:t}){const{data:e}=fs(t);if(e.status!=="member"){Jt()?.org===t&&Gt();const o=localStorage.getItem(Ge.lastOrgSlug())===t;if(o&&localStorage.removeItem(Ge.lastOrgSlug()),o&&(e.status==="not-found"||e.status==="no-access"))return window.location.href="/",null}return e.status==="not-found"?n.jsx(xt,{orgSlug:t,reason:"not-found"}):e.status==="pending-invite"?n.jsx(rs,{invitationId:e.invitation.id,orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo}):e.status==="auto-domain-join"?n.jsx(ss,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="can-request"?n.jsx(ds,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="request-pending"?n.jsx(ls,{orgName:e.organization.name,orgLogo:e.organization.logo}):e.status==="member"?(window.location.reload(),null):n.jsx(xt,{orgSlug:t,orgId:e.organization.id,orgName:e.organization.name,reason:"no-access"})}function Lt(t){const e=R.c(42),{ariaLabel:o,dismissLabel:a,eyebrow:s,title:r,description:i,icon:c,children:m,footerLeading:f,actions:S,onDismiss:d,tone:g}=t,l=g===void 0?"neutral":g,p=f||S;let h;e[0]!==l?(h=l==="system"&&n.jsx("div",{className:"h-0.5 bg-special"}),e[0]=l,e[1]=h):h=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(En,{size:14}),e[2]=u):u=e[2];let w;e[3]!==a||e[4]!==d?(w=n.jsx(z,{size:"icon-sm",variant:"ghost","aria-label":a,className:"absolute right-2 top-2 z-10 text-muted-foreground",onClick:d,children:u}),e[3]=a,e[4]=d,e[5]=w):w=e[5];const y=c&&"flex items-start gap-3",x=m&&"pb-3";let j;e[6]!==y||e[7]!==x?(j=ut("p-4 pr-11",y,x),e[6]=y,e[7]=x,e[8]=j):j=e[8];let b;e[9]!==c?(b=c&&n.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-special/10 text-special",children:c}),e[9]=c,e[10]=b):b=e[10];let T;e[11]!==s?(T=s&&n.jsx("p",{className:"text-xs text-muted-foreground",children:s}),e[11]=s,e[12]=T):T=e[12];let v;e[13]!==r?(v=n.jsx("h3",{className:"text-base font-semibold text-foreground",children:r}),e[13]=r,e[14]=v):v=e[14];let k;e[15]!==i?(k=i&&n.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:i}),e[15]=i,e[16]=k):k=e[16];let _;e[17]!==v||e[18]!==k||e[19]!==T?(_=n.jsxs("div",{children:[T,v,k]}),e[17]=v,e[18]=k,e[19]=T,e[20]=_):_=e[20];let N;e[21]!==m?(N=m&&n.jsx("div",{className:"mt-3",children:m}),e[21]=m,e[22]=N):N=e[22];let P;e[23]!==_||e[24]!==N?(P=n.jsxs("div",{className:"min-w-0 flex-1",children:[_,N]}),e[23]=_,e[24]=N,e[25]=P):P=e[25];let C;e[26]!==P||e[27]!==j||e[28]!==b?(C=n.jsxs("div",{className:j,children:[b,P]}),e[26]=P,e[27]=j,e[28]=b,e[29]=C):C=e[29];let I;e[30]!==S||e[31]!==f||e[32]!==p||e[33]!==l?(I=p&&n.jsxs("div",{className:ut("flex items-center justify-between gap-3 px-4 py-2.5",l==="system"?"border-t border-border bg-muted/50":"pt-0"),children:[n.jsx("div",{className:"min-w-0 text-xs text-muted-foreground",children:f}),n.jsx("div",{className:"flex shrink-0 items-center gap-2",children:S})]}),e[30]=S,e[31]=f,e[32]=p,e[33]=l,e[34]=I):I=e[34];let O;return e[35]!==o||e[36]!==C||e[37]!==I||e[38]!==h||e[39]!==w||e[40]!==l?(O=n.jsxs("div",{role:"dialog","aria-label":o,"data-slot":"announcement-card","data-tone":l,className:"relative w-full overflow-hidden rounded-lg bg-popover shadow-soft animate-in fade-in slide-in-from-bottom-2 duration-300",children:[h,w,C,I]}),e[35]=o,e[36]=C,e[37]=I,e[38]=h,e[39]=w,e[40]=l,e[41]=O):O=e[41],O}const gs={switcher:"tour-layout-switcher",nav:"tour-layout-nav",tasks:"tour-layout-tasks",projects:"tour-layout-projects",account:"tour-layout-account",recentActivity:"tour-layout-recent-activity",siteEditor:"tour-layout-site-editor",surfaceTabs:"tour-layout-surface-tabs",branchPicker:"tour-layout-branch-picker",automations:"tour-layout-automations",settings:"tour-layout-settings"};function Dt(t){return`[data-tour="${gs[t]}"]`}const ps=[{scope:"shell",anchor:"switcher",titleKey:"layoutTour.switcher.title",descKey:"layoutTour.switcher.description",side:"right"},{scope:"shell",anchor:"nav",titleKey:"layoutTour.nav.title",descKey:"layoutTour.nav.description",side:"right"},{scope:"shell",anchor:"tasks",titleKey:"layoutTour.tasks.title",descKey:"layoutTour.tasks.description",side:"right"},{scope:"project",anchor:"siteEditor",titleKey:"layoutTour.siteEditor.title",descKey:"layoutTour.siteEditor.description",side:"right"},{scope:"project",anchor:"automations",titleKey:"layoutTour.automations.title",descKey:"layoutTour.automations.description",side:"right"},{scope:"shell",anchor:"settings",titleKey:"layoutTour.settings.title",descKey:"layoutTour.settings.description",side:"right"},{scope:"shell",anchor:"projects",titleKey:"layoutTour.projects.title",descKey:"layoutTour.projects.description",side:"right"},{scope:"shell",anchor:"account",titleKey:"layoutTour.account.title",descKey:"layoutTour.account.description",side:"right"},{scope:"siteEditor",anchor:"surfaceTabs",titleKey:"layoutTour.surfaceTabs.title",descKey:"layoutTour.surfaceTabs.description",side:"bottom"},{scope:"siteEditor",anchor:"branchPicker",titleKey:"layoutTour.branchPicker.title",descKey:"layoutTour.branchPicker.description",side:"bottom"},{scope:"orgHome",anchor:"recentActivity",titleKey:"layoutTour.recentActivity.title",descKey:"layoutTour.recentActivity.description",side:"top"}];function ys(t){return ps.filter(e=>e.scope==="shell"||e.scope==="orgHome"&&t.onOrgHome||e.scope==="project"&&t.inProject||e.scope==="siteEditor"&&t.onSiteEditor)}function bs(t,e){return ys(e).map(o=>({element:Dt(o.anchor),popover:{title:t(o.titleKey),description:t(o.descKey),side:o.side,align:"center"}}))}const xs=Dt("switcher"),Ss=30;function Rt(t){const e=document.querySelector(t);return e instanceof HTMLElement&&e.offsetParent!==null}function ws(t,e){return bs(t,e).filter(o=>typeof o.element=="string"&&Rt(o.element))}function js(t,e){return{showProgress:!0,progressText:t("layoutTour.progress"),nextBtnText:t("layoutTour.next"),prevBtnText:t("layoutTour.prev"),doneBtnText:t("layoutTour.done"),showButtons:["next","previous"],smoothScroll:!0,allowClose:!0,disableActiveInteraction:!0,stagePadding:6,stageRadius:8,waitForElement:0,skipMissingElement:!0,popoverClass:"layout-tour-popover",onPopoverRender:(o,{driver:a})=>{if(o.footerButtons.querySelector(".layout-tour-skip"))return;const s=document.createElement("button");s.type="button",s.className="driver-popover-footer-btn layout-tour-skip",s.textContent=t("layoutTour.skip"),s.addEventListener("click",()=>a.destroy()),o.footerButtons.insertBefore(s,o.footerButtons.firstChild)},onDestroyed:()=>{He=!1},steps:e}}let He=!1;async function vs(){return(await Vt(()=>import("./driver.js-Dj4CfABu.js"),[])).driver}function ks(t,e){if(He)return;He=!0;let o=0;const a=()=>{if(!Rt(xs)&&o++<Ss){requestAnimationFrame(a);return}const s=ws(t,e);if(s.length===0){He=!1;return}vs().then(r=>{r(js(t,s)).drive()}).catch(()=>{He=!1})};a()}function Ts(t){return t!=="off"}function ni(t){if(!t.hasSource)return[];const e=["site-editor"];return Ts(t.cmsMode)&&e.push("content"),t.runtime==="sandbox"&&e.push("code"),e}function zt(t){return t==="site-editor"||t==="content"||t==="code"||t.startsWith("code:")}function si(t){return t.reportsOnly&&!t.onReportAgent&&zt(t.tabId)}const Ft=[{id:"new-layout",date:"2026-09-22",eyebrow:"Now Available",title:"New Layout",bullets:[{icon:yt,title:"Unified page headers",body:"Every page now has a clear header with navigation breadcrumbs and actions, making it easy to orient yourself and move around."},{icon:it,title:"Consistent navigation and controls",body:"Settings and project pages use a predictable sidebar instead of scattered tabs. Buttons, inputs and toolbars share one shape and one height, and the layout adapts to smaller screens."},{icon:vn,title:"Site editor redesigned",body:"Try the redesigned blocks editor from Profile & Preferences. Blocks share consistent actions, variants appear beside their block in the header, and section selection is searchable."}],cta:{label:"Take a tour",action:"start-tour"}},{id:"unified-workspace-layout",date:"2026-09-01",eyebrow:"Now Available",title:"A new way around Studio",bullets:[{icon:mt,title:"Unified org switcher",body:"Organizations and agents now share one control at the top of the sidebar. Search it to jump straight to any agent, including ones in your other organizations."},{icon:ee,title:"Your org at a glance",body:"The organization home now opens on the agents your team built and the tasks they are running — no empty board to fill in first."},{icon:yt,title:"Simplified CMS",body:"The CMS opens over the page you are previewing rather than somewhere else, so changing a section never costs you your place."}],cta:{label:"Take the tour",action:"start-tour"}},{id:"codex-gpt-5-6-defaults",date:"2026-07-13",eyebrow:"Now Available",title:"Codex defaults move to GPT-5.6",bullets:[{icon:ee,title:"Sol leads Thinking",body:"Codex Thinking now defaults to `gpt-5.6-sol` for deeper coding and reasoning work."},{icon:se,title:"Terra balances Smart",body:"The Smart tier now uses `gpt-5.6-terra`, replacing GPT-5.4 as the default balanced Codex model."},{icon:Fe,title:"Luna speeds up Fast",body:"The Fast tier and lightweight Codex title generation now use `gpt-5.6-luna`. Existing threads that reference older GPT-5.4 or GPT-5.5 model IDs remain supported."}]},{id:"claude-sonnet-5",date:"2026-06-30",eyebrow:"Now Available",title:"Claude Sonnet 5 powers the Smart tier",bullets:[{icon:ee,title:"More agentic coding",body:"Sonnet 5 is Anthropic's strongest Sonnet model yet, with improved reasoning, tool use, coding, and knowledge work compared with Sonnet 4.6."},{icon:se,title:"Available in Claude Code",body:"The Claude Code harness now pins the Smart tier to the new `claude-sonnet-5` model id so new sessions use Sonnet 5 by default."},{icon:Fe,title:"Nothing to change",body:"Existing Smart-tier chats and agents pick up Sonnet 5 automatically. Thinking remains on Opus 4.8 1M."}],learnMoreHref:"https://www.anthropic.com/news/claude-sonnet-5"},{id:"fable-5-suspension",date:"2026-06-13",eyebrow:"Important Update",title:"Fable 5 & Mythos 5 suspended — Opus 4.8 takes over",bullets:[{icon:se,title:"US government directive",body:"Anthropic received an export control directive requiring the suspension of Fable 5 and Mythos 5 access for all users, citing national security concerns. Anthropic is complying while it works to resolve the matter."},{icon:ee,title:"Opus 4.8 steps in as the Thinking tier",body:"The Thinking tier now runs on Claude Opus 4.8, which remains fully operational. Performance on most tasks is comparable, and Anthropic reports more than 95% of sessions were unaffected by the Fable 5 classifiers anyway."},{icon:Fe,title:"Nothing to change",body:"The switch is automatic — any chat or agent already using the Thinking tier is now served by Opus 4.8. Anthropic will share further details within 24 hours."}],learnMoreHref:"https://www.anthropic.com/news/fable-mythos-access"},{id:"claude-fable-5",date:"2026-06-09",eyebrow:"Now Available",title:"Claude Fable 5 leads the Thinking tier",bullets:[{icon:ee,title:"State-of-the-art reasoning",body:"Fable 5 takes the Thinking tier, posting top scores across software engineering, knowledge work, and vision — and outperforming Opus 4.8 on nearly every benchmark Anthropic tested."},{icon:se,title:"Safety without the slowdown",body:"New classifiers route the small slice of high-risk requests (cybersecurity, bio/chem) back to Opus 4.8. Anthropic reports more than 95% of sessions never trigger a fallback."},{icon:Fe,title:"Nothing to change",body:"Chats and agents pick up Fable 5 automatically wherever the Thinking tier is selected. Opus 4.8 stays available as the safety fallback."}],learnMoreHref:"https://www.anthropic.com/news/claude-fable-5-mythos-5"},{id:"claude-opus-4-8",date:"2026-05-28",eyebrow:"Now Available",title:"Claude Opus 4.8 is the new default",bullets:[{icon:ee,title:"Smarter thinking, same price",body:"Opus 4.8 now leads the Thinking and Smarter tiers, outperforming Opus 4.7 on coding, reasoning, and agent tasks at the same cost."},{icon:se,title:"More honest answers",body:"It's about 4× less likely to let a code flaw slip through unflagged, and surfaces uncertainty instead of making unsupported claims."},{icon:Fe,title:"Nothing to change",body:"Chats and agents pick up Opus 4.8 automatically wherever the Thinking or Smarter tier is selected."}],learnMoreHref:"https://www.anthropic.com/news/claude-opus-4-8"},{id:"enhanced-sidebar",date:"2026-05-28",eyebrow:"Now Available",title:"Enhanced sidebar",bullets:[{icon:ee,title:"A clearer view of what's running",body:"See every task in your organization at a glance, with each agent and status group laid out so you can spot active work without hunting for it."},{icon:it,title:"Browse one group at a time",body:"Expand the groups you care about and pull in more results on demand — no more endless scrolling to find an older conversation."},{icon:se,title:"Polished and steadier",body:"Several sidebar bugs are fixed, including empty agent groups showing the right action and status filters returning the right tasks."}]},{id:"smarter-task-delegation",date:"2026-05-27",eyebrow:"Now Available",title:"Smarter task delegation",bullets:[{icon:mt,title:"Real results from delegated agents",body:"When one agent hands work to another, you'll see the full report inline — no more empty replies hiding the work that was done."},{icon:Fe,title:"Same powers, top to bottom",body:"Delegated agents now work with the same tools, context, and memory as the agent that called them, so complex multi-agent investigations finish on the first try."},{icon:se,title:"Clearer progress signals",body:"When a delegated task hits its limit or runs into a problem, you get a plain-language message instead of a silent stall."}]},{id:"sidebar-task-groups",date:"2026-05-27",eyebrow:"Now Available",title:"Redesigned sidebar",bullets:[{icon:ee,title:"Group by agent or status",body:"Switch the task list between grouping by agent or by status — pick whichever matches how you're working right now."},{icon:it,title:"Sharper filters",body:"Narrow the list to your tasks, manual chats, or automations from a compact filter row above the groups."}]},{id:"release-channel",date:"2026-05-26",eyebrow:"Now Available",title:"Release announcements",bullets:[{icon:ee,title:"Heads-up when features ship",body:"New releases surface in a corner card the first time you see them, then stick around in your inbox."},{icon:kn,title:"Unified inbox",body:"Org invitations and product updates now share one chronological feed in the sidebar."}]}],nt="studio.release-feed.v1",rt=new Set;let oe="",ie={},lt=!1;function Ns(){if(lt)return oe||"{}";try{return localStorage.getItem(nt)??"{}"}catch{return oe||"{}"}}function qt(t){try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function St(){const t=Ns();return t!==oe&&(oe=t,ie=qt(t)),ie}function _s(t){rt.add(t);const e=o=>{if(!(o.key!==nt&&o.key!==null)){try{const a=localStorage.getItem(nt)??"{}",r={...qt(a),...ie};ie=r,oe=JSON.stringify(r)}catch{}t()}};return window.addEventListener("storage",e),()=>{rt.delete(t),window.removeEventListener("storage",e)}}function Ps(t){ie=t,oe=JSON.stringify(t);try{localStorage.setItem(nt,oe),lt=!1}catch{lt=!0}rt.forEach(e=>e())}function As(){const t=R.c(7),e=Q.useSyncExternalStore(_s,St,St);let o;t[0]!==e?(o=m=>!!e[m],t[0]=e,t[1]=o):o=t[1];const a=o,s=Cs;let r;t[2]!==e?(r=Ft.reduce((m,f)=>e[f.id]?m:m+1,0),t[2]=e,t[3]=r):r=t[3];const i=r;let c;return t[4]!==a||t[5]!==i?(c={isSeen:a,markSeen:s,unseenCount:i},t[4]=a,t[5]=i,t[6]=c):c=t[6],c}function Cs(t){ie[t]||Ps({...ie,[t]:{seenAt:new Date().toISOString()}})}const Es=720*60*60*1e3,Os=10080*60*1e3;function Is(t){const[e,o,a]=t.split("-").map(Number);return!e||!o||!a?new Date(t).getTime():new Date(e,o-1,a).getTime()}function $s(t){const e=Ft[0];if(!e)return null;const o=Is(e.date),a=t-o;return a<0||a>Es?null:e}function Ls(t){if(t instanceof Date)return t.getTime();if(typeof t=="string"||typeof t=="number"){const e=new Date(t).getTime();return Number.isFinite(e)?e:null}return null}function Ds(t,e){const o=Ls(t);return o===null?!1:e-o>=Os}function Rs(){const t=R.c(46),e=J(),o=On(),a=Wt(),s=$t(),r=!!o,i=a===te.home&&!o;let c;t[0]!==s||t[1]!==r?(c=r&&!!s&&zt(s),t[0]=s,t[1]=r,t[2]=c):c=t[2];const m=c,{data:f}=Be.useSession(),{isSeen:S,markSeen:d}=As(),g=Ln(6e4);let l,p,h;if(t[3]!==S||t[4]!==g||t[5]!==f?.user?.createdAt){h=Symbol.for("react.early_return_sentinel");e:{if(l=$s(g),!l){h=null;break e}if(!Ds(f?.user?.createdAt,g)){h=null;break e}p=S(l.id)}t[3]=S,t[4]=g,t[5]=f?.user?.createdAt,t[6]=l,t[7]=p,t[8]=h}else l=t[6],p=t[7],h=t[8];if(h!==Symbol.for("react.early_return_sentinel"))return h;if(p)return null;let u;t[9]!==l.id||t[10]!==r||t[11]!==d||t[12]!==i||t[13]!==m||t[14]!==e?(u=()=>{d(l.id),ks(e,{onOrgHome:i,inProject:r,onSiteEditor:m})},t[9]=l.id,t[10]=r,t[11]=d,t[12]=i,t[13]=m,t[14]=e,t[15]=u):u=t[15];const w=u;let y;t[16]!==e?(y=e("announcements.release.ariaLabel"),t[16]=e,t[17]=y):y=t[17];let x;t[18]!==e?(x=e("announcements.release.dismiss"),t[18]=e,t[19]=x):x=t[19];const j=l.eyebrow,b=l.title;let T;t[20]!==l.id||t[21]!==d?(T=()=>d(l.id),t[20]=l.id,t[21]=d,t[22]=T):T=t[22];let v;t[23]!==l.id||t[24]!==l.learnMoreHref||t[25]!==d||t[26]!==e?(v=l.learnMoreHref?n.jsx("a",{href:l.learnMoreHref,target:"_blank",rel:"noreferrer",onClick:()=>d(l.id),className:"underline-offset-2 hover:text-foreground hover:underline",children:e("announcements.release.learnMore")}):null,t[23]=l.id,t[24]=l.learnMoreHref,t[25]=d,t[26]=e,t[27]=v):v=t[27];let k;t[28]!==l.cta||t[29]!==l.id||t[30]!==d||t[31]!==w?(k=l.cta?"href"in l.cta?n.jsx(z,{asChild:!0,size:"sm",onClick:()=>d(l.id),children:n.jsx("a",{href:l.cta.href,children:l.cta.label})}):n.jsx(z,{size:"sm",onClick:w,children:l.cta.label}):null,t[28]=l.cta,t[29]=l.id,t[30]=d,t[31]=w,t[32]=k):k=t[32];let _;t[33]!==l.bullets?(_=l.bullets.map(zs),t[33]=l.bullets,t[34]=_):_=t[34];let N;t[35]!==_?(N=n.jsx("ul",{className:"flex flex-col gap-3",children:_}),t[35]=_,t[36]=N):N=t[36];let P;return t[37]!==l.eyebrow||t[38]!==l.title||t[39]!==k||t[40]!==N||t[41]!==y||t[42]!==x||t[43]!==T||t[44]!==v?(P=n.jsx(Lt,{ariaLabel:y,dismissLabel:x,eyebrow:j,title:b,onDismiss:T,footerLeading:v,actions:k,children:N}),t[37]=l.eyebrow,t[38]=l.title,t[39]=k,t[40]=N,t[41]=y,t[42]=x,t[43]=T,t[44]=v,t[45]=P):P=t[45],P}function zs(t,e){return n.jsxs("li",{className:"flex items-start gap-3",children:[n.jsx(t.icon,{size:20,className:"mt-0.5 shrink-0 text-muted-foreground"}),n.jsxs("div",{className:"min-w-0",children:[n.jsx("p",{className:"text-sm font-medium text-foreground",children:t.title}),n.jsx("p",{className:"text-xs text-muted-foreground",children:t.body})]})]},e)}function Fs(t){const e=R.c(11),{open:o,onOpenChange:a}=t,s=J();let r;e[0]!==s?(r=s("common.keyboardShortcutsDialog.title"),e[0]=s,e[1]=r):r=e[1];let i;e[2]!==r?(i=n.jsx(Tt,{children:n.jsx(Nt,{children:r})}),e[2]=r,e[3]=i):i=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx("div",{className:"flex flex-col gap-4",children:Yt.map(qs)}),e[4]=c):c=e[4];let m;e[5]!==i?(m=n.jsxs(_t,{className:"sm:max-w-md",children:[i,c]}),e[5]=i,e[6]=m):m=e[6];let f;return e[7]!==a||e[8]!==o||e[9]!==m?(f=n.jsx(Pt,{open:o,onOpenChange:a,children:m}),e[7]=a,e[8]=o,e[9]=m,e[10]=f):f=e[10],f}function qs(t){return n.jsxs("div",{children:[n.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:t.label}),n.jsx("div",{className:"flex flex-col gap-1.5",children:t.shortcuts.map(Bs)})]},t.label)}function Bs(t){return n.jsxs("div",{className:"flex items-center justify-between py-1",children:[n.jsx("span",{className:"text-sm",children:t.description}),n.jsx("div",{className:"flex items-center gap-1",children:t.keys.map(Ms)})]},t.description)}function Ms(t){return n.jsx("kbd",{className:"inline-flex items-center justify-center min-w-6 h-6 px-1.5 rounded-sm border border-border bg-muted text-muted-foreground text-xs font-mono",children:t},t)}const wt=8;function Ks(t){const{org:e}=ct(),o=Kn({connectionId:Ct,orgId:e.id,orgSlug:e.slug}),{data:a}=Me({queryKey:Ve.globalSearch(e.id,t,wt),enabled:!!o&&t.trim().length>=2,staleTime:15e3,retry:!1,queryFn:async()=>{if(!o)return[];try{return(await o.callTool({name:"GLOBAL_SEARCH",arguments:{query:t,limit:wt}})).structuredContent?.items??[]}catch{return[]}}});return a??[]}function Hs(t){const e=R.c(195),{open:o,onOpenChange:a}=t,s=J(),r=At(),{org:i}=ct(),{projects:c,hasProjects:m}=In(),[f,S]=Q.useState(""),d=Q.useDeferredValue(f),g=Ks(d);let l;e[0]!==a?(l=()=>{a(!1),S("")},e[0]=a,e[1]=l):l=e[1];const p=l;let h;e[2]!==p?(h=(B,M)=>{at("command_palette_used",{kind:M}),B(),p()},e[2]=p,e[3]=h):h=e[3];const u=h;let w;e[4]!==r||e[5]!==i.id||e[6]!==i.slug?(w=B=>{if(B.type==="connection"){if(!B.slug){r({to:"/$org/settings/connections",params:{org:i.slug},search:{tab:"all"}});return}r({to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:B.slug}});return}if(B.type==="task"){r({to:te.tasks,params:{org:i.slug,taskKey:B.key??void 0}});return}const M=Et(i.id).id;Qt(r,Xt({org:i.slug,agentId:B.virtual_mcp_id??M,superAgentId:M}),{search:()=>({thread:B.id}),replace:!1})},e[4]=r,e[5]=i.id,e[6]=i.slug,e[7]=w):w=e[7];const y=w;let x;e[8]!==f?(x=[f],e[8]=f,e[9]=x):x=e[9];const j=x;let b,T,v,k,_,N,P,C,I,O,D,A,F;if(e[10]!==p||e[11]!==u||e[12]!==m||e[13]!==g||e[14]!==r||e[15]!==a||e[16]!==o||e[17]!==y||e[18]!==i.slug||e[19]!==c||e[20]!==j||e[21]!==s||e[22]!==f){const B=g.filter(Js),M=g.filter(Us);let G;e[36]!==i.slug?(G={org:i.slug},e[36]=i.slug,e[37]=G):G=e[37];const $=G;let V;e[38]!==s?(V=s("sidebar.navDestinations.home"),e[38]=s,e[39]=V):V=e[39];let W;e[40]===Symbol.for("react.memo_cache_sentinel")?(W=n.jsx(Nn,{"aria-hidden":"true"}),e[40]=W):W=e[40];let H;e[41]!==$||e[42]!==V?(H={key:"home",label:V,icon:W,to:te.home,params:$},e[41]=$,e[42]=V,e[43]=H):H=e[43];let U;e[44]!==s?(U=s("sidebar.navDestinations.reports"),e[44]=s,e[45]=U):U=e[45];let Z;e[46]===Symbol.for("react.memo_cache_sentinel")?(Z=n.jsx(_n,{"aria-hidden":"true"}),e[46]=Z):Z=e[46];let Y;e[47]!==$||e[48]!==U?(Y={key:"reports",label:U,icon:Z,to:te.reports,params:$},e[47]=$,e[48]=U,e[49]=Y):Y=e[49];let L;e[50]!==s?(L=s("sidebar.navDestinations.tasks"),e[50]=s,e[51]=L):L=e[51];let K;e[52]===Symbol.for("react.memo_cache_sentinel")?(K=n.jsx(pt,{"aria-hidden":"true"}),e[52]=K):K=e[52];let re;e[53]!==i.slug?(re={org:i.slug,taskKey:void 0},e[53]=i.slug,e[54]=re):re=e[54];let le;e[55]!==L||e[56]!==re?(le={key:"tasks",label:L,icon:K,to:te.tasks,params:re},e[55]=L,e[56]=re,e[57]=le):le=e[57];let ce;e[58]!==s?(ce=s("sidebar.navDestinations.library"),e[58]=s,e[59]=ce):ce=e[59];let We;e[60]===Symbol.for("react.memo_cache_sentinel")?(We=n.jsx(Pn,{"aria-hidden":"true"}),e[60]=We):We=e[60];let de;e[61]!==$||e[62]!==ce?(de={key:"library",label:ce,icon:We,to:te.library,params:$},e[61]=$,e[62]=ce,e[63]=de):de=e[63];let ue;e[64]!==s?(ue=s("sidebar.navDestinations.discover"),e[64]=s,e[65]=ue):ue=e[65];let Ye;e[66]===Symbol.for("react.memo_cache_sentinel")?(Ye=n.jsx(An,{"aria-hidden":"true"}),e[66]=Ye):Ye=e[66];let me;e[67]!==$||e[68]!==ue?(me={key:"discover",label:ue,icon:Ye,to:te.discover,params:$},e[67]=$,e[68]=ue,e[69]=me):me=e[69];let Qe;e[70]!==H||e[71]!==Y||e[72]!==le||e[73]!==de||e[74]!==me?(Qe=[H,Y,le,de,me],e[70]=H,e[71]=Y,e[72]=le,e[73]=de,e[74]=me,e[75]=Qe):Qe=e[75];const ot=Qe;T=Rn,k=o,e[76]!==p||e[77]!==a?(_=E=>E?a(!0):p(),e[76]=p,e[77]=a,e[78]=_):_=e[78],e[79]!==s?(N=s("commandPalette.title"),e[79]=s,e[80]=N):N=e[80],e[81]!==s?(P=s("commandPalette.description"),e[81]=s,e[82]=P):P=e[82];let fe;e[83]!==s?(fe=s("commandPalette.placeholder"),e[83]=s,e[84]=fe):fe=e[84];let he;e[85]!==s?(he=s("commandPalette.placeholder"),e[85]=s,e[86]=he):he=e[86],e[87]!==fe||e[88]!==he||e[89]!==f?(C=n.jsx(zn,{placeholder:fe,"aria-label":he,value:f,onValueChange:S}),e[87]=fe,e[88]=he,e[89]=f,e[90]=C):C=e[90],b=Fn;let ge;e[91]!==s?(ge=s("commandPalette.empty"),e[91]=s,e[92]=ge):ge=e[92],e[93]!==ge?(I=n.jsx(qn,{children:ge}),e[93]=ge,e[94]=I):I=e[94];let pe;e[95]!==s?(pe=s("commandPalette.goTo"),e[95]=s,e[96]=pe):pe=e[96];let ye;e[97]!==ot||e[98]!==u||e[99]!==r?(ye=ot.map(E=>n.jsxs(ne,{onSelect:()=>u(()=>r({to:E.to,params:E.params}),"destination"),children:[E.icon,n.jsx("span",{children:E.label})]},E.key)),e[97]=ot,e[98]=u,e[99]=r,e[100]=ye):ye=e[100],e[101]!==pe||e[102]!==ye?(O=n.jsx(Ke,{heading:pe,children:ye}),e[101]=pe,e[102]=ye,e[103]=O):O=e[103],e[104]!==u||e[105]!==m||e[106]!==r||e[107]!==i.slug||e[108]!==c||e[109]!==s?(D=m&&n.jsx(Ke,{heading:s("commandPalette.projects"),children:c.map(E=>n.jsxs(ne,{value:`project ${E.title}`,onSelect:()=>u(()=>r({to:te.projects,params:{org:i.slug,agentId:E.id}}),"project"),children:[n.jsx(Mn,{icon:E.icon,name:E.title,"aria-hidden":"true"}),n.jsx("span",{children:E.title})]},E.id))}),e[104]=u,e[105]=m,e[106]=r,e[107]=i.slug,e[108]=c,e[109]=s,e[110]=D):D=e[110];let be;e[111]!==s?(be=s("commandPalette.actions"),e[111]=s,e[112]=be):be=e[112];let xe;e[113]!==s?(xe=s("commandPalette.newProject"),e[113]=s,e[114]=xe):xe=e[114];let Se;e[115]!==u||e[116]!==r||e[117]!==$?(Se=()=>u(()=>r({to:te.home,params:$}),"new_project"),e[115]=u,e[116]=r,e[117]=$,e[118]=Se):Se=e[118];let Xe;e[119]===Symbol.for("react.memo_cache_sentinel")?(Xe=n.jsx(bt,{"aria-hidden":"true"}),e[119]=Xe):Xe=e[119];let we;e[120]!==s?(we=s("commandPalette.newProject"),e[120]=s,e[121]=we):we=e[121];let je;e[122]!==we?(je=n.jsx("span",{children:we}),e[122]=we,e[123]=je):je=e[123];let ve;e[124]!==xe||e[125]!==Se||e[126]!==je?(ve=n.jsxs(ne,{value:xe,onSelect:Se,children:[Xe,je]}),e[124]=xe,e[125]=Se,e[126]=je,e[127]=ve):ve=e[127];let ke;e[128]!==s?(ke=s("commandPalette.inviteTeammate"),e[128]=s,e[129]=ke):ke=e[129];let Te;e[130]!==u||e[131]!==r||e[132]!==$?(Te=()=>u(()=>r({to:"/$org/settings/members",params:$}),"invite"),e[130]=u,e[131]=r,e[132]=$,e[133]=Te):Te=e[133];let Ze;e[134]===Symbol.for("react.memo_cache_sentinel")?(Ze=n.jsx(Cn,{"aria-hidden":"true"}),e[134]=Ze):Ze=e[134];let Ne;e[135]!==s?(Ne=s("commandPalette.inviteTeammate"),e[135]=s,e[136]=Ne):Ne=e[136];let _e;e[137]!==Ne?(_e=n.jsx("span",{children:Ne}),e[137]=Ne,e[138]=_e):_e=e[138];let Pe;e[139]!==ke||e[140]!==Te||e[141]!==_e?(Pe=n.jsxs(ne,{value:ke,onSelect:Te,children:[Ze,_e]}),e[139]=ke,e[140]=Te,e[141]=_e,e[142]=Pe):Pe=e[142];let Ae;e[143]!==s?(Ae=s("commandPalette.addConnection"),e[143]=s,e[144]=Ae):Ae=e[144];let Ce;e[145]!==u||e[146]!==r||e[147]!==$?(Ce=()=>u(()=>r({to:"/$org/settings/connections",params:$,search:{tab:"all"}}),"add_connection"),e[145]=u,e[146]=r,e[147]=$,e[148]=Ce):Ce=e[148];let et;e[149]===Symbol.for("react.memo_cache_sentinel")?(et=n.jsx(bt,{"aria-hidden":"true"}),e[149]=et):et=e[149];let Ee;e[150]!==s?(Ee=s("commandPalette.addConnection"),e[150]=s,e[151]=Ee):Ee=e[151];let Oe;e[152]!==Ee?(Oe=n.jsx("span",{children:Ee}),e[152]=Ee,e[153]=Oe):Oe=e[153];let Ie;e[154]!==Ae||e[155]!==Ce||e[156]!==Oe?(Ie=n.jsxs(ne,{value:Ae,onSelect:Ce,children:[et,Oe]}),e[154]=Ae,e[155]=Ce,e[156]=Oe,e[157]=Ie):Ie=e[157];let $e;e[158]!==s?($e=s("commandPalette.settings"),e[158]=s,e[159]=$e):$e=e[159];let Le;e[160]!==u||e[161]!==r||e[162]!==$?(Le=()=>u(()=>r({to:"/$org/settings/general",params:$}),"settings"),e[160]=u,e[161]=r,e[162]=$,e[163]=Le):Le=e[163];let tt;e[164]===Symbol.for("react.memo_cache_sentinel")?(tt=n.jsx(Dn,{"aria-hidden":"true"}),e[164]=tt):tt=e[164];let De;e[165]!==s?(De=s("commandPalette.settings"),e[165]=s,e[166]=De):De=e[166];let Re;e[167]!==De?(Re=n.jsx("span",{children:De}),e[167]=De,e[168]=Re):Re=e[168];let ze;e[169]!==$e||e[170]!==Le||e[171]!==Re?(ze=n.jsxs(ne,{value:$e,onSelect:Le,children:[tt,Re]}),e[169]=$e,e[170]=Le,e[171]=Re,e[172]=ze):ze=e[172],e[173]!==be||e[174]!==ve||e[175]!==Pe||e[176]!==Ie||e[177]!==ze?(A=n.jsxs(Ke,{heading:be,children:[ve,Pe,Ie,ze]}),e[173]=be,e[174]=ve,e[175]=Pe,e[176]=Ie,e[177]=ze,e[178]=A):A=e[178],F=B.length>0&&n.jsx(Ke,{heading:s("commandPalette.connections"),children:B.map(E=>n.jsxs(ne,{value:`${E.title} ${E.id}`,keywords:j,onSelect:()=>u(()=>y(E),"connection"),children:[n.jsx(Bn,{icon:E.icon,name:E.title,size:"2xs","aria-hidden":"true"}),n.jsx("span",{className:"truncate",children:E.title})]},`connection:${E.id}`))}),v=M.length>0&&n.jsx(Ke,{heading:s("commandPalette.results"),children:M.map(E=>n.jsxs(ne,{value:`${E.title} ${E.id}`,keywords:j,onSelect:()=>u(()=>y(E),E.type),children:[E.type==="thread"?n.jsx(Tn,{"aria-hidden":"true"}):n.jsx(pt,{"aria-hidden":"true"}),n.jsx("span",{className:"truncate",children:E.title}),E.type==="task"&&E.key&&n.jsx("span",{className:"ml-auto shrink-0 font-mono text-xs text-muted-foreground",children:E.key})]},`${E.type}:${E.id}`))}),e[10]=p,e[11]=u,e[12]=m,e[13]=g,e[14]=r,e[15]=a,e[16]=o,e[17]=y,e[18]=i.slug,e[19]=c,e[20]=j,e[21]=s,e[22]=f,e[23]=b,e[24]=T,e[25]=v,e[26]=k,e[27]=_,e[28]=N,e[29]=P,e[30]=C,e[31]=I,e[32]=O,e[33]=D,e[34]=A,e[35]=F}else b=e[23],T=e[24],v=e[25],k=e[26],_=e[27],N=e[28],P=e[29],C=e[30],I=e[31],O=e[32],D=e[33],A=e[34],F=e[35];let q;e[179]!==b||e[180]!==v||e[181]!==I||e[182]!==O||e[183]!==D||e[184]!==A||e[185]!==F?(q=n.jsxs(b,{children:[I,O,D,A,F,v]}),e[179]=b,e[180]=v,e[181]=I,e[182]=O,e[183]=D,e[184]=A,e[185]=F,e[186]=q):q=e[186];let X;return e[187]!==T||e[188]!==k||e[189]!==_||e[190]!==N||e[191]!==P||e[192]!==C||e[193]!==q?(X=n.jsxs(T,{open:k,onOpenChange:_,title:N,description:P,children:[C,q]}),e[187]=T,e[188]=k,e[189]=_,e[190]=N,e[191]=P,e[192]=C,e[193]=q,e[194]=X):X=e[194],X}function Us(t){return t.type!=="connection"}function Js(t){return t.type==="connection"}const Ue=new Vn(!1);function Gs(){Ue.set(!0)}function Vs(){Ue.set(!1)}function Ws(){const t=R.c(2),e=Q.useSyncExternalStore(Ue.subscribe,Ue.get);let o;return t[0]!==e?(o=[e,Ue.set],t[0]=e,t[1]=o):o=t[1],o}const Ys=300*1e3,Qs=2;function Xs(t,e,o){return!e||e===o?{version:null,count:0}:t.version===e?{version:e,count:t.count+1}:{version:e,count:1}}function Zs(t,e){return t.count>=Qs&&t.version!==null&&t.version!==e}function eo(){const t=R.c(31),e=J();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={queryKey:Ve.appVersionCheck(),queryFn:no,refetchInterval:Ys,refetchIntervalInBackground:!0,staleTime:0},t[0]=o):o=t[0];const{data:a,dataUpdatedAt:s}=Me(o),[r,i]=Q.useState(0);let c;t[1]===Symbol.for("react.memo_cache_sentinel")?(c={version:null,count:0},t[1]=c):c=t[1];const[m,f]=Q.useState(c);s!==r&&(i(s),f(k=>Xs(k,a,"4.542.0")));const[S,d]=Q.useState(null);if(!Zs(m,S))return null;let g;t[2]!==e?(g=e("announcements.version.ariaLabel"),t[2]=e,t[3]=g):g=t[3];let l;t[4]!==e?(l=e("announcements.version.dismiss"),t[4]=e,t[5]=l):l=t[5];let p;t[6]!==e?(p=e("announcements.version.eyebrow"),t[6]=e,t[7]=p):p=t[7];let h;t[8]!==e?(h=e("announcements.version.title"),t[8]=e,t[9]=h):h=t[9];let u;t[10]!==e?(u=e("announcements.version.description"),t[10]=e,t[11]=u):u=t[11];let w;t[12]===Symbol.for("react.memo_cache_sentinel")?(w=n.jsx(ft,{size:16}),t[12]=w):w=t[12];let y;t[13]!==m.version?(y=()=>d(m.version),t[13]=m.version,t[14]=y):y=t[14];let x;t[15]!==e?(x=e("announcements.version.currentSession",{version:"4.542.0"}),t[15]=e,t[16]=x):x=t[16];let j;t[17]!==e?(j=e("announcements.version.refresh"),t[17]=e,t[18]=j):j=t[18];let b;t[19]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx(ft,{size:14}),t[19]=b):b=t[19];let T;t[20]!==j?(T=n.jsxs(z,{size:"sm",onClick:to,children:[j,b]}),t[20]=j,t[21]=T):T=t[21];let v;return t[22]!==T||t[23]!==g||t[24]!==l||t[25]!==p||t[26]!==h||t[27]!==u||t[28]!==y||t[29]!==x?(v=n.jsx(Lt,{ariaLabel:g,dismissLabel:l,eyebrow:p,title:h,description:u,icon:w,tone:"system",onDismiss:y,footerLeading:x,actions:T}),t[22]=T,t[23]=g,t[24]=l,t[25]=p,t[26]=h,t[27]=u,t[28]=y,t[29]=x,t[30]=v):v=t[30],v}function to(){return window.location.reload()}async function no(){const t=await fetch("/api/config",{cache:"no-store"}),{config:e}=await t.json();return e.version}function so(t){return{has(){try{return localStorage.getItem(t)==="1"}catch{return!1}},mark(){try{localStorage.setItem(t,"1")}catch{}}}}const oo=Date.parse("2026-07-21T00:00:00Z"),jt=t=>so(Ge.ptBrAnnouncementSeen(t));function io(){const t=R.c(35),e=J(),[o,a]=Zt(),{data:s,isPending:r}=Be.useSession(),i=s?.user,c=i?.id,m=i?.createdAt,f=m!=null&&new Date(m).getTime()<oo,S=en()==="pt-BR",d=!r&&!!c&&f&&S&&o.language==="en"&&!jt(c).has(),[g,l]=Q.useState(!1),[p,h]=Q.useState(!1);!g&&!r&&(l(!0),d&&c&&(jt(c).mark(),a(ro),h(!0),at("pt_br_auto_switch_shown")));let u;t[0]===Symbol.for("react.memo_cache_sentinel")?(u=X=>{at("pt_br_auto_switch_closed",{action:X}),h(!1)},t[0]=u):u=t[0];const w=u;let y;t[1]!==a?(y=()=>{a(ao),w("switch-back")},t[1]=a,t[2]=y):y=t[2];const x=y;let j;t[3]===Symbol.for("react.memo_cache_sentinel")?(j=X=>!X&&w("dismiss"),t[3]=j):j=t[3];let b;t[4]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx("div",{className:"text-4xl","aria-hidden":"true",children:"🇧🇷"}),t[4]=b):b=t[4];let T;t[5]!==e?(T=e("announcements.ptBr.title"),t[5]=e,t[6]=T):T=t[6];let v;t[7]!==T?(v=n.jsx(Nt,{children:T}),t[7]=T,t[8]=v):v=t[8];let k;t[9]!==e?(k=e("announcements.ptBr.description"),t[9]=e,t[10]=k):k=t[10];let _;t[11]!==k?(_=n.jsx(tn,{children:k}),t[11]=k,t[12]=_):_=t[12];let N;t[13]!==v||t[14]!==_?(N=n.jsxs(Tt,{children:[v,_]}),t[13]=v,t[14]=_,t[15]=N):N=t[15];let P;t[16]!==e?(P=e("announcements.ptBr.switchBack"),t[16]=e,t[17]=P):P=t[17];let C;t[18]!==x||t[19]!==P?(C=n.jsx(z,{variant:"outline",onClick:x,children:P}),t[18]=x,t[19]=P,t[20]=C):C=t[20];let I;t[21]===Symbol.for("react.memo_cache_sentinel")?(I=()=>w("ok"),t[21]=I):I=t[21];let O;t[22]!==e?(O=e("announcements.ptBr.ok"),t[22]=e,t[23]=O):O=t[23];let D;t[24]!==O?(D=n.jsx(z,{onClick:I,children:O}),t[24]=O,t[25]=D):D=t[25];let A;t[26]!==C||t[27]!==D?(A=n.jsxs(nn,{children:[C,D]}),t[26]=C,t[27]=D,t[28]=A):A=t[28];let F;t[29]!==A||t[30]!==N?(F=n.jsxs(_t,{className:"sm:max-w-md",children:[b,N,A]}),t[29]=A,t[30]=N,t[31]=F):F=t[31];let q;return t[32]!==p||t[33]!==F?(q=n.jsx(Pt,{open:p,onOpenChange:j,children:F}),t[32]=p,t[33]=F,t[34]=q):q=t[34],q}function ao(t){return{...t,language:"en"}}function ro(t){return{...t,language:"pt-BR"}}function lo(t){const e=sn(t);return typeof e=="string"?e:void 0}function co(){return lo("experiment-pipeline-check"),null}function uo(t){const e=R.c(1),{activeOrg:o}=t;if(!o)return null;on(o.id,{name:o.name??void 0,slug:o.slug??void 0}),an();let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(co,{}),e[0]=a):a=e[0],a}function mo(t){const{prev:e,virtualMcpId:o,decopilotId:a,savedLayout:s,opts:r,autosendValue:i}=t,c={mainpanel:void 0};o?c.virtualmcpid=o:e.virtualmcpid&&(c.virtualmcpid=e.virtualmcpid);const m=typeof e.virtualmcpid=="string"?e.virtualmcpid:a,S=(o??m)!==m;let d,g;return r?.panel?g=r.panel:r?.newThread&&!S&&rn(e.tabId)?(g=e.tabId,c.mainpanel=e.mainpanel,d=e.sidepanel):s?(g=s.tab,s.sidepanel!==void 0&&(d=s.sidepanel),s.mainpanel!==void 0&&(c.mainpanel=s.mainpanel)):!S&&e.tabId&&!ln(e.tabId)&&(g=e.tabId),d!==void 0&&(c.sidepanel=d),r?.autosend&&(c.autosend=i),{tabId:g,search:c}}const Bt="studio:thread-layout:v4",fo=50;function Mt(t){const e={};return t===null||typeof t!="object"||(typeof t.tab=="string"&&(e.tab=t.tab),typeof t.mainpanel=="boolean"&&(e.mainpanel=t.mainpanel),typeof t.sidepanel=="boolean"&&(e.sidepanel=t.sidepanel)),e}function ho(t,e,o,a=fo){const s=t.filter(([r])=>r!==e);for(s.push([e,Mt(o)]);s.length>a;)s.shift();return s}function dt(){try{const t=sessionStorage.getItem(Bt);if(!t)return[];const e=JSON.parse(t);return Array.isArray(e)?e.filter(o=>Array.isArray(o)&&o.length===2&&typeof o[0]=="string"):[]}catch{return[]}}function Kt(t){try{sessionStorage.setItem(Bt,JSON.stringify(t))}catch{}}function go(t,e){t&&Kt(ho(dt(),t,e))}function po(t){if(!t)return null;const e=dt().find(([o])=>o===t);return e?Mt(e[1]):null}function oi(t){if(!t)return;const e=dt(),o=e.filter(([a])=>a!==t);o.length!==e.length&&Kt(o)}function Ht(t){return{queryKey:Ve.homeNextActions(t),queryFn:async()=>{const e=await fetch(`/api/${t}/home-next-actions`,{cache:"no-store"});if(!e.ok)throw new Error("Failed to load home next actions");return await e.json()},staleTime:0,refetchOnWindowFocus:"always"}}function ii(t){const e=R.c(10);let o;e[0]!==t?(o=Ht(t),e[0]=t,e[1]=o):o=e[1];const a=Me(o);let s;e[2]!==a.data?.prompts?(s=a.data?.prompts??[],e[2]=a.data?.prompts,e[3]=s):s=e[3];let r;e[4]!==a.data?.tiles?(r=a.data?.tiles??[],e[4]=a.data?.tiles,e[5]=r):r=e[5];let i;return e[6]!==a.isLoading||e[7]!==s||e[8]!==r?(i={isLoading:a.isLoading,prompts:s,tiles:r},e[6]=a.isLoading,e[7]=s,e[8]=r,e[9]=i):i=e[9],i}function yo(t){const e=R.c(31),{orgSlug:o,orgName:a,domain:s}=t,r=J();let i;e[0]!==o?(i=()=>{window.location.href=`/api/${encodeURIComponent(o)}/sso/authorize`},e[0]=o,e[1]=i):i=e[1];const c=i,m=bo;let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx("div",{className:"bg-primary/10 p-3 rounded-full","aria-hidden":"true",children:n.jsx(vt,{className:"h-6 w-6 text-primary"})}),e[2]=f):f=e[2];let S;e[3]!==r?(S=r("common.ssoRequiredScreen.title"),e[3]=r,e[4]=S):S=e[4];let d;e[5]!==S?(d=n.jsx("h3",{className:"text-lg font-medium",children:S}),e[5]=S,e[6]=d):d=e[6];let g;e[7]!==s||e[8]!==a||e[9]!==r?(g=a?n.jsxs(n.Fragment,{children:[n.jsx("strong",{children:a})," ",r("common.ssoRequiredScreen.requiresSsoAuth"),s?` ${r("common.ssoRequiredScreen.via",{domain:s})}`:"","."]}):r("common.ssoRequiredScreen.orgRequiresSsoAuth"),e[7]=s,e[8]=a,e[9]=r,e[10]=g):g=e[10];let l;e[11]!==g?(l=n.jsx("p",{className:"text-sm text-muted-foreground",children:g}),e[11]=g,e[12]=l):l=e[12];let p;e[13]!==d||e[14]!==l?(p=n.jsxs("div",{className:"space-y-2",children:[d,l]}),e[13]=d,e[14]=l,e[15]=p):p=e[15];let h;e[16]!==r?(h=r("common.ssoRequiredScreen.signInWithSso"),e[16]=r,e[17]=h):h=e[17];let u;e[18]!==c||e[19]!==h?(u=n.jsx(z,{onClick:c,children:h}),e[18]=c,e[19]=h,e[20]=u):u=e[20];let w;e[21]!==r?(w=r("common.goBack"),e[21]=r,e[22]=w):w=e[22];let y;e[23]!==w?(y=n.jsx(z,{variant:"ghost",onClick:m,children:w}),e[23]=w,e[24]=y):y=e[24];let x;e[25]!==y||e[26]!==u?(x=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[u,y]}),e[25]=y,e[26]=u,e[27]=x):x=e[27];let j;return e[28]!==x||e[29]!==p?(j=n.jsxs(ae,{children:[f,p,x]}),e[28]=x,e[29]=p,e[30]=j):j=e[30],j}function bo(){window.location.href="/"}function xo(t){const e=R.c(27),{notice:o,orgSlug:a}=t,s=J();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:n.jsx(cn,{className:"h-6 w-6 text-destructive"})}),e[0]=r):r=e[0];let i;e[1]!==o.title?(i=n.jsx("h3",{className:"text-lg font-medium",children:o.title}),e[1]=o.title,e[2]=i):i=e[2];let c;e[3]!==o.message?(c=n.jsx("p",{className:"text-sm text-muted-foreground whitespace-pre-line",children:o.message}),e[3]=o.message,e[4]=c):c=e[4];let m;e[5]!==i||e[6]!==c?(m=n.jsxs("div",{className:"space-y-2",children:[i,c]}),e[5]=i,e[6]=c,e[7]=m):m=e[7];let f;e[8]!==o.ctaLabel||e[9]!==o.ctaUrl?(f=o.ctaUrl&&o.ctaLabel?n.jsx(z,{asChild:!0,children:n.jsx("a",{href:o.ctaUrl,target:"_blank",rel:"noreferrer noopener",children:o.ctaLabel})}):null,e[8]=o.ctaLabel,e[9]=o.ctaUrl,e[10]=f):f=e[10];const S=`/${encodeURIComponent(a)}/settings/infra-billing`;let d;e[11]!==s?(d=s("common.blockedOrgScreen.goToBilling"),e[11]=s,e[12]=d):d=e[12];let g;e[13]!==S||e[14]!==d?(g=n.jsx(z,{variant:"outline",asChild:!0,children:n.jsx("a",{href:S,children:d})}),e[13]=S,e[14]=d,e[15]=g):g=e[15];let l;e[16]!==s?(l=s("common.blockedOrgScreen.switchOrg"),e[16]=s,e[17]=l):l=e[17];let p;e[18]!==l?(p=n.jsx(z,{variant:"ghost",asChild:!0,children:n.jsx("a",{href:"/",children:l})}),e[18]=l,e[19]=p):p=e[19];let h;e[20]!==p||e[21]!==f||e[22]!==g?(h=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[f,g,p]}),e[20]=p,e[21]=f,e[22]=g,e[23]=h):h=e[23];let u;return e[24]!==h||e[25]!==m?(u=n.jsxs(ae,{children:[r,m,h]}),e[24]=h,e[25]=m,e[26]=u):u=e[26],u}function So(t){const e=R.c(8);let o;e[0]!==t?(o=Ve.orgNotice(t??""),e[0]=t,e[1]=o):o=e[1];let a;e[2]!==t?(a=async()=>{const i=await fetch(`/api/${t}/notice`,{credentials:"include"});return i.ok?(await i.json()).notice??null:null},e[2]=t,e[3]=a):a=e[3];const s=!!t;let r;return e[4]!==o||e[5]!==a||e[6]!==s?(r={queryKey:o,queryFn:a,enabled:s,staleTime:6e4},e[4]=o,e[5]=a,e[6]=s,e[7]=r):r=e[7],Me(r)}const wo="/settings/infra-billing";function jo(t){return(t.endsWith("/")?t.slice(0,-1):t).endsWith(wo)}function vo(t){const e=R.c(7),{org:o,children:a}=t;let s;e[0]!==o.id||e[1]!==o.name?(s={id:o.id,organizationId:o.id,slug:"_org",name:o.name,ui:null},e[0]=o.id,e[1]=o.name,e[2]=s):s=e[2];const r=s;let i;return e[3]!==a||e[4]!==o||e[5]!==r?(i=n.jsx(yn,{org:o,project:r,children:a}),e[3]=a,e[4]=o,e[5]=r,e[6]=i):i=e[6],i}function ko(){const t=At(),e=Wn(),{org:o}=ct(),a=dn({strict:!1}),s=$t(),{openPanel:r,closePanel:i}=$n(),c=Xn(),m=Zn(),f=es(),S=ts(),d=(h,u=!0)=>t({to:".",search:h,replace:u}),g=()=>d(h=>({...h,sidepanel:!0})),l=(h,u,w)=>{const y=!!m&&m===h;m&&!y&&go(m,{tab:s,mainpanel:a.mainpanel,sidepanel:a.sidepanel});const x=y?null:po(h),j=Et(o.id).id,b=mo({prev:{virtualmcpid:c,tabId:s,mainpanel:a.mainpanel,sidepanel:a.sidepanel},virtualMcpId:u,decopilotId:j,savedLayout:x,opts:w,autosendValue:Qn});return S(h,()=>b.search,{virtualMcpId:u,view:{tabId:b.tabId}})};return{openSidePanel:g,setTaskId:l,createNewTask:async(h,u,w)=>{const y=crypto.randomUUID(),x=h??f;try{await e?.create({id:y,virtual_mcp_id:x,...u?{branch:u}:{}})}catch{}l(y,x,{...w,newThread:!0})},openTab:r,closeTab:i}}const To=new Set(["/$org/","/$org/home"]);function No(){const t=R.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e={select:_o},t[0]=e):e=t[0],Ot(e)}function _o(t){const e=t.matches.at(-1)?.fullPath;return e!==void 0&&To.has(e)}function Po(){const t=R.c(53);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org",shouldThrow:!1},t[0]=e):e=t[0];const a=un(e)?.params.org,[s,r]=Q.useState(!1),[i,c]=Ws(),[m,f]=Un(),S=mn(),d=No(),g=a??"";let l;t[1]!==g?(l=Ht(g),t[1]=g,t[2]=l):l=t[2];const p=!!a&&d;let h;t[3]!==l||t[4]!==p?(h={...l,enabled:p},t[3]=l,t[4]=p,t[5]=h):h=t[5],Me(h);const{data:u}=Be.useSession(),w=u?.user?.id;let y,x;t[6]!==S?(y=()=>{const L=K=>{if(gt(K)&&K.code==="KeyK"){K.preventDefault(),Gs();return}if(K.key==="?"&&!pn(K.target)){K.preventDefault(),r(!0);return}gt(K)&&K.code==="BracketLeft"&&S.history.canGoBack()&&(K.preventDefault(),S.history.back())};return document.addEventListener("keydown",L),()=>document.removeEventListener("keydown",L)},x=[S],t[6]=S,t[7]=y,t[8]=x):(y=t[7],x=t[8]),Q.useEffect(y,x);let j;t[9]!==a||t[10]!==w?(j=fn(a,w),t[9]=a,t[10]=w,t[11]=j):j=t[11];const{data:b}=kt(j),T=b?.id,v=b?.slug,{data:k}=ns(T,v),_=!!k?.ssoRequired&&!k.authenticated,{data:N}=So(v);let P;t[12]===Symbol.for("react.memo_cache_sentinel")?(P={select:Ao},t[12]=P):P=t[12];const C=Ot(P),I=N?.severity==="block"&&!jo(C),O=T??"",D=v??"";let A;t[13]!==D||t[14]!==O?(A=Hn({connectionId:Ct,orgId:O,orgSlug:D}),t[13]=D,t[14]=O,t[15]=A):A=t[15];const F=!!T&&!!v;let q;if(t[16]!==A||t[17]!==F?(q={...A,enabled:F},t[16]=A,t[17]=F,t[18]=q):q=t[18],Me(q),(!b||ht(b)||_||I)&&Vs(),!b){let L;return t[19]!==a?(L=n.jsx(hs,{orgSlug:a}),t[19]=a,t[20]=L):L=t[20],L}if(ht(b)){localStorage.getItem(Ge.lastOrgSlug())===a&&localStorage.removeItem(Ge.lastOrgSlug());let L;return t[21]!==b.name?(L=n.jsx(hn,{orgName:b.name}),t[21]=b.name,t[22]=L):L=t[22],L}if(I&&N){let L;return t[23]!==b.slug||t[24]!==N?(L=n.jsx(xo,{notice:N,orgSlug:b.slug}),t[23]=b.slug,t[24]=N,t[25]=L):L=t[25],L}if(_){let L;return t[26]!==b.id||t[27]!==b.name||t[28]!==b.slug||t[29]!==k.domain?(L=n.jsx(yo,{orgId:b.id,orgSlug:b.slug,orgName:b.name,domain:k.domain}),t[26]=b.id,t[27]=b.name,t[28]=b.slug,t[29]=k.domain,t[30]=L):L=t[30],L}const B=b.logo??null;let M;t[31]!==b||t[32]!==B?(M={...b,logo:B},t[31]=b,t[32]=B,t[33]=M):M=t[33];let G;t[34]!==b?(G=n.jsx(uo,{activeOrg:b}),t[34]=b,t[35]=G):G=t[35];let $;t[36]===Symbol.for("react.memo_cache_sentinel")?($=n.jsx(gn,{}),t[36]=$):$=t[36];let V;t[37]===Symbol.for("react.memo_cache_sentinel")?(V=n.jsxs("div",{className:"fixed bottom-6 right-6 z-50 flex w-[min(360px,calc(100vw-3rem))] flex-col gap-3",children:[n.jsx(Rs,{}),n.jsx(eo,{})]}),t[37]=V):V=t[37];let W;t[38]!==i||t[39]!==c?(W=i&&n.jsx(Hs,{open:i,onOpenChange:c}),t[38]=i,t[39]=c,t[40]=W):W=t[40];let H;t[41]!==m||t[42]!==f?(H=m&&n.jsx(Jn,{open:!0,onOpenChange:f,source:Gn()}),t[41]=m,t[42]=f,t[43]=H):H=t[43];let U;t[44]!==s?(U=n.jsx(Fs,{open:s,onOpenChange:r}),t[44]=s,t[45]=U):U=t[45];let Z;t[46]===Symbol.for("react.memo_cache_sentinel")?(Z=n.jsx(io,{}),t[46]=Z):Z=t[46];let Y;return t[47]!==M||t[48]!==G||t[49]!==W||t[50]!==H||t[51]!==U?(Y=n.jsxs(vo,{org:M,children:[G,$,V,W,H,U,Z]}),t[47]=M,t[48]=G,t[49]=W,t[50]=H,t[51]=U,t[52]=Y):Y=t[52],Y}function Ao(t){return t.location.pathname}function Co(){const t=R.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Yn,{children:n.jsx(Po,{})}),t[0]=e):e=t[0],e}const ai=Object.freeze(Object.defineProperty({__proto__:null,default:Co,usePanelActions:ko},Symbol.toStringTag,{value:"Module"}));export{gs as L,ko as a,Ts as b,ii as c,ai as d,oi as f,zt as i,Gs as o,ni as r,si as s,So as u};