larkup 0.1.14 → 0.1.21

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 (1047) hide show
  1. package/.next/BUILD_ID +1 -0
  2. package/.next/app-path-routes-manifest.json +69 -0
  3. package/.next/build/chunks/[root-of-the-server]__0cstldc._.js +206 -0
  4. package/.next/build/chunks/[root-of-the-server]__0s3ts0r._.js +500 -0
  5. package/.next/build/chunks/[turbopack-node]_transforms_postcss_ts_0xqnjlz._.js +13 -0
  6. package/.next/build/chunks/[turbopack]_runtime.js +890 -0
  7. package/.next/build/chunks/node_modules__pnpm_04zrf.1._.js +7126 -0
  8. package/.next/build/package.json +1 -0
  9. package/.next/build/postcss.js +6 -0
  10. package/.next/build-manifest.json +22 -0
  11. package/.next/diagnostics/build-diagnostics.json +6 -0
  12. package/.next/diagnostics/framework.json +1 -0
  13. package/.next/diagnostics/route-bundle-stats.json +133 -0
  14. package/.next/export-marker.json +6 -0
  15. package/.next/fallback-build-manifest.json +13 -0
  16. package/.next/images-manifest.json +68 -0
  17. package/.next/next-minimal-server.js.nft.json +1 -0
  18. package/.next/next-server.js.nft.json +1 -0
  19. package/.next/package.json +1 -0
  20. package/.next/prerender-manifest.json +210 -0
  21. package/.next/required-server-files.js +356 -0
  22. package/.next/required-server-files.json +356 -0
  23. package/.next/routes-manifest.json +462 -0
  24. package/.next/server/app/_global-error/page/app-paths-manifest.json +3 -0
  25. package/.next/server/app/_global-error/page/build-manifest.json +18 -0
  26. package/.next/server/app/_global-error/page/next-font-manifest.json +6 -0
  27. package/.next/server/app/_global-error/page/react-loadable-manifest.json +1 -0
  28. package/.next/server/app/_global-error/page/server-reference-manifest.json +4 -0
  29. package/.next/server/app/_global-error/page.js +10 -0
  30. package/.next/server/app/_global-error/page.js.nft.json +1 -0
  31. package/.next/server/app/_global-error/page_client-reference-manifest.js +3 -0
  32. package/.next/server/app/_global-error.html +1 -0
  33. package/.next/server/app/_global-error.meta +15 -0
  34. package/.next/server/app/_global-error.rsc +15 -0
  35. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +5 -0
  36. package/.next/server/app/_global-error.segments/_full.segment.rsc +15 -0
  37. package/.next/server/app/_global-error.segments/_head.segment.rsc +6 -0
  38. package/.next/server/app/_global-error.segments/_index.segment.rsc +5 -0
  39. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -0
  40. package/.next/server/app/_not-found/page/app-paths-manifest.json +3 -0
  41. package/.next/server/app/_not-found/page/build-manifest.json +18 -0
  42. package/.next/server/app/_not-found/page/next-font-manifest.json +11 -0
  43. package/.next/server/app/_not-found/page/react-loadable-manifest.json +1 -0
  44. package/.next/server/app/_not-found/page/server-reference-manifest.json +4 -0
  45. package/.next/server/app/_not-found/page.js +14 -0
  46. package/.next/server/app/_not-found/page.js.nft.json +1 -0
  47. package/.next/server/app/_not-found/page_client-reference-manifest.js +3 -0
  48. package/.next/server/app/_not-found.html +1 -0
  49. package/.next/server/app/_not-found.meta +16 -0
  50. package/.next/server/app/_not-found.rsc +28 -0
  51. package/.next/server/app/_not-found.segments/_full.segment.rsc +28 -0
  52. package/.next/server/app/_not-found.segments/_head.segment.rsc +6 -0
  53. package/.next/server/app/_not-found.segments/_index.segment.rsc +14 -0
  54. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -0
  55. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +5 -0
  56. package/.next/server/app/_not-found.segments/_tree.segment.rsc +3 -0
  57. package/.next/server/app/analytics/page/app-paths-manifest.json +3 -0
  58. package/.next/server/app/analytics/page/build-manifest.json +18 -0
  59. package/.next/server/app/analytics/page/next-font-manifest.json +11 -0
  60. package/.next/server/app/analytics/page/react-loadable-manifest.json +1 -0
  61. package/.next/server/app/analytics/page/server-reference-manifest.json +4 -0
  62. package/.next/server/app/analytics/page.js +15 -0
  63. package/.next/server/app/analytics/page.js.nft.json +1 -0
  64. package/.next/server/app/analytics/page_client-reference-manifest.js +3 -0
  65. package/.next/server/app/analytics.html +1 -0
  66. package/.next/server/app/analytics.meta +15 -0
  67. package/.next/server/app/analytics.rsc +32 -0
  68. package/.next/server/app/analytics.segments/_full.segment.rsc +32 -0
  69. package/.next/server/app/analytics.segments/_head.segment.rsc +6 -0
  70. package/.next/server/app/analytics.segments/_index.segment.rsc +14 -0
  71. package/.next/server/app/analytics.segments/_tree.segment.rsc +5 -0
  72. package/.next/server/app/analytics.segments/analytics/__PAGE__.segment.rsc +6 -0
  73. package/.next/server/app/analytics.segments/analytics.segment.rsc +5 -0
  74. package/.next/server/app/api/analytics/route/app-paths-manifest.json +3 -0
  75. package/.next/server/app/api/analytics/route/build-manifest.json +9 -0
  76. package/.next/server/app/api/analytics/route/server-reference-manifest.json +4 -0
  77. package/.next/server/app/api/analytics/route.js +9 -0
  78. package/.next/server/app/api/analytics/route.js.nft.json +1 -0
  79. package/.next/server/app/api/analytics/route_client-reference-manifest.js +3 -0
  80. package/.next/server/app/api/chat/route/app-paths-manifest.json +3 -0
  81. package/.next/server/app/api/chat/route/build-manifest.json +9 -0
  82. package/.next/server/app/api/chat/route/server-reference-manifest.json +4 -0
  83. package/.next/server/app/api/chat/route.js +24 -0
  84. package/.next/server/app/api/chat/route.js.nft.json +1 -0
  85. package/.next/server/app/api/chat/route_client-reference-manifest.js +3 -0
  86. package/.next/server/app/api/chat/status/route/app-paths-manifest.json +3 -0
  87. package/.next/server/app/api/chat/status/route/build-manifest.json +9 -0
  88. package/.next/server/app/api/chat/status/route/server-reference-manifest.json +4 -0
  89. package/.next/server/app/api/chat/status/route.js +9 -0
  90. package/.next/server/app/api/chat/status/route.js.nft.json +1 -0
  91. package/.next/server/app/api/chat/status/route_client-reference-manifest.js +3 -0
  92. package/.next/server/app/api/chat/suggestions/route/app-paths-manifest.json +3 -0
  93. package/.next/server/app/api/chat/suggestions/route/build-manifest.json +9 -0
  94. package/.next/server/app/api/chat/suggestions/route/server-reference-manifest.json +4 -0
  95. package/.next/server/app/api/chat/suggestions/route.js +17 -0
  96. package/.next/server/app/api/chat/suggestions/route.js.nft.json +1 -0
  97. package/.next/server/app/api/chat/suggestions/route_client-reference-manifest.js +3 -0
  98. package/.next/server/app/api/config/route/app-paths-manifest.json +3 -0
  99. package/.next/server/app/api/config/route/build-manifest.json +9 -0
  100. package/.next/server/app/api/config/route/server-reference-manifest.json +4 -0
  101. package/.next/server/app/api/config/route.js +8 -0
  102. package/.next/server/app/api/config/route.js.nft.json +1 -0
  103. package/.next/server/app/api/config/route_client-reference-manifest.js +3 -0
  104. package/.next/server/app/api/config/test/route/app-paths-manifest.json +3 -0
  105. package/.next/server/app/api/config/test/route/build-manifest.json +9 -0
  106. package/.next/server/app/api/config/test/route/server-reference-manifest.json +4 -0
  107. package/.next/server/app/api/config/test/route.js +8 -0
  108. package/.next/server/app/api/config/test/route.js.nft.json +1 -0
  109. package/.next/server/app/api/config/test/route_client-reference-manifest.js +3 -0
  110. package/.next/server/app/api/config/test-embedding/route/app-paths-manifest.json +3 -0
  111. package/.next/server/app/api/config/test-embedding/route/build-manifest.json +9 -0
  112. package/.next/server/app/api/config/test-embedding/route/server-reference-manifest.json +4 -0
  113. package/.next/server/app/api/config/test-embedding/route.js +12 -0
  114. package/.next/server/app/api/config/test-embedding/route.js.nft.json +1 -0
  115. package/.next/server/app/api/config/test-embedding/route_client-reference-manifest.js +3 -0
  116. package/.next/server/app/api/config/test-llm/route/app-paths-manifest.json +3 -0
  117. package/.next/server/app/api/config/test-llm/route/build-manifest.json +9 -0
  118. package/.next/server/app/api/config/test-llm/route/server-reference-manifest.json +4 -0
  119. package/.next/server/app/api/config/test-llm/route.js +12 -0
  120. package/.next/server/app/api/config/test-llm/route.js.nft.json +1 -0
  121. package/.next/server/app/api/config/test-llm/route_client-reference-manifest.js +3 -0
  122. package/.next/server/app/api/config/test-provider/route/app-paths-manifest.json +3 -0
  123. package/.next/server/app/api/config/test-provider/route/build-manifest.json +9 -0
  124. package/.next/server/app/api/config/test-provider/route/server-reference-manifest.json +4 -0
  125. package/.next/server/app/api/config/test-provider/route.js +13 -0
  126. package/.next/server/app/api/config/test-provider/route.js.nft.json +1 -0
  127. package/.next/server/app/api/config/test-provider/route_client-reference-manifest.js +3 -0
  128. package/.next/server/app/api/config/verify/route/app-paths-manifest.json +3 -0
  129. package/.next/server/app/api/config/verify/route/build-manifest.json +9 -0
  130. package/.next/server/app/api/config/verify/route/server-reference-manifest.json +4 -0
  131. package/.next/server/app/api/config/verify/route.js +16 -0
  132. package/.next/server/app/api/config/verify/route.js.nft.json +1 -0
  133. package/.next/server/app/api/config/verify/route_client-reference-manifest.js +3 -0
  134. package/.next/server/app/api/connections/route/app-paths-manifest.json +3 -0
  135. package/.next/server/app/api/connections/route/build-manifest.json +9 -0
  136. package/.next/server/app/api/connections/route/server-reference-manifest.json +4 -0
  137. package/.next/server/app/api/connections/route.js +8 -0
  138. package/.next/server/app/api/connections/route.js.nft.json +1 -0
  139. package/.next/server/app/api/connections/route_client-reference-manifest.js +3 -0
  140. package/.next/server/app/api/connections/webhook/route/app-paths-manifest.json +3 -0
  141. package/.next/server/app/api/connections/webhook/route/build-manifest.json +9 -0
  142. package/.next/server/app/api/connections/webhook/route/server-reference-manifest.json +4 -0
  143. package/.next/server/app/api/connections/webhook/route.js +10 -0
  144. package/.next/server/app/api/connections/webhook/route.js.nft.json +1 -0
  145. package/.next/server/app/api/connections/webhook/route_client-reference-manifest.js +3 -0
  146. package/.next/server/app/api/demo/route/app-paths-manifest.json +3 -0
  147. package/.next/server/app/api/demo/route/build-manifest.json +9 -0
  148. package/.next/server/app/api/demo/route/server-reference-manifest.json +4 -0
  149. package/.next/server/app/api/demo/route.js +15 -0
  150. package/.next/server/app/api/demo/route.js.nft.json +1 -0
  151. package/.next/server/app/api/demo/route_client-reference-manifest.js +3 -0
  152. package/.next/server/app/api/deploy/cloud-project/route/app-paths-manifest.json +3 -0
  153. package/.next/server/app/api/deploy/cloud-project/route/build-manifest.json +9 -0
  154. package/.next/server/app/api/deploy/cloud-project/route/server-reference-manifest.json +4 -0
  155. package/.next/server/app/api/deploy/cloud-project/route.js +13 -0
  156. package/.next/server/app/api/deploy/cloud-project/route.js.nft.json +1 -0
  157. package/.next/server/app/api/deploy/cloud-project/route_client-reference-manifest.js +3 -0
  158. package/.next/server/app/api/deploy/ssh/route/app-paths-manifest.json +3 -0
  159. package/.next/server/app/api/deploy/ssh/route/build-manifest.json +9 -0
  160. package/.next/server/app/api/deploy/ssh/route/server-reference-manifest.json +4 -0
  161. package/.next/server/app/api/deploy/ssh/route.js +8 -0
  162. package/.next/server/app/api/deploy/ssh/route.js.nft.json +1 -0
  163. package/.next/server/app/api/deploy/ssh/route_client-reference-manifest.js +3 -0
  164. package/.next/server/app/api/deployment/blob-setup/route/app-paths-manifest.json +3 -0
  165. package/.next/server/app/api/deployment/blob-setup/route/build-manifest.json +9 -0
  166. package/.next/server/app/api/deployment/blob-setup/route/server-reference-manifest.json +4 -0
  167. package/.next/server/app/api/deployment/blob-setup/route.js +8 -0
  168. package/.next/server/app/api/deployment/blob-setup/route.js.nft.json +1 -0
  169. package/.next/server/app/api/deployment/blob-setup/route_client-reference-manifest.js +3 -0
  170. package/.next/server/app/api/deployment/config/route/app-paths-manifest.json +3 -0
  171. package/.next/server/app/api/deployment/config/route/build-manifest.json +9 -0
  172. package/.next/server/app/api/deployment/config/route/server-reference-manifest.json +4 -0
  173. package/.next/server/app/api/deployment/config/route.js +8 -0
  174. package/.next/server/app/api/deployment/config/route.js.nft.json +1 -0
  175. package/.next/server/app/api/deployment/config/route_client-reference-manifest.js +3 -0
  176. package/.next/server/app/api/describe-image/route/app-paths-manifest.json +3 -0
  177. package/.next/server/app/api/describe-image/route/build-manifest.json +9 -0
  178. package/.next/server/app/api/describe-image/route/server-reference-manifest.json +4 -0
  179. package/.next/server/app/api/describe-image/route.js +15 -0
  180. package/.next/server/app/api/describe-image/route.js.nft.json +1 -0
  181. package/.next/server/app/api/describe-image/route_client-reference-manifest.js +3 -0
  182. package/.next/server/app/api/doc-editor/edit/route/app-paths-manifest.json +3 -0
  183. package/.next/server/app/api/doc-editor/edit/route/build-manifest.json +9 -0
  184. package/.next/server/app/api/doc-editor/edit/route/server-reference-manifest.json +4 -0
  185. package/.next/server/app/api/doc-editor/edit/route.js +11 -0
  186. package/.next/server/app/api/doc-editor/edit/route.js.nft.json +1 -0
  187. package/.next/server/app/api/doc-editor/edit/route_client-reference-manifest.js +3 -0
  188. package/.next/server/app/api/doc-editor/export/route/app-paths-manifest.json +3 -0
  189. package/.next/server/app/api/doc-editor/export/route/build-manifest.json +9 -0
  190. package/.next/server/app/api/doc-editor/export/route/server-reference-manifest.json +4 -0
  191. package/.next/server/app/api/doc-editor/export/route.js +11 -0
  192. package/.next/server/app/api/doc-editor/export/route.js.nft.json +1 -0
  193. package/.next/server/app/api/doc-editor/export/route_client-reference-manifest.js +3 -0
  194. package/.next/server/app/api/doc-editor/extract-text/route/app-paths-manifest.json +3 -0
  195. package/.next/server/app/api/doc-editor/extract-text/route/build-manifest.json +9 -0
  196. package/.next/server/app/api/doc-editor/extract-text/route/server-reference-manifest.json +4 -0
  197. package/.next/server/app/api/doc-editor/extract-text/route.js +11 -0
  198. package/.next/server/app/api/doc-editor/extract-text/route.js.nft.json +1 -0
  199. package/.next/server/app/api/doc-editor/extract-text/route_client-reference-manifest.js +3 -0
  200. package/.next/server/app/api/doc-editor/parse/route/app-paths-manifest.json +3 -0
  201. package/.next/server/app/api/doc-editor/parse/route/build-manifest.json +9 -0
  202. package/.next/server/app/api/doc-editor/parse/route/server-reference-manifest.json +4 -0
  203. package/.next/server/app/api/doc-editor/parse/route.js +12 -0
  204. package/.next/server/app/api/doc-editor/parse/route.js.nft.json +1 -0
  205. package/.next/server/app/api/doc-editor/parse/route_client-reference-manifest.js +3 -0
  206. package/.next/server/app/api/doc-editor/restore/route/app-paths-manifest.json +3 -0
  207. package/.next/server/app/api/doc-editor/restore/route/build-manifest.json +9 -0
  208. package/.next/server/app/api/doc-editor/restore/route/server-reference-manifest.json +4 -0
  209. package/.next/server/app/api/doc-editor/restore/route.js +11 -0
  210. package/.next/server/app/api/doc-editor/restore/route.js.nft.json +1 -0
  211. package/.next/server/app/api/doc-editor/restore/route_client-reference-manifest.js +3 -0
  212. package/.next/server/app/api/document/sign/route/app-paths-manifest.json +3 -0
  213. package/.next/server/app/api/document/sign/route/build-manifest.json +9 -0
  214. package/.next/server/app/api/document/sign/route/server-reference-manifest.json +4 -0
  215. package/.next/server/app/api/document/sign/route.js +12 -0
  216. package/.next/server/app/api/document/sign/route.js.nft.json +1 -0
  217. package/.next/server/app/api/document/sign/route_client-reference-manifest.js +3 -0
  218. package/.next/server/app/api/documents/route/app-paths-manifest.json +3 -0
  219. package/.next/server/app/api/documents/route/build-manifest.json +9 -0
  220. package/.next/server/app/api/documents/route/server-reference-manifest.json +4 -0
  221. package/.next/server/app/api/documents/route.js +8 -0
  222. package/.next/server/app/api/documents/route.js.nft.json +1 -0
  223. package/.next/server/app/api/documents/route_client-reference-manifest.js +3 -0
  224. package/.next/server/app/api/firecrawl/local/route/app-paths-manifest.json +3 -0
  225. package/.next/server/app/api/firecrawl/local/route/build-manifest.json +9 -0
  226. package/.next/server/app/api/firecrawl/local/route/server-reference-manifest.json +4 -0
  227. package/.next/server/app/api/firecrawl/local/route.js +8 -0
  228. package/.next/server/app/api/firecrawl/local/route.js.nft.json +1 -0
  229. package/.next/server/app/api/firecrawl/local/route_client-reference-manifest.js +3 -0
  230. package/.next/server/app/api/index/route/app-paths-manifest.json +3 -0
  231. package/.next/server/app/api/index/route/build-manifest.json +9 -0
  232. package/.next/server/app/api/index/route/server-reference-manifest.json +4 -0
  233. package/.next/server/app/api/index/route.js +14 -0
  234. package/.next/server/app/api/index/route.js.nft.json +1 -0
  235. package/.next/server/app/api/index/route_client-reference-manifest.js +3 -0
  236. package/.next/server/app/api/integrations/notion/callback/route/app-paths-manifest.json +3 -0
  237. package/.next/server/app/api/integrations/notion/callback/route/build-manifest.json +9 -0
  238. package/.next/server/app/api/integrations/notion/callback/route/server-reference-manifest.json +4 -0
  239. package/.next/server/app/api/integrations/notion/callback/route.js +8 -0
  240. package/.next/server/app/api/integrations/notion/callback/route.js.nft.json +1 -0
  241. package/.next/server/app/api/integrations/notion/callback/route_client-reference-manifest.js +3 -0
  242. package/.next/server/app/api/integrations/notion/route/app-paths-manifest.json +3 -0
  243. package/.next/server/app/api/integrations/notion/route/build-manifest.json +9 -0
  244. package/.next/server/app/api/integrations/notion/route/server-reference-manifest.json +4 -0
  245. package/.next/server/app/api/integrations/notion/route.js +8 -0
  246. package/.next/server/app/api/integrations/notion/route.js.nft.json +1 -0
  247. package/.next/server/app/api/integrations/notion/route_client-reference-manifest.js +3 -0
  248. package/.next/server/app/api/jobs/[id]/route/app-paths-manifest.json +3 -0
  249. package/.next/server/app/api/jobs/[id]/route/build-manifest.json +9 -0
  250. package/.next/server/app/api/jobs/[id]/route/server-reference-manifest.json +4 -0
  251. package/.next/server/app/api/jobs/[id]/route.js +8 -0
  252. package/.next/server/app/api/jobs/[id]/route.js.nft.json +1 -0
  253. package/.next/server/app/api/jobs/[id]/route_client-reference-manifest.js +3 -0
  254. package/.next/server/app/api/jobs/route/app-paths-manifest.json +3 -0
  255. package/.next/server/app/api/jobs/route/build-manifest.json +9 -0
  256. package/.next/server/app/api/jobs/route/server-reference-manifest.json +4 -0
  257. package/.next/server/app/api/jobs/route.js +8 -0
  258. package/.next/server/app/api/jobs/route.js.nft.json +1 -0
  259. package/.next/server/app/api/jobs/route_client-reference-manifest.js +3 -0
  260. package/.next/server/app/api/marketplace/[toolId]/route/app-paths-manifest.json +3 -0
  261. package/.next/server/app/api/marketplace/[toolId]/route/build-manifest.json +9 -0
  262. package/.next/server/app/api/marketplace/[toolId]/route/server-reference-manifest.json +4 -0
  263. package/.next/server/app/api/marketplace/[toolId]/route.js +9 -0
  264. package/.next/server/app/api/marketplace/[toolId]/route.js.nft.json +1 -0
  265. package/.next/server/app/api/marketplace/[toolId]/route_client-reference-manifest.js +3 -0
  266. package/.next/server/app/api/marketplace/route/app-paths-manifest.json +3 -0
  267. package/.next/server/app/api/marketplace/route/build-manifest.json +9 -0
  268. package/.next/server/app/api/marketplace/route/server-reference-manifest.json +4 -0
  269. package/.next/server/app/api/marketplace/route.js +9 -0
  270. package/.next/server/app/api/marketplace/route.js.nft.json +1 -0
  271. package/.next/server/app/api/marketplace/route_client-reference-manifest.js +3 -0
  272. package/.next/server/app/api/media/[id]/route/app-paths-manifest.json +3 -0
  273. package/.next/server/app/api/media/[id]/route/build-manifest.json +9 -0
  274. package/.next/server/app/api/media/[id]/route/server-reference-manifest.json +4 -0
  275. package/.next/server/app/api/media/[id]/route.js +8 -0
  276. package/.next/server/app/api/media/[id]/route.js.nft.json +1 -0
  277. package/.next/server/app/api/media/[id]/route_client-reference-manifest.js +3 -0
  278. package/.next/server/app/api/media/process/route/app-paths-manifest.json +3 -0
  279. package/.next/server/app/api/media/process/route/build-manifest.json +9 -0
  280. package/.next/server/app/api/media/process/route/server-reference-manifest.json +4 -0
  281. package/.next/server/app/api/media/process/route.js +17 -0
  282. package/.next/server/app/api/media/process/route.js.nft.json +1 -0
  283. package/.next/server/app/api/media/process/route_client-reference-manifest.js +3 -0
  284. package/.next/server/app/api/media/route/app-paths-manifest.json +3 -0
  285. package/.next/server/app/api/media/route/build-manifest.json +9 -0
  286. package/.next/server/app/api/media/route/server-reference-manifest.json +4 -0
  287. package/.next/server/app/api/media/route.js +9 -0
  288. package/.next/server/app/api/media/route.js.nft.json +1 -0
  289. package/.next/server/app/api/media/route_client-reference-manifest.js +3 -0
  290. package/.next/server/app/api/media/stream/route/app-paths-manifest.json +3 -0
  291. package/.next/server/app/api/media/stream/route/build-manifest.json +9 -0
  292. package/.next/server/app/api/media/stream/route/server-reference-manifest.json +4 -0
  293. package/.next/server/app/api/media/stream/route.js +7 -0
  294. package/.next/server/app/api/media/stream/route.js.nft.json +1 -0
  295. package/.next/server/app/api/media/stream/route_client-reference-manifest.js +3 -0
  296. package/.next/server/app/api/models/route/app-paths-manifest.json +3 -0
  297. package/.next/server/app/api/models/route/build-manifest.json +9 -0
  298. package/.next/server/app/api/models/route/server-reference-manifest.json +4 -0
  299. package/.next/server/app/api/models/route.js +9 -0
  300. package/.next/server/app/api/models/route.js.nft.json +1 -0
  301. package/.next/server/app/api/models/route_client-reference-manifest.js +3 -0
  302. package/.next/server/app/api/parse-file/route/app-paths-manifest.json +3 -0
  303. package/.next/server/app/api/parse-file/route/build-manifest.json +9 -0
  304. package/.next/server/app/api/parse-file/route/server-reference-manifest.json +4 -0
  305. package/.next/server/app/api/parse-file/route.js +11 -0
  306. package/.next/server/app/api/parse-file/route.js.nft.json +1 -0
  307. package/.next/server/app/api/parse-file/route_client-reference-manifest.js +3 -0
  308. package/.next/server/app/api/proxy/verify/route/app-paths-manifest.json +3 -0
  309. package/.next/server/app/api/proxy/verify/route/build-manifest.json +9 -0
  310. package/.next/server/app/api/proxy/verify/route/server-reference-manifest.json +4 -0
  311. package/.next/server/app/api/proxy/verify/route.js +8 -0
  312. package/.next/server/app/api/proxy/verify/route.js.nft.json +1 -0
  313. package/.next/server/app/api/proxy/verify/route_client-reference-manifest.js +3 -0
  314. package/.next/server/app/api/sandbox/route/app-paths-manifest.json +3 -0
  315. package/.next/server/app/api/sandbox/route/build-manifest.json +9 -0
  316. package/.next/server/app/api/sandbox/route/server-reference-manifest.json +4 -0
  317. package/.next/server/app/api/sandbox/route.js +8 -0
  318. package/.next/server/app/api/sandbox/route.js.nft.json +1 -0
  319. package/.next/server/app/api/sandbox/route_client-reference-manifest.js +3 -0
  320. package/.next/server/app/api/search/bing/route/app-paths-manifest.json +3 -0
  321. package/.next/server/app/api/search/bing/route/build-manifest.json +9 -0
  322. package/.next/server/app/api/search/bing/route/server-reference-manifest.json +4 -0
  323. package/.next/server/app/api/search/bing/route.js +8 -0
  324. package/.next/server/app/api/search/bing/route.js.nft.json +1 -0
  325. package/.next/server/app/api/search/bing/route_client-reference-manifest.js +3 -0
  326. package/.next/server/app/api/search/brave/route/app-paths-manifest.json +3 -0
  327. package/.next/server/app/api/search/brave/route/build-manifest.json +9 -0
  328. package/.next/server/app/api/search/brave/route/server-reference-manifest.json +4 -0
  329. package/.next/server/app/api/search/brave/route.js +8 -0
  330. package/.next/server/app/api/search/brave/route.js.nft.json +1 -0
  331. package/.next/server/app/api/search/brave/route_client-reference-manifest.js +3 -0
  332. package/.next/server/app/api/search/exa/route/app-paths-manifest.json +3 -0
  333. package/.next/server/app/api/search/exa/route/build-manifest.json +9 -0
  334. package/.next/server/app/api/search/exa/route/server-reference-manifest.json +4 -0
  335. package/.next/server/app/api/search/exa/route.js +8 -0
  336. package/.next/server/app/api/search/exa/route.js.nft.json +1 -0
  337. package/.next/server/app/api/search/exa/route_client-reference-manifest.js +3 -0
  338. package/.next/server/app/api/search/google/route/app-paths-manifest.json +3 -0
  339. package/.next/server/app/api/search/google/route/build-manifest.json +9 -0
  340. package/.next/server/app/api/search/google/route/server-reference-manifest.json +4 -0
  341. package/.next/server/app/api/search/google/route.js +8 -0
  342. package/.next/server/app/api/search/google/route.js.nft.json +1 -0
  343. package/.next/server/app/api/search/google/route_client-reference-manifest.js +3 -0
  344. package/.next/server/app/api/search/route/app-paths-manifest.json +3 -0
  345. package/.next/server/app/api/search/route/build-manifest.json +9 -0
  346. package/.next/server/app/api/search/route/server-reference-manifest.json +4 -0
  347. package/.next/server/app/api/search/route.js +8 -0
  348. package/.next/server/app/api/search/route.js.nft.json +1 -0
  349. package/.next/server/app/api/search/route_client-reference-manifest.js +3 -0
  350. package/.next/server/app/api/search/tavily/route/app-paths-manifest.json +3 -0
  351. package/.next/server/app/api/search/tavily/route/build-manifest.json +9 -0
  352. package/.next/server/app/api/search/tavily/route/server-reference-manifest.json +4 -0
  353. package/.next/server/app/api/search/tavily/route.js +8 -0
  354. package/.next/server/app/api/search/tavily/route.js.nft.json +1 -0
  355. package/.next/server/app/api/search/tavily/route_client-reference-manifest.js +3 -0
  356. package/.next/server/app/api/search/verify/route/app-paths-manifest.json +3 -0
  357. package/.next/server/app/api/search/verify/route/build-manifest.json +9 -0
  358. package/.next/server/app/api/search/verify/route/server-reference-manifest.json +4 -0
  359. package/.next/server/app/api/search/verify/route.js +8 -0
  360. package/.next/server/app/api/search/verify/route.js.nft.json +1 -0
  361. package/.next/server/app/api/search/verify/route_client-reference-manifest.js +3 -0
  362. package/.next/server/app/api/server/agent/route/app-paths-manifest.json +3 -0
  363. package/.next/server/app/api/server/agent/route/build-manifest.json +9 -0
  364. package/.next/server/app/api/server/agent/route/server-reference-manifest.json +4 -0
  365. package/.next/server/app/api/server/agent/route.js +10 -0
  366. package/.next/server/app/api/server/agent/route.js.nft.json +1 -0
  367. package/.next/server/app/api/server/agent/route_client-reference-manifest.js +3 -0
  368. package/.next/server/app/api/server/download/route/app-paths-manifest.json +3 -0
  369. package/.next/server/app/api/server/download/route/build-manifest.json +9 -0
  370. package/.next/server/app/api/server/download/route/server-reference-manifest.json +4 -0
  371. package/.next/server/app/api/server/download/route.js +9 -0
  372. package/.next/server/app/api/server/download/route.js.nft.json +1 -0
  373. package/.next/server/app/api/server/download/route_client-reference-manifest.js +3 -0
  374. package/.next/server/app/api/server/generate/route/app-paths-manifest.json +3 -0
  375. package/.next/server/app/api/server/generate/route/build-manifest.json +9 -0
  376. package/.next/server/app/api/server/generate/route/server-reference-manifest.json +4 -0
  377. package/.next/server/app/api/server/generate/route.js +10 -0
  378. package/.next/server/app/api/server/generate/route.js.nft.json +1 -0
  379. package/.next/server/app/api/server/generate/route_client-reference-manifest.js +3 -0
  380. package/.next/server/app/api/server/local/route/app-paths-manifest.json +3 -0
  381. package/.next/server/app/api/server/local/route/build-manifest.json +9 -0
  382. package/.next/server/app/api/server/local/route/server-reference-manifest.json +4 -0
  383. package/.next/server/app/api/server/local/route.js +10 -0
  384. package/.next/server/app/api/server/local/route.js.nft.json +1 -0
  385. package/.next/server/app/api/server/local/route_client-reference-manifest.js +3 -0
  386. package/.next/server/app/api/servers/route/app-paths-manifest.json +3 -0
  387. package/.next/server/app/api/servers/route/build-manifest.json +9 -0
  388. package/.next/server/app/api/servers/route/server-reference-manifest.json +4 -0
  389. package/.next/server/app/api/servers/route.js +10 -0
  390. package/.next/server/app/api/servers/route.js.nft.json +1 -0
  391. package/.next/server/app/api/servers/route_client-reference-manifest.js +3 -0
  392. package/.next/server/app/api/tabular/query/route/app-paths-manifest.json +3 -0
  393. package/.next/server/app/api/tabular/query/route/build-manifest.json +9 -0
  394. package/.next/server/app/api/tabular/query/route/server-reference-manifest.json +4 -0
  395. package/.next/server/app/api/tabular/query/route.js +8 -0
  396. package/.next/server/app/api/tabular/query/route.js.nft.json +1 -0
  397. package/.next/server/app/api/tabular/query/route_client-reference-manifest.js +3 -0
  398. package/.next/server/app/api/tabular/route/app-paths-manifest.json +3 -0
  399. package/.next/server/app/api/tabular/route/build-manifest.json +9 -0
  400. package/.next/server/app/api/tabular/route/server-reference-manifest.json +4 -0
  401. package/.next/server/app/api/tabular/route.js +8 -0
  402. package/.next/server/app/api/tabular/route.js.nft.json +1 -0
  403. package/.next/server/app/api/tabular/route_client-reference-manifest.js +3 -0
  404. package/.next/server/app/api/upload-file/route/app-paths-manifest.json +3 -0
  405. package/.next/server/app/api/upload-file/route/build-manifest.json +9 -0
  406. package/.next/server/app/api/upload-file/route/server-reference-manifest.json +4 -0
  407. package/.next/server/app/api/upload-file/route.js +8 -0
  408. package/.next/server/app/api/upload-file/route.js.nft.json +1 -0
  409. package/.next/server/app/api/upload-file/route_client-reference-manifest.js +3 -0
  410. package/.next/server/app/api/uploads/[...slug]/route/app-paths-manifest.json +3 -0
  411. package/.next/server/app/api/uploads/[...slug]/route/build-manifest.json +9 -0
  412. package/.next/server/app/api/uploads/[...slug]/route/server-reference-manifest.json +4 -0
  413. package/.next/server/app/api/uploads/[...slug]/route.js +8 -0
  414. package/.next/server/app/api/uploads/[...slug]/route.js.nft.json +1 -0
  415. package/.next/server/app/api/uploads/[...slug]/route_client-reference-manifest.js +3 -0
  416. package/.next/server/app/api/vector-stores/install/route/app-paths-manifest.json +3 -0
  417. package/.next/server/app/api/vector-stores/install/route/build-manifest.json +9 -0
  418. package/.next/server/app/api/vector-stores/install/route/server-reference-manifest.json +4 -0
  419. package/.next/server/app/api/vector-stores/install/route.js +8 -0
  420. package/.next/server/app/api/vector-stores/install/route.js.nft.json +1 -0
  421. package/.next/server/app/api/vector-stores/install/route_client-reference-manifest.js +3 -0
  422. package/.next/server/app/api/vector-stores/status/route/app-paths-manifest.json +3 -0
  423. package/.next/server/app/api/vector-stores/status/route/build-manifest.json +9 -0
  424. package/.next/server/app/api/vector-stores/status/route/server-reference-manifest.json +4 -0
  425. package/.next/server/app/api/vector-stores/status/route.js +8 -0
  426. package/.next/server/app/api/vector-stores/status/route.js.nft.json +1 -0
  427. package/.next/server/app/api/vector-stores/status/route_client-reference-manifest.js +3 -0
  428. package/.next/server/app/chat/page/app-paths-manifest.json +3 -0
  429. package/.next/server/app/chat/page/build-manifest.json +18 -0
  430. package/.next/server/app/chat/page/next-font-manifest.json +11 -0
  431. package/.next/server/app/chat/page/react-loadable-manifest.json +1 -0
  432. package/.next/server/app/chat/page/server-reference-manifest.json +4 -0
  433. package/.next/server/app/chat/page.js +15 -0
  434. package/.next/server/app/chat/page.js.nft.json +1 -0
  435. package/.next/server/app/chat/page_client-reference-manifest.js +3 -0
  436. package/.next/server/app/chat.html +1 -0
  437. package/.next/server/app/chat.meta +15 -0
  438. package/.next/server/app/chat.rsc +29 -0
  439. package/.next/server/app/chat.segments/_full.segment.rsc +29 -0
  440. package/.next/server/app/chat.segments/_head.segment.rsc +6 -0
  441. package/.next/server/app/chat.segments/_index.segment.rsc +14 -0
  442. package/.next/server/app/chat.segments/_tree.segment.rsc +5 -0
  443. package/.next/server/app/chat.segments/chat/__PAGE__.segment.rsc +6 -0
  444. package/.next/server/app/chat.segments/chat.segment.rsc +5 -0
  445. package/.next/server/app/data/page/app-paths-manifest.json +3 -0
  446. package/.next/server/app/data/page/build-manifest.json +18 -0
  447. package/.next/server/app/data/page/next-font-manifest.json +11 -0
  448. package/.next/server/app/data/page/react-loadable-manifest.json +1 -0
  449. package/.next/server/app/data/page/server-reference-manifest.json +4 -0
  450. package/.next/server/app/data/page.js +15 -0
  451. package/.next/server/app/data/page.js.nft.json +1 -0
  452. package/.next/server/app/data/page_client-reference-manifest.js +3 -0
  453. package/.next/server/app/data.html +1 -0
  454. package/.next/server/app/data.meta +15 -0
  455. package/.next/server/app/data.rsc +32 -0
  456. package/.next/server/app/data.segments/_full.segment.rsc +32 -0
  457. package/.next/server/app/data.segments/_head.segment.rsc +6 -0
  458. package/.next/server/app/data.segments/_index.segment.rsc +14 -0
  459. package/.next/server/app/data.segments/_tree.segment.rsc +5 -0
  460. package/.next/server/app/data.segments/data/__PAGE__.segment.rsc +6 -0
  461. package/.next/server/app/data.segments/data.segment.rsc +5 -0
  462. package/.next/server/app/favicon.ico/route/app-paths-manifest.json +3 -0
  463. package/.next/server/app/favicon.ico/route/build-manifest.json +9 -0
  464. package/.next/server/app/favicon.ico/route.js +8 -0
  465. package/.next/server/app/favicon.ico/route.js.nft.json +1 -0
  466. package/.next/server/app/favicon.ico.body +0 -0
  467. package/.next/server/app/favicon.ico.meta +1 -0
  468. package/.next/server/app/index.html +1 -0
  469. package/.next/server/app/index.meta +14 -0
  470. package/.next/server/app/index.rsc +26 -0
  471. package/.next/server/app/index.segments/__PAGE__.segment.rsc +6 -0
  472. package/.next/server/app/index.segments/_full.segment.rsc +26 -0
  473. package/.next/server/app/index.segments/_head.segment.rsc +6 -0
  474. package/.next/server/app/index.segments/_index.segment.rsc +14 -0
  475. package/.next/server/app/index.segments/_tree.segment.rsc +5 -0
  476. package/.next/server/app/page/app-paths-manifest.json +3 -0
  477. package/.next/server/app/page/build-manifest.json +18 -0
  478. package/.next/server/app/page/next-font-manifest.json +11 -0
  479. package/.next/server/app/page/react-loadable-manifest.json +1 -0
  480. package/.next/server/app/page/server-reference-manifest.json +4 -0
  481. package/.next/server/app/page.js +16 -0
  482. package/.next/server/app/page.js.nft.json +1 -0
  483. package/.next/server/app/page_client-reference-manifest.js +3 -0
  484. package/.next/server/app/settings/page/app-paths-manifest.json +3 -0
  485. package/.next/server/app/settings/page/build-manifest.json +18 -0
  486. package/.next/server/app/settings/page/next-font-manifest.json +11 -0
  487. package/.next/server/app/settings/page/react-loadable-manifest.json +1 -0
  488. package/.next/server/app/settings/page/server-reference-manifest.json +41 -0
  489. package/.next/server/app/settings/page.js +16 -0
  490. package/.next/server/app/settings/page.js.nft.json +1 -0
  491. package/.next/server/app/settings/page_client-reference-manifest.js +3 -0
  492. package/.next/server/app/settings.html +1 -0
  493. package/.next/server/app/settings.meta +15 -0
  494. package/.next/server/app/settings.rsc +31 -0
  495. package/.next/server/app/settings.segments/_full.segment.rsc +31 -0
  496. package/.next/server/app/settings.segments/_head.segment.rsc +6 -0
  497. package/.next/server/app/settings.segments/_index.segment.rsc +14 -0
  498. package/.next/server/app/settings.segments/_tree.segment.rsc +5 -0
  499. package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +9 -0
  500. package/.next/server/app/settings.segments/settings.segment.rsc +5 -0
  501. package/.next/server/app-paths-manifest.json +69 -0
  502. package/.next/server/chunks/00i._ai_dist_index_mjs_0u4.k1t._.js +34 -0
  503. package/.next/server/chunks/02dz_web__next-internal_server_app_api_config_test-embedding_route_actions_09--owe.js +3 -0
  504. package/.next/server/chunks/02dz_web__next-internal_server_app_api_config_test-provider_route_actions_0l6xr0t.js +3 -0
  505. package/.next/server/chunks/02dz_web__next-internal_server_app_api_deploy_cloud-project_route_actions_0pghds2.js +3 -0
  506. package/.next/server/chunks/02dz_web__next-internal_server_app_api_deployment_blob-setup_route_actions_0f55gkq.js +3 -0
  507. package/.next/server/chunks/02dz_web__next-internal_server_app_api_doc-editor_extract-text_route_actions_0dzj6iq.js +3 -0
  508. package/.next/server/chunks/02dz_web__next-internal_server_app_api_marketplace_[toolId]_route_actions_0cxbtrw.js +3 -0
  509. package/.next/server/chunks/02dz_web__next-internal_server_app_api_vector-stores_install_route_actions_0_220fs.js +3 -0
  510. package/.next/server/chunks/02dz_web__next-internal_server_app_api_vector-stores_status_route_actions_0~_~b02.js +3 -0
  511. package/.next/server/chunks/0gvc_next_03p7xh-._.js +13 -0
  512. package/.next/server/chunks/0gvc_next_dist_esm_build_templates_app-route_0--xko7.js +24 -0
  513. package/.next/server/chunks/0gvc_next_dist_esm_build_templates_app-route_0.07y39.js +3 -0
  514. package/.next/server/chunks/0gvc_next_dist_esm_build_templates_app-route_04i84m2.js +10 -0
  515. package/.next/server/chunks/0gvc_next_dist_esm_build_templates_app-route_05yqn19.js +3 -0
  516. package/.next/server/chunks/0gvc_next_dist_esm_build_templates_app-route_0_c4eox.js +3 -0
  517. package/.next/server/chunks/0m6-_@ai-sdk_anthropic_dist_index_093y5mm.js +10 -0
  518. package/.next/server/chunks/0nf3_next-internal_server_app_api_integrations_notion_callback_route_actions_0hyfnmw.js +3 -0
  519. package/.next/server/chunks/0ntz_@ai-sdk_openai_dist_index_mjs_03ljy2u._.js +13 -0
  520. package/.next/server/chunks/0ozc_@vercel_oidc_dist_token_0m1934l.js +3 -0
  521. package/.next/server/chunks/0rgj_zod_v4_0ponial._.js +64 -0
  522. package/.next/server/chunks/0rgj_zod_v4_0zoqna9._.js +64 -0
  523. package/.next/server/chunks/[externals]__01hpkma._.js +3 -0
  524. package/.next/server/chunks/[externals]__01tm01i._.js +3 -0
  525. package/.next/server/chunks/[externals]_chromadb_0goja~y._.js +3 -0
  526. package/.next/server/chunks/[externals]_fs_0eo4gmu._.js +3 -0
  527. package/.next/server/chunks/[externals]_path_0.09pfe._.js +3 -0
  528. package/.next/server/chunks/[externals]_stream_0g9s3ok._.js +3 -0
  529. package/.next/server/chunks/[root-of-the-server]__0--6uey._.js +3 -0
  530. package/.next/server/chunks/[root-of-the-server]__0.qd1p3._.js +3 -0
  531. package/.next/server/chunks/[root-of-the-server]__0.r5yhr._.js +49 -0
  532. package/.next/server/chunks/[root-of-the-server]__0036943._.js +199 -0
  533. package/.next/server/chunks/[root-of-the-server]__00a7cyb._.js +3 -0
  534. package/.next/server/chunks/[root-of-the-server]__00nqa2u._.js +59 -0
  535. package/.next/server/chunks/[root-of-the-server]__0111be7._.js +3 -0
  536. package/.next/server/chunks/[root-of-the-server]__02c_z~9._.js +3 -0
  537. package/.next/server/chunks/[root-of-the-server]__02cpmox._.js +105 -0
  538. package/.next/server/chunks/[root-of-the-server]__02p-tv7._.js +105 -0
  539. package/.next/server/chunks/[root-of-the-server]__02p34d7._.js +3 -0
  540. package/.next/server/chunks/[root-of-the-server]__02t_0g7._.js +59 -0
  541. package/.next/server/chunks/[root-of-the-server]__03-x3no._.js +3 -0
  542. package/.next/server/chunks/[root-of-the-server]__03l~uw5._.js +143 -0
  543. package/.next/server/chunks/[root-of-the-server]__044l2_f._.js +143 -0
  544. package/.next/server/chunks/[root-of-the-server]__04kopvt._.js +63 -0
  545. package/.next/server/chunks/[root-of-the-server]__04l~ip-._.js +59 -0
  546. package/.next/server/chunks/[root-of-the-server]__04visk8._.js +105 -0
  547. package/.next/server/chunks/[root-of-the-server]__05wk..v._.js +3 -0
  548. package/.next/server/chunks/[root-of-the-server]__05x8tmf._.js +59 -0
  549. package/.next/server/chunks/[root-of-the-server]__06l96vc._.js +59 -0
  550. package/.next/server/chunks/[root-of-the-server]__06ohoeu._.js +59 -0
  551. package/.next/server/chunks/[root-of-the-server]__072q335._.js +3 -0
  552. package/.next/server/chunks/[root-of-the-server]__07_1411._.js +59 -0
  553. package/.next/server/chunks/[root-of-the-server]__09kos0n._.js +3 -0
  554. package/.next/server/chunks/[root-of-the-server]__09oyip3._.js +3 -0
  555. package/.next/server/chunks/[root-of-the-server]__09rsmk2._.js +3 -0
  556. package/.next/server/chunks/[root-of-the-server]__0_by00t._.js +11 -0
  557. package/.next/server/chunks/[root-of-the-server]__0a9jp5~._.js +3 -0
  558. package/.next/server/chunks/[root-of-the-server]__0acpo9m._.js +59 -0
  559. package/.next/server/chunks/[root-of-the-server]__0b17yoc._.js +3 -0
  560. package/.next/server/chunks/[root-of-the-server]__0cumfx6._.js +9 -0
  561. package/.next/server/chunks/[root-of-the-server]__0d7p0xo._.js +3 -0
  562. package/.next/server/chunks/[root-of-the-server]__0e_itje._.js +3 -0
  563. package/.next/server/chunks/[root-of-the-server]__0exyn0q._.js +88 -0
  564. package/.next/server/chunks/[root-of-the-server]__0fcf_rl._.js +59 -0
  565. package/.next/server/chunks/[root-of-the-server]__0f~eq1-._.js +59 -0
  566. package/.next/server/chunks/[root-of-the-server]__0g36cgg._.js +143 -0
  567. package/.next/server/chunks/[root-of-the-server]__0g4hq1o._.js +3 -0
  568. package/.next/server/chunks/[root-of-the-server]__0i9fj76._.js +3 -0
  569. package/.next/server/chunks/[root-of-the-server]__0lczaer._.js +143 -0
  570. package/.next/server/chunks/[root-of-the-server]__0ljy49-._.js +59 -0
  571. package/.next/server/chunks/[root-of-the-server]__0lk5hkk._.js +3 -0
  572. package/.next/server/chunks/[root-of-the-server]__0n0nerw._.js +59 -0
  573. package/.next/server/chunks/[root-of-the-server]__0np09bv._.js +3 -0
  574. package/.next/server/chunks/[root-of-the-server]__0ns~dg6._.js +3 -0
  575. package/.next/server/chunks/[root-of-the-server]__0oh5wgp._.js +59 -0
  576. package/.next/server/chunks/[root-of-the-server]__0oyc7s4._.js +105 -0
  577. package/.next/server/chunks/[root-of-the-server]__0pg~eys._.js +59 -0
  578. package/.next/server/chunks/[root-of-the-server]__0qhpl6k._.js +3 -0
  579. package/.next/server/chunks/[root-of-the-server]__0qhwzn-._.js +21 -0
  580. package/.next/server/chunks/[root-of-the-server]__0qs73xp._.js +143 -0
  581. package/.next/server/chunks/[root-of-the-server]__0qtx78g._.js +59 -0
  582. package/.next/server/chunks/[root-of-the-server]__0r03jcl._.js +59 -0
  583. package/.next/server/chunks/[root-of-the-server]__0rdjqpy._.js +3 -0
  584. package/.next/server/chunks/[root-of-the-server]__0sb7d93._.js +59 -0
  585. package/.next/server/chunks/[root-of-the-server]__0t36t5o._.js +60 -0
  586. package/.next/server/chunks/[root-of-the-server]__0t_hp52._.js +59 -0
  587. package/.next/server/chunks/[root-of-the-server]__0udlgj6._.js +3 -0
  588. package/.next/server/chunks/[root-of-the-server]__0ufk3d0._.js +3 -0
  589. package/.next/server/chunks/[root-of-the-server]__0uu6oan._.js +3 -0
  590. package/.next/server/chunks/[root-of-the-server]__0v.0gyp._.js +3 -0
  591. package/.next/server/chunks/[root-of-the-server]__0v03x56._.js +59 -0
  592. package/.next/server/chunks/[root-of-the-server]__0v4bbce._.js +59 -0
  593. package/.next/server/chunks/[root-of-the-server]__0v67rlo._.js +3 -0
  594. package/.next/server/chunks/[root-of-the-server]__0vcdpoc._.js +59 -0
  595. package/.next/server/chunks/[root-of-the-server]__0veqa4o._.js +3 -0
  596. package/.next/server/chunks/[root-of-the-server]__0wvxpqf._.js +59 -0
  597. package/.next/server/chunks/[root-of-the-server]__0wyl7x5._.js +59 -0
  598. package/.next/server/chunks/[root-of-the-server]__0y5y7tu._.js +3 -0
  599. package/.next/server/chunks/[root-of-the-server]__0yo._sm._.js +3 -0
  600. package/.next/server/chunks/[root-of-the-server]__0yx8vxp._.js +59 -0
  601. package/.next/server/chunks/[root-of-the-server]__0zh8t6z._.js +59 -0
  602. package/.next/server/chunks/[root-of-the-server]__0~q2fro._.js +59 -0
  603. package/.next/server/chunks/[root-of-the-server]__0~wsw0_._.js +3 -0
  604. package/.next/server/chunks/[root-of-the-server]__100gqj0._.js +143 -0
  605. package/.next/server/chunks/[root-of-the-server]__10au-r5._.js +13 -0
  606. package/.next/server/chunks/[root-of-the-server]__10d58x4._.js +59 -0
  607. package/.next/server/chunks/[root-of-the-server]__10zm06g._.js +143 -0
  608. package/.next/server/chunks/[root-of-the-server]__12kvuvp._.js +59 -0
  609. package/.next/server/chunks/[root-of-the-server]__13gq0t2._.js +3 -0
  610. package/.next/server/chunks/[turbopack]_runtime.js +903 -0
  611. package/.next/server/chunks/_01kokno._.js +3 -0
  612. package/.next/server/chunks/_059f-.0._.js +258 -0
  613. package/.next/server/chunks/_071mhy1._.js +32 -0
  614. package/.next/server/chunks/apps_web__next-internal_server_app_api_analytics_route_actions_0.uxcnt.js +3 -0
  615. package/.next/server/chunks/apps_web__next-internal_server_app_api_chat_route_actions_0q6zwqv.js +3 -0
  616. package/.next/server/chunks/apps_web__next-internal_server_app_api_chat_status_route_actions_0t_21~v.js +3 -0
  617. package/.next/server/chunks/apps_web__next-internal_server_app_api_chat_suggestions_route_actions_01umx_-.js +3 -0
  618. package/.next/server/chunks/apps_web__next-internal_server_app_api_config_route_actions_0-4ivvk.js +3 -0
  619. package/.next/server/chunks/apps_web__next-internal_server_app_api_config_test-llm_route_actions_0z5ew-0.js +3 -0
  620. package/.next/server/chunks/apps_web__next-internal_server_app_api_config_test_route_actions_08cur6r.js +3 -0
  621. package/.next/server/chunks/apps_web__next-internal_server_app_api_config_verify_route_actions_0hid6b..js +3 -0
  622. package/.next/server/chunks/apps_web__next-internal_server_app_api_connections_route_actions_0q3wdg3.js +3 -0
  623. package/.next/server/chunks/apps_web__next-internal_server_app_api_connections_webhook_route_actions_0wa28~b.js +3 -0
  624. package/.next/server/chunks/apps_web__next-internal_server_app_api_demo_route_actions_05lntn3.js +3 -0
  625. package/.next/server/chunks/apps_web__next-internal_server_app_api_deploy_ssh_route_actions_0r44rn0.js +3 -0
  626. package/.next/server/chunks/apps_web__next-internal_server_app_api_deployment_config_route_actions_0bkon.m.js +3 -0
  627. package/.next/server/chunks/apps_web__next-internal_server_app_api_describe-image_route_actions_0pmvs8v.js +3 -0
  628. package/.next/server/chunks/apps_web__next-internal_server_app_api_doc-editor_edit_route_actions_10hrovj.js +3 -0
  629. package/.next/server/chunks/apps_web__next-internal_server_app_api_doc-editor_export_route_actions_0rff01q.js +3 -0
  630. package/.next/server/chunks/apps_web__next-internal_server_app_api_doc-editor_parse_route_actions_0fkx6xw.js +3 -0
  631. package/.next/server/chunks/apps_web__next-internal_server_app_api_doc-editor_restore_route_actions_0g9uodw.js +3 -0
  632. package/.next/server/chunks/apps_web__next-internal_server_app_api_document_sign_route_actions_0_6rnl_.js +3 -0
  633. package/.next/server/chunks/apps_web__next-internal_server_app_api_documents_route_actions_0l2znaz.js +3 -0
  634. package/.next/server/chunks/apps_web__next-internal_server_app_api_firecrawl_local_route_actions_0ubjaim.js +3 -0
  635. package/.next/server/chunks/apps_web__next-internal_server_app_api_index_route_actions_0~2989e.js +3 -0
  636. package/.next/server/chunks/apps_web__next-internal_server_app_api_integrations_notion_route_actions_08es~5e.js +3 -0
  637. package/.next/server/chunks/apps_web__next-internal_server_app_api_jobs_[id]_route_actions_0.l39qd.js +3 -0
  638. package/.next/server/chunks/apps_web__next-internal_server_app_api_jobs_route_actions_08kx~8-.js +3 -0
  639. package/.next/server/chunks/apps_web__next-internal_server_app_api_marketplace_route_actions_0z~vymm.js +3 -0
  640. package/.next/server/chunks/apps_web__next-internal_server_app_api_media_[id]_route_actions_0wsnidd.js +3 -0
  641. package/.next/server/chunks/apps_web__next-internal_server_app_api_media_process_route_actions_0_j9maz.js +3 -0
  642. package/.next/server/chunks/apps_web__next-internal_server_app_api_media_route_actions_01szz-1.js +3 -0
  643. package/.next/server/chunks/apps_web__next-internal_server_app_api_media_stream_route_actions_0h2x_~2.js +3 -0
  644. package/.next/server/chunks/apps_web__next-internal_server_app_api_models_route_actions_0ervfbf.js +3 -0
  645. package/.next/server/chunks/apps_web__next-internal_server_app_api_parse-file_route_actions_134wu5p.js +3 -0
  646. package/.next/server/chunks/apps_web__next-internal_server_app_api_proxy_verify_route_actions_11frmb9.js +3 -0
  647. package/.next/server/chunks/apps_web__next-internal_server_app_api_sandbox_route_actions_0y9te9y.js +3 -0
  648. package/.next/server/chunks/apps_web__next-internal_server_app_api_search_bing_route_actions_0pfrdr1.js +3 -0
  649. package/.next/server/chunks/apps_web__next-internal_server_app_api_search_brave_route_actions_0sij14a.js +3 -0
  650. package/.next/server/chunks/apps_web__next-internal_server_app_api_search_exa_route_actions_013do9i.js +3 -0
  651. package/.next/server/chunks/apps_web__next-internal_server_app_api_search_google_route_actions_02aoghr.js +3 -0
  652. package/.next/server/chunks/apps_web__next-internal_server_app_api_search_route_actions_0_2o9ph.js +3 -0
  653. package/.next/server/chunks/apps_web__next-internal_server_app_api_search_tavily_route_actions_0z0cnd4.js +3 -0
  654. package/.next/server/chunks/apps_web__next-internal_server_app_api_search_verify_route_actions_0xtygzs.js +3 -0
  655. package/.next/server/chunks/apps_web__next-internal_server_app_api_server_agent_route_actions_11xuz1m.js +3 -0
  656. package/.next/server/chunks/apps_web__next-internal_server_app_api_server_download_route_actions_0vdr_bn.js +3 -0
  657. package/.next/server/chunks/apps_web__next-internal_server_app_api_server_generate_route_actions_12qf.pa.js +3 -0
  658. package/.next/server/chunks/apps_web__next-internal_server_app_api_server_local_route_actions_0c~tchb.js +3 -0
  659. package/.next/server/chunks/apps_web__next-internal_server_app_api_servers_route_actions_0_qimaq.js +3 -0
  660. package/.next/server/chunks/apps_web__next-internal_server_app_api_tabular_query_route_actions_0m_i8~j.js +3 -0
  661. package/.next/server/chunks/apps_web__next-internal_server_app_api_tabular_route_actions_06xgjmg.js +3 -0
  662. package/.next/server/chunks/apps_web__next-internal_server_app_api_upload-file_route_actions_0-df~h8.js +3 -0
  663. package/.next/server/chunks/apps_web__next-internal_server_app_api_uploads_[___slug]_route_actions_0-6rd8s.js +3 -0
  664. package/.next/server/chunks/apps_web__next-internal_server_app_favicon_ico_route_actions_0h5n1et.js +3 -0
  665. package/.next/server/chunks/node_modules__pnpm_00a45hz._.js +15 -0
  666. package/.next/server/chunks/node_modules__pnpm_01evtue._.js +36 -0
  667. package/.next/server/chunks/node_modules__pnpm_058qmaf._.js +36 -0
  668. package/.next/server/chunks/node_modules__pnpm_090g2s3._.js +3 -0
  669. package/.next/server/chunks/node_modules__pnpm_0of6.x_._.js +3 -0
  670. package/.next/server/chunks/node_modules__pnpm_0tui34u._.js +5 -0
  671. package/.next/server/chunks/node_modules__pnpm_11fyqx5._.js +15 -0
  672. package/.next/server/chunks/node_modules__pnpm_12rdsen._.js +36 -0
  673. package/.next/server/chunks/packages_070bs61._.js +3 -0
  674. package/.next/server/chunks/packages_0jmx5.-._.js +3 -0
  675. package/.next/server/chunks/packages_core_src_analytics-store_ts_03tqnqs._.js +3 -0
  676. package/.next/server/chunks/packages_core_src_embeddings_providers_ts_05f4_w-._.js +19 -0
  677. package/.next/server/chunks/packages_core_src_embeddings_registry_ts_031sc7-._.js +3 -0
  678. package/.next/server/chunks/packages_core_src_generator_generate-server_ts_0mt.je3._.js +1145 -0
  679. package/.next/server/chunks/packages_core_src_generator_server-runtime_ts_127f0ye._.js +648 -0
  680. package/.next/server/chunks/packages_core_src_index-store_ts_13sjtkb._.js +3 -0
  681. package/.next/server/chunks/packages_core_src_indexing_embedder_ts_0h75r~u._.js +20 -0
  682. package/.next/server/chunks/packages_core_src_media-store_ts_0v0lx36._.js +3 -0
  683. package/.next/server/chunks/packages_core_src_models-list_ts_03-odl5._.js +3 -0
  684. package/.next/server/chunks/packages_marketplace_src_0mxp_e3._.js +3 -0
  685. package/.next/server/chunks/packages_marketplace_src_storage-provider_ts_0mbs32-._.js +3 -0
  686. package/.next/server/chunks/packages_vector-stores_src_044u_tk._.js +3 -0
  687. package/.next/server/chunks/ssr/0ay0_framer-motion_dist_es_render_components_motion_proxy_mjs_00idub3._.js +3 -0
  688. package/.next/server/chunks/ssr/0gvc_next_dist_0e.uypd._.js +6 -0
  689. package/.next/server/chunks/ssr/0gvc_next_dist_client_components_0mj6fnc._.js +3 -0
  690. package/.next/server/chunks/ssr/0gvc_next_dist_client_components_builtin_forbidden_10qct8z.js +3 -0
  691. package/.next/server/chunks/ssr/0gvc_next_dist_client_components_builtin_global-error_0azu6.3.js +3 -0
  692. package/.next/server/chunks/ssr/0gvc_next_dist_client_components_builtin_unauthorized_03b6_.w.js +3 -0
  693. package/.next/server/chunks/ssr/0gvc_next_dist_esm_build_templates_app-page_0-imr0z.js +4 -0
  694. package/.next/server/chunks/ssr/0gvc_next_dist_esm_build_templates_app-page_00l31p..js +4 -0
  695. package/.next/server/chunks/ssr/0gvc_next_dist_esm_build_templates_app-page_0cjdc2w.js +4 -0
  696. package/.next/server/chunks/ssr/0gvc_next_dist_esm_build_templates_app-page_0fsrb82.js +4 -0
  697. package/.next/server/chunks/ssr/0gvc_next_dist_esm_build_templates_app-page_0l3eneq.js +4 -0
  698. package/.next/server/chunks/ssr/0gvc_next_dist_esm_build_templates_app-page_0l6387r.js +4 -0
  699. package/.next/server/chunks/ssr/0gvc_next_dist_esm_build_templates_app-page_0pk8tjk.js +4 -0
  700. package/.next/server/chunks/ssr/0hhw_pdfjs-dist_build_pdf_mjs_0emol.8._.js +47 -0
  701. package/.next/server/chunks/ssr/0ozc_@vercel_oidc_dist_token_0qkzh69.js +3 -0
  702. package/.next/server/chunks/ssr/[root-of-the-server]__03nybtv._.js +3 -0
  703. package/.next/server/chunks/ssr/[root-of-the-server]__061054q._.js +33 -0
  704. package/.next/server/chunks/ssr/[root-of-the-server]__0_lfs3c._.js +3 -0
  705. package/.next/server/chunks/ssr/[root-of-the-server]__0bxkvem._.js +3 -0
  706. package/.next/server/chunks/ssr/[root-of-the-server]__0ciwgj6._.js +3 -0
  707. package/.next/server/chunks/ssr/[root-of-the-server]__0f10~ff._.js +3 -0
  708. package/.next/server/chunks/ssr/[root-of-the-server]__0l9758p._.js +3 -0
  709. package/.next/server/chunks/ssr/[root-of-the-server]__0mib-aw._.js +3 -0
  710. package/.next/server/chunks/ssr/[root-of-the-server]__0o6u8a1._.js +3 -0
  711. package/.next/server/chunks/ssr/[root-of-the-server]__0q-0ign._.js +33 -0
  712. package/.next/server/chunks/ssr/[root-of-the-server]__0u7t7hm._.js +3 -0
  713. package/.next/server/chunks/ssr/[root-of-the-server]__0yxrvhy._.js +3 -0
  714. package/.next/server/chunks/ssr/[root-of-the-server]__0z9yy2_._.js +3 -0
  715. package/.next/server/chunks/ssr/[root-of-the-server]__0zl.q74._.js +3 -0
  716. package/.next/server/chunks/ssr/[turbopack]_runtime.js +903 -0
  717. package/.next/server/chunks/ssr/_0-uky5v._.js +3 -0
  718. package/.next/server/chunks/ssr/_0007q7_._.js +3 -0
  719. package/.next/server/chunks/ssr/_003vid-._.js +3 -0
  720. package/.next/server/chunks/ssr/_03casre._.js +6 -0
  721. package/.next/server/chunks/ssr/_06imf71._.js +4 -0
  722. package/.next/server/chunks/ssr/_08uade7._.js +3 -0
  723. package/.next/server/chunks/ssr/_09~o4f.._.js +13 -0
  724. package/.next/server/chunks/ssr/_0_aolb-._.js +3 -0
  725. package/.next/server/chunks/ssr/_0_zom3a._.js +3 -0
  726. package/.next/server/chunks/ssr/_0erod4k._.js +3 -0
  727. package/.next/server/chunks/ssr/_0gh6844._.js +3 -0
  728. package/.next/server/chunks/ssr/_0h9s_hw._.js +3 -0
  729. package/.next/server/chunks/ssr/_0p1j64v._.js +3 -0
  730. package/.next/server/chunks/ssr/_0qi5c9~._.js +132 -0
  731. package/.next/server/chunks/ssr/_0qopd-r._.js +120 -0
  732. package/.next/server/chunks/ssr/_0s5_0n1._.js +3 -0
  733. package/.next/server/chunks/ssr/_11.lrfy._.js +6 -0
  734. package/.next/server/chunks/ssr/_13gucvb._.js +3 -0
  735. package/.next/server/chunks/ssr/apps_web__next-internal_server_app__global-error_page_actions_0.u5cfa.js +3 -0
  736. package/.next/server/chunks/ssr/apps_web__next-internal_server_app__not-found_page_actions_0appun9.js +3 -0
  737. package/.next/server/chunks/ssr/apps_web__next-internal_server_app_analytics_page_actions_04e3dmk.js +3 -0
  738. package/.next/server/chunks/ssr/apps_web__next-internal_server_app_chat_page_actions_0x9i55t.js +3 -0
  739. package/.next/server/chunks/ssr/apps_web__next-internal_server_app_data_page_actions_0f9t7xs.js +3 -0
  740. package/.next/server/chunks/ssr/apps_web__next-internal_server_app_page_actions_0rm5_5w.js +3 -0
  741. package/.next/server/chunks/ssr/apps_web_app_template_tsx_0.4m7c9._.js +3 -0
  742. package/.next/server/chunks/ssr/apps_web_app_template_tsx_0j2myib._.js +3 -0
  743. package/.next/server/chunks/ssr/apps_web_components_analytics_analytics-dashboard_tsx_0lrr85m._.js +3 -0
  744. package/.next/server/chunks/ssr/apps_web_components_ui_tabs_tsx_0435ww5._.js +3 -0
  745. package/.next/server/chunks/ssr/apps_web_lib_pdf-images_ts_0nzct~e._.js +3 -0
  746. package/.next/server/chunks/ssr/node_modules__pnpm_0auud-z._.js +3 -0
  747. package/.next/server/chunks/ssr/node_modules__pnpm_0efi01o._.js +3 -0
  748. package/.next/server/chunks/ssr/node_modules__pnpm_0ge5k63._.js +3 -0
  749. package/.next/server/chunks/ssr/node_modules__pnpm_0j6v-w5._.js +3 -0
  750. package/.next/server/chunks/ssr/node_modules__pnpm_0jmin55._.js +33 -0
  751. package/.next/server/chunks/ssr/node_modules__pnpm_0qjmu5-._.js +3 -0
  752. package/.next/server/chunks/ssr/node_modules__pnpm_0q~5d-e._.js +3 -0
  753. package/.next/server/chunks/ssr/node_modules__pnpm_0xnq.u3._.js +19 -0
  754. package/.next/server/chunks/ssr/packages_core_src_generator_generate-server_ts_0o.y7vi._.js +1145 -0
  755. package/.next/server/functions-config-manifest.json +52 -0
  756. package/.next/server/interception-route-rewrite-manifest.js +1 -0
  757. package/.next/server/middleware-build-manifest.js +22 -0
  758. package/.next/server/middleware-manifest.json +6 -0
  759. package/.next/server/next-font-manifest.js +1 -0
  760. package/.next/server/next-font-manifest.json +31 -0
  761. package/.next/server/pages/404.html +1 -0
  762. package/.next/server/pages/500.html +1 -0
  763. package/.next/server/pages-manifest.json +4 -0
  764. package/.next/server/prefetch-hints.json +1 -0
  765. package/.next/server/server-reference-manifest.js +1 -0
  766. package/.next/server/server-reference-manifest.json +42 -0
  767. package/.next/static/KqIuNxkoeAlhCusoxtMrS/_buildManifest.js +16 -0
  768. package/.next/static/KqIuNxkoeAlhCusoxtMrS/_clientMiddlewareManifest.js +1 -0
  769. package/.next/static/KqIuNxkoeAlhCusoxtMrS/_ssgManifest.js +1 -0
  770. package/.next/static/chunks/0-l-_.e4~p-tu.js +1 -0
  771. package/.next/static/chunks/00bdh97xa16uo.js +1 -0
  772. package/.next/static/chunks/00h-ng_jqta-2.js +1 -0
  773. package/.next/static/chunks/03jot0gqi~a10.js +1 -0
  774. package/.next/static/chunks/03~yq9q893hmn.js +1 -0
  775. package/.next/static/chunks/066jf0nk75nic.css +2 -0
  776. package/.next/static/chunks/06lztj0p4bq9f.js +31 -0
  777. package/.next/static/chunks/06mvsykkx_ufi.js +1 -0
  778. package/.next/static/chunks/090nmx8zs_1wf.js +1 -0
  779. package/.next/static/chunks/0_~l8kd_h3sbq.js +1 -0
  780. package/.next/static/chunks/0c-2rnxmjsotm.js +118 -0
  781. package/.next/static/chunks/0ho7lc.x2uknx.js +1 -0
  782. package/.next/static/chunks/0i-8kxwbvp9.l.js +129 -0
  783. package/.next/static/chunks/0l27y8_9hhe7s.js +4 -0
  784. package/.next/static/chunks/0q_qvc60_3aw4.js +1 -0
  785. package/.next/static/chunks/0r4ctb~yxw0ip.js +45 -0
  786. package/.next/static/chunks/0rp85cjcakb29.js +1 -0
  787. package/.next/static/chunks/0uawaqqylt5zw.css +1 -0
  788. package/.next/static/chunks/0ufxt21gvl.3g.js +1 -0
  789. package/.next/static/chunks/0vnayejbagbex.js +1 -0
  790. package/.next/static/chunks/0w6lgn24.0eip.js +1 -0
  791. package/.next/static/chunks/0wrbyfcre8l1-.js +1 -0
  792. package/.next/static/chunks/0xil-1~ra.qnv.js +1 -0
  793. package/.next/static/chunks/0zoh3o_.geqbv.js +1 -0
  794. package/.next/static/chunks/0~074ua5vk6f8.js +1 -0
  795. package/.next/static/chunks/0~_-3fik2n4-i.js +1 -0
  796. package/.next/static/chunks/10a_hianorzj3.js +1 -0
  797. package/.next/static/chunks/10k--lk9wf4pw.js +1 -0
  798. package/.next/static/chunks/14x~vj_4i-4bz.js +1 -0
  799. package/.next/static/chunks/15tyhmsp4jgmc.js +11 -0
  800. package/.next/static/chunks/16alfqkklv-bt.js +2 -0
  801. package/.next/static/chunks/176ixsksxtch_.js +1 -0
  802. package/.next/static/chunks/turbopack-06_~2vs.chjg_.js +1 -0
  803. package/.next/static/media/4fa387ec64143e14-s.0wkzw~je483f-.woff2 +0 -0
  804. package/.next/static/media/53b9e256198e5412-s.0-wfv7uh4i7h9.woff2 +0 -0
  805. package/.next/static/media/5ce348bf30bf5439-s.0zgw-jeven.3w.woff2 +0 -0
  806. package/.next/static/media/6306c77e7c8268e4-s.0rhz0arwfsn~5.woff2 +0 -0
  807. package/.next/static/media/7178b3e590c64307-s.0nx0ww8fni_q3.woff2 +0 -0
  808. package/.next/static/media/797e433ab948586e-s.p.08e28id.o-okb.woff2 +0 -0
  809. package/.next/static/media/7d817b4c03b0c5f1-s.0l76wvqk9d84w.woff2 +0 -0
  810. package/.next/static/media/8a480f0b521d4e75-s.0jzbimsg8vl84.woff2 +0 -0
  811. package/.next/static/media/bbc41e54d2fcbd21-s.0k4k9394f2q-k.woff2 +0 -0
  812. package/.next/static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2 +0 -0
  813. package/.next/static/media/favicon.01rzdfen4476b.ico +0 -0
  814. package/.next/static/media/fef07dbb0973bf53-s.12tyk43_3sh9u.woff2 +0 -0
  815. package/.next/types/cache-life.d.ts +145 -0
  816. package/.next/types/routes.d.ts +136 -0
  817. package/.next/types/validator.ts +637 -0
  818. package/CHANGELOG.md +24 -0
  819. package/LICENSE +176 -0
  820. package/app/actions/vercel.ts +325 -152
  821. package/app/analytics/page.tsx +19 -0
  822. package/app/api/analytics/route.ts +31 -0
  823. package/app/api/chat/route.ts +331 -145
  824. package/app/api/chat/status/route.ts +73 -22
  825. package/app/api/chat/suggestions/route.ts +61 -48
  826. package/app/api/chat/tools.ts +995 -0
  827. package/app/api/config/route.ts +56 -32
  828. package/app/api/config/test/route.ts +33 -32
  829. package/app/api/config/test-llm/route.ts +9 -10
  830. package/app/api/config/verify/route.ts +315 -0
  831. package/app/api/connections/route.ts +39 -0
  832. package/app/api/connections/webhook/route.ts +43 -0
  833. package/app/api/demo/route.ts +32 -44
  834. package/app/api/deploy/cloud-project/route.ts +125 -0
  835. package/app/api/deploy/ssh/route.ts +173 -132
  836. package/app/api/deployment/blob-setup/route.ts +28 -0
  837. package/app/api/deployment/config/route.ts +23 -0
  838. package/app/api/describe-image/route.ts +84 -0
  839. package/app/api/doc-editor/edit/route.ts +88 -0
  840. package/app/api/doc-editor/export/route.ts +33 -0
  841. package/app/api/doc-editor/extract-text/route.ts +41 -0
  842. package/app/api/doc-editor/parse/route.ts +66 -0
  843. package/app/api/doc-editor/restore/route.ts +74 -0
  844. package/app/api/document/sign/route.ts +56 -0
  845. package/app/api/documents/route.ts +185 -35
  846. package/app/api/firecrawl/local/route.ts +63 -23
  847. package/app/api/index/route.ts +73 -59
  848. package/app/api/integrations/notion/callback/route.ts +121 -0
  849. package/app/api/integrations/notion/route.ts +304 -0
  850. package/app/api/jobs/route.ts +45 -47
  851. package/app/api/marketplace/[toolId]/route.ts +70 -0
  852. package/app/api/marketplace/route.ts +32 -0
  853. package/app/api/media/[id]/route.ts +108 -0
  854. package/app/api/media/process/route.ts +1242 -0
  855. package/app/api/media/route.ts +284 -0
  856. package/app/api/media/stream/route.ts +113 -0
  857. package/app/api/models/route.ts +23 -0
  858. package/app/api/proxy/verify/route.ts +66 -0
  859. package/app/api/sandbox/route.ts +59 -0
  860. package/app/api/search/bing/route.ts +87 -0
  861. package/app/api/search/brave/route.ts +89 -0
  862. package/app/api/search/exa/route.ts +101 -0
  863. package/app/api/search/google/route.ts +16 -29
  864. package/app/api/search/tavily/route.ts +94 -0
  865. package/app/api/search/verify/route.ts +28 -0
  866. package/app/api/server/agent/route.ts +41 -0
  867. package/app/api/server/download/route.ts +42 -34
  868. package/app/api/server/generate/route.ts +23 -23
  869. package/app/api/servers/route.ts +46 -62
  870. package/app/api/tabular/query/route.ts +26 -0
  871. package/app/api/tabular/route.ts +63 -0
  872. package/app/api/upload-file/route.ts +38 -0
  873. package/app/api/uploads/[...slug]/route.ts +90 -0
  874. package/app/api/vector-stores/install/route.ts +5 -6
  875. package/app/api/vector-stores/status/route.ts +9 -7
  876. package/app/chat/page.tsx +4 -8
  877. package/app/data/page.tsx +15 -8
  878. package/app/globals.css +150 -22
  879. package/app/layout.tsx +19 -17
  880. package/app/page.tsx +3 -32
  881. package/app/settings/page.tsx +80 -0
  882. package/app/themes.css +38 -2
  883. package/archive/redesign-v2/app/configure/page.tsx +53 -0
  884. package/archive/redesign-v2/app/demo/page.tsx +15 -0
  885. package/archive/redesign-v2/app/server/page.tsx +22 -0
  886. package/archive/redesign-v2/app/simple/chat/page.tsx +17 -0
  887. package/archive/redesign-v2/app/simple/docs/page.tsx +21 -0
  888. package/archive/redesign-v2/app/simple/settings/page.tsx +1104 -0
  889. package/{app → archive/redesign-v2/app-routes}/server/page.tsx +2 -2
  890. package/archive/redesign-v2/app-routes/simple/settings/page.tsx +1104 -0
  891. package/archive/redesign-v2/components/app-sidebar.tsx +188 -0
  892. package/archive/redesign-v2/components/app-topnav.tsx +195 -0
  893. package/archive/redesign-v2/components/global-settings.tsx +288 -0
  894. package/archive/redesign-v2/components/simple/simple-sidebar.tsx +171 -0
  895. package/archive/redesign-v2/components/simple/simple-topnav.tsx +175 -0
  896. package/bin/larkup.js +28 -0
  897. package/components/analytics/analytics-dashboard.tsx +504 -0
  898. package/components/app-sidebar.tsx +46 -57
  899. package/components/app-topnav.tsx +64 -150
  900. package/components/chat/canvas/doc-editor-provider.tsx +343 -0
  901. package/components/chat/canvas/document-canvas.tsx +102 -0
  902. package/components/chat/canvas/document-field.tsx +171 -0
  903. package/components/chat/canvas/document-viewer.tsx +453 -0
  904. package/components/chat/canvas/file-attachment-button.tsx +88 -0
  905. package/components/chat/canvas/file-chip.tsx +151 -0
  906. package/components/chat/chat-settings-modal.tsx +253 -149
  907. package/components/chat/chat-workspace.tsx +961 -149
  908. package/components/chat/message-item.tsx +935 -71
  909. package/components/chat/tools/chat-card.tsx +116 -0
  910. package/components/chat/tools/chat-chart.tsx +548 -0
  911. package/components/chat/tools/chat-data-table.tsx +370 -0
  912. package/components/chat/tools/chat-grid.tsx +99 -0
  913. package/components/chat/tools/chat-media-preview.tsx +246 -0
  914. package/components/chat/tools/chat-metrics.tsx +76 -0
  915. package/components/chat/tools/chat-sandbox-result.tsx +175 -0
  916. package/components/chat/tools/chat-signature-request.tsx +809 -0
  917. package/components/chat/tools/chat-tabs.tsx +66 -0
  918. package/components/chat/tools/corpus-data-result.tsx +206 -0
  919. package/components/chat/tools/knowledge-base-result.tsx +135 -0
  920. package/components/chat/tools/visual-placement-modal.tsx +316 -0
  921. package/components/chat/tools/visualization-tabs.tsx +37 -0
  922. package/components/client-layout-wrapper.tsx +52 -124
  923. package/components/configure/configure-form.tsx +301 -530
  924. package/components/configure/custom-model-modal.tsx +205 -0
  925. package/components/configure/store-fields.tsx +4 -1
  926. package/components/data/corpus-panel.tsx +329 -137
  927. package/components/data/data-workspace.tsx +428 -185
  928. package/components/data/firecrawl-notice.tsx +94 -122
  929. package/components/data/integrations-panel.tsx +408 -0
  930. package/components/data/jobs-panel.tsx +83 -105
  931. package/components/data/media-panel.tsx +1701 -0
  932. package/components/data/notion-panel.tsx +372 -0
  933. package/components/data/paste-panel.tsx +4 -3
  934. package/components/data/scrape-panel.tsx +389 -343
  935. package/components/data/tabular-preview.tsx +228 -0
  936. package/components/data/upload-panel.tsx +500 -206
  937. package/components/demo/demo-workspace.tsx +50 -83
  938. package/components/global-settings.tsx +71 -108
  939. package/components/index/global-index-progress.tsx +46 -0
  940. package/components/index/index-action-dialog.tsx +545 -0
  941. package/components/index/index-workspace.tsx +138 -219
  942. package/components/onboarding/simple-setup.tsx +126 -180
  943. package/components/onboarding/welcome-screen.tsx +428 -157
  944. package/components/server/deploy-button.tsx +95 -1233
  945. package/components/server/deploy-sheet.tsx +1061 -0
  946. package/components/server/server-workspace.tsx +62 -95
  947. package/components/settings/appearance-section.tsx +300 -0
  948. package/components/settings/connections-section.tsx +471 -0
  949. package/components/settings/deploy-section.tsx +24 -0
  950. package/components/settings/deployment-section.tsx +430 -0
  951. package/components/settings/general-section.tsx +734 -0
  952. package/components/settings/marketplace-section.tsx +385 -0
  953. package/components/settings/marketplace-tools-settings.tsx +436 -0
  954. package/components/settings/models-section.tsx +810 -0
  955. package/components/settings/playground-section.tsx +17 -0
  956. package/components/settings/prompts-section.tsx +384 -0
  957. package/components/settings/server-section.tsx +808 -0
  958. package/components/settings/settings-layout.tsx +147 -0
  959. package/components/settings/storage-section.tsx +394 -0
  960. package/components/simple/sdk-connect-dialog.tsx +38 -33
  961. package/components/simple/simple-sidebar.tsx +69 -72
  962. package/components/simple/simple-topnav.tsx +154 -0
  963. package/components/theme-customizer-provider.tsx +56 -79
  964. package/components/theme-switcher.tsx +92 -114
  965. package/components/ui/button.tsx +11 -13
  966. package/components/ui/card.tsx +17 -17
  967. package/components/ui/checkbox.tsx +5 -5
  968. package/components/ui/dialog.tsx +1 -1
  969. package/components/ui/dropdown-menu.tsx +24 -38
  970. package/components/ui/input.tsx +2 -2
  971. package/components/ui/popover.tsx +21 -34
  972. package/components/ui/provider-icon.tsx +88 -17
  973. package/components/ui/select.tsx +44 -61
  974. package/components/ui/sheet.tsx +33 -46
  975. package/components/ui/slider.tsx +52 -0
  976. package/components/ui/sonner.tsx +23 -36
  977. package/components/ui/table.tsx +19 -19
  978. package/components/ui/tabs.tsx +17 -24
  979. package/components/ui/textarea.tsx +4 -4
  980. package/components/unified-sidebar.tsx +222 -0
  981. package/components/update-banner.tsx +203 -0
  982. package/components/workspace/server-form-dialog.tsx +7 -7
  983. package/components/workspace/server-switcher.tsx +15 -37
  984. package/hooks/use-notion-auth.ts +60 -0
  985. package/lib/chat-model-provider.ts +115 -0
  986. package/lib/deployments.ts +119 -0
  987. package/lib/env-utils.ts +27 -0
  988. package/lib/media-knowledge.ts +431 -0
  989. package/lib/os-concurrency.ts +37 -0
  990. package/lib/pdf-images.ts +80 -0
  991. package/lib/search-provider-verification.ts +95 -0
  992. package/next.config.mjs +19 -2
  993. package/package.json +37 -20
  994. package/parse_log.mjs +67 -0
  995. package/public/icons/Confluence.png +0 -0
  996. package/public/icons/Salesforce.png +0 -0
  997. package/public/icons/audio.png +0 -0
  998. package/public/icons/bing.png +0 -0
  999. package/public/icons/brave.png +0 -0
  1000. package/public/icons/deepgram.png +0 -0
  1001. package/public/icons/discord.png +0 -0
  1002. package/public/icons/elevenlabs.png +0 -0
  1003. package/public/icons/exa.png +0 -0
  1004. package/public/icons/excel.png +0 -0
  1005. package/public/icons/fal.png +0 -0
  1006. package/public/icons/firecrawl.png +0 -0
  1007. package/public/icons/google-calender.png +0 -0
  1008. package/public/icons/google-drive.png +0 -0
  1009. package/public/icons/google.png +0 -0
  1010. package/public/icons/grok.png +0 -0
  1011. package/public/icons/image.png +0 -0
  1012. package/public/icons/jira.png +0 -0
  1013. package/public/icons/linear.png +0 -0
  1014. package/public/icons/markdown.png +0 -0
  1015. package/public/icons/onedrive.png +0 -0
  1016. package/public/icons/outlook.png +0 -0
  1017. package/public/icons/pdf.png +0 -0
  1018. package/public/icons/revai.png +0 -0
  1019. package/public/icons/revai.svg +1 -0
  1020. package/public/icons/sap.png +0 -0
  1021. package/public/icons/serpapi.svg +34 -0
  1022. package/public/icons/serper.png +0 -0
  1023. package/public/icons/sharepoint.png +0 -0
  1024. package/public/icons/slack.png +0 -0
  1025. package/public/icons/tavily.png +0 -0
  1026. package/public/icons/telegram.png +0 -0
  1027. package/public/icons/video.png +0 -0
  1028. package/public/icons/webhook.png +0 -0
  1029. package/public/icons/whatsapp.png +0 -0
  1030. package/public/icons/word.png +0 -0
  1031. package/public/logo-light2.png +0 -0
  1032. package/public/logo.png +0 -0
  1033. package/public/notion-white.png +0 -0
  1034. package/public/notion.png +0 -0
  1035. package/store/chat-store.ts +19 -0
  1036. package/store/scrape-store.ts +78 -0
  1037. package/tsconfig.json +1 -1
  1038. package/verify-models.mjs +133 -0
  1039. package/.env +0 -2
  1040. package/app/index-data/page.tsx +0 -15
  1041. package/app/simple/settings/page.tsx +0 -627
  1042. package/components/chat/knowledge-base-result.tsx +0 -97
  1043. /package/{app → archive/redesign-v2/app-routes}/configure/page.tsx +0 -0
  1044. /package/{app → archive/redesign-v2/app-routes}/demo/page.tsx +0 -0
  1045. /package/{app → archive/redesign-v2/app-routes}/simple/chat/page.tsx +0 -0
  1046. /package/{app → archive/redesign-v2/app-routes}/simple/docs/page.tsx +0 -0
  1047. /package/{app → archive/redesign-v2/app-routes}/simple/layout.tsx +0 -0
@@ -0,0 +1,11 @@
1
+ module.exports=[449719,(e,t,r)=>{t.exports=e.x("assert",()=>require("assert"))},47963,(e,t,r)=>{"use strict";let i=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;i.writable=e=>i(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState,i.readable=e=>i(e)&&!1!==e.readable&&"function"==typeof e._read&&"object"==typeof e._readableState,i.duplex=e=>i.writable(e)&&i.readable(e),i.transform=e=>i.duplex(e)&&"function"==typeof e._transform,t.exports=i},794996,(e,t,r)=>{r=t.exports=A,i="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},r.SEMVER_SPEC_VERSION="2.0.0";var i,n=Number.MAX_SAFE_INTEGER||0x1fffffffffffff,s=r.re=[],o=r.safeRe=[],a=r.src=[],l=r.tokens={},c=0;function h(e){l[e]=c++}var f="[a-zA-Z0-9-]",d=[["\\s",1],["\\d",256],[f,250]];function u(e){for(var t=0;t<d.length;t++){var r=d[t][0],i=d[t][1];e=e.split(r+"*").join(r+"{0,"+i+"}").split(r+"+").join(r+"{1,"+i+"}")}return e}h("NUMERICIDENTIFIER"),a[l.NUMERICIDENTIFIER]="0|[1-9]\\d*",h("NUMERICIDENTIFIERLOOSE"),a[l.NUMERICIDENTIFIERLOOSE]="\\d+",h("NONNUMERICIDENTIFIER"),a[l.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-]"+f+"*",h("MAINVERSION"),a[l.MAINVERSION]="("+a[l.NUMERICIDENTIFIER]+")\\.("+a[l.NUMERICIDENTIFIER]+")\\.("+a[l.NUMERICIDENTIFIER]+")",h("MAINVERSIONLOOSE"),a[l.MAINVERSIONLOOSE]="("+a[l.NUMERICIDENTIFIERLOOSE]+")\\.("+a[l.NUMERICIDENTIFIERLOOSE]+")\\.("+a[l.NUMERICIDENTIFIERLOOSE]+")",h("PRERELEASEIDENTIFIER"),a[l.PRERELEASEIDENTIFIER]="(?:"+a[l.NUMERICIDENTIFIER]+"|"+a[l.NONNUMERICIDENTIFIER]+")",h("PRERELEASEIDENTIFIERLOOSE"),a[l.PRERELEASEIDENTIFIERLOOSE]="(?:"+a[l.NUMERICIDENTIFIERLOOSE]+"|"+a[l.NONNUMERICIDENTIFIER]+")",h("PRERELEASE"),a[l.PRERELEASE]="(?:-("+a[l.PRERELEASEIDENTIFIER]+"(?:\\."+a[l.PRERELEASEIDENTIFIER]+")*))",h("PRERELEASELOOSE"),a[l.PRERELEASELOOSE]="(?:-?("+a[l.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+a[l.PRERELEASEIDENTIFIERLOOSE]+")*))",h("BUILDIDENTIFIER"),a[l.BUILDIDENTIFIER]=f+"+",h("BUILD"),a[l.BUILD]="(?:\\+("+a[l.BUILDIDENTIFIER]+"(?:\\."+a[l.BUILDIDENTIFIER]+")*))",h("FULL"),h("FULLPLAIN"),a[l.FULLPLAIN]="v?"+a[l.MAINVERSION]+a[l.PRERELEASE]+"?"+a[l.BUILD]+"?",a[l.FULL]="^"+a[l.FULLPLAIN]+"$",h("LOOSEPLAIN"),a[l.LOOSEPLAIN]="[v=\\s]*"+a[l.MAINVERSIONLOOSE]+a[l.PRERELEASELOOSE]+"?"+a[l.BUILD]+"?",h("LOOSE"),a[l.LOOSE]="^"+a[l.LOOSEPLAIN]+"$",h("GTLT"),a[l.GTLT]="((?:<|>)?=?)",h("XRANGEIDENTIFIERLOOSE"),a[l.XRANGEIDENTIFIERLOOSE]=a[l.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*",h("XRANGEIDENTIFIER"),a[l.XRANGEIDENTIFIER]=a[l.NUMERICIDENTIFIER]+"|x|X|\\*",h("XRANGEPLAIN"),a[l.XRANGEPLAIN]="[v=\\s]*("+a[l.XRANGEIDENTIFIER]+")(?:\\.("+a[l.XRANGEIDENTIFIER]+")(?:\\.("+a[l.XRANGEIDENTIFIER]+")(?:"+a[l.PRERELEASE]+")?"+a[l.BUILD]+"?)?)?",h("XRANGEPLAINLOOSE"),a[l.XRANGEPLAINLOOSE]="[v=\\s]*("+a[l.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+a[l.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+a[l.XRANGEIDENTIFIERLOOSE]+")(?:"+a[l.PRERELEASELOOSE]+")?"+a[l.BUILD]+"?)?)?",h("XRANGE"),a[l.XRANGE]="^"+a[l.GTLT]+"\\s*"+a[l.XRANGEPLAIN]+"$",h("XRANGELOOSE"),a[l.XRANGELOOSE]="^"+a[l.GTLT]+"\\s*"+a[l.XRANGEPLAINLOOSE]+"$",h("COERCE"),a[l.COERCE]="(^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])",h("COERCERTL"),s[l.COERCERTL]=RegExp(a[l.COERCE],"g"),o[l.COERCERTL]=RegExp(u(a[l.COERCE]),"g"),h("LONETILDE"),a[l.LONETILDE]="(?:~>?)",h("TILDETRIM"),a[l.TILDETRIM]="(\\s*)"+a[l.LONETILDE]+"\\s+",s[l.TILDETRIM]=RegExp(a[l.TILDETRIM],"g"),o[l.TILDETRIM]=RegExp(u(a[l.TILDETRIM]),"g"),h("TILDE"),a[l.TILDE]="^"+a[l.LONETILDE]+a[l.XRANGEPLAIN]+"$",h("TILDELOOSE"),a[l.TILDELOOSE]="^"+a[l.LONETILDE]+a[l.XRANGEPLAINLOOSE]+"$",h("LONECARET"),a[l.LONECARET]="(?:\\^)",h("CARETTRIM"),a[l.CARETTRIM]="(\\s*)"+a[l.LONECARET]+"\\s+",s[l.CARETTRIM]=RegExp(a[l.CARETTRIM],"g"),o[l.CARETTRIM]=RegExp(u(a[l.CARETTRIM]),"g"),h("CARET"),a[l.CARET]="^"+a[l.LONECARET]+a[l.XRANGEPLAIN]+"$",h("CARETLOOSE"),a[l.CARETLOOSE]="^"+a[l.LONECARET]+a[l.XRANGEPLAINLOOSE]+"$",h("COMPARATORLOOSE"),a[l.COMPARATORLOOSE]="^"+a[l.GTLT]+"\\s*("+a[l.LOOSEPLAIN]+")$|^$",h("COMPARATOR"),a[l.COMPARATOR]="^"+a[l.GTLT]+"\\s*("+a[l.FULLPLAIN]+")$|^$",h("COMPARATORTRIM"),a[l.COMPARATORTRIM]="(\\s*)"+a[l.GTLT]+"\\s*("+a[l.LOOSEPLAIN]+"|"+a[l.XRANGEPLAIN]+")",s[l.COMPARATORTRIM]=RegExp(a[l.COMPARATORTRIM],"g"),o[l.COMPARATORTRIM]=RegExp(u(a[l.COMPARATORTRIM]),"g"),h("HYPHENRANGE"),a[l.HYPHENRANGE]="^\\s*("+a[l.XRANGEPLAIN]+")\\s+-\\s+("+a[l.XRANGEPLAIN]+")\\s*$",h("HYPHENRANGELOOSE"),a[l.HYPHENRANGELOOSE]="^\\s*("+a[l.XRANGEPLAINLOOSE]+")\\s+-\\s+("+a[l.XRANGEPLAINLOOSE]+")\\s*$",h("STAR"),a[l.STAR]="(<|>)?=?\\s*\\*";for(var g=0;g<c;g++)i(g,a[g]),s[g]||(s[g]=new RegExp(a[g]),o[g]=new RegExp(u(a[g])));function p(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof A)return e;if("string"!=typeof e||e.length>256||!(t.loose?o[l.LOOSE]:o[l.FULL]).test(e))return null;try{return new A(e,t)}catch(e){return null}}function A(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof A)if(e.loose===t.loose)return e;else e=e.version;else if("string"!=typeof e)throw TypeError("Invalid Version: "+e);if(e.length>256)throw TypeError("version is longer than 256 characters");if(!(this instanceof A))return new A(e,t);i("SemVer",e,t),this.options=t,this.loose=!!t.loose;var r=e.trim().match(t.loose?o[l.LOOSE]:o[l.FULL]);if(!r)throw TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>n||this.major<0)throw TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t<n)return t}return e}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}r.parse=p,r.valid=function(e,t){var r=p(e,t);return r?r.version:null},r.clean=function(e,t){var r=p(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null},r.SemVer=A,A.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},A.prototype.toString=function(){return this.version},A.prototype.compare=function(e){return i("SemVer.compare",this.version,this.options,e),e instanceof A||(e=new A(e,this.options)),this.compareMain(e)||this.comparePre(e)},A.prototype.compareMain=function(e){return e instanceof A||(e=new A(e,this.options)),E(this.major,e.major)||E(this.minor,e.minor)||E(this.patch,e.patch)},A.prototype.comparePre=function(e){if(e instanceof A||(e=new A(e,this.options)),this.prerelease.length&&!e.prerelease.length)return -1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;var t=0;do{var r=this.prerelease[t],n=e.prerelease[t];if(i("prerelease compare",t,r,n),void 0===r&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===r)return -1;else if(r===n)continue;else return E(r,n)}while(++t)},A.prototype.compareBuild=function(e){e instanceof A||(e=new A(e,this.options));var t=0;do{var r=this.build[t],n=e.build[t];if(i("prerelease compare",t,r,n),void 0===r&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===r)return -1;else if(r===n)continue;else return E(r,n)}while(++t)},A.prototype.inc=function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":(0!==this.minor||0!==this.patch||0===this.prerelease.length)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(0!==this.patch||0===this.prerelease.length)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var r=this.prerelease.length;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);-1===r&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},r.inc=function(e,t,r,i){"string"==typeof r&&(i=r,r=void 0);try{return new A(e,r).inc(t,i).version}catch(e){return null}},r.diff=function(e,t){if(m(e,t))return null;var r=p(e),i=p(t),n="";if(r.prerelease.length||i.prerelease.length){n="pre";var s="prerelease"}for(var o in r)if(("major"===o||"minor"===o||"patch"===o)&&r[o]!==i[o])return n+o;return s},r.compareIdentifiers=E;var _=/^[0-9]+$/;function E(e,t){var r=_.test(e),i=_.test(t);return r&&i&&(e*=1,t*=1),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1}function b(e,t,r){return new A(e,r).compare(new A(t,r))}function I(e,t,r){return b(e,t,r)>0}function y(e,t,r){return 0>b(e,t,r)}function m(e,t,r){return 0===b(e,t,r)}function S(e,t,r){return 0!==b(e,t,r)}function x(e,t,r){return b(e,t,r)>=0}function w(e,t,r){return 0>=b(e,t,r)}function v(e,t,r,i){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return m(e,r,i);case"!=":return S(e,r,i);case">":return I(e,r,i);case">=":return x(e,r,i);case"<":return y(e,r,i);case"<=":return w(e,r,i);default:throw TypeError("Invalid operator: "+t)}}function C(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof C)if(!!t.loose===e.loose)return e;else e=e.value;if(!(this instanceof C))return new C(e,t);i("comparator",e=e.trim().split(/\s+/).join(" "),t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===B?this.value="":this.value=this.operator+this.semver.version,i("comp",this)}r.rcompareIdentifiers=function(e,t){return E(t,e)},r.major=function(e,t){return new A(e,t).major},r.minor=function(e,t){return new A(e,t).minor},r.patch=function(e,t){return new A(e,t).patch},r.compare=b,r.compareLoose=function(e,t){return b(e,t,!0)},r.compareBuild=function(e,t,r){var i=new A(e,r),n=new A(t,r);return i.compare(n)||i.compareBuild(n)},r.rcompare=function(e,t,r){return b(t,e,r)},r.sort=function(e,t){return e.sort(function(e,i){return r.compareBuild(e,i,t)})},r.rsort=function(e,t){return e.sort(function(e,i){return r.compareBuild(i,e,t)})},r.gt=I,r.lt=y,r.eq=m,r.neq=S,r.gte=x,r.lte=w,r.cmp=v,r.Comparator=C;var B={};function k(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof k)if(!!t.loose===e.loose&&!!t.includePrerelease===e.includePrerelease)return e;else return new k(e.raw,t);if(e instanceof C)return new k(e.value,t);if(!(this instanceof k))return new k(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length}),!this.set.length)throw TypeError("Invalid SemVer Range: "+this.raw);this.format()}function R(e,t){for(var r=!0,i=e.slice(),n=i.pop();r&&i.length;)r=i.every(function(e){return n.intersects(e,t)}),n=i.pop();return r}function N(e){return!e||"x"===e.toLowerCase()||"*"===e}function T(e,t,r,i,n,s,o,a,l,c,h,f,d){return((t=N(r)?"":N(i)?">="+r+".0.0":N(n)?">="+r+"."+i+".0":">="+t)+" "+(a=N(l)?"":N(c)?"<"+(+l+1)+".0.0":N(h)?"<"+l+"."+(+c+1)+".0":f?"<="+l+"."+c+"."+h+"-"+f:"<="+a)).trim()}function L(e,t,r){try{t=new k(t,r)}catch(e){return!1}return t.test(e)}function U(e,t,r,i){switch(e=new A(e,i),t=new k(t,i),r){case">":n=I,s=w,o=y,a=">",l=">=";break;case"<":n=y,s=x,o=I,a="<",l="<=";break;default:throw TypeError('Must provide a hilo val of "<" or ">"')}if(L(e,t,i))return!1;for(var n,s,o,a,l,c=0;c<t.set.length;++c){var h=t.set[c],f=null,d=null;if(h.forEach(function(e){e.semver===B&&(e=new C(">=0.0.0")),f=f||e,d=d||e,n(e.semver,f.semver,i)?f=e:o(e.semver,d.semver,i)&&(d=e)}),f.operator===a||f.operator===l||(!d.operator||d.operator===a)&&s(e,d.semver)||d.operator===l&&o(e,d.semver))return!1}return!0}C.prototype.parse=function(e){var t=this.options.loose?o[l.COMPARATORLOOSE]:o[l.COMPARATOR],r=e.match(t);if(!r)throw TypeError("Invalid comparator: "+e);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new A(r[2],this.options.loose):this.semver=B},C.prototype.toString=function(){return this.value},C.prototype.test=function(e){if(i("Comparator.test",e,this.options.loose),this.semver===B||e===B)return!0;if("string"==typeof e)try{e=new A(e,this.options)}catch(e){return!1}return v(e,this.operator,this.semver,this.options)},C.prototype.intersects=function(e,t){if(!(e instanceof C))throw TypeError("a Comparator is required");if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||(r=new k(e.value,t),L(this.value,r,t));if(""===e.operator)return""===e.value||(r=new k(this.value,t),L(e.semver,r,t));var r,i=(">="===this.operator||">"===this.operator)&&(">="===e.operator||">"===e.operator),n=("<="===this.operator||"<"===this.operator)&&("<="===e.operator||"<"===e.operator),s=this.semver.version===e.semver.version,o=(">="===this.operator||"<="===this.operator)&&(">="===e.operator||"<="===e.operator),a=v(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),l=v(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return i||n||s&&o||a||l},r.Range=k,k.prototype.format=function(){return this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim(),this.range},k.prototype.toString=function(){return this.range},k.prototype.parseRange=function(e){var t=this.options.loose,r=t?o[l.HYPHENRANGELOOSE]:o[l.HYPHENRANGE];i("hyphen replace",e=e.replace(r,T)),i("comparator trim",e=e.replace(o[l.COMPARATORTRIM],"$1$2$3"),o[l.COMPARATORTRIM]),e=(e=(e=e.replace(o[l.TILDETRIM],"$1~")).replace(o[l.CARETTRIM],"$1^")).split(/\s+/).join(" ");var n=t?o[l.COMPARATORLOOSE]:o[l.COMPARATOR],s=e.split(" ").map(function(e){var t,r,n,s,a,c,h,f,d;return i("comp",t=e,r=this.options),n=t,s=r,t=n.trim().split(/\s+/).map(function(e){var t,r,n;return i("caret",t=e,r=s),n=r.loose?o[l.CARETLOOSE]:o[l.CARET],t.replace(n,function(e,r,n,s,o){var a;return i("caret",t,e,r,n,s,o),N(r)?a="":N(n)?a=">="+r+".0.0 <"+(+r+1)+".0.0":N(s)?a="0"===r?">="+r+"."+n+".0 <"+r+"."+(+n+1)+".0":">="+r+"."+n+".0 <"+(+r+1)+".0.0":o?(i("replaceCaret pr",o),a="0"===r?"0"===n?">="+r+"."+n+"."+s+"-"+o+" <"+r+"."+n+"."+(+s+1):">="+r+"."+n+"."+s+"-"+o+" <"+r+"."+(+n+1)+".0":">="+r+"."+n+"."+s+"-"+o+" <"+(+r+1)+".0.0"):(i("no pr"),a="0"===r?"0"===n?">="+r+"."+n+"."+s+" <"+r+"."+n+"."+(+s+1):">="+r+"."+n+"."+s+" <"+r+"."+(+n+1)+".0":">="+r+"."+n+"."+s+" <"+(+r+1)+".0.0"),i("caret return",a),a})}).join(" "),i("caret",t),a=t,c=r,t=a.trim().split(/\s+/).map(function(e){var t,r;return t=e,r=c.loose?o[l.TILDELOOSE]:o[l.TILDE],t.replace(r,function(e,r,n,s,o){var a;return i("tilde",t,e,r,n,s,o),N(r)?a="":N(n)?a=">="+r+".0.0 <"+(+r+1)+".0.0":N(s)?a=">="+r+"."+n+".0 <"+r+"."+(+n+1)+".0":o?(i("replaceTilde pr",o),a=">="+r+"."+n+"."+s+"-"+o+" <"+r+"."+(+n+1)+".0"):a=">="+r+"."+n+"."+s+" <"+r+"."+(+n+1)+".0",i("tilde return",a),a})}).join(" "),i("tildes",t),i("replaceXRanges",h=t,f=r),t=h.split(/\s+/).map(function(e){var t,r,n;return t=e,r=f,t=t.trim(),n=r.loose?o[l.XRANGELOOSE]:o[l.XRANGE],t.replace(n,function(e,n,s,o,a,l){i("xRange",t,e,n,s,o,a,l);var c=N(s),h=c||N(o),f=h||N(a);return"="===n&&f&&(n=""),l=r.includePrerelease?"-0":"",c?e=">"===n||"<"===n?"<0.0.0-0":"*":n&&f?(h&&(o=0),a=0,">"===n?(n=">=",h?(s=+s+1,o=0):o=+o+1,a=0):"<="===n&&(n="<",h?s=+s+1:o=+o+1),e=n+s+"."+o+"."+a+l):h?e=">="+s+".0.0"+l+" <"+(+s+1)+".0.0"+l:f&&(e=">="+s+"."+o+".0"+l+" <"+s+"."+(+o+1)+".0"+l),i("xRange return",e),e})}).join(" "),i("xrange",t),i("replaceStars",d=t,r),i("stars",t=d.trim().replace(o[l.STAR],"")),t},this).join(" ").split(/\s+/);return this.options.loose&&(s=s.filter(function(e){return!!e.match(n)})),s=s.map(function(e){return new C(e,this.options)},this)},k.prototype.intersects=function(e,t){if(!(e instanceof k))throw TypeError("a Range is required");return this.set.some(function(r){return R(r,t)&&e.set.some(function(e){return R(e,t)&&r.every(function(r){return e.every(function(e){return r.intersects(e,t)})})})})},r.toComparators=function(e,t){return new k(e,t).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})},k.prototype.test=function(e){if(!e)return!1;if("string"==typeof e)try{e=new A(e,this.options)}catch(e){return!1}for(var t=0;t<this.set.length;t++)if(function(e,t,r){for(var n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(n=0;n<e.length;n++)if(i(e[n].semver),e[n].semver!==B&&e[n].semver.prerelease.length>0){var s=e[n].semver;if(s.major===t.major&&s.minor===t.minor&&s.patch===t.patch)return!0}return!1}return!0}(this.set[t],e,this.options))return!0;return!1},r.satisfies=L,r.maxSatisfying=function(e,t,r){var i=null,n=null;try{var s=new k(t,r)}catch(e){return null}return e.forEach(function(e){s.test(e)&&(!i||-1===n.compare(e))&&(n=new A(i=e,r))}),i},r.minSatisfying=function(e,t,r){var i=null,n=null;try{var s=new k(t,r)}catch(e){return null}return e.forEach(function(e){s.test(e)&&(!i||1===n.compare(e))&&(n=new A(i=e,r))}),i},r.minVersion=function(e,t){e=new k(e,t);var r=new A("0.0.0");if(e.test(r)||(r=new A("0.0.0-0"),e.test(r)))return r;r=null;for(var i=0;i<e.set.length;++i)e.set[i].forEach(function(e){var t=new A(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":(!r||I(r,t))&&(r=t);break;case"<":case"<=":break;default:throw Error("Unexpected operation: "+e.operator)}});return r&&e.test(r)?r:null},r.validRange=function(e,t){try{return new k(e,t).range||"*"}catch(e){return null}},r.ltr=function(e,t,r){return U(e,t,"<",r)},r.gtr=function(e,t,r){return U(e,t,">",r)},r.outside=U,r.prerelease=function(e,t){var r=p(e,t);return r&&r.prerelease.length?r.prerelease:null},r.intersects=function(e,t,r){return e=new k(e,r),t=new k(t,r),e.intersects(t)},r.coerce=function(e,t){if(e instanceof A)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;var r,i=null;if((t=t||{}).rtl){for(;(r=o[l.COERCERTL].exec(e))&&(!i||i.index+i[0].length!==e.length);)i&&r.index+r[0].length===i.index+i[0].length||(i=r),o[l.COERCERTL].lastIndex=r.index+r[1].length+r[2].length;o[l.COERCERTL].lastIndex=-1}else i=e.match(o[l.COERCE]);return null===i?null:p(i[2]+"."+(i[3]||"0")+"."+(i[4]||"0"),t)}},804340,(e,t,r)=>{"use strict";let i=e.r(522734),n=e.r(814747),{promisify:s}=e.r(224361),o=e.r(794996).satisfies(process.version,">=10.12.0"),a=e=>{},l=e=>({mode:511,fs:i,...e}),c=e=>{let t=Error(`operation not permitted, mkdir '${e}'`);return t.code="EPERM",t.errno=-4048,t.path=e,t.syscall="mkdir",t};t.exports=async(e,t)=>{a(e);let r=s((t=l(t)).fs.mkdir),h=s(t.fs.stat);if(o&&t.fs.mkdir===i.mkdir){let i=n.resolve(e);return await r(i,{mode:t.mode,recursive:!0}),i}let f=async e=>{try{return await r(e,t.mode),e}catch(t){if("EPERM"===t.code)throw t;if("ENOENT"===t.code){if(n.dirname(e)===e)throw c(e);if(t.message.includes("null bytes"))throw t;return await f(n.dirname(e)),f(e)}try{if(!(await h(e)).isDirectory())throw Error("The path is not a directory")}catch(e){throw t}return e}};return f(n.resolve(e))},t.exports.sync=(e,t)=>{if(a(e),t=l(t),o&&t.fs.mkdirSync===i.mkdirSync){let r=n.resolve(e);return i.mkdirSync(r,{mode:t.mode,recursive:!0}),r}let r=e=>{try{t.fs.mkdirSync(e,t.mode)}catch(i){if("EPERM"===i.code)throw i;if("ENOENT"===i.code){if(n.dirname(e)===e)throw c(e);if(i.message.includes("null bytes"))throw i;return r(n.dirname(e)),r(e)}try{if(!t.fs.statSync(e).isDirectory())throw Error("The path is not a directory")}catch(e){throw i}}return e};return r(n.resolve(e))}},70201,(e,t,r)=>{t.exports=function(e){var t=[];return e.forEach(function(e){/^[A-Za-z0-9_\/-]+$/.test(e)||(e=(e="'"+e.replace(/'/g,"'\\''")+"'").replace(/^(?:'')+/g,"").replace(/\\'''/g,"\\'")),t.push(e)}),t.join(" ")}},504446,(e,t,r)=>{t.exports=e.x("net",()=>require("net"))},233405,(e,t,r)=>{t.exports=e.x("child_process",()=>require("child_process"))},421496,(e,t,r)=>{t.exports={newInvalidAsn1Error:function(e){var t=Error();return t.name="InvalidAsn1Error",t.message=e||"",t}}},199932,(e,t,r)=>{t.exports={EOC:0,Boolean:1,Integer:2,BitString:3,OctetString:4,Null:5,OID:6,ObjectDescriptor:7,External:8,Real:9,Enumeration:10,PDV:11,Utf8String:12,RelativeOID:13,Sequence:16,Set:17,NumericString:18,PrintableString:19,T61String:20,VideotexString:21,IA5String:22,UTCTime:23,GeneralizedTime:24,GraphicString:25,VisibleString:26,GeneralString:28,UniversalString:29,CharacterString:30,BMPString:31,Constructor:32,Context:128}},433853,(e,t,r)=>{"use strict";var i,n=e.r(500874),s=n.Buffer,o={};for(i in n)n.hasOwnProperty(i)&&"SlowBuffer"!==i&&"Buffer"!==i&&(o[i]=n[i]);var a=o.Buffer={};for(i in s)s.hasOwnProperty(i)&&"allocUnsafe"!==i&&"allocUnsafeSlow"!==i&&(a[i]=s[i]);if(o.Buffer.prototype=s.prototype,a.from&&a.from!==Uint8Array.from||(a.from=function(e,t,r){if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type '+typeof e);if(e&&void 0===e.length)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);return s(e,t,r)}),a.alloc||(a.alloc=function(e,t,r){if("number"!=typeof e)throw TypeError('The "size" argument must be of type number. Received type '+typeof e);if(e<0||e>=2*0x40000000)throw RangeError('The value "'+e+'" is invalid for option "size"');var i=s(e);return t&&0!==t.length?"string"==typeof r?i.fill(t,r):i.fill(t):i.fill(0),i}),!o.kStringMaxLength)try{o.kStringMaxLength=process.binding("buffer").kStringMaxLength}catch(e){}!o.constants&&(o.constants={MAX_LENGTH:o.kMaxLength},o.kStringMaxLength&&(o.constants.MAX_STRING_LENGTH=o.kStringMaxLength)),t.exports=o},477672,(e,t,r)=>{var i=e.r(449719),n=e.r(433853).Buffer,s=e.r(199932),o=e.r(421496).newInvalidAsn1Error;function a(e){if(!e||!n.isBuffer(e))throw TypeError("data must be a node Buffer");this._buf=e,this._size=e.length,this._len=0,this._offset=0}Object.defineProperty(a.prototype,"length",{enumerable:!0,get:function(){return this._len}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){return this._offset}}),Object.defineProperty(a.prototype,"remain",{get:function(){return this._size-this._offset}}),Object.defineProperty(a.prototype,"buffer",{get:function(){return this._buf.slice(this._offset)}}),a.prototype.readByte=function(e){if(this._size-this._offset<1)return null;var t=255&this._buf[this._offset];return e||(this._offset+=1),t},a.prototype.peek=function(){return this.readByte(!0)},a.prototype.readLength=function(e){if(void 0===e&&(e=this._offset),e>=this._size)return null;var t=255&this._buf[e++];if(null===t)return null;if((128&t)==128){if(0==(t&=127))throw o("Indefinite length not supported");if(t>4)throw o("encoding too long");if(this._size-e<t)return null;this._len=0;for(var r=0;r<t;r++)this._len=(this._len<<8)+(255&this._buf[e++])}else this._len=t;return e},a.prototype.readSequence=function(e){var t=this.peek();if(null===t)return null;if(void 0!==e&&e!==t)throw o("Expected 0x"+e.toString(16)+": got 0x"+t.toString(16));var r=this.readLength(this._offset+1);return null===r?null:(this._offset=r,t)},a.prototype.readInt=function(){return this._readTag(s.Integer)},a.prototype.readBoolean=function(){return 0!==this._readTag(s.Boolean)},a.prototype.readEnumeration=function(){return this._readTag(s.Enumeration)},a.prototype.readString=function(e,t){e||(e=s.OctetString);var r=this.peek();if(null===r)return null;if(r!==e)throw o("Expected 0x"+e.toString(16)+": got 0x"+r.toString(16));var i=this.readLength(this._offset+1);if(null===i||this.length>this._size-i)return null;if(this._offset=i,0===this.length)return t?n.alloc(0):"";var a=this._buf.slice(this._offset,this._offset+this.length);return this._offset+=this.length,t?a:a.toString("utf8")},a.prototype.readOID=function(e){e||(e=s.OID);var t=this.readString(e,!0);if(null===t)return null;for(var r=[],i=0,n=0;n<t.length;n++){var o=255&t[n];i<<=7,i+=127&o,(128&o)==0&&(r.push(i),i=0)}return i=r.shift(),r.unshift(i%40),r.unshift(i/40|0),r.join(".")},a.prototype._readTag=function(e){i.ok(void 0!==e);var t=this.peek();if(null===t)return null;if(t!==e)throw o("Expected 0x"+e.toString(16)+": got 0x"+t.toString(16));var r=this.readLength(this._offset+1);if(null===r)return null;if(this.length>4)throw o("Integer too long: "+this.length);if(this.length>this._size-r)return null;this._offset=r;for(var n=this._buf[this._offset],s=0,a=0;a<this.length;a++)s<<=8,s|=255&this._buf[this._offset++];return(128&n)==128&&4!==a&&(s-=1<<8*a),0|s},t.exports=a},584422,(e,t,r)=>{var i=e.r(449719),n=e.r(433853).Buffer,s=e.r(199932),o=e.r(421496).newInvalidAsn1Error,a={size:1024,growthFactor:8};function l(e){var t;t=e||{},i.ok(a),i.equal(typeof a,"object"),i.ok(t),i.equal(typeof t,"object"),Object.getOwnPropertyNames(a).forEach(function(e){if(!t[e]){var r=Object.getOwnPropertyDescriptor(a,e);Object.defineProperty(t,e,r)}}),e=t,this._buf=n.alloc(e.size||1024),this._size=this._buf.length,this._offset=0,this._options=e,this._seq=[]}Object.defineProperty(l.prototype,"buffer",{get:function(){if(this._seq.length)throw o(this._seq.length+" unended sequence(s)");return this._buf.slice(0,this._offset)}}),l.prototype.writeByte=function(e){if("number"!=typeof e)throw TypeError("argument must be a Number");this._ensure(1),this._buf[this._offset++]=e},l.prototype.writeInt=function(e,t){if("number"!=typeof e)throw TypeError("argument must be a Number");"number"!=typeof t&&(t=s.Integer);for(var r=4;((0xff800000&e)==0||(0xff800000&e)==-8388608)&&r>1;)r--,e<<=8;if(r>4)throw o("BER ints cannot be > 0xffffffff");for(this._ensure(2+r),this._buf[this._offset++]=t,this._buf[this._offset++]=r;r-- >0;)this._buf[this._offset++]=(0xff000000&e)>>>24,e<<=8},l.prototype.writeNull=function(){this.writeByte(s.Null),this.writeByte(0)},l.prototype.writeEnumeration=function(e,t){if("number"!=typeof e)throw TypeError("argument must be a Number");return"number"!=typeof t&&(t=s.Enumeration),this.writeInt(e,t)},l.prototype.writeBoolean=function(e,t){if("boolean"!=typeof e)throw TypeError("argument must be a Boolean");"number"!=typeof t&&(t=s.Boolean),this._ensure(3),this._buf[this._offset++]=t,this._buf[this._offset++]=1,this._buf[this._offset++]=255*!!e},l.prototype.writeString=function(e,t){if("string"!=typeof e)throw TypeError("argument must be a string (was: "+typeof e+")");"number"!=typeof t&&(t=s.OctetString);var r=n.byteLength(e);this.writeByte(t),this.writeLength(r),r&&(this._ensure(r),this._buf.write(e,this._offset),this._offset+=r)},l.prototype.writeBuffer=function(e,t){if("number"!=typeof t)throw TypeError("tag must be a number");if(!n.isBuffer(e))throw TypeError("argument must be a buffer");this.writeByte(t),this.writeLength(e.length),this._ensure(e.length),e.copy(this._buf,this._offset,0,e.length),this._offset+=e.length},l.prototype.writeStringArray=function(e){if(!e instanceof Array)throw TypeError("argument must be an Array[String]");var t=this;e.forEach(function(e){t.writeString(e)})},l.prototype.writeOID=function(e,t){if("string"!=typeof e)throw TypeError("argument must be a string");if("number"!=typeof t&&(t=s.OID),!/^([0-9]+\.){3,}[0-9]+$/.test(e))throw Error("argument is not a valid OID string");var r=e.split("."),i=[];i.push(40*parseInt(r[0],10)+parseInt(r[1],10)),r.slice(2).forEach(function(e){var t;(t=parseInt(e,10))<128?i.push(t):(t<16384?i.push(t>>>7|128):(t<2097152?i.push(t>>>14|128):(t<0x10000000?i.push(t>>>21|128):(i.push((t>>>28|128)&255),i.push((t>>>21|128)&255)),i.push((t>>>14|128)&255)),i.push((t>>>7|128)&255)),i.push(127&t))});var n=this;this._ensure(2+i.length),this.writeByte(t),this.writeLength(i.length),i.forEach(function(e){n.writeByte(e)})},l.prototype.writeLength=function(e){if("number"!=typeof e)throw TypeError("argument must be a Number");if(this._ensure(4),e<=127)this._buf[this._offset++]=e;else if(e<=255)this._buf[this._offset++]=129,this._buf[this._offset++]=e;else if(e<=65535)this._buf[this._offset++]=130,this._buf[this._offset++]=e>>8,this._buf[this._offset++]=e;else if(e<=0xffffff)this._buf[this._offset++]=131,this._buf[this._offset++]=e>>16,this._buf[this._offset++]=e>>8,this._buf[this._offset++]=e;else throw o("Length too long (> 4 bytes)")},l.prototype.startSequence=function(e){"number"!=typeof e&&(e=s.Sequence|s.Constructor),this.writeByte(e),this._seq.push(this._offset),this._ensure(3),this._offset+=3},l.prototype.endSequence=function(){var e=this._seq.pop(),t=e+3,r=this._offset-t;if(r<=127)this._shift(t,r,-2),this._buf[e]=r;else if(r<=255)this._shift(t,r,-1),this._buf[e]=129,this._buf[e+1]=r;else if(r<=65535)this._buf[e]=130,this._buf[e+1]=r>>8,this._buf[e+2]=r;else if(r<=0xffffff)this._shift(t,r,1),this._buf[e]=131,this._buf[e+1]=r>>16,this._buf[e+2]=r>>8,this._buf[e+3]=r;else throw o("Sequence too long")},l.prototype._shift=function(e,t,r){i.ok(void 0!==e),i.ok(void 0!==t),i.ok(r),this._buf.copy(this._buf,e+r,e,e+t),this._offset+=r},l.prototype._ensure=function(e){if(i.ok(e),this._size-this._offset<e){var t=this._size*this._options.growthFactor;t-this._offset<e&&(t+=e);var r=n.alloc(t);this._buf.copy(r,0,0,this._offset),this._buf=r,this._size=t}},t.exports=l},223277,(e,t,r)=>{var i=e.r(421496),n=e.r(199932);for(var s in t.exports={Reader:e.r(477672),Writer:e.r(584422)},n)n.hasOwnProperty(s)&&(t.exports[s]=n[s]);for(var o in i)i.hasOwnProperty(o)&&(t.exports[o]=i[o])},342085,(e,t,r)=>{var i=e.r(223277);t.exports={Ber:i,BerReader:i.Reader,BerWriter:i.Writer}},790877,(e,t,r)=>{!function(t){"use strict";var r,i=function(e){var t,r=new Float64Array(16);if(e)for(t=0;t<e.length;t++)r[t]=e[t];return r},n=function(){throw Error("no PRNG")},s=new Uint8Array(16),o=new Uint8Array(32);o[0]=9;var a=i(),l=i([1]),c=i([56129,1]),h=i([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),f=i([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),d=i([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),u=i([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),g=i([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function p(e,t,r,i){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r,e[t+4]=i>>24&255,e[t+5]=i>>16&255,e[t+6]=i>>8&255,e[t+7]=255&i}function A(e,t,r,i,n){var s,o=0;for(s=0;s<n;s++)o|=e[t+s]^r[i+s];return(1&o-1>>>8)-1}function _(e,t,r,i){return A(e,t,r,i,16)}function E(e,t,r,i){return A(e,t,r,i,32)}function b(e,t,r,i){!function(e,t,r,i){for(var n,s=255&i[0]|(255&i[1])<<8|(255&i[2])<<16|(255&i[3])<<24,o=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,l=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,h=255&i[4]|(255&i[5])<<8|(255&i[6])<<16|(255&i[7])<<24,f=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,d=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,u=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,g=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,p=255&i[8]|(255&i[9])<<8|(255&i[10])<<16|(255&i[11])<<24,A=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,_=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,E=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,b=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,I=255&i[12]|(255&i[13])<<8|(255&i[14])<<16|(255&i[15])<<24,y=s,m=o,S=a,x=l,w=c,v=h,C=f,B=d,k=u,R=g,N=p,T=A,L=_,U=E,O=b,P=I,Q=0;Q<20;Q+=2)w^=(n=y+L|0)<<7|n>>>25,k^=(n=w+y|0)<<9|n>>>23,L^=(n=k+w|0)<<13|n>>>19,y^=(n=L+k|0)<<18|n>>>14,R^=(n=v+m|0)<<7|n>>>25,U^=(n=R+v|0)<<9|n>>>23,m^=(n=U+R|0)<<13|n>>>19,v^=(n=m+U|0)<<18|n>>>14,O^=(n=N+C|0)<<7|n>>>25,S^=(n=O+N|0)<<9|n>>>23,C^=(n=S+O|0)<<13|n>>>19,N^=(n=C+S|0)<<18|n>>>14,x^=(n=P+T|0)<<7|n>>>25,B^=(n=x+P|0)<<9|n>>>23,T^=(n=B+x|0)<<13|n>>>19,P^=(n=T+B|0)<<18|n>>>14,m^=(n=y+x|0)<<7|n>>>25,S^=(n=m+y|0)<<9|n>>>23,x^=(n=S+m|0)<<13|n>>>19,y^=(n=x+S|0)<<18|n>>>14,C^=(n=v+w|0)<<7|n>>>25,B^=(n=C+v|0)<<9|n>>>23,w^=(n=B+C|0)<<13|n>>>19,v^=(n=w+B|0)<<18|n>>>14,T^=(n=N+R|0)<<7|n>>>25,k^=(n=T+N|0)<<9|n>>>23,R^=(n=k+T|0)<<13|n>>>19,N^=(n=R+k|0)<<18|n>>>14,L^=(n=P+O|0)<<7|n>>>25,U^=(n=L+P|0)<<9|n>>>23,O^=(n=U+L|0)<<13|n>>>19,P^=(n=O+U|0)<<18|n>>>14;y=y+s|0,m=m+o|0,S=S+a|0,x=x+l|0,w=w+c|0,v=v+h|0,C=C+f|0,B=B+d|0,k=k+u|0,R=R+g|0,N=N+p|0,T=T+A|0,L=L+_|0,U=U+E|0,O=O+b|0,P=P+I|0,e[0]=y>>>0&255,e[1]=y>>>8&255,e[2]=y>>>16&255,e[3]=y>>>24&255,e[4]=m>>>0&255,e[5]=m>>>8&255,e[6]=m>>>16&255,e[7]=m>>>24&255,e[8]=S>>>0&255,e[9]=S>>>8&255,e[10]=S>>>16&255,e[11]=S>>>24&255,e[12]=x>>>0&255,e[13]=x>>>8&255,e[14]=x>>>16&255,e[15]=x>>>24&255,e[16]=w>>>0&255,e[17]=w>>>8&255,e[18]=w>>>16&255,e[19]=w>>>24&255,e[20]=v>>>0&255,e[21]=v>>>8&255,e[22]=v>>>16&255,e[23]=v>>>24&255,e[24]=C>>>0&255,e[25]=C>>>8&255,e[26]=C>>>16&255,e[27]=C>>>24&255,e[28]=B>>>0&255,e[29]=B>>>8&255,e[30]=B>>>16&255,e[31]=B>>>24&255,e[32]=k>>>0&255,e[33]=k>>>8&255,e[34]=k>>>16&255,e[35]=k>>>24&255,e[36]=R>>>0&255,e[37]=R>>>8&255,e[38]=R>>>16&255,e[39]=R>>>24&255,e[40]=N>>>0&255,e[41]=N>>>8&255,e[42]=N>>>16&255,e[43]=N>>>24&255,e[44]=T>>>0&255,e[45]=T>>>8&255,e[46]=T>>>16&255,e[47]=T>>>24&255,e[48]=L>>>0&255,e[49]=L>>>8&255,e[50]=L>>>16&255,e[51]=L>>>24&255,e[52]=U>>>0&255,e[53]=U>>>8&255,e[54]=U>>>16&255,e[55]=U>>>24&255,e[56]=O>>>0&255,e[57]=O>>>8&255,e[58]=O>>>16&255,e[59]=O>>>24&255,e[60]=P>>>0&255,e[61]=P>>>8&255,e[62]=P>>>16&255,e[63]=P>>>24&255}(e,t,r,i)}function I(e,t,r,i){!function(e,t,r,i){for(var n,s=255&i[0]|(255&i[1])<<8|(255&i[2])<<16|(255&i[3])<<24,o=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,l=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,h=255&i[4]|(255&i[5])<<8|(255&i[6])<<16|(255&i[7])<<24,f=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,d=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,u=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,g=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,p=255&i[8]|(255&i[9])<<8|(255&i[10])<<16|(255&i[11])<<24,A=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,_=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,E=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,b=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,I=255&i[12]|(255&i[13])<<8|(255&i[14])<<16|(255&i[15])<<24,y=s,m=o,S=a,x=l,w=c,v=h,C=f,B=d,k=u,R=g,N=p,T=A,L=_,U=E,O=b,P=I,Q=0;Q<20;Q+=2)w^=(n=y+L|0)<<7|n>>>25,k^=(n=w+y|0)<<9|n>>>23,L^=(n=k+w|0)<<13|n>>>19,y^=(n=L+k|0)<<18|n>>>14,R^=(n=v+m|0)<<7|n>>>25,U^=(n=R+v|0)<<9|n>>>23,m^=(n=U+R|0)<<13|n>>>19,v^=(n=m+U|0)<<18|n>>>14,O^=(n=N+C|0)<<7|n>>>25,S^=(n=O+N|0)<<9|n>>>23,C^=(n=S+O|0)<<13|n>>>19,N^=(n=C+S|0)<<18|n>>>14,x^=(n=P+T|0)<<7|n>>>25,B^=(n=x+P|0)<<9|n>>>23,T^=(n=B+x|0)<<13|n>>>19,P^=(n=T+B|0)<<18|n>>>14,m^=(n=y+x|0)<<7|n>>>25,S^=(n=m+y|0)<<9|n>>>23,x^=(n=S+m|0)<<13|n>>>19,y^=(n=x+S|0)<<18|n>>>14,C^=(n=v+w|0)<<7|n>>>25,B^=(n=C+v|0)<<9|n>>>23,w^=(n=B+C|0)<<13|n>>>19,v^=(n=w+B|0)<<18|n>>>14,T^=(n=N+R|0)<<7|n>>>25,k^=(n=T+N|0)<<9|n>>>23,R^=(n=k+T|0)<<13|n>>>19,N^=(n=R+k|0)<<18|n>>>14,L^=(n=P+O|0)<<7|n>>>25,U^=(n=L+P|0)<<9|n>>>23,O^=(n=U+L|0)<<13|n>>>19,P^=(n=O+U|0)<<18|n>>>14;e[0]=y>>>0&255,e[1]=y>>>8&255,e[2]=y>>>16&255,e[3]=y>>>24&255,e[4]=v>>>0&255,e[5]=v>>>8&255,e[6]=v>>>16&255,e[7]=v>>>24&255,e[8]=N>>>0&255,e[9]=N>>>8&255,e[10]=N>>>16&255,e[11]=N>>>24&255,e[12]=P>>>0&255,e[13]=P>>>8&255,e[14]=P>>>16&255,e[15]=P>>>24&255,e[16]=C>>>0&255,e[17]=C>>>8&255,e[18]=C>>>16&255,e[19]=C>>>24&255,e[20]=B>>>0&255,e[21]=B>>>8&255,e[22]=B>>>16&255,e[23]=B>>>24&255,e[24]=k>>>0&255,e[25]=k>>>8&255,e[26]=k>>>16&255,e[27]=k>>>24&255,e[28]=R>>>0&255,e[29]=R>>>8&255,e[30]=R>>>16&255,e[31]=R>>>24&255}(e,t,r,i)}var y=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function m(e,t,r,i,n,s,o){var a,l,c=new Uint8Array(16),h=new Uint8Array(64);for(l=0;l<16;l++)c[l]=0;for(l=0;l<8;l++)c[l]=s[l];for(;n>=64;){for(b(h,c,o,y),l=0;l<64;l++)e[t+l]=r[i+l]^h[l];for(l=8,a=1;l<16;l++)a=a+(255&c[l])|0,c[l]=255&a,a>>>=8;n-=64,t+=64,i+=64}if(n>0)for(b(h,c,o,y),l=0;l<n;l++)e[t+l]=r[i+l]^h[l];return 0}function S(e,t,r,i,n){var s,o,a=new Uint8Array(16),l=new Uint8Array(64);for(o=0;o<16;o++)a[o]=0;for(o=0;o<8;o++)a[o]=i[o];for(;r>=64;){for(b(l,a,n,y),o=0;o<64;o++)e[t+o]=l[o];for(o=8,s=1;o<16;o++)s=s+(255&a[o])|0,a[o]=255&s,s>>>=8;r-=64,t+=64}if(r>0)for(b(l,a,n,y),o=0;o<r;o++)e[t+o]=l[o];return 0}function x(e,t,r,i,n){var s=new Uint8Array(32);I(s,i,n,y);for(var o=new Uint8Array(8),a=0;a<8;a++)o[a]=i[a+16];return S(e,t,r,o,s)}function w(e,t,r,i,n,s,o){var a=new Uint8Array(32);I(a,s,o,y);for(var l=new Uint8Array(8),c=0;c<8;c++)l[c]=s[c+16];return m(e,t,r,i,n,l,a)}var v=function(e){var t,r,i,n,s,o,a,l;this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0,t=255&e[0]|(255&e[1])<<8,this.r[0]=8191&t,r=255&e[2]|(255&e[3])<<8,this.r[1]=(t>>>13|r<<3)&8191,i=255&e[4]|(255&e[5])<<8,this.r[2]=(r>>>10|i<<6)&7939,n=255&e[6]|(255&e[7])<<8,this.r[3]=(i>>>7|n<<9)&8191,s=255&e[8]|(255&e[9])<<8,this.r[4]=(n>>>4|s<<12)&255,this.r[5]=s>>>1&8190,o=255&e[10]|(255&e[11])<<8,this.r[6]=(s>>>14|o<<2)&8191,a=255&e[12]|(255&e[13])<<8,this.r[7]=(o>>>11|a<<5)&8065,l=255&e[14]|(255&e[15])<<8,this.r[8]=(a>>>8|l<<8)&8191,this.r[9]=l>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};function C(e,t,r,i,n,s){var o=new v(s);return o.update(r,i,n),o.finish(e,t),0}function B(e,t,r,i,n,s){var o=new Uint8Array(16);return C(o,0,r,i,n,s),_(e,t,o,0)}function k(e,t,r,i,n){var s;if(r<32)return -1;for(w(e,0,t,0,r,i,n),C(e,16,e,32,r-32,e),s=0;s<16;s++)e[s]=0;return 0}function R(e,t,r,i,n){var s,o=new Uint8Array(32);if(r<32||(x(o,0,32,i,n),0!==B(t,16,t,32,r-32,o)))return -1;for(w(e,0,t,0,r,i,n),s=0;s<32;s++)e[s]=0;return 0}function N(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function T(e){var t,r,i=1;for(t=0;t<16;t++)i=Math.floor((r=e[t]+i+65535)/65536),e[t]=r-65536*i;e[0]+=i-1+37*(i-1)}function L(e,t,r){for(var i,n=~(r-1),s=0;s<16;s++)i=n&(e[s]^t[s]),e[s]^=i,t[s]^=i}function U(e,t){var r,n,s,o=i(),a=i();for(r=0;r<16;r++)a[r]=t[r];for(T(a),T(a),T(a),n=0;n<2;n++){for(r=1,o[0]=a[0]-65517;r<15;r++)o[r]=a[r]-65535-(o[r-1]>>16&1),o[r-1]&=65535;o[15]=a[15]-32767-(o[14]>>16&1),s=o[15]>>16&1,o[14]&=65535,L(a,o,1-s)}for(r=0;r<16;r++)e[2*r]=255&a[r],e[2*r+1]=a[r]>>8}function O(e,t){var r=new Uint8Array(32),i=new Uint8Array(32);return U(r,e),U(i,t),E(r,0,i,0)}function P(e){var t=new Uint8Array(32);return U(t,e),1&t[0]}function Q(e,t){var r;for(r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function D(e,t,r){for(var i=0;i<16;i++)e[i]=t[i]+r[i]}function H(e,t,r){for(var i=0;i<16;i++)e[i]=t[i]-r[i]}function F(e,t,r){var i,n,s=0,o=0,a=0,l=0,c=0,h=0,f=0,d=0,u=0,g=0,p=0,A=0,_=0,E=0,b=0,I=0,y=0,m=0,S=0,x=0,w=0,v=0,C=0,B=0,k=0,R=0,N=0,T=0,L=0,U=0,O=0,P=r[0],Q=r[1],D=r[2],H=r[3],F=r[4],M=r[5],K=r[6],W=r[7],q=r[8],$=r[9],G=r[10],Y=r[11],j=r[12],X=r[13],V=r[14],z=r[15];s+=(i=t[0])*P,o+=i*Q,a+=i*D,l+=i*H,c+=i*F,h+=i*M,f+=i*K,d+=i*W,u+=i*q,g+=i*$,p+=i*G,A+=i*Y,_+=i*j,E+=i*X,b+=i*V,I+=i*z,o+=(i=t[1])*P,a+=i*Q,l+=i*D,c+=i*H,h+=i*F,f+=i*M,d+=i*K,u+=i*W,g+=i*q,p+=i*$,A+=i*G,_+=i*Y,E+=i*j,b+=i*X,I+=i*V,y+=i*z,a+=(i=t[2])*P,l+=i*Q,c+=i*D,h+=i*H,f+=i*F,d+=i*M,u+=i*K,g+=i*W,p+=i*q,A+=i*$,_+=i*G,E+=i*Y,b+=i*j,I+=i*X,y+=i*V,m+=i*z,l+=(i=t[3])*P,c+=i*Q,h+=i*D,f+=i*H,d+=i*F,u+=i*M,g+=i*K,p+=i*W,A+=i*q,_+=i*$,E+=i*G,b+=i*Y,I+=i*j,y+=i*X,m+=i*V,S+=i*z,c+=(i=t[4])*P,h+=i*Q,f+=i*D,d+=i*H,u+=i*F,g+=i*M,p+=i*K,A+=i*W,_+=i*q,E+=i*$,b+=i*G,I+=i*Y,y+=i*j,m+=i*X,S+=i*V,x+=i*z,h+=(i=t[5])*P,f+=i*Q,d+=i*D,u+=i*H,g+=i*F,p+=i*M,A+=i*K,_+=i*W,E+=i*q,b+=i*$,I+=i*G,y+=i*Y,m+=i*j,S+=i*X,x+=i*V,w+=i*z,f+=(i=t[6])*P,d+=i*Q,u+=i*D,g+=i*H,p+=i*F,A+=i*M,_+=i*K,E+=i*W,b+=i*q,I+=i*$,y+=i*G,m+=i*Y,S+=i*j,x+=i*X,w+=i*V,v+=i*z,d+=(i=t[7])*P,u+=i*Q,g+=i*D,p+=i*H,A+=i*F,_+=i*M,E+=i*K,b+=i*W,I+=i*q,y+=i*$,m+=i*G,S+=i*Y,x+=i*j,w+=i*X,v+=i*V,C+=i*z,u+=(i=t[8])*P,g+=i*Q,p+=i*D,A+=i*H,_+=i*F,E+=i*M,b+=i*K,I+=i*W,y+=i*q,m+=i*$,S+=i*G,x+=i*Y,w+=i*j,v+=i*X,C+=i*V,B+=i*z,g+=(i=t[9])*P,p+=i*Q,A+=i*D,_+=i*H,E+=i*F,b+=i*M,I+=i*K,y+=i*W,m+=i*q,S+=i*$,x+=i*G,w+=i*Y,v+=i*j,C+=i*X,B+=i*V,k+=i*z,p+=(i=t[10])*P,A+=i*Q,_+=i*D,E+=i*H,b+=i*F,I+=i*M,y+=i*K,m+=i*W,S+=i*q,x+=i*$,w+=i*G,v+=i*Y,C+=i*j,B+=i*X,k+=i*V,R+=i*z,A+=(i=t[11])*P,_+=i*Q,E+=i*D,b+=i*H,I+=i*F,y+=i*M,m+=i*K,S+=i*W,x+=i*q,w+=i*$,v+=i*G,C+=i*Y,B+=i*j,k+=i*X,R+=i*V,N+=i*z,_+=(i=t[12])*P,E+=i*Q,b+=i*D,I+=i*H,y+=i*F,m+=i*M,S+=i*K,x+=i*W,w+=i*q,v+=i*$,C+=i*G,B+=i*Y,k+=i*j,R+=i*X,N+=i*V,T+=i*z,E+=(i=t[13])*P,b+=i*Q,I+=i*D,y+=i*H,m+=i*F,S+=i*M,x+=i*K,w+=i*W,v+=i*q,C+=i*$,B+=i*G,k+=i*Y,R+=i*j,N+=i*X,T+=i*V,L+=i*z,b+=(i=t[14])*P,I+=i*Q,y+=i*D,m+=i*H,S+=i*F,x+=i*M,w+=i*K,v+=i*W,C+=i*q,B+=i*$,k+=i*G,R+=i*Y,N+=i*j,T+=i*X,L+=i*V,U+=i*z,I+=(i=t[15])*P,y+=i*Q,m+=i*D,S+=i*H,x+=i*F,w+=i*M,v+=i*K,C+=i*W,B+=i*q,k+=i*$,R+=i*G,N+=i*Y,T+=i*j,L+=i*X,U+=i*V,O+=i*z,s+=38*y,o+=38*m,a+=38*S,l+=38*x,c+=38*w,h+=38*v,f+=38*C,d+=38*B,u+=38*k,g+=38*R,p+=38*N,A+=38*T,_+=38*L,E+=38*U,b+=38*O,n=Math.floor((i=s+(n=1)+65535)/65536),s=i-65536*n,n=Math.floor((i=o+n+65535)/65536),o=i-65536*n,n=Math.floor((i=a+n+65535)/65536),a=i-65536*n,n=Math.floor((i=l+n+65535)/65536),l=i-65536*n,n=Math.floor((i=c+n+65535)/65536),c=i-65536*n,n=Math.floor((i=h+n+65535)/65536),h=i-65536*n,n=Math.floor((i=f+n+65535)/65536),f=i-65536*n,n=Math.floor((i=d+n+65535)/65536),d=i-65536*n,n=Math.floor((i=u+n+65535)/65536),u=i-65536*n,n=Math.floor((i=g+n+65535)/65536),g=i-65536*n,n=Math.floor((i=p+n+65535)/65536),p=i-65536*n,n=Math.floor((i=A+n+65535)/65536),A=i-65536*n,n=Math.floor((i=_+n+65535)/65536),_=i-65536*n,n=Math.floor((i=E+n+65535)/65536),E=i-65536*n,n=Math.floor((i=b+n+65535)/65536),b=i-65536*n,n=Math.floor((i=I+n+65535)/65536),I=i-65536*n,s+=n-1+37*(n-1),n=Math.floor((i=s+(n=1)+65535)/65536),s=i-65536*n,n=Math.floor((i=o+n+65535)/65536),o=i-65536*n,n=Math.floor((i=a+n+65535)/65536),a=i-65536*n,n=Math.floor((i=l+n+65535)/65536),l=i-65536*n,n=Math.floor((i=c+n+65535)/65536),c=i-65536*n,n=Math.floor((i=h+n+65535)/65536),h=i-65536*n,n=Math.floor((i=f+n+65535)/65536),f=i-65536*n,n=Math.floor((i=d+n+65535)/65536),d=i-65536*n,n=Math.floor((i=u+n+65535)/65536),u=i-65536*n,n=Math.floor((i=g+n+65535)/65536),g=i-65536*n,n=Math.floor((i=p+n+65535)/65536),p=i-65536*n,n=Math.floor((i=A+n+65535)/65536),A=i-65536*n,n=Math.floor((i=_+n+65535)/65536),_=i-65536*n,n=Math.floor((i=E+n+65535)/65536),E=i-65536*n,n=Math.floor((i=b+n+65535)/65536),b=i-65536*n,n=Math.floor((i=I+n+65535)/65536),I=i-65536*n,s+=n-1+37*(n-1),e[0]=s,e[1]=o,e[2]=a,e[3]=l,e[4]=c,e[5]=h,e[6]=f,e[7]=d,e[8]=u,e[9]=g,e[10]=p,e[11]=A,e[12]=_,e[13]=E,e[14]=b,e[15]=I}function M(e,t){F(e,t,t)}function K(e,t){var r,n=i();for(r=0;r<16;r++)n[r]=t[r];for(r=253;r>=0;r--)M(n,n),2!==r&&4!==r&&F(n,n,t);for(r=0;r<16;r++)e[r]=n[r]}function W(e,t,r){var n,s,o=new Uint8Array(32),a=new Float64Array(80),l=i(),h=i(),f=i(),d=i(),u=i(),g=i();for(s=0;s<31;s++)o[s]=t[s];for(o[31]=127&t[31]|64,o[0]&=248,Q(a,r),s=0;s<16;s++)h[s]=a[s],d[s]=l[s]=f[s]=0;for(s=254,l[0]=d[0]=1;s>=0;--s)L(l,h,n=o[s>>>3]>>>(7&s)&1),L(f,d,n),D(u,l,f),H(l,l,f),D(f,h,d),H(h,h,d),M(d,u),M(g,l),F(l,f,l),F(f,h,u),D(u,l,f),H(l,l,f),M(h,l),H(f,d,g),F(l,f,c),D(l,l,d),F(f,f,l),F(l,d,g),F(d,h,a),M(h,u),L(l,h,n),L(f,d,n);for(s=0;s<16;s++)a[s+16]=l[s],a[s+32]=f[s],a[s+48]=h[s],a[s+64]=d[s];var p=a.subarray(32),A=a.subarray(16);return K(p,p),F(A,A,p),U(e,A),0}function q(e,t){return W(e,t,o)}function $(e,t){return n(t,32),q(e,t)}function G(e,t,r){var i=new Uint8Array(32);return W(i,r,t),I(e,s,i,y)}v.prototype.blocks=function(e,t,r){for(var i,n,s,o,a,l,c,h,f,d,u,g,p,A,_,E,b,I,y,m=2048*!this.fin,S=this.h[0],x=this.h[1],w=this.h[2],v=this.h[3],C=this.h[4],B=this.h[5],k=this.h[6],R=this.h[7],N=this.h[8],T=this.h[9],L=this.r[0],U=this.r[1],O=this.r[2],P=this.r[3],Q=this.r[4],D=this.r[5],H=this.r[6],F=this.r[7],M=this.r[8],K=this.r[9];r>=16;)S+=8191&(i=255&e[t+0]|(255&e[t+1])<<8),x+=(i>>>13|(n=255&e[t+2]|(255&e[t+3])<<8)<<3)&8191,w+=(n>>>10|(s=255&e[t+4]|(255&e[t+5])<<8)<<6)&8191,v+=(s>>>7|(o=255&e[t+6]|(255&e[t+7])<<8)<<9)&8191,C+=(o>>>4|(a=255&e[t+8]|(255&e[t+9])<<8)<<12)&8191,B+=a>>>1&8191,k+=(a>>>14|(l=255&e[t+10]|(255&e[t+11])<<8)<<2)&8191,R+=(l>>>11|(c=255&e[t+12]|(255&e[t+13])<<8)<<5)&8191,N+=(c>>>8|(h=255&e[t+14]|(255&e[t+15])<<8)<<8)&8191,T+=h>>>5|m,f=(d=(f=0)+S*L+5*K*x+5*M*w+5*F*v+5*H*C)>>>13,d&=8191,d+=5*D*B,d+=5*Q*k,d+=5*P*R,d+=5*O*N,d+=5*U*T,f+=d>>>13,d&=8191,f=(u=f+S*U+x*L+5*K*w+5*M*v+5*F*C)>>>13,u&=8191,u+=5*H*B,u+=5*D*k,u+=5*Q*R,u+=5*P*N,u+=5*O*T,f+=u>>>13,u&=8191,f=(g=f+S*O+x*U+w*L+5*K*v+5*M*C)>>>13,g&=8191,g+=5*F*B,g+=5*H*k,g+=5*D*R,g+=5*Q*N,g+=5*P*T,f+=g>>>13,g&=8191,f=(p=f+S*P+x*O+w*U+v*L+5*K*C)>>>13,p&=8191,p+=5*M*B,p+=5*F*k,p+=5*H*R,p+=5*D*N,p+=5*Q*T,f+=p>>>13,p&=8191,f=(A=f+S*Q+x*P+w*O+v*U+C*L)>>>13,A&=8191,A+=5*K*B,A+=5*M*k,A+=5*F*R,A+=5*H*N,A+=5*D*T,f+=A>>>13,A&=8191,f=(_=f+S*D+x*Q+w*P+v*O+C*U)>>>13,_&=8191,_+=B*L,_+=5*K*k,_+=5*M*R,_+=5*F*N,_+=5*H*T,f+=_>>>13,_&=8191,f=(E=f+S*H+x*D+w*Q+v*P+C*O)>>>13,E&=8191,E+=B*U,E+=k*L,E+=5*K*R,E+=5*M*N,E+=5*F*T,f+=E>>>13,E&=8191,f=(b=f+S*F+x*H+w*D+v*Q+C*P)>>>13,b&=8191,b+=B*O,b+=k*U,b+=R*L,b+=5*K*N,b+=5*M*T,f+=b>>>13,b&=8191,f=(I=f+S*M+x*F+w*H+v*D+C*Q)>>>13,I&=8191,I+=B*P,I+=k*O,I+=R*U,I+=N*L,I+=5*K*T,f+=I>>>13,I&=8191,f=(y=f+S*K+x*M+w*F+v*H+C*D)>>>13,y&=8191,y+=B*Q,y+=k*P,y+=R*O,y+=N*U,y+=T*L,f+=y>>>13,y&=8191,d=8191&(f=(f=(f<<2)+f|0)+d|0),f>>>=13,u+=f,S=d,x=u,w=g,v=p,C=A,B=_,k=E,R=b,N=I,T=y,t+=16,r-=16;this.h[0]=S,this.h[1]=x,this.h[2]=w,this.h[3]=v,this.h[4]=C,this.h[5]=B,this.h[6]=k,this.h[7]=R,this.h[8]=N,this.h[9]=T},v.prototype.finish=function(e,t){var r,i,n,s,o=new Uint16Array(10);if(this.leftover){for(s=this.leftover,this.buffer[s++]=1;s<16;s++)this.buffer[s]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,s=2;s<10;s++)this.h[s]+=r,r=this.h[s]>>>13,this.h[s]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,o[0]=this.h[0]+5,r=o[0]>>>13,o[0]&=8191,s=1;s<10;s++)o[s]=this.h[s]+r,r=o[s]>>>13,o[s]&=8191;for(o[9]-=8192,i=(1^r)-1,s=0;s<10;s++)o[s]&=i;for(s=0,i=~i;s<10;s++)this.h[s]=this.h[s]&i|o[s];for(s=1,this.h[0]=(this.h[0]|this.h[1]<<13)&65535,this.h[1]=(this.h[1]>>>3|this.h[2]<<10)&65535,this.h[2]=(this.h[2]>>>6|this.h[3]<<7)&65535,this.h[3]=(this.h[3]>>>9|this.h[4]<<4)&65535,this.h[4]=(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14)&65535,this.h[5]=(this.h[6]>>>2|this.h[7]<<11)&65535,this.h[6]=(this.h[7]>>>5|this.h[8]<<8)&65535,this.h[7]=(this.h[8]>>>8|this.h[9]<<5)&65535,n=this.h[0]+this.pad[0],this.h[0]=65535&n;s<8;s++)n=(this.h[s]+this.pad[s]|0)+(n>>>16)|0,this.h[s]=65535&n;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},v.prototype.update=function(e,t,r){var i,n;if(this.leftover){for((n=16-this.leftover)>r&&(n=r),i=0;i<n;i++)this.buffer[this.leftover+i]=e[t+i];if(r-=n,t+=n,this.leftover+=n,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(r>=16&&(n=r-r%16,this.blocks(e,t,n),t+=n,r-=n),r){for(i=0;i<r;i++)this.buffer[this.leftover+i]=e[t+i];this.leftover+=r}};var Y=[0x428a2f98,0xd728ae22,0x71374491,0x23ef65cd,0xb5c0fbcf,0xec4d3b2f,0xe9b5dba5,0x8189dbbc,0x3956c25b,0xf348b538,0x59f111f1,0xb605d019,0x923f82a4,0xaf194f9b,0xab1c5ed5,0xda6d8118,0xd807aa98,0xa3030242,0x12835b01,0x45706fbe,0x243185be,0x4ee4b28c,0x550c7dc3,0xd5ffb4e2,0x72be5d74,0xf27b896f,0x80deb1fe,0x3b1696b1,0x9bdc06a7,0x25c71235,0xc19bf174,0xcf692694,0xe49b69c1,0x9ef14ad2,0xefbe4786,0x384f25e3,0xfc19dc6,0x8b8cd5b5,0x240ca1cc,0x77ac9c65,0x2de92c6f,0x592b0275,0x4a7484aa,0x6ea6e483,0x5cb0a9dc,0xbd41fbd4,0x76f988da,0x831153b5,0x983e5152,0xee66dfab,0xa831c66d,0x2db43210,0xb00327c8,0x98fb213f,0xbf597fc7,0xbeef0ee4,0xc6e00bf3,0x3da88fc2,0xd5a79147,0x930aa725,0x6ca6351,0xe003826f,0x14292967,0xa0e6e70,0x27b70a85,0x46d22ffc,0x2e1b2138,0x5c26c926,0x4d2c6dfc,0x5ac42aed,0x53380d13,0x9d95b3df,0x650a7354,0x8baf63de,0x766a0abb,0x3c77b2a8,0x81c2c92e,0x47edaee6,0x92722c85,0x1482353b,0xa2bfe8a1,0x4cf10364,0xa81a664b,0xbc423001,0xc24b8b70,0xd0f89791,0xc76c51a3,0x654be30,0xd192e819,0xd6ef5218,0xd6990624,0x5565a910,0xf40e3585,0x5771202a,0x106aa070,0x32bbd1b8,0x19a4c116,0xb8d2d0c8,0x1e376c08,0x5141ab53,0x2748774c,0xdf8eeb99,0x34b0bcb5,0xe19b48a8,0x391c0cb3,0xc5c95a63,0x4ed8aa4a,0xe3418acb,0x5b9cca4f,0x7763e373,0x682e6ff3,0xd6b2b8a3,0x748f82ee,0x5defb2fc,0x78a5636f,0x43172f60,0x84c87814,0xa1f0ab72,0x8cc70208,0x1a6439ec,0x90befffa,0x23631e28,0xa4506ceb,0xde82bde9,0xbef9a3f7,0xb2c67915,0xc67178f2,0xe372532b,0xca273ece,0xea26619c,0xd186b8c7,0x21c0c207,0xeada7dd6,0xcde0eb1e,0xf57d4f7f,0xee6ed178,0x6f067aa,0x72176fba,0xa637dc5,0xa2c898a6,0x113f9804,0xbef90dae,0x1b710b35,0x131c471b,0x28db77f5,0x23047d84,0x32caab7b,0x40c72493,0x3c9ebe0a,0x15c9bebc,0x431d67c4,0x9c100d4c,0x4cc5d4be,0xcb3e42b6,0x597f299c,0xfc657e2a,0x5fcb6fab,0x3ad6faec,0x6c44198c,0x4a475817];function j(e,t,r,i){for(var n,s,o,a,l,c,h,f,d,u,g,p,A,_,E,b,I,y,m,S,x,w,v,C,B,k,R=new Int32Array(16),N=new Int32Array(16),T=e[0],L=e[1],U=e[2],O=e[3],P=e[4],Q=e[5],D=e[6],H=e[7],F=t[0],M=t[1],K=t[2],W=t[3],q=t[4],$=t[5],G=t[6],j=t[7],X=0;i>=128;){for(m=0;m<16;m++)S=8*m+X,R[m]=r[S+0]<<24|r[S+1]<<16|r[S+2]<<8|r[S+3],N[m]=r[S+4]<<24|r[S+5]<<16|r[S+6]<<8|r[S+7];for(m=0;m<80;m++)if(n=T,s=L,o=U,a=O,l=P,c=Q,h=D,f=H,d=F,u=M,g=K,p=W,A=q,_=$,E=G,b=j,x=H,v=65535&(w=j),C=w>>>16,B=65535&x,k=x>>>16,x=(P>>>14|q<<18)^(P>>>18|q<<14)^(q>>>9|P<<23),v+=65535&(w=(q>>>14|P<<18)^(q>>>18|P<<14)^(P>>>9|q<<23)),C+=w>>>16,B+=65535&x,k+=x>>>16,x=P&Q^~P&D,v+=65535&(w=q&$^~q&G),C+=w>>>16,B+=65535&x,k+=x>>>16,x=Y[2*m],v+=65535&(w=Y[2*m+1]),C+=w>>>16,B+=65535&x,k+=x>>>16,x=R[m%16],v+=65535&(w=N[m%16]),C+=w>>>16,B+=65535&x,k+=x>>>16,C+=v>>>16,B+=C>>>16,k+=B>>>16,I=65535&B|k<<16,y=65535&v|C<<16,x=I,v=65535&(w=y),C=w>>>16,B=65535&x,k=x>>>16,x=(T>>>28|F<<4)^(F>>>2|T<<30)^(F>>>7|T<<25),v+=65535&(w=(F>>>28|T<<4)^(T>>>2|F<<30)^(T>>>7|F<<25)),C+=w>>>16,B+=65535&x,k+=x>>>16,x=T&L^T&U^L&U,v+=65535&(w=F&M^F&K^M&K),C+=w>>>16,B+=65535&x,k+=x>>>16,C+=v>>>16,B+=C>>>16,k+=B>>>16,f=65535&B|k<<16,b=65535&v|C<<16,x=a,v=65535&(w=p),C=w>>>16,B=65535&x,k=x>>>16,x=I,v+=65535&(w=y),C+=w>>>16,B+=65535&x,k+=x>>>16,C+=v>>>16,B+=C>>>16,k+=B>>>16,a=65535&B|k<<16,p=65535&v|C<<16,L=n,U=s,O=o,P=a,Q=l,D=c,H=h,T=f,M=d,K=u,W=g,q=p,$=A,G=_,j=E,F=b,m%16==15)for(S=0;S<16;S++)x=R[S],v=65535&(w=N[S]),C=w>>>16,B=65535&x,k=x>>>16,x=R[(S+9)%16],v+=65535&(w=N[(S+9)%16]),C+=w>>>16,B+=65535&x,k+=x>>>16,x=((I=R[(S+1)%16])>>>1|(y=N[(S+1)%16])<<31)^(I>>>8|y<<24)^I>>>7,v+=65535&(w=(y>>>1|I<<31)^(y>>>8|I<<24)^(y>>>7|I<<25)),C+=w>>>16,B+=65535&x,k+=x>>>16,x=((I=R[(S+14)%16])>>>19|(y=N[(S+14)%16])<<13)^(y>>>29|I<<3)^I>>>6,v+=65535&(w=(y>>>19|I<<13)^(I>>>29|y<<3)^(y>>>6|I<<26)),C+=w>>>16,B+=65535&x,k+=x>>>16,C+=v>>>16,B+=C>>>16,k+=B>>>16,R[S]=65535&B|k<<16,N[S]=65535&v|C<<16;x=T,v=65535&(w=F),C=w>>>16,B=65535&x,k=x>>>16,x=e[0],v+=65535&(w=t[0]),C+=w>>>16,B+=65535&x,k+=x>>>16,C+=v>>>16,B+=C>>>16,k+=B>>>16,e[0]=T=65535&B|k<<16,t[0]=F=65535&v|C<<16,x=L,v=65535&(w=M),C=w>>>16,B=65535&x,k=x>>>16,x=e[1],v+=65535&(w=t[1]),C+=w>>>16,B+=65535&x,k+=x>>>16,C+=v>>>16,B+=C>>>16,k+=B>>>16,e[1]=L=65535&B|k<<16,t[1]=M=65535&v|C<<16,x=U,v=65535&(w=K),C=w>>>16,B=65535&x,k=x>>>16,x=e[2],v+=65535&(w=t[2]),C+=w>>>16,B+=65535&x,k+=x>>>16,C+=v>>>16,B+=C>>>16,k+=B>>>16,e[2]=U=65535&B|k<<16,t[2]=K=65535&v|C<<16,x=O,v=65535&(w=W),C=w>>>16,B=65535&x,k=x>>>16,x=e[3],v+=65535&(w=t[3]),C+=w>>>16,B+=65535&x,k+=x>>>16,C+=v>>>16,B+=C>>>16,k+=B>>>16,e[3]=O=65535&B|k<<16,t[3]=W=65535&v|C<<16,x=P,v=65535&(w=q),C=w>>>16,B=65535&x,k=x>>>16,x=e[4],v+=65535&(w=t[4]),C+=w>>>16,B+=65535&x,k+=x>>>16,C+=v>>>16,B+=C>>>16,k+=B>>>16,e[4]=P=65535&B|k<<16,t[4]=q=65535&v|C<<16,x=Q,v=65535&(w=$),C=w>>>16,B=65535&x,k=x>>>16,x=e[5],v+=65535&(w=t[5]),C+=w>>>16,B+=65535&x,k+=x>>>16,C+=v>>>16,B+=C>>>16,k+=B>>>16,e[5]=Q=65535&B|k<<16,t[5]=$=65535&v|C<<16,x=D,v=65535&(w=G),C=w>>>16,B=65535&x,k=x>>>16,x=e[6],v+=65535&(w=t[6]),C+=w>>>16,B+=65535&x,k+=x>>>16,C+=v>>>16,B+=C>>>16,k+=B>>>16,e[6]=D=65535&B|k<<16,t[6]=G=65535&v|C<<16,x=H,v=65535&(w=j),C=w>>>16,B=65535&x,k=x>>>16,x=e[7],v+=65535&(w=t[7]),C+=w>>>16,B+=65535&x,k+=x>>>16,C+=v>>>16,B+=C>>>16,k+=B>>>16,e[7]=H=65535&B|k<<16,t[7]=j=65535&v|C<<16,X+=128,i-=128}return i}function X(e,t,r){var i,n=new Int32Array(8),s=new Int32Array(8),o=new Uint8Array(256),a=r;for(n[0]=0x6a09e667,n[1]=0xbb67ae85,n[2]=0x3c6ef372,n[3]=0xa54ff53a,n[4]=0x510e527f,n[5]=0x9b05688c,n[6]=0x1f83d9ab,n[7]=0x5be0cd19,s[0]=0xf3bcc908,s[1]=0x84caa73b,s[2]=0xfe94f82b,s[3]=0x5f1d36f1,s[4]=0xade682d1,s[5]=0x2b3e6c1f,s[6]=0xfb41bd6b,s[7]=0x137e2179,j(n,s,t,r),r%=128,i=0;i<r;i++)o[i]=t[a-r+i];for(o[r]=128,o[(r=256-(r<112)*128)-9]=0,p(o,r-8,a/0x20000000|0,a<<3),j(n,s,o,r),i=0;i<8;i++)p(e,8*i,n[i],s[i]);return 0}function V(e,t){var r=i(),n=i(),s=i(),o=i(),a=i(),l=i(),c=i(),h=i(),d=i();H(r,e[1],e[0]),H(d,t[1],t[0]),F(r,r,d),D(n,e[0],e[1]),D(d,t[0],t[1]),F(n,n,d),F(s,e[3],t[3]),F(s,s,f),F(o,e[2],t[2]),D(o,o,o),H(a,n,r),H(l,o,s),D(c,o,s),D(h,n,r),F(e[0],a,l),F(e[1],h,c),F(e[2],c,l),F(e[3],a,h)}function z(e,t,r){var i;for(i=0;i<4;i++)L(e[i],t[i],r)}function J(e,t){var r=i(),n=i(),s=i();K(s,t[2]),F(r,t[0],s),F(n,t[1],s),U(e,n),e[31]^=P(r)<<7}function Z(e,t,r){var i,n;for(N(e[0],a),N(e[1],l),N(e[2],l),N(e[3],a),n=255;n>=0;--n)z(e,t,i=r[n/8|0]>>(7&n)&1),V(t,e),V(e,e),z(e,t,i)}function ee(e,t){var r=[i(),i(),i(),i()];N(r[0],d),N(r[1],u),N(r[2],l),F(r[3],d,u),Z(e,r,t)}function et(e,t,r){var s,o=new Uint8Array(64),a=[i(),i(),i(),i()];for(r||n(t,32),X(o,t,32),o[0]&=248,o[31]&=127,o[31]|=64,ee(a,o),J(e,a),s=0;s<32;s++)t[s+32]=e[s];return 0}var er=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function ei(e,t){var r,i,n,s;for(i=63;i>=32;--i){for(r=0,n=i-32,s=i-12;n<s;++n)t[n]+=r-16*t[i]*er[n-(i-32)],r=t[n]+128>>8,t[n]-=256*r;t[n]+=r,t[i]=0}for(n=0,r=0;n<32;n++)t[n]+=r-(t[31]>>4)*er[n],r=t[n]>>8,t[n]&=255;for(n=0;n<32;n++)t[n]-=r*er[n];for(i=0;i<32;i++)t[i+1]+=t[i]>>8,e[i]=255&t[i]}function en(e){var t,r=new Float64Array(64);for(t=0;t<64;t++)r[t]=e[t];for(t=0;t<64;t++)e[t]=0;ei(e,r)}function es(e,t,r,n){var s,o,a=new Uint8Array(64),l=new Uint8Array(64),c=new Uint8Array(64),h=new Float64Array(64),f=[i(),i(),i(),i()];for(X(a,n,32),a[0]&=248,a[31]&=127,a[31]|=64,s=0;s<r;s++)e[64+s]=t[s];for(s=0;s<32;s++)e[32+s]=a[32+s];for(X(c,e.subarray(32),r+32),en(c),ee(f,c),J(e,f),s=32;s<64;s++)e[s]=n[s];for(X(l,e,r+64),en(l),s=0;s<64;s++)h[s]=0;for(s=0;s<32;s++)h[s]=c[s];for(s=0;s<32;s++)for(o=0;o<32;o++)h[s+o]+=l[s]*a[o];return ei(e.subarray(32),h),r+64}function eo(e,t,r,n){var s,o=new Uint8Array(32),c=new Uint8Array(64),f=[i(),i(),i(),i()],d=[i(),i(),i(),i()];if(r<64||function(e,t){var r=i(),n=i(),s=i(),o=i(),c=i(),f=i(),d=i();N(e[2],l),Q(e[1],t),M(s,e[1]),F(o,s,h),H(s,s,e[2]),D(o,e[2],o),M(c,o),M(f,c),F(d,f,c),F(r,d,s),F(r,r,o);var u,p=i();for(u=0;u<16;u++)p[u]=r[u];for(u=250;u>=0;u--)M(p,p),1!==u&&F(p,p,r);for(u=0;u<16;u++)r[u]=p[u];return(F(r,r,s),F(r,r,o),F(r,r,o),F(e[0],r,o),M(n,e[0]),F(n,n,o),O(n,s)&&F(e[0],e[0],g),M(n,e[0]),F(n,n,o),O(n,s))?-1:(P(e[0])===t[31]>>7&&H(e[0],a,e[0]),F(e[3],e[0],e[1]),0)}(d,n))return -1;for(s=0;s<r;s++)e[s]=t[s];for(s=0;s<32;s++)e[s+32]=n[s];if(X(c,e,r),en(c),Z(f,d,c),ee(d,t.subarray(32)),V(f,d),J(o,f),r-=64,E(t,0,o,0)){for(s=0;s<r;s++)e[s]=0;return -1}for(s=0;s<r;s++)e[s]=t[s+64];return r}function ea(e,t){if(32!==e.length)throw Error("bad key size");if(24!==t.length)throw Error("bad nonce size")}function el(){var e,t;for(t=0;t<arguments.length;t++)if("[object Uint8Array]"!==(e=Object.prototype.toString.call(arguments[t])))throw TypeError("unexpected type "+e+", use Uint8Array")}function ec(e){for(var t=0;t<e.length;t++)e[t]=0}t.lowlevel={crypto_core_hsalsa20:I,crypto_stream_xor:w,crypto_stream:x,crypto_stream_salsa20_xor:m,crypto_stream_salsa20:S,crypto_onetimeauth:C,crypto_onetimeauth_verify:B,crypto_verify_16:_,crypto_verify_32:E,crypto_secretbox:k,crypto_secretbox_open:R,crypto_scalarmult:W,crypto_scalarmult_base:q,crypto_box_beforenm:G,crypto_box_afternm:k,crypto_box:function(e,t,r,i,n,s){var o=new Uint8Array(32);return G(o,n,s),k(e,t,r,i,o)},crypto_box_open:function(e,t,r,i,n,s){var o=new Uint8Array(32);return G(o,n,s),R(e,t,r,i,o)},crypto_box_keypair:$,crypto_hash:X,crypto_sign:es,crypto_sign_keypair:et,crypto_sign_open:eo,crypto_secretbox_KEYBYTES:32,crypto_secretbox_NONCEBYTES:24,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:16,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:32,crypto_box_SECRETKEYBYTES:32,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:24,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:64,crypto_sign_PUBLICKEYBYTES:32,crypto_sign_SECRETKEYBYTES:64,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64},t.util||(t.util={},t.util.decodeUTF8=t.util.encodeUTF8=t.util.encodeBase64=t.util.decodeBase64=function(){throw Error("nacl.util moved into separate package: https://github.com/dchest/tweetnacl-util-js")}),t.randomBytes=function(e){var t=new Uint8Array(e);return n(t,e),t},t.secretbox=function(e,t,r){el(e,t,r),ea(r,t);for(var i=new Uint8Array(32+e.length),n=new Uint8Array(i.length),s=0;s<e.length;s++)i[s+32]=e[s];return k(n,i,i.length,t,r),n.subarray(16)},t.secretbox.open=function(e,t,r){el(e,t,r),ea(r,t);for(var i=new Uint8Array(16+e.length),n=new Uint8Array(i.length),s=0;s<e.length;s++)i[s+16]=e[s];return!(i.length<32)&&0===R(n,i,i.length,t,r)&&n.subarray(32)},t.secretbox.keyLength=32,t.secretbox.nonceLength=24,t.secretbox.overheadLength=16,t.scalarMult=function(e,t){if(el(e,t),32!==e.length)throw Error("bad n size");if(32!==t.length)throw Error("bad p size");var r=new Uint8Array(32);return W(r,e,t),r},t.scalarMult.base=function(e){if(el(e),32!==e.length)throw Error("bad n size");var t=new Uint8Array(32);return q(t,e),t},t.scalarMult.scalarLength=32,t.scalarMult.groupElementLength=32,t.box=function(e,r,i,n){var s=t.box.before(i,n);return t.secretbox(e,r,s)},t.box.before=function(e,t){el(e,t);if(32!==e.length)throw Error("bad public key size");if(32!==t.length)throw Error("bad secret key size");var r=new Uint8Array(32);return G(r,e,t),r},t.box.after=t.secretbox,t.box.open=function(e,r,i,n){var s=t.box.before(i,n);return t.secretbox.open(e,r,s)},t.box.open.after=t.secretbox.open,t.box.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(32);return $(e,t),{publicKey:e,secretKey:t}},t.box.keyPair.fromSecretKey=function(e){if(el(e),32!==e.length)throw Error("bad secret key size");var t=new Uint8Array(32);return q(t,e),{publicKey:t,secretKey:new Uint8Array(e)}},t.box.publicKeyLength=32,t.box.secretKeyLength=32,t.box.sharedKeyLength=32,t.box.nonceLength=24,t.box.overheadLength=t.secretbox.overheadLength,t.sign=function(e,t){if(el(e,t),64!==t.length)throw Error("bad secret key size");var r=new Uint8Array(64+e.length);return es(r,e,e.length,t),r},t.sign.open=function(e,t){if(2!=arguments.length)throw Error("nacl.sign.open accepts 2 arguments; did you mean to use nacl.sign.detached.verify?");if(el(e,t),32!==t.length)throw Error("bad public key size");var r=new Uint8Array(e.length),i=eo(r,e,e.length,t);if(i<0)return null;for(var n=new Uint8Array(i),s=0;s<n.length;s++)n[s]=r[s];return n},t.sign.detached=function(e,r){for(var i=t.sign(e,r),n=new Uint8Array(64),s=0;s<n.length;s++)n[s]=i[s];return n},t.sign.detached.verify=function(e,t,r){if(el(e,t,r),64!==t.length)throw Error("bad signature size");if(32!==r.length)throw Error("bad public key size");var i,n=new Uint8Array(64+e.length),s=new Uint8Array(64+e.length);for(i=0;i<64;i++)n[i]=t[i];for(i=0;i<e.length;i++)n[i+64]=e[i];return eo(s,n,n.length,r)>=0},t.sign.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(64);return et(e,t),{publicKey:e,secretKey:t}},t.sign.keyPair.fromSecretKey=function(e){if(el(e),64!==e.length)throw Error("bad secret key size");for(var t=new Uint8Array(32),r=0;r<t.length;r++)t[r]=e[32+r];return{publicKey:t,secretKey:new Uint8Array(e)}},t.sign.keyPair.fromSeed=function(e){if(el(e),32!==e.length)throw Error("bad seed size");for(var t=new Uint8Array(32),r=new Uint8Array(64),i=0;i<32;i++)r[i]=e[i];return et(t,r,!0),{publicKey:t,secretKey:r}},t.sign.publicKeyLength=32,t.sign.secretKeyLength=64,t.sign.seedLength=32,t.sign.signatureLength=64,t.hash=function(e){el(e);var t=new Uint8Array(64);return X(t,e,e.length),t},t.hash.hashLength=64,t.verify=function(e,t){return el(e,t),0!==e.length&&0!==t.length&&e.length===t.length&&0===A(e,0,t,0,e.length)},t.setPRNG=function(e){n=e},(r="u">typeof self?self.crypto||self.msCrypto:null)&&r.getRandomValues?t.setPRNG(function(e,t){var i,n=new Uint8Array(t);for(i=0;i<t;i+=65536)r.getRandomValues(n.subarray(i,i+Math.min(t-i,65536)));for(i=0;i<t;i++)e[i]=n[i];ec(n)}):(r=e.r(254799))&&r.randomBytes&&t.setPRNG(function(e,t){var i,n=r.randomBytes(t);for(i=0;i<t;i++)e[i]=n[i];ec(n)})}(t.exports?t.exports:self.nacl=self.nacl||{})},245594,(e,t,r)=>{"use strict";var i=e.r(790877).lowlevel.crypto_hash,n=0,s=function(){this.S=[new Uint32Array([0xd1310ba6,0x98dfb5ac,0x2ffd72db,0xd01adfb7,0xb8e1afed,0x6a267e96,0xba7c9045,0xf12c7f99,0x24a19947,0xb3916cf7,0x801f2e2,0x858efc16,0x636920d8,0x71574e69,0xa458fea3,0xf4933d7e,0xd95748f,0x728eb658,0x718bcd58,0x82154aee,0x7b54a41d,0xc25a59b5,0x9c30d539,0x2af26013,0xc5d1b023,0x286085f0,0xca417918,0xb8db38ef,0x8e79dcb0,0x603a180e,0x6c9e0e8b,0xb01e8a3e,0xd71577c1,0xbd314b27,0x78af2fda,0x55605c60,0xe65525f3,0xaa55ab94,0x57489862,0x63e81440,0x55ca396a,0x2aab10b6,0xb4cc5c34,0x1141e8ce,0xa15486af,0x7c72e993,0xb3ee1411,0x636fbc2a,0x2ba9c55d,0x741831f6,0xce5c3e16,0x9b87931e,0xafd6ba33,0x6c24cf5c,0x7a325381,0x28958677,0x3b8f4898,0x6b4bb9af,0xc4bfe81b,0x66282193,0x61d809cc,0xfb21a991,0x487cac60,0x5dec8032,0xef845d5d,0xe98575b1,0xdc262302,0xeb651b88,0x23893e81,0xd396acc5,0xf6d6ff3,0x83f44239,0x2e0b4482,0xa4842004,0x69c8f04a,0x9e1f9b5e,0x21c66842,0xf6e96c9a,0x670c9c61,0xabd388f0,0x6a51a0d2,0xd8542f68,0x960fa728,0xab5133a3,0x6eef0b6c,0x137a3be4,0xba3bf050,0x7efb2a98,0xa1f1651d,0x39af0176,0x66ca593e,0x82430e88,0x8cee8619,0x456f9fb4,0x7d84a5c3,0x3b8b5ebe,0xe06f75d8,0x85c12073,0x401a449f,0x56c16aa6,0x4ed3aa62,0x363f7706,0x1bfedf72,0x429b023d,0x37d0d724,0xd00a1248,0xdb0fead3,0x49f1c09b,0x75372c9,0x80991b7b,0x25d479d8,0xf6e8def7,0xe3fe501a,0xb6794c3b,0x976ce0bd,0x4c006ba,0xc1a94fb6,0x409f60c4,0x5e5c9ec2,0x196a2463,0x68fb6faf,0x3e6c53b5,0x1339b2eb,0x3b52ec6f,0x6dfc511f,0x9b30952c,0xcc814544,0xaf5ebd09,0xbee3d004,0xde334afd,0x660f2807,0x192e4bb3,0xc0cba857,0x45c8740f,0xd20b5f39,0xb9d3fbdb,0x5579c0bd,0x1a60320a,0xd6a100c6,0x402c7279,0x679f25fe,0xfb1fa3cc,0x8ea5e9f8,0xdb3222f8,0x3c7516df,0xfd616b15,0x2f501ec8,0xad0552ab,0x323db5fa,0xfd238760,0x53317b48,0x3e00df82,0x9e5c57bb,0xca6f8ca0,0x1a87562e,0xdf1769db,0xd542a8f6,0x287effc3,0xac6732c6,0x8c4f5573,0x695b27b0,0xbbca58c8,0xe1ffa35d,0xb8f011a0,0x10fa3d98,0xfd2183b8,0x4afcb56c,0x2dd1d35b,0x9a53e479,0xb6f84565,0xd28e49bc,0x4bfb9790,0xe1ddf2da,0xa4cb7e33,0x62fb1341,0xcee4c6e8,0xef20cada,0x36774c01,0xd07e9efe,0x2bf11fb4,0x95dbda4d,0xae909198,0xeaad8e71,0x6b93d5a0,0xd08ed1d0,0xafc725e0,0x8e3c5b2f,0x8e7594b7,0x8ff6e2fb,0xf2122b64,0x8888b812,0x900df01c,0x4fad5ea0,0x688fc31c,0xd1cff191,0xb3a8c1ad,0x2f2f2218,0xbe0e1777,0xea752dfe,0x8b021fa1,0xe5a0cc0f,0xb56f74e8,0x18acf3d6,0xce89e299,0xb4a84fe0,0xfd13e0b7,0x7cc43b81,0xd2ada8d9,0x165fa266,0x80957705,0x93cc7314,0x211a1477,0xe6ad2065,0x77b5fa86,0xc75442f5,0xfb9d35cf,0xebcdaf0c,0x7b3e89a0,0xd6411bd3,0xae1e7e49,2428461,0x2071b35e,0x226800bb,0x57b8e0af,0x2464369b,0xf009b91e,0x5563911d,0x59dfa6aa,0x78c14389,0xd95a537f,0x207d5ba2,0x2e5b9c5,0x83260376,0x6295cfa9,0x11c81968,0x4e734a41,0xb3472dca,0x7b14a94a,0x1b510052,0x9a532915,0xd60f573f,0xbc9bc6e4,0x2b60a476,0x81e67400,0x8ba6fb5,0x571be91f,0xf296ec6b,0x2a0dd915,0xb6636521,0xe7b9f9b6,0xff34052e,0xc5855664,0x53b02d5d,0xa99f8fa1,0x8ba4799,0x6e85076a]),new Uint32Array([0x4b7a70e9,0xb5b32944,0xdb75092e,0xc4192623,290971e4,0x49a7df7d,0x9cee60b8,0x8fedb266,0xecaa8c71,0x699a17ff,0x5664526c,0xc2b19ee1,0x193602a5,0x75094c29,0xa0591340,0xe4183a3e,0x3f54989a,0x5b429d65,0x6b8fe4d6,0x99f73fd6,0xa1d29c07,0xefe830f5,0x4d2d38e6,0xf0255dc1,0x4cdd2086,0x8470eb26,0x6382e9c6,0x21ecc5e,0x9686b3f,0x3ebaefc9,0x3c971814,0x6b6a70a1,0x687f3584,0x52a0e286,0xb79c5305,0xaa500737,0x3e07841c,0x7fdeae5c,0x8e7d44ec,0x5716f2b8,0xb03ada37,0xf0500c0d,0xf01c1f04,0x200b3ff,0xae0cf51a,0x3cb574b2,0x25837a58,0xdc0921bd,0xd19113f9,0x7ca92ff6,0x94324773,0x22f54701,0x3ae5e581,0x37c2dadc,0xc8b57634,0x9af3dda7,0xa9446146,0xfd0030e,0xecc8c73e,0xa4751e41,0xe238cd99,0x3bea0e2f,0x3280bba1,0x183eb331,0x4e548b38,0x4f6db908,0x6f420d03,0xf60a04bf,0x2cb81290,0x24977c79,0x5679b072,0xbcaf89af,0xde9a771f,0xd9930810,0xb38bae12,0xdccf3f2e,0x5512721f,0x2e6b7124,0x501adde6,0x9f84cd87,0x7a584718,0x7408da17,0xbc9f9abc,0xe94b7d8c,0xec7aec3a,0xdb851dfa,0x63094366,0xc464c3d2,0xef1c1847,0x3215d908,0xdd433b37,0x24c2ba16,0x12a14d43,0x2a65c451,0x50940002,0x133ae4dd,0x71dff89e,0x10314e55,0x81ac77d6,0x5f11199b,0x43556f1,0xd7a3c76b,0x3c11183b,0x5924a509,0xf28fe6ed,0x97f1fbfa,0x9ebabf2c,0x1e153c6e,0x86e34570,0xeae96fb1,0x860e5e0a,0x5a3e2ab3,0x771fe71c,0x4e3d06fa,0x2965dcb9,0x99e71d0f,0x803e89d6,0x5266c825,0x2e4cc978,0x9c10b36a,0xc6150eba,0x94e2ea78,0xa5fc3c53,0x1e0a2df4,0xf2f74ea7,0x361d2b3d,0x1939260f,0x19c27960,0x5223a708,0xf71312b6,0xebadfe6e,0xeac31f66,0xe3bc4595,0xa67bc883,0xb17f37d1,0x18cff28,0xc332ddef,0xbe6c5aa5,0x65582185,0x68ab9802,0xeecea50f,0xdb2f953b,0x2aef7dad,0x5b6e2f84,0x1521b628,0x29076170,0xecdd4775,0x619f1510,0x13cca830,0xeb61bd96,0x334fe1e,0xaa0363cf,0xb5735c90,0x4c70a239,0xd59e9e0b,0xcbaade14,0xeecc86bc,0x60622ca7,0x9cab5cab,0xb2f3846e,0x648b1eaf,0x19bdf0ca,0xa02369b9,0x655abb50,0x40685a32,0x3c2ab4b3,0x319ee9d5,0xc021b8f7,0x9b540b19,0x875fa099,0x95f7997e,0x623d7da8,0xf837889a,0x97e32d77,0x11ed935f,0x16681281,0xe358829,0xc7e61fd6,0x96dedfa1,0x7858ba99,0x57f584a5,0x1b227263,0x9b83c3ff,0x1ac24696,0xcdb30aeb,0x532e3054,0x8fd948e4,0x6dbc3128,0x58ebf2ef,0x34c6ffea,0xfe28ed61,0xee7c3c73,0x5d4a14d9,0xe864b7e3,0x42105d14,0x203e13e0,0x45eee2b6,0xa3aaabea,0xdb6c4f15,0xfacb4fd0,0xc742f442,0xef6abbb5,0x654f3b1d,0x41cd2105,0xd81e799e,0x86854dc7,0xe44b476a,0x3d816250,0xcf62a1f2,0x5b8d2646,0xfc8883a0,0xc1c7b6a3,0x7f1524c3,0x69cb7492,0x47848a0b,0x5692b285,0x95bbf00,0xad19489d,0x1462b174,0x23820e00,0x58428d2a,0xc55f5ea,0x1dadf43e,0x233f7061,0x3372f092,0x8d937e41,0xd65fecf1,0x6c223bdb,0x7cde3759,0xcbee7460,0x4085f2a7,0xce77326e,0xa6078084,0x19f8509e,0xe8efd855,0x61d99735,0xa969a7aa,0xc50c06c2,0x5a04abfc,0x800bcadc,0x9e447a2e,0xc3453484,0xfdd56705,0xe1e9ec9,0xdb73dbd3,0x105588cd,0x675fda79,0xe3674340,0xc5c43465,0x713e38d8,0x3d28f89e,0xf16dff20,0x153e21e7,0x8fb03d4a,0xe6e39f2b,0xdb83adf7]),new Uint32Array([0xe93d5a68,0x948140f7,0xf64c261c,0x94692934,0x411520f7,0x7602d4f7,0xbcf46b2e,0xd4a20068,0xd4082471,0x3320f46a,0x43b7d4b7,0x500061af,0x1e39f62e,0x97244546,0x14214f74,0xbf8b8840,0x4d95fc1d,0x96b591af,0x70f4ddd3,0x66a02f45,0xbfbc09ec,0x3bd9785,0x7fac6dd0,0x31cb8504,0x96eb27b3,0x55fd3941,0xda2547e6,0xabca0a9a,0x28507825,0x530429f4,0xa2c86da,0xe9b66dfb,0x68dc1462,0xd7486900,0x680ec0a4,0x27a18dee,0x4f3ffea2,0xe887ad8c,0xb58ce006,0x7af4d6b6,0xaace1e7c,0xd3375fec,0xce78a399,0x406b2a42,0x20fe9e35,0xd9f385b9,0xee39d7ab,0x3b124e8b,0x1dc9faf7,0x4b6d1856,0x26a36631,0xeae397b2,0x3a6efa74,0xdd5b4332,0x6841e7f7,0xca7820fb,0xfb0af54e,0xd8feb397,0x454056ac,0xba489527,0x55533a3a,0x20838d87,0xfe6ba9b7,0xd096954b,0x55a867bc,0xa1159a58,0xcca92963,0x99e1db33,0xa62a4a56,0x3f3125f9,0x5ef47e1c,0x9029317c,0xfdf8e802,0x4272f70,0x80bb155c,0x5282ce3,0x95c11548,0xe4c66d22,0x48c1133f,0xc70f86dc,0x7f9c9ee,0x41041f0f,0x404779a4,0x5d886e17,0x325f51eb,0xd59bc0d1,0xf2bcc18f,0x41113564,0x257b7834,0x602a9c60,0xdff8e8a3,0x1f636c1b,0xe12b4c2,0x2e1329e,0xaf664fd1,0xcad18115,0x6b2395e0,0x333e92e1,0x3b240b62,0xeebeb922,0x85b2a20e,0xe6ba0d99,0xde720c8c,0x2da2f728,0xd0127845,0x95b794fd,0x647d0862,0xe7ccf5f0,0x5449a36f,0x877d48fa,0xc39dfd27,0xf33e8d1e,0xa476341,0x992eff74,0x3a6f6eab,0xf4f8fd37,0xa812dc60,0xa1ebddf8,0x991be14c,0xdb6e6b0d,0xc67b5510,0x6d672c37,0x2765d43b,0xdcd0e804,0xf1290dc7,0xcc00ffa3,0xb5390f92,0x690fed0b,0x667b9ffb,0xcedb7d9c,0xa091cf0b,0xd9155ea3,0xbb132f88,0x515bad24,0x7b9479bf,0x763bd6eb,0x37392eb3,0xcc115979,0x8026e297,0xf42e312d,0x6842ada7,0xc66a2b3b,0x12754ccc,0x782ef11c,0x6a124237,0xb79251e7,0x6a1bbe6,0x4bfb6350,0x1a6b1018,0x11caedfa,0x3d25bdd8,0xe2e1c3c9,0x44421659,0xa121386,0xd90cec6e,0xd5abea2a,0x64af674e,0xda86a85f,0xbebfe988,0x64e4c3fe,0x9dbc8057,0xf0f7c086,0x60787bf8,0x6003604d,0xd1fd8346,0xf6381fb0,0x7745ae04,0xd736fccc,0x83426b33,0xf01eab71,0xb0804187,0x3c005e5f,0x77a057be,0xbde8ae24,0x55464299,0xbf582e61,0x4e58f48f,0xf2ddfda2,0xf474ef38,0x8789bdc2,0x5366f9c3,0xc8b38e74,0xb475f255,0x46fcd9b9,0x7aeb2661,0x8b1ddf84,0x846a0e79,0x915f95e2,0x466e598e,0x20b45770,0x8cd55591,0xc902de4c,0xb90bace1,0xbb8205d0,0x11a86248,0x7574a99e,0xb77f19b6,0xe0a9dc09,0x662d09a1,0xc4324633,0xe85a1f02,0x9f0be8c,0x4a99a025,0x1d6efe10,0x1ab93d1d,0xba5a4df,0xa186f20f,0x2868f169,0xdcb7da83,0x573906fe,0xa1e2ce9b,0x4fcd7f52,0x50115e01,0xa70683fa,0xa002b5c4,0xde6d027,0x9af88c27,0x773f8641,0xc3604c06,0x61a806b5,0xf0177a28,0xc0f586e0,6314154,0x30dc7d62,0x11e69ed7,0x2338ea63,0x53c2dd94,0xc2c21634,0xbbcbee56,0x90bcb6de,0xebfc7da1,0xce591d76,0x6f05e409,0x4b7c0188,0x39720a3d,0x7c927c24,0x86e3725f,0x724d9db9,0x1ac15bb4,0xd39eb8fc,0xed545578,0x8fca5b5,0xd83d7cd3,0x4dad0fc4,0x1e50ef5e,0xb161e6f8,0xa28514d9,0x6c51133c,0x6fd5c7e7,0x56e14ec4,0x362abfce,0xddc6c837,0xd79a3234,0x92638212,0x670efa8e,0x406000e0]),new Uint32Array([0x3a39ce37,0xd3faf5cf,0xabc27737,0x5ac52d1b,0x5cb0679e,0x4fa33742,0xd3822740,0x99bc9bbe,0xd5118e9d,0xbf0f7315,0xd62d1c7e,0xc700c47b,0xb78c1b6b,0x21a19045,0xb26eb1be,0x6a366eb4,0x5748ab2f,0xbc946e79,0xc6a376d2,0x6549c2c8,0x530ff8ee,0x468dde7d,0xd5730a1d,0x4cd04dc6,0x2939bbdb,0xa9ba4650,0xac9526e8,0xbe5ee304,0xa1fad5f0,0x6a2d519a,0x63ef8ce2,0x9a86ee22,0xc089c2b8,0x43242ef6,0xa51e03aa,0x9cf2d0a4,0x83c061ba,0x9be96a4d,0x8fe51550,0xba645bd6,0x2826a2f9,0xa73a3ae1,0x4ba99586,0xef5562e9,0xc72fefd3,0xf752f7da,0x3f046f69,0x77fa0a59,0x80e4a915,0x87b08601,0x9b09e6ad,0x3b3ee593,0xe990fd5a,0x9e34d797,0x2cf0b7d9,0x22b8b51,0x96d5ac3a,0x17da67d,0xd1cf3ed6,0x7c7d2d28,0x1f9f25cf,0xadf2b89b,0x5ad6b472,0x5a88f54c,0xe029ac71,0xe019a5e6,0x47b0acfd,0xed93fa9b,0xe8d3c48d,0x283b57cc,0xf8d56629,0x79132e28,0x785f0191,0xed756055,0xf7960e44,0xe3d35e8c,0x15056dd4,0x88f46dba,0x3a16125,0x564f0bd,0xc3eb9e15,0x3c9057a2,0x97271aec,0xa93a072a,0x1b3f6d9b,0x1e6321f5,0xf59c66fb,0x26dcf319,0x7533d928,0xb155fdf5,0x3563482,0x8aba3cbb,0x28517711,0xc20ad9f8,0xabcc5167,0xccad925f,0x4de81751,0x3830dc8e,0x379d5862,0x9320f991,0xea7a90c2,0xfb3e7bce,0x5121ce64,0x774fbe32,0xa8b6e37e,0xc3293d46,0x48de5369,0x6413e680,0xa2ae0810,0xdd6db224,0x69852dfd,0x9072166,0xb39a460a,0x6445c0dd,0x586cdecf,0x1c20c8ae,0x5bbef7dd,0x1b588d40,0xccd2017f,0x6bb4e3bb,0xdda26a7e,0x3a59ff45,0x3e350a44,0xbcb4cdd5,0x72eacea8,0xfa6484bb,0x8d6612ae,0xbf3c6f47,0xd29be463,0x542f5d9e,0xaec2771b,0xf64e6370,0x740e0d8d,0xe75b1357,0xf8721671,0xaf537d5d,0x4040cb08,0x4eb4e2cc,0x34d2466a,0x115af84,3786409e3,0x95983a1d,0x6b89fb4,0xce6ea048,0x6f3f3b82,0x3520ab82,0x11a1d4b,0x277227f8,0x611560b1,0xe7933fdc,0xbb3a792b,0x344525bd,0xa08839e1,0x51ce794b,0x2f32c9b7,0xa01fbac9,0xe01cc87e,0xbcc7d1f6,0xcf0111c3,0xa1e8aac7,0x1a908749,0xd44fbd9a,0xd0dadecb,0xd50ada38,0x339c32a,0xc6913667,0x8df9317c,0xe0b12b4f,0xf79e59b7,0x43f5bb3a,0xf2d519ff,0x27d9459c,0xbf97222c,0x15e6fc2a,0xf91fc71,0x9b941525,0xfae59361,0xceb69ceb,0xc2a86459,0x12baa8d1,0xb6c1075e,0xe3056a0c,0x10d25065,0xcb03a442,0xe0ec6e0e,0x1698db3b,0x4c98a0be,0x3278e964,0x9f1f9532,0xe0d392df,0xd3a0342b,0x8971f21e,0x1b0a7441,0x4ba3348c,0xc5be7120,0xc37632d8,0xdf359f8d,0x9b992f2e,0xe60b6f47,0xfe3f11d,0xe54cda54,0x1edad891,0xce6279cf,0xcd3e7e6f,0x1618b166,0xfd2c1d05,0x848fd2c5,0xf6fb2299,0xf523f357,0xa6327623,0x93a83531,0x56cccd02,0xacf08162,0x5a75ebb5,0x6e163697,0x88d273cc,0xde966292,0x81b949d0,0x4c50901b,0x71c65614,0xe6c6c7bd,0x327a140a,0x45e1d006,0xc3f27b9a,0xc9aa53fd,0x62a80f00,0xbb25bfe2,0x35bdd2f6,0x71126905,0xb2040222,0xb6cbcf7c,0xcd769c2b,0x53113ec0,0x1640e3d3,0x38abbd60,0x2547adf0,0xba38209c,0xf746ce76,0x77afa1c5,0x20756060,0x85cbfe4e,0x8ae88dd8,0x7aaaf9b0,0x4cf9aa7e,0x1948c25c,0x2fb8a8c,0x1c36ae4,0xd6ebe1f9,0x90d4f869,0xa65cdea0,0x3f09252d,0xc208e69f,0xb74e6132,0xce77e25b,0x578fdfe3,0x3ac372e6])],this.P=new Uint32Array([0x243f6a88,0x85a308d3,0x13198a2e,0x3707344,0xa4093822,0x299f31d0,0x82efa98,0xec4e6c89,0x452821e6,0x38d01377,0xbe5466cf,0x34e90c6c,0xc0ac29b7,0xc97c50dd,0x3f84d5b5,0xb5470917,0x9216d5d9,0x8979fb1b])};function o(e,t,r){return(e[0][t[r+3]]+e[1][t[r+2]]^e[2][t[r+1]])+e[3][t[r]]}function a(e,t){var r,i=0;for(r=0;r<4;r++,n++)n>=t&&(n=0),i=i<<8|e[n];return i}function l(e,t,r){var i,n=new s,o=new Uint32Array(8),l=new Uint8Array([79,120,121,99,104,114,111,109,97,116,105,99,66,108,111,119,102,105,115,104,83,119,97,116,68,121,110,97,109,105,116,101]);for(n.expandstate(t,64,e,64),i=0;i<64;i++)n.expand0state(t,64),n.expand0state(e,64);for(i=0;i<8;i++)o[i]=a(l,l.byteLength);for(i=0;i<64;i++)n.enc(o,o.byteLength/8);for(i=0;i<8;i++)r[4*i+3]=o[i]>>>24,r[4*i+2]=o[i]>>>16,r[4*i+1]=o[i]>>>8,r[4*i+0]=o[i]}s.prototype.encipher=function(e,t){void 0===t&&(t=new Uint8Array(e.buffer),0!==e.byteOffset&&(t=t.subarray(e.byteOffset))),e[0]^=this.P[0];for(var r=1;r<16;r+=2)e[1]^=o(this.S,t,0)^this.P[r],e[0]^=o(this.S,t,4)^this.P[r+1];var i=e[0];e[0]=e[1]^this.P[17],e[1]=i},s.prototype.decipher=function(e){var t=new Uint8Array(e.buffer);0!==e.byteOffset&&(t=t.subarray(e.byteOffset)),e[0]^=this.P[17];for(var r=16;r>0;r-=2)e[1]^=o(this.S,t,0)^this.P[r],e[0]^=o(this.S,t,4)^this.P[r-1];var i=e[0];e[0]=e[1]^this.P[0],e[1]=i},s.prototype.expand0state=function(e,t){var r,i,s=new Uint32Array(2),o=new Uint8Array(s.buffer);for(r=0,n=0;r<18;r++)this.P[r]^=a(e,t);for(r=0,n=0;r<18;r+=2)this.encipher(s,o),this.P[r]=s[0],this.P[r+1]=s[1];for(r=0;r<4;r++)for(i=0;i<256;i+=2)this.encipher(s,o),this.S[r][i]=s[0],this.S[r][i+1]=s[1]},s.prototype.expandstate=function(e,t,r,i){var s,o,l=new Uint32Array(2);for(s=0,n=0;s<18;s++)this.P[s]^=a(r,i);for(s=0,n=0;s<18;s+=2)l[0]^=a(e,t),l[1]^=a(e,t),this.encipher(l),this.P[s]=l[0],this.P[s+1]=l[1];for(s=0;s<4;s++)for(o=0;o<256;o+=2)l[0]^=a(e,t),l[1]^=a(e,t),this.encipher(l),this.S[s][o]=l[0],this.S[s][o+1]=l[1];n=0},s.prototype.enc=function(e,t){for(var r=0;r<t;r++)this.encipher(e.subarray(2*r))},s.prototype.dec=function(e,t){for(var r=0;r<t;r++)this.decipher(e.subarray(2*r))},t.exports={BLOCKS:8,HASHSIZE:32,hash:l,pbkdf:function(e,t,r,n,s,o,a){var c,h,f,d,u,g,p=new Uint8Array(64),A=new Uint8Array(64),_=new Uint8Array(32),E=new Uint8Array(32),b=new Uint8Array(n+4),I=o;if(a<1||0===t||0===n||0===o||o>_.byteLength*_.byteLength||n>1048576)return -1;for(c=0,d=Math.floor((o+_.byteLength-1)/_.byteLength),f=Math.floor((o+d-1)/d);c<n;c++)b[c]=r[c];for(i(p,e,t),g=1;o>0;g++){for(b[n+0]=g>>>24,b[n+1]=g>>>16,b[n+2]=g>>>8,b[n+3]=g,i(A,b,n+4),l(p,A,E),c=_.byteLength;c--;)_[c]=E[c];for(c=1;c<a;c++)for(i(A,E,E.byteLength),l(p,A,E),h=0;h<_.byteLength;h++)_[h]^=E[h];for(c=0,f=Math.min(f,o);c<f&&!((u=c*d+(g-1))>=I);c++)s[u]=_[c];o-=c}return 0}}},607335,(e,t,r)=>{var i;t.exports=(i=(i="u">typeof document&&document.currentScript?document.currentScript.src:void 0)||"/ROOT/node_modules/.pnpm/ssh2@1.17.0/node_modules/ssh2/lib/protocol/crypto/poly1305.js",function(t){t=t||{},n||(n=void 0!==t?t:{}),n.ready=new Promise(function(e,t){s=e,o=t});var r,n,s,o,a,l={};for(a in n)n.hasOwnProperty(a)&&(l[a]=n[a]);var c,h,f,d,u,g="function"==typeof importScripts,p="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,A="";p?(A=g?e.r(814747).dirname(A)+"/":"/ROOT/node_modules/.pnpm/ssh2@1.17.0/node_modules/ssh2/lib/protocol/crypto/",c=function(t,r){var i=W(t);return i?r?i:i.toString():(d||(d=e.r(522734)),u||(u=e.r(814747)),t=u.normalize(t),d.readFileSync(t,r?null:"utf8"))},f=function(e){return(e=c(e,!0)).buffer||(e=new Uint8Array(e)),y(e.buffer),e},h=function(t,r,i){var n=W(t);n&&r(n),d||(d=e.r(522734)),u||(u=e.r(814747)),t=u.normalize(t),d.readFile(t,function(e,t){e?i(e):r(t.buffer)})},1<process.argv.length&&process.argv[1].replace(/\\/g,"/"),process.argv.slice(2),n.inspect=function(){return"[Emscripten Module object]"}):g&&(g?A=self.location.href:"u">typeof document&&document.currentScript&&(A=document.currentScript.src),i&&(A=i),A=0!==A.indexOf("blob:")?A.substr(0,A.lastIndexOf("/")+1):"",c=function(e){try{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText}catch(n){if(e=W(e)){t=[];for(var r=0;r<e.length;r++){var i=e[r];255<i&&(M&&y(!1,"Character code "+i+" ("+String.fromCharCode(i)+") at offset "+r+" not in 0x00-0xFF."),i&=255),t.push(String.fromCharCode(i))}return t.join("")}throw n}},g&&(f=function(e){try{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}catch(t){if(e=W(e))return e;throw t}}),h=function(e,t,r){var i=new XMLHttpRequest;i.open("GET",e,!0),i.responseType="arraybuffer",i.onload=function(){if(200==i.status||0==i.status&&i.response)t(i.response);else{var n=W(e);n?t(n.buffer):r()}},i.onerror=r,i.send(null)}),n.print||console.log.bind(console);var _=n.printErr||console.warn.bind(console);for(a in l)l.hasOwnProperty(a)&&(n[a]=l[a]);l=null,n.wasmBinary&&(E=n.wasmBinary),n.noExitRuntime,"object"!=typeof WebAssembly&&O("no native wasm support detected");var E,b,I=!1;function y(e,t){e||O("Assertion failed: "+t)}function m(e){var t=n["_"+e];return y(t,"Cannot call unknown function "+e+", make sure it is exported"),t}var S,x,w,v="u">typeof TextDecoder?new TextDecoder("utf8"):void 0;function C(){var e=b.buffer;S=e,n.HEAP8=x=new Int8Array(e),n.HEAP16=new Int16Array(e),n.HEAP32=new Int32Array(e),n.HEAPU8=w=new Uint8Array(e),n.HEAPU16=new Uint16Array(e),n.HEAPU32=new Uint32Array(e),n.HEAPF32=new Float32Array(e),n.HEAPF64=new Float64Array(e)}var B,k=[],R=[],N=[],T=0,L=null,U=null;function O(e){throw n.onAbort&&n.onAbort(e),_(e),I=!0,e=new WebAssembly.RuntimeError("abort("+e+"). Build with -s ASSERTIONS=1 for more info."),o(e),e}n.preloadedImages={},n.preloadedAudios={};var P,Q="data:application/octet-stream;base64,";if(!(P="data:application/octet-stream;base64,AGFzbQEAAAABIAZgAX8Bf2ADf39/AGABfwBgAABgAAF/YAZ/f39/f38AAgcBAWEBYQAAAwsKAAEDAQAAAgQFAgQFAXABAQEFBwEBgAKAgAIGCQF/AUGAjMACCwclCQFiAgABYwADAWQACQFlAAgBZgAHAWcABgFoAAUBaQAKAWoBAAqGTQpPAQJ/QYAIKAIAIgEgAEEDakF8cSICaiEAAkAgAkEAIAAgAU0bDQAgAD8AQRB0SwRAIAAQAEUNAQtBgAggADYCACABDwtBhAhBMDYCAEF/C4wFAg5+Cn8gACgCJCEUIAAoAiAhFSAAKAIcIREgACgCGCESIAAoAhQhEyACQRBPBEAgAC0ATEVBGHQhFyAAKAIEIhZBBWytIQ8gACgCCCIYQQVsrSENIAAoAgwiGUEFbK0hCyAAKAIQIhpBBWytIQkgADUCACEIIBqtIRAgGa0hDiAYrSEMIBatIQoDQCASIAEtAAMiEiABLQAEQQh0ciABLQAFQRB0ciABLQAGIhZBGHRyQQJ2Qf///x9xaq0iAyAOfiABLwAAIAEtAAJBEHRyIBNqIBJBGHRBgICAGHFqrSIEIBB+fCARIAEtAAdBCHQgFnIgAS0ACEEQdHIgAS0ACSIRQRh0ckEEdkH///8fcWqtIgUgDH58IAEtAApBCHQgEXIgAS0AC0EQdHIgAS0ADEEYdHJBBnYgFWqtIgYgCn58IBQgF2ogAS8ADSABLQAPQRB0cmqtIgcgCH58IAMgDH4gBCAOfnwgBSAKfnwgBiAIfnwgByAJfnwgAyAKfiAEIAx+fCAFIAh+fCAGIAl+fCAHIAt+fCADIAh+IAQgCn58IAUgCX58IAYgC358IAcgDX58IAMgCX4gBCAIfnwgBSALfnwgBiANfnwgByAPfnwiA0IaiEL/////D4N8IgRCGohC/////w+DfCIFQhqIQv////8Pg3wiBkIaiEL/////D4N8IgdCGoinQQVsIAOnQf///x9xaiITQRp2IASnQf///x9xaiESIAWnQf///x9xIREgBqdB////H3EhFSAHp0H///8fcSEUIBNB////H3EhEyABQRBqIQEgAkEQayICQQ9LDQALCyAAIBQ2AiQgACAVNgIgIAAgETYCHCAAIBI2AhggACATNgIUCwMAAQu2BAEGfwJAIAAoAjgiBARAIABBPGohBQJAIAJBECAEayIDIAIgA0kbIgZFDQAgBkEDcSEHAkAgBkEBa0EDSQRAQQAhAwwBCyAGQXxxIQhBACEDA0AgBSADIARqaiABIANqLQAAOgAAIAUgA0EBciIEIAAoAjhqaiABIARqLQAAOgAAIAUgA0ECciIEIAAoAjhqaiABIARqLQAAOgAAIAUgA0EDciIEIAAoAjhqaiABIARqLQAAOgAAIANBBGohAyAAKAI4IQQgCEEEayIIDQALCyAHRQ0AA0AgBSADIARqaiABIANqLQAAOgAAIANBAWohAyAAKAI4IQQgB0EBayIHDQALCyAAIAQgBmoiAzYCOCADQRBJDQEgACAFQRAQAiAAQQA2AjggAiAGayECIAEgBmohAQsgAkEQTwRAIAAgASACQXBxIgMQAiACQQ9xIQIgASADaiEBCyACRQ0AIAJBA3EhBCAAQTxqIQVBACEDIAJBAWtBA08EQCACQXxxIQcDQCAFIAAoAjggA2pqIAEgA2otAAA6AAAgBSADQQFyIgYgACgCOGpqIAEgBmotAAA6AAAgBSADQQJyIgYgACgCOGpqIAEgBmotAAA6AAAgBSADQQNyIgYgACgCOGpqIAEgBmotAAA6AAAgA0EEaiEDIAdBBGsiBw0ACwsgBARAA0AgBSAAKAI4IANqaiABIANqLQAAOgAAIANBAWohAyAEQQFrIgQNAAsLIAAgACgCOCACajYCOAsLoS0BDH8jAEEQayIMJAACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAEH0AU0EQEGICCgCACIFQRAgAEELakF4cSAAQQtJGyIIQQN2IgJ2IgFBA3EEQCABQX9zQQFxIAJqIgNBA3QiAUG4CGooAgAiBEEIaiEAAkAgBCgCCCICIAFBsAhqIgFGBEBBiAggBUF+IAN3cTYCAAwBCyACIAE2AgwgASACNgIICyAEIANBA3QiAUEDcjYCBCABIARqIgEgASgCBEEBcjYCBAwNCyAIQZAIKAIAIgpNDQEgAQRAAkBBAiACdCIAQQAgAGtyIAEgAnRxIgBBACAAa3FBAWsiACAAQQx2QRBxIgJ2IgFBBXZBCHEiACACciABIAB2IgFBAnZBBHEiAHIgASAAdiIBQQF2QQJxIgByIAEgAHYiAUEBdkEBcSIAciABIAB2aiIDQQN0IgBBuAhqKAIAIgQoAggiASAAQbAIaiIARgRAQYgIIAVBfiADd3EiBTYCAAwBCyABIAA2AgwgACABNgIICyAEQQhqIQAgBCAIQQNyNgIEIAQgCGoiAiADQQN0IgEgCGsiA0EBcjYCBCABIARqIAM2AgAgCgRAIApBA3YiAUEDdEGwCGohB0GcCCgCACEEAn8gBUEBIAF0IgFxRQRAQYgIIAEgBXI2AgAgBwwBCyAHKAIICyEBIAcgBDYCCCABIAQ2AgwgBCAHNgIMIAQgATYCCAtBnAggAjYCAEGQCCADNgIADA0LQYwIKAIAIgZFDQEgBkEAIAZrcUEBayIAIABBDHZBEHEiAnYiAUEFdkEIcSIAIAJyIAEgAHYiAUECdkEEcSIAciABIAB2IgFBAXZBAnEiAHIgASAAdiIBQQF2QQFxIgByIAEgAHZqQQJ0QbgKaigCACIBKAIEQXhxIAhrIQMgASECA0ACQCACKAIQIgBFBEAgAigCFCIARQ0BCyAAKAIEQXhxIAhrIgIgAyACIANJIgIbIQMgACABIAIbIQEgACECDAELCyABIAhqIgkgAU0NAiABKAIYIQsgASABKAIMIgRHBEAgASgCCCIAQZgIKAIASRogACAENgIMIAQgADYCCAwMCyABQRRqIgIoAgAiAEUEQCABKAIQIgBFDQQgAUEQaiECCwNAIAIhByAAIgRBFGoiAigCACIADQAgBEEQaiECIAQoAhAiAA0ACyAHQQA2AgAMCwtBfyEIIABBv39LDQAgAEELaiIAQXhxIQhBjAgoAgAiCUUNAEEAIAhrIQMCQAJAAkACf0EAIAhBgAJJDQAaQR8gCEH///8HSw0AGiAAQQh2IgAgAEGA/j9qQRB2QQhxIgJ0IgAgAEGA4B9qQRB2QQRxIgF0IgAgAEGAgA9qQRB2QQJxIgB0QQ92IAEgAnIgAHJrIgBBAXQgCCAAQRVqdkEBcXJBHGoLIgVBAnRBuApqKAIAIgJFBEBBACEADAELQQAhACAIQQBBGSAFQQF2ayAFQR9GG3QhAQNAAkAgAigCBEF4cSAIayIHIANPDQAgAiEEIAciAw0AQQAhAyACIQAMAwsgACACKAIUIgcgByACIAFBHXZBBHFqKAIQIgJGGyAAIAcbIQAgAUEBdCEBIAINAAsLIAAgBHJFBEBBACEEQQIgBXQiAEEAIABrciAJcSIARQ0DIABBACAAa3FBAWsiACAAQQx2QRBxIgJ2IgFBBXZBCHEiACACciABIAB2IgFBAnZBBHEiAHIgASAAdiIBQQF2QQJxIgByIAEgAHYiAUEBdkEBcSIAciABIAB2akECdEG4CmooAgAhAAsgAEUNAQsDQCAAKAIEQXhxIAhrIgEgA0khAiABIAMgAhshAyAAIAQgAhshBCAAKAIQIgEEfyABBSAAKAIUCyIADQALCyAERQ0AIANBkAgoAgAgCGtPDQAgBCAIaiIGIARNDQEgBCgCGCEFIAQgBCgCDCIBRwRAIAQoAggiAEGYCCgCAEkaIAAgATYCDCABIAA2AggMCgsgBEEUaiICKAIAIgBFBEAgBCgCECIARQ0EIARBEGohAgsDQCACIQcgACIBQRRqIgIoAgAiAA0AIAFBEGohAiABKAIQIgANAAsgB0EANgIADAkLIAhBkAgoAgAiAk0EQEGcCCgCACEDAkAgAiAIayIBQRBPBEBBkAggATYCAEGcCCADIAhqIgA2AgAgACABQQFyNgIEIAIgA2ogATYCACADIAhBA3I2AgQMAQtBnAhBADYCAEGQCEEANgIAIAMgAkEDcjYCBCACIANqIgAgACgCBEEBcjYCBAsgA0EIaiEADAsLIAhBlAgoAgAiBkkEQEGUCCAGIAhrIgE2AgBBoAhBoAgoAgAiAiAIaiIANgIAIAAgAUEBcjYCBCACIAhBA3I2AgQgAkEIaiEADAsLQQAhACAIQS9qIgkCf0HgCygCAARAQegLKAIADAELQewLQn83AgBB5AtCgKCAgICABDcCAEHgCyAMQQxqQXBxQdiq1aoFczYCAEH0C0EANgIAQcQLQQA2AgBBgCALIgFqIgVBACABayIHcSICIAhNDQpBwAsoAgAiBARAQbgLKAIAIgMgAmoiASADTQ0LIAEgBEsNCwtBxAstAABBBHENBQJAAkBBoAgoAgAiAwRAQcgLIQADQCADIAAoAgAiAU8EQCABIAAoAgRqIANLDQMLIAAoAggiAA0ACwtBABABIgFBf0YNBiACIQVB5AsoAgAiA0EBayIAIAFxBEAgAiABayAAIAFqQQAgA2txaiEFCyAFIAhNDQYgBUH+////B0sNBkHACygCACIEBEBBuAsoAgAiAyAFaiIAIANNDQcgACAESw0HCyAFEAEiACABRw0BDAgLIAUgBmsgB3EiBUH+////B0sNBSAFEAEiASAAKAIAIAAoAgRqRg0EIAEhAAsCQCAAQX9GDQAgCEEwaiAFTQ0AQegLKAIAIgEgCSAFa2pBACABa3EiAUH+////B0sEQCAAIQEMCAsgARABQX9HBEAgASAFaiEFIAAhAQwIC0EAIAVrEAEaDAULIAAiAUF/Rw0GDAQLAAtBACEEDAcLQQAhAQwFCyABQX9HDQILQcQLQcQLKAIAQQRyNgIACyACQf7///8HSw0BIAIQASEBQQAQASEAIAFBf0YNASAAQX9GDQEgACABTQ0BIAAgAWsiBSAIQShqTQ0BC0G4C0G4CygCACAFaiIANgIAQbwLKAIAIABJBEBBvAsgADYCAAsCQAJAAkBBoAgoAgAiBwRAQcgLIQADQCABIAAoAgAiAyAAKAIEIgJqRg0CIAAoAggiAA0ACwwCC0GYCCgCACIAQQAgACABTRtFBEBBmAggATYCAAtBACEAQcwLIAU2AgBByAsgATYCAEGoCEF/NgIAQawIQeALKAIANgIAQdQLQQA2AgADQCAAQQN0IgNBuAhqIANBsAhqIgI2AgAgA0G8CGogAjYCACAAQQFqIgBBIEcNAAtBlAggBUEoayIDQXggAWtBB3FBACABQQhqQQdxGyIAayICNgIAQaAIIAAgAWoiADYCACAAIAJBAXI2AgQgASADakEoNgIEQaQIQfALKAIANgIADAILIAAtAAxBCHENACADIAdLDQAgASAHTQ0AIAAgAiAFajYCBEGgCCAHQXggB2tBB3FBACAHQQhqQQdxGyIAaiICNgIAQZQIQZQIKAIAIAVqIgEgAGsiADYCACACIABBAXI2AgQgASAHakEoNgIEQaQIQfALKAIANgIADAELQZgIKAIAIAFLBEBBmAggATYCAAsgASAFaiECQcgLIQACQAJAAkACQAJAAkADQCACIAAoAgBHBEAgACgCCCIADQEMAgsLIAAtAAxBCHFFDQELQcgLIQADQCAHIAAoAgAiAk8EQCACIAAoAgRqIgQgB0sNAwsgACgCCCEADAALAAsgACABNgIAIAAgACgCBCAFajYCBCABQXggAWtBB3FBACABQQhqQQdxG2oiCSAIQQNyNgIEIAJBeCACa0EHcUEAIAJBCGpBB3EbaiIFIAggCWoiBmshAiAFIAdGBEBBoAggBjYCAEGUCEGUCCgCACACaiIANgIAIAYgAEEBcjYCBAwDCyAFQZwIKAIARgRAQZwIIAY2AgBBkAhBkAgoAgAgAmoiADYCACAGIABBAXI2AgQgACAGaiAANgIADAMLIAUoAgQiAEEDcUEBRgRAIABBeHEhBwJAIABB/wFNBEAgBSgCCCIDIABBA3YiAEEDdEGwCGpGGiADIAUoAgwiAUYEQEGICEGICCgCAEF+IAB3cTYCAAwCCyADIAE2AgwgASADNgIIDAELIAUoAhghCAJAIAUgBSgCDCIBRwRAIAUoAggiACABNgIMIAEgADYCCAwBCwJAIAVBFGoiACgCACIDDQAgBUEQaiIAKAIAIgMNAEEAIQEMAQsDQCAAIQQgAyIBQRRqIgAoAgAiAw0AIAFBEGohACABKAIQIgMNAAsgBEEANgIACyAIRQ0AAkAgBSAFKAIcIgNBAnRBuApqIgAoAgBGBEAgACABNgIAIAENAUGMCEGMCCgCAEF+IAN3cTYCAAwCCyAIQRBBFCAIKAIQIAVGG2ogATYCACABRQ0BCyABIAg2AhggBSgCECIABEAgASAANgIQIAAgATYCGAsgBSgCFCIARQ0AIAEgADYCFCAAIAE2AhgLIAUgB2ohBSACIAdqIQILIAUgBSgCBEF+cTYCBCAGIAJBAXI2AgQgAiAGaiACNgIAIAJB/wFNBEAgAkEDdiIAQQN0QbAIaiECAn9BiAgoAgAiAUEBIAB0IgBxRQRAQYgIIAAgAXI2AgAgAgwBCyACKAIICyEAIAIgBjYCCCAAIAY2AgwgBiACNgIMIAYgADYCCAwDC0EfIQAgAkH///8HTQRAIAJBCHYiACAAQYD+P2pBEHZBCHEiA3QiACAAQYDgH2pBEHZBBHEiAXQiACAAQYCAD2pBEHZBAnEiAHRBD3YgASADciAAcmsiAEEBdCACIABBFWp2QQFxckEcaiEACyAGIAA2AhwgBkIANwIQIABBAnRBuApqIQQCQEGMCCgCACIDQQEgAHQiAXFFBEBBjAggASADcjYCACAEIAY2AgAgBiAENgIYDAELIAJBAEEZIABBAXZrIABBH0YbdCEAIAQoAgAhAQNAIAEiAygCBEF4cSACRg0DIABBHXYhASAAQQF0IQAgAyABQQRxaiIEKAIQIgENAAsgBCAGNgIQIAYgAzYCGAsgBiAGNgIMIAYgBjYCCAwCC0GUCCAFQShrIgNBeCABa0EHcUEAIAFBCGpBB3EbIgBrIgI2AgBBoAggACABaiIANgIAIAAgAkEBcjYCBCABIANqQSg2AgRBpAhB8AsoAgA2AgAgByAEQScgBGtBB3FBACAEQSdrQQdxG2pBL2siACAAIAdBEGpJGyICQRs2AgQgAkHQCykCADcCECACQcgLKQIANwIIQdALIAJBCGo2AgBBzAsgBTYCAEHICyABNgIAQdQLQQA2AgAgAkEYaiEAA0AgAEEHNgIEIABBCGohASAAQQRqIQAgASAESQ0ACyACIAdGDQMgAiACKAIEQX5xNgIEIAcgAiAHayIEQQFyNgIEIAIgBDYCACAEQf8BTQRAIARBA3YiAEEDdEGwCGohAgJ/QYgIKAIAIgFBASAAdCIAcUUEQEGICCAAIAFyNgIAIAIMAQsgAigCCAshACACIAc2AgggACAHNgIMIAcgAjYCDCAHIAA2AggMBAtBHyEAIAdCADcCECAEQf///wdNBEAgBEEIdiIAIABBgP4/akEQdkEIcSICdCIAIABBgOAfakEQdkEEcSIBdCIAIABBgIAPakEQdkECcSIAdEEPdiABIAJyIAByayIAQQF0IAQgAEEVanZBAXFyQRxqIQALIAcgADYCHCAAQQJ0QbgKaiEDAkBBjAgoAgAiAkEBIAB0IgFxRQRAQYwIIAEgAnI2AgAgAyAHNgIAIAcgAzYCGAwBCyAEQQBBGSAAQQF2ayAAQR9GG3QhACADKAIAIQEDQCABIgIoAgRBeHEgBEYNBCAAQR12IQEgAEEBdCEAIAIgAUEEcWoiAygCECIBDQALIAMgBzYCECAHIAI2AhgLIAcgBzYCDCAHIAc2AggMAwsgAygCCCIAIAY2AgwgAyAGNgIIIAZBADYCGCAGIAM2AgwgBiAANgIICyAJQQhqIQAMBQsgAigCCCIAIAc2AgwgAiAHNgIIIAdBADYCGCAHIAI2AgwgByAANgIIC0GUCCgCACIAIAhNDQBBlAggACAIayIBNgIAQaAIQaAIKAIAIgIgCGoiADYCACAAIAFBAXI2AgQgAiAIQQNyNgIEIAJBCGohAAwDC0GECEEwNgIAQQAhAAwCCwJAIAVFDQACQCAEKAIcIgJBAnRBuApqIgAoAgAgBEYEQCAAIAE2AgAgAQ0BQYwIIAlBfiACd3EiCTYCAAwCCyAFQRBBFCAFKAIQIARGG2ogATYCACABRQ0BCyABIAU2AhggBCgCECIABEAgASAANgIQIAAgATYCGAsgBCgCFCIARQ0AIAEgADYCFCAAIAE2AhgLAkAgA0EPTQRAIAQgAyAIaiIAQQNyNgIEIAAgBGoiACAAKAIEQQFyNgIEDAELIAQgCEEDcjYCBCAGIANBAXI2AgQgAyAGaiADNgIAIANB/wFNBEAgA0EDdiIAQQN0QbAIaiECAn9BiAgoAgAiAUEBIAB0IgBxRQRAQYgIIAAgAXI2AgAgAgwBCyACKAIICyEAIAIgBjYCCCAAIAY2AgwgBiACNgIMIAYgADYCCAwBC0EfIQAgA0H///8HTQRAIANBCHYiACAAQYD+P2pBEHZBCHEiAnQiACAAQYDgH2pBEHZBBHEiAXQiACAAQYCAD2pBEHZBAnEiAHRBD3YgASACciAAcmsiAEEBdCADIABBFWp2QQFxckEcaiEACyAGIAA2AhwgBkIANwIQIABBAnRBuApqIQICQAJAIAlBASAAdCIBcUUEQEGMCCABIAlyNgIAIAIgBjYCACAGIAI2AhgMAQsgA0EAQRkgAEEBdmsgAEEfRht0IQAgAigCACEIA0AgCCIBKAIEQXhxIANGDQIgAEEddiECIABBAXQhACABIAJBBHFqIgIoAhAiCA0ACyACIAY2AhAgBiABNgIYCyAGIAY2AgwgBiAGNgIIDAELIAEoAggiACAGNgIMIAEgBjYCCCAGQQA2AhggBiABNgIMIAYgADYCCAsgBEEIaiEADAELAkAgC0UNAAJAIAEoAhwiAkECdEG4CmoiACgCACABRgRAIAAgBDYCACAEDQFBjAggBkF+IAJ3cTYCAAwCCyALQRBBFCALKAIQIAFGG2ogBDYCACAERQ0BCyAEIAs2AhggASgCECIABEAgBCAANgIQIAAgBDYCGAsgASgCFCIARQ0AIAQgADYCFCAAIAQ2AhgLAkAgA0EPTQRAIAEgAyAIaiIAQQNyNgIEIAAgAWoiACAAKAIEQQFyNgIEDAELIAEgCEEDcjYCBCAJIANBAXI2AgQgAyAJaiADNgIAIAoEQCAKQQN2IgBBA3RBsAhqIQRBnAgoAgAhAgJ/QQEgAHQiACAFcUUEQEGICCAAIAVyNgIAIAQMAQsgBCgCCAshACAEIAI2AgggACACNgIMIAIgBDYCDCACIAA2AggLQZwIIAk2AgBBkAggAzYCAAsgAUEIaiEACyAMQRBqJAAgAAsQACMAIABrQXBxIgAkACAACwYAIAAkAAsEACMAC4AJAgh/BH4jAEGQAWsiBiQAIAYgBS0AA0EYdEGAgIAYcSAFLwAAIAUtAAJBEHRycjYCACAGIAUoAANBAnZBg/7/H3E2AgQgBiAFKAAGQQR2Qf+B/x9xNgIIIAYgBSgACUEGdkH//8AfcTYCDCAFLwANIQggBS0ADyEJIAZCADcCFCAGQgA3AhwgBkEANgIkIAYgCCAJQRB0QYCAPHFyNgIQIAYgBSgAEDYCKCAGIAUoABQ2AiwgBiAFKAAYNgIwIAUoABwhBSAGQQA6AEwgBkEANgI4IAYgBTYCNCAGIAEgAhAEIAQEQCAGIAMgBBAECyAGKAI4IgEEQCAGQTxqIgIgAWpBAToAACABQQFqQQ9NBEAgASAGakE9aiEEAkBBDyABayIDRQ0AIAMgBGoiAUEBa0EAOgAAIARBADoAACADQQNJDQAgAUECa0EAOgAAIARBADoAASABQQNrQQA6AAAgBEEAOgACIANBB0kNACABQQRrQQA6AAAgBEEAOgADIANBCUkNACAEQQAgBGtBA3EiAWoiBEEANgIAIAQgAyABa0F8cSIBaiIDQQRrQQA2AgAgAUEJSQ0AIARBADYCCCAEQQA2AgQgA0EIa0EANgIAIANBDGtBADYCACABQRlJDQAgBEEANgIYIARBADYCFCAEQQA2AhAgBEEANgIMIANBEGtBADYCACADQRRrQQA2AgAgA0EYa0EANgIAIANBHGtBADYCACABIARBBHFBGHIiAWsiA0EgSQ0AIAEgBGohAQNAIAFCADcDGCABQgA3AxAgAUIANwMIIAFCADcDACABQSBqIQEgA0EgayIDQR9LDQALCwsgBkEBOgBMIAYgAkEQEAILIAY1AjQhECAGNQIwIREgBjUCLCEOIAAgBjUCKCAGKAIkIAYoAiAgBigCHCAGKAIYIgNBGnZqIgJBGnZqIgFBGnZqIgtBgICAYHIgAUH///8fcSINIAJB////H3EiCCAGKAIUIAtBGnZBBWxqIgFB////H3EiCUEFaiIFQRp2IANB////H3EgAUEadmoiA2oiAUEadmoiAkEadmoiBEEadmoiDEEfdSIHIANxIAEgDEEfdkEBayIDQf///x9xIgpxciIBQRp0IAUgCnEgByAJcXJyrXwiDzwAACAAIA9CGIg8AAMgACAPQhCIPAACIAAgD0IIiDwAASAAIA4gByAIcSACIApxciICQRR0IAFBBnZyrXwgD0IgiHwiDjwABCAAIA5CGIg8AAcgACAOQhCIPAAGIAAgDkIIiDwABSAAIBEgByANcSAEIApxciIBQQ50IAJBDHZyrXwgDkIgiHwiDjwACCAAIA5CGIg8AAsgACAOQhCIPAAKIAAgDkIIiDwACSAAIBAgAyAMcSAHIAtxckEIdCABQRJ2cq18IA5CIIh8Ig48AAwgACAOQhiIPAAPIAAgDkIQiDwADiAAIA5CCIg8AA0gBkIANwIwIAZCADcCKCAGQgA3AiAgBkIANwIYIAZCADcCECAGQgA3AgggBkIANwIAIAZBkAFqJAALpwwBB38CQCAARQ0AIABBCGsiAyAAQQRrKAIAIgFBeHEiAGohBQJAIAFBAXENACABQQNxRQ0BIAMgAygCACIBayIDQZgIKAIASQ0BIAAgAWohACADQZwIKAIARwRAIAFB/wFNBEAgAygCCCICIAFBA3YiBEEDdEGwCGpGGiACIAMoAgwiAUYEQEGICEGICCgCAEF+IAR3cTYCAAwDCyACIAE2AgwgASACNgIIDAILIAMoAhghBgJAIAMgAygCDCIBRwRAIAMoAggiAiABNgIMIAEgAjYCCAwBCwJAIANBFGoiAigCACIEDQAgA0EQaiICKAIAIgQNAEEAIQEMAQsDQCACIQcgBCIBQRRqIgIoAgAiBA0AIAFBEGohAiABKAIQIgQNAAsgB0EANgIACyAGRQ0BAkAgAyADKAIcIgJBAnRBuApqIgQoAgBGBEAgBCABNgIAIAENAUGMCEGMCCgCAEF+IAJ3cTYCAAwDCyAGQRBBFCAGKAIQIANGG2ogATYCACABRQ0CCyABIAY2AhggAygCECICBEAgASACNgIQIAIgATYCGAsgAygCFCICRQ0BIAEgAjYCFCACIAE2AhgMAQsgBSgCBCIBQQNxQQNHDQBBkAggADYCACAFIAFBfnE2AgQgAyAAQQFyNgIEIAAgA2ogADYCAA8LIAMgBU8NACAFKAIEIgFBAXFFDQACQCABQQJxRQRAIAVBoAgoAgBGBEBBoAggAzYCAEGUCEGUCCgCACAAaiIANgIAIAMgAEEBcjYCBCADQZwIKAIARw0DQZAIQQA2AgBBnAhBADYCAA8LIAVBnAgoAgBGBEBBnAggAzYCAEGQCEGQCCgCACAAaiIANgIAIAMgAEEBcjYCBCAAIANqIAA2AgAPCyABQXhxIABqIQACQCABQf8BTQRAIAUoAggiAiABQQN2IgRBA3RBsAhqRhogAiAFKAIMIgFGBEBBiAhBiAgoAgBBfiAEd3E2AgAMAgsgAiABNgIMIAEgAjYCCAwBCyAFKAIYIQYCQCAFIAUoAgwiAUcEQCAFKAIIIgJBmAgoAgBJGiACIAE2AgwgASACNgIIDAELAkAgBUEUaiICKAIAIgQNACAFQRBqIgIoAgAiBA0AQQAhAQwBCwNAIAIhByAEIgFBFGoiAigCACIEDQAgAUEQaiECIAEoAhAiBA0ACyAHQQA2AgALIAZFDQACQCAFIAUoAhwiAkECdEG4CmoiBCgCAEYEQCAEIAE2AgAgAQ0BQYwIQYwIKAIAQX4gAndxNgIADAILIAZBEEEUIAYoAhAgBUYbaiABNgIAIAFFDQELIAEgBjYCGCAFKAIQIgIEQCABIAI2AhAgAiABNgIYCyAFKAIUIgJFDQAgASACNgIUIAIgATYCGAsgAyAAQQFyNgIEIAAgA2ogADYCACADQZwIKAIARw0BQZAIIAA2AgAPCyAFIAFBfnE2AgQgAyAAQQFyNgIEIAAgA2ogADYCAAsgAEH/AU0EQCAAQQN2IgFBA3RBsAhqIQACf0GICCgCACICQQEgAXQiAXFFBEBBiAggASACcjYCACAADAELIAAoAggLIQIgACADNgIIIAIgAzYCDCADIAA2AgwgAyACNgIIDwtBHyECIANCADcCECAAQf///wdNBEAgAEEIdiIBIAFBgP4/akEQdkEIcSIBdCICIAJBgOAfakEQdkEEcSICdCIEIARBgIAPakEQdkECcSIEdEEPdiABIAJyIARyayIBQQF0IAAgAUEVanZBAXFyQRxqIQILIAMgAjYCHCACQQJ0QbgKaiEBAkACQAJAQYwIKAIAIgRBASACdCIHcUUEQEGMCCAEIAdyNgIAIAEgAzYCACADIAE2AhgMAQsgAEEAQRkgAkEBdmsgAkEfRht0IQIgASgCACEBA0AgASIEKAIEQXhxIABGDQIgAkEddiEBIAJBAXQhAiAEIAFBBHFqIgdBEGooAgAiAQ0ACyAHIAM2AhAgAyAENgIYCyADIAM2AgwgAyADNgIIDAELIAQoAggiACADNgIMIAQgAzYCCCADQQA2AhggAyAENgIMIAMgADYCCAtBqAhBqAgoAgBBAWsiAEF/IAAbNgIACwsLCQEAQYEICwIGUA==").startsWith(Q)){var D=P;P=n.locateFile?n.locateFile(D,A):A+D}function H(){var e=P;try{if(e==P&&E)return new Uint8Array(E);var t=W(e);if(t)return t;if(f)return f(e);throw"both async and sync fetching of the wasm failed"}catch(e){O(e)}}function F(e){for(;0<e.length;){var t=e.shift();if("function"==typeof t)t(n);else{var r=t.m;"number"==typeof r?void 0===t.l?B.get(r)():B.get(r)(t.l):r(void 0===t.l?null:t.l)}}}var M=!1,K="function"==typeof atob?atob:function(e){var t="",r=0;e=e.replace(/[^A-Za-z0-9\+\/=]/g,"");do{var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(e.charAt(r++)),n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(e.charAt(r++)),s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(e.charAt(r++)),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(e.charAt(r++));i=i<<2|n>>4,n=(15&n)<<4|s>>2;var a=(3&s)<<6|o;t+=String.fromCharCode(i),64!==s&&(t+=String.fromCharCode(n)),64!==o&&(t+=String.fromCharCode(a))}while(r<e.length)return t};function W(e){if(e.startsWith(Q)){if(e=e.slice(Q.length),"boolean"==typeof p&&p){var t=Buffer.from(e,"base64");t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}else try{var r=K(e),i=new Uint8Array(r.length);for(e=0;e<r.length;++e)i[e]=r.charCodeAt(e);t=i}catch(e){throw Error("Converting base64 string to bytes failed.")}return t}}var q={a:function(e){var t=w.length;if(0x80000000<(e>>>=0))return!1;for(var r=1;4>=r;r*=2){var i=t*(1+.2/r);i=Math.min(i,e+0x6000000),0<(i=Math.max(e,i))%65536&&(i+=65536-i%65536);e:{try{b.grow(Math.min(0x80000000,i)-S.byteLength+65535>>>16),C();var n=1;break e}catch(e){}n=void 0}if(n)return!0}return!1}};!function(){function e(e){n.asm=e.exports,b=n.asm.b,C(),B=n.asm.j,R.unshift(n.asm.c),T--,n.monitorRunDependencies&&n.monitorRunDependencies(T),0==T&&(null!==L&&(clearInterval(L),L=null),U&&(e=U,U=null,e()))}function t(t){e(t.instance)}function r(e){return(function(){if(!E&&g){if("function"==typeof fetch&&!P.startsWith("file://"))return fetch(P,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+P+"'";return e.arrayBuffer()}).catch(function(){return H()});if(h)return new Promise(function(e,t){h(P,function(t){e(new Uint8Array(t))},t)})}return Promise.resolve().then(function(){return H()})})().then(function(e){return WebAssembly.instantiate(e,i)}).then(e,function(e){_("failed to asynchronously prepare wasm: "+e),O(e)})}var i={a:q};if(T++,n.monitorRunDependencies&&n.monitorRunDependencies(T),n.instantiateWasm)try{return n.instantiateWasm(i,e)}catch(e){return _("Module.instantiateWasm callback failed with error: "+e),!1}(E||"function"!=typeof WebAssembly.instantiateStreaming||P.startsWith(Q)||P.startsWith("file://")||"function"!=typeof fetch?r(t):fetch(P,{credentials:"same-origin"}).then(function(e){return WebAssembly.instantiateStreaming(e,i).then(t,function(e){return _("wasm streaming compile failed: "+e),_("falling back to ArrayBuffer instantiation"),r(t)})})).catch(o)}(),n.___wasm_call_ctors=function(){return(n.___wasm_call_ctors=n.asm.c).apply(null,arguments)},n._poly1305_auth=function(){return(n._poly1305_auth=n.asm.d).apply(null,arguments)};var $=n.stackSave=function(){return($=n.stackSave=n.asm.e).apply(null,arguments)},G=n.stackRestore=function(){return(G=n.stackRestore=n.asm.f).apply(null,arguments)},Y=n.stackAlloc=function(){return(Y=n.stackAlloc=n.asm.g).apply(null,arguments)};function j(){function e(){if(!r&&(r=!0,n.calledRun=!0,!I)){if(F(R),s(n),n.onRuntimeInitialized&&n.onRuntimeInitialized(),n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;){var e=n.postRun.shift();N.unshift(e)}F(N)}}if(!(0<T)){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)!function(){var e=n.preRun.shift();k.unshift(e)}();F(k),0<T||(n.setStatus?(n.setStatus("Running..."),setTimeout(function(){setTimeout(function(){n.setStatus("")},1),e()},1)):e())}}if(n._malloc=function(){return(n._malloc=n.asm.h).apply(null,arguments)},n._free=function(){return(n._free=n.asm.i).apply(null,arguments)},n.cwrap=function(e,t,r,i){var n=(r=r||[]).every(function(e){return"number"===e});return"string"!==t&&n&&!i?m(e):function(){return function(e,t,r,i){var n={string:function(e){var t=0;if(null!=e&&0!==e){var r=(e.length<<2)+1,i=t=Y(r),n=w;if(0<r){r=i+r-1;for(var s=0;s<e.length;++s){var o=e.charCodeAt(s);if(55296<=o&&57343>=o&&(o=65536+((1023&o)<<10)|1023&e.charCodeAt(++s)),127>=o){if(i>=r)break;n[i++]=o}else{if(2047>=o){if(i+1>=r)break;n[i++]=192|o>>6}else{if(65535>=o){if(i+2>=r)break;n[i++]=224|o>>12}else{if(i+3>=r)break;n[i++]=240|o>>18,n[i++]=128|o>>12&63}n[i++]=128|o>>6&63}n[i++]=128|63&o}}n[i]=0}}return t},array:function(e){var t=Y(e.length);return x.set(e,t),t}},s=m(e),o=[];if(e=0,i)for(var a=0;a<i.length;a++){var l=n[r[a]];l?(0===e&&(e=$()),o[a]=l(i[a])):o[a]=i[a]}return r=function(e){if("string"===t)if(e){for(var r=w,i=e+NaN,n=e;r[n]&&!(n>=i);)++n;if(16<n-e&&r.subarray&&v)e=v.decode(r.subarray(e,n));else{for(i="";e<n;){var s=r[e++];if(128&s){var o=63&r[e++];if(192==(224&s))i+=String.fromCharCode((31&s)<<6|o);else{var a=63&r[e++];65536>(s=224==(240&s)?(15&s)<<12|o<<6|a:(7&s)<<18|o<<12|a<<6|63&r[e++])?i+=String.fromCharCode(s):(s-=65536,i+=String.fromCharCode(55296|s>>10,56320|1023&s))}}else i+=String.fromCharCode(s)}e=i}}else e="";else e="boolean"===t?!!e:e;return e}(r=s.apply(null,o)),0!==e&&G(e),r}(e,t,r,arguments)}},U=function e(){r||j(),r||(U=e)},n.run=j,n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);0<n.preInit.length;)n.preInit.pop()();return j(),t.ready})},606894,(e,t,r)=>{t.exports=e.x("cpu-features-b72d426a8252a4e7",()=>require("cpu-features-b72d426a8252a4e7"))},11607,(e,t,r)=>{"use strict";let i,n,s,o=e.r(254799);try{i=e.r(606894)()}catch{}let{bindingAvailable:a,CIPHER_INFO:l,MAC_INFO:c}=e.r(866310),h=(()=>{if("function"==typeof o.sign&&"function"==typeof o.verify){let e,t,r="-----BEGIN PRIVATE KEY-----\r\nMC4CAQAwBQYDK2VwBCIEIHKj+sVa9WcD/q2DJUJaf43Kptc8xYuUQA4bOFj9vC8T\r\n-----END PRIVATE KEY-----",i=Buffer.from("a");try{e=o.sign(null,i,r),t=o.verify(null,i,r,e)}catch{}return Buffer.isBuffer(e)&&64===e.length&&!0===t}return!1})(),f="function"==typeof o.diffieHellman&&"function"==typeof o.generateKeyPairSync&&"function"==typeof o.createPublicKey,d=["ecdh-sha2-nistp256","ecdh-sha2-nistp384","ecdh-sha2-nistp521","diffie-hellman-group-exchange-sha256","diffie-hellman-group14-sha256","diffie-hellman-group15-sha512","diffie-hellman-group16-sha512","diffie-hellman-group17-sha512","diffie-hellman-group18-sha512"];f&&(d.unshift("curve25519-sha256"),d.unshift("curve25519-sha256@libssh.org"));let u=d.concat(["diffie-hellman-group-exchange-sha1","diffie-hellman-group14-sha1","diffie-hellman-group1-sha1"]),g=["ecdsa-sha2-nistp256","ecdsa-sha2-nistp384","ecdsa-sha2-nistp521","rsa-sha2-512","rsa-sha2-256","ssh-rsa"];h&&g.unshift("ssh-ed25519");let p=g.concat(["ssh-dss"]),A=(n=o.getCiphers(),e=>n.includes(l[e].sslName)),_=["aes128-gcm@openssh.com","aes256-gcm@openssh.com","aes128-ctr","aes192-ctr","aes256-ctr"];i&&i.flags&&!i.flags.aes?a?_.unshift("chacha20-poly1305@openssh.com"):_.push("chacha20-poly1305@openssh.com"):a&&i&&"x86"===i.arch?_.splice(4,0,"chacha20-poly1305@openssh.com"):_.push("chacha20-poly1305@openssh.com");let E=(_=_.filter(A)).concat(["aes256-cbc","aes192-cbc","aes128-cbc","blowfish-cbc","3des-cbc","aes128-gcm","aes256-gcm","arcfour256","arcfour128","cast128-cbc","arcfour"].filter(A)),b=(s=o.getHashes(),e=>s.includes(c[e].sslName)),I=["hmac-sha2-256-etm@openssh.com","hmac-sha2-512-etm@openssh.com","hmac-sha1-etm@openssh.com","hmac-sha2-256","hmac-sha2-512","hmac-sha1"].filter(b),y=I.concat(["hmac-md5","hmac-sha2-256-96","hmac-sha2-512-96","hmac-ripemd160","hmac-sha1-96","hmac-md5-96"].filter(b)),m=["none","zlib@openssh.com","zlib"],S=m.concat([]),x={BAD_DHGEX:1,OLD_EXIT:2,DYN_RPORT_BUG:4,BUG_DHGEX_LARGE:8,IMPLY_RSA_SHA2_SIGALGS:16};t.exports={MESSAGE:{DISCONNECT:1,IGNORE:2,UNIMPLEMENTED:3,DEBUG:4,SERVICE_REQUEST:5,SERVICE_ACCEPT:6,EXT_INFO:7,KEXINIT:20,NEWKEYS:21,KEXDH_INIT:30,KEXDH_REPLY:31,KEXDH_GEX_GROUP:31,KEXDH_GEX_INIT:32,KEXDH_GEX_REPLY:33,KEXDH_GEX_REQUEST:34,KEXECDH_INIT:30,KEXECDH_REPLY:31,USERAUTH_REQUEST:50,USERAUTH_FAILURE:51,USERAUTH_SUCCESS:52,USERAUTH_BANNER:53,USERAUTH_PASSWD_CHANGEREQ:60,USERAUTH_PK_OK:60,USERAUTH_INFO_REQUEST:60,USERAUTH_INFO_RESPONSE:61,GLOBAL_REQUEST:80,REQUEST_SUCCESS:81,REQUEST_FAILURE:82,CHANNEL_OPEN:90,CHANNEL_OPEN_CONFIRMATION:91,CHANNEL_OPEN_FAILURE:92,CHANNEL_WINDOW_ADJUST:93,CHANNEL_DATA:94,CHANNEL_EXTENDED_DATA:95,CHANNEL_EOF:96,CHANNEL_CLOSE:97,CHANNEL_REQUEST:98,CHANNEL_SUCCESS:99,CHANNEL_FAILURE:100},DISCONNECT_REASON:{HOST_NOT_ALLOWED_TO_CONNECT:1,PROTOCOL_ERROR:2,KEY_EXCHANGE_FAILED:3,RESERVED:4,MAC_ERROR:5,COMPRESSION_ERROR:6,SERVICE_NOT_AVAILABLE:7,PROTOCOL_VERSION_NOT_SUPPORTED:8,HOST_KEY_NOT_VERIFIABLE:9,CONNECTION_LOST:10,BY_APPLICATION:11,TOO_MANY_CONNECTIONS:12,AUTH_CANCELED_BY_USER:13,NO_MORE_AUTH_METHODS_AVAILABLE:14,ILLEGAL_USER_NAME:15},DISCONNECT_REASON_STR:void 0,CHANNEL_OPEN_FAILURE:{ADMINISTRATIVELY_PROHIBITED:1,CONNECT_FAILED:2,UNKNOWN_CHANNEL_TYPE:3,RESOURCE_SHORTAGE:4},TERMINAL_MODE:{TTY_OP_END:0,VINTR:1,VQUIT:2,VERASE:3,VKILL:4,VEOF:5,VEOL:6,VEOL2:7,VSTART:8,VSTOP:9,VSUSP:10,VDSUSP:11,VREPRINT:12,VWERASE:13,VLNEXT:14,VFLUSH:15,VSWTCH:16,VSTATUS:17,VDISCARD:18,IGNPAR:30,PARMRK:31,INPCK:32,ISTRIP:33,INLCR:34,IGNCR:35,ICRNL:36,IUCLC:37,IXON:38,IXANY:39,IXOFF:40,IMAXBEL:41,ISIG:50,ICANON:51,XCASE:52,ECHO:53,ECHOE:54,ECHOK:55,ECHONL:56,NOFLSH:57,TOSTOP:58,IEXTEN:59,ECHOCTL:60,ECHOKE:61,PENDIN:62,OPOST:70,OLCUC:71,ONLCR:72,OCRNL:73,ONOCR:74,ONLRET:75,CS7:90,CS8:91,PARENB:92,PARODD:93,TTY_OP_ISPEED:128,TTY_OP_OSPEED:129},CHANNEL_EXTENDED_DATATYPE:{STDERR:1},SIGNALS:["ABRT","ALRM","FPE","HUP","ILL","INT","QUIT","SEGV","TERM","USR1","USR2","KILL","PIPE"].reduce((e,t)=>({...e,[t]:1}),{}),COMPAT:x,COMPAT_CHECKS:[["Cisco-1.25",x.BAD_DHGEX],[/^Cisco-1[.]/,x.BUG_DHGEX_LARGE],[/^[0-9.]+$/,x.OLD_EXIT],[/^OpenSSH_5[.][0-9]+/,x.DYN_RPORT_BUG],[/^OpenSSH_7[.]4/,x.IMPLY_RSA_SHA2_SIGALGS]],DEFAULT_KEX:d,SUPPORTED_KEX:u,DEFAULT_SERVER_HOST_KEY:g,SUPPORTED_SERVER_HOST_KEY:p,DEFAULT_CIPHER:_,SUPPORTED_CIPHER:E,DEFAULT_MAC:I,SUPPORTED_MAC:y,DEFAULT_COMPRESSION:m,SUPPORTED_COMPRESSION:S,curve25519Supported:f,eddsaSupported:h},t.exports.DISCONNECT_REASON_BY_VALUE=Array.from(Object.entries(t.exports.DISCONNECT_REASON)).reduce((e,[t,r])=>({...e,[r]:t}),{})},69253,(e,t,r)=>{"use strict";let i,n=e.r(342085).Ber,s=Buffer[Symbol.species],o=Object.getPrototypeOf(Uint8Array.prototype).fill;function a(e,t){return 0x1000000*e[t++]+65536*e[t++]+256*e[t++]+e[t]}function l(e,t,r,i,n){n||(n=0),i>e.length&&(i=e.length);let s=i-r,o=t.length-n;return s>o&&(s=o),t.set(new Uint8Array(e.buffer,e.byteOffset+r,s),n),s}function c(e,t,r){return void 0===r&&(r=e.length),new s(e.buffer,e.byteOffset+t,r-t)}function h(){let e,t=0,r={init:(r,i)=>{e=r,t="number"==typeof i?i:0},pos:()=>t,length:()=>e?e.length:0,avail:()=>e&&t<e.length?e.length-t:0,clear:()=>{e=void 0},readUInt32BE:()=>{if(e&&!(t+3>=e.length))return 0x1000000*e[t++]+65536*e[t++]+256*e[t++]+e[t++]},readUInt64BE:r=>{if(e&&!(t+7>=e.length))switch(r){case"always":return BigInt(`0x${e.hexSlice(t,t+=8)}`);case"maybe":if(e[t]>31)return BigInt(`0x${e.hexSlice(t,t+=8)}`);default:return 0x100000000000000*e[t++]+0x1000000000000*e[t++]+0x10000000000*e[t++]+0x100000000*e[t++]+0x1000000*e[t++]+65536*e[t++]+256*e[t++]+e[t++]}},skip:r=>{e&&r>0&&(t+=r)},skipString:()=>{let i=r.readUInt32BE();if(void 0!==i)return(t+=i)<=e.length?i:void 0},readByte:()=>{if(e&&t<e.length)return e[t++]},readBool:()=>{if(e&&t<e.length)return!!e[t++]},readList:()=>{let e=r.readString(!0);if(void 0!==e)return e?e.split(","):[]},readString:(i,n)=>{"number"==typeof i&&(n=i,i=void 0);let s=r.readUInt32BE();if(void 0!==s&&!(e.length-t<s)&&("number"!=typeof n||!(s>n)))return i?Buffer.isBuffer(i)?l(e,i,t,t+=s):e.utf8Slice(t,t+=s):c(e,t,t+=s)},readRaw:r=>{if(e){if("number"!=typeof r)return c(e,t,t+=e.length-t);if(e.length-t>=r)return c(e,t,t+=r)}}};return r}function f(e,t,r){let i=Error(e);return"boolean"==typeof t?(r=t,i.level="protocol"):i.level=t||"protocol",i.fatal=!!r,i}function d(e,t,r){return e[r++]=t>>>24,e[r++]=t>>>16,e[r++]=t>>>8,e[r++]=t,r}let u=h();t.exports={bufferCopy:l,bufferSlice:c,FastBuffer:s,bufferFill:(e,t,r,i)=>o.call(e,t,r,i),makeError:f,doFatalError:(t,r,n,s)=>{let o;return void 0===i&&({DISCONNECT_REASON:i}=e.r(11607)),r instanceof Error?(o=r,s="number"!=typeof n?i.PROTOCOL_ERROR:n):o=f(r,n,!0),"number"!=typeof s&&(s=i.PROTOCOL_ERROR),t.disconnect(s),t._destruct(),t._onError(o),1/0},readUInt32BE:a,writeUInt32BE:d,writeUInt32LE:(e,t,r)=>(e[r++]=t,e[r++]=t>>>8,e[r++]=t>>>16,e[r++]=t>>>24,r),makeBufferParser:h,bufferParser:h(),readString:(e,t,r,i)=>{"number"==typeof r&&(i=r,r=void 0),void 0===t&&(t=0);let n=e.length-t;if(t<0||t>=e.length||n<4)return;let s=a(e,t);if(n<4+s||"number"==typeof i&&s>i)return;let o=(t+=4)+s;return(e._pos=o,r)?Buffer.isBuffer(r)?l(e,r,t,o):e.utf8Slice(t,o):c(e,t,o)},sigSSHToASN1:(e,t)=>{switch(t){case"ssh-dss":{if(e.length>40)return e;let t=new n.Writer;t.startSequence();let r=e.slice(0,20),i=e.slice(20);if(128&r[0]){let e=Buffer.allocUnsafe(21);e[0]=0,r.copy(e,1),r=e}else 0!==r[0]||128&r[1]||(r=r.slice(1));if(128&i[0]){let e=Buffer.allocUnsafe(21);e[0]=0,i.copy(e,1),i=e}else 0!==i[0]||128&i[1]||(i=i.slice(1));return t.writeBuffer(r,n.Integer),t.writeBuffer(i,n.Integer),t.endSequence(),t.buffer}case"ecdsa-sha2-nistp256":case"ecdsa-sha2-nistp384":case"ecdsa-sha2-nistp521":{u.init(e,0);let t=u.readString(),r=u.readString();if(u.clear(),void 0===t||void 0===r)return;let i=new n.Writer;return i.startSequence(),i.writeBuffer(t,n.Integer),i.writeBuffer(r,n.Integer),i.endSequence(),i.buffer}default:return e}},convertSignature:(e,t)=>{switch(t){case"ssh-dss":{if(e.length<=40)return e;let t=new n.Reader(e);t.readSequence();let r=t.readString(n.Integer,!0),i=t.readString(n.Integer,!0),s=0,o=0;if(r.length<20){let e=Buffer.allocUnsafe(20);e.set(r,1),(r=e)[0]=0}if(i.length<20){let e=Buffer.allocUnsafe(20);e.set(i,1),(i=e)[0]=0}r.length>20&&0===r[0]&&(s=1),i.length>20&&0===i[0]&&(o=1);let a=Buffer.allocUnsafe(r.length-s+(i.length-o));return l(r,a,s,r.length,0),l(i,a,o,i.length,r.length-s),a}case"ecdsa-sha2-nistp256":case"ecdsa-sha2-nistp384":case"ecdsa-sha2-nistp521":{if(0===e[0])return e;let t=new n.Reader(e);t.readSequence();let r=t.readString(n.Integer,!0),i=t.readString(n.Integer,!0);if(null===r||null===i)return;let s=Buffer.allocUnsafe(4+r.length+4+i.length);return d(s,r.length,0),s.set(r,4),d(s,i.length,4+r.length),s.set(i,8+r.length),s}}return e},sendPacket:(e,t,r)=>r||void 0===e._kexinit?(e._cipher.encrypt(t),!0):(void 0===e._queue&&(e._queue=[]),e._queue.push(t),e._debug&&e._debug("Outbound: ... packet queued"),!1)}},866310,(e,t,r)=>{"use strict";let i,n,s,o,a,l,c,h,f,d,u,{createCipheriv:g,createDecipheriv:p,createHmac:A,randomFillSync:_,timingSafeEqual:E}=e.r(254799),{readUInt32BE:b,writeUInt32BE:I}=e.r(69253),y=Buffer[Symbol.species],m=0x100000000-1,S=Buffer.alloc(0),x=Buffer.alloc(4),w=new Map;try{i=(()=>{let e=Error("Cannot find module './crypto/build/Release/sshcrypto.node'");throw e.code="MODULE_NOT_FOUND",e})(),{AESGCMCipher:n,ChaChaPolyCipher:s,GenericCipher:o,AESGCMDecipher:a,ChaChaPolyDecipher:l,GenericDecipher:c}=i}catch{}let v=(()=>{function e(e,t,r,i,n,s,o){return{sslName:e,blockLen:t,keyLen:r,ivLen:0!==i||1&o?i:t,authLen:n,discardLen:s,stream:!!(1&o)}}return{"chacha20-poly1305@openssh.com":e("chacha20",8,64,0,16,0,1),"aes128-gcm":e("aes-128-gcm",16,16,12,16,0,1),"aes256-gcm":e("aes-256-gcm",16,32,12,16,0,1),"aes128-gcm@openssh.com":e("aes-128-gcm",16,16,12,16,0,1),"aes256-gcm@openssh.com":e("aes-256-gcm",16,32,12,16,0,1),"aes128-cbc":e("aes-128-cbc",16,16,0,0,0,0),"aes192-cbc":e("aes-192-cbc",16,24,0,0,0,0),"aes256-cbc":e("aes-256-cbc",16,32,0,0,0,0),"rijndael-cbc@lysator.liu.se":e("aes-256-cbc",16,32,0,0,0,0),"3des-cbc":e("des-ede3-cbc",8,24,0,0,0,0),"blowfish-cbc":e("bf-cbc",8,16,0,0,0,0),"idea-cbc":e("idea-cbc",8,16,0,0,0,0),"cast128-cbc":e("cast-cbc",8,16,0,0,0,0),"aes128-ctr":e("aes-128-ctr",16,16,16,0,0,1),"aes192-ctr":e("aes-192-ctr",16,24,16,0,0,1),"aes256-ctr":e("aes-256-ctr",16,32,16,0,0,1),"3des-ctr":e("des-ede3",8,24,8,0,0,1),"blowfish-ctr":e("bf-ecb",8,16,8,0,0,1),"cast128-ctr":e("cast5-ecb",8,16,8,0,0,1),arcfour:e("rc4",8,16,0,0,1536,1),arcfour128:e("rc4",8,16,0,0,1536,1),arcfour256:e("rc4",8,32,0,0,1536,1),arcfour512:e("rc4",8,64,0,0,1536,1)}})(),C=(()=>{function e(e,t,r,i){return{sslName:e,len:t,actualLen:r,isETM:i}}return{"hmac-md5":e("md5",16,16,!1),"hmac-md5-96":e("md5",16,12,!1),"hmac-ripemd160":e("ripemd160",20,20,!1),"hmac-sha1":e("sha1",20,20,!1),"hmac-sha1-etm@openssh.com":e("sha1",20,20,!0),"hmac-sha1-96":e("sha1",20,12,!1),"hmac-sha2-256":e("sha256",32,32,!1),"hmac-sha2-256-etm@openssh.com":e("sha256",32,32,!0),"hmac-sha2-256-96":e("sha256",32,12,!1),"hmac-sha2-512":e("sha512",64,64,!1),"hmac-sha2-512-etm@openssh.com":e("sha512",64,64,!0),"hmac-sha2-512-96":e("sha512",64,12,!1)}})(),B=Buffer.alloc(32),k=Buffer.alloc(16);class R{constructor(e){const t=e.outbound;this.outSeqno=t.seqno,this._onWrite=t.onWrite,this._encKeyMain=t.cipherKey.slice(0,32),this._encKeyPktLen=t.cipherKey.slice(32),this._dead=!1}free(){this._dead=!0}allocPacket(e){let t=5+e,r=8-(t-4&7);r<4&&(r+=8),t+=r;let i=Buffer.allocUnsafe(t);return I(i,t-4,0),i[4]=r,_(i,5+e,r),i}encrypt(e){if(this._dead)return;k[0]=0,I(k,this.outSeqno,12);let t=g("chacha20",this._encKeyMain,k).update(B),r=g("chacha20",this._encKeyPktLen,k).update(e.slice(0,4));this._onWrite(r),k[0]=1;let i=g("chacha20",this._encKeyMain,k).update(e.slice(4));this._onWrite(i),d(f,r,r.length,i,i.length,t);let n=Buffer.allocUnsafe(16);n.set(new Uint8Array(h.HEAPU8.buffer,f,16),0),this._onWrite(n),this.outSeqno=this.outSeqno+1>>>0}}class N{constructor(e){const t=e.outbound;this.outSeqno=t.seqno,this._onWrite=t.onWrite,this._instance=new s(t.cipherKey),this._dead=!1}free(){this._dead=!0,this._instance.free()}allocPacket(e){let t=5+e,r=8-(t-4&7);r<4&&(r+=8),t+=r;let i=Buffer.allocUnsafe(t+16);return I(i,t-4,0),i[4]=r,_(i,5+e,r),i}encrypt(e){this._dead||(this._instance.encrypt(e,this.outSeqno),this._onWrite(e),this.outSeqno=this.outSeqno+1>>>0)}}class T{constructor(e){const t=e.outbound;this.outSeqno=t.seqno,this._onWrite=t.onWrite,this._encSSLName=t.cipherInfo.sslName,this._encKey=t.cipherKey,this._encIV=t.cipherIV,this._dead=!1}free(){this._dead=!0}allocPacket(e){let t=5+e,r=16-(t-4&15);r<4&&(r+=16),t+=r;let i=Buffer.allocUnsafe(t);return I(i,t-4,0),i[4]=r,_(i,5+e,r),i}encrypt(e){if(this._dead)return;let t=g(this._encSSLName,this._encKey,this._encIV);t.setAutoPadding(!1);let r=e.slice(0,4);t.setAAD(r),this._onWrite(r);let i=t.update(e.slice(4));this._onWrite(i);let n=t.final();n.length&&this._onWrite(n);let s=t.getAuthTag();this._onWrite(s),K(this._encIV),this.outSeqno=this.outSeqno+1>>>0}}class L{constructor(e){const t=e.outbound;this.outSeqno=t.seqno,this._onWrite=t.onWrite,this._instance=new n(t.cipherInfo.sslName,t.cipherKey,t.cipherIV),this._dead=!1}free(){this._dead=!0,this._instance.free()}allocPacket(e){let t=5+e,r=16-(t-4&15);r<4&&(r+=16),t+=r;let i=Buffer.allocUnsafe(t+16);return I(i,t-4,0),i[4]=r,_(i,5+e,r),i}encrypt(e){this._dead||(this._instance.encrypt(e),this._onWrite(e),this.outSeqno=this.outSeqno+1>>>0)}}class U{constructor(e){const t=e.outbound;this.outSeqno=t.seqno,this._onWrite=t.onWrite,this._encBlockLen=t.cipherInfo.blockLen,this._cipherInstance=g(t.cipherInfo.sslName,t.cipherKey,t.cipherIV),this._macSSLName=t.macInfo.sslName,this._macKey=t.macKey,this._macActualLen=t.macInfo.actualLen,this._macETM=t.macInfo.isETM,this._aadLen=4*!!this._macETM,this._dead=!1;const r=t.cipherInfo.discardLen;if(r){let e=w.get(r);void 0===e&&(e=Buffer.alloc(r),w.set(r,e)),this._cipherInstance.update(e)}}free(){this._dead=!0}allocPacket(e){let t=this._encBlockLen,r=5+e,i=t-(r-this._aadLen&t-1);i<4&&(i+=t),r+=i;let n=Buffer.allocUnsafe(r);return I(n,r-4,0),n[4]=i,_(n,5+e,i),n}encrypt(e){let t;if(this._dead)return;if(this._macETM){let r=new Uint8Array(e.buffer,e.byteOffset,4),i=this._cipherInstance.update(new Uint8Array(e.buffer,e.byteOffset+4,e.length-4));this._onWrite(r),this._onWrite(i),t=A(this._macSSLName,this._macKey),I(x,this.outSeqno,0),t.update(x),t.update(r),t.update(i)}else{let r=this._cipherInstance.update(e);this._onWrite(r),t=A(this._macSSLName,this._macKey),I(x,this.outSeqno,0),t.update(x),t.update(e)}let r=t.digest();r.length>this._macActualLen&&(r=r.slice(0,this._macActualLen)),this._onWrite(r),this.outSeqno=this.outSeqno+1>>>0}}class O{constructor(e){const t=e.outbound;this.outSeqno=t.seqno,this._onWrite=t.onWrite,this._encBlockLen=t.cipherInfo.blockLen,this._macLen=t.macInfo.len,this._macActualLen=t.macInfo.actualLen,this._aadLen=4*!!t.macInfo.isETM,this._instance=new o(t.cipherInfo.sslName,t.cipherKey,t.cipherIV,t.macInfo.sslName,t.macKey,t.macInfo.isETM),this._dead=!1}free(){this._dead=!0,this._instance.free()}allocPacket(e){let t=this._encBlockLen,r=5+e,i=t-(r-this._aadLen&t-1);i<4&&(i+=t),r+=i;let n=Buffer.allocUnsafe(r+this._macLen);return I(n,r-4,0),n[4]=i,_(n,5+e,i),n}encrypt(e){this._dead||(this._instance.encrypt(e,this.outSeqno),this._macActualLen<this._macLen&&(e=new y(e.buffer,e.byteOffset,e.length-(this._macLen-this._macActualLen))),this._onWrite(e),this.outSeqno=this.outSeqno+1>>>0)}}class P{constructor(e){const t=e.inbound;this.inSeqno=t.seqno,this._onPayload=t.onPayload,this._decKeyMain=t.decipherKey.slice(0,32),this._decKeyPktLen=t.decipherKey.slice(32),this._len=0,this._lenBuf=Buffer.alloc(4),this._lenPos=0,this._packet=null,this._pktLen=0,this._mac=Buffer.allocUnsafe(16),this._calcMac=Buffer.allocUnsafe(16),this._macPos=0}free(){}decrypt(e,t,r){for(;t<r;){if(this._lenPos<4){let i=Math.min(4-this._lenPos,r-t);for(;i--;)this._lenBuf[this._lenPos++]=e[t++];if(this._lenPos<4)return;k[0]=0,I(k,this.inSeqno,12);let n=p("chacha20",this._decKeyPktLen,k).update(this._lenBuf);if(this._len=b(n,0),this._len>35e3||this._len<8||(7&this._len)!=0)throw Error("Bad packet length")}if(this._pktLen<this._len){let i;if(t>=r)return;let n=Math.min(this._len-this._pktLen,r-t);if(i=0!==t||n!==r?new Uint8Array(e.buffer,e.byteOffset+t,n):e,n===this._len?this._packet=i:(this._packet||(this._packet=Buffer.allocUnsafe(this._len)),this._packet.set(i,this._pktLen)),t+=n,this._pktLen+=n,this._pktLen<this._len||t>=r)return}{let i=Math.min(16-this._macPos,r-t);if(0!==t||i!==r?this._mac.set(new Uint8Array(e.buffer,e.byteOffset+t,i),this._macPos):this._mac.set(e,this._macPos),t+=i,this._macPos+=i,this._macPos<16)return}k[0]=0,I(k,this.inSeqno,12);let i=g("chacha20",this._decKeyMain,k).update(B);if(d(f,this._lenBuf,4,this._packet,this._packet.length,i),this._calcMac.set(new Uint8Array(h.HEAPU8.buffer,f,16),0),!E(this._calcMac,this._mac))throw Error("Invalid MAC");k[0]=1;let n=p("chacha20",this._decKeyMain,k).update(this._packet),s=new y(n.buffer,n.byteOffset+1,n.length-n[0]-1);this.inSeqno=this.inSeqno+1>>>0,this._len=0,this._lenPos=0,this._packet=null,this._pktLen=0,this._macPos=0;{let e=this._onPayload(s);if(void 0!==e)return!1===e?t:e}}}}class Q{constructor(e){const t=e.inbound;this.inSeqno=t.seqno,this._onPayload=t.onPayload,this._instance=new l(t.decipherKey),this._len=0,this._lenBuf=Buffer.alloc(4),this._lenPos=0,this._packet=null,this._pktLen=0,this._mac=Buffer.allocUnsafe(16),this._macPos=0}free(){this._instance.free()}decrypt(e,t,r){for(;t<r;){if(this._lenPos<4){let i=Math.min(4-this._lenPos,r-t);for(;i--;)this._lenBuf[this._lenPos++]=e[t++];if(this._lenPos<4)return;if(this._len=this._instance.decryptLen(this._lenBuf,this.inSeqno),this._len>35e3||this._len<8||(7&this._len)!=0)throw Error("Bad packet length");if(t>=r)return}if(this._pktLen<this._len){let i,n=Math.min(this._len-this._pktLen,r-t);if(i=0!==t||n!==r?new Uint8Array(e.buffer,e.byteOffset+t,n):e,n===this._len?this._packet=i:(this._packet||(this._packet=Buffer.allocUnsafe(this._len)),this._packet.set(i,this._pktLen)),t+=n,this._pktLen+=n,this._pktLen<this._len||t>=r)return}{let i=Math.min(16-this._macPos,r-t);if(0!==t||i!==r?this._mac.set(new Uint8Array(e.buffer,e.byteOffset+t,i),this._macPos):this._mac.set(e,this._macPos),t+=i,this._macPos+=i,this._macPos<16)return}this._instance.decrypt(this._packet,this._mac,this.inSeqno);let i=new y(this._packet.buffer,this._packet.byteOffset+1,this._packet.length-this._packet[0]-1);this.inSeqno=this.inSeqno+1>>>0,this._len=0,this._lenPos=0,this._packet=null,this._pktLen=0,this._macPos=0;{let e=this._onPayload(i);if(void 0!==e)return!1===e?t:e}}}}class D{constructor(e){const t=e.inbound;this.inSeqno=t.seqno,this._onPayload=t.onPayload,this._decipherInstance=null,this._decipherSSLName=t.decipherInfo.sslName,this._decipherKey=t.decipherKey,this._decipherIV=t.decipherIV,this._len=0,this._lenBytes=0,this._packet=null,this._packetPos=0,this._pktLen=0,this._tag=Buffer.allocUnsafe(16),this._tagPos=0}free(){}decrypt(e,t,r){for(;t<r;){if(this._lenBytes<4){let i=Math.min(4-this._lenBytes,r-t);for(this._lenBytes+=i;i--;)this._len=(this._len<<8)+e[t++];if(this._lenBytes<4)return;if(this._len+20>35e3||this._len<16||(15&this._len)!=0)throw Error("Bad packet length");this._decipherInstance=p(this._decipherSSLName,this._decipherKey,this._decipherIV),this._decipherInstance.setAutoPadding(!1),this._decipherInstance.setAAD(W(this._len))}if(this._pktLen<this._len){let i;if(t>=r)return;let n=Math.min(this._len-this._pktLen,r-t);if((i=0!==t||n!==r?this._decipherInstance.update(new Uint8Array(e.buffer,e.byteOffset+t,n)):this._decipherInstance.update(e)).length&&(n===this._len?this._packet=i:(this._packet||(this._packet=Buffer.allocUnsafe(this._len)),this._packet.set(i,this._packetPos)),this._packetPos+=i.length),t+=n,this._pktLen+=n,this._pktLen<this._len||t>=r)return}{let i=Math.min(16-this._tagPos,r-t);if(0!==t||i!==r?this._tag.set(new Uint8Array(e.buffer,e.byteOffset+t,i),this._tagPos):this._tag.set(e,this._tagPos),t+=i,this._tagPos+=i,this._tagPos<16)return}{this._decipherInstance.setAuthTag(this._tag);let e=this._decipherInstance.final();e.length&&(this._packet?this._packet.set(e,this._packetPos):this._packet=e)}let i=this._packet?new y(this._packet.buffer,this._packet.byteOffset+1,this._packet.length-this._packet[0]-1):S;this.inSeqno=this.inSeqno+1>>>0,K(this._decipherIV),this._len=0,this._lenBytes=0,this._packet=null,this._packetPos=0,this._pktLen=0,this._tagPos=0;{let e=this._onPayload(i);if(void 0!==e)return!1===e?t:e}}}}class H{constructor(e){const t=e.inbound;this.inSeqno=t.seqno,this._onPayload=t.onPayload,this._instance=new a(t.decipherInfo.sslName,t.decipherKey,t.decipherIV),this._len=0,this._lenBytes=0,this._packet=null,this._pktLen=0,this._tag=Buffer.allocUnsafe(16),this._tagPos=0}free(){}decrypt(e,t,r){for(;t<r;){if(this._lenBytes<4){let i=Math.min(4-this._lenBytes,r-t);for(this._lenBytes+=i;i--;)this._len=(this._len<<8)+e[t++];if(this._lenBytes<4)return;if(this._len+20>35e3||this._len<16||(15&this._len)!=0)throw Error(`Bad packet length: ${this._len}`)}if(this._pktLen<this._len){let i;if(t>=r)return;let n=Math.min(this._len-this._pktLen,r-t);if(i=0!==t||n!==r?new Uint8Array(e.buffer,e.byteOffset+t,n):e,n===this._len?this._packet=i:(this._packet||(this._packet=Buffer.allocUnsafe(this._len)),this._packet.set(i,this._pktLen)),t+=n,this._pktLen+=n,this._pktLen<this._len||t>=r)return}{let i=Math.min(16-this._tagPos,r-t);if(0!==t||i!==r?this._tag.set(new Uint8Array(e.buffer,e.byteOffset+t,i),this._tagPos):this._tag.set(e,this._tagPos),t+=i,this._tagPos+=i,this._tagPos<16)return}this._instance.decrypt(this._packet,this._len,this._tag);let i=new y(this._packet.buffer,this._packet.byteOffset+1,this._packet.length-this._packet[0]-1);this.inSeqno=this.inSeqno+1>>>0,this._len=0,this._lenBytes=0,this._packet=null,this._pktLen=0,this._tagPos=0;{let e=this._onPayload(i);if(void 0!==e)return!1===e?t:e}}}}class F{constructor(e){const t=e.inbound;this.inSeqno=t.seqno,this._onPayload=t.onPayload,this._decipherInstance=p(t.decipherInfo.sslName,t.decipherKey,t.decipherIV),this._decipherInstance.setAutoPadding(!1),this._block=Buffer.allocUnsafe(t.macInfo.isETM?4:t.decipherInfo.blockLen),this._blockSize=t.decipherInfo.blockLen,this._blockPos=0,this._len=0,this._packet=null,this._packetPos=0,this._pktLen=0,this._mac=Buffer.allocUnsafe(t.macInfo.actualLen),this._macPos=0,this._macSSLName=t.macInfo.sslName,this._macKey=t.macKey,this._macActualLen=t.macInfo.actualLen,this._macETM=t.macInfo.isETM,this._macInstance=null;const r=t.decipherInfo.discardLen;if(r){let e=w.get(r);void 0===e&&(e=Buffer.alloc(r),w.set(r,e)),this._decipherInstance.update(e)}}free(){}decrypt(e,t,r){for(;t<r;){var i,n;if(this._blockPos<this._block.length){let i,n,s=Math.min(this._block.length-this._blockPos,r-t);if(0!==t||s!==r||s<e.length?this._block.set(new Uint8Array(e.buffer,e.byteOffset+t,s),this._blockPos):this._block.set(e,this._blockPos),t+=s,this._blockPos+=s,this._blockPos<this._block.length)return;if(this._macETM?this._len=n=b(this._block,0):(i=this._decipherInstance.update(this._block),this._len=b(i,0),n=4+this._len-this._blockSize),this._len>35e3||this._len<5||(n&this._blockSize-1)!=0)throw Error("Bad packet length");if(this._macInstance=A(this._macSSLName,this._macKey),I(x,this.inSeqno,0),this._macInstance.update(x),this._macETM?this._macInstance.update(this._block):(this._macInstance.update(new Uint8Array(i.buffer,i.byteOffset,4)),this._pktLen=i.length-4,this._packetPos=this._pktLen,this._packet=Buffer.allocUnsafe(this._len),this._packet.set(new Uint8Array(i.buffer,i.byteOffset+4,this._packetPos),0)),t>=r)return}if(this._pktLen<this._len){let i,n=Math.min(this._len-this._pktLen,r-t);i=0!==t||n!==r?new Uint8Array(e.buffer,e.byteOffset+t,n):e,this._macETM&&this._macInstance.update(i);let s=this._decipherInstance.update(i);if(s.length&&(n===this._len?this._packet=s:(this._packet||(this._packet=Buffer.allocUnsafe(this._len)),this._packet.set(s,this._packetPos)),this._packetPos+=s.length),t+=n,this._pktLen+=n,this._pktLen<this._len||t>=r)return}{let i=Math.min(this._macActualLen-this._macPos,r-t);if(0!==t||i!==r?this._mac.set(new Uint8Array(e.buffer,e.byteOffset+t,i),this._macPos):this._mac.set(e,this._macPos),t+=i,this._macPos+=i,this._macPos<this._macActualLen)return}this._macETM||this._macInstance.update(this._packet);let s=this._macInstance.digest();if(this._macActualLen<s.length&&(s=new Uint8Array(s.buffer,s.byteOffset,this._macActualLen)),i=s,n=this._mac,i.length!==n.length?(E(i,i),!!1):!E(i,n))throw Error("Invalid MAC");let o=new y(this._packet.buffer,this._packet.byteOffset+1,this._packet.length-this._packet[0]-1);this.inSeqno=this.inSeqno+1>>>0,this._blockPos=0,this._len=0,this._packet=null,this._packetPos=0,this._pktLen=0,this._macPos=0,this._macInstance=null;{let e=this._onPayload(o);if(void 0!==e)return!1===e?t:e}}}}class M{constructor(e){const t=e.inbound;this.inSeqno=t.seqno,this._onPayload=t.onPayload,this._instance=new c(t.decipherInfo.sslName,t.decipherKey,t.decipherIV,t.macInfo.sslName,t.macKey,t.macInfo.isETM,t.macInfo.actualLen),this._block=Buffer.allocUnsafe(t.macInfo.isETM||t.decipherInfo.stream?4:t.decipherInfo.blockLen),this._blockPos=0,this._len=0,this._packet=null,this._pktLen=0,this._mac=Buffer.allocUnsafe(t.macInfo.actualLen),this._macPos=0,this._macActualLen=t.macInfo.actualLen,this._macETM=t.macInfo.isETM}free(){this._instance.free()}decrypt(e,t,r){for(;t<r;){if(this._blockPos<this._block.length){let i,n=Math.min(this._block.length-this._blockPos,r-t);if(0!==t||n!==r||n<e.length?this._block.set(new Uint8Array(e.buffer,e.byteOffset+t,n),this._blockPos):this._block.set(e,this._blockPos),t+=n,this._blockPos+=n,this._blockPos<this._block.length)return;if(this._macETM?this._len=i=b(this._block,0):(this._instance.decryptBlock(this._block),this._len=b(this._block,0),i=4+this._len-this._block.length),this._len>35e3||this._len<5||(i&this._block.length-1)!=0)throw Error("Bad packet length");if(!this._macETM&&(this._pktLen=this._block.length-4,this._pktLen&&(this._packet=Buffer.allocUnsafe(this._len),this._packet.set(new Uint8Array(this._block.buffer,this._block.byteOffset+4,this._pktLen),0))),t>=r)return}if(this._pktLen<this._len){let i,n=Math.min(this._len-this._pktLen,r-t);if(i=0!==t||n!==r?new Uint8Array(e.buffer,e.byteOffset+t,n):e,n===this._len?this._packet=i:(this._packet||(this._packet=Buffer.allocUnsafe(this._len)),this._packet.set(i,this._pktLen)),t+=n,this._pktLen+=n,this._pktLen<this._len||t>=r)return}{let i=Math.min(this._macActualLen-this._macPos,r-t);if(0!==t||i!==r?this._mac.set(new Uint8Array(e.buffer,e.byteOffset+t,i),this._macPos):this._mac.set(e,this._macPos),t+=i,this._macPos+=i,this._macPos<this._macActualLen)return}this._instance.decrypt(this._packet,this.inSeqno,this._block,this._mac);let i=new y(this._packet.buffer,this._packet.byteOffset+1,this._packet.length-this._packet[0]-1);this.inSeqno=this.inSeqno+1>>>0,this._blockPos=0,this._len=0,this._packet=null,this._pktLen=0,this._macPos=0,this._macInstance=null;{let e=this._onPayload(i);if(void 0!==e)return!1===e?t:e}}}}function K(e){++e[11]>>>8&&++e[10]>>>8&&++e[9]>>>8&&++e[8]>>>8&&++e[7]>>>8&&++e[6]>>>8&&++e[5]>>>8&&++e[4]}let W=(u=Buffer.alloc(4),e=>(u[0]=e>>>24,u[1]=e>>>16,u[2]=e>>>8,u[3]=e,u));t.exports={CIPHER_INFO:v,MAC_INFO:C,bindingAvailable:!!i,init:new Promise(async(t,r)=>{try{f=(h=await e.r(607335)())._malloc(16),d=h.cwrap("poly1305_auth",null,["number","array","number","array","number","array"])}catch(e){return r(e)}t()}),NullCipher:class{constructor(e,t){this.outSeqno=e,this._onWrite=t,this._dead=!1}free(){this._dead=!0}allocPacket(e){let t=5+e,r=8-(7&t);r<4&&(r+=8),t+=r;let i=Buffer.allocUnsafe(t);return I(i,t-4,0),i[4]=r,_(i,5+e,r),i}encrypt(e){this._dead||(this._onWrite(e),this.outSeqno=this.outSeqno+1>>>0)}},createCipher:function(e){if("object"!=typeof e||null===e)throw Error("Invalid config");if("object"!=typeof e.outbound||null===e.outbound)throw Error("Invalid outbound");let t=e.outbound;if("function"!=typeof t.onWrite)throw Error("Invalid outbound.onWrite");if("object"!=typeof t.cipherInfo||null===t.cipherInfo)throw Error("Invalid outbound.cipherInfo");if(!Buffer.isBuffer(t.cipherKey)||t.cipherKey.length!==t.cipherInfo.keyLen)throw Error("Invalid outbound.cipherKey");if(t.cipherInfo.ivLen&&(!Buffer.isBuffer(t.cipherIV)||t.cipherIV.length!==t.cipherInfo.ivLen))throw Error("Invalid outbound.cipherIV");if("number"!=typeof t.seqno||t.seqno<0||t.seqno>m)throw Error("Invalid outbound.seqno");let r=!!t.forceNative;switch(t.cipherInfo.sslName){case"aes-128-gcm":case"aes-256-gcm":return n&&!r?new L(e):new T(e);case"chacha20":return s&&!r?new N(e):new R(e);default:if("object"!=typeof t.macInfo||null===t.macInfo)throw Error("Invalid outbound.macInfo");if(!Buffer.isBuffer(t.macKey)||t.macKey.length!==t.macInfo.len)throw Error("Invalid outbound.macKey");return o&&!r?new O(e):new U(e)}},NullDecipher:class{constructor(e,t){this.inSeqno=e,this._onPayload=t,this._len=0,this._lenBytes=0,this._packet=null,this._packetPos=0}free(){}decrypt(e,t,r){for(;t<r;){if(this._lenBytes<4){let i=Math.min(4-this._lenBytes,r-t);for(this._lenBytes+=i;i--;)this._len=(this._len<<8)+e[t++];if(this._lenBytes<4)return;if(this._len>35e3||this._len<8||(4+this._len&7)!=0)throw Error("Bad packet length");if(t>=r)return}if(this._packetPos<this._len){let i,n=Math.min(this._len-this._packetPos,r-t);if(i=0!==t||n!==r?new Uint8Array(e.buffer,e.byteOffset+t,n):e,n===this._len?this._packet=i:(this._packet||(this._packet=Buffer.allocUnsafe(this._len)),this._packet.set(i,this._packetPos)),t+=n,this._packetPos+=n,this._packetPos<this._len)return}let i=this._packet?new y(this._packet.buffer,this._packet.byteOffset+1,this._packet.length-this._packet[0]-1):S;this.inSeqno=this.inSeqno+1>>>0,this._len=0,this._lenBytes=0,this._packet=null,this._packetPos=0;{let e=this._onPayload(i);if(void 0!==e)return!1===e?t:e}}}},createDecipher:function(e){if("object"!=typeof e||null===e)throw Error("Invalid config");if("object"!=typeof e.inbound||null===e.inbound)throw Error("Invalid inbound");let t=e.inbound;if("function"!=typeof t.onPayload)throw Error("Invalid inbound.onPayload");if("object"!=typeof t.decipherInfo||null===t.decipherInfo)throw Error("Invalid inbound.decipherInfo");if(!Buffer.isBuffer(t.decipherKey)||t.decipherKey.length!==t.decipherInfo.keyLen)throw Error("Invalid inbound.decipherKey");if(t.decipherInfo.ivLen&&(!Buffer.isBuffer(t.decipherIV)||t.decipherIV.length!==t.decipherInfo.ivLen))throw Error("Invalid inbound.decipherIV");if("number"!=typeof t.seqno||t.seqno<0||t.seqno>m)throw Error("Invalid inbound.seqno");let r=!!t.forceNative;switch(t.decipherInfo.sslName){case"aes-128-gcm":case"aes-256-gcm":return a&&!r?new H(e):new D(e);case"chacha20":return l&&!r?new Q(e):new P(e);default:if("object"!=typeof t.macInfo||null===t.macInfo)throw Error("Invalid inbound.macInfo");if(!Buffer.isBuffer(t.macKey)||t.macKey.length!==t.macInfo.len)throw Error("Invalid inbound.macKey");return c&&!r?new M(e):new F(e)}}}},939649,(e,t,r)=>{"use strict";let{createDecipheriv:i,createECDH:n,createHash:s,createHmac:o,createSign:a,createVerify:l,getCiphers:c,sign:h,verify:f}=e.r(254799),d=c(),{Ber:u}=e.r(342085),g=e.r(245594).pbkdf,{CIPHER_INFO:p}=e.r(866310),{eddsaSupported:A,SUPPORTED_CIPHER:_}=e.r(11607),{bufferSlice:E,makeBufferParser:b,readString:I,readUInt32BE:y,writeUInt32BE:m}=e.r(69253),S=Symbol("Hash Algorithm"),x=Symbol("Private key PEM"),w=Symbol("Public key PEM"),v=Symbol("Public key SSH"),C=Symbol("Decrypted Key"),B=Object.create(null);{let e=Object.keys(p);for(let t=0;t<e.length;++t){let r=p[e[t]].sslName;r&&!B[r]&&(B[r]=p[e[t]])}}let k=b();function R(e,t){let r=(t=t.base64Slice(0,t.length)).replace(/.{64}/g,"$&\n");return 63&t.length&&(r+="\n"),`-----BEGIN ${e} KEY-----
2
+ ${r}-----END ${e} KEY-----`}function N(e,t){let r=Buffer.allocUnsafe(e.length+t.length);return r.set(e,0),r.set(t,e.length),r}function T(e,t){let r=e.length,i=e._pos||0;for(let n=0;n<t;++n){let t=r-i;if(i>=r||t<4)return!1;let n=y(e,i);if(t<4+n)return!1;i+=4+n}return e._pos=i,!0}function L(e,t){let r=new u.Writer;return r.startSequence(),r.startSequence(),r.writeOID("1.2.840.113549.1.1.1"),r.writeNull(),r.endSequence(),r.startSequence(u.BitString),r.writeByte(0),r.startSequence(),r.writeBuffer(e,u.Integer),r.writeBuffer(t,u.Integer),r.endSequence(),r.endSequence(),r.endSequence(),R("PUBLIC",r.buffer)}function U(e,t){let r=Buffer.allocUnsafe(15+t.length+4+e.length);m(r,7,0),r.utf8Write("ssh-rsa",4,7);let i=11;return m(r,t.length,i),r.set(t,i+=4),m(r,e.length,i+=t.length),r.set(e,i+4),r}let O=(()=>{function e(e){return BigInt(`0x${e.hexSlice(0,e.length)}`)}function t(e){let t=e.toString(16);if((1&t.length)!=0)t=`0${t}`;else{let e=t.charCodeAt(0);(56===e||57===e||e>=97&&e<=102)&&(t=`00${t}`)}return Buffer.from(t,"hex")}return function(r,i,n,s,o,a){let l,c=e(n),h=t(c%(e(o)-1n)),f=t(c%(e(a)-1n));return R("RSA PRIVATE",((l=new u.Writer).startSequence(),l.writeInt(0,u.Integer),l.writeBuffer(r,u.Integer),l.writeBuffer(i,u.Integer),l.writeBuffer(n,u.Integer),l.writeBuffer(o,u.Integer),l.writeBuffer(a,u.Integer),l.writeBuffer(h,u.Integer),l.writeBuffer(f,u.Integer),l.writeBuffer(s,u.Integer),l.endSequence(),l.buffer))}})();function P(e,t,r,i){let n=new u.Writer;return n.startSequence(),n.startSequence(),n.writeOID("1.2.840.10040.4.1"),n.startSequence(),n.writeBuffer(e,u.Integer),n.writeBuffer(t,u.Integer),n.writeBuffer(r,u.Integer),n.endSequence(),n.endSequence(),n.startSequence(u.BitString),n.writeByte(0),n.writeBuffer(i,u.Integer),n.endSequence(),n.endSequence(),R("PUBLIC",n.buffer)}function Q(e,t,r,i){let n=Buffer.allocUnsafe(15+e.length+4+t.length+4+r.length+4+i.length);m(n,7,0),n.utf8Write("ssh-dss",4,7);let s=11;return m(n,e.length,s),n.set(e,s+=4),m(n,t.length,s+=e.length),n.set(t,s+=4),m(n,r.length,s+=t.length),n.set(r,s+=4),m(n,i.length,s+=r.length),n.set(i,s+4),n}function D(e,t,r,i,n){let s=new u.Writer;return s.startSequence(),s.writeInt(0,u.Integer),s.writeBuffer(e,u.Integer),s.writeBuffer(t,u.Integer),s.writeBuffer(r,u.Integer),s.writeBuffer(i,u.Integer),s.writeBuffer(n,u.Integer),s.endSequence(),R("DSA PRIVATE",s.buffer)}function H(e){let t=new u.Writer;return t.startSequence(),t.startSequence(),t.writeOID("1.3.101.112"),t.endSequence(),t.startSequence(u.BitString),t.writeByte(0),t._ensure(e.length),t._buf.set(e,t._offset),t._offset+=e.length,t.endSequence(),t.endSequence(),R("PUBLIC",t.buffer)}function F(e){let t=Buffer.allocUnsafe(19+e.length);return m(t,11,0),t.utf8Write("ssh-ed25519",4,11),m(t,e.length,15),t.set(e,19),t}function M(e,t){let r=new u.Writer;return r.startSequence(),r.startSequence(),r.writeOID("1.2.840.10045.2.1"),r.writeOID(e),r.endSequence(),r.startSequence(u.BitString),r.writeByte(0),r._ensure(t.length),r._buf.set(t,r._offset),r._offset+=t.length,r.endSequence(),r.endSequence(),R("PUBLIC",r.buffer)}function K(e,t){let r;switch(e){case"1.2.840.10045.3.1.7":r="nistp256";break;case"1.3.132.0.34":r="nistp384";break;case"1.3.132.0.35":r="nistp521";break;default:return}let i=Buffer.allocUnsafe(39+t.length);return m(i,19,0),i.utf8Write(`ecdsa-sha2-${r}`,4,19),m(i,8,23),i.utf8Write(r,27,8),m(i,t.length,35),i.set(t,39),i}let W={sign:"function"==typeof h?function(e,t){let r=this[x];if(null===r)return Error("No private key available");t&&"string"==typeof t||(t=this[S]);try{return h(t,e,r)}catch(e){return e}}:function(e,t){let r=this[x];if(null===r)return Error("No private key available");t&&"string"==typeof t||(t=this[S]);let i=a(t);i.update(e);try{return i.sign(r)}catch(e){return e}},verify:"function"==typeof f?function(e,t,r){let i=this[w];if(null===i)return Error("No public key available");r&&"string"==typeof r||(r=this[S]);try{return f(r,e,i,t)}catch(e){return e}}:function(e,t,r){let i=this[w];if(null===i)return Error("No public key available");r&&"string"==typeof r||(r=this[S]);let n=l(r);n.update(e);try{return n.verify(i,t)}catch(e){return e}},isPrivateKey:function(){return null!==this[x]},getPrivatePEM:function(){return this[x]},getPublicPEM:function(){return this[w]},getPublicSSH:function(){return this[v]},equals:function(e){let t=J(e);return!(t instanceof Error)&&this.type===t.type&&this[x]===t[x]&&this[w]===t[w]&&this[v].equals(t[v])}};function q(e,t,r,i,n,s,o){this.type=e,this.comment=t,this[x]=r,this[w]=i,this[v]=n,this[S]=s,this[C]=o}q.prototype=W;{let e=/^-----BEGIN OPENSSH PRIVATE KEY-----(?:\r\n|\n)([\s\S]+)(?:\r\n|\n)-----END OPENSSH PRIVATE KEY-----$/;q.parse=(t,r)=>{let n,s,o,a,l=e.exec(t);if(null===l)return null;let c=Buffer.from(l[1],"base64");if(c.length<31)return Error("Malformed OpenSSH private key");let h=c.utf8Slice(0,15);if("openssh-key-v1\0"!==h)return Error(`Unsupported OpenSSH key magic: ${h}`);let f=I(c,15,!0);if(void 0===f)return Error("Malformed OpenSSH private key");if("none"!==f&&-1===_.indexOf(f))return Error(`Unsupported cipher for OpenSSH key: ${f}`);let d=I(c,c._pos,!0);if(void 0===d)return Error("Malformed OpenSSH private key");if("none"!==d){if("none"===f)return Error("Malformed OpenSSH private key");if("bcrypt"!==d)return Error(`Unsupported kdf name for OpenSSH key: ${d}`);if(!r)return Error("Encrypted private OpenSSH key detected, but no passphrase given")}else if("none"!==f)return Error("Malformed OpenSSH private key");"none"!==f&&(s=p[f]);let b=I(c,c._pos);if(void 0===b)return Error("Malformed OpenSSH private key");if(b.length)switch(d){case"none":return Error("Malformed OpenSSH private key");case"bcrypt":{let e=I(b,0);if(void 0===e||b._pos+4>b.length)return Error("Malformed OpenSSH private key");let t=y(b,b._pos),i=Buffer.allocUnsafe(s.keyLen+s.ivLen);if(0!==g(r,r.length,e,e.length,i,i.length,t))return Error("Failed to generate information to decrypt key");o=E(i,0,s.keyLen),a=E(i,s.keyLen,i.length)}}else if("none"!==d)return Error("Malformed OpenSSH private key");if(c._pos+3>=c.length)return Error("Malformed OpenSSH private key");let m=y(c,c._pos);if(c._pos+=4,m>0){for(let e=0;e<m;++e){let e=I(c,c._pos);if(void 0===e||void 0===I(e,0,!0))return Error("Malformed OpenSSH private key")}let e=I(c,c._pos);if(void 0===e)return Error("Malformed OpenSSH private key");if(void 0!==o){if(e.length<s.blockLen||e.length%s.blockLen!=0)return Error("Malformed OpenSSH private key");try{let t={authTagLength:s.authLen},r=i(s.sslName,o,a,t);if(r.setAutoPadding(!1),s.authLen>0){if(c.length-c._pos<s.authLen)return Error("Malformed OpenSSH private key");r.setAuthTag(E(c,c._pos,c._pos+=s.authLen))}e=N(r.update(e),r.final())}catch(e){return e}}if(c._pos!==c.length)return Error("Malformed OpenSSH private key");n=function(e,t,r){let i,n,s=[];if(e.length<8)return Error("Malformed OpenSSH private key");if(y(e,0)!==y(e,4))return r?Error("OpenSSH key integrity check failed -- bad passphrase?"):Error("OpenSSH key integrity check failed");for(i=0,e._pos=8;i<t;++i){let t,i,o,a,l=I(e,e._pos,!0);if(void 0===l)return Error("Malformed OpenSSH private key");switch(l){case"ssh-rsa":{let r=I(e,e._pos);if(void 0===r)return Error("Malformed OpenSSH private key");let n=I(e,e._pos);if(void 0===n)return Error("Malformed OpenSSH private key");let s=I(e,e._pos);if(void 0===s)return Error("Malformed OpenSSH private key");let l=I(e,e._pos);if(void 0===l)return Error("Malformed OpenSSH private key");let c=I(e,e._pos);if(void 0===c)return Error("Malformed OpenSSH private key");let h=I(e,e._pos);if(void 0===h)return Error("Malformed OpenSSH private key");o=L(r,n),a=U(r,n),i=O(r,n,s,l,c,h),t="sha1";break}case"ssh-dss":{let r=I(e,e._pos);if(void 0===r)return Error("Malformed OpenSSH private key");let n=I(e,e._pos);if(void 0===n)return Error("Malformed OpenSSH private key");let s=I(e,e._pos);if(void 0===s)return Error("Malformed OpenSSH private key");let l=I(e,e._pos);if(void 0===l)return Error("Malformed OpenSSH private key");let c=I(e,e._pos);if(void 0===c)return Error("Malformed OpenSSH private key");o=P(r,n,s,l),a=Q(r,n,s,l),i=D(r,n,s,l,c),t="sha1";break}case"ssh-ed25519":{if(!A)return Error(`Unsupported OpenSSH private key type: ${l}`);let r=I(e,e._pos);if(void 0===r||32!==r.length)return Error("Malformed OpenSSH private key");let n=I(e,e._pos);if(void 0===n||64!==n.length)return Error("Malformed OpenSSH private key");o=H(r),a=F(r),i=function(e){let t=new u.Writer;return t.startSequence(),t.writeInt(0,u.Integer),t.startSequence(),t.writeOID("1.3.101.112"),t.endSequence(),t.startSequence(u.OctetString),t.writeBuffer(e,u.OctetString),t.endSequence(),t.endSequence(),R("PRIVATE",t.buffer)}(E(n,0,32)),t=null;break}case"ecdsa-sha2-nistp256":t="sha256",n="1.2.840.10045.3.1.7";case"ecdsa-sha2-nistp384":void 0===t&&(t="sha384",n="1.3.132.0.34");case"ecdsa-sha2-nistp521":{if(void 0===t&&(t="sha512",n="1.3.132.0.35"),!T(e,1))return Error("Malformed OpenSSH private key");let r=I(e,e._pos);if(void 0===r)return Error("Malformed OpenSSH private key");let s=I(e,e._pos);if(void 0===s)return Error("Malformed OpenSSH private key");o=M(n,r),a=K(n,r),i=function(e,t,r){let i=new u.Writer;return i.startSequence(),i.writeInt(1,u.Integer),i.writeBuffer(r,u.OctetString),i.startSequence(160),i.writeOID(e),i.endSequence(),i.startSequence(161),i.startSequence(u.BitString),i.writeByte(0),i._ensure(t.length),i._buf.set(t,i._offset),i._offset+=t.length,i.endSequence(),i.endSequence(),i.endSequence(),R("EC PRIVATE",i.buffer)}(n,r,s);break}default:return Error(`Unsupported OpenSSH private key type: ${l}`)}let c=I(e,e._pos,!0);if(void 0===c)return Error("Malformed OpenSSH private key");s.push(new q(l,c,i,o,a,t,r))}let o=0;for(i=e._pos;i<e.length;++i)if(e[i]!==++o%255)return Error("Malformed OpenSSH private key");return s}(e,m,void 0!==o)}else n=[];return n instanceof Error?n:n[0]}}function $(e,t,r,i,n,s,o){this.type=e,this.comment=t,this[x]=r,this[w]=i,this[v]=n,this[S]=s,this[C]=o}$.prototype=W;{let e=/^-----BEGIN (RSA|DSA|EC) PRIVATE KEY-----(?:\r\n|\n)((?:[^:]+:\s*[\S].*(?:\r\n|\n))*)([\s\S]+)(?:\r\n|\n)-----END (RSA|DSA|EC) PRIVATE KEY-----$/;$.parse=(t,r)=>{let o,a,l,c,h,f,g=e.exec(t);if(null===g)return null;let p=Buffer.from(g[3],"base64"),A=g[2],_=!1;if(void 0!==A){A=A.split(/\r\n|\n/g);for(let e=0;e<A.length;++e){let t=A[e],n=t.indexOf(":");if("DEK-Info"===t.slice(0,n)){let e=t.slice(n+2);if(-1===(n=e.indexOf(",")))continue;let o=e.slice(0,n).toLowerCase();if(-1===d.indexOf(o))return Error(`Cipher (${o}) not supported for encrypted OpenSSH private key`);let a=B[o];if(!a)return Error(`Cipher (${o}) not supported for encrypted OpenSSH private key`);let l=Buffer.from(e.slice(n+1),"hex");if(l.length!==a.ivLen)return Error("Malformed encrypted OpenSSH private key");if(!r)return Error("Encrypted OpenSSH private key detected, but no passphrase given");let c=E(l,0,8),h=s("md5").update(r).update(c).digest();for(;h.length<a.keyLen;)h=N(h,s("md5").update(h).update(r).update(c).digest());h.length>a.keyLen&&(h=E(h,0,a.keyLen));try{let e=i(o,h,l);e.setAutoPadding(!1),p=N(e.update(p),e.final()),_=!0}catch(e){return e}}}}let b="Malformed OpenSSH private key";switch(_&&(b+=". Bad passphrase?"),g[1]){case"RSA":o="ssh-rsa",a=R("RSA PRIVATE",p);try{(f=new u.Reader(p)).readSequence(),f.readInt();let e=f.readString(u.Integer,!0);if(null===e)return Error(b);let t=f.readString(u.Integer,!0);if(null===t)return Error(b);l=L(e,t),c=U(e,t)}catch{return Error(b)}h="sha1";break;case"DSA":o="ssh-dss",a=R("DSA PRIVATE",p);try{(f=new u.Reader(p)).readSequence(),f.readInt();let e=f.readString(u.Integer,!0);if(null===e)return Error(b);let t=f.readString(u.Integer,!0);if(null===t)return Error(b);let r=f.readString(u.Integer,!0);if(null===r)return Error(b);let i=f.readString(u.Integer,!0);if(null===i)return Error(b);l=P(e,t,r,i),c=Q(e,t,r,i)}catch{return Error(b)}h="sha1";break;case"EC":{var I,y;let e,t,r,i;try{(f=new u.Reader(p)).readSequence(),f.readInt(),t=f.readString(u.OctetString,!0),f.readByte();let i=f.readLength();if(null===i||(f._offset=i,r=f.readOID(),null===r))return Error(b);switch(r){case"1.2.840.10045.3.1.7":e="prime256v1",o="ecdsa-sha2-nistp256",h="sha256";break;case"1.3.132.0.34":e="secp384r1",o="ecdsa-sha2-nistp384",h="sha384";break;case"1.3.132.0.35":e="secp521r1",o="ecdsa-sha2-nistp521",h="sha512";break;default:return Error(`Unsupported private key EC OID: ${r}`)}}catch{return Error(b)}a=R("EC PRIVATE",p);let s=(I=e,y=t,(i=n(I)).setPrivateKey(y),i.getPublicKey());l=M(r,s),c=K(r,s)}}return new $(o,"",a,l,c,h,_)}}function G(e,t,r,i,n,s,o){this.type=e,this.comment=t,this[x]=r,this[w]=i,this[v]=n,this[S]=s,this[C]=o}G.prototype=W;{let e=Buffer.alloc(0),t=Buffer.from([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),r=Buffer.from([0,0,0,0]),n=Buffer.from([0,0,0,1]),a=/^PuTTY-User-Key-File-2: (ssh-(?:rsa|dss))\r?\nEncryption: (aes256-cbc|none)\r?\nComment: ([^\r\n]*)\r?\nPublic-Lines: \d+\r?\n([\s\S]+?)\r?\nPrivate-Lines: \d+\r?\n([\s\S]+?)\r?\nPrivate-MAC: ([^\r\n]+)/;G.parse=(l,c)=>{let h,f,d,u=a.exec(l);if(null===u)return null;let g=u[2],A="none"!==g;if(A&&!c)return Error("Encrypted PPK private key detected, but no passphrase given");let _=Buffer.from(u[5],"base64");if(A){let e=p[g],o=N(s("sha1").update(r).update(c).digest(),s("sha1").update(n).update(c).digest());o.length>e.keyLen&&(o=E(o,0,e.keyLen));try{let r=i(e.sslName,o,t);r.setAutoPadding(!1),_=N(r.update(_),r.final())}catch(e){return e}}let b=u[1],y=u[3],S=Buffer.from(u[4],"base64"),x=u[6],w=b.length,v=g.length,C=Buffer.byteLength(y),B=S.length,k=_.length,R=Buffer.allocUnsafe(4+w+4+v+4+C+4+B+4+k),H=0;if(m(R,w,0),R.utf8Write(b,H+=4,w),m(R,v,H+=w),R.utf8Write(g,H+=4,v),m(R,C,H+=v),R.utf8Write(y,H+=4,C),m(R,B,H+=C),R.set(S,H+=4),m(R,k,H+=B),R.set(_,H+4),c||(c=e),o("sha1",s("sha1").update("putty-private-key-file-mac-key").update(c).digest()).update(R).digest("hex")!==x)return A?Error("PPK private key integrity check failed -- bad passphrase?"):Error("PPK private key integrity check failed");switch(S._pos=0,T(S,1),b){case"ssh-rsa":{let e=I(S,S._pos);if(void 0===e)return Error("Malformed PPK public key");let t=I(S,S._pos);if(void 0===t)return Error("Malformed PPK public key");let r=I(_,0);if(void 0===r)return Error("Malformed PPK private key");let i=I(_,_._pos);if(void 0===i)return Error("Malformed PPK private key");let n=I(_,_._pos);if(void 0===n)return Error("Malformed PPK private key");let s=I(_,_._pos);if(void 0===s)return Error("Malformed PPK private key");h=L(t,e),f=U(t,e),d=O(t,e,r,s,i,n);break}case"ssh-dss":{let e=I(S,S._pos);if(void 0===e)return Error("Malformed PPK public key");let t=I(S,S._pos);if(void 0===t)return Error("Malformed PPK public key");let r=I(S,S._pos);if(void 0===r)return Error("Malformed PPK public key");let i=I(S,S._pos);if(void 0===i)return Error("Malformed PPK public key");let n=I(_,0);if(void 0===n)return Error("Malformed PPK private key");h=P(e,t,r,i),f=Q(e,t,r,i),d=D(e,t,r,i,n)}}return new G(b,y,d,h,f,"sha1",A)}}function Y(e,t,r,i,n){this.type=e,this.comment=t,this[x]=null,this[w]=r,this[v]=i,this[S]=n,this[C]=!1}Y.prototype=W;{let e;e=A?/^(((?:ssh-(?:rsa|dss|ed25519))|ecdsa-sha2-nistp(?:256|384|521))(?:-cert-v0[01]@openssh.com)?) ([A-Z0-9a-z/+=]+)(?:$|\s+([\S].*)?)$/:/^(((?:ssh-(?:rsa|dss))|ecdsa-sha2-nistp(?:256|384|521))(?:-cert-v0[01]@openssh.com)?) ([A-Z0-9a-z/+=]+)(?:$|\s+([\S].*)?)$/,Y.parse=t=>{let r=e.exec(t);if(null===r)return null;let i=r[1],n=r[2],s=Buffer.from(r[3],"base64"),o=r[4]||"",a=I(s,s._pos,!0);return void 0===a||0!==a.indexOf(n)?Error("Malformed OpenSSH public key"):X(s,n,o,i)}}function j(e,t,r,i,n){this.type=e,this.comment=t,this[x]=null,this[w]=r,this[v]=i,this[S]=n,this[C]=!1}j.prototype=W;{let e=/^---- BEGIN SSH2 PUBLIC KEY ----(?:\r?\n)((?:.{0,72}\r?\n)+)---- END SSH2 PUBLIC KEY ----$/,t=/^[A-Z0-9a-z/+=\r\n]+$/,r=/^([\x21-\x39\x3B-\x7E]{1,64}): ((?:[^\\]*\\\r?\n)*[^\r\n]+)\r?\n/gm,i=/\\\r?\n/g;j.parse=n=>{let s=e.exec(n);if(null===s)return null;let o=s[1],a=0,l="";for(;s=r.exec(o);){let e=s[1],t=s[2].replace(i,"");if(t.length>1024)return r.lastIndex=0,Error("Malformed RFC4716 public key");a=r.lastIndex,"comment"===e.toLowerCase()&&(l=t).length>1&&34===l.charCodeAt(0)&&34===l.charCodeAt(l.length-1)&&(l=l.slice(1,-1))}let c=o.slice(a);if(!t.test(c))return Error("Malformed RFC4716 public key");let h=I(c=Buffer.from(c,"base64"),0,!0);if(void 0===h)return Error("Malformed RFC4716 public key");let f=null,d=null;switch(h){case"ssh-rsa":{let e=I(c,c._pos);if(void 0===e)return Error("Malformed RFC4716 public key");let t=I(c,c._pos);if(void 0===t)return Error("Malformed RFC4716 public key");f=L(t,e),d=U(t,e);break}case"ssh-dss":{let e=I(c,c._pos);if(void 0===e)return Error("Malformed RFC4716 public key");let t=I(c,c._pos);if(void 0===t)return Error("Malformed RFC4716 public key");let r=I(c,c._pos);if(void 0===r)return Error("Malformed RFC4716 public key");let i=I(c,c._pos);if(void 0===i)return Error("Malformed RFC4716 public key");f=P(e,t,r,i),d=Q(e,t,r,i);break}default:return Error("Malformed RFC4716 public key")}return new j(h,l,f,d,"sha1")}}function X(e,t,r,i){let n,s;if(!V(t))return Error(`Unsupported OpenSSH public key type: ${t}`);let o=null,a=null;switch(t){case"ssh-rsa":{let t=I(e,e._pos||0);if(void 0===t)return Error("Malformed OpenSSH public key");let r=I(e,e._pos);if(void 0===r)return Error("Malformed OpenSSH public key");o=L(r,t),a=U(r,t),n="sha1";break}case"ssh-dss":{let t=I(e,e._pos||0);if(void 0===t)return Error("Malformed OpenSSH public key");let r=I(e,e._pos);if(void 0===r)return Error("Malformed OpenSSH public key");let i=I(e,e._pos);if(void 0===i)return Error("Malformed OpenSSH public key");let s=I(e,e._pos);if(void 0===s)return Error("Malformed OpenSSH public key");o=P(t,r,i,s),a=Q(t,r,i,s),n="sha1";break}case"ssh-ed25519":{let t=I(e,e._pos||0);if(void 0===t||32!==t.length)return Error("Malformed OpenSSH public key");o=H(t),a=F(t),n=null;break}case"ecdsa-sha2-nistp256":n="sha256",s="1.2.840.10045.3.1.7";case"ecdsa-sha2-nistp384":void 0===n&&(n="sha384",s="1.3.132.0.34");case"ecdsa-sha2-nistp521":{if(void 0===n&&(n="sha512",s="1.3.132.0.35"),!T(e,1))return Error("Malformed OpenSSH public key");let t=I(e,e._pos||0);if(void 0===t)return Error("Malformed OpenSSH public key");o=M(s,t),a=K(s,t);break}default:return Error(`Unsupported OpenSSH public key type: ${t}`)}return new Y(i,r,o,a,n)}function V(e){switch(e){case"ssh-rsa":case"ssh-dss":case"ecdsa-sha2-nistp256":case"ecdsa-sha2-nistp384":case"ecdsa-sha2-nistp521":return!0;case"ssh-ed25519":if(A)return!0;default:return!1}}function z(e){return!!e&&"boolean"==typeof e[C]}function J(e,t){let r,i;if(z(e))return e;if(Buffer.isBuffer(e))r=e,e=e.utf8Slice(0,e.length).trim();else{if("string"!=typeof e)return Error("Key data must be a Buffer or string");e=e.trim()}if(void 0!=t){if("string"==typeof t)t=Buffer.from(t);else if(!Buffer.isBuffer(t))return Error("Passphrase must be a string or Buffer when supplied")}if(null!==(i=q.parse(e,t))||null!==(i=$.parse(e,t))||null!==(i=G.parse(e,t))||null!==(i=Y.parse(e))||null!==(i=j.parse(e)))return i;if(r){k.init(r,0);let t=k.readString(!0);void 0!==t&&void 0!==(e=k.readRaw())&&(i=X(e,t,"",t))instanceof Error&&(i=null),k.clear()}return i||Error("Unsupported key format")}t.exports={isParsedKey:z,isSupportedKeyType:V,parseDERKey:(e,t)=>X(e,t,"",t),parseKey:J}},768738,(e,t,r)=>{"use strict";let i,{Socket:n}=e.r(504446),{Duplex:s}=e.r(688947),{resolve:o}=e.r(814747),{readFile:a}=e.r(522734),{execFile:l,spawn:c}=e.r(233405),{isParsedKey:h,parseKey:f}=e.r(939649),{makeBufferParser:d,readUInt32BE:u,writeUInt32BE:g,writeUInt32LE:p}=e.r(69253);function A(e){let t=!1;return(...r)=>{t||(t=!0,e(...r))}}function _(){}let E=Buffer.alloc(0),b=d();class I{getIdentities(e){e(Error("Missing getIdentities() implementation"))}sign(e,t,r,i){"function"==typeof r&&(i=r),i(Error("Missing sign() implementation"))}}class y extends I{constructor(e){super(),this.socketPath=e}getStream(e){e=A(e);let t=new n;function r(){try{t.destroy()}catch{}e(Error("Failed to connect to agent"))}t.on("connect",()=>{e(null,t)}),t.on("close",r).on("end",r).on("error",r),t.connect(this.socketPath)}getIdentities(e){e=A(e),this.getStream((t,r)=>{function i(t){if(r)try{r.destroy()}catch{}t||(t=Error("Failed to retrieve identities from agent")),e(t)}if(t)return i(t);let n=new v(!0);n.on("error",i),n.pipe(r).pipe(n),r.on("close",i).on("end",i).on("error",i),n.getIdentities((t,n)=>{if(t)return i(t);try{r.destroy()}catch{}e(null,n)})})}sign(e,t,r,i){"function"==typeof r?(i=r,r=void 0):("object"!=typeof r||null===r)&&(r=void 0),i=A(i),this.getStream((n,s)=>{function o(e){if(s)try{s.destroy()}catch{}e||(e=Error("Failed to sign data with agent")),i(e)}if(n)return o(n);let a=new v(!0);a.on("error",o),a.pipe(s).pipe(a),s.on("close",o).on("end",o).on("error",o),a.sign(e,t,r,(e,t)=>{if(e)return o(e);try{s.destroy()}catch{}i(null,t)})})}}let m=(()=>{let e=o("/ROOT/node_modules/.pnpm/ssh2@1.17.0/node_modules/ssh2/lib","..","util/pagent.exe"),t={10:Error("Invalid pagent.exe arguments"),11:Error("Pageant is not running"),12:Error("pagent.exe could not create an mmap"),13:Error("pagent.exe could not set mode for stdin"),14:Error("pagent.exe could not set mode for stdout"),15:Error("pagent.exe did not get expected input payload")};function r(e){e.buffer=null,e.proc&&(e.proc.kill(),e.proc=void 0)}class i extends s{constructor(){super(),this.proc=void 0,this.buffer=null}_read(e){}_write(r,i,n){let s;if(null===this.buffer)this.buffer=r;else{let e=Buffer.allocUnsafe(this.buffer.length+r.length);this.buffer.copy(e,0),r.copy(e,this.buffer.length),this.buffer=e}if(this.buffer.length<4)return n();let o=u(this.buffer,0);if(this.buffer.length-4<o)return n();if(r=this.buffer.slice(0,4+o),this.buffer.length>4+o)return n(Error("Unexpected multiple agent requests"));this.buffer=null;let a=this.proc=c(e,[r.length]);a.stdout.on("data",e=>{this.push(e)}),a.on("error",e=>{n(s=e)}),a.on("close",e=>{if(this.proc=void 0,!s){if(s=t[e])return n(s);n()}}),a.stdin.end(r)}_final(e){r(this),e()}_destroy(e,t){r(this),t()}}return class extends y{getStream(e){e(null,new i)}}})(),S=(i=/^!<socket >(\d+) s ([A-Z0-9]{8}-[A-Z0-9]{8}-[A-Z0-9]{8}-[A-Z0-9]{8})/,class extends y{getStream(e){e=A(e);let t=this.socketPath,r=!1;a(t,function s(o,c){let h,f;if(o)return r?e(Error("Invalid cygwin unix socket path")):void l("cygpath",["-w",t],(i,n,o)=>{if(i||0===n.length)return e(Error("Invalid cygwin unix socket path"));r=!0,a(t=n.toString().replace(/[\r\n]/g,""),s)});let d=i.exec(c.toString("ascii"));if(!d)return e(Error("Malformed cygwin unix socket file"));let g=0,A=!1,_=[],E=Buffer.alloc(12),b=parseInt(d[1],10),I=d[2].replace(/-/g,""),y=Buffer.allocUnsafe(16);for(let e=0,t=0;t<32;++e,t+=2)y[e]=parseInt(I.substring(t,t+2),16);for(let e=0;e<16;e+=4)p(y,u(y,e),e);function m(){g=0,h="secret",f.write(y)}function S(t){if(g+=t.length,"secret"===h){16===g&&(g=0,h="creds",f.write(E));return}if("creds"===h&&(A||_.push(t),12===g)){if(f.removeListener("connect",m),f.removeListener("data",S),f.removeListener("error",x),f.removeListener("end",x),f.removeListener("close",x),A)return e(null,f);A=!0,p(E=Buffer.concat(_),process.pid,0),f.on("error",()=>{}),f.destroy(),w()}}function x(){e(Error("Problem negotiating cygwin unix socket security"))}function w(){(f=new n).on("connect",m),f.on("data",S),f.on("error",x),f.on("end",x),f.on("close",x),f.connect(b)}w()})}}),x=/^[/\\][/\\]\.[/\\]pipe[/\\].+/;function w(e){return"win32"===process.platform&&!x.test(e),new y(e)}let v=(()=>{let e=Symbol("Inbound Request Type"),t=Symbol("Inbound Request Response"),r=Symbol("Inbound Request Context");class i{constructor(i,n){this[e]=i,this[t]=void 0,this[r]=n}hasResponded(){return void 0!==this[t]}getType(){return this[e]}getContext(){return this[r]}}function n(e,r,i){let n;for(r[t]=i;e[c].length;){let r=e[c][0][t];if(void 0===r)break;e[c].shift(),n=e.push(r)}return n}function o(e){if(e[p]=null,0===e[d]){let t=e[c];if(t&&t.length)for(let r of(e[c]=[],t))r.cb(Error("No reply from server"))}try{e.end()}catch{}setImmediate(()=>{e[y]||e.emit("end"),e[I]||e.emit("close")})}function a(){this[I]=!0}function l(){this[y]=!0}let c=Symbol("Requests"),d=Symbol("Agent Protocol Role"),p=Symbol("Agent Protocol Buffer"),A=Symbol("Agent Protocol Current Message Length"),I=Symbol("Agent Protocol Closed"),y=Symbol("Agent Protocol Ended");return class extends s{constructor(e){super({autoDestroy:!0,emitClose:!1}),this[d]=+!e,this[c]=[],this[p]=null,this[A]=-1,this.once("end",l),this.once("close",a)}_read(e){}_write(e,t,r){if(null===this[p])this[p]=e;else{var n;let t;this[p]=(n=this[p],t=Buffer.allocUnsafe(n.length+e.length),n.copy(t,0),e.copy(t,n.length),t)}let s=this[p],o=s.length,a=0;for(;a<o&&!(o<5)&&(-1===this[A]&&(this[A]=u(s,a)),!(o<4+this[A]));){;let e=s[a+=4];if(++a,0===this[d]){if(0===this[c].length)return r(Error("Received unexpected message from server"));let t=this[c].shift();switch(e){case 5:t.cb(Error("Agent responded with failure"));break;case 12:{if(11!==t.type)return r(Error("Agent responded with wrong message type"));b.init(s,a);let e=b.readUInt32BE();if(void 0===e)return b.clear(),r(Error("Malformed agent response"));let i=[];for(let t=0;t<e;++t){let e=b.readString();if(void 0===e)return b.clear(),r(Error("Malformed agent response"));let t=b.readString(!0);if(void 0===t)return b.clear(),r(Error("Malformed agent response"));(e=f(e))instanceof Error||(e.comment=e.comment||t,i.push(e))}a=b.pos(),b.clear(),t.cb(null,i);break}case 14:{if(13!==t.type)return r(Error("Agent responded with wrong message type"));b.init(s,a);let e=b.readString();if(a=b.pos(),b.clear(),void 0===e)return r(Error("Malformed agent response"));if(b.init(e,0),b.readString(!0),e=b.readString(),b.clear(),void 0===e)return r(Error("Malformed OpenSSH signature format"));t.cb(null,e);break}default:return r(Error("Agent responded with unsupported message type"))}}else switch(e){case 11:{let t=new i(e);this[c].push(t),this.emit("identities",t);break}case 13:{let t;b.init(s,a);let r=b.readString(),n=b.readString(),o=b.readUInt32BE();if(a=b.pos(),b.clear(),void 0===o||(r=f(r))instanceof Error){let t=new i(e);return this[c].push(t),this.failureReply(t)}let l={hash:void 0};"ssh-rsa"===r.type&&(2&o?(t="rsa-sha2-256",l.hash="sha256"):4&o&&(t="rsa-sha2-512",l.hash="sha512")),void 0===t&&(t=r.type);let h=new i(e,t);this[c].push(h),this.emit("sign",h,r,n,l);break}default:{let t=new i(e);this[c].push(t),this.failureReply(t)}}if(this[A]=-1,a===o){this[p]=null;break}this[p]=s=s.slice(a),o=s.length,a=0}r()}_destroy(e,t){o(this),t()}_final(e){o(this),e()}sign(e,t,r,i){if(0!==this[d])throw Error("Client-only method called with server role");"function"==typeof r?(i=r,r=void 0):("object"!=typeof r||null===r)&&(r=void 0);let n=0;if((e=f(e))instanceof Error)throw Error("Invalid public key argument");if("ssh-rsa"===e.type&&r)switch(r.hash){case"sha256":n=2;break;case"sha512":n=4}let s=(e=e.getPublicSSH()).length,o=t.length,a=0,l=Buffer.allocUnsafe(9+s+4+o+4);return g(l,l.length-4,a),l[a+=4]=13,g(l,s,++a),e.copy(l,a+=4),g(l,o,a+=s),t.copy(l,a+=4),g(l,n,a+=o),"function"!=typeof i&&(i=_),this[c].push({type:13,cb:i}),this.push(l)}getIdentities(e){if(0!==this[d])throw Error("Client-only method called with server role");let t=0,r=Buffer.allocUnsafe(5);return g(r,r.length-4,t),r[t+=4]=11,"function"!=typeof e&&(e=_),this[c].push({type:11,cb:e}),this.push(r)}failureReply(e){if(1!==this[d])throw Error("Server-only method called with client role");if(!(e instanceof i))throw Error("Wrong request argument");if(e.hasResponded())return!0;let t=0,r=Buffer.allocUnsafe(5);return g(r,r.length-4,t),r[t+=4]=5,n(this,e,r)}getIdentitiesReply(e,t){if(1!==this[d])throw Error("Server-only method called with client role");if(!(e instanceof i))throw Error("Wrong request argument");if(e.hasResponded())return!0;if(11!==e.getType())throw Error("Invalid response to request");if(!Array.isArray(t))throw Error("Keys argument must be an array");let r=4,s=[];for(let e=0;e<t.length;++e){let i,n,o=t[e];if("object"!=typeof o||null===o)throw Error(`Invalid key entry: ${o}`);if(h(o))i=o;else if(h(o.pubKey))i=o.pubKey;else if("object"!=typeof o.pubKey||null===o.pubKey||({pubKey:i,comment:n}=o.pubKey,(i=f(i))instanceof Error))continue;n=i.comment||n,r+=4+(i=i.getPublicSSH()).length,n&&"string"==typeof n?n=Buffer.from(n):Buffer.isBuffer(n)||(n=E),r+=4+n.length,s.push({pubKey:i,comment:n})}let o=0,a=Buffer.allocUnsafe(5+r);g(a,a.length-4,o),a[o+=4]=12,g(a,s.length,++o),o+=4;for(let e=0;e<s.length;++e){let{pubKey:t,comment:r}=s[e];g(a,t.length,o),t.copy(a,o+=4),g(a,r.length,o+=t.length),o+=4,r.length&&(r.copy(a,o),o+=r.length)}return n(this,e,a)}signReply(e,t){if(1!==this[d])throw Error("Server-only method called with client role");if(!(e instanceof i))throw Error("Wrong request argument");if(e.hasResponded())return!0;if(13!==e.getType())throw Error("Invalid response to request");if(!Buffer.isBuffer(t))throw Error("Signature argument must be a Buffer");if(0===t.length)throw Error("Signature argument must be non-empty");let r=0,s=e.getContext(),o=Buffer.byteLength(s),a=Buffer.allocUnsafe(13+o+4+t.length);return g(a,a.length-4,r),a[r+=4]=14,g(a,4+o+4+t.length,++r),g(a,o,r+=4),a.utf8Write(s,r+=4,o),g(a,t.length,r+=o),t.copy(a,r+=4),n(this,e,a)}}})(),C=Symbol("Agent"),B=Symbol("Agent Keys"),k=Symbol("Agent Keys Index"),R=Symbol("Agent Init Callbacks");function N(e){return e instanceof I}t.exports={AgentContext:class{constructor(e){if("string"==typeof e)e=w(e);else if(!N(e))throw Error("Invalid agent argument");this[C]=e,this[B]=null,this[k]=-1,this[R]=null}init(e){if("function"!=typeof e&&(e=_),null===this[B])if(null===this[R]){this[R]=[e];let t=(...e)=>{process.nextTick(()=>{let t=this[R];for(let r of(this[R]=null,t))r(...e)})};this[C].getIdentities(A((e,r)=>{if(e)return t(e);if(!Array.isArray(r))return t(Error("Agent implementation failed to provide keys"));let i=[];for(let e of r)(e=f(e))instanceof Error||i.push(e);this[B]=i,this[k]=-1,t()}))}else this[R].push(e);else process.nextTick(e)}nextKey(){return!(null===this[B]||++this[k]>=this[B].length)&&this[B][this[k]]}currentKey(){return null===this[B]||this[k]>=this[B].length?null:this[B][this[k]]}pos(){return null===this[B]||this[k]>=this[B].length?-1:this[k]}reset(){this[k]=-1}sign(...e){this[C].sign(...e)}},AgentProtocol:v,BaseAgent:I,createAgent:w,CygwinAgent:S,isAgent:N,OpenSSHAgent:y,PageantAgent:m}},755004,(e,t,r)=>{t.exports=e.x("tls",()=>require("tls"))},679594,(e,t,r)=>{t.exports=e.x("dns",()=>require("dns"))},279867,(e,t,r)=>{"use strict";let{kMaxLength:i}=e.r(500874),{createInflate:n,constants:{DEFLATE:s,INFLATE:o,Z_DEFAULT_CHUNK:a,Z_DEFAULT_COMPRESSION:l,Z_DEFAULT_MEMLEVEL:c,Z_DEFAULT_STRATEGY:h,Z_DEFAULT_WINDOWBITS:f,Z_PARTIAL_FLUSH:d}}=e.r(406461),u=n()._handle.constructor;function g(){throw Error("Should not get here")}function p(e,t,r){let i=this._owner,n=Error(e);n.errno=t,n.code=r,i._err=n}function A(e){e._handle&&(e._handle.close(),e._handle=null)}class _{constructor(e){this._err=void 0,this._writeState=new Uint32Array(2),this._chunkSize=a,this._maxOutputLength=i,this._outBuffer=Buffer.allocUnsafe(this._chunkSize),this._outOffset=0,this._handle=new u(e),this._handle._owner=this,this._handle.onerror=p,this._handle.init(f,l,c,h,this._writeState,g,void 0)}writeSync(e,t){let r,i,n,s=this._handle;if(!s)throw Error("Invalid Zlib instance");let o=e.length,a=this._chunkSize-this._outOffset,l=0,c=0,h=this._writeState,f=this._outBuffer,u=this._outOffset,g=this._chunkSize;for(;;){if(s.writeSync(d,e,l,o,f,u,a),this._err)throw this._err;r=h[0];let t=o-(i=h[1]),p=a-r;if(p>0){let e=0===u&&p===f.length?f:f.slice(u,u+p);if(u+=p,n?void 0===n.push?n=[n,e]:n.push(e):n=e,(c+=e.byteLength)>this._maxOutputLength)throw A(this),Error(`Output length exceeded maximum of ${this._maxOutputLength}`)}else if(0!==p)throw Error("have should not go down");if((0===r||u>=g)&&(a=g,u=0,f=Buffer.allocUnsafe(g)),0===r)l+=t,o=i;else break}if(this._outBuffer=f,this._outOffset=u,0===c&&(n=Buffer.alloc(0)),t)return n.totalLen=c,n;if(void 0===n.push)return n;let p=Buffer.allocUnsafe(c);for(let e=0,t=0;e<n.length;++e){let r=n[e];p.set(r,t),t+=r.length}return p}}t.exports={PacketReader:class{cleanup(){}read(e){return e}},PacketWriter:class{constructor(e){this.allocStart=5,this.allocStartKEX=5,this._protocol=e}cleanup(){}alloc(e,t){return void 0===this._protocol._kexinit||t?this._protocol._cipher.allocPacket(e):Buffer.allocUnsafe(e)}finalize(e,t){return e}},ZlibPacketReader:class{constructor(){this._zlib=new _(o)}cleanup(){this._zlib&&A(this._zlib)}read(e){return this._zlib.writeSync(e,!1)}},ZlibPacketWriter:class{constructor(e){this.allocStart=0,this.allocStartKEX=0,this._protocol=e,this._zlib=new _(s)}cleanup(){this._zlib&&A(this._zlib)}alloc(e,t){return Buffer.allocUnsafe(e)}finalize(e,t){if(void 0===this._protocol._kexinit||t){let t=this._zlib.writeSync(e,!0),r=this._protocol._cipher.allocPacket(t.totalLen);if(void 0===t.push)r.set(t,5);else for(let e=0,i=5;e<t.length;++e){let n=t[e];r.set(n,i),i+=n.length}return r}return e}}}},205089,(e,t,r)=>{"use strict";let{bufferSlice:i,bufferParser:n,doFatalError:s,sigSSHToASN1:o,writeUInt32BE:a}=e.r(69253),{CHANNEL_OPEN_FAILURE:l,COMPAT:c,MESSAGE:h,TERMINAL_MODE:f}=e.r(11607),{parseKey:d}=e.r(939649),u=Array.from(Object.entries(f)).reduce((e,[t,r])=>({...e,[t]:r}),{});t.exports={[h.DISCONNECT]:(e,t)=>{n.init(t,1);let r=n.readUInt32BE(),i=n.readString(!0),o=n.readString();if(n.clear(),void 0===o)return s(e,"Inbound: Malformed DISCONNECT packet");e._debug&&e._debug(`Inbound: Received DISCONNECT (${r}, "${i}")`);let a=e._handlers.DISCONNECT;a&&a(e,r,i)},[h.IGNORE]:(e,t)=>{e._debug&&e._debug("Inbound: Received IGNORE")},[h.UNIMPLEMENTED]:(e,t)=>{n.init(t,1);let r=n.readUInt32BE();if(n.clear(),void 0===r)return s(e,"Inbound: Malformed UNIMPLEMENTED packet");e._debug&&e._debug(`Inbound: Received UNIMPLEMENTED (seqno ${r})`)},[h.DEBUG]:(e,t)=>{n.init(t,1);let r=n.readBool(),i=n.readString(!0),o=n.readString();if(n.clear(),void 0===o)return s(e,"Inbound: Malformed DEBUG packet");e._debug&&e._debug("Inbound: Received DEBUG");let a=e._handlers.DEBUG;a&&a(e,r,i)},[h.SERVICE_REQUEST]:(e,t)=>{n.init(t,1);let r=n.readString(!0);if(n.clear(),void 0===r)return s(e,"Inbound: Malformed SERVICE_REQUEST packet");e._debug&&e._debug(`Inbound: Received SERVICE_REQUEST (${r})`);let i=e._handlers.SERVICE_REQUEST;i&&i(e,r)},[h.SERVICE_ACCEPT]:(e,t)=>{n.init(t,1);let r=n.readString(!0);if(n.clear(),void 0===r)return s(e,"Inbound: Malformed SERVICE_ACCEPT packet");e._debug&&e._debug(`Inbound: Received SERVICE_ACCEPT (${r})`);let i=e._handlers.SERVICE_ACCEPT;i&&i(e,r)},[h.EXT_INFO]:(e,t)=>{let r;n.init(t,1);let i=n.readUInt32BE();if(void 0!==i){r=[];for(let e=0;e<i;++e){let e=n.readString(!0),t=n.readString();if(void 0!==t)if("server-sig-algs"!==e)continue;else{let i=t.latin1Slice(0,t.length).split(",");r.push({name:e,algs:i});continue}r=void 0;break}}if(n.clear(),void 0===r)return s(e,"Inbound: Malformed EXT_INFO packet");e._debug&&e._debug("Inbound: Received EXT_INFO");let o=e._handlers.EXT_INFO;o&&o(e,r)},[h.USERAUTH_REQUEST]:(e,t)=>{let r,l;n.init(t,1);let c=n.readString(!0),h=n.readString(!0),f=n.readString(!0);switch(f){case"none":r=null;break;case"password":{let e=n.readBool();if(void 0!==e&&void 0!==(r=n.readString(!0))&&e){let e=n.readString(!0);r=void 0!==e?{oldPassword:r,newPassword:e}:void 0}break}case"publickey":{let s=n.readBool();if(void 0!==s){let c,h=n.readString(!0),f=h,d=n.readString();switch(h){case"rsa-sha2-256":f="ssh-rsa",c="sha256";break;case"rsa-sha2-512":f="ssh-rsa",c="sha512"}if(s){let s=n.pos(),l=n.readString();if(void 0!==l&&(l.length>4+h.length+4&&l.utf8Slice(4,4+h.length)===h&&(l=i(l,4+h.length+4)),l=o(l,f))){let i=e._kex.sessionID,n=Buffer.allocUnsafe(4+i.length+s);a(n,i.length,0),n.set(i,4),n.set(new Uint8Array(t.buffer,t.byteOffset,s),4+i.length),r={keyAlgo:f,key:d,signature:l,blob:n,hashAlgo:c}}}else r={keyAlgo:f,key:d,hashAlgo:c},l="publickey -- check"}break}case"hostbased":{let s,l=n.readString(!0),c=l,h=n.readString(),f=n.readString(!0),d=n.readString(!0);switch(l){case"rsa-sha2-256":c="ssh-rsa",s="sha256";break;case"rsa-sha2-512":c="ssh-rsa",s="sha512"}let u=n.pos(),g=n.readString();if(void 0!==g&&(g.length>4+l.length+4&&g.utf8Slice(4,4+l.length)===l&&(g=i(g,4+l.length+4)),void 0!==(g=o(g,c)))){let i=e._kex.sessionID,n=Buffer.allocUnsafe(4+i.length+u);a(n,i.length,0),n.set(i,4),n.set(new Uint8Array(t.buffer,t.byteOffset,u),4+i.length),r={keyAlgo:c,key:h,signature:g,blob:n,localHostname:f,localUsername:d,hashAlgo:s}}break}case"keyboard-interactive":n.skipString(),r=n.readList();break;default:void 0!==f&&(r=n.readRaw())}if(n.clear(),void 0===r)return s(e,"Inbound: Malformed USERAUTH_REQUEST packet");void 0===l&&(l=f),e._authsQueue.push(f),e._debug&&e._debug(`Inbound: Received USERAUTH_REQUEST (${l})`);let d=e._handlers.USERAUTH_REQUEST;d&&d(e,c,h,f,r)},[h.USERAUTH_FAILURE]:(e,t)=>{n.init(t,1);let r=n.readList(),i=n.readBool();if(n.clear(),void 0===i)return s(e,"Inbound: Malformed USERAUTH_FAILURE packet");e._debug&&e._debug(`Inbound: Received USERAUTH_FAILURE (${r})`),e._authsQueue.shift();let o=e._handlers.USERAUTH_FAILURE;o&&o(e,r,i)},[h.USERAUTH_SUCCESS]:(e,t)=>{e._debug&&e._debug("Inbound: Received USERAUTH_SUCCESS"),e._authsQueue.shift();let r=e._handlers.USERAUTH_SUCCESS;r&&r(e)},[h.USERAUTH_BANNER]:(e,t)=>{n.init(t,1);let r=n.readString(!0),i=n.readString();if(n.clear(),void 0===i)return s(e,"Inbound: Malformed USERAUTH_BANNER packet");e._debug&&e._debug("Inbound: Received USERAUTH_BANNER");let o=e._handlers.USERAUTH_BANNER;o&&o(e,r)},60:(e,t)=>{if(!e._authsQueue.length){e._debug&&e._debug("Inbound: Received payload type 60 without auth");return}switch(e._authsQueue[0]){case"password":{n.init(t,1);let r=n.readString(!0),i=n.readString();if(n.clear(),void 0===i)return s(e,"Inbound: Malformed USERAUTH_PASSWD_CHANGEREQ packet");e._debug&&e._debug("Inbound: Received USERAUTH_PASSWD_CHANGEREQ");let o=e._handlers.USERAUTH_PASSWD_CHANGEREQ;o&&o(e,r);break}case"publickey":{n.init(t,1);let r=n.readString(!0),i=n.readString();if(n.clear(),void 0===i)return s(e,"Inbound: Malformed USERAUTH_PK_OK packet");e._debug&&e._debug("Inbound: Received USERAUTH_PK_OK"),e._authsQueue.shift();let o=e._handlers.USERAUTH_PK_OK;o&&o(e,r,i);break}case"keyboard-interactive":{let r;n.init(t,1);let i=n.readString(!0),o=n.readString(!0);n.readString();let a=n.readUInt32BE();if(void 0!==a){let e;for(e=0,r=Array(a);e<a;++e){let t=n.readString(!0),i=n.readBool();if(void 0===i)break;r[e]={prompt:t,echo:i}}e!==a&&(r=void 0)}if(n.clear(),void 0===r)return s(e,"Inbound: Malformed USERAUTH_INFO_REQUEST packet");e._debug&&e._debug("Inbound: Received USERAUTH_INFO_REQUEST");let l=e._handlers.USERAUTH_INFO_REQUEST;l&&l(e,i,o,r);break}default:e._debug&&e._debug("Inbound: Received unexpected payload type 60")}},61:(e,t)=>{let r;if(!e._authsQueue.length){e._debug&&e._debug("Inbound: Received payload type 61 without auth");return}if("keyboard-interactive"!==e._authsQueue[0])return s(e,"Inbound: Received unexpected payload type 61");n.init(t,1);let i=n.readUInt32BE();if(void 0!==i){let e;for(e=0,r=Array(i);e<i;++e){let t=n.readString(!0);if(void 0===t)break;r[e]=t}e!==i&&(r=void 0)}if(n.clear(),void 0===r)return s(e,"Inbound: Malformed USERAUTH_INFO_RESPONSE packet");e._debug&&e._debug("Inbound: Received USERAUTH_INFO_RESPONSE");let o=e._handlers.USERAUTH_INFO_RESPONSE;o&&o(e,r)},[h.GLOBAL_REQUEST]:(e,t)=>{let r;n.init(t,1);let i=n.readString(!0),o=n.readBool();if(void 0!==o)switch(i){case"tcpip-forward":case"cancel-tcpip-forward":{let e=n.readString(!0),t=n.readUInt32BE();void 0!==t&&(r={bindAddr:e,bindPort:t});break}case"streamlocal-forward@openssh.com":case"cancel-streamlocal-forward@openssh.com":{let e=n.readString(!0);void 0!==e&&(r={socketPath:e});break}case"no-more-sessions@openssh.com":r=null;break;case"hostkeys-00@openssh.com":for(r=[];n.avail()>0;){let e=n.readString();if(void 0===e){r=void 0;break}let t=d(e);t instanceof Error||r.push(t)}break;default:r=n.readRaw()}if(n.clear(),void 0===r)return s(e,"Inbound: Malformed GLOBAL_REQUEST packet");e._debug&&e._debug(`Inbound: GLOBAL_REQUEST (${i})`);let a=e._handlers.GLOBAL_REQUEST;a?a(e,i,o,r):e.requestFailure()},[h.REQUEST_SUCCESS]:(e,t)=>{let r=t.length>1?i(t,1):null;e._debug&&e._debug("Inbound: REQUEST_SUCCESS");let n=e._handlers.REQUEST_SUCCESS;n&&n(e,r)},[h.REQUEST_FAILURE]:(e,t)=>{e._debug&&e._debug("Inbound: Received REQUEST_FAILURE");let r=e._handlers.REQUEST_FAILURE;r&&r(e)},[h.CHANNEL_OPEN]:(e,t)=>{let r;n.init(t,1);let i=n.readString(!0),o=n.readUInt32BE(),a=n.readUInt32BE(),c=n.readUInt32BE();switch(i){case"forwarded-tcpip":case"direct-tcpip":{let e=n.readString(!0),t=n.readUInt32BE(),s=n.readString(!0),l=n.readUInt32BE();void 0!==l&&(r={type:i,sender:o,window:a,packetSize:c,data:{destIP:e,destPort:t,srcIP:s,srcPort:l}});break}case"forwarded-streamlocal@openssh.com":case"direct-streamlocal@openssh.com":{let e=n.readString(!0);void 0!==e&&(r={type:i,sender:o,window:a,packetSize:c,data:{socketPath:e}});break}case"x11":{let e=n.readString(!0),t=n.readUInt32BE();void 0!==t&&(r={type:i,sender:o,window:a,packetSize:c,data:{srcIP:e,srcPort:t}});break}default:r={type:i,sender:o,window:a,packetSize:c,data:{}}}if(n.clear(),void 0===r)return s(e,"Inbound: Malformed CHANNEL_OPEN packet");e._debug&&e._debug(`Inbound: CHANNEL_OPEN (s:${o}, ${i})`);let h=e._handlers.CHANNEL_OPEN;h?h(e,r):e.channelOpenFail(r.sender,l.ADMINISTRATIVELY_PROHIBITED,"","")},[h.CHANNEL_OPEN_CONFIRMATION]:(e,t)=>{n.init(t,1);let r=n.readUInt32BE(),i=n.readUInt32BE(),o=n.readUInt32BE(),a=n.readUInt32BE(),l=n.avail()?n.readRaw():void 0;if(n.clear(),void 0===a)return s(e,"Inbound: Malformed CHANNEL_OPEN_CONFIRMATION packet");e._debug&&e._debug(`Inbound: CHANNEL_OPEN_CONFIRMATION (r:${r}, s:${i})`);let c=e._handlers.CHANNEL_OPEN_CONFIRMATION;c&&c(e,{recipient:r,sender:i,window:o,packetSize:a,data:l})},[h.CHANNEL_OPEN_FAILURE]:(e,t)=>{n.init(t,1);let r=n.readUInt32BE(),i=n.readUInt32BE(),o=n.readString(!0),a=n.readString();if(n.clear(),void 0===a)return s(e,"Inbound: Malformed CHANNEL_OPEN_FAILURE packet");e._debug&&e._debug(`Inbound: CHANNEL_OPEN_FAILURE (r:${r})`);let l=e._handlers.CHANNEL_OPEN_FAILURE;l&&l(e,r,i,o)},[h.CHANNEL_WINDOW_ADJUST]:(e,t)=>{n.init(t,1);let r=n.readUInt32BE(),i=n.readUInt32BE();if(n.clear(),void 0===i)return s(e,"Inbound: Malformed CHANNEL_WINDOW_ADJUST packet");e._debug&&e._debug(`Inbound: CHANNEL_WINDOW_ADJUST (r:${r}, ${i})`);let o=e._handlers.CHANNEL_WINDOW_ADJUST;o&&o(e,r,i)},[h.CHANNEL_DATA]:(e,t)=>{n.init(t,1);let r=n.readUInt32BE(),i=n.readString();if(n.clear(),void 0===i)return s(e,"Inbound: Malformed CHANNEL_DATA packet");e._debug&&e._debug(`Inbound: CHANNEL_DATA (r:${r}, ${i.length})`);let o=e._handlers.CHANNEL_DATA;o&&o(e,r,i)},[h.CHANNEL_EXTENDED_DATA]:(e,t)=>{n.init(t,1);let r=n.readUInt32BE(),i=n.readUInt32BE(),o=n.readString();if(n.clear(),void 0===o)return s(e,"Inbound: Malformed CHANNEL_EXTENDED_DATA packet");e._debug&&e._debug(`Inbound: CHANNEL_EXTENDED_DATA (r:${r}, ${o.length})`);let a=e._handlers.CHANNEL_EXTENDED_DATA;a&&a(e,r,o,i)},[h.CHANNEL_EOF]:(e,t)=>{n.init(t,1);let r=n.readUInt32BE();if(n.clear(),void 0===r)return s(e,"Inbound: Malformed CHANNEL_EOF packet");e._debug&&e._debug(`Inbound: CHANNEL_EOF (r:${r})`);let i=e._handlers.CHANNEL_EOF;i&&i(e,r)},[h.CHANNEL_CLOSE]:(e,t)=>{n.init(t,1);let r=n.readUInt32BE();if(n.clear(),void 0===r)return s(e,"Inbound: Malformed CHANNEL_CLOSE packet");e._debug&&e._debug(`Inbound: CHANNEL_CLOSE (r:${r})`);let i=e._handlers.CHANNEL_CLOSE;i&&i(e,r)},[h.CHANNEL_REQUEST]:(e,t)=>{let r;n.init(t,1);let i=n.readUInt32BE(),o=n.readString(!0),a=n.readBool();if(void 0!==a)switch(o){case"exit-status":r=n.readUInt32BE(),e._debug&&e._debug(`Inbound: CHANNEL_REQUEST (r:${i}, ${o}: ${r})`);break;case"exit-signal":{let t,s;if(e._compatFlags&c.OLD_EXIT){let e=n.readUInt32BE();switch(e){case 1:t="HUP";break;case 2:t="INT";break;case 3:t="QUIT";break;case 6:t="ABRT";break;case 9:t="KILL";break;case 14:t="ALRM";break;case 15:t="TERM";break;default:void 0!==e&&(t=`UNKNOWN (${e})`)}s=!1}else t=n.readString(!0),void 0===(s=n.readBool())&&(t=void 0);let a=n.readString(!0);void 0!==n.skipString()&&(r={signal:t,coreDumped:s,errorMessage:a}),e._debug&&e._debug(`Inbound: CHANNEL_REQUEST (r:${i}, ${o}: ${t})`);break}case"pty-req":{let t=n.readString(!0),s=n.readUInt32BE(),a=n.readUInt32BE(),l=n.readUInt32BE(),c=n.readUInt32BE(),h=n.readString();if(void 0!==h){n.init(h,1);let e={};for(;n.avail();){let t=n.readByte();if(t===f.TTY_OP_END)break;let r=u[t],i=n.readUInt32BE();if(void 0===t||void 0===r||void 0===i){e=void 0;break}e[r]=i}void 0!==e&&(r={term:t,cols:s,rows:a,width:l,height:c,modes:e})}e._debug&&e._debug(`Inbound: CHANNEL_REQUEST (r:${i}, ${o})`);break}case"window-change":{let t=n.readUInt32BE(),s=n.readUInt32BE(),a=n.readUInt32BE(),l=n.readUInt32BE();void 0!==l&&(r={cols:t,rows:s,width:a,height:l}),e._debug&&e._debug(`Inbound: CHANNEL_REQUEST (r:${i}, ${o})`);break}case"x11-req":{let t=n.readBool(),s=n.readString(!0),a=n.readString(),l=n.readUInt32BE();void 0!==l&&(r={single:t,protocol:s,cookie:a,screen:l}),e._debug&&e._debug(`Inbound: CHANNEL_REQUEST (r:${i}, ${o})`);break}case"env":{let t=n.readString(!0),s=n.readString(!0);void 0!==s&&(r={name:t,value:s}),e._debug&&e._debug(`Inbound: CHANNEL_REQUEST (r:${i}, ${o}: ${t}=${s})`);break}case"shell":case"auth-agent-req@openssh.com":r=null,e._debug&&e._debug(`Inbound: CHANNEL_REQUEST (r:${i}, ${o})`);break;case"exec":case"subsystem":case"signal":r=n.readString(!0),e._debug&&e._debug(`Inbound: CHANNEL_REQUEST (r:${i}, ${o}: ${r})`);break;case"xon-xoff":r=n.readBool(),e._debug&&e._debug(`Inbound: CHANNEL_REQUEST (r:${i}, ${o}: ${r})`);break;default:r=n.avail()?n.readRaw():null,e._debug&&e._debug(`Inbound: CHANNEL_REQUEST (r:${i}, ${o})`)}if(n.clear(),void 0===r)return s(e,"Inbound: Malformed CHANNEL_REQUEST packet");let l=e._handlers.CHANNEL_REQUEST;l&&l(e,i,o,a,r)},[h.CHANNEL_SUCCESS]:(e,t)=>{n.init(t,1);let r=n.readUInt32BE();if(n.clear(),void 0===r)return s(e,"Inbound: Malformed CHANNEL_SUCCESS packet");e._debug&&e._debug(`Inbound: CHANNEL_SUCCESS (r:${r})`);let i=e._handlers.CHANNEL_SUCCESS;i&&i(e,r)},[h.CHANNEL_FAILURE]:(e,t)=>{n.init(t,1);let r=n.readUInt32BE();if(n.clear(),void 0===r)return s(e,"Inbound: Malformed CHANNEL_FAILURE packet");e._debug&&e._debug(`Inbound: CHANNEL_FAILURE (r:${r})`);let i=e._handlers.CHANNEL_FAILURE;i&&i(e,r)}}},956283,(e,t,r)=>{"use strict";let i=Array(256);[e.r(558948).HANDLERS,e.r(205089)].forEach(e=>{for(let[t,r]of Object.entries(e))isFinite(t*=1)&&t>=0&&t<i.length&&(i[t]=r)}),t.exports=i},558948,(e,t,r)=>{"use strict";let i,n,s,{createDiffieHellman:o,createDiffieHellmanGroup:a,createECDH:l,createHash:c,createPublicKey:h,diffieHellman:f,generateKeyPairSync:d,randomFillSync:u}=e.r(254799),{Ber:g}=e.r(342085),{COMPAT:p,curve25519Supported:A,DEFAULT_KEX:_,DEFAULT_SERVER_HOST_KEY:E,DEFAULT_CIPHER:b,DEFAULT_MAC:I,DEFAULT_COMPRESSION:y,DISCONNECT_REASON:m,MESSAGE:S}=e.r(11607),{CIPHER_INFO:x,createCipher:w,createDecipher:v,MAC_INFO:C}=e.r(866310),{parseDERKey:B}=e.r(939649),{bufferFill:k,bufferParser:R,convertSignature:N,doFatalError:T,FastBuffer:L,sigSSHToASN1:U,writeUInt32BE:O}=e.r(69253),{PacketReader:P,PacketWriter:Q,ZlibPacketReader:D,ZlibPacketWriter:H}=e.r(279867),F=Buffer.alloc(0);function M(e){let t;if(e._compatFlags&p.BAD_DHGEX){let r=e._offer.lists.kex,i=r.array,n=!1;for(let e=0;e<i.length;++e)i[e].includes("group-exchange")&&(n||(n=!0,i=i.slice()),i.splice(e--,1));if(n){let n=17+e._offer.totalSize+1+4,s=Buffer.from(i.join(","));n-=r.buffer.length-s.length;let o=e._offer.lists.all,a=new Uint8Array(o.buffer,o.byteOffset+4+r.buffer.length,o.length-(4+r.buffer.length));O(t=Buffer.allocUnsafe(n),s.length,17),t.set(s,21),t.set(a,21+s.length)}}void 0===t&&(t=Buffer.allocUnsafe(17+e._offer.totalSize+1+4),e._offer.copyAllTo(t,17)),e._debug&&e._debug("Outbound: Sending KEXINIT"),t[0]=S.KEXINIT,u(t,1,16),k(t,0,t.length-5),e._kexinit=t,e._packetRW.write.allocStart=0;{let r=e._packetRW.write.allocStartKEX,i=e._packetRW.write.alloc(t.length,!0);i.set(t,r),e._cipher.encrypt(e._packetRW.write.finalize(i,!0))}}function K(e,t){let r,i,n,s,o={kex:void 0,serverHostKey:void 0,cs:{cipher:void 0,mac:void 0,compress:void 0,lang:void 0},sc:{cipher:void 0,mac:void 0,compress:void 0,lang:void 0}};if(R.init(t,17),void 0===(o.kex=R.readList())||void 0===(o.serverHostKey=R.readList())||void 0===(o.cs.cipher=R.readList())||void 0===(o.sc.cipher=R.readList())||void 0===(o.cs.mac=R.readList())||void 0===(o.sc.mac=R.readList())||void 0===(o.cs.compress=R.readList())||void 0===(o.sc.compress=R.readList())||void 0===(o.cs.lang=R.readList())||void 0===(o.sc.lang=R.readList()))return R.clear(),T(e,"Received malformed KEXINIT","handshake",m.KEY_EXCHANGE_FAILED);let a=R.pos(),l=a<t.length&&1===t[a];R.clear();let c=e._offer,h=c.lists.kex.array;if(e._compatFlags&p.BAD_DHGEX){let e=!1;for(let t=0;t<h.length;++t)-1!==h[t].indexOf("group-exchange")&&(e||(e=!0,h=h.slice()),h.splice(t--,1))}let f=e._debug;if(f&&f("Inbound: Handshake in progress"),f&&f(`Handshake: (local) KEX method: ${h}`),f&&f(`Handshake: (remote) KEX method: ${o.kex}`),e._server?(i=h,s=-1!==(r=o.kex).indexOf("ext-info-c")):(i=o.kex,r=h,s=-1!==i.indexOf("ext-info-s")),void 0===e._strictMode&&(e._server?e._strictMode=-1!==r.indexOf("kex-strict-c-v00@openssh.com"):e._strictMode=-1!==i.indexOf("kex-strict-s-v00@openssh.com"),e._strictMode)&&(f&&f("Handshake: strict KEX mode enabled"),1!==e._decipher.inSeqno))return f&&f("Handshake: KEXINIT not first packet in strict KEX mode"),T(e,"Handshake failed: KEXINIT not first packet in strict KEX mode","handshake",m.KEY_EXCHANGE_FAILED);for(n=0;n<r.length&&-1===i.indexOf(r[n]);++n);if(n===r.length)return f&&f("Handshake: no matching key exchange algorithm"),T(e,"Handshake failed: no matching key exchange algorithm","handshake",m.KEY_EXCHANGE_FAILED);o.kex=r[n],f&&f(`Handshake: KEX algorithm: ${r[n]}`),l&&(!o.kex.length||r[n]!==o.kex[0])&&(e._skipNextInboundPacket=!0);let d=c.lists.serverHostKey.array;for(f&&f(`Handshake: (local) Host key format: ${d}`),f&&f(`Handshake: (remote) Host key format: ${o.serverHostKey}`),e._server?(i=d,r=o.serverHostKey):(i=o.serverHostKey,r=d),n=0;n<r.length&&-1===i.indexOf(r[n]);++n);if(n===r.length)return f&&f("Handshake: No matching host key format"),T(e,"Handshake failed: no matching host key format","handshake",m.KEY_EXCHANGE_FAILED);o.serverHostKey=r[n],f&&f(`Handshake: Host key format: ${r[n]}`);let u=c.lists.cs.cipher.array;for(f&&f(`Handshake: (local) C->S cipher: ${u}`),f&&f(`Handshake: (remote) C->S cipher: ${o.cs.cipher}`),e._server?(i=u,r=o.cs.cipher):(i=o.cs.cipher,r=u),n=0;n<r.length&&-1===i.indexOf(r[n]);++n);if(n===r.length)return f&&f("Handshake: No matching C->S cipher"),T(e,"Handshake failed: no matching C->S cipher","handshake",m.KEY_EXCHANGE_FAILED);o.cs.cipher=r[n],f&&f(`Handshake: C->S Cipher: ${r[n]}`);let g=c.lists.sc.cipher.array;for(f&&f(`Handshake: (local) S->C cipher: ${g}`),f&&f(`Handshake: (remote) S->C cipher: ${o.sc.cipher}`),e._server?(i=g,r=o.sc.cipher):(i=o.sc.cipher,r=g),n=0;n<r.length&&-1===i.indexOf(r[n]);++n);if(n===r.length)return f&&f("Handshake: No matching S->C cipher"),T(e,"Handshake failed: no matching S->C cipher","handshake",m.KEY_EXCHANGE_FAILED);o.sc.cipher=r[n],f&&f(`Handshake: S->C cipher: ${r[n]}`);let A=c.lists.cs.mac.array;if(f&&f(`Handshake: (local) C->S MAC: ${A}`),f&&f(`Handshake: (remote) C->S MAC: ${o.cs.mac}`),x[o.cs.cipher].authLen>0)o.cs.mac="",f&&f("Handshake: C->S MAC: <implicit>");else{for(e._server?(i=A,r=o.cs.mac):(i=o.cs.mac,r=A),n=0;n<r.length&&-1===i.indexOf(r[n]);++n);if(n===r.length)return f&&f("Handshake: No matching C->S MAC"),T(e,"Handshake failed: no matching C->S MAC","handshake",m.KEY_EXCHANGE_FAILED);o.cs.mac=r[n],f&&f(`Handshake: C->S MAC: ${r[n]}`)}let _=c.lists.sc.mac.array;if(f&&f(`Handshake: (local) S->C MAC: ${_}`),f&&f(`Handshake: (remote) S->C MAC: ${o.sc.mac}`),x[o.sc.cipher].authLen>0)o.sc.mac="",f&&f("Handshake: S->C MAC: <implicit>");else{for(e._server?(i=_,r=o.sc.mac):(i=o.sc.mac,r=_),n=0;n<r.length&&-1===i.indexOf(r[n]);++n);if(n===r.length)return f&&f("Handshake: No matching S->C MAC"),T(e,"Handshake failed: no matching S->C MAC","handshake",m.KEY_EXCHANGE_FAILED);o.sc.mac=r[n],f&&f(`Handshake: S->C MAC: ${r[n]}`)}let E=c.lists.cs.compress.array;for(f&&f(`Handshake: (local) C->S compression: ${E}`),f&&f(`Handshake: (remote) C->S compression: ${o.cs.compress}`),e._server?(i=E,r=o.cs.compress):(i=o.cs.compress,r=E),n=0;n<r.length&&-1===i.indexOf(r[n]);++n);if(n===r.length)return f&&f("Handshake: No matching C->S compression"),T(e,"Handshake failed: no matching C->S compression","handshake",m.KEY_EXCHANGE_FAILED);o.cs.compress=r[n],f&&f(`Handshake: C->S compression: ${r[n]}`);let b=c.lists.sc.compress.array;for(f&&f(`Handshake: (local) S->C compression: ${b}`),f&&f(`Handshake: (remote) S->C compression: ${o.sc.compress}`),e._server?(i=b,r=o.sc.compress):(i=o.sc.compress,r=b),n=0;n<r.length&&-1===i.indexOf(r[n]);++n);if(n===r.length)return f&&f("Handshake: No matching S->C compression"),T(e,"Handshake failed: no matching S->C compression","handshake",m.KEY_EXCHANGE_FAILED);o.sc.compress=r[n],f&&f(`Handshake: S->C compression: ${r[n]}`),o.cs.lang="",o.sc.lang="",e._kex&&(e._kexinit||M(e),e._decipher._onPayload=Y.bind(e,{firstPacket:!1})),e._kex=W(o,e,t),e._kex.remoteExtInfoEnabled=s,e._kex.start()}let W=(()=>{function e(e){let t,r=0,i=e.length;for(;0===e[r];)++r,--i;return 128&e[r]?((t=Buffer.allocUnsafe(1+i))[0]=0,e.copy(t,1,r),e=t):i!==e.length&&(t=Buffer.allocUnsafe(i),e.copy(t,0,r),e=t),e}class t{constructor(e,t,r){this._protocol=t,this.sessionID=t._kex?t._kex.sessionID:void 0,this.negotiated=e,this.remoteExtInfoEnabled=!1,this._step=1,this._public=null,this._dh=null,this._sentNEWKEYS=!1,this._receivedNEWKEYS=!1,this._finished=!1,this._hostVerified=!1,this._kexinit=t._kexinit,this._remoteKexinit=r,this._identRaw=t._identRaw,this._remoteIdentRaw=t._remoteIdentRaw,this._hostKey=void 0,this._dhData=void 0,this._sig=void 0}finish(e){let t,r;if(this._finished)return!1;this._finished=!0;let i=this._protocol._server,n=this.negotiated,s=this.convertPublicKey(this._dhData),o=this.computeSecret(this._dhData);if(o instanceof Error)return o.message=`Error while computing DH secret (${this.type}): ${o.message}`,o.level="handshake",T(this._protocol,o,m.KEY_EXCHANGE_FAILED);let a=c(this.hashName);$(a,i?this._remoteIdentRaw:this._identRaw),$(a,i?this._identRaw:this._remoteIdentRaw),$(a,i?this._remoteKexinit:this._kexinit),$(a,i?this._kexinit:this._remoteKexinit);let l=i?this._hostKey.getPublicSSH():this._hostKey;if($(a,l),"groupex"===this.type){let e=this.getDHParams(),t=Buffer.allocUnsafe(4);O(t,this._minBits,0),a.update(t),O(t,this._prefBits,0),a.update(t),O(t,this._maxBits,0),a.update(t),$(a,e.prime),$(a,e.generator)}$(a,i?s:this.getPublicKey());let h=i?this.getPublicKey():s;$(a,h),$(a,o);let f=a.digest();if(i){let e;switch(this.negotiated.serverHostKey){case"rsa-sha2-256":e="sha256";break;case"rsa-sha2-512":e="sha512"}this._protocol._debug&&this._protocol._debug("Generating signature ...");let t=this._hostKey.sign(f,e);if(t instanceof Error)return T(this._protocol,`Handshake failed: signature generation failed for ${this._hostKey.type} host key: ${t.message}`,"handshake",m.KEY_EXCHANGE_FAILED);if(!1===(t=N(t,this._hostKey.type)))return T(this._protocol,`Handshake failed: signature conversion failed for ${this._hostKey.type} host key`,"handshake",m.KEY_EXCHANGE_FAILED);let r=this.negotiated.serverHostKey,i=Buffer.byteLength(r),n=4+i+4+t.length,s=this._protocol._packetRW.write.allocStartKEX,o=this._protocol._packetRW.write.alloc(5+l.length+4+h.length+4+n,!0);if(o[s]=S.KEXDH_REPLY,O(o,l.length,++s),o.set(l,s+=4),O(o,h.length,s+=l.length),o.set(h,s+=4),O(o,n,s+=h.length),O(o,i,s+=4),o.utf8Write(r,s+=4,i),O(o,t.length,s+=i),o.set(t,s+=4),this._protocol._debug){let e;switch(this.type){case"group":e="KEXDH_REPLY";break;case"groupex":e="KEXDH_GEX_REPLY";break;default:e="KEXECDH_REPLY"}this._protocol._debug(`Outbound: Sending ${e}`)}this._protocol._cipher.encrypt(this._protocol._packetRW.write.finalize(o,!0))}else{let e,t;R.init(this._sig,0);let r=R.readString(!0);if(!r)return T(this._protocol,"Malformed packet while reading signature","handshake",m.KEY_EXCHANGE_FAILED);if(r!==n.serverHostKey)return T(this._protocol,`Wrong signature type: ${r}, expected: ${n.serverHostKey}`,"handshake",m.KEY_EXCHANGE_FAILED);let i=R.readString();if(R.clear(),void 0===i)return T(this._protocol,"Malformed packet while reading signature","handshake",m.KEY_EXCHANGE_FAILED);if(!(i=U(i,r)))return T(this._protocol,"Malformed signature","handshake",m.KEY_EXCHANGE_FAILED);{R.init(this._hostKey,0);let t=R.readString(!0),r=this._hostKey.slice(R.pos());if(R.clear(),(e=B(r,t))instanceof Error)return e.level="handshake",T(this._protocol,e,m.KEY_EXCHANGE_FAILED)}switch(this.negotiated.serverHostKey){case"rsa-sha2-256":t="sha256";break;case"rsa-sha2-512":t="sha512"}this._protocol._debug&&this._protocol._debug("Verifying signature ...");let s=e.verify(f,i,t);if(!0!==s)return s instanceof Error?this._protocol._debug&&this._protocol._debug(`Signature verification failed: ${s.stack}`):this._protocol._debug&&this._protocol._debug("Signature verification failed"),T(this._protocol,"Handshake failed: signature verification failed","handshake",m.KEY_EXCHANGE_FAILED);this._protocol._debug&&this._protocol._debug("Verified signature")}(i||!e)&&j(this);let d=e=>{let s,a,l,c;if(t)return j(this),t.outbound.seqno=this._protocol._cipher.outSeqno,this._protocol._cipher.free(),this._protocol._cipher=w(t),this._protocol._packetRW.write=r,t=void 0,r=void 0,this._protocol._onHandshakeComplete(n),!1;this.sessionID||(this.sessionID=f);{let e=Buffer.allocUnsafe(4+o.length);O(e,o.length,0),e.set(o,4),o=e}let h=x[n.cs.cipher],u=x[n.sc.cipher],g=G(h.ivLen,this.hashName,o,f,this.sessionID,"A"),p=G(u.ivLen,this.hashName,o,f,this.sessionID,"B"),A=G(h.keyLen,this.hashName,o,f,this.sessionID,"C"),_=G(u.keyLen,this.hashName,o,f,this.sessionID,"D");h.authLen||(a=G((s=C[n.cs.mac]).len,this.hashName,o,f,this.sessionID,"E")),u.authLen||(c=G((l=C[n.sc.mac]).len,this.hashName,o,f,this.sessionID,"F"));let E={inbound:{onPayload:this._protocol._onPayload,seqno:this._protocol._decipher.inSeqno,decipherInfo:i?h:u,decipherIV:i?g:p,decipherKey:i?A:_,macInfo:i?s:l,macKey:i?a:c},outbound:{onWrite:this._protocol._onWrite,seqno:this._protocol._cipher.outSeqno,cipherInfo:i?u:h,cipherIV:i?p:g,cipherKey:i?_:A,macInfo:i?l:s,macKey:i?c:a}};this._protocol._decipher.free(),t=E,this._protocol._decipher=v(E);let b={read:void 0,write:void 0};switch(n.cs.compress){case"zlib":i?b.read=new D:b.write=new H(this._protocol);break;case"zlib@openssh.com":if(this._protocol._authenticated){i?b.read=new D:b.write=new H(this._protocol);break}default:i?b.read=new P:b.write=new Q(this._protocol)}switch(n.sc.compress){case"zlib":i?b.write=new H(this._protocol):b.read=new D;break;case"zlib@openssh.com":if(this._protocol._authenticated){i?b.write=new H(this._protocol):b.read=new D;break}default:i?b.write=new Q(this._protocol):b.read=new P}return this._protocol._packetRW.read.cleanup(),this._protocol._packetRW.write.cleanup(),this._protocol._packetRW.read=b.read,r=b.write,this._public=null,this._dh=null,this._kexinit=this._protocol._kexinit=void 0,this._remoteKexinit=void 0,this._identRaw=void 0,this._remoteIdentRaw=void 0,this._hostKey=void 0,this._dhData=void 0,this._sig=void 0,!e&&d()};if((i||e)&&(this.finish=d),!i)return d(e)}start(){if(!this._protocol._server){if(this._protocol._debug){let e;e="group"===this.type?"KEXDH_INIT":"KEXECDH_INIT",this._protocol._debug(`Outbound: Sending ${e}`)}let e=this.getPublicKey(),t=this._protocol._packetRW.write.allocStartKEX,r=this._protocol._packetRW.write.alloc(5+e.length,!0);r[t]=S.KEXDH_INIT,O(r,e.length,++t),r.set(e,t+=4),this._protocol._cipher.encrypt(this._protocol._packetRW.write.finalize(r,!0))}}getPublicKey(){this.generateKeys();let e=this._public;if(e)return this.convertPublicKey(e)}convertPublicKey(e){let t,r=0,i=e.length;for(;0===e[r];)++r,--i;return 128&e[r]?((t=Buffer.allocUnsafe(1+i))[0]=0,e.copy(t,1,r),t):(i!==e.length&&(t=Buffer.allocUnsafe(i),e.copy(t,0,r),e=t),e)}computeSecret(t){this.generateKeys();try{return e(this._dh.computeSecret(t))}catch(e){return e}}parse(e){let t=e[0];switch(this._step){case 1:if(this._protocol._server){if(t!==S.KEXDH_INIT)return T(this._protocol,`Received packet ${t} instead of ${S.KEXDH_INIT}`,"handshake",m.KEY_EXCHANGE_FAILED);this._protocol._debug&&this._protocol._debug("Received DH Init"),R.init(e,1);let r=R.readString();if(R.clear(),void 0===r)return T(this._protocol,"Received malformed KEX*_INIT","handshake",m.KEY_EXCHANGE_FAILED);this._dhData=r;let i=this._protocol._hostKeys[this.negotiated.serverHostKey];Array.isArray(i)&&(i=i[0]),this._hostKey=i,this.finish()}else{let r,i,n,s;if(t!==S.KEXDH_REPLY)return T(this._protocol,`Received packet ${t} instead of ${S.KEXDH_REPLY}`,"handshake",m.KEY_EXCHANGE_FAILED);if(this._protocol._debug&&this._protocol._debug("Received DH Reply"),R.init(e,1),void 0===(r=R.readString())||void 0===(i=R.readString())||void 0===(n=R.readString()))return R.clear(),T(this._protocol,"Received malformed KEX*_REPLY","handshake",m.KEY_EXCHANGE_FAILED);R.clear(),R.init(r,0);let o=R.readString(!0);if(R.clear(),void 0===o)return T(this._protocol,"Received malformed host public key","handshake",m.KEY_EXCHANGE_FAILED);if(o!==this.negotiated.serverHostKey)switch(this.negotiated.serverHostKey){case"rsa-sha2-256":case"rsa-sha2-512":if("ssh-rsa"===o)break;default:return T(this._protocol,"Host key does not match negotiated type","handshake",m.KEY_EXCHANGE_FAILED)}this._hostKey=r,this._dhData=i,this._sig=n;let a=!1;if(void 0===this._protocol._hostVerifier?(s=!0,this._protocol._debug&&this._protocol._debug("Host accepted by default (no verification)")):s=this._protocol._hostVerifier(r,e=>{if(!a){if(a=!0,!1===e)return this._protocol._debug&&this._protocol._debug("Host denied (verification failed)"),T(this._protocol,"Host denied (verification failed)","handshake",m.KEY_EXCHANGE_FAILED);this._protocol._debug&&this._protocol._debug("Host accepted (verified)"),this._hostVerified=!0,this._receivedNEWKEYS?this.finish():j(this)}}),void 0===s)return void++this._step;if(a=!0,!1===s)return this._protocol._debug&&this._protocol._debug("Host denied (verification failed)"),T(this._protocol,"Host denied (verification failed)","handshake",m.KEY_EXCHANGE_FAILED);this._protocol._debug&&this._protocol._debug("Host accepted (verified)"),this._hostVerified=!0,j(this)}++this._step;break;case 2:if(t!==S.NEWKEYS)return T(this._protocol,`Received packet ${t} instead of ${S.NEWKEYS}`,"handshake",m.KEY_EXCHANGE_FAILED);return this._protocol._debug&&this._protocol._debug("Inbound: NEWKEYS"),this._receivedNEWKEYS=!0,this._protocol._strictMode&&(this._protocol._decipher.inSeqno=0),++this._step,this.finish(!this._protocol._server&&!this._hostVerified);default:return T(this._protocol,`Received unexpected packet ${t} after NEWKEYS`,"handshake",m.KEY_EXCHANGE_FAILED)}}}class r extends t{constructor(e,...t){super(...t),this.type="25519",this.hashName=e,this._keys=null}generateKeys(){this._keys||(this._keys=d("x25519"))}getPublicKey(){return this.generateKeys(),this._keys.publicKey.export({type:"spki",format:"der"}).slice(-32)}convertPublicKey(e){let t,r=0,i=e.length;for(;0===e[r];)++r,--i;return 32===e.length||i!==e.length&&(t=Buffer.allocUnsafe(i),e.copy(t,0,r),e=t),e}computeSecret(t){this.generateKeys();try{let r=new g.Writer;return r.startSequence(),r.startSequence(),r.writeOID("1.3.101.110"),r.endSequence(),r.startSequence(g.BitString),r.writeByte(0),r._ensure(t.length),t.copy(r._buf,r._offset,0,t.length),r._offset+=t.length,r.endSequence(),r.endSequence(),e(f({privateKey:this._keys.privateKey,publicKey:h({key:r.buffer,type:"spki",format:"der"})}))}catch(e){return e}}}class i extends t{constructor(e,t,...r){super(...r),this.type="ecdh",this.curveName=e,this.hashName=t}generateKeys(){this._dh||(this._dh=l(this.curveName),this._public=this._dh.generateKeys())}}class n extends t{constructor(e,...t){super(...t),this.type="groupex",this.hashName=e,this._prime=null,this._generator=null,this._minBits=2048,this._prefBits=function(e){let t=x[e.cs.cipher],r=x[e.sc.cipher],i=8*Math.max(0,"des-ede3-cbc"===t.sslName?14:t.keyLen,t.blockLen,t.ivLen,"des-ede3-cbc"===r.sslName?14:r.keyLen,r.blockLen,r.ivLen);return i<=112?2048:i<=128?3072:i<=192?7680:8192}(this.negotiated),this._protocol._compatFlags&p.BUG_DHGEX_LARGE&&(this._prefBits=Math.min(this._prefBits,4096)),this._maxBits=8192}start(){if(this._protocol._server)return;this._protocol._debug&&this._protocol._debug("Outbound: Sending KEXDH_GEX_REQUEST");let e=this._protocol._packetRW.write.allocStartKEX,t=this._protocol._packetRW.write.alloc(13,!0);t[e]=S.KEXDH_GEX_REQUEST,O(t,this._minBits,++e),O(t,this._prefBits,e+=4),O(t,this._maxBits,e+=4),this._protocol._cipher.encrypt(this._protocol._packetRW.write.finalize(t,!0))}generateKeys(){!this._dh&&this._prime&&this._generator&&(this._dh=o(this._prime,this._generator),this._public=this._dh.generateKeys())}setDHParams(e,t){if(!Buffer.isBuffer(e))throw Error("Invalid prime value");if(!Buffer.isBuffer(t))throw Error("Invalid generator value");this._prime=e,this._generator=t}getDHParams(){if(this._dh)return{prime:e(this._dh.getPrime()),generator:e(this._dh.getGenerator())}}parse(e){let r=e[0];switch(this._step){case 1:{let t,i;if(this._protocol._server){if(r!==S.KEXDH_GEX_REQUEST)return T(this._protocol,`Received packet ${r} instead of `+S.KEXDH_GEX_REQUEST,"handshake",m.KEY_EXCHANGE_FAILED);return T(this._protocol,"Group exchange not implemented for server","handshake",m.KEY_EXCHANGE_FAILED)}if(r!==S.KEXDH_GEX_GROUP)return T(this._protocol,`Received packet ${r} instead of ${S.KEXDH_GEX_GROUP}`,"handshake",m.KEY_EXCHANGE_FAILED);if(this._protocol._debug&&this._protocol._debug("Received DH GEX Group"),R.init(e,1),void 0===(t=R.readString())||void 0===(i=R.readString()))return R.clear(),T(this._protocol,"Received malformed KEXDH_GEX_GROUP","handshake",m.KEY_EXCHANGE_FAILED);R.clear(),this.setDHParams(t,i),this.generateKeys();let n=this.getPublicKey();this._protocol._debug&&this._protocol._debug("Outbound: Sending KEXDH_GEX_INIT");let s=this._protocol._packetRW.write.allocStartKEX,o=this._protocol._packetRW.write.alloc(5+n.length,!0);o[s]=S.KEXDH_GEX_INIT,O(o,n.length,++s),o.set(n,s+=4),this._protocol._cipher.encrypt(this._protocol._packetRW.write.finalize(o,!0)),++this._step;break}case 2:if(this._protocol._server){if(r!==S.KEXDH_GEX_INIT)return T(this._protocol,`Received packet ${r} instead of ${S.KEXDH_GEX_INIT}`,"handshake",m.KEY_EXCHANGE_FAILED);return this._protocol._debug&&this._protocol._debug("Received DH GEX Init"),T(this._protocol,"Group exchange not implemented for server","handshake",m.KEY_EXCHANGE_FAILED)}if(r!==S.KEXDH_GEX_REPLY)return T(this._protocol,`Received packet ${r} instead of ${S.KEXDH_GEX_REPLY}`,"handshake",m.KEY_EXCHANGE_FAILED);this._protocol._debug&&this._protocol._debug("Received DH GEX Reply"),this._step=1,e[0]=S.KEXDH_REPLY,this.parse=t.prototype.parse,this.parse(e)}}}class s extends t{constructor(e,t,...r){super(...r),this.type="group",this.groupName=e,this.hashName=t}start(){if(!this._protocol._server){this._protocol._debug&&this._protocol._debug("Outbound: Sending KEXDH_INIT");let e=this.getPublicKey(),t=this._protocol._packetRW.write.allocStartKEX,r=this._protocol._packetRW.write.alloc(5+e.length,!0);r[t]=S.KEXDH_INIT,O(r,e.length,++t),r.set(e,t+=4),this._protocol._cipher.encrypt(this._protocol._packetRW.write.finalize(r,!0))}}generateKeys(){this._dh||(this._dh=a(this.groupName),this._public=this._dh.generateKeys())}getDHParams(){if(this._dh)return{prime:e(this._dh.getPrime()),generator:e(this._dh.getGenerator())}}}return(e,...t)=>{if("object"!=typeof e||null===e)throw Error("Invalid negotiated argument");let o=e.kex;if("string"==typeof o){switch(t=[e,...t],o){case"curve25519-sha256":case"curve25519-sha256@libssh.org":if(!A)break;return new r("sha256",...t);case"ecdh-sha2-nistp256":return new i("prime256v1","sha256",...t);case"ecdh-sha2-nistp384":return new i("secp384r1","sha384",...t);case"ecdh-sha2-nistp521":return new i("secp521r1","sha512",...t);case"diffie-hellman-group1-sha1":return new s("modp2","sha1",...t);case"diffie-hellman-group14-sha1":return new s("modp14","sha1",...t);case"diffie-hellman-group14-sha256":return new s("modp14","sha256",...t);case"diffie-hellman-group15-sha512":return new s("modp15","sha512",...t);case"diffie-hellman-group16-sha512":return new s("modp16","sha512",...t);case"diffie-hellman-group17-sha512":return new s("modp17","sha512",...t);case"diffie-hellman-group18-sha512":return new s("modp18","sha512",...t);case"diffie-hellman-group-exchange-sha1":return new n("sha1",...t);case"diffie-hellman-group-exchange-sha256":return new n("sha256",...t)}throw Error(`Unsupported key exchange algorithm: ${o}`)}throw Error(`Invalid key exchange type: ${o}`)}})(),q=(n=["kex","serverHostKey",["cs","cipher"],["sc","cipher"],["cs","mac"],["sc","mac"],["cs","compress"],["sc","compress"],["cs","lang"],["sc","lang"]],class{constructor(e){if("object"!=typeof e||null===e)throw TypeError("Argument must be an object");const t={kex:void 0,serverHostKey:void 0,cs:{cipher:void 0,mac:void 0,compress:void 0,lang:void 0},sc:{cipher:void 0,mac:void 0,compress:void 0,lang:void 0},all:void 0};let r=0;for(const i of n){let n,s,o,a;if("string"==typeof i)n=t,s=e[i],o=a=i;else{const r=i[0];n=t[r],a=i[1],s=e[r][a],o=`${r}.${a}`}const l={array:void 0,buffer:void 0};if(Buffer.isBuffer(s))l.array=(""+s).split(","),l.buffer=s,r+=4+s.length;else{if("string"==typeof s&&(s=s.split(",")),Array.isArray(s))l.array=s,l.buffer=Buffer.from(s.join(","));else throw TypeError(`Invalid \`${o}\` type: ${typeof s}`);r+=4+l.buffer.length}n[a]=l}const i=Buffer.allocUnsafe(r);t.all=i;let s=0;for(const e of n){let r;s=O(i,(r="string"==typeof e?t[e].buffer:t[e[0]][e[1]].buffer).length,s),i.set(r,s),s+=r.length}this.totalSize=r,this.lists=t}copyAllTo(e,t){let r=this.lists.all;if("number"!=typeof t)throw TypeError(`Invalid offset value: ${typeof t}`);if(e.length-t<r.length)throw Error("Insufficient space to copy list");return e.set(r,t),r.length}}),$=(s=Buffer.allocUnsafe(4),(e,t)=>{O(s,t.length,0),e.update(s),e.update(t)});function G(e,t,r,i,n,s){let o;if(e){let a=c(t).update(r).update(i).update(s).update(n).digest();for(;a.length<e;){let e=c(t).update(r).update(i).update(a).digest(),n=Buffer.allocUnsafe(a.length+e.length);n.set(a,0),n.set(e,a.length),a=n}o=a.length===e?a:new L(a.buffer,a.byteOffset,e)}else o=F;return o}function Y(t,r){if(0===r.length){this._debug&&this._debug("Inbound: Skipping empty packet payload");return}if(this._skipNextInboundPacket){this._skipNextInboundPacket=!1;return}let n=(r=this._packetRW.read.read(r))[0];if(!this._strictMode)switch(n){case S.IGNORE:case S.UNIMPLEMENTED:case S.DEBUG:return i||(i=e.r(956283)),i[n](this,r)}switch(n){case S.DISCONNECT:return i||(i=e.r(956283)),i[n](this,r);case S.KEXINIT:if(!t.firstPacket)return T(this,"Received extra KEXINIT during handshake","handshake",m.KEY_EXCHANGE_FAILED);return t.firstPacket=!1,K(this,r);default:if(n<20||n>49)return T(this,`Received unexpected packet type ${n}`,"handshake",m.KEY_EXCHANGE_FAILED)}return this._kex.parse(r)}function j(e){if(!e._sentNEWKEYS){e._protocol._debug&&e._protocol._debug("Outbound: Sending NEWKEYS");let t=e._protocol._packetRW.write.allocStartKEX,r=e._protocol._packetRW.write.alloc(1,!0);r[t]=S.NEWKEYS,e._protocol._cipher.encrypt(e._protocol._packetRW.write.finalize(r,!0)),e._sentNEWKEYS=!0,e._protocol._strictMode&&(e._protocol._cipher.outSeqno=0)}}t.exports={KexInit:q,kexinit:M,onKEXPayload:Y,DEFAULT_KEXINIT_CLIENT:new q({kex:_.concat(["ext-info-c","kex-strict-c-v00@openssh.com"]),serverHostKey:E,cs:{cipher:b,mac:I,compress:y,lang:[]},sc:{cipher:b,mac:I,compress:y,lang:[]}}),DEFAULT_KEXINIT_SERVER:new q({kex:_.concat(["kex-strict-s-v00@openssh.com"]),serverHostKey:E,cs:{cipher:b,mac:I,compress:y,lang:[]},sc:{cipher:b,mac:I,compress:y,lang:[]}}),HANDLERS:{[S.KEXINIT]:K}}},773598,(e,t,r)=>{t.exports={name:"ssh2",version:"1.17.0",author:"Brian White <mscdex@mscdex.net>",description:"SSH2 client and server modules written in pure JavaScript for node.js",main:"./lib/index.js",engines:{node:">=10.16.0"},dependencies:{asn1:"^0.2.6","bcrypt-pbkdf":"^1.0.2"},devDependencies:{"@mscdex/eslint-config":"^1.1.0",eslint:"^7.32.0"},optionalDependencies:{"cpu-features":"~0.0.10",nan:"^2.23.0"},scripts:{install:"node install.js",rebuild:"node install.js",test:"node test/test.js",lint:"eslint --cache --report-unused-disable-directives --ext=.js .eslintrc.js examples lib test","lint:fix":"npm run lint -- --fix"},keywords:["ssh","ssh2","sftp","secure","shell","exec","remote","client"],licenses:[{type:"MIT",url:"http://github.com/mscdex/ssh2/raw/master/LICENSE"}],repository:{type:"git",url:"http://github.com/mscdex/ssh2.git"}}},169722,(e,t,r)=>{"use strict";let{inspect:i}=e.r(224361),{bindingAvailable:n,NullCipher:s,NullDecipher:o}=e.r(866310),{COMPAT_CHECKS:a,DISCONNECT_REASON:l,eddsaSupported:c,MESSAGE:h,SIGNALS:f,TERMINAL_MODE:d}=e.r(11607),{DEFAULT_KEXINIT_CLIENT:u,DEFAULT_KEXINIT_SERVER:g,KexInit:p,kexinit:A,onKEXPayload:_}=e.r(558948),{parseKey:E}=e.r(939649),b=e.r(956283),{bufferCopy:I,bufferFill:y,bufferSlice:m,convertSignature:S,sendPacket:x,writeUInt32BE:w}=e.r(69253),{PacketReader:v,PacketWriter:C,ZlibPacketReader:B,ZlibPacketWriter:k}=e.r(279867),R=e.r(773598).version,N=new Map(Object.values(l).map(e=>[e,1])),T=Buffer.from(`SSH-2.0-ssh2js${R}`),L=Buffer.from(`${T}\r
3
+ `),U=Buffer.from([h.GLOBAL_REQUEST,0,0,0,21,107,101,101,112,97,108,105,118,101,64,111,112,101,110,115,115,104,46,99,111,109,1]),O=Buffer.from([d.TTY_OP_END]);function P(){}let Q=/^SSH-(2\.0|1\.99)-([^ ]+)(?: (.*))?$/;function D(e,t,r){let n,s;this._buffer?((n=Buffer.allocUnsafe(this._buffer.length+(r-t))).set(this._buffer,0),0===t?n.set(e,this._buffer.length):n.set(new Uint8Array(e.buffer,e.byteOffset+t,r-t),this._buffer.length),s=this._buffer.length,t=0):(n=e,s=0);let l=t,c=t,h=t,f=!1,d=0,u=0;for(;t<n.length;++t){let e=n[t];if(13===e){f=!0;continue}if(10===e){if(h>c&&h-c>4&&83===n[c]&&83===n[c+1]&&72===n[c+2]&&45===n[c+3]){let e=n.latin1Slice(l,h+1),f=c===l?e:e.slice(c-l),d=Q.exec(f);if(!d)throw Error("Invalid identification string");let u={greeting:c===l?"":e.slice(0,c-l),identRaw:f,versions:{protocol:d[1],software:d[2]},comments:d[3]};if(this._remoteIdentRaw=Buffer.from(f),this._debug&&this._debug(`Remote ident: ${i(f)}`),this._compatFlags=function(e){let t=e.versions.software,r=0;for(let e of a)"string"==typeof e[0]?t===e[0]&&(r|=e[1]):e[0].test(t)&&(r|=e[1]);return r}(u),this._buffer=void 0,this._decipher=new o(0,_.bind(this,{firstPacket:!0})),this._parse=H,this._onHeader(u),!this._destruct)return r;return A(this),t+1-s}if(this._server)throw Error("Greetings from clients not permitted");if(++u>1024)throw Error("Max greeting lines exceeded");f=!1,c=t+1,d=0}else if(f)throw Error("Invalid header: expected newline");else if(++d>=8192)throw Error("Header line too long");h=t}return this._buffer||(this._buffer=m(n,l)),t-s}function H(e,t,r){return this._decipher.decrypt(e,t,r)}function F(e){if(this._onPacket(),0===e.length){this._debug&&this._debug("Inbound: Skipping empty packet payload");return}let t=(e=this._packetRW.read.read(e))[0];t!==h.USERAUTH_SUCCESS||this._server||this._authenticated||(this._authenticated=!0,"zlib@openssh.com"===this._kex.negotiated.cs.compress&&(this._packetRW.write=new k(this)),"zlib@openssh.com"===this._kex.negotiated.sc.compress&&(this._packetRW.read=new B));let r=b[t];if(void 0===r){this._debug&&this._debug(`Inbound: Unsupported message type: ${t}`);return}return r(this,e)}t.exports=class{constructor(e){let t,r,o;const a=e.onWrite;if("function"!=typeof a)throw Error("Missing onWrite function");this._onWrite=e=>{a(e)};const l=e.onError;if("function"!=typeof l)throw Error("Missing onError function");this._onError=e=>{l(e)};const f=e.debug;this._debug="function"==typeof f?e=>{f(e)}:void 0;const d=e.onHeader;this._onHeader="function"==typeof d?(...e)=>{d(...e)}:P;const A=e.onPacket;this._onPacket="function"==typeof A?()=>{A()}:P;let _=e.onHandshakeComplete;"function"!=typeof _&&(_=P),this._onHandshakeComplete=(...e)=>{var r;let i,n,s,o;this._debug&&this._debug("Handshake completed"),t=void 0===t;let a=this._queue;if(a){this._queue=void 0,this._debug&&this._debug(`Draining outbound queue (${a.length}) ...`);for(let e=0;e<a.length;++e){let t=a[e],r=this._packetRW.write.finalize(t);if(r===t){let e=this._cipher.allocPacket(t.length);e.set(t,5),r=e}x(this,r)}this._debug&&this._debug("... finished draining outbound queue")}t&&this._server&&this._kex.remoteExtInfoEnabled&&(r=this,i="ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521rsa-sha2-512,rsa-sha2-256,ssh-rsa,ssh-dss",c&&(i=`ssh-ed25519,${i}`),n=Buffer.byteLength(i),s=r._packetRW.write.allocStart,(o=r._packetRW.write.alloc(28+n))[s]=h.EXT_INFO,w(o,1,++s),w(o,15,s+=4),o.utf8Write("server-sig-algs",s+=4,15),w(o,n,s+=15),o.utf8Write(i,s+=4,n),r._debug&&r._debug("Outbound: Sending EXT_INFO"),x(r,r._packetRW.write.finalize(o))),_(...e)},this._queue=void 0;const E=e.messageHandlers;if("object"==typeof E&&null!==E?this._handlers=E:this._handlers={},this._onPayload=F.bind(this),this._server=!!e.server,this._banner=void 0,this._server){if("object"!=typeof e.hostKeys||null===e.hostKeys)throw Error("Missing server host key(s)");this._hostKeys=e.hostKeys,"string"==typeof e.greeting&&e.greeting.length&&(r="\r\n"===e.greeting.slice(-2)?e.greeting:`${e.greeting}\r
4
+ `),"string"==typeof e.banner&&e.banner.length&&(this._banner="\r\n"===e.banner.slice(-2)?e.banner:`${e.banner}\r
5
+ `)}else this._hostKeys=void 0;let b=e.offer;if("object"!=typeof b||null===b?b=this._server?g:u:b.constructor!==p&&(this._server?b.kex=b.kex.concat(["kex-strict-s-v00@openssh.com"]):b.kex=b.kex.concat(["ext-info-c","kex-strict-c-v00@openssh.com"]),b=new p(b)),this._kex=void 0,this._strictMode=void 0,this._kexinit=void 0,this._offer=b,this._cipher=new s(0,this._onWrite),this._decipher=void 0,this._skipNextInboundPacket=!1,this._packetRW={read:new v,write:new C(this)},this._hostVerifier=this._server||"function"!=typeof e.hostVerifier?void 0:e.hostVerifier,this._parse=D,this._buffer=void 0,this._authsQueue=[],this._authenticated=!1,this._remoteIdentRaw=void 0,"string"==typeof e.ident)this._identRaw=Buffer.from(`SSH-2.0-${e.ident}`),(o=Buffer.allocUnsafe(this._identRaw.length+2)).set(this._identRaw,0),o[o.length-2]=13,o[o.length-1]=10;else if(Buffer.isBuffer(e.ident)){const t=Buffer.allocUnsafe(8+e.ident.length);t.latin1Write("SSH-2.0-",0,8),t.set(e.ident,8),this._identRaw=t,(o=Buffer.allocUnsafe(t.length+2)).set(t,0),o[o.length-2]=13,o[o.length-1]=10}else this._identRaw=T,o=L;this._compatFlags=0,this._debug&&(n?this._debug("Custom crypto binding available"):this._debug("Custom crypto binding not available")),this._debug&&this._debug(`Local ident: ${i(this._identRaw.toString())}`),this.start=()=>{this.start=void 0,r&&this._onWrite(r),this._onWrite(o)}}_destruct(e){this._packetRW.read.cleanup(),this._packetRW.write.cleanup(),this._cipher&&this._cipher.free(),this._decipher&&this._decipher.free(),("string"!=typeof e||0===e.length)&&(e="fatal error"),this.parse=()=>{throw Error(`Instance unusable after ${e}`)},this._onWrite=()=>{throw Error(`Instance unusable after ${e}`)},this._destruct=void 0}cleanup(){this._destruct&&this._destruct()}parse(e,t,r){for(;t<r;)t=this._parse(e,t,r)}disconnect(e){let t=this._packetRW.write.allocStartKEX,r=this._packetRW.write.alloc(13,!0),i=t+13;N.has(e)||(e=l.PROTOCOL_ERROR),r[t]=h.DISCONNECT,w(r,e,++t),r.fill(0,t+=4,i),this._debug&&this._debug(`Outbound: Sending DISCONNECT (${e})`),x(this,this._packetRW.write.finalize(r,!0),!0)}ping(){let e=this._packetRW.write.allocStart,t=this._packetRW.write.alloc(U.length);t.set(U,e),this._debug&&this._debug("Outbound: Sending ping (GLOBAL_REQUEST: keepalive@openssh.com)"),x(this,this._packetRW.write.finalize(t))}rekey(){void 0===this._kexinit?(this._debug&&this._debug("Outbound: Initiated explicit rekey"),this._queue=[],A(this)):this._debug&&this._debug("Outbound: Ignoring rekey during handshake")}requestSuccess(e){let t,r=this._packetRW.write.allocStart;Buffer.isBuffer(e)?((t=this._packetRW.write.alloc(1+e.length))[r]=h.REQUEST_SUCCESS,t.set(e,++r)):(t=this._packetRW.write.alloc(1))[r]=h.REQUEST_SUCCESS,this._debug&&this._debug("Outbound: Sending REQUEST_SUCCESS"),x(this,this._packetRW.write.finalize(t))}requestFailure(){let e=this._packetRW.write.allocStart,t=this._packetRW.write.alloc(1);t[e]=h.REQUEST_FAILURE,this._debug&&this._debug("Outbound: Sending REQUEST_FAILURE"),x(this,this._packetRW.write.finalize(t))}channelSuccess(e){let t=this._packetRW.write.allocStart,r=this._packetRW.write.alloc(5);r[t]=h.CHANNEL_SUCCESS,w(r,e,++t),this._debug&&this._debug(`Outbound: Sending CHANNEL_SUCCESS (r:${e})`),x(this,this._packetRW.write.finalize(r))}channelFailure(e){let t=this._packetRW.write.allocStart,r=this._packetRW.write.alloc(5);r[t]=h.CHANNEL_FAILURE,w(r,e,++t),this._debug&&this._debug(`Outbound: Sending CHANNEL_FAILURE (r:${e})`),x(this,this._packetRW.write.finalize(r))}channelEOF(e){let t=this._packetRW.write.allocStart,r=this._packetRW.write.alloc(5);r[t]=h.CHANNEL_EOF,w(r,e,++t),this._debug&&this._debug(`Outbound: Sending CHANNEL_EOF (r:${e})`),x(this,this._packetRW.write.finalize(r))}channelClose(e){let t=this._packetRW.write.allocStart,r=this._packetRW.write.alloc(5);r[t]=h.CHANNEL_CLOSE,w(r,e,++t),this._debug&&this._debug(`Outbound: Sending CHANNEL_CLOSE (r:${e})`),x(this,this._packetRW.write.finalize(r))}channelWindowAdjust(e,t){let r=this._packetRW.write.allocStart,i=this._packetRW.write.alloc(9);i[r]=h.CHANNEL_WINDOW_ADJUST,w(i,e,++r),w(i,t,r+=4),this._debug&&this._debug(`Outbound: Sending CHANNEL_WINDOW_ADJUST (r:${e}, ${t})`),x(this,this._packetRW.write.finalize(i))}channelData(e,t){let r=Buffer.isBuffer(t),i=r?t.length:Buffer.byteLength(t),n=this._packetRW.write.allocStart,s=this._packetRW.write.alloc(9+i);s[n]=h.CHANNEL_DATA,w(s,e,++n),w(s,i,n+=4),r?s.set(t,n+=4):s.utf8Write(t,n+=4,i),this._debug&&this._debug(`Outbound: Sending CHANNEL_DATA (r:${e}, ${i})`),x(this,this._packetRW.write.finalize(s))}channelExtData(e,t,r){let i=Buffer.isBuffer(t),n=i?t.length:Buffer.byteLength(t),s=this._packetRW.write.allocStart,o=this._packetRW.write.alloc(13+n);o[s]=h.CHANNEL_EXTENDED_DATA,w(o,e,++s),w(o,r,s+=4),w(o,n,s+=4),i?o.set(t,s+=4):o.utf8Write(t,s+=4,n),this._debug&&this._debug(`Outbound: Sending CHANNEL_EXTENDED_DATA (r:${e})`),x(this,this._packetRW.write.finalize(o))}channelOpenConfirm(e,t,r,i){let n=this._packetRW.write.allocStart,s=this._packetRW.write.alloc(17);s[n]=h.CHANNEL_OPEN_CONFIRMATION,w(s,e,++n),w(s,t,n+=4),w(s,r,n+=4),w(s,i,n+=4),this._debug&&this._debug(`Outbound: Sending CHANNEL_OPEN_CONFIRMATION (r:${e}, l:${t})`),x(this,this._packetRW.write.finalize(s))}channelOpenFail(e,t,r){"string"!=typeof r&&(r="");let i=Buffer.byteLength(r),n=this._packetRW.write.allocStart,s=this._packetRW.write.alloc(13+i+4);s[n]=h.CHANNEL_OPEN_FAILURE,w(s,e,++n),w(s,t,n+=4),w(s,i,n+=4),n+=4,i&&(s.utf8Write(r,n,i),n+=i),w(s,0,n),this._debug&&this._debug(`Outbound: Sending CHANNEL_OPEN_FAILURE (r:${e})`),x(this,this._packetRW.write.finalize(s))}service(e){if(this._server)throw Error("Client-only method called in server mode");let t=Buffer.byteLength(e),r=this._packetRW.write.allocStart,i=this._packetRW.write.alloc(5+t);i[r]=h.SERVICE_REQUEST,w(i,t,++r),i.utf8Write(e,r+=4,t),this._debug&&this._debug(`Outbound: Sending SERVICE_REQUEST (${e})`),x(this,this._packetRW.write.finalize(i))}authPassword(e,t,r){if(this._server)throw Error("Client-only method called in server mode");let i=Buffer.byteLength(e),n=Buffer.byteLength(t),s=r?Buffer.byteLength(r):0,o=this._packetRW.write.allocStart,a=this._packetRW.write.alloc(5+i+4+14+4+8+1+4+n+(r?4+s:0));a[o]=h.USERAUTH_REQUEST,w(a,i,++o),a.utf8Write(e,o+=4,i),w(a,14,o+=i),a.utf8Write("ssh-connection",o+=4,14),w(a,8,o+=14),a.utf8Write("password",o+=4,8),a[o+=8]=+!!r,w(a,n,++o),Buffer.isBuffer(t)?I(t,a,0,n,o+=4):a.utf8Write(t,o+=4,n),r?(w(a,s,o+=n),Buffer.isBuffer(r)?I(r,a,0,s,o+=4):a.utf8Write(r,o+=4,s),this._debug&&this._debug("Outbound: Sending USERAUTH_REQUEST (changed password)")):this._debug&&this._debug("Outbound: Sending USERAUTH_REQUEST (password)"),this._authsQueue.push("password"),x(this,this._packetRW.write.finalize(a))}authPK(e,t,r,i){let n,s;if(this._server)throw Error("Client-only method called in server mode");if((t=E(t))instanceof Error)throw Error("Invalid key");let o=t.type;t=t.getPublicSSH(),"function"==typeof r&&(i=r,r=void 0),r||(r=o);let a=Buffer.byteLength(e),l=Buffer.byteLength(r),c=t.length,f=this._kex.sessionID,d=f.length,u=(i?4+d:0)+1+4+a+4+14+4+9+1+4+l+4+c;if(i?(w(n=Buffer.allocUnsafe(u),d,s=0),n.set(f,s+=4),s+=d):(n=this._packetRW.write.alloc(u),s=this._packetRW.write.allocStart),n[s]=h.USERAUTH_REQUEST,w(n,a,++s),n.utf8Write(e,s+=4,a),w(n,14,s+=a),n.utf8Write("ssh-connection",s+=4,14),w(n,9,s+=14),n.utf8Write("publickey",s+=4,9),n[s+=9]=+!!i,w(n,l,++s),n.utf8Write(r,s+=4,l),w(n,c,s+=l),n.set(t,s+=4),!i){this._authsQueue.push("publickey"),this._debug&&this._debug("Outbound: Sending USERAUTH_REQUEST (publickey -- check)"),x(this,this._packetRW.write.finalize(n));return}i(n,i=>{if(!1===(i=S(i,o)))throw Error("Error while converting handshake signature");let f=i.length;s=this._packetRW.write.allocStart,(n=this._packetRW.write.alloc(5+a+4+14+4+9+1+4+l+4+c+4+4+l+4+f))[s]=h.USERAUTH_REQUEST,w(n,a,++s),n.utf8Write(e,s+=4,a),w(n,14,s+=a),n.utf8Write("ssh-connection",s+=4,14),w(n,9,s+=14),n.utf8Write("publickey",s+=4,9),n[s+=9]=1,w(n,l,++s),n.utf8Write(r,s+=4,l),w(n,c,s+=l),n.set(t,s+=4),w(n,4+l+4+f,s+=c),w(n,l,s+=4),n.utf8Write(r,s+=4,l),w(n,f,s+=l),n.set(i,s+=4),this._authsQueue.push("publickey"),this._debug&&this._debug("Outbound: Sending USERAUTH_REQUEST (publickey)"),x(this,this._packetRW.write.finalize(n))})}authHostbased(e,t,r,i,n,s){if(this._server)throw Error("Client-only method called in server mode");if((t=E(t))instanceof Error)throw Error("Invalid key");let o=t.type;t=t.getPublicSSH(),"function"==typeof n&&(s=n,n=void 0),n||(n=o);let a=Buffer.byteLength(e),l=Buffer.byteLength(n),c=t.length,f=this._kex.sessionID,d=f.length,u=Buffer.byteLength(r),g=Buffer.byteLength(i),p=Buffer.allocUnsafe(4+d+1+4+a+4+14+4+9+4+l+4+c+4+u+4+g),A=0;w(p,d,0),p.set(f,A+=4),p[A+=d]=h.USERAUTH_REQUEST,w(p,a,++A),p.utf8Write(e,A+=4,a),w(p,14,A+=a),p.utf8Write("ssh-connection",A+=4,14),w(p,9,A+=14),p.utf8Write("hostbased",A+=4,9),w(p,l,A+=9),p.utf8Write(n,A+=4,l),w(p,c,A+=l),p.set(t,A+=4),w(p,u,A+=c),p.utf8Write(r,A+=4,u),w(p,g,A+=u),p.utf8Write(i,A+=4,g),s(p,e=>{if(!(e=S(e,o)))throw Error("Error while converting handshake signature");let t=e.length,r=p.length-d-4;A=this._packetRW.write.allocStart;let i=this._packetRW.write.alloc(r+4+4+l+4+t);I(p,i,4+d,p.length,A),w(i,4+l+4+t,A+=r),w(i,l,A+=4),i.utf8Write(n,A+=4,l),w(i,t,A+=l),i.set(e,A+=4),this._authsQueue.push("hostbased"),this._debug&&this._debug("Outbound: Sending USERAUTH_REQUEST (hostbased)"),x(this,this._packetRW.write.finalize(i))})}authKeyboard(e){if(this._server)throw Error("Client-only method called in server mode");let t=Buffer.byteLength(e),r=this._packetRW.write.allocStart,i=this._packetRW.write.alloc(5+t+4+14+4+20+4+4);i[r]=h.USERAUTH_REQUEST,w(i,t,++r),i.utf8Write(e,r+=4,t),w(i,14,r+=t),i.utf8Write("ssh-connection",r+=4,14),w(i,20,r+=14),i.utf8Write("keyboard-interactive",r+=4,20),w(i,0,r+=20),w(i,0,r+=4),this._authsQueue.push("keyboard-interactive"),this._debug&&this._debug("Outbound: Sending USERAUTH_REQUEST (keyboard-interactive)"),x(this,this._packetRW.write.finalize(i))}authNone(e){if(this._server)throw Error("Client-only method called in server mode");let t=Buffer.byteLength(e),r=this._packetRW.write.allocStart,i=this._packetRW.write.alloc(5+t+4+14+4+4);i[r]=h.USERAUTH_REQUEST,w(i,t,++r),i.utf8Write(e,r+=4,t),w(i,14,r+=t),i.utf8Write("ssh-connection",r+=4,14),w(i,4,r+=14),i.utf8Write("none",r+=4,4),this._authsQueue.push("none"),this._debug&&this._debug("Outbound: Sending USERAUTH_REQUEST (none)"),x(this,this._packetRW.write.finalize(i))}authInfoRes(e){let t;if(this._server)throw Error("Client-only method called in server mode");let r=0;if(e){t=Array(e.length);for(let i=0;i<e.length;++i){let n=Buffer.byteLength(e[i]);t[i]=n,r+=4+n}}let i=this._packetRW.write.allocStart,n=this._packetRW.write.alloc(5+r);if(n[i]=h.USERAUTH_INFO_RESPONSE,e){w(n,e.length,++i),i+=4;for(let r=0;r<e.length;++r){let s=t[r];w(n,s,i),i+=4,s&&(n.utf8Write(e[r],i,s),i+=s)}}else w(n,0,++i);this._debug&&this._debug("Outbound: Sending USERAUTH_INFO_RESPONSE"),x(this,this._packetRW.write.finalize(n))}tcpipForward(e,t,r){if(this._server)throw Error("Client-only method called in server mode");let i=Buffer.byteLength(e),n=this._packetRW.write.allocStart,s=this._packetRW.write.alloc(23+i+4);s[n]=h.GLOBAL_REQUEST,w(s,13,++n),s.utf8Write("tcpip-forward",n+=4,13),s[n+=13]=+(void 0===r||!0===r),w(s,i,++n),s.utf8Write(e,n+=4,i),w(s,t,n+=i),this._debug&&this._debug("Outbound: Sending GLOBAL_REQUEST (tcpip-forward)"),x(this,this._packetRW.write.finalize(s))}cancelTcpipForward(e,t,r){if(this._server)throw Error("Client-only method called in server mode");let i=Buffer.byteLength(e),n=this._packetRW.write.allocStart,s=this._packetRW.write.alloc(30+i+4);s[n]=h.GLOBAL_REQUEST,w(s,20,++n),s.utf8Write("cancel-tcpip-forward",n+=4,20),s[n+=20]=+(void 0===r||!0===r),w(s,i,++n),s.utf8Write(e,n+=4,i),w(s,t,n+=i),this._debug&&this._debug("Outbound: Sending GLOBAL_REQUEST (cancel-tcpip-forward)"),x(this,this._packetRW.write.finalize(s))}openssh_streamLocalForward(e,t){if(this._server)throw Error("Client-only method called in server mode");let r=Buffer.byteLength(e),i=this._packetRW.write.allocStart,n=this._packetRW.write.alloc(41+r);n[i]=h.GLOBAL_REQUEST,w(n,31,++i),n.utf8Write("streamlocal-forward@openssh.com",i+=4,31),n[i+=31]=+(void 0===t||!0===t),w(n,r,++i),n.utf8Write(e,i+=4,r),this._debug&&this._debug("Outbound: Sending GLOBAL_REQUEST (streamlocal-forward@openssh.com)"),x(this,this._packetRW.write.finalize(n))}openssh_cancelStreamLocalForward(e,t){if(this._server)throw Error("Client-only method called in server mode");let r=Buffer.byteLength(e),i=this._packetRW.write.allocStart,n=this._packetRW.write.alloc(48+r);n[i]=h.GLOBAL_REQUEST,w(n,38,++i),n.utf8Write("cancel-streamlocal-forward@openssh.com",i+=4,38),n[i+=38]=+(void 0===t||!0===t),w(n,r,++i),n.utf8Write(e,i+=4,r),this._debug&&this._debug("Outbound: Sending GLOBAL_REQUEST (cancel-streamlocal-forward@openssh.com)"),x(this,this._packetRW.write.finalize(n))}directTcpip(e,t,r,i){if(this._server)throw Error("Client-only method called in server mode");let n=Buffer.byteLength(i.srcIP),s=Buffer.byteLength(i.dstIP),o=this._packetRW.write.allocStart,a=this._packetRW.write.alloc(33+n+4+4+s+4);a[o]=h.CHANNEL_OPEN,w(a,12,++o),a.utf8Write("direct-tcpip",o+=4,12),w(a,e,o+=12),w(a,t,o+=4),w(a,r,o+=4),w(a,s,o+=4),a.utf8Write(i.dstIP,o+=4,s),w(a,i.dstPort,o+=s),w(a,n,o+=4),a.utf8Write(i.srcIP,o+=4,n),w(a,i.srcPort,o+=n),this._debug&&this._debug(`Outbound: Sending CHANNEL_OPEN (r:${e}, direct-tcpip)`),x(this,this._packetRW.write.finalize(a))}openssh_directStreamLocal(e,t,r,i){if(this._server)throw Error("Client-only method called in server mode");let n=Buffer.byteLength(i.socketPath),s=this._packetRW.write.allocStart,o=this._packetRW.write.alloc(51+n+4+4);o[s]=h.CHANNEL_OPEN,w(o,30,++s),o.utf8Write("direct-streamlocal@openssh.com",s+=4,30),w(o,e,s+=30),w(o,t,s+=4),w(o,r,s+=4),w(o,n,s+=4),o.utf8Write(i.socketPath,s+=4,n),y(o,0,s+=n,s+8),this._debug&&this._debug(`Outbound: Sending CHANNEL_OPEN (r:${e}, direct-streamlocal@openssh.com)`),x(this,this._packetRW.write.finalize(o))}openssh_noMoreSessions(e){if(this._server)throw Error("Client-only method called in server mode");let t=this._packetRW.write.allocStart,r=this._packetRW.write.alloc(34);r[t]=h.GLOBAL_REQUEST,w(r,28,++t),r.utf8Write("no-more-sessions@openssh.com",t+=4,28),r[t+=28]=+(void 0===e||!0===e),this._debug&&this._debug("Outbound: Sending GLOBAL_REQUEST (no-more-sessions@openssh.com)"),x(this,this._packetRW.write.finalize(r))}session(e,t,r){if(this._server)throw Error("Client-only method called in server mode");let i=this._packetRW.write.allocStart,n=this._packetRW.write.alloc(24);n[i]=h.CHANNEL_OPEN,w(n,7,++i),n.utf8Write("session",i+=4,7),w(n,e,i+=7),w(n,t,i+=4),w(n,r,i+=4),this._debug&&this._debug(`Outbound: Sending CHANNEL_OPEN (r:${e}, session)`),x(this,this._packetRW.write.finalize(n))}windowChange(e,t,r,i,n){if(this._server)throw Error("Client-only method called in server mode");let s=this._packetRW.write.allocStart,o=this._packetRW.write.alloc(39);o[s]=h.CHANNEL_REQUEST,w(o,e,++s),w(o,13,s+=4),o.utf8Write("window-change",s+=4,13),o[s+=13]=0,w(o,r,++s),w(o,t,s+=4),w(o,n,s+=4),w(o,i,s+=4),this._debug&&this._debug(`Outbound: Sending CHANNEL_REQUEST (r:${e}, window-change)`),x(this,this._packetRW.write.finalize(o))}pty(e,t,r,i,n,s,o,a){if(this._server)throw Error("Client-only method called in server mode");s&&s.length||(s="vt100"),!o||Buffer.isBuffer(o)||Array.isArray(o)||"object"!=typeof o||null===o||(o=function(e){let t=Object.keys(e),r=Buffer.allocUnsafe(5*t.length+1),i=0;for(let n=0;n<t.length;++n){let s=t[n];if("TTY_OP_END"===s)continue;let o=d[s];if(void 0===o)continue;let a=e[s];"number"==typeof a&&isFinite(a)&&(r[i++]=o,r[i++]=a>>>24,r[i++]=a>>>16,r[i++]=a>>>8,r[i++]=a)}return(r[i++]=d.TTY_OP_END,i<r.length)?m(r,0,i):r}(o)),o&&o.length||(o=O);let l=s.length,c=o.length,f=this._packetRW.write.allocStart,u=this._packetRW.write.alloc(21+l+4+4+4+4+4+c);if(u[f]=h.CHANNEL_REQUEST,w(u,e,++f),w(u,7,f+=4),u.utf8Write("pty-req",f+=4,7),u[f+=7]=+(void 0===a||!0===a),w(u,l,++f),u.utf8Write(s,f+=4,l),w(u,r,f+=l),w(u,t,f+=4),w(u,n,f+=4),w(u,i,f+=4),w(u,c,f+=4),f+=4,Array.isArray(o))for(let e=0;e<c;++e)u[f++]=o[e];else Buffer.isBuffer(o)&&u.set(o,f);this._debug&&this._debug(`Outbound: Sending CHANNEL_REQUEST (r:${e}, pty-req)`),x(this,this._packetRW.write.finalize(u))}shell(e,t){if(this._server)throw Error("Client-only method called in server mode");let r=this._packetRW.write.allocStart,i=this._packetRW.write.alloc(15);i[r]=h.CHANNEL_REQUEST,w(i,e,++r),w(i,5,r+=4),i.utf8Write("shell",r+=4,5),i[r+=5]=+(void 0===t||!0===t),this._debug&&this._debug(`Outbound: Sending CHANNEL_REQUEST (r:${e}, shell)`),x(this,this._packetRW.write.finalize(i))}exec(e,t,r){if(this._server)throw Error("Client-only method called in server mode");let i=Buffer.isBuffer(t),n=i?t.length:Buffer.byteLength(t),s=this._packetRW.write.allocStart,o=this._packetRW.write.alloc(18+n);o[s]=h.CHANNEL_REQUEST,w(o,e,++s),w(o,4,s+=4),o.utf8Write("exec",s+=4,4),o[s+=4]=+(void 0===r||!0===r),w(o,n,++s),i?o.set(t,s+=4):o.utf8Write(t,s+=4,n),this._debug&&this._debug(`Outbound: Sending CHANNEL_REQUEST (r:${e}, exec: ${t})`),x(this,this._packetRW.write.finalize(o))}signal(e,t){if(this._server)throw Error("Client-only method called in server mode");let r=t;if("SIG"===(t=t.toUpperCase()).slice(0,3)&&(t=t.slice(3)),1!==f[t])throw Error(`Invalid signal: ${r}`);let i=t.length,n=this._packetRW.write.allocStart,s=this._packetRW.write.alloc(20+i);s[n]=h.CHANNEL_REQUEST,w(s,e,++n),w(s,6,n+=4),s.utf8Write("signal",n+=4,6),s[n+=6]=0,w(s,i,++n),s.utf8Write(t,n+=4,i),this._debug&&this._debug(`Outbound: Sending CHANNEL_REQUEST (r:${e}, signal: ${t})`),x(this,this._packetRW.write.finalize(s))}env(e,t,r,i){if(this._server)throw Error("Client-only method called in server mode");let n=Buffer.byteLength(t),s=Buffer.isBuffer(r),o=s?r.length:Buffer.byteLength(r),a=this._packetRW.write.allocStart,l=this._packetRW.write.alloc(17+n+4+o);l[a]=h.CHANNEL_REQUEST,w(l,e,++a),w(l,3,a+=4),l.utf8Write("env",a+=4,3),l[a+=3]=+(void 0===i||!0===i),w(l,n,++a),l.utf8Write(t,a+=4,n),w(l,o,a+=n),s?l.set(r,a+=4):l.utf8Write(r,a+=4,o),this._debug&&this._debug(`Outbound: Sending CHANNEL_REQUEST (r:${e}, env: ${t}=${r})`),x(this,this._packetRW.write.finalize(l))}x11Forward(e,t,r){if(this._server)throw Error("Client-only method called in server mode");let i=t.protocol,n=t.cookie,s=Buffer.isBuffer(i),o=s?i.length:Buffer.byteLength(i),a=Buffer.isBuffer(n),l=a?n.length:Buffer.byteLength(n),c=this._packetRW.write.allocStart,f=this._packetRW.write.alloc(22+o+4+l+4);f[c]=h.CHANNEL_REQUEST,w(f,e,++c),w(f,7,c+=4),f.utf8Write("x11-req",c+=4,7),f[c+=7]=+(void 0===r||!0===r),f[++c]=+!!t.single,w(f,o,++c),s?f.set(i,c+=4):f.utf8Write(i,c+=4,o),w(f,l,c+=o),a?f.set(n,c+=4):f.latin1Write(n,c+=4,l),w(f,t.screen||0,c+=l),this._debug&&this._debug(`Outbound: Sending CHANNEL_REQUEST (r:${e}, x11-req)`),x(this,this._packetRW.write.finalize(f))}subsystem(e,t,r){if(this._server)throw Error("Client-only method called in server mode");let i=Buffer.byteLength(t),n=this._packetRW.write.allocStart,s=this._packetRW.write.alloc(23+i);s[n]=h.CHANNEL_REQUEST,w(s,e,++n),w(s,9,n+=4),s.utf8Write("subsystem",n+=4,9),s[n+=9]=+(void 0===r||!0===r),w(s,i,++n),s.utf8Write(t,n+=4,i),this._debug&&this._debug(`Outbound: Sending CHANNEL_REQUEST (r:${e}, subsystem: ${t})`),x(this,this._packetRW.write.finalize(s))}openssh_agentForward(e,t){if(this._server)throw Error("Client-only method called in server mode");let r=this._packetRW.write.allocStart,i=this._packetRW.write.alloc(36);i[r]=h.CHANNEL_REQUEST,w(i,e,++r),w(i,26,r+=4),i.utf8Write("auth-agent-req@openssh.com",r+=4,26),i[r+=26]=+(void 0===t||!0===t),this._debug&&this._debug(`Outbound: Sending CHANNEL_REQUEST (r:${e}, auth-agent-req@openssh.com)`),x(this,this._packetRW.write.finalize(i))}openssh_hostKeysProve(e){if(this._server)throw Error("Client-only method called in server mode");let t=0,r=[];for(let i of e){let e=i.getPublicSSH();t+=4+e.length,r.push(e)}let i=this._packetRW.write.allocStart,n=this._packetRW.write.alloc(35+t);for(let e of(n[i]=h.GLOBAL_REQUEST,w(n,29,++i),n.utf8Write("hostkeys-prove-00@openssh.com",i+=4,29),n[i+=29]=1,++i,r))w(n,e.length,i),I(e,n,0,e.length,i+=4),i+=e.length;this._debug&&this._debug("Outbound: Sending GLOBAL_REQUEST (hostkeys-prove-00@openssh.com)"),x(this,this._packetRW.write.finalize(n))}serviceAccept(e){if(!this._server)throw Error("Server-only method called in client mode");let t=Buffer.byteLength(e),r=this._packetRW.write.allocStart,i=this._packetRW.write.alloc(5+t);if(i[r]=h.SERVICE_ACCEPT,w(i,t,++r),i.utf8Write(e,r+=4,t),this._debug&&this._debug(`Outbound: Sending SERVICE_ACCEPT (${e})`),x(this,this._packetRW.write.finalize(i)),this._server&&this._banner&&"ssh-userauth"===e){let e=this._banner;this._banner=void 0;let t=Buffer.byteLength(e);r=this._packetRW.write.allocStart;let i=this._packetRW.write.alloc(5+t+4);i[r]=h.USERAUTH_BANNER,w(i,t,++r),i.utf8Write(e,r+=4,t),w(i,0,r+=t),this._debug&&this._debug("Outbound: Sending USERAUTH_BANNER"),x(this,this._packetRW.write.finalize(i))}}forwardedTcpip(e,t,r,i){if(!this._server)throw Error("Server-only method called in client mode");let n=Buffer.byteLength(i.boundAddr),s=Buffer.byteLength(i.remoteAddr),o=this._packetRW.write.allocStart,a=this._packetRW.write.alloc(36+n+4+4+s+4);a[o]=h.CHANNEL_OPEN,w(a,15,++o),a.utf8Write("forwarded-tcpip",o+=4,15),w(a,e,o+=15),w(a,t,o+=4),w(a,r,o+=4),w(a,n,o+=4),a.utf8Write(i.boundAddr,o+=4,n),w(a,i.boundPort,o+=n),w(a,s,o+=4),a.utf8Write(i.remoteAddr,o+=4,s),w(a,i.remotePort,o+=s),this._debug&&this._debug(`Outbound: Sending CHANNEL_OPEN (r:${e}, forwarded-tcpip)`),x(this,this._packetRW.write.finalize(a))}x11(e,t,r,i){if(!this._server)throw Error("Server-only method called in client mode");let n=Buffer.byteLength(i.originAddr),s=this._packetRW.write.allocStart,o=this._packetRW.write.alloc(24+n+4);o[s]=h.CHANNEL_OPEN,w(o,3,++s),o.utf8Write("x11",s+=4,3),w(o,e,s+=3),w(o,t,s+=4),w(o,r,s+=4),w(o,n,s+=4),o.utf8Write(i.originAddr,s+=4,n),w(o,i.originPort,s+=n),this._debug&&this._debug(`Outbound: Sending CHANNEL_OPEN (r:${e}, x11)`),x(this,this._packetRW.write.finalize(o))}openssh_authAgent(e,t,r){if(!this._server)throw Error("Server-only method called in client mode");let i=this._packetRW.write.allocStart,n=this._packetRW.write.alloc(39);n[i]=h.CHANNEL_OPEN,w(n,22,++i),n.utf8Write("auth-agent@openssh.com",i+=4,22),w(n,e,i+=22),w(n,t,i+=4),w(n,r,i+=4),this._debug&&this._debug(`Outbound: Sending CHANNEL_OPEN (r:${e}, auth-agent@openssh.com)`),x(this,this._packetRW.write.finalize(n))}openssh_forwardedStreamLocal(e,t,r,i){if(!this._server)throw Error("Server-only method called in client mode");let n=Buffer.byteLength(i.socketPath),s=this._packetRW.write.allocStart,o=this._packetRW.write.alloc(54+n+4);o[s]=h.CHANNEL_OPEN,w(o,33,++s),o.utf8Write("forwarded-streamlocal@openssh.com",s+=4,33),w(o,e,s+=33),w(o,t,s+=4),w(o,r,s+=4),w(o,n,s+=4),o.utf8Write(i.socketPath,s+=4,n),w(o,0,s+=n),this._debug&&this._debug(`Outbound: Sending CHANNEL_OPEN (r:${e}, forwarded-streamlocal@openssh.com)`),x(this,this._packetRW.write.finalize(o))}exitStatus(e,t){if(!this._server)throw Error("Server-only method called in client mode");let r=this._packetRW.write.allocStart,i=this._packetRW.write.alloc(25);i[r]=h.CHANNEL_REQUEST,w(i,e,++r),w(i,11,r+=4),i.utf8Write("exit-status",r+=4,11),i[r+=11]=0,w(i,t,++r),this._debug&&this._debug(`Outbound: Sending CHANNEL_REQUEST (r:${e}, exit-status: ${t})`),x(this,this._packetRW.write.finalize(i))}exitSignal(e,t,r,i){if(!this._server)throw Error("Server-only method called in client mode");if("string"!=typeof t||!t)throw Error(`Invalid signal: ${t}`);let n=t.toUpperCase();if("SIG"===n.slice(0,3)&&(n=n.slice(3)),1!==f[n])throw Error(`Invalid signal: ${t}`);let s=Buffer.byteLength(n),o=i?Buffer.byteLength(i):0,a=this._packetRW.write.allocStart,l=this._packetRW.write.alloc(25+s+1+4+o+4);l[a]=h.CHANNEL_REQUEST,w(l,e,++a),w(l,11,a+=4),l.utf8Write("exit-signal",a+=4,11),l[a+=11]=0,w(l,s,++a),l.utf8Write(n,a+=4,s),l[a+=s]=+!!r,w(l,o,++a),a+=4,o&&(l.utf8Write(i,a,o),a+=o),w(l,0,a),this._debug&&this._debug(`Outbound: Sending CHANNEL_REQUEST (r:${e}, exit-signal: ${t})`),x(this,this._packetRW.write.finalize(l))}authFailure(e,t){let r;if(!this._server)throw Error("Server-only method called in client mode");if(0===this._authsQueue.length)throw Error("No auth in progress");if("boolean"==typeof e&&(t=e,e=void 0),e){r=[];for(let t=0;t<e.length;++t)"none"!==e[t].toLowerCase()&&r.push(e[t]);r=r.join(",")}else r="";let i=r.length,n=this._packetRW.write.allocStart,s=this._packetRW.write.alloc(5+i+1);s[n]=h.USERAUTH_FAILURE,w(s,i,++n),s.utf8Write(r,n+=4,i),s[n+=i]=+(!0===t),this._authsQueue.shift(),this._debug&&this._debug("Outbound: Sending USERAUTH_FAILURE"),x(this,this._packetRW.write.finalize(s))}authSuccess(){if(!this._server)throw Error("Server-only method called in client mode");if(0===this._authsQueue.length)throw Error("No auth in progress");let e=this._packetRW.write.allocStart,t=this._packetRW.write.alloc(1);t[e]=h.USERAUTH_SUCCESS,this._authsQueue.shift(),this._authenticated=!0,this._debug&&this._debug("Outbound: Sending USERAUTH_SUCCESS"),x(this,this._packetRW.write.finalize(t)),"zlib@openssh.com"===this._kex.negotiated.cs.compress&&(this._packetRW.read=new B),"zlib@openssh.com"===this._kex.negotiated.sc.compress&&(this._packetRW.write=new k(this))}authPKOK(e,t){if(!this._server)throw Error("Server-only method called in client mode");if(0===this._authsQueue.length||"publickey"!==this._authsQueue[0])throw Error('"publickey" auth not in progress');let r=Buffer.byteLength(e),i=t.length,n=this._packetRW.write.allocStart,s=this._packetRW.write.alloc(5+r+4+i);s[n]=h.USERAUTH_PK_OK,w(s,r,++n),s.utf8Write(e,n+=4,r),w(s,i,n+=r),s.set(t,n+=4),this._authsQueue.shift(),this._debug&&this._debug("Outbound: Sending USERAUTH_PK_OK"),x(this,this._packetRW.write.finalize(s))}authPasswdChg(e){if(!this._server)throw Error("Server-only method called in client mode");let t=Buffer.byteLength(e),r=this._packetRW.write.allocStart,i=this._packetRW.write.alloc(5+t+4);i[r]=h.USERAUTH_PASSWD_CHANGEREQ,w(i,t,++r),i.utf8Write(e,r+=4,t),w(i,0,r+=t),this._debug&&this._debug("Outbound: Sending USERAUTH_PASSWD_CHANGEREQ"),x(this,this._packetRW.write.finalize(i))}authInfoReq(e,t,r){if(!this._server)throw Error("Server-only method called in client mode");let i=0,n=e?Buffer.byteLength(e):0,s=t?Buffer.byteLength(t):0;for(let e=0;e<r.length;++e)i+=4+Buffer.byteLength(r[e].prompt)+1;let o=this._packetRW.write.allocStart,a=this._packetRW.write.alloc(5+n+4+s+4+4+i);a[o]=h.USERAUTH_INFO_REQUEST,w(a,n,++o),o+=4,e&&(a.utf8Write(e,o,n),o+=n),w(a,s,o),o+=4,t&&(a.utf8Write(t,o,s),o+=s),w(a,0,o),w(a,r.length,o+=4),o+=4;for(let e=0;e<r.length;++e){let t=r[e],i=Buffer.byteLength(t.prompt);w(a,i,o),o+=4,i&&(a.utf8Write(t.prompt,o,i),o+=i),a[o++]=+!!t.echo}this._debug&&this._debug("Outbound: Sending USERAUTH_INFO_REQUEST"),x(this,this._packetRW.write.finalize(a))}}},830754,(e,t,r)=>{"use strict";let i=e.r(449719),{inspect:n}=e.r(224361);function s(e){let t="",r=e.length,i=+("-"===e[0]);for(;r>=i+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function o(e,t){if(i("string"==typeof t,"`thing` has to be of type string"),Array.isArray(e)){let r=e.length;return(i(r>0,"At least one expected value needs to be specified"),e=e.map(e=>String(e)),r>2)?`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]:2===r?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}return`of ${t} ${String(e)}`}r.ERR_INTERNAL_ASSERTION=class e extends Error{constructor(t){super(),Error.captureStackTrace(this,e);const r="This is caused by either a bug in ssh2 or incorrect usage of ssh2 internals.\nPlease open an issue with this stack trace at https://github.com/mscdex/ssh2/issues\n";this.message=void 0===t?r:`${t}
6
+ ${r}`}};let a=(()=>{try{return Function("return 2n ** 32n")()}catch{}})();r.ERR_OUT_OF_RANGE=class e extends RangeError{constructor(t,r,o,l){let c;super(),Error.captureStackTrace(this,e),i(r,'Missing "range" argument');let h=l?t:`The value of "${t}" is out of range.`;Number.isInteger(o)&&Math.abs(o)>0x100000000?c=s(String(o)):"bigint"==typeof o?(c=String(o),(o>a||o<-a)&&(c=s(c)),c+="n"):c=n(o),h+=` It must be ${r}. Received ${c}`,this.message=h}};class l extends TypeError{constructor(e,t,r){let n,s;if(super(),Error.captureStackTrace(this,l),i("string"==typeof e,"'name' must be a string"),"string"==typeof t&&t.startsWith("not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be",e.endsWith(" argument"))s=`The ${e} ${n} ${o(t,"type")}`;else{const r=e.includes(".")?"property":"argument";s=`The "${e}" ${r} ${n} ${o(t,"type")}`}s+=`. Received type ${typeof r}`,this.message=s}}r.ERR_INVALID_ARG_TYPE=l,r.validateNumber=function(e,t){if("number"!=typeof e)throw new l(t,"number",e)}},740731,(e,t,r)=>{"use strict";let i,n,s=e.r(427699),o=e.r(522734),{constants:a}=o,{Readable:l,Writable:c}=e.r(688947),{inherits:h,types:{isDate:f}}=e.r(224361),d=Buffer[Symbol.species],{bufferCopy:u,bufferSlice:g,makeBufferParser:p,writeUInt32BE:A}=e.r(69253),_=Buffer.alloc(28),E={OK:0,EOF:1,NO_SUCH_FILE:2,PERMISSION_DENIED:3,FAILURE:4,BAD_MESSAGE:5,NO_CONNECTION:6,CONNECTION_LOST:7,OP_UNSUPPORTED:8},b=new Map(Object.values(E).map(e=>[e,1])),I={[E.OK]:"No error",[E.EOF]:"End of file",[E.NO_SUCH_FILE]:"No such file or directory",[E.PERMISSION_DENIED]:"Permission denied",[E.FAILURE]:"Failure",[E.BAD_MESSAGE]:"Bad message",[E.NO_CONNECTION]:"No connection",[E.CONNECTION_LOST]:"Connection lost",[E.OP_UNSUPPORTED]:"Operation unsupported"},y={READ:1,WRITE:2,APPEND:4,CREAT:8,TRUNC:16,EXCL:32},m=0x100000000-1,S=Buffer.from([0,0,0,5,1,0,0,0,3]),x=Buffer.from([0,0,0,5,2,0,0,0,3]),w=/^SSH-2.0-(?:OpenSSH|dropbear)/,v=p(),C={readable:!1,writable:!1,push:e=>{},once:()=>{},on:()=>{},emit:()=>{},end:()=>{}};function B(){}function k(e,t,r,i,n,s){let a,l,c,h,f,d,u,g=64,p=32768;"function"==typeof n?s=n:"object"==typeof n&&null!==n&&("number"==typeof n.concurrency&&n.concurrency>0&&!isNaN(n.concurrency)&&(g=n.concurrency),"number"==typeof n.chunkSize&&n.chunkSize>0&&!isNaN(n.chunkSize)&&(p=n.chunkSize),"number"==typeof n.fileSize&&n.fileSize>0&&!isNaN(n.fileSize)&&(c=n.fileSize),"function"==typeof n.step&&(a=n.step),("string"==typeof n.mode||"number"==typeof n.mode)&&(l=U(n.mode)));let A=0,_=0,E=!1,b=p*g;function I(r){let i;if(E)return;E=!0;let n=0;f||d?(i=()=>{0==--n&&s(r)},f&&(e===o||"open"===e.outgoing.state)&&++n,d&&(t===o||"open"===t.outgoing.state)&&++n,f&&(e===o||"open"===e.outgoing.state)&&e.close(f,i),d&&(t===o||"open"===t.outgoing.state)&&t.close(d,i)):s(r)}e.open(r,"r",(n,E)=>{if(n)return I(n);function y(n,c){if(n)return e!==o?void e.stat(r,(e,t)=>{if(e)return I(n);y(null,t)}):I(n);h=c.size,t.open(i,"w",(r,n)=>{if(r)return I(r);if(d=n,h<=0)return I();for(;b>h;){if(1===g){b=h;break}b-=p,--g}if((u=function(e){try{return Buffer.allocUnsafe(e)}catch(e){return e}}(b))instanceof Error)return I(u);void 0!==l?t.fchmod(d,l,function e(r){r?t.chmod(i,l,t=>e()):o()}):o();function o(){let r=0,i=0;for(;A<h&&r<g;){let n=A+p>h?h-A:p;(function r(i,n,o){e.read(f,u,i,o,n,(l,c,g)=>{!function(i,n,o,l,c){if(i)return I(i);l=l||0,t.write(d,u,l,n,o,function(i){if(i)return I(i);if(_+=n,a&&a(_,n,h),n<c)return r(l,o+n,c-n);if(_===h)return void t.close(d,t=>{if(d=void 0,t)return I(t);e.close(f,e=>{if(f=void 0,e)return I(e);s()})});if(A>=h)return;let u=A+p>h?h-A:p;r(l,A,u),A+=u})}(l,c,n,i,o)})})(i,A,n),i+=n,A+=n,++r}}})}f=E,void 0===c?e.fstat(f,y):y(null,{size:c})})}function R(e,t,r,i,n,s,o){let a="function"==typeof o?o:void 0;e.write(t,r,i,n,s,(o,l)=>{if(o)return e.close(t,()=>{a&&a(o)});l===n?e.close(t,a):(i+=l,n-=l,s+=l,R(e,t,r,i,n,s,a))})}class N{constructor(e){this.mode=e&&e.mode,this.uid=e&&e.uid,this.gid=e&&e.gid,this.size=e&&e.size,this.atime=e&&e.atime,this.mtime=e&&e.mtime,this.extended=e&&e.extended}isDirectory(){return(this.mode&a.S_IFMT)===a.S_IFDIR}isFile(){return(this.mode&a.S_IFMT)===a.S_IFREG}isBlockDevice(){return(this.mode&a.S_IFMT)===a.S_IFBLK}isCharacterDevice(){return(this.mode&a.S_IFMT)===a.S_IFCHR}isSymbolicLink(){return(this.mode&a.S_IFMT)===a.S_IFLNK}isFIFO(){return(this.mode&a.S_IFMT)===a.S_IFIFO}isSocket(){return(this.mode&a.S_IFMT)===a.S_IFSOCK}}function T(e){let t=0,r=0;if("object"==typeof e&&null!==e){if("number"==typeof e.size){t|=1;let i=e.size;_[r++]=i/0x100000000000000,_[r++]=i/0x1000000000000,_[r++]=i/0x10000000000,_[r++]=i/0x100000000,_[r++]=i/0x1000000,_[r++]=i/65536,_[r++]=i/256,_[r++]=i}if("number"==typeof e.uid&&"number"==typeof e.gid){t|=2;let i=e.uid,n=e.gid;_[r++]=i>>>24,_[r++]=i>>>16,_[r++]=i>>>8,_[r++]=i,_[r++]=n>>>24,_[r++]=n>>>16,_[r++]=n>>>8,_[r++]=n}if("number"==typeof e.mode||"string"==typeof e.mode){let i=U(e.mode);t|=4,_[r++]=i>>>24,_[r++]=i>>>16,_[r++]=i>>>8,_[r++]=i}if(("number"==typeof e.atime||f(e.atime))&&("number"==typeof e.mtime||f(e.mtime))){let i=L(e.atime),n=L(e.mtime);t|=8,_[r++]=i>>>24,_[r++]=i>>>16,_[r++]=i>>>8,_[r++]=i,_[r++]=n>>>24,_[r++]=n>>>16,_[r++]=n>>>8,_[r++]=n}}return{flags:t,nb:r}}function L(e){if("number"==typeof e&&e==e)return e;if(f(e))return parseInt(e.getTime()/1e3,10);throw Error(`Cannot parse time: ${e}`)}function U(e){if("number"==typeof e&&e==e)return e;if("string"==typeof e)return U(parseInt(e,8));throw Error(`Cannot parse mode: ${e}`)}let O={r:y.READ,"r+":y.READ|y.WRITE,w:y.TRUNC|y.CREAT|y.WRITE,wx:y.TRUNC|y.CREAT|y.WRITE|y.EXCL,xw:y.TRUNC|y.CREAT|y.WRITE|y.EXCL,"w+":y.TRUNC|y.CREAT|y.READ|y.WRITE,"wx+":y.TRUNC|y.CREAT|y.READ|y.WRITE|y.EXCL,"xw+":y.TRUNC|y.CREAT|y.READ|y.WRITE|y.EXCL,a:y.APPEND|y.CREAT|y.WRITE,ax:y.APPEND|y.CREAT|y.WRITE|y.EXCL,xa:y.APPEND|y.CREAT|y.WRITE|y.EXCL,"a+":y.APPEND|y.CREAT|y.READ|y.WRITE,"ax+":y.APPEND|y.CREAT|y.READ|y.WRITE|y.EXCL,"xa+":y.APPEND|y.CREAT|y.READ|y.WRITE|y.EXCL};function P(e){let t=O[e];return void 0!==t?t:null}let Q=(n=Object.keys(O),e=>{for(let t=0;t<n.length;++t){let r=n[t];if(O[r]===e)return r}return null});function D(e){let t=v.readUInt32BE();if(void 0===t)return;let r=new N;if(1&t){let t=v.readUInt64BE(e);if(void 0===t)return;r.size=t}if(2&t){let e=v.readUInt32BE(),t=v.readUInt32BE();if(void 0===t)return;r.uid=e,r.gid=t}if(4&t){let e=v.readUInt32BE();if(void 0===e)return;r.mode=e}if(8&t){let e=v.readUInt32BE(),t=v.readUInt32BE();if(void 0===t)return;r.atime=e,r.mtime=t}if(0x80000000&t){let e=v.readUInt32BE();if(void 0===e)return;let t={};for(let r=0;r<e;++r){let e=v.readString(!0),r=v.readString();if(void 0===r)return;t[e]=r}r.extended=t}return r}function H(e,t){let r=F(e,t);return void 0===r||(e._buffer.push(r),!1)}function F(e,t){let r,i=e.outgoing;if("open"!==i.state)return;if(0===i.window)return e._waitWindow=!0,e._chunkcb=M,t;let n=t.length,s=0;for(;n-s>0&&i.window>0;){let r=Math.min(n-s,i.window,i.packetSize);i.window-=r,0===i.window&&(e._waitWindow=!0,e._chunkcb=M),0===s&&r===n?e._protocol.channelData(e.outgoing.id,t):e._protocol.channelData(e.outgoing.id,g(t,s,s+r)),s+=r}return n-s>0&&(r=s>0?g(t,s,n):t),r}function M(){this._chunkcb=void 0;let e=this._buffer,t=0;for(;t<e.length;){let r=e[t],i=F(this,r);if(void 0!==i){i!==r&&(e[t]=i),t>0&&(this._buffer=e.slice(t));return}++t}t>0&&(this._buffer=[])}function K(e,t,r){let i=Error(t);return i.level="sftp-protocol",!r&&e._debug&&e._debug(`SFTP: Inbound: ${t}`),e.emit("error",i),e.destroy(),W(e),!1}function W(e){let t=Object.keys(e._requests);if(0===t.length)return;let r=e._requests;e._requests={};let i=Error("No response from server");for(let e=0;e<t.length;++e){let n=r[t[e]];"function"==typeof n.cb&&n.cb(i)}}let q={2:(e,t)=>{if(-1!==e._version)return K(e,"Duplicate VERSION packet");let r={};v.init(t,1);let i=v.readUInt32BE();for(;v.avail();){let e=v.readString(!0),t=v.readString(!0);if(void 0===t){i=void 0;break}r[e]=t}if(v.clear(),void 0===i)return K(e,"Malformed VERSION packet");if(e._debug){let t=Object.keys(r);t.length?e._debug(`SFTP: Inbound: Received VERSION (v${i}, exts:${t})`):e._debug(`SFTP: Inbound: Received VERSION (v${i})`)}if(e._version=i,e._extensions=r,"1"===r["limits@openssh.com"]){var n;let t,r,i,s;return n=(t,r)=>{t||(r.maxPktLen>0&&(e._maxOutPktLen=r.maxPktLen),r.maxReadLen>0&&(e._maxReadLen=r.maxReadLen),r.maxWriteLen>0&&(e._maxWriteLen=r.maxWriteLen),e.maxOpenHandles=r.maxOpenHandles>0?r.maxOpenHandles:1/0),e.emit("ready")},t=9,A(r=Buffer.allocUnsafe(31),r.length-4,0),r[4]=200,A(r,i=e._writeReqid=e._writeReqid+1&m,5),A(r,18,t),r.utf8Write("limits@openssh.com",t+=4,18),e._requests[i]={extended:"limits@openssh.com",cb:n},s=H(e,r),void(e._debug&&e._debug(`SFTP: Outbound: ${s?"Buffered":"Sending"} limits@openssh.com`))}e.emit("ready")},101:(e,t)=>{v.init(t,1);let r=v.readUInt32BE(),i=v.readUInt32BE(),n=v.readString(!0);if(v.clear(),e._debug){let t=JSON.stringify(n);e._debug(`SFTP: Inbound: Received STATUS (id:${r}, ${i}, ${t})`)}let s=e._requests[r];if(delete e._requests[r],s&&"function"==typeof s.cb){if(i===E.OK)return void s.cb();let e=Error(n||I[i]||"Unknown status");e.code=i,s.cb(e)}},102:(e,t)=>{v.init(t,1);let r=v.readUInt32BE(),i=v.readString();if(v.clear(),void 0===i)return void 0!==r&&delete e._requests[r],K(e,"Malformed HANDLE packet");e._debug&&e._debug(`SFTP: Inbound: Received HANDLE (id:${r})`);let n=e._requests[r];delete e._requests[r],n&&"function"==typeof n.cb&&n.cb(void 0,i)},103:(e,t)=>{let r;v.init(t,1);let i=v.readUInt32BE();if(void 0!==i&&(r=e._requests[i],delete e._requests[i]),r&&"function"==typeof r.cb)if(r.buffer){let t=v.readString(r.buffer);if(v.clear(),void 0!==t){e._debug&&e._debug(`SFTP: Inbound: Received DATA (id:${i}, ${t})`),r.cb(void 0,r.buffer,t);return}}else{let t=v.readString();if(v.clear(),void 0!==t){e._debug&&e._debug(`SFTP: Inbound: Received DATA (id:${i}, ${t.length})`),r.cb(void 0,t);return}}else{let t=v.skipString();if(v.clear(),void 0!==t){e._debug&&e._debug(`SFTP: Inbound: Received DATA (id:${i}, ${t})`);return}}return K(e,"Malformed DATA packet")},104:(e,t)=>{let r;v.init(t,1);let i=v.readUInt32BE();void 0!==i&&(r=e._requests[i],delete e._requests[i]);let n=v.readUInt32BE();if(void 0!==n){let t=[];for(let r=0;r<n;++r){let r=v.readString(!0),i=v.readString(!0),n=D(e._biOpt);if(void 0===n){t=void 0;break}t.push({filename:r,longname:i,attrs:n})}if(void 0!==t){e._debug&&e._debug(`SFTP: Inbound: Received NAME (id:${i}, ${t.length})`),v.clear(),r&&"function"==typeof r.cb&&r.cb(void 0,t);return}}return v.clear(),K(e,"Malformed NAME packet")},105:(e,t)=>{let r;v.init(t,1);let i=v.readUInt32BE();void 0!==i&&(r=e._requests[i],delete e._requests[i]);let n=D(e._biOpt);if(v.clear(),void 0!==n){e._debug&&e._debug(`SFTP: Inbound: Received ATTRS (id:${i})`),r&&"function"==typeof r.cb&&r.cb(void 0,n);return}return K(e,"Malformed ATTRS packet")},201:(e,t)=>{v.init(t,1);let r=v.readUInt32BE();if(void 0!==r){let t=e._requests[r];if(t)switch(delete e._requests[r],t.extended){case"statvfs@openssh.com":case"fstatvfs@openssh.com":{let i=e._biOpt,n={f_bsize:v.readUInt64BE(i),f_frsize:v.readUInt64BE(i),f_blocks:v.readUInt64BE(i),f_bfree:v.readUInt64BE(i),f_bavail:v.readUInt64BE(i),f_files:v.readUInt64BE(i),f_ffree:v.readUInt64BE(i),f_favail:v.readUInt64BE(i),f_sid:v.readUInt64BE(i),f_flag:v.readUInt64BE(i),f_namemax:v.readUInt64BE(i)};if(void 0===n.f_namemax)break;e._debug&&e._debug(`SFTP: Inbound: Received EXTENDED_REPLY (id:${r}, ${t.extended})`),v.clear(),"function"==typeof t.cb&&t.cb(void 0,n);return}case"limits@openssh.com":{let i={maxPktLen:v.readUInt64BE(),maxReadLen:v.readUInt64BE(),maxWriteLen:v.readUInt64BE(),maxOpenHandles:v.readUInt64BE()};if(void 0===i.maxOpenHandles)break;e._debug&&e._debug(`SFTP: Inbound: Received EXTENDED_REPLY (id:${r}, ${t.extended})`),v.clear(),"function"==typeof t.cb&&t.cb(void 0,i);return}case"users-groups-by-id@openssh.com":{let i=v.readUInt32BE();if(void 0===i)break;let n=Array(i);for(let e=0;e<n.length;++e)n[e]=v.readString(!0);let s=v.readUInt32BE();if(void 0===s)break;let o=Array(s);for(let e=0;e<o.length;++e)o[e]=v.readString(!0);if(o.length>0&&void 0===o[o.length-1])break;e._debug&&e._debug(`SFTP: Inbound: Received EXTENDED_REPLY (id:${r}, ${t.extended})`),v.clear(),"function"==typeof t.cb&&t.cb(void 0,n,o);return}default:e._debug&&e._debug(`SFTP: Inbound: Received EXTENDED_REPLY (id:${r}, ???)`),v.clear(),"function"==typeof t.cb&&t.cb();return}else{e._debug&&e._debug(`SFTP: Inbound: Received EXTENDED_REPLY (id:${r}, ???)`),v.clear();return}}return v.clear(),K(e,"Malformed EXTENDED_REPLY packet")}},$={1:(e,t)=>{if(-1!==e._version)return K(e,"Duplicate INIT packet");let r={};v.init(t,1);let i=v.readUInt32BE();for(;v.avail();){let e=v.readString(!0),t=v.readString(!0);if(void 0===t){i=void 0;break}r[e]=t}if(v.clear(),void 0===i)return K(e,"Malformed INIT packet");if(e._debug){let t=Object.keys(r);t.length?e._debug(`SFTP: Inbound: Received INIT (v${i}, exts:${t})`):e._debug(`SFTP: Inbound: Received INIT (v${i})`)}H(e,x),e._version=i,e._extensions=r,e.emit("ready")},3:(e,t)=>{v.init(t,1);let r=v.readUInt32BE(),i=v.readString(!0),n=v.readUInt32BE(),s=D(e._biOpt);if(v.clear(),void 0===s)return K(e,"Malformed OPEN packet");e._debug&&e._debug(`SFTP: Inbound: Received OPEN (id:${r})`),e.emit("OPEN",r,i,n,s)||e.status(r,E.OP_UNSUPPORTED)},4:(e,t)=>{v.init(t,1);let r=v.readUInt32BE(),i=v.readString();if(v.clear(),void 0===i||i.length>256)return K(e,"Malformed CLOSE packet");e._debug&&e._debug(`SFTP: Inbound: Received CLOSE (id:${r})`),e.emit("CLOSE",r,i)||e.status(r,E.OP_UNSUPPORTED)},5:(e,t)=>{v.init(t,1);let r=v.readUInt32BE(),i=v.readString(),n=v.readUInt64BE(e._biOpt),s=v.readUInt32BE();if(v.clear(),void 0===s||i.length>256)return K(e,"Malformed READ packet");e._debug&&e._debug(`SFTP: Inbound: Received READ (id:${r})`),e.emit("READ",r,i,n,s)||e.status(r,E.OP_UNSUPPORTED)},6:(e,t)=>{v.init(t,1);let r=v.readUInt32BE(),i=v.readString(),n=v.readUInt64BE(e._biOpt),s=v.readString();if(v.clear(),void 0===s||i.length>256)return K(e,"Malformed WRITE packet");e._debug&&e._debug(`SFTP: Inbound: Received WRITE (id:${r})`),e.emit("WRITE",r,i,n,s)||e.status(r,E.OP_UNSUPPORTED)},7:(e,t)=>{v.init(t,1);let r=v.readUInt32BE(),i=v.readString(!0);if(v.clear(),void 0===i)return K(e,"Malformed LSTAT packet");e._debug&&e._debug(`SFTP: Inbound: Received LSTAT (id:${r})`),e.emit("LSTAT",r,i)||e.status(r,E.OP_UNSUPPORTED)},8:(e,t)=>{v.init(t,1);let r=v.readUInt32BE(),i=v.readString();if(v.clear(),void 0===i||i.length>256)return K(e,"Malformed FSTAT packet");e._debug&&e._debug(`SFTP: Inbound: Received FSTAT (id:${r})`),e.emit("FSTAT",r,i)||e.status(r,E.OP_UNSUPPORTED)},9:(e,t)=>{v.init(t,1);let r=v.readUInt32BE(),i=v.readString(!0),n=D(e._biOpt);if(v.clear(),void 0===n)return K(e,"Malformed SETSTAT packet");e._debug&&e._debug(`SFTP: Inbound: Received SETSTAT (id:${r})`),e.emit("SETSTAT",r,i,n)||e.status(r,E.OP_UNSUPPORTED)},10:(e,t)=>{v.init(t,1);let r=v.readUInt32BE(),i=v.readString(),n=D(e._biOpt);if(v.clear(),void 0===n||i.length>256)return K(e,"Malformed FSETSTAT packet");e._debug&&e._debug(`SFTP: Inbound: Received FSETSTAT (id:${r})`),e.emit("FSETSTAT",r,i,n)||e.status(r,E.OP_UNSUPPORTED)},11:(e,t)=>{v.init(t,1);let r=v.readUInt32BE(),i=v.readString(!0);if(v.clear(),void 0===i)return K(e,"Malformed OPENDIR packet");e._debug&&e._debug(`SFTP: Inbound: Received OPENDIR (id:${r})`),e.emit("OPENDIR",r,i)||e.status(r,E.OP_UNSUPPORTED)},12:(e,t)=>{v.init(t,1);let r=v.readUInt32BE(),i=v.readString();if(v.clear(),void 0===i||i.length>256)return K(e,"Malformed READDIR packet");e._debug&&e._debug(`SFTP: Inbound: Received READDIR (id:${r})`),e.emit("READDIR",r,i)||e.status(r,E.OP_UNSUPPORTED)},13:(e,t)=>{v.init(t,1);let r=v.readUInt32BE(),i=v.readString(!0);if(v.clear(),void 0===i)return K(e,"Malformed REMOVE packet");e._debug&&e._debug(`SFTP: Inbound: Received REMOVE (id:${r})`),e.emit("REMOVE",r,i)||e.status(r,E.OP_UNSUPPORTED)},14:(e,t)=>{v.init(t,1);let r=v.readUInt32BE(),i=v.readString(!0),n=D(e._biOpt);if(v.clear(),void 0===n)return K(e,"Malformed MKDIR packet");e._debug&&e._debug(`SFTP: Inbound: Received MKDIR (id:${r})`),e.emit("MKDIR",r,i,n)||e.status(r,E.OP_UNSUPPORTED)},15:(e,t)=>{v.init(t,1);let r=v.readUInt32BE(),i=v.readString(!0);if(v.clear(),void 0===i)return K(e,"Malformed RMDIR packet");e._debug&&e._debug(`SFTP: Inbound: Received RMDIR (id:${r})`),e.emit("RMDIR",r,i)||e.status(r,E.OP_UNSUPPORTED)},16:(e,t)=>{v.init(t,1);let r=v.readUInt32BE(),i=v.readString(!0);if(v.clear(),void 0===i)return K(e,"Malformed REALPATH packet");e._debug&&e._debug(`SFTP: Inbound: Received REALPATH (id:${r})`),e.emit("REALPATH",r,i)||e.status(r,E.OP_UNSUPPORTED)},17:(e,t)=>{v.init(t,1);let r=v.readUInt32BE(),i=v.readString(!0);if(v.clear(),void 0===i)return K(e,"Malformed STAT packet");e._debug&&e._debug(`SFTP: Inbound: Received STAT (id:${r})`),e.emit("STAT",r,i)||e.status(r,E.OP_UNSUPPORTED)},18:(e,t)=>{v.init(t,1);let r=v.readUInt32BE(),i=v.readString(!0),n=v.readString(!0);if(v.clear(),void 0===n)return K(e,"Malformed RENAME packet");e._debug&&e._debug(`SFTP: Inbound: Received RENAME (id:${r})`),e.emit("RENAME",r,i,n)||e.status(r,E.OP_UNSUPPORTED)},19:(e,t)=>{v.init(t,1);let r=v.readUInt32BE(),i=v.readString(!0);if(v.clear(),void 0===i)return K(e,"Malformed READLINK packet");e._debug&&e._debug(`SFTP: Inbound: Received READLINK (id:${r})`),e.emit("READLINK",r,i)||e.status(r,E.OP_UNSUPPORTED)},20:(e,t)=>{v.init(t,1);let r=v.readUInt32BE(),i=v.readString(!0),n=v.readString(!0);if(v.clear(),void 0===n)return K(e,"Malformed SYMLINK packet");e._debug&&e._debug(`SFTP: Inbound: Received SYMLINK (id:${r})`),(e._isOpenSSH?e.emit("SYMLINK",r,n,i):e.emit("SYMLINK",r,i,n))||e.status(r,E.OP_UNSUPPORTED)},200:(e,t)=>{let r;v.init(t,1);let i=v.readUInt32BE(),n=v.readString(!0);if(void 0===n)return v.clear(),K(e,"Malformed EXTENDED packet");v.avail()&&(r=v.readRaw()),v.clear(),e._debug&&e._debug(`SFTP: Inbound: Received EXTENDED (id:${i})`),e.emit("EXTENDED",i,n,r)||e.status(i,E.OP_UNSUPPORTED)}},{ERR_INVALID_ARG_TYPE:G,ERR_OUT_OF_RANGE:Y,validateNumber:j}=e.r(830754),X=[];function V(e,t){if(!Number.isSafeInteger(e)){if(j(e,t),!Number.isInteger(e))throw new Y(t,"an integer",e);throw new Y(t,">= 0 and <= 2 ** 53 - 1",e)}if(e<0)throw new Y(t,">= 0 and <= 2 ** 53 - 1",e)}function z(e,t,r){if(void 0===r)r={};else if("string"==typeof r)r={encoding:r};else if(null===r||"object"!=typeof r)throw TypeError('"options" argument must be a string or an object');else r=Object.create(r);if(void 0===r.highWaterMark&&(r.highWaterMark=65536),r.emitClose=!1,r.autoDestroy=!1,l.call(this,r),this.path=t,this.flags=void 0===r.flags?"r":r.flags,this.mode=void 0===r.mode?438:r.mode,this.start=r.start,this.end=r.end,this.autoClose=void 0===r.autoClose||r.autoClose,this.pos=0,this.bytesRead=0,this.isClosed=!1,this.handle=void 0===r.handle?null:r.handle,this.sftp=e,this._opening=!1,void 0!==this.start&&(V(this.start,"start"),this.pos=this.start),void 0===this.end)this.end=1/0;else if(this.end!==1/0&&(V(this.end,"end"),void 0!==this.start&&this.start>this.end))throw new Y("start",`<= "end" (here: ${this.end})`,this.start);this.on("end",function(){this.autoClose&&this.destroy()}),Buffer.isBuffer(this.handle)||this.open()}function J(e,t,r){if(!e.handle)return i();function i(i){t(i=i||r),e.isClosed=!0,i||e.emit("close")}e.sftp.close(e.handle,i)}function Z(e,t,r){if(void 0===r)r={};else if("string"==typeof r)r={encoding:r};else if(null===r||"object"!=typeof r)throw TypeError('"options" argument must be a string or an object');else r=Object.create(r);r.emitClose=!1,r.autoDestroy=!1,c.call(this,r),this.path=t,this.flags=void 0===r.flags?"w":r.flags,this.mode=void 0===r.mode?438:r.mode,this.start=r.start,this.autoClose=void 0===r.autoClose||r.autoClose,this.pos=0,this.bytesWritten=0,this.isClosed=!1,this.handle=void 0===r.handle?null:r.handle,this.sftp=e,this._opening=!1,void 0!==this.start&&(V(this.start,"start"),this.pos=this.start),r.encoding&&this.setDefaultEncoding(r.encoding),this.on("finish",function(){!this._writableState.finalCalled&&this.autoClose&&this.destroy()}),Buffer.isBuffer(this.handle)||this.open()}h(z,l),z.prototype.open=function(){this._opening||(this._opening=!0,this.sftp.open(this.path,this.flags,this.mode,(e,t)=>{if(this._opening=!1,e){this.emit("error",e),this.autoClose&&this.destroy();return}this.handle=t,this.emit("open",t),this.emit("ready"),this.read()}))},z.prototype._read=function(e){var t;if(!Buffer.isBuffer(this.handle))return this.once("open",()=>this._read(e));if(this.destroyed)return;(!i||i.length-i.used<128)&&(t=this.readableHighWaterMark||this._readableState.highWaterMark,(i=X.length>0?X.pop():Buffer.allocUnsafe(t)).used=0);let r=i,n=Math.min(i.length-i.used,e),s=i.used;if(void 0!==this.end&&(n=Math.min(this.end-this.pos+1,n)),n<=0)return this.push(null);this.sftp.read(this.handle,i,i.used,n,this.pos,(e,t)=>{if(e){this.emit("error",e),this.autoClose&&this.destroy();return}let o=null;if(s+n===r.used&&r===i)r.used=r.used+t-n+7&-8;else{let e=s+n&-8,i=s+t+7&-8;e-i>=128&&X.push(r.slice(i,e))}t>0&&(this.bytesRead+=t,o=r.slice(s,s+t)),this.pos+=t,this.push(o)}),i.used=i.used+n+7&-8},z.prototype._destroy=function(e,t){this._opening&&!Buffer.isBuffer(this.handle)?this.once("open",J.bind(null,this,t,e)):(J(this,t,e),this.handle=null,this._opening=!1)},z.prototype.close=function(e){this.destroy(null,e)},Object.defineProperty(z.prototype,"pending",{get(){return null===this.handle},configurable:!0}),h(Z,c),Z.prototype._final=function(e){this.autoClose&&this.destroy(),e()},Z.prototype.open=function(){this._opening||(this._opening=!0,this.sftp.open(this.path,this.flags,this.mode,(e,t)=>{if(this._opening=!1,e){this.emit("error",e),this.autoClose&&this.destroy();return}this.handle=t;let r=e=>{if(e)return void this.sftp.chmod(this.path,this.mode,e=>r());if("a"===this.flags[0]){let e=(r,i)=>{r?this.sftp.stat(this.path,(t,i)=>{if(t){this.destroy(),this.emit("error",r);return}e(null,i)}):(this.pos=i.size,this.emit("open",t),this.emit("ready"))};this.sftp.fstat(t,e);return}this.emit("open",t),this.emit("ready")};this.sftp.fchmod(t,this.mode,r)}))},Z.prototype._write=function(e,t,r){if(!Buffer.isBuffer(e)){let t=new G("data","Buffer",e);return this.emit("error",t)}if(!Buffer.isBuffer(this.handle))return this.once("open",function(){this._write(e,t,r)});this.sftp.write(this.handle,e,0,e.length,this.pos,(e,t)=>{if(e)return this.autoClose&&this.destroy(),r(e);this.bytesWritten+=t,r()}),this.pos+=e.length},Z.prototype._writev=function(e,t){if(!Buffer.isBuffer(this.handle))return this.once("open",function(){this._writev(e,t)});let r=this.sftp,i=this.handle,n=e.length,s=(e,r)=>{if(e)return this.destroy(),t(e);this.bytesWritten+=r,0==--n&&t()};for(let t=0;t<e.length;++t){let n=e[t].chunk;r.write(i,n,0,n.length,this.pos,s),this.pos+=n.length}},"function"!=typeof c.prototype.destroy&&(Z.prototype.destroy=z.prototype.destroy),Z.prototype._destroy=z.prototype._destroy,Z.prototype.close=function(e){if(e){if(this.isClosed)return void process.nextTick(e);this.on("close",e)}this.autoClose||this.on("finish",this.destroy.bind(this)),this.end()},Z.prototype.destroySoon=Z.prototype.end,Object.defineProperty(Z.prototype,"pending",{get(){return null===this.handle},configurable:!0}),t.exports={flagsToString:Q,OPEN_MODE:y,SFTP:class extends s{constructor(e,t,r){super(),"object"==typeof r&&r||(r={});const i=e._protocol._remoteIdentRaw;this.server=!!r.server,this._debug="function"==typeof r.debug?r.debug:void 0,this._isOpenSSH=i&&w.test(i),this._version=-1,this._extensions={},this._biOpt=r.biOpt,this._pktLenBytes=0,this._pktLen=0,this._pktPos=0,this._pktType=0,this._pktData=void 0,this._writeReqid=-1,this._requests={},this._maxInPktLen=262144,this._maxOutPktLen=34e3,this._maxReadLen=(this._isOpenSSH?262144:34e3)-2048,this._maxWriteLen=(this._isOpenSSH?262144:34e3)-2048,this.maxOpenHandles=void 0,this._client=e,this._protocol=e._protocol,this._callbacks=[],this._hasX11=!1,this._exit={code:void 0,signal:void 0,dump:void 0,desc:void 0},this._waitWindow=!1,this._chunkcb=void 0,this._buffer=[],this.type=t.type,this.subtype=void 0,this.incoming=t.incoming,this.outgoing=t.outgoing,this.stderr=C,this.readable=!0}push(e){if(null===e){if(W(this),!this.readable)return;this.readable=!1,this.emit("end");return}let t=0;for(;t<e.length;){if(this._pktLenBytes<4){let r=Math.min(4-this._pktLenBytes,e.length-t);for(this._pktLenBytes+=r;r--;)this._pktLen=(this._pktLen<<8)+e[t++];if(this._pktLenBytes<4)return;if(0===this._pktLen)return K(this,"Invalid packet length");if(this._pktLen>this._maxInPktLen){let e=this._maxInPktLen;return K(this,`Packet length ${this._pktLen} exceeds max length of ${e}`)}if(t>=e.length)return}if(this._pktPos<this._pktLen){let r=Math.min(this._pktLen-this._pktPos,e.length-t);if(0!==t||r!==e.length?r===this._pktLen?this._pkt=new d(e.buffer,e.byteOffset+t,r):(this._pkt||(this._pkt=Buffer.allocUnsafe(this._pktLen)),this._pkt.set(new Uint8Array(e.buffer,e.byteOffset+t,r),this._pktPos)):r===this._pktLen?this._pkt=e:(this._pkt||(this._pkt=Buffer.allocUnsafe(this._pktLen)),this._pkt.set(e,this._pktPos)),t+=r,this._pktPos+=r,this._pktPos<this._pktLen)return}let r=this._pkt[0],i=this._pkt;this._pktLen=0,this._pktLenBytes=0,this._pkt=void 0,this._pktPos=0;let n=this.server?$[r]:q[r];if(!n)return K(this,`Unknown packet type ${r}`);if(-1===this._version){if(this.server){if(1!==r)return K(this,`Expected INIT packet, got ${r}`)}else if(2!==r)return K(this,`Expected VERSION packet, got ${r}`)}if(!1===n(this,i))return}}end(){this.destroy()}destroy(){("open"===this.outgoing.state||"eof"===this.outgoing.state)&&(this.outgoing.state="closing",this._protocol.channelClose(this.outgoing.id))}_init(){this._init=B,this.server||H(this,S)}createReadStream(e,t){if(this.server)throw Error("Client-only method called in server mode");return new z(this,e,t)}createWriteStream(e,t){if(this.server)throw Error("Client-only method called in server mode");return new Z(this,e,t)}open(e,t,r,i){if(this.server)throw Error("Client-only method called in server mode");"function"==typeof r&&(i=r,r=void 0);let n="number"==typeof t?t:P(t);if(null===n)throw Error(`Unknown flags string: ${t}`);let s=0,o=0;("string"==typeof r||"number"==typeof r)&&(r={mode:r}),"object"==typeof r&&null!==r&&(s=(r=T(r)).flags,o=r.nb);let a=Buffer.byteLength(e),l=9,c=Buffer.allocUnsafe(13+a+4+4+o);A(c,c.length-4,0),c[4]=3;let h=this._writeReqid=this._writeReqid+1&m;A(c,h,5),A(c,a,l),c.utf8Write(e,l+=4,a),A(c,n,l+=a),A(c,s,l+=4),o&&(l+=4,o===_.length?c.set(_,l):u(_,c,0,o,l),l+=o),this._requests[h]={cb:i};let f=H(this,c);this._debug&&this._debug(`SFTP: Outbound: ${f?"Buffered":"Sending"} OPEN`)}close(e,t){if(this.server)throw Error("Client-only method called in server mode");if(!Buffer.isBuffer(e))throw Error("handle is not a Buffer");let r=e.length,i=9,n=Buffer.allocUnsafe(13+r);A(n,n.length-4,0),n[4]=4;let s=this._writeReqid=this._writeReqid+1&m;A(n,s,5),A(n,r,i),n.set(e,i+=4),this._requests[s]={cb:t};let o=H(this,n);this._debug&&this._debug(`SFTP: Outbound: ${o?"Buffered":"Sending"} CLOSE`)}read(e,t,r,i,n,s){if(this.server)throw Error("Client-only method called in server mode");if(!Buffer.isBuffer(e))throw Error("handle is not a Buffer");if(!Buffer.isBuffer(t))throw Error("buffer is not a Buffer");if(r>=t.length)throw Error("offset is out of bounds");if(r+i>t.length)throw Error("length extends beyond buffer");if(null===n)throw Error("null position currently unsupported");!function e(t,r,i,n,s,o,a,l){let c=t._maxReadLen,h=Math.max(s-c,0);h&&(s=c);let f=r.length,d=9,u=o,p=Buffer.allocUnsafe(13+f+8+4);A(p,p.length-4,0),p[4]=5;let _=t._writeReqid=t._writeReqid+1&m;A(p,_,5),A(p,f,d),p.set(r,d+=4),d+=f;for(let e=7;e>=0;--e)p[d+e]=255&u,u/=256;A(p,s,d+=8),"function"!=typeof a&&(a=B);let b=l||{nb:0,position:o,off:n,origOff:n,len:void 0,overflow:void 0,cb:(n,s,o)=>{let l=b.len,c=b.overflow;if(n){if(a._wantEOFError||n.code!==E.EOF)return a(n)}else if(o>l)return a(Error("Received more data than requested"));else if(o===l&&c){b.nb+=o,b.position+=o,b.off+=o,e(t,r,i,b.off,c,b.position,a,b);return}o=o||0,s=0===b.origOff&&i.length===b.nb?i:g(i,b.origOff,b.origOff+b.nb+o),a(void 0,b.nb+o,s,b.position)},buffer:void 0};b.len=s,b.overflow=h,b.buffer=g(i,n,n+s),t._requests[_]=b;let I=H(t,p);t._debug&&t._debug(`SFTP: Outbound: ${I?"Buffered":"Sending"} READ`)}(this,e,t,r,i,n,s)}readData(e,t,r,i,n,s){this.read(e,t,r,i,n,s)}write(e,t,r,i,n,s){if(this.server)throw Error("Client-only method called in server mode");if(!Buffer.isBuffer(e))throw Error("handle is not a Buffer");if(!Buffer.isBuffer(t))throw Error("buffer is not a Buffer");if(r>t.length)throw Error("offset is out of bounds");if(r+i>t.length)throw Error("length extends beyond buffer");if(null===n)throw Error("null position currently unsupported");if(!i){s&&process.nextTick(s,void 0,0);return}let o=this._maxWriteLen,a=Math.max(i-o,0),l=n;a&&(i=o);let c=e.length,h=9,f=Buffer.allocUnsafe(13+c+8+4+i);A(f,f.length-4,0),f[4]=6;let d=this._writeReqid=this._writeReqid+1&m;A(f,d,5),A(f,c,h),f.set(e,h+=4),h+=c;for(let e=7;e>=0;--e)f[h+e]=255&n,n/=256;A(f,i,h+=8),u(t,f,r,r+i,h+=4),this._requests[d]={cb:n=>{n?"function"==typeof s&&s(n):a?this.write(e,t,r+i,a,l+i,s):"function"==typeof s&&s(void 0,r+i)}};let g=H(this,f);this._debug&&this._debug(`SFTP: Outbound: ${g?"Sent":"Buffered"} WRITE (id:${d})`)}writeData(e,t,r,i,n,s){this.write(e,t,r,i,n,s)}fastGet(e,t,r,i){if(this.server)throw Error("Client-only method called in server mode");k(this,o,e,t,r,i)}fastPut(e,t,r,i){if(this.server)throw Error("Client-only method called in server mode");k(o,this,e,t,r,i)}readFile(e,t,r){let i,n,s,o,a;if(this.server)throw Error("Client-only method called in server mode");if("function"==typeof r?i=r:"function"==typeof t&&(i=t,t=void 0),"string"==typeof t)t={encoding:t,flag:"r"};else if(t){if("object"!=typeof t)throw TypeError("Bad arguments")}else t={encoding:null,flag:"r"};let l=t.encoding;if(l&&!Buffer.isEncoding(l))throw Error(`Unknown encoding: ${l}`);let c=0,h=0,f=t.flag||"r",d=()=>{0===n?(s=Buffer.allocUnsafe(8192),this.read(a,s,0,8192,h,u)):this.read(a,s,c,n-c,h,u)},u=(e,t)=>{let r;if(e){if(!(r=e.code===E.EOF))return this.close(a,()=>i&&i(e))}else r=!1;if(r||0===n&&0===t)return p();h+=t,c+=t,0!==n?c===n?p():d():(o.push(g(s,0,t)),d())};u._wantEOFError=!0;let p=()=>{this.close(a,e=>(0===n?s=Buffer.concat(o,c):c<n&&(s=g(s,0,c)),l&&(s=s.toString(l)),i&&i(e,s)))};this.open(e,f,438,(t,r)=>{if(t)return i&&i(t);a=r;let l=(t,r)=>t?void this.stat(e,(e,r)=>{if(e)return this.close(a,()=>{i&&i(t)});l(null,r)}):0===(n=r.size||0)?(o=[],d()):void(s=Buffer.allocUnsafe(n),d());this.fstat(a,l)})}writeFile(e,t,r,i){let n;if(this.server)throw Error("Client-only method called in server mode");if("function"==typeof i?n=i:"function"==typeof r&&(n=r,r=void 0),"string"==typeof r)r={encoding:r,mode:438,flag:"w"};else if(r){if("object"!=typeof r)throw TypeError("Bad arguments")}else r={encoding:"utf8",mode:438,flag:"w"};if(r.encoding&&!Buffer.isEncoding(r.encoding))throw Error(`Unknown encoding: ${r.encoding}`);let s=r.flag||"w";this.open(e,s,r.mode,(i,o)=>{if(i)n&&n(i);else{let i=Buffer.isBuffer(t)?t:Buffer.from(""+t,r.encoding||"utf8"),a=/a/.test(s)?null:0;if(null===a){let t=(r,s)=>{r?this.stat(e,(e,i)=>{if(e)return this.close(o,()=>{n&&n(r)});t(null,i)}):R(this,o,i,0,i.length,s.size,n)};this.fstat(o,t);return}R(this,o,i,0,i.length,a,n)}})}appendFile(e,t,r,i){let n;if(this.server)throw Error("Client-only method called in server mode");if("function"==typeof i?n=i:"function"==typeof r&&(n=r,r=void 0),"string"==typeof r)r={encoding:r,mode:438,flag:"a"};else if(r){if("object"!=typeof r)throw TypeError("Bad arguments")}else r={encoding:"utf8",mode:438,flag:"a"};r.flag||(r=Object.assign({flag:"a"},r)),this.writeFile(e,t,r,n)}exists(e,t){if(this.server)throw Error("Client-only method called in server mode");this.stat(e,e=>{t&&t(!e)})}unlink(e,t){if(this.server)throw Error("Client-only method called in server mode");let r=Buffer.byteLength(e),i=9,n=Buffer.allocUnsafe(13+r);A(n,n.length-4,0),n[4]=13;let s=this._writeReqid=this._writeReqid+1&m;A(n,s,5),A(n,r,i),n.utf8Write(e,i+=4,r),this._requests[s]={cb:t};let o=H(this,n);this._debug&&this._debug(`SFTP: Outbound: ${o?"Buffered":"Sending"} REMOVE`)}rename(e,t,r){if(this.server)throw Error("Client-only method called in server mode");let i=Buffer.byteLength(e),n=Buffer.byteLength(t),s=9,o=Buffer.allocUnsafe(13+i+4+n);A(o,o.length-4,0),o[4]=18;let a=this._writeReqid=this._writeReqid+1&m;A(o,a,5),A(o,i,s),o.utf8Write(e,s+=4,i),A(o,n,s+=i),o.utf8Write(t,s+=4,n),this._requests[a]={cb:r};let l=H(this,o);this._debug&&this._debug(`SFTP: Outbound: ${l?"Buffered":"Sending"} RENAME`)}mkdir(e,t,r){if(this.server)throw Error("Client-only method called in server mode");let i=0,n=0;"function"==typeof t&&(r=t,t=void 0),"object"==typeof t&&null!==t&&(i=(t=T(t)).flags,n=t.nb);let s=Buffer.byteLength(e),o=9,a=Buffer.allocUnsafe(13+s+4+n);A(a,a.length-4,0),a[4]=14;let l=this._writeReqid=this._writeReqid+1&m;A(a,l,5),A(a,s,o),a.utf8Write(e,o+=4,s),A(a,i,o+=s),n&&(o+=4,n===_.length?a.set(_,o):u(_,a,0,n,o),o+=n),this._requests[l]={cb:r};let c=H(this,a);this._debug&&this._debug(`SFTP: Outbound: ${c?"Buffered":"Sending"} MKDIR`)}rmdir(e,t){if(this.server)throw Error("Client-only method called in server mode");let r=Buffer.byteLength(e),i=9,n=Buffer.allocUnsafe(13+r);A(n,n.length-4,0),n[4]=15;let s=this._writeReqid=this._writeReqid+1&m;A(n,s,5),A(n,r,i),n.utf8Write(e,i+=4,r),this._requests[s]={cb:t};let o=H(this,n);this._debug&&this._debug(`SFTP: Outbound: ${o?"Buffered":"Sending"} RMDIR`)}readdir(e,t,r){if(this.server)throw Error("Client-only method called in server mode");"function"==typeof t&&(r=t,t={}),("object"!=typeof t||null===t)&&(t={});let i=!t||!t.full;if(!Buffer.isBuffer(e)&&"string"!=typeof e)throw Error("missing directory handle or path");if("string"==typeof e){let i=[],n=0,s=(e,o)=>{if(e)return r(e);this.readdir(o,t,(e,t)=>{let a=e&&e.code===E.EOF;if(e&&!a)return this.close(o,()=>r(e));if(a)return this.close(o,e=>{if(e)return r(e);r(void 0,i)});for(let e=0;e<t.length;++e,++n)i[n]=t[e];s(void 0,o)})};return this.opendir(e,s)}let n=e.length,s=9,o=Buffer.allocUnsafe(13+n);A(o,o.length-4,0),o[4]=12;let a=this._writeReqid=this._writeReqid+1&m;A(o,a,5),A(o,n,s),o.set(e,s+=4),this._requests[a]={cb:i?(e,t)=>{if("function"==typeof r){if(e)return r(e);for(let e=t.length-1;e>=0;--e)("."===t[e].filename||".."===t[e].filename)&&t.splice(e,1);r(void 0,t)}}:r};let l=H(this,o);this._debug&&this._debug(`SFTP: Outbound: ${l?"Buffered":"Sending"} READDIR`)}fstat(e,t){if(this.server)throw Error("Client-only method called in server mode");if(!Buffer.isBuffer(e))throw Error("handle is not a Buffer");let r=e.length,i=9,n=Buffer.allocUnsafe(13+r);A(n,n.length-4,0),n[4]=8;let s=this._writeReqid=this._writeReqid+1&m;A(n,s,5),A(n,r,i),n.set(e,i+=4),this._requests[s]={cb:t};let o=H(this,n);this._debug&&this._debug(`SFTP: Outbound: ${o?"Buffered":"Sending"} FSTAT`)}stat(e,t){if(this.server)throw Error("Client-only method called in server mode");let r=Buffer.byteLength(e),i=9,n=Buffer.allocUnsafe(13+r);A(n,n.length-4,0),n[4]=17;let s=this._writeReqid=this._writeReqid+1&m;A(n,s,5),A(n,r,i),n.utf8Write(e,i+=4,r),this._requests[s]={cb:t};let o=H(this,n);this._debug&&this._debug(`SFTP: Outbound: ${o?"Buffered":"Sending"} STAT`)}lstat(e,t){if(this.server)throw Error("Client-only method called in server mode");let r=Buffer.byteLength(e),i=9,n=Buffer.allocUnsafe(13+r);A(n,n.length-4,0),n[4]=7;let s=this._writeReqid=this._writeReqid+1&m;A(n,s,5),A(n,r,i),n.utf8Write(e,i+=4,r),this._requests[s]={cb:t};let o=H(this,n);this._debug&&this._debug(`SFTP: Outbound: ${o?"Buffered":"Sending"} LSTAT`)}opendir(e,t){if(this.server)throw Error("Client-only method called in server mode");let r=Buffer.byteLength(e),i=9,n=Buffer.allocUnsafe(13+r);A(n,n.length-4,0),n[4]=11;let s=this._writeReqid=this._writeReqid+1&m;A(n,s,5),A(n,r,i),n.utf8Write(e,i+=4,r),this._requests[s]={cb:t};let o=H(this,n);this._debug&&this._debug(`SFTP: Outbound: ${o?"Buffered":"Sending"} OPENDIR`)}setstat(e,t,r){if(this.server)throw Error("Client-only method called in server mode");let i=0,n=0;"object"==typeof t&&null!==t?(i=(t=T(t)).flags,n=t.nb):"function"==typeof t&&(r=t);let s=Buffer.byteLength(e),o=9,a=Buffer.allocUnsafe(13+s+4+n);A(a,a.length-4,0),a[4]=9;let l=this._writeReqid=this._writeReqid+1&m;A(a,l,5),A(a,s,o),a.utf8Write(e,o+=4,s),A(a,i,o+=s),n&&(o+=4,n===_.length?a.set(_,o):u(_,a,0,n,o),o+=n),this._requests[l]={cb:r};let c=H(this,a);this._debug&&this._debug(`SFTP: Outbound: ${c?"Buffered":"Sending"} SETSTAT`)}fsetstat(e,t,r){if(this.server)throw Error("Client-only method called in server mode");if(!Buffer.isBuffer(e))throw Error("handle is not a Buffer");let i=0,n=0;"object"==typeof t&&null!==t?(i=(t=T(t)).flags,n=t.nb):"function"==typeof t&&(r=t);let s=e.length,o=9,a=Buffer.allocUnsafe(13+s+4+n);A(a,a.length-4,0),a[4]=10;let l=this._writeReqid=this._writeReqid+1&m;A(a,l,5),A(a,s,o),a.set(e,o+=4),A(a,i,o+=s),n&&(o+=4,n===_.length?a.set(_,o):u(_,a,0,n,o),o+=n),this._requests[l]={cb:r};let c=H(this,a);this._debug&&this._debug(`SFTP: Outbound: ${c?"Buffered":"Sending"} FSETSTAT`)}futimes(e,t,r,i){return this.fsetstat(e,{atime:L(t),mtime:L(r)},i)}utimes(e,t,r,i){return this.setstat(e,{atime:L(t),mtime:L(r)},i)}fchown(e,t,r,i){return this.fsetstat(e,{uid:t,gid:r},i)}chown(e,t,r,i){return this.setstat(e,{uid:t,gid:r},i)}fchmod(e,t,r){return this.fsetstat(e,{mode:t},r)}chmod(e,t,r){return this.setstat(e,{mode:t},r)}readlink(e,t){if(this.server)throw Error("Client-only method called in server mode");let r=Buffer.byteLength(e),i=9,n=Buffer.allocUnsafe(13+r);A(n,n.length-4,0),n[4]=19;let s=this._writeReqid=this._writeReqid+1&m;A(n,s,5),A(n,r,i),n.utf8Write(e,i+=4,r),this._requests[s]={cb:(e,r)=>{if("function"==typeof t){if(e)return t(e);if(!r||!r.length)return t(Error("Response missing link info"));t(void 0,r[0].filename)}}};let o=H(this,n);this._debug&&this._debug(`SFTP: Outbound: ${o?"Buffered":"Sending"} READLINK`)}symlink(e,t,r){if(this.server)throw Error("Client-only method called in server mode");let i=Buffer.byteLength(t),n=Buffer.byteLength(e),s=9,o=Buffer.allocUnsafe(13+i+4+n);A(o,o.length-4,0),o[4]=20;let a=this._writeReqid=this._writeReqid+1&m;A(o,a,5),this._isOpenSSH?(A(o,n,s),o.utf8Write(e,s+=4,n),A(o,i,s+=n),o.utf8Write(t,s+=4,i)):(A(o,i,s),o.utf8Write(t,s+=4,i),A(o,n,s+=i),o.utf8Write(e,s+=4,n)),this._requests[a]={cb:r};let l=H(this,o);this._debug&&this._debug(`SFTP: Outbound: ${l?"Buffered":"Sending"} SYMLINK`)}realpath(e,t){if(this.server)throw Error("Client-only method called in server mode");let r=Buffer.byteLength(e),i=9,n=Buffer.allocUnsafe(13+r);A(n,n.length-4,0),n[4]=16;let s=this._writeReqid=this._writeReqid+1&m;A(n,s,5),A(n,r,i),n.utf8Write(e,i+=4,r),this._requests[s]={cb:(e,r)=>{if("function"==typeof t){if(e)return t(e);if(!r||!r.length)return t(Error("Response missing path info"));t(void 0,r[0].filename)}}};let o=H(this,n);this._debug&&this._debug(`SFTP: Outbound: ${o?"Buffered":"Sending"} REALPATH`)}ext_openssh_rename(e,t,r){if(this.server)throw Error("Client-only method called in server mode");let i=this._extensions["posix-rename@openssh.com"];if(!i||"1"!==i)throw Error("Server does not support this extended request");let n=Buffer.byteLength(e),s=Buffer.byteLength(t),o=9,a=Buffer.allocUnsafe(41+n+4+s);A(a,a.length-4,0),a[4]=200;let l=this._writeReqid=this._writeReqid+1&m;A(a,l,5),A(a,24,o),a.utf8Write("posix-rename@openssh.com",o+=4,24),A(a,n,o+=24),a.utf8Write(e,o+=4,n),A(a,s,o+=n),a.utf8Write(t,o+=4,s),this._requests[l]={cb:r};let c=H(this,a);this._debug&&this._debug(`SFTP: Outbound: ${c?"Buffered":"Sending"} posix-rename@openssh.com`)}ext_openssh_statvfs(e,t){if(this.server)throw Error("Client-only method called in server mode");let r=this._extensions["statvfs@openssh.com"];if(!r||"2"!==r)throw Error("Server does not support this extended request");let i=Buffer.byteLength(e),n=9,s=Buffer.allocUnsafe(36+i);A(s,s.length-4,0),s[4]=200;let o=this._writeReqid=this._writeReqid+1&m;A(s,o,5),A(s,19,n),s.utf8Write("statvfs@openssh.com",n+=4,19),A(s,i,n+=19),s.utf8Write(e,n+=4,i),this._requests[o]={extended:"statvfs@openssh.com",cb:t};let a=H(this,s);this._debug&&this._debug(`SFTP: Outbound: ${a?"Buffered":"Sending"} statvfs@openssh.com`)}ext_openssh_fstatvfs(e,t){if(this.server)throw Error("Client-only method called in server mode");let r=this._extensions["fstatvfs@openssh.com"];if(!r||"2"!==r)throw Error("Server does not support this extended request");if(!Buffer.isBuffer(e))throw Error("handle is not a Buffer");let i=e.length,n=9,s=Buffer.allocUnsafe(37+i);A(s,s.length-4,0),s[4]=200;let o=this._writeReqid=this._writeReqid+1&m;A(s,o,5),A(s,20,n),s.utf8Write("fstatvfs@openssh.com",n+=4,20),A(s,i,n+=20),s.set(e,n+=4),this._requests[o]={extended:"fstatvfs@openssh.com",cb:t};let a=H(this,s);this._debug&&this._debug(`SFTP: Outbound: ${a?"Buffered":"Sending"} fstatvfs@openssh.com`)}ext_openssh_hardlink(e,t,r){if(this.server)throw Error("Client-only method called in server mode");if("1"!==this._extensions["hardlink@openssh.com"])throw Error("Server does not support this extended request");let i=Buffer.byteLength(e),n=Buffer.byteLength(t),s=9,o=Buffer.allocUnsafe(37+i+4+n);A(o,o.length-4,0),o[4]=200;let a=this._writeReqid=this._writeReqid+1&m;A(o,a,5),A(o,20,s),o.utf8Write("hardlink@openssh.com",s+=4,20),A(o,i,s+=20),o.utf8Write(e,s+=4,i),A(o,n,s+=i),o.utf8Write(t,s+=4,n),this._requests[a]={cb:r};let l=H(this,o);this._debug&&this._debug(`SFTP: Outbound: ${l?"Buffered":"Sending"} hardlink@openssh.com`)}ext_openssh_fsync(e,t){if(this.server)throw Error("Client-only method called in server mode");if("1"!==this._extensions["fsync@openssh.com"])throw Error("Server does not support this extended request");if(!Buffer.isBuffer(e))throw Error("handle is not a Buffer");let r=e.length,i=9,n=Buffer.allocUnsafe(34+r);A(n,n.length-4,0),n[4]=200;let s=this._writeReqid=this._writeReqid+1&m;A(n,s,5),A(n,17,i),n.utf8Write("fsync@openssh.com",i+=4,17),A(n,r,i+=17),n.set(e,i+=4),this._requests[s]={cb:t};let o=H(this,n);this._debug&&this._debug(`SFTP: Outbound: ${o?"Buffered":"Sending"} fsync@openssh.com`)}ext_openssh_lsetstat(e,t,r){if(this.server)throw Error("Client-only method called in server mode");if("1"!==this._extensions["lsetstat@openssh.com"])throw Error("Server does not support this extended request");let i=0,n=0;"object"==typeof t&&null!==t?(i=(t=T(t)).flags,n=t.nb):"function"==typeof t&&(r=t);let s=Buffer.byteLength(e),o=9,a=Buffer.allocUnsafe(37+s+4+n);A(a,a.length-4,0),a[4]=200;let l=this._writeReqid=this._writeReqid+1&m;A(a,l,5),A(a,20,o),a.utf8Write("lsetstat@openssh.com",o+=4,20),A(a,s,o+=20),a.utf8Write(e,o+=4,s),A(a,i,o+=s),n&&(o+=4,n===_.length?a.set(_,o):u(_,a,0,n,o),o+=n),this._requests[l]={cb:r};let c=H(this,a);this._debug&&this._debug(`SFTP: Outbound: ${c?"Buffered":"Sending"} lsetstat@openssh.com`)}ext_openssh_expandPath(e,t){if(this.server)throw Error("Client-only method called in server mode");if("1"!==this._extensions["expand-path@openssh.com"])throw Error("Server does not support this extended request");let r=Buffer.byteLength(e),i=9,n=Buffer.allocUnsafe(40+r);A(n,n.length-4,0),n[4]=200;let s=this._writeReqid=this._writeReqid+1&m;A(n,s,5),A(n,23,i),n.utf8Write("expand-path@openssh.com",i+=4,23),A(n,r,i+=20),n.utf8Write(e,i+=4,r),this._requests[s]={cb:(e,r)=>{if("function"==typeof t){if(e)return t(e);if(!r||!r.length)return t(Error("Response missing expanded path"));t(void 0,r[0].filename)}}};let o=H(this,n);this._debug&&this._debug(`SFTP: Outbound: ${o?"Buffered":"Sending"} expand-path@openssh.com`)}ext_copy_data(e,t,r,i,n,s){if(this.server)throw Error("Client-only method called in server mode");if("1"!==this._extensions["copy-data"])throw Error("Server does not support this extended request");if(!Buffer.isBuffer(e))throw Error("Source handle is not a Buffer");if(!Buffer.isBuffer(i))throw Error("Destination handle is not a Buffer");let o=0,a=Buffer.allocUnsafe(26+e.length+8+8+4+i.length+8);A(a,a.length-4,o),a[o+=4]=200,++o;let l=this._writeReqid=this._writeReqid+1&m;A(a,l,o),A(a,9,o+=4),o+=4,a.utf8Write("copy-data",o,9),o+=9,A(a,e.length,o),o+=4,a.set(e,o),o+=e.length;for(let e=7;e>=0;--e)a[o+e]=255&t,t/=256;o+=8;for(let e=7;e>=0;--e)a[o+e]=255&r,r/=256;o+=8,A(a,i.length,o),o+=4,a.set(i,o),o+=i.length;for(let e=7;e>=0;--e)a[o+e]=255&n,n/=256;this._requests[l]={cb:s};let c=H(this,a);this._debug&&this._debug(`SFTP: Outbound: ${c?"Buffered":"Sending"} copy-data`)}ext_home_dir(e,t){if(this.server)throw Error("Client-only method called in server mode");if("1"!==this._extensions["home-directory"])throw Error("Server does not support this extended request");if("string"!=typeof e)throw TypeError("username is not a string");let r=0,i=Buffer.byteLength(e),n=Buffer.allocUnsafe(31+i);A(n,n.length-4,r),n[r+=4]=200,++r;let s=this._writeReqid=this._writeReqid+1&m;A(n,s,r),A(n,14,r+=4),r+=4,n.utf8Write("home-directory",r,14),A(n,i,r+=14),r+=4,n.utf8Write(e,r,i),r+=i,this._requests[s]={cb:(e,r)=>{if("function"==typeof t){if(e)return t(e);if(!r||!r.length)return t(Error("Response missing home directory"));t(void 0,r[0].filename)}}};let o=H(this,n);this._debug&&this._debug(`SFTP: Outbound: ${o?"Buffered":"Sending"} home-directory`)}ext_users_groups(e,t,r){if(this.server)throw Error("Client-only method called in server mode");if("1"!==this._extensions["users-groups-by-id@openssh.com"])throw Error("Server does not support this extended request");if(!Array.isArray(e))throw TypeError("uids is not an array");for(let t of e)if(!Number.isInteger(t)||t<0||t>0x100000000-1)throw Error("uid values must all be 32-bit unsigned integers");if(!Array.isArray(t))throw TypeError("gids is not an array");for(let e of t)if(!Number.isInteger(e)||e<0||e>0x100000000-1)throw Error("gid values must all be 32-bit unsigned integers");let i=0,n=Buffer.allocUnsafe(47+4*e.length+4+4*t.length);A(n,n.length-4,i),n[i+=4]=200,++i;let s=this._writeReqid=this._writeReqid+1&m;for(let t of(A(n,s,i),A(n,30,i+=4),i+=4,n.utf8Write("users-groups-by-id@openssh.com",i,30),i+=30,A(n,4*e.length,i),i+=4,e))A(n,t,i),i+=4;for(let e of(A(n,4*t.length,i),i+=4,t))A(n,e,i),i+=4;this._requests[s]={extended:"users-groups-by-id@openssh.com",cb:r};let o=H(this,n);this._debug&&this._debug(`SFTP: Outbound: ${o?"Buffered":"Sending"} users-groups-by-id@openssh.com`)}handle(e,t){if(!this.server)throw Error("Server-only method called in client mode");if(!Buffer.isBuffer(t))throw Error("handle is not a Buffer");let r=t.length;if(r>256)throw Error("handle too large (> 256 bytes)");let i=9,n=Buffer.allocUnsafe(13+r);A(n,n.length-4,0),n[4]=102,A(n,e,5),A(n,r,i),r&&n.set(t,i+=4);let s=H(this,n);this._debug&&this._debug(`SFTP: Outbound: ${s?"Buffered":"Sending"} HANDLE`)}status(e,t,r){if(!this.server)throw Error("Server-only method called in client mode");if(!b.has(t))throw Error(`Bad status code: ${t}`);r||(r="");let i=Buffer.byteLength(r),n=9,s=Buffer.allocUnsafe(17+i+4);A(s,s.length-4,0),s[4]=101,A(s,e,5),A(s,t,n),A(s,i,n+=4),n+=4,i&&(s.utf8Write(r,n,i),n+=i),A(s,0,n);let o=H(this,s);this._debug&&this._debug(`SFTP: Outbound: ${o?"Buffered":"Sending"} STATUS`)}data(e,t,r){let i;if(!this.server)throw Error("Server-only method called in client mode");let n=Buffer.isBuffer(t);if(!n&&"string"!=typeof t)throw Error("data is not a Buffer or string");n||r||(r=void 0,i=!0);let s=n?t.length:Buffer.byteLength(t,r),o=9,a=Buffer.allocUnsafe(13+s);A(a,a.length-4,0),a[4]=103,A(a,e,5),A(a,s,o),s&&(n?a.set(t,o+=4):i?a.utf8Write(t,o+=4,s):a.write(t,o+=4,s,r));let l=H(this,a);this._debug&&this._debug(`SFTP: Outbound: ${l?"Buffered":"Sending"} DATA`)}name(e,t){let r;if(!this.server)throw Error("Server-only method called in client mode");if(!Array.isArray(t)){if("object"!=typeof t||null===t)throw Error("names is not an object or array");t=[t]}let i=t.length,n=0,s=[];for(let e=0;e<i;++e){let i=t[e],o=i&&i.filename&&"string"==typeof i.filename?i.filename:"";n+=4+Buffer.byteLength(o);let a=i&&i.longname&&"string"==typeof i.longname?i.longname:"";if(n+=4+Buffer.byteLength(a),"object"==typeof i.attrs&&null!==i.attrs){if(n+=4+(r=T(i.attrs)).nb,r.nb){let e;r.nb===_.length?e=new Uint8Array(_):u(_,e=new Uint8Array(r.nb),0,r.nb,0),r.bytes=e}s.push(r)}else n+=4,s.push(null)}let o=9,a=Buffer.allocUnsafe(13+n);A(a,a.length-4,0),a[4]=104,A(a,e,5),A(a,i,o),o+=4;for(let e=0;e<i;++e){let r=t[e];{let e=r&&r.filename&&"string"==typeof r.filename?r.filename:"",t=Buffer.byteLength(e);A(a,t,o),o+=4,t&&(a.utf8Write(e,o,t),o+=t)}{let e=r&&r.longname&&"string"==typeof r.longname?r.longname:"",t=Buffer.byteLength(e);A(a,t,o),o+=4,t&&(a.utf8Write(e,o,t),o+=t)}let i=s[e];i?(A(a,i.flags,o),o+=4,i.flags&&i.bytes&&(a.set(i.bytes,o),o+=i.nb)):(A(a,0,o),o+=4)}let l=H(this,a);this._debug&&this._debug(`SFTP: Outbound: ${l?"Buffered":"Sending"} NAME`)}attrs(e,t){if(!this.server)throw Error("Server-only method called in client mode");if("object"!=typeof t||null===t)throw Error("attrs is not an object");let r=(t=T(t)).flags,i=t.nb,n=9,s=Buffer.allocUnsafe(13+i);A(s,s.length-4,0),s[4]=105,A(s,e,5),A(s,r,n),i&&(n+=4,i===_.length?s.set(_,n):u(_,s,0,i,n),n+=i);let o=H(this,s);this._debug&&this._debug(`SFTP: Outbound: ${o?"Buffered":"Sending"} ATTRS`)}},Stats:N,STATUS_CODE:E,stringToFlags:P}},737949,(e,t,r)=>{"use strict";let{Duplex:i,Readable:n,Writable:s}=e.r(688947),{CHANNEL_EXTENDED_DATATYPE:{STDERR:o}}=e.r(11607),{bufferSlice:a}=e.r(69253);class l extends n{constructor(e,t){super(t),this._channel=e}_read(e){this._channel._waitChanDrain&&(this._channel._waitChanDrain=!1,this._channel.incoming.window<=1048576&&d(this._channel))}}class c extends s{constructor(e){super({highWaterMark:2097152}),this._channel=e}_write(e,t,r){let i=this._channel,n=i._client._protocol,s=i.outgoing,l=s.packetSize,c=s.id,h=s.window,f=e.length,d=0;if("open"===s.state){for(;f-d>0&&h>0;){let t=f-d;t>h&&(t=h),t>l&&(t=l),0===d&&t===f?n.channelExtData(c,e,o):n.channelExtData(c,a(e,d,d+t),o),d+=t,h-=t}if(s.window=h,f-d>0){0===h&&(i._waitWindow=!0),d>0?i._chunkErr=a(e,d,f):i._chunkErr=e,i._chunkcbErr=r;return}r()}}}function h(){this.eof(),(this.server||!this.allowHalfOpen)&&this.close(),this.writable=!1}function f(){this.readable=!1}function d(e){if("closed"===e.outgoing.state)return;let t=2097152-e.incoming.window;t<=0||(e.incoming.window+=t,e._client._protocol.channelWindowAdjust(e.outgoing.id,t))}t.exports={Channel:class extends i{constructor(e,t,r){const i={highWaterMark:2097152,allowHalfOpen:!r||r&&!1!==r.allowHalfOpen,emitClose:!1};super(i),this.allowHalfOpen=i.allowHalfOpen;const n=!!(r&&r.server);this.server=n,this.type=t.type,this.subtype=void 0,this.incoming=t.incoming,this.outgoing=t.outgoing,this._callbacks=[],this._client=e,this._hasX11=!1,this._exit={code:void 0,signal:void 0,dump:void 0,desc:void 0},this.stdin=this.stdout=this,n?this.stderr=new c(this):this.stderr=new l(this,i),this._waitWindow=!1,this._waitChanDrain=!1,this._chunk=void 0,this._chunkcb=void 0,this._chunkErr=void 0,this._chunkcbErr=void 0,this.on("finish",h).on("prefinish",h),this.on("end",f).on("close",f)}_read(e){this._waitChanDrain&&(this._waitChanDrain=!1,this.incoming.window<=1048576&&d(this))}_write(e,t,r){let i=this._client._protocol,n=this.outgoing,s=n.packetSize,o=n.id,l=n.window,c=e.length,h=0;if("open"===n.state){for(;c-h>0&&l>0;){let t=c-h;t>l&&(t=l),t>s&&(t=s),0===h&&t===c?i.channelData(o,e):i.channelData(o,a(e,h,h+t)),h+=t,l-=t}if(n.window=l,c-h>0){0===l&&(this._waitWindow=!0),h>0?this._chunk=a(e,h,c):this._chunk=e,this._chunkcb=r;return}r()}}eof(){"open"===this.outgoing.state&&(this.outgoing.state="eof",this._client._protocol.channelEOF(this.outgoing.id))}close(){("open"===this.outgoing.state||"eof"===this.outgoing.state)&&(this.outgoing.state="closing",this._client._protocol.channelClose(this.outgoing.id))}destroy(){return this.end(),this.close(),this}setWindow(e,t,r,i){if(this.server)throw Error("Client-only method called in server mode");"session"===this.type&&("shell"===this.subtype||"exec"===this.subtype)&&this.writable&&"open"===this.outgoing.state&&this._client._protocol.windowChange(this.outgoing.id,e,t,r,i)}signal(e){if(this.server)throw Error("Client-only method called in server mode");"session"===this.type&&this.writable&&"open"===this.outgoing.state&&this._client._protocol.signal(this.outgoing.id,e)}exit(e,t,r){if(!this.server)throw Error("Server-only method called in client mode");"session"===this.type&&this.writable&&"open"===this.outgoing.state&&("number"==typeof e?this._client._protocol.exitStatus(this.outgoing.id,e):this._client._protocol.exitSignal(this.outgoing.id,e,t,r))}},MAX_WINDOW:2097152,PACKET_SIZE:32768,windowAdjust:d,WINDOW_THRESHOLD:1048576}},71783,(e,t,r)=>{"use strict";let i,{SFTP:n}=e.r(740731),s=0x100000000-1;function o(e,t,r,i){let n;e._chanMgr.remove(t),"function"==typeof i&&(r instanceof Error?n=r:"object"==typeof r&&null!==r?(n=Error(`(SSH) Channel open failure: ${r.description}`)).reason=r.reason:(n=Error("(SSH) Channel open failure: server closed channel unexpectedly")).reason="",i(n))}function a(e,t,r,i,s){if("function"==typeof r)return void o(e,t,i,r);if("object"!=typeof r||null===r||r.incoming&&"closed"===r.incoming.state||(e._chanMgr.remove(t),r.server&&"Session"===r.constructor.name))return;r.incoming.state="closed",r.readable&&r.push(null),r.server?r.stderr.writable&&r.stderr.end():r.stderr.readable&&r.stderr.push(null),r.constructor===n||"open"!==r.outgoing.state&&"eof"!==r.outgoing.state||s||r.close(),"closing"===r.outgoing.state&&(r.outgoing.state="closed");let a=r._readableState,l=r._writableState;!l||l.ending||l.finished||s||r.end();let c=r._callbacks;r._callbacks=[];for(let e=0;e<c.length;++e)c[e](!0);if(r.server)!r.readable||r.destroyed||a&&a.endEmitted?r.emit("close"):r.once("end",()=>r.emit("close"));else{let e;switch(r.type){case"direct-streamlocal@openssh.com":case"direct-tcpip":e=()=>r.emit("close");break;default:{let t=r._exit;e=()=>{null===t.code?r.emit("close",t.code,t.signal,t.dump,t.desc):r.emit("close",t.code)}}}!r.readable||r.destroyed||a&&a.endEmitted?e():r.once("end",e);let t=r.stderr._readableState;!r.stderr.readable||r.stderr.destroyed||t&&t.endEmitted?r.stderr.emit("close"):r.stderr.once("end",()=>r.stderr.emit("close"))}}let l=(i=Object.prototype.toString,e=>"[object RegExp]"===i.call(e));t.exports={ChannelManager:class{constructor(e){this._client=e,this._channels={},this._cur=-1,this._count=0}add(e){let t;if(this._cur<s)t=++this._cur;else if(0===this._count)this._cur=0,t=0;else{let e=this._channels;for(let r=0;r<s;++r)if(void 0===e[r]){t=r;break}}return void 0===t?-1:(this._channels[t]=e||!0,++this._count,t)}update(e,t){if("number"!=typeof e||e<0||e>=s||!isFinite(e))throw Error(`Invalid channel id: ${e}`);t&&this._channels[e]&&(this._channels[e]=t)}get(e){if("number"!=typeof e||e<0||e>=s||!isFinite(e))throw Error(`Invalid channel id: ${e}`);return this._channels[e]}remove(e){if("number"!=typeof e||e<0||e>=s||!isFinite(e))throw Error(`Invalid channel id: ${e}`);this._channels[e]&&(delete this._channels[e],this._count&&--this._count)}cleanup(e){let t=this._channels;this._channels={},this._cur=-1,this._count=0;let r=Object.keys(t),i=this._client;for(let n=0;n<r.length;++n){let s=+r[n],o=t[s];a(i,s,o._channel||o,e,!0)}}},generateAlgorithmList:function(e,t,r){if(Array.isArray(e)&&e.length>0){for(let t=0;t<e.length;++t)if(-1===r.indexOf(e[t]))throw Error(`Unsupported algorithm: ${e[t]}`);return e}if("object"==typeof e&&null!==e){let i=Object.keys(e),n=t;for(let s=0;s<i.length;++s){let o=i[s],a=e[o];switch(o){case"append":if(Array.isArray(a)||(a=[a]),Array.isArray(a))for(let e=0;e<a.length;++e){let i=a[e];if("string"==typeof i){if(!i||-1!==n.indexOf(i))continue;if(-1===r.indexOf(i))throw Error(`Unsupported algorithm: ${i}`);n===t&&(n=n.slice()),n.push(i)}else if(l(i))for(let e=0;e<r.length;++e){let s=r[e];if(i.test(s)){if(-1!==n.indexOf(s))continue;n===t&&(n=n.slice()),n.push(s)}}}break;case"prepend":if(Array.isArray(a)||(a=[a]),Array.isArray(a))for(let e=a.length;e>=0;--e){let i=a[e];if("string"==typeof i){if(!i||-1!==n.indexOf(i))continue;if(-1===r.indexOf(i))throw Error(`Unsupported algorithm: ${i}`);n===t&&(n=n.slice()),n.unshift(i)}else if(l(i))for(let e=r.length;e>=0;--e){let s=r[e];if(i.test(s)){if(-1!==n.indexOf(s))continue;n===t&&(n=n.slice()),n.unshift(s)}}}break;case"remove":if(Array.isArray(a)||(a=[a]),Array.isArray(a))for(let e=0;e<a.length;++e){let r=a[e];if("string"==typeof r){if(!r)continue;let e=n.indexOf(r);if(-1===e)continue;n===t&&(n=n.slice()),n.splice(e,1)}else if(l(r))for(let e=0;e<n.length;++e)r.test(n[e])&&(n===t&&(n=n.slice()),n.splice(e,1),--e)}}}return n}return t},onChannelOpenFailure:o,onCHANNEL_CLOSE:a,isWritable:e=>e&&e.writable&&e._readableState&&!1===e._readableState.ended}},728510,(e,t,r)=>{"use strict";let i,{createHash:n,getHashes:s,randomFillSync:o}=e.r(254799),{Socket:a}=e.r(504446),{lookup:l}=e.r(679594),c=e.r(427699),h=s(),{COMPAT:f,CHANNEL_EXTENDED_DATATYPE:{STDERR:d},CHANNEL_OPEN_FAILURE:u,DEFAULT_CIPHER:g,DEFAULT_COMPRESSION:p,DEFAULT_KEX:A,DEFAULT_MAC:_,DEFAULT_SERVER_HOST_KEY:E,DISCONNECT_REASON:b,DISCONNECT_REASON_BY_VALUE:I,SUPPORTED_CIPHER:y,SUPPORTED_COMPRESSION:m,SUPPORTED_KEX:S,SUPPORTED_MAC:x,SUPPORTED_SERVER_HOST_KEY:w}=e.r(11607),{init:v}=e.r(866310),C=e.r(169722),{parseKey:B}=e.r(939649),{SFTP:k}=e.r(740731),{bufferCopy:R,makeBufferParser:N,makeError:T,readUInt32BE:L,sigSSHToASN1:U,writeUInt32BE:O}=e.r(69253),{AgentContext:P,createAgent:Q,isAgent:D}=e.r(768738),{Channel:H,MAX_WINDOW:F,PACKET_SIZE:M,windowAdjust:K,WINDOW_THRESHOLD:W}=e.r(737949),{ChannelManager:q,generateAlgorithmList:$,isWritable:G,onChannelOpenFailure:Y,onCHANNEL_CLOSE:j}=e.r(71783),X=N(),V=N(),z=/^OpenSSH_(?:(?![0-4])\d)|(?:\d{2,})/,J=e=>{};function Z(e,t,r,i){"function"==typeof r&&(i=r,r={});let n=(e,t)=>{i(e,t)};n.type=t;let s=e._chanMgr.add(n);if(-1===s)return void i(Error("No free channels available"));switch(t){case"session":case"sftp":e._protocol.session(s,F,M);break;case"direct-tcpip":e._protocol.directTcpip(s,F,M,r);break;case"direct-streamlocal@openssh.com":e._protocol.openssh_directStreamLocal(s,F,M,r);break;default:throw Error(`Unsupported channel type: ${t}`)}}function ee(e,t,r){let i={single:!1,protocol:"MIT-MAGIC-COOKIE-1",cookie:void 0,screen:0};"function"==typeof t?r=t:"object"==typeof t&&null!==t&&("boolean"==typeof t.single&&(i.single=t.single),"number"==typeof t.screen&&(i.screen=t.screen),"string"==typeof t.protocol&&(i.protocol=t.protocol),"string"==typeof t.cookie?i.cookie=t.cookie:Buffer.isBuffer(t.cookie)&&(i.cookie=t.cookie.hexSlice(0,t.cookie.length))),void 0===i.cookie&&(i.cookie=es());let n="function"==typeof r;if("open"!==e.outgoing.state){n&&r(Error("Channel is not open"));return}n&&e._callbacks.push(t=>{t?r(!0!==t?t:Error("Unable to request X11")):(e._hasX11=!0,++e._client._acceptX11,e.once("close",()=>{e._client._acceptX11&&--e._client._acceptX11}),r())}),e._client._protocol.x11Forward(e.outgoing.id,i,n)}function et(e,t,r){let i=24,n=80,s=640,o=480,a="vt100",l=null;"function"==typeof t?r=t:"object"==typeof t&&null!==t&&("number"==typeof t.rows&&(i=t.rows),"number"==typeof t.cols&&(n=t.cols),"number"==typeof t.width&&(s=t.width),"number"==typeof t.height&&(o=t.height),"string"==typeof t.term&&(a=t.term),"object"==typeof t.modes&&(l=t.modes));let c="function"==typeof r;if("open"!==e.outgoing.state){c&&r(Error("Channel is not open"));return}c&&e._callbacks.push(e=>{e?r(!0!==e?e:Error("Unable to request a pseudo-terminal")):r()}),e._client._protocol.pty(e.outgoing.id,i,n,o,s,a,l,c)}function er(e,t){let r="function"==typeof t;if("open"!==e.outgoing.state){r&&t(Error("Channel is not open"));return}if(e._client._agentFwdEnabled){r&&t(!1);return}e._client._agentFwdEnabled=!0,e._callbacks.push(i=>{if(i){e._client._agentFwdEnabled=!1,r&&t(!0!==i?i:Error("Unable to request agent forwarding"));return}r&&t()}),e._client._protocol.openssh_agentForward(e.outgoing.id,!0)}function ei(e,t,r){let i="function"==typeof r;if("open"!==e.outgoing.state){i&&r(Error("Channel is not open"));return}i&&e._callbacks.push(e=>{e?r(!0!==e?e:Error("Unable to set environment")):r()});let n=Object.keys(t||{});for(let r=0;r<n.length;++r){let s=n[r],o=t[s];e._client._protocol.env(e.outgoing.id,s,o,i)}}function en(e,t,r){"open"!==e.outgoing.state?r(Error("Channel is not open")):(e._callbacks.push(i=>{i?r(!0!==i?i:Error(`Unable to start subsystem: ${t}`)):(e.subtype="subsystem",r(void 0,e))}),e._client._protocol.subsystem(e.outgoing.id,t,!0))}let es=(i=Buffer.allocUnsafe(16),()=>(o(i,0,16),i.hexSlice(0,16)));function eo(e){if(!Array.isArray(e))throw Error("authList must be an array");let t=0;return(r,i,n)=>t!==e.length&&e[t++]}function ea(e,t,r){if("ssh-rsa"===t.type){if(e._protocol._compatFlags&f.IMPLY_RSA_SHA2_SIGALGS&&(r=Array.isArray(r)?["rsa-sha2-256","rsa-sha2-512",...r]:["rsa-sha2-256","rsa-sha2-512"]),Array.isArray(r)){if(-1!==r.indexOf("rsa-sha2-256"))return[["rsa-sha2-256","sha256"]];if(-1!==r.indexOf("rsa-sha2-512"))return[["rsa-sha2-512","sha512"]];if(-1===r.indexOf("ssh-rsa"))return[]}return[["ssh-rsa","sha1"]]}}t.exports=class extends c{constructor(){super(),this.config={host:void 0,port:void 0,localAddress:void 0,localPort:void 0,forceIPv4:void 0,forceIPv6:void 0,keepaliveCountMax:void 0,keepaliveInterval:void 0,readyTimeout:void 0,ident:void 0,username:void 0,password:void 0,privateKey:void 0,tryKeyboard:void 0,agent:void 0,allowAgentFwd:void 0,authHandler:void 0,hostHashAlgo:void 0,hostHashCb:void 0,strictVendor:void 0,debug:void 0},this._agent=void 0,this._readyTimeout=void 0,this._chanMgr=void 0,this._callbacks=void 0,this._forwarding=void 0,this._forwardingUnix=void 0,this._acceptX11=void 0,this._agentFwdEnabled=void 0,this._remoteVer=void 0,this._protocol=void 0,this._sock=void 0,this._resetKA=void 0}connect(e){let t,r,i,s,o,c,f;if(this._sock&&G(this._sock))return this.once("close",()=>{this.connect(e)}),this.end(),this;this.config.host=e.hostname||e.host||"localhost",this.config.port=e.port||22,this.config.localAddress="string"==typeof e.localAddress?e.localAddress:void 0,this.config.localPort="string"==typeof e.localPort||"number"==typeof e.localPort?e.localPort:void 0,this.config.forceIPv4=e.forceIPv4||!1,this.config.forceIPv6=e.forceIPv6||!1,this.config.keepaliveCountMax="number"==typeof e.keepaliveCountMax&&e.keepaliveCountMax>=0?e.keepaliveCountMax:3,this.config.keepaliveInterval="number"==typeof e.keepaliveInterval&&e.keepaliveInterval>0?e.keepaliveInterval:0,this.config.readyTimeout="number"==typeof e.readyTimeout&&e.readyTimeout>=0?e.readyTimeout:2e4,this.config.ident="string"==typeof e.ident||Buffer.isBuffer(e.ident)?e.ident:void 0;let N={kex:void 0,serverHostKey:void 0,cs:{cipher:void 0,mac:void 0,compress:void 0,lang:[]},sc:void 0},L=!0;if("object"==typeof e.algorithms&&null!==e.algorithms&&(N.kex=$(e.algorithms.kex,A,S),N.kex!==A&&(L=!1),N.serverHostKey=$(e.algorithms.serverHostKey,E,w),N.serverHostKey!==E&&(L=!1),N.cs.cipher=$(e.algorithms.cipher,g,y),N.cs.cipher!==g&&(L=!1),N.cs.mac=$(e.algorithms.hmac,_,x),N.cs.mac!==_&&(L=!1),N.cs.compress=$(e.algorithms.compress,p,m),N.cs.compress!==p&&(L=!1),L||(N.sc=N.cs)),"string"==typeof e.username)this.config.username=e.username;else if("string"==typeof e.user)this.config.username=e.user;else throw Error("Invalid username");this.config.password="string"==typeof e.password?e.password:void 0,this.config.privateKey="string"==typeof e.privateKey||Buffer.isBuffer(e.privateKey)?e.privateKey:void 0,this.config.localHostname="string"==typeof e.localHostname?e.localHostname:void 0,this.config.localUsername="string"==typeof e.localUsername?e.localUsername:void 0,this.config.tryKeyboard=!0===e.tryKeyboard,"string"==typeof e.agent&&e.agent.length?this.config.agent=Q(e.agent):D(e.agent)?this.config.agent=e.agent:this.config.agent=void 0,this.config.allowAgentFwd=!0===e.agentForward&&void 0!==this.config.agent;let Z=this.config.authHandler="function"==typeof e.authHandler||Array.isArray(e.authHandler)?e.authHandler:void 0;this.config.strictVendor="boolean"!=typeof e.strictVendor||e.strictVendor;let ee=this.config.debug="function"==typeof e.debug?e.debug:void 0;if(!0===e.agentForward&&!this.config.allowAgentFwd)throw Error("You must set a valid agent path to allow agent forwarding");let et=this._callbacks=[];if(this._chanMgr=new q(this),this._forwarding={},this._forwardingUnix={},this._acceptX11=0,this._agentFwdEnabled=!1,this._agent=this.config.agent?this.config.agent:void 0,this._remoteVer=void 0,this.config.privateKey){if((t=B(this.config.privateKey,e.passphrase))instanceof Error)throw Error(`Cannot parse privateKey: ${t.message}`);if(Array.isArray(t)&&(t=t[0]),null===t.getPrivatePEM())throw Error("privateKey value does not contain a (valid) private key")}if("function"==typeof e.hostVerifier){let t,i=e.hostVerifier;-1!==h.indexOf(e.hostHash)&&(t=e.hostHash),r=(e,r)=>{t&&(e=n(t).update(e).digest("hex"));let s=i(e,r);void 0!==s&&r(s)}}let er=this._sock=e.sock||new a,ei=!1,en=!1;this._protocol&&this._protocol.cleanup();let es=ee?(e,t,r)=>{ee(`Debug output from server: ${JSON.stringify(r)}`)}:void 0,el=this._protocol=new C({ident:this.config.ident,offer:L?void 0:N,onWrite:e=>{G(er)&&er.write(e)},onError:e=>{"handshake"===e.level&&clearTimeout(this._readyTimeout),el._destruct||er.removeAllListeners("data"),this.emit("error",e);try{er.end()}catch{}},onHeader:e=>{en=!0,this._remoteVer=e.versions.software,e.greeting&&this.emit("greeting",e.greeting)},onHandshakeComplete:e=>{this.emit("handshake",e),ei||(ei=!0,el.service("ssh-userauth"))},debug:ee,hostVerifier:r,messageHandlers:{DEBUG:es,DISCONNECT:(e,t,r)=>{if(t!==b.BY_APPLICATION){r||void 0===(r=I[t])&&(r=`Unexpected disconnection reason: ${t}`);let e=Error(r);e.code=t,this.emit("error",e)}er.end()},SERVICE_ACCEPT:(e,t)=>{"ssh-userauth"===t&&eS()},EXT_INFO:(e,t)=>{if(void 0===i){for(let e of t)if("server-sig-algs"===e.name){i=e.algs;return}i=null}},USERAUTH_BANNER:(e,t)=>{this.emit("banner",t)},USERAUTH_SUCCESS:e=>{eu(),clearTimeout(this._readyTimeout),this.emit("ready")},USERAUTH_FAILURE:(e,t,r)=>{if(o.keyAlgos){let e=o.keyAlgos[0][0];if(ee&&ee(`Client: ${o.type} (${e}) auth failed`),o.keyAlgos.shift(),o.keyAlgos.length){let[e,t]=o.keyAlgos[0];switch(o.type){case"agent":el.authPK(o.username,o.agentCtx.currentKey(),e);return;case"publickey":el.authPK(o.username,o.key,e);return;case"hostbased":el.authHostbased(o.username,o.key,o.localHostname,o.localUsername,e,(e,r)=>{let i=o.key.sign(e,t);if(i instanceof Error)return i.message=`Error while signing with key: ${i.message}`,i.level="client-authentication",this.emit("error",i),eS();r(i)});return}}else o.keyAlgos=void 0}if("agent"===o.type){let e=o.agentCtx.pos();return ee&&ee(`Client: Agent key #${e+1} failed`),ex()}ee&&ee(`Client: ${o.type} auth failed`),e_=r,eE=t,eS()},USERAUTH_PASSWD_CHANGEREQ:(e,t)=>{"password"===o.type&&this.emit("change password",t,e=>{el.authPassword(this.config.username,this.config.password,e)})},USERAUTH_PK_OK:e=>{let t,r;if(o.keyAlgos&&([t,r]=o.keyAlgos[0]),"agent"===o.type){let e=o.agentCtx.currentKey();el.authPK(o.username,e,t,(t,i)=>{let n={hash:r};o.agentCtx.sign(e,t,n,(e,t)=>{if(!e)return i(t);e.level="agent",this.emit("error",e),ex()})})}else"publickey"===o.type&&el.authPK(o.username,o.key,t,(e,t)=>{let i=o.key.sign(e,r);if(i instanceof Error)return i.message=`Error signing data with key: ${i.message}`,i.level="client-authentication",this.emit("error",i),eS();t(i)})},USERAUTH_INFO_REQUEST:(e,t,r,i)=>{if("keyboard-interactive"===o.type){if(0===(Array.isArray(i)?i.length:0)){ee&&ee("Client: Sending automatic USERAUTH_INFO_RESPONSE"),el.authInfoRes();return}o.prompt(t,r,"",i,e=>{el.authInfoRes(e)})}},REQUEST_SUCCESS:(e,t)=>{et.length&&et.shift()(!1,t)},REQUEST_FAILURE:e=>{et.length&&et.shift()(!0)},GLOBAL_REQUEST:(e,t,r,i)=>{"hostkeys-00@openssh.com"===t?(function(e,t,r){if(!e._sock||!G(e._sock))return;if("function"!=typeof r&&(r=J),!Array.isArray(t))throw TypeError("Invalid keys argument type");let i=[];for(let e of t){let t=B(e);if(t instanceof Error)throw t;i.push(t)}if(!e.config.strictVendor||e.config.strictVendor&&z.test(e._remoteVer)){e._callbacks.push((t,n)=>{if(t)return void r(!0!==t?t:Error("Server failed to prove supplied keys"));let s=[],o=0;for(X.init(n,0);X.avail();){let t;if(o===i.length)break;let r=i[o++],n=r.getPublicSSH(),a=X.readString();V.init(a,0);let l=V.readString(!0),c=V.readString();if(l!==r.type)if("ssh-rsa"!==r.type)continue;else switch(l){case"rsa-sha2-256":t="sha256";break;case"rsa-sha2-512":t="sha512";break;default:continue}let h=e._protocol._kex.sessionID,f=Buffer.allocUnsafe(37+h.length+4+n.length),d=0;O(f,29,0),f.utf8Write("hostkeys-prove-00@openssh.com",d+=4,29),O(f,h.length,d+=29),R(h,f,0,h.length,d+=4),O(f,n.length,d+=h.length),R(n,f,0,n.length,d+=4),(c=U(c,l))&&!0===r.verify(f,c,t)&&s.push(r)}V.clear(),X.clear(),r(null,s)}),e._protocol.openssh_hostKeysProve(i);return}process.nextTick(r,Error("strictVendor enabled and server is not OpenSSH or compatible version"))}(this,i,(e,t)=>{e||this.emit("hostkeys",t)}),r&&el.requestSuccess()):r&&el.requestFailure()},CHANNEL_OPEN:(e,t)=>{!function(e,t){let r,i=-1,n=()=>{let r=new H(e,{type:t.type,incoming:{id:i,window:F,packetSize:M,state:"open"},outgoing:{id:t.sender,window:t.window,packetSize:t.packetSize,state:"open"}});return e._chanMgr.update(i,r),e._protocol.channelOpenConfirm(t.sender,i,F,M),r},s=()=>{void 0===r&&(r=-1===i?u.RESOURCE_SHORTAGE:u.CONNECT_FAILED),-1!==i&&e._chanMgr.remove(i),e._protocol.channelOpenFail(t.sender,r,"")},o=()=>(-1===(i=e._chanMgr.add())&&(r=u.RESOURCE_SHORTAGE,e.config.debug&&e.config.debug("Client: Automatic rejection of incoming channel open: no channels available")),-1!==i),a=t.data;switch(t.type){case"forwarded-tcpip":{let t=e._forwarding[`${a.destIP}:${a.destPort}`];if(void 0!==t&&o()){0===a.destPort&&(a.destPort=t),e.emit("tcp connection",a,n,s);return}break}case"forwarded-streamlocal@openssh.com":if(void 0!==e._forwardingUnix[a.socketPath]&&o())return e.emit("unix connection",a,n,s);break;case"auth-agent@openssh.com":if(e._agentFwdEnabled&&"function"==typeof e._agent.getStream&&o())return e._agent.getStream((e,t)=>{if(e)return s();let r=n();r.pipe(t).pipe(r)});break;case"x11":if(0!==e._acceptX11&&o())return e.emit("x11",a,n,s);break;default:r=u.UNKNOWN_CHANNEL_TYPE,e.config.debug&&e.config.debug(`Client: Automatic rejection of unsupported incoming channel open type: ${t.type}`)}void 0===r&&(r=u.ADMINISTRATIVELY_PROHIBITED,e.config.debug&&e.config.debug("Client: Automatic rejection of unexpected incoming channel open for: "+t.type)),s()}(this,t)},CHANNEL_OPEN_CONFIRMATION:(e,t)=>{let r=this._chanMgr.get(t.recipient);if("function"!=typeof r)return;let i="sftp"===r.type,n={type:i?"session":r.type,incoming:{id:t.recipient,window:F,packetSize:M,state:"open"},outgoing:{id:t.sender,window:t.window,packetSize:t.packetSize,state:"open"}},s=i?new k(this,n,{debug:ee}):new H(this,n);this._chanMgr.update(t.recipient,s),r(void 0,s)},CHANNEL_OPEN_FAILURE:(e,t,r,i)=>{let n=this._chanMgr.get(t);"function"!=typeof n||Y(this,t,{reason:r,description:i},n)},CHANNEL_DATA:(e,t,r)=>{let i=this._chanMgr.get(t);if("object"==typeof i&&null!==i&&0!==i.incoming.window){if(i.incoming.window-=r.length,!1===i.push(r)){i._waitChanDrain=!0;return}i.incoming.window<=W&&K(i)}},CHANNEL_EXTENDED_DATA:(e,t,r,i)=>{if(i!==d)return;let n=this._chanMgr.get(t);if("object"==typeof n&&null!==n&&0!==n.incoming.window){if(n.incoming.window-=r.length,!n.stderr.push(r)){n._waitChanDrain=!0;return}n.incoming.window<=W&&K(n)}},CHANNEL_WINDOW_ADJUST:(e,t,r)=>{let i=this._chanMgr.get(t);"object"==typeof i&&null!==i&&(i.outgoing.window+=r,i._waitWindow&&(i._waitWindow=!1,i._chunk?i._write(i._chunk,null,i._chunkcb):i._chunkcb?i._chunkcb():i._chunkErr?i.stderr._write(i._chunkErr,null,i._chunkcbErr):i._chunkcbErr&&i._chunkcbErr()))},CHANNEL_SUCCESS:(e,t)=>{let r=this._chanMgr.get(t);"object"==typeof r&&null!==r&&(this._resetKA(),r._callbacks.length&&r._callbacks.shift()(!1))},CHANNEL_FAILURE:(e,t)=>{let r=this._chanMgr.get(t);"object"==typeof r&&null!==r&&(this._resetKA(),r._callbacks.length&&r._callbacks.shift()(!0))},CHANNEL_REQUEST:(e,t,r,i,n)=>{let s=this._chanMgr.get(t);if("object"!=typeof s||null===s)return;let o=s._exit;if(void 0===o.code){switch(r){case"exit-status":s.emit("exit",o.code=n);return;case"exit-signal":s.emit("exit",o.code=null,o.signal=`SIG${n.signal}`,o.dump=n.coreDumped,o.desc=n.errorMessage);return}i&&e.channelFailure(s.outgoing.id)}},CHANNEL_EOF:(e,t)=>{let r=this._chanMgr.get(t);"object"!=typeof r||null===r||"open"===r.incoming.state&&(r.incoming.state="eof",r.readable&&r.push(null),r.stderr.readable&&r.stderr.push(null))},CHANNEL_CLOSE:(e,t)=>{j(this,t,this._chanMgr.get(t))}}});er.pause();let ec=this.config.keepaliveInterval,eh=this.config.keepaliveCountMax,ef=0,ed=()=>{if(++ef>eh){if(clearInterval(s),er.readable){let e=Error("Keepalive timeout");e.level="client-timeout",this.emit("error",e),er.destroy()}return}G(er)?(et.push(eu),el.ping()):clearInterval(s)};function eu(){ec>0&&(ef=0,clearInterval(s),G(er)&&(s=setInterval(ed,ec)))}this._resetKA=eu;let eg=(c=!1,()=>{if(!c&&(c=!0,eA&&!en)){let e=T("Connection lost before handshake","protocol",!0);this.emit("error",e)}}),ep=(f=!1,()=>{f||(f=!0,eA=!0,ee&&ee("Socket connected"),this.emit("connect"),v.then(()=>{el.start(),er.on("data",e=>{try{el.parse(e,0,e.length)}catch(e){this.emit("error",e);try{G(er)&&er.end()}catch{}}}),er.stderr&&"function"==typeof er.stderr.resume&&er.stderr.resume(),er.resume()}).catch(e=>{this.emit("error",e);try{G(er)&&er.end()}catch{}}))}),eA=!1;er.on("connect",ep).on("timeout",()=>{this.emit("timeout")}).on("error",e=>{ee&&ee(`Socket error: ${e.message}`),clearTimeout(this._readyTimeout),e.level="client-socket",this.emit("error",e)}).on("end",()=>{ee&&ee("Socket ended"),eg(),el.cleanup(),clearTimeout(this._readyTimeout),clearInterval(s),this.emit("end")}).on("close",()=>{ee&&ee("Socket closed"),eg(),el.cleanup(),clearTimeout(this._readyTimeout),clearInterval(s),this.emit("close");let e=et;et=this._callbacks=[];let t=Error("No response from server");for(let r=0;r<e.length;++r)e[r](t);this._chanMgr.cleanup(t)});let e_=null,eE=null,eb=["none"];void 0!==this.config.password&&eb.push("password"),void 0!==t&&eb.push("publickey"),void 0!==this._agent&&eb.push("agent"),this.config.tryKeyboard&&eb.push("keyboard-interactive"),void 0!==t&&void 0!==this.config.localHostname&&void 0!==this.config.localUsername&&eb.push("hostbased"),Array.isArray(Z)?Z=eo(Z):"function"!=typeof Z&&(Z=eo(eb));let eI=!1,ey=e=>{if(!eI){if(eI=!0,!1===e){let e=Error("All configured authentication methods failed");e.level="client-authentication",this.emit("error",e),this.end();return}if("string"==typeof e){let r=e;if(-1===eb.indexOf(r))return em(`Authentication method not allowed: ${r}`);let i=this.config.username;switch(r){case"password":e={type:r,username:i,password:this.config.password};break;case"publickey":e={type:r,username:i,key:t};break;case"hostbased":e={type:r,username:i,key:t,localHostname:this.config.localHostname,localUsername:this.config.localUsername};break;case"agent":e={type:r,username:i,agentCtx:new P(this._agent)};break;case"keyboard-interactive":e={type:r,username:i,prompt:(...e)=>this.emit("keyboard-interactive",...e)};break;case"none":e={type:r,username:i};break;default:return em(`Skipping unsupported authentication method: ${e}`)}}else{if("object"!=typeof e||null===e)return em(`Skipping invalid authentication attempt: ${e}`);let t=e.username;if("string"!=typeof t)return em(`Skipping invalid authentication attempt: ${e}`);let r=e.type;switch(r){case"password":{let{password:i}=e;if("string"!=typeof i&&!Buffer.isBuffer(i))return em("Skipping invalid password auth attempt");e={type:r,username:t,password:i};break}case"publickey":{let i=B(e.key,e.passphrase);if(i instanceof Error)return em("Skipping invalid key auth attempt");if(!i.isPrivateKey())return em("Skipping non-private key");e={type:r,username:t,key:i};break}case"hostbased":{let{localHostname:i,localUsername:n}=e,s=B(e.key,e.passphrase);if(s instanceof Error||"string"!=typeof i||"string"!=typeof n)return em("Skipping invalid hostbased auth attempt");if(!s.isPrivateKey())return em("Skipping non-private key");e={type:r,username:t,key:s,localHostname:i,localUsername:n};break}case"agent":{let i=e.agent;if("string"==typeof i&&i.length)i=Q(i);else if(!D(i))return em(`Skipping invalid agent: ${e.agent}`);e={type:r,username:t,agentCtx:new P(i)};break}case"keyboard-interactive":{let{prompt:i}=e;if("function"!=typeof i)return em("Skipping invalid keyboard-interactive auth attempt");e={type:r,username:t,prompt:i};break}case"none":e={type:r,username:t};break;default:return em(`Skipping unsupported authentication method: ${e}`)}}o=e;try{let e=o.username;switch(o.type){case"password":el.authPassword(e,o.password);break;case"publickey":{let t;if(o.keyAlgos=ea(this,o.key,i),o.keyAlgos)if(!o.keyAlgos.length)return em("Skipping key authentication (no mutual hash algorithm)");else t=o.keyAlgos[0][0];el.authPK(e,o.key,t);break}case"hostbased":{let t,r;if(o.keyAlgos=ea(this,o.key,i),o.keyAlgos)if(!o.keyAlgos.length)return em("Skipping hostbased authentication (no mutual hash algorithm)");else[t,r]=o.keyAlgos[0];el.authHostbased(e,o.key,o.localHostname,o.localUsername,t,(e,t)=>{let i=o.key.sign(e,r);if(i instanceof Error)return i.message=`Error while signing with key: ${i.message}`,i.level="client-authentication",this.emit("error",i),eS();t(i)});break}case"agent":o.agentCtx.init(e=>{if(e)return e.level="agent",this.emit("error",e),eS();ex()});break;case"keyboard-interactive":el.authKeyboard(e);break;case"none":el.authNone(e)}}finally{eI=!1}}};function em(e){ee&&ee(e),process.nextTick(eS)}function eS(){eI=!1;let e=Z(eE,e_,ey);eI||void 0===e||ey(e)}let ex=()=>{if("agent"===o.type){let e=o.agentCtx.nextKey();if(!1===e)ee&&ee("Agent: No more keys left to try"),ee&&ee("Client: agent auth failed"),eS();else{let t,r=o.agentCtx.pos();if(o.keyAlgos=ea(this,e,i),o.keyAlgos)if(o.keyAlgos.length)t=o.keyAlgos[0][0];else{ee&&ee(`Agent: Skipping key #${r+1} (no mutual hash algorithm)`),ex();return}ee&&ee(`Agent: Trying key #${r+1}`),el.authPK(o.username,e,t)}}},ew=()=>{this.config.readyTimeout>0&&(this._readyTimeout=setTimeout(()=>{let e=Error("Timed out while waiting for handshake");e.level="client-timeout",this.emit("error",e),er.destroy()},this.config.readyTimeout))};if(e.sock)ew(),"boolean"==typeof er.connecting&&er.connecting||ep();else{let t=this.config.host,r=this.config.forceIPv4,i=this.config.forceIPv6;ee&&ee(`Client: Trying ${t} on port ${this.config.port} ...`);let n=()=>{ew(),er.connect({host:t,port:this.config.port,localAddress:this.config.localAddress,localPort:this.config.localPort}),er.setMaxListeners(0),er.setTimeout("number"==typeof e.timeout?e.timeout:0)};!r&&!i||r&&i?n():l(t,r?4:6,(e,i,s)=>{if(e){let i=Error(`Error while looking up ${r?"IPv4":"IPv6"} address for '${t}': ${e}`);clearTimeout(this._readyTimeout),i.level="client-dns",this.emit("error",i),this.emit("close");return}t=i,n()})}return this}end(){return this._sock&&G(this._sock)&&(this._protocol.disconnect(b.BY_APPLICATION),this._sock.end()),this}destroy(){return this._sock&&G(this._sock)&&this._sock.destroy(),this}exec(e,t,r){if(!this._sock||!G(this._sock))throw Error("Not connected");return"function"==typeof t&&(r=t,t={}),Z(this,"session",{allowHalfOpen:!1!==t.allowHalfOpen},(i,n)=>{if(i)return void r(i);let s=[];function o(e){if(e){n.close(),r(e);return}s.length&&s.shift()()}(!0===this.config.allowAgentFwd||t&&!0===t.agentForward&&void 0!==this._agent)&&s.push(()=>er(n,o)),"object"==typeof t&&null!==t&&("object"==typeof t.env&&null!==t.env&&ei(n,t.env),("object"==typeof t.pty&&null!==t.pty||!0===t.pty)&&s.push(()=>et(n,t.pty,o)),("object"==typeof t.x11&&null!==t.x11||"number"===t.x11||!0===t.x11)&&s.push(()=>ee(n,t.x11,o))),s.push(()=>{var i,s,o,a;return i=n,s=e,o=t,a=r,void("open"!==i.outgoing.state?a(Error("Channel is not open")):(i._callbacks.push(e=>{e?a(!0!==e?e:Error("Unable to exec")):(i.subtype="exec",i.allowHalfOpen=!1!==o.allowHalfOpen,a(void 0,i))}),i._client._protocol.exec(i.outgoing.id,s,!0)))}),s.shift()()}),this}shell(e,t,r){if(!this._sock||!G(this._sock))throw Error("Not connected");return"function"==typeof e?(r=e,e=t=void 0):"function"==typeof t&&(r=t,t=void 0),e&&(void 0!==e.x11||void 0!==e.env)&&(t=e,e=void 0),Z(this,"session",(i,n)=>{if(i)return void r(i);let s=[];function o(e){if(e){n.close(),r(e);return}s.length&&s.shift()()}(!0===this.config.allowAgentFwd||t&&!0===t.agentForward&&void 0!==this._agent)&&s.push(()=>er(n,o)),!1!==e&&s.push(()=>et(n,e,o)),"object"==typeof t&&null!==t&&("object"==typeof t.env&&null!==t.env&&ei(n,t.env),("object"==typeof t.x11&&null!==t.x11||"number"===t.x11||!0===t.x11)&&s.push(()=>ee(n,t.x11,o))),s.push(()=>{var e,t;return e=n,t=r,void("open"!==e.outgoing.state?t(Error("Channel is not open")):(e._callbacks.push(r=>{r?t(!0!==r?r:Error("Unable to open shell")):(e.subtype="shell",t(void 0,e))}),e._client._protocol.shell(e.outgoing.id,!0)))}),s.shift()()}),this}subsys(e,t){if(!this._sock||!G(this._sock))throw Error("Not connected");return Z(this,"session",(r,i)=>{r?t(r):en(i,e,(e,r)=>{e?t(e):t(void 0,r)})}),this}forwardIn(e,t,r){if(!this._sock||!G(this._sock))throw Error("Not connected");let i="function"==typeof r;return i&&this._callbacks.push((i,n)=>{if(i)return void r(!0!==i?i:Error(`Unable to bind to ${e}:${t}`));let s=t;0===t&&n&&n.length>=4&&(s=L(n,0),this._protocol._compatFlags&f.DYN_RPORT_BUG||(t=s)),this._forwarding[`${e}:${t}`]=s,r(void 0,s)}),this._protocol.tcpipForward(e,t,i),this}unforwardIn(e,t,r){if(!this._sock||!G(this._sock))throw Error("Not connected");let i="function"==typeof r;return i&&this._callbacks.push(i=>{i?r(!0!==i?i:Error(`Unable to unbind from ${e}:${t}`)):(delete this._forwarding[`${e}:${t}`],r())}),this._protocol.cancelTcpipForward(e,t,i),this}forwardOut(e,t,r,i,n){if(!this._sock||!G(this._sock))throw Error("Not connected");return"function"!=typeof n&&(n=J),Z(this,"direct-tcpip",{srcIP:e,srcPort:t,dstIP:r,dstPort:i},n),this}openssh_noMoreSessions(e){if(!this._sock||!G(this._sock))throw Error("Not connected");let t="function"==typeof e;return!this.config.strictVendor||this.config.strictVendor&&z.test(this._remoteVer)?(t&&this._callbacks.push(t=>{t?e(!0!==t?t:Error("Unable to disable future sessions")):e()}),this._protocol.openssh_noMoreSessions(t)):t&&process.nextTick(e,Error("strictVendor enabled and server is not OpenSSH or compatible version")),this}openssh_forwardInStreamLocal(e,t){if(!this._sock||!G(this._sock))throw Error("Not connected");let r="function"==typeof t;return!this.config.strictVendor||this.config.strictVendor&&z.test(this._remoteVer)?(r&&this._callbacks.push(r=>{r?t(!0!==r?r:Error(`Unable to bind to ${e}`)):(this._forwardingUnix[e]=!0,t())}),this._protocol.openssh_streamLocalForward(e,r)):r&&process.nextTick(t,Error("strictVendor enabled and server is not OpenSSH or compatible version")),this}openssh_unforwardInStreamLocal(e,t){if(!this._sock||!G(this._sock))throw Error("Not connected");let r="function"==typeof t;return!this.config.strictVendor||this.config.strictVendor&&z.test(this._remoteVer)?(r&&this._callbacks.push(r=>{r?t(!0!==r?r:Error(`Unable to unbind from ${e}`)):(delete this._forwardingUnix[e],t())}),this._protocol.openssh_cancelStreamLocalForward(e,r)):r&&process.nextTick(t,Error("strictVendor enabled and server is not OpenSSH or compatible version")),this}openssh_forwardOutStreamLocal(e,t){if(!this._sock||!G(this._sock))throw Error("Not connected");return("function"!=typeof t&&(t=J),!this.config.strictVendor||this.config.strictVendor&&z.test(this._remoteVer))?Z(this,"direct-streamlocal@openssh.com",{socketPath:e},t):process.nextTick(t,Error("strictVendor enabled and server is not OpenSSH or compatible version")),this}sftp(e,t){if(!this._sock||!G(this._sock))throw Error("Not connected");return"function"==typeof e&&(t=e,e=void 0),Z(this,"sftp",(r,i)=>{if(r)return void t(r);let n=(e,r)=>{if(e)return void t(e);function n(){i.removeListener("ready",s),i.removeListener("error",o),i.removeListener("exit",a),i.removeListener("close",a)}function s(){n(),t(void 0,i)}function o(e){n(),t(e)}function a(e,r){n();let i=Error("number"==typeof e?`Received exit code ${e} while establishing SFTP session`:void 0!==r?`Received signal ${r} while establishing SFTP session`:"Received unexpected SFTP session termination");i.code=e,i.signal=r,t(i)}i.on("ready",s).on("error",o).on("exit",a).on("close",a),i._init()};"object"==typeof e&&null!==e?ei(i,e,e=>{e?t(e):en(i,"sftp",n)}):en(i,"sftp",n)}),this}setNoDelay(e){return this._sock&&"function"==typeof this._sock.setNoDelay&&this._sock.setNoDelay(e),this}}},28931,(e,t,r)=>{"use strict";let i,{Agent:n}=e.r(921517),{Agent:s}=e.r(524836),{connect:o}=e.r(755004);for(let t of[n,s]){class s extends t{constructor(e,t){super(t),this._connectCfg=e,this._defaultSrcIP=t&&t.srcIP||"localhost"}createConnection(r,s){let l=r&&r.localAddress||this._defaultSrcIP,c=r&&r.localPort||0,h=r.host,f=r.port;void 0===i&&(i=e.r(728510));let d=new i,u=!1;d.on("ready",()=>{d.forwardOut(l,c,h,f,(e,i)=>{if(u=!0,e)return d.end(),s(e);i.once("close",()=>d.end()),s(null,function(e,t,r){let i;if(t===n)return e.setKeepAlive=a,e.setNoDelay=a,e.setTimeout=a,e.ref=a,e.unref=a,e.destroySoon=e.destroy,e;r.socket=e;let s=o(r),l=(i=!1,()=>{!i&&(i=!0,e.isPaused()&&e.resume())});return s.on("end",l).on("close",l),s}(i,t,r))})}).on("error",s).on("close",()=>{u||s(Error("Unexpected connection close"))}).connect(this._connectCfg)}}r[t===n?"SSHTTPAgent":"SSHTTPSAgent"]=s}function a(){}},904336,(e,t,r)=>{"use strict";let{Server:i}=e.r(504446),n=e.r(427699),{listenerCount:s}=n,{CHANNEL_OPEN_FAILURE:o,DEFAULT_CIPHER:a,DEFAULT_COMPRESSION:l,DEFAULT_KEX:c,DEFAULT_MAC:h,DEFAULT_SERVER_HOST_KEY:f,DISCONNECT_REASON:d,DISCONNECT_REASON_BY_VALUE:u,SUPPORTED_CIPHER:g,SUPPORTED_COMPRESSION:p,SUPPORTED_KEX:A,SUPPORTED_MAC:_,SUPPORTED_SERVER_HOST_KEY:E}=e.r(11607),{init:b}=e.r(866310),{KexInit:I}=e.r(558948),{parseKey:y}=e.r(939649),m=e.r(169722),{SFTP:S}=e.r(740731),{writeUInt32BE:x}=e.r(69253),{Channel:w,MAX_WINDOW:v,PACKET_SIZE:C,windowAdjust:B,WINDOW_THRESHOLD:k}=e.r(737949),{ChannelManager:R,generateAlgorithmList:N,isWritable:T,onChannelOpenFailure:L,onCHANNEL_CLOSE:U}=e.r(71783);class O extends n{constructor(e,t,r,i,n){super(),this.username=this.user=t,this.service=r,this.method=i,this._initialResponse=!1,this._finalResponse=!1,this._multistep=!1,this._cbfinal=(e,t,r)=>{this._finalResponse||(this._finalResponse=!0,n(this,e,t,r))},this._protocol=e}accept(){this._cleanup&&this._cleanup(),this._initialResponse=!0,this._cbfinal(!0)}reject(e,t){this._cleanup&&this._cleanup(),this._initialResponse=!0,this._cbfinal(!1,e,t)}}class P extends O{constructor(e,t,r,i,n,s){super(e,t,r,i,s),this._multistep=!0,this._cb=void 0,this._onInfoResponse=e=>{let t=this._cb;t&&(this._cb=void 0,t(e))},this.submethods=n,this.on("abort",()=>{this._cb&&this._cb(Error("Authentication request aborted"))})}prompt(e,t,r,i){Array.isArray(e)||(e=[e]),"function"==typeof t?(i=t,t=r=void 0):"function"==typeof r?(i=r,r=void 0):"function"!=typeof i&&(i=void 0);for(let t=0;t<e.length;++t)"string"==typeof e[t]&&(e[t]={prompt:e[t],echo:!0});this._cb=i,this._initialResponse=!0,this._protocol.authInfoReq(t,r,e)}}class Q extends O{constructor(e,t,r,i,n,s){super(e,t,r,i,s),this.key={algo:n.keyAlgo,data:n.key},this.hashAlgo=n.hashAlgo,this.signature=n.signature,this.blob=n.blob}accept(){this.signature?O.prototype.accept.call(this):(this._initialResponse=!0,this._protocol.authPKOK(this.key.algo,this.key.data))}}class D extends O{constructor(e,t,r,i,n,s){super(e,t,r,i,s),this.key={algo:n.keyAlgo,data:n.key},this.hashAlgo=n.hashAlgo,this.signature=n.signature,this.blob=n.blob,this.localHostname=n.localHostname,this.localUsername=n.localUsername}}class H extends O{constructor(e,t,r,i,n,s){super(e,t,r,i,s),this.password=n,this._changeCb=void 0}requestChange(e,t){if(this._changeCb)throw Error("Change request already in progress");if("string"!=typeof e)throw Error("prompt argument must be a string");if("function"!=typeof t)throw Error("Callback argument must be a function");this._changeCb=t,this._protocol.authPasswdChg(e)}}class F extends n{constructor(e,t,r){super(),this.type="session",this.subtype=void 0,this.server=!0,this._ending=!1,this._channel=void 0,this._chanInfo={type:"session",incoming:{id:r,window:v,packetSize:C,state:"open"},outgoing:{id:t.sender,window:t.window,packetSize:t.packetSize,state:"open"}}}}class M extends n{constructor(e,t){if(super(),"object"!=typeof e||null===e)throw Error("Missing configuration object");const r=Object.create(null),n=[],s=e.hostKeys;if(!Array.isArray(s))throw Error("hostKeys must be an array");const o="object"==typeof e.algorithms&&null!==e.algorithms?e.algorithms:{},d=N(o.serverHostKey,f,E);for(let e=0;e<s.length;++e){let t;if((t=Buffer.isBuffer(s[e])||"string"==typeof s[e]?y(s[e]):y(s[e].key,s[e].passphrase))instanceof Error)throw Error(`Cannot parse privateKey: ${t.message}`);if(Array.isArray(t)&&(t=t[0]),null===t.getPrivatePEM())throw Error("privateKey value contains an invalid private key");if(!n.includes(t.type))if("ssh-rsa"===t.type){let e=d.indexOf("ssh-rsa");const i=d.indexOf("rsa-sha2-256"),s=d.indexOf("rsa-sha2-512");-1===e&&(e=1/0),[e,i,s].sort(q).forEach(o=>{let a;if(-1!==o){switch(o){case e:a="ssh-rsa";break;case i:a="rsa-sha2-256";break;case s:a="rsa-sha2-512";break;default:return}r[a]=t,n.push(a)}})}else r[t.type]=t,n.push(t.type)}const u={kex:N(o.kex,c,A).concat(["kex-strict-s-v00@openssh.com"]),serverHostKey:n,cs:{cipher:N(o.cipher,a,g),mac:N(o.hmac,h,_),compress:N(o.compress,l,p),lang:[]},sc:void 0};u.sc=u.cs,"function"==typeof t&&this.on("connection",t);const b="function"==typeof e.debug?e.debug:void 0,m=e.ident?Buffer.from(e.ident):void 0,S=new I(u);this._srv=new i(t=>{let i;if(this._connections>=this.maxConnections)return void t.destroy();if(++this._connections,t.once("close",()=>{--this._connections}),b){let e=`[${process.hrtime().join(".")}] `;i=t=>{b(`${e}${t}`)}}new K(t,r,m,S,i,this,e)}).on("error",e=>{this.emit("error",e)}).on("listening",()=>{this.emit("listening")}).on("close",()=>{this.emit("close")}),this._connections=0,this.maxConnections=1/0}injectSocket(e){this._srv.emit("connection",e)}listen(...e){return this._srv.listen(...e),this}address(){return this._srv.address()}getConnections(e){return this._srv.getConnections(e),this}close(e){return this._srv.close(e),this}ref(){return this._srv.ref(),this}unref(){return this._srv.unref(),this}}M.KEEPALIVE_CLIENT_INTERVAL=15e3,M.KEEPALIVE_CLIENT_COUNT_MAX=3;class K extends n{constructor(e,t,r,i,n,a,l){let c,h,f;super();let g=0,p=!1,A=[];const _=[];function E(e){}this._sock=e,this._chanMgr=new R(this),this._debug=n,this.noMoreSessions=!1,this.authenticated=!1,this.on("error",E);const I=n?(e,t,r)=>{n(`Debug output from client: ${JSON.stringify(r)}`)}:void 0,y="number"==typeof l.keepaliveInterval&&isFinite(l.keepaliveInterval)&&l.keepaliveInterval>0?l.keepaliveInterval:"number"==typeof M.KEEPALIVE_CLIENT_INTERVAL&&isFinite(M.KEEPALIVE_CLIENT_INTERVAL)&&M.KEEPALIVE_CLIENT_INTERVAL>0?M.KEEPALIVE_CLIENT_INTERVAL:-1,N="number"==typeof l.keepaliveCountMax&&isFinite(l.keepaliveCountMax)&&l.keepaliveCountMax>=0?l.keepaliveCountMax:"number"==typeof M.KEEPALIVE_CLIENT_COUNT_MAX&&isFinite(M.KEEPALIVE_CLIENT_COUNT_MAX)&&M.KEEPALIVE_CLIENT_COUNT_MAX>=0?M.KEEPALIVE_CLIENT_COUNT_MAX:-1;let K=0;-1!==y&&-1!==N&&(this.once("ready",()=>{let e=()=>{clearInterval(h)};this.on("close",e).on("end",e),h=setInterval(()=>{if(++K>N){clearInterval(h);let e=Error("Keepalive timeout");e.level="client-timeout",this.emit("error",e),this.end()}else W.ping()},y)}),f=()=>{h&&h.refresh(),K=0});const W=this._protocol=new m({server:!0,hostKeys:t,ident:r,offer:i,onPacket:f,greeting:l.greeting,banner:l.banner,onWrite:t=>{T(e)&&e.write(t)},onError:t=>{W._destruct||e.removeAllListeners("data"),this.emit("error",t);try{e.end()}catch{}},onHeader:t=>{this.removeListener("error",E);let r={ip:e.remoteAddress,family:e.remoteFamily,port:e.remotePort,header:t};if(!a.emit("connection",this,r)){W.disconnect(d.BY_APPLICATION),e.end();return}t.greeting&&this.emit("greeting",t.greeting)},onHandshakeComplete:e=>{++g>1&&this.emit("rekey"),this.emit("handshake",e)},debug:n,messageHandlers:{DEBUG:I,DISCONNECT:(t,r,i)=>{if(r!==d.BY_APPLICATION){i||void 0===(i=u[r])&&(i=`Unexpected disconnection reason: ${r}`);let e=Error(i);e.code=r,this.emit("error",e)}e.end()},CHANNEL_OPEN:(e,t)=>{let r,i;if("session"===t.type&&this.noMoreSessions||!this.authenticated){let e=o.ADMINISTRATIVELY_PROHIBITED;return W.channelOpenFail(t.sender,e)}let a=-1,l=!1,c=()=>{l||(l=!0,void 0===r&&(r=-1===a?o.RESOURCE_SHORTAGE:o.CONNECT_FAILED),-1!==a&&this._chanMgr.remove(a),W.channelOpenFail(t.sender,r,""))},h=()=>(-1===(a=this._chanMgr.add())&&(r=o.RESOURCE_SHORTAGE,n&&n("Automatic rejection of incoming channel open: no channels available")),-1!==a),f=t.data;switch(t.type){case"session":if(s(this,"session")&&h()){i=()=>{if(l)return;l=!0;let e=new F(this,t,a);return this._chanMgr.update(a,e),W.channelOpenConfirm(t.sender,a,v,C),e},this.emit("session",i,c);return}break;case"direct-tcpip":if(s(this,"tcpip")&&h()){i=()=>{if(l)return;l=!0;let e=new w(this,{type:void 0,incoming:{id:a,window:v,packetSize:C,state:"open"},outgoing:{id:t.sender,window:t.window,packetSize:t.packetSize,state:"open"}},{server:!0});return this._chanMgr.update(a,e),W.channelOpenConfirm(t.sender,a,v,C),e},this.emit("tcpip",i,c,f);return}break;case"direct-streamlocal@openssh.com":if(s(this,"openssh.streamlocal")&&h()){i=()=>{if(l)return;l=!0;let e=new w(this,{type:void 0,incoming:{id:a,window:v,packetSize:C,state:"open"},outgoing:{id:t.sender,window:t.window,packetSize:t.packetSize,state:"open"}},{server:!0});return this._chanMgr.update(a,e),W.channelOpenConfirm(t.sender,a,v,C),e},this.emit("openssh.streamlocal",i,c,f);return}break;default:r=o.UNKNOWN_CHANNEL_TYPE,n&&n(`Automatic rejection of unsupported incoming channel open type: ${t.type}`)}void 0===r&&(r=o.ADMINISTRATIVELY_PROHIBITED,n&&n(`Automatic rejection of unexpected incoming channel open for: ${t.type}`)),c()},CHANNEL_OPEN_CONFIRMATION:(e,t)=>{let r=this._chanMgr.get(t.recipient);if("function"!=typeof r)return;let i=new w(this,{type:r.type,incoming:{id:t.recipient,window:v,packetSize:C,state:"open"},outgoing:{id:t.sender,window:t.window,packetSize:t.packetSize,state:"open"}},{server:!0});this._chanMgr.update(t.recipient,i),r(void 0,i)},CHANNEL_OPEN_FAILURE:(e,t,r,i)=>{let n=this._chanMgr.get(t);"function"!=typeof n||L(this,t,{reason:r,description:i},n)},CHANNEL_DATA:(e,t,r)=>{let i=this._chanMgr.get(t);if("object"==typeof i&&null!==i){if((i.constructor!==F||(i=i._channel))&&0!==i.incoming.window){if(i.incoming.window-=r.length,!1===i.push(r)){i._waitChanDrain=!0;return}i.incoming.window<=k&&B(i)}}},CHANNEL_EXTENDED_DATA:(e,t,r,i)=>{},CHANNEL_WINDOW_ADJUST:(e,t,r)=>{let i=this._chanMgr.get(t);if("object"==typeof i&&null!==i){if(i.constructor===F&&!(i=i._channel))return;i.outgoing.window+=r,i._waitWindow&&(i._waitWindow=!1,i._chunk?i._write(i._chunk,null,i._chunkcb):i._chunkcb?i._chunkcb():i._chunkErr?i.stderr._write(i._chunkErr,null,i._chunkcbErr):i._chunkcbErr&&i._chunkcbErr())}},CHANNEL_SUCCESS:(e,t)=>{let r=this._chanMgr.get(t);if("object"==typeof r&&null!==r){if(r.constructor===F&&!(r=r._channel))return;r._callbacks.length&&r._callbacks.shift()(!1)}},CHANNEL_FAILURE:(e,t)=>{let r=this._chanMgr.get(t);if("object"==typeof r&&null!==r){if(r.constructor===F&&!(r=r._channel))return;r._callbacks.length&&r._callbacks.shift()(!0)}},CHANNEL_REQUEST:(e,t,r,i,o)=>{let a,l,c=this._chanMgr.get(t);if("object"!=typeof c||null===c)return;let h=!1;if(c.constructor!==F){i&&W.channelFailure(c.outgoing.id);return}if(i&&("shell"!==r&&"exec"!==r&&"subsystem"!==r&&(a=()=>{h||c._ending||c._channel||(h=!0,W.channelSuccess(c._chanInfo.outgoing.id))}),l=()=>{h||c._ending||c._channel||(h=!0,W.channelFailure(c._chanInfo.outgoing.id))}),c._ending){l&&l();return}switch(r){case"env":if(s(c,"env"))return void c.emit("env",a,l,{key:o.name,val:o.value});break;case"pty-req":if(s(c,"pty"))return void c.emit("pty",a,l,o);break;case"window-change":s(c,"window-change")?c.emit("window-change",a,l,o):l&&l();break;case"x11-req":if(s(c,"x11"))return void c.emit("x11",a,l,o);break;case"signal":if(s(c,"signal"))return void c.emit("signal",a,l,{name:o});break;case"auth-agent-req@openssh.com":if(s(c,"auth-agent"))return void c.emit("auth-agent",a,l);break;case"shell":if(s(c,"shell")){a=()=>{if(h||c._ending||c._channel)return;h=!0,i&&W.channelSuccess(c._chanInfo.outgoing.id);let e=new w(this,c._chanInfo,{server:!0});return e.subtype=c.subtype=r,c._channel=e,e},c.emit("shell",a,l);return}break;case"exec":if(s(c,"exec")){a=()=>{if(h||c._ending||c._channel)return;h=!0,i&&W.channelSuccess(c._chanInfo.outgoing.id);let e=new w(this,c._chanInfo,{server:!0});return e.subtype=c.subtype=r,c._channel=e,e},c.emit("exec",a,l,{command:o});return}break;case"subsystem":{let e="sftp"===o;if(a=()=>{let t;if(!h&&!c._ending&&!c._channel)return h=!0,i&&W.channelSuccess(c._chanInfo.outgoing.id),e?t=new S(this,c._chanInfo,{server:!0,debug:n}):(t=new w(this,c._chanInfo,{server:!0})).subtype=c.subtype=`${r}:${o}`,c._channel=t,t},"sftp"===o){if(s(c,"sftp"))return void c.emit("sftp",a,l);e=!1}if(s(c,"subsystem"))return void c.emit("subsystem",a,l,{name:o})}}n&&n(`Automatic rejection of incoming channel request: ${r}`),l&&l()},CHANNEL_EOF:(e,t)=>{let r=this._chanMgr.get(t);"object"!=typeof r||null===r||(r.constructor!==F||(r._ending||(r._ending=!0,r.emit("eof"),r.emit("end")),r=r._channel))&&"open"===r.incoming.state&&(r.incoming.state="eof",r.readable&&r.push(null))},CHANNEL_CLOSE:(e,t)=>{let r=this._chanMgr.get(t);if("object"==typeof r&&null!==r){if(r.constructor===F&&(r._ending=!0,r.emit("close"),!(r=r._channel)))return;U(this,t,r)}},SERVICE_REQUEST:(t,r)=>{if(0===g||p||this.authenticated||"ssh-userauth"!==r){W.disconnect(d.SERVICE_NOT_AVAILABLE),e.end();return}p=!0,W.serviceAccept(r)},USERAUTH_REQUEST:(t,r,i,n,o)=>{let a;if(0===g||this.authenticated||c&&(c.username!==r||c.service!==i)||"password"!==n&&"publickey"!==n&&"hostbased"!==n&&"keyboard-interactive"!==n&&"none"!==n||10===A.length){W.disconnect(d.PROTOCOL_ERROR),e.end();return}if("ssh-connection"!==i){W.disconnect(d.SERVICE_NOT_AVAILABLE),e.end();return}switch(n){case"keyboard-interactive":a=new P(W,r,i,n,o,q);break;case"publickey":a=new Q(W,r,i,n,o,q);break;case"hostbased":a=new D(W,r,i,n,o,q);break;case"password":if(c&&c instanceof H&&c._changeCb){let e=c._changeCb;c._changeCb=void 0,e(o.newPassword);return}a=new H(W,r,i,n,o,q);break;case"none":a=new O(W,r,i,n,q)}if(c)if(!c._initialResponse)return A.push(a);else c._multistep&&!c._finalResponse&&(c._cleanup&&c._cleanup(),c.emit("abort"));c=a,s(this,"authentication")?this.emit("authentication",c):c.reject()},USERAUTH_INFO_RESPONSE:(e,t)=>{c&&c instanceof P&&c._onInfoResponse(t)},GLOBAL_REQUEST:(e,t,r,i)=>{let n={type:null,buf:null};function o(e,t){n.type=e,n.buf=t,function(){for(;_.length>0&&_[0].type;){let e=_.shift();"SUCCESS"===e.type&&W.requestSuccess(e.buf),"FAILURE"===e.type&&W.requestFailure()}}()}if(r&&_.push(n),("tcpip-forward"===t||"cancel-tcpip-forward"===t||"no-more-sessions@openssh.com"===t||"streamlocal-forward@openssh.com"===t||"cancel-streamlocal-forward@openssh.com"===t)&&s(this,"request")&&this.authenticated){let e,n;if(r){let r=!1;e=e=>{let n;r||(r=!0,"tcpip-forward"===t&&0===i.bindPort&&"number"==typeof e&&x(n=Buffer.allocUnsafe(4),e,0),o("SUCCESS",n))},n=()=>{r||(r=!0,o("FAILURE"))}}if("no-more-sessions@openssh.com"===t){this.noMoreSessions=!0,e&&e();return}this.emit("request",e,n,t,i)}else r&&o("FAILURE")}}});e.pause(),b.then(()=>{W.start(),e.on("data",t=>{try{W.parse(t,0,t.length)}catch(t){this.emit("error",t);try{T(e)&&e.end()}catch{}}}),e.resume()}).catch(t=>{this.emit("error",t);try{T(e)&&e.end()}catch{}}),e.on("error",e=>{e.level="socket",this.emit("error",e)}).once("end",()=>{n&&n("Socket ended"),W.cleanup(),this.emit("end")}).once("close",()=>{n&&n("Socket closed"),W.cleanup(),this.emit("close");let e=Error("No response from server");this._chanMgr.cleanup(e)});const q=(e,t,r,i)=>{c===e&&!this.authenticated&&(t?(c=void 0,this.authenticated=!0,W.authSuccess(),A=[],this.emit("ready")):(W.authFailure(r,i),A.length&&(c=A.pop(),s(this,"authentication")?this.emit("authentication",c):c.reject())))}}end(){return this._sock&&T(this._sock)&&(this._protocol.disconnect(d.BY_APPLICATION),this._sock.end()),this}x11(e,t,r){return W(this,"x11",{originAddr:e,originPort:t},r),this}forwardOut(e,t,r,i,n){return W(this,"forwarded-tcpip",{boundAddr:e,boundPort:t,remoteAddr:r,remotePort:i},n),this}openssh_forwardOutStreamLocal(e,t){return W(this,"forwarded-streamlocal@openssh.com",{socketPath:e},t),this}rekey(e){let t;try{this._protocol.rekey()}catch(e){t=e}"function"==typeof e&&(t?process.nextTick(e,t):this.once("rekey",e))}setNoDelay(e){return this._sock&&"function"==typeof this._sock.setNoDelay&&this._sock.setNoDelay(e),this}}function W(e,t,r,i){"function"==typeof r&&(i=r,r={});let n=(e,t)=>{i(e,t)};n.type=t;let s=e._chanMgr.add(n);if(-1===s)return void i(Error("No free channels available"));switch(t){case"forwarded-tcpip":e._protocol.forwardedTcpip(s,v,C,r);break;case"x11":e._protocol.x11(s,v,C,r);break;case"forwarded-streamlocal@openssh.com":e._protocol.openssh_forwardedStreamLocal(s,v,C,r);break;default:throw Error(`Unsupported channel type: ${t}`)}}function q(e,t){return e-t}t.exports=M,t.exports.IncomingClient=K},853204,(e,t,r)=>{"use strict";let{createCipheriv:i,generateKeyPair:n,generateKeyPairSync:s,getCurves:o,randomBytes:a}=e.r(254799),{Ber:l}=e.r(342085),c=e.r(245594).pbkdf,{CIPHER_INFO:h}=e.r(866310),f=o(),d=new Map(Object.entries(h));function u(e,t){if("string"!=typeof e)throw TypeError("Key type must be a string");let r={type:"spki",format:"der"},i={type:"pkcs8",format:"der"};switch(e.toLowerCase()){case"rsa":{if("object"!=typeof t||null===t)throw TypeError("Missing options object for RSA key");let e=t.bits;if(!Number.isInteger(e))throw TypeError("RSA bits must be an integer");if(e<=0||e>16384)throw RangeError("RSA bits must be non-zero and <= 16384");return["rsa",{modulusLength:e,publicKeyEncoding:r,privateKeyEncoding:i}]}case"ecdsa":{let e;if("object"!=typeof t||null===t)throw TypeError("Missing options object for ECDSA key");if(!Number.isInteger(t.bits))throw TypeError("ECDSA bits must be an integer");switch(t.bits){case 256:e="prime256v1";break;case 384:e="secp384r1";break;case 521:e="secp521r1";break;default:throw Error("ECDSA bits must be 256, 384, or 521")}if(!f.includes(e))throw Error("Unsupported ECDSA bits value");return["ec",{namedCurve:e,publicKeyEncoding:r,privateKeyEncoding:i}]}case"ed25519":return["ed25519",{publicKeyEncoding:r,privateKeyEncoding:i}];default:throw Error(`Unsupported key type: ${e}`)}}function g(e,t,r,n){let s,o="new",h="";if("object"==typeof n&&null!==n&&("string"==typeof n.comment&&n.comment&&(h=n.comment),"string"==typeof n.format&&n.format&&(o=n.format),n.passphrase)){let e;if("string"==typeof n.passphrase)e=Buffer.from(n.passphrase);else if(Buffer.isBuffer(n.passphrase))e=n.passphrase;else throw Error("Invalid passphrase");if(void 0===n.cipher)throw Error("Missing cipher name");let t=d.get(n.cipher);if(void 0===t)throw Error("Invalid cipher name");if("new"===o){let r=16;if(void 0!==n.rounds){if(!Number.isInteger(n.rounds))throw TypeError("rounds must be an integer");n.rounds>0&&(r=n.rounds)}let i=Buffer.allocUnsafe(t.keyLen+t.ivLen),o=a(16);if(0!==c(e,e.length,o,o.length,i,i.length,r))return Error("Failed to generate information to encrypt key");let l=Buffer.allocUnsafe(4+o.length+4);{let e=0;l.writeUInt32BE(o.length,e+=0),l.set(o,e+=4),l.writeUInt32BE(r,e+=o.length)}s={cipher:t,cipherName:n.cipher,kdfName:"bcrypt",kdfOptions:l,key:i.slice(0,t.keyLen),iv:i.slice(t.keyLen)}}}if("new"===o){let n,o,c="-----BEGIN OPENSSH PRIVATE KEY-----\n",f=Buffer.from(s?s.cipherName:"none"),d=Buffer.from(s?s.kdfName:"none"),u=s?s.kdfOptions:Buffer.alloc(0),g=s?s.cipher.blockLen:8,p=function(e,t,r){switch(e){case"rsa":{let e=new l.Reader(r);if(e.readSequence(),0!==e.readInt())throw Error("Unsupported version in RSA private key");if(e.readSequence(),"1.2.840.113549.1.1.1"!==e.readOID())throw Error("Bad RSA private OID");if(e.readByte()!==l.Null)throw Error("Malformed RSA private key (expected null)");if(0!==e.readByte())throw Error("Malformed RSA private key (expected zero-length null)");if((e=new l.Reader(e.readString(l.OctetString,!0))).readSequence(),0!==e.readInt())throw Error("Unsupported version in RSA private key");let t=e.readString(l.Integer,!0),i=e.readString(l.Integer,!0),n=e.readString(l.Integer,!0),s=e.readString(l.Integer,!0),o=e.readString(l.Integer,!0);e.readString(l.Integer,!0),e.readString(l.Integer,!0);let a=e.readString(l.Integer,!0),c=Buffer.from("ssh-rsa"),h=Buffer.allocUnsafe(4+c.length+4+t.length+4+i.length+4+n.length+4+a.length+4+s.length+4+o.length),f=0;h.writeUInt32BE(c.length,f+=0),h.set(c,f+=4),h.writeUInt32BE(t.length,f+=c.length),h.set(t,f+=4),h.writeUInt32BE(i.length,f+=t.length),h.set(i,f+=4),h.writeUInt32BE(n.length,f+=i.length),h.set(n,f+=4),h.writeUInt32BE(a.length,f+=n.length),h.set(a,f+=4),h.writeUInt32BE(s.length,f+=a.length),h.set(s,f+=4),h.writeUInt32BE(o.length,f+=s.length),h.set(o,f+=4);let d=Buffer.allocUnsafe(4+c.length+4+i.length+4+t.length);return f=0,d.writeUInt32BE(c.length,f+=0),d.set(c,f+=4),d.writeUInt32BE(i.length,f+=c.length),d.set(i,f+=4),d.writeUInt32BE(t.length,f+=i.length),d.set(t,f+=4),{sshName:c.toString(),priv:h,pub:d}}case"ec":{let e,i=new l.Reader(t);if(i.readSequence(),i.readSequence(),"1.2.840.10045.2.1"!==i.readOID())throw Error("Bad ECDSA public OID");i.readOID();let n=i.readString(l.BitString,!0);{let e=0;for(;e<n.length&&0===n[e];++e);e>0&&(n=n.slice(e))}if((i=new l.Reader(r)).readSequence(),0!==i.readInt())throw Error("Unsupported version in ECDSA private key");if(i.readSequence(),"1.2.840.10045.2.1"!==i.readOID())throw Error("Bad ECDSA private OID");switch(i.readOID()){case"1.2.840.10045.3.1.7":e="nistp256";break;case"1.3.132.0.34":e="nistp384";break;case"1.3.132.0.35":e="nistp521";break;default:throw Error("Unsupported curve in ECDSA private key")}if((i=new l.Reader(i.readString(l.OctetString,!0))).readSequence(),1!==i.readInt())throw Error("Unsupported version in ECDSA private key");let s=Buffer.concat([Buffer.from([0]),i.readString(l.OctetString,!0)]),o=Buffer.from(`ecdsa-sha2-${e}`);e=Buffer.from(e);let a=Buffer.allocUnsafe(4+o.length+4+e.length+4+n.length+4+s.length),c=0;a.writeUInt32BE(o.length,c+=0),a.set(o,c+=4),a.writeUInt32BE(e.length,c+=o.length),a.set(e,c+=4),a.writeUInt32BE(n.length,c+=e.length),a.set(n,c+=4),a.writeUInt32BE(s.length,c+=n.length),a.set(s,c+=4);let h=Buffer.allocUnsafe(4+o.length+4+e.length+4+n.length);return c=0,h.writeUInt32BE(o.length,c+=0),h.set(o,c+=4),h.writeUInt32BE(e.length,c+=o.length),h.set(e,c+=4),h.writeUInt32BE(n.length,c+=e.length),h.set(n,c+=4),{sshName:o.toString(),priv:a,pub:h}}case"ed25519":{let e=new l.Reader(t);if(e.readSequence(),e.readSequence(),"1.3.101.112"!==e.readOID())throw Error("Bad ED25519 public OID");let i=e.readString(l.BitString,!0);{let e=0;for(;e<i.length&&0===i[e];++e);e>0&&(i=i.slice(e))}if((e=new l.Reader(r)).readSequence(),0!==e.readInt())throw Error("Unsupported version in ED25519 private key");if(e.readSequence(),"1.3.101.112"!==e.readOID())throw Error("Bad ED25519 private OID");let n=(e=new l.Reader(e.readString(l.OctetString,!0))).readString(l.OctetString,!0),s=Buffer.from("ssh-ed25519"),o=Buffer.allocUnsafe(4+s.length+4+i.length+4+(n.length+i.length)),a=0;o.writeUInt32BE(s.length,a+=0),o.set(s,a+=4),o.writeUInt32BE(i.length,a+=s.length),o.set(i,a+=4),o.writeUInt32BE(n.length+i.length,a+=i.length),o.set(n,a+=4),o.set(i,a+=n.length);let c=Buffer.allocUnsafe(4+s.length+4+i.length);return a=0,c.writeUInt32BE(s.length,a+=0),c.set(s,a+=4),c.writeUInt32BE(i.length,a+=s.length),c.set(i,a+=4),{sshName:s.toString(),priv:o,pub:c}}}}(e,t,r),A=a(4),_=Buffer.from(h),E=8+p.priv.length+4+_.length,b=[];for(let e=1;(E+b.length)%g;++e)b.push(255&e);b=Buffer.from(b);let I=Buffer.allocUnsafe(E+b.length);{let e=0;I.set(A,e+=0),I.set(A,e+=4),I.set(p.priv,e+=4),I.writeUInt32BE(_.length,e+=p.priv.length),I.set(_,e+=4),I.set(b,e+=_.length)}if(s){let e={authTagLength:s.cipher.authLen},t=i(s.cipher.sslName,s.key,s.iv,e);t.setAutoPadding(!1),I=Buffer.concat([t.update(I),t.final()]),o=s.cipher.authLen>0?t.getAuthTag():Buffer.alloc(0),s.key.fill(0),s.iv.fill(0)}else o=Buffer.alloc(0);let y=Buffer.from("openssh-key-v1\0"),m=Buffer.allocUnsafe(y.length+4+f.length+4+d.length+4+u.length+4+4+p.pub.length+4+I.length+o.length);{let e=0;m.set(y,e+=0),m.writeUInt32BE(f.length,e+=y.length),m.set(f,e+=4),m.writeUInt32BE(d.length,e+=f.length),m.set(d,e+=4),m.writeUInt32BE(u.length,e+=d.length),m.set(u,e+=4),m.writeUInt32BE(1,e+=u.length),m.writeUInt32BE(p.pub.length,e+=4),m.set(p.pub,e+=4),m.writeUInt32BE(I.length,e+=p.pub.length),m.set(I,e+=4),m.set(o,e+=I.length)}{let e=m.base64Slice(0,m.length),t=e.replace(/.{64}/g,"$&\n");63&e.length&&(t+="\n"),c+=t}{let e=p.pub.base64Slice(0,p.pub.length);n=`${p.sshName} ${e}${h?` ${h}`:""}`}return{private:c+="-----END OPENSSH PRIVATE KEY-----\n",public:n}}throw Error("Invalid output key format")}function p(){}t.exports={generateKeyPair:(e,t,r)=>{"function"==typeof t&&(r=t,t=void 0),"function"!=typeof r&&(r=p);let i=u(e,t);n(...i,(e,n,s)=>{let o;if(e)return r(e);try{o=g(i[0],n,s,t)}catch(e){return r(e)}r(null,o)})},generateKeyPairSync:(e,t)=>{let r=u(e,t),{publicKey:i,privateKey:n}=s(...r);return g(r[0],i,n,t)}}},7309,(e,t,r)=>{"use strict";let{AgentProtocol:i,BaseAgent:n,createAgent:s,CygwinAgent:o,OpenSSHAgent:a,PageantAgent:l}=e.r(768738),{SSHTTPAgent:c,SSHTTPSAgent:h}=e.r(28931),{parseKey:f}=e.r(939649),{flagsToString:d,OPEN_MODE:u,STATUS_CODE:g,stringToFlags:p}=e.r(740731);t.exports={AgentProtocol:i,BaseAgent:n,createAgent:s,Client:e.r(728510),CygwinAgent:o,HTTPAgent:c,HTTPSAgent:h,OpenSSHAgent:a,PageantAgent:l,Server:e.r(904336),utils:{parseKey:f,...e.r(853204),sftp:{flagsToString:d,OPEN_MODE:u,STATUS_CODE:g,stringToFlags:p}}}},327718,e=>{"use strict";var t=e.i(850492),r=e.i(891119),i=e.i(697373),n=e.i(765700),s=e.i(601263),o=e.i(706859),a=e.i(947547),l=e.i(819797),c=e.i(135958),h=e.i(86520),f=e.i(970949),d=e.i(741165),u=e.i(106898),g=e.i(454415),p=e.i(37125),A=e.i(193695);e.i(530058);var _=e.i(605998),E=e.i(522734),b=e.i(814747),I=e.i(192441),y=e.i(449719),m=e.i(47963),S=e.i(804340);class x{constructor({concurrency:e=1}={}){this.options={concurrency:e},this.running=0,this.queue=[],this.idleCallbacks=[]}clear(){this.queue=[]}onIdle(e){return this.idleCallbacks.push(e),()=>{let t=this.idleCallbacks.indexOf(e);-1!==t&&this.idleCallbacks.splice(t,1)}}waitTillIdle(){return new Promise(e=>{if(0===this.running)return void e();let t=this.onIdle(()=>{t(),e()})})}add(e){return new Promise((t,r)=>{let i=()=>{this.running+=1;try{Promise.resolve(e()).then(e=>{t(e),this.processNext()},e=>{r(e),this.processNext()})}catch(e){r(e),this.processNext()}};this.running>=this.options.concurrency?this.queue.push(i):i()})}processNext(){this.running-=1;let e=this.queue.shift();e?e():0===this.running&&this.idleCallbacks.forEach(e=>e())}}let w={join:(e,t)=>b.default.join(e,t),basename:e=>b.default.basename(e),stat:e=>new Promise((t,r)=>{E.default.stat(e,(e,i)=>{e?r(e):t(i)})}),readdir:e=>new Promise((t,r)=>{E.default.readdir(e,(e,i)=>{e?r(e):t(i)})})};async function v({path:e,recursive:t,validate:r,result:i,fileSystem:n,queue:s,reject:o}){let a=await n.stat(e);a.isFile()?i.files.push(e):a.isDirectory()&&i.directories.push(e),a.isDirectory()&&"none"!==t&&(await n.readdir(e)).forEach(a=>{let l=n.join(e,a);r(l)&&s.add(()=>v({path:l,recursive:"shallow"===t?"none":"deep",validate:r,result:i,fileSystem:n,queue:s,reject:o})).catch(o)})}async function C(e,{recursive:t=!0,validate:r=null,concurrency:i=1/0,fileSystem:n=w}={}){(0,y.default)(e&&"string"==typeof e,"path must be a valid string"),(0,y.default)("boolean"==typeof t,"options.recursive must be a valid boolean"),(0,y.default)(null===r||"function"==typeof r,"options.validate must be a valid function"),(0,y.default)("number"==typeof i,"options.concurrency must be a valid number"),(0,y.default)(null!==n&&"object"==typeof n,"options.fileSystem must be a valid object");let s=new x({concurrency:i}),o={files:[],directories:[]},a={...w,...n};return await new Promise((i,n)=>{v({path:e,recursive:t?"deep":"shallow",validate:null!=r?r:e=>"."!==a.basename(e).slice(0,1),result:o,fileSystem:a,queue:s,reject:n}).then(()=>s.waitTillIdle()).then(i,n)}),o}var B=e.i(70201),k=e.i(7309);let R=e=>!b.default.basename(e).startsWith("."),N=()=>{};class T extends Error{constructor(e,t=null){super(e),this.code=t}}function L(e){return e.includes("\\")?e.split("\\").join("/"):e}async function U(e){return new Promise((t,r)=>{E.default.readFile(e,"utf8",(e,i)=>{e?r(e):t(i)})})}let O=/Error: (E[\S]+): /;async function P(e,t){let r=null;try{r=await new Promise((r,i)=>{t.stat(e,(e,t)=>{e?i(e):r(t)})})}catch(e){}if(r){if(r.isDirectory())return;throw Error("mkdir() failed, target already exists and is not a directory")}try{await new Promise((r,i)=>{t.mkdir(e,e=>{e?i(e):r()})})}catch(e){if(null!=e&&"string"==typeof e.stack){let t=O.exec(e.stack);if(null!=t)throw new T(e.message,t[1]);throw e}}}class Q{constructor(){this.connection=null}getConnection(){let{connection:e}=this;if(null==e)throw Error("Not connected to server");return e}async connect(e){(0,y.default)(null!=e&&"object"==typeof e,"config must be a valid object");let t={...e};if((0,y.default)(null!=t.username&&"string"==typeof t.username,"config.username must be a valid string"),null!=t.host)(0,y.default)("string"==typeof t.host,"config.host must be a valid string");else if(null!=t.sock)(0,y.default)("object"==typeof t.sock,"config.sock must be a valid object");else throw new y.AssertionError({message:"Either config.host or config.sock must be provided"});if(null!=t.privateKey||null!=t.privateKeyPath){if(null!=t.privateKey?((0,y.default)("string"==typeof t.privateKey,"config.privateKey must be a valid string"),(0,y.default)(null==t.privateKeyPath,"config.privateKeyPath must not be specified when config.privateKey is specified")):null!=t.privateKeyPath&&((0,y.default)("string"==typeof t.privateKeyPath,"config.privateKeyPath must be a valid string"),(0,y.default)(null==t.privateKey,"config.privateKey must not be specified when config.privateKeyPath is specified")),(0,y.default)(null==t.passphrase||"string"==typeof t.passphrase,"config.passphrase must be null or a valid string"),null!=t.privateKeyPath)try{t.privateKey=await U(t.privateKeyPath)}catch(e){if(null!=e&&"ENOENT"===e.code)throw new y.AssertionError({message:"config.privateKeyPath does not exist at given fs path"});throw e}}else null!=t.password&&(0,y.default)("string"==typeof t.password,"config.password must be a valid string");if(null!=t.tryKeyboard&&(0,y.default)("boolean"==typeof t.tryKeyboard,"config.tryKeyboard must be a valid boolean"),t.tryKeyboard){let{password:e}=t;null!=t.onKeyboardInteractive?(0,y.default)("function"==typeof t.onKeyboardInteractive,"config.onKeyboardInteractive must be a valid function"):null!=e&&(t.onKeyboardInteractive=(t,r,i,n,s)=>{n.length>0&&n[0].prompt.toLowerCase().includes("password")&&s([e])})}let r=new k.default.Client;return this.connection=r,await new Promise((e,i)=>{r.on("error",i),t.onKeyboardInteractive&&r.on("keyboard-interactive",t.onKeyboardInteractive),r.on("ready",()=>{r.removeListener("error",i),e()}),r.on("end",()=>{this.connection===r&&(this.connection=null)}),r.on("close",()=>{this.connection===r&&(this.connection=null),i(new T("No response from server","ETIMEDOUT"))}),r.connect(t)}),this}isConnected(){return null!=this.connection}async requestShell(e){let t=this.getConnection();return new Promise((r,i)=>{t.on("error",i);let n=(e,n)=>{t.removeListener("error",i),e?i(e):r(n)};null==e?t.shell(n):t.shell(e,n)})}async withShell(e,t){(0,y.default)("function"==typeof e,"callback must be a valid function");let r=await this.requestShell(t);try{await e(r)}finally{r.destroy()}}async requestSFTP(){let e=this.getConnection();return new Promise((t,r)=>{e.on("error",r),e.sftp((i,n)=>{e.removeListener("error",r),i?r(i):t(n)})})}async withSFTP(e){(0,y.default)("function"==typeof e,"callback must be a valid function");let t=await this.requestSFTP();try{await e(t)}finally{t.end()}}async execCommand(e,t={}){(0,y.default)("string"==typeof e,"command must be a valid string"),(0,y.default)(null!=t&&"object"==typeof t,"options must be a valid object"),(0,y.default)(null==t.cwd||"string"==typeof t.cwd,"options.cwd must be a valid string"),(0,y.default)(null==t.stdin||"string"==typeof t.stdin||m.default.readable(t.stdin),"options.stdin must be a valid string or readable stream"),(0,y.default)(null==t.execOptions||"object"==typeof t.execOptions,"options.execOptions must be a valid object"),(0,y.default)(null==t.encoding||"string"==typeof t.encoding,"options.encoding must be a valid string"),(0,y.default)(null==t.onChannel||"function"==typeof t.onChannel,"options.onChannel must be a valid function"),(0,y.default)(null==t.onStdout||"function"==typeof t.onStdout,"options.onStdout must be a valid function"),(0,y.default)(null==t.onStderr||"function"==typeof t.onStderr,"options.onStderr must be a valid function"),(0,y.default)(null==t.noTrim||"boolean"==typeof t.noTrim,"options.noTrim must be a boolean");let r=e;t.cwd&&(r=`cd ${(0,B.default)([t.cwd])} ; ${r}`);let i=this.getConnection(),n=[],s=[];return new Promise((e,o)=>{i.on("error",o),i.exec(r,null!=t.execOptions?t.execOptions:{},(r,a)=>{if(i.removeListener("error",o),r)return void o(r);t.onChannel&&t.onChannel(a),a.on("data",e=>{t.onStdout&&t.onStdout(e),n.push(e.toString(t.encoding))}),a.stderr.on("data",e=>{t.onStderr&&t.onStderr(e),s.push(e.toString(t.encoding))}),null!=t.stdin?m.default.readable(t.stdin)?t.stdin.pipe(a,{end:!0}):(a.write(t.stdin),a.end()):a.end();let l=null,c=null;a.on("exit",(e,t)=>{l=null!=e?e:null,c=null!=t?t:null}),a.on("close",()=>{let r=n.join(""),i=s.join("");!0!==t.noTrim&&(r=r.trim(),i=i.trim()),e({code:null!=l?l:null,signal:null!=c?c:null,stdout:r,stderr:i})})})})}async exec(e,t,r={}){(0,y.default)("string"==typeof e,"command must be a valid string"),(0,y.default)(Array.isArray(t),"parameters must be a valid array"),(0,y.default)(null!=r&&"object"==typeof r,"options must be a valid object"),(0,y.default)(null==r.stream||["both","stdout","stderr"].includes(r.stream),"options.stream must be one of both, stdout, stderr");for(let e=0,{length:r}=t;e<r;e+=1)(0,y.default)("string"==typeof t[e],`parameters[${e}] must be a valid string`);let i=`${e}${t.length>0?` ${(0,B.default)(t)}`:""}`,n=await this.execCommand(i,r);if(null==r.stream||"stdout"===r.stream){if(n.stderr)throw Error(n.stderr);return n.stdout}return"stderr"===r.stream?n.stderr:n}async mkdir(e,t="sftp",r=null){if((0,y.default)("string"==typeof e,"path must be a valid string"),(0,y.default)("string"==typeof t&&("sftp"===t||"exec"===t),"method must be either sftp or exec"),(0,y.default)(null==r||"object"==typeof r,"sftp must be a valid object"),"exec"===t)return void await this.exec("mkdir",["-p",L(e)]);let i=r||await this.requestSFTP(),n=async t=>P(L(e),i).catch(async r=>{if(!t||null==r||"No such file"!==r.message&&"ENOENT"!==r.code)throw r;await this.mkdir(b.default.dirname(e),"sftp",i),await n(!1)});try{await n(!0)}finally{r||i.end()}}async getFile(e,t,r=null,i=null){(0,y.default)("string"==typeof e,"localFile must be a valid string"),(0,y.default)("string"==typeof t,"remoteFile must be a valid string"),(0,y.default)(null==r||"object"==typeof r,"sftp must be a valid object"),(0,y.default)(null==i||"object"==typeof i,"transferOptions must be a valid object");let n=r||await this.requestSFTP();try{await new Promise((r,s)=>{n.fastGet(L(t),e,i||{},e=>{e?s(e):r()})})}finally{r||n.end()}}async putFile(e,t,r=null,i=null){(0,y.default)("string"==typeof e,"localFile must be a valid string"),(0,y.default)("string"==typeof t,"remoteFile must be a valid string"),(0,y.default)(null==r||"object"==typeof r,"sftp must be a valid object"),(0,y.default)(null==i||"object"==typeof i,"transferOptions must be a valid object"),(0,y.default)(await new Promise(t=>{E.default.access(e,E.default.constants.R_OK,e=>{t(null===e)})}),`localFile does not exist at ${e}`);let n=r||await this.requestSFTP(),s=r=>new Promise((o,a)=>{n.fastPut(e,L(t),i||{},e=>{null==e?o():"No such file"===e.message&&r?o(this.mkdir(b.default.dirname(t),"sftp",n).then(()=>s(!1))):a(e)})});try{await s(!0)}finally{r||n.end()}}async putFiles(e,{concurrency:t=1,sftp:r=null,transferOptions:i={}}={}){(0,y.default)(Array.isArray(e),"files must be an array");for(let t=0,{length:r}=e;t<r;t+=1){let r=e[t];(0,y.default)(r,"files items must be valid objects"),(0,y.default)(r.local&&"string"==typeof r.local,`files[${t}].local must be a string`),(0,y.default)(r.remote&&"string"==typeof r.remote,`files[${t}].remote must be a string`)}let n=[],s=r||await this.requestSFTP(),o=new x({concurrency:t});try{await new Promise((t,r)=>{e.forEach(e=>{o.add(async()=>{await this.putFile(e.local,e.remote,s,i),n.push(e)}).catch(r)}),o.waitTillIdle().then(t)})}catch(e){throw null!=e&&(e.transferred=n),e}finally{r||s.end()}}async putDirectory(e,t,{concurrency:r=1,sftp:i=null,transferOptions:n={},recursive:s=!0,tick:o=N,validate:a=R}={}){(0,y.default)("string"==typeof e&&e,"localDirectory must be a string"),(0,y.default)("string"==typeof t&&t,"remoteDirectory must be a string");let l=await new Promise(t=>{E.default.stat(e,(e,r)=>{t(r||null)})});(0,y.default)(null!=l,`localDirectory does not exist at ${e}`),(0,y.default)(l.isDirectory(),`localDirectory is not a directory at ${e}`);let c=i||await this.requestSFTP(),h=await C(e,{recursive:s,validate:a}),f=h.files.map(t=>b.default.relative(e,t)),d=h.directories.map(t=>b.default.relative(e,t));d.sort((e,t)=>e.length-t.length);let u=!1;try{await new Promise((e,i)=>{let n=new x({concurrency:r});d.forEach(e=>{n.add(async()=>{await this.mkdir(b.default.join(t,e),"sftp",c)}).catch(i)}),e(n.waitTillIdle())}),await new Promise((i,s)=>{let a=new x({concurrency:r});f.forEach(r=>{a.add(async()=>{let i=b.default.join(e,r),s=b.default.join(t,r);try{await this.putFile(i,s,c,n),o(i,s,null)}catch(e){u=!0,o(i,s,e)}}).catch(s)}),i(a.waitTillIdle())})}finally{i||c.end()}return!u}async getDirectory(e,t,{concurrency:r=1,sftp:i=null,transferOptions:n={},recursive:s=!0,tick:o=N,validate:a=R}={}){(0,y.default)("string"==typeof e&&e,"localDirectory must be a string"),(0,y.default)("string"==typeof t&&t,"remoteDirectory must be a string");let l=await new Promise(t=>{E.default.stat(e,(e,r)=>{t(r||null)})});(0,y.default)(null!=l,`localDirectory does not exist at ${e}`),(0,y.default)(l.isDirectory(),`localDirectory is not a directory at ${e}`);let c=i||await this.requestSFTP(),h=await C(t,{recursive:s,validate:a,concurrency:r,fileSystem:{basename:e=>b.default.posix.basename(e),join:(e,t)=>b.default.posix.join(e,t),readdir:e=>new Promise((t,r)=>{c.readdir(e,(e,i)=>{e?r(e):t(i.map(e=>e.filename))})}),stat:e=>new Promise((t,r)=>{c.stat(e,(e,i)=>{e?r(e):t(i)})})}}),f=h.files.map(e=>b.default.relative(t,e)),d=h.directories.map(e=>b.default.relative(t,e));d.sort((e,t)=>e.length-t.length);let u=!1;try{await new Promise((t,i)=>{let n=new x({concurrency:r});d.forEach(t=>{n.add(async()=>{await (0,S.default)(b.default.join(e,t))}).catch(i)}),t(n.waitTillIdle())}),await new Promise((i,s)=>{let a=new x({concurrency:r});f.forEach(r=>{a.add(async()=>{let i=b.default.join(e,r),s=b.default.join(t,r);try{await this.getFile(i,s,c,n),o(i,s,null)}catch(e){u=!0,o(i,s,e)}}).catch(s)}),i(a.waitTillIdle())})}finally{i||c.end()}return!u}forwardIn(e,t,r){let i=this.getConnection();return new Promise((n,s)=>{i.forwardIn(e,t,(t,o)=>{if(t)return void s(t);let a=(t,i,n)=>{t.destIP===e&&t.destPort===o&&(null==r||r(t,i,n))};r&&i.on("tcp connection",a),n({port:o,dispose:()=>new Promise((r,n)=>{i.off("tcp connection",a),i.unforwardIn(e,o,e=>{e&&n(t),r()})})})})})}forwardOut(e,t,r,i){let n=this.getConnection();return new Promise((s,o)=>{n.forwardOut(e,t,r,i,(e,t)=>{e?o(e):s(t)})})}forwardInStreamLocal(e,t){let r=this.getConnection();return new Promise((i,n)=>{r.openssh_forwardInStreamLocal(e,s=>{if(s)return void n(s);let o=(r,i,n)=>{r.socketPath===e&&(null==t||t(r,i,n))};t&&r.on("unix connection",o),i({dispose:()=>new Promise((t,i)=>{r.off("unix connection",o),r.openssh_unforwardInStreamLocal(e,e=>{e&&i(e),t()})})})})})}forwardOutStreamLocal(e){let t=this.getConnection();return new Promise((r,i)=>{t.openssh_forwardOutStreamLocal(e,(e,t)=>{e?i(e):r(t)})})}dispose(){this.connection&&(this.connection.end(),this.connection=null)}}async function D(t){let{serverId:r,host:i,username:n,privateKeyOrPassword:s,envVars:o,newPassword:a}=await t.json(),l=new ReadableStream({async start(t){function l(e){try{t.enqueue(new TextEncoder().encode(`data: ${JSON.stringify(e)}
7
+
8
+ `))}catch(e){}}function c(e){l({type:"log",message:e})}function h(e){l({type:"error",error:e});try{t.close()}catch(e){}}let f=r;if("default"===f){let e=await (0,I.getActiveServer)();e&&(f=e.id)}if(!i||!n||!s.value)return h("Host, username, and credentials are required.");try{c(`Preparing deployment for server ${f}...`);let r=process.cwd(),u=null;for(let e of[b.default.join(r,".larkup","servers",f,"config.json"),b.default.join(r,".larkup","config.json")])if(E.default.existsSync(e))try{u=JSON.parse(E.default.readFileSync(e,"utf-8"));break}catch{}if(!u)return h("Configuration not found. Please save your settings first.");let{generateServer:g}=await e.A(878169),p=g(u),A=[];for(let e of p.files)A.push({contents:e.contents,remotePath:e.path});let _=Object.entries(o).map(([e,t])=>`${e}=${t}`),I="lancedb"===u.vectorStore&&(u.storeConfig?.mode??"local")==="local";if(I&&_.push("LANCEDB_PATH=./.larkup/lancedb"),A.push({contents:_.join("\n"),remotePath:".env"}),I){let e=b.default.join(r,".larkup","servers",f,"lancedb");if(E.default.existsSync(e))for(let t of function e(t,r){let i=[];if(!E.default.existsSync(t))return i;for(let n of E.default.readdirSync(t)){if("node_modules"===n||".git"===n||"server.log"===n)continue;let s=b.default.join(t,n),o=E.default.statSync(s);if(o&&o.isDirectory())i=i.concat(e(s,r));else{let e=E.default.readFileSync(s),t=b.default.relative(r,s).replace(/\\/g,"/");i.push({file:t,data:e.toString("utf8")})}}return i}(e,b.default.join(r,".larkup","servers",f)))A.push({localPath:b.default.join(r,".larkup","servers",f,t.file),remotePath:t.file})}let y=a||"",m=new Q;c(`Connecting to ${n}@${i} via SSH...`);let S={host:i,username:n,privateKey:"key"===s.type?s.value:void 0,password:"password"===s.type?s.value:void 0,readyTimeout:2e4,tryKeyboard:!0,onKeyboardInteractive:(e,t,r,i,n)=>{if(i.length>0&&"password"===s.type){let e=i.map(e=>s.value);n(e)}else n([])}};await m.connect(S),c("Connected successfully.");let x=async(e,t)=>{c(`$ ${e}`);let r=await m.execCommand(e,{cwd:t?.cwd,onStdout:e=>c(e.toString("utf8").trimEnd()),onStderr:e=>c(e.toString("utf8").trimEnd())}),i=`${r.stdout} ${r.stderr}`.toLowerCase();if(i.includes("password change required")||i.includes("password has expired"))throw Error("PASSWORD_EXPIRED");if(0!==r.code&&!t?.ignoreErrors)throw Error(`Command failed (exit ${r.code}): ${e}
9
+ ${r.stderr}`);return r},w=`/opt/buddyhere-rag-${f}`,v=!1;try{await x("echo ok")}catch(e){if("PASSWORD_EXPIRED"===e.message)v=!0;else throw e}if(v){if(!y){c("⚠️ Password has expired! A new password is required."),l({type:"password_change_required"});try{t.close()}catch(e){}return}c("⚠️ Password has expired! Changing password..."),await new Promise((e,t)=>{let r=setTimeout(()=>{t(Error("Password change timed out after 30 seconds."))},3e4);m.requestShell({term:"xterm"}).then(i=>{let n="",o=0;i.on("data",t=>{let a=t.toString("utf8");n+=a;let l=a.replace(/\x1b\[[0-9;]*[a-zA-Z]/g,"").trim();l&&c(l);let h=n.toLowerCase();0===o?(h.includes("current")||h.includes("old"))&&h.includes("password")?(i.write(s.value+"\n"),n="",o=1):h.includes("new")&&h.includes("password")&&(i.write(y+"\n"),n="",o=2):1===o&&h.includes("new")&&h.includes("password")?(i.write(y+"\n"),n="",o=2):2===o&&(h.includes("retype")||h.includes("re-enter")||h.includes("confirm")||h.includes("new")&&h.includes("password"))?(i.write(y+"\n"),n="",o=3):3===o&&(h.includes("updated successfully")||h.includes("password changed")||h.includes("$")||h.includes("#"))&&(clearTimeout(r),i.end(),e())}),i.on("close",()=>{clearTimeout(r),e()}),i.on("error",e=>{clearTimeout(r),t(e)})}).catch(e=>{clearTimeout(r),t(e)})}),c("✅ Password changed successfully."),l({type:"password_changed",newPassword:y}),m.dispose(),c("Reconnecting with new password..."),m=new Q,await m.connect({...S,password:y,onKeyboardInteractive:(e,t,r,i,n)=>{n(i.length>0?i.map(()=>y):[])}}),c("Reconnected successfully.")}c("Checking for Docker...");let C=await x("docker --version",{ignoreErrors:!0});for(let e of(0!==C.code&&(c("Docker not found. Installing Docker (this may take a few minutes)..."),await x("curl -fsSL https://get.docker.com -o /tmp/get-docker.sh && sh /tmp/get-docker.sh")),c(`Creating remote directory ${w}...`),await x(`mkdir -p ${w}`),c(`Uploading ${A.length} files...`),A)){let t=b.default.posix.dirname(e.remotePath);t&&"."!==t&&await x(`mkdir -p ${w}/${t}`,{ignoreErrors:!0});let r=`${w}/${e.remotePath}`;if(e.localPath)c(` ↑ ${e.remotePath}`),await m.putFile(e.localPath,r);else if(e.contents){c(` ↑ ${e.remotePath}`);let t=b.default.join("/tmp",`buddyhere-upload-${Date.now()}-${Math.random().toString(36).substring(7)}`);E.default.writeFileSync(t,e.contents),await m.putFile(t,r),E.default.unlinkSync(t)}}c("Starting Docker containers..."),await x("docker compose down 2>/dev/null || true",{cwd:w,ignoreErrors:!0});let B=await x("docker compose up -d --build",{cwd:w,ignoreErrors:!0});0!==B.code&&(c("docker compose v2 failed, trying docker-compose v1..."),await x("docker-compose up -d --build",{cwd:w})),m.dispose(),c(`🎉 Deployment completed successfully!`);var d={success:!0,url:`http://${i}:8080`,newPassword:y||void 0};l({type:"done",...d});try{t.close()}catch(e){}}catch(e){console.error("SSH Deploy Error:",e),h(e.message||"Failed to deploy via SSH.")}}});return new Response(l,{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}})}e.s(["POST",0,D],940700);var H=e.i(940700);let F=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/deploy/ssh/route",pathname:"/api/deploy/ssh",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/apps/web/app/api/deploy/ssh/route.ts",nextConfigOutput:"standalone",userland:H,...{}}),{workAsyncStorage:M,workUnitAsyncStorage:K,serverHooks:W}=F;async function q(e,t,i){i.requestMeta&&(0,n.setRequestMeta)(e,i.requestMeta),F.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let E="/api/deploy/ssh/route";E=E.replace(/\/index$/,"")||"/";let b=await F.prepare(e,t,{srcPage:E,multiZoneDraftMode:!1});if(!b)return t.statusCode=400,t.end("Bad Request"),null==i.waitUntil||i.waitUntil.call(i,Promise.resolve()),null;let{buildId:I,deploymentId:y,params:m,nextConfig:S,parsedUrl:x,isDraftMode:w,prerenderManifest:v,routerServerContext:C,isOnDemandRevalidate:B,revalidateOnlyGenerated:k,resolvedPathname:R,clientReferenceManifest:N,serverActionsManifest:T}=b,L=(0,a.normalizeAppPath)(E),U=!!(v.dynamicRoutes[L]||v.routes[R]),O=async()=>((null==C?void 0:C.render404)?await C.render404(e,t,x,!1):t.end("This page could not be found"),null);if(U&&!w){let e=!!v.routes[R],t=v.dynamicRoutes[L];if(t&&!1===t.fallback&&!e){if(S.adapterPath)return await O();throw new A.NoFallbackError}}let P=null;!U||F.isDev||w||(P="/index"===(P=R)?"/":P);let Q=!0===F.isDev||!U,D=U&&!Q;T&&N&&(0,o.setManifestsSingleton)({page:E,clientReferenceManifest:N,serverActionsManifest:T});let H=e.method||"GET",M=(0,s.getTracer)(),K=M.getActiveScopeSpan(),W=!!(null==C?void 0:C.isWrappedByNextServer),q=!!(0,n.getRequestMeta)(e,"minimalMode"),$=(0,n.getRequestMeta)(e,"incrementalCache")||await F.getIncrementalCache(e,S,v,q);null==$||$.resetRequestCache(),globalThis.__incrementalCache=$;let G={params:m,previewProps:v.preview,renderOpts:{experimental:{authInterrupts:!!S.experimental.authInterrupts},cacheComponents:!!S.cacheComponents,supportsDynamicResponse:Q,incrementalCache:$,cacheLifeProfiles:S.cacheLife,waitUntil:i.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,i,n)=>F.onRequestError(e,t,i,n,C)},sharedContext:{buildId:I,deploymentId:y}},Y=new l.NodeNextRequest(e),j=new l.NodeNextResponse(t),X=c.NextRequestAdapter.fromNodeNextRequest(Y,(0,c.signalFromNodeResponse)(t));try{let n,o=async e=>F.handle(X,G).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=M.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==h.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let i=r.get("next.route");if(i){let t=`${H} ${i}`;e.setAttributes({"next.route":i,"http.route":i,"next.span_name":t}),e.updateName(t),n&&n!==e&&(n.setAttribute("http.route",i),n.updateName(t))}else e.updateName(`${H} ${E}`)}),a=async n=>{var s,a;let l=async({previousCacheEntry:r})=>{try{if(!q&&B&&k&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await o(n);e.fetchMetrics=G.renderOpts.fetchMetrics;let a=G.renderOpts.pendingWaitUntil;a&&i.waitUntil&&(i.waitUntil(a),a=void 0);let l=G.renderOpts.collectedTags;if(!U)return await (0,d.sendResponse)(Y,j,s,G.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,u.toNodeOutgoingHttpHeaders)(s.headers);l&&(t[p.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==G.renderOpts.collectedRevalidate&&!(G.renderOpts.collectedRevalidate>=p.INFINITE_CACHE)&&G.renderOpts.collectedRevalidate,i=void 0===G.renderOpts.collectedExpire||G.renderOpts.collectedExpire>=p.INFINITE_CACHE?void 0:G.renderOpts.collectedExpire;return{value:{kind:_.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:i}}}}catch(t){throw(null==r?void 0:r.isStale)&&await F.onRequestError(e,t,{routerKind:"App Router",routePath:E,routeType:"route",revalidateReason:(0,f.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:B})},!1,C),t}},c=await F.handleResponse({req:e,nextConfig:S,cacheKey:P,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:v,isRoutePPREnabled:!1,isOnDemandRevalidate:B,revalidateOnlyGenerated:k,responseGenerator:l,waitUntil:i.waitUntil,isMinimalMode:q});if(!U)return null;if((null==c||null==(s=c.value)?void 0:s.kind)!==_.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==c||null==(a=c.value)?void 0:a.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});q||t.setHeader("x-nextjs-cache",B?"REVALIDATED":c.isMiss?"MISS":c.isStale?"STALE":"HIT"),w&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let h=(0,u.fromNodeOutgoingHttpHeaders)(c.value.headers);return q&&U||h.delete(p.NEXT_CACHE_TAGS_HEADER),!c.cacheControl||t.getHeader("Cache-Control")||h.get("Cache-Control")||h.set("Cache-Control",(0,g.getCacheControlHeader)(c.cacheControl)),await (0,d.sendResponse)(Y,j,new Response(c.value.body,{headers:h,status:c.value.status||200})),null};W&&K?await a(K):(n=M.getActiveScopeSpan(),await M.withPropagatedContext(e.headers,()=>M.trace(h.BaseServerSpan.handleRequest,{spanName:`${H} ${E}`,kind:s.SpanKind.SERVER,attributes:{"http.method":H,"http.target":e.url}},a),void 0,!W))}catch(t){if(t instanceof A.NoFallbackError||await F.onRequestError(e,t,{routerKind:"App Router",routePath:L,routeType:"route",revalidateReason:(0,f.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:B})},!1,C),U)throw t;return await (0,d.sendResponse)(Y,j,new Response(null,{status:500})),null}}e.s(["handler",0,q,"patchFetch",0,function(){return(0,i.patchFetch)({workAsyncStorage:M,workUnitAsyncStorage:K})},"routeModule",0,F,"serverHooks",0,W,"workAsyncStorage",0,M,"workUnitAsyncStorage",0,K],327718)}];
10
+
11
+ //# sourceMappingURL=%5Broot-of-the-server%5D__0_by00t._.js.map