decocms 4.587.0 → 4.587.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (470) hide show
  1. package/dist/client/assets/{AlertCircle-D_6mZhd3.js → AlertCircle-gyZP8TIO.js} +1 -1
  2. package/dist/client/assets/{AreaChart-DQSuG1yE.js → AreaChart-BmP0ImmP.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-DjgSByoQ.js → ArrowLeft-BSzt3fBA.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-Du-vqw_x.js → ArrowRight-BF8V67fk.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-Hd6A0uf9.js → ArrowUp-DYnF34lU.js} +1 -1
  6. package/dist/client/assets/{BookOpen01-gL1m_4-g.js → BookOpen01-CpYcxx0H.js} +1 -1
  7. package/dist/client/assets/{CartesianChart-ghS8jWki.js → CartesianChart-Cflx4Yj4.js} +1 -1
  8. package/dist/client/assets/{CategoricalChart-FLgBKuSu.js → CategoricalChart-CIY6jBUR.js} +1 -1
  9. package/dist/client/assets/{CheckCircle-12UwMq4H.js → CheckCircle-CyybvOiK.js} +1 -1
  10. package/dist/client/assets/{ChevronDown-DeUpalBN.js → ChevronDown-DldgAfZA.js} +1 -1
  11. package/dist/client/assets/{ChevronSelectorVertical-DO-HHLr6.js → ChevronSelectorVertical-BbGwltuJ.js} +1 -1
  12. package/dist/client/assets/{ChevronUp-BzeZGyJH.js → ChevronUp-Bt9-G08q.js} +1 -1
  13. package/dist/client/assets/{CreditCard01-C7IRKQGq.js → CreditCard01-vIJuQM5M.js} +1 -1
  14. package/dist/client/assets/{Eye-C1-H4NKN.js → Eye-BLpLvSpN.js} +1 -1
  15. package/dist/client/assets/{File02-CFyU1pAb.js → File02-EV4Uhu5z.js} +1 -1
  16. package/dist/client/assets/{Globe04-DEUqOfwK.js → Globe04-DzGa73Hy.js} +1 -1
  17. package/dist/client/assets/{Image01-D1EDWKnx.js → Image01-BqCHFUEp.js} +1 -1
  18. package/dist/client/assets/{Key01-tELScC1h.js → Key01-KTk95wIy.js} +1 -1
  19. package/dist/client/assets/{LayoutLeft-551J-MO9.js → LayoutLeft-_2SG51dD.js} +1 -1
  20. package/dist/client/assets/{LinkBroken01-BdgK-qQO.js → LinkBroken01-Br9NMWkB.js} +1 -1
  21. package/dist/client/assets/{MessageCircle01-DVvYPWC-.js → MessageCircle01-D170V1-p.js} +1 -1
  22. package/dist/client/assets/{Minus-CwITAxnt.js → Minus-D88-u0DO.js} +1 -1
  23. package/dist/client/assets/{Monitor01-Cj8V3TAw.js → Monitor01-Df3mZyNU.js} +1 -1
  24. package/dist/client/assets/{Play-R1uGwJ-1.js → Play-PdUxpWZE.js} +1 -1
  25. package/dist/client/assets/{Plus-B-S-SZ1j.js → Plus-BYodv7tE.js} +1 -1
  26. package/dist/client/assets/{ReferenceLine-DFNcBn1Q.js → ReferenceLine-DrwOzdWE.js} +1 -1
  27. package/dist/client/assets/{SearchMd-BIZLsFUb.js → SearchMd-Cuy8VOOG.js} +1 -1
  28. package/dist/client/assets/{ShoppingBag01-bCe9ug4u.js → ShoppingBag01-pCIsQ-Jb.js} +1 -1
  29. package/dist/client/assets/{Sun-DJ9HokSi.js → Sun-BABGQWS8.js} +1 -1
  30. package/dist/client/assets/{SwitchHorizontal01-DFAhxuil.js → SwitchHorizontal01-Daz2EgW0.js} +1 -1
  31. package/dist/client/assets/{Tool01-DSm8VUO0.js → Tool01-D6InpKaj.js} +1 -1
  32. package/dist/client/assets/{Tooltip-DKAhw1l_.js → Tooltip-CP1IpP66.js} +1 -1
  33. package/dist/client/assets/{Trash01-DmArjRF_.js → Trash01-LecfbxTv.js} +1 -1
  34. package/dist/client/assets/{TrendUp01-Cb0Ss3qG.js → TrendUp01-C_SySyBC.js} +1 -1
  35. package/dist/client/assets/{Upload01-C0hxLVoS.js → Upload01-CABY93nl.js} +1 -1
  36. package/dist/client/assets/{UserCheck01-DoVM7Q3H.js → UserCheck01-Dqn7toBe.js} +1 -1
  37. package/dist/client/assets/{UserSquare-CeU_BqyG.js → UserSquare-e0qIxN1Q.js} +1 -1
  38. package/dist/client/assets/{Users01-CxZDOmOJ.js → Users01-UF7lWU9g.js} +1 -1
  39. package/dist/client/assets/{XClose-lVRJTaql.js → XClose-C9ONGfkv.js} +1 -1
  40. package/dist/client/assets/{Zap-Cnh7YlUV.js → Zap-D-fE_V4E.js} +1 -1
  41. package/dist/client/assets/{access-gate-wCyQtv5A.js → access-gate-EJXICSzm.js} +1 -1
  42. package/dist/client/assets/{add-connection-dialog-sOS8LW6V.js → add-connection-dialog-CEukHWSz.js} +1 -1
  43. package/dist/client/assets/agent-app-CPNngTIj.js +1 -0
  44. package/dist/client/assets/agent-assets-IEsYbqYf.js +1 -0
  45. package/dist/client/assets/{agent-automation-DxylbM6B.js → agent-automation-iOzcLbza.js} +2 -2
  46. package/dist/client/assets/agent-automations-COHiMRwL.js +1 -0
  47. package/dist/client/assets/agent-blog-ClTYnrpA.js +2 -0
  48. package/dist/client/assets/agent-blog-post-BieKo5sU.js +2 -0
  49. package/dist/client/assets/agent-calendar-DrN9hKs4.js +1 -0
  50. package/dist/client/assets/{agent-capabilities-DFVJwxaH.js → agent-capabilities-g1Ym1ZNZ.js} +1 -1
  51. package/dist/client/assets/agent-connect-sources-CZgCtVaH.js +1 -0
  52. package/dist/client/assets/agent-deck-C63CWfE0.js +1 -0
  53. package/dist/client/assets/agent-e2e-OCkFxgz-.js +1 -0
  54. package/dist/client/assets/agent-experiments-BZeZuSr2.js +1 -0
  55. package/dist/client/assets/agent-file-BS83qFDk.js +1 -0
  56. package/dist/client/assets/agent-hosting-DnFnd1YM.js +1 -0
  57. package/dist/client/assets/agent-icon-CfdcYUE7.js +1 -0
  58. package/dist/client/assets/agent-library-B6Vv6L3Y.js +1 -0
  59. package/dist/client/assets/agent-library-file-CVP6ClM5.js +1 -0
  60. package/dist/client/assets/agent-overview-C3EtX-Ab.js +1 -0
  61. package/dist/client/assets/{agent-releases-JJOjPP8D.js → agent-releases-AtVL__p1.js} +2 -2
  62. package/dist/client/assets/agent-settings-CEIvC9PJ.js +1 -0
  63. package/dist/client/assets/agent-site-editor-code-CP-GqZR-.js +2 -0
  64. package/dist/client/assets/agent-site-editor-content-BmdLBDYW.js +1 -0
  65. package/dist/client/assets/agent-site-editor-preview-_kq8Kx6K.js +1 -0
  66. package/dist/client/assets/{agent-site-editor-B1-p5Hbd.js → agent-site-editor-x-mpZE5Q.js} +2 -2
  67. package/dist/client/assets/agent-view-Ch4mKCK3.js +1 -0
  68. package/dist/client/assets/{agent-view-guard-Dp1jnrh9.js → agent-view-guard-DLjVinhc.js} +1 -1
  69. package/dist/client/assets/{ai-providers-DhIAtcli.js → ai-providers-DVYif0Pc.js} +1 -1
  70. package/dist/client/assets/{alert-D8-tLSOF.js → alert-CvRyYnph.js} +1 -1
  71. package/dist/client/assets/{analytics-sections-CMaRh5vg.js → analytics-sections-DLx5rbIc.js} +1 -1
  72. package/dist/client/assets/{api-keys-BYyk36lL.js → api-keys-CC3fBiOG.js} +1 -1
  73. package/dist/client/assets/api-keys-DW5FUpRL.js +1 -0
  74. package/dist/client/assets/app-editor-D_fd99pv.js +1 -0
  75. package/dist/client/assets/{asset-utils-DZv-FEec.js → asset-utils-CTFQl8QO.js} +1 -1
  76. package/dist/client/assets/{auth-catchall-kXXiTe4J.js → auth-catchall-n3aaYtq8.js} +1 -1
  77. package/dist/client/assets/auth-entry-DIN9lopt.js +1 -0
  78. package/dist/client/assets/{auth-split-layout-CHsrc83a.js → auth-split-layout-C3JVxF8x.js} +1 -1
  79. package/dist/client/assets/{auth-CTQZGBnP.js → auth-vqpzzu5D.js} +1 -1
  80. package/dist/client/assets/{authenticate-and-persist-oauth-D44eIeUD.js → authenticate-and-persist-oauth-Bblph2Da.js} +1 -1
  81. package/dist/client/assets/{automation-list-row-PeCAvjmp.js → automation-list-row-Bz8m8BYO.js} +1 -1
  82. package/dist/client/assets/{automation-runs-BUHEghGv.js → automation-runs-osLD86WP.js} +1 -1
  83. package/dist/client/assets/automations-BVdNqAsv.js +1 -0
  84. package/dist/client/assets/{badge-CXWhQd3j.js → badge-DCIHIkLr.js} +1 -1
  85. package/dist/client/assets/{block-document-CGeTYWv-.js → block-document-Dbx69UMn.js} +1 -1
  86. package/dist/client/assets/{blocks-preview-workspace-context-Dpk4HnW-.js → blocks-preview-workspace-context-CK2OXCcd.js} +1 -1
  87. package/dist/client/assets/{blocks-tab-states-CFYo4clt.js → blocks-tab-states-DeaA94XX.js} +1 -1
  88. package/dist/client/assets/{blog-preview-url-Dnn3CdoH.js → blog-preview-url-58BZuQLd.js} +1 -1
  89. package/dist/client/assets/{blog-schema-DciG3sv2.js → blog-schema-DfhHwBev.js} +1 -1
  90. package/dist/client/assets/{blog-source-gate-DxXfL9t9.js → blog-source-gate-CCV8MP-i.js} +1 -1
  91. package/dist/client/assets/{blog-view-gate-DwmbI_7t.js → blog-view-gate-o9mn9sNx.js} +1 -1
  92. package/dist/client/assets/{buckets-Dn5vUsy9.js → buckets-RrYuA5vR.js} +1 -1
  93. package/dist/client/assets/{build-improve-prompt-doc-CCMSIskc.js → build-improve-prompt-doc-fsuyBe8R.js} +1 -1
  94. package/dist/client/assets/{calendar-C8iDoCnd.js → calendar-BbIAhjX6.js} +1 -1
  95. package/dist/client/assets/{capability-load-error-DGMDILUu.js → capability-load-error-C937GiKP.js} +1 -1
  96. package/dist/client/assets/category-editor-BgCEgg9r.js +1 -0
  97. package/dist/client/assets/{category-tree-CoKnKzyW.js → category-tree-yoWo8LKT.js} +1 -1
  98. package/dist/client/assets/{chart-CxNNAoSv.js → chart-R5Gu29E6.js} +1 -1
  99. package/dist/client/assets/{chat-context-Bo7uj7QO.js → chat-context-DSu9o-d-.js} +1 -1
  100. package/dist/client/assets/{chat-draft-1n081f6C.js → chat-draft-BHCxr31Y.js} +1 -1
  101. package/dist/client/assets/{checkbox-CouJku1L.js → checkbox-D4P_L8j1.js} +1 -1
  102. package/dist/client/assets/choose-editor-DFX28kMs.js +1 -0
  103. package/dist/client/assets/{cli-auth-success-XgEBlx4y.js → cli-auth-success-DGIBfDO7.js} +1 -1
  104. package/dist/client/assets/cms-settings-editor-1icUX_7B.js +1 -0
  105. package/dist/client/assets/{cms-store-drafts-aK3C7NIN.js → cms-store-drafts-pPAksstG.js} +1 -1
  106. package/dist/client/assets/{collapsible-BQXIF7yl.js → collapsible-BJX4Hk9k.js} +1 -1
  107. package/dist/client/assets/collection-detail-Cnr4TuBK.js +1 -0
  108. package/dist/client/assets/{collection-display-button-rcoJHzLM.js → collection-display-button-C2JNt8jM.js} +1 -1
  109. package/dist/client/assets/{collection-search-DHGaqJoX.js → collection-search-DIaYviRG.js} +1 -1
  110. package/dist/client/assets/{collection-table-wrapper-nEvFtZNu.js → collection-table-wrapper-DisSN_Gv.js} +1 -1
  111. package/dist/client/assets/{collection-tabs-DyPYpvut.js → collection-tabs-CxgBigfA.js} +1 -1
  112. package/dist/client/assets/{combobox-5tUoYNvN.js → combobox-BCPDPSll.js} +1 -1
  113. package/dist/client/assets/{command-XtwrY353.js → command-DsEpQe7b.js} +1 -1
  114. package/dist/client/assets/{companion-mcps-section-BIxpu0CV.js → companion-mcps-section-CVk0MHqs.js} +1 -1
  115. package/dist/client/assets/{config-B-dLgcud.js → config-iR6MS3mx.js} +1 -1
  116. package/dist/client/assets/{connect-IzhjVKIX.js → connect-BJ6zbvIe.js} +3 -3
  117. package/dist/client/assets/{connect-key-Djf6OdTt.js → connect-key-R6CnqQKc.js} +1 -1
  118. package/dist/client/assets/{connect-layout-BLFE1r8J.js → connect-layout-CWTX0XxP.js} +1 -1
  119. package/dist/client/assets/{connect-source-dialog-K-oLzdRz.js → connect-source-dialog-DS1_5d5l.js} +1 -1
  120. package/dist/client/assets/{connection-CVYLa59l.js → connection-Daz_MJgN.js} +1 -1
  121. package/dist/client/assets/{connection-card-DrE2nEQK.js → connection-card-BEkW2Rzt.js} +1 -1
  122. package/dist/client/assets/connection-detail-WE10lVgN.js +1 -0
  123. package/dist/client/assets/{connection-form-helpers-ws_4888d.js → connection-form-helpers-BZyz8LC0.js} +1 -1
  124. package/dist/client/assets/{connection-slug-BnP-Wula.js → connection-slug-CvvLfpvw.js} +1 -1
  125. package/dist/client/assets/connections-8XSaqT9l.js +1 -0
  126. package/dist/client/assets/{content-tab-DLB2Uvie.js → content-tab-C66XjEbc.js} +3 -3
  127. package/dist/client/assets/context-DW5quhGR.js +1 -0
  128. package/dist/client/assets/{context-menu-OGQDG2f-.js → context-menu-Dc1eMRQk.js} +1 -1
  129. package/dist/client/assets/{context-shell-B2TiiX4o.js → context-shell-CnWm8Iac.js} +3 -3
  130. package/dist/client/assets/{create-organization-dialog-C58t7dGd.js → create-organization-dialog-BditzGYJ.js} +1 -1
  131. package/dist/client/assets/{daily-pulse-C-8Ge7Gb.js → daily-pulse-CCUis9lD.js} +1 -1
  132. package/dist/client/assets/{delete-copy-DsDE5E3R.js → delete-copy-B8O2OJ6R.js} +1 -1
  133. package/dist/client/assets/{device-hint-Cw9A4RTs.js → device-hint-C-aumrOZ.js} +1 -1
  134. package/dist/client/assets/{discover-Dt0njfXu.js → discover-Dbo6G7J-.js} +1 -1
  135. package/dist/client/assets/{domain-settings-DcqOrcxN.js → domain-settings-D_KZc6yt.js} +1 -1
  136. package/dist/client/assets/{drawer-DDCMGagW.js → drawer-Ckz_nyBH.js} +1 -1
  137. package/dist/client/assets/{editor-CIB3F1gV.js → editor-Dv1qkRGx.js} +1 -1
  138. package/dist/client/assets/{editor-classes-CLvZguOr.js → editor-classes-Bm1swfOR.js} +1 -1
  139. package/dist/client/assets/{empty-message-C5kN-FsM.js → empty-message-Cs32P_FY.js} +1 -1
  140. package/dist/client/assets/{empty-state-BwwrJHKq.js → empty-state-DGaA5_7F.js} +1 -1
  141. package/dist/client/assets/{empty-state-CiMt55-l.js → empty-state-DvK349M1.js} +1 -1
  142. package/dist/client/assets/{experiments-tab-choice-HOP6qrjW.js → experiments-tab-choice-pZXd8Qq7.js} +1 -1
  143. package/dist/client/assets/{extract-connection-data-BB3HY3pL.js → extract-connection-data-DyZVXRSl.js} +1 -1
  144. package/dist/client/assets/{feature-gate-DzJ2Wgrv.js → feature-gate-Q3XqEiLe.js} +1 -1
  145. package/dist/client/assets/{feature-paywall-D3CjJHet.js → feature-paywall-DLrDt0zj.js} +1 -1
  146. package/dist/client/assets/file-explorer-DTnrhmiM.js +2 -0
  147. package/dist/client/assets/{file-preview-DrQhYw7q.js → file-preview-C3aAzbl2.js} +1 -1
  148. package/dist/client/assets/{file-share-button-2PZ7snDO.js → file-share-button-DchUqnxv.js} +1 -1
  149. package/dist/client/assets/{file-type-icon-CfPI0k5H.js → file-type-icon-C1PmpIi5.js} +1 -1
  150. package/dist/client/assets/{folder-icon-Cc4PI_dN.js → folder-icon-GDlGVc-z.js} +1 -1
  151. package/dist/client/assets/{form-DTFwvxGa.js → form-B3cubXs5.js} +1 -1
  152. package/dist/client/assets/{frame-navigation-C2MkzXfc.js → frame-navigation-CZuPAR0A.js} +1 -1
  153. package/dist/client/assets/{gateway-client-BWWNWG13.js → gateway-client-DDICMs0d.js} +1 -1
  154. package/dist/client/assets/{general-B4k9oqH9.js → general-Dm23uhl2.js} +1 -1
  155. package/dist/client/assets/{github-icon-CAEaNNXe.js → github-icon-lV5tv6c5.js} +1 -1
  156. package/dist/client/assets/{held-block-view-BoX35XB_.js → held-block-view-KOyRMpy4.js} +1 -1
  157. package/dist/client/assets/home-Bdn-v4eM.js +1 -0
  158. package/dist/client/assets/{home-overview-4hB9-fzq.js → home-overview-_jWE4zXs.js} +1 -1
  159. package/dist/client/assets/{hosted-reconcile-DD1fLsOV.js → hosted-reconcile-CxvdumkL.js} +1 -1
  160. package/dist/client/assets/{icon-button-C7j9rC9Y.js → icon-button-trmtAOaJ.js} +1 -1
  161. package/dist/client/assets/{index-6wJ9auoQ.js → index-2abaLvjI.js} +1 -1
  162. package/dist/client/assets/{index-D6K919s-.js → index-3YHObF9S.js} +1 -1
  163. package/dist/client/assets/{index-BOuugOzr.js → index-BBeGVRdq.js} +1 -1
  164. package/dist/client/assets/{index-BBzaKaTx.js → index-BBpZPks2.js} +1 -1
  165. package/dist/client/assets/{index-Cg9MjN_F.js → index-C7CSN06D.js} +1 -1
  166. package/dist/client/assets/{index-SNBsd1n5.js → index-D7q4YJXJ.js} +1 -1
  167. package/dist/client/assets/{index-C1rZOaeR.js → index-DAKnsBwp.js} +1 -1
  168. package/dist/client/assets/{index-Bnvwu25R.js → index-DaFEqiTp.js} +1 -1
  169. package/dist/client/assets/{index-C3qV_QcY.js → index-DuvX09S7.js} +1 -1
  170. package/dist/client/assets/{index-x-5-P0v0.js → index-NWJ7p_1D.js} +1 -1
  171. package/dist/client/assets/{index-BesTIQjb.js → index-PcrdQb7V.js} +1 -1
  172. package/dist/client/assets/{index-DdVVtGb-.js → index-QCTvcBUO.js} +1 -1
  173. package/dist/client/assets/{index-DokE5sNF.js → index-_VeebRNE.js} +56 -57
  174. package/dist/client/assets/{index-DFLWf492.js → index-_m0OQ-gU.js} +2 -2
  175. package/dist/client/assets/{index-C3kpYdOE.js → index-j-nHo57s.js} +1 -1
  176. package/dist/client/assets/{index-redirect-B0kETsWy.js → index-redirect-qshgZoiU.js} +1 -1
  177. package/dist/client/assets/{index-BuF029H4.js → index-wdSinBQm.js} +1 -1
  178. package/dist/client/assets/{index-96oa6z-q.js → index-ykH_xCiZ.js} +1 -1
  179. package/dist/client/assets/{infiniteQueryObserver-BXbGEZ4N.js → infiniteQueryObserver-D7rUvD7y.js} +1 -1
  180. package/dist/client/assets/{infra-billing-DV-AbPt9.js → infra-billing-2jNYgPJB.js} +1 -1
  181. package/dist/client/assets/{input-CfItTA2l.js → input-CdG_yBtw.js} +1 -1
  182. package/dist/client/assets/{input-BVDv3LEp.js → input-DAVLPdNO.js} +3 -3
  183. package/dist/client/assets/{integration-icon-CimWL0HB.js → integration-icon-D8pA0JHG.js} +1 -1
  184. package/dist/client/assets/{item-actions-Be-0vSN9.js → item-actions-0UZvaX_W.js} +1 -1
  185. package/dist/client/assets/{jira-icon-zbkTgTO3.js → jira-icon-B6n8YNiL.js} +1 -1
  186. package/dist/client/assets/{label-CELn1y0I.js → label-DZkEI5Ke.js} +1 -1
  187. package/dist/client/assets/{layout-D8GnCK_t.js → layout-B_eV9tIt.js} +1 -1
  188. package/dist/client/assets/{legacy-admin-welcome-dialog-Xn47ClHz.js → legacy-admin-welcome-dialog-ZZ1Gngd8.js} +1 -1
  189. package/dist/client/assets/{legacy-agents-deep-CfDZP79N.js → legacy-agents-deep-DIO9RwdG.js} +1 -1
  190. package/dist/client/assets/{legacy-main-redirect-CXEG-wJ7.js → legacy-main-redirect-MYDZoBC6.js} +1 -1
  191. package/dist/client/assets/library-BGNgyVkv.js +1 -0
  192. package/dist/client/assets/{library-tab-B9UPnHBX.js → library-tab-1VGCJxXK.js} +1 -1
  193. package/dist/client/assets/login-D1CbtJGZ.js +1 -0
  194. package/dist/client/assets/{markdown-CDaD-85D.js → markdown-CBoNEgkf.js} +1 -1
  195. package/dist/client/assets/{mcp-app-renderer-BS-4Ud35.js → mcp-app-renderer-DtOO8I9w.js} +1 -1
  196. package/dist/client/assets/{mcp-oauth-Celefz8j.js → mcp-oauth-BHOMUKtj.js} +1 -1
  197. package/dist/client/assets/{mcp-oauth-Cfk6BMjf.js → mcp-oauth-DGxlh_95.js} +1 -1
  198. package/dist/client/assets/{members-CO93VCFa.js → members-DHWvHq5T.js} +1 -1
  199. package/dist/client/assets/{memory-BsFUXROk.js → memory-C6q4guqS.js} +2 -2
  200. package/dist/client/assets/{mock-board-BhdBHUpK.js → mock-board-ltUmj9_y.js} +3 -3
  201. package/dist/client/assets/{monaco-editor-CnKR4oUp.js → monaco-editor-D-AA2j7y.js} +1 -1
  202. package/dist/client/assets/{monitoring-CQmjoD8Y.js → monitoring-DaONVMuI.js} +2 -2
  203. package/dist/client/assets/{monitoring-stats-row-D45dscQU.js → monitoring-stats-row-DeZi5P6B.js} +1 -1
  204. package/dist/client/assets/{multi-select-D0i-_SFY.js → multi-select-DUQRYjic.js} +1 -1
  205. package/dist/client/assets/{mustache-9EZH88YQ.js → mustache-uZ8plADR.js} +1 -1
  206. package/dist/client/assets/{named-rule-step-yZefk1L5.js → named-rule-step-DreL1Pcr.js} +1 -1
  207. package/dist/client/assets/{named-rule-view-BhK3WMdx.js → named-rule-view-DfnvZmuY.js} +1 -1
  208. package/dist/client/assets/{new-project-dialog-B-GOkKGZ.js → new-project-dialog-B9UZLlxE.js} +1 -1
  209. package/dist/client/assets/{new-project-store-BPGzwGDe.js → new-project-store-BzLAZn_u.js} +1 -1
  210. package/dist/client/assets/{oauth-callback-CPdQzJA-.js → oauth-callback-DeF7HKPm.js} +1 -1
  211. package/dist/client/assets/{oauth-callback-ai-provider-BYHZVJQa.js → oauth-callback-ai-provider-B-Qmx59a.js} +1 -1
  212. package/dist/client/assets/oauth-consent-CwjN9gES.js +1 -0
  213. package/dist/client/assets/{onboarding-BQ661qWy.js → onboarding-vgMy4F5g.js} +1 -1
  214. package/dist/client/assets/openai-conversation-NvZqYcCK.js +3 -0
  215. package/dist/client/assets/{optimistic-project-sidebar-views-D5Qm8FhS.js → optimistic-project-sidebar-views-CBHDKL26.js} +1 -1
  216. package/dist/client/assets/{order-monitor-day-DqX4nMyS.js → order-monitor-day-Txb2sZ3L.js} +1 -1
  217. package/dist/client/assets/{organization-choice-DJgWzk8W.js → organization-choice-CP3Mtgeb.js} +1 -1
  218. package/dist/client/assets/{orgs-CEuotPd0.js → orgs-QZqcYIh_.js} +1 -1
  219. package/dist/client/assets/{own-accounts-section-BUJ0fKWR.js → own-accounts-section-B-xTQ1qC.js} +1 -1
  220. package/dist/client/assets/{pair-COq-ZPQq.js → pair-CHh11R95.js} +1 -1
  221. package/dist/client/assets/{parse-sections-x0Kx4hiT.js → parse-sections-BX1x8Bjk.js} +2 -2
  222. package/dist/client/assets/{plan-ladder-pqZJNBpW.js → plan-ladder-Boo36Lf_.js} +1 -1
  223. package/dist/client/assets/{plan-DKc8rH1K.js → plan-qEpUYs_C.js} +1 -1
  224. package/dist/client/assets/{plan-usage-card-BWKv5Sja.js → plan-usage-card-XvorW2R2.js} +1 -1
  225. package/dist/client/assets/{popover-BNjsYhzT.js → popover-CsisCWO2.js} +1 -1
  226. package/dist/client/assets/post-calendar-halP83kx.js +1 -0
  227. package/dist/client/assets/{post-editor-CCfke5Rf.js → post-editor-S0aVTLKj.js} +2 -2
  228. package/dist/client/assets/{preview-content-DvWQfE3X.js → preview-content-5ttXljO9.js} +1 -1
  229. package/dist/client/assets/{preview-dialog-07cwMrWN.js → preview-dialog-BclA8lM_.js} +1 -1
  230. package/dist/client/assets/{preview-panel-C9bhKF_2.js → preview-panel-DwKqGg2b.js} +1 -1
  231. package/dist/client/assets/preview-tab-DY0X1Y__.js +557 -0
  232. package/dist/client/assets/{product-picker-dialog-ChT9yEE7.js → product-picker-dialog-BYy8uc5-.js} +1 -1
  233. package/dist/client/assets/profile-Bd_H-bJ-.js +1 -0
  234. package/dist/client/assets/project-app-view-C5QreDU8.js +1 -0
  235. package/dist/client/assets/{project-apps-BilxhqpE.js → project-apps-Qpq3Yqgk.js} +1 -1
  236. package/dist/client/assets/{project-icon-DzSzNLot.js → project-icon-CoHnihPF.js} +1 -1
  237. package/dist/client/assets/{project-index-CR5OwtEu.js → project-index-QHWJWseM.js} +1 -1
  238. package/dist/client/assets/project-reports-WCcwA84Y.js +1 -0
  239. package/dist/client/assets/project-tasks-DKIcBGE8.js +1 -0
  240. package/dist/client/assets/projects-BH3mZwKm.js +1 -0
  241. package/dist/client/assets/{projects-empty-state-BfmuFuvO.js → projects-empty-state-DUNpLlKl.js} +1 -1
  242. package/dist/client/assets/{prompts-NPG6oRsv.js → prompts-DYNo1NOe.js} +1 -1
  243. package/dist/client/assets/record-editor-ruw8hHLO.js +1 -0
  244. package/dist/client/assets/redirect-editor-9KKRUJjb.js +1 -0
  245. package/dist/client/assets/reports-C98Nopj0.js +1 -0
  246. package/dist/client/assets/{reports-CYPX_k6p.js → reports-CIVLWAKU.js} +2 -2
  247. package/dist/client/assets/reports-onboarding-BvleSDU0.js +1 -0
  248. package/dist/client/assets/reports-tab-Cpactxak.js +2 -0
  249. package/dist/client/assets/repositories-BUVT6KWE.js +1 -0
  250. package/dist/client/assets/{repositories-uWeQw1G7.js → repositories-D3sB2pcK.js} +1 -1
  251. package/dist/client/assets/{repository-binding-CBLNaLcn.js → repository-binding-Ct6tvS6k.js} +1 -1
  252. package/dist/client/assets/{repository-picker-CXy0gwnT.js → repository-picker-D7wgGSh_.js} +1 -1
  253. package/dist/client/assets/{require-capability-_6vPPsFH.js → require-capability-psnJqvDd.js} +1 -1
  254. package/dist/client/assets/{required-auth-layout-Da-vkWUX.js → required-auth-layout-5KQLVPyY.js} +1 -1
  255. package/dist/client/assets/{reset-password-BMooX7J1.js → reset-password-CMUJSwol.js} +1 -1
  256. package/dist/client/assets/{resizable-CFBuzfqY.js → resizable-TldGXL10.js} +1 -1
  257. package/dist/client/assets/{resolve-tab-icon-DYcddXtb.js → resolve-tab-icon-Dx984IYY.js} +1 -1
  258. package/dist/client/assets/{review-settings-lJuLTN9Z.js → review-settings-EAZgwqP6.js} +1 -1
  259. package/dist/client/assets/{role-color-C2OQmHte.js → role-color-Az77j5-3.js} +1 -1
  260. package/dist/client/assets/roles-KaJOIApg.js +1 -0
  261. package/dist/client/assets/route-CLOMEKRN.js +1 -0
  262. package/dist/client/assets/route-CsFahJR-.js +1 -0
  263. package/dist/client/assets/route-DwgCQsMA.js +1 -0
  264. package/dist/client/assets/{route-page-header-9cHtL5F_.js → route-page-header-B8Mmh-Yn.js} +1 -1
  265. package/dist/client/assets/{sandbox-git-api-C63hYsFx.js → sandbox-git-api-DN6h_KqP.js} +1 -1
  266. package/dist/client/assets/{sandbox-lifecycle-context-BBxxjkfA.js → sandbox-lifecycle-context-Ptllc8xw.js} +1 -1
  267. package/dist/client/assets/{save-status-DSROJg37.js → save-status-DI5XwwX3.js} +1 -1
  268. package/dist/client/assets/{schema-BsNip7cg.js → schema-Bawh3LAf.js} +1 -1
  269. package/dist/client/assets/{schema-DFozZ1Hz.js → schema-Cp9WUmjR.js} +1 -1
  270. package/dist/client/assets/{scroll-area-pLrQCixi.js → scroll-area-EnKfGRfx.js} +1 -1
  271. package/dist/client/assets/{search-input-C2u6aF8T.js → search-input-JNlnu1vU.js} +1 -1
  272. package/dist/client/assets/{search-toggle-CrQFK2VP.js → search-toggle-Gczjy-6q.js} +1 -1
  273. package/dist/client/assets/{secret-picker-Dv9xQHYk.js → secret-picker-DpLLS_i2.js} +1 -1
  274. package/dist/client/assets/{secrets-DB4lMKjl.js → secrets-BkICoFYK.js} +1 -1
  275. package/dist/client/assets/{section-array-field-DeyNfEV2.js → section-array-field-DeIFn5hU.js} +1 -1
  276. package/dist/client/assets/{sections-DOqOQtJh.js → sections-DsIUB3iD.js} +1 -1
  277. package/dist/client/assets/sections-editor-DQjh_kFR.js +1 -0
  278. package/dist/client/assets/{select-CKROachj.js → select-QgdI1Rfc.js} +1 -1
  279. package/dist/client/assets/{select-model-BWtBiL3W.js → select-model-CRyWxfNm.js} +1 -1
  280. package/dist/client/assets/{seo-editor-DIdnRSzC.js → seo-editor-bIUZHc8M.js} +1 -1
  281. package/dist/client/assets/{separator-DfXZNxTX.js → separator-BEzt-XQG.js} +1 -1
  282. package/dist/client/assets/{session-runtime-gzzgn7Pj.js → session-runtime-DLIbUSWD.js} +1 -1
  283. package/dist/client/assets/settings-tab-DdQCVDpj.js +1 -0
  284. package/dist/client/assets/{sheet-DUgkYIwI.js → sheet-8iInbf9D.js} +1 -1
  285. package/dist/client/assets/{shell-layout-4H95PNNw.js → shell-layout-D8UbY9n5.js} +1 -1
  286. package/dist/client/assets/{site-draft-actions-k_cj-bS_.js → site-draft-actions-BVBEL1BN.js} +1 -1
  287. package/dist/client/assets/{site-draft-view-LE30E0qM.js → site-draft-view-CU45gg4m.js} +1 -1
  288. package/dist/client/assets/site-editor-CyPykGup.js +1 -0
  289. package/dist/client/assets/{site-editor-toast-Ynfp7Kjt.js → site-editor-toast-Cjans_Z7.js} +1 -1
  290. package/dist/client/assets/skills-CznUJdJq.js +1 -0
  291. package/dist/client/assets/{slider-Bw577vCx.js → slider-CnikFjRE.js} +1 -1
  292. package/dist/client/assets/{sortable.esm-CykrOV-3.js → sortable.esm-CW9y-Z65.js} +1 -1
  293. package/dist/client/assets/{sso-Cj24TaPV.js → sso-BUdWqS9w.js} +1 -1
  294. package/dist/client/assets/{suggestion-B9R_Jc1V.js → suggestion-gEn2gqrr.js} +1 -1
  295. package/dist/client/assets/{super-agent-icon-DPyVQnGV.js → super-agent-icon-Dx5Acgbw.js} +1 -1
  296. package/dist/client/assets/{switch-B_2aZNJw.js → switch-7uXAaerp.js} +1 -1
  297. package/dist/client/assets/{synced-repos-CXSZMJ0F.js → synced-repos-C29_oiY7.js} +1 -1
  298. package/dist/client/assets/{tab-icon-glyph-B4eeZpT6.js → tab-icon-glyph-CgM03OpD.js} +1 -1
  299. package/dist/client/assets/{table-DsirtjTQ.js → table-drGady29.js} +1 -1
  300. package/dist/client/assets/{tabs-YBRFhTvN.js → tabs-C9s0KY6N.js} +1 -1
  301. package/dist/client/assets/{task-board-DK1K-Mbd.js → task-board-CHctJwrW.js} +1 -1
  302. package/dist/client/assets/{task-key-DZxJr9g6.js → task-key-B6H-3XJr.js} +1 -1
  303. package/dist/client/assets/{task-route-Cqr8SKPq.js → task-route-CBxVmSL7.js} +1 -1
  304. package/dist/client/assets/{task-status-bozQW5wT.js → task-status-CRPxL8gs.js} +1 -1
  305. package/dist/client/assets/{taskboard-analytics-CBkUVAdj.js → taskboard-analytics-DMGsXigW.js} +1 -1
  306. package/dist/client/assets/tasks-Cey8OfRa.js +1 -0
  307. package/dist/client/assets/{tasks-ALHYjofA.js → tasks-Dmvi9b_Y.js} +1 -1
  308. package/dist/client/assets/{textarea-BJdJh9he.js → textarea-Cimn1xhl.js} +1 -1
  309. package/dist/client/assets/thread-analytics-BhURcKi_.js +1 -0
  310. package/dist/client/assets/{thread-button-DZPQxeV0.js → thread-button-DCHp9tO9.js} +1 -1
  311. package/dist/client/assets/{thread-intent-GDKuN4r8.js → thread-intent-pC76uPwU.js} +1 -1
  312. package/dist/client/assets/thread-route-BrFKkVcF.js +1 -0
  313. package/dist/client/assets/{thread-route-9-m2-1gn.js → thread-route-D_C8d7xK.js} +1 -1
  314. package/dist/client/assets/{thread-sheet-body-j2UKM_n_.js → thread-sheet-body-DAosbhoz.js} +1 -1
  315. package/dist/client/assets/{time-range-picker-BUjru-02.js → time-range-picker-9BtbKkzB.js} +1 -1
  316. package/dist/client/assets/{toggle-group-C134tdMJ.js → toggle-group-n8suP90I.js} +1 -1
  317. package/dist/client/assets/{tool-set-selector-CxmO1N2o.js → tool-set-selector-DP0UayXg.js} +1 -1
  318. package/dist/client/assets/{toolbar-icon-button-dQBEwFVn.js → toolbar-icon-button-BAHC2wln.js} +1 -1
  319. package/dist/client/assets/{tooltip-CqEoC-F2.js → tooltip-BYnWhoO-.js} +1 -1
  320. package/dist/client/assets/{tooltipContext-BdzlPUCu.js → tooltipContext-DqZT6jLi.js} +1 -1
  321. package/dist/client/assets/{track-Drgb4ZQ6.js → track-BXFPt0jP.js} +1 -1
  322. package/dist/client/assets/{types-DF2iMJoX.js → types-CdP485rd.js} +1 -1
  323. package/dist/client/assets/{url-slug-pPnhQQlO.js → url-slug-BkKOqwJh.js} +1 -1
  324. package/dist/client/assets/{usage-stats-BHc1sfxR.js → usage-stats-CCyq9Zgo.js} +1 -1
  325. package/dist/client/assets/{use-ai-providers-Khsm6etv.js → use-ai-providers-D6peTC8u.js} +1 -1
  326. package/dist/client/assets/{use-api-keys-CktIN6Ip.js → use-api-keys-DUVyFEfc.js} +1 -1
  327. package/dist/client/assets/{use-apply-named-rule-BH_mAqzD.js → use-apply-named-rule-D9dIZN02.js} +1 -1
  328. package/dist/client/assets/use-ask-in-chat-DINxvsUX.js +1 -0
  329. package/dist/client/assets/{use-automations-it-dxpVL.js → use-automations-qL4OMGNt.js} +1 -1
  330. package/dist/client/assets/{use-autosave-DFZMnBbI.js → use-autosave-DGPPxEGb.js} +1 -1
  331. package/dist/client/assets/use-blocks-v8-project-JOmELUJ6.js +1 -0
  332. package/dist/client/assets/use-blog-view-DQBrFMuV.js +1 -0
  333. package/dist/client/assets/{use-chat-layout-state-CyAMAqyg.js → use-chat-layout-state-DMWJLUZv.js} +1 -1
  334. package/dist/client/assets/{use-cms-publish-actions-DGbVdkLh.js → use-cms-publish-actions-DuI-swrZ.js} +1 -1
  335. package/dist/client/assets/{use-connect-companion-C-Jq7bdY.js → use-connect-companion-C9LfjXNg.js} +1 -1
  336. package/dist/client/assets/{use-connection-BJP9eCiw.js → use-connection-cSaq7_i7.js} +1 -1
  337. package/dist/client/assets/{use-content-sync-hirvqHbx.js → use-content-sync-DElceZSb.js} +1 -1
  338. package/dist/client/assets/{use-copy-Bh0jH9rH.js → use-copy-DKfw8n-3.js} +1 -1
  339. package/dist/client/assets/{use-current-view-xnQlJLn5.js → use-current-view-a6HKOM5X.js} +1 -1
  340. package/dist/client/assets/{use-date-fns-locale-D_OgIl71.js → use-date-fns-locale-B_xn4WWe.js} +1 -1
  341. package/dist/client/assets/{use-debounced-autosave-BCqW4nkA.js → use-debounced-autosave-Dtb8gA2L.js} +1 -1
  342. package/dist/client/assets/{use-debounced-value-q_QhUSeI.js → use-debounced-value-BAma3ogA.js} +1 -1
  343. package/dist/client/assets/{use-deco-credits-DrzaNgs_.js → use-deco-credits-BeQtkXPR.js} +1 -1
  344. package/dist/client/assets/{use-decopilot-events-TX8jybTQ.js → use-decopilot-events-B0JW1Gtz.js} +1 -1
  345. package/dist/client/assets/{use-delete-block-BINjsTY1.js → use-delete-block-CUXsAbin.js} +1 -1
  346. package/dist/client/assets/{use-delete-connection-Ch7Fpvpo.js → use-delete-connection-DNw4luEn.js} +1 -1
  347. package/dist/client/assets/{use-deployment-admin-h6uBbZPp.js → use-deployment-admin-BENsmKZ2.js} +1 -1
  348. package/dist/client/assets/{use-entitlements-B_976V5P.js → use-entitlements-B6kax2f9.js} +1 -1
  349. package/dist/client/assets/{use-fast-preview-draft-url-CQuFD5Lq.js → use-fast-preview-draft-url-fo8VZAME.js} +1 -1
  350. package/dist/client/assets/{use-file-configs-iPUyCrpd.js → use-file-configs-aENtp_va.js} +1 -1
  351. package/dist/client/assets/{use-id-selection-DnYJXQwW.js → use-id-selection-DZH3hNJe.js} +1 -1
  352. package/dist/client/assets/{use-in-settings-DvVa8LTW.js → use-in-settings-jNNDWh86.js} +1 -1
  353. package/dist/client/assets/{use-inbox-feed-C2oj6HbE.js → use-inbox-feed-Axr6Wlqz.js} +1 -1
  354. package/dist/client/assets/{use-infinite-scroll-BcBSkfyb.js → use-infinite-scroll-DjPaD0kN.js} +1 -1
  355. package/dist/client/assets/{use-join-requests-D2xu_Ec9.js → use-join-requests-WKQMf9yH.js} +1 -1
  356. package/dist/client/assets/{use-main-panel-tabs-PrqkAqrJ.js → use-main-panel-tabs-DFx6VsI6.js} +1 -1
  357. package/dist/client/assets/{use-mcp-auth-status-CVLoS2DG.js → use-mcp-auth-status-CCXu_Vmb.js} +1 -1
  358. package/dist/client/assets/{use-mcp-client-DVaNUeKZ.js → use-mcp-client-UP8_tZ9p.js} +1 -1
  359. package/dist/client/assets/{use-mcp-prompts-mR07NyXv.js → use-mcp-prompts-BM9uSers.js} +1 -1
  360. package/dist/client/assets/{use-mcp-tools-DAzNJiwR.js → use-mcp-tools-mA41mojn.js} +1 -1
  361. package/dist/client/assets/{use-mobile-YQVdSq9V.js → use-mobile-FS1bh43h.js} +1 -1
  362. package/dist/client/assets/{use-move-blocks-B5nRM-da.js → use-move-blocks-DAGy4lk4.js} +1 -1
  363. package/dist/client/assets/{use-navigate-to-agent-O2aekGtL.js → use-navigate-to-agent-Dg2qYHJi.js} +1 -1
  364. package/dist/client/assets/{use-never-published-WdNVjWmr.js → use-never-published-DDbQ0Vt8.js} +1 -1
  365. package/dist/client/assets/{use-org-fs-DcqFgCaV.js → use-org-fs-DbTl86_J.js} +1 -1
  366. package/dist/client/assets/{use-org-notice-D_lzrT1v.js → use-org-notice-D5zuQ4m5.js} +1 -1
  367. package/dist/client/assets/{use-org-repo-syncs-CXR8xOyz.js → use-org-repo-syncs-C8jG5KSy.js} +1 -1
  368. package/dist/client/assets/{use-org-sso-Fbk8Wwq4.js → use-org-sso-QMFtipA-.js} +1 -1
  369. package/dist/client/assets/{use-organization-settings-DYnwG033.js → use-organization-settings-ByKdFGhE.js} +1 -1
  370. package/dist/client/assets/{use-panel-navigate-DYNTPDzL.js → use-panel-navigate-D4GuHOu1.js} +1 -1
  371. package/dist/client/assets/{use-project-native-view-presence-BWo3tL86.js → use-project-native-view-presence-BEytngua.js} +1 -1
  372. package/dist/client/assets/{use-project-scope-Zk4IP7B6.js → use-project-scope-CpfOkL8I.js} +1 -1
  373. package/dist/client/assets/{use-recent-apps-CGvNAmsp.js → use-recent-apps-Dt_ZPA-N.js} +1 -1
  374. package/dist/client/assets/{use-reports-diagnostic-DYiqS51Q.js → use-reports-diagnostic-MEHXC7RY.js} +1 -1
  375. package/dist/client/assets/{use-sandbox-events--EgmreWQ.js → use-sandbox-events-CPKES4Ee.js} +1 -1
  376. package/dist/client/assets/{use-secrets-BcD5BTqH.js → use-secrets-BGup3PHO.js} +1 -1
  377. package/dist/client/assets/{use-section-preview-base-QYSyjVux.js → use-section-preview-base-CErD4C9a.js} +1 -1
  378. package/dist/client/assets/{use-sidebar-collapsed-DIdfXbOr.js → use-sidebar-collapsed-9Vi_PrVo.js} +1 -1
  379. package/dist/client/assets/{use-tags-a6kkz9Aj.js → use-tags-CL2wnmn0.js} +1 -1
  380. package/dist/client/assets/{use-task-board-analytics-CXDDOLeW.js → use-task-board-analytics-CGiNWJEU.js} +1 -1
  381. package/dist/client/assets/{use-task-board-item-prs-CmeNcFe2.js → use-task-board-item-prs-Mcp2690_.js} +1 -1
  382. package/dist/client/assets/{use-task-board-items-TENQt5cS.js → use-task-board-items-DxcJSuMX.js} +1 -1
  383. package/dist/client/assets/{use-task-board-prompts-Dq_lA2pC.js → use-task-board-prompts-CeUQeuL1.js} +1 -1
  384. package/dist/client/assets/{use-task-metadata-C75UjZAF.js → use-task-metadata-CG-mCqhD.js} +1 -1
  385. package/dist/client/assets/{use-thread-outputs-he6CbGJb.js → use-thread-outputs-BRvk_pZG.js} +1 -1
  386. package/dist/client/assets/{use-view-draft-kind-DfBSo4Ua.js → use-view-draft-kind-BLkqtU-Q.js} +1 -1
  387. package/dist/client/assets/{use-voice-input-B9tq3K2A.js → use-voice-input-Dv1QYOod.js} +1 -1
  388. package/dist/client/assets/useInfiniteQuery-CuAeAzcr.js +1 -0
  389. package/dist/client/assets/{useQueries-UpDYaK89.js → useQueries-X3Wj3mkG.js} +1 -1
  390. package/dist/client/assets/useSuspenseInfiniteQuery-QLEux5C_.js +1 -0
  391. package/dist/client/assets/{users-D5ojYrnY.js → users-SsaEf6Es.js} +1 -1
  392. package/dist/client/assets/{utils-Bsr3pAeq.js → utils-Dovv0grx.js} +1 -1
  393. package/dist/client/assets/variant-calendar-CtOZf_f5.js +1 -0
  394. package/dist/client/assets/{variant-matcher-override-CylJ7vNA.js → variant-matcher-override-CdFxQaGp.js} +1 -1
  395. package/dist/client/assets/{view-header-BwRsIWg-.js → view-header-ByNTN-so.js} +1 -1
  396. package/dist/client/assets/{virtual-mcp-BULA9FxB.js → virtual-mcp-BjSK3sGG.js} +1 -1
  397. package/dist/client/assets/{watch-sse-pool-BlWzBx5R.js → watch-sse-pool-_tvuBMId.js} +1 -1
  398. package/dist/client/index.html +1 -1
  399. package/dist/server/migrate.js +389 -694
  400. package/dist/server/server.js +905 -1210
  401. package/package.json +1 -2
  402. package/dist/client/assets/Fingerprint04-BmN62_tt.js +0 -1
  403. package/dist/client/assets/agent-app-Ddt_i3hs.js +0 -1
  404. package/dist/client/assets/agent-assets-4Dn6_LPJ.js +0 -1
  405. package/dist/client/assets/agent-automations-DTCsvg04.js +0 -1
  406. package/dist/client/assets/agent-blog-YN3-KN-3.js +0 -2
  407. package/dist/client/assets/agent-blog-post-CM6piUKk.js +0 -2
  408. package/dist/client/assets/agent-calendar-BJOF6wGS.js +0 -1
  409. package/dist/client/assets/agent-connect-sources-DyiJgP9L.js +0 -1
  410. package/dist/client/assets/agent-deck-BJbp-kJP.js +0 -1
  411. package/dist/client/assets/agent-e2e-BPbuZrSW.js +0 -1
  412. package/dist/client/assets/agent-experiments-CdtDrGBl.js +0 -1
  413. package/dist/client/assets/agent-file-TtINmaDO.js +0 -1
  414. package/dist/client/assets/agent-hosting-C1oXMGvH.js +0 -1
  415. package/dist/client/assets/agent-icon-DA-Fg7pF.js +0 -1
  416. package/dist/client/assets/agent-library-DiFYtmp3.js +0 -1
  417. package/dist/client/assets/agent-library-file-B8tZpffC.js +0 -1
  418. package/dist/client/assets/agent-overview-BItm6Vlt.js +0 -1
  419. package/dist/client/assets/agent-settings-BMZl-puv.js +0 -1
  420. package/dist/client/assets/agent-site-editor-code-GUBPAYOc.js +0 -2
  421. package/dist/client/assets/agent-site-editor-content-C0ANuka1.js +0 -1
  422. package/dist/client/assets/agent-site-editor-preview-BSvKajfu.js +0 -1
  423. package/dist/client/assets/agent-view-CuMB-zdu.js +0 -1
  424. package/dist/client/assets/api-keys-CZghJUH5.js +0 -1
  425. package/dist/client/assets/app-editor-D0csBY-b.js +0 -1
  426. package/dist/client/assets/auth-entry-CmrAwa9A.js +0 -1
  427. package/dist/client/assets/automations-DWMaGnJ_.js +0 -1
  428. package/dist/client/assets/category-editor-CvyZlhDa.js +0 -1
  429. package/dist/client/assets/choose-editor-BudS68fU.js +0 -1
  430. package/dist/client/assets/cms-settings-editor-BihAt8mo.js +0 -1
  431. package/dist/client/assets/collection-detail-kNjKSTlB.js +0 -1
  432. package/dist/client/assets/connection-detail-BzNp4KYO.js +0 -1
  433. package/dist/client/assets/connections-DYD0GVv1.js +0 -1
  434. package/dist/client/assets/context-E7CmO04l.js +0 -1
  435. package/dist/client/assets/file-explorer-BUDGmFj3.js +0 -2
  436. package/dist/client/assets/home-CS3KzMJa.js +0 -1
  437. package/dist/client/assets/library-OZMSR-Ss.js +0 -1
  438. package/dist/client/assets/login-lSvN3N4Q.js +0 -1
  439. package/dist/client/assets/oauth-consent-R7d-lFg9.js +0 -1
  440. package/dist/client/assets/openai-conversation-N65nOtwY.js +0 -3
  441. package/dist/client/assets/post-calendar-D2IwNEqN.js +0 -1
  442. package/dist/client/assets/preview-tab-COGaRa7u.js +0 -557
  443. package/dist/client/assets/profile-CAs6IhMO.js +0 -1
  444. package/dist/client/assets/project-app-view-DviUlYP5.js +0 -1
  445. package/dist/client/assets/project-reports-BbMJz4mc.js +0 -1
  446. package/dist/client/assets/project-tasks-BrJzU4LM.js +0 -1
  447. package/dist/client/assets/projects-CEBGkLTr.js +0 -1
  448. package/dist/client/assets/record-editor-BwlyH5jZ.js +0 -1
  449. package/dist/client/assets/redirect-editor-DtY_MKxf.js +0 -1
  450. package/dist/client/assets/reports-DAi0HbOS.js +0 -1
  451. package/dist/client/assets/reports-onboarding-DKaCbtdm.js +0 -1
  452. package/dist/client/assets/reports-tab-_GtIHZiT.js +0 -2
  453. package/dist/client/assets/repositories-DsojF3_X.js +0 -1
  454. package/dist/client/assets/roles-KUKC8vim.js +0 -1
  455. package/dist/client/assets/route-BLThcLzr.js +0 -1
  456. package/dist/client/assets/route-C9UFcNus.js +0 -1
  457. package/dist/client/assets/route-CC0eCWn4.js +0 -1
  458. package/dist/client/assets/sections-editor-Cw3wqkPx.js +0 -1
  459. package/dist/client/assets/settings-tab-BHrFLzvD.js +0 -1
  460. package/dist/client/assets/site-editor-e8Hx_Aj4.js +0 -1
  461. package/dist/client/assets/skills-CDREZcnF.js +0 -1
  462. package/dist/client/assets/tasks-DtEwdEBz.js +0 -1
  463. package/dist/client/assets/thread-analytics-D1D-pLk-.js +0 -1
  464. package/dist/client/assets/thread-route-pIQL1n8l.js +0 -1
  465. package/dist/client/assets/use-ask-in-chat-SQXk6mVC.js +0 -1
  466. package/dist/client/assets/use-blocks-v8-project-GUlVOp3p.js +0 -1
  467. package/dist/client/assets/use-blog-view-Bm6F2c8c.js +0 -1
  468. package/dist/client/assets/useInfiniteQuery-BVFlK8XX.js +0 -1
  469. package/dist/client/assets/useSuspenseInfiniteQuery-CGXfA9jP.js +0 -1
  470. package/dist/client/assets/variant-calendar-CiQ54mcG.js +0 -1
@@ -1 +1 @@
1
- import{c as $,b as B,j as s,I as ce,ao as Te,X as De,B as Q,Z as Ae,_ as ke,am as G,i as le,K as O,b6 as Ue,Y as H,a9 as be,J as Ee,e0 as Oe,m as Re,a6 as oe,a as ye,q as re,e as z,t as R,r as M,aw as ve,x as qe,w as Fe,h as $e,v as Be,D as Le,aG as ze,aF as Me,y as Qe,aH as He,aI as fe,aK as Ge,aJ as Ve,aL as We,aM as Ye,b9 as Je,aN as Xe,aO as Ze,aP as et,l as tt,gh as st,gV as it}from"./index-DokE5sNF.js";import{s as nt}from"./Plus-B-S-SZ1j.js";import{f as lt,g as ot,e as rt}from"./use-ai-providers-Khsm6etv.js";import{P as pe}from"./ai-providers-logos-DD3qZ33J.js";import{B as me}from"./badge-CXWhQd3j.js";import{c as je,T as Se,a as Ce}from"./tooltip-CqEoC-F2.js";import{S as at}from"./switch-B_2aZNJw.js";import{G as ct}from"./github-icon-CAEaNNXe.js";import{i as dt,b as ut}from"./Tool01-DSm8VUO0.js";import{s as ft}from"./Trash01-DmArjRF_.js";import{u as mt,f as pt}from"./use-date-fns-locale-D_OgIl71.js";import{g as Pe}from"./openai-compatible-presets-BKGfVqEx.js";import{s as gt}from"./Eye-C1-H4NKN.js";function de(t){const e=$.c(32),{icon:i,title:o,status:l,meta:r,summary:m,action:f,children:c}=t,p=B();let g;e[0]!==i?(g=s.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted/60",children:i}),e[0]=i,e[1]=g):g=e[1];let n;e[2]!==o?(n=s.jsx("span",{className:"truncate text-sm font-medium",children:o}),e[2]=o,e[3]=n):n=e[3];let a;e[4]!==l||e[5]!==p?(a=l==="linked"&&s.jsx(me,{variant:"success",size:"sm",children:p("settings.ownAccounts.linked")}),e[4]=l,e[5]=p,e[6]=a):a=e[6];let d;e[7]!==l||e[8]!==p?(d=l==="expired"&&s.jsx(me,{variant:"warning",size:"sm",children:p("settings.ownAccounts.expired")}),e[7]=l,e[8]=p,e[9]=d):d=e[9];let u;e[10]!==n||e[11]!==a||e[12]!==d?(u=s.jsxs("div",{className:"flex items-center gap-2",children:[n,a,d]}),e[10]=n,e[11]=a,e[12]=d,e[13]=u):u=e[13];let h;e[14]!==r?(h=r&&s.jsx("span",{className:"truncate text-meta",children:r}),e[14]=r,e[15]=h):h=e[15];let x;e[16]!==u||e[17]!==h?(x=s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[u,h]}),e[16]=u,e[17]=h,e[18]=x):x=e[18];let y;e[19]!==m?(y=m&&s.jsx("div",{className:"order-last basis-full pl-11 sm:order-none sm:basis-auto sm:pl-0",children:m}),e[19]=m,e[20]=y):y=e[20];let C;e[21]!==f?(C=s.jsx("div",{className:"flex shrink-0 items-center gap-1",children:f}),e[21]=f,e[22]=C):C=e[22];let b;e[23]!==g||e[24]!==x||e[25]!==y||e[26]!==C?(b=s.jsxs("div",{className:"flex min-h-16 flex-wrap items-center gap-x-3 gap-y-2 px-4 py-3",children:[g,x,y,C]}),e[23]=g,e[24]=x,e[25]=y,e[26]=C,e[27]=b):b=e[27];let j;return e[28]!==c||e[29]!==b||e[30]!==o?(j=s.jsxs("div",{role:"group","aria-label":o,children:[b,c]}),e[28]=c,e[29]=b,e[30]=o,e[31]=j):j=e[31],j}function ge(t){const e=$.c(7),{src:i,alt:o}=t;if(!i){let r;e[0]!==o?(r=o.charAt(0),e[0]=o,e[1]=r):r=e[1];let m;return e[2]!==r?(m=s.jsx("span",{className:"text-sm font-medium",children:r}),e[2]=r,e[3]=m):m=e[3],m}let l;return e[4]!==o||e[5]!==i?(l=s.jsx("img",{src:i,alt:o,className:"size-5 object-contain"}),e[4]=o,e[5]=i,e[6]=l):l=e[6],l}function ue(t){const e=$.c(10),{children:i}=t,o=B();let l;e[0]!==o?(l=o("settings.ownAccounts.more"),e[0]=o,e[1]=l):l=e[1];let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Te,{size:16}),e[2]=r):r=e[2];let m;e[3]!==l?(m=s.jsx(De,{asChild:!0,children:s.jsx(Q,{variant:"ghost",size:"icon-sm","aria-label":l,className:"text-muted-foreground hover:text-foreground",children:r})}),e[3]=l,e[4]=m):m=e[4];let f;e[5]!==i?(f=s.jsx(Ae,{align:"end",children:i}),e[5]=i,e[6]=f):f=e[6];let c;return e[7]!==m||e[8]!==f?(c=s.jsxs(ke,{children:[m,f]}),e[7]=m,e[8]=f,e[9]=c):c=e[9],c}function he(t){const e=$.c(23),{hint:i,submitLabel:o,pending:l,value:r,onChange:m,onSubmit:f,inputProps:c}=t;let p;e[0]!==f?(p=y=>{y.preventDefault(),f()},e[0]=f,e[1]=p):p=e[1];let g;e[2]!==i?(g=s.jsx("p",{className:"text-meta",children:i}),e[2]=i,e[3]=g):g=e[3];let n;e[4]!==m?(n=y=>m(y.target.value),e[4]=m,e[5]=n):n=e[5];let a;e[6]!==c||e[7]!==n||e[8]!==r?(a=s.jsx(ce,{type:"password",autoFocus:!0,...c,value:r,onChange:n}),e[6]=c,e[7]=n,e[8]=r,e[9]=a):a=e[9];let d;e[10]!==l||e[11]!==r?(d=r.trim().length===0||l,e[10]=l,e[11]=r,e[12]=d):d=e[12];let u;e[13]!==o||e[14]!==d?(u=s.jsx(Q,{type:"submit",disabled:d,children:o}),e[13]=o,e[14]=d,e[15]=u):u=e[15];let h;e[16]!==a||e[17]!==u?(h=s.jsxs("div",{className:"flex items-center gap-2",children:[a,u]}),e[16]=a,e[17]=u,e[18]=h):h=e[18];let x;return e[19]!==p||e[20]!==g||e[21]!==h?(x=s.jsxs("form",{className:"flex flex-col gap-2 px-4 pb-4 pl-15",onSubmit:p,children:[g,h]}),e[19]=p,e[20]=g,e[21]=h,e[22]=x):x=e[22],x}const _e={codex:"https://chatgpt.com/codex/settings/usage",claude:"https://claude.ai/settings/usage"};function xe(t,e){return t.id==="seven_day_sonnet"?"Sonnet":t.id==="seven_day_opus"?"Opus":t.id.startsWith("code_review_")?e("settings.subscriptionUsage.codeReview"):t.windowSeconds&&t.windowSeconds%86400===0?`${t.windowSeconds/86400}d`:t.windowSeconds?`${Math.round(t.windowSeconds/3600*10)/10}h`:t.id==="secondary"?e("settings.subscriptionUsage.secondary"):e("settings.subscriptionUsage.primary")}function ht(t){return t>=100?"bg-destructive":t>=90?"bg-warning":"bg-foreground/70"}function Ke(t){const e=$.c(12),{provider:i,orgId:o,userId:l,linkedAt:r,enabled:m}=t,f=G();let c;e[0]!==r||e[1]!==o||e[2]!==i||e[3]!==l?(c=O.subscriptionUsageSnapshot(o,l,i,r),e[0]=r,e[1]=o,e[2]=i,e[3]=l,e[4]=c):c=e[4];let p;e[5]!==i||e[6]!==f?(p=()=>f.call("SUBSCRIPTION_USAGE_GET",{provider:i}),e[5]=i,e[6]=f,e[7]=p):p=e[7];const g=m&&!!l;let n;return e[8]!==c||e[9]!==p||e[10]!==g?(n={queryKey:c,queryFn:p,enabled:g,staleTime:6e4,retry:!1,refetchOnWindowFocus:!1},e[8]=c,e[9]=p,e[10]=g,e[11]=n):n=e[11],le(n)}function Ne(t){const e=$.c(22),{provider:i,query:o}=t,l=B(),[r]=Ee(),m=o.data;if(o.isPending){let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Oe,{className:"h-4 w-32"}),e[0]=n):n=e[0],n}if(o.isError||m?.status!=="available"){const n=_e[i];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(be,{}),e[1]=a):a=e[1];let d;e[2]!==l?(d=l("settings.subscriptionUsage.viewUsage"),e[2]=l,e[3]=d):d=e[3];let u;return e[4]!==n||e[5]!==d?(u=s.jsx(Q,{variant:"outline",size:"sm",asChild:!0,children:s.jsxs("a",{href:n,target:"_blank",rel:"noopener noreferrer",children:[a,d]})}),e[4]=n,e[5]=d,e[6]=u):u=e[6],u}if(m.limitReached){let n;e[7]!==l?(n=l("settings.subscriptionUsage.limitReached"),e[7]=l,e[8]=n):n=e[8];let a;return e[9]!==n?(a=s.jsx(me,{variant:"destructive",size:"sm",children:n}),e[9]=n,e[10]=a):a=e[10],a}let f;e[11]!==r?(f=n=>new Intl.DateTimeFormat(r.language,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(new Date(n)),e[11]=r,e[12]=f):f=e[12];const c=f;let p;if(e[13]!==c||e[14]!==l||e[15]!==m.windows){let n;e[17]!==c||e[18]!==l?(n=a=>{const d=Math.round(a.usedPercent);return s.jsxs(je,{children:[s.jsx(Se,{asChild:!0,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-meta",children:xe(a,l)}),s.jsx("div",{role:"progressbar","aria-label":xe(a,l),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":d,className:"h-1.5 w-14 overflow-hidden rounded-full bg-muted",children:s.jsx("div",{style:{width:`${Math.min(100,d)}%`},className:Re("h-full rounded-full",ht(d))})}),s.jsxs("span",{className:"w-8 text-right text-meta text-foreground",children:[d,"%"]})]})}),a.resetAt&&s.jsx(Ce,{children:l("settings.subscriptionUsage.resets",{date:c(a.resetAt)})})]},a.id)},e[17]=c,e[18]=l,e[19]=n):n=e[19],p=m.windows.slice(0,2).map(n),e[13]=c,e[14]=l,e[15]=m.windows,e[16]=p}else p=e[16];let g;return e[20]!==p?(g=s.jsx("div",{className:"flex shrink-0 items-center gap-4",children:p}),e[20]=p,e[21]=g):g=e[21],g}function Ie(t){const e=$.c(18),{provider:i,query:o}=t,l=B(),r=o.isFetching;let m;e[0]!==o?(m=()=>{o.refetch()},e[0]=o,e[1]=m):m=e[1];let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Ue,{}),e[2]=f):f=e[2];let c;e[3]!==l?(c=l("settings.subscriptionUsage.refresh"),e[3]=l,e[4]=c):c=e[4];let p;e[5]!==o.isFetching||e[6]!==m||e[7]!==c?(p=s.jsxs(H,{disabled:r,onSelect:m,children:[f,c]}),e[5]=o.isFetching,e[6]=m,e[7]=c,e[8]=p):p=e[8];const g=_e[i];let n;e[9]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(be,{}),e[9]=n):n=e[9];let a;e[10]!==l?(a=l("settings.subscriptionUsage.openProvider"),e[10]=l,e[11]=a):a=e[11];let d;e[12]!==g||e[13]!==a?(d=s.jsx(H,{asChild:!0,children:s.jsxs("a",{href:g,target:"_blank",rel:"noopener noreferrer",children:[n,a]})}),e[12]=g,e[13]=a,e[14]=d):d=e[14];let u;return e[15]!==p||e[16]!==d?(u=s.jsxs(s.Fragment,{children:[p,d]}),e[15]=p,e[16]=d,e[17]=u):u=e[17],u}function xt(){const t=$.c(38),e=B(),{org:i}=oe(),{data:o}=ye.useSession(),l=o?.user.id??"",r=G(),m=re();let f;t[0]!==i.id||t[1]!==l?(f=O.claudeSubscription(i.id,l),t[0]=i.id,t[1]=l,t[2]=f):f=t[2];let c;t[3]!==r?(c=()=>r.call("CLAUDE_SUBSCRIPTION_STATUS",{}),t[3]=r,t[4]=c):c=t[4];const p=!!l;let g;t[5]!==f||t[6]!==c||t[7]!==p?(g={queryKey:f,queryFn:c,enabled:p},t[5]=f,t[6]=c,t[7]=p,t[8]=g):g=t[8];const n=le(g);let a;t[9]!==i.id||t[10]!==m||t[11]!==l?(a=async()=>{await m.cancelQueries({queryKey:O.subscriptionUsage(i.id,l,"claude")}),m.removeQueries({queryKey:O.subscriptionUsage(i.id,l,"claude")}),await m.invalidateQueries({queryKey:O.claudeSubscription(i.id,l)})},t[9]=i.id,t[10]=m,t[11]=l,t[12]=a):a=t[12];const d=a;let u;t[13]!==r?(u=K=>r.call("CLAUDE_SUBSCRIPTION_CONNECT",{token:K}),t[13]=r,t[14]=u):u=t[14];let h;t[15]!==d||t[16]!==e?(h=async()=>{await d(),R.success(e("settings.claudeSubscription.connected"))},t[15]=d,t[16]=e,t[17]=h):h=t[17];let x;t[18]!==u||t[19]!==h?(x={mutationFn:u,onSuccess:h,onError:yt},t[18]=u,t[19]=h,t[20]=x):x=t[20];const y=z(x);let C;t[21]!==r?(C=()=>r.call("CLAUDE_SUBSCRIPTION_DISCONNECT",{}),t[21]=r,t[22]=C):C=t[22];let b;t[23]!==d||t[24]!==e?(b=async()=>{await d(),R.success(e("settings.claudeSubscription.disconnected"))},t[23]=d,t[24]=e,t[25]=b):b=t[25];let j;t[26]!==C||t[27]!==b?(j={mutationFn:C,onSuccess:b,onError:bt},t[26]=C,t[27]=b,t[28]=j):j=t[28];const v=z(j),S=n.data?.connected===!0,P=!S&&!!n.data?.linkedAt,N=n.data?.linkedAt??null;let _;return t[29]!==y||t[30]!==S||t[31]!==v||t[32]!==P||t[33]!==i.id||t[34]!==n||t[35]!==N||t[36]!==l?(_={orgId:i.id,userId:l,status:n,connected:S,expired:P,linkedAt:N,connect:y,disconnect:v},t[29]=y,t[30]=S,t[31]=v,t[32]=P,t[33]=i.id,t[34]=n,t[35]=N,t[36]=l,t[37]=_):_=t[37],_}function bt(t){return R.error(t.message)}function yt(t){return R.error(t.message)}function vt(){const t=$.c(33),e=B(),[i,o]=M.useState(""),[l,r]=M.useState(!1),{orgId:m,userId:f,connected:c,expired:p,linkedAt:g,connect:n,disconnect:a}=xt();let d;t[0]!==c||t[1]!==g||t[2]!==m||t[3]!==f?(d={provider:"claude",orgId:m,userId:f,linkedAt:g,enabled:c},t[0]=c,t[1]=g,t[2]=m,t[3]=f,t[4]=d):d=t[4];const u=Ke(d);let h;t[5]!==e?(h=e("settings.claudeSubscription.title"),t[5]=e,t[6]=h):h=t[6];let x;t[7]!==h?(x=s.jsx(ge,{src:pe["claude-code"],alt:h}),t[7]=h,t[8]=x):x=t[8];let y;t[9]!==e?(y=e("settings.claudeSubscription.title"),t[9]=e,t[10]=y):y=t[10];const C=c?"linked":p?"expired":null;let b;t[11]!==c||t[12]!==u?(b=c?s.jsx(Ne,{provider:"claude",query:u}):null,t[11]=c,t[12]=u,t[13]=b):b=t[13];let j;t[14]!==c||t[15]!==a||t[16]!==l||t[17]!==e||t[18]!==u?(j=c?s.jsxs(ue,{children:[s.jsx(Ie,{provider:"claude",query:u}),s.jsx(ve,{}),s.jsx(H,{variant:"destructive",disabled:a.isPending,onSelect:()=>a.mutate(),children:e("settings.claudeSubscription.disconnect")})]}):s.jsx(Q,{variant:"outline",size:"sm",onClick:()=>{r(jt),o("")},children:e(l?"settings.ownAccounts.cancel":"settings.claudeSubscription.connect")}),t[14]=c,t[15]=a,t[16]=l,t[17]=e,t[18]=u,t[19]=j):j=t[19];let v;t[20]!==n||t[21]!==c||t[22]!==l||t[23]!==e||t[24]!==i?(v=!c&&l&&s.jsx(he,{hint:s.jsxs(s.Fragment,{children:[e("settings.claudeSubscription.howTo")," ",s.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5",children:"claude setup-token"})]}),submitLabel:e("settings.claudeSubscription.connect"),pending:n.isPending,value:i,onChange:o,onSubmit:()=>n.mutate(i,{onSuccess:()=>{o(""),r(!1)}}),inputProps:{placeholder:e("settings.claudeSubscription.tokenPlaceholder"),"aria-label":e("settings.claudeSubscription.tokenPlaceholder")}}),t[20]=n,t[21]=c,t[22]=l,t[23]=e,t[24]=i,t[25]=v):v=t[25];let S;return t[26]!==x||t[27]!==y||t[28]!==C||t[29]!==b||t[30]!==j||t[31]!==v?(S=s.jsx(de,{icon:x,title:y,status:C,summary:b,action:j,children:v}),t[26]=x,t[27]=y,t[28]=C,t[29]=b,t[30]=j,t[31]=v,t[32]=S):S=t[32],S}function jt(t){return!t}function St(){const t=$.c(63),e=B(),{org:i}=oe(),{data:o}=ye.useSession(),l=o?.user.id??"",r=G(),m=re(),[f,c]=M.useState(""),[p,g]=M.useState(!1);let n;t[0]!==i.id||t[1]!==l?(n=O.codexSubscription(i.id,l),t[0]=i.id,t[1]=l,t[2]=n):n=t[2];let a;t[3]!==r?(a=()=>r.call("CODEX_SUBSCRIPTION_STATUS",{}),t[3]=r,t[4]=a):a=t[4];const d=!!l;let u;t[5]!==n||t[6]!==a||t[7]!==d?(u={queryKey:n,queryFn:a,enabled:d},t[5]=n,t[6]=a,t[7]=d,t[8]=u):u=t[8];const h=le(u);let x;t[9]!==i.id||t[10]!==m||t[11]!==l?(x=async()=>{await m.cancelQueries({queryKey:O.subscriptionUsage(i.id,l,"codex")}),m.removeQueries({queryKey:O.subscriptionUsage(i.id,l,"codex")}),await m.invalidateQueries({queryKey:O.codexSubscription(i.id,l)})},t[9]=i.id,t[10]=m,t[11]=l,t[12]=x):x=t[12];const y=x;let C;t[13]!==r||t[14]!==f?(C=()=>r.call("CODEX_SUBSCRIPTION_CONNECT",{authJson:f}),t[13]=r,t[14]=f,t[15]=C):C=t[15];let b;t[16]!==y||t[17]!==e?(b=async()=>{c(""),g(!1),await y(),R.success(e("settings.codexSubscription.connected"))},t[16]=y,t[17]=e,t[18]=b):b=t[18];let j;t[19]!==C||t[20]!==b?(j={mutationFn:C,onSuccess:b,onError:_t},t[19]=C,t[20]=b,t[21]=j):j=t[21];const v=z(j);let S;t[22]!==r?(S=()=>r.call("CODEX_SUBSCRIPTION_DISCONNECT",{}),t[22]=r,t[23]=S):S=t[23];let P;t[24]!==y||t[25]!==e?(P=async()=>{await y(),R.success(e("settings.codexSubscription.disconnected"))},t[24]=y,t[25]=e,t[26]=P):P=t[26];let N;t[27]!==S||t[28]!==P?(N={mutationFn:S,onSuccess:P,onError:Pt},t[27]=S,t[28]=P,t[29]=N):N=t[29];const _=z(N),K=h.data?.connected===!0,D=h.data?.linkedAt??null;let q;t[30]!==K||t[31]!==i.id||t[32]!==D||t[33]!==l?(q={provider:"codex",orgId:i.id,userId:l,linkedAt:D,enabled:K},t[30]=K,t[31]=i.id,t[32]=D,t[33]=l,t[34]=q):q=t[34];const A=Ke(q);let F;t[35]!==e?(F=e("settings.codexSubscription.title"),t[35]=e,t[36]=F):F=t[36];let I;t[37]!==F?(I=s.jsx(ge,{src:pe.codex,alt:F}),t[37]=F,t[38]=I):I=t[38];let w;t[39]!==e?(w=e("settings.codexSubscription.title"),t[39]=e,t[40]=w):w=t[40];const U=K?"linked":null;let T;t[41]!==K||t[42]!==A?(T=K?s.jsx(Ne,{provider:"codex",query:A}):null,t[41]=K,t[42]=A,t[43]=T):T=t[43];let k;t[44]!==K||t[45]!==_||t[46]!==p||t[47]!==e||t[48]!==A?(k=K?s.jsxs(ue,{children:[s.jsx(Ie,{provider:"codex",query:A}),s.jsx(ve,{}),s.jsx(H,{variant:"destructive",disabled:_.isPending,onSelect:()=>_.mutate(),children:e("settings.codexSubscription.disconnect")})]}):s.jsx(Q,{variant:"outline",size:"sm",onClick:()=>{g(Ct),c("")},children:e(p?"settings.ownAccounts.cancel":"settings.codexSubscription.connect")}),t[44]=K,t[45]=_,t[46]=p,t[47]=e,t[48]=A,t[49]=k):k=t[49];let E;t[50]!==v||t[51]!==K||t[52]!==p||t[53]!==e||t[54]!==f?(E=!K&&p&&s.jsx(he,{hint:s.jsxs(s.Fragment,{children:[e("settings.codexSubscription.howTo")," ",s.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5",children:`codex login -c cli_auth_credentials_store='"file"'`})]}),submitLabel:e("settings.codexSubscription.connect"),pending:v.isPending,value:f,onChange:c,onSubmit:()=>v.mutate(),inputProps:{autoComplete:"off",maxLength:131072,placeholder:e("settings.codexSubscription.tokenPlaceholder"),"aria-label":e("settings.codexSubscription.tokenPlaceholder")}}),t[50]=v,t[51]=K,t[52]=p,t[53]=e,t[54]=f,t[55]=E):E=t[55];let L;return t[56]!==I||t[57]!==w||t[58]!==U||t[59]!==T||t[60]!==k||t[61]!==E?(L=s.jsx(de,{icon:I,title:w,status:U,summary:T,action:k,children:E}),t[56]=I,t[57]=w,t[58]=U,t[59]=T,t[60]=k,t[61]=E,t[62]=L):L=t[62],L}function Ct(t){return!t}function Pt(t){return R.error(t.message)}function _t(t){return R.error(t.message)}const Kt="https://github.com/settings/personal-access-tokens/new";function Nt(){const t=$.c(61),e=B(),{org:i}=oe(),o=G(),l=re(),[r,m]=M.useState(""),[f,c]=M.useState(!1);let p;t[0]!==i.id?(p=O.githubCopilot(i.id),t[0]=i.id,t[1]=p):p=t[1];let g;t[2]!==o?(g=()=>o.call("GITHUB_COPILOT_STATUS",{}),t[2]=o,t[3]=g):g=t[3];let n;t[4]!==p||t[5]!==g?(n={queryKey:p,queryFn:g},t[4]=p,t[5]=g,t[6]=n):n=t[6];const a=le(n);let d;t[7]!==i.id||t[8]!==l?(d=()=>l.invalidateQueries({queryKey:O.githubCopilot(i.id)}),t[7]=i.id,t[8]=l,t[9]=d):d=t[9];const u=d;let h;t[10]!==o||t[11]!==r?(h=()=>o.call("GITHUB_COPILOT_CONNECT",{token:r}),t[10]=o,t[11]=r,t[12]=h):h=t[12];let x;t[13]!==u||t[14]!==e?(x=async()=>{m(""),c(!1),await u(),R.success(e("settings.githubCopilot.connected"))},t[13]=u,t[14]=e,t[15]=x):x=t[15];let y;t[16]!==h||t[17]!==x?(y={mutationFn:h,onSuccess:x,onError:Dt},t[16]=h,t[17]=x,t[18]=y):y=t[18];const C=z(y);let b;t[19]!==o?(b=()=>o.call("GITHUB_COPILOT_DISCONNECT",{}),t[19]=o,t[20]=b):b=t[20];let j;t[21]!==u||t[22]!==e?(j=async()=>{await u(),R.success(e("settings.githubCopilot.disconnected"))},t[21]=u,t[22]=e,t[23]=j):j=t[23];let v;t[24]!==b||t[25]!==j?(v={mutationFn:b,onSuccess:j,onError:Tt},t[24]=b,t[25]=j,t[26]=v):v=t[26];const S=z(v);let P;t[27]!==o?(P=E=>o.call("GITHUB_COPILOT_SHARE",{shared:E}),t[27]=o,t[28]=P):P=t[28];let N;t[29]!==u||t[30]!==P?(N={mutationFn:P,onSuccess:u,onError:wt},t[29]=u,t[30]=P,t[31]=N):N=t[31];const _=z(N),K=a.data?.connected===!0,D=a.data?.orgShare??null;let q;t[32]===Symbol.for("react.memo_cache_sentinel")?(q=s.jsx(ct,{size:18,className:"text-foreground"}),t[32]=q):q=t[32];let A;t[33]!==e?(A=e("settings.githubCopilot.title"),t[33]=e,t[34]=A):A=t[34];const F=K?"linked":null;let I;t[35]!==D||t[36]!==e?(I=D&&!D.sharedByMe?e("settings.githubCopilot.sharedBy",{name:D.sharedBy.name??""}):null,t[35]=D,t[36]=e,t[37]=I):I=t[37];let w;t[38]!==K||t[39]!==D?.sharedByMe||t[40]!==_||t[41]!==e?(w=K?s.jsxs(je,{children:[s.jsx(Se,{asChild:!0,children:s.jsxs("label",{className:"flex shrink-0 cursor-pointer items-center gap-2 text-meta",children:[e("settings.githubCopilot.shareTitle"),s.jsx(at,{checked:D?.sharedByMe===!0,disabled:_.isPending,onCheckedChange:E=>_.mutate(E)})]})}),s.jsx(Ce,{className:"max-w-64",children:e("settings.githubCopilot.shareDescription")})]}):null,t[38]=K,t[39]=D?.sharedByMe,t[40]=_,t[41]=e,t[42]=w):w=t[42];let U;t[43]!==K||t[44]!==S||t[45]!==f||t[46]!==e?(U=K?s.jsx(ue,{children:s.jsx(H,{variant:"destructive",disabled:S.isPending,onSelect:()=>S.mutate(),children:e("settings.githubCopilot.disconnect")})}):s.jsx(Q,{variant:"outline",size:"sm",onClick:()=>{c(It),m("")},children:e(f?"settings.ownAccounts.cancel":"settings.githubCopilot.connect")}),t[43]=K,t[44]=S,t[45]=f,t[46]=e,t[47]=U):U=t[47];let T;t[48]!==C||t[49]!==K||t[50]!==f||t[51]!==e||t[52]!==r?(T=!K&&f&&s.jsx(he,{hint:s.jsx("a",{className:"underline hover:text-foreground",href:Kt,target:"_blank",rel:"noreferrer",children:e("settings.githubCopilot.howTo")}),submitLabel:e("settings.githubCopilot.connect"),pending:C.isPending,value:r,onChange:m,onSubmit:()=>C.mutate(),inputProps:{placeholder:e("settings.githubCopilot.tokenPlaceholder"),"aria-label":e("settings.githubCopilot.tokenPlaceholder")}}),t[48]=C,t[49]=K,t[50]=f,t[51]=e,t[52]=r,t[53]=T):T=t[53];let k;return t[54]!==A||t[55]!==F||t[56]!==I||t[57]!==w||t[58]!==U||t[59]!==T?(k=s.jsx(de,{icon:q,title:A,status:F,meta:I,summary:w,action:U,children:T}),t[54]=A,t[55]=F,t[56]=I,t[57]=w,t[58]=U,t[59]=T,t[60]=k):k=t[60],k}function It(t){return!t}function wt(t){return R.error(t.message)}function Tt(t){return R.error(t.message)}function Dt(t){return R.error(t.message)}const At=t=>He({label:fe().min(1,t("settings.editProviderDialog.labelRequired")).max(100),apiKey:fe().optional(),baseUrl:fe().optional()});function kt({isOpenAICompatible:t,baseUrl:e,currentBaseUrl:i,apiKey:o}){return t&&!!e&&e!==i&&!o}function Ut({providerKey:t,provider:e,preset:i,maskedKey:o,currentLabel:l,currentBaseUrl:r,onCancel:m,onSuccess:f}){const{org:c}=oe(),p=G(),g=re(),n=B(),[a,d]=M.useState(!1),u=e.id==="openai-compatible",h=e.supportedMethods.includes("api-key"),x=At(n),{register:y,handleSubmit:C,watch:b,setError:j,formState:{errors:v}}=ze({resolver:Me(x),defaultValues:{label:l,apiKey:"",baseUrl:r??""}}),S=b("apiKey")??"",{mutate:P,isPending:N}=z({mutationFn:async _=>{let K;_.apiKey&&(u?K=JSON.stringify({baseUrl:_.baseUrl||r||"",apiKey:_.apiKey}):K=_.apiKey),await p.call("AI_PROVIDER_KEY_UPDATE",{keyId:t.id,label:_.label,...K!==void 0?{apiKey:K}:{}})},onSuccess:()=>{g.invalidateQueries({queryKey:O.aiProviderKeys(c.id)}),g.invalidateQueries({queryKey:O.aiProviders(c.id)}),R.success(n("settings.editProviderDialog.providerUpdated")),f()},onError:_=>R.error(n("settings.editProviderDialog.failedToUpdate",{error:_.message}))});return s.jsxs("form",{onSubmit:C(_=>{if(kt({isOpenAICompatible:u,baseUrl:_.baseUrl,currentBaseUrl:r,apiKey:_.apiKey})){j("apiKey",{message:n("settings.editProviderDialog.apiKeyRequiredForBaseUrlChange")});return}P(_)}),className:"space-y-3",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:n("settings.editProviderDialog.label")}),s.jsx(ce,{placeholder:n("settings.editProviderDialog.labelPlaceholder"),...y("label"),size:"sm"}),v.label&&s.jsx("p",{className:"text-xs text-destructive",children:v.label.message})]}),u&&!i?.defaultBaseUrl&&s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:n("settings.editProviderDialog.baseUrl")}),s.jsx(ce,{type:"url",placeholder:i?.baseUrlPlaceholder??n("settings.editProviderDialog.baseUrlPlaceholder"),...y("baseUrl"),size:"sm"})]}),h&&s.jsxs("div",{className:"space-y-1",children:[s.jsxs("label",{className:"text-xs font-medium text-muted-foreground",children:[n("settings.editProviderDialog.apiKey")," ",s.jsxs("span",{className:"text-muted-foreground/60",children:["(",n("settings.editProviderDialog.leaveBlankHint"),")"]})]}),s.jsxs("div",{className:"relative",children:[s.jsx(ce,{type:a&&S?"text":"password",placeholder:o,...y("apiKey"),size:"sm",className:"ph-no-capture pr-8"}),S&&s.jsx("button",{type:"button",onClick:()=>d(!a),"aria-label":n(a?"settings.editProviderDialog.hideApiKey":"settings.editProviderDialog.showApiKey"),className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:a?s.jsx(dt,{size:14}):s.jsx(gt,{size:14})})]}),v.apiKey&&s.jsx("p",{className:"text-xs text-destructive",children:v.apiKey.message})]}),i?.helpText&&s.jsx("p",{className:"text-xs text-muted-foreground",children:i.helpText}),s.jsxs(Qe,{children:[s.jsx(Q,{type:"button",variant:"ghost",size:"sm",onClick:m,disabled:N,children:n("settings.editProviderDialog.cancel")}),s.jsx(Q,{type:"submit",size:"sm",disabled:N,children:n(N?"settings.editProviderDialog.saving":"settings.editProviderDialog.save")})]})]})}function Et(t){const e=$.c(31),{providerKey:i,provider:o,open:l,onOpenChange:r}=t,m=B(),f=G(),c=o.id==="openai-compatible"&&i.presetId?Pe(i.presetId):void 0,p=c?.name??o.name;let g;e[0]!==i.id?(g=O.aiProviderKeyPreview(i.id),e[0]=i.id,e[1]=g):g=e[1];let n;e[2]!==i.id||e[3]!==f?(n=()=>f.call("AI_PROVIDER_KEY_PREVIEW",{keyId:i.id}),e[2]=i.id,e[3]=f,e[4]=n):n=e[4];let a;e[5]!==l||e[6]!==g||e[7]!==n?(a={queryKey:g,queryFn:n,enabled:l,staleTime:0},e[5]=l,e[6]=g,e[7]=n,e[8]=a):a=e[8];const{data:d,isLoading:u}=le(a),h=Le,x=Be,y="sm:max-w-md",C=Fe,b=qe,j=m("settings.editProviderDialog.editTitle",{name:p});let v;e[9]!==b||e[10]!==j?(v=s.jsx(b,{children:j}),e[9]=b,e[10]=j,e[11]=v):v=e[11];let S;e[12]!==C||e[13]!==v?(S=s.jsx(C,{children:v}),e[12]=C,e[13]=v,e[14]=S):S=e[14];let P;e[15]!==u||e[16]!==r||e[17]!==c||e[18]!==d||e[19]!==o||e[20]!==i?(P=u||!d?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx($e,{})}):s.jsx(Ut,{providerKey:i,provider:o,preset:c,maskedKey:d.maskedKey,currentLabel:d.label,currentBaseUrl:d.baseUrl,onCancel:()=>r(!1),onSuccess:()=>r(!1)}),e[15]=u,e[16]=r,e[17]=c,e[18]=d,e[19]=o,e[20]=i,e[21]=P):P=e[21];let N;e[22]!==x||e[23]!==S||e[24]!==P?(N=s.jsxs(x,{className:y,children:[S,P]}),e[22]=x,e[23]=S,e[24]=P,e[25]=N):N=e[25];let _;return e[26]!==h||e[27]!==r||e[28]!==l||e[29]!==N?(_=s.jsx(h,{open:l,onOpenChange:r,children:N}),e[26]=h,e[27]=r,e[28]=l,e[29]=N,e[30]=_):_=e[30],_}function Ot(t){const e=$.c(86),{providerKey:i,provider:o}=t,{org:l}=oe(),r=G(),m=re(),[f,c]=M.useState(!1),[p,g]=M.useState(!1),n=B(),a=mt(),d=o?.id==="openai-compatible";let u;e[0]!==d||e[1]!==i.presetId?(u=d&&i.presetId?Pe(i.presetId):void 0,e[0]=d,e[1]=i.presetId,e[2]=u):u=e[2];const h=u;let x;e[3]!==d||e[4]!==h||e[5]!==o?.name||e[6]!==i.providerId||e[7]!==n?(x=h?h.name:d?n("settings.aiProviders.customOpenAiCompatible"):o?.name??(i.providerId==="claude-code"?n("settings.providerKeyRow.claudeCode"):i.providerId==="codex"?n("settings.providerKeyRow.codex"):i.providerId),e[3]=d,e[4]=h,e[5]=o?.name,e[6]=i.providerId,e[7]=n,e[8]=x):x=e[8];const y=x,C=h?.logo??o?.logo??pe[i.providerId];let b;e:{if(d){b=i.label;break e}let ne;e[9]!==a||e[10]!==i.createdAt||e[11]!==i.label||e[12]!==n?(ne=n("settings.providerKeyRow.addedTimeAgo",{label:i.label,time:pt(new Date(i.createdAt),{locale:a})}),e[9]=a,e[10]=i.createdAt,e[11]=i.label,e[12]=n,e[13]=ne):ne=e[13],b=ne}const j=b;let v;e[14]!==i.id||e[15]!==r?(v=async()=>{await r.call("AI_PROVIDER_KEY_DELETE",{keyId:i.id})},e[14]=i.id,e[15]=r,e[16]=v):v=e[16];let S;e[17]!==l||e[18]!==i.id||e[19]!==m||e[20]!==n?(S=()=>{m.invalidateQueries({queryKey:O.aiProviderKeys(l.id)}),m.invalidateQueries({queryKey:O.aiProviders(l.id)}),m.invalidateQueries({queryKey:O.aiProviderModels(l.id,i.id)}),R.success(n("settings.providerKeyRow.keyDeleted")),c(!1)},e[17]=l,e[18]=i.id,e[19]=m,e[20]=n,e[21]=S):S=e[21];let P;e[22]!==n?(P=ne=>R.error(n("settings.providerKeyRow.failedToDeleteKey",{error:ne.message})),e[22]=n,e[23]=P):P=e[23];let N;e[24]!==v||e[25]!==S||e[26]!==P?(N={mutationFn:v,onSuccess:S,onError:P},e[24]=v,e[25]=S,e[26]=P,e[27]=N):N=e[27];const{mutate:_,isPending:K}=z(N);let D;e[28]!==y||e[29]!==C?(D=s.jsx(ge,{src:C,alt:y}),e[28]=y,e[29]=C,e[30]=D):D=e[30];let q;e[31]!==o||e[32]!==n?(q=o?s.jsxs(H,{onSelect:()=>g(!0),children:[s.jsx(ut,{}),n("settings.providerKeyRow.edit")]}):null,e[31]=o,e[32]=n,e[33]=q):q=e[33];let A,F;e[34]===Symbol.for("react.memo_cache_sentinel")?(A=()=>c(!0),F=s.jsx(ft,{}),e[34]=A,e[35]=F):(A=e[34],F=e[35]);let I;e[36]!==n?(I=n("settings.providerKeyRow.delete"),e[36]=n,e[37]=I):I=e[37];let w;e[38]!==K||e[39]!==I?(w=s.jsxs(H,{variant:"destructive",disabled:K,onSelect:A,children:[F,I]}),e[38]=K,e[39]=I,e[40]=w):w=e[40];let U;e[41]!==w||e[42]!==q?(U=s.jsxs(ue,{children:[q,w]}),e[41]=w,e[42]=q,e[43]=U):U=e[43];let T;e[44]!==j||e[45]!==y||e[46]!==U||e[47]!==D?(T=s.jsx(de,{icon:D,title:y,meta:j,action:U}),e[44]=j,e[45]=y,e[46]=U,e[47]=D,e[48]=T):T=e[48];let k;e[49]!==p||e[50]!==o||e[51]!==i?(k=o?s.jsx(Et,{providerKey:i,provider:o,open:p,onOpenChange:g}):null,e[49]=p,e[50]=o,e[51]=i,e[52]=k):k=e[52];let E;e[53]!==n?(E=n("settings.providerKeyRow.deleteApiKey"),e[53]=n,e[54]=E):E=e[54];let L;e[55]!==E?(L=s.jsx(Ve,{children:E}),e[55]=E,e[56]=L):L=e[56];let V;e[57]!==i.label?(V=s.jsxs(Ge,{children:["This action cannot be undone. This will permanently delete"," ",s.jsx("span",{className:"font-medium text-foreground",children:i.label}),"."]}),e[57]=i.label,e[58]=V):V=e[58];let W;e[59]!==L||e[60]!==V?(W=s.jsxs(We,{children:[L,V]}),e[59]=L,e[60]=V,e[61]=W):W=e[61];let Y;e[62]!==n?(Y=n("settings.providerKeyRow.cancel"),e[62]=n,e[63]=Y):Y=e[63];let J;e[64]!==Y?(J=s.jsx(Ye,{children:Y}),e[64]=Y,e[65]=J):J=e[65];let X;e[66]!==_?(X=()=>_(),e[66]=_,e[67]=X):X=e[67];let Z;e[68]!==n?(Z=n("settings.providerKeyRow.delete"),e[68]=n,e[69]=Z):Z=e[69];let ee;e[70]!==X||e[71]!==Z?(ee=s.jsx(Je,{onClick:X,variant:"destructive",children:Z}),e[70]=X,e[71]=Z,e[72]=ee):ee=e[72];let te;e[73]!==J||e[74]!==ee?(te=s.jsxs(Xe,{children:[J,ee]}),e[73]=J,e[74]=ee,e[75]=te):te=e[75];let se;e[76]!==W||e[77]!==te?(se=s.jsxs(Ze,{children:[W,te]}),e[76]=W,e[77]=te,e[78]=se):se=e[78];let ie;e[79]!==f||e[80]!==se?(ie=s.jsx(et,{open:f,onOpenChange:c,children:se}),e[79]=f,e[80]=se,e[81]=ie):ie=e[81];let ae;return e[82]!==T||e[83]!==k||e[84]!==ie?(ae=s.jsxs(s.Fragment,{children:[T,k,ie]}),e[82]=T,e[83]=k,e[84]=ie,e[85]=ae):ae=e[85],ae}function Zt(t){const e=t.filter(i=>lt(i.providerId));return{hasHostedProvider:e.length>0,hasDeco:e.some(i=>i.providerId==="deco")}}function Rt(t,e){return t.filter(i=>i.providerId!=="deco").map(i=>({key:i,provider:e.find(o=>o.id===i.providerId)??null}))}const we="own-accounts";function es(t){const e=$.c(29),{onAddKey:i}=t,o=B(),l=ot(),r=rt(),m=Rt(l,r?.providers??[]);let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f={select:Ft},e[0]=f):f=e[0];const c=tt(f),p=we;let g;e[1]!==c?(g=N=>{N&&c&&N.scrollIntoView({block:"start"})},e[1]=c,e[2]=g):g=e[2];const n=it;let a;e[3]!==o?(a=o("settings.ownAccounts.title"),e[3]=o,e[4]=a):a=e[4];const d=st;let u,h,x;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(vt,{}),h=s.jsx(St,{}),x=s.jsx(Nt,{}),e[5]=u,e[6]=h,e[7]=x):(u=e[5],h=e[6],x=e[7]);const y=m.map(qt);let C;e[8]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx("span",{className:"flex size-8 items-center justify-center rounded-lg border border-dashed border-border",children:s.jsx(nt,{size:16})}),e[8]=C):C=e[8];let b;e[9]!==o?(b=o("settings.ownAccounts.addApiKey"),e[9]=o,e[10]=b):b=e[10];let j;e[11]!==i||e[12]!==b?(j=s.jsxs("button",{type:"button",onClick:i,className:"flex w-full items-center gap-3 px-4 py-3 text-sm text-muted-foreground hover:bg-accent hover:text-foreground",children:[C,b]}),e[11]=i,e[12]=b,e[13]=j):j=e[13];let v;e[14]!==d||e[15]!==j||e[16]!==u||e[17]!==h||e[18]!==x||e[19]!==y?(v=s.jsxs(d,{children:[u,h,x,y,j]}),e[14]=d,e[15]=j,e[16]=u,e[17]=h,e[18]=x,e[19]=y,e[20]=v):v=e[20];let S;e[21]!==n||e[22]!==v||e[23]!==a?(S=s.jsx(n,{title:a,children:v}),e[21]=n,e[22]=v,e[23]=a,e[24]=S):S=e[24];let P;return e[25]!==S||e[26]!==p||e[27]!==g?(P=s.jsx("div",{id:p,ref:g,children:S}),e[25]=S,e[26]=p,e[27]=g,e[28]=P):P=e[28],P}function qt(t){const{key:e,provider:i}=t;return s.jsx(Ot,{providerKey:e,provider:i},e.id)}function Ft(t){return t.location.hash===we}export{we as O,es as a,Zt as g,xt as u};
1
+ import{c as $,b as B,j as s,I as ce,ao as Te,X as De,B as Q,Z as Ae,_ as ke,am as G,i as le,K as O,b6 as Ue,Y as H,a9 as be,J as Ee,e0 as Oe,m as Re,a6 as oe,a as ye,q as re,e as z,t as R,r as M,aw as ve,x as qe,w as Fe,h as $e,v as Be,D as Le,aG as ze,aF as Me,y as Qe,aH as He,aI as fe,aK as Ge,aJ as Ve,aL as We,aM as Ye,b9 as Je,aN as Xe,aO as Ze,aP as et,l as tt,gh as st,gV as it}from"./index-_VeebRNE.js";import{s as nt}from"./Plus-BYodv7tE.js";import{f as lt,g as ot,e as rt}from"./use-ai-providers-D6peTC8u.js";import{P as pe}from"./ai-providers-logos-DD3qZ33J.js";import{B as me}from"./badge-DCIHIkLr.js";import{c as je,T as Se,a as Ce}from"./tooltip-BYnWhoO-.js";import{S as at}from"./switch-7uXAaerp.js";import{G as ct}from"./github-icon-lV5tv6c5.js";import{i as dt,b as ut}from"./Tool01-D6InpKaj.js";import{s as ft}from"./Trash01-LecfbxTv.js";import{u as mt,f as pt}from"./use-date-fns-locale-B_xn4WWe.js";import{g as Pe}from"./openai-compatible-presets-BKGfVqEx.js";import{s as gt}from"./Eye-BLpLvSpN.js";function de(t){const e=$.c(32),{icon:i,title:o,status:l,meta:r,summary:m,action:f,children:c}=t,p=B();let g;e[0]!==i?(g=s.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted/60",children:i}),e[0]=i,e[1]=g):g=e[1];let n;e[2]!==o?(n=s.jsx("span",{className:"truncate text-sm font-medium",children:o}),e[2]=o,e[3]=n):n=e[3];let a;e[4]!==l||e[5]!==p?(a=l==="linked"&&s.jsx(me,{variant:"success",size:"sm",children:p("settings.ownAccounts.linked")}),e[4]=l,e[5]=p,e[6]=a):a=e[6];let d;e[7]!==l||e[8]!==p?(d=l==="expired"&&s.jsx(me,{variant:"warning",size:"sm",children:p("settings.ownAccounts.expired")}),e[7]=l,e[8]=p,e[9]=d):d=e[9];let u;e[10]!==n||e[11]!==a||e[12]!==d?(u=s.jsxs("div",{className:"flex items-center gap-2",children:[n,a,d]}),e[10]=n,e[11]=a,e[12]=d,e[13]=u):u=e[13];let h;e[14]!==r?(h=r&&s.jsx("span",{className:"truncate text-meta",children:r}),e[14]=r,e[15]=h):h=e[15];let x;e[16]!==u||e[17]!==h?(x=s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[u,h]}),e[16]=u,e[17]=h,e[18]=x):x=e[18];let y;e[19]!==m?(y=m&&s.jsx("div",{className:"order-last basis-full pl-11 sm:order-none sm:basis-auto sm:pl-0",children:m}),e[19]=m,e[20]=y):y=e[20];let C;e[21]!==f?(C=s.jsx("div",{className:"flex shrink-0 items-center gap-1",children:f}),e[21]=f,e[22]=C):C=e[22];let b;e[23]!==g||e[24]!==x||e[25]!==y||e[26]!==C?(b=s.jsxs("div",{className:"flex min-h-16 flex-wrap items-center gap-x-3 gap-y-2 px-4 py-3",children:[g,x,y,C]}),e[23]=g,e[24]=x,e[25]=y,e[26]=C,e[27]=b):b=e[27];let j;return e[28]!==c||e[29]!==b||e[30]!==o?(j=s.jsxs("div",{role:"group","aria-label":o,children:[b,c]}),e[28]=c,e[29]=b,e[30]=o,e[31]=j):j=e[31],j}function ge(t){const e=$.c(7),{src:i,alt:o}=t;if(!i){let r;e[0]!==o?(r=o.charAt(0),e[0]=o,e[1]=r):r=e[1];let m;return e[2]!==r?(m=s.jsx("span",{className:"text-sm font-medium",children:r}),e[2]=r,e[3]=m):m=e[3],m}let l;return e[4]!==o||e[5]!==i?(l=s.jsx("img",{src:i,alt:o,className:"size-5 object-contain"}),e[4]=o,e[5]=i,e[6]=l):l=e[6],l}function ue(t){const e=$.c(10),{children:i}=t,o=B();let l;e[0]!==o?(l=o("settings.ownAccounts.more"),e[0]=o,e[1]=l):l=e[1];let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Te,{size:16}),e[2]=r):r=e[2];let m;e[3]!==l?(m=s.jsx(De,{asChild:!0,children:s.jsx(Q,{variant:"ghost",size:"icon-sm","aria-label":l,className:"text-muted-foreground hover:text-foreground",children:r})}),e[3]=l,e[4]=m):m=e[4];let f;e[5]!==i?(f=s.jsx(Ae,{align:"end",children:i}),e[5]=i,e[6]=f):f=e[6];let c;return e[7]!==m||e[8]!==f?(c=s.jsxs(ke,{children:[m,f]}),e[7]=m,e[8]=f,e[9]=c):c=e[9],c}function he(t){const e=$.c(23),{hint:i,submitLabel:o,pending:l,value:r,onChange:m,onSubmit:f,inputProps:c}=t;let p;e[0]!==f?(p=y=>{y.preventDefault(),f()},e[0]=f,e[1]=p):p=e[1];let g;e[2]!==i?(g=s.jsx("p",{className:"text-meta",children:i}),e[2]=i,e[3]=g):g=e[3];let n;e[4]!==m?(n=y=>m(y.target.value),e[4]=m,e[5]=n):n=e[5];let a;e[6]!==c||e[7]!==n||e[8]!==r?(a=s.jsx(ce,{type:"password",autoFocus:!0,...c,value:r,onChange:n}),e[6]=c,e[7]=n,e[8]=r,e[9]=a):a=e[9];let d;e[10]!==l||e[11]!==r?(d=r.trim().length===0||l,e[10]=l,e[11]=r,e[12]=d):d=e[12];let u;e[13]!==o||e[14]!==d?(u=s.jsx(Q,{type:"submit",disabled:d,children:o}),e[13]=o,e[14]=d,e[15]=u):u=e[15];let h;e[16]!==a||e[17]!==u?(h=s.jsxs("div",{className:"flex items-center gap-2",children:[a,u]}),e[16]=a,e[17]=u,e[18]=h):h=e[18];let x;return e[19]!==p||e[20]!==g||e[21]!==h?(x=s.jsxs("form",{className:"flex flex-col gap-2 px-4 pb-4 pl-15",onSubmit:p,children:[g,h]}),e[19]=p,e[20]=g,e[21]=h,e[22]=x):x=e[22],x}const _e={codex:"https://chatgpt.com/codex/settings/usage",claude:"https://claude.ai/settings/usage"};function xe(t,e){return t.id==="seven_day_sonnet"?"Sonnet":t.id==="seven_day_opus"?"Opus":t.id.startsWith("code_review_")?e("settings.subscriptionUsage.codeReview"):t.windowSeconds&&t.windowSeconds%86400===0?`${t.windowSeconds/86400}d`:t.windowSeconds?`${Math.round(t.windowSeconds/3600*10)/10}h`:t.id==="secondary"?e("settings.subscriptionUsage.secondary"):e("settings.subscriptionUsage.primary")}function ht(t){return t>=100?"bg-destructive":t>=90?"bg-warning":"bg-foreground/70"}function Ke(t){const e=$.c(12),{provider:i,orgId:o,userId:l,linkedAt:r,enabled:m}=t,f=G();let c;e[0]!==r||e[1]!==o||e[2]!==i||e[3]!==l?(c=O.subscriptionUsageSnapshot(o,l,i,r),e[0]=r,e[1]=o,e[2]=i,e[3]=l,e[4]=c):c=e[4];let p;e[5]!==i||e[6]!==f?(p=()=>f.call("SUBSCRIPTION_USAGE_GET",{provider:i}),e[5]=i,e[6]=f,e[7]=p):p=e[7];const g=m&&!!l;let n;return e[8]!==c||e[9]!==p||e[10]!==g?(n={queryKey:c,queryFn:p,enabled:g,staleTime:6e4,retry:!1,refetchOnWindowFocus:!1},e[8]=c,e[9]=p,e[10]=g,e[11]=n):n=e[11],le(n)}function Ne(t){const e=$.c(22),{provider:i,query:o}=t,l=B(),[r]=Ee(),m=o.data;if(o.isPending){let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Oe,{className:"h-4 w-32"}),e[0]=n):n=e[0],n}if(o.isError||m?.status!=="available"){const n=_e[i];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(be,{}),e[1]=a):a=e[1];let d;e[2]!==l?(d=l("settings.subscriptionUsage.viewUsage"),e[2]=l,e[3]=d):d=e[3];let u;return e[4]!==n||e[5]!==d?(u=s.jsx(Q,{variant:"outline",size:"sm",asChild:!0,children:s.jsxs("a",{href:n,target:"_blank",rel:"noopener noreferrer",children:[a,d]})}),e[4]=n,e[5]=d,e[6]=u):u=e[6],u}if(m.limitReached){let n;e[7]!==l?(n=l("settings.subscriptionUsage.limitReached"),e[7]=l,e[8]=n):n=e[8];let a;return e[9]!==n?(a=s.jsx(me,{variant:"destructive",size:"sm",children:n}),e[9]=n,e[10]=a):a=e[10],a}let f;e[11]!==r?(f=n=>new Intl.DateTimeFormat(r.language,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(new Date(n)),e[11]=r,e[12]=f):f=e[12];const c=f;let p;if(e[13]!==c||e[14]!==l||e[15]!==m.windows){let n;e[17]!==c||e[18]!==l?(n=a=>{const d=Math.round(a.usedPercent);return s.jsxs(je,{children:[s.jsx(Se,{asChild:!0,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-meta",children:xe(a,l)}),s.jsx("div",{role:"progressbar","aria-label":xe(a,l),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":d,className:"h-1.5 w-14 overflow-hidden rounded-full bg-muted",children:s.jsx("div",{style:{width:`${Math.min(100,d)}%`},className:Re("h-full rounded-full",ht(d))})}),s.jsxs("span",{className:"w-8 text-right text-meta text-foreground",children:[d,"%"]})]})}),a.resetAt&&s.jsx(Ce,{children:l("settings.subscriptionUsage.resets",{date:c(a.resetAt)})})]},a.id)},e[17]=c,e[18]=l,e[19]=n):n=e[19],p=m.windows.slice(0,2).map(n),e[13]=c,e[14]=l,e[15]=m.windows,e[16]=p}else p=e[16];let g;return e[20]!==p?(g=s.jsx("div",{className:"flex shrink-0 items-center gap-4",children:p}),e[20]=p,e[21]=g):g=e[21],g}function Ie(t){const e=$.c(18),{provider:i,query:o}=t,l=B(),r=o.isFetching;let m;e[0]!==o?(m=()=>{o.refetch()},e[0]=o,e[1]=m):m=e[1];let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Ue,{}),e[2]=f):f=e[2];let c;e[3]!==l?(c=l("settings.subscriptionUsage.refresh"),e[3]=l,e[4]=c):c=e[4];let p;e[5]!==o.isFetching||e[6]!==m||e[7]!==c?(p=s.jsxs(H,{disabled:r,onSelect:m,children:[f,c]}),e[5]=o.isFetching,e[6]=m,e[7]=c,e[8]=p):p=e[8];const g=_e[i];let n;e[9]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(be,{}),e[9]=n):n=e[9];let a;e[10]!==l?(a=l("settings.subscriptionUsage.openProvider"),e[10]=l,e[11]=a):a=e[11];let d;e[12]!==g||e[13]!==a?(d=s.jsx(H,{asChild:!0,children:s.jsxs("a",{href:g,target:"_blank",rel:"noopener noreferrer",children:[n,a]})}),e[12]=g,e[13]=a,e[14]=d):d=e[14];let u;return e[15]!==p||e[16]!==d?(u=s.jsxs(s.Fragment,{children:[p,d]}),e[15]=p,e[16]=d,e[17]=u):u=e[17],u}function xt(){const t=$.c(38),e=B(),{org:i}=oe(),{data:o}=ye.useSession(),l=o?.user.id??"",r=G(),m=re();let f;t[0]!==i.id||t[1]!==l?(f=O.claudeSubscription(i.id,l),t[0]=i.id,t[1]=l,t[2]=f):f=t[2];let c;t[3]!==r?(c=()=>r.call("CLAUDE_SUBSCRIPTION_STATUS",{}),t[3]=r,t[4]=c):c=t[4];const p=!!l;let g;t[5]!==f||t[6]!==c||t[7]!==p?(g={queryKey:f,queryFn:c,enabled:p},t[5]=f,t[6]=c,t[7]=p,t[8]=g):g=t[8];const n=le(g);let a;t[9]!==i.id||t[10]!==m||t[11]!==l?(a=async()=>{await m.cancelQueries({queryKey:O.subscriptionUsage(i.id,l,"claude")}),m.removeQueries({queryKey:O.subscriptionUsage(i.id,l,"claude")}),await m.invalidateQueries({queryKey:O.claudeSubscription(i.id,l)})},t[9]=i.id,t[10]=m,t[11]=l,t[12]=a):a=t[12];const d=a;let u;t[13]!==r?(u=K=>r.call("CLAUDE_SUBSCRIPTION_CONNECT",{token:K}),t[13]=r,t[14]=u):u=t[14];let h;t[15]!==d||t[16]!==e?(h=async()=>{await d(),R.success(e("settings.claudeSubscription.connected"))},t[15]=d,t[16]=e,t[17]=h):h=t[17];let x;t[18]!==u||t[19]!==h?(x={mutationFn:u,onSuccess:h,onError:yt},t[18]=u,t[19]=h,t[20]=x):x=t[20];const y=z(x);let C;t[21]!==r?(C=()=>r.call("CLAUDE_SUBSCRIPTION_DISCONNECT",{}),t[21]=r,t[22]=C):C=t[22];let b;t[23]!==d||t[24]!==e?(b=async()=>{await d(),R.success(e("settings.claudeSubscription.disconnected"))},t[23]=d,t[24]=e,t[25]=b):b=t[25];let j;t[26]!==C||t[27]!==b?(j={mutationFn:C,onSuccess:b,onError:bt},t[26]=C,t[27]=b,t[28]=j):j=t[28];const v=z(j),S=n.data?.connected===!0,P=!S&&!!n.data?.linkedAt,N=n.data?.linkedAt??null;let _;return t[29]!==y||t[30]!==S||t[31]!==v||t[32]!==P||t[33]!==i.id||t[34]!==n||t[35]!==N||t[36]!==l?(_={orgId:i.id,userId:l,status:n,connected:S,expired:P,linkedAt:N,connect:y,disconnect:v},t[29]=y,t[30]=S,t[31]=v,t[32]=P,t[33]=i.id,t[34]=n,t[35]=N,t[36]=l,t[37]=_):_=t[37],_}function bt(t){return R.error(t.message)}function yt(t){return R.error(t.message)}function vt(){const t=$.c(33),e=B(),[i,o]=M.useState(""),[l,r]=M.useState(!1),{orgId:m,userId:f,connected:c,expired:p,linkedAt:g,connect:n,disconnect:a}=xt();let d;t[0]!==c||t[1]!==g||t[2]!==m||t[3]!==f?(d={provider:"claude",orgId:m,userId:f,linkedAt:g,enabled:c},t[0]=c,t[1]=g,t[2]=m,t[3]=f,t[4]=d):d=t[4];const u=Ke(d);let h;t[5]!==e?(h=e("settings.claudeSubscription.title"),t[5]=e,t[6]=h):h=t[6];let x;t[7]!==h?(x=s.jsx(ge,{src:pe["claude-code"],alt:h}),t[7]=h,t[8]=x):x=t[8];let y;t[9]!==e?(y=e("settings.claudeSubscription.title"),t[9]=e,t[10]=y):y=t[10];const C=c?"linked":p?"expired":null;let b;t[11]!==c||t[12]!==u?(b=c?s.jsx(Ne,{provider:"claude",query:u}):null,t[11]=c,t[12]=u,t[13]=b):b=t[13];let j;t[14]!==c||t[15]!==a||t[16]!==l||t[17]!==e||t[18]!==u?(j=c?s.jsxs(ue,{children:[s.jsx(Ie,{provider:"claude",query:u}),s.jsx(ve,{}),s.jsx(H,{variant:"destructive",disabled:a.isPending,onSelect:()=>a.mutate(),children:e("settings.claudeSubscription.disconnect")})]}):s.jsx(Q,{variant:"outline",size:"sm",onClick:()=>{r(jt),o("")},children:e(l?"settings.ownAccounts.cancel":"settings.claudeSubscription.connect")}),t[14]=c,t[15]=a,t[16]=l,t[17]=e,t[18]=u,t[19]=j):j=t[19];let v;t[20]!==n||t[21]!==c||t[22]!==l||t[23]!==e||t[24]!==i?(v=!c&&l&&s.jsx(he,{hint:s.jsxs(s.Fragment,{children:[e("settings.claudeSubscription.howTo")," ",s.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5",children:"claude setup-token"})]}),submitLabel:e("settings.claudeSubscription.connect"),pending:n.isPending,value:i,onChange:o,onSubmit:()=>n.mutate(i,{onSuccess:()=>{o(""),r(!1)}}),inputProps:{placeholder:e("settings.claudeSubscription.tokenPlaceholder"),"aria-label":e("settings.claudeSubscription.tokenPlaceholder")}}),t[20]=n,t[21]=c,t[22]=l,t[23]=e,t[24]=i,t[25]=v):v=t[25];let S;return t[26]!==x||t[27]!==y||t[28]!==C||t[29]!==b||t[30]!==j||t[31]!==v?(S=s.jsx(de,{icon:x,title:y,status:C,summary:b,action:j,children:v}),t[26]=x,t[27]=y,t[28]=C,t[29]=b,t[30]=j,t[31]=v,t[32]=S):S=t[32],S}function jt(t){return!t}function St(){const t=$.c(63),e=B(),{org:i}=oe(),{data:o}=ye.useSession(),l=o?.user.id??"",r=G(),m=re(),[f,c]=M.useState(""),[p,g]=M.useState(!1);let n;t[0]!==i.id||t[1]!==l?(n=O.codexSubscription(i.id,l),t[0]=i.id,t[1]=l,t[2]=n):n=t[2];let a;t[3]!==r?(a=()=>r.call("CODEX_SUBSCRIPTION_STATUS",{}),t[3]=r,t[4]=a):a=t[4];const d=!!l;let u;t[5]!==n||t[6]!==a||t[7]!==d?(u={queryKey:n,queryFn:a,enabled:d},t[5]=n,t[6]=a,t[7]=d,t[8]=u):u=t[8];const h=le(u);let x;t[9]!==i.id||t[10]!==m||t[11]!==l?(x=async()=>{await m.cancelQueries({queryKey:O.subscriptionUsage(i.id,l,"codex")}),m.removeQueries({queryKey:O.subscriptionUsage(i.id,l,"codex")}),await m.invalidateQueries({queryKey:O.codexSubscription(i.id,l)})},t[9]=i.id,t[10]=m,t[11]=l,t[12]=x):x=t[12];const y=x;let C;t[13]!==r||t[14]!==f?(C=()=>r.call("CODEX_SUBSCRIPTION_CONNECT",{authJson:f}),t[13]=r,t[14]=f,t[15]=C):C=t[15];let b;t[16]!==y||t[17]!==e?(b=async()=>{c(""),g(!1),await y(),R.success(e("settings.codexSubscription.connected"))},t[16]=y,t[17]=e,t[18]=b):b=t[18];let j;t[19]!==C||t[20]!==b?(j={mutationFn:C,onSuccess:b,onError:_t},t[19]=C,t[20]=b,t[21]=j):j=t[21];const v=z(j);let S;t[22]!==r?(S=()=>r.call("CODEX_SUBSCRIPTION_DISCONNECT",{}),t[22]=r,t[23]=S):S=t[23];let P;t[24]!==y||t[25]!==e?(P=async()=>{await y(),R.success(e("settings.codexSubscription.disconnected"))},t[24]=y,t[25]=e,t[26]=P):P=t[26];let N;t[27]!==S||t[28]!==P?(N={mutationFn:S,onSuccess:P,onError:Pt},t[27]=S,t[28]=P,t[29]=N):N=t[29];const _=z(N),K=h.data?.connected===!0,D=h.data?.linkedAt??null;let q;t[30]!==K||t[31]!==i.id||t[32]!==D||t[33]!==l?(q={provider:"codex",orgId:i.id,userId:l,linkedAt:D,enabled:K},t[30]=K,t[31]=i.id,t[32]=D,t[33]=l,t[34]=q):q=t[34];const A=Ke(q);let F;t[35]!==e?(F=e("settings.codexSubscription.title"),t[35]=e,t[36]=F):F=t[36];let I;t[37]!==F?(I=s.jsx(ge,{src:pe.codex,alt:F}),t[37]=F,t[38]=I):I=t[38];let w;t[39]!==e?(w=e("settings.codexSubscription.title"),t[39]=e,t[40]=w):w=t[40];const U=K?"linked":null;let T;t[41]!==K||t[42]!==A?(T=K?s.jsx(Ne,{provider:"codex",query:A}):null,t[41]=K,t[42]=A,t[43]=T):T=t[43];let k;t[44]!==K||t[45]!==_||t[46]!==p||t[47]!==e||t[48]!==A?(k=K?s.jsxs(ue,{children:[s.jsx(Ie,{provider:"codex",query:A}),s.jsx(ve,{}),s.jsx(H,{variant:"destructive",disabled:_.isPending,onSelect:()=>_.mutate(),children:e("settings.codexSubscription.disconnect")})]}):s.jsx(Q,{variant:"outline",size:"sm",onClick:()=>{g(Ct),c("")},children:e(p?"settings.ownAccounts.cancel":"settings.codexSubscription.connect")}),t[44]=K,t[45]=_,t[46]=p,t[47]=e,t[48]=A,t[49]=k):k=t[49];let E;t[50]!==v||t[51]!==K||t[52]!==p||t[53]!==e||t[54]!==f?(E=!K&&p&&s.jsx(he,{hint:s.jsxs(s.Fragment,{children:[e("settings.codexSubscription.howTo")," ",s.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5",children:`codex login -c cli_auth_credentials_store='"file"'`})]}),submitLabel:e("settings.codexSubscription.connect"),pending:v.isPending,value:f,onChange:c,onSubmit:()=>v.mutate(),inputProps:{autoComplete:"off",maxLength:131072,placeholder:e("settings.codexSubscription.tokenPlaceholder"),"aria-label":e("settings.codexSubscription.tokenPlaceholder")}}),t[50]=v,t[51]=K,t[52]=p,t[53]=e,t[54]=f,t[55]=E):E=t[55];let L;return t[56]!==I||t[57]!==w||t[58]!==U||t[59]!==T||t[60]!==k||t[61]!==E?(L=s.jsx(de,{icon:I,title:w,status:U,summary:T,action:k,children:E}),t[56]=I,t[57]=w,t[58]=U,t[59]=T,t[60]=k,t[61]=E,t[62]=L):L=t[62],L}function Ct(t){return!t}function Pt(t){return R.error(t.message)}function _t(t){return R.error(t.message)}const Kt="https://github.com/settings/personal-access-tokens/new";function Nt(){const t=$.c(61),e=B(),{org:i}=oe(),o=G(),l=re(),[r,m]=M.useState(""),[f,c]=M.useState(!1);let p;t[0]!==i.id?(p=O.githubCopilot(i.id),t[0]=i.id,t[1]=p):p=t[1];let g;t[2]!==o?(g=()=>o.call("GITHUB_COPILOT_STATUS",{}),t[2]=o,t[3]=g):g=t[3];let n;t[4]!==p||t[5]!==g?(n={queryKey:p,queryFn:g},t[4]=p,t[5]=g,t[6]=n):n=t[6];const a=le(n);let d;t[7]!==i.id||t[8]!==l?(d=()=>l.invalidateQueries({queryKey:O.githubCopilot(i.id)}),t[7]=i.id,t[8]=l,t[9]=d):d=t[9];const u=d;let h;t[10]!==o||t[11]!==r?(h=()=>o.call("GITHUB_COPILOT_CONNECT",{token:r}),t[10]=o,t[11]=r,t[12]=h):h=t[12];let x;t[13]!==u||t[14]!==e?(x=async()=>{m(""),c(!1),await u(),R.success(e("settings.githubCopilot.connected"))},t[13]=u,t[14]=e,t[15]=x):x=t[15];let y;t[16]!==h||t[17]!==x?(y={mutationFn:h,onSuccess:x,onError:Dt},t[16]=h,t[17]=x,t[18]=y):y=t[18];const C=z(y);let b;t[19]!==o?(b=()=>o.call("GITHUB_COPILOT_DISCONNECT",{}),t[19]=o,t[20]=b):b=t[20];let j;t[21]!==u||t[22]!==e?(j=async()=>{await u(),R.success(e("settings.githubCopilot.disconnected"))},t[21]=u,t[22]=e,t[23]=j):j=t[23];let v;t[24]!==b||t[25]!==j?(v={mutationFn:b,onSuccess:j,onError:Tt},t[24]=b,t[25]=j,t[26]=v):v=t[26];const S=z(v);let P;t[27]!==o?(P=E=>o.call("GITHUB_COPILOT_SHARE",{shared:E}),t[27]=o,t[28]=P):P=t[28];let N;t[29]!==u||t[30]!==P?(N={mutationFn:P,onSuccess:u,onError:wt},t[29]=u,t[30]=P,t[31]=N):N=t[31];const _=z(N),K=a.data?.connected===!0,D=a.data?.orgShare??null;let q;t[32]===Symbol.for("react.memo_cache_sentinel")?(q=s.jsx(ct,{size:18,className:"text-foreground"}),t[32]=q):q=t[32];let A;t[33]!==e?(A=e("settings.githubCopilot.title"),t[33]=e,t[34]=A):A=t[34];const F=K?"linked":null;let I;t[35]!==D||t[36]!==e?(I=D&&!D.sharedByMe?e("settings.githubCopilot.sharedBy",{name:D.sharedBy.name??""}):null,t[35]=D,t[36]=e,t[37]=I):I=t[37];let w;t[38]!==K||t[39]!==D?.sharedByMe||t[40]!==_||t[41]!==e?(w=K?s.jsxs(je,{children:[s.jsx(Se,{asChild:!0,children:s.jsxs("label",{className:"flex shrink-0 cursor-pointer items-center gap-2 text-meta",children:[e("settings.githubCopilot.shareTitle"),s.jsx(at,{checked:D?.sharedByMe===!0,disabled:_.isPending,onCheckedChange:E=>_.mutate(E)})]})}),s.jsx(Ce,{className:"max-w-64",children:e("settings.githubCopilot.shareDescription")})]}):null,t[38]=K,t[39]=D?.sharedByMe,t[40]=_,t[41]=e,t[42]=w):w=t[42];let U;t[43]!==K||t[44]!==S||t[45]!==f||t[46]!==e?(U=K?s.jsx(ue,{children:s.jsx(H,{variant:"destructive",disabled:S.isPending,onSelect:()=>S.mutate(),children:e("settings.githubCopilot.disconnect")})}):s.jsx(Q,{variant:"outline",size:"sm",onClick:()=>{c(It),m("")},children:e(f?"settings.ownAccounts.cancel":"settings.githubCopilot.connect")}),t[43]=K,t[44]=S,t[45]=f,t[46]=e,t[47]=U):U=t[47];let T;t[48]!==C||t[49]!==K||t[50]!==f||t[51]!==e||t[52]!==r?(T=!K&&f&&s.jsx(he,{hint:s.jsx("a",{className:"underline hover:text-foreground",href:Kt,target:"_blank",rel:"noreferrer",children:e("settings.githubCopilot.howTo")}),submitLabel:e("settings.githubCopilot.connect"),pending:C.isPending,value:r,onChange:m,onSubmit:()=>C.mutate(),inputProps:{placeholder:e("settings.githubCopilot.tokenPlaceholder"),"aria-label":e("settings.githubCopilot.tokenPlaceholder")}}),t[48]=C,t[49]=K,t[50]=f,t[51]=e,t[52]=r,t[53]=T):T=t[53];let k;return t[54]!==A||t[55]!==F||t[56]!==I||t[57]!==w||t[58]!==U||t[59]!==T?(k=s.jsx(de,{icon:q,title:A,status:F,meta:I,summary:w,action:U,children:T}),t[54]=A,t[55]=F,t[56]=I,t[57]=w,t[58]=U,t[59]=T,t[60]=k):k=t[60],k}function It(t){return!t}function wt(t){return R.error(t.message)}function Tt(t){return R.error(t.message)}function Dt(t){return R.error(t.message)}const At=t=>He({label:fe().min(1,t("settings.editProviderDialog.labelRequired")).max(100),apiKey:fe().optional(),baseUrl:fe().optional()});function kt({isOpenAICompatible:t,baseUrl:e,currentBaseUrl:i,apiKey:o}){return t&&!!e&&e!==i&&!o}function Ut({providerKey:t,provider:e,preset:i,maskedKey:o,currentLabel:l,currentBaseUrl:r,onCancel:m,onSuccess:f}){const{org:c}=oe(),p=G(),g=re(),n=B(),[a,d]=M.useState(!1),u=e.id==="openai-compatible",h=e.supportedMethods.includes("api-key"),x=At(n),{register:y,handleSubmit:C,watch:b,setError:j,formState:{errors:v}}=ze({resolver:Me(x),defaultValues:{label:l,apiKey:"",baseUrl:r??""}}),S=b("apiKey")??"",{mutate:P,isPending:N}=z({mutationFn:async _=>{let K;_.apiKey&&(u?K=JSON.stringify({baseUrl:_.baseUrl||r||"",apiKey:_.apiKey}):K=_.apiKey),await p.call("AI_PROVIDER_KEY_UPDATE",{keyId:t.id,label:_.label,...K!==void 0?{apiKey:K}:{}})},onSuccess:()=>{g.invalidateQueries({queryKey:O.aiProviderKeys(c.id)}),g.invalidateQueries({queryKey:O.aiProviders(c.id)}),R.success(n("settings.editProviderDialog.providerUpdated")),f()},onError:_=>R.error(n("settings.editProviderDialog.failedToUpdate",{error:_.message}))});return s.jsxs("form",{onSubmit:C(_=>{if(kt({isOpenAICompatible:u,baseUrl:_.baseUrl,currentBaseUrl:r,apiKey:_.apiKey})){j("apiKey",{message:n("settings.editProviderDialog.apiKeyRequiredForBaseUrlChange")});return}P(_)}),className:"space-y-3",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:n("settings.editProviderDialog.label")}),s.jsx(ce,{placeholder:n("settings.editProviderDialog.labelPlaceholder"),...y("label"),size:"sm"}),v.label&&s.jsx("p",{className:"text-xs text-destructive",children:v.label.message})]}),u&&!i?.defaultBaseUrl&&s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:n("settings.editProviderDialog.baseUrl")}),s.jsx(ce,{type:"url",placeholder:i?.baseUrlPlaceholder??n("settings.editProviderDialog.baseUrlPlaceholder"),...y("baseUrl"),size:"sm"})]}),h&&s.jsxs("div",{className:"space-y-1",children:[s.jsxs("label",{className:"text-xs font-medium text-muted-foreground",children:[n("settings.editProviderDialog.apiKey")," ",s.jsxs("span",{className:"text-muted-foreground/60",children:["(",n("settings.editProviderDialog.leaveBlankHint"),")"]})]}),s.jsxs("div",{className:"relative",children:[s.jsx(ce,{type:a&&S?"text":"password",placeholder:o,...y("apiKey"),size:"sm",className:"ph-no-capture pr-8"}),S&&s.jsx("button",{type:"button",onClick:()=>d(!a),"aria-label":n(a?"settings.editProviderDialog.hideApiKey":"settings.editProviderDialog.showApiKey"),className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:a?s.jsx(dt,{size:14}):s.jsx(gt,{size:14})})]}),v.apiKey&&s.jsx("p",{className:"text-xs text-destructive",children:v.apiKey.message})]}),i?.helpText&&s.jsx("p",{className:"text-xs text-muted-foreground",children:i.helpText}),s.jsxs(Qe,{children:[s.jsx(Q,{type:"button",variant:"ghost",size:"sm",onClick:m,disabled:N,children:n("settings.editProviderDialog.cancel")}),s.jsx(Q,{type:"submit",size:"sm",disabled:N,children:n(N?"settings.editProviderDialog.saving":"settings.editProviderDialog.save")})]})]})}function Et(t){const e=$.c(31),{providerKey:i,provider:o,open:l,onOpenChange:r}=t,m=B(),f=G(),c=o.id==="openai-compatible"&&i.presetId?Pe(i.presetId):void 0,p=c?.name??o.name;let g;e[0]!==i.id?(g=O.aiProviderKeyPreview(i.id),e[0]=i.id,e[1]=g):g=e[1];let n;e[2]!==i.id||e[3]!==f?(n=()=>f.call("AI_PROVIDER_KEY_PREVIEW",{keyId:i.id}),e[2]=i.id,e[3]=f,e[4]=n):n=e[4];let a;e[5]!==l||e[6]!==g||e[7]!==n?(a={queryKey:g,queryFn:n,enabled:l,staleTime:0},e[5]=l,e[6]=g,e[7]=n,e[8]=a):a=e[8];const{data:d,isLoading:u}=le(a),h=Le,x=Be,y="sm:max-w-md",C=Fe,b=qe,j=m("settings.editProviderDialog.editTitle",{name:p});let v;e[9]!==b||e[10]!==j?(v=s.jsx(b,{children:j}),e[9]=b,e[10]=j,e[11]=v):v=e[11];let S;e[12]!==C||e[13]!==v?(S=s.jsx(C,{children:v}),e[12]=C,e[13]=v,e[14]=S):S=e[14];let P;e[15]!==u||e[16]!==r||e[17]!==c||e[18]!==d||e[19]!==o||e[20]!==i?(P=u||!d?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx($e,{})}):s.jsx(Ut,{providerKey:i,provider:o,preset:c,maskedKey:d.maskedKey,currentLabel:d.label,currentBaseUrl:d.baseUrl,onCancel:()=>r(!1),onSuccess:()=>r(!1)}),e[15]=u,e[16]=r,e[17]=c,e[18]=d,e[19]=o,e[20]=i,e[21]=P):P=e[21];let N;e[22]!==x||e[23]!==S||e[24]!==P?(N=s.jsxs(x,{className:y,children:[S,P]}),e[22]=x,e[23]=S,e[24]=P,e[25]=N):N=e[25];let _;return e[26]!==h||e[27]!==r||e[28]!==l||e[29]!==N?(_=s.jsx(h,{open:l,onOpenChange:r,children:N}),e[26]=h,e[27]=r,e[28]=l,e[29]=N,e[30]=_):_=e[30],_}function Ot(t){const e=$.c(86),{providerKey:i,provider:o}=t,{org:l}=oe(),r=G(),m=re(),[f,c]=M.useState(!1),[p,g]=M.useState(!1),n=B(),a=mt(),d=o?.id==="openai-compatible";let u;e[0]!==d||e[1]!==i.presetId?(u=d&&i.presetId?Pe(i.presetId):void 0,e[0]=d,e[1]=i.presetId,e[2]=u):u=e[2];const h=u;let x;e[3]!==d||e[4]!==h||e[5]!==o?.name||e[6]!==i.providerId||e[7]!==n?(x=h?h.name:d?n("settings.aiProviders.customOpenAiCompatible"):o?.name??(i.providerId==="claude-code"?n("settings.providerKeyRow.claudeCode"):i.providerId==="codex"?n("settings.providerKeyRow.codex"):i.providerId),e[3]=d,e[4]=h,e[5]=o?.name,e[6]=i.providerId,e[7]=n,e[8]=x):x=e[8];const y=x,C=h?.logo??o?.logo??pe[i.providerId];let b;e:{if(d){b=i.label;break e}let ne;e[9]!==a||e[10]!==i.createdAt||e[11]!==i.label||e[12]!==n?(ne=n("settings.providerKeyRow.addedTimeAgo",{label:i.label,time:pt(new Date(i.createdAt),{locale:a})}),e[9]=a,e[10]=i.createdAt,e[11]=i.label,e[12]=n,e[13]=ne):ne=e[13],b=ne}const j=b;let v;e[14]!==i.id||e[15]!==r?(v=async()=>{await r.call("AI_PROVIDER_KEY_DELETE",{keyId:i.id})},e[14]=i.id,e[15]=r,e[16]=v):v=e[16];let S;e[17]!==l||e[18]!==i.id||e[19]!==m||e[20]!==n?(S=()=>{m.invalidateQueries({queryKey:O.aiProviderKeys(l.id)}),m.invalidateQueries({queryKey:O.aiProviders(l.id)}),m.invalidateQueries({queryKey:O.aiProviderModels(l.id,i.id)}),R.success(n("settings.providerKeyRow.keyDeleted")),c(!1)},e[17]=l,e[18]=i.id,e[19]=m,e[20]=n,e[21]=S):S=e[21];let P;e[22]!==n?(P=ne=>R.error(n("settings.providerKeyRow.failedToDeleteKey",{error:ne.message})),e[22]=n,e[23]=P):P=e[23];let N;e[24]!==v||e[25]!==S||e[26]!==P?(N={mutationFn:v,onSuccess:S,onError:P},e[24]=v,e[25]=S,e[26]=P,e[27]=N):N=e[27];const{mutate:_,isPending:K}=z(N);let D;e[28]!==y||e[29]!==C?(D=s.jsx(ge,{src:C,alt:y}),e[28]=y,e[29]=C,e[30]=D):D=e[30];let q;e[31]!==o||e[32]!==n?(q=o?s.jsxs(H,{onSelect:()=>g(!0),children:[s.jsx(ut,{}),n("settings.providerKeyRow.edit")]}):null,e[31]=o,e[32]=n,e[33]=q):q=e[33];let A,F;e[34]===Symbol.for("react.memo_cache_sentinel")?(A=()=>c(!0),F=s.jsx(ft,{}),e[34]=A,e[35]=F):(A=e[34],F=e[35]);let I;e[36]!==n?(I=n("settings.providerKeyRow.delete"),e[36]=n,e[37]=I):I=e[37];let w;e[38]!==K||e[39]!==I?(w=s.jsxs(H,{variant:"destructive",disabled:K,onSelect:A,children:[F,I]}),e[38]=K,e[39]=I,e[40]=w):w=e[40];let U;e[41]!==w||e[42]!==q?(U=s.jsxs(ue,{children:[q,w]}),e[41]=w,e[42]=q,e[43]=U):U=e[43];let T;e[44]!==j||e[45]!==y||e[46]!==U||e[47]!==D?(T=s.jsx(de,{icon:D,title:y,meta:j,action:U}),e[44]=j,e[45]=y,e[46]=U,e[47]=D,e[48]=T):T=e[48];let k;e[49]!==p||e[50]!==o||e[51]!==i?(k=o?s.jsx(Et,{providerKey:i,provider:o,open:p,onOpenChange:g}):null,e[49]=p,e[50]=o,e[51]=i,e[52]=k):k=e[52];let E;e[53]!==n?(E=n("settings.providerKeyRow.deleteApiKey"),e[53]=n,e[54]=E):E=e[54];let L;e[55]!==E?(L=s.jsx(Ve,{children:E}),e[55]=E,e[56]=L):L=e[56];let V;e[57]!==i.label?(V=s.jsxs(Ge,{children:["This action cannot be undone. This will permanently delete"," ",s.jsx("span",{className:"font-medium text-foreground",children:i.label}),"."]}),e[57]=i.label,e[58]=V):V=e[58];let W;e[59]!==L||e[60]!==V?(W=s.jsxs(We,{children:[L,V]}),e[59]=L,e[60]=V,e[61]=W):W=e[61];let Y;e[62]!==n?(Y=n("settings.providerKeyRow.cancel"),e[62]=n,e[63]=Y):Y=e[63];let J;e[64]!==Y?(J=s.jsx(Ye,{children:Y}),e[64]=Y,e[65]=J):J=e[65];let X;e[66]!==_?(X=()=>_(),e[66]=_,e[67]=X):X=e[67];let Z;e[68]!==n?(Z=n("settings.providerKeyRow.delete"),e[68]=n,e[69]=Z):Z=e[69];let ee;e[70]!==X||e[71]!==Z?(ee=s.jsx(Je,{onClick:X,variant:"destructive",children:Z}),e[70]=X,e[71]=Z,e[72]=ee):ee=e[72];let te;e[73]!==J||e[74]!==ee?(te=s.jsxs(Xe,{children:[J,ee]}),e[73]=J,e[74]=ee,e[75]=te):te=e[75];let se;e[76]!==W||e[77]!==te?(se=s.jsxs(Ze,{children:[W,te]}),e[76]=W,e[77]=te,e[78]=se):se=e[78];let ie;e[79]!==f||e[80]!==se?(ie=s.jsx(et,{open:f,onOpenChange:c,children:se}),e[79]=f,e[80]=se,e[81]=ie):ie=e[81];let ae;return e[82]!==T||e[83]!==k||e[84]!==ie?(ae=s.jsxs(s.Fragment,{children:[T,k,ie]}),e[82]=T,e[83]=k,e[84]=ie,e[85]=ae):ae=e[85],ae}function Zt(t){const e=t.filter(i=>lt(i.providerId));return{hasHostedProvider:e.length>0,hasDeco:e.some(i=>i.providerId==="deco")}}function Rt(t,e){return t.filter(i=>i.providerId!=="deco").map(i=>({key:i,provider:e.find(o=>o.id===i.providerId)??null}))}const we="own-accounts";function es(t){const e=$.c(29),{onAddKey:i}=t,o=B(),l=ot(),r=rt(),m=Rt(l,r?.providers??[]);let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f={select:Ft},e[0]=f):f=e[0];const c=tt(f),p=we;let g;e[1]!==c?(g=N=>{N&&c&&N.scrollIntoView({block:"start"})},e[1]=c,e[2]=g):g=e[2];const n=it;let a;e[3]!==o?(a=o("settings.ownAccounts.title"),e[3]=o,e[4]=a):a=e[4];const d=st;let u,h,x;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(vt,{}),h=s.jsx(St,{}),x=s.jsx(Nt,{}),e[5]=u,e[6]=h,e[7]=x):(u=e[5],h=e[6],x=e[7]);const y=m.map(qt);let C;e[8]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx("span",{className:"flex size-8 items-center justify-center rounded-lg border border-dashed border-border",children:s.jsx(nt,{size:16})}),e[8]=C):C=e[8];let b;e[9]!==o?(b=o("settings.ownAccounts.addApiKey"),e[9]=o,e[10]=b):b=e[10];let j;e[11]!==i||e[12]!==b?(j=s.jsxs("button",{type:"button",onClick:i,className:"flex w-full items-center gap-3 px-4 py-3 text-sm text-muted-foreground hover:bg-accent hover:text-foreground",children:[C,b]}),e[11]=i,e[12]=b,e[13]=j):j=e[13];let v;e[14]!==d||e[15]!==j||e[16]!==u||e[17]!==h||e[18]!==x||e[19]!==y?(v=s.jsxs(d,{children:[u,h,x,y,j]}),e[14]=d,e[15]=j,e[16]=u,e[17]=h,e[18]=x,e[19]=y,e[20]=v):v=e[20];let S;e[21]!==n||e[22]!==v||e[23]!==a?(S=s.jsx(n,{title:a,children:v}),e[21]=n,e[22]=v,e[23]=a,e[24]=S):S=e[24];let P;return e[25]!==S||e[26]!==p||e[27]!==g?(P=s.jsx("div",{id:p,ref:g,children:S}),e[25]=S,e[26]=p,e[27]=g,e[28]=P):P=e[28],P}function qt(t){const{key:e,provider:i}=t;return s.jsx(Ot,{providerKey:e,provider:i},e.id)}function Ft(t){return t.location.hash===we}export{we as O,es as a,Zt as g,xt as u};
@@ -1,4 +1,4 @@
1
- import{c as $,r as z,j as l,g5 as be,b as U,au as De,m as K,aY as gt,g8 as Ve,aH as Oe,aI as Ne,bk as ns,a6 as me,q as xt,L as lt,K as pe,g9 as ot,am as as,e as ls,t as Be,i as ht,aj as os,R as rs,h as is,B as ye,b6 as bt,ai as cs,ga as us,gb as yt,a9 as ds,F as fs,C as Je,d as Qe,dL as ms,gc as rt,et as ps,gd as gs}from"./index-DokE5sNF.js";import{e as xs,A as Xe,ax as hs,a7 as bs,a as it,ay as ys,k as js,Y as vs,az as ks,aA as jt,aB as Ss,a6 as Ue,aC as Ns,aD as vt,aE as de,aF as we,g as ws,b as _s,aw as Ts,aG as Cs}from"./agent-icon-DA-Fg7pF.js";import{t as Ie,e as Is,b as $s}from"./Tool01-DSm8VUO0.js";import{i as kt}from"./ArrowRight-Du-vqw_x.js";import{b as Ms,C as As,a as Ps}from"./collapsible-BQXIF7yl.js";import{u as Ls}from"./use-copy-Bh0jH9rH.js";import{h as St,i as Es,j as $e,k as Rs,P as zs,a as Fs,l as Ds,F as Os,s as Bs,E as Us,n as Hs}from"./usage-stats-BHc1sfxR.js";import{h as Nt}from"./UserCheck01-DoVM7Q3H.js";import{t as qs}from"./task-key-DZxJr9g6.js";import{a as Ks}from"./use-task-board-items-TENQt5cS.js";import{l as Gs}from"./config-B-dLgcud.js";import{t as Ws}from"./task-route-Cqr8SKPq.js";import{a as Vs}from"./repository-binding-CBLNaLcn.js";import{u as Me,t as Js,g as ge}from"./utils-CVEq3hMx.js";import{i as Qs}from"./TrendUp01-Cb0Ss3qG.js";import{l as Xs,c as Ys,r as Zs,m as en}from"./thread-intent-GDKuN4r8.js";import{f as je,y as tn,u as ve,z as sn,b as nn,B as wt,E as an,F as Ae,G as ln,H as on}from"./chat-context-Bo7uj7QO.js";import{a as Ye,u as rn,b as cn}from"./shell-layout-4H95PNNw.js";import{c as un}from"./content-blocks-o63cs2vh.js";import{M as dn}from"./mcp-app-renderer-BS-4Ud35.js";import{g as _t}from"./types-DF2iMJoX.js";import{o as fn}from"./omit-server-managed-metadata-L5IhjRZB.js";import{T as Tt,a as Ct,c as It}from"./tooltip-CqEoC-F2.js";import{c as mn,u as pn,a as gn}from"./use-mcp-client-DVaNUeKZ.js";import{s as $t,g as Mt,a as At}from"./gateway-client-BWWNWG13.js";import{i as Pt}from"./AlertCircle-D_6mZhd3.js";import{s as xn}from"./Eye-C1-H4NKN.js";import{s as hn}from"./XClose-lVRJTaql.js";import{n as He}from"./BookOpen01-gL1m_4-g.js";import{s as bn}from"./File02-CFyU1pAb.js";import{i as yn}from"./SearchMd-BIZLsFUb.js";import{a as Ze}from"./use-panel-navigate-DYNTPDzL.js";import{a as _e}from"./Image01-D1EDWKnx.js";import{b as Lt}from"./use-entitlements-B_976V5P.js";import{I as jn,M as Et}from"./markdown-CDaD-85D.js";import{c as vn,S as kn,a as Sn,b as Nn}from"./sheet-DUgkYIwI.js";import{I as ke}from"./integration-icon-CimWL0HB.js";import{u as Rt}from"./use-connection-BJP9eCiw.js";import{u as zt}from"./use-navigate-to-agent-O2aekGtL.js";import{s as wn}from"./UserSquare-CeU_BqyG.js";import{g as _n}from"./use-mcp-prompts-mR07NyXv.js";import{t as Tn}from"./ChevronDown-DeUpalBN.js";import{i as Cn}from"./Monitor01-Cj8V3TAw.js";import{a as In}from"./use-thread-outputs-he6CbGJb.js";import{F as $n}from"./file-type-icon-CfPI0k5H.js";const Ft=[{delay:0},{delay:100},{delay:200},{delay:100},{delay:200},{delay:200},{delay:300},{delay:300},{delay:400}];function Mn(){const s=$.c(5),[e]=z.useState(An);let t;s[0]===Symbol.for("react.memo_cache_sentinel")?(t={gridTemplateColumns:"repeat(3, 3px)",gap:"1.5px",width:"fit-content"},s[0]=t):t=s[0];let n;s[1]!==e?(n=Ft.map((o,c)=>{const{delay:i}=o;return l.jsx("div",{className:"rounded-[1px]",style:{width:3,height:3,"--cell-color":e[c],animation:"grid-ripple 1s ease infinite",animationDelay:`${i}ms`}},c)}),s[1]=e,s[2]=n):n=s[2];let a;return s[3]!==n?(a=l.jsx("div",{className:"grid",style:t,children:n}),s[3]=n,s[4]=a):a=s[4],a}function An(){const s=`var(--chart-${Math.ceil(Math.random()*5)})`;return Ft.map(()=>Math.random()<.6?"color-mix(in srgb, var(--muted-foreground) 25%, transparent)":s)}const Pn={damping:.7,stiffness:.05,mass:1.25},Ln=70,En=1e3/60,Rn=350;let Pe=!1;globalThis.document?.addEventListener("mousedown",()=>{Pe=!0});globalThis.document?.addEventListener("mouseup",()=>{Pe=!1});globalThis.document?.addEventListener("click",()=>{Pe=!1});const zn=(s={})=>{const[e,t]=z.useState(!1),[n,a]=z.useState(s.initial!==!1),[o,c]=z.useState(!1),i=z.useRef(null);i.current=s;const u=z.useCallback(()=>{if(!Pe)return!1;const b=window.getSelection();if(!b||!b.rangeCount)return!1;const N=b.getRangeAt(0);return N.commonAncestorContainer.contains(h.current)||h.current?.contains(N.commonAncestorContainer)},[]),r=z.useCallback(b=>{d.isAtBottom=b,a(b)},[]),m=z.useCallback(b=>{d.escapedFromLock=b,t(b)},[]),d=z.useMemo(()=>{let b;return{escapedFromLock:e,isAtBottom:n,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return h.current?.scrollTop??0},set scrollTop(N){if(h.current){const{scrollBehavior:j}=getComputedStyle(h.current);j!=="auto"&&(h.current.style.scrollBehavior="auto"),h.current.scrollTop=N,d.ignoreScrollToTop=h.current.scrollTop,j!=="auto"&&(h.current.style.scrollBehavior=j)}},get targetScrollTop(){return!h.current||!y.current?0:h.current.scrollHeight-1-h.current.clientHeight},get calculatedTargetScrollTop(){if(!h.current||!y.current)return 0;const{targetScrollTop:N}=this;if(!s.targetScrollTop)return N;if(b?.targetScrollTop===N)return b.calculatedScrollTop;const j=Math.max(Math.min(s.targetScrollTop(N,{scrollElement:h.current,contentElement:y.current}),N),0);return b={targetScrollTop:N,calculatedScrollTop:j},requestAnimationFrame(()=>{b=void 0}),j},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=Ln}}},[]),f=z.useCallback((b={})=>{typeof b=="string"&&(b={animation:b}),b.preserveScrollPosition||r(!0);const N=Date.now()+(Number(b.wait)||0),j=Re(i.current,b.animation),{ignoreEscapes:w=!1}=b;let S,k=d.calculatedTargetScrollTop;b.duration instanceof Promise?b.duration.finally(()=>{S=Date.now()}):S=N+(b.duration??0);const v=async()=>{const _=new Promise(requestAnimationFrame).then(()=>{if(!d.isAtBottom)return d.animation=void 0,!1;const{scrollTop:T}=d,M=performance.now(),P=(M-(d.lastTick??M))/En;if(d.animation||(d.animation={behavior:j,promise:_,ignoreEscapes:w}),d.animation.behavior===j&&(d.lastTick=M),u()||N>Date.now())return v();if(T<Math.min(k,d.calculatedTargetScrollTop)){if(d.animation?.behavior===j){if(j==="instant")return d.scrollTop=d.calculatedTargetScrollTop,v();d.velocity=(j.damping*d.velocity+j.stiffness*d.scrollDifference)/j.mass,d.accumulated+=d.velocity*P,d.scrollTop+=d.accumulated,d.scrollTop!==T&&(d.accumulated=0)}return v()}return S>Date.now()?(k=d.calculatedTargetScrollTop,v()):(d.animation=void 0,d.scrollTop<d.calculatedTargetScrollTop?f({animation:Re(i.current,i.current.resize),ignoreEscapes:w,duration:Math.max(0,S-Date.now())||void 0}):d.isAtBottom)});return _.then(T=>(requestAnimationFrame(()=>{d.animation||(d.lastTick=void 0,d.velocity=0)}),T))};return b.wait!==!0&&(d.animation=void 0),d.animation?.behavior===j?d.animation.promise:v()},[r,u,d]),p=z.useCallback(()=>{m(!0),r(!1)},[m,r]),g=z.useCallback(({target:b})=>{if(b!==h.current)return;const{scrollTop:N,ignoreScrollToTop:j}=d;let{lastScrollTop:w=N}=d;d.lastScrollTop=N,d.ignoreScrollToTop=void 0,j&&j>N&&(w=j),c(d.isNearBottom),setTimeout(()=>{if(d.resizeDifference||N===j)return;if(u()){m(!0),r(!1);return}const S=N>w,k=N<w;if(d.animation?.ignoreEscapes){d.scrollTop=w;return}k&&(m(!0),r(!1)),S&&m(!1),!d.escapedFromLock&&d.isNearBottom&&r(!0)},1)},[m,r,u,d]),x=z.useCallback(({target:b,deltaY:N})=>{let j=b;for(;!["scroll","auto"].includes(getComputedStyle(j).overflow);){if(!j.parentElement)return;j=j.parentElement}j===h.current&&N<0&&h.current.scrollHeight>h.current.clientHeight&&!d.animation?.ignoreEscapes&&(m(!0),r(!1))},[m,r,d]),h=ct(b=>{h.current?.removeEventListener("scroll",g),h.current?.removeEventListener("wheel",x),b?.addEventListener("scroll",g,{passive:!0}),b?.addEventListener("wheel",x,{passive:!0})},[]),y=ct(b=>{if(d.resizeObserver?.disconnect(),d.resizeObserver=void 0,!b)return;let N;d.resizeObserver=new ResizeObserver(([j])=>{const{height:w}=j.contentRect,S=w-(N??w);if(d.resizeDifference=S,d.scrollTop>d.targetScrollTop&&(d.scrollTop=d.targetScrollTop),c(d.isNearBottom),S>=0){const k=Re(i.current,N?i.current.resize:i.current.initial);f({animation:k,wait:!0,preserveScrollPosition:!0,duration:k==="instant"?void 0:Rn})}else d.isNearBottom&&(m(!1),r(!0));N=w,requestAnimationFrame(()=>{setTimeout(()=>{d.resizeDifference===S&&(d.resizeDifference=0)},1)})}),d.resizeObserver?.observe(b)},[]);return{contentRef:y,scrollRef:h,scrollToBottom:f,stopScroll:p,isAtBottom:n||o,isNearBottom:o,escapedFromLock:e,state:d}};function ct(s,e){const t=z.useCallback(n=>(t.current=n,s(n)),e);return t}const Ee=new Map;function Re(...s){const e={...Pn};let t=!1;for(const a of s){if(a==="instant"){t=!0;continue}typeof a=="object"&&(t=!1,e.damping=a.damping??e.damping,e.stiffness=a.stiffness??e.stiffness,e.mass=a.mass??e.mass)}const n=JSON.stringify(e);return Ee.has(n)||Ee.set(n,Object.freeze(e)),t?"instant":Ee.get(n)}function Y({icon:s,title:e,usage:t,summary:n,state:a,detail:o,detailVariant:c="code",forceOpen:i,variant:u="default",trailing:r,iconDestructive:m,alwaysChevron:d,defaultOpen:f,children:p}){const g=U(),[x,h]=z.useState(f??!1),{handleCopy:y,copied:b}=Ls(),N=a==="loading",j=a==="error",w=!!(o&&o.trim()),S=w||!!p,k=u==="subtask",v=(i??!1)||x,_=zn({initial:N?"instant":!1}),T=l.jsxs(Ms,{open:v,onOpenChange:i?void 0:h,className:"min-w-0",children:[l.jsxs(As,{disabled:!S,className:K("group/tool flex items-center gap-2 w-full py-1.5 text-left transition-colors",!S&&"cursor-default"),"aria-disabled":!S,children:[l.jsx("div",{className:"relative shrink-0 size-4 flex items-center justify-center",children:d?l.jsx(De,{className:K("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",v&&"rotate-90")}):l.jsxs(l.Fragment,{children:[l.jsx("div",{className:K("absolute inset-0 flex items-center justify-center [&>svg]:size-4 transition-opacity duration-150",m?"[&>svg]:text-destructive/70":j?"[&>svg]:text-warning/70":"[&>svg]:text-muted-foreground/75",S&&(v?"opacity-0":"[@media(hover:hover)]:group-hover/tool:opacity-0")),children:s}),S&&l.jsx("div",{className:K("absolute inset-0 flex items-center justify-center transition-opacity duration-150",v?"opacity-100":"opacity-0 [@media(hover:hover)]:group-hover/tool:opacity-100"),children:l.jsx(De,{className:K("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",v&&"rotate-90")})})]})}),l.jsx("span",{className:K("shrink-0 text-sm font-normal transition-colors",j?"text-warning/80":v?"text-foreground":"text-muted-foreground [@media(hover:hover)]:group-hover/tool:text-foreground",N&&"shimmer"),children:e}),n&&!(v&&w)?l.jsx("span",{className:K("min-w-0 flex-1 truncate text-sm text-muted-foreground/60",N&&"shimmer"),children:n}):l.jsx("div",{className:"flex-1"}),r&&l.jsx("div",{className:"shrink-0 flex items-center gap-1 [&_svg]:size-3.5 [&_svg]:text-muted-foreground/50",children:r}),l.jsx(St,{usage:t})]}),S&&l.jsx(Ps,{className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden",children:p||(c==="prose"?l.jsx("div",{className:"ml-[7px] mb-1 border-l border-border pl-[17px]",children:l.jsx("div",{ref:_.scrollRef,className:"max-h-60 overflow-y-auto",children:l.jsx("p",{ref:_.contentRef,className:"text-sm text-muted-foreground whitespace-pre-wrap leading-relaxed wrap-break-word",children:o})})}):l.jsx("div",{className:"ml-[20px] pl-3 border-l border-border/30 mt-0.5 pb-1",children:l.jsx("div",{ref:_.scrollRef,className:"flex flex-col max-h-48 overflow-y-auto",children:l.jsxs("div",{ref:_.contentRef,className:"flex items-start justify-between gap-2",children:[l.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:l.jsx("pre",{className:"text-xs font-mono text-muted-foreground/70 whitespace-pre-wrap wrap-break-word",children:o})}),l.jsx("button",{type:"button",onClick:()=>y(o),className:"shrink-0 p-1.5 rounded-lg text-muted-foreground/50 [@media(hover:hover)]:hover:text-foreground [@media(hover:hover)]:hover:bg-accent transition-colors active:scale-[0.97]","aria-label":g("common.copy"),children:b?l.jsx(gt,{className:"size-3.5"}):l.jsx(xs,{className:"size-3.5"})})]})})}))})]});return k?l.jsx("div",{className:"pl-4 border-l border-border/40 ml-1.5",children:T}):T}function fe(s){const e=$.c(4),{latency:t}=s;if(t==null||t<=0)return null;let n;e[0]!==t?(n=be(t),e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=l.jsx("span",{className:"text-2xs font-mono tabular-nums text-muted-foreground",children:n}),e[2]=n,e[3]=a):a=e[3],a}const Dt=4;function Ot(s){const e=$.c(8),{count:t,noun:n,onClick:a}=s,o=U();let c;e[0]!==t||e[1]!==n||e[2]!==o?(c=o("common.seeAll",{count:t,noun:n}),e[0]=t,e[1]=n,e[2]=o,e[3]=c):c=e[3];let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsx(kt,{className:"size-4 transition-transform group-hover:translate-x-0.5","aria-hidden":"true"}),e[4]=i):i=e[4];let u;return e[5]!==a||e[6]!==c?(u=l.jsxs("button",{type:"button",onClick:a,className:"group flex w-full items-center justify-center gap-1.5 rounded-lg border border-border bg-card px-3 py-2.5 text-sm text-muted-foreground transition-colors hover:bg-accent hover:text-foreground cursor-pointer",children:[c,i]}),e[5]=a,e[6]=c,e[7]=u):u=e[7],u}function et(s){const e=$.c(12),{message:t,className:n}=s,a=t.created_at??t.metadata?.created_at??null;let o,c,i,u;if(e[0]!==n||e[1]!==a){u=Symbol.for("react.early_return_sentinel");e:{const m=Ve(a);if(m===null){u=null;break e}const d=new Date(m);o=d.toLocaleString(),e[6]!==n?(c=K("text-sm text-muted-foreground select-none",n),e[6]=n,e[7]=c):c=e[7],i=d.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}e[0]=n,e[1]=a,e[2]=o,e[3]=c,e[4]=i,e[5]=u}else o=e[2],c=e[3],i=e[4],u=e[5];if(u!==Symbol.for("react.early_return_sentinel"))return u;let r;return e[8]!==o||e[9]!==c||e[10]!==i?(r=l.jsx("span",{title:o,className:c,children:i}),e[8]=o,e[9]=c,e[10]=i,e[11]=r):r=e[11],r}const Fn=Oe({item:Oe({id:Ne(),title:Ne(),status:Ne(),keySeq:ns().nullable(),virtualMcpId:Ne().nullable()})});function Dn(s){if(s.state!=="output-available")return null;const e=Fn.safeParse(Me(s.output)??s.output);return e.success?e.data.item:null}function On(s){const e=$.c(17),{task:t}=s,n=U(),{org:a,locator:o}=me(),c=xt(),{items:i}=Ks();let u;e[0]!==t?(u=M=>M.id===t.id,e[0]=t,e[1]=u):u=e[1];const r=i.find(u),m=r??t,d=()=>{r||c.invalidateQueries({queryKey:pe.taskBoardItems(o)})},f=Vs(m.virtualMcpId),p=Gs(m.status,n),g=p.visual.icon,x=qs(a.slug,m.keySeq),h=Ws(a.slug,m);let y;e[2]!==f?(y=f?l.jsx(Xe,{icon:f.icon??null,name:f.title,size:"sm"}):l.jsx("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground",children:l.jsx(Nt,{size:16})}),e[2]=f,e[3]=y):y=e[3];const b="mt-0.5 flex min-w-0 items-center gap-1.5 text-xs text-muted-foreground",N=K("size-3.5 shrink-0",p.visual.iconClassName);let j;e[4]!==g||e[5]!==N?(j=l.jsx(g,{className:N,"aria-hidden":!0}),e[4]=g,e[5]=N,e[6]=j):j=e[6];let w;e[7]!==p.label?(w=l.jsx("span",{className:"shrink-0",children:p.label}),e[7]=p.label,e[8]=w):w=e[8];const S=f?.title;let k;e[9]!==x||e[10]!==S?(k=[x,S].filter(Boolean).map(Bn),e[9]=x,e[10]=S,e[11]=k):k=e[11];let v;e[12]!==j||e[13]!==w||e[14]!==k?(v=l.jsxs("span",{className:b,children:[j,w,k]}),e[12]=j,e[13]=w,e[14]=k,e[15]=v):v=e[15];let _;e[16]===Symbol.for("react.memo_cache_sentinel")?(_=l.jsx(De,{size:16,"aria-hidden":!0,className:"shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5 group-hover:text-foreground"}),e[16]=_):_=e[16];const T=l.jsxs(l.Fragment,{children:[y,l.jsxs("span",{className:"min-w-0 flex-1",children:[l.jsx("span",{className:"block truncate text-sm font-medium text-foreground",children:m.title}),v]}),_]});return m.virtualMcpId?l.jsx(lt,{to:"/$org/projects/$agentId/tasks/{-$taskKey}",params:{org:a.slug,agentId:m.virtualMcpId,taskKey:h},className:"group my-2 flex items-center gap-3 rounded-xl border border-border bg-card px-3 py-2.5 shadow-xs transition-colors hover:bg-accent/50 focus-ring",onClick:d,children:T}):l.jsx(lt,{to:"/$org/tasks/{-$taskKey}",params:{org:a.slug,taskKey:h},className:"group my-2 flex items-center gap-3 rounded-xl border border-border bg-card px-3 py-2.5 shadow-xs transition-colors hover:bg-accent/50 focus-ring",onClick:d,children:T})}function Bn(s){return l.jsx("span",{className:"truncate before:mr-1.5 before:content-['·']",children:s},s)}function qe(s){const e=$.c(9),{since:t}=s;let n;e[0]!==t?(n=()=>ot(t,Date.now()),e[0]=t,e[1]=n):n=e[1];const[a,o]=z.useState(n);let c,i;e[2]!==t?(c=()=>{const d=setInterval(()=>o(ot(t,Date.now())),100);return()=>clearInterval(d)},i=[t],e[2]=t,e[3]=c,e[4]=i):(c=e[3],i=e[4]),z.useEffect(c,i);const u=a/1e3;let r;e[5]!==u?(r=be(u),e[5]=u,e[6]=r):r=e[6];let m;return e[7]!==r?(m=l.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground/50",children:r}),e[7]=r,e[8]=m):m=e[8],m}function Un(s){return{planning:{icon:l.jsx(Qs,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.planningLabel"),detail:s("chat.thinkingIndicator.planningDetail")},thinking:{icon:l.jsx(Ie,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.thinkingLabel"),detail:s("chat.thinkingIndicator.thinkingDetail")}}}const Hn=1200;function Ke(s){const e=$.c(8),{icon:t,title:n,summary:a,detail:o,state:c,detailVariant:i,trailing:u}=s,r=i===void 0?"prose":i;let m;return e[0]!==o||e[1]!==r||e[2]!==t||e[3]!==c||e[4]!==a||e[5]!==n||e[6]!==u?(m=l.jsx(Y,{icon:t,title:n,summary:a,detail:o,state:c,detailVariant:r,trailing:u}),e[0]=o,e[1]=r,e[2]=t,e[3]=c,e[4]=a,e[5]=n,e[6]=u,e[7]=m):m=e[7],m}function qn(s){const e=$.c(22),{startedAt:t}=s,n=U(),a=je()?.runStatusStage??null,[o,c]=z.useState("planning");let i,u;if(e[0]!==a?(i=()=>{if(a!==null)return;const x=setTimeout(()=>{c("thinking")},Hn);return()=>{clearTimeout(x)}},u=[a],e[0]=a,e[1]=i,e[2]=u):(i=e[1],u=e[2]),z.useEffect(i,u),a!==null){let x;e[3]!==a||e[4]!==n?(x=Xs(n,a),e[3]=a,e[4]=n,e[5]=x):x=e[5];const h=x;let y;e[6]===Symbol.for("react.memo_cache_sentinel")?(y=l.jsx(Ie,{className:"size-4"}),e[6]=y):y=e[6];const b=`${h.label}...`;let N;e[7]!==t?(N=t!==null&&l.jsx(qe,{since:t}),e[7]=t,e[8]=N):N=e[8];let j;return e[9]!==h.detail||e[10]!==b||e[11]!==N?(j=l.jsx(Ke,{icon:y,title:b,summary:h.detail,state:"loading",trailing:N}),e[9]=h.detail,e[10]=b,e[11]=N,e[12]=j):j=e[12],j}let r;e[13]!==n?(r=Un(n),e[13]=n,e[14]=r):r=e[14];const d=r[o],f=`${d.label}...`;let p;e[15]!==t?(p=t!==null&&l.jsx(qe,{since:t}),e[15]=t,e[16]=p):p=e[16];let g;return e[17]!==d.detail||e[18]!==d.icon||e[19]!==f||e[20]!==p?(g=l.jsx(Ke,{icon:d.icon,title:f,summary:d.detail,state:"loading",trailing:p}),e[17]=d.detail,e[18]=d.icon,e[19]=f,e[20]=p,e[21]=g):g=e[21],g}function Kn(s){const e=$.c(3),{startedAt:t}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=l.jsx(Mn,{}),e[0]=n):n=e[0];let a;return e[1]!==t?(a=l.jsxs("div",{className:"flex items-center gap-2.5 mt-1 pb-1 text-muted-foreground/40 select-none",children:[n,l.jsx(qe,{since:t})]}),e[1]=t,e[2]=a):a=e[2],a}const Gn=2e4;function Wn(s){const e=$.c(9),{startedAt:t}=s,n=U(),a=Ye(1e3),o=je(),i=(t!==null?a-t:0)>=Gn;let u;e[0]!==t?(u=l.jsx(qn,{startedAt:t}),e[0]=t,e[1]=u):u=e[1];let r;e[2]!==i||e[3]!==o||e[4]!==n?(r=i&&o?.stop&&l.jsxs("div",{className:"flex items-center gap-2 pb-1 text-sm text-muted-foreground/60",children:[l.jsx("span",{children:n("chat.thinkingIndicator.takingLonger")}),l.jsx("button",{type:"button",onClick:()=>o.stop(),className:"text-muted-foreground hover:text-foreground underline underline-offset-2",children:n("chat.thinkingIndicator.cancel")})]}),e[2]=i,e[3]=o,e[4]=n,e[5]=r):r=e[5];let m;return e[6]!==u||e[7]!==r?(m=l.jsxs("div",{className:"flex flex-col gap-0.5",children:[u,r]}),e[6]=u,e[7]=r,e[8]=m):m=e[8],m}function Vn(s){const e=$.c(24),{duration:t,parts:n,isStreaming:a}=s,o=U();let c;e[0]!==n?(c=n.every(Xn),e[0]=n,e[1]=c):c=e[1];const i=c;let u;e[2]!==t||e[3]!==o?(u=t&&t/1e3>1?o("chat.thinkingIndicator.thoughtFor",{duration:be(t/1e3)}):o("chat.thinkingIndicator.thought"),e[2]=t,e[3]=o,e[4]=u):u=e[4];const r=u;let m;if(e[5]!==i||e[6]!==a||e[7]!==n){const N=n.map(Qn).join(`
1
+ import{c as $,r as z,j as l,g5 as be,b as U,au as De,m as K,aY as gt,g8 as Ve,aH as Oe,aI as Ne,bk as ns,a6 as me,q as xt,L as lt,K as pe,g9 as ot,am as as,e as ls,t as Be,i as ht,aj as os,R as rs,h as is,B as ye,b6 as bt,ai as cs,ga as us,gb as yt,a9 as ds,F as fs,C as Je,d as Qe,dL as ms,gc as rt,et as ps,gd as gs}from"./index-_VeebRNE.js";import{e as xs,A as Xe,ax as hs,a7 as bs,a as it,ay as ys,k as js,Y as vs,az as ks,aA as jt,aB as Ss,a6 as Ue,aC as Ns,aD as vt,aE as de,aF as we,g as ws,b as _s,aw as Ts,aG as Cs}from"./agent-icon-CfdcYUE7.js";import{t as Ie,e as Is,b as $s}from"./Tool01-D6InpKaj.js";import{i as kt}from"./ArrowRight-BF8V67fk.js";import{b as Ms,C as As,a as Ps}from"./collapsible-BJX4Hk9k.js";import{u as Ls}from"./use-copy-DKfw8n-3.js";import{h as St,i as Es,j as $e,k as Rs,P as zs,a as Fs,l as Ds,F as Os,s as Bs,E as Us,n as Hs}from"./usage-stats-CCyq9Zgo.js";import{h as Nt}from"./UserCheck01-Dqn7toBe.js";import{t as qs}from"./task-key-B6H-3XJr.js";import{a as Ks}from"./use-task-board-items-DxcJSuMX.js";import{l as Gs}from"./config-iR6MS3mx.js";import{t as Ws}from"./task-route-CBxVmSL7.js";import{a as Vs}from"./repository-binding-Ct6tvS6k.js";import{u as Me,t as Js,g as ge}from"./utils-CVEq3hMx.js";import{i as Qs}from"./TrendUp01-C_SySyBC.js";import{l as Xs,c as Ys,r as Zs,m as en}from"./thread-intent-pC76uPwU.js";import{f as je,y as tn,u as ve,z as sn,b as nn,B as wt,E as an,F as Ae,G as ln,H as on}from"./chat-context-DSu9o-d-.js";import{a as Ye,u as rn,b as cn}from"./shell-layout-D8UbY9n5.js";import{c as un}from"./content-blocks-o63cs2vh.js";import{M as dn}from"./mcp-app-renderer-DtOO8I9w.js";import{g as _t}from"./types-CdP485rd.js";import{o as fn}from"./omit-server-managed-metadata-L5IhjRZB.js";import{T as Tt,a as Ct,c as It}from"./tooltip-BYnWhoO-.js";import{c as mn,u as pn,a as gn}from"./use-mcp-client-UP8_tZ9p.js";import{s as $t,g as Mt,a as At}from"./gateway-client-DDICMs0d.js";import{i as Pt}from"./AlertCircle-gyZP8TIO.js";import{s as xn}from"./Eye-BLpLvSpN.js";import{s as hn}from"./XClose-C9ONGfkv.js";import{n as He}from"./BookOpen01-CpYcxx0H.js";import{s as bn}from"./File02-EV4Uhu5z.js";import{i as yn}from"./SearchMd-Cuy8VOOG.js";import{a as Ze}from"./use-panel-navigate-D4GuHOu1.js";import{a as _e}from"./Image01-BqCHFUEp.js";import{b as Lt}from"./use-entitlements-B6kax2f9.js";import{I as jn,M as Et}from"./markdown-CBoNEgkf.js";import{c as vn,S as kn,a as Sn,b as Nn}from"./sheet-8iInbf9D.js";import{I as ke}from"./integration-icon-D8pA0JHG.js";import{u as Rt}from"./use-connection-cSaq7_i7.js";import{u as zt}from"./use-navigate-to-agent-Dg2qYHJi.js";import{s as wn}from"./UserSquare-e0qIxN1Q.js";import{g as _n}from"./use-mcp-prompts-BM9uSers.js";import{t as Tn}from"./ChevronDown-DldgAfZA.js";import{i as Cn}from"./Monitor01-Df3mZyNU.js";import{a as In}from"./use-thread-outputs-BRvk_pZG.js";import{F as $n}from"./file-type-icon-C1PmpIi5.js";const Ft=[{delay:0},{delay:100},{delay:200},{delay:100},{delay:200},{delay:200},{delay:300},{delay:300},{delay:400}];function Mn(){const s=$.c(5),[e]=z.useState(An);let t;s[0]===Symbol.for("react.memo_cache_sentinel")?(t={gridTemplateColumns:"repeat(3, 3px)",gap:"1.5px",width:"fit-content"},s[0]=t):t=s[0];let n;s[1]!==e?(n=Ft.map((o,c)=>{const{delay:i}=o;return l.jsx("div",{className:"rounded-[1px]",style:{width:3,height:3,"--cell-color":e[c],animation:"grid-ripple 1s ease infinite",animationDelay:`${i}ms`}},c)}),s[1]=e,s[2]=n):n=s[2];let a;return s[3]!==n?(a=l.jsx("div",{className:"grid",style:t,children:n}),s[3]=n,s[4]=a):a=s[4],a}function An(){const s=`var(--chart-${Math.ceil(Math.random()*5)})`;return Ft.map(()=>Math.random()<.6?"color-mix(in srgb, var(--muted-foreground) 25%, transparent)":s)}const Pn={damping:.7,stiffness:.05,mass:1.25},Ln=70,En=1e3/60,Rn=350;let Pe=!1;globalThis.document?.addEventListener("mousedown",()=>{Pe=!0});globalThis.document?.addEventListener("mouseup",()=>{Pe=!1});globalThis.document?.addEventListener("click",()=>{Pe=!1});const zn=(s={})=>{const[e,t]=z.useState(!1),[n,a]=z.useState(s.initial!==!1),[o,c]=z.useState(!1),i=z.useRef(null);i.current=s;const u=z.useCallback(()=>{if(!Pe)return!1;const b=window.getSelection();if(!b||!b.rangeCount)return!1;const N=b.getRangeAt(0);return N.commonAncestorContainer.contains(h.current)||h.current?.contains(N.commonAncestorContainer)},[]),r=z.useCallback(b=>{d.isAtBottom=b,a(b)},[]),m=z.useCallback(b=>{d.escapedFromLock=b,t(b)},[]),d=z.useMemo(()=>{let b;return{escapedFromLock:e,isAtBottom:n,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return h.current?.scrollTop??0},set scrollTop(N){if(h.current){const{scrollBehavior:j}=getComputedStyle(h.current);j!=="auto"&&(h.current.style.scrollBehavior="auto"),h.current.scrollTop=N,d.ignoreScrollToTop=h.current.scrollTop,j!=="auto"&&(h.current.style.scrollBehavior=j)}},get targetScrollTop(){return!h.current||!y.current?0:h.current.scrollHeight-1-h.current.clientHeight},get calculatedTargetScrollTop(){if(!h.current||!y.current)return 0;const{targetScrollTop:N}=this;if(!s.targetScrollTop)return N;if(b?.targetScrollTop===N)return b.calculatedScrollTop;const j=Math.max(Math.min(s.targetScrollTop(N,{scrollElement:h.current,contentElement:y.current}),N),0);return b={targetScrollTop:N,calculatedScrollTop:j},requestAnimationFrame(()=>{b=void 0}),j},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=Ln}}},[]),f=z.useCallback((b={})=>{typeof b=="string"&&(b={animation:b}),b.preserveScrollPosition||r(!0);const N=Date.now()+(Number(b.wait)||0),j=Re(i.current,b.animation),{ignoreEscapes:w=!1}=b;let S,k=d.calculatedTargetScrollTop;b.duration instanceof Promise?b.duration.finally(()=>{S=Date.now()}):S=N+(b.duration??0);const v=async()=>{const _=new Promise(requestAnimationFrame).then(()=>{if(!d.isAtBottom)return d.animation=void 0,!1;const{scrollTop:T}=d,M=performance.now(),P=(M-(d.lastTick??M))/En;if(d.animation||(d.animation={behavior:j,promise:_,ignoreEscapes:w}),d.animation.behavior===j&&(d.lastTick=M),u()||N>Date.now())return v();if(T<Math.min(k,d.calculatedTargetScrollTop)){if(d.animation?.behavior===j){if(j==="instant")return d.scrollTop=d.calculatedTargetScrollTop,v();d.velocity=(j.damping*d.velocity+j.stiffness*d.scrollDifference)/j.mass,d.accumulated+=d.velocity*P,d.scrollTop+=d.accumulated,d.scrollTop!==T&&(d.accumulated=0)}return v()}return S>Date.now()?(k=d.calculatedTargetScrollTop,v()):(d.animation=void 0,d.scrollTop<d.calculatedTargetScrollTop?f({animation:Re(i.current,i.current.resize),ignoreEscapes:w,duration:Math.max(0,S-Date.now())||void 0}):d.isAtBottom)});return _.then(T=>(requestAnimationFrame(()=>{d.animation||(d.lastTick=void 0,d.velocity=0)}),T))};return b.wait!==!0&&(d.animation=void 0),d.animation?.behavior===j?d.animation.promise:v()},[r,u,d]),p=z.useCallback(()=>{m(!0),r(!1)},[m,r]),g=z.useCallback(({target:b})=>{if(b!==h.current)return;const{scrollTop:N,ignoreScrollToTop:j}=d;let{lastScrollTop:w=N}=d;d.lastScrollTop=N,d.ignoreScrollToTop=void 0,j&&j>N&&(w=j),c(d.isNearBottom),setTimeout(()=>{if(d.resizeDifference||N===j)return;if(u()){m(!0),r(!1);return}const S=N>w,k=N<w;if(d.animation?.ignoreEscapes){d.scrollTop=w;return}k&&(m(!0),r(!1)),S&&m(!1),!d.escapedFromLock&&d.isNearBottom&&r(!0)},1)},[m,r,u,d]),x=z.useCallback(({target:b,deltaY:N})=>{let j=b;for(;!["scroll","auto"].includes(getComputedStyle(j).overflow);){if(!j.parentElement)return;j=j.parentElement}j===h.current&&N<0&&h.current.scrollHeight>h.current.clientHeight&&!d.animation?.ignoreEscapes&&(m(!0),r(!1))},[m,r,d]),h=ct(b=>{h.current?.removeEventListener("scroll",g),h.current?.removeEventListener("wheel",x),b?.addEventListener("scroll",g,{passive:!0}),b?.addEventListener("wheel",x,{passive:!0})},[]),y=ct(b=>{if(d.resizeObserver?.disconnect(),d.resizeObserver=void 0,!b)return;let N;d.resizeObserver=new ResizeObserver(([j])=>{const{height:w}=j.contentRect,S=w-(N??w);if(d.resizeDifference=S,d.scrollTop>d.targetScrollTop&&(d.scrollTop=d.targetScrollTop),c(d.isNearBottom),S>=0){const k=Re(i.current,N?i.current.resize:i.current.initial);f({animation:k,wait:!0,preserveScrollPosition:!0,duration:k==="instant"?void 0:Rn})}else d.isNearBottom&&(m(!1),r(!0));N=w,requestAnimationFrame(()=>{setTimeout(()=>{d.resizeDifference===S&&(d.resizeDifference=0)},1)})}),d.resizeObserver?.observe(b)},[]);return{contentRef:y,scrollRef:h,scrollToBottom:f,stopScroll:p,isAtBottom:n||o,isNearBottom:o,escapedFromLock:e,state:d}};function ct(s,e){const t=z.useCallback(n=>(t.current=n,s(n)),e);return t}const Ee=new Map;function Re(...s){const e={...Pn};let t=!1;for(const a of s){if(a==="instant"){t=!0;continue}typeof a=="object"&&(t=!1,e.damping=a.damping??e.damping,e.stiffness=a.stiffness??e.stiffness,e.mass=a.mass??e.mass)}const n=JSON.stringify(e);return Ee.has(n)||Ee.set(n,Object.freeze(e)),t?"instant":Ee.get(n)}function Y({icon:s,title:e,usage:t,summary:n,state:a,detail:o,detailVariant:c="code",forceOpen:i,variant:u="default",trailing:r,iconDestructive:m,alwaysChevron:d,defaultOpen:f,children:p}){const g=U(),[x,h]=z.useState(f??!1),{handleCopy:y,copied:b}=Ls(),N=a==="loading",j=a==="error",w=!!(o&&o.trim()),S=w||!!p,k=u==="subtask",v=(i??!1)||x,_=zn({initial:N?"instant":!1}),T=l.jsxs(Ms,{open:v,onOpenChange:i?void 0:h,className:"min-w-0",children:[l.jsxs(As,{disabled:!S,className:K("group/tool flex items-center gap-2 w-full py-1.5 text-left transition-colors",!S&&"cursor-default"),"aria-disabled":!S,children:[l.jsx("div",{className:"relative shrink-0 size-4 flex items-center justify-center",children:d?l.jsx(De,{className:K("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",v&&"rotate-90")}):l.jsxs(l.Fragment,{children:[l.jsx("div",{className:K("absolute inset-0 flex items-center justify-center [&>svg]:size-4 transition-opacity duration-150",m?"[&>svg]:text-destructive/70":j?"[&>svg]:text-warning/70":"[&>svg]:text-muted-foreground/75",S&&(v?"opacity-0":"[@media(hover:hover)]:group-hover/tool:opacity-0")),children:s}),S&&l.jsx("div",{className:K("absolute inset-0 flex items-center justify-center transition-opacity duration-150",v?"opacity-100":"opacity-0 [@media(hover:hover)]:group-hover/tool:opacity-100"),children:l.jsx(De,{className:K("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",v&&"rotate-90")})})]})}),l.jsx("span",{className:K("shrink-0 text-sm font-normal transition-colors",j?"text-warning/80":v?"text-foreground":"text-muted-foreground [@media(hover:hover)]:group-hover/tool:text-foreground",N&&"shimmer"),children:e}),n&&!(v&&w)?l.jsx("span",{className:K("min-w-0 flex-1 truncate text-sm text-muted-foreground/60",N&&"shimmer"),children:n}):l.jsx("div",{className:"flex-1"}),r&&l.jsx("div",{className:"shrink-0 flex items-center gap-1 [&_svg]:size-3.5 [&_svg]:text-muted-foreground/50",children:r}),l.jsx(St,{usage:t})]}),S&&l.jsx(Ps,{className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden",children:p||(c==="prose"?l.jsx("div",{className:"ml-[7px] mb-1 border-l border-border pl-[17px]",children:l.jsx("div",{ref:_.scrollRef,className:"max-h-60 overflow-y-auto",children:l.jsx("p",{ref:_.contentRef,className:"text-sm text-muted-foreground whitespace-pre-wrap leading-relaxed wrap-break-word",children:o})})}):l.jsx("div",{className:"ml-[20px] pl-3 border-l border-border/30 mt-0.5 pb-1",children:l.jsx("div",{ref:_.scrollRef,className:"flex flex-col max-h-48 overflow-y-auto",children:l.jsxs("div",{ref:_.contentRef,className:"flex items-start justify-between gap-2",children:[l.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:l.jsx("pre",{className:"text-xs font-mono text-muted-foreground/70 whitespace-pre-wrap wrap-break-word",children:o})}),l.jsx("button",{type:"button",onClick:()=>y(o),className:"shrink-0 p-1.5 rounded-lg text-muted-foreground/50 [@media(hover:hover)]:hover:text-foreground [@media(hover:hover)]:hover:bg-accent transition-colors active:scale-[0.97]","aria-label":g("common.copy"),children:b?l.jsx(gt,{className:"size-3.5"}):l.jsx(xs,{className:"size-3.5"})})]})})}))})]});return k?l.jsx("div",{className:"pl-4 border-l border-border/40 ml-1.5",children:T}):T}function fe(s){const e=$.c(4),{latency:t}=s;if(t==null||t<=0)return null;let n;e[0]!==t?(n=be(t),e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=l.jsx("span",{className:"text-2xs font-mono tabular-nums text-muted-foreground",children:n}),e[2]=n,e[3]=a):a=e[3],a}const Dt=4;function Ot(s){const e=$.c(8),{count:t,noun:n,onClick:a}=s,o=U();let c;e[0]!==t||e[1]!==n||e[2]!==o?(c=o("common.seeAll",{count:t,noun:n}),e[0]=t,e[1]=n,e[2]=o,e[3]=c):c=e[3];let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsx(kt,{className:"size-4 transition-transform group-hover:translate-x-0.5","aria-hidden":"true"}),e[4]=i):i=e[4];let u;return e[5]!==a||e[6]!==c?(u=l.jsxs("button",{type:"button",onClick:a,className:"group flex w-full items-center justify-center gap-1.5 rounded-lg border border-border bg-card px-3 py-2.5 text-sm text-muted-foreground transition-colors hover:bg-accent hover:text-foreground cursor-pointer",children:[c,i]}),e[5]=a,e[6]=c,e[7]=u):u=e[7],u}function et(s){const e=$.c(12),{message:t,className:n}=s,a=t.created_at??t.metadata?.created_at??null;let o,c,i,u;if(e[0]!==n||e[1]!==a){u=Symbol.for("react.early_return_sentinel");e:{const m=Ve(a);if(m===null){u=null;break e}const d=new Date(m);o=d.toLocaleString(),e[6]!==n?(c=K("text-sm text-muted-foreground select-none",n),e[6]=n,e[7]=c):c=e[7],i=d.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}e[0]=n,e[1]=a,e[2]=o,e[3]=c,e[4]=i,e[5]=u}else o=e[2],c=e[3],i=e[4],u=e[5];if(u!==Symbol.for("react.early_return_sentinel"))return u;let r;return e[8]!==o||e[9]!==c||e[10]!==i?(r=l.jsx("span",{title:o,className:c,children:i}),e[8]=o,e[9]=c,e[10]=i,e[11]=r):r=e[11],r}const Fn=Oe({item:Oe({id:Ne(),title:Ne(),status:Ne(),keySeq:ns().nullable(),virtualMcpId:Ne().nullable()})});function Dn(s){if(s.state!=="output-available")return null;const e=Fn.safeParse(Me(s.output)??s.output);return e.success?e.data.item:null}function On(s){const e=$.c(17),{task:t}=s,n=U(),{org:a,locator:o}=me(),c=xt(),{items:i}=Ks();let u;e[0]!==t?(u=M=>M.id===t.id,e[0]=t,e[1]=u):u=e[1];const r=i.find(u),m=r??t,d=()=>{r||c.invalidateQueries({queryKey:pe.taskBoardItems(o)})},f=Vs(m.virtualMcpId),p=Gs(m.status,n),g=p.visual.icon,x=qs(a.slug,m.keySeq),h=Ws(a.slug,m);let y;e[2]!==f?(y=f?l.jsx(Xe,{icon:f.icon??null,name:f.title,size:"sm"}):l.jsx("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground",children:l.jsx(Nt,{size:16})}),e[2]=f,e[3]=y):y=e[3];const b="mt-0.5 flex min-w-0 items-center gap-1.5 text-xs text-muted-foreground",N=K("size-3.5 shrink-0",p.visual.iconClassName);let j;e[4]!==g||e[5]!==N?(j=l.jsx(g,{className:N,"aria-hidden":!0}),e[4]=g,e[5]=N,e[6]=j):j=e[6];let w;e[7]!==p.label?(w=l.jsx("span",{className:"shrink-0",children:p.label}),e[7]=p.label,e[8]=w):w=e[8];const S=f?.title;let k;e[9]!==x||e[10]!==S?(k=[x,S].filter(Boolean).map(Bn),e[9]=x,e[10]=S,e[11]=k):k=e[11];let v;e[12]!==j||e[13]!==w||e[14]!==k?(v=l.jsxs("span",{className:b,children:[j,w,k]}),e[12]=j,e[13]=w,e[14]=k,e[15]=v):v=e[15];let _;e[16]===Symbol.for("react.memo_cache_sentinel")?(_=l.jsx(De,{size:16,"aria-hidden":!0,className:"shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5 group-hover:text-foreground"}),e[16]=_):_=e[16];const T=l.jsxs(l.Fragment,{children:[y,l.jsxs("span",{className:"min-w-0 flex-1",children:[l.jsx("span",{className:"block truncate text-sm font-medium text-foreground",children:m.title}),v]}),_]});return m.virtualMcpId?l.jsx(lt,{to:"/$org/projects/$agentId/tasks/{-$taskKey}",params:{org:a.slug,agentId:m.virtualMcpId,taskKey:h},className:"group my-2 flex items-center gap-3 rounded-xl border border-border bg-card px-3 py-2.5 shadow-xs transition-colors hover:bg-accent/50 focus-ring",onClick:d,children:T}):l.jsx(lt,{to:"/$org/tasks/{-$taskKey}",params:{org:a.slug,taskKey:h},className:"group my-2 flex items-center gap-3 rounded-xl border border-border bg-card px-3 py-2.5 shadow-xs transition-colors hover:bg-accent/50 focus-ring",onClick:d,children:T})}function Bn(s){return l.jsx("span",{className:"truncate before:mr-1.5 before:content-['·']",children:s},s)}function qe(s){const e=$.c(9),{since:t}=s;let n;e[0]!==t?(n=()=>ot(t,Date.now()),e[0]=t,e[1]=n):n=e[1];const[a,o]=z.useState(n);let c,i;e[2]!==t?(c=()=>{const d=setInterval(()=>o(ot(t,Date.now())),100);return()=>clearInterval(d)},i=[t],e[2]=t,e[3]=c,e[4]=i):(c=e[3],i=e[4]),z.useEffect(c,i);const u=a/1e3;let r;e[5]!==u?(r=be(u),e[5]=u,e[6]=r):r=e[6];let m;return e[7]!==r?(m=l.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground/50",children:r}),e[7]=r,e[8]=m):m=e[8],m}function Un(s){return{planning:{icon:l.jsx(Qs,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.planningLabel"),detail:s("chat.thinkingIndicator.planningDetail")},thinking:{icon:l.jsx(Ie,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.thinkingLabel"),detail:s("chat.thinkingIndicator.thinkingDetail")}}}const Hn=1200;function Ke(s){const e=$.c(8),{icon:t,title:n,summary:a,detail:o,state:c,detailVariant:i,trailing:u}=s,r=i===void 0?"prose":i;let m;return e[0]!==o||e[1]!==r||e[2]!==t||e[3]!==c||e[4]!==a||e[5]!==n||e[6]!==u?(m=l.jsx(Y,{icon:t,title:n,summary:a,detail:o,state:c,detailVariant:r,trailing:u}),e[0]=o,e[1]=r,e[2]=t,e[3]=c,e[4]=a,e[5]=n,e[6]=u,e[7]=m):m=e[7],m}function qn(s){const e=$.c(22),{startedAt:t}=s,n=U(),a=je()?.runStatusStage??null,[o,c]=z.useState("planning");let i,u;if(e[0]!==a?(i=()=>{if(a!==null)return;const x=setTimeout(()=>{c("thinking")},Hn);return()=>{clearTimeout(x)}},u=[a],e[0]=a,e[1]=i,e[2]=u):(i=e[1],u=e[2]),z.useEffect(i,u),a!==null){let x;e[3]!==a||e[4]!==n?(x=Xs(n,a),e[3]=a,e[4]=n,e[5]=x):x=e[5];const h=x;let y;e[6]===Symbol.for("react.memo_cache_sentinel")?(y=l.jsx(Ie,{className:"size-4"}),e[6]=y):y=e[6];const b=`${h.label}...`;let N;e[7]!==t?(N=t!==null&&l.jsx(qe,{since:t}),e[7]=t,e[8]=N):N=e[8];let j;return e[9]!==h.detail||e[10]!==b||e[11]!==N?(j=l.jsx(Ke,{icon:y,title:b,summary:h.detail,state:"loading",trailing:N}),e[9]=h.detail,e[10]=b,e[11]=N,e[12]=j):j=e[12],j}let r;e[13]!==n?(r=Un(n),e[13]=n,e[14]=r):r=e[14];const d=r[o],f=`${d.label}...`;let p;e[15]!==t?(p=t!==null&&l.jsx(qe,{since:t}),e[15]=t,e[16]=p):p=e[16];let g;return e[17]!==d.detail||e[18]!==d.icon||e[19]!==f||e[20]!==p?(g=l.jsx(Ke,{icon:d.icon,title:f,summary:d.detail,state:"loading",trailing:p}),e[17]=d.detail,e[18]=d.icon,e[19]=f,e[20]=p,e[21]=g):g=e[21],g}function Kn(s){const e=$.c(3),{startedAt:t}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=l.jsx(Mn,{}),e[0]=n):n=e[0];let a;return e[1]!==t?(a=l.jsxs("div",{className:"flex items-center gap-2.5 mt-1 pb-1 text-muted-foreground/40 select-none",children:[n,l.jsx(qe,{since:t})]}),e[1]=t,e[2]=a):a=e[2],a}const Gn=2e4;function Wn(s){const e=$.c(9),{startedAt:t}=s,n=U(),a=Ye(1e3),o=je(),i=(t!==null?a-t:0)>=Gn;let u;e[0]!==t?(u=l.jsx(qn,{startedAt:t}),e[0]=t,e[1]=u):u=e[1];let r;e[2]!==i||e[3]!==o||e[4]!==n?(r=i&&o?.stop&&l.jsxs("div",{className:"flex items-center gap-2 pb-1 text-sm text-muted-foreground/60",children:[l.jsx("span",{children:n("chat.thinkingIndicator.takingLonger")}),l.jsx("button",{type:"button",onClick:()=>o.stop(),className:"text-muted-foreground hover:text-foreground underline underline-offset-2",children:n("chat.thinkingIndicator.cancel")})]}),e[2]=i,e[3]=o,e[4]=n,e[5]=r):r=e[5];let m;return e[6]!==u||e[7]!==r?(m=l.jsxs("div",{className:"flex flex-col gap-0.5",children:[u,r]}),e[6]=u,e[7]=r,e[8]=m):m=e[8],m}function Vn(s){const e=$.c(24),{duration:t,parts:n,isStreaming:a}=s,o=U();let c;e[0]!==n?(c=n.every(Xn),e[0]=n,e[1]=c):c=e[1];const i=c;let u;e[2]!==t||e[3]!==o?(u=t&&t/1e3>1?o("chat.thinkingIndicator.thoughtFor",{duration:be(t/1e3)}):o("chat.thinkingIndicator.thought"),e[2]=t,e[3]=o,e[4]=u):u=e[4];const r=u;let m;if(e[5]!==i||e[6]!==a||e[7]!==n){const N=n.map(Qn).join(`
2
2
  `).trim().split(`
3
3
  `).filter(Boolean),j=a?N[N.length-1]??"":N[0]??"";m=!i&&j?j.length>100?j.slice(0,100)+"…":j:void 0,e[5]=i,e[6]=a,e[7]=n,e[8]=m}else m=e[8];const d=m;let f;if(e[9]!==i||e[10]!==n){const b=n.map(Jn).join(`
4
4
 
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco-editor-CnKR4oUp.js","assets/index-DokE5sNF.js","assets/index-_-faNWQZ.css","assets/editor-CIB3F1gV.js","assets/delay-CnY5UFtP.js"])))=>i.map(i=>d[i]);
2
- import{r as R,b8 as Ue,c as W,b as Z,m as ne,j as s,B as K,b5 as ye,h as je,I as ge,t as Pe,aY as ve,a9 as Oe,by as Ke,n as We,bz as ce,bA as Ge,e as He,bo as Se,bB as pe,bl as Te,bm as Ye,bn as he}from"./index-DokE5sNF.js";import{C as qe,c as Ze,S as Qe,M as Xe,v as es}from"./held-block-view-BoX35XB_.js";import{b as Le}from"./use-never-published-WdNVjWmr.js";import{c as ss,u as ts}from"./hosted-reconcile-DD1fLsOV.js";import{b as ns,a as ls}from"./repository-binding-CBLNaLcn.js";import{b as $e}from"./UserCheck01-DoVM7Q3H.js";import{K as Ae,Z as as,e as os,U as is,_ as rs}from"./agent-icon-DA-Fg7pF.js";import{i as cs}from"./SearchMd-BIZLsFUb.js";import{L as _e}from"./label-CELn1y0I.js";import{S as ds}from"./switch-B_2aZNJw.js";import{T as us}from"./textarea-BJdJh9he.js";import{u as fs}from"./use-copy-Bh0jH9rH.js";import{D as ms}from"./section-array-field-DeyNfEV2.js";import{a2 as xs,a3 as ke,a4 as ps,a5 as Ee,w as hs,q as bs}from"./site-editor-toast-Ynfp7Kjt.js";import{Y as vs,Z as ys,M as ze,w as js,y as gs,_ as ks,$ as Ns}from"./blocks-tab-states-CFYo4clt.js";import{a as Ss}from"./empty-message-C5kN-FsM.js";import{i as Ts}from"./ChevronSelectorVertical-DO-HHLr6.js";import{a as _s,C as Es,b as Ce,e as Cs,c as ws,f as Bs}from"./command-XtwrY353.js";import{a as Rs,b as Ps,P as Os}from"./popover-BNjsYhzT.js";import{u as Ls}from"./chat-context-Bo7uj7QO.js";import{a as $s}from"./MessageCircle01-DVvYPWC-.js";import{i as As}from"./Play-R1uGwJ-1.js";import{S as zs}from"./scroll-area-pLrQCixi.js";import{c as ue,T as fe,a as me}from"./tooltip-CqEoC-F2.js";import{MonacoCodeEditor as Ie}from"./monaco-editor-CnKR4oUp.js";import{S as Is}from"./save-status-DSROJg37.js";const Ms=R.lazy(()=>Ue(()=>import("./monaco-editor-CnKR4oUp.js"),__vite__mapDeps([0,1,2,3,4])).then(o=>({default:o.MonacoCodeEditor}))),te=o=>!!o&&typeof o=="object"&&!Array.isArray(o);function Js(o,e){return o("sandbox.schemaless.agentPrompt",{site:e?`"${e}"`:o("sandbox.schemaless.agentPromptSiteUnknown")})}function Vs(o){const e=W.c(56),{site:l,className:n}=o,t=Z(),{handleCopy:a,copied:i}=fs();let r;e[0]!==n?(r=ne("flex shrink-0 flex-col gap-2.5 border-b bg-muted/40 px-4 py-3",n),e[0]=n,e[1]=r):r=e[1];let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(as,{"aria-hidden":"true",className:"mt-0.5 size-4 shrink-0 text-muted-foreground"}),e[2]=f):f=e[2];let x;e[3]!==t?(x=t("sandbox.schemaless.bannerTitle"),e[3]=t,e[4]=x):x=e[4];let b;e[5]!==x?(b=s.jsx("h2",{id:"schema-pending-title",className:"text-sm font-medium text-foreground",children:x}),e[5]=x,e[6]=b):b=e[6];let h;e[7]!==t?(h=t("sandbox.schemaless.bannerBody"),e[7]=t,e[8]=h):h=e[8];let p;e[9]!==h?(p=s.jsx("p",{className:"text-xs leading-relaxed text-muted-foreground",children:h}),e[9]=h,e[10]=p):p=e[10];let y;e[11]!==b||e[12]!==p?(y=s.jsxs("div",{className:"flex items-start gap-2",children:[f,s.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[b,p]})]}),e[11]=b,e[12]=p,e[13]=y):y=e[13];let m;e[14]!==a||e[15]!==l||e[16]!==t?(m=()=>{a(Js(t,l)).catch(()=>Pe.error(t("sandbox.schemaless.copyPromptFailed")))},e[14]=a,e[15]=l,e[16]=t,e[17]=m):m=e[17];let d;e[18]!==i?(d=i?s.jsx(ve,{className:"text-success"}):s.jsx(os,{}),e[18]=i,e[19]=d):d=e[19];let u;e[20]!==i||e[21]!==t?(u=t(i?"sandbox.schemaless.promptCopied":"sandbox.schemaless.copyPrompt"),e[20]=i,e[21]=t,e[22]=u):u=e[22];let c;e[23]!==u||e[24]!==m||e[25]!==d?(c=s.jsxs(K,{type:"button",variant:"outline",size:"sm",onClick:m,children:[d,u]}),e[23]=u,e[24]=m,e[25]=d,e[26]=c):c=e[26];let g;e[27]!==i||e[28]!==t?(g=i?t("sandbox.schemaless.promptCopiedAnnouncement"):"",e[27]=i,e[28]=t,e[29]=g):g=e[29];let j;e[30]!==g?(j=s.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:g}),e[30]=g,e[31]=j):j=e[31];let v;e[32]!==t?(v=t("sandbox.schemaless.usesSkill"),e[32]=t,e[33]=v):v=e[33];let E;e[34]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx("span",{"aria-hidden":"true",children:" · "}),e[34]=E):E=e[34];let k;e[35]!==t?(k=t("sandbox.schemaless.installSkill"),e[35]=t,e[36]=k):k=e[36];let S;e[37]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Oe,{"aria-hidden":"true",className:"size-3.5"}),e[37]=S):S=e[37];let N;e[38]!==t?(N=t("decoServe.docs.newTab"),e[38]=t,e[39]=N):N=e[39];let _;e[40]!==N?(_=s.jsx("span",{className:"sr-only",children:N}),e[40]=N,e[41]=_):_=e[41];let w;e[42]!==k||e[43]!==_?(w=s.jsxs("a",{href:ms,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-foreground underline-offset-4 hover:underline focus-visible:underline",children:[k,S,_]}),e[42]=k,e[43]=_,e[44]=w):w=e[44];let T;e[45]!==v||e[46]!==w?(T=s.jsxs("span",{className:"text-xs text-muted-foreground",children:[v,E,w]}),e[45]=v,e[46]=w,e[47]=T):T=e[47];let C;e[48]!==c||e[49]!==j||e[50]!==T?(C=s.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-2 pl-6",children:[c,j,T]}),e[48]=c,e[49]=j,e[50]=T,e[51]=C):C=e[51];let B;return e[52]!==r||e[53]!==C||e[54]!==y?(B=s.jsxs("section",{"aria-labelledby":"schema-pending-title","data-testid":"schema-pending-banner",className:r,children:[y,C]}),e[52]=r,e[53]=C,e[54]=y,e[55]=B):B=e[55],B}function Ds(o,e,l){if(te(o)){for(const n of["name","title","label"]){const t=o[n];if(typeof t=="string"&&t.trim())return t.trim()}if(typeof o.__resolveType=="string")return ke(o.__resolveType);for(const[n,t]of Object.entries(o)){if(n.startsWith("__")||typeof t!="string")continue;const a=t.trim();if(a&&a.length<=80&&!a.startsWith("<"))return a}}return l("sandbox.schemaless.item",{n:e+1})}const Fs=o=>`schemaless-${o.join(".")}`;function Us(o){const e=W.c(7),{id:l,value:n,onChange:t}=o;let a;e[0]!==n?(a=()=>n.includes(`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco-editor-D-AA2j7y.js","assets/index-_VeebRNE.js","assets/index-_-faNWQZ.css","assets/editor-Dv1qkRGx.js","assets/delay-CnY5UFtP.js"])))=>i.map(i=>d[i]);
2
+ import{r as R,b8 as Ue,c as W,b as Z,m as ne,j as s,B as K,b5 as ye,h as je,I as ge,t as Pe,aY as ve,a9 as Oe,by as Ke,n as We,bz as ce,bA as Ge,e as He,bo as Se,bB as pe,bl as Te,bm as Ye,bn as he}from"./index-_VeebRNE.js";import{C as qe,c as Ze,S as Qe,M as Xe,v as es}from"./held-block-view-KOyRMpy4.js";import{b as Le}from"./use-never-published-DDbQ0Vt8.js";import{c as ss,u as ts}from"./hosted-reconcile-CxvdumkL.js";import{b as ns,a as ls}from"./repository-binding-Ct6tvS6k.js";import{b as $e}from"./UserCheck01-Dqn7toBe.js";import{K as Ae,Z as as,e as os,U as is,_ as rs}from"./agent-icon-CfdcYUE7.js";import{i as cs}from"./SearchMd-Cuy8VOOG.js";import{L as _e}from"./label-DZkEI5Ke.js";import{S as ds}from"./switch-7uXAaerp.js";import{T as us}from"./textarea-Cimn1xhl.js";import{u as fs}from"./use-copy-DKfw8n-3.js";import{D as ms}from"./section-array-field-DeIFn5hU.js";import{a2 as xs,a3 as ke,a4 as ps,a5 as Ee,w as hs,q as bs}from"./site-editor-toast-Cjans_Z7.js";import{Y as vs,Z as ys,M as ze,w as js,y as gs,_ as ks,$ as Ns}from"./blocks-tab-states-DeaA94XX.js";import{a as Ss}from"./empty-message-Cs32P_FY.js";import{i as Ts}from"./ChevronSelectorVertical-BbGwltuJ.js";import{a as _s,C as Es,b as Ce,e as Cs,c as ws,f as Bs}from"./command-DsEpQe7b.js";import{a as Rs,b as Ps,P as Os}from"./popover-CsisCWO2.js";import{u as Ls}from"./chat-context-DSu9o-d-.js";import{a as $s}from"./MessageCircle01-D170V1-p.js";import{i as As}from"./Play-PdUxpWZE.js";import{S as zs}from"./scroll-area-EnKfGRfx.js";import{c as ue,T as fe,a as me}from"./tooltip-BYnWhoO-.js";import{MonacoCodeEditor as Ie}from"./monaco-editor-D-AA2j7y.js";import{S as Is}from"./save-status-DI5XwwX3.js";const Ms=R.lazy(()=>Ue(()=>import("./monaco-editor-D-AA2j7y.js"),__vite__mapDeps([0,1,2,3,4])).then(o=>({default:o.MonacoCodeEditor}))),te=o=>!!o&&typeof o=="object"&&!Array.isArray(o);function Js(o,e){return o("sandbox.schemaless.agentPrompt",{site:e?`"${e}"`:o("sandbox.schemaless.agentPromptSiteUnknown")})}function Vs(o){const e=W.c(56),{site:l,className:n}=o,t=Z(),{handleCopy:a,copied:i}=fs();let r;e[0]!==n?(r=ne("flex shrink-0 flex-col gap-2.5 border-b bg-muted/40 px-4 py-3",n),e[0]=n,e[1]=r):r=e[1];let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(as,{"aria-hidden":"true",className:"mt-0.5 size-4 shrink-0 text-muted-foreground"}),e[2]=f):f=e[2];let x;e[3]!==t?(x=t("sandbox.schemaless.bannerTitle"),e[3]=t,e[4]=x):x=e[4];let b;e[5]!==x?(b=s.jsx("h2",{id:"schema-pending-title",className:"text-sm font-medium text-foreground",children:x}),e[5]=x,e[6]=b):b=e[6];let h;e[7]!==t?(h=t("sandbox.schemaless.bannerBody"),e[7]=t,e[8]=h):h=e[8];let p;e[9]!==h?(p=s.jsx("p",{className:"text-xs leading-relaxed text-muted-foreground",children:h}),e[9]=h,e[10]=p):p=e[10];let y;e[11]!==b||e[12]!==p?(y=s.jsxs("div",{className:"flex items-start gap-2",children:[f,s.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[b,p]})]}),e[11]=b,e[12]=p,e[13]=y):y=e[13];let m;e[14]!==a||e[15]!==l||e[16]!==t?(m=()=>{a(Js(t,l)).catch(()=>Pe.error(t("sandbox.schemaless.copyPromptFailed")))},e[14]=a,e[15]=l,e[16]=t,e[17]=m):m=e[17];let d;e[18]!==i?(d=i?s.jsx(ve,{className:"text-success"}):s.jsx(os,{}),e[18]=i,e[19]=d):d=e[19];let u;e[20]!==i||e[21]!==t?(u=t(i?"sandbox.schemaless.promptCopied":"sandbox.schemaless.copyPrompt"),e[20]=i,e[21]=t,e[22]=u):u=e[22];let c;e[23]!==u||e[24]!==m||e[25]!==d?(c=s.jsxs(K,{type:"button",variant:"outline",size:"sm",onClick:m,children:[d,u]}),e[23]=u,e[24]=m,e[25]=d,e[26]=c):c=e[26];let g;e[27]!==i||e[28]!==t?(g=i?t("sandbox.schemaless.promptCopiedAnnouncement"):"",e[27]=i,e[28]=t,e[29]=g):g=e[29];let j;e[30]!==g?(j=s.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:g}),e[30]=g,e[31]=j):j=e[31];let v;e[32]!==t?(v=t("sandbox.schemaless.usesSkill"),e[32]=t,e[33]=v):v=e[33];let E;e[34]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx("span",{"aria-hidden":"true",children:" · "}),e[34]=E):E=e[34];let k;e[35]!==t?(k=t("sandbox.schemaless.installSkill"),e[35]=t,e[36]=k):k=e[36];let S;e[37]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Oe,{"aria-hidden":"true",className:"size-3.5"}),e[37]=S):S=e[37];let N;e[38]!==t?(N=t("decoServe.docs.newTab"),e[38]=t,e[39]=N):N=e[39];let _;e[40]!==N?(_=s.jsx("span",{className:"sr-only",children:N}),e[40]=N,e[41]=_):_=e[41];let w;e[42]!==k||e[43]!==_?(w=s.jsxs("a",{href:ms,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-foreground underline-offset-4 hover:underline focus-visible:underline",children:[k,S,_]}),e[42]=k,e[43]=_,e[44]=w):w=e[44];let T;e[45]!==v||e[46]!==w?(T=s.jsxs("span",{className:"text-xs text-muted-foreground",children:[v,E,w]}),e[45]=v,e[46]=w,e[47]=T):T=e[47];let C;e[48]!==c||e[49]!==j||e[50]!==T?(C=s.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-2 pl-6",children:[c,j,T]}),e[48]=c,e[49]=j,e[50]=T,e[51]=C):C=e[51];let B;return e[52]!==r||e[53]!==C||e[54]!==y?(B=s.jsxs("section",{"aria-labelledby":"schema-pending-title","data-testid":"schema-pending-banner",className:r,children:[y,C]}),e[52]=r,e[53]=C,e[54]=y,e[55]=B):B=e[55],B}function Ds(o,e,l){if(te(o)){for(const n of["name","title","label"]){const t=o[n];if(typeof t=="string"&&t.trim())return t.trim()}if(typeof o.__resolveType=="string")return ke(o.__resolveType);for(const[n,t]of Object.entries(o)){if(n.startsWith("__")||typeof t!="string")continue;const a=t.trim();if(a&&a.length<=80&&!a.startsWith("<"))return a}}return l("sandbox.schemaless.item",{n:e+1})}const Fs=o=>`schemaless-${o.join(".")}`;function Us(o){const e=W.c(7),{id:l,value:n,onChange:t}=o;let a;e[0]!==n?(a=()=>n.includes(`
3
3
  `)||n.length>80,e[0]=n,e[1]=a):a=e[1];const[i]=R.useState(a);let r;return e[2]!==l||e[3]!==i||e[4]!==t||e[5]!==n?(r=i?s.jsx(us,{id:l,value:n,rows:Math.min(8,Math.max(3,n.split(`
4
4
  `).length)),onChange:f=>t(f.target.value)}):s.jsx(ge,{id:l,value:n,onChange:f=>t(f.target.value)}),e[2]=l,e[3]=i,e[4]=t,e[5]=n,e[6]=r):r=e[6],r}function Ks(o){const e=W.c(15),{id:l,value:n,onChange:t}=o,a=Z(),[i,r]=R.useState(String(n));let f;e[0]!==i?(f=Ee(i),e[0]=i,e[1]=f):f=e[1];const x=f===null;let b;e[2]!==t?(b=m=>{r(m.target.value);const d=Ee(m.target.value);d!==null&&t(d)},e[2]=t,e[3]=b):b=e[3];let h;e[4]!==l||e[5]!==x||e[6]!==b||e[7]!==i?(h=s.jsx(ge,{id:l,inputMode:"decimal",value:i,"aria-invalid":x,onChange:b}),e[4]=l,e[5]=x,e[6]=b,e[7]=i,e[8]=h):h=e[8];let p;e[9]!==x||e[10]!==a?(p=x&&s.jsx("p",{className:"text-xs text-destructive",children:a("sandbox.schemaless.notANumber")}),e[9]=x,e[10]=a,e[11]=p):p=e[11];let y;return e[12]!==h||e[13]!==p?(y=s.jsxs("div",{className:"flex flex-col gap-1",children:[h,p]}),e[12]=h,e[13]=p,e[14]=y):y=e[14],y}function Me(o){const e=W.c(67),{label:l,value:n,path:t,depth:a,onChange:i}=o,r=Z();let f;e[0]!==t?(f=Fs(t),e[0]=t,e[1]=f):f=e[1];const x=f;if(typeof n=="boolean"){let m;e[2]!==x||e[3]!==l?(m=s.jsx(_e,{htmlFor:x,className:"min-w-0 truncate",children:l}),e[2]=x,e[3]=l,e[4]=m):m=e[4];let d;e[5]!==i||e[6]!==t?(d=g=>i(t,g),e[5]=i,e[6]=t,e[7]=d):d=e[7];let u;e[8]!==x||e[9]!==d||e[10]!==n?(u=s.jsx(ds,{id:x,checked:n,onCheckedChange:d}),e[8]=x,e[9]=d,e[10]=n,e[11]=u):u=e[11];let c;return e[12]!==m||e[13]!==u?(c=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[m,u]}),e[12]=m,e[13]=u,e[14]=c):c=e[14],c}if(typeof n=="string"||typeof n=="number"){let m;e[15]!==x||e[16]!==l?(m=s.jsx(_e,{htmlFor:x,className:"min-w-0 truncate",children:l}),e[15]=x,e[16]=l,e[17]=m):m=e[17];let d;e[18]!==x||e[19]!==i||e[20]!==t||e[21]!==n?(d=typeof n=="string"?s.jsx(Us,{id:x,value:n,onChange:c=>i(t,c)}):s.jsx(Ks,{id:x,value:n,onChange:c=>i(t,c)}),e[18]=x,e[19]=i,e[20]=t,e[21]=n,e[22]=d):d=e[22];let u;return e[23]!==m||e[24]!==d?(u=s.jsxs("div",{className:"flex flex-col gap-1.5",children:[m,d]}),e[23]=m,e[24]=d,e[25]=u):u=e[25],u}if(Array.isArray(n)||te(n)){let m,d,u,c,g;if(e[26]!==a||e[27]!==l||e[28]!==i||e[29]!==t||e[30]!==r||e[31]!==n){const E=Array.isArray(n)?n.map((T,C)=>[Ds(T,C,r),T,C]):Object.entries(n).filter(Gs).map(Ws),k=te(n)&&typeof n.__resolveType=="string"?n.__resolveType:null;u=a===0,c="group rounded-md border border-border";let S;e[37]!==l?(S=s.jsx("span",{className:"min-w-0 truncate",children:l}),e[37]=l,e[38]=S):S=e[38];let N;e[39]!==k?(N=k&&s.jsx("span",{className:"min-w-0 truncate font-mono text-xs font-normal text-muted-foreground",title:k,children:ke(k)}),e[39]=k,e[40]=N):N=e[40];let _;e[41]!==r||e[42]!==n?(_=Array.isArray(n)?r("sandbox.schemaless.itemCount",{count:n.length}):null,e[41]=r,e[42]=n,e[43]=_):_=e[43];let w;e[44]!==_?(w=s.jsx("span",{className:"ml-auto shrink-0 text-xs font-normal text-muted-foreground",children:_}),e[44]=_,e[45]=w):w=e[45],e[46]!==w||e[47]!==S||e[48]!==N?(g=s.jsxs("summary",{className:"flex cursor-pointer select-none items-center gap-2 px-3 py-2 text-sm font-medium text-foreground",children:[S,N,w]}),e[46]=w,e[47]=S,e[48]=N,e[49]=g):g=e[49],m="flex flex-col gap-4 border-t border-border px-3 py-3",d=E.length===0?s.jsx("p",{className:"text-xs text-muted-foreground",children:r("sandbox.schemaless.empty")}):E.map(T=>{const[C,B,O]=T;return s.jsx(Me,{label:C,value:B,path:[...t,O],depth:a+1,onChange:i},O)}),e[26]=a,e[27]=l,e[28]=i,e[29]=t,e[30]=r,e[31]=n,e[32]=m,e[33]=d,e[34]=u,e[35]=c,e[36]=g}else m=e[32],d=e[33],u=e[34],c=e[35],g=e[36];let j;e[50]!==m||e[51]!==d?(j=s.jsx("div",{className:m,children:d}),e[50]=m,e[51]=d,e[52]=j):j=e[52];let v;return e[53]!==u||e[54]!==c||e[55]!==g||e[56]!==j?(v=s.jsxs("details",{open:u,className:c,children:[g,j]}),e[53]=u,e[54]=c,e[55]=g,e[56]=j,e[57]=v):v=e[57],v}let b;e[58]!==l?(b=s.jsx("span",{className:"min-w-0 truncate text-sm font-medium",children:l}),e[58]=l,e[59]=b):b=e[59];let h;e[60]!==r?(h=r("sandbox.schemaless.notSet"),e[60]=r,e[61]=h):h=e[61];let p;e[62]!==h?(p=s.jsx("span",{className:"text-xs text-muted-foreground",children:h}),e[62]=h,e[63]=p):p=e[63];let y;return e[64]!==b||e[65]!==p?(y=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[b,p]}),e[64]=b,e[65]=p,e[66]=y):y=e[66],y}function Ws(o){const[e,l]=o;return[e,l,e]}function Gs(o){const[e]=o;return e!=="__resolveType"}function Hs({blockKey:o,block:e,onChange:l,onBack:n,onOpenBlock:t}){const a=Z(),[i,r]=R.useState(()=>(t?.(o),e)),[f,x]=R.useState(0),[b,h]=R.useState(null),[p,y]=R.useState(!1),m=v=>{r(v),l(o,v)},d=typeof i.__resolveType=="string"?i.__resolveType:null,u=Object.entries(i).filter(([v])=>v!=="__resolveType"),c=()=>{b!==null?(h(null),y(!1),x(v=>v+1)):h(JSON.stringify(i,null,2))},g=v=>{try{const E=JSON.parse(v??"");if(te(E)){y(!1),m(E);return}}catch{}y(!0)},j=a(b!==null?"sandbox.savedSectionEditor.closeJsonEditor":"sandbox.savedSectionEditor.editAsJson");return s.jsxs("div",{className:"flex h-full min-w-0 flex-1 flex-col",children:[s.jsxs("header",{className:"flex shrink-0 items-center gap-2 border-b px-3 py-2",children:[n&&s.jsxs(K,{variant:"ghost",size:"sm",className:"shrink-0",onClick:n,children:[s.jsx($e,{"aria-hidden":"true"}),a("sandbox.schemaless.back")]}),s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[s.jsx("h3",{className:"truncate text-sm font-medium",title:o,children:o}),d&&s.jsx("span",{className:"truncate font-mono text-xs text-muted-foreground",title:d,children:d})]}),s.jsx(K,{variant:b!==null?"default":"ghost",size:"icon",className:"shrink-0",onClick:c,"aria-label":j,"aria-pressed":b!==null,title:j,children:b!==null?s.jsx(ye,{size:14}):s.jsx(Ae,{size:14})})]}),s.jsxs("div",{className:"relative min-h-0 flex-1",children:[s.jsx("div",{className:"h-full overflow-y-auto",children:s.jsx("form",{"aria-label":o,className:"mx-auto flex max-w-2xl flex-col gap-4 px-6 py-4",onSubmit:v=>v.preventDefault(),children:u.length===0?s.jsx("p",{className:"text-xs text-muted-foreground",children:a("sandbox.schemaless.empty")}):u.map(([v,E])=>s.jsx(Me,{label:v,value:E,path:[v],depth:0,onChange:(k,S)=>m(ps(i,k,S))},v))},f)}),b!==null&&s.jsxs("div",{className:"absolute inset-0 flex flex-col bg-background",children:[p&&s.jsx("div",{className:"shrink-0 border-b bg-destructive/10 px-3 py-1.5 text-xs text-destructive",children:a("sandbox.savedSectionEditor.invalidJsonError")}),s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(R.Suspense,{fallback:s.jsx("div",{className:"flex h-full items-center justify-center",children:s.jsx(je,{className:"size-5 text-muted-foreground"})}),children:s.jsx(Ms,{language:"json",height:"100%",code:b,onChange:g})})})]})]})]})}function Ys(o){const e=W.c(70),{decofile:l,onChange:n,onLeaveBlock:t,onOpenBlock:a,wrapEditor:i,v8:r,copyEpochOf:f,site:x,initialKey:b,compact:h}=o,p=r===void 0?!1:r,y=x===void 0?null:x,m=b===void 0?null:b,d=h===void 0?!1:h,u=Z(),[c,g]=R.useState(m&&te(l[m])?m:null),[j,v]=R.useState("");let E;e[0]!==t||e[1]!==a||e[2]!==c||e[3]!==p?(E=A=>{A!==c&&(t?.(),!p&&A!==null&&a?.(A),g(A))},e[0]=t,e[1]=a,e[2]=c,e[3]=p,e[4]=E):E=e[4];const k=E;let S;e[5]!==f||e[6]!==c?(S=c?f?.(c)??0:0,e[5]=f,e[6]=c,e[7]=S):S=e[7];const N=S,[_,w]=R.useState(N);_!==N&&(w(N),!p&&c!==null&&a?.(c));const T=c?l[c]:void 0;let C,B,O,J,P;if(e[8]!==d||e[9]!==l||e[10]!==j||e[11]!==k||e[12]!==c||e[13]!==u){const A=j.trim().toLowerCase(),F=xs(l).map(M=>({...M,blocks:A?M.blocks.filter(U=>U.label.toLowerCase().includes(A)||U.key.toLowerCase().includes(A)||(M.resolveType??"").toLowerCase().includes(A)):M.blocks})).filter(qs),xe=Object.keys(l).length;e[19]!==u?(P=u("sandbox.schemaless.listLabel"),e[19]=u,e[20]=P):P=e[20];const re=d?"flex-1":"w-72 shrink-0 border-r";e[21]!==re?(C=ne("flex min-h-0 flex-col",re),e[21]=re,e[22]=C):C=e[22];let se;e[23]===Symbol.for("react.memo_cache_sentinel")?(se=s.jsx(cs,{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 left-2.5 size-4 -translate-y-1/2 text-muted-foreground"}),e[23]=se):se=e[23];let ae;e[24]===Symbol.for("react.memo_cache_sentinel")?(ae=M=>v(M.target.value),e[24]=ae):ae=e[24];let Y;e[25]!==u?(Y=u("sandbox.schemaless.searchPlaceholder"),e[25]=u,e[26]=Y):Y=e[26];let q;e[27]!==u?(q=u("sandbox.schemaless.searchPlaceholder"),e[27]=u,e[28]=q):q=e[28],e[29]!==j||e[30]!==Y||e[31]!==q?(B=s.jsx("div",{className:"shrink-0 border-b p-2",children:s.jsxs("div",{className:"relative",children:[se,s.jsx(ge,{type:"search",value:j,onChange:ae,placeholder:Y,"aria-label":q,className:"pl-8"})]})}),e[29]=j,e[30]=Y,e[31]=q,e[32]=B):B=e[32],O="min-h-0 flex-1 overflow-y-auto py-1",J=xe===0?s.jsx("p",{className:"px-4 py-6 text-center text-xs text-muted-foreground",children:u("sandbox.schemaless.noBlocks")}):F.length===0?s.jsx("p",{className:"px-4 py-6 text-center text-xs text-muted-foreground",children:u("sandbox.schemaless.noMatches")}):F.map(M=>s.jsxs("section",{"aria-label":M.resolveType??u("sandbox.schemaless.noType"),className:"py-1",children:[s.jsxs("h3",{className:"flex items-baseline gap-2 px-3 pt-2 pb-1 text-xs font-medium text-muted-foreground",title:M.resolveType??void 0,children:[s.jsx("span",{className:"truncate",children:M.resolveType?ke(M.resolveType):u("sandbox.schemaless.noType")}),s.jsx("span",{className:"ml-auto shrink-0 tabular-nums",children:M.blocks.length})]}),s.jsx("ul",{children:M.blocks.map(U=>s.jsx("li",{children:s.jsx("button",{type:"button",onClick:()=>k(U.key),"aria-current":U.key===c?"true":void 0,title:U.key,className:ne("block w-full truncate px-3 py-1.5 text-left text-sm hover:bg-accent focus-visible:bg-accent focus-visible:outline-none",U.key===c&&"bg-accent font-medium"),children:U.label})},U.key))})]},M.resolveType??"")),e[8]=d,e[9]=l,e[10]=j,e[11]=k,e[12]=c,e[13]=u,e[14]=C,e[15]=B,e[16]=O,e[17]=J,e[18]=P}else C=e[14],B=e[15],O=e[16],J=e[17],P=e[18];let $;e[33]!==O||e[34]!==J?($=s.jsx("div",{className:O,children:J}),e[33]=O,e[34]=J,e[35]=$):$=e[35];let D;e[36]!==C||e[37]!==B||e[38]!==$||e[39]!==P?(D=s.jsxs("nav",{"aria-label":P,className:C,children:[B,$]}),e[36]=C,e[37]=B,e[38]=$,e[39]=P,e[40]=D):D=e[40];const I=D;let L;e[41]!==T||e[42]!==d||e[43]!==f||e[44]!==n||e[45]!==a||e[46]!==k||e[47]!==c||e[48]!==u||e[49]!==p?(L=c&&te(T)?s.jsx(Hs,{blockKey:c,block:T,onOpenBlock:p?a:void 0,onChange:n,onBack:d?()=>k(null):void 0},`${c}:${f?.(c)??0}`):s.jsx("div",{className:"flex min-w-0 flex-1 items-center justify-center p-6",children:s.jsx("p",{className:"text-sm text-muted-foreground",children:u("sandbox.schemaless.pickBlock")})}),e[41]=T,e[42]=d,e[43]=f,e[44]=n,e[45]=a,e[46]=k,e[47]=c,e[48]=u,e[49]=p,e[50]=L):L=e[50];const Q=L;let X;e[51]!==Q||e[52]!==c||e[53]!==p||e[54]!==i?(X=p&&c&&i?i(c,Q):Q,e[51]=Q,e[52]=c,e[53]=p,e[54]=i,e[55]=X):X=e[55];const ee=X;let G;e[56]!==y?(G=s.jsx(Vs,{site:y}),e[56]=y,e[57]=G):G=e[57];let V;e[58]!==T||e[59]!==d||e[60]!==ee||e[61]!==I||e[62]!==c?(V=d&&c&&te(T)?ee:I,e[58]=T,e[59]=d,e[60]=ee,e[61]=I,e[62]=c,e[63]=V):V=e[63];const ie=!d&&ee;let H;e[64]!==V||e[65]!==ie?(H=s.jsxs("div",{className:"flex min-h-0 flex-1",children:[V,ie]}),e[64]=V,e[65]=ie,e[66]=H):H=e[66];let le;return e[67]!==G||e[68]!==H?(le=s.jsxs("div",{"data-testid":"schemaless-content",className:"flex h-full min-h-0 w-full flex-col",children:[G,H]}),e[67]=G,e[68]=H,e[69]=le):le=e[69],le}function qs(o){return o.blocks.length>0}function $t(o){const e=W.c(35),{orgSlug:l,virtualMcpId:n,branch:t,decofile:a,initialKey:i,compact:r}=o,f=ns(n)?.metadata;let x;e[0]!==f?(x=Ke(f),e[0]=f,e[1]=x):x=e[1];const b=x;let h;e[2]!==t||e[3]!==l||e[4]!==n?(h={orgSlug:l,virtualMcpId:n,branch:t},e[2]=t,e[3]=l,e[4]=n,e[5]=h):h=e[5];let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p={holdsCopy:!0},e[6]=p):p=e[6];const{save:y,flush:m,hold:d,v8:u}=Le(h,p);let c;e[7]!==t||e[8]!==l||e[9]!==n?(c=ss({orgSlug:l,virtualMcpId:n,branch:t}),e[7]=t,e[8]=l,e[9]=n,e[10]=c):c=e[10];const g=ts(c);let j;e[11]!==m?(j=()=>m(),e[11]=m,e[12]=j):j=e[12];const v=R.useEffectEvent(j);let E;e[13]!==v?(E=()=>()=>v(),e[13]=v,e[14]=E):E=e[14];let k;e[15]===Symbol.for("react.memo_cache_sentinel")?(k=[],e[15]=k):k=e[15],R.useEffect(E,k);let S;e[16]!==y?(S=(w,T)=>y(w,T),e[16]=y,e[17]=S):S=e[17];let N;e[18]!==t||e[19]!==a||e[20]!==l||e[21]!==u||e[22]!==n?(N=u?(w,T)=>s.jsx(qe,{listing:a,scope:{orgSlug:l,virtualMcpId:n,branch:t},names:[w],children:T}):void 0,e[18]=t,e[19]=a,e[20]=l,e[21]=u,e[22]=n,e[23]=N):N=e[23];let _;return e[24]!==r||e[25]!==g||e[26]!==a||e[27]!==m||e[28]!==d||e[29]!==i||e[30]!==b||e[31]!==N||e[32]!==S||e[33]!==u?(_=s.jsx(Ys,{decofile:a,site:b,onChange:S,onLeaveBlock:m,onOpenBlock:d,v8:u,wrapEditor:N,copyEpochOf:g,initialKey:i,compact:r}),e[24]=r,e[25]=g,e[26]=a,e[27]=m,e[28]=d,e[29]=i,e[30]=b,e[31]=N,e[32]=S,e[33]=u,e[34]=_):_=e[34],_}const we={resolveType:"website/pages/Page.tsx",seoResolveType:"website/sections/Seo/SeoV2.tsx"};function At(o){return`pages-${encodeURIComponent(o)}-${crypto.randomUUID()}`}function zt(o,e,l){if(hs(l))return{name:o,path:e,sections:[],__resolveType:"page"};const n=vs(l??void 0);if(!l||ys(n))return{name:o,path:e,sections:[],seo:{__resolveType:we.seoResolveType},__resolveType:we.resolveType};const t=Ss(l);return{name:o,path:e,sections:[],...t?{seo:{__resolveType:t}}:{},__resolveType:n}}const Be="__blank__";function It(o){const e=W.c(65),{id:l,value:n,onChange:t,templates:a,disabled:i}=o,r=Z(),[f,x]=R.useState(!1);let b;if(e[0]!==a||e[1]!==n){let I;e[3]!==n?(I=L=>L.key===n,e[3]=n,e[4]=I):I=e[4],b=a.find(I),e[0]=a,e[1]=n,e[2]=b}else b=e[2];const h=b;let p;e[5]!==h?.name||e[6]!==r?(p=h?.name??r("sectionsEditor.pageTemplateSelect.blankPageDefaultLabel"),e[5]=h?.name,e[6]=r,e[7]=p):p=e[7];let y;e[8]!==p?(y=s.jsx("span",{className:"max-w-full shrink-0 truncate",children:p}),e[8]=p,e[9]=y):y=e[9];let m;e[10]!==h?(m=h?.path?s.jsx("span",{className:"truncate text-muted-foreground",children:h.path}):null,e[10]=h,e[11]=m):m=e[11];let d;e[12]!==y||e[13]!==m?(d=s.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[y,m]}),e[12]=y,e[13]=m,e[14]=d):d=e[14];let u;e[15]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Ts,{className:"shrink-0 opacity-50"}),e[15]=u):u=e[15];let c;e[16]!==i||e[17]!==l||e[18]!==f||e[19]!==d?(c=s.jsx(Rs,{asChild:!0,children:s.jsxs(K,{id:l,type:"button",variant:"outline",role:"combobox","aria-expanded":f,disabled:i,className:"w-full justify-between font-normal contain-inline-size",children:[d,u]})}),e[16]=i,e[17]=l,e[18]=f,e[19]=d,e[20]=c):c=e[20];let g;e[21]===Symbol.for("react.memo_cache_sentinel")?(g={width:"var(--radix-popover-trigger-width)"},e[21]=g):g=e[21];let j;e[22]!==r?(j=r("sectionsEditor.pageTemplateSelect.searchPlaceholder"),e[22]=r,e[23]=j):j=e[23];let v;e[24]!==j?(v=s.jsx(_s,{placeholder:j,className:"h-9"}),e[24]=j,e[25]=v):v=e[25];let E;e[26]!==r?(E=r("sectionsEditor.pageTemplateSelect.noPagesFoundMessage"),e[26]=r,e[27]=E):E=e[27];let k;e[28]!==E?(k=s.jsx(Es,{children:E}),e[28]=E,e[29]=k):k=e[29];let S;e[30]!==r?(S=r("sectionsEditor.pageTemplateSelect.blankPageLabel"),e[30]=r,e[31]=S):S=e[31];let N;e[32]!==t?(N=()=>{t(Be),x(!1)},e[32]=t,e[33]=N):N=e[33];let _;e[34]!==r?(_=r("sectionsEditor.pageTemplateSelect.blankPageLabel"),e[34]=r,e[35]=_):_=e[35];const w=n===Be?"opacity-100":"opacity-0";let T;e[36]!==w?(T=ne("ml-auto",w),e[36]=w,e[37]=T):T=e[37];let C;e[38]!==T?(C=s.jsx(ve,{className:T}),e[38]=T,e[39]=C):C=e[39];let B;e[40]!==S||e[41]!==N||e[42]!==_||e[43]!==C?(B=s.jsxs(Ce,{value:S,onSelect:N,children:[_,C]}),e[40]=S,e[41]=N,e[42]=_,e[43]=C,e[44]=B):B=e[44];let O;if(e[45]!==t||e[46]!==a||e[47]!==n){let I;e[49]!==t||e[50]!==n?(I=L=>s.jsxs(Ce,{value:`${L.name} ${L.path}`,onSelect:()=>{t(L.key),x(!1)},children:[s.jsxs("div",{className:"flex min-w-0 flex-col",children:[s.jsx("span",{className:"truncate",children:L.name}),s.jsx("span",{className:"truncate text-xs text-muted-foreground",children:L.path})]}),s.jsx(ve,{className:ne("ml-auto",n===L.key?"opacity-100":"opacity-0")})]},L.key),e[49]=t,e[50]=n,e[51]=I):I=e[51],O=a.map(I),e[45]=t,e[46]=a,e[47]=n,e[48]=O}else O=e[48];let J;e[52]!==B||e[53]!==O?(J=s.jsxs(Cs,{children:[B,O]}),e[52]=B,e[53]=O,e[54]=J):J=e[54];let P;e[55]!==k||e[56]!==J?(P=s.jsxs(ws,{onWheel:Zs,children:[k,J]}),e[55]=k,e[56]=J,e[57]=P):P=e[57];let $;e[58]!==v||e[59]!==P?($=s.jsx(Ps,{className:"p-0",style:g,children:s.jsxs(Bs,{children:[v,P]})}),e[58]=v,e[59]=P,e[60]=$):$=e[60];let D;return e[61]!==f||e[62]!==$||e[63]!==c?(D=s.jsxs(Os,{open:f,onOpenChange:x,children:[c,$]}),e[61]=f,e[62]=$,e[63]=c,e[64]=D):D=e[64],D}function Zs(o){const e=o.deltaMode===1?16:1;o.currentTarget.scrollTop=o.currentTarget.scrollTop+o.deltaY*e}function Qs(o){const e=W.c(13),{crumbs:l,onSelect:n,onSelectRoot:t}=o;let a;e[0]!==n||e[1]!==t?(a=t??(()=>n(0)),e[0]=n,e[1]=t,e[2]=a):a=e[2];let i;e[3]!==a?(i={onSelect:a},e[3]=a,e[4]=i):i=e[4];let r;if(e[5]!==l||e[6]!==n){let x;e[8]!==n?(x=(b,h)=>({key:`block-${h}`,label:Ze(b),onSelect:()=>n(h)}),e[8]=n,e[9]=x):x=e[9],r=l.map(x),e[5]=l,e[6]=n,e[7]=r}else r=e[7];let f;return e[10]!==i||e[11]!==r?(f=s.jsx(We.Breadcrumbs,{after:"page",parent:i,items:r}),e[10]=i,e[11]=r,e[12]=f):f=e[12],f}const Xs={loaders:"loader",actions:"action"},Je=new Set(["workflows"]);function et(o){return Xs[o]}function Ve(o,e,l){const n=o.manifest?.blocks??{};for(const[t,a]of Object.entries(n))if(t.includes(l)&&e in a)return!0;return!1}function st(o,e,l){return/\.tsx?$/.test(e)?!0:Ve(o,e,l)}function Mt(o,e){const l=new Set,n=o.manifest?.blocks??{};for(const[t,a]of Object.entries(n))if(t.includes(e))for(const i of Object.keys(a))l.add(i);return l}function tt(o,e){return/\.tsx?$/.test(o)?!1:e.has(`${o}.ts`)||e.has(`${o}.tsx`)}function nt(o,e){const l=o.manifest?.blocks??{},n=[],t=new Set;for(const[a,i]of Object.entries(l))if(a.includes(e))for(const r of Object.keys(i))t.add(r);for(const a of t){if(a.toLowerCase().includes("preview")||ze.has(a)||Je.has(Ne(a))||tt(a,t))continue;const i=js(a,o);if(i.hidden)continue;const r=i.title&&i.title!==a?i.title:ce(a);n.push({resolveType:a,title:r})}return n.sort((a,i)=>a.title.localeCompare(i.title))}function Jt(o,e){return nt(o,e).length}function Ne(o){return o.startsWith("deco-sites/")?o.split("/")[1]||"site":o.startsWith("$live")||o.startsWith("deco/")?"deco":o.split("/")[0]||"other"}const lt={deco:"Deco",std:"Deco Standard",website:"Website"};function Vt(o){return lt[o]??o}function Dt(o){const e=Ne(o);let n=o.split("/").filter(Boolean).slice(o.startsWith("deco-sites/")?2:1);return(n[0]==="loaders"||n[0]==="actions")&&(n=n.slice(1)),[e,...n.slice(0,-1)]}function Ft(o,e,l){const n=[];for(const[t,a]of Object.entries(e)){if(st(o,t,l)||Ge(t)||!a||typeof a!="object"||Array.isArray(a))continue;const i=a,r=i.__resolveType;typeof r=="string"&&(ze.has(r)||Je.has(Ne(r))||Ve(o,r,l)&&n.push({key:t,resolveType:r,title:typeof i.name=="string"&&i.name?i.name:t}))}return n.sort((t,a)=>t.title.localeCompare(a.title))}function Ut(o,e){const l=o[e],n=typeof l?.__resolveType=="string"?l.__resolveType:"",{__resolveType:t,...a}=l??{},i=typeof l?.name=="string"&&l.name?l.name:e;return{resolveType:n,props:a,title:i}}const Re=3e4;function at(o,e,l,n){const t=new URL(`/deco/invoke/${e}`,o);return t.searchParams.set("__cb",n.toString(36)),t.searchParams.set("__decoFBT","0"),t.searchParams.set("__d",`run-${n.toString(36)}`),t.searchParams.set("props",btoa(encodeURIComponent(JSON.stringify(l)))),t.href}async function ot(o,{resolveType:e,props:l}){let n;try{n=await fetch(bs(o),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({__resolveType:e,...l}),signal:AbortSignal.timeout(Re)})}catch(r){throw r instanceof DOMException&&r.name==="TimeoutError"?new Error(`Run timed out after ${Re/1e3}s — the block may be slow or the preview unresponsive.`):r}const t=await n.text();let a=null,i=!1;try{a=t?JSON.parse(t):null,i=!0}catch{}if(!n.ok){const r=i&&a&&typeof a=="object"&&"error"in a&&typeof a.error=="string"?a.error:t||`Run failed (${n.status})`;throw new Error(r)}return i?a:t}function it(o){const e=W.c(2);let l;return e[0]!==o?(l={mutationFn:n=>ot(o,n)},e[0]=o,e[1]=l):l=e[1],He(l)}function Kt({orgSlug:o,virtualMcpId:e,branch:l,previewUrl:n,meta:t,decofile:a,kind:i,target:r,initialValue:f,isCreating:x,onCreate:b,onSaveReferencedBlock:h,onBack:p,backLabel:y,showRun:m=!0}){const d=Ls(),u=d?.taskId??null,c=Z(),g=d?.virtualMcpId,v=ls(g===e?e:null)?.metadata?.siteSlug??null,E=gs(r.resolveType,t),k=!E&&ks(r.resolveType,t),S=k?Ns(f):null,N=E??S,[_,w]=R.useState(f),[T,C]=R.useState([]),[B,O]=R.useState(0),[J,P]=R.useState(!1),[$,D]=R.useState(null),[I,L]=R.useState(!1),[Q,X]=R.useState(!1),[ee,G]=R.useState(!1),V=$!==null,{save:ie,flush:H,isPending:le}=Le({orgSlug:o,virtualMcpId:e,branch:l},{holdsCopy:r.mode==="saved"}),A=it({orgSlug:o,virtualMcpId:e,branch:l,threadId:u});R.useEffect(()=>()=>{H()},[]);const F=et(i),xe=r.resolveType.split("/").pop()?.replace(/\.tsx?$/,"")??r.resolveType,re={orgSlug:o,virtualMcpId:e,branch:l,threadId:u,previewUrl:n??void 0,siteSlug:v},se=z=>{w(z),r.mode==="saved"&&ie(r.blockKey,{__resolveType:r.resolveType,...z})},ae=()=>{V?(D(null),P(!1),O(z=>z+1)):D(JSON.stringify(_,null,2))},Y=z=>{const oe=z??"";try{const de=JSON.parse(oe);if(de&&typeof de=="object"&&!Array.isArray(de)){P(!1),se(de);return}P(!0)}catch{P(!0)}},q=async z=>{const oe=es(z,a);if(oe){Pe.error(oe);return}await b(z,{__resolveType:r.resolveType,..._}),L(!1)},M=()=>{X(!0),A.mutate({resolveType:r.resolveType,props:_})},U=()=>{n&&window.open(at(n,r.resolveType,_,Date.now()),"_blank","noopener")},De=[r.title,...T],Fe=z=>{C(T.slice(0,z)),O(oe=>oe+1)};return s.jsxs("div",{className:"flex h-full w-full min-w-0 flex-col",children:[s.jsx(Qs,{crumbs:De,onSelect:Fe,onSelectRoot:p}),s.jsxs("div",{className:"shrink-0 border-b px-3 py-2.5",children:[s.jsxs("div",{className:"flex min-w-0 items-center gap-2 overflow-hidden",children:[p&&y&&s.jsxs(K,{variant:"ghost",size:"sm",className:"-ml-1 min-w-0 shrink gap-1",onClick:p,children:[s.jsx($e,{size:14,className:"shrink-0"}),s.jsx("span",{className:"truncate",children:y})]}),s.jsx("div",{className:"flex-1"}),r.mode==="saved"&&s.jsx(Is,{isPending:le,isError:!1}),m&&s.jsxs(K,{size:"default",variant:"outline",className:"shrink-0 gap-1.5",onClick:M,disabled:A.isPending,"aria-label":c("sandbox.runnableBlockEditor.runAriaLabel",{singular:F}),children:[A.isPending?s.jsx(je,{className:"size-3.5"}):s.jsx(As,{size:14}),c("sandbox.runnableBlockEditor.run")]}),r.mode==="available"&&s.jsxs(ue,{children:[s.jsx(fe,{asChild:!0,children:s.jsx(K,{size:"icon",className:"shrink-0",disabled:x,onClick:()=>L(!0),"aria-label":c("sandbox.runnableBlockEditor.saveAsGlobalAriaLabel",{singular:F}),children:s.jsx(is,{size:14})})}),s.jsx(me,{side:"bottom",children:c("sandbox.runnableBlockEditor.saveAsGlobal",{singular:F})})]}),s.jsxs(ue,{children:[s.jsx(fe,{asChild:!0,children:s.jsx(K,{variant:V?"default":"ghost",size:"icon",className:"shrink-0",onClick:ae,"aria-label":c(V?"sandbox.runnableBlockEditor.closeJsonEditor":"sandbox.runnableBlockEditor.editAsJson"),"aria-pressed":V,children:V?s.jsx(ye,{size:14}):s.jsx(Ae,{size:14})})}),s.jsx(me,{side:"bottom",children:c(V?"sandbox.runnableBlockEditor.closeJsonEditor":"sandbox.runnableBlockEditor.editAsJson")})]})]}),s.jsx("p",{className:"mt-1.5 py-1 pl-1 text-sm leading-snug text-muted-foreground",children:r.mode==="saved"?c("sandbox.runnableBlockEditor.savedModeDescription",{singular:F}):c("sandbox.runnableBlockEditor.availableModeDescription",{typeLabel:xe,singular:F})})]}),s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[s.jsxs("div",{className:ne("relative min-h-0 flex-1",Q&&ee&&"hidden"),children:[s.jsx(zs,{className:"h-full [&_[data-slot=scroll-area-viewport]>div]:!block",children:s.jsx("div",{className:"min-w-0 max-w-full overflow-x-hidden px-6 py-4",children:s.jsxs("div",{className:"mx-auto max-w-2xl",children:[S&&N===S&&s.jsx("p",{className:"mb-3 rounded-md bg-muted px-3 py-2 text-xs leading-snug text-muted-foreground",children:c("sandbox.runnableBlockEditor.inferredSchemaNotice",{singular:F})}),N?s.jsx(Qe,{schema:N,value:_,onChange:z=>se(z),basePath:"",breadcrumbPath:T,onBreadcrumbChange:C,meta:t,decofile:a,onSaveReferencedBlock:h,sandbox:re},B):s.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:k?c("sandbox.runnableBlockEditor.freeformPropsEmptyState",{singular:F}):c("sandbox.runnableBlockEditor.noInputEmptyState",{singular:F})})]})})}),$!==null&&s.jsxs("div",{className:"absolute inset-0 flex flex-col bg-background",children:[J&&s.jsx("div",{className:"shrink-0 border-b bg-destructive/10 px-3 py-1.5 text-xs text-destructive",children:c("sandbox.runnableBlockEditor.invalidJsonError")}),s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(Ie,{language:"json",height:"100%",code:$,onChange:Y,onSave:z=>{Y(z),H()}})})]})]}),Q&&s.jsx(rt,{singular:F,result:{isPending:A.isPending,error:A.error,data:A.data,hasRun:A.status!=="idle"},expanded:ee,onToggleExpand:()=>G(z=>!z),onOpenInNewTab:n?U:void 0,onClose:()=>{X(!1),G(!1)}})]}),s.jsx(Xe,{open:I,onOpenChange:L,defaultBlockId:"",isPending:x,onSubmit:q})]})}function rt(o){const e=W.c(54),{singular:l,result:n,expanded:t,onToggleExpand:a,onOpenInNewTab:i,onClose:r}=o,f=Z();let x;e[0]!==n.data?(x=typeof n.data=="string"?n.data:JSON.stringify(n.data??null,null,2),e[0]=n.data,e[1]=x):x=e[1];const b=x,h=t?"flex-1":"h-[45%] shrink-0";let p;e[2]!==h?(p=ne("flex min-h-0 flex-col border-t",h),e[2]=h,e[3]=p):p=e[3];let y;e[4]!==f?(y=f("sandbox.runnableBlockEditor.resultPanelTitle"),e[4]=f,e[5]=y):y=e[5];let m;e[6]!==y?(m=s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:y}),e[6]=y,e[7]=m):m=e[7];let d;e[8]!==i||e[9]!==l||e[10]!==f?(d=i&&s.jsxs(ue,{children:[s.jsx(fe,{asChild:!0,children:s.jsx(K,{variant:"ghost",size:"icon-sm",onClick:i,"aria-label":f("sandbox.runnableBlockEditor.openResultInNewTabAriaLabel"),children:s.jsx(Oe,{size:14})})}),s.jsx(me,{side:"bottom",children:f("sandbox.runnableBlockEditor.openInNewTabTooltip",{singular:l})})]}),e[8]=i,e[9]=l,e[10]=f,e[11]=d):d=e[11];let u;e[12]!==t||e[13]!==f?(u=f(t?"sandbox.runnableBlockEditor.collapseResult":"sandbox.runnableBlockEditor.expandResult"),e[12]=t,e[13]=f,e[14]=u):u=e[14];let c;e[15]!==t?(c=t?s.jsx(rs,{size:14}):s.jsx($s,{size:14}),e[15]=t,e[16]=c):c=e[16];let g;e[17]!==t||e[18]!==a||e[19]!==u||e[20]!==c?(g=s.jsx(fe,{asChild:!0,children:s.jsx(K,{variant:"ghost",size:"icon-sm",onClick:a,"aria-label":u,"aria-pressed":t,children:c})}),e[17]=t,e[18]=a,e[19]=u,e[20]=c,e[21]=g):g=e[21];let j;e[22]!==t||e[23]!==f?(j=f(t?"sandbox.runnableBlockEditor.collapse":"sandbox.runnableBlockEditor.expand"),e[22]=t,e[23]=f,e[24]=j):j=e[24];let v;e[25]!==j?(v=s.jsx(me,{side:"bottom",children:j}),e[25]=j,e[26]=v):v=e[26];let E;e[27]!==v||e[28]!==g?(E=s.jsxs(ue,{children:[g,v]}),e[27]=v,e[28]=g,e[29]=E):E=e[29];let k;e[30]!==f?(k=f("sandbox.runnableBlockEditor.closeResult"),e[30]=f,e[31]=k):k=e[31];let S;e[32]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(ye,{size:14}),e[32]=S):S=e[32];let N;e[33]!==r||e[34]!==k?(N=s.jsx(K,{variant:"ghost",size:"icon-sm",onClick:r,"aria-label":k,children:S}),e[33]=r,e[34]=k,e[35]=N):N=e[35];let _;e[36]!==E||e[37]!==N||e[38]!==d?(_=s.jsxs("div",{className:"flex items-center gap-0.5",children:[d,E,N]}),e[36]=E,e[37]=N,e[38]=d,e[39]=_):_=e[39];let w;e[40]!==_||e[41]!==m?(w=s.jsxs("div",{className:"flex h-9 shrink-0 items-center justify-between border-b px-3",children:[m,_]}),e[40]=_,e[41]=m,e[42]=w):w=e[42];let T;e[43]!==n.error||e[44]!==n.hasRun||e[45]!==n.isPending||e[46]!==b||e[47]!==l||e[48]!==f?(T=s.jsx("div",{className:"min-h-0 flex-1",children:n.isPending?s.jsxs("div",{className:"flex h-full items-center justify-center gap-2 text-xs text-muted-foreground",children:[s.jsx(je,{className:"size-4"}),f("sandbox.runnableBlockEditor.running",{singular:l})]}):n.error?s.jsxs("div",{className:"h-full overflow-auto px-4 py-3",children:[s.jsx("p",{className:"text-xs font-medium text-destructive",children:f("sandbox.runnableBlockEditor.failedToRun",{singular:l})}),s.jsx("pre",{className:"mt-1 whitespace-pre-wrap break-words text-xs text-destructive/90",children:n.error.message})]}):n.hasRun?s.jsx(Ie,{language:"json",height:"100%",code:b,readOnly:!0}):s.jsx("div",{className:"flex h-full items-center justify-center text-xs text-muted-foreground",children:f("sandbox.runnableBlockEditor.pressRunToInvoke",{singular:l})})}),e[43]=n.error,e[44]=n.hasRun,e[45]=n.isPending,e[46]=b,e[47]=l,e[48]=f,e[49]=T):T=e[49];let C;return e[50]!==w||e[51]!==T||e[52]!==p?(C=s.jsxs("div",{className:p,children:[w,T]}),e[50]=w,e[51]=T,e[52]=p,e[53]=C):C=e[53],C}function be(o,e,l){const n=l[o];return typeof n?.name=="string"&&n.name||o.replace(/[-_]/g," ").replace(/\b\w/g,t=>t.toUpperCase())||`Section ${e+1}`}function Wt(o,e,l=!1){return o.map((n,t)=>{const a=n.__resolveType??"",i=Se(a);if(!i&&a!==""&&pe(a)&&a in e)return{index:t,resolveType:a,label:be(a,t,e),isLazy:!1,isSavedBlock:!0};const r=i?n.section:void 0,f=i?r?.__resolveType??"":a;if(Te(f,l)){const b=i?r:n,h=Array.isArray(b?.variants)?b.variants:[];if(h.length===1&&Ye(h[0]?.rule?.__resolveType,l)){const m=he(h[0],l)??{};let d=m.__resolveType??"";const u=Se(d);let c=m;if(u){const g=m.section;d=g?.__resolveType??d,g&&(c=g)}if(Te(d,l)){const g=Array.isArray(c.variants)?c.variants:[],j=he(g[0],l)?.__resolveType,v=j?ce(j):"Section";return{index:t,resolveType:a,label:`Variants of ${v}`,variantOf:v,isHidden:!0,isLazy:u}}return d!==""&&pe(d)&&d in e?{index:t,resolveType:a,label:be(d,t,e),isHidden:!0,isLazy:u,isSavedBlock:!0}:{index:t,resolveType:a,label:ce(d)||`Section ${t+1}`,isHidden:!0,isLazy:u}}const p=he(h[0],l)?.__resolveType,y=p?ce(p):"Section";return{index:t,resolveType:a,label:`Variants of ${y}`,variantOf:y,isMultivariate:!0,isLazy:i}}const x=i?n.section?.__resolveType??a:a;return i&&x!==""&&pe(x)&&x in e?{index:t,resolveType:a,label:be(x,t,e),isLazy:!0,isSavedBlock:!0}:{index:t,resolveType:a,label:ce(x)||`Section ${t+1}`,isLazy:i}})}function Gt(o){let e=o.length;for(;e>0&&o[e-1]?.isSavedBlock;)e--;return e>0?e:Math.max(o.length-1,0)}export{Be as B,It as P,Kt as R,$t as S,nt as a,Dt as b,zt as c,Vt as d,et as e,Qs as f,At as g,Jt as h,Ft as l,Mt as m,Gt as n,Wt as p,Ut as r};
@@ -1 +1 @@
1
- import{c as f,a6 as g,am as P,K as _,i as y,m as h,j as d}from"./index-DokE5sNF.js";import{u as A}from"./use-entitlements-B_976V5P.js";function I(){const e=f.c(6),t=P(),a=A();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=_.aiPlanPrices(),e[0]=o):o=e[0];let n;e[1]!==t?(n=async()=>{const{prices:r}=await t.call("ORGANIZATION_BILLING_PLAN_PRICES",{});return Object.fromEntries(r.map(p))},e[1]=t,e[2]=n):n=e[2];let s;return e[3]!==a||e[4]!==n?(s={queryKey:o,enabled:a,staleTime:6e5,queryFn:n},e[3]=a,e[4]=n,e[5]=s):s=e[5],y(s)}function p(e){return[e.planId,{amountCents:e.amountCents,currency:e.currency,interval:e.interval}]}function v(e,t){return(e.amountCents/100).toLocaleString(t,{style:"currency",currency:e.currency.toUpperCase(),maximumFractionDigits:0})}const F=["chat","cms","credits","monitoring","kanban","model_choice","diagnostic_enriched"];function R(e,t){if(!e)return null;const a=e.findIndex(n=>n.features[t]===!0),o=a>=0?e[a]:void 0;return o?{plan:o,index:a}:null}const j="custom",N=new Set(["ai_service"]);function O(e){return!!e&&N.has(e)}const w="mailto:sales@deco.cx";function q(){const e=f.c(8),{org:t}=g(),a=P(),o=A();let n;e[0]!==t.id?(n=_.aiPlanCatalog(t.id),e[0]=t.id,e[1]=n):n=e[1];let s;e[2]!==a?(s=async()=>{const{plans:c}=await a.call("AI_PLAN_LIST",{providerId:"deco"});return c.filter(E)},e[2]=a,e[3]=s):s=e[3];let r;return e[4]!==o||e[5]!==n||e[6]!==s?(r={queryKey:n,enabled:o,staleTime:3e5,queryFn:s},e[4]=o,e[5]=n,e[6]=s,e[7]=r):r=e[7],y(r)}function E(e){return e.id!=="free"}const u=[{symbol:"starter",color:"text-chart-4"},{symbol:"growth",color:"text-chart-1"},{symbol:"scale",color:"text-brand-blue"}],L=u[u.length-1];function D(e){return S(e).color}function S(e){return u[Math.min(e,u.length-1)]??L}function K(e){const t=f.c(13),{index:a,className:o}=e;let n,s,r,c;if(t[0]!==o||t[1]!==a){const{symbol:b,color:x}=S(a);n=b,s="0 0 16 16",r="true",c=h("size-8 shrink-0",x,o),t[0]=o,t[1]=a,t[2]=n,t[3]=s,t[4]=r,t[5]=c}else n=t[2],s=t[3],r=t[4],c=t[5];const m=`/plan-icons.svg#${n}-icon`;let l;t[6]!==m?(l=d.jsx("use",{href:m}),t[6]=m,t[7]=l):l=t[7];let i;return t[8]!==s||t[9]!==r||t[10]!==c||t[11]!==l?(i=d.jsx("svg",{viewBox:s,"aria-hidden":r,className:c,children:l}),t[8]=s,t[9]=r,t[10]=c,t[11]=l,t[12]=i):i=t[12],i}export{j as C,F,K as P,w as S,I as a,D as b,v as f,O as i,R as p,q as u};
1
+ import{c as f,a6 as g,am as P,K as _,i as y,m as h,j as d}from"./index-_VeebRNE.js";import{u as A}from"./use-entitlements-B6kax2f9.js";function I(){const e=f.c(6),t=P(),a=A();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=_.aiPlanPrices(),e[0]=o):o=e[0];let n;e[1]!==t?(n=async()=>{const{prices:r}=await t.call("ORGANIZATION_BILLING_PLAN_PRICES",{});return Object.fromEntries(r.map(p))},e[1]=t,e[2]=n):n=e[2];let s;return e[3]!==a||e[4]!==n?(s={queryKey:o,enabled:a,staleTime:6e5,queryFn:n},e[3]=a,e[4]=n,e[5]=s):s=e[5],y(s)}function p(e){return[e.planId,{amountCents:e.amountCents,currency:e.currency,interval:e.interval}]}function v(e,t){return(e.amountCents/100).toLocaleString(t,{style:"currency",currency:e.currency.toUpperCase(),maximumFractionDigits:0})}const F=["chat","cms","credits","monitoring","kanban","model_choice","diagnostic_enriched"];function R(e,t){if(!e)return null;const a=e.findIndex(n=>n.features[t]===!0),o=a>=0?e[a]:void 0;return o?{plan:o,index:a}:null}const j="custom",N=new Set(["ai_service"]);function O(e){return!!e&&N.has(e)}const w="mailto:sales@deco.cx";function q(){const e=f.c(8),{org:t}=g(),a=P(),o=A();let n;e[0]!==t.id?(n=_.aiPlanCatalog(t.id),e[0]=t.id,e[1]=n):n=e[1];let s;e[2]!==a?(s=async()=>{const{plans:c}=await a.call("AI_PLAN_LIST",{providerId:"deco"});return c.filter(E)},e[2]=a,e[3]=s):s=e[3];let r;return e[4]!==o||e[5]!==n||e[6]!==s?(r={queryKey:n,enabled:o,staleTime:3e5,queryFn:s},e[4]=o,e[5]=n,e[6]=s,e[7]=r):r=e[7],y(r)}function E(e){return e.id!=="free"}const u=[{symbol:"starter",color:"text-chart-4"},{symbol:"growth",color:"text-chart-1"},{symbol:"scale",color:"text-brand-blue"}],L=u[u.length-1];function D(e){return S(e).color}function S(e){return u[Math.min(e,u.length-1)]??L}function K(e){const t=f.c(13),{index:a,className:o}=e;let n,s,r,c;if(t[0]!==o||t[1]!==a){const{symbol:b,color:x}=S(a);n=b,s="0 0 16 16",r="true",c=h("size-8 shrink-0",x,o),t[0]=o,t[1]=a,t[2]=n,t[3]=s,t[4]=r,t[5]=c}else n=t[2],s=t[3],r=t[4],c=t[5];const m=`/plan-icons.svg#${n}-icon`;let l;t[6]!==m?(l=d.jsx("use",{href:m}),t[6]=m,t[7]=l):l=t[7];let i;return t[8]!==s||t[9]!==r||t[10]!==c||t[11]!==l?(i=d.jsx("svg",{viewBox:s,"aria-hidden":r,className:c,children:l}),t[8]=s,t[9]=r,t[10]=c,t[11]=l,t[12]=i):i=t[12],i}export{j as C,F,K as P,w as S,I as a,D as b,v as f,O as i,R as p,q as u};
@@ -1 +1 @@
1
- import{c as b,b as P,j as t,n as w,m as N}from"./index-DokE5sNF.js";import{ChatLayout as C}from"./index-BuF029H4.js";import{i as y,n as $,a as z}from"./TrendUp01-Cb0Ss3qG.js";import{B as I}from"./badge-CXWhQd3j.js";import"./use-mobile-YQVdSq9V.js";import"./tooltip-CqEoC-F2.js";import"./index-BesTIQjb.js";import"./MessageCircle01-DVvYPWC-.js";import"./XClose-lVRJTaql.js";import"./thread-button-DZPQxeV0.js";import"./use-sidebar-collapsed-DIdfXbOr.js";import"./sheet-DUgkYIwI.js";import"./use-chat-layout-state-CyAMAqyg.js";import"./use-panel-navigate-DYNTPDzL.js";import"./thread-route-9-m2-1gn.js";import"./use-project-scope-Zk4IP7B6.js";import"./repository-binding-CBLNaLcn.js";import"./use-mcp-client-DVaNUeKZ.js";import"./auth-CTQZGBnP.js";import"./toolbar-icon-button-dQBEwFVn.js";import"./use-in-settings-DvVa8LTW.js";import"./resizable-CFBuzfqY.js";import"./route-page-header-9cHtL5F_.js";import"./LayoutLeft-551J-MO9.js";import"./use-current-view-xnQlJLn5.js";const K={plan:{heading:"home.comingSoon.planHeading",description:"home.comingSoon.planDescription",points:[{Icon:y,labelKey:"home.comingSoon.planGoals",tone:"bg-chart-2/15 text-chart-2"},{Icon:$,labelKey:"home.comingSoon.planTasks",tone:"bg-chart-1/15 text-chart-1"},{Icon:z,labelKey:"home.comingSoon.planProgress",tone:"bg-chart-4/15 text-chart-4"}]}};function L(s){const e=b.c(4),{className:f}=s;let l;e[0]!==f?(l=N("block h-2 rounded-full bg-muted",f),e[0]=f,e[1]=l):l=e[1];let n;return e[2]!==l?(n=t.jsx("span",{className:l}),e[2]=l,e[3]=n):n=e[3],n}const R=[{title:"w-32",fill:"w-[72%]",tone:"bg-chart-2",value:"72%"},{title:"w-24",fill:"w-[45%]",tone:"bg-chart-1",value:"45%"},{title:"w-28",fill:"w-[88%]",tone:"bg-chart-4",value:"88%"}];function B(){const s=b.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex flex-col gap-5",children:R.map(E)}),s[0]=e):e=s[0],e}function E(s){return t.jsxs("div",{className:"flex flex-col gap-2.5",children:[t.jsxs("div",{className:"flex items-center gap-2.5",children:[t.jsx("span",{className:"flex size-6 items-center justify-center rounded-md bg-muted text-muted-foreground",children:t.jsx(y,{size:14})}),t.jsx(L,{className:s.title}),t.jsx("span",{className:"ml-auto text-xs font-medium tabular-nums text-muted-foreground",children:s.value})]}),t.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-muted",children:t.jsx("div",{className:N("h-full rounded-full",s.fill,s.tone)})})]},s.value)}function G(s){const e=b.c(30),{kind:f}=s,l=P(),n=K[f];let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("div",{className:"absolute inset-x-10 -top-4 h-40 rounded-full bg-chart-2/20 blur-3xl"}),e[0]=u):u=e[0];let h;e[1]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsxs("div",{"aria-hidden":!0,className:"relative w-full max-w-md",children:[u,t.jsx("div",{className:"relative surface p-6 [mask-image:linear-gradient(to_bottom,black_65%,transparent)]",children:t.jsx(B,{})})]}),e[1]=h):h=e[1];let i;e[2]!==l?(i=l("home.comingSoon.badge"),e[2]=l,e[3]=i):i=e[3];let o;e[4]!==i?(o=t.jsx(I,{variant:"muted",children:i}),e[4]=i,e[5]=o):o=e[5];let a;e[6]!==n.heading||e[7]!==l?(a=l(n.heading),e[6]=n.heading,e[7]=l,e[8]=a):a=e[8];let r;e[9]!==a?(r=t.jsx("h1",{className:"text-2xl font-medium text-balance text-foreground",children:a}),e[9]=a,e[10]=r):r=e[10];let c;e[11]!==n.description||e[12]!==l?(c=l(n.description),e[11]=n.description,e[12]=l,e[13]=c):c=e[13];let m;e[14]!==c?(m=t.jsx("p",{className:"max-w-md text-sm text-pretty text-muted-foreground",children:c}),e[14]=c,e[15]=m):m=e[15];let d;e[16]!==o||e[17]!==r||e[18]!==m?(d=t.jsxs("div",{className:"flex flex-col items-center gap-3 text-center",children:[o,r,m]}),e[16]=o,e[17]=r,e[18]=m,e[19]=d):d=e[19];let p;if(e[20]!==n.points||e[21]!==l){let j;e[23]!==l?(j=S=>{const{Icon:_,labelKey:v,tone:k}=S;return t.jsxs("li",{className:"flex items-center gap-3 surface p-4 sm:flex-col sm:items-start",children:[t.jsx("span",{className:N("flex size-9 shrink-0 items-center justify-center rounded-lg",k),children:t.jsx(_,{size:18})}),t.jsx("span",{className:"text-sm text-foreground",children:l(v)})]},v)},e[23]=l,e[24]=j):j=e[24],p=n.points.map(j),e[20]=n.points,e[21]=l,e[22]=p}else p=e[22];let x;e[25]!==p?(x=t.jsx("ul",{className:"grid w-full gap-3 sm:grid-cols-3",children:p}),e[25]=p,e[26]=x):x=e[26];let g;return e[27]!==x||e[28]!==d?(g=t.jsx(w,{children:t.jsx(w.Content,{children:t.jsxs("div",{className:"mx-auto flex w-full max-w-2xl flex-col items-center gap-10 px-4 pt-12 pb-16 md:pt-20",children:[h,d,x]})})}),e[27]=x,e[28]=d,e[29]=g):g=e[29],g}function ce(){const s=b.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(C.Content,{children:t.jsx(G,{kind:"plan"})}),s[0]=e):e=s[0],e}export{ce as default};
1
+ import{c as b,b as P,j as t,n as w,m as N}from"./index-_VeebRNE.js";import{ChatLayout as C}from"./index-wdSinBQm.js";import{i as y,n as $,a as z}from"./TrendUp01-C_SySyBC.js";import{B as I}from"./badge-DCIHIkLr.js";import"./use-mobile-FS1bh43h.js";import"./tooltip-BYnWhoO-.js";import"./index-PcrdQb7V.js";import"./MessageCircle01-D170V1-p.js";import"./XClose-C9ONGfkv.js";import"./thread-button-DCHp9tO9.js";import"./use-sidebar-collapsed-9Vi_PrVo.js";import"./sheet-8iInbf9D.js";import"./use-chat-layout-state-DMWJLUZv.js";import"./use-panel-navigate-D4GuHOu1.js";import"./thread-route-D_C8d7xK.js";import"./use-project-scope-CpfOkL8I.js";import"./repository-binding-Ct6tvS6k.js";import"./use-mcp-client-UP8_tZ9p.js";import"./auth-vqpzzu5D.js";import"./toolbar-icon-button-BAHC2wln.js";import"./use-in-settings-jNNDWh86.js";import"./resizable-TldGXL10.js";import"./route-page-header-B8Mmh-Yn.js";import"./LayoutLeft-_2SG51dD.js";import"./use-current-view-a6HKOM5X.js";const K={plan:{heading:"home.comingSoon.planHeading",description:"home.comingSoon.planDescription",points:[{Icon:y,labelKey:"home.comingSoon.planGoals",tone:"bg-chart-2/15 text-chart-2"},{Icon:$,labelKey:"home.comingSoon.planTasks",tone:"bg-chart-1/15 text-chart-1"},{Icon:z,labelKey:"home.comingSoon.planProgress",tone:"bg-chart-4/15 text-chart-4"}]}};function L(s){const e=b.c(4),{className:f}=s;let l;e[0]!==f?(l=N("block h-2 rounded-full bg-muted",f),e[0]=f,e[1]=l):l=e[1];let n;return e[2]!==l?(n=t.jsx("span",{className:l}),e[2]=l,e[3]=n):n=e[3],n}const R=[{title:"w-32",fill:"w-[72%]",tone:"bg-chart-2",value:"72%"},{title:"w-24",fill:"w-[45%]",tone:"bg-chart-1",value:"45%"},{title:"w-28",fill:"w-[88%]",tone:"bg-chart-4",value:"88%"}];function B(){const s=b.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex flex-col gap-5",children:R.map(E)}),s[0]=e):e=s[0],e}function E(s){return t.jsxs("div",{className:"flex flex-col gap-2.5",children:[t.jsxs("div",{className:"flex items-center gap-2.5",children:[t.jsx("span",{className:"flex size-6 items-center justify-center rounded-md bg-muted text-muted-foreground",children:t.jsx(y,{size:14})}),t.jsx(L,{className:s.title}),t.jsx("span",{className:"ml-auto text-xs font-medium tabular-nums text-muted-foreground",children:s.value})]}),t.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-muted",children:t.jsx("div",{className:N("h-full rounded-full",s.fill,s.tone)})})]},s.value)}function G(s){const e=b.c(30),{kind:f}=s,l=P(),n=K[f];let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("div",{className:"absolute inset-x-10 -top-4 h-40 rounded-full bg-chart-2/20 blur-3xl"}),e[0]=u):u=e[0];let h;e[1]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsxs("div",{"aria-hidden":!0,className:"relative w-full max-w-md",children:[u,t.jsx("div",{className:"relative surface p-6 [mask-image:linear-gradient(to_bottom,black_65%,transparent)]",children:t.jsx(B,{})})]}),e[1]=h):h=e[1];let i;e[2]!==l?(i=l("home.comingSoon.badge"),e[2]=l,e[3]=i):i=e[3];let o;e[4]!==i?(o=t.jsx(I,{variant:"muted",children:i}),e[4]=i,e[5]=o):o=e[5];let a;e[6]!==n.heading||e[7]!==l?(a=l(n.heading),e[6]=n.heading,e[7]=l,e[8]=a):a=e[8];let r;e[9]!==a?(r=t.jsx("h1",{className:"text-2xl font-medium text-balance text-foreground",children:a}),e[9]=a,e[10]=r):r=e[10];let c;e[11]!==n.description||e[12]!==l?(c=l(n.description),e[11]=n.description,e[12]=l,e[13]=c):c=e[13];let m;e[14]!==c?(m=t.jsx("p",{className:"max-w-md text-sm text-pretty text-muted-foreground",children:c}),e[14]=c,e[15]=m):m=e[15];let d;e[16]!==o||e[17]!==r||e[18]!==m?(d=t.jsxs("div",{className:"flex flex-col items-center gap-3 text-center",children:[o,r,m]}),e[16]=o,e[17]=r,e[18]=m,e[19]=d):d=e[19];let p;if(e[20]!==n.points||e[21]!==l){let j;e[23]!==l?(j=S=>{const{Icon:_,labelKey:v,tone:k}=S;return t.jsxs("li",{className:"flex items-center gap-3 surface p-4 sm:flex-col sm:items-start",children:[t.jsx("span",{className:N("flex size-9 shrink-0 items-center justify-center rounded-lg",k),children:t.jsx(_,{size:18})}),t.jsx("span",{className:"text-sm text-foreground",children:l(v)})]},v)},e[23]=l,e[24]=j):j=e[24],p=n.points.map(j),e[20]=n.points,e[21]=l,e[22]=p}else p=e[22];let x;e[25]!==p?(x=t.jsx("ul",{className:"grid w-full gap-3 sm:grid-cols-3",children:p}),e[25]=p,e[26]=x):x=e[26];let g;return e[27]!==x||e[28]!==d?(g=t.jsx(w,{children:t.jsx(w.Content,{children:t.jsxs("div",{className:"mx-auto flex w-full max-w-2xl flex-col items-center gap-10 px-4 pt-12 pb-16 md:pt-20",children:[h,d,x]})})}),e[27]=x,e[28]=d,e[29]=g):g=e[29],g}function ce(){const s=b.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(C.Content,{children:t.jsx(G,{kind:"plan"})}),s[0]=e):e=s[0],e}export{ce as default};
@@ -1,4 +1,4 @@
1
- import{r as Y,j as s,dX as me,hR as ye,c as G,m as X,b_ as Pe,b as q,a6 as se,am as Z,q as _e,e as ae,J as ge,B as V,I as Se,t as W,K as ee,aJ as we,aK as Ee,aL as Ae,aM as Ie,b9 as Ue,aN as De,aO as Te,aP as Re,gh as le,gV as ne,i as xe,e0 as pe,b6 as $e,as as Be,au as Le,L as ke,gG as He}from"./index-DokE5sNF.js";import{s as Oe}from"./Plus-B-S-SZ1j.js";import{B as Fe}from"./badge-CXWhQd3j.js";import{a as Me,b as ze,P as Ve}from"./popover-BNjsYhzT.js";import{a as ce,T as Ge}from"./toggle-group-C134tdMJ.js";import{g as Ke}from"./use-ai-providers-Khsm6etv.js";import{u as ie,d as he,a as qe}from"./use-entitlements-B_976V5P.js";import{u as Qe,P as Ye}from"./plan-ladder-pqZJNBpW.js";var re="Progress",oe=100,[Xe]=ye(re),[Ze,Je]=Xe(re),ve=Y.forwardRef((e,t)=>{const{__scopeProgress:n,value:o=null,max:a,getValueLabel:l=We,...c}=e;(a||a===0)&&!de(a)&&console.error(et(`${a}`,"Progress"));const i=de(a)?a:oe;o!==null&&!ue(o,i)&&console.error(tt(`${o}`,"Progress"));const r=ue(o,i)?o:null,u=te(r)?l(r,i):void 0;return s.jsx(Ze,{scope:n,value:r,max:i,children:s.jsx(me.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":te(r)?r:void 0,"aria-valuetext":u,role:"progressbar","data-state":Ne(r,i),"data-value":r??void 0,"data-max":i,...c,ref:t})})});ve.displayName=re;var be="ProgressIndicator",je=Y.forwardRef((e,t)=>{const{__scopeProgress:n,...o}=e,a=Je(be,n);return s.jsx(me.div,{"data-state":Ne(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...o,ref:t})});je.displayName=be;function We(e,t){return`${Math.round(e/t*100)}%`}function Ne(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function te(e){return typeof e=="number"}function de(e){return te(e)&&!isNaN(e)&&e>0}function ue(e,t){return te(e)&&!isNaN(e)&&e<=t&&e>=0}function et(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${oe}\`.`}function tt(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
1
+ import{r as Y,j as s,dX as me,hR as ye,c as G,m as X,b_ as Pe,b as q,a6 as se,am as Z,q as _e,e as ae,J as ge,B as V,I as Se,t as W,K as ee,aJ as we,aK as Ee,aL as Ae,aM as Ie,b9 as Ue,aN as De,aO as Te,aP as Re,gh as le,gV as ne,i as xe,e0 as pe,b6 as $e,as as Be,au as Le,L as ke,gG as He}from"./index-_VeebRNE.js";import{s as Oe}from"./Plus-BYodv7tE.js";import{B as Fe}from"./badge-DCIHIkLr.js";import{a as Me,b as ze,P as Ve}from"./popover-CsisCWO2.js";import{a as ce,T as Ge}from"./toggle-group-n8suP90I.js";import{g as Ke}from"./use-ai-providers-D6peTC8u.js";import{u as ie,d as he,a as qe}from"./use-entitlements-B6kax2f9.js";import{u as Qe,P as Ye}from"./plan-ladder-Boo36Lf_.js";var re="Progress",oe=100,[Xe]=ye(re),[Ze,Je]=Xe(re),ve=Y.forwardRef((e,t)=>{const{__scopeProgress:n,value:o=null,max:a,getValueLabel:l=We,...c}=e;(a||a===0)&&!de(a)&&console.error(et(`${a}`,"Progress"));const i=de(a)?a:oe;o!==null&&!ue(o,i)&&console.error(tt(`${o}`,"Progress"));const r=ue(o,i)?o:null,u=te(r)?l(r,i):void 0;return s.jsx(Ze,{scope:n,value:r,max:i,children:s.jsx(me.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":te(r)?r:void 0,"aria-valuetext":u,role:"progressbar","data-state":Ne(r,i),"data-value":r??void 0,"data-max":i,...c,ref:t})})});ve.displayName=re;var be="ProgressIndicator",je=Y.forwardRef((e,t)=>{const{__scopeProgress:n,...o}=e,a=Je(be,n);return s.jsx(me.div,{"data-state":Ne(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...o,ref:t})});je.displayName=be;function We(e,t){return`${Math.round(e/t*100)}%`}function Ne(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function te(e){return typeof e=="number"}function de(e){return te(e)&&!isNaN(e)&&e>0}function ue(e,t){return te(e)&&!isNaN(e)&&e<=t&&e>=0}function et(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${oe}\`.`}function tt(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
2
2
  - a positive number
3
3
  - less than the value passed to \`max\` (or ${oe} if no \`max\` prop is set)
4
4
  - \`null\` or \`undefined\` if the progress is indeterminate.
@@ -1 +1 @@
1
- import{r as l,c4 as _,j as c,c6 as j,c7 as x,c5 as w,c1 as z,c2 as G,c3 as H,cb as E,ck as K,e1 as b,cf as U,ch as V,cl as W,cg as Z,ci as q,cj as B,cm as J,cn as Q,c9 as X,c as R,m as Y}from"./index-DokE5sNF.js";var A="Popover",[N]=K(A,[E]),m=E(),[ee,P]=N(A),F=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,i=m(e),u=l.useRef(null),[f,v]=l.useState(!1),[g,p]=z({prop:r,defaultProp:n??!1,onChange:s,caller:A});return c.jsx(G,{...i,children:c.jsx(ee,{scope:e,contentId:H(),triggerRef:u,open:g,onOpenChange:p,onOpenToggle:l.useCallback(()=>p(d=>!d),[p]),hasCustomAnchor:f,onCustomAnchorAdd:l.useCallback(()=>v(!0),[]),onCustomAnchorRemove:l.useCallback(()=>v(!1),[]),modal:a,children:o})})};F.displayName=A;var y="PopoverAnchor",S=l.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(y,o),s=m(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:i}=n;return l.useEffect(()=>(a(),()=>i()),[a,i]),c.jsx(w,{...s,...r,ref:e})});S.displayName=y;var D="PopoverTrigger",M=l.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(D,o),s=m(o),a=_(e,n.triggerRef),i=c.jsx(j.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":L(n.open),...r,ref:a,onClick:x(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?i:c.jsx(w,{asChild:!0,...s,children:i})});M.displayName=D;var O="PopoverPortal",[oe,te]=N(O,{forceMount:void 0}),k=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=P(O,e);return c.jsx(oe,{scope:e,forceMount:o,children:c.jsx(b,{present:o||s.open,children:c.jsx(X,{asChild:!0,container:n,children:r})})})};k.displayName=O;var h="PopoverContent",T=l.forwardRef((t,e)=>{const o=te(h,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=P(h,t.__scopePopover);return c.jsx(b,{present:r||s.open,children:s.modal?c.jsx(ne,{...n,ref:e}):c.jsx(se,{...n,ref:e})})});T.displayName=h;var re=W("PopoverContent.RemoveScroll"),ne=l.forwardRef((t,e)=>{const o=P(h,t.__scopePopover),r=l.useRef(null),n=_(e,r),s=l.useRef(!1);return l.useEffect(()=>{const a=r.current;if(a)return U(a)},[]),c.jsx(V,{as:re,allowPinchZoom:!0,children:c.jsx(I,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:x(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:x(t.onPointerDownOutside,a=>{const i=a.detail.originalEvent,u=i.button===0&&i.ctrlKey===!0,f=i.button===2||u;s.current=f},{checkForDefaultPrevented:!1}),onFocusOutside:x(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),se=l.forwardRef((t,e)=>{const o=P(h,t.__scopePopover),r=l.useRef(!1),n=l.useRef(!1);return c.jsx(I,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),I=l.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:v,...g}=t,p=P(h,o),d=m(o);return Z(),c.jsx(q,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(B,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:v,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:f,onDismiss:()=>p.onOpenChange(!1),children:c.jsx(J,{"data-state":L(p.open),role:"dialog",id:p.contentId,...d,...g,ref:e,style:{...g.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),$="PopoverClose",ae=l.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P($,o);return c.jsx(j.button,{type:"button",...r,ref:e,onClick:x(t.onClick,()=>n.onOpenChange(!1))})});ae.displayName=$;var ce="PopoverArrow",ie=l.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=m(o);return c.jsx(Q,{...n,...r,ref:e})});ie.displayName=ce;function L(t){return t?"open":"closed"}var le=F,pe=S,de=M,ue=k,fe=T;function ge(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(le,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function Pe(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(de,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function he(t){const e=R.c(19);let o,r,n,s,a,i;e[0]!==t?({className:o,align:s,sideOffset:a,container:r,variant:i,...n}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s,e[5]=a,e[6]=i):(o=e[1],r=e[2],n=e[3],s=e[4],a=e[5],i=e[6]);const u=s===void 0?"center":s,f=a===void 0?4:a,v=i===void 0?"default":i,g=v==="glass"?"glass rounded-[0.875rem] px-3.5 py-3":"bg-popover border p-4 shadow-md";let p;e[7]!==o||e[8]!==g?(p=Y("notranslate 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-[var(--studio-surface-radius,var(--radius-lg))] overflow-hidden outline-hidden",g,o),e[7]=o,e[8]=g,e[9]=p):p=e[9];let d;e[10]!==u||e[11]!==n||e[12]!==f||e[13]!==p||e[14]!==v?(d=c.jsx(fe,{"data-slot":"popover-content",align:u,sideOffset:f,translate:"no","data-variant":v,className:p,...n}),e[10]=u,e[11]=n,e[12]=f,e[13]=p,e[14]=v,e[15]=d):d=e[15];let C;return e[16]!==r||e[17]!==d?(C=c.jsx(ue,{container:r,children:d}),e[16]=r,e[17]=d,e[18]=C):C=e[18],C}function xe(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-anchor",...o}),e[2]=o,e[3]=r):r=e[3],r}export{ge as P,Pe as a,he as b,xe as c};
1
+ import{r as l,c4 as _,j as c,c6 as j,c7 as x,c5 as w,c1 as z,c2 as G,c3 as H,cb as E,ck as K,e1 as b,cf as U,ch as V,cl as W,cg as Z,ci as q,cj as B,cm as J,cn as Q,c9 as X,c as R,m as Y}from"./index-_VeebRNE.js";var A="Popover",[N]=K(A,[E]),m=E(),[ee,P]=N(A),F=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,i=m(e),u=l.useRef(null),[f,v]=l.useState(!1),[g,p]=z({prop:r,defaultProp:n??!1,onChange:s,caller:A});return c.jsx(G,{...i,children:c.jsx(ee,{scope:e,contentId:H(),triggerRef:u,open:g,onOpenChange:p,onOpenToggle:l.useCallback(()=>p(d=>!d),[p]),hasCustomAnchor:f,onCustomAnchorAdd:l.useCallback(()=>v(!0),[]),onCustomAnchorRemove:l.useCallback(()=>v(!1),[]),modal:a,children:o})})};F.displayName=A;var y="PopoverAnchor",S=l.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(y,o),s=m(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:i}=n;return l.useEffect(()=>(a(),()=>i()),[a,i]),c.jsx(w,{...s,...r,ref:e})});S.displayName=y;var D="PopoverTrigger",M=l.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(D,o),s=m(o),a=_(e,n.triggerRef),i=c.jsx(j.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":L(n.open),...r,ref:a,onClick:x(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?i:c.jsx(w,{asChild:!0,...s,children:i})});M.displayName=D;var O="PopoverPortal",[oe,te]=N(O,{forceMount:void 0}),k=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=P(O,e);return c.jsx(oe,{scope:e,forceMount:o,children:c.jsx(b,{present:o||s.open,children:c.jsx(X,{asChild:!0,container:n,children:r})})})};k.displayName=O;var h="PopoverContent",T=l.forwardRef((t,e)=>{const o=te(h,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=P(h,t.__scopePopover);return c.jsx(b,{present:r||s.open,children:s.modal?c.jsx(ne,{...n,ref:e}):c.jsx(se,{...n,ref:e})})});T.displayName=h;var re=W("PopoverContent.RemoveScroll"),ne=l.forwardRef((t,e)=>{const o=P(h,t.__scopePopover),r=l.useRef(null),n=_(e,r),s=l.useRef(!1);return l.useEffect(()=>{const a=r.current;if(a)return U(a)},[]),c.jsx(V,{as:re,allowPinchZoom:!0,children:c.jsx(I,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:x(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:x(t.onPointerDownOutside,a=>{const i=a.detail.originalEvent,u=i.button===0&&i.ctrlKey===!0,f=i.button===2||u;s.current=f},{checkForDefaultPrevented:!1}),onFocusOutside:x(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),se=l.forwardRef((t,e)=>{const o=P(h,t.__scopePopover),r=l.useRef(!1),n=l.useRef(!1);return c.jsx(I,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),I=l.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:v,...g}=t,p=P(h,o),d=m(o);return Z(),c.jsx(q,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(B,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:v,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:f,onDismiss:()=>p.onOpenChange(!1),children:c.jsx(J,{"data-state":L(p.open),role:"dialog",id:p.contentId,...d,...g,ref:e,style:{...g.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),$="PopoverClose",ae=l.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P($,o);return c.jsx(j.button,{type:"button",...r,ref:e,onClick:x(t.onClick,()=>n.onOpenChange(!1))})});ae.displayName=$;var ce="PopoverArrow",ie=l.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=m(o);return c.jsx(Q,{...n,...r,ref:e})});ie.displayName=ce;function L(t){return t?"open":"closed"}var le=F,pe=S,de=M,ue=k,fe=T;function ge(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(le,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function Pe(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(de,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function he(t){const e=R.c(19);let o,r,n,s,a,i;e[0]!==t?({className:o,align:s,sideOffset:a,container:r,variant:i,...n}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s,e[5]=a,e[6]=i):(o=e[1],r=e[2],n=e[3],s=e[4],a=e[5],i=e[6]);const u=s===void 0?"center":s,f=a===void 0?4:a,v=i===void 0?"default":i,g=v==="glass"?"glass rounded-[0.875rem] px-3.5 py-3":"bg-popover border p-4 shadow-md";let p;e[7]!==o||e[8]!==g?(p=Y("notranslate 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-[var(--studio-surface-radius,var(--radius-lg))] overflow-hidden outline-hidden",g,o),e[7]=o,e[8]=g,e[9]=p):p=e[9];let d;e[10]!==u||e[11]!==n||e[12]!==f||e[13]!==p||e[14]!==v?(d=c.jsx(fe,{"data-slot":"popover-content",align:u,sideOffset:f,translate:"no","data-variant":v,className:p,...n}),e[10]=u,e[11]=n,e[12]=f,e[13]=p,e[14]=v,e[15]=d):d=e[15];let C;return e[16]!==r||e[17]!==d?(C=c.jsx(ue,{container:r,children:d}),e[16]=r,e[17]=d,e[18]=C):C=e[18],C}function xe(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-anchor",...o}),e[2]=o,e[3]=r):r=e[3],r}export{ge as P,Pe as a,he as b,xe as c};
@@ -0,0 +1 @@
1
+ import{c as it,b as pt,r as at,J as jt,j as e,m as et,B as tt,au as Ct}from"./index-_VeebRNE.js";import{E as Nt}from"./agent-icon-CfdcYUE7.js";import{b as Dt}from"./UserCheck01-Dqn7toBe.js";import{s as kt}from"./Plus-BYodv7tE.js";import{S as St}from"./scroll-area-EnKfGRfx.js";import{c as wt,s as Tt,b as ct,a as dt}from"./date-utils-CrvIKg-s.js";import{M as zt}from"./category-tree-yoWo8LKT.js";import{g as Et,d as Mt}from"./item-actions-0UZvaX_W.js";import"./AlertCircle-gyZP8TIO.js";import"./Tool01-D6InpKaj.js";import"./ArrowUp-DYnF34lU.js";import"./ArrowLeft-BSzt3fBA.js";import"./ArrowRight-BF8V67fk.js";import"./BookOpen01-CpYcxx0H.js";import"./Globe04-DzGa73Hy.js";import"./CheckCircle-CyybvOiK.js";import"./TrendUp01-C_SySyBC.js";import"./ChevronDown-DldgAfZA.js";import"./ChevronSelectorVertical-BbGwltuJ.js";import"./ChevronUp-Bt9-G08q.js";import"./UserSquare-e0qIxN1Q.js";import"./LinkBroken01-Br9NMWkB.js";import"./CreditCard01-vIJuQM5M.js";import"./File02-EV4Uhu5z.js";import"./MessageCircle01-D170V1-p.js";import"./SwitchHorizontal01-Daz2EgW0.js";import"./Eye-BLpLvSpN.js";import"./Image01-BqCHFUEp.js";import"./Key01-KTk95wIy.js";import"./LayoutLeft-_2SG51dD.js";import"./Minus-D88-u0DO.js";import"./Monitor01-Df3mZyNU.js";import"./Sun-BABGQWS8.js";import"./Play-PdUxpWZE.js";import"./SearchMd-Cuy8VOOG.js";import"./ShoppingBag01-pCIsQ-Jb.js";import"./Trash01-LecfbxTv.js";import"./Upload01-CABY93nl.js";import"./Users01-UF7lWU9g.js";import"./XClose-C9ONGfkv.js";import"./Zap-D-fE_V4E.js";import"./index-BdQq_4o_.js";import"./empty-message-Cs32P_FY.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-CHh11R95.js";import"./collapsible-BJX4Hk9k.js";import"./use-copy-DKfw8n-3.js";import"./usage-stats-CCyq9Zgo.js";import"./utils-CVEq3hMx.js";import"./markdown-CBoNEgkf.js";import"./chat-context-DSu9o-d-.js";import"./use-panel-navigate-D4GuHOu1.js";import"./thread-route-D_C8d7xK.js";import"./use-project-scope-CpfOkL8I.js";import"./repository-binding-Ct6tvS6k.js";import"./use-mcp-client-UP8_tZ9p.js";import"./auth-vqpzzu5D.js";import"./use-view-draft-kind-BLkqtU-Q.js";import"./use-blog-view-DQBrFMuV.js";import"./use-organization-settings-ByKdFGhE.js";import"./schema-Bawh3LAf.js";import"./task-board-CHctJwrW.js";import"./thread-intent-pC76uPwU.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-_tvuBMId.js";import"./session-runtime-DLIbUSWD.js";import"./use-entitlements-B6kax2f9.js";import"./use-ai-providers-D6peTC8u.js";import"./use-current-view-a6HKOM5X.js";import"./use-in-settings-jNNDWh86.js";import"./use-decopilot-events-B0JW1Gtz.js";import"./use-mobile-FS1bh43h.js";import"./tooltip-BYnWhoO-.js";import"./index-PcrdQb7V.js";import"./gateway-client-DDICMs0d.js";import"./form-B3cubXs5.js";import"./label-DZkEI5Ke.js";import"./task-key-B6H-3XJr.js";import"./use-task-board-items-DxcJSuMX.js";import"./config-iR6MS3mx.js";import"./task-route-CBxVmSL7.js";import"./project-index-QHWJWseM.js";import"./shell-layout-D8UbY9n5.js";import"./use-deployment-admin-BENsmKZ2.js";import"./admin-fetch-BhTJlAsX.js";import"./use-org-notice-D5zuQ4m5.js";import"./command-DsEpQe7b.js";import"./index-ykH_xCiZ.js";import"./integration-icon-D8pA0JHG.js";import"./project-icon-CoHnihPF.js";import"./use-navigate-to-agent-Dg2qYHJi.js";import"./use-debounced-value-BAma3ogA.js";import"./new-project-dialog-B9UZLlxE.js";import"./repository-picker-D7wgGSh_.js";import"./github-icon-lV5tv6c5.js";import"./useInfiniteQuery-CuAeAzcr.js";import"./infiniteQueryObserver-D7rUvD7y.js";import"./collection-search-DIaYviRG.js";import"./new-project-store-BzLAZn_u.js";import"./legacy-admin-welcome-dialog-ZZ1Gngd8.js";import"./drawer-Ckz_nyBH.js";import"./required-auth-layout-5KQLVPyY.js";import"./use-org-sso-QMFtipA-.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DtOO8I9w.js";import"./types-CdP485rd.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./sheet-8iInbf9D.js";import"./use-connection-cSaq7_i7.js";import"./use-mcp-prompts-BM9uSers.js";import"./use-thread-outputs-BRvk_pZG.js";import"./file-type-icon-C1PmpIi5.js";import"./section-array-field-DeIFn5hU.js";import"./blocks-tab-states-DeaA94XX.js";import"./site-editor-toast-Cjans_Z7.js";import"./use-sandbox-events-CPKES4Ee.js";import"./sandbox-url-D3mC8qhT.js";import"./use-blocks-v8-project-JOmELUJ6.js";import"./use-voice-input-Dv1QYOod.js";import"./popover-CsisCWO2.js";import"./index-QCTvcBUO.js";import"./checkbox-D4P_L8j1.js";import"./select-QgdI1Rfc.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./utils-Dovv0grx.js";import"./sandbox-git-api-DN6h_KqP.js";import"./empty-state-DGaA5_7F.js";import"./use-move-blocks-DAGy4lk4.js";import"./hosted-reconcile-CxvdumkL.js";import"./badge-DCIHIkLr.js";import"./empty-state-DvK349M1.js";import"./delete-copy-B8O2OJ6R.js";import"./use-never-published-DDbQ0Vt8.js";import"./search-input-JNlnu1vU.js";import"./tabs-C9s0KY6N.js";import"./active-indicator-CCMhAsc_.js";import"./use-file-configs-aENtp_va.js";import"./asset-utils-CTFQl8QO.js";import"./index-DAKnsBwp.js";import"./match-site-slug-config-B47_xZCi.js";import"./textarea-Cimn1xhl.js";import"./monaco-editor-D-AA2j7y.js";import"./editor-Dv1qkRGx.js";const ft="border-success/30 bg-success/10 text-success hover:bg-success/20",xt="border-dashed border-border bg-muted text-muted-foreground hover:bg-secondary-hover hover:text-accent-foreground";function yo(h){const t=it.c(83),{decofile:b,selectedKey:d,onSelect:o,onCreate:m,onReschedule:i,isCreating:D}=h,s=D===void 0?!1:D,r=pt(),[j,C]=at.useState(null),[rt]=jt(),[n,f]=at.useState(It),p=rt.language;let N;t[0]!==n||t[1]!==p?(N=new Intl.DateTimeFormat(p,{month:"long",year:"numeric"}).format(n),t[0]=n,t[1]=p,t[2]=N):N=t[2];const y=N;let x,u,l,c,v,k,S,w,T,z;if(t[3]!==n||t[4]!==b||t[5]!==j||t[6]!==s||t[7]!==p||t[8]!==y||t[9]!==m||t[10]!==i||t[11]!==o||t[12]!==d||t[13]!==r){const ut=new Intl.DateTimeFormat(p,{weekday:"short"}),gt=new Intl.DateTimeFormat(p,{dateStyle:"long"}),{byDay:ht,undated:ot}=Et(zt(b)),st=wt(n),bt=Tt(new Date);u="flex h-full w-full flex-col";let G;t[24]===Symbol.for("react.memo_cache_sentinel")?(G=()=>f(ct(new Date)),t[24]=G):G=t[24];let I;t[25]!==r?(I=r("sandbox.postCalendar.today"),t[25]=r,t[26]=I):I=t[26];let H;t[27]!==I?(H=e.jsx(tt,{variant:"outline",size:"sm",onClick:G,children:I}),t[27]=I,t[28]=H):H=t[28];let Q;t[29]===Symbol.for("react.memo_cache_sentinel")?(Q=()=>f(Lt),t[29]=Q):Q=t[29];let U;t[30]!==r?(U=r("sandbox.postCalendar.previous"),t[30]=r,t[31]=U):U=t[31];let V;t[32]===Symbol.for("react.memo_cache_sentinel")?(V=e.jsx(Dt,{size:16}),t[32]=V):V=t[32];let _;t[33]!==U?(_=e.jsx(tt,{variant:"ghost",size:"icon",onClick:Q,"aria-label":U,children:V}),t[33]=U,t[34]=_):_=t[34];let X;t[35]===Symbol.for("react.memo_cache_sentinel")?(X=()=>f(Pt),t[35]=X):X=t[35];let $;t[36]!==r?($=r("sandbox.postCalendar.next"),t[36]=r,t[37]=$):$=t[37];let Y;t[38]===Symbol.for("react.memo_cache_sentinel")?(Y=e.jsx(Ct,{size:16}),t[38]=Y):Y=t[38];let O;t[39]!==$?(O=e.jsx(tt,{variant:"ghost",size:"icon",onClick:X,"aria-label":$,children:Y}),t[39]=$,t[40]=O):O=t[40];let B;t[41]!==y?(B=e.jsx("h2",{className:"ml-2 text-base font-semibold capitalize",children:y}),t[41]=y,t[42]=B):B=t[42];let F;t[43]!==r?(F=r("sandbox.postCalendar.legendScheduled"),t[43]=r,t[44]=F):F=t[44];let R;t[45]!==F?(R=e.jsx(mt,{className:ft,label:F}),t[45]=F,t[46]=R):R=t[46];let A;t[47]!==r?(A=r("sandbox.postCalendar.legendUnscheduled"),t[47]=r,t[48]=A):A=t[48];let K;t[49]!==A?(K=e.jsx(mt,{className:xt,label:A}),t[49]=A,t[50]=K):K=t[50];let W;t[51]!==R||t[52]!==K?(W=e.jsxs("div",{className:"ml-auto flex items-center gap-4",children:[R,K]}),t[51]=R,t[52]=K,t[53]=W):W=t[53],t[54]!==H||t[55]!==_||t[56]!==O||t[57]!==B||t[58]!==W?(l=e.jsxs("div",{className:"flex items-center gap-2 px-4 h-12 border-b shrink-0",children:[H,_,O,B,W]}),t[54]=H,t[55]=_,t[56]=O,t[57]=B,t[58]=W,t[59]=l):l=t[59],z="relative flex-1 min-h-0",x=St,T="h-full",S="flex min-w-[880px] gap-4 p-4";let J;t[60]!==r?(J=r("sandbox.postCalendar.unscheduledHint"),t[60]=r,t[61]=J):J=t[61];let Z;t[62]!==J?(Z=e.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:J}),t[62]=J,t[63]=Z):Z=t[63],w=e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"grid grid-cols-7 mb-2",children:st[0]?.map(a=>e.jsx("div",{className:"px-2 text-2xs text-muted-foreground",children:ut.format(a)},a.getDay()))}),e.jsx("div",{className:"grid grid-cols-7 gap-px overflow-hidden rounded-lg border bg-border",children:st.flat().map(a=>{const yt=a.getMonth()===n.getMonth(),vt=ht.get(Mt(a))??[];return e.jsxs("div",{onDragOver:g=>{j&&(g.preventDefault(),g.dataTransfer.dropEffect="move")},onDrop:g=>{g.preventDefault();const lt=g.dataTransfer.getData("text/plain");C(null),lt&&i(lt,a)},className:et("group/day min-h-28 space-y-1 p-2 transition-colors",yt?"bg-background":"bg-muted/40",j&&"hover:bg-accent"),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:et("grid size-6 place-items-center rounded-full text-xs",a.getTime()===bt.getTime()?"bg-primary font-semibold text-primary-foreground":"text-muted-foreground"),children:a.getDate()}),e.jsx(tt,{variant:"ghost",size:"icon-xs",className:"opacity-0 transition-opacity group-hover/day:opacity-100 focus-visible:opacity-100",disabled:s,onClick:()=>m(a),"aria-label":r("sandbox.postCalendar.schedulePostOn",{date:gt.format(a)}),children:e.jsx(kt,{size:14})})]}),vt.map(g=>e.jsx(nt,{entry:g,active:g.post.key===d,draggable:g.scheduled,onSelect:o,onDragStateChange:C},g.post.key))]},a.getTime())})}),Z]}),c="w-[220px] shrink-0 space-y-2 self-start rounded-lg border border-dashed p-3",v=e.jsx("p",{className:"px-1 text-2xs font-medium text-muted-foreground",children:r("sandbox.postCalendar.undatedLabel",{count:ot.length})}),k=ot.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-2 px-2 py-8 text-center",children:[e.jsx(Nt,{size:20,className:"text-muted-foreground/60","aria-hidden":!0}),e.jsx("p",{className:"text-xs text-muted-foreground",children:r("sandbox.postCalendar.undatedEmpty")})]}):ot.map(a=>e.jsx(nt,{entry:a,active:a.post.key===d,draggable:!1,onSelect:o,onDragStateChange:C},a.post.key)),t[3]=n,t[4]=b,t[5]=j,t[6]=s,t[7]=p,t[8]=y,t[9]=m,t[10]=i,t[11]=o,t[12]=d,t[13]=r,t[14]=x,t[15]=u,t[16]=l,t[17]=c,t[18]=v,t[19]=k,t[20]=S,t[21]=w,t[22]=T,t[23]=z}else x=t[14],u=t[15],l=t[16],c=t[17],v=t[18],k=t[19],S=t[20],w=t[21],T=t[22],z=t[23];let E;t[64]!==c||t[65]!==v||t[66]!==k?(E=e.jsxs("div",{className:c,children:[v,k]}),t[64]=c,t[65]=v,t[66]=k,t[67]=E):E=t[67];let M;t[68]!==E||t[69]!==S||t[70]!==w?(M=e.jsxs("div",{className:S,children:[w,E]}),t[68]=E,t[69]=S,t[70]=w,t[71]=M):M=t[71];let P;t[72]!==x||t[73]!==M||t[74]!==T?(P=e.jsx(x,{className:T,children:M}),t[72]=x,t[73]=M,t[74]=T,t[75]=P):P=t[75];let L;t[76]!==P||t[77]!==z?(L=e.jsx("div",{className:z,children:P}),t[76]=P,t[77]=z,t[78]=L):L=t[78];let q;return t[79]!==u||t[80]!==l||t[81]!==L?(q=e.jsxs("div",{className:u,children:[l,L]}),t[79]=u,t[80]=l,t[81]=L,t[82]=q):q=t[82],q}function Pt(h){return dt(h,1)}function Lt(h){return dt(h,-1)}function It(){return ct(new Date)}function mt(h){const t=it.c(7),{className:b,label:d}=h;let o;t[0]!==b?(o=et("size-3 rounded-sm border",b),t[0]=b,t[1]=o):o=t[1];let m;t[2]!==o?(m=e.jsx("span",{className:o}),t[2]=o,t[3]=m):m=t[3];let i;return t[4]!==d||t[5]!==m?(i=e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[m,d]}),t[4]=d,t[5]=m,t[6]=i):i=t[6],i}function nt(h){const t=it.c(23),{entry:b,active:d,draggable:o,onSelect:m,onDragStateChange:i}=h,D=pt(),{post:s,scheduled:r}=b,j=r?"sandbox.postCalendar.legendScheduled":"sandbox.postCalendar.legendUnscheduled";let C;t[0]!==D||t[1]!==j?(C=D(j),t[0]=D,t[1]=j,t[2]=C):C=t[2];const rt=C;let n;t[3]!==i||t[4]!==s.key?(n=v=>{v.dataTransfer.setData("text/plain",s.key),v.dataTransfer.effectAllowed="move",i(s.key)},t[3]=i,t[4]=s.key,t[5]=n):n=t[5];let f;t[6]!==i?(f=()=>i(null),t[6]=i,t[7]=f):f=t[7];let p;t[8]!==m||t[9]!==s.key?(p=()=>m(s.key),t[8]=m,t[9]=s.key,t[10]=p):p=t[10];const N=`${s.title} · ${rt}`,y=r?ft:xt,x=o&&"cursor-grab active:cursor-grabbing",u=d&&"ring-2 ring-primary";let l;t[11]!==y||t[12]!==x||t[13]!==u?(l=et("w-full truncate rounded-lg border px-2 py-1 text-left text-xs font-medium transition-colors",y,x,u),t[11]=y,t[12]=x,t[13]=u,t[14]=l):l=t[14];let c;return t[15]!==o||t[16]!==s.title||t[17]!==l||t[18]!==n||t[19]!==f||t[20]!==p||t[21]!==N?(c=e.jsx("button",{type:"button",draggable:o,onDragStart:n,onDragEnd:f,onClick:p,title:N,className:l,children:s.title}),t[15]=o,t[16]=s.title,t[17]=l,t[18]=n,t[19]=f,t[20]=p,t[21]=N,t[22]=c):c=t[22],c}export{yo as PostCalendar};