decocms 4.504.1 → 4.504.3

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 (378) hide show
  1. package/dist/client/assets/{ActiveShapeUtils-Cx07-cYR.js → ActiveShapeUtils-RZxJo9yZ.js} +1 -1
  2. package/dist/client/assets/{AlertCircle-Bec1dxaS.js → AlertCircle-Bd_c5lvx.js} +1 -1
  3. package/dist/client/assets/{AreaChart-AYJHOtjZ.js → AreaChart-B4uhU_-I.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-B66-ad90.js → ArrowLeft-BEDsoU4s.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-CSeqbspv.js → ArrowUp-BlmIqgms.js} +1 -1
  6. package/dist/client/assets/{BarChart-CDSH2Akh.js → BarChart-CyJo_rQ-.js} +1 -1
  7. package/dist/client/assets/{Building02-Bu4UAsgO.js → Building02-egDXvjGT.js} +1 -1
  8. package/dist/client/assets/{CategoricalChart-iujTK0KL.js → CategoricalChart-DESa7bJ2.js} +1 -1
  9. package/dist/client/assets/{CheckCircle-BSvXc66Q.js → CheckCircle-DwYX4v4z.js} +1 -1
  10. package/dist/client/assets/{ChevronSelectorVertical-n7b_5Q6B.js → ChevronSelectorVertical-yrgeHjmf.js} +1 -1
  11. package/dist/client/assets/{ChevronUp-bmzgw7dV.js → ChevronUp-BWLwOWUB.js} +1 -1
  12. package/dist/client/assets/{Copy01-BISq6vrL.js → Copy01-D9EWjRj_.js} +1 -1
  13. package/dist/client/assets/{CreditCard01-CbXaQViz.js → CreditCard01-D-2H38IE.js} +1 -1
  14. package/dist/client/assets/{DotsVertical-M1fm8bjv.js → DotsVertical-Czz64uuc.js} +1 -1
  15. package/dist/client/assets/{ErrorBarContext-RuQNhaXV.js → ErrorBarContext-P_EddvG-.js} +1 -1
  16. package/dist/client/assets/{Globe04-BRIK-LcF.js → Globe04-Cq9w75Dt.js} +1 -1
  17. package/dist/client/assets/{Image01-C8Z3a6q4.js → Image01-Dis3SEGR.js} +1 -1
  18. package/dist/client/assets/{Key01-CAPfBcFM.js → Key01-Dpml-zEF.js} +1 -1
  19. package/dist/client/assets/{Link01-DJt14Rj5.js → Link01-CH9KeNiW.js} +1 -1
  20. package/dist/client/assets/{LinkBroken01-B6cSnLw2.js → LinkBroken01-XywQ_V_L.js} +1 -1
  21. package/dist/client/assets/{Monitor01-BNRWrf3F.js → Monitor01-Cgbhw-lc.js} +1 -1
  22. package/dist/client/assets/{Play-CB3VpTFO.js → Play-l_x93PVH.js} +1 -1
  23. package/dist/client/assets/{Plus-DmY-I-W1.js → Plus-B78UgIQj.js} +1 -1
  24. package/dist/client/assets/{SearchMd-Dqev4UbC.js → SearchMd-Dqn_93IA.js} +1 -1
  25. package/dist/client/assets/{Sector-NYaG1AEA.js → Sector-Di1ZTW0S.js} +1 -1
  26. package/dist/client/assets/{ShoppingBag01-Crf2xSz3.js → ShoppingBag01-DFlLGvQA.js} +1 -1
  27. package/dist/client/assets/{Sun-DJ4L7xwP.js → Sun-DIgdvn0A.js} +1 -1
  28. package/dist/client/assets/{SwitchHorizontal01-BspP-O9B.js → SwitchHorizontal01-C2oPVYY7.js} +1 -1
  29. package/dist/client/assets/{Tool01-CbGwYE-2.js → Tool01-CgbvcQme.js} +1 -1
  30. package/dist/client/assets/{Trash01-DArHDncW.js → Trash01-DgiFlWKM.js} +1 -1
  31. package/dist/client/assets/{Upload01-DlUMQy0J.js → Upload01-CHvq8vCH.js} +1 -1
  32. package/dist/client/assets/{User01-B-tTyVsO.js → User01-B5touKPl.js} +1 -1
  33. package/dist/client/assets/{UserSquare-zw-tgJGh.js → UserSquare-BbO_BuU-.js} +1 -1
  34. package/dist/client/assets/{Users01-BI0nawB5.js → Users01-zLwSSr3g.js} +1 -1
  35. package/dist/client/assets/{XAxis-D40NyhoU.js → XAxis-DDx6ChY_.js} +1 -1
  36. package/dist/client/assets/{XClose-DxE71MU7.js → XClose-DDA2dBHO.js} +1 -1
  37. package/dist/client/assets/{ZoomOut-Cyw3AXuM.js → ZoomOut-WxvethXT.js} +1 -1
  38. package/dist/client/assets/{access-gate-BE8SqF7m.js → access-gate-4xSYYx4U.js} +1 -1
  39. package/dist/client/assets/{add-connection-dialog-D59AnSQs.js → add-connection-dialog-7GPeDba3.js} +1 -1
  40. package/dist/client/assets/{agent-analytics-CullbrRF.js → agent-analytics-XCL_VNP9.js} +1 -1
  41. package/dist/client/assets/agent-app-Cj9pvNzU.js +1 -0
  42. package/dist/client/assets/{agent-assets-D6KY0tjV.js → agent-assets-CM5amxXd.js} +1 -1
  43. package/dist/client/assets/{agent-automation-BPYqK28y.js → agent-automation-D9JOPD82.js} +1 -1
  44. package/dist/client/assets/{agent-automations--Qo-l1fi.js → agent-automations-ChIU3McM.js} +1 -1
  45. package/dist/client/assets/{agent-connect-sources-DGgWflBR.js → agent-connect-sources-BPYqcqql.js} +1 -1
  46. package/dist/client/assets/agent-deck-R12yitrT.js +1 -0
  47. package/dist/client/assets/{agent-e2e-COewOX58.js → agent-e2e-CjtLVSXK.js} +1 -1
  48. package/dist/client/assets/{agent-experiments-MT61jDl1.js → agent-experiments-BMdpGEs9.js} +1 -1
  49. package/dist/client/assets/{agent-file-DecvJxa1.js → agent-file-DuM0L2Hq.js} +1 -1
  50. package/dist/client/assets/{agent-hosting-DW-JvZV7.js → agent-hosting-8UkWsAzU.js} +1 -1
  51. package/dist/client/assets/{agent-icon-Czh6MNam.js → agent-icon-BbVfkRpF.js} +1 -1
  52. package/dist/client/assets/agent-library-_gmvdC7i.js +1 -0
  53. package/dist/client/assets/agent-library-file-CfdnKs5b.js +1 -0
  54. package/dist/client/assets/{agent-monitor-BEgctWY1.js → agent-monitor-BeKqXuC8.js} +1 -1
  55. package/dist/client/assets/{agent-overview-CP1VKdfr.js → agent-overview-DmybxXjD.js} +1 -1
  56. package/dist/client/assets/{agent-releases-BqBTam8W.js → agent-releases-CkbjtasY.js} +1 -1
  57. package/dist/client/assets/agent-settings-DUDJVIpC.js +1 -0
  58. package/dist/client/assets/{agent-site-editor-CuYMD6kh.js → agent-site-editor-CL5B6c8U.js} +1 -1
  59. package/dist/client/assets/agent-site-editor-code-D33VbdRo.js +2 -0
  60. package/dist/client/assets/agent-site-editor-content-DLfhU1Mc.js +1 -0
  61. package/dist/client/assets/agent-site-editor-preview-Cn2_zMbD.js +1 -0
  62. package/dist/client/assets/agent-view-D-m8H7w5.js +1 -0
  63. package/dist/client/assets/{agent-view-guard-D0QGa17N.js → agent-view-guard-DUKf6IhH.js} +1 -1
  64. package/dist/client/assets/{agents-list-BT9TpMpA.js → agents-list-DbB_LLEt.js} +1 -1
  65. package/dist/client/assets/{ai-providers-DykxIfM3.js → ai-providers-BaWDS2ay.js} +1 -1
  66. package/dist/client/assets/{alert-D-kHUOW5.js → alert-CKvl4oEg.js} +1 -1
  67. package/dist/client/assets/{alert-dialog-D1kkgyaQ.js → alert-dialog-BUOq5Ccz.js} +1 -1
  68. package/dist/client/assets/{analytics-sections-CFj-EITt.js → analytics-sections-CPuiYHls.js} +1 -1
  69. package/dist/client/assets/api-keys-CmDCt2I3.js +1 -0
  70. package/dist/client/assets/{api-keys-CQSDswwH.js → api-keys-DgmBxzOS.js} +1 -1
  71. package/dist/client/assets/{app-editor-Dr8QE24J.js → app-editor-vmbuUyTA.js} +1 -1
  72. package/dist/client/assets/{asset-utils-DyAwxctJ.js → asset-utils-DUui8ODR.js} +1 -1
  73. package/dist/client/assets/{auth-eKkR4KqF.js → auth-Dvjx-0pF.js} +1 -1
  74. package/dist/client/assets/{auth-catchall-DcEJgoW5.js → auth-catchall-DOX1kvcj.js} +1 -1
  75. package/dist/client/assets/{auth-entry-DN1yBH_X.js → auth-entry-DCkFZRcX.js} +1 -1
  76. package/dist/client/assets/{auth-split-layout-DQptZiat.js → auth-split-layout-TKe_keEh.js} +1 -1
  77. package/dist/client/assets/{authenticate-and-persist-oauth-CFzJEYoH.js → authenticate-and-persist-oauth-ESA9MWa7.js} +1 -1
  78. package/dist/client/assets/{automation-list-row-Cz8Wl6TZ.js → automation-list-row-md1xazcM.js} +1 -1
  79. package/dist/client/assets/{automation-runs-ZQZ-ZfdL.js → automation-runs-CErImxH6.js} +1 -1
  80. package/dist/client/assets/{automations-Bi5MrN34.js → automations-Ceb5VwTT.js} +1 -1
  81. package/dist/client/assets/{autosend-Cp8JwTOk.js → autosend-D2AjmwKk.js} +1 -1
  82. package/dist/client/assets/{avatar-DdSak0Sb.js → avatar-Bkg-M2--.js} +1 -1
  83. package/dist/client/assets/{badge-Dmtt-CEm.js → badge-BHSeIY_1.js} +1 -1
  84. package/dist/client/assets/{block-document-D6HEkp1z.js → block-document-DBTvACJU.js} +1 -1
  85. package/dist/client/assets/{blocks-preview-workspace-context-BAqnuZhZ.js → blocks-preview-workspace-context-C_CMlPGv.js} +1 -1
  86. package/dist/client/assets/{blocks-tab-states-BNV3yj99.js → blocks-tab-states-DFZ8hczy.js} +3 -3
  87. package/dist/client/assets/{blog-schema-C2E88VA3.js → blog-schema-SBli8lb-.js} +1 -1
  88. package/dist/client/assets/{board-analytics-LuwxUF7A.js → board-analytics-C8-bFRsB.js} +1 -1
  89. package/dist/client/assets/{buckets-D4C_xVrZ.js → buckets-CfX0kwD-.js} +1 -1
  90. package/dist/client/assets/{build-improve-prompt-doc-D9tpl3BX.js → build-improve-prompt-doc-BDsxrmiR.js} +1 -1
  91. package/dist/client/assets/{calendar-BMATLdVs.js → calendar-BGwUIW_v.js} +1 -1
  92. package/dist/client/assets/{capability-load-error-DiGMeo-2.js → capability-load-error-B5_k1Nfi.js} +1 -1
  93. package/dist/client/assets/{category-editor-Bu6l5zLZ.js → category-editor-Rc-G1Y5c.js} +1 -1
  94. package/dist/client/assets/{chart-CjhNJQDa.js → chart-Bl8bk0Xu.js} +1 -1
  95. package/dist/client/assets/{chat-context-7iPEBonn.js → chat-context-B8ZyAt_m.js} +1 -1
  96. package/dist/client/assets/{chat-draft-g8x2IwR8.js → chat-draft-DwejBqhn.js} +1 -1
  97. package/dist/client/assets/{checkbox-xsx9w-sP.js → checkbox-DXc9jE-k.js} +1 -1
  98. package/dist/client/assets/{choose-editor-r9EQMwQK.js → choose-editor-CceUsAKb.js} +1 -1
  99. package/dist/client/assets/{cli-auth-success-mhWAQy14.js → cli-auth-success-Cn4pvmR8.js} +1 -1
  100. package/dist/client/assets/{client-icons-B4guPQZd.js → client-icons-DICBBMpW.js} +1 -1
  101. package/dist/client/assets/cms-settings-editor-DNNaHBfM.js +1 -0
  102. package/dist/client/assets/{collapsible-zZncAZBc.js → collapsible-TduD25aU.js} +1 -1
  103. package/dist/client/assets/{collection-detail-ClMsO2zA.js → collection-detail-BupnQedi.js} +1 -1
  104. package/dist/client/assets/{collection-display-button-Dcv9cmSy.js → collection-display-button-DUJ-pR_e.js} +1 -1
  105. package/dist/client/assets/{collection-search-C0fvUi6S.js → collection-search-Ch8MLIzL.js} +1 -1
  106. package/dist/client/assets/{collection-table-wrapper-Cn4jrf8s.js → collection-table-wrapper-DMN2paJ9.js} +1 -1
  107. package/dist/client/assets/{collection-tabs-CtpJB22o.js → collection-tabs-Brdd-yO-.js} +1 -1
  108. package/dist/client/assets/{column-rules-CbXpTJRV.js → column-rules-DATIWaDS.js} +1 -1
  109. package/dist/client/assets/{combobox-nBsbDngO.js → combobox-B2Zg5E1b.js} +1 -1
  110. package/dist/client/assets/{command-Dz8D1H9z.js → command-mzLX0leD.js} +1 -1
  111. package/dist/client/assets/{companion-mcps-section-D22vLHNd.js → companion-mcps-section-Dxsj478B.js} +1 -1
  112. package/dist/client/assets/{config-CFzYPymH.js → config-CLB7Eu2B.js} +1 -1
  113. package/dist/client/assets/{connect-DGmViujb.js → connect-Bi9-kPT4.js} +1 -1
  114. package/dist/client/assets/{connect-layout-C1_jUYFW.js → connect-layout-CO5j3vN8.js} +1 -1
  115. package/dist/client/assets/{connection-D2EgMJ9G.js → connection-Ddwz98Wi.js} +1 -1
  116. package/dist/client/assets/{connection-card-CI5YjmPA.js → connection-card-BpuIPJGU.js} +1 -1
  117. package/dist/client/assets/{connection-detail-3sVF5dQt.js → connection-detail-DViKai1a.js} +1 -1
  118. package/dist/client/assets/{connection-form-helpers-CY2wGEex.js → connection-form-helpers-ZBgy6PeQ.js} +1 -1
  119. package/dist/client/assets/{connections-Twa_JYzc.js → connections-BvTwZovV.js} +1 -1
  120. package/dist/client/assets/{content-tab-BhYfvgHJ.js → content-tab-CLR-MGXY.js} +3 -3
  121. package/dist/client/assets/{context-CE7HH71W.js → context-CeH3hlDj.js} +1 -1
  122. package/dist/client/assets/{context-menu-CPfLEqbb.js → context-menu-CMwMIurQ.js} +1 -1
  123. package/dist/client/assets/{core.esm-DajKxe8q.js → core.esm-Ds5IbpoU.js} +1 -1
  124. package/dist/client/assets/{create-organization-dialog-CK2tPr-0.js → create-organization-dialog-NG0GCrGy.js} +1 -1
  125. package/dist/client/assets/{daily-pulse-DyH5JpV6.js → daily-pulse-1acscsdN.js} +1 -1
  126. package/dist/client/assets/{discover-is1IWBp5.js → discover-DVDo0-Ht.js} +1 -1
  127. package/dist/client/assets/{domain-settings-BVhs7QfA.js → domain-settings-Cc9IPPJ6.js} +1 -1
  128. package/dist/client/assets/{drawer-Cc1xeysa.js → drawer-Chy2me2L.js} +1 -1
  129. package/dist/client/assets/{editor-C6KJlQxQ.js → editor-CRxBZblF.js} +1 -1
  130. package/dist/client/assets/{editor-classes-D4Aoqmls.js → editor-classes-AuNx3EIr.js} +1 -1
  131. package/dist/client/assets/{empty-state-Dwaj7cbq.js → empty-state-B1Y2gxG7.js} +1 -1
  132. package/dist/client/assets/{empty-state-D6Tozrpr.js → empty-state-D0AZxsnv.js} +1 -1
  133. package/dist/client/assets/{extract-connection-data-CVZ9OfNz.js → extract-connection-data-BbpwU49P.js} +1 -1
  134. package/dist/client/assets/{feature-gate-BS2HgDV3.js → feature-gate-D-4f3TsZ.js} +1 -1
  135. package/dist/client/assets/{feature-paywall-RTg-o893.js → feature-paywall-BEw3yHFI.js} +1 -1
  136. package/dist/client/assets/{file-explorer-BnGtvEoY.js → file-explorer-s77RHPos.js} +1 -1
  137. package/dist/client/assets/{file-preview-Dmc96YwA.js → file-preview-6o30dW7Y.js} +1 -1
  138. package/dist/client/assets/{file-share-button-UHs8Nomv.js → file-share-button-DTgAu18M.js} +1 -1
  139. package/dist/client/assets/{file-type-icon-CNWOnF7H.js → file-type-icon-Cyq-HL5W.js} +1 -1
  140. package/dist/client/assets/flat-project-BXwH4GAK.js +1 -0
  141. package/dist/client/assets/{folder-icon-DrCMgncu.js → folder-icon-DpYogxDZ.js} +1 -1
  142. package/dist/client/assets/{form-Rtl3vzMe.js → form-CZY9mi95.js} +1 -1
  143. package/dist/client/assets/{general-DmQRdBrG.js → general-DzCshSSA.js} +1 -1
  144. package/dist/client/assets/{home-CljKZLNm.js → home-ht5PN0Tb.js} +1 -1
  145. package/dist/client/assets/{hosted-publish-feedback-gLFMJ1nL.js → hosted-publish-feedback-EDLfdhex.js} +1 -1
  146. package/dist/client/assets/{icon-button-B0hKyHBr.js → icon-button-CmcBnS_y.js} +1 -1
  147. package/dist/client/assets/{index-C2fABs9c.js → index-BGx-exM5.js} +1 -1
  148. package/dist/client/assets/{index-DLcIWoL2.js → index-B_HBT41_.js} +1 -1
  149. package/dist/client/assets/{index-DHO4wqtP.js → index-Bg_0Q5M6.js} +1 -1
  150. package/dist/client/assets/{index-DtKQdTUE.js → index-BuJ2pXru.js} +1 -1
  151. package/dist/client/assets/{index-PeCPnjbD.js → index-BzmkEEt4.js} +1 -1
  152. package/dist/client/assets/{index-DxY3oFXt.js → index-BzvS-M3k.js} +3 -3
  153. package/dist/client/assets/{index-BuWS6DRb.js → index-CKJ8aY_D.js} +1 -1
  154. package/dist/client/assets/{index-SOl_d7Ed.js → index-Cqtntghk.js} +1 -1
  155. package/dist/client/assets/{index-DhgK6U3I.js → index-D-oDxCEJ.js} +1 -1
  156. package/dist/client/assets/{index-BuzdQEje.js → index-D9G7gFOg.js} +1 -1
  157. package/dist/client/assets/{index-CpaXiO1D.js → index-DGSzSnUx.js} +1 -1
  158. package/dist/client/assets/{index-zmOiuX4C.js → index-EDDvnpYE.js} +1 -1
  159. package/dist/client/assets/{index-D_e1FjwV.js → index-Gu6p_bn6.js} +6 -6
  160. package/dist/client/assets/{index-CmBG44Dg.js → index-XtHbGpIO.js} +1 -1
  161. package/dist/client/assets/{index-Dq0Ol_2W.js → index-qOwXDL8B.js} +1 -1
  162. package/dist/client/assets/{index-redirect-Zv_6_d3i.js → index-redirect-3W3Boplu.js} +1 -1
  163. package/dist/client/assets/{infiniteQueryObserver-Cj4qEdRl.js → infiniteQueryObserver-DAJAo4Js.js} +1 -1
  164. package/dist/client/assets/{infra-billing-XmfyQcIH.js → infra-billing-BRzrEIN4.js} +1 -1
  165. package/dist/client/assets/{input-BoJbhypv.js → input-CPWSoAxx.js} +3 -3
  166. package/dist/client/assets/{input-8F-iHbM0.js → input-fPWoCV4A.js} +1 -1
  167. package/dist/client/assets/{integration-icon-XTPBo75P.js → integration-icon-BRP_biyX.js} +1 -1
  168. package/dist/client/assets/{jira-icon-XNoWqDpB.js → jira-icon-CrPsQXpC.js} +1 -1
  169. package/dist/client/assets/{label-BpvNCEnb.js → label-80aEOuD4.js} +1 -1
  170. package/dist/client/assets/{layout-ChpQshpT.js → layout-CKaa1aKY.js} +1 -1
  171. package/dist/client/assets/{legacy-agents-deep-ByS-MUYE.js → legacy-agents-deep-CxRGbcGA.js} +1 -1
  172. package/dist/client/assets/{legacy-main-redirect-Ccy3USd6.js → legacy-main-redirect-BfJFkjfw.js} +1 -1
  173. package/dist/client/assets/library-D1IB8KAD.js +1 -0
  174. package/dist/client/assets/{library-tab-BhoaLjah.js → library-tab--NwxRoRN.js} +1 -1
  175. package/dist/client/assets/{login-BxrSgy89.js → login-C673ln17.js} +1 -1
  176. package/dist/client/assets/{markdown-CeBYrFC5.js → markdown-C9G0qsr0.js} +1 -1
  177. package/dist/client/assets/{mcp-app-renderer-NvRGXYxY.js → mcp-app-renderer-Tv8WHGRN.js} +1 -1
  178. package/dist/client/assets/{mcp-oauth-Bzq_QRWa.js → mcp-oauth-cPcwwC9B.js} +1 -1
  179. package/dist/client/assets/{mcp-oauth-DkhydAIA.js → mcp-oauth-lfv0IiGQ.js} +1 -1
  180. package/dist/client/assets/{members-CNJowEzx.js → members-CJHCdYT1.js} +1 -1
  181. package/dist/client/assets/{memory-BsfWf-3x.js → memory-Cut11GGj.js} +1 -1
  182. package/dist/client/assets/{mini-report-page-DYL62IF4.js → mini-report-page-D0Qglns2.js} +1 -1
  183. package/dist/client/assets/{mock-board-B1usHoAz.js → mock-board-B-sXcLwv.js} +1 -1
  184. package/dist/client/assets/{monaco-editor-CW4KzWG5.js → monaco-editor-wT_kW1MH.js} +1 -1
  185. package/dist/client/assets/{monitoring-stats-row-DJLs7kug.js → monitoring-stats-row-CWY5qSLA.js} +1 -1
  186. package/dist/client/assets/{multi-select-lHaavCdi.js → multi-select-CgnO4_qI.js} +1 -1
  187. package/dist/client/assets/{mustache-CLtZ-aXC.js → mustache-D2PL_any.js} +1 -1
  188. package/dist/client/assets/{new-project-dialog-C3L9bSPP.js → new-project-dialog-C_tU1gg8.js} +1 -1
  189. package/dist/client/assets/{oauth-callback-Do75xVB6.js → oauth-callback-BwKg2Y1n.js} +1 -1
  190. package/dist/client/assets/{oauth-callback-ai-provider-CpsuEWpa.js → oauth-callback-ai-provider-h6jiGDeG.js} +1 -1
  191. package/dist/client/assets/{onboarding-sPfgk87n.js → onboarding-CYtySDiE.js} +1 -1
  192. package/dist/client/assets/{openai-conversation-CuZL6fUQ.js → openai-conversation-IEZAYnVN.js} +1 -1
  193. package/dist/client/assets/{optimistic-project-sidebar-views-DW_dnUjn.js → optimistic-project-sidebar-views-DWI1xxua.js} +1 -1
  194. package/dist/client/assets/{order-monitor-day-Bb9K11tz.js → order-monitor-day-Dj23NRiN.js} +1 -1
  195. package/dist/client/assets/{organization-choice-BMAzua6G.js → organization-choice-FY-icP-U.js} +1 -1
  196. package/dist/client/assets/{orgs-scelK5uZ.js → orgs-Ba_XBvJ-.js} +1 -1
  197. package/dist/client/assets/{page-seo-form-OSL5OFoV.js → page-seo-form-2yHL1i6r.js} +1 -1
  198. package/dist/client/assets/{pair-8ShsH0Qr.js → pair-vo2mLhaP.js} +1 -1
  199. package/dist/client/assets/{plan-ladder-DNwkxUp1.js → plan-ladder-Dw4VwLn_.js} +1 -1
  200. package/dist/client/assets/{popover-CEeE7dqd.js → popover-D9c0rC9X.js} +1 -1
  201. package/dist/client/assets/{post-calendar-DnCFSuZ4.js → post-calendar-O4UipQ-T.js} +1 -1
  202. package/dist/client/assets/{post-editor-mXZG4iNT.js → post-editor-Boi3pOTO.js} +1 -1
  203. package/dist/client/assets/{preview-content-BuceHm_H.js → preview-content-N-UYFzFz.js} +1 -1
  204. package/dist/client/assets/{preview-dialog-BNy1YFe2.js → preview-dialog-DNWbq9ld.js} +1 -1
  205. package/dist/client/assets/{preview-panel-C8vnMQIp.js → preview-panel-B1ym7lfh.js} +1 -1
  206. package/dist/client/assets/{preview-tab-DiG38Ij2.js → preview-tab-DiXEBkZL.js} +3 -3
  207. package/dist/client/assets/{product-picker-dialog-B1zUb2w5.js → product-picker-dialog-BEhiI2vs.js} +1 -1
  208. package/dist/client/assets/{profile-BuPfp227.js → profile-KR6jXf6G.js} +1 -1
  209. package/dist/client/assets/{project-app-view-CvRL57OS.js → project-app-view-DXzpgLYA.js} +1 -1
  210. package/dist/client/assets/{project-feed-fL5vvnmG.js → project-feed-BNILatbq.js} +1 -1
  211. package/dist/client/assets/{project-icon-BE0w-kOZ.js → project-icon-jOYdFGx5.js} +1 -1
  212. package/dist/client/assets/project-reports-DjjRqdfD.js +1 -0
  213. package/dist/client/assets/project-tasks-IcoHMtIx.js +1 -0
  214. package/dist/client/assets/{projects-k3ePWrM8.js → projects-Cuc0vsCf.js} +1 -1
  215. package/dist/client/assets/{projects-empty-state-DtbadfhN.js → projects-empty-state-COf0m1Km.js} +1 -1
  216. package/dist/client/assets/{prompts-CJZlFPbL.js → prompts-FHCOf5Ek.js} +1 -1
  217. package/dist/client/assets/record-editor-DCgztUBP.js +1 -0
  218. package/dist/client/assets/{redirect-editor-COF5GTOq.js → redirect-editor-BnendtGT.js} +1 -1
  219. package/dist/client/assets/reports-DVrJp7iY.js +1 -0
  220. package/dist/client/assets/{reports-DH-0HmmT.js → reports-FW-99lgO.js} +1 -1
  221. package/dist/client/assets/{reports-onboarding-5FMXCy6G.js → reports-onboarding-D-gXApRE.js} +1 -1
  222. package/dist/client/assets/{reports-tab-SMeFV_jI.js → reports-tab-D4cs8E0G.js} +2 -2
  223. package/dist/client/assets/{repositories-CbdeVce3.js → repositories-D0naweGG.js} +1 -1
  224. package/dist/client/assets/{repository-binding-Ck0_Tx8R.js → repository-binding-C6bmiEYF.js} +1 -1
  225. package/dist/client/assets/{repository-import-picker-VJIbkDWe.js → repository-import-picker-DQ-cjLn_.js} +1 -1
  226. package/dist/client/assets/{repository-picker-BZ1KCv_T.js → repository-picker-CT4Afe6w.js} +1 -1
  227. package/dist/client/assets/{require-capability-BZ_ajaXn.js → require-capability-p2N_SBPn.js} +1 -1
  228. package/dist/client/assets/{required-auth-layout--gIjKGIN.js → required-auth-layout-C1JjNc-h.js} +1 -1
  229. package/dist/client/assets/{reset-password-DpZaypJp.js → reset-password-C4YZBsGi.js} +1 -1
  230. package/dist/client/assets/{resizable-h5h9Y5oq.js → resizable-DmlLOO_L.js} +1 -1
  231. package/dist/client/assets/{resolve-tab-icon-D5sQsZKt.js → resolve-tab-icon-CjjffpxB.js} +1 -1
  232. package/dist/client/assets/{review-settings-BKbSdDuH.js → review-settings-CayzwR4f.js} +1 -1
  233. package/dist/client/assets/roles-BP0nkR8v.js +1 -0
  234. package/dist/client/assets/route-C_6q331h.js +1 -0
  235. package/dist/client/assets/{route-DeZoxv-n.js → route-D4l4dcWi.js} +1 -1
  236. package/dist/client/assets/{route-BxYltIIL.js → route-DP7j1gUi.js} +1 -1
  237. package/dist/client/assets/{sandbox-lifecycle-context-B8nV6BWB.js → sandbox-lifecycle-context-BJVYk9VT.js} +1 -1
  238. package/dist/client/assets/{schema-Bwgawxt5.js → schema-CicY9CFd.js} +1 -1
  239. package/dist/client/assets/{schema-Cg0_pwUT.js → schema-oXjGSciT.js} +1 -1
  240. package/dist/client/assets/{scroll-area-C_lb7Jje.js → scroll-area-WqWnjNup.js} +1 -1
  241. package/dist/client/assets/{search-input-TJxcwdFg.js → search-input-BYbTdcO4.js} +1 -1
  242. package/dist/client/assets/{search-toggle-C7I5-G7C.js → search-toggle-DW4GMHrH.js} +1 -1
  243. package/dist/client/assets/{secret-ciphertext-C6okMcC_.js → secret-ciphertext-Css0ozTg.js} +1 -1
  244. package/dist/client/assets/{secret-picker-DCWsgdxf.js → secret-picker-BUbHbuWb.js} +1 -1
  245. package/dist/client/assets/{secrets-B58GVNd7.js → secrets-UmXQpwNV.js} +1 -1
  246. package/dist/client/assets/{sections-editor-BJ2SmDL2.js → sections-editor-B0kLUduk.js} +1 -1
  247. package/dist/client/assets/{select-DEQANoyw.js → select-C5ZUHdTe.js} +1 -1
  248. package/dist/client/assets/{select-model-KVl-kNMM.js → select-model-DTVIxZ-_.js} +1 -1
  249. package/dist/client/assets/{seo-editor-B_E5uosh.js → seo-editor-LRJehf_C.js} +1 -1
  250. package/dist/client/assets/{separator-CKc1h60H.js → separator-BgDhQ_qp.js} +1 -1
  251. package/dist/client/assets/{settings-tab-FrEyMoMV.js → settings-tab-DturEIQx.js} +1 -1
  252. package/dist/client/assets/{sheet-CjAkecww.js → sheet-C4t4w4AW.js} +1 -1
  253. package/dist/client/assets/{shell-layout-CvexXVVk.js → shell-layout-DxHQCpTn.js} +1 -1
  254. package/dist/client/assets/site-editor-CyJ9J3z5.js +1 -0
  255. package/dist/client/assets/{site-editor-toast-C-uD6zRF.js → site-editor-toast-B3bEZdNT.js} +1 -1
  256. package/dist/client/assets/{skills-DhUBc3J8.js → skills-DGMzaCZd.js} +1 -1
  257. package/dist/client/assets/{slider-l3C2nqf3.js → slider-DhmtcYyh.js} +1 -1
  258. package/dist/client/assets/{sortable.esm-CEz1t63K.js → sortable.esm-DZ_g7VsY.js} +1 -1
  259. package/dist/client/assets/{sso-CCNbtfyT.js → sso-DEmjyfij.js} +1 -1
  260. package/dist/client/assets/{suggestion-BA2-bTFu.js → suggestion-rFC9uhKm.js} +1 -1
  261. package/dist/client/assets/{switch-BB4BMta4.js → switch-DI_TR6_o.js} +1 -1
  262. package/dist/client/assets/{symbol-46mbKQic.js → symbol-RiI5_0oO.js} +1 -1
  263. package/dist/client/assets/{synced-repos-CUWDki9D.js → synced-repos-D9a-JENV.js} +1 -1
  264. package/dist/client/assets/{tab-icon-glyph-r9KIUo9C.js → tab-icon-glyph-l-U7BqyO.js} +1 -1
  265. package/dist/client/assets/{table-4bjRQyHR.js → table-BN-zsOZX.js} +1 -1
  266. package/dist/client/assets/{tabs-DKbHk2Gg.js → tabs-Db8UWqyQ.js} +1 -1
  267. package/dist/client/assets/{task-board-BUaSu7tb.js → task-board-aXTBpoFu.js} +1 -1
  268. package/dist/client/assets/{task-route-BGG7sh2_.js → task-route-sEmSKH-o.js} +1 -1
  269. package/dist/client/assets/{task-status-Ds5uxdx_.js → task-status-ziwl5_bZ.js} +1 -1
  270. package/dist/client/assets/taskboard-analytics-DpeLLeUb.js +1 -0
  271. package/dist/client/assets/tasks-Bh-bab_E.js +1 -0
  272. package/dist/client/assets/{tasks-DQ28yWoo.js → tasks-BsSe1bhp.js} +1 -1
  273. package/dist/client/assets/{textarea-CE7MtUgX.js → textarea-CyaF3dQs.js} +1 -1
  274. package/dist/client/assets/{thread-analytics-CXQy9ASJ.js → thread-analytics-CmeR6JA3.js} +1 -1
  275. package/dist/client/assets/{thread-intent-C7y-mNi3.js → thread-intent-BZ0YY6QE.js} +1 -1
  276. package/dist/client/assets/{thread-route-BWDDQkT0.js → thread-route-CAmVpV7e.js} +1 -1
  277. package/dist/client/assets/{thread-route-CDdp5O6O.js → thread-route-DcOV3JY7.js} +1 -1
  278. package/dist/client/assets/{thread-sheet-body-1zwREK0R.js → thread-sheet-body-DWFk33ML.js} +1 -1
  279. package/dist/client/assets/{time-range-picker-Bn8GwnfG.js → time-range-picker-HHnhDEqe.js} +1 -1
  280. package/dist/client/assets/{toggle-group-B1hqsL49.js → toggle-group-tTNOH3L7.js} +1 -1
  281. package/dist/client/assets/{tool-namespace-D-DKxP1V.js → tool-namespace-B_Fkbcgh.js} +1 -1
  282. package/dist/client/assets/{toolbar-icon-button-QlJA74MF.js → toolbar-icon-button-B77_OlWf.js} +1 -1
  283. package/dist/client/assets/{tooltip-Co4Z1kVi.js → tooltip-PBE4vcNO.js} +1 -1
  284. package/dist/client/assets/{tooltipContext-DMOc99qE.js → tooltipContext-DfV9vJ97.js} +1 -1
  285. package/dist/client/assets/{track-DMvXnx4V.js → track-CQzX2nHd.js} +1 -1
  286. package/dist/client/assets/{types-B2yiAKQY.js → types-Cd4vJNfK.js} +1 -1
  287. package/dist/client/assets/{url-slug-DF80tWtk.js → url-slug-B0r7Le3c.js} +1 -1
  288. package/dist/client/assets/{usage-stats-D_UoN7cn.js → usage-stats-BXBqqbOk.js} +1 -1
  289. package/dist/client/assets/{use-ai-providers-BUCZRHcb.js → use-ai-providers-B1IEQ8TI.js} +1 -1
  290. package/dist/client/assets/{use-app-takeover-zvHtuBka.js → use-app-takeover-C-kDM-_S.js} +1 -1
  291. package/dist/client/assets/{use-automations-8zdg7l-n.js → use-automations-BEZeFVgH.js} +1 -1
  292. package/dist/client/assets/{use-autosave-DR8EweDn.js → use-autosave-D_EhH98O.js} +1 -1
  293. package/dist/client/assets/{use-chat-navigation-W8PH0UW2.js → use-chat-navigation-Dl1MW8jd.js} +1 -1
  294. package/dist/client/assets/{use-clock-tick-BsIDA-Cf.js → use-clock-tick-DqoBjZmM.js} +1 -1
  295. package/dist/client/assets/{use-connect-companion-BQ9821ac.js → use-connect-companion-BPgrOpJ-.js} +1 -1
  296. package/dist/client/assets/{use-connection-DO0-79cg.js → use-connection-D6vlEjek.js} +1 -1
  297. package/dist/client/assets/{use-copy-OgMUCz7y.js → use-copy-BaP-Mfq6.js} +1 -1
  298. package/dist/client/assets/{use-create-virtual-mcp-D5jpP5gm.js → use-create-virtual-mcp-DVGTyIvt.js} +1 -1
  299. package/dist/client/assets/{use-date-fns-locale-D0QCtxiN.js → use-date-fns-locale-CGkeTp2f.js} +1 -1
  300. package/dist/client/assets/{use-debounced-autosave-DOOn5Tkv.js → use-debounced-autosave-Bw1iL5an.js} +1 -1
  301. package/dist/client/assets/{use-debounced-value-CBiGkTw1.js → use-debounced-value-CGyFMjzg.js} +1 -1
  302. package/dist/client/assets/{use-deco-credits-rXC7k5gk.js → use-deco-credits-CLdYd8om.js} +1 -1
  303. package/dist/client/assets/{use-decopilot-events-c99VQCYk.js → use-decopilot-events-Bzuucvme.js} +1 -1
  304. package/dist/client/assets/{use-delete-connection-Bgit0egW.js → use-delete-connection-DSAfwmQa.js} +1 -1
  305. package/dist/client/assets/{use-deployment-admin-C1exj-sx.js → use-deployment-admin-Cs4gP7kc.js} +1 -1
  306. package/dist/client/assets/{use-ensure-project-folder-BSBM_pCV.js → use-ensure-project-folder-Bzh9iyz1.js} +1 -1
  307. package/dist/client/assets/{use-fast-preview-draft-url-BAQhnabN.js → use-fast-preview-draft-url-iwQUUX2T.js} +1 -1
  308. package/dist/client/assets/{use-file-configs-DUPfNney.js → use-file-configs-zh5akF0n.js} +1 -1
  309. package/dist/client/assets/{use-infinite-scroll-pMxa0Zn4.js → use-infinite-scroll-D5ShLRuK.js} +1 -1
  310. package/dist/client/assets/{use-join-requests-gg3cOI-B.js → use-join-requests-RBBggqWT.js} +1 -1
  311. package/dist/client/assets/{use-main-panel-tabs-CsBwc9G6.js → use-main-panel-tabs-BJzQTLll.js} +1 -1
  312. package/dist/client/assets/{use-mcp-auth-status-Cpx5wFs6.js → use-mcp-auth-status-MYJuNTGH.js} +1 -1
  313. package/dist/client/assets/{use-mcp-client-CfQ2861m.js → use-mcp-client-rvPKbELE.js} +1 -1
  314. package/dist/client/assets/{use-mcp-prompts-CmJ6-k3W.js → use-mcp-prompts-Cxif3O1P.js} +1 -1
  315. package/dist/client/assets/{use-mcp-tools-D9QrmiTi.js → use-mcp-tools-BtC8QkRI.js} +1 -1
  316. package/dist/client/assets/{use-members-DCpyBD9E.js → use-members-B9jY-Afg.js} +1 -1
  317. package/dist/client/assets/{use-mobile-DAFwKM65.js → use-mobile-Di0MPt3q.js} +1 -1
  318. package/dist/client/assets/{use-navigate-to-agent-DX_GuI9O.js → use-navigate-to-agent-Dba95vVq.js} +1 -1
  319. package/dist/client/assets/{use-open-billing-url-D8kQwZuK.js → use-open-billing-url-D5pKa81c.js} +1 -1
  320. package/dist/client/assets/{use-org-auth-client-DlfdiRta.js → use-org-auth-client-ZcrC4T6K.js} +1 -1
  321. package/dist/client/assets/{use-org-fs-DUumxOLe.js → use-org-fs-BxRaxb9L.js} +1 -1
  322. package/dist/client/assets/{use-org-repo-syncs-CSC6XXGX.js → use-org-repo-syncs-C-ZIE6wP.js} +1 -1
  323. package/dist/client/assets/{use-org-sso-a6wytjjs.js → use-org-sso-O0zps6r1.js} +1 -1
  324. package/dist/client/assets/{use-organization-roles-5s2YK1bp.js → use-organization-roles-DKZzNKA8.js} +1 -1
  325. package/dist/client/assets/{use-organization-settings-BRX6WalP.js → use-organization-settings-CLDZrVD2.js} +1 -1
  326. package/dist/client/assets/{use-panel-navigate-CwT4H5Ol.js → use-panel-navigate-UVOahKnd.js} +1 -1
  327. package/dist/client/assets/{use-project-native-view-presence-C_S3HChZ.js → use-project-native-view-presence-Dmn-wieO.js} +1 -1
  328. package/dist/client/assets/{use-project-scope-CaxkCPVW.js → use-project-scope-B75Fu6p9.js} +1 -1
  329. package/dist/client/assets/{use-recent-apps-ByQEPEB4.js → use-recent-apps-Ce6cnaSn.js} +1 -1
  330. package/dist/client/assets/{use-releases-BUCOTm_R.js → use-releases-Cca_D8Ze.js} +1 -1
  331. package/dist/client/assets/{use-reports-diagnostic-Dbl7LVl2.js → use-reports-diagnostic-Dj93vOfq.js} +1 -1
  332. package/dist/client/assets/{use-secrets-BYpVBz5m.js → use-secrets-B4XvFF9p.js} +1 -1
  333. package/dist/client/assets/{use-section-preview-base-BdA5oDe6.js → use-section-preview-base-DSjG3_lZ.js} +1 -1
  334. package/dist/client/assets/{use-tags-uU7Lu-ly.js → use-tags-D3ecYacm.js} +1 -1
  335. package/dist/client/assets/{use-task-board-analytics-ZCbpEWlZ.js → use-task-board-analytics-BAyZ8b3w.js} +1 -1
  336. package/dist/client/assets/{use-task-board-events-B4NRIZnD.js → use-task-board-events-bt8pGNQu.js} +1 -1
  337. package/dist/client/assets/{use-task-board-item-prs-B24H-YiX.js → use-task-board-item-prs-D7k6MaFR.js} +1 -1
  338. package/dist/client/assets/{use-task-board-items-BrTvq28_.js → use-task-board-items-CmRMhTmV.js} +1 -1
  339. package/dist/client/assets/{use-task-metadata-DNmLWRKy.js → use-task-metadata-UJXKmJmc.js} +1 -1
  340. package/dist/client/assets/{use-thread-analytics-kgocd4t_.js → use-thread-analytics-BXB-BjGM.js} +1 -1
  341. package/dist/client/assets/{use-thread-outputs-BnYz2rDr.js → use-thread-outputs-CxIvWEwp.js} +1 -1
  342. package/dist/client/assets/useInfiniteQuery-DlArWAqw.js +1 -0
  343. package/dist/client/assets/{useQueries-CjOre9_n.js → useQueries-0ll-wpq1.js} +1 -1
  344. package/dist/client/assets/useSuspenseInfiniteQuery-Cl1hoey9.js +1 -0
  345. package/dist/client/assets/{users-CabPjBXN.js → users-DDxhntvX.js} +1 -1
  346. package/dist/client/assets/{utils-CA46iRUR.js → utils-C39F0dWb.js} +1 -1
  347. package/dist/client/assets/{variant-calendar-zo0Qm_85.js → variant-calendar-VpVcT3ku.js} +1 -1
  348. package/dist/client/assets/{variant-draft-pointer-CE2lhiPh.js → variant-draft-pointer-jfx2jVt-.js} +1 -1
  349. package/dist/client/assets/{view-mode-toggle-CGFj4l63.js → view-mode-toggle-BkicTk8J.js} +1 -1
  350. package/dist/client/assets/{virtual-mcp-BjHRjwkd.js → virtual-mcp-CfewSGd6.js} +1 -1
  351. package/dist/client/assets/{watch-sse-pool-BmJipakz.js → watch-sse-pool-CkxkGv7P.js} +1 -1
  352. package/dist/client/index.html +1 -1
  353. package/dist/server/server.js +545 -545
  354. package/package.json +1 -1
  355. package/dist/client/assets/agent-app-Btba9qrn.js +0 -1
  356. package/dist/client/assets/agent-deck-BRFz34C5.js +0 -1
  357. package/dist/client/assets/agent-library-D5NccfWU.js +0 -1
  358. package/dist/client/assets/agent-library-file-CEh3yNi1.js +0 -1
  359. package/dist/client/assets/agent-settings-D0vOcbo4.js +0 -1
  360. package/dist/client/assets/agent-site-editor-code-CjBhJz3a.js +0 -2
  361. package/dist/client/assets/agent-site-editor-content-CGwPwTYo.js +0 -1
  362. package/dist/client/assets/agent-site-editor-preview-D1rLRPRY.js +0 -1
  363. package/dist/client/assets/agent-view-FlUwvnPb.js +0 -1
  364. package/dist/client/assets/api-keys-BgnbvEMg.js +0 -1
  365. package/dist/client/assets/cms-settings-editor-BeilhGPn.js +0 -1
  366. package/dist/client/assets/flat-project-C8GOOCEy.js +0 -1
  367. package/dist/client/assets/library-B_bfBK5V.js +0 -1
  368. package/dist/client/assets/project-reports-BztuNJ7u.js +0 -1
  369. package/dist/client/assets/project-tasks-Dawdfx-2.js +0 -1
  370. package/dist/client/assets/record-editor-rGrL5tBb.js +0 -1
  371. package/dist/client/assets/reports-PVKR-t5Z.js +0 -1
  372. package/dist/client/assets/roles-Bc-Hepcl.js +0 -1
  373. package/dist/client/assets/route-Dcad-yYp.js +0 -1
  374. package/dist/client/assets/site-editor-DIC96wDj.js +0 -1
  375. package/dist/client/assets/taskboard-analytics-BMTrT5Ho.js +0 -1
  376. package/dist/client/assets/tasks-q2yo5cXh.js +0 -1
  377. package/dist/client/assets/useInfiniteQuery-DwBftn5D.js +0 -1
  378. package/dist/client/assets/useSuspenseInfiniteQuery-B3xhj5gS.js +0 -1
@@ -1,12 +1,12 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/openai-conversation-CuZL6fUQ.js","assets/index-D_e1FjwV.js","assets/index-s7bCSMKE.css","assets/usage-stats-D_UoN7cn.js","assets/tool-namespace-D-DKxP1V.js","assets/form-Rtl3vzMe.js","assets/label-BpvNCEnb.js","assets/utils-CVEq3hMx.js","assets/markdown-CeBYrFC5.js","assets/use-copy-OgMUCz7y.js","assets/Copy01-BISq6vrL.js","assets/ZoomOut-Cyw3AXuM.js","assets/location-BjlyegC2.js","assets/use-mobile-DAFwKM65.js","assets/use-panel-navigate-CwT4H5Ol.js","assets/thread-route-BWDDQkT0.js","assets/use-project-scope-CaxkCPVW.js","assets/repository-binding-Ck0_Tx8R.js","assets/use-mcp-client-CfQ2861m.js","assets/auth-eKkR4KqF.js","assets/tooltip-Co4Z1kVi.js","assets/index-CmBG44Dg.js","assets/agent-icon-Czh6MNam.js","assets/AlertCircle-Bec1dxaS.js","assets/Tool01-CbGwYE-2.js","assets/ArrowUp-CSeqbspv.js","assets/ArrowLeft-B66-ad90.js","assets/LinkBroken01-B6cSnLw2.js","assets/ShoppingBag01-Crf2xSz3.js","assets/Building02-Bu4UAsgO.js","assets/CheckCircle-BSvXc66Q.js","assets/ChevronUp-bmzgw7dV.js","assets/ChevronSelectorVertical-n7b_5Q6B.js","assets/UserSquare-zw-tgJGh.js","assets/CreditCard01-CbXaQViz.js","assets/DotsVertical-M1fm8bjv.js","assets/Image01-C8Z3a6q4.js","assets/Globe04-BRIK-LcF.js","assets/SwitchHorizontal01-BspP-O9B.js","assets/Key01-CAPfBcFM.js","assets/Link01-DJt14Rj5.js","assets/Monitor01-BNRWrf3F.js","assets/Sun-DJ4L7xwP.js","assets/Play-CB3VpTFO.js","assets/Plus-DmY-I-W1.js","assets/SearchMd-Dqev4UbC.js","assets/Trash01-DArHDncW.js","assets/Upload01-DlUMQy0J.js","assets/User01-B-tTyVsO.js","assets/Users01-BI0nawB5.js","assets/XClose-DxE71MU7.js","assets/format-time-CAj8AQXM.js","assets/differenceInSeconds-C3x8sHUj.js","assets/use-decopilot-events-c99VQCYk.js","assets/thread-intent-C7y-mNi3.js","assets/delay-CnY5UFtP.js","assets/backoff-CrEUbyZT.js","assets/watch-sse-pool-BmJipakz.js","assets/task-board-BUaSu7tb.js","assets/schema-Bwgawxt5.js","assets/slugify-CEUa2lfQ.js","assets/chat-context-7iPEBonn.js","assets/autosend-Cp8JwTOk.js","assets/use-ai-providers-BUCZRHcb.js","assets/use-chat-navigation-W8PH0UW2.js","assets/use-organization-settings-BRX6WalP.js","assets/icon-button-B0hKyHBr.js","assets/file-type-icon-CNWOnF7H.js","assets/shell-layout-CvexXVVk.js","assets/avatar-DdSak0Sb.js","assets/use-clock-tick-BsIDA-Cf.js","assets/command-Dz8D1H9z.js","assets/index-DhgK6U3I.js","assets/integration-icon-XTPBo75P.js","assets/project-icon-BE0w-kOZ.js","assets/new-project-dialog-C3L9bSPP.js","assets/repository-import-picker-VJIbkDWe.js","assets/use-navigate-to-agent-DX_GuI9O.js","assets/repository-picker-BZ1KCv_T.js","assets/useInfiniteQuery-DwBftn5D.js","assets/infiniteQueryObserver-Cj4qEdRl.js","assets/collection-search-C0fvUi6S.js","assets/use-debounced-value-CBiGkTw1.js","assets/required-auth-layout--gIjKGIN.js","assets/use-org-sso-a6wytjjs.js","assets/shell-layout-CE2Eihra.css","assets/chat-draft-g8x2IwR8.js","assets/select-DEQANoyw.js","assets/index-BdQq_4o_.js","assets/tabs-DKbHk2Gg.js","assets/use-deco-credits-rXC7k5gk.js","assets/toggle-group-B1hqsL49.js","assets/use-open-billing-url-D8kQwZuK.js","assets/index-SOl_d7Ed.js","assets/checkbox-xsx9w-sP.js","assets/ai-providers-logos-DD3qZ33J.js","assets/popover-CEeE7dqd.js","assets/drawer-Cc1xeysa.js","assets/input-8F-iHbM0.js","assets/suggestion-BA2-bTFu.js","assets/use-project-native-view-presence-C_S3HChZ.js","assets/use-file-configs-DUPfNney.js","assets/site-slug-DebpOoQq.js","assets/use-mcp-prompts-CmJ6-k3W.js","assets/use-org-fs-DUumxOLe.js","assets/question-004-sINsf4GQ.js","assets/use-members-DCpyBD9E.js","assets/use-org-auth-client-DlfdiRta.js","assets/feature-paywall-RTg-o893.js","assets/plan-ladder-DNwkxUp1.js","assets/add-connection-dialog-D59AnSQs.js","assets/extract-connection-data-CVZ9OfNz.js","assets/metadata-D72DunRR.js","assets/connection-D2EgMJ9G.js","assets/url-slug-DF80tWtk.js","assets/connection-card-CI5YjmPA.js","assets/connection-slug-CITJ0kGN.js","assets/textarea-CE7MtUgX.js","assets/use-connection-DO0-79cg.js","assets/schema-Cg0_pwUT.js","assets/connection-form-helpers-CY2wGEex.js","assets/authenticate-and-persist-oauth-CFzJEYoH.js","assets/mcp-oauth-DkhydAIA.js","assets/mcp-oauth-Bzq_QRWa.js","assets/collection-tabs-CtpJB22o.js","assets/badge-Dmtt-CEm.js","assets/use-infinite-scroll-pMxa0Zn4.js","assets/useSuspenseInfiniteQuery-B3xhj5gS.js","assets/use-task-board-events-B4NRIZnD.js"])))=>i.map(i=>d[i]);
2
- import{b0 as Fe,c as R,b as K,r as P,l as O,j as o,aX as it,aF as ie,bW as Ut,aG as ne,bV as ze,B as G,aE as Ss,aD as Cs,cY as Ns,bU as Is,F as Ne,b9 as Ts,dX as Ce,dY as mt,a9 as _s,e as Ms,I as Ds,t as Ue,y as se,a2 as Ie,d as at,ah as lt,v as Rs,aM as Es,s as Ps,q as Us,D as Ls,dS as Fs,a3 as zs,K as Os,m as $s,X as Bs,T as Ks,V as qs,U as ye,as as gt,aq as xt,ar as vt,h as Qs,aT as Ys,aS as Ws,au as Gs,cX as Hs,d0 as je,aY as Js,d2 as Zs,aZ as bt,b2 as Xs,a as en,at as tn,av as sn,aL as st,af as Lt,b_ as nn,aR as on}from"./index-D_e1FjwV.js";import{i as Ft,c as rn,d as an,e as zt,P as ln,f as Vn,S as cn}from"./usage-stats-D_UoN7cn.js";import{s as Ot}from"./XClose-DxE71MU7.js";import{I as dn}from"./icon-button-B0hKyHBr.js";import{F as un}from"./file-type-icon-CNWOnF7H.js";import{a as pn}from"./use-chat-navigation-W8PH0UW2.js";import{b as fn}from"./location-BjlyegC2.js";import{d as hn,K as mn,b as gn}from"./shell-layout-CvexXVVk.js";import{a as $t}from"./repository-binding-Ck0_Tx8R.js";import{w as xn,A as vn}from"./autosend-Cp8JwTOk.js";import{s as bn,r as At,i as An,c as yn,w as jn,H as kn}from"./chat-draft-g8x2IwR8.js";import{r as wn,d as Sn,f as Cn,h as Nn,t as In,z as Tn,o as _n,c as Mn}from"./thread-intent-C7y-mNi3.js";import{u as We,b as Oe,c as Ge,d as He,j as Dn,m as Rn,n as En,o as Pn,q as Un,v as Ln,x as Fn,y as zn,f as On,s as $n,e as Bn}from"./chat-context-7iPEBonn.js";import{i as Bt}from"./LinkBroken01-B6cSnLw2.js";import{i as Kt}from"./ArrowUp-CSeqbspv.js";import{n as qt}from"./ShoppingBag01-Crf2xSz3.js";import{t as Je,aJ as Qt,a4 as Yt,aK as nt,f as Vt,ax as Kn,B as qn,aL as Qn,q as Wt,aM as Gt,L as Yn,aN as Wn}from"./agent-icon-Czh6MNam.js";import{a as Ht}from"./Image01-C8Z3a6q4.js";import{h as Gn}from"./UserSquare-zw-tgJGh.js";import{i as Hn}from"./Upload01-DlUMQy0J.js";import{i as Jn}from"./AlertCircle-Bec1dxaS.js";import{a as Zn}from"./Copy01-BISq6vrL.js";import{a as ot,b as ct,d as dt,f as ut,F as Jt}from"./form-Rtl3vzMe.js";import{c as Xn,S as eo,b as to,a as so,d as no}from"./select-DEQANoyw.js";import{t as Zt}from"./ChevronUp-bmzgw7dV.js";import{T as Ze,a as Xe,c as et}from"./tooltip-Co4Z1kVi.js";import{i as oo}from"./ArrowLeft-B66-ad90.js";import{c as ro,b as io}from"./tabs-DKbHk2Gg.js";import{e as $e,f as ao,c as lo,g as Vo}from"./use-decopilot-events-c99VQCYk.js";import{u as co}from"./use-deco-credits-rXC7k5gk.js";import{T as yt,a as uo}from"./toggle-group-B1hqsL49.js";import{a as po,d as fo,g as jt,s as ho}from"./tool-namespace-D-DKxP1V.js";import{t as mo}from"./utils-CVEq3hMx.js";import{u as go}from"./use-open-billing-url-D8kQwZuK.js";import{M as xo,a as vo,m as pt,g as bo,b as Ao}from"./index-SOl_d7Ed.js";import{a as Xt,b as es,P as ts}from"./popover-CEeE7dqd.js";import{c as yo,b as jo,a as ko,D as wo}from"./drawer-Cc1xeysa.js";import{u as ss}from"./use-mobile-DAFwKM65.js";import{t as So}from"./Tool01-CbGwYE-2.js";import{d as Co,a as No}from"./use-organization-settings-BRX6WalP.js";import{u as ns,c as Io,d as To}from"./use-ai-providers-BUCZRHcb.js";import{p as os,u as _o,T as Mo,a as Do,U as Ro}from"./input-8F-iHbM0.js";import{a as Eo}from"./use-mcp-client-CfQ2861m.js";import{l as Po,g as Uo}from"./use-mcp-prompts-CmJ6-k3W.js";import{i as Lo}from"./Link01-DJt14Rj5.js";import{s as kt}from"./Plus-DmY-I-W1.js";import"./suggestion-BA2-bTFu.js";import{p as Fo,q as zo}from"./question-004-sINsf4GQ.js";import{A as Oo}from"./avatar-DdSak0Sb.js";import{u as $o}from"./use-members-DCpyBD9E.js";import{F as wt}from"./feature-paywall-RTg-o893.js";import{A as Bo}from"./add-connection-dialog-D59AnSQs.js";import{u as Ko}from"./use-task-board-events-B4NRIZnD.js";import{i as qo}from"./use-project-native-view-presence-C_S3HChZ.js";const Qo=Fe("Headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]);const Yo=Fe("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);const Wo=Fe("MicOff",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M18.89 13.23A7.12 7.12 0 0 0 19 12v-2",key:"80xlxr"}],["path",{d:"M5 10v2a7 7 0 0 0 12 5",key:"p2k8kg"}],["path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33",key:"1gzdoj"}],["path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12",key:"r2i35w"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);const Go=Fe("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);const Ho=Fe("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);function Jo(t){const e=R.c(14),s=$t(t),n=We(),r=s?.metadata,i=n?.activeTask,a=i?.metadata?.runtime;let l;e[0]!==a?(l=Nn(a),e[0]=a,e[1]=l):l=e[1];const c=l,d=!!i&&!i.partial,u=i?.metadata;let V;e[2]!==r||e[3]!==u?(V=wn(u,r),e[2]=r,e[3]=u,e[4]=V):V=e[4];const p=!!c||d&&!!s;let f;e[5]!==r?(f=Sn(r),e[5]=r,e[6]=f):f=e[6];let h;e[7]!==r?(h=Cn(r),e[7]=r,e[8]=h):h=e[8];let m;return e[9]!==V||e[10]!==p||e[11]!==f||e[12]!==h?(m={runtime:V,resolved:p,projectDefault:f,previewServerUrl:h},e[9]=V,e[10]=p,e[11]=f,e[12]=h,e[13]=m):m=e[13],m}const tt="cubic-bezier(0.645, 0.045, 0.355, 1)",ll=44,Zo={default:"",error:"isolate after:content-[''] after:absolute after:inset-0 after:rounded-xl after:bg-destructive/5 after:pointer-events-none after:-z-10",warning:"isolate after:content-[''] after:absolute after:inset-0 after:rounded-xl after:bg-warning/5 after:pointer-events-none after:-z-10"},Xo={default:"border-border",error:"border-destructive/30",warning:"border-warning/30"},er={default:"text-muted-foreground",error:"text-destructive",warning:"text-warning"};function pe(t){const e=R.c(69),{icon:s,label:n,count:r,title:i,footerLeft:a,footerRight:l,children:c,defaultExpanded:d,variant:u,onClose:V}=t,p=u===void 0?"default":u,f=K(),[h,m]=P.useState(d),[g,v]=P.useState(!1);let x;e[0]!==V?(x=()=>{v(!0),V?.()},e[0]=V,e[1]=x):x=e[1];const b=x;if(g)return null;const A=Xo[p],j=Zo[p];let y;e[2]!==A||e[3]!==j?(y=O("relative flex flex-col rounded-xl bg-background border shadow-md","w-[calc(100%-16px)] max-w-[640px] mx-auto mb-2",A,j),e[2]=A,e[3]=j,e[4]=y):y=e[4];let k;e[5]===Symbol.for("react.memo_cache_sentinel")?(k=()=>m(tr),e[5]=k):k=e[5];const w=h&&"rounded-b-none",S=!h&&"rounded-b-xl";let N;e[6]!==w||e[7]!==S?(N=O("flex items-center gap-2 w-full px-3 py-2 text-sm text-left","hover:bg-accent/50 transition-colors rounded-t-xl",w,S),e[6]=w,e[7]=S,e[8]=N):N=e[8];const I=er[p];let C;e[9]!==I?(C=O("shrink-0",I),e[9]=I,e[10]=C):C=e[10];let M;e[11]!==s||e[12]!==C?(M=o.jsx("span",{className:C,children:s}),e[11]=s,e[12]=C,e[13]=M):M=e[13];let D;e[14]!==n?(D=o.jsx("span",{className:"flex-1 min-w-0 truncate",children:n}),e[14]=n,e[15]=D):D=e[15];let E;e[16]!==r?(E=r?o.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:r}):null,e[16]=r,e[17]=E):E=e[17];const U=h?"rotate(180deg)":"rotate(0deg)";let T;e[18]!==U?(T=o.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground shrink-0 flex items-center justify-center",children:o.jsx(Zt,{size:16,style:{transform:U,transition:`transform 180ms ${tt}`}})}),e[18]=U,e[19]=T):T=e[19];let L;e[20]!==f?(L=f("chat.collapsibleHighlight.closeLabel"),e[20]=f,e[21]=L):L=e[21];let F;e[22]!==f?(F=f("chat.collapsibleHighlight.closeTitle"),e[22]=f,e[23]=F):F=e[23];let W,$;e[24]!==b?(W=ce=>{ce.stopPropagation(),b()},$=ce=>{(ce.key==="Enter"||ce.key===" ")&&(ce.preventDefault(),ce.stopPropagation(),b())},e[24]=b,e[25]=W,e[26]=$):(W=e[25],$=e[26]);let z;e[27]===Symbol.for("react.memo_cache_sentinel")?(z=o.jsx(it,{size:16}),e[27]=z):z=e[27];let Q;e[28]!==L||e[29]!==F||e[30]!==W||e[31]!==$?(Q=o.jsx("span",{role:"button",tabIndex:0,"data-testid":"collapsible-highlight-close","aria-label":L,title:F,onClick:W,onKeyDown:$,className:"text-muted-foreground hover:text-foreground transition-colors shrink-0 flex items-center justify-center -mr-1 ml-1 p-1 rounded-md hover:bg-accent",children:z}),e[28]=L,e[29]=F,e[30]=W,e[31]=$,e[32]=Q):Q=e[32];let ee;e[33]!==h||e[34]!==M||e[35]!==D||e[36]!==E||e[37]!==T||e[38]!==Q||e[39]!==N?(ee=o.jsxs("button",{type:"button","data-testid":"collapsible-highlight-chip","aria-expanded":h,onClick:k,className:N,children:[M,D,E,T,Q]}),e[33]=h,e[34]=M,e[35]=D,e[36]=E,e[37]=T,e[38]=Q,e[39]=N,e[40]=ee):ee=e[40];const te=h?"1fr":"0fr";let H;e[41]!==te?(H={display:"grid",gridTemplateRows:te,transition:`grid-template-rows 180ms ${tt}`},e[41]=te,e[42]=H):H=e[42];let oe;e[43]===Symbol.for("react.memo_cache_sentinel")?(oe={overflow:"hidden",minHeight:0},e[43]=oe):oe=e[43];const _=h?1:0;let B;e[44]!==_?(B={opacity:_,transition:`opacity 120ms ${tt}`,maxHeight:"60vh"},e[44]=_,e[45]=B):B=e[45];let J;e[46]!==i?(J=i?o.jsx("div",{className:"flex items-start gap-2 px-4 pt-4 pb-5 border-t border-dashed border-border/60",children:o.jsx("p",{className:"flex-1 text-base font-medium text-foreground min-w-0",children:i})}):o.jsx("div",{className:"border-t border-dashed border-border/60"}),e[46]=i,e[47]=J):J=e[47];let Z;e[48]!==c||e[49]!==i?(Z=c?o.jsx("div",{className:O("pb-4",!i&&"pt-4"),children:c}):null,e[48]=c,e[49]=i,e[50]=Z):Z=e[50];let X;e[51]!==J||e[52]!==Z?(X=o.jsxs("div",{className:"flex-1 min-h-0 overflow-y-auto",children:[J,Z]}),e[51]=J,e[52]=Z,e[53]=X):X=e[53];let ue;e[54]!==a||e[55]!==l?(ue=a||l?o.jsx("div",{className:"shrink-0 border-t border-border px-3 py-3 pb-6",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("div",{children:a}),o.jsx("div",{className:"flex items-center gap-2",children:l})]})}):null,e[54]=a,e[55]=l,e[56]=ue):ue=e[56];let Y;e[57]!==B||e[58]!==X||e[59]!==ue?(Y=o.jsx("div",{style:oe,children:o.jsxs("div",{className:"flex flex-col",style:B,children:[X,ue]})}),e[57]=B,e[58]=X,e[59]=ue,e[60]=Y):Y=e[60];let le;e[61]!==H||e[62]!==Y?(le=o.jsx("div",{"data-testid":"collapsible-highlight-body",style:H,children:Y}),e[61]=H,e[62]=Y,e[63]=le):le=e[63];let Ve;return e[64]!==ee||e[65]!==le||e[66]!==y||e[67]!==p?(Ve=o.jsxs("div",{"data-testid":"collapsible-highlight","data-variant":p,className:y,children:[ee,le]}),e[64]=ee,e[65]=le,e[66]=y,e[67]=p,e[68]=Ve):Ve=e[68],Ve}function tr(t){return!t}const sr=ie({content:ne().min(1).describe("Imperative form, e.g. 'Implement the login flow'"),status:ze(["pending","in_progress","completed"]),activeForm:ne().min(1).describe("Present-continuous form shown in the UI while the todo is in progress, e.g. 'Implementing the login flow'")}),rs=ie({todos:Ut(sr)}),nr="Plan and track multi-step work. Call with the FULL todo list every time — this replaces the prior list. Call at the start of every multi-step request. Skip only for true one-shots (a single tool call or a direct answer). Mark exactly one todo `in_progress` at a time. Flip a todo to `in_progress` before starting it and to `completed` the moment it finishes — do not batch completions. Your prior tool-call inputs are your current state — read your last call to see where you are.";In({description:nr,inputSchema:Tn(rs),execute:async({todos:t})=>({ok:!0,count:t.length})});const or="tool-todo_write",rr=new Set(["input-available","output-available"]);function ir(t){for(let e=t.length-1;e>=0;e--){const s=t[e];if(s.role!=="assistant")continue;const n=s.parts;if(Array.isArray(n))for(let r=n.length-1;r>=0;r--){const i=n[r];if(i.type!==or||typeof i.state!="string"||!rr.has(i.state))continue;const a=rs.safeParse(i.input);if(a.success)return a.data.todos}}return[]}function is(t){const e=[];for(const s of t)if("state"in s&&s.state==="approval-requested"&&"approval"in s&&s.approval?.id&&"toolCallId"in s&&s.toolCallId){const n="toolName"in s&&typeof s.toolName=="string"?s.toolName:s.type.startsWith("tool-")?s.type.replace("tool-",""):"Tool";e.push({approvalId:s.approval.id,toolCallId:s.toolCallId,toolName:n,friendlyName:mo(po(n)),input:s.input})}return e}function as(t){return t.at(-1)}function ls(t){const e=[];for(const s of t)s.type==="tool-propose_plan"&&s.state==="input-available"&&e.push({toolCallId:s.toolCallId,plan:s.input.plan,state:s.state});return e}function ar(t){return t?t.message.startsWith("[CREDITS]"):!1}const lr={isCreditExhausted:!1,planRefusal:null,subscriptionErrorKind:null,hasTodos:!1,showError:!1,showWarning:!1,hasApprovals:!1,hasPlans:!1,isWaitingForUserInput:!1,hasTaskSuggestion:!1,todos:[]};function Vr(t){const{messages:e,error:s,finishReason:n,isStreaming:r,isWaitingForApprovals:i}=t;if(!r&&s&&ar(s))return{...lr,isCreditExhausted:!0};const a=e.at(-1),l=a?.role==="assistant"?a.parts:[],c=l,u=!!c.filter(y=>y.type==="tool-user_ask").filter(y=>y.state!=="output-available").length,V=c.some(Ft),p=ls(l),f=is(c),h=ir(e),m=r?null:bn(s),g=r?null:_n(s),v=!r&&!!s&&!m&&!g,x=f.length>0||r&&i,b=p.length>0,j=!r&&!!n&&n!=="stop"&&!(n==="tool-calls"&&(u||x||b||V))&&!v;return{isCreditExhausted:!1,planRefusal:g,subscriptionErrorKind:m,hasTodos:h.length>0,showError:v,showWarning:j,hasApprovals:x,hasPlans:b,isWaitingForUserInput:u,hasTaskSuggestion:V,todos:h}}function Vs(){const t=R.c(6),{messages:e,error:s,finishReason:n,isStreaming:r,isWaitingForApprovals:i}=Oe(),a=s??null,l=n??null;let c;return t[0]!==r||t[1]!==i||t[2]!==e||t[3]!==a||t[4]!==l?(c=Vr({messages:e,error:a,finishReason:l,isStreaming:r,isWaitingForApprovals:i}),t[0]=r,t[1]=i,t[2]=e,t[3]=a,t[4]=l,t[5]=c):c=t[5],c}function Vl(){const t=Vs(),e=$e("credits");return t.isCreditExhausted?e?0:1:Number(t.hasTodos)+Number(t.showError)+ +!!t.subscriptionErrorKind+ +!!t.planRefusal+Number(t.showWarning)+Number(t.hasApprovals)+Number(t.hasPlans)+Number(t.isWaitingForUserInput)+Number(t.hasTaskSuggestion)}const St="start-task",cr=`Turn the report below into a running task. The user pressed "Start task", which authorizes delegation.
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/openai-conversation-IEZAYnVN.js","assets/index-Gu6p_bn6.js","assets/index-s7bCSMKE.css","assets/usage-stats-BXBqqbOk.js","assets/tool-namespace-B_Fkbcgh.js","assets/form-CZY9mi95.js","assets/label-80aEOuD4.js","assets/utils-CVEq3hMx.js","assets/markdown-C9G0qsr0.js","assets/use-copy-BaP-Mfq6.js","assets/Copy01-D9EWjRj_.js","assets/ZoomOut-WxvethXT.js","assets/location-BjlyegC2.js","assets/use-mobile-Di0MPt3q.js","assets/use-panel-navigate-UVOahKnd.js","assets/thread-route-CAmVpV7e.js","assets/use-project-scope-B75Fu6p9.js","assets/repository-binding-C6bmiEYF.js","assets/use-mcp-client-rvPKbELE.js","assets/auth-Dvjx-0pF.js","assets/tooltip-PBE4vcNO.js","assets/index-XtHbGpIO.js","assets/agent-icon-BbVfkRpF.js","assets/AlertCircle-Bd_c5lvx.js","assets/Tool01-CgbvcQme.js","assets/ArrowUp-BlmIqgms.js","assets/ArrowLeft-BEDsoU4s.js","assets/LinkBroken01-XywQ_V_L.js","assets/ShoppingBag01-DFlLGvQA.js","assets/Building02-egDXvjGT.js","assets/CheckCircle-DwYX4v4z.js","assets/ChevronUp-BWLwOWUB.js","assets/ChevronSelectorVertical-yrgeHjmf.js","assets/UserSquare-BbO_BuU-.js","assets/CreditCard01-D-2H38IE.js","assets/DotsVertical-Czz64uuc.js","assets/Image01-Dis3SEGR.js","assets/Globe04-Cq9w75Dt.js","assets/SwitchHorizontal01-C2oPVYY7.js","assets/Key01-Dpml-zEF.js","assets/Link01-CH9KeNiW.js","assets/Monitor01-Cgbhw-lc.js","assets/Sun-DIgdvn0A.js","assets/Play-l_x93PVH.js","assets/Plus-B78UgIQj.js","assets/SearchMd-Dqn_93IA.js","assets/Trash01-DgiFlWKM.js","assets/Upload01-CHvq8vCH.js","assets/User01-B5touKPl.js","assets/Users01-zLwSSr3g.js","assets/XClose-DDA2dBHO.js","assets/format-time-CAj8AQXM.js","assets/differenceInSeconds-C3x8sHUj.js","assets/use-decopilot-events-Bzuucvme.js","assets/thread-intent-BZ0YY6QE.js","assets/delay-CnY5UFtP.js","assets/backoff-CrEUbyZT.js","assets/watch-sse-pool-CkxkGv7P.js","assets/task-board-aXTBpoFu.js","assets/schema-CicY9CFd.js","assets/slugify-CEUa2lfQ.js","assets/chat-context-B8ZyAt_m.js","assets/autosend-D2AjmwKk.js","assets/use-ai-providers-B1IEQ8TI.js","assets/use-chat-navigation-Dl1MW8jd.js","assets/use-organization-settings-CLDZrVD2.js","assets/icon-button-CmcBnS_y.js","assets/file-type-icon-Cyq-HL5W.js","assets/shell-layout-DxHQCpTn.js","assets/avatar-Bkg-M2--.js","assets/use-clock-tick-DqoBjZmM.js","assets/command-mzLX0leD.js","assets/index-D-oDxCEJ.js","assets/integration-icon-BRP_biyX.js","assets/project-icon-jOYdFGx5.js","assets/new-project-dialog-C_tU1gg8.js","assets/repository-import-picker-DQ-cjLn_.js","assets/use-navigate-to-agent-Dba95vVq.js","assets/repository-picker-CT4Afe6w.js","assets/useInfiniteQuery-DlArWAqw.js","assets/infiniteQueryObserver-DAJAo4Js.js","assets/collection-search-Ch8MLIzL.js","assets/use-debounced-value-CGyFMjzg.js","assets/required-auth-layout-C1JjNc-h.js","assets/use-org-sso-O0zps6r1.js","assets/shell-layout-CE2Eihra.css","assets/chat-draft-DwejBqhn.js","assets/select-C5ZUHdTe.js","assets/index-BdQq_4o_.js","assets/tabs-Db8UWqyQ.js","assets/use-deco-credits-CLdYd8om.js","assets/toggle-group-tTNOH3L7.js","assets/use-open-billing-url-D5pKa81c.js","assets/index-Cqtntghk.js","assets/checkbox-DXc9jE-k.js","assets/ai-providers-logos-DD3qZ33J.js","assets/popover-D9c0rC9X.js","assets/drawer-Chy2me2L.js","assets/input-fPWoCV4A.js","assets/suggestion-rFC9uhKm.js","assets/use-project-native-view-presence-Dmn-wieO.js","assets/use-file-configs-zh5akF0n.js","assets/site-slug-DebpOoQq.js","assets/use-mcp-prompts-Cxif3O1P.js","assets/use-org-fs-BxRaxb9L.js","assets/question-004-sINsf4GQ.js","assets/use-members-B9jY-Afg.js","assets/use-org-auth-client-ZcrC4T6K.js","assets/feature-paywall-BEw3yHFI.js","assets/plan-ladder-Dw4VwLn_.js","assets/add-connection-dialog-7GPeDba3.js","assets/extract-connection-data-BbpwU49P.js","assets/metadata-D72DunRR.js","assets/connection-Ddwz98Wi.js","assets/url-slug-B0r7Le3c.js","assets/connection-card-BpuIPJGU.js","assets/connection-slug-CITJ0kGN.js","assets/textarea-CyaF3dQs.js","assets/use-connection-D6vlEjek.js","assets/schema-oXjGSciT.js","assets/connection-form-helpers-ZBgy6PeQ.js","assets/authenticate-and-persist-oauth-ESA9MWa7.js","assets/mcp-oauth-lfv0IiGQ.js","assets/mcp-oauth-cPcwwC9B.js","assets/collection-tabs-Brdd-yO-.js","assets/badge-BHSeIY_1.js","assets/use-infinite-scroll-D5ShLRuK.js","assets/useSuspenseInfiniteQuery-Cl1hoey9.js","assets/use-task-board-events-bt8pGNQu.js"])))=>i.map(i=>d[i]);
2
+ import{b0 as Fe,c as R,b as K,r as P,l as O,j as o,aX as it,aF as ie,bW as Ut,aG as ne,bV as ze,B as G,aE as Ss,aD as Cs,cY as Ns,bU as Is,F as Ne,b9 as Ts,dX as Ce,dY as mt,a9 as _s,e as Ms,I as Ds,t as Ue,y as se,a2 as Ie,d as at,ah as lt,v as Rs,aM as Es,s as Ps,q as Us,D as Ls,dS as Fs,a3 as zs,K as Os,m as $s,X as Bs,T as Ks,V as qs,U as ye,as as gt,aq as xt,ar as vt,h as Qs,aT as Ys,aS as Ws,au as Gs,cX as Hs,d0 as je,aY as Js,d2 as Zs,aZ as bt,b2 as Xs,a as en,at as tn,av as sn,aL as st,af as Lt,b_ as nn,aR as on}from"./index-Gu6p_bn6.js";import{i as Ft,c as rn,d as an,e as zt,P as ln,f as Vn,S as cn}from"./usage-stats-BXBqqbOk.js";import{s as Ot}from"./XClose-DDA2dBHO.js";import{I as dn}from"./icon-button-CmcBnS_y.js";import{F as un}from"./file-type-icon-Cyq-HL5W.js";import{a as pn}from"./use-chat-navigation-Dl1MW8jd.js";import{b as fn}from"./location-BjlyegC2.js";import{d as hn,K as mn,b as gn}from"./shell-layout-DxHQCpTn.js";import{a as $t}from"./repository-binding-C6bmiEYF.js";import{w as xn,A as vn}from"./autosend-D2AjmwKk.js";import{s as bn,r as At,i as An,c as yn,w as jn,H as kn}from"./chat-draft-DwejBqhn.js";import{r as wn,d as Sn,f as Cn,h as Nn,t as In,z as Tn,o as _n,c as Mn}from"./thread-intent-BZ0YY6QE.js";import{u as We,b as Oe,c as Ge,d as He,j as Dn,m as Rn,n as En,o as Pn,q as Un,v as Ln,x as Fn,y as zn,f as On,s as $n,e as Bn}from"./chat-context-B8ZyAt_m.js";import{i as Bt}from"./LinkBroken01-XywQ_V_L.js";import{i as Kt}from"./ArrowUp-BlmIqgms.js";import{n as qt}from"./ShoppingBag01-DFlLGvQA.js";import{t as Je,aJ as Qt,a4 as Yt,aK as nt,f as Vt,ax as Kn,B as qn,aL as Qn,q as Wt,aM as Gt,L as Yn,aN as Wn}from"./agent-icon-BbVfkRpF.js";import{a as Ht}from"./Image01-Dis3SEGR.js";import{h as Gn}from"./UserSquare-BbO_BuU-.js";import{i as Hn}from"./Upload01-CHvq8vCH.js";import{i as Jn}from"./AlertCircle-Bd_c5lvx.js";import{a as Zn}from"./Copy01-D9EWjRj_.js";import{a as ot,b as ct,d as dt,f as ut,F as Jt}from"./form-CZY9mi95.js";import{c as Xn,S as eo,b as to,a as so,d as no}from"./select-C5ZUHdTe.js";import{t as Zt}from"./ChevronUp-BWLwOWUB.js";import{T as Ze,a as Xe,c as et}from"./tooltip-PBE4vcNO.js";import{i as oo}from"./ArrowLeft-BEDsoU4s.js";import{c as ro,b as io}from"./tabs-Db8UWqyQ.js";import{e as $e,f as ao,c as lo,g as Vo}from"./use-decopilot-events-Bzuucvme.js";import{u as co}from"./use-deco-credits-CLdYd8om.js";import{T as yt,a as uo}from"./toggle-group-tTNOH3L7.js";import{a as po,d as fo,g as jt,s as ho}from"./tool-namespace-B_Fkbcgh.js";import{t as mo}from"./utils-CVEq3hMx.js";import{u as go}from"./use-open-billing-url-D5pKa81c.js";import{M as xo,a as vo,m as pt,g as bo,b as Ao}from"./index-Cqtntghk.js";import{a as Xt,b as es,P as ts}from"./popover-D9c0rC9X.js";import{c as yo,b as jo,a as ko,D as wo}from"./drawer-Chy2me2L.js";import{u as ss}from"./use-mobile-Di0MPt3q.js";import{t as So}from"./Tool01-CgbvcQme.js";import{d as Co,a as No}from"./use-organization-settings-CLDZrVD2.js";import{u as ns,c as Io,d as To}from"./use-ai-providers-B1IEQ8TI.js";import{p as os,u as _o,T as Mo,a as Do,U as Ro}from"./input-fPWoCV4A.js";import{a as Eo}from"./use-mcp-client-rvPKbELE.js";import{l as Po,g as Uo}from"./use-mcp-prompts-Cxif3O1P.js";import{i as Lo}from"./Link01-CH9KeNiW.js";import{s as kt}from"./Plus-B78UgIQj.js";import"./suggestion-rFC9uhKm.js";import{p as Fo,q as zo}from"./question-004-sINsf4GQ.js";import{A as Oo}from"./avatar-Bkg-M2--.js";import{u as $o}from"./use-members-B9jY-Afg.js";import{F as wt}from"./feature-paywall-BEw3yHFI.js";import{A as Bo}from"./add-connection-dialog-7GPeDba3.js";import{u as Ko}from"./use-task-board-events-bt8pGNQu.js";import{i as qo}from"./use-project-native-view-presence-Dmn-wieO.js";const Qo=Fe("Headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]);const Yo=Fe("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);const Wo=Fe("MicOff",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M18.89 13.23A7.12 7.12 0 0 0 19 12v-2",key:"80xlxr"}],["path",{d:"M5 10v2a7 7 0 0 0 12 5",key:"p2k8kg"}],["path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33",key:"1gzdoj"}],["path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12",key:"r2i35w"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);const Go=Fe("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);const Ho=Fe("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);function Jo(t){const e=R.c(14),s=$t(t),n=We(),r=s?.metadata,i=n?.activeTask,a=i?.metadata?.runtime;let l;e[0]!==a?(l=Nn(a),e[0]=a,e[1]=l):l=e[1];const c=l,d=!!i&&!i.partial,u=i?.metadata;let V;e[2]!==r||e[3]!==u?(V=wn(u,r),e[2]=r,e[3]=u,e[4]=V):V=e[4];const p=!!c||d&&!!s;let f;e[5]!==r?(f=Sn(r),e[5]=r,e[6]=f):f=e[6];let h;e[7]!==r?(h=Cn(r),e[7]=r,e[8]=h):h=e[8];let m;return e[9]!==V||e[10]!==p||e[11]!==f||e[12]!==h?(m={runtime:V,resolved:p,projectDefault:f,previewServerUrl:h},e[9]=V,e[10]=p,e[11]=f,e[12]=h,e[13]=m):m=e[13],m}const tt="cubic-bezier(0.645, 0.045, 0.355, 1)",ll=44,Zo={default:"",error:"isolate after:content-[''] after:absolute after:inset-0 after:rounded-xl after:bg-destructive/5 after:pointer-events-none after:-z-10",warning:"isolate after:content-[''] after:absolute after:inset-0 after:rounded-xl after:bg-warning/5 after:pointer-events-none after:-z-10"},Xo={default:"border-border",error:"border-destructive/30",warning:"border-warning/30"},er={default:"text-muted-foreground",error:"text-destructive",warning:"text-warning"};function pe(t){const e=R.c(69),{icon:s,label:n,count:r,title:i,footerLeft:a,footerRight:l,children:c,defaultExpanded:d,variant:u,onClose:V}=t,p=u===void 0?"default":u,f=K(),[h,m]=P.useState(d),[g,v]=P.useState(!1);let x;e[0]!==V?(x=()=>{v(!0),V?.()},e[0]=V,e[1]=x):x=e[1];const b=x;if(g)return null;const A=Xo[p],j=Zo[p];let y;e[2]!==A||e[3]!==j?(y=O("relative flex flex-col rounded-xl bg-background border shadow-md","w-[calc(100%-16px)] max-w-[640px] mx-auto mb-2",A,j),e[2]=A,e[3]=j,e[4]=y):y=e[4];let k;e[5]===Symbol.for("react.memo_cache_sentinel")?(k=()=>m(tr),e[5]=k):k=e[5];const w=h&&"rounded-b-none",S=!h&&"rounded-b-xl";let N;e[6]!==w||e[7]!==S?(N=O("flex items-center gap-2 w-full px-3 py-2 text-sm text-left","hover:bg-accent/50 transition-colors rounded-t-xl",w,S),e[6]=w,e[7]=S,e[8]=N):N=e[8];const I=er[p];let C;e[9]!==I?(C=O("shrink-0",I),e[9]=I,e[10]=C):C=e[10];let M;e[11]!==s||e[12]!==C?(M=o.jsx("span",{className:C,children:s}),e[11]=s,e[12]=C,e[13]=M):M=e[13];let D;e[14]!==n?(D=o.jsx("span",{className:"flex-1 min-w-0 truncate",children:n}),e[14]=n,e[15]=D):D=e[15];let E;e[16]!==r?(E=r?o.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:r}):null,e[16]=r,e[17]=E):E=e[17];const U=h?"rotate(180deg)":"rotate(0deg)";let T;e[18]!==U?(T=o.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground shrink-0 flex items-center justify-center",children:o.jsx(Zt,{size:16,style:{transform:U,transition:`transform 180ms ${tt}`}})}),e[18]=U,e[19]=T):T=e[19];let L;e[20]!==f?(L=f("chat.collapsibleHighlight.closeLabel"),e[20]=f,e[21]=L):L=e[21];let F;e[22]!==f?(F=f("chat.collapsibleHighlight.closeTitle"),e[22]=f,e[23]=F):F=e[23];let W,$;e[24]!==b?(W=ce=>{ce.stopPropagation(),b()},$=ce=>{(ce.key==="Enter"||ce.key===" ")&&(ce.preventDefault(),ce.stopPropagation(),b())},e[24]=b,e[25]=W,e[26]=$):(W=e[25],$=e[26]);let z;e[27]===Symbol.for("react.memo_cache_sentinel")?(z=o.jsx(it,{size:16}),e[27]=z):z=e[27];let Q;e[28]!==L||e[29]!==F||e[30]!==W||e[31]!==$?(Q=o.jsx("span",{role:"button",tabIndex:0,"data-testid":"collapsible-highlight-close","aria-label":L,title:F,onClick:W,onKeyDown:$,className:"text-muted-foreground hover:text-foreground transition-colors shrink-0 flex items-center justify-center -mr-1 ml-1 p-1 rounded-md hover:bg-accent",children:z}),e[28]=L,e[29]=F,e[30]=W,e[31]=$,e[32]=Q):Q=e[32];let ee;e[33]!==h||e[34]!==M||e[35]!==D||e[36]!==E||e[37]!==T||e[38]!==Q||e[39]!==N?(ee=o.jsxs("button",{type:"button","data-testid":"collapsible-highlight-chip","aria-expanded":h,onClick:k,className:N,children:[M,D,E,T,Q]}),e[33]=h,e[34]=M,e[35]=D,e[36]=E,e[37]=T,e[38]=Q,e[39]=N,e[40]=ee):ee=e[40];const te=h?"1fr":"0fr";let H;e[41]!==te?(H={display:"grid",gridTemplateRows:te,transition:`grid-template-rows 180ms ${tt}`},e[41]=te,e[42]=H):H=e[42];let oe;e[43]===Symbol.for("react.memo_cache_sentinel")?(oe={overflow:"hidden",minHeight:0},e[43]=oe):oe=e[43];const _=h?1:0;let B;e[44]!==_?(B={opacity:_,transition:`opacity 120ms ${tt}`,maxHeight:"60vh"},e[44]=_,e[45]=B):B=e[45];let J;e[46]!==i?(J=i?o.jsx("div",{className:"flex items-start gap-2 px-4 pt-4 pb-5 border-t border-dashed border-border/60",children:o.jsx("p",{className:"flex-1 text-base font-medium text-foreground min-w-0",children:i})}):o.jsx("div",{className:"border-t border-dashed border-border/60"}),e[46]=i,e[47]=J):J=e[47];let Z;e[48]!==c||e[49]!==i?(Z=c?o.jsx("div",{className:O("pb-4",!i&&"pt-4"),children:c}):null,e[48]=c,e[49]=i,e[50]=Z):Z=e[50];let X;e[51]!==J||e[52]!==Z?(X=o.jsxs("div",{className:"flex-1 min-h-0 overflow-y-auto",children:[J,Z]}),e[51]=J,e[52]=Z,e[53]=X):X=e[53];let ue;e[54]!==a||e[55]!==l?(ue=a||l?o.jsx("div",{className:"shrink-0 border-t border-border px-3 py-3 pb-6",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("div",{children:a}),o.jsx("div",{className:"flex items-center gap-2",children:l})]})}):null,e[54]=a,e[55]=l,e[56]=ue):ue=e[56];let Y;e[57]!==B||e[58]!==X||e[59]!==ue?(Y=o.jsx("div",{style:oe,children:o.jsxs("div",{className:"flex flex-col",style:B,children:[X,ue]})}),e[57]=B,e[58]=X,e[59]=ue,e[60]=Y):Y=e[60];let le;e[61]!==H||e[62]!==Y?(le=o.jsx("div",{"data-testid":"collapsible-highlight-body",style:H,children:Y}),e[61]=H,e[62]=Y,e[63]=le):le=e[63];let Ve;return e[64]!==ee||e[65]!==le||e[66]!==y||e[67]!==p?(Ve=o.jsxs("div",{"data-testid":"collapsible-highlight","data-variant":p,className:y,children:[ee,le]}),e[64]=ee,e[65]=le,e[66]=y,e[67]=p,e[68]=Ve):Ve=e[68],Ve}function tr(t){return!t}const sr=ie({content:ne().min(1).describe("Imperative form, e.g. 'Implement the login flow'"),status:ze(["pending","in_progress","completed"]),activeForm:ne().min(1).describe("Present-continuous form shown in the UI while the todo is in progress, e.g. 'Implementing the login flow'")}),rs=ie({todos:Ut(sr)}),nr="Plan and track multi-step work. Call with the FULL todo list every time — this replaces the prior list. Call at the start of every multi-step request. Skip only for true one-shots (a single tool call or a direct answer). Mark exactly one todo `in_progress` at a time. Flip a todo to `in_progress` before starting it and to `completed` the moment it finishes — do not batch completions. Your prior tool-call inputs are your current state — read your last call to see where you are.";In({description:nr,inputSchema:Tn(rs),execute:async({todos:t})=>({ok:!0,count:t.length})});const or="tool-todo_write",rr=new Set(["input-available","output-available"]);function ir(t){for(let e=t.length-1;e>=0;e--){const s=t[e];if(s.role!=="assistant")continue;const n=s.parts;if(Array.isArray(n))for(let r=n.length-1;r>=0;r--){const i=n[r];if(i.type!==or||typeof i.state!="string"||!rr.has(i.state))continue;const a=rs.safeParse(i.input);if(a.success)return a.data.todos}}return[]}function is(t){const e=[];for(const s of t)if("state"in s&&s.state==="approval-requested"&&"approval"in s&&s.approval?.id&&"toolCallId"in s&&s.toolCallId){const n="toolName"in s&&typeof s.toolName=="string"?s.toolName:s.type.startsWith("tool-")?s.type.replace("tool-",""):"Tool";e.push({approvalId:s.approval.id,toolCallId:s.toolCallId,toolName:n,friendlyName:mo(po(n)),input:s.input})}return e}function as(t){return t.at(-1)}function ls(t){const e=[];for(const s of t)s.type==="tool-propose_plan"&&s.state==="input-available"&&e.push({toolCallId:s.toolCallId,plan:s.input.plan,state:s.state});return e}function ar(t){return t?t.message.startsWith("[CREDITS]"):!1}const lr={isCreditExhausted:!1,planRefusal:null,subscriptionErrorKind:null,hasTodos:!1,showError:!1,showWarning:!1,hasApprovals:!1,hasPlans:!1,isWaitingForUserInput:!1,hasTaskSuggestion:!1,todos:[]};function Vr(t){const{messages:e,error:s,finishReason:n,isStreaming:r,isWaitingForApprovals:i}=t;if(!r&&s&&ar(s))return{...lr,isCreditExhausted:!0};const a=e.at(-1),l=a?.role==="assistant"?a.parts:[],c=l,u=!!c.filter(y=>y.type==="tool-user_ask").filter(y=>y.state!=="output-available").length,V=c.some(Ft),p=ls(l),f=is(c),h=ir(e),m=r?null:bn(s),g=r?null:_n(s),v=!r&&!!s&&!m&&!g,x=f.length>0||r&&i,b=p.length>0,j=!r&&!!n&&n!=="stop"&&!(n==="tool-calls"&&(u||x||b||V))&&!v;return{isCreditExhausted:!1,planRefusal:g,subscriptionErrorKind:m,hasTodos:h.length>0,showError:v,showWarning:j,hasApprovals:x,hasPlans:b,isWaitingForUserInput:u,hasTaskSuggestion:V,todos:h}}function Vs(){const t=R.c(6),{messages:e,error:s,finishReason:n,isStreaming:r,isWaitingForApprovals:i}=Oe(),a=s??null,l=n??null;let c;return t[0]!==r||t[1]!==i||t[2]!==e||t[3]!==a||t[4]!==l?(c=Vr({messages:e,error:a,finishReason:l,isStreaming:r,isWaitingForApprovals:i}),t[0]=r,t[1]=i,t[2]=e,t[3]=a,t[4]=l,t[5]=c):c=t[5],c}function Vl(){const t=Vs(),e=$e("credits");return t.isCreditExhausted?e?0:1:Number(t.hasTodos)+Number(t.showError)+ +!!t.subscriptionErrorKind+ +!!t.planRefusal+Number(t.showWarning)+Number(t.hasApprovals)+Number(t.hasPlans)+Number(t.isWaitingForUserInput)+Number(t.hasTaskSuggestion)}const St="start-task",cr=`Turn the report below into a running task. The user pressed "Start task", which authorizes delegation.
3
3
 
4
4
  1. Read the report and any attached screenshots. Carry the reporter's own words into the task description, plus the URL of any attachment.
5
5
  2. Call TASK_BOARD_ITEM_LIST. Its \`repos\` are this organization's repositories — the only valid values for a task's repo, so pick the one the report is about and never invent a name.
6
6
  3. Call TASK_BOARD_ITEM_CREATE with a concise title, the full description, the chosen repo as owner/name, assigneeId "super-agent", and onDuplicate "return_existing". That assignment is what queues the work; the duplicate option makes the tool hand back an existing task when one already covers this report instead of opening a second one.
7
7
  4. Reply with the task key the tool returned (e.g. DECO-144) and one line on what you filed. If the output says \`deduplicated: true\`, say the report was already tracked by that task and quote its \`duplicateReason\`. Never invent a URL. Do NOT implement the fix here; the task's own run does that, and the reporter gets an email when its PR is ready for review.
8
8
 
9
- The report follows.`;function dr(t){return{...t,content:[{type:"paragraph",content:[rn({id:St,name:St,char:"/",kind:"prompt",metadata:[{role:"user",content:{type:"text",text:cr}}]})]},...t.content??[]]}}function ur(){const t=R.c(24),e=K(),s=pn();if(!s)return null;let n,r,i,a;t[0]!==s.path||t[1]!==e?(n=fn(s.path),a="flex px-3 pt-3",r="surface-inset flex h-7 min-w-0 items-center gap-1.5 rounded-full pr-0.5 pl-2.5 text-xs text-foreground",i=e("chat.input.openFileContext",{name:n}),t[0]=s.path,t[1]=e,t[2]=n,t[3]=r,t[4]=i,t[5]=a):(n=t[2],r=t[3],i=t[4],a=t[5]);let l,c;t[6]!==n?(l=o.jsx(un,{filename:n,className:"h-4 w-3 shrink-0"}),c=o.jsx("span",{className:"truncate",children:n}),t[6]=n,t[7]=l,t[8]=c):(l=t[7],c=t[8]);let d;t[9]!==e?(d=e("chat.input.openFileDismiss"),t[9]=e,t[10]=d):d=t[10];let u;t[11]===Symbol.for("react.memo_cache_sentinel")?(u=o.jsx(Ot,{size:12}),t[11]=u):u=t[11];let V;t[12]!==s.dismiss||t[13]!==d?(V=o.jsx(dn,{label:d,size:"icon-sm",onClick:s.dismiss,children:u}),t[12]=s.dismiss,t[13]=d,t[14]=V):V=t[14];let p;t[15]!==r||t[16]!==i||t[17]!==l||t[18]!==c||t[19]!==V?(p=o.jsxs("span",{className:r,title:i,children:[l,c,V]}),t[15]=r,t[16]=i,t[17]=l,t[18]=c,t[19]=V,t[20]=p):p=t[20];let f;return t[21]!==a||t[22]!==p?(f=o.jsx("div",{className:a,children:p}),t[21]=a,t[22]=p,t[23]=f):f=t[23],f}function pr(t){const e=R.c(30),{current:s,total:n,onPrev:r,onNext:i}=t,a=K();if(n<=1)return null;const l=s===0,c=s===0?"opacity-30 cursor-not-allowed":"hover:text-foreground cursor-pointer";let d;e[0]!==c?(d=O("p-0.5 transition-colors rounded-lg",c),e[0]=c,e[1]=d):d=e[1];let u;e[2]!==a?(u=a("chat.pagination.previousLabel"),e[2]=a,e[3]=u):u=e[3];let V;e[4]===Symbol.for("react.memo_cache_sentinel")?(V=o.jsx(oo,{size:14}),e[4]=V):V=e[4];let p;e[5]!==r||e[6]!==l||e[7]!==d||e[8]!==u?(p=o.jsx("button",{type:"button",onClick:r,disabled:l,className:d,"aria-label":u,children:V}),e[5]=r,e[6]=l,e[7]=d,e[8]=u,e[9]=p):p=e[9];const f=s+1;let h;e[10]!==a||e[11]!==f||e[12]!==n?(h=a("chat.pagination.counter",{current:f,total:n}),e[10]=a,e[11]=f,e[12]=n,e[13]=h):h=e[13];let m;e[14]!==h?(m=o.jsx("span",{className:"tabular-nums text-xs",children:h}),e[14]=h,e[15]=m):m=e[15];const g=s===n-1,v=s===n-1?"opacity-30 cursor-not-allowed":"hover:text-foreground cursor-pointer";let x;e[16]!==v?(x=O("p-0.5 transition-colors rounded-lg",v),e[16]=v,e[17]=x):x=e[17];let b;e[18]!==a?(b=a("chat.pagination.nextLabel"),e[18]=a,e[19]=b):b=e[19];let A;e[20]===Symbol.for("react.memo_cache_sentinel")?(A=o.jsx(Bt,{size:14}),e[20]=A):A=e[20];let j;e[21]!==i||e[22]!==g||e[23]!==x||e[24]!==b?(j=o.jsx("button",{type:"button",onClick:i,disabled:g,className:x,"aria-label":b,children:A}),e[21]=i,e[22]=g,e[23]=x,e[24]=b,e[25]=j):j=e[25];let y;return e[26]!==j||e[27]!==p||e[28]!==m?(y=o.jsxs("div",{className:"flex items-center gap-1 text-sm text-muted-foreground",children:[p,m,j]}),e[26]=j,e[27]=p,e[28]=m,e[29]=y):y=e[29],y}function cs(t){const e=R.c(8),{currentIndex:s,total:n,onPrev:r,onNext:i,extraLeft:a}=t;let l;e[0]!==s||e[1]!==i||e[2]!==r||e[3]!==n?(l=o.jsx(pr,{current:s,total:n,onPrev:r,onNext:i}),e[0]=s,e[1]=i,e[2]=r,e[3]=n,e[4]=l):l=e[4];let c;return e[5]!==a||e[6]!==l?(c=o.jsxs("div",{className:"flex items-center gap-2",children:[l,a]}),e[5]=a,e[6]=l,e[7]=c):c=e[7],c}function fr(t){const e=R.c(17),{isStreaming:s,isAllAnswered:n,isCurrentAnswered:r,onAdvanceOrSubmit:i,submitLabel:a,nextLabel:l}=t,u=n?a===void 0?"Submit":a:l===void 0?"Next":l,V=n?s:!r,p=V?n?"Waiting for the assistant to finish…":"Answer this item to continue":null;let f;e[0]!==V||e[1]!==i?(f=()=>{V||i()},e[0]=V,e[1]=i,e[2]=f):f=e[2];const h=V&&"opacity-50 cursor-not-allowed";let m;e[3]!==h?(m=O("h-7 px-2.5 text-xs",h),e[3]=h,e[4]=m):m=e[4];let g;e[5]!==V||e[6]!==u||e[7]!==f||e[8]!==m?(g=o.jsx(G,{type:"button",size:"sm","aria-disabled":V,onClick:f,className:m,children:u}),e[5]=V,e[6]=u,e[7]=f,e[8]=m,e[9]=g):g=e[9];const v=g;if(!p)return v;let x;e[10]!==v?(x=o.jsx(Ze,{asChild:!0,children:v}),e[10]=v,e[11]=x):x=e[11];let b;e[12]!==p?(b=o.jsx(Xe,{children:p}),e[12]=p,e[13]=b):b=e[13];let A;return e[14]!==x||e[15]!==b?(A=o.jsxs(et,{children:[x,b]}),e[14]=x,e[15]=b,e[16]=A):A=e[16],A}function ds(t,e,s){return t.findIndex(n=>e(n)===s)}function Ct(t,e,s,n){return t.length===0?!1:t.every(r=>n(s[e(r)]))}function Nt(t,e,s,n,r){if(t.length===0)return null;const i=ds(t,e,r);for(let a=1;a<=t.length;a++){const l=t[(i+a)%t.length];if(!l)continue;const c=e(l);if(c!==r&&!n(s[c]))return c}return null}function hr(t){return!t.isStreaming&&t.allAnswered}function us(t){const{parts:e,partKey:s,schema:n,defaultValues:r,isStreaming:i,hasAnswer:a,onSubmit:l}=t,c=e[0]?s(e[0]):"",[d,u]=P.useState(c),[V,p]=P.useState(!1),f=Ss({resolver:Cs(n),defaultValues:r}),h=f.watch(),m=ds(e,s,d),g=m>=0?e[m]:void 0,v=a(h[d]),x=Ct(e,s,h,a),b=hr({isStreaming:i,allAnswered:x}),A=()=>{if(m>0){const I=e[m-1];I&&u(s(I))}},j=()=>{if(m>=0&&m<e.length-1){const I=e[m+1];I&&u(s(I))}},y=()=>{const I=f.getValues(),C=Nt(e,s,I,a,d);C&&u(C)},k=()=>{f.handleSubmit(I=>{const C=I;for(const M of e)l(M,C[s(M)])})()},w=P.useRef(k);w.current=k;const S=()=>{b&&(p(!1),w.current())},N=()=>{const I=f.getValues();if(Ct(e,s,I,a)){if(i){p(!0);return}p(!1),w.current()}else{const C=Nt(e,s,I,a,d);C&&u(C)}};return P.useEffect(()=>{if(V&&!i){if(!x){p(!1);return}p(!1),w.current()}},[V,i,x]),{form:f,activeKey:d,setActiveKey:u,currentIndex:m,currentPart:g,isCurrentAnswered:v,isAllAnswered:x,canSubmit:b,goPrev:A,goNext:j,advanceToNextUnanswered:y,submit:S,submitOrAdvance:N}}const ps="chat.approval.defaultDenyReason";function fs(t){const e=R.c(36),{onYolo:s}=t,n=K(),[r,i]=Ne();let a,l,c,d,u,V,p,f,h;if(e[0]!==s||e[1]!==r||e[2]!==i||e[3]!==n){const A=Ce.find(k=>k.value===r.toolApprovalLevel)??Ce[0];let j;e[13]!==s||e[14]!==r||e[15]!==i?(j=k=>{const w=k,S=r.toolApprovalLevel??"readonly";i({...r,toolApprovalLevel:w}),w==="auto"&&s(S)},e[13]=s,e[14]=r,e[15]=i,e[16]=j):j=e[16];const y=j;c=eo,f=r.toolApprovalLevel,h=y,l=to,u="xs",V="text-xs text-muted-foreground border-border/60 bg-transparent hover:bg-accent/60 h-7 gap-1",p=mr,a=so,d=n(A.shortKey),e[0]=s,e[1]=r,e[2]=i,e[3]=n,e[4]=a,e[5]=l,e[6]=c,e[7]=d,e[8]=u,e[9]=V,e[10]=p,e[11]=f,e[12]=h}else a=e[4],l=e[5],c=e[6],d=e[7],u=e[8],V=e[9],p=e[10],f=e[11],h=e[12];let m;e[17]!==a||e[18]!==d?(m=o.jsx(a,{children:d}),e[17]=a,e[18]=d,e[19]=m):m=e[19];let g;e[20]!==l||e[21]!==u||e[22]!==V||e[23]!==p||e[24]!==m?(g=o.jsx(l,{size:u,className:V,onClick:p,children:m}),e[20]=l,e[21]=u,e[22]=V,e[23]=p,e[24]=m,e[25]=g):g=e[25];let v;e[26]!==n?(v=Ce.map(A=>o.jsx(Xn,{value:A.value,children:n(A.labelKey)},A.value)),e[26]=n,e[27]=v):v=e[27];let x;e[28]!==v?(x=o.jsx(no,{children:v}),e[28]=v,e[29]=x):x=e[29];let b;return e[30]!==c||e[31]!==x||e[32]!==f||e[33]!==h||e[34]!==g?(b=o.jsxs(c,{value:f,onValueChange:h,children:[g,x]}),e[30]=c,e[31]=x,e[32]=f,e[33]=h,e[34]=g,e[35]=b):b=e[35],b}function mr(t){return t.stopPropagation()}function hs(t){const e=R.c(8),{input:s}=t,n=K();if(s==null){let a;e[0]!==n?(a=n("chat.approval.noInput"),e[0]=n,e[1]=a):a=e[1];let l;return e[2]!==a?(l=o.jsx("div",{className:"px-4 text-xs text-muted-foreground",children:a}),e[2]=a,e[3]=l):l=e[3],l}let r;try{let a;e[4]!==s?(a=JSON.stringify(s,null,2),e[4]=s,e[5]=a):a=e[5],r=a}catch{r=String(s)}let i;return e[6]!==r?(i=o.jsx("div",{className:"px-4",children:o.jsx("pre",{className:"text-xs font-mono text-muted-foreground/70 whitespace-pre-wrap wrap-break-word max-h-32 overflow-y-auto rounded-md bg-muted/30 px-3 py-2",children:r})}),e[6]=r,e[7]=i):i=e[7],i}function gr(t){const e=R.c(38),{approval:s,onRespond:n}=t,r=K(),[i]=Ne(),a=i.toolApprovalLevel??"readonly";let l;e[0]!==s.approvalId||e[1]!==a||e[2]!==n||e[3]!==r?(l=()=>n(s.approvalId,!1,r(ps),a),e[0]=s.approvalId,e[1]=a,e[2]=n,e[3]=r,e[4]=l):l=e[4];const c=l;let d;e[5]!==s.approvalId||e[6]!==a||e[7]!==n?(d=()=>n(s.approvalId,!0,void 0,a),e[5]=s.approvalId,e[6]=a,e[7]=n,e[8]=d):d=e[8];const u=d;let V;e[9]!==s.approvalId||e[10]!==n?(V=S=>n(s.approvalId,!0,void 0,S),e[9]=s.approvalId,e[10]=n,e[11]=V):V=e[11];const p=V;let f;e[12]!==p?(f=o.jsx("div",{className:"flex items-center gap-2",children:o.jsx(fs,{onYolo:p})}),e[12]=p,e[13]=f):f=e[13];const h=f;let m;e[14]!==r?(m=r("chat.approval.denyButton"),e[14]=r,e[15]=m):m=e[15];let g;e[16]!==c||e[17]!==m?(g=o.jsx(G,{type:"button",variant:"ghost",size:"sm",className:"h-7 px-2.5 text-xs text-muted-foreground [@media(hover:hover)]:hover:text-foreground active:scale-[0.97] transition-transform",onClick:c,children:m}),e[16]=c,e[17]=m,e[18]=g):g=e[18];let v;e[19]!==r?(v=r("chat.approval.acceptButton"),e[19]=r,e[20]=v):v=e[20];let x;e[21]!==u||e[22]!==v?(x=o.jsx(G,{type:"button",size:"sm",className:"h-7 px-2.5 text-xs active:scale-[0.97] transition-transform",onClick:u,children:v}),e[21]=u,e[22]=v,e[23]=x):x=e[23];let b;e[24]!==g||e[25]!==x?(b=o.jsxs(o.Fragment,{children:[g,x]}),e[24]=g,e[25]=x,e[26]=b):b=e[26];const A=b;let j;e[27]===Symbol.for("react.memo_cache_sentinel")?(j=o.jsx(Je,{size:14}),e[27]=j):j=e[27];let y;e[28]!==r?(y=r("chat.approval.needsApproval"),e[28]=r,e[29]=y):y=e[29];let k;e[30]!==s.input?(k=o.jsx(hs,{input:s.input}),e[30]=s.input,e[31]=k):k=e[31];let w;return e[32]!==s.friendlyName||e[33]!==h||e[34]!==A||e[35]!==y||e[36]!==k?(w=o.jsx(pe,{icon:j,label:y,title:s.friendlyName,defaultExpanded:!0,footerLeft:h,footerRight:A,children:k}),e[32]=s.friendlyName,e[33]=h,e[34]=A,e[35]=y,e[36]=k,e[37]=w):w=e[37],w}const xr=Ns(ne(),ie({approved:Is().optional(),levelOverride:ze(["auto","readonly"]).optional()}));function vr(t){const e=R.c(46),{approvals:s,isStreaming:n,onRespond:r}=t,i=K(),[a]=Ne(),l=a.toolApprovalLevel??"readonly";let c;e[0]!==s?(c=Object.fromEntries(s.map(yr)),e[0]=s,e[1]=c):c=e[1];const d=c;let u;e[2]!==l||e[3]!==r||e[4]!==i?(u=(C,M)=>{const D=M;typeof D?.approved=="boolean"&&r(C.approvalId,D.approved,D.approved===!1?i(ps):void 0,D.levelOverride??l)},e[2]=l,e[3]=r,e[4]=i,e[5]=u):u=e[5];let V;e[6]!==s||e[7]!==d||e[8]!==n||e[9]!==u?(V={parts:s,partKey:Ar,schema:xr,defaultValues:d,isStreaming:n,hasAnswer:br,onSubmit:u},e[6]=s,e[7]=d,e[8]=n,e[9]=u,e[10]=V):V=e[10];const p=us(V);let f;e[11]!==s||e[12]!==p?(f=C=>{p.form.reset(Object.fromEntries(s.map(M=>[M.approvalId,{approved:!0,levelOverride:C}]))),p.submitOrAdvance()},e[11]=s,e[12]=p,e[13]=f):f=e[13];const h=f,m=p.currentPart,g=p.form;let v;e[14]!==p?(v=C=>{C.preventDefault(),p.submit()},e[14]=p,e[15]=v):v=e[15];let x;e[16]===Symbol.for("react.memo_cache_sentinel")?(x=o.jsx(Je,{size:14}),e[16]=x):x=e[16];let b;e[17]!==s.length||e[18]!==i?(b=i("chat.approval.batchedLabel",{count:s.length}),e[17]=s.length,e[18]=i,e[19]=b):b=e[19];const A=m?.friendlyName??"";let j;e[20]!==h?(j=o.jsx(fs,{onYolo:h}),e[20]=h,e[21]=j):j=e[21];let y;e[22]!==s.length||e[23]!==p.currentIndex||e[24]!==p.goNext||e[25]!==p.goPrev||e[26]!==j?(y=o.jsx(cs,{currentIndex:p.currentIndex,total:s.length,onPrev:p.goPrev,onNext:p.goNext,extraLeft:j}),e[22]=s.length,e[23]=p.currentIndex,e[24]=p.goNext,e[25]=p.goPrev,e[26]=j,e[27]=y):y=e[27];let k;e[28]!==m||e[29]!==p.form.control||e[30]!==p.submitOrAdvance?(k=m?o.jsx(jr,{approvalId:m.approvalId,control:p.form.control,onChange:p.submitOrAdvance}):null,e[28]=m,e[29]=p.form.control,e[30]=p.submitOrAdvance,e[31]=k):k=e[31];let w;e[32]!==m?(w=m?o.jsx(hs,{input:m.input}):null,e[32]=m,e[33]=w):w=e[33];let S;e[34]!==y||e[35]!==k||e[36]!==w||e[37]!==b||e[38]!==A?(S=o.jsx(pe,{icon:x,label:b,title:A,defaultExpanded:!0,footerLeft:y,footerRight:k,children:w}),e[34]=y,e[35]=k,e[36]=w,e[37]=b,e[38]=A,e[39]=S):S=e[39];let N;e[40]!==S||e[41]!==v?(N=o.jsx("form",{onSubmit:v,children:S}),e[40]=S,e[41]=v,e[42]=N):N=e[42];let I;return e[43]!==p.form||e[44]!==N?(I=o.jsx(ot,{...g,children:N}),e[43]=p.form,e[44]=N,e[45]=I):I=e[45],I}function br(t){return typeof t?.approved=="boolean"}function Ar(t){return t.approvalId}function yr(t){return[t.approvalId,{approved:void 0}]}function jr(t){const e=R.c(7),{approvalId:s,control:n,onChange:r}=t,i=K(),a=`${s}.approved`;let l;e[0]!==r||e[1]!==i?(l=d=>{const{field:u}=d,V=u.value===!0,p=u.value===!1;return o.jsxs(o.Fragment,{children:[o.jsx(G,{type:"button",variant:p?"secondary":"ghost",size:"sm",className:"h-7 px-2.5 text-xs",onClick:()=>{u.onChange(!1),r()},"aria-pressed":p,children:i("chat.approval.denyButton")}),o.jsx(G,{type:"button",variant:V?"default":"outline",size:"sm",className:"h-7 px-2.5 text-xs",onClick:()=>{u.onChange(!0),r()},"aria-pressed":V,children:i("chat.approval.acceptButton")})]})},e[0]=r,e[1]=i,e[2]=l):l=e[2];let c;return e[3]!==n||e[4]!==a||e[5]!==l?(c=o.jsx(Ts,{control:n,name:a,render:l}),e[3]=n,e[4]=a,e[5]=l,e[6]=c):c=e[6],c}function kr(){const t=R.c(5),e=K();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx(Je,{className:"size-5 text-muted-foreground shimmer"}),t[0]=s):s=t[0];let n;t[1]!==e?(n=e("chat.approval.preparingRequest"),t[1]=e,t[2]=n):n=t[2];let r;return t[3]!==n?(r=o.jsxs("div",{className:"flex items-center gap-2 p-4 border border-dashed rounded-lg bg-accent/50 w-[calc(100%-16px)] max-w-[640px] mx-auto mb-2",children:[s,o.jsx("span",{className:"text-sm text-muted-foreground shimmer",children:n})]}),t[3]=n,t[4]=r):r=t[4],r}function wr(t){const e=R.c(8),{approvals:s,isStreaming:n,onRespond:r}=t;if(n&&s.length===0){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx(kr,{}),e[0]=a):a=e[0],a}if(s.length===0)return null;if(s.length===1){const a=s[0];if(!a)return null;let l;return e[1]!==r||e[2]!==a?(l=o.jsx(gr,{approval:a,onRespond:r}),e[1]=r,e[2]=a,e[3]=l):l=e[3],l}let i;return e[4]!==s||e[5]!==n||e[6]!==r?(i=o.jsx(vr,{approvals:s,isStreaming:n,onRespond:r}),e[4]=s,e[5]=n,e[6]=r,e[7]=i):i=e[7],i}function Sr(t){const e=R.c(28),{plan:s,onApprove:n,onDismiss:r}=t,i=K();let a;e[0]!==n||e[1]!==s.plan?(a=()=>{n(s.plan)},e[0]=n,e[1]=s.plan,e[2]=a):a=e[2];const l=a;let c;e[3]!==i?(c=i("chat.proposePlan.keepIterating"),e[3]=i,e[4]=c):c=e[4];let d;e[5]!==r||e[6]!==c?(d=o.jsx(G,{type:"button",variant:"ghost",size:"sm",className:"h-7 px-2.5 text-xs text-muted-foreground [@media(hover:hover)]:hover:text-foreground active:scale-[0.97] transition-transform",onClick:r,children:c}),e[5]=r,e[6]=c,e[7]=d):d=e[7];let u;e[8]!==i?(u=i("chat.proposePlan.letsGo"),e[8]=i,e[9]=u):u=e[9];let V;e[10]!==l||e[11]!==u?(V=o.jsx(G,{type:"button",size:"sm",className:"h-7 px-2.5 text-xs bg-special hover:bg-special/90 text-special-foreground active:scale-[0.97] transition-transform",onClick:l,children:u}),e[10]=l,e[11]=u,e[12]=V):V=e[12];let p;e[13]!==d||e[14]!==V?(p=o.jsxs(o.Fragment,{children:[d,V]}),e[13]=d,e[14]=V,e[15]=p):p=e[15];const f=p;let h;e[16]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsx(Qt,{size:14}),e[16]=h):h=e[16];let m;e[17]!==i?(m=i("chat.proposePlan.planReady"),e[17]=i,e[18]=m):m=e[18];let g;e[19]!==i?(g=i("chat.proposePlan.implementationPlan"),e[19]=i,e[20]=g):g=e[20];let v;e[21]!==s.plan?(v=o.jsx("div",{className:"px-4 max-h-64 overflow-y-auto",children:o.jsx("div",{className:"prose prose-sm max-w-none text-sm",children:o.jsx(an,{id:"plan-preview",part:{type:"text",text:s.plan}})})}),e[21]=s.plan,e[22]=v):v=e[22];let x;return e[23]!==f||e[24]!==v||e[25]!==m||e[26]!==g?(x=o.jsx(pe,{icon:h,label:m,title:g,defaultExpanded:!0,footerRight:f,children:v}),e[23]=f,e[24]=v,e[25]=m,e[26]=g,e[27]=x):x=e[27],x}function Cr(t){const e=R.c(6),{plans:s,onApprove:n,onDismiss:r}=t;let i;e[0]!==s?(i=as(s),e[0]=s,e[1]=i):i=e[1];const a=i;if(!a)return null;let l;return e[2]!==a||e[3]!==n||e[4]!==r?(l=o.jsx(Sr,{plan:a,onApprove:n,onDismiss:r}),e[2]=a,e[3]=n,e[4]=r,e[5]=l):l=e[5],l}function ms(t){return t?"response"in t?t.response:t.option??t.draft:""}const It=ie({response:ne().min(1,"Response is required")}),Nr=ie({option:ne().nullable(),draft:ne()}).refine(t=>(t.option??t.draft).length>0,{message:"Please select or enter an option"}),Ir=ie({response:ze(["yes","no"])});function Tr(t){switch(t.type){case"text":return It;case"choice":return Nr;case"confirm":return Ir;default:return It}}function _r(t){const e={};for(const s of t)e[s.toolCallId]=Tr(s.input);return ie(e)}function Mr(t){const e=R.c(7),{control:s,name:n,placeholder:r}=t,i=K();let a;e[0]!==r||e[1]!==i?(a=c=>{const{field:d}=c,u=d.value??"";return o.jsxs(ct,{children:[o.jsx(dt,{children:o.jsx("div",{className:"px-2",children:o.jsxs("div",{className:"flex items-center gap-3 px-2 py-3 rounded-lg bg-accent/50",children:[o.jsx("span",{className:"flex items-center justify-center size-6 rounded-md bg-muted shrink-0",children:o.jsx(Yt,{size:16,className:"text-muted-foreground"})}),o.jsx("input",{...d,value:u,type:"text",placeholder:r||i("chat.userAskQuestion.typeResponse"),autoFocus:!0,"aria-label":i("chat.userAskQuestion.textResponseInputAriaLabel"),className:"flex-1 text-sm bg-transparent outline-none placeholder:text-foreground/25 text-foreground min-w-0"})]})})}),o.jsx(ut,{})]})},e[0]=r,e[1]=i,e[2]=a):a=e[2];let l;return e[3]!==s||e[4]!==n||e[5]!==a?(l=o.jsx(Jt,{control:s,name:n,render:a}),e[3]=s,e[4]=n,e[5]=a,e[6]=l):l=e[6],l}function gs(t,e){const s=R.c(4);let n,r;s[0]!==t||s[1]!==e?(n=()=>{const i=a=>{if(hn(a.target)||a.metaKey||a.ctrlKey||a.altKey)return;const l=Number.parseInt(a.key,10);l>=1&&l<=t&&(a.preventDefault(),e(l-1))};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},r=[t,e],s[0]=t,s[1]=e,s[2]=n,s[3]=r):(n=s[2],r=s[3]),P.useEffect(n,r)}function Dr(t){const e=R.c(51),{control:s,name:n,options:r}=t,i=K(),a=`${n}.option`;let l;e[0]!==s||e[1]!==a?(l={control:s,name:a,defaultValue:null},e[0]=s,e[1]=a,e[2]=l):l=e[2];const{field:c}=mt(l),d=`${n}.draft`;let u;e[3]!==s||e[4]!==d?(u={control:s,name:d,defaultValue:""},e[3]=s,e[4]=d,e[5]=u):u=e[5];const{field:V}=mt(u),p=c.value,f=V.value??"";let h;if(e[6]!==c||e[7]!==r?(h=U=>{const T=r[U];T!=null&&c.onChange(T)},e[6]=c,e[7]=r,e[8]=h):h=e[8],gs(r.length,h),r.length===0)return null;const m=p===null;let g;e[9]!==i?(g=i("chat.userAskQuestion.choiceOptionsAriaLabel"),e[9]=i,e[10]=g):g=e[10];let v;if(e[11]!==c||e[12]!==p||e[13]!==r||e[14]!==i){let U;e[16]!==c||e[17]!==p||e[18]!==i?(U=(T,L)=>{const F=p===T;return o.jsxs("button",{type:"button",onClick:()=>c.onChange(T),className:O("flex items-start gap-3 px-2 py-3 rounded-lg text-left transition-colors w-full",F&&"bg-accent/50",!F&&"hover:bg-accent/30"),"aria-label":i("chat.userAskQuestion.selectOption",{option:T}),children:[o.jsx("span",{className:O("flex items-center justify-center size-6 rounded-md text-sm shrink-0 mt-0.5",F?"bg-chart-1 text-white":"bg-muted text-foreground"),children:L+1}),o.jsx("span",{className:"text-sm text-foreground min-w-0 break-words",children:T})]},`${L}-${T}`)},e[16]=c,e[17]=p,e[18]=i,e[19]=U):U=e[19],v=r.map(U),e[11]=c,e[12]=p,e[13]=r,e[14]=i,e[15]=v}else v=e[15];const x=m&&"bg-accent/50",b=!m&&"hover:bg-accent/30";let A;e[20]!==x||e[21]!==b?(A=O("flex items-center gap-3 px-2 py-3 rounded-lg transition-colors w-full cursor-text",x,b),e[20]=x,e[21]=b,e[22]=A):A=e[22];let j;e[23]===Symbol.for("react.memo_cache_sentinel")?(j=o.jsx("span",{className:"flex items-center justify-center size-6 rounded-md bg-muted shrink-0",children:o.jsx(Yt,{size:16,className:"text-muted-foreground"})}),e[23]=j):j=e[23];const y=m?f:"";let k;e[24]!==V||e[25]!==c||e[26]!==p?(k=U=>{V.onChange(U.target.value),p!==null&&c.onChange(null)},e[24]=V,e[25]=c,e[26]=p,e[27]=k):k=e[27];let w;e[28]!==c||e[29]!==p?(w=()=>{p!==null&&c.onChange(null)},e[28]=c,e[29]=p,e[30]=w):w=e[30];let S;e[31]!==i?(S=i("chat.userAskQuestion.somethingElsePlaceholder"),e[31]=i,e[32]=S):S=e[32];let N;e[33]!==i?(N=i("chat.userAskQuestion.customChoiceInputAriaLabel"),e[33]=i,e[34]=N):N=e[34];let I;e[35]!==y||e[36]!==k||e[37]!==w||e[38]!==S||e[39]!==N?(I=o.jsx("input",{type:"text",value:y,onChange:k,onFocus:w,placeholder:S,"aria-label":N,className:"flex-1 text-sm bg-transparent outline-none placeholder:text-foreground/25 text-foreground min-w-0"}),e[35]=y,e[36]=k,e[37]=w,e[38]=S,e[39]=N,e[40]=I):I=e[40];let C;e[41]!==A||e[42]!==I?(C=o.jsxs("label",{className:A,children:[j,I]}),e[41]=A,e[42]=I,e[43]=C):C=e[43];let M;e[44]!==C||e[45]!==g||e[46]!==v?(M=o.jsx(dt,{children:o.jsxs("div",{className:"flex flex-col px-2",role:"group","aria-label":g,children:[v,C]})}),e[44]=C,e[45]=g,e[46]=v,e[47]=M):M=e[47];let D;e[48]===Symbol.for("react.memo_cache_sentinel")?(D=o.jsx(ut,{}),e[48]=D):D=e[48];let E;return e[49]!==M?(E=o.jsxs(ct,{children:[M,D]}),e[49]=M,e[50]=E):E=e[50],E}function Rr(t){const e=R.c(8),{control:s,name:n}=t,r=K();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=["yes","no"],e[0]=i):i=e[0];const a=i,l=P.useRef(null);let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=V=>{l.current?.onChange(a[V]??"")},e[1]=c):c=e[1],gs(a.length,c);let d;e[2]!==r?(d=V=>{const{field:p}=V;return l.current=p,o.jsxs(ct,{children:[o.jsx(dt,{children:o.jsx("div",{className:"flex gap-2 px-2",role:"group","aria-label":r("chat.userAskQuestion.confirmationOptionsAriaLabel"),children:a.map(f=>{const h=p.value===f;return o.jsxs("button",{type:"button",onClick:()=>p.onChange(f),className:O("flex items-center gap-3 px-4 py-3 rounded-lg text-left transition-colors flex-1",h&&"bg-accent/50",!h&&"hover:bg-accent/30"),"aria-label":r("chat.userAskQuestion.confirmValue",{value:r(`chat.userAskQuestion.confirm${f==="yes"?"Yes":"No"}`)}),children:[o.jsx("span",{className:O("flex items-center justify-center size-6 rounded-md text-sm shrink-0",h?"bg-chart-1 text-white":"bg-muted text-foreground"),children:f==="yes"?1:2}),o.jsx("span",{className:"text-sm text-foreground capitalize",children:r(`chat.userAskQuestion.confirm${f==="yes"?"Yes":"No"}`)})]},f)})})}),o.jsx(ut,{})]})},e[2]=r,e[3]=d):d=e[3];let u;return e[4]!==s||e[5]!==n||e[6]!==d?(u=o.jsx(Jt,{control:s,name:n,render:d}),e[4]=s,e[5]=n,e[6]=d,e[7]=u):u=e[7],u}function Tt(t){const e=R.c(13),{input:s,control:n,toolCallId:r}=t;switch(s.type){case"text":{const i=`${r}.response`;let a;return e[0]!==n||e[1]!==s.default||e[2]!==i?(a=o.jsx(Mr,{control:n,name:i,placeholder:s.default}),e[0]=n,e[1]=s.default,e[2]=i,e[3]=a):a=e[3],a}case"choice":{let i;e[4]!==s.options?(i=s.options?.filter(Boolean)??[],e[4]=s.options,e[5]=i):i=e[5];const a=i;let l;return e[6]!==n||e[7]!==a||e[8]!==r?(l=o.jsx(Dr,{control:n,name:r,options:a}),e[6]=n,e[7]=a,e[8]=r,e[9]=l):l=e[9],l}case"confirm":{const i=`${r}.response`;let a;return e[10]!==n||e[11]!==i?(a=o.jsx(Rr,{control:n,name:i}),e[10]=n,e[11]=i,e[12]=a):a=e[12],a}default:return null}}function Er(t){const e=R.c(91),{parts:s,isStreaming:n,onSubmit:r}=t;let i;e[0]!==s?(i=_r(s.map(Fr)),e[0]=s,e[1]=i):i=e[1];const a=i;let l;e[2]!==s?(l=Object.fromEntries(s.map(Lr)),e[2]=s,e[3]=l):l=e[3];const c=l;let d;e[4]!==r?(d=($,z)=>{const Q=ms(z);Q&&r($,Q)},e[4]=r,e[5]=d):d=e[5];let u;e[6]!==c||e[7]!==n||e[8]!==s||e[9]!==a||e[10]!==d?(u={parts:s,partKey:Ur,schema:a,defaultValues:c,isStreaming:n,hasAnswer:Pr,onSubmit:d},e[6]=c,e[7]=n,e[8]=s,e[9]=a,e[10]=d,e[11]=u):u=e[11];const V=us(u),p=V.currentPart,f=K();let h;e[12]!==p||e[13]!==V||e[14]!==f?(h=()=>{const $=p;if(!$)return;const z=f("chat.userAskQuestion.skipMessage"),Q=$.toolCallId;$.input?.type==="choice"?(V.form.setValue(`${Q}.option`,null),V.form.setValue(`${Q}.draft`,z)):V.form.setValue(`${Q}.response`,z),V.advanceToNextUnanswered()},e[12]=p,e[13]=V,e[14]=f,e[15]=h):h=e[15];const m=h;let g;e[16]!==V.currentIndex||e[17]!==V.goNext||e[18]!==V.goPrev||e[19]!==s.length?(g=o.jsx(cs,{currentIndex:V.currentIndex,total:s.length,onPrev:V.goPrev,onNext:V.goNext}),e[16]=V.currentIndex,e[17]=V.goNext,e[18]=V.goPrev,e[19]=s.length,e[20]=g):g=e[20];const v=g;let x;e[21]!==f?(x=f("chat.userAskQuestion.skip"),e[21]=f,e[22]=x):x=e[22];let b;e[23]!==m||e[24]!==x?(b=o.jsx(G,{type:"button",variant:"outline",size:"sm",onClick:m,className:"h-7",children:x}),e[23]=m,e[24]=x,e[25]=b):b=e[25];let A;e[26]!==V.isAllAnswered||e[27]!==V.isCurrentAnswered||e[28]!==V.submitOrAdvance||e[29]!==n?(A=o.jsx(fr,{isStreaming:n,isAllAnswered:V.isAllAnswered,isCurrentAnswered:V.isCurrentAnswered,onAdvanceOrSubmit:V.submitOrAdvance}),e[26]=V.isAllAnswered,e[27]=V.isCurrentAnswered,e[28]=V.submitOrAdvance,e[29]=n,e[30]=A):A=e[30];let j;e[31]!==b||e[32]!==A?(j=o.jsxs(o.Fragment,{children:[b,A]}),e[31]=b,e[32]=A,e[33]=j):j=e[33];const y=j;if(s.length===1){const $=s[0];if(!$?.input)return null;const z=V.form;let Q;e[34]!==V?(Q=X=>{X.preventDefault(),V.submit()},e[34]=V,e[35]=Q):Q=e[35];let ee;e[36]===Symbol.for("react.memo_cache_sentinel")?(ee=o.jsx(nt,{size:14}),e[36]=ee):ee=e[36];let te;e[37]!==f?(te=f("chat.userAskQuestion.questionPending"),e[37]=f,e[38]=te):te=e[38];let H;e[39]!==$.input?.prompt||e[40]!==f?(H=$.input?.prompt??f("chat.userAskQuestion.question"),e[39]=$.input?.prompt,e[40]=f,e[41]=H):H=e[41];const oe=$.input;let _;e[42]!==V.form.control||e[43]!==$.toolCallId||e[44]!==oe?(_=o.jsx(Tt,{input:oe,control:V.form.control,toolCallId:$.toolCallId}),e[42]=V.form.control,e[43]=$.toolCallId,e[44]=oe,e[45]=_):_=e[45];let B;e[46]!==y||e[47]!==te||e[48]!==H||e[49]!==_?(B=o.jsx(pe,{icon:ee,label:te,title:H,defaultExpanded:!0,footerRight:y,children:_}),e[46]=y,e[47]=te,e[48]=H,e[49]=_,e[50]=B):B=e[50];let J;e[51]!==Q||e[52]!==B?(J=o.jsx("form",{onSubmit:Q,autoComplete:"off",children:B}),e[51]=Q,e[52]=B,e[53]=J):J=e[53];let Z;return e[54]!==V.form||e[55]!==J?(Z=o.jsx(ot,{...z,children:J}),e[54]=V.form,e[55]=J,e[56]=Z):Z=e[56],Z}const k=V.form;let w;e[57]!==V?(w=$=>{$.preventDefault(),V.submit()},e[57]=V,e[58]=w):w=e[58];let S;e[59]===Symbol.for("react.memo_cache_sentinel")?(S=o.jsx(nt,{size:14}),e[59]=S):S=e[59];let N;e[60]!==f?(N=f("chat.userAskQuestion.questionPending"),e[60]=f,e[61]=N):N=e[61];const I=V.currentIndex+1;let C;e[62]!==s.length||e[63]!==f||e[64]!==I?(C=f("chat.userAskQuestion.questionCount",{current:I,total:s.length}),e[62]=s.length,e[63]=f,e[64]=I,e[65]=C):C=e[65];let M;e[66]!==p?.input?.prompt||e[67]!==f?(M=p?.input?.prompt??f("chat.userAskQuestion.question"),e[66]=p?.input?.prompt,e[67]=f,e[68]=M):M=e[68];const D=V.activeKey,E=V.setActiveKey;let U;if(e[69]!==V.form||e[70]!==s){let $;e[72]!==V.form?($=z=>o.jsx(ro,{value:z.toolCallId,className:"mt-0",children:o.jsx(Tt,{input:z.input,control:V.form.control,toolCallId:z.toolCallId})},z.toolCallId),e[72]=V.form,e[73]=$):$=e[73],U=s.map($),e[69]=V.form,e[70]=s,e[71]=U}else U=e[71];let T;e[74]!==V.activeKey||e[75]!==V.setActiveKey||e[76]!==U?(T=o.jsx(io,{value:D,onValueChange:E,children:U}),e[74]=V.activeKey,e[75]=V.setActiveKey,e[76]=U,e[77]=T):T=e[77];let L;e[78]!==v||e[79]!==y||e[80]!==N||e[81]!==C||e[82]!==M||e[83]!==T?(L=o.jsx(pe,{icon:S,label:N,count:C,title:M,defaultExpanded:!0,footerLeft:v,footerRight:y,children:T}),e[78]=v,e[79]=y,e[80]=N,e[81]=C,e[82]=M,e[83]=T,e[84]=L):L=e[84];let F;e[85]!==w||e[86]!==L?(F=o.jsx("form",{onSubmit:w,autoComplete:"off",children:L}),e[85]=w,e[86]=L,e[87]=F):F=e[87];let W;return e[88]!==V.form||e[89]!==F?(W=o.jsx(ot,{...k,children:F}),e[88]=V.form,e[89]=F,e[90]=W):W=e[90],W}function Pr(t){return!!ms(t)}function Ur(t){return t.toolCallId}function Lr(t){return t.input?.type==="choice"?[t.toolCallId,{option:null,draft:""}]:[t.toolCallId,{response:""}]}function Fr(t){return{toolCallId:t.toolCallId,input:t.input}}function zr(){const t=R.c(5),e=K();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx(nt,{className:"size-5 text-muted-foreground shimmer"}),t[0]=s):s=t[0];let n;t[1]!==e?(n=e("chat.userAskQuestion.preparingQuestion"),t[1]=e,t[2]=n):n=t[2];let r;return t[3]!==n?(r=o.jsxs("div",{className:"flex items-center gap-2 p-4 border border-dashed rounded-lg bg-accent/50 w-[calc(100%-16px)] max-w-[640px] mx-auto mb-2",children:[s,o.jsx("span",{className:"text-sm text-muted-foreground shimmer",children:n})]}),t[3]=n,t[4]=r):r=t[4],r}function xs(t){const e=R.c(7),{userAskParts:s,isStreaming:n,onSubmit:r}=t;let i;e[0]!==s?(i=s.filter(Or),e[0]=s,e[1]=i):i=e[1];const a=i;if(a.length===0){if(n){let c;return e[2]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx(zr,{}),e[2]=c):c=e[2],c}return null}let l;return e[3]!==n||e[4]!==r||e[5]!==a?(l=o.jsx(Er,{parts:a,isStreaming:n,onSubmit:r}),e[3]=n,e[4]=r,e[5]=a,e[6]=l):l=e[6],l}function Or(t){return t.state==="input-available"}function $r(t){const e=R.c(33),{parts:s,isStreaming:n,onRespond:r}=t,i=K();let a;e[0]!==s?(a=s.at(-1),e[0]=s,e[1]=a):a=e[1];const l=a,c=l?.input;if(!l||!c?.title)return null;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(Qt,{size:14}),e[2]=d):d=e[2];let u;e[3]!==i?(u=i("chat.suggestTask.label"),e[3]=i,e[4]=u):u=e[4];const V=c.title;let p;e[5]!==r||e[6]!==l?(p=()=>r(l,!1),e[5]=r,e[6]=l,e[7]=p):p=e[7];let f;e[8]!==i?(f=i("chat.suggestTask.notNow"),e[8]=i,e[9]=f):f=e[9];let h;e[10]!==n||e[11]!==p||e[12]!==f?(h=o.jsx(G,{type:"button",size:"sm",variant:"outline",className:"h-7",disabled:n,onClick:p,children:f}),e[10]=n,e[11]=p,e[12]=f,e[13]=h):h=e[13];let m;e[14]!==r||e[15]!==l?(m=()=>r(l,!0),e[14]=r,e[15]=l,e[16]=m):m=e[16];let g;e[17]!==i?(g=i("chat.suggestTask.create"),e[17]=i,e[18]=g):g=e[18];let v;e[19]!==n||e[20]!==m||e[21]!==g?(v=o.jsx(G,{type:"button",size:"sm",className:"h-7",disabled:n,onClick:m,children:g}),e[19]=n,e[20]=m,e[21]=g,e[22]=v):v=e[22];let x;e[23]!==v||e[24]!==h?(x=o.jsxs(o.Fragment,{children:[h,v]}),e[23]=v,e[24]=h,e[25]=x):x=e[25];let b;e[26]!==c.summary?(b=c.summary?o.jsx("p",{className:"px-4 pb-1 text-sm leading-snug text-muted-foreground whitespace-pre-wrap",children:c.summary}):null,e[26]=c.summary,e[27]=b):b=e[27];let A;return e[28]!==c.title||e[29]!==x||e[30]!==b||e[31]!==u?(A=o.jsx(pe,{icon:d,label:u,title:V,defaultExpanded:!0,footerRight:x,children:b}),e[28]=c.title,e[29]=x,e[30]=b,e[31]=u,e[32]=A):A=e[32],A}function Br(t){const e=t.filter(i=>i.status==="in_progress"),s=t.filter(i=>i.status==="completed").length,n=t.length;if(n>0&&s===n)return{icon:"completed",activity:"All done",progress:`${n}/${n}`};const[r]=e;return r&&e.length===1?{icon:"in_progress",activity:r.activeForm,progress:`${s}/${n} done`}:e.length>1?{icon:"in_progress",activity:`${e.length} in progress`,progress:`${s}/${n} done`}:s>0?{icon:"pending",activity:`${n-s} pending`,progress:`${s}/${n} done`}:{icon:"pending",activity:`${n} todos`,progress:"not started"}}function Kr(t){const e=R.c(13),{todos:s}=t;if(s.length===0)return null;let n;e[0]!==s?(n=Br(s),e[0]=s,e[1]=n):n=e[1];const r=n;let i;e[2]!==r.icon?(i=o.jsx(Wr,{status:r.icon}),e[2]=r.icon,e[3]=i):i=e[3];const a=r.activity,l=r.progress;let c;e[4]!==s?(c=s.map(qr),e[4]=s,e[5]=c):c=e[5];let d;e[6]!==c?(d=o.jsx("ul",{"data-testid":"todos-list",className:"flex flex-col px-2 max-h-[40vh] overflow-y-auto",children:c}),e[6]=c,e[7]=d):d=e[7];let u;return e[8]!==r.activity||e[9]!==r.progress||e[10]!==i||e[11]!==d?(u=o.jsx(pe,{icon:i,label:a,count:l,defaultExpanded:!1,children:d}),e[8]=r.activity,e[9]=r.progress,e[10]=i,e[11]=d,e[12]=u):u=e[12],u}function qr(t,e){return o.jsx(Qr,{todo:t},e)}function Qr(t){const e=R.c(14),{todo:s}=t,n=s.status==="completed",i=s.status==="in_progress"?s.activeForm:s.content;let a;e[0]!==s.status?(a=o.jsx(Yr,{status:s.status}),e[0]=s.status,e[1]=a):a=e[1];const l=n&&"text-muted-foreground";let c;e[2]!==l?(c=O("relative text-sm leading-snug pt-px select-none",l),e[2]=l,e[3]=c):c=e[3];const d=n?"100%":"0%",u=n?"width 300ms ease 200ms":"width 150ms ease";let V;e[4]!==d||e[5]!==u?(V=o.jsx("span",{"aria-hidden":"true",style:{position:"absolute",left:0,top:"50%",height:"1px",background:"currentColor",width:d,transition:u}}),e[4]=d,e[5]=u,e[6]=V):V=e[6];let p;e[7]!==i||e[8]!==c||e[9]!==V?(p=o.jsxs("span",{className:c,children:[i,V]}),e[7]=i,e[8]=c,e[9]=V,e[10]=p):p=e[10];let f;return e[11]!==a||e[12]!==p?(f=o.jsxs("li",{className:"flex items-start gap-2.5 px-2 py-1.5 rounded-lg hover:bg-accent/50 transition-colors",children:[a,p]}),e[11]=a,e[12]=p,e[13]=f):f=e[13],f}function Yr(t){const e=R.c(4),{status:s}=t,n=s==="completed"?"true":void 0,r=s==="in_progress"?"true":void 0;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("svg",{viewBox:"0 0 21 21",children:o.jsx("path",{d:"M5,10.75 L8.5,14.25 L19.4,2.3 C18.8333333,1.43333333 18.0333333,1 17,1 L4,1 C2.35,1 1,2.35 1,4 L1,17 C1,18.65 2.35,20 4,20 L17,20 C18.65,20 20,18.65 20,17 L20,7.99769186"})}),e[0]=i):i=e[0];let a;return e[1]!==n||e[2]!==r?(a=o.jsx("div",{className:"todo-cb mt-0.5","data-checked":n,"data-progress":r,"aria-hidden":"true",children:i}),e[1]=n,e[2]=r,e[3]=a):a=e[3],a}function Wr(t){const e=R.c(13),{status:s}=t,n=K();if(s==="completed"){let a;e[0]!==n?(a=n("chat.todoStatus.completed"),e[0]=n,e[1]=a):a=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx("svg",{viewBox:"0 0 10 8",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",className:"w-2 h-2 text-primary-foreground",style:{strokeWidth:2},children:o.jsx("path",{d:"M1 4l2.5 2.5L9 1"})}),e[2]=l):l=e[2];let c;return e[3]!==a?(c=o.jsx("span",{"aria-label":a,className:"inline-flex items-center justify-center w-3.5 h-3.5 rounded-sm bg-primary",children:l}),e[3]=a,e[4]=c):c=e[4],c}if(s==="in_progress"){let a;e[5]!==n?(a=n("chat.todoStatus.inProgress"),e[5]=n,e[6]=a):a=e[6];let l;return e[7]!==a?(l=o.jsx("span",{"aria-label":a,className:"inline-block w-2 h-2 rounded-full bg-primary animate-pulse shrink-0"}),e[7]=a,e[8]=l):l=e[8],l}let r;e[9]!==n?(r=n("chat.todoStatus.pending"),e[9]=n,e[10]=r):r=e[10];let i;return e[11]!==r?(i=o.jsx("span",{"aria-label":r,className:"inline-block w-3.5 h-3.5 rounded-sm border-[1.5px] border-muted-foreground/50 shrink-0"}),e[11]=r,e[12]=i):i=e[12],i}const Gr={usd:[{dollars:10,labelKey:"credits.topUp.starter"},{dollars:20,labelKey:"credits.topUp.popular"},{dollars:100,labelKey:"credits.topUp.bestValue"}],brl:[{dollars:50,labelKey:"credits.topUp.starter"},{dollars:100,labelKey:"credits.topUp.popular"},{dollars:500,labelKey:"credits.topUp.bestValue"}]},Hr={"credits.topUp.starter":"starter","credits.topUp.popular":"popular","credits.topUp.bestValue":"best_value"};function Jr(t){const e=R.c(46),{source:s,onDone:n}=t,r=K(),i=_s(),[a]=Ne(),[l,c]=P.useState(a.language==="pt-BR"?"brl":"usd"),[d,u]=P.useState(""),[V,p]=P.useState(!1),f=l==="brl"?"R$":"$";let h;e[0]!==l||e[1]!==i?(h=async T=>{const{url:L}=await i.call("AI_PROVIDER_TOPUP_URL",{providerId:"deco",amountCents:T,currency:l});return L},e[0]=l,e[1]=i,e[2]=h):h=e[2];let m;e[3]!==n?(m=T=>{T&&window.open(T,"_blank","noopener,noreferrer"),n?.()},e[3]=n,e[4]=m):m=e[4];let g;e[5]!==r?(g=T=>{Ue.error(r("credits.topUp.failed",{message:T.message}))},e[5]=r,e[6]=g):g=e[6];let v;e[7]!==h||e[8]!==m||e[9]!==g?(v={mutationFn:h,onSuccess:m,onError:g},e[7]=h,e[8]=m,e[9]=g,e[10]=v):v=e[10];const{mutate:x,isPending:b}=Ms(v);let A;e[11]!==l||e[12]!==s||e[13]!==x?(A=(T,L)=>{se("credits_topup_clicked",{amount_cents:T,currency:l,tier_label:L,source:s}),x(T)},e[11]=l,e[12]=s,e[13]=x,e[14]=A):A=e[14];const j=A,y=parseFloat(d),k=!isNaN(y)&&y>=1;let w,S,N;e[15]===Symbol.for("react.memo_cache_sentinel")?(w=T=>{T&&c(T)},S=o.jsx(yt,{value:"usd",className:"h-8 px-3 text-xs",children:"USD"}),N=o.jsx(yt,{value:"brl",className:"h-8 px-3 text-xs",children:"BRL"}),e[15]=w,e[16]=S,e[17]=N):(w=e[15],S=e[16],N=e[17]);let I;e[18]!==l?(I=o.jsx("div",{className:"mb-4",children:o.jsxs(uo,{type:"single",variant:"outline",size:"sm",value:l,onValueChange:w,children:[S,N]})}),e[18]=l,e[19]=I):I=e[19];const C=Gr[l];let M;if(e[20]!==j||e[21]!==f||e[22]!==b||e[23]!==r||e[24]!==C){let T;e[26]!==j||e[27]!==f||e[28]!==b||e[29]!==r?(T=L=>{const{dollars:F,labelKey:W}=L;return o.jsxs("button",{type:"button",disabled:b,onClick:()=>j(F*100,Hr[W]??"preset"),className:O("relative flex flex-col items-center gap-1 py-5 rounded-xl border transition-all duration-150 cursor-pointer","disabled:opacity-50 disabled:cursor-wait","border-border hover:border-foreground/20 hover:bg-muted/30"),children:[o.jsxs("span",{className:"text-2xl font-semibold tabular-nums text-foreground",children:[f,F]}),o.jsx("span",{className:"text-xs text-muted-foreground",children:r(W)})]},F)},e[26]=j,e[27]=f,e[28]=b,e[29]=r,e[30]=T):T=e[30],M=C.map(T),e[20]=j,e[21]=f,e[22]=b,e[23]=r,e[24]=C,e[25]=M}else M=e[25];let D;e[31]!==M?(D=o.jsx("div",{className:"grid grid-cols-3 gap-2.5",children:M}),e[31]=M,e[32]=D):D=e[32];let E;e[33]!==j||e[34]!==f||e[35]!==d||e[36]!==y||e[37]!==k||e[38]!==b||e[39]!==V||e[40]!==r?(E=V?o.jsxs("div",{className:"flex gap-2 mt-3",children:[o.jsxs("div",{className:"relative flex-1",children:[o.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground select-none",children:f}),o.jsx(Ds,{type:"number",min:"1",step:"1",placeholder:r("credits.topUp.customPlaceholder"),value:d,onChange:T=>u(T.target.value),className:"h-10 text-sm pl-7",autoFocus:!0})]}),o.jsx(G,{className:"h-10",disabled:!k||b,onClick:()=>j(Math.round(y*100),"custom"),children:r(b?"credits.topUp.opening":"credits.topUp.add")})]}):o.jsx("button",{type:"button",className:"w-full mt-3 text-xs text-muted-foreground hover:text-foreground transition-colors py-1",onClick:()=>p(!0),children:r("credits.topUp.enterCustom")}),e[33]=j,e[34]=f,e[35]=d,e[36]=y,e[37]=k,e[38]=b,e[39]=V,e[40]=r,e[41]=E):E=e[41];let U;return e[42]!==D||e[43]!==E||e[44]!==I?(U=o.jsxs("div",{children:[I,D,E]}),e[42]=D,e[43]=E,e[44]=I,e[45]=U):U=e[45],U}const Zr=["chat.creditsExhaustedBanner.benefit1","chat.creditsExhaustedBanner.benefit2","chat.creditsExhaustedBanner.benefit3"];function Xr(t){const e=R.c(47),{onDismiss:s}=t,{org:n}=Ie(),r=at(),{decoKeyId:i}=co(),a=K(),l=$e("credits");let c,d;if(e[0]!==n.id?(c=()=>{se("credits_exhausted_shown",{organization_id:n.id})},d=[n.id],e[0]=n.id,e[1]=c,e[2]=d):(c=e[1],d=e[2]),P.useEffect(c,d),!l)return null;let u;e[3]!==s?(u=C=>!C&&s?.(),e[3]=s,e[4]=u):u=e[4];let V;e[5]===Symbol.for("react.memo_cache_sentinel")?(V=["radial-gradient(ellipse 40% 200% at -5% 100%, rgba(165,149,255,0.5) 0%, transparent 100%)","radial-gradient(ellipse 40% 200% at 105% -10%, rgba(208,236,26,0.45) 0%, transparent 100%)"],e[5]=V):V=e[5];let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx("div",{className:"absolute inset-x-0 top-0 h-36 pointer-events-none",style:{backgroundImage:V.join(", "),maskImage:"linear-gradient(to bottom, black 0%, transparent 100%)",WebkitMaskImage:"linear-gradient(to bottom, black 0%, transparent 100%)"}}),e[6]=p):p=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=o.jsx("img",{src:"/logos/deco%20logo.svg",alt:"Deco AI Gateway",className:"size-9 rounded-lg object-contain dark:bg-white dark:p-0.5"}),e[7]=f):f=e[7];let h;e[8]!==a?(h=a("chat.creditsExhaustedBanner.title"),e[8]=a,e[9]=h):h=e[9];let m;e[10]!==h?(m=o.jsx(Rs,{className:"text-xl font-semibold tracking-tight",children:h}),e[10]=h,e[11]=m):m=e[11];let g;e[12]!==a?(g=a("chat.creditsExhaustedBanner.description"),e[12]=a,e[13]=g):g=e[13];let v;e[14]!==g?(v=o.jsx(Es,{className:"mt-1.5 text-sm leading-relaxed",children:g}),e[14]=g,e[15]=v):v=e[15];let x;e[16]!==v||e[17]!==m?(x=o.jsxs("div",{className:"relative px-8 pt-8 pb-2 overflow-hidden",children:[p,o.jsxs(Ps,{className:"relative gap-4",children:[f,o.jsxs("div",{children:[m,v]})]})]}),e[16]=v,e[17]=m,e[18]=x):x=e[18];let b;e[19]!==i||e[20]!==s||e[21]!==a?(b=i&&o.jsxs("div",{className:"px-8 pt-5 pb-6",children:[o.jsx("div",{className:"rounded-xl border border-border p-5",children:o.jsx(Jr,{source:"exhausted_banner",onDone:s})}),o.jsx("div",{className:"mt-5 rounded-xl bg-muted/25 border border-border/50 p-4 space-y-3",children:Zr.map(C=>o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"flex items-center justify-center size-5 rounded-full bg-success/15 shrink-0",children:o.jsx(lt,{size:12,className:"text-success"})}),o.jsx("span",{className:"text-sm text-foreground/80",children:a(C)})]},C))})]}),e[19]=i,e[20]=s,e[21]=a,e[22]=b):b=e[22];let A;e[23]!==a?(A=a("chat.creditsExhaustedBanner.dismiss"),e[23]=a,e[24]=A):A=e[24];let j;e[25]!==s||e[26]!==A?(j=o.jsx(G,{variant:"ghost",size:"sm",onClick:s,children:A}),e[25]=s,e[26]=A,e[27]=j):j=e[27];let y;e[28]!==r||e[29]!==s||e[30]!==n.slug?(y=()=>{r({to:"/$org/settings/ai-providers",params:{org:n.slug}}),s?.()},e[28]=r,e[29]=s,e[30]=n.slug,e[31]=y):y=e[31];let k;e[32]!==a?(k=a("chat.creditsExhaustedBanner.manageProviders"),e[32]=a,e[33]=k):k=e[33];let w;e[34]!==y||e[35]!==k?(w=o.jsx("button",{type:"button",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",onClick:y,children:k}),e[34]=y,e[35]=k,e[36]=w):w=e[36];let S;e[37]!==j||e[38]!==w?(S=o.jsxs("div",{className:"px-8 py-4 border-t border-border bg-muted/30 flex items-center justify-between",children:[j,w]}),e[37]=j,e[38]=w,e[39]=S):S=e[39];let N;e[40]!==x||e[41]!==b||e[42]!==S?(N=o.jsxs(Us,{className:"sm:max-w-[520px] gap-0 p-0 overflow-hidden",onOpenAutoFocus:ei,children:[x,b,S]}),e[40]=x,e[41]=b,e[42]=S,e[43]=N):N=e[43];let I;return e[44]!==N||e[45]!==u?(I=o.jsx(Ls,{open:!0,onOpenChange:u,children:N}),e[44]=N,e[45]=u,e[46]=I):I=e[46],I}function ei(t){return t.preventDefault()}const ti={trial_exhausted:{label:"chat.subscriptionLimit.trialLabel",title:"chat.subscriptionLimit.trialTitle"},monthly_exhausted:{label:"chat.subscriptionLimit.monthlyLabel",title:"chat.subscriptionLimit.monthlyTitle"},runs_exhausted:{label:"chat.subscriptionLimit.runsLabel",title:"chat.subscriptionLimit.runsTitle"}};function si(t){const e=R.c(16),{kind:s,onDismiss:n,onSubscribe:r}=t,i=K(),{label:a,title:l}=ti[s];let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx(Vt,{size:14}),e[0]=c):c=e[0];let d;e[1]!==a||e[2]!==i?(d=i(a),e[1]=a,e[2]=i,e[3]=d):d=e[3];let u;e[4]!==i||e[5]!==l?(u=i(l),e[4]=i,e[5]=l,e[6]=u):u=e[6];let V;e[7]!==s||e[8]!==r||e[9]!==i?(V=s==="trial_exhausted"?o.jsx(G,{size:"sm",onClick:r,className:"h-7 text-xs",children:i("chat.subscriptionLimit.subscribeButton")}):void 0,e[7]=s,e[8]=r,e[9]=i,e[10]=V):V=e[10];let p;return e[11]!==n||e[12]!==d||e[13]!==u||e[14]!==V?(p=o.jsx(pe,{icon:c,label:d,title:u,defaultExpanded:!0,variant:"warning",onClose:n,footerRight:V}),e[11]=n,e[12]=d,e[13]=u,e[14]=V,e[15]=p):p=e[15],p}const ni={ai_budget_exhausted:{label:"chat.planRefused.budgetLabel",title:"chat.planRefused.budgetTitle"},feature_not_in_plan:{label:"chat.planRefused.featureLabel",title:"chat.planRefused.featureTitle"}};function _t(t){const e=R.c(21),{kind:s,onDismiss:n}=t,r=K(),i=at(),{org:a}=Ie(),{label:l,title:c}=ni[s];let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(Vt,{size:14}),e[0]=d):d=e[0];let u;e[1]!==l||e[2]!==r?(u=r(l),e[1]=l,e[2]=r,e[3]=u):u=e[3];let V;e[4]!==r||e[5]!==c?(V=r(c),e[4]=r,e[5]=c,e[6]=V):V=e[6];let p;e[7]!==i||e[8]!==n||e[9]!==a.slug?(p=()=>{i({to:"/$org/settings/ai-providers",params:{org:a.slug}}),n()},e[7]=i,e[8]=n,e[9]=a.slug,e[10]=p):p=e[10];let f;e[11]!==r?(f=r("chat.planRefused.seePlans"),e[11]=r,e[12]=f):f=e[12];let h;e[13]!==p||e[14]!==f?(h=o.jsx(G,{size:"sm",className:"h-7 text-xs",onClick:p,children:f}),e[13]=p,e[14]=f,e[15]=h):h=e[15];let m;return e[16]!==n||e[17]!==u||e[18]!==V||e[19]!==h?(m=o.jsx(pe,{icon:d,label:u,title:V,defaultExpanded:!0,variant:"warning",onClose:n,footerRight:h}),e[16]=n,e[17]=u,e[18]=V,e[19]=h,e[20]=m):m=e[20],m}function vs(t){const e=oi(t);if(e!==null){const d=vs(e);return{summary:d.summary,rawDetails:d.rawDetails??t}}const s=t.trim(),n=s.startsWith("<")&&/<[a-z][\s\S]*>/i.test(s),r=/cloudflare|cf-[a-z-]+|error[\s_-]?code[\s_-]?5\d\d/i.test(s),i=/failed to fetch|networkerror|load failed|offline/i.test(s),a=/timeout|timed out|aborted|deadline/i.test(s),l=s.length>240,c=/sandbox failed to start(?::\s*(.+))?/is.exec(s);if(c){const d=c[1]?.trim().replace(/\.$/,"");return{summary:d?`Your sandbox didn't finish starting up (${d}). Try again.`:"Your sandbox didn't finish starting up. Try again.",rawDetails:t}}return r||n&&l?{summary:"Our servers are having a moment. Try sending again in a few seconds.",rawDetails:t}:i?{summary:"Lost connection. Check your network and try again.",rawDetails:t}:a?{summary:"That took longer than expected. Try again.",rawDetails:t}:n||l?{summary:"Something unexpected came back from the server. Try again.",rawDetails:t}:{summary:t,rawDetails:null}}function oi(t){const e=t.trim();if(!e.startsWith("{"))return null;let s;try{s=JSON.parse(e)}catch{return null}if(!s||typeof s!="object")return null;const{error:n,message:r}=s,i=typeof n=="string"?n:r;return typeof i=="string"&&i.trim()&&!i.trim().startsWith("{")?i:null}const ri={length:"chat.highlight.warningDescriptionLength","content-filter":"chat.highlight.warningDescriptionContentFilter","tool-calls":"chat.highlight.warningDescriptionToolCalls"};function Ye(t){const e=R.c(29),s=K(),{variant:n,onDismiss:r}=t,i=n==="error";let a;e[0]!==i||e[1]!==s?(a=s(i?"chat.highlight.errorOccurred":"chat.highlight.responseIncomplete"),e[0]=i,e[1]=s,e[2]=a):a=e[2];const l=a,c=i?Jn:zs;let d;e[3]!==t.error||e[4]!==t.finishReason||e[5]!==t.variant||e[6]!==s?(d=t.variant==="error"?t.error.message:(()=>{const x=ri[t.finishReason];return x?s(x):s("chat.highlight.responseStoppedUnexpectedly",{reason:t.finishReason})})(),e[3]=t.error,e[4]=t.finishReason,e[5]=t.variant,e[6]=s,e[7]=d):d=e[7];const u=d;let V;e[8]!==i||e[9]!==u?(V=i?vs(u):{summary:u,rawDetails:null},e[8]=i,e[9]=u,e[10]=V):V=e[10];const{summary:p,rawDetails:f}=V;let h;e[11]!==c?(h=o.jsx(c,{size:14}),e[11]=c,e[12]=h):h=e[12];let m;e[13]!==i||e[14]!==t.onContinue||e[15]!==t.onFixInChat||e[16]!==s?(m=i?o.jsx(G,{size:"sm",variant:"outline",onClick:t.onFixInChat,className:"h-7 text-xs",children:s("chat.highlight.fixInChat")}):o.jsx(G,{size:"sm",variant:"outline",onClick:t.onContinue,className:"h-7 text-xs",children:s("chat.highlight.continue")}),e[13]=i,e[14]=t.onContinue,e[15]=t.onFixInChat,e[16]=s,e[17]=m):m=e[17];let g;e[18]!==f||e[19]!==s?(g=f?o.jsxs("details",{className:"group mx-4",children:[o.jsxs("summary",{className:"flex cursor-pointer list-none items-center gap-1.5 text-xs text-muted-foreground transition-colors hover:text-foreground [&::-webkit-details-marker]:hidden",children:[o.jsx("svg",{"aria-hidden":"true",className:"size-3 transition-transform group-open:rotate-90",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"m4.5 3 3 3-3 3"})}),o.jsx("span",{className:"group-open:hidden",children:s("chat.highlight.showTechnicalDetails")}),o.jsx("span",{className:"hidden group-open:inline",children:s("chat.highlight.hideTechnicalDetails")})]}),o.jsxs("div",{className:"relative mt-2",children:[o.jsx("button",{type:"button",onClick:()=>{navigator.clipboard.writeText(f).then(()=>Ue.success(s("chat.highlight.copiedToClipboard"))).catch(()=>Ue.error(s("chat.highlight.couldNotCopy")))},"aria-label":s("chat.highlight.copyErrorDetails"),title:s("chat.highlight.copy"),className:"absolute right-1.5 top-1.5 z-10 flex h-6 w-6 items-center justify-center rounded-lg bg-background/80 text-muted-foreground backdrop-blur-sm transition-colors hover:bg-background hover:text-foreground",children:o.jsx(Zn,{className:"size-3.5"})}),o.jsx("pre",{className:"max-h-40 overflow-auto rounded-md border border-border/60 bg-background px-3 py-2 pr-8 font-mono text-xs text-foreground/80 whitespace-pre-wrap break-all",children:f})]})]}):null,e[18]=f,e[19]=s,e[20]=g):g=e[20];let v;return e[21]!==l||e[22]!==r||e[23]!==p||e[24]!==h||e[25]!==m||e[26]!==g||e[27]!==n?(v=o.jsx(pe,{icon:h,label:l,title:p,defaultExpanded:!0,variant:n,onClose:r,footerRight:m,children:g}),e[21]=l,e[22]=r,e[23]=p,e[24]=h,e[25]=m,e[26]=g,e[27]=n,e[28]=v):v=e[28],v}function Be(t){const e=R.c(78);let s;e[0]!==t?(s=t===void 0?{}:t,e[0]=t,e[1]=s):s=e[1];const{inline:n,voiceMode:r}=s,i=n===void 0?!1:n,a=r===void 0?!1:r,l=K(),{error:c,clearError:d,finishReason:u,clearFinishReason:V,messages:p,isStreaming:f,submit:h,sendMessage:m}=Oe(),[g,v]=Ne(),{virtualMcpId:x,createTaskWithMessage:b}=Ge(),{chatMode:A,setChatMode:j,simpleModeTier:y}=He(),k=$e("credits"),{mutate:w}=go("ORGANIZATION_BILLING_CHECKOUT_START","taskBoard.subscriptionPaywall.checkoutError");let S;e[2]!==w?(S=()=>w(),e[2]=w,e[3]=S):S=e[3];const N=S;let I;e[4]!==A||e[5]!==y||e[6]!==x||e[7]!==a?(I=re=>({...a?{voiceMode:!0}:{},tier:y,mode:A,toolApprovalLevel:re,agent:x?{id:x}:void 0}),e[4]=A,e[5]=y,e[6]=x,e[7]=a,e[8]=I):I=e[8];const C=I;let M;e[9]!==g.toolApprovalLevel?(M=g.toolApprovalLevel??Fs(),e[9]=g.toolApprovalLevel,e[10]=M):M=e[10];const D=M,E=p.at(-1),U=E?.role==="assistant"?E.parts:[],T=U.filter(Vi),L=U.filter(Ft),F=ls(U),W=is(U);let $;e[11]!==c||e[12]!==m||e[13]!==l?($=()=>{if(c){const ae={type:"doc",content:[{type:"paragraph",content:[{type:"text",text:l("chat.highlight.fixInChatMessage",{error:c.message})}]}]};m(ae)}},e[11]=c,e[12]=m,e[13]=l,e[14]=$):$=e[14];const z=$;let Q;e[15]!==m||e[16]!==l?(Q=()=>{const re={type:"doc",content:[{type:"paragraph",content:[{type:"text",text:l("chat.highlight.pleaseContinue")}]}]};m(re)},e[15]=m,e[16]=l,e[17]=Q):Q=e[17];const ee=Q;let te;e[18]!==C||e[19]!==D||e[20]!==h?(te=(re,ae)=>{h({kind:"toolOutput",toolCallId:re.toolCallId,output:{response:ae}},C(D))},e[18]=C,e[19]=D,e[20]=h,e[21]=te):te=e[21];const H=te;let oe;e[22]!==C||e[23]!==D||e[24]!==h?(oe=(re,ae)=>{h({kind:"toolOutput",toolCallId:re.toolCallId,output:{accepted:ae}},C(D))},e[22]=C,e[23]=D,e[24]=h,e[25]=oe):oe=e[25];const _=oe;let B;e[26]!==b||e[27]!==g||e[28]!==j||e[29]!==v||e[30]!==l||e[31]!==x?(B=re=>{j("default"),v({...g,toolApprovalLevel:"auto"}),b({virtualMcpId:x,message:{parts:[{type:"text",text:l("chat.highlight.implementPlanMessage",{plan:re})}]}})},e[26]=b,e[27]=g,e[28]=j,e[29]=v,e[30]=l,e[31]=x,e[32]=B):B=e[32];const J=B,Z=li;let X;e[33]!==C||e[34]!==h?(X=(re,ae,Me,Ae)=>{h({kind:"approval",approvalId:re,approved:ae,...Me?{reason:Me}:{}},C(Ae))},e[33]=C,e[34]=h,e[35]=X):X=e[35];const ue=X,Y=Vs();if(Y.isCreditExhausted){let re;return e[36]!==k||e[37]!==d||e[38]!==i?(re=k?o.jsx(Xr,{onDismiss:d}):o.jsx("div",{className:O(!i&&"absolute bottom-full left-0 right-0"),children:o.jsx(_t,{kind:"ai_budget_exhausted",onDismiss:d})}),e[36]=k,e[37]=d,e[38]=i,e[39]=re):re=e[39],re}const{showError:le,showWarning:Ve,hasApprovals:ce}=Y,ke=T.map(ai).join("|"),Ke=as(F)?.toolCallId??"",me=W.map(ii).join("|"),Te=!i&&"absolute bottom-full left-0 right-0";let ge;e[40]!==Te?(ge=O(Te),e[40]=Te,e[41]=ge):ge=e[41];let de;e[42]!==Y.todos?(de=o.jsx(Kr,{todos:Y.todos}),e[42]=Y.todos,e[43]=de):de=e[43];let xe;e[44]!==d||e[45]!==Y.subscriptionErrorKind||e[46]!==N?(xe=Y.subscriptionErrorKind&&o.jsx(si,{kind:Y.subscriptionErrorKind,onDismiss:d,onSubscribe:N}),e[44]=d,e[45]=Y.subscriptionErrorKind,e[46]=N,e[47]=xe):xe=e[47];let we;e[48]!==d||e[49]!==Y.planRefusal?(we=Y.planRefusal&&o.jsx(_t,{kind:Y.planRefusal,onDismiss:d}),e[48]=d,e[49]=Y.planRefusal,e[50]=we):we=e[50];let fe;e[51]!==d||e[52]!==c||e[53]!==z||e[54]!==le?(fe=le&&o.jsx(Ye,{variant:"error",error:c,onDismiss:d,onFixInChat:z}),e[51]=d,e[52]=c,e[53]=z,e[54]=le,e[55]=fe):fe=e[55];let ve;e[56]!==V||e[57]!==u||e[58]!==ee||e[59]!==Ve?(ve=Ve&&o.jsx(Ye,{variant:"warning",finishReason:u,onDismiss:V,onContinue:ee}),e[56]=V,e[57]=u,e[58]=ee,e[59]=Ve,e[60]=ve):ve=e[60];const De=ce&&o.jsx(wr,{approvals:W,isStreaming:f,onRespond:ue},me),Re=Y.hasPlans&&o.jsx(Cr,{plans:F,isStreaming:f,onApprove:J,onDismiss:Z},Ke),_e=Y.hasTaskSuggestion&&o.jsx($r,{parts:L,isStreaming:f,onRespond:_},L.at(-1)?.toolCallId??"");let be;e[61]!==Y.isWaitingForUserInput||e[62]!==H||e[63]!==f||e[64]!==ke||e[65]!==T?(be=Y.isWaitingForUserInput&&o.jsx(xs,{userAskParts:T,isStreaming:f,onSubmit:H},ke),e[61]=Y.isWaitingForUserInput,e[62]=H,e[63]=f,e[64]=ke,e[65]=T,e[66]=be):be=e[66];let Se;return e[67]!==ge||e[68]!==de||e[69]!==xe||e[70]!==we||e[71]!==fe||e[72]!==ve||e[73]!==De||e[74]!==Re||e[75]!==_e||e[76]!==be?(Se=o.jsxs("div",{className:ge,children:[de,xe,we,fe,ve,De,Re,_e,be]}),e[67]=ge,e[68]=de,e[69]=xe,e[70]=we,e[71]=fe,e[72]=ve,e[73]=De,e[74]=Re,e[75]=_e,e[76]=be,e[77]=Se):Se=e[77],Se}function ii(t){return t.approvalId}function ai(t){return t.toolCallId}function li(){document.querySelector("[data-chat-input]")?.focus()}function Vi(t){return t.type==="tool-user_ask"}Be.Error=function(e){return o.jsx(Ye,{variant:"error",error:e.error,onDismiss:e.onDismiss,onFixInChat:e.onFixInChat})};Be.Warning=function(e){return o.jsx(Ye,{variant:"warning",finishReason:e.finishReason,onDismiss:e.onDismiss,onContinue:e.onContinue})};Be.UserAskQuestion=xs;function bs(t){const e=R.c(20),{taskId:s}=t,n=K(),r=Dn(s),i=Rn(r),a=En(),{stop:l,removeLocalMessage:c}=Oe();if(i.length===0)return null;let d;e[0]!==n?(d=n("chat.queueTray.sendNow"),e[0]=n,e[1]=d):d=e[1];let u;e[2]!==l?(u=()=>{l()},e[2]=l,e[3]=u):u=e[3];let V;e[4]===Symbol.for("react.memo_cache_sentinel")?(V=o.jsx(Kt,{size:14}),e[4]=V):V=e[4];let p;e[5]!==d||e[6]!==u?(p=o.jsx(Ze,{asChild:!0,children:o.jsx(G,{type:"button",variant:"ghost",size:"icon-sm","aria-label":d,onClick:u,children:V})}),e[5]=d,e[6]=u,e[7]=p):p=e[7];let f;e[8]!==n?(f=n("chat.queueTray.sendNow"),e[8]=n,e[9]=f):f=e[9];let h;e[10]!==f?(h=o.jsx(Xe,{side:"top",children:o.jsx("p",{className:"text-xs",children:f})}),e[10]=f,e[11]=h):h=e[11];let m;e[12]!==p||e[13]!==h?(m=o.jsxs(et,{delayDuration:400,children:[p,h]}),e[12]=p,e[13]=h,e[14]=m):m=e[14];let g;return e[15]!==a||e[16]!==c||e[17]!==n||e[18]!==s?(g=(v,x)=>o.jsxs("div",{className:"group/queuerow flex items-center gap-2 px-3 py-1.5",children:[o.jsx("span",{className:"flex size-[18px] shrink-0 items-center justify-center rounded-full bg-muted text-[10px] font-semibold text-muted-foreground dark:bg-background",children:x+1}),o.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:v.text}),o.jsx("div",{className:"flex shrink-0 items-center gap-1 opacity-0 transition-opacity focus-within:opacity-100 group-hover/queuerow:opacity-100",children:o.jsx(G,{type:"button",variant:"ghost",size:"icon-sm",title:n("chat.queueTray.removeFromQueue"),"aria-label":n("chat.queueTray.removeFromQueue"),onClick:()=>{a.cancel(s,v.messageId).then(b=>{b&&(Pn(s,v.messageId),c(v.messageId))})},children:o.jsx(Ot,{className:"size-3.5"})})})]},v.messageId),e[15]=a,e[16]=c,e[17]=n,e[18]=s,e[19]=g):g=e[19],o.jsxs("div",{className:"mb-1 overflow-hidden rounded-2xl border border-border bg-card dark:bg-muted",children:[o.jsxs("div",{className:"flex items-center justify-between gap-2 border-b border-border py-1.5 pr-2 pl-3 text-xs text-muted-foreground",children:[o.jsx("span",{children:n(i.length===1?"chat.queueTray.queuedMessage":"chat.queueTray.queuedMessages",{count:i.length})}),m]}),i.map(g)]})}function ci(t){return["openai-compatible","openrouter","deco"].includes(t)}function di(t,e){return ci(t)&&ui(e)!==null}function ui(t){const e=t.replace(/^openai\//,"");return/^(gpt-\d|o[134](?:-|$))/.test(e)?e:null}const pi={anthropic:/^claude-/,openrouter:/^anthropic\/claude-/,deco:/^anthropic\/claude-/};function fi(t,e){return pi[t]?.test(e)??!1}function hi(t){return Io(t)&&fi(t.providerId,t.modelId)}function mi(t,e){return t?{modelId:t.modelId,title:t.title??t.modelId,keyId:t.keyId,providerId:e,description:null,logo:null,capabilities:[],limits:null,costs:null}:null}const gi={fast:"chat.tierTrigger.tierFast",smart:"chat.tierTrigger.tierSmart",thinking:"chat.tierTrigger.tierThinking"};function xi(t){const e=R.c(32),{tier:s,orgSlot:n,userSlot:r,autoSlot:i,filterModels:a,onPick:l,onReset:c,onClose:d}=t,u=K(),V=ns(),p=new Set(V.map(vi)),f=Un([r,n,i],p),h=f?.keyId??null,[m,g]=P.useState(h??V[0]?.id??null),v=V.some(F=>F.id===m)?m:h??V[0]?.id??null,x=v?V.find(F=>F.id===v):null,b="flex h-[70vh] max-h-[460px] w-full flex-col",A=gi[s];let j;e[0]!==u||e[1]!==A?(j=u(A),e[0]=u,e[1]=A,e[2]=j):j=e[2];let y;e[3]!==j?(y=o.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:j}),e[3]=j,e[4]=y):y=e[4];let k;e[5]!==c||e[6]!==u||e[7]!==r?(k=r&&o.jsx("button",{type:"button",onClick:c,className:"text-xs text-muted-foreground hover:text-foreground px-2 py-1 rounded-lg hover:bg-accent cursor-pointer",children:u("chat.modelPreferences.reset")}),e[5]=c,e[6]=u,e[7]=r,e[8]=k):k=e[8];let w;e[9]!==y||e[10]!==k?(w=o.jsxs("div",{className:"flex items-center justify-between px-3 h-8 shrink-0",children:[y,k]}),e[9]=y,e[10]=k,e[11]=w):w=e[11];const S="flex-1 min-h-0",N=P.Suspense;let I;e[12]===Symbol.for("react.memo_cache_sentinel")?(I=o.jsx(vo,{}),e[12]=I):I=e[12];const C=xo,M=!0,D=mi(h?f:null,x?.providerId??"deco");let E;e[13]!==v||e[14]!==l||e[15]!==g?(E=F=>{const W=F.keyId??v??"";g(W),l({keyId:W,modelId:F.modelId,title:F.title})},e[13]=v,e[14]=l,e[15]=g,e[16]=E):E=e[16];let U;e[17]!==C||e[18]!==v||e[19]!==a||e[20]!==d||e[21]!==g||e[22]!==D||e[23]!==E?(U=o.jsx(C,{compact:M,filterModels:a,onClose:d,credentialId:v,onCredentialChange:g,selectedModel:D,onModelChange:E}),e[17]=C,e[18]=v,e[19]=a,e[20]=d,e[21]=g,e[22]=D,e[23]=E,e[24]=U):U=e[24];let T;e[25]!==N||e[26]!==U||e[27]!==I?(T=o.jsx("div",{className:S,children:o.jsx(N,{fallback:I,children:U})}),e[25]=N,e[26]=U,e[27]=I,e[28]=T):T=e[28];let L;return e[29]!==T||e[30]!==w?(L=o.jsxs("div",{className:b,children:[w,T]}),e[29]=T,e[30]=w,e[31]=L):L=e[31],L}function vi(t){return t.id}const bi=["fast","smart","thinking"];function As(t){return{fast:t("chat.tierTrigger.tierFast"),smart:t("chat.tierTrigger.tierSmart"),thinking:t("chat.tierTrigger.tierThinking")}}const Mt={fast:"chat.agentModels.quickerResponses",smart:"chat.agentModels.balancedQuality",thinking:"chat.agentModels.deeperReasoning"};function Ai(t){const e=R.c(28),{tier:s,pillIcon:n,groups:r}=t,i=K();let a;e[0]!==i?(a=As(i),e[0]=i,e[1]=a):a=e[1];const l=a,[c,d]=P.useState(!1);let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=w=>{w.onSelect(),d(!1)},e[2]=u):u=e[2];const V=u,p=l[s];let f;e[3]===Symbol.for("react.memo_cache_sentinel")?(f=O("text-muted-foreground hover:text-foreground transition-[gap] duration-200 shrink min-w-0","gap-0 @[320px]/chat-bottom:gap-1.5"),e[3]=f):f=e[3];let h;e[4]===Symbol.for("react.memo_cache_sentinel")?(h=O("min-w-0 truncate transition-[max-width,opacity] duration-200 ease-out max-w-0 opacity-0","@[320px]/chat-bottom:max-w-24 @[320px]/chat-bottom:opacity-100"),e[4]=h):h=e[4];const m=l[s];let g;e[5]!==m?(g=o.jsx("span",{className:h,children:m}),e[5]=m,e[6]=g):g=e[6];let v;e[7]===Symbol.for("react.memo_cache_sentinel")?(v=o.jsx(Zt,{size:12,className:"opacity-60 hidden @[320px]/chat-bottom:inline-block"}),e[7]=v):v=e[7];let x;e[8]!==n||e[9]!==p||e[10]!==g?(x=o.jsx(Ze,{asChild:!0,children:o.jsx("span",{className:"inline-flex min-w-0 shrink",children:o.jsx(Xt,{asChild:!0,children:o.jsxs(G,{type:"button",variant:"ghost",size:"default","aria-label":p,className:f,children:[n,g,v]})})})}),e[8]=n,e[9]=p,e[10]=g,e[11]=x):x=e[11];let b;e[12]!==p?(b=o.jsx(Xe,{children:p}),e[12]=p,e[13]=b):b=e[13];let A;e[14]!==x||e[15]!==b?(A=o.jsxs(et,{children:[x,b]}),e[14]=x,e[15]=b,e[16]=A):A=e[16];let j;if(e[17]!==r||e[18]!==i){let w;e[20]!==i?(w=S=>o.jsx("div",{className:"flex flex-col",children:S.rows.map(N=>o.jsxs("div",{className:"group/tier-row relative flex items-stretch rounded-lg hover:bg-muted",children:[o.jsxs("button",{type:"button",role:"menuitem","aria-label":N.title,onClick:()=>V(N),className:O("flex flex-1 min-w-0 items-start gap-2 px-2 py-1.5 text-left",N.modelOverride&&"pr-7 [@media(hover:hover)]:pr-2"),children:[N.icon&&o.jsx("span",{className:"shrink-0 text-muted-foreground mt-0.5",children:N.icon}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("div",{className:"text-sm",children:N.title}),N.subtitle&&o.jsx("div",{className:"text-xs text-muted-foreground",children:N.subtitle})]}),N.active&&o.jsx("span",{title:i("chat.tierTrigger.selected"),children:o.jsx(lt,{size:14,className:"text-foreground mt-0.5"})})]}),N.modelOverride&&o.jsx(ji,{label:N.title,render:N.modelOverride})]},N.key))},S.key),e[20]=i,e[21]=w):w=e[21],j=r.map(w),e[17]=r,e[18]=i,e[19]=j}else j=e[19];let y;e[22]!==j?(y=o.jsx(es,{align:"end",className:"p-1 w-64",onOpenAutoFocus:yi,children:o.jsx("div",{role:"menu",className:"flex flex-col",children:j})}),e[22]=j,e[23]=y):y=e[23];let k;return e[24]!==c||e[25]!==A||e[26]!==y?(k=o.jsxs(ts,{open:c,onOpenChange:d,children:[A,y]}),e[24]=c,e[25]=A,e[26]=y,e[27]=k):k=e[27],k}function yi(t){return t.preventDefault()}function ji(t){const e=R.c(38),{label:s,render:n}=t,r=K(),i=ss(),[a,l]=P.useState(!1);let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=()=>l(!1),e[0]=c):c=e[0];const d=c;let u;e[1]!==s||e[2]!==r?(u=r("chat.modelPreferences.customizeModel",{tier:s}),e[1]=s,e[2]=r,e[3]=u):u=e[3];const V=a&&"opacity-100";let p;e[4]!==V?(p=O("absolute right-1 top-1/2 -translate-y-1/2 flex items-center justify-center","size-6 rounded-lg bg-background border border-border/60 shadow-sm","text-muted-foreground hover:text-foreground","opacity-100 [@media(hover:hover)]:opacity-0","[@media(hover:hover)]:group-hover/tier-row:opacity-100","[@media(hover:hover)]:group-focus-within/tier-row:opacity-100",V),e[4]=V,e[5]=p):p=e[5];let f;e[6]===Symbol.for("react.memo_cache_sentinel")?(f=o.jsx(qn,{size:14}),e[6]=f):f=e[6];let h;e[7]!==u||e[8]!==p?(h=o.jsx("button",{type:"button","aria-label":u,className:p,children:f}),e[7]=u,e[8]=p,e[9]=h):h=e[9];const m=h;if(i){let A;e[10]!==m?(A=o.jsx(yo,{asChild:!0,children:m}),e[10]=m,e[11]=A):A=e[11];let j;e[12]!==s||e[13]!==r?(j=r("chat.modelPreferences.customizeModel",{tier:s}),e[12]=s,e[13]=r,e[14]=j):j=e[14];let y;e[15]!==j?(y=o.jsx(jo,{className:"sr-only",children:j}),e[15]=j,e[16]=y):y=e[16];let k;e[17]!==a||e[18]!==n?(k=a&&n(d),e[17]=a,e[18]=n,e[19]=k):k=e[19];let w;e[20]!==k||e[21]!==y?(w=o.jsxs(ko,{className:"p-0 flex flex-col max-h-[95vh]",children:[y,k]}),e[20]=k,e[21]=y,e[22]=w):w=e[22];let S;return e[23]!==a||e[24]!==w||e[25]!==A?(S=o.jsxs(wo,{open:a,onOpenChange:l,children:[A,w]}),e[23]=a,e[24]=w,e[25]=A,e[26]=S):S=e[26],S}let g;e[27]!==m?(g=o.jsx(Xt,{asChild:!0,children:m}),e[27]=m,e[28]=g):g=e[28];let v;e[29]!==a||e[30]!==n?(v=a&&n(d),e[29]=a,e[30]=n,e[31]=v):v=e[31];let x;e[32]!==v?(x=o.jsx(es,{side:"right",align:"start",collisionPadding:12,className:"w-[min(22rem,calc(100vw-2rem))] p-0 overflow-hidden",children:v}),e[32]=v,e[33]=x):x=e[33];let b;return e[34]!==a||e[35]!==g||e[36]!==x?(b=o.jsxs(ts,{open:a,onOpenChange:l,children:[g,x]}),e[34]=a,e[35]=g,e[36]=x,e[37]=b):b=e[37],b}function Dt(t){return t==="fast"?o.jsx(Vt,{size:16}):t==="thinking"?o.jsx(Kn,{size:16}):o.jsx(So,{size:16})}function ki(t){const e=R.c(13),s=zn();let n;e[0]!==t||e[1]!==s.tiers?(n=d=>{const u=s.tiers[d];return u?u.title??u.modelId:t.chat[d]?.title},e[0]=t,e[1]=s.tiers,e[2]=n):n=e[2];const r=n;let i;e[3]!==r?(i=r("fast"),e[3]=r,e[4]=i):i=e[4];let a;e[5]!==r?(a=r("smart"),e[5]=r,e[6]=a):a=e[6];let l;e[7]!==r?(l=r("thinking"),e[7]=r,e[8]=l):l=e[8];let c;return e[9]!==i||e[10]!==a||e[11]!==l?(c={fast:i,smart:a,thinking:l},e[9]=i,e[10]=a,e[11]=l,e[12]=c):c=e[12],c}function wi(){const t=R.c(25),e=K(),{simpleModeTier:s,setSimpleModeTier:n}=He(),r=Co(),i=ns(),a=To(i),l=ki(a),{data:c,error:d}=Ln();let u;t[0]!==c?(u=c===void 0?{tiers:{}}:c,t[0]=c,t[1]=u):u=t[1];const V=u,p=Fn(),f=We()?.lockedHarness,h=f==="claude-code",m=$e("model_choice"),g=ao(),v=lo();if(!g||!m)return null;let x,b;if(t[2]!==a||t[3]!==v||t[4]!==h||t[5]!==f||t[6]!==r||t[7]!==n||t[8]!==e||t[9]!==s||t[10]!==l||t[11]!==p||t[12]!==V||t[13]!==d){const w=As(e);x="decopilot",b=bi.map(S=>{const N=l[S],I=V.tiers[S];return{key:`decopilot-${S}`,icon:Dt(S),title:w[S],subtitle:v?N??e(Mt[S]):e(Mt[S]),active:s===S,onSelect:()=>n(S),modelOverride:v?C=>o.jsxs(o.Fragment,{children:[d&&o.jsx("div",{className:"text-xs text-destructive p-3 pb-0",children:e("chat.modelPreferences.loadFailed")}),o.jsx(xi,{tier:S,orgSlot:r.tiers[S],userSlot:I,autoSlot:a.chat[S],filterModels:f==="codex"?Si:h?hi:void 0,onClose:C,onPick:M=>p.mutate({tier:S,slot:M}),onReset:()=>p.mutate({tier:S,slot:null})},`${S}:${I?.keyId??"org"}:${I?.modelId??""}`)]}):void 0}}),t[2]=a,t[3]=v,t[4]=h,t[5]=f,t[6]=r,t[7]=n,t[8]=e,t[9]=s,t[10]=l,t[11]=p,t[12]=V,t[13]=d,t[14]=x,t[15]=b}else x=t[14],b=t[15];let A;t[16]!==x||t[17]!==b?(A=[{key:x,rows:b}],t[16]=x,t[17]=b,t[18]=A):A=t[18];const j=A;let y;t[19]!==s?(y=Dt(s),t[19]=s,t[20]=y):y=t[20];let k;return t[21]!==j||t[22]!==y||t[23]!==s?(k=o.jsx(Ai,{tier:s,pillIcon:y,groups:j}),t[21]=j,t[22]=y,t[23]=s,t[24]=k):k=t[24],k}function Si(t){return di(t.providerId,t.modelId)}function ys(t){const e=R.c(3),[s]=Ne();let n;return e[0]!==s.enableSounds||e[1]!==t?(n=()=>{s.enableSounds&&Fo(t.dataUri).catch(i=>{console.warn(`[sound] ${t.name} playback failed:`,i)})},e[0]=s.enableSounds,e[1]=t,e[2]=n):n=e[2],n}const Ci={name:"switch-005",dataUri:"data:audio/mpeg;base64,SUQzBAAAAAAAIlRTU0VAAAAOAAADTGF2ZjYyLjMuMTAwAAAAAAAAAAAAAAD/+1DAAAAAAAAAAAAAAAAAAAAAAABJbmZvAAAADwAAABkAABU4ABMTEx0dHR0nJycnMTExMTs7OztERERETk5OTlhYWFhiYmJibGxsbHZ2dnZ/f39/iYmJiZOTk5OdnZ2dp6enp7GxsbG7u7u7xMTExM7Ozs7Y2NjY4uLi4uzs7Oz29vb2/////wAAAABMYXZjNjIuMTEAAAAAAAAAAAAAAAAkBVYAAAAAAAAVOPCP8KUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//tQxAAACEwDXvQRAAG8Ii93HtACUCAABAKCJwfaCEHwfeoEAQdEAYygIHBOCAIAgCAJh9QIOg+D5/ygPh/wfB8DuKAgCHyn9QPh/5SCDv+CEHAQdxOD4B27c39tbckkqYbBAYAN9bNJLB+aXAf5wQAKdzxfbmrVIRQ4xNx3HwnoDmLhfMhgJiiw/HREXNCHqjvHEPEG8QjBYlxQNepJAT0kC8ip6JzSWj1TasoG+iyycbf2Uil1ovf1f/oUtR1qP+s1WSBFKoAAU02BDjMhuP/7UsQEgws8bRpd8YABJYPeBf9wCGXTGxBYcw5AJFMFMAmQQAhGAxgLBgHIAMYAAALhgAchipbe/91aU1VV4zcZj1Vf1XgYCIMBNrsBAIGs9/Ue4i/xFPeqCqwViI9/UeLf///rOngdA3OPHFjmOBv+EQnGahgaZxVplmkAH5JadDTQlNCEuGNiWYbCCONWdUJg6HXNazFdu1T+VgaEpOP70exv7f2/4b/yH//2/4cqCX/zWRUrIw+IPNMNlDnjAXQas/I4AzmYifA0tMSCgQDF//tSxBCDSzzi3k/sQwEyCtjJ/rBZAk+Uqj1YhA5YMCAAMwgOUchTkK7OR7LbMl0W1H6SvzG0Q2ZzfKUhnmTobv9DNhS1v7P8h//8Gv8gTRt1jReZ7YEjmMQg9hhwwMycHooasFmZyjcZGBKJD+IwbMCQQLoi+IQXCcIoydKoilI2MWFS5uJdDEu2taRrYI2ZSqKY50pJLv2NfjUAAuQAMfqVQ/T3PDQgMJMeEZ45hJzY6MNoFMxqTj1zNGQKJjAxEsSCBgQJBSIL0mcKYQJfVAn/+1LEGwLKlEKrD3MiYcuMkVa/wABB8Vh6M1q1epbvXwWBURhkyEhWZ/////////////9gjZ/Wt4w+4MNMCpE4TBYQl4w1IHvMDdA2zBngBMwc8COMDhCpDAfgOAAgrBgNYU+YC0FBGAkAMpgWoSCYAGESGBGAKBgXgJOdiOJmMCmNwCYNDJhYRPykRCJhTBnEUzlsjv4UNLj/z97n3Mv/7z1nZqyitYAZIqErIwMwJAqEw0GAAMFptJMaqFwB8CQIWlhuhuDAwNjfuwrQFAYXCf/7UsQVAA+9PTP42gYRdiIu9zBwAPbFUCi0DAhgNcS+7cDwVgM05A9bUDeuQMyE/u3CygVISgZhpIau/9PhdQG2C9DpxZZJmn/dn/Psmt0EFm////l84ThUTopE4VD/9JkubOGasTvN30C20G21qgUCkVCoUCgPMywrPCGly27V5q5t24vl/8jSlSAPCxzNseNCw3oh3NGBu4BZJ5hv7DRSfR/+eWG7nA8IKh2Olv5iz3q5m3//Joxo3JqNyYkSuGt/k6D4DeoBOHmHdl0dkZYA//tSxAUAC4B1Z/2DADEcA17Z/uhI4Yoik/TrZo+ww7UtmpW4LDWu2IacoJKJJeTSM+ZmAYBEiU+ZnnAwCn1VVVV6JUJQVnioKhrgqdKgqGpUFeCp0sDR3ztQNREDRUFioKuxKCpYGQBlRIBk+aLwb8KblGQVDdphPYTUdBOGbVpAaTF6ZdjEV0iRUZRCYkA4oUQDx5zqDugtXvza/7fuNNvfZ+j9v+T/2f//J/4cAAOTpE5K4zksR9MfIB+TDcQTI4gNs1XKAzEFUrGkxABYEBb/+1LEEYNKrEjgT/TCwYYVmUX+mHoKgWhKU5Eiw9SFIRmppw+3fYo4siPhUFeexM8KgIO6wVuPDDy01qeRaVbw357//y3+o8M0pBNlNLCGBzGKwyYw2IIFOE1WNTjRM6x8MlA1AxDhUHTAkEiyKpnbWrLcaOBotBUKbk1pypcWDAIK00AhKLGkUco6q9VWvM53mcaq3tVa8zjTM/tX//EDP//////////XAAmrwAAPoKwcw0ShDCZD/BQlhzinxQdorsOuXTEIC01ZkJyu4k/qPP/7UsQUAEjkrrkvZaPBIRXUoe5QObfMhYKX9RVgTPqCSCaSCaSC0XVdV1f/////6IAlguuAJSiDRNloNBsZg+0+Ts8MMCn81WUTRAlIi+GHECD0y8AWDIqswYsxGOSKVV7MqOni8tkVOip0fZX/////9HrMCbAz2EHGS4GKAAiRAAAYAcDdKd4G6Z/nwYgJ0ZAIgZyC8aPAs/iPBhwMpWDQNARltNS5Y61v//9i8Yl4SkFkIGTkAc0UBrIYLPA4MYBEy+YLMRuY4nhTC3hZA68H//tSxCoAyQC6mY6CkWDJBIsBz/QUrgNmahSzcrYw0/HhfnMAZBojDsgTFkDR5MDkG/DZEbk2FCmowqdqv2TYABiJwqqYjaQRGZ1URZ1DhSsdiHX/GBu0QpzIBNSaLqZ0ARkwFARxMrpt/Eh47mbQAhhU6sisFUxBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVX/+1LESoHHJCRaj/dmYAIAQAAQAARVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVf/7UsSLg8AAAaQAAAAgAAA0gAAABFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVX/+1LEoYPAAAGkAAAAIAAANIAAAARVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUxBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVf/7UsShg8AAAaQAAAAgAAA0gAAABFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVX/+1LEoYPAAAGkAAAAIAAANIAAAARVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUxBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV",duration:.609,format:"mp3",license:"CC0",author:"Kenney"},Ni=mn.togglePlanMode.keys.map(t=>t==="Shift"?"⇧":t).join(""),Ii=[{src:"/connections/gmail.png",name:"Gmail"},{src:"/connections/perplexity.png",name:"Perplexity"},{src:"/connections/github.png",name:"GitHub"}];function Ti(){const t=R.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx("div",{className:"flex items-center -space-x-1.5",children:Ii.map(_i)}),t[0]=e):e=t[0],e}function _i(t){return o.jsx("img",{src:t.src,alt:t.name,className:"size-5 rounded-sm ring-1 ring-border object-cover bg-white"},t.name)}function Mi({disabled:t,onOpenConnections:e,virtualMcpId:s,selectedModel:n,isStreaming:r,onUnsupportedFile:i}){const a=K(),[l,c]=P.useState(!1),d=ys(Ci),{org:u}=Ie(),{editor:V}=zt(),p=P.useRef(null),f=pt(n),h=()=>{!f||r||(c(!1),p.current?.click())},m=async _=>{const B=_.target.files;if(!B||B.length===0||!V)return;const J=Array.from(B);try{let Z=V.state.selection.from;for(const X of J)await os(V,n??null,X,Z,i,a),Z=V.state.selection.to}finally{p.current&&(p.current.value="")}},g=Eo({connectionId:s,orgId:u.id,orgSlug:u.slug}),v=Os.virtualMcpPrompts(s,u.id),{data:x,isLoading:b}=$s({queryKey:v,queryFn:()=>Po(g),staleTime:6e4,enabled:l&&!!g}),A=x?.prompts??[],[j,y]=P.useState(null),{chatMode:k,setChatMode:w}=He(),[S,N]=Ne(),I=We()?.lockedHarness!=="claude-code",C=Ce.find(_=>_.value===S.toolApprovalLevel)??Ce[0],M=a(C.shortKey),D=_=>{const B=Ce.find(J=>J.value===_);if(B){if(B.value===S.toolApprovalLevel){c(!1);return}d(),se("chat_approval_level_changed",{from_level:S.toolApprovalLevel,to_level:B.value,source:"tools_popover"}),N({...S,toolApprovalLevel:B.value}),c(!1)}},E=k==="plan",U=()=>{d();const _=E?"default":"plan";se("chat_mode_changed",{from_mode:k,to_mode:_,source:"tools_popover"}),w(_),c(!1)},T=()=>{e(),c(!1)},L=async(_,B)=>{if(!V||!g)return;const J=jt(_._meta),Z={from:V.state.selection.from,to:V.state.selection.to};try{const X=await Uo(g,_.name,B);Vn(V,Z,{id:_.name,name:ho(_.name,J),metadata:X.messages,char:"/",kind:"prompt",args:B})}catch{Ue.error(a("chat.toolsPopover.failedLoadPrompt"))}},F=async _=>{c(!1);const B=!!(_.arguments&&_.arguments.length>0);if(se("chat_prompt_inserted",{prompt_name:_.name,with_arguments:B}),B){y(_);return}await L(_)},W=async _=>{j&&(await L(j,_),y(null))},$=()=>{d();const _=k==="gen-image"?"default":"gen-image";se("chat_mode_changed",{from_mode:k,to_mode:_,source:"tools_popover"}),w(_),c(!1)},z=()=>{d();const _=k==="web-search"?"default":"web-search";se("chat_mode_changed",{from_mode:k,to_mode:_,source:"tools_popover"}),w(_),c(!1)},Q=()=>{d();const _=k==="deep-research"?"default":"deep-research";se("chat_mode_changed",{from_mode:k,to_mode:_,source:"tools_popover"}),w(_),c(!1)},ee=k==="gen-image",te=k==="web-search",H=k==="deep-research",oe=o.jsx("input",{ref:p,type:"file",multiple:!0,accept:bo(n??null),className:"hidden",onChange:m,disabled:r});return o.jsxs(o.Fragment,{children:[oe,o.jsxs(Bs,{open:l,onOpenChange:_=>{_&&!l&&se("chat_tools_popover_opened",{chat_mode:k}),c(_)},children:[o.jsx(Ks,{asChild:!0,children:o.jsxs(G,{type:"button",variant:"ghost",size:"default",disabled:t,title:a("chat.toolsPopover.tools"),"aria-label":a("chat.toolsPopover.tools"),className:O("text-muted-foreground hover:text-foreground transition-[gap] duration-200 shrink min-w-0","gap-0 @[320px]/chat-bottom:gap-1.5"),children:[o.jsx(Qn,{size:14}),o.jsx("span",{className:O("min-w-0 truncate transition-[max-width,opacity] duration-200 ease-out max-w-0 opacity-0","@[320px]/chat-bottom:max-w-24 @[320px]/chat-bottom:opacity-100"),children:a("chat.toolsPopover.tools")})]})}),o.jsxs(qs,{align:"start",className:"w-56 p-1.5 space-y-1",children:[f?o.jsxs(ye,{onClick:h,disabled:r,children:[o.jsx(kt,{size:16}),o.jsx("span",{className:"flex-1",children:a("chat.toolsPopover.addFile")})]}):o.jsxs(et,{children:[o.jsx(Ze,{asChild:!0,children:o.jsxs(ye,{"aria-disabled":"true",className:"opacity-50 cursor-not-allowed",onSelect:_=>_.preventDefault(),children:[o.jsx(kt,{size:16}),o.jsx("span",{className:"flex-1",children:a("chat.toolsPopover.addFile")})]})}),o.jsx(Xe,{side:"right",children:a("chat.toolsPopover.modelNoFileSupport")})]}),o.jsxs(ye,{onClick:U,className:O(E&&"text-special"),children:[o.jsx(qt,{size:16,className:O(E&&"text-special")}),o.jsx("span",{className:"flex-1 whitespace-nowrap",children:a("chat.toolsPopover.planMode")}),o.jsx("span",{className:O("text-xs text-muted-foreground",E&&"text-special font-medium"),children:Ni})]}),o.jsxs(ye,{onClick:$,className:O(ee&&"text-special"),children:[o.jsx(Ht,{size:16,className:O(ee&&"text-special")}),o.jsx("span",{className:"flex-1",children:a("chat.toolsPopover.createImage")}),ee&&o.jsx("span",{className:"text-xs text-special font-medium",children:a("chat.toolsPopover.on")})]}),o.jsxs(ye,{onClick:z,className:O(te&&"text-special"),children:[o.jsx(Wt,{size:16,className:O(te&&"text-special")}),o.jsx("span",{className:"flex-1",children:a("chat.toolsPopover.webSearch")}),te&&o.jsx("span",{className:"text-xs text-special font-medium",children:a("chat.toolsPopover.on")})]}),o.jsxs(ye,{onClick:Q,className:O(H&&"text-special"),children:[o.jsx(Gt,{size:16,className:O(H&&"text-special")}),o.jsx("span",{className:"flex-1",children:a("chat.toolsPopover.deepResearch")}),H&&o.jsx("span",{className:"text-xs text-special font-medium",children:a("chat.toolsPopover.on")})]}),o.jsxs(gt,{children:[o.jsxs(xt,{className:"gap-2",children:[o.jsx("span",{className:"flex size-4 items-center justify-center text-base font-medium text-muted-foreground",children:"/"}),o.jsx("span",{className:"flex-1",children:a("chat.toolsPopover.prompts")})]}),o.jsx(vt,{className:"w-80 max-h-72 overflow-y-auto p-1.5",children:b?o.jsxs("div",{className:"flex items-center gap-2 px-2 py-3 text-sm text-muted-foreground",children:[o.jsx(Qs,{className:"size-3.5"}),a("chat.toolsPopover.loadingPrompts")]}):A.length===0?o.jsx("div",{className:"px-2 py-3 text-sm text-muted-foreground",children:a("chat.toolsPopover.noPromptsAvailable")}):A.map(_=>o.jsxs(ye,{onClick:()=>F(_),className:"flex flex-col items-start gap-0.5",children:[o.jsx("span",{className:"font-medium text-sm capitalize",children:_.title||fo(_.name,jt(_._meta))}),_.description&&o.jsx("span",{className:"text-xs text-muted-foreground line-clamp-2",children:_.description})]},_.name))})]}),I&&o.jsxs(gt,{children:[o.jsxs(xt,{className:"gap-2",children:[o.jsx(Je,{size:16}),o.jsx("span",{className:"flex-1",children:a("chat.toolsPopover.approval")}),o.jsx("span",{className:"text-xs text-muted-foreground",children:M})]}),o.jsx(vt,{className:"w-48 p-1.5",children:o.jsx(Ys,{value:S.toolApprovalLevel,onValueChange:D,children:Ce.map(_=>o.jsx(Ws,{value:_.value,children:a(_.labelKey)},_.value))})})]}),o.jsxs(ye,{onClick:T,children:[o.jsx(Lo,{size:16}),o.jsx("span",{className:"flex-1",children:a("chat.toolsPopover.connections")}),o.jsx(P.Suspense,{children:o.jsx(Ti,{})})]})]})]}),o.jsx(ln,{prompt:j,setPrompt:y,onSubmit:W})]})}const Di=[{src:"/connections/github.png",name:"GitHub"},{src:"/connections/gmail.png",name:"Gmail"},{src:"/connections/linear.png",name:"Linear"},{src:"/connections/shopify.png",name:"Shopify"},{src:"/connections/firecrawl.png",name:"Firecrawl"},{src:"/connections/perplexity.png",name:"Perplexity"}];function Ri(){const t=R.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx("div",{className:"flex items-center -space-x-1",children:Di.map(Ei)}),t[0]=e):e=t[0],e}function Ei(t){return o.jsx("img",{src:t.src,alt:t.name,className:"size-5 rounded-sm ring-2 ring-muted object-cover bg-white"},t.name)}function Pi(t){const e=R.c(10),{onClick:s}=t,n=K();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=O("group relative z-10 flex items-center gap-3 w-full px-4 py-3","rounded-b-2xl","cursor-pointer"),e[0]=r):r=e[0];let i;e[1]!==n?(i=n("chat.connectionsBanner.description"),e[1]=n,e[2]=i):i=e[2];let a;e[3]!==i?(a=o.jsx("p",{className:"flex-1 text-xs text-muted-foreground truncate text-left",children:i}),e[3]=i,e[4]=a):a=e[4];let l,c;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx(Ri,{}),c=o.jsx(Gs,{size:14,className:"shrink-0 text-muted-foreground/60 group-hover:text-muted-foreground transition-colors"}),e[5]=l,e[6]=c):(l=e[5],c=e[6]);let d;return e[7]!==s||e[8]!==a?(d=o.jsxs("button",{type:"button",onClick:s,className:r,children:[a,l,c]}),e[7]=s,e[8]=a,e[9]=d):d=e[9],d}const Pe=48;function Ui(){const t=R.c(9),[e,s]=P.useState("idle"),[n,r]=P.useState(""),[i,a]=P.useState(""),[l,c]=P.useState(zi),d=P.useRef(null),u=P.useRef(null),V=P.useRef(null),p=P.useRef(null),f=P.useRef(0),h=P.useRef(!1),m=P.useRef(""),g=P.useRef(""),v=typeof window<"u"&&!!(window.SpeechRecognition||window.webkitSpeechRecognition);let x;t[0]===Symbol.for("react.memo_cache_sentinel")?(x=()=>{f.current&&(cancelAnimationFrame(f.current),f.current=0),u.current?.close().catch(Fi),p.current?.getTracks().forEach(Li),V.current=null,u.current=null,p.current=null},t[0]=x):x=t[0];const b=x;let A;if(t[1]===Symbol.for("react.memo_cache_sentinel")){const I=C=>{p.current=C;const M=new AudioContext;u.current=M;const D=M.createMediaStreamSource(C),E=M.createAnalyser();E.fftSize=128,E.smoothingTimeConstant=.8,D.connect(E),V.current=E;const U=new Uint8Array(E.frequencyBinCount),T=()=>{if(!V.current)return;V.current.getByteFrequencyData(U);const L=[];for(let F=0;F<Pe;F++){const W=Math.floor(F/Pe*U.length);L.push(Math.max(.04,(U[W]??0)/255))}c(L),f.current=requestAnimationFrame(T)};T()};A=async()=>{const C=window.SpeechRecognition||window.webkitSpeechRecognition;if(!C)return s("unsupported"),"unsupported";let M;try{M=await navigator.mediaDevices.getUserMedia({audio:!0})}catch{return s("permission-denied"),"permission-denied"}r(""),a(""),g.current="",m.current="",h.current=!0,s("recording"),I(M);const D=new C;d.current=D,D.interimResults=!0,D.continuous=!0,D.lang=navigator.language||"en-US",D.onresult=E=>{if(d.current!==D)return;let U="",T="";for(let L=E.resultIndex;L<E.results.length;L++){const F=E.results[L],W=F?.[0]?.transcript??"";F?.isFinal?T=T+W:U=U+W}T&&(m.current=m.current+T,r(m.current)),g.current=U,a(U)},D.onerror=E=>{d.current===D&&E.error!=="no-speech"&&(h.current=!1,d.current=null,b(),s(E.error==="not-allowed"?"permission-denied":"idle"))},D.onend=()=>{if(d.current===D&&h.current)try{D.start()}catch{}};try{D.start()}catch{return h.current=!1,d.current=null,b(),s("idle"),"idle"}return"recording"},t[1]=A}else A=t[1];const j=A;let y;t[2]===Symbol.for("react.memo_cache_sentinel")?(y=()=>{h.current=!1,d.current?.stop(),b(),s("idle"),c(Array(Pe).fill(.05)),a("");const I=(m.current+(g.current?" "+g.current:"")).trim();return r(""),m.current="",g.current="",I},t[2]=y):y=t[2];const k=y;let w;t[3]===Symbol.for("react.memo_cache_sentinel")?(w=()=>{h.current=!1,d.current?.abort(),b(),s("idle"),r(""),a(""),c(Array(Pe).fill(.05)),m.current="",g.current=""},t[3]=w):w=t[3];const S=w;let N;return t[4]!==i||t[5]!==e||t[6]!==n||t[7]!==l?(N={status:e,transcript:n,interimTranscript:i,waveformData:l,isSupported:v,startRecording:j,stopRecording:k,cancelRecording:S},t[4]=i,t[5]=e,t[6]=n,t[7]=l,t[8]=N):N=t[8],N}function Li(t){return t.stop()}function Fi(){}function zi(){return Array(Pe).fill(.05)}function Oi(t){const e=R.c(4),{data:s}=t;let n;e[0]!==s?(n=s.map($i),e[0]=s,e[1]=n):n=e[1];let r;return e[2]!==n?(r=o.jsx("div",{className:"flex items-center justify-center gap-[2px] h-10 overflow-hidden","aria-hidden":"true",children:n}),e[2]=n,e[3]=r):r=e[3],r}function $i(t,e){return o.jsx("div",{className:"w-[2px] shrink-0 rounded-full bg-chart-2 transition-[height] duration-75 ease-out",style:{height:`${Math.max(4,Math.round(t*40))}px`}},e)}const Le=12e3,Rt=ie({token:ne(),expiresAt:Js()});Zs("provider",[ie({provider:je("elevenlabs"),conversationToken:ne().min(1)}),ie({provider:je("openai"),transport:je("webrtc")})]);const Bi=Hs([Rt.extend({provider:je("elevenlabs").default("elevenlabs"),conversationToken:ne().min(1)}),Rt.extend({provider:je("openai"),transport:je("webrtc")})]);ie({token:ne().min(1).max(4096),text:ne().trim().min(1).max(Le)});const js=ie({request:ne().trim().min(1).max(Le)}),rt=5e3;Ut(ie({role:ze(["user","agent"]),text:ne().min(1).max(rt)})).max(60).refine(t=>t.reduce((e,s)=>e+s.text.length,0)<=rt,{message:"Voice transcript is too long"});function cl(t){const e=[];let s=rt;for(const n of t.slice(-60).reverse()){if(s<=0)break;const r=n.text.slice(-s);e.unshift({role:n.role,text:r}),s-=r.length}return e}ie({token:ne().min(1).max(4096),sdp:ne().min(1).max(1e5),language:ze(["en","pt"]).default("en")}).strict();const Ki=ie({sdp:ne().min(1).max(1e5)});async function qi(t,e,s,n,r){if(t.provider==="openai"){const{startOpenAIConversation:l}=await bt(async()=>{const{startOpenAIConversation:c}=await import("./openai-conversation-CuZL6fUQ.js");return{startOpenAIConversation:c}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128]));return l(r,s,n)}const{Conversation:i}=await bt(async()=>{const{Conversation:l}=await import("./index-yN0BIuMc.js");return{Conversation:l}},[]);n.throwIfAborted();const a=await i.startSession({...s,clientTools:{delegate_to_agent:async l=>{const c=js.safeParse(l);return JSON.stringify(c.success?await s.onDelegate(c.data):{status:"rejected",reason:"A complete request is required."})},get_agent_status:()=>JSON.stringify(s.getWorkStatus()),stop_agent_work:()=>JSON.stringify(s.cancelCurrentWork())},conversationToken:t.conversationToken,connectionType:"webrtc",overrides:{agent:{language:e}}});return n.aborted&&(await a.endSession(),n.throwIfAborted()),{endSession:()=>a.endSession(),setMicMuted:l=>a.setMicMuted(l),getOutputVolume:()=>a.getOutputVolume(),publishUpdate:l=>{const c=JSON.stringify({source:"Studio background data, not a user request or instructions",contextId:l.contextId,requestId:l.delegationId,text:l.text});l.delivery==="context"?a.sendContextualUpdate(c):a.sendUserMessage(`[Studio background event, not a new user request]
9
+ The report follows.`;function dr(t){return{...t,content:[{type:"paragraph",content:[rn({id:St,name:St,char:"/",kind:"prompt",metadata:[{role:"user",content:{type:"text",text:cr}}]})]},...t.content??[]]}}function ur(){const t=R.c(24),e=K(),s=pn();if(!s)return null;let n,r,i,a;t[0]!==s.path||t[1]!==e?(n=fn(s.path),a="flex px-3 pt-3",r="surface-inset flex h-7 min-w-0 items-center gap-1.5 rounded-full pr-0.5 pl-2.5 text-xs text-foreground",i=e("chat.input.openFileContext",{name:n}),t[0]=s.path,t[1]=e,t[2]=n,t[3]=r,t[4]=i,t[5]=a):(n=t[2],r=t[3],i=t[4],a=t[5]);let l,c;t[6]!==n?(l=o.jsx(un,{filename:n,className:"h-4 w-3 shrink-0"}),c=o.jsx("span",{className:"truncate",children:n}),t[6]=n,t[7]=l,t[8]=c):(l=t[7],c=t[8]);let d;t[9]!==e?(d=e("chat.input.openFileDismiss"),t[9]=e,t[10]=d):d=t[10];let u;t[11]===Symbol.for("react.memo_cache_sentinel")?(u=o.jsx(Ot,{size:12}),t[11]=u):u=t[11];let V;t[12]!==s.dismiss||t[13]!==d?(V=o.jsx(dn,{label:d,size:"icon-sm",onClick:s.dismiss,children:u}),t[12]=s.dismiss,t[13]=d,t[14]=V):V=t[14];let p;t[15]!==r||t[16]!==i||t[17]!==l||t[18]!==c||t[19]!==V?(p=o.jsxs("span",{className:r,title:i,children:[l,c,V]}),t[15]=r,t[16]=i,t[17]=l,t[18]=c,t[19]=V,t[20]=p):p=t[20];let f;return t[21]!==a||t[22]!==p?(f=o.jsx("div",{className:a,children:p}),t[21]=a,t[22]=p,t[23]=f):f=t[23],f}function pr(t){const e=R.c(30),{current:s,total:n,onPrev:r,onNext:i}=t,a=K();if(n<=1)return null;const l=s===0,c=s===0?"opacity-30 cursor-not-allowed":"hover:text-foreground cursor-pointer";let d;e[0]!==c?(d=O("p-0.5 transition-colors rounded-lg",c),e[0]=c,e[1]=d):d=e[1];let u;e[2]!==a?(u=a("chat.pagination.previousLabel"),e[2]=a,e[3]=u):u=e[3];let V;e[4]===Symbol.for("react.memo_cache_sentinel")?(V=o.jsx(oo,{size:14}),e[4]=V):V=e[4];let p;e[5]!==r||e[6]!==l||e[7]!==d||e[8]!==u?(p=o.jsx("button",{type:"button",onClick:r,disabled:l,className:d,"aria-label":u,children:V}),e[5]=r,e[6]=l,e[7]=d,e[8]=u,e[9]=p):p=e[9];const f=s+1;let h;e[10]!==a||e[11]!==f||e[12]!==n?(h=a("chat.pagination.counter",{current:f,total:n}),e[10]=a,e[11]=f,e[12]=n,e[13]=h):h=e[13];let m;e[14]!==h?(m=o.jsx("span",{className:"tabular-nums text-xs",children:h}),e[14]=h,e[15]=m):m=e[15];const g=s===n-1,v=s===n-1?"opacity-30 cursor-not-allowed":"hover:text-foreground cursor-pointer";let x;e[16]!==v?(x=O("p-0.5 transition-colors rounded-lg",v),e[16]=v,e[17]=x):x=e[17];let b;e[18]!==a?(b=a("chat.pagination.nextLabel"),e[18]=a,e[19]=b):b=e[19];let A;e[20]===Symbol.for("react.memo_cache_sentinel")?(A=o.jsx(Bt,{size:14}),e[20]=A):A=e[20];let j;e[21]!==i||e[22]!==g||e[23]!==x||e[24]!==b?(j=o.jsx("button",{type:"button",onClick:i,disabled:g,className:x,"aria-label":b,children:A}),e[21]=i,e[22]=g,e[23]=x,e[24]=b,e[25]=j):j=e[25];let y;return e[26]!==j||e[27]!==p||e[28]!==m?(y=o.jsxs("div",{className:"flex items-center gap-1 text-sm text-muted-foreground",children:[p,m,j]}),e[26]=j,e[27]=p,e[28]=m,e[29]=y):y=e[29],y}function cs(t){const e=R.c(8),{currentIndex:s,total:n,onPrev:r,onNext:i,extraLeft:a}=t;let l;e[0]!==s||e[1]!==i||e[2]!==r||e[3]!==n?(l=o.jsx(pr,{current:s,total:n,onPrev:r,onNext:i}),e[0]=s,e[1]=i,e[2]=r,e[3]=n,e[4]=l):l=e[4];let c;return e[5]!==a||e[6]!==l?(c=o.jsxs("div",{className:"flex items-center gap-2",children:[l,a]}),e[5]=a,e[6]=l,e[7]=c):c=e[7],c}function fr(t){const e=R.c(17),{isStreaming:s,isAllAnswered:n,isCurrentAnswered:r,onAdvanceOrSubmit:i,submitLabel:a,nextLabel:l}=t,u=n?a===void 0?"Submit":a:l===void 0?"Next":l,V=n?s:!r,p=V?n?"Waiting for the assistant to finish…":"Answer this item to continue":null;let f;e[0]!==V||e[1]!==i?(f=()=>{V||i()},e[0]=V,e[1]=i,e[2]=f):f=e[2];const h=V&&"opacity-50 cursor-not-allowed";let m;e[3]!==h?(m=O("h-7 px-2.5 text-xs",h),e[3]=h,e[4]=m):m=e[4];let g;e[5]!==V||e[6]!==u||e[7]!==f||e[8]!==m?(g=o.jsx(G,{type:"button",size:"sm","aria-disabled":V,onClick:f,className:m,children:u}),e[5]=V,e[6]=u,e[7]=f,e[8]=m,e[9]=g):g=e[9];const v=g;if(!p)return v;let x;e[10]!==v?(x=o.jsx(Ze,{asChild:!0,children:v}),e[10]=v,e[11]=x):x=e[11];let b;e[12]!==p?(b=o.jsx(Xe,{children:p}),e[12]=p,e[13]=b):b=e[13];let A;return e[14]!==x||e[15]!==b?(A=o.jsxs(et,{children:[x,b]}),e[14]=x,e[15]=b,e[16]=A):A=e[16],A}function ds(t,e,s){return t.findIndex(n=>e(n)===s)}function Ct(t,e,s,n){return t.length===0?!1:t.every(r=>n(s[e(r)]))}function Nt(t,e,s,n,r){if(t.length===0)return null;const i=ds(t,e,r);for(let a=1;a<=t.length;a++){const l=t[(i+a)%t.length];if(!l)continue;const c=e(l);if(c!==r&&!n(s[c]))return c}return null}function hr(t){return!t.isStreaming&&t.allAnswered}function us(t){const{parts:e,partKey:s,schema:n,defaultValues:r,isStreaming:i,hasAnswer:a,onSubmit:l}=t,c=e[0]?s(e[0]):"",[d,u]=P.useState(c),[V,p]=P.useState(!1),f=Ss({resolver:Cs(n),defaultValues:r}),h=f.watch(),m=ds(e,s,d),g=m>=0?e[m]:void 0,v=a(h[d]),x=Ct(e,s,h,a),b=hr({isStreaming:i,allAnswered:x}),A=()=>{if(m>0){const I=e[m-1];I&&u(s(I))}},j=()=>{if(m>=0&&m<e.length-1){const I=e[m+1];I&&u(s(I))}},y=()=>{const I=f.getValues(),C=Nt(e,s,I,a,d);C&&u(C)},k=()=>{f.handleSubmit(I=>{const C=I;for(const M of e)l(M,C[s(M)])})()},w=P.useRef(k);w.current=k;const S=()=>{b&&(p(!1),w.current())},N=()=>{const I=f.getValues();if(Ct(e,s,I,a)){if(i){p(!0);return}p(!1),w.current()}else{const C=Nt(e,s,I,a,d);C&&u(C)}};return P.useEffect(()=>{if(V&&!i){if(!x){p(!1);return}p(!1),w.current()}},[V,i,x]),{form:f,activeKey:d,setActiveKey:u,currentIndex:m,currentPart:g,isCurrentAnswered:v,isAllAnswered:x,canSubmit:b,goPrev:A,goNext:j,advanceToNextUnanswered:y,submit:S,submitOrAdvance:N}}const ps="chat.approval.defaultDenyReason";function fs(t){const e=R.c(36),{onYolo:s}=t,n=K(),[r,i]=Ne();let a,l,c,d,u,V,p,f,h;if(e[0]!==s||e[1]!==r||e[2]!==i||e[3]!==n){const A=Ce.find(k=>k.value===r.toolApprovalLevel)??Ce[0];let j;e[13]!==s||e[14]!==r||e[15]!==i?(j=k=>{const w=k,S=r.toolApprovalLevel??"readonly";i({...r,toolApprovalLevel:w}),w==="auto"&&s(S)},e[13]=s,e[14]=r,e[15]=i,e[16]=j):j=e[16];const y=j;c=eo,f=r.toolApprovalLevel,h=y,l=to,u="xs",V="text-xs text-muted-foreground border-border/60 bg-transparent hover:bg-accent/60 h-7 gap-1",p=mr,a=so,d=n(A.shortKey),e[0]=s,e[1]=r,e[2]=i,e[3]=n,e[4]=a,e[5]=l,e[6]=c,e[7]=d,e[8]=u,e[9]=V,e[10]=p,e[11]=f,e[12]=h}else a=e[4],l=e[5],c=e[6],d=e[7],u=e[8],V=e[9],p=e[10],f=e[11],h=e[12];let m;e[17]!==a||e[18]!==d?(m=o.jsx(a,{children:d}),e[17]=a,e[18]=d,e[19]=m):m=e[19];let g;e[20]!==l||e[21]!==u||e[22]!==V||e[23]!==p||e[24]!==m?(g=o.jsx(l,{size:u,className:V,onClick:p,children:m}),e[20]=l,e[21]=u,e[22]=V,e[23]=p,e[24]=m,e[25]=g):g=e[25];let v;e[26]!==n?(v=Ce.map(A=>o.jsx(Xn,{value:A.value,children:n(A.labelKey)},A.value)),e[26]=n,e[27]=v):v=e[27];let x;e[28]!==v?(x=o.jsx(no,{children:v}),e[28]=v,e[29]=x):x=e[29];let b;return e[30]!==c||e[31]!==x||e[32]!==f||e[33]!==h||e[34]!==g?(b=o.jsxs(c,{value:f,onValueChange:h,children:[g,x]}),e[30]=c,e[31]=x,e[32]=f,e[33]=h,e[34]=g,e[35]=b):b=e[35],b}function mr(t){return t.stopPropagation()}function hs(t){const e=R.c(8),{input:s}=t,n=K();if(s==null){let a;e[0]!==n?(a=n("chat.approval.noInput"),e[0]=n,e[1]=a):a=e[1];let l;return e[2]!==a?(l=o.jsx("div",{className:"px-4 text-xs text-muted-foreground",children:a}),e[2]=a,e[3]=l):l=e[3],l}let r;try{let a;e[4]!==s?(a=JSON.stringify(s,null,2),e[4]=s,e[5]=a):a=e[5],r=a}catch{r=String(s)}let i;return e[6]!==r?(i=o.jsx("div",{className:"px-4",children:o.jsx("pre",{className:"text-xs font-mono text-muted-foreground/70 whitespace-pre-wrap wrap-break-word max-h-32 overflow-y-auto rounded-md bg-muted/30 px-3 py-2",children:r})}),e[6]=r,e[7]=i):i=e[7],i}function gr(t){const e=R.c(38),{approval:s,onRespond:n}=t,r=K(),[i]=Ne(),a=i.toolApprovalLevel??"readonly";let l;e[0]!==s.approvalId||e[1]!==a||e[2]!==n||e[3]!==r?(l=()=>n(s.approvalId,!1,r(ps),a),e[0]=s.approvalId,e[1]=a,e[2]=n,e[3]=r,e[4]=l):l=e[4];const c=l;let d;e[5]!==s.approvalId||e[6]!==a||e[7]!==n?(d=()=>n(s.approvalId,!0,void 0,a),e[5]=s.approvalId,e[6]=a,e[7]=n,e[8]=d):d=e[8];const u=d;let V;e[9]!==s.approvalId||e[10]!==n?(V=S=>n(s.approvalId,!0,void 0,S),e[9]=s.approvalId,e[10]=n,e[11]=V):V=e[11];const p=V;let f;e[12]!==p?(f=o.jsx("div",{className:"flex items-center gap-2",children:o.jsx(fs,{onYolo:p})}),e[12]=p,e[13]=f):f=e[13];const h=f;let m;e[14]!==r?(m=r("chat.approval.denyButton"),e[14]=r,e[15]=m):m=e[15];let g;e[16]!==c||e[17]!==m?(g=o.jsx(G,{type:"button",variant:"ghost",size:"sm",className:"h-7 px-2.5 text-xs text-muted-foreground [@media(hover:hover)]:hover:text-foreground active:scale-[0.97] transition-transform",onClick:c,children:m}),e[16]=c,e[17]=m,e[18]=g):g=e[18];let v;e[19]!==r?(v=r("chat.approval.acceptButton"),e[19]=r,e[20]=v):v=e[20];let x;e[21]!==u||e[22]!==v?(x=o.jsx(G,{type:"button",size:"sm",className:"h-7 px-2.5 text-xs active:scale-[0.97] transition-transform",onClick:u,children:v}),e[21]=u,e[22]=v,e[23]=x):x=e[23];let b;e[24]!==g||e[25]!==x?(b=o.jsxs(o.Fragment,{children:[g,x]}),e[24]=g,e[25]=x,e[26]=b):b=e[26];const A=b;let j;e[27]===Symbol.for("react.memo_cache_sentinel")?(j=o.jsx(Je,{size:14}),e[27]=j):j=e[27];let y;e[28]!==r?(y=r("chat.approval.needsApproval"),e[28]=r,e[29]=y):y=e[29];let k;e[30]!==s.input?(k=o.jsx(hs,{input:s.input}),e[30]=s.input,e[31]=k):k=e[31];let w;return e[32]!==s.friendlyName||e[33]!==h||e[34]!==A||e[35]!==y||e[36]!==k?(w=o.jsx(pe,{icon:j,label:y,title:s.friendlyName,defaultExpanded:!0,footerLeft:h,footerRight:A,children:k}),e[32]=s.friendlyName,e[33]=h,e[34]=A,e[35]=y,e[36]=k,e[37]=w):w=e[37],w}const xr=Ns(ne(),ie({approved:Is().optional(),levelOverride:ze(["auto","readonly"]).optional()}));function vr(t){const e=R.c(46),{approvals:s,isStreaming:n,onRespond:r}=t,i=K(),[a]=Ne(),l=a.toolApprovalLevel??"readonly";let c;e[0]!==s?(c=Object.fromEntries(s.map(yr)),e[0]=s,e[1]=c):c=e[1];const d=c;let u;e[2]!==l||e[3]!==r||e[4]!==i?(u=(C,M)=>{const D=M;typeof D?.approved=="boolean"&&r(C.approvalId,D.approved,D.approved===!1?i(ps):void 0,D.levelOverride??l)},e[2]=l,e[3]=r,e[4]=i,e[5]=u):u=e[5];let V;e[6]!==s||e[7]!==d||e[8]!==n||e[9]!==u?(V={parts:s,partKey:Ar,schema:xr,defaultValues:d,isStreaming:n,hasAnswer:br,onSubmit:u},e[6]=s,e[7]=d,e[8]=n,e[9]=u,e[10]=V):V=e[10];const p=us(V);let f;e[11]!==s||e[12]!==p?(f=C=>{p.form.reset(Object.fromEntries(s.map(M=>[M.approvalId,{approved:!0,levelOverride:C}]))),p.submitOrAdvance()},e[11]=s,e[12]=p,e[13]=f):f=e[13];const h=f,m=p.currentPart,g=p.form;let v;e[14]!==p?(v=C=>{C.preventDefault(),p.submit()},e[14]=p,e[15]=v):v=e[15];let x;e[16]===Symbol.for("react.memo_cache_sentinel")?(x=o.jsx(Je,{size:14}),e[16]=x):x=e[16];let b;e[17]!==s.length||e[18]!==i?(b=i("chat.approval.batchedLabel",{count:s.length}),e[17]=s.length,e[18]=i,e[19]=b):b=e[19];const A=m?.friendlyName??"";let j;e[20]!==h?(j=o.jsx(fs,{onYolo:h}),e[20]=h,e[21]=j):j=e[21];let y;e[22]!==s.length||e[23]!==p.currentIndex||e[24]!==p.goNext||e[25]!==p.goPrev||e[26]!==j?(y=o.jsx(cs,{currentIndex:p.currentIndex,total:s.length,onPrev:p.goPrev,onNext:p.goNext,extraLeft:j}),e[22]=s.length,e[23]=p.currentIndex,e[24]=p.goNext,e[25]=p.goPrev,e[26]=j,e[27]=y):y=e[27];let k;e[28]!==m||e[29]!==p.form.control||e[30]!==p.submitOrAdvance?(k=m?o.jsx(jr,{approvalId:m.approvalId,control:p.form.control,onChange:p.submitOrAdvance}):null,e[28]=m,e[29]=p.form.control,e[30]=p.submitOrAdvance,e[31]=k):k=e[31];let w;e[32]!==m?(w=m?o.jsx(hs,{input:m.input}):null,e[32]=m,e[33]=w):w=e[33];let S;e[34]!==y||e[35]!==k||e[36]!==w||e[37]!==b||e[38]!==A?(S=o.jsx(pe,{icon:x,label:b,title:A,defaultExpanded:!0,footerLeft:y,footerRight:k,children:w}),e[34]=y,e[35]=k,e[36]=w,e[37]=b,e[38]=A,e[39]=S):S=e[39];let N;e[40]!==S||e[41]!==v?(N=o.jsx("form",{onSubmit:v,children:S}),e[40]=S,e[41]=v,e[42]=N):N=e[42];let I;return e[43]!==p.form||e[44]!==N?(I=o.jsx(ot,{...g,children:N}),e[43]=p.form,e[44]=N,e[45]=I):I=e[45],I}function br(t){return typeof t?.approved=="boolean"}function Ar(t){return t.approvalId}function yr(t){return[t.approvalId,{approved:void 0}]}function jr(t){const e=R.c(7),{approvalId:s,control:n,onChange:r}=t,i=K(),a=`${s}.approved`;let l;e[0]!==r||e[1]!==i?(l=d=>{const{field:u}=d,V=u.value===!0,p=u.value===!1;return o.jsxs(o.Fragment,{children:[o.jsx(G,{type:"button",variant:p?"secondary":"ghost",size:"sm",className:"h-7 px-2.5 text-xs",onClick:()=>{u.onChange(!1),r()},"aria-pressed":p,children:i("chat.approval.denyButton")}),o.jsx(G,{type:"button",variant:V?"default":"outline",size:"sm",className:"h-7 px-2.5 text-xs",onClick:()=>{u.onChange(!0),r()},"aria-pressed":V,children:i("chat.approval.acceptButton")})]})},e[0]=r,e[1]=i,e[2]=l):l=e[2];let c;return e[3]!==n||e[4]!==a||e[5]!==l?(c=o.jsx(Ts,{control:n,name:a,render:l}),e[3]=n,e[4]=a,e[5]=l,e[6]=c):c=e[6],c}function kr(){const t=R.c(5),e=K();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx(Je,{className:"size-5 text-muted-foreground shimmer"}),t[0]=s):s=t[0];let n;t[1]!==e?(n=e("chat.approval.preparingRequest"),t[1]=e,t[2]=n):n=t[2];let r;return t[3]!==n?(r=o.jsxs("div",{className:"flex items-center gap-2 p-4 border border-dashed rounded-lg bg-accent/50 w-[calc(100%-16px)] max-w-[640px] mx-auto mb-2",children:[s,o.jsx("span",{className:"text-sm text-muted-foreground shimmer",children:n})]}),t[3]=n,t[4]=r):r=t[4],r}function wr(t){const e=R.c(8),{approvals:s,isStreaming:n,onRespond:r}=t;if(n&&s.length===0){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx(kr,{}),e[0]=a):a=e[0],a}if(s.length===0)return null;if(s.length===1){const a=s[0];if(!a)return null;let l;return e[1]!==r||e[2]!==a?(l=o.jsx(gr,{approval:a,onRespond:r}),e[1]=r,e[2]=a,e[3]=l):l=e[3],l}let i;return e[4]!==s||e[5]!==n||e[6]!==r?(i=o.jsx(vr,{approvals:s,isStreaming:n,onRespond:r}),e[4]=s,e[5]=n,e[6]=r,e[7]=i):i=e[7],i}function Sr(t){const e=R.c(28),{plan:s,onApprove:n,onDismiss:r}=t,i=K();let a;e[0]!==n||e[1]!==s.plan?(a=()=>{n(s.plan)},e[0]=n,e[1]=s.plan,e[2]=a):a=e[2];const l=a;let c;e[3]!==i?(c=i("chat.proposePlan.keepIterating"),e[3]=i,e[4]=c):c=e[4];let d;e[5]!==r||e[6]!==c?(d=o.jsx(G,{type:"button",variant:"ghost",size:"sm",className:"h-7 px-2.5 text-xs text-muted-foreground [@media(hover:hover)]:hover:text-foreground active:scale-[0.97] transition-transform",onClick:r,children:c}),e[5]=r,e[6]=c,e[7]=d):d=e[7];let u;e[8]!==i?(u=i("chat.proposePlan.letsGo"),e[8]=i,e[9]=u):u=e[9];let V;e[10]!==l||e[11]!==u?(V=o.jsx(G,{type:"button",size:"sm",className:"h-7 px-2.5 text-xs bg-special hover:bg-special/90 text-special-foreground active:scale-[0.97] transition-transform",onClick:l,children:u}),e[10]=l,e[11]=u,e[12]=V):V=e[12];let p;e[13]!==d||e[14]!==V?(p=o.jsxs(o.Fragment,{children:[d,V]}),e[13]=d,e[14]=V,e[15]=p):p=e[15];const f=p;let h;e[16]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsx(Qt,{size:14}),e[16]=h):h=e[16];let m;e[17]!==i?(m=i("chat.proposePlan.planReady"),e[17]=i,e[18]=m):m=e[18];let g;e[19]!==i?(g=i("chat.proposePlan.implementationPlan"),e[19]=i,e[20]=g):g=e[20];let v;e[21]!==s.plan?(v=o.jsx("div",{className:"px-4 max-h-64 overflow-y-auto",children:o.jsx("div",{className:"prose prose-sm max-w-none text-sm",children:o.jsx(an,{id:"plan-preview",part:{type:"text",text:s.plan}})})}),e[21]=s.plan,e[22]=v):v=e[22];let x;return e[23]!==f||e[24]!==v||e[25]!==m||e[26]!==g?(x=o.jsx(pe,{icon:h,label:m,title:g,defaultExpanded:!0,footerRight:f,children:v}),e[23]=f,e[24]=v,e[25]=m,e[26]=g,e[27]=x):x=e[27],x}function Cr(t){const e=R.c(6),{plans:s,onApprove:n,onDismiss:r}=t;let i;e[0]!==s?(i=as(s),e[0]=s,e[1]=i):i=e[1];const a=i;if(!a)return null;let l;return e[2]!==a||e[3]!==n||e[4]!==r?(l=o.jsx(Sr,{plan:a,onApprove:n,onDismiss:r}),e[2]=a,e[3]=n,e[4]=r,e[5]=l):l=e[5],l}function ms(t){return t?"response"in t?t.response:t.option??t.draft:""}const It=ie({response:ne().min(1,"Response is required")}),Nr=ie({option:ne().nullable(),draft:ne()}).refine(t=>(t.option??t.draft).length>0,{message:"Please select or enter an option"}),Ir=ie({response:ze(["yes","no"])});function Tr(t){switch(t.type){case"text":return It;case"choice":return Nr;case"confirm":return Ir;default:return It}}function _r(t){const e={};for(const s of t)e[s.toolCallId]=Tr(s.input);return ie(e)}function Mr(t){const e=R.c(7),{control:s,name:n,placeholder:r}=t,i=K();let a;e[0]!==r||e[1]!==i?(a=c=>{const{field:d}=c,u=d.value??"";return o.jsxs(ct,{children:[o.jsx(dt,{children:o.jsx("div",{className:"px-2",children:o.jsxs("div",{className:"flex items-center gap-3 px-2 py-3 rounded-lg bg-accent/50",children:[o.jsx("span",{className:"flex items-center justify-center size-6 rounded-md bg-muted shrink-0",children:o.jsx(Yt,{size:16,className:"text-muted-foreground"})}),o.jsx("input",{...d,value:u,type:"text",placeholder:r||i("chat.userAskQuestion.typeResponse"),autoFocus:!0,"aria-label":i("chat.userAskQuestion.textResponseInputAriaLabel"),className:"flex-1 text-sm bg-transparent outline-none placeholder:text-foreground/25 text-foreground min-w-0"})]})})}),o.jsx(ut,{})]})},e[0]=r,e[1]=i,e[2]=a):a=e[2];let l;return e[3]!==s||e[4]!==n||e[5]!==a?(l=o.jsx(Jt,{control:s,name:n,render:a}),e[3]=s,e[4]=n,e[5]=a,e[6]=l):l=e[6],l}function gs(t,e){const s=R.c(4);let n,r;s[0]!==t||s[1]!==e?(n=()=>{const i=a=>{if(hn(a.target)||a.metaKey||a.ctrlKey||a.altKey)return;const l=Number.parseInt(a.key,10);l>=1&&l<=t&&(a.preventDefault(),e(l-1))};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},r=[t,e],s[0]=t,s[1]=e,s[2]=n,s[3]=r):(n=s[2],r=s[3]),P.useEffect(n,r)}function Dr(t){const e=R.c(51),{control:s,name:n,options:r}=t,i=K(),a=`${n}.option`;let l;e[0]!==s||e[1]!==a?(l={control:s,name:a,defaultValue:null},e[0]=s,e[1]=a,e[2]=l):l=e[2];const{field:c}=mt(l),d=`${n}.draft`;let u;e[3]!==s||e[4]!==d?(u={control:s,name:d,defaultValue:""},e[3]=s,e[4]=d,e[5]=u):u=e[5];const{field:V}=mt(u),p=c.value,f=V.value??"";let h;if(e[6]!==c||e[7]!==r?(h=U=>{const T=r[U];T!=null&&c.onChange(T)},e[6]=c,e[7]=r,e[8]=h):h=e[8],gs(r.length,h),r.length===0)return null;const m=p===null;let g;e[9]!==i?(g=i("chat.userAskQuestion.choiceOptionsAriaLabel"),e[9]=i,e[10]=g):g=e[10];let v;if(e[11]!==c||e[12]!==p||e[13]!==r||e[14]!==i){let U;e[16]!==c||e[17]!==p||e[18]!==i?(U=(T,L)=>{const F=p===T;return o.jsxs("button",{type:"button",onClick:()=>c.onChange(T),className:O("flex items-start gap-3 px-2 py-3 rounded-lg text-left transition-colors w-full",F&&"bg-accent/50",!F&&"hover:bg-accent/30"),"aria-label":i("chat.userAskQuestion.selectOption",{option:T}),children:[o.jsx("span",{className:O("flex items-center justify-center size-6 rounded-md text-sm shrink-0 mt-0.5",F?"bg-chart-1 text-white":"bg-muted text-foreground"),children:L+1}),o.jsx("span",{className:"text-sm text-foreground min-w-0 break-words",children:T})]},`${L}-${T}`)},e[16]=c,e[17]=p,e[18]=i,e[19]=U):U=e[19],v=r.map(U),e[11]=c,e[12]=p,e[13]=r,e[14]=i,e[15]=v}else v=e[15];const x=m&&"bg-accent/50",b=!m&&"hover:bg-accent/30";let A;e[20]!==x||e[21]!==b?(A=O("flex items-center gap-3 px-2 py-3 rounded-lg transition-colors w-full cursor-text",x,b),e[20]=x,e[21]=b,e[22]=A):A=e[22];let j;e[23]===Symbol.for("react.memo_cache_sentinel")?(j=o.jsx("span",{className:"flex items-center justify-center size-6 rounded-md bg-muted shrink-0",children:o.jsx(Yt,{size:16,className:"text-muted-foreground"})}),e[23]=j):j=e[23];const y=m?f:"";let k;e[24]!==V||e[25]!==c||e[26]!==p?(k=U=>{V.onChange(U.target.value),p!==null&&c.onChange(null)},e[24]=V,e[25]=c,e[26]=p,e[27]=k):k=e[27];let w;e[28]!==c||e[29]!==p?(w=()=>{p!==null&&c.onChange(null)},e[28]=c,e[29]=p,e[30]=w):w=e[30];let S;e[31]!==i?(S=i("chat.userAskQuestion.somethingElsePlaceholder"),e[31]=i,e[32]=S):S=e[32];let N;e[33]!==i?(N=i("chat.userAskQuestion.customChoiceInputAriaLabel"),e[33]=i,e[34]=N):N=e[34];let I;e[35]!==y||e[36]!==k||e[37]!==w||e[38]!==S||e[39]!==N?(I=o.jsx("input",{type:"text",value:y,onChange:k,onFocus:w,placeholder:S,"aria-label":N,className:"flex-1 text-sm bg-transparent outline-none placeholder:text-foreground/25 text-foreground min-w-0"}),e[35]=y,e[36]=k,e[37]=w,e[38]=S,e[39]=N,e[40]=I):I=e[40];let C;e[41]!==A||e[42]!==I?(C=o.jsxs("label",{className:A,children:[j,I]}),e[41]=A,e[42]=I,e[43]=C):C=e[43];let M;e[44]!==C||e[45]!==g||e[46]!==v?(M=o.jsx(dt,{children:o.jsxs("div",{className:"flex flex-col px-2",role:"group","aria-label":g,children:[v,C]})}),e[44]=C,e[45]=g,e[46]=v,e[47]=M):M=e[47];let D;e[48]===Symbol.for("react.memo_cache_sentinel")?(D=o.jsx(ut,{}),e[48]=D):D=e[48];let E;return e[49]!==M?(E=o.jsxs(ct,{children:[M,D]}),e[49]=M,e[50]=E):E=e[50],E}function Rr(t){const e=R.c(8),{control:s,name:n}=t,r=K();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=["yes","no"],e[0]=i):i=e[0];const a=i,l=P.useRef(null);let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=V=>{l.current?.onChange(a[V]??"")},e[1]=c):c=e[1],gs(a.length,c);let d;e[2]!==r?(d=V=>{const{field:p}=V;return l.current=p,o.jsxs(ct,{children:[o.jsx(dt,{children:o.jsx("div",{className:"flex gap-2 px-2",role:"group","aria-label":r("chat.userAskQuestion.confirmationOptionsAriaLabel"),children:a.map(f=>{const h=p.value===f;return o.jsxs("button",{type:"button",onClick:()=>p.onChange(f),className:O("flex items-center gap-3 px-4 py-3 rounded-lg text-left transition-colors flex-1",h&&"bg-accent/50",!h&&"hover:bg-accent/30"),"aria-label":r("chat.userAskQuestion.confirmValue",{value:r(`chat.userAskQuestion.confirm${f==="yes"?"Yes":"No"}`)}),children:[o.jsx("span",{className:O("flex items-center justify-center size-6 rounded-md text-sm shrink-0",h?"bg-chart-1 text-white":"bg-muted text-foreground"),children:f==="yes"?1:2}),o.jsx("span",{className:"text-sm text-foreground capitalize",children:r(`chat.userAskQuestion.confirm${f==="yes"?"Yes":"No"}`)})]},f)})})}),o.jsx(ut,{})]})},e[2]=r,e[3]=d):d=e[3];let u;return e[4]!==s||e[5]!==n||e[6]!==d?(u=o.jsx(Jt,{control:s,name:n,render:d}),e[4]=s,e[5]=n,e[6]=d,e[7]=u):u=e[7],u}function Tt(t){const e=R.c(13),{input:s,control:n,toolCallId:r}=t;switch(s.type){case"text":{const i=`${r}.response`;let a;return e[0]!==n||e[1]!==s.default||e[2]!==i?(a=o.jsx(Mr,{control:n,name:i,placeholder:s.default}),e[0]=n,e[1]=s.default,e[2]=i,e[3]=a):a=e[3],a}case"choice":{let i;e[4]!==s.options?(i=s.options?.filter(Boolean)??[],e[4]=s.options,e[5]=i):i=e[5];const a=i;let l;return e[6]!==n||e[7]!==a||e[8]!==r?(l=o.jsx(Dr,{control:n,name:r,options:a}),e[6]=n,e[7]=a,e[8]=r,e[9]=l):l=e[9],l}case"confirm":{const i=`${r}.response`;let a;return e[10]!==n||e[11]!==i?(a=o.jsx(Rr,{control:n,name:i}),e[10]=n,e[11]=i,e[12]=a):a=e[12],a}default:return null}}function Er(t){const e=R.c(91),{parts:s,isStreaming:n,onSubmit:r}=t;let i;e[0]!==s?(i=_r(s.map(Fr)),e[0]=s,e[1]=i):i=e[1];const a=i;let l;e[2]!==s?(l=Object.fromEntries(s.map(Lr)),e[2]=s,e[3]=l):l=e[3];const c=l;let d;e[4]!==r?(d=($,z)=>{const Q=ms(z);Q&&r($,Q)},e[4]=r,e[5]=d):d=e[5];let u;e[6]!==c||e[7]!==n||e[8]!==s||e[9]!==a||e[10]!==d?(u={parts:s,partKey:Ur,schema:a,defaultValues:c,isStreaming:n,hasAnswer:Pr,onSubmit:d},e[6]=c,e[7]=n,e[8]=s,e[9]=a,e[10]=d,e[11]=u):u=e[11];const V=us(u),p=V.currentPart,f=K();let h;e[12]!==p||e[13]!==V||e[14]!==f?(h=()=>{const $=p;if(!$)return;const z=f("chat.userAskQuestion.skipMessage"),Q=$.toolCallId;$.input?.type==="choice"?(V.form.setValue(`${Q}.option`,null),V.form.setValue(`${Q}.draft`,z)):V.form.setValue(`${Q}.response`,z),V.advanceToNextUnanswered()},e[12]=p,e[13]=V,e[14]=f,e[15]=h):h=e[15];const m=h;let g;e[16]!==V.currentIndex||e[17]!==V.goNext||e[18]!==V.goPrev||e[19]!==s.length?(g=o.jsx(cs,{currentIndex:V.currentIndex,total:s.length,onPrev:V.goPrev,onNext:V.goNext}),e[16]=V.currentIndex,e[17]=V.goNext,e[18]=V.goPrev,e[19]=s.length,e[20]=g):g=e[20];const v=g;let x;e[21]!==f?(x=f("chat.userAskQuestion.skip"),e[21]=f,e[22]=x):x=e[22];let b;e[23]!==m||e[24]!==x?(b=o.jsx(G,{type:"button",variant:"outline",size:"sm",onClick:m,className:"h-7",children:x}),e[23]=m,e[24]=x,e[25]=b):b=e[25];let A;e[26]!==V.isAllAnswered||e[27]!==V.isCurrentAnswered||e[28]!==V.submitOrAdvance||e[29]!==n?(A=o.jsx(fr,{isStreaming:n,isAllAnswered:V.isAllAnswered,isCurrentAnswered:V.isCurrentAnswered,onAdvanceOrSubmit:V.submitOrAdvance}),e[26]=V.isAllAnswered,e[27]=V.isCurrentAnswered,e[28]=V.submitOrAdvance,e[29]=n,e[30]=A):A=e[30];let j;e[31]!==b||e[32]!==A?(j=o.jsxs(o.Fragment,{children:[b,A]}),e[31]=b,e[32]=A,e[33]=j):j=e[33];const y=j;if(s.length===1){const $=s[0];if(!$?.input)return null;const z=V.form;let Q;e[34]!==V?(Q=X=>{X.preventDefault(),V.submit()},e[34]=V,e[35]=Q):Q=e[35];let ee;e[36]===Symbol.for("react.memo_cache_sentinel")?(ee=o.jsx(nt,{size:14}),e[36]=ee):ee=e[36];let te;e[37]!==f?(te=f("chat.userAskQuestion.questionPending"),e[37]=f,e[38]=te):te=e[38];let H;e[39]!==$.input?.prompt||e[40]!==f?(H=$.input?.prompt??f("chat.userAskQuestion.question"),e[39]=$.input?.prompt,e[40]=f,e[41]=H):H=e[41];const oe=$.input;let _;e[42]!==V.form.control||e[43]!==$.toolCallId||e[44]!==oe?(_=o.jsx(Tt,{input:oe,control:V.form.control,toolCallId:$.toolCallId}),e[42]=V.form.control,e[43]=$.toolCallId,e[44]=oe,e[45]=_):_=e[45];let B;e[46]!==y||e[47]!==te||e[48]!==H||e[49]!==_?(B=o.jsx(pe,{icon:ee,label:te,title:H,defaultExpanded:!0,footerRight:y,children:_}),e[46]=y,e[47]=te,e[48]=H,e[49]=_,e[50]=B):B=e[50];let J;e[51]!==Q||e[52]!==B?(J=o.jsx("form",{onSubmit:Q,autoComplete:"off",children:B}),e[51]=Q,e[52]=B,e[53]=J):J=e[53];let Z;return e[54]!==V.form||e[55]!==J?(Z=o.jsx(ot,{...z,children:J}),e[54]=V.form,e[55]=J,e[56]=Z):Z=e[56],Z}const k=V.form;let w;e[57]!==V?(w=$=>{$.preventDefault(),V.submit()},e[57]=V,e[58]=w):w=e[58];let S;e[59]===Symbol.for("react.memo_cache_sentinel")?(S=o.jsx(nt,{size:14}),e[59]=S):S=e[59];let N;e[60]!==f?(N=f("chat.userAskQuestion.questionPending"),e[60]=f,e[61]=N):N=e[61];const I=V.currentIndex+1;let C;e[62]!==s.length||e[63]!==f||e[64]!==I?(C=f("chat.userAskQuestion.questionCount",{current:I,total:s.length}),e[62]=s.length,e[63]=f,e[64]=I,e[65]=C):C=e[65];let M;e[66]!==p?.input?.prompt||e[67]!==f?(M=p?.input?.prompt??f("chat.userAskQuestion.question"),e[66]=p?.input?.prompt,e[67]=f,e[68]=M):M=e[68];const D=V.activeKey,E=V.setActiveKey;let U;if(e[69]!==V.form||e[70]!==s){let $;e[72]!==V.form?($=z=>o.jsx(ro,{value:z.toolCallId,className:"mt-0",children:o.jsx(Tt,{input:z.input,control:V.form.control,toolCallId:z.toolCallId})},z.toolCallId),e[72]=V.form,e[73]=$):$=e[73],U=s.map($),e[69]=V.form,e[70]=s,e[71]=U}else U=e[71];let T;e[74]!==V.activeKey||e[75]!==V.setActiveKey||e[76]!==U?(T=o.jsx(io,{value:D,onValueChange:E,children:U}),e[74]=V.activeKey,e[75]=V.setActiveKey,e[76]=U,e[77]=T):T=e[77];let L;e[78]!==v||e[79]!==y||e[80]!==N||e[81]!==C||e[82]!==M||e[83]!==T?(L=o.jsx(pe,{icon:S,label:N,count:C,title:M,defaultExpanded:!0,footerLeft:v,footerRight:y,children:T}),e[78]=v,e[79]=y,e[80]=N,e[81]=C,e[82]=M,e[83]=T,e[84]=L):L=e[84];let F;e[85]!==w||e[86]!==L?(F=o.jsx("form",{onSubmit:w,autoComplete:"off",children:L}),e[85]=w,e[86]=L,e[87]=F):F=e[87];let W;return e[88]!==V.form||e[89]!==F?(W=o.jsx(ot,{...k,children:F}),e[88]=V.form,e[89]=F,e[90]=W):W=e[90],W}function Pr(t){return!!ms(t)}function Ur(t){return t.toolCallId}function Lr(t){return t.input?.type==="choice"?[t.toolCallId,{option:null,draft:""}]:[t.toolCallId,{response:""}]}function Fr(t){return{toolCallId:t.toolCallId,input:t.input}}function zr(){const t=R.c(5),e=K();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx(nt,{className:"size-5 text-muted-foreground shimmer"}),t[0]=s):s=t[0];let n;t[1]!==e?(n=e("chat.userAskQuestion.preparingQuestion"),t[1]=e,t[2]=n):n=t[2];let r;return t[3]!==n?(r=o.jsxs("div",{className:"flex items-center gap-2 p-4 border border-dashed rounded-lg bg-accent/50 w-[calc(100%-16px)] max-w-[640px] mx-auto mb-2",children:[s,o.jsx("span",{className:"text-sm text-muted-foreground shimmer",children:n})]}),t[3]=n,t[4]=r):r=t[4],r}function xs(t){const e=R.c(7),{userAskParts:s,isStreaming:n,onSubmit:r}=t;let i;e[0]!==s?(i=s.filter(Or),e[0]=s,e[1]=i):i=e[1];const a=i;if(a.length===0){if(n){let c;return e[2]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx(zr,{}),e[2]=c):c=e[2],c}return null}let l;return e[3]!==n||e[4]!==r||e[5]!==a?(l=o.jsx(Er,{parts:a,isStreaming:n,onSubmit:r}),e[3]=n,e[4]=r,e[5]=a,e[6]=l):l=e[6],l}function Or(t){return t.state==="input-available"}function $r(t){const e=R.c(33),{parts:s,isStreaming:n,onRespond:r}=t,i=K();let a;e[0]!==s?(a=s.at(-1),e[0]=s,e[1]=a):a=e[1];const l=a,c=l?.input;if(!l||!c?.title)return null;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(Qt,{size:14}),e[2]=d):d=e[2];let u;e[3]!==i?(u=i("chat.suggestTask.label"),e[3]=i,e[4]=u):u=e[4];const V=c.title;let p;e[5]!==r||e[6]!==l?(p=()=>r(l,!1),e[5]=r,e[6]=l,e[7]=p):p=e[7];let f;e[8]!==i?(f=i("chat.suggestTask.notNow"),e[8]=i,e[9]=f):f=e[9];let h;e[10]!==n||e[11]!==p||e[12]!==f?(h=o.jsx(G,{type:"button",size:"sm",variant:"outline",className:"h-7",disabled:n,onClick:p,children:f}),e[10]=n,e[11]=p,e[12]=f,e[13]=h):h=e[13];let m;e[14]!==r||e[15]!==l?(m=()=>r(l,!0),e[14]=r,e[15]=l,e[16]=m):m=e[16];let g;e[17]!==i?(g=i("chat.suggestTask.create"),e[17]=i,e[18]=g):g=e[18];let v;e[19]!==n||e[20]!==m||e[21]!==g?(v=o.jsx(G,{type:"button",size:"sm",className:"h-7",disabled:n,onClick:m,children:g}),e[19]=n,e[20]=m,e[21]=g,e[22]=v):v=e[22];let x;e[23]!==v||e[24]!==h?(x=o.jsxs(o.Fragment,{children:[h,v]}),e[23]=v,e[24]=h,e[25]=x):x=e[25];let b;e[26]!==c.summary?(b=c.summary?o.jsx("p",{className:"px-4 pb-1 text-sm leading-snug text-muted-foreground whitespace-pre-wrap",children:c.summary}):null,e[26]=c.summary,e[27]=b):b=e[27];let A;return e[28]!==c.title||e[29]!==x||e[30]!==b||e[31]!==u?(A=o.jsx(pe,{icon:d,label:u,title:V,defaultExpanded:!0,footerRight:x,children:b}),e[28]=c.title,e[29]=x,e[30]=b,e[31]=u,e[32]=A):A=e[32],A}function Br(t){const e=t.filter(i=>i.status==="in_progress"),s=t.filter(i=>i.status==="completed").length,n=t.length;if(n>0&&s===n)return{icon:"completed",activity:"All done",progress:`${n}/${n}`};const[r]=e;return r&&e.length===1?{icon:"in_progress",activity:r.activeForm,progress:`${s}/${n} done`}:e.length>1?{icon:"in_progress",activity:`${e.length} in progress`,progress:`${s}/${n} done`}:s>0?{icon:"pending",activity:`${n-s} pending`,progress:`${s}/${n} done`}:{icon:"pending",activity:`${n} todos`,progress:"not started"}}function Kr(t){const e=R.c(13),{todos:s}=t;if(s.length===0)return null;let n;e[0]!==s?(n=Br(s),e[0]=s,e[1]=n):n=e[1];const r=n;let i;e[2]!==r.icon?(i=o.jsx(Wr,{status:r.icon}),e[2]=r.icon,e[3]=i):i=e[3];const a=r.activity,l=r.progress;let c;e[4]!==s?(c=s.map(qr),e[4]=s,e[5]=c):c=e[5];let d;e[6]!==c?(d=o.jsx("ul",{"data-testid":"todos-list",className:"flex flex-col px-2 max-h-[40vh] overflow-y-auto",children:c}),e[6]=c,e[7]=d):d=e[7];let u;return e[8]!==r.activity||e[9]!==r.progress||e[10]!==i||e[11]!==d?(u=o.jsx(pe,{icon:i,label:a,count:l,defaultExpanded:!1,children:d}),e[8]=r.activity,e[9]=r.progress,e[10]=i,e[11]=d,e[12]=u):u=e[12],u}function qr(t,e){return o.jsx(Qr,{todo:t},e)}function Qr(t){const e=R.c(14),{todo:s}=t,n=s.status==="completed",i=s.status==="in_progress"?s.activeForm:s.content;let a;e[0]!==s.status?(a=o.jsx(Yr,{status:s.status}),e[0]=s.status,e[1]=a):a=e[1];const l=n&&"text-muted-foreground";let c;e[2]!==l?(c=O("relative text-sm leading-snug pt-px select-none",l),e[2]=l,e[3]=c):c=e[3];const d=n?"100%":"0%",u=n?"width 300ms ease 200ms":"width 150ms ease";let V;e[4]!==d||e[5]!==u?(V=o.jsx("span",{"aria-hidden":"true",style:{position:"absolute",left:0,top:"50%",height:"1px",background:"currentColor",width:d,transition:u}}),e[4]=d,e[5]=u,e[6]=V):V=e[6];let p;e[7]!==i||e[8]!==c||e[9]!==V?(p=o.jsxs("span",{className:c,children:[i,V]}),e[7]=i,e[8]=c,e[9]=V,e[10]=p):p=e[10];let f;return e[11]!==a||e[12]!==p?(f=o.jsxs("li",{className:"flex items-start gap-2.5 px-2 py-1.5 rounded-lg hover:bg-accent/50 transition-colors",children:[a,p]}),e[11]=a,e[12]=p,e[13]=f):f=e[13],f}function Yr(t){const e=R.c(4),{status:s}=t,n=s==="completed"?"true":void 0,r=s==="in_progress"?"true":void 0;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("svg",{viewBox:"0 0 21 21",children:o.jsx("path",{d:"M5,10.75 L8.5,14.25 L19.4,2.3 C18.8333333,1.43333333 18.0333333,1 17,1 L4,1 C2.35,1 1,2.35 1,4 L1,17 C1,18.65 2.35,20 4,20 L17,20 C18.65,20 20,18.65 20,17 L20,7.99769186"})}),e[0]=i):i=e[0];let a;return e[1]!==n||e[2]!==r?(a=o.jsx("div",{className:"todo-cb mt-0.5","data-checked":n,"data-progress":r,"aria-hidden":"true",children:i}),e[1]=n,e[2]=r,e[3]=a):a=e[3],a}function Wr(t){const e=R.c(13),{status:s}=t,n=K();if(s==="completed"){let a;e[0]!==n?(a=n("chat.todoStatus.completed"),e[0]=n,e[1]=a):a=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx("svg",{viewBox:"0 0 10 8",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",className:"w-2 h-2 text-primary-foreground",style:{strokeWidth:2},children:o.jsx("path",{d:"M1 4l2.5 2.5L9 1"})}),e[2]=l):l=e[2];let c;return e[3]!==a?(c=o.jsx("span",{"aria-label":a,className:"inline-flex items-center justify-center w-3.5 h-3.5 rounded-sm bg-primary",children:l}),e[3]=a,e[4]=c):c=e[4],c}if(s==="in_progress"){let a;e[5]!==n?(a=n("chat.todoStatus.inProgress"),e[5]=n,e[6]=a):a=e[6];let l;return e[7]!==a?(l=o.jsx("span",{"aria-label":a,className:"inline-block w-2 h-2 rounded-full bg-primary animate-pulse shrink-0"}),e[7]=a,e[8]=l):l=e[8],l}let r;e[9]!==n?(r=n("chat.todoStatus.pending"),e[9]=n,e[10]=r):r=e[10];let i;return e[11]!==r?(i=o.jsx("span",{"aria-label":r,className:"inline-block w-3.5 h-3.5 rounded-sm border-[1.5px] border-muted-foreground/50 shrink-0"}),e[11]=r,e[12]=i):i=e[12],i}const Gr={usd:[{dollars:10,labelKey:"credits.topUp.starter"},{dollars:20,labelKey:"credits.topUp.popular"},{dollars:100,labelKey:"credits.topUp.bestValue"}],brl:[{dollars:50,labelKey:"credits.topUp.starter"},{dollars:100,labelKey:"credits.topUp.popular"},{dollars:500,labelKey:"credits.topUp.bestValue"}]},Hr={"credits.topUp.starter":"starter","credits.topUp.popular":"popular","credits.topUp.bestValue":"best_value"};function Jr(t){const e=R.c(46),{source:s,onDone:n}=t,r=K(),i=_s(),[a]=Ne(),[l,c]=P.useState(a.language==="pt-BR"?"brl":"usd"),[d,u]=P.useState(""),[V,p]=P.useState(!1),f=l==="brl"?"R$":"$";let h;e[0]!==l||e[1]!==i?(h=async T=>{const{url:L}=await i.call("AI_PROVIDER_TOPUP_URL",{providerId:"deco",amountCents:T,currency:l});return L},e[0]=l,e[1]=i,e[2]=h):h=e[2];let m;e[3]!==n?(m=T=>{T&&window.open(T,"_blank","noopener,noreferrer"),n?.()},e[3]=n,e[4]=m):m=e[4];let g;e[5]!==r?(g=T=>{Ue.error(r("credits.topUp.failed",{message:T.message}))},e[5]=r,e[6]=g):g=e[6];let v;e[7]!==h||e[8]!==m||e[9]!==g?(v={mutationFn:h,onSuccess:m,onError:g},e[7]=h,e[8]=m,e[9]=g,e[10]=v):v=e[10];const{mutate:x,isPending:b}=Ms(v);let A;e[11]!==l||e[12]!==s||e[13]!==x?(A=(T,L)=>{se("credits_topup_clicked",{amount_cents:T,currency:l,tier_label:L,source:s}),x(T)},e[11]=l,e[12]=s,e[13]=x,e[14]=A):A=e[14];const j=A,y=parseFloat(d),k=!isNaN(y)&&y>=1;let w,S,N;e[15]===Symbol.for("react.memo_cache_sentinel")?(w=T=>{T&&c(T)},S=o.jsx(yt,{value:"usd",className:"h-8 px-3 text-xs",children:"USD"}),N=o.jsx(yt,{value:"brl",className:"h-8 px-3 text-xs",children:"BRL"}),e[15]=w,e[16]=S,e[17]=N):(w=e[15],S=e[16],N=e[17]);let I;e[18]!==l?(I=o.jsx("div",{className:"mb-4",children:o.jsxs(uo,{type:"single",variant:"outline",size:"sm",value:l,onValueChange:w,children:[S,N]})}),e[18]=l,e[19]=I):I=e[19];const C=Gr[l];let M;if(e[20]!==j||e[21]!==f||e[22]!==b||e[23]!==r||e[24]!==C){let T;e[26]!==j||e[27]!==f||e[28]!==b||e[29]!==r?(T=L=>{const{dollars:F,labelKey:W}=L;return o.jsxs("button",{type:"button",disabled:b,onClick:()=>j(F*100,Hr[W]??"preset"),className:O("relative flex flex-col items-center gap-1 py-5 rounded-xl border transition-all duration-150 cursor-pointer","disabled:opacity-50 disabled:cursor-wait","border-border hover:border-foreground/20 hover:bg-muted/30"),children:[o.jsxs("span",{className:"text-2xl font-semibold tabular-nums text-foreground",children:[f,F]}),o.jsx("span",{className:"text-xs text-muted-foreground",children:r(W)})]},F)},e[26]=j,e[27]=f,e[28]=b,e[29]=r,e[30]=T):T=e[30],M=C.map(T),e[20]=j,e[21]=f,e[22]=b,e[23]=r,e[24]=C,e[25]=M}else M=e[25];let D;e[31]!==M?(D=o.jsx("div",{className:"grid grid-cols-3 gap-2.5",children:M}),e[31]=M,e[32]=D):D=e[32];let E;e[33]!==j||e[34]!==f||e[35]!==d||e[36]!==y||e[37]!==k||e[38]!==b||e[39]!==V||e[40]!==r?(E=V?o.jsxs("div",{className:"flex gap-2 mt-3",children:[o.jsxs("div",{className:"relative flex-1",children:[o.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground select-none",children:f}),o.jsx(Ds,{type:"number",min:"1",step:"1",placeholder:r("credits.topUp.customPlaceholder"),value:d,onChange:T=>u(T.target.value),className:"h-10 text-sm pl-7",autoFocus:!0})]}),o.jsx(G,{className:"h-10",disabled:!k||b,onClick:()=>j(Math.round(y*100),"custom"),children:r(b?"credits.topUp.opening":"credits.topUp.add")})]}):o.jsx("button",{type:"button",className:"w-full mt-3 text-xs text-muted-foreground hover:text-foreground transition-colors py-1",onClick:()=>p(!0),children:r("credits.topUp.enterCustom")}),e[33]=j,e[34]=f,e[35]=d,e[36]=y,e[37]=k,e[38]=b,e[39]=V,e[40]=r,e[41]=E):E=e[41];let U;return e[42]!==D||e[43]!==E||e[44]!==I?(U=o.jsxs("div",{children:[I,D,E]}),e[42]=D,e[43]=E,e[44]=I,e[45]=U):U=e[45],U}const Zr=["chat.creditsExhaustedBanner.benefit1","chat.creditsExhaustedBanner.benefit2","chat.creditsExhaustedBanner.benefit3"];function Xr(t){const e=R.c(47),{onDismiss:s}=t,{org:n}=Ie(),r=at(),{decoKeyId:i}=co(),a=K(),l=$e("credits");let c,d;if(e[0]!==n.id?(c=()=>{se("credits_exhausted_shown",{organization_id:n.id})},d=[n.id],e[0]=n.id,e[1]=c,e[2]=d):(c=e[1],d=e[2]),P.useEffect(c,d),!l)return null;let u;e[3]!==s?(u=C=>!C&&s?.(),e[3]=s,e[4]=u):u=e[4];let V;e[5]===Symbol.for("react.memo_cache_sentinel")?(V=["radial-gradient(ellipse 40% 200% at -5% 100%, rgba(165,149,255,0.5) 0%, transparent 100%)","radial-gradient(ellipse 40% 200% at 105% -10%, rgba(208,236,26,0.45) 0%, transparent 100%)"],e[5]=V):V=e[5];let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx("div",{className:"absolute inset-x-0 top-0 h-36 pointer-events-none",style:{backgroundImage:V.join(", "),maskImage:"linear-gradient(to bottom, black 0%, transparent 100%)",WebkitMaskImage:"linear-gradient(to bottom, black 0%, transparent 100%)"}}),e[6]=p):p=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=o.jsx("img",{src:"/logos/deco%20logo.svg",alt:"Deco AI Gateway",className:"size-9 rounded-lg object-contain dark:bg-white dark:p-0.5"}),e[7]=f):f=e[7];let h;e[8]!==a?(h=a("chat.creditsExhaustedBanner.title"),e[8]=a,e[9]=h):h=e[9];let m;e[10]!==h?(m=o.jsx(Rs,{className:"text-xl font-semibold tracking-tight",children:h}),e[10]=h,e[11]=m):m=e[11];let g;e[12]!==a?(g=a("chat.creditsExhaustedBanner.description"),e[12]=a,e[13]=g):g=e[13];let v;e[14]!==g?(v=o.jsx(Es,{className:"mt-1.5 text-sm leading-relaxed",children:g}),e[14]=g,e[15]=v):v=e[15];let x;e[16]!==v||e[17]!==m?(x=o.jsxs("div",{className:"relative px-8 pt-8 pb-2 overflow-hidden",children:[p,o.jsxs(Ps,{className:"relative gap-4",children:[f,o.jsxs("div",{children:[m,v]})]})]}),e[16]=v,e[17]=m,e[18]=x):x=e[18];let b;e[19]!==i||e[20]!==s||e[21]!==a?(b=i&&o.jsxs("div",{className:"px-8 pt-5 pb-6",children:[o.jsx("div",{className:"rounded-xl border border-border p-5",children:o.jsx(Jr,{source:"exhausted_banner",onDone:s})}),o.jsx("div",{className:"mt-5 rounded-xl bg-muted/25 border border-border/50 p-4 space-y-3",children:Zr.map(C=>o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"flex items-center justify-center size-5 rounded-full bg-success/15 shrink-0",children:o.jsx(lt,{size:12,className:"text-success"})}),o.jsx("span",{className:"text-sm text-foreground/80",children:a(C)})]},C))})]}),e[19]=i,e[20]=s,e[21]=a,e[22]=b):b=e[22];let A;e[23]!==a?(A=a("chat.creditsExhaustedBanner.dismiss"),e[23]=a,e[24]=A):A=e[24];let j;e[25]!==s||e[26]!==A?(j=o.jsx(G,{variant:"ghost",size:"sm",onClick:s,children:A}),e[25]=s,e[26]=A,e[27]=j):j=e[27];let y;e[28]!==r||e[29]!==s||e[30]!==n.slug?(y=()=>{r({to:"/$org/settings/ai-providers",params:{org:n.slug}}),s?.()},e[28]=r,e[29]=s,e[30]=n.slug,e[31]=y):y=e[31];let k;e[32]!==a?(k=a("chat.creditsExhaustedBanner.manageProviders"),e[32]=a,e[33]=k):k=e[33];let w;e[34]!==y||e[35]!==k?(w=o.jsx("button",{type:"button",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",onClick:y,children:k}),e[34]=y,e[35]=k,e[36]=w):w=e[36];let S;e[37]!==j||e[38]!==w?(S=o.jsxs("div",{className:"px-8 py-4 border-t border-border bg-muted/30 flex items-center justify-between",children:[j,w]}),e[37]=j,e[38]=w,e[39]=S):S=e[39];let N;e[40]!==x||e[41]!==b||e[42]!==S?(N=o.jsxs(Us,{className:"sm:max-w-[520px] gap-0 p-0 overflow-hidden",onOpenAutoFocus:ei,children:[x,b,S]}),e[40]=x,e[41]=b,e[42]=S,e[43]=N):N=e[43];let I;return e[44]!==N||e[45]!==u?(I=o.jsx(Ls,{open:!0,onOpenChange:u,children:N}),e[44]=N,e[45]=u,e[46]=I):I=e[46],I}function ei(t){return t.preventDefault()}const ti={trial_exhausted:{label:"chat.subscriptionLimit.trialLabel",title:"chat.subscriptionLimit.trialTitle"},monthly_exhausted:{label:"chat.subscriptionLimit.monthlyLabel",title:"chat.subscriptionLimit.monthlyTitle"},runs_exhausted:{label:"chat.subscriptionLimit.runsLabel",title:"chat.subscriptionLimit.runsTitle"}};function si(t){const e=R.c(16),{kind:s,onDismiss:n,onSubscribe:r}=t,i=K(),{label:a,title:l}=ti[s];let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx(Vt,{size:14}),e[0]=c):c=e[0];let d;e[1]!==a||e[2]!==i?(d=i(a),e[1]=a,e[2]=i,e[3]=d):d=e[3];let u;e[4]!==i||e[5]!==l?(u=i(l),e[4]=i,e[5]=l,e[6]=u):u=e[6];let V;e[7]!==s||e[8]!==r||e[9]!==i?(V=s==="trial_exhausted"?o.jsx(G,{size:"sm",onClick:r,className:"h-7 text-xs",children:i("chat.subscriptionLimit.subscribeButton")}):void 0,e[7]=s,e[8]=r,e[9]=i,e[10]=V):V=e[10];let p;return e[11]!==n||e[12]!==d||e[13]!==u||e[14]!==V?(p=o.jsx(pe,{icon:c,label:d,title:u,defaultExpanded:!0,variant:"warning",onClose:n,footerRight:V}),e[11]=n,e[12]=d,e[13]=u,e[14]=V,e[15]=p):p=e[15],p}const ni={ai_budget_exhausted:{label:"chat.planRefused.budgetLabel",title:"chat.planRefused.budgetTitle"},feature_not_in_plan:{label:"chat.planRefused.featureLabel",title:"chat.planRefused.featureTitle"}};function _t(t){const e=R.c(21),{kind:s,onDismiss:n}=t,r=K(),i=at(),{org:a}=Ie(),{label:l,title:c}=ni[s];let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(Vt,{size:14}),e[0]=d):d=e[0];let u;e[1]!==l||e[2]!==r?(u=r(l),e[1]=l,e[2]=r,e[3]=u):u=e[3];let V;e[4]!==r||e[5]!==c?(V=r(c),e[4]=r,e[5]=c,e[6]=V):V=e[6];let p;e[7]!==i||e[8]!==n||e[9]!==a.slug?(p=()=>{i({to:"/$org/settings/ai-providers",params:{org:a.slug}}),n()},e[7]=i,e[8]=n,e[9]=a.slug,e[10]=p):p=e[10];let f;e[11]!==r?(f=r("chat.planRefused.seePlans"),e[11]=r,e[12]=f):f=e[12];let h;e[13]!==p||e[14]!==f?(h=o.jsx(G,{size:"sm",className:"h-7 text-xs",onClick:p,children:f}),e[13]=p,e[14]=f,e[15]=h):h=e[15];let m;return e[16]!==n||e[17]!==u||e[18]!==V||e[19]!==h?(m=o.jsx(pe,{icon:d,label:u,title:V,defaultExpanded:!0,variant:"warning",onClose:n,footerRight:h}),e[16]=n,e[17]=u,e[18]=V,e[19]=h,e[20]=m):m=e[20],m}function vs(t){const e=oi(t);if(e!==null){const d=vs(e);return{summary:d.summary,rawDetails:d.rawDetails??t}}const s=t.trim(),n=s.startsWith("<")&&/<[a-z][\s\S]*>/i.test(s),r=/cloudflare|cf-[a-z-]+|error[\s_-]?code[\s_-]?5\d\d/i.test(s),i=/failed to fetch|networkerror|load failed|offline/i.test(s),a=/timeout|timed out|aborted|deadline/i.test(s),l=s.length>240,c=/sandbox failed to start(?::\s*(.+))?/is.exec(s);if(c){const d=c[1]?.trim().replace(/\.$/,"");return{summary:d?`Your sandbox didn't finish starting up (${d}). Try again.`:"Your sandbox didn't finish starting up. Try again.",rawDetails:t}}return r||n&&l?{summary:"Our servers are having a moment. Try sending again in a few seconds.",rawDetails:t}:i?{summary:"Lost connection. Check your network and try again.",rawDetails:t}:a?{summary:"That took longer than expected. Try again.",rawDetails:t}:n||l?{summary:"Something unexpected came back from the server. Try again.",rawDetails:t}:{summary:t,rawDetails:null}}function oi(t){const e=t.trim();if(!e.startsWith("{"))return null;let s;try{s=JSON.parse(e)}catch{return null}if(!s||typeof s!="object")return null;const{error:n,message:r}=s,i=typeof n=="string"?n:r;return typeof i=="string"&&i.trim()&&!i.trim().startsWith("{")?i:null}const ri={length:"chat.highlight.warningDescriptionLength","content-filter":"chat.highlight.warningDescriptionContentFilter","tool-calls":"chat.highlight.warningDescriptionToolCalls"};function Ye(t){const e=R.c(29),s=K(),{variant:n,onDismiss:r}=t,i=n==="error";let a;e[0]!==i||e[1]!==s?(a=s(i?"chat.highlight.errorOccurred":"chat.highlight.responseIncomplete"),e[0]=i,e[1]=s,e[2]=a):a=e[2];const l=a,c=i?Jn:zs;let d;e[3]!==t.error||e[4]!==t.finishReason||e[5]!==t.variant||e[6]!==s?(d=t.variant==="error"?t.error.message:(()=>{const x=ri[t.finishReason];return x?s(x):s("chat.highlight.responseStoppedUnexpectedly",{reason:t.finishReason})})(),e[3]=t.error,e[4]=t.finishReason,e[5]=t.variant,e[6]=s,e[7]=d):d=e[7];const u=d;let V;e[8]!==i||e[9]!==u?(V=i?vs(u):{summary:u,rawDetails:null},e[8]=i,e[9]=u,e[10]=V):V=e[10];const{summary:p,rawDetails:f}=V;let h;e[11]!==c?(h=o.jsx(c,{size:14}),e[11]=c,e[12]=h):h=e[12];let m;e[13]!==i||e[14]!==t.onContinue||e[15]!==t.onFixInChat||e[16]!==s?(m=i?o.jsx(G,{size:"sm",variant:"outline",onClick:t.onFixInChat,className:"h-7 text-xs",children:s("chat.highlight.fixInChat")}):o.jsx(G,{size:"sm",variant:"outline",onClick:t.onContinue,className:"h-7 text-xs",children:s("chat.highlight.continue")}),e[13]=i,e[14]=t.onContinue,e[15]=t.onFixInChat,e[16]=s,e[17]=m):m=e[17];let g;e[18]!==f||e[19]!==s?(g=f?o.jsxs("details",{className:"group mx-4",children:[o.jsxs("summary",{className:"flex cursor-pointer list-none items-center gap-1.5 text-xs text-muted-foreground transition-colors hover:text-foreground [&::-webkit-details-marker]:hidden",children:[o.jsx("svg",{"aria-hidden":"true",className:"size-3 transition-transform group-open:rotate-90",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"m4.5 3 3 3-3 3"})}),o.jsx("span",{className:"group-open:hidden",children:s("chat.highlight.showTechnicalDetails")}),o.jsx("span",{className:"hidden group-open:inline",children:s("chat.highlight.hideTechnicalDetails")})]}),o.jsxs("div",{className:"relative mt-2",children:[o.jsx("button",{type:"button",onClick:()=>{navigator.clipboard.writeText(f).then(()=>Ue.success(s("chat.highlight.copiedToClipboard"))).catch(()=>Ue.error(s("chat.highlight.couldNotCopy")))},"aria-label":s("chat.highlight.copyErrorDetails"),title:s("chat.highlight.copy"),className:"absolute right-1.5 top-1.5 z-10 flex h-6 w-6 items-center justify-center rounded-lg bg-background/80 text-muted-foreground backdrop-blur-sm transition-colors hover:bg-background hover:text-foreground",children:o.jsx(Zn,{className:"size-3.5"})}),o.jsx("pre",{className:"max-h-40 overflow-auto rounded-md border border-border/60 bg-background px-3 py-2 pr-8 font-mono text-xs text-foreground/80 whitespace-pre-wrap break-all",children:f})]})]}):null,e[18]=f,e[19]=s,e[20]=g):g=e[20];let v;return e[21]!==l||e[22]!==r||e[23]!==p||e[24]!==h||e[25]!==m||e[26]!==g||e[27]!==n?(v=o.jsx(pe,{icon:h,label:l,title:p,defaultExpanded:!0,variant:n,onClose:r,footerRight:m,children:g}),e[21]=l,e[22]=r,e[23]=p,e[24]=h,e[25]=m,e[26]=g,e[27]=n,e[28]=v):v=e[28],v}function Be(t){const e=R.c(78);let s;e[0]!==t?(s=t===void 0?{}:t,e[0]=t,e[1]=s):s=e[1];const{inline:n,voiceMode:r}=s,i=n===void 0?!1:n,a=r===void 0?!1:r,l=K(),{error:c,clearError:d,finishReason:u,clearFinishReason:V,messages:p,isStreaming:f,submit:h,sendMessage:m}=Oe(),[g,v]=Ne(),{virtualMcpId:x,createTaskWithMessage:b}=Ge(),{chatMode:A,setChatMode:j,simpleModeTier:y}=He(),k=$e("credits"),{mutate:w}=go("ORGANIZATION_BILLING_CHECKOUT_START","taskBoard.subscriptionPaywall.checkoutError");let S;e[2]!==w?(S=()=>w(),e[2]=w,e[3]=S):S=e[3];const N=S;let I;e[4]!==A||e[5]!==y||e[6]!==x||e[7]!==a?(I=re=>({...a?{voiceMode:!0}:{},tier:y,mode:A,toolApprovalLevel:re,agent:x?{id:x}:void 0}),e[4]=A,e[5]=y,e[6]=x,e[7]=a,e[8]=I):I=e[8];const C=I;let M;e[9]!==g.toolApprovalLevel?(M=g.toolApprovalLevel??Fs(),e[9]=g.toolApprovalLevel,e[10]=M):M=e[10];const D=M,E=p.at(-1),U=E?.role==="assistant"?E.parts:[],T=U.filter(Vi),L=U.filter(Ft),F=ls(U),W=is(U);let $;e[11]!==c||e[12]!==m||e[13]!==l?($=()=>{if(c){const ae={type:"doc",content:[{type:"paragraph",content:[{type:"text",text:l("chat.highlight.fixInChatMessage",{error:c.message})}]}]};m(ae)}},e[11]=c,e[12]=m,e[13]=l,e[14]=$):$=e[14];const z=$;let Q;e[15]!==m||e[16]!==l?(Q=()=>{const re={type:"doc",content:[{type:"paragraph",content:[{type:"text",text:l("chat.highlight.pleaseContinue")}]}]};m(re)},e[15]=m,e[16]=l,e[17]=Q):Q=e[17];const ee=Q;let te;e[18]!==C||e[19]!==D||e[20]!==h?(te=(re,ae)=>{h({kind:"toolOutput",toolCallId:re.toolCallId,output:{response:ae}},C(D))},e[18]=C,e[19]=D,e[20]=h,e[21]=te):te=e[21];const H=te;let oe;e[22]!==C||e[23]!==D||e[24]!==h?(oe=(re,ae)=>{h({kind:"toolOutput",toolCallId:re.toolCallId,output:{accepted:ae}},C(D))},e[22]=C,e[23]=D,e[24]=h,e[25]=oe):oe=e[25];const _=oe;let B;e[26]!==b||e[27]!==g||e[28]!==j||e[29]!==v||e[30]!==l||e[31]!==x?(B=re=>{j("default"),v({...g,toolApprovalLevel:"auto"}),b({virtualMcpId:x,message:{parts:[{type:"text",text:l("chat.highlight.implementPlanMessage",{plan:re})}]}})},e[26]=b,e[27]=g,e[28]=j,e[29]=v,e[30]=l,e[31]=x,e[32]=B):B=e[32];const J=B,Z=li;let X;e[33]!==C||e[34]!==h?(X=(re,ae,Me,Ae)=>{h({kind:"approval",approvalId:re,approved:ae,...Me?{reason:Me}:{}},C(Ae))},e[33]=C,e[34]=h,e[35]=X):X=e[35];const ue=X,Y=Vs();if(Y.isCreditExhausted){let re;return e[36]!==k||e[37]!==d||e[38]!==i?(re=k?o.jsx(Xr,{onDismiss:d}):o.jsx("div",{className:O(!i&&"absolute bottom-full left-0 right-0"),children:o.jsx(_t,{kind:"ai_budget_exhausted",onDismiss:d})}),e[36]=k,e[37]=d,e[38]=i,e[39]=re):re=e[39],re}const{showError:le,showWarning:Ve,hasApprovals:ce}=Y,ke=T.map(ai).join("|"),Ke=as(F)?.toolCallId??"",me=W.map(ii).join("|"),Te=!i&&"absolute bottom-full left-0 right-0";let ge;e[40]!==Te?(ge=O(Te),e[40]=Te,e[41]=ge):ge=e[41];let de;e[42]!==Y.todos?(de=o.jsx(Kr,{todos:Y.todos}),e[42]=Y.todos,e[43]=de):de=e[43];let xe;e[44]!==d||e[45]!==Y.subscriptionErrorKind||e[46]!==N?(xe=Y.subscriptionErrorKind&&o.jsx(si,{kind:Y.subscriptionErrorKind,onDismiss:d,onSubscribe:N}),e[44]=d,e[45]=Y.subscriptionErrorKind,e[46]=N,e[47]=xe):xe=e[47];let we;e[48]!==d||e[49]!==Y.planRefusal?(we=Y.planRefusal&&o.jsx(_t,{kind:Y.planRefusal,onDismiss:d}),e[48]=d,e[49]=Y.planRefusal,e[50]=we):we=e[50];let fe;e[51]!==d||e[52]!==c||e[53]!==z||e[54]!==le?(fe=le&&o.jsx(Ye,{variant:"error",error:c,onDismiss:d,onFixInChat:z}),e[51]=d,e[52]=c,e[53]=z,e[54]=le,e[55]=fe):fe=e[55];let ve;e[56]!==V||e[57]!==u||e[58]!==ee||e[59]!==Ve?(ve=Ve&&o.jsx(Ye,{variant:"warning",finishReason:u,onDismiss:V,onContinue:ee}),e[56]=V,e[57]=u,e[58]=ee,e[59]=Ve,e[60]=ve):ve=e[60];const De=ce&&o.jsx(wr,{approvals:W,isStreaming:f,onRespond:ue},me),Re=Y.hasPlans&&o.jsx(Cr,{plans:F,isStreaming:f,onApprove:J,onDismiss:Z},Ke),_e=Y.hasTaskSuggestion&&o.jsx($r,{parts:L,isStreaming:f,onRespond:_},L.at(-1)?.toolCallId??"");let be;e[61]!==Y.isWaitingForUserInput||e[62]!==H||e[63]!==f||e[64]!==ke||e[65]!==T?(be=Y.isWaitingForUserInput&&o.jsx(xs,{userAskParts:T,isStreaming:f,onSubmit:H},ke),e[61]=Y.isWaitingForUserInput,e[62]=H,e[63]=f,e[64]=ke,e[65]=T,e[66]=be):be=e[66];let Se;return e[67]!==ge||e[68]!==de||e[69]!==xe||e[70]!==we||e[71]!==fe||e[72]!==ve||e[73]!==De||e[74]!==Re||e[75]!==_e||e[76]!==be?(Se=o.jsxs("div",{className:ge,children:[de,xe,we,fe,ve,De,Re,_e,be]}),e[67]=ge,e[68]=de,e[69]=xe,e[70]=we,e[71]=fe,e[72]=ve,e[73]=De,e[74]=Re,e[75]=_e,e[76]=be,e[77]=Se):Se=e[77],Se}function ii(t){return t.approvalId}function ai(t){return t.toolCallId}function li(){document.querySelector("[data-chat-input]")?.focus()}function Vi(t){return t.type==="tool-user_ask"}Be.Error=function(e){return o.jsx(Ye,{variant:"error",error:e.error,onDismiss:e.onDismiss,onFixInChat:e.onFixInChat})};Be.Warning=function(e){return o.jsx(Ye,{variant:"warning",finishReason:e.finishReason,onDismiss:e.onDismiss,onContinue:e.onContinue})};Be.UserAskQuestion=xs;function bs(t){const e=R.c(20),{taskId:s}=t,n=K(),r=Dn(s),i=Rn(r),a=En(),{stop:l,removeLocalMessage:c}=Oe();if(i.length===0)return null;let d;e[0]!==n?(d=n("chat.queueTray.sendNow"),e[0]=n,e[1]=d):d=e[1];let u;e[2]!==l?(u=()=>{l()},e[2]=l,e[3]=u):u=e[3];let V;e[4]===Symbol.for("react.memo_cache_sentinel")?(V=o.jsx(Kt,{size:14}),e[4]=V):V=e[4];let p;e[5]!==d||e[6]!==u?(p=o.jsx(Ze,{asChild:!0,children:o.jsx(G,{type:"button",variant:"ghost",size:"icon-sm","aria-label":d,onClick:u,children:V})}),e[5]=d,e[6]=u,e[7]=p):p=e[7];let f;e[8]!==n?(f=n("chat.queueTray.sendNow"),e[8]=n,e[9]=f):f=e[9];let h;e[10]!==f?(h=o.jsx(Xe,{side:"top",children:o.jsx("p",{className:"text-xs",children:f})}),e[10]=f,e[11]=h):h=e[11];let m;e[12]!==p||e[13]!==h?(m=o.jsxs(et,{delayDuration:400,children:[p,h]}),e[12]=p,e[13]=h,e[14]=m):m=e[14];let g;return e[15]!==a||e[16]!==c||e[17]!==n||e[18]!==s?(g=(v,x)=>o.jsxs("div",{className:"group/queuerow flex items-center gap-2 px-3 py-1.5",children:[o.jsx("span",{className:"flex size-[18px] shrink-0 items-center justify-center rounded-full bg-muted text-[10px] font-semibold text-muted-foreground dark:bg-background",children:x+1}),o.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:v.text}),o.jsx("div",{className:"flex shrink-0 items-center gap-1 opacity-0 transition-opacity focus-within:opacity-100 group-hover/queuerow:opacity-100",children:o.jsx(G,{type:"button",variant:"ghost",size:"icon-sm",title:n("chat.queueTray.removeFromQueue"),"aria-label":n("chat.queueTray.removeFromQueue"),onClick:()=>{a.cancel(s,v.messageId).then(b=>{b&&(Pn(s,v.messageId),c(v.messageId))})},children:o.jsx(Ot,{className:"size-3.5"})})})]},v.messageId),e[15]=a,e[16]=c,e[17]=n,e[18]=s,e[19]=g):g=e[19],o.jsxs("div",{className:"mb-1 overflow-hidden rounded-2xl border border-border bg-card dark:bg-muted",children:[o.jsxs("div",{className:"flex items-center justify-between gap-2 border-b border-border py-1.5 pr-2 pl-3 text-xs text-muted-foreground",children:[o.jsx("span",{children:n(i.length===1?"chat.queueTray.queuedMessage":"chat.queueTray.queuedMessages",{count:i.length})}),m]}),i.map(g)]})}function ci(t){return["openai-compatible","openrouter","deco"].includes(t)}function di(t,e){return ci(t)&&ui(e)!==null}function ui(t){const e=t.replace(/^openai\//,"");return/^(gpt-\d|o[134](?:-|$))/.test(e)?e:null}const pi={anthropic:/^claude-/,openrouter:/^anthropic\/claude-/,deco:/^anthropic\/claude-/};function fi(t,e){return pi[t]?.test(e)??!1}function hi(t){return Io(t)&&fi(t.providerId,t.modelId)}function mi(t,e){return t?{modelId:t.modelId,title:t.title??t.modelId,keyId:t.keyId,providerId:e,description:null,logo:null,capabilities:[],limits:null,costs:null}:null}const gi={fast:"chat.tierTrigger.tierFast",smart:"chat.tierTrigger.tierSmart",thinking:"chat.tierTrigger.tierThinking"};function xi(t){const e=R.c(32),{tier:s,orgSlot:n,userSlot:r,autoSlot:i,filterModels:a,onPick:l,onReset:c,onClose:d}=t,u=K(),V=ns(),p=new Set(V.map(vi)),f=Un([r,n,i],p),h=f?.keyId??null,[m,g]=P.useState(h??V[0]?.id??null),v=V.some(F=>F.id===m)?m:h??V[0]?.id??null,x=v?V.find(F=>F.id===v):null,b="flex h-[70vh] max-h-[460px] w-full flex-col",A=gi[s];let j;e[0]!==u||e[1]!==A?(j=u(A),e[0]=u,e[1]=A,e[2]=j):j=e[2];let y;e[3]!==j?(y=o.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:j}),e[3]=j,e[4]=y):y=e[4];let k;e[5]!==c||e[6]!==u||e[7]!==r?(k=r&&o.jsx("button",{type:"button",onClick:c,className:"text-xs text-muted-foreground hover:text-foreground px-2 py-1 rounded-lg hover:bg-accent cursor-pointer",children:u("chat.modelPreferences.reset")}),e[5]=c,e[6]=u,e[7]=r,e[8]=k):k=e[8];let w;e[9]!==y||e[10]!==k?(w=o.jsxs("div",{className:"flex items-center justify-between px-3 h-8 shrink-0",children:[y,k]}),e[9]=y,e[10]=k,e[11]=w):w=e[11];const S="flex-1 min-h-0",N=P.Suspense;let I;e[12]===Symbol.for("react.memo_cache_sentinel")?(I=o.jsx(vo,{}),e[12]=I):I=e[12];const C=xo,M=!0,D=mi(h?f:null,x?.providerId??"deco");let E;e[13]!==v||e[14]!==l||e[15]!==g?(E=F=>{const W=F.keyId??v??"";g(W),l({keyId:W,modelId:F.modelId,title:F.title})},e[13]=v,e[14]=l,e[15]=g,e[16]=E):E=e[16];let U;e[17]!==C||e[18]!==v||e[19]!==a||e[20]!==d||e[21]!==g||e[22]!==D||e[23]!==E?(U=o.jsx(C,{compact:M,filterModels:a,onClose:d,credentialId:v,onCredentialChange:g,selectedModel:D,onModelChange:E}),e[17]=C,e[18]=v,e[19]=a,e[20]=d,e[21]=g,e[22]=D,e[23]=E,e[24]=U):U=e[24];let T;e[25]!==N||e[26]!==U||e[27]!==I?(T=o.jsx("div",{className:S,children:o.jsx(N,{fallback:I,children:U})}),e[25]=N,e[26]=U,e[27]=I,e[28]=T):T=e[28];let L;return e[29]!==T||e[30]!==w?(L=o.jsxs("div",{className:b,children:[w,T]}),e[29]=T,e[30]=w,e[31]=L):L=e[31],L}function vi(t){return t.id}const bi=["fast","smart","thinking"];function As(t){return{fast:t("chat.tierTrigger.tierFast"),smart:t("chat.tierTrigger.tierSmart"),thinking:t("chat.tierTrigger.tierThinking")}}const Mt={fast:"chat.agentModels.quickerResponses",smart:"chat.agentModels.balancedQuality",thinking:"chat.agentModels.deeperReasoning"};function Ai(t){const e=R.c(28),{tier:s,pillIcon:n,groups:r}=t,i=K();let a;e[0]!==i?(a=As(i),e[0]=i,e[1]=a):a=e[1];const l=a,[c,d]=P.useState(!1);let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=w=>{w.onSelect(),d(!1)},e[2]=u):u=e[2];const V=u,p=l[s];let f;e[3]===Symbol.for("react.memo_cache_sentinel")?(f=O("text-muted-foreground hover:text-foreground transition-[gap] duration-200 shrink min-w-0","gap-0 @[320px]/chat-bottom:gap-1.5"),e[3]=f):f=e[3];let h;e[4]===Symbol.for("react.memo_cache_sentinel")?(h=O("min-w-0 truncate transition-[max-width,opacity] duration-200 ease-out max-w-0 opacity-0","@[320px]/chat-bottom:max-w-24 @[320px]/chat-bottom:opacity-100"),e[4]=h):h=e[4];const m=l[s];let g;e[5]!==m?(g=o.jsx("span",{className:h,children:m}),e[5]=m,e[6]=g):g=e[6];let v;e[7]===Symbol.for("react.memo_cache_sentinel")?(v=o.jsx(Zt,{size:12,className:"opacity-60 hidden @[320px]/chat-bottom:inline-block"}),e[7]=v):v=e[7];let x;e[8]!==n||e[9]!==p||e[10]!==g?(x=o.jsx(Ze,{asChild:!0,children:o.jsx("span",{className:"inline-flex min-w-0 shrink",children:o.jsx(Xt,{asChild:!0,children:o.jsxs(G,{type:"button",variant:"ghost",size:"default","aria-label":p,className:f,children:[n,g,v]})})})}),e[8]=n,e[9]=p,e[10]=g,e[11]=x):x=e[11];let b;e[12]!==p?(b=o.jsx(Xe,{children:p}),e[12]=p,e[13]=b):b=e[13];let A;e[14]!==x||e[15]!==b?(A=o.jsxs(et,{children:[x,b]}),e[14]=x,e[15]=b,e[16]=A):A=e[16];let j;if(e[17]!==r||e[18]!==i){let w;e[20]!==i?(w=S=>o.jsx("div",{className:"flex flex-col",children:S.rows.map(N=>o.jsxs("div",{className:"group/tier-row relative flex items-stretch rounded-lg hover:bg-muted",children:[o.jsxs("button",{type:"button",role:"menuitem","aria-label":N.title,onClick:()=>V(N),className:O("flex flex-1 min-w-0 items-start gap-2 px-2 py-1.5 text-left",N.modelOverride&&"pr-7 [@media(hover:hover)]:pr-2"),children:[N.icon&&o.jsx("span",{className:"shrink-0 text-muted-foreground mt-0.5",children:N.icon}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("div",{className:"text-sm",children:N.title}),N.subtitle&&o.jsx("div",{className:"text-xs text-muted-foreground",children:N.subtitle})]}),N.active&&o.jsx("span",{title:i("chat.tierTrigger.selected"),children:o.jsx(lt,{size:14,className:"text-foreground mt-0.5"})})]}),N.modelOverride&&o.jsx(ji,{label:N.title,render:N.modelOverride})]},N.key))},S.key),e[20]=i,e[21]=w):w=e[21],j=r.map(w),e[17]=r,e[18]=i,e[19]=j}else j=e[19];let y;e[22]!==j?(y=o.jsx(es,{align:"end",className:"p-1 w-64",onOpenAutoFocus:yi,children:o.jsx("div",{role:"menu",className:"flex flex-col",children:j})}),e[22]=j,e[23]=y):y=e[23];let k;return e[24]!==c||e[25]!==A||e[26]!==y?(k=o.jsxs(ts,{open:c,onOpenChange:d,children:[A,y]}),e[24]=c,e[25]=A,e[26]=y,e[27]=k):k=e[27],k}function yi(t){return t.preventDefault()}function ji(t){const e=R.c(38),{label:s,render:n}=t,r=K(),i=ss(),[a,l]=P.useState(!1);let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=()=>l(!1),e[0]=c):c=e[0];const d=c;let u;e[1]!==s||e[2]!==r?(u=r("chat.modelPreferences.customizeModel",{tier:s}),e[1]=s,e[2]=r,e[3]=u):u=e[3];const V=a&&"opacity-100";let p;e[4]!==V?(p=O("absolute right-1 top-1/2 -translate-y-1/2 flex items-center justify-center","size-6 rounded-lg bg-background border border-border/60 shadow-sm","text-muted-foreground hover:text-foreground","opacity-100 [@media(hover:hover)]:opacity-0","[@media(hover:hover)]:group-hover/tier-row:opacity-100","[@media(hover:hover)]:group-focus-within/tier-row:opacity-100",V),e[4]=V,e[5]=p):p=e[5];let f;e[6]===Symbol.for("react.memo_cache_sentinel")?(f=o.jsx(qn,{size:14}),e[6]=f):f=e[6];let h;e[7]!==u||e[8]!==p?(h=o.jsx("button",{type:"button","aria-label":u,className:p,children:f}),e[7]=u,e[8]=p,e[9]=h):h=e[9];const m=h;if(i){let A;e[10]!==m?(A=o.jsx(yo,{asChild:!0,children:m}),e[10]=m,e[11]=A):A=e[11];let j;e[12]!==s||e[13]!==r?(j=r("chat.modelPreferences.customizeModel",{tier:s}),e[12]=s,e[13]=r,e[14]=j):j=e[14];let y;e[15]!==j?(y=o.jsx(jo,{className:"sr-only",children:j}),e[15]=j,e[16]=y):y=e[16];let k;e[17]!==a||e[18]!==n?(k=a&&n(d),e[17]=a,e[18]=n,e[19]=k):k=e[19];let w;e[20]!==k||e[21]!==y?(w=o.jsxs(ko,{className:"p-0 flex flex-col max-h-[95vh]",children:[y,k]}),e[20]=k,e[21]=y,e[22]=w):w=e[22];let S;return e[23]!==a||e[24]!==w||e[25]!==A?(S=o.jsxs(wo,{open:a,onOpenChange:l,children:[A,w]}),e[23]=a,e[24]=w,e[25]=A,e[26]=S):S=e[26],S}let g;e[27]!==m?(g=o.jsx(Xt,{asChild:!0,children:m}),e[27]=m,e[28]=g):g=e[28];let v;e[29]!==a||e[30]!==n?(v=a&&n(d),e[29]=a,e[30]=n,e[31]=v):v=e[31];let x;e[32]!==v?(x=o.jsx(es,{side:"right",align:"start",collisionPadding:12,className:"w-[min(22rem,calc(100vw-2rem))] p-0 overflow-hidden",children:v}),e[32]=v,e[33]=x):x=e[33];let b;return e[34]!==a||e[35]!==g||e[36]!==x?(b=o.jsxs(ts,{open:a,onOpenChange:l,children:[g,x]}),e[34]=a,e[35]=g,e[36]=x,e[37]=b):b=e[37],b}function Dt(t){return t==="fast"?o.jsx(Vt,{size:16}):t==="thinking"?o.jsx(Kn,{size:16}):o.jsx(So,{size:16})}function ki(t){const e=R.c(13),s=zn();let n;e[0]!==t||e[1]!==s.tiers?(n=d=>{const u=s.tiers[d];return u?u.title??u.modelId:t.chat[d]?.title},e[0]=t,e[1]=s.tiers,e[2]=n):n=e[2];const r=n;let i;e[3]!==r?(i=r("fast"),e[3]=r,e[4]=i):i=e[4];let a;e[5]!==r?(a=r("smart"),e[5]=r,e[6]=a):a=e[6];let l;e[7]!==r?(l=r("thinking"),e[7]=r,e[8]=l):l=e[8];let c;return e[9]!==i||e[10]!==a||e[11]!==l?(c={fast:i,smart:a,thinking:l},e[9]=i,e[10]=a,e[11]=l,e[12]=c):c=e[12],c}function wi(){const t=R.c(25),e=K(),{simpleModeTier:s,setSimpleModeTier:n}=He(),r=Co(),i=ns(),a=To(i),l=ki(a),{data:c,error:d}=Ln();let u;t[0]!==c?(u=c===void 0?{tiers:{}}:c,t[0]=c,t[1]=u):u=t[1];const V=u,p=Fn(),f=We()?.lockedHarness,h=f==="claude-code",m=$e("model_choice"),g=ao(),v=lo();if(!g||!m)return null;let x,b;if(t[2]!==a||t[3]!==v||t[4]!==h||t[5]!==f||t[6]!==r||t[7]!==n||t[8]!==e||t[9]!==s||t[10]!==l||t[11]!==p||t[12]!==V||t[13]!==d){const w=As(e);x="decopilot",b=bi.map(S=>{const N=l[S],I=V.tiers[S];return{key:`decopilot-${S}`,icon:Dt(S),title:w[S],subtitle:v?N??e(Mt[S]):e(Mt[S]),active:s===S,onSelect:()=>n(S),modelOverride:v?C=>o.jsxs(o.Fragment,{children:[d&&o.jsx("div",{className:"text-xs text-destructive p-3 pb-0",children:e("chat.modelPreferences.loadFailed")}),o.jsx(xi,{tier:S,orgSlot:r.tiers[S],userSlot:I,autoSlot:a.chat[S],filterModels:f==="codex"?Si:h?hi:void 0,onClose:C,onPick:M=>p.mutate({tier:S,slot:M}),onReset:()=>p.mutate({tier:S,slot:null})},`${S}:${I?.keyId??"org"}:${I?.modelId??""}`)]}):void 0}}),t[2]=a,t[3]=v,t[4]=h,t[5]=f,t[6]=r,t[7]=n,t[8]=e,t[9]=s,t[10]=l,t[11]=p,t[12]=V,t[13]=d,t[14]=x,t[15]=b}else x=t[14],b=t[15];let A;t[16]!==x||t[17]!==b?(A=[{key:x,rows:b}],t[16]=x,t[17]=b,t[18]=A):A=t[18];const j=A;let y;t[19]!==s?(y=Dt(s),t[19]=s,t[20]=y):y=t[20];let k;return t[21]!==j||t[22]!==y||t[23]!==s?(k=o.jsx(Ai,{tier:s,pillIcon:y,groups:j}),t[21]=j,t[22]=y,t[23]=s,t[24]=k):k=t[24],k}function Si(t){return di(t.providerId,t.modelId)}function ys(t){const e=R.c(3),[s]=Ne();let n;return e[0]!==s.enableSounds||e[1]!==t?(n=()=>{s.enableSounds&&Fo(t.dataUri).catch(i=>{console.warn(`[sound] ${t.name} playback failed:`,i)})},e[0]=s.enableSounds,e[1]=t,e[2]=n):n=e[2],n}const Ci={name:"switch-005",dataUri:"data:audio/mpeg;base64,SUQzBAAAAAAAIlRTU0VAAAAOAAADTGF2ZjYyLjMuMTAwAAAAAAAAAAAAAAD/+1DAAAAAAAAAAAAAAAAAAAAAAABJbmZvAAAADwAAABkAABU4ABMTEx0dHR0nJycnMTExMTs7OztERERETk5OTlhYWFhiYmJibGxsbHZ2dnZ/f39/iYmJiZOTk5OdnZ2dp6enp7GxsbG7u7u7xMTExM7Ozs7Y2NjY4uLi4uzs7Oz29vb2/////wAAAABMYXZjNjIuMTEAAAAAAAAAAAAAAAAkBVYAAAAAAAAVOPCP8KUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//tQxAAACEwDXvQRAAG8Ii93HtACUCAABAKCJwfaCEHwfeoEAQdEAYygIHBOCAIAgCAJh9QIOg+D5/ygPh/wfB8DuKAgCHyn9QPh/5SCDv+CEHAQdxOD4B27c39tbckkqYbBAYAN9bNJLB+aXAf5wQAKdzxfbmrVIRQ4xNx3HwnoDmLhfMhgJiiw/HREXNCHqjvHEPEG8QjBYlxQNepJAT0kC8ip6JzSWj1TasoG+iyycbf2Uil1ovf1f/oUtR1qP+s1WSBFKoAAU02BDjMhuP/7UsQEgws8bRpd8YABJYPeBf9wCGXTGxBYcw5AJFMFMAmQQAhGAxgLBgHIAMYAAALhgAchipbe/91aU1VV4zcZj1Vf1XgYCIMBNrsBAIGs9/Ue4i/xFPeqCqwViI9/UeLf///rOngdA3OPHFjmOBv+EQnGahgaZxVplmkAH5JadDTQlNCEuGNiWYbCCONWdUJg6HXNazFdu1T+VgaEpOP70exv7f2/4b/yH//2/4cqCX/zWRUrIw+IPNMNlDnjAXQas/I4AzmYifA0tMSCgQDF//tSxBCDSzzi3k/sQwEyCtjJ/rBZAk+Uqj1YhA5YMCAAMwgOUchTkK7OR7LbMl0W1H6SvzG0Q2ZzfKUhnmTobv9DNhS1v7P8h//8Gv8gTRt1jReZ7YEjmMQg9hhwwMycHooasFmZyjcZGBKJD+IwbMCQQLoi+IQXCcIoydKoilI2MWFS5uJdDEu2taRrYI2ZSqKY50pJLv2NfjUAAuQAMfqVQ/T3PDQgMJMeEZ45hJzY6MNoFMxqTj1zNGQKJjAxEsSCBgQJBSIL0mcKYQJfVAn/+1LEGwLKlEKrD3MiYcuMkVa/wABB8Vh6M1q1epbvXwWBURhkyEhWZ/////////////9gjZ/Wt4w+4MNMCpE4TBYQl4w1IHvMDdA2zBngBMwc8COMDhCpDAfgOAAgrBgNYU+YC0FBGAkAMpgWoSCYAGESGBGAKBgXgJOdiOJmMCmNwCYNDJhYRPykRCJhTBnEUzlsjv4UNLj/z97n3Mv/7z1nZqyitYAZIqErIwMwJAqEw0GAAMFptJMaqFwB8CQIWlhuhuDAwNjfuwrQFAYXCf/7UsQVAA+9PTP42gYRdiIu9zBwAPbFUCi0DAhgNcS+7cDwVgM05A9bUDeuQMyE/u3CygVISgZhpIau/9PhdQG2C9DpxZZJmn/dn/Psmt0EFm////l84ThUTopE4VD/9JkubOGasTvN30C20G21qgUCkVCoUCgPMywrPCGly27V5q5t24vl/8jSlSAPCxzNseNCw3oh3NGBu4BZJ5hv7DRSfR/+eWG7nA8IKh2Olv5iz3q5m3//Joxo3JqNyYkSuGt/k6D4DeoBOHmHdl0dkZYA//tSxAUAC4B1Z/2DADEcA17Z/uhI4Yoik/TrZo+ww7UtmpW4LDWu2IacoJKJJeTSM+ZmAYBEiU+ZnnAwCn1VVVV6JUJQVnioKhrgqdKgqGpUFeCp0sDR3ztQNREDRUFioKuxKCpYGQBlRIBk+aLwb8KblGQVDdphPYTUdBOGbVpAaTF6ZdjEV0iRUZRCYkA4oUQDx5zqDugtXvza/7fuNNvfZ+j9v+T/2f//J/4cAAOTpE5K4zksR9MfIB+TDcQTI4gNs1XKAzEFUrGkxABYEBb/+1LEEYNKrEjgT/TCwYYVmUX+mHoKgWhKU5Eiw9SFIRmppw+3fYo4siPhUFeexM8KgIO6wVuPDDy01qeRaVbw357//y3+o8M0pBNlNLCGBzGKwyYw2IIFOE1WNTjRM6x8MlA1AxDhUHTAkEiyKpnbWrLcaOBotBUKbk1pypcWDAIK00AhKLGkUco6q9VWvM53mcaq3tVa8zjTM/tX//EDP//////////XAAmrwAAPoKwcw0ShDCZD/BQlhzinxQdorsOuXTEIC01ZkJyu4k/qPP/7UsQUAEjkrrkvZaPBIRXUoe5QObfMhYKX9RVgTPqCSCaSCaSC0XVdV1f/////6IAlguuAJSiDRNloNBsZg+0+Ts8MMCn81WUTRAlIi+GHECD0y8AWDIqswYsxGOSKVV7MqOni8tkVOip0fZX/////9HrMCbAz2EHGS4GKAAiRAAAYAcDdKd4G6Z/nwYgJ0ZAIgZyC8aPAs/iPBhwMpWDQNARltNS5Y61v//9i8Yl4SkFkIGTkAc0UBrIYLPA4MYBEy+YLMRuY4nhTC3hZA68H//tSxCoAyQC6mY6CkWDJBIsBz/QUrgNmahSzcrYw0/HhfnMAZBojDsgTFkDR5MDkG/DZEbk2FCmowqdqv2TYABiJwqqYjaQRGZ1URZ1DhSsdiHX/GBu0QpzIBNSaLqZ0ARkwFARxMrpt/Eh47mbQAhhU6sisFUxBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVX/+1LESoHHJCRaj/dmYAIAQAAQAARVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVf/7UsSLg8AAAaQAAAAgAAA0gAAABFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVX/+1LEoYPAAAGkAAAAIAAANIAAAARVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUxBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVf/7UsShg8AAAaQAAAAgAAA0gAAABFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVX/+1LEoYPAAAGkAAAAIAAANIAAAARVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUxBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV",duration:.609,format:"mp3",license:"CC0",author:"Kenney"},Ni=mn.togglePlanMode.keys.map(t=>t==="Shift"?"⇧":t).join(""),Ii=[{src:"/connections/gmail.png",name:"Gmail"},{src:"/connections/perplexity.png",name:"Perplexity"},{src:"/connections/github.png",name:"GitHub"}];function Ti(){const t=R.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx("div",{className:"flex items-center -space-x-1.5",children:Ii.map(_i)}),t[0]=e):e=t[0],e}function _i(t){return o.jsx("img",{src:t.src,alt:t.name,className:"size-5 rounded-sm ring-1 ring-border object-cover bg-white"},t.name)}function Mi({disabled:t,onOpenConnections:e,virtualMcpId:s,selectedModel:n,isStreaming:r,onUnsupportedFile:i}){const a=K(),[l,c]=P.useState(!1),d=ys(Ci),{org:u}=Ie(),{editor:V}=zt(),p=P.useRef(null),f=pt(n),h=()=>{!f||r||(c(!1),p.current?.click())},m=async _=>{const B=_.target.files;if(!B||B.length===0||!V)return;const J=Array.from(B);try{let Z=V.state.selection.from;for(const X of J)await os(V,n??null,X,Z,i,a),Z=V.state.selection.to}finally{p.current&&(p.current.value="")}},g=Eo({connectionId:s,orgId:u.id,orgSlug:u.slug}),v=Os.virtualMcpPrompts(s,u.id),{data:x,isLoading:b}=$s({queryKey:v,queryFn:()=>Po(g),staleTime:6e4,enabled:l&&!!g}),A=x?.prompts??[],[j,y]=P.useState(null),{chatMode:k,setChatMode:w}=He(),[S,N]=Ne(),I=We()?.lockedHarness!=="claude-code",C=Ce.find(_=>_.value===S.toolApprovalLevel)??Ce[0],M=a(C.shortKey),D=_=>{const B=Ce.find(J=>J.value===_);if(B){if(B.value===S.toolApprovalLevel){c(!1);return}d(),se("chat_approval_level_changed",{from_level:S.toolApprovalLevel,to_level:B.value,source:"tools_popover"}),N({...S,toolApprovalLevel:B.value}),c(!1)}},E=k==="plan",U=()=>{d();const _=E?"default":"plan";se("chat_mode_changed",{from_mode:k,to_mode:_,source:"tools_popover"}),w(_),c(!1)},T=()=>{e(),c(!1)},L=async(_,B)=>{if(!V||!g)return;const J=jt(_._meta),Z={from:V.state.selection.from,to:V.state.selection.to};try{const X=await Uo(g,_.name,B);Vn(V,Z,{id:_.name,name:ho(_.name,J),metadata:X.messages,char:"/",kind:"prompt",args:B})}catch{Ue.error(a("chat.toolsPopover.failedLoadPrompt"))}},F=async _=>{c(!1);const B=!!(_.arguments&&_.arguments.length>0);if(se("chat_prompt_inserted",{prompt_name:_.name,with_arguments:B}),B){y(_);return}await L(_)},W=async _=>{j&&(await L(j,_),y(null))},$=()=>{d();const _=k==="gen-image"?"default":"gen-image";se("chat_mode_changed",{from_mode:k,to_mode:_,source:"tools_popover"}),w(_),c(!1)},z=()=>{d();const _=k==="web-search"?"default":"web-search";se("chat_mode_changed",{from_mode:k,to_mode:_,source:"tools_popover"}),w(_),c(!1)},Q=()=>{d();const _=k==="deep-research"?"default":"deep-research";se("chat_mode_changed",{from_mode:k,to_mode:_,source:"tools_popover"}),w(_),c(!1)},ee=k==="gen-image",te=k==="web-search",H=k==="deep-research",oe=o.jsx("input",{ref:p,type:"file",multiple:!0,accept:bo(n??null),className:"hidden",onChange:m,disabled:r});return o.jsxs(o.Fragment,{children:[oe,o.jsxs(Bs,{open:l,onOpenChange:_=>{_&&!l&&se("chat_tools_popover_opened",{chat_mode:k}),c(_)},children:[o.jsx(Ks,{asChild:!0,children:o.jsxs(G,{type:"button",variant:"ghost",size:"default",disabled:t,title:a("chat.toolsPopover.tools"),"aria-label":a("chat.toolsPopover.tools"),className:O("text-muted-foreground hover:text-foreground transition-[gap] duration-200 shrink min-w-0","gap-0 @[320px]/chat-bottom:gap-1.5"),children:[o.jsx(Qn,{size:14}),o.jsx("span",{className:O("min-w-0 truncate transition-[max-width,opacity] duration-200 ease-out max-w-0 opacity-0","@[320px]/chat-bottom:max-w-24 @[320px]/chat-bottom:opacity-100"),children:a("chat.toolsPopover.tools")})]})}),o.jsxs(qs,{align:"start",className:"w-56 p-1.5 space-y-1",children:[f?o.jsxs(ye,{onClick:h,disabled:r,children:[o.jsx(kt,{size:16}),o.jsx("span",{className:"flex-1",children:a("chat.toolsPopover.addFile")})]}):o.jsxs(et,{children:[o.jsx(Ze,{asChild:!0,children:o.jsxs(ye,{"aria-disabled":"true",className:"opacity-50 cursor-not-allowed",onSelect:_=>_.preventDefault(),children:[o.jsx(kt,{size:16}),o.jsx("span",{className:"flex-1",children:a("chat.toolsPopover.addFile")})]})}),o.jsx(Xe,{side:"right",children:a("chat.toolsPopover.modelNoFileSupport")})]}),o.jsxs(ye,{onClick:U,className:O(E&&"text-special"),children:[o.jsx(qt,{size:16,className:O(E&&"text-special")}),o.jsx("span",{className:"flex-1 whitespace-nowrap",children:a("chat.toolsPopover.planMode")}),o.jsx("span",{className:O("text-xs text-muted-foreground",E&&"text-special font-medium"),children:Ni})]}),o.jsxs(ye,{onClick:$,className:O(ee&&"text-special"),children:[o.jsx(Ht,{size:16,className:O(ee&&"text-special")}),o.jsx("span",{className:"flex-1",children:a("chat.toolsPopover.createImage")}),ee&&o.jsx("span",{className:"text-xs text-special font-medium",children:a("chat.toolsPopover.on")})]}),o.jsxs(ye,{onClick:z,className:O(te&&"text-special"),children:[o.jsx(Wt,{size:16,className:O(te&&"text-special")}),o.jsx("span",{className:"flex-1",children:a("chat.toolsPopover.webSearch")}),te&&o.jsx("span",{className:"text-xs text-special font-medium",children:a("chat.toolsPopover.on")})]}),o.jsxs(ye,{onClick:Q,className:O(H&&"text-special"),children:[o.jsx(Gt,{size:16,className:O(H&&"text-special")}),o.jsx("span",{className:"flex-1",children:a("chat.toolsPopover.deepResearch")}),H&&o.jsx("span",{className:"text-xs text-special font-medium",children:a("chat.toolsPopover.on")})]}),o.jsxs(gt,{children:[o.jsxs(xt,{className:"gap-2",children:[o.jsx("span",{className:"flex size-4 items-center justify-center text-base font-medium text-muted-foreground",children:"/"}),o.jsx("span",{className:"flex-1",children:a("chat.toolsPopover.prompts")})]}),o.jsx(vt,{className:"w-80 max-h-72 overflow-y-auto p-1.5",children:b?o.jsxs("div",{className:"flex items-center gap-2 px-2 py-3 text-sm text-muted-foreground",children:[o.jsx(Qs,{className:"size-3.5"}),a("chat.toolsPopover.loadingPrompts")]}):A.length===0?o.jsx("div",{className:"px-2 py-3 text-sm text-muted-foreground",children:a("chat.toolsPopover.noPromptsAvailable")}):A.map(_=>o.jsxs(ye,{onClick:()=>F(_),className:"flex flex-col items-start gap-0.5",children:[o.jsx("span",{className:"font-medium text-sm capitalize",children:_.title||fo(_.name,jt(_._meta))}),_.description&&o.jsx("span",{className:"text-xs text-muted-foreground line-clamp-2",children:_.description})]},_.name))})]}),I&&o.jsxs(gt,{children:[o.jsxs(xt,{className:"gap-2",children:[o.jsx(Je,{size:16}),o.jsx("span",{className:"flex-1",children:a("chat.toolsPopover.approval")}),o.jsx("span",{className:"text-xs text-muted-foreground",children:M})]}),o.jsx(vt,{className:"w-48 p-1.5",children:o.jsx(Ys,{value:S.toolApprovalLevel,onValueChange:D,children:Ce.map(_=>o.jsx(Ws,{value:_.value,children:a(_.labelKey)},_.value))})})]}),o.jsxs(ye,{onClick:T,children:[o.jsx(Lo,{size:16}),o.jsx("span",{className:"flex-1",children:a("chat.toolsPopover.connections")}),o.jsx(P.Suspense,{children:o.jsx(Ti,{})})]})]})]}),o.jsx(ln,{prompt:j,setPrompt:y,onSubmit:W})]})}const Di=[{src:"/connections/github.png",name:"GitHub"},{src:"/connections/gmail.png",name:"Gmail"},{src:"/connections/linear.png",name:"Linear"},{src:"/connections/shopify.png",name:"Shopify"},{src:"/connections/firecrawl.png",name:"Firecrawl"},{src:"/connections/perplexity.png",name:"Perplexity"}];function Ri(){const t=R.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx("div",{className:"flex items-center -space-x-1",children:Di.map(Ei)}),t[0]=e):e=t[0],e}function Ei(t){return o.jsx("img",{src:t.src,alt:t.name,className:"size-5 rounded-sm ring-2 ring-muted object-cover bg-white"},t.name)}function Pi(t){const e=R.c(10),{onClick:s}=t,n=K();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=O("group relative z-10 flex items-center gap-3 w-full px-4 py-3","rounded-b-2xl","cursor-pointer"),e[0]=r):r=e[0];let i;e[1]!==n?(i=n("chat.connectionsBanner.description"),e[1]=n,e[2]=i):i=e[2];let a;e[3]!==i?(a=o.jsx("p",{className:"flex-1 text-xs text-muted-foreground truncate text-left",children:i}),e[3]=i,e[4]=a):a=e[4];let l,c;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx(Ri,{}),c=o.jsx(Gs,{size:14,className:"shrink-0 text-muted-foreground/60 group-hover:text-muted-foreground transition-colors"}),e[5]=l,e[6]=c):(l=e[5],c=e[6]);let d;return e[7]!==s||e[8]!==a?(d=o.jsxs("button",{type:"button",onClick:s,className:r,children:[a,l,c]}),e[7]=s,e[8]=a,e[9]=d):d=e[9],d}const Pe=48;function Ui(){const t=R.c(9),[e,s]=P.useState("idle"),[n,r]=P.useState(""),[i,a]=P.useState(""),[l,c]=P.useState(zi),d=P.useRef(null),u=P.useRef(null),V=P.useRef(null),p=P.useRef(null),f=P.useRef(0),h=P.useRef(!1),m=P.useRef(""),g=P.useRef(""),v=typeof window<"u"&&!!(window.SpeechRecognition||window.webkitSpeechRecognition);let x;t[0]===Symbol.for("react.memo_cache_sentinel")?(x=()=>{f.current&&(cancelAnimationFrame(f.current),f.current=0),u.current?.close().catch(Fi),p.current?.getTracks().forEach(Li),V.current=null,u.current=null,p.current=null},t[0]=x):x=t[0];const b=x;let A;if(t[1]===Symbol.for("react.memo_cache_sentinel")){const I=C=>{p.current=C;const M=new AudioContext;u.current=M;const D=M.createMediaStreamSource(C),E=M.createAnalyser();E.fftSize=128,E.smoothingTimeConstant=.8,D.connect(E),V.current=E;const U=new Uint8Array(E.frequencyBinCount),T=()=>{if(!V.current)return;V.current.getByteFrequencyData(U);const L=[];for(let F=0;F<Pe;F++){const W=Math.floor(F/Pe*U.length);L.push(Math.max(.04,(U[W]??0)/255))}c(L),f.current=requestAnimationFrame(T)};T()};A=async()=>{const C=window.SpeechRecognition||window.webkitSpeechRecognition;if(!C)return s("unsupported"),"unsupported";let M;try{M=await navigator.mediaDevices.getUserMedia({audio:!0})}catch{return s("permission-denied"),"permission-denied"}r(""),a(""),g.current="",m.current="",h.current=!0,s("recording"),I(M);const D=new C;d.current=D,D.interimResults=!0,D.continuous=!0,D.lang=navigator.language||"en-US",D.onresult=E=>{if(d.current!==D)return;let U="",T="";for(let L=E.resultIndex;L<E.results.length;L++){const F=E.results[L],W=F?.[0]?.transcript??"";F?.isFinal?T=T+W:U=U+W}T&&(m.current=m.current+T,r(m.current)),g.current=U,a(U)},D.onerror=E=>{d.current===D&&E.error!=="no-speech"&&(h.current=!1,d.current=null,b(),s(E.error==="not-allowed"?"permission-denied":"idle"))},D.onend=()=>{if(d.current===D&&h.current)try{D.start()}catch{}};try{D.start()}catch{return h.current=!1,d.current=null,b(),s("idle"),"idle"}return"recording"},t[1]=A}else A=t[1];const j=A;let y;t[2]===Symbol.for("react.memo_cache_sentinel")?(y=()=>{h.current=!1,d.current?.stop(),b(),s("idle"),c(Array(Pe).fill(.05)),a("");const I=(m.current+(g.current?" "+g.current:"")).trim();return r(""),m.current="",g.current="",I},t[2]=y):y=t[2];const k=y;let w;t[3]===Symbol.for("react.memo_cache_sentinel")?(w=()=>{h.current=!1,d.current?.abort(),b(),s("idle"),r(""),a(""),c(Array(Pe).fill(.05)),m.current="",g.current=""},t[3]=w):w=t[3];const S=w;let N;return t[4]!==i||t[5]!==e||t[6]!==n||t[7]!==l?(N={status:e,transcript:n,interimTranscript:i,waveformData:l,isSupported:v,startRecording:j,stopRecording:k,cancelRecording:S},t[4]=i,t[5]=e,t[6]=n,t[7]=l,t[8]=N):N=t[8],N}function Li(t){return t.stop()}function Fi(){}function zi(){return Array(Pe).fill(.05)}function Oi(t){const e=R.c(4),{data:s}=t;let n;e[0]!==s?(n=s.map($i),e[0]=s,e[1]=n):n=e[1];let r;return e[2]!==n?(r=o.jsx("div",{className:"flex items-center justify-center gap-[2px] h-10 overflow-hidden","aria-hidden":"true",children:n}),e[2]=n,e[3]=r):r=e[3],r}function $i(t,e){return o.jsx("div",{className:"w-[2px] shrink-0 rounded-full bg-chart-2 transition-[height] duration-75 ease-out",style:{height:`${Math.max(4,Math.round(t*40))}px`}},e)}const Le=12e3,Rt=ie({token:ne(),expiresAt:Js()});Zs("provider",[ie({provider:je("elevenlabs"),conversationToken:ne().min(1)}),ie({provider:je("openai"),transport:je("webrtc")})]);const Bi=Hs([Rt.extend({provider:je("elevenlabs").default("elevenlabs"),conversationToken:ne().min(1)}),Rt.extend({provider:je("openai"),transport:je("webrtc")})]);ie({token:ne().min(1).max(4096),text:ne().trim().min(1).max(Le)});const js=ie({request:ne().trim().min(1).max(Le)}),rt=5e3;Ut(ie({role:ze(["user","agent"]),text:ne().min(1).max(rt)})).max(60).refine(t=>t.reduce((e,s)=>e+s.text.length,0)<=rt,{message:"Voice transcript is too long"});function cl(t){const e=[];let s=rt;for(const n of t.slice(-60).reverse()){if(s<=0)break;const r=n.text.slice(-s);e.unshift({role:n.role,text:r}),s-=r.length}return e}ie({token:ne().min(1).max(4096),sdp:ne().min(1).max(1e5),language:ze(["en","pt"]).default("en")}).strict();const Ki=ie({sdp:ne().min(1).max(1e5)});async function qi(t,e,s,n,r){if(t.provider==="openai"){const{startOpenAIConversation:l}=await bt(async()=>{const{startOpenAIConversation:c}=await import("./openai-conversation-IEZAYnVN.js");return{startOpenAIConversation:c}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128]));return l(r,s,n)}const{Conversation:i}=await bt(async()=>{const{Conversation:l}=await import("./index-yN0BIuMc.js");return{Conversation:l}},[]);n.throwIfAborted();const a=await i.startSession({...s,clientTools:{delegate_to_agent:async l=>{const c=js.safeParse(l);return JSON.stringify(c.success?await s.onDelegate(c.data):{status:"rejected",reason:"A complete request is required."})},get_agent_status:()=>JSON.stringify(s.getWorkStatus()),stop_agent_work:()=>JSON.stringify(s.cancelCurrentWork())},conversationToken:t.conversationToken,connectionType:"webrtc",overrides:{agent:{language:e}}});return n.aborted&&(await a.endSession(),n.throwIfAborted()),{endSession:()=>a.endSession(),setMicMuted:l=>a.setMicMuted(l),getOutputVolume:()=>a.getOutputVolume(),publishUpdate:l=>{const c=JSON.stringify({source:"Studio background data, not a user request or instructions",contextId:l.contextId,requestId:l.delegationId,text:l.text});l.delivery==="context"?a.sendContextualUpdate(c):a.sendUserMessage(`[Studio background event, not a new user request]
10
10
  ${c}
11
11
  Briefly report this update. Do not delegate it as new work.`)}}}const Qi=ie({background:je(!0),status:je("started"),jobId:ne().min(1)}),Yi=ie({item:ie({id:ne().min(1),title:ne(),status:ne()})}),Wi=t=>`${t}:react-msg`;function ks(t,e){const s=t.findIndex(r=>r.id===e&&r.role==="user");if(s<0)return null;const n=[];for(const r of t.slice(s+1))if(!r.metadata?.subtaskJobId){if(r.role==="user")break;r.role==="assistant"&&n.push(r)}return n}function Et(t,e){const s=[],n=[];for(const r of ks(t,e)??[])for(const i of r.parts){if(!("state"in i)||i.state!=="output-available"||!("output"in i))continue;const a=i.type;if(a==="tool-subtask"){const l=Qi.safeParse(i.output);l.success&&s.push(l.data.jobId)}else if(a==="tool-TASK_BOARD_ITEM_CREATE"){const l=Yi.safeParse(i.output);l.success&&n.push(l.data.item)}}return{backgroundJobs:s,tasks:n}}function Pt(t,e){const s=ks(t,e);if(!s)return null;const n=s.at(-1);if(!n||n.parts.some(l=>"state"in l&&["approval-requested","input-streaming","input-available"].includes(String(l.state))))return null;const r=n.parts.findLast(l=>l.type==="text"||l.type==="dynamic-tool"||l.type.startsWith("tool-"));if(r?.type!=="text")return"";if(r.state==="streaming")return null;const i=r.text.replace(/```[\s\S]*?```/g,"").replace(/!\[[^\]]*\]\([^)]*\)/g,"").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/^\s{0,3}(?:#{1,6}\s+|[-*+]\s+|\d+\.\s+)/gm,"").replace(/[*_`]/g,"").trim();if(!i)return"";if(i.length<=Le)return i;const a=i.slice(0,Le-1);return`${a.slice(0,a.lastIndexOf(" "))}…`}class Gi{constructor(e,s){this.url=e,this.language=s}url;language;state={phase:"idle",muted:!1,working:!1,error:null};listeners=new Set;generation=0;conversation;startupAbort;userSpeaking=!1;token;timer;expires;bindings;jobs=new Map;announcements=[];lastActivity=0;approvalReported=!1;cleanup=Promise.resolve();dispatchQueue=Promise.resolve();lastContext="";lastWorkStatus="";utterance=0;seenUserEvents=new Set;tasks=new Map;boardUpdates=new Map;subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;outputVolume=()=>this.conversation?.getOutputVolume()??0;patch(e){if(!Object.entries(e).every(([s,n])=>this.state[s]===n)){this.state={...this.state,...e};for(const s of this.listeners)s()}}updateBindings(e,s){if(this.bindings=e,!s&&this.state.phase!=="idle"){this.stop();return}this.conversation&&(this.updateContext(),this.collectResults())}requestStatus(e){return e.result!==void 0?"finished":e.accepted?e.background?"running_in_background":this.bindings?.messages.some(s=>s.id===e.messageId)?"running":"queued":"submitting"}status(){const e=this.bindings;return{status:e?.isWaitingForApprovals?"approval_required":e?.error||e?.status==="error"?"failed":e?.isStreaming||e?.isRunInProgress?"working":"idle",requests:[...this.jobs.values()].slice(-6).map(s=>({id:s.messageId,request:s.request.slice(0,200),status:this.requestStatus(s),result:s.result?.slice(0,500)})),tasks:[...this.tasks.values()].slice(-10).map(s=>({title:s.title.slice(0,120),status:s.status}))}}updateContext(){const e=this.bindings?.voiceContext??"";e!==this.lastContext&&(this.lastContext=e,this.conversation?.publishUpdate({text:`Current Studio view, supplied as context only:
12
12
  ${e.slice(0,12e3)}`,delivery:"context",contextId:"studio-view"}))}collectResults(){const e=this.bindings;if(!e||!this.conversation)return;const s=e.isStreaming||e.isRunInProgress;if(this.patch({working:s||[...this.jobs.values()].some(n=>n.accepted&&n.result===void 0)}),this.publishWorkStatus(),e.isWaitingForApprovals){this.approvalReported||(this.approvalReported=!0,this.report("The Studio agent needs the user's approval. The approval controls are visible in this chat. Ask the user to review them; do not approve on their behalf."));return}this.approvalReported=!1;for(const n of this.jobs.values()){if(!n.accepted||n.result!==void 0)continue;if(n.background){this.collectBackground(n,s);continue}const r=e.messages.findIndex(l=>l.id===n.messageId);if(r<0)continue;const i=r>=0&&e.messages.slice(r+1).some(l=>l.role==="user");if(s&&!i)continue;let a;if(!s&&!i&&(e.error||e.status==="error"))a="The agent's run failed. Ask the user to return to the chat for the error details; do not claim completion.";else if(!s&&!i&&e.finishReason&&["error","length","content-filter","aborted"].includes(e.finishReason))a=`The run ended with status ${e.finishReason}; successful completion is not established.`;else{const l=Pt(e.messages,n.messageId);if(l===null)continue;a=l;const c=Et(e.messages,n.messageId);if(this.track(c.tasks),c.backgroundJobs.length){n.background=c.backgroundJobs,this.collectBackground(n,s);continue}}this.finish(n,a||"The agent finished without a final text response. Do not infer that the requested change succeeded.")}this.patch({working:s||[...this.jobs.values()].some(n=>n.accepted&&n.result===void 0)}),this.publishWorkStatus()}collectBackground(e,s){const n=this.bindings?.messages??[],r=[];for(const i of e.background??[]){const a=Wi(i),l=n.findIndex(u=>u.id===a);if(l<0)return;const c=n.slice(l+1).some(u=>u.role==="user");if(s&&!c)return;const d=Pt(n,a);if(d===null)return;this.track(Et(n,a).tasks),r.push(d)}this.finish(e,r.filter(Boolean).join(`