decocms 4.539.1 → 4.540.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (446) hide show
  1. package/dist/client/assets/{ActiveShapeUtils-BJ9qO9gI.js → ActiveShapeUtils-BOoUrrHB.js} +1 -1
  2. package/dist/client/assets/{AlertCircle-C4AlXfWH.js → AlertCircle-DaqrzQLf.js} +1 -1
  3. package/dist/client/assets/{AreaChart-D0lM-INL.js → AreaChart-DrVON7jD.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-wEhmrFT_.js → ArrowLeft-Lry57YLT.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-ByoUzoe_.js → ArrowUp-DzUcbY_U.js} +1 -1
  6. package/dist/client/assets/{BarChart-CeqCYDTf.js → BarChart-Dvj8oTIy.js} +1 -1
  7. package/dist/client/assets/{Building02-FHqo8UFz.js → Building02-Czpjl0U5.js} +1 -1
  8. package/dist/client/assets/{CartesianChart-Duqhjmhr.js → CartesianChart-CR7unfY_.js} +1 -1
  9. package/dist/client/assets/{CategoricalChart-CHKVHf-Y.js → CategoricalChart-DJYWdZLM.js} +1 -1
  10. package/dist/client/assets/{CheckCircle-DvIMPtKQ.js → CheckCircle-BNPESArO.js} +1 -1
  11. package/dist/client/assets/{ChevronSelectorVertical-B4fUuU69.js → ChevronSelectorVertical-DZn3JZt3.js} +1 -1
  12. package/dist/client/assets/{ChevronUp-BO5R2-Sx.js → ChevronUp-DYWuPRic.js} +1 -1
  13. package/dist/client/assets/{Copy01-j7Nlt5qU.js → Copy01-E_QbCxA-.js} +1 -1
  14. package/dist/client/assets/{CreditCard01-Cswluz13.js → CreditCard01-i2HOt1aB.js} +1 -1
  15. package/dist/client/assets/{DotsVertical-CaKzUPHY.js → DotsVertical-CbdEruUk.js} +1 -1
  16. package/dist/client/assets/{ErrorBarContext-D10jKELW.js → ErrorBarContext-XbGnhJFR.js} +1 -1
  17. package/dist/client/assets/{Globe04-BHUGUEw-.js → Globe04-QDIAkI_1.js} +1 -1
  18. package/dist/client/assets/{Image01-Br2Za8Gz.js → Image01-DoQzA6mU.js} +1 -1
  19. package/dist/client/assets/{Key01-6xIzri6P.js → Key01-yX9At---.js} +1 -1
  20. package/dist/client/assets/{Link01-Dp0vu4Af.js → Link01-DdjCKN6E.js} +1 -1
  21. package/dist/client/assets/{LinkBroken01-DUZnTa9c.js → LinkBroken01-BFQs5QxW.js} +1 -1
  22. package/dist/client/assets/{Minus-8YEgVl9l.js → Minus-BvbXf1Sp.js} +1 -1
  23. package/dist/client/assets/{Monitor01-x3qJMHxB.js → Monitor01-CGq_FB6g.js} +1 -1
  24. package/dist/client/assets/{Play-CNerU9Fh.js → Play-ChXZcgWf.js} +1 -1
  25. package/dist/client/assets/{Plus-Dd1LZQDu.js → Plus-AFrvUoUc.js} +1 -1
  26. package/dist/client/assets/{ReferenceLine-mTbhIHqG.js → ReferenceLine-C4qdhryZ.js} +1 -1
  27. package/dist/client/assets/{SearchMd-huYq_veH.js → SearchMd-DSPN9QxV.js} +1 -1
  28. package/dist/client/assets/{Sector-C8kfjLRy.js → Sector-BmhXcpO4.js} +1 -1
  29. package/dist/client/assets/{ShoppingBag01-43aM_SvI.js → ShoppingBag01-DB7ytToi.js} +1 -1
  30. package/dist/client/assets/{Sun-CsCFS7Mx.js → Sun-DoDvwdQj.js} +1 -1
  31. package/dist/client/assets/{SwitchHorizontal01-DgO15jXk.js → SwitchHorizontal01-DoMMYhWx.js} +1 -1
  32. package/dist/client/assets/{Tool01-BM_jAXaw.js → Tool01-BdswuHJy.js} +1 -1
  33. package/dist/client/assets/{Trash01-D_6j6Kjo.js → Trash01-B0glQHgK.js} +1 -1
  34. package/dist/client/assets/{Upload01-jTJu_yfb.js → Upload01-BY0gIDxJ.js} +1 -1
  35. package/dist/client/assets/{UserSquare-Cm6nmxmp.js → UserSquare-BhJx3glH.js} +1 -1
  36. package/dist/client/assets/{Users01-BM-G7vNB.js → Users01-CfcMu04c.js} +1 -1
  37. package/dist/client/assets/{XClose-CmsTtHZr.js → XClose-wH9pi_Oq.js} +1 -1
  38. package/dist/client/assets/{ZoomOut-DmiEhPgw.js → ZoomOut-DIZKZikC.js} +1 -1
  39. package/dist/client/assets/{access-gate-DcyD6s41.js → access-gate-BHfZueQy.js} +1 -1
  40. package/dist/client/assets/{add-connection-dialog-CI1dfD2M.js → add-connection-dialog-CHVJhgT5.js} +1 -1
  41. package/dist/client/assets/agent-analytics-BXAn2N0r.js +2 -0
  42. package/dist/client/assets/agent-app-XDaH2UxV.js +1 -0
  43. package/dist/client/assets/agent-assets-BAIPSzOm.js +1 -0
  44. package/dist/client/assets/{agent-automation-CuXnRK7H.js → agent-automation-BGJ3-TK8.js} +2 -2
  45. package/dist/client/assets/agent-automations-DSp3SJST.js +1 -0
  46. package/dist/client/assets/agent-calendar-BxXog5Q5.js +1 -0
  47. package/dist/client/assets/agent-connect-sources-CZvvMsHK.js +1 -0
  48. package/dist/client/assets/agent-deck-BYR4XQci.js +1 -0
  49. package/dist/client/assets/agent-e2e-DRxuNo8-.js +1 -0
  50. package/dist/client/assets/agent-experiments-DRjAZYzR.js +1 -0
  51. package/dist/client/assets/agent-file-pPOOGtfl.js +1 -0
  52. package/dist/client/assets/agent-hosting-BX8P_5or.js +1 -0
  53. package/dist/client/assets/{agent-icon-8z_1onUt.js → agent-icon-DO8s6ea2.js} +1 -1
  54. package/dist/client/assets/agent-library-Bc3kQ_R6.js +1 -0
  55. package/dist/client/assets/agent-library-file-DrHSAEDA.js +1 -0
  56. package/dist/client/assets/agent-monitor-BTQ_6U0v.js +1 -0
  57. package/dist/client/assets/agent-overview-CuUdmXFu.js +1 -0
  58. package/dist/client/assets/agent-releases-DM76bls9.js +2 -0
  59. package/dist/client/assets/agent-settings-D8raNlY9.js +1 -0
  60. package/dist/client/assets/{agent-site-editor-BDP7gzxw.js → agent-site-editor-DPCxxALX.js} +2 -2
  61. package/dist/client/assets/agent-site-editor-code-C6cvE1TU.js +2 -0
  62. package/dist/client/assets/agent-site-editor-content-BkfY5JF6.js +1 -0
  63. package/dist/client/assets/agent-site-editor-preview-BeN6Ies6.js +1 -0
  64. package/dist/client/assets/agent-view-C7IRhw_c.js +1 -0
  65. package/dist/client/assets/{agent-view-guard-o5lp5yG3.js → agent-view-guard-nkOg3_TY.js} +1 -1
  66. package/dist/client/assets/agents-list-C4mVj2oB.js +1 -0
  67. package/dist/client/assets/ai-providers-CVhG8V9K.js +1 -0
  68. package/dist/client/assets/{alert-z-BheMxj.js → alert-Bbd8MBbC.js} +1 -1
  69. package/dist/client/assets/{analytics-sections-Cd1hOIgU.js → analytics-sections-jwRj3TLN.js} +1 -1
  70. package/dist/client/assets/api-keys-Bdi2Hfk1.js +1 -0
  71. package/dist/client/assets/{api-keys-BNQ_2tij.js → api-keys-DoLrBZtK.js} +1 -1
  72. package/dist/client/assets/app-editor-DeYY_4hY.js +1 -0
  73. package/dist/client/assets/{asset-utils-KFyox6to.js → asset-utils-CxWNRiZo.js} +1 -1
  74. package/dist/client/assets/{auth-DdsRd0Yn.js → auth-Bh5UNoqX.js} +1 -1
  75. package/dist/client/assets/{auth-catchall-D-E9YoBz.js → auth-catchall-4NHJLfMJ.js} +1 -1
  76. package/dist/client/assets/{auth-entry-DxiqEo8u.js → auth-entry-DeWSrwTW.js} +1 -1
  77. package/dist/client/assets/{auth-split-layout-Duvl3HAX.js → auth-split-layout-CxSdEcxZ.js} +1 -1
  78. package/dist/client/assets/{authenticate-and-persist-oauth-CpC3kbG-.js → authenticate-and-persist-oauth-BvbYgtDL.js} +1 -1
  79. package/dist/client/assets/{automation-list-row-DFFZOl8x.js → automation-list-row-B5PKQhfb.js} +1 -1
  80. package/dist/client/assets/{automation-runs-DkFjFhD7.js → automation-runs-CJ5PzJ6P.js} +1 -1
  81. package/dist/client/assets/{automations-Bl6B_iMH.js → automations-DoU-6EfQ.js} +1 -1
  82. package/dist/client/assets/{autosend-1JuiPy5f.js → autosend-BE8sRUrR.js} +1 -1
  83. package/dist/client/assets/{badge-DqbVW6aJ.js → badge-B1tWhSy_.js} +1 -1
  84. package/dist/client/assets/{block-document-BGMTxIjY.js → block-document-O9OVzBXq.js} +1 -1
  85. package/dist/client/assets/{blocks-preview-workspace-context-CvEr9IEf.js → blocks-preview-workspace-context-v-05bFgy.js} +1 -1
  86. package/dist/client/assets/{blocks-tab-states-BJna5TPX.js → blocks-tab-states-mp1yavun.js} +1 -1
  87. package/dist/client/assets/{blog-schema-C2GcnKhl.js → blog-schema-BXpJta6q.js} +1 -1
  88. package/dist/client/assets/{buckets-Bs1oolpP.js → buckets-BQuUHxtl.js} +1 -1
  89. package/dist/client/assets/{build-improve-prompt-doc-Hiwx1yva.js → build-improve-prompt-doc-CwbtrjfW.js} +1 -1
  90. package/dist/client/assets/{calendar-DB-dU0iq.js → calendar-5n1bBWkl.js} +1 -1
  91. package/dist/client/assets/{capability-load-error-A9LFDt5q.js → capability-load-error-CygKHjaW.js} +1 -1
  92. package/dist/client/assets/category-editor-DvqQcGRC.js +1 -0
  93. package/dist/client/assets/{cdn-tab-D-hvfWSy.js → cdn-tab-B_cU16DV.js} +1 -1
  94. package/dist/client/assets/{chart-Ql3qHXBS.js → chart-C0_FGEkR.js} +1 -1
  95. package/dist/client/assets/{chat-context-BO-O8zYY.js → chat-context-DJQNHpnm.js} +6 -6
  96. package/dist/client/assets/{chat-draft-CL98S7Qa.js → chat-draft-DQWviosv.js} +1 -1
  97. package/dist/client/assets/{checkbox-uTwuXUyB.js → checkbox-yhLjvc2y.js} +1 -1
  98. package/dist/client/assets/{choose-editor-CRlyItk_.js → choose-editor-5ZAnwYWB.js} +1 -1
  99. package/dist/client/assets/{cli-auth-success-DqN9LCSz.js → cli-auth-success-BYQ3YAvN.js} +1 -1
  100. package/dist/client/assets/{client-icons-CwC1mMuq.js → client-icons-CaxEYfpC.js} +1 -1
  101. package/dist/client/assets/cms-settings-editor-BE9x_nrP.js +1 -0
  102. package/dist/client/assets/{collapsible-CT1Srvnc.js → collapsible-Dp7IveTF.js} +1 -1
  103. package/dist/client/assets/collection-detail-DavIgOzF.js +1 -0
  104. package/dist/client/assets/{collection-display-button-CTgwXGtH.js → collection-display-button-EzgYxMRf.js} +1 -1
  105. package/dist/client/assets/{collection-search-CA6Hdd1a.js → collection-search-DKNF_aHL.js} +1 -1
  106. package/dist/client/assets/{collection-table-wrapper-C43OwwrW.js → collection-table-wrapper-DIqf0s_I.js} +1 -1
  107. package/dist/client/assets/{collection-tabs-Cx2RUmMM.js → collection-tabs-CymIaett.js} +1 -1
  108. package/dist/client/assets/{column-rules-Dya8Th1r.js → column-rules-DGrrvn-G.js} +2 -2
  109. package/dist/client/assets/{combobox-YcuTN2Gw.js → combobox-dysI95ld.js} +1 -1
  110. package/dist/client/assets/{command-DQVIGVkX.js → command-D_wtag_V.js} +1 -1
  111. package/dist/client/assets/{companion-mcps-section-XznG9VE1.js → companion-mcps-section-BdCI0EqY.js} +1 -1
  112. package/dist/client/assets/{config-DkilocE4.js → config-CQQ9U3og.js} +1 -1
  113. package/dist/client/assets/{connect-CI39dz40.js → connect-CyugcJi1.js} +3 -3
  114. package/dist/client/assets/{connect-layout-Bg2f7P8T.js → connect-layout-BmSP5LrN.js} +1 -1
  115. package/dist/client/assets/{connect-source-dialog-Ba4R-hS5.js → connect-source-dialog-dDRy6oN_.js} +1 -1
  116. package/dist/client/assets/{connection-DB5qkIky.js → connection-SI3MUziU.js} +1 -1
  117. package/dist/client/assets/{connection-card-jeshm-mM.js → connection-card-wiFNcVPz.js} +1 -1
  118. package/dist/client/assets/{connection-detail-Mo5F_dC5.js → connection-detail-CyxsqxAY.js} +1 -1
  119. package/dist/client/assets/{connection-form-helpers-DkuRKDLQ.js → connection-form-helpers-DEYmvQ4D.js} +1 -1
  120. package/dist/client/assets/{connections-DasGGdy8.js → connections-fiTD4f_p.js} +1 -1
  121. package/dist/client/assets/{content-tab-BWJhs-ed.js → content-tab-CIEK1ThE.js} +3 -3
  122. package/dist/client/assets/context-CPDgXD5A.js +1 -0
  123. package/dist/client/assets/{context-menu-DE0O1IAD.js → context-menu-CPo-TDeb.js} +1 -1
  124. package/dist/client/assets/{context-shell-wfjVQB-Y.js → context-shell-CXn_oe8e.js} +3 -3
  125. package/dist/client/assets/{core.esm-_OwE5Bvr.js → core.esm-CeU7AJNb.js} +1 -1
  126. package/dist/client/assets/{create-organization-dialog-DHLVl8iy.js → create-organization-dialog-BJ-ipj89.js} +1 -1
  127. package/dist/client/assets/{daily-pulse-DlMtS_Ie.js → daily-pulse-DboJ8j0E.js} +1 -1
  128. package/dist/client/assets/discover-DS7s-L_U.js +1 -0
  129. package/dist/client/assets/{domain-settings-SeQfe-5v.js → domain-settings-DT7fh3GW.js} +1 -1
  130. package/dist/client/assets/{drawer-DZlLGfvX.js → drawer-CEKMK2Xy.js} +1 -1
  131. package/dist/client/assets/{editor-D84lw5XU.js → editor-119-kR49.js} +1 -1
  132. package/dist/client/assets/{editor-classes-DgMjj3Ei.js → editor-classes-2SvDzxJS.js} +1 -1
  133. package/dist/client/assets/{empty-state-C1-6oKUX.js → empty-state-C_4QOOCa.js} +1 -1
  134. package/dist/client/assets/{empty-state-YnMyEE1u.js → empty-state-DcLpc4zT.js} +1 -1
  135. package/dist/client/assets/{experiments-tab-CXflHBtw.js → experiments-tab-bGN5Wr6b.js} +1 -1
  136. package/dist/client/assets/{experiments-tab-choice-BAGkDSHi.js → experiments-tab-choice-DkauT2Jo.js} +1 -1
  137. package/dist/client/assets/{extract-connection-data-3P1lh0vb.js → extract-connection-data-BbZfot_J.js} +1 -1
  138. package/dist/client/assets/feature-gate-bdKRsBFR.js +1 -0
  139. package/dist/client/assets/feature-paywall-DAahPvB8.js +1 -0
  140. package/dist/client/assets/file-explorer-Dsn4i28O.js +2 -0
  141. package/dist/client/assets/{file-preview-B-sfAHHw.js → file-preview-COMqp33v.js} +1 -1
  142. package/dist/client/assets/{file-share-button-B9Fb7DUQ.js → file-share-button-DcVhpMbp.js} +1 -1
  143. package/dist/client/assets/{file-type-icon-C7xJ53He.js → file-type-icon-lZJfDHey.js} +1 -1
  144. package/dist/client/assets/{folder-icon-DkGrMgcn.js → folder-icon-CyiATNbj.js} +1 -1
  145. package/dist/client/assets/{form-CUFiE9T-.js → form-CqcvGBPS.js} +1 -1
  146. package/dist/client/assets/{general-DpIis4vv.js → general-CXJLTfCs.js} +1 -1
  147. package/dist/client/assets/github-icon-CwEeHUg2.js +1 -0
  148. package/dist/client/assets/{held-block-view-U1nzFK54.js → held-block-view-BxrII4AU.js} +3 -3
  149. package/dist/client/assets/home-B9PCBrp1.js +1 -0
  150. package/dist/client/assets/{hosted-publish-feedback-Bh1VecP7.js → hosted-publish-feedback-IJbFHaab.js} +1 -1
  151. package/dist/client/assets/{icon-button-BxmZsAbq.js → icon-button-DpHJ-JqO.js} +1 -1
  152. package/dist/client/assets/{index-DNJBArc-.js → index-Bk0jj91j.js} +1 -1
  153. package/dist/client/assets/{index-zmKCzDkw.js → index-Bq8jsQ_w.js} +1 -1
  154. package/dist/client/assets/{index-CsjIwzuX.js → index-Br9i6zHp.js} +1 -1
  155. package/dist/client/assets/index-By_-wb1N.css +1 -0
  156. package/dist/client/assets/{index-Kig1FnrG.js → index-C2zeCcsu.js} +2 -2
  157. package/dist/client/assets/{index-Cmk_c0mj.js → index-C4tvJe6k.js} +1 -1
  158. package/dist/client/assets/{index-CHgXf2G3.js → index-CWrjSpv6.js} +1 -1
  159. package/dist/client/assets/{index-DN5yNDF8.js → index-CtkdQjRq.js} +1 -1
  160. package/dist/client/assets/{index-Lk-lDKnf.js → index-D3KLhYWS.js} +1 -1
  161. package/dist/client/assets/{index-Dvnk0CSj.js → index-DQN-rago.js} +1 -1
  162. package/dist/client/assets/{index-DJ1OawZD.js → index-DQge_BLv.js} +39 -39
  163. package/dist/client/assets/{index-DNmjdGkM.js → index-Dx7zyr0h.js} +1 -1
  164. package/dist/client/assets/index-TO8lHy3e.js +4 -0
  165. package/dist/client/assets/{index-mxLhZjJM.js → index-j-fjuwfK.js} +1 -1
  166. package/dist/client/assets/index-j4Z-ANHV.js +4 -0
  167. package/dist/client/assets/{index-redirect-D6XbqgNM.js → index-redirect-BuE1MOHc.js} +1 -1
  168. package/dist/client/assets/index-zIshg7PY.js +1 -0
  169. package/dist/client/assets/{infiniteQueryObserver-L6rGGtyF.js → infiniteQueryObserver-CJSP-r-Q.js} +1 -1
  170. package/dist/client/assets/{infra-billing-CghGhArE.js → infra-billing-CWnShztW.js} +1 -1
  171. package/dist/client/assets/{input-BHvfdat6.js → input-DEv-xbR8.js} +3 -3
  172. package/dist/client/assets/{input-CpaVmyCl.js → input-xMjBQS9S.js} +1 -1
  173. package/dist/client/assets/{integration-icon-vdbLoXVP.js → integration-icon-C5QUXJ-_.js} +1 -1
  174. package/dist/client/assets/{jira-icon-Bts6CCIP.js → jira-icon-BJbq7OPn.js} +1 -1
  175. package/dist/client/assets/{label-DIWSyY3V.js → label-nAynIzRB.js} +1 -1
  176. package/dist/client/assets/{layout-BA2GykJG.js → layout-DNjRf8xk.js} +1 -1
  177. package/dist/client/assets/{legacy-agents-deep-VydePbjy.js → legacy-agents-deep-jMmzKh7Y.js} +1 -1
  178. package/dist/client/assets/{legacy-main-redirect-C7tJtw4a.js → legacy-main-redirect-BunqrDCq.js} +1 -1
  179. package/dist/client/assets/library-BbBalmjj.js +1 -0
  180. package/dist/client/assets/{login-BouZ4qsB.js → login-D83UHWcO.js} +1 -1
  181. package/dist/client/assets/{markdown-NzM3VJeN.js → markdown-SDFpVgvK.js} +1 -1
  182. package/dist/client/assets/{mcp-app-renderer-C3v_vbrd.js → mcp-app-renderer-taIEo_0M.js} +1 -1
  183. package/dist/client/assets/{mcp-oauth-DAaJvMdM.js → mcp-oauth-CscDp9_t.js} +1 -1
  184. package/dist/client/assets/{mcp-oauth-BYVXm7Cw.js → mcp-oauth-zNBrv-Zt.js} +1 -1
  185. package/dist/client/assets/{members-CyitmSww.js → members-D0TZ8Ccr.js} +1 -1
  186. package/dist/client/assets/{memory-CRIsTy-N.js → memory-Ba-1Kju3.js} +1 -1
  187. package/dist/client/assets/{mini-report-page-Df8ZVYUM.js → mini-report-page-2l-Lz3u4.js} +1 -1
  188. package/dist/client/assets/{mock-board-DJgNd81n.js → mock-board-1XU__Ik1.js} +4 -4
  189. package/dist/client/assets/{monaco-editor-CsctCosL.js → monaco-editor-DhfBMl22.js} +1 -1
  190. package/dist/client/assets/monitoring-O6AqfPp3.js +1 -0
  191. package/dist/client/assets/{monitoring-stats-row-BDQi5oLA.js → monitoring-stats-row-C9AbRSlG.js} +1 -1
  192. package/dist/client/assets/{multi-select-CEo_kLmg.js → multi-select-D_bxEawf.js} +1 -1
  193. package/dist/client/assets/{mustache-ClLytoM5.js → mustache-PKt0frjT.js} +1 -1
  194. package/dist/client/assets/{named-rule-uses-ewshkS_W.js → named-rule-uses-Bo4fIeGa.js} +1 -1
  195. package/dist/client/assets/{new-project-dialog-Dbr37SLy.js → new-project-dialog-D-A0zxil.js} +1 -1
  196. package/dist/client/assets/{oauth-callback-DmmDKWte.js → oauth-callback-DubxtStZ.js} +1 -1
  197. package/dist/client/assets/{oauth-callback-ai-provider-BVh0_wge.js → oauth-callback-ai-provider-BC8tw2Bc.js} +1 -1
  198. package/dist/client/assets/{onboarding-BB704NvI.js → onboarding-Ca-dU_v5.js} +1 -1
  199. package/dist/client/assets/openai-conversation-Cl6vICtm.js +3 -0
  200. package/dist/client/assets/{optimistic-project-sidebar-views-Dn7Pz8bp.js → optimistic-project-sidebar-views-CFDUE-TH.js} +1 -1
  201. package/dist/client/assets/{order-monitor-day-BMdD8bDK.js → order-monitor-day-Bh13wI0p.js} +1 -1
  202. package/dist/client/assets/{organization-choice-CPEZQ_1p.js → organization-choice-DPSWyAa2.js} +1 -1
  203. package/dist/client/assets/{orgs-COOW2jxX.js → orgs-ZkiwjsKf.js} +1 -1
  204. package/dist/client/assets/{page-seo-form-0qBzOf00.js → page-seo-form-DH-Hxxys.js} +1 -1
  205. package/dist/client/assets/{pair-RX9az_cH.js → pair-DtO9iW-3.js} +1 -1
  206. package/dist/client/assets/{parse-sections-BGFjtwI9.js → parse-sections-oAWkQEej.js} +1 -1
  207. package/dist/client/assets/plan-CqqG8SUj.js +1 -0
  208. package/dist/client/assets/plan-ladder-B3EmMB3m.js +1 -0
  209. package/dist/client/assets/plan-usage-card-BzLwo22w.js +6 -0
  210. package/dist/client/assets/{popover-Cn1OW4zx.js → popover-B6YbIo3T.js} +1 -1
  211. package/dist/client/assets/post-calendar-Dcvp_FEa.js +1 -0
  212. package/dist/client/assets/{post-editor-DO2FeUc4.js → post-editor-q2dn18ot.js} +2 -2
  213. package/dist/client/assets/{preview-content-BY9XqHdY.js → preview-content-BM5uf6de.js} +1 -1
  214. package/dist/client/assets/{preview-dialog-5T4OQ5N2.js → preview-dialog-B1rrd0Eo.js} +1 -1
  215. package/dist/client/assets/{preview-panel-Co9xo5DN.js → preview-panel-CWMMAoWj.js} +1 -1
  216. package/dist/client/assets/preview-tab-BRwd0IoI.js +551 -0
  217. package/dist/client/assets/{product-picker-dialog-v6iixvmA.js → product-picker-dialog-Cb31reHz.js} +1 -1
  218. package/dist/client/assets/{profile-DudFEHJf.js → profile-txXmLWoZ.js} +1 -1
  219. package/dist/client/assets/project-app-view-C24UQEFV.js +1 -0
  220. package/dist/client/assets/{project-apps-CtRCYs2z.js → project-apps-B12W1GDC.js} +1 -1
  221. package/dist/client/assets/project-feed-C7C18nCo.js +1 -0
  222. package/dist/client/assets/{project-icon-D-mQ9iWl.js → project-icon-B0SToVzq.js} +1 -1
  223. package/dist/client/assets/project-reports-D8rFprGS.js +1 -0
  224. package/dist/client/assets/project-tasks-C6Z1LFGn.js +1 -0
  225. package/dist/client/assets/projects-SPBUjj_X.js +1 -0
  226. package/dist/client/assets/{projects-empty-state-fQGzsUDa.js → projects-empty-state-CJ2OD6jD.js} +1 -1
  227. package/dist/client/assets/{prompts-DihlgOG2.js → prompts-4SFi9ARi.js} +1 -1
  228. package/dist/client/assets/record-editor-C3JQQloA.js +1 -0
  229. package/dist/client/assets/redirect-editor-CX3gDt5E.js +1 -0
  230. package/dist/client/assets/{releases-api-CenoMthy.js → releases-api-C1aD3cIf.js} +1 -1
  231. package/dist/client/assets/reports-B2tDJQsh.js +1 -0
  232. package/dist/client/assets/{reports-DQCKA5NS.js → reports-CFlThgzK.js} +1 -1
  233. package/dist/client/assets/{reports-onboarding-CPlrFSny.js → reports-onboarding-BLkz9Y0k.js} +1 -1
  234. package/dist/client/assets/reports-tab-CxnmtYqI.js +2 -0
  235. package/dist/client/assets/repositories-BOmD-XhQ.js +1 -0
  236. package/dist/client/assets/repositories-COfIEqOO.js +1 -0
  237. package/dist/client/assets/{repository-binding-BItepy-z.js → repository-binding-BSdKE2Qo.js} +1 -1
  238. package/dist/client/assets/{repository-import-picker-UUcvjgba.js → repository-import-picker-DL_KXsuZ.js} +1 -1
  239. package/dist/client/assets/repository-picker-DR1imeoJ.js +1 -0
  240. package/dist/client/assets/{require-capability-B3LM64w7.js → require-capability-UZtVjAt7.js} +1 -1
  241. package/dist/client/assets/{required-auth-layout-Cx9a6Ts4.js → required-auth-layout-BfYIPzIZ.js} +1 -1
  242. package/dist/client/assets/{reset-password-BbOpXCMQ.js → reset-password-Ct6Pe3k_.js} +1 -1
  243. package/dist/client/assets/{resizable-DcjZRINV.js → resizable-STcRbiPL.js} +1 -1
  244. package/dist/client/assets/{resolve-tab-icon-EdGN1ce5.js → resolve-tab-icon-BUDvDo3Q.js} +1 -1
  245. package/dist/client/assets/review-settings-BZAPURVM.js +1 -0
  246. package/dist/client/assets/{roles-Ba3H4RBr.js → roles-BTI_G4my.js} +1 -1
  247. package/dist/client/assets/route-BYYP1Ckt.js +1 -0
  248. package/dist/client/assets/route-BxWnXxr1.js +1 -0
  249. package/dist/client/assets/route-DC0as__j.js +1 -0
  250. package/dist/client/assets/{sandbox-lifecycle-context-C9HSR4z4.js → sandbox-lifecycle-context-DObzOH6l.js} +1 -1
  251. package/dist/client/assets/{schema-C6DRY3bO.js → schema-2IXYlLNg.js} +1 -1
  252. package/dist/client/assets/{schema-Db1omEtk.js → schema-CiJGpkKp.js} +1 -1
  253. package/dist/client/assets/{scroll-area-DuhcsVwv.js → scroll-area-BCbl3S10.js} +1 -1
  254. package/dist/client/assets/{search-input-BD_zzwAH.js → search-input-BvepfDCp.js} +1 -1
  255. package/dist/client/assets/{search-toggle-DI1P1fkR.js → search-toggle-DNanFl3b.js} +1 -1
  256. package/dist/client/assets/{secret-picker-D4NRcsNL.js → secret-picker-BFw_Vm2O.js} +1 -1
  257. package/dist/client/assets/{secrets-Y-mIp1nG.js → secrets-DhC5ps_G.js} +1 -1
  258. package/dist/client/assets/{section-array-field-Dx2cyr46.js → section-array-field-C4Dn6tRH.js} +1 -1
  259. package/dist/client/assets/{sections-Bfbs4u2V.js → sections-BoMQy-an.js} +1 -1
  260. package/dist/client/assets/sections-editor-HzO8sny6.js +1 -0
  261. package/dist/client/assets/{select-D9aSCbjE.js → select-CrEvL5z9.js} +1 -1
  262. package/dist/client/assets/{select-model-D3_W3xk0.js → select-model-CAsc6jpO.js} +1 -1
  263. package/dist/client/assets/seo-editor-CyB5kB-I.js +1 -0
  264. package/dist/client/assets/{separator-YTO60A4h.js → separator-Dt_7ryb4.js} +1 -1
  265. package/dist/client/assets/settings-tab-B7Vt0fWI.js +1 -0
  266. package/dist/client/assets/{sheet-jVe6rN26.js → sheet-Dwf0d2yk.js} +1 -1
  267. package/dist/client/assets/{shell-layout-BQMms4WU.js → shell-layout-CTdQsY_z.js} +1 -1
  268. package/dist/client/assets/{site-draft-actions-D47qJfS1.js → site-draft-actions-IMB26mGs.js} +1 -1
  269. package/dist/client/assets/{site-draft-view-CWkbNueZ.js → site-draft-view-f8qPUNeN.js} +2 -2
  270. package/dist/client/assets/site-editor-DrkKMtaV.js +1 -0
  271. package/dist/client/assets/{site-editor-toast-CRMACk2O.js → site-editor-toast-C3--n_in.js} +1 -1
  272. package/dist/client/assets/{skills-CfT_g3p1.js → skills-BvtJnyjI.js} +1 -1
  273. package/dist/client/assets/{slider-CRrDbpPf.js → slider-CNTpN8Re.js} +1 -1
  274. package/dist/client/assets/{sortable.esm-Ci2IW7RC.js → sortable.esm-c1-MiY5V.js} +1 -1
  275. package/dist/client/assets/{sso-Dm6OBcmB.js → sso-Bs5GeUJD.js} +1 -1
  276. package/dist/client/assets/{suggestion-D2M-2UXV.js → suggestion-uJQK-wZ9.js} +2 -2
  277. package/dist/client/assets/{switch-CVdtqclr.js → switch-yYhcctGB.js} +1 -1
  278. package/dist/client/assets/{symbol-BkSYJGaa.js → symbol-C4rfRhzp.js} +1 -1
  279. package/dist/client/assets/synced-repos-CiMRfJrJ.js +1 -0
  280. package/dist/client/assets/{tab-icon-glyph-DWV4jizV.js → tab-icon-glyph-BI27Qjvn.js} +1 -1
  281. package/dist/client/assets/{table-scnpQL_A.js → table-CiyeDv2d.js} +1 -1
  282. package/dist/client/assets/{tabs-CZmTm0b_.js → tabs-CkNdZlhM.js} +1 -1
  283. package/dist/client/assets/{task-assignee-avatar-D0kQ17F0.js → task-assignee-avatar-CMrJBads.js} +1 -1
  284. package/dist/client/assets/{task-board-uliYMpMh.js → task-board-DCXqqZ12.js} +1 -1
  285. package/dist/client/assets/{task-route-97n4qXAz.js → task-route-Dd71UgL5.js} +1 -1
  286. package/dist/client/assets/{task-status-BIbfLs-o.js → task-status-CQ3ao3yh.js} +1 -1
  287. package/dist/client/assets/taskboard-analytics-CbI6X7pJ.js +1 -0
  288. package/dist/client/assets/tasks-C1NS2CIB.js +1 -0
  289. package/dist/client/assets/{tasks-Dw6mfGSg.js → tasks-mM2pq91X.js} +3 -3
  290. package/dist/client/assets/{textarea-CxbswNZX.js → textarea-DgBaFzwD.js} +1 -1
  291. package/dist/client/assets/thread-analytics-B0aq1uDf.js +1 -0
  292. package/dist/client/assets/{thread-intent-BpcQdr2N.js → thread-intent-BXZYb_rR.js} +1 -1
  293. package/dist/client/assets/thread-route-8AzPmWR1.js +1 -0
  294. package/dist/client/assets/{thread-route-lJ46mBb6.js → thread-route-BhHeUYXo.js} +1 -1
  295. package/dist/client/assets/{thread-sheet-body-Cy2tgF2j.js → thread-sheet-body-C9NrvW34.js} +1 -1
  296. package/dist/client/assets/{time-range-picker-DfZ9Y4gp.js → time-range-picker-DqbJ77RY.js} +1 -1
  297. package/dist/client/assets/{toggle-group-DJ6VL3oV.js → toggle-group-zfRo99MM.js} +1 -1
  298. package/dist/client/assets/{tool-namespace-D7Fdjyab.js → tool-namespace-CrCuqBA7.js} +1 -1
  299. package/dist/client/assets/{toolbar-icon-button-B0kxSi5C.js → toolbar-icon-button-B0tBxUCb.js} +1 -1
  300. package/dist/client/assets/{tooltip-Bbs97viR.js → tooltip--hQ071uj.js} +1 -1
  301. package/dist/client/assets/{tooltipContext-CrwtbrM3.js → tooltipContext-CzjEugcr.js} +1 -1
  302. package/dist/client/assets/{track-Dko_RRUu.js → track-DS8BOtu9.js} +1 -1
  303. package/dist/client/assets/{types-D2I0j8gC.js → types-vHdCIVHy.js} +1 -1
  304. package/dist/client/assets/{url-slug-BW4Qp5zi.js → url-slug-oBnMGRk3.js} +1 -1
  305. package/dist/client/assets/{usage-stats-CBq4yPWo.js → usage-stats-Bfpi0erw.js} +1 -1
  306. package/dist/client/assets/{use-ai-providers-BIcA-ltu.js → use-ai-providers-C9yoEjqD.js} +1 -1
  307. package/dist/client/assets/{use-apply-named-rule-BxQGBMDb.js → use-apply-named-rule-Bv8beIr1.js} +1 -1
  308. package/dist/client/assets/{use-automations-B4JLlxTN.js → use-automations-3u659Mzy.js} +1 -1
  309. package/dist/client/assets/{use-autosave-Czc6bfK5.js → use-autosave-NqlgHsXe.js} +1 -1
  310. package/dist/client/assets/{use-chat-layout-state-mgi-uN0U.js → use-chat-layout-state-DtHD302s.js} +1 -1
  311. package/dist/client/assets/{use-clock-tick-i4_RgreD.js → use-clock-tick-DsgVgaMj.js} +1 -1
  312. package/dist/client/assets/{use-cms-publish-actions-DJMiXAXQ.js → use-cms-publish-actions-DD2X-WS9.js} +1 -1
  313. package/dist/client/assets/{use-connect-companion-B0DGoIM8.js → use-connect-companion-5d_OtePL.js} +1 -1
  314. package/dist/client/assets/{use-connection-BqqPyNtq.js → use-connection-DjcoL2xp.js} +1 -1
  315. package/dist/client/assets/{use-copy-BYz3Xa4M.js → use-copy-BmESZuBQ.js} +1 -1
  316. package/dist/client/assets/{use-create-virtual-mcp-DB7KfmQO.js → use-create-virtual-mcp-DUFp5SfV.js} +1 -1
  317. package/dist/client/assets/{use-date-fns-locale-a0B0hAGx.js → use-date-fns-locale-1xKLCmLQ.js} +1 -1
  318. package/dist/client/assets/{use-debounced-autosave-EUU71WFf.js → use-debounced-autosave-DtGVwjBB.js} +1 -1
  319. package/dist/client/assets/{use-debounced-value-gF2MCEqA.js → use-debounced-value-BC9-VsXG.js} +1 -1
  320. package/dist/client/assets/{use-deco-credits-COz15zhz.js → use-deco-credits-MxrjnOZJ.js} +1 -1
  321. package/dist/client/assets/use-decopilot-events-DQJQGAJY.js +1 -0
  322. package/dist/client/assets/{use-delete-connection-Bcwg0d7W.js → use-delete-connection-CH4NYX_K.js} +1 -1
  323. package/dist/client/assets/{use-deployment-admin-BC77P2O5.js → use-deployment-admin-D9U88a6V.js} +1 -1
  324. package/dist/client/assets/use-entitlements-DfzzXZIV.js +1 -0
  325. package/dist/client/assets/{use-fast-preview-draft-url-B3drK4IO.js → use-fast-preview-draft-url-C3Zsdb8u.js} +1 -1
  326. package/dist/client/assets/{use-file-configs-DB5ttYh8.js → use-file-configs-BQsdB00T.js} +1 -1
  327. package/dist/client/assets/{use-inbox-feed-C4dOeIYY.js → use-inbox-feed-B8XaHBzd.js} +1 -1
  328. package/dist/client/assets/{use-infinite-scroll-mA69WX3j.js → use-infinite-scroll-CrNt3X1z.js} +1 -1
  329. package/dist/client/assets/{use-join-requests-SS5NFD1V.js → use-join-requests-pOQBFZZg.js} +1 -1
  330. package/dist/client/assets/{use-main-panel-tabs-Bo5Ijiet.js → use-main-panel-tabs-DI48iHOF.js} +1 -1
  331. package/dist/client/assets/{use-mcp-auth-status-DSTS5c2y.js → use-mcp-auth-status-B6pAOnY6.js} +1 -1
  332. package/dist/client/assets/{use-mcp-client-AOCIses4.js → use-mcp-client-DVzTP9Z-.js} +1 -1
  333. package/dist/client/assets/{use-mcp-prompts-DB4BDCUk.js → use-mcp-prompts-B9D-ZvCI.js} +1 -1
  334. package/dist/client/assets/{use-mcp-tools-XusMthB1.js → use-mcp-tools-D-mu7r_B.js} +1 -1
  335. package/dist/client/assets/{use-mobile-Dqpuq5pP.js → use-mobile-C_KOoyX9.js} +1 -1
  336. package/dist/client/assets/{use-move-blocks-B_53l5Fl.js → use-move-blocks-mCIJarBI.js} +1 -1
  337. package/dist/client/assets/{use-navigate-to-agent-BGSn17g4.js → use-navigate-to-agent-CakeCNXj.js} +1 -1
  338. package/dist/client/assets/{use-org-fs-Bkdq3N3W.js → use-org-fs-CGLMPARk.js} +1 -1
  339. package/dist/client/assets/{use-org-repo-syncs-C0DcFw22.js → use-org-repo-syncs-CJLLkjNn.js} +1 -1
  340. package/dist/client/assets/{use-org-sso-B27z5H2P.js → use-org-sso-AxQjuMiC.js} +1 -1
  341. package/dist/client/assets/{use-organization-roles-B4rnH-Pw.js → use-organization-roles-CQzQZypU.js} +1 -1
  342. package/dist/client/assets/{use-organization-settings-DeGpDV0v.js → use-organization-settings-BgGp5lk4.js} +1 -1
  343. package/dist/client/assets/{use-panel-navigate-gymQhz_L.js → use-panel-navigate-DJWYue4p.js} +1 -1
  344. package/dist/client/assets/{use-project-native-view-presence-D5k1m39W.js → use-project-native-view-presence-Dvt6yQe3.js} +1 -1
  345. package/dist/client/assets/{use-project-scope-C7QHVYKL.js → use-project-scope-DmeYK8Bq.js} +1 -1
  346. package/dist/client/assets/{use-recent-apps-Dz5SjsFx.js → use-recent-apps-C-1xZr4-.js} +1 -1
  347. package/dist/client/assets/{use-releases-Bir66W5G.js → use-releases-BrCAkIVY.js} +1 -1
  348. package/dist/client/assets/{use-reports-diagnostic-BrEWn_dC.js → use-reports-diagnostic-jm0YW2SP.js} +1 -1
  349. package/dist/client/assets/{use-sandbox-events-CRF_nrNL.js → use-sandbox-events-1Xx-AI1q.js} +1 -1
  350. package/dist/client/assets/{use-secrets-2iLsYUpd.js → use-secrets-CLn_8twS.js} +1 -1
  351. package/dist/client/assets/{use-section-preview-base-C0DFb7bg.js → use-section-preview-base-DA9S2k6x.js} +1 -1
  352. package/dist/client/assets/{use-session-runtime-GUnVOwvr.js → use-session-runtime-D49ajMP-.js} +1 -1
  353. package/dist/client/assets/{use-sidebar-collapsed-wg8O55qL.js → use-sidebar-collapsed-DM0SNXB-.js} +1 -1
  354. package/dist/client/assets/{use-tags-Bga9AsV7.js → use-tags-BEzZVqIn.js} +1 -1
  355. package/dist/client/assets/{use-task-board-analytics-CEMolBgL.js → use-task-board-analytics-DlrBSCm4.js} +1 -1
  356. package/dist/client/assets/{use-task-board-events-CiG9lMT9.js → use-task-board-events-BtbvSjEH.js} +1 -1
  357. package/dist/client/assets/{use-task-board-item-prs-BHTOHD6q.js → use-task-board-item-prs-sxDYgHpw.js} +1 -1
  358. package/dist/client/assets/{use-task-metadata-dSdCiTPt.js → use-task-metadata-B2VBxxWt.js} +1 -1
  359. package/dist/client/assets/{use-thread-analytics-BtYY_jfu.js → use-thread-analytics-CF6S8hFd.js} +1 -1
  360. package/dist/client/assets/{use-thread-outputs-oiVigsJg.js → use-thread-outputs-CUfkYNKn.js} +1 -1
  361. package/dist/client/assets/useInfiniteQuery-DW7gjDqh.js +1 -0
  362. package/dist/client/assets/{useQueries-C2a_0Bnz.js → useQueries-Bzc1vZ08.js} +1 -1
  363. package/dist/client/assets/useSuspenseInfiniteQuery-CKl2j5ZP.js +1 -0
  364. package/dist/client/assets/{users-wBVSNRmN.js → users-D47TLrj5.js} +1 -1
  365. package/dist/client/assets/{utils-Dg8Zqgfy.js → utils-CeKg1A9t.js} +1 -1
  366. package/dist/client/assets/{variant-calendar-BDtfwTgy.js → variant-calendar-D8EXCNqj.js} +1 -1
  367. package/dist/client/assets/{variant-matcher-override-Bu7hp_M-.js → variant-matcher-override-D08bT7BW.js} +1 -1
  368. package/dist/client/assets/{view-header-C48Sd4vf.js → view-header-CiREHDQJ.js} +1 -1
  369. package/dist/client/assets/{virtual-mcp-K5pw5xn_.js → virtual-mcp-DonQ6N9_.js} +1 -1
  370. package/dist/client/assets/{watch-sse-pool-B6QIPvpK.js → watch-sse-pool-CDjDlASu.js} +1 -1
  371. package/dist/client/index.html +2 -2
  372. package/dist/server/server.js +1 -1
  373. package/package.json +1 -1
  374. package/dist/client/assets/agent-analytics-BakBmdxQ.js +0 -2
  375. package/dist/client/assets/agent-app-T1PV_xXy.js +0 -1
  376. package/dist/client/assets/agent-assets--izQQNW3.js +0 -1
  377. package/dist/client/assets/agent-automations-BogwQqUc.js +0 -1
  378. package/dist/client/assets/agent-calendar-DHMMzWhJ.js +0 -1
  379. package/dist/client/assets/agent-connect-sources-BWtdedfw.js +0 -1
  380. package/dist/client/assets/agent-deck-KrgJXSfz.js +0 -1
  381. package/dist/client/assets/agent-e2e-4tHipcwc.js +0 -1
  382. package/dist/client/assets/agent-experiments-DJOTUinX.js +0 -1
  383. package/dist/client/assets/agent-file-D5CxFLwK.js +0 -1
  384. package/dist/client/assets/agent-hosting-Czt81-Ye.js +0 -1
  385. package/dist/client/assets/agent-library-D8SOiv1z.js +0 -1
  386. package/dist/client/assets/agent-library-file-CTq0zU4q.js +0 -1
  387. package/dist/client/assets/agent-monitor-QrWGS73P.js +0 -1
  388. package/dist/client/assets/agent-overview-CdhSAegd.js +0 -1
  389. package/dist/client/assets/agent-releases-CqbTcytr.js +0 -2
  390. package/dist/client/assets/agent-settings-C_bxphLA.js +0 -1
  391. package/dist/client/assets/agent-site-editor-code-Bufm1RMf.js +0 -2
  392. package/dist/client/assets/agent-site-editor-content-CBMb0_OQ.js +0 -1
  393. package/dist/client/assets/agent-site-editor-preview-DSxFq0UE.js +0 -1
  394. package/dist/client/assets/agent-view-E1C7o8nR.js +0 -1
  395. package/dist/client/assets/agents-list-JX2yrQuU.js +0 -1
  396. package/dist/client/assets/ai-providers-DDfKxq2r.js +0 -6
  397. package/dist/client/assets/api-keys-D912gOT_.js +0 -1
  398. package/dist/client/assets/app-editor-BugTmbR6.js +0 -1
  399. package/dist/client/assets/category-editor-iMDNmhnX.js +0 -1
  400. package/dist/client/assets/cms-settings-editor-CPMIzDbm.js +0 -1
  401. package/dist/client/assets/collection-detail-N6MIa8jY.js +0 -1
  402. package/dist/client/assets/context-DzhACwZY.js +0 -1
  403. package/dist/client/assets/discover-dg7L59oL.js +0 -1
  404. package/dist/client/assets/feature-gate-fjNvm9sG.js +0 -1
  405. package/dist/client/assets/feature-paywall-CPUVIokY.js +0 -1
  406. package/dist/client/assets/file-explorer-CgWaK9E0.js +0 -2
  407. package/dist/client/assets/home-B-uuqedy.js +0 -1
  408. package/dist/client/assets/index-BhRFpSKm.js +0 -4
  409. package/dist/client/assets/index-Ct4tGK2o.css +0 -1
  410. package/dist/client/assets/index-js1r4MSM.js +0 -1
  411. package/dist/client/assets/index-wL6XR1W9.js +0 -4
  412. package/dist/client/assets/library-BZQzptxa.js +0 -1
  413. package/dist/client/assets/monitoring-D1uxvdzN.js +0 -1
  414. package/dist/client/assets/openai-conversation-BHKm-jmv.js +0 -3
  415. package/dist/client/assets/plan-CuLJtRi2.js +0 -1
  416. package/dist/client/assets/plan-ladder-DoZqyTmO.js +0 -1
  417. package/dist/client/assets/post-calendar-CQMQpXDl.js +0 -1
  418. package/dist/client/assets/preview-tab-Dk_Nbdcf.js +0 -551
  419. package/dist/client/assets/project-app-view-BSWik4ac.js +0 -1
  420. package/dist/client/assets/project-feed-D_L82rla.js +0 -1
  421. package/dist/client/assets/project-reports-BTGcQQsT.js +0 -1
  422. package/dist/client/assets/project-tasks-BN5ETFPb.js +0 -1
  423. package/dist/client/assets/projects-VtUjwukT.js +0 -1
  424. package/dist/client/assets/record-editor-MDcoFLGt.js +0 -1
  425. package/dist/client/assets/redirect-editor-Dbvt6k9r.js +0 -1
  426. package/dist/client/assets/reports-CfCdDbpl.js +0 -1
  427. package/dist/client/assets/reports-tab-g0FOO0ev.js +0 -2
  428. package/dist/client/assets/repositories-BdFi2agG.js +0 -1
  429. package/dist/client/assets/repositories-CXFEVMLy.js +0 -1
  430. package/dist/client/assets/repository-picker-DGSuy8Qj.js +0 -1
  431. package/dist/client/assets/review-settings-tk3z5ltO.js +0 -1
  432. package/dist/client/assets/route-BD2enMqQ.js +0 -1
  433. package/dist/client/assets/route-Cqlv51TY.js +0 -1
  434. package/dist/client/assets/route-CtMkt-W1.js +0 -1
  435. package/dist/client/assets/sections-editor-CMYyrkAw.js +0 -1
  436. package/dist/client/assets/seo-editor-BSLaaASc.js +0 -1
  437. package/dist/client/assets/settings-tab-NMe2C0fr.js +0 -1
  438. package/dist/client/assets/site-editor-kolDQyzi.js +0 -1
  439. package/dist/client/assets/synced-repos-BpnE8VHS.js +0 -1
  440. package/dist/client/assets/taskboard-analytics-B6k3fzc7.js +0 -1
  441. package/dist/client/assets/tasks-Dr846NFl.js +0 -1
  442. package/dist/client/assets/thread-analytics-Dyf_XwAx.js +0 -1
  443. package/dist/client/assets/thread-route-DD_j5hX8.js +0 -1
  444. package/dist/client/assets/use-decopilot-events-Cf_7qBPp.js +0 -1
  445. package/dist/client/assets/useInfiniteQuery-BRUBBHZd.js +0 -1
  446. package/dist/client/assets/useSuspenseInfiniteQuery-BzvYe2de.js +0 -1
@@ -1,4 +1,4 @@
1
- import{aD as Zt,c as q,b as ee,r as w,j as t,B,ai as qt,l as At,a4 as $t,D as et,v as tt,w as st,x as ot,aY as at,y as nt,t as X,bB as es,Z as ts,V as ss,Y as os,aw as as,au as ns,av as is,X as Ee,b8 as rs,h as Le,aM as pt,aN as xt,aO as gt,aP as ht,bm as jt,aQ as yt,aR as bt,aS as vt,C as Ke,aJ as ls,c6 as Ct,I as Nt,c7 as cs,ao as ds,b2 as Ze,n as Xe,f as ms}from"./index-DJ1OawZD.js";import{C as us}from"./index-Lk-lDKnf.js";import{b as it,Q as fs,a as ps,a5 as xs,k as St,av as gs,W as kt,aw as hs,f as js,V as Me,ax as Ot}from"./agent-icon-8z_1onUt.js";import{n as Tt}from"./ShoppingBag01-43aM_SvI.js";import{t as rt}from"./ChevronUp-BO5R2-Sx.js";import{e as ys}from"./UserSquare-Cm6nmxmp.js";import{d as lt,b as zt,t as Et}from"./Tool01-BM_jAXaw.js";import{a as bs}from"./Image01-Br2Za8Gz.js";import{i as vs}from"./SearchMd-huYq_veH.js";import{B as Kt}from"./badge-DqbVW6aJ.js";import{C as Ft}from"./checkbox-uTwuXUyB.js";import{S as ct}from"./switch-CVdtqclr.js";import{a as Mt,b as Rt,P as Lt}from"./popover-Cn1OW4zx.js";import{C as Cs,a as wt,b as Ns,d as Ss,e as ks,c as Ts}from"./command-DQVIGVkX.js";import{g as ws,s as Ds}from"./tool-namespace-D7Fdjyab.js";import{u as dt}from"./use-connection-BqqPyNtq.js";import{u as _s}from"./use-mcp-client-AOCIses4.js";import{u as Is}from"./use-mcp-tools-XusMthB1.js";import{I as Ps}from"./integration-icon-vdbLoXVP.js";import{M as As}from"./select-model-D3_W3xk0.js";import{u as $s}from"./use-ai-providers-BIcA-ltu.js";import{U as Os,b as zs}from"./build-improve-prompt-doc-Hiwx1yva.js";import{a as ve,c as Es,d as Ks}from"./use-automations-B4JLlxTN.js";import{c as Fs,b as Ms,h as Rs,t as Ls}from"./chat-context-BO-O8zYY.js";import{b as Vs,C as Us,a as Ws}from"./collapsible-CT1Srvnc.js";import{c as Bs,T as Gs,a as Hs}from"./tooltip-Bbs97viR.js";import{a as Js}from"./shell-layout-BQMms4WU.js";import{i as Vt}from"./ArrowLeft-wEhmrFT_.js";import{i as Xs}from"./ArrowUp-ByoUzoe_.js";import{s as Qs}from"./Trash01-D_6j6Kjo.js";import{s as mt}from"./XClose-CmsTtHZr.js";import{u as Dt}from"./use-debounced-autosave-EUU71WFf.js";import{T as Ys,a as Zs}from"./input-CpaVmyCl.js";import{u as qs,a as eo,J as Ut}from"./jira-icon-Bts6CCIP.js";import{s as to}from"./Plus-Dd1LZQDu.js";import{i as ut}from"./ZoomOut-DmiEhPgw.js";import{l as We,H as so}from"./config-DkilocE4.js";import{C as oo}from"./task-board-uliYMpMh.js";import{M as Wt}from"./multi-select-CEo_kLmg.js";import{S as ge,b as he,a as je,d as ye,c as be}from"./select-D9aSCbjE.js";import{c as ao,a as no,T as _t}from"./tabs-CZmTm0b_.js";import{a as Qe}from"./Copy01-j7Nlt5qU.js";import{MonacoCodeEditor as io}from"./monaco-editor-CsctCosL.js";import{A as ro}from"./automation-runs-DkFjFhD7.js";import{C as lo}from"./collection-tabs-Cx2RUmMM.js";import{a as co}from"./use-panel-navigate-gymQhz_L.js";import"./use-mobile-Dqpuq5pP.js";import"./use-sidebar-collapsed-wg8O55qL.js";import"./use-chat-layout-state-mgi-uN0U.js";import"./thread-route-lJ46mBb6.js";import"./thread-intent-BpcQdr2N.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-B6QIPvpK.js";import"./slugify-CEUa2lfQ.js";import"./toolbar-icon-button-B0kxSi5C.js";import"./sheet-jVe6rN26.js";import"./resizable-DcjZRINV.js";import"./use-project-scope-C7QHVYKL.js";import"./repository-binding-BItepy-z.js";import"./AlertCircle-C4AlXfWH.js";import"./LinkBroken01-DUZnTa9c.js";import"./Building02-FHqo8UFz.js";import"./CheckCircle-DvIMPtKQ.js";import"./ChevronSelectorVertical-B4fUuU69.js";import"./CreditCard01-Cswluz13.js";import"./DotsVertical-CaKzUPHY.js";import"./Globe04-BHUGUEw-.js";import"./SwitchHorizontal01-DgO15jXk.js";import"./Key01-6xIzri6P.js";import"./Link01-Dp0vu4Af.js";import"./Minus-8YEgVl9l.js";import"./Monitor01-x3qJMHxB.js";import"./Sun-CsCFS7Mx.js";import"./Play-CNerU9Fh.js";import"./Upload01-jTJu_yfb.js";import"./Users01-BM-G7vNB.js";import"./index-CHgXf2G3.js";import"./auth-DdsRd0Yn.js";import"./drawer-DZlLGfvX.js";import"./index-BhRFpSKm.js";import"./ai-providers-logos-DD3qZ33J.js";import"./autosend-1JuiPy5f.js";import"./use-decopilot-events-Cf_7qBPp.js";import"./location-V0VwTJTt.js";import"./use-organization-settings-DeGpDV0v.js";import"./schema-Db1omEtk.js";import"./index-CsjIwzuX.js";import"./use-deployment-admin-BC77P2O5.js";import"./admin-fetch-BhTJlAsX.js";import"./use-clock-tick-i4_RgreD.js";import"./project-icon-D-mQ9iWl.js";import"./new-project-dialog-Dbr37SLy.js";import"./label-DIWSyY3V.js";import"./repository-import-picker-UUcvjgba.js";import"./use-navigate-to-agent-BGSn17g4.js";import"./repository-picker-DGSuy8Qj.js";import"./useInfiniteQuery-BRUBBHZd.js";import"./infiniteQueryObserver-L6rGGtyF.js";import"./collection-search-CA6Hdd1a.js";import"./use-debounced-value-gF2MCEqA.js";import"./required-auth-layout-Cx9a6Ts4.js";import"./use-org-sso-B27z5H2P.js";import"./suggestion-D2M-2UXV.js";import"./usage-stats-CBq4yPWo.js";import"./form-CUFiE9T-.js";import"./utils-CVEq3hMx.js";import"./markdown-NzM3VJeN.js";import"./use-copy-BYz3Xa4M.js";import"./use-mcp-prompts-DB4BDCUk.js";import"./use-org-fs-Bkdq3N3W.js";import"./core.esm-_OwE5Bvr.js";import"./index-BdQq_4o_.js";import"./active-indicator-CCMhAsc_.js";import"./editor-D84lw5XU.js";import"./table-scnpQL_A.js";import"./empty-state-YnMyEE1u.js";import"./use-infinite-scroll-mA69WX3j.js";import"./task-status-BIbfLs-o.js";import"./thread-sheet-body-Cy2tgF2j.js";import"./useSuspenseInfiniteQuery-BzvYe2de.js";import"./pair-RX9az_cH.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-C3v_vbrd.js";import"./types-D2I0j8gC.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./use-thread-outputs-oiVigsJg.js";import"./file-type-icon-C7xJ53He.js";const Ye={fast:{labelKey:"automations.automationConfig.tierFast",subtitleKey:"automations.automationConfig.tierFastSubtitle",icon:js},smart:{labelKey:"automations.automationConfig.tierSmart",subtitleKey:"automations.automationConfig.tierSmartSubtitle",icon:Et},thinking:{labelKey:"automations.automationConfig.tierThinking",subtitleKey:"automations.automationConfig.tierThinkingSubtitle",icon:hs}},mo=["fast","smart","thinking"];function uo(r){const e=q.c(19),{tier:s,onSelect:n}=r,a=ee(),[i,c]=w.useState(!1),o=Ye[s].icon;let j;e[0]!==o?(j=t.jsx(o,{size:14,className:"text-muted-foreground"}),e[0]=o,e[1]=j):j=e[1];const d=Ye[s];let m;e[2]!==a||e[3]!==d.labelKey?(m=a(d.labelKey),e[2]=a,e[3]=d.labelKey,e[4]=m):m=e[4];let x;e[5]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(rt,{size:14,className:"text-muted-foreground"}),e[5]=x):x=e[5];let f;e[6]!==j||e[7]!==m?(f=t.jsx(Mt,{asChild:!0,children:t.jsxs(B,{variant:"outline",size:"sm",className:"w-fit gap-1.5",children:[j,m,x]})}),e[6]=j,e[7]=m,e[8]=f):f=e[8];let g;e[9]!==n||e[10]!==a||e[11]!==s?(g=mo.map(p=>{const l=Ye[p],y=l.icon;return t.jsxs("button",{type:"button",onClick:()=>{n(p),c(!1)},className:At("flex items-start gap-2 px-2 py-1.5 rounded-lg text-left hover:bg-accent"),children:[t.jsx(y,{size:16,className:"shrink-0 text-muted-foreground mt-0.5"}),t.jsxs("div",{className:"flex-1",children:[t.jsx("div",{className:"text-sm",children:a(l.labelKey)}),t.jsx("div",{className:"text-xs text-muted-foreground",children:a(l.subtitleKey)})]}),p===s&&t.jsx(qt,{size:14,className:"text-foreground mt-0.5"})]},p)}),e[9]=n,e[10]=a,e[11]=s,e[12]=g):g=e[12];let u;e[13]!==g?(u=t.jsx(Rt,{align:"start",className:"p-1 w-64",children:t.jsx("div",{className:"flex flex-col",children:g})}),e[13]=g,e[14]=u):u=e[14];let h;return e[15]!==i||e[16]!==f||e[17]!==u?(h=t.jsxs(Lt,{open:i,onOpenChange:c,children:[f,u]}),e[15]=i,e[16]=f,e[17]=u,e[18]=h):h=e[18],h}function fo(r){const e=q.c(27),{tier:s,onTierChange:n,override:a,onOverrideChange:i}=r,c=ee(),[o,j]=w.useState(a!==null);let d;e[0]!==c?(d=c("automations.automationConfig.modelLabel"),e[0]=c,e[1]=d):d=e[1];let m;e[2]!==d?(m=t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:d}),e[2]=d,e[3]=m):m=e[3];let x;e[4]!==i||e[5]!==n||e[6]!==a||e[7]!==c||e[8]!==s||e[9]!==o?(x=o?t.jsx(w.Suspense,{fallback:t.jsx(B,{variant:"outline",size:"sm",disabled:!0,className:"w-fit",children:c("automations.automationConfig.loadingModels")}),children:t.jsx(po,{override:a,onOverrideChange:i})}):t.jsx(uo,{tier:s,onSelect:n}),e[4]=i,e[5]=n,e[6]=a,e[7]=c,e[8]=s,e[9]=o,e[10]=x):x=e[10];let f;e[11]!==i?(f=y=>{j(y),y||i(null)},e[11]=i,e[12]=f):f=e[12];let g;e[13]!==f||e[14]!==o?(g=t.jsx(ct,{checked:o,onCheckedChange:f,className:"cursor-pointer"}),e[13]=f,e[14]=o,e[15]=g):g=e[15];let u;e[16]!==c?(u=c("automations.automationConfig.specificModel"),e[16]=c,e[17]=u):u=e[17];let h;e[18]!==g||e[19]!==u?(h=t.jsxs("label",{className:"flex items-center gap-2 text-xs text-muted-foreground cursor-pointer select-none",children:[g,u]}),e[18]=g,e[19]=u,e[20]=h):h=e[20];let p;e[21]!==x||e[22]!==h?(p=t.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[x,h]}),e[21]=x,e[22]=h,e[23]=p):p=e[23];let l;return e[24]!==m||e[25]!==p?(l=t.jsxs("div",{className:"flex flex-col gap-2",children:[m,p]}),e[24]=m,e[25]=p,e[26]=l):l=e[26],l}function po(r){const e=q.c(25),{override:s,onOverrideChange:n}=r,a=ee(),i=$s(),c=i[0]?.id??null;let o;e[0]!==c||e[1]!==i||e[2]!==s?.credentialId?(o=i.some(l=>l.id===s?.credentialId)?s?.credentialId??null:c,e[0]=c,e[1]=i,e[2]=s?.credentialId,e[3]=o):o=e[3];const[j,d]=w.useState(o);let m;e[4]!==j||e[5]!==c||e[6]!==i?(m=i.some(l=>l.id===j)?j:c,e[4]=j,e[5]=c,e[6]=i,e[7]=m):m=e[7];const x=m;let f;e[8]!==i||e[9]!==s?(f=s&&i.some(l=>l.id===s.credentialId)?{modelId:s.modelId,title:s.title||s.modelId,keyId:s.credentialId,providerId:"deco",description:null,logo:null,capabilities:[],limits:null,costs:null}:null,e[8]=i,e[9]=s,e[10]=f):f=e[10];const g=f;if(i.length===0){let l;e[11]!==a?(l=a("automations.automationConfig.connectAiProviderHint"),e[11]=a,e[12]=l):l=e[12];let y;return e[13]!==l?(y=t.jsx("span",{className:"text-xs text-muted-foreground italic",children:l}),e[13]=l,e[14]=y):y=e[14],y}let u;e[15]!==a?(u=a("automations.automationConfig.pickModelPlaceholder"),e[15]=a,e[16]=u):u=e[16];let h;e[17]!==x||e[18]!==n?(h=l=>{const y=l.keyId??x??"";d(y),n({modelId:l.modelId,credentialId:y,title:l.title??l.modelId})},e[17]=x,e[18]=n,e[19]=h):h=e[19];let p;return e[20]!==x||e[21]!==g||e[22]!==u||e[23]!==h?(p=t.jsx("div",{className:"w-fit max-w-full",children:t.jsx(As,{variant:"bordered",placeholder:u,model:g,credentialId:x,onCredentialChange:d,onModelChange:h})}),e[20]=x,e[21]=g,e[22]=u,e[23]=h,e[24]=p):p=e[24],p}const Bt=[{key:"capabilities",headingKey:"automations.automationConfig.builtinCapabilities",icon:lt,tools:[{name:"web_search",titleKey:"automations.automationConfig.toolWebSearch",descriptionKey:"automations.automationConfig.toolWebSearchDesc",icon:it},{name:"generate_image",titleKey:"automations.automationConfig.toolGenerateImage",descriptionKey:"automations.automationConfig.toolGenerateImageDesc",icon:bs},{name:"subtask",titleKey:"automations.automationConfig.toolSubtask",descriptionKey:"automations.automationConfig.toolSubtaskDesc",icon:Zt},{name:"user_ask",titleKey:"automations.automationConfig.toolAskUser",descriptionKey:"automations.automationConfig.toolAskUserDesc",icon:fs}]},{key:"files",headingKey:"automations.automationConfig.filesCode",icon:St,tools:[{name:"read",titleKey:"automations.automationConfig.toolReadFile",descriptionKey:"automations.automationConfig.toolReadFileDesc",icon:ps},{name:"write",titleKey:"automations.automationConfig.toolWriteFile",descriptionKey:"automations.automationConfig.toolWriteFileDesc",icon:zt},{name:"edit",titleKey:"automations.automationConfig.toolEditFile",descriptionKey:"automations.automationConfig.toolEditFileDesc",icon:xs},{name:"grep",titleKey:"automations.automationConfig.toolSearchContent",descriptionKey:"automations.automationConfig.toolSearchContentDesc",icon:vs},{name:"glob",titleKey:"automations.automationConfig.toolFindFiles",descriptionKey:"automations.automationConfig.toolFindFilesDesc",icon:St},{name:"bash",titleKey:"automations.automationConfig.toolRunCommand",descriptionKey:"automations.automationConfig.toolRunCommandDesc",icon:gs}]},{key:"context",headingKey:"automations.automationConfig.context",icon:kt,tools:[{name:"read_resource",titleKey:"automations.automationConfig.toolReadResource",descriptionKey:"automations.automationConfig.toolReadResourceDesc",icon:kt},{name:"read_prompt",titleKey:"automations.automationConfig.toolReadPrompt",descriptionKey:"automations.automationConfig.toolReadPromptDesc",icon:Tt},{name:"skill",titleKey:"automations.automationConfig.toolLoadSkill",descriptionKey:"automations.automationConfig.toolLoadSkillDesc",icon:Tt}]}],xo=Bt.flatMap(r=>r.tools.map(e=>e.name));function go(r){const e=r.replace(/[_-]+/g," ").trim();return e?e.toLowerCase().replace(/\b\w/g,s=>s.toUpperCase()):r}function ho(r){const e=q.c(12),{agentId:s,value:n,onChange:a}=r,i=ee();let c;e[0]!==i?(c=i("automations.automationConfig.toolsLabel"),e[0]=i,e[1]=c):c=e[1];let o;e[2]!==c?(o=t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:c}),e[2]=c,e[3]=o):o=e[3];let j;e[4]!==s||e[5]!==a||e[6]!==i||e[7]!==n?(j=s?t.jsx(w.Suspense,{fallback:t.jsxs(B,{variant:"outline",size:"sm",disabled:!0,className:"w-fit",children:[t.jsx(lt,{size:14}),i("automations.automationConfig.loadingTools")]}),children:t.jsx(jo,{agentId:s,value:n,onChange:a})}):t.jsx("span",{className:"text-xs text-muted-foreground italic",children:i("automations.automationConfig.pickAgentFirst")}),e[4]=s,e[5]=a,e[6]=i,e[7]=n,e[8]=j):j=e[8];let d;return e[9]!==o||e[10]!==j?(d=t.jsxs("div",{className:"flex flex-col gap-2",children:[o,j]}),e[9]=o,e[10]=j,e[11]=d):d=e[11],d}function It(r){const e=q.c(17),{value:s,checked:n,onToggle:a,title:i,description:c,leading:o}=r;let j;e[0]!==n?(j=t.jsx(Ft,{checked:n,className:"pointer-events-none mt-0.5"}),e[0]=n,e[1]=j):j=e[1];let d;e[2]!==o?(d=o&&t.jsx("span",{className:"mt-px shrink-0",children:o}),e[2]=o,e[3]=d):d=e[3];let m;e[4]!==i?(m=t.jsx("span",{className:"truncate text-sm leading-tight",children:i}),e[4]=i,e[5]=m):m=e[5];let x;e[6]!==c?(x=c&&t.jsx("span",{className:"line-clamp-2 text-xs leading-snug text-muted-foreground",children:c}),e[6]=c,e[7]=x):x=e[7];let f;e[8]!==m||e[9]!==x?(f=t.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[m,x]}),e[8]=m,e[9]=x,e[10]=f):f=e[10];let g;return e[11]!==a||e[12]!==j||e[13]!==d||e[14]!==f||e[15]!==s?(g=t.jsxs(Ns,{value:s,onSelect:a,className:"items-start gap-2.5 py-2",children:[j,d,f]}),e[11]=a,e[12]=j,e[13]=d,e[14]=f,e[15]=s,e[16]=g):g=e[16],g}function Pt(r){const e=q.c(27),{conn:s,label:n,icon:a,on:i,total:c,onToggle:o}=r,j=ee(),d=i===c;let m;e[0]!==a||e[1]!==s?(m=s?t.jsx(Ps,{icon:s.icon,name:s.title,size:"2xs"}):a?t.jsx(a,{size:14,className:"text-muted-foreground"}):t.jsx(ys,{size:14,className:"text-muted-foreground"}),e[0]=a,e[1]=s,e[2]=m):m=e[2];let x;e[3]!==s?.title||e[4]!==n||e[5]!==j?(x=s?.title??n??j("automations.automationConfig.otherTools"),e[3]=s?.title,e[4]=n,e[5]=j,e[6]=x):x=e[6];let f;e[7]!==x?(f=t.jsx("span",{className:"truncate",children:x}),e[7]=x,e[8]=f):f=e[8];let g;e[9]!==i||e[10]!==c?(g=t.jsxs("span",{className:"text-2xs font-normal tabular-nums text-muted-foreground/70",children:[i,"/",c]}),e[9]=i,e[10]=c,e[11]=g):g=e[11];let u;e[12]!==o?(u=v=>{v.stopPropagation(),o()},e[12]=o,e[13]=u):u=e[13];let h;e[14]!==d||e[15]!==j?(h=j(d?"automations.automationConfig.none":"automations.automationConfig.all"),e[14]=d,e[15]=j,e[16]=h):h=e[16];let p;e[17]!==u||e[18]!==h?(p=t.jsx("button",{type:"button",onClick:u,className:"text-2xs font-medium text-primary hover:underline",children:h}),e[17]=u,e[18]=h,e[19]=p):p=e[19];let l;e[20]!==g||e[21]!==p?(l=t.jsxs("span",{className:"ml-auto flex items-center gap-2",children:[g,p]}),e[20]=g,e[21]=p,e[22]=l):l=e[22];let y;return e[23]!==m||e[24]!==f||e[25]!==l?(y=t.jsxs("div",{className:"flex items-center gap-2",children:[m,f,l]}),e[23]=m,e[24]=f,e[25]=l,e[26]=y):y=e[26],y}function jo(r){const e=q.c(83),{agentId:s,value:n,onChange:a}=r,i=ee(),{org:c}=$t(),[o,j]=w.useState(!1);let d;e[0]!==s||e[1]!==c.id||e[2]!==c.slug?(d={connectionId:s,orgId:c.id,orgSlug:c.slug},e[0]=s,e[1]=c.id,e[2]=c.slug,e[3]=d):d=e[3];const m=_s(d);let x;e[4]!==m?(x={client:m},e[4]=m,e[5]=x):x=e[5];const{data:f,isLoading:g}=Is(x),u=dt();let h,p,l,y,v,N,S,b,T,D,_,k,P;if(e[6]!==u||e[7]!==f?.tools||e[8]!==g||e[9]!==a||e[10]!==o||e[11]!==i||e[12]!==n){const Q=new Map(u.map(No)),H=new Map;for(const I of f?.tools??[]){const z=ws(I._meta)??"__other__",Z=Ds(I.name,z==="__other__"?void 0:z),A=I.title,xe=A&&A!==I.name?A:go(Z);H.has(z)||H.set(z,{clientId:z,conn:Q.get(z),tools:[]}),H.get(z).tools.push({name:I.name,display:xe,description:I.description})}const W=[...H.values()].sort(Co),G=(f?.tools??[]).map(vo),J=[...xo,...G],V=n===null?new Set(J):new Set(n),U=J.every(I=>V.has(I)),O=I=>a(J.every(z=>I.has(z))?null:[...I]),ae=I=>{const z=new Set(V);z.has(I)?z.delete(I):z.add(I),O(z)},ne=(I,z)=>{const Z=new Set(V);for(const A of I)z?Z.add(A):Z.delete(A);O(Z)};y=Lt,P=o,v=j;let Y;e[26]===Symbol.for("react.memo_cache_sentinel")?(Y=t.jsx(lt,{size:14,className:"text-muted-foreground"}),e[26]=Y):Y=e[26];let ie;e[27]!==U||e[28]!==i?(ie=i(U?"automations.automationConfig.allTools":"automations.automationConfig.tools"),e[27]=U,e[28]=i,e[29]=ie):ie=e[29];const ue=!U&&t.jsxs(Kt,{variant:"secondary",className:"ml-0.5 tabular-nums",children:[V.size,"/",J.length]});let me;e[30]===Symbol.for("react.memo_cache_sentinel")?(me=t.jsx(rt,{size:14,className:"text-muted-foreground"}),e[30]=me):me=e[30],e[31]!==ie||e[32]!==ue?(N=t.jsx(Mt,{asChild:!0,children:t.jsxs(B,{variant:"outline",size:"sm",className:"w-fit gap-1.5",children:[Y,ie,ue,me]})}),e[31]=ie,e[32]=ue,e[33]=N):N=e[33],l=Rt,_="p-0 w-80",k="start",p=Ss;let te;e[34]!==i?(te=i("automations.automationConfig.searchToolsPlaceholder"),e[34]=i,e[35]=te):te=e[35],e[36]!==te?(T=t.jsx(ks,{placeholder:te}),e[36]=te,e[37]=T):T=e[37];const fe=U?i("automations.automationConfig.allToolsEnabled",{count:J.length}):i("automations.automationConfig.toolsEnabledCount",{enabled:V.size,total:J.length});let se;e[38]!==fe?(se=t.jsx("span",{className:"text-xs text-muted-foreground",children:fe}),e[38]=fe,e[39]=se):se=e[39];let re;e[40]!==a?(re=()=>a(null),e[40]=a,e[41]=re):re=e[41];let le;e[42]!==i?(le=i("automations.automationConfig.selectAll"),e[42]=i,e[43]=le):le=e[43];let C;e[44]!==U||e[45]!==re||e[46]!==le?(C=t.jsx("button",{type:"button",onClick:re,disabled:U,className:"text-xs font-medium text-primary hover:underline disabled:cursor-default disabled:opacity-40 disabled:no-underline",children:le}),e[44]=U,e[45]=re,e[46]=le,e[47]=C):C=e[47];let M;e[48]===Symbol.for("react.memo_cache_sentinel")?(M=t.jsx("span",{className:"text-muted-foreground/30",children:"·"}),e[48]=M):M=e[48];let E;e[49]!==a?(E=()=>a([]),e[49]=a,e[50]=E):E=e[50];const pe=V.size===0;let oe;e[51]!==i?(oe=i("automations.automationConfig.clear"),e[51]=i,e[52]=oe):oe=e[52];let ce;e[53]!==E||e[54]!==pe||e[55]!==oe?(ce=t.jsx("button",{type:"button",onClick:E,disabled:pe,className:"text-xs font-medium text-muted-foreground hover:underline disabled:cursor-default disabled:opacity-40 disabled:no-underline",children:oe}),e[53]=E,e[54]=pe,e[55]=oe,e[56]=ce):ce=e[56];let de;e[57]!==C||e[58]!==ce?(de=t.jsxs("div",{className:"flex items-center gap-2",children:[C,M,ce]}),e[57]=C,e[58]=ce,e[59]=de):de=e[59],e[60]!==se||e[61]!==de?(D=t.jsxs("div",{className:"flex items-center justify-between border-b px-3 py-2",children:[se,de]}),e[60]=se,e[61]=de,e[62]=D):D=e[62],h=Ts,S="max-h-80",b=g?t.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:i("automations.automationConfig.loadingTools")}):t.jsxs(t.Fragment,{children:[t.jsx(Cs,{children:i("automations.automationConfig.noToolsFound")}),Bt.map(I=>{const z=I.tools.map(bo),Z=z.filter(A=>V.has(A)).length;return t.jsx(wt,{heading:t.jsx(Pt,{label:i(I.headingKey),icon:I.icon,on:Z,total:z.length,onToggle:()=>ne(z,Z!==z.length)}),children:I.tools.map(A=>t.jsx(It,{value:`${i(A.titleKey)} ${A.name}`,checked:V.has(A.name),onToggle:()=>ae(A.name),title:i(A.titleKey),description:i(A.descriptionKey),leading:t.jsx(A.icon,{size:16,className:"text-muted-foreground"})},A.name))},I.key)}),W.map(I=>{const z=I.tools.map(yo),Z=z.filter(A=>V.has(A)).length;return t.jsx(wt,{heading:t.jsx(Pt,{conn:I.conn,on:Z,total:z.length,onToggle:()=>ne(z,Z!==z.length)}),children:I.tools.map(A=>t.jsx(It,{value:`${A.display} ${A.name} ${I.conn?.title??""}`,checked:V.has(A.name),onToggle:()=>ae(A.name),title:A.display,description:A.description},A.name))},I.clientId)})]}),e[6]=u,e[7]=f?.tools,e[8]=g,e[9]=a,e[10]=o,e[11]=i,e[12]=n,e[13]=h,e[14]=p,e[15]=l,e[16]=y,e[17]=v,e[18]=N,e[19]=S,e[20]=b,e[21]=T,e[22]=D,e[23]=_,e[24]=k,e[25]=P}else h=e[13],p=e[14],l=e[15],y=e[16],v=e[17],N=e[18],S=e[19],b=e[20],T=e[21],D=e[22],_=e[23],k=e[24],P=e[25];let $;e[63]!==h||e[64]!==S||e[65]!==b?($=t.jsx(h,{className:S,children:b}),e[63]=h,e[64]=S,e[65]=b,e[66]=$):$=e[66];let R;e[67]!==p||e[68]!==$||e[69]!==T||e[70]!==D?(R=t.jsxs(p,{children:[T,D,$]}),e[67]=p,e[68]=$,e[69]=T,e[70]=D,e[71]=R):R=e[71];let K;e[72]!==l||e[73]!==R||e[74]!==_||e[75]!==k?(K=t.jsx(l,{className:_,align:k,children:R}),e[72]=l,e[73]=R,e[74]=_,e[75]=k,e[76]=K):K=e[76];let F;return e[77]!==y||e[78]!==v||e[79]!==N||e[80]!==K||e[81]!==P?(F=t.jsxs(y,{open:P,onOpenChange:v,children:[N,K]}),e[77]=y,e[78]=v,e[79]=N,e[80]=K,e[81]=P,e[82]=F):F=e[82],F}function yo(r){return r.name}function bo(r){return r.name}function vo(r){return r.name}function Co(r,e){return(r.conn?.title??r.clientId).localeCompare(e.conn?.title??e.clientId)}function No(r){return[r.id,r]}function Re(r){const e=r.trim().split(/\s+/);return e.length!==5?!1:e.every(s=>/^[\d*/,-]+$/.test(s))}function So(r){if(!r)return"Unknown schedule";const e=r.trim();if(e==="* * * * *")return"Every minute";if(e==="0 * * * *")return"Every hour";if(e==="0 0 * * *")return"Every day";if(e==="0 0 * * 1")return"Every week";const s=e.match(/^\*\/(\d+)\s+\*\s+\*\s+\*\s+\*$/);if(s)return`Every ${s[1]} minutes`;const n=e.match(/^0\s+\*\/(\d+)\s+\*\s+\*\s+\*$/);if(n)return`Every ${n[1]} hours`;const a=e.match(/^0\s+0\s+\*\/(\d+)\s+\*\s+\*$/);if(a){const o=parseInt(a[1]??"1");return o%7===0?`Every ${o/7} weeks`:`Every ${o} days`}const i=e.match(/^(\d+)\s+(\d+)\s+\*\s+\*\s+\*$/);if(i){const o=(i[2]??"0").padStart(2,"0"),j=(i[1]??"0").padStart(2,"0");return`Every day at ${o}:${j} UTC`}const c=e.match(/^(\d+)\s+(\d+)\s+\*\s+\*\s+(\d)$/);if(c){const j=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][parseInt(c[3]??"0")]??"day",d=(c[2]??"0").padStart(2,"0"),m=(c[1]??"0").padStart(2,"0");return`Every ${j} at ${d}:${m} UTC`}return r}function ko(r,e){const s=Math.max(1,r);switch(e){case"minutes":return s===1?"* * * * *":`*/${s} * * * *`;case"hours":return s===1?"0 * * * *":`0 */${s} * * *`;case"days":return s===1?"0 0 * * *":`0 0 */${s} * *`;case"weeks":return s===1?"0 0 * * 1":`0 0 */${s*7} * *`}}function To(r){const e=r.trim();if(e==="* * * * *")return{count:1,unit:"minutes"};if(e==="0 * * * *")return{count:1,unit:"hours"};if(e==="0 0 * * *")return{count:1,unit:"days"};if(e==="0 0 * * 1")return{count:1,unit:"weeks"};const s=e.match(/^\*\/(\d+)\s+\*\s+\*\s+\*\s+\*$/);if(s)return{count:parseInt(s[1]),unit:"minutes"};const n=e.match(/^0\s+\*\/(\d+)\s+\*\s+\*\s+\*$/);if(n)return{count:parseInt(n[1]),unit:"hours"};const a=e.match(/^0\s+0\s+\*\/(\d+)\s+\*\s+\*$/);return a?{count:parseInt(a[1]),unit:"days"}:null}function wo(r,e){return e===1?{minutes:"minute",hours:"hour",days:"day",weeks:"week"}[r]??r:r}const Do=[{label:"5 minutes",cron:"*/5 * * * *"},{label:"Hour",cron:"0 * * * *"},{label:"Day",cron:"0 0 * * *"},{label:"Week",cron:"0 0 * * 1"}],qe=oo.filter(r=>!so.includes(r)),Gt=["any","earlier","later","statuses"],_o=r=>qe.some(e=>e===r),Io=r=>Gt.some(e=>e===r);function Po({automationId:r,open:e,onOpenChange:s}){const n=ee(),{triggerAdd:a}=ve(),[i,c]=w.useState("in_progress"),[o,j]=w.useState("any"),[d,m]=w.useState([]),x=qe.filter(l=>l!==i),f=d.filter(l=>l!==i),g=o!=="statuses"||f.length>0,u=l=>{l||(c("in_progress"),j("any"),m([])),s(l)},h=async()=>{try{await a.mutateAsync({automation_id:r,type:"board_column_transition",column_key:i,from:o==="statuses"?{kind:o,statuses:f}:{kind:o}}),X.success(n("automations.addStarterPopover.starterAdded")),u(!1)}catch(l){X.error(l instanceof Error?l.message:n("automations.addStarterPopover.failedAddStarter"))}},p=l=>n(l==="any"?"automations.columnTransitionDialog.fromAny":l==="earlier"?"automations.columnTransitionDialog.fromEarlier":l==="later"?"automations.columnTransitionDialog.fromLater":"automations.columnTransitionDialog.fromColumns");return t.jsx(et,{open:e,onOpenChange:u,children:t.jsxs(tt,{className:"max-w-md",children:[t.jsxs(st,{children:[t.jsx(ot,{children:n("automations.columnTransitionDialog.title")}),t.jsx(at,{children:n("automations.columnTransitionDialog.description")})]}),t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:n("automations.columnTransitionDialog.column")}),t.jsxs(ge,{value:i,onValueChange:l=>{_o(l)&&c(l)},children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{})}),t.jsx(ye,{children:qe.map(l=>{const{label:y,visual:v}=We(l,n),N=v.icon;return t.jsxs(be,{value:l,children:[t.jsx(N,{size:14,className:At("shrink-0",v.iconClassName)}),y]},l)})})]})]}),t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:n("automations.columnTransitionDialog.origin")}),t.jsxs(ge,{value:o,onValueChange:l=>{Io(l)&&j(l)},children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{})}),t.jsx(ye,{children:Gt.map(l=>t.jsx(be,{value:l,children:p(l)},l))})]}),o==="statuses"&&t.jsx(Wt,{options:x.map(l=>({label:We(l,n).label,value:l})),defaultValue:f,onValueChange:m,placeholder:n("automations.columnTransitionDialog.columnsPlaceholder"),modalPopover:!0,className:"max-w-none"},i)]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:n("automations.columnTransitionDialog.help")})]}),t.jsxs(nt,{children:[t.jsx(B,{variant:"ghost",onClick:()=>u(!1),children:n("automations.columnTransitionDialog.cancel")}),t.jsx(B,{disabled:!g||a.isPending,onClick:h,children:n("automations.columnTransitionDialog.add")})]})]})})}const Ht=["any","earlier","later","statuses"],Ao=r=>Ht.some(e=>e===r);function $o({automationId:r,boardId:e,open:s,onOpenChange:n}){const a=ee(),{triggerAdd:i}=ve(),c=qs(s?e:null),[o,j]=w.useState(null),[d,m]=w.useState("any"),[x,f]=w.useState([]),g=(c.data??[]).flatMap(b=>b.statuses.map(T=>({column:b.name,status:T}))),u=o??g[0]?.status??null,h=g.map(b=>b.status).filter(b=>b!==u),p=x.filter(b=>b!==u),l=u!==null&&(d!=="statuses"||p.length>0),y=b=>{b||(j(null),m("any"),f([])),n(b)},v=async()=>{if(u)try{await i.mutateAsync({automation_id:r,type:"jira_transition",jira_status:u,from:d==="statuses"?{kind:d,statuses:p}:{kind:d}}),X.success(a("automations.addStarterPopover.starterAdded")),y(!1)}catch(b){X.error(b instanceof Error?b.message:a("automations.addStarterPopover.failedAddStarter"))}},N=b=>a(b==="any"?"automations.jiraTransitionDialog.fromAny":b==="earlier"?"automations.jiraTransitionDialog.fromEarlier":b==="later"?"automations.jiraTransitionDialog.fromLater":"automations.jiraTransitionDialog.fromStatuses");let S;return c.isPending?S=t.jsx(es,{className:"h-9 w-full"}):c.isError||g.length===0?S=t.jsx("p",{className:"text-xs text-muted-foreground",children:a("automations.jiraTransitionDialog.noStatuses")}):S=t.jsxs(ge,{value:u??void 0,onValueChange:j,children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{})}),t.jsx(ye,{children:g.map(b=>t.jsxs(be,{value:b.status,children:[b.status,b.column!==b.status&&t.jsx("span",{className:"text-muted-foreground",children:b.column})]},b.status))})]}),t.jsx(et,{open:s,onOpenChange:y,children:t.jsxs(tt,{className:"max-w-md",children:[t.jsxs(st,{children:[t.jsx(ot,{children:a("automations.jiraTransitionDialog.title")}),t.jsx(at,{children:a("automations.jiraTransitionDialog.description")})]}),t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:a("automations.jiraTransitionDialog.status")}),S]}),t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:a("automations.jiraTransitionDialog.origin")}),t.jsxs(ge,{value:d,onValueChange:b=>{Ao(b)&&m(b)},children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{})}),t.jsx(ye,{children:Ht.map(b=>t.jsx(be,{value:b,children:N(b)},b))})]}),d==="statuses"&&t.jsx(Wt,{options:h.map(b=>({label:b,value:b})),defaultValue:p,onValueChange:f,placeholder:a("automations.jiraTransitionDialog.statusesPlaceholder"),modalPopover:!0,className:"max-w-none"},u)]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:a("automations.jiraTransitionDialog.help")})]}),t.jsxs(nt,{children:[t.jsx(B,{variant:"ghost",onClick:()=>y(!1),children:a("automations.jiraTransitionDialog.cancel")}),t.jsx(B,{disabled:!l||i.isPending,onClick:v,children:a("automations.jiraTransitionDialog.add")})]})]})})}function Oo({automationId:r,open:e,onOpenChange:s,onCustomSelect:n,onEventSelect:a,onWebhookCreated:i}){const c=ee(),{triggerAdd:o}=ve(),[j,d]=w.useState(!1),[m,x]=w.useState(!1),[f,g]=w.useState(!1),u=eo().data?.boardId??null,h=e??j,p=v=>{s?s(v):d(v)},l=async v=>{try{await o.mutateAsync({automation_id:r,type:"cron",cron_expression:v}),X.success(c("automations.addStarterPopover.starterAdded")),p(!1)}catch(N){const S=N instanceof Error?N.message:c("automations.addStarterPopover.failedAddStarter");X.error(S)}},y=async()=>{try{const v=await o.mutateAsync({automation_id:r,type:"webhook"});p(!1),v.webhook?i?.(v.webhook):X.success(c("automations.addStarterPopover.webhookStarterAdded"))}catch(v){const N=v instanceof Error?v.message:c("automations.addStarterPopover.failedAddWebhookStarter");X.error(N)}};return t.jsxs(t.Fragment,{children:[t.jsxs(ts,{open:h,onOpenChange:p,children:[t.jsx(ss,{asChild:!0,children:t.jsxs(B,{variant:"outline",size:"sm",children:[t.jsx(to,{size:14}),c("automations.addStarterPopover.addStarter")]})}),t.jsxs(os,{align:"end",className:"w-[240px]",children:[t.jsxs(as,{children:[t.jsxs(ns,{className:"gap-2.5",children:[t.jsx(Me,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.every")]}),t.jsx(is,{className:"w-[160px]",children:Do.map(v=>t.jsxs(Ee,{className:"gap-2.5",onSelect:()=>l(v.cron),disabled:o.isPending,children:[t.jsx(Me,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.everyUnit",{unit:v.label})]},v.cron))})]}),t.jsxs(Ee,{className:"gap-2.5",onSelect:()=>{p(!1),n?.()},children:[t.jsx(Me,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.customCron")]}),t.jsxs(Ee,{className:"gap-2.5",onSelect:()=>{p(!1),a?.()},children:[t.jsx(ut,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.event")]}),t.jsxs(Ee,{className:"gap-2.5",onSelect:()=>{p(!1),x(!0)},children:[t.jsx(Ot,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.cardEntersColumn")]}),u&&t.jsxs(Ee,{className:"gap-2.5",onSelect:()=>{p(!1),g(!0)},children:[t.jsx(Ut,{size:14,className:"shrink-0"}),c("automations.addStarterPopover.jiraIssueEntersStatus")]}),t.jsxs(Ee,{className:"gap-2.5",onSelect:()=>{y()},disabled:o.isPending,children:[t.jsx(it,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.webhook")]})]})]}),t.jsx(Po,{automationId:r,open:m,onOpenChange:x}),u&&t.jsx($o,{automationId:r,boardId:u,open:f,onOpenChange:g})]})}function Jt(r){const e=q.c(39),{open:s,onOpenChange:n,url:a,token:i,title:c,description:o}=r,j=c===void 0?"Webhook ready":c,d=o===void 0?"Send a POST to this URL with the bearer token to fire the automation. The token is shown once — copy it now.":o,m=ee(),[x,f]=w.useState(null),[g,u]=w.useState("curl"),[h,p]=w.useState("header"),l=w.useId();let y;e[0]!==m?(y=async(W,G)=>{try{await navigator.clipboard.writeText(W),f(G),X.success(m("automations.webhookSecretDialog.copied")),setTimeout(()=>f(null),1500)}catch{X.error(m("automations.webhookSecretDialog.failedCopy"))}},e[0]=m,e[1]=y):y=e[1];const v=y;let N;e[2]!==h||e[3]!==i||e[4]!==a?(N=a&&i&&h==="url"?`${a.replace(/\/$/,"")}/${i}`:a??"",e[2]=h,e[3]=i,e[4]=a,e[5]=N):N=e[5];const S=N,b=a&&i?h==="header"?`curl -X POST "${S}" \\
1
+ import{aD as Zt,c as q,b as ee,r as w,j as t,B,ai as qt,l as At,a4 as $t,D as et,v as tt,w as st,x as ot,aY as at,y as nt,t as X,bB as es,Z as ts,V as ss,Y as os,aw as as,au as ns,av as is,X as Ee,b8 as rs,h as Le,aM as pt,aN as xt,aO as gt,aP as ht,bm as jt,aQ as yt,aR as bt,aS as vt,C as Ke,aJ as ls,c6 as Ct,I as Nt,c7 as cs,ao as ds,b2 as Ze,n as Xe,f as ms}from"./index-DQge_BLv.js";import{C as us}from"./index-D3KLhYWS.js";import{b as it,Q as fs,a as ps,a5 as xs,k as St,av as gs,W as kt,aw as hs,f as js,V as Me,ax as Ot}from"./agent-icon-DO8s6ea2.js";import{n as Tt}from"./ShoppingBag01-DB7ytToi.js";import{t as rt}from"./ChevronUp-DYWuPRic.js";import{e as ys}from"./UserSquare-BhJx3glH.js";import{d as lt,b as zt,t as Et}from"./Tool01-BdswuHJy.js";import{a as bs}from"./Image01-DoQzA6mU.js";import{i as vs}from"./SearchMd-DSPN9QxV.js";import{B as Kt}from"./badge-B1tWhSy_.js";import{C as Ft}from"./checkbox-yhLjvc2y.js";import{S as ct}from"./switch-yYhcctGB.js";import{a as Mt,b as Rt,P as Lt}from"./popover-B6YbIo3T.js";import{C as Cs,a as wt,b as Ns,d as Ss,e as ks,c as Ts}from"./command-D_wtag_V.js";import{g as ws,s as Ds}from"./tool-namespace-CrCuqBA7.js";import{u as dt}from"./use-connection-DjcoL2xp.js";import{u as _s}from"./use-mcp-client-DVzTP9Z-.js";import{u as Is}from"./use-mcp-tools-D-mu7r_B.js";import{I as Ps}from"./integration-icon-C5QUXJ-_.js";import{M as As}from"./select-model-CAsc6jpO.js";import{u as $s}from"./use-ai-providers-C9yoEjqD.js";import{U as Os,b as zs}from"./build-improve-prompt-doc-CwbtrjfW.js";import{a as ve,c as Es,d as Ks}from"./use-automations-3u659Mzy.js";import{c as Fs,b as Ms,h as Rs,t as Ls}from"./chat-context-DJQNHpnm.js";import{b as Vs,C as Us,a as Ws}from"./collapsible-Dp7IveTF.js";import{c as Bs,T as Gs,a as Hs}from"./tooltip--hQ071uj.js";import{a as Js}from"./shell-layout-CTdQsY_z.js";import{i as Vt}from"./ArrowLeft-Lry57YLT.js";import{i as Xs}from"./ArrowUp-DzUcbY_U.js";import{s as Qs}from"./Trash01-B0glQHgK.js";import{s as mt}from"./XClose-wH9pi_Oq.js";import{u as Dt}from"./use-debounced-autosave-DtGVwjBB.js";import{T as Ys,a as Zs}from"./input-xMjBQS9S.js";import{u as qs,a as eo,J as Ut}from"./jira-icon-BJbq7OPn.js";import{s as to}from"./Plus-AFrvUoUc.js";import{i as ut}from"./ZoomOut-DIZKZikC.js";import{l as We,H as so}from"./config-CQQ9U3og.js";import{C as oo}from"./task-board-DCXqqZ12.js";import{M as Wt}from"./multi-select-D_bxEawf.js";import{S as ge,b as he,a as je,d as ye,c as be}from"./select-CrEvL5z9.js";import{c as ao,a as no,T as _t}from"./tabs-CkNdZlhM.js";import{a as Qe}from"./Copy01-E_QbCxA-.js";import{MonacoCodeEditor as io}from"./monaco-editor-DhfBMl22.js";import{A as ro}from"./automation-runs-CJ5PzJ6P.js";import{C as lo}from"./collection-tabs-CymIaett.js";import{a as co}from"./use-panel-navigate-DJWYue4p.js";import"./use-mobile-C_KOoyX9.js";import"./use-sidebar-collapsed-DM0SNXB-.js";import"./use-chat-layout-state-DtHD302s.js";import"./thread-route-BhHeUYXo.js";import"./thread-intent-BXZYb_rR.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-CDjDlASu.js";import"./slugify-CEUa2lfQ.js";import"./toolbar-icon-button-B0tBxUCb.js";import"./sheet-Dwf0d2yk.js";import"./resizable-STcRbiPL.js";import"./use-project-scope-DmeYK8Bq.js";import"./repository-binding-BSdKE2Qo.js";import"./AlertCircle-DaqrzQLf.js";import"./LinkBroken01-BFQs5QxW.js";import"./Building02-Czpjl0U5.js";import"./CheckCircle-BNPESArO.js";import"./ChevronSelectorVertical-DZn3JZt3.js";import"./CreditCard01-i2HOt1aB.js";import"./DotsVertical-CbdEruUk.js";import"./Globe04-QDIAkI_1.js";import"./SwitchHorizontal01-DoMMYhWx.js";import"./Key01-yX9At---.js";import"./Link01-DdjCKN6E.js";import"./Minus-BvbXf1Sp.js";import"./Monitor01-CGq_FB6g.js";import"./Sun-DoDvwdQj.js";import"./Play-ChXZcgWf.js";import"./Upload01-BY0gIDxJ.js";import"./Users01-CfcMu04c.js";import"./index-CWrjSpv6.js";import"./auth-Bh5UNoqX.js";import"./drawer-CEKMK2Xy.js";import"./index-TO8lHy3e.js";import"./ai-providers-logos-DD3qZ33J.js";import"./use-entitlements-DfzzXZIV.js";import"./autosend-BE8sRUrR.js";import"./location-V0VwTJTt.js";import"./use-decopilot-events-DQJQGAJY.js";import"./use-organization-settings-BgGp5lk4.js";import"./schema-CiJGpkKp.js";import"./index-Br9i6zHp.js";import"./use-deployment-admin-D9U88a6V.js";import"./admin-fetch-BhTJlAsX.js";import"./use-clock-tick-DsgVgaMj.js";import"./project-icon-B0SToVzq.js";import"./new-project-dialog-D-A0zxil.js";import"./label-nAynIzRB.js";import"./repository-import-picker-DL_KXsuZ.js";import"./use-navigate-to-agent-CakeCNXj.js";import"./repository-picker-DR1imeoJ.js";import"./github-icon-CwEeHUg2.js";import"./useInfiniteQuery-DW7gjDqh.js";import"./infiniteQueryObserver-CJSP-r-Q.js";import"./collection-search-DKNF_aHL.js";import"./use-debounced-value-BC9-VsXG.js";import"./required-auth-layout-BfYIPzIZ.js";import"./use-org-sso-AxQjuMiC.js";import"./suggestion-uJQK-wZ9.js";import"./usage-stats-Bfpi0erw.js";import"./form-CqcvGBPS.js";import"./utils-CVEq3hMx.js";import"./markdown-SDFpVgvK.js";import"./use-copy-BmESZuBQ.js";import"./use-mcp-prompts-B9D-ZvCI.js";import"./use-org-fs-CGLMPARk.js";import"./core.esm-CeU7AJNb.js";import"./index-BdQq_4o_.js";import"./active-indicator-CCMhAsc_.js";import"./editor-119-kR49.js";import"./table-CiyeDv2d.js";import"./empty-state-DcLpc4zT.js";import"./use-infinite-scroll-CrNt3X1z.js";import"./task-status-CQ3ao3yh.js";import"./thread-sheet-body-C9NrvW34.js";import"./useSuspenseInfiniteQuery-CKl2j5ZP.js";import"./pair-DtO9iW-3.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-taIEo_0M.js";import"./types-vHdCIVHy.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./use-thread-outputs-CUfkYNKn.js";import"./file-type-icon-lZJfDHey.js";const Ye={fast:{labelKey:"automations.automationConfig.tierFast",subtitleKey:"automations.automationConfig.tierFastSubtitle",icon:js},smart:{labelKey:"automations.automationConfig.tierSmart",subtitleKey:"automations.automationConfig.tierSmartSubtitle",icon:Et},thinking:{labelKey:"automations.automationConfig.tierThinking",subtitleKey:"automations.automationConfig.tierThinkingSubtitle",icon:hs}},mo=["fast","smart","thinking"];function uo(r){const e=q.c(19),{tier:s,onSelect:n}=r,a=ee(),[i,c]=w.useState(!1),o=Ye[s].icon;let j;e[0]!==o?(j=t.jsx(o,{size:14,className:"text-muted-foreground"}),e[0]=o,e[1]=j):j=e[1];const d=Ye[s];let m;e[2]!==a||e[3]!==d.labelKey?(m=a(d.labelKey),e[2]=a,e[3]=d.labelKey,e[4]=m):m=e[4];let x;e[5]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(rt,{size:14,className:"text-muted-foreground"}),e[5]=x):x=e[5];let f;e[6]!==j||e[7]!==m?(f=t.jsx(Mt,{asChild:!0,children:t.jsxs(B,{variant:"outline",size:"sm",className:"w-fit gap-1.5",children:[j,m,x]})}),e[6]=j,e[7]=m,e[8]=f):f=e[8];let g;e[9]!==n||e[10]!==a||e[11]!==s?(g=mo.map(p=>{const l=Ye[p],y=l.icon;return t.jsxs("button",{type:"button",onClick:()=>{n(p),c(!1)},className:At("flex items-start gap-2 px-2 py-1.5 rounded-lg text-left hover:bg-accent"),children:[t.jsx(y,{size:16,className:"shrink-0 text-muted-foreground mt-0.5"}),t.jsxs("div",{className:"flex-1",children:[t.jsx("div",{className:"text-sm",children:a(l.labelKey)}),t.jsx("div",{className:"text-xs text-muted-foreground",children:a(l.subtitleKey)})]}),p===s&&t.jsx(qt,{size:14,className:"text-foreground mt-0.5"})]},p)}),e[9]=n,e[10]=a,e[11]=s,e[12]=g):g=e[12];let u;e[13]!==g?(u=t.jsx(Rt,{align:"start",className:"p-1 w-64",children:t.jsx("div",{className:"flex flex-col",children:g})}),e[13]=g,e[14]=u):u=e[14];let h;return e[15]!==i||e[16]!==f||e[17]!==u?(h=t.jsxs(Lt,{open:i,onOpenChange:c,children:[f,u]}),e[15]=i,e[16]=f,e[17]=u,e[18]=h):h=e[18],h}function fo(r){const e=q.c(27),{tier:s,onTierChange:n,override:a,onOverrideChange:i}=r,c=ee(),[o,j]=w.useState(a!==null);let d;e[0]!==c?(d=c("automations.automationConfig.modelLabel"),e[0]=c,e[1]=d):d=e[1];let m;e[2]!==d?(m=t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:d}),e[2]=d,e[3]=m):m=e[3];let x;e[4]!==i||e[5]!==n||e[6]!==a||e[7]!==c||e[8]!==s||e[9]!==o?(x=o?t.jsx(w.Suspense,{fallback:t.jsx(B,{variant:"outline",size:"sm",disabled:!0,className:"w-fit",children:c("automations.automationConfig.loadingModels")}),children:t.jsx(po,{override:a,onOverrideChange:i})}):t.jsx(uo,{tier:s,onSelect:n}),e[4]=i,e[5]=n,e[6]=a,e[7]=c,e[8]=s,e[9]=o,e[10]=x):x=e[10];let f;e[11]!==i?(f=y=>{j(y),y||i(null)},e[11]=i,e[12]=f):f=e[12];let g;e[13]!==f||e[14]!==o?(g=t.jsx(ct,{checked:o,onCheckedChange:f,className:"cursor-pointer"}),e[13]=f,e[14]=o,e[15]=g):g=e[15];let u;e[16]!==c?(u=c("automations.automationConfig.specificModel"),e[16]=c,e[17]=u):u=e[17];let h;e[18]!==g||e[19]!==u?(h=t.jsxs("label",{className:"flex items-center gap-2 text-xs text-muted-foreground cursor-pointer select-none",children:[g,u]}),e[18]=g,e[19]=u,e[20]=h):h=e[20];let p;e[21]!==x||e[22]!==h?(p=t.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[x,h]}),e[21]=x,e[22]=h,e[23]=p):p=e[23];let l;return e[24]!==m||e[25]!==p?(l=t.jsxs("div",{className:"flex flex-col gap-2",children:[m,p]}),e[24]=m,e[25]=p,e[26]=l):l=e[26],l}function po(r){const e=q.c(25),{override:s,onOverrideChange:n}=r,a=ee(),i=$s(),c=i[0]?.id??null;let o;e[0]!==c||e[1]!==i||e[2]!==s?.credentialId?(o=i.some(l=>l.id===s?.credentialId)?s?.credentialId??null:c,e[0]=c,e[1]=i,e[2]=s?.credentialId,e[3]=o):o=e[3];const[j,d]=w.useState(o);let m;e[4]!==j||e[5]!==c||e[6]!==i?(m=i.some(l=>l.id===j)?j:c,e[4]=j,e[5]=c,e[6]=i,e[7]=m):m=e[7];const x=m;let f;e[8]!==i||e[9]!==s?(f=s&&i.some(l=>l.id===s.credentialId)?{modelId:s.modelId,title:s.title||s.modelId,keyId:s.credentialId,providerId:"deco",description:null,logo:null,capabilities:[],limits:null,costs:null}:null,e[8]=i,e[9]=s,e[10]=f):f=e[10];const g=f;if(i.length===0){let l;e[11]!==a?(l=a("automations.automationConfig.connectAiProviderHint"),e[11]=a,e[12]=l):l=e[12];let y;return e[13]!==l?(y=t.jsx("span",{className:"text-xs text-muted-foreground italic",children:l}),e[13]=l,e[14]=y):y=e[14],y}let u;e[15]!==a?(u=a("automations.automationConfig.pickModelPlaceholder"),e[15]=a,e[16]=u):u=e[16];let h;e[17]!==x||e[18]!==n?(h=l=>{const y=l.keyId??x??"";d(y),n({modelId:l.modelId,credentialId:y,title:l.title??l.modelId})},e[17]=x,e[18]=n,e[19]=h):h=e[19];let p;return e[20]!==x||e[21]!==g||e[22]!==u||e[23]!==h?(p=t.jsx("div",{className:"w-fit max-w-full",children:t.jsx(As,{variant:"bordered",placeholder:u,model:g,credentialId:x,onCredentialChange:d,onModelChange:h})}),e[20]=x,e[21]=g,e[22]=u,e[23]=h,e[24]=p):p=e[24],p}const Bt=[{key:"capabilities",headingKey:"automations.automationConfig.builtinCapabilities",icon:lt,tools:[{name:"web_search",titleKey:"automations.automationConfig.toolWebSearch",descriptionKey:"automations.automationConfig.toolWebSearchDesc",icon:it},{name:"generate_image",titleKey:"automations.automationConfig.toolGenerateImage",descriptionKey:"automations.automationConfig.toolGenerateImageDesc",icon:bs},{name:"subtask",titleKey:"automations.automationConfig.toolSubtask",descriptionKey:"automations.automationConfig.toolSubtaskDesc",icon:Zt},{name:"user_ask",titleKey:"automations.automationConfig.toolAskUser",descriptionKey:"automations.automationConfig.toolAskUserDesc",icon:fs}]},{key:"files",headingKey:"automations.automationConfig.filesCode",icon:St,tools:[{name:"read",titleKey:"automations.automationConfig.toolReadFile",descriptionKey:"automations.automationConfig.toolReadFileDesc",icon:ps},{name:"write",titleKey:"automations.automationConfig.toolWriteFile",descriptionKey:"automations.automationConfig.toolWriteFileDesc",icon:zt},{name:"edit",titleKey:"automations.automationConfig.toolEditFile",descriptionKey:"automations.automationConfig.toolEditFileDesc",icon:xs},{name:"grep",titleKey:"automations.automationConfig.toolSearchContent",descriptionKey:"automations.automationConfig.toolSearchContentDesc",icon:vs},{name:"glob",titleKey:"automations.automationConfig.toolFindFiles",descriptionKey:"automations.automationConfig.toolFindFilesDesc",icon:St},{name:"bash",titleKey:"automations.automationConfig.toolRunCommand",descriptionKey:"automations.automationConfig.toolRunCommandDesc",icon:gs}]},{key:"context",headingKey:"automations.automationConfig.context",icon:kt,tools:[{name:"read_resource",titleKey:"automations.automationConfig.toolReadResource",descriptionKey:"automations.automationConfig.toolReadResourceDesc",icon:kt},{name:"read_prompt",titleKey:"automations.automationConfig.toolReadPrompt",descriptionKey:"automations.automationConfig.toolReadPromptDesc",icon:Tt},{name:"skill",titleKey:"automations.automationConfig.toolLoadSkill",descriptionKey:"automations.automationConfig.toolLoadSkillDesc",icon:Tt}]}],xo=Bt.flatMap(r=>r.tools.map(e=>e.name));function go(r){const e=r.replace(/[_-]+/g," ").trim();return e?e.toLowerCase().replace(/\b\w/g,s=>s.toUpperCase()):r}function ho(r){const e=q.c(12),{agentId:s,value:n,onChange:a}=r,i=ee();let c;e[0]!==i?(c=i("automations.automationConfig.toolsLabel"),e[0]=i,e[1]=c):c=e[1];let o;e[2]!==c?(o=t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:c}),e[2]=c,e[3]=o):o=e[3];let j;e[4]!==s||e[5]!==a||e[6]!==i||e[7]!==n?(j=s?t.jsx(w.Suspense,{fallback:t.jsxs(B,{variant:"outline",size:"sm",disabled:!0,className:"w-fit",children:[t.jsx(lt,{size:14}),i("automations.automationConfig.loadingTools")]}),children:t.jsx(jo,{agentId:s,value:n,onChange:a})}):t.jsx("span",{className:"text-xs text-muted-foreground italic",children:i("automations.automationConfig.pickAgentFirst")}),e[4]=s,e[5]=a,e[6]=i,e[7]=n,e[8]=j):j=e[8];let d;return e[9]!==o||e[10]!==j?(d=t.jsxs("div",{className:"flex flex-col gap-2",children:[o,j]}),e[9]=o,e[10]=j,e[11]=d):d=e[11],d}function It(r){const e=q.c(17),{value:s,checked:n,onToggle:a,title:i,description:c,leading:o}=r;let j;e[0]!==n?(j=t.jsx(Ft,{checked:n,className:"pointer-events-none mt-0.5"}),e[0]=n,e[1]=j):j=e[1];let d;e[2]!==o?(d=o&&t.jsx("span",{className:"mt-px shrink-0",children:o}),e[2]=o,e[3]=d):d=e[3];let m;e[4]!==i?(m=t.jsx("span",{className:"truncate text-sm leading-tight",children:i}),e[4]=i,e[5]=m):m=e[5];let x;e[6]!==c?(x=c&&t.jsx("span",{className:"line-clamp-2 text-xs leading-snug text-muted-foreground",children:c}),e[6]=c,e[7]=x):x=e[7];let f;e[8]!==m||e[9]!==x?(f=t.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[m,x]}),e[8]=m,e[9]=x,e[10]=f):f=e[10];let g;return e[11]!==a||e[12]!==j||e[13]!==d||e[14]!==f||e[15]!==s?(g=t.jsxs(Ns,{value:s,onSelect:a,className:"items-start gap-2.5 py-2",children:[j,d,f]}),e[11]=a,e[12]=j,e[13]=d,e[14]=f,e[15]=s,e[16]=g):g=e[16],g}function Pt(r){const e=q.c(27),{conn:s,label:n,icon:a,on:i,total:c,onToggle:o}=r,j=ee(),d=i===c;let m;e[0]!==a||e[1]!==s?(m=s?t.jsx(Ps,{icon:s.icon,name:s.title,size:"2xs"}):a?t.jsx(a,{size:14,className:"text-muted-foreground"}):t.jsx(ys,{size:14,className:"text-muted-foreground"}),e[0]=a,e[1]=s,e[2]=m):m=e[2];let x;e[3]!==s?.title||e[4]!==n||e[5]!==j?(x=s?.title??n??j("automations.automationConfig.otherTools"),e[3]=s?.title,e[4]=n,e[5]=j,e[6]=x):x=e[6];let f;e[7]!==x?(f=t.jsx("span",{className:"truncate",children:x}),e[7]=x,e[8]=f):f=e[8];let g;e[9]!==i||e[10]!==c?(g=t.jsxs("span",{className:"text-2xs font-normal tabular-nums text-muted-foreground/70",children:[i,"/",c]}),e[9]=i,e[10]=c,e[11]=g):g=e[11];let u;e[12]!==o?(u=v=>{v.stopPropagation(),o()},e[12]=o,e[13]=u):u=e[13];let h;e[14]!==d||e[15]!==j?(h=j(d?"automations.automationConfig.none":"automations.automationConfig.all"),e[14]=d,e[15]=j,e[16]=h):h=e[16];let p;e[17]!==u||e[18]!==h?(p=t.jsx("button",{type:"button",onClick:u,className:"text-2xs font-medium text-primary hover:underline",children:h}),e[17]=u,e[18]=h,e[19]=p):p=e[19];let l;e[20]!==g||e[21]!==p?(l=t.jsxs("span",{className:"ml-auto flex items-center gap-2",children:[g,p]}),e[20]=g,e[21]=p,e[22]=l):l=e[22];let y;return e[23]!==m||e[24]!==f||e[25]!==l?(y=t.jsxs("div",{className:"flex items-center gap-2",children:[m,f,l]}),e[23]=m,e[24]=f,e[25]=l,e[26]=y):y=e[26],y}function jo(r){const e=q.c(83),{agentId:s,value:n,onChange:a}=r,i=ee(),{org:c}=$t(),[o,j]=w.useState(!1);let d;e[0]!==s||e[1]!==c.id||e[2]!==c.slug?(d={connectionId:s,orgId:c.id,orgSlug:c.slug},e[0]=s,e[1]=c.id,e[2]=c.slug,e[3]=d):d=e[3];const m=_s(d);let x;e[4]!==m?(x={client:m},e[4]=m,e[5]=x):x=e[5];const{data:f,isLoading:g}=Is(x),u=dt();let h,p,l,y,v,N,S,b,T,D,_,k,P;if(e[6]!==u||e[7]!==f?.tools||e[8]!==g||e[9]!==a||e[10]!==o||e[11]!==i||e[12]!==n){const Q=new Map(u.map(No)),H=new Map;for(const I of f?.tools??[]){const z=ws(I._meta)??"__other__",Z=Ds(I.name,z==="__other__"?void 0:z),A=I.title,xe=A&&A!==I.name?A:go(Z);H.has(z)||H.set(z,{clientId:z,conn:Q.get(z),tools:[]}),H.get(z).tools.push({name:I.name,display:xe,description:I.description})}const W=[...H.values()].sort(Co),G=(f?.tools??[]).map(vo),J=[...xo,...G],V=n===null?new Set(J):new Set(n),U=J.every(I=>V.has(I)),O=I=>a(J.every(z=>I.has(z))?null:[...I]),ae=I=>{const z=new Set(V);z.has(I)?z.delete(I):z.add(I),O(z)},ne=(I,z)=>{const Z=new Set(V);for(const A of I)z?Z.add(A):Z.delete(A);O(Z)};y=Lt,P=o,v=j;let Y;e[26]===Symbol.for("react.memo_cache_sentinel")?(Y=t.jsx(lt,{size:14,className:"text-muted-foreground"}),e[26]=Y):Y=e[26];let ie;e[27]!==U||e[28]!==i?(ie=i(U?"automations.automationConfig.allTools":"automations.automationConfig.tools"),e[27]=U,e[28]=i,e[29]=ie):ie=e[29];const ue=!U&&t.jsxs(Kt,{variant:"secondary",className:"ml-0.5 tabular-nums",children:[V.size,"/",J.length]});let me;e[30]===Symbol.for("react.memo_cache_sentinel")?(me=t.jsx(rt,{size:14,className:"text-muted-foreground"}),e[30]=me):me=e[30],e[31]!==ie||e[32]!==ue?(N=t.jsx(Mt,{asChild:!0,children:t.jsxs(B,{variant:"outline",size:"sm",className:"w-fit gap-1.5",children:[Y,ie,ue,me]})}),e[31]=ie,e[32]=ue,e[33]=N):N=e[33],l=Rt,_="p-0 w-80",k="start",p=Ss;let te;e[34]!==i?(te=i("automations.automationConfig.searchToolsPlaceholder"),e[34]=i,e[35]=te):te=e[35],e[36]!==te?(T=t.jsx(ks,{placeholder:te}),e[36]=te,e[37]=T):T=e[37];const fe=U?i("automations.automationConfig.allToolsEnabled",{count:J.length}):i("automations.automationConfig.toolsEnabledCount",{enabled:V.size,total:J.length});let se;e[38]!==fe?(se=t.jsx("span",{className:"text-xs text-muted-foreground",children:fe}),e[38]=fe,e[39]=se):se=e[39];let re;e[40]!==a?(re=()=>a(null),e[40]=a,e[41]=re):re=e[41];let le;e[42]!==i?(le=i("automations.automationConfig.selectAll"),e[42]=i,e[43]=le):le=e[43];let C;e[44]!==U||e[45]!==re||e[46]!==le?(C=t.jsx("button",{type:"button",onClick:re,disabled:U,className:"text-xs font-medium text-primary hover:underline disabled:cursor-default disabled:opacity-40 disabled:no-underline",children:le}),e[44]=U,e[45]=re,e[46]=le,e[47]=C):C=e[47];let M;e[48]===Symbol.for("react.memo_cache_sentinel")?(M=t.jsx("span",{className:"text-muted-foreground/30",children:"·"}),e[48]=M):M=e[48];let E;e[49]!==a?(E=()=>a([]),e[49]=a,e[50]=E):E=e[50];const pe=V.size===0;let oe;e[51]!==i?(oe=i("automations.automationConfig.clear"),e[51]=i,e[52]=oe):oe=e[52];let ce;e[53]!==E||e[54]!==pe||e[55]!==oe?(ce=t.jsx("button",{type:"button",onClick:E,disabled:pe,className:"text-xs font-medium text-muted-foreground hover:underline disabled:cursor-default disabled:opacity-40 disabled:no-underline",children:oe}),e[53]=E,e[54]=pe,e[55]=oe,e[56]=ce):ce=e[56];let de;e[57]!==C||e[58]!==ce?(de=t.jsxs("div",{className:"flex items-center gap-2",children:[C,M,ce]}),e[57]=C,e[58]=ce,e[59]=de):de=e[59],e[60]!==se||e[61]!==de?(D=t.jsxs("div",{className:"flex items-center justify-between border-b px-3 py-2",children:[se,de]}),e[60]=se,e[61]=de,e[62]=D):D=e[62],h=Ts,S="max-h-80",b=g?t.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:i("automations.automationConfig.loadingTools")}):t.jsxs(t.Fragment,{children:[t.jsx(Cs,{children:i("automations.automationConfig.noToolsFound")}),Bt.map(I=>{const z=I.tools.map(bo),Z=z.filter(A=>V.has(A)).length;return t.jsx(wt,{heading:t.jsx(Pt,{label:i(I.headingKey),icon:I.icon,on:Z,total:z.length,onToggle:()=>ne(z,Z!==z.length)}),children:I.tools.map(A=>t.jsx(It,{value:`${i(A.titleKey)} ${A.name}`,checked:V.has(A.name),onToggle:()=>ae(A.name),title:i(A.titleKey),description:i(A.descriptionKey),leading:t.jsx(A.icon,{size:16,className:"text-muted-foreground"})},A.name))},I.key)}),W.map(I=>{const z=I.tools.map(yo),Z=z.filter(A=>V.has(A)).length;return t.jsx(wt,{heading:t.jsx(Pt,{conn:I.conn,on:Z,total:z.length,onToggle:()=>ne(z,Z!==z.length)}),children:I.tools.map(A=>t.jsx(It,{value:`${A.display} ${A.name} ${I.conn?.title??""}`,checked:V.has(A.name),onToggle:()=>ae(A.name),title:A.display,description:A.description},A.name))},I.clientId)})]}),e[6]=u,e[7]=f?.tools,e[8]=g,e[9]=a,e[10]=o,e[11]=i,e[12]=n,e[13]=h,e[14]=p,e[15]=l,e[16]=y,e[17]=v,e[18]=N,e[19]=S,e[20]=b,e[21]=T,e[22]=D,e[23]=_,e[24]=k,e[25]=P}else h=e[13],p=e[14],l=e[15],y=e[16],v=e[17],N=e[18],S=e[19],b=e[20],T=e[21],D=e[22],_=e[23],k=e[24],P=e[25];let $;e[63]!==h||e[64]!==S||e[65]!==b?($=t.jsx(h,{className:S,children:b}),e[63]=h,e[64]=S,e[65]=b,e[66]=$):$=e[66];let R;e[67]!==p||e[68]!==$||e[69]!==T||e[70]!==D?(R=t.jsxs(p,{children:[T,D,$]}),e[67]=p,e[68]=$,e[69]=T,e[70]=D,e[71]=R):R=e[71];let K;e[72]!==l||e[73]!==R||e[74]!==_||e[75]!==k?(K=t.jsx(l,{className:_,align:k,children:R}),e[72]=l,e[73]=R,e[74]=_,e[75]=k,e[76]=K):K=e[76];let F;return e[77]!==y||e[78]!==v||e[79]!==N||e[80]!==K||e[81]!==P?(F=t.jsxs(y,{open:P,onOpenChange:v,children:[N,K]}),e[77]=y,e[78]=v,e[79]=N,e[80]=K,e[81]=P,e[82]=F):F=e[82],F}function yo(r){return r.name}function bo(r){return r.name}function vo(r){return r.name}function Co(r,e){return(r.conn?.title??r.clientId).localeCompare(e.conn?.title??e.clientId)}function No(r){return[r.id,r]}function Re(r){const e=r.trim().split(/\s+/);return e.length!==5?!1:e.every(s=>/^[\d*/,-]+$/.test(s))}function So(r){if(!r)return"Unknown schedule";const e=r.trim();if(e==="* * * * *")return"Every minute";if(e==="0 * * * *")return"Every hour";if(e==="0 0 * * *")return"Every day";if(e==="0 0 * * 1")return"Every week";const s=e.match(/^\*\/(\d+)\s+\*\s+\*\s+\*\s+\*$/);if(s)return`Every ${s[1]} minutes`;const n=e.match(/^0\s+\*\/(\d+)\s+\*\s+\*\s+\*$/);if(n)return`Every ${n[1]} hours`;const a=e.match(/^0\s+0\s+\*\/(\d+)\s+\*\s+\*$/);if(a){const o=parseInt(a[1]??"1");return o%7===0?`Every ${o/7} weeks`:`Every ${o} days`}const i=e.match(/^(\d+)\s+(\d+)\s+\*\s+\*\s+\*$/);if(i){const o=(i[2]??"0").padStart(2,"0"),j=(i[1]??"0").padStart(2,"0");return`Every day at ${o}:${j} UTC`}const c=e.match(/^(\d+)\s+(\d+)\s+\*\s+\*\s+(\d)$/);if(c){const j=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][parseInt(c[3]??"0")]??"day",d=(c[2]??"0").padStart(2,"0"),m=(c[1]??"0").padStart(2,"0");return`Every ${j} at ${d}:${m} UTC`}return r}function ko(r,e){const s=Math.max(1,r);switch(e){case"minutes":return s===1?"* * * * *":`*/${s} * * * *`;case"hours":return s===1?"0 * * * *":`0 */${s} * * *`;case"days":return s===1?"0 0 * * *":`0 0 */${s} * *`;case"weeks":return s===1?"0 0 * * 1":`0 0 */${s*7} * *`}}function To(r){const e=r.trim();if(e==="* * * * *")return{count:1,unit:"minutes"};if(e==="0 * * * *")return{count:1,unit:"hours"};if(e==="0 0 * * *")return{count:1,unit:"days"};if(e==="0 0 * * 1")return{count:1,unit:"weeks"};const s=e.match(/^\*\/(\d+)\s+\*\s+\*\s+\*\s+\*$/);if(s)return{count:parseInt(s[1]),unit:"minutes"};const n=e.match(/^0\s+\*\/(\d+)\s+\*\s+\*\s+\*$/);if(n)return{count:parseInt(n[1]),unit:"hours"};const a=e.match(/^0\s+0\s+\*\/(\d+)\s+\*\s+\*$/);return a?{count:parseInt(a[1]),unit:"days"}:null}function wo(r,e){return e===1?{minutes:"minute",hours:"hour",days:"day",weeks:"week"}[r]??r:r}const Do=[{label:"5 minutes",cron:"*/5 * * * *"},{label:"Hour",cron:"0 * * * *"},{label:"Day",cron:"0 0 * * *"},{label:"Week",cron:"0 0 * * 1"}],qe=oo.filter(r=>!so.includes(r)),Gt=["any","earlier","later","statuses"],_o=r=>qe.some(e=>e===r),Io=r=>Gt.some(e=>e===r);function Po({automationId:r,open:e,onOpenChange:s}){const n=ee(),{triggerAdd:a}=ve(),[i,c]=w.useState("in_progress"),[o,j]=w.useState("any"),[d,m]=w.useState([]),x=qe.filter(l=>l!==i),f=d.filter(l=>l!==i),g=o!=="statuses"||f.length>0,u=l=>{l||(c("in_progress"),j("any"),m([])),s(l)},h=async()=>{try{await a.mutateAsync({automation_id:r,type:"board_column_transition",column_key:i,from:o==="statuses"?{kind:o,statuses:f}:{kind:o}}),X.success(n("automations.addStarterPopover.starterAdded")),u(!1)}catch(l){X.error(l instanceof Error?l.message:n("automations.addStarterPopover.failedAddStarter"))}},p=l=>n(l==="any"?"automations.columnTransitionDialog.fromAny":l==="earlier"?"automations.columnTransitionDialog.fromEarlier":l==="later"?"automations.columnTransitionDialog.fromLater":"automations.columnTransitionDialog.fromColumns");return t.jsx(et,{open:e,onOpenChange:u,children:t.jsxs(tt,{className:"max-w-md",children:[t.jsxs(st,{children:[t.jsx(ot,{children:n("automations.columnTransitionDialog.title")}),t.jsx(at,{children:n("automations.columnTransitionDialog.description")})]}),t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:n("automations.columnTransitionDialog.column")}),t.jsxs(ge,{value:i,onValueChange:l=>{_o(l)&&c(l)},children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{})}),t.jsx(ye,{children:qe.map(l=>{const{label:y,visual:v}=We(l,n),N=v.icon;return t.jsxs(be,{value:l,children:[t.jsx(N,{size:14,className:At("shrink-0",v.iconClassName)}),y]},l)})})]})]}),t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:n("automations.columnTransitionDialog.origin")}),t.jsxs(ge,{value:o,onValueChange:l=>{Io(l)&&j(l)},children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{})}),t.jsx(ye,{children:Gt.map(l=>t.jsx(be,{value:l,children:p(l)},l))})]}),o==="statuses"&&t.jsx(Wt,{options:x.map(l=>({label:We(l,n).label,value:l})),defaultValue:f,onValueChange:m,placeholder:n("automations.columnTransitionDialog.columnsPlaceholder"),modalPopover:!0,className:"max-w-none"},i)]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:n("automations.columnTransitionDialog.help")})]}),t.jsxs(nt,{children:[t.jsx(B,{variant:"ghost",onClick:()=>u(!1),children:n("automations.columnTransitionDialog.cancel")}),t.jsx(B,{disabled:!g||a.isPending,onClick:h,children:n("automations.columnTransitionDialog.add")})]})]})})}const Ht=["any","earlier","later","statuses"],Ao=r=>Ht.some(e=>e===r);function $o({automationId:r,boardId:e,open:s,onOpenChange:n}){const a=ee(),{triggerAdd:i}=ve(),c=qs(s?e:null),[o,j]=w.useState(null),[d,m]=w.useState("any"),[x,f]=w.useState([]),g=(c.data??[]).flatMap(b=>b.statuses.map(T=>({column:b.name,status:T}))),u=o??g[0]?.status??null,h=g.map(b=>b.status).filter(b=>b!==u),p=x.filter(b=>b!==u),l=u!==null&&(d!=="statuses"||p.length>0),y=b=>{b||(j(null),m("any"),f([])),n(b)},v=async()=>{if(u)try{await i.mutateAsync({automation_id:r,type:"jira_transition",jira_status:u,from:d==="statuses"?{kind:d,statuses:p}:{kind:d}}),X.success(a("automations.addStarterPopover.starterAdded")),y(!1)}catch(b){X.error(b instanceof Error?b.message:a("automations.addStarterPopover.failedAddStarter"))}},N=b=>a(b==="any"?"automations.jiraTransitionDialog.fromAny":b==="earlier"?"automations.jiraTransitionDialog.fromEarlier":b==="later"?"automations.jiraTransitionDialog.fromLater":"automations.jiraTransitionDialog.fromStatuses");let S;return c.isPending?S=t.jsx(es,{className:"h-9 w-full"}):c.isError||g.length===0?S=t.jsx("p",{className:"text-xs text-muted-foreground",children:a("automations.jiraTransitionDialog.noStatuses")}):S=t.jsxs(ge,{value:u??void 0,onValueChange:j,children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{})}),t.jsx(ye,{children:g.map(b=>t.jsxs(be,{value:b.status,children:[b.status,b.column!==b.status&&t.jsx("span",{className:"text-muted-foreground",children:b.column})]},b.status))})]}),t.jsx(et,{open:s,onOpenChange:y,children:t.jsxs(tt,{className:"max-w-md",children:[t.jsxs(st,{children:[t.jsx(ot,{children:a("automations.jiraTransitionDialog.title")}),t.jsx(at,{children:a("automations.jiraTransitionDialog.description")})]}),t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:a("automations.jiraTransitionDialog.status")}),S]}),t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:a("automations.jiraTransitionDialog.origin")}),t.jsxs(ge,{value:d,onValueChange:b=>{Ao(b)&&m(b)},children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{})}),t.jsx(ye,{children:Ht.map(b=>t.jsx(be,{value:b,children:N(b)},b))})]}),d==="statuses"&&t.jsx(Wt,{options:h.map(b=>({label:b,value:b})),defaultValue:p,onValueChange:f,placeholder:a("automations.jiraTransitionDialog.statusesPlaceholder"),modalPopover:!0,className:"max-w-none"},u)]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:a("automations.jiraTransitionDialog.help")})]}),t.jsxs(nt,{children:[t.jsx(B,{variant:"ghost",onClick:()=>y(!1),children:a("automations.jiraTransitionDialog.cancel")}),t.jsx(B,{disabled:!l||i.isPending,onClick:v,children:a("automations.jiraTransitionDialog.add")})]})]})})}function Oo({automationId:r,open:e,onOpenChange:s,onCustomSelect:n,onEventSelect:a,onWebhookCreated:i}){const c=ee(),{triggerAdd:o}=ve(),[j,d]=w.useState(!1),[m,x]=w.useState(!1),[f,g]=w.useState(!1),u=eo().data?.boardId??null,h=e??j,p=v=>{s?s(v):d(v)},l=async v=>{try{await o.mutateAsync({automation_id:r,type:"cron",cron_expression:v}),X.success(c("automations.addStarterPopover.starterAdded")),p(!1)}catch(N){const S=N instanceof Error?N.message:c("automations.addStarterPopover.failedAddStarter");X.error(S)}},y=async()=>{try{const v=await o.mutateAsync({automation_id:r,type:"webhook"});p(!1),v.webhook?i?.(v.webhook):X.success(c("automations.addStarterPopover.webhookStarterAdded"))}catch(v){const N=v instanceof Error?v.message:c("automations.addStarterPopover.failedAddWebhookStarter");X.error(N)}};return t.jsxs(t.Fragment,{children:[t.jsxs(ts,{open:h,onOpenChange:p,children:[t.jsx(ss,{asChild:!0,children:t.jsxs(B,{variant:"outline",size:"sm",children:[t.jsx(to,{size:14}),c("automations.addStarterPopover.addStarter")]})}),t.jsxs(os,{align:"end",className:"w-[240px]",children:[t.jsxs(as,{children:[t.jsxs(ns,{className:"gap-2.5",children:[t.jsx(Me,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.every")]}),t.jsx(is,{className:"w-[160px]",children:Do.map(v=>t.jsxs(Ee,{className:"gap-2.5",onSelect:()=>l(v.cron),disabled:o.isPending,children:[t.jsx(Me,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.everyUnit",{unit:v.label})]},v.cron))})]}),t.jsxs(Ee,{className:"gap-2.5",onSelect:()=>{p(!1),n?.()},children:[t.jsx(Me,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.customCron")]}),t.jsxs(Ee,{className:"gap-2.5",onSelect:()=>{p(!1),a?.()},children:[t.jsx(ut,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.event")]}),t.jsxs(Ee,{className:"gap-2.5",onSelect:()=>{p(!1),x(!0)},children:[t.jsx(Ot,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.cardEntersColumn")]}),u&&t.jsxs(Ee,{className:"gap-2.5",onSelect:()=>{p(!1),g(!0)},children:[t.jsx(Ut,{size:14,className:"shrink-0"}),c("automations.addStarterPopover.jiraIssueEntersStatus")]}),t.jsxs(Ee,{className:"gap-2.5",onSelect:()=>{y()},disabled:o.isPending,children:[t.jsx(it,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.webhook")]})]})]}),t.jsx(Po,{automationId:r,open:m,onOpenChange:x}),u&&t.jsx($o,{automationId:r,boardId:u,open:f,onOpenChange:g})]})}function Jt(r){const e=q.c(39),{open:s,onOpenChange:n,url:a,token:i,title:c,description:o}=r,j=c===void 0?"Webhook ready":c,d=o===void 0?"Send a POST to this URL with the bearer token to fire the automation. The token is shown once — copy it now.":o,m=ee(),[x,f]=w.useState(null),[g,u]=w.useState("curl"),[h,p]=w.useState("header"),l=w.useId();let y;e[0]!==m?(y=async(W,G)=>{try{await navigator.clipboard.writeText(W),f(G),X.success(m("automations.webhookSecretDialog.copied")),setTimeout(()=>f(null),1500)}catch{X.error(m("automations.webhookSecretDialog.failedCopy"))}},e[0]=m,e[1]=y):y=e[1];const v=y;let N;e[2]!==h||e[3]!==i||e[4]!==a?(N=a&&i&&h==="url"?`${a.replace(/\/$/,"")}/${i}`:a??"",e[2]=h,e[3]=i,e[4]=a,e[5]=N):N=e[5];const S=N,b=a&&i?h==="header"?`curl -X POST "${S}" \\
2
2
  -H "Authorization: Bearer ${i}" \\
3
3
  -H "Content-Type: application/json" \\
4
4
  -d '{"hello":"world"}'`:`curl -X POST "${S}" \\
@@ -17,4 +17,4 @@ import{aD as Zt,c as q,b as ee,r as w,j as t,B,ai as qt,l as At,a4 as $t,D as et
17
17
  },
18
18
  body: JSON.stringify({ hello: "world" }),
19
19
  });`:"",D=g==="curl"?b:T;let _;e[6]!==j?(_=t.jsx(ot,{children:j}),e[6]=j,e[7]=_):_=e[7];let k;e[8]!==d?(k=t.jsx(at,{children:d}),e[8]=d,e[9]=k):k=e[9];let P;e[10]!==_||e[11]!==k?(P=t.jsxs(st,{children:[_,k]}),e[10]=_,e[11]=k,e[12]=P):P=e[12];let $;e[13]!==h||e[14]!==x||e[15]!==v||e[16]!==S||e[17]!==g||e[18]!==D||e[19]!==m||e[20]!==i||e[21]!==l||e[22]!==a?($=a&&i?t.jsxs("div",{className:"flex flex-col gap-3 min-w-0",children:[t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:m("automations.webhookSecretDialog.url")}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("code",{className:"flex-1 min-w-0 text-xs font-mono bg-muted rounded-md px-2 py-1.5 truncate",children:S}),t.jsxs(B,{size:"sm",variant:"outline",onClick:()=>v(S,"url"),children:[t.jsx(Qe,{size:13}),m(x==="url"?"automations.webhookSecretDialog.copied":"automations.webhookSecretDialog.copy")]})]})]}),t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:m("automations.webhookSecretDialog.tokenLabel")}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("code",{className:"flex-1 min-w-0 text-xs font-mono bg-muted rounded-md px-2 py-1.5 truncate",children:i}),t.jsxs(B,{size:"sm",variant:"outline",onClick:()=>v(i,"token"),children:[t.jsx(Qe,{size:13}),m(x==="token"?"automations.webhookSecretDialog.copied":"automations.webhookSecretDialog.copy")]})]})]}),t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:m("automations.webhookSecretDialog.snippet")}),t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(ao,{value:g,onValueChange:W=>u(W),children:t.jsxs(no,{className:"h-8 p-[2px]",children:[t.jsx(_t,{value:"curl",className:"h-7 px-2.5 text-xs",children:"curl"}),t.jsx(_t,{value:"fetch",className:"h-7 px-2.5 text-xs",children:"fetch"})]})}),t.jsxs("label",{htmlFor:l,className:"flex items-center gap-1.5 text-xs text-muted-foreground cursor-pointer select-none",children:[t.jsx(Ft,{id:l,checked:h==="url",onCheckedChange:W=>p(W?"url":"header")}),m("automations.webhookSecretDialog.tokenInUrl")]})]}),t.jsxs(B,{size:"sm",variant:"outline",onClick:()=>v(D,"example"),children:[t.jsx(Qe,{size:13}),m(x==="example"?"automations.webhookSecretDialog.copied":"automations.webhookSecretDialog.copy")]})]}),t.jsx("div",{className:"rounded-md border overflow-hidden min-w-0",children:t.jsx(io,{code:D,language:g==="curl"?"shell":"typescript",readOnly:!0,disableDiagnostics:!0,height:180})})]})]}):null,e[13]=h,e[14]=x,e[15]=v,e[16]=S,e[17]=g,e[18]=D,e[19]=m,e[20]=i,e[21]=l,e[22]=a,e[23]=$):$=e[23];let R;e[24]!==n?(R=()=>n(!1),e[24]=n,e[25]=R):R=e[25];let K;e[26]!==m?(K=m("automations.webhookSecretDialog.done"),e[26]=m,e[27]=K):K=e[27];let F;e[28]!==K||e[29]!==R?(F=t.jsx(nt,{children:t.jsx(B,{onClick:R,children:K})}),e[28]=K,e[29]=R,e[30]=F):F=e[30];let Q;e[31]!==F||e[32]!==P||e[33]!==$?(Q=t.jsxs(tt,{className:"max-w-lg",children:[P,$,F]}),e[31]=F,e[32]=P,e[33]=$,e[34]=Q):Q=e[34];let H;return e[35]!==n||e[36]!==s||e[37]!==Q?(H=t.jsx(et,{open:s,onOpenChange:n,children:Q}),e[35]=n,e[36]=s,e[37]=Q,e[38]=H):H=e[38],H}async function zo(r){const{cronExpression:e,automationId:s,oldTriggerId:n,addTrigger:a,removeTrigger:i}=r,c=await a({automation_id:s,type:"cron",cron_expression:e});try{await i({trigger_id:n,automation_id:s})}catch(o){throw await i({trigger_id:c.id,automation_id:s}).catch(()=>{}),o}}function Xt(r){const e=q.c(153),{trigger:s,automationId:n,connectionName:a,readOnly:i}=r,c=i===void 0?!1:i,o=ee(),{triggerAdd:j,triggerRemove:d,triggerRotateToken:m}=ve(),[x,f]=w.useState(!1),[g,u]=w.useState(!1),[h,p]=w.useState(null);let l;e[0]!==s.cron_expression?(l=s.cron_expression?To(s.cron_expression):null,e[0]=s.cron_expression,e[1]=l):l=e[1];const y=l,[v,N]=w.useState(y?.count??1),[S,b]=w.useState(!1),[T,D]=w.useState(s.cron_expression??""),_=d.isPending||j.isPending||m.isPending,k=s.type==="cron",P=s.type==="webhook",$=s.type==="board_column_transition";let R;e[2]!==o||e[3]!==s.type?(R=s.type==="board_pr_ready"?o("automations.triggerCard.prReady"):s.type==="linked_chat_run"?o("automations.triggerCard.linkedChatRun"):s.type==="board_pr_merged"?o("automations.triggerCard.prMerged"):s.type==="chat_pr_opened"?o("automations.triggerCard.chatPrOpened"):null,e[2]=o,e[3]=s.type,e[4]=R):R=e[4];const K=R,F=s.type==="jira_transition";let Q;e[5]!==n||e[6]!==d||e[7]!==o||e[8]!==s.id?(Q=async()=>{try{await d.mutateAsync({trigger_id:s.id,automation_id:n}),X.success(o("automations.triggerCard.starterRemoved"))}catch{X.error(o("automations.triggerCard.failedToRemoveStarter"))}f(!1)},e[5]=n,e[6]=d,e[7]=o,e[8]=s.id,e[9]=Q):Q=e[9];const H=Q;let W;e[10]!==j||e[11]!==n||e[12]!==d||e[13]!==s.id?(W=L=>zo({cronExpression:L,automationId:n,oldTriggerId:s.id,addTrigger:Fe=>j.mutateAsync(Fe),removeTrigger:Fe=>d.mutateAsync(Fe)}),e[10]=j,e[11]=n,e[12]=d,e[13]=s.id,e[14]=W):W=e[14];const G=W;let J;e[15]!==T||e[16]!==G||e[17]!==o||e[18]!==s.cron_expression?(J=async()=>{const L=T.trim();if(!L||!Re(L)||L===s.cron_expression){b(!1),D(s.cron_expression??"");return}try{await G(L),b(!1)}catch{X.error(o("automations.triggerCard.failedToUpdateStarter")),D(s.cron_expression??""),b(!1)}},e[15]=T,e[16]=G,e[17]=o,e[18]=s.cron_expression,e[19]=J):J=e[19];const V=J;let U;e[20]!==n||e[21]!==m||e[22]!==o||e[23]!==s.id?(U=async()=>{u(!1);try{const L=await m.mutateAsync({trigger_id:s.id,automation_id:n});p({url:L.url,token:L.token})}catch{X.error(o("automations.triggerCard.failedToRotateToken"))}},e[20]=n,e[21]=m,e[22]=o,e[23]=s.id,e[24]=U):U=e[24];const O=U;let ae;e[25]!==y||e[26]!==G||e[27]!==o||e[28]!==s.cron_expression?(ae=async L=>{if(!y)return;const Fe=y.unit==="minutes"?5:1,Je=Math.max(Fe,L);Je!==L&&N(Je);const ft=ko(Je,y.unit);if(ft!==s.cron_expression)try{await G(ft)}catch{X.error(o("automations.triggerCard.failedToUpdateStarter")),N(y.count)}},e[25]=y,e[26]=G,e[27]=o,e[28]=s.cron_expression,e[29]=ae):ae=e[29];const ne=ae;let Y;e[30]!==$||e[31]!==k||e[32]!==F||e[33]!==P||e[34]!==K?(Y=k?t.jsx(Me,{size:14,className:"text-muted-foreground shrink-0"}):F?t.jsx(Ut,{size:14,className:"shrink-0"}):$||K?t.jsx(Ot,{size:14,className:"text-muted-foreground shrink-0"}):P?t.jsx(it,{size:14,className:"text-muted-foreground shrink-0"}):t.jsx(ut,{size:14,className:"text-muted-foreground shrink-0"}),e[30]=$,e[31]=k,e[32]=F,e[33]=P,e[34]=K,e[35]=Y):Y=e[35];let ie;e[36]!==a||e[37]!==v||e[38]!==T||e[39]!==ne||e[40]!==V||e[41]!==y||e[42]!==$||e[43]!==k||e[44]!==S||e[45]!==F||e[46]!==_||e[47]!==P||e[48]!==K||e[49]!==o||e[50]!==s.column_key||e[51]!==s.cron_expression||e[52]!==s.event_type||e[53]!==s.from||e[54]!==s.params?(ie=y&&k?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-sm text-muted-foreground",children:o("automations.triggerCard.every")}),t.jsx("input",{type:"number",min:y.unit==="minutes"?5:1,value:v,onChange:L=>N(parseInt(L.target.value)||1),onBlur:()=>ne(v),onKeyDown:L=>{L.key==="Enter"&&L.target.blur(),L.key==="Escape"&&N(y.count)},disabled:_,className:"w-12 text-center text-sm h-7 border border-border rounded-md bg-background px-1 focus-ring"}),t.jsx("span",{className:"text-sm",children:wo(y.unit,v)})]}):k&&S?t.jsxs(t.Fragment,{children:[t.jsx("input",{type:"text",value:T,onChange:L=>D(L.target.value),onBlur:V,onKeyDown:L=>{L.key==="Enter"&&L.target.blur(),L.key==="Escape"&&(b(!1),D(s.cron_expression??""))},className:"flex-1 text-sm font-mono bg-transparent outline-none",autoFocus:!0}),T&&!Re(T)&&t.jsx("span",{className:"text-xs text-muted-foreground/60 shrink-0",children:o("automations.triggerCard.invalid")})]}):t.jsxs("div",{className:"flex flex-col gap-0.5 flex-1 min-w-0",children:[t.jsx("span",{className:"text-sm font-mono text-xs text-muted-foreground truncate",children:k?So(s.cron_expression??""):$?o("automations.triggerCard.cardEntersColumn",{lane:We(s.column_key??"",o).label}):K||(F?o("automations.triggerCard.issueEntersJiraStatus",{status:s.column_key??""}):P?o("automations.triggerCard.webhookPostToFire"):`${s.event_type}${a?` · ${a}`:""}`)}),$&&t.jsx(Ko,{from:s.from}),F&&t.jsx(Fo,{from:s.from}),!k&&!P&&!$&&!K&&!F&&s.params&&Object.keys(s.params).length>0&&t.jsx("span",{className:"text-xs text-muted-foreground/60 truncate",children:Object.entries(s.params).map(Eo).join(", ")})]}),e[36]=a,e[37]=v,e[38]=T,e[39]=ne,e[40]=V,e[41]=y,e[42]=$,e[43]=k,e[44]=S,e[45]=F,e[46]=_,e[47]=P,e[48]=K,e[49]=o,e[50]=s.column_key,e[51]=s.cron_expression,e[52]=s.event_type,e[53]=s.from,e[54]=s.params,e[55]=ie):ie=e[55];let ue;e[56]!==_?(ue=_&&t.jsx(Le,{className:"size-[13px] text-muted-foreground"}),e[56]=_,e[57]=ue):ue=e[57];let me;e[58]!==y||e[59]!==k||e[60]!==S||e[61]!==o||e[62]!==s.cron_expression?(me=k&&!y&&!S&&t.jsx(B,{variant:"ghost",size:"icon-sm",className:"opacity-0 group-hover:opacity-100 transition-opacity","aria-label":o("automations.triggerCard.editSchedule"),onClick:()=>{D(s.cron_expression??""),b(!0)},children:t.jsx(zt,{size:13,className:"text-muted-foreground"})}),e[58]=y,e[59]=k,e[60]=S,e[61]=o,e[62]=s.cron_expression,e[63]=me):me=e[63];let te;e[64]!==P||e[65]!==o?(te=P&&t.jsx(B,{variant:"ghost",size:"icon-sm",className:"opacity-0 group-hover:opacity-100 transition-opacity",title:o("automations.triggerCard.rotateToken"),"aria-label":o("automations.triggerCard.rotateToken"),onClick:()=>u(!0),children:t.jsx(rs,{size:13,className:"text-muted-foreground"})}),e[64]=P,e[65]=o,e[66]=te):te=e[66];let fe;e[67]!==c||e[68]!==o?(fe=!c&&t.jsx(B,{variant:"ghost",size:"icon-sm",className:"opacity-0 group-hover:opacity-100 transition-opacity","aria-label":o("automations.triggerCard.removeStarter"),onClick:()=>f(!0),children:t.jsx(mt,{size:13,className:"text-muted-foreground"})}),e[67]=c,e[68]=o,e[69]=fe):fe=e[69];let se;e[70]!==ue||e[71]!==me||e[72]!==te||e[73]!==fe?(se=t.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[ue,me,te,fe]}),e[70]=ue,e[71]=me,e[72]=te,e[73]=fe,e[74]=se):se=e[74];let re;e[75]!==ie||e[76]!==se||e[77]!==Y?(re=t.jsxs("div",{className:"flex items-center gap-2.5 px-3 py-2.5 surface group",children:[Y,ie,se]}),e[75]=ie,e[76]=se,e[77]=Y,e[78]=re):re=e[78];let le;e[79]!==o?(le=o("automations.triggerCard.removeStarter"),e[79]=o,e[80]=le):le=e[80];let C;e[81]!==le?(C=t.jsx(pt,{children:le}),e[81]=le,e[82]=C):C=e[82];let M;e[83]!==o?(M=o("automations.triggerCard.confirmRemoveStarter"),e[83]=o,e[84]=M):M=e[84];let E;e[85]!==M?(E=t.jsx(xt,{children:M}),e[85]=M,e[86]=E):E=e[86];let pe;e[87]!==C||e[88]!==E?(pe=t.jsxs(gt,{children:[C,E]}),e[87]=C,e[88]=E,e[89]=pe):pe=e[89];let oe;e[90]!==o?(oe=o("automations.triggerCard.cancel"),e[90]=o,e[91]=oe):oe=e[91];let ce;e[92]!==oe?(ce=t.jsx(ht,{children:oe}),e[92]=oe,e[93]=ce):ce=e[93];let de;e[94]!==o?(de=o("automations.triggerCard.remove"),e[94]=o,e[95]=de):de=e[95];let I;e[96]!==H||e[97]!==de?(I=t.jsx(jt,{onClick:H,variant:"destructive",children:de}),e[96]=H,e[97]=de,e[98]=I):I=e[98];let z;e[99]!==ce||e[100]!==I?(z=t.jsxs(yt,{children:[ce,I]}),e[99]=ce,e[100]=I,e[101]=z):z=e[101];let Z;e[102]!==pe||e[103]!==z?(Z=t.jsxs(bt,{children:[pe,z]}),e[102]=pe,e[103]=z,e[104]=Z):Z=e[104];let A;e[105]!==x||e[106]!==Z?(A=t.jsx(vt,{open:x,onOpenChange:f,children:Z}),e[105]=x,e[106]=Z,e[107]=A):A=e[107];let xe;e[108]!==o?(xe=o("automations.triggerCard.rotateWebhookToken"),e[108]=o,e[109]=xe):xe=e[109];let Ce;e[110]!==xe?(Ce=t.jsx(pt,{children:xe}),e[110]=xe,e[111]=Ce):Ce=e[111];let Ne;e[112]!==o?(Ne=o("automations.triggerCard.rotateWebhookTokenDescription"),e[112]=o,e[113]=Ne):Ne=e[113];let Se;e[114]!==Ne?(Se=t.jsx(xt,{children:Ne}),e[114]=Ne,e[115]=Se):Se=e[115];let ke;e[116]!==Ce||e[117]!==Se?(ke=t.jsxs(gt,{children:[Ce,Se]}),e[116]=Ce,e[117]=Se,e[118]=ke):ke=e[118];let Te;e[119]!==o?(Te=o("automations.triggerCard.cancel"),e[119]=o,e[120]=Te):Te=e[120];let we;e[121]!==Te?(we=t.jsx(ht,{children:Te}),e[121]=Te,e[122]=we):we=e[122];let De;e[123]!==o?(De=o("automations.triggerCard.rotate"),e[123]=o,e[124]=De):De=e[124];let _e;e[125]!==O||e[126]!==De?(_e=t.jsx(jt,{onClick:O,children:De}),e[125]=O,e[126]=De,e[127]=_e):_e=e[127];let Ie;e[128]!==we||e[129]!==_e?(Ie=t.jsxs(yt,{children:[we,_e]}),e[128]=we,e[129]=_e,e[130]=Ie):Ie=e[130];let Pe;e[131]!==ke||e[132]!==Ie?(Pe=t.jsxs(bt,{children:[ke,Ie]}),e[131]=ke,e[132]=Ie,e[133]=Pe):Pe=e[133];let Ae;e[134]!==g||e[135]!==Pe?(Ae=t.jsx(vt,{open:g,onOpenChange:u,children:Pe}),e[134]=g,e[135]=Pe,e[136]=Ae):Ae=e[136];const Be=h!==null;let Ve;e[137]===Symbol.for("react.memo_cache_sentinel")?(Ve=L=>{L||p(null)},e[137]=Ve):Ve=e[137];const Ge=h?.url??null,He=h?.token??null;let $e;e[138]!==o?($e=o("automations.triggerCard.newWebhookToken"),e[138]=o,e[139]=$e):$e=e[139];let Oe;e[140]!==o?(Oe=o("automations.triggerCard.newWebhookTokenDescription"),e[140]=o,e[141]=Oe):Oe=e[141];let ze;e[142]!==Be||e[143]!==Ge||e[144]!==He||e[145]!==$e||e[146]!==Oe?(ze=t.jsx(Jt,{open:Be,onOpenChange:Ve,url:Ge,token:He,title:$e,description:Oe}),e[142]=Be,e[143]=Ge,e[144]=He,e[145]=$e,e[146]=Oe,e[147]=ze):ze=e[147];let Ue;return e[148]!==re||e[149]!==A||e[150]!==Ae||e[151]!==ze?(Ue=t.jsxs(t.Fragment,{children:[re,A,Ae,ze]}),e[148]=re,e[149]=A,e[150]=Ae,e[151]=ze,e[152]=Ue):Ue=e[152],Ue}function Eo(r){const[e,s]=r;return`${e}: ${s}`}function Ko(r){const e=q.c(10),{from:s}=r,n=ee();let a;e[0]!==s||e[1]!==n?(a=!s||s.kind==="any"?null:s.kind==="earlier"?n("automations.triggerCard.fromEarlier"):s.kind==="later"?n("automations.triggerCard.fromLater"):s.kind==="statuses"?n("automations.triggerCard.fromColumns",{columns:s.statuses.map(m=>We(m,n).label).join(", ")}):null,e[0]=s,e[1]=n,e[2]=a):a=e[2];const i=a;let c;e[3]!==n?(c=n("automations.triggerCard.unownedOnly"),e[3]=n,e[4]=c):c=e[4];let o;e[5]!==i||e[6]!==c?(o=[i,c].filter(Boolean),e[5]=i,e[6]=c,e[7]=o):o=e[7];const j=o.join(" · ");let d;return e[8]!==j?(d=t.jsx("span",{className:"text-xs text-muted-foreground/60 truncate",children:j}),e[8]=j,e[9]=d):d=e[9],d}function Fo(r){const e=q.c(6),{from:s}=r,n=ee();if(!s||s.kind==="any")return null;let a;e[0]!==s.kind||e[1]!==s.statuses||e[2]!==n?(a=s.kind==="earlier"?n("automations.triggerCard.fromEarlier"):s.kind==="later"?n("automations.triggerCard.fromLater"):s.kind==="statuses"?n("automations.triggerCard.fromColumns",{columns:s.statuses.join(", ")}):null,e[0]=s.kind,e[1]=s.statuses,e[2]=n,e[3]=a):a=e[3];let i;return e[4]!==a?(i=t.jsx("span",{className:"text-xs text-muted-foreground/60 truncate",children:a}),e[4]=a,e[5]=i):i=e[5],i}function Mo(r){const e=q.c(70),{automationId:s,onDone:n}=r,a=ee();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={binding:"TRIGGER"},e[0]=i):i=e[0];const c=dt(i),[o,j]=w.useState(),[d,m]=w.useState();let x;e[1]===Symbol.for("react.memo_cache_sentinel")?(x={},e[1]=x):x=e[1];const[f,g]=w.useState(x),{triggerAdd:u}=ve(),{data:h,isLoading:p}=Es(o);let l,y,v,N,S,b;if(e[2]!==u||e[3]!==s||e[4]!==o||e[5]!==d||e[6]!==p||e[7]!==n||e[8]!==f||e[9]!==a||e[10]!==c||e[11]!==h){const _=h?.find(U=>U.type===d);let k;e[18]!==u||e[19]!==s||e[20]!==o||e[21]!==d||e[22]!==n||e[23]!==f||e[24]!==a?(k=async()=>{if(!(!o||!d))try{await u.mutateAsync({automation_id:s,type:"event",event_type:d,connection_id:o,params:f}),Ke("automation_trigger_added",{automation_id:s,trigger_type:"event",connection_id:o,event_type:d}),X.success(a("automations.eventTriggerForm.successAdded")),n()}catch{X.error(a("automations.eventTriggerForm.errorFailed"))}},e[18]=u,e[19]=s,e[20]=o,e[21]=d,e[22]=n,e[23]=f,e[24]=a,e[25]=k):k=e[25],l=k,y="flex flex-col gap-3 px-3 py-3 surface";let P;e[26]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(ut,{size:14,className:"text-muted-foreground shrink-0"}),e[26]=P):P=e[26];let $;e[27]!==a?($=a("automations.eventTriggerForm.title"),e[27]=a,e[28]=$):$=e[28];let R;e[29]!==$?(R=t.jsx("span",{className:"text-sm font-medium",children:$}),e[29]=$,e[30]=R):R=e[30];let K;e[31]===Symbol.for("react.memo_cache_sentinel")?(K=t.jsx(mt,{size:13}),e[31]=K):K=e[31];let F;e[32]!==n?(F=t.jsx("button",{type:"button",className:"ml-auto shrink-0 p-0.5 text-muted-foreground hover:text-foreground rounded-lg",onClick:n,children:K}),e[32]=n,e[33]=F):F=e[33],e[34]!==R||e[35]!==F?(v=t.jsxs("div",{className:"flex items-center gap-2",children:[P,R,F]}),e[34]=R,e[35]=F,e[36]=v):v=e[36];const Q=o??"";let H;e[37]===Symbol.for("react.memo_cache_sentinel")?(H=U=>{j(U),m(void 0),g({})},e[37]=H):H=e[37];let W;e[38]!==a?(W=a("automations.eventTriggerForm.selectConnectionPlaceholder"),e[38]=a,e[39]=W):W=e[39];let G;e[40]!==W?(G=t.jsx(he,{className:"w-full",children:t.jsx(je,{placeholder:W})}),e[40]=W,e[41]=G):G=e[41];let J;e[42]!==a||e[43]!==c?(J=c.length===0?t.jsx("div",{className:"px-2 py-3 text-center text-xs text-muted-foreground",children:a("automations.eventTriggerForm.noConnectionsWithTrigger")}):c.map(Vo),e[42]=a,e[43]=c,e[44]=J):J=e[44];let V;e[45]!==J?(V=t.jsx(ye,{children:J}),e[45]=J,e[46]=V):V=e[46],e[47]!==Q||e[48]!==G||e[49]!==V?(N=t.jsxs(ge,{value:Q,onValueChange:H,children:[G,V]}),e[47]=Q,e[48]=G,e[49]=V,e[50]=N):N=e[50],e[51]!==o||e[52]!==d||e[53]!==p||e[54]!==a||e[55]!==h?(S=o&&t.jsxs(ge,{value:d??"",onValueChange:U=>{m(U),g({})},children:[t.jsx(he,{className:"w-full",children:p?t.jsxs("span",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx(Le,{className:"size-[13px]"}),a("automations.eventTriggerForm.loadingEvents")]}):t.jsx(je,{placeholder:a("automations.eventTriggerForm.selectEventTypePlaceholder"),children:d??a("automations.eventTriggerForm.selectEventTypePlaceholder")})}),t.jsx(ye,{children:h?.map(Lo)})]}),e[51]=o,e[52]=d,e[53]=p,e[54]=a,e[55]=h,e[56]=S):S=e[56],b=_?.paramsSchema&&Object.keys(_.paramsSchema).length>0&&t.jsx("div",{className:"flex flex-col gap-2",children:Object.entries(_.paramsSchema).map(U=>{const[O,ae]=U;return t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsxs("label",{className:"text-xs text-muted-foreground",children:[O,ae.description&&t.jsxs("span",{className:"text-muted-foreground/60",children:[" ","— ",ae.description]})]}),ae.enum?t.jsxs(ge,{value:f[O]??"",onValueChange:ne=>g(Y=>({...Y,[O]:ne})),children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{placeholder:a("automations.eventTriggerForm.selectParamPlaceholder",{key:O})})}),t.jsx(ye,{children:ae.enum.map(Ro)})]}):t.jsx("input",{type:"text",value:f[O]??"",onChange:ne=>g(Y=>({...Y,[O]:ne.target.value})),placeholder:ae.description??O,className:"text-sm border border-border rounded-md bg-background px-2 py-1.5 focus-ring"})]},O)})}),e[2]=u,e[3]=s,e[4]=o,e[5]=d,e[6]=p,e[7]=n,e[8]=f,e[9]=a,e[10]=c,e[11]=h,e[12]=l,e[13]=y,e[14]=v,e[15]=N,e[16]=S,e[17]=b}else l=e[12],y=e[13],v=e[14],N=e[15],S=e[16],b=e[17];let T;e[57]!==u||e[58]!==o||e[59]!==d||e[60]!==l||e[61]!==a?(T=o&&d&&t.jsx(B,{size:"sm",onClick:l,disabled:u.isPending,children:u.isPending?t.jsx(Le,{className:"size-[13px]"}):a("automations.eventTriggerForm.addTriggerButton")}),e[57]=u,e[58]=o,e[59]=d,e[60]=l,e[61]=a,e[62]=T):T=e[62];let D;return e[63]!==y||e[64]!==v||e[65]!==N||e[66]!==S||e[67]!==b||e[68]!==T?(D=t.jsxs("div",{className:y,children:[v,N,S,b,T]}),e[63]=y,e[64]=v,e[65]=N,e[66]=S,e[67]=b,e[68]=T,e[69]=D):D=e[69],D}function Ro(r){return t.jsx(be,{value:r,children:r},r)}function Lo(r){return t.jsx(be,{value:r.type,children:t.jsxs("div",{className:"flex flex-col",children:[t.jsx("span",{children:r.type}),t.jsx("span",{className:"text-xs text-muted-foreground",children:r.description})]})},r.type)}function Vo(r){return t.jsx(be,{value:r.id,children:r.title},r.id)}const Uo=30;function Wo(r,e){switch(e.type){case"accumulate":{const s=r??{start:e.now,fields:new Set,saveCount:0},n=new Set(s.fields);for(const a of e.fields)n.add(a);return{...s,fields:n,saveCount:s.saveCount+1}}case"reset":return null}}function Bo({automationId:r,automation:e,onBack:s,onDelete:n}){const a=ee(),i=e.virtual_mcp_id,{org:c}=$t(),{update:o,triggerAdd:j,run:d}=ve(),m=dt(),x=new Map(m.map(C=>[C.id,C.title])),{openTask:f}=Fs(),{openSidePanel:g}=Js(),{sendMessage:u}=Ms(),h=e.messages?.[0]?.metadata?.tiptapDoc??void 0,[p,l]=w.useState(h),[y,v]=w.useState(!1),[N,S]=w.useState(!1),[b,T]=w.useState(!1),[D,_]=w.useState(""),[k,P]=w.useState(!1),[$,R]=w.useState(null),[K,F]=w.useState(!1),[Q,H]=w.useState(!1),[W,G]=w.useState(!1),J=async()=>{if(K)return;const M=Rs(p).filter(E=>E.type==="text").map(E=>E.text).join(`
20
- `);if(M.trim()){F(!0);try{se(),Ke("automation_improve_clicked",{automation_id:r,agent_id:i,instructions_length:M.length}),g(),await u({tiptapDoc:zs({managerAgentId:cs.AUTOMATION_MANAGER(c.id),managerName:"Automation Manager",kind:"automation",id:r,instructions:M})})}finally{F(!1)}}},V=e.models?.tier??"smart",U=e.models?.modelId&&e.models?.credentialId?{modelId:e.models.modelId,credentialId:e.models.credentialId,title:e.models.modelTitle??e.models.modelId}:null,O=ls({defaultValues:{name:e.name,active:e.active,tier:V,modelOverride:U,tools:e.tools??null,maxAgentSteps:e.maxAgentSteps??null}}),ae=O.watch("active"),[ne,Y]=w.useReducer(Wo,null),ie=()=>{ne!==null&&(Ke("automation_updated",{automation_id:r,agent_id:i,fields:Array.from(ne.fields),save_count:ne.saveCount,edit_duration_ms:Date.now()-ne.start}),Y({type:"reset"}))},ue=async()=>{const C=O.control._formState.dirtyFields,M=Object.keys(C);if(M.length===0&&!W)return!0;const E=O.getValues(),pe=O.control._defaultValues;O.reset(E,{keepValues:!0});const oe=W;G(!1);const ce={tier:E.tier,...E.modelOverride?{modelId:E.modelOverride.modelId,credentialId:E.modelOverride.credentialId,modelTitle:E.modelOverride.title}:{}},de={id:r,name:E.name,active:E.active,models:ce,tools:E.tools,maxAgentSteps:E.maxAgentSteps,messages:Ls(p),temperature:0};try{await o.mutateAsync(de)}catch{return O.reset(pe,{keepValues:!0}),oe&&G(!0),!1}const I=[...M];return oe&&I.push("messages"),Y({type:"accumulate",now:Date.now(),fields:I}),fe(),!0},{schedule:me,flush:te}=Dt({save:ue}),{schedule:fe,flush:se}=Dt({delayMs:3e4,save:async()=>ie()});w.useEffect(()=>{const C=O.watch(()=>me());return()=>C.unsubscribe()},[]);const re=C=>{if(l(C),!Q){H(!0);return}G(!0),me()},le=async()=>{Ke("automation_test_clicked",{automation_id:r,agent_id:i});const C=await te();if(se(),!!C){if(!p){X.error(a("automations.automationDetail.noInstructionsConfigured"));return}try{const M=await d.mutateAsync(r);M.threadId&&(g(),f(M.threadId))}catch{}}};return t.jsxs(t.Fragment,{children:[s&&t.jsx("div",{className:"flex items-center pb-4 shrink-0",children:t.jsxs(B,{variant:"ghost",size:"sm",onClick:s,children:[t.jsx(Vt,{size:14}),a("automations.automationDetail.backToList")]})}),t.jsxs("div",{className:"flex flex-col gap-8",children:[t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsxs("div",{className:"flex items-center justify-between gap-4",children:[t.jsx(Ct,{control:O.control,name:"name",render:({field:C})=>t.jsx(Nt,{...C,placeholder:a("automations.automationDetail.automationNamePlaceholder"),className:"border border-transparent shadow-none px-0 text-lg font-medium h-auto focus-visible:ring-0 focus-visible:border-border bg-transparent flex-1",style:{boxShadow:"none"}})}),n&&t.jsx(B,{variant:"ghost-destructive",size:"icon",className:"shrink-0",onClick:n,children:t.jsx(Qs,{size:14})})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Ct,{control:O.control,name:"active",render:({field:C})=>t.jsx(ct,{checked:C.value,onCheckedChange:M=>{C.onChange(M),te()},className:"cursor-pointer"})}),t.jsx("span",{className:"text-sm text-muted-foreground",children:a(ae?"automations.automationDetail.active":"automations.automationDetail.inactive")}),t.jsx("span",{className:"text-muted-foreground/50 text-sm",children:"·"}),t.jsx(Os,{id:e.created_by,size:"2xs",className:"text-sm text-muted-foreground"})]})]}),t.jsxs("div",{className:"flex flex-col gap-2.5",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:a("automations.automationDetail.starter")}),t.jsx(Oo,{automationId:r,open:y,onOpenChange:v,onCustomSelect:()=>{T(!0),P(!1),_("")},onEventSelect:()=>{P(!0),T(!1)},onWebhookCreated:C=>{Ke("automation_trigger_added",{automation_id:r,trigger_type:"webhook"}),R(C)}})]}),e.triggers.length===0&&!b?t.jsx("div",{className:"rounded-lg border border-dashed border-border px-4 py-6 text-center",children:t.jsxs("p",{className:"text-sm text-muted-foreground",children:[a("automations.automationDetail.whenShouldRun")," ",t.jsx("button",{type:"button",className:"text-foreground underline underline-offset-2 cursor-pointer hover:text-foreground/80 transition-colors",onClick:()=>v(!0),children:a("automations.automationDetail.addStarter")})," ",a("automations.automationDetail.toGetGoing")]})}):t.jsx("div",{className:"flex flex-col gap-2",children:e.triggers.map(C=>t.jsx(Xt,{trigger:C,automationId:r,connectionName:C.connection_id?x.get(C.connection_id):void 0},C.id))}),b&&t.jsxs("div",{className:"flex items-center gap-2.5 px-3 py-2.5 rounded-lg border border-border bg-background group",children:[t.jsx(Me,{size:14,className:"text-muted-foreground shrink-0"}),t.jsx("input",{type:"text",value:D,onChange:C=>_(C.target.value),onBlur:async()=>{const C=D.trim();if(!(!C||!Re(C)))try{await j.mutateAsync({automation_id:r,type:"cron",cron_expression:C}),Ke("automation_trigger_added",{automation_id:r,trigger_type:"cron"}),X.success(a("automations.automationDetail.starterAdded")),T(!1),_("")}catch{X.error(a("automations.automationDetail.failedToAddStarter"))}},onKeyDown:async C=>{const M=D.trim();C.key==="Enter"&&M&&Re(M)&&C.target.blur(),C.key==="Escape"&&(T(!1),_(""))},placeholder:"0 9 * * 1-5",className:"flex-1 text-sm font-mono bg-transparent outline-none placeholder:text-muted-foreground/40",autoFocus:!0}),D&&!Re(D)&&t.jsx("span",{className:"text-xs text-muted-foreground/60 shrink-0",children:a("automations.automationDetail.invalid")}),j.isPending&&t.jsx(Le,{className:"size-[13px] text-muted-foreground shrink-0"}),t.jsx("button",{type:"button",className:"shrink-0 p-0.5 text-muted-foreground opacity-0 group-hover:opacity-100 hover:text-foreground transition-opacity rounded-lg",onClick:()=>{T(!1),_("")},children:t.jsx(mt,{size:13})})]}),k&&t.jsx(w.Suspense,{fallback:t.jsxs("div",{className:"flex items-center gap-2 px-3 py-3 rounded-lg border border-border bg-background",children:[t.jsx(Le,{className:"size-[13px] text-muted-foreground"}),t.jsx("span",{className:"text-sm text-muted-foreground",children:a("automations.automationDetail.loadingConnections")})]}),children:t.jsx(Mo,{automationId:r,onDone:()=>P(!1)})}),t.jsx(Jt,{open:$!==null,onOpenChange:C=>{C||R(null)},url:$?.url??null,token:$?.token??null})]}),t.jsxs("div",{className:"flex flex-col gap-2.5",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:a("automations.automationDetail.instructions")}),t.jsxs(B,{variant:"outline",size:"sm",className:"gap-1.5",disabled:K||!p,onClick:J,children:[t.jsx(Et,{size:13}),a("automations.automationDetail.improve")]})]}),t.jsx(Ys,{tiptapDoc:p,setTiptapDoc:re,placeholder:a("automations.automationDetail.instructionsPlaceholder"),children:t.jsxs("div",{className:"rounded-xl border border-border min-h-[120px] flex flex-col",children:[t.jsx(Zs,{virtualMcpId:i||null,className:"max-h-[45vh]"}),t.jsx("div",{className:"@container/chat-bottom flex items-center justify-end gap-1.5 p-2.5",children:t.jsxs(Bs,{children:[t.jsx(Gs,{asChild:!0,children:t.jsxs(B,{type:"button",variant:"default",className:"gap-1.5",onClick:le,disabled:!i,children:[t.jsx(Xs,{size:16}),a("automations.automationDetail.test")]})}),t.jsx(Hs,{children:a("automations.automationDetail.testAutomation")})]})})]})})]}),t.jsxs(Vs,{open:N,onOpenChange:S,className:"flex flex-col gap-2.5",children:[t.jsxs(Us,{className:"group flex w-fit cursor-pointer items-center gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:a("automations.automationDetail.advanced")}),t.jsx(rt,{size:14,className:"text-muted-foreground/60 transition-transform group-data-[state=open]:rotate-180"})]}),t.jsxs(Ws,{className:"flex flex-col gap-5 pt-0.5",children:[t.jsx(fo,{tier:O.watch("tier"),onTierChange:C=>O.setValue("tier",C,{shouldDirty:!0}),override:O.watch("modelOverride"),onOverrideChange:C=>O.setValue("modelOverride",C,{shouldDirty:!0})}),t.jsx(ho,{agentId:i||null,value:O.watch("tools"),onChange:C=>O.setValue("tools",C,{shouldDirty:!0})}),t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:a("automations.automationDetail.maxSteps")}),t.jsx(Nt,{type:"number",min:1,max:100,className:"w-40",placeholder:a("automations.automationDetail.maxStepsPlaceholder",{default:Uo}),value:O.watch("maxAgentSteps")??"",onChange:C=>{const M=C.target.value.trim(),E=M===""?null:Number(M);O.setValue("maxAgentSteps",E===null||Number.isNaN(E)?null:E,{shouldDirty:!0})}})]})]})]})]})]})}function Go(r){const e=q.c(55),{automation:s}=r,n=ee(),{update:a}=ve();let i;e[0]!==s.name?(i=t.jsx("h2",{className:"text-lg font-medium text-foreground",children:s.name}),e[0]=s.name,e[1]=i):i=e[1];let c;e[2]!==n?(c=n("automations.builtin.badge"),e[2]=n,e[3]=c):c=e[3];let o;e[4]!==c?(o=t.jsx(Kt,{variant:"muted",children:c}),e[4]=c,e[5]=o):o=e[5];let j;e[6]!==i||e[7]!==o?(j=t.jsxs("div",{className:"flex items-center gap-2",children:[i,o]}),e[6]=i,e[7]=o,e[8]=j):j=e[8];let d;e[9]!==s.id||e[10]!==a?(d=_=>a.mutate({id:s.id,active:_}),e[9]=s.id,e[10]=a,e[11]=d):d=e[11];let m;e[12]!==s.active||e[13]!==d||e[14]!==a.isPending?(m=t.jsx(ct,{checked:s.active,disabled:a.isPending,onCheckedChange:d,className:"cursor-pointer"}),e[12]=s.active,e[13]=d,e[14]=a.isPending,e[15]=m):m=e[15];let x;e[16]!==s.active||e[17]!==n?(x=s.active?n("automations.automationDetail.active"):n("automations.automationDetail.inactive"),e[16]=s.active,e[17]=n,e[18]=x):x=e[18];let f;e[19]!==x?(f=t.jsx("span",{className:"text-sm text-muted-foreground",children:x}),e[19]=x,e[20]=f):f=e[20];let g;e[21]!==m||e[22]!==f?(g=t.jsxs("div",{className:"flex items-center gap-2",children:[m,f]}),e[21]=m,e[22]=f,e[23]=g):g=e[23];let u;e[24]!==j||e[25]!==g?(u=t.jsxs("div",{className:"flex flex-col gap-1.5",children:[j,g]}),e[24]=j,e[25]=g,e[26]=u):u=e[26];let h;e[27]!==n?(h=n("automations.automationDetail.starter"),e[27]=n,e[28]=h):h=e[28];let p;e[29]!==h?(p=t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:h}),e[29]=h,e[30]=p):p=e[30];let l;if(e[31]!==s.id||e[32]!==s.triggers){let _;e[34]!==s.id?(_=k=>t.jsx(Xt,{trigger:k,automationId:s.id,readOnly:!0},k.id),e[34]=s.id,e[35]=_):_=e[35],l=s.triggers.map(_),e[31]=s.id,e[32]=s.triggers,e[33]=l}else l=e[33];let y;e[36]!==p||e[37]!==l?(y=t.jsxs("div",{className:"flex flex-col gap-2.5",children:[p,l]}),e[36]=p,e[37]=l,e[38]=y):y=e[38];let v;e[39]!==n?(v=n("automations.automationDetail.instructions"),e[39]=n,e[40]=v):v=e[40];let N;e[41]!==v?(N=t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:v}),e[41]=v,e[42]=N):N=e[42];let S;e[43]!==s.system_key||e[44]!==n?(S=s.system_key==="implementer"?n("automations.builtin.implementerDescription"):s.system_key==="reviewer"?n("automations.builtin.reviewerDescription"):s.system_key==="linked_chats"?n("automations.builtin.linkedChatsDescription"):s.system_key==="pr_merged"?n("automations.builtin.prMergedDescription"):s.system_key==="chat_pr"?n("automations.builtin.chatPrDescription"):n("automations.builtin.description"),e[43]=s.system_key,e[44]=n,e[45]=S):S=e[45];let b;e[46]!==S?(b=t.jsx("p",{className:"text-sm text-muted-foreground",children:S}),e[46]=S,e[47]=b):b=e[47];let T;e[48]!==N||e[49]!==b?(T=t.jsxs("div",{className:"flex flex-col gap-2.5",children:[N,b]}),e[48]=N,e[49]=b,e[50]=T):T=e[50];let D;return e[51]!==u||e[52]!==y||e[53]!==T?(D=t.jsxs("div",{className:"flex flex-col gap-8",children:[u,y,T]}),e[51]=u,e[52]=y,e[53]=T,e[54]=D):D=e[54],D}const Qt=[{key:"24h",labelKey:"mainPanelTabs.automationTab.last24hours",ms:1440*60*1e3},{key:"7d",labelKey:"mainPanelTabs.automationTab.last7days",ms:10080*60*1e3},{key:"30d",labelKey:"mainPanelTabs.automationTab.last30days",ms:720*60*60*1e3}];function Yt(r){const e=Qt.find(n=>n.key===r).ms,s=Date.now();return{startDate:new Date(s-e).toISOString(),endDate:new Date(s).toISOString()}}function Ho(r){const e=q.c(16),{automationId:s,triggerIds:n}=r,a=ee(),[i,c]=w.useState("30d"),[o,j]=w.useState(Jo);let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=p=>{const l=p;c(l),j(Yt(l))},e[0]=d):d=e[0];let m;e[1]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(he,{className:"w-44",children:t.jsx(je,{})}),e[1]=m):m=e[1];let x;e[2]!==a?(x=Qt.map(p=>t.jsx(be,{value:p.key,children:a(p.labelKey)},p.key)),e[2]=a,e[3]=x):x=e[3];let f;e[4]!==x?(f=t.jsx(ye,{children:x}),e[4]=x,e[5]=f):f=e[5];let g;e[6]!==f||e[7]!==i?(g=t.jsx("div",{className:"flex items-center justify-end",children:t.jsxs(ge,{value:i,onValueChange:d,children:[m,f]})}),e[6]=f,e[7]=i,e[8]=g):g=e[8];let u;e[9]!==s||e[10]!==o||e[11]!==n?(u=t.jsx(ro,{automationId:s,triggerIds:n,range:o}),e[9]=s,e[10]=o,e[11]=n,e[12]=u):u=e[12];let h;return e[13]!==g||e[14]!==u?(h=t.jsxs("div",{className:"flex flex-col gap-5",children:[g,u]}),e[13]=g,e[14]=u,e[15]=h):h=e[15],h}function Jo(){return Yt("30d")}function Xo(r){const e=q.c(5),{tabId:s}=r;let n;e[0]!==s?(n=ds(s),e[0]=s,e[1]=n):n=e[1];const a=n;if(!a)return null;let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Ze,{}),e[2]=i):i=e[2];let c;return e[3]!==a.id?(c=t.jsx(w.Suspense,{fallback:i,children:t.jsx(Qo,{id:a.id})}),e[3]=a.id,e[4]=c):c=e[4],c}function Qo(r){const e=q.c(41),{id:s}=r,n=ee(),{openPanel:a}=co(),{data:i,isLoading:c}=Ks(s),[o,j]=w.useState("settings");let d;e[0]!==a?(d=()=>a("automations"),e[0]=a,e[1]=d):d=e[1];const m=d;if(c){let k;return e[2]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(Ze,{}),e[2]=k):k=e[2],k}if(!i){let k;e[3]!==n?(k=n("mainPanelTabs.automationTab.automationNotFound"),e[3]=n,e[4]=k):k=e[4];let P;return e[5]!==k?(P=t.jsx("div",{className:"flex h-full w-full items-center justify-center text-sm text-muted-foreground",children:k}),e[5]=k,e[6]=P):P=e[6],P}let x;e[7]!==i.triggers?(x=i.triggers.map(Yo),e[7]=i.triggers,e[8]=x):x=e[8];const f=x;let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(Vt,{size:14}),e[9]=g):g=e[9];let u;e[10]!==n?(u=n("mainPanelTabs.automationTab.backToList"),e[10]=n,e[11]=u):u=e[11];let h;e[12]!==m||e[13]!==u?(h=t.jsxs(B,{variant:"ghost",size:"sm",onClick:m,children:[g,u]}),e[12]=m,e[13]=u,e[14]=h):h=e[14];let p;e[15]!==n?(p=n("mainPanelTabs.automationTab.settings"),e[15]=n,e[16]=p):p=e[16];let l;e[17]!==p?(l={id:"settings",label:p},e[17]=p,e[18]=l):l=e[18];let y;e[19]!==n?(y=n("mainPanelTabs.automationTab.runs"),e[19]=n,e[20]=y):y=e[20];let v;e[21]!==y?(v={id:"runs",label:y},e[21]=y,e[22]=v):v=e[22];let N;e[23]!==l||e[24]!==v?(N=[l,v],e[23]=l,e[24]=v,e[25]=N):N=e[25];let S;e[26]===Symbol.for("react.memo_cache_sentinel")?(S=k=>j(k),e[26]=S):S=e[26];let b;e[27]!==N||e[28]!==o?(b=t.jsx(lo,{placement:"page",tabs:N,activeTab:o,onTabChange:S}),e[27]=N,e[28]=o,e[29]=b):b=e[29];let T;e[30]!==b||e[31]!==h?(T=t.jsxs("div",{className:"flex items-center justify-between pb-4 shrink-0",children:[h,b]}),e[30]=b,e[31]=h,e[32]=T):T=e[32];let D;e[33]!==i||e[34]!==s||e[35]!==o||e[36]!==f?(D=o==="settings"?i.system_key?t.jsx(Go,{automation:i}):t.jsx(Bo,{automationId:s,automation:i}):t.jsx(w.Suspense,{fallback:t.jsx(Ze,{}),children:t.jsx(Ho,{automationId:s,triggerIds:f})}),e[33]=i,e[34]=s,e[35]=o,e[36]=f,e[37]=D):D=e[37];let _;return e[38]!==T||e[39]!==D?(_=t.jsx(Xe,{children:t.jsx(Xe.Content,{children:t.jsxs(Xe.Container,{children:[T,D]})})}),e[38]=T,e[39]=D,e[40]=_):_=e[40],_}function Yo(r){return r.id}function Zo(){const r=q.c(3);let e;r[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},r[0]=e):e=r[0];const{automationId:s}=ms(e);let n;return r[1]!==s?(n=s?t.jsx(Xo,{tabId:`automation:${s}`}):null,r[1]=s,r[2]=n):n=r[2],n}function bi(){const r=q.c(1);let e;return r[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(us.Content,{children:t.jsx(Zo,{})}),r[0]=e):e=r[0],e}export{bi as default};
20
+ `);if(M.trim()){F(!0);try{se(),Ke("automation_improve_clicked",{automation_id:r,agent_id:i,instructions_length:M.length}),g(),await u({tiptapDoc:zs({managerAgentId:cs.AUTOMATION_MANAGER(c.id),managerName:"Automation Manager",kind:"automation",id:r,instructions:M})})}finally{F(!1)}}},V=e.models?.tier??"smart",U=e.models?.modelId&&e.models?.credentialId?{modelId:e.models.modelId,credentialId:e.models.credentialId,title:e.models.modelTitle??e.models.modelId}:null,O=ls({defaultValues:{name:e.name,active:e.active,tier:V,modelOverride:U,tools:e.tools??null,maxAgentSteps:e.maxAgentSteps??null}}),ae=O.watch("active"),[ne,Y]=w.useReducer(Wo,null),ie=()=>{ne!==null&&(Ke("automation_updated",{automation_id:r,agent_id:i,fields:Array.from(ne.fields),save_count:ne.saveCount,edit_duration_ms:Date.now()-ne.start}),Y({type:"reset"}))},ue=async()=>{const C=O.control._formState.dirtyFields,M=Object.keys(C);if(M.length===0&&!W)return!0;const E=O.getValues(),pe=O.control._defaultValues;O.reset(E,{keepValues:!0});const oe=W;G(!1);const ce={tier:E.tier,...E.modelOverride?{modelId:E.modelOverride.modelId,credentialId:E.modelOverride.credentialId,modelTitle:E.modelOverride.title}:{}},de={id:r,name:E.name,active:E.active,models:ce,tools:E.tools,maxAgentSteps:E.maxAgentSteps,messages:Ls(p),temperature:0};try{await o.mutateAsync(de)}catch{return O.reset(pe,{keepValues:!0}),oe&&G(!0),!1}const I=[...M];return oe&&I.push("messages"),Y({type:"accumulate",now:Date.now(),fields:I}),fe(),!0},{schedule:me,flush:te}=Dt({save:ue}),{schedule:fe,flush:se}=Dt({delayMs:3e4,save:async()=>ie()});w.useEffect(()=>{const C=O.watch(()=>me());return()=>C.unsubscribe()},[]);const re=C=>{if(l(C),!Q){H(!0);return}G(!0),me()},le=async()=>{Ke("automation_test_clicked",{automation_id:r,agent_id:i});const C=await te();if(se(),!!C){if(!p){X.error(a("automations.automationDetail.noInstructionsConfigured"));return}try{const M=await d.mutateAsync(r);M.threadId&&(g(),f(M.threadId))}catch{}}};return t.jsxs(t.Fragment,{children:[s&&t.jsx("div",{className:"flex items-center pb-4 shrink-0",children:t.jsxs(B,{variant:"ghost",size:"sm",onClick:s,children:[t.jsx(Vt,{size:14}),a("automations.automationDetail.backToList")]})}),t.jsxs("div",{className:"flex flex-col gap-8",children:[t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsxs("div",{className:"flex items-center justify-between gap-4",children:[t.jsx(Ct,{control:O.control,name:"name",render:({field:C})=>t.jsx(Nt,{...C,placeholder:a("automations.automationDetail.automationNamePlaceholder"),className:"border border-transparent shadow-none px-0 text-lg font-medium h-auto focus-visible:ring-0 focus-visible:border-border bg-transparent flex-1",style:{boxShadow:"none"}})}),n&&t.jsx(B,{variant:"ghost-destructive",size:"icon",className:"shrink-0",onClick:n,children:t.jsx(Qs,{size:14})})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Ct,{control:O.control,name:"active",render:({field:C})=>t.jsx(ct,{checked:C.value,onCheckedChange:M=>{C.onChange(M),te()},className:"cursor-pointer"})}),t.jsx("span",{className:"text-sm text-muted-foreground",children:a(ae?"automations.automationDetail.active":"automations.automationDetail.inactive")}),t.jsx("span",{className:"text-muted-foreground/50 text-sm",children:"·"}),t.jsx(Os,{id:e.created_by,size:"2xs",className:"text-sm text-muted-foreground"})]})]}),t.jsxs("div",{className:"flex flex-col gap-2.5",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:a("automations.automationDetail.starter")}),t.jsx(Oo,{automationId:r,open:y,onOpenChange:v,onCustomSelect:()=>{T(!0),P(!1),_("")},onEventSelect:()=>{P(!0),T(!1)},onWebhookCreated:C=>{Ke("automation_trigger_added",{automation_id:r,trigger_type:"webhook"}),R(C)}})]}),e.triggers.length===0&&!b?t.jsx("div",{className:"rounded-lg border border-dashed border-border px-4 py-6 text-center",children:t.jsxs("p",{className:"text-sm text-muted-foreground",children:[a("automations.automationDetail.whenShouldRun")," ",t.jsx("button",{type:"button",className:"text-foreground underline underline-offset-2 cursor-pointer hover:text-foreground/80 transition-colors",onClick:()=>v(!0),children:a("automations.automationDetail.addStarter")})," ",a("automations.automationDetail.toGetGoing")]})}):t.jsx("div",{className:"flex flex-col gap-2",children:e.triggers.map(C=>t.jsx(Xt,{trigger:C,automationId:r,connectionName:C.connection_id?x.get(C.connection_id):void 0},C.id))}),b&&t.jsxs("div",{className:"flex items-center gap-2.5 px-3 py-2.5 rounded-lg border border-border bg-background group",children:[t.jsx(Me,{size:14,className:"text-muted-foreground shrink-0"}),t.jsx("input",{type:"text",value:D,onChange:C=>_(C.target.value),onBlur:async()=>{const C=D.trim();if(!(!C||!Re(C)))try{await j.mutateAsync({automation_id:r,type:"cron",cron_expression:C}),Ke("automation_trigger_added",{automation_id:r,trigger_type:"cron"}),X.success(a("automations.automationDetail.starterAdded")),T(!1),_("")}catch{X.error(a("automations.automationDetail.failedToAddStarter"))}},onKeyDown:async C=>{const M=D.trim();C.key==="Enter"&&M&&Re(M)&&C.target.blur(),C.key==="Escape"&&(T(!1),_(""))},placeholder:"0 9 * * 1-5",className:"flex-1 text-sm font-mono bg-transparent outline-none placeholder:text-muted-foreground/40",autoFocus:!0}),D&&!Re(D)&&t.jsx("span",{className:"text-xs text-muted-foreground/60 shrink-0",children:a("automations.automationDetail.invalid")}),j.isPending&&t.jsx(Le,{className:"size-[13px] text-muted-foreground shrink-0"}),t.jsx("button",{type:"button",className:"shrink-0 p-0.5 text-muted-foreground opacity-0 group-hover:opacity-100 hover:text-foreground transition-opacity rounded-lg",onClick:()=>{T(!1),_("")},children:t.jsx(mt,{size:13})})]}),k&&t.jsx(w.Suspense,{fallback:t.jsxs("div",{className:"flex items-center gap-2 px-3 py-3 rounded-lg border border-border bg-background",children:[t.jsx(Le,{className:"size-[13px] text-muted-foreground"}),t.jsx("span",{className:"text-sm text-muted-foreground",children:a("automations.automationDetail.loadingConnections")})]}),children:t.jsx(Mo,{automationId:r,onDone:()=>P(!1)})}),t.jsx(Jt,{open:$!==null,onOpenChange:C=>{C||R(null)},url:$?.url??null,token:$?.token??null})]}),t.jsxs("div",{className:"flex flex-col gap-2.5",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:a("automations.automationDetail.instructions")}),t.jsxs(B,{variant:"outline",size:"sm",className:"gap-1.5",disabled:K||!p,onClick:J,children:[t.jsx(Et,{size:13}),a("automations.automationDetail.improve")]})]}),t.jsx(Ys,{tiptapDoc:p,setTiptapDoc:re,placeholder:a("automations.automationDetail.instructionsPlaceholder"),children:t.jsxs("div",{className:"rounded-xl border border-border min-h-[120px] flex flex-col",children:[t.jsx(Zs,{virtualMcpId:i||null,className:"max-h-[45vh]"}),t.jsx("div",{className:"@container/chat-bottom flex items-center justify-end gap-1.5 p-2.5",children:t.jsxs(Bs,{children:[t.jsx(Gs,{asChild:!0,children:t.jsxs(B,{type:"button",variant:"default",className:"gap-1.5",onClick:le,disabled:!i,children:[t.jsx(Xs,{size:16}),a("automations.automationDetail.test")]})}),t.jsx(Hs,{children:a("automations.automationDetail.testAutomation")})]})})]})})]}),t.jsxs(Vs,{open:N,onOpenChange:S,className:"flex flex-col gap-2.5",children:[t.jsxs(Us,{className:"group flex w-fit cursor-pointer items-center gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:a("automations.automationDetail.advanced")}),t.jsx(rt,{size:14,className:"text-muted-foreground/60 transition-transform group-data-[state=open]:rotate-180"})]}),t.jsxs(Ws,{className:"flex flex-col gap-5 pt-0.5",children:[t.jsx(fo,{tier:O.watch("tier"),onTierChange:C=>O.setValue("tier",C,{shouldDirty:!0}),override:O.watch("modelOverride"),onOverrideChange:C=>O.setValue("modelOverride",C,{shouldDirty:!0})}),t.jsx(ho,{agentId:i||null,value:O.watch("tools"),onChange:C=>O.setValue("tools",C,{shouldDirty:!0})}),t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:a("automations.automationDetail.maxSteps")}),t.jsx(Nt,{type:"number",min:1,max:100,className:"w-40",placeholder:a("automations.automationDetail.maxStepsPlaceholder",{default:Uo}),value:O.watch("maxAgentSteps")??"",onChange:C=>{const M=C.target.value.trim(),E=M===""?null:Number(M);O.setValue("maxAgentSteps",E===null||Number.isNaN(E)?null:E,{shouldDirty:!0})}})]})]})]})]})]})}function Go(r){const e=q.c(55),{automation:s}=r,n=ee(),{update:a}=ve();let i;e[0]!==s.name?(i=t.jsx("h2",{className:"text-lg font-medium text-foreground",children:s.name}),e[0]=s.name,e[1]=i):i=e[1];let c;e[2]!==n?(c=n("automations.builtin.badge"),e[2]=n,e[3]=c):c=e[3];let o;e[4]!==c?(o=t.jsx(Kt,{variant:"muted",children:c}),e[4]=c,e[5]=o):o=e[5];let j;e[6]!==i||e[7]!==o?(j=t.jsxs("div",{className:"flex items-center gap-2",children:[i,o]}),e[6]=i,e[7]=o,e[8]=j):j=e[8];let d;e[9]!==s.id||e[10]!==a?(d=_=>a.mutate({id:s.id,active:_}),e[9]=s.id,e[10]=a,e[11]=d):d=e[11];let m;e[12]!==s.active||e[13]!==d||e[14]!==a.isPending?(m=t.jsx(ct,{checked:s.active,disabled:a.isPending,onCheckedChange:d,className:"cursor-pointer"}),e[12]=s.active,e[13]=d,e[14]=a.isPending,e[15]=m):m=e[15];let x;e[16]!==s.active||e[17]!==n?(x=s.active?n("automations.automationDetail.active"):n("automations.automationDetail.inactive"),e[16]=s.active,e[17]=n,e[18]=x):x=e[18];let f;e[19]!==x?(f=t.jsx("span",{className:"text-sm text-muted-foreground",children:x}),e[19]=x,e[20]=f):f=e[20];let g;e[21]!==m||e[22]!==f?(g=t.jsxs("div",{className:"flex items-center gap-2",children:[m,f]}),e[21]=m,e[22]=f,e[23]=g):g=e[23];let u;e[24]!==j||e[25]!==g?(u=t.jsxs("div",{className:"flex flex-col gap-1.5",children:[j,g]}),e[24]=j,e[25]=g,e[26]=u):u=e[26];let h;e[27]!==n?(h=n("automations.automationDetail.starter"),e[27]=n,e[28]=h):h=e[28];let p;e[29]!==h?(p=t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:h}),e[29]=h,e[30]=p):p=e[30];let l;if(e[31]!==s.id||e[32]!==s.triggers){let _;e[34]!==s.id?(_=k=>t.jsx(Xt,{trigger:k,automationId:s.id,readOnly:!0},k.id),e[34]=s.id,e[35]=_):_=e[35],l=s.triggers.map(_),e[31]=s.id,e[32]=s.triggers,e[33]=l}else l=e[33];let y;e[36]!==p||e[37]!==l?(y=t.jsxs("div",{className:"flex flex-col gap-2.5",children:[p,l]}),e[36]=p,e[37]=l,e[38]=y):y=e[38];let v;e[39]!==n?(v=n("automations.automationDetail.instructions"),e[39]=n,e[40]=v):v=e[40];let N;e[41]!==v?(N=t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:v}),e[41]=v,e[42]=N):N=e[42];let S;e[43]!==s.system_key||e[44]!==n?(S=s.system_key==="implementer"?n("automations.builtin.implementerDescription"):s.system_key==="reviewer"?n("automations.builtin.reviewerDescription"):s.system_key==="linked_chats"?n("automations.builtin.linkedChatsDescription"):s.system_key==="pr_merged"?n("automations.builtin.prMergedDescription"):s.system_key==="chat_pr"?n("automations.builtin.chatPrDescription"):n("automations.builtin.description"),e[43]=s.system_key,e[44]=n,e[45]=S):S=e[45];let b;e[46]!==S?(b=t.jsx("p",{className:"text-sm text-muted-foreground",children:S}),e[46]=S,e[47]=b):b=e[47];let T;e[48]!==N||e[49]!==b?(T=t.jsxs("div",{className:"flex flex-col gap-2.5",children:[N,b]}),e[48]=N,e[49]=b,e[50]=T):T=e[50];let D;return e[51]!==u||e[52]!==y||e[53]!==T?(D=t.jsxs("div",{className:"flex flex-col gap-8",children:[u,y,T]}),e[51]=u,e[52]=y,e[53]=T,e[54]=D):D=e[54],D}const Qt=[{key:"24h",labelKey:"mainPanelTabs.automationTab.last24hours",ms:1440*60*1e3},{key:"7d",labelKey:"mainPanelTabs.automationTab.last7days",ms:10080*60*1e3},{key:"30d",labelKey:"mainPanelTabs.automationTab.last30days",ms:720*60*60*1e3}];function Yt(r){const e=Qt.find(n=>n.key===r).ms,s=Date.now();return{startDate:new Date(s-e).toISOString(),endDate:new Date(s).toISOString()}}function Ho(r){const e=q.c(16),{automationId:s,triggerIds:n}=r,a=ee(),[i,c]=w.useState("30d"),[o,j]=w.useState(Jo);let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=p=>{const l=p;c(l),j(Yt(l))},e[0]=d):d=e[0];let m;e[1]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(he,{className:"w-44",children:t.jsx(je,{})}),e[1]=m):m=e[1];let x;e[2]!==a?(x=Qt.map(p=>t.jsx(be,{value:p.key,children:a(p.labelKey)},p.key)),e[2]=a,e[3]=x):x=e[3];let f;e[4]!==x?(f=t.jsx(ye,{children:x}),e[4]=x,e[5]=f):f=e[5];let g;e[6]!==f||e[7]!==i?(g=t.jsx("div",{className:"flex items-center justify-end",children:t.jsxs(ge,{value:i,onValueChange:d,children:[m,f]})}),e[6]=f,e[7]=i,e[8]=g):g=e[8];let u;e[9]!==s||e[10]!==o||e[11]!==n?(u=t.jsx(ro,{automationId:s,triggerIds:n,range:o}),e[9]=s,e[10]=o,e[11]=n,e[12]=u):u=e[12];let h;return e[13]!==g||e[14]!==u?(h=t.jsxs("div",{className:"flex flex-col gap-5",children:[g,u]}),e[13]=g,e[14]=u,e[15]=h):h=e[15],h}function Jo(){return Yt("30d")}function Xo(r){const e=q.c(5),{tabId:s}=r;let n;e[0]!==s?(n=ds(s),e[0]=s,e[1]=n):n=e[1];const a=n;if(!a)return null;let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Ze,{}),e[2]=i):i=e[2];let c;return e[3]!==a.id?(c=t.jsx(w.Suspense,{fallback:i,children:t.jsx(Qo,{id:a.id})}),e[3]=a.id,e[4]=c):c=e[4],c}function Qo(r){const e=q.c(41),{id:s}=r,n=ee(),{openPanel:a}=co(),{data:i,isLoading:c}=Ks(s),[o,j]=w.useState("settings");let d;e[0]!==a?(d=()=>a("automations"),e[0]=a,e[1]=d):d=e[1];const m=d;if(c){let k;return e[2]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(Ze,{}),e[2]=k):k=e[2],k}if(!i){let k;e[3]!==n?(k=n("mainPanelTabs.automationTab.automationNotFound"),e[3]=n,e[4]=k):k=e[4];let P;return e[5]!==k?(P=t.jsx("div",{className:"flex h-full w-full items-center justify-center text-sm text-muted-foreground",children:k}),e[5]=k,e[6]=P):P=e[6],P}let x;e[7]!==i.triggers?(x=i.triggers.map(Yo),e[7]=i.triggers,e[8]=x):x=e[8];const f=x;let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(Vt,{size:14}),e[9]=g):g=e[9];let u;e[10]!==n?(u=n("mainPanelTabs.automationTab.backToList"),e[10]=n,e[11]=u):u=e[11];let h;e[12]!==m||e[13]!==u?(h=t.jsxs(B,{variant:"ghost",size:"sm",onClick:m,children:[g,u]}),e[12]=m,e[13]=u,e[14]=h):h=e[14];let p;e[15]!==n?(p=n("mainPanelTabs.automationTab.settings"),e[15]=n,e[16]=p):p=e[16];let l;e[17]!==p?(l={id:"settings",label:p},e[17]=p,e[18]=l):l=e[18];let y;e[19]!==n?(y=n("mainPanelTabs.automationTab.runs"),e[19]=n,e[20]=y):y=e[20];let v;e[21]!==y?(v={id:"runs",label:y},e[21]=y,e[22]=v):v=e[22];let N;e[23]!==l||e[24]!==v?(N=[l,v],e[23]=l,e[24]=v,e[25]=N):N=e[25];let S;e[26]===Symbol.for("react.memo_cache_sentinel")?(S=k=>j(k),e[26]=S):S=e[26];let b;e[27]!==N||e[28]!==o?(b=t.jsx(lo,{placement:"page",tabs:N,activeTab:o,onTabChange:S}),e[27]=N,e[28]=o,e[29]=b):b=e[29];let T;e[30]!==b||e[31]!==h?(T=t.jsxs("div",{className:"flex items-center justify-between pb-4 shrink-0",children:[h,b]}),e[30]=b,e[31]=h,e[32]=T):T=e[32];let D;e[33]!==i||e[34]!==s||e[35]!==o||e[36]!==f?(D=o==="settings"?i.system_key?t.jsx(Go,{automation:i}):t.jsx(Bo,{automationId:s,automation:i}):t.jsx(w.Suspense,{fallback:t.jsx(Ze,{}),children:t.jsx(Ho,{automationId:s,triggerIds:f})}),e[33]=i,e[34]=s,e[35]=o,e[36]=f,e[37]=D):D=e[37];let _;return e[38]!==T||e[39]!==D?(_=t.jsx(Xe,{children:t.jsx(Xe.Content,{children:t.jsxs(Xe.Container,{children:[T,D]})})}),e[38]=T,e[39]=D,e[40]=_):_=e[40],_}function Yo(r){return r.id}function Zo(){const r=q.c(3);let e;r[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},r[0]=e):e=r[0];const{automationId:s}=ms(e);let n;return r[1]!==s?(n=s?t.jsx(Xo,{tabId:`automation:${s}`}):null,r[1]=s,r[2]=n):n=r[2],n}function Ci(){const r=q.c(1);let e;return r[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(us.Content,{children:t.jsx(Zo,{})}),r[0]=e):e=r[0],e}export{Ci as default};
@@ -0,0 +1 @@
1
+ import{c as S,b as O,r as G,j as e,n as m,C as Q,B as F,b2 as U}from"./index-DQge_BLv.js";import{C as W}from"./index-D3KLhYWS.js";import{s as X}from"./Plus-AFrvUoUc.js";import{F as Y}from"./agent-icon-DO8s6ea2.js";import{i as V}from"./ZoomOut-DIZKZikC.js";import{S as Z}from"./search-input-BvepfDCp.js";import{E as $}from"./empty-state-DcLpc4zT.js";import{u as tt,a as et,b as it}from"./use-automations-3u659Mzy.js";import{a as ot}from"./use-panel-navigate-DJWYue4p.js";import{A as st}from"./automation-list-row-B5PKQhfb.js";import{b as rt}from"./thread-route-BhHeUYXo.js";import"./use-mobile-C_KOoyX9.js";import"./use-sidebar-collapsed-DM0SNXB-.js";import"./use-chat-layout-state-DtHD302s.js";import"./thread-intent-BXZYb_rR.js";import"./use-mcp-client-DVzTP9Z-.js";import"./auth-Bh5UNoqX.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-CDjDlASu.js";import"./task-board-DCXqqZ12.js";import"./schema-CiJGpkKp.js";import"./slugify-CEUa2lfQ.js";import"./tooltip--hQ071uj.js";import"./index-Br9i6zHp.js";import"./toolbar-icon-button-B0tBxUCb.js";import"./shell-layout-CTdQsY_z.js";import"./Building02-Czpjl0U5.js";import"./UserSquare-BhJx3glH.js";import"./use-deployment-admin-D9U88a6V.js";import"./admin-fetch-BhTJlAsX.js";import"./XClose-wH9pi_Oq.js";import"./use-project-scope-DmeYK8Bq.js";import"./repository-binding-BSdKE2Qo.js";import"./CheckCircle-BNPESArO.js";import"./Monitor01-CGq_FB6g.js";import"./use-clock-tick-DsgVgaMj.js";import"./Tool01-BdswuHJy.js";import"./command-D_wtag_V.js";import"./index-CWrjSpv6.js";import"./SearchMd-DSPN9QxV.js";import"./integration-icon-C5QUXJ-_.js";import"./LinkBroken01-BFQs5QxW.js";import"./project-icon-B0SToVzq.js";import"./new-project-dialog-D-A0zxil.js";import"./ArrowLeft-Lry57YLT.js";import"./label-nAynIzRB.js";import"./repository-import-picker-DL_KXsuZ.js";import"./use-navigate-to-agent-CakeCNXj.js";import"./repository-picker-DR1imeoJ.js";import"./github-icon-CwEeHUg2.js";import"./useInfiniteQuery-DW7gjDqh.js";import"./infiniteQueryObserver-CJSP-r-Q.js";import"./collection-search-DKNF_aHL.js";import"./ShoppingBag01-DB7ytToi.js";import"./use-debounced-value-BC9-VsXG.js";import"./use-organization-settings-BgGp5lk4.js";import"./required-auth-layout-BfYIPzIZ.js";import"./autosend-BE8sRUrR.js";import"./use-org-sso-AxQjuMiC.js";import"./sheet-Dwf0d2yk.js";import"./resizable-STcRbiPL.js";import"./AlertCircle-DaqrzQLf.js";import"./ArrowUp-DzUcbY_U.js";import"./ChevronUp-DYWuPRic.js";import"./ChevronSelectorVertical-DZn3JZt3.js";import"./Copy01-E_QbCxA-.js";import"./CreditCard01-i2HOt1aB.js";import"./DotsVertical-CbdEruUk.js";import"./Image01-DoQzA6mU.js";import"./Globe04-QDIAkI_1.js";import"./SwitchHorizontal01-DoMMYhWx.js";import"./Key01-yX9At---.js";import"./Link01-DdjCKN6E.js";import"./Minus-BvbXf1Sp.js";import"./Sun-DoDvwdQj.js";import"./Play-ChXZcgWf.js";import"./Trash01-B0glQHgK.js";import"./Upload01-BY0gIDxJ.js";import"./Users01-CfcMu04c.js";import"./badge-B1tWhSy_.js";function nt(o){if(!(o instanceof Error))return!1;const t=o.message.toLowerCase();return t.includes("relation")&&t.includes("does not exist")}function mt(o){const t=S.c(45),{virtualMcpId:r}=o,i=O(),{openPanel:n}=ot(),{data:D,error:M}=tt(r),v=D===void 0?[]:D,{create:y}=et(),[_,H]=G.useState("");if(M&&nt(M)){let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=e.jsx(Y,{size:48,className:"text-muted-foreground"}),t[0]=s):s=t[0];let x;t[1]!==i?(x=i("automations.setupRequired.title"),t[1]=i,t[2]=x):x=t[2];let h;t[3]!==i?(h=i("automations.setupRequired.description"),t[3]=i,t[4]=h):h=t[4];let j;t[5]!==n?(j=()=>n("settings"),t[5]=n,t[6]=j):j=t[6];let g;t[7]!==i?(g=i("automations.setupRequired.goToSetup"),t[7]=i,t[8]=g):g=t[8];let C;t[9]!==j||t[10]!==g?(C=e.jsx(F,{size:"sm",onClick:j,children:g}),t[9]=j,t[10]=g,t[11]=C):C=t[11];let N;return t[12]!==x||t[13]!==h||t[14]!==C?(N=e.jsx(m,{children:e.jsx(m.Content,{children:e.jsx(m.Container,{children:e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx($,{image:s,title:x,description:h,actions:C})})})})}),t[12]=x,t[13]=h,t[14]=C,t[15]=N):N=t[15],N}const J=_.toLowerCase(),q=v.filter(s=>s.name.toLowerCase().includes(J));let w;t[16]!==n?(w=s=>n(`automation:${s}`),t[16]=n,t[17]=w):w=t[17];const B=w,R=async()=>{if(y.isPending)return;Q("automation_new_clicked",{virtual_mcp_id:r,existing_count:v.length});const s=await y.mutateAsync(it(r));B(s.id)},K=y.isPending;let b;t[18]===Symbol.for("react.memo_cache_sentinel")?(b=e.jsx(X,{size:14}),t[18]=b):b=t[18];let a;t[19]!==i?(a=i("automations.automationsList.newAutomation"),t[19]=i,t[20]=a):a=t[20];let A;t[21]!==y.isPending||t[22]!==R||t[23]!==a?(A=e.jsxs(F,{size:"sm",onClick:R,disabled:K,children:[b,a]}),t[21]=y.isPending,t[22]=R,t[23]=a,t[24]=A):A=t[24];const P=A,T=m,E=m,k=m;let l;t[25]!==i?(l=i("automations.automationsList.title"),t[25]=i,t[26]=l):l=t[26];let c;t[27]!==P||t[28]!==l?(c=e.jsx(m.Title,{actions:P,children:l}),t[27]=P,t[28]=l,t[29]=c):c=t[29];const z=v.length>0&&e.jsx(Z,{value:_,onChange:H,placeholder:i("automations.automationsList.searchPlaceholder"),className:"w-full md:w-[375px]"});let p;t[30]!==z?(p=e.jsx("div",{className:"flex flex-wrap items-center justify-between gap-3",children:z}),t[30]=z,t[31]=p):p=t[31];let u;t[32]!==c||t[33]!==p?(u=e.jsxs("div",{className:"flex flex-col gap-6",children:[c,p]}),t[32]=c,t[33]=p,t[34]=u):u=t[34];const I=v.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx($,{image:e.jsx(V,{size:48,className:"text-muted-foreground"}),title:i("automations.automationsList.emptyTitle"),description:i("automations.automationsList.emptyDescription"),actions:!1})}):q.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx($,{image:e.jsx(V,{size:48,className:"text-muted-foreground"}),title:i("automations.automationsList.noResultsTitle"),description:i("automations.automationsList.noResultsDescription",{search:_})})}):e.jsx("div",{className:"mt-6 flex flex-col divide-y divide-border overflow-hidden rounded-xl bg-card shadow-edge",children:q.map(s=>e.jsx(st,{automation:s,onClick:()=>B(s.id)},s.id))});let d;t[35]!==u||t[36]!==I||t[37]!==k.Container?(d=e.jsxs(k.Container,{children:[u,I]}),t[35]=u,t[36]=I,t[37]=k.Container,t[38]=d):d=t[38];let f;t[39]!==d||t[40]!==E.Content?(f=e.jsx(E.Content,{children:d}),t[39]=d,t[40]=E.Content,t[41]=f):f=t[41];let L;return t[42]!==T||t[43]!==f?(L=e.jsx(T,{children:f}),t[42]=T,t[43]=f,t[44]=L):L=t[44],L}function at(o){const t=S.c(3),{virtualMcpId:r}=o;let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=e.jsx(U,{}),t[0]=i):i=t[0];let n;return t[1]!==r?(n=e.jsx(G.Suspense,{fallback:i,children:e.jsx(mt,{virtualMcpId:r})}),t[1]=r,t[2]=n):n=t[2],n}function lt(){const o=S.c(2),t=rt();let r;return o[0]!==t?(r=e.jsx(at,{virtualMcpId:t}),o[0]=t,o[1]=r):r=o[1],r}function De(){const o=S.c(1);let t;return o[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx(W.Content,{children:e.jsx(lt,{})}),o[0]=t):t=o[0],t}export{De as default};
@@ -0,0 +1 @@
1
+ import{c as Q,b as oe,r as re,j as s,l as fe,bp as he,fv as Re,B as me,ay as Te,bB as we}from"./index-DQge_BLv.js";import{C as De}from"./index-D3KLhYWS.js";import{S as Ie}from"./site-draft-actions-IMB26mGs.js";import{r as pe,H as Ee}from"./agent-icon-DO8s6ea2.js";import{i as Oe}from"./SwitchHorizontal01-DoMMYhWx.js";import{s as Me}from"./Plus-AFrvUoUc.js";import{B as $e}from"./badge-B1tWhSy_.js";import{S as ye}from"./scroll-area-BCbl3S10.js";import{T as Ne,a as Ve}from"./toggle-group-zfRo99MM.js";import{S as Ce,a as ve}from"./view-header-CiREHDQJ.js";import{m as Ae,o as Be,q as ze,u as Pe,n as Fe,N as We,i as Le,c as Ue,d as He,f as Ge,g as Ye,a as Ke,b as qe,p as Je,j as Qe,k as Xe,h as Ze,S as et}from"./site-draft-view-f8qPUNeN.js";import{c as tt,b as st,d as je,V as it,W as nt}from"./blocks-tab-states-mp1yavun.js";import{ai as at,ak as rt}from"./parse-sections-oAWkQEej.js";import{a as ue,M as ot,b as lt}from"./date-utils-CrvIKg-s.js";import{h as mt}from"./named-rule-uses-Bo4fIeGa.js";import{a as ct}from"./use-panel-navigate-DJWYue4p.js";import{u as dt,e as pt}from"./experiments-tab-choice-DkauT2Jo.js";import{S as ut}from"./settings-tab-B7Vt0fWI.js";import{b as ft}from"./thread-route-BhHeUYXo.js";import"./use-mobile-C_KOoyX9.js";import"./use-sidebar-collapsed-DM0SNXB-.js";import"./use-chat-layout-state-DtHD302s.js";import"./thread-intent-BXZYb_rR.js";import"./use-mcp-client-DVzTP9Z-.js";import"./auth-Bh5UNoqX.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-CDjDlASu.js";import"./task-board-DCXqqZ12.js";import"./schema-CiJGpkKp.js";import"./slugify-CEUa2lfQ.js";import"./tooltip--hQ071uj.js";import"./index-Br9i6zHp.js";import"./toolbar-icon-button-B0tBxUCb.js";import"./shell-layout-CTdQsY_z.js";import"./Building02-Czpjl0U5.js";import"./UserSquare-BhJx3glH.js";import"./use-deployment-admin-D9U88a6V.js";import"./admin-fetch-BhTJlAsX.js";import"./XClose-wH9pi_Oq.js";import"./use-project-scope-DmeYK8Bq.js";import"./repository-binding-BSdKE2Qo.js";import"./CheckCircle-BNPESArO.js";import"./Monitor01-CGq_FB6g.js";import"./ZoomOut-DIZKZikC.js";import"./use-clock-tick-DsgVgaMj.js";import"./Tool01-BdswuHJy.js";import"./command-D_wtag_V.js";import"./index-CWrjSpv6.js";import"./SearchMd-DSPN9QxV.js";import"./integration-icon-C5QUXJ-_.js";import"./LinkBroken01-BFQs5QxW.js";import"./project-icon-B0SToVzq.js";import"./new-project-dialog-D-A0zxil.js";import"./ArrowLeft-Lry57YLT.js";import"./label-nAynIzRB.js";import"./repository-import-picker-DL_KXsuZ.js";import"./use-navigate-to-agent-CakeCNXj.js";import"./repository-picker-DR1imeoJ.js";import"./github-icon-CwEeHUg2.js";import"./useInfiniteQuery-DW7gjDqh.js";import"./infiniteQueryObserver-CJSP-r-Q.js";import"./collection-search-DKNF_aHL.js";import"./ShoppingBag01-DB7ytToi.js";import"./use-debounced-value-BC9-VsXG.js";import"./use-organization-settings-BgGp5lk4.js";import"./required-auth-layout-BfYIPzIZ.js";import"./autosend-BE8sRUrR.js";import"./use-org-sso-AxQjuMiC.js";import"./sheet-Dwf0d2yk.js";import"./resizable-STcRbiPL.js";import"./separator-Dt_7ryb4.js";import"./chat-context-DJQNHpnm.js";import"./use-entitlements-DfzzXZIV.js";import"./use-ai-providers-C9yoEjqD.js";import"./location-V0VwTJTt.js";import"./use-decopilot-events-DQJQGAJY.js";import"./site-editor-toast-C3--n_in.js";import"./use-session-runtime-D49ajMP-.js";import"./sandbox-url-D3mC8qhT.js";import"./utils-CeKg1A9t.js";import"./Image01-DoQzA6mU.js";import"./use-sandbox-events-1Xx-AI1q.js";import"./sandbox-git-api-DcqI6XE4.js";import"./popover-B6YbIo3T.js";import"./tabs-CkNdZlhM.js";import"./active-indicator-CCMhAsc_.js";import"./ChevronUp-DYWuPRic.js";import"./DotsVertical-CbdEruUk.js";import"./Trash01-B0glQHgK.js";import"./use-releases-BrCAkIVY.js";import"./serial-task-queue-CGOeQgpr.js";import"./virtual-mcp-DonQ6N9_.js";import"./url-slug-oBnMGRk3.js";import"./use-fast-preview-draft-url-C3Zsdb8u.js";import"./section-preview-url-7zfngvgW.js";import"./preview-link-C762yHOt.js";import"./variant-draft-pointer-BeAKcq_c.js";import"./index-zIshg7PY.js";import"./ArrowUp-DzUcbY_U.js";import"./tool-namespace-CrCuqBA7.js";import"./drawer-CEKMK2Xy.js";import"./use-mcp-prompts-B9D-ZvCI.js";import"./usage-stats-Bfpi0erw.js";import"./form-CqcvGBPS.js";import"./utils-CVEq3hMx.js";import"./markdown-SDFpVgvK.js";import"./use-copy-BmESZuBQ.js";import"./Copy01-E_QbCxA-.js";import"./input-DEv-xbR8.js";import"./icon-button-DpHJ-JqO.js";import"./file-type-icon-lZJfDHey.js";import"./chat-draft-DQWviosv.js";import"./Upload01-BY0gIDxJ.js";import"./AlertCircle-DaqrzQLf.js";import"./select-CrEvL5z9.js";import"./index-BdQq_4o_.js";import"./use-deco-credits-MxrjnOZJ.js";import"./index-TO8lHy3e.js";import"./checkbox-yhLjvc2y.js";import"./Minus-BvbXf1Sp.js";import"./ChevronSelectorVertical-DZn3JZt3.js";import"./Key01-yX9At---.js";import"./ai-providers-logos-DD3qZ33J.js";import"./input-xMjBQS9S.js";import"./suggestion-uJQK-wZ9.js";import"./use-org-fs-CGLMPARk.js";import"./Link01-DdjCKN6E.js";import"./question-004-sINsf4GQ.js";import"./feature-paywall-DAahPvB8.js";import"./plan-ladder-B3EmMB3m.js";import"./add-connection-dialog-CHVJhgT5.js";import"./extract-connection-data-BbZfot_J.js";import"./metadata-D72DunRR.js";import"./connection-SI3MUziU.js";import"./connection-card-wiFNcVPz.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-DgBaFzwD.js";import"./use-connection-DjcoL2xp.js";import"./schema-2IXYlLNg.js";import"./connection-form-helpers-DEYmvQ4D.js";import"./authenticate-and-persist-oauth-BvbYgtDL.js";import"./mcp-oauth-zNBrv-Zt.js";import"./mcp-oauth-CscDp9_t.js";import"./collection-tabs-CymIaett.js";import"./use-infinite-scroll-CrNt3X1z.js";import"./useSuspenseInfiniteQuery-CKl2j5ZP.js";import"./use-task-board-events-BtbvSjEH.js";import"./pair-DtO9iW-3.js";import"./collapsible-Dp7IveTF.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-taIEo_0M.js";import"./types-vHdCIVHy.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./use-thread-outputs-CUfkYNKn.js";import"./hosted-publish-feedback-IJbFHaab.js";import"./use-cms-publish-actions-DD2X-WS9.js";import"./device-hint-SeLRi17j.js";import"./editor-119-kR49.js";import"./section-array-field-C4Dn6tRH.js";import"./alert-Bbd8MBbC.js";import"./save-changes-debug-nBi-n9eV.js";import"./releases-api-C1aD3cIf.js";import"./sandbox-lifecycle-context-DObzOH6l.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./CreditCard01-i2HOt1aB.js";import"./Globe04-QDIAkI_1.js";import"./Sun-DoDvwdQj.js";import"./Play-ChXZcgWf.js";import"./Users01-CfcMu04c.js";import"./use-apply-named-rule-Bv8beIr1.js";import"./use-move-blocks-mCIJarBI.js";import"./empty-state-C_4QOOCa.js";import"./slider-CNTpN8Re.js";import"./index-C4tvJe6k.js";import"./tooltipContext-CzjEugcr.js";import"./CategoricalChart-DJYWdZLM.js";import"./index-Dx7zyr0h.js";import"./ActiveShapeUtils-BOoUrrHB.js";import"./Sector-BmhXcpO4.js";import"./symbol-C4rfRhzp.js";import"./empty-state-DcLpc4zT.js";import"./index-j4Z-ANHV.js";import"./build-improve-prompt-doc-CwbtrjfW.js";import"./use-date-fns-locale-1xKLCmLQ.js";import"./use-debounced-autosave-DtGVwjBB.js";import"./search-input-BvepfDCp.js";import"./use-mcp-auth-status-B6pAOnY6.js";import"./use-mcp-tools-D-mu7r_B.js";import"./switch-yYhcctGB.js";import"./use-project-native-view-presence-Dvt6yQe3.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-file-configs-BQsdB00T.js";import"./site-slug-DebpOoQq.js";import"./optimistic-project-sidebar-views-CFDUE-TH.js";import"./sections-BoMQy-an.js";import"./secret-picker-BFw_Vm2O.js";import"./use-secrets-CLn_8twS.js";import"./app-preview-url-9Od4s8Sz.js";function ge(i){return{start:i.start?Date.parse(i.start):null,end:i.end?Date.parse(i.end):null}}function xt(i,e){const{start:t,end:n}=ge(i);if(Number.isNaN(t)||Number.isNaN(n))return"unreadable";if(t===null&&n===null)return"always";const l=e.getTime();return t!==null&&l<t?"upcoming":n!==null&&l>=n?"ended":"running"}const Se={running:0,upcoming:1,always:2,unreadable:3,ended:4};function gt(i,e,t){const n=at(i,"campaigns");if(n.kind==="conflict")return[];const l=e?.published??null,a=Object.entries(n.values).map(([m,u])=>{const r=Ae(l,"campaigns",m,u),p=r==="changed"?Be(l,"campaigns",m):void 0;return{name:m,window:u,status:xt(u,t),uses:e?mt(e,"campaigns",m):0,entryState:r,...p!==void 0?{publishedWindow:p}:{}}}),c=m=>m.window.start?Date.parse(m.window.start):0,o=m=>m.window.end?Date.parse(m.window.end):0;return a.sort((m,u)=>{const r=Se[m.status]-Se[u.status];return r!==0?r:m.status==="upcoming"?c(m)-c(u):m.status==="ended"?o(u)-o(m):0})}function bt(i,e){return ze(i,e?.published??null,"campaigns")}function xe(i,e,t){const{start:n,end:l}=ge(i);if(Number.isNaN(n)||Number.isNaN(l))return null;const a=e.getTime(),c=t.getTime(),o=c-a;if(o<=0)return null;const m=n??Number.NEGATIVE_INFINITY,u=l??Number.POSITIVE_INFINITY;if(u<=a||m>=c||u<=m)return null;const r=Math.max(m,a),p=Math.min(u,c);return{left:(r-a)/o*100,width:(p-r)/o*100,openStart:m<a,openEnd:u>c}}const ht=1.5,wt=4;function Nt(i,e){const t=e.length*ht+wt;return i.width>=t?"inside":i.left+i.width+t<=100?"after":i.left>=t||i.left>100-(i.left+i.width)?"before":"after"}function jt(i,e,t){const n=new Date(e.getFullYear(),e.getMonth(),1),l=new Date(e.getFullYear(),e.getMonth()+t,1);if(i.some(o=>xe(o,n,l)!==null))return n;const a=i.map(o=>ge(o).start).filter(o=>o!==null&&!Number.isNaN(o)&&o>=l.getTime()).sort((o,m)=>o-m)[0];if(a===void 0)return n;const c=new Date(a);return new Date(c.getFullYear(),c.getMonth(),1)}const St={running:"bg-success",upcoming:"bg-primary",always:"bg-success",ended:"bg-muted-foreground/50",unreadable:"bg-warning"},yt={running:"bg-success/80 text-success-foreground",upcoming:"bg-primary/80 text-primary-foreground",always:"bg-success/60 text-success-foreground",ended:"bg-muted text-muted-foreground",unreadable:"bg-warning/60 text-warning-foreground"},ae=4,de=rt("campaigns").blockKey,Ct=(i,e)=>he(i??null)!==he(e??null);function vt(){const i=Q.c(2),e=oe();let t;return i[0]!==e?(t=n=>{switch(n){case"running":return e("sandbox.dateCampaigns.status.running");case"upcoming":return e("sandbox.dateCampaigns.status.upcoming");case"ended":return e("sandbox.dateCampaigns.status.ended");case"always":return e("sandbox.dateCampaigns.status.always");case"unreadable":return e("sandbox.dateCampaigns.status.unreadable")}},i[0]=e,i[1]=t):t=i[1],t}function _e(i){const e=Q.c(11),{status:t}=i,n=vt(),l=St[t];let a;e[0]!==l?(a=fe("size-1.5 rounded-full",l),e[0]=l,e[1]=a):a=e[1];let c;e[2]!==a?(c=s.jsx("span",{className:a}),e[2]=a,e[3]=c):c=e[3];let o;e[4]!==n||e[5]!==t?(o=n(t),e[4]=n,e[5]=t,e[6]=o):o=e[6];let m;return e[7]!==t||e[8]!==c||e[9]!==o?(m=s.jsxs($e,{variant:"secondary","data-status":t,children:[c,o]}),e[7]=t,e[8]=c,e[9]=o,e[10]=m):m=e[10],m}function be(i,e){return Re(i)??e}function _t(i){const e=Q.c(8),{title:t,description:n}=i;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(pe,{size:24,className:"text-muted-foreground/60"}),e[0]=l):l=e[0];let a;e[1]!==t?(a=s.jsx("p",{className:"text-sm font-medium",children:t}),e[1]=t,e[2]=a):a=e[2];let c;e[3]!==n?(c=s.jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:n}),e[3]=n,e[4]=c):c=e[4];let o;return e[5]!==a||e[6]!==c?(o=s.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2 p-6 text-center",children:[l,a,c]}),e[5]=a,e[6]=c,e[7]=o):o=e[7],o}function kt(i){const e=Q.c(109),{orgSlug:t,virtualMcpId:n,branch:l,decofile:a,meta:c,onOpenUse:o,initialView:m}=i,u=m===void 0?"list":m,r=oe();let p;e[0]!==l||e[1]!==a||e[2]!==c||e[3]!==t||e[4]!==n?(p={orgSlug:t,virtualMcpId:n,branch:l,decofile:a,meta:c},e[0]=l,e[1]=a,e[2]=c,e[3]=t,e[4]=n,e[5]=p):p=e[5];const d=Pe("campaigns",p),[x,j]=re.useState(u);let v;e[6]!==l||e[7]!==t||e[8]!==n?(v=tt({orgSlug:t,virtualMcpId:n,branch:l}),e[6]=l,e[7]=t,e[8]=n,e[9]=v):v=e[9];const S=st(v);let R;e[10]!==S?(R=S(de),e[10]=S,e[11]=R):R=e[11];const X=R,[b]=re.useState(Tt);if(d.blocked){let w;e[12]!==r?(w=r("sandbox.dateCampaigns.missing.title"),e[12]=r,e[13]=w):w=e[13];let O;e[14]!==r?(O=r("sandbox.dateCampaigns.missing.desc"),e[14]=r,e[15]=O):O=e[15];let z;e[16]!==w||e[17]!==O?(z={title:w,description:O},e[16]=w,e[17]=O,e[18]=z):z=e[18];let G;e[19]!==r?(G=r("sandbox.dateCampaigns.replaced.title"),e[19]=r,e[20]=G):G=e[20];let Z;e[21]!==r?(Z=r("sandbox.dateCampaigns.replaced.desc"),e[21]=r,e[22]=Z):Z=e[22];let ee;e[23]!==Z||e[24]!==G?(ee={title:G,description:Z},e[23]=Z,e[24]=G,e[25]=ee):ee=e[25];let Y;e[26]!==r?(Y=r("sandbox.dateCampaigns.conflict.title"),e[26]=r,e[27]=Y):Y=e[27];let K;e[28]!==r?(K=r("sandbox.dateCampaigns.conflict.desc"),e[28]=r,e[29]=K):K=e[29];let J;e[30]!==Y||e[31]!==K?(J={title:Y,description:K},e[30]=Y,e[31]=K,e[32]=J):J=e[32];let te;e[33]!==ee||e[34]!==J||e[35]!==z?(te={missing:z,replaced:ee,conflict:J},e[33]=ee,e[34]=J,e[35]=z,e[36]=te):te=e[36];const le=te[d.blocked];let ce;return e[37]!==le?(ce=s.jsx(_t,{...le}),e[37]=le,e[38]=ce):ce=e[38],ce}let q,f,M;if(e[39]!==X||e[40]!==a||e[41]!==c||e[42]!==b||e[43]!==o||e[44]!==d){M=Symbol.for("react.early_return_sentinel");e:{f=gt(a,d.uses,b);let w;e[48]!==a||e[49]!==d.uses?(w=bt(a,d.uses),e[48]=a,e[49]=d.uses,e[50]=w):w=e[50],q=w;const O=f.find(z=>z.name===d.openName)??null;if(O){M=s.jsx(At,{...Fe(d,O,{decofile:a,meta:c,onOpenUse:o})},`${O.name}:${X}`);break e}}e[39]=X,e[40]=a,e[41]=c,e[42]=b,e[43]=o,e[44]=d,e[45]=q,e[46]=f,e[47]=M}else q=e[45],f=e[46],M=e[47];if(M!==Symbol.for("react.early_return_sentinel"))return M;let T;e[51]!==r?(T=r("sandbox.dateCampaigns.intro"),e[51]=r,e[52]=T):T=e[52];let $;e[53]===Symbol.for("react.memo_cache_sentinel")?($=w=>{(w==="list"||w==="timeline")&&j(w)},e[53]=$):$=e[53];let N;e[54]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(Oe,{}),e[54]=N):N=e[54];let P;e[55]!==r?(P=r("sandbox.dateCampaigns.listMode"),e[55]=r,e[56]=P):P=e[56];let F;e[57]!==P?(F=s.jsxs(Ne,{value:"list",children:[N,P]}),e[57]=P,e[58]=F):F=e[58];let V;e[59]===Symbol.for("react.memo_cache_sentinel")?(V=s.jsx(pe,{}),e[59]=V):V=e[59];let D;e[60]!==r?(D=r("sandbox.dateCampaigns.timelineMode"),e[60]=r,e[61]=D):D=e[61];let _;e[62]!==D?(_=s.jsxs(Ne,{value:"timeline",children:[V,D]}),e[62]=D,e[63]=_):_=e[63];let A;e[64]!==x||e[65]!==F||e[66]!==_?(A=s.jsxs(Ve,{type:"single",variant:"segmented",size:"sm",value:x,onValueChange:$,children:[F,_]}),e[64]=x,e[65]=F,e[66]=_,e[67]=A):A=e[67];let I;e[68]!==d?(I=()=>d.setCreating(!0),e[68]=d,e[69]=I):I=e[69];let B;e[70]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(Me,{size:16}),e[70]=B):B=e[70];let k;e[71]!==r?(k=r("sandbox.dateCampaigns.new"),e[71]=r,e[72]=k):k=e[72];let E;e[73]!==I||e[74]!==k?(E=s.jsxs(me,{size:"sm",onClick:I,children:[B,k]}),e[73]=I,e[74]=k,e[75]=E):E=e[75];let y;e[76]!==A||e[77]!==E?(y=s.jsxs(s.Fragment,{children:[A,E]}),e[76]=A,e[77]=E,e[78]=y):y=e[78];let g;e[79]!==y||e[80]!==T?(g=s.jsx(ve,{intro:T,actions:y}),e[79]=y,e[80]=T,e[81]=g):g=e[81];let h;e[82]===Symbol.for("react.memo_cache_sentinel")?(h=fe("flex flex-col gap-4",Ce),e[82]=h):h=e[82];let C;e[83]!==x||e[84]!==b||e[85]!==f||e[86]!==r||e[87]!==d.setOpenName?(C=f.length===0?s.jsxs("div",{className:"flex flex-col items-center gap-2 py-10 text-center",children:[s.jsx(pe,{size:24,className:"text-muted-foreground/60"}),s.jsx("p",{className:"text-sm font-medium",children:r("sandbox.dateCampaigns.empty.title")}),s.jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:r("sandbox.dateCampaigns.empty.desc")})]}):x==="list"?s.jsx(Dt,{rows:f,onOpen:d.setOpenName}):s.jsx(It,{rows:f,now:b,onOpen:d.setOpenName}),e[83]=x,e[84]=b,e[85]=f,e[86]=r,e[87]=d.setOpenName,e[88]=C):C=e[88];let W;e[89]!==o||e[90]!==q||e[91]!==d.missing||e[92]!==d.missingNames?(W=s.jsx(We,{kind:"campaigns",missing:d.missing,missingNames:d.missingNames,removed:q,onOpenUse:o}),e[89]=o,e[90]=q,e[91]=d.missing,e[92]=d.missingNames,e[93]=W):W=e[93];let L;e[94]!==C||e[95]!==W?(L=s.jsx(ye,{className:"min-h-0 flex-1",children:s.jsxs("div",{className:h,children:[C,W]})}),e[94]=C,e[95]=W,e[96]=L):L=e[96];const se=d.creating,ie=d.setCreating;let U;e[97]!==f?(U=f.map(Rt),e[97]=f,e[98]=U):U=e[98];let H;e[99]!==U||e[100]!==d.create||e[101]!==d.creating||e[102]!==d.isPending||e[103]!==d.setCreating?(H=s.jsx(Le,{kind:"campaigns",open:se,onOpenChange:ie,existingNames:U,pending:d.isPending,onCreate:d.create}),e[99]=U,e[100]=d.create,e[101]=d.creating,e[102]=d.isPending,e[103]=d.setCreating,e[104]=H):H=e[104];let ne;return e[105]!==g||e[106]!==L||e[107]!==H?(ne=s.jsxs("div",{className:"flex h-full w-full flex-col",children:[g,L,H]}),e[105]=g,e[106]=L,e[107]=H,e[108]=ne):ne=e[108],ne}function Rt(i){return i.name}function Tt(){return new Date}function Dt(i){const e=Q.c(9),{rows:t,onOpen:n}=i,l=oe();let a;if(e[0]!==n||e[1]!==t||e[2]!==l){let o;e[4]!==n||e[5]!==l?(o=m=>s.jsxs("li",{className:"group relative flex items-center gap-4 px-4 py-3 hover:bg-muted/50","data-testid":"campaign-row",children:[s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[s.jsx("button",{type:"button",onClick:()=>n(m.name),className:"truncate text-left text-sm font-medium after:absolute after:inset-0 focus-visible:outline-none focus-visible:after:ring-2 focus-visible:after:ring-ring focus-visible:after:ring-inset",children:m.name}),s.jsxs("span",{className:"truncate text-xs text-muted-foreground",children:[be(m.window,l("sectionsEditor.namedRulePicker.alwaysRunning"))," · ",Ke(l,"campaigns",m.uses)]})]}),s.jsx("div",{className:"hidden w-40 shrink-0 md:flex",children:s.jsx(qe,{kind:"campaigns",state:m.entryState})}),s.jsx("div",{className:"flex w-32 shrink-0",children:s.jsx(_e,{status:m.status})})]},m.name),e[4]=n,e[5]=l,e[6]=o):o=e[6],a=t.map(o),e[0]=n,e[1]=t,e[2]=l,e[3]=a}else a=e[3];let c;return e[7]!==a?(c=s.jsx("ul",{className:"divide-y divide-border rounded-md border border-border","data-testid":"campaigns-list",children:a}),e[7]=a,e[8]=c):c=e[8],c}function It(i){const e=Q.c(50),{rows:t,now:n,onOpen:l}=i,a=oe();let c;e[0]!==n||e[1]!==t?(c=()=>jt(t.map(Vt),n,ae),e[0]=n,e[1]=t,e[2]=c):c=e[2];const[o,m]=re.useState(c);let u,r,p,d,x,j;if(e[3]!==o||e[4]!==n||e[5]!==l||e[6]!==t||e[7]!==a){const R=ue(o,ae),X=Array.from({length:ae},(y,g)=>ue(o,g)),b=xe({start:n.toISOString(),end:new Date(n.getTime()+1).toISOString()},o,R),f=t.map(y=>({row:y,bar:xe(y.window,o,R)})).filter($t);d="flex flex-col gap-2",x="campaigns-timeline";let M;e[14]!==n?(M=()=>m(lt(n)),e[14]=n,e[15]=M):M=e[15];let T;e[16]!==a?(T=a("sandbox.dateCampaigns.today"),e[16]=a,e[17]=T):T=e[17];let $;e[18]!==M||e[19]!==T?($=s.jsx(me,{variant:"outline",size:"sm",onClick:M,children:T}),e[18]=M,e[19]=T,e[20]=$):$=e[20];let N;e[21]!==a?(N=a("sandbox.dateCampaigns.previous"),e[21]=a,e[22]=N):N=e[22];let P,F;e[23]===Symbol.for("react.memo_cache_sentinel")?(P=()=>m(Mt),F=s.jsx(Ee,{size:16}),e[23]=P,e[24]=F):(P=e[23],F=e[24]);let V;e[25]!==N?(V=s.jsx(me,{variant:"ghost",size:"icon",className:"size-8","aria-label":N,onClick:P,children:F}),e[25]=N,e[26]=V):V=e[26];let D;e[27]!==a?(D=a("sandbox.dateCampaigns.next"),e[27]=a,e[28]=D):D=e[28];let _,A;e[29]===Symbol.for("react.memo_cache_sentinel")?(_=()=>m(Ot),A=s.jsx(Te,{size:16}),e[29]=_,e[30]=A):(_=e[29],A=e[30]);let I;e[31]!==D?(I=s.jsx(me,{variant:"ghost",size:"icon",className:"size-8","aria-label":D,onClick:_,children:A}),e[31]=D,e[32]=I):I=e[32],e[33]!==$||e[34]!==V||e[35]!==I?(j=s.jsxs("div",{className:"flex items-center gap-2",children:[$,V,I]}),e[33]=$,e[34]=V,e[35]=I,e[36]=j):j=e[36],u="relative min-w-[640px] rounded-md border border-border";let B;e[37]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx("div",{className:"w-48 shrink-0 border-r"}),e[37]=B):B=e[37];let k;e[38]===Symbol.for("react.memo_cache_sentinel")?(k={gridTemplateColumns:`repeat(${ae}, minmax(0, 1fr))`},e[38]=k):k=e[38];const E=X.map(Et);e[39]!==E?(r=s.jsxs("div",{className:"flex border-b",children:[B,s.jsx("div",{className:"grid flex-1",style:k,children:E})]}),e[39]=E,e[40]=r):r=e[40],p=f.length===0?s.jsx("p",{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:a("sandbox.dateCampaigns.nothingInRange")}):f.map(y=>{const{row:g,bar:h}=y,C=Nt(h,g.name);return s.jsxs("div",{className:"flex h-9 items-center border-b last:border-b-0",children:[s.jsx("div",{className:"w-48 shrink-0 truncate border-r px-3 text-sm",children:g.name}),s.jsxs("div",{className:"relative h-full flex-1",children:[b&&s.jsx("div",{className:"pointer-events-none absolute top-0 bottom-0 w-px bg-primary/70",style:{left:`${b.left}%`}}),s.jsx("button",{type:"button",onClick:()=>l(g.name),"aria-label":g.name,title:be(g.window,a("sectionsEditor.namedRulePicker.alwaysRunning")),className:fe("absolute top-1/2 h-6 -translate-y-1/2 truncate rounded text-left text-2xs font-medium",C==="inside"&&"px-2",yt[g.status],h.openStart&&"rounded-l-none",h.openEnd&&"rounded-r-none"),style:{left:`${h.left}%`,width:`max(calc(${h.width}% - 2px), 6px)`},"data-label":C,children:C==="inside"?g.name:null}),C!=="inside"&&s.jsx("button",{type:"button",tabIndex:-1,"aria-hidden":"true",onClick:()=>l(g.name),className:"absolute top-1/2 -translate-y-1/2 truncate whitespace-nowrap text-left text-2xs font-medium text-foreground hover:underline",style:C==="after"?{left:`calc(${h.left+h.width}% + 6px)`,maxWidth:`calc(${100-h.left-h.width}% - 6px)`}:{right:`calc(${100-h.left}% + 6px)`,maxWidth:`calc(${h.left}% - 6px)`},title:g.name,"data-testid":"campaign-bar-label",children:g.name})]})]},g.name)}),e[3]=o,e[4]=n,e[5]=l,e[6]=t,e[7]=a,e[8]=u,e[9]=r,e[10]=p,e[11]=d,e[12]=x,e[13]=j}else u=e[8],r=e[9],p=e[10],d=e[11],x=e[12],j=e[13];let v;e[41]!==u||e[42]!==r||e[43]!==p?(v=s.jsxs("div",{className:u,children:[r,p]}),e[41]=u,e[42]=r,e[43]=p,e[44]=v):v=e[44];let S;return e[45]!==d||e[46]!==x||e[47]!==j||e[48]!==v?(S=s.jsxs("div",{className:d,"data-testid":x,children:[j,v]}),e[45]=d,e[46]=x,e[47]=j,e[48]=v,e[49]=S):S=e[49],S}function Et(i){return s.jsxs("div",{className:"border-r px-2 py-1.5 text-xs text-muted-foreground last:border-r-0",children:[ot[i.getMonth()]?.slice(0,3)," ",i.getFullYear()]},i.getTime())}function Ot(i){return ue(i,ae)}function Mt(i){return ue(i,-ae)}function $t(i){return i.bar!==null}function Vt(i){return i.window}function At(i){const e=Q.c(89),{row:t,decofile:n,meta:l,uses:a,pending:c,holdsCopy:o,onBack:m,onOpenUse:u,onSave:r}=i,p=oe(),d=n[de];let x;e[0]!==t.window.start?(x=je(t.window.start),e[0]=t.window.start,e[1]=x):x=e[1];let j;e[2]!==t.window.end?(j=je(t.window.end),e[2]=t.window.end,e[3]=j):j=e[3];let v;e[4]!==d||e[5]!==x||e[6]!==j?(v={block:d,start:x,end:j},e[4]=d,e[5]=x,e[6]=j,e[7]=v):v=e[7];const S=v,[R,X]=re.useState(S),[b,q]=re.useState(S.start),[f,M]=re.useState(S.end);o&&b===R.start&&f===R.end&&Ct(S.block,R.block)&&(X(S),q(S.start),M(S.end));const T=Ue("campaigns",i);let $;e[8]!==f||e[9]!==b?($=it(b,f),e[8]=f,e[9]=b,e[10]=$):$=e[10];const N=$,P=o?R:S,F="window"in N&&(b!==P.start||f!==P.end);let V;e[11]!==n||e[12]!==l||e[13]!==t.name||e[14]!==a?(V=He("campaigns",t.name,a,n,l),e[11]=n,e[12]=l,e[13]=t.name,e[14]=a,e[15]=V):V=e[15];const{useRows:D,wholeRows:_}=V;let A;e[16]!==n||e[17]!==f||e[18]!==o||e[19]!==r||e[20]!==t.name||e[21]!==R||e[22]!==b||e[23]!==N?(A=()=>{if(!("window"in N))return;const te=Je(n,"campaigns",t.name,N.window);if(!te||!o){r(te);return}r({...te,basis:{[de]:R.block}}).then(le=>{le&&X({block:te.writes[de],start:b,end:f})})},e[16]=n,e[17]=f,e[18]=o,e[19]=r,e[20]=t.name,e[21]=R,e[22]=b,e[23]=N,e[24]=A):A=e[24];const I=A;let B;e[25]!==p?(B=p("sandbox.dateCampaigns.allCampaigns"),e[25]=p,e[26]=B):B=e[26];let k;e[27]!==m||e[28]!==B?(k={label:B,onClick:m},e[27]=m,e[28]=B,e[29]=k):k=e[29];let E;e[30]!==i?(E=s.jsx(Qe,{kind:"campaigns",detail:i}),e[30]=i,e[31]=E):E=e[31];let y;e[32]!==k||e[33]!==E?(y=s.jsx(ve,{back:k,actions:E}),e[32]=k,e[33]=E,e[34]=y):y=e[34];let g;e[35]===Symbol.for("react.memo_cache_sentinel")?(g=fe("flex max-w-2xl flex-col gap-6",Ce),e[35]=g):g=e[35];let h;e[36]!==t.status?(h=s.jsx(_e,{status:t.status}),e[36]=t.status,e[37]=h):h=e[37];let C;e[38]!==t.entryState||e[39]!==t.name||e[40]!==h?(C=s.jsx(Ge,{kind:"campaigns",name:t.name,status:h,entryState:t.entryState}),e[38]=t.entryState,e[39]=t.name,e[40]=h,e[41]=C):C=e[41];let W;e[42]!==f||e[43]!==b?(W=s.jsx(nt,{idPrefix:"campaign",className:"max-w-md",start:b,end:f,onStartChange:q,onEndChange:M}),e[42]=f,e[43]=b,e[44]=W):W=e[44];let L;e[45]!==p||e[46]!==N?(L="problem"in N&&s.jsx("p",{className:"text-xs text-destructive",children:p("sectionsEditor.namedRules.endBeforeStart")}),e[45]=p,e[46]=N,e[47]=L):L=e[47];let se;e[48]!==t.status||e[49]!==p?(se=t.status==="unreadable"&&s.jsx("p",{className:"text-xs text-muted-foreground",children:p("sandbox.dateCampaigns.unreadableHint")}),e[48]=t.status,e[49]=p,e[50]=se):se=e[50];let ie;e[51]!==p?(ie=p("sectionsEditor.namedRules.windowHint"),e[51]=p,e[52]=ie):ie=e[52];let U;e[53]!==ie?(U=s.jsx("p",{className:"text-xs text-muted-foreground",children:ie}),e[53]=ie,e[54]=U):U=e[54];let H;e[55]!==t.publishedWindow||e[56]!==p?(H=t.publishedWindow&&s.jsx("p",{className:"text-xs text-muted-foreground",children:p("sandbox.dateCampaigns.publishedWindow",{window:be(t.publishedWindow,p("sectionsEditor.namedRulePicker.alwaysRunning"))})}),e[55]=t.publishedWindow,e[56]=p,e[57]=H):H=e[57];const ne=c||!F;let w;e[58]!==p?(w=p("sandbox.dateCampaigns.saveDates"),e[58]=p,e[59]=w):w=e[59];let O;e[60]!==I||e[61]!==ne||e[62]!==w?(O=s.jsx("div",{children:s.jsx(me,{size:"sm",disabled:ne,onClick:I,children:w})}),e[60]=I,e[61]=ne,e[62]=w,e[63]=O):O=e[63];let z;e[64]!==W||e[65]!==L||e[66]!==se||e[67]!==U||e[68]!==H||e[69]!==O?(z=s.jsxs("section",{className:"flex flex-col gap-2",children:[W,L,se,U,H,O]}),e[64]=W,e[65]=L,e[66]=se,e[67]=U,e[68]=H,e[69]=O,e[70]=z):z=e[70];let G;e[71]!==c||e[72]!==T||e[73]!==_.length?(G=s.jsx(Ye,{kind:"campaigns",id:"campaign-name",rename:T,pending:c,wholeUses:_.length}),e[71]=c,e[72]=T,e[73]=_.length,e[74]=G):G=e[74];const Z=!a,ee=!!a?.published;let Y;e[75]!==u||e[76]!==Z||e[77]!==ee||e[78]!==D||e[79]!==_?(Y=s.jsx(Xe,{kind:"campaigns",rows:D,wholeRows:_,loading:Z,marked:ee,onOpen:u}),e[75]=u,e[76]=Z,e[77]=ee,e[78]=D,e[79]=_,e[80]=Y):Y=e[80];let K;e[81]!==C||e[82]!==z||e[83]!==G||e[84]!==Y?(K=s.jsx(ye,{className:"min-h-0 flex-1",children:s.jsxs("div",{className:g,children:[C,z,G,Y]})}),e[81]=C,e[82]=z,e[83]=G,e[84]=Y,e[85]=K):K=e[85];let J;return e[86]!==y||e[87]!==K?(J=s.jsxs("div",{className:"flex h-full w-full flex-col",children:[y,K]}),e[86]=y,e[87]=K,e[88]=J):J=e[88],J}function ke(){const i=Q.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:"flex flex-col gap-3 p-4","data-testid":"calendar-skeleton","aria-busy":"true",children:[s.jsx(we,{className:"h-6 w-40"}),s.jsx(we,{className:"h-40 w-full"})]}),i[0]=e):e=i[0],e}function Bt(i){const e=Q.c(22),{virtualMcpId:t}=i,n=oe(),{openPanel:l}=ct();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(pe,{size:28,className:"text-muted-foreground"}),e[0]=a):a=e[0];let c;e[1]!==n?(c=n("sandbox.calendarView.noDraft.title"),e[1]=n,e[2]=c):c=e[2];let o;e[3]!==n?(o=n("sandbox.calendarView.noDraft.desc"),e[3]=n,e[4]=o):o=e[4];let m;e[5]!==n?(m=n("sandbox.calendarView.loadFailed"),e[5]=n,e[6]=m):m=e[6];let u;e[7]!==n?(u=n("sandbox.calendarView.loadFailedHint"),e[7]=n,e[8]=u):u=e[8];let r;e[9]!==c||e[10]!==o||e[11]!==m||e[12]!==u?(r={noDraftTitle:c,noDraftDesc:o,loadFailed:m,loadFailedHint:u},e[9]=c,e[10]=o,e[11]=m,e[12]=u,e[13]=r):r=e[13];let p;e[14]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(ke,{}),e[14]=p):p=e[14];let d;e[15]!==l||e[16]!==t?(d=j=>{const{orgSlug:v,branch:S,decofile:R,meta:X}=j;return s.jsx("div",{className:"h-full w-full","data-testid":"calendar-view",children:s.jsx(kt,{orgSlug:v,virtualMcpId:t,branch:S,decofile:R,meta:X,initialView:"timeline",onOpenUse:b=>l("content",{search:q=>({...q,...Ze(b)})})})})},e[15]=l,e[16]=t,e[17]=d):d=e[17];let x;return e[18]!==r||e[19]!==d||e[20]!==t?(x=s.jsx(et,{virtualMcpId:t,icon:a,copy:r,skeleton:p,children:d}),e[18]=r,e[19]=d,e[20]=t,e[21]=x):x=e[21],x}function zt(){const i=Q.c(5),e=ft(),t=dt(e);if(pt(t)){let l;return i[0]!==e?(l=s.jsx(Bt,{virtualMcpId:e}),i[0]=e,i[1]=l):l=i[1],l}if(t==="loading"){let l;return i[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(ke,{}),i[2]=l):l=i[2],l}let n;return i[3]!==e?(n=s.jsx(ut,{virtualMcpId:e}),i[3]=e,i[4]=n):n=i[4],n}function Ca(){const i=Q.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(De.Content,{actions:s.jsx(Ie,{blocksOnly:!0}),children:s.jsx(zt,{})}),i[0]=e):e=i[0],e}export{Ca as default};
@@ -0,0 +1 @@
1
+ import{c as M,j as i,r as _,M as F,b as w,a4 as L,W as U,R as W,e as $}from"./index-DQge_BLv.js";import{C as D}from"./index-D3KLhYWS.js";import{u as B}from"./use-mcp-client-DVzTP9Z-.js";import{C as H,a as K}from"./companion-mcps-section-BdCI0EqY.js";import{c as q}from"./use-connect-companion-5d_OtePL.js";import{C as v,a as z}from"./connect-layout-BmSP5LrN.js";import{p as G}from"./self-tool-result-8OxPN9Nm.js";import{a as J}from"./use-panel-navigate-DJWYue4p.js";import"./use-mobile-C_KOoyX9.js";import"./use-sidebar-collapsed-DM0SNXB-.js";import"./use-chat-layout-state-DtHD302s.js";import"./thread-route-BhHeUYXo.js";import"./thread-intent-BXZYb_rR.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-CDjDlASu.js";import"./task-board-DCXqqZ12.js";import"./schema-CiJGpkKp.js";import"./slugify-CEUa2lfQ.js";import"./agent-icon-DO8s6ea2.js";import"./AlertCircle-DaqrzQLf.js";import"./Tool01-BdswuHJy.js";import"./ArrowUp-DzUcbY_U.js";import"./ArrowLeft-Lry57YLT.js";import"./LinkBroken01-BFQs5QxW.js";import"./ShoppingBag01-DB7ytToi.js";import"./ZoomOut-DIZKZikC.js";import"./Building02-Czpjl0U5.js";import"./CheckCircle-BNPESArO.js";import"./ChevronUp-DYWuPRic.js";import"./ChevronSelectorVertical-DZn3JZt3.js";import"./UserSquare-BhJx3glH.js";import"./Copy01-E_QbCxA-.js";import"./CreditCard01-i2HOt1aB.js";import"./DotsVertical-CbdEruUk.js";import"./Image01-DoQzA6mU.js";import"./Globe04-QDIAkI_1.js";import"./SwitchHorizontal01-DoMMYhWx.js";import"./Key01-yX9At---.js";import"./Link01-DdjCKN6E.js";import"./Minus-BvbXf1Sp.js";import"./Monitor01-CGq_FB6g.js";import"./Sun-DoDvwdQj.js";import"./Play-ChXZcgWf.js";import"./Plus-AFrvUoUc.js";import"./SearchMd-DSPN9QxV.js";import"./Trash01-B0glQHgK.js";import"./Upload01-BY0gIDxJ.js";import"./Users01-CfcMu04c.js";import"./XClose-wH9pi_Oq.js";import"./tooltip--hQ071uj.js";import"./index-Br9i6zHp.js";import"./toolbar-icon-button-B0tBxUCb.js";import"./shell-layout-CTdQsY_z.js";import"./use-deployment-admin-D9U88a6V.js";import"./admin-fetch-BhTJlAsX.js";import"./use-project-scope-DmeYK8Bq.js";import"./repository-binding-BSdKE2Qo.js";import"./use-clock-tick-DsgVgaMj.js";import"./command-D_wtag_V.js";import"./index-CWrjSpv6.js";import"./integration-icon-C5QUXJ-_.js";import"./project-icon-B0SToVzq.js";import"./new-project-dialog-D-A0zxil.js";import"./label-nAynIzRB.js";import"./repository-import-picker-DL_KXsuZ.js";import"./use-navigate-to-agent-CakeCNXj.js";import"./repository-picker-DR1imeoJ.js";import"./github-icon-CwEeHUg2.js";import"./useInfiniteQuery-DW7gjDqh.js";import"./infiniteQueryObserver-CJSP-r-Q.js";import"./collection-search-DKNF_aHL.js";import"./use-debounced-value-BC9-VsXG.js";import"./use-organization-settings-BgGp5lk4.js";import"./required-auth-layout-BfYIPzIZ.js";import"./autosend-BE8sRUrR.js";import"./use-org-sso-AxQjuMiC.js";import"./sheet-Dwf0d2yk.js";import"./resizable-STcRbiPL.js";import"./auth-Bh5UNoqX.js";import"./site-url-en5df9c-.js";import"./companions-core-DzyeM-yJ.js";import"./metadata-D72DunRR.js";import"./github-repo-scope-ByTYKy_L.js";import"./form-CqcvGBPS.js";import"./icon-button-DpHJ-JqO.js";import"./provision-repo-scoped-github-connection-lckxpDHD.js";import"./useQueries-Bzc1vZ08.js";import"./authenticate-and-persist-oauth-BvbYgtDL.js";import"./mcp-oauth-zNBrv-Zt.js";import"./mcp-oauth-CscDp9_t.js";import"./track-DS8BOtu9.js";import"./extract-connection-data-BbZfot_J.js";import"./connection-SI3MUziU.js";import"./url-slug-oBnMGRk3.js";function Q(o){const t=M.c(7),{onClose:l}=o,n=w();let r;t[0]!==n?(r=n("routes.reportsOnboarding.connectModal.loadError"),t[0]=n,t[1]=r):r=t[1];let e;t[2]!==r?(e=i.jsx("p",{className:"text-sm text-muted-foreground",children:r}),t[2]=r,t[3]=e):e=t[3];let s;return t[4]!==l||t[5]!==e?(s=i.jsx(v,{onClose:l,footer:null,children:e}),t[4]=l,t[5]=e,t[6]=s):s=t[6],s}function V(){const o=M.c(10),{closePanel:t}=J();let l;o[0]!==t?(l=()=>t(),o[0]=t,o[1]=l):l=o[1];const n=l;let r;o[2]!==n?(r=()=>i.jsx(Q,{onClose:n}),o[2]=n,o[3]=r):r=o[3];let e;o[4]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx(H,{}),o[4]=e):e=o[4];let s;o[5]!==n?(s=i.jsx(_.Suspense,{fallback:i.jsx(v,{onClose:n,footer:null,children:e}),children:i.jsx(X,{onDone:n,onClose:n})}),o[5]=n,o[6]=s):s=o[6];let m;return o[7]!==r||o[8]!==s?(m=i.jsx("div",{className:"flex h-full min-h-0 flex-col overflow-hidden",children:i.jsx(F,{fallback:r,children:s})}),o[7]=r,o[8]=s,o[9]=m):m=o[9],m}function X(o){const t=M.c(46),{onDone:l,onClose:n}=o,r=w(),{org:e}=L();let s;t[0]!==e.id?(s=U.REPORTS(e.id),t[0]=e.id,t[1]=s):s=t[1];const m=s;let b;t[2]!==e.id||t[3]!==e.slug?(b={connectionId:W,orgId:e.id,orgSlug:e.slug},t[2]=e.id,t[3]=e.slug,t[4]=b):b=t[4];const a=B(b);let P;t[5]!==m||t[6]!==e||t[7]!==a?(P={selfClient:a,org:e,cdConnectionId:m},t[5]=m,t[6]=e,t[7]=a,t[8]=P):P=t[8];const c=q(P),[I,k]=_.useState(!1),[R,N]=_.useState(null);let y;t[9]!==a?(y={mutationFn:async A=>G(await a.callTool({name:"REPORTS_RUN",arguments:{siteUrl:A}})),retry:!1},t[9]=a,t[10]=y):y=t[10];const p=$(y);let E;t[11]!==l||t[12]!==p||t[13]!==c||t[14]!==r?(E=async()=>{if(N(null),c)try{await p.mutateAsync(c)}catch{N(r("routes.reportsOnboarding.connectModal.somethingWentWrong"));return}l()},t[11]=l,t[12]=p,t[13]=c,t[14]=r,t[15]=E):E=t[15];const O=E;let u;t[16]!==R?(u=R?i.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:R}):null,t[16]=R,t[17]=u):u=t[17];let f;t[18]!==p.isPending||t[19]!==r?(f=p.isPending?r("routes.reportsOnboarding.connectSourcesTab.refreshing"):r("routes.reportsOnboarding.connectSourcesTab.refresh"),t[18]=p.isPending,t[19]=r,t[20]=f):f=t[20];let d;t[21]!==O?(d=()=>{O()},t[21]=O,t[22]=d):d=t[22];let x;t[23]!==I||t[24]!==p.isPending||t[25]!==f||t[26]!==d?(x=i.jsx(z,{ready:I,pending:p.isPending,label:f,onClick:d}),t[23]=I,t[24]=p.isPending,t[25]=f,t[26]=d,t[27]=x):x=t[27];let g;t[28]!==u||t[29]!==x?(g=i.jsxs(i.Fragment,{children:[u,x]}),t[28]=u,t[29]=x,t[30]=g):g=t[30];let C;t[31]!==r?(C=r("routes.reportsOnboarding.connectSourcesTab.title"),t[31]=r,t[32]=C):C=t[32];let h;t[33]!==C?(h=i.jsx("h2",{className:"text-xl font-medium leading-tight text-foreground",children:C}),t[33]=C,t[34]=h):h=t[34];let S;t[35]!==m||t[36]!==e||t[37]!==c?(S=i.jsx(K,{org:e,cdConnectionId:m,siteUrl:c,onReadinessChange:k}),t[35]=m,t[36]=e,t[37]=c,t[38]=S):S=t[38];let j;t[39]!==h||t[40]!==S?(j=i.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-8 overflow-y-auto",children:[h,S]}),t[39]=h,t[40]=S,t[41]=j):j=t[41];let T;return t[42]!==n||t[43]!==g||t[44]!==j?(T=i.jsx(v,{onClose:n,footer:g,children:j}),t[42]=n,t[43]=g,t[44]=j,t[45]=T):T=t[45],T}function $o(){const o=M.c(1);let t;return o[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(D.Content,{children:i.jsx(V,{})}),o[0]=t):t=o[0],t}export{$o as default};
@@ -0,0 +1 @@
1
+ import{c,j as e,bB as b,u as g}from"./index-DQge_BLv.js";import{C as j}from"./index-D3KLhYWS.js";import{F as v,H as S}from"./file-share-button-DcVhpMbp.js";import{c as k,a as y,e as _}from"./use-org-fs-CGLMPARk.js";import{S as w}from"./settings-tab-B7Vt0fWI.js";import{b as M}from"./thread-route-BhHeUYXo.js";import"./use-mobile-C_KOoyX9.js";import"./use-sidebar-collapsed-DM0SNXB-.js";import"./use-chat-layout-state-DtHD302s.js";import"./use-panel-navigate-DJWYue4p.js";import"./use-project-scope-DmeYK8Bq.js";import"./repository-binding-BSdKE2Qo.js";import"./use-mcp-client-DVzTP9Z-.js";import"./auth-Bh5UNoqX.js";import"./thread-intent-BXZYb_rR.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-CDjDlASu.js";import"./task-board-DCXqqZ12.js";import"./schema-CiJGpkKp.js";import"./slugify-CEUa2lfQ.js";import"./agent-icon-DO8s6ea2.js";import"./AlertCircle-DaqrzQLf.js";import"./Tool01-BdswuHJy.js";import"./ArrowUp-DzUcbY_U.js";import"./ArrowLeft-Lry57YLT.js";import"./LinkBroken01-BFQs5QxW.js";import"./ShoppingBag01-DB7ytToi.js";import"./ZoomOut-DIZKZikC.js";import"./Building02-Czpjl0U5.js";import"./CheckCircle-BNPESArO.js";import"./ChevronUp-DYWuPRic.js";import"./ChevronSelectorVertical-DZn3JZt3.js";import"./UserSquare-BhJx3glH.js";import"./Copy01-E_QbCxA-.js";import"./CreditCard01-i2HOt1aB.js";import"./DotsVertical-CbdEruUk.js";import"./Image01-DoQzA6mU.js";import"./Globe04-QDIAkI_1.js";import"./SwitchHorizontal01-DoMMYhWx.js";import"./Key01-yX9At---.js";import"./Link01-DdjCKN6E.js";import"./Minus-BvbXf1Sp.js";import"./Monitor01-CGq_FB6g.js";import"./Sun-DoDvwdQj.js";import"./Play-ChXZcgWf.js";import"./Plus-AFrvUoUc.js";import"./SearchMd-DSPN9QxV.js";import"./Trash01-B0glQHgK.js";import"./Upload01-BY0gIDxJ.js";import"./Users01-CfcMu04c.js";import"./XClose-wH9pi_Oq.js";import"./tooltip--hQ071uj.js";import"./index-Br9i6zHp.js";import"./toolbar-icon-button-B0tBxUCb.js";import"./shell-layout-CTdQsY_z.js";import"./use-deployment-admin-D9U88a6V.js";import"./admin-fetch-BhTJlAsX.js";import"./use-clock-tick-DsgVgaMj.js";import"./command-D_wtag_V.js";import"./index-CWrjSpv6.js";import"./integration-icon-C5QUXJ-_.js";import"./project-icon-B0SToVzq.js";import"./new-project-dialog-D-A0zxil.js";import"./label-nAynIzRB.js";import"./repository-import-picker-DL_KXsuZ.js";import"./use-navigate-to-agent-CakeCNXj.js";import"./repository-picker-DR1imeoJ.js";import"./github-icon-CwEeHUg2.js";import"./useInfiniteQuery-DW7gjDqh.js";import"./infiniteQueryObserver-CJSP-r-Q.js";import"./collection-search-DKNF_aHL.js";import"./use-debounced-value-BC9-VsXG.js";import"./use-organization-settings-BgGp5lk4.js";import"./required-auth-layout-BfYIPzIZ.js";import"./autosend-BE8sRUrR.js";import"./use-org-sso-AxQjuMiC.js";import"./sheet-Dwf0d2yk.js";import"./resizable-STcRbiPL.js";import"./popover-B6YbIo3T.js";import"./index-j4Z-ANHV.js";import"./extract-connection-data-BbZfot_J.js";import"./metadata-D72DunRR.js";import"./connection-SI3MUziU.js";import"./url-slug-oBnMGRk3.js";import"./chat-context-DJQNHpnm.js";import"./use-entitlements-DfzzXZIV.js";import"./use-ai-providers-C9yoEjqD.js";import"./location-V0VwTJTt.js";import"./use-decopilot-events-DQJQGAJY.js";import"./build-improve-prompt-doc-CwbtrjfW.js";import"./empty-state-DcLpc4zT.js";import"./use-date-fns-locale-1xKLCmLQ.js";import"./mcp-oauth-zNBrv-Zt.js";import"./mcp-oauth-CscDp9_t.js";import"./textarea-DgBaFzwD.js";import"./use-connection-DjcoL2xp.js";import"./use-debounced-autosave-DtGVwjBB.js";import"./add-connection-dialog-CHVJhgT5.js";import"./connection-card-wiFNcVPz.js";import"./connection-slug-CITJ0kGN.js";import"./drawer-CEKMK2Xy.js";import"./form-CqcvGBPS.js";import"./select-CrEvL5z9.js";import"./index-BdQq_4o_.js";import"./schema-2IXYlLNg.js";import"./connection-form-helpers-DEYmvQ4D.js";import"./authenticate-and-persist-oauth-BvbYgtDL.js";import"./collection-tabs-CymIaett.js";import"./badge-B1tWhSy_.js";import"./use-infinite-scroll-CrNt3X1z.js";import"./useSuspenseInfiniteQuery-CKl2j5ZP.js";import"./file-type-icon-lZJfDHey.js";import"./checkbox-yhLjvc2y.js";import"./search-input-BvepfDCp.js";import"./use-mcp-auth-status-B6pAOnY6.js";import"./types-vHdCIVHy.js";import"./use-mcp-tools-D-mu7r_B.js";import"./use-mcp-prompts-B9D-ZvCI.js";import"./utils-CVEq3hMx.js";import"./switch-yYhcctGB.js";import"./scroll-area-BCbl3S10.js";import"./experiments-tab-choice-DkauT2Jo.js";import"./use-project-native-view-presence-Dvt6yQe3.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-file-configs-BQsdB00T.js";import"./site-slug-DebpOoQq.js";import"./optimistic-project-sidebar-views-CFDUE-TH.js";import"./sections-BoMQy-an.js";import"./use-copy-BmESZuBQ.js";import"./virtual-mcp-DonQ6N9_.js";import"./sandbox-url-D3mC8qhT.js";import"./secret-picker-BFw_Vm2O.js";import"./use-secrets-CLn_8twS.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./app-preview-url-9Od4s8Sz.js";import"./serial-task-queue-CGOeQgpr.js";const x="home";function P(i){const t=c.c(5),{label:r}=i;let p;t[0]===Symbol.for("react.memo_cache_sentinel")?(p=e.jsx(b,{className:"aspect-video w-2/3 max-w-xl"}),t[0]=p):p=t[0];let o;t[1]!==r?(o=r&&e.jsx("p",{className:"text-xs text-muted-foreground",children:r}),t[1]=r,t[2]=o):o=t[2];let m;return t[3]!==o?(m=e.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-3 bg-background",children:[p,o]}),t[3]=o,t[4]=m):m=t[4],m}function D(i){const t=c.c(15),{path:r}=i;let p;t[0]===Symbol.for("react.memo_cache_sentinel")?(p={refetchIntervalWhenAbsent:2e3},t[0]=p):p=t[0];const o=k(x,r,p),m=y(x)(r);if(o.isPending||!o.data){const h=!o.isPending&&!o.data?"Waiting for the deck to sync…":void 0;let l;return t[1]!==h?(l=e.jsx(P,{label:h}),t[1]=h,t[2]=l):l=t[2],l}let s;t[3]!==o.data?(s=_(o.data),t[3]=o.data,t[4]=s):s=t[4];const f=o.data.shareMode??"private",u=o.data.effectivePublic??!1,d=window.location.origin+m;let a;t[5]!==r||t[6]!==f||t[7]!==u||t[8]!==d?(a=e.jsx(v,{volume:x,path:r,shareMode:f,effectivePublic:u,url:d}),t[5]=r,t[6]=f,t[7]=u,t[8]=d,t[9]=a):a=t[9];let n;return t[10]!==r||t[11]!==m||t[12]!==s||t[13]!==a?(n=e.jsx(S,{readUrl:m,marker:s,title:r,savePath:r,trailing:a}),t[10]=r,t[11]=m,t[12]=s,t[13]=a,t[14]=n):n=t[14],n}function C(){const i=c.c(4);let t;i[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},i[0]=t):t=i[0];const r=g(t),p=M(),o="path"in r&&typeof r.path=="string"?r.path:void 0;let m;return i[1]!==o||i[2]!==p?(m=o?e.jsx(D,{path:o},o):e.jsx(w,{virtualMcpId:p}),i[1]=o,i[2]=p,i[3]=m):m=i[3],m}function er(){const i=c.c(1);let t;return i[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx(j.Content,{children:e.jsx(C,{})}),i[0]=t):t=i[0],t}export{er as default};