decocms 4.285.0 → 4.286.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 (238) hide show
  1. package/dist/client/assets/{AlertCircle-Dh-7gjAb.js → AlertCircle-BGw3XlXk.js} +1 -1
  2. package/dist/client/assets/{AreaChart-BDhwnWiq.js → AreaChart-BmadQ3iU.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-u4Z_ZEIA.js → ArrowLeft-C_gfx94q.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-OL-jZKct.js → ArrowUp-Be3wdSNr.js} +1 -1
  5. package/dist/client/assets/{Check-7NzkCgMX.js → Check-DiujM3Bc.js} +1 -1
  6. package/dist/client/assets/{CheckCircle-Dshptf1P.js → CheckCircle-DcWCuiei.js} +1 -1
  7. package/dist/client/assets/{ChevronDown-Cq83UavT.js → ChevronDown-B9H-gqPt.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-BYfzjVa9.js → ChevronRight-zk3hjjG0.js} +1 -1
  9. package/dist/client/assets/{ChevronSelectorVertical-DBGHPnq7.js → ChevronSelectorVertical-CiZklIQA.js} +1 -1
  10. package/dist/client/assets/{ChevronUp-bumhqOl2.js → ChevronUp-BzNZuBSL.js} +1 -1
  11. package/dist/client/assets/{Copy01-D7QEOuO-.js → Copy01-Ce6E_Ifo.js} +1 -1
  12. package/dist/client/assets/{CreditCard01-C_k5ADvU.js → CreditCard01-BNnQurqN.js} +1 -1
  13. package/dist/client/assets/{DotsVertical-DtVYgEvK.js → DotsVertical-CuaVjEFE.js} +1 -1
  14. package/dist/client/assets/{Download01-D4OkE-EC.js → Download01-CLn3maXy.js} +1 -1
  15. package/dist/client/assets/{Eye-CUsQm8N_.js → Eye-DlNcBFBo.js} +1 -1
  16. package/dist/client/assets/{FilterLines-CqhY3DF8.js → FilterLines-DEGFannV.js} +1 -1
  17. package/dist/client/assets/{Globe01-hx5sMqeq.js → Globe01-B23V2Joo.js} +1 -1
  18. package/dist/client/assets/{Globe04-nj2uQFze.js → Globe04-Bo3nBCKm.js} +1 -1
  19. package/dist/client/assets/{HardDrive-CD-r2Q93.js → HardDrive-CS0V7I_b.js} +1 -1
  20. package/dist/client/assets/{Key01-xlS_KWo0.js → Key01-Cl-G8wdQ.js} +1 -1
  21. package/dist/client/assets/{LinkExternal01-vwahOhRy.js → LinkExternal01-6Eva3_re.js} +1 -1
  22. package/dist/client/assets/{LockUnlocked01-IFXnzckZ.js → LockUnlocked01-CN11iIqE.js} +1 -1
  23. package/dist/client/assets/{LogOut01-B9lIo2F_.js → LogOut01-JOlIpVYg.js} +1 -1
  24. package/dist/client/assets/{Monitor01-BJ9QIRPS.js → Monitor01-1s1dhhgC.js} +1 -1
  25. package/dist/client/assets/{Palette-BnaP_29I.js → Palette-Cutx8lDK.js} +1 -1
  26. package/dist/client/assets/{Play-D0ByOD8C.js → Play-D2y6v2GO.js} +1 -1
  27. package/dist/client/assets/{Plus-CcEdjxja.js → Plus-C6RnBW-5.js} +1 -1
  28. package/dist/client/assets/{SearchLg-D8g5Kgbo.js → SearchLg-vQ4mWmFa.js} +1 -1
  29. package/dist/client/assets/{SearchMd-BBajIKav.js → SearchMd-Cme8xHxY.js} +1 -1
  30. package/dist/client/assets/{Settings02-DUzoPIwN.js → Settings02-xVDbAjw7.js} +1 -1
  31. package/dist/client/assets/{Share07-BDaDw7G6.js → Share07-CgIIbXvb.js} +1 -1
  32. package/dist/client/assets/{Shield01-B-BJfu7d.js → Shield01-DWzLUFLj.js} +1 -1
  33. package/dist/client/assets/{Stars01-B1UsLz2z.js → Stars01-C0ceIy5a.js} +1 -1
  34. package/dist/client/assets/{Stars02-DfUQGOxC.js → Stars02-D3wWSFvd.js} +1 -1
  35. package/dist/client/assets/{Sun-B6HQumVJ.js → Sun-1LLuEmlt.js} +1 -1
  36. package/dist/client/assets/{SwitchHorizontal01-kEJ7zR_z.js → SwitchHorizontal01-LE5pNn35.js} +1 -1
  37. package/dist/client/assets/{Tool01-D4z-9IyH.js → Tool01-BOA3Hhno.js} +1 -1
  38. package/dist/client/assets/{Tool02-poIXBn7K.js → Tool02-qepgblpf.js} +1 -1
  39. package/dist/client/assets/{Trash01-Du6l42eB.js → Trash01-DbU5lEn8.js} +1 -1
  40. package/dist/client/assets/{TrendUp01-FHrvViJx.js → TrendUp01-BG3C69eq.js} +1 -1
  41. package/dist/client/assets/{Upload01-CwF6sGbA.js → Upload01-CZRgQZHh.js} +1 -1
  42. package/dist/client/assets/{User01-CZwTOyNO.js → User01-gcsNuBlu.js} +1 -1
  43. package/dist/client/assets/{UserSquare-CH3Ukoit.js → UserSquare-BnCNQ7NG.js} +1 -1
  44. package/dist/client/assets/{Users01-JQgg7RR7.js → Users01-1L3hBTBq.js} +1 -1
  45. package/dist/client/assets/{Users03-C3m1xGvF.js → Users03-GR2oALJt.js} +1 -1
  46. package/dist/client/assets/{XCircle-CkDL-6sY.js → XCircle-DHXzS_UE.js} +1 -1
  47. package/dist/client/assets/{XClose--TM9coN5.js → XClose-DN7n2l1K.js} +1 -1
  48. package/dist/client/assets/{YAxis-CB2o3UPr.js → YAxis-IIZkm6Pd.js} +1 -1
  49. package/dist/client/assets/{Zap-qaW4N8Xw.js → Zap-BzSAmKbo.js} +1 -1
  50. package/dist/client/assets/{ZapSquare-QOO_mGaz.js → ZapSquare-zh5y12_O.js} +1 -1
  51. package/dist/client/assets/{access-gate-CE6VufKS.js → access-gate-CBhluzKR.js} +1 -1
  52. package/dist/client/assets/{agent-icon-BsIxgFhP.js → agent-icon-D6UFUEyp.js} +1 -1
  53. package/dist/client/assets/{agents-list-bwOmphFn.js → agents-list-kv_vJJBq.js} +1 -1
  54. package/dist/client/assets/{ai-providers-DR5SMjNU.js → ai-providers-WMBiWVB1.js} +1 -1
  55. package/dist/client/assets/{alert-D5uiqJgi.js → alert-DRLJF3VA.js} +1 -1
  56. package/dist/client/assets/{alert-dialog-CQ58w2vU.js → alert-dialog-CJ6HPz9N.js} +1 -1
  57. package/dist/client/assets/{api-keys-CX0D5xjR.js → api-keys-bD_OqpgF.js} +1 -1
  58. package/dist/client/assets/{app-editor-B1XDPINZ.js → app-editor-DDia3knP.js} +1 -1
  59. package/dist/client/assets/{auth-1gDWBUqm.js → auth-LNmB6-r8.js} +1 -1
  60. package/dist/client/assets/{auth-catchall-B8PVyUGR.js → auth-catchall-Bj_OOHwi.js} +1 -1
  61. package/dist/client/assets/{auth-entry-Bi9dJKcm.js → auth-entry-DrGIwQE7.js} +1 -1
  62. package/dist/client/assets/{auth-split-layout-jC3SBvIk.js → auth-split-layout-t5lVTlh8.js} +1 -1
  63. package/dist/client/assets/{authenticate-and-persist-oauth-CQXkpjM6.js → authenticate-and-persist-oauth-abE4nlr8.js} +1 -1
  64. package/dist/client/assets/{automation-list-row-7IeAec2Y.js → automation-list-row-DEBz1PZ5.js} +1 -1
  65. package/dist/client/assets/{automation-runs-BZF73Twv.js → automation-runs-DvmtKa8G.js} +1 -1
  66. package/dist/client/assets/automations-BQ1zE1lw.js +1 -0
  67. package/dist/client/assets/{avatar-BX6Wn7ad.js → avatar-Bk95B5w8.js} +1 -1
  68. package/dist/client/assets/{badge-DHzlDsyN.js → badge-B2Zf6qZN.js} +1 -1
  69. package/dist/client/assets/{block-document-BuMszw-3.js → block-document-Dfh-563r.js} +1 -1
  70. package/dist/client/assets/{breadcrumb-NJrA-Ryq.js → breadcrumb-D-a6INvq.js} +1 -1
  71. package/dist/client/assets/{buckets-ClF6GhdJ.js → buckets-AcGnhT8r.js} +1 -1
  72. package/dist/client/assets/{bulk-category-panel-W4D8fxEj.js → bulk-category-panel-p3TNvbhg.js} +1 -1
  73. package/dist/client/assets/{capability-load-error-DxVvA5t-.js → capability-load-error-UIZj-j0m.js} +1 -1
  74. package/dist/client/assets/{cards-DPxlZ9hi.js → cards-Dzy79ZMy.js} +1 -1
  75. package/dist/client/assets/{category-editor-aOON_XzN.js → category-editor-6z-ynKee.js} +1 -1
  76. package/dist/client/assets/{chart-Bp736SCd.js → chart-CzT1O9dt.js} +1 -1
  77. package/dist/client/assets/{chat-context-BCk9ESt8.js → chat-context-CTjB2DFv.js} +1 -1
  78. package/dist/client/assets/{checkbox-CxWyyA9g.js → checkbox-CwLuHRXz.js} +1 -1
  79. package/dist/client/assets/{choose-editor-BlUWIO1O.js → choose-editor-0h8LisJM.js} +1 -1
  80. package/dist/client/assets/{cli-auth-success-B3fm_ACo.js → cli-auth-success-C63ZUYMU.js} +1 -1
  81. package/dist/client/assets/{collection-detail-C-G2UcWN.js → collection-detail-DyuXWD9X.js} +1 -1
  82. package/dist/client/assets/{collection-display-button-B0rozt4m.js → collection-display-button-WkkTdQiO.js} +1 -1
  83. package/dist/client/assets/{collection-search-C1aquL6N.js → collection-search-BZ-Q3I-u.js} +1 -1
  84. package/dist/client/assets/{collection-table-wrapper-W3HwUcY8.js → collection-table-wrapper-jDt3a0l0.js} +1 -1
  85. package/dist/client/assets/{collection-tabs-CmguGFdF.js → collection-tabs-DPjZex-Z.js} +1 -1
  86. package/dist/client/assets/{command-BVNULuVP.js → command-DfkgcKu8.js} +1 -1
  87. package/dist/client/assets/{commerce-onboarding-BoNpvYR1.js → commerce-onboarding-BdqD65r9.js} +1 -1
  88. package/dist/client/assets/{config-Bh_MXGvd.js → config-C053AB8T.js} +1 -1
  89. package/dist/client/assets/{connect-BH66Tqeg.js → connect-BSiXRQhd.js} +1 -1
  90. package/dist/client/assets/{connection-zOmDe8BP.js → connection-BQsZLYHP.js} +1 -1
  91. package/dist/client/assets/{connection-card-Clkgit0t.js → connection-card-C7MobTIK.js} +1 -1
  92. package/dist/client/assets/{connection-detail-O0UXTpsm.js → connection-detail-MU6BsxU6.js} +1 -1
  93. package/dist/client/assets/{connection-form-helpers-jW5lefOY.js → connection-form-helpers-DC83nWwS.js} +1 -1
  94. package/dist/client/assets/connections-BGS1paTU.js +1 -0
  95. package/dist/client/assets/constants-dLUUoWH7.js +1 -0
  96. package/dist/client/assets/{decopilot-sse-pool-CPW9JvWP.js → decopilot-sse-pool-A07DOCGf.js} +1 -1
  97. package/dist/client/assets/{dialog-DIhMaaGw.js → dialog-DveHs0kp.js} +1 -1
  98. package/dist/client/assets/{domain-settings-xHdX1pCD.js → domain-settings-C8ucuxUh.js} +1 -1
  99. package/dist/client/assets/{drawer-BVwqIJC7.js → drawer-CRhVZ0X7.js} +1 -1
  100. package/dist/client/assets/{dropdown-menu-BEARFG_o.js → dropdown-menu-BR_cSQLm.js} +1 -1
  101. package/dist/client/assets/{empty-state-CEA2FeJG.js → empty-state-CSneS9BU.js} +1 -1
  102. package/dist/client/assets/{extract-connection-data-DKX2cVxu.js → extract-connection-data-Dai3fHMk.js} +1 -1
  103. package/dist/client/assets/{file-explorer-BsHJqUke.js → file-explorer-Dlt8T-eE.js} +1 -1
  104. package/dist/client/assets/{file-type-icon-DUnETOmw.js → file-type-icon-CTS2wX2I.js} +1 -1
  105. package/dist/client/assets/{form-CTyArXLS.js → form-DPY4ZjEn.js} +1 -1
  106. package/dist/client/assets/general-D25Ymmu9.js +1 -0
  107. package/dist/client/assets/{github-repo-picker-CMXxBGYJ.js → github-repo-picker-DzT6Zs-M.js} +1 -1
  108. package/dist/client/assets/{hooks-B_kyLtT_.js → hooks-BBTWuwj0.js} +1 -1
  109. package/dist/client/assets/{index-BTEwT9kt.js → index-Bo3ENa71.js} +1 -1
  110. package/dist/client/assets/{index-wl6jNPYS.js → index-CUUhrBmX.js} +1 -1
  111. package/dist/client/assets/{index-oUYXP9Sz.js → index-Cwc5OUhn.js} +6 -6
  112. package/dist/client/assets/{index-CBtTXVkq.js → index-CwhEUWmk.js} +1 -1
  113. package/dist/client/assets/{index-BdNJPt0F.js → index-Cxlyb4Tg.js} +1 -1
  114. package/dist/client/assets/{index-DDB_h1yS.js → index-D08DKujt.js} +1 -1
  115. package/dist/client/assets/{index-VgfiW2a1.js → index-Dfnot3bs.js} +1 -1
  116. package/dist/client/assets/{index-BOXgq-jF.js → index-IhD4MlVw.js} +1 -1
  117. package/dist/client/assets/{index-EO6-2ljI.js → index-LPzaT2sc.js} +61 -61
  118. package/dist/client/assets/{index-redirect-CgjKizBW.js → index-redirect-CdiWvESd.js} +1 -1
  119. package/dist/client/assets/{index-BCOVXIKy.js → index-tJJOgsq4.js} +1 -1
  120. package/dist/client/assets/{infra-billing-B1ocD3OQ.js → infra-billing-C2F2Qt-N.js} +1 -1
  121. package/dist/client/assets/{input-CS1CqwLF.js → input-H1AQT31Q.js} +1 -1
  122. package/dist/client/assets/{integration-icon-CZyw67Zl.js → integration-icon-DnxesxSu.js} +1 -1
  123. package/dist/client/assets/{invite-member-dialog-DNrkWwG-.js → invite-member-dialog-kiZFlDTJ.js} +1 -1
  124. package/dist/client/assets/{label-CLQvZ6qi.js → label-CH7Mz6MF.js} +1 -1
  125. package/dist/client/assets/{layout-DheiUNwK.js → layout-CJs037de.js} +1 -1
  126. package/dist/client/assets/{login-CVxhk0lS.js → login-CrkMX2vj.js} +1 -1
  127. package/dist/client/assets/{mcp-oauth-DHOYyPCC.js → mcp-oauth-C4AEx9Qj.js} +1 -1
  128. package/dist/client/assets/{members-DqF4jmbK.js → members-nVR0C66u.js} +1 -1
  129. package/dist/client/assets/{monaco-editor-DbqpyEZF.js → monaco-editor-BBhZuVQY.js} +1 -1
  130. package/dist/client/assets/{monitoring-stats-row-Bj8UaSFz.js → monitoring-stats-row-CrhBPyxd.js} +1 -1
  131. package/dist/client/assets/{multi-select-Bh-s6f3z.js → multi-select--GOxbZFW.js} +1 -1
  132. package/dist/client/assets/{oauth-callback-BS2v1wnp.js → oauth-callback-BYMpBx-b.js} +1 -1
  133. package/dist/client/assets/{oauth-callback-ai-provider-XlQxKlZB.js → oauth-callback-ai-provider-Btw8m4Pw.js} +1 -1
  134. package/dist/client/assets/{onboarding-CjJxtlj7.js → onboarding-Cusp2Kco.js} +1 -1
  135. package/dist/client/assets/{org-layout-DETBZ-XV.js → org-layout-DYEMsp-k.js} +1 -1
  136. package/dist/client/assets/{organization-choice-BhToMU6s.js → organization-choice-H0x2yplX.js} +1 -1
  137. package/dist/client/assets/{orgs-DR3Q7yFh.js → orgs-C_TsjzsU.js} +1 -1
  138. package/dist/client/assets/{page-seo-form-HPf1gm3L.js → page-seo-form-BRpzwi34.js} +1 -1
  139. package/dist/client/assets/{popover-Du70JJ8v.js → popover-Kt90GgHN.js} +1 -1
  140. package/dist/client/assets/{post-calendar-C64gv1i6.js → post-calendar-Q7egXydN.js} +1 -1
  141. package/dist/client/assets/{post-editor-BbnabTmr.js → post-editor-3W4nlw2D.js} +1 -1
  142. package/dist/client/assets/{primitives-BVOE8_5e.js → primitives-Uy3Dn3l5.js} +1 -1
  143. package/dist/client/assets/{profile-C2inPAUQ.js → profile-BpnLekw3.js} +1 -1
  144. package/dist/client/assets/{project-app-view-DZLmYAmn.js → project-app-view-Bl_hd5Qi.js} +1 -1
  145. package/dist/client/assets/{prompts-4OH9DFq6.js → prompts-s5jy6ei-.js} +1 -1
  146. package/dist/client/assets/record-editor-rWc6R365.js +1 -0
  147. package/dist/client/assets/{redirect-editor-DMbkOVru.js → redirect-editor-DB6qYMS7.js} +1 -1
  148. package/dist/client/assets/registry-Dy5jw2xM.js +2 -0
  149. package/dist/client/assets/{registry-layout-BoHE-GY5.js → registry-layout-Bh_qys_B.js} +1 -1
  150. package/dist/client/assets/{reports-CT7V1DAL.js → reports-SCSdTqAq.js} +1 -1
  151. package/dist/client/assets/{require-capability-CMUdQk_S.js → require-capability-DkLXZoIE.js} +1 -1
  152. package/dist/client/assets/{required-auth-layout-QyxSrfmH.js → required-auth-layout-TicOmrWu.js} +1 -1
  153. package/dist/client/assets/{reset-password-BPxgK4yL.js → reset-password-CH0TbZtk.js} +1 -1
  154. package/dist/client/assets/review-settings-DTxUaKsw.js +1 -0
  155. package/dist/client/assets/{roles-B9ji1pZ6.js → roles-B_pshoUl.js} +1 -1
  156. package/dist/client/assets/{scroll-area-BsC8fs3Z.js → scroll-area-B4y7Uc4_.js} +1 -1
  157. package/dist/client/assets/{search-input-BBW-BSQq.js → search-input-ByGGbbuH.js} +1 -1
  158. package/dist/client/assets/{secrets-MglRXBRP.js → secrets-_ieMj3TA.js} +1 -1
  159. package/dist/client/assets/{sections-editor-X_aigLCX.js → sections-editor-DPLCdotd.js} +1 -1
  160. package/dist/client/assets/{select-model-Tfm7PXhx.js → select-model-BjrzakQK.js} +1 -1
  161. package/dist/client/assets/{select-CJGWFkMz.js → select-nNkfzHSn.js} +1 -1
  162. package/dist/client/assets/{self-tool-result-DUJsg9jD.js → self-tool-result-BCjIfrHl.js} +1 -1
  163. package/dist/client/assets/{seo-editor-BRFFTSFq.js → seo-editor-D0U1KWjh.js} +1 -1
  164. package/dist/client/assets/{settings-layout-RgK7-q1p.js → settings-layout-QoXDdekp.js} +1 -1
  165. package/dist/client/assets/{shell-controls-BXl-iO2Y.js → shell-controls-srlxCIc-.js} +1 -1
  166. package/dist/client/assets/{shell-layout-B5FYG03K.js → shell-layout-y0pc6Ps_.js} +1 -1
  167. package/dist/client/assets/{spinner-C8JJHaJh.js → spinner-BxT2-RQL.js} +1 -1
  168. package/dist/client/assets/{sso-Dc1JBx0y.js → sso-DMw9bkMB.js} +1 -1
  169. package/dist/client/assets/store-CwG7oz8f.js +1 -0
  170. package/dist/client/assets/store-registry-CaCvkkvW.js +2 -0
  171. package/dist/client/assets/{switch-CmT7vd5I.js → switch-FVvEKs7w.js} +1 -1
  172. package/dist/client/assets/{synced-repos-B313d08r.js → synced-repos-BWqJ5BRx.js} +1 -1
  173. package/dist/client/assets/{tab-id-BuzpcvG1.js → tab-id-B-MuWZyB.js} +1 -1
  174. package/dist/client/assets/{table-D8xezqnz.js → table-DPeHBel0.js} +1 -1
  175. package/dist/client/assets/{tabs-MK0MXP-i.js → tabs-ClBY3Swc.js} +1 -1
  176. package/dist/client/assets/task-board-Cc9n4YDI.js +1 -0
  177. package/dist/client/assets/{tasks-Bc1J7sns.js → tasks-B24sGOdi.js} +1 -1
  178. package/dist/client/assets/{textarea-BWuuXli5.js → textarea-5UXjbrfA.js} +1 -1
  179. package/dist/client/assets/{toggle-group-B-or7VaV.js → toggle-group-BRrB6fNL.js} +1 -1
  180. package/dist/client/assets/{toolbar-D87bPhTv.js → toolbar-CtyPj6Jz.js} +1 -1
  181. package/dist/client/assets/{track-D0LLsFKs.js → track-Baz2c1uX.js} +1 -1
  182. package/dist/client/assets/{types-CHJM6oAY.js → types-D-eDMOji.js} +1 -1
  183. package/dist/client/assets/{use-ai-providers-r2nELlbF.js → use-ai-providers-C5pRAYMe.js} +1 -1
  184. package/dist/client/assets/{use-api-keys-Cb_lTzxG.js → use-api-keys-CZgi0Ffw.js} +1 -1
  185. package/dist/client/assets/{use-automations-CP79GEVT.js → use-automations-DgdPB5W5.js} +1 -1
  186. package/dist/client/assets/{use-autosave-gGr-Dml_.js → use-autosave-CKwEOpyw.js} +1 -1
  187. package/dist/client/assets/{use-commerce-diagnostic-1YPXhdLe.js → use-commerce-diagnostic-C-6WH25O.js} +1 -1
  188. package/dist/client/assets/{use-connection-C4rbYT9U.js → use-connection-09ezQVmp.js} +1 -1
  189. package/dist/client/assets/{use-copy-DDgWyrmF.js → use-copy-3AwQB8Iu.js} +1 -1
  190. package/dist/client/assets/{use-create-virtual-mcp-CDH376MU.js → use-create-virtual-mcp-DBiwi9ad.js} +1 -1
  191. package/dist/client/assets/{use-debounced-autosave-BJLjZv1Y.js → use-debounced-autosave-W2VmKoU8.js} +1 -1
  192. package/dist/client/assets/{use-debounced-value-CsoIynGe.js → use-debounced-value-DRya_SIM.js} +1 -1
  193. package/dist/client/assets/{use-decopilot-events-NJyKRVI4.js → use-decopilot-events-KsVmeo4N.js} +1 -1
  194. package/dist/client/assets/{use-delete-connection-BSiNhmb5.js → use-delete-connection-BMflGo_0.js} +1 -1
  195. package/dist/client/assets/{use-deployment-admin-5nvEGW4f.js → use-deployment-admin-CqaCx9zD.js} +1 -1
  196. package/dist/client/assets/{use-file-configs-CmZnnBdt.js → use-file-configs-B34ZlHyv.js} +1 -1
  197. package/dist/client/assets/{use-infinite-scroll-DhoN_tOr.js → use-infinite-scroll-CXfjhv8u.js} +1 -1
  198. package/dist/client/assets/{use-join-requests-DoFMvuLM.js → use-join-requests-BQMQ0atp.js} +1 -1
  199. package/dist/client/assets/{use-mcp-auth-status-AP-IvVj7.js → use-mcp-auth-status-BbOwCYFJ.js} +1 -1
  200. package/dist/client/assets/{use-mcp-client-C6aEVcPT.js → use-mcp-client-DDri_uok.js} +1 -1
  201. package/dist/client/assets/{use-mcp-tools-B0tnIykD.js → use-mcp-tools-D39UBufk.js} +1 -1
  202. package/dist/client/assets/{use-members-Cs_3dQbg.js → use-members-CBxZJhy7.js} +1 -1
  203. package/dist/client/assets/{use-navigate-to-agent-CkkcsB_L.js → use-navigate-to-agent-Bf4VINKK.js} +1 -1
  204. package/dist/client/assets/{use-org-auth-client-BmwDaxX4.js → use-org-auth-client-CNZVyny3.js} +1 -1
  205. package/dist/client/assets/{use-org-repo-syncs-B6ZzK2Kw.js → use-org-repo-syncs-BsKGoRHN.js} +1 -1
  206. package/dist/client/assets/{use-org-sso-Bk_7LXrK.js → use-org-sso-CrDXOfve.js} +1 -1
  207. package/dist/client/assets/{use-organization-roles-CBDualiz.js → use-organization-roles-C97DSxT9.js} +1 -1
  208. package/dist/client/assets/use-organization-settings-CU8oKGH8.js +1 -0
  209. package/dist/client/assets/{use-registry-connections-Dju1XIn5.js → use-registry-connections-DXDW9BVj.js} +1 -1
  210. package/dist/client/assets/{use-secrets-BG54EwWa.js → use-secrets-DfX3lo5B.js} +1 -1
  211. package/dist/client/assets/{use-section-preview-base-F4LJDDsL.js → use-section-preview-base-B1_SCJCR.js} +1 -1
  212. package/dist/client/assets/{use-status-sounds-DXLkLFUb.js → use-status-sounds-BSLKT5kS.js} +1 -1
  213. package/dist/client/assets/{use-tags-B44sl-p2.js → use-tags-zhNtgkm6.js} +1 -1
  214. package/dist/client/assets/{use-task-board-items-BhAKhQpA.js → use-task-board-items-DMavIjbd.js} +1 -1
  215. package/dist/client/assets/{use-view-mode-D3hc6eU8.js → use-view-mode-Bnd5pIZB.js} +1 -1
  216. package/dist/client/assets/{use-virtual-mcp-C9_zCPTA.js → use-virtual-mcp-CQghEz4m.js} +1 -1
  217. package/dist/client/assets/useInfiniteQuery-zd1aocsL.js +1 -0
  218. package/dist/client/assets/useSuspenseInfiniteQuery-yqcuCGQU.js +1 -0
  219. package/dist/client/assets/{users-CYx0galZ.js → users-Dw_ixjEP.js} +1 -1
  220. package/dist/client/assets/{variant-calendar-BMAnShva.js → variant-calendar-x0ITYFPs.js} +1 -1
  221. package/dist/client/assets/{view-mode-toggle-CG3OVBS9.js → view-mode-toggle-BuC5FO49.js} +1 -1
  222. package/dist/client/index.html +1 -1
  223. package/dist/server/cli.js +533 -531
  224. package/dist/server/server.js +360 -358
  225. package/package.json +1 -1
  226. package/dist/client/assets/automations-CSa6XJ0r.js +0 -1
  227. package/dist/client/assets/connections-CrvJ-jbj.js +0 -1
  228. package/dist/client/assets/constants-BiE_kVyZ.js +0 -1
  229. package/dist/client/assets/general-DYRvk4ev.js +0 -1
  230. package/dist/client/assets/record-editor-MRYcq7Py.js +0 -1
  231. package/dist/client/assets/registry-_vfcdlun.js +0 -2
  232. package/dist/client/assets/review-settings-Jkf4LZC_.js +0 -1
  233. package/dist/client/assets/store-CtOn056h.js +0 -1
  234. package/dist/client/assets/store-registry-W3Jn--X1.js +0 -2
  235. package/dist/client/assets/task-board-BHpLFUa-.js +0 -1
  236. package/dist/client/assets/use-organization-settings-DmQrCvCR.js +0 -1
  237. package/dist/client/assets/useInfiniteQuery-BuAzVT7P.js +0 -1
  238. package/dist/client/assets/useSuspenseInfiniteQuery-jTqM94Cv.js +0 -1
@@ -0,0 +1 @@
1
+ import{c as P,H as Z,r as Y,j as i,B as ee,L as ge,ak as ue,an as ne,b as G,p as fe,aw as pe,ax as xe,e as re,q as te,t as F,K as oe,d6 as ie,d7 as se,d8 as Q,ay as he,Y as je,ac as Se,I as ae,cy as ze,cz as Ae,y as ve,P as W,d9 as be}from"./index-Cwc5OUhn.js";import{A as ye,b as _e}from"./alert-DRLJF3VA.js";import{i as Ce}from"./XCircle-DHXzS_UE.js";import{n as Oe}from"./LinkExternal01-6Eva3_re.js";import{s as De}from"./XClose-DN7n2l1K.js";import{u as Ne}from"./use-org-auth-client-CNZVyny3.js";import{u as we}from"./use-debounced-autosave-W2VmKoU8.js";import{A as Te}from"./avatar-Bk95B5w8.js";import{I as le}from"./input-H1AQT31Q.js";import{d as ce,S as Fe,a as ke,b as Pe,c as Ee}from"./select-nNkfzHSn.js";import{A as me}from"./agent-icon-D6UFUEyp.js";import{a as Ie,i as Le,d as Me}from"./constants-dLUUoWH7.js";import{u as Re}from"./use-virtual-mcp-CQghEz4m.js";import{g as Ve}from"./agent-capabilities-B52k7xCe.js";import{f as $e,i as qe}from"./use-organization-settings-CU8oKGH8.js";import{C as Be}from"./review-settings-DTxUaKsw.js";import{D as Ke}from"./domain-settings-C8ucuxUh.js";import{c as Ue,d as Ge,b as Qe,f as Ye,g as He,e as We,a as Ze,A as Je}from"./alert-dialog-CJ6HPz9N.js";import{R as Xe}from"./require-capability-DkLXZoIE.js";import"./User01-gcsNuBlu.js";import"./Check-DiujM3Bc.js";import"./ChevronDown-B9H-gqPt.js";import"./ChevronUp-BzNZuBSL.js";import"./AlertCircle-BGw3XlXk.js";import"./UserSquare-BnCNQ7NG.js";import"./Tool01-BOA3Hhno.js";import"./ArrowUp-Be3wdSNr.js";import"./ArrowLeft-C_gfx94q.js";import"./Tool02-qepgblpf.js";import"./TrendUp01-BG3C69eq.js";import"./ZapSquare-zh5y12_O.js";import"./Users03-GR2oALJt.js";import"./CheckCircle-DcWCuiei.js";import"./ChevronRight-zk3hjjG0.js";import"./ChevronSelectorVertical-CiZklIQA.js";import"./DotsVertical-CuaVjEFE.js";import"./Stars02-D3wWSFvd.js";import"./Copy01-Ce6E_Ifo.js";import"./CreditCard01-BNnQurqN.js";import"./Download01-CLn3maXy.js";import"./Settings02-xVDbAjw7.js";import"./Eye-DlNcBFBo.js";import"./FilterLines-DEGFannV.js";import"./Share07-CgIIbXvb.js";import"./Globe01-B23V2Joo.js";import"./Globe04-Bo3nBCKm.js";import"./SwitchHorizontal01-LE5pNn35.js";import"./HardDrive-CS0V7I_b.js";import"./Key01-Cl-G8wdQ.js";import"./LockUnlocked01-CN11iIqE.js";import"./LogOut01-JOlIpVYg.js";import"./Monitor01-1s1dhhgC.js";import"./Sun-1LLuEmlt.js";import"./Palette-Cutx8lDK.js";import"./Play-D2y6v2GO.js";import"./Plus-C6RnBW-5.js";import"./SearchLg-vQ4mWmFa.js";import"./SearchMd-Cme8xHxY.js";import"./Shield01-DWzLUFLj.js";import"./Stars01-C0ceIy5a.js";import"./Trash01-DbU5lEn8.js";import"./Upload01-CZRgQZHh.js";import"./Users01-1L3hBTBq.js";import"./Zap-BzSAmKbo.js";import"./use-mcp-client-DDri_uok.js";import"./auth-LNmB6-r8.js";import"./task-board-Cc9n4YDI.js";import"./switch-FVvEKs7w.js";import"./badge-B2Zf6qZN.js";import"./access-gate-CBhluzKR.js";import"./capability-load-error-UIZj-j0m.js";function de(e){return`connect-banner-dismissed:${e}`}function et(e){if(typeof window>"u")return!0;try{return localStorage.getItem(de(e))==="1"}catch{return!1}}function tt(){const e=P.c(17),{org:t}=Z();let s;e[0]!==t.id?(s=()=>et(t.id),e[0]=t.id,e[1]=s):s=e[1];const[l,c]=Y.useState(s);if(l)return null;let a;e[2]!==t.id?(a=()=>{c(!0);try{localStorage.setItem(de(t.id),"1")}catch{}},e[2]=t.id,e[3]=a):a=e[3];const d=a;let m;e[4]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(Oe,{}),e[4]=m):m=e[4];let o;e[5]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx("span",{children:"Use Studio MCP anywhere — paste a command into Claude Code, Cursor, Codex, or any MCP client."}),e[5]=o):o=e[5];let f;e[6]!==t.slug?(f={org:t.slug},e[6]=t.slug,e[7]=f):f=e[7];let n;e[8]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx(Ce,{size:12}),e[8]=n):n=e[8];let g;e[9]!==f?(g=i.jsx(ee,{asChild:!0,size:"sm",variant:"ghost",className:"text-xs gap-1",children:i.jsxs(ge,{to:"/$org/settings/connect",params:f,children:["Connect to clients ",n]})}),e[9]=f,e[10]=g):g=e[10];let r;e[11]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(De,{size:14}),e[11]=r):r=e[11];let u;e[12]!==d?(u=i.jsx(ee,{variant:"ghost",size:"icon",className:"size-7",onClick:d,"aria-label":"Dismiss",children:r}),e[12]=d,e[13]=u):u=e[13];let p;return e[14]!==g||e[15]!==u?(p=i.jsxs(ye,{variant:"info",className:"items-center",children:[m,i.jsxs(_e,{className:"flex-1 flex items-center justify-between gap-2 text-sm",children:[o,i.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[g,u]})]})]}),e[14]=g,e[15]=u,e[16]=p):p=e[16],p}const it=ue({name:ne().min(1,"Name is required").max(255,"Name is too long"),logo:ne().optional()});function st(e){const t=P.c(17),{value:s,onChange:l,name:c,disabled:a}=e,d=G(),m=Y.useRef(null);let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=()=>m.current?.click(),t[0]=o):o=t[0];const f=o;let n;t[1]!==l||t[2]!==d?(n=O=>{const x=O.target.files?.[0];if(!x)return;if(x.size>2097152){F.error(d("settings.organizationForm.imageTooLarge"));return}const h=new FileReader;h.onerror=()=>F.error(d("settings.organizationForm.failedToReadImage")),h.onloadend=()=>{h.result&&l(h.result),m.current&&(m.current.value="")},h.readAsDataURL(x)},t[1]=l,t[2]=d,t[3]=n):n=t[3];const g=n;let r;t[4]!==d?(r=d("settings.organizationForm.uploadLogoLabel"),t[4]=d,t[5]=r):r=t[5];let u;t[6]!==a||t[7]!==g?(u=i.jsx("input",{ref:m,type:"file",accept:"image/*",onChange:g,className:"hidden",disabled:a}),t[6]=a,t[7]=g,t[8]=u):u=t[8];const p=s||void 0,j=c??"?";let S;t[9]!==p||t[10]!==j?(S=i.jsx(Te,{url:p,fallback:j,shape:"square",size:"base"}),t[9]=p,t[10]=j,t[11]=S):S=t[11];let A;return t[12]!==a||t[13]!==r||t[14]!==u||t[15]!==S?(A=i.jsxs("button",{type:"button",onClick:f,disabled:a,className:"rounded-lg overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":r,children:[u,S]}),t[12]=a,t[13]=r,t[14]=u,t[15]=S,t[16]=A):A=t[16],A}function nt(){const e=G(),{org:t}=Z(),s=Ne(),l=fe(),c=pe({resolver:xe(it),values:{name:t.name??"",logo:t.logo??""}}),a=re({mutationFn:async n=>{const g={name:n.name};n.logo&&(g.logo=n.logo);const r=await s.organization.update({data:g});if(r?.error)throw new Error(r.error.message||e("settings.organizationForm.failedToUpdateOrg"));return r},onSuccess:(n,g)=>{te("organization_settings_updated",{organization_id:t.id,fields:Object.keys(g)}),l.invalidateQueries({queryKey:oe.organizations()}),l.invalidateQueries({queryKey:oe.activeOrganization(t.slug)}),F.success(e("settings.organizationForm.updateSuccess"))},onError:(n,g)=>{te("organization_settings_update_failed",{organization_id:t.id,fields:Object.keys(g),error:n instanceof Error?n.message:String(n)}),F.error(n instanceof Error?n.message:e("settings.organizationForm.failedToUpdateOrg"))}}),{schedule:d,flush:m}=we({save:async()=>{const n=c.control._formState.dirtyFields;if(Object.keys(n).length===0||!await c.trigger())return;const r=c.getValues(),u=c.control._defaultValues;c.reset(r,{keepValues:!0});try{await a.mutateAsync(r)}catch{c.reset(u,{keepValues:!0})}}}),o=c.formState.errors,f=typeof window<"u"?`${window.location.host}/`:"";return i.jsx(ie,{children:i.jsxs(se,{children:[i.jsx(Q,{title:e("settings.organizationForm.logoTitle"),description:e("settings.organizationForm.logoDescription"),action:i.jsx(st,{value:c.watch("logo"),onChange:n=>{c.setValue("logo",n??"",{shouldDirty:!0}),m()},name:c.watch("name")})}),i.jsx(Q,{title:e("settings.organizationForm.nameTitle"),action:i.jsx(he,{control:c.control,name:"name",render:({field:n})=>i.jsx(le,{id:"org-name",...n,onChange:g=>{n.onChange(g),d()},onBlur:()=>{n.onBlur(),m()},placeholder:e("settings.organizationForm.namePlaceholder"),className:"w-[280px]"})})}),i.jsx(Q,{title:e("settings.organizationForm.urlTitle"),description:e("settings.organizationForm.urlDescription"),action:i.jsxs("div",{className:"flex items-center w-[280px] rounded-md border border-input bg-muted/40 overflow-hidden",children:[f&&i.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:f}),i.jsx("span",{className:"flex-1 min-w-0 px-2 py-1.5 text-sm text-foreground truncate",children:t.slug})]})}),(o.name||o.logo)&&i.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[o.name&&i.jsx("p",{className:"text-xs text-destructive",children:o.name.message}),o.logo&&i.jsx("p",{className:"text-xs text-destructive",children:o.logo.message})]})]})})}const X="__super_agent__";function ot(){const e=P.c(42),t=G(),{org:s}=Z(),l=Re(),{mainAgentId:c}=$e(),a=qe();let d,m,o,f,n,g,r,u;if(e[0]!==l||e[1]!==c||e[2]!==s.id||e[3]!==a||e[4]!==t){const S=Ve(l),A=(l??[]).filter(lt).filter(z=>!S.has(z.id)).filter(rt);let O;e[13]!==s.id?(O=Ie(s.id),e[13]=s.id,e[14]=O):O=e[14];const x=O,h=c!=null?(l??[]).find(z=>z.id===c):void 0,D=h?h.id:X,N=h&&!A.some(z=>z.id===h.id)?[h,...A]:A;let C;e[15]!==l||e[16]!==a||e[17]!==x.title||e[18]!==t?(C=z=>{const _=z===X?null:z,E=_===null?x.title:(l??[]).find(T=>T.id===_)?.title??"";a.mutate(_,{onSuccess:()=>F.success(_===null?t("settings.mainAgent.resetToast"):t("settings.mainAgent.setToast",{title:E})),onError:()=>F.error(t("settings.mainAgent.errorToast"))})},e[15]=l,e[16]=a,e[17]=x.title,e[18]=t,e[19]=C):C=e[19];const w=C;m=Fe,n=D,g=w,r=a.isPending,e[20]===Symbol.for("react.memo_cache_sentinel")?(u=i.jsx(ke,{className:"w-full sm:w-[280px]",children:i.jsx(Pe,{})}),e[20]=u):u=e[20],d=Ee;let v;e[21]!==x.icon||e[22]!==x.title?(v=i.jsx(me,{icon:x.icon,name:x.title,size:"xs",className:"shrink-0"}),e[21]=x.icon,e[22]=x.title,e[23]=v):v=e[23];let b;e[24]!==t?(b=t("settings.mainAgent.superAgentOption"),e[24]=t,e[25]=b):b=e[25];let y;e[26]!==b?(y=i.jsx("span",{className:"truncate",children:b}),e[26]=b,e[27]=y):y=e[27],e[28]!==y||e[29]!==v?(o=i.jsx(ce,{value:X,children:i.jsxs("span",{className:"flex items-center gap-2",children:[v,y]})}),e[28]=y,e[29]=v,e[30]=o):o=e[30],f=N.map(at),e[0]=l,e[1]=c,e[2]=s.id,e[3]=a,e[4]=t,e[5]=d,e[6]=m,e[7]=o,e[8]=f,e[9]=n,e[10]=g,e[11]=r,e[12]=u}else d=e[5],m=e[6],o=e[7],f=e[8],n=e[9],g=e[10],r=e[11],u=e[12];let p;e[31]!==d||e[32]!==o||e[33]!==f?(p=i.jsxs(d,{children:[o,f]}),e[31]=d,e[32]=o,e[33]=f,e[34]=p):p=e[34];let j;return e[35]!==m||e[36]!==n||e[37]!==g||e[38]!==r||e[39]!==u||e[40]!==p?(j=i.jsxs(m,{value:n,onValueChange:g,disabled:r,children:[u,p]}),e[35]=m,e[36]=n,e[37]=g,e[38]=r,e[39]=u,e[40]=p,e[41]=j):j=e[41],j}function at(e){return i.jsx(ce,{value:e.id,children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(me,{icon:e.icon,name:e.title,size:"xs",className:"shrink-0"}),i.jsx("span",{className:"truncate",children:e.title})]})},e.id)}function rt(e){return!Me(e.id)}function lt(e){return!Le(e.id)}function ct(){const e=P.c(16),t=G();let s;e[0]!==t?(s=t("settings.mainAgent.title"),e[0]=t,e[1]=s):s=e[1];let l;e[2]!==t?(l=t("settings.mainAgent.description"),e[2]=t,e[3]=l):l=e[3];let c;e[4]!==t?(c=t("settings.mainAgent.itemTitle"),e[4]=t,e[5]=c):c=e[5];let a;e[6]!==t?(a=t("settings.mainAgent.itemDescription"),e[6]=t,e[7]=a):a=e[7];let d;e[8]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx(Y.Suspense,{fallback:i.jsx(je,{className:"h-9 w-[280px]"}),children:i.jsx(ot,{})}),e[8]=d):d=e[8];let m;e[9]!==c||e[10]!==a?(m=i.jsx(se,{children:i.jsx(Q,{title:c,description:a,action:d})}),e[9]=c,e[10]=a,e[11]=m):m=e[11];let o;return e[12]!==s||e[13]!==l||e[14]!==m?(o=i.jsx(ie,{title:s,description:l,children:m}),e[12]=s,e[13]=l,e[14]=m,e[15]=o):o=e[15],o}function mt(){const e=P.c(86),t=G(),{org:s}=Z(),[l,c]=Y.useState(!1),[a,d]=Y.useState(""),m=Se();let o;e[0]!==s.id||e[1]!==m?(o=async()=>{await m.call("ORGANIZATION_DELETE",{id:s.id})},e[0]=s.id,e[1]=m,e[2]=o):o=e[2];let f;e[3]!==s.id||e[4]!==s.slug||e[5]!==t?(f=()=>{te("organization_deleted",{organization_id:s.id}),localStorage.getItem(ae.lastOrgSlug())===s.slug&&localStorage.removeItem(ae.lastOrgSlug()),ze()?.org===s.slug&&Ae(),ve(),F.success(t("settings.deleteOrganizationSection.organizationDeleted")),window.location.href="/"},e[3]=s.id,e[4]=s.slug,e[5]=t,e[6]=f):f=e[6];let n;e[7]!==t?(n=k=>{F.error(k instanceof Error?k.message:t("settings.deleteOrganizationSection.failedToDeleteOrganization"))},e[7]=t,e[8]=n):n=e[8];let g;e[9]!==o||e[10]!==f||e[11]!==n?(g={mutationFn:o,onSuccess:f,onError:n},e[9]=o,e[10]=f,e[11]=n,e[12]=g):g=e[12];const r=re(g);let u;e[13]!==t?(u=t("settings.deleteOrganizationSection.dangerZone"),e[13]=t,e[14]=u):u=e[14];let p;e[15]!==t?(p=t("settings.deleteOrganizationSection.irreversibleActionsDescription"),e[15]=t,e[16]=p):p=e[16];let j;e[17]!==t?(j=t("settings.deleteOrganizationSection.deleteOrganizationTitle"),e[17]=t,e[18]=j):j=e[18];let S;e[19]!==t?(S=t("settings.deleteOrganizationSection.deleteOrganizationDescription"),e[19]=t,e[20]=S):S=e[20];let A;e[21]===Symbol.for("react.memo_cache_sentinel")?(A=()=>c(!0),e[21]=A):A=e[21];const O=r.isPending;let x;e[22]!==t?(x=t("settings.deleteOrganizationSection.deleteButton"),e[22]=t,e[23]=x):x=e[23];let h;e[24]!==r.isPending||e[25]!==x?(h=i.jsx(ee,{variant:"destructive",size:"sm",onClick:A,disabled:O,children:x}),e[24]=r.isPending,e[25]=x,e[26]=h):h=e[26];let D;e[27]!==h||e[28]!==j||e[29]!==S?(D=i.jsx(se,{className:"border-destructive/40",children:i.jsx(Q,{title:j,description:S,action:h})}),e[27]=h,e[28]=j,e[29]=S,e[30]=D):D=e[30];let N;e[31]!==D||e[32]!==u||e[33]!==p?(N=i.jsx(ie,{title:u,description:p,children:D}),e[31]=D,e[32]=u,e[33]=p,e[34]=N):N=e[34];let C;e[35]===Symbol.for("react.memo_cache_sentinel")?(C=k=>{c(k),k||d("")},e[35]=C):C=e[35];let w;e[36]!==t?(w=t("settings.deleteOrganizationSection.deleteOrganizationQuestion"),e[36]=t,e[37]=w):w=e[37];let v;e[38]!==w?(v=i.jsx(Ue,{children:w}),e[38]=w,e[39]=v):v=e[39];let b;e[40]!==s.name||e[41]!==t?(b=t("settings.deleteOrganizationSection.deleteWarning",{organizationName:s.name}),e[40]=s.name,e[41]=t,e[42]=b):b=e[42];let y;e[43]!==b?(y=i.jsx("p",{children:b}),e[43]=b,e[44]=y):y=e[44];let z;e[45]!==s.name||e[46]!==t?(z=t("settings.deleteOrganizationSection.typeToConfirm",{organizationName:s.name}),e[45]=s.name,e[46]=t,e[47]=z):z=e[47];let _;e[48]!==z?(_=i.jsx("p",{className:"mt-3 mb-1.5",children:z}),e[48]=z,e[49]=_):_=e[49];let E;e[50]===Symbol.for("react.memo_cache_sentinel")?(E=k=>d(k.target.value),e[50]=E):E=e[50];let T;e[51]!==a||e[52]!==s.name?(T=i.jsx(le,{value:a,onChange:E,placeholder:s.name,autoFocus:!0}),e[51]=a,e[52]=s.name,e[53]=T):T=e[53];let I;e[54]!==y||e[55]!==_||e[56]!==T?(I=i.jsx(Ge,{asChild:!0,children:i.jsxs("div",{children:[y,_,T]})}),e[54]=y,e[55]=_,e[56]=T,e[57]=I):I=e[57];let L;e[58]!==v||e[59]!==I?(L=i.jsxs(Qe,{children:[v,I]}),e[58]=v,e[59]=I,e[60]=L):L=e[60];let M;e[61]!==t?(M=t("settings.deleteOrganizationSection.cancel"),e[61]=t,e[62]=M):M=e[62];let R;e[63]!==M?(R=i.jsx(Ye,{children:M}),e[63]=M,e[64]=R):R=e[64];let V;e[65]!==r?(V=()=>r.mutate(),e[65]=r,e[66]=V):V=e[66];const J=a!==s.name||r.isPending;let $;e[67]!==r.isPending||e[68]!==t?($=r.isPending?t("settings.deleteOrganizationSection.deleting"):t("settings.deleteOrganizationSection.deleteOrganizationAction"),e[67]=r.isPending,e[68]=t,e[69]=$):$=e[69];let q;e[70]!==V||e[71]!==J||e[72]!==$?(q=i.jsx(He,{onClick:V,disabled:J,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50",children:$}),e[70]=V,e[71]=J,e[72]=$,e[73]=q):q=e[73];let B;e[74]!==R||e[75]!==q?(B=i.jsxs(We,{children:[R,q]}),e[74]=R,e[75]=q,e[76]=B):B=e[76];let K;e[77]!==L||e[78]!==B?(K=i.jsxs(Ze,{children:[L,B]}),e[77]=L,e[78]=B,e[79]=K):K=e[79];let U;e[80]!==l||e[81]!==K?(U=i.jsx(Je,{open:l,onOpenChange:C,children:K}),e[80]=l,e[81]=K,e[82]=U):U=e[82];let H;return e[83]!==N||e[84]!==U?(H=i.jsxs(i.Fragment,{children:[N,U]}),e[83]=N,e[84]=U,e[85]=H):H=e[85],H}function dt(){const e=P.c(12),t=G();let s;e[0]!==t?(s=t("settings.orgGeneral.organization"),e[0]=t,e[1]=s):s=e[1];let l;e[2]!==s?(l=i.jsx(W.Title,{children:s}),e[2]=s,e[3]=l):l=e[3];let c,a,d,m,o,f;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx(tt,{}),a=i.jsx(nt,{}),d=i.jsx(ct,{}),m=i.jsx(Be,{}),o=i.jsx(Ke,{}),f=i.jsx(mt,{}),e[4]=c,e[5]=a,e[6]=d,e[7]=m,e[8]=o,e[9]=f):(c=e[4],a=e[5],d=e[6],m=e[7],o=e[8],f=e[9]);let n;return e[10]!==l?(n=i.jsx(W,{children:i.jsx(W.Content,{children:i.jsx(W.Body,{children:i.jsxs(be,{children:[l,c,a,d,m,o,f]})})})}),e[10]=l,e[11]=n):n=e[11],n}function Ni(){const e=P.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(Xe,{capability:"org:manage",area:"general settings",children:i.jsx(dt,{})}),e[0]=t):t=e[0],t}export{Ni as default};
@@ -1 +1 @@
1
- import{c as M,j as t,H as de,a as ye,p as me,r as H,aU as le,b as ee,k as Z,e as ge,t as te,eQ as Ne,K as se,I as ke,o as ve,n as ae,B as re,z as Ce,C as Re}from"./index-oUYXP9Sz.js";import{a as we,b as Pe,d as Se,e as Ie}from"./dialog-DIhMaaGw.js";import{C as Te}from"./collection-search-C1aquL6N.js";import{u as _e}from"./use-debounced-value-CsoIynGe.js";import{b as he,u as Ee}from"./use-connection-C4rbYT9U.js";import{u as ne}from"./use-mcp-client-C6aEVcPT.js";import{W as Ae,S as pe}from"./constants-BiE_kVyZ.js";import{a as be}from"./authenticate-and-persist-oauth-CQXkpjM6.js";import{i as ue}from"./ArrowLeft-u4Z_ZEIA.js";import{n as ze}from"./LinkExternal01-vwahOhRy.js";import{n as Le}from"./LockUnlocked01-IFXnzckZ.js";import{u as Ge}from"./use-mcp-tools-B0tnIykD.js";import{e as Oe}from"./extract-connection-data-DKX2cVxu.js";import{c as Fe}from"./use-navigate-to-agent-CkkcsB_L.js";import{g as Ue,p as fe,f as He,G as xe}from"./provision-repo-scoped-github-connection-CMPWtdMv.js";function D(C){const e=M.c(4),{size:n,className:l}=C;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0016 8c0-4.42-3.58-8-8-8z"}),e[0]=x):x=e[0];let o;return e[1]!==l||e[2]!==n?(o=t.jsx("svg",{width:n,height:n,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",className:l,children:x}),e[1]=l,e[2]=n,e[3]=o):o=e[3],o}function $e(C,e){const n=M.c(12),{org:l}=de();let x;n[0]!==l.id?(x=Ae.REGISTRY(l.id),n[0]=l.id,n[1]=x):x=n[1];const o=x;let a;n[2]!==l.id||n[3]!==l.slug||n[4]!==o?(a={connectionId:o,orgId:l.id,orgSlug:l.slug},n[2]=l.id,n[3]=l.slug,n[4]=o,n[5]=a):a=n[5];const r=ne(a);let s;n[6]!==C?(s={name:C},n[6]=C,n[7]=s):s=n[7];const u=e?.enabled??!0;let k;return n[8]!==r||n[9]!==s||n[10]!==u?(k={client:r,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:s,enabled:u,staleTime:3e5,select:De},n[8]=r,n[9]=s,n[10]=u,n[11]=k):k=n[11],Ge(k)}function De(C){return C.structuredContent?.item??null}const Me="deco/mcp-github";function Be(C){const{org:e}=de(),{data:n}=ye.useSession(),l=he(),x=me(),[o,a]=H.useState("idle"),[r,s]=H.useState(null),[u,k]=H.useState(null),{data:v,isLoading:P}=$e(Me,{enabled:C.enabled}),f=H.useRef(!1);C.enabled&&v&&!P&&!f.current&&n?.user?.id&&o==="idle"&&(f.current=!0,d());async function d(){if(!(!v||!n?.user?.id||!e))try{a("installing"),s(null);const c=Oe(v,e.id,n.user.id,{remoteIndex:0});if(!c.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:h}=await l.create.mutateAsync(c);a("authenticating");const y=await be({connectionId:h,orgId:e.id,orgSlug:e.slug,persistFallback:g=>l.update.mutateAsync({id:h,data:{connection_token:g}}).then(()=>{})});if(y.ran&&!y.ok){try{await l.delete.mutateAsync(h)}catch{}throw new Error(y.error&&y.error!=="no token received"?y.error:"No token received from GitHub")}le(x,e.id),k(c),a("ready")}catch(c){s(c instanceof Error?c.message:String(c)),a("error")}}function m(){a("idle"),s(null),k(null),f.current=!1}return C.enabled&&P&&o==="idle"?{status:"installing",error:null,connection:null,retry:m}:{status:o,error:r,connection:u,retry:m}}function mt(C){const e=M.c(27),{open:n,onOpenChange:l,title:x,onImportComplete:o,mode:a}=C,r=a===void 0?"agent":a,s=ee();let u;e[0]!==r||e[1]!==s||e[2]!==x?(u=x??s(r==="connection"?"common.githubRepoPicker.addRepo":"common.githubRepoPicker.importFromGitHub"),e[0]=r,e[1]=s,e[2]=x,e[3]=u):u=e[3];const k=u,[v,P]=H.useState(null);let f;e[4]!==k?(f=t.jsx(we,{className:"sr-only",children:t.jsx(Pe,{children:k})}),e[4]=k,e[5]=f):f=e[5];let d;e[6]!==k||e[7]!==v||e[8]!==s?(d=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:v?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>P(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":s("common.githubRepoPicker.backToAccounts"),children:t.jsx(ue,{size:16})}),t.jsx("img",{src:v.avatarUrl,alt:v.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:v.login})]}):t.jsxs(t.Fragment,{children:[t.jsx(D,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:k})]})}),e[6]=k,e[7]=v,e[8]=s,e[9]=d):d=e[9];let m;e[10]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Z,{size:18,className:"animate-spin text-muted-foreground"})}),e[10]=m):m=e[10];let c;e[11]!==l?(c=()=>l(!1),e[11]=l,e[12]=c):c=e[12];let b;e[13]!==r||e[14]!==o||e[15]!==n||e[16]!==v||e[17]!==c?(b=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx(H.Suspense,{fallback:m,children:t.jsx(Qe,{open:n,onComplete:c,selectedInstallation:v,onSelectInstallation:P,onImportComplete:o,mode:r})})}),e[13]=r,e[14]=o,e[15]=n,e[16]=v,e[17]=c,e[18]=b):b=e[18];let h;e[19]!==f||e[20]!==d||e[21]!==b?(h=t.jsxs(Se,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[f,d,b]}),e[19]=f,e[20]=d,e[21]=b,e[22]=h):h=e[22];let y;return e[23]!==l||e[24]!==n||e[25]!==h?(y=t.jsx(Ie,{open:n,onOpenChange:l,children:h}),e[23]=l,e[24]=n,e[25]=h,e[26]=y):y=e[26],y}function Qe({open:C,onComplete:e,selectedInstallation:n,onSelectInstallation:l,onImportComplete:x,mode:o="agent"}){const a=ee(),{org:r}=de(),s=me(),u=Fe(),[k,v]=H.useState(null),P=Ee({slug:"mcp-github"}),f=Ue(P),d=Be({enabled:C&&f.length===0}),m=f.length===1?f[0]??null:k,c=ne({connectionId:m?.id??"",orgId:r.id,orgSlug:r.slug}),b=ne({connectionId:pe,orgId:r.id,orgSlug:r.slug}),h=async(i,j)=>{try{const I=await c.callTool({name:"get_file_contents",arguments:{owner:i.owner,repo:i.name,path:j}});if(I.isError)return null;const R=I.content?.find(w=>w.type==="resource")?.resource?.text;if(!R)return null;try{const w=JSON.parse(R);return typeof w=="string"?w:JSON.stringify(w)}catch{return R}}catch{return null}},y=(i,j)=>{Promise.all([h(j,"AGENTS.md"),h(j,"CLAUDE.md")]).then(async([N,I])=>{const T=N??I??null;T&&(await b.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:i,data:{metadata:{instructions:T}}}}),le(s,r.id))}).catch(N=>{console.error("GitHub instructions fetch failed:",N)})},g=ge({mutationFn:async i=>{if(!m||!n)throw new Error("No GitHub connection or installation");const j=n.installationId;if(o==="connection"){const{childConnectionId:R}=await fe({orgSlug:r.slug,sourceConnection:m,installationId:j,owner:i.owner,repo:i.name,githubCallTool:w=>c.callTool(w),selfCallTool:w=>b.callTool(w),orgShared:!0});return{virtualMcpId:null,repo:i,connectionId:R,item:null}}const{childConnectionId:N,reused:I}=await fe({orgSlug:r.slug,sourceConnection:m,installationId:j,owner:i.owner,repo:i.name,githubCallTool:R=>c.callTool(R),selfCallTool:R=>b.callTool(R)});let T=null;try{const R=await b.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:i.name,description:i.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:i.owner,name:i.name,url:i.url,installationId:j,connectionId:N},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:N}]}}}),w=R.structuredContent??R,_=w.item?.id;if(!w.item||!_)throw new Error("Failed to create the imported agent");return T=_,{virtualMcpId:_,repo:i,connectionId:N,item:w.item}}catch(R){throw T&&await b.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:T}}).catch(()=>{}),I||await b.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:N,force:!0}}).catch(()=>{}),R}},onSuccess:({virtualMcpId:i,repo:j,connectionId:N,item:I})=>{if(o==="connection"||!i||!I){if(le(s,r.id),Ne(s,r.id),x){x({virtualMcpId:null,repo:j,connectionId:N});return}te.success(a("common.githubRepoPicker.addedRepo",{name:j.name})),e();return}if(s.setQueryData(se.collectionItem(b,r.id,"","VIRTUAL_MCP",i),{item:I}),le(s,r.id),y(i,j),x){x({virtualMcpId:i,repo:j,connectionId:N});return}te.success(a("common.githubRepoPicker.importedRepo",{name:j.name})),e(),localStorage.setItem(ke.sidebarOpen(),JSON.stringify(!1)),u(i)},onError:(i,j)=>{console.error("GitHub import failed:",i);const N=i instanceof Error?i.message:a("common.githubRepoPicker.unknownError");if(j.fork&&N.toLowerCase().includes("mint")){te.error(a("common.githubRepoPicker.failedImportFork",{name:j.name}));return}te.error(a("common.githubRepoPicker.failedImport",{error:N}))}});return d.status==="installing"||d.status==="authenticating"?t.jsx(ce,{status:d.status,error:null,retry:d.retry}):d.status==="error"?t.jsx(ce,{status:"error",error:d.error,retry:d.retry}):f.length===0&&d.status==="idle"?t.jsx(ce,{status:"installing",error:null,retry:d.retry}):f.length>1&&!m?t.jsxs("div",{className:"flex flex-col py-2",children:[t.jsx("div",{className:"px-4 py-2",children:t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:a("common.githubRepoPicker.selectConnection")})}),f.map(i=>t.jsxs("button",{type:"button",onClick:()=>v(i),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[i.icon?t.jsx("img",{src:i.icon,alt:i.title,className:"size-7 rounded-full shrink-0"}):t.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:t.jsx(D,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:i.title})]},i.id))]}):m?n?t.jsx(Ke,{connectionId:m.id,orgId:r.id,orgSlug:r.slug,installation:n,onSelectRepo:i=>g.mutate(i),isSaving:g.isPending}):t.jsx(qe,{connectionId:m.id,orgId:r.id,orgSlug:r.slug,onSelect:l,showBackButton:f.length>1,onBack:()=>v(null)}):null}function qe(C){const e=M.c(124),{connectionId:n,orgId:l,orgSlug:x,onSelect:o,showBackButton:a,onBack:r}=C,s=ee();let u;e[0]!==l||e[1]!==x?(u={connectionId:pe,orgId:l,orgSlug:x},e[0]=l,e[1]=x,e[2]=u):u=e[2];const k=ne(u),v=me(),P=he();let f;e[3]!==n||e[4]!==l?(f=se.githubUserOrgs(l,n),e[3]=n,e[4]=l,e[5]=f):f=e[5];let d;e[6]!==n||e[7]!==k?(d=()=>He(p=>k.callTool(p),n),e[6]=n,e[7]=k,e[8]=d):d=e[8];let m;e[9]!==f||e[10]!==d?(m={queryKey:f,queryFn:d},e[9]=f,e[10]=d,e[11]=m):m=e[11];const c=ve(m);let b;e[12]!==P||e[13]!==n||e[14]!==c||e[15]!==l||e[16]!==x||e[17]!==v?(b=async()=>{const p=await be({connectionId:n,orgId:l,orgSlug:x,persistFallback:E=>P.update.mutateAsync({id:n,data:{connection_token:E}}).then(Ve)});if(p.ran&&!p.ok)throw new Error(p.error??"no token received");const S=new URL(`/api/${x}/mcp/${n}`,window.location.origin);await v.invalidateQueries({queryKey:se.isMCPAuthenticated(S.href,null)}),await v.invalidateQueries({queryKey:se.mcpClientPrefix()}),await c.refetch()},e[12]=P,e[13]=n,e[14]=c,e[15]=l,e[16]=x,e[17]=v,e[18]=b):b=e[18];let h;e[19]!==s?(h=p=>{te.error(s("common.githubRepoPicker.failedReconnect",{error:p instanceof Error?p.message:s("common.githubRepoPicker.unknownError")}))},e[19]=s,e[20]=h):h=e[20];let y;e[21]!==b||e[22]!==h?(y={mutationFn:b,onError:h},e[21]=b,e[22]=h,e[23]=y):y=e[23];const g=ge(y);if(c.isLoading){let p;return e[24]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Z,{size:18,className:"animate-spin text-muted-foreground"})}),e[24]=p):p=e[24],p}if(c.isError){let p;e[25]!==s?(p=s("common.githubRepoPicker.failedLoadAccounts"),e[25]=s,e[26]=p):p=e[26];let S;e[27]!==p?(S=t.jsx("p",{className:"text-sm text-destructive",children:p}),e[27]=p,e[28]=S):S=e[28];let E;e[29]!==s?(E=s("common.githubRepoPicker.connectionExpiredMessage"),e[29]=s,e[30]=E):E=e[30];let A;e[31]!==E?(A=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[280px] leading-relaxed",children:E}),e[31]=E,e[32]=A):A=e[32];let z;e[33]!==g?(z=()=>g.mutate(),e[33]=g,e[34]=z):z=e[34];const $=g.isPending;let L;e[35]!==g.isPending?(L=g.isPending?t.jsx(Z,{size:14,className:"animate-spin"}):t.jsx(D,{className:"size-3.5"}),e[35]=g.isPending,e[36]=L):L=e[36];let G;e[37]!==s?(G=s("common.githubRepoPicker.reconnectGitHub"),e[37]=s,e[38]=G):G=e[38];let O;e[39]!==g.isPending||e[40]!==z||e[41]!==L||e[42]!==G?(O=t.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:z,disabled:$,children:[L,G]}),e[39]=g.isPending,e[40]=z,e[41]=L,e[42]=G,e[43]=O):O=e[43];let U;return e[44]!==A||e[45]!==O||e[46]!==S?(U=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 text-center",children:[S,A,O]}),e[44]=A,e[45]=O,e[46]=S,e[47]=U):U=e[47],U}const i=c.data;if(!i)return null;if(i.installations.length===0){let p;e[48]!==r||e[49]!==a||e[50]!==s?(p=a&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(ue,{size:12}),s("common.githubRepoPicker.changeConnection")]})}),e[48]=r,e[49]=a,e[50]=s,e[51]=p):p=e[51];let S;e[52]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx("div",{className:"size-16 rounded-2xl bg-muted flex items-center justify-center",children:t.jsx(D,{className:"size-8 text-foreground"})}),e[52]=S):S=e[52];let E;e[53]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx("span",{className:"size-1.5 rounded-full bg-success"}),e[53]=E):E=e[53];let A;e[54]!==s?(A=s("common.githubRepoPicker.githubConnected"),e[54]=s,e[55]=A):A=e[55];let z;e[56]!==A?(z=t.jsxs("div",{className:"mt-4 flex items-center gap-1.5 text-xs font-medium text-success",children:[E,A]}),e[56]=A,e[57]=z):z=e[57];let $;e[58]!==s?($=s("common.githubRepoPicker.setupRepositoriesTitle"),e[58]=s,e[59]=$):$=e[59];let L;e[60]!==$?(L=t.jsx("h2",{className:"mt-2 text-base font-semibold text-foreground",children:$}),e[60]=$,e[61]=L):L=e[61];let G;e[62]!==s?(G=s("common.githubRepoPicker.noRepositoriesShared"),e[62]=s,e[63]=G):G=e[63];let O;e[64]!==G?(O=t.jsx("p",{className:"mt-1.5 max-w-[360px] text-xs leading-relaxed text-muted-foreground",children:G}),e[64]=G,e[65]=O):O=e[65];let U;e[66]!==s?(U=s("common.githubRepoPicker.chooseRepositories"),e[66]=s,e[67]=U):U=e[67];let ie;e[68]===Symbol.for("react.memo_cache_sentinel")?(ie=t.jsx(ze,{size:14}),e[68]=ie):ie=e[68];let B;e[69]!==U?(B=t.jsx(re,{asChild:!0,size:"sm",children:t.jsxs("a",{href:xe,target:"_blank",rel:"noopener noreferrer",children:[U,ie]})}),e[69]=U,e[70]=B):B=e[70];let Q;e[71]!==c?(Q=()=>{c.refetch()},e[71]=c,e[72]=Q):Q=e[72];const je=c.isFetching;let q;e[73]!==c.isFetching?(q=c.isFetching&&t.jsx(Z,{size:14,className:"animate-spin"}),e[73]=c.isFetching,e[74]=q):q=e[74];let V;e[75]!==s?(V=s("common.githubRepoPicker.checkAgain"),e[75]=s,e[76]=V):V=e[76];let K;e[77]!==c.isFetching||e[78]!==Q||e[79]!==q||e[80]!==V?(K=t.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:Q,disabled:je,children:[q,V]}),e[77]=c.isFetching,e[78]=Q,e[79]=q,e[80]=V,e[81]=K):K=e[81];let J;e[82]!==B||e[83]!==K?(J=t.jsxs("div",{className:"mt-5 flex items-center gap-2",children:[B,K]}),e[82]=B,e[83]=K,e[84]=J):J=e[84];let W;e[85]!==s?(W=s("common.githubRepoPicker.repositoryAccessNote"),e[85]=s,e[86]=W):W=e[86];let Y;e[87]!==W?(Y=t.jsx("p",{className:"mt-4 max-w-[360px] rounded-lg bg-muted/50 px-3 py-2 text-xs leading-relaxed text-muted-foreground",children:W}),e[87]=W,e[88]=Y):Y=e[88];let X;e[89]!==z||e[90]!==L||e[91]!==O||e[92]!==J||e[93]!==Y?(X=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center px-8 py-6 text-center",children:[S,z,L,O,J,Y]}),e[89]=z,e[90]=L,e[91]=O,e[92]=J,e[93]=Y,e[94]=X):X=e[94];let oe;return e[95]!==X||e[96]!==p?(oe=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[p,X]}),e[95]=X,e[96]=p,e[97]=oe):oe=e[97],oe}let j;e[98]!==r||e[99]!==a||e[100]!==s?(j=a&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(ue,{size:12}),s("common.githubRepoPicker.changeConnection")]})}),e[98]=r,e[99]=a,e[100]=s,e[101]=j):j=e[101];let N;if(e[102]!==i.installations||e[103]!==o||e[104]!==s){let p;e[106]!==o||e[107]!==s?(p=S=>t.jsxs("button",{type:"button",onClick:()=>o(S),className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left group",children:[t.jsx("img",{src:S.avatarUrl,alt:S.login,className:"size-7 rounded-full shrink-0 ring-1 ring-border"}),t.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium leading-none",children:S.login}),S.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:s("common.githubRepoPicker.personalAccount")})]}),t.jsxs("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:[s("common.githubRepoPicker.select")," →"]})]},S.installationId),e[106]=o,e[107]=s,e[108]=p):p=e[108],N=i.installations.map(p),e[102]=i.installations,e[103]=o,e[104]=s,e[105]=N}else N=e[105];let I;e[109]!==N?(I=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:N}),e[109]=N,e[110]=I):I=e[110];let T;e[111]!==s?(T=s("common.githubRepoPicker.accountNotListed"),e[111]=s,e[112]=T):T=e[112];let R;e[113]!==s?(R=s("common.githubRepoPicker.installGitHubApp"),e[113]=s,e[114]=R):R=e[114];let w;e[115]!==R?(w=t.jsx("span",{className:"underline underline-offset-2",children:R}),e[115]=R,e[116]=w):w=e[116];let _;e[117]!==T||e[118]!==w?(_=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:xe,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:[T," ",w]})}),e[117]=T,e[118]=w,e[119]=_):_=e[119];let F;return e[120]!==I||e[121]!==_||e[122]!==j?(F=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[j,I,_]}),e[120]=I,e[121]=_,e[122]=j,e[123]=F):F=e[123],F}function Ve(){}function Ke(C){const e=M.c(23),{connectionId:n,orgId:l,orgSlug:x,installation:o,onSelectRepo:a,isSaving:r}=C,s=ee(),[u,k]=H.useState(""),v=_e(u,300),P=H.useDeferredValue(v),f=u!==P;let d;e[0]!==s?(d=s("common.githubRepoPicker.searchRepositories"),e[0]=s,e[1]=d):d=e[1];let m;e[2]!==f||e[3]!==u||e[4]!==d?(m=t.jsx(Te,{placeholder:d,value:u,onChange:k,isSearching:f}),e[2]=f,e[3]=u,e[4]=d,e[5]=m):m=e[5];const c=f?"opacity-40":"opacity-100";let b;e[6]!==c?(b=ae("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",c),e[6]=c,e[7]=b):b=e[7];let h;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Z,{size:18,className:"animate-spin text-muted-foreground"})}),e[8]=h):h=e[8];let y;e[9]!==n||e[10]!==P||e[11]!==o||e[12]!==r||e[13]!==a||e[14]!==l||e[15]!==x?(y=t.jsx(H.Suspense,{fallback:h,children:t.jsx(Je,{connectionId:n,orgId:l,orgSlug:x,installation:o,query:P,onSelectRepo:a,isSaving:r})}),e[9]=n,e[10]=P,e[11]=o,e[12]=r,e[13]=a,e[14]=l,e[15]=x,e[16]=y):y=e[16];let g;e[17]!==b||e[18]!==y?(g=t.jsx("div",{className:b,children:y}),e[17]=b,e[18]=y,e[19]=g):g=e[19];let i;return e[20]!==m||e[21]!==g?(i=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[m,g]}),e[20]=m,e[21]=g,e[22]=i):i=e[22],i}function Je(C){const e=M.c(36),{connectionId:n,orgId:l,orgSlug:x,installation:o,query:a,onSelectRepo:r,isSaving:s}=C,u=ee();let k;e[0]!==n||e[1]!==l||e[2]!==x?(k={connectionId:n,orgId:l,orgSlug:x},e[0]=n,e[1]=l,e[2]=x,e[3]=k):k=e[3];const v=ne(k),P=o.type==="User"?"user":"org",f=a?`${P}:${o.login} ${a} in:name fork:true`:`${P}:${o.login} fork:true`;let d;e[4]!==n||e[5]!==o.login||e[6]!==l||e[7]!==a?(d=se.githubOrgRepos(l,n,o.login,a),e[4]=n,e[5]=o.login,e[6]=l,e[7]=a,e[8]=d):d=e[8];let m;e[9]!==v||e[10]!==f?(m=async g=>{const{signal:i}=g,N=(await v.callTool({name:"search_repositories",arguments:{query:f,page:1,perPage:30}},void 0,{signal:i})).content?.[0]?.text;if(!N)throw new Error("No response from search_repositories");return(JSON.parse(N).items??[]).map(We)},e[9]=v,e[10]=f,e[11]=m):m=e[11];let c;e[12]!==d||e[13]!==m?(c={queryKey:d,queryFn:m},e[12]=d,e[13]=m,e[14]=c):c=e[14];const{data:b}=Ce(c);if(b.length===0){let g;e[15]!==u?(g=u("common.githubRepoPicker.noRepositoriesFound"),e[15]=u,e[16]=g):g=e[16];let i;e[17]!==g?(i=t.jsx("p",{className:"text-sm text-muted-foreground",children:g}),e[17]=g,e[18]=i):i=e[18];let j;e[19]!==a||e[20]!==u?(j=a&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:u("common.githubRepoPicker.tryDifferentSearchTerm")}),e[19]=a,e[20]=u,e[21]=j):j=e[21];let N;return e[22]!==i||e[23]!==j?(N=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[i,j]}),e[22]=i,e[23]=j,e[24]=N):N=e[24],N}let h;if(e[25]!==s||e[26]!==r||e[27]!==b||e[28]!==u){let g;e[30]!==s||e[31]!==r||e[32]!==u?(g=i=>t.jsxs("button",{type:"button",onClick:()=>r(i),disabled:s,className:"flex items-start gap-3 px-4 py-3 hover:bg-accent transition-colors text-left disabled:opacity-50 disabled:cursor-not-allowed",children:[t.jsx(D,{className:"size-4 text-muted-foreground mt-0.5 shrink-0"}),t.jsxs("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium truncate",children:i.name}),i.fork&&t.jsx("span",{className:"text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:u("common.githubRepoPicker.forkBadge")})]}),t.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:[i.private?t.jsx(Re,{size:10}):t.jsx(Le,{size:10}),i.private?u("common.githubRepoPicker.private"):u("common.githubRepoPicker.public")]})]},i.fullName),e[30]=s,e[31]=r,e[32]=u,e[33]=g):g=e[33],h=b.map(g),e[25]=s,e[26]=r,e[27]=b,e[28]=u,e[29]=h}else h=e[29];let y;return e[34]!==h?(y=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:h}),e[34]=h,e[35]=y):y=e[35],y}function We(C){return{name:C.name,fullName:C.full_name,owner:C.full_name.split("/")[0]??"",url:C.html_url,private:C.private,description:C.description,updatedAt:C.updated_at,fork:C.fork??!1}}function ce(C){const e=M.c(51),{status:n,error:l,retry:x}=C,o=ee();if(n==="error"){let N;e[0]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx(D,{className:"size-5 text-destructive"})}),e[0]=N):N=e[0];let I;e[1]!==o?(I=o("common.githubRepoPicker.connectionFailed"),e[1]=o,e[2]=I):I=e[2];let T;e[3]!==I?(T=t.jsx("p",{className:"text-sm font-medium",children:I}),e[3]=I,e[4]=T):T=e[4];let R;e[5]!==l||e[6]!==o?(R=l??o("common.githubRepoPicker.somethingWentWrong"),e[5]=l,e[6]=o,e[7]=R):R=e[7];let w;e[8]!==R?(w=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:R}),e[8]=R,e[9]=w):w=e[9];let _;e[10]!==T||e[11]!==w?(_=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[T,w]}),e[10]=T,e[11]=w,e[12]=_):_=e[12];let F;e[13]!==o?(F=o("common.githubRepoPicker.tryAgain"),e[13]=o,e[14]=F):F=e[14];let p;e[15]!==x||e[16]!==F?(p=t.jsx("button",{type:"button",onClick:x,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:F}),e[15]=x,e[16]=F,e[17]=p):p=e[17];let S;return e[18]!==_||e[19]!==p?(S=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[N,_,p]}),e[18]=_,e[19]=p,e[20]=S):S=e[20],S}const a=n==="authenticating";let r;e[21]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx(D,{className:"size-5 text-foreground"})}),e[21]=r):r=e[21];let s;e[22]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsxs("div",{className:"relative size-10",children:[r,t.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 size-4 rounded-full bg-background flex items-center justify-center",children:t.jsx(Z,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[22]=s):s=e[22];let u;e[23]!==a||e[24]!==o?(u=o(a?"common.githubRepoPicker.authenticatingGitHub":"common.githubRepoPicker.settingUpGitHub"),e[23]=a,e[24]=o,e[25]=u):u=e[25];let k;e[26]!==u?(k=t.jsx("p",{className:"text-sm font-medium",children:u}),e[26]=u,e[27]=k):k=e[27];let v;e[28]!==a||e[29]!==o?(v=o(a?"common.githubRepoPicker.completeOAuthFlow":"common.githubRepoPicker.installingGitHubConnection"),e[28]=a,e[29]=o,e[30]=v):v=e[30];let P;e[31]!==v?(P=t.jsx("p",{className:"text-xs text-muted-foreground",children:v}),e[31]=v,e[32]=P):P=e[32];let f;e[33]!==k||e[34]!==P?(f=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[k,P]}),e[33]=k,e[34]=P,e[35]=f):f=e[35];const d=a?"bg-muted-foreground/30":"bg-foreground animate-pulse";let m;e[36]!==d?(m=ae("size-1.5 rounded-full",d),e[36]=d,e[37]=m):m=e[37];let c;e[38]!==m?(c=t.jsx("span",{className:m}),e[38]=m,e[39]=c):c=e[39];const b=a?"bg-foreground animate-pulse":"bg-muted-foreground/30";let h;e[40]!==b?(h=ae("size-1.5 rounded-full",b),e[40]=b,e[41]=h):h=e[41];let y;e[42]!==h?(y=t.jsx("span",{className:h}),e[42]=h,e[43]=y):y=e[43];let g;e[44]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[44]=g):g=e[44];let i;e[45]!==c||e[46]!==y?(i=t.jsxs("div",{className:"flex items-center gap-1.5",children:[c,y,g]}),e[45]=c,e[46]=y,e[47]=i):i=e[47];let j;return e[48]!==i||e[49]!==f?(j=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[s,f,i]}),e[48]=i,e[49]=f,e[50]=j):j=e[50],j}export{D as G,mt as a,Be as b,$e as u};
1
+ import{c as M,j as t,H as de,a as ye,p as me,r as H,aU as le,b as ee,k as Z,e as ge,t as te,eQ as Ne,K as se,I as ke,o as ve,n as ae,B as re,z as Ce,C as Re}from"./index-Cwc5OUhn.js";import{a as we,b as Pe,d as Se,e as Ie}from"./dialog-DveHs0kp.js";import{C as Te}from"./collection-search-BZ-Q3I-u.js";import{u as _e}from"./use-debounced-value-DRya_SIM.js";import{b as he,u as Ee}from"./use-connection-09ezQVmp.js";import{u as ne}from"./use-mcp-client-DDri_uok.js";import{W as Ae,S as pe}from"./constants-dLUUoWH7.js";import{a as be}from"./authenticate-and-persist-oauth-abE4nlr8.js";import{i as ue}from"./ArrowLeft-C_gfx94q.js";import{n as ze}from"./LinkExternal01-6Eva3_re.js";import{n as Le}from"./LockUnlocked01-CN11iIqE.js";import{u as Ge}from"./use-mcp-tools-D39UBufk.js";import{e as Oe}from"./extract-connection-data-Dai3fHMk.js";import{c as Fe}from"./use-navigate-to-agent-Bf4VINKK.js";import{g as Ue,p as fe,f as He,G as xe}from"./provision-repo-scoped-github-connection-CMPWtdMv.js";function D(C){const e=M.c(4),{size:n,className:l}=C;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0016 8c0-4.42-3.58-8-8-8z"}),e[0]=x):x=e[0];let o;return e[1]!==l||e[2]!==n?(o=t.jsx("svg",{width:n,height:n,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",className:l,children:x}),e[1]=l,e[2]=n,e[3]=o):o=e[3],o}function $e(C,e){const n=M.c(12),{org:l}=de();let x;n[0]!==l.id?(x=Ae.REGISTRY(l.id),n[0]=l.id,n[1]=x):x=n[1];const o=x;let a;n[2]!==l.id||n[3]!==l.slug||n[4]!==o?(a={connectionId:o,orgId:l.id,orgSlug:l.slug},n[2]=l.id,n[3]=l.slug,n[4]=o,n[5]=a):a=n[5];const r=ne(a);let s;n[6]!==C?(s={name:C},n[6]=C,n[7]=s):s=n[7];const u=e?.enabled??!0;let k;return n[8]!==r||n[9]!==s||n[10]!==u?(k={client:r,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:s,enabled:u,staleTime:3e5,select:De},n[8]=r,n[9]=s,n[10]=u,n[11]=k):k=n[11],Ge(k)}function De(C){return C.structuredContent?.item??null}const Me="deco/mcp-github";function Be(C){const{org:e}=de(),{data:n}=ye.useSession(),l=he(),x=me(),[o,a]=H.useState("idle"),[r,s]=H.useState(null),[u,k]=H.useState(null),{data:v,isLoading:P}=$e(Me,{enabled:C.enabled}),f=H.useRef(!1);C.enabled&&v&&!P&&!f.current&&n?.user?.id&&o==="idle"&&(f.current=!0,d());async function d(){if(!(!v||!n?.user?.id||!e))try{a("installing"),s(null);const c=Oe(v,e.id,n.user.id,{remoteIndex:0});if(!c.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:h}=await l.create.mutateAsync(c);a("authenticating");const y=await be({connectionId:h,orgId:e.id,orgSlug:e.slug,persistFallback:g=>l.update.mutateAsync({id:h,data:{connection_token:g}}).then(()=>{})});if(y.ran&&!y.ok){try{await l.delete.mutateAsync(h)}catch{}throw new Error(y.error&&y.error!=="no token received"?y.error:"No token received from GitHub")}le(x,e.id),k(c),a("ready")}catch(c){s(c instanceof Error?c.message:String(c)),a("error")}}function m(){a("idle"),s(null),k(null),f.current=!1}return C.enabled&&P&&o==="idle"?{status:"installing",error:null,connection:null,retry:m}:{status:o,error:r,connection:u,retry:m}}function mt(C){const e=M.c(27),{open:n,onOpenChange:l,title:x,onImportComplete:o,mode:a}=C,r=a===void 0?"agent":a,s=ee();let u;e[0]!==r||e[1]!==s||e[2]!==x?(u=x??s(r==="connection"?"common.githubRepoPicker.addRepo":"common.githubRepoPicker.importFromGitHub"),e[0]=r,e[1]=s,e[2]=x,e[3]=u):u=e[3];const k=u,[v,P]=H.useState(null);let f;e[4]!==k?(f=t.jsx(we,{className:"sr-only",children:t.jsx(Pe,{children:k})}),e[4]=k,e[5]=f):f=e[5];let d;e[6]!==k||e[7]!==v||e[8]!==s?(d=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:v?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>P(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":s("common.githubRepoPicker.backToAccounts"),children:t.jsx(ue,{size:16})}),t.jsx("img",{src:v.avatarUrl,alt:v.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:v.login})]}):t.jsxs(t.Fragment,{children:[t.jsx(D,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:k})]})}),e[6]=k,e[7]=v,e[8]=s,e[9]=d):d=e[9];let m;e[10]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Z,{size:18,className:"animate-spin text-muted-foreground"})}),e[10]=m):m=e[10];let c;e[11]!==l?(c=()=>l(!1),e[11]=l,e[12]=c):c=e[12];let b;e[13]!==r||e[14]!==o||e[15]!==n||e[16]!==v||e[17]!==c?(b=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx(H.Suspense,{fallback:m,children:t.jsx(Qe,{open:n,onComplete:c,selectedInstallation:v,onSelectInstallation:P,onImportComplete:o,mode:r})})}),e[13]=r,e[14]=o,e[15]=n,e[16]=v,e[17]=c,e[18]=b):b=e[18];let h;e[19]!==f||e[20]!==d||e[21]!==b?(h=t.jsxs(Se,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[f,d,b]}),e[19]=f,e[20]=d,e[21]=b,e[22]=h):h=e[22];let y;return e[23]!==l||e[24]!==n||e[25]!==h?(y=t.jsx(Ie,{open:n,onOpenChange:l,children:h}),e[23]=l,e[24]=n,e[25]=h,e[26]=y):y=e[26],y}function Qe({open:C,onComplete:e,selectedInstallation:n,onSelectInstallation:l,onImportComplete:x,mode:o="agent"}){const a=ee(),{org:r}=de(),s=me(),u=Fe(),[k,v]=H.useState(null),P=Ee({slug:"mcp-github"}),f=Ue(P),d=Be({enabled:C&&f.length===0}),m=f.length===1?f[0]??null:k,c=ne({connectionId:m?.id??"",orgId:r.id,orgSlug:r.slug}),b=ne({connectionId:pe,orgId:r.id,orgSlug:r.slug}),h=async(i,j)=>{try{const I=await c.callTool({name:"get_file_contents",arguments:{owner:i.owner,repo:i.name,path:j}});if(I.isError)return null;const R=I.content?.find(w=>w.type==="resource")?.resource?.text;if(!R)return null;try{const w=JSON.parse(R);return typeof w=="string"?w:JSON.stringify(w)}catch{return R}}catch{return null}},y=(i,j)=>{Promise.all([h(j,"AGENTS.md"),h(j,"CLAUDE.md")]).then(async([N,I])=>{const T=N??I??null;T&&(await b.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:i,data:{metadata:{instructions:T}}}}),le(s,r.id))}).catch(N=>{console.error("GitHub instructions fetch failed:",N)})},g=ge({mutationFn:async i=>{if(!m||!n)throw new Error("No GitHub connection or installation");const j=n.installationId;if(o==="connection"){const{childConnectionId:R}=await fe({orgSlug:r.slug,sourceConnection:m,installationId:j,owner:i.owner,repo:i.name,githubCallTool:w=>c.callTool(w),selfCallTool:w=>b.callTool(w),orgShared:!0});return{virtualMcpId:null,repo:i,connectionId:R,item:null}}const{childConnectionId:N,reused:I}=await fe({orgSlug:r.slug,sourceConnection:m,installationId:j,owner:i.owner,repo:i.name,githubCallTool:R=>c.callTool(R),selfCallTool:R=>b.callTool(R)});let T=null;try{const R=await b.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:i.name,description:i.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:i.owner,name:i.name,url:i.url,installationId:j,connectionId:N},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:N}]}}}),w=R.structuredContent??R,_=w.item?.id;if(!w.item||!_)throw new Error("Failed to create the imported agent");return T=_,{virtualMcpId:_,repo:i,connectionId:N,item:w.item}}catch(R){throw T&&await b.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:T}}).catch(()=>{}),I||await b.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:N,force:!0}}).catch(()=>{}),R}},onSuccess:({virtualMcpId:i,repo:j,connectionId:N,item:I})=>{if(o==="connection"||!i||!I){if(le(s,r.id),Ne(s,r.id),x){x({virtualMcpId:null,repo:j,connectionId:N});return}te.success(a("common.githubRepoPicker.addedRepo",{name:j.name})),e();return}if(s.setQueryData(se.collectionItem(b,r.id,"","VIRTUAL_MCP",i),{item:I}),le(s,r.id),y(i,j),x){x({virtualMcpId:i,repo:j,connectionId:N});return}te.success(a("common.githubRepoPicker.importedRepo",{name:j.name})),e(),localStorage.setItem(ke.sidebarOpen(),JSON.stringify(!1)),u(i)},onError:(i,j)=>{console.error("GitHub import failed:",i);const N=i instanceof Error?i.message:a("common.githubRepoPicker.unknownError");if(j.fork&&N.toLowerCase().includes("mint")){te.error(a("common.githubRepoPicker.failedImportFork",{name:j.name}));return}te.error(a("common.githubRepoPicker.failedImport",{error:N}))}});return d.status==="installing"||d.status==="authenticating"?t.jsx(ce,{status:d.status,error:null,retry:d.retry}):d.status==="error"?t.jsx(ce,{status:"error",error:d.error,retry:d.retry}):f.length===0&&d.status==="idle"?t.jsx(ce,{status:"installing",error:null,retry:d.retry}):f.length>1&&!m?t.jsxs("div",{className:"flex flex-col py-2",children:[t.jsx("div",{className:"px-4 py-2",children:t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:a("common.githubRepoPicker.selectConnection")})}),f.map(i=>t.jsxs("button",{type:"button",onClick:()=>v(i),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[i.icon?t.jsx("img",{src:i.icon,alt:i.title,className:"size-7 rounded-full shrink-0"}):t.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:t.jsx(D,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:i.title})]},i.id))]}):m?n?t.jsx(Ke,{connectionId:m.id,orgId:r.id,orgSlug:r.slug,installation:n,onSelectRepo:i=>g.mutate(i),isSaving:g.isPending}):t.jsx(qe,{connectionId:m.id,orgId:r.id,orgSlug:r.slug,onSelect:l,showBackButton:f.length>1,onBack:()=>v(null)}):null}function qe(C){const e=M.c(124),{connectionId:n,orgId:l,orgSlug:x,onSelect:o,showBackButton:a,onBack:r}=C,s=ee();let u;e[0]!==l||e[1]!==x?(u={connectionId:pe,orgId:l,orgSlug:x},e[0]=l,e[1]=x,e[2]=u):u=e[2];const k=ne(u),v=me(),P=he();let f;e[3]!==n||e[4]!==l?(f=se.githubUserOrgs(l,n),e[3]=n,e[4]=l,e[5]=f):f=e[5];let d;e[6]!==n||e[7]!==k?(d=()=>He(p=>k.callTool(p),n),e[6]=n,e[7]=k,e[8]=d):d=e[8];let m;e[9]!==f||e[10]!==d?(m={queryKey:f,queryFn:d},e[9]=f,e[10]=d,e[11]=m):m=e[11];const c=ve(m);let b;e[12]!==P||e[13]!==n||e[14]!==c||e[15]!==l||e[16]!==x||e[17]!==v?(b=async()=>{const p=await be({connectionId:n,orgId:l,orgSlug:x,persistFallback:E=>P.update.mutateAsync({id:n,data:{connection_token:E}}).then(Ve)});if(p.ran&&!p.ok)throw new Error(p.error??"no token received");const S=new URL(`/api/${x}/mcp/${n}`,window.location.origin);await v.invalidateQueries({queryKey:se.isMCPAuthenticated(S.href,null)}),await v.invalidateQueries({queryKey:se.mcpClientPrefix()}),await c.refetch()},e[12]=P,e[13]=n,e[14]=c,e[15]=l,e[16]=x,e[17]=v,e[18]=b):b=e[18];let h;e[19]!==s?(h=p=>{te.error(s("common.githubRepoPicker.failedReconnect",{error:p instanceof Error?p.message:s("common.githubRepoPicker.unknownError")}))},e[19]=s,e[20]=h):h=e[20];let y;e[21]!==b||e[22]!==h?(y={mutationFn:b,onError:h},e[21]=b,e[22]=h,e[23]=y):y=e[23];const g=ge(y);if(c.isLoading){let p;return e[24]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Z,{size:18,className:"animate-spin text-muted-foreground"})}),e[24]=p):p=e[24],p}if(c.isError){let p;e[25]!==s?(p=s("common.githubRepoPicker.failedLoadAccounts"),e[25]=s,e[26]=p):p=e[26];let S;e[27]!==p?(S=t.jsx("p",{className:"text-sm text-destructive",children:p}),e[27]=p,e[28]=S):S=e[28];let E;e[29]!==s?(E=s("common.githubRepoPicker.connectionExpiredMessage"),e[29]=s,e[30]=E):E=e[30];let A;e[31]!==E?(A=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[280px] leading-relaxed",children:E}),e[31]=E,e[32]=A):A=e[32];let z;e[33]!==g?(z=()=>g.mutate(),e[33]=g,e[34]=z):z=e[34];const $=g.isPending;let L;e[35]!==g.isPending?(L=g.isPending?t.jsx(Z,{size:14,className:"animate-spin"}):t.jsx(D,{className:"size-3.5"}),e[35]=g.isPending,e[36]=L):L=e[36];let G;e[37]!==s?(G=s("common.githubRepoPicker.reconnectGitHub"),e[37]=s,e[38]=G):G=e[38];let O;e[39]!==g.isPending||e[40]!==z||e[41]!==L||e[42]!==G?(O=t.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:z,disabled:$,children:[L,G]}),e[39]=g.isPending,e[40]=z,e[41]=L,e[42]=G,e[43]=O):O=e[43];let U;return e[44]!==A||e[45]!==O||e[46]!==S?(U=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 text-center",children:[S,A,O]}),e[44]=A,e[45]=O,e[46]=S,e[47]=U):U=e[47],U}const i=c.data;if(!i)return null;if(i.installations.length===0){let p;e[48]!==r||e[49]!==a||e[50]!==s?(p=a&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(ue,{size:12}),s("common.githubRepoPicker.changeConnection")]})}),e[48]=r,e[49]=a,e[50]=s,e[51]=p):p=e[51];let S;e[52]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx("div",{className:"size-16 rounded-2xl bg-muted flex items-center justify-center",children:t.jsx(D,{className:"size-8 text-foreground"})}),e[52]=S):S=e[52];let E;e[53]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx("span",{className:"size-1.5 rounded-full bg-success"}),e[53]=E):E=e[53];let A;e[54]!==s?(A=s("common.githubRepoPicker.githubConnected"),e[54]=s,e[55]=A):A=e[55];let z;e[56]!==A?(z=t.jsxs("div",{className:"mt-4 flex items-center gap-1.5 text-xs font-medium text-success",children:[E,A]}),e[56]=A,e[57]=z):z=e[57];let $;e[58]!==s?($=s("common.githubRepoPicker.setupRepositoriesTitle"),e[58]=s,e[59]=$):$=e[59];let L;e[60]!==$?(L=t.jsx("h2",{className:"mt-2 text-base font-semibold text-foreground",children:$}),e[60]=$,e[61]=L):L=e[61];let G;e[62]!==s?(G=s("common.githubRepoPicker.noRepositoriesShared"),e[62]=s,e[63]=G):G=e[63];let O;e[64]!==G?(O=t.jsx("p",{className:"mt-1.5 max-w-[360px] text-xs leading-relaxed text-muted-foreground",children:G}),e[64]=G,e[65]=O):O=e[65];let U;e[66]!==s?(U=s("common.githubRepoPicker.chooseRepositories"),e[66]=s,e[67]=U):U=e[67];let ie;e[68]===Symbol.for("react.memo_cache_sentinel")?(ie=t.jsx(ze,{size:14}),e[68]=ie):ie=e[68];let B;e[69]!==U?(B=t.jsx(re,{asChild:!0,size:"sm",children:t.jsxs("a",{href:xe,target:"_blank",rel:"noopener noreferrer",children:[U,ie]})}),e[69]=U,e[70]=B):B=e[70];let Q;e[71]!==c?(Q=()=>{c.refetch()},e[71]=c,e[72]=Q):Q=e[72];const je=c.isFetching;let q;e[73]!==c.isFetching?(q=c.isFetching&&t.jsx(Z,{size:14,className:"animate-spin"}),e[73]=c.isFetching,e[74]=q):q=e[74];let V;e[75]!==s?(V=s("common.githubRepoPicker.checkAgain"),e[75]=s,e[76]=V):V=e[76];let K;e[77]!==c.isFetching||e[78]!==Q||e[79]!==q||e[80]!==V?(K=t.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:Q,disabled:je,children:[q,V]}),e[77]=c.isFetching,e[78]=Q,e[79]=q,e[80]=V,e[81]=K):K=e[81];let J;e[82]!==B||e[83]!==K?(J=t.jsxs("div",{className:"mt-5 flex items-center gap-2",children:[B,K]}),e[82]=B,e[83]=K,e[84]=J):J=e[84];let W;e[85]!==s?(W=s("common.githubRepoPicker.repositoryAccessNote"),e[85]=s,e[86]=W):W=e[86];let Y;e[87]!==W?(Y=t.jsx("p",{className:"mt-4 max-w-[360px] rounded-lg bg-muted/50 px-3 py-2 text-xs leading-relaxed text-muted-foreground",children:W}),e[87]=W,e[88]=Y):Y=e[88];let X;e[89]!==z||e[90]!==L||e[91]!==O||e[92]!==J||e[93]!==Y?(X=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center px-8 py-6 text-center",children:[S,z,L,O,J,Y]}),e[89]=z,e[90]=L,e[91]=O,e[92]=J,e[93]=Y,e[94]=X):X=e[94];let oe;return e[95]!==X||e[96]!==p?(oe=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[p,X]}),e[95]=X,e[96]=p,e[97]=oe):oe=e[97],oe}let j;e[98]!==r||e[99]!==a||e[100]!==s?(j=a&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(ue,{size:12}),s("common.githubRepoPicker.changeConnection")]})}),e[98]=r,e[99]=a,e[100]=s,e[101]=j):j=e[101];let N;if(e[102]!==i.installations||e[103]!==o||e[104]!==s){let p;e[106]!==o||e[107]!==s?(p=S=>t.jsxs("button",{type:"button",onClick:()=>o(S),className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left group",children:[t.jsx("img",{src:S.avatarUrl,alt:S.login,className:"size-7 rounded-full shrink-0 ring-1 ring-border"}),t.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium leading-none",children:S.login}),S.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:s("common.githubRepoPicker.personalAccount")})]}),t.jsxs("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:[s("common.githubRepoPicker.select")," →"]})]},S.installationId),e[106]=o,e[107]=s,e[108]=p):p=e[108],N=i.installations.map(p),e[102]=i.installations,e[103]=o,e[104]=s,e[105]=N}else N=e[105];let I;e[109]!==N?(I=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:N}),e[109]=N,e[110]=I):I=e[110];let T;e[111]!==s?(T=s("common.githubRepoPicker.accountNotListed"),e[111]=s,e[112]=T):T=e[112];let R;e[113]!==s?(R=s("common.githubRepoPicker.installGitHubApp"),e[113]=s,e[114]=R):R=e[114];let w;e[115]!==R?(w=t.jsx("span",{className:"underline underline-offset-2",children:R}),e[115]=R,e[116]=w):w=e[116];let _;e[117]!==T||e[118]!==w?(_=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:xe,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:[T," ",w]})}),e[117]=T,e[118]=w,e[119]=_):_=e[119];let F;return e[120]!==I||e[121]!==_||e[122]!==j?(F=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[j,I,_]}),e[120]=I,e[121]=_,e[122]=j,e[123]=F):F=e[123],F}function Ve(){}function Ke(C){const e=M.c(23),{connectionId:n,orgId:l,orgSlug:x,installation:o,onSelectRepo:a,isSaving:r}=C,s=ee(),[u,k]=H.useState(""),v=_e(u,300),P=H.useDeferredValue(v),f=u!==P;let d;e[0]!==s?(d=s("common.githubRepoPicker.searchRepositories"),e[0]=s,e[1]=d):d=e[1];let m;e[2]!==f||e[3]!==u||e[4]!==d?(m=t.jsx(Te,{placeholder:d,value:u,onChange:k,isSearching:f}),e[2]=f,e[3]=u,e[4]=d,e[5]=m):m=e[5];const c=f?"opacity-40":"opacity-100";let b;e[6]!==c?(b=ae("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",c),e[6]=c,e[7]=b):b=e[7];let h;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Z,{size:18,className:"animate-spin text-muted-foreground"})}),e[8]=h):h=e[8];let y;e[9]!==n||e[10]!==P||e[11]!==o||e[12]!==r||e[13]!==a||e[14]!==l||e[15]!==x?(y=t.jsx(H.Suspense,{fallback:h,children:t.jsx(Je,{connectionId:n,orgId:l,orgSlug:x,installation:o,query:P,onSelectRepo:a,isSaving:r})}),e[9]=n,e[10]=P,e[11]=o,e[12]=r,e[13]=a,e[14]=l,e[15]=x,e[16]=y):y=e[16];let g;e[17]!==b||e[18]!==y?(g=t.jsx("div",{className:b,children:y}),e[17]=b,e[18]=y,e[19]=g):g=e[19];let i;return e[20]!==m||e[21]!==g?(i=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[m,g]}),e[20]=m,e[21]=g,e[22]=i):i=e[22],i}function Je(C){const e=M.c(36),{connectionId:n,orgId:l,orgSlug:x,installation:o,query:a,onSelectRepo:r,isSaving:s}=C,u=ee();let k;e[0]!==n||e[1]!==l||e[2]!==x?(k={connectionId:n,orgId:l,orgSlug:x},e[0]=n,e[1]=l,e[2]=x,e[3]=k):k=e[3];const v=ne(k),P=o.type==="User"?"user":"org",f=a?`${P}:${o.login} ${a} in:name fork:true`:`${P}:${o.login} fork:true`;let d;e[4]!==n||e[5]!==o.login||e[6]!==l||e[7]!==a?(d=se.githubOrgRepos(l,n,o.login,a),e[4]=n,e[5]=o.login,e[6]=l,e[7]=a,e[8]=d):d=e[8];let m;e[9]!==v||e[10]!==f?(m=async g=>{const{signal:i}=g,N=(await v.callTool({name:"search_repositories",arguments:{query:f,page:1,perPage:30}},void 0,{signal:i})).content?.[0]?.text;if(!N)throw new Error("No response from search_repositories");return(JSON.parse(N).items??[]).map(We)},e[9]=v,e[10]=f,e[11]=m):m=e[11];let c;e[12]!==d||e[13]!==m?(c={queryKey:d,queryFn:m},e[12]=d,e[13]=m,e[14]=c):c=e[14];const{data:b}=Ce(c);if(b.length===0){let g;e[15]!==u?(g=u("common.githubRepoPicker.noRepositoriesFound"),e[15]=u,e[16]=g):g=e[16];let i;e[17]!==g?(i=t.jsx("p",{className:"text-sm text-muted-foreground",children:g}),e[17]=g,e[18]=i):i=e[18];let j;e[19]!==a||e[20]!==u?(j=a&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:u("common.githubRepoPicker.tryDifferentSearchTerm")}),e[19]=a,e[20]=u,e[21]=j):j=e[21];let N;return e[22]!==i||e[23]!==j?(N=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[i,j]}),e[22]=i,e[23]=j,e[24]=N):N=e[24],N}let h;if(e[25]!==s||e[26]!==r||e[27]!==b||e[28]!==u){let g;e[30]!==s||e[31]!==r||e[32]!==u?(g=i=>t.jsxs("button",{type:"button",onClick:()=>r(i),disabled:s,className:"flex items-start gap-3 px-4 py-3 hover:bg-accent transition-colors text-left disabled:opacity-50 disabled:cursor-not-allowed",children:[t.jsx(D,{className:"size-4 text-muted-foreground mt-0.5 shrink-0"}),t.jsxs("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium truncate",children:i.name}),i.fork&&t.jsx("span",{className:"text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:u("common.githubRepoPicker.forkBadge")})]}),t.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:[i.private?t.jsx(Re,{size:10}):t.jsx(Le,{size:10}),i.private?u("common.githubRepoPicker.private"):u("common.githubRepoPicker.public")]})]},i.fullName),e[30]=s,e[31]=r,e[32]=u,e[33]=g):g=e[33],h=b.map(g),e[25]=s,e[26]=r,e[27]=b,e[28]=u,e[29]=h}else h=e[29];let y;return e[34]!==h?(y=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:h}),e[34]=h,e[35]=y):y=e[35],y}function We(C){return{name:C.name,fullName:C.full_name,owner:C.full_name.split("/")[0]??"",url:C.html_url,private:C.private,description:C.description,updatedAt:C.updated_at,fork:C.fork??!1}}function ce(C){const e=M.c(51),{status:n,error:l,retry:x}=C,o=ee();if(n==="error"){let N;e[0]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx(D,{className:"size-5 text-destructive"})}),e[0]=N):N=e[0];let I;e[1]!==o?(I=o("common.githubRepoPicker.connectionFailed"),e[1]=o,e[2]=I):I=e[2];let T;e[3]!==I?(T=t.jsx("p",{className:"text-sm font-medium",children:I}),e[3]=I,e[4]=T):T=e[4];let R;e[5]!==l||e[6]!==o?(R=l??o("common.githubRepoPicker.somethingWentWrong"),e[5]=l,e[6]=o,e[7]=R):R=e[7];let w;e[8]!==R?(w=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:R}),e[8]=R,e[9]=w):w=e[9];let _;e[10]!==T||e[11]!==w?(_=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[T,w]}),e[10]=T,e[11]=w,e[12]=_):_=e[12];let F;e[13]!==o?(F=o("common.githubRepoPicker.tryAgain"),e[13]=o,e[14]=F):F=e[14];let p;e[15]!==x||e[16]!==F?(p=t.jsx("button",{type:"button",onClick:x,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:F}),e[15]=x,e[16]=F,e[17]=p):p=e[17];let S;return e[18]!==_||e[19]!==p?(S=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[N,_,p]}),e[18]=_,e[19]=p,e[20]=S):S=e[20],S}const a=n==="authenticating";let r;e[21]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx(D,{className:"size-5 text-foreground"})}),e[21]=r):r=e[21];let s;e[22]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsxs("div",{className:"relative size-10",children:[r,t.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 size-4 rounded-full bg-background flex items-center justify-center",children:t.jsx(Z,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[22]=s):s=e[22];let u;e[23]!==a||e[24]!==o?(u=o(a?"common.githubRepoPicker.authenticatingGitHub":"common.githubRepoPicker.settingUpGitHub"),e[23]=a,e[24]=o,e[25]=u):u=e[25];let k;e[26]!==u?(k=t.jsx("p",{className:"text-sm font-medium",children:u}),e[26]=u,e[27]=k):k=e[27];let v;e[28]!==a||e[29]!==o?(v=o(a?"common.githubRepoPicker.completeOAuthFlow":"common.githubRepoPicker.installingGitHubConnection"),e[28]=a,e[29]=o,e[30]=v):v=e[30];let P;e[31]!==v?(P=t.jsx("p",{className:"text-xs text-muted-foreground",children:v}),e[31]=v,e[32]=P):P=e[32];let f;e[33]!==k||e[34]!==P?(f=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[k,P]}),e[33]=k,e[34]=P,e[35]=f):f=e[35];const d=a?"bg-muted-foreground/30":"bg-foreground animate-pulse";let m;e[36]!==d?(m=ae("size-1.5 rounded-full",d),e[36]=d,e[37]=m):m=e[37];let c;e[38]!==m?(c=t.jsx("span",{className:m}),e[38]=m,e[39]=c):c=e[39];const b=a?"bg-foreground animate-pulse":"bg-muted-foreground/30";let h;e[40]!==b?(h=ae("size-1.5 rounded-full",b),e[40]=b,e[41]=h):h=e[41];let y;e[42]!==h?(y=t.jsx("span",{className:h}),e[42]=h,e[43]=y):y=e[43];let g;e[44]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[44]=g):g=e[44];let i;e[45]!==c||e[46]!==y?(i=t.jsxs("div",{className:"flex items-center gap-1.5",children:[c,y,g]}),e[45]=c,e[46]=y,e[47]=i):i=e[47];let j;return e[48]!==i||e[49]!==f?(j=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[s,f,i]}),e[48]=i,e[49]=f,e[50]=j):j=e[50],j}export{D as G,mt as a,Be as b,$e as u};
@@ -1,4 +1,4 @@
1
- import{eq as It,er as Et,b_ as R,an as c,es as de,c3 as Je,et as Tt,bZ as wt,ar as Mt,am as O,ap as G,al as oe,ak as S,at as m,au as F,as as At,eu as I,ao as Ot,t as ge,c as Ee,r as W,H as Ct,j as Rt}from"./index-oUYXP9Sz.js";import{u as Nt}from"./use-mcp-client-C6aEVcPT.js";import{S as xt}from"./constants-BiE_kVyZ.js";import{d as Pt}from"./delay-CnY5UFtP.js";import{e as Dt}from"./backoff-CrEUbyZT.js";import{d as Lt,D as kt}from"./decopilot-sse-pool-CPW9JvWP.js";var re;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function a(s){throw new Error}t.assertNever=a,t.arrayToEnum=s=>{const n={};for(const i of s)n[i]=i;return n},t.getValidEnumValues=s=>{const n=t.objectKeys(s).filter(o=>typeof s[s[o]]!="number"),i={};for(const o of n)i[o]=s[o];return t.objectValues(i)},t.objectValues=s=>t.objectKeys(s).map(function(n){return s[n]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const n=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&n.push(i);return n},t.find=(s,n)=>{for(const i of s)if(n(i))return i},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,n=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}t.joinValues=r,t.jsonStringifyReplacer=(s,n)=>typeof n=="bigint"?n.toString():n})(re||(re={}));var Ae;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(Ae||(Ae={}));re.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);re.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ce extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=e}format(e){const a=e||function(n){return n.message},r={_errors:[]},s=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)r._errors.push(a(i));else{let o=r,p=0;for(;p<i.path.length;){const u=i.path[p];p===i.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(a(i))):o[u]=o[u]||{_errors:[]},o=o[u],p++}}};return s(this),r}static assert(e){if(!(e instanceof ce))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,re.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=a=>a.message){const a=Object.create(null),r=[];for(const s of this.issues)if(s.path.length>0){const n=s.path[0];a[n]=a[n]||[],a[n].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:a}}get formErrors(){return this.flatten()}}ce.create=t=>new ce(t);var Oe;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Oe||(Oe={}));var h;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(h||(h={}));var We="vercel.ai.error",jt=Symbol.for(We),Ce,Re,Z=class Ge extends(Re=Error,Ce=jt,Re){constructor({name:e,message:a,cause:r}){super(a),this[Ce]=!0,this.name=e,this.cause=r}static isInstance(e){return Ge.hasMarker(e,We)}static hasMarker(e,a){const r=Symbol.for(a);return e!=null&&typeof e=="object"&&r in e&&typeof e[r]=="boolean"&&e[r]===!0}};function Ye(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var He="AI_InvalidArgumentError",qe=`vercel.ai.error.${He}`,Zt=Symbol.for(qe),Ne,xe,$t=class extends(xe=Z,Ne=Zt,xe){constructor({message:t,cause:e,argument:a}){super({name:He,message:t,cause:e}),this[Ne]=!0,this.argument=a}static isInstance(t){return Z.hasMarker(t,qe)}},Xe="AI_JSONParseError",Qe=`vercel.ai.error.${Xe}`,Ut=Symbol.for(Qe),Pe,De,Le=class extends(De=Z,Pe=Ut,De){constructor({text:t,cause:e}){super({name:Xe,message:`JSON parsing failed: Text: ${t}.
1
+ import{eq as It,er as Et,b_ as R,an as c,es as de,c3 as Je,et as Tt,bZ as wt,ar as Mt,am as O,ap as G,al as oe,ak as S,at as m,au as F,as as At,eu as I,ao as Ot,t as ge,c as Ee,r as W,H as Ct,j as Rt}from"./index-Cwc5OUhn.js";import{u as Nt}from"./use-mcp-client-DDri_uok.js";import{S as xt}from"./constants-dLUUoWH7.js";import{d as Pt}from"./delay-CnY5UFtP.js";import{e as Dt}from"./backoff-CrEUbyZT.js";import{d as Lt,D as kt}from"./decopilot-sse-pool-A07DOCGf.js";var re;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function a(s){throw new Error}t.assertNever=a,t.arrayToEnum=s=>{const n={};for(const i of s)n[i]=i;return n},t.getValidEnumValues=s=>{const n=t.objectKeys(s).filter(o=>typeof s[s[o]]!="number"),i={};for(const o of n)i[o]=s[o];return t.objectValues(i)},t.objectValues=s=>t.objectKeys(s).map(function(n){return s[n]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const n=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&n.push(i);return n},t.find=(s,n)=>{for(const i of s)if(n(i))return i},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,n=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}t.joinValues=r,t.jsonStringifyReplacer=(s,n)=>typeof n=="bigint"?n.toString():n})(re||(re={}));var Ae;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(Ae||(Ae={}));re.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);re.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ce extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=e}format(e){const a=e||function(n){return n.message},r={_errors:[]},s=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)r._errors.push(a(i));else{let o=r,p=0;for(;p<i.path.length;){const u=i.path[p];p===i.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(a(i))):o[u]=o[u]||{_errors:[]},o=o[u],p++}}};return s(this),r}static assert(e){if(!(e instanceof ce))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,re.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=a=>a.message){const a=Object.create(null),r=[];for(const s of this.issues)if(s.path.length>0){const n=s.path[0];a[n]=a[n]||[],a[n].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:a}}get formErrors(){return this.flatten()}}ce.create=t=>new ce(t);var Oe;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Oe||(Oe={}));var h;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(h||(h={}));var We="vercel.ai.error",jt=Symbol.for(We),Ce,Re,Z=class Ge extends(Re=Error,Ce=jt,Re){constructor({name:e,message:a,cause:r}){super(a),this[Ce]=!0,this.name=e,this.cause=r}static isInstance(e){return Ge.hasMarker(e,We)}static hasMarker(e,a){const r=Symbol.for(a);return e!=null&&typeof e=="object"&&r in e&&typeof e[r]=="boolean"&&e[r]===!0}};function Ye(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var He="AI_InvalidArgumentError",qe=`vercel.ai.error.${He}`,Zt=Symbol.for(qe),Ne,xe,$t=class extends(xe=Z,Ne=Zt,xe){constructor({message:t,cause:e,argument:a}){super({name:He,message:t,cause:e}),this[Ne]=!0,this.argument=a}static isInstance(t){return Z.hasMarker(t,qe)}},Xe="AI_JSONParseError",Qe=`vercel.ai.error.${Xe}`,Ut=Symbol.for(Qe),Pe,De,Le=class extends(De=Z,Pe=Ut,De){constructor({text:t,cause:e}){super({name:Xe,message:`JSON parsing failed: Text: ${t}.
2
2
  Error message: ${Ye(e)}`,cause:e}),this[Pe]=!0,this.text=t}static isInstance(t){return Z.hasMarker(t,Qe)}},Ke="AI_TypeValidationError",et=`vercel.ai.error.${Ke}`,Ft=Symbol.for(et),ke,je,q=class ve extends(je=Z,ke=Ft,je){constructor({value:e,cause:a,context:r}){let s="Type validation failed";if(r?.field&&(s+=` for ${r.field}`),r?.entityName||r?.entityId){s+=" (";const n=[];r.entityName&&n.push(r.entityName),r.entityId&&n.push(`id: "${r.entityId}"`),s+=n.join(", "),s+=")"}super({name:Ke,message:`${s}: Value: ${JSON.stringify(e)}.
3
3
  Error message: ${Ye(a)}`,cause:a}),this[ke]=!0,this.value=e,this.context=r}static isInstance(e){return Z.hasMarker(e,et)}static wrap({value:e,cause:a,context:r}){var s,n,i;return ve.isInstance(a)&&a.value===e&&((s=a.context)==null?void 0:s.field)===r?.field&&((n=a.context)==null?void 0:n.entityName)===r?.entityName&&((i=a.context)==null?void 0:i.entityId)===r?.entityId?a:new ve({value:e,cause:a,context:r})}},ie=({prefix:t,size:e=16,alphabet:a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:r="-"}={})=>{const s=()=>{const n=a.length,i=new Array(e);for(let o=0;o<e;o++)i[o]=a[Math.random()*n|0];return i.join("")};if(t==null)return s;if(a.includes(r))throw new $t({argument:"separator",message:`The separator "${r}" must not be part of the alphabet "${a}".`});return()=>`${t}${r}${s()}`};ie();var Bt=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,Vt=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function Ze(t){const e=JSON.parse(t);return e===null||typeof e!="object"||Bt.test(t)===!1&&Vt.test(t)===!1?e:zt(e)}function zt(t){let e=[t];for(;e.length;){const a=e;e=[];for(const r of a){if(Object.prototype.hasOwnProperty.call(r,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(r,"constructor")&&r.constructor!==null&&typeof r.constructor=="object"&&Object.prototype.hasOwnProperty.call(r.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const s in r){const n=r[s];n&&typeof n=="object"&&e.push(n)}}}return t}function Jt(t){const{stackTraceLimit:e}=Error;try{Error.stackTraceLimit=0}catch{return Ze(t)}try{return Ze(t)}finally{Error.stackTraceLimit=e}}function Te(t){if(t.type==="object"||Array.isArray(t.type)&&t.type.includes("object")){t.additionalProperties=!1;const{properties:a}=t;if(a!=null)for(const r of Object.keys(a))a[r]=z(a[r])}t.items!=null&&(t.items=Array.isArray(t.items)?t.items.map(z):z(t.items)),t.anyOf!=null&&(t.anyOf=t.anyOf.map(z)),t.allOf!=null&&(t.allOf=t.allOf.map(z)),t.oneOf!=null&&(t.oneOf=t.oneOf.map(z));const{definitions:e}=t;if(e!=null)for(const a of Object.keys(e))e[a]=z(e[a]);return t}function z(t){return typeof t=="boolean"?t:Te(t)}var Wt=Symbol("Let zodToJsonSchema decide on which parser to use"),$e={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},Gt=t=>typeof t=="string"?{...$e,name:t}:{...$e,...t};function N(){return{}}function Yt(t,e){var a,r,s;const n={type:"array"};return(a=t.type)!=null&&a._def&&((s=(r=t.type)==null?void 0:r._def)==null?void 0:s.typeName)!==h.ZodAny&&(n.items=b(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&(n.minItems=t.minLength.value),t.maxLength&&(n.maxItems=t.maxLength.value),t.exactLength&&(n.minItems=t.exactLength.value,n.maxItems=t.exactLength.value),n}function Ht(t){const e={type:"integer",format:"int64"};if(!t.checks)return e;for(const a of t.checks)switch(a.kind){case"min":a.inclusive?e.minimum=a.value:e.exclusiveMinimum=a.value;break;case"max":a.inclusive?e.maximum=a.value:e.exclusiveMaximum=a.value;break;case"multipleOf":e.multipleOf=a.value;break}return e}function qt(){return{type:"boolean"}}function tt(t,e){return b(t.type._def,e)}var Xt=(t,e)=>b(t.innerType._def,e);function at(t,e,a){const r=a??e.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((s,n)=>at(t,e,s))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return Qt(t)}}var Qt=t=>{const e={type:"integer",format:"unix-time"};for(const a of t.checks)switch(a.kind){case"min":e.minimum=a.value;break;case"max":e.maximum=a.value;break}return e};function Kt(t,e){return{...b(t.innerType._def,e),default:t.defaultValue()}}function ea(t,e){return e.effectStrategy==="input"?b(t.schema._def,e):N()}function ta(t){return{type:"string",enum:Array.from(t.values)}}var aa=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function ra(t,e){const a=[b(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),b(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(s=>!!s),r=[];return a.forEach(s=>{if(aa(s))r.push(...s.allOf);else{let n=s;if("additionalProperties"in s&&s.additionalProperties===!1){const{additionalProperties:i,...o}=s;n=o}r.push(n)}}),r.length?{allOf:r}:void 0}function sa(t){const e=typeof t.value;return e!=="bigint"&&e!=="number"&&e!=="boolean"&&e!=="string"?{type:Array.isArray(t.value)?"array":"object"}:{type:e==="bigint"?"integer":e,const:t.value}}var me=void 0,P={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(me===void 0&&(me=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),me),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function rt(t,e){const a={type:"string"};if(t.checks)for(const r of t.checks)switch(r.kind){case"min":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value;break;case"max":a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"email":switch(e.emailStrategy){case"format:email":D(a,"email",r.message,e);break;case"format:idn-email":D(a,"idn-email",r.message,e);break;case"pattern:zod":A(a,P.email,r.message,e);break}break;case"url":D(a,"uri",r.message,e);break;case"uuid":D(a,"uuid",r.message,e);break;case"regex":A(a,r.regex,r.message,e);break;case"cuid":A(a,P.cuid,r.message,e);break;case"cuid2":A(a,P.cuid2,r.message,e);break;case"startsWith":A(a,RegExp(`^${he(r.value,e)}`),r.message,e);break;case"endsWith":A(a,RegExp(`${he(r.value,e)}$`),r.message,e);break;case"datetime":D(a,"date-time",r.message,e);break;case"date":D(a,"date",r.message,e);break;case"time":D(a,"time",r.message,e);break;case"duration":D(a,"duration",r.message,e);break;case"length":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value,a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"includes":{A(a,RegExp(he(r.value,e)),r.message,e);break}case"ip":{r.version!=="v6"&&D(a,"ipv4",r.message,e),r.version!=="v4"&&D(a,"ipv6",r.message,e);break}case"base64url":A(a,P.base64url,r.message,e);break;case"jwt":A(a,P.jwt,r.message,e);break;case"cidr":{r.version!=="v6"&&A(a,P.ipv4Cidr,r.message,e),r.version!=="v4"&&A(a,P.ipv6Cidr,r.message,e);break}case"emoji":A(a,P.emoji(),r.message,e);break;case"ulid":{A(a,P.ulid,r.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{D(a,"binary",r.message,e);break}case"contentEncoding:base64":{a.contentEncoding="base64";break}case"pattern:zod":{A(a,P.base64,r.message,e);break}}break}case"nanoid":A(a,P.nanoid,r.message,e)}return a}function he(t,e){return e.patternStrategy==="escape"?oa(t):t}var na=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function oa(t){let e="";for(let a=0;a<t.length;a++)na.has(t[a])||(e+="\\"),e+=t[a];return e}function D(t,e,a,r){var s;t.format||(s=t.anyOf)!=null&&s.some(n=>n.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format}),delete t.format),t.anyOf.push({format:e,...a&&r.errorMessages&&{errorMessage:{format:a}}})):t.format=e}function A(t,e,a,r){var s;t.pattern||(s=t.allOf)!=null&&s.some(n=>n.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern}),delete t.pattern),t.allOf.push({pattern:Ue(e,r),...a&&r.errorMessages&&{errorMessage:{pattern:a}}})):t.pattern=Ue(e,r)}function Ue(t,e){var a;if(!e.applyRegexFlags||!t.flags)return t.source;const r={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},s=r.i?t.source.toLowerCase():t.source;let n="",i=!1,o=!1,p=!1;for(let u=0;u<s.length;u++){if(i){n+=s[u],i=!1;continue}if(r.i){if(o){if(s[u].match(/[a-z]/)){p?(n+=s[u],n+=`${s[u-2]}-${s[u]}`.toUpperCase(),p=!1):s[u+1]==="-"&&((a=s[u+2])!=null&&a.match(/[a-z]/))?(n+=s[u],p=!0):n+=`${s[u]}${s[u].toUpperCase()}`;continue}}else if(s[u].match(/[a-z]/)){n+=`[${s[u]}${s[u].toUpperCase()}]`;continue}}if(r.m){if(s[u]==="^"){n+=`(^|(?<=[\r
4
4
  ]))`;continue}else if(s[u]==="$"){n+=`($|(?=[\r
@@ -1,4 +1,4 @@
1
- import{c as he,r as ne,d as cs,H as Ct,b as Xe,j as t,B as ge,t as xt,ab as Dt,a8 as _t,a9 as Lt,n as Ae,ac as ds,K as Tt,o as Ht,D as qs,aX as Rs,aa as Bs,b3 as Js,b1 as Gs,b4 as Ps,b5 as Fs,u as Qs,P as yt,q as Zt,E as Xs}from"./index-oUYXP9Sz.js";import{S as Ws}from"./search-input-BBW-BSQq.js";import{E as Yt}from"./empty-state-CEA2FeJG.js";import{R as Ys}from"./require-capability-CMUdQk_S.js";import{ap as bs,a9 as Zs,aq as el,ar as ws,as as It,at as es,au as ms,av as tl,aw as ys,ax as sl,ay as us,a7 as ll,az as rl,aA as ol,aB as nl,an as Ss,ak as il}from"./automation-runs-BZF73Twv.js";import{u as rs}from"./use-connection-C4rbYT9U.js";import{g as $s}from"./connection-slug-eyAPH6o3.js";import{B as Rt}from"./badge-DHzlDsyN.js";import{P as qt,a as Bt,b as Jt}from"./popover-Du70JJ8v.js";import{i as ts}from"./Check-7NzkCgMX.js";import{a as Qt}from"./Copy01-D7QEOuO-.js";import{n as Is}from"./Download01-D4OkE-EC.js";import{i as fs}from"./FilterLines-CqhY3DF8.js";import{i as al}from"./Key01-xlS_KWo0.js";import{i as cl}from"./Play-D0ByOD8C.js";import{aQ as dl,a6 as ml,o as ul}from"./agent-icon-BsIxgFhP.js";import{M as Ts}from"./monaco-editor-DbqpyEZF.js";import{a as fl}from"./use-members-Cs_3dQbg.js";import{u as xl}from"./use-mcp-client-C6aEVcPT.js";import{u as pl}from"./use-virtual-mcp-C9_zCPTA.js";import{n as zt}from"./Tool02-poIXBn7K.js";import{c as gl}from"./SwitchHorizontal01-kEJ7zR_z.js";import{s as hl}from"./Plus-CcEdjxja.js";import{s as vl}from"./Trash01-Du6l42eB.js";import{I as Vt}from"./input-CS1CqwLF.js";import{M as Kt}from"./multi-select-Bh-s6f3z.js";import{a as Pt,b as Ft,d as Qe,c as $t,S as Ot}from"./select-CJGWFkMz.js";import{S as jl}from"./scroll-area-BsC8fs3Z.js";import{t as Wt}from"./ChevronDown-Cq83UavT.js";import{s as Nl}from"./Stars02-DfUQGOxC.js";import{T as bl}from"./textarea-BWuuXli5.js";import{C as Os}from"./collection-tabs-CmguGFdF.js";import{S as wl}from"./switch-CmT7vd5I.js";import{L as yl}from"./label-CLQvZ6qi.js";import{I as kt}from"./integration-icon-CZyw67Zl.js";import{A as xs}from"./avatar-BX6Wn7ad.js";import{A as Sl,a as Il,b as Tl}from"./alert-D5uiqJgi.js";import{K as wt}from"./monitoring-stats-row-Bj8UaSFz.js";import{u as kl}from"./useSuspenseInfiniteQuery-jTqM94Cv.js";import{T as Ee,a as Et,b as ps,c as gs,d as be,e as hs}from"./table-D8xezqnz.js";import{n as os}from"./ChevronUp-bumhqOl2.js";import{u as zs}from"./use-infinite-scroll-DhoN_tOr.js";import{u as Cl}from"./useInfiniteQuery-BuAzVT7P.js";import{c as Ml,b as Dl}from"./use-automations-CP79GEVT.js";import{S as _l,W as Ll}from"./constants-BiE_kVyZ.js";import"./SearchMd-BBajIKav.js";import"./access-gate-CE6VufKS.js";import"./capability-load-error-DxVvA5t-.js";import"./ChevronRight-BYfzjVa9.js";import"./AlertCircle-Dh-7gjAb.js";import"./CheckCircle-Dshptf1P.js";import"./DotsVertical-DtVYgEvK.js";import"./XCircle-CkDL-6sY.js";import"./Stars01-B1UsLz2z.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-DDgWyrmF.js";import"./dialog-DIhMaaGw.js";import"./tab-id-BuzpcvG1.js";import"./hooks-B_kyLtT_.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-CPW9JvWP.js";import"./task-board-BHpLFUa-.js";import"./chat-context-BCk9ESt8.js";import"./session-runtime-wVXsCwcJ.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-ai-providers-r2nELlbF.js";import"./use-decopilot-events-NJyKRVI4.js";import"./use-organization-settings-DmQrCvCR.js";import"./types-CHJM6oAY.js";import"./Eye-CUsQm8N_.js";import"./XClose--TM9coN5.js";import"./Tool01-D4z-9IyH.js";import"./Share07-BDaDw7G6.js";import"./Monitor01-BJ9QIRPS.js";import"./shell-layout-B5FYG03K.js";import"./Users03-C3m1xGvF.js";import"./SearchLg-D8g5Kgbo.js";import"./Zap-qaW4N8Xw.js";import"./required-auth-layout-QyxSrfmH.js";import"./use-org-sso-Bk_7LXrK.js";import"./LinkExternal01-vwahOhRy.js";import"./Palette-BnaP_29I.js";import"./use-navigate-to-agent-CkkcsB_L.js";import"./reusable-new-chat-CzvRy4Pe.js";import"./chart-Bp736SCd.js";import"./index-BOXgq-jF.js";import"./form-CTyArXLS.js";import"./spinner-C8JJHaJh.js";import"./Globe01-hx5sMqeq.js";import"./file-type-icon-DUnETOmw.js";import"./UserSquare-CH3Ukoit.js";import"./ArrowUp-OL-jZKct.js";import"./ArrowLeft-u4Z_ZEIA.js";import"./TrendUp01-FHrvViJx.js";import"./ZapSquare-QOO_mGaz.js";import"./ChevronSelectorVertical-DBGHPnq7.js";import"./CreditCard01-C_k5ADvU.js";import"./Settings02-DUzoPIwN.js";import"./Globe04-nj2uQFze.js";import"./HardDrive-CD-r2Q93.js";import"./LockUnlocked01-IFXnzckZ.js";import"./LogOut01-B9lIo2F_.js";import"./Sun-B6HQumVJ.js";import"./Shield01-B-BJfu7d.js";import"./Upload01-CwF6sGbA.js";import"./User01-CZwTOyNO.js";import"./Users01-JQgg7RR7.js";import"./use-org-auth-client-BmwDaxX4.js";import"./auth-1gDWBUqm.js";import"./checkbox-CxWyyA9g.js";import"./command-BVNULuVP.js";import"./index-CBtTXVkq.js";import"./YAxis-CB2o3UPr.js";import"./AreaChart-BDhwnWiq.js";const ns={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3},Rl=["eq","contains","exists","in"];function Pl(s){return Rl.includes(s)}function St(s){return s.filter(e=>e.key.trim()).map(e=>{const l=encodeURIComponent(e.key.trim()),o=encodeURIComponent(e.value||"");return`${l}:${e.operator}:${o}`}).join(",")}function Fl(s){return!s||typeof s!="string"?[]:s.split(",").map(e=>{if(!e)return;const[l,o,...d]=e.split(":"),i=l?decodeURIComponent(l):"";if(i.trim())return{key:i,operator:o&&Pl(o)?o:"eq",value:decodeURIComponent(d.join(":")||"")}}).filter(e=>e!==void 0)}function Xt(s){return s.filter(e=>e.key.trim()).map(e=>{switch(e.operator){case"eq":return`${e.key}=${e.value}`;case"contains":return`${e.key}~${e.value}`;case"exists":return`${e.key}?`;case"in":return`${e.key}@${e.value}`}}).join(`
1
+ import{c as he,r as ne,d as cs,H as Ct,b as Xe,j as t,B as ge,t as xt,ab as Dt,a8 as _t,a9 as Lt,n as Ae,ac as ds,K as Tt,o as Ht,D as qs,aX as Rs,aa as Bs,b3 as Js,b1 as Gs,b4 as Ps,b5 as Fs,u as Qs,P as yt,q as Zt,E as Xs}from"./index-Cwc5OUhn.js";import{S as Ws}from"./search-input-ByGGbbuH.js";import{E as Yt}from"./empty-state-CSneS9BU.js";import{R as Ys}from"./require-capability-DkLXZoIE.js";import{ap as bs,a9 as Zs,aq as el,ar as ws,as as It,at as es,au as ms,av as tl,aw as ys,ax as sl,ay as us,a7 as ll,az as rl,aA as ol,aB as nl,an as Ss,ak as il}from"./automation-runs-DvmtKa8G.js";import{u as rs}from"./use-connection-09ezQVmp.js";import{g as $s}from"./connection-slug-eyAPH6o3.js";import{B as Rt}from"./badge-B2Zf6qZN.js";import{P as qt,a as Bt,b as Jt}from"./popover-Kt90GgHN.js";import{i as ts}from"./Check-DiujM3Bc.js";import{a as Qt}from"./Copy01-Ce6E_Ifo.js";import{n as Is}from"./Download01-CLn3maXy.js";import{i as fs}from"./FilterLines-DEGFannV.js";import{i as al}from"./Key01-Cl-G8wdQ.js";import{i as cl}from"./Play-D2y6v2GO.js";import{aQ as dl,a6 as ml,o as ul}from"./agent-icon-D6UFUEyp.js";import{M as Ts}from"./monaco-editor-BBhZuVQY.js";import{a as fl}from"./use-members-CBxZJhy7.js";import{u as xl}from"./use-mcp-client-DDri_uok.js";import{u as pl}from"./use-virtual-mcp-CQghEz4m.js";import{n as zt}from"./Tool02-qepgblpf.js";import{c as gl}from"./SwitchHorizontal01-LE5pNn35.js";import{s as hl}from"./Plus-C6RnBW-5.js";import{s as vl}from"./Trash01-DbU5lEn8.js";import{I as Vt}from"./input-H1AQT31Q.js";import{M as Kt}from"./multi-select--GOxbZFW.js";import{a as Pt,b as Ft,d as Qe,c as $t,S as Ot}from"./select-nNkfzHSn.js";import{S as jl}from"./scroll-area-B4y7Uc4_.js";import{t as Wt}from"./ChevronDown-B9H-gqPt.js";import{s as Nl}from"./Stars02-D3wWSFvd.js";import{T as bl}from"./textarea-5UXjbrfA.js";import{C as Os}from"./collection-tabs-DPjZex-Z.js";import{S as wl}from"./switch-FVvEKs7w.js";import{L as yl}from"./label-CH7Mz6MF.js";import{I as kt}from"./integration-icon-DnxesxSu.js";import{A as xs}from"./avatar-Bk95B5w8.js";import{A as Sl,a as Il,b as Tl}from"./alert-DRLJF3VA.js";import{K as wt}from"./monitoring-stats-row-CrhBPyxd.js";import{u as kl}from"./useSuspenseInfiniteQuery-yqcuCGQU.js";import{T as Ee,a as Et,b as ps,c as gs,d as be,e as hs}from"./table-DPeHBel0.js";import{n as os}from"./ChevronUp-BzNZuBSL.js";import{u as zs}from"./use-infinite-scroll-CXfjhv8u.js";import{u as Cl}from"./useInfiniteQuery-zd1aocsL.js";import{c as Ml,b as Dl}from"./use-automations-DgdPB5W5.js";import{S as _l,W as Ll}from"./constants-dLUUoWH7.js";import"./SearchMd-Cme8xHxY.js";import"./access-gate-CBhluzKR.js";import"./capability-load-error-UIZj-j0m.js";import"./ChevronRight-zk3hjjG0.js";import"./AlertCircle-BGw3XlXk.js";import"./CheckCircle-DcWCuiei.js";import"./DotsVertical-CuaVjEFE.js";import"./XCircle-DHXzS_UE.js";import"./Stars01-C0ceIy5a.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-3AwQB8Iu.js";import"./dialog-DveHs0kp.js";import"./tab-id-B-MuWZyB.js";import"./hooks-BBTWuwj0.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-A07DOCGf.js";import"./task-board-Cc9n4YDI.js";import"./chat-context-CTjB2DFv.js";import"./session-runtime-wVXsCwcJ.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-ai-providers-C5pRAYMe.js";import"./use-decopilot-events-KsVmeo4N.js";import"./use-organization-settings-CU8oKGH8.js";import"./types-D-eDMOji.js";import"./Eye-DlNcBFBo.js";import"./XClose-DN7n2l1K.js";import"./Tool01-BOA3Hhno.js";import"./Share07-CgIIbXvb.js";import"./Monitor01-1s1dhhgC.js";import"./shell-layout-y0pc6Ps_.js";import"./Users03-GR2oALJt.js";import"./SearchLg-vQ4mWmFa.js";import"./Zap-BzSAmKbo.js";import"./required-auth-layout-TicOmrWu.js";import"./use-org-sso-CrDXOfve.js";import"./LinkExternal01-6Eva3_re.js";import"./Palette-Cutx8lDK.js";import"./use-navigate-to-agent-Bf4VINKK.js";import"./reusable-new-chat-CzvRy4Pe.js";import"./chart-CzT1O9dt.js";import"./index-IhD4MlVw.js";import"./form-DPY4ZjEn.js";import"./spinner-BxT2-RQL.js";import"./Globe01-B23V2Joo.js";import"./file-type-icon-CTS2wX2I.js";import"./UserSquare-BnCNQ7NG.js";import"./ArrowUp-Be3wdSNr.js";import"./ArrowLeft-C_gfx94q.js";import"./TrendUp01-BG3C69eq.js";import"./ZapSquare-zh5y12_O.js";import"./ChevronSelectorVertical-CiZklIQA.js";import"./CreditCard01-BNnQurqN.js";import"./Settings02-xVDbAjw7.js";import"./Globe04-Bo3nBCKm.js";import"./HardDrive-CS0V7I_b.js";import"./LockUnlocked01-CN11iIqE.js";import"./LogOut01-JOlIpVYg.js";import"./Sun-1LLuEmlt.js";import"./Shield01-DWzLUFLj.js";import"./Upload01-CZRgQZHh.js";import"./User01-gcsNuBlu.js";import"./Users01-1L3hBTBq.js";import"./use-org-auth-client-CNZVyny3.js";import"./auth-LNmB6-r8.js";import"./checkbox-CwLuHRXz.js";import"./command-DfkgcKu8.js";import"./index-CwhEUWmk.js";import"./YAxis-IIZkm6Pd.js";import"./AreaChart-BmadQ3iU.js";const ns={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3},Rl=["eq","contains","exists","in"];function Pl(s){return Rl.includes(s)}function St(s){return s.filter(e=>e.key.trim()).map(e=>{const l=encodeURIComponent(e.key.trim()),o=encodeURIComponent(e.value||"");return`${l}:${e.operator}:${o}`}).join(",")}function Fl(s){return!s||typeof s!="string"?[]:s.split(",").map(e=>{if(!e)return;const[l,o,...d]=e.split(":"),i=l?decodeURIComponent(l):"";if(i.trim())return{key:i,operator:o&&Pl(o)?o:"eq",value:decodeURIComponent(d.join(":")||"")}}).filter(e=>e!==void 0)}function Xt(s){return s.filter(e=>e.key.trim()).map(e=>{switch(e.operator){case"eq":return`${e.key}=${e.value}`;case"contains":return`${e.key}~${e.value}`;case"exists":return`${e.key}?`;case"in":return`${e.key}@${e.value}`}}).join(`
2
2
  `)}function ks(s){return s.trim()?s.split(`
3
3
  `).map(e=>e.trim()).filter(e=>e.length>0).map(e=>{if(e.endsWith("?"))return{key:e.slice(0,-1),operator:"exists",value:""};if(e.includes("=")){const[l,...o]=e.split("=");return{key:l||"",operator:"eq",value:o.join("=")}}if(e.includes("~")){const[l,...o]=e.split("~");return{key:l||"",operator:"contains",value:o.join("~")}}if(e.includes("@")){const[l,...o]=e.split("@");return{key:l||"",operator:"in",value:o.join("@")}}return{key:e,operator:"exists",value:""}}):[]}function $l(s){const e={},l={},o=[],d={};for(const i of s)if(i.key.trim())switch(i.operator){case"eq":i.value&&(e[i.key]=i.value);break;case"contains":i.value&&(l[i.key]=`%${i.value}%`);break;case"exists":o.push(i.key);break;case"in":i.value&&(d[i.key]=i.value);break}return{properties:Object.keys(e).length>0?e:void 0,propertyPatterns:Object.keys(l).length>0?l:void 0,propertyKeys:o.length>0?o:void 0,propertyInValues:Object.keys(d).length>0?d:void 0}}function Cs(s){if(!s)return{content:"null",isTruncated:!1,originalSize:4};const e=s._decocms_truncated;if(typeof e=="string"&&e.length>0)return{content:e,isTruncated:!0,originalSize:e.length};let l;try{l=JSON.stringify(s,null,2)}catch{return{content:"[Unable to serialize JSON]",isTruncated:!1,originalSize:0}}const o=l.length;return o<=ns.maxJsonRenderSize?{content:l,isTruncated:!1,originalSize:o}:{content:l.slice(0,ns.maxJsonRenderSize)+`
4
4