decocms 4.325.2 → 4.325.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (272) hide show
  1. package/dist/client/assets/{AlertCircle-B0exjy2G.js → AlertCircle-Wbx84J6P.js} +1 -1
  2. package/dist/client/assets/{AreaChart-BbyZpwNl.js → AreaChart-Cld_d890.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-DDVITG8K.js → ArrowLeft-BJlpl6z3.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-DY0nxQiU.js → ArrowUp-BSj9TnDQ.js} +1 -1
  5. package/dist/client/assets/{Check-DFnPCTEg.js → Check-AnkVYvzC.js} +1 -1
  6. package/dist/client/assets/{CheckCircle-DLOuSHro.js → CheckCircle-DwmOpGug.js} +1 -1
  7. package/dist/client/assets/{ChevronRight-BcTQG1DI.js → ChevronRight-pYTAY0dL.js} +1 -1
  8. package/dist/client/assets/{ChevronSelectorVertical-DMK3FCxp.js → ChevronSelectorVertical-BbsmXbxd.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-CVSn4-gi.js → ChevronUp-3g3WN6eT.js} +1 -1
  10. package/dist/client/assets/{Copy01-DXf2ReD_.js → Copy01-sos155fT.js} +1 -1
  11. package/dist/client/assets/{CreditCard01-Dufq2QQE.js → CreditCard01-VG7XqKoo.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-CqFpz0HG.js → DotsVertical-DuuOH2An.js} +1 -1
  13. package/dist/client/assets/{Download01-GnhueTng.js → Download01-DcuqUkne.js} +1 -1
  14. package/dist/client/assets/{ErrorBarContext-7Y0x3JBZ.js → ErrorBarContext-BM4rcvvu.js} +1 -1
  15. package/dist/client/assets/{Eye-CHLagXa7.js → Eye-UqfDVX8c.js} +1 -1
  16. package/dist/client/assets/{GitBranch01-CQRzbSyx.js → GitBranch01-DLsJ2eA8.js} +1 -1
  17. package/dist/client/assets/{Globe01-DyhA33s1.js → Globe01-g_WhroPz.js} +1 -1
  18. package/dist/client/assets/{HardDrive-eC4I4aqw.js → HardDrive-DZFCo6aQ.js} +1 -1
  19. package/dist/client/assets/{Image01-D6KzR28r.js → Image01-BZ7eP3sg.js} +1 -1
  20. package/dist/client/assets/{Key01-CNitiCfD.js → Key01-ladeKbIs.js} +1 -1
  21. package/dist/client/assets/{Link01-BHe0dd0_.js → Link01-Cx-fsoFK.js} +1 -1
  22. package/dist/client/assets/{LinkExternal01-CvQ-ylaK.js → LinkExternal01-Ct6ls10Y.js} +1 -1
  23. package/dist/client/assets/{Monitor01-SbvebE9T.js → Monitor01-CHYJhnW7.js} +1 -1
  24. package/dist/client/assets/{Package-BIDQhscg.js → Package-DlB0zfSe.js} +1 -1
  25. package/dist/client/assets/{Palette-DgVW07vN.js → Palette-Cwg4Tz5U.js} +1 -1
  26. package/dist/client/assets/{Play-CR4MAXKW.js → Play-CNXxnEyG.js} +1 -1
  27. package/dist/client/assets/{Plus-D-mogJXC.js → Plus-CjjCgafZ.js} +1 -1
  28. package/dist/client/assets/{SearchMd-BYpvO9Ao.js → SearchMd-CZf0Jno3.js} +1 -1
  29. package/dist/client/assets/{Sector-CorkPUdM.js → Sector-D6LGQ5el.js} +1 -1
  30. package/dist/client/assets/{Settings02-B2gnPQ3Q.js → Settings02-DA_70bcH.js} +1 -1
  31. package/dist/client/assets/{Share07-Bu5e840D.js → Share07-B_yFA1PQ.js} +1 -1
  32. package/dist/client/assets/{Shield01-BAHmK5_B.js → Shield01-P1rLU6cR.js} +1 -1
  33. package/dist/client/assets/{Stars01-CCTPiWmK.js → Stars01-izYFmAbe.js} +1 -1
  34. package/dist/client/assets/{Sun-aWHPBk6T.js → Sun-DwCUi13i.js} +1 -1
  35. package/dist/client/assets/{Tool01-DbPhfEvg.js → Tool01-Z3QYZ79t.js} +1 -1
  36. package/dist/client/assets/{Tool02-8qVRgTeE.js → Tool02-BQmdN0LJ.js} +1 -1
  37. package/dist/client/assets/{Trash01-CV8Q1VzZ.js → Trash01-B8XVvUnv.js} +1 -1
  38. package/dist/client/assets/{TrendUp01-yPe3UG0T.js → TrendUp01-CP0vQywV.js} +1 -1
  39. package/dist/client/assets/{Upload01-B1Qytz_u.js → Upload01-CbAoc2QM.js} +1 -1
  40. package/dist/client/assets/{User01-DmJKrYPV.js → User01-Ct0i24vv.js} +1 -1
  41. package/dist/client/assets/{UserSquare-HSvWRq_9.js → UserSquare-BYbdOYH9.js} +1 -1
  42. package/dist/client/assets/{Users01-B4HgX8Cb.js → Users01-BYaxTYGQ.js} +1 -1
  43. package/dist/client/assets/{Users03-CMpVHpdR.js → Users03-jn24Kly8.js} +1 -1
  44. package/dist/client/assets/{XCircle-BN22j-Jn.js → XCircle-DlF5M8M0.js} +1 -1
  45. package/dist/client/assets/{XClose-N8lMtUXr.js → XClose-CakjP9Y8.js} +1 -1
  46. package/dist/client/assets/{Zap-BMyl5tLM.js → Zap-Bf8uxQjq.js} +1 -1
  47. package/dist/client/assets/{ZoomOut-BUSsAg6c.js → ZoomOut-fURlNFfr.js} +1 -1
  48. package/dist/client/assets/{access-gate-BsoMn5at.js → access-gate-65i3zTD_.js} +1 -1
  49. package/dist/client/assets/{agent-icon-DyMYbwSC.js → agent-icon-Sp3pGLLY.js} +1 -1
  50. package/dist/client/assets/agents-list-BZ7PpN5S.js +1 -0
  51. package/dist/client/assets/ai-providers-DlXNHZZI.js +1 -0
  52. package/dist/client/assets/{alert-vGXUrUMH.js → alert-Covq9TpT.js} +1 -1
  53. package/dist/client/assets/{alert-dialog-Bb1OlmEm.js → alert-dialog-Cj0fNCkE.js} +1 -1
  54. package/dist/client/assets/{analytics-tab-CLBd26bq.js → analytics-tab-BGfMFYes.js} +1 -1
  55. package/dist/client/assets/{api-keys-AQ1KvOAI.js → api-keys-CwoRMmEY.js} +1 -1
  56. package/dist/client/assets/api-keys-Dcjx1Kt1.js +1 -0
  57. package/dist/client/assets/app-editor-BXmBcjlO.js +1 -0
  58. package/dist/client/assets/{auth-Dy3Ai_hi.js → auth-DzRAXSGB.js} +1 -1
  59. package/dist/client/assets/{auth-catchall-CAeQDale.js → auth-catchall-C0obfXjs.js} +1 -1
  60. package/dist/client/assets/{auth-entry-Bw_OxH2J.js → auth-entry-DpCTb7jI.js} +1 -1
  61. package/dist/client/assets/{auth-split-layout-zISyI7ol.js → auth-split-layout-TPhGW0ur.js} +1 -1
  62. package/dist/client/assets/{authenticate-and-persist-oauth-DBIvzM9b.js → authenticate-and-persist-oauth-B1cWso3x.js} +1 -1
  63. package/dist/client/assets/{automation-list-row-Cm527FOk.js → automation-list-row-BR_7Wuv2.js} +1 -1
  64. package/dist/client/assets/{automation-runs-CHfOqm8r.js → automation-runs-Bt1_onfP.js} +1 -1
  65. package/dist/client/assets/automations-qhDCv6KW.js +1 -0
  66. package/dist/client/assets/{avatar-B8b2hWV1.js → avatar-B5NKRFBP.js} +1 -1
  67. package/dist/client/assets/{badge-DiXK5Efu.js → badge-BmwbVsh5.js} +1 -1
  68. package/dist/client/assets/{block-document-ItsWS1DV.js → block-document-DsxmquN5.js} +1 -1
  69. package/dist/client/assets/{breadcrumb-C5kFXgQY.js → breadcrumb-B_bU6eJc.js} +1 -1
  70. package/dist/client/assets/{buckets-BapAtm2k.js → buckets-CJXf1hSG.js} +1 -1
  71. package/dist/client/assets/{bulk-category-panel-D9GBldVp.js → bulk-category-panel-CEbuB3eE.js} +1 -1
  72. package/dist/client/assets/{capability-load-error-RzShLZ2L.js → capability-load-error-Du-FbaTG.js} +1 -1
  73. package/dist/client/assets/{cards-BdTZBvrL.js → cards-D4AMs5hh.js} +1 -1
  74. package/dist/client/assets/category-editor-Q8mnyuVW.js +1 -0
  75. package/dist/client/assets/{cdn-tab-BL4NoAOo.js → cdn-tab-YI9cEF0c.js} +1 -1
  76. package/dist/client/assets/{chart-kfhwAaMN.js → chart-Dodu1xOc.js} +1 -1
  77. package/dist/client/assets/chat-context-C0gBnrEt.js +35 -0
  78. package/dist/client/assets/{checkbox-CusZZICa.js → checkbox-DnuAdak3.js} +1 -1
  79. package/dist/client/assets/{choose-editor-Cojs0lHL.js → choose-editor-z_RSHVAe.js} +1 -1
  80. package/dist/client/assets/{cli-auth-success-DtWzwr_V.js → cli-auth-success-B04DqfZh.js} +1 -1
  81. package/dist/client/assets/{client-icons-CIbINaqs.js → client-icons-DyKPA_If.js} +1 -1
  82. package/dist/client/assets/collection-detail-Bmgm6Xpz.js +1 -0
  83. package/dist/client/assets/{collection-display-button-BA2fqyxJ.js → collection-display-button-BjYcW4FZ.js} +1 -1
  84. package/dist/client/assets/{collection-search-gbLnoGWa.js → collection-search-CDZk-ZPx.js} +1 -1
  85. package/dist/client/assets/{collection-table-wrapper-C4Ljyh7l.js → collection-table-wrapper-CGGQrcHR.js} +1 -1
  86. package/dist/client/assets/{collection-tabs-BGNThV3i.js → collection-tabs-D1lKbsAt.js} +1 -1
  87. package/dist/client/assets/{command-CeyGqPmM.js → command-Ci-j3lot.js} +1 -1
  88. package/dist/client/assets/{commerce-onboarding-YVPg5HyO.js → commerce-onboarding-Q76OphjB.js} +1 -1
  89. package/dist/client/assets/{connect-D9TGqvpE.js → connect-CE0PvrLj.js} +1 -1
  90. package/dist/client/assets/{connect-layout-fngCpQZ1.js → connect-layout-CmPm31Qh.js} +1 -1
  91. package/dist/client/assets/{connection-card-D-rWqndL.js → connection-card-Cuu-NGPd.js} +1 -1
  92. package/dist/client/assets/connection-detail-CQJhxj9a.js +1 -0
  93. package/dist/client/assets/{connection-form-helpers-nmBh-twk.js → connection-form-helpers-CBOILzhO.js} +1 -1
  94. package/dist/client/assets/{connection-pv2H4wMd.js → connection-gqBIrJrp.js} +1 -1
  95. package/dist/client/assets/{connections-C6rPB7TJ.js → connections-k4235kPb.js} +1 -1
  96. package/dist/client/assets/{create-organization-dialog-BZKwvpuX.js → create-organization-dialog-C3yQmz3P.js} +1 -1
  97. package/dist/client/assets/{decopilot-sse-pool-xVL-mPxb.js → decopilot-sse-pool-CdJPh08p.js} +1 -1
  98. package/dist/client/assets/{dialog-Do-ZnJpa.js → dialog-CWKQw2WC.js} +1 -1
  99. package/dist/client/assets/{domain-settings-gHV_ko81.js → domain-settings-BSba6mpG.js} +1 -1
  100. package/dist/client/assets/download-app-dialog-BEy2Wnzj.js +1 -0
  101. package/dist/client/assets/{drawer-D4J_5BCc.js → drawer-ClX3akJx.js} +1 -1
  102. package/dist/client/assets/{dropdown-menu-C9hHhEdP.js → dropdown-menu-DUEIZWiX.js} +1 -1
  103. package/dist/client/assets/e2e-tab-DC0rCpOL.js +1 -0
  104. package/dist/client/assets/{editor-CgtWB5x3.js → editor-DeUxecc_.js} +1 -1
  105. package/dist/client/assets/{empty-state-BPIeTQLP.js → empty-state-C-9VdPkJ.js} +1 -1
  106. package/dist/client/assets/{empty-state-CRtvF4Xb.js → empty-state-DYE3rkmB.js} +1 -1
  107. package/dist/client/assets/{extract-connection-data-Cq3FrLyn.js → extract-connection-data-KaTj8mHV.js} +1 -1
  108. package/dist/client/assets/file-explorer-D4SVt02z.js +2 -0
  109. package/dist/client/assets/{file-type-icon-BoulZj-0.js → file-type-icon-CB7H_Wiy.js} +1 -1
  110. package/dist/client/assets/{folder-icon-P0KHTdfp.js → folder-icon-C6cEeAnl.js} +1 -1
  111. package/dist/client/assets/{form-j23QTiVs.js → form-CUXIC19o.js} +1 -1
  112. package/dist/client/assets/{general-BNkDnICW.js → general-DW9bVist.js} +1 -1
  113. package/dist/client/assets/github-repo-picker-9AcEQIzR.js +1 -0
  114. package/dist/client/assets/hooks-DquOZ-Xk.js +15 -0
  115. package/dist/client/assets/{hosting-tab-Bvp0zXsU.js → hosting-tab-fN4y3bIT.js} +1 -1
  116. package/dist/client/assets/{index-DkQlXscT.js → index-BRMuylL4.js} +1 -1
  117. package/dist/client/assets/{index-CaFXU7vU.js → index-BfWwYPwx.js} +1 -1
  118. package/dist/client/assets/{index-CxLq_ov_.js → index-BkawI5he.js} +3 -3
  119. package/dist/client/assets/{index-BMAJGR3J.js → index-Cdu9R7BQ.js} +1 -1
  120. package/dist/client/assets/index-CnZuejsK.js +1 -0
  121. package/dist/client/assets/index-D-9OW3Wb.js +823 -0
  122. package/dist/client/assets/{index-BVzdbF4_.js → index-D821QKnk.js} +1 -1
  123. package/dist/client/assets/{index-Bmvq3ihr.js → index-DGNeXmXN.js} +1 -1
  124. package/dist/client/assets/index-Dpj-HbFs.js +1 -0
  125. package/dist/client/assets/{index-SiTXPFii.js → index-m6p9dAul.js} +2 -2
  126. package/dist/client/assets/{index-redirect-CJiAolND.js → index-redirect-1cfJeTJH.js} +1 -1
  127. package/dist/client/assets/{infra-billing-Y3GfCRPw.js → infra-billing-H5rZU-k1.js} +1 -1
  128. package/dist/client/assets/{input-t2vq_Yhz.js → input-fTgot4-g.js} +1 -1
  129. package/dist/client/assets/{integration-icon-Cr-roc4W.js → integration-icon-BLOQWR7d.js} +1 -1
  130. package/dist/client/assets/{invite-member-dialog-CEk-b8tU.js → invite-member-dialog-BIgrWqr7.js} +1 -1
  131. package/dist/client/assets/{label-HkRxmwei.js → label-CDt53aWD.js} +1 -1
  132. package/dist/client/assets/{layout-Dxu31OnK.js → layout-C_t6Nu2o.js} +1 -1
  133. package/dist/client/assets/{login-Cx8SbtxE.js → login-C7qvLy5B.js} +1 -1
  134. package/dist/client/assets/{markdown-DFiEgKZj.js → markdown-Dzj7KfMq.js} +1 -1
  135. package/dist/client/assets/{mcp-oauth-BHYwKN2k.js → mcp-oauth-PBuEj92n.js} +1 -1
  136. package/dist/client/assets/{members-D2oEyQo4.js → members-D_XPbFzI.js} +1 -1
  137. package/dist/client/assets/{monaco-editor-BFa0VsLo.js → monaco-editor-DAtKorVX.js} +1 -1
  138. package/dist/client/assets/{monitoring-stats-row-BQP-lBLM.js → monitoring-stats-row-zC9HU0u6.js} +1 -1
  139. package/dist/client/assets/{multi-select-DtPXBo_Z.js → multi-select-Dnr7PAJj.js} +1 -1
  140. package/dist/client/assets/{oauth-callback-ccYetd0V.js → oauth-callback-Cyp9j0ys.js} +1 -1
  141. package/dist/client/assets/{oauth-callback-ai-provider-9CMbhleP.js → oauth-callback-ai-provider-BkDqDLNZ.js} +1 -1
  142. package/dist/client/assets/{onboarding-BFJvKMEA.js → onboarding-CvnwGB6M.js} +1 -1
  143. package/dist/client/assets/org-layout-DItAI5Di.js +1 -0
  144. package/dist/client/assets/{organization-choice-VRNC0lDk.js → organization-choice-Brz54IKk.js} +1 -1
  145. package/dist/client/assets/{orgs-C2coJyQH.js → orgs-CcUI9HgJ.js} +1 -1
  146. package/dist/client/assets/{page-seo-form-C6r-7uaM.js → page-seo-form-OTDku7Z1.js} +1 -1
  147. package/dist/client/assets/{popover-CpTW2alp.js → popover-DjscXujA.js} +1 -1
  148. package/dist/client/assets/post-calendar-BcunQFOG.js +1 -0
  149. package/dist/client/assets/post-editor-N40xpPkk.js +1 -0
  150. package/dist/client/assets/{primitives-MHQnCsXb.js → primitives-_Vnzju1y.js} +1 -1
  151. package/dist/client/assets/{profile-A_0trZ37.js → profile-B_l90EbD.js} +1 -1
  152. package/dist/client/assets/project-app-view-Dq7iYeXJ.js +1 -0
  153. package/dist/client/assets/{project-icon-BY6MP5uE.js → project-icon-D7jcmH3z.js} +1 -1
  154. package/dist/client/assets/{prompts-DM7CdEW3.js → prompts-fLxWWgz-.js} +1 -1
  155. package/dist/client/assets/record-editor-Ci_NDgeT.js +1 -0
  156. package/dist/client/assets/redirect-editor-BePOP1Ph.js +1 -0
  157. package/dist/client/assets/registry-Bh5jhzbl.js +2 -0
  158. package/dist/client/assets/{registry-layout-f961NKWZ.js → registry-layout-CLY27ukG.js} +1 -1
  159. package/dist/client/assets/{reports-Cs0DFjxC.js → reports-CGghkfg_.js} +1 -1
  160. package/dist/client/assets/{require-capability-B5tbYFX0.js → require-capability-D2jyLdx0.js} +1 -1
  161. package/dist/client/assets/{required-auth-layout-LhCq4pE1.js → required-auth-layout-ZGcoBsTU.js} +1 -1
  162. package/dist/client/assets/{reset-password-CCpghMSK.js → reset-password-Dkrm3cHn.js} +1 -1
  163. package/dist/client/assets/{review-settings-CDYWi0EQ.js → review-settings-DLtdjNmr.js} +1 -1
  164. package/dist/client/assets/{roles-BBW1oHcq.js → roles-CcvMkry_.js} +1 -1
  165. package/dist/client/assets/{schema-ChmhgfCW.js → schema-C5E0ePqu.js} +1 -1
  166. package/dist/client/assets/{scroll-area-B3TTluOZ.js → scroll-area-F200w2mh.js} +1 -1
  167. package/dist/client/assets/{search-input-D0Aw5sb3.js → search-input-DJIbu8BB.js} +1 -1
  168. package/dist/client/assets/{secrets-CgpThP8p.js → secrets-DMZxvEj_.js} +1 -1
  169. package/dist/client/assets/{sections-editor-CBOJB7Hp.js → sections-editor-DwiAEnZ7.js} +2 -2
  170. package/dist/client/assets/{select-CNhOTIVN.js → select-aD2SqHOW.js} +1 -1
  171. package/dist/client/assets/{select-model-BHenBcjH.js → select-model-BAm7L9iK.js} +1 -1
  172. package/dist/client/assets/{self-tool-result-gsJsfaVf.js → self-tool-result-j5kSv4ca.js} +1 -1
  173. package/dist/client/assets/seo-editor-Cm_lDZye.js +1 -0
  174. package/dist/client/assets/settings-layout-DLlpPiRj.js +1 -0
  175. package/dist/client/assets/{settings-sidebar-CqkH_Jwa.js → settings-sidebar-CFckzuH2.js} +1 -1
  176. package/dist/client/assets/{shell-controls-DnEVv7XR.js → shell-controls-B6jpfAPG.js} +1 -1
  177. package/dist/client/assets/shell-layout-BBeCMSA6.js +1 -0
  178. package/dist/client/assets/{skill-preview-D5ZuDhd0.js → skill-preview-Crvic_gM.js} +1 -1
  179. package/dist/client/assets/{skills-BjJLGoK9.js → skills-CJys28KJ.js} +1 -1
  180. package/dist/client/assets/{sso-BEJGla7K.js → sso-BbCXtvEm.js} +1 -1
  181. package/dist/client/assets/{store-DDqzPQql.js → store-DxhB5rKM.js} +1 -1
  182. package/dist/client/assets/store-registry-DECUw0kw.js +2 -0
  183. package/dist/client/assets/{switch--G1maXos.js → switch-BImv-gvt.js} +1 -1
  184. package/dist/client/assets/synced-repos-Y5DAHAzN.js +1 -0
  185. package/dist/client/assets/{table-Bi-psIbe.js → table-svMfP7N5.js} +1 -1
  186. package/dist/client/assets/{tabs-DZInEuUb.js → tabs-DX2hIJ3b.js} +1 -1
  187. package/dist/client/assets/{task-board-CcPPQONZ.js → task-board-CU2obT3r.js} +1 -1
  188. package/dist/client/assets/task-route-DCBGrQpz.js +1 -0
  189. package/dist/client/assets/{tasks-CTHZjHVD.js → tasks-g-5mQjJo.js} +1 -1
  190. package/dist/client/assets/{textarea-DFMKKUyA.js → textarea-DJdAgtmk.js} +1 -1
  191. package/dist/client/assets/{toggle-group-HQ3bB1sR.js → toggle-group-BtNaSJHm.js} +1 -1
  192. package/dist/client/assets/{toolbar-icon-button-DEqW4Jpo.js → toolbar-icon-button-DI6yIlPy.js} +1 -1
  193. package/dist/client/assets/{toolbar-CSNy9NkF.js → toolbar-kq9Y7nNF.js} +1 -1
  194. package/dist/client/assets/{track-C5SbOoh_.js → track-X0YKsDzo.js} +1 -1
  195. package/dist/client/assets/{types-hwFA5Ktg.js → types-BeDjBiKO.js} +1 -1
  196. package/dist/client/assets/{use-ai-providers-DRa-WP8c.js → use-ai-providers-AGwxnFdj.js} +1 -1
  197. package/dist/client/assets/{use-automations-Cppk9Xar.js → use-automations-CmwM0DEc.js} +1 -1
  198. package/dist/client/assets/{use-autosave-H5fEY0zQ.js → use-autosave-lN3i2RtH.js} +1 -1
  199. package/dist/client/assets/{use-connection-B3hf1saX.js → use-connection-CsZlLbEZ.js} +1 -1
  200. package/dist/client/assets/{use-copy-DvOjkuTL.js → use-copy-DHyeBoZ8.js} +1 -1
  201. package/dist/client/assets/{use-create-virtual-mcp-59Af3Rsa.js → use-create-virtual-mcp-BOvsC0DW.js} +1 -1
  202. package/dist/client/assets/{use-debounced-autosave-DQmx8pBf.js → use-debounced-autosave-8VnwrEMs.js} +1 -1
  203. package/dist/client/assets/{use-debounced-value-BLtVz2Ja.js → use-debounced-value-3IbXIZAk.js} +1 -1
  204. package/dist/client/assets/{use-decopilot-events-CkAI1xCS.js → use-decopilot-events-WOaP0SQC.js} +1 -1
  205. package/dist/client/assets/{use-delete-connection-BdxhtyUk.js → use-delete-connection-Df_yxWGf.js} +1 -1
  206. package/dist/client/assets/{use-deployment-admin-DSVf8vXV.js → use-deployment-admin-CMRSZLUJ.js} +1 -1
  207. package/dist/client/assets/{use-destination-route-BePPmQxb.js → use-destination-route-B2O150Yr.js} +1 -1
  208. package/dist/client/assets/{use-file-configs-BEZ_kwp8.js → use-file-configs-B45QMkT9.js} +1 -1
  209. package/dist/client/assets/{use-infinite-scroll-D8hgBz9p.js → use-infinite-scroll-PS5OvGme.js} +1 -1
  210. package/dist/client/assets/{use-join-requests-D-_6MxTr.js → use-join-requests-DPn5Hwkp.js} +1 -1
  211. package/dist/client/assets/{use-mcp-auth-status-CC8-P5tO.js → use-mcp-auth-status-CaPfR8Sa.js} +1 -1
  212. package/dist/client/assets/{use-mcp-client-Bzii9bW9.js → use-mcp-client-DxE4Ab64.js} +1 -1
  213. package/dist/client/assets/{use-mcp-prompts-BTyLUk2o.js → use-mcp-prompts-BNrqL_f0.js} +1 -1
  214. package/dist/client/assets/{use-members-CEM7zlP_.js → use-members-Nvqy7Dzy.js} +1 -1
  215. package/dist/client/assets/use-navigate-to-agent-Cf-IaJUb.js +5 -0
  216. package/dist/client/assets/{use-org-auth-client-Crsb07JJ.js → use-org-auth-client-BR0PCT04.js} +1 -1
  217. package/dist/client/assets/{use-org-sso-DTBnbTx7.js → use-org-sso-CblCPla_.js} +1 -1
  218. package/dist/client/assets/{use-organization-roles-6Vfaalz_.js → use-organization-roles-PibAy9Wd.js} +1 -1
  219. package/dist/client/assets/{use-organization-settings-DRchtNm3.js → use-organization-settings-BV17wl2V.js} +1 -1
  220. package/dist/client/assets/{use-panel-navigate-DSf87ewD.js → use-panel-navigate-BG-ooS17.js} +1 -1
  221. package/dist/client/assets/{use-registry-connections-DndEI7JT.js → use-registry-connections-CdSZH0XX.js} +1 -1
  222. package/dist/client/assets/{use-secrets-DmVRsGO4.js → use-secrets-BjE52mie.js} +1 -1
  223. package/dist/client/assets/{use-section-preview-base-Z9XEvq4w.js → use-section-preview-base-BmQOZ8go.js} +1 -1
  224. package/dist/client/assets/{use-status-sounds-D9cQQiox.js → use-status-sounds-tS7pmMWO.js} +1 -1
  225. package/dist/client/assets/{use-tags-C4M9TEep.js → use-tags-B-KgG3zC.js} +1 -1
  226. package/dist/client/assets/{use-view-mode-BVUyWYvX.js → use-view-mode-DRYLjqJC.js} +1 -1
  227. package/dist/client/assets/{use-virtual-mcp-Drh4_cTK.js → use-virtual-mcp-DT_fCnuE.js} +1 -1
  228. package/dist/client/assets/useInfiniteQuery-Din4IYlF.js +1 -0
  229. package/dist/client/assets/useSuspenseInfiniteQuery-BeASDmXg.js +1 -0
  230. package/dist/client/assets/{users-CxuT9c7Z.js → users-ByFjNqYU.js} +1 -1
  231. package/dist/client/assets/variant-calendar-CJr-jUZm.js +1 -0
  232. package/dist/client/assets/{view-mode-toggle-DdtTJc3o.js → view-mode-toggle-DTFhAaHw.js} +1 -1
  233. package/dist/client/index.html +1 -1
  234. package/dist/server/cli.js +1 -1
  235. package/dist/server/server.js +1 -1
  236. package/package.json +1 -1
  237. package/dist/client/assets/agents-list-DS28B9dy.js +0 -1
  238. package/dist/client/assets/ai-providers-D5QrIBul.js +0 -1
  239. package/dist/client/assets/api-keys-onistOjb.js +0 -1
  240. package/dist/client/assets/app-editor-CO72zzFt.js +0 -1
  241. package/dist/client/assets/automations-ZjgouUBF.js +0 -1
  242. package/dist/client/assets/category-editor-C2R7fccg.js +0 -1
  243. package/dist/client/assets/chat-context-D2SP0J5D.js +0 -35
  244. package/dist/client/assets/collection-detail-BW5w3jba.js +0 -1
  245. package/dist/client/assets/connection-detail-eknzRIjb.js +0 -1
  246. package/dist/client/assets/e2e-tab-0aOWE4gZ.js +0 -1
  247. package/dist/client/assets/file-explorer-DFCGDD7E.js +0 -2
  248. package/dist/client/assets/github-repo-picker-CuXoDtLm.js +0 -1
  249. package/dist/client/assets/hooks-D1D8x6_l.js +0 -15
  250. package/dist/client/assets/index-B1coIP-x.js +0 -827
  251. package/dist/client/assets/index-CeYSBtaz.js +0 -1
  252. package/dist/client/assets/index-ZeDNJ_1q.js +0 -1
  253. package/dist/client/assets/org-layout-DY_zUSdZ.js +0 -1
  254. package/dist/client/assets/post-calendar-op-KKH1q.js +0 -1
  255. package/dist/client/assets/post-editor-ClKCgdAj.js +0 -1
  256. package/dist/client/assets/project-app-view-CsHhCOz6.js +0 -1
  257. package/dist/client/assets/record-editor-BTQg6PKa.js +0 -1
  258. package/dist/client/assets/redirect-editor-CXHphZOh.js +0 -1
  259. package/dist/client/assets/registry-CT_YquLV.js +0 -2
  260. package/dist/client/assets/seo-editor-CXcll4p8.js +0 -1
  261. package/dist/client/assets/settings-layout-BuGaWoZD.js +0 -1
  262. package/dist/client/assets/shell-layout-CAB27XFS.js +0 -1
  263. package/dist/client/assets/store-registry-Ds5fAPeG.js +0 -2
  264. package/dist/client/assets/synced-repos-_n1sYI3v.js +0 -1
  265. package/dist/client/assets/task-route-GdQl-L3H.js +0 -1
  266. package/dist/client/assets/thread-intent-BCmi7agT.js +0 -1
  267. package/dist/client/assets/thread-route-Ckn7Kp8P.js +0 -1
  268. package/dist/client/assets/use-mcp-tools-3xoGjo6f.js +0 -1
  269. package/dist/client/assets/use-navigate-to-agent-CUFdthzD.js +0 -1
  270. package/dist/client/assets/useInfiniteQuery-Cy80sU-k.js +0 -1
  271. package/dist/client/assets/useSuspenseInfiniteQuery-DKd6bR20.js +0 -1
  272. package/dist/client/assets/variant-calendar-CGeSmoC0.js +0 -1
@@ -1 +1 @@
1
- import{c as C,W as I,eP as S,c9 as _,K as A,eQ as y,m as M,eR as L,c8 as T,eS as U}from"./index-CxLq_ov_.js";import{u as p,e as V,m as R}from"./use-mcp-client-Bzii9bW9.js";import{S as g}from"./constants-DNuUCxmW.js";function h(o){const t=C.c(5);let e;t[0]!==o?(e=o===void 0?{}:o,t[0]=o,t[1]=e):e=t[1];const n=e,{org:s}=I();let i;t[2]!==s.id||t[3]!==s.slug?(i={connectionId:g,orgId:s.id,orgSlug:s.slug},t[2]=s.id,t[3]=s.slug,t[4]=i):i=t[4];const l=p(i);return S(s.id,"VIRTUAL_MCP",l,n)}function O(o){const t=C.c(14);let e;t[0]!==o?(e={},t[0]=o,t[1]=e):e=t[1];const n=e,{org:s}=I();let i;t[2]!==s.id||t[3]!==s.slug?(i={connectionId:g,orgId:s.id,orgSlug:s.slug},t[2]=s.id,t[3]=s.slug,t[4]=i):i=t[4];const l=V(i);let c;t[5]!==l||t[6]!==n||t[7]!==s.id?(c=L(s.id,"VIRTUAL_MCP",l,n),t[5]=l,t[6]=n,t[7]=s.id,t[8]=c):c=t[8];const r=!!l;let u;t[9]!==c||t[10]!==r?(u={...c,enabled:r},t[9]=c,t[10]=r,t[11]=u):u=t[11];const{data:d}=M(u);let a;return t[12]!==d?(a=d??[],t[12]=d,t[13]=a):a=t[13],a}function w(o){const t=C.c(10),{org:e}=I();let n;t[0]!==e.id||t[1]!==e.slug?(n={connectionId:g,orgId:e.id,orgSlug:e.slug},t[0]=e.id,t[1]=e.slug,t[2]=n):n=t[2];const s=V(n),i=o??void 0;let l;t[3]!==s||t[4]!==e.id||t[5]!==i?(l=y(e.id,"VIRTUAL_MCP",i,s),t[3]=s,t[4]=e.id,t[5]=i,t[6]=l):l=t[6];const c=!!s&&!!o;let r;t[7]!==l||t[8]!==c?(r={...l,enabled:c},t[7]=l,t[8]=c,t[9]=r):r=t[9];const{data:u}=M(r);return u?.item??null}async function E(o,t,e={}){const n=await o.fetchQuery(R({connectionId:g,orgId:t.id,orgSlug:t.slug})),s=L(t.id,"VIRTUAL_MCP",n,e);return s.select(await o.fetchQuery(s))}function k(o){const t=C.c(18);let e;t[0]!==o?(e={},t[0]=o,t[1]=e):e=t[1];const n=e,{org:s}=I();let i;t[2]!==s.id||t[3]!==s.slug?(i={connectionId:g,orgId:s.id,orgSlug:s.slug},t[2]=s.id,t[3]=s.slug,t[4]=i):i=t[4];const l=V(i);let c;t[5]!==l||t[6]!==n||t[7]!==s.id?(c=U(s.id,"VIRTUAL_MCP",l,n),t[5]=l,t[6]=n,t[7]=s.id,t[8]=c):c=t[8];const r=!!l;let u;t[9]!==c||t[10]!==r?(u={...c,enabled:r},t[9]=c,t[10]=r,t[11]=u):u=t[11];const{data:d}=M(u);let a;t[12]!==d?.items?(a=d?.items??[],t[12]=d?.items,t[13]=a):a=t[13];const P=d?.totalCount,m=d?.hasMore;let f;return t[14]!==a||t[15]!==P||t[16]!==m?(f={items:a,totalCount:P,hasMore:m},t[14]=a,t[15]=P,t[16]=m,t[17]=f):f=t[17],f}function v(o){const t=C.c(3),{org:e}=I();let n;t[0]!==e.id||t[1]!==e.slug?(n={connectionId:g,orgId:e.id,orgSlug:e.slug},t[0]=e.id,t[1]=e.slug,t[2]=n):n=t[2];const s=p(n);return T(e.id,"VIRTUAL_MCP",o??void 0,s)}function x(o){const t=C.c(15),{org:e}=I();let n;t[0]!==e.id||t[1]!==e.slug?(n={connectionId:g,orgId:e.id,orgSlug:e.slug},t[0]=e.id,t[1]=e.slug,t[2]=n):n=t[2];const s=p(n);let i,l,c;t[3]!==o||t[4]!==e.id?(i=[...o].sort(),c=M,l=A.virtualMcpLastUsed(e.id,i),t[3]=o,t[4]=e.id,t[5]=i,t[6]=l,t[7]=c):(i=t[5],l=t[6],c=t[7]);const r=i.length>0;let u;t[8]!==s||t[9]!==i?(u=async()=>{const P=(await s.callTool({name:"VIRTUAL_MCP_LAST_USED_LIST",arguments:{ids:i}})).structuredContent??{items:[]},m=new Map;for(const f of P.items)m.set(f.id,f);return m},t[8]=s,t[9]=i,t[10]=u):u=t[10];let d;return t[11]!==l||t[12]!==r||t[13]!==u?(d={queryKey:l,enabled:r,staleTime:3e4,queryFn:u},t[11]=l,t[12]=r,t[13]=u,t[14]=d):d=t[14],c(d)}function B(){const o=C.c(3),{org:t}=I();let e;o[0]!==t.id||o[1]!==t.slug?(e={connectionId:g,orgId:t.id,orgSlug:t.slug},o[0]=t.id,o[1]=t.slug,o[2]=e):e=o[2];const n=p(e);return _(t.id,"VIRTUAL_MCP",n)}export{B as a,h as b,x as c,O as d,k as e,w as f,E as g,v as u};
1
+ import{c as C,W as I,eP as S,c9 as _,K as A,eQ as y,m as M,eR as L,c8 as T,eS as U}from"./index-BkawI5he.js";import{u as p,e as V,m as R}from"./use-mcp-client-DxE4Ab64.js";import{S as g}from"./constants-DNuUCxmW.js";function h(o){const t=C.c(5);let e;t[0]!==o?(e=o===void 0?{}:o,t[0]=o,t[1]=e):e=t[1];const n=e,{org:s}=I();let i;t[2]!==s.id||t[3]!==s.slug?(i={connectionId:g,orgId:s.id,orgSlug:s.slug},t[2]=s.id,t[3]=s.slug,t[4]=i):i=t[4];const l=p(i);return S(s.id,"VIRTUAL_MCP",l,n)}function O(o){const t=C.c(14);let e;t[0]!==o?(e={},t[0]=o,t[1]=e):e=t[1];const n=e,{org:s}=I();let i;t[2]!==s.id||t[3]!==s.slug?(i={connectionId:g,orgId:s.id,orgSlug:s.slug},t[2]=s.id,t[3]=s.slug,t[4]=i):i=t[4];const l=V(i);let c;t[5]!==l||t[6]!==n||t[7]!==s.id?(c=L(s.id,"VIRTUAL_MCP",l,n),t[5]=l,t[6]=n,t[7]=s.id,t[8]=c):c=t[8];const r=!!l;let u;t[9]!==c||t[10]!==r?(u={...c,enabled:r},t[9]=c,t[10]=r,t[11]=u):u=t[11];const{data:d}=M(u);let a;return t[12]!==d?(a=d??[],t[12]=d,t[13]=a):a=t[13],a}function w(o){const t=C.c(10),{org:e}=I();let n;t[0]!==e.id||t[1]!==e.slug?(n={connectionId:g,orgId:e.id,orgSlug:e.slug},t[0]=e.id,t[1]=e.slug,t[2]=n):n=t[2];const s=V(n),i=o??void 0;let l;t[3]!==s||t[4]!==e.id||t[5]!==i?(l=y(e.id,"VIRTUAL_MCP",i,s),t[3]=s,t[4]=e.id,t[5]=i,t[6]=l):l=t[6];const c=!!s&&!!o;let r;t[7]!==l||t[8]!==c?(r={...l,enabled:c},t[7]=l,t[8]=c,t[9]=r):r=t[9];const{data:u}=M(r);return u?.item??null}async function E(o,t,e={}){const n=await o.fetchQuery(R({connectionId:g,orgId:t.id,orgSlug:t.slug})),s=L(t.id,"VIRTUAL_MCP",n,e);return s.select(await o.fetchQuery(s))}function k(o){const t=C.c(18);let e;t[0]!==o?(e={},t[0]=o,t[1]=e):e=t[1];const n=e,{org:s}=I();let i;t[2]!==s.id||t[3]!==s.slug?(i={connectionId:g,orgId:s.id,orgSlug:s.slug},t[2]=s.id,t[3]=s.slug,t[4]=i):i=t[4];const l=V(i);let c;t[5]!==l||t[6]!==n||t[7]!==s.id?(c=U(s.id,"VIRTUAL_MCP",l,n),t[5]=l,t[6]=n,t[7]=s.id,t[8]=c):c=t[8];const r=!!l;let u;t[9]!==c||t[10]!==r?(u={...c,enabled:r},t[9]=c,t[10]=r,t[11]=u):u=t[11];const{data:d}=M(u);let a;t[12]!==d?.items?(a=d?.items??[],t[12]=d?.items,t[13]=a):a=t[13];const P=d?.totalCount,m=d?.hasMore;let f;return t[14]!==a||t[15]!==P||t[16]!==m?(f={items:a,totalCount:P,hasMore:m},t[14]=a,t[15]=P,t[16]=m,t[17]=f):f=t[17],f}function v(o){const t=C.c(3),{org:e}=I();let n;t[0]!==e.id||t[1]!==e.slug?(n={connectionId:g,orgId:e.id,orgSlug:e.slug},t[0]=e.id,t[1]=e.slug,t[2]=n):n=t[2];const s=p(n);return T(e.id,"VIRTUAL_MCP",o??void 0,s)}function x(o){const t=C.c(15),{org:e}=I();let n;t[0]!==e.id||t[1]!==e.slug?(n={connectionId:g,orgId:e.id,orgSlug:e.slug},t[0]=e.id,t[1]=e.slug,t[2]=n):n=t[2];const s=p(n);let i,l,c;t[3]!==o||t[4]!==e.id?(i=[...o].sort(),c=M,l=A.virtualMcpLastUsed(e.id,i),t[3]=o,t[4]=e.id,t[5]=i,t[6]=l,t[7]=c):(i=t[5],l=t[6],c=t[7]);const r=i.length>0;let u;t[8]!==s||t[9]!==i?(u=async()=>{const P=(await s.callTool({name:"VIRTUAL_MCP_LAST_USED_LIST",arguments:{ids:i}})).structuredContent??{items:[]},m=new Map;for(const f of P.items)m.set(f.id,f);return m},t[8]=s,t[9]=i,t[10]=u):u=t[10];let d;return t[11]!==l||t[12]!==r||t[13]!==u?(d={queryKey:l,enabled:r,staleTime:3e4,queryFn:u},t[11]=l,t[12]=r,t[13]=u,t[14]=d):d=t[14],c(d)}function B(){const o=C.c(3),{org:t}=I();let e;o[0]!==t.id||o[1]!==t.slug?(e={connectionId:g,orgId:t.id,orgSlug:t.slug},o[0]=t.id,o[1]=t.slug,o[2]=e):e=o[2];const n=p(e);return _(t.id,"VIRTUAL_MCP",n)}export{h as a,B as b,x as c,O as d,k as e,w as f,E as g,v as u};
@@ -0,0 +1 @@
1
+ import{I as u}from"./use-infinite-scroll-PS5OvGme.js";import{fg as i}from"./index-BkawI5he.js";function t(e,r){return i(e,u,r)}export{t as u};
@@ -0,0 +1 @@
1
+ import{I as s}from"./use-infinite-scroll-PS5OvGme.js";import{fg as u,bU as n}from"./index-BkawI5he.js";function a(r,e){return u({...r,enabled:!0,suspense:!0,throwOnError:n},s,e)}export{a as u};
@@ -1 +1 @@
1
- import{c as V,b as q,r as z,a as O,m as Y,e as $,j as t,P as I,K as J,t as Q,B as W}from"./index-CxLq_ov_.js";import{C as G}from"./collection-table-wrapper-C4Ljyh7l.js";import{E as L}from"./empty-state-BPIeTQLP.js";import{S as H}from"./search-input-D0Aw5sb3.js";import{A as X}from"./avatar-B8b2hWV1.js";import{B as D}from"./badge-DiXK5Efu.js";import{u as Z}from"./use-debounced-value-BLtVz2Ja.js";import{a as K}from"./admin-fetch-CCSvjTk1.js";import{f as ee}from"./format-time-BnbuEtat.js";import{g as se}from"./get-initials-D-f_fDFw.js";import"./table-Bi-psIbe.js";import"./ArrowUp-DY0nxQiU.js";import"./SearchMd-BYpvO9Ao.js";import"./User01-DmJKrYPV.js";import"./differenceInSeconds-NQ4PDo0z.js";function ve(){const e=V.c(58),s=q(),[r,M]=z.useState("");let N;e[0]!==r?(N=r.trim(),e[0]=r,e[1]=N):N=e[1];const a=Z(N,300),{data:R}=O.useSession(),P=R?.user?.id;let n;e[2]!==a?(n=J.deploymentAdminUsers(a),e[2]=a,e[3]=n):n=e[3];let l;e[4]!==a?(l=()=>{const i=new URLSearchParams({limit:"100"});return a&&i.set("searchValue",a),K(`/api/_admin/users?${i}`)},e[4]=a,e[5]=l):l=e[5];let y;e[6]!==n||e[7]!==l?(y={queryKey:n,queryFn:l},e[6]=n,e[7]=l,e[8]=y):y=e[8];const{data:k,isLoading:_,isError:A}=Y(y);let C;e[9]===Symbol.for("react.memo_cache_sentinel")?(C=ie,e[9]=C):C=e[9];let w;e[10]!==s?(w={mutationFn:ae,onSuccess:C,onError:i=>{Q.error(i instanceof Error?i.message:s("admin.users.failedToImpersonate"))}},e[10]=s,e[11]=w):w=e[11];const E=$(w);let b;e[12]!==k?.users?(b=k?.users??[],e[12]=k?.users,e[13]=b):b=e[13];const B=b;let o;e[14]!==s?(o=s("admin.users.columnUser"),e[14]=s,e[15]=o):o=e[15];let m;e[16]!==s?(m=i=>t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(X,{url:i.image??void 0,fallback:se(i.name),shape:"circle",size:"sm"}),t.jsxs("div",{className:"min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:i.name||s("admin.users.unknown")}),t.jsx("div",{className:"text-sm text-muted-foreground truncate",children:i.email})]})]}),e[16]=s,e[17]=m):m=e[17];let d;e[18]!==o||e[19]!==m?(d={id:"user",header:o,render:m,cellClassName:"flex-1 min-w-0"},e[18]=o,e[19]=m,e[20]=d):d=e[20];let c;e[21]!==s?(c=s("admin.users.columnEmail"),e[21]=s,e[22]=c):c=e[22];let u;e[23]!==s?(u=i=>i.emailVerified?t.jsx(D,{variant:"outline",className:"text-success border-success/20",children:s("admin.users.verified")}):t.jsx(D,{variant:"outline",className:"text-muted-foreground",children:s("admin.users.unverified")}),e[23]=s,e[24]=u):u=e[24];let f;e[25]!==c||e[26]!==u?(f={id:"verified",header:c,render:u,cellClassName:"w-28 shrink-0"},e[25]=c,e[26]=u,e[27]=f):f=e[27];let p;e[28]!==s?(p=s("admin.users.columnCreated"),e[28]=s,e[29]=p):p=e[29];let h;e[30]!==p?(h={id:"created",header:p,render:te,cellClassName:"w-48 shrink-0"},e[30]=p,e[31]=h):h=e[31];let x;e[32]!==P||e[33]!==E||e[34]!==s?(x={id:"actions",header:"",render:i=>t.jsx(W,{variant:"outline",size:"sm",disabled:i.id===P||E.isPending,onClick:()=>E.mutate(i.id),children:s("admin.users.impersonate")}),cellClassName:"w-32 shrink-0"},e[32]=P,e[33]=E,e[34]=s,e[35]=x):x=e[35];let T;e[36]!==f||e[37]!==h||e[38]!==x||e[39]!==d?(T=[d,f,h,x],e[36]=f,e[37]=h,e[38]=x,e[39]=d,e[40]=T):T=e[40];const F=T;let j;e[41]!==s?(j=s("admin.users.searchPlaceholder"),e[41]=s,e[42]=j):j=e[42];let g;e[43]!==r||e[44]!==j?(g=t.jsx(H,{value:r,onChange:M,placeholder:j,className:"w-full md:w-[375px]"}),e[43]=r,e[44]=j,e[45]=g):g=e[45];let S;e[46]!==a||e[47]!==A||e[48]!==s?(S=A?t.jsx(L,{title:s("admin.users.failedToLoadTitle"),description:s("admin.users.failedToLoadDescription")}):t.jsx(L,{title:s("admin.users.noUsersFoundTitle"),description:a?s("admin.users.noUsersMatchSearch",{search:a}):s("admin.users.noUsersYet")}),e[46]=a,e[47]=A,e[48]=s,e[49]=S):S=e[49];let v;e[50]!==F||e[51]!==_||e[52]!==S||e[53]!==B?(v=t.jsx(G,{columns:F,data:B,isLoading:_,emptyState:S}),e[50]=F,e[51]=_,e[52]=S,e[53]=B,e[54]=v):v=e[54];let U;return e[55]!==g||e[56]!==v?(U=t.jsx(I,{children:t.jsx(I.Content,{children:t.jsx(I.Body,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[g,v]})})})}),e[55]=g,e[56]=v,e[57]=U):U=e[57],U}function te(e){return t.jsx("span",{className:"text-sm text-foreground",children:ee(e.createdAt)})}function ie(){window.location.href="/"}function ae(e){return K("/api/_admin/impersonate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userId:e})})}export{ve as default};
1
+ import{c as V,b as q,r as z,a as O,m as Y,e as $,j as t,P as I,K as J,t as Q,B as W}from"./index-BkawI5he.js";import{C as G}from"./collection-table-wrapper-CGGQrcHR.js";import{E as L}from"./empty-state-C-9VdPkJ.js";import{S as H}from"./search-input-DJIbu8BB.js";import{A as X}from"./avatar-B5NKRFBP.js";import{B as D}from"./badge-BmwbVsh5.js";import{u as Z}from"./use-debounced-value-3IbXIZAk.js";import{a as K}from"./admin-fetch-CCSvjTk1.js";import{f as ee}from"./format-time-BnbuEtat.js";import{g as se}from"./get-initials-D-f_fDFw.js";import"./table-svMfP7N5.js";import"./ArrowUp-BSj9TnDQ.js";import"./SearchMd-CZf0Jno3.js";import"./User01-Ct0i24vv.js";import"./differenceInSeconds-NQ4PDo0z.js";function ve(){const e=V.c(58),s=q(),[r,M]=z.useState("");let N;e[0]!==r?(N=r.trim(),e[0]=r,e[1]=N):N=e[1];const a=Z(N,300),{data:R}=O.useSession(),P=R?.user?.id;let n;e[2]!==a?(n=J.deploymentAdminUsers(a),e[2]=a,e[3]=n):n=e[3];let l;e[4]!==a?(l=()=>{const i=new URLSearchParams({limit:"100"});return a&&i.set("searchValue",a),K(`/api/_admin/users?${i}`)},e[4]=a,e[5]=l):l=e[5];let y;e[6]!==n||e[7]!==l?(y={queryKey:n,queryFn:l},e[6]=n,e[7]=l,e[8]=y):y=e[8];const{data:k,isLoading:_,isError:A}=Y(y);let C;e[9]===Symbol.for("react.memo_cache_sentinel")?(C=ie,e[9]=C):C=e[9];let w;e[10]!==s?(w={mutationFn:ae,onSuccess:C,onError:i=>{Q.error(i instanceof Error?i.message:s("admin.users.failedToImpersonate"))}},e[10]=s,e[11]=w):w=e[11];const E=$(w);let b;e[12]!==k?.users?(b=k?.users??[],e[12]=k?.users,e[13]=b):b=e[13];const B=b;let o;e[14]!==s?(o=s("admin.users.columnUser"),e[14]=s,e[15]=o):o=e[15];let m;e[16]!==s?(m=i=>t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(X,{url:i.image??void 0,fallback:se(i.name),shape:"circle",size:"sm"}),t.jsxs("div",{className:"min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:i.name||s("admin.users.unknown")}),t.jsx("div",{className:"text-sm text-muted-foreground truncate",children:i.email})]})]}),e[16]=s,e[17]=m):m=e[17];let d;e[18]!==o||e[19]!==m?(d={id:"user",header:o,render:m,cellClassName:"flex-1 min-w-0"},e[18]=o,e[19]=m,e[20]=d):d=e[20];let c;e[21]!==s?(c=s("admin.users.columnEmail"),e[21]=s,e[22]=c):c=e[22];let u;e[23]!==s?(u=i=>i.emailVerified?t.jsx(D,{variant:"outline",className:"text-success border-success/20",children:s("admin.users.verified")}):t.jsx(D,{variant:"outline",className:"text-muted-foreground",children:s("admin.users.unverified")}),e[23]=s,e[24]=u):u=e[24];let f;e[25]!==c||e[26]!==u?(f={id:"verified",header:c,render:u,cellClassName:"w-28 shrink-0"},e[25]=c,e[26]=u,e[27]=f):f=e[27];let p;e[28]!==s?(p=s("admin.users.columnCreated"),e[28]=s,e[29]=p):p=e[29];let h;e[30]!==p?(h={id:"created",header:p,render:te,cellClassName:"w-48 shrink-0"},e[30]=p,e[31]=h):h=e[31];let x;e[32]!==P||e[33]!==E||e[34]!==s?(x={id:"actions",header:"",render:i=>t.jsx(W,{variant:"outline",size:"sm",disabled:i.id===P||E.isPending,onClick:()=>E.mutate(i.id),children:s("admin.users.impersonate")}),cellClassName:"w-32 shrink-0"},e[32]=P,e[33]=E,e[34]=s,e[35]=x):x=e[35];let T;e[36]!==f||e[37]!==h||e[38]!==x||e[39]!==d?(T=[d,f,h,x],e[36]=f,e[37]=h,e[38]=x,e[39]=d,e[40]=T):T=e[40];const F=T;let j;e[41]!==s?(j=s("admin.users.searchPlaceholder"),e[41]=s,e[42]=j):j=e[42];let g;e[43]!==r||e[44]!==j?(g=t.jsx(H,{value:r,onChange:M,placeholder:j,className:"w-full md:w-[375px]"}),e[43]=r,e[44]=j,e[45]=g):g=e[45];let S;e[46]!==a||e[47]!==A||e[48]!==s?(S=A?t.jsx(L,{title:s("admin.users.failedToLoadTitle"),description:s("admin.users.failedToLoadDescription")}):t.jsx(L,{title:s("admin.users.noUsersFoundTitle"),description:a?s("admin.users.noUsersMatchSearch",{search:a}):s("admin.users.noUsersYet")}),e[46]=a,e[47]=A,e[48]=s,e[49]=S):S=e[49];let v;e[50]!==F||e[51]!==_||e[52]!==S||e[53]!==B?(v=t.jsx(G,{columns:F,data:B,isLoading:_,emptyState:S}),e[50]=F,e[51]=_,e[52]=S,e[53]=B,e[54]=v):v=e[54];let U;return e[55]!==g||e[56]!==v?(U=t.jsx(I,{children:t.jsx(I.Content,{children:t.jsx(I.Body,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[g,v]})})})}),e[55]=g,e[56]=v,e[57]=U):U=e[57],U}function te(e){return t.jsx("span",{className:"text-sm text-foreground",children:ee(e.createdAt)})}function ie(){window.location.href="/"}function ae(e){return K("/api/_admin/impersonate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userId:e})})}export{ve as default};
@@ -0,0 +1 @@
1
+ import{c as K,b as X,r as Z,j as n,l as rt,a1 as ut,a4 as ht,B as tt,a2 as xt}from"./index-BkawI5he.js";import{z as gt,a4 as at,aF as bt}from"./agent-icon-Sp3pGLLY.js";import{i as vt}from"./ChevronRight-pYTAY0dL.js";import{L as yt}from"./label-CDt53aWD.js";import{S as lt}from"./scroll-area-F200w2mh.js";import{S as jt}from"./switch-BImv-gvt.js";import{V as Tt}from"./view-mode-toggle-DTFhAaHw.js";import{bv as ct,bw as mt,bx as Nt,by as _t,bz as kt,bA as U,bB as wt}from"./index-D-9OW3Wb.js";import"./AlertCircle-Wbx84J6P.js";import"./Tool01-Z3QYZ79t.js";import"./ArrowUp-BSj9TnDQ.js";import"./ArrowLeft-BJlpl6z3.js";import"./Tool02-BQmdN0LJ.js";import"./XCircle-DlF5M8M0.js";import"./TrendUp01-CP0vQywV.js";import"./ZoomOut-fURlNFfr.js";import"./Users03-jn24Kly8.js";import"./CheckCircle-DwmOpGug.js";import"./Check-AnkVYvzC.js";import"./ChevronUp-3g3WN6eT.js";import"./ChevronSelectorVertical-BbsmXbxd.js";import"./DotsVertical-DuuOH2An.js";import"./UserSquare-BYbdOYH9.js";import"./Copy01-sos155fT.js";import"./CreditCard01-VG7XqKoo.js";import"./Download01-DcuqUkne.js";import"./Settings02-DA_70bcH.js";import"./Eye-UqfDVX8c.js";import"./Share07-B_yFA1PQ.js";import"./GitBranch01-DLsJ2eA8.js";import"./Globe01-g_WhroPz.js";import"./XClose-CakjP9Y8.js";import"./HardDrive-DZFCo6aQ.js";import"./Image01-BZ7eP3sg.js";import"./Key01-ladeKbIs.js";import"./Link01-Cx-fsoFK.js";import"./LinkExternal01-Ct6ls10Y.js";import"./Monitor01-CHYJhnW7.js";import"./Sun-DwCUi13i.js";import"./Package-DlB0zfSe.js";import"./Palette-Cwg4Tz5U.js";import"./Play-CNXxnEyG.js";import"./Plus-CjjCgafZ.js";import"./SearchMd-CZf0Jno3.js";import"./Shield01-P1rLU6cR.js";import"./Stars01-izYFmAbe.js";import"./Trash01-B8XVvUnv.js";import"./Upload01-CbAoc2QM.js";import"./User01-Ct0i24vv.js";import"./Users01-BYaxTYGQ.js";import"./Zap-Bf8uxQjq.js";import"./select-aD2SqHOW.js";import"./chat-context-C0gBnrEt.js";import"./use-panel-navigate-BG-ooS17.js";import"./use-destination-route-B2O150Yr.js";import"./hooks-DquOZ-Xk.js";import"./constants-DNuUCxmW.js";import"./use-mcp-client-DxE4Ab64.js";import"./auth-DzRAXSGB.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-CdJPh08p.js";import"./task-board-CU2obT3r.js";import"./schema-C5E0ePqu.js";import"./slugify-CEUa2lfQ.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-DT_fCnuE.js";import"./use-ai-providers-AGwxnFdj.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-WOaP0SQC.js";import"./use-organization-settings-BV17wl2V.js";import"./automation-runs-Bt1_onfP.js";import"./useInfiniteQuery-Din4IYlF.js";import"./use-infinite-scroll-PS5OvGme.js";import"./use-connection-CsZlLbEZ.js";import"./table-svMfP7N5.js";import"./empty-state-C-9VdPkJ.js";import"./use-members-Nvqy7Dzy.js";import"./use-org-auth-client-BR0PCT04.js";import"./use-automations-CmwM0DEc.js";import"./useSuspenseInfiniteQuery-BeASDmXg.js";import"./avatar-B5NKRFBP.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-DHyeBoZ8.js";import"./markdown-Dzj7KfMq.js";import"./dialog-CWKQw2WC.js";import"./monaco-editor-DAtKorVX.js";import"./editor-DeUxecc_.js";import"./types-BeDjBiKO.js";import"./shell-layout-BBeCMSA6.js";import"./download-app-dialog-BEy2Wnzj.js";import"./project-icon-D7jcmH3z.js";import"./github-repo-COLY3wWI.js";import"./command-Ci-j3lot.js";import"./index-BRMuylL4.js";import"./required-auth-layout-ZGcoBsTU.js";import"./use-org-sso-CblCPla_.js";import"./integration-icon-BLOQWR7d.js";import"./use-navigate-to-agent-Cf-IaJUb.js";import"./use-mcp-prompts-BNrqL_f0.js";import"./form-CUXIC19o.js";import"./input-fTgot4-g.js";import"./file-type-icon-CB7H_Wiy.js";import"./drawer-ClX3akJx.js";import"./collection-search-CDZk-ZPx.js";import"./tabs-DX2hIJ3b.js";import"./toggle-group-BtNaSJHm.js";import"./task-route-DCBGrQpz.js";import"./toolbar-icon-button-DI6yIlPy.js";import"./popover-DjscXujA.js";import"./github-repo-picker-9AcEQIzR.js";import"./use-debounced-value-3IbXIZAk.js";import"./authenticate-and-persist-oauth-B1cWso3x.js";import"./mcp-oauth-PBuEj92n.js";import"./extract-connection-data-KaTj8mHV.js";import"./metadata-dUsYcpuu.js";import"./connection-gqBIrJrp.js";import"./provision-repo-scoped-github-connection-WQFARyHG.js";import"./connection-card-Cuu-NGPd.js";import"./use-registry-connections-CdSZH0XX.js";import"./retry-CErkP7V6.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-DJdAgtmk.js";import"./connection-form-helpers-CBOILzhO.js";import"./collection-tabs-D1lKbsAt.js";import"./badge-BmwbVsh5.js";import"./use-file-configs-B45QMkT9.js";import"./site-slug-uya6Wp4-.js";import"./dropdown-menu-DUEIZWiX.js";import"./get-initials-D-f_fDFw.js";import"./select-model-BAm7L9iK.js";import"./checkbox-DnuAdak3.js";import"./ai-providers-logos-DD3qZ33J.js";import"./folder-icon-C6cEeAnl.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-tS7pmMWO.js";import"./toolbar-kq9Y7nNF.js";import"./skill-preview-Crvic_gM.js";import"./pt-BR-CLy76QW2.js";import"./alert-dialog-Cj0fNCkE.js";import"./use-debounced-autosave-8VnwrEMs.js";import"./search-input-DJIbu8BB.js";import"./use-mcp-auth-status-CaPfR8Sa.js";import"./use-secrets-BjE52mie.js";import"./client-icons-DyKPA_If.js";import"./connect-layout-CmPm31Qh.js";import"./self-tool-result-j5kSv4ca.js";import"./track-X0YKsDzo.js";import"./use-tags-B-KgG3zC.js";import"./breadcrumb-B_bU6eJc.js";import"./safe-image-url-D5z803Ot.js";import"./automation-list-row-BR_7Wuv2.js";import"./site-error--i37Vnuw.js";import"./cards-D4AMs5hh.js";const Et=new Set(["website/matchers/date.ts","$live/matchers/MatchDate.ts"]),St=new Set(["website/matchers/multi.ts","$live/matchers/MatchMulti.ts"]),Ct=new Date(-864e13),Mt=new Date(864e13),At=/\/flags\/multivariate(?:\/[^/]+)?\.ts$/,$t=/\/flags\/multivariate\.ts$/;function Lt(e){let t=e;t.startsWith("pages-")&&(t=t.slice(6).replace(/-\d+$/,""));try{t=decodeURIComponent(t)}catch{}return t}function Rt(e){if(!e||typeof e!="object")return null;const{start:t,end:r}=e,o=typeof t=="string",s=typeof r=="string";if(!o&&!s)return null;const i=o?new Date(t):Ct,a=s?new Date(r):Mt;return Number.isNaN(i.getTime())||Number.isNaN(a.getTime())||o&&s&&a.getTime()<=i.getTime()?null:{start:i,end:a,openStart:!o,openEnd:!s}}function pt(e,t){if(!e||typeof e!="object")return;const r=e.__resolveType;if(typeof r=="string"){if(Et.has(r)){const o=Rt(e);o&&t.push(o);return}if(St.has(r)){const o=e.matchers;if(Array.isArray(o))for(const s of o)pt(s,t)}}}function Dt(e){if(!e||typeof e!="object")return!1;const t=e.__resolveType;if(typeof t!="string"||!At.test(t))return!1;const r=e.variants;return Array.isArray(r)}function Ot(e){if(typeof e=="string"){const c=e.trim();if(c.length===0)return null;try{const m=new URL(c).pathname.split("/").filter(Boolean),p=m[m.length-1];if(p)return decodeURIComponent(p)}catch{}return c.length>80?`${c.slice(0,77)}…`:c}if(!e||typeof e!="object")return null;const t=e,r=t.config,s=t.desktop?.media,i=[t.title,t.name,t.label,t.alt,r?.title,r?.name,r?.typeAlert?.message,s?.alt,Array.isArray(t.matcher)?t.matcher[0]:void 0];for(const c of i)if(typeof c=="string"&&c.trim().length>0)return c.trim();const a=t.__resolveType;if(typeof a=="string"){const l=(a.split("/").pop()??a).replace(/\.(tsx?|jsx?)$/i,"");if(l.length>0)return l}return null}function Pt(e){const t=[];for(let r=0;r<e.length;r++){const o=e[r];typeof o=="number"?t.length>0?t[t.length-1]+=`[${o}]`:t.push(`[${o}]`):t.push(o)}return t.join(" · ")}function Q(e,t,r,o,s){if(Dt(e)){const i=e.variants,a=e.__resolveType,c=$t.test(a)?"":Pt(o);i.forEach((l,m)=>{if(!l||typeof l!="object")return;const p=l,h=[];if(pt(p.rule,h),h.length===0)return;const g=Ot(p.value)??(c||r);for(const u of h)s.push({blockKey:t,blockLabel:r,innerPath:c,variantIndex:m,start:u.start,end:u.end,openStart:u.openStart,openEnd:u.openEnd,label:g,flagResolveType:a})});for(let l=0;l<i.length;l++){const m=i[l];m&&typeof m=="object"&&Q(m.value,t,r,[...o,"variants",l,"value"],s)}return}if(Array.isArray(e)){for(let i=0;i<e.length;i++)Q(e[i],t,r,[...o,i],s);return}if(e&&typeof e=="object")for(const[i,a]of Object.entries(e))i!=="__resolveType"&&Q(a,t,r,[...o,i],s)}function It(e){if(!e)return[];const t=[];for(const[r,o]of Object.entries(e))Q(o,r,Lt(r),[],t);return t.sort((r,o)=>r.start.getTime()-o.start.getTime())}function Vt(e){const t=[...new Set(e)].sort(),r=new Map;return t.forEach((o,s)=>{const i=s*137.508%360;r.set(o,{bg:`oklch(0.62 0.14 ${i})`,text:"white",border:`oklch(0.50 0.14 ${i})`})}),r}const Bt={bg:"oklch(0.62 0.14 0)",text:"white",border:"oklch(0.50 0.14 0)"};function dt(e,t){return e.get(t)??Bt}const ot=new Intl.DateTimeFormat("en",{dateStyle:"medium",timeStyle:"short"});function Ht(e,t){const r=e.openStart?t("sandbox.variantCalendar.always"):ot.format(e.start),o=e.openEnd?t("sandbox.variantCalendar.ongoing"):ot.format(e.end);return`${r} → ${o}`}function Ft(e){const t=K.c(18),{variant:r}=e,o=X();let s;t[0]!==r.blockLabel?(s=n.jsx("div",{className:"font-semibold",children:r.blockLabel}),t[0]=r.blockLabel,t[1]=s):s=t[1];let i;t[2]!==r.innerPath?(i=r.innerPath&&n.jsx("div",{className:"text-muted-foreground",children:r.innerPath}),t[2]=r.innerPath,t[3]=i):i=t[3];let a;t[4]!==r.blockLabel||t[5]!==r.innerPath||t[6]!==r.label?(a=r.label!==r.blockLabel&&r.label!==r.innerPath&&n.jsx("div",{className:"text-muted-foreground",children:r.label}),t[4]=r.blockLabel,t[5]=r.innerPath,t[6]=r.label,t[7]=a):a=t[7];let c;t[8]!==o||t[9]!==r?(c=Ht(r,o),t[8]=o,t[9]=r,t[10]=c):c=t[10];let l;t[11]!==c?(l=n.jsx("div",{className:"mt-1",children:c}),t[11]=c,t[12]=l):l=t[12];let m;return t[13]!==s||t[14]!==i||t[15]!==a||t[16]!==l?(m=n.jsx(xt,{children:n.jsxs("div",{className:"text-xs",children:[s,i,a,l]})}),t[13]=s,t[14]=i,t[15]=a,t[16]=l,t[17]=m):m=t[17],m}const nt=16;function zt(e,t){const r=e?"transparent":"#000 0",o=t?"transparent":"#000 100%";if(!(!e&&!t))return`linear-gradient(to right, ${r}, #000 ${nt}px, #000 calc(100% - ${nt}px), ${o})`}function ft(e){const t=K.c(26),{variant:r,color:o,style:s,children:i,fadeStart:a,fadeEnd:c}=e,l=a===void 0?!1:a,m=c===void 0?!1:c;let p;t[0]!==m||t[1]!==l?(p=zt(l,m),t[0]=m,t[1]=l,t[2]=p):p=t[2];const h=p;let f;t[3]!==l?(f=l&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},t[3]=l,t[4]=f):f=t[4];let g;t[5]!==m?(g=m&&{borderTopRightRadius:0,borderBottomRightRadius:0},t[5]=m,t[6]=g):g=t[6];let u;t[7]!==h?(u=h&&{maskImage:h,WebkitMaskImage:h},t[7]=h,t[8]=u):u=t[8];let x;t[9]!==o.bg||t[10]!==o.text||t[11]!==s||t[12]!==f||t[13]!==g||t[14]!==u?(x={background:o.bg,color:o.text,borderRadius:4,...f,...g,...u,...s},t[9]=o.bg,t[10]=o.text,t[11]=s,t[12]=f,t[13]=g,t[14]=u,t[15]=x):x=t[15];let b;t[16]!==i?(b=n.jsx("span",{className:"truncate",children:i}),t[16]=i,t[17]=b):b=t[17];let E;t[18]!==x||t[19]!==b?(E=n.jsx(ut,{asChild:!0,children:n.jsx("div",{className:"absolute flex items-center px-2 text-[11px] font-medium truncate cursor-default",style:x,children:b})}),t[18]=x,t[19]=b,t[20]=E):E=t[20];let T;t[21]!==r?(T=n.jsx(Ft,{variant:r}),t[21]=r,t[22]=T):T=t[22];let d;return t[23]!==T||t[24]!==E?(d=n.jsxs(ht,{children:[E,T]}),t[23]=T,t[24]=E,t[25]=d):d=t[25],d}function Xo(e){const t=K.c(72),{decofile:r}=e,o=X(),[s,i]=Z.useState("calendar"),[a,c]=Z.useState(Kt),[l,m]=Z.useState(!1);let p,h,f;if(t[0]!==r||t[1]!==l){const I=It(r);p=I.filter(Ut).length,f=l?I:I.filter(Gt),h=Vt(f.map(Wt)),t[0]=r,t[1]=l,t[2]=p,t[3]=h,t[4]=f}else p=t[2],h=t[3],f=t[4];const g=h;let u;t[5]===Symbol.for("react.memo_cache_sentinel")?(u=()=>c(mt(new Date)),t[5]=u):u=t[5];const x=u;let b;t[6]!==s?(b=()=>c(I=>s==="calendar"?U(I,-1):U(I,-3)),t[6]=s,t[7]=b):b=t[7];const E=b;let T;t[8]!==s?(T=()=>c(I=>s==="calendar"?U(I,1):U(I,3)),t[8]=s,t[9]=T):T=t[9];const d=T;let v;t[10]!==o?(v=o("sandbox.variantCalendar.today"),t[10]=o,t[11]=v):v=t[11];let y;t[12]!==v?(y=n.jsx(tt,{variant:"outline",size:"sm",onClick:x,children:v}),t[12]=v,t[13]=y):y=t[13];let N;t[14]!==o?(N=o("sandbox.variantCalendar.previous"),t[14]=o,t[15]=N):N=t[15];let A;t[16]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx(gt,{size:16}),t[16]=A):A=t[16];let _;t[17]!==E||t[18]!==N?(_=n.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:E,"aria-label":N,children:A}),t[17]=E,t[18]=N,t[19]=_):_=t[19];let k;t[20]!==o?(k=o("sandbox.variantCalendar.next"),t[20]=o,t[21]=k):k=t[21];let C;t[22]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx(vt,{size:16}),t[22]=C):C=t[22];let $;t[23]!==d||t[24]!==k?($=n.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:d,"aria-label":k,children:C}),t[23]=d,t[24]=k,t[25]=$):$=t[25];const L=ct[a.getMonth()];let M;t[26]!==a?(M=a.getFullYear(),t[26]=a,t[27]=M):M=t[27];let w;t[28]!==L||t[29]!==M?(w=n.jsxs("h2",{className:"ml-2 text-base font-semibold",children:[L," ",M]}),t[28]=L,t[29]=M,t[30]=w):w=t[30];let j;t[31]!==$||t[32]!==w||t[33]!==y||t[34]!==_?(j=n.jsxs("div",{className:"flex items-center gap-2",children:[y,_,$,w]}),t[31]=$,t[32]=w,t[33]=y,t[34]=_,t[35]=j):j=t[35];let R;t[36]!==p||t[37]!==l||t[38]!==o?(R=p>0&&n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(jt,{id:"show-ongoing",checked:l,onCheckedChange:m}),n.jsx(yt,{htmlFor:"show-ongoing",className:"text-xs text-muted-foreground cursor-pointer",children:o("sandbox.variantCalendar.showOngoing",{count:p})})]}),t[36]=p,t[37]=l,t[38]=o,t[39]=R):R=t[39];let H;t[40]===Symbol.for("react.memo_cache_sentinel")?(H=n.jsx(at,{}),t[40]=H):H=t[40];let V;t[41]!==o?(V=o("sandbox.variantCalendar.calendarMode"),t[41]=o,t[42]=V):V=t[42];let S;t[43]!==V?(S={value:"calendar",icon:H,label:V},t[43]=V,t[44]=S):S=t[44];let F;t[45]===Symbol.for("react.memo_cache_sentinel")?(F=n.jsx(bt,{}),t[45]=F):F=t[45];let D;t[46]!==o?(D=o("sandbox.variantCalendar.timelineMode"),t[46]=o,t[47]=D):D=t[47];let O;t[48]!==D?(O={value:"timeline",icon:F,label:D},t[48]=D,t[49]=O):O=t[49];let P;t[50]!==S||t[51]!==O?(P=[S,O],t[50]=S,t[51]=O,t[52]=P):P=t[52];let B;t[53]!==P||t[54]!==s?(B=n.jsx(Tt,{value:s,onValueChange:i,options:P}),t[53]=P,t[54]=s,t[55]=B):B=t[55];let z;t[56]!==R||t[57]!==B?(z=n.jsxs("div",{className:"flex items-center gap-4",children:[R,B]}),t[56]=R,t[57]=B,t[58]=z):z=t[58];let W;t[59]!==j||t[60]!==z?(W=n.jsxs("div",{className:"flex items-center justify-between px-4 h-12 border-b shrink-0",children:[j,z]}),t[59]=j,t[60]=z,t[61]=W):W=t[61];let G;t[62]!==g||t[63]!==a||t[64]!==p||t[65]!==l||t[66]!==f||t[67]!==s?(G=f.length===0?n.jsx(Yt,{hiddenOngoing:l?0:p}):s==="calendar"?n.jsx(Jt,{monthStart:a,variants:f,colorMap:g}):n.jsx(te,{monthStart:a,variants:f,colorMap:g}),t[62]=g,t[63]=a,t[64]=p,t[65]=l,t[66]=f,t[67]=s,t[68]=G):G=t[68];let q;return t[69]!==W||t[70]!==G?(q=n.jsxs("div",{className:"flex h-full w-full flex-col",children:[W,G]}),t[69]=W,t[70]=G,t[71]=q):q=t[71],q}function Wt(e){return e.blockKey}function Gt(e){return!e.openEnd}function Ut(e){return e.openEnd}function Kt(){return mt(new Date)}function Yt(e){const t=K.c(4),{hiddenOngoing:r}=e,o=r===void 0?0:r,s=X();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(at,{size:24,className:"text-muted-foreground/60"}),t[0]=i):i=t[0];let a;return t[1]!==o||t[2]!==s?(a=n.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-2 text-center text-sm text-muted-foreground p-6",children:[i,o>0?n.jsxs(n.Fragment,{children:[n.jsx("div",{children:s("sandbox.variantCalendar.noDatedVariants")}),n.jsx("div",{className:"text-xs text-muted-foreground/80",children:s("sandbox.variantCalendar.hiddenOngoingVariants",{count:o})})]}):n.jsxs(n.Fragment,{children:[n.jsx("div",{children:s("sandbox.variantCalendar.noScheduledVariants")}),n.jsx("div",{className:"text-xs text-muted-foreground/80",children:s("sandbox.variantCalendar.dateMatcherInfo")})]})]}),t[1]=o,t[2]=s,t[3]=a):a=t[3],a}const et=20,it=2,st=28,qt=6;function Jt(e){const t=K.c(17),{monthStart:r,variants:o,colorMap:s}=e;let i,a,c,l,m;if(t[0]!==s||t[1]!==r||t[2]!==o){const f=Nt(r),g=_t(new Date);i=lt,m="flex-1 min-h-0",a="min-w-[840px]",t[8]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx("div",{className:"grid grid-cols-7 border-b text-xs text-muted-foreground sticky top-0 bg-background z-10",children:wt.map(Xt)}),t[8]=c):c=t[8],l=f.map((u,x)=>{const b=kt(u,o),E=b.reduce(Qt,0),T=st+E*(et+it)+8;return n.jsxs("div",{className:"grid grid-cols-7 relative border-b",style:{height:T},children:[u.map((d,v)=>{const y=d.getMonth()===r.getMonth(),N=d.getTime()===g.getTime();return n.jsx("div",{className:rt("border-r last:border-r-0 px-2 pt-1.5 text-xs",y?"bg-background":"bg-muted/30 text-muted-foreground"),children:n.jsx("span",{className:rt("inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1",N&&"bg-primary text-primary-foreground font-semibold"),children:d.getDate()})},v)}),b.map((d,v)=>{const y=dt(s,d.variant.blockKey),N=st+d.lane*(et+it),A=d.leftUnits/7*100,_=d.widthUnits/7*100,k=d.variant.openStart&&x===0,C=d.variant.openEnd&&x===f.length-1;return n.jsxs(ft,{variant:d.variant,color:y,fadeStart:k,fadeEnd:C,style:{top:N,left:`calc(${A}% + 2px)`,width:`calc(${_}% - 4px)`,minWidth:qt,height:et},children:[d.variant.blockLabel,d.variant.label!==d.variant.blockLabel&&n.jsxs("span",{className:"opacity-70",children:[" · ",d.variant.label]})]},`${x}-${v}`)})]},x)}),t[0]=s,t[1]=r,t[2]=o,t[3]=i,t[4]=a,t[5]=c,t[6]=l,t[7]=m}else i=t[3],a=t[4],c=t[5],l=t[6],m=t[7];let p;t[9]!==a||t[10]!==c||t[11]!==l?(p=n.jsxs("div",{className:a,children:[c,l]}),t[9]=a,t[10]=c,t[11]=l,t[12]=p):p=t[12];let h;return t[13]!==i||t[14]!==m||t[15]!==p?(h=n.jsx(i,{className:m,children:p}),t[13]=i,t[14]=m,t[15]=p,t[16]=h):h=t[16],h}function Qt(e,t){return Math.max(e,t.lane+1)}function Xt(e){return n.jsx("div",{className:"px-2 py-2 text-center uppercase tracking-wide",children:e},e)}const J=4,Zt=32,Y=240;function te(e){const t=K.c(23),{monthStart:r,variants:o,colorMap:s}=e,i=r,a=U(r,J),c=new Date,l=new Map;for(const w of o){const j=l.get(w.blockKey)??[];j.push(w),l.set(w.blockKey,j)}const m=Array.from(l.entries()).sort(oe),p=a.getTime()-i.getTime(),h=w=>(Math.max(i.getTime(),Math.min(a.getTime(),w.getTime()))-i.getTime())/p*100;let f;t[0]!==i?(f=(w,j)=>U(i,j),t[0]=i,t[1]=f):f=t[1];const g=Array.from({length:J},f),u=c.getTime()>=i.getTime()&&c.getTime()<=a.getTime()?h(c):null,x=X(),b=lt,E="flex-1 min-h-0",T="min-w-[900px] relative";let d;t[2]===Symbol.for("react.memo_cache_sentinel")?(d={width:Y},t[2]=d):d=t[2];let v;t[3]!==x?(v=x("sandbox.variantCalendar.variantBlock"),t[3]=x,t[4]=v):v=t[4];let y;t[5]!==v?(y=n.jsx("div",{className:"shrink-0 px-3 py-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground border-r",style:d,children:v}),t[5]=v,t[6]=y):y=t[6];let N;t[7]===Symbol.for("react.memo_cache_sentinel")?(N={gridTemplateColumns:`repeat(${J}, minmax(0, 1fr))`},t[7]=N):N=t[7];const A=g.map(re);let _;t[8]!==A?(_=n.jsx("div",{className:"flex-1 grid",style:N,children:A}),t[8]=A,t[9]=_):_=t[9];let k;t[10]!==y||t[11]!==_?(k=n.jsxs("div",{className:"flex border-b sticky top-0 bg-background z-10",children:[y,_]}),t[10]=y,t[11]=_,t[12]=k):k=t[12];let C;t[13]!==x||t[14]!==u?(C=u!==null&&n.jsx("div",{className:"pointer-events-none absolute top-0 bottom-0 w-px bg-primary/70 z-[5]",style:{left:`calc(${Y}px + (100% - ${Y}px) * ${u} / 100)`},children:n.jsx("span",{className:"absolute -top-0.5 -translate-x-1/2 rounded-sm bg-primary px-1.5 py-px text-[10px] font-medium text-primary-foreground",children:x("sandbox.variantCalendar.todayLabel")})}),t[13]=x,t[14]=u,t[15]=C):C=t[15];const $=m.map(w=>{const[j,R]=w,H=dt(s,j),V=R[0]?.blockLabel??j;return n.jsxs("div",{children:[n.jsx("div",{className:"flex items-center bg-muted/40 border-b text-xs font-semibold uppercase tracking-wide text-muted-foreground",style:{height:28},children:n.jsx("div",{className:"px-3 truncate",style:{width:Y},children:V})}),R.map((S,F)=>n.jsxs("div",{className:"flex border-b items-center",style:{height:Zt},children:[n.jsxs("div",{className:"flex items-center gap-2 px-3 text-sm border-r shrink-0",style:{width:Y},children:[n.jsx("span",{className:"inline-block h-2 w-2 rounded-full shrink-0",style:{background:H.bg}}),n.jsx("span",{className:"truncate text-foreground/80",children:S.label})]}),n.jsxs("div",{className:"relative flex-1 h-full",children:[n.jsx("div",{className:"absolute inset-0 grid",style:{gridTemplateColumns:`repeat(${J}, minmax(0, 1fr))`},children:g.map(ee)}),(()=>{const D=Math.max(S.start.getTime(),i.getTime()),O=Math.min(S.end.getTime(),a.getTime());if(O<=D)return null;const P=h(new Date(D)),B=h(new Date(O))-P;return n.jsx(ft,{variant:S,color:H,fadeStart:S.openStart,fadeEnd:S.openEnd,style:{top:"50%",transform:"translateY(-50%)",left:`${P}%`,width:`calc(${B}% - 2px)`,height:22},children:S.label})})()]})]},F))]},j)});let L;t[16]!==k||t[17]!==C||t[18]!==$?(L=n.jsxs("div",{className:T,children:[k,C,$]}),t[16]=k,t[17]=C,t[18]=$,t[19]=L):L=t[19];let M;return t[20]!==b||t[21]!==L?(M=n.jsx(b,{className:E,children:L}),t[20]=b,t[21]=L,t[22]=M):M=t[22],M}function ee(e,t){return n.jsx("div",{className:"border-r last:border-r-0 border-border/40"},t)}function re(e,t){return n.jsxs("div",{className:"px-2 py-2 text-xs uppercase tracking-wide text-muted-foreground border-r last:border-r-0",children:[ct[e.getMonth()]?.slice(0,3)," ",e.getFullYear()]},t)}function oe(e,t){return e[0].localeCompare(t[0])}export{Xo as VariantCalendar};
@@ -1 +1 @@
1
- import{c as $,r as C,l as f,j as i,a4 as k,a1 as I,a2 as P}from"./index-CxLq_ov_.js";const M={sm:{button:"size-7",buttonWithLabel:"h-7",icon:"size-4"},md:{button:"size-9",buttonWithLabel:"h-9",icon:"size-5"},lg:{button:"size-12",buttonWithLabel:"h-12",icon:"size-6"}};function A(E){const t=$.c(27),{value:s,onValueChange:y,options:o,size:L,fullWidth:R,className:z}=E,_=L===void 0?"sm":L,m=R===void 0?!1:R;let h;t[0]===Symbol.for("react.memo_cache_sentinel")?(h=[],t[0]=h):h=t[0];const T=C.useRef(h);let x;t[1]===Symbol.for("react.memo_cache_sentinel")?(x={left:0,width:0,opacity:0},t[1]=x):x=t[1];const[d,S]=C.useState(x);let g,p;t[2]!==o||t[3]!==s?(g=()=>{const e=o.findIndex(j=>j.value===s),b=T.current[e];b&&S({left:b.offsetLeft,width:b.offsetWidth,opacity:1})},p=[s,o],t[2]=o,t[3]=s,t[4]=g,t[5]=p):(g=t[4],p=t[5]),C.useEffect(g,p);const l=M[_];let n;t[6]!==z?(n=f("relative flex gap-0 bg-muted rounded-lg",z),t[6]=z,t[7]=n):n=t[7];let a;t[8]!==l||t[9]!==m||t[10]!==y||t[11]!==o||t[12]!==s?(a=o.map((e,b)=>{const j=i.jsxs("button",{ref:V=>{T.current[b]=V},type:"button",onClick:()=>y(e.value),"aria-label":e.label,className:f("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",m?"flex-1 h-12 px-4":e.label?f(l.buttonWithLabel,"px-3"):l.button),children:[i.jsx("span",{className:f("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",l.icon,s===e.value?"text-foreground":"text-muted-foreground"),children:e.icon}),e.label&&i.jsx("span",{className:f("text-xs transition-colors ease-out duration-200 whitespace-nowrap",s===e.value?"text-foreground":"text-muted-foreground"),children:e.label})]},e.value);return e.tooltip?i.jsxs(k,{children:[i.jsx(I,{asChild:!0,children:j}),i.jsx(P,{side:"bottom",children:e.tooltip})]},e.value):j}),t[8]=l,t[9]=m,t[10]=y,t[11]=o,t[12]=s,t[13]=a):a=t[13];const w=m?"h-12":l.button;let r;t[14]!==w?(r=f("absolute z-0 bg-background rounded-lg border-shadow transition-all [transition-timing-function:var(--ease-out-cubic)] duration-200",w),t[14]=w,t[15]=r):r=t[15];const W=`${d.left}px`,N=`${d.width}px`;let c;t[16]!==d.opacity||t[17]!==W||t[18]!==N?(c={left:W,width:N,opacity:d.opacity},t[16]=d.opacity,t[17]=W,t[18]=N,t[19]=c):c=t[19];let u;t[20]!==r||t[21]!==c?(u=i.jsx("div",{className:r,style:c}),t[20]=r,t[21]=c,t[22]=u):u=t[22];let v;return t[23]!==u||t[24]!==n||t[25]!==a?(v=i.jsxs("div",{className:n,children:[a,u]}),t[23]=u,t[24]=n,t[25]=a,t[26]=v):v=t[26],v}export{A as V};
1
+ import{c as $,r as C,l as f,j as i,a4 as k,a1 as I,a2 as P}from"./index-BkawI5he.js";const M={sm:{button:"size-7",buttonWithLabel:"h-7",icon:"size-4"},md:{button:"size-9",buttonWithLabel:"h-9",icon:"size-5"},lg:{button:"size-12",buttonWithLabel:"h-12",icon:"size-6"}};function A(E){const t=$.c(27),{value:s,onValueChange:y,options:o,size:L,fullWidth:R,className:z}=E,_=L===void 0?"sm":L,m=R===void 0?!1:R;let h;t[0]===Symbol.for("react.memo_cache_sentinel")?(h=[],t[0]=h):h=t[0];const T=C.useRef(h);let x;t[1]===Symbol.for("react.memo_cache_sentinel")?(x={left:0,width:0,opacity:0},t[1]=x):x=t[1];const[d,S]=C.useState(x);let g,p;t[2]!==o||t[3]!==s?(g=()=>{const e=o.findIndex(j=>j.value===s),b=T.current[e];b&&S({left:b.offsetLeft,width:b.offsetWidth,opacity:1})},p=[s,o],t[2]=o,t[3]=s,t[4]=g,t[5]=p):(g=t[4],p=t[5]),C.useEffect(g,p);const l=M[_];let n;t[6]!==z?(n=f("relative flex gap-0 bg-muted rounded-lg",z),t[6]=z,t[7]=n):n=t[7];let a;t[8]!==l||t[9]!==m||t[10]!==y||t[11]!==o||t[12]!==s?(a=o.map((e,b)=>{const j=i.jsxs("button",{ref:V=>{T.current[b]=V},type:"button",onClick:()=>y(e.value),"aria-label":e.label,className:f("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",m?"flex-1 h-12 px-4":e.label?f(l.buttonWithLabel,"px-3"):l.button),children:[i.jsx("span",{className:f("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",l.icon,s===e.value?"text-foreground":"text-muted-foreground"),children:e.icon}),e.label&&i.jsx("span",{className:f("text-xs transition-colors ease-out duration-200 whitespace-nowrap",s===e.value?"text-foreground":"text-muted-foreground"),children:e.label})]},e.value);return e.tooltip?i.jsxs(k,{children:[i.jsx(I,{asChild:!0,children:j}),i.jsx(P,{side:"bottom",children:e.tooltip})]},e.value):j}),t[8]=l,t[9]=m,t[10]=y,t[11]=o,t[12]=s,t[13]=a):a=t[13];const w=m?"h-12":l.button;let r;t[14]!==w?(r=f("absolute z-0 bg-background rounded-lg border-shadow transition-all [transition-timing-function:var(--ease-out-cubic)] duration-200",w),t[14]=w,t[15]=r):r=t[15];const W=`${d.left}px`,N=`${d.width}px`;let c;t[16]!==d.opacity||t[17]!==W||t[18]!==N?(c={left:W,width:N,opacity:d.opacity},t[16]=d.opacity,t[17]=W,t[18]=N,t[19]=c):c=t[19];let u;t[20]!==r||t[21]!==c?(u=i.jsx("div",{className:r,style:c}),t[20]=r,t[21]=c,t[22]=u):u=t[22];let v;return t[23]!==u||t[24]!==n||t[25]!==a?(v=i.jsxs("div",{className:n,children:[a,u]}),t[23]=u,t[24]=n,t[25]=a,t[26]=v):v=t[26],v}export{A as V};
@@ -50,7 +50,7 @@
50
50
  <meta name="twitter:description" content="Hire specialized agents, give them access to your tools, and let them deliver real projects — with planning, verification, and observability built in." />
51
51
  <meta name="twitter:image" content="/og-image.png" />
52
52
  <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
53
- <script type="module" crossorigin src="/assets/index-CxLq_ov_.js"></script>
53
+ <script type="module" crossorigin src="/assets/index-BkawI5he.js"></script>
54
54
  <link rel="stylesheet" crossorigin href="/assets/index-CiiXjYYX.css">
55
55
  </head>
56
56
  <body>
@@ -1545,7 +1545,7 @@ Usage: deco services <up|down|status>`),process.exit(1)}}var Sn1=L(()=>{Ub()});f
1545
1545
  `.execute($);if(Number(W.rows[0]?.cnt)===0){console.warn(`Failed to migrate ${J}/${K}, keeping in old table`);continue}}await yy`
1546
1546
  DELETE FROM kysely_migration WHERE name = ${X}
1547
1547
  `.execute($)}}async function xs1($){await G04($),await J04($);let Z=new _s1({db:$,provider:{getMigrations:()=>Promise.resolve(qn0)}}),{error:X,results:Q}=await Z.migrateToLatest(),Y=0;if(Q?.forEach((G)=>{if(G.status==="Success")Y++;else if(G.status==="Error")console.error(`Failed to execute migration "${G.migrationName}"`)}),X)throw console.error("Failed to migrate"),console.error(X),X;return Y}async function K04($){let{keepOpen:Z=!1,database:X,skipBetterAuth:Q=!1}=$??{},Y="skipped";if(!Q&&!X)Y=await Bm0();let G=X??u$(),J=async()=>{if(!Z&&!X)await WO(G).catch((K)=>{console.warn("Warning: Error closing database:",K)})};try{let K=await xs1(G.db);return await J(),{betterAuth:Y,kysely:K}}catch(K){throw await J(),K}}async function W04(){let $=u$(),Z=new _s1({db:$.db,provider:{getMigrations:()=>Promise.resolve(qn0)}}),{error:X,results:Q}=await Z.migrateDown();if(Q?.forEach((Y)=>{if(Y.status==="Success")console.log(`\u2705 Migration "${Y.migrationName}" rolled back successfully`);else if(Y.status==="Error")console.error(`\u274C Failed to rollback migration "${Y.migrationName}"`)}),X)throw console.error("Failed to rollback migration"),console.error(X),X}var bs1=L(()=>{Cs1();Om0();JX()});async function v70($){let Z={...process.env},X=I80($,Z);console.log(_E1(X.settings.encryptionKey));let Q=X.settings.betterAuthSecret||(X.settings.localMode?Ko1(X.settings.dataDir):""),{ensureServices:Y}=await Promise.resolve().then(() => (yZ0(),bZ0)),{outputs:G,services:J}=await Y({home:X.settings.dataDir,externalDatabaseUrl:X.externalDatabaseUrl,externalNatsUrl:X.externalNatsUrl});if(!X.skipMigrations){let{migrateBetterAuth:W}=await Promise.resolve().then(() => (Om0(),Ho1));await W(G.databaseUrl);let{createDatabase:H}=await Promise.resolve().then(() => (JX(),It1)),{migrateToLatest:F}=await Promise.resolve().then(() => (bs1(),fs1)),U=H(G.databaseUrl);await F({keepOpen:!0,database:U,skipBetterAuth:!0})}let K={...X.settings,betterAuthSecret:Q,databaseUrl:G.databaseUrl,natsUrls:G.natsUrls,...G.s3?{s3Endpoint:G.s3.endpoint,s3Bucket:G.s3.bucket,s3AccessKeyId:G.s3.accessKeyId,s3SecretAccessKey:G.s3.secretAccessKey,s3ForcePathStyle:G.s3.forcePathStyle}:{}};return Cn1(K),{settings:K,services:J.map((W)=>({name:W.name==="PostgreSQL"?"Postgres":W.name,port:W.port})),managedServiceNames:J.filter((W)=>W.owner==="managed").map((W)=>W.name)}}var Mn0=L(()=>{Ub();Wo1();j$()});var us1={};s(us1,{updateService:()=>eE,subscribeCliState:()=>Sn0,setTuiConsoleIntercepted:()=>x70,setServerUrl:()=>Cp,setMigrationsDone:()=>Sp,setDevMode:()=>F04,resetCliStateForTests:()=>H04,isTuiConsoleIntercepted:()=>f70,getCliState:()=>kn0,addLogEntry:()=>LO});function ys1(){return[{name:"Postgres",status:"pending",port:0},{name:"NATS",status:"pending",port:0}]}function gs1(){return{services:ys1(),migrationsStatus:"pending",serverUrl:null,logs:[]}}function H04(){tQ=gs1()}function kp(){for(let $ of Vn0)$()}function kn0(){return tQ}function Sn0($){return Vn0.add($),()=>Vn0.delete($)}function eE($){tQ={...tQ,services:tQ.services.map((Z)=>Z.name===$.name?$:Z)},kp()}function Sp(){tQ={...tQ,migrationsStatus:"done"},kp()}function Cp($){tQ={...tQ,serverUrl:$},kp()}function LO($){let Z=[...tQ.logs,$];tQ={...tQ,logs:Z.length>500?Z.slice(-500):Z},kp()}function F04(){tQ={...tQ,services:[...ys1(),{name:"API",status:"pending",port:0},{name:"Vite",status:"pending",port:0}]},kp()}function x70($){hs1=$}function f70(){return hs1}var tQ,Vn0,hs1=!1;var $j=L(()=>{tQ=gs1();Vn0=new Set});import{createServer as cs1}from"net";function U04($){return new Promise((Z)=>{let X=cs1();X.once("error",()=>Z(!1)),X.listen($,"0.0.0.0",()=>{X.close(()=>Z(!0))})})}async function _p($){if(await U04($))return $;let Z=await new Promise((X,Q)=>{let Y=cs1();Y.once("error",Q),Y.listen(0,"0.0.0.0",()=>{let G=Y.address(),J=typeof G==="object"&&G?G.port:0;Y.close(()=>X(J))})});return console.warn(`Port ${$} is in use, using port ${Z} instead.`),Z}var Cn0=()=>{};var vn0={};s(vn0,{startDevServer:()=>B04,pipeToLogStore:()=>_n0});import{join as N04}from"path";function _n0($){let Z=$.getReader(),X=new TextDecoder,Q="";function Y(){let G=Q.split(`
1548
- `);Q=G.pop()??"";for(let J of G){let K=Bun.stripANSI(J).replace(/^\[\d+\]\s*/,"").trim();if(!K)continue;LO({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:K})}}(async()=>{try{for(;;){let{done:G,value:J}=await Z.read();if(G)break;Q+=X.decode(J,{stream:!0}),Y()}}catch{}if(Q.trim()){let G=Bun.stripANSI(Q).replace(/^\[\d+\]\s*/,"").trim();if(G)LO({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:G})}})()}async function B04($){let{baseUrl:Z,noTui:X}=$,Q=process.env.HOST==="0.0.0.0"&&Boolean(process.env.PORT),Y=Q?process.env.PORT:$.vitePort,G=Z||`http://localhost:${Y}`,J=Q?await _p(Number(Y)+1):await _p(Number($.port)),{settings:K,services:W,managedServiceNames:H}=await v70({port:String(J),home:$.home,baseUrl:$.baseUrl,localMode:$.localMode,skipMigrations:$.skipMigrations,noTui:$.noTui,vitePort:$.vitePort});for(let D of W)eE({name:D.name,status:"ready",port:D.port});Sp();let F=N04(import.meta.dir,"..","..","..","..",".."),U=X===!0,N=Bun.spawn(["bun","run","dev:servers"],{cwd:F,env:{...process.env,PORT:String(K.port),VITE_PORT:String(Y),DATABASE_URL:K.databaseUrl,NATS_URL:K.natsUrls.join(","),NODE_ENV:K.nodeEnv,BASE_URL:G,DECOCMS_LOCAL_MODE:String(K.localMode),DECOCMS_HOME:K.dataDir,DATA_DIR:K.dataDir,DECO_CLI:"1",...K.betterAuthSecret?{BETTER_AUTH_SECRET:K.betterAuthSecret}:{},...K.s3Endpoint?{S3_ENDPOINT:K.s3Endpoint,S3_BUCKET:K.s3Bucket??"",S3_ACCESS_KEY_ID:K.s3AccessKeyId??"",S3_SECRET_ACCESS_KEY:K.s3SecretAccessKey??"",S3_FORCE_PATH_STYLE:String(K.s3ForcePathStyle)}:{},...K.natsCredsPath?{NATS_CREDS:K.natsCredsPath}:{}},stdio:["inherit",U?"inherit":"pipe",U?"inherit":"pipe"]});if(!U)_n0(N.stdout),_n0(N.stderr);Cp(G),eE({name:"Vite",status:"ready",port:Number(Y)}),eE({name:"API",status:"ready",port:Number(K.port)});let O=async(D)=>{if(N.kill(D),await N.exited,H.length>0){let{stopServices:w}=await Promise.resolve().then(() => (yZ0(),bZ0));await w(K.dataDir)}};return process.on("SIGINT",()=>O("SIGINT")),process.on("SIGTERM",()=>O("SIGTERM")),{port:Number(Y),process:N}}var xn0=L(()=>{Mn0();$j();Cn0()});var b70;var fn0=L(()=>{b70={name:"decocms",version:"4.325.2",description:"Deco CMS \u2014 Self-hostable MCP Gateway for managing AI connections and tools",author:"Deco team",repository:{type:"git",url:"git+https://github.com/decocms/studio.git",directory:"apps/api"},bugs:{url:"https://github.com/decocms/studio/issues"},type:"module",bin:{deco:"./dist/server/cli.js"},files:["dist/**/*"],scripts:{dev:"bun run migrate && bun run dev:server","dev:server":"bun run --cwd=../../packages/sandbox build && NODE_ENV=development bun --env-file=.env --hot run src/index.ts",build:"bun run build:server","build:server":"bun run scripts/bundle-server-script.ts --dist ./dist/server","generate:tool-contracts":"bun run scripts/generate-tool-contracts.ts","db:migrate":"bun run ./dist/server/migrate.js","db:migrate:dbos":"bun run ./dist/server/migrate-dbos.js",check:"tsc --noEmit",start:"bun run ./dist/server/server.js",migrate:"bun run src/database/migrate.ts","migrate:dbos":"bun run src/database/migrate-dbos.ts",test:"bun test src","better-auth:migrate":"bunx --bun @better-auth/cli migrate -y --config src/auth/index.ts",prepublishOnly:"bun run --cwd=../.. build:studio"},optionalDependencies:{"@duckdb/node-api":"^1.5.0-r.1"},dependencies:{"@ai-sdk/anthropic":"^3.0.85","@ai-sdk/google":"^3.0.83","@ai-sdk/openai":"^3.0.73","@anthropic-ai/sdk":"^0.105.0","@aws-sdk/client-s3":"^3.1013.0","@aws-sdk/client-sts":"^3.1013.0","@aws-sdk/lib-storage":"^3.1013.0","@aws-sdk/s3-request-presigner":"^3.1013.0","@clickhouse/client":"^1.8.1","@dbos-inc/dbos-sdk":"^4.21.6","@inkjs/ui":"^2.0.0","@nats-io/jetstream":"3.4.0","@nats-io/kv":"3.4.0","@nats-io/nats-core":"3.4.0","@nats-io/transport-node":"3.4.0","@openrouter/ai-sdk-provider":"^2.9.1","@opentelemetry/core":"^2.6.0","embedded-postgres":"^18.3.0-beta.16",ink:"^6.8.0",kysely:"^0.28.12","posthog-node":"^5.0.0",react:"^19.2.6","react-dom":"^19.2.6"},devDependencies:{"@ai-sdk/provider":"^3.0.10","@better-auth/sso":"1.4.1","@decocms/better-auth":"1.5.17","@decocms/bindings":"workspace:*","@decocms/mcp-utils":"workspace:*","@decocms/runtime":"workspace:*","@decocms/sandbox":"workspace:*","@decocms/shared":"workspace:*","@jitl/quickjs-wasmfile-release-sync":"0.31.0","@modelcontextprotocol/sdk":"1.29.0","@opentelemetry/api":"^1.9.0","@opentelemetry/api-logs":"^0.211.0","@opentelemetry/exporter-logs-otlp-proto":"^0.211.0","@opentelemetry/exporter-prometheus":"^0.208.0","@opentelemetry/exporter-trace-otlp-proto":"^0.207.0","@opentelemetry/instrumentation-runtime-node":"^0.24.0","@opentelemetry/resources":"^2.6.0","@opentelemetry/sdk-logs":"^0.211.0","@opentelemetry/sdk-metrics":"^2.2.0","@opentelemetry/sdk-node":"^0.207.0","@opentelemetry/sdk-trace-base":"^2.5.0","@types/bun":"^1.3.1","@types/google.maps":"^3.65.2","@types/pg":"^8.15.6","@types/react-syntax-highlighter":"^15.5.13","@vercel/nft":"^1.1.1",ai:"^6.0.208","better-auth":"1.4.22",croner:"^9.1.0",degit:"^2.8.4",hono:"^4.10.7",jose:"^6.0.11",nanoid:"^5.1.6",pg:"^8.16.3",typescript:"^7.0.2",typescript5:"npm:typescript@^5.9.3",zod:"4.3.6"},homepage:"https://github.com/decocms/studio",keywords:["mcp","model-context-protocol","ai","gateway","self-hosted","tools"],license:"MIT",publishConfig:{access:"public"}}});import{Box as L04,Text as ls1}from"ink";import{jsx as D04,jsxs as ms1}from"react/jsx-runtime";function ds1({version:$}){return ms1(L04,{flexDirection:"column",marginTop:1,children:[J70.map((Z,X)=>D04(ls1,{color:K70[X],children:Z},X)),ms1(ls1,{dimColor:!0,children:[" v",$]})]})}var is1=L(()=>{wp()});import{Box as Zj,Text as DO}from"ink";import{Spinner as w04}from"@inkjs/ui";import{jsx as UG,jsxs as gy}from"react/jsx-runtime";function ps1({status:$}){if($==="pending")return UG(w04,{label:""});return UG(DO,{color:"green",children:"\u2713"})}function E04($){return`${$.name}: ${$.port||"...."}`}function ns1({services:$,migrationsStatus:Z,home:X,serverUrl:Q}){return gy(Zj,{flexDirection:"column",paddingBottom:1,children:[UG(ds1,{version:b70.version}),UG(Zj,{marginBottom:1,children:UG(DO,{dimColor:!0,children:"\u2500".repeat(80)})}),UG(Zj,{children:gy(DO,{dimColor:!0,children:["Home: ",X]})}),gy(Zj,{gap:2,children:[$.map((Y)=>gy(Zj,{gap:1,children:[UG(DO,{children:E04(Y)}),UG(ps1,{status:Y.status})]},Y.name)),gy(Zj,{gap:1,children:[UG(DO,{children:"Migrations"}),UG(ps1,{status:Z})]})]}),UG(Zj,{children:Q?gy(DO,{children:["Open in browser: ",UG(DO,{color:"cyan",children:Q})]}):UG(DO,{dimColor:!0,children:"Starting..."})})]})}var ts1=L(()=>{fn0();is1()});import{Box as j04,Text as vp}from"ink";import{jsx as bn0,jsxs as yn0}from"react/jsx-runtime";function z04($){if($>=500)return"red";if($>=400)return"yellow";if($>=300)return"cyan";return"green"}function os1({logs:$}){return bn0(j04,{flexDirection:"column",children:$.map((Z,X)=>{if(Z.rawLine)return bn0(vp,{dimColor:!0,children:Z.rawLine},X);let Q=Z.duration<1000?`${Z.duration}ms`:`${(Z.duration/1000).toFixed(1)}s`;return yn0(vp,{children:[yn0(vp,{dimColor:!0,children:[Z.method.padEnd(6)," ",Z.path.padEnd(30)," "]}),bn0(vp,{color:z04(Z.status),children:Z.status}),yn0(vp,{dimColor:!0,children:[" ",Q.padStart(8)]})]},X)})})}var rs1=()=>{};var gn0={};s(gn0,{App:()=>T04});import{Box as P04}from"ink";import{useSyncExternalStore as A04}from"react";import{jsx as as1,jsxs as R04}from"react/jsx-runtime";function T04({home:$}){let Z=A04(Sn0,kn0);return R04(P04,{flexDirection:"column",children:[as1(ns1,{services:Z.services,migrationsStatus:Z.migrationsStatus,home:$,serverUrl:Z.serverUrl}),as1(os1,{logs:Z.logs})]})}var hn0=L(()=>{ts1();rs1();$j()});var o3="thread-gate",AU="decopilot-hosted-harness",TU="decopilot-hosted-harness-sandboxed",qJ="automations",wO="background-tools",Xj="task-board-github-reads";var ss1="11";function es1($){return{name:"decocms",systemDatabaseUrl:$.systemDatabaseUrl,systemDatabaseSchemaName:"dbos",systemDatabasePoolSize:$.poolSize,runAdminServer:!1,executorID:$.executorID,applicationVersion:ss1,...$.listenQueues!==void 0?{listenQueues:$.listenQueues}:{}}}var $e1=()=>{};import I04 from"pg";async function Xe1($,Z){let{databaseUrl:X,lockTimeoutMs:Q=q04}=$,Y=$.log??((W)=>console.log(W)),G=new I04.Client({connectionString:X});await G.connect();let J=Date.now(),K=!1;try{while(!K){if(K=(await G.query("SELECT pg_try_advisory_lock($1) AS locked",[Ze1.toString()])).rows[0]?.locked===!0,K)break;if(Date.now()-J>=Q)throw Error(`Timed out after ${Q}ms waiting for the DBOS migration lock. Another process is still migrating the dbos schema; this pod will restart and retry.`);await H$(M04)}let W=Date.now()-J;if(W>1000)Y(`[dbos] waited ${W}ms for the migration lock; another process migrated first`);return await Z()}finally{if(K)try{await G.query("SELECT pg_advisory_unlock($1)",[Ze1.toString()])}catch{}await G.end().catch(()=>{})}}var Ze1=8314027461559302n,q04=600000,M04=500;var Qe1=L(()=>{t8()});function V04(){let $=(process.env.BUN_OPTIONS??"").split(/\s+/).filter(Boolean);return[...process.argv.slice(1),...$]}function un0($,Z){for(let X=0;X<$.length;X++){let Q=$[X];if(Q===void 0)continue;if(Q===Z)return $[X+1];if(Q.startsWith(`${Z}=`))return Q.slice(Z.length+1)}return}function Ye1(){let $=V04();if($.includes("--cpu-prof")){console.log(JSON.stringify({msg:"cpu-profiling-active",dir:un0($,"--cpu-prof-dir")??process.cwd(),name:un0($,"--cpu-prof-name"),markdown:$.includes("--cpu-prof-md"),intervalUs:Number(un0($,"--cpu-prof-interval")??1000),note:"profile is written on process exit"}));return}if(process.env.CPU_PROFILE)console.warn(JSON.stringify({msg:"cpu-profiling-requested-but-inactive",hint:'CPU profiling is a Bun launch flag. Set BUN_OPTIONS="--cpu-prof --cpu-prof-md --cpu-prof-dir=/tmp" before starting the process.'}))}function Ge1(){if(process.env.HEAP_WATCH!=="1")return()=>{};let $=Number(process.env.HEAP_WATCH_INTERVAL_MS??60000),Z=async()=>{let X=oE();if(!X)return;let Q={};try{let{heapStats:Y}=await import("bun:jsc"),G=Y(),J=Object.entries(G.objectTypeCounts).sort((K,W)=>W[1]-K[1]).slice(0,20);Q={objectCount:G.objectCount,heapSize:G.heapSize,top:Object.fromEntries(J)}}catch{}console.log(JSON.stringify({msg:"heap-watch",ts:new Date().toISOString(),uptimeS:Math.round(process.uptime()),rss:X.rss,heapUsed:X.heapUsed,heapTotal:X.heapTotal,external:X.external,arrayBuffers:X.arrayBuffers,...Q}))};return Z().catch(()=>{}),y70=setInterval(()=>void Z().catch(()=>{}),$),y70.unref?.(),process.on("SIGUSR2",()=>{try{let X=Bun.generateHeapSnapshot("v8"),Q=typeof X==="string"?X:JSON.stringify(X),Y=`/tmp/heap-${process.pid}-${Date.now()}.heapsnapshot`;Bun.write(Y,Q),console.log(JSON.stringify({msg:"heap-snapshot-written",path:Y}))}catch(X){console.error("[heap-watch] snapshot failed:",X)}}),()=>{if(y70)clearInterval(y70)}}var y70;var Je1=()=>{};import*as k04 from"bun:jsc";function Ke1(){if(process.env.STALL_WATCHDOG!=="1")return()=>{};let $=Number(process.env.STALL_WATCHDOG_MS??100),Z=Number(process.env.STALL_WATCHDOG_TICK_MS??50);try{S04()}catch(G){return console.error("[stall-watchdog] failed to start sampling profiler:",G),()=>{}}let X,Q=performance.now()+Z,Y=()=>{let G=performance.now(),J=G-Q;Q=G+Z;let K=[];try{K=C04()?.traces??[]}catch{}if(J>$&&K.length>0){let W=new Map;for(let F of K){let U=F.frames.find((O)=>O.sourceURL&&!/Unknown Executable/.test(O.category??""))??F.frames[0];if(!U)continue;let N=(U.sourceURL??"?").replace(/^.*\/node_modules\//,"node_modules/"),B=`${U.name??"?"} @ ${N}:${U.line??"?"}`;W.set(B,(W.get(B)??0)+1)}let H=[...W.entries()].sort((F,U)=>U[1]-F[1]).slice(0,8).map(([F,U])=>({frame:F,count:U}));console.warn(JSON.stringify({msg:"stall-stack",ts:new Date().toISOString(),lagMs:Math.round(J),samplesInWindow:K.length,top:H}))}X=setTimeout(Y,Z),X.unref?.()};return X=setTimeout(Y,Z),X.unref?.(),()=>{if(X)clearTimeout(X)}}var S04,C04;var We1=L(()=>{({startSamplingProfiler:S04,samplingProfilerStackTraces:C04}=k04)});function He1(){Ye1();let $=[Ge1(),wt1(),Ke1()];return()=>{for(let Z of $)Z()}}var Fe1=L(()=>{Ym0();Je1();We1()});var Qj=v((Ue1)=>{Object.defineProperty(Ue1,"__esModule",{value:!0});Ue1.RepublishHeaders=Ue1.DirectMsgHeaders=Ue1.JsHeaders=Ue1.AdvisoryKind=void 0;Ue1.isOrderedPushConsumerOptions=_04;Ue1.isPullConsumer=v04;Ue1.isPushConsumer=x04;Ue1.isBoundPushConsumerOptions=f04;function _04($){if($&&typeof $==="object")return"name_prefix"in $||"deliver_subject_prefix"in $||"filter_subjects"in $||"filter_subject"in $||"deliver_policy"in $||"opt_start_seq"in $||"opt_start_time"in $||"replay_policy"in $||"inactive_threshold"in $||"headers_only"in $||"deliver_prefix"in $;return!1}function v04($){return $.isPullConsumer()}function x04($){return $.isPushConsumer()}function f04($){if($&&typeof $==="object")return"deliver_subject"in $||"deliver_group"in $||"idle_heartbeat"in $;return!1}Ue1.AdvisoryKind={API:"api_audit",StreamAction:"stream_action",ConsumerAction:"consumer_action",SnapshotCreate:"snapshot_create",SnapshotComplete:"snapshot_complete",RestoreCreate:"restore_create",RestoreComplete:"restore_complete",MaxDeliver:"max_deliver",Terminated:"terminated",Ack:"consumer_ack",StreamLeaderElected:"stream_leader_elected",StreamQuorumLost:"stream_quorum_lost",ConsumerLeaderElected:"consumer_leader_elected",ConsumerQuorumLost:"consumer_quorum_lost"};Ue1.JsHeaders={StreamSourceHdr:"Nats-Stream-Source",LastConsumerSeqHdr:"Nats-Last-Consumer",LastStreamSeqHdr:"Nats-Last-Stream",ConsumerStalledHdr:"Nats-Consumer-Stalled",MessageSizeHdr:"Nats-Msg-Size",RollupHdr:"Nats-Rollup",RollupValueSubject:"sub",RollupValueAll:"all",PendingMessagesHdr:"Nats-Pending-Messages",PendingBytesHdr:"Nats-Pending-Bytes",RequiredApiLevel:"Nats-Required-Api-Level"};Ue1.DirectMsgHeaders={Stream:"Nats-Stream",Sequence:"Nats-Sequence",TimeStamp:"Nats-Time-Stamp",Subject:"Nats-Subject",LastSequence:"Nats-Last-Sequence",NumPending:"Nats-Num-Pending"};Ue1.RepublishHeaders={Stream:"Nats-Stream",Subject:"Nats-Subject",Sequence:"Nats-Sequence",LastSequence:"Nats-Last-Sequence",Size:"Nats-Msg-Size"}});var NG=v((Be1)=>{Object.defineProperty(Be1,"__esModule",{value:!0});Be1.TD=Be1.TE=Be1.Empty=void 0;Be1.encode=d04;Be1.decode=i04;Be1.Empty=new Uint8Array(0);Be1.TE=new TextEncoder;Be1.TD=new TextDecoder;function m04(...$){let Z=0;for(let Y=0;Y<$.length;Y++)Z+=$[Y].length;let X=new Uint8Array(Z),Q=0;for(let Y=0;Y<$.length;Y++)X.set($[Y],Q),Q+=$[Y].length;return X}function d04(...$){let Z=[];for(let X=0;X<$.length;X++)Z.push(Be1.TE.encode($[X]));if(Z.length===0)return Be1.Empty;if(Z.length===1)return Z[0];return m04(...Z)}function i04($){if(!$||$.length===0)return"";return Be1.TD.decode($)}});var BG=v((De1)=>{Object.defineProperty(De1,"__esModule",{value:!0});De1.errors=De1.PermissionViolationError=De1.NoRespondersError=De1.TimeoutError=De1.RequestError=De1.ProtocolError=De1.ConnectionError=De1.DrainingConnectionError=De1.ClosedConnectionError=De1.AuthorizationError=De1.UserAuthenticationExpiredError=De1.InvalidOperationError=De1.InvalidArgumentError=De1.InvalidSubjectError=void 0;class ln0 extends Error{constructor($,Z){super(`illegal subject: '${$}'`,Z);this.name="InvalidSubjectError"}}De1.InvalidSubjectError=ln0;class g70 extends Error{constructor($,Z){super($,Z);this.name="InvalidArgumentError"}static format($,Z,X){if(Array.isArray(Z)&&Z.length>1)Z=Z[0];if(Array.isArray($))$=$.map((Q)=>`'${Q}'`),$=$.join(",");else $=`'${$}'`;return new g70(`${$} ${Z}`,X)}}De1.InvalidArgumentError=g70;class mn0 extends Error{constructor($,Z){super($,Z);this.name="InvalidOperationError"}}De1.InvalidOperationError=mn0;class h70 extends Error{constructor($,Z){super($,Z);this.name="UserAuthenticationExpiredError"}static parse($){if($.toLowerCase().indexOf("user authentication expired")!==-1)return new h70($);return null}}De1.UserAuthenticationExpiredError=h70;class u70 extends Error{constructor($,Z){super($,Z);this.name="AuthorizationError"}static parse($){let Z=["authorization violation","account authentication expired","authentication timeout"],X=$.toLowerCase();for(let Q=0;Q<Z.length;Q++)if(X.indexOf(Z[Q])!==-1)return new u70($);return null}}De1.AuthorizationError=u70;class dn0 extends Error{constructor(){super("closed connection");this.name="ClosedConnectionError"}}De1.ClosedConnectionError=dn0;class in0 extends Error{constructor(){super("connection draining");this.name="DrainingConnectionError"}}De1.DrainingConnectionError=in0;class pn0 extends Error{constructor($,Z){super($,Z);this.name="ConnectionError"}}De1.ConnectionError=pn0;class nn0 extends Error{constructor($,Z){super($,Z);this.name="ProtocolError"}}De1.ProtocolError=nn0;class tn0 extends Error{constructor($="",Z){super($,Z);this.name="RequestError"}isNoResponders(){return this.cause instanceof c70}}De1.RequestError=tn0;class on0 extends Error{constructor($){super("timeout",$);this.name="TimeoutError"}}De1.TimeoutError=on0;class c70 extends Error{subject;constructor($,Z){super(`no responders: '${$}'`,Z);this.subject=$,this.name="NoResponders"}}De1.NoRespondersError=c70;class l70 extends Error{operation;subject;queue;constructor($,Z,X,Q,Y){super($,Y);this.name="PermissionViolationError",this.operation=Z,this.subject=X,this.queue=Q}static parse($){if(($?$.toLowerCase():"").indexOf("permissions violation")===-1)return null;let X="publish",Q="",Y=void 0,G=$.match(/(Publish|Subscription) to "(\S+)"/);if(G){if(X=G[1].toLowerCase(),Q=G[2],X==="subscription"){let J=$.match(/using queue "(\S+)"/);if(J)Y=J[1]}}return new l70($,X,Q,Y)}}De1.PermissionViolationError=l70;De1.errors={AuthorizationError:u70,ClosedConnectionError:dn0,ConnectionError:pn0,DrainingConnectionError:in0,InvalidArgumentError:g70,InvalidOperationError:mn0,InvalidSubjectError:ln0,NoRespondersError:c70,PermissionViolationError:l70,ProtocolError:nn0,RequestError:tn0,TimeoutError:on0,UserAuthenticationExpiredError:h70}});var r3=v((Pe1)=>{Object.defineProperty(Pe1,"__esModule",{value:!0});Pe1.SimpleMutex=Pe1.Perf=void 0;Pe1.extend=W14;Pe1.render=H14;Pe1.timeout=F14;Pe1.delay=U14;Pe1.deadline=N14;Pe1.deferred=an0;Pe1.debugDeferred=B14;Pe1.shuffle=O14;Pe1.collect=L14;Pe1.jitter=ze1;Pe1.backoff=D14;Pe1.nanos=w14;Pe1.millis=E14;Pe1.randomToken=P14;var K14=NG(),rn0=BG();function W14($,...Z){for(let X=0;X<Z.length;X++){let Q=Z[X];Object.keys(Q).forEach(function(Y){$[Y]=Q[Y]})}return $}function H14($){return K14.TD.decode($).replace(/\n/g,"\u240A").replace(/\r/g,"\u240D")}function F14($,Z=!0){let X=Z?new rn0.TimeoutError:null,Q,Y,G=new Promise((J,K)=>{Q={cancel:()=>{if(Y)clearTimeout(Y)}},Y=setTimeout(()=>{if(X===null)K(new rn0.TimeoutError);else K(X)},$)});return Object.assign(G,Q)}function U14($=0){let Z,X=new Promise((Q)=>{let Y=setTimeout(()=>{Q()},$);Z={cancel:()=>{if(Y)clearTimeout(Y),Q()}}});return Object.assign(X,Z)}async function N14($,Z=1000){let X=an0(),Q=setTimeout(()=>{X.reject(new rn0.TimeoutError)},Z);try{return await Promise.race([$,X])}finally{clearTimeout(Q)}}function an0(){let $={},Z=new Promise((X,Q)=>{$={resolve:X,reject:Q}});return Object.assign(Z,$)}function B14(){let $={},Z=new Promise((X,Q)=>{$={resolve:(Y)=>{console.trace("resolve",Y),X(Y)},reject:(Y)=>{console.trace("reject"),Q(Y)}}});return Object.assign(Z,$)}function O14($){for(let Z=$.length-1;Z>0;Z--){let X=Math.floor(Math.random()*(Z+1));[$[Z],$[X]]=[$[X],$[Z]]}return $}async function L14($){let Z=[];for await(let X of $)Z.push(X);return Z}class Ee1{timers;measures;constructor(){this.timers=new Map,this.measures=new Map}mark($){this.timers.set($,performance.now())}measure($,Z,X){let Q=this.timers.get(Z);if(Q===void 0)throw Error(`${Z} is not defined`);let Y=this.timers.get(X);if(Y===void 0)throw Error(`${X} is not defined`);this.measures.set($,Y-Q)}getEntries(){let $=[];return this.measures.forEach((Z,X)=>{$.push({name:X,duration:Z})}),$}}Pe1.Perf=Ee1;class je1{max;current;waiting;constructor($=1){this.max=$,this.current=0,this.waiting=[]}lock(){if(this.current++,this.current<=this.max)return Promise.resolve();let $=an0();return this.waiting.push($),$}unlock(){this.current--,this.waiting.pop()?.resolve()}}Pe1.SimpleMutex=je1;function ze1($){if($===0)return 0;return Math.floor($/2+Math.random()*$)}function D14($=[0,250,250,500,500,3000,5000]){if(!Array.isArray($))$=[0,250,250,500,500,3000,5000];let Z=$.length-1;return{backoff(X){return ze1(X>Z?$[Z]:$[X])}}}function w14($){return $*1e6}function E14($){return Math.floor($/1e6)}var j14="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",RU=new Uint8Array(62);for(let $=0;$<62;$++)RU[$]=j14.charCodeAt($);var z14=218340105584896;function P14(){let $=Math.floor(Math.random()*z14),Z=$%62,X=RU[Z];$=($-Z)/62,Z=$%62;let Q=RU[Z];$=($-Z)/62,Z=$%62;let Y=RU[Z];$=($-Z)/62,Z=$%62;let G=RU[Z];$=($-Z)/62,Z=$%62;let J=RU[Z];$=($-Z)/62,Z=$%62;let K=RU[Z];$=($-Z)/62,Z=$%62;let W=RU[Z];$=($-Z)/62;let H=RU[$];return String.fromCharCode(X,Q,Y,G,J,K,W,H)}});var ke1=v((Me1)=>{Object.defineProperty(Me1,"__esModule",{value:!0});Me1.nuid=Me1.NuidImpl=void 0;var y14="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",EO=62,d70=12,Ie1=10,Te1=33,g14=333,Re1=d70+Ie1,en0=new Uint8Array(EO);for(let $=0;$<EO;$++)en0[$]=y14.charCodeAt($);var m70=4294967296,qe1=BigInt(EO)**BigInt(Ie1),xp=Number(qe1/(1n<<32n)),sn0=Number(qe1%(1n<<32n));function h14($){for(let Z=0;Z<$.length;Z++)$[Z]=Math.floor(Math.random()*256)}function u14($){if(globalThis?.crypto?.getRandomValues)globalThis.crypto.getRandomValues($);else h14($)}class $t0{buf;cbuf;seqHi;seqLo;inc;inited;constructor(){this.buf=new Uint8Array(Re1),this.cbuf=new Uint8Array(d70),this.inited=!1}init(){this.inited=!0,this.setPre(),this.initSeqAndInc(),this.fillSeq()}initSeqAndInc(){let $=0;do this.seqHi=Math.floor(Math.random()*(xp+1)),this.seqLo=Math.floor(Math.random()*m70);while($++<8&&this.seqHi===xp&&this.seqLo>=sn0);if(this.seqHi===xp&&this.seqLo>=sn0)this.seqLo=0;this.inc=Math.random()*(g14-Te1)+Te1|0}setPre(){u14(this.cbuf);for(let $=0;$<d70;$++)this.buf[$]=en0[this.cbuf[$]%EO]}fillSeq(){let $=this.seqHi,Z=this.seqLo;for(let X=Re1-1;X>=d70;X--){let Q=Math.floor($/EO),G=($-Q*EO)*m70+Z,J=Math.floor(G/EO),K=G-J*EO;this.buf[X]=en0[K],$=Q,Z=J}}next(){if(!this.inited)this.init();if(this.seqLo+=this.inc,this.seqLo>=m70)this.seqLo-=m70,this.seqHi+=1;if(this.seqHi>xp||this.seqHi===xp&&this.seqLo>=sn0)this.setPre(),this.initSeqAndInc();this.fillSeq();let $=this.buf;return String.fromCharCode($[0],$[1],$[2],$[3],$[4],$[5],$[6],$[7],$[8],$[9],$[10],$[11],$[12],$[13],$[14],$[15],$[16],$[17],$[18],$[19],$[20],$[21])}reset(){this.init()}}Me1.NuidImpl=$t0;Me1.nuid=new $t0});var ve1=v((Ce1)=>{Object.defineProperty(Ce1,"__esModule",{value:!0});Ce1.nuid=Ce1.Nuid=void 0;var Se1=ke1();Ce1.Nuid=Se1.NuidImpl;Ce1.nuid=Se1.nuid});var p70=v((i70)=>{Object.defineProperty(i70,"__esModule",{value:!0});i70.nuid=i70.Nuid=void 0;var xe1=ve1();Object.defineProperty(i70,"Nuid",{enumerable:!0,get:function(){return xe1.Nuid}});Object.defineProperty(i70,"nuid",{enumerable:!0,get:function(){return xe1.nuid}})});var jO=v((fe1)=>{Object.defineProperty(fe1,"__esModule",{value:!0});fe1.DEFAULT_HOST=fe1.DEFAULT_PORT=fe1.Match=void 0;fe1.syncIterator=p14;fe1.createInbox=n14;var d14=p70(),i14=BG();fe1.Match={Exact:"exact",CanonicalMIME:"canonical",IgnoreCase:"insensitive"};function p14($){let Z=$[Symbol.asyncIterator]();return{async next(){let X=await Z.next();if(X.done)return Promise.resolve(null);return Promise.resolve(X.value)}}}function n14($=""){if($=$||"_INBOX",typeof $!=="string")throw TypeError("prefix must be a string");return $.split(".").forEach((Z)=>{if(Z==="*"||Z===">")throw i14.InvalidArgumentError.format("prefix",`cannot have wildcards ('${$}')`)}),`${$}.${d14.nuid.next()}`}fe1.DEFAULT_PORT=4222;fe1.DEFAULT_HOST="127.0.0.1"});var fp=v((he1)=>{Object.defineProperty(he1,"__esModule",{value:!0});he1.DataBuffer=void 0;var ye1=NG();class ge1{buffers;byteLength;constructor(){this.buffers=[],this.byteLength=0}static concat(...$){let Z=0;for(let Y=0;Y<$.length;Y++)Z+=$[Y].length;let X=new Uint8Array(Z),Q=0;for(let Y=0;Y<$.length;Y++)X.set($[Y],Q),Q+=$[Y].length;return X}static fromAscii($){if(!$)$="";return ye1.TE.encode($)}static toAscii($){return ye1.TD.decode($)}reset(){this.buffers.length=0,this.byteLength=0}pack(){if(this.buffers.length>1){let $=new Uint8Array(this.byteLength),Z=0;for(let X=0;X<this.buffers.length;X++)$.set(this.buffers[X],Z),Z+=this.buffers[X].length;this.buffers.length=0,this.buffers.push($)}}shift(){if(this.buffers.length){let $=this.buffers.shift();if($)return this.byteLength-=$.length,$}return new Uint8Array(0)}drain($){if(this.buffers.length){this.pack();let Z=this.buffers.pop();if(Z){let X=this.byteLength;if($===void 0||$>X)$=X;let Q=Z.subarray(0,$);if(X>$)this.buffers.push(Z.subarray($));return this.byteLength=X-$,Q}}return new Uint8Array(0)}fill($,...Z){if($)this.buffers.push($),this.byteLength+=$.length;for(let X=0;X<Z.length;X++)if(Z[X]&&Z[X].length)this.buffers.push(Z[X]),this.byteLength+=Z[X].length}peek(){if(this.buffers.length)return this.pack(),this.buffers[0];return new Uint8Array(0)}size(){return this.byteLength}length(){return this.buffers.length}}he1.DataBuffer=ge1});var Yj=v((le1)=>{Object.defineProperty(le1,"__esModule",{value:!0});le1.LF=le1.CR=le1.CRLF=le1.CR_LF_LEN=le1.CR_LF=void 0;le1.setTransportFactory=Z$4;le1.defaultPort=X$4;le1.getUrlParseFn=Q$4;le1.newTransport=Y$4;le1.getResolveFn=G$4;le1.protoLen=ce1;le1.extractProtocolMessage=J$4;var s14=NG(),e14=jO(),$$4=fp(),OG;function Z$4($){OG=$}function X$4(){return OG!==void 0&&OG.defaultPort!==void 0?OG.defaultPort:e14.DEFAULT_PORT}function Q$4(){return OG!==void 0&&OG.urlParseFn?OG.urlParseFn:void 0}function Y$4(){if(!OG||typeof OG.factory!=="function")throw Error("transport fn is not set");return OG.factory()}function G$4(){return OG!==void 0&&OG.dnsResolveFn?OG.dnsResolveFn:void 0}le1.CR_LF=`\r
1548
+ `);Q=G.pop()??"";for(let J of G){let K=Bun.stripANSI(J).replace(/^\[\d+\]\s*/,"").trim();if(!K)continue;LO({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:K})}}(async()=>{try{for(;;){let{done:G,value:J}=await Z.read();if(G)break;Q+=X.decode(J,{stream:!0}),Y()}}catch{}if(Q.trim()){let G=Bun.stripANSI(Q).replace(/^\[\d+\]\s*/,"").trim();if(G)LO({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:G})}})()}async function B04($){let{baseUrl:Z,noTui:X}=$,Q=process.env.HOST==="0.0.0.0"&&Boolean(process.env.PORT),Y=Q?process.env.PORT:$.vitePort,G=Z||`http://localhost:${Y}`,J=Q?await _p(Number(Y)+1):await _p(Number($.port)),{settings:K,services:W,managedServiceNames:H}=await v70({port:String(J),home:$.home,baseUrl:$.baseUrl,localMode:$.localMode,skipMigrations:$.skipMigrations,noTui:$.noTui,vitePort:$.vitePort});for(let D of W)eE({name:D.name,status:"ready",port:D.port});Sp();let F=N04(import.meta.dir,"..","..","..","..",".."),U=X===!0,N=Bun.spawn(["bun","run","dev:servers"],{cwd:F,env:{...process.env,PORT:String(K.port),VITE_PORT:String(Y),DATABASE_URL:K.databaseUrl,NATS_URL:K.natsUrls.join(","),NODE_ENV:K.nodeEnv,BASE_URL:G,DECOCMS_LOCAL_MODE:String(K.localMode),DECOCMS_HOME:K.dataDir,DATA_DIR:K.dataDir,DECO_CLI:"1",...K.betterAuthSecret?{BETTER_AUTH_SECRET:K.betterAuthSecret}:{},...K.s3Endpoint?{S3_ENDPOINT:K.s3Endpoint,S3_BUCKET:K.s3Bucket??"",S3_ACCESS_KEY_ID:K.s3AccessKeyId??"",S3_SECRET_ACCESS_KEY:K.s3SecretAccessKey??"",S3_FORCE_PATH_STYLE:String(K.s3ForcePathStyle)}:{},...K.natsCredsPath?{NATS_CREDS:K.natsCredsPath}:{}},stdio:["inherit",U?"inherit":"pipe",U?"inherit":"pipe"]});if(!U)_n0(N.stdout),_n0(N.stderr);Cp(G),eE({name:"Vite",status:"ready",port:Number(Y)}),eE({name:"API",status:"ready",port:Number(K.port)});let O=async(D)=>{if(N.kill(D),await N.exited,H.length>0){let{stopServices:w}=await Promise.resolve().then(() => (yZ0(),bZ0));await w(K.dataDir)}};return process.on("SIGINT",()=>O("SIGINT")),process.on("SIGTERM",()=>O("SIGTERM")),{port:Number(Y),process:N}}var xn0=L(()=>{Mn0();$j();Cn0()});var b70;var fn0=L(()=>{b70={name:"decocms",version:"4.325.3",description:"Deco CMS \u2014 Self-hostable MCP Gateway for managing AI connections and tools",author:"Deco team",repository:{type:"git",url:"git+https://github.com/decocms/studio.git",directory:"apps/api"},bugs:{url:"https://github.com/decocms/studio/issues"},type:"module",bin:{deco:"./dist/server/cli.js"},files:["dist/**/*"],scripts:{dev:"bun run migrate && bun run dev:server","dev:server":"bun run --cwd=../../packages/sandbox build && NODE_ENV=development bun --env-file=.env --hot run src/index.ts",build:"bun run build:server","build:server":"bun run scripts/bundle-server-script.ts --dist ./dist/server","generate:tool-contracts":"bun run scripts/generate-tool-contracts.ts","db:migrate":"bun run ./dist/server/migrate.js","db:migrate:dbos":"bun run ./dist/server/migrate-dbos.js",check:"tsc --noEmit",start:"bun run ./dist/server/server.js",migrate:"bun run src/database/migrate.ts","migrate:dbos":"bun run src/database/migrate-dbos.ts",test:"bun test src","better-auth:migrate":"bunx --bun @better-auth/cli migrate -y --config src/auth/index.ts",prepublishOnly:"bun run --cwd=../.. build:studio"},optionalDependencies:{"@duckdb/node-api":"^1.5.0-r.1"},dependencies:{"@ai-sdk/anthropic":"^3.0.85","@ai-sdk/google":"^3.0.83","@ai-sdk/openai":"^3.0.73","@anthropic-ai/sdk":"^0.105.0","@aws-sdk/client-s3":"^3.1013.0","@aws-sdk/client-sts":"^3.1013.0","@aws-sdk/lib-storage":"^3.1013.0","@aws-sdk/s3-request-presigner":"^3.1013.0","@clickhouse/client":"^1.8.1","@dbos-inc/dbos-sdk":"^4.21.6","@inkjs/ui":"^2.0.0","@nats-io/jetstream":"3.4.0","@nats-io/kv":"3.4.0","@nats-io/nats-core":"3.4.0","@nats-io/transport-node":"3.4.0","@openrouter/ai-sdk-provider":"^2.9.1","@opentelemetry/core":"^2.6.0","embedded-postgres":"^18.3.0-beta.16",ink:"^6.8.0",kysely:"^0.28.12","posthog-node":"^5.0.0",react:"^19.2.6","react-dom":"^19.2.6"},devDependencies:{"@ai-sdk/provider":"^3.0.10","@better-auth/sso":"1.4.1","@decocms/better-auth":"1.5.17","@decocms/bindings":"workspace:*","@decocms/mcp-utils":"workspace:*","@decocms/runtime":"workspace:*","@decocms/sandbox":"workspace:*","@decocms/shared":"workspace:*","@jitl/quickjs-wasmfile-release-sync":"0.31.0","@modelcontextprotocol/sdk":"1.29.0","@opentelemetry/api":"^1.9.0","@opentelemetry/api-logs":"^0.211.0","@opentelemetry/exporter-logs-otlp-proto":"^0.211.0","@opentelemetry/exporter-prometheus":"^0.208.0","@opentelemetry/exporter-trace-otlp-proto":"^0.207.0","@opentelemetry/instrumentation-runtime-node":"^0.24.0","@opentelemetry/resources":"^2.6.0","@opentelemetry/sdk-logs":"^0.211.0","@opentelemetry/sdk-metrics":"^2.2.0","@opentelemetry/sdk-node":"^0.207.0","@opentelemetry/sdk-trace-base":"^2.5.0","@types/bun":"^1.3.1","@types/google.maps":"^3.65.2","@types/pg":"^8.15.6","@types/react-syntax-highlighter":"^15.5.13","@vercel/nft":"^1.1.1",ai:"^6.0.208","better-auth":"1.4.22",croner:"^9.1.0",degit:"^2.8.4",hono:"^4.10.7",jose:"^6.0.11",nanoid:"^5.1.6",pg:"^8.16.3",typescript:"^7.0.2",typescript5:"npm:typescript@^5.9.3",zod:"4.3.6"},homepage:"https://github.com/decocms/studio",keywords:["mcp","model-context-protocol","ai","gateway","self-hosted","tools"],license:"MIT",publishConfig:{access:"public"}}});import{Box as L04,Text as ls1}from"ink";import{jsx as D04,jsxs as ms1}from"react/jsx-runtime";function ds1({version:$}){return ms1(L04,{flexDirection:"column",marginTop:1,children:[J70.map((Z,X)=>D04(ls1,{color:K70[X],children:Z},X)),ms1(ls1,{dimColor:!0,children:[" v",$]})]})}var is1=L(()=>{wp()});import{Box as Zj,Text as DO}from"ink";import{Spinner as w04}from"@inkjs/ui";import{jsx as UG,jsxs as gy}from"react/jsx-runtime";function ps1({status:$}){if($==="pending")return UG(w04,{label:""});return UG(DO,{color:"green",children:"\u2713"})}function E04($){return`${$.name}: ${$.port||"...."}`}function ns1({services:$,migrationsStatus:Z,home:X,serverUrl:Q}){return gy(Zj,{flexDirection:"column",paddingBottom:1,children:[UG(ds1,{version:b70.version}),UG(Zj,{marginBottom:1,children:UG(DO,{dimColor:!0,children:"\u2500".repeat(80)})}),UG(Zj,{children:gy(DO,{dimColor:!0,children:["Home: ",X]})}),gy(Zj,{gap:2,children:[$.map((Y)=>gy(Zj,{gap:1,children:[UG(DO,{children:E04(Y)}),UG(ps1,{status:Y.status})]},Y.name)),gy(Zj,{gap:1,children:[UG(DO,{children:"Migrations"}),UG(ps1,{status:Z})]})]}),UG(Zj,{children:Q?gy(DO,{children:["Open in browser: ",UG(DO,{color:"cyan",children:Q})]}):UG(DO,{dimColor:!0,children:"Starting..."})})]})}var ts1=L(()=>{fn0();is1()});import{Box as j04,Text as vp}from"ink";import{jsx as bn0,jsxs as yn0}from"react/jsx-runtime";function z04($){if($>=500)return"red";if($>=400)return"yellow";if($>=300)return"cyan";return"green"}function os1({logs:$}){return bn0(j04,{flexDirection:"column",children:$.map((Z,X)=>{if(Z.rawLine)return bn0(vp,{dimColor:!0,children:Z.rawLine},X);let Q=Z.duration<1000?`${Z.duration}ms`:`${(Z.duration/1000).toFixed(1)}s`;return yn0(vp,{children:[yn0(vp,{dimColor:!0,children:[Z.method.padEnd(6)," ",Z.path.padEnd(30)," "]}),bn0(vp,{color:z04(Z.status),children:Z.status}),yn0(vp,{dimColor:!0,children:[" ",Q.padStart(8)]})]},X)})})}var rs1=()=>{};var gn0={};s(gn0,{App:()=>T04});import{Box as P04}from"ink";import{useSyncExternalStore as A04}from"react";import{jsx as as1,jsxs as R04}from"react/jsx-runtime";function T04({home:$}){let Z=A04(Sn0,kn0);return R04(P04,{flexDirection:"column",children:[as1(ns1,{services:Z.services,migrationsStatus:Z.migrationsStatus,home:$,serverUrl:Z.serverUrl}),as1(os1,{logs:Z.logs})]})}var hn0=L(()=>{ts1();rs1();$j()});var o3="thread-gate",AU="decopilot-hosted-harness",TU="decopilot-hosted-harness-sandboxed",qJ="automations",wO="background-tools",Xj="task-board-github-reads";var ss1="11";function es1($){return{name:"decocms",systemDatabaseUrl:$.systemDatabaseUrl,systemDatabaseSchemaName:"dbos",systemDatabasePoolSize:$.poolSize,runAdminServer:!1,executorID:$.executorID,applicationVersion:ss1,...$.listenQueues!==void 0?{listenQueues:$.listenQueues}:{}}}var $e1=()=>{};import I04 from"pg";async function Xe1($,Z){let{databaseUrl:X,lockTimeoutMs:Q=q04}=$,Y=$.log??((W)=>console.log(W)),G=new I04.Client({connectionString:X});await G.connect();let J=Date.now(),K=!1;try{while(!K){if(K=(await G.query("SELECT pg_try_advisory_lock($1) AS locked",[Ze1.toString()])).rows[0]?.locked===!0,K)break;if(Date.now()-J>=Q)throw Error(`Timed out after ${Q}ms waiting for the DBOS migration lock. Another process is still migrating the dbos schema; this pod will restart and retry.`);await H$(M04)}let W=Date.now()-J;if(W>1000)Y(`[dbos] waited ${W}ms for the migration lock; another process migrated first`);return await Z()}finally{if(K)try{await G.query("SELECT pg_advisory_unlock($1)",[Ze1.toString()])}catch{}await G.end().catch(()=>{})}}var Ze1=8314027461559302n,q04=600000,M04=500;var Qe1=L(()=>{t8()});function V04(){let $=(process.env.BUN_OPTIONS??"").split(/\s+/).filter(Boolean);return[...process.argv.slice(1),...$]}function un0($,Z){for(let X=0;X<$.length;X++){let Q=$[X];if(Q===void 0)continue;if(Q===Z)return $[X+1];if(Q.startsWith(`${Z}=`))return Q.slice(Z.length+1)}return}function Ye1(){let $=V04();if($.includes("--cpu-prof")){console.log(JSON.stringify({msg:"cpu-profiling-active",dir:un0($,"--cpu-prof-dir")??process.cwd(),name:un0($,"--cpu-prof-name"),markdown:$.includes("--cpu-prof-md"),intervalUs:Number(un0($,"--cpu-prof-interval")??1000),note:"profile is written on process exit"}));return}if(process.env.CPU_PROFILE)console.warn(JSON.stringify({msg:"cpu-profiling-requested-but-inactive",hint:'CPU profiling is a Bun launch flag. Set BUN_OPTIONS="--cpu-prof --cpu-prof-md --cpu-prof-dir=/tmp" before starting the process.'}))}function Ge1(){if(process.env.HEAP_WATCH!=="1")return()=>{};let $=Number(process.env.HEAP_WATCH_INTERVAL_MS??60000),Z=async()=>{let X=oE();if(!X)return;let Q={};try{let{heapStats:Y}=await import("bun:jsc"),G=Y(),J=Object.entries(G.objectTypeCounts).sort((K,W)=>W[1]-K[1]).slice(0,20);Q={objectCount:G.objectCount,heapSize:G.heapSize,top:Object.fromEntries(J)}}catch{}console.log(JSON.stringify({msg:"heap-watch",ts:new Date().toISOString(),uptimeS:Math.round(process.uptime()),rss:X.rss,heapUsed:X.heapUsed,heapTotal:X.heapTotal,external:X.external,arrayBuffers:X.arrayBuffers,...Q}))};return Z().catch(()=>{}),y70=setInterval(()=>void Z().catch(()=>{}),$),y70.unref?.(),process.on("SIGUSR2",()=>{try{let X=Bun.generateHeapSnapshot("v8"),Q=typeof X==="string"?X:JSON.stringify(X),Y=`/tmp/heap-${process.pid}-${Date.now()}.heapsnapshot`;Bun.write(Y,Q),console.log(JSON.stringify({msg:"heap-snapshot-written",path:Y}))}catch(X){console.error("[heap-watch] snapshot failed:",X)}}),()=>{if(y70)clearInterval(y70)}}var y70;var Je1=()=>{};import*as k04 from"bun:jsc";function Ke1(){if(process.env.STALL_WATCHDOG!=="1")return()=>{};let $=Number(process.env.STALL_WATCHDOG_MS??100),Z=Number(process.env.STALL_WATCHDOG_TICK_MS??50);try{S04()}catch(G){return console.error("[stall-watchdog] failed to start sampling profiler:",G),()=>{}}let X,Q=performance.now()+Z,Y=()=>{let G=performance.now(),J=G-Q;Q=G+Z;let K=[];try{K=C04()?.traces??[]}catch{}if(J>$&&K.length>0){let W=new Map;for(let F of K){let U=F.frames.find((O)=>O.sourceURL&&!/Unknown Executable/.test(O.category??""))??F.frames[0];if(!U)continue;let N=(U.sourceURL??"?").replace(/^.*\/node_modules\//,"node_modules/"),B=`${U.name??"?"} @ ${N}:${U.line??"?"}`;W.set(B,(W.get(B)??0)+1)}let H=[...W.entries()].sort((F,U)=>U[1]-F[1]).slice(0,8).map(([F,U])=>({frame:F,count:U}));console.warn(JSON.stringify({msg:"stall-stack",ts:new Date().toISOString(),lagMs:Math.round(J),samplesInWindow:K.length,top:H}))}X=setTimeout(Y,Z),X.unref?.()};return X=setTimeout(Y,Z),X.unref?.(),()=>{if(X)clearTimeout(X)}}var S04,C04;var We1=L(()=>{({startSamplingProfiler:S04,samplingProfilerStackTraces:C04}=k04)});function He1(){Ye1();let $=[Ge1(),wt1(),Ke1()];return()=>{for(let Z of $)Z()}}var Fe1=L(()=>{Ym0();Je1();We1()});var Qj=v((Ue1)=>{Object.defineProperty(Ue1,"__esModule",{value:!0});Ue1.RepublishHeaders=Ue1.DirectMsgHeaders=Ue1.JsHeaders=Ue1.AdvisoryKind=void 0;Ue1.isOrderedPushConsumerOptions=_04;Ue1.isPullConsumer=v04;Ue1.isPushConsumer=x04;Ue1.isBoundPushConsumerOptions=f04;function _04($){if($&&typeof $==="object")return"name_prefix"in $||"deliver_subject_prefix"in $||"filter_subjects"in $||"filter_subject"in $||"deliver_policy"in $||"opt_start_seq"in $||"opt_start_time"in $||"replay_policy"in $||"inactive_threshold"in $||"headers_only"in $||"deliver_prefix"in $;return!1}function v04($){return $.isPullConsumer()}function x04($){return $.isPushConsumer()}function f04($){if($&&typeof $==="object")return"deliver_subject"in $||"deliver_group"in $||"idle_heartbeat"in $;return!1}Ue1.AdvisoryKind={API:"api_audit",StreamAction:"stream_action",ConsumerAction:"consumer_action",SnapshotCreate:"snapshot_create",SnapshotComplete:"snapshot_complete",RestoreCreate:"restore_create",RestoreComplete:"restore_complete",MaxDeliver:"max_deliver",Terminated:"terminated",Ack:"consumer_ack",StreamLeaderElected:"stream_leader_elected",StreamQuorumLost:"stream_quorum_lost",ConsumerLeaderElected:"consumer_leader_elected",ConsumerQuorumLost:"consumer_quorum_lost"};Ue1.JsHeaders={StreamSourceHdr:"Nats-Stream-Source",LastConsumerSeqHdr:"Nats-Last-Consumer",LastStreamSeqHdr:"Nats-Last-Stream",ConsumerStalledHdr:"Nats-Consumer-Stalled",MessageSizeHdr:"Nats-Msg-Size",RollupHdr:"Nats-Rollup",RollupValueSubject:"sub",RollupValueAll:"all",PendingMessagesHdr:"Nats-Pending-Messages",PendingBytesHdr:"Nats-Pending-Bytes",RequiredApiLevel:"Nats-Required-Api-Level"};Ue1.DirectMsgHeaders={Stream:"Nats-Stream",Sequence:"Nats-Sequence",TimeStamp:"Nats-Time-Stamp",Subject:"Nats-Subject",LastSequence:"Nats-Last-Sequence",NumPending:"Nats-Num-Pending"};Ue1.RepublishHeaders={Stream:"Nats-Stream",Subject:"Nats-Subject",Sequence:"Nats-Sequence",LastSequence:"Nats-Last-Sequence",Size:"Nats-Msg-Size"}});var NG=v((Be1)=>{Object.defineProperty(Be1,"__esModule",{value:!0});Be1.TD=Be1.TE=Be1.Empty=void 0;Be1.encode=d04;Be1.decode=i04;Be1.Empty=new Uint8Array(0);Be1.TE=new TextEncoder;Be1.TD=new TextDecoder;function m04(...$){let Z=0;for(let Y=0;Y<$.length;Y++)Z+=$[Y].length;let X=new Uint8Array(Z),Q=0;for(let Y=0;Y<$.length;Y++)X.set($[Y],Q),Q+=$[Y].length;return X}function d04(...$){let Z=[];for(let X=0;X<$.length;X++)Z.push(Be1.TE.encode($[X]));if(Z.length===0)return Be1.Empty;if(Z.length===1)return Z[0];return m04(...Z)}function i04($){if(!$||$.length===0)return"";return Be1.TD.decode($)}});var BG=v((De1)=>{Object.defineProperty(De1,"__esModule",{value:!0});De1.errors=De1.PermissionViolationError=De1.NoRespondersError=De1.TimeoutError=De1.RequestError=De1.ProtocolError=De1.ConnectionError=De1.DrainingConnectionError=De1.ClosedConnectionError=De1.AuthorizationError=De1.UserAuthenticationExpiredError=De1.InvalidOperationError=De1.InvalidArgumentError=De1.InvalidSubjectError=void 0;class ln0 extends Error{constructor($,Z){super(`illegal subject: '${$}'`,Z);this.name="InvalidSubjectError"}}De1.InvalidSubjectError=ln0;class g70 extends Error{constructor($,Z){super($,Z);this.name="InvalidArgumentError"}static format($,Z,X){if(Array.isArray(Z)&&Z.length>1)Z=Z[0];if(Array.isArray($))$=$.map((Q)=>`'${Q}'`),$=$.join(",");else $=`'${$}'`;return new g70(`${$} ${Z}`,X)}}De1.InvalidArgumentError=g70;class mn0 extends Error{constructor($,Z){super($,Z);this.name="InvalidOperationError"}}De1.InvalidOperationError=mn0;class h70 extends Error{constructor($,Z){super($,Z);this.name="UserAuthenticationExpiredError"}static parse($){if($.toLowerCase().indexOf("user authentication expired")!==-1)return new h70($);return null}}De1.UserAuthenticationExpiredError=h70;class u70 extends Error{constructor($,Z){super($,Z);this.name="AuthorizationError"}static parse($){let Z=["authorization violation","account authentication expired","authentication timeout"],X=$.toLowerCase();for(let Q=0;Q<Z.length;Q++)if(X.indexOf(Z[Q])!==-1)return new u70($);return null}}De1.AuthorizationError=u70;class dn0 extends Error{constructor(){super("closed connection");this.name="ClosedConnectionError"}}De1.ClosedConnectionError=dn0;class in0 extends Error{constructor(){super("connection draining");this.name="DrainingConnectionError"}}De1.DrainingConnectionError=in0;class pn0 extends Error{constructor($,Z){super($,Z);this.name="ConnectionError"}}De1.ConnectionError=pn0;class nn0 extends Error{constructor($,Z){super($,Z);this.name="ProtocolError"}}De1.ProtocolError=nn0;class tn0 extends Error{constructor($="",Z){super($,Z);this.name="RequestError"}isNoResponders(){return this.cause instanceof c70}}De1.RequestError=tn0;class on0 extends Error{constructor($){super("timeout",$);this.name="TimeoutError"}}De1.TimeoutError=on0;class c70 extends Error{subject;constructor($,Z){super(`no responders: '${$}'`,Z);this.subject=$,this.name="NoResponders"}}De1.NoRespondersError=c70;class l70 extends Error{operation;subject;queue;constructor($,Z,X,Q,Y){super($,Y);this.name="PermissionViolationError",this.operation=Z,this.subject=X,this.queue=Q}static parse($){if(($?$.toLowerCase():"").indexOf("permissions violation")===-1)return null;let X="publish",Q="",Y=void 0,G=$.match(/(Publish|Subscription) to "(\S+)"/);if(G){if(X=G[1].toLowerCase(),Q=G[2],X==="subscription"){let J=$.match(/using queue "(\S+)"/);if(J)Y=J[1]}}return new l70($,X,Q,Y)}}De1.PermissionViolationError=l70;De1.errors={AuthorizationError:u70,ClosedConnectionError:dn0,ConnectionError:pn0,DrainingConnectionError:in0,InvalidArgumentError:g70,InvalidOperationError:mn0,InvalidSubjectError:ln0,NoRespondersError:c70,PermissionViolationError:l70,ProtocolError:nn0,RequestError:tn0,TimeoutError:on0,UserAuthenticationExpiredError:h70}});var r3=v((Pe1)=>{Object.defineProperty(Pe1,"__esModule",{value:!0});Pe1.SimpleMutex=Pe1.Perf=void 0;Pe1.extend=W14;Pe1.render=H14;Pe1.timeout=F14;Pe1.delay=U14;Pe1.deadline=N14;Pe1.deferred=an0;Pe1.debugDeferred=B14;Pe1.shuffle=O14;Pe1.collect=L14;Pe1.jitter=ze1;Pe1.backoff=D14;Pe1.nanos=w14;Pe1.millis=E14;Pe1.randomToken=P14;var K14=NG(),rn0=BG();function W14($,...Z){for(let X=0;X<Z.length;X++){let Q=Z[X];Object.keys(Q).forEach(function(Y){$[Y]=Q[Y]})}return $}function H14($){return K14.TD.decode($).replace(/\n/g,"\u240A").replace(/\r/g,"\u240D")}function F14($,Z=!0){let X=Z?new rn0.TimeoutError:null,Q,Y,G=new Promise((J,K)=>{Q={cancel:()=>{if(Y)clearTimeout(Y)}},Y=setTimeout(()=>{if(X===null)K(new rn0.TimeoutError);else K(X)},$)});return Object.assign(G,Q)}function U14($=0){let Z,X=new Promise((Q)=>{let Y=setTimeout(()=>{Q()},$);Z={cancel:()=>{if(Y)clearTimeout(Y),Q()}}});return Object.assign(X,Z)}async function N14($,Z=1000){let X=an0(),Q=setTimeout(()=>{X.reject(new rn0.TimeoutError)},Z);try{return await Promise.race([$,X])}finally{clearTimeout(Q)}}function an0(){let $={},Z=new Promise((X,Q)=>{$={resolve:X,reject:Q}});return Object.assign(Z,$)}function B14(){let $={},Z=new Promise((X,Q)=>{$={resolve:(Y)=>{console.trace("resolve",Y),X(Y)},reject:(Y)=>{console.trace("reject"),Q(Y)}}});return Object.assign(Z,$)}function O14($){for(let Z=$.length-1;Z>0;Z--){let X=Math.floor(Math.random()*(Z+1));[$[Z],$[X]]=[$[X],$[Z]]}return $}async function L14($){let Z=[];for await(let X of $)Z.push(X);return Z}class Ee1{timers;measures;constructor(){this.timers=new Map,this.measures=new Map}mark($){this.timers.set($,performance.now())}measure($,Z,X){let Q=this.timers.get(Z);if(Q===void 0)throw Error(`${Z} is not defined`);let Y=this.timers.get(X);if(Y===void 0)throw Error(`${X} is not defined`);this.measures.set($,Y-Q)}getEntries(){let $=[];return this.measures.forEach((Z,X)=>{$.push({name:X,duration:Z})}),$}}Pe1.Perf=Ee1;class je1{max;current;waiting;constructor($=1){this.max=$,this.current=0,this.waiting=[]}lock(){if(this.current++,this.current<=this.max)return Promise.resolve();let $=an0();return this.waiting.push($),$}unlock(){this.current--,this.waiting.pop()?.resolve()}}Pe1.SimpleMutex=je1;function ze1($){if($===0)return 0;return Math.floor($/2+Math.random()*$)}function D14($=[0,250,250,500,500,3000,5000]){if(!Array.isArray($))$=[0,250,250,500,500,3000,5000];let Z=$.length-1;return{backoff(X){return ze1(X>Z?$[Z]:$[X])}}}function w14($){return $*1e6}function E14($){return Math.floor($/1e6)}var j14="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",RU=new Uint8Array(62);for(let $=0;$<62;$++)RU[$]=j14.charCodeAt($);var z14=218340105584896;function P14(){let $=Math.floor(Math.random()*z14),Z=$%62,X=RU[Z];$=($-Z)/62,Z=$%62;let Q=RU[Z];$=($-Z)/62,Z=$%62;let Y=RU[Z];$=($-Z)/62,Z=$%62;let G=RU[Z];$=($-Z)/62,Z=$%62;let J=RU[Z];$=($-Z)/62,Z=$%62;let K=RU[Z];$=($-Z)/62,Z=$%62;let W=RU[Z];$=($-Z)/62;let H=RU[$];return String.fromCharCode(X,Q,Y,G,J,K,W,H)}});var ke1=v((Me1)=>{Object.defineProperty(Me1,"__esModule",{value:!0});Me1.nuid=Me1.NuidImpl=void 0;var y14="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",EO=62,d70=12,Ie1=10,Te1=33,g14=333,Re1=d70+Ie1,en0=new Uint8Array(EO);for(let $=0;$<EO;$++)en0[$]=y14.charCodeAt($);var m70=4294967296,qe1=BigInt(EO)**BigInt(Ie1),xp=Number(qe1/(1n<<32n)),sn0=Number(qe1%(1n<<32n));function h14($){for(let Z=0;Z<$.length;Z++)$[Z]=Math.floor(Math.random()*256)}function u14($){if(globalThis?.crypto?.getRandomValues)globalThis.crypto.getRandomValues($);else h14($)}class $t0{buf;cbuf;seqHi;seqLo;inc;inited;constructor(){this.buf=new Uint8Array(Re1),this.cbuf=new Uint8Array(d70),this.inited=!1}init(){this.inited=!0,this.setPre(),this.initSeqAndInc(),this.fillSeq()}initSeqAndInc(){let $=0;do this.seqHi=Math.floor(Math.random()*(xp+1)),this.seqLo=Math.floor(Math.random()*m70);while($++<8&&this.seqHi===xp&&this.seqLo>=sn0);if(this.seqHi===xp&&this.seqLo>=sn0)this.seqLo=0;this.inc=Math.random()*(g14-Te1)+Te1|0}setPre(){u14(this.cbuf);for(let $=0;$<d70;$++)this.buf[$]=en0[this.cbuf[$]%EO]}fillSeq(){let $=this.seqHi,Z=this.seqLo;for(let X=Re1-1;X>=d70;X--){let Q=Math.floor($/EO),G=($-Q*EO)*m70+Z,J=Math.floor(G/EO),K=G-J*EO;this.buf[X]=en0[K],$=Q,Z=J}}next(){if(!this.inited)this.init();if(this.seqLo+=this.inc,this.seqLo>=m70)this.seqLo-=m70,this.seqHi+=1;if(this.seqHi>xp||this.seqHi===xp&&this.seqLo>=sn0)this.setPre(),this.initSeqAndInc();this.fillSeq();let $=this.buf;return String.fromCharCode($[0],$[1],$[2],$[3],$[4],$[5],$[6],$[7],$[8],$[9],$[10],$[11],$[12],$[13],$[14],$[15],$[16],$[17],$[18],$[19],$[20],$[21])}reset(){this.init()}}Me1.NuidImpl=$t0;Me1.nuid=new $t0});var ve1=v((Ce1)=>{Object.defineProperty(Ce1,"__esModule",{value:!0});Ce1.nuid=Ce1.Nuid=void 0;var Se1=ke1();Ce1.Nuid=Se1.NuidImpl;Ce1.nuid=Se1.nuid});var p70=v((i70)=>{Object.defineProperty(i70,"__esModule",{value:!0});i70.nuid=i70.Nuid=void 0;var xe1=ve1();Object.defineProperty(i70,"Nuid",{enumerable:!0,get:function(){return xe1.Nuid}});Object.defineProperty(i70,"nuid",{enumerable:!0,get:function(){return xe1.nuid}})});var jO=v((fe1)=>{Object.defineProperty(fe1,"__esModule",{value:!0});fe1.DEFAULT_HOST=fe1.DEFAULT_PORT=fe1.Match=void 0;fe1.syncIterator=p14;fe1.createInbox=n14;var d14=p70(),i14=BG();fe1.Match={Exact:"exact",CanonicalMIME:"canonical",IgnoreCase:"insensitive"};function p14($){let Z=$[Symbol.asyncIterator]();return{async next(){let X=await Z.next();if(X.done)return Promise.resolve(null);return Promise.resolve(X.value)}}}function n14($=""){if($=$||"_INBOX",typeof $!=="string")throw TypeError("prefix must be a string");return $.split(".").forEach((Z)=>{if(Z==="*"||Z===">")throw i14.InvalidArgumentError.format("prefix",`cannot have wildcards ('${$}')`)}),`${$}.${d14.nuid.next()}`}fe1.DEFAULT_PORT=4222;fe1.DEFAULT_HOST="127.0.0.1"});var fp=v((he1)=>{Object.defineProperty(he1,"__esModule",{value:!0});he1.DataBuffer=void 0;var ye1=NG();class ge1{buffers;byteLength;constructor(){this.buffers=[],this.byteLength=0}static concat(...$){let Z=0;for(let Y=0;Y<$.length;Y++)Z+=$[Y].length;let X=new Uint8Array(Z),Q=0;for(let Y=0;Y<$.length;Y++)X.set($[Y],Q),Q+=$[Y].length;return X}static fromAscii($){if(!$)$="";return ye1.TE.encode($)}static toAscii($){return ye1.TD.decode($)}reset(){this.buffers.length=0,this.byteLength=0}pack(){if(this.buffers.length>1){let $=new Uint8Array(this.byteLength),Z=0;for(let X=0;X<this.buffers.length;X++)$.set(this.buffers[X],Z),Z+=this.buffers[X].length;this.buffers.length=0,this.buffers.push($)}}shift(){if(this.buffers.length){let $=this.buffers.shift();if($)return this.byteLength-=$.length,$}return new Uint8Array(0)}drain($){if(this.buffers.length){this.pack();let Z=this.buffers.pop();if(Z){let X=this.byteLength;if($===void 0||$>X)$=X;let Q=Z.subarray(0,$);if(X>$)this.buffers.push(Z.subarray($));return this.byteLength=X-$,Q}}return new Uint8Array(0)}fill($,...Z){if($)this.buffers.push($),this.byteLength+=$.length;for(let X=0;X<Z.length;X++)if(Z[X]&&Z[X].length)this.buffers.push(Z[X]),this.byteLength+=Z[X].length}peek(){if(this.buffers.length)return this.pack(),this.buffers[0];return new Uint8Array(0)}size(){return this.byteLength}length(){return this.buffers.length}}he1.DataBuffer=ge1});var Yj=v((le1)=>{Object.defineProperty(le1,"__esModule",{value:!0});le1.LF=le1.CR=le1.CRLF=le1.CR_LF_LEN=le1.CR_LF=void 0;le1.setTransportFactory=Z$4;le1.defaultPort=X$4;le1.getUrlParseFn=Q$4;le1.newTransport=Y$4;le1.getResolveFn=G$4;le1.protoLen=ce1;le1.extractProtocolMessage=J$4;var s14=NG(),e14=jO(),$$4=fp(),OG;function Z$4($){OG=$}function X$4(){return OG!==void 0&&OG.defaultPort!==void 0?OG.defaultPort:e14.DEFAULT_PORT}function Q$4(){return OG!==void 0&&OG.urlParseFn?OG.urlParseFn:void 0}function Y$4(){if(!OG||typeof OG.factory!=="function")throw Error("transport fn is not set");return OG.factory()}function G$4(){return OG!==void 0&&OG.dnsResolveFn?OG.dnsResolveFn:void 0}le1.CR_LF=`\r
1549
1549
  `;le1.CR_LF_LEN=le1.CR_LF.length;le1.CRLF=$$4.DataBuffer.fromAscii(le1.CR_LF);le1.CR=new Uint8Array(le1.CRLF)[0];le1.LF=new Uint8Array(le1.CRLF)[1];function ce1($){for(let Z=0;Z<$.length;Z++){let X=Z+1;if($.byteLength>X&&$[Z]===le1.CR&&$[X]===le1.LF)return X+1}return 0}function J$4($){let Z=ce1($);if(Z>0){let Q=new Uint8Array($).slice(0,Z);return s14.TD.decode(Q)}return""}});var Gt0=v((re1)=>{Object.defineProperty(re1,"__esModule",{value:!0});re1.ipV4=ne1;re1.isIP=w$4;re1.parseIP=te1;var bp=4,Gj=16,n70=48,pe1=57,de1=65,L$4=70,ie1=97,D$4=102,Yt0=16777215;function ne1($,Z,X,Q){let Y=new Uint8Array(Gj);return[0,0,0,0,0,0,0,0,0,0,255,255].forEach((J,K)=>{Y[K]=J}),Y[12]=$,Y[13]=Z,Y[14]=X,Y[15]=Q,Y}function w$4($){return te1($)!==void 0}function te1($){for(let Z=0;Z<$.length;Z++)switch($[Z]){case".":return oe1($);case":":return E$4($)}return}function oe1($){let Z=new Uint8Array(bp);for(let X=0;X<bp;X++){if($.length===0)return;if(X>0){if($[0]!==".")return;$=$.substring(1)}let{n:Q,c:Y,ok:G}=j$4($);if(!G||Q>255)return;$=$.substring(Y),Z[X]=Q}return ne1(Z[0],Z[1],Z[2],Z[3])}function E$4($){let Z=new Uint8Array(Gj),X=-1;if($.length>=2&&$[0]===":"&&$[1]===":"){if(X=0,$=$.substring(2),$.length===0)return Z}let Q=0;while(Q<Gj){let{n:Y,c:G,ok:J}=z$4($);if(!J||Y>65535)return;if(G<$.length&&$[G]==="."){if(X<0&&Q!=Gj-bp)return;if(Q+bp>Gj)return;let K=oe1($);if(K===void 0)return;Z[Q]=K[12],Z[Q+1]=K[13],Z[Q+2]=K[14],Z[Q+3]=K[15],$="",Q+=bp;break}if(Z[Q]=Y>>8,Z[Q+1]=Y,Q+=2,$=$.substring(G),$.length===0)break;if($[0]!==":"||$.length==1)return;if($=$.substring(1),$[0]===":"){if(X>=0)return;if(X=Q,$=$.substring(1),$.length===0)break}}if($.length!==0)return;if(Q<Gj){if(X<0)return;let Y=Gj-Q;for(let G=Q-1;G>=X;G--)Z[G+Y]=Z[G];for(let G=X+Y-1;G>=X;G--)Z[G]=0}else if(X>=0)return;return Z}function j$4($){let Z=0,X=0;for(Z=0;Z<$.length&&n70<=$.charCodeAt(Z)&&$.charCodeAt(Z)<=pe1;Z++)if(X=X*10+($.charCodeAt(Z)-n70),X>=Yt0)return{n:Yt0,c:Z,ok:!1};if(Z===0)return{n:0,c:0,ok:!1};return{n:X,c:Z,ok:!0}}function z$4($){let Z=0,X=0;for(X=0;X<$.length;X++){if(n70<=$.charCodeAt(X)&&$.charCodeAt(X)<=pe1)Z*=16,Z+=$.charCodeAt(X)-n70;else if(ie1<=$.charCodeAt(X)&&$.charCodeAt(X)<=D$4)Z*=16,Z+=$.charCodeAt(X)-ie1+10;else if(de1<=$.charCodeAt(X)&&$.charCodeAt(X)<=L$4)Z*=16,Z+=$.charCodeAt(X)-de1+10;else break;if(Z>=Yt0)return{n:0,c:X,ok:!1}}if(X===0)return{n:0,c:X,ok:!1};return{n:Z,c:X,ok:!0}}});var Ut0=v((se1)=>{Object.defineProperty(se1,"__esModule",{value:!0});se1.Servers=se1.ServerImpl=void 0;se1.isIPV4OrHostname=ae1;se1.hostPort=Ft0;var Jt0=Yj(),Kt0=r3(),Wt0=Gt0(),R$4=jO(),I$4=BG();function ae1($){if($.indexOf("[")!==-1||$.indexOf("::")!==-1)return!1;if($.indexOf(".")!==-1)return!0;if($.split(":").length<=2)return!0;return!1}function Ht0($){return!ae1($)}function q$4($){let X=$.toUpperCase().indexOf("::FFFF:");if(X!==-1&&$.indexOf(".")!==-1){let Q=$.substring(X+7);return Q=Q.replace("[",""),Q.replace("]","")}return $}function Ft0($){if($=$.trim(),$.match(/^(.*:\/\/)(.*)/m))$=$.replace(/^(.*:\/\/)(.*)/gm,"$2");if($=q$4($),Ht0($)&&$.indexOf("[")===-1)$=`[${$}]`;let Z=Ht0($)?$.match(/(]:)(\d+)/):$.match(/(:)(\d+)/),X=Z&&Z.length===3&&Z[1]&&Z[2]?parseInt(Z[2]):R$4.DEFAULT_PORT,Y=new URL(`${X===80?"https":"http"}://${$}`);Y.port=`${X}`;let G=Y.hostname;if(G.charAt(0)==="[")G=G.substring(1,G.length-1);return{listen:Y.host,hostname:G,port:X}}class hy{src;listen;hostname;port;didConnect;reconnects;lastConnect;gossiped;tlsName;resolves;constructor($,Z=!1){this.src=$,this.tlsName="";let X=Ft0($);this.listen=X.listen,this.hostname=X.hostname,this.port=X.port,this.didConnect=!1,this.reconnects=0,this.lastConnect=0,this.gossiped=Z}toString(){return this.listen}async resolve($){if(!$.fn||$.resolve===!1)return[this];let Z=[];if((0,Wt0.isIP)(this.hostname))return[this];else{let X=await $.fn(this.hostname);if($.debug)console.log(`resolve ${this.hostname} = ${X.join(",")}`);for(let Q of X){let Y=this.port===80?"https":"http",G=new URL(`${Y}://${Ht0(Q)?"["+Q+"]":Q}`);G.port=`${this.port}`;let J=new hy(G.host,!1);J.tlsName=this.hostname,Z.push(J)}}if($.randomize)(0,Kt0.shuffle)(Z);return this.resolves=Z,Z}}se1.ServerImpl=hy;class t70{firstSelect;servers;currentServer;tlsName;randomize;constructor($={}){this.firstSelect=!0,this.servers=[],this.tlsName="",this.randomize=$.randomize||!1}setServers($){if(!Array.isArray($)||$.length===0)throw I$4.InvalidArgumentError.format("servers","cannot be empty");let Z=(0,Jt0.getUrlParseFn)(),X=new Map;for(let Y of this.servers)X.set(Y.listen,Y);let Q=[];for(let Y of $){Y=Z?Z(Y):Y;let{listen:G}=Ft0(Y),J=X.get(G);if(J)J.gossiped=!1,Q.push(J);else Q.push(new hy(Y))}if(this.randomize)(0,Kt0.shuffle)(Q);if(this.servers=Q,this.currentServer===void 0||!Q.includes(this.currentServer))this.currentServer=Q[0],this.firstSelect=!0}clear(){this.servers.length=0}updateTLSName(){let $=this.getCurrentServer();if(!(0,Wt0.isIP)($.hostname))this.tlsName=$.hostname,this.servers.forEach((Z)=>{if(Z.gossiped)Z.tlsName=this.tlsName})}getCurrentServer(){return this.currentServer}addServer($,Z=!1){let X=(0,Jt0.getUrlParseFn)();$=X?X($):$;let Q=new hy($,Z);if((0,Wt0.isIP)(Q.hostname))Q.tlsName=this.tlsName;this.servers.push(Q)}selectServer(){if(this.firstSelect)return this.firstSelect=!1,this.currentServer;let $=this.servers.shift();if($)this.servers.push($),this.currentServer=$;return $}removeCurrentServer(){this.removeServer(this.currentServer)}removeServer($){if($){let Z=this.servers.indexOf($);this.servers.splice(Z,1)}}snapshot(){return t70.freezeAll(this.servers)}snapshotForHandler(){let $=this.currentServer;if(!$)return this.snapshot();let Z=this.servers.indexOf($);if(Z<=0)return this.snapshot();return t70.freezeAll([$,...this.servers.slice(0,Z),...this.servers.slice(Z+1)])}static freezeAll($){return $.map((Z)=>Object.freeze({hostname:Z.hostname,port:Z.port,listen:Z.listen,src:Z.src,tlsName:Z.tlsName,reconnects:Z.reconnects,lastConnect:Z.lastConnect,gossiped:Z.gossiped,didConnect:Z.didConnect}))}find($){return this.servers.find((Z)=>Z.listen===$.listen)}setCurrent($){this.currentServer=$}length(){return this.servers.length}next(){return this.servers.length?this.servers[0]:void 0}getServers(){return this.servers}update($,Z){let X=[],Q=[],Y=(0,Jt0.getUrlParseFn)(),G=new Map;if($.connect_urls&&$.connect_urls.length>0)$.connect_urls.forEach((K)=>{K=Y?Y(K,Z):K;let W=new hy(K,!0);G.set(K,W)});let J=[];if(this.servers.forEach((K,W)=>{let H=K.listen;if(K.gossiped&&this.currentServer.listen!==H&&G.get(H)===void 0)J.push(W);G.delete(H)}),J.reverse(),J.forEach((K)=>{let W=this.servers.splice(K,1);Q=Q.concat(W[0].listen)}),G.forEach((K,W)=>{this.servers.push(K),X.push(W)}),this.randomize&&X.length>0){let K=this.currentServer,W=this.servers.filter((H)=>H!==K);(0,Kt0.shuffle)(W),this.servers=K?[K,...W]:W}return{added:X,deleted:Q}}}se1.Servers=t70});var o70=v((X0$)=>{Object.defineProperty(X0$,"__esModule",{value:!0});X0$.QueuedIteratorImpl=void 0;var Nt0=r3(),$0$=BG();class Z0${inflight;processed;received;noIterator;iterClosed;done;signal;yields;filtered;pendingFiltered;ctx;_data;err;time;profile;yielding;didBreak;constructor(){this.inflight=0,this.filtered=0,this.pendingFiltered=0,this.processed=0,this.received=0,this.noIterator=!1,this.done=!1,this.signal=(0,Nt0.deferred)(),this.yields=[],this.iterClosed=(0,Nt0.deferred)(),this.time=0,this.yielding=!1,this.didBreak=!1,this.profile=!1}[Symbol.asyncIterator](){return this.iterate()}push($){if(this.done)return;if(this.didBreak){if(typeof $==="function"){let Z=$;try{Z()}catch(X){}}return}if(typeof $==="function")this.pendingFiltered++;this.yields.push($),this.signal.resolve()}async*iterate(){if(this.noIterator)throw new $0$.InvalidOperationError("iterator cannot be used when a callback is registered");if(this.yielding)throw new $0$.InvalidOperationError("iterator is already yielding");this.yielding=!0;try{while(!0){if(this.yields.length===0)await this.signal;if(this.err)throw this.err;let $=this.yields;this.inflight=$.length,this.yields=[];for(let Z=0;Z<$.length;Z++){if(typeof $[Z]==="function"){this.pendingFiltered--;let Q=$[Z];try{Q()}catch(Y){throw Y}if(this.err)throw this.err;continue}this.processed++,this.inflight--;let X=this.profile?Date.now():0;yield $[Z],this.time=this.profile?Date.now()-X:0}if(this.done)break;else if(this.yields.length===0)$.length=0,this.yields=$,this.signal=(0,Nt0.deferred)()}}finally{this.didBreak=!0,this.stop()}}stop($){if(this.done)return;this.err=$,this.done=!0,this.signal.resolve(),this.iterClosed.resolve($)}getProcessed(){return this.noIterator?this.received:this.processed}getPending(){return this.yields.length+this.inflight-this.pendingFiltered}getReceived(){return this.received-this.filtered}}X0$.QueuedIteratorImpl=Z0$});var Bt0=v((J0$)=>{Object.defineProperty(J0$,"__esModule",{value:!0});J0$.MuxSubscription=void 0;var S$4=jO(),Y0$=BG();class G0${baseInbox;reqs;constructor(){this.reqs=new Map}size(){return this.reqs.size}init($){return this.baseInbox=`${(0,S$4.createInbox)($)}.`,this.baseInbox}add($){if(!isNaN($.received))$.received=0;this.reqs.set($.token,$)}get($){return this.reqs.get($)}cancel($){this.reqs.delete($.token)}getToken($){let Z=$.subject||"";if(Z.indexOf(this.baseInbox)===0)return Z.substring(this.baseInbox.length);return null}all(){return Array.from(this.reqs.values())}handleError($,Z){if($)return this.all().forEach((X)=>{X.resolver(Z,{})}),!0;if(Z.operation==="publish"){let X=this.all().find((Q)=>{return Q.requestSubject===Z.subject});if(X)return X.resolver(Z,{}),!0}return!1}dispatcher(){return($,Z)=>{let X=this.getToken(Z);if(X){let Q=this.get(X);if(Q){if($===null)$=Z?.data?.length===0&&Z.headers?.code===503?new Y0$.NoRespondersError(Q.requestSubject):null;Q.resolver($,Z)}}}}close(){let $=new Y0$.RequestError("connection closed");this.reqs.forEach((Z)=>{Z.resolver($,{})})}}J0$.MuxSubscription=G0$});var Ot0=v((H0$)=>{Object.defineProperty(H0$,"__esModule",{value:!0});H0$.Heartbeat=void 0;var C$4=r3();class W0${ph;interval;maxOut;timer;pendings;constructor($,Z,X){this.ph=$,this.interval=Z,this.maxOut=X,this.pendings=[]}start(){this.cancel(),this._schedule()}cancel($){if(this.timer)clearTimeout(this.timer),this.timer=void 0;if(this._reset(),$)this.ph.disconnect()}_schedule(){this.timer=setTimeout(()=>{if(this.ph.dispatchStatus({type:"ping",pendingPings:this.pendings.length+1}),this.pendings.length===this.maxOut){this.cancel(!0);return}let $=(0,C$4.deferred)();this.ph.flush($).then(()=>{this._reset()}).catch(()=>{this.cancel()}),this.pendings.push($),this._schedule()},this.interval)}_reset(){this.pendings=this.pendings.filter(($)=>{return $.resolve(),!1})}}H0$.Heartbeat=W0$});var wt0=v((O0$)=>{Object.defineProperty(O0$,"__esModule",{value:!0});O0$.DenoBuffer=O0$.MAX_SIZE=O0$.AssertionError=void 0;O0$.assert=N0$;O0$.concat=B0$;O0$.append=v$4;O0$.readAll=x$4;O0$.writeAll=f$4;var _$4=NG();class Lt0 extends Error{constructor($){super($);this.name="AssertionError"}}O0$.AssertionError=Lt0;function N0$($,Z="Assertion failed."){if(!$)throw new Lt0(Z)}var U0$=32768;O0$.MAX_SIZE=4294967294;function r70($,Z,X=0){let Q=Z.byteLength-X;if($.byteLength>Q)$=$.subarray(0,Q);return Z.set($,X),$.byteLength}function B0$($,Z){if($===void 0&&Z===void 0)return new Uint8Array(0);if($===void 0)return Z;if(Z===void 0)return $;let X=new Uint8Array($.length+Z.length);return X.set($,0),X.set(Z,$.length),X}function v$4($,Z){return B0$($,Uint8Array.of(Z))}class Dt0{_buf;_off;constructor($){if(this._off=0,$==null){this._buf=new Uint8Array(0);return}this._buf=new Uint8Array($)}bytes($={copy:!0}){if($.copy===!1)return this._buf.subarray(this._off);return this._buf.slice(this._off)}empty(){return this._buf.byteLength<=this._off}get length(){return this._buf.byteLength-this._off}get capacity(){return this._buf.buffer.byteLength}truncate($){if($===0){this.reset();return}if($<0||$>this.length)throw Error("bytes.Buffer: truncation out of range");this._reslice(this._off+$)}reset(){this._reslice(0),this._off=0}_tryGrowByReslice($){let Z=this._buf.byteLength;if($<=this.capacity-Z)return this._reslice(Z+$),Z;return-1}_reslice($){N0$($<=this._buf.buffer.byteLength),this._buf=new Uint8Array(this._buf.buffer,0,$)}readByte(){let $=new Uint8Array(1);if(this.read($))return $[0];return null}read($){if(this.empty()){if(this.reset(),$.byteLength===0)return 0;return null}let Z=r70(this._buf.subarray(this._off),$);return this._off+=Z,Z}writeByte($){return this.write(Uint8Array.of($))}writeString($){return this.write(_$4.TE.encode($))}write($){let Z=this._grow($.byteLength);return r70($,this._buf,Z)}_grow($){let Z=this.length;if(Z===0&&this._off!==0)this.reset();let X=this._tryGrowByReslice($);if(X>=0)return X;let Q=this.capacity;if($<=Math.floor(Q/2)-Z)r70(this._buf.subarray(this._off),this._buf);else if(Q+$>O0$.MAX_SIZE)throw Error("The buffer cannot be grown beyond the maximum size.");else{let Y=new Uint8Array(Math.min(2*Q+$,O0$.MAX_SIZE));r70(this._buf.subarray(this._off),Y),this._buf=Y}return this._off=0,this._reslice(Math.min(Z+$,O0$.MAX_SIZE)),Z}grow($){if($<0)throw Error("Buffer._grow: negative count");let Z=this._grow($);this._reslice(Z)}readFrom($){let Z=0,X=new Uint8Array(U0$);while(!0){let Q=this.capacity-this.length<U0$,Y=Q?X:new Uint8Array(this._buf.buffer,this.length),G=$.read(Y);if(G===null)return Z;if(Q)this.write(Y.subarray(0,G));else this._reslice(this.length+G);Z+=G}}}O0$.DenoBuffer=Dt0;function x$4($){let Z=new Dt0;return Z.readFrom($),Z.bytes()}function f$4($,Z){let X=0;while(X<Z.length)X+=$.write(Z.subarray(X))}});var zt0=v((j0$)=>{Object.defineProperty(j0$,"__esModule",{value:!0});j0$.cc=j0$.State=j0$.Parser=j0$.Kind=void 0;j0$.describe=l$4;var Et0=wt0(),jt0=NG();j0$.Kind={OK:0,ERR:1,MSG:2,INFO:3,PING:4,PONG:5};function l$4($){let Z,X="";switch($.kind){case j0$.Kind.MSG:Z="MSG";break;case j0$.Kind.OK:Z="OK";break;case j0$.Kind.ERR:Z="ERR",X=jt0.TD.decode($.data);break;case j0$.Kind.PING:Z="PING";break;case j0$.Kind.PONG:Z="PONG";break;case j0$.Kind.INFO:Z="INFO",X=jt0.TD.decode($.data)}return`${Z}: ${X}`}function D0$(){let $={};return $.sid=-1,$.hdr=-1,$.size=-1,$}var w0$=48,m$4=57,uy=67108864;class E0${dispatcher;state;as;drop;hdr;ma;argBuf;msgBuf;constructor($){this.dispatcher=$,this.state=j0$.State.OP_START,this.as=0,this.drop=0,this.hdr=0}parse($){let Z;for(Z=0;Z<$.length;Z++){let X=$[Z];switch(this.state){case j0$.State.OP_START:switch(X){case j0$.cc.M:case j0$.cc.m:this.state=j0$.State.OP_M,this.hdr=-1,this.ma=D0$();break;case j0$.cc.H:case j0$.cc.h:this.state=j0$.State.OP_H,this.hdr=0,this.ma=D0$();break;case j0$.cc.P:case j0$.cc.p:this.state=j0$.State.OP_P;break;case j0$.cc.PLUS:this.state=j0$.State.OP_PLUS;break;case j0$.cc.MINUS:this.state=j0$.State.OP_MINUS;break;case j0$.cc.I:case j0$.cc.i:this.state=j0$.State.OP_I;break;default:throw this.fail($.subarray(Z))}break;case j0$.State.OP_H:switch(X){case j0$.cc.M:case j0$.cc.m:this.state=j0$.State.OP_M;break;default:throw this.fail($.subarray(Z))}break;case j0$.State.OP_M:switch(X){case j0$.cc.S:case j0$.cc.s:this.state=j0$.State.OP_MS;break;default:throw this.fail($.subarray(Z))}break;case j0$.State.OP_MS:switch(X){case j0$.cc.G:case j0$.cc.g:this.state=j0$.State.OP_MSG;break;default:throw this.fail($.subarray(Z))}break;case j0$.State.OP_MSG:switch(X){case j0$.cc.SPACE:case j0$.cc.TAB:this.state=j0$.State.OP_MSG_SPC;break;default:throw this.fail($.subarray(Z))}break;case j0$.State.OP_MSG_SPC:switch(X){case j0$.cc.SPACE:case j0$.cc.TAB:continue;default:this.state=j0$.State.MSG_ARG,this.as=Z}break;case j0$.State.MSG_ARG:switch(X){case j0$.cc.CR:this.drop=1;break;case j0$.cc.NL:{let Q=this.argBuf?this.argBuf.bytes():$.subarray(this.as,Z-this.drop);this.processMsgArgs(Q),this.drop=0,this.as=Z+1,this.state=j0$.State.MSG_PAYLOAD,Z=this.as+this.ma.size-1;break}default:if(this.argBuf)this.argBuf.writeByte(X)}break;case j0$.State.MSG_PAYLOAD:if(this.msgBuf)if(this.msgBuf.length>=this.ma.size){let Q=this.msgBuf.bytes({copy:!1});this.dispatcher.push({kind:j0$.Kind.MSG,msg:this.ma,data:Q}),this.argBuf=void 0,this.msgBuf=void 0,this.state=j0$.State.MSG_END}else{let Q=this.ma.size-this.msgBuf.length,Y=$.length-Z;if(Y<Q)Q=Y;if(Q>0)this.msgBuf.write($.subarray(Z,Z+Q)),Z=Z+Q-1;else this.msgBuf.writeByte(X)}else if(Z-this.as>=this.ma.size)this.dispatcher.push({kind:j0$.Kind.MSG,msg:this.ma,data:$.subarray(this.as,Z)}),this.argBuf=void 0,this.msgBuf=void 0,this.state=j0$.State.MSG_END;break;case j0$.State.MSG_END:switch(X){case j0$.cc.NL:this.drop=0,this.as=Z+1,this.state=j0$.State.OP_START;break;default:continue}break;case j0$.State.OP_PLUS:switch(X){case j0$.cc.O:case j0$.cc.o:this.state=j0$.State.OP_PLUS_O;break;default:throw this.fail($.subarray(Z))}break;case j0$.State.OP_PLUS_O:switch(X){case j0$.cc.K:case j0$.cc.k:this.state=j0$.State.OP_PLUS_OK;break;default:throw this.fail($.subarray(Z))}break;case j0$.State.OP_PLUS_OK:switch(X){case j0$.cc.NL:this.dispatcher.push({kind:j0$.Kind.OK}),this.drop=0,this.state=j0$.State.OP_START;break}break;case j0$.State.OP_MINUS:switch(X){case j0$.cc.E:case j0$.cc.e:this.state=j0$.State.OP_MINUS_E;break;default:throw this.fail($.subarray(Z))}break;case j0$.State.OP_MINUS_E:switch(X){case j0$.cc.R:case j0$.cc.r:this.state=j0$.State.OP_MINUS_ER;break;default:throw this.fail($.subarray(Z))}break;case j0$.State.OP_MINUS_ER:switch(X){case j0$.cc.R:case j0$.cc.r:this.state=j0$.State.OP_MINUS_ERR;break;default:throw this.fail($.subarray(Z))}break;case j0$.State.OP_MINUS_ERR:switch(X){case j0$.cc.SPACE:case j0$.cc.TAB:this.state=j0$.State.OP_MINUS_ERR_SPC;break;default:throw this.fail($.subarray(Z))}break;case j0$.State.OP_MINUS_ERR_SPC:switch(X){case j0$.cc.SPACE:case j0$.cc.TAB:continue;default:this.state=j0$.State.MINUS_ERR_ARG,this.as=Z}break;case j0$.State.MINUS_ERR_ARG:switch(X){case j0$.cc.CR:this.drop=1;break;case j0$.cc.NL:{let Q;if(this.argBuf)Q=this.argBuf.bytes(),this.argBuf=void 0;else Q=$.subarray(this.as,Z-this.drop);this.dispatcher.push({kind:j0$.Kind.ERR,data:Q}),this.drop=0,this.as=Z+1,this.state=j0$.State.OP_START;break}default:if(this.argBuf)this.argBuf.write(Uint8Array.of(X))}break;case j0$.State.OP_P:switch(X){case j0$.cc.I:case j0$.cc.i:this.state=j0$.State.OP_PI;break;case j0$.cc.O:case j0$.cc.o:this.state=j0$.State.OP_PO;break;default:throw this.fail($.subarray(Z))}break;case j0$.State.OP_PO:switch(X){case j0$.cc.N:case j0$.cc.n:this.state=j0$.State.OP_PON;break;default:throw this.fail($.subarray(Z))}break;case j0$.State.OP_PON:switch(X){case j0$.cc.G:case j0$.cc.g:this.state=j0$.State.OP_PONG;break;default:throw this.fail($.subarray(Z))}break;case j0$.State.OP_PONG:switch(X){case j0$.cc.NL:this.dispatcher.push({kind:j0$.Kind.PONG}),this.drop=0,this.state=j0$.State.OP_START;break}break;case j0$.State.OP_PI:switch(X){case j0$.cc.N:case j0$.cc.n:this.state=j0$.State.OP_PIN;break;default:throw this.fail($.subarray(Z))}break;case j0$.State.OP_PIN:switch(X){case j0$.cc.G:case j0$.cc.g:this.state=j0$.State.OP_PING;break;default:throw this.fail($.subarray(Z))}break;case j0$.State.OP_PING:switch(X){case j0$.cc.NL:this.dispatcher.push({kind:j0$.Kind.PING}),this.drop=0,this.state=j0$.State.OP_START;break}break;case j0$.State.OP_I:switch(X){case j0$.cc.N:case j0$.cc.n:this.state=j0$.State.OP_IN;break;default:throw this.fail($.subarray(Z))}break;case j0$.State.OP_IN:switch(X){case j0$.cc.F:case j0$.cc.f:this.state=j0$.State.OP_INF;break;default:throw this.fail($.subarray(Z))}break;case j0$.State.OP_INF:switch(X){case j0$.cc.O:case j0$.cc.o:this.state=j0$.State.OP_INFO;break;default:throw this.fail($.subarray(Z))}break;case j0$.State.OP_INFO:switch(X){case j0$.cc.SPACE:case j0$.cc.TAB:this.state=j0$.State.OP_INFO_SPC;break;default:throw this.fail($.subarray(Z))}break;case j0$.State.OP_INFO_SPC:switch(X){case j0$.cc.SPACE:case j0$.cc.TAB:continue;default:this.state=j0$.State.INFO_ARG,this.as=Z}break;case j0$.State.INFO_ARG:switch(X){case j0$.cc.CR:this.drop=1;break;case j0$.cc.NL:{let Q;if(this.argBuf)Q=this.argBuf.bytes(),this.argBuf=void 0;else Q=$.subarray(this.as,Z-this.drop);this.dispatcher.push({kind:j0$.Kind.INFO,data:Q}),this.drop=0,this.as=Z+1,this.state=j0$.State.OP_START;break}default:if(this.argBuf)this.argBuf.writeByte(X)}break;default:throw this.fail($.subarray(Z))}}if((this.state===j0$.State.MSG_ARG||this.state===j0$.State.MINUS_ERR_ARG||this.state===j0$.State.INFO_ARG)&&!this.argBuf)this.argBuf=new Et0.DenoBuffer($.subarray(this.as,Z-this.drop));if(this.state===j0$.State.MSG_PAYLOAD&&!this.msgBuf){if(!this.argBuf)this.cloneMsgArg();this.msgBuf=new Et0.DenoBuffer($.subarray(this.as))}}cloneMsgArg(){let $=this.ma.subject.length,Z=this.ma.reply?this.ma.reply.length:0,X=new Uint8Array($+Z);if(X.set(this.ma.subject),this.ma.reply)X.set(this.ma.reply,$);if(this.argBuf=new Et0.DenoBuffer(X),this.ma.subject=X.subarray(0,$),this.ma.reply)this.ma.reply=X.subarray($)}processMsgArgs($){if(this.hdr>=0)return this.processHeaderMsgArgs($);let Z=[],X=-1;for(let Q=0;Q<$.length;Q++)switch($[Q]){case j0$.cc.SPACE:case j0$.cc.TAB:case j0$.cc.CR:case j0$.cc.NL:if(X>=0)Z.push($.subarray(X,Q)),X=-1;break;default:if(X<0)X=Q}if(X>=0)Z.push($.subarray(X));switch(Z.length){case 3:this.ma.subject=Z[0],this.ma.sid=this.protoParseInt(Z[1]),this.ma.reply=void 0,this.ma.size=this.protoParseInt(Z[2],uy);break;case 4:this.ma.subject=Z[0],this.ma.sid=this.protoParseInt(Z[1]),this.ma.reply=Z[2],this.ma.size=this.protoParseInt(Z[3],uy);break;default:throw this.fail($,"processMsgArgs Parse Error")}if(this.ma.sid<0)throw this.fail($,"processMsgArgs Bad or Missing Sid Error");if(this.ma.size<0)throw this.fail($,"processMsgArgs Bad or Missing Size Error")}fail($,Z=""){if(!Z)Z=`parse error [${this.state}]`;else Z=`${Z} [${this.state}]`;return Error(`${Z}: ${jt0.TD.decode($)}`)}processHeaderMsgArgs($){let Z=[],X=-1;for(let Q=0;Q<$.length;Q++)switch($[Q]){case j0$.cc.SPACE:case j0$.cc.TAB:case j0$.cc.CR:case j0$.cc.NL:if(X>=0)Z.push($.subarray(X,Q)),X=-1;break;default:if(X<0)X=Q}if(X>=0)Z.push($.subarray(X));switch(Z.length){case 4:this.ma.subject=Z[0],this.ma.sid=this.protoParseInt(Z[1]),this.ma.reply=void 0,this.ma.hdr=this.protoParseInt(Z[2],uy),this.ma.size=this.protoParseInt(Z[3],uy);break;case 5:this.ma.subject=Z[0],this.ma.sid=this.protoParseInt(Z[1]),this.ma.reply=Z[2],this.ma.hdr=this.protoParseInt(Z[3],uy),this.ma.size=this.protoParseInt(Z[4],uy);break;default:throw this.fail($,"processHeaderMsgArgs Parse Error")}if(this.ma.sid<0)throw this.fail($,"processHeaderMsgArgs Bad or Missing Sid Error");if(this.ma.hdr<0||this.ma.hdr>this.ma.size)throw this.fail($,"processHeaderMsgArgs Bad or Missing Header Size Error");if(this.ma.size<0)throw this.fail($,"processHeaderMsgArgs Bad or Missing Size Error")}protoParseInt($,Z){if($.length===0||$.length>15)return-1;let X=0;for(let Q=0;Q<$.length;Q++){if($[Q]<w0$||$[Q]>m$4)return-1;X=X*10+($[Q]-w0$)}return Z!==void 0&&X>Z?-1:X}}j0$.Parser=E0$;j0$.State={OP_START:0,OP_PLUS:1,OP_PLUS_O:2,OP_PLUS_OK:3,OP_MINUS:4,OP_MINUS_E:5,OP_MINUS_ER:6,OP_MINUS_ERR:7,OP_MINUS_ERR_SPC:8,MINUS_ERR_ARG:9,OP_M:10,OP_MS:11,OP_MSG:12,OP_MSG_SPC:13,MSG_ARG:14,MSG_PAYLOAD:15,MSG_END:16,OP_H:17,OP_P:18,OP_PI:19,OP_PIN:20,OP_PING:21,OP_PO:22,OP_PON:23,OP_PONG:24,OP_I:25,OP_IN:26,OP_INF:27,OP_INFO:28,OP_INFO_SPC:29,INFO_ARG:30};j0$.cc={CR:13,E:69,e:101,F:70,f:102,G:71,g:103,H:72,h:104,I:73,i:105,K:75,k:107,M:77,m:109,MINUS:45,N:78,n:110,NL:10,O:79,o:111,P:80,p:112,PLUS:43,R:82,r:114,S:83,s:115,SPACE:32,TAB:9}});var e70=v((P0$)=>{Object.defineProperty(P0$,"__esModule",{value:!0});P0$.MsgHdrsImpl=void 0;P0$.canonicalMIMEHeaderKey=At0;P0$.headers=p$4;var z0$=NG(),a3=jO(),s70=BG();function At0($){let F=!0,U=Array($.length);for(let N=0;N<$.length;N++){let B=$.charCodeAt(N);if(B===58||B<33||B>126)throw s70.InvalidArgumentError.format("header",`'${$[N]}' is not a valid character in a header name`);if(F&&97<=B&&B<=122)B-=32;else if(!F&&65<=B&&B<=90)B+=32;U[N]=B,F=B==45}return String.fromCharCode(...U)}function p$4($=0,Z=""){if($===0&&Z!=="")throw s70.InvalidArgumentError.format("code","is required");else if($>0&&Z==="")throw s70.InvalidArgumentError.format("description","is required");return new cy($,Z)}var Pt0="NATS/1.0";class cy{_code;headers;_description;constructor($=0,Z=""){this._code=$,this._description=Z,this.headers=new Map}[Symbol.iterator](){return this.headers.entries()}size(){return this.headers.size}equals($){if($&&this.headers.size===$.headers.size&&this._code===$._code){for(let[Z,X]of this.headers){let Q=$.values(Z);if(X.length!==Q.length)return!1;let Y=[...X].sort(),G=[...Q].sort();for(let J=0;J<Y.length;J++)if(Y[J]!==G[J])return!1}return!0}return!1}static decode($){let Z=new cy,Q=z0$.TD.decode($).split(`\r
1550
1550
  `),Y=Q[0];if(Y!==Pt0){let G=Y.replace(Pt0,"").trim();if(G.length>0){if(Z._code=parseInt(G,10),isNaN(Z._code))Z._code=0;let J=Z._code.toString();G=G.replace(J,""),Z._description=G.trim()}}if(Q.length>=1)Q.slice(1).map((G)=>{if(G){let J=G.indexOf(":");if(J>-1){let K=G.slice(0,J),W=G.slice(J+1).trim();Z.append(K,W)}}});return Z}toString(){if(this.headers.size===0&&this._code===0)return"";let $=Pt0;if(this._code>0&&this._description!=="")$+=` ${this._code} ${this._description}`;for(let[Z,X]of this.headers)for(let Q=0;Q<X.length;Q++)$=`${$}\r
1551
1551
  ${Z}: ${X[Q]}`;return`${$}\r