decocms 4.563.1 → 4.564.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (391) hide show
  1. package/dist/client/assets/{AlertCircle-CzNhPAKr.js → AlertCircle-CQ8p4KFs.js} +1 -1
  2. package/dist/client/assets/{AreaChart-jXN8ob1W.js → AreaChart-BG9b7IWq.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-BZrvcUxe.js → ArrowLeft-jRoq4RpN.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-BmvC0gDN.js → ArrowUp-WAaoRlHa.js} +1 -1
  5. package/dist/client/assets/{CartesianChart-Dr9bA6s0.js → CartesianChart-CGjmrhMJ.js} +1 -1
  6. package/dist/client/assets/{CategoricalChart-Db8BeNXp.js → CategoricalChart-hyHkOxr8.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-BfgWRJx4.js → CheckCircle-Buet-eH6.js} +1 -1
  8. package/dist/client/assets/{ChevronSelectorVertical-Dk3Ic8_G.js → ChevronSelectorVertical-DCDJ0sdb.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-CslLufEI.js → ChevronUp-BTGxI7Zs.js} +1 -1
  10. package/dist/client/assets/{CreditCard01-DKR27XQP.js → CreditCard01-CnLItLU2.js} +1 -1
  11. package/dist/client/assets/{Globe04-DD-_PtpP.js → Globe04-DMe5HSmJ.js} +1 -1
  12. package/dist/client/assets/{Key01-CNesFlbK.js → Key01-Dxtn8NGa.js} +1 -1
  13. package/dist/client/assets/{LinkBroken01-K7vV_sRk.js → LinkBroken01-CqkORUqT.js} +1 -1
  14. package/dist/client/assets/{Minus-DeqVl1Xe.js → Minus-D2T9DyMG.js} +1 -1
  15. package/dist/client/assets/{Monitor01-Bx36gCte.js → Monitor01-D-9i_0yJ.js} +1 -1
  16. package/dist/client/assets/{Play-CkRBFbju.js → Play-P7egrfAg.js} +1 -1
  17. package/dist/client/assets/{Plus-DtM4w8bA.js → Plus-DsyYMAU8.js} +1 -1
  18. package/dist/client/assets/{ReferenceLine-38pFjaQt.js → ReferenceLine-i4QcKbhg.js} +1 -1
  19. package/dist/client/assets/{SearchMd-Bbg1gFfR.js → SearchMd-CW5cmPaz.js} +1 -1
  20. package/dist/client/assets/{ShoppingBag01-DW9ACSlI.js → ShoppingBag01-CajIv2w8.js} +1 -1
  21. package/dist/client/assets/{Sun-DUSHragw.js → Sun-BZ5I37JT.js} +1 -1
  22. package/dist/client/assets/{SwitchHorizontal01-BCe-gFOc.js → SwitchHorizontal01-DqmEmDR5.js} +1 -1
  23. package/dist/client/assets/{Tool01-snML4pPn.js → Tool01-CSZn_Wh0.js} +1 -1
  24. package/dist/client/assets/{Tooltip-CNZGI5Tv.js → Tooltip-BueNEHzC.js} +1 -1
  25. package/dist/client/assets/{Trash01-DPGVoVI0.js → Trash01-DDMIP9jc.js} +1 -1
  26. package/dist/client/assets/{Upload01-B1K1jpRL.js → Upload01-DT2jBuxA.js} +1 -1
  27. package/dist/client/assets/{UserSquare-DgIYcYhA.js → UserSquare-DKikapRU.js} +1 -1
  28. package/dist/client/assets/{Users01-DeK6IcUy.js → Users01-NB4c6tGb.js} +1 -1
  29. package/dist/client/assets/{XClose-B40NOWtA.js → XClose-DpL893eV.js} +1 -1
  30. package/dist/client/assets/{Zap-PrQtyQ4u.js → Zap-DOqlsWJQ.js} +1 -1
  31. package/dist/client/assets/{access-gate-Czwg28Aa.js → access-gate-OrPI42qE.js} +1 -1
  32. package/dist/client/assets/{add-connection-dialog-CvoK8CuD.js → add-connection-dialog-C4a3y2Tw.js} +1 -1
  33. package/dist/client/assets/agent-app-ClOnnzDV.js +1 -0
  34. package/dist/client/assets/{agent-assets-BJMuyqMN.js → agent-assets-B6JReGpa.js} +1 -1
  35. package/dist/client/assets/{agent-automation-CC8RZvdz.js → agent-automation-CUEwumhB.js} +1 -1
  36. package/dist/client/assets/{agent-automations-Cv89ZDoQ.js → agent-automations-CUEa-MdA.js} +1 -1
  37. package/dist/client/assets/{agent-calendar-DWLtrh5a.js → agent-calendar-B-kfsJeA.js} +1 -1
  38. package/dist/client/assets/{agent-capabilities-DYSIvwwC.js → agent-capabilities-CmoLwTEk.js} +1 -1
  39. package/dist/client/assets/{agent-connect-sources-dcz4ghlO.js → agent-connect-sources-DCF_9i75.js} +1 -1
  40. package/dist/client/assets/agent-deck-V4MMZHZM.js +1 -0
  41. package/dist/client/assets/{agent-e2e-BecV8iK7.js → agent-e2e-Me1Y__d1.js} +1 -1
  42. package/dist/client/assets/agent-experiments-DH_tqVqH.js +1 -0
  43. package/dist/client/assets/{agent-file-CcRMmQIR.js → agent-file-C2urOOFa.js} +1 -1
  44. package/dist/client/assets/{agent-hosting-Bp7-sUtV.js → agent-hosting-bDpflwDy.js} +1 -1
  45. package/dist/client/assets/{agent-icon-_Y5eusMw.js → agent-icon-TjMVTO6h.js} +1 -1
  46. package/dist/client/assets/agent-library-Co57cOat.js +1 -0
  47. package/dist/client/assets/agent-library-file-C_ffGwfX.js +1 -0
  48. package/dist/client/assets/agent-overview-D_ilxAiM.js +1 -0
  49. package/dist/client/assets/{agent-releases-Kc5s36Dn.js → agent-releases-iFoEZYLj.js} +1 -1
  50. package/dist/client/assets/agent-settings-Fpuz9R9B.js +1 -0
  51. package/dist/client/assets/{agent-site-editor-DcjkqLR_.js → agent-site-editor-Bk0gdWbE.js} +1 -1
  52. package/dist/client/assets/agent-site-editor-code-CZax6TM0.js +2 -0
  53. package/dist/client/assets/agent-site-editor-content-BaWyOpGo.js +1 -0
  54. package/dist/client/assets/agent-site-editor-preview-BwBm5AOl.js +1 -0
  55. package/dist/client/assets/{agent-view-guard-coqrNjXy.js → agent-view-guard-CgD2SRHj.js} +1 -1
  56. package/dist/client/assets/agent-view-y52sDry1.js +1 -0
  57. package/dist/client/assets/{ai-providers-D_h0GcaP.js → ai-providers-DP_LPW_J.js} +1 -1
  58. package/dist/client/assets/{alert-h8V4X8Ql.js → alert-DOoQbEiz.js} +1 -1
  59. package/dist/client/assets/{analytics-sections-BBSHBKo9.js → analytics-sections-BnrB72yH.js} +1 -1
  60. package/dist/client/assets/{api-keys-BZ1sBCY5.js → api-keys-Cz-pcuKo.js} +1 -1
  61. package/dist/client/assets/api-keys-eCL0fGKt.js +1 -0
  62. package/dist/client/assets/{app-editor-CYkeSh8v.js → app-editor-BtQvbROq.js} +1 -1
  63. package/dist/client/assets/{asset-utils-0I7CXwnB.js → asset-utils-D0vrhEGW.js} +1 -1
  64. package/dist/client/assets/{auth-BFbUp7Gk.js → auth-Bo7mZ0XZ.js} +1 -1
  65. package/dist/client/assets/{auth-catchall-Ciz3QLIw.js → auth-catchall-DpoQiWR3.js} +1 -1
  66. package/dist/client/assets/{auth-entry-CIbESaRU.js → auth-entry-BjPguG1n.js} +1 -1
  67. package/dist/client/assets/{auth-split-layout-DXGPO57q.js → auth-split-layout-DZpBIwlD.js} +1 -1
  68. package/dist/client/assets/{authenticate-and-persist-oauth-CDOOyhvF.js → authenticate-and-persist-oauth-ntvNyemj.js} +1 -1
  69. package/dist/client/assets/{automation-list-row-cqG8j4NI.js → automation-list-row-BEFQKTX1.js} +1 -1
  70. package/dist/client/assets/{automation-runs-CJPBgcyt.js → automation-runs-DzWprxEK.js} +1 -1
  71. package/dist/client/assets/{automations-CUnI1LGP.js → automations-Bxf0CCXl.js} +1 -1
  72. package/dist/client/assets/{autosend-hIWj1gzu.js → autosend-U0ehaXsA.js} +1 -1
  73. package/dist/client/assets/{badge-DccxBHlR.js → badge-Dfaw3WBB.js} +1 -1
  74. package/dist/client/assets/{block-document-DQqooS8Z.js → block-document-6dm-00hY.js} +1 -1
  75. package/dist/client/assets/{blocks-preview-workspace-context-DHaN_ngV.js → blocks-preview-workspace-context-B_sPksUi.js} +1 -1
  76. package/dist/client/assets/{blocks-tab-states-CXVOpcLP.js → blocks-tab-states-eGTb5mvz.js} +1 -1
  77. package/dist/client/assets/{blog-schema-DZRuLzaf.js → blog-schema-Dsmv2ihg.js} +1 -1
  78. package/dist/client/assets/{buckets-CF13tBzF.js → buckets-C23i5gyQ.js} +1 -1
  79. package/dist/client/assets/{build-improve-prompt-doc-Csewa1WB.js → build-improve-prompt-doc-BCaQdWBF.js} +1 -1
  80. package/dist/client/assets/{calendar-CUq9MxZD.js → calendar-CmUvBlY1.js} +1 -1
  81. package/dist/client/assets/{capability-load-error-PMRTSYzm.js → capability-load-error-8rnJwJni.js} +1 -1
  82. package/dist/client/assets/{category-editor-f0PbIiVt.js → category-editor-Cf4WXU9v.js} +1 -1
  83. package/dist/client/assets/{chart-DHsiNcHK.js → chart-C0imxM4a.js} +1 -1
  84. package/dist/client/assets/{chat-context-zQ-qHQlQ.js → chat-context-BBpIuXC7.js} +1 -1
  85. package/dist/client/assets/{chat-draft-DnX_-WHk.js → chat-draft-CGuyKppk.js} +1 -1
  86. package/dist/client/assets/{checkbox-DNUaBZYX.js → checkbox-CTu0WRp7.js} +1 -1
  87. package/dist/client/assets/{choose-editor-Bre429IU.js → choose-editor-BG1SjT1d.js} +1 -1
  88. package/dist/client/assets/{cli-auth-success-xdbDz12_.js → cli-auth-success-C7trLL5C.js} +1 -1
  89. package/dist/client/assets/{client-icons-DbvjRooY.js → client-icons-DQougokE.js} +1 -1
  90. package/dist/client/assets/{cms-settings-editor-B3_YVdwE.js → cms-settings-editor-B30HFRSW.js} +1 -1
  91. package/dist/client/assets/{cms-store-drafts-BL8-fLzg.js → cms-store-drafts-BphiU1zo.js} +1 -1
  92. package/dist/client/assets/{collapsible-DEQoVVA9.js → collapsible-Ddfj_16s.js} +1 -1
  93. package/dist/client/assets/{collection-detail-Dl6n3nUb.js → collection-detail-Cm2aKNHg.js} +1 -1
  94. package/dist/client/assets/{collection-display-button-BgO5nlf5.js → collection-display-button-9rq6-Wdl.js} +1 -1
  95. package/dist/client/assets/{collection-search-BKCnDfDh.js → collection-search-BnR15-7O.js} +1 -1
  96. package/dist/client/assets/{collection-table-wrapper-BiwEx8lf.js → collection-table-wrapper-yg2kkMXP.js} +1 -1
  97. package/dist/client/assets/{collection-tabs-CLJwpk3w.js → collection-tabs-BC3eX7CT.js} +1 -1
  98. package/dist/client/assets/{combobox-BLt_NngQ.js → combobox-BWpli-Xr.js} +1 -1
  99. package/dist/client/assets/{command-CnM6TkoO.js → command-DF3tcytL.js} +1 -1
  100. package/dist/client/assets/{companion-mcps-section-DDgSYTAO.js → companion-mcps-section-C8SHo1sU.js} +1 -1
  101. package/dist/client/assets/{config-CTbwXMPm.js → config-CiEg0__n.js} +1 -1
  102. package/dist/client/assets/{connect-BzaGqaBY.js → connect-BGwBZ_Ka.js} +1 -1
  103. package/dist/client/assets/{connect-layout-BZ1xoFNF.js → connect-layout-DbCgCtqS.js} +1 -1
  104. package/dist/client/assets/{connect-source-dialog-BPQ5BKOR.js → connect-source-dialog-qP8ktZhS.js} +1 -1
  105. package/dist/client/assets/{connection-BWV5QLFO.js → connection-Dqu9RsNH.js} +1 -1
  106. package/dist/client/assets/{connection-card-xMr1YFzW.js → connection-card-BwHX3nOo.js} +1 -1
  107. package/dist/client/assets/{connection-detail-CGUXC9hw.js → connection-detail-DKP8tp8_.js} +1 -1
  108. package/dist/client/assets/{connection-form-helpers-CaRBbMf9.js → connection-form-helpers-BGJcgEzh.js} +1 -1
  109. package/dist/client/assets/{connection-slug-Ygf3Xiz0.js → connection-slug-taekJBaK.js} +1 -1
  110. package/dist/client/assets/{connections-wIdj6C4c.js → connections-cWHNOk6t.js} +1 -1
  111. package/dist/client/assets/{content-tab-D6UWTBDG.js → content-tab-BLJmurLN.js} +3 -3
  112. package/dist/client/assets/{context-B_HaMwVa.js → context-XrwEqwYe.js} +1 -1
  113. package/dist/client/assets/{context-menu-BOlWz_az.js → context-menu-gp9FU1Mh.js} +1 -1
  114. package/dist/client/assets/{context-shell-Cdw9KYb9.js → context-shell-DlBNmZfR.js} +3 -3
  115. package/dist/client/assets/{core.esm-BbSbwofB.js → core.esm-CTO4JGte.js} +1 -1
  116. package/dist/client/assets/{create-organization-dialog-Dzeh0MX0.js → create-organization-dialog-F-su-nyA.js} +1 -1
  117. package/dist/client/assets/{device-hint-D3M6OFi8.js → device-hint-tzTpy1A9.js} +1 -1
  118. package/dist/client/assets/{discover-DCcWfC01.js → discover-CkXTTHib.js} +1 -1
  119. package/dist/client/assets/{domain-settings-Ce2bhWej.js → domain-settings-Dfq6uTsb.js} +1 -1
  120. package/dist/client/assets/{drawer-D4DxFGqN.js → drawer-BgyRTjxD.js} +1 -1
  121. package/dist/client/assets/{editor-DKoVU6S3.js → editor-CyZCJa0L.js} +1 -1
  122. package/dist/client/assets/{editor-classes-DEInI3IT.js → editor-classes-D0UJsX59.js} +1 -1
  123. package/dist/client/assets/{empty-state-DMIzfRid.js → empty-state-Dx-vBzke.js} +1 -1
  124. package/dist/client/assets/{empty-state-CiXq08R1.js → empty-state-qO8fmVkF.js} +1 -1
  125. package/dist/client/assets/{experiments-tab-choice-DtHr55-O.js → experiments-tab-choice-BsONYetS.js} +1 -1
  126. package/dist/client/assets/{extract-connection-data-m9qRk70G.js → extract-connection-data-CI_UJ-ru.js} +1 -1
  127. package/dist/client/assets/{feature-gate-CbZSFCGe.js → feature-gate-0S4LDUGl.js} +1 -1
  128. package/dist/client/assets/{feature-paywall-BorE2qu6.js → feature-paywall-DbRigt-8.js} +1 -1
  129. package/dist/client/assets/{feedback-DM7ibKhA.js → feedback-DpZ51nw_.js} +1 -1
  130. package/dist/client/assets/{file-explorer-DgsYJwlc.js → file-explorer-Is8X98eh.js} +1 -1
  131. package/dist/client/assets/{file-preview-ClFQiMsH.js → file-preview-DA7tD6qn.js} +1 -1
  132. package/dist/client/assets/{file-share-button-oASYWaTp.js → file-share-button-DNqRplIB.js} +1 -1
  133. package/dist/client/assets/{file-type-icon-BgsOvG37.js → file-type-icon-DrIF_ach.js} +1 -1
  134. package/dist/client/assets/{folder-icon-CjXRQ1u4.js → folder-icon-CE9rKFgu.js} +1 -1
  135. package/dist/client/assets/{form-BV9LGfdZ.js → form-BmoTeXbP.js} +1 -1
  136. package/dist/client/assets/{general-BOq7h34V.js → general-Ds6mKAD-.js} +1 -1
  137. package/dist/client/assets/{github-icon-BoZFAAoR.js → github-icon-Cfkkw3me.js} +1 -1
  138. package/dist/client/assets/{home-Y-BAzROz.js → home-gn6ueFSP.js} +1 -1
  139. package/dist/client/assets/{home-overview-ztctpGGy.js → home-overview-Bk4OGXI-.js} +1 -1
  140. package/dist/client/assets/{hosted-reconcile-DgpDwrI2.js → hosted-reconcile-liA8Ue5e.js} +1 -1
  141. package/dist/client/assets/{icon-button-DeiyuWHW.js → icon-button-Cpw9GkVM.js} +1 -1
  142. package/dist/client/assets/{index-2dSYni92.js → index-3pV4g77m.js} +1 -1
  143. package/dist/client/assets/{index-DFF-_wih.js → index-B5Rq0Q_b.js} +1 -1
  144. package/dist/client/assets/{index-DHdEN2_u.js → index-B7P1i0U8.js} +1 -1
  145. package/dist/client/assets/{index-DbAn_rcU.js → index-BFqtpAvr.js} +1 -1
  146. package/dist/client/assets/{index-CDlOTJSg.js → index-BhO2XRBo.js} +1 -1
  147. package/dist/client/assets/{index-DzoENFz8.js → index-C90BaQbH.js} +1 -1
  148. package/dist/client/assets/{index-Dh9YHhq0.js → index-CU6Pikl7.js} +1 -1
  149. package/dist/client/assets/{index-BFUInOpF.js → index-Ckdck5oP.js} +1 -1
  150. package/dist/client/assets/{index-CxYhsN0K.js → index-CpV2sqUd.js} +1 -1
  151. package/dist/client/assets/{index-5iKTkoGz.js → index-Cst8xARc.js} +1 -1
  152. package/dist/client/assets/{index-CK6jFdOD.js → index-CtB8Tw63.js} +1 -1
  153. package/dist/client/assets/{index-DYiWplV5.js → index-DId4rr-A.js} +1 -1
  154. package/dist/client/assets/{index-CKcY9sA2.js → index-DLDJ3DHb.js} +1 -1
  155. package/dist/client/assets/{index-BEm4jG3I.js → index-DUKj5t3l.js} +1 -1
  156. package/dist/client/assets/{index-DSp2YJxk.js → index-DtPyNOkW.js} +1 -1
  157. package/dist/client/assets/{index-DxGCPS5f.js → index-cgovyYsQ.js} +3 -3
  158. package/dist/client/assets/{index-redirect-rsQ177qk.js → index-redirect-pAjv5SXQ.js} +1 -1
  159. package/dist/client/assets/{infiniteQueryObserver-BRbF_8wg.js → infiniteQueryObserver-D_MIEAF-.js} +1 -1
  160. package/dist/client/assets/{infra-billing-CskAuVtU.js → infra-billing-DRZUvwh3.js} +1 -1
  161. package/dist/client/assets/{input-CYN8nGNA.js → input-Dm8Dm-Qz.js} +1 -1
  162. package/dist/client/assets/{input-BznJkJE1.js → input-DuP90nBH.js} +3 -3
  163. package/dist/client/assets/{integration-icon-CivNYrxB.js → integration-icon-bQl-nSH8.js} +1 -1
  164. package/dist/client/assets/{jira-icon-EhOwRLcu.js → jira-icon-DBFOj94A.js} +1 -1
  165. package/dist/client/assets/{label-Co3RnKjI.js → label-BJpZpGc0.js} +1 -1
  166. package/dist/client/assets/{layout-ChuRSl3A.js → layout-7S8BP6VQ.js} +1 -1
  167. package/dist/client/assets/{legacy-agents-deep-D0c9eotJ.js → legacy-agents-deep-DR8nRly5.js} +1 -1
  168. package/dist/client/assets/{legacy-main-redirect-B6HagH9j.js → legacy-main-redirect-Dth5bVh1.js} +1 -1
  169. package/dist/client/assets/library-DgHRYlXy.js +1 -0
  170. package/dist/client/assets/{library-tab-QNwTrF2z.js → library-tab-BL_lF-ft.js} +1 -1
  171. package/dist/client/assets/{login-G4MQMu-X.js → login-DjUNKygv.js} +1 -1
  172. package/dist/client/assets/{markdown-BkKuf5yA.js → markdown-mKHkB6FI.js} +1 -1
  173. package/dist/client/assets/{mcp-app-renderer-AZxi3AlX.js → mcp-app-renderer-DjL0niPw.js} +1 -1
  174. package/dist/client/assets/{mcp-oauth-C-lvxcK7.js → mcp-oauth-BIp0LO3E.js} +1 -1
  175. package/dist/client/assets/{mcp-oauth-C3sBEl47.js → mcp-oauth-C7DXVMTi.js} +1 -1
  176. package/dist/client/assets/{members-fyMprese.js → members-CtRzSe07.js} +1 -1
  177. package/dist/client/assets/{memory-0qhTiXOS.js → memory-CRxleuoc.js} +1 -1
  178. package/dist/client/assets/{mock-board-B5Lo4WRg.js → mock-board-DnsUfCSW.js} +3 -3
  179. package/dist/client/assets/{monaco-editor-03CuhEOx.js → monaco-editor-CuW8q0yx.js} +1 -1
  180. package/dist/client/assets/{monitoring-BWMV-UnG.js → monitoring-9MjXgbIo.js} +1 -1
  181. package/dist/client/assets/{monitoring-stats-row-BHB7ML9p.js → monitoring-stats-row-BcsNTX2l.js} +1 -1
  182. package/dist/client/assets/{multi-select-BvRkhFxR.js → multi-select-D9xyRxxq.js} +1 -1
  183. package/dist/client/assets/{mustache-BRZEXzlS.js → mustache-8etVpD7L.js} +1 -1
  184. package/dist/client/assets/{named-rule-view-NWkI621l.js → named-rule-view-CTR1XvI8.js} +1 -1
  185. package/dist/client/assets/{new-project-dialog-B_Izhfc6.js → new-project-dialog-CG2L3MM-.js} +1 -1
  186. package/dist/client/assets/{oauth-callback-C3qf7NWs.js → oauth-callback-BbuovBw_.js} +1 -1
  187. package/dist/client/assets/{oauth-callback-ai-provider-BOCoomMC.js → oauth-callback-ai-provider-DHqdJcsI.js} +1 -1
  188. package/dist/client/assets/{oauth-consent-kRuFuPRq.js → oauth-consent-DweBwUQF.js} +1 -1
  189. package/dist/client/assets/{onboarding-C9TuarYv.js → onboarding-DrVndD7e.js} +1 -1
  190. package/dist/client/assets/{openai-conversation-C1V_CQca.js → openai-conversation-yopZy_vm.js} +1 -1
  191. package/dist/client/assets/{optimistic-project-sidebar-views-Ms5q90dF.js → optimistic-project-sidebar-views-DacJkxjX.js} +1 -1
  192. package/dist/client/assets/{order-monitor-day-B8IwQXNk.js → order-monitor-day-CKYfInMA.js} +1 -1
  193. package/dist/client/assets/{organization-choice-IdTamlIL.js → organization-choice-Fbcae3dn.js} +1 -1
  194. package/dist/client/assets/{orgs-D6Y9NZAy.js → orgs-DDZTEU_k.js} +1 -1
  195. package/dist/client/assets/{own-accounts-section-CX4xOba8.js → own-accounts-section-C1y0YP6A.js} +1 -1
  196. package/dist/client/assets/{pair-BzWauPYd.js → pair-C5AjfCSI.js} +1 -1
  197. package/dist/client/assets/{parse-sections-DE8GWmV_.js → parse-sections-Cu97Vu_M.js} +3 -3
  198. package/dist/client/assets/{plan-CANZ8MES.js → plan-BohW26kq.js} +1 -1
  199. package/dist/client/assets/{plan-ladder-CAL4h1RI.js → plan-ladder-BaPcuCG0.js} +1 -1
  200. package/dist/client/assets/{plan-usage-card-B0E1Mqx-.js → plan-usage-card-YdOsJ_ZX.js} +1 -1
  201. package/dist/client/assets/{popover-cnXo99rU.js → popover-ns8sHJq5.js} +1 -1
  202. package/dist/client/assets/{post-calendar-CR_baRyF.js → post-calendar-DXzGaukN.js} +1 -1
  203. package/dist/client/assets/{post-editor-DuGV7g7L.js → post-editor-DR58AVSj.js} +1 -1
  204. package/dist/client/assets/{preview-content-Cspo-rar.js → preview-content-VCoMFFk-.js} +1 -1
  205. package/dist/client/assets/{preview-dialog-sM6fzUlE.js → preview-dialog-Dhde6lFg.js} +1 -1
  206. package/dist/client/assets/{preview-panel-vDb65VC_.js → preview-panel-BL4zck9B.js} +1 -1
  207. package/dist/client/assets/{preview-tab-BjhtYZTR.js → preview-tab-Dw3ViDnI.js} +3 -3
  208. package/dist/client/assets/{product-picker-dialog-DL4criSm.js → product-picker-dialog-DtlAip15.js} +1 -1
  209. package/dist/client/assets/{profile-D0f8KwpQ.js → profile-CX0TYtL2.js} +1 -1
  210. package/dist/client/assets/{project-app-view-BAfcj1IV.js → project-app-view-DbconS9D.js} +1 -1
  211. package/dist/client/assets/{project-apps-DoVt9kS_.js → project-apps-DCer9_HY.js} +1 -1
  212. package/dist/client/assets/{project-icon-BnHxv46u.js → project-icon-BTrwq8bi.js} +1 -1
  213. package/dist/client/assets/{project-index-WJ4tXHCM.js → project-index-DwUzdWkU.js} +1 -1
  214. package/dist/client/assets/project-reports-BDw7SW7K.js +1 -0
  215. package/dist/client/assets/{project-sidebar-views-CLVZ96mT.js → project-sidebar-views-vqZZbL1p.js} +1 -1
  216. package/dist/client/assets/project-tasks-BrIInxOE.js +1 -0
  217. package/dist/client/assets/{projects-LpPdlGF4.js → projects-DRZyZAme.js} +1 -1
  218. package/dist/client/assets/{projects-empty-state-iR6Zz5-N.js → projects-empty-state-TY4kUtt4.js} +1 -1
  219. package/dist/client/assets/{prompts-XgZrzKUE.js → prompts-kv226h0M.js} +1 -1
  220. package/dist/client/assets/record-editor-Cybz45vp.js +1 -0
  221. package/dist/client/assets/{redirect-editor-D2q-6Lz4.js → redirect-editor-B3601TC3.js} +1 -1
  222. package/dist/client/assets/reports-9BRnMytv.js +1 -0
  223. package/dist/client/assets/{reports-5E4FVu6v.js → reports-C7qj5Hfb.js} +1 -1
  224. package/dist/client/assets/{reports-onboarding-DC_5ahpO.js → reports-onboarding-DW_hGBmK.js} +1 -1
  225. package/dist/client/assets/{reports-tab-CJb3-7vP.js → reports-tab-fjcRNutW.js} +2 -2
  226. package/dist/client/assets/{repositories-7NE-Y-fP.js → repositories-C9ox4SEq.js} +1 -1
  227. package/dist/client/assets/repositories-CSX3h8Qf.js +1 -0
  228. package/dist/client/assets/{repository-binding-C4_xIShf.js → repository-binding-CoBbz5GR.js} +1 -1
  229. package/dist/client/assets/{repository-picker-CX0VOapR.js → repository-picker-_0XvcaQZ.js} +1 -1
  230. package/dist/client/assets/{require-capability-1AcS0xbn.js → require-capability-BEaEpCmo.js} +1 -1
  231. package/dist/client/assets/{required-auth-layout-lwAsP7t-.js → required-auth-layout-CtQpY9CE.js} +1 -1
  232. package/dist/client/assets/{reset-password-DRB8IWFN.js → reset-password-DMO2Wfnx.js} +1 -1
  233. package/dist/client/assets/{resizable-CZ6UntWr.js → resizable-D1KNHtt_.js} +1 -1
  234. package/dist/client/assets/{resolve-tab-icon-JlFD9Ttu.js → resolve-tab-icon-DnI4GUKU.js} +1 -1
  235. package/dist/client/assets/{review-settings-DpoAEk87.js → review-settings-qBiQynjA.js} +1 -1
  236. package/dist/client/assets/{role-color-CAgewKmr.js → role-color-m3ekTafX.js} +1 -1
  237. package/dist/client/assets/roles-Dlv8qi0F.js +1 -0
  238. package/dist/client/assets/{route-CAQmwL3B.js → route-BwO9p6WQ.js} +1 -1
  239. package/dist/client/assets/route-C9j-dl8S.js +1 -0
  240. package/dist/client/assets/{route-BM3UxPQb.js → route-DBjrARiw.js} +1 -1
  241. package/dist/client/assets/{sandbox-lifecycle-context-ByyfF0kL.js → sandbox-lifecycle-context-6GAWc6Uh.js} +1 -1
  242. package/dist/client/assets/{schema-STdjEbAK.js → schema-BAc2zoda.js} +1 -1
  243. package/dist/client/assets/{schema-DyY5h7Rx.js → schema-D09C1K2b.js} +1 -1
  244. package/dist/client/assets/{scroll-area-DJvIk_1i.js → scroll-area-DhC9My5l.js} +1 -1
  245. package/dist/client/assets/{search-input-BRZEiJxt.js → search-input-CaK4kync.js} +1 -1
  246. package/dist/client/assets/{search-toggle-BW-nCNIt.js → search-toggle-DPRPz4f9.js} +1 -1
  247. package/dist/client/assets/{secret-picker-DvJbV8kU.js → secret-picker-KlL9XTXY.js} +1 -1
  248. package/dist/client/assets/{secrets-CQ4fmQqK.js → secrets-BRi5VdUF.js} +1 -1
  249. package/dist/client/assets/{section-array-field-CzG_jptj.js → section-array-field--v0XzXwk.js} +1 -1
  250. package/dist/client/assets/{sections-CHxeuMKy.js → sections-Dm0haO3S.js} +1 -1
  251. package/dist/client/assets/{sections-editor-B_kNIbOe.js → sections-editor-BpvyJAUh.js} +1 -1
  252. package/dist/client/assets/{select-C30nxii2.js → select-eZpStU_o.js} +1 -1
  253. package/dist/client/assets/{select-model-DRBYpCaL.js → select-model-BfBifSzm.js} +1 -1
  254. package/dist/client/assets/{seo-editor-DazAHwbK.js → seo-editor-PC4JhIxf.js} +1 -1
  255. package/dist/client/assets/{separator-vR8karC8.js → separator-DTEg-0rT.js} +1 -1
  256. package/dist/client/assets/settings-tab-BiP5If_9.js +1 -0
  257. package/dist/client/assets/{sheet-ClaqVLRv.js → sheet-DWPcPfVu.js} +1 -1
  258. package/dist/client/assets/{shell-layout-dHGD2tyJ.js → shell-layout-C_vTrOFi.js} +1 -1
  259. package/dist/client/assets/{site-draft-actions-BIA6lR1g.js → site-draft-actions-BHxYhtRx.js} +1 -1
  260. package/dist/client/assets/{site-draft-view-Ci2I7i9g.js → site-draft-view-B62lda-n.js} +1 -1
  261. package/dist/client/assets/site-editor-D-_GHa40.js +1 -0
  262. package/dist/client/assets/{site-editor-toast-CgoUJTSW.js → site-editor-toast-DtZvuCiL.js} +1 -1
  263. package/dist/client/assets/{skills-D1-DQBAA.js → skills-xTHKZ-fS.js} +1 -1
  264. package/dist/client/assets/{slider-B_ZUvu11.js → slider-Ciu4_ug0.js} +1 -1
  265. package/dist/client/assets/{sortable.esm-BqKBxgnm.js → sortable.esm-BpQuZ2Ss.js} +1 -1
  266. package/dist/client/assets/{sso-DFYqPjQF.js → sso-BBNnGqrM.js} +1 -1
  267. package/dist/client/assets/{suggestion-B-tT_3Ba.js → suggestion-C3ZKXBdN.js} +1 -1
  268. package/dist/client/assets/{switch-BhYC-gsU.js → switch-BMZWxSSe.js} +1 -1
  269. package/dist/client/assets/{synced-repos-CNpviR6w.js → synced-repos-CvcyOOTD.js} +1 -1
  270. package/dist/client/assets/{tab-icon-glyph-BrdbQUjH.js → tab-icon-glyph-C7CENxYE.js} +1 -1
  271. package/dist/client/assets/{table-Dioc_TQV.js → table-BXlZF1sj.js} +1 -1
  272. package/dist/client/assets/{tabs-t_453qON.js → tabs-CTACUnuC.js} +1 -1
  273. package/dist/client/assets/{task-board-T7oS4tjE.js → task-board-AmZMoSDj.js} +1 -1
  274. package/dist/client/assets/{task-route-BABnfdht.js → task-route-DZtDO9ed.js} +1 -1
  275. package/dist/client/assets/{task-status-B5yaN2e9.js → task-status-CHJ2KIGX.js} +1 -1
  276. package/dist/client/assets/{taskboard-analytics-CEOCzjed.js → taskboard-analytics-oNMzSYdF.js} +1 -1
  277. package/dist/client/assets/{tasks-CPtiTkqv.js → tasks-CbVjJ3WE.js} +1 -1
  278. package/dist/client/assets/tasks-haJ5q1d6.js +1 -0
  279. package/dist/client/assets/{textarea-CHZQytvO.js → textarea-eeqMJnUq.js} +1 -1
  280. package/dist/client/assets/{thread-analytics-w3Kn_9QO.js → thread-analytics-D2UkVv7U.js} +1 -1
  281. package/dist/client/assets/{thread-intent-DckhqhKt.js → thread-intent-B59SA_sa.js} +1 -1
  282. package/dist/client/assets/{thread-route-CIVmQ-Bx.js → thread-route-DT3i-QGQ.js} +1 -1
  283. package/dist/client/assets/{thread-route-DyG_eSJM.js → thread-route-Dpw37tsP.js} +1 -1
  284. package/dist/client/assets/{thread-sheet-body-C7OutFPd.js → thread-sheet-body-DfCWtsKP.js} +1 -1
  285. package/dist/client/assets/{time-range-picker-Dg1tvNlk.js → time-range-picker-Cd1A1wA5.js} +1 -1
  286. package/dist/client/assets/{toggle-group-CC2qDSue.js → toggle-group-C6Pg2YNy.js} +1 -1
  287. package/dist/client/assets/{tool-namespace-WdIPTHBa.js → tool-namespace-DbWzvuWO.js} +1 -1
  288. package/dist/client/assets/{tool-set-selector-By0-LDtv.js → tool-set-selector-CCOfv97s.js} +1 -1
  289. package/dist/client/assets/{toolbar-icon-button-CjbxTTYr.js → toolbar-icon-button-Cy2z0B4C.js} +1 -1
  290. package/dist/client/assets/{tooltip-xj6ZnC0s.js → tooltip-Bg4P3YaG.js} +1 -1
  291. package/dist/client/assets/{tooltipContext-BPLu0XDW.js → tooltipContext-DNapU3M5.js} +1 -1
  292. package/dist/client/assets/{track-Ba7_Ntbn.js → track-BAapDq3b.js} +1 -1
  293. package/dist/client/assets/{types-B8snWcBI.js → types-BrSjQREm.js} +1 -1
  294. package/dist/client/assets/{url-slug-Dv3zxns9.js → url-slug-DyPxKD3g.js} +1 -1
  295. package/dist/client/assets/{usage-stats-hNAp_EX0.js → usage-stats-Di2DK9Gv.js} +1 -1
  296. package/dist/client/assets/{use-ai-providers-8QFj-dPT.js → use-ai-providers-Bz3SR-CO.js} +1 -1
  297. package/dist/client/assets/{use-apply-named-rule-BKcXT1e9.js → use-apply-named-rule-BXKIXuir.js} +1 -1
  298. package/dist/client/assets/use-ask-in-chat-BF9v_lE6.js +1 -0
  299. package/dist/client/assets/{use-automations-CTbTqBX7.js → use-automations-BU5c4wvD.js} +1 -1
  300. package/dist/client/assets/{use-autosave-CiyRV4I8.js → use-autosave-CkIhfcE5.js} +1 -1
  301. package/dist/client/assets/use-blocks-v8-project-BSsXx46E.js +1 -0
  302. package/dist/client/assets/{use-chat-layout-state-D-U8t0kV.js → use-chat-layout-state-DvftxykM.js} +1 -1
  303. package/dist/client/assets/{use-cms-publish-actions-DmkL-hz5.js → use-cms-publish-actions-B3qNhOq8.js} +1 -1
  304. package/dist/client/assets/{use-connect-companion-Bwtrfh-M.js → use-connect-companion-3Wux1jMd.js} +1 -1
  305. package/dist/client/assets/{use-connection-B3EvPXuJ.js → use-connection-IiFidBLV.js} +1 -1
  306. package/dist/client/assets/{use-content-sync-C8Ux_RZ8.js → use-content-sync-BrMwpVNk.js} +1 -1
  307. package/dist/client/assets/{use-copy-O-MML7rC.js → use-copy-D49VwPhf.js} +1 -1
  308. package/dist/client/assets/{use-date-fns-locale-CP8lOmDn.js → use-date-fns-locale-DKLPMzYi.js} +1 -1
  309. package/dist/client/assets/{use-debounced-autosave-BXwcTWeY.js → use-debounced-autosave-CcnJ6SAY.js} +1 -1
  310. package/dist/client/assets/{use-debounced-value-DDir1rWd.js → use-debounced-value-nhqnKklo.js} +1 -1
  311. package/dist/client/assets/{use-deco-credits-Dy_Hg4i-.js → use-deco-credits-NgUo324z.js} +1 -1
  312. package/dist/client/assets/{use-decopilot-events-BAXWzGGN.js → use-decopilot-events-mew6sG2k.js} +1 -1
  313. package/dist/client/assets/{use-delete-connection-ZbJPfKIZ.js → use-delete-connection-D-oKvtiI.js} +1 -1
  314. package/dist/client/assets/{use-deployment-admin-DNwohGK9.js → use-deployment-admin-CHn3xyJc.js} +1 -1
  315. package/dist/client/assets/{use-entitlements-SlWYl1h3.js → use-entitlements-C6In-vfl.js} +1 -1
  316. package/dist/client/assets/{use-fast-preview-draft-url-DB6fawwn.js → use-fast-preview-draft-url-CIz-3ef3.js} +1 -1
  317. package/dist/client/assets/{use-file-configs-BiPsjSp0.js → use-file-configs-CwAhp36j.js} +1 -1
  318. package/dist/client/assets/{use-id-selection-CQGXhZf9.js → use-id-selection-mULmZ-Hz.js} +1 -1
  319. package/dist/client/assets/{use-inbox-feed-G78cFBlF.js → use-inbox-feed-CHAfyO1k.js} +1 -1
  320. package/dist/client/assets/{use-infinite-scroll-CuJmRWs3.js → use-infinite-scroll-fmrdKwVH.js} +1 -1
  321. package/dist/client/assets/{use-join-requests-BtFDzITE.js → use-join-requests-D9VYGJJu.js} +1 -1
  322. package/dist/client/assets/{use-main-panel-tabs-D_s_t2hY.js → use-main-panel-tabs-3c9VwMgJ.js} +1 -1
  323. package/dist/client/assets/{use-mcp-auth-status-C4Vaxyeo.js → use-mcp-auth-status-CK0IBQOj.js} +1 -1
  324. package/dist/client/assets/{use-mcp-client-BFuEikBh.js → use-mcp-client-B3mZDGvG.js} +1 -1
  325. package/dist/client/assets/{use-mcp-prompts-W7_z0mx2.js → use-mcp-prompts-DnVJp_BL.js} +1 -1
  326. package/dist/client/assets/{use-mcp-tools-Fkw183dy.js → use-mcp-tools-Dn8Dy7zb.js} +1 -1
  327. package/dist/client/assets/{use-mobile-COmq9TQM.js → use-mobile-dJL_Pm5y.js} +1 -1
  328. package/dist/client/assets/{use-move-blocks-DtAEvUrz.js → use-move-blocks-R4zS1l6g.js} +1 -1
  329. package/dist/client/assets/{use-navigate-to-agent-RGucqDuO.js → use-navigate-to-agent-CYu1HJsb.js} +1 -1
  330. package/dist/client/assets/{use-org-fs-B1VEI_Er.js → use-org-fs-C83fBFK-.js} +1 -1
  331. package/dist/client/assets/{use-org-repo-syncs-DE87oI9s.js → use-org-repo-syncs-CVhh3XbC.js} +1 -1
  332. package/dist/client/assets/{use-org-sso-RIE_JSyT.js → use-org-sso-BVcty70n.js} +1 -1
  333. package/dist/client/assets/{use-organization-settings-DqmiRW0D.js → use-organization-settings-D9LYxkkn.js} +1 -1
  334. package/dist/client/assets/{use-project-scope-CYZ0mCfQ.js → use-project-scope-Y6vAoZoW.js} +1 -1
  335. package/dist/client/assets/{use-recent-apps-D1NSRmBo.js → use-recent-apps-ZWyNF1BM.js} +1 -1
  336. package/dist/client/assets/{use-reports-diagnostic-DGd4jOlT.js → use-reports-diagnostic-CGaxGYkR.js} +1 -1
  337. package/dist/client/assets/use-sandbox-events-BFiAvETH.js +2 -0
  338. package/dist/client/assets/{use-secrets-B3RSCdMi.js → use-secrets-DLxKCtNq.js} +1 -1
  339. package/dist/client/assets/{use-section-preview-base-CvJ34UxX.js → use-section-preview-base-CNXXBKYv.js} +1 -1
  340. package/dist/client/assets/{use-sidebar-collapsed-DXX9If3C.js → use-sidebar-collapsed-SAa7Vnq8.js} +1 -1
  341. package/dist/client/assets/{use-tags-BjaNX9ld.js → use-tags-Dns9fjGu.js} +1 -1
  342. package/dist/client/assets/{use-task-board-analytics--QCcKCkA.js → use-task-board-analytics-D75AC0iX.js} +1 -1
  343. package/dist/client/assets/{use-task-board-events-p-Cj7F6A.js → use-task-board-events-Dv2JYyOG.js} +1 -1
  344. package/dist/client/assets/{use-task-board-item-prs-DRcN9Nsr.js → use-task-board-item-prs-DoH7p5yB.js} +1 -1
  345. package/dist/client/assets/{use-task-board-items-tdp7palw.js → use-task-board-items-CqIbwb7-.js} +1 -1
  346. package/dist/client/assets/{use-task-board-prompts-CPvlYwGk.js → use-task-board-prompts-ptkIJi--.js} +1 -1
  347. package/dist/client/assets/{use-task-metadata-D1snlV6w.js → use-task-metadata-D4qj8QP6.js} +1 -1
  348. package/dist/client/assets/{use-thread-outputs-bD7oL4Tg.js → use-thread-outputs-Btu23rT9.js} +1 -1
  349. package/dist/client/assets/{use-voice-input-CZ-OU5Nk.js → use-voice-input-Bo9Hi7-O.js} +1 -1
  350. package/dist/client/assets/useInfiniteQuery-BhHoWMFB.js +1 -0
  351. package/dist/client/assets/{useQueries-DSvnP38O.js → useQueries-Blq1gg86.js} +1 -1
  352. package/dist/client/assets/useSuspenseInfiniteQuery-DJxixS4t.js +1 -0
  353. package/dist/client/assets/{users-Bqa3Dwe4.js → users-CXxP5GbR.js} +1 -1
  354. package/dist/client/assets/{utils-Dk3SKS5y.js → utils-D_vHWhJR.js} +1 -1
  355. package/dist/client/assets/{variant-calendar-CD4VQuq0.js → variant-calendar-B-mtMhAk.js} +1 -1
  356. package/dist/client/assets/{variant-matcher-override-NriuY-7n.js → variant-matcher-override-hYkKBfSm.js} +1 -1
  357. package/dist/client/assets/{view-header-B6CnFcfB.js → view-header-DrakbT1r.js} +1 -1
  358. package/dist/client/assets/{virtual-mcp-D5NkkvKn.js → virtual-mcp-wPX8BO9V.js} +1 -1
  359. package/dist/client/assets/{watch-sse-pool-BKRouklE.js → watch-sse-pool-0ZXuPLm-.js} +1 -1
  360. package/dist/client/index.html +1 -1
  361. package/dist/server/cli.js +85 -57
  362. package/dist/server/server.js +707 -707
  363. package/package.json +1 -1
  364. package/dist/client/assets/agent-app-CIdQoDEi.js +0 -1
  365. package/dist/client/assets/agent-deck-79ukGlaD.js +0 -1
  366. package/dist/client/assets/agent-experiments-0rDHUtoa.js +0 -1
  367. package/dist/client/assets/agent-library-CGgf7yTT.js +0 -1
  368. package/dist/client/assets/agent-library-file-A_6ZSStB.js +0 -1
  369. package/dist/client/assets/agent-overview-CcczGeFG.js +0 -1
  370. package/dist/client/assets/agent-settings-BrQ-Mnfr.js +0 -1
  371. package/dist/client/assets/agent-site-editor-code-C9Vac5kP.js +0 -2
  372. package/dist/client/assets/agent-site-editor-content-BK40eFw4.js +0 -1
  373. package/dist/client/assets/agent-site-editor-preview-BmrJe1z-.js +0 -1
  374. package/dist/client/assets/agent-view-CwNNidpp.js +0 -1
  375. package/dist/client/assets/api-keys-Clz5-Ffr.js +0 -1
  376. package/dist/client/assets/library-P47bCY92.js +0 -1
  377. package/dist/client/assets/project-reports-DYL24PFI.js +0 -1
  378. package/dist/client/assets/project-tasks-C0N1MlNa.js +0 -1
  379. package/dist/client/assets/record-editor-B9sjj4Iw.js +0 -1
  380. package/dist/client/assets/reports-D1yzySzc.js +0 -1
  381. package/dist/client/assets/repositories-B2vK4Cqr.js +0 -1
  382. package/dist/client/assets/roles-D-1qXwgE.js +0 -1
  383. package/dist/client/assets/route-DVYYyJNN.js +0 -1
  384. package/dist/client/assets/settings-tab-Bvb5mnr2.js +0 -1
  385. package/dist/client/assets/site-editor-CmjAnts6.js +0 -1
  386. package/dist/client/assets/tasks-DmeEepcP.js +0 -1
  387. package/dist/client/assets/use-ask-in-chat-C5fM3Bv6.js +0 -1
  388. package/dist/client/assets/use-blocks-v8-project-Oxne65-_.js +0 -1
  389. package/dist/client/assets/use-sandbox-events-nFpLHv9o.js +0 -2
  390. package/dist/client/assets/useInfiniteQuery-ByQLYXMe.js +0 -1
  391. package/dist/client/assets/useSuspenseInfiniteQuery-ClUlWmLx.js +0 -1
@@ -1 +1 @@
1
- import{c as $,b as B,j as s,I as ce,am as Ie,X as we,B as Q,Z as Te,_ as De,ak as G,i as le,K as O,b3 as Ae,Y as H,a8 as ke,J as Ue,bB as Ee,m as Oe,a5 as oe,a as je,q as re,e as z,t as R,r as M,au as Se,x as Re,w as qe,h as Fe,v as $e,D as Be,aE as Le,aD as ze,y as Me,aF as Qe,aG as me,aI as He,aH as Ge,aJ as Ve,aK as We,bj as Ye,aL as Je,aM as Xe,aN as Ze,l as et,g2 as tt,gN as st}from"./index-DxGCPS5f.js";import{s as it}from"./Plus-DtM4w8bA.js";import{f as nt,g as lt,e as ot}from"./use-ai-providers-8QFj-dPT.js";import{P as xe}from"./ai-providers-logos-DD3qZ33J.js";import{B as fe}from"./badge-DccxBHlR.js";import{i as rt}from"./AlertCircle-CzNhPAKr.js";import{T as pe,a as ge,c as he}from"./tooltip-xj6ZnC0s.js";import{S as at}from"./switch-BhYC-gsU.js";import{G as ct}from"./github-icon-BoZFAAoR.js";import{i as dt,s as ut,c as mt}from"./Tool01-snML4pPn.js";import{s as ft}from"./Trash01-DPGVoVI0.js";import{u as pt,f as gt}from"./use-date-fns-locale-CP8lOmDn.js";import{g as Ce}from"./openai-compatible-presets-BKGfVqEx.js";function de(t){const e=$.c(32),{icon:i,title:l,status:o,meta:r,summary:p,action:m,children:c}=t,g=B();let a;e[0]!==i?(a=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]=a):a=e[1];let n;e[2]!==l?(n=s.jsx("span",{className:"truncate text-sm font-medium",children:l}),e[2]=l,e[3]=n):n=e[3];let u;e[4]!==o||e[5]!==g?(u=o==="linked"&&s.jsx(fe,{variant:"success",size:"sm",children:g("settings.ownAccounts.linked")}),e[4]=o,e[5]=g,e[6]=u):u=e[6];let f;e[7]!==o||e[8]!==g?(f=o==="expired"&&s.jsx(fe,{variant:"warning",size:"sm",children:g("settings.ownAccounts.expired")}),e[7]=o,e[8]=g,e[9]=f):f=e[9];let d;e[10]!==n||e[11]!==u||e[12]!==f?(d=s.jsxs("div",{className:"flex items-center gap-2",children:[n,u,f]}),e[10]=n,e[11]=u,e[12]=f,e[13]=d):d=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]!==d||e[17]!==h?(x=s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[d,h]}),e[16]=d,e[17]=h,e[18]=x):x=e[18];let b;e[19]!==p?(b=p&&s.jsx("div",{className:"order-last basis-full pl-11 sm:order-none sm:basis-auto sm:pl-0",children:p}),e[19]=p,e[20]=b):b=e[20];let C;e[21]!==m?(C=s.jsx("div",{className:"flex shrink-0 items-center gap-1",children:m}),e[21]=m,e[22]=C):C=e[22];let y;e[23]!==a||e[24]!==x||e[25]!==b||e[26]!==C?(y=s.jsxs("div",{className:"flex min-h-16 flex-wrap items-center gap-x-3 gap-y-2 px-4 py-3",children:[a,x,b,C]}),e[23]=a,e[24]=x,e[25]=b,e[26]=C,e[27]=y):y=e[27];let j;return e[28]!==c||e[29]!==y||e[30]!==l?(j=s.jsxs("div",{role:"group","aria-label":l,children:[y,c]}),e[28]=c,e[29]=y,e[30]=l,e[31]=j):j=e[31],j}function be(t){const e=$.c(7),{src:i,alt:l}=t;if(!i){let r;e[0]!==l?(r=l.charAt(0),e[0]=l,e[1]=r):r=e[1];let p;return e[2]!==r?(p=s.jsx("span",{className:"text-sm font-medium",children:r}),e[2]=r,e[3]=p):p=e[3],p}let o;return e[4]!==l||e[5]!==i?(o=s.jsx("img",{src:i,alt:l,className:"size-5 object-contain"}),e[4]=l,e[5]=i,e[6]=o):o=e[6],o}function ue(t){const e=$.c(10),{children:i}=t,l=B();let o;e[0]!==l?(o=l("settings.ownAccounts.more"),e[0]=l,e[1]=o):o=e[1];let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Ie,{size:16}),e[2]=r):r=e[2];let p;e[3]!==o?(p=s.jsx(we,{asChild:!0,children:s.jsx(Q,{variant:"ghost",size:"icon-sm","aria-label":o,className:"text-muted-foreground hover:text-foreground",children:r})}),e[3]=o,e[4]=p):p=e[4];let m;e[5]!==i?(m=s.jsx(Te,{align:"end",children:i}),e[5]=i,e[6]=m):m=e[6];let c;return e[7]!==p||e[8]!==m?(c=s.jsxs(De,{children:[p,m]}),e[7]=p,e[8]=m,e[9]=c):c=e[9],c}function ye(t){const e=$.c(23),{hint:i,submitLabel:l,pending:o,value:r,onChange:p,onSubmit:m,inputProps:c}=t;let g;e[0]!==m?(g=b=>{b.preventDefault(),m()},e[0]=m,e[1]=g):g=e[1];let a;e[2]!==i?(a=s.jsx("p",{className:"text-meta",children:i}),e[2]=i,e[3]=a):a=e[3];let n;e[4]!==p?(n=b=>p(b.target.value),e[4]=p,e[5]=n):n=e[5];let u;e[6]!==c||e[7]!==n||e[8]!==r?(u=s.jsx(ce,{type:"password",autoFocus:!0,...c,value:r,onChange:n}),e[6]=c,e[7]=n,e[8]=r,e[9]=u):u=e[9];let f;e[10]!==o||e[11]!==r?(f=r.trim().length===0||o,e[10]=o,e[11]=r,e[12]=f):f=e[12];let d;e[13]!==l||e[14]!==f?(d=s.jsx(Q,{type:"submit",disabled:f,children:l}),e[13]=l,e[14]=f,e[15]=d):d=e[15];let h;e[16]!==u||e[17]!==d?(h=s.jsxs("div",{className:"flex items-center gap-2",children:[u,d]}),e[16]=u,e[17]=d,e[18]=h):h=e[18];let x;return e[19]!==g||e[20]!==a||e[21]!==h?(x=s.jsxs("form",{className:"flex flex-col gap-2 px-4 pb-4 pl-15",onSubmit:g,children:[a,h]}),e[19]=g,e[20]=a,e[21]=h,e[22]=x):x=e[22],x}const ht={codex:"https://chatgpt.com/codex/settings/usage",claude:"https://claude.ai/settings/usage"};function ve(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 xt(t){return t>=100?"bg-destructive":t>=90?"bg-warning":"bg-foreground/70"}function _e(t){const e=$.c(12),{provider:i,orgId:l,userId:o,linkedAt:r,enabled:p}=t,m=G();let c;e[0]!==r||e[1]!==l||e[2]!==i||e[3]!==o?(c=O.subscriptionUsageSnapshot(l,o,i,r),e[0]=r,e[1]=l,e[2]=i,e[3]=o,e[4]=c):c=e[4];let g;e[5]!==i||e[6]!==m?(g=()=>m.call("SUBSCRIPTION_USAGE_GET",{provider:i}),e[5]=i,e[6]=m,e[7]=g):g=e[7];const a=p&&!!o;let n;return e[8]!==c||e[9]!==g||e[10]!==a?(n={queryKey:c,queryFn:g,enabled:a,staleTime:6e4,retry:!1,refetchOnWindowFocus:!1},e[8]=c,e[9]=g,e[10]=a,e[11]=n):n=e[11],le(n)}function Pe(t){const e=$.c(30),{query:i}=t,l=B(),[o]=Ue(),r=i.data;if(i.isPending){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Ee,{className:"h-4 w-32"}),e[0]=a):a=e[0],a}if(i.isError||r?.status!=="available"){const a=r?.reason;let n;e[1]!==a||e[2]!==l||e[3]!==r?.status?(n=a==="permission"?l("settings.subscriptionUsage.permission"):a==="authorization"?l("settings.subscriptionUsage.authorization"):a==="rate_limited"?l("settings.subscriptionUsage.rateLimited"):r?.status==="disconnected"?l("settings.subscriptionUsage.disconnected"):l("settings.subscriptionUsage.unavailable"),e[1]=a,e[2]=l,e[3]=r?.status,e[4]=n):n=e[4];const u=n;let f;e[5]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(rt,{size:12}),e[5]=f):f=e[5];let d;e[6]!==l?(d=l("settings.subscriptionUsage.unavailableShort"),e[6]=l,e[7]=d):d=e[7];let h;e[8]!==d?(h=s.jsx(pe,{asChild:!0,children:s.jsxs("span",{className:"flex shrink-0 items-center gap-1 text-meta",children:[f,d]})}),e[8]=d,e[9]=h):h=e[9];let x;e[10]!==u?(x=s.jsx(ge,{className:"max-w-64",children:u}),e[10]=u,e[11]=x):x=e[11];let b;return e[12]!==h||e[13]!==x?(b=s.jsxs(he,{children:[h,x]}),e[12]=h,e[13]=x,e[14]=b):b=e[14],b}if(r.limitReached){let a;e[15]!==l?(a=l("settings.subscriptionUsage.limitReached"),e[15]=l,e[16]=a):a=e[16];let n;return e[17]!==a?(n=s.jsx(fe,{variant:"destructive",size:"sm",children:a}),e[17]=a,e[18]=n):n=e[18],n}let p;e[19]!==o?(p=a=>new Intl.DateTimeFormat(o.language,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(new Date(a)),e[19]=o,e[20]=p):p=e[20];const m=p;let c;if(e[21]!==m||e[22]!==l||e[23]!==r.windows){let a;e[25]!==m||e[26]!==l?(a=n=>{const u=Math.round(n.usedPercent);return s.jsxs(he,{children:[s.jsx(pe,{asChild:!0,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-meta",children:ve(n,l)}),s.jsx("div",{role:"progressbar","aria-label":ve(n,l),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":u,className:"h-1.5 w-14 overflow-hidden rounded-full bg-muted",children:s.jsx("div",{style:{width:`${Math.min(100,u)}%`},className:Oe("h-full rounded-full",xt(u))})}),s.jsxs("span",{className:"w-8 text-right text-meta text-foreground",children:[u,"%"]})]})}),n.resetAt&&s.jsx(ge,{children:l("settings.subscriptionUsage.resets",{date:m(n.resetAt)})})]},n.id)},e[25]=m,e[26]=l,e[27]=a):a=e[27],c=r.windows.slice(0,2).map(a),e[21]=m,e[22]=l,e[23]=r.windows,e[24]=c}else c=e[24];let g;return e[28]!==c?(g=s.jsx("div",{className:"flex shrink-0 items-center gap-4",children:c}),e[28]=c,e[29]=g):g=e[29],g}function Ne(t){const e=$.c(18),{provider:i,query:l}=t,o=B(),r=l.isFetching;let p;e[0]!==l?(p=()=>{l.refetch()},e[0]=l,e[1]=p):p=e[1];let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(Ae,{}),e[2]=m):m=e[2];let c;e[3]!==o?(c=o("settings.subscriptionUsage.refresh"),e[3]=o,e[4]=c):c=e[4];let g;e[5]!==l.isFetching||e[6]!==p||e[7]!==c?(g=s.jsxs(H,{disabled:r,onSelect:p,children:[m,c]}),e[5]=l.isFetching,e[6]=p,e[7]=c,e[8]=g):g=e[8];const a=ht[i];let n;e[9]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ke,{}),e[9]=n):n=e[9];let u;e[10]!==o?(u=o("settings.subscriptionUsage.openProvider"),e[10]=o,e[11]=u):u=e[11];let f;e[12]!==a||e[13]!==u?(f=s.jsx(H,{asChild:!0,children:s.jsxs("a",{href:a,target:"_blank",rel:"noopener noreferrer",children:[n,u]})}),e[12]=a,e[13]=u,e[14]=f):f=e[14];let d;return e[15]!==g||e[16]!==f?(d=s.jsxs(s.Fragment,{children:[g,f]}),e[15]=g,e[16]=f,e[17]=d):d=e[17],d}function bt(){const t=$.c(38),e=B(),{org:i}=oe(),{data:l}=je.useSession(),o=l?.user.id??"",r=G(),p=re();let m;t[0]!==i.id||t[1]!==o?(m=O.claudeSubscription(i.id,o),t[0]=i.id,t[1]=o,t[2]=m):m=t[2];let c;t[3]!==r?(c=()=>r.call("CLAUDE_SUBSCRIPTION_STATUS",{}),t[3]=r,t[4]=c):c=t[4];const g=!!o;let a;t[5]!==m||t[6]!==c||t[7]!==g?(a={queryKey:m,queryFn:c,enabled:g},t[5]=m,t[6]=c,t[7]=g,t[8]=a):a=t[8];const n=le(a);let u;t[9]!==i.id||t[10]!==p||t[11]!==o?(u=async()=>{await p.cancelQueries({queryKey:O.subscriptionUsage(i.id,o,"claude")}),p.removeQueries({queryKey:O.subscriptionUsage(i.id,o,"claude")}),await p.invalidateQueries({queryKey:O.claudeSubscription(i.id,o)})},t[9]=i.id,t[10]=p,t[11]=o,t[12]=u):u=t[12];const f=u;let d;t[13]!==r?(d=N=>r.call("CLAUDE_SUBSCRIPTION_CONNECT",{token:N}),t[13]=r,t[14]=d):d=t[14];let h;t[15]!==f||t[16]!==e?(h=async()=>{await f(),R.success(e("settings.claudeSubscription.connected"))},t[15]=f,t[16]=e,t[17]=h):h=t[17];let x;t[18]!==d||t[19]!==h?(x={mutationFn:d,onSuccess:h,onError:vt},t[18]=d,t[19]=h,t[20]=x):x=t[20];const b=z(x);let C;t[21]!==r?(C=()=>r.call("CLAUDE_SUBSCRIPTION_DISCONNECT",{}),t[21]=r,t[22]=C):C=t[22];let y;t[23]!==f||t[24]!==e?(y=async()=>{await f(),R.success(e("settings.claudeSubscription.disconnected"))},t[23]=f,t[24]=e,t[25]=y):y=t[25];let j;t[26]!==C||t[27]!==y?(j={mutationFn:C,onSuccess:y,onError:yt},t[26]=C,t[27]=y,t[28]=j):j=t[28];const v=z(j),S=n.data?.connected===!0,_=!S&&!!n.data?.linkedAt,K=n.data?.linkedAt??null;let P;return t[29]!==b||t[30]!==S||t[31]!==v||t[32]!==_||t[33]!==i.id||t[34]!==n||t[35]!==K||t[36]!==o?(P={orgId:i.id,userId:o,status:n,connected:S,expired:_,linkedAt:K,connect:b,disconnect:v},t[29]=b,t[30]=S,t[31]=v,t[32]=_,t[33]=i.id,t[34]=n,t[35]=K,t[36]=o,t[37]=P):P=t[37],P}function yt(t){return R.error(t.message)}function vt(t){return R.error(t.message)}function jt(){const t=$.c(33),e=B(),[i,l]=M.useState(""),[o,r]=M.useState(!1),{orgId:p,userId:m,connected:c,expired:g,linkedAt:a,connect:n,disconnect:u}=bt();let f;t[0]!==c||t[1]!==a||t[2]!==p||t[3]!==m?(f={provider:"claude",orgId:p,userId:m,linkedAt:a,enabled:c},t[0]=c,t[1]=a,t[2]=p,t[3]=m,t[4]=f):f=t[4];const d=_e(f);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(be,{src:xe["claude-code"],alt:h}),t[7]=h,t[8]=x):x=t[8];let b;t[9]!==e?(b=e("settings.claudeSubscription.title"),t[9]=e,t[10]=b):b=t[10];const C=c?"linked":g?"expired":null;let y;t[11]!==c||t[12]!==d?(y=c?s.jsx(Pe,{query:d}):null,t[11]=c,t[12]=d,t[13]=y):y=t[13];let j;t[14]!==c||t[15]!==u||t[16]!==o||t[17]!==e||t[18]!==d?(j=c?s.jsxs(ue,{children:[s.jsx(Ne,{provider:"claude",query:d}),s.jsx(Se,{}),s.jsx(H,{variant:"destructive",disabled:u.isPending,onSelect:()=>u.mutate(),children:e("settings.claudeSubscription.disconnect")})]}):s.jsx(Q,{variant:"outline",size:"sm",onClick:()=>{r(St),l("")},children:e(o?"settings.ownAccounts.cancel":"settings.claudeSubscription.connect")}),t[14]=c,t[15]=u,t[16]=o,t[17]=e,t[18]=d,t[19]=j):j=t[19];let v;t[20]!==n||t[21]!==c||t[22]!==o||t[23]!==e||t[24]!==i?(v=!c&&o&&s.jsx(ye,{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:l,onSubmit:()=>n.mutate(i,{onSuccess:()=>{l(""),r(!1)}}),inputProps:{placeholder:e("settings.claudeSubscription.tokenPlaceholder"),"aria-label":e("settings.claudeSubscription.tokenPlaceholder")}}),t[20]=n,t[21]=c,t[22]=o,t[23]=e,t[24]=i,t[25]=v):v=t[25];let S;return t[26]!==x||t[27]!==b||t[28]!==C||t[29]!==y||t[30]!==j||t[31]!==v?(S=s.jsx(de,{icon:x,title:b,status:C,summary:y,action:j,children:v}),t[26]=x,t[27]=b,t[28]=C,t[29]=y,t[30]=j,t[31]=v,t[32]=S):S=t[32],S}function St(t){return!t}function Ct(){const t=$.c(63),e=B(),{org:i}=oe(),{data:l}=je.useSession(),o=l?.user.id??"",r=G(),p=re(),[m,c]=M.useState(""),[g,a]=M.useState(!1);let n;t[0]!==i.id||t[1]!==o?(n=O.codexSubscription(i.id,o),t[0]=i.id,t[1]=o,t[2]=n):n=t[2];let u;t[3]!==r?(u=()=>r.call("CODEX_SUBSCRIPTION_STATUS",{}),t[3]=r,t[4]=u):u=t[4];const f=!!o;let d;t[5]!==n||t[6]!==u||t[7]!==f?(d={queryKey:n,queryFn:u,enabled:f},t[5]=n,t[6]=u,t[7]=f,t[8]=d):d=t[8];const h=le(d);let x;t[9]!==i.id||t[10]!==p||t[11]!==o?(x=async()=>{await p.cancelQueries({queryKey:O.subscriptionUsage(i.id,o,"codex")}),p.removeQueries({queryKey:O.subscriptionUsage(i.id,o,"codex")}),await p.invalidateQueries({queryKey:O.codexSubscription(i.id,o)})},t[9]=i.id,t[10]=p,t[11]=o,t[12]=x):x=t[12];const b=x;let C;t[13]!==r||t[14]!==m?(C=()=>r.call("CODEX_SUBSCRIPTION_CONNECT",{authJson:m}),t[13]=r,t[14]=m,t[15]=C):C=t[15];let y;t[16]!==b||t[17]!==e?(y=async()=>{c(""),a(!1),await b(),R.success(e("settings.codexSubscription.connected"))},t[16]=b,t[17]=e,t[18]=y):y=t[18];let j;t[19]!==C||t[20]!==y?(j={mutationFn:C,onSuccess:y,onError:Nt},t[19]=C,t[20]=y,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 _;t[24]!==b||t[25]!==e?(_=async()=>{await b(),R.success(e("settings.codexSubscription.disconnected"))},t[24]=b,t[25]=e,t[26]=_):_=t[26];let K;t[27]!==S||t[28]!==_?(K={mutationFn:S,onSuccess:_,onError:Pt},t[27]=S,t[28]=_,t[29]=K):K=t[29];const P=z(K),N=h.data?.connected===!0,D=h.data?.linkedAt??null;let q;t[30]!==N||t[31]!==i.id||t[32]!==D||t[33]!==o?(q={provider:"codex",orgId:i.id,userId:o,linkedAt:D,enabled:N},t[30]=N,t[31]=i.id,t[32]=D,t[33]=o,t[34]=q):q=t[34];const A=_e(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(be,{src:xe.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=N?"linked":null;let T;t[41]!==N||t[42]!==A?(T=N?s.jsx(Pe,{query:A}):null,t[41]=N,t[42]=A,t[43]=T):T=t[43];let k;t[44]!==N||t[45]!==P||t[46]!==g||t[47]!==e||t[48]!==A?(k=N?s.jsxs(ue,{children:[s.jsx(Ne,{provider:"codex",query:A}),s.jsx(Se,{}),s.jsx(H,{variant:"destructive",disabled:P.isPending,onSelect:()=>P.mutate(),children:e("settings.codexSubscription.disconnect")})]}):s.jsx(Q,{variant:"outline",size:"sm",onClick:()=>{a(_t),c("")},children:e(g?"settings.ownAccounts.cancel":"settings.codexSubscription.connect")}),t[44]=N,t[45]=P,t[46]=g,t[47]=e,t[48]=A,t[49]=k):k=t[49];let E;t[50]!==v||t[51]!==N||t[52]!==g||t[53]!==e||t[54]!==m?(E=!N&&g&&s.jsx(ye,{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:m,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]=N,t[52]=g,t[53]=e,t[54]=m,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 _t(t){return!t}function Pt(t){return R.error(t.message)}function Nt(t){return R.error(t.message)}const Kt="https://github.com/settings/personal-access-tokens/new";function It(){const t=$.c(61),e=B(),{org:i}=oe(),l=G(),o=re(),[r,p]=M.useState(""),[m,c]=M.useState(!1);let g;t[0]!==i.id?(g=O.githubCopilot(i.id),t[0]=i.id,t[1]=g):g=t[1];let a;t[2]!==l?(a=()=>l.call("GITHUB_COPILOT_STATUS",{}),t[2]=l,t[3]=a):a=t[3];let n;t[4]!==g||t[5]!==a?(n={queryKey:g,queryFn:a},t[4]=g,t[5]=a,t[6]=n):n=t[6];const u=le(n);let f;t[7]!==i.id||t[8]!==o?(f=()=>o.invalidateQueries({queryKey:O.githubCopilot(i.id)}),t[7]=i.id,t[8]=o,t[9]=f):f=t[9];const d=f;let h;t[10]!==l||t[11]!==r?(h=()=>l.call("GITHUB_COPILOT_CONNECT",{token:r}),t[10]=l,t[11]=r,t[12]=h):h=t[12];let x;t[13]!==d||t[14]!==e?(x=async()=>{p(""),c(!1),await d(),R.success(e("settings.githubCopilot.connected"))},t[13]=d,t[14]=e,t[15]=x):x=t[15];let b;t[16]!==h||t[17]!==x?(b={mutationFn:h,onSuccess:x,onError:At},t[16]=h,t[17]=x,t[18]=b):b=t[18];const C=z(b);let y;t[19]!==l?(y=()=>l.call("GITHUB_COPILOT_DISCONNECT",{}),t[19]=l,t[20]=y):y=t[20];let j;t[21]!==d||t[22]!==e?(j=async()=>{await d(),R.success(e("settings.githubCopilot.disconnected"))},t[21]=d,t[22]=e,t[23]=j):j=t[23];let v;t[24]!==y||t[25]!==j?(v={mutationFn:y,onSuccess:j,onError:Dt},t[24]=y,t[25]=j,t[26]=v):v=t[26];const S=z(v);let _;t[27]!==l?(_=E=>l.call("GITHUB_COPILOT_SHARE",{shared:E}),t[27]=l,t[28]=_):_=t[28];let K;t[29]!==d||t[30]!==_?(K={mutationFn:_,onSuccess:d,onError:Tt},t[29]=d,t[30]=_,t[31]=K):K=t[31];const P=z(K),N=u.data?.connected===!0,D=u.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=N?"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]!==N||t[39]!==D?.sharedByMe||t[40]!==P||t[41]!==e?(w=N?s.jsxs(he,{children:[s.jsx(pe,{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:P.isPending,onCheckedChange:E=>P.mutate(E)})]})}),s.jsx(ge,{className:"max-w-64",children:e("settings.githubCopilot.shareDescription")})]}):null,t[38]=N,t[39]=D?.sharedByMe,t[40]=P,t[41]=e,t[42]=w):w=t[42];let U;t[43]!==N||t[44]!==S||t[45]!==m||t[46]!==e?(U=N?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(wt),p("")},children:e(m?"settings.ownAccounts.cancel":"settings.githubCopilot.connect")}),t[43]=N,t[44]=S,t[45]=m,t[46]=e,t[47]=U):U=t[47];let T;t[48]!==C||t[49]!==N||t[50]!==m||t[51]!==e||t[52]!==r?(T=!N&&m&&s.jsx(ye,{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:p,onSubmit:()=>C.mutate(),inputProps:{placeholder:e("settings.githubCopilot.tokenPlaceholder"),"aria-label":e("settings.githubCopilot.tokenPlaceholder")}}),t[48]=C,t[49]=N,t[50]=m,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 wt(t){return!t}function Tt(t){return R.error(t.message)}function Dt(t){return R.error(t.message)}function At(t){return R.error(t.message)}const kt=t=>Qe({label:me().min(1,t("settings.editProviderDialog.labelRequired")).max(100),apiKey:me().optional(),baseUrl:me().optional()});function Ut({isOpenAICompatible:t,baseUrl:e,currentBaseUrl:i,apiKey:l}){return t&&!!e&&e!==i&&!l}function Et({providerKey:t,provider:e,preset:i,maskedKey:l,currentLabel:o,currentBaseUrl:r,onCancel:p,onSuccess:m}){const{org:c}=oe(),g=G(),a=re(),n=B(),[u,f]=M.useState(!1),d=e.id==="openai-compatible",h=e.supportedMethods.includes("api-key"),x=kt(n),{register:b,handleSubmit:C,watch:y,setError:j,formState:{errors:v}}=Le({resolver:ze(x),defaultValues:{label:o,apiKey:"",baseUrl:r??""}}),S=y("apiKey")??"",{mutate:_,isPending:K}=z({mutationFn:async P=>{let N;P.apiKey&&(d?N=JSON.stringify({baseUrl:P.baseUrl||r||"",apiKey:P.apiKey}):N=P.apiKey),await g.call("AI_PROVIDER_KEY_UPDATE",{keyId:t.id,label:P.label,...N!==void 0?{apiKey:N}:{}})},onSuccess:()=>{a.invalidateQueries({queryKey:O.aiProviderKeys(c.id)}),a.invalidateQueries({queryKey:O.aiProviders(c.id)}),R.success(n("settings.editProviderDialog.providerUpdated")),m()},onError:P=>R.error(n("settings.editProviderDialog.failedToUpdate",{error:P.message}))});return s.jsxs("form",{onSubmit:C(P=>{if(Ut({isOpenAICompatible:d,baseUrl:P.baseUrl,currentBaseUrl:r,apiKey:P.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"),...b("label"),size:"sm"}),v.label&&s.jsx("p",{className:"text-xs text-destructive",children:v.label.message})]}),d&&!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"),...b("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:u&&S?"text":"password",placeholder:l,...b("apiKey"),size:"sm",className:"ph-no-capture pr-8"}),S&&s.jsx("button",{type:"button",onClick:()=>f(!u),"aria-label":n(u?"settings.editProviderDialog.hideApiKey":"settings.editProviderDialog.showApiKey"),className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:u?s.jsx(dt,{size:14}):s.jsx(ut,{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(Me,{children:[s.jsx(Q,{type:"button",variant:"ghost",size:"sm",onClick:p,disabled:K,children:n("settings.editProviderDialog.cancel")}),s.jsx(Q,{type:"submit",size:"sm",disabled:K,children:n(K?"settings.editProviderDialog.saving":"settings.editProviderDialog.save")})]})]})}function Ot(t){const e=$.c(31),{providerKey:i,provider:l,open:o,onOpenChange:r}=t,p=B(),m=G(),c=l.id==="openai-compatible"&&i.presetId?Ce(i.presetId):void 0,g=c?.name??l.name;let a;e[0]!==i.id?(a=O.aiProviderKeyPreview(i.id),e[0]=i.id,e[1]=a):a=e[1];let n;e[2]!==i.id||e[3]!==m?(n=()=>m.call("AI_PROVIDER_KEY_PREVIEW",{keyId:i.id}),e[2]=i.id,e[3]=m,e[4]=n):n=e[4];let u;e[5]!==o||e[6]!==a||e[7]!==n?(u={queryKey:a,queryFn:n,enabled:o,staleTime:0},e[5]=o,e[6]=a,e[7]=n,e[8]=u):u=e[8];const{data:f,isLoading:d}=le(u),h=Be,x=$e,b="sm:max-w-md",C=qe,y=Re,j=p("settings.editProviderDialog.editTitle",{name:g});let v;e[9]!==y||e[10]!==j?(v=s.jsx(y,{children:j}),e[9]=y,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 _;e[15]!==d||e[16]!==r||e[17]!==c||e[18]!==f||e[19]!==l||e[20]!==i?(_=d||!f?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(Fe,{})}):s.jsx(Et,{providerKey:i,provider:l,preset:c,maskedKey:f.maskedKey,currentLabel:f.label,currentBaseUrl:f.baseUrl,onCancel:()=>r(!1),onSuccess:()=>r(!1)}),e[15]=d,e[16]=r,e[17]=c,e[18]=f,e[19]=l,e[20]=i,e[21]=_):_=e[21];let K;e[22]!==x||e[23]!==S||e[24]!==_?(K=s.jsxs(x,{className:b,children:[S,_]}),e[22]=x,e[23]=S,e[24]=_,e[25]=K):K=e[25];let P;return e[26]!==h||e[27]!==r||e[28]!==o||e[29]!==K?(P=s.jsx(h,{open:o,onOpenChange:r,children:K}),e[26]=h,e[27]=r,e[28]=o,e[29]=K,e[30]=P):P=e[30],P}function Rt(t){const e=$.c(86),{providerKey:i,provider:l}=t,{org:o}=oe(),r=G(),p=re(),[m,c]=M.useState(!1),[g,a]=M.useState(!1),n=B(),u=pt(),f=l?.id==="openai-compatible";let d;e[0]!==f||e[1]!==i.presetId?(d=f&&i.presetId?Ce(i.presetId):void 0,e[0]=f,e[1]=i.presetId,e[2]=d):d=e[2];const h=d;let x;e[3]!==f||e[4]!==h||e[5]!==l?.name||e[6]!==i.providerId||e[7]!==n?(x=h?h.name:f?n("settings.aiProviders.customOpenAiCompatible"):l?.name??(i.providerId==="claude-code"?n("settings.providerKeyRow.claudeCode"):i.providerId==="codex"?n("settings.providerKeyRow.codex"):i.providerId),e[3]=f,e[4]=h,e[5]=l?.name,e[6]=i.providerId,e[7]=n,e[8]=x):x=e[8];const b=x,C=h?.logo??l?.logo??xe[i.providerId];let y;e:{if(f){y=i.label;break e}let ne;e[9]!==u||e[10]!==i.createdAt||e[11]!==i.label||e[12]!==n?(ne=n("settings.providerKeyRow.addedTimeAgo",{label:i.label,time:gt(new Date(i.createdAt),{locale:u})}),e[9]=u,e[10]=i.createdAt,e[11]=i.label,e[12]=n,e[13]=ne):ne=e[13],y=ne}const j=y;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]!==o||e[18]!==i.id||e[19]!==p||e[20]!==n?(S=()=>{p.invalidateQueries({queryKey:O.aiProviderKeys(o.id)}),p.invalidateQueries({queryKey:O.aiProviders(o.id)}),p.invalidateQueries({queryKey:O.aiProviderModels(o.id,i.id)}),R.success(n("settings.providerKeyRow.keyDeleted")),c(!1)},e[17]=o,e[18]=i.id,e[19]=p,e[20]=n,e[21]=S):S=e[21];let _;e[22]!==n?(_=ne=>R.error(n("settings.providerKeyRow.failedToDeleteKey",{error:ne.message})),e[22]=n,e[23]=_):_=e[23];let K;e[24]!==v||e[25]!==S||e[26]!==_?(K={mutationFn:v,onSuccess:S,onError:_},e[24]=v,e[25]=S,e[26]=_,e[27]=K):K=e[27];const{mutate:P,isPending:N}=z(K);let D;e[28]!==b||e[29]!==C?(D=s.jsx(be,{src:C,alt:b}),e[28]=b,e[29]=C,e[30]=D):D=e[30];let q;e[31]!==l||e[32]!==n?(q=l?s.jsxs(H,{onSelect:()=>a(!0),children:[s.jsx(mt,{}),n("settings.providerKeyRow.edit")]}):null,e[31]=l,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]!==N||e[39]!==I?(w=s.jsxs(H,{variant:"destructive",disabled:N,onSelect:A,children:[F,I]}),e[38]=N,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]!==b||e[46]!==U||e[47]!==D?(T=s.jsx(de,{icon:D,title:b,meta:j,action:U}),e[44]=j,e[45]=b,e[46]=U,e[47]=D,e[48]=T):T=e[48];let k;e[49]!==g||e[50]!==l||e[51]!==i?(k=l?s.jsx(Ot,{providerKey:i,provider:l,open:g,onOpenChange:a}):null,e[49]=g,e[50]=l,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(Ge,{children:E}),e[55]=E,e[56]=L):L=e[56];let V;e[57]!==i.label?(V=s.jsxs(He,{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(Ve,{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(We,{children:Y}),e[64]=Y,e[65]=J):J=e[65];let X;e[66]!==P?(X=()=>P(),e[66]=P,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(Ye,{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(Je,{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(Xe,{children:[W,te]}),e[76]=W,e[77]=te,e[78]=se):se=e[78];let ie;e[79]!==m||e[80]!==se?(ie=s.jsx(Ze,{open:m,onOpenChange:c,children:se}),e[79]=m,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 es(t){const e=t.filter(i=>nt(i.providerId));return{hasHostedProvider:e.length>0,hasDeco:e.some(i=>i.providerId==="deco")}}function qt(t,e){return t.filter(i=>i.providerId!=="deco").map(i=>({key:i,provider:e.find(l=>l.id===i.providerId)??null}))}const Ke="own-accounts";function ts(t){const e=$.c(29),{onAddKey:i}=t,l=B(),o=lt(),r=ot(),p=qt(o,r?.providers??[]);let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={select:$t},e[0]=m):m=e[0];const c=et(m),g=Ke;let a;e[1]!==c?(a=K=>{K&&c&&K.scrollIntoView({block:"start"})},e[1]=c,e[2]=a):a=e[2];const n=st;let u;e[3]!==l?(u=l("settings.ownAccounts.title"),e[3]=l,e[4]=u):u=e[4];const f=tt;let d,h,x;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(jt,{}),h=s.jsx(Ct,{}),x=s.jsx(It,{}),e[5]=d,e[6]=h,e[7]=x):(d=e[5],h=e[6],x=e[7]);const b=p.map(Ft);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(it,{size:16})}),e[8]=C):C=e[8];let y;e[9]!==l?(y=l("settings.ownAccounts.addApiKey"),e[9]=l,e[10]=y):y=e[10];let j;e[11]!==i||e[12]!==y?(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,y]}),e[11]=i,e[12]=y,e[13]=j):j=e[13];let v;e[14]!==f||e[15]!==j||e[16]!==d||e[17]!==h||e[18]!==x||e[19]!==b?(v=s.jsxs(f,{children:[d,h,x,b,j]}),e[14]=f,e[15]=j,e[16]=d,e[17]=h,e[18]=x,e[19]=b,e[20]=v):v=e[20];let S;e[21]!==n||e[22]!==v||e[23]!==u?(S=s.jsx(n,{title:u,children:v}),e[21]=n,e[22]=v,e[23]=u,e[24]=S):S=e[24];let _;return e[25]!==S||e[26]!==g||e[27]!==a?(_=s.jsx("div",{id:g,ref:a,children:S}),e[25]=S,e[26]=g,e[27]=a,e[28]=_):_=e[28],_}function Ft(t){const{key:e,provider:i}=t;return s.jsx(Rt,{providerKey:e,provider:i},e.id)}function $t(t){return t.location.hash===Ke}export{Ke as O,ts as a,es as g,bt as u};
1
+ import{c as $,b as B,j as s,I as ce,am as Ie,X as we,B as Q,Z as Te,_ as De,ak as G,i as le,K as O,b3 as Ae,Y as H,a8 as ke,J as Ue,bB as Ee,m as Oe,a5 as oe,a as je,q as re,e as z,t as R,r as M,au as Se,x as Re,w as qe,h as Fe,v as $e,D as Be,aE as Le,aD as ze,y as Me,aF as Qe,aG as me,aI as He,aH as Ge,aJ as Ve,aK as We,bj as Ye,aL as Je,aM as Xe,aN as Ze,l as et,g2 as tt,gN as st}from"./index-cgovyYsQ.js";import{s as it}from"./Plus-DsyYMAU8.js";import{f as nt,g as lt,e as ot}from"./use-ai-providers-Bz3SR-CO.js";import{P as xe}from"./ai-providers-logos-DD3qZ33J.js";import{B as fe}from"./badge-Dfaw3WBB.js";import{i as rt}from"./AlertCircle-CQ8p4KFs.js";import{T as pe,a as ge,c as he}from"./tooltip-Bg4P3YaG.js";import{S as at}from"./switch-BMZWxSSe.js";import{G as ct}from"./github-icon-Cfkkw3me.js";import{i as dt,s as ut,c as mt}from"./Tool01-CSZn_Wh0.js";import{s as ft}from"./Trash01-DDMIP9jc.js";import{u as pt,f as gt}from"./use-date-fns-locale-DKLPMzYi.js";import{g as Ce}from"./openai-compatible-presets-BKGfVqEx.js";function de(t){const e=$.c(32),{icon:i,title:l,status:o,meta:r,summary:p,action:m,children:c}=t,g=B();let a;e[0]!==i?(a=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]=a):a=e[1];let n;e[2]!==l?(n=s.jsx("span",{className:"truncate text-sm font-medium",children:l}),e[2]=l,e[3]=n):n=e[3];let u;e[4]!==o||e[5]!==g?(u=o==="linked"&&s.jsx(fe,{variant:"success",size:"sm",children:g("settings.ownAccounts.linked")}),e[4]=o,e[5]=g,e[6]=u):u=e[6];let f;e[7]!==o||e[8]!==g?(f=o==="expired"&&s.jsx(fe,{variant:"warning",size:"sm",children:g("settings.ownAccounts.expired")}),e[7]=o,e[8]=g,e[9]=f):f=e[9];let d;e[10]!==n||e[11]!==u||e[12]!==f?(d=s.jsxs("div",{className:"flex items-center gap-2",children:[n,u,f]}),e[10]=n,e[11]=u,e[12]=f,e[13]=d):d=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]!==d||e[17]!==h?(x=s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[d,h]}),e[16]=d,e[17]=h,e[18]=x):x=e[18];let b;e[19]!==p?(b=p&&s.jsx("div",{className:"order-last basis-full pl-11 sm:order-none sm:basis-auto sm:pl-0",children:p}),e[19]=p,e[20]=b):b=e[20];let C;e[21]!==m?(C=s.jsx("div",{className:"flex shrink-0 items-center gap-1",children:m}),e[21]=m,e[22]=C):C=e[22];let y;e[23]!==a||e[24]!==x||e[25]!==b||e[26]!==C?(y=s.jsxs("div",{className:"flex min-h-16 flex-wrap items-center gap-x-3 gap-y-2 px-4 py-3",children:[a,x,b,C]}),e[23]=a,e[24]=x,e[25]=b,e[26]=C,e[27]=y):y=e[27];let j;return e[28]!==c||e[29]!==y||e[30]!==l?(j=s.jsxs("div",{role:"group","aria-label":l,children:[y,c]}),e[28]=c,e[29]=y,e[30]=l,e[31]=j):j=e[31],j}function be(t){const e=$.c(7),{src:i,alt:l}=t;if(!i){let r;e[0]!==l?(r=l.charAt(0),e[0]=l,e[1]=r):r=e[1];let p;return e[2]!==r?(p=s.jsx("span",{className:"text-sm font-medium",children:r}),e[2]=r,e[3]=p):p=e[3],p}let o;return e[4]!==l||e[5]!==i?(o=s.jsx("img",{src:i,alt:l,className:"size-5 object-contain"}),e[4]=l,e[5]=i,e[6]=o):o=e[6],o}function ue(t){const e=$.c(10),{children:i}=t,l=B();let o;e[0]!==l?(o=l("settings.ownAccounts.more"),e[0]=l,e[1]=o):o=e[1];let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Ie,{size:16}),e[2]=r):r=e[2];let p;e[3]!==o?(p=s.jsx(we,{asChild:!0,children:s.jsx(Q,{variant:"ghost",size:"icon-sm","aria-label":o,className:"text-muted-foreground hover:text-foreground",children:r})}),e[3]=o,e[4]=p):p=e[4];let m;e[5]!==i?(m=s.jsx(Te,{align:"end",children:i}),e[5]=i,e[6]=m):m=e[6];let c;return e[7]!==p||e[8]!==m?(c=s.jsxs(De,{children:[p,m]}),e[7]=p,e[8]=m,e[9]=c):c=e[9],c}function ye(t){const e=$.c(23),{hint:i,submitLabel:l,pending:o,value:r,onChange:p,onSubmit:m,inputProps:c}=t;let g;e[0]!==m?(g=b=>{b.preventDefault(),m()},e[0]=m,e[1]=g):g=e[1];let a;e[2]!==i?(a=s.jsx("p",{className:"text-meta",children:i}),e[2]=i,e[3]=a):a=e[3];let n;e[4]!==p?(n=b=>p(b.target.value),e[4]=p,e[5]=n):n=e[5];let u;e[6]!==c||e[7]!==n||e[8]!==r?(u=s.jsx(ce,{type:"password",autoFocus:!0,...c,value:r,onChange:n}),e[6]=c,e[7]=n,e[8]=r,e[9]=u):u=e[9];let f;e[10]!==o||e[11]!==r?(f=r.trim().length===0||o,e[10]=o,e[11]=r,e[12]=f):f=e[12];let d;e[13]!==l||e[14]!==f?(d=s.jsx(Q,{type:"submit",disabled:f,children:l}),e[13]=l,e[14]=f,e[15]=d):d=e[15];let h;e[16]!==u||e[17]!==d?(h=s.jsxs("div",{className:"flex items-center gap-2",children:[u,d]}),e[16]=u,e[17]=d,e[18]=h):h=e[18];let x;return e[19]!==g||e[20]!==a||e[21]!==h?(x=s.jsxs("form",{className:"flex flex-col gap-2 px-4 pb-4 pl-15",onSubmit:g,children:[a,h]}),e[19]=g,e[20]=a,e[21]=h,e[22]=x):x=e[22],x}const ht={codex:"https://chatgpt.com/codex/settings/usage",claude:"https://claude.ai/settings/usage"};function ve(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 xt(t){return t>=100?"bg-destructive":t>=90?"bg-warning":"bg-foreground/70"}function _e(t){const e=$.c(12),{provider:i,orgId:l,userId:o,linkedAt:r,enabled:p}=t,m=G();let c;e[0]!==r||e[1]!==l||e[2]!==i||e[3]!==o?(c=O.subscriptionUsageSnapshot(l,o,i,r),e[0]=r,e[1]=l,e[2]=i,e[3]=o,e[4]=c):c=e[4];let g;e[5]!==i||e[6]!==m?(g=()=>m.call("SUBSCRIPTION_USAGE_GET",{provider:i}),e[5]=i,e[6]=m,e[7]=g):g=e[7];const a=p&&!!o;let n;return e[8]!==c||e[9]!==g||e[10]!==a?(n={queryKey:c,queryFn:g,enabled:a,staleTime:6e4,retry:!1,refetchOnWindowFocus:!1},e[8]=c,e[9]=g,e[10]=a,e[11]=n):n=e[11],le(n)}function Pe(t){const e=$.c(30),{query:i}=t,l=B(),[o]=Ue(),r=i.data;if(i.isPending){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Ee,{className:"h-4 w-32"}),e[0]=a):a=e[0],a}if(i.isError||r?.status!=="available"){const a=r?.reason;let n;e[1]!==a||e[2]!==l||e[3]!==r?.status?(n=a==="permission"?l("settings.subscriptionUsage.permission"):a==="authorization"?l("settings.subscriptionUsage.authorization"):a==="rate_limited"?l("settings.subscriptionUsage.rateLimited"):r?.status==="disconnected"?l("settings.subscriptionUsage.disconnected"):l("settings.subscriptionUsage.unavailable"),e[1]=a,e[2]=l,e[3]=r?.status,e[4]=n):n=e[4];const u=n;let f;e[5]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(rt,{size:12}),e[5]=f):f=e[5];let d;e[6]!==l?(d=l("settings.subscriptionUsage.unavailableShort"),e[6]=l,e[7]=d):d=e[7];let h;e[8]!==d?(h=s.jsx(pe,{asChild:!0,children:s.jsxs("span",{className:"flex shrink-0 items-center gap-1 text-meta",children:[f,d]})}),e[8]=d,e[9]=h):h=e[9];let x;e[10]!==u?(x=s.jsx(ge,{className:"max-w-64",children:u}),e[10]=u,e[11]=x):x=e[11];let b;return e[12]!==h||e[13]!==x?(b=s.jsxs(he,{children:[h,x]}),e[12]=h,e[13]=x,e[14]=b):b=e[14],b}if(r.limitReached){let a;e[15]!==l?(a=l("settings.subscriptionUsage.limitReached"),e[15]=l,e[16]=a):a=e[16];let n;return e[17]!==a?(n=s.jsx(fe,{variant:"destructive",size:"sm",children:a}),e[17]=a,e[18]=n):n=e[18],n}let p;e[19]!==o?(p=a=>new Intl.DateTimeFormat(o.language,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(new Date(a)),e[19]=o,e[20]=p):p=e[20];const m=p;let c;if(e[21]!==m||e[22]!==l||e[23]!==r.windows){let a;e[25]!==m||e[26]!==l?(a=n=>{const u=Math.round(n.usedPercent);return s.jsxs(he,{children:[s.jsx(pe,{asChild:!0,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-meta",children:ve(n,l)}),s.jsx("div",{role:"progressbar","aria-label":ve(n,l),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":u,className:"h-1.5 w-14 overflow-hidden rounded-full bg-muted",children:s.jsx("div",{style:{width:`${Math.min(100,u)}%`},className:Oe("h-full rounded-full",xt(u))})}),s.jsxs("span",{className:"w-8 text-right text-meta text-foreground",children:[u,"%"]})]})}),n.resetAt&&s.jsx(ge,{children:l("settings.subscriptionUsage.resets",{date:m(n.resetAt)})})]},n.id)},e[25]=m,e[26]=l,e[27]=a):a=e[27],c=r.windows.slice(0,2).map(a),e[21]=m,e[22]=l,e[23]=r.windows,e[24]=c}else c=e[24];let g;return e[28]!==c?(g=s.jsx("div",{className:"flex shrink-0 items-center gap-4",children:c}),e[28]=c,e[29]=g):g=e[29],g}function Ne(t){const e=$.c(18),{provider:i,query:l}=t,o=B(),r=l.isFetching;let p;e[0]!==l?(p=()=>{l.refetch()},e[0]=l,e[1]=p):p=e[1];let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(Ae,{}),e[2]=m):m=e[2];let c;e[3]!==o?(c=o("settings.subscriptionUsage.refresh"),e[3]=o,e[4]=c):c=e[4];let g;e[5]!==l.isFetching||e[6]!==p||e[7]!==c?(g=s.jsxs(H,{disabled:r,onSelect:p,children:[m,c]}),e[5]=l.isFetching,e[6]=p,e[7]=c,e[8]=g):g=e[8];const a=ht[i];let n;e[9]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ke,{}),e[9]=n):n=e[9];let u;e[10]!==o?(u=o("settings.subscriptionUsage.openProvider"),e[10]=o,e[11]=u):u=e[11];let f;e[12]!==a||e[13]!==u?(f=s.jsx(H,{asChild:!0,children:s.jsxs("a",{href:a,target:"_blank",rel:"noopener noreferrer",children:[n,u]})}),e[12]=a,e[13]=u,e[14]=f):f=e[14];let d;return e[15]!==g||e[16]!==f?(d=s.jsxs(s.Fragment,{children:[g,f]}),e[15]=g,e[16]=f,e[17]=d):d=e[17],d}function bt(){const t=$.c(38),e=B(),{org:i}=oe(),{data:l}=je.useSession(),o=l?.user.id??"",r=G(),p=re();let m;t[0]!==i.id||t[1]!==o?(m=O.claudeSubscription(i.id,o),t[0]=i.id,t[1]=o,t[2]=m):m=t[2];let c;t[3]!==r?(c=()=>r.call("CLAUDE_SUBSCRIPTION_STATUS",{}),t[3]=r,t[4]=c):c=t[4];const g=!!o;let a;t[5]!==m||t[6]!==c||t[7]!==g?(a={queryKey:m,queryFn:c,enabled:g},t[5]=m,t[6]=c,t[7]=g,t[8]=a):a=t[8];const n=le(a);let u;t[9]!==i.id||t[10]!==p||t[11]!==o?(u=async()=>{await p.cancelQueries({queryKey:O.subscriptionUsage(i.id,o,"claude")}),p.removeQueries({queryKey:O.subscriptionUsage(i.id,o,"claude")}),await p.invalidateQueries({queryKey:O.claudeSubscription(i.id,o)})},t[9]=i.id,t[10]=p,t[11]=o,t[12]=u):u=t[12];const f=u;let d;t[13]!==r?(d=N=>r.call("CLAUDE_SUBSCRIPTION_CONNECT",{token:N}),t[13]=r,t[14]=d):d=t[14];let h;t[15]!==f||t[16]!==e?(h=async()=>{await f(),R.success(e("settings.claudeSubscription.connected"))},t[15]=f,t[16]=e,t[17]=h):h=t[17];let x;t[18]!==d||t[19]!==h?(x={mutationFn:d,onSuccess:h,onError:vt},t[18]=d,t[19]=h,t[20]=x):x=t[20];const b=z(x);let C;t[21]!==r?(C=()=>r.call("CLAUDE_SUBSCRIPTION_DISCONNECT",{}),t[21]=r,t[22]=C):C=t[22];let y;t[23]!==f||t[24]!==e?(y=async()=>{await f(),R.success(e("settings.claudeSubscription.disconnected"))},t[23]=f,t[24]=e,t[25]=y):y=t[25];let j;t[26]!==C||t[27]!==y?(j={mutationFn:C,onSuccess:y,onError:yt},t[26]=C,t[27]=y,t[28]=j):j=t[28];const v=z(j),S=n.data?.connected===!0,_=!S&&!!n.data?.linkedAt,K=n.data?.linkedAt??null;let P;return t[29]!==b||t[30]!==S||t[31]!==v||t[32]!==_||t[33]!==i.id||t[34]!==n||t[35]!==K||t[36]!==o?(P={orgId:i.id,userId:o,status:n,connected:S,expired:_,linkedAt:K,connect:b,disconnect:v},t[29]=b,t[30]=S,t[31]=v,t[32]=_,t[33]=i.id,t[34]=n,t[35]=K,t[36]=o,t[37]=P):P=t[37],P}function yt(t){return R.error(t.message)}function vt(t){return R.error(t.message)}function jt(){const t=$.c(33),e=B(),[i,l]=M.useState(""),[o,r]=M.useState(!1),{orgId:p,userId:m,connected:c,expired:g,linkedAt:a,connect:n,disconnect:u}=bt();let f;t[0]!==c||t[1]!==a||t[2]!==p||t[3]!==m?(f={provider:"claude",orgId:p,userId:m,linkedAt:a,enabled:c},t[0]=c,t[1]=a,t[2]=p,t[3]=m,t[4]=f):f=t[4];const d=_e(f);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(be,{src:xe["claude-code"],alt:h}),t[7]=h,t[8]=x):x=t[8];let b;t[9]!==e?(b=e("settings.claudeSubscription.title"),t[9]=e,t[10]=b):b=t[10];const C=c?"linked":g?"expired":null;let y;t[11]!==c||t[12]!==d?(y=c?s.jsx(Pe,{query:d}):null,t[11]=c,t[12]=d,t[13]=y):y=t[13];let j;t[14]!==c||t[15]!==u||t[16]!==o||t[17]!==e||t[18]!==d?(j=c?s.jsxs(ue,{children:[s.jsx(Ne,{provider:"claude",query:d}),s.jsx(Se,{}),s.jsx(H,{variant:"destructive",disabled:u.isPending,onSelect:()=>u.mutate(),children:e("settings.claudeSubscription.disconnect")})]}):s.jsx(Q,{variant:"outline",size:"sm",onClick:()=>{r(St),l("")},children:e(o?"settings.ownAccounts.cancel":"settings.claudeSubscription.connect")}),t[14]=c,t[15]=u,t[16]=o,t[17]=e,t[18]=d,t[19]=j):j=t[19];let v;t[20]!==n||t[21]!==c||t[22]!==o||t[23]!==e||t[24]!==i?(v=!c&&o&&s.jsx(ye,{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:l,onSubmit:()=>n.mutate(i,{onSuccess:()=>{l(""),r(!1)}}),inputProps:{placeholder:e("settings.claudeSubscription.tokenPlaceholder"),"aria-label":e("settings.claudeSubscription.tokenPlaceholder")}}),t[20]=n,t[21]=c,t[22]=o,t[23]=e,t[24]=i,t[25]=v):v=t[25];let S;return t[26]!==x||t[27]!==b||t[28]!==C||t[29]!==y||t[30]!==j||t[31]!==v?(S=s.jsx(de,{icon:x,title:b,status:C,summary:y,action:j,children:v}),t[26]=x,t[27]=b,t[28]=C,t[29]=y,t[30]=j,t[31]=v,t[32]=S):S=t[32],S}function St(t){return!t}function Ct(){const t=$.c(63),e=B(),{org:i}=oe(),{data:l}=je.useSession(),o=l?.user.id??"",r=G(),p=re(),[m,c]=M.useState(""),[g,a]=M.useState(!1);let n;t[0]!==i.id||t[1]!==o?(n=O.codexSubscription(i.id,o),t[0]=i.id,t[1]=o,t[2]=n):n=t[2];let u;t[3]!==r?(u=()=>r.call("CODEX_SUBSCRIPTION_STATUS",{}),t[3]=r,t[4]=u):u=t[4];const f=!!o;let d;t[5]!==n||t[6]!==u||t[7]!==f?(d={queryKey:n,queryFn:u,enabled:f},t[5]=n,t[6]=u,t[7]=f,t[8]=d):d=t[8];const h=le(d);let x;t[9]!==i.id||t[10]!==p||t[11]!==o?(x=async()=>{await p.cancelQueries({queryKey:O.subscriptionUsage(i.id,o,"codex")}),p.removeQueries({queryKey:O.subscriptionUsage(i.id,o,"codex")}),await p.invalidateQueries({queryKey:O.codexSubscription(i.id,o)})},t[9]=i.id,t[10]=p,t[11]=o,t[12]=x):x=t[12];const b=x;let C;t[13]!==r||t[14]!==m?(C=()=>r.call("CODEX_SUBSCRIPTION_CONNECT",{authJson:m}),t[13]=r,t[14]=m,t[15]=C):C=t[15];let y;t[16]!==b||t[17]!==e?(y=async()=>{c(""),a(!1),await b(),R.success(e("settings.codexSubscription.connected"))},t[16]=b,t[17]=e,t[18]=y):y=t[18];let j;t[19]!==C||t[20]!==y?(j={mutationFn:C,onSuccess:y,onError:Nt},t[19]=C,t[20]=y,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 _;t[24]!==b||t[25]!==e?(_=async()=>{await b(),R.success(e("settings.codexSubscription.disconnected"))},t[24]=b,t[25]=e,t[26]=_):_=t[26];let K;t[27]!==S||t[28]!==_?(K={mutationFn:S,onSuccess:_,onError:Pt},t[27]=S,t[28]=_,t[29]=K):K=t[29];const P=z(K),N=h.data?.connected===!0,D=h.data?.linkedAt??null;let q;t[30]!==N||t[31]!==i.id||t[32]!==D||t[33]!==o?(q={provider:"codex",orgId:i.id,userId:o,linkedAt:D,enabled:N},t[30]=N,t[31]=i.id,t[32]=D,t[33]=o,t[34]=q):q=t[34];const A=_e(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(be,{src:xe.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=N?"linked":null;let T;t[41]!==N||t[42]!==A?(T=N?s.jsx(Pe,{query:A}):null,t[41]=N,t[42]=A,t[43]=T):T=t[43];let k;t[44]!==N||t[45]!==P||t[46]!==g||t[47]!==e||t[48]!==A?(k=N?s.jsxs(ue,{children:[s.jsx(Ne,{provider:"codex",query:A}),s.jsx(Se,{}),s.jsx(H,{variant:"destructive",disabled:P.isPending,onSelect:()=>P.mutate(),children:e("settings.codexSubscription.disconnect")})]}):s.jsx(Q,{variant:"outline",size:"sm",onClick:()=>{a(_t),c("")},children:e(g?"settings.ownAccounts.cancel":"settings.codexSubscription.connect")}),t[44]=N,t[45]=P,t[46]=g,t[47]=e,t[48]=A,t[49]=k):k=t[49];let E;t[50]!==v||t[51]!==N||t[52]!==g||t[53]!==e||t[54]!==m?(E=!N&&g&&s.jsx(ye,{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:m,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]=N,t[52]=g,t[53]=e,t[54]=m,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 _t(t){return!t}function Pt(t){return R.error(t.message)}function Nt(t){return R.error(t.message)}const Kt="https://github.com/settings/personal-access-tokens/new";function It(){const t=$.c(61),e=B(),{org:i}=oe(),l=G(),o=re(),[r,p]=M.useState(""),[m,c]=M.useState(!1);let g;t[0]!==i.id?(g=O.githubCopilot(i.id),t[0]=i.id,t[1]=g):g=t[1];let a;t[2]!==l?(a=()=>l.call("GITHUB_COPILOT_STATUS",{}),t[2]=l,t[3]=a):a=t[3];let n;t[4]!==g||t[5]!==a?(n={queryKey:g,queryFn:a},t[4]=g,t[5]=a,t[6]=n):n=t[6];const u=le(n);let f;t[7]!==i.id||t[8]!==o?(f=()=>o.invalidateQueries({queryKey:O.githubCopilot(i.id)}),t[7]=i.id,t[8]=o,t[9]=f):f=t[9];const d=f;let h;t[10]!==l||t[11]!==r?(h=()=>l.call("GITHUB_COPILOT_CONNECT",{token:r}),t[10]=l,t[11]=r,t[12]=h):h=t[12];let x;t[13]!==d||t[14]!==e?(x=async()=>{p(""),c(!1),await d(),R.success(e("settings.githubCopilot.connected"))},t[13]=d,t[14]=e,t[15]=x):x=t[15];let b;t[16]!==h||t[17]!==x?(b={mutationFn:h,onSuccess:x,onError:At},t[16]=h,t[17]=x,t[18]=b):b=t[18];const C=z(b);let y;t[19]!==l?(y=()=>l.call("GITHUB_COPILOT_DISCONNECT",{}),t[19]=l,t[20]=y):y=t[20];let j;t[21]!==d||t[22]!==e?(j=async()=>{await d(),R.success(e("settings.githubCopilot.disconnected"))},t[21]=d,t[22]=e,t[23]=j):j=t[23];let v;t[24]!==y||t[25]!==j?(v={mutationFn:y,onSuccess:j,onError:Dt},t[24]=y,t[25]=j,t[26]=v):v=t[26];const S=z(v);let _;t[27]!==l?(_=E=>l.call("GITHUB_COPILOT_SHARE",{shared:E}),t[27]=l,t[28]=_):_=t[28];let K;t[29]!==d||t[30]!==_?(K={mutationFn:_,onSuccess:d,onError:Tt},t[29]=d,t[30]=_,t[31]=K):K=t[31];const P=z(K),N=u.data?.connected===!0,D=u.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=N?"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]!==N||t[39]!==D?.sharedByMe||t[40]!==P||t[41]!==e?(w=N?s.jsxs(he,{children:[s.jsx(pe,{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:P.isPending,onCheckedChange:E=>P.mutate(E)})]})}),s.jsx(ge,{className:"max-w-64",children:e("settings.githubCopilot.shareDescription")})]}):null,t[38]=N,t[39]=D?.sharedByMe,t[40]=P,t[41]=e,t[42]=w):w=t[42];let U;t[43]!==N||t[44]!==S||t[45]!==m||t[46]!==e?(U=N?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(wt),p("")},children:e(m?"settings.ownAccounts.cancel":"settings.githubCopilot.connect")}),t[43]=N,t[44]=S,t[45]=m,t[46]=e,t[47]=U):U=t[47];let T;t[48]!==C||t[49]!==N||t[50]!==m||t[51]!==e||t[52]!==r?(T=!N&&m&&s.jsx(ye,{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:p,onSubmit:()=>C.mutate(),inputProps:{placeholder:e("settings.githubCopilot.tokenPlaceholder"),"aria-label":e("settings.githubCopilot.tokenPlaceholder")}}),t[48]=C,t[49]=N,t[50]=m,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 wt(t){return!t}function Tt(t){return R.error(t.message)}function Dt(t){return R.error(t.message)}function At(t){return R.error(t.message)}const kt=t=>Qe({label:me().min(1,t("settings.editProviderDialog.labelRequired")).max(100),apiKey:me().optional(),baseUrl:me().optional()});function Ut({isOpenAICompatible:t,baseUrl:e,currentBaseUrl:i,apiKey:l}){return t&&!!e&&e!==i&&!l}function Et({providerKey:t,provider:e,preset:i,maskedKey:l,currentLabel:o,currentBaseUrl:r,onCancel:p,onSuccess:m}){const{org:c}=oe(),g=G(),a=re(),n=B(),[u,f]=M.useState(!1),d=e.id==="openai-compatible",h=e.supportedMethods.includes("api-key"),x=kt(n),{register:b,handleSubmit:C,watch:y,setError:j,formState:{errors:v}}=Le({resolver:ze(x),defaultValues:{label:o,apiKey:"",baseUrl:r??""}}),S=y("apiKey")??"",{mutate:_,isPending:K}=z({mutationFn:async P=>{let N;P.apiKey&&(d?N=JSON.stringify({baseUrl:P.baseUrl||r||"",apiKey:P.apiKey}):N=P.apiKey),await g.call("AI_PROVIDER_KEY_UPDATE",{keyId:t.id,label:P.label,...N!==void 0?{apiKey:N}:{}})},onSuccess:()=>{a.invalidateQueries({queryKey:O.aiProviderKeys(c.id)}),a.invalidateQueries({queryKey:O.aiProviders(c.id)}),R.success(n("settings.editProviderDialog.providerUpdated")),m()},onError:P=>R.error(n("settings.editProviderDialog.failedToUpdate",{error:P.message}))});return s.jsxs("form",{onSubmit:C(P=>{if(Ut({isOpenAICompatible:d,baseUrl:P.baseUrl,currentBaseUrl:r,apiKey:P.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"),...b("label"),size:"sm"}),v.label&&s.jsx("p",{className:"text-xs text-destructive",children:v.label.message})]}),d&&!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"),...b("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:u&&S?"text":"password",placeholder:l,...b("apiKey"),size:"sm",className:"ph-no-capture pr-8"}),S&&s.jsx("button",{type:"button",onClick:()=>f(!u),"aria-label":n(u?"settings.editProviderDialog.hideApiKey":"settings.editProviderDialog.showApiKey"),className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:u?s.jsx(dt,{size:14}):s.jsx(ut,{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(Me,{children:[s.jsx(Q,{type:"button",variant:"ghost",size:"sm",onClick:p,disabled:K,children:n("settings.editProviderDialog.cancel")}),s.jsx(Q,{type:"submit",size:"sm",disabled:K,children:n(K?"settings.editProviderDialog.saving":"settings.editProviderDialog.save")})]})]})}function Ot(t){const e=$.c(31),{providerKey:i,provider:l,open:o,onOpenChange:r}=t,p=B(),m=G(),c=l.id==="openai-compatible"&&i.presetId?Ce(i.presetId):void 0,g=c?.name??l.name;let a;e[0]!==i.id?(a=O.aiProviderKeyPreview(i.id),e[0]=i.id,e[1]=a):a=e[1];let n;e[2]!==i.id||e[3]!==m?(n=()=>m.call("AI_PROVIDER_KEY_PREVIEW",{keyId:i.id}),e[2]=i.id,e[3]=m,e[4]=n):n=e[4];let u;e[5]!==o||e[6]!==a||e[7]!==n?(u={queryKey:a,queryFn:n,enabled:o,staleTime:0},e[5]=o,e[6]=a,e[7]=n,e[8]=u):u=e[8];const{data:f,isLoading:d}=le(u),h=Be,x=$e,b="sm:max-w-md",C=qe,y=Re,j=p("settings.editProviderDialog.editTitle",{name:g});let v;e[9]!==y||e[10]!==j?(v=s.jsx(y,{children:j}),e[9]=y,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 _;e[15]!==d||e[16]!==r||e[17]!==c||e[18]!==f||e[19]!==l||e[20]!==i?(_=d||!f?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(Fe,{})}):s.jsx(Et,{providerKey:i,provider:l,preset:c,maskedKey:f.maskedKey,currentLabel:f.label,currentBaseUrl:f.baseUrl,onCancel:()=>r(!1),onSuccess:()=>r(!1)}),e[15]=d,e[16]=r,e[17]=c,e[18]=f,e[19]=l,e[20]=i,e[21]=_):_=e[21];let K;e[22]!==x||e[23]!==S||e[24]!==_?(K=s.jsxs(x,{className:b,children:[S,_]}),e[22]=x,e[23]=S,e[24]=_,e[25]=K):K=e[25];let P;return e[26]!==h||e[27]!==r||e[28]!==o||e[29]!==K?(P=s.jsx(h,{open:o,onOpenChange:r,children:K}),e[26]=h,e[27]=r,e[28]=o,e[29]=K,e[30]=P):P=e[30],P}function Rt(t){const e=$.c(86),{providerKey:i,provider:l}=t,{org:o}=oe(),r=G(),p=re(),[m,c]=M.useState(!1),[g,a]=M.useState(!1),n=B(),u=pt(),f=l?.id==="openai-compatible";let d;e[0]!==f||e[1]!==i.presetId?(d=f&&i.presetId?Ce(i.presetId):void 0,e[0]=f,e[1]=i.presetId,e[2]=d):d=e[2];const h=d;let x;e[3]!==f||e[4]!==h||e[5]!==l?.name||e[6]!==i.providerId||e[7]!==n?(x=h?h.name:f?n("settings.aiProviders.customOpenAiCompatible"):l?.name??(i.providerId==="claude-code"?n("settings.providerKeyRow.claudeCode"):i.providerId==="codex"?n("settings.providerKeyRow.codex"):i.providerId),e[3]=f,e[4]=h,e[5]=l?.name,e[6]=i.providerId,e[7]=n,e[8]=x):x=e[8];const b=x,C=h?.logo??l?.logo??xe[i.providerId];let y;e:{if(f){y=i.label;break e}let ne;e[9]!==u||e[10]!==i.createdAt||e[11]!==i.label||e[12]!==n?(ne=n("settings.providerKeyRow.addedTimeAgo",{label:i.label,time:gt(new Date(i.createdAt),{locale:u})}),e[9]=u,e[10]=i.createdAt,e[11]=i.label,e[12]=n,e[13]=ne):ne=e[13],y=ne}const j=y;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]!==o||e[18]!==i.id||e[19]!==p||e[20]!==n?(S=()=>{p.invalidateQueries({queryKey:O.aiProviderKeys(o.id)}),p.invalidateQueries({queryKey:O.aiProviders(o.id)}),p.invalidateQueries({queryKey:O.aiProviderModels(o.id,i.id)}),R.success(n("settings.providerKeyRow.keyDeleted")),c(!1)},e[17]=o,e[18]=i.id,e[19]=p,e[20]=n,e[21]=S):S=e[21];let _;e[22]!==n?(_=ne=>R.error(n("settings.providerKeyRow.failedToDeleteKey",{error:ne.message})),e[22]=n,e[23]=_):_=e[23];let K;e[24]!==v||e[25]!==S||e[26]!==_?(K={mutationFn:v,onSuccess:S,onError:_},e[24]=v,e[25]=S,e[26]=_,e[27]=K):K=e[27];const{mutate:P,isPending:N}=z(K);let D;e[28]!==b||e[29]!==C?(D=s.jsx(be,{src:C,alt:b}),e[28]=b,e[29]=C,e[30]=D):D=e[30];let q;e[31]!==l||e[32]!==n?(q=l?s.jsxs(H,{onSelect:()=>a(!0),children:[s.jsx(mt,{}),n("settings.providerKeyRow.edit")]}):null,e[31]=l,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]!==N||e[39]!==I?(w=s.jsxs(H,{variant:"destructive",disabled:N,onSelect:A,children:[F,I]}),e[38]=N,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]!==b||e[46]!==U||e[47]!==D?(T=s.jsx(de,{icon:D,title:b,meta:j,action:U}),e[44]=j,e[45]=b,e[46]=U,e[47]=D,e[48]=T):T=e[48];let k;e[49]!==g||e[50]!==l||e[51]!==i?(k=l?s.jsx(Ot,{providerKey:i,provider:l,open:g,onOpenChange:a}):null,e[49]=g,e[50]=l,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(Ge,{children:E}),e[55]=E,e[56]=L):L=e[56];let V;e[57]!==i.label?(V=s.jsxs(He,{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(Ve,{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(We,{children:Y}),e[64]=Y,e[65]=J):J=e[65];let X;e[66]!==P?(X=()=>P(),e[66]=P,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(Ye,{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(Je,{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(Xe,{children:[W,te]}),e[76]=W,e[77]=te,e[78]=se):se=e[78];let ie;e[79]!==m||e[80]!==se?(ie=s.jsx(Ze,{open:m,onOpenChange:c,children:se}),e[79]=m,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 es(t){const e=t.filter(i=>nt(i.providerId));return{hasHostedProvider:e.length>0,hasDeco:e.some(i=>i.providerId==="deco")}}function qt(t,e){return t.filter(i=>i.providerId!=="deco").map(i=>({key:i,provider:e.find(l=>l.id===i.providerId)??null}))}const Ke="own-accounts";function ts(t){const e=$.c(29),{onAddKey:i}=t,l=B(),o=lt(),r=ot(),p=qt(o,r?.providers??[]);let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={select:$t},e[0]=m):m=e[0];const c=et(m),g=Ke;let a;e[1]!==c?(a=K=>{K&&c&&K.scrollIntoView({block:"start"})},e[1]=c,e[2]=a):a=e[2];const n=st;let u;e[3]!==l?(u=l("settings.ownAccounts.title"),e[3]=l,e[4]=u):u=e[4];const f=tt;let d,h,x;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(jt,{}),h=s.jsx(Ct,{}),x=s.jsx(It,{}),e[5]=d,e[6]=h,e[7]=x):(d=e[5],h=e[6],x=e[7]);const b=p.map(Ft);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(it,{size:16})}),e[8]=C):C=e[8];let y;e[9]!==l?(y=l("settings.ownAccounts.addApiKey"),e[9]=l,e[10]=y):y=e[10];let j;e[11]!==i||e[12]!==y?(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,y]}),e[11]=i,e[12]=y,e[13]=j):j=e[13];let v;e[14]!==f||e[15]!==j||e[16]!==d||e[17]!==h||e[18]!==x||e[19]!==b?(v=s.jsxs(f,{children:[d,h,x,b,j]}),e[14]=f,e[15]=j,e[16]=d,e[17]=h,e[18]=x,e[19]=b,e[20]=v):v=e[20];let S;e[21]!==n||e[22]!==v||e[23]!==u?(S=s.jsx(n,{title:u,children:v}),e[21]=n,e[22]=v,e[23]=u,e[24]=S):S=e[24];let _;return e[25]!==S||e[26]!==g||e[27]!==a?(_=s.jsx("div",{id:g,ref:a,children:S}),e[25]=S,e[26]=g,e[27]=a,e[28]=_):_=e[28],_}function Ft(t){const{key:e,provider:i}=t;return s.jsx(Rt,{providerKey:e,provider:i},e.id)}function $t(t){return t.location.hash===Ke}export{Ke as O,ts as a,es as g,bt as u};
@@ -1,4 +1,4 @@
1
- import{c as M,r as z,j as l,fT as be,b as H,as as Ze,m as G,bx as ct,fU as He,fV as et,a5 as me,q as Yt,ak as Zt,e as es,K as xe,t as ze,i as ut,ai as ts,R as ss,h as ns,B as ye,b3 as dt,ah as as,aF as ls,fW as os,fX as ft,a8 as rs,F as is,C as qe,d as We,fY as tt,eN as cs,fZ as us}from"./index-DxGCPS5f.js";import{e as ds,aM as fs,j as ms,aD as ps,T as gs,a as st,at as xs,m as hs,a3 as bs,aN as ys,aO as mt,aP as js,aC as Fe,aQ as vs,aR as Ss,aS as pt,A as gt,aT as de,aU as ke,g as Ns,b as ks,aV as ws,I as _s}from"./agent-icon-_Y5eusMw.js";import{t as Ce,e as Ts,c as Cs,s as Is,b as we}from"./Tool01-snML4pPn.js";import{i as xt}from"./LinkBroken01-K7vV_sRk.js";import{b as $s,C as Ms,a as As}from"./collapsible-DEQoVVA9.js";import{u as Ps}from"./use-copy-O-MML7rC.js";import{d as ht,i as Ls,e as Ie,c as Es,P as Rs,u as zs,f as Fs,F as Ds,s as Os,b as Bs,h as Us}from"./usage-stats-hNAp_EX0.js";import{m as Hs,u as qs,n as Ws,o as Gs}from"./thread-intent-DckhqhKt.js";import{f as je,y as Vs,u as ve,z as Ks,b as Js,B as bt,E as Qs,F as $e,G as Xs,H as Ys}from"./chat-context-zQ-qHQlQ.js";import{b as Ge,a as Zs,d as en}from"./shell-layout-dHGD2tyJ.js";import{c as tn}from"./content-blocks-o63cs2vh.js";import{M as sn}from"./mcp-app-renderer-AZxi3AlX.js";import{g as yt}from"./types-B8snWcBI.js";import{o as nn}from"./omit-server-managed-metadata-L5IhjRZB.js";import{T as jt,a as vt,c as St}from"./tooltip-xj6ZnC0s.js";import{c as an,u as ln,a as on}from"./use-mcp-client-BFuEikBh.js";import{a as Nt,g as kt,s as wt}from"./tool-namespace-WdIPTHBa.js";import{t as rn,g as pe,u as Ve}from"./utils-CVEq3hMx.js";import{i as _t}from"./AlertCircle-CzNhPAKr.js";import{s as cn}from"./XClose-B40NOWtA.js";import{n as De}from"./ShoppingBag01-DW9ACSlI.js";import{i as un}from"./SearchMd-Bbg1gFfR.js";import{a as Ke}from"./autosend-hIWj1gzu.js";import{b as Tt}from"./use-entitlements-SlWYl1h3.js";import{I as dn,M as Ct}from"./markdown-BkKuf5yA.js";import{c as fn,S as mn,a as pn,b as gn}from"./sheet-ClaqVLRv.js";import{I as Se}from"./integration-icon-CivNYrxB.js";import{a as It}from"./use-connection-B3EvPXuJ.js";import{u as $t}from"./use-navigate-to-agent-RGucqDuO.js";import{s as xn}from"./UserSquare-DgIYcYhA.js";import{g as hn}from"./use-mcp-prompts-W7_z0mx2.js";import{t as bn}from"./ChevronUp-CslLufEI.js";import{i as yn}from"./Monitor01-Bx36gCte.js";import{a as jn}from"./use-thread-outputs-bD7oL4Tg.js";import{F as vn}from"./file-type-icon-BgsOvG37.js";const Mt=[{delay:0},{delay:100},{delay:200},{delay:100},{delay:200},{delay:200},{delay:300},{delay:300},{delay:400}];function Sn(){const s=M.c(5),[e]=z.useState(Nn);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=Mt.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 Nn(){const s=`var(--chart-${Math.ceil(Math.random()*5)})`;return Mt.map(()=>Math.random()<.6?"color-mix(in srgb, var(--muted-foreground) 25%, transparent)":s)}const kn={damping:.7,stiffness:.05,mass:1.25},wn=70,_n=1e3/60,Tn=350;let Me=!1;globalThis.document?.addEventListener("mousedown",()=>{Me=!0});globalThis.document?.addEventListener("mouseup",()=>{Me=!1});globalThis.document?.addEventListener("click",()=>{Me=!1});const Cn=(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(!Me)return!1;const b=window.getSelection();if(!b||!b.rangeCount)return!1;const k=b.getRangeAt(0);return k.commonAncestorContainer.contains(h.current)||h.current?.contains(k.commonAncestorContainer)},[]),r=z.useCallback(b=>{d.isAtBottom=b,a(b)},[]),f=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(k){if(h.current){const{scrollBehavior:j}=getComputedStyle(h.current);j!=="auto"&&(h.current.style.scrollBehavior="auto"),h.current.scrollTop=k,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:k}=this;if(!s.targetScrollTop)return k;if(b?.targetScrollTop===k)return b.calculatedScrollTop;const j=Math.max(Math.min(s.targetScrollTop(k,{scrollElement:h.current,contentElement:y.current}),k),0);return b={targetScrollTop:k,calculatedScrollTop:j},requestAnimationFrame(()=>{b=void 0}),j},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=wn}}},[]),m=z.useCallback((b={})=>{typeof b=="string"&&(b={animation:b}),b.preserveScrollPosition||r(!0);const k=Date.now()+(Number(b.wait)||0),j=Le(i.current,b.animation),{ignoreEscapes:w=!1}=b;let S,N=d.calculatedTargetScrollTop;b.duration instanceof Promise?b.duration.finally(()=>{S=Date.now()}):S=k+(b.duration??0);const v=async()=>{const _=new Promise(requestAnimationFrame).then(()=>{if(!d.isAtBottom)return d.animation=void 0,!1;const{scrollTop:T}=d,A=performance.now(),P=(A-(d.lastTick??A))/_n;if(d.animation||(d.animation={behavior:j,promise:_,ignoreEscapes:w}),d.animation.behavior===j&&(d.lastTick=A),u()||k>Date.now())return v();if(T<Math.min(N,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()?(N=d.calculatedTargetScrollTop,v()):(d.animation=void 0,d.scrollTop<d.calculatedTargetScrollTop?m({animation:Le(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(()=>{f(!0),r(!1)},[f,r]),g=z.useCallback(({target:b})=>{if(b!==h.current)return;const{scrollTop:k,ignoreScrollToTop:j}=d;let{lastScrollTop:w=k}=d;d.lastScrollTop=k,d.ignoreScrollToTop=void 0,j&&j>k&&(w=j),c(d.isNearBottom),setTimeout(()=>{if(d.resizeDifference||k===j)return;if(u()){f(!0),r(!1);return}const S=k>w,N=k<w;if(d.animation?.ignoreEscapes){d.scrollTop=w;return}N&&(f(!0),r(!1)),S&&f(!1),!d.escapedFromLock&&d.isNearBottom&&r(!0)},1)},[f,r,u,d]),x=z.useCallback(({target:b,deltaY:k})=>{let j=b;for(;!["scroll","auto"].includes(getComputedStyle(j).overflow);){if(!j.parentElement)return;j=j.parentElement}j===h.current&&k<0&&h.current.scrollHeight>h.current.clientHeight&&!d.animation?.ignoreEscapes&&(f(!0),r(!1))},[f,r,d]),h=nt(b=>{h.current?.removeEventListener("scroll",g),h.current?.removeEventListener("wheel",x),b?.addEventListener("scroll",g,{passive:!0}),b?.addEventListener("wheel",x,{passive:!0})},[]),y=nt(b=>{if(d.resizeObserver?.disconnect(),d.resizeObserver=void 0,!b)return;let k;d.resizeObserver=new ResizeObserver(([j])=>{const{height:w}=j.contentRect,S=w-(k??w);if(d.resizeDifference=S,d.scrollTop>d.targetScrollTop&&(d.scrollTop=d.targetScrollTop),c(d.isNearBottom),S>=0){const N=Le(i.current,k?i.current.resize:i.current.initial);m({animation:N,wait:!0,preserveScrollPosition:!0,duration:N==="instant"?void 0:Tn})}else d.isNearBottom&&(f(!1),r(!0));k=w,requestAnimationFrame(()=>{setTimeout(()=>{d.resizeDifference===S&&(d.resizeDifference=0)},1)})}),d.resizeObserver?.observe(b)},[]);return{contentRef:y,scrollRef:h,scrollToBottom:m,stopScroll:p,isAtBottom:n||o,isNearBottom:o,escapedFromLock:e,state:d}};function nt(s,e){const t=z.useCallback(n=>(t.current=n,s(n)),e);return t}const Pe=new Map;function Le(...s){const e={...kn};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 Pe.has(n)||Pe.set(n,Object.freeze(e)),t?"instant":Pe.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:f,alwaysChevron:d,defaultOpen:m,children:p}){const g=H(),[x,h]=z.useState(m??!1),{handleCopy:y,copied:b}=Ps(),k=a==="loading",j=a==="error",S=!!(o&&o.trim())||!!p,N=u==="subtask",v=(i??!1)||x,_=Cn({initial:k?"instant":!1}),T=l.jsxs($s,{open:v,onOpenChange:i?void 0:h,className:"min-w-0",children:[l.jsxs(Ms,{disabled:!S,className:G("group/tool flex items-center gap-2 w-full py-2.5 text-left transition-colors",S&&"[@media(hover:hover)]:hover:bg-accent",!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(Ze,{className:G("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",v&&"rotate-90")}):l.jsxs(l.Fragment,{children:[l.jsx("div",{className:G("absolute inset-0 flex items-center justify-center [&>svg]:size-4 transition-opacity duration-150",f?"[&>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:G("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(Ze,{className:G("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",v&&"rotate-90")})})]})}),l.jsx("span",{className:G("shrink-0 text-sm font-normal",j?"text-warning/80":"text-foreground",k&&"shimmer"),children:e}),n?l.jsx("span",{className:"min-w-0 flex-1 truncate",children:l.jsx("span",{className:"text-xs text-muted-foreground/60 bg-muted/50 rounded-[3px] px-1 py-px leading-none",children:l.jsx("span",{className:G(k&&"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(ht,{usage:t})]}),S&&l.jsx(As,{className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden",children:p||(c==="prose"?l.jsx("div",{className:"mt-1 mb-1",children:l.jsx("div",{ref:_.scrollRef,className:"max-h-[150px] overflow-y-auto rounded-md bg-muted/30 px-3 py-2",children:l.jsx("p",{ref:_.contentRef,className:"text-xs text-muted-foreground/70 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(ct,{className:"size-3.5"}):l.jsx(ds,{className:"size-3.5"})})]})})}))})]});return N?l.jsx("div",{className:"pl-4 border-l border-border/40 ml-1.5",children:T}):T}function fe(s){const e=M.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 At=4;function Pt(s){const e=M.c(8),{count:t,noun:n,onClick:a}=s,o=H();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(xt,{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 Lt(s){const e=M.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 f=He(a);if(f===null){u=null;break e}const d=new Date(f);o=d.toLocaleString(),e[6]!==n?(c=G("text-2xs text-muted-foreground/60 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}function Oe(s){const e=M.c(9),{since:t}=s;let n;e[0]!==t?(n=()=>et(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(et(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 f;return e[7]!==r?(f=l.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground/50",children:r}),e[7]=r,e[8]=f):f=e[8],f}function In(s){return{planning:{icon:l.jsx(ms,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.planningLabel"),detail:s("chat.thinkingIndicator.planningDetail")},thinking:{icon:l.jsx(Ce,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.thinkingLabel"),detail:s("chat.thinkingIndicator.thinkingDetail")}}}const $n=1200;function Be(s){const e=M.c(8),{icon:t,title:n,summary:a,detail:o,state:c,detailVariant:i,trailing:u}=s,r=i===void 0?"prose":i;let f;return e[0]!==o||e[1]!==r||e[2]!==t||e[3]!==c||e[4]!==a||e[5]!==n||e[6]!==u?(f=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]=f):f=e[7],f}function Mn(s){const e=M.c(22),{startedAt:t}=s,n=H(),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")},$n);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=Hs(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(Ce,{className:"size-4"}),e[6]=y):y=e[6];const b=`${h.label}...`;let k;e[7]!==t?(k=t!==null&&l.jsx(Oe,{since:t}),e[7]=t,e[8]=k):k=e[8];let j;return e[9]!==h.detail||e[10]!==b||e[11]!==k?(j=l.jsx(Be,{icon:y,title:b,summary:h.detail,state:"loading",trailing:k}),e[9]=h.detail,e[10]=b,e[11]=k,e[12]=j):j=e[12],j}let r;e[13]!==n?(r=In(n),e[13]=n,e[14]=r):r=e[14];const d=r[o],m=`${d.label}...`;let p;e[15]!==t?(p=t!==null&&l.jsx(Oe,{since:t}),e[15]=t,e[16]=p):p=e[16];let g;return e[17]!==d.detail||e[18]!==d.icon||e[19]!==m||e[20]!==p?(g=l.jsx(Be,{icon:d.icon,title:m,summary:d.detail,state:"loading",trailing:p}),e[17]=d.detail,e[18]=d.icon,e[19]=m,e[20]=p,e[21]=g):g=e[21],g}function An(s){const e=M.c(3),{startedAt:t}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=l.jsx(Sn,{}),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(Oe,{since:t})]}),e[1]=t,e[2]=a):a=e[2],a}const Pn=2e4;function Ln(s){const e=M.c(9),{startedAt:t}=s,n=H(),a=Ge(1e3),o=je(),i=(t!==null?a-t:0)>=Pn;let u;e[0]!==t?(u=l.jsx(Mn,{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 f;return e[6]!==u||e[7]!==r?(f=l.jsxs("div",{className:"flex flex-col gap-0.5",children:[u,r]}),e[6]=u,e[7]=r,e[8]=f):f=e[8],f}function En(s){const e=M.c(24),{duration:t,parts:n,isStreaming:a}=s,o=H();let c;e[0]!==n?(c=n.every(Fn),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 f;if(e[5]!==i||e[6]!==a||e[7]!==n){const k=n.map(zn).join(`
1
+ import{c as M,r as z,j as l,fT as be,b as H,as as Ze,m as G,bx as ct,fU as He,fV as et,a5 as me,q as Yt,ak as Zt,e as es,K as xe,t as ze,i as ut,ai as ts,R as ss,h as ns,B as ye,b3 as dt,ah as as,aF as ls,fW as os,fX as ft,a8 as rs,F as is,C as qe,d as We,fY as tt,eN as cs,fZ as us}from"./index-cgovyYsQ.js";import{e as ds,aM as fs,j as ms,aD as ps,T as gs,a as st,at as xs,m as hs,a3 as bs,aN as ys,aO as mt,aP as js,aC as Fe,aQ as vs,aR as Ss,aS as pt,A as gt,aT as de,aU as ke,g as Ns,b as ks,aV as ws,I as _s}from"./agent-icon-TjMVTO6h.js";import{t as Ce,e as Ts,c as Cs,s as Is,b as we}from"./Tool01-CSZn_Wh0.js";import{i as xt}from"./LinkBroken01-CqkORUqT.js";import{b as $s,C as Ms,a as As}from"./collapsible-Ddfj_16s.js";import{u as Ps}from"./use-copy-D49VwPhf.js";import{d as ht,i as Ls,e as Ie,c as Es,P as Rs,u as zs,f as Fs,F as Ds,s as Os,b as Bs,h as Us}from"./usage-stats-Di2DK9Gv.js";import{m as Hs,u as qs,n as Ws,o as Gs}from"./thread-intent-B59SA_sa.js";import{f as je,y as Vs,u as ve,z as Ks,b as Js,B as bt,E as Qs,F as $e,G as Xs,H as Ys}from"./chat-context-BBpIuXC7.js";import{b as Ge,a as Zs,d as en}from"./shell-layout-C_vTrOFi.js";import{c as tn}from"./content-blocks-o63cs2vh.js";import{M as sn}from"./mcp-app-renderer-DjL0niPw.js";import{g as yt}from"./types-BrSjQREm.js";import{o as nn}from"./omit-server-managed-metadata-L5IhjRZB.js";import{T as jt,a as vt,c as St}from"./tooltip-Bg4P3YaG.js";import{c as an,u as ln,a as on}from"./use-mcp-client-B3mZDGvG.js";import{a as Nt,g as kt,s as wt}from"./tool-namespace-DbWzvuWO.js";import{t as rn,g as pe,u as Ve}from"./utils-CVEq3hMx.js";import{i as _t}from"./AlertCircle-CQ8p4KFs.js";import{s as cn}from"./XClose-DpL893eV.js";import{n as De}from"./ShoppingBag01-CajIv2w8.js";import{i as un}from"./SearchMd-CW5cmPaz.js";import{a as Ke}from"./autosend-U0ehaXsA.js";import{b as Tt}from"./use-entitlements-C6In-vfl.js";import{I as dn,M as Ct}from"./markdown-mKHkB6FI.js";import{c as fn,S as mn,a as pn,b as gn}from"./sheet-DWPcPfVu.js";import{I as Se}from"./integration-icon-bQl-nSH8.js";import{a as It}from"./use-connection-IiFidBLV.js";import{u as $t}from"./use-navigate-to-agent-CYu1HJsb.js";import{s as xn}from"./UserSquare-DKikapRU.js";import{g as hn}from"./use-mcp-prompts-DnVJp_BL.js";import{t as bn}from"./ChevronUp-BTGxI7Zs.js";import{i as yn}from"./Monitor01-D-9i_0yJ.js";import{a as jn}from"./use-thread-outputs-Btu23rT9.js";import{F as vn}from"./file-type-icon-DrIF_ach.js";const Mt=[{delay:0},{delay:100},{delay:200},{delay:100},{delay:200},{delay:200},{delay:300},{delay:300},{delay:400}];function Sn(){const s=M.c(5),[e]=z.useState(Nn);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=Mt.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 Nn(){const s=`var(--chart-${Math.ceil(Math.random()*5)})`;return Mt.map(()=>Math.random()<.6?"color-mix(in srgb, var(--muted-foreground) 25%, transparent)":s)}const kn={damping:.7,stiffness:.05,mass:1.25},wn=70,_n=1e3/60,Tn=350;let Me=!1;globalThis.document?.addEventListener("mousedown",()=>{Me=!0});globalThis.document?.addEventListener("mouseup",()=>{Me=!1});globalThis.document?.addEventListener("click",()=>{Me=!1});const Cn=(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(!Me)return!1;const b=window.getSelection();if(!b||!b.rangeCount)return!1;const k=b.getRangeAt(0);return k.commonAncestorContainer.contains(h.current)||h.current?.contains(k.commonAncestorContainer)},[]),r=z.useCallback(b=>{d.isAtBottom=b,a(b)},[]),f=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(k){if(h.current){const{scrollBehavior:j}=getComputedStyle(h.current);j!=="auto"&&(h.current.style.scrollBehavior="auto"),h.current.scrollTop=k,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:k}=this;if(!s.targetScrollTop)return k;if(b?.targetScrollTop===k)return b.calculatedScrollTop;const j=Math.max(Math.min(s.targetScrollTop(k,{scrollElement:h.current,contentElement:y.current}),k),0);return b={targetScrollTop:k,calculatedScrollTop:j},requestAnimationFrame(()=>{b=void 0}),j},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=wn}}},[]),m=z.useCallback((b={})=>{typeof b=="string"&&(b={animation:b}),b.preserveScrollPosition||r(!0);const k=Date.now()+(Number(b.wait)||0),j=Le(i.current,b.animation),{ignoreEscapes:w=!1}=b;let S,N=d.calculatedTargetScrollTop;b.duration instanceof Promise?b.duration.finally(()=>{S=Date.now()}):S=k+(b.duration??0);const v=async()=>{const _=new Promise(requestAnimationFrame).then(()=>{if(!d.isAtBottom)return d.animation=void 0,!1;const{scrollTop:T}=d,A=performance.now(),P=(A-(d.lastTick??A))/_n;if(d.animation||(d.animation={behavior:j,promise:_,ignoreEscapes:w}),d.animation.behavior===j&&(d.lastTick=A),u()||k>Date.now())return v();if(T<Math.min(N,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()?(N=d.calculatedTargetScrollTop,v()):(d.animation=void 0,d.scrollTop<d.calculatedTargetScrollTop?m({animation:Le(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(()=>{f(!0),r(!1)},[f,r]),g=z.useCallback(({target:b})=>{if(b!==h.current)return;const{scrollTop:k,ignoreScrollToTop:j}=d;let{lastScrollTop:w=k}=d;d.lastScrollTop=k,d.ignoreScrollToTop=void 0,j&&j>k&&(w=j),c(d.isNearBottom),setTimeout(()=>{if(d.resizeDifference||k===j)return;if(u()){f(!0),r(!1);return}const S=k>w,N=k<w;if(d.animation?.ignoreEscapes){d.scrollTop=w;return}N&&(f(!0),r(!1)),S&&f(!1),!d.escapedFromLock&&d.isNearBottom&&r(!0)},1)},[f,r,u,d]),x=z.useCallback(({target:b,deltaY:k})=>{let j=b;for(;!["scroll","auto"].includes(getComputedStyle(j).overflow);){if(!j.parentElement)return;j=j.parentElement}j===h.current&&k<0&&h.current.scrollHeight>h.current.clientHeight&&!d.animation?.ignoreEscapes&&(f(!0),r(!1))},[f,r,d]),h=nt(b=>{h.current?.removeEventListener("scroll",g),h.current?.removeEventListener("wheel",x),b?.addEventListener("scroll",g,{passive:!0}),b?.addEventListener("wheel",x,{passive:!0})},[]),y=nt(b=>{if(d.resizeObserver?.disconnect(),d.resizeObserver=void 0,!b)return;let k;d.resizeObserver=new ResizeObserver(([j])=>{const{height:w}=j.contentRect,S=w-(k??w);if(d.resizeDifference=S,d.scrollTop>d.targetScrollTop&&(d.scrollTop=d.targetScrollTop),c(d.isNearBottom),S>=0){const N=Le(i.current,k?i.current.resize:i.current.initial);m({animation:N,wait:!0,preserveScrollPosition:!0,duration:N==="instant"?void 0:Tn})}else d.isNearBottom&&(f(!1),r(!0));k=w,requestAnimationFrame(()=>{setTimeout(()=>{d.resizeDifference===S&&(d.resizeDifference=0)},1)})}),d.resizeObserver?.observe(b)},[]);return{contentRef:y,scrollRef:h,scrollToBottom:m,stopScroll:p,isAtBottom:n||o,isNearBottom:o,escapedFromLock:e,state:d}};function nt(s,e){const t=z.useCallback(n=>(t.current=n,s(n)),e);return t}const Pe=new Map;function Le(...s){const e={...kn};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 Pe.has(n)||Pe.set(n,Object.freeze(e)),t?"instant":Pe.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:f,alwaysChevron:d,defaultOpen:m,children:p}){const g=H(),[x,h]=z.useState(m??!1),{handleCopy:y,copied:b}=Ps(),k=a==="loading",j=a==="error",S=!!(o&&o.trim())||!!p,N=u==="subtask",v=(i??!1)||x,_=Cn({initial:k?"instant":!1}),T=l.jsxs($s,{open:v,onOpenChange:i?void 0:h,className:"min-w-0",children:[l.jsxs(Ms,{disabled:!S,className:G("group/tool flex items-center gap-2 w-full py-2.5 text-left transition-colors",S&&"[@media(hover:hover)]:hover:bg-accent",!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(Ze,{className:G("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",v&&"rotate-90")}):l.jsxs(l.Fragment,{children:[l.jsx("div",{className:G("absolute inset-0 flex items-center justify-center [&>svg]:size-4 transition-opacity duration-150",f?"[&>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:G("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(Ze,{className:G("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",v&&"rotate-90")})})]})}),l.jsx("span",{className:G("shrink-0 text-sm font-normal",j?"text-warning/80":"text-foreground",k&&"shimmer"),children:e}),n?l.jsx("span",{className:"min-w-0 flex-1 truncate",children:l.jsx("span",{className:"text-xs text-muted-foreground/60 bg-muted/50 rounded-[3px] px-1 py-px leading-none",children:l.jsx("span",{className:G(k&&"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(ht,{usage:t})]}),S&&l.jsx(As,{className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden",children:p||(c==="prose"?l.jsx("div",{className:"mt-1 mb-1",children:l.jsx("div",{ref:_.scrollRef,className:"max-h-[150px] overflow-y-auto rounded-md bg-muted/30 px-3 py-2",children:l.jsx("p",{ref:_.contentRef,className:"text-xs text-muted-foreground/70 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(ct,{className:"size-3.5"}):l.jsx(ds,{className:"size-3.5"})})]})})}))})]});return N?l.jsx("div",{className:"pl-4 border-l border-border/40 ml-1.5",children:T}):T}function fe(s){const e=M.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 At=4;function Pt(s){const e=M.c(8),{count:t,noun:n,onClick:a}=s,o=H();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(xt,{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 Lt(s){const e=M.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 f=He(a);if(f===null){u=null;break e}const d=new Date(f);o=d.toLocaleString(),e[6]!==n?(c=G("text-2xs text-muted-foreground/60 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}function Oe(s){const e=M.c(9),{since:t}=s;let n;e[0]!==t?(n=()=>et(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(et(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 f;return e[7]!==r?(f=l.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground/50",children:r}),e[7]=r,e[8]=f):f=e[8],f}function In(s){return{planning:{icon:l.jsx(ms,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.planningLabel"),detail:s("chat.thinkingIndicator.planningDetail")},thinking:{icon:l.jsx(Ce,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.thinkingLabel"),detail:s("chat.thinkingIndicator.thinkingDetail")}}}const $n=1200;function Be(s){const e=M.c(8),{icon:t,title:n,summary:a,detail:o,state:c,detailVariant:i,trailing:u}=s,r=i===void 0?"prose":i;let f;return e[0]!==o||e[1]!==r||e[2]!==t||e[3]!==c||e[4]!==a||e[5]!==n||e[6]!==u?(f=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]=f):f=e[7],f}function Mn(s){const e=M.c(22),{startedAt:t}=s,n=H(),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")},$n);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=Hs(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(Ce,{className:"size-4"}),e[6]=y):y=e[6];const b=`${h.label}...`;let k;e[7]!==t?(k=t!==null&&l.jsx(Oe,{since:t}),e[7]=t,e[8]=k):k=e[8];let j;return e[9]!==h.detail||e[10]!==b||e[11]!==k?(j=l.jsx(Be,{icon:y,title:b,summary:h.detail,state:"loading",trailing:k}),e[9]=h.detail,e[10]=b,e[11]=k,e[12]=j):j=e[12],j}let r;e[13]!==n?(r=In(n),e[13]=n,e[14]=r):r=e[14];const d=r[o],m=`${d.label}...`;let p;e[15]!==t?(p=t!==null&&l.jsx(Oe,{since:t}),e[15]=t,e[16]=p):p=e[16];let g;return e[17]!==d.detail||e[18]!==d.icon||e[19]!==m||e[20]!==p?(g=l.jsx(Be,{icon:d.icon,title:m,summary:d.detail,state:"loading",trailing:p}),e[17]=d.detail,e[18]=d.icon,e[19]=m,e[20]=p,e[21]=g):g=e[21],g}function An(s){const e=M.c(3),{startedAt:t}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=l.jsx(Sn,{}),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(Oe,{since:t})]}),e[1]=t,e[2]=a):a=e[2],a}const Pn=2e4;function Ln(s){const e=M.c(9),{startedAt:t}=s,n=H(),a=Ge(1e3),o=je(),i=(t!==null?a-t:0)>=Pn;let u;e[0]!==t?(u=l.jsx(Mn,{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 f;return e[6]!==u||e[7]!==r?(f=l.jsxs("div",{className:"flex flex-col gap-0.5",children:[u,r]}),e[6]=u,e[7]=r,e[8]=f):f=e[8],f}function En(s){const e=M.c(24),{duration:t,parts:n,isStreaming:a}=s,o=H();let c;e[0]!==n?(c=n.every(Fn),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 f;if(e[5]!==i||e[6]!==a||e[7]!==n){const k=n.map(zn).join(`
2
2
  `).trim().split(`
3
3
  `).filter(Boolean),j=a?k[k.length-1]??"":k[0]??"";f=!i&&j?j.length>100?j.slice(0,100)+"…":j:void 0,e[5]=i,e[6]=a,e[7]=n,e[8]=f}else f=e[8];const d=f;let m;if(e[9]!==i||e[10]!==n){const b=n.map(Rn).join(`
4
4