@socketsecurity/lib 0.0.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (555) hide show
  1. package/CHANGELOG.md +270 -0
  2. package/LICENSE +21 -0
  3. package/README.md +80 -2
  4. package/data/extensions.json +28 -0
  5. package/dist/abort.d.ts +11 -0
  6. package/dist/abort.js +62 -0
  7. package/dist/abort.js.map +7 -0
  8. package/dist/agent.d.ts +102 -0
  9. package/dist/agent.js +288 -0
  10. package/dist/agent.js.map +7 -0
  11. package/dist/ansi.d.ts +29 -0
  12. package/dist/ansi.js +62 -0
  13. package/dist/ansi.js.map +7 -0
  14. package/dist/argv/flags.d.ts +199 -0
  15. package/dist/argv/flags.js +284 -0
  16. package/dist/argv/flags.js.map +7 -0
  17. package/dist/argv/parse.d.ts +76 -0
  18. package/dist/argv/parse.js +173 -0
  19. package/dist/argv/parse.js.map +7 -0
  20. package/dist/arrays.d.ts +29 -0
  21. package/dist/arrays.js +87 -0
  22. package/dist/arrays.js.map +7 -0
  23. package/dist/bin.d.ts +50 -0
  24. package/dist/bin.js +405 -0
  25. package/dist/bin.js.map +7 -0
  26. package/dist/cacache.d.ts +86 -0
  27. package/dist/cacache.js +140 -0
  28. package/dist/cacache.js.map +7 -0
  29. package/dist/cache-with-ttl.d.ts +133 -0
  30. package/dist/cache-with-ttl.js +225 -0
  31. package/dist/cache-with-ttl.js.map +7 -0
  32. package/dist/constants/agents.d.ts +37 -0
  33. package/dist/constants/agents.js +128 -0
  34. package/dist/constants/agents.js.map +7 -0
  35. package/dist/constants/core.d.ts +22 -0
  36. package/dist/constants/core.js +59 -0
  37. package/dist/constants/core.js.map +7 -0
  38. package/dist/constants/encoding.d.ts +13 -0
  39. package/dist/constants/encoding.js +50 -0
  40. package/dist/constants/encoding.js.map +7 -0
  41. package/dist/constants/github.d.ts +7 -0
  42. package/dist/constants/github.js +32 -0
  43. package/dist/constants/github.js.map +7 -0
  44. package/dist/constants/licenses.d.ts +8 -0
  45. package/dist/constants/licenses.js +68 -0
  46. package/dist/constants/licenses.js.map +7 -0
  47. package/dist/constants/node.d.ts +29 -0
  48. package/dist/constants/node.js +173 -0
  49. package/dist/constants/node.js.map +7 -0
  50. package/dist/constants/packages.d.ts +19 -0
  51. package/dist/constants/packages.js +130 -0
  52. package/dist/constants/packages.js.map +7 -0
  53. package/dist/constants/paths.d.ts +51 -0
  54. package/dist/constants/paths.js +152 -0
  55. package/dist/constants/paths.js.map +7 -0
  56. package/dist/constants/platform.d.ts +6 -0
  57. package/dist/constants/platform.js +43 -0
  58. package/dist/constants/platform.js.map +7 -0
  59. package/dist/constants/process.d.ts +7 -0
  60. package/dist/constants/process.js +54 -0
  61. package/dist/constants/process.js.map +7 -0
  62. package/dist/constants/socket.d.ts +29 -0
  63. package/dist/constants/socket.js +83 -0
  64. package/dist/constants/socket.js.map +7 -0
  65. package/dist/constants/testing.d.ts +9 -0
  66. package/dist/constants/testing.js +38 -0
  67. package/dist/constants/testing.js.map +7 -0
  68. package/dist/constants/time.d.ts +11 -0
  69. package/dist/constants/time.js +41 -0
  70. package/dist/constants/time.js.map +7 -0
  71. package/dist/constants/typescript.d.ts +6 -0
  72. package/dist/constants/typescript.js +56 -0
  73. package/dist/constants/typescript.js.map +7 -0
  74. package/dist/cover/code.d.ts +8 -0
  75. package/dist/cover/code.js +137 -0
  76. package/dist/cover/code.js.map +7 -0
  77. package/dist/cover/formatters.d.ts +9 -0
  78. package/dist/cover/formatters.js +103 -0
  79. package/dist/cover/formatters.js.map +7 -0
  80. package/dist/cover/type.d.ts +7 -0
  81. package/dist/cover/type.js +65 -0
  82. package/dist/cover/type.js.map +7 -0
  83. package/dist/cover/types.d.ts +70 -0
  84. package/dist/cover/types.js +17 -0
  85. package/dist/cover/types.js.map +7 -0
  86. package/dist/debug.d.ts +99 -0
  87. package/dist/debug.js +345 -0
  88. package/dist/debug.js.map +7 -0
  89. package/dist/dlx-binary.d.ts +49 -0
  90. package/dist/dlx-binary.js +261 -0
  91. package/dist/dlx-binary.js.map +7 -0
  92. package/dist/dlx.d.ts +64 -0
  93. package/dist/dlx.js +168 -0
  94. package/dist/dlx.js.map +7 -0
  95. package/dist/download-lock.d.ts +48 -0
  96. package/dist/download-lock.js +139 -0
  97. package/dist/download-lock.js.map +7 -0
  98. package/dist/effects/pulse-frames.d.ts +23 -0
  99. package/dist/effects/pulse-frames.js +66 -0
  100. package/dist/effects/pulse-frames.js.map +7 -0
  101. package/dist/effects/text-shimmer.d.ts +37 -0
  102. package/dist/effects/text-shimmer.js +175 -0
  103. package/dist/effects/text-shimmer.js.map +7 -0
  104. package/dist/effects/types.d.ts +41 -0
  105. package/dist/effects/types.js +17 -0
  106. package/dist/effects/types.js.map +7 -0
  107. package/dist/effects/ultra.d.ts +16 -0
  108. package/dist/effects/ultra.js +63 -0
  109. package/dist/effects/ultra.js.map +7 -0
  110. package/dist/env/appdata.d.ts +1 -0
  111. package/dist/env/appdata.js +30 -0
  112. package/dist/env/appdata.js.map +7 -0
  113. package/dist/env/ci.d.ts +1 -0
  114. package/dist/env/ci.js +31 -0
  115. package/dist/env/ci.js.map +7 -0
  116. package/dist/env/comspec.d.ts +1 -0
  117. package/dist/env/comspec.js +30 -0
  118. package/dist/env/comspec.js.map +7 -0
  119. package/dist/env/debug.d.ts +1 -0
  120. package/dist/env/debug.js +30 -0
  121. package/dist/env/debug.js.map +7 -0
  122. package/dist/env/getters.d.ts +40 -0
  123. package/dist/env/getters.js +283 -0
  124. package/dist/env/getters.js.map +7 -0
  125. package/dist/env/github-api-url.d.ts +1 -0
  126. package/dist/env/github-api-url.js +30 -0
  127. package/dist/env/github-api-url.js.map +7 -0
  128. package/dist/env/github-base-ref.d.ts +1 -0
  129. package/dist/env/github-base-ref.js +30 -0
  130. package/dist/env/github-base-ref.js.map +7 -0
  131. package/dist/env/github-ref-name.d.ts +1 -0
  132. package/dist/env/github-ref-name.js +30 -0
  133. package/dist/env/github-ref-name.js.map +7 -0
  134. package/dist/env/github-ref-type.d.ts +1 -0
  135. package/dist/env/github-ref-type.js +30 -0
  136. package/dist/env/github-ref-type.js.map +7 -0
  137. package/dist/env/github-repository.d.ts +1 -0
  138. package/dist/env/github-repository.js +30 -0
  139. package/dist/env/github-repository.js.map +7 -0
  140. package/dist/env/github-server-url.d.ts +1 -0
  141. package/dist/env/github-server-url.js +30 -0
  142. package/dist/env/github-server-url.js.map +7 -0
  143. package/dist/env/github-token.d.ts +1 -0
  144. package/dist/env/github-token.js +30 -0
  145. package/dist/env/github-token.js.map +7 -0
  146. package/dist/env/helpers.d.ts +6 -0
  147. package/dist/env/helpers.js +49 -0
  148. package/dist/env/helpers.js.map +7 -0
  149. package/dist/env/home.d.ts +1 -0
  150. package/dist/env/home.js +30 -0
  151. package/dist/env/home.js.map +7 -0
  152. package/dist/env/jest-worker-id.d.ts +1 -0
  153. package/dist/env/jest-worker-id.js +30 -0
  154. package/dist/env/jest-worker-id.js.map +7 -0
  155. package/dist/env/lang.d.ts +1 -0
  156. package/dist/env/lang.js +30 -0
  157. package/dist/env/lang.js.map +7 -0
  158. package/dist/env/lc-all.d.ts +1 -0
  159. package/dist/env/lc-all.js +30 -0
  160. package/dist/env/lc-all.js.map +7 -0
  161. package/dist/env/lc-messages.d.ts +1 -0
  162. package/dist/env/lc-messages.js +30 -0
  163. package/dist/env/lc-messages.js.map +7 -0
  164. package/dist/env/localappdata.d.ts +1 -0
  165. package/dist/env/localappdata.js +30 -0
  166. package/dist/env/localappdata.js.map +7 -0
  167. package/dist/env/node-auth-token.d.ts +1 -0
  168. package/dist/env/node-auth-token.js +30 -0
  169. package/dist/env/node-auth-token.js.map +7 -0
  170. package/dist/env/node-env.d.ts +1 -0
  171. package/dist/env/node-env.js +30 -0
  172. package/dist/env/node-env.js.map +7 -0
  173. package/dist/env/npm-config-registry.d.ts +1 -0
  174. package/dist/env/npm-config-registry.js +30 -0
  175. package/dist/env/npm-config-registry.js.map +7 -0
  176. package/dist/env/npm-config-user-agent.d.ts +1 -0
  177. package/dist/env/npm-config-user-agent.js +30 -0
  178. package/dist/env/npm-config-user-agent.js.map +7 -0
  179. package/dist/env/npm-lifecycle-event.d.ts +1 -0
  180. package/dist/env/npm-lifecycle-event.js +30 -0
  181. package/dist/env/npm-lifecycle-event.js.map +7 -0
  182. package/dist/env/npm-registry.d.ts +1 -0
  183. package/dist/env/npm-registry.js +30 -0
  184. package/dist/env/npm-registry.js.map +7 -0
  185. package/dist/env/npm-token.d.ts +1 -0
  186. package/dist/env/npm-token.js +30 -0
  187. package/dist/env/npm-token.js.map +7 -0
  188. package/dist/env/path.d.ts +1 -0
  189. package/dist/env/path.js +30 -0
  190. package/dist/env/path.js.map +7 -0
  191. package/dist/env/pre-commit.d.ts +1 -0
  192. package/dist/env/pre-commit.js +31 -0
  193. package/dist/env/pre-commit.js.map +7 -0
  194. package/dist/env/shell.d.ts +1 -0
  195. package/dist/env/shell.js +30 -0
  196. package/dist/env/shell.js.map +7 -0
  197. package/dist/env/socket-accept-risks.d.ts +1 -0
  198. package/dist/env/socket-accept-risks.js +31 -0
  199. package/dist/env/socket-accept-risks.js.map +7 -0
  200. package/dist/env/socket-api-base-url.d.ts +1 -0
  201. package/dist/env/socket-api-base-url.js +30 -0
  202. package/dist/env/socket-api-base-url.js.map +7 -0
  203. package/dist/env/socket-api-proxy.d.ts +1 -0
  204. package/dist/env/socket-api-proxy.js +30 -0
  205. package/dist/env/socket-api-proxy.js.map +7 -0
  206. package/dist/env/socket-api-timeout.d.ts +1 -0
  207. package/dist/env/socket-api-timeout.js +31 -0
  208. package/dist/env/socket-api-timeout.js.map +7 -0
  209. package/dist/env/socket-api-token.d.ts +1 -0
  210. package/dist/env/socket-api-token.js +30 -0
  211. package/dist/env/socket-api-token.js.map +7 -0
  212. package/dist/env/socket-cacache-dir.d.ts +1 -0
  213. package/dist/env/socket-cacache-dir.js +30 -0
  214. package/dist/env/socket-cacache-dir.js.map +7 -0
  215. package/dist/env/socket-cli-accept-risks.d.ts +1 -0
  216. package/dist/env/socket-cli-accept-risks.js +33 -0
  217. package/dist/env/socket-cli-accept-risks.js.map +7 -0
  218. package/dist/env/socket-cli-api-base-url.d.ts +1 -0
  219. package/dist/env/socket-cli-api-base-url.js +30 -0
  220. package/dist/env/socket-cli-api-base-url.js.map +7 -0
  221. package/dist/env/socket-cli-api-proxy.d.ts +1 -0
  222. package/dist/env/socket-cli-api-proxy.js +30 -0
  223. package/dist/env/socket-cli-api-proxy.js.map +7 -0
  224. package/dist/env/socket-cli-api-timeout.d.ts +1 -0
  225. package/dist/env/socket-cli-api-timeout.js +31 -0
  226. package/dist/env/socket-cli-api-timeout.js.map +7 -0
  227. package/dist/env/socket-cli-api-token.d.ts +1 -0
  228. package/dist/env/socket-cli-api-token.js +30 -0
  229. package/dist/env/socket-cli-api-token.js.map +7 -0
  230. package/dist/env/socket-cli-config.d.ts +1 -0
  231. package/dist/env/socket-cli-config.js +30 -0
  232. package/dist/env/socket-cli-config.js.map +7 -0
  233. package/dist/env/socket-cli-fix.d.ts +1 -0
  234. package/dist/env/socket-cli-fix.js +30 -0
  235. package/dist/env/socket-cli-fix.js.map +7 -0
  236. package/dist/env/socket-cli-no-api-token.d.ts +1 -0
  237. package/dist/env/socket-cli-no-api-token.js +33 -0
  238. package/dist/env/socket-cli-no-api-token.js.map +7 -0
  239. package/dist/env/socket-cli-optimize.d.ts +1 -0
  240. package/dist/env/socket-cli-optimize.js +31 -0
  241. package/dist/env/socket-cli-optimize.js.map +7 -0
  242. package/dist/env/socket-cli-org-slug.d.ts +1 -0
  243. package/dist/env/socket-cli-org-slug.js +30 -0
  244. package/dist/env/socket-cli-org-slug.js.map +7 -0
  245. package/dist/env/socket-cli-shadow-accept-risks.d.ts +1 -0
  246. package/dist/env/socket-cli-shadow-accept-risks.js +33 -0
  247. package/dist/env/socket-cli-shadow-accept-risks.js.map +7 -0
  248. package/dist/env/socket-cli-shadow-api-token.d.ts +1 -0
  249. package/dist/env/socket-cli-shadow-api-token.js +30 -0
  250. package/dist/env/socket-cli-shadow-api-token.js.map +7 -0
  251. package/dist/env/socket-cli-shadow-bin.d.ts +1 -0
  252. package/dist/env/socket-cli-shadow-bin.js +30 -0
  253. package/dist/env/socket-cli-shadow-bin.js.map +7 -0
  254. package/dist/env/socket-cli-shadow-progress.d.ts +1 -0
  255. package/dist/env/socket-cli-shadow-progress.js +33 -0
  256. package/dist/env/socket-cli-shadow-progress.js.map +7 -0
  257. package/dist/env/socket-cli-shadow-silent.d.ts +1 -0
  258. package/dist/env/socket-cli-shadow-silent.js +33 -0
  259. package/dist/env/socket-cli-shadow-silent.js.map +7 -0
  260. package/dist/env/socket-cli-view-all-risks.d.ts +1 -0
  261. package/dist/env/socket-cli-view-all-risks.js +33 -0
  262. package/dist/env/socket-cli-view-all-risks.js.map +7 -0
  263. package/dist/env/socket-config.d.ts +1 -0
  264. package/dist/env/socket-config.js +30 -0
  265. package/dist/env/socket-config.js.map +7 -0
  266. package/dist/env/socket-debug.d.ts +1 -0
  267. package/dist/env/socket-debug.js +30 -0
  268. package/dist/env/socket-debug.js.map +7 -0
  269. package/dist/env/socket-home.d.ts +1 -0
  270. package/dist/env/socket-home.js +30 -0
  271. package/dist/env/socket-home.js.map +7 -0
  272. package/dist/env/socket-no-api-token.d.ts +1 -0
  273. package/dist/env/socket-no-api-token.js +31 -0
  274. package/dist/env/socket-no-api-token.js.map +7 -0
  275. package/dist/env/socket-npm-registry.d.ts +1 -0
  276. package/dist/env/socket-npm-registry.js +30 -0
  277. package/dist/env/socket-npm-registry.js.map +7 -0
  278. package/dist/env/socket-org-slug.d.ts +1 -0
  279. package/dist/env/socket-org-slug.js +30 -0
  280. package/dist/env/socket-org-slug.js.map +7 -0
  281. package/dist/env/socket-registry-url.d.ts +1 -0
  282. package/dist/env/socket-registry-url.js +30 -0
  283. package/dist/env/socket-registry-url.js.map +7 -0
  284. package/dist/env/socket-view-all-risks.d.ts +1 -0
  285. package/dist/env/socket-view-all-risks.js +31 -0
  286. package/dist/env/socket-view-all-risks.js.map +7 -0
  287. package/dist/env/temp.d.ts +1 -0
  288. package/dist/env/temp.js +30 -0
  289. package/dist/env/temp.js.map +7 -0
  290. package/dist/env/term.d.ts +1 -0
  291. package/dist/env/term.js +30 -0
  292. package/dist/env/term.js.map +7 -0
  293. package/dist/env/tmp.d.ts +1 -0
  294. package/dist/env/tmp.js +30 -0
  295. package/dist/env/tmp.js.map +7 -0
  296. package/dist/env/tmpdir.d.ts +1 -0
  297. package/dist/env/tmpdir.js +30 -0
  298. package/dist/env/tmpdir.js.map +7 -0
  299. package/dist/env/userprofile.d.ts +1 -0
  300. package/dist/env/userprofile.js +30 -0
  301. package/dist/env/userprofile.js.map +7 -0
  302. package/dist/env/vitest.d.ts +1 -0
  303. package/dist/env/vitest.js +31 -0
  304. package/dist/env/vitest.js.map +7 -0
  305. package/dist/env/xdg-cache-home.d.ts +1 -0
  306. package/dist/env/xdg-cache-home.js +30 -0
  307. package/dist/env/xdg-cache-home.js.map +7 -0
  308. package/dist/env/xdg-config-home.d.ts +1 -0
  309. package/dist/env/xdg-config-home.js +30 -0
  310. package/dist/env/xdg-config-home.js.map +7 -0
  311. package/dist/env/xdg-data-home.d.ts +1 -0
  312. package/dist/env/xdg-data-home.js +30 -0
  313. package/dist/env/xdg-data-home.js.map +7 -0
  314. package/dist/env.d.ts +15 -0
  315. package/dist/env.js +63 -0
  316. package/dist/env.js.map +7 -0
  317. package/dist/external/@inquirer/checkbox.js +4 -0
  318. package/dist/external/@inquirer/confirm.js +22 -0
  319. package/dist/external/@inquirer/core.js +4 -0
  320. package/dist/external/@inquirer/input.js +1 -0
  321. package/dist/external/@inquirer/password.js +1 -0
  322. package/dist/external/@inquirer/prompts.js +4 -0
  323. package/dist/external/@inquirer/search.js +1 -0
  324. package/dist/external/@inquirer/select.js +25 -0
  325. package/dist/external/@npmcli/package-json/index.js +1 -0
  326. package/dist/external/@npmcli/package-json/lib/read-package.js +1 -0
  327. package/dist/external/@npmcli/package-json/lib/sort.js +1 -0
  328. package/dist/external/@npmcli/promise-spawn.js +5 -0
  329. package/dist/external/@socketregistry/is-unicode-supported.d.ts +2 -0
  330. package/dist/external/@socketregistry/is-unicode-supported.js +5 -0
  331. package/dist/external/@socketregistry/packageurl-js.js +34 -0
  332. package/dist/external/@socketregistry/yocto-spinner.d.ts +12 -0
  333. package/dist/external/@socketregistry/yocto-spinner.js +8 -0
  334. package/dist/external/@yarnpkg/extensions.d.ts +5 -0
  335. package/dist/external/@yarnpkg/extensions.js +5 -0
  336. package/dist/external/cacache.d.ts +93 -0
  337. package/dist/external/cacache.js +32 -0
  338. package/dist/external/debug.d.ts +25 -0
  339. package/dist/external/debug.js +9 -0
  340. package/dist/external/del.d.ts +1 -0
  341. package/dist/external/del.js +54 -0
  342. package/dist/external/fast-glob.js +54 -0
  343. package/dist/external/fast-sort.d.ts +4 -0
  344. package/dist/external/fast-sort.js +5 -0
  345. package/dist/external/get-east-asian-width.d.ts +5 -0
  346. package/dist/external/get-east-asian-width.js +5 -0
  347. package/dist/external/libnpmpack.d.ts +3 -0
  348. package/dist/external/libnpmpack.js +225 -0
  349. package/dist/external/make-fetch-happen.d.ts +16 -0
  350. package/dist/external/make-fetch-happen.js +69 -0
  351. package/dist/external/normalize-package-data.js +6 -0
  352. package/dist/external/npm-package-arg.js +6 -0
  353. package/dist/external/pacote.d.ts +19 -0
  354. package/dist/external/pacote.js +105 -0
  355. package/dist/external/picomatch.js +5 -0
  356. package/dist/external/semver.d.ts +3 -0
  357. package/dist/external/semver.js +5 -0
  358. package/dist/external/spdx-correct.js +5 -0
  359. package/dist/external/spdx-expression-parse.js +5 -0
  360. package/dist/external/streaming-iterables.js +5 -0
  361. package/dist/external/validate-npm-package-name.js +5 -0
  362. package/dist/external/which.js +5 -0
  363. package/dist/external/yargs-parser.d.ts +3 -0
  364. package/dist/external/yargs-parser.js +26 -0
  365. package/dist/external/yoctocolors-cjs.d.ts +38 -0
  366. package/dist/external/yoctocolors-cjs.js +5 -0
  367. package/dist/external/zod.d.ts +1 -0
  368. package/dist/external/zod.js +27 -0
  369. package/dist/fs.d.ts +184 -0
  370. package/dist/fs.js +610 -0
  371. package/dist/fs.js.map +7 -0
  372. package/dist/functions.d.ts +27 -0
  373. package/dist/functions.js +70 -0
  374. package/dist/functions.js.map +7 -0
  375. package/dist/git.d.ts +93 -0
  376. package/dist/git.js +321 -0
  377. package/dist/git.js.map +7 -0
  378. package/dist/github.d.ts +121 -0
  379. package/dist/github.js +203 -0
  380. package/dist/github.js.map +7 -0
  381. package/dist/globs.d.ts +46 -0
  382. package/dist/globs.js +154 -0
  383. package/dist/globs.js.map +7 -0
  384. package/dist/http-request.d.ts +53 -0
  385. package/dist/http-request.js +315 -0
  386. package/dist/http-request.js.map +7 -0
  387. package/dist/index.d.ts +13 -0
  388. package/dist/index.js +64 -0
  389. package/dist/index.js.map +7 -0
  390. package/dist/ipc.d.ts +366 -0
  391. package/dist/ipc.js +234 -0
  392. package/dist/ipc.js.map +7 -0
  393. package/dist/json.d.ts +23 -0
  394. package/dist/json.js +75 -0
  395. package/dist/json.js.map +7 -0
  396. package/dist/logger.d.ts +183 -0
  397. package/dist/logger.js +653 -0
  398. package/dist/logger.js.map +7 -0
  399. package/dist/maintained-node-versions.d.ts +7 -0
  400. package/dist/maintained-node-versions.js +37 -0
  401. package/dist/maintained-node-versions.js.map +7 -0
  402. package/dist/memoization.d.ts +142 -0
  403. package/dist/memoization.js +212 -0
  404. package/dist/memoization.js.map +7 -0
  405. package/dist/objects.d.ts +146 -0
  406. package/dist/objects.js +321 -0
  407. package/dist/objects.js.map +7 -0
  408. package/dist/packages/editable.d.ts +107 -0
  409. package/dist/packages/editable.js +358 -0
  410. package/dist/packages/editable.js.map +7 -0
  411. package/dist/packages/exports.d.ts +30 -0
  412. package/dist/packages/exports.js +164 -0
  413. package/dist/packages/exports.js.map +7 -0
  414. package/dist/packages/isolation.d.ts +22 -0
  415. package/dist/packages/isolation.js +197 -0
  416. package/dist/packages/isolation.js.map +7 -0
  417. package/dist/packages/licenses.d.ts +68 -0
  418. package/dist/packages/licenses.js +216 -0
  419. package/dist/packages/licenses.js.map +7 -0
  420. package/dist/packages/manifest.d.ts +16 -0
  421. package/dist/packages/manifest.js +192 -0
  422. package/dist/packages/manifest.js.map +7 -0
  423. package/dist/packages/normalize.d.ts +21 -0
  424. package/dist/packages/normalize.js +122 -0
  425. package/dist/packages/normalize.js.map +7 -0
  426. package/dist/packages/operations.d.ts +54 -0
  427. package/dist/packages/operations.js +306 -0
  428. package/dist/packages/operations.js.map +7 -0
  429. package/dist/packages/paths.d.ts +10 -0
  430. package/dist/packages/paths.js +55 -0
  431. package/dist/packages/paths.js.map +7 -0
  432. package/dist/packages/provenance.d.ts +10 -0
  433. package/dist/packages/provenance.js +180 -0
  434. package/dist/packages/provenance.js.map +7 -0
  435. package/dist/packages/registry.d.ts +8 -0
  436. package/dist/packages/registry.js +30 -0
  437. package/dist/packages/registry.js.map +7 -0
  438. package/dist/packages/specs.d.ts +28 -0
  439. package/dist/packages/specs.js +85 -0
  440. package/dist/packages/specs.js.map +7 -0
  441. package/dist/packages/validation.d.ts +15 -0
  442. package/dist/packages/validation.js +53 -0
  443. package/dist/packages/validation.js.map +7 -0
  444. package/dist/packages.d.ts +154 -0
  445. package/dist/packages.js +131 -0
  446. package/dist/packages.js.map +7 -0
  447. package/dist/path.d.ts +74 -0
  448. package/dist/path.js +442 -0
  449. package/dist/path.js.map +7 -0
  450. package/dist/paths.d.ts +42 -0
  451. package/dist/paths.js +145 -0
  452. package/dist/paths.js.map +7 -0
  453. package/dist/performance.d.ts +178 -0
  454. package/dist/performance.js +219 -0
  455. package/dist/performance.js.map +7 -0
  456. package/dist/promise-queue.d.ts +35 -0
  457. package/dist/promise-queue.js +111 -0
  458. package/dist/promise-queue.js.map +7 -0
  459. package/dist/promises.d.ts +67 -0
  460. package/dist/promises.js +268 -0
  461. package/dist/promises.js.map +7 -0
  462. package/dist/prompts.d.ts +27 -0
  463. package/dist/prompts.js +60 -0
  464. package/dist/prompts.js.map +7 -0
  465. package/dist/regexps.d.ts +13 -0
  466. package/dist/regexps.js +32 -0
  467. package/dist/regexps.js.map +7 -0
  468. package/dist/sea.d.ts +10 -0
  469. package/dist/sea.js +46 -0
  470. package/dist/sea.js.map +7 -0
  471. package/dist/shadow.d.ts +17 -0
  472. package/dist/shadow.js +60 -0
  473. package/dist/shadow.js.map +7 -0
  474. package/dist/signal-exit.d.ts +23 -0
  475. package/dist/signal-exit.js +250 -0
  476. package/dist/signal-exit.js.map +7 -0
  477. package/dist/sorts.d.ts +28 -0
  478. package/dist/sorts.js +96 -0
  479. package/dist/sorts.js.map +7 -0
  480. package/dist/spawn.d.ts +207 -0
  481. package/dist/spawn.js +201 -0
  482. package/dist/spawn.js.map +7 -0
  483. package/dist/spinner.d.ts +208 -0
  484. package/dist/spinner.js +729 -0
  485. package/dist/spinner.js.map +7 -0
  486. package/dist/ssri.d.ts +95 -0
  487. package/dist/ssri.js +73 -0
  488. package/dist/ssri.js.map +7 -0
  489. package/dist/stdio/clear.d.ts +40 -0
  490. package/dist/stdio/clear.js +84 -0
  491. package/dist/stdio/clear.js.map +7 -0
  492. package/dist/stdio/divider.d.ts +48 -0
  493. package/dist/stdio/divider.js +81 -0
  494. package/dist/stdio/divider.js.map +7 -0
  495. package/dist/stdio/footer.d.ts +25 -0
  496. package/dist/stdio/footer.js +96 -0
  497. package/dist/stdio/footer.js.map +7 -0
  498. package/dist/stdio/header.d.ts +25 -0
  499. package/dist/stdio/header.js +102 -0
  500. package/dist/stdio/header.js.map +7 -0
  501. package/dist/stdio/mask.d.ts +72 -0
  502. package/dist/stdio/mask.js +187 -0
  503. package/dist/stdio/mask.js.map +7 -0
  504. package/dist/stdio/progress.d.ts +51 -0
  505. package/dist/stdio/progress.js +171 -0
  506. package/dist/stdio/progress.js.map +7 -0
  507. package/dist/stdio/prompts.d.ts +46 -0
  508. package/dist/stdio/prompts.js +90 -0
  509. package/dist/stdio/prompts.js.map +7 -0
  510. package/dist/stdio/stderr.d.ts +48 -0
  511. package/dist/stdio/stderr.js +91 -0
  512. package/dist/stdio/stderr.js.map +7 -0
  513. package/dist/stdio/stdout.d.ts +48 -0
  514. package/dist/stdio/stdout.js +105 -0
  515. package/dist/stdio/stdout.js.map +7 -0
  516. package/dist/streams.d.ts +20 -0
  517. package/dist/streams.js +80 -0
  518. package/dist/streams.js.map +7 -0
  519. package/dist/strings.d.ts +139 -0
  520. package/dist/strings.js +253 -0
  521. package/dist/strings.js.map +7 -0
  522. package/dist/suppress-warnings.d.ts +66 -0
  523. package/dist/suppress-warnings.js +100 -0
  524. package/dist/suppress-warnings.js.map +7 -0
  525. package/dist/tables.d.ts +69 -0
  526. package/dist/tables.js +130 -0
  527. package/dist/tables.js.map +7 -0
  528. package/dist/temporary-executor.d.ts +9 -0
  529. package/dist/temporary-executor.js +54 -0
  530. package/dist/temporary-executor.js.map +7 -0
  531. package/dist/types.d.ts +65 -0
  532. package/dist/types.js +74 -0
  533. package/dist/types.js.map +7 -0
  534. package/dist/url.d.ts +60 -0
  535. package/dist/url.js +144 -0
  536. package/dist/url.js.map +7 -0
  537. package/dist/utils/get-ipc.d.ts +16 -0
  538. package/dist/utils/get-ipc.js +60 -0
  539. package/dist/utils/get-ipc.js.map +7 -0
  540. package/dist/validation/json-parser.d.ts +10 -0
  541. package/dist/validation/json-parser.js +129 -0
  542. package/dist/validation/json-parser.js.map +7 -0
  543. package/dist/validation/types.d.ts +40 -0
  544. package/dist/validation/types.js +17 -0
  545. package/dist/validation/types.js.map +7 -0
  546. package/dist/versions.d.ts +87 -0
  547. package/dist/versions.js +155 -0
  548. package/dist/versions.js.map +7 -0
  549. package/dist/words.d.ts +22 -0
  550. package/dist/words.js +52 -0
  551. package/dist/words.js.map +7 -0
  552. package/dist/zod.d.ts +5 -0
  553. package/dist/zod.js +29 -0
  554. package/dist/zod.js.map +7 -0
  555. package/package.json +856 -7
@@ -0,0 +1,105 @@
1
+ /**
2
+ * Bundled from pacote
3
+ * This is a zero-dependency bundle created by esbuild.
4
+ */
5
+ var n2=Object.create;var Ku=Object.defineProperty;var o2=Object.getOwnPropertyDescriptor;var a2=Object.getOwnPropertyNames;var c2=Object.getPrototypeOf,u2=Object.prototype.hasOwnProperty;var o=(i,e)=>Ku(i,"name",{value:e,configurable:!0});var l2=(i,e)=>()=>(i&&(e=i(i=0)),e);var d=(i,e)=>()=>(e||i((e={exports:{}}).exports,e),e.exports),h2=(i,e)=>{for(var t in e)Ku(i,t,{get:e[t],enumerable:!0})},f2=(i,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of a2(e))!u2.call(i,s)&&s!==t&&Ku(i,s,{get:()=>e[s],enumerable:!(r=o2(e,s))||r.enumerable});return i};var d2=(i,e,t)=>(t=i!=null?n2(c2(i)):{},f2(e||!i||!i.__esModule?Ku(t,"default",{value:i,enumerable:!0}):t,i));var Lm=d((Tle,eO)=>{"use strict";var p2=Symbol.for("indent"),m2=Symbol.for("newline"),g2=`
6
+ `,y2=" ",S2=/^\uFEFF/,E2=/^\s*[{[]((?:\r?\n)+)([\s\t]*)/,w2=/^(?:\{\}|\[\])((?:\r?\n)+)?$/,YI=/^Unexpected token '?(.)'?(,)? /i,_2=o(i=>{let e=i.charCodeAt(0).toString(16).toUpperCase();return`0x${e.length%2?"0":""}${e}`},"hexify"),XI=o(i=>String(i).replace(S2,""),"stripBOM"),xm=o((i,e,t=0)=>({message:`${i} while parsing ${e}`,position:t}),"makeParsedError"),b2=o((i,e,t=20)=>{let r=i.message;if(!e)return xm(r,"empty string");let s=r.match(YI),n=r.match(/ position\s+(\d+)/i);s&&(r=r.replace(YI,`Unexpected token ${JSON.stringify(s[1])} (${_2(s[1])})$2 `));let a;if(n?a=+n[1]:r.match(/^Unexpected end of JSON.*/i)&&(a=e.length-1),a==null)return xm(r,`'${e.slice(0,t*2)}'`);let c=a<=t?0:a-t,u=a+t>=e.length?e.length:a+t,l=`${c?"...":""}${e.slice(c,u)}${u===e.length?"":"..."}`;return xm(r,`${e===l?"":"near "}${JSON.stringify(l)}`,a)},"parseError"),Zu=class extends SyntaxError{static{o(this,"JSONParseError")}constructor(e,t,r,s){let n=b2(e,t,r);super(n.message),Object.assign(this,n),this.code="EJSONPARSE",this.systemError=e,Error.captureStackTrace(this,s||this.constructor)}get name(){return this.constructor.name}set name(e){}get[Symbol.toStringTag](){return this.constructor.name}},QI=o((i,e)=>{let t=JSON.parse(i,e);if(t&&typeof t=="object"){let r=i.match(w2)||i.match(E2)||[null,"",""];t[m2]=r[1]??g2,t[p2]=r[2]??y2}return t},"parseJson"),Yu=o((i,e,t)=>{let r=XI(i);try{return QI(r,e)}catch(s){if(typeof i!="string"&&!Buffer.isBuffer(i)){let n=Array.isArray(i)&&i.length===0?"an empty array":String(i);throw Object.assign(new TypeError(`Cannot parse ${n}`),{code:"EJSONPARSE",systemError:s})}throw new Zu(s,r,t,Yu)}},"parseJsonError");eO.exports=Yu;Yu.JSONParseError=Zu;Yu.noExceptions=(i,e)=>{try{return QI(XI(i),e)}catch{}}});var rO=d((Ple,iO)=>{var Mm=new Set(["dependencies","optionalDependencies","devDependencies","peerDependencies"]),I2=o(i=>{for(let e of Mm)i&&i[e]&&(i[e]=Object.keys(i[e]).sort((t,r)=>t.localeCompare(r,"en")).reduce((t,r)=>(t[r]=i[e][r],t),{}));return i},"orderDeps"),tO=o(({content:i,originalContent:e})=>{let t=I2({...i});if(t.dependencies&&t.optionalDependencies)for(let c of Object.keys(t.optionalDependencies))delete t.dependencies[c];let r={...e};for(let c of Mm)t[c]&&(r[c]=t[c]),t[c]&&typeof t=="object"&&Object.keys(t[c]).length===0&&delete r[c];let{dependencies:s,peerDependencies:n}=e||{},{peerDependencies:a}=r;if(s&&n&&a)for(let c of Object.keys(n))s[c]!==void 0&&a[c]!==void 0&&(r.dependencies=r.dependencies||{},r.dependencies[c]=a[c]);return r},"updateDependencies");tO.knownKeys=Mm;iO.exports=tO});var nO=d((xle,sO)=>{var O2=o(({content:i,originalContent:e={}})=>{let t=i.scripts;if(!t)return e;if(o(()=>Object.entries(t).some(([s,n])=>typeof s!="string"||typeof n!="string"),"hasInvalidScripts")())throw Object.assign(new TypeError("package.json scripts should be a key-value pair of strings."),{code:"ESCRIPTSINVALID"});return{...e,scripts:{...t}}},"updateScripts");sO.exports=O2});var aO=d((Mle,oO)=>{var v2=o(({content:i,originalContent:e={}})=>{let t=i.workspaces;if(!t)return e;let r=o(()=>t.some(s=>typeof s!="string"),"hasInvalidWorkspaces");if(!t.length||r())throw Object.assign(new TypeError("workspaces should be an array of strings."),{code:"EWORKSPACESINVALID"});return{...e,workspaces:[...t]}},"updateWorkspaces");oO.exports=v2});var wa=d((kle,cO)=>{"use strict";var C2=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...i)=>{}:()=>{};cO.exports=C2});var _a=d((Fle,uO)=>{"use strict";var R2="2.0.0",A2=Number.MAX_SAFE_INTEGER||9007199254740991,T2=16,N2=250,P2=["major","premajor","minor","preminor","patch","prepatch","prerelease"];uO.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:T2,MAX_SAFE_BUILD_LENGTH:N2,MAX_SAFE_INTEGER:A2,RELEASE_TYPES:P2,SEMVER_SPEC_VERSION:R2,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var pn=d((oi,lO)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:Bm,MAX_SAFE_BUILD_LENGTH:D2,MAX_LENGTH:x2}=_a(),L2=wa();oi=lO.exports={};var M2=oi.re=[],B2=oi.safeRe=[],C=oi.src=[],k2=oi.safeSrc=[],R=oi.t={},F2=0,km="[a-zA-Z0-9-]",U2=[["\\s",1],["\\d",x2],[km,D2]],j2=o(i=>{for(let[e,t]of U2)i=i.split(`${e}*`).join(`${e}{0,${t}}`).split(`${e}+`).join(`${e}{1,${t}}`);return i},"makeSafeRegex"),B=o((i,e,t)=>{let r=j2(e),s=F2++;L2(i,s,e),R[i]=s,C[s]=e,k2[s]=r,M2[s]=new RegExp(e,t?"g":void 0),B2[s]=new RegExp(r,t?"g":void 0)},"createToken");B("NUMERICIDENTIFIER","0|[1-9]\\d*");B("NUMERICIDENTIFIERLOOSE","\\d+");B("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${km}*`);B("MAINVERSION",`(${C[R.NUMERICIDENTIFIER]})\\.(${C[R.NUMERICIDENTIFIER]})\\.(${C[R.NUMERICIDENTIFIER]})`);B("MAINVERSIONLOOSE",`(${C[R.NUMERICIDENTIFIERLOOSE]})\\.(${C[R.NUMERICIDENTIFIERLOOSE]})\\.(${C[R.NUMERICIDENTIFIERLOOSE]})`);B("PRERELEASEIDENTIFIER",`(?:${C[R.NONNUMERICIDENTIFIER]}|${C[R.NUMERICIDENTIFIER]})`);B("PRERELEASEIDENTIFIERLOOSE",`(?:${C[R.NONNUMERICIDENTIFIER]}|${C[R.NUMERICIDENTIFIERLOOSE]})`);B("PRERELEASE",`(?:-(${C[R.PRERELEASEIDENTIFIER]}(?:\\.${C[R.PRERELEASEIDENTIFIER]})*))`);B("PRERELEASELOOSE",`(?:-?(${C[R.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${C[R.PRERELEASEIDENTIFIERLOOSE]})*))`);B("BUILDIDENTIFIER",`${km}+`);B("BUILD",`(?:\\+(${C[R.BUILDIDENTIFIER]}(?:\\.${C[R.BUILDIDENTIFIER]})*))`);B("FULLPLAIN",`v?${C[R.MAINVERSION]}${C[R.PRERELEASE]}?${C[R.BUILD]}?`);B("FULL",`^${C[R.FULLPLAIN]}$`);B("LOOSEPLAIN",`[v=\\s]*${C[R.MAINVERSIONLOOSE]}${C[R.PRERELEASELOOSE]}?${C[R.BUILD]}?`);B("LOOSE",`^${C[R.LOOSEPLAIN]}$`);B("GTLT","((?:<|>)?=?)");B("XRANGEIDENTIFIERLOOSE",`${C[R.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);B("XRANGEIDENTIFIER",`${C[R.NUMERICIDENTIFIER]}|x|X|\\*`);B("XRANGEPLAIN",`[v=\\s]*(${C[R.XRANGEIDENTIFIER]})(?:\\.(${C[R.XRANGEIDENTIFIER]})(?:\\.(${C[R.XRANGEIDENTIFIER]})(?:${C[R.PRERELEASE]})?${C[R.BUILD]}?)?)?`);B("XRANGEPLAINLOOSE",`[v=\\s]*(${C[R.XRANGEIDENTIFIERLOOSE]})(?:\\.(${C[R.XRANGEIDENTIFIERLOOSE]})(?:\\.(${C[R.XRANGEIDENTIFIERLOOSE]})(?:${C[R.PRERELEASELOOSE]})?${C[R.BUILD]}?)?)?`);B("XRANGE",`^${C[R.GTLT]}\\s*${C[R.XRANGEPLAIN]}$`);B("XRANGELOOSE",`^${C[R.GTLT]}\\s*${C[R.XRANGEPLAINLOOSE]}$`);B("COERCEPLAIN",`(^|[^\\d])(\\d{1,${Bm}})(?:\\.(\\d{1,${Bm}}))?(?:\\.(\\d{1,${Bm}}))?`);B("COERCE",`${C[R.COERCEPLAIN]}(?:$|[^\\d])`);B("COERCEFULL",C[R.COERCEPLAIN]+`(?:${C[R.PRERELEASE]})?(?:${C[R.BUILD]})?(?:$|[^\\d])`);B("COERCERTL",C[R.COERCE],!0);B("COERCERTLFULL",C[R.COERCEFULL],!0);B("LONETILDE","(?:~>?)");B("TILDETRIM",`(\\s*)${C[R.LONETILDE]}\\s+`,!0);oi.tildeTrimReplace="$1~";B("TILDE",`^${C[R.LONETILDE]}${C[R.XRANGEPLAIN]}$`);B("TILDELOOSE",`^${C[R.LONETILDE]}${C[R.XRANGEPLAINLOOSE]}$`);B("LONECARET","(?:\\^)");B("CARETTRIM",`(\\s*)${C[R.LONECARET]}\\s+`,!0);oi.caretTrimReplace="$1^";B("CARET",`^${C[R.LONECARET]}${C[R.XRANGEPLAIN]}$`);B("CARETLOOSE",`^${C[R.LONECARET]}${C[R.XRANGEPLAINLOOSE]}$`);B("COMPARATORLOOSE",`^${C[R.GTLT]}\\s*(${C[R.LOOSEPLAIN]})$|^$`);B("COMPARATOR",`^${C[R.GTLT]}\\s*(${C[R.FULLPLAIN]})$|^$`);B("COMPARATORTRIM",`(\\s*)${C[R.GTLT]}\\s*(${C[R.LOOSEPLAIN]}|${C[R.XRANGEPLAIN]})`,!0);oi.comparatorTrimReplace="$1$2$3";B("HYPHENRANGE",`^\\s*(${C[R.XRANGEPLAIN]})\\s+-\\s+(${C[R.XRANGEPLAIN]})\\s*$`);B("HYPHENRANGELOOSE",`^\\s*(${C[R.XRANGEPLAINLOOSE]})\\s+-\\s+(${C[R.XRANGEPLAINLOOSE]})\\s*$`);B("STAR","(<|>)?=?\\s*\\*");B("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");B("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Xu=d((jle,hO)=>{"use strict";var $2=Object.freeze({loose:!0}),q2=Object.freeze({}),V2=o(i=>i?typeof i!="object"?$2:i:q2,"parseOptions");hO.exports=V2});var Fm=d((qle,pO)=>{"use strict";var fO=/^[0-9]+$/,dO=o((i,e)=>{let t=fO.test(i),r=fO.test(e);return t&&r&&(i=+i,e=+e),i===e?0:t&&!r?-1:r&&!t?1:i<e?-1:1},"compareIdentifiers"),z2=o((i,e)=>dO(e,i),"rcompareIdentifiers");pO.exports={compareIdentifiers:dO,rcompareIdentifiers:z2}});var Le=d((zle,gO)=>{"use strict";var Qu=wa(),{MAX_LENGTH:mO,MAX_SAFE_INTEGER:el}=_a(),{safeRe:tl,t:il}=pn(),H2=Xu(),{compareIdentifiers:mn}=Fm(),Um=class i{static{o(this,"SemVer")}constructor(e,t){if(t=H2(t),e instanceof i){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>mO)throw new TypeError(`version is longer than ${mO} characters`);Qu("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let r=e.trim().match(t.loose?tl[il.LOOSE]:tl[il.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>el||this.major<0)throw new TypeError("Invalid major version");if(this.minor>el||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>el||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){let n=+s;if(n>=0&&n<el)return n}return s}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(Qu("SemVer.compare",this.version,this.options,e),!(e instanceof i)){if(typeof e=="string"&&e===this.version)return 0;e=new i(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof i||(e=new i(e,this.options)),mn(this.major,e.major)||mn(this.minor,e.minor)||mn(this.patch,e.patch)}comparePre(e){if(e instanceof i||(e=new i(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;let t=0;do{let r=this.prerelease[t],s=e.prerelease[t];if(Qu("prerelease compare",t,r,s),r===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(r===void 0)return-1;if(r===s)continue;return mn(r,s)}while(++t)}compareBuild(e){e instanceof i||(e=new i(e,this.options));let t=0;do{let r=this.build[t],s=e.build[t];if(Qu("build compare",t,r,s),r===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(r===void 0)return-1;if(r===s)continue;return mn(r,s)}while(++t)}inc(e,t,r){if(e.startsWith("pre")){if(!t&&r===!1)throw new Error("invalid increment argument: identifier is empty");if(t){let s=`-${t}`.match(this.options.loose?tl[il.PRERELEASELOOSE]:tl[il.PRERELEASE]);if(!s||s[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let s=Number(r)?1:0;if(this.prerelease.length===0)this.prerelease=[s];else{let n=this.prerelease.length;for(;--n>=0;)typeof this.prerelease[n]=="number"&&(this.prerelease[n]++,n=-2);if(n===-1){if(t===this.prerelease.join(".")&&r===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(s)}}if(t){let n=[t,s];r===!1&&(n=[t]),mn(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};gO.exports=Um});var ls=d((Gle,SO)=>{"use strict";var yO=Le(),G2=o((i,e,t=!1)=>{if(i instanceof yO)return i;try{return new yO(i,e)}catch(r){if(!t)return null;throw r}},"parse");SO.exports=G2});var jm=d((Jle,EO)=>{"use strict";var W2=ls(),J2=o((i,e)=>{let t=W2(i,e);return t?t.version:null},"valid");EO.exports=J2});var $m=d((Zle,wO)=>{"use strict";var K2=ls(),Z2=o((i,e)=>{let t=K2(i.trim().replace(/^[=v]+/,""),e);return t?t.version:null},"clean");wO.exports=Z2});var _t=d((Xle,_O)=>{var Y2=Symbol("proc-log.meta");_O.exports={META:Y2,output:{LEVELS:["standard","error","buffer","flush"],KEYS:{standard:"standard",error:"error",buffer:"buffer",flush:"flush"},standard:o(function(...i){return process.emit("output","standard",...i)},"standard"),error:o(function(...i){return process.emit("output","error",...i)},"error"),buffer:o(function(...i){return process.emit("output","buffer",...i)},"buffer"),flush:o(function(...i){return process.emit("output","flush",...i)},"flush")},log:{LEVELS:["notice","error","warn","info","verbose","http","silly","timing","pause","resume"],KEYS:{notice:"notice",error:"error",warn:"warn",info:"info",verbose:"verbose",http:"http",silly:"silly",timing:"timing",pause:"pause",resume:"resume"},error:o(function(...i){return process.emit("log","error",...i)},"error"),notice:o(function(...i){return process.emit("log","notice",...i)},"notice"),warn:o(function(...i){return process.emit("log","warn",...i)},"warn"),info:o(function(...i){return process.emit("log","info",...i)},"info"),verbose:o(function(...i){return process.emit("log","verbose",...i)},"verbose"),http:o(function(...i){return process.emit("log","http",...i)},"http"),silly:o(function(...i){return process.emit("log","silly",...i)},"silly"),timing:o(function(...i){return process.emit("log","timing",...i)},"timing"),pause:o(function(){return process.emit("log","pause")},"pause"),resume:o(function(){return process.emit("log","resume")},"resume")},time:{LEVELS:["start","end"],KEYS:{start:"start",end:"end"},start:o(function(i,e){process.emit("time","start",i);function t(){return process.emit("time","end",i)}if(o(t,"end"),typeof e=="function"){let r=e();return r&&r.finally?r.finally(t):(t(),r)}return t},"start"),end:o(function(i){return process.emit("time","end",i)},"end")},input:{LEVELS:["start","end","read"],KEYS:{start:"start",end:"end",read:"read"},start:o(function(i){process.emit("input","start");function e(){return process.emit("input","end")}if(o(e,"end"),typeof i=="function"){let t=i();return t&&t.finally?t.finally(e):(e(),t)}return e},"start"),end:o(function(){return process.emit("input","end")},"end"),read:o(function(...i){let e,t,r=new Promise((s,n)=>{e=s,t=n});return process.emit("input","read",e,t,...i),r},"read")}}});var hs=d(sl=>{"use strict";Object.defineProperty(sl,"__esModule",{value:!0});sl.LRUCache=void 0;var X2=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,IO=new Set,qm=typeof process=="object"&&process?process:{},OO=o((i,e,t,r)=>{typeof qm.emitWarning=="function"&&qm.emitWarning(i,e,t,r)},"emitWarning"),rl=globalThis.AbortController,bO=globalThis.AbortSignal;if(typeof rl>"u"){bO=class{static{o(this,"AbortSignal")}onabort;_onabort=[];reason;aborted=!1;addEventListener(r,s){this._onabort.push(s)}},rl=class{static{o(this,"AbortController")}constructor(){e()}signal=new bO;abort(r){if(!this.signal.aborted){this.signal.reason=r,this.signal.aborted=!0;for(let s of this.signal._onabort)s(r);this.signal.onabort?.(r)}}};let i=qm.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=o(()=>{i&&(i=!1,OO("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))},"warnACPolyfill")}var Q2=o(i=>!IO.has(i),"shouldWarn"),ihe=Symbol("type"),gr=o(i=>i&&i===Math.floor(i)&&i>0&&isFinite(i),"isPosInt"),vO=o(i=>gr(i)?i<=Math.pow(2,8)?Uint8Array:i<=Math.pow(2,16)?Uint16Array:i<=Math.pow(2,32)?Uint32Array:i<=Number.MAX_SAFE_INTEGER?gn:null:null,"getUintArray"),gn=class extends Array{static{o(this,"ZeroArray")}constructor(e){super(e),this.fill(0)}},Vm=class i{static{o(this,"Stack")}heap;length;static#e=!1;static create(e){let t=vO(e);if(!t)return[];i.#e=!0;let r=new i(e,t);return i.#e=!1,r}constructor(e,t){if(!i.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},zm=class i{static{o(this,"LRUCache")}#e;#t;#i;#r;#s;#u;#c;#f;get perf(){return this.#f}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#n;#h;#o;#d;#a;#p;#y;#_;#m;#R;#w;#b;#v;#I;#E;#N;#O;#l;static unsafeExposeInternals(e){return{starts:e.#v,ttls:e.#I,sizes:e.#b,keyMap:e.#o,keyList:e.#d,valList:e.#a,next:e.#p,prev:e.#y,get head(){return e.#_},get tail(){return e.#m},free:e.#R,isBackgroundFetch:o(t=>e.#g(t),"isBackgroundFetch"),backgroundFetch:o((t,r,s,n)=>e.#j(t,r,s,n),"backgroundFetch"),moveToTail:o(t=>e.#V(t),"moveToTail"),indexes:o(t=>e.#D(t),"indexes"),rindexes:o(t=>e.#L(t),"rindexes"),isStale:o(t=>e.#A(t),"isStale")}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#h}get size(){return this.#n}get fetchMethod(){return this.#u}get memoMethod(){return this.#c}get dispose(){return this.#i}get onInsert(){return this.#r}get disposeAfter(){return this.#s}constructor(e){let{max:t=0,ttl:r,ttlResolution:s=1,ttlAutopurge:n,updateAgeOnGet:a,updateAgeOnHas:c,allowStale:u,dispose:l,onInsert:h,disposeAfter:f,noDisposeOnSet:p,noUpdateTTL:m,maxSize:y=0,maxEntrySize:g=0,sizeCalculation:S,fetchMethod:E,memoMethod:_,noDeleteOnFetchRejection:b,noDeleteOnStaleGet:w,allowStaleOnFetchRejection:I,allowStaleOnFetchAbort:v,ignoreFetchAbort:N,perf:P}=e;if(P!==void 0&&typeof P?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#f=P??X2,t!==0&&!gr(t))throw new TypeError("max option must be a nonnegative integer");let U=t?vO(t):Array;if(!U)throw new Error("invalid max value: "+t);if(this.#e=t,this.#t=y,this.maxEntrySize=g||this.#t,this.sizeCalculation=S,this.sizeCalculation){if(!this.#t&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(_!==void 0&&typeof _!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#c=_,E!==void 0&&typeof E!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#u=E,this.#N=!!E,this.#o=new Map,this.#d=new Array(t).fill(void 0),this.#a=new Array(t).fill(void 0),this.#p=new U(t),this.#y=new U(t),this.#_=0,this.#m=0,this.#R=Vm.create(t),this.#n=0,this.#h=0,typeof l=="function"&&(this.#i=l),typeof h=="function"&&(this.#r=h),typeof f=="function"?(this.#s=f,this.#w=[]):(this.#s=void 0,this.#w=void 0),this.#E=!!this.#i,this.#l=!!this.#r,this.#O=!!this.#s,this.noDisposeOnSet=!!p,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!b,this.allowStaleOnFetchRejection=!!I,this.allowStaleOnFetchAbort=!!v,this.ignoreFetchAbort=!!N,this.maxEntrySize!==0){if(this.#t!==0&&!gr(this.#t))throw new TypeError("maxSize must be a positive integer if specified");if(!gr(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#$()}if(this.allowStale=!!u,this.noDeleteOnStaleGet=!!w,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!c,this.ttlResolution=gr(s)||s===0?s:1,this.ttlAutopurge=!!n,this.ttl=r||0,this.ttl){if(!gr(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#B()}if(this.#e===0&&this.ttl===0&&this.#t===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#t){let ee="LRU_CACHE_UNBOUNDED";Q2(ee)&&(IO.add(ee),OO("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",ee,i))}}getRemainingTTL(e){return this.#o.has(e)?1/0:0}#B(){let e=new gn(this.#e),t=new gn(this.#e);this.#I=e,this.#v=t,this.#k=(n,a,c=this.#f.now())=>{if(t[n]=a!==0?c:0,e[n]=a,a!==0&&this.ttlAutopurge){let u=setTimeout(()=>{this.#A(n)&&this.#M(this.#d[n],"expire")},a+1);u.unref&&u.unref()}},this.#C=n=>{t[n]=e[n]!==0?this.#f.now():0},this.#T=(n,a)=>{if(e[a]){let c=e[a],u=t[a];if(!c||!u)return;n.ttl=c,n.start=u,n.now=r||s();let l=n.now-u;n.remainingTTL=c-l}};let r=0,s=o(()=>{let n=this.#f.now();if(this.ttlResolution>0){r=n;let a=setTimeout(()=>r=0,this.ttlResolution);a.unref&&a.unref()}return n},"getNow");this.getRemainingTTL=n=>{let a=this.#o.get(n);if(a===void 0)return 0;let c=e[a],u=t[a];if(!c||!u)return 1/0;let l=(r||s())-u;return c-l},this.#A=n=>{let a=t[n],c=e[n];return!!c&&!!a&&(r||s())-a>c}}#C=o(()=>{},"#updateItemAge");#T=o(()=>{},"#statusTTL");#k=o(()=>{},"#setItemTTL");#A=o(()=>!1,"#isStale");#$(){let e=new gn(this.#e);this.#h=0,this.#b=e,this.#P=t=>{this.#h-=e[t],e[t]=0},this.#F=(t,r,s,n)=>{if(this.#g(r))return 0;if(!gr(s))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(s=n(r,t),!gr(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return s},this.#x=(t,r,s)=>{if(e[t]=r,this.#t){let n=this.#t-e[t];for(;this.#h>n;)this.#U(!0)}this.#h+=e[t],s&&(s.entrySize=r,s.totalCalculatedSize=this.#h)}}#P=o(e=>{},"#removeItemSize");#x=o((e,t,r)=>{},"#addItemSize");#F=o((e,t,r,s)=>{if(r||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0},"#requireSize");*#D({allowStale:e=this.allowStale}={}){if(this.#n)for(let t=this.#m;!(!this.#S(t)||((e||!this.#A(t))&&(yield t),t===this.#_));)t=this.#y[t]}*#L({allowStale:e=this.allowStale}={}){if(this.#n)for(let t=this.#_;!(!this.#S(t)||((e||!this.#A(t))&&(yield t),t===this.#m));)t=this.#p[t]}#S(e){return e!==void 0&&this.#o.get(this.#d[e])===e}*entries(){for(let e of this.#D())this.#a[e]!==void 0&&this.#d[e]!==void 0&&!this.#g(this.#a[e])&&(yield[this.#d[e],this.#a[e]])}*rentries(){for(let e of this.#L())this.#a[e]!==void 0&&this.#d[e]!==void 0&&!this.#g(this.#a[e])&&(yield[this.#d[e],this.#a[e]])}*keys(){for(let e of this.#D()){let t=this.#d[e];t!==void 0&&!this.#g(this.#a[e])&&(yield t)}}*rkeys(){for(let e of this.#L()){let t=this.#d[e];t!==void 0&&!this.#g(this.#a[e])&&(yield t)}}*values(){for(let e of this.#D())this.#a[e]!==void 0&&!this.#g(this.#a[e])&&(yield this.#a[e])}*rvalues(){for(let e of this.#L())this.#a[e]!==void 0&&!this.#g(this.#a[e])&&(yield this.#a[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let r of this.#D()){let s=this.#a[r],n=this.#g(s)?s.__staleWhileFetching:s;if(n!==void 0&&e(n,this.#d[r],this))return this.get(this.#d[r],t)}}forEach(e,t=this){for(let r of this.#D()){let s=this.#a[r],n=this.#g(s)?s.__staleWhileFetching:s;n!==void 0&&e.call(t,n,this.#d[r],this)}}rforEach(e,t=this){for(let r of this.#L()){let s=this.#a[r],n=this.#g(s)?s.__staleWhileFetching:s;n!==void 0&&e.call(t,n,this.#d[r],this)}}purgeStale(){let e=!1;for(let t of this.#L({allowStale:!0}))this.#A(t)&&(this.#M(this.#d[t],"expire"),e=!0);return e}info(e){let t=this.#o.get(e);if(t===void 0)return;let r=this.#a[t],s=this.#g(r)?r.__staleWhileFetching:r;if(s===void 0)return;let n={value:s};if(this.#I&&this.#v){let a=this.#I[t],c=this.#v[t];if(a&&c){let u=a-(this.#f.now()-c);n.ttl=u,n.start=Date.now()}}return this.#b&&(n.size=this.#b[t]),n}dump(){let e=[];for(let t of this.#D({allowStale:!0})){let r=this.#d[t],s=this.#a[t],n=this.#g(s)?s.__staleWhileFetching:s;if(n===void 0||r===void 0)continue;let a={value:n};if(this.#I&&this.#v){a.ttl=this.#I[t];let c=this.#f.now()-this.#v[t];a.start=Math.floor(Date.now()-c)}this.#b&&(a.size=this.#b[t]),e.unshift([r,a])}return e}load(e){this.clear();for(let[t,r]of e){if(r.start){let s=Date.now()-r.start;r.start=this.#f.now()-s}this.set(t,r.value,r)}}set(e,t,r={}){if(t===void 0)return this.delete(e),this;let{ttl:s=this.ttl,start:n,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:c=this.sizeCalculation,status:u}=r,{noUpdateTTL:l=this.noUpdateTTL}=r,h=this.#F(e,t,r.size||0,c);if(this.maxEntrySize&&h>this.maxEntrySize)return u&&(u.set="miss",u.maxEntrySizeExceeded=!0),this.#M(e,"set"),this;let f=this.#n===0?void 0:this.#o.get(e);if(f===void 0)f=this.#n===0?this.#m:this.#R.length!==0?this.#R.pop():this.#n===this.#e?this.#U(!1):this.#n,this.#d[f]=e,this.#a[f]=t,this.#o.set(e,f),this.#p[this.#m]=f,this.#y[f]=this.#m,this.#m=f,this.#n++,this.#x(f,h,u),u&&(u.set="add"),l=!1,this.#l&&this.#r?.(t,e,"add");else{this.#V(f);let p=this.#a[f];if(t!==p){if(this.#N&&this.#g(p)){p.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:m}=p;m!==void 0&&!a&&(this.#E&&this.#i?.(m,e,"set"),this.#O&&this.#w?.push([m,e,"set"]))}else a||(this.#E&&this.#i?.(p,e,"set"),this.#O&&this.#w?.push([p,e,"set"]));if(this.#P(f),this.#x(f,h,u),this.#a[f]=t,u){u.set="replace";let m=p&&this.#g(p)?p.__staleWhileFetching:p;m!==void 0&&(u.oldValue=m)}}else u&&(u.set="update");this.#l&&this.onInsert?.(t,e,t===p?"update":"replace")}if(s!==0&&!this.#I&&this.#B(),this.#I&&(l||this.#k(f,s,n),u&&this.#T(u,f)),!a&&this.#O&&this.#w){let p=this.#w,m;for(;m=p?.shift();)this.#s?.(...m)}return this}pop(){try{for(;this.#n;){let e=this.#a[this.#_];if(this.#U(!0),this.#g(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#O&&this.#w){let e=this.#w,t;for(;t=e?.shift();)this.#s?.(...t)}}}#U(e){let t=this.#_,r=this.#d[t],s=this.#a[t];return this.#N&&this.#g(s)?s.__abortController.abort(new Error("evicted")):(this.#E||this.#O)&&(this.#E&&this.#i?.(s,r,"evict"),this.#O&&this.#w?.push([s,r,"evict"])),this.#P(t),e&&(this.#d[t]=void 0,this.#a[t]=void 0,this.#R.push(t)),this.#n===1?(this.#_=this.#m=0,this.#R.length=0):this.#_=this.#p[t],this.#o.delete(r),this.#n--,t}has(e,t={}){let{updateAgeOnHas:r=this.updateAgeOnHas,status:s}=t,n=this.#o.get(e);if(n!==void 0){let a=this.#a[n];if(this.#g(a)&&a.__staleWhileFetching===void 0)return!1;if(this.#A(n))s&&(s.has="stale",this.#T(s,n));else return r&&this.#C(n),s&&(s.has="hit",this.#T(s,n)),!0}else s&&(s.has="miss");return!1}peek(e,t={}){let{allowStale:r=this.allowStale}=t,s=this.#o.get(e);if(s===void 0||!r&&this.#A(s))return;let n=this.#a[s];return this.#g(n)?n.__staleWhileFetching:n}#j(e,t,r,s){let n=t===void 0?void 0:this.#a[t];if(this.#g(n))return n;let a=new rl,{signal:c}=r;c?.addEventListener("abort",()=>a.abort(c.reason),{signal:a.signal});let u={signal:a.signal,options:r,context:s},l=o((g,S=!1)=>{let{aborted:E}=a.signal,_=r.ignoreFetchAbort&&g!==void 0;if(r.status&&(E&&!S?(r.status.fetchAborted=!0,r.status.fetchError=a.signal.reason,_&&(r.status.fetchAbortIgnored=!0)):r.status.fetchResolved=!0),E&&!_&&!S)return f(a.signal.reason);let b=m,w=this.#a[t];return(w===m||_&&S&&w===void 0)&&(g===void 0?b.__staleWhileFetching!==void 0?this.#a[t]=b.__staleWhileFetching:this.#M(e,"fetch"):(r.status&&(r.status.fetchUpdated=!0),this.set(e,g,u.options))),g},"cb"),h=o(g=>(r.status&&(r.status.fetchRejected=!0,r.status.fetchError=g),f(g)),"eb"),f=o(g=>{let{aborted:S}=a.signal,E=S&&r.allowStaleOnFetchAbort,_=E||r.allowStaleOnFetchRejection,b=_||r.noDeleteOnFetchRejection,w=m;if(this.#a[t]===m&&(!b||w.__staleWhileFetching===void 0?this.#M(e,"fetch"):E||(this.#a[t]=w.__staleWhileFetching)),_)return r.status&&w.__staleWhileFetching!==void 0&&(r.status.returnedStale=!0),w.__staleWhileFetching;if(w.__returned===w)throw g},"fetchFail"),p=o((g,S)=>{let E=this.#u?.(e,n,u);E&&E instanceof Promise&&E.then(_=>g(_===void 0?void 0:_),S),a.signal.addEventListener("abort",()=>{(!r.ignoreFetchAbort||r.allowStaleOnFetchAbort)&&(g(void 0),r.allowStaleOnFetchAbort&&(g=o(_=>l(_,!0),"res")))})},"pcall");r.status&&(r.status.fetchDispatched=!0);let m=new Promise(p).then(l,h),y=Object.assign(m,{__abortController:a,__staleWhileFetching:n,__returned:void 0});return t===void 0?(this.set(e,y,{...u.options,status:void 0}),t=this.#o.get(e)):this.#a[t]=y,y}#g(e){if(!this.#N)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof rl}async fetch(e,t={}){let{allowStale:r=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:c=this.noDisposeOnSet,size:u=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:h=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:p=this.allowStaleOnFetchRejection,ignoreFetchAbort:m=this.ignoreFetchAbort,allowStaleOnFetchAbort:y=this.allowStaleOnFetchAbort,context:g,forceRefresh:S=!1,status:E,signal:_}=t;if(!this.#N)return E&&(E.fetch="get"),this.get(e,{allowStale:r,updateAgeOnGet:s,noDeleteOnStaleGet:n,status:E});let b={allowStale:r,updateAgeOnGet:s,noDeleteOnStaleGet:n,ttl:a,noDisposeOnSet:c,size:u,sizeCalculation:l,noUpdateTTL:h,noDeleteOnFetchRejection:f,allowStaleOnFetchRejection:p,allowStaleOnFetchAbort:y,ignoreFetchAbort:m,status:E,signal:_},w=this.#o.get(e);if(w===void 0){E&&(E.fetch="miss");let I=this.#j(e,w,b,g);return I.__returned=I}else{let I=this.#a[w];if(this.#g(I)){let ee=r&&I.__staleWhileFetching!==void 0;return E&&(E.fetch="inflight",ee&&(E.returnedStale=!0)),ee?I.__staleWhileFetching:I.__returned=I}let v=this.#A(w);if(!S&&!v)return E&&(E.fetch="hit"),this.#V(w),s&&this.#C(w),E&&this.#T(E,w),I;let N=this.#j(e,w,b,g),U=N.__staleWhileFetching!==void 0&&r;return E&&(E.fetch=v?"stale":"refresh",U&&v&&(E.returnedStale=!0)),U?N.__staleWhileFetching:N.__returned=N}}async forceFetch(e,t={}){let r=await this.fetch(e,t);if(r===void 0)throw new Error("fetch() returned undefined");return r}memo(e,t={}){let r=this.#c;if(!r)throw new Error("no memoMethod provided to constructor");let{context:s,forceRefresh:n,...a}=t,c=this.get(e,a);if(!n&&c!==void 0)return c;let u=r(e,c,{options:a,context:s});return this.set(e,u,a),u}get(e,t={}){let{allowStale:r=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:a}=t,c=this.#o.get(e);if(c!==void 0){let u=this.#a[c],l=this.#g(u);return a&&this.#T(a,c),this.#A(c)?(a&&(a.get="stale"),l?(a&&r&&u.__staleWhileFetching!==void 0&&(a.returnedStale=!0),r?u.__staleWhileFetching:void 0):(n||this.#M(e,"expire"),a&&r&&(a.returnedStale=!0),r?u:void 0)):(a&&(a.get="hit"),l?u.__staleWhileFetching:(this.#V(c),s&&this.#C(c),u))}else a&&(a.get="miss")}#q(e,t){this.#y[t]=e,this.#p[e]=t}#V(e){e!==this.#m&&(e===this.#_?this.#_=this.#p[e]:this.#q(this.#y[e],this.#p[e]),this.#q(this.#m,e),this.#m=e)}delete(e){return this.#M(e,"delete")}#M(e,t){let r=!1;if(this.#n!==0){let s=this.#o.get(e);if(s!==void 0)if(r=!0,this.#n===1)this.#z(t);else{this.#P(s);let n=this.#a[s];if(this.#g(n)?n.__abortController.abort(new Error("deleted")):(this.#E||this.#O)&&(this.#E&&this.#i?.(n,e,t),this.#O&&this.#w?.push([n,e,t])),this.#o.delete(e),this.#d[s]=void 0,this.#a[s]=void 0,s===this.#m)this.#m=this.#y[s];else if(s===this.#_)this.#_=this.#p[s];else{let a=this.#y[s];this.#p[a]=this.#p[s];let c=this.#p[s];this.#y[c]=this.#y[s]}this.#n--,this.#R.push(s)}}if(this.#O&&this.#w?.length){let s=this.#w,n;for(;n=s?.shift();)this.#s?.(...n)}return r}clear(){return this.#z("delete")}#z(e){for(let t of this.#L({allowStale:!0})){let r=this.#a[t];if(this.#g(r))r.__abortController.abort(new Error("deleted"));else{let s=this.#d[t];this.#E&&this.#i?.(r,s,e),this.#O&&this.#w?.push([r,s,e])}}if(this.#o.clear(),this.#a.fill(void 0),this.#d.fill(void 0),this.#I&&this.#v&&(this.#I.fill(0),this.#v.fill(0)),this.#b&&this.#b.fill(0),this.#_=0,this.#m=0,this.#R.length=0,this.#h=0,this.#n=0,this.#O&&this.#w){let t=this.#w,r;for(;r=t?.shift();)this.#s?.(...r)}}};sl.LRUCache=zm});var AO=d((nhe,RO)=>{"use strict";var G=o((...i)=>i.every(e=>e)?i.join(""):"","maybeJoin"),ge=o(i=>i?encodeURIComponent(i):"","maybeEncode"),CO=o(i=>i.toLowerCase().replace(/^\W+/g,"").replace(/(?<!\W)\W+$/,"").replace(/\//g,"").replace(/\W+/g,"-"),"formatHashFragment"),e$={sshtemplate:o(({domain:i,user:e,project:t,committish:r})=>`git@${i}:${e}/${t}.git${G("#",r)}`,"sshtemplate"),sshurltemplate:o(({domain:i,user:e,project:t,committish:r})=>`git+ssh://git@${i}/${e}/${t}.git${G("#",r)}`,"sshurltemplate"),edittemplate:o(({domain:i,user:e,project:t,committish:r,editpath:s,path:n})=>`https://${i}/${e}/${t}${G("/",s,"/",ge(r||"HEAD"),"/",n)}`,"edittemplate"),browsetemplate:o(({domain:i,user:e,project:t,committish:r,treepath:s})=>`https://${i}/${e}/${t}${G("/",s,"/",ge(r))}`,"browsetemplate"),browsetreetemplate:o(({domain:i,user:e,project:t,committish:r,treepath:s,path:n,fragment:a,hashformat:c})=>`https://${i}/${e}/${t}/${s}/${ge(r||"HEAD")}/${n}${G("#",c(a||""))}`,"browsetreetemplate"),browseblobtemplate:o(({domain:i,user:e,project:t,committish:r,blobpath:s,path:n,fragment:a,hashformat:c})=>`https://${i}/${e}/${t}/${s}/${ge(r||"HEAD")}/${n}${G("#",c(a||""))}`,"browseblobtemplate"),docstemplate:o(({domain:i,user:e,project:t,treepath:r,committish:s})=>`https://${i}/${e}/${t}${G("/",r,"/",ge(s))}#readme`,"docstemplate"),httpstemplate:o(({auth:i,domain:e,user:t,project:r,committish:s})=>`git+https://${G(i,"@")}${e}/${t}/${r}.git${G("#",s)}`,"httpstemplate"),filetemplate:o(({domain:i,user:e,project:t,committish:r,path:s})=>`https://${i}/${e}/${t}/raw/${ge(r||"HEAD")}/${s}`,"filetemplate"),shortcuttemplate:o(({type:i,user:e,project:t,committish:r})=>`${i}:${e}/${t}${G("#",r)}`,"shortcuttemplate"),pathtemplate:o(({user:i,project:e,committish:t})=>`${i}/${e}${G("#",t)}`,"pathtemplate"),bugstemplate:o(({domain:i,user:e,project:t})=>`https://${i}/${e}/${t}/issues`,"bugstemplate"),hashformat:CO},yr={};yr.github={protocols:["git:","http:","git+ssh:","git+https:","ssh:","https:"],domain:"github.com",treepath:"tree",blobpath:"blob",editpath:"edit",filetemplate:o(({auth:i,user:e,project:t,committish:r,path:s})=>`https://${G(i,"@")}raw.githubusercontent.com/${e}/${t}/${ge(r||"HEAD")}/${s}`,"filetemplate"),gittemplate:o(({auth:i,domain:e,user:t,project:r,committish:s})=>`git://${G(i,"@")}${e}/${t}/${r}.git${G("#",s)}`,"gittemplate"),tarballtemplate:o(({domain:i,user:e,project:t,committish:r})=>`https://codeload.${i}/${e}/${t}/tar.gz/${ge(r||"HEAD")}`,"tarballtemplate"),extract:o(i=>{let[,e,t,r,s]=i.pathname.split("/",5);if(!(r&&r!=="tree")&&(r||(s=i.hash.slice(1)),t&&t.endsWith(".git")&&(t=t.slice(0,-4)),!(!e||!t)))return{user:e,project:t,committish:s}},"extract")};yr.bitbucket={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"bitbucket.org",treepath:"src",blobpath:"src",editpath:"?mode=edit",edittemplate:o(({domain:i,user:e,project:t,committish:r,treepath:s,path:n,editpath:a})=>`https://${i}/${e}/${t}${G("/",s,"/",ge(r||"HEAD"),"/",n,a)}`,"edittemplate"),tarballtemplate:o(({domain:i,user:e,project:t,committish:r})=>`https://${i}/${e}/${t}/get/${ge(r||"HEAD")}.tar.gz`,"tarballtemplate"),extract:o(i=>{let[,e,t,r]=i.pathname.split("/",4);if(!["get"].includes(r)&&(t&&t.endsWith(".git")&&(t=t.slice(0,-4)),!(!e||!t)))return{user:e,project:t,committish:i.hash.slice(1)}},"extract")};yr.gitlab={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"gitlab.com",treepath:"tree",blobpath:"tree",editpath:"-/edit",tarballtemplate:o(({domain:i,user:e,project:t,committish:r})=>`https://${i}/${e}/${t}/repository/archive.tar.gz?ref=${ge(r||"HEAD")}`,"tarballtemplate"),extract:o(i=>{let e=i.pathname.slice(1);if(e.includes("/-/")||e.includes("/archive.tar.gz"))return;let t=e.split("/"),r=t.pop();r.endsWith(".git")&&(r=r.slice(0,-4));let s=t.join("/");if(!(!s||!r))return{user:s,project:r,committish:i.hash.slice(1)}},"extract")};yr.gist={protocols:["git:","git+ssh:","git+https:","ssh:","https:"],domain:"gist.github.com",editpath:"edit",sshtemplate:o(({domain:i,project:e,committish:t})=>`git@${i}:${e}.git${G("#",t)}`,"sshtemplate"),sshurltemplate:o(({domain:i,project:e,committish:t})=>`git+ssh://git@${i}/${e}.git${G("#",t)}`,"sshurltemplate"),edittemplate:o(({domain:i,user:e,project:t,committish:r,editpath:s})=>`https://${i}/${e}/${t}${G("/",ge(r))}/${s}`,"edittemplate"),browsetemplate:o(({domain:i,project:e,committish:t})=>`https://${i}/${e}${G("/",ge(t))}`,"browsetemplate"),browsetreetemplate:o(({domain:i,project:e,committish:t,path:r,hashformat:s})=>`https://${i}/${e}${G("/",ge(t))}${G("#",s(r))}`,"browsetreetemplate"),browseblobtemplate:o(({domain:i,project:e,committish:t,path:r,hashformat:s})=>`https://${i}/${e}${G("/",ge(t))}${G("#",s(r))}`,"browseblobtemplate"),docstemplate:o(({domain:i,project:e,committish:t})=>`https://${i}/${e}${G("/",ge(t))}`,"docstemplate"),httpstemplate:o(({domain:i,project:e,committish:t})=>`git+https://${i}/${e}.git${G("#",t)}`,"httpstemplate"),filetemplate:o(({user:i,project:e,committish:t,path:r})=>`https://gist.githubusercontent.com/${i}/${e}/raw${G("/",ge(t))}/${r}`,"filetemplate"),shortcuttemplate:o(({type:i,project:e,committish:t})=>`${i}:${e}${G("#",t)}`,"shortcuttemplate"),pathtemplate:o(({project:i,committish:e})=>`${i}${G("#",e)}`,"pathtemplate"),bugstemplate:o(({domain:i,project:e})=>`https://${i}/${e}`,"bugstemplate"),gittemplate:o(({domain:i,project:e,committish:t})=>`git://${i}/${e}.git${G("#",t)}`,"gittemplate"),tarballtemplate:o(({project:i,committish:e})=>`https://codeload.github.com/gist/${i}/tar.gz/${ge(e||"HEAD")}`,"tarballtemplate"),extract:o(i=>{let[,e,t,r]=i.pathname.split("/",4);if(r!=="raw"){if(!t){if(!e)return;t=e,e=null}return t.endsWith(".git")&&(t=t.slice(0,-4)),{user:e,project:t,committish:i.hash.slice(1)}}},"extract"),hashformat:o(function(i){return i&&"file-"+CO(i)},"hashformat")};yr.sourcehut={protocols:["git+ssh:","https:"],domain:"git.sr.ht",treepath:"tree",blobpath:"tree",filetemplate:o(({domain:i,user:e,project:t,committish:r,path:s})=>`https://${i}/${e}/${t}/blob/${ge(r)||"HEAD"}/${s}`,"filetemplate"),httpstemplate:o(({domain:i,user:e,project:t,committish:r})=>`https://${i}/${e}/${t}.git${G("#",r)}`,"httpstemplate"),tarballtemplate:o(({domain:i,user:e,project:t,committish:r})=>`https://${i}/${e}/${t}/archive/${ge(r)||"HEAD"}.tar.gz`,"tarballtemplate"),bugstemplate:o(()=>null,"bugstemplate"),extract:o(i=>{let[,e,t,r]=i.pathname.split("/",4);if(!["archive"].includes(r)&&(t&&t.endsWith(".git")&&(t=t.slice(0,-4)),!(!e||!t)))return{user:e,project:t,committish:i.hash.slice(1)}},"extract")};for(let[i,e]of Object.entries(yr))yr[i]=Object.assign({},e$,e);RO.exports=yr});var Gm=d((ahe,NO)=>{var t$=require("url"),Hm=o((i,e,t)=>{let r=i.indexOf(t);return i.lastIndexOf(e,r>-1?r:1/0)},"lastIndexOfBefore"),TO=o(i=>{try{return new t$.URL(i)}catch{}},"safeUrl"),i$=o((i,e)=>{let t=i.indexOf(":"),r=i.slice(0,t+1);if(Object.prototype.hasOwnProperty.call(e,r)||i.substr(t,3)==="://")return i;let s=i.indexOf("@");return s>-1?s>t?`git+ssh://${i}`:i:`${i.slice(0,t+1)}//${i.slice(t+1)}`},"correctProtocol"),r$=o(i=>{let e=Hm(i,"@","#"),t=Hm(i,":","#");return t>e&&(i=i.slice(0,t)+"/"+i.slice(t+1)),Hm(i,":","#")===-1&&i.indexOf("//")===-1&&(i=`git+ssh://${i}`),i},"correctUrl");NO.exports=(i,e)=>{let t=e?i$(i,e):i;return TO(t)||TO(r$(t))}});var DO=d((uhe,PO)=>{"use strict";var s$=Gm(),n$=o(i=>{let e=i.indexOf("#"),t=i.indexOf("/"),r=i.indexOf("/",t+1),s=i.indexOf(":"),n=/\s/.exec(i),a=i.indexOf("@"),c=!n||e>-1&&n.index>e,u=a===-1||e>-1&&a>e,l=s===-1||e>-1&&s>e,h=r===-1||e>-1&&r>e,f=t>0,p=e>-1?i[e-1]!=="/":!i.endsWith("/"),m=!i.startsWith(".");return c&&f&&p&&m&&u&&l&&h},"isGitHubShorthand");PO.exports=(i,e,{gitHosts:t,protocols:r})=>{if(!i)return;let s=n$(i)?`github:${i}`:i,n=s$(s,r);if(!n)return;let a=t.byShortcut[n.protocol],c=t.byDomain[n.hostname.startsWith("www.")?n.hostname.slice(4):n.hostname],u=a||c;if(!u)return;let l=t[a||c],h=null;r[n.protocol]?.auth&&(n.username||n.password)&&(h=`${n.username}${n.password?":"+n.password:""}`);let f=null,p=null,m=null,y=null;try{if(a){let g=n.pathname.startsWith("/")?n.pathname.slice(1):n.pathname,S=g.indexOf("@");S>-1&&(g=g.slice(S+1));let E=g.lastIndexOf("/");E>-1?(p=decodeURIComponent(g.slice(0,E)),p||(p=null),m=decodeURIComponent(g.slice(E+1))):m=decodeURIComponent(g),m.endsWith(".git")&&(m=m.slice(0,-4)),n.hash&&(f=decodeURIComponent(n.hash.slice(1))),y="shortcut"}else{if(!l.protocols.includes(n.protocol))return;let g=l.extract(n);if(!g)return;p=g.user&&decodeURIComponent(g.user),m=decodeURIComponent(g.project),f=decodeURIComponent(g.committish),y=r[n.protocol]?.name||n.protocol.slice(0,-1)}}catch(g){if(g instanceof URIError)return;throw g}return[u,p,h,m,f,y,e]}});var ol=d((hhe,xO)=>{"use strict";var{LRUCache:o$}=hs(),a$=AO(),c$=DO(),u$=Gm(),Wm=new o$({max:1e3});function l$(i){try{let{protocol:e,hostname:t,pathname:r}=new URL(i);if(!t)return null;let s=/(?:git\+)http:$/.test(e)?"http:":"https:",n=r.replace(/\.git$/,"");return`${s}//${t}${n}`}catch{return null}}o(l$,"unknownHostedUrl");var nl=class i{static{o(this,"GitHost")}constructor(e,t,r,s,n,a,c={}){Object.assign(this,i.#e[e],{type:e,user:t,auth:r,project:s,committish:n,default:a,opts:c})}static#e={byShortcut:{},byDomain:{}};static#t={"git+ssh:":{name:"sshurl"},"ssh:":{name:"sshurl"},"git+https:":{name:"https",auth:!0},"git:":{auth:!0},"http:":{auth:!0},"https:":{auth:!0},"git+http:":{auth:!0}};static addHost(e,t){i.#e[e]=t,i.#e.byDomain[t.domain]=e,i.#e.byShortcut[`${e}:`]=e,i.#t[`${e}:`]={name:e}}static fromUrl(e,t){if(typeof e!="string")return;let r=e+JSON.stringify(t||{});if(!Wm.has(r)){let s=c$(e,t,{gitHosts:i.#e,protocols:i.#t});Wm.set(r,s?new i(...s):void 0)}return Wm.get(r)}static fromManifest(e,t={}){if(!e||typeof e!="object")return;let r=e.repository,s=r&&(typeof r=="string"?r:typeof r=="object"&&typeof r.url=="string"?r.url:null);if(!s)throw new Error("no repository");let n=s&&i.fromUrl(s.replace(/^git\+/,""),t)||null;if(n)return n;let a=l$(s);return i.fromUrl(a,t)||a}static parseUrl(e){return u$(e)}#i(e,t){if(typeof e!="function")return null;let r={...this,...this.opts,...t};r.path||(r.path=""),r.path.startsWith("/")&&(r.path=r.path.slice(1)),r.noCommittish&&(r.committish=null);let s=e(r);return r.noGitPlus&&s.startsWith("git+")?s.slice(4):s}hash(){return this.committish?`#${this.committish}`:""}ssh(e){return this.#i(this.sshtemplate,e)}sshurl(e){return this.#i(this.sshurltemplate,e)}browse(e,...t){return typeof e!="string"?this.#i(this.browsetemplate,e):typeof t[0]!="string"?this.#i(this.browsetreetemplate,{...t[0],path:e}):this.#i(this.browsetreetemplate,{...t[1],fragment:t[0],path:e})}browseFile(e,...t){return typeof t[0]!="string"?this.#i(this.browseblobtemplate,{...t[0],path:e}):this.#i(this.browseblobtemplate,{...t[1],fragment:t[0],path:e})}docs(e){return this.#i(this.docstemplate,e)}bugs(e){return this.#i(this.bugstemplate,e)}https(e){return this.#i(this.httpstemplate,e)}git(e){return this.#i(this.gittemplate,e)}shortcut(e){return this.#i(this.shortcuttemplate,e)}path(e){return this.#i(this.pathtemplate,e)}tarball(e){return this.#i(this.tarballtemplate,{...e,noCommittish:!1})}file(e,t){return this.#i(this.filetemplate,{...t,path:e})}edit(e,t){return this.#i(this.edittemplate,{...t,path:e})}getDefaultRepresentation(){return this.default}toString(e){return this.default&&typeof this[this.default]=="function"?this[this.default](e):this.sshurl(e)}};for(let[i,e]of Object.entries(a$))nl.addHost(i,e);xO.exports=nl});var MO=d(fs=>{"use strict";Object.defineProperty(fs,"__esModule",{value:!0});fs.range=fs.balanced=void 0;var h$=o((i,e,t)=>{let r=i instanceof RegExp?LO(i,t):i,s=e instanceof RegExp?LO(e,t):e,n=r!==null&&s!=null&&(0,fs.range)(r,s,t);return n&&{start:n[0],end:n[1],pre:t.slice(0,n[0]),body:t.slice(n[0]+r.length,n[1]),post:t.slice(n[1]+s.length)}},"balanced");fs.balanced=h$;var LO=o((i,e)=>{let t=e.match(i);return t?t[0]:null},"maybeMatch"),f$=o((i,e,t)=>{let r,s,n,a,c,u=t.indexOf(i),l=t.indexOf(e,u+1),h=u;if(u>=0&&l>0){if(i===e)return[u,l];for(r=[],n=t.length;h>=0&&!c;){if(h===u)r.push(h),u=t.indexOf(i,h+1);else if(r.length===1){let f=r.pop();f!==void 0&&(c=[f,l])}else s=r.pop(),s!==void 0&&s<n&&(n=s,a=l),l=t.indexOf(e,h+1);h=u<l&&u>=0?u:l}r.length&&a!==void 0&&(c=[n,a])}return c},"range");fs.range=f$});var qO=d(Zm=>{"use strict";Object.defineProperty(Zm,"__esModule",{value:!0});Zm.expand=v$;var BO=MO(),kO="\0SLASH"+Math.random()+"\0",FO="\0OPEN"+Math.random()+"\0",Km="\0CLOSE"+Math.random()+"\0",UO="\0COMMA"+Math.random()+"\0",jO="\0PERIOD"+Math.random()+"\0",d$=new RegExp(kO,"g"),p$=new RegExp(FO,"g"),m$=new RegExp(Km,"g"),g$=new RegExp(UO,"g"),y$=new RegExp(jO,"g"),S$=/\\\\/g,E$=/\\{/g,w$=/\\}/g,_$=/\\,/g,b$=/\\./g;function Jm(i){return isNaN(i)?i.charCodeAt(0):parseInt(i,10)}o(Jm,"numeric");function I$(i){return i.replace(S$,kO).replace(E$,FO).replace(w$,Km).replace(_$,UO).replace(b$,jO)}o(I$,"escapeBraces");function O$(i){return i.replace(d$,"\\").replace(p$,"{").replace(m$,"}").replace(g$,",").replace(y$,".")}o(O$,"unescapeBraces");function $O(i){if(!i)return[""];let e=[],t=(0,BO.balanced)("{","}",i);if(!t)return i.split(",");let{pre:r,body:s,post:n}=t,a=r.split(",");a[a.length-1]+="{"+s+"}";let c=$O(n);return n.length&&(a[a.length-1]+=c.shift(),a.push.apply(a,c)),e.push.apply(e,a),e}o($O,"parseCommaParts");function v$(i){return i?(i.slice(0,2)==="{}"&&(i="\\{\\}"+i.slice(2)),ba(I$(i),!0).map(O$)):[]}o(v$,"expand");function C$(i){return"{"+i+"}"}o(C$,"embrace");function R$(i){return/^-?0\d/.test(i)}o(R$,"isPadded");function A$(i,e){return i<=e}o(A$,"lte");function T$(i,e){return i>=e}o(T$,"gte");function ba(i,e){let t=[],r=(0,BO.balanced)("{","}",i);if(!r)return[i];let s=r.pre,n=r.post.length?ba(r.post,!1):[""];if(/\$$/.test(r.pre))for(let a=0;a<n.length;a++){let c=s+"{"+r.body+"}"+n[a];t.push(c)}else{let a=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(r.body),c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(r.body),u=a||c,l=r.body.indexOf(",")>=0;if(!u&&!l)return r.post.match(/,(?!,).*\}/)?(i=r.pre+"{"+r.body+Km+r.post,ba(i)):[i];let h;if(u)h=r.body.split(/\.\./);else if(h=$O(r.body),h.length===1&&h[0]!==void 0&&(h=ba(h[0],!1).map(C$),h.length===1))return n.map(p=>r.pre+h[0]+p);let f;if(u&&h[0]!==void 0&&h[1]!==void 0){let p=Jm(h[0]),m=Jm(h[1]),y=Math.max(h[0].length,h[1].length),g=h.length===3&&h[2]!==void 0?Math.abs(Jm(h[2])):1,S=A$;m<p&&(g*=-1,S=T$);let _=h.some(R$);f=[];for(let b=p;S(b,m);b+=g){let w;if(c)w=String.fromCharCode(b),w==="\\"&&(w="");else if(w=String(b),_){let I=y-w.length;if(I>0){let v=new Array(I+1).join("0");b<0?w="-"+v+w.slice(1):w=v+w}}f.push(w)}}else{f=[];for(let p=0;p<h.length;p++)f.push.apply(f,ba(h[p],!1))}for(let p=0;p<f.length;p++)for(let m=0;m<n.length;m++){let y=s+f[p]+n[m];(!e||u||y)&&t.push(y)}}return t}o(ba,"expand_")});var VO=d(al=>{"use strict";Object.defineProperty(al,"__esModule",{value:!0});al.assertValidPattern=void 0;var N$=1024*64,P$=o(i=>{if(typeof i!="string")throw new TypeError("invalid pattern");if(i.length>N$)throw new TypeError("pattern is too long")},"assertValidPattern");al.assertValidPattern=P$});var HO=d(cl=>{"use strict";Object.defineProperty(cl,"__esModule",{value:!0});cl.parseClass=void 0;var D$={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},Ia=o(i=>i.replace(/[[\]\\-]/g,"\\$&"),"braceEscape"),x$=o(i=>i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regexpEscape"),zO=o(i=>i.join(""),"rangesToString"),L$=o((i,e)=>{let t=e;if(i.charAt(t)!=="[")throw new Error("not in a brace expression");let r=[],s=[],n=t+1,a=!1,c=!1,u=!1,l=!1,h=t,f="";e:for(;n<i.length;){let g=i.charAt(n);if((g==="!"||g==="^")&&n===t+1){l=!0,n++;continue}if(g==="]"&&a&&!u){h=n+1;break}if(a=!0,g==="\\"&&!u){u=!0,n++;continue}if(g==="["&&!u){for(let[S,[E,_,b]]of Object.entries(D$))if(i.startsWith(S,n)){if(f)return["$.",!1,i.length-t,!0];n+=S.length,b?s.push(E):r.push(E),c=c||_;continue e}}if(u=!1,f){g>f?r.push(Ia(f)+"-"+Ia(g)):g===f&&r.push(Ia(g)),f="",n++;continue}if(i.startsWith("-]",n+1)){r.push(Ia(g+"-")),n+=2;continue}if(i.startsWith("-",n+1)){f=g,n+=2;continue}r.push(Ia(g)),n++}if(h<n)return["",!1,0,!1];if(!r.length&&!s.length)return["$.",!1,i.length-t,!0];if(s.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!l){let g=r[0].length===2?r[0].slice(-1):r[0];return[x$(g),!1,h-t,!1]}let p="["+(l?"^":"")+zO(r)+"]",m="["+(l?"":"^")+zO(s)+"]";return[r.length&&s.length?"("+p+"|"+m+")":r.length?p:m,c,h-t,!0]},"parseClass");cl.parseClass=L$});var ll=d(ul=>{"use strict";Object.defineProperty(ul,"__esModule",{value:!0});ul.unescape=void 0;var M$=o((i,{windowsPathsNoEscape:e=!1}={})=>e?i.replace(/\[([^\/\\])\]/g,"$1"):i.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),"unescape");ul.unescape=M$});var Qm=d(dl=>{"use strict";Object.defineProperty(dl,"__esModule",{value:!0});dl.AST=void 0;var B$=HO(),hl=ll(),k$=new Set(["!","?","+","*","@"]),GO=o(i=>k$.has(i),"isExtglobType"),F$="(?!(?:^|/)\\.\\.?(?:$|/))",fl="(?!\\.)",U$=new Set(["[","."]),j$=new Set(["..","."]),$$=new Set("().*{}+?[]^$\\!"),q$=o(i=>i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),Xm="[^/]",WO=Xm+"*?",JO=Xm+"+?",Ym=class i{static{o(this,"AST")}type;#e;#t;#i=!1;#r=[];#s;#u;#c;#f=!1;#n;#h;#o=!1;constructor(e,t,r={}){this.type=e,e&&(this.#t=!0),this.#s=t,this.#e=this.#s?this.#s.#e:this,this.#n=this.#e===this?r:this.#e.#n,this.#c=this.#e===this?[]:this.#e.#c,e==="!"&&!this.#e.#f&&this.#c.push(this),this.#u=this.#s?this.#s.#r.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let e of this.#r)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#h!==void 0?this.#h:this.type?this.#h=this.type+"("+this.#r.map(e=>String(e)).join("|")+")":this.#h=this.#r.map(e=>String(e)).join("")}#d(){if(this!==this.#e)throw new Error("should only call on root");if(this.#f)return this;this.toString(),this.#f=!0;let e;for(;e=this.#c.pop();){if(e.type!=="!")continue;let t=e,r=t.#s;for(;r;){for(let s=t.#u+1;!r.type&&s<r.#r.length;s++)for(let n of e.#r){if(typeof n=="string")throw new Error("string part in extglob AST??");n.copyIn(r.#r[s])}t=r,r=t.#s}}return this}push(...e){for(let t of e)if(t!==""){if(typeof t!="string"&&!(t instanceof i&&t.#s===this))throw new Error("invalid part: "+t);this.#r.push(t)}}toJSON(){let e=this.type===null?this.#r.slice().map(t=>typeof t=="string"?t:t.toJSON()):[this.type,...this.#r.map(t=>t.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#f&&this.#s?.type==="!")&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#s?.isStart())return!1;if(this.#u===0)return!0;let e=this.#s;for(let t=0;t<this.#u;t++){let r=e.#r[t];if(!(r instanceof i&&r.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#s?.type==="!")return!0;if(!this.#s?.isEnd())return!1;if(!this.type)return this.#s?.isEnd();let e=this.#s?this.#s.#r.length:0;return this.#u===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let t=new i(this.type,e);for(let r of this.#r)t.copyIn(r);return t}static#a(e,t,r,s){let n=!1,a=!1,c=-1,u=!1;if(t.type===null){let m=r,y="";for(;m<e.length;){let g=e.charAt(m++);if(n||g==="\\"){n=!n,y+=g;continue}if(a){m===c+1?(g==="^"||g==="!")&&(u=!0):g==="]"&&!(m===c+2&&u)&&(a=!1),y+=g;continue}else if(g==="["){a=!0,c=m,u=!1,y+=g;continue}if(!s.noext&&GO(g)&&e.charAt(m)==="("){t.push(y),y="";let S=new i(g,t);m=i.#a(e,S,m,s),t.push(S);continue}y+=g}return t.push(y),m}let l=r+1,h=new i(null,t),f=[],p="";for(;l<e.length;){let m=e.charAt(l++);if(n||m==="\\"){n=!n,p+=m;continue}if(a){l===c+1?(m==="^"||m==="!")&&(u=!0):m==="]"&&!(l===c+2&&u)&&(a=!1),p+=m;continue}else if(m==="["){a=!0,c=l,u=!1,p+=m;continue}if(GO(m)&&e.charAt(l)==="("){h.push(p),p="";let y=new i(m,h);h.push(y),l=i.#a(e,y,l,s);continue}if(m==="|"){h.push(p),p="",f.push(h),h=new i(null,t);continue}if(m===")")return p===""&&t.#r.length===0&&(t.#o=!0),h.push(p),p="",t.push(...f,h),l;p+=m}return t.type=null,t.#t=void 0,t.#r=[e.substring(r-1)],l}static fromGlob(e,t={}){let r=new i(null,void 0,t);return i.#a(e,r,0,t),r}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[t,r,s,n]=this.toRegExpSource();if(!(s||this.#t||this.#n.nocase&&!this.#n.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return r;let c=(this.#n.nocase?"i":"")+(n?"u":"");return Object.assign(new RegExp(`^${t}$`,c),{_src:t,_glob:e})}get options(){return this.#n}toRegExpSource(e){let t=e??!!this.#n.dot;if(this.#e===this&&this.#d(),!this.type){let u=this.isStart()&&this.isEnd(),l=this.#r.map(m=>{let[y,g,S,E]=typeof m=="string"?i.#y(m,this.#t,u):m.toRegExpSource(e);return this.#t=this.#t||S,this.#i=this.#i||E,y}).join(""),h="";if(this.isStart()&&typeof this.#r[0]=="string"&&!(this.#r.length===1&&j$.has(this.#r[0]))){let y=U$,g=t&&y.has(l.charAt(0))||l.startsWith("\\.")&&y.has(l.charAt(2))||l.startsWith("\\.\\.")&&y.has(l.charAt(4)),S=!t&&!e&&y.has(l.charAt(0));h=g?F$:S?fl:""}let f="";return this.isEnd()&&this.#e.#f&&this.#s?.type==="!"&&(f="(?:$|\\/)"),[h+l+f,(0,hl.unescape)(l),this.#t=!!this.#t,this.#i]}let r=this.type==="*"||this.type==="+",s=this.type==="!"?"(?:(?!(?:":"(?:",n=this.#p(t);if(this.isStart()&&this.isEnd()&&!n&&this.type!=="!"){let u=this.toString();return this.#r=[u],this.type=null,this.#t=void 0,[u,(0,hl.unescape)(this.toString()),!1,!1]}let a=!r||e||t||!fl?"":this.#p(!0);a===n&&(a=""),a&&(n=`(?:${n})(?:${a})*?`);let c="";if(this.type==="!"&&this.#o)c=(this.isStart()&&!t?fl:"")+JO;else{let u=this.type==="!"?"))"+(this.isStart()&&!t&&!e?fl:"")+WO+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;c=s+n+u}return[c,(0,hl.unescape)(n),this.#t=!!this.#t,this.#i]}#p(e){return this.#r.map(t=>{if(typeof t=="string")throw new Error("string type in extglob ast??");let[r,s,n,a]=t.toRegExpSource(e);return this.#i=this.#i||a,r}).filter(t=>!(this.isStart()&&this.isEnd())||!!t).join("|")}static#y(e,t,r=!1){let s=!1,n="",a=!1;for(let c=0;c<e.length;c++){let u=e.charAt(c);if(s){s=!1,n+=($$.has(u)?"\\":"")+u;continue}if(u==="\\"){c===e.length-1?n+="\\\\":s=!0;continue}if(u==="["){let[l,h,f,p]=(0,B$.parseClass)(e,c);if(f){n+=l,a=a||h,c+=f-1,t=t||p;continue}}if(u==="*"){r&&e==="*"?n+=JO:n+=WO,t=!0;continue}if(u==="?"){n+=Xm,t=!0;continue}n+=q$(u)}return[n,(0,hl.unescape)(e),!!t,a]}};dl.AST=Ym});var eg=d(pl=>{"use strict";Object.defineProperty(pl,"__esModule",{value:!0});pl.escape=void 0;var V$=o((i,{windowsPathsNoEscape:e=!1}={})=>e?i.replace(/[?*()[\]]/g,"[$&]"):i.replace(/[?*()[\]\\]/g,"\\$&"),"escape");pl.escape=V$});var Ui=d(T=>{"use strict";Object.defineProperty(T,"__esModule",{value:!0});T.unescape=T.escape=T.AST=T.Minimatch=T.match=T.makeRe=T.braceExpand=T.defaults=T.filter=T.GLOBSTAR=T.sep=T.minimatch=void 0;var z$=qO(),ml=VO(),YO=Qm(),H$=eg(),G$=ll(),W$=o((i,e,t={})=>((0,ml.assertValidPattern)(e),!t.nocomment&&e.charAt(0)==="#"?!1:new ds(e,t).match(i)),"minimatch");T.minimatch=W$;var J$=/^\*+([^+@!?\*\[\(]*)$/,K$=o(i=>e=>!e.startsWith(".")&&e.endsWith(i),"starDotExtTest"),Z$=o(i=>e=>e.endsWith(i),"starDotExtTestDot"),Y$=o(i=>(i=i.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(i)),"starDotExtTestNocase"),X$=o(i=>(i=i.toLowerCase(),e=>e.toLowerCase().endsWith(i)),"starDotExtTestNocaseDot"),Q$=/^\*+\.\*+$/,eq=o(i=>!i.startsWith(".")&&i.includes("."),"starDotStarTest"),tq=o(i=>i!=="."&&i!==".."&&i.includes("."),"starDotStarTestDot"),iq=/^\.\*+$/,rq=o(i=>i!=="."&&i!==".."&&i.startsWith("."),"dotStarTest"),sq=/^\*+$/,nq=o(i=>i.length!==0&&!i.startsWith("."),"starTest"),oq=o(i=>i.length!==0&&i!=="."&&i!=="..","starTestDot"),aq=/^\?+([^+@!?\*\[\(]*)?$/,cq=o(([i,e=""])=>{let t=XO([i]);return e?(e=e.toLowerCase(),r=>t(r)&&r.toLowerCase().endsWith(e)):t},"qmarksTestNocase"),uq=o(([i,e=""])=>{let t=QO([i]);return e?(e=e.toLowerCase(),r=>t(r)&&r.toLowerCase().endsWith(e)):t},"qmarksTestNocaseDot"),lq=o(([i,e=""])=>{let t=QO([i]);return e?r=>t(r)&&r.endsWith(e):t},"qmarksTestDot"),hq=o(([i,e=""])=>{let t=XO([i]);return e?r=>t(r)&&r.endsWith(e):t},"qmarksTest"),XO=o(([i])=>{let e=i.length;return t=>t.length===e&&!t.startsWith(".")},"qmarksTestNoExt"),QO=o(([i])=>{let e=i.length;return t=>t.length===e&&t!=="."&&t!==".."},"qmarksTestNoExtDot"),ev=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",KO={win32:{sep:"\\"},posix:{sep:"/"}};T.sep=ev==="win32"?KO.win32.sep:KO.posix.sep;T.minimatch.sep=T.sep;T.GLOBSTAR=Symbol("globstar **");T.minimatch.GLOBSTAR=T.GLOBSTAR;var fq="[^/]",dq=fq+"*?",pq="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",mq="(?:(?!(?:\\/|^)\\.).)*?",gq=o((i,e={})=>t=>(0,T.minimatch)(t,i,e),"filter");T.filter=gq;T.minimatch.filter=T.filter;var bt=o((i,e={})=>Object.assign({},i,e),"ext"),yq=o(i=>{if(!i||typeof i!="object"||!Object.keys(i).length)return T.minimatch;let e=T.minimatch;return Object.assign(o((r,s,n={})=>e(r,s,bt(i,n)),"m"),{Minimatch:class extends e.Minimatch{static{o(this,"Minimatch")}constructor(s,n={}){super(s,bt(i,n))}static defaults(s){return e.defaults(bt(i,s)).Minimatch}},AST:class extends e.AST{static{o(this,"AST")}constructor(s,n,a={}){super(s,n,bt(i,a))}static fromGlob(s,n={}){return e.AST.fromGlob(s,bt(i,n))}},unescape:o((r,s={})=>e.unescape(r,bt(i,s)),"unescape"),escape:o((r,s={})=>e.escape(r,bt(i,s)),"escape"),filter:o((r,s={})=>e.filter(r,bt(i,s)),"filter"),defaults:o(r=>e.defaults(bt(i,r)),"defaults"),makeRe:o((r,s={})=>e.makeRe(r,bt(i,s)),"makeRe"),braceExpand:o((r,s={})=>e.braceExpand(r,bt(i,s)),"braceExpand"),match:o((r,s,n={})=>e.match(r,s,bt(i,n)),"match"),sep:e.sep,GLOBSTAR:T.GLOBSTAR})},"defaults");T.defaults=yq;T.minimatch.defaults=T.defaults;var Sq=o((i,e={})=>((0,ml.assertValidPattern)(i),e.nobrace||!/\{(?:(?!\{).)*\}/.test(i)?[i]:(0,z$.expand)(i)),"braceExpand");T.braceExpand=Sq;T.minimatch.braceExpand=T.braceExpand;var Eq=o((i,e={})=>new ds(i,e).makeRe(),"makeRe");T.makeRe=Eq;T.minimatch.makeRe=T.makeRe;var wq=o((i,e,t={})=>{let r=new ds(e,t);return i=i.filter(s=>r.match(s)),r.options.nonull&&!i.length&&i.push(e),i},"match");T.match=wq;T.minimatch.match=T.match;var ZO=/[?*]|[+@!]\(.*?\)|\[|\]/,_q=o(i=>i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),ds=class{static{o(this,"Minimatch")}options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,t={}){(0,ml.assertValidPattern)(e),t=t||{},this.options=t,this.pattern=e,this.platform=t.platform||ev,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot!==void 0?t.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if(typeof t!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...n)=>{}),this.debug(this.pattern,this.globSet);let r=this.globSet.map(n=>this.slashSplit(n));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let s=this.globParts.map((n,a,c)=>{if(this.isWindows&&this.windowsNoMagicRoot){let u=n[0]===""&&n[1]===""&&(n[2]==="?"||!ZO.test(n[2]))&&!ZO.test(n[3]),l=/^[a-z]:/i.test(n[0]);if(u)return[...n.slice(0,4),...n.slice(4).map(h=>this.parse(h))];if(l)return[n[0],...n.slice(1).map(h=>this.parse(h))]}return n.map(u=>this.parse(u))});if(this.debug(this.pattern,s),this.set=s.filter(n=>n.indexOf(!1)===-1),this.isWindows)for(let n=0;n<this.set.length;n++){let a=this.set[n];a[0]===""&&a[1]===""&&this.globParts[n][2]==="?"&&typeof a[3]=="string"&&/^[a-z]:$/i.test(a[3])&&(a[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let r=0;r<e.length;r++)for(let s=0;s<e[r].length;s++)e[r][s]==="**"&&(e[r][s]="*");let{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):t>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(t=>{let r=-1;for(;(r=t.indexOf("**",r+1))!==-1;){let s=r;for(;t[s+1]==="**";)s++;s!==r&&t.splice(r,s-r)}return t})}levelOneOptimize(e){return e.map(t=>(t=t.reduce((r,s)=>{let n=r[r.length-1];return s==="**"&&n==="**"?r:s===".."&&n&&n!==".."&&n!=="."&&n!=="**"?(r.pop(),r):(r.push(s),r)},[]),t.length===0?[""]:t))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let s=1;s<e.length-1;s++){let n=e[s];s===1&&n===""&&e[0]===""||(n==="."||n==="")&&(t=!0,e.splice(s,1),s--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(t=!0,e.pop())}let r=0;for(;(r=e.indexOf("..",r+1))!==-1;){let s=e[r-1];s&&s!=="."&&s!==".."&&s!=="**"&&(t=!0,e.splice(r-1,2),r-=2)}}while(t);return e.length===0?[""]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let r of e){let s=-1;for(;(s=r.indexOf("**",s+1))!==-1;){let a=s;for(;r[a+1]==="**";)a++;a>s&&r.splice(s+1,a-s);let c=r[s+1],u=r[s+2],l=r[s+3];if(c!==".."||!u||u==="."||u===".."||!l||l==="."||l==="..")continue;t=!0,r.splice(s,1);let h=r.slice(0);h[s]="**",e.push(h),s--}if(!this.preserveMultipleSlashes){for(let a=1;a<r.length-1;a++){let c=r[a];a===1&&c===""&&r[0]===""||(c==="."||c==="")&&(t=!0,r.splice(a,1),a--)}r[0]==="."&&r.length===2&&(r[1]==="."||r[1]==="")&&(t=!0,r.pop())}let n=0;for(;(n=r.indexOf("..",n+1))!==-1;){let a=r[n-1];if(a&&a!=="."&&a!==".."&&a!=="**"){t=!0;let u=n===1&&r[n+1]==="**"?["."]:[];r.splice(n-1,2,...u),r.length===0&&r.push(""),n-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let r=t+1;r<e.length;r++){let s=this.partsMatch(e[t],e[r],!this.preserveMultipleSlashes);if(s){e[t]=[],e[r]=s;break}}return e.filter(t=>t.length)}partsMatch(e,t,r=!1){let s=0,n=0,a=[],c="";for(;s<e.length&&n<t.length;)if(e[s]===t[n])a.push(c==="b"?t[n]:e[s]),s++,n++;else if(r&&e[s]==="**"&&t[n]===e[s+1])a.push(e[s]),s++;else if(r&&t[n]==="**"&&e[s]===t[n+1])a.push(t[n]),n++;else if(e[s]==="*"&&t[n]&&(this.options.dot||!t[n].startsWith("."))&&t[n]!=="**"){if(c==="b")return!1;c="a",a.push(e[s]),s++,n++}else if(t[n]==="*"&&e[s]&&(this.options.dot||!e[s].startsWith("."))&&e[s]!=="**"){if(c==="a")return!1;c="b",a.push(t[n]),s++,n++}else return!1;return e.length===t.length&&a}parseNegate(){if(this.nonegate)return;let e=this.pattern,t=!1,r=0;for(let s=0;s<e.length&&e.charAt(s)==="!";s++)t=!t,r++;r&&(this.pattern=e.slice(r)),this.negate=t}matchOne(e,t,r=!1){let s=this.options;if(this.isWindows){let g=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),S=!g&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),E=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),_=!E&&t[0]===""&&t[1]===""&&t[2]==="?"&&typeof t[3]=="string"&&/^[a-z]:$/i.test(t[3]),b=S?3:g?0:void 0,w=_?3:E?0:void 0;if(typeof b=="number"&&typeof w=="number"){let[I,v]=[e[b],t[w]];I.toLowerCase()===v.toLowerCase()&&(t[w]=I,w>b?t=t.slice(w):b>w&&(e=e.slice(b)))}}let{optimizationLevel:n=1}=this.options;n>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var a=0,c=0,u=e.length,l=t.length;a<u&&c<l;a++,c++){this.debug("matchOne loop");var h=t[c],f=e[a];if(this.debug(t,h,f),h===!1)return!1;if(h===T.GLOBSTAR){this.debug("GLOBSTAR",[t,h,f]);var p=a,m=c+1;if(m===l){for(this.debug("** at the end");a<u;a++)if(e[a]==="."||e[a]===".."||!s.dot&&e[a].charAt(0)===".")return!1;return!0}for(;p<u;){var y=e[p];if(this.debug(`
7
+ globstar while`,e,p,t,m,y),this.matchOne(e.slice(p),t.slice(m),r))return this.debug("globstar found match!",p,u,y),!0;if(y==="."||y===".."||!s.dot&&y.charAt(0)==="."){this.debug("dot detected!",e,p,t,m);break}this.debug("globstar swallow a segment, and continue"),p++}return!!(r&&(this.debug(`
8
+ >>> no match, partial?`,e,p,t,m),p===u))}let g;if(typeof h=="string"?(g=f===h,this.debug("string match",h,f,g)):(g=h.test(f),this.debug("pattern match",h,f,g)),!g)return!1}if(a===u&&c===l)return!0;if(a===u)return r;if(c===l)return a===u-1&&e[a]==="";throw new Error("wtf?")}braceExpand(){return(0,T.braceExpand)(this.pattern,this.options)}parse(e){(0,ml.assertValidPattern)(e);let t=this.options;if(e==="**")return T.GLOBSTAR;if(e==="")return"";let r,s=null;(r=e.match(sq))?s=t.dot?oq:nq:(r=e.match(J$))?s=(t.nocase?t.dot?X$:Y$:t.dot?Z$:K$)(r[1]):(r=e.match(aq))?s=(t.nocase?t.dot?uq:cq:t.dot?lq:hq)(r):(r=e.match(Q$))?s=t.dot?tq:eq:(r=e.match(iq))&&(s=rq);let n=YO.AST.fromGlob(e,this.options).toMMPattern();return s&&typeof n=="object"&&Reflect.defineProperty(n,"test",{value:s}),n}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let t=this.options,r=t.noglobstar?dq:t.dot?pq:mq,s=new Set(t.nocase?["i"]:[]),n=e.map(u=>{let l=u.map(h=>{if(h instanceof RegExp)for(let f of h.flags.split(""))s.add(f);return typeof h=="string"?_q(h):h===T.GLOBSTAR?T.GLOBSTAR:h._src});return l.forEach((h,f)=>{let p=l[f+1],m=l[f-1];h!==T.GLOBSTAR||m===T.GLOBSTAR||(m===void 0?p!==void 0&&p!==T.GLOBSTAR?l[f+1]="(?:\\/|"+r+"\\/)?"+p:l[f]=r:p===void 0?l[f-1]=m+"(?:\\/|"+r+")?":p!==T.GLOBSTAR&&(l[f-1]=m+"(?:\\/|\\/"+r+"\\/)"+p,l[f+1]=T.GLOBSTAR))}),l.filter(h=>h!==T.GLOBSTAR).join("/")}).join("|"),[a,c]=e.length>1?["(?:",")"]:["",""];n="^"+a+n+c+"$",this.negate&&(n="^(?!"+n+").+$");try{this.regexp=new RegExp(n,[...s].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&t)return!0;let r=this.options;this.isWindows&&(e=e.split("\\").join("/"));let s=this.slashSplit(e);this.debug(this.pattern,"split",s);let n=this.set;this.debug(this.pattern,"set",n);let a=s[s.length-1];if(!a)for(let c=s.length-2;!a&&c>=0;c--)a=s[c];for(let c=0;c<n.length;c++){let u=n[c],l=s;if(r.matchBase&&u.length===1&&(l=[a]),this.matchOne(l,u,t))return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate}static defaults(e){return T.minimatch.defaults(e).Minimatch}};T.Minimatch=ds;var bq=Qm();Object.defineProperty(T,"AST",{enumerable:!0,get:o(function(){return bq.AST},"get")});var Iq=eg();Object.defineProperty(T,"escape",{enumerable:!0,get:o(function(){return Iq.escape},"get")});var Oq=ll();Object.defineProperty(T,"unescape",{enumerable:!0,get:o(function(){return Oq.unescape},"get")});T.minimatch.AST=YO.AST;T.minimatch.Minimatch=ds;T.minimatch.escape=H$.escape;T.minimatch.unescape=G$.unescape});var te=d(He=>{"use strict";var vq=He&&He.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(He,"__esModule",{value:!0});He.Minipass=He.isWritable=He.isReadable=He.isStream=void 0;var tv=typeof process=="object"&&process?process:{stdout:null,stderr:null},ag=require("node:events"),nv=vq(require("node:stream")),Cq=require("node:string_decoder"),Rq=o(i=>!!i&&typeof i=="object"&&(i instanceof bl||i instanceof nv.default||(0,He.isReadable)(i)||(0,He.isWritable)(i)),"isStream");He.isStream=Rq;var Aq=o(i=>!!i&&typeof i=="object"&&i instanceof ag.EventEmitter&&typeof i.pipe=="function"&&i.pipe!==nv.default.Writable.prototype.pipe,"isReadable");He.isReadable=Aq;var Tq=o(i=>!!i&&typeof i=="object"&&i instanceof ag.EventEmitter&&typeof i.write=="function"&&typeof i.end=="function","isWritable");He.isWritable=Tq;var ji=Symbol("EOF"),$i=Symbol("maybeEmitEnd"),Sr=Symbol("emittedEnd"),gl=Symbol("emittingEnd"),Oa=Symbol("emittedError"),yl=Symbol("closed"),iv=Symbol("read"),Sl=Symbol("flush"),rv=Symbol("flushChunk"),Wt=Symbol("encoding"),yn=Symbol("decoder"),ve=Symbol("flowing"),va=Symbol("paused"),Sn=Symbol("resume"),Ce=Symbol("buffer"),ze=Symbol("pipes"),Re=Symbol("bufferLength"),tg=Symbol("bufferPush"),El=Symbol("bufferShift"),Me=Symbol("objectMode"),pe=Symbol("destroyed"),ig=Symbol("error"),rg=Symbol("emitData"),sv=Symbol("emitEnd"),sg=Symbol("emitEnd2"),ai=Symbol("async"),ng=Symbol("abort"),wl=Symbol("aborted"),Ca=Symbol("signal"),ps=Symbol("dataListeners"),ht=Symbol("discarded"),Ra=o(i=>Promise.resolve().then(i),"defer"),Nq=o(i=>i(),"nodefer"),Pq=o(i=>i==="end"||i==="finish"||i==="prefinish","isEndish"),Dq=o(i=>i instanceof ArrayBuffer||!!i&&typeof i=="object"&&i.constructor&&i.constructor.name==="ArrayBuffer"&&i.byteLength>=0,"isArrayBufferLike"),xq=o(i=>!Buffer.isBuffer(i)&&ArrayBuffer.isView(i),"isArrayBufferView"),_l=class{static{o(this,"Pipe")}src;dest;opts;ondrain;constructor(e,t,r){this.src=e,this.dest=t,this.opts=r,this.ondrain=()=>e[Sn](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},og=class extends _l{static{o(this,"PipeProxyErrors")}unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,t,r){super(e,t,r),this.proxyErrors=s=>t.emit("error",s),e.on("error",this.proxyErrors)}},Lq=o(i=>!!i.objectMode,"isObjectModeOptions"),Mq=o(i=>!i.objectMode&&!!i.encoding&&i.encoding!=="buffer","isEncodingOptions"),bl=class extends ag.EventEmitter{static{o(this,"Minipass")}[ve]=!1;[va]=!1;[ze]=[];[Ce]=[];[Me];[Wt];[ai];[yn];[ji]=!1;[Sr]=!1;[gl]=!1;[yl]=!1;[Oa]=null;[Re]=0;[pe]=!1;[Ca];[wl]=!1;[ps]=0;[ht]=!1;writable=!0;readable=!0;constructor(...e){let t=e[0]||{};if(super(),t.objectMode&&typeof t.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");Lq(t)?(this[Me]=!0,this[Wt]=null):Mq(t)?(this[Wt]=t.encoding,this[Me]=!1):(this[Me]=!1,this[Wt]=null),this[ai]=!!t.async,this[yn]=this[Wt]?new Cq.StringDecoder(this[Wt]):null,t&&t.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:o(()=>this[Ce],"get")}),t&&t.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:o(()=>this[ze],"get")});let{signal:r}=t;r&&(this[Ca]=r,r.aborted?this[ng]():r.addEventListener("abort",()=>this[ng]()))}get bufferLength(){return this[Re]}get encoding(){return this[Wt]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[Me]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[ai]}set async(e){this[ai]=this[ai]||!!e}[ng](){this[wl]=!0,this.emit("abort",this[Ca]?.reason),this.destroy(this[Ca]?.reason)}get aborted(){return this[wl]}set aborted(e){}write(e,t,r){if(this[wl])return!1;if(this[ji])throw new Error("write after end");if(this[pe])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof t=="function"&&(r=t,t="utf8"),t||(t="utf8");let s=this[ai]?Ra:Nq;if(!this[Me]&&!Buffer.isBuffer(e)){if(xq(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(Dq(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[Me]?(this[ve]&&this[Re]!==0&&this[Sl](!0),this[ve]?this.emit("data",e):this[tg](e),this[Re]!==0&&this.emit("readable"),r&&s(r),this[ve]):e.length?(typeof e=="string"&&!(t===this[Wt]&&!this[yn]?.lastNeed)&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[Wt]&&(e=this[yn].write(e)),this[ve]&&this[Re]!==0&&this[Sl](!0),this[ve]?this.emit("data",e):this[tg](e),this[Re]!==0&&this.emit("readable"),r&&s(r),this[ve]):(this[Re]!==0&&this.emit("readable"),r&&s(r),this[ve])}read(e){if(this[pe])return null;if(this[ht]=!1,this[Re]===0||e===0||e&&e>this[Re])return this[$i](),null;this[Me]&&(e=null),this[Ce].length>1&&!this[Me]&&(this[Ce]=[this[Wt]?this[Ce].join(""):Buffer.concat(this[Ce],this[Re])]);let t=this[iv](e||null,this[Ce][0]);return this[$i](),t}[iv](e,t){if(this[Me])this[El]();else{let r=t;e===r.length||e===null?this[El]():typeof r=="string"?(this[Ce][0]=r.slice(e),t=r.slice(0,e),this[Re]-=e):(this[Ce][0]=r.subarray(e),t=r.subarray(0,e),this[Re]-=e)}return this.emit("data",t),!this[Ce].length&&!this[ji]&&this.emit("drain"),t}end(e,t,r){return typeof e=="function"&&(r=e,e=void 0),typeof t=="function"&&(r=t,t="utf8"),e!==void 0&&this.write(e,t),r&&this.once("end",r),this[ji]=!0,this.writable=!1,(this[ve]||!this[va])&&this[$i](),this}[Sn](){this[pe]||(!this[ps]&&!this[ze].length&&(this[ht]=!0),this[va]=!1,this[ve]=!0,this.emit("resume"),this[Ce].length?this[Sl]():this[ji]?this[$i]():this.emit("drain"))}resume(){return this[Sn]()}pause(){this[ve]=!1,this[va]=!0,this[ht]=!1}get destroyed(){return this[pe]}get flowing(){return this[ve]}get paused(){return this[va]}[tg](e){this[Me]?this[Re]+=1:this[Re]+=e.length,this[Ce].push(e)}[El](){return this[Me]?this[Re]-=1:this[Re]-=this[Ce][0].length,this[Ce].shift()}[Sl](e=!1){do;while(this[rv](this[El]())&&this[Ce].length);!e&&!this[Ce].length&&!this[ji]&&this.emit("drain")}[rv](e){return this.emit("data",e),this[ve]}pipe(e,t){if(this[pe])return e;this[ht]=!1;let r=this[Sr];return t=t||{},e===tv.stdout||e===tv.stderr?t.end=!1:t.end=t.end!==!1,t.proxyErrors=!!t.proxyErrors,r?t.end&&e.end():(this[ze].push(t.proxyErrors?new og(this,e,t):new _l(this,e,t)),this[ai]?Ra(()=>this[Sn]()):this[Sn]()),e}unpipe(e){let t=this[ze].find(r=>r.dest===e);t&&(this[ze].length===1?(this[ve]&&this[ps]===0&&(this[ve]=!1),this[ze]=[]):this[ze].splice(this[ze].indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){let r=super.on(e,t);if(e==="data")this[ht]=!1,this[ps]++,!this[ze].length&&!this[ve]&&this[Sn]();else if(e==="readable"&&this[Re]!==0)super.emit("readable");else if(Pq(e)&&this[Sr])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[Oa]){let s=t;this[ai]?Ra(()=>s.call(this,this[Oa])):s.call(this,this[Oa])}return r}removeListener(e,t){return this.off(e,t)}off(e,t){let r=super.off(e,t);return e==="data"&&(this[ps]=this.listeners("data").length,this[ps]===0&&!this[ht]&&!this[ze].length&&(this[ve]=!1)),r}removeAllListeners(e){let t=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[ps]=0,!this[ht]&&!this[ze].length&&(this[ve]=!1)),t}get emittedEnd(){return this[Sr]}[$i](){!this[gl]&&!this[Sr]&&!this[pe]&&this[Ce].length===0&&this[ji]&&(this[gl]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[yl]&&this.emit("close"),this[gl]=!1)}emit(e,...t){let r=t[0];if(e!=="error"&&e!=="close"&&e!==pe&&this[pe])return!1;if(e==="data")return!this[Me]&&!r?!1:this[ai]?(Ra(()=>this[rg](r)),!0):this[rg](r);if(e==="end")return this[sv]();if(e==="close"){if(this[yl]=!0,!this[Sr]&&!this[pe])return!1;let n=super.emit("close");return this.removeAllListeners("close"),n}else if(e==="error"){this[Oa]=r,super.emit(ig,r);let n=!this[Ca]||this.listeners("error").length?super.emit("error",r):!1;return this[$i](),n}else if(e==="resume"){let n=super.emit("resume");return this[$i](),n}else if(e==="finish"||e==="prefinish"){let n=super.emit(e);return this.removeAllListeners(e),n}let s=super.emit(e,...t);return this[$i](),s}[rg](e){for(let r of this[ze])r.dest.write(e)===!1&&this.pause();let t=this[ht]?!1:super.emit("data",e);return this[$i](),t}[sv](){return this[Sr]?!1:(this[Sr]=!0,this.readable=!1,this[ai]?(Ra(()=>this[sg]()),!0):this[sg]())}[sg](){if(this[yn]){let t=this[yn].end();if(t){for(let r of this[ze])r.dest.write(t);this[ht]||super.emit("data",t)}}for(let t of this[ze])t.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[Me]||(e.dataLength=0);let t=this.promise();return this.on("data",r=>{e.push(r),this[Me]||(e.dataLength+=r.length)}),await t,e}async concat(){if(this[Me])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[Wt]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,t)=>{this.on(pe,()=>t(new Error("stream destroyed"))),this.on("error",r=>t(r)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[ht]=!1;let e=!1,t=o(async()=>(this.pause(),e=!0,{value:void 0,done:!0}),"stop");return{next:o(()=>{if(e)return t();let s=this.read();if(s!==null)return Promise.resolve({done:!1,value:s});if(this[ji])return t();let n,a,c=o(f=>{this.off("data",u),this.off("end",l),this.off(pe,h),t(),a(f)},"onerr"),u=o(f=>{this.off("error",c),this.off("end",l),this.off(pe,h),this.pause(),n({value:f,done:!!this[ji]})},"ondata"),l=o(()=>{this.off("error",c),this.off("data",u),this.off(pe,h),t(),n({done:!0,value:void 0})},"onend"),h=o(()=>c(new Error("stream destroyed")),"ondestroy");return new Promise((f,p)=>{a=p,n=f,this.once(pe,h),this.once("error",c),this.once("end",l),this.once("data",u)})},"next"),throw:t,return:t,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[ht]=!1;let e=!1,t=o(()=>(this.pause(),this.off(ig,t),this.off(pe,t),this.off("end",t),e=!0,{done:!0,value:void 0}),"stop"),r=o(()=>{if(e)return t();let s=this.read();return s===null?t():{done:!1,value:s}},"next");return this.once("end",t),this.once(ig,t),this.once(pe,t),{next:r,throw:t,return:t,[Symbol.iterator](){return this}}}destroy(e){if(this[pe])return e?this.emit("error",e):this.emit(pe),this;this[pe]=!0,this[ht]=!0,this[Ce].length=0,this[Re]=0;let t=this;return typeof t.close=="function"&&!this[yl]&&t.close(),e?this.emit("error",e):this.emit(pe),this}static get isStream(){return He.isStream}};He.Minipass=bl});var wv=d(W=>{"use strict";var Bq=W&&W.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(i,r,s)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),kq=W&&W.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),Fq=W&&W.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&Bq(e,i,t);return kq(e,i),e};Object.defineProperty(W,"__esModule",{value:!0});W.PathScurry=W.Path=W.PathScurryDarwin=W.PathScurryPosix=W.PathScurryWin32=W.PathScurryBase=W.PathPosix=W.PathWin32=W.PathBase=W.ChildrenCache=W.ResolveCache=void 0;var hv=hs(),Rl=require("node:path"),Uq=require("node:url"),Ta=require("fs"),jq=Fq(require("node:fs")),$q=Ta.realpathSync.native,Il=require("node:fs/promises"),ov=te(),Na={lstatSync:Ta.lstatSync,readdir:Ta.readdir,readdirSync:Ta.readdirSync,readlinkSync:Ta.readlinkSync,realpathSync:$q,promises:{lstat:Il.lstat,readdir:Il.readdir,readlink:Il.readlink,realpath:Il.realpath}},fv=o(i=>!i||i===Na||i===jq?Na:{...Na,...i,promises:{...Na.promises,...i.promises||{}}},"fsFromOption"),dv=/^\\\\\?\\([a-z]:)\\?$/i,qq=o(i=>i.replace(/\//g,"\\").replace(dv,"$1\\"),"uncToDrive"),Vq=/[\\\/]/,Ot=0,pv=1,mv=2,ci=4,gv=6,yv=8,ms=10,Sv=12,It=15,Aa=~It,cg=16,av=32,Pa=64,Jt=128,Ol=256,Cl=512,cv=Pa|Jt|Cl,zq=1023,ug=o(i=>i.isFile()?yv:i.isDirectory()?ci:i.isSymbolicLink()?ms:i.isCharacterDevice()?mv:i.isBlockDevice()?gv:i.isSocket()?Sv:i.isFIFO()?pv:Ot,"entToType"),uv=new Map,Da=o(i=>{let e=uv.get(i);if(e)return e;let t=i.normalize("NFKD");return uv.set(i,t),t},"normalize"),lv=new Map,vl=o(i=>{let e=lv.get(i);if(e)return e;let t=Da(i.toLowerCase());return lv.set(i,t),t},"normalizeNocase"),xa=class extends hv.LRUCache{static{o(this,"ResolveCache")}constructor(){super({max:256})}};W.ResolveCache=xa;var Al=class extends hv.LRUCache{static{o(this,"ChildrenCache")}constructor(e=16*1024){super({maxSize:e,sizeCalculation:o(t=>t.length+1,"sizeCalculation")})}};W.ChildrenCache=Al;var Ev=Symbol("PathScurry setAsCwd"),De=class{static{o(this,"PathBase")}name;root;roots;parent;nocase;isCWD=!1;#e;#t;get dev(){return this.#t}#i;get mode(){return this.#i}#r;get nlink(){return this.#r}#s;get uid(){return this.#s}#u;get gid(){return this.#u}#c;get rdev(){return this.#c}#f;get blksize(){return this.#f}#n;get ino(){return this.#n}#h;get size(){return this.#h}#o;get blocks(){return this.#o}#d;get atimeMs(){return this.#d}#a;get mtimeMs(){return this.#a}#p;get ctimeMs(){return this.#p}#y;get birthtimeMs(){return this.#y}#_;get atime(){return this.#_}#m;get mtime(){return this.#m}#R;get ctime(){return this.#R}#w;get birthtime(){return this.#w}#b;#v;#I;#E;#N;#O;#l;#B;#C;#T;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,t=Ot,r,s,n,a,c){this.name=e,this.#b=n?vl(e):Da(e),this.#l=t&zq,this.nocase=n,this.roots=s,this.root=r||this,this.#B=a,this.#I=c.fullpath,this.#N=c.relative,this.#O=c.relativePosix,this.parent=c.parent,this.parent?this.#e=this.parent.#e:this.#e=fv(c.fs)}depth(){return this.#v!==void 0?this.#v:this.parent?this.#v=this.parent.depth()+1:this.#v=0}childrenCache(){return this.#B}resolve(e){if(!e)return this;let t=this.getRootString(e),s=e.substring(t.length).split(this.splitSep);return t?this.getRoot(t).#k(s):this.#k(s)}#k(e){let t=this;for(let r of e)t=t.child(r);return t}children(){let e=this.#B.get(this);if(e)return e;let t=Object.assign([],{provisional:0});return this.#B.set(this,t),this.#l&=~cg,t}child(e,t){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let r=this.children(),s=this.nocase?vl(e):Da(e);for(let u of r)if(u.#b===s)return u;let n=this.parent?this.sep:"",a=this.#I?this.#I+n+e:void 0,c=this.newChild(e,Ot,{...t,parent:this,fullpath:a});return this.canReaddir()||(c.#l|=Jt),r.push(c),c}relative(){if(this.isCWD)return"";if(this.#N!==void 0)return this.#N;let e=this.name,t=this.parent;if(!t)return this.#N=this.name;let r=t.relative();return r+(!r||!t.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#O!==void 0)return this.#O;let e=this.name,t=this.parent;if(!t)return this.#O=this.fullpathPosix();let r=t.relativePosix();return r+(!r||!t.parent?"":"/")+e}fullpath(){if(this.#I!==void 0)return this.#I;let e=this.name,t=this.parent;if(!t)return this.#I=this.name;let s=t.fullpath()+(t.parent?this.sep:"")+e;return this.#I=s}fullpathPosix(){if(this.#E!==void 0)return this.#E;if(this.sep==="/")return this.#E=this.fullpath();if(!this.parent){let s=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(s)?this.#E=`//?/${s}`:this.#E=s}let e=this.parent,t=e.fullpathPosix(),r=t+(!t||!e.parent?"":"/")+this.name;return this.#E=r}isUnknown(){return(this.#l&It)===Ot}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#l&It)===yv}isDirectory(){return(this.#l&It)===ci}isCharacterDevice(){return(this.#l&It)===mv}isBlockDevice(){return(this.#l&It)===gv}isFIFO(){return(this.#l&It)===pv}isSocket(){return(this.#l&It)===Sv}isSymbolicLink(){return(this.#l&ms)===ms}lstatCached(){return this.#l&av?this:void 0}readlinkCached(){return this.#C}realpathCached(){return this.#T}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#C)return!0;if(!this.parent)return!1;let e=this.#l&It;return!(e!==Ot&&e!==ms||this.#l&Ol||this.#l&Jt)}calledReaddir(){return!!(this.#l&cg)}isENOENT(){return!!(this.#l&Jt)}isNamed(e){return this.nocase?this.#b===vl(e):this.#b===Da(e)}async readlink(){let e=this.#C;if(e)return e;if(this.canReadlink()&&this.parent)try{let t=await this.#e.promises.readlink(this.fullpath()),r=(await this.parent.realpath())?.resolve(t);if(r)return this.#C=r}catch(t){this.#S(t.code);return}}readlinkSync(){let e=this.#C;if(e)return e;if(this.canReadlink()&&this.parent)try{let t=this.#e.readlinkSync(this.fullpath()),r=this.parent.realpathSync()?.resolve(t);if(r)return this.#C=r}catch(t){this.#S(t.code);return}}#A(e){this.#l|=cg;for(let t=e.provisional;t<e.length;t++){let r=e[t];r&&r.#$()}}#$(){this.#l&Jt||(this.#l=(this.#l|Jt)&Aa,this.#P())}#P(){let e=this.children();e.provisional=0;for(let t of e)t.#$()}#x(){this.#l|=Cl,this.#F()}#F(){if(this.#l&Pa)return;let e=this.#l;(e&It)===ci&&(e&=Aa),this.#l=e|Pa,this.#P()}#D(e=""){e==="ENOTDIR"||e==="EPERM"?this.#F():e==="ENOENT"?this.#$():this.children().provisional=0}#L(e=""){e==="ENOTDIR"?this.parent.#F():e==="ENOENT"&&this.#$()}#S(e=""){let t=this.#l;t|=Ol,e==="ENOENT"&&(t|=Jt),(e==="EINVAL"||e==="UNKNOWN")&&(t&=Aa),this.#l=t,e==="ENOTDIR"&&this.parent&&this.parent.#F()}#U(e,t){return this.#g(e,t)||this.#j(e,t)}#j(e,t){let r=ug(e),s=this.newChild(e.name,r,{parent:this}),n=s.#l&It;return n!==ci&&n!==ms&&n!==Ot&&(s.#l|=Pa),t.unshift(s),t.provisional++,s}#g(e,t){for(let r=t.provisional;r<t.length;r++){let s=t[r];if((this.nocase?vl(e.name):Da(e.name))===s.#b)return this.#q(e,s,r,t)}}#q(e,t,r,s){let n=t.name;return t.#l=t.#l&Aa|ug(e),n!==e.name&&(t.name=e.name),r!==s.provisional&&(r===s.length-1?s.pop():s.splice(r,1),s.unshift(t)),s.provisional++,t}async lstat(){if((this.#l&Jt)===0)try{return this.#V(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#L(e.code)}}lstatSync(){if((this.#l&Jt)===0)try{return this.#V(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#L(e.code)}}#V(e){let{atime:t,atimeMs:r,birthtime:s,birthtimeMs:n,blksize:a,blocks:c,ctime:u,ctimeMs:l,dev:h,gid:f,ino:p,mode:m,mtime:y,mtimeMs:g,nlink:S,rdev:E,size:_,uid:b}=e;this.#_=t,this.#d=r,this.#w=s,this.#y=n,this.#f=a,this.#o=c,this.#R=u,this.#p=l,this.#t=h,this.#u=f,this.#n=p,this.#i=m,this.#m=y,this.#a=g,this.#r=S,this.#c=E,this.#h=_,this.#s=b;let w=ug(e);this.#l=this.#l&Aa|w|av,w!==Ot&&w!==ci&&w!==ms&&(this.#l|=Pa)}#M=[];#z=!1;#G(e){this.#z=!1;let t=this.#M.slice();this.#M.length=0,t.forEach(r=>r(null,e))}readdirCB(e,t=!1){if(!this.canReaddir()){t?e(null,[]):queueMicrotask(()=>e(null,[]));return}let r=this.children();if(this.calledReaddir()){let n=r.slice(0,r.provisional);t?e(null,n):queueMicrotask(()=>e(null,n));return}if(this.#M.push(e),this.#z)return;this.#z=!0;let s=this.fullpath();this.#e.readdir(s,{withFileTypes:!0},(n,a)=>{if(n)this.#D(n.code),r.provisional=0;else{for(let c of a)this.#U(c,r);this.#A(r)}this.#G(r.slice(0,r.provisional))})}#H;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();if(this.#H)await this.#H;else{let r=o(()=>{},"resolve");this.#H=new Promise(s=>r=s);try{for(let s of await this.#e.promises.readdir(t,{withFileTypes:!0}))this.#U(s,e);this.#A(e)}catch(s){this.#D(s.code),e.provisional=0}this.#H=void 0,r()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();try{for(let r of this.#e.readdirSync(t,{withFileTypes:!0}))this.#U(r,e);this.#A(e)}catch(r){this.#D(r.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#l&cv)return!1;let e=It&this.#l;return e===Ot||e===ci||e===ms}shouldWalk(e,t){return(this.#l&ci)===ci&&!(this.#l&cv)&&!e.has(this)&&(!t||t(this))}async realpath(){if(this.#T)return this.#T;if(!((Cl|Ol|Jt)&this.#l))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#T=this.resolve(e)}catch{this.#x()}}realpathSync(){if(this.#T)return this.#T;if(!((Cl|Ol|Jt)&this.#l))try{let e=this.#e.realpathSync(this.fullpath());return this.#T=this.resolve(e)}catch{this.#x()}}[Ev](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let t=new Set([]),r=[],s=this;for(;s&&s.parent;)t.add(s),s.#N=r.join(this.sep),s.#O=r.join("/"),s=s.parent,r.push("..");for(s=e;s&&s.parent&&!t.has(s);)s.#N=void 0,s.#O=void 0,s=s.parent}};W.PathBase=De;var La=class i extends De{static{o(this,"PathWin32")}sep="\\";splitSep=Vq;constructor(e,t=Ot,r,s,n,a,c){super(e,t,r,s,n,a,c)}newChild(e,t=Ot,r={}){return new i(e,t,this.root,this.roots,this.nocase,this.childrenCache(),r)}getRootString(e){return Rl.win32.parse(e).root}getRoot(e){if(e=qq(e.toUpperCase()),e===this.root.name)return this.root;for(let[t,r]of Object.entries(this.roots))if(this.sameRoot(e,t))return this.roots[e]=r;return this.roots[e]=new ka(e,this).root}sameRoot(e,t=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(dv,"$1\\"),e===t}};W.PathWin32=La;var Ma=class i extends De{static{o(this,"PathPosix")}splitSep="/";sep="/";constructor(e,t=Ot,r,s,n,a,c){super(e,t,r,s,n,a,c)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,t=Ot,r={}){return new i(e,t,this.root,this.roots,this.nocase,this.childrenCache(),r)}};W.PathPosix=Ma;var Ba=class{static{o(this,"PathScurryBase")}root;rootPath;roots;cwd;#e;#t;#i;nocase;#r;constructor(e=process.cwd(),t,r,{nocase:s,childrenCacheSize:n=16*1024,fs:a=Na}={}){this.#r=fv(a),(e instanceof URL||e.startsWith("file://"))&&(e=(0,Uq.fileURLToPath)(e));let c=t.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(c),this.#e=new xa,this.#t=new xa,this.#i=new Al(n);let u=c.substring(this.rootPath.length).split(r);if(u.length===1&&!u[0]&&u.pop(),s===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=s,this.root=this.newRoot(this.#r),this.roots[this.rootPath]=this.root;let l=this.root,h=u.length-1,f=t.sep,p=this.rootPath,m=!1;for(let y of u){let g=h--;l=l.child(y,{relative:new Array(g).fill("..").join(f),relativePosix:new Array(g).fill("..").join("/"),fullpath:p+=(m?"":f)+y}),m=!0}this.cwd=l}depth(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#i}resolve(...e){let t="";for(let n=e.length-1;n>=0;n--){let a=e[n];if(!(!a||a===".")&&(t=t?`${a}/${t}`:a,this.isAbsolute(a)))break}let r=this.#e.get(t);if(r!==void 0)return r;let s=this.cwd.resolve(t).fullpath();return this.#e.set(t,s),s}resolvePosix(...e){let t="";for(let n=e.length-1;n>=0;n--){let a=e[n];if(!(!a||a===".")&&(t=t?`${a}/${t}`:a,this.isAbsolute(a)))break}let r=this.#t.get(t);if(r!==void 0)return r;let s=this.cwd.resolve(t).fullpathPosix();return this.#t.set(t,s),s}relative(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,t={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof De||(t=e,e=this.cwd);let{withFileTypes:r}=t;if(e.canReaddir()){let s=await e.readdir();return r?s:s.map(n=>n.name)}else return[]}readdirSync(e=this.cwd,t={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof De||(t=e,e=this.cwd);let{withFileTypes:r=!0}=t;return e.canReaddir()?r?e.readdirSync():e.readdirSync().map(s=>s.name):[]}async lstat(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof De||(t=e.withFileTypes,e=this.cwd);let r=await e.readlink();return t?r:r?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof De||(t=e.withFileTypes,e=this.cwd);let r=e.readlinkSync();return t?r:r?.fullpath()}async realpath(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof De||(t=e.withFileTypes,e=this.cwd);let r=await e.realpath();return t?r:r?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof De||(t=e.withFileTypes,e=this.cwd);let r=e.realpathSync();return t?r:r?.fullpath()}async walk(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof De||(t=e,e=this.cwd);let{withFileTypes:r=!0,follow:s=!1,filter:n,walkFilter:a}=t,c=[];(!n||n(e))&&c.push(r?e:e.fullpath());let u=new Set,l=o((f,p)=>{u.add(f),f.readdirCB((m,y)=>{if(m)return p(m);let g=y.length;if(!g)return p();let S=o(()=>{--g===0&&p()},"next");for(let E of y)(!n||n(E))&&c.push(r?E:E.fullpath()),s&&E.isSymbolicLink()?E.realpath().then(_=>_?.isUnknown()?_.lstat():_).then(_=>_?.shouldWalk(u,a)?l(_,S):S()):E.shouldWalk(u,a)?l(E,S):S()},!0)},"walk"),h=e;return new Promise((f,p)=>{l(h,m=>{if(m)return p(m);f(c)})})}walkSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof De||(t=e,e=this.cwd);let{withFileTypes:r=!0,follow:s=!1,filter:n,walkFilter:a}=t,c=[];(!n||n(e))&&c.push(r?e:e.fullpath());let u=new Set([e]);for(let l of u){let h=l.readdirSync();for(let f of h){(!n||n(f))&&c.push(r?f:f.fullpath());let p=f;if(f.isSymbolicLink()){if(!(s&&(p=f.realpathSync())))continue;p.isUnknown()&&p.lstatSync()}p.shouldWalk(u,a)&&u.add(p)}}return c}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,t={}){return typeof e=="string"?e=this.cwd.resolve(e):e instanceof De||(t=e,e=this.cwd),this.stream(e,t)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof De||(t=e,e=this.cwd);let{withFileTypes:r=!0,follow:s=!1,filter:n,walkFilter:a}=t;(!n||n(e))&&(yield r?e:e.fullpath());let c=new Set([e]);for(let u of c){let l=u.readdirSync();for(let h of l){(!n||n(h))&&(yield r?h:h.fullpath());let f=h;if(h.isSymbolicLink()){if(!(s&&(f=h.realpathSync())))continue;f.isUnknown()&&f.lstatSync()}f.shouldWalk(c,a)&&c.add(f)}}}stream(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof De||(t=e,e=this.cwd);let{withFileTypes:r=!0,follow:s=!1,filter:n,walkFilter:a}=t,c=new ov.Minipass({objectMode:!0});(!n||n(e))&&c.write(r?e:e.fullpath());let u=new Set,l=[e],h=0,f=o(()=>{let p=!1;for(;!p;){let m=l.shift();if(!m){h===0&&c.end();return}h++,u.add(m);let y=o((S,E,_=!1)=>{if(S)return c.emit("error",S);if(s&&!_){let b=[];for(let w of E)w.isSymbolicLink()&&b.push(w.realpath().then(I=>I?.isUnknown()?I.lstat():I));if(b.length){Promise.all(b).then(()=>y(null,E,!0));return}}for(let b of E)b&&(!n||n(b))&&(c.write(r?b:b.fullpath())||(p=!0));h--;for(let b of E){let w=b.realpathCached()||b;w.shouldWalk(u,a)&&l.push(w)}p&&!c.flowing?c.once("drain",f):g||f()},"onReaddir"),g=!0;m.readdirCB(y,!0),g=!1}},"process");return f(),c}streamSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof De||(t=e,e=this.cwd);let{withFileTypes:r=!0,follow:s=!1,filter:n,walkFilter:a}=t,c=new ov.Minipass({objectMode:!0}),u=new Set;(!n||n(e))&&c.write(r?e:e.fullpath());let l=[e],h=0,f=o(()=>{let p=!1;for(;!p;){let m=l.shift();if(!m){h===0&&c.end();return}h++,u.add(m);let y=m.readdirSync();for(let g of y)(!n||n(g))&&(c.write(r?g:g.fullpath())||(p=!0));h--;for(let g of y){let S=g;if(g.isSymbolicLink()){if(!(s&&(S=g.realpathSync())))continue;S.isUnknown()&&S.lstatSync()}S.shouldWalk(u,a)&&l.push(S)}}p&&!c.flowing&&c.once("drain",f)},"process");return f(),c}chdir(e=this.cwd){let t=this.cwd;this.cwd=typeof e=="string"?this.cwd.resolve(e):e,this.cwd[Ev](t)}};W.PathScurryBase=Ba;var ka=class extends Ba{static{o(this,"PathScurryWin32")}sep="\\";constructor(e=process.cwd(),t={}){let{nocase:r=!0}=t;super(e,Rl.win32,"\\",{...t,nocase:r}),this.nocase=r;for(let s=this.cwd;s;s=s.parent)s.nocase=this.nocase}parseRootPath(e){return Rl.win32.parse(e).root.toUpperCase()}newRoot(e){return new La(this.rootPath,ci,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}};W.PathScurryWin32=ka;var Fa=class extends Ba{static{o(this,"PathScurryPosix")}sep="/";constructor(e=process.cwd(),t={}){let{nocase:r=!1}=t;super(e,Rl.posix,"/",{...t,nocase:r}),this.nocase=r}parseRootPath(e){return"/"}newRoot(e){return new Ma(this.rootPath,ci,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}};W.PathScurryPosix=Fa;var Tl=class extends Fa{static{o(this,"PathScurryDarwin")}constructor(e=process.cwd(),t={}){let{nocase:r=!0}=t;super(e,{...t,nocase:r})}};W.PathScurryDarwin=Tl;W.Path=process.platform==="win32"?La:Ma;W.PathScurry=process.platform==="win32"?ka:process.platform==="darwin"?Tl:Fa});var hg=d(Nl=>{"use strict";Object.defineProperty(Nl,"__esModule",{value:!0});Nl.Pattern=void 0;var Hq=Ui(),Gq=o(i=>i.length>=1,"isPatternList"),Wq=o(i=>i.length>=1,"isGlobList"),lg=class i{static{o(this,"Pattern")}#e;#t;#i;length;#r;#s;#u;#c;#f;#n;#h=!0;constructor(e,t,r,s){if(!Gq(e))throw new TypeError("empty pattern list");if(!Wq(t))throw new TypeError("empty glob list");if(t.length!==e.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=e.length,r<0||r>=this.length)throw new TypeError("index out of range");if(this.#e=e,this.#t=t,this.#i=r,this.#r=s,this.#i===0){if(this.isUNC()){let[n,a,c,u,...l]=this.#e,[h,f,p,m,...y]=this.#t;l[0]===""&&(l.shift(),y.shift());let g=[n,a,c,u,""].join("/"),S=[h,f,p,m,""].join("/");this.#e=[g,...l],this.#t=[S,...y],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[n,...a]=this.#e,[c,...u]=this.#t;a[0]===""&&(a.shift(),u.shift());let l=n+"/",h=c+"/";this.#e=[l,...a],this.#t=[h,...u],this.length=this.#e.length}}}pattern(){return this.#e[this.#i]}isString(){return typeof this.#e[this.#i]=="string"}isGlobstar(){return this.#e[this.#i]===Hq.GLOBSTAR}isRegExp(){return this.#e[this.#i]instanceof RegExp}globString(){return this.#u=this.#u||(this.#i===0?this.isAbsolute()?this.#t[0]+this.#t.slice(1).join("/"):this.#t.join("/"):this.#t.slice(this.#i).join("/"))}hasMore(){return this.length>this.#i+1}rest(){return this.#s!==void 0?this.#s:this.hasMore()?(this.#s=new i(this.#e,this.#t,this.#i+1,this.#r),this.#s.#n=this.#n,this.#s.#f=this.#f,this.#s.#c=this.#c,this.#s):this.#s=null}isUNC(){let e=this.#e;return this.#f!==void 0?this.#f:this.#f=this.#r==="win32"&&this.#i===0&&e[0]===""&&e[1]===""&&typeof e[2]=="string"&&!!e[2]&&typeof e[3]=="string"&&!!e[3]}isDrive(){let e=this.#e;return this.#c!==void 0?this.#c:this.#c=this.#r==="win32"&&this.#i===0&&this.length>1&&typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0])}isAbsolute(){let e=this.#e;return this.#n!==void 0?this.#n:this.#n=e[0]===""&&e.length>1||this.isDrive()||this.isUNC()}root(){let e=this.#e[0];return typeof e=="string"&&this.isAbsolute()&&this.#i===0?e:""}checkFollowGlobstar(){return!(this.#i===0||!this.isGlobstar()||!this.#h)}markFollowGlobstar(){return this.#i===0||!this.isGlobstar()||!this.#h?!1:(this.#h=!1,!0)}};Nl.Pattern=lg});var dg=d(Pl=>{"use strict";Object.defineProperty(Pl,"__esModule",{value:!0});Pl.Ignore=void 0;var _v=Ui(),Jq=hg(),Kq=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",fg=class{static{o(this,"Ignore")}relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:t,nocase:r,noext:s,noglobstar:n,platform:a=Kq}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=a,this.mmopts={dot:!0,nobrace:t,nocase:r,noext:s,noglobstar:n,optimizationLevel:2,platform:a,nocomment:!0,nonegate:!0};for(let c of e)this.add(c)}add(e){let t=new _v.Minimatch(e,this.mmopts);for(let r=0;r<t.set.length;r++){let s=t.set[r],n=t.globParts[r];if(!s||!n)throw new Error("invalid pattern object");for(;s[0]==="."&&n[0]===".";)s.shift(),n.shift();let a=new Jq.Pattern(s,n,0,this.platform),c=new _v.Minimatch(a.globString(),this.mmopts),u=n[n.length-1]==="**",l=a.isAbsolute();l?this.absolute.push(c):this.relative.push(c),u&&(l?this.absoluteChildren.push(c):this.relativeChildren.push(c))}}ignored(e){let t=e.fullpath(),r=`${t}/`,s=e.relative()||".",n=`${s}/`;for(let a of this.relative)if(a.match(s)||a.match(n))return!0;for(let a of this.absolute)if(a.match(t)||a.match(r))return!0;return!1}childrenIgnored(e){let t=e.fullpath()+"/",r=(e.relative()||".")+"/";for(let s of this.relativeChildren)if(s.match(r))return!0;for(let s of this.absoluteChildren)if(s.match(t))return!0;return!1}};Pl.Ignore=fg});var Iv=d(ui=>{"use strict";Object.defineProperty(ui,"__esModule",{value:!0});ui.Processor=ui.SubWalks=ui.MatchRecord=ui.HasWalkedCache=void 0;var bv=Ui(),Dl=class i{static{o(this,"HasWalkedCache")}store;constructor(e=new Map){this.store=e}copy(){return new i(new Map(this.store))}hasWalked(e,t){return this.store.get(e.fullpath())?.has(t.globString())}storeWalked(e,t){let r=e.fullpath(),s=this.store.get(r);s?s.add(t.globString()):this.store.set(r,new Set([t.globString()]))}};ui.HasWalkedCache=Dl;var xl=class{static{o(this,"MatchRecord")}store=new Map;add(e,t,r){let s=(t?2:0)|(r?1:0),n=this.store.get(e);this.store.set(e,n===void 0?s:s&n)}entries(){return[...this.store.entries()].map(([e,t])=>[e,!!(t&2),!!(t&1)])}};ui.MatchRecord=xl;var Ll=class{static{o(this,"SubWalks")}store=new Map;add(e,t){if(!e.canReaddir())return;let r=this.store.get(e);r?r.find(s=>s.globString()===t.globString())||r.push(t):this.store.set(e,[t])}get(e){let t=this.store.get(e);if(!t)throw new Error("attempting to walk unknown path");return t}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}};ui.SubWalks=Ll;var pg=class i{static{o(this,"Processor")}hasWalkedCache;matches=new xl;subwalks=new Ll;patterns;follow;dot;opts;constructor(e,t){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=t?t.copy():new Dl}processPatterns(e,t){this.patterns=t;let r=t.map(s=>[e,s]);for(let[s,n]of r){this.hasWalkedCache.storeWalked(s,n);let a=n.root(),c=n.isAbsolute()&&this.opts.absolute!==!1;if(a){s=s.resolve(a==="/"&&this.opts.root!==void 0?this.opts.root:a);let f=n.rest();if(f)n=f;else{this.matches.add(s,!0,!1);continue}}if(s.isENOENT())continue;let u,l,h=!1;for(;typeof(u=n.pattern())=="string"&&(l=n.rest());)s=s.resolve(u),n=l,h=!0;if(u=n.pattern(),l=n.rest(),h){if(this.hasWalkedCache.hasWalked(s,n))continue;this.hasWalkedCache.storeWalked(s,n)}if(typeof u=="string"){let f=u===".."||u===""||u===".";this.matches.add(s.resolve(u),c,f);continue}else if(u===bv.GLOBSTAR){(!s.isSymbolicLink()||this.follow||n.checkFollowGlobstar())&&this.subwalks.add(s,n);let f=l?.pattern(),p=l?.rest();if(!l||(f===""||f===".")&&!p)this.matches.add(s,c,f===""||f===".");else if(f===".."){let m=s.parent||s;p?this.hasWalkedCache.hasWalked(m,p)||this.subwalks.add(m,p):this.matches.add(m,c,!0)}}else u instanceof RegExp&&this.subwalks.add(s,n)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new i(this.opts,this.hasWalkedCache)}filterEntries(e,t){let r=this.subwalks.get(e),s=this.child();for(let n of t)for(let a of r){let c=a.isAbsolute(),u=a.pattern(),l=a.rest();u===bv.GLOBSTAR?s.testGlobstar(n,a,l,c):u instanceof RegExp?s.testRegExp(n,u,l,c):s.testString(n,u,l,c)}return s}testGlobstar(e,t,r,s){if((this.dot||!e.name.startsWith("."))&&(t.hasMore()||this.matches.add(e,s,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,t):e.isSymbolicLink()&&(r&&t.checkFollowGlobstar()?this.subwalks.add(e,r):t.markFollowGlobstar()&&this.subwalks.add(e,t)))),r){let n=r.pattern();if(typeof n=="string"&&n!==".."&&n!==""&&n!==".")this.testString(e,n,r.rest(),s);else if(n===".."){let a=e.parent||e;this.subwalks.add(a,r)}else n instanceof RegExp&&this.testRegExp(e,n,r.rest(),s)}}testRegExp(e,t,r,s){t.test(e.name)&&(r?this.subwalks.add(e,r):this.matches.add(e,s,!1))}testString(e,t,r,s){e.isNamed(t)&&(r?this.subwalks.add(e,r):this.matches.add(e,s,!1))}};ui.Processor=pg});var Cv=d(Er=>{"use strict";Object.defineProperty(Er,"__esModule",{value:!0});Er.GlobStream=Er.GlobWalker=Er.GlobUtil=void 0;var Zq=te(),Ov=dg(),vv=Iv(),Yq=o((i,e)=>typeof i=="string"?new Ov.Ignore([i],e):Array.isArray(i)?new Ov.Ignore(i,e):i,"makeIgnore"),Ua=class{static{o(this,"GlobUtil")}path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#t;#i;signal;maxDepth;includeChildMatches;constructor(e,t,r){if(this.patterns=e,this.path=t,this.opts=r,this.#i=!r.posix&&r.platform==="win32"?"\\":"/",this.includeChildMatches=r.includeChildMatches!==!1,(r.ignore||!this.includeChildMatches)&&(this.#t=Yq(r.ignore??[],r),!this.includeChildMatches&&typeof this.#t.add!="function")){let s="cannot ignore child matches, ignore lacks add() method.";throw new Error(s)}this.maxDepth=r.maxDepth||1/0,r.signal&&(this.signal=r.signal,this.signal.addEventListener("abort",()=>{this.#e.length=0}))}#r(e){return this.seen.has(e)||!!this.#t?.ignored?.(e)}#s(e){return!!this.#t?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#e.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#e.push(e):e())}async matchCheck(e,t){if(t&&this.opts.nodir)return;let r;if(this.opts.realpath){if(r=e.realpathCached()||await e.realpath(),!r)return;e=r}let n=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&n?.isSymbolicLink()){let a=await n.realpath();a&&(a.isUnknown()||this.opts.stat)&&await a.lstat()}return this.matchCheckTest(n,t)}matchCheckTest(e,t){return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!t||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!e.realpathCached()?.isDirectory())&&!this.#r(e)?e:void 0}matchCheckSync(e,t){if(t&&this.opts.nodir)return;let r;if(this.opts.realpath){if(r=e.realpathCached()||e.realpathSync(),!r)return;e=r}let n=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&n?.isSymbolicLink()){let a=n.realpathSync();a&&(a?.isUnknown()||this.opts.stat)&&a.lstatSync()}return this.matchCheckTest(n,t)}matchFinish(e,t){if(this.#r(e))return;if(!this.includeChildMatches&&this.#t?.add){let n=`${e.relativePosix()}/**`;this.#t.add(n)}let r=this.opts.absolute===void 0?t:this.opts.absolute;this.seen.add(e);let s=this.opts.mark&&e.isDirectory()?this.#i:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(r){let n=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(n+s)}else{let n=this.opts.posix?e.relativePosix():e.relative(),a=this.opts.dotRelative&&!n.startsWith(".."+this.#i)?"."+this.#i:"";this.matchEmit(n?a+n+s:"."+s)}}async match(e,t,r){let s=await this.matchCheck(e,r);s&&this.matchFinish(s,t)}matchSync(e,t,r){let s=this.matchCheckSync(e,r);s&&this.matchFinish(s,t)}walkCB(e,t,r){this.signal?.aborted&&r(),this.walkCB2(e,t,new vv.Processor(this.opts),r)}walkCB2(e,t,r,s){if(this.#s(e))return s();if(this.signal?.aborted&&s(),this.paused){this.onResume(()=>this.walkCB2(e,t,r,s));return}r.processPatterns(e,t);let n=1,a=o(()=>{--n===0&&s()},"next");for(let[c,u,l]of r.matches.entries())this.#r(c)||(n++,this.match(c,u,l).then(()=>a()));for(let c of r.subwalkTargets()){if(this.maxDepth!==1/0&&c.depth()>=this.maxDepth)continue;n++;let u=c.readdirCached();c.calledReaddir()?this.walkCB3(c,u,r,a):c.readdirCB((l,h)=>this.walkCB3(c,h,r,a),!0)}a()}walkCB3(e,t,r,s){r=r.filterEntries(e,t);let n=1,a=o(()=>{--n===0&&s()},"next");for(let[c,u,l]of r.matches.entries())this.#r(c)||(n++,this.match(c,u,l).then(()=>a()));for(let[c,u]of r.subwalks.entries())n++,this.walkCB2(c,u,r.child(),a);a()}walkCBSync(e,t,r){this.signal?.aborted&&r(),this.walkCB2Sync(e,t,new vv.Processor(this.opts),r)}walkCB2Sync(e,t,r,s){if(this.#s(e))return s();if(this.signal?.aborted&&s(),this.paused){this.onResume(()=>this.walkCB2Sync(e,t,r,s));return}r.processPatterns(e,t);let n=1,a=o(()=>{--n===0&&s()},"next");for(let[c,u,l]of r.matches.entries())this.#r(c)||this.matchSync(c,u,l);for(let c of r.subwalkTargets()){if(this.maxDepth!==1/0&&c.depth()>=this.maxDepth)continue;n++;let u=c.readdirSync();this.walkCB3Sync(c,u,r,a)}a()}walkCB3Sync(e,t,r,s){r=r.filterEntries(e,t);let n=1,a=o(()=>{--n===0&&s()},"next");for(let[c,u,l]of r.matches.entries())this.#r(c)||this.matchSync(c,u,l);for(let[c,u]of r.subwalks.entries())n++,this.walkCB2Sync(c,u,r.child(),a);a()}};Er.GlobUtil=Ua;var mg=class extends Ua{static{o(this,"GlobWalker")}matches=new Set;constructor(e,t,r){super(e,t,r)}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((e,t)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?t(this.signal.reason):e(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}};Er.GlobWalker=mg;var gg=class extends Ua{static{o(this,"GlobStream")}results;constructor(e,t,r){super(e,t,r),this.results=new Zq.Minipass({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}};Er.GlobStream=gg});var Sg=d(kl=>{"use strict";Object.defineProperty(kl,"__esModule",{value:!0});kl.Glob=void 0;var Xq=Ui(),Qq=require("node:url"),Ml=wv(),eV=hg(),Bl=Cv(),tV=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",yg=class{static{o(this,"Glob")}absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(e,t){if(!t)throw new TypeError("glob options required");if(this.withFileTypes=!!t.withFileTypes,this.signal=t.signal,this.follow=!!t.follow,this.dot=!!t.dot,this.dotRelative=!!t.dotRelative,this.nodir=!!t.nodir,this.mark=!!t.mark,t.cwd?(t.cwd instanceof URL||t.cwd.startsWith("file://"))&&(t.cwd=(0,Qq.fileURLToPath)(t.cwd)):this.cwd="",this.cwd=t.cwd||"",this.root=t.root,this.magicalBraces=!!t.magicalBraces,this.nobrace=!!t.nobrace,this.noext=!!t.noext,this.realpath=!!t.realpath,this.absolute=t.absolute,this.includeChildMatches=t.includeChildMatches!==!1,this.noglobstar=!!t.noglobstar,this.matchBase=!!t.matchBase,this.maxDepth=typeof t.maxDepth=="number"?t.maxDepth:1/0,this.stat=!!t.stat,this.ignore=t.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof e=="string"&&(e=[e]),this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(u=>u.replace(/\\/g,"/"))),this.matchBase){if(t.noglobstar)throw new TypeError("base matching requires globstar");e=e.map(u=>u.includes("/")?u:`./**/${u}`)}if(this.pattern=e,this.platform=t.platform||tV,this.opts={...t,platform:this.platform},t.scurry){if(this.scurry=t.scurry,t.nocase!==void 0&&t.nocase!==t.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let u=t.platform==="win32"?Ml.PathScurryWin32:t.platform==="darwin"?Ml.PathScurryDarwin:t.platform?Ml.PathScurryPosix:Ml.PathScurry;this.scurry=new u(this.cwd,{nocase:t.nocase,fs:t.fs})}this.nocase=this.scurry.nocase;let r=this.platform==="darwin"||this.platform==="win32",s={...t,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:r,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},n=this.pattern.map(u=>new Xq.Minimatch(u,s)),[a,c]=n.reduce((u,l)=>(u[0].push(...l.set),u[1].push(...l.globParts),u),[[],[]]);this.patterns=a.map((u,l)=>{let h=c[l];if(!h)throw new Error("invalid pattern object");return new eV.Pattern(u,h,0,this.platform)})}async walk(){return[...await new Bl.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new Bl.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new Bl.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new Bl.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};kl.Glob=yg});var Eg=d(Fl=>{"use strict";Object.defineProperty(Fl,"__esModule",{value:!0});Fl.hasMagic=void 0;var iV=Ui(),rV=o((i,e={})=>{Array.isArray(i)||(i=[i]);for(let t of i)if(new iV.Minimatch(t,e).hasMagic())return!0;return!1},"hasMagic");Fl.hasMagic=rV});var Ig=d(q=>{"use strict";Object.defineProperty(q,"__esModule",{value:!0});q.glob=q.sync=q.iterate=q.iterateSync=q.stream=q.streamSync=q.Ignore=q.hasMagic=q.Glob=q.unescape=q.escape=void 0;q.globStreamSync=ja;q.globStream=wg;q.globSync=_g;q.globIterateSync=$a;q.globIterate=bg;var Rv=Ui(),gs=Sg(),sV=Eg(),Tv=Ui();Object.defineProperty(q,"escape",{enumerable:!0,get:o(function(){return Tv.escape},"get")});Object.defineProperty(q,"unescape",{enumerable:!0,get:o(function(){return Tv.unescape},"get")});var nV=Sg();Object.defineProperty(q,"Glob",{enumerable:!0,get:o(function(){return nV.Glob},"get")});var oV=Eg();Object.defineProperty(q,"hasMagic",{enumerable:!0,get:o(function(){return oV.hasMagic},"get")});var aV=dg();Object.defineProperty(q,"Ignore",{enumerable:!0,get:o(function(){return aV.Ignore},"get")});function ja(i,e={}){return new gs.Glob(i,e).streamSync()}o(ja,"globStreamSync");function wg(i,e={}){return new gs.Glob(i,e).stream()}o(wg,"globStream");function _g(i,e={}){return new gs.Glob(i,e).walkSync()}o(_g,"globSync");async function Av(i,e={}){return new gs.Glob(i,e).walk()}o(Av,"glob_");function $a(i,e={}){return new gs.Glob(i,e).iterateSync()}o($a,"globIterateSync");function bg(i,e={}){return new gs.Glob(i,e).iterate()}o(bg,"globIterate");q.streamSync=ja;q.stream=Object.assign(wg,{sync:ja});q.iterateSync=$a;q.iterate=Object.assign(bg,{sync:$a});q.sync=Object.assign(_g,{stream:ja,iterate:$a});q.glob=Object.assign(Av,{glob:Av,globSync:_g,sync:q.sync,globStream:wg,stream:q.stream,globStreamSync:ja,streamSync:q.streamSync,globIterate:bg,iterate:q.iterate,globIterateSync:$a,iterateSync:q.iterateSync,Glob:gs.Glob,hasMagic:sV.hasMagic,escape:Rv.escape,unescape:Rv.unescape});q.glob.glob=q.glob});var Og=d((Khe,cV)=>{cV.exports=["0BSD","3D-Slicer-1.0","AAL","ADSL","AFL-1.1","AFL-1.2","AFL-2.0","AFL-2.1","AFL-3.0","AGPL-1.0-only","AGPL-1.0-or-later","AGPL-3.0-only","AGPL-3.0-or-later","AMD-newlib","AMDPLPA","AML","AML-glslang","AMPAS","ANTLR-PD","ANTLR-PD-fallback","APAFML","APL-1.0","APSL-1.0","APSL-1.1","APSL-1.2","APSL-2.0","ASWF-Digital-Assets-1.0","ASWF-Digital-Assets-1.1","Abstyles","AdaCore-doc","Adobe-2006","Adobe-Display-PostScript","Adobe-Glyph","Adobe-Utopia","Afmparse","Aladdin","Apache-1.0","Apache-1.1","Apache-2.0","App-s2p","Arphic-1999","Artistic-1.0","Artistic-1.0-Perl","Artistic-1.0-cl8","Artistic-2.0","Artistic-dist","Aspell-RU","BSD-1-Clause","BSD-2-Clause","BSD-2-Clause-Darwin","BSD-2-Clause-Patent","BSD-2-Clause-Views","BSD-2-Clause-first-lines","BSD-2-Clause-pkgconf-disclaimer","BSD-3-Clause","BSD-3-Clause-Attribution","BSD-3-Clause-Clear","BSD-3-Clause-HP","BSD-3-Clause-LBNL","BSD-3-Clause-Modification","BSD-3-Clause-No-Military-License","BSD-3-Clause-No-Nuclear-License","BSD-3-Clause-No-Nuclear-License-2014","BSD-3-Clause-No-Nuclear-Warranty","BSD-3-Clause-Open-MPI","BSD-3-Clause-Sun","BSD-3-Clause-acpica","BSD-3-Clause-flex","BSD-4-Clause","BSD-4-Clause-Shortened","BSD-4-Clause-UC","BSD-4.3RENO","BSD-4.3TAHOE","BSD-Advertising-Acknowledgement","BSD-Attribution-HPND-disclaimer","BSD-Inferno-Nettverk","BSD-Protection","BSD-Source-Code","BSD-Source-beginning-file","BSD-Systemics","BSD-Systemics-W3Works","BSL-1.0","BUSL-1.1","Baekmuk","Bahyph","Barr","Beerware","BitTorrent-1.0","BitTorrent-1.1","Bitstream-Charter","Bitstream-Vera","BlueOak-1.0.0","Boehm-GC","Boehm-GC-without-fee","Borceux","Brian-Gladman-2-Clause","Brian-Gladman-3-Clause","C-UDA-1.0","CAL-1.0","CAL-1.0-Combined-Work-Exception","CATOSL-1.1","CC-BY-1.0","CC-BY-2.0","CC-BY-2.5","CC-BY-2.5-AU","CC-BY-3.0","CC-BY-3.0-AT","CC-BY-3.0-AU","CC-BY-3.0-DE","CC-BY-3.0-IGO","CC-BY-3.0-NL","CC-BY-3.0-US","CC-BY-4.0","CC-BY-NC-1.0","CC-BY-NC-2.0","CC-BY-NC-2.5","CC-BY-NC-3.0","CC-BY-NC-3.0-DE","CC-BY-NC-4.0","CC-BY-NC-ND-1.0","CC-BY-NC-ND-2.0","CC-BY-NC-ND-2.5","CC-BY-NC-ND-3.0","CC-BY-NC-ND-3.0-DE","CC-BY-NC-ND-3.0-IGO","CC-BY-NC-ND-4.0","CC-BY-NC-SA-1.0","CC-BY-NC-SA-2.0","CC-BY-NC-SA-2.0-DE","CC-BY-NC-SA-2.0-FR","CC-BY-NC-SA-2.0-UK","CC-BY-NC-SA-2.5","CC-BY-NC-SA-3.0","CC-BY-NC-SA-3.0-DE","CC-BY-NC-SA-3.0-IGO","CC-BY-NC-SA-4.0","CC-BY-ND-1.0","CC-BY-ND-2.0","CC-BY-ND-2.5","CC-BY-ND-3.0","CC-BY-ND-3.0-DE","CC-BY-ND-4.0","CC-BY-SA-1.0","CC-BY-SA-2.0","CC-BY-SA-2.0-UK","CC-BY-SA-2.1-JP","CC-BY-SA-2.5","CC-BY-SA-3.0","CC-BY-SA-3.0-AT","CC-BY-SA-3.0-DE","CC-BY-SA-3.0-IGO","CC-BY-SA-4.0","CC-PDDC","CC-PDM-1.0","CC-SA-1.0","CC0-1.0","CDDL-1.0","CDDL-1.1","CDL-1.0","CDLA-Permissive-1.0","CDLA-Permissive-2.0","CDLA-Sharing-1.0","CECILL-1.0","CECILL-1.1","CECILL-2.0","CECILL-2.1","CECILL-B","CECILL-C","CERN-OHL-1.1","CERN-OHL-1.2","CERN-OHL-P-2.0","CERN-OHL-S-2.0","CERN-OHL-W-2.0","CFITSIO","CMU-Mach","CMU-Mach-nodoc","CNRI-Jython","CNRI-Python","CNRI-Python-GPL-Compatible","COIL-1.0","CPAL-1.0","CPL-1.0","CPOL-1.02","CUA-OPL-1.0","Caldera","Caldera-no-preamble","Catharon","ClArtistic","Clips","Community-Spec-1.0","Condor-1.1","Cornell-Lossless-JPEG","Cronyx","Crossword","CryptoSwift","CrystalStacker","Cube","D-FSL-1.0","DEC-3-Clause","DL-DE-BY-2.0","DL-DE-ZERO-2.0","DOC","DRL-1.0","DRL-1.1","DSDP","DocBook-DTD","DocBook-Schema","DocBook-Stylesheet","DocBook-XML","Dotseqn","ECL-1.0","ECL-2.0","EFL-1.0","EFL-2.0","EPICS","EPL-1.0","EPL-2.0","EUDatagrid","EUPL-1.0","EUPL-1.1","EUPL-1.2","Elastic-2.0","Entessa","ErlPL-1.1","Eurosym","FBM","FDK-AAC","FSFAP","FSFAP-no-warranty-disclaimer","FSFUL","FSFULLR","FSFULLRSD","FSFULLRWD","FSL-1.1-ALv2","FSL-1.1-MIT","FTL","Fair","Ferguson-Twofish","Frameworx-1.0","FreeBSD-DOC","FreeImage","Furuseth","GCR-docs","GD","GFDL-1.1-invariants-only","GFDL-1.1-invariants-or-later","GFDL-1.1-no-invariants-only","GFDL-1.1-no-invariants-or-later","GFDL-1.1-only","GFDL-1.1-or-later","GFDL-1.2-invariants-only","GFDL-1.2-invariants-or-later","GFDL-1.2-no-invariants-only","GFDL-1.2-no-invariants-or-later","GFDL-1.2-only","GFDL-1.2-or-later","GFDL-1.3-invariants-only","GFDL-1.3-invariants-or-later","GFDL-1.3-no-invariants-only","GFDL-1.3-no-invariants-or-later","GFDL-1.3-only","GFDL-1.3-or-later","GL2PS","GLWTPL","GPL-1.0-only","GPL-1.0-or-later","GPL-2.0-only","GPL-2.0-or-later","GPL-3.0-only","GPL-3.0-or-later","Game-Programming-Gems","Giftware","Glide","Glulxe","Graphics-Gems","Gutmann","HDF5","HIDAPI","HP-1986","HP-1989","HPND","HPND-DEC","HPND-Fenneberg-Livingston","HPND-INRIA-IMAG","HPND-Intel","HPND-Kevlin-Henney","HPND-MIT-disclaimer","HPND-Markus-Kuhn","HPND-Netrek","HPND-Pbmplus","HPND-UC","HPND-UC-export-US","HPND-doc","HPND-doc-sell","HPND-export-US","HPND-export-US-acknowledgement","HPND-export-US-modify","HPND-export2-US","HPND-merchantability-variant","HPND-sell-MIT-disclaimer-xserver","HPND-sell-regexpr","HPND-sell-variant","HPND-sell-variant-MIT-disclaimer","HPND-sell-variant-MIT-disclaimer-rev","HTMLTIDY","HaskellReport","Hippocratic-2.1","IBM-pibs","ICU","IEC-Code-Components-EULA","IJG","IJG-short","IPA","IPL-1.0","ISC","ISC-Veillard","ImageMagick","Imlib2","Info-ZIP","Inner-Net-2.0","InnoSetup","Intel","Intel-ACPI","Interbase-1.0","JPL-image","JPNIC","JSON","Jam","JasPer-2.0","Kastrup","Kazlib","Knuth-CTAN","LAL-1.2","LAL-1.3","LGPL-2.0-only","LGPL-2.0-or-later","LGPL-2.1-only","LGPL-2.1-or-later","LGPL-3.0-only","LGPL-3.0-or-later","LGPLLR","LOOP","LPD-document","LPL-1.0","LPL-1.02","LPPL-1.0","LPPL-1.1","LPPL-1.2","LPPL-1.3a","LPPL-1.3c","LZMA-SDK-9.11-to-9.20","LZMA-SDK-9.22","Latex2e","Latex2e-translated-notice","Leptonica","LiLiQ-P-1.1","LiLiQ-R-1.1","LiLiQ-Rplus-1.1","Libpng","Linux-OpenIB","Linux-man-pages-1-para","Linux-man-pages-copyleft","Linux-man-pages-copyleft-2-para","Linux-man-pages-copyleft-var","Lucida-Bitmap-Fonts","MIPS","MIT","MIT-0","MIT-CMU","MIT-Click","MIT-Festival","MIT-Khronos-old","MIT-Modern-Variant","MIT-Wu","MIT-advertising","MIT-enna","MIT-feh","MIT-open-group","MIT-testregex","MITNFA","MMIXware","MPEG-SSG","MPL-1.0","MPL-1.1","MPL-2.0","MPL-2.0-no-copyleft-exception","MS-LPL","MS-PL","MS-RL","MTLL","Mackerras-3-Clause","Mackerras-3-Clause-acknowledgment","MakeIndex","Martin-Birgmeier","McPhee-slideshow","Minpack","MirOS","Motosoto","MulanPSL-1.0","MulanPSL-2.0","Multics","Mup","NAIST-2003","NASA-1.3","NBPL-1.0","NCBI-PD","NCGL-UK-2.0","NCL","NCSA","NGPL","NICTA-1.0","NIST-PD","NIST-PD-fallback","NIST-Software","NLOD-1.0","NLOD-2.0","NLPL","NOSL","NPL-1.0","NPL-1.1","NPOSL-3.0","NRL","NTIA-PD","NTP","NTP-0","Naumen","NetCDF","Newsletr","Nokia","Noweb","O-UDA-1.0","OAR","OCCT-PL","OCLC-2.0","ODC-By-1.0","ODbL-1.0","OFFIS","OFL-1.0","OFL-1.0-RFN","OFL-1.0-no-RFN","OFL-1.1","OFL-1.1-RFN","OFL-1.1-no-RFN","OGC-1.0","OGDL-Taiwan-1.0","OGL-Canada-2.0","OGL-UK-1.0","OGL-UK-2.0","OGL-UK-3.0","OGTSL","OLDAP-1.1","OLDAP-1.2","OLDAP-1.3","OLDAP-1.4","OLDAP-2.0","OLDAP-2.0.1","OLDAP-2.1","OLDAP-2.2","OLDAP-2.2.1","OLDAP-2.2.2","OLDAP-2.3","OLDAP-2.4","OLDAP-2.5","OLDAP-2.6","OLDAP-2.7","OLDAP-2.8","OLFL-1.3","OML","OPL-1.0","OPL-UK-3.0","OPUBL-1.0","OSET-PL-2.1","OSL-1.0","OSL-1.1","OSL-2.0","OSL-2.1","OSL-3.0","OpenPBS-2.3","OpenSSL","OpenSSL-standalone","OpenVision","PADL","PDDL-1.0","PHP-3.0","PHP-3.01","PPL","PSF-2.0","Parity-6.0.0","Parity-7.0.0","Pixar","Plexus","PolyForm-Noncommercial-1.0.0","PolyForm-Small-Business-1.0.0","PostgreSQL","Python-2.0","Python-2.0.1","QPL-1.0","QPL-1.0-INRIA-2004","Qhull","RHeCos-1.1","RPL-1.1","RPL-1.5","RPSL-1.0","RSA-MD","RSCPL","Rdisc","Ruby","Ruby-pty","SAX-PD","SAX-PD-2.0","SCEA","SGI-B-1.0","SGI-B-1.1","SGI-B-2.0","SGI-OpenGL","SGP4","SHL-0.5","SHL-0.51","SISSL","SISSL-1.2","SL","SMAIL-GPL","SMLNJ","SMPPL","SNIA","SOFA","SPL-1.0","SSH-OpenSSH","SSH-short","SSLeay-standalone","SSPL-1.0","SUL-1.0","SWL","Saxpath","SchemeReport","Sendmail","Sendmail-8.23","Sendmail-Open-Source-1.1","SimPL-2.0","Sleepycat","Soundex","Spencer-86","Spencer-94","Spencer-99","SugarCRM-1.1.3","Sun-PPP","Sun-PPP-2000","SunPro","Symlinks","TAPR-OHL-1.0","TCL","TCP-wrappers","TGPPL-1.0","TMate","TORQUE-1.1","TOSL","TPDL","TPL-1.0","TTWL","TTYP0","TU-Berlin-1.0","TU-Berlin-2.0","TermReadKey","ThirdEye","TrustedQSL","UCAR","UCL-1.0","UMich-Merit","UPL-1.0","URT-RLE","Ubuntu-font-1.0","Unicode-3.0","Unicode-DFS-2015","Unicode-DFS-2016","Unicode-TOU","UnixCrypt","Unlicense","Unlicense-libtelnet","Unlicense-libwhirlpool","VOSTROM","VSL-1.0","Vim","W3C","W3C-19980720","W3C-20150513","WTFPL","Watcom-1.0","Widget-Workshop","Wsuipa","X11","X11-distribute-modifications-variant","X11-swapped","XFree86-1.1","XSkat","Xdebug-1.03","Xerox","Xfig","Xnet","YPL-1.0","YPL-1.1","ZPL-1.1","ZPL-2.0","ZPL-2.1","Zed","Zeeff","Zend-2.0","Zimbra-1.3","Zimbra-1.4","Zlib","any-OSI","any-OSI-perl-modules","bcrypt-Solar-Designer","blessing","bzip2-1.0.6","check-cvs","checkmk","copyleft-next-0.3.0","copyleft-next-0.3.1","curl","cve-tou","diffmark","dtoa","dvipdfm","eGenix","etalab-2.0","fwlw","gSOAP-1.3b","generic-xts","gnuplot","gtkbook","hdparm","iMatix","jove","libpng-1.6.35","libpng-2.0","libselinux-1.0","libtiff","libutil-David-Nugent","lsof","magaz","mailprio","man2html","metamail","mpi-permissive","mpich2","mplus","ngrep","pkgconf","pnmstitch","psfrag","psutils","python-ldap","radvd","snprintf","softSurfer","ssh-keyscan","swrule","threeparttable","ulem","w3m","wwl","xinetd","xkeyboard-config-Zinoviev","xlock","xpp","xzoom","zlib-acknowledgement"]});var Nv=d((Zhe,uV)=>{uV.exports=["AGPL-1.0","AGPL-3.0","BSD-2-Clause-FreeBSD","BSD-2-Clause-NetBSD","GFDL-1.1","GFDL-1.2","GFDL-1.3","GPL-1.0","GPL-2.0","GPL-2.0-with-GCC-exception","GPL-2.0-with-autoconf-exception","GPL-2.0-with-bison-exception","GPL-2.0-with-classpath-exception","GPL-2.0-with-font-exception","GPL-3.0","GPL-3.0-with-GCC-exception","GPL-3.0-with-autoconf-exception","LGPL-2.0","LGPL-2.1","LGPL-3.0","Net-SNMP","Nunit","StandardML-NJ","bzip2-1.0.5","eCos-2.0","wxWindows"]});var Pv=d((Yhe,lV)=>{lV.exports=["389-exception","Asterisk-exception","Autoconf-exception-2.0","Autoconf-exception-3.0","Autoconf-exception-generic","Autoconf-exception-generic-3.0","Autoconf-exception-macro","Bison-exception-1.24","Bison-exception-2.2","Bootloader-exception","Classpath-exception-2.0","CLISP-exception-2.0","cryptsetup-OpenSSL-exception","DigiRule-FOSS-exception","eCos-exception-2.0","Fawkes-Runtime-exception","FLTK-exception","fmt-exception","Font-exception-2.0","freertos-exception-2.0","GCC-exception-2.0","GCC-exception-2.0-note","GCC-exception-3.1","Gmsh-exception","GNAT-exception","GNOME-examples-exception","GNU-compiler-exception","gnu-javamail-exception","GPL-3.0-interface-exception","GPL-3.0-linking-exception","GPL-3.0-linking-source-exception","GPL-CC-1.0","GStreamer-exception-2005","GStreamer-exception-2008","i2p-gpl-java-exception","KiCad-libraries-exception","LGPL-3.0-linking-exception","libpri-OpenH323-exception","Libtool-exception","Linux-syscall-note","LLGPL","LLVM-exception","LZMA-exception","mif-exception","OCaml-LGPL-linking-exception","OCCT-exception-1.0","OpenJDK-assembly-exception-1.0","openvpn-openssl-exception","PS-or-PDF-font-exception-20170817","QPL-1.0-INRIA-2004-exception","Qt-GPL-exception-1.0","Qt-LGPL-exception-1.1","Qwt-exception-1.0","SANE-exception","SHL-2.0","SHL-2.1","stunnel-exception","SWI-exception","Swift-exception","Texinfo-exception","u-boot-exception-2.0","UBDL-exception","Universal-FOSS-exception-1.0","vsftpd-openssl-exception","WxWindows-exception-3.1","x11vnc-openssl-exception"]});var xv=d((Xhe,Dv)=>{"use strict";var hV=[].concat(Og()).concat(Nv()),fV=Pv();Dv.exports=function(i){var e=0;function t(){return e<i.length}o(t,"hasMore");function r(y){if(y instanceof RegExp){var g=i.slice(e),S=g.match(y);if(S)return e+=S[0].length,S[0]}else if(i.indexOf(y,e)===e)return e+=y.length,y}o(r,"read");function s(){r(/[ ]*/)}o(s,"skipWhitespace");function n(){for(var y,g=["WITH","AND","OR","(",")",":","+"],S=0;S<g.length&&(y=r(g[S]),!y);S++);if(y==="+"&&e>1&&i[e-2]===" ")throw new Error("Space before `+`");return y&&{type:"OPERATOR",string:y}}o(n,"operator");function a(){return r(/[A-Za-z0-9-.]+/)}o(a,"idstring");function c(){var y=a();if(!y)throw new Error("Expected idstring at offset "+e);return y}o(c,"expectIdstring");function u(){if(r("DocumentRef-")){var y=c();return{type:"DOCUMENTREF",string:y}}}o(u,"documentRef");function l(){if(r("LicenseRef-")){var y=c();return{type:"LICENSEREF",string:y}}}o(l,"licenseRef");function h(){var y=e,g=a();if(hV.indexOf(g)!==-1)return{type:"LICENSE",string:g};if(fV.indexOf(g)!==-1)return{type:"EXCEPTION",string:g};e=y}o(h,"identifier");function f(){return n()||u()||l()||h()}o(f,"parseToken");for(var p=[];t()&&(s(),!!t());){var m=f();if(!m)throw new Error("Unexpected `"+i[e]+"` at offset "+e);p.push(m)}return p}});var Mv=d((efe,Lv)=>{"use strict";Lv.exports=function(i){var e=0;function t(){return e<i.length}o(t,"hasMore");function r(){return t()?i[e]:null}o(r,"token");function s(){if(!t())throw new Error;e++}o(s,"next");function n(g){var S=r();if(S&&S.type==="OPERATOR"&&g===S.string)return s(),S.string}o(n,"parseOperator");function a(){if(n("WITH")){var g=r();if(g&&g.type==="EXCEPTION")return s(),g.string;throw new Error("Expected exception after `WITH`")}}o(a,"parseWith");function c(){var g=e,S="",E=r();if(E.type==="DOCUMENTREF"&&(s(),S+="DocumentRef-"+E.string+":",!n(":")))throw new Error("Expected `:` after `DocumentRef-...`");if(E=r(),E.type==="LICENSEREF")return s(),S+="LicenseRef-"+E.string,{license:S};e=g}o(c,"parseLicenseRef");function u(){var g=r();if(g&&g.type==="LICENSE"){s();var S={license:g.string};n("+")&&(S.plus=!0);var E=a();return E&&(S.exception=E),S}}o(u,"parseLicense");function l(){var g=n("(");if(g){var S=m();if(!n(")"))throw new Error("Expected `)`");return S}}o(l,"parseParenthesizedExpression");function h(){return l()||c()||u()}o(h,"parseAtom");function f(g,S){return o(function E(){var _=S();if(_){if(!n(g))return _;var b=E();if(!b)throw new Error("Expected expression");return{left:_,conjunction:g.toLowerCase(),right:b}}},"parseBinaryOp")}o(f,"makeBinaryOpParser");var p=f("AND",h),m=f("OR",p),y=m();if(!y||t())throw new Error("Syntax error");return y}});var vg=d((ife,Bv)=>{"use strict";var dV=xv(),pV=Mv();Bv.exports=function(i){return pV(dV(i))}});var Hv=d((rfe,zv)=>{var mV=vg(),gV=Og();function Ul(i){try{return mV(i),!0}catch{return!1}}o(Ul,"valid");function Vv(i,e){var t=e[0].length-i[0].length;return t!==0?t:i[0].toUpperCase().localeCompare(e[0].toUpperCase())}o(Vv,"sortTranspositions");var kv=[["APGL","AGPL"],["Gpl","GPL"],["GLP","GPL"],["APL","Apache"],["ISD","ISC"],["GLP","GPL"],["IST","ISC"],["Claude","Clause"],[" or later","+"],[" International",""],["GNU","GPL"],["GUN","GPL"],["+",""],["GNU GPL","GPL"],["GNU LGPL","LGPL"],["GNU/GPL","GPL"],["GNU GLP","GPL"],["GNU LESSER GENERAL PUBLIC LICENSE","LGPL"],["GNU Lesser General Public License","LGPL"],["GNU LESSER GENERAL PUBLIC LICENSE","LGPL-2.1"],["GNU Lesser General Public License","LGPL-2.1"],["LESSER GENERAL PUBLIC LICENSE","LGPL"],["Lesser General Public License","LGPL"],["LESSER GENERAL PUBLIC LICENSE","LGPL-2.1"],["Lesser General Public License","LGPL-2.1"],["GNU General Public License","GPL"],["Gnu public license","GPL"],["GNU Public License","GPL"],["GNU GENERAL PUBLIC LICENSE","GPL"],["MTI","MIT"],["Mozilla Public License","MPL"],["Universal Permissive License","UPL"],["WTH","WTF"],["WTFGPL","WTFPL"],["-License",""]].sort(Vv),yV=0,SV=1,Fv=[function(i){return i.toUpperCase()},function(i){return i.trim()},function(i){return i.replace(/\./g,"")},function(i){return i.replace(/\s+/g,"")},function(i){return i.replace(/\s+/g,"-")},function(i){return i.replace("v","-")},function(i){return i.replace(/,?\s*(\d)/,"-$1")},function(i){return i.replace(/,?\s*(\d)/,"-$1.0")},function(i){return i.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/,"-$2")},function(i){return i.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/,"-$2.0")},function(i){return i[0].toUpperCase()+i.slice(1)},function(i){return i.replace("/","-")},function(i){return i.replace(/\s*V\s*(\d)/,"-$1").replace(/(\d)$/,"$1.0")},function(i){return i.indexOf("3.0")!==-1?i+"-or-later":i+"-only"},function(i){return i+"only"},function(i){return i.replace(/(\d)$/,"-$1.0")},function(i){return i.replace(/(-| )?(\d)$/,"-$2-Clause")},function(i){return i.replace(/(-| )clause(-| )(\d)/,"-$3-Clause")},function(i){return i.replace(/\b(Modified|New|Revised)(-| )?BSD((-| )License)?/i,"BSD-3-Clause")},function(i){return i.replace(/\bSimplified(-| )?BSD((-| )License)?/i,"BSD-2-Clause")},function(i){return i.replace(/\b(Free|Net)(-| )?BSD((-| )License)?/i,"BSD-2-Clause-$1BSD")},function(i){return i.replace(/\bClear(-| )?BSD((-| )License)?/i,"BSD-3-Clause-Clear")},function(i){return i.replace(/\b(Old|Original)(-| )?BSD((-| )License)?/i,"BSD-4-Clause")},function(i){return"CC-"+i},function(i){return"CC-"+i+"-4.0"},function(i){return i.replace("Attribution","BY").replace("NonCommercial","NC").replace("NoDerivatives","ND").replace(/ (\d)/,"-$1").replace(/ ?International/,"")},function(i){return"CC-"+i.replace("Attribution","BY").replace("NonCommercial","NC").replace("NoDerivatives","ND").replace(/ (\d)/,"-$1").replace(/ ?International/,"")+"-4.0"}],Cg=gV.map(function(i){var e=/^(.*)-\d+\.\d+$/.exec(i);return e?[e[0],e[1]]:[i,null]}).reduce(function(i,e){var t=e[1];return i[t]=i[t]||[],i[t].push(e[0]),i},{}),EV=Object.keys(Cg).map(o(function(e){return[e,Cg[e]]},"makeEntries")).filter(o(function(e){return e[1].length===1&&e[0]!==null&&e[0]!=="APL"},"identifySoleVersions")).map(o(function(e){return[e[0],e[1][0]]},"createLastResorts"));Cg=void 0;var Uv=[["UNLI","Unlicense"],["WTF","WTFPL"],["2 CLAUSE","BSD-2-Clause"],["2-CLAUSE","BSD-2-Clause"],["3 CLAUSE","BSD-3-Clause"],["3-CLAUSE","BSD-3-Clause"],["AFFERO","AGPL-3.0-or-later"],["AGPL","AGPL-3.0-or-later"],["APACHE","Apache-2.0"],["ARTISTIC","Artistic-2.0"],["Affero","AGPL-3.0-or-later"],["BEER","Beerware"],["BOOST","BSL-1.0"],["BSD","BSD-2-Clause"],["CDDL","CDDL-1.1"],["ECLIPSE","EPL-1.0"],["FUCK","WTFPL"],["GNU","GPL-3.0-or-later"],["LGPL","LGPL-3.0-or-later"],["GPLV1","GPL-1.0-only"],["GPL-1","GPL-1.0-only"],["GPLV2","GPL-2.0-only"],["GPL-2","GPL-2.0-only"],["GPL","GPL-3.0-or-later"],["MIT +NO-FALSE-ATTRIBS","MITNFA"],["MIT","MIT"],["MPL","MPL-2.0"],["X11","X11"],["ZLIB","Zlib"]].concat(EV).sort(Vv),wV=0,_V=1,jv=o(function(i){for(var e=0;e<Fv.length;e++){var t=Fv[e](i).trim();if(t!==i&&Ul(t))return t}return null},"validTransformation"),$v=o(function(i){for(var e=i.toUpperCase(),t=0;t<Uv.length;t++){var r=Uv[t];if(e.indexOf(r[wV])>-1)return r[_V]}return null},"validLastResort"),qv=o(function(i,e){for(var t=0;t<kv.length;t++){var r=kv[t],s=r[yV];if(i.indexOf(s)>-1){var n=i.replace(s,r[SV]),a=e(n);if(a!==null)return a}}return null},"anyCorrection");zv.exports=function(i,e){e=e||{};var t=e.upgrade===void 0?!0:!!e.upgrade;function r(c){return t?bV(c):c}o(r,"postprocess");var s=typeof i=="string"&&i.trim().length!==0;if(!s)throw Error("Invalid argument. Expected non-empty string.");if(i=i.trim(),Ul(i))return r(i);var n=i.replace(/\+$/,"").trim();if(Ul(n))return r(n);var a=jv(i);return a!==null||(a=qv(i,function(c){return Ul(c)?c:jv(c)}),a!==null)||(a=$v(i),a!==null)||(a=qv(i,$v),a!==null)?r(a):null};function bV(i){return["GPL-1.0","LGPL-1.0","AGPL-1.0","GPL-2.0","LGPL-2.0","AGPL-2.0","LGPL-2.1"].indexOf(i)!==-1?i+"-only":["GPL-1.0+","GPL-2.0+","GPL-3.0+","LGPL-2.0+","LGPL-2.1+","LGPL-3.0+","AGPL-1.0+","AGPL-3.0+"].indexOf(i)!==-1?i.replace(/\+$/,"-or-later"):["GPL-3.0","LGPL-3.0","AGPL-3.0"].indexOf(i)!==-1?i+"-or-later":i}o(bV,"upgradeGPLs")});var Kv=d((nfe,Jv)=>{var IV=vg(),OV=Hv(),Gv='license should be a valid SPDX license expression (without "LicenseRef"), "UNLICENSED", or "SEE LICENSE IN <filename>"',vV=/^SEE LICEN[CS]E IN (.+)$/;function Wv(i,e){return e.slice(0,i.length)===i}o(Wv,"startsWith");function Rg(i){if(i.hasOwnProperty("license")){var e=i.license;return Wv("LicenseRef",e)||Wv("DocumentRef",e)}else return Rg(i.left)||Rg(i.right)}o(Rg,"usesLicenseRef");Jv.exports=function(i){var e;try{e=IV(i)}catch{var t;if(i==="UNLICENSED"||i==="UNLICENCED")return{validForOldPackages:!0,validForNewPackages:!0,unlicensed:!0};if(t=vV.exec(i))return{validForOldPackages:!0,validForNewPackages:!0,inFile:t[1]};var r={validForOldPackages:!1,validForNewPackages:!1,warnings:[Gv]};if(i.trim().length!==0){var s=OV(i);s&&r.warnings.push('license is similar to the valid expression "'+s+'"')}return r}return Rg(e)?{validForNewPackages:!1,validForOldPackages:!1,spdx:!0,warnings:[Gv]}:{validForNewPackages:!0,validForOldPackages:!0,spdx:!0}}});var tC=d((afe,eC)=>{var{URL:Ag}=require("node:url"),Zv=ol(),CV=Kv(),Yv={dependancies:"dependencies",dependecies:"dependencies",depdenencies:"dependencies",devEependencies:"devDependencies",depends:"dependencies","dev-dependencies":"devDependencies",devDependences:"devDependencies",devDepenencies:"devDependencies",devdependencies:"devDependencies",repostitory:"repository",repo:"repository",prefereGlobal:"preferGlobal",hompage:"homepage",hampage:"homepage",autohr:"author",autor:"author",contributers:"contributors",publicationConfig:"publishConfig",script:"scripts"},Xv=o(i=>i.includes("@")&&i.indexOf("@")<i.lastIndexOf("."),"isEmail");function RV(i){let e=i.trim().split(`
9
+ `),t=0;for(;e[t]?.trim().match(/^(#|$)/);)t++;let r=t+1;for(;r<e.length&&e[r].trim();)r++;return e.slice(t,r).join(" ").trim()}o(RV,"extractDescription");function Qv(i){if(typeof i!="string"){let n=i.name||"",a=i.url||i.web,c=a?" ("+a+")":"",u=i.email||i.mail,l=u?" <"+u+">":"";i=n+l+c}let e=i.match(/^([^(<]+)/),t=i.match(/\(([^()]+)\)/),r=i.match(/<([^<>]+)>/),s={};return e?.[0].trim()&&(s.name=e[0].trim()),r&&(s.email=r[1]),t&&(s.url=t[1]),s}o(Qv,"stringifyPerson");function AV(i,e){i.description&&typeof i.description!="string"&&(e?.push("'description' field should be a string"),delete i.description),i.readme&&!i.description&&i.readme!=="ERROR: No README data found!"&&(i.description=RV(i.readme)),i.description===void 0&&delete i.description,i.description||e?.push("No description"),i.modules&&(e?.push("modules field is deprecated"),delete i.modules);let t=i.files;if(t&&!Array.isArray(t)?(e?.push("Invalid 'files' member"),delete i.files):i.files&&(i.files=i.files.filter(function(a){return!a||typeof a!="string"?(e?.push(`Invalid filename in 'files' list: ${a}`),!1):!0})),i.man&&typeof i.man=="string"&&(i.man=[i.man]),!i.bugs&&i.repository?.url){let a=Zv.fromUrl(i.repository.url);a&&a.bugs()&&(i.bugs={url:a.bugs()})}else if(i.bugs){if(typeof i.bugs=="string")Xv(i.bugs)?i.bugs={email:i.bugs}:Ag.canParse(i.bugs)?i.bugs={url:i.bugs}:e?.push("Bug string field must be url, email, or {email,url}");else{for(let c in i.bugs)["web","name"].includes(c)&&(e?.push(`bugs['${c}'] should probably be bugs['url'].`),i.bugs.url=i.bugs[c],delete i.bugs[c]);let a=i.bugs;i.bugs={},a.url&&(Ag.canParse(a.url)?i.bugs.url=a.url:e?.push("bugs.url field must be a string url. Deleted.")),a.email&&(typeof a.email=="string"&&Xv(a.email)?i.bugs.email=a.email:e?.push("bugs.email field must be a string email. Deleted."))}!i.bugs.email&&!i.bugs.url&&(delete i.bugs,e?.push("Normalized value of bugs field is an empty object. Deleted."))}typeof i.keywords=="string"&&(i.keywords=i.keywords.split(/,\s+/)),i.keywords&&!Array.isArray(i.keywords)?(delete i.keywords,e?.push("keywords should be an array of strings")):i.keywords&&(i.keywords=i.keywords.filter(function(a){return typeof a!="string"||!a?(e?.push("keywords should be an array of strings"),!1):!0}));let r="bundledDependencies",s="bundleDependencies";if(i[r]&&!i[s]&&(i[s]=i[r],delete i[r]),i[s]&&!Array.isArray(i[s])?(e?.push("Invalid 'bundleDependencies' list. Must be array of package names"),delete i[s]):i[s]&&(i[s]=i[s].filter(function(a){return!a||typeof a!="string"?(e?.push(`Invalid bundleDependencies member: ${a}`),!1):(i.dependencies||(i.dependencies={}),Object.prototype.hasOwnProperty.call(i.dependencies,a)||(e?.push(`Non-dependency in bundleDependencies: ${a}`),i.dependencies[a]="*"),!0)})),!i.homepage&&i.repository&&i.repository.url){let a=Zv.fromUrl(i.repository.url);a&&(i.homepage=a.docs())}i.homepage&&(typeof i.homepage!="string"?(e?.push("homepage field must be a string url. Deleted."),delete i.homepage):Ag.canParse(i.homepage)||(i.homepage="http://"+i.homepage)),i.readme||(e?.push("No README data"),i.readme="ERROR: No README data found!");let n=i.license||i.licence;n?typeof n!="string"||n.length<1||n.trim()===""?e?.push("license should be a valid SPDX license expression"):CV(n).validForNewPackages||e?.push("license should be a valid SPDX license expression"):e?.push("No license field."),i.author&&(i.author=Qv(i.author)),["maintainers","contributors"].forEach(function(a){Array.isArray(i[a])&&(i[a]=i[a].map(Qv))});for(let a in Yv)Object.prototype.hasOwnProperty.call(i,a)&&e?.push(`${a} should probably be ${Yv[a]}.`)}o(AV,"normalizeData");eC.exports={normalizeData:AV}});var rC=d(En=>{"use strict";Object.defineProperty(En,"__esModule",{value:!0});En.sync=En.isexe=void 0;var TV=require("fs"),NV=require("fs/promises"),PV=o(async(i,e={})=>{let{ignoreErrors:t=!1}=e;try{return iC(await(0,NV.stat)(i),e)}catch(r){let s=r;if(t||s.code==="EACCES")return!1;throw s}},"isexe");En.isexe=PV;var DV=o((i,e={})=>{let{ignoreErrors:t=!1}=e;try{return iC((0,TV.statSync)(i),e)}catch(r){let s=r;if(t||s.code==="EACCES")return!1;throw s}},"sync");En.sync=DV;var iC=o((i,e)=>i.isFile()&&xV(i,e),"checkStat"),xV=o((i,e)=>{let t=e.uid??process.getuid?.(),r=e.groups??process.getgroups?.()??[],s=e.gid??process.getgid?.()??r[0];if(t===void 0||s===void 0)throw new Error("cannot get uid or gid");let n=new Set([s,...r]),a=i.mode,c=i.uid,u=i.gid,l=parseInt("100",8),h=parseInt("010",8),f=parseInt("001",8),p=l|h;return!!(a&f||a&h&&n.has(u)||a&l&&c===t||a&p&&t===0)},"checkMode")});var nC=d(wn=>{"use strict";Object.defineProperty(wn,"__esModule",{value:!0});wn.sync=wn.isexe=void 0;var LV=require("fs"),MV=require("fs/promises"),BV=o(async(i,e={})=>{let{ignoreErrors:t=!1}=e;try{return sC(await(0,MV.stat)(i),i,e)}catch(r){let s=r;if(t||s.code==="EACCES")return!1;throw s}},"isexe");wn.isexe=BV;var kV=o((i,e={})=>{let{ignoreErrors:t=!1}=e;try{return sC((0,LV.statSync)(i),i,e)}catch(r){let s=r;if(t||s.code==="EACCES")return!1;throw s}},"sync");wn.sync=kV;var FV=o((i,e)=>{let{pathExt:t=process.env.PATHEXT||""}=e,r=t.split(";");if(r.indexOf("")!==-1)return!0;for(let s=0;s<r.length;s++){let n=r[s].toLowerCase(),a=i.substring(i.length-n.length).toLowerCase();if(n&&a===n)return!0}return!1},"checkPathExt"),sC=o((i,e,t)=>i.isFile()&&FV(e,t),"checkStat")});var aC=d(oC=>{"use strict";Object.defineProperty(oC,"__esModule",{value:!0})});var dC=d(Oe=>{"use strict";var cC=Oe&&Oe.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(i,r,s)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),UV=Oe&&Oe.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),uC=Oe&&Oe.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&cC(e,i,t);return UV(e,i),e},jV=Oe&&Oe.__exportStar||function(i,e){for(var t in i)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&cC(e,i,t)};Object.defineProperty(Oe,"__esModule",{value:!0});Oe.sync=Oe.isexe=Oe.posix=Oe.win32=void 0;var lC=uC(rC());Oe.posix=lC;var hC=uC(nC());Oe.win32=hC;jV(aC(),Oe);var $V=process.env._ISEXE_TEST_PLATFORM_||process.platform,fC=$V==="win32"?hC:lC;Oe.isexe=fC.isexe;Oe.sync=fC.sync});var Tg=d((gfe,bC)=>{var{isexe:qV,sync:VV}=dC(),{join:zV,delimiter:HV,sep:pC,posix:mC}=require("path"),gC=process.platform==="win32",yC=new RegExp(`[${mC.sep}${pC===mC.sep?"":pC}]`.replace(/(\\)/g,"\\$1")),GV=new RegExp(`^\\.${yC.source}`),SC=o(i=>Object.assign(new Error(`not found: ${i}`),{code:"ENOENT"}),"getNotFoundError"),EC=o((i,{path:e=process.env.PATH,pathExt:t=process.env.PATHEXT,delimiter:r=HV})=>{let s=i.match(yC)?[""]:[...gC?[process.cwd()]:[],...(e||"").split(r)];if(gC){let n=t||[".EXE",".CMD",".BAT",".COM"].join(r),a=n.split(r).flatMap(c=>[c,c.toLowerCase()]);return i.includes(".")&&a[0]!==""&&a.unshift(""),{pathEnv:s,pathExt:a,pathExtExe:n}}return{pathEnv:s,pathExt:[""]}},"getPathInfo"),wC=o((i,e)=>{let t=/^".*"$/.test(i)?i.slice(1,-1):i;return(!t&&GV.test(e)?e.slice(0,2):"")+zV(t,e)},"getPathPart"),_C=o(async(i,e={})=>{let{pathEnv:t,pathExt:r,pathExtExe:s}=EC(i,e),n=[];for(let a of t){let c=wC(a,i);for(let u of r){let l=c+u;if(await qV(l,{pathExt:s,ignoreErrors:!0})){if(!e.all)return l;n.push(l)}}}if(e.all&&n.length)return n;if(e.nothrow)return null;throw SC(i)},"which"),WV=o((i,e={})=>{let{pathEnv:t,pathExt:r,pathExtExe:s}=EC(i,e),n=[];for(let a of t){let c=wC(a,i);for(let u of r){let l=c+u;if(VV(l,{pathExt:s,ignoreErrors:!0})){if(!e.all)return l;n.push(l)}}}if(e.all&&n.length)return n;if(e.nothrow)return null;throw SC(i)},"whichSync");bC.exports=_C;_C.sync=WV});var OC=d((Sfe,IC)=>{"use strict";var JV=o((i,e)=>{if(!i.length)return'""';let t;if(!/[ \t\n\v"]/.test(i))t=i;else{t='"';for(let r=0;r<=i.length;++r){let s=0;for(;i[r]==="\\";)++r,++s;if(r===i.length){t+="\\".repeat(s*2);break}i[r]==='"'?(t+="\\".repeat(s*2+1),t+=i[r]):(t+="\\".repeat(s),t+=i[r])}t+='"'}return t=t.replace(/[ !%^&()<>|"]/g,"^$&"),e&&(t=t.replace(/[ !%^&()<>|"]/g,"^$&")),t},"cmd"),KV=o(i=>i.length?/[\t\n\r "#$&'()*;<>?\\`|~]/.test(i)?`'${i.replace(/'/g,"'\\''")}'`.replace(/^(?:'')+(?!$)/,"").replace(/\\'''/g,"\\'"):i:"''","sh");IC.exports={cmd:JV,sh:KV}});var jl=d((wfe,AC)=>{"use strict";var{spawn:ZV}=require("child_process"),YV=require("os"),XV=Tg(),vC=OC(),Pg=o((i,e,t={},r={})=>{if(t.shell)return RC(i,e,t,r);let s,n,a=new Promise((m,y)=>{s=m,n=y}),c=new Error("command failed"),u=[],l=[],h=o(m=>({cmd:i,args:e,...m,...ez(u,l,t),...r}),"getResult"),f=o((m,y)=>{let g=h(y);n(Object.assign(m,g))},"rejectWithOpts"),p=ZV(i,e,t);return a.stdin=p.stdin,a.process=p,p.on("error",f),p.stdout&&(p.stdout.on("data",m=>u.push(m)),p.stdout.on("error",f)),p.stderr&&(p.stderr.on("data",m=>l.push(m)),p.stderr.on("error",f)),p.on("close",(m,y)=>{m||y?f(c,{code:m,signal:y}):s(h({code:m,signal:y}))}),a},"promiseSpawn"),RC=o((i,e,t,r)=>{let s=t.shell;s===!0&&(s=process.platform==="win32"?process.env.ComSpec||"cmd.exe":"sh");let n={...t,shell:!1},a=[],c=i;if(/(?:^|\\)cmd(?:\.exe)?$/i.test(s)){let l=!1,h="",f=!1;for(let m=0;m<i.length;++m){let y=i.charAt(m);if(y===" "&&!f)break;h+=y,(y==='"'||y==="'")&&(f=!f)}let p;try{p=XV.sync(h,{path:n.env&&CC(n.env,"PATH")||process.env.PATH,pathext:n.env&&CC(n.env,"PATHEXT")||process.env.PATHEXT}).toLowerCase()}catch{p=h.toLowerCase()}l=p.endsWith(".cmd")||p.endsWith(".bat");for(let m of e)c+=` ${vC.cmd(m,l)}`;a.push("/d","/s","/c",c),n.windowsVerbatimArguments=!0}else{for(let l of e)c+=` ${vC.sh(l)}`;a.push("-c",c)}return Pg(s,a,n,r)},"spawnWithShell"),QV=o((i,e={},t={})=>{let r={...e,shell:!0},s=[].concat(i),n=process.platform;if(n==="linux"&&YV.release().toLowerCase().includes("microsoft")&&(n="wsl",!process.env.BROWSER))return Promise.reject(new Error("Set the BROWSER environment variable to your desired browser."));let a=r.command;return a||(n==="win32"?(r.shell=process.env.ComSpec,a='start ""'):n==="wsl"?a="sensible-browser":n==="darwin"?a="open":a="xdg-open"),RC(a,s,r,t)},"open");Pg.open=QV;var Ng=o((i="pipe",e)=>i==="pipe"||i===null?!0:Array.isArray(i)?Ng(i[e],e):!1,"isPipe"),ez=o((i,e,{stdioString:t=!0,stdio:r})=>{let s={stdout:null,stderr:null};return Ng(r,1)&&(s.stdout=Buffer.concat(i),t&&(s.stdout=s.stdout.toString().trim())),Ng(r,2)&&(s.stderr=Buffer.concat(e),t&&(s.stderr=s.stderr.toString().trim())),s},"stdioResult"),CC=o((i,e)=>{e=e.toLowerCase();for(let t of Object.keys(i).sort())if(t.toLowerCase()===e)return i[t]},"findInObject");AC.exports=Pg});var PC=d((bfe,NC)=>{"use strict";function TC(i,e){for(let t in e)Object.defineProperty(i,t,{value:e[t],enumerable:!0,configurable:!0});return i}o(TC,"assign");function tz(i,e,t){if(!i||typeof i=="string")throw new TypeError("Please pass an Error to err-code");t||(t={}),typeof e=="object"&&(t=e,e=void 0),e!=null&&(t.code=e);try{return TC(i,t)}catch{t.message=i.message,t.stack=i.stack;let s=o(function(){},"ErrClass");return s.prototype=Object.create(Object.getPrototypeOf(i)),TC(new s,t)}}o(tz,"createError");NC.exports=tz});var xC=d((Ofe,DC)=>{function vt(i,e){typeof e=="boolean"&&(e={forever:e}),this._originalTimeouts=JSON.parse(JSON.stringify(i)),this._timeouts=i,this._options=e||{},this._maxRetryTime=e&&e.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}o(vt,"RetryOperation");DC.exports=vt;vt.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};vt.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timeouts=[],this._cachedTimeouts=null};vt.prototype.retry=function(i){if(this._timeout&&clearTimeout(this._timeout),!i)return!1;var e=new Date().getTime();if(i&&e-this._operationStart>=this._maxRetryTime)return this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(i);var t=this._timeouts.shift();if(t===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),t=this._timeouts.shift();else return!1;var r=this,s=setTimeout(function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout(function(){r._operationTimeoutCb(r._attempts)},r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)},t);return this._options.unref&&s.unref(),!0};vt.prototype.attempt=function(i,e){this._fn=i,e&&(e.timeout&&(this._operationTimeout=e.timeout),e.cb&&(this._operationTimeoutCb=e.cb));var t=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){t._operationTimeoutCb()},t._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};vt.prototype.try=function(i){this.attempt(i)};vt.prototype.start=function(i){this.attempt(i)};vt.prototype.start=vt.prototype.try;vt.prototype.errors=function(){return this._errors};vt.prototype.attempts=function(){return this._attempts};vt.prototype.mainError=function(){if(this._errors.length===0)return null;for(var i={},e=null,t=0,r=0;r<this._errors.length;r++){var s=this._errors[r],n=s.message,a=(i[n]||0)+1;i[n]=a,a>=t&&(e=s,t=a)}return e}});var LC=d(ys=>{var iz=xC();ys.operation=function(i){var e=ys.timeouts(i);return new iz(e,{forever:i&&i.forever,unref:i&&i.unref,maxRetryTime:i&&i.maxRetryTime})};ys.timeouts=function(i){if(i instanceof Array)return[].concat(i);var e={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var t in i)e[t]=i[t];if(e.minTimeout>e.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var r=[],s=0;s<e.retries;s++)r.push(this.createTimeout(s,e));return i&&i.forever&&!r.length&&r.push(this.createTimeout(s,e)),r.sort(function(n,a){return n-a}),r};ys.createTimeout=function(i,e){var t=e.randomize?Math.random()+1:1,r=Math.round(t*e.minTimeout*Math.pow(e.factor,i));return r=Math.min(r,e.maxTimeout),r};ys.wrap=function(i,e,t){if(e instanceof Array&&(t=e,e=null),!t){t=[];for(var r in i)typeof i[r]=="function"&&t.push(r)}for(var s=0;s<t.length;s++){var n=t[s],a=i[n];i[n]=o(function(u){var l=ys.operation(e),h=Array.prototype.slice.call(arguments,1),f=h.pop();h.push(function(p){l.retry(p)||(p&&(arguments[0]=l.mainError()),f.apply(this,arguments))}),l.attempt(function(){u.apply(i,h)})},"retryWrapper").bind(i,a),i[n].options=e}}});var BC=d((Afe,MC)=>{MC.exports=LC()});var qa=d((Tfe,FC)=>{"use strict";var rz=PC(),sz=BC(),nz=Object.prototype.hasOwnProperty;function kC(i){return i&&i.code==="EPROMISERETRY"&&nz.call(i,"retried")}o(kC,"isRetryError");function oz(i,e){var t,r;return typeof i=="object"&&typeof e=="function"&&(t=e,e=i,i=t),r=sz.operation(e),new Promise(function(s,n){r.attempt(function(a){Promise.resolve().then(function(){return i(function(c){throw kC(c)&&(c=c.retried),rz(new Error("Retrying"),"EPROMISERETRY",{retried:c})},a)}).then(s,function(c){kC(c)&&(c=c.retried,r.retry(c||new Error))||n(c)})})})}o(oz,"promiseRetry");FC.exports=oz});var Mg=d((Pfe,UC)=>{var Va=class extends Error{static{o(this,"GitError")}shouldRetry(){return!1}},Dg=class extends Va{static{o(this,"GitConnectionError")}constructor(){super("A git connection error occurred")}shouldRetry(e){return e<3}},xg=class extends Va{static{o(this,"GitPathspecError")}constructor(){super("The git reference could not be found")}},Lg=class extends Va{static{o(this,"GitUnknownError")}constructor(){super("An unknown git error occurred")}};UC.exports={GitConnectionError:Dg,GitPathspecError:xg,GitUnknownError:Lg}});var $C=d((xfe,jC)=>{var{GitConnectionError:az,GitPathspecError:cz,GitUnknownError:uz}=Mg(),lz=new RegExp(["remote error: Internal Server Error","The remote end hung up unexpectedly","Connection timed out","Operation timed out","Failed to connect to .* Timed out","Connection reset by peer","SSL_ERROR_SYSCALL","The requested URL returned error: 503"].join("|")),hz=/pathspec .* did not match any file\(s\) known to git/;function fz(i){let e=i.stderr,t;return lz.test(e)?t=new az(e):hz.test(e)?t=new cz(e):t=new uz(e),Object.assign(t,i)}o(fz,"makeError");jC.exports=fz});var GC=d((Mfe,HC)=>{var{hasOwnProperty:Bg}=Object.prototype,kg=o((i,e={})=>{typeof e=="string"&&(e={section:e}),e.align=e.align===!0,e.newline=e.newline===!0,e.sort=e.sort===!0,e.whitespace=e.whitespace===!0||e.align===!0,e.platform=e.platform||typeof process<"u"&&process.platform,e.bracketedArray=e.bracketedArray!==!1;let t=e.platform==="win32"?`\r
10
+ `:`
11
+ `,r=e.whitespace?" = ":"=",s=[],n=e.sort?Object.keys(i).sort():Object.keys(i),a=0;e.align&&(a=qi(n.filter(l=>i[l]===null||Array.isArray(i[l])||typeof i[l]!="object").map(l=>Array.isArray(i[l])?`${l}[]`:l).concat([""]).reduce((l,h)=>qi(l).length>=qi(h).length?l:h)).length);let c="",u=e.bracketedArray?"[]":"";for(let l of n){let h=i[l];if(h&&Array.isArray(h))for(let f of h)c+=qi(`${l}${u}`).padEnd(a," ")+r+qi(f)+t;else h&&typeof h=="object"?s.push(l):c+=qi(l).padEnd(a," ")+r+qi(h)+t}e.section&&c.length&&(c="["+qi(e.section)+"]"+(e.newline?t+t:t)+c);for(let l of s){let h=VC(l,".").join("\\."),f=(e.section?e.section+".":"")+h,p=kg(i[l],{...e,section:f});c.length&&p.length&&(c+=t),c+=p}return c},"encode");function VC(i,e){var t=0,r=0,s=0,n=[];do if(s=i.indexOf(e,t),s!==-1){if(t=s+e.length,s>0&&i[s-1]==="\\")continue;n.push(i.slice(r,s)),r=s+e.length}while(s!==-1);return n.push(i.slice(r)),n}o(VC,"splitSections");var qC=o((i,e={})=>{e.bracketedArray=e.bracketedArray!==!1;let t=Object.create(null),r=t,s=null,n=/^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i,a=i.split(/[\r\n]+/g),c={};for(let l of a){if(!l||l.match(/^\s*[;#]/)||l.match(/^\s*$/))continue;let h=l.match(n);if(!h)continue;if(h[1]!==void 0){if(s=$l(h[1]),s==="__proto__"){r=Object.create(null);continue}r=t[s]=t[s]||Object.create(null);continue}let f=$l(h[2]),p;e.bracketedArray?p=f.length>2&&f.slice(-2)==="[]":(c[f]=(c?.[f]||0)+1,p=c[f]>1);let m=p&&f.endsWith("[]")?f.slice(0,-2):f;if(m==="__proto__")continue;let y=h[3]?$l(h[4]):!0,g=y==="true"||y==="false"||y==="null"?JSON.parse(y):y;p&&(Bg.call(r,m)?Array.isArray(r[m])||(r[m]=[r[m]]):r[m]=[]),Array.isArray(r[m])?r[m].push(g):r[m]=g}let u=[];for(let l of Object.keys(t)){if(!Bg.call(t,l)||typeof t[l]!="object"||Array.isArray(t[l]))continue;let h=VC(l,".");r=t;let f=h.pop(),p=f.replace(/\\\./g,".");for(let m of h)m!=="__proto__"&&((!Bg.call(r,m)||typeof r[m]!="object")&&(r[m]=Object.create(null)),r=r[m]);r===t&&p===f||(r[p]=t[l],u.push(l))}for(let l of u)delete t[l];return t},"decode"),zC=o(i=>i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'"),"isQuoted"),qi=o(i=>typeof i!="string"||i.match(/[=\r\n]/)||i.match(/^\[/)||i.length>1&&zC(i)||i!==i.trim()?JSON.stringify(i):i.split(";").join("\\;").split("#").join("\\#"),"safe"),$l=o(i=>{if(i=(i||"").trim(),zC(i)){i.charAt(0)==="'"&&(i=i.slice(1,-1));try{i=JSON.parse(i)}catch{}}else{let e=!1,t="";for(let r=0,s=i.length;r<s;r++){let n=i.charAt(r);if(e)"\\;#".indexOf(n)!==-1?t+=n:t+="\\"+n,e=!1;else{if(";#".indexOf(n)!==-1)break;n==="\\"?e=!0:t+=n}}return e&&(t+="\\"),t.trim()}return i},"unsafe");HC.exports={parse:qC,decode:qC,stringify:kg,encode:kg,safe:qi,unsafe:$l}});var ZC=d((kfe,Fg)=>{var WC=require("node:fs"),dz=require("node:os"),pz=require("node:path"),mz=GC(),JC=pz.join(dz.homedir(),".gitconfig"),za=null,KC=o(()=>{if(za===null)try{if(za={},WC.existsSync(JC)){let i=WC.readFileSync(JC,"utf-8");za=mz.parse(i)}}catch{za={}}return za},"loadGitConfig"),gz=o(()=>{let i=KC();return{sshCommandSetInConfig:i?.core?.sshCommand!==void 0,askPassSetInConfig:i?.core?.askpass!==void 0}},"checkGitConfigs"),yz=process.env.GIT_SSH_COMMAND!==void 0,Sz=process.env.GIT_ASKPASS!==void 0,{sshCommandSetInConfig:Ez,askPassSetInConfig:wz}=gz(),_z={...Sz||wz?{}:{GIT_ASKPASS:"echo"},...yz||Ez?{}:{GIT_SSH_COMMAND:"ssh -oStrictHostKeyChecking=accept-new"}};Fg.exports=(i={})=>({stdioString:!0,...i,shell:!1,env:i.env||{..._z,...process.env}});Fg.exports.loadGitConfig=KC});var XC=d((Ufe,YC)=>{var bz=Tg(),Ug;try{Ug=bz.sync("git")}catch{}YC.exports=(i={})=>i.git?i.git:!Ug||i.git===!1?Object.assign(new Error("No git binary found in $PATH"),{code:"ENOGIT"}):Ug});var Ha=d((jfe,QC)=>{var Iz=jl(),Oz=qa(),{log:vz}=_t(),Cz=$C(),Rz=ZC();QC.exports=(i,e={})=>{let r=XC()(e);if(r instanceof Error)return Promise.reject(r);let s=e.allowReplace||i[0]==="--no-replace-objects"?i:["--no-replace-objects",...i],n=e.retry;return n==null&&(n={retries:e.fetchRetries||2,factor:e.fetchRetryFactor||10,maxTimeout:e.fetchRetryMaxtimeout||6e4,minTimeout:e.fetchRetryMintimeout||1e3}),Oz((a,c)=>(c!==1&&vz.silly("git",`Retrying git command: ${s.join(" ")} attempt # ${c}`),Iz(r,s,Rz(e)).catch(u=>{let l=Cz(u);if(!l.shouldRetry(c))throw l;a(l)})),n)}});var Vg=d(Vl=>{"use strict";Object.defineProperty(Vl,"__esModule",{value:!0});Vl.LRUCache=void 0;var _n=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,tR=new Set,jg=typeof process=="object"&&process?process:{},iR=o((i,e,t,r)=>{typeof jg.emitWarning=="function"&&jg.emitWarning(i,e,t,r)},"emitWarning"),ql=globalThis.AbortController,eR=globalThis.AbortSignal;if(typeof ql>"u"){eR=class{static{o(this,"AbortSignal")}onabort;_onabort=[];reason;aborted=!1;addEventListener(r,s){this._onabort.push(s)}},ql=class{static{o(this,"AbortController")}constructor(){e()}signal=new eR;abort(r){if(!this.signal.aborted){this.signal.reason=r,this.signal.aborted=!0;for(let s of this.signal._onabort)s(r);this.signal.onabort?.(r)}}};let i=jg.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=o(()=>{i&&(i=!1,iR("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))},"warnACPolyfill")}var Az=o(i=>!tR.has(i),"shouldWarn"),Vfe=Symbol("type"),wr=o(i=>i&&i===Math.floor(i)&&i>0&&isFinite(i),"isPosInt"),rR=o(i=>wr(i)?i<=Math.pow(2,8)?Uint8Array:i<=Math.pow(2,16)?Uint16Array:i<=Math.pow(2,32)?Uint32Array:i<=Number.MAX_SAFE_INTEGER?bn:null:null,"getUintArray"),bn=class extends Array{static{o(this,"ZeroArray")}constructor(e){super(e),this.fill(0)}},$g=class i{static{o(this,"Stack")}heap;length;static#e=!1;static create(e){let t=rR(e);if(!t)return[];i.#e=!0;let r=new i(e,t);return i.#e=!1,r}constructor(e,t){if(!i.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},qg=class i{static{o(this,"LRUCache")}#e;#t;#i;#r;#s;#u;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#c;#f;#n;#h;#o;#d;#a;#p;#y;#_;#m;#R;#w;#b;#v;#I;#E;static unsafeExposeInternals(e){return{starts:e.#w,ttls:e.#b,sizes:e.#R,keyMap:e.#n,keyList:e.#h,valList:e.#o,next:e.#d,prev:e.#a,get head(){return e.#p},get tail(){return e.#y},free:e.#_,isBackgroundFetch:o(t=>e.#S(t),"isBackgroundFetch"),backgroundFetch:o((t,r,s,n)=>e.#L(t,r,s,n),"backgroundFetch"),moveToTail:o(t=>e.#j(t),"moveToTail"),indexes:o(t=>e.#P(t),"indexes"),rindexes:o(t=>e.#x(t),"rindexes"),isStale:o(t=>e.#C(t),"isStale")}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#f}get size(){return this.#c}get fetchMethod(){return this.#s}get memoMethod(){return this.#u}get dispose(){return this.#i}get disposeAfter(){return this.#r}constructor(e){let{max:t=0,ttl:r,ttlResolution:s=1,ttlAutopurge:n,updateAgeOnGet:a,updateAgeOnHas:c,allowStale:u,dispose:l,disposeAfter:h,noDisposeOnSet:f,noUpdateTTL:p,maxSize:m=0,maxEntrySize:y=0,sizeCalculation:g,fetchMethod:S,memoMethod:E,noDeleteOnFetchRejection:_,noDeleteOnStaleGet:b,allowStaleOnFetchRejection:w,allowStaleOnFetchAbort:I,ignoreFetchAbort:v}=e;if(t!==0&&!wr(t))throw new TypeError("max option must be a nonnegative integer");let N=t?rR(t):Array;if(!N)throw new Error("invalid max value: "+t);if(this.#e=t,this.#t=m,this.maxEntrySize=y||this.#t,this.sizeCalculation=g,this.sizeCalculation){if(!this.#t&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(E!==void 0&&typeof E!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#u=E,S!==void 0&&typeof S!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#s=S,this.#I=!!S,this.#n=new Map,this.#h=new Array(t).fill(void 0),this.#o=new Array(t).fill(void 0),this.#d=new N(t),this.#a=new N(t),this.#p=0,this.#y=0,this.#_=$g.create(t),this.#c=0,this.#f=0,typeof l=="function"&&(this.#i=l),typeof h=="function"?(this.#r=h,this.#m=[]):(this.#r=void 0,this.#m=void 0),this.#v=!!this.#i,this.#E=!!this.#r,this.noDisposeOnSet=!!f,this.noUpdateTTL=!!p,this.noDeleteOnFetchRejection=!!_,this.allowStaleOnFetchRejection=!!w,this.allowStaleOnFetchAbort=!!I,this.ignoreFetchAbort=!!v,this.maxEntrySize!==0){if(this.#t!==0&&!wr(this.#t))throw new TypeError("maxSize must be a positive integer if specified");if(!wr(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#T()}if(this.allowStale=!!u,this.noDeleteOnStaleGet=!!b,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!c,this.ttlResolution=wr(s)||s===0?s:1,this.ttlAutopurge=!!n,this.ttl=r||0,this.ttl){if(!wr(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#N()}if(this.#e===0&&this.ttl===0&&this.#t===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#t){let P="LRU_CACHE_UNBOUNDED";Az(P)&&(tR.add(P),iR("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",P,i))}}getRemainingTTL(e){return this.#n.has(e)?1/0:0}#N(){let e=new bn(this.#e),t=new bn(this.#e);this.#b=e,this.#w=t,this.#B=(n,a,c=_n.now())=>{if(t[n]=a!==0?c:0,e[n]=a,a!==0&&this.ttlAutopurge){let u=setTimeout(()=>{this.#C(n)&&this.#g(this.#h[n],"expire")},a+1);u.unref&&u.unref()}},this.#O=n=>{t[n]=e[n]!==0?_n.now():0},this.#l=(n,a)=>{if(e[a]){let c=e[a],u=t[a];if(!c||!u)return;n.ttl=c,n.start=u,n.now=r||s();let l=n.now-u;n.remainingTTL=c-l}};let r=0,s=o(()=>{let n=_n.now();if(this.ttlResolution>0){r=n;let a=setTimeout(()=>r=0,this.ttlResolution);a.unref&&a.unref()}return n},"getNow");this.getRemainingTTL=n=>{let a=this.#n.get(n);if(a===void 0)return 0;let c=e[a],u=t[a];if(!c||!u)return 1/0;let l=(r||s())-u;return c-l},this.#C=n=>{let a=t[n],c=e[n];return!!c&&!!a&&(r||s())-a>c}}#O=o(()=>{},"#updateItemAge");#l=o(()=>{},"#statusTTL");#B=o(()=>{},"#setItemTTL");#C=o(()=>!1,"#isStale");#T(){let e=new bn(this.#e);this.#f=0,this.#R=e,this.#k=t=>{this.#f-=e[t],e[t]=0},this.#$=(t,r,s,n)=>{if(this.#S(r))return 0;if(!wr(s))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(s=n(r,t),!wr(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return s},this.#A=(t,r,s)=>{if(e[t]=r,this.#t){let n=this.#t-e[t];for(;this.#f>n;)this.#D(!0)}this.#f+=e[t],s&&(s.entrySize=r,s.totalCalculatedSize=this.#f)}}#k=o(e=>{},"#removeItemSize");#A=o((e,t,r)=>{},"#addItemSize");#$=o((e,t,r,s)=>{if(r||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0},"#requireSize");*#P({allowStale:e=this.allowStale}={}){if(this.#c)for(let t=this.#y;!(!this.#F(t)||((e||!this.#C(t))&&(yield t),t===this.#p));)t=this.#a[t]}*#x({allowStale:e=this.allowStale}={}){if(this.#c)for(let t=this.#p;!(!this.#F(t)||((e||!this.#C(t))&&(yield t),t===this.#y));)t=this.#d[t]}#F(e){return e!==void 0&&this.#n.get(this.#h[e])===e}*entries(){for(let e of this.#P())this.#o[e]!==void 0&&this.#h[e]!==void 0&&!this.#S(this.#o[e])&&(yield[this.#h[e],this.#o[e]])}*rentries(){for(let e of this.#x())this.#o[e]!==void 0&&this.#h[e]!==void 0&&!this.#S(this.#o[e])&&(yield[this.#h[e],this.#o[e]])}*keys(){for(let e of this.#P()){let t=this.#h[e];t!==void 0&&!this.#S(this.#o[e])&&(yield t)}}*rkeys(){for(let e of this.#x()){let t=this.#h[e];t!==void 0&&!this.#S(this.#o[e])&&(yield t)}}*values(){for(let e of this.#P())this.#o[e]!==void 0&&!this.#S(this.#o[e])&&(yield this.#o[e])}*rvalues(){for(let e of this.#x())this.#o[e]!==void 0&&!this.#S(this.#o[e])&&(yield this.#o[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let r of this.#P()){let s=this.#o[r],n=this.#S(s)?s.__staleWhileFetching:s;if(n!==void 0&&e(n,this.#h[r],this))return this.get(this.#h[r],t)}}forEach(e,t=this){for(let r of this.#P()){let s=this.#o[r],n=this.#S(s)?s.__staleWhileFetching:s;n!==void 0&&e.call(t,n,this.#h[r],this)}}rforEach(e,t=this){for(let r of this.#x()){let s=this.#o[r],n=this.#S(s)?s.__staleWhileFetching:s;n!==void 0&&e.call(t,n,this.#h[r],this)}}purgeStale(){let e=!1;for(let t of this.#x({allowStale:!0}))this.#C(t)&&(this.#g(this.#h[t],"expire"),e=!0);return e}info(e){let t=this.#n.get(e);if(t===void 0)return;let r=this.#o[t],s=this.#S(r)?r.__staleWhileFetching:r;if(s===void 0)return;let n={value:s};if(this.#b&&this.#w){let a=this.#b[t],c=this.#w[t];if(a&&c){let u=a-(_n.now()-c);n.ttl=u,n.start=Date.now()}}return this.#R&&(n.size=this.#R[t]),n}dump(){let e=[];for(let t of this.#P({allowStale:!0})){let r=this.#h[t],s=this.#o[t],n=this.#S(s)?s.__staleWhileFetching:s;if(n===void 0||r===void 0)continue;let a={value:n};if(this.#b&&this.#w){a.ttl=this.#b[t];let c=_n.now()-this.#w[t];a.start=Math.floor(Date.now()-c)}this.#R&&(a.size=this.#R[t]),e.unshift([r,a])}return e}load(e){this.clear();for(let[t,r]of e){if(r.start){let s=Date.now()-r.start;r.start=_n.now()-s}this.set(t,r.value,r)}}set(e,t,r={}){if(t===void 0)return this.delete(e),this;let{ttl:s=this.ttl,start:n,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:c=this.sizeCalculation,status:u}=r,{noUpdateTTL:l=this.noUpdateTTL}=r,h=this.#$(e,t,r.size||0,c);if(this.maxEntrySize&&h>this.maxEntrySize)return u&&(u.set="miss",u.maxEntrySizeExceeded=!0),this.#g(e,"set"),this;let f=this.#c===0?void 0:this.#n.get(e);if(f===void 0)f=this.#c===0?this.#y:this.#_.length!==0?this.#_.pop():this.#c===this.#e?this.#D(!1):this.#c,this.#h[f]=e,this.#o[f]=t,this.#n.set(e,f),this.#d[this.#y]=f,this.#a[f]=this.#y,this.#y=f,this.#c++,this.#A(f,h,u),u&&(u.set="add"),l=!1;else{this.#j(f);let p=this.#o[f];if(t!==p){if(this.#I&&this.#S(p)){p.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:m}=p;m!==void 0&&!a&&(this.#v&&this.#i?.(m,e,"set"),this.#E&&this.#m?.push([m,e,"set"]))}else a||(this.#v&&this.#i?.(p,e,"set"),this.#E&&this.#m?.push([p,e,"set"]));if(this.#k(f),this.#A(f,h,u),this.#o[f]=t,u){u.set="replace";let m=p&&this.#S(p)?p.__staleWhileFetching:p;m!==void 0&&(u.oldValue=m)}}else u&&(u.set="update")}if(s!==0&&!this.#b&&this.#N(),this.#b&&(l||this.#B(f,s,n),u&&this.#l(u,f)),!a&&this.#E&&this.#m){let p=this.#m,m;for(;m=p?.shift();)this.#r?.(...m)}return this}pop(){try{for(;this.#c;){let e=this.#o[this.#p];if(this.#D(!0),this.#S(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#E&&this.#m){let e=this.#m,t;for(;t=e?.shift();)this.#r?.(...t)}}}#D(e){let t=this.#p,r=this.#h[t],s=this.#o[t];return this.#I&&this.#S(s)?s.__abortController.abort(new Error("evicted")):(this.#v||this.#E)&&(this.#v&&this.#i?.(s,r,"evict"),this.#E&&this.#m?.push([s,r,"evict"])),this.#k(t),e&&(this.#h[t]=void 0,this.#o[t]=void 0,this.#_.push(t)),this.#c===1?(this.#p=this.#y=0,this.#_.length=0):this.#p=this.#d[t],this.#n.delete(r),this.#c--,t}has(e,t={}){let{updateAgeOnHas:r=this.updateAgeOnHas,status:s}=t,n=this.#n.get(e);if(n!==void 0){let a=this.#o[n];if(this.#S(a)&&a.__staleWhileFetching===void 0)return!1;if(this.#C(n))s&&(s.has="stale",this.#l(s,n));else return r&&this.#O(n),s&&(s.has="hit",this.#l(s,n)),!0}else s&&(s.has="miss");return!1}peek(e,t={}){let{allowStale:r=this.allowStale}=t,s=this.#n.get(e);if(s===void 0||!r&&this.#C(s))return;let n=this.#o[s];return this.#S(n)?n.__staleWhileFetching:n}#L(e,t,r,s){let n=t===void 0?void 0:this.#o[t];if(this.#S(n))return n;let a=new ql,{signal:c}=r;c?.addEventListener("abort",()=>a.abort(c.reason),{signal:a.signal});let u={signal:a.signal,options:r,context:s},l=o((g,S=!1)=>{let{aborted:E}=a.signal,_=r.ignoreFetchAbort&&g!==void 0;if(r.status&&(E&&!S?(r.status.fetchAborted=!0,r.status.fetchError=a.signal.reason,_&&(r.status.fetchAbortIgnored=!0)):r.status.fetchResolved=!0),E&&!_&&!S)return f(a.signal.reason);let b=m;return this.#o[t]===m&&(g===void 0?b.__staleWhileFetching?this.#o[t]=b.__staleWhileFetching:this.#g(e,"fetch"):(r.status&&(r.status.fetchUpdated=!0),this.set(e,g,u.options))),g},"cb"),h=o(g=>(r.status&&(r.status.fetchRejected=!0,r.status.fetchError=g),f(g)),"eb"),f=o(g=>{let{aborted:S}=a.signal,E=S&&r.allowStaleOnFetchAbort,_=E||r.allowStaleOnFetchRejection,b=_||r.noDeleteOnFetchRejection,w=m;if(this.#o[t]===m&&(!b||w.__staleWhileFetching===void 0?this.#g(e,"fetch"):E||(this.#o[t]=w.__staleWhileFetching)),_)return r.status&&w.__staleWhileFetching!==void 0&&(r.status.returnedStale=!0),w.__staleWhileFetching;if(w.__returned===w)throw g},"fetchFail"),p=o((g,S)=>{let E=this.#s?.(e,n,u);E&&E instanceof Promise&&E.then(_=>g(_===void 0?void 0:_),S),a.signal.addEventListener("abort",()=>{(!r.ignoreFetchAbort||r.allowStaleOnFetchAbort)&&(g(void 0),r.allowStaleOnFetchAbort&&(g=o(_=>l(_,!0),"res")))})},"pcall");r.status&&(r.status.fetchDispatched=!0);let m=new Promise(p).then(l,h),y=Object.assign(m,{__abortController:a,__staleWhileFetching:n,__returned:void 0});return t===void 0?(this.set(e,y,{...u.options,status:void 0}),t=this.#n.get(e)):this.#o[t]=y,y}#S(e){if(!this.#I)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof ql}async fetch(e,t={}){let{allowStale:r=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:c=this.noDisposeOnSet,size:u=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:h=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:p=this.allowStaleOnFetchRejection,ignoreFetchAbort:m=this.ignoreFetchAbort,allowStaleOnFetchAbort:y=this.allowStaleOnFetchAbort,context:g,forceRefresh:S=!1,status:E,signal:_}=t;if(!this.#I)return E&&(E.fetch="get"),this.get(e,{allowStale:r,updateAgeOnGet:s,noDeleteOnStaleGet:n,status:E});let b={allowStale:r,updateAgeOnGet:s,noDeleteOnStaleGet:n,ttl:a,noDisposeOnSet:c,size:u,sizeCalculation:l,noUpdateTTL:h,noDeleteOnFetchRejection:f,allowStaleOnFetchRejection:p,allowStaleOnFetchAbort:y,ignoreFetchAbort:m,status:E,signal:_},w=this.#n.get(e);if(w===void 0){E&&(E.fetch="miss");let I=this.#L(e,w,b,g);return I.__returned=I}else{let I=this.#o[w];if(this.#S(I)){let ee=r&&I.__staleWhileFetching!==void 0;return E&&(E.fetch="inflight",ee&&(E.returnedStale=!0)),ee?I.__staleWhileFetching:I.__returned=I}let v=this.#C(w);if(!S&&!v)return E&&(E.fetch="hit"),this.#j(w),s&&this.#O(w),E&&this.#l(E,w),I;let N=this.#L(e,w,b,g),U=N.__staleWhileFetching!==void 0&&r;return E&&(E.fetch=v?"stale":"refresh",U&&v&&(E.returnedStale=!0)),U?N.__staleWhileFetching:N.__returned=N}}async forceFetch(e,t={}){let r=await this.fetch(e,t);if(r===void 0)throw new Error("fetch() returned undefined");return r}memo(e,t={}){let r=this.#u;if(!r)throw new Error("no memoMethod provided to constructor");let{context:s,forceRefresh:n,...a}=t,c=this.get(e,a);if(!n&&c!==void 0)return c;let u=r(e,c,{options:a,context:s});return this.set(e,u,a),u}get(e,t={}){let{allowStale:r=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:a}=t,c=this.#n.get(e);if(c!==void 0){let u=this.#o[c],l=this.#S(u);return a&&this.#l(a,c),this.#C(c)?(a&&(a.get="stale"),l?(a&&r&&u.__staleWhileFetching!==void 0&&(a.returnedStale=!0),r?u.__staleWhileFetching:void 0):(n||this.#g(e,"expire"),a&&r&&(a.returnedStale=!0),r?u:void 0)):(a&&(a.get="hit"),l?u.__staleWhileFetching:(this.#j(c),s&&this.#O(c),u))}else a&&(a.get="miss")}#U(e,t){this.#a[t]=e,this.#d[e]=t}#j(e){e!==this.#y&&(e===this.#p?this.#p=this.#d[e]:this.#U(this.#a[e],this.#d[e]),this.#U(this.#y,e),this.#y=e)}delete(e){return this.#g(e,"delete")}#g(e,t){let r=!1;if(this.#c!==0){let s=this.#n.get(e);if(s!==void 0)if(r=!0,this.#c===1)this.#q(t);else{this.#k(s);let n=this.#o[s];if(this.#S(n)?n.__abortController.abort(new Error("deleted")):(this.#v||this.#E)&&(this.#v&&this.#i?.(n,e,t),this.#E&&this.#m?.push([n,e,t])),this.#n.delete(e),this.#h[s]=void 0,this.#o[s]=void 0,s===this.#y)this.#y=this.#a[s];else if(s===this.#p)this.#p=this.#d[s];else{let a=this.#a[s];this.#d[a]=this.#d[s];let c=this.#d[s];this.#a[c]=this.#a[s]}this.#c--,this.#_.push(s)}}if(this.#E&&this.#m?.length){let s=this.#m,n;for(;n=s?.shift();)this.#r?.(...n)}return r}clear(){return this.#q("delete")}#q(e){for(let t of this.#x({allowStale:!0})){let r=this.#o[t];if(this.#S(r))r.__abortController.abort(new Error("deleted"));else{let s=this.#h[t];this.#v&&this.#i?.(r,s,e),this.#E&&this.#m?.push([r,s,e])}}if(this.#n.clear(),this.#o.fill(void 0),this.#h.fill(void 0),this.#b&&this.#w&&(this.#b.fill(0),this.#w.fill(0)),this.#R&&this.#R.fill(0),this.#p=0,this.#y=0,this.#_.length=0,this.#f=0,this.#c=0,this.#E&&this.#m){let t=this.#m,r;for(;r=t?.shift();)this.#r?.(...r)}}};Vl.LRUCache=qg});var oR=d((Gfe,nR)=>{"use strict";var sR=Le(),Tz=o((i,e,t,r,s)=>{typeof t=="string"&&(s=r,r=t,t=void 0);try{return new sR(i instanceof sR?i.version:i,t).inc(e,r,s).version}catch{return null}},"inc");nR.exports=Tz});var uR=d((Jfe,cR)=>{"use strict";var aR=ls(),Nz=o((i,e)=>{let t=aR(i,null,!0),r=aR(e,null,!0),s=t.compare(r);if(s===0)return null;let n=s>0,a=n?t:r,c=n?r:t,u=!!a.prerelease.length;if(!!c.prerelease.length&&!u){if(!c.patch&&!c.minor)return"major";if(c.compareMain(a)===0)return c.minor&&!c.patch?"minor":"patch"}let h=u?"pre":"";return t.major!==r.major?h+"major":t.minor!==r.minor?h+"minor":t.patch!==r.patch?h+"patch":"prerelease"},"diff");cR.exports=Nz});var hR=d((Zfe,lR)=>{"use strict";var Pz=Le(),Dz=o((i,e)=>new Pz(i,e).major,"major");lR.exports=Dz});var dR=d((Xfe,fR)=>{"use strict";var xz=Le(),Lz=o((i,e)=>new xz(i,e).minor,"minor");fR.exports=Lz});var mR=d((ede,pR)=>{"use strict";var Mz=Le(),Bz=o((i,e)=>new Mz(i,e).patch,"patch");pR.exports=Bz});var yR=d((ide,gR)=>{"use strict";var kz=ls(),Fz=o((i,e)=>{let t=kz(i,e);return t&&t.prerelease.length?t.prerelease:null},"prerelease");gR.exports=Fz});var Ct=d((sde,ER)=>{"use strict";var SR=Le(),Uz=o((i,e,t)=>new SR(i,t).compare(new SR(e,t)),"compare");ER.exports=Uz});var _R=d((ode,wR)=>{"use strict";var jz=Ct(),$z=o((i,e,t)=>jz(e,i,t),"rcompare");wR.exports=$z});var IR=d((cde,bR)=>{"use strict";var qz=Ct(),Vz=o((i,e)=>qz(i,e,!0),"compareLoose");bR.exports=Vz});var zl=d((lde,vR)=>{"use strict";var OR=Le(),zz=o((i,e,t)=>{let r=new OR(i,t),s=new OR(e,t);return r.compare(s)||r.compareBuild(s)},"compareBuild");vR.exports=zz});var RR=d((fde,CR)=>{"use strict";var Hz=zl(),Gz=o((i,e)=>i.sort((t,r)=>Hz(t,r,e)),"sort");CR.exports=Gz});var TR=d((pde,AR)=>{"use strict";var Wz=zl(),Jz=o((i,e)=>i.sort((t,r)=>Wz(r,t,e)),"rsort");AR.exports=Jz});var Ga=d((gde,NR)=>{"use strict";var Kz=Ct(),Zz=o((i,e,t)=>Kz(i,e,t)>0,"gt");NR.exports=Zz});var Hl=d((Sde,PR)=>{"use strict";var Yz=Ct(),Xz=o((i,e,t)=>Yz(i,e,t)<0,"lt");PR.exports=Xz});var zg=d((wde,DR)=>{"use strict";var Qz=Ct(),eH=o((i,e,t)=>Qz(i,e,t)===0,"eq");DR.exports=eH});var Hg=d((bde,xR)=>{"use strict";var tH=Ct(),iH=o((i,e,t)=>tH(i,e,t)!==0,"neq");xR.exports=iH});var Gl=d((Ode,LR)=>{"use strict";var rH=Ct(),sH=o((i,e,t)=>rH(i,e,t)>=0,"gte");LR.exports=sH});var Wl=d((Cde,MR)=>{"use strict";var nH=Ct(),oH=o((i,e,t)=>nH(i,e,t)<=0,"lte");MR.exports=oH});var Gg=d((Ade,BR)=>{"use strict";var aH=zg(),cH=Hg(),uH=Ga(),lH=Gl(),hH=Hl(),fH=Wl(),dH=o((i,e,t,r)=>{switch(e){case"===":return typeof i=="object"&&(i=i.version),typeof t=="object"&&(t=t.version),i===t;case"!==":return typeof i=="object"&&(i=i.version),typeof t=="object"&&(t=t.version),i!==t;case"":case"=":case"==":return aH(i,t,r);case"!=":return cH(i,t,r);case">":return uH(i,t,r);case">=":return lH(i,t,r);case"<":return hH(i,t,r);case"<=":return fH(i,t,r);default:throw new TypeError(`Invalid operator: ${e}`)}},"cmp");BR.exports=dH});var FR=d((Nde,kR)=>{"use strict";var pH=Le(),mH=ls(),{safeRe:Jl,t:Kl}=pn(),gH=o((i,e)=>{if(i instanceof pH)return i;if(typeof i=="number"&&(i=String(i)),typeof i!="string")return null;e=e||{};let t=null;if(!e.rtl)t=i.match(e.includePrerelease?Jl[Kl.COERCEFULL]:Jl[Kl.COERCE]);else{let u=e.includePrerelease?Jl[Kl.COERCERTLFULL]:Jl[Kl.COERCERTL],l;for(;(l=u.exec(i))&&(!t||t.index+t[0].length!==i.length);)(!t||l.index+l[0].length!==t.index+t[0].length)&&(t=l),u.lastIndex=l.index+l[1].length+l[2].length;u.lastIndex=-1}if(t===null)return null;let r=t[2],s=t[3]||"0",n=t[4]||"0",a=e.includePrerelease&&t[5]?`-${t[5]}`:"",c=e.includePrerelease&&t[6]?`+${t[6]}`:"";return mH(`${r}.${s}.${n}${a}${c}`,e)},"coerce");kR.exports=gH});var jR=d((Dde,UR)=>{"use strict";var Wg=class{static{o(this,"LRUCache")}constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let s=this.map.keys().next().value;this.delete(s)}this.map.set(e,t)}return this}};UR.exports=Wg});var Rt=d((Lde,zR)=>{"use strict";var yH=/\s+/g,Jg=class i{static{o(this,"Range")}constructor(e,t){if(t=EH(t),e instanceof i)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new i(e.raw,t);if(e instanceof Kg)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(yH," "),this.set=this.raw.split("||").map(r=>this.parseRange(r.trim())).filter(r=>r.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let r=this.set[0];if(this.set=this.set.filter(s=>!qR(s[0])),this.set.length===0)this.set=[r];else if(this.set.length>1){for(let s of this.set)if(s.length===1&&CH(s[0])){this.set=[s];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let t=this.set[e];for(let r=0;r<t.length;r++)r>0&&(this.formatted+=" "),this.formatted+=t[r].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let r=((this.options.includePrerelease&&OH)|(this.options.loose&&vH))+":"+e,s=$R.get(r);if(s)return s;let n=this.options.loose,a=n?Xe[Ge.HYPHENRANGELOOSE]:Xe[Ge.HYPHENRANGE];e=e.replace(a,BH(this.options.includePrerelease)),ne("hyphen replace",e),e=e.replace(Xe[Ge.COMPARATORTRIM],_H),ne("comparator trim",e),e=e.replace(Xe[Ge.TILDETRIM],bH),ne("tilde trim",e),e=e.replace(Xe[Ge.CARETTRIM],IH),ne("caret trim",e);let c=e.split(" ").map(f=>RH(f,this.options)).join(" ").split(/\s+/).map(f=>MH(f,this.options));n&&(c=c.filter(f=>(ne("loose invalid filter",f,this.options),!!f.match(Xe[Ge.COMPARATORLOOSE])))),ne("range list",c);let u=new Map,l=c.map(f=>new Kg(f,this.options));for(let f of l){if(qR(f))return[f];u.set(f.value,f)}u.size>1&&u.has("")&&u.delete("");let h=[...u.values()];return $R.set(r,h),h}intersects(e,t){if(!(e instanceof i))throw new TypeError("a Range is required");return this.set.some(r=>VR(r,t)&&e.set.some(s=>VR(s,t)&&r.every(n=>s.every(a=>n.intersects(a,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new wH(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(kH(this.set[t],e,this.options))return!0;return!1}};zR.exports=Jg;var SH=jR(),$R=new SH,EH=Xu(),Kg=Wa(),ne=wa(),wH=Le(),{safeRe:Xe,t:Ge,comparatorTrimReplace:_H,tildeTrimReplace:bH,caretTrimReplace:IH}=pn(),{FLAG_INCLUDE_PRERELEASE:OH,FLAG_LOOSE:vH}=_a(),qR=o(i=>i.value==="<0.0.0-0","isNullSet"),CH=o(i=>i.value==="","isAny"),VR=o((i,e)=>{let t=!0,r=i.slice(),s=r.pop();for(;t&&r.length;)t=r.every(n=>s.intersects(n,e)),s=r.pop();return t},"isSatisfiable"),RH=o((i,e)=>(ne("comp",i,e),i=NH(i,e),ne("caret",i),i=AH(i,e),ne("tildes",i),i=DH(i,e),ne("xrange",i),i=LH(i,e),ne("stars",i),i),"parseComparator"),We=o(i=>!i||i.toLowerCase()==="x"||i==="*","isX"),AH=o((i,e)=>i.trim().split(/\s+/).map(t=>TH(t,e)).join(" "),"replaceTildes"),TH=o((i,e)=>{let t=e.loose?Xe[Ge.TILDELOOSE]:Xe[Ge.TILDE];return i.replace(t,(r,s,n,a,c)=>{ne("tilde",i,r,s,n,a,c);let u;return We(s)?u="":We(n)?u=`>=${s}.0.0 <${+s+1}.0.0-0`:We(a)?u=`>=${s}.${n}.0 <${s}.${+n+1}.0-0`:c?(ne("replaceTilde pr",c),u=`>=${s}.${n}.${a}-${c} <${s}.${+n+1}.0-0`):u=`>=${s}.${n}.${a} <${s}.${+n+1}.0-0`,ne("tilde return",u),u})},"replaceTilde"),NH=o((i,e)=>i.trim().split(/\s+/).map(t=>PH(t,e)).join(" "),"replaceCarets"),PH=o((i,e)=>{ne("caret",i,e);let t=e.loose?Xe[Ge.CARETLOOSE]:Xe[Ge.CARET],r=e.includePrerelease?"-0":"";return i.replace(t,(s,n,a,c,u)=>{ne("caret",i,s,n,a,c,u);let l;return We(n)?l="":We(a)?l=`>=${n}.0.0${r} <${+n+1}.0.0-0`:We(c)?n==="0"?l=`>=${n}.${a}.0${r} <${n}.${+a+1}.0-0`:l=`>=${n}.${a}.0${r} <${+n+1}.0.0-0`:u?(ne("replaceCaret pr",u),n==="0"?a==="0"?l=`>=${n}.${a}.${c}-${u} <${n}.${a}.${+c+1}-0`:l=`>=${n}.${a}.${c}-${u} <${n}.${+a+1}.0-0`:l=`>=${n}.${a}.${c}-${u} <${+n+1}.0.0-0`):(ne("no pr"),n==="0"?a==="0"?l=`>=${n}.${a}.${c}${r} <${n}.${a}.${+c+1}-0`:l=`>=${n}.${a}.${c}${r} <${n}.${+a+1}.0-0`:l=`>=${n}.${a}.${c} <${+n+1}.0.0-0`),ne("caret return",l),l})},"replaceCaret"),DH=o((i,e)=>(ne("replaceXRanges",i,e),i.split(/\s+/).map(t=>xH(t,e)).join(" ")),"replaceXRanges"),xH=o((i,e)=>{i=i.trim();let t=e.loose?Xe[Ge.XRANGELOOSE]:Xe[Ge.XRANGE];return i.replace(t,(r,s,n,a,c,u)=>{ne("xRange",i,r,s,n,a,c,u);let l=We(n),h=l||We(a),f=h||We(c),p=f;return s==="="&&p&&(s=""),u=e.includePrerelease?"-0":"",l?s===">"||s==="<"?r="<0.0.0-0":r="*":s&&p?(h&&(a=0),c=0,s===">"?(s=">=",h?(n=+n+1,a=0,c=0):(a=+a+1,c=0)):s==="<="&&(s="<",h?n=+n+1:a=+a+1),s==="<"&&(u="-0"),r=`${s+n}.${a}.${c}${u}`):h?r=`>=${n}.0.0${u} <${+n+1}.0.0-0`:f&&(r=`>=${n}.${a}.0${u} <${n}.${+a+1}.0-0`),ne("xRange return",r),r})},"replaceXRange"),LH=o((i,e)=>(ne("replaceStars",i,e),i.trim().replace(Xe[Ge.STAR],"")),"replaceStars"),MH=o((i,e)=>(ne("replaceGTE0",i,e),i.trim().replace(Xe[e.includePrerelease?Ge.GTE0PRE:Ge.GTE0],"")),"replaceGTE0"),BH=o(i=>(e,t,r,s,n,a,c,u,l,h,f,p)=>(We(r)?t="":We(s)?t=`>=${r}.0.0${i?"-0":""}`:We(n)?t=`>=${r}.${s}.0${i?"-0":""}`:a?t=`>=${t}`:t=`>=${t}${i?"-0":""}`,We(l)?u="":We(h)?u=`<${+l+1}.0.0-0`:We(f)?u=`<${l}.${+h+1}.0-0`:p?u=`<=${l}.${h}.${f}-${p}`:i?u=`<${l}.${h}.${+f+1}-0`:u=`<=${u}`,`${t} ${u}`.trim()),"hyphenReplace"),kH=o((i,e,t)=>{for(let r=0;r<i.length;r++)if(!i[r].test(e))return!1;if(e.prerelease.length&&!t.includePrerelease){for(let r=0;r<i.length;r++)if(ne(i[r].semver),i[r].semver!==Kg.ANY&&i[r].semver.prerelease.length>0){let s=i[r].semver;if(s.major===e.major&&s.minor===e.minor&&s.patch===e.patch)return!0}return!1}return!0},"testSet")});var Wa=d((Bde,ZR)=>{"use strict";var Ja=Symbol("SemVer ANY"),Xg=class i{static{o(this,"Comparator")}static get ANY(){return Ja}constructor(e,t){if(t=HR(t),e instanceof i){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),Yg("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===Ja?this.value="":this.value=this.operator+this.semver.version,Yg("comp",this)}parse(e){let t=this.options.loose?GR[WR.COMPARATORLOOSE]:GR[WR.COMPARATOR],r=e.match(t);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=r[1]!==void 0?r[1]:"",this.operator==="="&&(this.operator=""),r[2]?this.semver=new JR(r[2],this.options.loose):this.semver=Ja}toString(){return this.value}test(e){if(Yg("Comparator.test",e,this.options.loose),this.semver===Ja||e===Ja)return!0;if(typeof e=="string")try{e=new JR(e,this.options)}catch{return!1}return Zg(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof i))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new KR(e.value,t).test(this.value):e.operator===""?e.value===""?!0:new KR(this.value,t).test(e.semver):(t=HR(t),t.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||Zg(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||Zg(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};ZR.exports=Xg;var HR=Xu(),{safeRe:GR,t:WR}=pn(),Zg=Gg(),Yg=wa(),JR=Le(),KR=Rt()});var In=d((Fde,YR)=>{"use strict";var FH=Rt(),UH=o((i,e,t)=>{try{e=new FH(e,t)}catch{return!1}return e.test(i)},"satisfies");YR.exports=UH});var QR=d((jde,XR)=>{"use strict";var jH=Rt(),$H=o((i,e)=>new jH(i,e).set.map(t=>t.map(r=>r.value).join(" ").trim().split(" ")),"toComparators");XR.exports=$H});var tA=d((qde,eA)=>{"use strict";var qH=Le(),VH=Rt(),zH=o((i,e,t)=>{let r=null,s=null,n=null;try{n=new VH(e,t)}catch{return null}return i.forEach(a=>{n.test(a)&&(!r||s.compare(a)===-1)&&(r=a,s=new qH(r,t))}),r},"maxSatisfying");eA.exports=zH});var rA=d((zde,iA)=>{"use strict";var HH=Le(),GH=Rt(),WH=o((i,e,t)=>{let r=null,s=null,n=null;try{n=new GH(e,t)}catch{return null}return i.forEach(a=>{n.test(a)&&(!r||s.compare(a)===1)&&(r=a,s=new HH(r,t))}),r},"minSatisfying");iA.exports=WH});var oA=d((Gde,nA)=>{"use strict";var Qg=Le(),JH=Rt(),sA=Ga(),KH=o((i,e)=>{i=new JH(i,e);let t=new Qg("0.0.0");if(i.test(t)||(t=new Qg("0.0.0-0"),i.test(t)))return t;t=null;for(let r=0;r<i.set.length;++r){let s=i.set[r],n=null;s.forEach(a=>{let c=new Qg(a.semver.version);switch(a.operator){case">":c.prerelease.length===0?c.patch++:c.prerelease.push(0),c.raw=c.format();case"":case">=":(!n||sA(c,n))&&(n=c);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${a.operator}`)}}),n&&(!t||sA(t,n))&&(t=n)}return t&&i.test(t)?t:null},"minVersion");nA.exports=KH});var ey=d((Jde,aA)=>{"use strict";var ZH=Rt(),YH=o((i,e)=>{try{return new ZH(i,e).range||"*"}catch{return null}},"validRange");aA.exports=YH});var Zl=d((Zde,hA)=>{"use strict";var XH=Le(),lA=Wa(),{ANY:QH}=lA,eG=Rt(),tG=In(),cA=Ga(),uA=Hl(),iG=Wl(),rG=Gl(),sG=o((i,e,t,r)=>{i=new XH(i,r),e=new eG(e,r);let s,n,a,c,u;switch(t){case">":s=cA,n=iG,a=uA,c=">",u=">=";break;case"<":s=uA,n=rG,a=cA,c="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(tG(i,e,r))return!1;for(let l=0;l<e.set.length;++l){let h=e.set[l],f=null,p=null;if(h.forEach(m=>{m.semver===QH&&(m=new lA(">=0.0.0")),f=f||m,p=p||m,s(m.semver,f.semver,r)?f=m:a(m.semver,p.semver,r)&&(p=m)}),f.operator===c||f.operator===u||(!p.operator||p.operator===c)&&n(i,p.semver))return!1;if(p.operator===u&&a(i,p.semver))return!1}return!0},"outside");hA.exports=sG});var dA=d((Xde,fA)=>{"use strict";var nG=Zl(),oG=o((i,e,t)=>nG(i,e,">",t),"gtr");fA.exports=oG});var mA=d((epe,pA)=>{"use strict";var aG=Zl(),cG=o((i,e,t)=>aG(i,e,"<",t),"ltr");pA.exports=cG});var SA=d((ipe,yA)=>{"use strict";var gA=Rt(),uG=o((i,e,t)=>(i=new gA(i,t),e=new gA(e,t),i.intersects(e,t)),"intersects");yA.exports=uG});var wA=d((spe,EA)=>{"use strict";var lG=In(),hG=Ct();EA.exports=(i,e,t)=>{let r=[],s=null,n=null,a=i.sort((h,f)=>hG(h,f,t));for(let h of a)lG(h,e,t)?(n=h,s||(s=h)):(n&&r.push([s,n]),n=null,s=null);s&&r.push([s,null]);let c=[];for(let[h,f]of r)h===f?c.push(h):!f&&h===a[0]?c.push("*"):f?h===a[0]?c.push(`<=${f}`):c.push(`${h} - ${f}`):c.push(`>=${h}`);let u=c.join(" || "),l=typeof e.raw=="string"?e.raw:String(e);return u.length<l.length?u:e}});var CA=d((npe,vA)=>{"use strict";var _A=Rt(),iy=Wa(),{ANY:ty}=iy,Ka=In(),ry=Ct(),fG=o((i,e,t={})=>{if(i===e)return!0;i=new _A(i,t),e=new _A(e,t);let r=!1;e:for(let s of i.set){for(let n of e.set){let a=pG(s,n,t);if(r=r||a!==null,a)continue e}if(r)return!1}return!0},"subset"),dG=[new iy(">=0.0.0-0")],bA=[new iy(">=0.0.0")],pG=o((i,e,t)=>{if(i===e)return!0;if(i.length===1&&i[0].semver===ty){if(e.length===1&&e[0].semver===ty)return!0;t.includePrerelease?i=dG:i=bA}if(e.length===1&&e[0].semver===ty){if(t.includePrerelease)return!0;e=bA}let r=new Set,s,n;for(let m of i)m.operator===">"||m.operator===">="?s=IA(s,m,t):m.operator==="<"||m.operator==="<="?n=OA(n,m,t):r.add(m.semver);if(r.size>1)return null;let a;if(s&&n){if(a=ry(s.semver,n.semver,t),a>0)return null;if(a===0&&(s.operator!==">="||n.operator!=="<="))return null}for(let m of r){if(s&&!Ka(m,String(s),t)||n&&!Ka(m,String(n),t))return null;for(let y of e)if(!Ka(m,String(y),t))return!1;return!0}let c,u,l,h,f=n&&!t.includePrerelease&&n.semver.prerelease.length?n.semver:!1,p=s&&!t.includePrerelease&&s.semver.prerelease.length?s.semver:!1;f&&f.prerelease.length===1&&n.operator==="<"&&f.prerelease[0]===0&&(f=!1);for(let m of e){if(h=h||m.operator===">"||m.operator===">=",l=l||m.operator==="<"||m.operator==="<=",s){if(p&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===p.major&&m.semver.minor===p.minor&&m.semver.patch===p.patch&&(p=!1),m.operator===">"||m.operator===">="){if(c=IA(s,m,t),c===m&&c!==s)return!1}else if(s.operator===">="&&!Ka(s.semver,String(m),t))return!1}if(n){if(f&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===f.major&&m.semver.minor===f.minor&&m.semver.patch===f.patch&&(f=!1),m.operator==="<"||m.operator==="<="){if(u=OA(n,m,t),u===m&&u!==n)return!1}else if(n.operator==="<="&&!Ka(n.semver,String(m),t))return!1}if(!m.operator&&(n||s)&&a!==0)return!1}return!(s&&l&&!n&&a!==0||n&&h&&!s&&a!==0||p||f)},"simpleSubset"),IA=o((i,e,t)=>{if(!i)return e;let r=ry(i.semver,e.semver,t);return r>0?i:r<0||e.operator===">"&&i.operator===">="?e:i},"higherGT"),OA=o((i,e,t)=>{if(!i)return e;let r=ry(i.semver,e.semver,t);return r<0?i:r>0||e.operator==="<"&&i.operator==="<="?e:i},"lowerLT");vA.exports=fG});var Ss=d((ape,TA)=>{"use strict";var sy=pn(),RA=_a(),mG=Le(),AA=Fm(),gG=ls(),yG=jm(),SG=$m(),EG=oR(),wG=uR(),_G=hR(),bG=dR(),IG=mR(),OG=yR(),vG=Ct(),CG=_R(),RG=IR(),AG=zl(),TG=RR(),NG=TR(),PG=Ga(),DG=Hl(),xG=zg(),LG=Hg(),MG=Gl(),BG=Wl(),kG=Gg(),FG=FR(),UG=Wa(),jG=Rt(),$G=In(),qG=QR(),VG=tA(),zG=rA(),HG=oA(),GG=ey(),WG=Zl(),JG=dA(),KG=mA(),ZG=SA(),YG=wA(),XG=CA();TA.exports={parse:gG,valid:yG,clean:SG,inc:EG,diff:wG,major:_G,minor:bG,patch:IG,prerelease:OG,compare:vG,rcompare:CG,compareLoose:RG,compareBuild:AG,sort:TG,rsort:NG,gt:PG,lt:DG,eq:xG,neq:LG,gte:MG,lte:BG,cmp:kG,coerce:FG,Comparator:UG,Range:jG,satisfies:$G,toComparators:qG,maxSatisfying:VG,minSatisfying:zG,minVersion:HG,validRange:GG,outside:WG,gtr:JG,ltr:KG,intersects:ZG,simplifyRange:YG,subset:XG,SemVer:mG,re:sy.re,src:sy.src,tokens:sy.t,SEMVER_SPEC_VERSION:RA.SEMVER_SPEC_VERSION,RELEASE_TYPES:RA.RELEASE_TYPES,compareIdentifiers:AA.compareIdentifiers,rcompareIdentifiers:AA.rcompareIdentifiers}});var DA=d((cpe,PA)=>{var NA=Ss();PA.exports=i=>QG(i.reduce(nW,{versions:{},"dist-tags":{},refs:{},shas:{}}));var QG=o(i=>iW(eW(tW(i))),"finish"),eW=o(i=>(Object.keys(i.refs).forEach(e=>{let t=i.refs[e];i.shas[t.sha]?i.shas[t.sha].push(e):i.shas[t.sha]=[e]}),i),"shaList"),tW=o(i=>(Object.keys(i.refs).filter(e=>e.endsWith("^{}")).forEach(e=>{let t=i.refs[e],r=i.refs[e.replace(/\^\{\}$/,"")];r&&(r.sha=t.sha,delete i.refs[e])}),i),"peelTags"),iW=o(i=>{let e=i.refs.HEAD||{};return Object.keys(i.versions).forEach(r=>{let s=i.versions[r];i.refs.latest&&s.sha===i.refs.latest.sha?i["dist-tags"].latest=r:s.sha===e.sha&&(i["dist-tags"].HEAD=r,i.refs.latest||(i["dist-tags"].latest=r))}),i},"distTags"),rW=o(i=>i.startsWith("refs/tags/")?"tag":i.startsWith("refs/heads/")?"branch":i.startsWith("refs/pull/")?"pull":i==="HEAD"?"head":"other","refType"),sW=o(i=>{let e=i.trim().split(/\s+/,2);if(e.length<2)return null;let t=e[0].trim(),r=e[1].trim(),s=rW(r);if(s==="tag"){let n=r.slice(10);return{sha:t,ref:n,rawRef:r,type:s}}if(s==="branch"){let n=r.slice(11);return{sha:t,ref:n,rawRef:r,type:s}}if(s==="pull"){let n=r.slice(5).replace(/\/head$/,"");return{sha:t,ref:n,rawRef:r,type:s}}return s==="head"?{sha:t,ref:"HEAD",rawRef:r,type:s}:{sha:t,ref:r,rawRef:r,type:s}},"lineToRevDoc"),nW=o((i,e)=>{let t=sW(e);if(!t)return i;if(i.refs[t.ref]=t,i.refs[t.rawRef]=t,t.type==="tag"){let r=!t.ref.endsWith("^{}")&&t.ref.match(/v?(\d+\.\d+\.\d+(?:[-+].+)?)$/);r&&NA.valid(r[1],!0)&&(i.versions[NA.clean(r[1],!0)]=t)}return i},"linesToRevsReducer")});var ny=d((lpe,LA)=>{var oW=Ha(),{LRUCache:aW}=Vg(),cW=DA(),xA=new aW({max:100,ttl:300*1e3});LA.exports=async(i,e={})=>{if(!e.noGitRevCache){let s=xA.get(i);if(s)return s}let{stdout:t}=await oW(["ls-remote",i],e),r=cW(t.trim().split(`
12
+ `));return xA.set(i,r),r}});var BA=d(MA=>{var uW=o(i=>(i.fakePlatform||process.platform)==="win32","isWindows");MA.isWindows=uW});var UA=d((dpe,FA)=>{"use strict";var z=o((...i)=>i.every(e=>e)?i.join(""):"","maybeJoin"),ye=o(i=>i?encodeURIComponent(i):"","maybeEncode"),kA=o(i=>i.toLowerCase().replace(/^\W+/g,"").replace(/(?<!\W)\W+$/,"").replace(/\//g,"").replace(/\W+/g,"-"),"formatHashFragment"),lW={sshtemplate:o(({domain:i,user:e,project:t,committish:r})=>`git@${i}:${e}/${t}.git${z("#",r)}`,"sshtemplate"),sshurltemplate:o(({domain:i,user:e,project:t,committish:r})=>`git+ssh://git@${i}/${e}/${t}.git${z("#",r)}`,"sshurltemplate"),edittemplate:o(({domain:i,user:e,project:t,committish:r,editpath:s,path:n})=>`https://${i}/${e}/${t}${z("/",s,"/",ye(r||"HEAD"),"/",n)}`,"edittemplate"),browsetemplate:o(({domain:i,user:e,project:t,committish:r,treepath:s})=>`https://${i}/${e}/${t}${z("/",s,"/",ye(r))}`,"browsetemplate"),browsetreetemplate:o(({domain:i,user:e,project:t,committish:r,treepath:s,path:n,fragment:a,hashformat:c})=>`https://${i}/${e}/${t}/${s}/${ye(r||"HEAD")}/${n}${z("#",c(a||""))}`,"browsetreetemplate"),browseblobtemplate:o(({domain:i,user:e,project:t,committish:r,blobpath:s,path:n,fragment:a,hashformat:c})=>`https://${i}/${e}/${t}/${s}/${ye(r||"HEAD")}/${n}${z("#",c(a||""))}`,"browseblobtemplate"),docstemplate:o(({domain:i,user:e,project:t,treepath:r,committish:s})=>`https://${i}/${e}/${t}${z("/",r,"/",ye(s))}#readme`,"docstemplate"),httpstemplate:o(({auth:i,domain:e,user:t,project:r,committish:s})=>`git+https://${z(i,"@")}${e}/${t}/${r}.git${z("#",s)}`,"httpstemplate"),filetemplate:o(({domain:i,user:e,project:t,committish:r,path:s})=>`https://${i}/${e}/${t}/raw/${ye(r||"HEAD")}/${s}`,"filetemplate"),shortcuttemplate:o(({type:i,user:e,project:t,committish:r})=>`${i}:${e}/${t}${z("#",r)}`,"shortcuttemplate"),pathtemplate:o(({user:i,project:e,committish:t})=>`${i}/${e}${z("#",t)}`,"pathtemplate"),bugstemplate:o(({domain:i,user:e,project:t})=>`https://${i}/${e}/${t}/issues`,"bugstemplate"),hashformat:kA},_r={};_r.github={protocols:["git:","http:","git+ssh:","git+https:","ssh:","https:"],domain:"github.com",treepath:"tree",blobpath:"blob",editpath:"edit",filetemplate:o(({auth:i,user:e,project:t,committish:r,path:s})=>`https://${z(i,"@")}raw.githubusercontent.com/${e}/${t}/${ye(r||"HEAD")}/${s}`,"filetemplate"),gittemplate:o(({auth:i,domain:e,user:t,project:r,committish:s})=>`git://${z(i,"@")}${e}/${t}/${r}.git${z("#",s)}`,"gittemplate"),tarballtemplate:o(({domain:i,user:e,project:t,committish:r})=>`https://codeload.${i}/${e}/${t}/tar.gz/${ye(r||"HEAD")}`,"tarballtemplate"),extract:o(i=>{let[,e,t,r,s]=i.pathname.split("/",5);if(!(r&&r!=="tree")&&(r||(s=i.hash.slice(1)),t&&t.endsWith(".git")&&(t=t.slice(0,-4)),!(!e||!t)))return{user:e,project:t,committish:s}},"extract")};_r.bitbucket={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"bitbucket.org",treepath:"src",blobpath:"src",editpath:"?mode=edit",edittemplate:o(({domain:i,user:e,project:t,committish:r,treepath:s,path:n,editpath:a})=>`https://${i}/${e}/${t}${z("/",s,"/",ye(r||"HEAD"),"/",n,a)}`,"edittemplate"),tarballtemplate:o(({domain:i,user:e,project:t,committish:r})=>`https://${i}/${e}/${t}/get/${ye(r||"HEAD")}.tar.gz`,"tarballtemplate"),extract:o(i=>{let[,e,t,r]=i.pathname.split("/",4);if(!["get"].includes(r)&&(t&&t.endsWith(".git")&&(t=t.slice(0,-4)),!(!e||!t)))return{user:e,project:t,committish:i.hash.slice(1)}},"extract")};_r.gitlab={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"gitlab.com",treepath:"tree",blobpath:"tree",editpath:"-/edit",httpstemplate:o(({auth:i,domain:e,user:t,project:r,committish:s})=>`git+https://${z(i,"@")}${e}/${t}/${r}.git${z("#",s)}`,"httpstemplate"),tarballtemplate:o(({domain:i,user:e,project:t,committish:r})=>`https://${i}/${e}/${t}/repository/archive.tar.gz?ref=${ye(r||"HEAD")}`,"tarballtemplate"),extract:o(i=>{let e=i.pathname.slice(1);if(e.includes("/-/")||e.includes("/archive.tar.gz"))return;let t=e.split("/"),r=t.pop();r.endsWith(".git")&&(r=r.slice(0,-4));let s=t.join("/");if(!(!s||!r))return{user:s,project:r,committish:i.hash.slice(1)}},"extract")};_r.gist={protocols:["git:","git+ssh:","git+https:","ssh:","https:"],domain:"gist.github.com",editpath:"edit",sshtemplate:o(({domain:i,project:e,committish:t})=>`git@${i}:${e}.git${z("#",t)}`,"sshtemplate"),sshurltemplate:o(({domain:i,project:e,committish:t})=>`git+ssh://git@${i}/${e}.git${z("#",t)}`,"sshurltemplate"),edittemplate:o(({domain:i,user:e,project:t,committish:r,editpath:s})=>`https://${i}/${e}/${t}${z("/",ye(r))}/${s}`,"edittemplate"),browsetemplate:o(({domain:i,project:e,committish:t})=>`https://${i}/${e}${z("/",ye(t))}`,"browsetemplate"),browsetreetemplate:o(({domain:i,project:e,committish:t,path:r,hashformat:s})=>`https://${i}/${e}${z("/",ye(t))}${z("#",s(r))}`,"browsetreetemplate"),browseblobtemplate:o(({domain:i,project:e,committish:t,path:r,hashformat:s})=>`https://${i}/${e}${z("/",ye(t))}${z("#",s(r))}`,"browseblobtemplate"),docstemplate:o(({domain:i,project:e,committish:t})=>`https://${i}/${e}${z("/",ye(t))}`,"docstemplate"),httpstemplate:o(({domain:i,project:e,committish:t})=>`git+https://${i}/${e}.git${z("#",t)}`,"httpstemplate"),filetemplate:o(({user:i,project:e,committish:t,path:r})=>`https://gist.githubusercontent.com/${i}/${e}/raw${z("/",ye(t))}/${r}`,"filetemplate"),shortcuttemplate:o(({type:i,project:e,committish:t})=>`${i}:${e}${z("#",t)}`,"shortcuttemplate"),pathtemplate:o(({project:i,committish:e})=>`${i}${z("#",e)}`,"pathtemplate"),bugstemplate:o(({domain:i,project:e})=>`https://${i}/${e}`,"bugstemplate"),gittemplate:o(({domain:i,project:e,committish:t})=>`git://${i}/${e}.git${z("#",t)}`,"gittemplate"),tarballtemplate:o(({project:i,committish:e})=>`https://codeload.github.com/gist/${i}/tar.gz/${ye(e||"HEAD")}`,"tarballtemplate"),extract:o(i=>{let[,e,t,r]=i.pathname.split("/",4);if(r!=="raw"){if(!t){if(!e)return;t=e,e=null}return t.endsWith(".git")&&(t=t.slice(0,-4)),{user:e,project:t,committish:i.hash.slice(1)}}},"extract"),hashformat:o(function(i){return i&&"file-"+kA(i)},"hashformat")};_r.sourcehut={protocols:["git+ssh:","https:"],domain:"git.sr.ht",treepath:"tree",blobpath:"tree",filetemplate:o(({domain:i,user:e,project:t,committish:r,path:s})=>`https://${i}/${e}/${t}/blob/${ye(r)||"HEAD"}/${s}`,"filetemplate"),httpstemplate:o(({domain:i,user:e,project:t,committish:r})=>`https://${i}/${e}/${t}.git${z("#",r)}`,"httpstemplate"),tarballtemplate:o(({domain:i,user:e,project:t,committish:r})=>`https://${i}/${e}/${t}/archive/${ye(r)||"HEAD"}.tar.gz`,"tarballtemplate"),bugstemplate:o(()=>null,"bugstemplate"),extract:o(i=>{let[,e,t,r]=i.pathname.split("/",4);if(!["archive"].includes(r)&&(t&&t.endsWith(".git")&&(t=t.slice(0,-4)),!(!e||!t)))return{user:e,project:t,committish:i.hash.slice(1)}},"extract")};for(let[i,e]of Object.entries(_r))_r[i]=Object.assign({},lW,e);FA.exports=_r});var ay=d((mpe,$A)=>{var hW=require("url"),oy=o((i,e,t)=>{let r=i.indexOf(t);return i.lastIndexOf(e,r>-1?r:1/0)},"lastIndexOfBefore"),jA=o(i=>{try{return new hW.URL(i)}catch{}},"safeUrl"),fW=o((i,e)=>{let t=i.indexOf(":"),r=i.slice(0,t+1);if(Object.prototype.hasOwnProperty.call(e,r))return i;let s=i.indexOf("@");return s>-1?s>t?`git+ssh://${i}`:i:i.indexOf("//")===t+1?i:`${i.slice(0,t+1)}//${i.slice(t+1)}`},"correctProtocol"),dW=o(i=>{let e=oy(i,"@","#"),t=oy(i,":","#");return t>e&&(i=i.slice(0,t)+"/"+i.slice(t+1)),oy(i,":","#")===-1&&i.indexOf("//")===-1&&(i=`git+ssh://${i}`),i},"correctUrl");$A.exports=(i,e)=>{let t=e?fW(i,e):i;return jA(t)||jA(dW(t))}});var VA=d((ype,qA)=>{"use strict";var pW=ay(),mW=o(i=>{let e=i.indexOf("#"),t=i.indexOf("/"),r=i.indexOf("/",t+1),s=i.indexOf(":"),n=/\s/.exec(i),a=i.indexOf("@"),c=!n||e>-1&&n.index>e,u=a===-1||e>-1&&a>e,l=s===-1||e>-1&&s>e,h=r===-1||e>-1&&r>e,f=t>0,p=e>-1?i[e-1]!=="/":!i.endsWith("/"),m=!i.startsWith(".");return c&&f&&p&&m&&u&&l&&h},"isGitHubShorthand");qA.exports=(i,e,{gitHosts:t,protocols:r})=>{if(!i)return;let s=mW(i)?`github:${i}`:i,n=pW(s,r);if(!n)return;let a=t.byShortcut[n.protocol],c=t.byDomain[n.hostname.startsWith("www.")?n.hostname.slice(4):n.hostname],u=a||c;if(!u)return;let l=t[a||c],h=null;r[n.protocol]?.auth&&(n.username||n.password)&&(h=`${n.username}${n.password?":"+n.password:""}`);let f=null,p=null,m=null,y=null;try{if(a){let g=n.pathname.startsWith("/")?n.pathname.slice(1):n.pathname,S=g.indexOf("@");S>-1&&(g=g.slice(S+1));let E=g.lastIndexOf("/");E>-1?(p=decodeURIComponent(g.slice(0,E)),p||(p=null),m=decodeURIComponent(g.slice(E+1))):m=decodeURIComponent(g),m.endsWith(".git")&&(m=m.slice(0,-4)),n.hash&&(f=decodeURIComponent(n.hash.slice(1))),y="shortcut"}else{if(!l.protocols.includes(n.protocol))return;let g=l.extract(n);if(!g)return;p=g.user&&decodeURIComponent(g.user),m=decodeURIComponent(g.project),f=decodeURIComponent(g.committish),y=r[n.protocol]?.name||n.protocol.slice(0,-1)}}catch(g){if(g instanceof URIError)return;throw g}return[u,p,h,m,f,y,e]}});var HA=d((Epe,zA)=>{"use strict";var{LRUCache:gW}=Vg(),yW=UA(),SW=VA(),EW=ay(),cy=new gW({max:1e3});function wW(i){try{let{protocol:e,hostname:t,pathname:r}=new URL(i);if(!t)return null;let s=/(?:git\+)http:$/.test(e)?"http:":"https:",n=r.replace(/\.git$/,"");return`${s}//${t}${n}`}catch{return null}}o(wW,"unknownHostedUrl");var Yl=class i{static{o(this,"GitHost")}constructor(e,t,r,s,n,a,c={}){Object.assign(this,i.#e[e],{type:e,user:t,auth:r,project:s,committish:n,default:a,opts:c})}static#e={byShortcut:{},byDomain:{}};static#t={"git+ssh:":{name:"sshurl"},"ssh:":{name:"sshurl"},"git+https:":{name:"https",auth:!0},"git:":{auth:!0},"http:":{auth:!0},"https:":{auth:!0},"git+http:":{auth:!0}};static addHost(e,t){i.#e[e]=t,i.#e.byDomain[t.domain]=e,i.#e.byShortcut[`${e}:`]=e,i.#t[`${e}:`]={name:e}}static fromUrl(e,t){if(typeof e!="string")return;let r=e+JSON.stringify(t||{});if(!cy.has(r)){let s=SW(e,t,{gitHosts:i.#e,protocols:i.#t});cy.set(r,s?new i(...s):void 0)}return cy.get(r)}static fromManifest(e,t={}){if(!e||typeof e!="object")return;let r=e.repository,s=r&&(typeof r=="string"?r:typeof r=="object"&&typeof r.url=="string"?r.url:null);if(!s)throw new Error("no repository");let n=s&&i.fromUrl(s.replace(/^git\+/,""),t)||null;if(n)return n;let a=wW(s);return i.fromUrl(a,t)||a}static parseUrl(e){return EW(e)}#i(e,t){if(typeof e!="function")return null;let r={...this,...this.opts,...t};r.path||(r.path=""),r.path.startsWith("/")&&(r.path=r.path.slice(1)),r.noCommittish&&(r.committish=null);let s=e(r);return r.noGitPlus&&s.startsWith("git+")?s.slice(4):s}hash(){return this.committish?`#${this.committish}`:""}ssh(e){return this.#i(this.sshtemplate,e)}sshurl(e){return this.#i(this.sshurltemplate,e)}browse(e,...t){return typeof e!="string"?this.#i(this.browsetemplate,e):typeof t[0]!="string"?this.#i(this.browsetreetemplate,{...t[0],path:e}):this.#i(this.browsetreetemplate,{...t[1],fragment:t[0],path:e})}browseFile(e,...t){return typeof t[0]!="string"?this.#i(this.browseblobtemplate,{...t[0],path:e}):this.#i(this.browseblobtemplate,{...t[1],fragment:t[0],path:e})}docs(e){return this.#i(this.docstemplate,e)}bugs(e){return this.#i(this.bugstemplate,e)}https(e){return this.#i(this.httpstemplate,e)}git(e){return this.#i(this.gittemplate,e)}shortcut(e){return this.#i(this.shortcuttemplate,e)}path(e){return this.#i(this.pathtemplate,e)}tarball(e){return this.#i(this.tarballtemplate,{...e,noCommittish:!1})}file(e,t){return this.#i(this.filetemplate,{...t,path:e})}edit(e,t){return this.#i(this.edittemplate,{...t,path:e})}getDefaultRepresentation(){return this.default}toString(e){return this.default&&typeof this[this.default]=="function"?this[this.default](e):this.sshurl(e)}};for(let[i,e]of Object.entries(yW))Yl.addHost(i,e);zA.exports=Yl});var uy=d((_pe,GA)=>{"use strict";var{builtinModules:_W}=require("module"),bW=new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$"),IW=["node_modules","favicon.ico"];function OW(i){var e=[],t=[];if(i===null)return t.push("name cannot be null"),Za(e,t);if(i===void 0)return t.push("name cannot be undefined"),Za(e,t);if(typeof i!="string")return t.push("name must be a string"),Za(e,t);if(i.length||t.push("name length must be greater than zero"),i.startsWith(".")&&t.push("name cannot start with a period"),i.match(/^_/)&&t.push("name cannot start with an underscore"),i.trim()!==i&&t.push("name cannot contain leading or trailing spaces"),IW.forEach(function(a){i.toLowerCase()===a&&t.push(a+" is not a valid package name")}),_W.includes(i.toLowerCase())&&e.push(i+" is a core module name"),i.length>214&&e.push("name can no longer contain more than 214 characters"),i.toLowerCase()!==i&&e.push("name can no longer contain capital letters"),/[~'!()*]/.test(i.split("/").slice(-1)[0])&&e.push(`name can no longer contain special characters ("~'!()*")`),encodeURIComponent(i)!==i){var r=i.match(bW);if(r){var s=r[1],n=r[2];if(n.startsWith(".")&&t.push("name cannot start with a period"),encodeURIComponent(s)===s&&encodeURIComponent(n)===n)return Za(e,t)}t.push("name can only contain URL-friendly characters")}return Za(e,t)}o(OW,"validate");var Za=o(function(i,e){var t={validForNewPackages:e.length===0&&i.length===0,validForOldPackages:e.length===0,warnings:i,errors:e};return t.warnings.length||delete t.warnings,t.errors.length||delete t.errors,t},"done");GA.exports=OW});var tT=d((Ipe,ec)=>{"use strict";var Qa=process.platform==="win32",{URL:ly}=require("node:url"),On=Qa?require("node:path/win32"):require("node:path"),{homedir:vW}=require("node:os"),CW=HA(),WA=Ss(),YA=uy(),{log:RW}=_t(),XA=Qa?/\\|[/]/:/[/]/,QA=/^(?:git[+])?[a-z]+:/i,AW=/^[^@]+@[^:.]+\.[^:]+:.+$/i,fy=/[.](?:tgz|tar.gz|tar)$/i,TW=/:[0-9]+(\/|$)/i,NW=/^(?:[.]|~[/]|[/\\]|[a-zA-Z]:)/,PW=/^(?:[.]|~[/]|[/]|[a-zA-Z]:)/,JA="https://registry.npmjs.org";function Ya(i,e){let t,r;if(typeof i=="object")return i instanceof Xa&&(!e||e===i.where)?i:i.name&&i.rawSpec?Ya.resolve(i.name,i.rawSpec,e||i.where):Ya(i.raw,e||i.where);let s=i.indexOf("@",1),n=s>0?i.slice(0,s):i;return QA.test(i)?r=i:AW.test(i)?r=`git+ssh://${i}`:!n.startsWith("@")&&(XA.test(n)||fy.test(n))?r=i:s>0?(t=n,r=i.slice(s+1)||"*"):YA(i).validForOldPackages?(t=i,r="*"):r=i,eT(t,r,e,i)}o(Ya,"npa");function DW(i){return i?i.toLowerCase().startsWith("file:")?!0:Qa?NW.test(i):PW.test(i):!1}o(DW,"isFileSpec");function xW(i){return i?i.toLowerCase().startsWith("npm:"):!1}o(xW,"isAliasSpec");function eT(i,e,t,r){let s=new Xa({raw:r,name:i,rawSpec:e,fromArgument:r!=null});if(i&&(s.name=i),t||(t=process.cwd()),DW(e))return ZA(s,t);if(xW(e))return qW(s,t);let n=CW.fromUrl(e,{noGitPlus:!0,noCommittish:!0});return n?UW(s,n):e&&QA.test(e)?$W(s):e&&(XA.test(e)||fy.test(e))?ZA(s,t):VW(s)}o(eT,"resolve");function LW(i,e=JA){let t=Ya(i);if(t.type!=="version")throw kW(t.type,t.raw);let r="pkg:npm/"+t.name.replace(/^@/,"%40")+"@"+t.rawSpec;return e!==JA&&(r+="?repository_url="+e),r}o(LW,"toPurl");function MW(i,e,t){let r=new Error(`Invalid package name "${i}" of package "${t}": ${e.errors.join("; ")}.`);return r.code="EINVALIDPACKAGENAME",r}o(MW,"invalidPackageName");function BW(i,e){let t=new Error(`Invalid tag name "${i}" of package "${e}": Tags may not have any characters that encodeURIComponent encodes.`);return t.code="EINVALIDTAGNAME",t}o(BW,"invalidTagName");function kW(i,e){let t=new Error(`Invalid type "${i}" of package "${e}": Purl can only be generated for "version" types.`);return t.code="EINVALIDPURLTYPE",t}o(kW,"invalidPurlType");var Xa=class{static{o(this,"Result")}constructor(e){this.type=e.type,this.registry=e.registry,this.where=e.where,e.raw==null?this.raw=e.name?`${e.name}@${e.rawSpec}`:e.rawSpec:this.raw=e.raw,this.name=void 0,this.escapedName=void 0,this.scope=void 0,this.rawSpec=e.rawSpec||"",this.saveSpec=e.saveSpec,this.fetchSpec=e.fetchSpec,e.name&&this.setName(e.name),this.gitRange=e.gitRange,this.gitCommittish=e.gitCommittish,this.gitSubdir=e.gitSubdir,this.hosted=e.hosted}setName(e){let t=YA(e);if(!t.validForOldPackages)throw MW(e,t,this.raw);return this.name=e,this.scope=e[0]==="@"?e.slice(0,e.indexOf("/")):void 0,this.escapedName=e.replace("/","%2f"),this}toString(){let e=[];this.name!=null&&this.name!==""&&e.push(this.name);let t=this.saveSpec||this.fetchSpec||this.rawSpec;return t!=null&&t!==""&&e.push(t),e.length?e.join("@"):this.raw}toJSON(){let e=Object.assign({},this);return delete e.hosted,e}};function hy(i,e){if(!e){i.gitCommittish=null;return}for(let t of e.split("::")){if(!t.includes(":")){if(i.gitRange)throw new Error("cannot override existing semver range with a committish");if(i.gitCommittish)throw new Error("cannot override existing committish with a second committish");i.gitCommittish=t;continue}let[r,s]=t.split(":");if(r==="semver"){if(i.gitCommittish)throw new Error("cannot override existing committish with a semver range");if(i.gitRange)throw new Error("cannot override existing semver range with a second semver range");i.gitRange=decodeURIComponent(s);continue}if(r==="path"){if(i.gitSubdir)throw new Error("cannot override existing path with a second path");i.gitSubdir=`/${s}`;continue}RW.warn("npm-package-arg",`ignoring unknown key "${r}"`)}}o(hy,"setGitAttrs");var FW=new Map([["\0","%00"],[" ","%09"],[`
13
+ `,"%0A"],["\r","%0D"],[" ","%20"],['"',"%22"],["#","%23"],["%","%25"],["?","%3F"],["[","%5B"],["\\",Qa?"/":"%5C"],["]","%5D"],["^","%5E"],["|","%7C"],["~","%7E"]]);function KA(i){let e="";for(let t=0;t<i.length;t++)e=`${e}${FW.get(i[t])??i[t]}`;return e.startsWith("file:")?e:`file:${e}`}o(KA,"pathToFileURL");function ZA(i,e){i.type=fy.test(i.rawSpec)?"file":"directory",i.where=e;let t=KA(i.rawSpec);t.startsWith("file:/")&&(/^file:\/\/[^/]/.test(t)&&(t=`file:/${t.slice(5)}`),/^\/{1,3}\.\.?(\/|$)/.test(t.slice(5))&&(t=t.replace(/^file:\/{1,3}/,"file:")));let r,s;try{r=new ly(t,`${KA(On.resolve(e))}/`),s=new ly(t)}catch(c){let u=new Error("Invalid file: URL, must comply with RFC 8089");throw Object.assign(u,{raw:i.rawSpec,spec:i,where:e,originalError:c})}let n=decodeURIComponent(s.pathname),a=decodeURIComponent(r.pathname);return Qa&&(n=n.replace(/^\/+([a-z]:\/)/i,"$1"),a=a.replace(/^\/+([a-z]:\/)/i,"$1")),/^\/~(\/|$)/.test(n)?(i.saveSpec=`file:${n.substr(1)}`,a=On.resolve(vW(),n.substr(3))):On.isAbsolute(t.slice(5))?i.saveSpec=`file:${On.resolve(a)}`:i.saveSpec=`file:${On.relative(e,a)}`,i.fetchSpec=On.resolve(e,a),i.saveSpec=i.saveSpec.split("\\").join("/"),i.saveSpec.startsWith("file://")&&(i.saveSpec=`file:/${i.saveSpec.slice(7)}`),i}o(ZA,"fromFile");function UW(i,e){return i.type="git",i.hosted=e,i.saveSpec=e.toString({noGitPlus:!1,noCommittish:!1}),i.fetchSpec=e.getDefaultRepresentation()==="shortcut"?null:e.toString(),hy(i,e.committish),i}o(UW,"fromHostedGit");function jW(i,e){let t=new Error(`Unsupported URL Type "${i}": ${e}`);return t.code="EUNSUPPORTEDPROTOCOL",t}o(jW,"unsupportedURLType");function $W(i){let e=i.rawSpec;if(i.saveSpec=e,e.startsWith("git+ssh:")){let r=e.match(/^git\+ssh:\/\/([^:#]+:[^#]+(?:\.git)?)(?:#(.*))?$/i);if(r&&!r[1].match(TW))return i.type="git",hy(i,r[2]),i.fetchSpec=r[1],i}else e.startsWith("git+file://")&&(e=e.replace(/\\/g,"/"));let t=new ly(e);switch(t.protocol){case"git:":case"git+http:":case"git+https:":case"git+rsync:":case"git+ftp:":case"git+file:":case"git+ssh:":i.type="git",hy(i,t.hash.slice(1)),t.protocol==="git+file:"&&/^git\+file:\/\/[a-z]:/i.test(e)?i.fetchSpec=`git+file://${t.host.toLowerCase()}:${t.pathname}`:(t.hash="",i.fetchSpec=t.toString()),i.fetchSpec.startsWith("git+")&&(i.fetchSpec=i.fetchSpec.slice(4));break;case"http:":case"https:":i.type="remote",i.fetchSpec=i.saveSpec;break;default:throw jW(t.protocol,e)}return i}o($W,"fromURL");function qW(i,e){let t=Ya(i.rawSpec.substr(4),e);if(t.type==="alias")throw new Error("nested aliases not supported");if(!t.registry)throw new Error("aliases only work for registry deps");if(!t.name)throw new Error("aliases must have a name");return i.subSpec=t,i.registry=!0,i.type="alias",i.saveSpec=null,i.fetchSpec=null,i}o(qW,"fromAlias");function VW(i){i.registry=!0;let e=i.rawSpec.trim();i.saveSpec=null,i.fetchSpec=e;let t=WA.valid(e,!0),r=WA.validRange(e,!0);if(t)i.type="version";else if(r)i.type="range";else{if(encodeURIComponent(e)!==e)throw BW(e,i.raw);i.type="tag"}return i}o(VW,"fromRegistry");ec.exports=Ya;ec.exports.resolve=eT;ec.exports.toPurl=LW;ec.exports.Result=Xa});var oT=d((vpe,nT)=>{var Es=require("node:process"),zW=require("node:os"),HW=require("node:fs");function GW(i){return i.includes("libc.musl-")||i.includes("ld-musl-")}o(GW,"isMusl");function iT(){return Es.platform}o(iT,"os");function rT(){return Es.arch}o(rT,"cpu");var WW="/usr/bin/ldd";function JW(){try{let i=HW.readFileSync(WW,"utf-8");return i.includes("musl")?"musl":i.includes("GNU C Library")?"glibc":null}catch{return}}o(JW,"getFamilyFromFilesystem");function KW(){let i=Es.report.excludeNetwork;Es.report.excludeNetwork=!0;let e=Es.report.getReport();return Es.report.excludeNetwork=i,e.header?.glibcVersionRuntime?Vi="glibc":Array.isArray(e.sharedObjects)&&e.sharedObjects.some(GW)?Vi="musl":Vi=null,Vi}o(KW,"getFamilyFromReport");var Vi;function sT(i){if(i==="linux")return Vi===void 0&&(Vi=JW(),Vi===void 0&&(Vi=KW())),Vi}o(sT,"libc");function ZW(i={}){let e=i.os||iT();return{cpu:{name:i.cpu||rT()},libc:{name:i.libc||sT(e)},os:{name:e,version:i.osVersion||zW.release()},packageManager:{name:"npm",version:i.npmVersion},runtime:{name:"node",version:i.nodeVersion||Es.version}}}o(ZW,"devEngines");nT.exports={cpu:rT,libc:sT,os:iT,devEngines:ZW}});var cT=d((Rpe,aT)=>{var YW=In(),XW=ey(),QW=["ignore","warn","error","download"],e3=["name","version","onFail"],t3=["packageManager","runtime","cpu","libc","os"];function i3(i,e,t){let{engine:r}=t;if(typeof i!="object"||i===null||Array.isArray(i))throw new Error(`Invalid non-object value for "${r}"`);let s=Object.keys(i);for(let n of s)if(!e3.includes(n))throw new Error(`Invalid property "${n}" for "${r}"`);if(!s.includes("name"))throw new Error(`Missing "name" property for "${r}"`);if(typeof i.name!="string")throw new Error(`Invalid non-string value for "name" within "${r}"`);if(typeof e.name!="string"||e.name==="")throw new Error(`Unable to determine "name" for "${r}"`);if(s.includes("onFail")){if(typeof i.onFail!="string")throw new Error(`Invalid non-string value for "onFail" within "${r}"`);if(!QW.includes(i.onFail))throw new Error(`Invalid onFail value "${i.onFail}" for "${r}"`)}if(i.name!==e.name)return new Error(`Invalid name "${i.name}" does not match "${e.name}" for "${r}"`);if(s.includes("version")){if(typeof i.version!="string")throw new Error(`Invalid non-string value for "version" within "${r}"`);if(typeof e.version!="string"||e.version==="")throw new Error(`Unable to determine "version" for "${r}" "${i.name}"`);if(XW(i.version)){if(!YW(e.version,i.version,t.semver))return new Error(`Invalid semver version "${i.version}" does not match "${e.version}" for "${r}"`)}else if(i.version!==e.version)return new Error(`Invalid version "${i.version}" does not match "${e.version}" for "${r}"`)}}o(i3,"checkDependency");function r3(i,e={},t={}){if(typeof i!="object"||i===null||Array.isArray(i))throw new Error('Invalid non-object value for "devEngines"');let r=[];for(let s of Object.keys(i)){if(!t3.includes(s))throw new Error(`Invalid property "devEngines.${s}"`);let n=i[s],a=[n].flat(),c=e[s]||{};if(a.length===0)continue;let u=[];for(let h of a){let f=i3(h,c,{...t,engine:s});f&&u.push(f)}if(u.length===a.length){let f=a[a.length-1].onFail||"error";f==="download"&&(f="error");let p=Object.assign(new Error(`Invalid devEngines.${s}`),{errors:u,engine:s,isWarn:f==="warn",isError:f==="error",current:c,required:n});r.push(p)}}return r}o(r3,"checkDevEngines");aT.exports={checkDevEngines:r3}});var hT=d((Tpe,lT)=>{var uT=Ss(),Xl=oT(),{checkDevEngines:s3}=cT(),n3=o((i,e,t,r=!1)=>{let s=r?null:t,n=i.engines,a={includePrerelease:!0};if(!n)return;let c=s&&n.node&&!uT.satisfies(s,n.node,a),u=e&&n.npm&&!uT.satisfies(e,n.npm,a);if(c||u)throw Object.assign(new Error("Unsupported engine"),{pkgid:i._id,current:{node:t,npm:e},required:n,code:"EBADENGINE"})},"checkEngine"),o3=o((i,e=!1,t={})=>{if(e)return;let r=t.os||Xl.os(),s=t.cpu||Xl.cpu(),n=t.libc||Xl.libc(r),a=i.os?dy(r,i.os):!0,c=i.cpu?dy(s,i.cpu):!0,u=i.libc?dy(n,i.libc):!0;if(i.libc&&!n&&(u=!1),!a||!c||!u)throw Object.assign(new Error("Unsupported platform"),{pkgid:i._id,current:{os:r,cpu:s,libc:n},required:{os:i.os,cpu:i.cpu,libc:i.libc},code:"EBADPLATFORM"})},"checkPlatform"),dy=o((i,e)=>{if(typeof e=="string"&&(e=[e]),e.length===1&&e[0]==="any")return!0;let t=0,r=!1;for(let s of e){let n=s.charAt(0)==="!",a=n?s.slice(1):s;if(n){if(t++,i===a)return!1}else r=r||i===a}return r||t===e.length},"checkList");lT.exports={checkEngine:n3,checkPlatform:o3,checkDevEngines:s3,currentEnv:Xl}});var Ql=d((Ppe,pT)=>{var{join:fT,basename:dT}=require("path"),a3=o(i=>i.bin?typeof i.bin=="string"?c3(i):Array.isArray(i.bin)?u3(i):typeof i.bin=="object"?my(i):py(i):py(i),"normalize"),c3=o(i=>i.name?(i.bin={[i.name]:i.bin},my(i)):py(i),"normalizeString"),u3=o(i=>(i.bin=i.bin.reduce((e,t)=>(e[dT(t)]=t,e),{}),my(i)),"normalizeArray"),py=o(i=>(delete i.bin,i),"removeBin"),my=o(i=>{let e=i.bin,t={},r=!1;return Object.keys(e).forEach(s=>{let n=fT("/",dT(s.replace(/\\|:/g,"/"))).slice(1);if(typeof e[s]!="string"||!n)return;let a=fT("/",e[s].replace(/\\/g,"/")).replace(/\\/g,"/").slice(1);a&&(t[n]=a,r=!0)}),r?i.bin=t:delete i.bin,i},"normalizeObject");pT.exports=a3});var ih=d((xpe,gT)=>{"use strict";var mT=tT(),tc=Ss(),{checkEngine:l3}=hT(),h3=Ql(),gy=o((i,e,t)=>{try{return l3(i,e,t),!0}catch{return!1}},"engineOk"),eh=o((i,e,t)=>!i||!i[e]||Date.parse(i[e])<=t,"isBefore"),f3={includePrerelease:!0,loose:!0},th=o((i,e)=>e&&tc.satisfies(i,e,f3),"shouldAvoid"),yy=o((i,e)=>i&&th(i.version,e)?{...i,_shouldAvoid:!0}:i,"decorateAvoid"),ic=o((i,e,t)=>{let{defaultTag:r="latest",before:s=null,nodeVersion:n=process.version,npmVersion:a=null,includeStaged:c=!1,avoid:u=null,avoidStrict:l=!1}=t,{name:h,time:f}=i,p=i.versions||{};if(l){let P={...t,avoidStrict:!1},U=ic(i,e,P);if(!U||!U._shouldAvoid)return U;let ee=ic(i,`^${U.version}`,P);if(!ee||!ee._shouldAvoid)return{...ee,_outsideDependencyRange:!0,_isSemVerMajor:!1};let ni=ic(i,"*",P);if(!ni||!ni._shouldAvoid)return{...ni,_outsideDependencyRange:!0,_isSemVerMajor:!0};throw Object.assign(new Error(`No avoidable versions for ${h}`),{code:"ETARGET",name:h,wanted:e,avoid:u,before:s,versions:Object.keys(p)})}let m=c&&i.stagedVersions&&i.stagedVersions.versions||{},y=i.policyRestrictions&&i.policyRestrictions.versions||{},g=s&&f?+new Date(s):1/0,E=mT.resolve(h,e||r).type,_=i["dist-tags"]||{};if(E!=="tag"&&E!=="version"&&E!=="range")throw new Error("Only tag, version, and range are supported");if(e&&E==="tag"){let P=_[e];return eh(f,P,g)?yy(p[P]||m[P]||y[P],u):ic(i,`<=${P}`,t)}if(e&&E==="version"){let P=tc.clean(e,{loose:!0}),U=p[P]||m[P]||y[P];return eh(f,P,g)?yy(U,u):null}let b=E==="range"?e:"*",w=_[r];if(w&&(b==="*"||tc.satisfies(w,b,{loose:!0}))&&!y[w]&&!th(w,u)){let P=p[w];if(P&&eh(f,w,g)&&gy(P,a,n)&&!P.deprecated&&!m[w])return P}let I=Object.entries(p).concat(Object.entries(m)).concat(Object.entries(y)).filter(([P])=>eh(f,P,g));if(!I.length)throw Object.assign(new Error(`No versions available for ${h}`),{code:"ENOVERSIONS",name:h,type:E,wanted:e,before:s,versions:Object.keys(p)});let v={loose:!0},N=I.filter(([P])=>tc.satisfies(P,b,{loose:!0})).sort((P,U)=>{let[ee,ni]=P,[us,ma]=U,Vu=!th(ee,u),zu=!th(us,u),Hu=!y[ee],Gu=!y[us],Wu=!m[ee],Ju=!m[us],ga=!ni.deprecated,ya=!ma.deprecated,Sa=gy(ni,a,n),Ea=gy(ma,a,n);return zu-Vu||Gu-Hu||Ju-Wu||(ya&&Ea)-(ga&&Sa)||Ea-Sa||ya-ga||tc.rcompare(ee,us,v)});return yy(N[0]&&N[0][1],u)},"pickManifest");gT.exports=(i,e,t={})=>{let r=ic(i,e,t),s=r&&h3(r),n=i.policyRestrictions,a=n&&n.versions||{};if(s&&!a[s.version])return s;let{before:c=null,defaultTag:u="latest"}=t,l=c?new Date(c).toLocaleString():"",{name:h}=i,f=`${h}@${e}`+(c?` with a date before ${l}`:""),p=s&&!!a[s.version],m=p?n.message:"",y=p?`Could not download ${f} due to policy violations:
14
+ ${m}`:`No matching version found for ${f}.`,g=p?"E403":"ETARGET";throw Object.assign(new Error(y),{code:g,type:mT.resolve(i.name,e).type,wanted:e,versions:Object.keys(i.versions??{}),name:h,distTags:i["dist-tags"],defaultTag:u})}});var wT=d((Mpe,ET)=>{var d3=new Set(["github.com","gist.github.com","gitlab.com","bitbucket.com","bitbucket.org"]),{parse:p3}=require("url"),yT=require("path"),m3=ny(),rc=Ha(),{isWindows:rh}=BA(),g3=ih(),Sy=require("fs/promises");ET.exports=(i,e="HEAD",t=null,r={})=>m3(i,r).then(s=>S3(i,s,e,E3(s,e,r),t||y3(i,r.cwd),r));var Ey=o((i,e)=>e.gitShallow===!1||e.gitShallow?e.gitShallow:d3.has(p3(i).host),"maybeShallow"),y3=o((i,e=process.cwd())=>yT.resolve(e,yT.basename(i.replace(/[/\\]?\.git$/,""))),"defaultTarget"),S3=o((i,e,t,r,s,n)=>r?r.sha===e.refs.HEAD.sha?b3(i,r,s,n):r.type==="tag"||r.type==="branch"?_3(i,r,s,n):w3(i,r,s,n):I3(i,t,s,n),"clone"),E3=o((i,e,t)=>{let{spec:r={}}=t;return e=r.gitCommittish||e,i?r.gitRange?g3(i,r.gitRange,t):e?i.refs[e]?i.refs[e]:i.shas[e]?i.refs[i.shas[e][0]]:null:i.refs.HEAD:null},"resolveRef"),w3=o((i,e,t,r)=>{let s=Ey(i,r),n=["fetch","origin",e.rawRef].concat(s?["--depth=1"]:[]),a=o(c=>rc(c,{...r,cwd:t}),"git");return Sy.mkdir(t,{recursive:!0}).then(()=>a(["init"])).then(()=>rh(r)?a(["config","--local","--add","core.longpaths","true"]):null).then(()=>a(["remote","add","origin",i])).then(()=>a(n)).then(()=>a(["checkout",e.sha])).then(()=>ST(t,r)).then(()=>e.sha)},"other"),_3=o((i,e,t,r)=>{let s=["clone","-b",e.ref,i,t,"--recurse-submodules"];return Ey(i,r)&&s.push("--depth=1"),rh(r)&&s.push("--config","core.longpaths=true"),rc(s,r).then(()=>e.sha)},"branch"),b3=o((i,e,t,r)=>{let s=["clone",i,t,"--recurse-submodules"];return Ey(i,r)&&s.push("--depth=1"),rh(r)&&s.push("--config","core.longpaths=true"),rc(s,r).then(()=>e.sha)},"plain"),ST=o(async(i,e)=>await Sy.stat(`${i}/.gitmodules`).then(()=>!0).catch(()=>!1)?rc(["submodule","update","-q","--init","--recursive"],{...e,cwd:i}):null,"updateSubmodules"),I3=o((i,e,t,r)=>{let s=rh(r)?["--config","core.longpaths=true"]:[],n=["clone","--mirror","-q",i,t+"/.git"],a=o(c=>rc(c,{...r,cwd:t}),"git");return Sy.mkdir(t,{recursive:!0}).then(()=>a(n.concat(s))).then(()=>a(["init"])).then(()=>a(["checkout",e])).then(()=>ST(t,r)).then(()=>a(["rev-parse","--revs-only","HEAD"])).then(({stdout:c})=>c.trim())},"unresolved")});var wy=d((kpe,_T)=>{var{stat:O3}=require("fs/promises");_T.exports=({cwd:i=process.cwd()}={})=>O3(i+"/.git").then(()=>!0,()=>!1)});var IT=d((Fpe,bT)=>{var v3=wy(),{dirname:C3}=require("path");bT.exports=async({cwd:i=process.cwd(),root:e}={})=>{for(;;){if(await v3({cwd:i}))return i;let t=C3(i);if(i===e||i===t)return null;i=t}}});var vT=d((Upe,OT)=>{var R3=Ha();OT.exports=(i={})=>R3(["status","--porcelain=v1","-uno"],i).then(e=>!e.stdout.trim().split(/\r?\n+/).map(t=>t.trim()).filter(t=>t).length)});var _y=d((jpe,CT)=>{CT.exports={clone:wT(),revs:ny(),spawn:Ha(),is:wy(),find:IT(),isClean:vT(),errors:Mg()}});var DT=d(($pe,PT)=>{var A3=jm(),T3=$m(),br=require("node:fs/promises"),oe=require("node:path"),{log:TT}=_t(),N3=require("node:module"),by;function RT(){return by||(by=ol()),by}o(RT,"lazyHostedGitInfo");var Iy;function sh(){return Iy||(Iy=Ig().glob),Iy}o(sh,"lazyLoadGlob");function P3(i,e){if(i.bin&&(typeof i.bin=="string"&&i.name?(e?.push('"bin" was converted to an object'),i.bin={[i.name]:i.bin}):Array.isArray(i.bin)&&(e?.push('"bin" was converted to an object'),i.bin=i.bin.reduce((t,r)=>(t[oe.basename(r)]=r,t),{})),typeof i.bin=="object")){for(let t in i.bin){if(typeof i.bin[t]!="string"){delete i.bin[t],e?.push(`removed invalid "bin[${t}]"`);continue}let r=oe.basename(vn(t));if(!r){delete i.bin[t],e?.push(`removed invalid "bin[${t}]"`);continue}let s=vn(i.bin[t]);if(!s){delete i.bin[t],e?.push(`removed invalid "bin[${t}]"`);continue}r!==t&&(delete i.bin[t],e?.push(`"bin[${t}]" was renamed to "bin[${r}]"`)),s!==i.bin[t]&&e?.push(`"bin[${r}]" script name ${s} was invalid and removed`),i.bin[r]=s}return Object.keys(i.bin).length===0&&(e?.push('empty "bin" was removed'),delete i.bin),i}delete i.bin}o(P3,"normalizePackageBin");function D3(i,e){if(i.man){let t=[];for(let r of Array.isArray(i.man)?i.man:[i.man])typeof r!="string"?e?.push(`removed invalid "man [${r}]"`):t.push(vn(r));if(!t.length)e?.push('empty "man" was removed');else return i.man=t,i}delete i.man}o(D3,"normalizePackageMan");function x3(i){return!i.match(/[/@\s+%:]/)&&i===encodeURIComponent(i)}o(x3,"isCorrectlyEncodedName");function L3(i){if(i.charAt(0)!=="@")return!1;let e=i.slice(1).split("/");return e.length!==2?!1:e[0]&&e[1]&&e[0]===encodeURIComponent(e[0])&&e[1]===encodeURIComponent(e[1])}o(L3,"isValidScopedPackageName");function AT(i){return i.replace(/\\|:/g,"/")}o(AT,"unixifyPath");function vn(i){let e=AT(oe.join(".",oe.join("/",AT(i))));return e.startsWith("./")?"":e}o(vn,"secureAndUnixifyPath");function NT(i,{strict:e,steps:t,changes:r,allowLegacyCase:s}){let n=i.content,a=`${n.name??""}@${n.version??""}`;if(t.includes("fixName")||t.includes("fixNameField")||t.includes("normalizeData"))if(!n.name&&!e)r?.push('Missing "name" field was set to an empty string'),n.name="";else{if(typeof n.name!="string")throw new Error("name field must be a string.");if(!e){let c=n.name.trim();n.name!==c&&(r?.push('Whitespace was trimmed from "name"'),n.name=c)}if(n.name.startsWith(".")||!(L3(n.name)||x3(n.name))||e&&!s&&n.name!==n.name.toLowerCase()||n.name.toLowerCase()==="node_modules"||n.name.toLowerCase()==="favicon.ico")throw new Error("Invalid name: "+JSON.stringify(n.name))}if(t.includes("fixName")&&N3.builtinModules.includes(n.name)&&TT.warn("package-json",a,`Package name "${n.name}" conflicts with a Node.js built-in module name`),t.includes("fixVersionField")||t.includes("normalizeData")){let c=!e;if(!n.version)n.version="";else{if(!A3(n.version,c))throw new Error(`Invalid version: "${n.version}"`);let u=T3(n.version,c);u!==n.version&&(r?.push(`"version" was cleaned and set to "${u}"`),n.version=u)}}if(t.includes("_attributes"))for(let c in n)c.startsWith("_")&&(r?.push(`"${c}" was removed`),delete i.content[c]);if(t.includes("_id")&&n.name&&n.version&&(r?.push(`"_id" was set to ${a}`),n._id=a),t.includes("bundledDependencies")&&(n.bundleDependencies===void 0&&n.bundledDependencies!==void 0&&(n.bundleDependencies=n.bundledDependencies,r?.push('Deleted incorrect "bundledDependencies"')),delete n.bundledDependencies),t.includes("bundleDependencies")){let c=n.bundleDependencies;c===!1&&!t.includes("bundleDependenciesDeleteFalse")?(r?.push('"bundleDependencies" was changed from "false" to "[]"'),n.bundleDependencies=[]):c===!0?(r?.push('"bundleDependencies" was auto-populated from "dependencies"'),n.bundleDependencies=Object.keys(n.dependencies||{})):c&&typeof c=="object"?Array.isArray(c)||(r?.push('"bundleDependencies" was changed from an object to an array'),n.bundleDependencies=Object.keys(c)):"bundleDependencies"in n&&(r?.push('"bundleDependencies" was removed'),delete n.bundleDependencies)}if(t.includes("optionalDedupe")&&n.dependencies&&n.optionalDependencies&&typeof n.optionalDependencies=="object"){for(let c in n.optionalDependencies)r?.push(`optionalDependencies."${c}" was removed`),delete n.dependencies[c];Object.keys(n.dependencies).length||(r?.push('Empty "optionalDependencies" was removed'),delete n.dependencies)}if((t.includes("scripts")||t.includes("scriptpath"))&&n.scripts!==void 0){let c=/^(\.[/\\])?node_modules[/\\].bin[\\/]/;if(typeof n.scripts=="object")for(let u in n.scripts)typeof n.scripts[u]!="string"?(delete n.scripts[u],r?.push(`Invalid scripts."${u}" was removed`)):t.includes("scriptpath")&&c.test(n.scripts[u])&&(n.scripts[u]=n.scripts[u].replace(c,""),r?.push(`scripts entry "${u}" was fixed to remove node_modules/.bin reference`));else r?.push('Removed invalid "scripts"'),delete n.scripts}if(t.includes("funding")&&n.funding&&typeof n.funding=="string"&&(n.funding={url:n.funding},r?.push('"funding" was changed to an object with a url attribute')),(t.includes("fixRepositoryField")||t.includes("normalizeData"))&&(n.repositories&&(r?.push(`"repository" was set to the first entry in "repositories" (${n.repository})`),n.repository=n.repositories[0]),n.repository&&(typeof n.repository=="string"&&(r?.push('"repository" was changed from a string to an object'),n.repository={type:"git",url:n.repository}),n.repository.url))){let c=RT().fromUrl(n.repository.url),u;c&&(c.getDefaultRepresentation()==="shortcut"?u=c.https():u=c.toString(),u!==n.repository.url&&(r?.push(`"repository.url" was normalized to "${u}"`),n.repository.url=u))}if(t.includes("fixDependencies")||t.includes("normalizeData")){for(let c of["dependencies","devDependencies","optionalDependencies"])if(n[c]){let u=!0;if(typeof n[c]=="string"&&(r?.push(`"${c}" was converted from a string into an object`),n[c]=n[c].trim().split(/[\n\r\s\t ,]+/),u=!1),Array.isArray(n[c])){u&&r?.push(`"${c}" was converted from an array into an object`);let l={};for(let h of n[c])if(typeof h=="string"){let f=h.trim().split(/(:?[@\s><=])/),p=f.shift(),m=f.join("").replace(/^@/,"").trim();l[p]=m}n[c]=l}}for(let c of["dependencies","devDependencies"])if(c in n)if(!n[c]||typeof n[c]!="object")r?.push(`Removed invalid "${c}"`),delete n[c];else for(let u in n[c]){typeof n[c][u]!="string"&&(r?.push(`Removed invalid "${c}.${u}"`),delete n[c][u]);let h=RT().fromUrl(n[c][u])?.toString();h&&h!==n[c][u]&&(r?.push(`Normalized git reference to "${c}.${u}"`),n[c][u]=h.toString())}}if(t.includes("normalizeData")){let{normalizeData:c}=tC();c(n,r)}}o(NT,"syncSteps");async function M3(i,{steps:e,root:t,changes:r}){let s=i.content,n=s.scripts||{},a=`${s.name??""}@${s.version??""}`;if(e.includes("gypfile")&&!n.install&&!n.preinstall&&s.gypfile!==!1&&(await sh()("*.gyp",{cwd:i.path})).length&&(n.install="node-gyp rebuild",s.scripts=n,s.gypfile=!0,r?.push('"scripts.install" was set to "node-gyp rebuild"'),r?.push('"gypfile" was set to "true"')),e.includes("serverjs")&&!n.start)try{await br.access(oe.join(i.path,"server.js")),n.start="node server.js",s.scripts=n,r?.push('"scripts.start" was set to "node server.js"')}catch{}if(e.includes("authors")&&!s.contributors)try{let u=(await br.readFile(oe.join(i.path,"AUTHORS"),"utf8")).split(/\r?\n/g).map(l=>l.replace(/^\s*#.*$/,"").trim()).filter(l=>l);s.contributors=u,r?.push('"contributors" was auto-populated with the contents of the "AUTHORS" file')}catch{}if(e.includes("readme")&&!s.readme){let c=/\.m?a?r?k?d?o?w?n?$/i,u=await sh()("{README,README.*}",{cwd:i.path,nocase:!0,mark:!0}),l;for(let h of u)if(!h.endsWith(oe.sep)){if(h.match(c)){l=h;break}h.endsWith("README")&&(l=h)}if(l){let h=await br.readFile(oe.join(i.path,l),"utf8");s.readme=h,s.readmeFilename=l,r?.push(`"readme" was set to the contents of ${l}`),r?.push(`"readmeFilename" was set to ${l}`)}s.readme||(s.readme="ERROR: No README data found!")}if(e.includes("mans")){if(s.directories?.man&&!s.man){let c=vn(s.directories.man),u=oe.resolve(i.path,c),l=await sh()("**/*.[0-9]",{cwd:u});s.man=l.map(h=>oe.relative(i.path,oe.join(u,h)).split(oe.sep).join("/"))}D3(s,r)}if(e.includes("binDir")&&s.directories?.bin&&!s.bin){let c=vn(s.directories.bin),u=await sh()("**",{cwd:oe.resolve(i.path,c)});s.bin=u.reduce((l,h)=>{if(h&&!h.startsWith(".")){let f=oe.basename(h);l[f]=`${c}/${vn(h)}`}return l},{})}else(e.includes("bin")||e.includes("binDir")||e.includes("binRefs"))&&P3(s,r);if(e.includes("gitHead")&&!s.gitHead){let u=await _y().find({cwd:i.path,root:t}),l;if(u)try{l=await br.readFile(oe.resolve(u,".git/HEAD"),"utf8")}catch{}let h;if(l)if(l.startsWith("ref: ")){let f=l.replace(/^ref: /,"").trim(),p=oe.resolve(u,".git",f);try{h=await br.readFile(p,"utf8"),h=h.replace(/^ref: /,"").trim()}catch{}if(!h){let m=oe.resolve(u,".git/packed-refs");try{let y=await br.readFile(m,"utf8");if(y){y=y.split(`
15
+ `);for(let g=0;g<y.length;g++){let S=y[g].match(/^([0-9a-f]{40}) (.+)$/);if(S&&S[2].trim()===f){h=S[1];break}}}}catch{}}}else h=l.trim();h&&(s.gitHead=h)}if(e.includes("fillTypes")){let c=s.main||"index.js";if(typeof c!="string")throw new TypeError('The "main" attribute must be of type string.');let l=`./${oe.join(oe.dirname(c),oe.basename(c,oe.extname(c)))}.d.ts`;if(!("types"in s||"typings"in s))try{await br.access(oe.join(i.path,l)),s.types=l.split(oe.sep).join("/")}catch{}}if(e.includes("binRefs")&&s.bin instanceof Object)for(let c in s.bin)try{await br.access(oe.resolve(i.path,s.bin[c]))}catch{TT.warn("package-json",a,`No bin file found at ${s.bin[c]}`)}}o(M3,"asyncSteps");async function B3(i,e){if(!i.content)throw new Error("Can not normalize without content");await M3(i,e),NT(i,e)}o(B3,"normalize");function k3(i,e){NT(i,e)}o(k3,"syncNormalize");PT.exports={normalize:B3,syncNormalize:k3}});var BT=d((Vpe,MT)=>{var{readFile:F3}=require("fs/promises"),U3=Lm();async function xT(i){try{return await F3(i,"utf8")}catch(e){throw e.message=`Could not read package.json: ${e}`,e}}o(xT,"read");function LT(i){try{return U3(i)}catch(e){throw e.message=`Invalid package.json: ${e}`,e}}o(LT,"parse");async function j3(i){let e=await xT(i);return LT(e)}o(j3,"readPackage");MT.exports={read:xT,parse:LT,readPackage:j3}});var FT=d((Hpe,kT)=>{function $3(i){let{name:e,version:t,private:r,description:s,keywords:n,homepage:a,bugs:c,repository:u,funding:l,license:h,author:f,maintainers:p,contributors:m,type:y,imports:g,exports:S,main:E,browser:_,types:b,bin:w,man:I,directories:v,files:N,workspaces:P,scripts:U,config:ee,dependencies:ni,devDependencies:us,peerDependencies:ma,peerDependenciesMeta:Vu,optionalDependencies:zu,bundledDependencies:Hu,bundleDependencies:Gu,engines:Wu,os:Ju,cpu:ga,publishConfig:ya,devEngines:Sa,licenses:Ea,overrides:ZI,...s2}=i;return{...typeof e<"u"?{name:e}:{},...typeof t<"u"?{version:t}:{},...typeof r<"u"?{private:r}:{},...typeof s<"u"?{description:s}:{},...typeof n<"u"?{keywords:n}:{},...typeof a<"u"?{homepage:a}:{},...typeof c<"u"?{bugs:c}:{},...typeof u<"u"?{repository:u}:{},...typeof l<"u"?{funding:l}:{},...typeof h<"u"?{license:h}:{},...typeof f<"u"?{author:f}:{},...typeof p<"u"?{maintainers:p}:{},...typeof m<"u"?{contributors:m}:{},...typeof y<"u"?{type:y}:{},...typeof g<"u"?{imports:g}:{},...typeof S<"u"?{exports:S}:{},...typeof E<"u"?{main:E}:{},...typeof _<"u"?{browser:_}:{},...typeof b<"u"?{types:b}:{},...typeof w<"u"?{bin:w}:{},...typeof I<"u"?{man:I}:{},...typeof v<"u"?{directories:v}:{},...typeof N<"u"?{files:N}:{},...typeof P<"u"?{workspaces:P}:{},...typeof U<"u"?{scripts:U}:{},...typeof ee<"u"?{config:ee}:{},...typeof ni<"u"?{dependencies:ni}:{},...typeof us<"u"?{devDependencies:us}:{},...typeof ma<"u"?{peerDependencies:ma}:{},...typeof Vu<"u"?{peerDependenciesMeta:Vu}:{},...typeof zu<"u"?{optionalDependencies:zu}:{},...typeof Hu<"u"?{bundledDependencies:Hu}:{},...typeof Gu<"u"?{bundleDependencies:Gu}:{},...typeof Wu<"u"?{engines:Wu}:{},...typeof Ju<"u"?{os:Ju}:{},...typeof ga<"u"?{cpu:ga}:{},...typeof ya<"u"?{publishConfig:ya}:{},...typeof Sa<"u"?{devEngines:Sa}:{},...typeof Ea<"u"?{licenses:Ea}:{},...typeof ZI<"u"?{overrides:ZI}:{},...s2}}o($3,"packageSort");kT.exports={packageSort:$3}});var nh=d((Wpe,$T)=>{var{readFile:q3,writeFile:V3}=require("node:fs/promises"),{resolve:UT}=require("node:path"),z3=Lm(),jT=rO(),H3=nO(),G3=aO(),{normalize:Oy,syncNormalize:W3}=DT(),{read:J3,parse:K3}=BT(),{packageSort:Z3}=FT(),Y3=new Set([jT,H3,G3]),X3=new Set([...jT.knownKeys,"scripts","workspaces"]),vy=class i{static{o(this,"PackageJson")}static fixSteps=Object.freeze(["binRefs","bundleDependencies","fixName","fixVersionField","fixRepositoryField","fixDependencies","devDependencies","scriptpath"]);static normalizeSteps=Object.freeze(["_id","_attributes","bundledDependencies","bundleDependencies","optionalDedupe","scripts","funding","bin","binDir"]);static prepareSteps=Object.freeze(["_id","_attributes","bundledDependencies","bundleDependencies","bundleDependenciesDeleteFalse","gypfile","serverjs","scriptpath","authors","readme","mans","binDir","gitHead","fillTypes","normalizeData","binRefs"]);static async create(e,t={}){let r=new i;return await r.create(e),t.data?r.update(t.data):r}static async load(e,t={}){let r=new i;if(!t.create)return r.load(e);try{return await r.load(e)}catch(s){if(!s.message.startsWith("Could not read package.json"))throw s;return await r.create(e)}}static async fix(e,t){let r=new i;return await r.load(e,!0),r.fix(t)}static async prepare(e,t){let r=new i;return await r.load(e,!0),r.prepare(t)}static async normalize(e,t){let r=new i;return await r.load(e),r.normalize(t)}#e;#t;#i="";#r=!0;async load(e,t){this.#e=e;let r;try{this.#i=await J3(this.filename)}catch(s){if(!t)throw s;r=s}if(r){let s=UT(this.path,"index.js"),n;try{n=await q3(s,"utf8")}catch{throw r}try{this.fromComment(n)}catch{throw r}return this.#r=!1,this}return this.fromJSON(this.#i)}fromJSON(e){return this.#t=K3(e),this}fromContent(e){if(!e||typeof e!="object")throw new Error("Content data must be an object");return this.#t=e,this.#r=!1,this}fromComment(e){if(e=e.split(/^\/\*\*package(?:\s|$)/m),e.length<2)throw new Error("File has no package in comments");if(e=e[1],e=e.split(/\*\*\/$/m),e.length<2)throw new Error("File has no package in comments");return e=e[0],e=e.replace(/^\s*\*/mg,""),this.#t=z3(e),this}get content(){return this.#t}get path(){return this.#e}get filename(){if(this.path)return UT(this.path,"package.json")}create(e){return this.#e=e,this.#t={},this}update(e){if(!this.content)throw new Error("Can not update without content. Please `load` or `create`");for(let t of Y3)this.#t=t({content:e,originalContent:this.content});for(let[t,r]of Object.entries(e))X3.has(t)||(this.content[t]=r);return this}async save({sort:e}={}){if(!this.#r)throw new Error("No package.json to save to");let{[Symbol.for("indent")]:t,[Symbol.for("newline")]:r,...s}=this.content,n=t===void 0?" ":t,a=r===void 0?`
16
+ `:r,c=e?Z3(s):s,u=`${JSON.stringify(c,null,n)}
17
+ `.replace(/\n/g,a);if(u.trim()!==this.#i.trim()){let l=await V3(this.filename,u);return this.#i=u,l}}syncNormalize(e={}){return e.steps=this.constructor.normalizeSteps.filter(t=>t!=="_attributes"),W3(this,e),this}async normalize(e={}){return e.steps||(e.steps=this.constructor.normalizeSteps),await Oy(this,e),this}async prepare(e={}){return e.steps||(e.steps=this.constructor.prepareSteps),await Oy(this,e),this}async fix(e={}){return e.steps=this.constructor.fixSteps,await Oy(this,e),this}};$T.exports=vy});var Ty=d((Kpe,Ay)=>{var{Minipass:qT}=te(),Cn=Symbol("_data"),Rn=Symbol("_length"),Cy=class extends qT{static{o(this,"Collect")}constructor(e){super(e),this[Cn]=[],this[Rn]=0}write(e,t,r){typeof t=="function"&&(r=t,t="utf8"),t||(t="utf8");let s=Buffer.isBuffer(e)?e:Buffer.from(e,t);return this[Cn].push(s),this[Rn]+=s.length,r&&r(),!0}end(e,t,r){typeof e=="function"&&(r=e,e=null),typeof t=="function"&&(r=t,t="utf8"),e&&this.write(e,t);let s=Buffer.concat(this[Cn],this[Rn]);return super.write(s),super.end(r)}};Ay.exports=Cy;var Ry=class extends qT{static{o(this,"CollectPassThrough")}constructor(e){super(e),this[Cn]=[],this[Rn]=0}write(e,t,r){typeof t=="function"&&(r=t,t="utf8"),t||(t="utf8");let s=Buffer.isBuffer(e)?e:Buffer.from(e,t);return this[Cn].push(s),this[Rn]+=s.length,super.write(e,t,r)}end(e,t,r){typeof e=="function"&&(r=e,e=null),typeof t=="function"&&(r=t,t="utf8"),e&&this.write(e,t);let s=Buffer.concat(this[Cn],this[Rn]);return this.emit("collect",s),super.end(r)}};Ay.exports.PassThrough=Ry});var hh=d((Ype,YT)=>{"use strict";var VT=typeof process=="object"&&process?process:{stdout:null,stderr:null},Q3=require("events"),zT=require("stream"),HT=require("string_decoder").StringDecoder,zi=Symbol("EOF"),Hi=Symbol("maybeEmitEnd"),Ir=Symbol("emittedEnd"),oh=Symbol("emittingEnd"),sc=Symbol("emittedError"),ah=Symbol("closed"),GT=Symbol("read"),ch=Symbol("flush"),WT=Symbol("flushChunk"),Qe=Symbol("encoding"),Gi=Symbol("decoder"),uh=Symbol("flowing"),nc=Symbol("paused"),An=Symbol("resume"),Ae=Symbol("bufferLength"),Ny=Symbol("bufferPush"),Py=Symbol("bufferShift"),Be=Symbol("objectMode"),ke=Symbol("destroyed"),Dy=Symbol("emitData"),JT=Symbol("emitEnd"),xy=Symbol("emitEnd2"),Wi=Symbol("async"),oc=o(i=>Promise.resolve().then(i),"defer"),KT=global._MP_NO_ITERATOR_SYMBOLS_!=="1",e5=KT&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),t5=KT&&Symbol.iterator||Symbol("iterator not implemented"),i5=o(i=>i==="end"||i==="finish"||i==="prefinish","isEndish"),r5=o(i=>i instanceof ArrayBuffer||typeof i=="object"&&i.constructor&&i.constructor.name==="ArrayBuffer"&&i.byteLength>=0,"isArrayBuffer"),s5=o(i=>!Buffer.isBuffer(i)&&ArrayBuffer.isView(i),"isArrayBufferView"),lh=class{static{o(this,"Pipe")}constructor(e,t,r){this.src=e,this.dest=t,this.opts=r,this.ondrain=()=>e[An](),t.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},Ly=class extends lh{static{o(this,"PipeProxyErrors")}unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,t,r){super(e,t,r),this.proxyErrors=s=>t.emit("error",s),e.on("error",this.proxyErrors)}};YT.exports=class ZT extends zT{static{o(this,"Minipass")}constructor(e){super(),this[uh]=!1,this[nc]=!1,this.pipes=[],this.buffer=[],this[Be]=e&&e.objectMode||!1,this[Be]?this[Qe]=null:this[Qe]=e&&e.encoding||null,this[Qe]==="buffer"&&(this[Qe]=null),this[Wi]=e&&!!e.async||!1,this[Gi]=this[Qe]?new HT(this[Qe]):null,this[zi]=!1,this[Ir]=!1,this[oh]=!1,this[ah]=!1,this[sc]=null,this.writable=!0,this.readable=!0,this[Ae]=0,this[ke]=!1}get bufferLength(){return this[Ae]}get encoding(){return this[Qe]}set encoding(e){if(this[Be])throw new Error("cannot set encoding in objectMode");if(this[Qe]&&e!==this[Qe]&&(this[Gi]&&this[Gi].lastNeed||this[Ae]))throw new Error("cannot change encoding");this[Qe]!==e&&(this[Gi]=e?new HT(e):null,this.buffer.length&&(this.buffer=this.buffer.map(t=>this[Gi].write(t)))),this[Qe]=e}setEncoding(e){this.encoding=e}get objectMode(){return this[Be]}set objectMode(e){this[Be]=this[Be]||!!e}get async(){return this[Wi]}set async(e){this[Wi]=this[Wi]||!!e}write(e,t,r){if(this[zi])throw new Error("write after end");if(this[ke])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof t=="function"&&(r=t,t="utf8"),t||(t="utf8");let s=this[Wi]?oc:n=>n();return!this[Be]&&!Buffer.isBuffer(e)&&(s5(e)?e=Buffer.from(e.buffer,e.byteOffset,e.byteLength):r5(e)?e=Buffer.from(e):typeof e!="string"&&(this.objectMode=!0)),this[Be]?(this.flowing&&this[Ae]!==0&&this[ch](!0),this.flowing?this.emit("data",e):this[Ny](e),this[Ae]!==0&&this.emit("readable"),r&&s(r),this.flowing):e.length?(typeof e=="string"&&!(t===this[Qe]&&!this[Gi].lastNeed)&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[Qe]&&(e=this[Gi].write(e)),this.flowing&&this[Ae]!==0&&this[ch](!0),this.flowing?this.emit("data",e):this[Ny](e),this[Ae]!==0&&this.emit("readable"),r&&s(r),this.flowing):(this[Ae]!==0&&this.emit("readable"),r&&s(r),this.flowing)}read(e){if(this[ke])return null;if(this[Ae]===0||e===0||e>this[Ae])return this[Hi](),null;this[Be]&&(e=null),this.buffer.length>1&&!this[Be]&&(this.encoding?this.buffer=[this.buffer.join("")]:this.buffer=[Buffer.concat(this.buffer,this[Ae])]);let t=this[GT](e||null,this.buffer[0]);return this[Hi](),t}[GT](e,t){return e===t.length||e===null?this[Py]():(this.buffer[0]=t.slice(e),t=t.slice(0,e),this[Ae]-=e),this.emit("data",t),!this.buffer.length&&!this[zi]&&this.emit("drain"),t}end(e,t,r){return typeof e=="function"&&(r=e,e=null),typeof t=="function"&&(r=t,t="utf8"),e&&this.write(e,t),r&&this.once("end",r),this[zi]=!0,this.writable=!1,(this.flowing||!this[nc])&&this[Hi](),this}[An](){this[ke]||(this[nc]=!1,this[uh]=!0,this.emit("resume"),this.buffer.length?this[ch]():this[zi]?this[Hi]():this.emit("drain"))}resume(){return this[An]()}pause(){this[uh]=!1,this[nc]=!0}get destroyed(){return this[ke]}get flowing(){return this[uh]}get paused(){return this[nc]}[Ny](e){this[Be]?this[Ae]+=1:this[Ae]+=e.length,this.buffer.push(e)}[Py](){return this.buffer.length&&(this[Be]?this[Ae]-=1:this[Ae]-=this.buffer[0].length),this.buffer.shift()}[ch](e){do;while(this[WT](this[Py]()));!e&&!this.buffer.length&&!this[zi]&&this.emit("drain")}[WT](e){return e?(this.emit("data",e),this.flowing):!1}pipe(e,t){if(this[ke])return;let r=this[Ir];return t=t||{},e===VT.stdout||e===VT.stderr?t.end=!1:t.end=t.end!==!1,t.proxyErrors=!!t.proxyErrors,r?t.end&&e.end():(this.pipes.push(t.proxyErrors?new Ly(this,e,t):new lh(this,e,t)),this[Wi]?oc(()=>this[An]()):this[An]()),e}unpipe(e){let t=this.pipes.find(r=>r.dest===e);t&&(this.pipes.splice(this.pipes.indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){let r=super.on(e,t);return e==="data"&&!this.pipes.length&&!this.flowing?this[An]():e==="readable"&&this[Ae]!==0?super.emit("readable"):i5(e)&&this[Ir]?(super.emit(e),this.removeAllListeners(e)):e==="error"&&this[sc]&&(this[Wi]?oc(()=>t.call(this,this[sc])):t.call(this,this[sc])),r}get emittedEnd(){return this[Ir]}[Hi](){!this[oh]&&!this[Ir]&&!this[ke]&&this.buffer.length===0&&this[zi]&&(this[oh]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[ah]&&this.emit("close"),this[oh]=!1)}emit(e,t,...r){if(e!=="error"&&e!=="close"&&e!==ke&&this[ke])return;if(e==="data")return t?this[Wi]?oc(()=>this[Dy](t)):this[Dy](t):!1;if(e==="end")return this[JT]();if(e==="close"){if(this[ah]=!0,!this[Ir]&&!this[ke])return;let n=super.emit("close");return this.removeAllListeners("close"),n}else if(e==="error"){this[sc]=t;let n=super.emit("error",t);return this[Hi](),n}else if(e==="resume"){let n=super.emit("resume");return this[Hi](),n}else if(e==="finish"||e==="prefinish"){let n=super.emit(e);return this.removeAllListeners(e),n}let s=super.emit(e,t,...r);return this[Hi](),s}[Dy](e){for(let r of this.pipes)r.dest.write(e)===!1&&this.pause();let t=super.emit("data",e);return this[Hi](),t}[JT](){this[Ir]||(this[Ir]=!0,this.readable=!1,this[Wi]?oc(()=>this[xy]()):this[xy]())}[xy](){if(this[Gi]){let t=this[Gi].end();if(t){for(let r of this.pipes)r.dest.write(t);super.emit("data",t)}}for(let t of this.pipes)t.end();let e=super.emit("end");return this.removeAllListeners("end"),e}collect(){let e=[];this[Be]||(e.dataLength=0);let t=this.promise();return this.on("data",r=>{e.push(r),this[Be]||(e.dataLength+=r.length)}),t.then(()=>e)}concat(){return this[Be]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(e=>this[Be]?Promise.reject(new Error("cannot concat in objectMode")):this[Qe]?e.join(""):Buffer.concat(e,e.dataLength))}promise(){return new Promise((e,t)=>{this.on(ke,()=>t(new Error("stream destroyed"))),this.on("error",r=>t(r)),this.on("end",()=>e())})}[e5](){return{next:o(()=>{let t=this.read();if(t!==null)return Promise.resolve({done:!1,value:t});if(this[zi])return Promise.resolve({done:!0});let r=null,s=null,n=o(l=>{this.removeListener("data",a),this.removeListener("end",c),s(l)},"onerr"),a=o(l=>{this.removeListener("error",n),this.removeListener("end",c),this.pause(),r({value:l,done:!!this[zi]})},"ondata"),c=o(()=>{this.removeListener("error",n),this.removeListener("data",a),r({done:!0})},"onend"),u=o(()=>n(new Error("stream destroyed")),"ondestroy");return new Promise((l,h)=>{s=h,r=l,this.once(ke,u),this.once("error",n),this.once("end",c),this.once("data",a)})},"next")}}[t5](){return{next:o(()=>{let t=this.read();return{value:t,done:t===null}},"next")}}destroy(e){return this[ke]?(e?this.emit("error",e):this.emit(ke),this):(this[ke]=!0,this.buffer.length=0,this[Ae]=0,typeof this.close=="function"&&!this[ah]&&this.close(),e?this.emit("error",e):this.emit(ke),this)}static isStream(e){return!!e&&(e instanceof ZT||e instanceof zT||e instanceof Q3&&(typeof e.pipe=="function"||typeof e.write=="function"&&typeof e.end=="function"))}}});var Tn=d((Qpe,t1)=>{var n5=hh(),o5=require("events"),a5=o(i=>i&&i instanceof o5&&(typeof i.pipe=="function"||typeof i.write=="function"&&typeof i.end=="function"),"isStream"),ws=Symbol("_head"),ft=Symbol("_tail"),My=Symbol("_linkStreams"),By=Symbol("_setHead"),ky=Symbol("_setTail"),XT=Symbol("_onError"),QT=Symbol("_onData"),Fy=Symbol("_onEnd"),e1=Symbol("_onDrain"),fh=Symbol("_streams"),Uy=class extends n5{static{o(this,"Pipeline")}constructor(e,...t){a5(e)&&(t.unshift(e),e={}),super(e),this[fh]=[],t.length&&this.push(...t)}[My](e){return e.reduce((t,r)=>(t.on("error",s=>r.emit("error",s)),t.pipe(r),r))}push(...e){this[fh].push(...e),this[ft]&&e.unshift(this[ft]);let t=this[My](e);this[ky](t),this[ws]||this[By](e[0])}unshift(...e){this[fh].unshift(...e),this[ws]&&e.push(this[ws]);let t=this[My](e);this[By](e[0]),this[ft]||this[ky](t)}destroy(e){return this[fh].forEach(t=>typeof t.destroy=="function"&&t.destroy()),super.destroy(e)}[ky](e){this[ft]=e,e.on("error",t=>this[XT](e,t)),e.on("data",t=>this[QT](e,t)),e.on("end",()=>this[Fy](e)),e.on("finish",()=>this[Fy](e))}[XT](e,t){e===this[ft]&&this.emit("error",t)}[QT](e,t){e===this[ft]&&super.write(t)}[Fy](e){e===this[ft]&&super.end()}pause(){return super.pause(),this[ft]&&this[ft].pause&&this[ft].pause()}emit(e,...t){return e==="resume"&&this[ft]&&this[ft].resume&&this[ft].resume(),super.emit(e,...t)}[By](e){this[ws]=e,e.on("drain",()=>this[e1](e))}[e1](e){e===this[ws]&&this.emit("drain")}write(e,t,r){return this[ws].write(e,t,r)&&(this.flowing||this.buffer.length===0)}end(e,t,r){return this[ws].end(e,t,r),this}};t1.exports=Uy});var hi=d((tme,li)=>{"use strict";var cc=require("crypto"),{Minipass:c5}=te(),$y=["sha512","sha384","sha256"],Vy=["sha512"],u5=/^[a-z0-9+/]+(?:=?=?)$/i,l5=/^([a-z0-9]+)-([^?]+)([?\S*]*)$/,h5=/^([a-z0-9]+)-([A-Za-z0-9+/=]{44,88})(\?[\x21-\x7E]*)?$/,f5=/^[\x21-\x7E]+$/,uc=o(i=>i?.length?`?${i.join("?")}`:"","getOptString"),qy=class extends c5{static{o(this,"IntegrityStream")}#e;#t;#i;constructor(e){super(),this.size=0,this.opts=e,this.#r(),e?.algorithms?this.algorithms=[...e.algorithms]:this.algorithms=[...Vy],this.algorithm!==null&&!this.algorithms.includes(this.algorithm)&&this.algorithms.push(this.algorithm),this.hashes=this.algorithms.map(cc.createHash)}#r(){this.sri=this.opts?.integrity?dt(this.opts?.integrity,this.opts):null,this.expectedSize=this.opts?.size,this.sri?this.sri.isHash?(this.goodSri=!0,this.algorithm=this.sri.algorithm):(this.goodSri=!this.sri.isEmpty(),this.algorithm=this.sri.pickAlgorithm(this.opts)):this.algorithm=null,this.digests=this.goodSri?this.sri[this.algorithm]:null,this.optString=uc(this.opts?.options)}on(e,t){return e==="size"&&this.#t?t(this.#t):e==="integrity"&&this.#e?t(this.#e):e==="verified"&&this.#i?t(this.#i):super.on(e,t)}emit(e,t){return e==="end"&&this.#s(),super.emit(e,t)}write(e){return this.size+=e.length,this.hashes.forEach(t=>t.update(e)),super.write(e)}#s(){this.goodSri||this.#r();let e=dt(this.hashes.map((r,s)=>`${this.algorithms[s]}-${r.digest("base64")}${this.optString}`).join(" "),this.opts),t=this.goodSri&&e.match(this.sri,this.opts);if(typeof this.expectedSize=="number"&&this.size!==this.expectedSize){let r=new Error(`stream size mismatch when checking ${this.sri}.
18
+ Wanted: ${this.expectedSize}
19
+ Found: ${this.size}`);r.code="EBADSIZE",r.found=this.size,r.expected=this.expectedSize,r.sri=this.sri,this.emit("error",r)}else if(this.sri&&!t){let r=new Error(`${this.sri} integrity checksum failed when using ${this.algorithm}: wanted ${this.digests} but got ${e}. (${this.size} bytes)`);r.code="EINTEGRITY",r.found=e,r.expected=this.digests,r.algorithm=this.algorithm,r.sri=this.sri,this.emit("error",r)}else this.#t=this.size,this.emit("size",this.size),this.#e=e,this.emit("integrity",e),t&&(this.#i=t,this.emit("verified",t))}},Ji=class{static{o(this,"Hash")}get isHash(){return!0}constructor(e,t){let r=t?.strict;this.source=e.trim(),this.digest="",this.algorithm="",this.options=[];let s=this.source.match(r?h5:l5);if(!s||r&&!$y.includes(s[1]))return;this.algorithm=s[1],this.digest=s[2];let n=s[3];n&&(this.options=n.slice(1).split("?"))}hexDigest(){return this.digest&&Buffer.from(this.digest,"base64").toString("hex")}toJSON(){return this.toString()}match(e,t){let r=dt(e,t);if(!r)return!1;if(r.isIntegrity){let s=r.pickAlgorithm(t,[this.algorithm]);if(!s)return!1;let n=r[s].find(a=>a.digest===this.digest);return n||!1}return r.digest===this.digest?r:!1}toString(e){return e?.strict&&!($y.includes(this.algorithm)&&this.digest.match(u5)&&this.options.every(t=>t.match(f5)))?"":`${this.algorithm}-${this.digest}${uc(this.options)}`}};function i1(i,e,t,r){let s=i!=="",n=!1,a="",c=r.length-1;for(let l=0;l<c;l++){let h=Ji.prototype.toString.call(r[l],t);h&&(n=!0,a+=h,a+=e)}let u=Ji.prototype.toString.call(r[c],t);return u&&(n=!0,a+=u),s&&n?i+e+a:i+a}o(i1,"integrityHashToString");var _s=class{static{o(this,"Integrity")}get isIntegrity(){return!0}toJSON(){return this.toString()}isEmpty(){return Object.keys(this).length===0}toString(e){let t=e?.sep||" ",r="";if(e?.strict){t=t.replace(/\S+/g," ");for(let s of $y)this[s]&&(r=i1(r,t,e,this[s]))}else for(let s of Object.keys(this))r=i1(r,t,e,this[s]);return r}concat(e,t){let r=typeof e=="string"?e:ac(e,t);return dt(`${this.toString(t)} ${r}`,t)}hexDigest(){return dt(this,{single:!0}).hexDigest()}merge(e,t){let r=dt(e,t);for(let s in r)if(this[s]){if(!this[s].find(n=>r[s].find(a=>n.digest===a.digest)))throw new Error("hashes do not match, cannot update integrity")}else this[s]=r[s]}match(e,t){let r=dt(e,t);if(!r)return!1;let s=r.pickAlgorithm(t,Object.keys(this));return!!s&&this[s]&&r[s]&&this[s].find(n=>r[s].find(a=>n.digest===a.digest))||!1}pickAlgorithm(e,t){let r=e?.pickAlgorithm||w5,s=Object.keys(this).filter(n=>t?.length?t.includes(n):!0);return s.length?s.reduce((n,a)=>r(n,a)||n):null}};li.exports.parse=dt;function dt(i,e){if(!i)return null;if(typeof i=="string")return jy(i,e);if(i.algorithm&&i.digest){let t=new _s;return t[i.algorithm]=[i],jy(ac(t,e),e)}else return jy(ac(i,e),e)}o(dt,"parse");function jy(i,e){if(e?.single)return new Ji(i,e);let t=i.trim().split(/\s+/).reduce((r,s)=>{let n=new Ji(s,e);if(n.algorithm&&n.digest){let a=n.algorithm;r[a]||(r[a]=[]),r[a].push(n)}return r},new _s);return t.isEmpty()?null:t}o(jy,"_parse");li.exports.stringify=ac;function ac(i,e){return i.algorithm&&i.digest?Ji.prototype.toString.call(i,e):typeof i=="string"?ac(dt(i,e),e):_s.prototype.toString.call(i,e)}o(ac,"stringify");li.exports.fromHex=d5;function d5(i,e,t){let r=uc(t?.options);return dt(`${e}-${Buffer.from(i,"hex").toString("base64")}${r}`,t)}o(d5,"fromHex");li.exports.fromData=p5;function p5(i,e){let t=e?.algorithms||[...Vy],r=uc(e?.options);return t.reduce((s,n)=>{let a=cc.createHash(n).update(i).digest("base64"),c=new Ji(`${n}-${a}${r}`,e);if(c.algorithm&&c.digest){let u=c.algorithm;s[u]||(s[u]=[]),s[u].push(c)}return s},new _s)}o(p5,"fromData");li.exports.fromStream=m5;function m5(i,e){let t=zy(e);return new Promise((r,s)=>{i.pipe(t),i.on("error",s),t.on("error",s);let n;t.on("integrity",a=>{n=a}),t.on("end",()=>r(n)),t.resume()})}o(m5,"fromStream");li.exports.checkData=g5;function g5(i,e,t){if(e=dt(e,t),!e||!Object.keys(e).length){if(t?.error)throw Object.assign(new Error("No valid integrity hashes to check against"),{code:"EINTEGRITY"});return!1}let r=e.pickAlgorithm(t),s=cc.createHash(r).update(i).digest("base64"),n=dt({algorithm:r,digest:s}),a=n.match(e,t);if(t=t||{},a||!t.error)return a;if(typeof t.size=="number"&&i.length!==t.size){let c=new Error(`data size mismatch when checking ${e}.
20
+ Wanted: ${t.size}
21
+ Found: ${i.length}`);throw c.code="EBADSIZE",c.found=i.length,c.expected=t.size,c.sri=e,c}else{let c=new Error(`Integrity checksum failed when using ${r}: Wanted ${e}, but got ${n}. (${i.length} bytes)`);throw c.code="EINTEGRITY",c.found=n,c.expected=e,c.algorithm=r,c.sri=e,c}}o(g5,"checkData");li.exports.checkStream=y5;function y5(i,e,t){if(t=t||Object.create(null),t.integrity=e,e=dt(e,t),!e||!Object.keys(e).length)return Promise.reject(Object.assign(new Error("No valid integrity hashes to check against"),{code:"EINTEGRITY"}));let r=zy(t);return new Promise((s,n)=>{i.pipe(r),i.on("error",n),r.on("error",n);let a;r.on("verified",c=>{a=c}),r.on("end",()=>s(a)),r.resume()})}o(y5,"checkStream");li.exports.integrityStream=zy;function zy(i=Object.create(null)){return new qy(i)}o(zy,"integrityStream");li.exports.create=S5;function S5(i){let e=i?.algorithms||[...Vy],t=uc(i?.options),r=e.map(cc.createHash);return{update:o(function(s,n){return r.forEach(a=>a.update(s,n)),this},"update"),digest:o(function(){return e.reduce((n,a)=>{let c=r.shift().digest("base64"),u=new Ji(`${a}-${c}${t}`,i);if(u.algorithm&&u.digest){let l=u.algorithm;n[l]||(n[l]=[]),n[l].push(u)}return n},new _s)},"digest")}}o(S5,"createIntegrity");var E5=cc.getHashes(),r1=["md5","whirlpool","sha1","sha224","sha256","sha384","sha512","sha3","sha3-256","sha3-384","sha3-512","sha3_256","sha3_384","sha3_512"].filter(i=>E5.includes(i));function w5(i,e){return r1.indexOf(i.toLowerCase())>=r1.indexOf(e.toLowerCase())?i:e}o(w5,"getPrioritizedHash")});var s1=d((rme,Hy)=>{(function(){var i;function e(t,r){var s=this instanceof e?this:i;if(s.reset(r),typeof t=="string"&&t.length>0&&s.hash(t),s!==this)return s}o(e,"MurmurHash3"),e.prototype.hash=function(t){var r,s,n,a,c;switch(c=t.length,this.len+=c,s=this.k1,n=0,this.rem){case 0:s^=c>n?t.charCodeAt(n++)&65535:0;case 1:s^=c>n?(t.charCodeAt(n++)&65535)<<8:0;case 2:s^=c>n?(t.charCodeAt(n++)&65535)<<16:0;case 3:s^=c>n?(t.charCodeAt(n)&255)<<24:0,s^=c>n?(t.charCodeAt(n++)&65280)>>8:0}if(this.rem=c+this.rem&3,c-=this.rem,c>0){for(r=this.h1;s=s*11601+(s&65535)*3432906752&4294967295,s=s<<15|s>>>17,s=s*13715+(s&65535)*461832192&4294967295,r^=s,r=r<<13|r>>>19,r=r*5+3864292196&4294967295,!(n>=c);)s=t.charCodeAt(n++)&65535^(t.charCodeAt(n++)&65535)<<8^(t.charCodeAt(n++)&65535)<<16,a=t.charCodeAt(n++),s^=(a&255)<<24^(a&65280)>>8;switch(s=0,this.rem){case 3:s^=(t.charCodeAt(n+2)&65535)<<16;case 2:s^=(t.charCodeAt(n+1)&65535)<<8;case 1:s^=t.charCodeAt(n)&65535}this.h1=r}return this.k1=s,this},e.prototype.result=function(){var t,r;return t=this.k1,r=this.h1,t>0&&(t=t*11601+(t&65535)*3432906752&4294967295,t=t<<15|t>>>17,t=t*13715+(t&65535)*461832192&4294967295,r^=t),r^=this.len,r^=r>>>16,r=r*51819+(r&65535)*2246770688&4294967295,r^=r>>>13,r=r*44597+(r&65535)*3266445312&4294967295,r^=r>>>16,r>>>0},e.prototype.reset=function(t){return this.h1=typeof t=="number"?t:0,this.rem=this.k1=this.len=0,this},i=new e,typeof Hy<"u"?Hy.exports=e:this.MurmurHash3=e})()});var o1=d((nme,n1)=>{"use strict";var _5=s1();n1.exports=function(i){if(i){var e=new _5(i);return("00000000"+e.result().toString(16)).slice(-8)}else return(Math.random().toString(16)+"0000000").slice(2,10)}});var Gy=d((ome,a1)=>{var b5=require("path"),I5=o1();a1.exports=function(i,e,t){return b5.join(i,(e?e+"-":"")+I5(t))}});var Wy=d((ame,O5)=>{O5.exports={name:"cacache",version:"20.0.1","cache-version":{content:"2",index:"5"},description:"Fast, fault-tolerant, cross-platform, disk-based, data-agnostic, content-addressable cache.",main:"lib/index.js",files:["bin/","lib/"],scripts:{test:"tap",snap:"tap",coverage:"tap","test-docker":'docker run -it --rm --name pacotest -v "$PWD":/tmp -w /tmp node:latest npm test',lint:"npm run eslint",npmclilint:"npmcli-lint",lintfix:"npm run eslint -- --fix",postsnap:"npm run lintfix --",postlint:"template-oss-check",posttest:"npm run lint","template-oss-apply":"template-oss-apply --force",eslint:'eslint "**/*.{js,cjs,ts,mjs,jsx,tsx}"'},repository:{type:"git",url:"git+https://github.com/npm/cacache.git"},keywords:["cache","caching","content-addressable","sri","sri hash","subresource integrity","cache","storage","store","file store","filesystem","disk cache","disk storage"],license:"ISC",dependencies:{"@npmcli/fs":"^4.0.0","fs-minipass":"^3.0.0",glob:"^11.0.3","lru-cache":"^11.1.0",minipass:"^7.0.3","minipass-collect":"^2.0.1","minipass-flush":"^1.0.5","minipass-pipeline":"^1.2.4","p-map":"^7.0.2",ssri:"^12.0.0","unique-filename":"^4.0.0"},devDependencies:{"@npmcli/eslint-config":"^5.0.0","@npmcli/template-oss":"4.25.0",tap:"^16.0.0"},engines:{node:"^20.17.0 || >=22.9.0"},templateOSS:{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",windowsCI:!1,version:"4.25.0",publish:"true"},author:"GitHub Inc.",tap:{"nyc-arg":["--exclude","tap-snapshots/**"]}}});var Jy=d((cme,c1)=>{"use strict";c1.exports=v5;function v5(i){return[i.slice(0,2),i.slice(2,4),i.slice(4)]}o(v5,"hashToSegments")});var Nn=d((lme,Ky)=>{"use strict";var C5=Wy()["cache-version"].content,R5=Jy(),u1=require("path"),A5=hi();Ky.exports=T5;function T5(i,e){let t=A5.parse(e,{single:!0});return u1.join(l1(i),t.algorithm,...R5(t.hexDigest()))}o(T5,"contentPath");Ky.exports.contentDir=l1;function l1(i){return u1.join(i,`content-v${C5}`)}o(l1,"contentDir")});var Zy=d((fme,h1)=>{var N5=o((i,{copy:e,wrap:t})=>{let r={};if(i&&typeof i=="object")for(let s of e)i[s]!==void 0&&(r[s]=i[s]);else r[t]=i;return r},"getOptions");h1.exports=N5});var d1=d((pme,f1)=>{var P5=Ss(),D5=o(i=>P5.satisfies(process.version,i,{includePrerelease:!0}),"satisfies");f1.exports={satisfies:D5}});var p1=d((Sme,Xy)=>{"use strict";var{inspect:x5}=require("util"),Yy=class{static{o(this,"SystemError")}constructor(e,t,r){let s=`${t}: ${r.syscall} returned ${r.code} (${r.message})`;r.path!==void 0&&(s+=` ${r.path}`),r.dest!==void 0&&(s+=` => ${r.dest}`),this.code=e,Object.defineProperties(this,{name:{value:"SystemError",enumerable:!1,writable:!0,configurable:!0},message:{value:s,enumerable:!1,writable:!0,configurable:!0},info:{value:r,enumerable:!0,configurable:!0,writable:!1},errno:{get(){return r.errno},set(n){r.errno=n},enumerable:!0,configurable:!0},syscall:{get(){return r.syscall},set(n){r.syscall=n},enumerable:!0,configurable:!0}}),r.path!==void 0&&Object.defineProperty(this,"path",{get(){return r.path},set(n){r.path=n},enumerable:!0,configurable:!0}),r.dest!==void 0&&Object.defineProperty(this,"dest",{get(){return r.dest},set(n){r.dest=n},enumerable:!0,configurable:!0})}toString(){return`${this.name} [${this.code}]: ${this.message}`}[Symbol.for("nodejs.util.inspect.custom")](e,t){return x5(this,{...t,getters:!0,customInspect:!1})}};function Ki(i,e){Xy.exports[i]=class extends Yy{static{o(this,"NodeError")}constructor(r){super(i,e,r)}}}o(Ki,"E");Ki("ERR_FS_CP_DIR_TO_NON_DIR","Cannot overwrite directory with non-directory");Ki("ERR_FS_CP_EEXIST","Target already exists");Ki("ERR_FS_CP_EINVAL","Invalid src or dest");Ki("ERR_FS_CP_FIFO_PIPE","Cannot copy a FIFO pipe");Ki("ERR_FS_CP_NON_DIR_TO_DIR","Cannot overwrite non-directory with directory");Ki("ERR_FS_CP_SOCKET","Cannot copy a socket file");Ki("ERR_FS_CP_SYMLINK_TO_SUBDIRECTORY","Cannot overwrite symlink in subdirectory of self");Ki("ERR_FS_CP_UNKNOWN","Cannot copy an unknown file type");Ki("ERR_FS_EISDIR","Path is a directory");Xy.exports.ERR_INVALID_ARG_TYPE=class extends Error{static{o(this,"ERR_INVALID_ARG_TYPE")}constructor(e,t,r){super(),this.code="ERR_INVALID_ARG_TYPE",this.message=`The ${e} argument must be ${t}. Received ${typeof r}`}}});var x1=d((wme,D1)=>{"use strict";var{ERR_FS_CP_DIR_TO_NON_DIR:L5,ERR_FS_CP_EEXIST:M5,ERR_FS_CP_EINVAL:dh,ERR_FS_CP_FIFO_PIPE:B5,ERR_FS_CP_NON_DIR_TO_DIR:k5,ERR_FS_CP_SOCKET:F5,ERR_FS_CP_SYMLINK_TO_SUBDIRECTORY:U5,ERR_FS_CP_UNKNOWN:j5,ERR_FS_EISDIR:$5,ERR_INVALID_ARG_TYPE:q5}=p1(),{constants:{errno:{EEXIST:V5,EISDIR:z5,EINVAL:Zi,ENOTDIR:H5}}}=require("os"),{chmod:G5,copyFile:W5,lstat:I1,mkdir:O1,readdir:J5,readlink:m1,stat:Pn,symlink:Qy,unlink:v1,utimes:K5}=require("fs/promises"),{dirname:lc,isAbsolute:g1,join:y1,parse:Z5,resolve:hc,sep:Y5,toNamespacedPath:S1}=require("path"),{fileURLToPath:X5}=require("url"),Q5={dereference:!1,errorOnExist:!1,filter:void 0,force:!0,preserveTimestamps:!1,recursive:!1};async function e4(i,e,t){if(t!=null&&typeof t!="object")throw new q5("options",["Object"],t);return t4(S1(E1(i)),S1(E1(e)),{...Q5,...t})}o(e4,"cp");function E1(i){return i!=null&&i.href&&i.origin?X5(i):i}o(E1,"getValidatedPath");async function t4(i,e,t){t.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended","TimestampPrecisionWarning");let r=await C1(i,e,t),{srcStat:s,destStat:n}=r;return await A1(i,s,e),t.filter?T1(w1,n,i,e,t):w1(n,i,e,t)}o(t4,"cpFn");async function C1(i,e,t){let{0:r,1:s}=await i4(i,e,t);if(s){if(R1(r,s))throw new dh({message:"src and dest cannot be the same",path:e,syscall:"cp",errno:Zi});if(r.isDirectory()&&!s.isDirectory())throw new L5({message:`cannot overwrite directory ${i} with non-directory ${e}`,path:e,syscall:"cp",errno:z5});if(!r.isDirectory()&&s.isDirectory())throw new k5({message:`cannot overwrite non-directory ${i} with directory ${e}`,path:e,syscall:"cp",errno:H5})}if(r.isDirectory()&&eS(i,e))throw new dh({message:`cannot copy ${i} to a subdirectory of self ${e}`,path:e,syscall:"cp",errno:Zi});return{srcStat:r,destStat:s}}o(C1,"checkPaths");function R1(i,e){return e.ino&&e.dev&&e.ino===i.ino&&e.dev===i.dev}o(R1,"areIdentical");function i4(i,e,t){let r=t.dereference?s=>Pn(s,{bigint:!0}):s=>I1(s,{bigint:!0});return Promise.all([r(i),r(e).catch(s=>{if(s.code==="ENOENT")return null;throw s})])}o(i4,"getStats");async function w1(i,e,t,r){let s=lc(t);return await r4(s)||await O1(s,{recursive:!0}),ph(i,e,t,r)}o(w1,"checkParentDir");function r4(i){return Pn(i).then(()=>!0,e=>e.code==="ENOENT"?!1:Promise.reject(e))}o(r4,"pathExists");async function A1(i,e,t){let r=hc(lc(i)),s=hc(lc(t));if(s===r||s===Z5(s).root)return;let n;try{n=await Pn(s,{bigint:!0})}catch(a){if(a.code==="ENOENT")return;throw a}if(R1(e,n))throw new dh({message:`cannot copy ${i} to a subdirectory of self ${t}`,path:t,syscall:"cp",errno:Zi});return A1(i,e,s)}o(A1,"checkParentPaths");var _1=o(i=>hc(i).split(Y5).filter(Boolean),"normalizePathToArray");function eS(i,e){let t=_1(i),r=_1(e);return t.every((s,n)=>r[n]===s)}o(eS,"isSrcSubdir");async function T1(i,e,t,r,s,n){if(await s.filter(t,r))return i(e,t,r,s,n)}o(T1,"handleFilter");function s4(i,e,t,r){return r.filter?T1(ph,i,e,t,r):ph(i,e,t,r)}o(s4,"startCopy");async function ph(i,e,t,r){let n=await(r.dereference?Pn:I1)(e);if(n.isDirectory()&&r.recursive)return h4(n,i,e,t,r);if(n.isDirectory())throw new $5({message:`${e} is a directory (not copied)`,path:e,syscall:"cp",errno:Zi});if(n.isFile()||n.isCharacterDevice()||n.isBlockDevice())return n4(n,i,e,t,r);if(n.isSymbolicLink())return d4(i,e,t);throw n.isSocket()?new F5({message:`cannot copy a socket file: ${t}`,path:t,syscall:"cp",errno:Zi}):n.isFIFO()?new B5({message:`cannot copy a FIFO pipe: ${t}`,path:t,syscall:"cp",errno:Zi}):new j5({message:`cannot copy an unknown file type: ${t}`,path:t,syscall:"cp",errno:Zi})}o(ph,"getStatsForCopy");function n4(i,e,t,r,s){return e?o4(i,t,r,s):N1(i,t,r,s)}o(n4,"onFile");async function o4(i,e,t,r){if(r.force)return await v1(t),N1(i,e,t,r);if(r.errorOnExist)throw new M5({message:`${t} already exists`,path:t,syscall:"cp",errno:V5})}o(o4,"mayCopyFile");async function N1(i,e,t,r){return await W5(e,t),r.preserveTimestamps?a4(i.mode,e,t):mh(t,i.mode)}o(N1,"_copyFile");async function a4(i,e,t){return c4(i)&&await u4(t,i),b1(i,e,t)}o(a4,"handleTimestampsAndMode");function c4(i){return(i&128)===0}o(c4,"fileIsNotWritable");function u4(i,e){return mh(i,e|128)}o(u4,"makeFileWritable");async function b1(i,e,t){return await l4(e,t),mh(t,i)}o(b1,"setDestTimestampsAndMode");function mh(i,e){return G5(i,e)}o(mh,"setDestMode");async function l4(i,e){let t=await Pn(i);return K5(e,t.atime,t.mtime)}o(l4,"setDestTimestamps");function h4(i,e,t,r,s){return e?P1(t,r,s):f4(i.mode,t,r,s)}o(h4,"onDir");async function f4(i,e,t,r){return await O1(t),await P1(e,t,r),mh(t,i)}o(f4,"mkDirAndCopy");async function P1(i,e,t){let r=await J5(i);for(let s=0;s<r.length;s++){let n=r[s],a=y1(i,n),c=y1(e,n),{destStat:u}=await C1(a,c,t);await s4(u,a,c,t)}}o(P1,"copyDir");async function d4(i,e,t){let r=await m1(e);if(g1(r)||(r=hc(lc(e),r)),!i)return Qy(r,t);let s;try{s=await m1(t)}catch(a){if(a.code==="EINVAL"||a.code==="UNKNOWN")return Qy(r,t);throw a}if(g1(s)||(s=hc(lc(t),s)),eS(r,s))throw new dh({message:`cannot copy ${r} to a subdirectory of self ${s}`,path:t,syscall:"cp",errno:Zi});if((await Pn(e)).isDirectory()&&eS(s,r))throw new U5({message:`cannot overwrite ${s} with ${r}`,path:t,syscall:"cp",errno:Zi});return p4(r,t)}o(d4,"onLink");async function p4(i,e){return await v1(e),Qy(i,e)}o(p4,"copyLink");D1.exports=e4});var M1=d((bme,L1)=>{var m4=require("fs/promises"),g4=Zy(),y4=d1(),S4=x1(),E4=y4.satisfies(">=16.7.0"),w4=o(async(i,e,t)=>{let r=g4(t,{copy:["dereference","errorOnExist","filter","force","preserveTimestamps","recursive"]});return E4?m4.cp(i,e,r):S4(i,e,r)},"cp");L1.exports=w4});var k1=d((Ome,B1)=>{var{join:_4,sep:b4}=require("path"),I4=Zy(),{mkdir:O4,mkdtemp:v4,rm:C4}=require("fs/promises"),R4=o(async(i,e,t)=>{let r=I4(t,{copy:["tmpPrefix"]});await O4(i,{recursive:!0});let s=await v4(_4(`${i}${b4}`,r.tmpPrefix||"")),n,a;try{a=await e(s)}catch(c){n=c}try{await C4(s,{force:!0,recursive:!0})}catch{}if(n)throw n;return a},"withTempDir");B1.exports=R4});var $1=d((Cme,j1)=>{var{readdir:F1}=require("fs/promises"),{join:U1}=require("path"),A4=o(async i=>{let e=[];for(let t of await F1(i))if(t.startsWith("@"))for(let r of await F1(U1(i,t)))e.push(U1(t,r));else e.push(t);return e},"readdirScoped");j1.exports=A4});var W1=d((Ame,G1)=>{var{dirname:q1,join:V1,resolve:z1,relative:T4,isAbsolute:N4}=require("path"),fi=require("fs/promises"),P4=o(async i=>{try{return await fi.access(i),!0}catch(e){return e.code!=="ENOENT"}},"pathExists"),H1=o(async(i,e,t={},r=!0,s=[])=>{if(!i||!e)throw new TypeError("`source` and `destination` file required");if(t={overwrite:!0,...t},!t.overwrite&&await P4(e))throw new Error(`The destination file exists: ${e}`);await fi.mkdir(q1(e),{recursive:!0});try{await fi.rename(i,e)}catch(n){if(n.code==="EXDEV"||n.code==="EPERM"){let a=await fi.lstat(i);if(a.isDirectory()){let c=await fi.readdir(i);await Promise.all(c.map(u=>H1(V1(i,u),V1(e,u),t,!1,s)))}else a.isSymbolicLink()?s.push({source:i,destination:e}):await fi.copyFile(i,e)}else throw n}r&&(await Promise.all(s.map(async({source:n,destination:a})=>{let c=await fi.readlink(n);N4(c)&&(c=z1(a,T4(n,c)));let u="file";try{u=await fi.stat(z1(q1(n),c)),u.isDirectory()&&(u="junction")}catch{}await fi.symlink(c,a,u)})),await fi.rm(i,{recursive:!0,force:!0}))},"moveFile");G1.exports=H1});var gh=d((Nme,J1)=>{"use strict";var D4=M1(),x4=k1(),L4=$1(),M4=W1();J1.exports={cp:D4,withTempDir:x4,readdirScoped:L4,moveFile:M4}});var yh={};h2(yh,{default:()=>K1,pMapIterable:()=>B4,pMapSkip:()=>fc});async function K1(i,e,{concurrency:t=Number.POSITIVE_INFINITY,stopOnError:r=!0,signal:s}={}){return new Promise((n,a)=>{if(i[Symbol.iterator]===void 0&&i[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof i})`);if(typeof e!="function")throw new TypeError("Mapper function is required");if(!(Number.isSafeInteger(t)&&t>=1||t===Number.POSITIVE_INFINITY))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${t}\` (${typeof t})`);let c=[],u=[],l=new Map,h=!1,f=!1,p=!1,m=0,y=0,g=i[Symbol.iterator]===void 0?i[Symbol.asyncIterator]():i[Symbol.iterator](),S=o(()=>{b(s.reason)},"signalListener"),E=o(()=>{s?.removeEventListener("abort",S)},"cleanup"),_=o(I=>{n(I),E()},"resolve"),b=o(I=>{h=!0,f=!0,a(I),E()},"reject");s&&(s.aborted&&b(s.reason),s.addEventListener("abort",S,{once:!0}));let w=o(async()=>{if(f)return;let I=await g.next(),v=y;if(y++,I.done){if(p=!0,m===0&&!f){if(!r&&u.length>0){b(new AggregateError(u));return}if(f=!0,l.size===0){_(c);return}let N=[];for(let[P,U]of c.entries())l.get(P)!==fc&&N.push(U);_(N)}return}m++,(async()=>{try{let N=await I.value;if(f)return;let P=await e(N,v);P===fc&&l.set(v,P),c[v]=P,m--,await w()}catch(N){if(r)b(N);else{u.push(N),m--;try{await w()}catch(P){b(P)}}}})()},"next");(async()=>{for(let I=0;I<t;I++){try{await w()}catch(v){b(v);break}if(p||h)break}})()})}function B4(i,e,{concurrency:t=Number.POSITIVE_INFINITY,backpressure:r=t}={}){if(i[Symbol.iterator]===void 0&&i[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof i})`);if(typeof e!="function")throw new TypeError("Mapper function is required");if(!(Number.isSafeInteger(t)&&t>=1||t===Number.POSITIVE_INFINITY))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${t}\` (${typeof t})`);if(!(Number.isSafeInteger(r)&&r>=t||r===Number.POSITIVE_INFINITY))throw new TypeError(`Expected \`backpressure\` to be an integer from \`concurrency\` (${t}) and up or \`Infinity\`, got \`${r}\` (${typeof r})`);return{async*[Symbol.asyncIterator](){let s=i[Symbol.asyncIterator]===void 0?i[Symbol.iterator]():i[Symbol.asyncIterator](),n=[],a=0,c=!1,u=0;function l(){if(c||!(a<t&&n.length<r))return;let h=(async()=>{let{done:f,value:p}=await s.next();if(f)return{done:!0};a++,l();try{let m=await e(await p,u++);if(a--,m===fc){let y=n.indexOf(h);y>0&&n.splice(y,1)}return l(),{done:!1,value:m}}catch(m){return c=!0,{error:m}}})();n.push(h)}for(o(l,"trySpawn"),l();n.length>0;){let{error:h,done:f,value:p}=await n[0];if(n.shift(),h)throw h;if(f)return;l(),p!==fc&&(yield p)}}}}var fc,Sh=l2(()=>{o(K1,"pMap");o(B4,"pMapIterable");fc=Symbol("skip")});var Dn=d((xme,pt)=>{"use strict";var k4=require("crypto"),{appendFile:F4,mkdir:rS,readFile:U4,readdir:j4,rm:Z1,writeFile:$4}=require("fs/promises"),{Minipass:q4}=te(),di=require("path"),V4=hi(),z4=Gy(),H4=Nn(),G4=Jy(),W4=Wy()["cache-version"].index,{moveFile:J4}=gh(),tS=5;pt.exports.NotFoundError=class extends Error{static{o(this,"NotFoundError")}constructor(e,t){super(`No cache entry for ${t} found in ${e}`),this.code="ENOENT",this.cache=e,this.key=t}};pt.exports.compact=K4;async function K4(i,e,t,r={}){let s=dc(i,e),n=await Eh(s),a=[];for(let p=n.length-1;p>=0;--p){let m=n[p];if(m.integrity===null&&!r.validateEntry)break;(!r.validateEntry||r.validateEntry(m)===!0)&&(a.length===0||!a.find(y=>t(y,m)))&&a.unshift(m)}let c=`
22
+ `+a.map(p=>{let m=JSON.stringify(p);return`${wh(m)} ${m}`}).join(`
23
+ `),u=o(async()=>{let p=z4(di.join(i,"tmp"),r.tmpPrefix);return await rS(di.dirname(p),{recursive:!0}),{target:p,moved:!1}},"setup"),l=o(async p=>{if(!p.moved)return Z1(p.target,{recursive:!0,force:!0})},"teardown"),h=o(async p=>{await $4(p.target,c,{flag:"wx"}),await rS(di.dirname(s),{recursive:!0}),await J4(p.target,s),p.moved=!0},"write"),f=await u();try{await h(f)}finally{await l(f)}return a.reverse().map(p=>_h(i,p,!0))}o(K4,"compact");pt.exports.insert=Y1;async function Y1(i,e,t,r={}){let{metadata:s,size:n,time:a}=r,c=dc(i,e),u={key:e,integrity:t&&V4.stringify(t),time:a||Date.now(),size:n,metadata:s};try{await rS(di.dirname(c),{recursive:!0});let l=JSON.stringify(u);await F4(c,`
24
+ ${wh(l)} ${l}`)}catch(l){if(l.code==="ENOENT")return;throw l}return _h(i,u)}o(Y1,"insert");pt.exports.find=Z4;async function Z4(i,e){let t=dc(i,e);try{return(await Eh(t)).reduce((s,n)=>n&&n.key===e?_h(i,n):s,null)}catch(r){if(r.code==="ENOENT")return null;throw r}}o(Z4,"find");pt.exports.delete=Y4;function Y4(i,e,t={}){if(!t.removeFully)return Y1(i,e,null,t);let r=dc(i,e);return Z1(r,{recursive:!0,force:!0})}o(Y4,"del");pt.exports.lsStream=X1;function X1(i){let e=sS(i),t=new q4({objectMode:!0});return Promise.resolve().then(async()=>{let{default:r}=await Promise.resolve().then(()=>(Sh(),yh)),s=await iS(e);return await r(s,async n=>{let a=di.join(e,n),c=await iS(a);await r(c,async u=>{let l=di.join(a,u),h=await iS(l);await r(h,async f=>{let p=di.join(l,f);try{let y=(await Eh(p)).reduce((g,S)=>(g.set(S.key,S),g),new Map);for(let g of y.values()){let S=_h(i,g);S&&t.write(S)}}catch(m){if(m.code==="ENOENT")return;throw m}},{concurrency:tS})},{concurrency:tS})},{concurrency:tS}),t.end(),t}).catch(r=>t.emit("error",r)),t}o(X1,"lsStream");pt.exports.ls=X4;async function X4(i){return(await X1(i).collect()).reduce((t,r)=>(t[r.key]=r,t),{})}o(X4,"ls");pt.exports.bucketEntries=Eh;async function Eh(i,e){let t=await U4(i,"utf8");return Q4(t,e)}o(Eh,"bucketEntries");function Q4(i){let e=[];return i.split(`
25
+ `).forEach(t=>{if(!t)return;let r=t.split(" ");if(!r[1]||wh(r[1])!==r[0])return;let s;try{s=JSON.parse(r[1])}catch{}s&&e.push(s)}),e}o(Q4,"_bucketEntries");pt.exports.bucketDir=sS;function sS(i){return di.join(i,`index-v${W4}`)}o(sS,"bucketDir");pt.exports.bucketPath=dc;function dc(i,e){let t=Q1(e);return di.join.apply(di,[sS(i)].concat(G4(t)))}o(dc,"bucketPath");pt.exports.hashKey=Q1;function Q1(i){return eN(i,"sha256")}o(Q1,"hashKey");pt.exports.hashEntry=wh;function wh(i){return eN(i,"sha1")}o(wh,"hashEntry");function eN(i,e){return k4.createHash(e).update(i).digest("hex")}o(eN,"hash");function _h(i,e,t){return!e.integrity&&!t?null:{key:e.key,integrity:e.integrity,path:e.integrity?H4(i,e.integrity):void 0,size:e.size,time:e.time,metadata:e.metadata}}o(_h,"formatEntry");function iS(i){return j4(i).catch(e=>{if(e.code==="ENOENT"||e.code==="ENOTDIR")return[];throw e})}o(iS,"readdirOrEmpty")});var pc=d((Mme,xn)=>{"use strict";var{LRUCache:e6}=hs(),bh=new e6({max:500,maxSize:50*1024*1024,ttl:180*1e3,sizeCalculation:o((i,e)=>e.startsWith("key:")?i.data.length:i.length,"sizeCalculation")});xn.exports.clearMemoized=t6;function t6(){let i={};return bh.forEach((e,t)=>{i[t]=e}),bh.clear(),i}o(t6,"clearMemoized");xn.exports.put=i6;function i6(i,e,t,r){Ih(r).set(`key:${i}:${e.key}`,{entry:e,data:t}),tN(i,e.integrity,t,r)}o(i6,"put");xn.exports.put.byDigest=tN;function tN(i,e,t,r){Ih(r).set(`digest:${i}:${e}`,t)}o(tN,"putDigest");xn.exports.get=r6;function r6(i,e,t){return Ih(t).get(`key:${i}:${e}`)}o(r6,"get");xn.exports.get.byDigest=s6;function s6(i,e,t){return Ih(t).get(`digest:${i}:${e}`)}o(s6,"getDigest");var nS=class{static{o(this,"ObjProxy")}constructor(e){this.obj=e}get(e){return this.obj[e]}set(e,t){this.obj[e]=t}};function Ih(i){return!i||!i.memoize?bh:i.memoize.get&&i.memoize.set?i.memoize:typeof i.memoize=="object"?new nS(i.memoize):bh}o(Ih,"pickMem")});var jn=d(gc=>{"use strict";var{Minipass:n6}=te(),o6=require("events").EventEmitter,et=require("fs"),a6=et.writev,Fn=Symbol("_autoClose"),Kt=Symbol("_close"),mc=Symbol("_ended"),Z=Symbol("_fd"),iN=Symbol("_finished"),vr=Symbol("_flags"),oS=Symbol("_flush"),cS=Symbol("_handleChunk"),uS=Symbol("_makeBuf"),Ah=Symbol("_mode"),Oh=Symbol("_needDrain"),Bn=Symbol("_onerror"),Un=Symbol("_onopen"),aS=Symbol("_onread"),Ln=Symbol("_onwrite"),Cr=Symbol("_open"),Yi=Symbol("_path"),Is=Symbol("_pos"),pi=Symbol("_queue"),Mn=Symbol("_read"),rN=Symbol("_readSize"),Or=Symbol("_reading"),vh=Symbol("_remain"),sN=Symbol("_size"),Ch=Symbol("_write"),bs=Symbol("_writing"),Rh=Symbol("_defaultFlag"),kn=Symbol("_errored"),Th=class extends n6{static{o(this,"ReadStream")}constructor(e,t){if(t=t||{},super(t),this.readable=!0,this.writable=!1,typeof e!="string")throw new TypeError("path must be a string");this[kn]=!1,this[Z]=typeof t.fd=="number"?t.fd:null,this[Yi]=e,this[rN]=t.readSize||16*1024*1024,this[Or]=!1,this[sN]=typeof t.size=="number"?t.size:1/0,this[vh]=this[sN],this[Fn]=typeof t.autoClose=="boolean"?t.autoClose:!0,typeof this[Z]=="number"?this[Mn]():this[Cr]()}get fd(){return this[Z]}get path(){return this[Yi]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[Cr](){et.open(this[Yi],"r",(e,t)=>this[Un](e,t))}[Un](e,t){e?this[Bn](e):(this[Z]=t,this.emit("open",t),this[Mn]())}[uS](){return Buffer.allocUnsafe(Math.min(this[rN],this[vh]))}[Mn](){if(!this[Or]){this[Or]=!0;let e=this[uS]();if(e.length===0)return process.nextTick(()=>this[aS](null,0,e));et.read(this[Z],e,0,e.length,null,(t,r,s)=>this[aS](t,r,s))}}[aS](e,t,r){this[Or]=!1,e?this[Bn](e):this[cS](t,r)&&this[Mn]()}[Kt](){if(this[Fn]&&typeof this[Z]=="number"){let e=this[Z];this[Z]=null,et.close(e,t=>t?this.emit("error",t):this.emit("close"))}}[Bn](e){this[Or]=!0,this[Kt](),this.emit("error",e)}[cS](e,t){let r=!1;return this[vh]-=e,e>0&&(r=super.write(e<t.length?t.slice(0,e):t)),(e===0||this[vh]<=0)&&(r=!1,this[Kt](),super.end()),r}emit(e,t){switch(e){case"prefinish":case"finish":break;case"drain":typeof this[Z]=="number"&&this[Mn]();break;case"error":return this[kn]?void 0:(this[kn]=!0,super.emit(e,t));default:return super.emit(e,t)}}},lS=class extends Th{static{o(this,"ReadStreamSync")}[Cr](){let e=!0;try{this[Un](null,et.openSync(this[Yi],"r")),e=!1}finally{e&&this[Kt]()}}[Mn](){let e=!0;try{if(!this[Or]){this[Or]=!0;do{let t=this[uS](),r=t.length===0?0:et.readSync(this[Z],t,0,t.length,null);if(!this[cS](r,t))break}while(!0);this[Or]=!1}e=!1}finally{e&&this[Kt]()}}[Kt](){if(this[Fn]&&typeof this[Z]=="number"){let e=this[Z];this[Z]=null,et.closeSync(e),this.emit("close")}}},Nh=class extends o6{static{o(this,"WriteStream")}constructor(e,t){t=t||{},super(t),this.readable=!1,this.writable=!0,this[kn]=!1,this[bs]=!1,this[mc]=!1,this[Oh]=!1,this[pi]=[],this[Yi]=e,this[Z]=typeof t.fd=="number"?t.fd:null,this[Ah]=t.mode===void 0?438:t.mode,this[Is]=typeof t.start=="number"?t.start:null,this[Fn]=typeof t.autoClose=="boolean"?t.autoClose:!0;let r=this[Is]!==null?"r+":"w";this[Rh]=t.flags===void 0,this[vr]=this[Rh]?r:t.flags,this[Z]===null&&this[Cr]()}emit(e,t){if(e==="error"){if(this[kn])return;this[kn]=!0}return super.emit(e,t)}get fd(){return this[Z]}get path(){return this[Yi]}[Bn](e){this[Kt](),this[bs]=!0,this.emit("error",e)}[Cr](){et.open(this[Yi],this[vr],this[Ah],(e,t)=>this[Un](e,t))}[Un](e,t){this[Rh]&&this[vr]==="r+"&&e&&e.code==="ENOENT"?(this[vr]="w",this[Cr]()):e?this[Bn](e):(this[Z]=t,this.emit("open",t),this[bs]||this[oS]())}end(e,t){return e&&this.write(e,t),this[mc]=!0,!this[bs]&&!this[pi].length&&typeof this[Z]=="number"&&this[Ln](null,0),this}write(e,t){return typeof e=="string"&&(e=Buffer.from(e,t)),this[mc]?(this.emit("error",new Error("write() after end()")),!1):this[Z]===null||this[bs]||this[pi].length?(this[pi].push(e),this[Oh]=!0,!1):(this[bs]=!0,this[Ch](e),!0)}[Ch](e){et.write(this[Z],e,0,e.length,this[Is],(t,r)=>this[Ln](t,r))}[Ln](e,t){e?this[Bn](e):(this[Is]!==null&&(this[Is]+=t),this[pi].length?this[oS]():(this[bs]=!1,this[mc]&&!this[iN]?(this[iN]=!0,this[Kt](),this.emit("finish")):this[Oh]&&(this[Oh]=!1,this.emit("drain"))))}[oS](){if(this[pi].length===0)this[mc]&&this[Ln](null,0);else if(this[pi].length===1)this[Ch](this[pi].pop());else{let e=this[pi];this[pi]=[],a6(this[Z],e,this[Is],(t,r)=>this[Ln](t,r))}}[Kt](){if(this[Fn]&&typeof this[Z]=="number"){let e=this[Z];this[Z]=null,et.close(e,t=>t?this.emit("error",t):this.emit("close"))}}},hS=class extends Nh{static{o(this,"WriteStreamSync")}[Cr](){let e;if(this[Rh]&&this[vr]==="r+")try{e=et.openSync(this[Yi],this[vr],this[Ah])}catch(t){if(t.code==="ENOENT")return this[vr]="w",this[Cr]();throw t}else e=et.openSync(this[Yi],this[vr],this[Ah]);this[Un](null,e)}[Kt](){if(this[Fn]&&typeof this[Z]=="number"){let e=this[Z];this[Z]=null,et.closeSync(e),this.emit("close")}}[Ch](e){let t=!0;try{this[Ln](null,et.writeSync(this[Z],e,0,e.length,this[Is])),t=!1}finally{if(t)try{this[Kt]()}catch{}}}};gc.ReadStream=Th;gc.ReadStreamSync=lS;gc.WriteStream=Nh;gc.WriteStreamSync=hS});var dS=d((Ume,$n)=>{"use strict";var yc=require("fs/promises"),c6=jn(),fS=hi(),u6=Nn(),nN=Tn();$n.exports=l6;var oN=64*1024*1024;async function l6(i,e,t={}){let{size:r}=t,{stat:s,cpath:n,sri:a}=await Sc(i,e,async(u,l)=>({stat:r?{size:r}:await yc.stat(u),cpath:u,sri:l}));if(s.size>oN)return aN(n,s.size,a,new nN).concat();let c=await yc.readFile(n,{encoding:null});if(s.size!==c.length)throw d6(s.size,c.length);if(!fS.checkData(c,a))throw p6(a,n);return c}o(l6,"read");var aN=o((i,e,t,r)=>(r.push(new c6.ReadStream(i,{size:e,readSize:oN}),fS.integrityStream({integrity:t,size:e})),r),"readPipeline");$n.exports.stream=cN;$n.exports.readStream=cN;function cN(i,e,t={}){let{size:r}=t,s=new nN;return Promise.resolve().then(async()=>{let{stat:n,cpath:a,sri:c}=await Sc(i,e,async(u,l)=>({stat:r?{size:r}:await yc.stat(u),cpath:u,sri:l}));return aN(a,n.size,c,s)}).catch(n=>s.emit("error",n)),s}o(cN,"readStream");$n.exports.copy=h6;function h6(i,e,t){return Sc(i,e,r=>yc.copyFile(r,t))}o(h6,"copy");$n.exports.hasContent=f6;async function f6(i,e){if(!e)return!1;try{return await Sc(i,e,async(t,r)=>{let s=await yc.stat(t);return{size:s.size,sri:r,stat:s}})}catch(t){if(t.code==="ENOENT")return!1;if(t.code==="EPERM"){if(process.platform!=="win32")throw t;return!1}}}o(f6,"hasContent");async function Sc(i,e,t){let r=fS.parse(e),s=r.pickAlgorithm(),n=r[s];if(n.length<=1){let a=u6(i,n[0]);return t(a,n[0])}else{let a=await Promise.all(n.map(async l=>{try{return await Sc(i,l,t)}catch(h){return h.code==="ENOENT"?Object.assign(new Error("No matching content found for "+r.toString()),{code:"ENOENT"}):h}})),c=a.find(l=>!(l instanceof Error));if(c)return c;let u=a.find(l=>l.code==="ENOENT");throw u||a.find(l=>l instanceof Error)}}o(Sc,"withContentSri");function d6(i,e){let t=new Error(`Bad data size: expected inserted data to be ${i} bytes, but got ${e} instead`);return t.expected=i,t.found=e,t.code="EBADSIZE",t}o(d6,"sizeError");function p6(i,e){let t=new Error(`Integrity verification failed for ${i} (${e})`);return t.code="EINTEGRITY",t.sri=i,t.path=e,t}o(p6,"integrityError")});var fN=d(($me,Qi)=>{"use strict";var uN=Ty(),{Minipass:lN}=te(),hN=Tn(),Os=Dn(),Xi=pc(),vs=dS();async function m6(i,e,t={}){let{integrity:r,memoize:s,size:n}=t,a=Xi.get(i,e,t);if(a&&s!==!1)return{metadata:a.entry.metadata,data:a.data,integrity:a.entry.integrity,size:a.entry.size};let c=await Os.find(i,e,t);if(!c)throw new Os.NotFoundError(i,e);let u=await vs(i,c.integrity,{integrity:r,size:n});return s&&Xi.put(i,c,u,t),{data:u,metadata:c.metadata,size:c.size,integrity:c.integrity}}o(m6,"getData");Qi.exports=m6;async function g6(i,e,t={}){let{integrity:r,memoize:s,size:n}=t,a=Xi.get.byDigest(i,e,t);if(a&&s!==!1)return a;let c=await vs(i,e,{integrity:r,size:n});return s&&Xi.put.byDigest(i,e,c,t),c}o(g6,"getDataByDigest");Qi.exports.byDigest=g6;var y6=o(i=>{let e=new lN;return e.on("newListener",function(t,r){t==="metadata"&&r(i.entry.metadata),t==="integrity"&&r(i.entry.integrity),t==="size"&&r(i.entry.size)}),e.end(i.data),e},"getMemoizedStream");function S6(i,e,t={}){let{memoize:r,size:s}=t,n=Xi.get(i,e,t);if(n&&r!==!1)return y6(n);let a=new hN;return Promise.resolve().then(async()=>{let c=await Os.find(i,e);if(!c)throw new Os.NotFoundError(i,e);a.emit("metadata",c.metadata),a.emit("integrity",c.integrity),a.emit("size",c.size),a.on("newListener",function(l,h){l==="metadata"&&h(c.metadata),l==="integrity"&&h(c.integrity),l==="size"&&h(c.size)});let u=vs.readStream(i,c.integrity,{...t,size:typeof s!="number"?c.size:s});if(r){let l=new uN.PassThrough;l.on("collect",h=>Xi.put(i,c,h,t)),a.unshift(l)}return a.unshift(u),a}).catch(c=>a.emit("error",c)),a}o(S6,"getStream");Qi.exports.stream=S6;function E6(i,e,t={}){let{memoize:r}=t,s=Xi.get.byDigest(i,e,t);if(s&&r!==!1){let n=new lN;return n.end(s),n}else{let n=vs.readStream(i,e,t);if(!r)return n;let a=new uN.PassThrough;return a.on("collect",c=>Xi.put.byDigest(i,e,c,t)),new hN(n,a)}}o(E6,"getStreamDigest");Qi.exports.stream.byDigest=E6;function w6(i,e,t={}){let{memoize:r}=t,s=Xi.get(i,e,t);return s&&r!==!1?Promise.resolve(s.entry):Os.find(i,e)}o(w6,"info");Qi.exports.info=w6;async function _6(i,e,t,r={}){let s=await Os.find(i,e,r);if(!s)throw new Os.NotFoundError(i,e);return await vs.copy(i,s.integrity,t,r),{metadata:s.metadata,size:s.size,integrity:s.integrity}}o(_6,"copy");Qi.exports.copy=_6;async function b6(i,e,t,r={}){return await vs.copy(i,e,t,r),e}o(b6,"copyByDigest");Qi.exports.copy.byDigest=b6;Qi.exports.hasContent=vs.hasContent});var Ph=d((Vme,gN)=>{var I6=hh(),dN=Symbol("_flush"),pN=Symbol("_flushed"),mN=Symbol("_flushing"),pS=class extends I6{static{o(this,"Flush")}constructor(e={}){if(typeof e=="function"&&(e={flush:e}),super(e),typeof e.flush!="function"&&typeof this.flush!="function")throw new TypeError("must provide flush function in options");this[dN]=e.flush||this.flush}emit(e,...t){if(e!=="end"&&e!=="finish"||this[pN])return super.emit(e,...t);if(this[mN])return;this[mN]=!0;let r=o(n=>{this[pN]=!0,n?super.emit("error",n):super.emit("end")},"afterFlush"),s=this[dN](r);s&&s.then&&s.then(()=>r(),n=>r(n))}};gN.exports=pS});var _N=d((Hme,SS)=>{"use strict";var yN=require("events"),O6=Nn(),wc=require("fs/promises"),{moveFile:v6}=gh(),{Minipass:C6}=te(),SN=Tn(),R6=Ph(),mS=require("path"),gS=hi(),A6=Gy(),T6=jn();SS.exports=N6;var Ec=new Map;async function N6(i,e,t={}){let{algorithms:r,size:s,integrity:n}=t;if(typeof s=="number"&&e.length!==s)throw L6(s,e.length);let a=gS.fromData(e,r?{algorithms:r}:{});if(n&&!gS.checkData(e,n,t))throw M6(n,a);for(let c in a){let u=await EN(i,t),l=a[c].toString();try{await wc.writeFile(u.target,e,{flag:"wx"}),await wN(u,i,l,t)}finally{u.moved||await wc.rm(u.target,{recursive:!0,force:!0})}}return{integrity:a,size:e.length}}o(N6,"write");SS.exports.stream=P6;var yS=class extends R6{static{o(this,"CacacheWriteStream")}constructor(e,t){super(),this.opts=t,this.cache=e,this.inputStream=new C6,this.inputStream.on("error",r=>this.emit("error",r)),this.inputStream.on("drain",()=>this.emit("drain")),this.handleContentP=null}write(e,t,r){return this.handleContentP||(this.handleContentP=D6(this.inputStream,this.cache,this.opts),this.handleContentP.catch(s=>this.emit("error",s))),this.inputStream.write(e,t,r)}flush(e){this.inputStream.end(()=>{if(!this.handleContentP){let t=new Error("Cache input stream was empty");return t.code="ENODATA",Promise.reject(t).catch(e)}this.handleContentP.then(t=>{t.integrity&&this.emit("integrity",t.integrity),t.size!==null&&this.emit("size",t.size),e()},t=>e(t))})}};function P6(i,e={}){return new yS(i,e)}o(P6,"writeStream");async function D6(i,e,t){let r=await EN(e,t);try{let s=await x6(i,e,r.target,t);return await wN(r,e,s.integrity,t),s}finally{r.moved||await wc.rm(r.target,{recursive:!0,force:!0})}}o(D6,"handleContent");async function x6(i,e,t,r){let s=new T6.WriteStream(t,{flags:"wx"});if(r.integrityEmitter){let[l,h]=await Promise.all([yN.once(r.integrityEmitter,"integrity").then(f=>f[0]),yN.once(r.integrityEmitter,"size").then(f=>f[0]),new SN(i,s).promise()]);return{integrity:l,size:h}}let n,a,c=gS.integrityStream({integrity:r.integrity,algorithms:r.algorithms,size:r.size});return c.on("integrity",l=>{n=l}),c.on("size",l=>{a=l}),await new SN(i,c,s).promise(),{integrity:n,size:a}}o(x6,"pipeToTmp");async function EN(i,e){let t=A6(mS.join(i,"tmp"),e.tmpPrefix);return await wc.mkdir(mS.dirname(t),{recursive:!0}),{target:t,moved:!1}}o(EN,"makeTmp");async function wN(i,e,t){let r=O6(e,t),s=mS.dirname(r);return Ec.has(r)||Ec.set(r,wc.mkdir(s,{recursive:!0}).then(async()=>(await v6(i.target,r,{overwrite:!1}),i.moved=!0,i.moved)).catch(n=>{if(!n.message.startsWith("The destination file exists"))throw Object.assign(n,{code:"EEXIST"})}).finally(()=>{Ec.delete(r)})),Ec.get(r)}o(wN,"moveToDestination");function L6(i,e){let t=new Error(`Bad data size: expected inserted data to be ${i} bytes, but got ${e} instead`);return t.expected=i,t.found=e,t.code="EBADSIZE",t}o(L6,"sizeError");function M6(i,e){let t=new Error(`Integrity check failed:
26
+ Wanted: ${i}
27
+ Found: ${e}`);return t.code="EINTEGRITY",t.expected=i,t.found=e,t}o(M6,"checksumError")});var CN=d((Wme,ES)=>{"use strict";var bN=Dn(),IN=pc(),ON=_N(),B6=Ph(),{PassThrough:k6}=Ty(),F6=Tn(),vN=o(i=>({algorithms:["sha512"],...i}),"putOpts");ES.exports=U6;async function U6(i,e,t,r={}){let{memoize:s}=r;r=vN(r);let n=await ON(i,t,r),a=await bN.insert(i,e,n.integrity,{...r,size:n.size});return s&&IN.put(i,a,t,r),n.integrity}o(U6,"putData");ES.exports.stream=j6;function j6(i,e,t={}){let{memoize:r}=t;t=vN(t);let s,n,a,c,u=new F6;if(r){let h=new k6().on("collect",f=>{c=f});u.push(h)}let l=ON.stream(i,t).on("integrity",h=>{s=h}).on("size",h=>{n=h}).on("error",h=>{a=h});return u.push(l),u.push(new B6({async flush(){if(!a){let h=await bN.insert(i,e,s,{...t,size:n});r&&c&&IN.put(i,h,c,t),u.emit("integrity",s),u.emit("size",n)}}})),u}o(j6,"putStream")});var wS=d((Kme,AN)=>{"use strict";var{glob:$6}=Ig(),RN=require("path"),q6=o(i=>i.split(RN.win32.sep).join(RN.posix.sep),"globify");AN.exports=(i,e)=>$6(q6(i),e)});var NN=d((Yme,TN)=>{"use strict";var V6=require("fs/promises"),z6=Nn(),{hasContent:H6}=dS();TN.exports=G6;async function G6(i,e){let t=await H6(i,e);return t&&t.sri?(await V6.rm(z6(i,t.sri),{recursive:!0,force:!0}),!0):!1}o(G6,"rm")});var DN=d((Qme,_c)=>{"use strict";var{rm:W6}=require("fs/promises"),J6=wS(),K6=Dn(),_S=pc(),Z6=require("path"),Y6=NN();_c.exports=PN;_c.exports.entry=PN;function PN(i,e,t){return _S.clearMemoized(),K6.delete(i,e,t)}o(PN,"entry");_c.exports.content=X6;function X6(i,e){return _S.clearMemoized(),Y6(i,e)}o(X6,"content");_c.exports.all=Q6;async function Q6(i){_S.clearMemoized();let e=await J6(Z6.join(i,"*(content-*|index-*)"),{silent:!0,nosort:!0});return Promise.all(e.map(t=>W6(t,{recursive:!0,force:!0})))}o(Q6,"all")});var LN=d((tge,vS)=>{"use strict";var{mkdir:eJ,readFile:tJ,rm:IS,stat:OS,truncate:iJ,writeFile:rJ}=require("fs/promises"),xN=Nn(),sJ=jn(),nJ=wS(),qn=Dn(),Dh=require("path"),bS=hi(),oJ=o((i,e)=>Object.prototype.hasOwnProperty.call(i,e),"hasOwnProperty"),aJ=o(i=>({concurrency:20,log:{silly(){}},...i}),"verifyOpts");vS.exports=cJ;async function cJ(i,e){e=aJ(e),e.log.silly("verify","verifying cache at",i);let t=[uJ,hJ,fJ,pJ,gJ,yJ,lJ],r={};for(let s of t){let n=s.name,a=new Date,c=await s(i,e);c&&Object.keys(c).forEach(l=>{r[l]=c[l]});let u=new Date;r.runTime||(r.runTime={}),r.runTime[n]=u-a}return r.runTime.total=r.endTime-r.startTime,e.log.silly("verify","verification finished for",i,"in",`${r.runTime.total}ms`),r}o(cJ,"verify");async function uJ(){return{startTime:new Date}}o(uJ,"markStartTime");async function lJ(){return{endTime:new Date}}o(lJ,"markEndTime");async function hJ(i,e){return e.log.silly("verify","fixing cache permissions"),await eJ(i,{recursive:!0}),null}o(hJ,"fixPerms");async function fJ(i,e){e.log.silly("verify","garbage collecting content");let{default:t}=await Promise.resolve().then(()=>(Sh(),yh)),r=qn.lsStream(i),s=new Set;r.on("data",u=>{if(e.filter&&!e.filter(u))return;let l=bS.parse(u.integrity);for(let h in l)s.add(l[h].toString())}),await new Promise((u,l)=>{r.on("end",u).on("error",l)});let n=xN.contentDir(i),a=await nJ(Dh.join(n,"**"),{follow:!1,nodir:!0,nosort:!0}),c={verifiedContent:0,reclaimedCount:0,reclaimedSize:0,badContentCount:0,keptSize:0};return await t(a,async u=>{let l=u.split(/[/\\]/),h=l.slice(l.length-3).join(""),f=l[l.length-4],p=bS.fromHex(h,f);if(s.has(p.toString())){let m=await dJ(u,p);m.valid?(c.verifiedContent++,c.keptSize+=m.size):(c.reclaimedCount++,c.badContentCount++,c.reclaimedSize+=m.size)}else{c.reclaimedCount++;let m=await OS(u);await IS(u,{recursive:!0,force:!0}),c.reclaimedSize+=m.size}return c},{concurrency:e.concurrency}),c}o(fJ,"garbageCollect");async function dJ(i,e){let t={};try{let{size:r}=await OS(i);t.size=r,t.valid=!0,await bS.checkStream(new sJ.ReadStream(i),e)}catch(r){if(r.code==="ENOENT")return{size:0,valid:!1};if(r.code!=="EINTEGRITY")throw r;await IS(i,{recursive:!0,force:!0}),t.valid=!1}return t}o(dJ,"verifyContent");async function pJ(i,e){e.log.silly("verify","rebuilding index");let{default:t}=await Promise.resolve().then(()=>(Sh(),yh)),r=await qn.ls(i),s={missingContent:0,rejectedEntries:0,totalEntries:0},n={};for(let a in r)if(oJ(r,a)){let c=qn.hashKey(a),u=r[a],l=e.filter&&!e.filter(u);l&&s.rejectedEntries++,n[c]&&!l?n[c].push(u):n[c]&&l||(l?(n[c]=[],n[c]._path=qn.bucketPath(i,a)):(n[c]=[u],n[c]._path=qn.bucketPath(i,a)))}return await t(Object.keys(n),a=>mJ(i,n[a],s,e),{concurrency:e.concurrency}),s}o(pJ,"rebuildIndex");async function mJ(i,e,t){await iJ(e._path);for(let r of e){let s=xN(i,r.integrity);try{await OS(s),await qn.insert(i,r.key,r.integrity,{metadata:r.metadata,size:r.size,time:r.time}),t.totalEntries++}catch(n){if(n.code==="ENOENT")t.rejectedEntries++,t.missingContent++;else throw n}}}o(mJ,"rebuildBucket");function gJ(i,e){return e.log.silly("verify","cleaning tmp directory"),IS(Dh.join(i,"tmp"),{recursive:!0,force:!0})}o(gJ,"cleanTmp");async function yJ(i,e){let t=Dh.join(i,"_lastverified");return e.log.silly("verify","writing verifile to "+t),rJ(t,`${Date.now()}`)}o(yJ,"writeVerifile");vS.exports.lastRun=SJ;async function SJ(i){let e=await tJ(Dh.join(i,"_lastverified"),{encoding:"utf8"});return new Date(+e)}o(SJ,"lastRun")});var BN=d((rge,RS)=>{"use strict";var{withTempDir:EJ}=gh(),MN=require("fs/promises"),CS=require("path");RS.exports.mkdir=wJ;async function wJ(i,e={}){let{tmpPrefix:t}=e,r=CS.join(i,"tmp");await MN.mkdir(r,{recursive:!0,owner:"inherit"});let s=`${r}${CS.sep}${t||""}`;return MN.mkdtemp(s,{owner:"inherit"})}o(wJ,"mktmpdir");RS.exports.withTmp=_J;function _J(i,e,t){return t||(t=e,e={}),EJ(CS.join(i,"tmp"),t,e)}o(_J,"withTmp")});var bc=d((nge,X)=>{"use strict";var Rr=fN(),kN=CN(),AS=DN(),FN=LN(),{clearMemoized:bJ}=pc(),UN=BN(),xh=Dn();X.exports.index={};X.exports.index.compact=xh.compact;X.exports.index.insert=xh.insert;X.exports.ls=xh.ls;X.exports.ls.stream=xh.lsStream;X.exports.get=Rr;X.exports.get.byDigest=Rr.byDigest;X.exports.get.stream=Rr.stream;X.exports.get.stream.byDigest=Rr.stream.byDigest;X.exports.get.copy=Rr.copy;X.exports.get.copy.byDigest=Rr.copy.byDigest;X.exports.get.info=Rr.info;X.exports.get.hasContent=Rr.hasContent;X.exports.put=kN;X.exports.put.stream=kN.stream;X.exports.rm=AS.entry;X.exports.rm.all=AS.all;X.exports.rm.entry=X.exports.rm;X.exports.rm.content=AS.content;X.exports.clearMemoized=bJ;X.exports.tmp={};X.exports.tmp.mkdir=UN.mkdir;X.exports.tmp.withTmp=UN.withTmp;X.exports.verify=FN;X.exports.verify.lastRun=FN.lastRun});var $N=d((oge,jN)=>{"use strict";var Vn=require("fs"),Ic=require("path"),IJ=require("events").EventEmitter,OJ=Ql(),Oc=class i extends IJ{static{o(this,"BundleWalker")}constructor(e){if(e=e||{},super(e),this.path=Ic.resolve(e.path||process.cwd()),this.parent=e.parent||null,this.parent){if(this.result=this.parent.result,!this.parent.parent){let t=Ic.basename(this.path),r=Ic.basename(Ic.dirname(this.path));this.result.add(/^@/.test(r)?r+"/"+t:t)}this.root=this.parent.root,this.packageJsonCache=this.parent.packageJsonCache}else this.result=new Set,this.root=this.path,this.packageJsonCache=e.packageJsonCache||new Map;this.seen=new Set,this.didDone=!1,this.children=0,this.node_modules=[],this.package=null,this.bundle=null}addListener(e,t){return this.on(e,t)}on(e,t){let r=super.on(e,t);return e==="done"&&this.didDone&&this.emit("done",this.result),r}done(){if(!this.didDone)if(this.didDone=!0,this.parent)this.emit("done");else{let e=Array.from(this.result);this.result=e,this.emit("done",e)}}start(){let e=Ic.resolve(this.path,"package.json");return this.packageJsonCache.has(e)?this.onPackage(this.packageJsonCache.get(e)):this.readPackageJson(e),this}readPackageJson(e){Vn.readFile(e,(t,r)=>t?this.done():this.onPackageJson(e,r))}onPackageJson(e,t){try{this.package=OJ(JSON.parse(t+""))}catch{return this.done()}this.packageJsonCache.set(e,this.package),this.onPackage(this.package)}allDepsBundled(e){return Object.keys(e.dependencies||{}).concat(Object.keys(e.optionalDependencies||{}))}onPackage(e){let t=this.parent?this.allDepsBundled(e):e.bundleDependencies||e.bundledDependencies||[],r=Array.from(new Set(Array.isArray(t)?t:t===!0?this.allDepsBundled(e):Object.keys(t)));if(!r.length)return this.done();this.bundle=r,this.readModules()}readModules(){vJ(this.path+"/node_modules",(e,t)=>e?this.onReaddir([]):this.onReaddir(t))}onReaddir(e){this.node_modules=e,this.bundle.forEach(t=>this.childDep(t)),this.children===0&&this.done()}childDep(e){this.node_modules.indexOf(e)!==-1?this.seen.has(e)||(this.seen.add(e),this.child(e)):this.parent&&this.parent.childDep(e)}child(e){let t=this.path+"/node_modules/"+e;this.children+=1;let r=new i({path:t,parent:this});r.on("done",()=>{--this.children===0&&this.done()}),r.start()}},Lh=class i extends Oc{static{o(this,"BundleWalkerSync")}start(){return super.start(),this.done(),this}readPackageJson(e){try{this.onPackageJson(e,Vn.readFileSync(e))}catch{}return this}readModules(){try{this.onReaddir(CJ(this.path+"/node_modules"))}catch{this.onReaddir([])}}child(e){new i({path:this.path+"/node_modules/"+e,parent:this}).start()}},vJ=o((i,e)=>{Vn.readdir(i,(t,r)=>{if(t)e(t);else{let s=r.filter(n=>/^@/.test(n));if(!s.length)e(null,r);else{let n=r.filter(c=>!/^@/.test(c)),a=s.length;s.forEach(c=>{Vn.readdir(i+"/"+c,(u,l)=>{u||!l.length?n.push(c):n.push.apply(n,l.map(h=>c+"/"+h)),--a===0&&e(null,n)})})}}})},"readdirNodeModules"),CJ=o(i=>{let e=Vn.readdirSync(i),t=e.filter(s=>!/^@/.test(s)),r=e.filter(s=>/^@/.test(s)).map(s=>{try{let n=Vn.readdirSync(i+"/"+s);return n.length?n.map(a=>s+"/"+a):[s]}catch{return[s]}}).reduce((s,n)=>s.concat(n),[]);return t.concat(r)},"readdirNodeModulesSync"),Mh=o((i,e)=>{let t=new Promise((r,s)=>{new Oc(i).on("done",r).on("error",s).start()});return e?t.then(r=>e(null,r),e):t},"walk"),RJ=o(i=>new Lh(i).start().result,"walkSync");jN.exports=Mh;Mh.sync=RJ;Mh.BundleWalker=Oc;Mh.BundleWalkerSync=Lh});var HN=d((cge,zN)=>{var AJ=$N(),{readFile:TJ,readdir:NJ,stat:PJ}=require("fs/promises"),{resolve:Bh,basename:DJ,dirname:qN}=require("path"),xJ=Ql(),LJ=o(({path:i,packageJsonCache:e})=>e.has(i)?Promise.resolve(e.get(i)):TJ(i).then(t=>{let r=xJ(JSON.parse(t));return e.set(i,r),r}).catch(()=>null),"readPackage"),VN=Symbol("package data has been normalized"),MJ=o(({path:i,packageJsonCache:e})=>LJ({path:i,packageJsonCache:e}).then(t=>{if(!t||t[VN])return t;t.bundledDependencies&&!t.bundleDependencies&&(t.bundleDependencies=t.bundledDependencies,delete t.bundledDependencies);let r=t.bundleDependencies;return r===!0&&(t.bundleDependencies=[...Object.keys(t.dependencies||{}),...Object.keys(t.optionalDependencies||{})]),typeof r=="object"&&!Array.isArray(r)&&(t.bundleDependencies=Object.keys(r)),t[VN]=!0,t}),"rpj"),kh=o(async({path:i,depth:e=1,currentDepth:t=0,pkg:r=null,result:s=null,packageJsonCache:n=null})=>{if(s||(s=new Set),n||(n=new Map),r===!0)return MJ({path:i+"/package.json",packageJsonCache:n}).then(l=>kh({path:i,depth:e,currentDepth:t,pkg:l,result:s,packageJsonCache:n}));if(r&&r.bin){let l=qN(i),h=DJ(l),f=/^@.+/.test(h)?qN(l):l,p=[];Object.keys(r.bin).forEach(y=>{let g=Bh(f,".bin",y);p.push(g,g+".cmd",g+".ps1")}),(await Promise.all(p.map(y=>PJ(y).then(()=>y).catch(()=>null)))).filter(y=>y).forEach(y=>s.add(y))}if(t>=e)return s.add(i),s;let[a,c]=await Promise.all([NJ(i,{withFileTypes:!0}),t===0&&r&&r.bundleDependencies?AJ({path:i,packageJsonCache:n}):null]).catch(()=>[]);if(!a)return s;if(!a.length&&!c&&t!==0)return s.add(i),s;let u=[];for(let l of a){let h=Bh(i,l.name);if(l.isDirectory()===!1){s.add(h);continue}if(t!==0||l.name!=="node_modules"){t<e-1?u.push(kh({path:h,packageJsonCache:n,depth:e,currentDepth:t+1,result:s})):s.add(h);continue}}return c&&u.push(...c.map(l=>{let h=Bh(i,"node_modules",l);return kh({path:h,packageJsonCache:n,pkg:!0,depth:e,currentDepth:t+1,result:s})})),u.length&&await Promise.all(u),s},"pkgContents");zN.exports=({path:i,...e})=>kh({path:Bh(i),...e,pkg:!0}).then(t=>[...t])});var Hn=d((lge,Ac)=>{"use strict";var Rc=process.platform==="win32",{URL:TS}=require("node:url"),zn=Rc?require("node:path/win32"):require("node:path"),{homedir:BJ}=require("node:os"),kJ=ol(),GN=Ss(),ZN=uy(),{log:FJ}=_t(),YN=Rc?/\\|[/]/:/[/]/,XN=/^(?:git[+])?[a-z]+:/i,UJ=/^[^@]+@[^:.]+\.[^:]+:.+$/i,PS=/[.](?:tgz|tar.gz|tar)$/i,jJ=/:[0-9]+(\/|$)/i,$J=/^(?:[.]|~[/]|[/\\]|[a-zA-Z]:)/,qJ=/^(?:[.]|~[/]|[/]|[a-zA-Z]:)/,WN="https://registry.npmjs.org";function vc(i,e){let t,r;if(typeof i=="object")return i instanceof Cc&&(!e||e===i.where)?i:i.name&&i.rawSpec?vc.resolve(i.name,i.rawSpec,e||i.where):vc(i.raw,e||i.where);let s=i.indexOf("@",1),n=s>0?i.slice(0,s):i;return XN.test(i)?r=i:UJ.test(i)?r=`git+ssh://${i}`:!n.startsWith("@")&&(YN.test(n)||PS.test(n))?r=i:s>0?(t=n,r=i.slice(s+1)||"*"):ZN(i).validForOldPackages?(t=i,r="*"):r=i,QN(t,r,e,i)}o(vc,"npa");function VJ(i){return i?i.toLowerCase().startsWith("file:")?!0:Rc?$J.test(i):qJ.test(i):!1}o(VJ,"isFileSpec");function zJ(i){return i?i.toLowerCase().startsWith("npm:"):!1}o(zJ,"isAliasSpec");function QN(i,e,t,r){let s=new Cc({raw:r,name:i,rawSpec:e,fromArgument:r!=null});if(i&&(s.name=i),t||(t=process.cwd()),VJ(e))return KN(s,t);if(zJ(e))return QJ(s,t);let n=kJ.fromUrl(e,{noGitPlus:!0,noCommittish:!0});return n?ZJ(s,n):e&&XN.test(e)?XJ(s):e&&(YN.test(e)||PS.test(e))?KN(s,t):eK(s)}o(QN,"resolve");function HJ(i,e=WN){let t=vc(i);if(t.type!=="version")throw JJ(t.type,t.raw);let r="pkg:npm/"+t.name.replace(/^@/,"%40")+"@"+t.rawSpec;return e!==WN&&(r+="?repository_url="+e),r}o(HJ,"toPurl");function GJ(i,e,t){let r=new Error(`Invalid package name "${i}" of package "${t}": ${e.errors.join("; ")}.`);return r.code="EINVALIDPACKAGENAME",r}o(GJ,"invalidPackageName");function WJ(i,e){let t=new Error(`Invalid tag name "${i}" of package "${e}": Tags may not have any characters that encodeURIComponent encodes.`);return t.code="EINVALIDTAGNAME",t}o(WJ,"invalidTagName");function JJ(i,e){let t=new Error(`Invalid type "${i}" of package "${e}": Purl can only be generated for "version" types.`);return t.code="EINVALIDPURLTYPE",t}o(JJ,"invalidPurlType");var Cc=class{static{o(this,"Result")}constructor(e){this.type=e.type,this.registry=e.registry,this.where=e.where,e.raw==null?this.raw=e.name?`${e.name}@${e.rawSpec}`:e.rawSpec:this.raw=e.raw,this.name=void 0,this.escapedName=void 0,this.scope=void 0,this.rawSpec=e.rawSpec||"",this.saveSpec=e.saveSpec,this.fetchSpec=e.fetchSpec,e.name&&this.setName(e.name),this.gitRange=e.gitRange,this.gitCommittish=e.gitCommittish,this.gitSubdir=e.gitSubdir,this.hosted=e.hosted}setName(e){let t=ZN(e);if(!t.validForOldPackages)throw GJ(e,t,this.raw);return this.name=e,this.scope=e[0]==="@"?e.slice(0,e.indexOf("/")):void 0,this.escapedName=e.replace("/","%2f"),this}toString(){let e=[];this.name!=null&&this.name!==""&&e.push(this.name);let t=this.saveSpec||this.fetchSpec||this.rawSpec;return t!=null&&t!==""&&e.push(t),e.length?e.join("@"):this.raw}toJSON(){let e=Object.assign({},this);return delete e.hosted,e}};function NS(i,e){if(!e){i.gitCommittish=null;return}for(let t of e.split("::")){if(!t.includes(":")){if(i.gitRange)throw new Error("cannot override existing semver range with a committish");if(i.gitCommittish)throw new Error("cannot override existing committish with a second committish");i.gitCommittish=t;continue}let[r,s]=t.split(":");if(r==="semver"){if(i.gitCommittish)throw new Error("cannot override existing committish with a semver range");if(i.gitRange)throw new Error("cannot override existing semver range with a second semver range");i.gitRange=decodeURIComponent(s);continue}if(r==="path"){if(i.gitSubdir)throw new Error("cannot override existing path with a second path");i.gitSubdir=`/${s}`;continue}FJ.warn("npm-package-arg",`ignoring unknown key "${r}"`)}}o(NS,"setGitAttrs");var KJ=new Map([["\0","%00"],[" ","%09"],[`
28
+ `,"%0A"],["\r","%0D"],[" ","%20"],['"',"%22"],["#","%23"],["%","%25"],["?","%3F"],["[","%5B"],["\\",Rc?"/":"%5C"],["]","%5D"],["^","%5E"],["|","%7C"],["~","%7E"]]);function JN(i){let e="";for(let t=0;t<i.length;t++)e=`${e}${KJ.get(i[t])??i[t]}`;return e.startsWith("file:")?e:`file:${e}`}o(JN,"pathToFileURL");function KN(i,e){i.type=PS.test(i.rawSpec)?"file":"directory",i.where=e;let t=JN(i.rawSpec);t.startsWith("file:/")&&(/^file:\/\/[^/]/.test(t)&&(t=`file:/${t.slice(5)}`),/^\/{1,3}\.\.?(\/|$)/.test(t.slice(5))&&(t=t.replace(/^file:\/{1,3}/,"file:")));let r,s;try{r=new TS(t,`${JN(zn.resolve(e))}/`),s=new TS(t)}catch(c){let u=new Error("Invalid file: URL, must comply with RFC 8089");throw Object.assign(u,{raw:i.rawSpec,spec:i,where:e,originalError:c})}let n=decodeURIComponent(s.pathname),a=decodeURIComponent(r.pathname);return Rc&&(n=n.replace(/^\/+([a-z]:\/)/i,"$1"),a=a.replace(/^\/+([a-z]:\/)/i,"$1")),/^\/~(\/|$)/.test(n)?(i.saveSpec=`file:${n.substr(1)}`,a=zn.resolve(BJ(),n.substr(3))):zn.isAbsolute(t.slice(5))?i.saveSpec=`file:${zn.resolve(a)}`:i.saveSpec=`file:${zn.relative(e,a)}`,i.fetchSpec=zn.resolve(e,a),i.saveSpec=i.saveSpec.split("\\").join("/"),i.saveSpec.startsWith("file://")&&(i.saveSpec=`file:/${i.saveSpec.slice(7)}`),i}o(KN,"fromFile");function ZJ(i,e){return i.type="git",i.hosted=e,i.saveSpec=e.toString({noGitPlus:!1,noCommittish:!1}),i.fetchSpec=e.getDefaultRepresentation()==="shortcut"?null:e.toString(),NS(i,e.committish),i}o(ZJ,"fromHostedGit");function YJ(i,e){let t=new Error(`Unsupported URL Type "${i}": ${e}`);return t.code="EUNSUPPORTEDPROTOCOL",t}o(YJ,"unsupportedURLType");function XJ(i){let e=i.rawSpec;if(i.saveSpec=e,e.startsWith("git+ssh:")){let r=e.match(/^git\+ssh:\/\/([^:#]+:[^#]+(?:\.git)?)(?:#(.*))?$/i);if(r&&!r[1].match(jJ))return i.type="git",NS(i,r[2]),i.fetchSpec=r[1],i}else e.startsWith("git+file://")&&(e=e.replace(/\\/g,"/"));let t=new TS(e);switch(t.protocol){case"git:":case"git+http:":case"git+https:":case"git+rsync:":case"git+ftp:":case"git+file:":case"git+ssh:":i.type="git",NS(i,t.hash.slice(1)),t.protocol==="git+file:"&&/^git\+file:\/\/[a-z]:/i.test(e)?i.fetchSpec=`git+file://${t.host.toLowerCase()}:${t.pathname}`:(t.hash="",i.fetchSpec=t.toString()),i.fetchSpec.startsWith("git+")&&(i.fetchSpec=i.fetchSpec.slice(4));break;case"http:":case"https:":i.type="remote",i.fetchSpec=i.saveSpec;break;default:throw YJ(t.protocol,e)}return i}o(XJ,"fromURL");function QJ(i,e){let t=vc(i.rawSpec.substr(4),e);if(t.type==="alias")throw new Error("nested aliases not supported");if(!t.registry)throw new Error("aliases only work for registry deps");if(!t.name)throw new Error("aliases must have a name");return i.subSpec=t,i.registry=!0,i.type="alias",i.saveSpec=null,i.fetchSpec=null,i}o(QJ,"fromAlias");function eK(i){i.registry=!0;let e=i.rawSpec.trim();i.saveSpec=null,i.fetchSpec=e;let t=GN.valid(e,!0),r=GN.validRange(e,!0);if(t)i.type="version";else if(r)i.type="range";else{if(encodeURIComponent(e)!==e)throw WJ(e,i.raw);i.type="tag"}return i}o(eK,"fromRegistry");Ac.exports=vc;Ac.exports.resolve=QN;Ac.exports.toPurl=HJ;Ac.exports.Result=Cc});var Zn=d(At=>{"use strict";var eP=At&&At.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(At,"__esModule",{value:!0});At.WriteStreamSync=At.WriteStream=At.ReadStreamSync=At.ReadStream=void 0;var tK=eP(require("events")),tt=eP(require("fs")),iK=te(),rK=tt.default.writev,Tr=Symbol("_autoClose"),Yt=Symbol("_close"),Tc=Symbol("_ended"),J=Symbol("_fd"),DS=Symbol("_finished"),tr=Symbol("_flags"),xS=Symbol("_flush"),kS=Symbol("_handleChunk"),FS=Symbol("_makeBuf"),Pc=Symbol("_mode"),Fh=Symbol("_needDrain"),Jn=Symbol("_onerror"),Kn=Symbol("_onopen"),LS=Symbol("_onread"),Gn=Symbol("_onwrite"),Nr=Symbol("_open"),Zt=Symbol("_path"),Ar=Symbol("_pos"),mi=Symbol("_queue"),Wn=Symbol("_read"),MS=Symbol("_readSize"),er=Symbol("_reading"),Nc=Symbol("_remain"),BS=Symbol("_size"),Uh=Symbol("_write"),Cs=Symbol("_writing"),jh=Symbol("_defaultFlag"),Rs=Symbol("_errored"),$h=class extends iK.Minipass{static{o(this,"ReadStream")}[Rs]=!1;[J];[Zt];[MS];[er]=!1;[BS];[Nc];[Tr];constructor(e,t){if(t=t||{},super(t),this.readable=!0,this.writable=!1,typeof e!="string")throw new TypeError("path must be a string");this[Rs]=!1,this[J]=typeof t.fd=="number"?t.fd:void 0,this[Zt]=e,this[MS]=t.readSize||16*1024*1024,this[er]=!1,this[BS]=typeof t.size=="number"?t.size:1/0,this[Nc]=this[BS],this[Tr]=typeof t.autoClose=="boolean"?t.autoClose:!0,typeof this[J]=="number"?this[Wn]():this[Nr]()}get fd(){return this[J]}get path(){return this[Zt]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[Nr](){tt.default.open(this[Zt],"r",(e,t)=>this[Kn](e,t))}[Kn](e,t){e?this[Jn](e):(this[J]=t,this.emit("open",t),this[Wn]())}[FS](){return Buffer.allocUnsafe(Math.min(this[MS],this[Nc]))}[Wn](){if(!this[er]){this[er]=!0;let e=this[FS]();if(e.length===0)return process.nextTick(()=>this[LS](null,0,e));tt.default.read(this[J],e,0,e.length,null,(t,r,s)=>this[LS](t,r,s))}}[LS](e,t,r){this[er]=!1,e?this[Jn](e):this[kS](t,r)&&this[Wn]()}[Yt](){if(this[Tr]&&typeof this[J]=="number"){let e=this[J];this[J]=void 0,tt.default.close(e,t=>t?this.emit("error",t):this.emit("close"))}}[Jn](e){this[er]=!0,this[Yt](),this.emit("error",e)}[kS](e,t){let r=!1;return this[Nc]-=e,e>0&&(r=super.write(e<t.length?t.subarray(0,e):t)),(e===0||this[Nc]<=0)&&(r=!1,this[Yt](),super.end()),r}emit(e,...t){switch(e){case"prefinish":case"finish":return!1;case"drain":return typeof this[J]=="number"&&this[Wn](),!1;case"error":return this[Rs]?!1:(this[Rs]=!0,super.emit(e,...t));default:return super.emit(e,...t)}}};At.ReadStream=$h;var US=class extends $h{static{o(this,"ReadStreamSync")}[Nr](){let e=!0;try{this[Kn](null,tt.default.openSync(this[Zt],"r")),e=!1}finally{e&&this[Yt]()}}[Wn](){let e=!0;try{if(!this[er]){this[er]=!0;do{let t=this[FS](),r=t.length===0?0:tt.default.readSync(this[J],t,0,t.length,null);if(!this[kS](r,t))break}while(!0);this[er]=!1}e=!1}finally{e&&this[Yt]()}}[Yt](){if(this[Tr]&&typeof this[J]=="number"){let e=this[J];this[J]=void 0,tt.default.closeSync(e),this.emit("close")}}};At.ReadStreamSync=US;var qh=class extends tK.default{static{o(this,"WriteStream")}readable=!1;writable=!0;[Rs]=!1;[Cs]=!1;[Tc]=!1;[mi]=[];[Fh]=!1;[Zt];[Pc];[Tr];[J];[jh];[tr];[DS]=!1;[Ar];constructor(e,t){t=t||{},super(t),this[Zt]=e,this[J]=typeof t.fd=="number"?t.fd:void 0,this[Pc]=t.mode===void 0?438:t.mode,this[Ar]=typeof t.start=="number"?t.start:void 0,this[Tr]=typeof t.autoClose=="boolean"?t.autoClose:!0;let r=this[Ar]!==void 0?"r+":"w";this[jh]=t.flags===void 0,this[tr]=t.flags===void 0?r:t.flags,this[J]===void 0&&this[Nr]()}emit(e,...t){if(e==="error"){if(this[Rs])return!1;this[Rs]=!0}return super.emit(e,...t)}get fd(){return this[J]}get path(){return this[Zt]}[Jn](e){this[Yt](),this[Cs]=!0,this.emit("error",e)}[Nr](){tt.default.open(this[Zt],this[tr],this[Pc],(e,t)=>this[Kn](e,t))}[Kn](e,t){this[jh]&&this[tr]==="r+"&&e&&e.code==="ENOENT"?(this[tr]="w",this[Nr]()):e?this[Jn](e):(this[J]=t,this.emit("open",t),this[Cs]||this[xS]())}end(e,t){return e&&this.write(e,t),this[Tc]=!0,!this[Cs]&&!this[mi].length&&typeof this[J]=="number"&&this[Gn](null,0),this}write(e,t){return typeof e=="string"&&(e=Buffer.from(e,t)),this[Tc]?(this.emit("error",new Error("write() after end()")),!1):this[J]===void 0||this[Cs]||this[mi].length?(this[mi].push(e),this[Fh]=!0,!1):(this[Cs]=!0,this[Uh](e),!0)}[Uh](e){tt.default.write(this[J],e,0,e.length,this[Ar],(t,r)=>this[Gn](t,r))}[Gn](e,t){e?this[Jn](e):(this[Ar]!==void 0&&typeof t=="number"&&(this[Ar]+=t),this[mi].length?this[xS]():(this[Cs]=!1,this[Tc]&&!this[DS]?(this[DS]=!0,this[Yt](),this.emit("finish")):this[Fh]&&(this[Fh]=!1,this.emit("drain"))))}[xS](){if(this[mi].length===0)this[Tc]&&this[Gn](null,0);else if(this[mi].length===1)this[Uh](this[mi].pop());else{let e=this[mi];this[mi]=[],rK(this[J],e,this[Ar],(t,r)=>this[Gn](t,r))}}[Yt](){if(this[Tr]&&typeof this[J]=="number"){let e=this[J];this[J]=void 0,tt.default.close(e,t=>t?this.emit("error",t):this.emit("close"))}}};At.WriteStream=qh;var jS=class extends qh{static{o(this,"WriteStreamSync")}[Nr](){let e;if(this[jh]&&this[tr]==="r+")try{e=tt.default.openSync(this[Zt],this[tr],this[Pc])}catch(t){if(t?.code==="ENOENT")return this[tr]="w",this[Nr]();throw t}else e=tt.default.openSync(this[Zt],this[tr],this[Pc]);this[Kn](null,e)}[Yt](){if(this[Tr]&&typeof this[J]=="number"){let e=this[J];this[J]=void 0,tt.default.closeSync(e),this.emit("close")}}[Uh](e){let t=!0;try{this[Gn](null,tt.default.writeSync(this[J],e,0,e.length,this[Ar])),t=!1}finally{if(t)try{this[Yt]()}catch{}}}};At.WriteStreamSync=jS});var Vh=d(Se=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});Se.dealias=Se.isNoFile=Se.isFile=Se.isAsync=Se.isSync=Se.isAsyncNoFile=Se.isSyncNoFile=Se.isAsyncFile=Se.isSyncFile=void 0;var sK=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"],["onentry","onReadEntry"]]),nK=o(i=>!!i.sync&&!!i.file,"isSyncFile");Se.isSyncFile=nK;var oK=o(i=>!i.sync&&!!i.file,"isAsyncFile");Se.isAsyncFile=oK;var aK=o(i=>!!i.sync&&!i.file,"isSyncNoFile");Se.isSyncNoFile=aK;var cK=o(i=>!i.sync&&!i.file,"isAsyncNoFile");Se.isAsyncNoFile=cK;var uK=o(i=>!!i.sync,"isSync");Se.isSync=uK;var lK=o(i=>!i.sync,"isAsync");Se.isAsync=lK;var hK=o(i=>!!i.file,"isFile");Se.isFile=hK;var fK=o(i=>!i.file,"isNoFile");Se.isNoFile=fK;var dK=o(i=>{let e=sK.get(i);return e||i},"dealiasKey"),pK=o((i={})=>{if(!i)return{};let e={};for(let[t,r]of Object.entries(i)){let s=dK(t);e[s]=r}return e.chmod===void 0&&e.noChmod===!1&&(e.chmod=!0),delete e.noChmod,e},"dealias");Se.dealias=pK});var Yn=d(zh=>{"use strict";Object.defineProperty(zh,"__esModule",{value:!0});zh.makeCommand=void 0;var Dc=Vh(),mK=o((i,e,t,r,s)=>Object.assign((n=[],a,c)=>{Array.isArray(n)&&(a=n,n={}),typeof a=="function"&&(c=a,a=void 0),a?a=Array.from(a):a=[];let u=(0,Dc.dealias)(n);if(s?.(u,a),(0,Dc.isSyncFile)(u)){if(typeof c=="function")throw new TypeError("callback not supported for sync tar functions");return i(u,a)}else if((0,Dc.isAsyncFile)(u)){let l=e(u,a),h=c||void 0;return h?l.then(()=>h(),h):l}else if((0,Dc.isSyncNoFile)(u)){if(typeof c=="function")throw new TypeError("callback not supported for sync tar functions");return t(u,a)}else if((0,Dc.isAsyncNoFile)(u)){if(typeof c=="function")throw new TypeError("callback only supported with file option");return r(u,a)}else throw new Error("impossible options??")},{syncFile:i,asyncFile:e,syncNoFile:t,asyncNoFile:r,validate:s}),"makeCommand");zh.makeCommand=mK});var $S=d(Xn=>{"use strict";var gK=Xn&&Xn.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Xn,"__esModule",{value:!0});Xn.constants=void 0;var yK=gK(require("zlib")),SK=yK.default.constants||{ZLIB_VERNUM:4736};Xn.constants=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:1/0,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},SK))});var Lc=d(j=>{"use strict";var EK=j&&j.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(i,r,s)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),wK=j&&j.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),_K=j&&j.__importStar||(function(){var i=o(function(e){return i=Object.getOwnPropertyNames||function(t){var r=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[r.length]=s);return r},i(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=i(e),s=0;s<r.length;s++)r[s]!=="default"&&EK(t,e,r[s]);return wK(t,e),t}})(),bK=j&&j.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(j,"__esModule",{value:!0});j.ZstdDecompress=j.ZstdCompress=j.BrotliDecompress=j.BrotliCompress=j.Unzip=j.InflateRaw=j.DeflateRaw=j.Gunzip=j.Gzip=j.Inflate=j.Deflate=j.Zlib=j.ZlibError=j.constants=void 0;var zS=bK(require("assert")),As=require("buffer"),IK=te(),tP=_K(require("zlib")),gi=$S(),OK=$S();Object.defineProperty(j,"constants",{enumerable:!0,get:o(function(){return OK.constants},"get")});var vK=As.Buffer.concat,iP=Object.getOwnPropertyDescriptor(As.Buffer,"concat"),CK=o(i=>i,"noop"),qS=iP?.writable===!0||iP?.set!==void 0?i=>{As.Buffer.concat=i?CK:vK}:i=>{},Ts=Symbol("_superWrite"),Ns=class extends Error{static{o(this,"ZlibError")}code;errno;constructor(e,t){super("zlib: "+e.message,{cause:e}),this.code=e.code,this.errno=e.errno,this.code||(this.code="ZLIB_ERROR"),this.message="zlib: "+e.message,Error.captureStackTrace(this,t??this.constructor)}get name(){return"ZlibError"}};j.ZlibError=Ns;var VS=Symbol("flushFlag"),xc=class extends IK.Minipass{static{o(this,"ZlibBase")}#e=!1;#t=!1;#i;#r;#s;#u;#c;get sawError(){return this.#e}get handle(){return this.#u}get flushFlag(){return this.#i}constructor(e,t){if(!e||typeof e!="object")throw new TypeError("invalid options for ZlibBase constructor");if(super(e),this.#i=e.flush??0,this.#r=e.finishFlush??0,this.#s=e.fullFlushFlag??0,typeof tP[t]!="function")throw new TypeError("Compression method not supported: "+t);try{this.#u=new tP[t](e)}catch(r){throw new Ns(r,this.constructor)}this.#c=r=>{this.#e||(this.#e=!0,this.close(),this.emit("error",r))},this.#u?.on("error",r=>this.#c(new Ns(r))),this.once("end",()=>this.close)}close(){this.#u&&(this.#u.close(),this.#u=void 0,this.emit("close"))}reset(){if(!this.#e)return(0,zS.default)(this.#u,"zlib binding closed"),this.#u.reset?.()}flush(e){this.ended||(typeof e!="number"&&(e=this.#s),this.write(Object.assign(As.Buffer.alloc(0),{[VS]:e})))}end(e,t,r){return typeof e=="function"&&(r=e,t=void 0,e=void 0),typeof t=="function"&&(r=t,t=void 0),e&&(t?this.write(e,t):this.write(e)),this.flush(this.#r),this.#t=!0,super.end(r)}get ended(){return this.#t}[Ts](e){return super.write(e)}write(e,t,r){if(typeof t=="function"&&(r=t,t="utf8"),typeof e=="string"&&(e=As.Buffer.from(e,t)),this.#e)return;(0,zS.default)(this.#u,"zlib binding closed");let s=this.#u._handle,n=s.close;s.close=()=>{};let a=this.#u.close;this.#u.close=()=>{},qS(!0);let c;try{let l=typeof e[VS]=="number"?e[VS]:this.#i;c=this.#u._processChunk(e,l),qS(!1)}catch(l){qS(!1),this.#c(new Ns(l,this.write))}finally{this.#u&&(this.#u._handle=s,s.close=n,this.#u.close=a,this.#u.removeAllListeners("error"))}this.#u&&this.#u.on("error",l=>this.#c(new Ns(l,this.write)));let u;if(c)if(Array.isArray(c)&&c.length>0){let l=c[0];u=this[Ts](As.Buffer.from(l));for(let h=1;h<c.length;h++)u=this[Ts](c[h])}else u=this[Ts](As.Buffer.from(c));return r&&r(),u}},yi=class extends xc{static{o(this,"Zlib")}#e;#t;constructor(e,t){e=e||{},e.flush=e.flush||gi.constants.Z_NO_FLUSH,e.finishFlush=e.finishFlush||gi.constants.Z_FINISH,e.fullFlushFlag=gi.constants.Z_FULL_FLUSH,super(e,t),this.#e=e.level,this.#t=e.strategy}params(e,t){if(!this.sawError){if(!this.handle)throw new Error("cannot switch params when binding is closed");if(!this.handle.params)throw new Error("not supported in this implementation");if(this.#e!==e||this.#t!==t){this.flush(gi.constants.Z_SYNC_FLUSH),(0,zS.default)(this.handle,"zlib binding closed");let r=this.handle.flush;this.handle.flush=(s,n)=>{typeof s=="function"&&(n=s,s=this.flushFlag),this.flush(s),n?.()};try{this.handle.params(e,t)}finally{this.handle.flush=r}this.handle&&(this.#e=e,this.#t=t)}}}};j.Zlib=yi;var HS=class extends yi{static{o(this,"Deflate")}constructor(e){super(e,"Deflate")}};j.Deflate=HS;var GS=class extends yi{static{o(this,"Inflate")}constructor(e){super(e,"Inflate")}};j.Inflate=GS;var WS=class extends yi{static{o(this,"Gzip")}#e;constructor(e){super(e,"Gzip"),this.#e=e&&!!e.portable}[Ts](e){return this.#e?(this.#e=!1,e[9]=255,super[Ts](e)):super[Ts](e)}};j.Gzip=WS;var JS=class extends yi{static{o(this,"Gunzip")}constructor(e){super(e,"Gunzip")}};j.Gunzip=JS;var KS=class extends yi{static{o(this,"DeflateRaw")}constructor(e){super(e,"DeflateRaw")}};j.DeflateRaw=KS;var ZS=class extends yi{static{o(this,"InflateRaw")}constructor(e){super(e,"InflateRaw")}};j.InflateRaw=ZS;var YS=class extends yi{static{o(this,"Unzip")}constructor(e){super(e,"Unzip")}};j.Unzip=YS;var Hh=class extends xc{static{o(this,"Brotli")}constructor(e,t){e=e||{},e.flush=e.flush||gi.constants.BROTLI_OPERATION_PROCESS,e.finishFlush=e.finishFlush||gi.constants.BROTLI_OPERATION_FINISH,e.fullFlushFlag=gi.constants.BROTLI_OPERATION_FLUSH,super(e,t)}},XS=class extends Hh{static{o(this,"BrotliCompress")}constructor(e){super(e,"BrotliCompress")}};j.BrotliCompress=XS;var QS=class extends Hh{static{o(this,"BrotliDecompress")}constructor(e){super(e,"BrotliDecompress")}};j.BrotliDecompress=QS;var Gh=class extends xc{static{o(this,"Zstd")}constructor(e,t){e=e||{},e.flush=e.flush||gi.constants.ZSTD_e_continue,e.finishFlush=e.finishFlush||gi.constants.ZSTD_e_end,e.fullFlushFlag=gi.constants.ZSTD_e_flush,super(e,t)}},eE=class extends Gh{static{o(this,"ZstdCompress")}constructor(e){super(e,"ZstdCompress")}};j.ZstdCompress=eE;var tE=class extends Gh{static{o(this,"ZstdDecompress")}constructor(e){super(e,"ZstdDecompress")}};j.ZstdDecompress=tE});var nP=d(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.parse=Qn.encode=void 0;var RK=o((i,e)=>{if(Number.isSafeInteger(i))i<0?TK(i,e):AK(i,e);else throw Error("cannot encode number outside of javascript safe integer range");return e},"encode");Qn.encode=RK;var AK=o((i,e)=>{e[0]=128;for(var t=e.length;t>1;t--)e[t-1]=i&255,i=Math.floor(i/256)},"encodePositive"),TK=o((i,e)=>{e[0]=255;var t=!1;i=i*-1;for(var r=e.length;r>1;r--){var s=i&255;i=Math.floor(i/256),t?e[r-1]=rP(s):s===0?e[r-1]=0:(t=!0,e[r-1]=sP(s))}},"encodeNegative"),NK=o(i=>{let e=i[0],t=e===128?DK(i.subarray(1,i.length)):e===255?PK(i):null;if(t===null)throw Error("invalid base256 encoding");if(!Number.isSafeInteger(t))throw Error("parsed number outside of javascript safe integer range");return t},"parse");Qn.parse=NK;var PK=o(i=>{for(var e=i.length,t=0,r=!1,s=e-1;s>-1;s--){var n=Number(i[s]),a;r?a=rP(n):n===0?a=n:(r=!0,a=sP(n)),a!==0&&(t-=a*Math.pow(256,e-s-1))}return t},"twos"),DK=o(i=>{for(var e=i.length,t=0,r=e-1;r>-1;r--){var s=Number(i[r]);s!==0&&(t+=s*Math.pow(256,e-r-1))}return t},"pos"),rP=o(i=>(255^i)&255,"onesComp"),sP=o(i=>(255^i)+1&255,"twosComp")});var iE=d(mt=>{"use strict";Object.defineProperty(mt,"__esModule",{value:!0});mt.code=mt.name=mt.isName=mt.isCode=void 0;var xK=o(i=>mt.name.has(i),"isCode");mt.isCode=xK;var LK=o(i=>mt.code.has(i),"isName");mt.isName=LK;mt.name=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]);mt.code=new Map(Array.from(mt.name).map(i=>[i[1],i[0]]))});var to=d(Si=>{"use strict";var MK=Si&&Si.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(i,r,s)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),BK=Si&&Si.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),oP=Si&&Si.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&MK(e,i,t);return BK(e,i),e};Object.defineProperty(Si,"__esModule",{value:!0});Si.Header=void 0;var eo=require("node:path"),aP=oP(nP()),Mc=oP(iE()),nE=class{static{o(this,"Header")}cksumValid=!1;needPax=!1;nullBlock=!1;block;path;mode;uid;gid;size;cksum;#e="Unsupported";linkpath;uname;gname;devmaj=0;devmin=0;atime;ctime;mtime;charset;comment;constructor(e,t=0,r,s){Buffer.isBuffer(e)?this.decode(e,t||0,r,s):e&&this.#t(e)}decode(e,t,r,s){if(t||(t=0),!e||!(e.length>=t+512))throw new Error("need 512 bytes for header");this.path=Ps(e,t,100),this.mode=Pr(e,t+100,8),this.uid=Pr(e,t+108,8),this.gid=Pr(e,t+116,8),this.size=Pr(e,t+124,12),this.mtime=rE(e,t+136,12),this.cksum=Pr(e,t+148,12),s&&this.#t(s,!0),r&&this.#t(r);let n=Ps(e,t+156,1);if(Mc.isCode(n)&&(this.#e=n||"0"),this.#e==="0"&&this.path.slice(-1)==="/"&&(this.#e="5"),this.#e==="5"&&(this.size=0),this.linkpath=Ps(e,t+157,100),e.subarray(t+257,t+265).toString()==="ustar\x0000")if(this.uname=Ps(e,t+265,32),this.gname=Ps(e,t+297,32),this.devmaj=Pr(e,t+329,8)??0,this.devmin=Pr(e,t+337,8)??0,e[t+475]!==0){let c=Ps(e,t+345,155);this.path=c+"/"+this.path}else{let c=Ps(e,t+345,130);c&&(this.path=c+"/"+this.path),this.atime=rE(e,t+476,12),this.ctime=rE(e,t+488,12)}let a=256;for(let c=t;c<t+148;c++)a+=e[c];for(let c=t+156;c<t+512;c++)a+=e[c];this.cksumValid=a===this.cksum,this.cksum===void 0&&a===256&&(this.nullBlock=!0)}#t(e,t=!1){Object.assign(this,Object.fromEntries(Object.entries(e).filter(([r,s])=>!(s==null||r==="path"&&t||r==="linkpath"&&t||r==="global"))))}encode(e,t=0){if(e||(e=this.block=Buffer.alloc(512)),this.#e==="Unsupported"&&(this.#e="0"),!(e.length>=t+512))throw new Error("need 512 bytes for header");let r=this.ctime||this.atime?130:155,s=kK(this.path||"",r),n=s[0],a=s[1];this.needPax=!!s[2],this.needPax=Ds(e,t,100,n)||this.needPax,this.needPax=Dr(e,t+100,8,this.mode)||this.needPax,this.needPax=Dr(e,t+108,8,this.uid)||this.needPax,this.needPax=Dr(e,t+116,8,this.gid)||this.needPax,this.needPax=Dr(e,t+124,12,this.size)||this.needPax,this.needPax=sE(e,t+136,12,this.mtime)||this.needPax,e[t+156]=this.#e.charCodeAt(0),this.needPax=Ds(e,t+157,100,this.linkpath)||this.needPax,e.write("ustar\x0000",t+257,8),this.needPax=Ds(e,t+265,32,this.uname)||this.needPax,this.needPax=Ds(e,t+297,32,this.gname)||this.needPax,this.needPax=Dr(e,t+329,8,this.devmaj)||this.needPax,this.needPax=Dr(e,t+337,8,this.devmin)||this.needPax,this.needPax=Ds(e,t+345,r,a)||this.needPax,e[t+475]!==0?this.needPax=Ds(e,t+345,155,a)||this.needPax:(this.needPax=Ds(e,t+345,130,a)||this.needPax,this.needPax=sE(e,t+476,12,this.atime)||this.needPax,this.needPax=sE(e,t+488,12,this.ctime)||this.needPax);let c=256;for(let u=t;u<t+148;u++)c+=e[u];for(let u=t+156;u<t+512;u++)c+=e[u];return this.cksum=c,Dr(e,t+148,8,this.cksum),this.cksumValid=!0,this.needPax}get type(){return this.#e==="Unsupported"?this.#e:Mc.name.get(this.#e)}get typeKey(){return this.#e}set type(e){let t=String(Mc.code.get(e));if(Mc.isCode(t)||t==="Unsupported")this.#e=t;else if(Mc.isCode(e))this.#e=e;else throw new TypeError("invalid entry type: "+e)}};Si.Header=nE;var kK=o((i,e)=>{let r=i,s="",n,a=eo.posix.parse(i).root||".";if(Buffer.byteLength(r)<100)n=[r,s,!1];else{s=eo.posix.dirname(r),r=eo.posix.basename(r);do Buffer.byteLength(r)<=100&&Buffer.byteLength(s)<=e?n=[r,s,!1]:Buffer.byteLength(r)>100&&Buffer.byteLength(s)<=e?n=[r.slice(0,99),s,!0]:(r=eo.posix.join(eo.posix.basename(s),r),s=eo.posix.dirname(s));while(s!==a&&n===void 0);n||(n=[i.slice(0,99),"",!0])}return n},"splitPrefix"),Ps=o((i,e,t)=>i.subarray(e,e+t).toString("utf8").replace(/\0.*/,""),"decString"),rE=o((i,e,t)=>FK(Pr(i,e,t)),"decDate"),FK=o(i=>i===void 0?void 0:new Date(i*1e3),"numToDate"),Pr=o((i,e,t)=>Number(i[e])&128?aP.parse(i.subarray(e,e+t)):jK(i,e,t),"decNumber"),UK=o(i=>isNaN(i)?void 0:i,"nanUndef"),jK=o((i,e,t)=>UK(parseInt(i.subarray(e,e+t).toString("utf8").replace(/\0.*$/,"").trim(),8)),"decSmallNumber"),$K={12:8589934591,8:2097151},Dr=o((i,e,t,r)=>r===void 0?!1:r>$K[t]||r<0?(aP.encode(r,i.subarray(e,e+t)),!0):(qK(i,e,t,r),!1),"encNumber"),qK=o((i,e,t,r)=>i.write(VK(r,t),e,t,"ascii"),"encSmallNumber"),VK=o((i,e)=>zK(Math.floor(i).toString(8),e),"octalString"),zK=o((i,e)=>(i.length===e-1?i:new Array(e-i.length-1).join("0")+i+" ")+"\0","padOctal"),sE=o((i,e,t,r)=>r===void 0?!1:Dr(i,e,t,r.getTime()/1e3),"encDate"),HK=new Array(156).join("\0"),Ds=o((i,e,t,r)=>r===void 0?!1:(i.write(r+HK,e,t,"utf8"),r.length!==Buffer.byteLength(r)||r.length>t),"encString")});var Jh=d(Wh=>{"use strict";Object.defineProperty(Wh,"__esModule",{value:!0});Wh.Pax=void 0;var GK=require("node:path"),WK=to(),oE=class i{static{o(this,"Pax")}atime;mtime;ctime;charset;comment;gid;uid;gname;uname;linkpath;dev;ino;nlink;path;size;mode;global;constructor(e,t=!1){this.atime=e.atime,this.charset=e.charset,this.comment=e.comment,this.ctime=e.ctime,this.dev=e.dev,this.gid=e.gid,this.global=t,this.gname=e.gname,this.ino=e.ino,this.linkpath=e.linkpath,this.mtime=e.mtime,this.nlink=e.nlink,this.path=e.path,this.size=e.size,this.uid=e.uid,this.uname=e.uname}encode(){let e=this.encodeBody();if(e==="")return Buffer.allocUnsafe(0);let t=Buffer.byteLength(e),r=512*Math.ceil(1+t/512),s=Buffer.allocUnsafe(r);for(let n=0;n<512;n++)s[n]=0;new WK.Header({path:("PaxHeader/"+(0,GK.basename)(this.path??"")).slice(0,99),mode:this.mode||420,uid:this.uid,gid:this.gid,size:t,mtime:this.mtime,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname||"",devmaj:0,devmin:0,atime:this.atime,ctime:this.ctime}).encode(s),s.write(e,512,t,"utf8");for(let n=t+512;n<s.length;n++)s[n]=0;return s}encodeBody(){return this.encodeField("path")+this.encodeField("ctime")+this.encodeField("atime")+this.encodeField("dev")+this.encodeField("ino")+this.encodeField("nlink")+this.encodeField("charset")+this.encodeField("comment")+this.encodeField("gid")+this.encodeField("gname")+this.encodeField("linkpath")+this.encodeField("mtime")+this.encodeField("size")+this.encodeField("uid")+this.encodeField("uname")}encodeField(e){if(this[e]===void 0)return"";let t=this[e],r=t instanceof Date?t.getTime()/1e3:t,s=" "+(e==="dev"||e==="ino"||e==="nlink"?"SCHILY.":"")+e+"="+r+`
29
+ `,n=Buffer.byteLength(s),a=Math.floor(Math.log(n)/Math.log(10))+1;return n+a>=Math.pow(10,a)&&(a+=1),a+n+s}static parse(e,t,r=!1){return new i(JK(KK(e),t),r)}};Wh.Pax=oE;var JK=o((i,e)=>e?Object.assign({},e,i):i,"merge"),KK=o(i=>i.replace(/\n$/,"").split(`
30
+ `).reduce(ZK,Object.create(null)),"parseKV"),ZK=o((i,e)=>{let t=parseInt(e,10);if(t!==Buffer.byteLength(e)+1)return i;e=e.slice((t+" ").length);let r=e.split("="),s=r.shift();if(!s)return i;let n=s.replace(/^SCHILY\.(dev|ino|nlink)/,"$1"),a=r.join("=");return i[n]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(n)?new Date(Number(a)*1e3):/^[0-9]+$/.test(a)?+a:a,i},"parseKVLine")});var io=d(Kh=>{"use strict";Object.defineProperty(Kh,"__esModule",{value:!0});Kh.normalizeWindowsPath=void 0;var YK=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;Kh.normalizeWindowsPath=YK!=="win32"?i=>i:i=>i&&i.replace(/\\/g,"/")});var Xh=d(Yh=>{"use strict";Object.defineProperty(Yh,"__esModule",{value:!0});Yh.ReadEntry=void 0;var XK=te(),Zh=io(),aE=class extends XK.Minipass{static{o(this,"ReadEntry")}extended;globalExtended;header;startBlockSize;blockRemain;remain;type;meta=!1;ignore=!1;path;mode;uid;gid;uname;gname;size=0;mtime;atime;ctime;linkpath;dev;ino;nlink;invalid=!1;absolute;unsupported=!1;constructor(e,t,r){switch(super({}),this.pause(),this.extended=t,this.globalExtended=r,this.header=e,this.remain=e.size??0,this.startBlockSize=512*Math.ceil(this.remain/512),this.blockRemain=this.startBlockSize,this.type=e.type,this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=!0;break;default:this.ignore=!0}if(!e.path)throw new Error("no path provided for tar.ReadEntry");this.path=(0,Zh.normalizeWindowsPath)(e.path),this.mode=e.mode,this.mode&&(this.mode=this.mode&4095),this.uid=e.uid,this.gid=e.gid,this.uname=e.uname,this.gname=e.gname,this.size=this.remain,this.mtime=e.mtime,this.atime=e.atime,this.ctime=e.ctime,this.linkpath=e.linkpath?(0,Zh.normalizeWindowsPath)(e.linkpath):void 0,this.uname=e.uname,this.gname=e.gname,t&&this.#e(t),r&&this.#e(r,!0)}write(e){let t=e.length;if(t>this.blockRemain)throw new Error("writing more to entry than is appropriate");let r=this.remain,s=this.blockRemain;return this.remain=Math.max(0,r-t),this.blockRemain=Math.max(0,s-t),this.ignore?!0:r>=t?super.write(e):super.write(e.subarray(0,r))}#e(e,t=!1){e.path&&(e.path=(0,Zh.normalizeWindowsPath)(e.path)),e.linkpath&&(e.linkpath=(0,Zh.normalizeWindowsPath)(e.linkpath)),Object.assign(this,Object.fromEntries(Object.entries(e).filter(([r,s])=>!(s==null||r==="path"&&t))))}};Yh.ReadEntry=aE});var ef=d(Qh=>{"use strict";Object.defineProperty(Qh,"__esModule",{value:!0});Qh.warnMethod=void 0;var QK=o((i,e,t,r={})=>{i.file&&(r.file=i.file),i.cwd&&(r.cwd=i.cwd),r.code=t instanceof Error&&t.code||e,r.tarCode=e,!i.strict&&r.recoverable!==!1?(t instanceof Error&&(r=Object.assign(t,r),t=t.message),i.emit("warn",e,t,r)):t instanceof Error?i.emit("error",Object.assign(t,r)):i.emit("error",Object.assign(new Error(`${e}: ${t}`),r))},"warnMethod");Qh.warnMethod=QK});var uf=d(cf=>{"use strict";Object.defineProperty(cf,"__esModule",{value:!0});cf.Parser=void 0;var eZ=require("events"),cE=Lc(),cP=to(),uP=Jh(),tZ=Xh(),iZ=ef(),rZ=1024*1024,dE=Buffer.from([31,139]),pE=Buffer.from([40,181,47,253]),sZ=Math.max(dE.length,pE.length),Tt=Symbol("state"),xs=Symbol("writeEntry"),ir=Symbol("readEntry"),uE=Symbol("nextEntry"),lP=Symbol("processEntry"),Ei=Symbol("extendedHeader"),Bc=Symbol("globalExtendedHeader"),xr=Symbol("meta"),hP=Symbol("emitMeta"),ie=Symbol("buffer"),rr=Symbol("queue"),Lr=Symbol("ended"),lE=Symbol("emittedEnd"),Ls=Symbol("emit"),Ee=Symbol("unzip"),tf=Symbol("consumeChunk"),rf=Symbol("consumeChunkSub"),hE=Symbol("consumeBody"),fP=Symbol("consumeMeta"),dP=Symbol("consumeHeader"),kc=Symbol("consuming"),fE=Symbol("bufferConcat"),sf=Symbol("maybeEnd"),ro=Symbol("writing"),Mr=Symbol("aborted"),nf=Symbol("onDone"),Ms=Symbol("sawValidEntry"),of=Symbol("sawNullBlock"),af=Symbol("sawEOF"),pP=Symbol("closeStream"),nZ=o(()=>!0,"noop"),mE=class extends eZ.EventEmitter{static{o(this,"Parser")}file;strict;maxMetaEntrySize;filter;brotli;zstd;writable=!0;readable=!1;[rr]=[];[ie];[ir];[xs];[Tt]="begin";[xr]="";[Ei];[Bc];[Lr]=!1;[Ee];[Mr]=!1;[Ms];[of]=!1;[af]=!1;[ro]=!1;[kc]=!1;[lE]=!1;constructor(e={}){super(),this.file=e.file||"",this.on(nf,()=>{(this[Tt]==="begin"||this[Ms]===!1)&&this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")}),e.ondone?this.on(nf,e.ondone):this.on(nf,()=>{this.emit("prefinish"),this.emit("finish"),this.emit("end")}),this.strict=!!e.strict,this.maxMetaEntrySize=e.maxMetaEntrySize||rZ,this.filter=typeof e.filter=="function"?e.filter:nZ;let t=e.file&&(e.file.endsWith(".tar.br")||e.file.endsWith(".tbr"));this.brotli=!(e.gzip||e.zstd)&&e.brotli!==void 0?e.brotli:t?void 0:!1;let r=e.file&&(e.file.endsWith(".tar.zst")||e.file.endsWith(".tzst"));this.zstd=!(e.gzip||e.brotli)&&e.zstd!==void 0?e.zstd:r?!0:void 0,this.on("end",()=>this[pP]()),typeof e.onwarn=="function"&&this.on("warn",e.onwarn),typeof e.onReadEntry=="function"&&this.on("entry",e.onReadEntry)}warn(e,t,r={}){(0,iZ.warnMethod)(this,e,t,r)}[dP](e,t){this[Ms]===void 0&&(this[Ms]=!1);let r;try{r=new cP.Header(e,t,this[Ei],this[Bc])}catch(s){return this.warn("TAR_ENTRY_INVALID",s)}if(r.nullBlock)this[of]?(this[af]=!0,this[Tt]==="begin"&&(this[Tt]="header"),this[Ls]("eof")):(this[of]=!0,this[Ls]("nullBlock"));else if(this[of]=!1,!r.cksumValid)this.warn("TAR_ENTRY_INVALID","checksum failure",{header:r});else if(!r.path)this.warn("TAR_ENTRY_INVALID","path is required",{header:r});else{let s=r.type;if(/^(Symbolic)?Link$/.test(s)&&!r.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath required",{header:r});else if(!/^(Symbolic)?Link$/.test(s)&&!/^(Global)?ExtendedHeader$/.test(s)&&r.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:r});else{let n=this[xs]=new tZ.ReadEntry(r,this[Ei],this[Bc]);if(!this[Ms])if(n.remain){let a=o(()=>{n.invalid||(this[Ms]=!0)},"onend");n.on("end",a)}else this[Ms]=!0;n.meta?n.size>this.maxMetaEntrySize?(n.ignore=!0,this[Ls]("ignoredEntry",n),this[Tt]="ignore",n.resume()):n.size>0&&(this[xr]="",n.on("data",a=>this[xr]+=a),this[Tt]="meta"):(this[Ei]=void 0,n.ignore=n.ignore||!this.filter(n.path,n),n.ignore?(this[Ls]("ignoredEntry",n),this[Tt]=n.remain?"ignore":"header",n.resume()):(n.remain?this[Tt]="body":(this[Tt]="header",n.end()),this[ir]?this[rr].push(n):(this[rr].push(n),this[uE]())))}}}[pP](){queueMicrotask(()=>this.emit("close"))}[lP](e){let t=!0;if(!e)this[ir]=void 0,t=!1;else if(Array.isArray(e)){let[r,...s]=e;this.emit(r,...s)}else this[ir]=e,this.emit("entry",e),e.emittedEnd||(e.on("end",()=>this[uE]()),t=!1);return t}[uE](){do;while(this[lP](this[rr].shift()));if(!this[rr].length){let e=this[ir];!e||e.flowing||e.size===e.remain?this[ro]||this.emit("drain"):e.once("drain",()=>this.emit("drain"))}}[hE](e,t){let r=this[xs];if(!r)throw new Error("attempt to consume body without entry??");let s=r.blockRemain??0,n=s>=e.length&&t===0?e:e.subarray(t,t+s);return r.write(n),r.blockRemain||(this[Tt]="header",this[xs]=void 0,r.end()),n.length}[fP](e,t){let r=this[xs],s=this[hE](e,t);return!this[xs]&&r&&this[hP](r),s}[Ls](e,t,r){!this[rr].length&&!this[ir]?this.emit(e,t,r):this[rr].push([e,t,r])}[hP](e){switch(this[Ls]("meta",this[xr]),e.type){case"ExtendedHeader":case"OldExtendedHeader":this[Ei]=uP.Pax.parse(this[xr],this[Ei],!1);break;case"GlobalExtendedHeader":this[Bc]=uP.Pax.parse(this[xr],this[Bc],!0);break;case"NextFileHasLongPath":case"OldGnuLongPath":{let t=this[Ei]??Object.create(null);this[Ei]=t,t.path=this[xr].replace(/\0.*/,"");break}case"NextFileHasLongLinkpath":{let t=this[Ei]||Object.create(null);this[Ei]=t,t.linkpath=this[xr].replace(/\0.*/,"");break}default:throw new Error("unknown meta: "+e.type)}}abort(e){this[Mr]=!0,this.emit("abort",e),this.warn("TAR_ABORT",e,{recoverable:!1})}write(e,t,r){if(typeof t=="function"&&(r=t,t=void 0),typeof e=="string"&&(e=Buffer.from(e,typeof t=="string"?t:"utf8")),this[Mr])return r?.(),!1;if((this[Ee]===void 0||this.brotli===void 0&&this[Ee]===!1)&&e){if(this[ie]&&(e=Buffer.concat([this[ie],e]),this[ie]=void 0),e.length<sZ)return this[ie]=e,r?.(),!0;for(let u=0;this[Ee]===void 0&&u<dE.length;u++)e[u]!==dE[u]&&(this[Ee]=!1);let a=!1;if(this[Ee]===!1&&this.zstd!==!1){a=!0;for(let u=0;u<pE.length;u++)if(e[u]!==pE[u]){a=!1;break}}let c=this.brotli===void 0&&!a;if(this[Ee]===!1&&c)if(e.length<512)if(this[Lr])this.brotli=!0;else return this[ie]=e,r?.(),!0;else try{new cP.Header(e.subarray(0,512)),this.brotli=!1}catch{this.brotli=!0}if(this[Ee]===void 0||this[Ee]===!1&&(this.brotli||a)){let u=this[Lr];this[Lr]=!1,this[Ee]=this[Ee]===void 0?new cE.Unzip({}):a?new cE.ZstdDecompress({}):new cE.BrotliDecompress({}),this[Ee].on("data",h=>this[tf](h)),this[Ee].on("error",h=>this.abort(h)),this[Ee].on("end",()=>{this[Lr]=!0,this[tf]()}),this[ro]=!0;let l=!!this[Ee][u?"end":"write"](e);return this[ro]=!1,r?.(),l}}this[ro]=!0,this[Ee]?this[Ee].write(e):this[tf](e),this[ro]=!1;let n=this[rr].length?!1:this[ir]?this[ir].flowing:!0;return!n&&!this[rr].length&&this[ir]?.once("drain",()=>this.emit("drain")),r?.(),n}[fE](e){e&&!this[Mr]&&(this[ie]=this[ie]?Buffer.concat([this[ie],e]):e)}[sf](){if(this[Lr]&&!this[lE]&&!this[Mr]&&!this[kc]){this[lE]=!0;let e=this[xs];if(e&&e.blockRemain){let t=this[ie]?this[ie].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${e.blockRemain} more bytes, only ${t} available)`,{entry:e}),this[ie]&&e.write(this[ie]),e.end()}this[Ls](nf)}}[tf](e){if(this[kc]&&e)this[fE](e);else if(!e&&!this[ie])this[sf]();else if(e){if(this[kc]=!0,this[ie]){this[fE](e);let t=this[ie];this[ie]=void 0,this[rf](t)}else this[rf](e);for(;this[ie]&&this[ie]?.length>=512&&!this[Mr]&&!this[af];){let t=this[ie];this[ie]=void 0,this[rf](t)}this[kc]=!1}(!this[ie]||this[Lr])&&this[sf]()}[rf](e){let t=0,r=e.length;for(;t+512<=r&&!this[Mr]&&!this[af];)switch(this[Tt]){case"begin":case"header":this[dP](e,t),t+=512;break;case"ignore":case"body":t+=this[hE](e,t);break;case"meta":t+=this[fP](e,t);break;default:throw new Error("invalid state: "+this[Tt])}t<r&&(this[ie]?this[ie]=Buffer.concat([e.subarray(t),this[ie]]):this[ie]=e.subarray(t))}end(e,t,r){return typeof e=="function"&&(r=e,t=void 0,e=void 0),typeof t=="function"&&(r=t,t=void 0),typeof e=="string"&&(e=Buffer.from(e,t)),r&&this.once("finish",r),this[Mr]||(this[Ee]?(e&&this[Ee].write(e),this[Ee].end()):(this[Lr]=!0,(this.brotli===void 0||this.zstd===void 0)&&(e=e||Buffer.alloc(0)),e&&this.write(e),this[sf]())),this}};cf.Parser=mE});var hf=d(lf=>{"use strict";Object.defineProperty(lf,"__esModule",{value:!0});lf.stripTrailingSlashes=void 0;var oZ=o(i=>{let e=i.length-1,t=-1;for(;e>-1&&i.charAt(e)==="/";)t=e,e--;return t===-1?i:i.slice(0,t)},"stripTrailingSlashes");lf.stripTrailingSlashes=oZ});var no=d(Je=>{"use strict";var aZ=Je&&Je.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(i,r,s)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),cZ=Je&&Je.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),uZ=Je&&Je.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&aZ(e,i,t);return cZ(e,i),e},lZ=Je&&Je.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Je,"__esModule",{value:!0});Je.list=Je.filesFilter=void 0;var hZ=uZ(Zn()),so=lZ(require("node:fs")),mP=require("path"),fZ=Yn(),ff=uf(),gE=hf(),dZ=o(i=>{let e=i.onReadEntry;i.onReadEntry=e?t=>{e(t),t.resume()}:t=>t.resume()},"onReadEntryFunction"),pZ=o((i,e)=>{let t=new Map(e.map(n=>[(0,gE.stripTrailingSlashes)(n),!0])),r=i.filter,s=o((n,a="")=>{let c=a||(0,mP.parse)(n).root||".",u;if(n===c)u=!1;else{let l=t.get(n);l!==void 0?u=l:u=s((0,mP.dirname)(n),c)}return t.set(n,u),u},"mapHas");i.filter=r?(n,a)=>r(n,a)&&s((0,gE.stripTrailingSlashes)(n)):n=>s((0,gE.stripTrailingSlashes)(n))},"filesFilter");Je.filesFilter=pZ;var mZ=o(i=>{let e=new ff.Parser(i),t=i.file,r;try{r=so.default.openSync(t,"r");let s=so.default.fstatSync(r),n=i.maxReadSize||16*1024*1024;if(s.size<n){let a=Buffer.allocUnsafe(s.size);so.default.readSync(r,a,0,s.size,0),e.end(a)}else{let a=0,c=Buffer.allocUnsafe(n);for(;a<s.size;){let u=so.default.readSync(r,c,0,n,a);a+=u,e.write(c.subarray(0,u))}e.end()}}finally{if(typeof r=="number")try{so.default.closeSync(r)}catch{}}},"listFileSync"),gZ=o((i,e)=>{let t=new ff.Parser(i),r=i.maxReadSize||16*1024*1024,s=i.file;return new Promise((a,c)=>{t.on("error",c),t.on("end",a),so.default.stat(s,(u,l)=>{if(u)c(u);else{let h=new hZ.ReadStream(s,{readSize:r,size:l.size});h.on("error",c),h.pipe(t)}})})},"listFile");Je.list=(0,fZ.makeCommand)(mZ,gZ,i=>new ff.Parser(i),i=>new ff.Parser(i),(i,e)=>{e?.length&&(0,Je.filesFilter)(i,e),i.noResume||dZ(i)})});var gP=d(df=>{"use strict";Object.defineProperty(df,"__esModule",{value:!0});df.modeFix=void 0;var yZ=o((i,e,t)=>(i&=4095,t&&(i=(i|384)&-19),e&&(i&256&&(i|=64),i&32&&(i|=8),i&4&&(i|=1)),i),"modeFix");df.modeFix=yZ});var yE=d(pf=>{"use strict";Object.defineProperty(pf,"__esModule",{value:!0});pf.stripAbsolutePath=void 0;var SZ=require("node:path"),{isAbsolute:EZ,parse:yP}=SZ.win32,wZ=o(i=>{let e="",t=yP(i);for(;EZ(i)||t.root;){let r=i.charAt(0)==="/"&&i.slice(0,4)!=="//?/"?"/":t.root;i=i.slice(r.length),e+=r,t=yP(i)}return[e,i]},"stripAbsolutePath");pf.stripAbsolutePath=wZ});var EE=d(oo=>{"use strict";Object.defineProperty(oo,"__esModule",{value:!0});oo.decode=oo.encode=void 0;var mf=["|","<",">","?",":"],SE=mf.map(i=>String.fromCharCode(61440+i.charCodeAt(0))),_Z=new Map(mf.map((i,e)=>[i,SE[e]])),bZ=new Map(SE.map((i,e)=>[i,mf[e]])),IZ=o(i=>mf.reduce((e,t)=>e.split(t).join(_Z.get(t)),i),"encode");oo.encode=IZ;var OZ=o(i=>SE.reduce((e,t)=>e.split(t).join(bZ.get(t)),i),"decode");oo.decode=OZ});var NE=d(Fe=>{"use strict";var vZ=Fe&&Fe.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(i,r,s)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),CZ=Fe&&Fe.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),RZ=Fe&&Fe.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&vZ(e,i,t);return CZ(e,i),e},IP=Fe&&Fe.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Fe,"__esModule",{value:!0});Fe.WriteEntryTar=Fe.WriteEntrySync=Fe.WriteEntry=void 0;var _i=IP(require("fs")),OP=te(),SP=IP(require("path")),vP=to(),CP=gP(),wi=io(),RP=Vh(),AP=Jh(),TP=yE(),AZ=hf(),NP=ef(),TZ=RZ(EE()),PP=o((i,e)=>e?(i=(0,wi.normalizeWindowsPath)(i).replace(/^\.(\/|$)/,""),(0,AZ.stripTrailingSlashes)(e)+"/"+i):(0,wi.normalizeWindowsPath)(i),"prefixPath"),NZ=16*1024*1024,EP=Symbol("process"),wP=Symbol("file"),_P=Symbol("directory"),_E=Symbol("symlink"),bP=Symbol("hardlink"),Fc=Symbol("header"),gf=Symbol("read"),bE=Symbol("lstat"),yf=Symbol("onlstat"),IE=Symbol("onread"),OE=Symbol("onreadlink"),vE=Symbol("openfile"),CE=Symbol("onopenfile"),Br=Symbol("close"),Sf=Symbol("mode"),RE=Symbol("awaitDrain"),wE=Symbol("ondrain"),bi=Symbol("prefix"),Ef=class extends OP.Minipass{static{o(this,"WriteEntry")}path;portable;myuid=process.getuid&&process.getuid()||0;myuser=process.env.USER||"";maxReadSize;linkCache;statCache;preservePaths;cwd;strict;mtime;noPax;noMtime;prefix;fd;blockLen=0;blockRemain=0;buf;pos=0;remain=0;length=0;offset=0;win32;absolute;header;type;linkpath;stat;onWriteEntry;#e=!1;constructor(e,t={}){let r=(0,RP.dealias)(t);super(),this.path=(0,wi.normalizeWindowsPath)(e),this.portable=!!r.portable,this.maxReadSize=r.maxReadSize||NZ,this.linkCache=r.linkCache||new Map,this.statCache=r.statCache||new Map,this.preservePaths=!!r.preservePaths,this.cwd=(0,wi.normalizeWindowsPath)(r.cwd||process.cwd()),this.strict=!!r.strict,this.noPax=!!r.noPax,this.noMtime=!!r.noMtime,this.mtime=r.mtime,this.prefix=r.prefix?(0,wi.normalizeWindowsPath)(r.prefix):void 0,this.onWriteEntry=r.onWriteEntry,typeof r.onwarn=="function"&&this.on("warn",r.onwarn);let s=!1;if(!this.preservePaths){let[a,c]=(0,TP.stripAbsolutePath)(this.path);a&&typeof c=="string"&&(this.path=c,s=a)}this.win32=!!r.win32||process.platform==="win32",this.win32&&(this.path=TZ.decode(this.path.replace(/\\/g,"/")),e=e.replace(/\\/g,"/")),this.absolute=(0,wi.normalizeWindowsPath)(r.absolute||SP.default.resolve(this.cwd,e)),this.path===""&&(this.path="./"),s&&this.warn("TAR_ENTRY_INFO",`stripping ${s} from absolute path`,{entry:this,path:s+this.path});let n=this.statCache.get(this.absolute);n?this[yf](n):this[bE]()}warn(e,t,r={}){return(0,NP.warnMethod)(this,e,t,r)}emit(e,...t){return e==="error"&&(this.#e=!0),super.emit(e,...t)}[bE](){_i.default.lstat(this.absolute,(e,t)=>{if(e)return this.emit("error",e);this[yf](t)})}[yf](e){this.statCache.set(this.absolute,e),this.stat=e,e.isFile()||(e.size=0),this.type=PZ(e),this.emit("stat",e),this[EP]()}[EP](){switch(this.type){case"File":return this[wP]();case"Directory":return this[_P]();case"SymbolicLink":return this[_E]();default:return this.end()}}[Sf](e){return(0,CP.modeFix)(e,this.type==="Directory",this.portable)}[bi](e){return PP(e,this.prefix)}[Fc](){if(!this.stat)throw new Error("cannot write header before stat");this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.onWriteEntry?.(this),this.header=new vP.Header({path:this[bi](this.path),linkpath:this.type==="Link"&&this.linkpath!==void 0?this[bi](this.linkpath):this.linkpath,mode:this[Sf](this.stat.mode),uid:this.portable?void 0:this.stat.uid,gid:this.portable?void 0:this.stat.gid,size:this.stat.size,mtime:this.noMtime?void 0:this.mtime||this.stat.mtime,type:this.type==="Unsupported"?void 0:this.type,uname:this.portable?void 0:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?void 0:this.stat.atime,ctime:this.portable?void 0:this.stat.ctime}),this.header.encode()&&!this.noPax&&super.write(new AP.Pax({atime:this.portable?void 0:this.header.atime,ctime:this.portable?void 0:this.header.ctime,gid:this.portable?void 0:this.header.gid,mtime:this.noMtime?void 0:this.mtime||this.header.mtime,path:this[bi](this.path),linkpath:this.type==="Link"&&this.linkpath!==void 0?this[bi](this.linkpath):this.linkpath,size:this.header.size,uid:this.portable?void 0:this.header.uid,uname:this.portable?void 0:this.header.uname,dev:this.portable?void 0:this.stat.dev,ino:this.portable?void 0:this.stat.ino,nlink:this.portable?void 0:this.stat.nlink}).encode());let e=this.header?.block;if(!e)throw new Error("failed to encode header");super.write(e)}[_P](){if(!this.stat)throw new Error("cannot create directory entry without stat");this.path.slice(-1)!=="/"&&(this.path+="/"),this.stat.size=0,this[Fc](),this.end()}[_E](){_i.default.readlink(this.absolute,(e,t)=>{if(e)return this.emit("error",e);this[OE](t)})}[OE](e){this.linkpath=(0,wi.normalizeWindowsPath)(e),this[Fc](),this.end()}[bP](e){if(!this.stat)throw new Error("cannot create link entry without stat");this.type="Link",this.linkpath=(0,wi.normalizeWindowsPath)(SP.default.relative(this.cwd,e)),this.stat.size=0,this[Fc](),this.end()}[wP](){if(!this.stat)throw new Error("cannot create file entry without stat");if(this.stat.nlink>1){let e=`${this.stat.dev}:${this.stat.ino}`,t=this.linkCache.get(e);if(t?.indexOf(this.cwd)===0)return this[bP](t);this.linkCache.set(e,this.absolute)}if(this[Fc](),this.stat.size===0)return this.end();this[vE]()}[vE](){_i.default.open(this.absolute,"r",(e,t)=>{if(e)return this.emit("error",e);this[CE](t)})}[CE](e){if(this.fd=e,this.#e)return this[Br]();if(!this.stat)throw new Error("should stat before calling onopenfile");this.blockLen=512*Math.ceil(this.stat.size/512),this.blockRemain=this.blockLen;let t=Math.min(this.blockLen,this.maxReadSize);this.buf=Buffer.allocUnsafe(t),this.offset=0,this.pos=0,this.remain=this.stat.size,this.length=this.buf.length,this[gf]()}[gf](){let{fd:e,buf:t,offset:r,length:s,pos:n}=this;if(e===void 0||t===void 0)throw new Error("cannot read file without first opening");_i.default.read(e,t,r,s,n,(a,c)=>{if(a)return this[Br](()=>this.emit("error",a));this[IE](c)})}[Br](e=()=>{}){this.fd!==void 0&&_i.default.close(this.fd,e)}[IE](e){if(e<=0&&this.remain>0){let s=Object.assign(new Error("encountered unexpected EOF"),{path:this.absolute,syscall:"read",code:"EOF"});return this[Br](()=>this.emit("error",s))}if(e>this.remain){let s=Object.assign(new Error("did not encounter expected EOF"),{path:this.absolute,syscall:"read",code:"EOF"});return this[Br](()=>this.emit("error",s))}if(!this.buf)throw new Error("should have created buffer prior to reading");if(e===this.remain)for(let s=e;s<this.length&&e<this.blockRemain;s++)this.buf[s+this.offset]=0,e++,this.remain++;let t=this.offset===0&&e===this.buf.length?this.buf:this.buf.subarray(this.offset,this.offset+e);this.write(t)?this[wE]():this[RE](()=>this[wE]())}[RE](e){this.once("drain",e)}write(e,t,r){if(typeof t=="function"&&(r=t,t=void 0),typeof e=="string"&&(e=Buffer.from(e,typeof t=="string"?t:"utf8")),this.blockRemain<e.length){let s=Object.assign(new Error("writing more data than expected"),{path:this.absolute});return this.emit("error",s)}return this.remain-=e.length,this.blockRemain-=e.length,this.pos+=e.length,this.offset+=e.length,super.write(e,null,r)}[wE](){if(!this.remain)return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),this[Br](e=>e?this.emit("error",e):this.end());if(!this.buf)throw new Error("buffer lost somehow in ONDRAIN");this.offset>=this.length&&(this.buf=Buffer.allocUnsafe(Math.min(this.blockRemain,this.buf.length)),this.offset=0),this.length=this.buf.length-this.offset,this[gf]()}};Fe.WriteEntry=Ef;var AE=class extends Ef{static{o(this,"WriteEntrySync")}sync=!0;[bE](){this[yf](_i.default.lstatSync(this.absolute))}[_E](){this[OE](_i.default.readlinkSync(this.absolute))}[vE](){this[CE](_i.default.openSync(this.absolute,"r"))}[gf](){let e=!0;try{let{fd:t,buf:r,offset:s,length:n,pos:a}=this;if(t===void 0||r===void 0)throw new Error("fd and buf must be set in READ method");let c=_i.default.readSync(t,r,s,n,a);this[IE](c),e=!1}finally{if(e)try{this[Br](()=>{})}catch{}}}[RE](e){e()}[Br](e=()=>{}){this.fd!==void 0&&_i.default.closeSync(this.fd),e()}};Fe.WriteEntrySync=AE;var TE=class extends OP.Minipass{static{o(this,"WriteEntryTar")}blockLen=0;blockRemain=0;buf=0;pos=0;remain=0;length=0;preservePaths;portable;strict;noPax;noMtime;readEntry;type;prefix;path;mode;uid;gid;uname;gname;header;mtime;atime;ctime;linkpath;size;onWriteEntry;warn(e,t,r={}){return(0,NP.warnMethod)(this,e,t,r)}constructor(e,t={}){let r=(0,RP.dealias)(t);super(),this.preservePaths=!!r.preservePaths,this.portable=!!r.portable,this.strict=!!r.strict,this.noPax=!!r.noPax,this.noMtime=!!r.noMtime,this.onWriteEntry=r.onWriteEntry,this.readEntry=e;let{type:s}=e;if(s==="Unsupported")throw new Error("writing entry that should be ignored");this.type=s,this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.prefix=r.prefix,this.path=(0,wi.normalizeWindowsPath)(e.path),this.mode=e.mode!==void 0?this[Sf](e.mode):void 0,this.uid=this.portable?void 0:e.uid,this.gid=this.portable?void 0:e.gid,this.uname=this.portable?void 0:e.uname,this.gname=this.portable?void 0:e.gname,this.size=e.size,this.mtime=this.noMtime?void 0:r.mtime||e.mtime,this.atime=this.portable?void 0:e.atime,this.ctime=this.portable?void 0:e.ctime,this.linkpath=e.linkpath!==void 0?(0,wi.normalizeWindowsPath)(e.linkpath):void 0,typeof r.onwarn=="function"&&this.on("warn",r.onwarn);let n=!1;if(!this.preservePaths){let[c,u]=(0,TP.stripAbsolutePath)(this.path);c&&typeof u=="string"&&(this.path=u,n=c)}this.remain=e.size,this.blockRemain=e.startBlockSize,this.onWriteEntry?.(this),this.header=new vP.Header({path:this[bi](this.path),linkpath:this.type==="Link"&&this.linkpath!==void 0?this[bi](this.linkpath):this.linkpath,mode:this.mode,uid:this.portable?void 0:this.uid,gid:this.portable?void 0:this.gid,size:this.size,mtime:this.noMtime?void 0:this.mtime,type:this.type,uname:this.portable?void 0:this.uname,atime:this.portable?void 0:this.atime,ctime:this.portable?void 0:this.ctime}),n&&this.warn("TAR_ENTRY_INFO",`stripping ${n} from absolute path`,{entry:this,path:n+this.path}),this.header.encode()&&!this.noPax&&super.write(new AP.Pax({atime:this.portable?void 0:this.atime,ctime:this.portable?void 0:this.ctime,gid:this.portable?void 0:this.gid,mtime:this.noMtime?void 0:this.mtime,path:this[bi](this.path),linkpath:this.type==="Link"&&this.linkpath!==void 0?this[bi](this.linkpath):this.linkpath,size:this.size,uid:this.portable?void 0:this.uid,uname:this.portable?void 0:this.uname,dev:this.portable?void 0:this.readEntry.dev,ino:this.portable?void 0:this.readEntry.ino,nlink:this.portable?void 0:this.readEntry.nlink}).encode());let a=this.header?.block;if(!a)throw new Error("failed to encode header");super.write(a),e.pipe(this)}[bi](e){return PP(e,this.prefix)}[Sf](e){return(0,CP.modeFix)(e,this.type==="Directory",this.portable)}write(e,t,r){typeof t=="function"&&(r=t,t=void 0),typeof e=="string"&&(e=Buffer.from(e,typeof t=="string"?t:"utf8"));let s=e.length;if(s>this.blockRemain)throw new Error("writing more to entry than is appropriate");return this.blockRemain-=s,super.write(e,r)}end(e,t,r){return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),typeof e=="function"&&(r=e,t=void 0,e=void 0),typeof t=="function"&&(r=t,t=void 0),typeof e=="string"&&(e=Buffer.from(e,t??"utf8")),r&&this.once("finish",r),e?super.end(e,r):super.end(r),this}};Fe.WriteEntryTar=TE;var PZ=o(i=>i.isFile()?"File":i.isDirectory()?"Directory":i.isSymbolicLink()?"SymbolicLink":"Unsupported","getType")});var DP=d(co=>{"use strict";Object.defineProperty(co,"__esModule",{value:!0});co.Node=co.Yallist=void 0;var PE=class i{static{o(this,"Yallist")}tail;head;length=0;static create(e=[]){return new i(e)}constructor(e=[]){for(let t of e)this.push(t)}*[Symbol.iterator](){for(let e=this.head;e;e=e.next)yield e.value}removeNode(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");let t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),this.length--,e.next=void 0,e.prev=void 0,e.list=void 0,t}unshiftNode(e){if(e===this.head)return;e.list&&e.list.removeNode(e);let t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}pushNode(e){if(e===this.tail)return;e.list&&e.list.removeNode(e);let t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}push(...e){for(let t=0,r=e.length;t<r;t++)xZ(this,e[t]);return this.length}unshift(...e){for(var t=0,r=e.length;t<r;t++)LZ(this,e[t]);return this.length}pop(){if(!this.tail)return;let e=this.tail.value,t=this.tail;return this.tail=this.tail.prev,this.tail?this.tail.next=void 0:this.head=void 0,t.list=void 0,this.length--,e}shift(){if(!this.head)return;let e=this.head.value,t=this.head;return this.head=this.head.next,this.head?this.head.prev=void 0:this.tail=void 0,t.list=void 0,this.length--,e}forEach(e,t){t=t||this;for(let r=this.head,s=0;r;s++)e.call(t,r.value,s,this),r=r.next}forEachReverse(e,t){t=t||this;for(let r=this.tail,s=this.length-1;r;s--)e.call(t,r.value,s,this),r=r.prev}get(e){let t=0,r=this.head;for(;r&&t<e;t++)r=r.next;if(t===e&&r)return r.value}getReverse(e){let t=0,r=this.tail;for(;r&&t<e;t++)r=r.prev;if(t===e&&r)return r.value}map(e,t){t=t||this;let r=new i;for(let s=this.head;s;)r.push(e.call(t,s.value,this)),s=s.next;return r}mapReverse(e,t){t=t||this;var r=new i;for(let s=this.tail;s;)r.push(e.call(t,s.value,this)),s=s.prev;return r}reduce(e,t){let r,s=this.head;if(arguments.length>1)r=t;else if(this.head)s=this.head.next,r=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var n=0;s;n++)r=e(r,s.value,n),s=s.next;return r}reduceReverse(e,t){let r,s=this.tail;if(arguments.length>1)r=t;else if(this.tail)s=this.tail.prev,r=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(let n=this.length-1;s;n--)r=e(r,s.value,n),s=s.prev;return r}toArray(){let e=new Array(this.length);for(let t=0,r=this.head;r;t++)e[t]=r.value,r=r.next;return e}toArrayReverse(){let e=new Array(this.length);for(let t=0,r=this.tail;r;t++)e[t]=r.value,r=r.prev;return e}slice(e=0,t=this.length){t<0&&(t+=this.length),e<0&&(e+=this.length);let r=new i;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);let s=this.head,n=0;for(n=0;s&&n<e;n++)s=s.next;for(;s&&n<t;n++,s=s.next)r.push(s.value);return r}sliceReverse(e=0,t=this.length){t<0&&(t+=this.length),e<0&&(e+=this.length);let r=new i;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);let s=this.length,n=this.tail;for(;n&&s>t;s--)n=n.prev;for(;n&&s>e;s--,n=n.prev)r.push(n.value);return r}splice(e,t=0,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);let s=this.head;for(let a=0;s&&a<e;a++)s=s.next;let n=[];for(let a=0;s&&a<t;a++)n.push(s.value),s=this.removeNode(s);s?s!==this.tail&&(s=s.prev):s=this.tail;for(let a of r)s=DZ(this,s,a);return n}reverse(){let e=this.head,t=this.tail;for(let r=e;r;r=r.prev){let s=r.prev;r.prev=r.next,r.next=s}return this.head=t,this.tail=e,this}};co.Yallist=PE;function DZ(i,e,t){let r=e,s=e?e.next:i.head,n=new ao(t,r,s,i);return n.next===void 0&&(i.tail=n),n.prev===void 0&&(i.head=n),i.length++,n}o(DZ,"insertAfter");function xZ(i,e){i.tail=new ao(e,i.tail,void 0,i),i.head||(i.head=i.tail),i.length++}o(xZ,"push");function LZ(i,e){i.head=new ao(e,void 0,i.head,i),i.tail||(i.tail=i.head),i.length++}o(LZ,"unshift");var ao=class{static{o(this,"Node")}list;next;prev;value;constructor(e,t,r,s){this.list=s,this.value=e,t?(t.next=this,this.prev=t):this.prev=void 0,r?(r.prev=this,this.next=r):this.next=void 0}};co.Node=ao});var Rf=d(Ue=>{"use strict";var MZ=Ue&&Ue.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(i,r,s)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),BZ=Ue&&Ue.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),kZ=Ue&&Ue.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&MZ(e,i,t);return BZ(e,i),e},FP=Ue&&Ue.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Ue,"__esModule",{value:!0});Ue.PackSync=Ue.Pack=Ue.PackJob=void 0;var vf=FP(require("fs")),kE=NE(),$c=class{static{o(this,"PackJob")}path;absolute;entry;stat;readdir;pending=!1;ignore=!1;piped=!1;constructor(e,t){this.path=e||"./",this.absolute=t}};Ue.PackJob=$c;var FZ=te(),DE=kZ(Lc()),UZ=DP(),jZ=Xh(),$Z=ef(),xP=Buffer.alloc(1024),wf=Symbol("onStat"),Uc=Symbol("ended"),Xt=Symbol("queue"),uo=Symbol("current"),Bs=Symbol("process"),jc=Symbol("processing"),LP=Symbol("processJob"),Qt=Symbol("jobs"),xE=Symbol("jobDone"),_f=Symbol("addFSEntry"),MP=Symbol("addTarEntry"),FE=Symbol("stat"),UE=Symbol("readdir"),bf=Symbol("onreaddir"),If=Symbol("pipe"),BP=Symbol("entry"),LE=Symbol("entryOpt"),Of=Symbol("writeEntryClass"),UP=Symbol("write"),ME=Symbol("ondrain"),kP=FP(require("path")),BE=io(),Cf=class extends FZ.Minipass{static{o(this,"Pack")}opt;cwd;maxReadSize;preservePaths;strict;noPax;prefix;linkCache;statCache;file;portable;zip;readdirCache;noDirRecurse;follow;noMtime;mtime;filter;jobs;[Of];onWriteEntry;[Xt];[Qt]=0;[jc]=!1;[Uc]=!1;constructor(e={}){if(super(),this.opt=e,this.file=e.file||"",this.cwd=e.cwd||process.cwd(),this.maxReadSize=e.maxReadSize,this.preservePaths=!!e.preservePaths,this.strict=!!e.strict,this.noPax=!!e.noPax,this.prefix=(0,BE.normalizeWindowsPath)(e.prefix||""),this.linkCache=e.linkCache||new Map,this.statCache=e.statCache||new Map,this.readdirCache=e.readdirCache||new Map,this.onWriteEntry=e.onWriteEntry,this[Of]=kE.WriteEntry,typeof e.onwarn=="function"&&this.on("warn",e.onwarn),this.portable=!!e.portable,e.gzip||e.brotli||e.zstd){if((e.gzip?1:0)+(e.brotli?1:0)+(e.zstd?1:0)>1)throw new TypeError("gzip, brotli, zstd are mutually exclusive");if(e.gzip&&(typeof e.gzip!="object"&&(e.gzip={}),this.portable&&(e.gzip.portable=!0),this.zip=new DE.Gzip(e.gzip)),e.brotli&&(typeof e.brotli!="object"&&(e.brotli={}),this.zip=new DE.BrotliCompress(e.brotli)),e.zstd&&(typeof e.zstd!="object"&&(e.zstd={}),this.zip=new DE.ZstdCompress(e.zstd)),!this.zip)throw new Error("impossible");let t=this.zip;t.on("data",r=>super.write(r)),t.on("end",()=>super.end()),t.on("drain",()=>this[ME]()),this.on("resume",()=>t.resume())}else this.on("drain",this[ME]);this.noDirRecurse=!!e.noDirRecurse,this.follow=!!e.follow,this.noMtime=!!e.noMtime,e.mtime&&(this.mtime=e.mtime),this.filter=typeof e.filter=="function"?e.filter:()=>!0,this[Xt]=new UZ.Yallist,this[Qt]=0,this.jobs=Number(e.jobs)||4,this[jc]=!1,this[Uc]=!1}[UP](e){return super.write(e)}add(e){return this.write(e),this}end(e,t,r){return typeof e=="function"&&(r=e,e=void 0),typeof t=="function"&&(r=t,t=void 0),e&&this.add(e),this[Uc]=!0,this[Bs](),r&&r(),this}write(e){if(this[Uc])throw new Error("write after end");return e instanceof jZ.ReadEntry?this[MP](e):this[_f](e),this.flowing}[MP](e){let t=(0,BE.normalizeWindowsPath)(kP.default.resolve(this.cwd,e.path));if(!this.filter(e.path,e))e.resume();else{let r=new $c(e.path,t);r.entry=new kE.WriteEntryTar(e,this[LE](r)),r.entry.on("end",()=>this[xE](r)),this[Qt]+=1,this[Xt].push(r)}this[Bs]()}[_f](e){let t=(0,BE.normalizeWindowsPath)(kP.default.resolve(this.cwd,e));this[Xt].push(new $c(e,t)),this[Bs]()}[FE](e){e.pending=!0,this[Qt]+=1;let t=this.follow?"stat":"lstat";vf.default[t](e.absolute,(r,s)=>{e.pending=!1,this[Qt]-=1,r?this.emit("error",r):this[wf](e,s)})}[wf](e,t){this.statCache.set(e.absolute,t),e.stat=t,this.filter(e.path,t)||(e.ignore=!0),this[Bs]()}[UE](e){e.pending=!0,this[Qt]+=1,vf.default.readdir(e.absolute,(t,r)=>{if(e.pending=!1,this[Qt]-=1,t)return this.emit("error",t);this[bf](e,r)})}[bf](e,t){this.readdirCache.set(e.absolute,t),e.readdir=t,this[Bs]()}[Bs](){if(!this[jc]){this[jc]=!0;for(let e=this[Xt].head;e&&this[Qt]<this.jobs;e=e.next)if(this[LP](e.value),e.value.ignore){let t=e.next;this[Xt].removeNode(e),e.next=t}this[jc]=!1,this[Uc]&&!this[Xt].length&&this[Qt]===0&&(this.zip?this.zip.end(xP):(super.write(xP),super.end()))}}get[uo](){return this[Xt]&&this[Xt].head&&this[Xt].head.value}[xE](e){this[Xt].shift(),this[Qt]-=1,this[Bs]()}[LP](e){if(!e.pending){if(e.entry){e===this[uo]&&!e.piped&&this[If](e);return}if(!e.stat){let t=this.statCache.get(e.absolute);t?this[wf](e,t):this[FE](e)}if(e.stat&&!e.ignore){if(!this.noDirRecurse&&e.stat.isDirectory()&&!e.readdir){let t=this.readdirCache.get(e.absolute);if(t?this[bf](e,t):this[UE](e),!e.readdir)return}if(e.entry=this[BP](e),!e.entry){e.ignore=!0;return}e===this[uo]&&!e.piped&&this[If](e)}}}[LE](e){return{onwarn:o((t,r,s)=>this.warn(t,r,s),"onwarn"),noPax:this.noPax,cwd:this.cwd,absolute:e.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime,prefix:this.prefix,onWriteEntry:this.onWriteEntry}}[BP](e){this[Qt]+=1;try{return new this[Of](e.path,this[LE](e)).on("end",()=>this[xE](e)).on("error",r=>this.emit("error",r))}catch(t){this.emit("error",t)}}[ME](){this[uo]&&this[uo].entry&&this[uo].entry.resume()}[If](e){e.piped=!0,e.readdir&&e.readdir.forEach(s=>{let n=e.path,a=n==="./"?"":n.replace(/\/*$/,"/");this[_f](a+s)});let t=e.entry,r=this.zip;if(!t)throw new Error("cannot pipe without source");r?t.on("data",s=>{r.write(s)||t.pause()}):t.on("data",s=>{super.write(s)||t.pause()})}pause(){return this.zip&&this.zip.pause(),super.pause()}warn(e,t,r={}){(0,$Z.warnMethod)(this,e,t,r)}};Ue.Pack=Cf;var jE=class extends Cf{static{o(this,"PackSync")}sync=!0;constructor(e){super(e),this[Of]=kE.WriteEntrySync}pause(){}resume(){}[FE](e){let t=this.follow?"statSync":"lstatSync";this[wf](e,vf.default[t](e.absolute))}[UE](e){this[bf](e,vf.default.readdirSync(e.absolute))}[If](e){let t=e.entry,r=this.zip;if(e.readdir&&e.readdir.forEach(s=>{let n=e.path,a=n==="./"?"":n.replace(/\/*$/,"/");this[_f](a+s)}),!t)throw new Error("Cannot pipe without source");r?t.on("data",s=>{r.write(s)}):t.on("data",s=>{super[UP](s)})}};Ue.PackSync=jE});var $E=d(lo=>{"use strict";var qZ=lo&&lo.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(lo,"__esModule",{value:!0});lo.create=void 0;var jP=Zn(),$P=qZ(require("node:path")),qP=no(),VZ=Yn(),Af=Rf(),zZ=o((i,e)=>{let t=new Af.PackSync(i),r=new jP.WriteStreamSync(i.file,{mode:i.mode||438});t.pipe(r),VP(t,e)},"createFileSync"),HZ=o((i,e)=>{let t=new Af.Pack(i),r=new jP.WriteStream(i.file,{mode:i.mode||438});t.pipe(r);let s=new Promise((n,a)=>{r.on("error",a),r.on("close",n),t.on("error",a)});return zP(t,e),s},"createFile"),VP=o((i,e)=>{e.forEach(t=>{t.charAt(0)==="@"?(0,qP.list)({file:$P.default.resolve(i.cwd,t.slice(1)),sync:!0,noResume:!0,onReadEntry:o(r=>i.add(r),"onReadEntry")}):i.add(t)}),i.end()},"addFilesSync"),zP=o(async(i,e)=>{for(let t=0;t<e.length;t++){let r=String(e[t]);r.charAt(0)==="@"?await(0,qP.list)({file:$P.default.resolve(String(i.cwd),r.slice(1)),noResume:!0,onReadEntry:o(s=>{i.add(s)},"onReadEntry")}):i.add(r)}i.end()},"addFilesAsync"),GZ=o((i,e)=>{let t=new Af.PackSync(i);return VP(t,e),t},"createSync"),WZ=o((i,e)=>{let t=new Af.Pack(i);return zP(t,e),t},"createAsync");lo.create=(0,VZ.makeCommand)(zZ,HZ,GZ,WZ,(i,e)=>{if(!e?.length)throw new TypeError("no paths specified to add to archive")})});var WP=d(ho=>{"use strict";var JZ=ho&&ho.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(ho,"__esModule",{value:!0});ho.getWriteFlag=void 0;var HP=JZ(require("fs")),KZ=process.env.__FAKE_PLATFORM__||process.platform,ZZ=KZ==="win32",{O_CREAT:YZ,O_TRUNC:XZ,O_WRONLY:QZ}=HP.default.constants,GP=Number(process.env.__FAKE_FS_O_FILENAME__)||HP.default.constants.UV_FS_O_FILEMAP||0,eY=ZZ&&!!GP,tY=512*1024,iY=GP|XZ|YZ|QZ;ho.getWriteFlag=eY?i=>i<tY?iY:"w":()=>"w"});var KP=d(Ii=>{"use strict";var JP=Ii&&Ii.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Ii,"__esModule",{value:!0});Ii.chownrSync=Ii.chownr=void 0;var Nf=JP(require("node:fs")),qc=JP(require("node:path")),qE=o((i,e,t)=>{try{return Nf.default.lchownSync(i,e,t)}catch(r){if(r?.code!=="ENOENT")throw r}},"lchownSync"),Tf=o((i,e,t,r)=>{Nf.default.lchown(i,e,t,s=>{r(s&&s?.code!=="ENOENT"?s:null)})},"chown"),rY=o((i,e,t,r,s)=>{if(e.isDirectory())(0,Ii.chownr)(qc.default.resolve(i,e.name),t,r,n=>{if(n)return s(n);let a=qc.default.resolve(i,e.name);Tf(a,t,r,s)});else{let n=qc.default.resolve(i,e.name);Tf(n,t,r,s)}},"chownrKid"),sY=o((i,e,t,r)=>{Nf.default.readdir(i,{withFileTypes:!0},(s,n)=>{if(s){if(s.code==="ENOENT")return r();if(s.code!=="ENOTDIR"&&s.code!=="ENOTSUP")return r(s)}if(s||!n.length)return Tf(i,e,t,r);let a=n.length,c=null,u=o(l=>{if(!c){if(l)return r(c=l);if(--a===0)return Tf(i,e,t,r)}},"then");for(let l of n)rY(i,l,e,t,u)})},"chownr");Ii.chownr=sY;var nY=o((i,e,t,r)=>{e.isDirectory()&&(0,Ii.chownrSync)(qc.default.resolve(i,e.name),t,r),qE(qc.default.resolve(i,e.name),t,r)},"chownrKidSync"),oY=o((i,e,t)=>{let r;try{r=Nf.default.readdirSync(i,{withFileTypes:!0})}catch(s){let n=s;if(n?.code==="ENOENT")return;if(n?.code==="ENOTDIR"||n?.code==="ENOTSUP")return qE(i,e,t);throw n}for(let s of r)nY(i,s,e,t);return qE(i,e,t)},"chownrSync");Ii.chownrSync=oY});var ZP=d(Pf=>{"use strict";Object.defineProperty(Pf,"__esModule",{value:!0});Pf.CwdError=void 0;var VE=class extends Error{static{o(this,"CwdError")}path;code;syscall="chdir";constructor(e,t){super(`${t}: Cannot cd into '${e}'`),this.path=e,this.code=t}get name(){return"CwdError"}};Pf.CwdError=VE});var YP=d(Df=>{"use strict";Object.defineProperty(Df,"__esModule",{value:!0});Df.SymlinkError=void 0;var zE=class extends Error{static{o(this,"SymlinkError")}path;symlink;syscall="symlink";code="TAR_SYMLINK_ERROR";constructor(e,t){super("TAR_SYMLINK_ERROR: Cannot extract through symbolic link"),this.symlink=e,this.path=t}get name(){return"SymlinkError"}};Df.SymlinkError=zE});var iD=d(kr=>{"use strict";var GE=kr&&kr.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(kr,"__esModule",{value:!0});kr.mkdirSync=kr.mkdir=void 0;var XP=KP(),gt=GE(require("node:fs")),aY=GE(require("node:fs/promises")),xf=GE(require("node:path")),QP=ZP(),sr=io(),eD=YP(),cY=o((i,e)=>{gt.default.stat(i,(t,r)=>{(t||!r.isDirectory())&&(t=new QP.CwdError(i,t?.code||"ENOTDIR")),e(t)})},"checkCwd"),uY=o((i,e,t)=>{i=(0,sr.normalizeWindowsPath)(i);let r=e.umask??18,s=e.mode|448,n=(s&r)!==0,a=e.uid,c=e.gid,u=typeof a=="number"&&typeof c=="number"&&(a!==e.processUid||c!==e.processGid),l=e.preserve,h=e.unlink,f=(0,sr.normalizeWindowsPath)(e.cwd),p=o((g,S)=>{g?t(g):S&&u?(0,XP.chownr)(S,a,c,E=>p(E)):n?gt.default.chmod(i,s,t):t()},"done");if(i===f)return cY(i,p);if(l)return aY.default.mkdir(i,{mode:s,recursive:!0}).then(g=>p(null,g??void 0),p);let y=(0,sr.normalizeWindowsPath)(xf.default.relative(f,i)).split("/");HE(f,y,s,h,f,void 0,p)},"mkdir");kr.mkdir=uY;var HE=o((i,e,t,r,s,n,a)=>{if(!e.length)return a(null,n);let c=e.shift(),u=(0,sr.normalizeWindowsPath)(xf.default.resolve(i+"/"+c));gt.default.mkdir(u,t,tD(u,e,t,r,s,n,a))},"mkdir_"),tD=o((i,e,t,r,s,n,a)=>c=>{c?gt.default.lstat(i,(u,l)=>{if(u)u.path=u.path&&(0,sr.normalizeWindowsPath)(u.path),a(u);else if(l.isDirectory())HE(i,e,t,r,s,n,a);else if(r)gt.default.unlink(i,h=>{if(h)return a(h);gt.default.mkdir(i,t,tD(i,e,t,r,s,n,a))});else{if(l.isSymbolicLink())return a(new eD.SymlinkError(i,i+"/"+e.join("/")));a(c)}}):(n=n||i,HE(i,e,t,r,s,n,a))},"onmkdir"),lY=o(i=>{let e=!1,t;try{e=gt.default.statSync(i).isDirectory()}catch(r){t=r?.code}finally{if(!e)throw new QP.CwdError(i,t??"ENOTDIR")}},"checkCwdSync"),hY=o((i,e)=>{i=(0,sr.normalizeWindowsPath)(i);let t=e.umask??18,r=e.mode|448,s=(r&t)!==0,n=e.uid,a=e.gid,c=typeof n=="number"&&typeof a=="number"&&(n!==e.processUid||a!==e.processGid),u=e.preserve,l=e.unlink,h=(0,sr.normalizeWindowsPath)(e.cwd),f=o(g=>{g&&c&&(0,XP.chownrSync)(g,n,a),s&&gt.default.chmodSync(i,r)},"done");if(i===h)return lY(h),f();if(u)return f(gt.default.mkdirSync(i,{mode:r,recursive:!0})??void 0);let m=(0,sr.normalizeWindowsPath)(xf.default.relative(h,i)).split("/"),y;for(let g=m.shift(),S=h;g&&(S+="/"+g);g=m.shift()){S=(0,sr.normalizeWindowsPath)(xf.default.resolve(S));try{gt.default.mkdirSync(S,r),y=y||S}catch{let _=gt.default.lstatSync(S);if(_.isDirectory())continue;if(l){gt.default.unlinkSync(S),gt.default.mkdirSync(S,r),y=y||S;continue}else if(_.isSymbolicLink())return new eD.SymlinkError(S,S+"/"+m.join("/"))}}return f(y)},"mkdirSync");kr.mkdirSync=hY});var sD=d(Lf=>{"use strict";Object.defineProperty(Lf,"__esModule",{value:!0});Lf.normalizeUnicode=void 0;var WE=Object.create(null),rD=1e4,fo=new Set,fY=o(i=>{fo.has(i)?fo.delete(i):WE[i]=i.normalize("NFD"),fo.add(i);let e=WE[i],t=fo.size-rD;if(t>rD/10){for(let r of fo)if(fo.delete(r),delete WE[r],--t<=0)break}return e},"normalizeUnicode");Lf.normalizeUnicode=fY});var oD=d(Mf=>{"use strict";Object.defineProperty(Mf,"__esModule",{value:!0});Mf.PathReservations=void 0;var nD=require("node:path"),dY=sD(),pY=hf(),mY=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,gY=mY==="win32",yY=o(i=>i.split("/").slice(0,-1).reduce((t,r)=>{let s=t[t.length-1];return s!==void 0&&(r=(0,nD.join)(s,r)),t.push(r||"/"),t},[]),"getDirs"),JE=class{static{o(this,"PathReservations")}#e=new Map;#t=new Map;#i=new Set;reserve(e,t){e=gY?["win32 parallelization disabled"]:e.map(s=>(0,pY.stripTrailingSlashes)((0,nD.join)((0,dY.normalizeUnicode)(s))).toLowerCase());let r=new Set(e.map(s=>yY(s)).reduce((s,n)=>s.concat(n)));this.#t.set(t,{dirs:r,paths:e});for(let s of e){let n=this.#e.get(s);n?n.push(t):this.#e.set(s,[t])}for(let s of r){let n=this.#e.get(s);if(!n)this.#e.set(s,[new Set([t])]);else{let a=n[n.length-1];a instanceof Set?a.add(t):n.push(new Set([t]))}}return this.#s(t)}#r(e){let t=this.#t.get(e);if(!t)throw new Error("function does not have any path reservations");return{paths:t.paths.map(r=>this.#e.get(r)),dirs:[...t.dirs].map(r=>this.#e.get(r))}}check(e){let{paths:t,dirs:r}=this.#r(e);return t.every(s=>s&&s[0]===e)&&r.every(s=>s&&s[0]instanceof Set&&s[0].has(e))}#s(e){return this.#i.has(e)||!this.check(e)?!1:(this.#i.add(e),e(()=>this.#u(e)),!0)}#u(e){if(!this.#i.has(e))return!1;let t=this.#t.get(e);if(!t)throw new Error("invalid reservation");let{paths:r,dirs:s}=t,n=new Set;for(let a of r){let c=this.#e.get(a);if(!c||c?.[0]!==e)continue;let u=c[1];if(!u){this.#e.delete(a);continue}if(c.shift(),typeof u=="function")n.add(u);else for(let l of u)n.add(l)}for(let a of s){let c=this.#e.get(a),u=c?.[0];if(!(!c||!(u instanceof Set)))if(u.size===1&&c.length===1){this.#e.delete(a);continue}else if(u.size===1){c.shift();let l=c[0];typeof l=="function"&&n.add(l)}else u.delete(e)}return this.#i.delete(e),n.forEach(a=>this.#s(a)),!0}};Mf.PathReservations=JE});var sw=d(it=>{"use strict";var SY=it&&it.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(i,r,s)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),EY=it&&it.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),gD=it&&it.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&SY(e,i,t);return EY(e,i),e},rw=it&&it.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(it,"__esModule",{value:!0});it.UnpackSync=it.Unpack=void 0;var wY=gD(Zn()),_Y=rw(require("node:assert")),yD=require("node:crypto"),H=rw(require("node:fs")),nr=rw(require("node:path")),SD=WP(),ED=iD(),ei=io(),bY=uf(),IY=yE(),aD=gD(EE()),OY=oD(),cD=Symbol("onEntry"),YE=Symbol("checkFs"),uD=Symbol("checkFs2"),XE=Symbol("isReusable"),Nt=Symbol("makeFs"),QE=Symbol("file"),ew=Symbol("directory"),Ff=Symbol("link"),lD=Symbol("symlink"),hD=Symbol("hardlink"),fD=Symbol("unsupported"),dD=Symbol("checkPath"),Fr=Symbol("mkdir"),je=Symbol("onError"),Bf=Symbol("pending"),pD=Symbol("pend"),po=Symbol("unpend"),KE=Symbol("ended"),ZE=Symbol("maybeClose"),tw=Symbol("skip"),Vc=Symbol("doChown"),zc=Symbol("uid"),Hc=Symbol("gid"),Gc=Symbol("checkedCwd"),vY=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,Wc=vY==="win32",CY=1024,RY=o((i,e)=>{if(!Wc)return H.default.unlink(i,e);let t=i+".DELETE."+(0,yD.randomBytes)(16).toString("hex");H.default.rename(i,t,r=>{if(r)return e(r);H.default.unlink(t,e)})},"unlinkFile"),AY=o(i=>{if(!Wc)return H.default.unlinkSync(i);let e=i+".DELETE."+(0,yD.randomBytes)(16).toString("hex");H.default.renameSync(i,e),H.default.unlinkSync(e)},"unlinkFileSync"),mD=o((i,e,t)=>i!==void 0&&i===i>>>0?i:e!==void 0&&e===e>>>0?e:t,"uint32"),Uf=class extends bY.Parser{static{o(this,"Unpack")}[KE]=!1;[Gc]=!1;[Bf]=0;reservations=new OY.PathReservations;transform;writable=!0;readable=!1;uid;gid;setOwner;preserveOwner;processGid;processUid;maxDepth;forceChown;win32;newer;keep;noMtime;preservePaths;unlink;cwd;strip;processUmask;umask;dmode;fmode;chmod;constructor(e={}){if(e.ondone=()=>{this[KE]=!0,this[ZE]()},super(e),this.transform=e.transform,this.chmod=!!e.chmod,typeof e.uid=="number"||typeof e.gid=="number"){if(typeof e.uid!="number"||typeof e.gid!="number")throw new TypeError("cannot set owner without number uid and gid");if(e.preserveOwner)throw new TypeError("cannot preserve owner in archive and also set owner explicitly");this.uid=e.uid,this.gid=e.gid,this.setOwner=!0}else this.uid=void 0,this.gid=void 0,this.setOwner=!1;e.preserveOwner===void 0&&typeof e.uid!="number"?this.preserveOwner=!!(process.getuid&&process.getuid()===0):this.preserveOwner=!!e.preserveOwner,this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():void 0,this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():void 0,this.maxDepth=typeof e.maxDepth=="number"?e.maxDepth:CY,this.forceChown=e.forceChown===!0,this.win32=!!e.win32||Wc,this.newer=!!e.newer,this.keep=!!e.keep,this.noMtime=!!e.noMtime,this.preservePaths=!!e.preservePaths,this.unlink=!!e.unlink,this.cwd=(0,ei.normalizeWindowsPath)(nr.default.resolve(e.cwd||process.cwd())),this.strip=Number(e.strip)||0,this.processUmask=this.chmod?typeof e.processUmask=="number"?e.processUmask:process.umask():0,this.umask=typeof e.umask=="number"?e.umask:this.processUmask,this.dmode=e.dmode||511&~this.umask,this.fmode=e.fmode||438&~this.umask,this.on("entry",t=>this[cD](t))}warn(e,t,r={}){return(e==="TAR_BAD_ARCHIVE"||e==="TAR_ABORT")&&(r.recoverable=!1),super.warn(e,t,r)}[ZE](){this[KE]&&this[Bf]===0&&(this.emit("prefinish"),this.emit("finish"),this.emit("end"))}[dD](e){let t=(0,ei.normalizeWindowsPath)(e.path),r=t.split("/");if(this.strip){if(r.length<this.strip)return!1;if(e.type==="Link"){let s=(0,ei.normalizeWindowsPath)(String(e.linkpath)).split("/");if(s.length>=this.strip)e.linkpath=s.slice(this.strip).join("/");else return!1}r.splice(0,this.strip),e.path=r.join("/")}if(isFinite(this.maxDepth)&&r.length>this.maxDepth)return this.warn("TAR_ENTRY_ERROR","path excessively deep",{entry:e,path:t,depth:r.length,maxDepth:this.maxDepth}),!1;if(!this.preservePaths){if(r.includes("..")||Wc&&/^[a-z]:\.\.$/i.test(r[0]??""))return this.warn("TAR_ENTRY_ERROR","path contains '..'",{entry:e,path:t}),!1;let[s,n]=(0,IY.stripAbsolutePath)(t);s&&(e.path=String(n),this.warn("TAR_ENTRY_INFO",`stripping ${s} from absolute path`,{entry:e,path:t}))}if(nr.default.isAbsolute(e.path)?e.absolute=(0,ei.normalizeWindowsPath)(nr.default.resolve(e.path)):e.absolute=(0,ei.normalizeWindowsPath)(nr.default.resolve(this.cwd,e.path)),!this.preservePaths&&typeof e.absolute=="string"&&e.absolute.indexOf(this.cwd+"/")!==0&&e.absolute!==this.cwd)return this.warn("TAR_ENTRY_ERROR","path escaped extraction target",{entry:e,path:(0,ei.normalizeWindowsPath)(e.path),resolvedPath:e.absolute,cwd:this.cwd}),!1;if(e.absolute===this.cwd&&e.type!=="Directory"&&e.type!=="GNUDumpDir")return!1;if(this.win32){let{root:s}=nr.default.win32.parse(String(e.absolute));e.absolute=s+aD.encode(String(e.absolute).slice(s.length));let{root:n}=nr.default.win32.parse(e.path);e.path=n+aD.encode(e.path.slice(n.length))}return!0}[cD](e){if(!this[dD](e))return e.resume();switch(_Y.default.equal(typeof e.absolute,"string"),e.type){case"Directory":case"GNUDumpDir":e.mode&&(e.mode=e.mode|448);case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[YE](e);case"CharacterDevice":case"BlockDevice":case"FIFO":default:return this[fD](e)}}[je](e,t){e.name==="CwdError"?this.emit("error",e):(this.warn("TAR_ENTRY_ERROR",e,{entry:t}),this[po](),t.resume())}[Fr](e,t,r){(0,ED.mkdir)((0,ei.normalizeWindowsPath)(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cwd:this.cwd,mode:t},r)}[Vc](e){return this.forceChown||this.preserveOwner&&(typeof e.uid=="number"&&e.uid!==this.processUid||typeof e.gid=="number"&&e.gid!==this.processGid)||typeof this.uid=="number"&&this.uid!==this.processUid||typeof this.gid=="number"&&this.gid!==this.processGid}[zc](e){return mD(this.uid,e.uid,this.processUid)}[Hc](e){return mD(this.gid,e.gid,this.processGid)}[QE](e,t){let r=typeof e.mode=="number"?e.mode&4095:this.fmode,s=new wY.WriteStream(String(e.absolute),{flags:(0,SD.getWriteFlag)(e.size),mode:r,autoClose:!1});s.on("error",u=>{s.fd&&H.default.close(s.fd,()=>{}),s.write=()=>!0,this[je](u,e),t()});let n=1,a=o(u=>{if(u){s.fd&&H.default.close(s.fd,()=>{}),this[je](u,e),t();return}--n===0&&s.fd!==void 0&&H.default.close(s.fd,l=>{l?this[je](l,e):this[po](),t()})},"done");s.on("finish",()=>{let u=String(e.absolute),l=s.fd;if(typeof l=="number"&&e.mtime&&!this.noMtime){n++;let h=e.atime||new Date,f=e.mtime;H.default.futimes(l,h,f,p=>p?H.default.utimes(u,h,f,m=>a(m&&p)):a())}if(typeof l=="number"&&this[Vc](e)){n++;let h=this[zc](e),f=this[Hc](e);typeof h=="number"&&typeof f=="number"&&H.default.fchown(l,h,f,p=>p?H.default.chown(u,h,f,m=>a(m&&p)):a())}a()});let c=this.transform&&this.transform(e)||e;c!==e&&(c.on("error",u=>{this[je](u,e),t()}),e.pipe(c)),c.pipe(s)}[ew](e,t){let r=typeof e.mode=="number"?e.mode&4095:this.dmode;this[Fr](String(e.absolute),r,s=>{if(s){this[je](s,e),t();return}let n=1,a=o(()=>{--n===0&&(t(),this[po](),e.resume())},"done");e.mtime&&!this.noMtime&&(n++,H.default.utimes(String(e.absolute),e.atime||new Date,e.mtime,a)),this[Vc](e)&&(n++,H.default.chown(String(e.absolute),Number(this[zc](e)),Number(this[Hc](e)),a)),a()})}[fD](e){e.unsupported=!0,this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${e.type}`,{entry:e}),e.resume()}[lD](e,t){this[Ff](e,String(e.linkpath),"symlink",t)}[hD](e,t){let r=(0,ei.normalizeWindowsPath)(nr.default.resolve(this.cwd,String(e.linkpath)));this[Ff](e,r,"link",t)}[pD](){this[Bf]++}[po](){this[Bf]--,this[ZE]()}[tw](e){this[po](),e.resume()}[XE](e,t){return e.type==="File"&&!this.unlink&&t.isFile()&&t.nlink<=1&&!Wc}[YE](e){this[pD]();let t=[e.path];e.linkpath&&t.push(e.linkpath),this.reservations.reserve(t,r=>this[uD](e,r))}[uD](e,t){let r=o(c=>{t(c)},"done"),s=o(()=>{this[Fr](this.cwd,this.dmode,c=>{if(c){this[je](c,e),r();return}this[Gc]=!0,n()})},"checkCwd"),n=o(()=>{if(e.absolute!==this.cwd){let c=(0,ei.normalizeWindowsPath)(nr.default.dirname(String(e.absolute)));if(c!==this.cwd)return this[Fr](c,this.dmode,u=>{if(u){this[je](u,e),r();return}a()})}a()},"start"),a=o(()=>{H.default.lstat(String(e.absolute),(c,u)=>{if(u&&(this.keep||this.newer&&u.mtime>(e.mtime??u.mtime))){this[tw](e),r();return}if(c||this[XE](e,u))return this[Nt](null,e,r);if(u.isDirectory()){if(e.type==="Directory"){let l=this.chmod&&e.mode&&(u.mode&4095)!==e.mode,h=o(f=>this[Nt](f??null,e,r),"afterChmod");return l?H.default.chmod(String(e.absolute),Number(e.mode),h):h()}if(e.absolute!==this.cwd)return H.default.rmdir(String(e.absolute),l=>this[Nt](l??null,e,r))}if(e.absolute===this.cwd)return this[Nt](null,e,r);RY(String(e.absolute),l=>this[Nt](l??null,e,r))})},"afterMakeParent");this[Gc]?n():s()}[Nt](e,t,r){if(e){this[je](e,t),r();return}switch(t.type){case"File":case"OldFile":case"ContiguousFile":return this[QE](t,r);case"Link":return this[hD](t,r);case"SymbolicLink":return this[lD](t,r);case"Directory":case"GNUDumpDir":return this[ew](t,r)}}[Ff](e,t,r,s){H.default[r](t,String(e.absolute),n=>{n?this[je](n,e):(this[po](),e.resume()),s()})}};it.Unpack=Uf;var kf=o(i=>{try{return[null,i()]}catch(e){return[e,null]}},"callSync"),iw=class extends Uf{static{o(this,"UnpackSync")}sync=!0;[Nt](e,t){return super[Nt](e,t,()=>{})}[YE](e){if(!this[Gc]){let n=this[Fr](this.cwd,this.dmode);if(n)return this[je](n,e);this[Gc]=!0}if(e.absolute!==this.cwd){let n=(0,ei.normalizeWindowsPath)(nr.default.dirname(String(e.absolute)));if(n!==this.cwd){let a=this[Fr](n,this.dmode);if(a)return this[je](a,e)}}let[t,r]=kf(()=>H.default.lstatSync(String(e.absolute)));if(r&&(this.keep||this.newer&&r.mtime>(e.mtime??r.mtime)))return this[tw](e);if(t||this[XE](e,r))return this[Nt](null,e);if(r.isDirectory()){if(e.type==="Directory"){let a=this.chmod&&e.mode&&(r.mode&4095)!==e.mode,[c]=a?kf(()=>{H.default.chmodSync(String(e.absolute),Number(e.mode))}):[];return this[Nt](c,e)}let[n]=kf(()=>H.default.rmdirSync(String(e.absolute)));this[Nt](n,e)}let[s]=e.absolute===this.cwd?[]:kf(()=>AY(String(e.absolute)));this[Nt](s,e)}[QE](e,t){let r=typeof e.mode=="number"?e.mode&4095:this.fmode,s=o(c=>{let u;try{H.default.closeSync(n)}catch(l){u=l}(c||u)&&this[je](c||u,e),t()},"oner"),n;try{n=H.default.openSync(String(e.absolute),(0,SD.getWriteFlag)(e.size),r)}catch(c){return s(c)}let a=this.transform&&this.transform(e)||e;a!==e&&(a.on("error",c=>this[je](c,e)),e.pipe(a)),a.on("data",c=>{try{H.default.writeSync(n,c,0,c.length)}catch(u){s(u)}}),a.on("end",()=>{let c=null;if(e.mtime&&!this.noMtime){let u=e.atime||new Date,l=e.mtime;try{H.default.futimesSync(n,u,l)}catch(h){try{H.default.utimesSync(String(e.absolute),u,l)}catch{c=h}}}if(this[Vc](e)){let u=this[zc](e),l=this[Hc](e);try{H.default.fchownSync(n,Number(u),Number(l))}catch(h){try{H.default.chownSync(String(e.absolute),Number(u),Number(l))}catch{c=c||h}}}s(c)})}[ew](e,t){let r=typeof e.mode=="number"?e.mode&4095:this.dmode,s=this[Fr](String(e.absolute),r);if(s){this[je](s,e),t();return}if(e.mtime&&!this.noMtime)try{H.default.utimesSync(String(e.absolute),e.atime||new Date,e.mtime)}catch{}if(this[Vc](e))try{H.default.chownSync(String(e.absolute),Number(this[zc](e)),Number(this[Hc](e)))}catch{}t(),e.resume()}[Fr](e,t){try{return(0,ED.mkdirSync)((0,ei.normalizeWindowsPath)(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cwd:this.cwd,mode:t})}catch(r){return r}}[Ff](e,t,r,s){let n=`${r}Sync`;try{H.default[n](t,String(e.absolute)),s(),e.resume()}catch(a){return this[je](a,e)}}};it.UnpackSync=iw});var nw=d(Pt=>{"use strict";var TY=Pt&&Pt.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(i,r,s)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),NY=Pt&&Pt.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),PY=Pt&&Pt.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&TY(e,i,t);return NY(e,i),e},DY=Pt&&Pt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Pt,"__esModule",{value:!0});Pt.extract=void 0;var wD=PY(Zn()),_D=DY(require("node:fs")),xY=no(),LY=Yn(),jf=sw(),MY=o(i=>{let e=new jf.UnpackSync(i),t=i.file,r=_D.default.statSync(t),s=i.maxReadSize||16*1024*1024;new wD.ReadStreamSync(t,{readSize:s,size:r.size}).pipe(e)},"extractFileSync"),BY=o((i,e)=>{let t=new jf.Unpack(i),r=i.maxReadSize||16*1024*1024,s=i.file;return new Promise((a,c)=>{t.on("error",c),t.on("close",a),_D.default.stat(s,(u,l)=>{if(u)c(u);else{let h=new wD.ReadStream(s,{readSize:r,size:l.size});h.on("error",c),h.pipe(t)}})})},"extractFile");Pt.extract=(0,LY.makeCommand)(MY,BY,i=>new jf.UnpackSync(i),i=>new jf.Unpack(i),(i,e)=>{e?.length&&(0,xY.filesFilter)(i,e)})});var $f=d(mo=>{"use strict";var bD=mo&&mo.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(mo,"__esModule",{value:!0});mo.replace=void 0;var ID=Zn(),yt=bD(require("node:fs")),OD=bD(require("node:path")),vD=to(),CD=no(),kY=Yn(),FY=Vh(),RD=Rf(),UY=o((i,e)=>{let t=new RD.PackSync(i),r=!0,s,n;try{try{s=yt.default.openSync(i.file,"r+")}catch(u){if(u?.code==="ENOENT")s=yt.default.openSync(i.file,"w+");else throw u}let a=yt.default.fstatSync(s),c=Buffer.alloc(512);e:for(n=0;n<a.size;n+=512){for(let h=0,f=0;h<512;h+=f){if(f=yt.default.readSync(s,c,h,c.length-h,n+h),n===0&&c[0]===31&&c[1]===139)throw new Error("cannot append to compressed archives");if(!f)break e}let u=new vD.Header(c);if(!u.cksumValid)break;let l=512*Math.ceil((u.size||0)/512);if(n+l+512>a.size)break;n+=l,i.mtimeCache&&u.mtime&&i.mtimeCache.set(String(u.path),u.mtime)}r=!1,jY(i,t,n,s,e)}finally{if(r)try{yt.default.closeSync(s)}catch{}}},"replaceSync"),jY=o((i,e,t,r,s)=>{let n=new ID.WriteStreamSync(i.file,{fd:r,start:t});e.pipe(n),qY(e,s)},"streamSync"),$Y=o((i,e)=>{e=Array.from(e);let t=new RD.Pack(i),r=o((n,a,c)=>{let u=o((m,y)=>{m?yt.default.close(n,g=>c(m)):c(null,y)},"cb"),l=0;if(a===0)return u(null,0);let h=0,f=Buffer.alloc(512),p=o((m,y)=>{if(m||typeof y>"u")return u(m);if(h+=y,h<512&&y)return yt.default.read(n,f,h,f.length-h,l+h,p);if(l===0&&f[0]===31&&f[1]===139)return u(new Error("cannot append to compressed archives"));if(h<512)return u(null,l);let g=new vD.Header(f);if(!g.cksumValid)return u(null,l);let S=512*Math.ceil((g.size??0)/512);if(l+S+512>a||(l+=S+512,l>=a))return u(null,l);i.mtimeCache&&g.mtime&&i.mtimeCache.set(String(g.path),g.mtime),h=0,yt.default.read(n,f,0,512,l,p)},"onread");yt.default.read(n,f,0,512,l,p)},"getPos");return new Promise((n,a)=>{t.on("error",a);let c="r+",u=o((l,h)=>{if(l&&l.code==="ENOENT"&&c==="r+")return c="w+",yt.default.open(i.file,c,u);if(l||!h)return a(l);yt.default.fstat(h,(f,p)=>{if(f)return yt.default.close(h,()=>a(f));r(h,p.size,(m,y)=>{if(m)return a(m);let g=new ID.WriteStream(i.file,{fd:h,start:y});t.pipe(g),g.on("error",a),g.on("close",n),VY(t,e)})})},"onopen");yt.default.open(i.file,c,u)})},"replaceAsync"),qY=o((i,e)=>{e.forEach(t=>{t.charAt(0)==="@"?(0,CD.list)({file:OD.default.resolve(i.cwd,t.slice(1)),sync:!0,noResume:!0,onReadEntry:o(r=>i.add(r),"onReadEntry")}):i.add(t)}),i.end()},"addFilesSync"),VY=o(async(i,e)=>{for(let t=0;t<e.length;t++){let r=String(e[t]);r.charAt(0)==="@"?await(0,CD.list)({file:OD.default.resolve(String(i.cwd),r.slice(1)),noResume:!0,onReadEntry:o(s=>i.add(s),"onReadEntry")}):i.add(r)}i.end()},"addFilesAsync");mo.replace=(0,kY.makeCommand)(UY,$Y,()=>{throw new TypeError("file is required")},()=>{throw new TypeError("file is required")},(i,e)=>{if(!(0,FY.isFile)(i))throw new TypeError("file is required");if(i.gzip||i.brotli||i.zstd||i.file.endsWith(".br")||i.file.endsWith(".tbr"))throw new TypeError("cannot append to compressed archives");if(!e?.length)throw new TypeError("no paths specified to add/replace")})});var ow=d(qf=>{"use strict";Object.defineProperty(qf,"__esModule",{value:!0});qf.update=void 0;var zY=Yn(),Jc=$f();qf.update=(0,zY.makeCommand)(Jc.replace.syncFile,Jc.replace.asyncFile,Jc.replace.syncNoFile,Jc.replace.asyncNoFile,(i,e=[])=>{Jc.replace.validate?.(i,e),HY(i)});var HY=o(i=>{let e=i.filter;i.mtimeCache||(i.mtimeCache=new Map),i.filter=e?(t,r)=>e(t,r)&&!((i.mtimeCache?.get(t)??r.mtime??0)>(r.mtime??0)):(t,r)=>!((i.mtimeCache?.get(t)??r.mtime??0)>(r.mtime??0))},"mtimeFilter")});var aw=d(V=>{"use strict";var AD=V&&V.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(i,r,s)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),GY=V&&V.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),Dt=V&&V.__exportStar||function(i,e){for(var t in i)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&AD(e,i,t)},WY=V&&V.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&AD(e,i,t);return GY(e,i),e};Object.defineProperty(V,"__esModule",{value:!0});V.u=V.types=V.r=V.t=V.x=V.c=void 0;Dt($E(),V);var JY=$E();Object.defineProperty(V,"c",{enumerable:!0,get:o(function(){return JY.create},"get")});Dt(nw(),V);var KY=nw();Object.defineProperty(V,"x",{enumerable:!0,get:o(function(){return KY.extract},"get")});Dt(to(),V);Dt(no(),V);var ZY=no();Object.defineProperty(V,"t",{enumerable:!0,get:o(function(){return ZY.list},"get")});Dt(Rf(),V);Dt(uf(),V);Dt(Jh(),V);Dt(Xh(),V);Dt($f(),V);var YY=$f();Object.defineProperty(V,"r",{enumerable:!0,get:o(function(){return YY.replace},"get")});V.types=WY(iE());Dt(sw(),V);Dt(ow(),V);var XY=ow();Object.defineProperty(V,"u",{enumerable:!0,get:o(function(){return XY.update},"get")});Dt(NE(),V)});var ks=d((Iye,TD)=>{TD.exports={cacheFetches:Symbol.for("pacote.Fetcher._cacheFetches"),readPackageJson:Symbol.for("package.Fetcher._readPackageJson"),tarballFromResolved:Symbol.for("pacote.Fetcher._tarballFromResolved")}});var PD=d((Oye,ND)=>{var{resolve:cw}=require("node:path"),{tmpdir:QY,homedir:eX}=require("node:os");ND.exports=(i=!1)=>{let e=QY(),t=process.getuid?process.getuid():process.pid,r=eX()||cw(e,"npm-"+t),s=i||process.platform,n=s==="win32"?"npm-cache":".npm",a=s==="win32"&&process.env.LOCALAPPDATA||r;return{cacache:cw(a,n,"_cacache"),tufcache:cw(a,n,"_tuf")}}});var uw=d((vye,DD)=>{var tX=o((i,e)=>typeof e=="string"?{[i]:e}:e,"binObj"),iX=o((i,e)=>{let t=tX(i.name,i.bin),r=e.replace(/^[^\\/]*\//,"");for(let s of Object.entries(t))if(s[1]===r)return!0;return!1},"hasBin");DD.exports=(i,e)=>i&&i.bin?iX(i,e):!1});var lw=d((Rye,xD)=>{var rX=o(i=>{let e=i;for(;e.endsWith("/");)e=e.slice(0,-1);return e},"removeTrailingSlashes");xD.exports=rX});var MD=d((Tye,LD)=>{"use strict";var Ur=require("fs"),hw=require("path"),sX=require("events").EventEmitter,nX=Ui().Minimatch,Kc=class i extends sX{static{o(this,"Walker")}constructor(e){e=e||{},super(e),this.isSymbolicLink=e.isSymbolicLink,this.path=e.path||process.cwd(),this.basename=hw.basename(this.path),this.ignoreFiles=e.ignoreFiles||[".ignore"],this.ignoreRules={},this.parent=e.parent||null,this.includeEmpty=!!e.includeEmpty,this.root=this.parent?this.parent.root:this.path,this.follow=!!e.follow,this.result=this.parent?this.parent.result:new Set,this.entries=null,this.sawError=!1,this.exact=e.exact}sort(e,t){return e.localeCompare(t,"en")}emit(e,t){let r=!1;return this.sawError&&e==="error"||(e==="error"?this.sawError=!0:e==="done"&&!this.parent&&(t=Array.from(t).map(s=>/^@/.test(s)?`./${s}`:s).sort(this.sort),this.result=t),e==="error"&&this.parent?r=this.parent.emit("error",t):r=super.emit(e,t)),r}start(){return Ur.readdir(this.path,(e,t)=>e?this.emit("error",e):this.onReaddir(t)),this}isIgnoreFile(e){return e!=="."&&e!==".."&&this.ignoreFiles.indexOf(e)!==-1}onReaddir(e){this.entries=e,e.length===0?(this.includeEmpty&&this.result.add(this.path.slice(this.root.length+1)),this.emit("done",this.result)):this.entries.some(r=>this.isIgnoreFile(r))?this.addIgnoreFiles():this.filterEntries()}addIgnoreFiles(){let e=this.entries.filter(s=>this.isIgnoreFile(s)),t=e.length,r=o(()=>{--t===0&&this.filterEntries()},"then");e.forEach(s=>this.addIgnoreFile(s,r))}addIgnoreFile(e,t){let r=hw.resolve(this.path,e);Ur.readFile(r,"utf8",(s,n)=>s?this.emit("error",s):this.onReadIgnoreFile(e,n,t))}onReadIgnoreFile(e,t,r){let s={matchBase:!0,dot:!0,flipNegate:!0,nocase:!0},n=t.split(/\r?\n/).filter(a=>!/^#|^$/.test(a.trim())).map(a=>new nX(a.trim(),s));this.ignoreRules[e]=n,r()}filterEntries(){let e=this.entries.map(r=>{let s=this.filterEntry(r),n=this.filterEntry(r,!0);return s||n?[r,s,n]:!1}).filter(r=>r),t=e.length;if(t===0)this.emit("done",this.result);else{let r=o(()=>{--t===0&&this.emit("done",this.result)},"then");e.forEach(s=>{let n=s[0],a=s[1],c=s[2];this.stat({entry:n,file:a,dir:c},r)})}}onstat({st:e,entry:t,file:r,dir:s,isSymbolicLink:n},a){let c=this.path+"/"+t;e.isDirectory()?s?this.walker(t,{isSymbolicLink:n,exact:r||this.filterEntry(t+"/")},a):a():(r&&this.result.add(c.slice(this.root.length+1)),a())}stat({entry:e,file:t,dir:r},s){let n=this.path+"/"+e;Ur.lstat(n,(a,c)=>{if(a)this.emit("error",a);else{let u=c.isSymbolicLink();this.follow&&u?Ur.stat(n,(l,h)=>{l?this.emit("error",l):this.onstat({st:h,entry:e,file:t,dir:r,isSymbolicLink:u},s)}):this.onstat({st:c,entry:e,file:t,dir:r,isSymbolicLink:u},s)}})}walkerOpt(e,t){return{path:this.path+"/"+e,parent:this,ignoreFiles:this.ignoreFiles,follow:this.follow,includeEmpty:this.includeEmpty,...t}}walker(e,t,r){new i(this.walkerOpt(e,t)).on("done",r).start()}filterEntry(e,t,r){let s=!0;if(this.parent&&this.parent.filterEntry){let n=this.basename+"/"+e,a=r||e;if(s=this.parent.filterEntry(n,t,a),!s&&!this.exact)return!1}return this.ignoreFiles.forEach(n=>{this.ignoreRules[n]&&this.ignoreRules[n].forEach(a=>{if(a.negate!==s){let c=r&&a.globParts.some(l=>l.length<=(l.slice(-1)[0]?1:2));(a.match("/"+e)||a.match(e)||!!t&&(a.match("/"+e+"/")||a.match(e+"/")||a.negate&&(a.match("/"+e,!0)||a.match(e,!0))||c&&(a.match("/"+r+"/")||a.match(r+"/")||a.negate&&(a.match("/"+r,!0)||a.match(r,!0)))))&&(s=a.negate)}})}),s}},Vf=class i extends Kc{static{o(this,"WalkerSync")}start(){return this.onReaddir(Ur.readdirSync(this.path)),this}addIgnoreFile(e,t){let r=hw.resolve(this.path,e);this.onReadIgnoreFile(e,Ur.readFileSync(r,"utf8"),t)}stat({entry:e,file:t,dir:r},s){let n=this.path+"/"+e,a=Ur.lstatSync(n),c=a.isSymbolicLink();this.follow&&c&&(a=Ur.statSync(n)),this.onstat({st:a,entry:e,file:t,dir:r,isSymbolicLink:c},s)}walker(e,t,r){new i(this.walkerOpt(e,t)).start(),r()}},zf=o((i,e)=>{let t=new Promise((r,s)=>{new Kc(i).on("done",r).on("error",s).start()});return e?t.then(r=>e(null,r),e):t},"walk"),oX=o(i=>new Vf(i).start().result,"walkSync");LD.exports=zf;zf.sync=oX;zf.Walker=Kc;zf.WalkerSync=Vf});var qD=d((Pye,$D)=>{"use strict";var{Walker:aX}=MD(),{lstatSync:cX,readFileSync:uX}=require("fs"),{basename:BD,dirname:lX,extname:kD,join:So,relative:yo,resolve:hX,sep:fX}=require("path"),{log:dX}=_t(),Zc=Symbol("npm-packlist.rules.default"),go=Symbol("npm-packlist.rules.strict"),pX=o(i=>/\*/.test(i),"nameIsBadForWindows"),mX=[".npmignore",".gitignore","**/.git","**/.svn","**/.hg","**/CVS","**/.git/**","**/.svn/**","**/.hg/**","**/CVS/**","/.lock-wscript","/.wafpickle-*","/build/config.gypi","npm-debug.log","**/.npmrc",".*.swp",".DS_Store","**/.DS_Store/**","._*","**/._*/**","*.orig","/archived-packages/**"],FD=["/.git"],Hf=o(i=>i.split("\\").join("/"),"normalizePath"),UD=o((i,e,t=[])=>{for(let a of[".npmignore",".gitignore"])try{let c=uX(So(i,a),{encoding:"utf8"});t.push(c);break}catch(c){if(c.code!=="ENOENT")throw c}if(!e)return t;let r=e.split(fX,1)[0],s=So(i,r),n=yo(s,So(i,e));return UD(s,n,t)},"readOutOfTreeIgnoreFiles"),Gf=class i extends aX{static{o(this,"PackWalker")}constructor(e,t){let r={...t,includeEmpty:!1,follow:!1,path:hX(t?.path||e.path).replace(/\\/g,"/"),ignoreFiles:t?.ignoreFiles||[Zc,"package.json",".npmignore",".gitignore",go]};super(r),this.isPackage=r.isPackage,this.seen=r.seen||new Set,this.tree=e,this.requiredFiles=r.requiredFiles||[];let s=[];if(r.prefix&&r.workspaces){let n=Hf(r.path),a=Hf(r.prefix),c=r.workspaces.map(u=>Hf(u));if(n!==a&&c.includes(n)){let u=yo(r.prefix,lX(r.path));s.push(...UD(r.prefix,u))}else n===a&&s.push(...c.map(u=>Hf(yo(r.path,u))))}this.injectRules(Zc,[...mX,...s]),this.isPackage||this.injectRules(go,[...FD,...this.requiredFiles.map(n=>`!${n}`)])}addIgnoreFile(e,t){return e!=="package.json"||!this.isPackage?super.addIgnoreFile(e,t):this.processPackage(t)}emit(e,t){return e!=="done"||!this.isPackage?super.emit(e,t):(this.gatherBundles().then(()=>{super.emit("done",this.result)}),!0)}filterEntries(){return this.ignoreRules["package.json"]?(this.ignoreRules[".npmignore"]=null,this.ignoreRules[".gitignore"]=null):this.ignoreRules[".npmignore"]?this.ignoreRules[".gitignore"]=null:this.ignoreRules[".gitignore"]&&!this.ignoreRules[".npmignore"]&&dX.warn("gitignore-fallback","No .npmignore file found, using .gitignore for file exclusion. Consider creating a .npmignore file to explicitly control published files."),super.filterEntries()}onstat(e,t){return!e.st.isFile()&&!e.st.isDirectory()?t():super.onstat(e,t)}stat(e,t){return pX(e.entry)?t():super.stat(e,t)}walkerOpt(e,t){let r=null;if(this.tree.workspaces){let s=[...this.tree.workspaces.values()].map(a=>a.replace(/\\/g,"/")),n=So(this.path,e).replace(/\\/g,"/");s.includes(n)&&(r=[Zc,"package.json",".npmignore",".gitignore",go])}else r=[Zc,".npmignore",".gitignore",go];return{...super.walkerOpt(e,t),ignoreFiles:r,requiredFiles:this.requiredFiles.map(s=>yo(s,e)===".."?yo(e,s).replace(/\\/g,"/"):!1).filter(Boolean)}}walker(e,t,r){new i(this.tree,this.walkerOpt(e,t)).on("done",r).start()}sort(e,t){let r=kD(e).toLowerCase(),s=kD(t).toLowerCase(),n=BD(e).toLowerCase(),a=BD(t).toLowerCase();return r.localeCompare(s,"en")||n.localeCompare(a,"en")||e.localeCompare(t,"en")}injectRules(e,t,r=()=>{}){this.onReadIgnoreFile(e,`${t.join(`
31
+ `)}
32
+ `,r)}processPackage(e){let{bin:t,browser:r,files:s,main:n}=this.tree.package,a=[],c=[...FD,"!/package.json","!/readme{,.*[^~$]}","!/copying{,.*[^~$]}","!/license{,.*[^~$]}","!/licence{,.*[^~$]}","/.git","/node_modules",".npmrc","/package-lock.json","/yarn.lock","/pnpm-lock.yaml","/bun.lockb"];if(s){for(let u of s){u.startsWith("./")&&(u=u.slice(1)),u.endsWith("/*")&&(u+="*");let l=`!${u}`;try{let h=cX(So(this.path,u.replace(/^!+/,"")).replace(/\\/g,"/"));h.isFile()?(c.unshift(l),this.requiredFiles.push(u.startsWith("/")?u.slice(1):u)):h.isDirectory()&&(a.push(l),a.push(`${l}/**`))}catch{a.push(l)}}this.injectRules("package.json",["*",...a])}if(r&&c.push(`!/${r}`),n&&c.push(`!/${n}`),t)for(let u in t)c.push(`!/${t[u]}`);this.injectRules(go,c,e)}async gatherBundles(){if(this.seen.has(this.tree))return;this.seen.add(this.tree);let e;if(this.tree.isProjectRoot){let{bundleDependencies:t}=this.tree.package;e=t||[]}else{let{dependencies:t,optionalDependencies:r}=this.tree.package;e=Object.keys(t||{}).concat(Object.keys(r||{}))}for(let t of e){let r=this.tree.edgesOut.get(t);if(!r||r.peer||r.dev)continue;let s=this.tree.edgesOut.get(t).to;if(!s)continue;let n=s.path,a=s.target,c={path:n,isPackage:!0,ignoreFiles:[],seen:this.seen};s.isLink&&c.ignoreFiles.push(Zc),c.ignoreFiles.push("package.json"),s.isLink&&(c.ignoreFiles.push(".npmignore"),c.ignoreFiles.push(".gitignore")),c.ignoreFiles.push(go);let u=new i(a,c),l=await new Promise((f,p)=>{u.on("error",p),u.on("done",f),u.start()}),h=yo(this.root,u.path);for(let f of l)this.result.add(So(h,f).replace(/\\/g,"/"))}}},jD=o((i,e,t)=>{typeof e=="function"&&(t=e,e={});let r=new Promise((s,n)=>{new Gf(i,{...e,isPackage:!0}).on("done",s).on("error",n).start()});return t?r.then(s=>t(null,s),t):r},"walk");$D.exports=jD;jD.Walker=Gf});var HD=d((xye,zD)=>{var{resolve:VD,dirname:gX,delimiter:fw}=require("path"),yX=VD(__dirname,"../lib/node-gyp-bin"),SX=o((i,e,t)=>{let r=Object.keys(t).filter(u=>/^path$/i.test(u)&&t[u]).map(u=>t[u].split(fw)).reduce((u,l)=>u.concat(l.filter(h=>!u.includes(h))),[]).join(fw),s=[];e&&s.push(...e);let n=i,a;do s.push(VD(n,"node_modules",".bin")),a=n,n=gX(n);while(n!==a);s.push(yX,r);let c=s.join(fw);for(let u of Object.keys(t))/^path$/i.test(u)&&(t[u]=c);return t},"setPATH");zD.exports=SX});var WD=d((Mye,GD)=>{var EX=HD(),{resolve:wX}=require("path"),Wf,_X=o(i=>{let{args:e,binPaths:t,cmd:r,env:s,event:n,nodeGyp:a,path:c,scriptShell:u=!0,stdio:l,stdioString:h}=i;a?Wf=a:s.npm_config_node_gyp?Wf=s.npm_config_node_gyp:Wf=require.resolve("node-gyp/bin/node-gyp.js");let p={env:EX(c,t,{...process.env,...s,npm_package_json:wX(c,"package.json"),npm_lifecycle_event:n,npm_lifecycle_script:r,npm_config_node_gyp:Wf}),stdioString:h,stdio:l,cwd:c,shell:u};return[r,e,p]},"makeSpawnArgs");GD.exports=_X});var KD=d((kye,JD)=>{var dw=o((i,e,t={})=>{for(let[r,s]of Object.entries(i))s!==void 0&&(s===null||s===!1?t[`${e}${r}`]="":Array.isArray(s)?s.forEach((n,a)=>{dw({[`${r}_${a}`]:n},`${e}`,t)}):typeof s=="object"?dw(s,`${e}${r}_`,t):t[`${e}${r}`]=String(s));return t},"packageEnvs");JD.exports=i=>dw({name:i.name,version:i.version,config:i.config,engines:i.engines,bin:i.bin},"npm_package_")});var XD=d((Uye,YD)=>{var bX=require("util"),ZD=require("fs"),{stat:IX}=ZD.promises||{stat:bX.promisify(ZD.stat)};async function OX(i){return await IX(`${i}/binding.gyp`).then(e=>e.isFile()).catch(()=>!1)}o(OX,"isNodeGypPackage");YD.exports={isNodeGypPackage:OX,defaultGypInstallScript:"node-gyp rebuild"}});var ex=d(($ye,QD)=>{var Jf=new Set,pw=!1,mw=["SIGINT","SIGTERM"],gw=o(i=>{for(let e of Jf)e.kill(i)},"handleSignal"),vX=o(()=>{for(let i of mw)process.on(i,gw);pw=!0},"setupListeners"),CX=o(()=>{if(Jf.size===0){for(let i of mw)process.removeListener(i,gw);pw=!1}},"cleanupListeners"),RX=o(i=>{Jf.add(i),pw||vX(),i.once("exit",()=>{Jf.delete(i),CX()})},"add");QD.exports={add:RX,handleSignal:gw,forwardedSignals:mw}});var yw=d((Vye,tx)=>{var{stat:AX}=require("node:fs/promises"),{resolve:TX}=require("node:path");tx.exports=async i=>{try{return(await AX(TX(i,"server.js"))).isFile()}catch{return!1}}});var rx=d((zye,ix)=>{var NX=WD(),PX=jl(),DX=KD(),{isNodeGypPackage:xX,defaultGypInstallScript:LX}=XD(),MX=ex(),BX=yw(),kX=o(async i=>{let{args:e=[],binPaths:t=!1,env:r={},event:s,nodeGyp:n,path:a,pkg:c,scriptShell:u,signalTimeout:l=500,stdio:h="pipe",stdioString:f}=i,{scripts:p={},gypfile:m}=c,y=null;if(i.cmd?y=i.cmd:c.scripts&&c.scripts[s]?y=c.scripts[s]:s==="install"&&!p.install&&!p.preinstall&&m!==!1&&await xX(a)?y=LX:s==="start"&&await BX(a)&&(y="node server.js"),!y)return{code:0,signal:null};let g=o(()=>{},"inputEnd");if(h==="inherit"){let w;c._id?w=`
33
+ > ${c._id} ${s}
34
+ `:w=`
35
+ > ${s}
36
+ `,w+=`> ${y.trim().replace(/\n/g,`
37
+ > `)}`,e.length&&(w+=` ${e.join(" ")}`),w+=`
38
+ `;let{output:I,input:v}=_t();I.standard(w),g=v.start()}let[S,E,_]=NX({args:e,binPaths:t,cmd:y,env:{...r,...DX(c)},event:s,nodeGyp:n,path:a,scriptShell:u,stdio:h,stdioString:f}),b=PX(S,E,_,{event:s,script:y,pkgid:c._id,path:a});return h==="inherit"&&MX.add(b.process),b.stdin&&b.stdin.end(),b.catch(w=>{let{signal:I}=w;if(h==="inherit"&&I)return process.kill(process.pid,I),new Promise((v,N)=>setTimeout(()=>N(w),l));throw w}).finally(g)},"runScriptPkg");ix.exports=kX});var nx=d((Gye,sx)=>{var FX=o(i=>{if(typeof i!="object"||!i)throw new TypeError("invalid options object provided to runScript");let{event:e,path:t,scriptShell:r,env:s={},stdio:n="pipe",args:a=[],cmd:c}=i;if(!e||typeof e!="string")throw new TypeError("valid event not provided to runScript");if(!t||typeof t!="string")throw new TypeError("valid path not provided to runScript");if(r!==void 0&&typeof r!="string")throw new TypeError("invalid scriptShell option provided to runScript");if(typeof s!="object"||!s)throw new TypeError("invalid env option provided to runScript");if(typeof n!="string"&&!Array.isArray(n))throw new TypeError("invalid stdio option provided to runScript");if(!Array.isArray(a)||a.some(u=>typeof u!="string"))throw new TypeError("invalid args option provided to runScript");if(c!==void 0&&typeof c!="string")throw new TypeError("invalid cmd option provided to runScript")},"validateOptions");sx.exports=FX});var cx=d((Jye,ax)=>{var UX=nh(),ox=rx(),jX=nx(),$X=yw(),qX=o(async i=>{if(jX(i),i.pkg)return ox(i);let{content:e}=await UX.normalize(i.path);return ox({...i,pkg:e})},"runScript");ax.exports=Object.assign(qX,{isServerPackage:$X})});var Eo=d((Zye,ux)=>{var{resolve:VX}=require("node:path"),{stat:zX,chmod:HX}=require("node:fs/promises"),GX=bc(),WX=jn(),JX=Fs(),Sw=ks(),Ew=class extends JX{static{o(this,"FileFetcher")}constructor(e,t){super(e,t),this.resolved=this.spec.fetchSpec}get types(){return["file"]}manifest(){return this.package?Promise.resolve(this.package):GX.tmp.withTmp(this.cache,this.opts,e=>this.extract(e).then(()=>this[Sw.readPackageJson](e)).then(t=>this.package={...t,_integrity:this.integrity&&String(this.integrity),_resolved:this.resolved,_from:this.from}))}#e(e,t){return e.bin?Promise.all(Object.keys(e.bin).map(async r=>{let s=VX(t,e.bin[r]);try{let n=await zX(s),a=n.mode|73;if(a===n.mode)return;await HX(s,a)}catch{}})):Promise.resolve()}extract(e){return super.extract(e).then(t=>this.package?t:this[Sw.readPackageJson](e).then(r=>this.#e(r,e)).then(()=>t))}[Sw.tarballFromResolved](){return new WX.ReadStream(this.resolved)}packument(){return this.manifest().then(e=>({name:e.name,"dist-tags":{[this.defaultTag]:e.version},versions:{[e.version]:{...e,dist:{tarball:`file:${this.resolved}`,integrity:this.integrity&&String(this.integrity)}}}}))}};ux.exports=Ew});var hx=d((Xye,lx)=>{var KX=uw(),ZX=o(i=>({cwd:i._resolved,prefix:"package/",portable:!0,gzip:{level:9},filter:o((e,t)=>(KX(i,e)&&(t.mode|=73),!0),"filter"),mtime:new Date("1985-10-26T08:15:00.000Z")}),"tarCreateOptions");lx.exports=ZX});var Kf=d((eSe,px)=>{var{resolve:YX}=require("node:path"),XX=qD(),QX=cx(),e9=aw(),{Minipass:t9}=te(),i9=Fs(),r9=Eo(),fx=ks(),dx=hx(),ww=class extends i9{static{o(this,"DirFetcher")}constructor(e,t){super(e,t),this.resolved=this.spec.fetchSpec,this.tree=t.tree||null,this.Arborist=t.Arborist||null}static tarCreateOptions(e){return dx(e)}get types(){return["directory"]}#e(){return this.manifest().then(e=>{if(!e.scripts||!e.scripts.prepare||this.opts.ignoreScripts)return;let t=this.opts.foregroundScripts?"inherit":"pipe";return QX({scriptShell:this.opts.scriptShell||void 0,pkg:e,event:"prepare",path:this.resolved,stdio:t,env:{npm_package_resolved:this.resolved,npm_package_integrity:this.integrity,npm_package_json:YX(this.resolved,"package.json")}})})}[fx.tarballFromResolved](){if(!this.tree&&!this.Arborist)throw new Error("DirFetcher requires either a tree or an Arborist constructor to pack");let e=new t9;e.resolved=this.resolved,e.integrity=this.integrity;let{prefix:t,workspaces:r}=this.opts;return this.#e().then(async()=>{if(!this.tree){let s=new this.Arborist({path:this.resolved});this.tree=await s.loadActual()}return XX(this.tree,{path:this.resolved,prefix:t,workspaces:r})}).then(s=>e9.c(dx(this.package),s).on("error",n=>e.emit("error",n)).pipe(e)).catch(s=>e.emit("error",s)),e}manifest(){return this.package?Promise.resolve(this.package):this[fx.readPackageJson](this.resolved).then(e=>this.package={...e,_integrity:this.integrity&&String(this.integrity),_resolved:this.resolved,_from:this.from})}packument(){return r9.prototype.packument.apply(this)}};px.exports=ww});var vw=d((iSe,mx)=>{"use strict";var{URL:s9}=require("node:url");function n9(i){try{let t=new s9(i).pathname.slice(1);if(!t.match(/^-/)){t=t.split("/");var e=t.indexOf("_rewrite");return e===-1?e=t.length-1:e++,decodeURIComponent(t[e])}}catch{}}o(n9,"packageName");var Us=class extends Error{static{o(this,"HttpErrorBase")}constructor(e,t,r,s){super(),this.name=this.constructor.name,this.headers=typeof t.headers?.raw=="function"?t.headers.raw():t.headers,this.statusCode=t.status,this.code=`E${t.status}`,this.method=e,this.uri=t.url,this.body=r,this.pkgid=s?s.toString():n9(t.url),Error.captureStackTrace(this,this.constructor)}},_w=class extends Us{static{o(this,"HttpErrorGeneral")}constructor(e,t,r,s){super(e,t,r,s),this.message=`${t.status} ${t.statusText} - ${this.method.toUpperCase()} ${this.spec||this.uri}${r&&r.error?" - "+r.error:""}`}},bw=class extends Us{static{o(this,"HttpErrorAuthOTP")}constructor(e,t,r,s){super(e,t,r,s),this.message="OTP required for authentication",this.code="EOTP"}},Iw=class extends Us{static{o(this,"HttpErrorAuthIPAddress")}constructor(e,t,r,s){super(e,t,r,s),this.message="Login is not allowed from your IP address",this.code="EAUTHIP"}},Ow=class extends Us{static{o(this,"HttpErrorAuthUnknown")}constructor(e,t,r,s){super(e,t,r,s),this.message="Unable to authenticate, need: "+t.headers.get("www-authenticate")}};mx.exports={HttpErrorBase:Us,HttpErrorGeneral:_w,HttpErrorAuthOTP:bw,HttpErrorAuthIPAddress:Iw,HttpErrorAuthUnknown:Ow}});var yx=d((sSe,gx)=>{var o9=hh(),Yc=class extends Error{static{o(this,"SizeError")}constructor(e,t){super(`Bad data size: expected ${t} bytes, but got ${e}`),this.expect=t,this.found=e,this.code="EBADSIZE",Error.captureStackTrace(this,this.constructor)}get name(){return"SizeError"}},Zf=class extends o9{static{o(this,"MinipassSized")}constructor(e={}){if(super(e),e.objectMode)throw new TypeError(`${this.constructor.name} streams only work with string and buffer data`);if(this.found=0,this.expect=e.size,typeof this.expect!="number"||this.expect>Number.MAX_SAFE_INTEGER||isNaN(this.expect)||this.expect<0||!isFinite(this.expect)||this.expect!==Math.floor(this.expect))throw new Error("invalid expected size: "+this.expect)}write(e,t,r){let s=Buffer.isBuffer(e)?e:typeof e=="string"?Buffer.from(e,typeof t=="string"?t:"utf8"):e;return Buffer.isBuffer(s)?(this.found+=s.length,this.found>this.expect&&this.emit("error",new Yc(this.found,this.expect)),super.write(e,t,r)):(this.emit("error",new TypeError(`${this.constructor.name} streams only work with string and buffer data`)),!1)}emit(e,...t){return e==="end"&&this.found!==this.expect&&this.emit("error",new Yc(this.found,this.expect)),super.emit(e,...t)}};Zf.SizeError=Yc;gx.exports=Zf});var Ex=d((oSe,Sx)=>{"use strict";var{Minipass:a9}=te(),Cw=Symbol("type"),or=Symbol("buffer"),Yf=class i{static{o(this,"Blob")}constructor(e,t){this[Cw]="";let r=[],s=0;if(e){let a=e,c=Number(a.length);for(let u=0;u<c;u++){let l=a[u],h=l instanceof Buffer?l:ArrayBuffer.isView(l)?Buffer.from(l.buffer,l.byteOffset,l.byteLength):l instanceof ArrayBuffer?Buffer.from(l):l instanceof i?l[or]:typeof l=="string"?Buffer.from(l):Buffer.from(String(l));s+=h.length,r.push(h)}}this[or]=Buffer.concat(r,s);let n=t&&t.type!==void 0&&String(t.type).toLowerCase();n&&!/[^\u0020-\u007E]/.test(n)&&(this[Cw]=n)}get size(){return this[or].length}get type(){return this[Cw]}text(){return Promise.resolve(this[or].toString())}arrayBuffer(){let e=this[or],t=e.byteOffset,r=e.byteLength,s=e.buffer.slice(t,t+r);return Promise.resolve(s)}stream(){return new a9().end(this[or])}slice(e,t,r){let s=this.size,n=e===void 0?0:e<0?Math.max(s+e,0):Math.min(e,s),a=t===void 0?s:t<0?Math.max(s+t,0):Math.min(t,s),c=Math.max(a-n,0),l=this[or].slice(n,n+c),h=new i([],{type:r});return h[or]=l,h}get[Symbol.toStringTag](){return"Blob"}static get BUFFER(){return or}};Object.defineProperties(Yf.prototype,{size:{enumerable:!0},type:{enumerable:!0}});Sx.exports=Yf});var Aw=d((cSe,wx)=>{"use strict";var Rw=class extends Error{static{o(this,"FetchError")}constructor(e,t,r){super(e),this.code="FETCH_ERROR",r&&Object.assign(this,r),this.errno=this.code,this.type=this.code==="EBADSIZE"&&this.found>this.expect?"max-size":t,this.message=e,Error.captureStackTrace(this,this.constructor)}get name(){return"FetchError"}set name(e){}get[Symbol.toStringTag](){return"FetchError"}};wx.exports=Rw});var bx=d((lSe,_x)=>{_x.exports={}});var Qf=d((hSe,vx)=>{"use strict";var{Minipass:Oi}=te(),Tw=yx(),Ox=Ex(),{BUFFER:c9}=Ox,Xc=Aw(),Nw;try{Nw=bx().convert}catch{}var ar=Symbol("Body internals"),js=Symbol("consumeBody"),Xf=class{static{o(this,"Body")}constructor(e,t={}){let{size:r=0,timeout:s=0}=t,n=e==null?null:Ix(e)?Buffer.from(e.toString()):Qc(e)||Buffer.isBuffer(e)?e:Object.prototype.toString.call(e)==="[object ArrayBuffer]"?Buffer.from(e):ArrayBuffer.isView(e)?Buffer.from(e.buffer,e.byteOffset,e.byteLength):Oi.isStream(e)?e:Buffer.from(String(e));this[ar]={body:n,disturbed:!1,error:null},this.size=r,this.timeout=s,Oi.isStream(n)&&n.on("error",a=>{let c=a.name==="AbortError"?a:new Xc(`Invalid response while trying to fetch ${this.url}: ${a.message}`,"system",a);this[ar].error=c})}get body(){return this[ar].body}get bodyUsed(){return this[ar].disturbed}arrayBuffer(){return this[js]().then(e=>e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength))}blob(){let e=this.headers&&this.headers.get("content-type")||"";return this[js]().then(t=>Object.assign(new Ox([],{type:e.toLowerCase()}),{[c9]:t}))}async json(){let e=await this[js]();try{return JSON.parse(e.toString())}catch(t){throw new Xc(`invalid json response body at ${this.url} reason: ${t.message}`,"invalid-json")}}text(){return this[js]().then(e=>e.toString())}buffer(){return this[js]()}textConverted(){return this[js]().then(e=>u9(e,this.headers))}[js](){if(this[ar].disturbed)return Promise.reject(new TypeError(`body used already for: ${this.url}`));if(this[ar].disturbed=!0,this[ar].error)return Promise.reject(this[ar].error);if(this.body===null)return Promise.resolve(Buffer.alloc(0));if(Buffer.isBuffer(this.body))return Promise.resolve(this.body);let e=Qc(this.body)?this.body.stream():this.body;if(!Oi.isStream(e))return Promise.resolve(Buffer.alloc(0));let t=this.size&&e instanceof Tw||!this.size&&e instanceof Oi&&!(e instanceof Tw)?e:this.size?new Tw({size:this.size}):new Oi,r=this.timeout&&t.writable?setTimeout(()=>{t.emit("error",new Xc(`Response timeout while trying to fetch ${this.url} (over ${this.timeout}ms)`,"body-timeout"))},this.timeout):null;return r&&r.unref&&r.unref(),new Promise(s=>{t!==e&&(e.on("error",n=>t.emit("error",n)),e.pipe(t)),s()}).then(()=>t.concat()).then(s=>(clearTimeout(r),s)).catch(s=>{throw clearTimeout(r),s.name==="AbortError"||s.name==="FetchError"?s:s.name==="RangeError"?new Xc(`Could not create Buffer from response body for ${this.url}: ${s.message}`,"system",s):new Xc(`Invalid response body while trying to fetch ${this.url}: ${s.message}`,"system",s)})}static clone(e){if(e.bodyUsed)throw new Error("cannot clone body after it is used");let t=e.body;if(Oi.isStream(t)&&typeof t.getBoundary!="function"){let r=new Oi,s=new Oi,n=new Oi;return r.on("error",a=>{s.emit("error",a),n.emit("error",a)}),t.on("error",a=>r.emit("error",a)),r.pipe(s),r.pipe(n),t.pipe(r),e[ar].body=s,n}else return e.body}static extractContentType(e){return e==null?null:typeof e=="string"?"text/plain;charset=UTF-8":Ix(e)?"application/x-www-form-urlencoded;charset=UTF-8":Qc(e)?e.type||null:Buffer.isBuffer(e)||Object.prototype.toString.call(e)==="[object ArrayBuffer]"||ArrayBuffer.isView(e)?null:typeof e.getBoundary=="function"?`multipart/form-data;boundary=${e.getBoundary()}`:Oi.isStream(e)?null:"text/plain;charset=UTF-8"}static getTotalBytes(e){let{body:t}=e;return t==null?0:Qc(t)?t.size:Buffer.isBuffer(t)?t.length:t&&typeof t.getLengthSync=="function"&&(t._lengthRetrievers&&t._lengthRetrievers.length===0||t.hasKnownLength&&t.hasKnownLength())?t.getLengthSync():null}static writeToStream(e,t){let{body:r}=t;return r==null?e.end():Buffer.isBuffer(r)||typeof r=="string"?e.end(r):(Qc(r)?r.stream():r).on("error",n=>e.emit("error",n)).pipe(e),e}};Object.defineProperties(Xf.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0}});var Ix=o(i=>typeof i!="object"||typeof i.append!="function"||typeof i.delete!="function"||typeof i.get!="function"||typeof i.getAll!="function"||typeof i.has!="function"||typeof i.set!="function"?!1:i.constructor.name==="URLSearchParams"||Object.prototype.toString.call(i)==="[object URLSearchParams]"||typeof i.sort=="function","isURLSearchParams"),Qc=o(i=>typeof i=="object"&&typeof i.arrayBuffer=="function"&&typeof i.type=="string"&&typeof i.stream=="function"&&typeof i.constructor=="function"&&typeof i.constructor.name=="string"&&/^(Blob|File)$/.test(i.constructor.name)&&/^(Blob|File)$/.test(i[Symbol.toStringTag]),"isBlob"),u9=o((i,e)=>{if(typeof Nw!="function")throw new Error("The package `encoding` must be installed to use the textConverted() function");let t=e&&e.get("content-type"),r="utf-8",s;t&&(s=/charset=([^;]*)/i.exec(t));let n=i.slice(0,1024).toString();return!s&&n&&(s=/<meta.+?charset=(['"])(.+?)\1/i.exec(n)),!s&&n&&(s=/<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(n),s||(s=/<meta[\s]+?content=(['"])(.+?)\1[\s]+?http-equiv=(['"])content-type\3/i.exec(n),s&&s.pop()),s&&(s=/charset=(.*)/i.exec(s.pop()))),!s&&n&&(s=/<\?xml.+?encoding=(['"])(.+?)\1/i.exec(n)),s&&(r=s.pop(),(r==="gb2312"||r==="gbk")&&(r="gb18030")),Nw(i,"UTF-8",r).toString()},"convertBody");vx.exports=Xf});var td=d((dSe,Ax)=>{"use strict";var Rx=/[^^_`a-zA-Z\-0-9!#$%&'*+.|~]/,Dw=/[^\t\x20-\x7e\x80-\xff]/,eu=o(i=>{if(i=`${i}`,Rx.test(i)||i==="")throw new TypeError(`${i} is not a legal HTTP header name`)},"validateName"),Cx=o(i=>{if(i=`${i}`,Dw.test(i))throw new TypeError(`${i} is not a legal HTTP header value`)},"validateValue"),wo=o((i,e)=>{e=e.toLowerCase();for(let t in i)if(t.toLowerCase()===e)return t},"find"),me=Symbol("map"),ed=class i{static{o(this,"Headers")}constructor(e=void 0){if(this[me]=Object.create(null),e instanceof i){let t=e.raw(),r=Object.keys(t);for(let s of r)for(let n of t[s])this.append(s,n);return}if(e!=null)if(typeof e=="object"){let t=e[Symbol.iterator];if(t!=null){if(typeof t!="function")throw new TypeError("Header pairs must be iterable");let r=[];for(let s of e){if(typeof s!="object"||typeof s[Symbol.iterator]!="function")throw new TypeError("Each header pair must be iterable");let n=Array.from(s);if(n.length!==2)throw new TypeError("Each header pair must be a name/value tuple");r.push(n)}for(let s of r)this.append(s[0],s[1])}else for(let r of Object.keys(e))this.append(r,e[r])}else throw new TypeError("Provided initializer must be an object")}get(e){e=`${e}`,eu(e);let t=wo(this[me],e);return t===void 0?null:this[me][t].join(", ")}forEach(e,t=void 0){let r=xw(this);for(let s=0;s<r.length;s++){let[n,a]=r[s];e.call(t,a,n,this),r=xw(this)}}set(e,t){e=`${e}`,t=`${t}`,eu(e),Cx(t);let r=wo(this[me],e);this[me][r!==void 0?r:e]=[t]}append(e,t){e=`${e}`,t=`${t}`,eu(e),Cx(t);let r=wo(this[me],e);r!==void 0?this[me][r].push(t):this[me][e]=[t]}has(e){return e=`${e}`,eu(e),wo(this[me],e)!==void 0}delete(e){e=`${e}`,eu(e);let t=wo(this[me],e);t!==void 0&&delete this[me][t]}raw(){return this[me]}keys(){return new $s(this,"key")}values(){return new $s(this,"value")}[Symbol.iterator](){return new $s(this,"key+value")}entries(){return new $s(this,"key+value")}get[Symbol.toStringTag](){return"Headers"}static exportNodeCompatibleHeaders(e){let t=Object.assign(Object.create(null),e[me]),r=wo(e[me],"Host");return r!==void 0&&(t[r]=t[r][0]),t}static createHeadersLenient(e){let t=new i;for(let r of Object.keys(e))if(!Rx.test(r))if(Array.isArray(e[r]))for(let s of e[r])Dw.test(s)||(t[me][r]===void 0?t[me][r]=[s]:t[me][r].push(s));else Dw.test(e[r])||(t[me][r]=[e[r]]);return t}};Object.defineProperties(ed.prototype,{get:{enumerable:!0},forEach:{enumerable:!0},set:{enumerable:!0},append:{enumerable:!0},has:{enumerable:!0},delete:{enumerable:!0},keys:{enumerable:!0},values:{enumerable:!0},entries:{enumerable:!0}});var xw=o((i,e="key+value")=>Object.keys(i[me]).sort().map(e==="key"?t=>t.toLowerCase():e==="value"?t=>i[me][t].join(", "):t=>[t.toLowerCase(),i[me][t].join(", ")]),"getHeaders"),Pw=Symbol("internal"),$s=class i{static{o(this,"HeadersIterator")}constructor(e,t){this[Pw]={target:e,kind:t,index:0}}get[Symbol.toStringTag](){return"HeadersIterator"}next(){if(!this||Object.getPrototypeOf(this)!==i.prototype)throw new TypeError("Value of `this` is not a HeadersIterator");let{target:e,kind:t,index:r}=this[Pw],s=xw(e,t),n=s.length;return r>=n?{value:void 0,done:!0}:(this[Pw].index++,{value:s[r],done:!1})}};Object.setPrototypeOf($s.prototype,Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));Ax.exports=ed});var Dx=d((mSe,Px)=>{"use strict";var l9=require("http"),{STATUS_CODES:h9}=l9,Tx=td(),Nx=Qf(),{clone:f9,extractContentType:d9}=Nx,cr=Symbol("Response internals"),id=class i extends Nx{static{o(this,"Response")}constructor(e=null,t={}){super(e,t);let r=t.status||200,s=new Tx(t.headers);if(e!=null&&!s.has("Content-Type")){let n=d9(e);n&&s.append("Content-Type",n)}this[cr]={url:t.url,status:r,statusText:t.statusText||h9[r],headers:s,counter:t.counter,trailer:Promise.resolve(t.trailer||new Tx)}}get trailer(){return this[cr].trailer}get url(){return this[cr].url||""}get status(){return this[cr].status}get ok(){return this[cr].status>=200&&this[cr].status<300}get redirected(){return this[cr].counter>0}get statusText(){return this[cr].statusText}get headers(){return this[cr].headers}clone(){return new i(f9(this),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected,trailer:this.trailer})}get[Symbol.toStringTag](){return"Response"}};Px.exports=id;Object.defineProperties(id.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}})});var xx=d((ySe,p9)=>{p9.exports={name:"minipass-fetch",version:"4.0.1",description:"An implementation of window.fetch in Node.js using Minipass streams",license:"MIT",main:"lib/index.js",scripts:{"test:tls-fixtures":"./test/fixtures/tls/setup.sh",test:"tap",snap:"tap",lint:"npm run eslint",postlint:"template-oss-check",lintfix:"npm run eslint -- --fix",posttest:"npm run lint","template-oss-apply":"template-oss-apply --force",eslint:'eslint "**/*.{js,cjs,ts,mjs,jsx,tsx}"'},tap:{"coverage-map":"map.js","check-coverage":!0,"nyc-arg":["--exclude","tap-snapshots/**"]},devDependencies:{"@npmcli/eslint-config":"^5.0.0","@npmcli/template-oss":"4.23.3","@ungap/url-search-params":"^0.2.2","abort-controller":"^3.0.0","abortcontroller-polyfill":"~1.7.3",encoding:"^0.1.13","form-data":"^4.0.0",nock:"^13.2.4",parted:"^0.1.1","string-to-arraybuffer":"^1.0.2",tap:"^16.0.0"},dependencies:{minipass:"^7.0.3","minipass-sized":"^1.0.3",minizlib:"^3.0.1"},optionalDependencies:{encoding:"^0.1.13"},repository:{type:"git",url:"git+https://github.com/npm/minipass-fetch.git"},keywords:["fetch","minipass","node-fetch","window.fetch"],files:["bin/","lib/"],engines:{node:"^18.17.0 || >=20.5.0"},author:"GitHub Inc.",templateOSS:{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",version:"4.23.3",publish:"true"}}});var Bx=d((SSe,Mx)=>{"use strict";var{URL:Lw}=require("url"),{Minipass:m9}=te(),Mw=td(),{exportNodeCompatibleHeaders:g9}=Mw,Lx=Qf(),{clone:y9,extractContentType:S9,getTotalBytes:E9}=Lx,w9=xx().version,_9=`minipass-fetch/${w9} (+https://github.com/isaacs/minipass-fetch)`,ti=Symbol("Request internals"),rd=o(i=>typeof i=="object"&&typeof i[ti]=="object","isRequest"),b9=o(i=>{let e=i&&typeof i=="object"&&Object.getPrototypeOf(i);return!!(e&&e.constructor.name==="AbortSignal")},"isAbortSignal"),sd=class i extends Lx{static{o(this,"Request")}constructor(e,t={}){let r=rd(e)?new Lw(e.url):e&&e.href?new Lw(e.href):new Lw(`${e}`);rd(e)?t={...e[ti],...t}:(!e||typeof e=="string")&&(e={});let s=(t.method||e.method||"GET").toUpperCase(),n=s==="GET"||s==="HEAD";if((t.body!==null&&t.body!==void 0||rd(e)&&e.body!==null)&&n)throw new TypeError("Request with GET/HEAD method cannot have body");let a=t.body!==null&&t.body!==void 0?t.body:rd(e)&&e.body!==null?y9(e):null;super(a,{timeout:t.timeout||e.timeout||0,size:t.size||e.size||0});let c=new Mw(t.headers||e.headers||{});if(a!=null&&!c.has("Content-Type")){let ee=S9(a);ee&&c.append("Content-Type",ee)}let u="signal"in t?t.signal:null;if(u!=null&&!b9(u))throw new TypeError("Expected signal must be an instanceof AbortSignal");let{ca:l,cert:h,ciphers:f,clientCertEngine:p,crl:m,dhparam:y,ecdhCurve:g,family:S,honorCipherOrder:E,key:_,passphrase:b,pfx:w,rejectUnauthorized:I=process.env.NODE_TLS_REJECT_UNAUTHORIZED!=="0",secureOptions:v,secureProtocol:N,servername:P,sessionIdContext:U}=t;this[ti]={method:s,redirect:t.redirect||e.redirect||"follow",headers:c,parsedURL:r,signal:u,ca:l,cert:h,ciphers:f,clientCertEngine:p,crl:m,dhparam:y,ecdhCurve:g,family:S,honorCipherOrder:E,key:_,passphrase:b,pfx:w,rejectUnauthorized:I,secureOptions:v,secureProtocol:N,servername:P,sessionIdContext:U},this.follow=t.follow!==void 0?t.follow:e.follow!==void 0?e.follow:20,this.compress=t.compress!==void 0?t.compress:e.compress!==void 0?e.compress:!0,this.counter=t.counter||e.counter||0,this.agent=t.agent||e.agent}get method(){return this[ti].method}get url(){return this[ti].parsedURL.toString()}get headers(){return this[ti].headers}get redirect(){return this[ti].redirect}get signal(){return this[ti].signal}clone(){return new i(this)}get[Symbol.toStringTag](){return"Request"}static getNodeRequestOptions(e){let t=e[ti].parsedURL,r=new Mw(e[ti].headers);if(r.has("Accept")||r.set("Accept","*/*"),!/^https?:$/.test(t.protocol))throw new TypeError("Only HTTP(S) protocols are supported");if(e.signal&&m9.isStream(e.body)&&typeof e.body.destroy!="function")throw new Error("Cancellation of streamed requests with AbortSignal is not supported");let s=(e.body===null||e.body===void 0)&&/^(POST|PUT)$/i.test(e.method)?"0":e.body!==null&&e.body!==void 0?E9(e):null;s&&r.set("Content-Length",s+""),r.has("User-Agent")||r.set("User-Agent",_9),e.compress&&!r.has("Accept-Encoding")&&r.set("Accept-Encoding","gzip,deflate");let n=typeof e.agent=="function"?e.agent(t):e.agent;!r.has("Connection")&&!n&&r.set("Connection","close");let{ca:a,cert:c,ciphers:u,clientCertEngine:l,crl:h,dhparam:f,ecdhCurve:p,family:m,honorCipherOrder:y,key:g,passphrase:S,pfx:E,rejectUnauthorized:_,secureOptions:b,secureProtocol:w,servername:I,sessionIdContext:v}=e[ti];return{...{auth:t.username||t.password?`${t.username}:${t.password}`:"",host:t.host,hostname:t.hostname,path:`${t.pathname}${t.search}`,port:t.port,protocol:t.protocol},method:e.method,headers:g9(r),agent:n,ca:a,cert:c,ciphers:u,clientCertEngine:l,crl:h,dhparam:f,ecdhCurve:p,family:m,honorCipherOrder:y,key:g,passphrase:S,pfx:E,rejectUnauthorized:_,secureOptions:b,secureProtocol:w,servername:I,sessionIdContext:v,timeout:e.timeout}}};Mx.exports=sd;Object.defineProperties(sd.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}})});var Fx=d((wSe,kx)=>{"use strict";var Bw=class extends Error{static{o(this,"AbortError")}constructor(e){super(e),this.code="FETCH_ABORTED",this.type="aborted",Error.captureStackTrace(this,this.constructor)}get name(){return"AbortError"}set name(e){}};kx.exports=Bw});var bo=d((bSe,$x)=>{"use strict";var{URL:tu}=require("url"),I9=require("http"),O9=require("https"),_o=Lc(),{Minipass:Ux}=te(),v9=Qf(),{writeToStream:C9,getTotalBytes:R9}=v9,qs=Dx(),Fw=td(),{createHeadersLenient:jx}=Fw,iu=Bx(),{getNodeRequestOptions:A9}=iu,jr=Aw(),kw=Fx(),ur=o(async(i,e)=>{if(/^data:/.test(i)){let t=new iu(i,e);return Promise.resolve().then(()=>new Promise((r,s)=>{let n,a;try{let{pathname:l,search:h}=new tu(i),f=l.split(",");if(f.length<2)throw new Error("invalid data: URI");let p=f.shift(),m=/;base64$/.test(p);n=m?p.slice(0,-7):p;let y=decodeURIComponent(f.join(",")+h);a=m?Buffer.from(y,"base64"):Buffer.from(y)}catch(l){return s(new jr(`[${t.method}] ${t.url} invalid URL, ${l.message}`,"system",l))}let{signal:c}=t;if(c&&c.aborted)return s(new kw("The user aborted a request."));let u={"Content-Length":a.length};return n&&(u["Content-Type"]=n),r(new qs(a,{headers:u}))}))}return new Promise((t,r)=>{let s=new iu(i,e),n;try{n=A9(s)}catch(y){return r(y)}let a=(n.protocol==="https:"?O9:I9).request,{signal:c}=s,u=null,l=o(()=>{let y=new kw("The user aborted a request.");r(y),Ux.isStream(s.body)&&typeof s.body.destroy=="function"&&s.body.destroy(y),u&&u.body&&u.body.emit("error",y)},"abort");if(c&&c.aborted)return l();let h=o(()=>{l(),f()},"abortAndFinalize"),f=o(()=>{p.abort(),c&&c.removeEventListener("abort",h),clearTimeout(m)},"finalize"),p=a(n);c&&c.addEventListener("abort",h);let m=null;s.timeout&&p.once("socket",()=>{m=setTimeout(()=>{r(new jr(`network timeout at: ${s.url}`,"request-timeout")),f()},s.timeout)}),p.on("error",y=>{p.res&&p.res.emit("error",y),r(new jr(`request to ${s.url} failed, reason: ${y.message}`,"system",y)),f()}),p.on("response",y=>{clearTimeout(m);let g=jx(y.headers);if(ur.isRedirect(y.statusCode)){let I=g.get("Location"),v=null;try{v=I===null?null:new tu(I,s.url).toString()}catch{if(s.redirect!=="manual"){r(new jr(`uri requested responds with an invalid redirect URL: ${I}`,"invalid-redirect")),f();return}}if(s.redirect==="error"){r(new jr(`uri requested responds with a redirect, redirect mode is set to error: ${s.url}`,"no-redirect")),f();return}else if(s.redirect==="manual"){if(v!==null)try{g.set("Location",v)}catch(N){r(N)}}else if(s.redirect==="follow"&&v!==null){if(s.counter>=s.follow){r(new jr(`maximum redirect reached at: ${s.url}`,"max-redirect")),f();return}if(y.statusCode!==303&&s.body&&R9(s)===null){r(new jr("Cannot follow redirect with body being a readable stream","unsupported-redirect")),f();return}s.headers.set("host",new tu(v).host);let N={headers:new Fw(s.headers),follow:s.follow,counter:s.counter+1,agent:s.agent,compress:s.compress,method:s.method,body:s.body,signal:s.signal,timeout:s.timeout},P=new tu(s.url),U=new tu(v);P.hostname!==U.hostname&&(N.headers.delete("authorization"),N.headers.delete("cookie")),(y.statusCode===303||(y.statusCode===301||y.statusCode===302)&&s.method==="POST")&&(N.method="GET",N.body=void 0,N.headers.delete("content-length")),t(ur(new iu(v,N))),f();return}}y.once("end",()=>c&&c.removeEventListener("abort",h));let S=new Ux;S.on("error",f),y.on("error",I=>S.emit("error",I)),y.on("data",I=>S.write(I)),y.on("end",()=>S.end());let E={url:s.url,status:y.statusCode,statusText:y.statusMessage,headers:g,size:s.size,timeout:s.timeout,counter:s.counter,trailer:new Promise(I=>y.on("end",()=>I(jx(y.trailers))))},_=g.get("Content-Encoding");if(!s.compress||s.method==="HEAD"||_===null||y.statusCode===204||y.statusCode===304){u=new qs(S,E),t(u);return}let b={flush:_o.constants.Z_SYNC_FLUSH,finishFlush:_o.constants.Z_SYNC_FLUSH};if(_==="gzip"||_==="x-gzip"){let I=new _o.Gunzip(b);u=new qs(S.on("error",v=>I.emit("error",v)).pipe(I),E),t(u);return}if(_==="deflate"||_==="x-deflate"){y.once("data",I=>{let v=(I[0]&15)===8?new _o.Inflate:new _o.InflateRaw;S.on("error",N=>v.emit("error",N)).pipe(v),u=new qs(v,E),t(u)});return}if(_==="br"){try{var w=new _o.BrotliDecompress}catch(I){r(I),f();return}S.on("error",I=>w.emit("error",I)).pipe(w),u=new qs(w,E),t(u);return}u=new qs(S,E),t(u)}),C9(p,s)})},"fetch");$x.exports=ur;ur.isRedirect=i=>i===301||i===302||i===303||i===307||i===308;ur.Headers=Fw;ur.Request=iu;ur.Response=qs;ur.FetchError=jr;ur.AbortError=kw});var qx=d((OSe,T9)=>{T9.exports={name:"npm-registry-fetch",version:"19.0.0",description:"Fetch-based http client for use with npm registry APIs",main:"lib",files:["bin/","lib/"],scripts:{eslint:'eslint "**/*.{js,cjs,ts,mjs,jsx,tsx}"',lint:"npm run eslint",lintfix:"npm run eslint -- --fix",test:"tap",posttest:"npm run lint",npmclilint:"npmcli-lint",postsnap:"npm run lintfix --",postlint:"template-oss-check",snap:"tap","template-oss-apply":"template-oss-apply --force"},repository:{type:"git",url:"git+https://github.com/npm/npm-registry-fetch.git"},keywords:["npm","registry","fetch"],author:"GitHub Inc.",license:"ISC",dependencies:{"@npmcli/redact":"^3.0.0",jsonparse:"^1.3.1","make-fetch-happen":"^15.0.0",minipass:"^7.0.2","minipass-fetch":"^4.0.0",minizlib:"^3.0.1","npm-package-arg":"^13.0.0","proc-log":"^5.0.0"},devDependencies:{"@npmcli/eslint-config":"^5.0.0","@npmcli/template-oss":"4.25.0",cacache:"^20.0.0",nock:"^13.2.4","require-inject":"^1.4.4",ssri:"^12.0.0",tap:"^16.0.1"},tap:{"check-coverage":!0,"test-ignore":"test[\\\\/](util|cache)[\\\\/]","nyc-arg":["--exclude","tap-snapshots/**"]},engines:{node:"^20.17.0 || >=22.9.0"},templateOSS:{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",version:"4.25.0",publish:"true"}}});var Uw=d((vSe,zx)=>{var Vx=qx();zx.exports={maxSockets:12,method:"GET",registry:"https://registry.npmjs.org/",timeout:300*1e3,strictSSL:!0,noProxy:process.env.NOPROXY,userAgent:`${Vx.name}@${Vx.version}/node@${process.version}+${process.arch} (${process.platform})`}});var jw=d((CSe,Hx)=>{var Io="regex",Oo="path",N9={type:Io,pattern:/\b(npms?_)[a-zA-Z0-9]{36,48}\b/gi,replacement:"[REDACTED_NPM_SECRET]"},P9={type:Io,pattern:/\b(Basic\s+|Bearer\s+)[\w+=\-.]+\b/gi,replacement:"[REDACTED_AUTH_HEADER]"},D9={type:Io,pattern:/\b[A-Za-z0-9-_]{10,}(?!\.\d+\.)\.[A-Za-z0-9-_]{3,}\.[A-Za-z0-9-_]{20,}\b/gi,replacement:"[REDACTED_JSON_WEB_TOKEN]"},x9={type:Io,pattern:/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,replacement:"[REDACTED_UUID]"},L9={type:Io,pattern:/(?:https?|ftp):\/\/[^\s/"$.?#].[^\s"]*/gi,replacement:"[REDACTED_URL]"},M9={type:Oo,predicate:o(({path:i})=>i.endsWith(".headers.authorization"),"predicate"),replacement:"[REDACTED_HEADER_AUTHORIZATION]"},B9={type:Oo,predicate:o(({path:i})=>i.endsWith(".headers.set-cookie"),"predicate"),replacement:"[REDACTED_HEADER_SET_COOKIE]"},k9={type:Oo,predicate:o(({path:i})=>i.endsWith(".headers.cookie"),"predicate"),replacement:"[REDACTED_HEADER_COOKIE]"},F9={type:Oo,predicate:o(({path:i})=>i.endsWith(".request"),"predicate"),replacement:o(i=>({method:i?.method,path:i?.path,headers:i?.headers,url:i?.url}),"replacement")},U9={type:Oo,predicate:o(({path:i})=>i.endsWith(".response"),"predicate"),replacement:o(i=>({data:i?.data,status:i?.status,headers:i?.headers}),"replacement")};Hx.exports={TYPE_REGEX:Io,TYPE_URL:"url",TYPE_PATH:Oo,NPM_SECRET:N9,AUTH_HEADER:P9,JSON_WEB_TOKEN:D9,UUID:x9,URL_MATCHER:L9,DEEP_HEADER_AUTHORIZATION:M9,DEEP_HEADER_SET_COOKIE:B9,DEEP_HEADER_COOKIE:k9,REWRITE_REQUEST:F9,REWRITE_RESPONSE:U9}});var Yx=d((ASe,Zx)=>{var{URL_MATCHER:j9,TYPE_URL:nd,TYPE_REGEX:$9,TYPE_PATH:q9}=jw(),$r=o((i=0)=>(i=typeof i=="string"?i.length:i,i<8?"*".repeat(8):"*".repeat(i)),"asterisk"),Gx=o(i=>i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"escapeRegExp"),Wx=o(i=>{let e=decodeURIComponent(i),t=encodeURIComponent(i);return[...new Set([t,e,i])].map(Gx).join("|")},"urlEncodeRegexGroup"),od=o((i,...e)=>{let t="";for(let r=0;r<e.length;r++)t+=i[r]+`(${Wx(e[r])})`;return t+=i[i.length-1],new RegExp(t)},"urlEncodeRegexTag"),V9=o(({hostname:i,replacement:e}={})=>({type:nd,predicate:o(({url:t})=>t.hostname===i,"predicate"),pattern:o(({url:t})=>od`(^${t.protocol}//${t.username}:.+@)?${t.hostname}`,"pattern"),replacement:`$1${e||$r()}`}),"redactUrlHostnameMatcher"),z9=o(({param:i,replacement:e}={})=>({type:nd,predicate:o(({url:t})=>t.searchParams.has(i),"predicate"),pattern:o(({url:t})=>od`(${i}=)${t.searchParams.get(i)}`,"pattern"),replacement:`$1${e||$r()}`}),"redactUrlSearchParamsMatcher"),Jx=o(({replacement:i}={})=>({type:nd,predicate:o(({url:e})=>e.password,"predicate"),pattern:o(({url:e})=>od`(^${e.protocol}//${e.username}:)${e.password}`,"pattern"),replacement:`$1${i||$r()}`}),"redactUrlPasswordMatcher"),Kx=o((...i)=>e=>{try{let t=new URL(e);return $w(...i)(e,{url:t})}catch{return e}},"redactUrlReplacement"),H9=o((...i)=>({...j9,replacement:Kx(...i)}),"redactUrlMatcher"),G9={[$9]:i=>e=>(typeof e=="string"&&(e=e.replace(i.pattern,i.replacement)),e),[nd]:i=>(e,t)=>{if(typeof e=="string")try{let r=t?.url||new URL(e),{predicate:s,pattern:n}=i;s({url:r})&&(e=e.replace(n({url:r}),i.replacement))}catch{return e}return e},[q9]:i=>(e,t)=>{let r=t?.path,s=r.join(".").toLowerCase(),{predicate:n,replacement:a}=i,c=typeof a=="function"?a:()=>a;return n({rawPath:r,path:s})&&(e=c(e,{rawPath:r,path:s})),e}},W9=o(i=>G9[i.type](i),"redactMatcher"),$w=o((...i)=>(e,t)=>i.flat().reduce((s,n)=>(typeof n=="function"?n:W9(n))(s,t),e),"redactMatchers"),J9=o(()=>(i,e)=>typeof e=="number"?$r(i):e+$r(i.substring(e.length).length),"redactDynamicReplacement"),K9=o(i=>(e,t)=>typeof t=="number"?$r(i):t+$r(i),"redactFixedReplacement"),Z9=o((i,e)=>$w(Jx({replacement:e}))(i),"redactUrlPassword");Zx.exports={asterisk:$r,escapeRegExp:Gx,urlEncodeRegexGroup:Wx,urlEncodeRegexTag:od,redactUrlHostnameMatcher:V9,redactUrlSearchParamsMatcher:z9,redactUrlPasswordMatcher:Jx,redactUrlMatcher:H9,redactUrlReplacement:Kx,redactDynamicReplacement:J9,redactFixedReplacement:K9,redactMatchers:$w,redactUrlPassword:Z9}});var tL=d((NSe,eL)=>{var Xx=jw(),{redactUrlPassword:Y9}=Yx(),qw="***",Vw=o(i=>typeof i!="string"||!i?i:Y9(i,qw).replace(Xx.NPM_SECRET.pattern,`npm_${qw}`).replace(Xx.UUID.pattern,qw),"redact"),Qx=o(i=>{let e=/[\s=]/g,t=null,r="",s=0;for(;t=e.exec(i);)r+=Vw(i.slice(s,t.index))+t[0],s=e.lastIndex;return r+Vw(i.slice(s))},"splitAndRedact"),X9=o(i=>typeof i=="string"?Qx(i):Array.isArray(i)?i.map(e=>typeof e=="string"?Qx(e):e):i,"redactLog");eL.exports={redact:Vw,redactLog:X9}});var sL=d((DSe,rL)=>{"use strict";var ru=vw(),{Response:Q9}=bo(),e8=Uw(),{log:ad}=_t(),{redact:t8}=tL(),i8="https://github.com/npm/cli/wiki/No-auth-for-URI,-but-auth-present-for-scoped-registry",r8=o(async({method:i,uri:e,res:t,startTime:r,auth:s,opts:n})=>(n={...e8,...n},t.headers.has("npm-notice")&&!t.headers.has("x-local-cache")&&ad.notice("",t.headers.get("npm-notice")),t.status>=400?(iL(i,t,r),s&&s.scopeAuthKey&&!s.token&&!s.auth&&ad.warn("registry",`No auth for URI, but auth present for scoped registry.
39
+
40
+ URI: ${e}
41
+ Scoped Registry Key: ${s.scopeAuthKey}
42
+
43
+ More info here: ${i8}`),s8(i,t,r,n)):(t.body.on("end",()=>iL(i,t,r,n)),n.ignoreBody?(t.body.resume(),new Q9(null,t)):t)),"checkResponse");rL.exports=r8;function iL(i,e,t){let r=Date.now()-t,s=e.headers.get("x-fetch-attempts"),n=s&&s>1?` attempt #${s}`:"",a=e.headers.get("x-local-cache-status"),c=a?` (cache ${a})`:"",u=t8(e.url);a==="hit"?ad.http("cache",`${u} ${r}ms${n}${c}`):ad.http("fetch",`${i.toUpperCase()} ${e.status} ${u} ${r}ms${n}${c}`)}o(iL,"logRequest");function s8(i,e,t,r){return e.buffer().catch(()=>null).then(s=>{let n=s;try{n=JSON.parse(s.toString("utf8"))}catch{}if(e.status===401&&e.headers.get("www-authenticate")){let a=e.headers.get("www-authenticate").split(/,\s*/).map(c=>c.toLowerCase());throw a.indexOf("ipaddress")!==-1?new ru.HttpErrorAuthIPAddress(i,e,n,r.spec):a.indexOf("otp")!==-1?new ru.HttpErrorAuthOTP(i,e,n,r.spec):new ru.HttpErrorAuthUnknown(i,e,n,r.spec)}else throw e.status===401&&s!=null&&/one-time pass/.test(s.toString("utf8"))?new ru.HttpErrorAuthOTP(i,e,n,r.spec):new ru.HttpErrorGeneral(i,e,n,r.spec)})}o(s8,"checkErrors")});var uL=d((LSe,cL)=>{"use strict";var n8=require("fs"),o8=Hn(),{URL:zw}=require("url"),nL=o((i,e)=>{let t=new zw(i),r=`//${t.host}${t.pathname}`;for(;r.length>2;){let s=a8(r,e);if(s)return{regKey:r,authKey:s};r=r.replace(/([^/]+|\/)$/,"")}return{regKey:!1,authKey:null}},"regFromURI"),a8=o((i,e)=>e[`${i}:_authToken`]?"_authToken":e[`${i}:_auth`]?"_auth":e[`${i}:username`]&&e[`${i}:_password`]?"username":e[`${i}:certfile`]&&e[`${i}:keyfile`]?"certfile":!1,"hasAuth"),c8=o((i,e)=>{let t=new zw(i),r=new zw(e);return t.host===r.host},"sameHost"),u8=o(i=>{let{spec:e}=i,{scope:t,subSpec:r}=e?o8(e):{},s=r&&r.scope,n=r?s:t;return n&&i[`${n}:registry`]||i.registry},"getRegistry"),oL=o(i=>{try{return n8.readFileSync(i,"utf8")}catch(e){if(e.code!=="ENOENT")throw e;return null}},"maybeReadFile"),aL=o((i,e={})=>{let{forceAuth:t}=e;if(!i)throw new Error("URI is required");let{regKey:r,authKey:s}=nL(i,t||e);if(t&&!r)return new su({regKey:!1,authKey:null,scopeAuthKey:null,token:t._authToken||t.token,username:t.username,password:t._password||t.password,auth:t._auth||t.auth,certfile:t.certfile,keyfile:t.keyfile});if(!r){let f=u8(e);if(f&&i!==f&&c8(i,f))return aL(f,e);if(f!==e.registry){let{regKey:p,authKey:m}=nL(f,e);return new su({scopeAuthKey:p,regKey:p,authKey:m})}}let{[`${r}:_authToken`]:n,[`${r}:username`]:a,[`${r}:_password`]:c,[`${r}:_auth`]:u,[`${r}:certfile`]:l,[`${r}:keyfile`]:h}=e;return new su({scopeAuthKey:null,regKey:r,authKey:s,token:n,auth:u,username:a,password:c,certfile:l,keyfile:h})},"getAuth"),su=class{static{o(this,"Auth")}constructor({token:e,auth:t,username:r,password:s,scopeAuthKey:n,certfile:a,keyfile:c,regKey:u,authKey:l}){if(this.scopeAuthKey=n,this.regKey=u,this.authKey=l,this.token=null,this.auth=null,this.isBasicAuth=!1,this.cert=null,this.key=null,e)this.token=e;else if(t)this.auth=t;else if(r&&s){let h=Buffer.from(s,"base64").toString("utf8");this.auth=Buffer.from(`${r}:${h}`,"utf8").toString("base64"),this.isBasicAuth=!0}if(a&&c){let h=oL(a,"utf-8"),f=oL(c,"utf-8");h&&f&&(this.cert=h,this.key=f)}}};cL.exports=aL});var hL=d((BSe,lL)=>{var l8=require("dns"),h8=["if-modified-since","if-none-match","if-unmodified-since","if-match","if-range"],f8=o(i=>{let{strictSSL:e,...t}={...i};if(t.method=t.method?t.method.toUpperCase():"GET",e==null?t.rejectUnauthorized=process.env.NODE_TLS_REJECT_UNAUTHORIZED!=="0":t.rejectUnauthorized=e!==!1,!t.retry)t.retry={retries:0};else if(typeof t.retry=="string"){let r=parseInt(t.retry,10);isFinite(r)?t.retry={retries:r}:t.retry={retries:0}}else typeof t.retry=="number"?t.retry={retries:t.retry}:t.retry={retries:0,...t.retry};return t.dns={ttl:300*1e3,lookup:l8.lookup,...t.dns},t.cache=t.cache||"default",t.cache==="default"&&Object.keys(t.headers||{}).some(s=>h8.includes(s.toLowerCase()))&&(t.cache="no-store"),t.cacheAdditionalHeaders=t.cacheAdditionalHeaders||[],t.cacheManager&&!t.cachePath&&(t.cachePath=t.cacheManager),t},"configureOptions");lL.exports=f8});var dL=d((USe,fL)=>{"use strict";var d8=new Set([200,203,204,206,300,301,308,404,405,410,414,501]),p8=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]),m8=new Set([500,502,503,504]),g8={date:!0,connection:!0,"keep-alive":!0,"proxy-authenticate":!0,"proxy-authorization":!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0},y8={"content-length":!0,"content-encoding":!0,"transfer-encoding":!0,"content-range":!0};function lr(i){let e=parseInt(i,10);return isFinite(e)?e:0}o(lr,"toNumberOrZero");function S8(i){return i?m8.has(i.status):!0}o(S8,"isErrorResponse");function Hw(i){let e={};if(!i)return e;let t=i.trim().split(/,/);for(let r of t){let[s,n]=r.split(/=/,2);e[s.trim()]=n===void 0?!0:n.trim().replace(/^"|"$/g,"")}return e}o(Hw,"parseCacheControl");function E8(i){let e=[];for(let t in i){let r=i[t];e.push(r===!0?t:t+"="+r)}if(e.length)return e.join(", ")}o(E8,"formatCacheControl");fL.exports=class{static{o(this,"CachePolicy")}constructor(e,t,{shared:r,cacheHeuristic:s,immutableMinTimeToLive:n,ignoreCargoCult:a,_fromObject:c}={}){if(c){this._fromObject(c);return}if(!t||!t.headers)throw Error("Response headers missing");this._assertRequestHasHeaders(e),this._responseTime=this.now(),this._isShared=r!==!1,this._ignoreCargoCult=!!a,this._cacheHeuristic=s!==void 0?s:.1,this._immutableMinTtl=n!==void 0?n:24*3600*1e3,this._status="status"in t?t.status:200,this._resHeaders=t.headers,this._rescc=Hw(t.headers["cache-control"]),this._method="method"in e?e.method:"GET",this._url=e.url,this._host=e.headers.host,this._noAuthorization=!e.headers.authorization,this._reqHeaders=t.headers.vary?e.headers:null,this._reqcc=Hw(e.headers["cache-control"]),this._ignoreCargoCult&&"pre-check"in this._rescc&&"post-check"in this._rescc&&(delete this._rescc["pre-check"],delete this._rescc["post-check"],delete this._rescc["no-cache"],delete this._rescc["no-store"],delete this._rescc["must-revalidate"],this._resHeaders=Object.assign({},this._resHeaders,{"cache-control":E8(this._rescc)}),delete this._resHeaders.expires,delete this._resHeaders.pragma),t.headers["cache-control"]==null&&/no-cache/.test(t.headers.pragma)&&(this._rescc["no-cache"]=!0)}now(){return Date.now()}storable(){return!!(!this._reqcc["no-store"]&&(this._method==="GET"||this._method==="HEAD"||this._method==="POST"&&this._hasExplicitExpiration())&&p8.has(this._status)&&!this._rescc["no-store"]&&(!this._isShared||!this._rescc.private)&&(!this._isShared||this._noAuthorization||this._allowsStoringAuthenticated())&&(this._resHeaders.expires||this._rescc["max-age"]||this._isShared&&this._rescc["s-maxage"]||this._rescc.public||d8.has(this._status)))}_hasExplicitExpiration(){return!!(this._isShared&&this._rescc["s-maxage"]||this._rescc["max-age"]||this._resHeaders.expires)}_assertRequestHasHeaders(e){if(!e||!e.headers)throw Error("Request headers missing")}satisfiesWithoutRevalidation(e){return!this.evaluateRequest(e).revalidation}_evaluateRequestHitResult(e){return{response:{headers:this.responseHeaders()},revalidation:e}}_evaluateRequestRevalidation(e,t){return{synchronous:t,headers:this.revalidationHeaders(e)}}_evaluateRequestMissResult(e){return{response:void 0,revalidation:this._evaluateRequestRevalidation(e,!0)}}evaluateRequest(e){if(this._assertRequestHasHeaders(e),this._rescc["must-revalidate"])return this._evaluateRequestMissResult(e);if(!this._requestMatches(e,!1))return this._evaluateRequestMissResult(e);let t=Hw(e.headers["cache-control"]);return t["no-cache"]||/no-cache/.test(e.headers.pragma)?this._evaluateRequestMissResult(e):t["max-age"]&&this.age()>lr(t["max-age"])?this._evaluateRequestMissResult(e):t["min-fresh"]&&this.maxAge()-this.age()<lr(t["min-fresh"])?this._evaluateRequestMissResult(e):this.stale()?"max-stale"in t&&(t["max-stale"]===!0||t["max-stale"]>this.age()-this.maxAge())?this._evaluateRequestHitResult(void 0):this.useStaleWhileRevalidate()?this._evaluateRequestHitResult(this._evaluateRequestRevalidation(e,!1)):this._evaluateRequestMissResult(e):this._evaluateRequestHitResult(void 0)}_requestMatches(e,t){return!!((!this._url||this._url===e.url)&&this._host===e.headers.host&&(!e.method||this._method===e.method||t&&e.method==="HEAD")&&this._varyMatches(e))}_allowsStoringAuthenticated(){return!!(this._rescc["must-revalidate"]||this._rescc.public||this._rescc["s-maxage"])}_varyMatches(e){if(!this._resHeaders.vary)return!0;if(this._resHeaders.vary==="*")return!1;let t=this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);for(let r of t)if(e.headers[r]!==this._reqHeaders[r])return!1;return!0}_copyWithoutHopByHopHeaders(e){let t={};for(let r in e)g8[r]||(t[r]=e[r]);if(e.connection){let r=e.connection.trim().split(/\s*,\s*/);for(let s of r)delete t[s]}if(t.warning){let r=t.warning.split(/,/).filter(s=>!/^\s*1[0-9][0-9]/.test(s));r.length?t.warning=r.join(",").trim():delete t.warning}return t}responseHeaders(){let e=this._copyWithoutHopByHopHeaders(this._resHeaders),t=this.age();return t>3600*24&&!this._hasExplicitExpiration()&&this.maxAge()>3600*24&&(e.warning=(e.warning?`${e.warning}, `:"")+'113 - "rfc7234 5.5.4"'),e.age=`${Math.round(t)}`,e.date=new Date(this.now()).toUTCString(),e}date(){let e=Date.parse(this._resHeaders.date);return isFinite(e)?e:this._responseTime}age(){let e=this._ageValue(),t=(this.now()-this._responseTime)/1e3;return e+t}_ageValue(){return lr(this._resHeaders.age)}maxAge(){if(!this.storable()||this._rescc["no-cache"]||this._isShared&&this._resHeaders["set-cookie"]&&!this._rescc.public&&!this._rescc.immutable||this._resHeaders.vary==="*")return 0;if(this._isShared){if(this._rescc["proxy-revalidate"])return 0;if(this._rescc["s-maxage"])return lr(this._rescc["s-maxage"])}if(this._rescc["max-age"])return lr(this._rescc["max-age"]);let e=this._rescc.immutable?this._immutableMinTtl:0,t=this.date();if(this._resHeaders.expires){let r=Date.parse(this._resHeaders.expires);return Number.isNaN(r)||r<t?0:Math.max(e,(r-t)/1e3)}if(this._resHeaders["last-modified"]){let r=Date.parse(this._resHeaders["last-modified"]);if(isFinite(r)&&t>r)return Math.max(e,(t-r)/1e3*this._cacheHeuristic)}return e}timeToLive(){let e=this.maxAge()-this.age(),t=e+lr(this._rescc["stale-if-error"]),r=e+lr(this._rescc["stale-while-revalidate"]);return Math.round(Math.max(0,e,t,r)*1e3)}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+lr(this._rescc["stale-if-error"])>this.age()}useStaleWhileRevalidate(){let e=lr(this._rescc["stale-while-revalidate"]);return e>0&&this.maxAge()+e>this.age()}static fromObject(e){return new this(void 0,void 0,{_fromObject:e})}_fromObject(e){if(this._responseTime)throw Error("Reinitialized");if(!e||e.v!==1)throw Error("Invalid serialization");this._responseTime=e.t,this._isShared=e.sh,this._cacheHeuristic=e.ch,this._immutableMinTtl=e.imm!==void 0?e.imm:24*3600*1e3,this._ignoreCargoCult=!!e.icc,this._status=e.st,this._resHeaders=e.resh,this._rescc=e.rescc,this._method=e.m,this._url=e.u,this._host=e.h,this._noAuthorization=e.a,this._reqHeaders=e.reqh,this._reqcc=e.reqcc}toObject(){return{v:1,t:this._responseTime,sh:this._isShared,ch:this._cacheHeuristic,imm:this._immutableMinTtl,icc:this._ignoreCargoCult,st:this._status,resh:this._resHeaders,rescc:this._rescc,m:this._method,u:this._url,h:this._host,a:this._noAuthorization,reqh:this._reqHeaders,reqcc:this._reqcc}}revalidationHeaders(e){this._assertRequestHasHeaders(e);let t=this._copyWithoutHopByHopHeaders(e.headers);if(delete t["if-range"],!this._requestMatches(e,!0)||!this.storable())return delete t["if-none-match"],delete t["if-modified-since"],t;if(this._resHeaders.etag&&(t["if-none-match"]=t["if-none-match"]?`${t["if-none-match"]}, ${this._resHeaders.etag}`:this._resHeaders.etag),t["accept-ranges"]||t["if-match"]||t["if-unmodified-since"]||this._method&&this._method!="GET"){if(delete t["if-modified-since"],t["if-none-match"]){let s=t["if-none-match"].split(/,/).filter(n=>!/^\s*W\//.test(n));s.length?t["if-none-match"]=s.join(",").trim():delete t["if-none-match"]}}else this._resHeaders["last-modified"]&&!t["if-modified-since"]&&(t["if-modified-since"]=this._resHeaders["last-modified"]);return t}revalidatedPolicy(e,t){if(this._assertRequestHasHeaders(e),this._useStaleIfError()&&S8(t))return{policy:this,modified:!1,matches:!0};if(!t||!t.headers)throw Error("Response headers missing");let r=!1;t.status!==void 0&&t.status!=304?r=!1:t.headers.etag&&!/^\s*W\//.test(t.headers.etag)?r=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===t.headers.etag:this._resHeaders.etag&&t.headers.etag?r=this._resHeaders.etag.replace(/^\s*W\//,"")===t.headers.etag.replace(/^\s*W\//,""):this._resHeaders["last-modified"]?r=this._resHeaders["last-modified"]===t.headers["last-modified"]:!this._resHeaders.etag&&!this._resHeaders["last-modified"]&&!t.headers.etag&&!t.headers["last-modified"]&&(r=!0);let s={shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl,ignoreCargoCult:this._ignoreCargoCult};if(!r)return{policy:new this.constructor(e,t,s),modified:t.status!=304,matches:!1};let n={};for(let c in this._resHeaders)n[c]=c in t.headers&&!y8[c]?t.headers[c]:this._resHeaders[c];let a=Object.assign({},t,{status:this._status,method:this._method,headers:n});return{policy:new this.constructor(e,a,s),modified:!1,matches:!0}}}});var yL=d(($Se,Gw)=>{"use strict";Gw.exports=gL;Gw.exports.preferredCharsets=gL;var w8=/^\s*([^\s;]+)\s*(?:;(.*))?$/;function _8(i){for(var e=i.split(","),t=0,r=0;t<e.length;t++){var s=b8(e[t].trim(),t);s&&(e[r++]=s)}return e.length=r,e}o(_8,"parseAcceptCharset");function b8(i,e){var t=w8.exec(i);if(!t)return null;var r=t[1],s=1;if(t[2])for(var n=t[2].split(";"),a=0;a<n.length;a++){var c=n[a].trim().split("=");if(c[0]==="q"){s=parseFloat(c[1]);break}}return{charset:r,q:s,i:e}}o(b8,"parseCharset");function I8(i,e,t){for(var r={o:-1,q:0,s:0},s=0;s<e.length;s++){var n=O8(i,e[s],t);n&&(r.s-n.s||r.q-n.q||r.o-n.o)<0&&(r=n)}return r}o(I8,"getCharsetPriority");function O8(i,e,t){var r=0;if(e.charset.toLowerCase()===i.toLowerCase())r|=1;else if(e.charset!=="*")return null;return{i:t,o:e.i,q:e.q,s:r}}o(O8,"specify");function gL(i,e){var t=_8(i===void 0?"*":i||"");if(!e)return t.filter(mL).sort(pL).map(v8);var r=e.map(o(function(n,a){return I8(n,t,a)},"getPriority"));return r.filter(mL).sort(pL).map(o(function(n){return e[r.indexOf(n)]},"getCharset"))}o(gL,"preferredCharsets");function pL(i,e){return e.q-i.q||e.s-i.s||i.o-e.o||i.i-e.i||0}o(pL,"compareSpecs");function v8(i){return i.charset}o(v8,"getFullCharset");function mL(i){return i.q>0}o(mL,"isQuality")});var _L=d((VSe,Ww)=>{"use strict";Ww.exports=wL;Ww.exports.preferredEncodings=wL;var C8=/^\s*([^\s;]+)\s*(?:;(.*))?$/;function R8(i){for(var e=i.split(","),t=!1,r=1,s=0,n=0;s<e.length;s++){var a=A8(e[s].trim(),s);a&&(e[n++]=a,t=t||EL("identity",a),r=Math.min(r,a.q||1))}return t||(e[n++]={encoding:"identity",q:r,i:s}),e.length=n,e}o(R8,"parseAcceptEncoding");function A8(i,e){var t=C8.exec(i);if(!t)return null;var r=t[1],s=1;if(t[2])for(var n=t[2].split(";"),a=0;a<n.length;a++){var c=n[a].trim().split("=");if(c[0]==="q"){s=parseFloat(c[1]);break}}return{encoding:r,q:s,i:e}}o(A8,"parseEncoding");function T8(i,e,t){for(var r={encoding:i,o:-1,q:0,s:0},s=0;s<e.length;s++){var n=EL(i,e[s],t);n&&(r.s-n.s||r.q-n.q||r.o-n.o)<0&&(r=n)}return r}o(T8,"getEncodingPriority");function EL(i,e,t){var r=0;if(e.encoding.toLowerCase()===i.toLowerCase())r|=1;else if(e.encoding!=="*")return null;return{encoding:i,i:t,o:e.i,q:e.q,s:r}}o(EL,"specify");function wL(i,e,t){var r=R8(i||""),s=t?o(function(c,u){if(c.q!==u.q)return u.q-c.q;var l=t.indexOf(c.encoding),h=t.indexOf(u.encoding);return l===-1&&h===-1?u.s-c.s||c.o-u.o||c.i-u.i:l!==-1&&h!==-1?l-h:l===-1?1:-1},"comparator"):N8;if(!e)return r.filter(SL).sort(s).map(P8);var n=e.map(o(function(c,u){return T8(c,r,u)},"getPriority"));return n.filter(SL).sort(s).map(o(function(c){return e[n.indexOf(c)]},"getEncoding"))}o(wL,"preferredEncodings");function N8(i,e){return e.q-i.q||e.s-i.s||i.o-e.o||i.i-e.i}o(N8,"compareSpecs");function P8(i){return i.encoding}o(P8,"getFullEncoding");function SL(i){return i.q>0}o(SL,"isQuality")});var CL=d((HSe,Jw)=>{"use strict";Jw.exports=vL;Jw.exports.preferredLanguages=vL;var D8=/^\s*([^\s\-;]+)(?:-([^\s;]+))?\s*(?:;(.*))?$/;function x8(i){for(var e=i.split(","),t=0,r=0;t<e.length;t++){var s=OL(e[t].trim(),t);s&&(e[r++]=s)}return e.length=r,e}o(x8,"parseAcceptLanguage");function OL(i,e){var t=D8.exec(i);if(!t)return null;var r=t[1],s=t[2],n=r;s&&(n+="-"+s);var a=1;if(t[3])for(var c=t[3].split(";"),u=0;u<c.length;u++){var l=c[u].split("=");l[0]==="q"&&(a=parseFloat(l[1]))}return{prefix:r,suffix:s,q:a,i:e,full:n}}o(OL,"parseLanguage");function L8(i,e,t){for(var r={o:-1,q:0,s:0},s=0;s<e.length;s++){var n=M8(i,e[s],t);n&&(r.s-n.s||r.q-n.q||r.o-n.o)<0&&(r=n)}return r}o(L8,"getLanguagePriority");function M8(i,e,t){var r=OL(i);if(!r)return null;var s=0;if(e.full.toLowerCase()===r.full.toLowerCase())s|=4;else if(e.prefix.toLowerCase()===r.full.toLowerCase())s|=2;else if(e.full.toLowerCase()===r.prefix.toLowerCase())s|=1;else if(e.full!=="*")return null;return{i:t,o:e.i,q:e.q,s}}o(M8,"specify");function vL(i,e){var t=x8(i===void 0?"*":i||"");if(!e)return t.filter(IL).sort(bL).map(B8);var r=e.map(o(function(n,a){return L8(n,t,a)},"getPriority"));return r.filter(IL).sort(bL).map(o(function(n){return e[r.indexOf(n)]},"getLanguage"))}o(vL,"preferredLanguages");function bL(i,e){return e.q-i.q||e.s-i.s||i.o-e.o||i.i-e.i||0}o(bL,"compareSpecs");function B8(i){return i.full}o(B8,"getFullLanguage");function IL(i){return i.q>0}o(IL,"isQuality")});var DL=d((WSe,Kw)=>{"use strict";Kw.exports=NL;Kw.exports.preferredMediaTypes=NL;var k8=/^\s*([^\s\/;]+)\/([^;\s]+)\s*(?:;(.*))?$/;function F8(i){for(var e=V8(i),t=0,r=0;t<e.length;t++){var s=TL(e[t].trim(),t);s&&(e[r++]=s)}return e.length=r,e}o(F8,"parseAccept");function TL(i,e){var t=k8.exec(i);if(!t)return null;var r=Object.create(null),s=1,n=t[2],a=t[1];if(t[3])for(var c=z8(t[3]).map(q8),u=0;u<c.length;u++){var l=c[u],h=l[0].toLowerCase(),f=l[1],p=f&&f[0]==='"'&&f[f.length-1]==='"'?f.slice(1,-1):f;if(h==="q"){s=parseFloat(p);break}r[h]=p}return{type:a,subtype:n,params:r,q:s,i:e}}o(TL,"parseMediaType");function U8(i,e,t){for(var r={o:-1,q:0,s:0},s=0;s<e.length;s++){var n=j8(i,e[s],t);n&&(r.s-n.s||r.q-n.q||r.o-n.o)<0&&(r=n)}return r}o(U8,"getMediaTypePriority");function j8(i,e,t){var r=TL(i),s=0;if(!r)return null;if(e.type.toLowerCase()==r.type.toLowerCase())s|=4;else if(e.type!="*")return null;if(e.subtype.toLowerCase()==r.subtype.toLowerCase())s|=2;else if(e.subtype!="*")return null;var n=Object.keys(e.params);if(n.length>0)if(n.every(function(a){return e.params[a]=="*"||(e.params[a]||"").toLowerCase()==(r.params[a]||"").toLowerCase()}))s|=1;else return null;return{i:t,o:e.i,q:e.q,s}}o(j8,"specify");function NL(i,e){var t=F8(i===void 0?"*/*":i||"");if(!e)return t.filter(AL).sort(RL).map($8);var r=e.map(o(function(n,a){return U8(n,t,a)},"getPriority"));return r.filter(AL).sort(RL).map(o(function(n){return e[r.indexOf(n)]},"getType"))}o(NL,"preferredMediaTypes");function RL(i,e){return e.q-i.q||e.s-i.s||i.o-e.o||i.i-e.i||0}o(RL,"compareSpecs");function $8(i){return i.type+"/"+i.subtype}o($8,"getFullType");function AL(i){return i.q>0}o(AL,"isQuality");function PL(i){for(var e=0,t=0;(t=i.indexOf('"',t))!==-1;)e++,t++;return e}o(PL,"quoteCount");function q8(i){var e=i.indexOf("="),t,r;return e===-1?t=i:(t=i.slice(0,e),r=i.slice(e+1)),[t,r]}o(q8,"splitKeyValuePair");function V8(i){for(var e=i.split(","),t=1,r=0;t<e.length;t++)PL(e[r])%2==0?e[++r]=e[t]:e[r]+=","+e[t];return e.length=r+1,e}o(V8,"splitMediaTypes");function z8(i){for(var e=i.split(";"),t=1,r=0;t<e.length;t++)PL(e[r])%2==0?e[++r]=e[t]:e[r]+=";"+e[t];e.length=r+1;for(var t=0;t<e.length;t++)e[t]=e[t].trim();return e}o(z8,"splitParameters")});var xL=d((KSe,Zw)=>{"use strict";var H8=yL(),G8=_L(),W8=CL(),J8=DL();Zw.exports=Y;Zw.exports.Negotiator=Y;function Y(i){if(!(this instanceof Y))return new Y(i);this.request=i}o(Y,"Negotiator");Y.prototype.charset=o(function(e){var t=this.charsets(e);return t&&t[0]},"charset");Y.prototype.charsets=o(function(e){return H8(this.request.headers["accept-charset"],e)},"charsets");Y.prototype.encoding=o(function(e,t){var r=this.encodings(e,t);return r&&r[0]},"encoding");Y.prototype.encodings=o(function(e,t){var r=t||{};return G8(this.request.headers["accept-encoding"],e,r.preferred)},"encodings");Y.prototype.language=o(function(e){var t=this.languages(e);return t&&t[0]},"language");Y.prototype.languages=o(function(e){return W8(this.request.headers["accept-language"],e)},"languages");Y.prototype.mediaType=o(function(e){var t=this.mediaTypes(e);return t&&t[0]},"mediaType");Y.prototype.mediaTypes=o(function(e){return J8(this.request.headers.accept,e)},"mediaTypes");Y.prototype.preferredCharset=Y.prototype.charset;Y.prototype.preferredCharsets=Y.prototype.charsets;Y.prototype.preferredEncoding=Y.prototype.encoding;Y.prototype.preferredEncodings=Y.prototype.encodings;Y.prototype.preferredLanguage=Y.prototype.language;Y.prototype.preferredLanguages=Y.prototype.languages;Y.prototype.preferredMediaType=Y.prototype.mediaType;Y.prototype.preferredMediaTypes=Y.prototype.mediaTypes});var Xw=d((YSe,FL)=>{var LL=dL(),ML=xL(),K8=hi(),BL={shared:!1,ignoreCargoCult:!0},Z8={status:200,headers:{}},vo=o(i=>{let e={method:i.method,url:i.url,headers:{},compress:i.compress};return i.headers.forEach((t,r)=>{e.headers[r]=t}),e},"requestObject"),kL=o(i=>{let e={status:i.status,headers:{}};return i.headers.forEach((t,r)=>{e.headers[r]=t}),e},"responseObject"),Yw=class{static{o(this,"CachePolicy")}constructor({entry:e,request:t,response:r,options:s}){this.entry=e,this.request=vo(t),this.response=kL(r),this.options=s,this.policy=new LL(this.request,this.response,BL),this.entry&&(this.policy._responseTime=this.entry.metadata.time)}static storable(e,t){return!t.cachePath||t.cache==="no-store"||!["GET","HEAD"].includes(e.method)?!1:new LL(vo(e),Z8,BL).storable()}satisfies(e){let t=vo(e);if(this.request.headers.host!==t.headers.host||this.request.compress!==t.compress)return!1;let r=new ML(this.request),s=new ML(t);return JSON.stringify(r.mediaTypes())!==JSON.stringify(s.mediaTypes())||JSON.stringify(r.languages())!==JSON.stringify(s.languages())||JSON.stringify(r.encodings())!==JSON.stringify(s.encodings())?!1:this.options.integrity?K8.parse(this.options.integrity).match(this.entry.integrity):!0}storable(){return this.policy.storable()}get mustRevalidate(){return!!this.policy._rescc["must-revalidate"]}needsRevalidation(e){let t=vo(e);return t.method="GET",!this.policy.satisfiesWithoutRevalidation(t)}responseHeaders(){return this.policy.responseHeaders()}revalidationHeaders(e){let t=vo(e);return this.policy.revalidationHeaders(t)}revalidated(e,t){let r=vo(e),s=kL(t);return!this.policy.revalidatedPolicy(r,s).modified}};FL.exports=Yw});var jL=d((QSe,UL)=>{var Qw=class extends Error{static{o(this,"NotCachedError")}constructor(e){super(`request to ${e} failed: cache mode is 'only-if-cached' but no cached response is available.`),this.code="ENOTCACHED"}};UL.exports={NotCachedError:Qw}});var t_=d((tEe,$L)=>{"use strict";var Y8=Tn(),e_=class extends Y8{static{o(this,"CachingMinipassPipeline")}#e=[];#t=new Map;constructor(e,...t){super(),this.#e=e.events,t.length&&this.push(...t)}on(e,t){return this.#e.includes(e)&&this.#t.has(e)?t(...this.#t.get(e)):super.on(e,t)}emit(e,...t){return this.#e.includes(e)&&this.#t.set(e,t),super.emit(e,...t)}};$L.exports=e_});var VL=d((rEe,qL)=>{var{URL:X8,format:Q8}=require("url"),eQ={auth:!1,fragment:!1,search:!0,unicode:!1},tQ=o(i=>{let e=new X8(i.url);return`make-fetch-happen:request-cache:${Q8(e,eQ)}`},"cacheKey");qL.exports=tQ});var i_=d((nEe,HL)=>{"use strict";var{LRUCache:iQ}=hs(),zL=require("dns"),cd=new iQ({max:50}),rQ=o(({family:i=0,hints:e=zL.ADDRCONFIG,all:t=!1,verbatim:r=void 0,ttl:s=300*1e3,lookup:n=zL.lookup})=>({hints:e,lookup:o((a,...c)=>{let u=c.pop(),l=c[0]??{},h={family:i,hints:e,all:t,verbatim:r,...typeof l=="number"?{family:l}:l},f=JSON.stringify({hostname:a,...h});if(cd.has(f)){let p=cd.get(f);return process.nextTick(u,null,...p)}n(a,h,(p,...m)=>p?u(p):(cd.set(f,m,{ttl:s}),u(null,...m)))},"lookup")}),"getOptions");HL.exports={cache:cd,getOptions:rQ}});var r_=d((aEe,WL)=>{"use strict";var sQ=i_(),nQ=o(i=>{let e=parseInt(i.family??"0",10),t=i.keepAlive??!0,r={keepAliveMsecs:t?1e3:void 0,maxSockets:i.maxSockets??15,maxTotalSockets:1/0,maxFreeSockets:t?256:void 0,scheduling:"fifo",...i,family:e,keepAlive:t,timeouts:{idle:i.timeout??0,connection:0,response:0,transfer:0,...i.timeouts},...sQ.getOptions({family:e,...i.dns})};return delete r.timeout,r},"normalizeOptions"),GL=o(i=>{let e="",t=Object.entries(i).sort((r,s)=>r[0]-s[0]);for(let[r,s]of t)s==null?s="null":s instanceof URL?s=s.toString():typeof s=="object"&&(s=GL(s)),e+=`${r}:${s}:`;return e},"createKey"),oQ=o(({secureEndpoint:i,...e})=>GL({secureEndpoint:!!i,family:e.family,hints:e.hints,localAddress:e.localAddress,strictSsl:i?!!e.rejectUnauthorized:!1,ca:i?e.ca:null,cert:i?e.cert:null,key:i?e.key:null,keepAlive:e.keepAlive,keepAliveMsecs:e.keepAliveMsecs,maxSockets:e.maxSockets,maxTotalSockets:e.maxTotalSockets,maxFreeSockets:e.maxFreeSockets,scheduling:e.scheduling,timeouts:e.timeouts,proxy:e.proxy}),"cacheOptions");WL.exports={normalizeOptions:nQ,cacheOptions:oQ}});var KL=d((uEe,JL)=>{var Co=1e3,Ro=Co*60,Ao=Ro*60,Vs=Ao*24,aQ=Vs*7,cQ=Vs*365.25;JL.exports=function(i,e){e=e||{};var t=typeof i;if(t==="string"&&i.length>0)return uQ(i);if(t==="number"&&isFinite(i))return e.long?hQ(i):lQ(i);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(i))};function uQ(i){if(i=String(i),!(i.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(i);if(e){var t=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return t*cQ;case"weeks":case"week":case"w":return t*aQ;case"days":case"day":case"d":return t*Vs;case"hours":case"hour":case"hrs":case"hr":case"h":return t*Ao;case"minutes":case"minute":case"mins":case"min":case"m":return t*Ro;case"seconds":case"second":case"secs":case"sec":case"s":return t*Co;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}o(uQ,"parse");function lQ(i){var e=Math.abs(i);return e>=Vs?Math.round(i/Vs)+"d":e>=Ao?Math.round(i/Ao)+"h":e>=Ro?Math.round(i/Ro)+"m":e>=Co?Math.round(i/Co)+"s":i+"ms"}o(lQ,"fmtShort");function hQ(i){var e=Math.abs(i);return e>=Vs?ud(i,e,Vs,"day"):e>=Ao?ud(i,e,Ao,"hour"):e>=Ro?ud(i,e,Ro,"minute"):e>=Co?ud(i,e,Co,"second"):i+" ms"}o(hQ,"fmtLong");function ud(i,e,t,r){var s=e>=t*1.5;return Math.round(i/t)+" "+r+(s?"s":"")}o(ud,"plural")});var s_=d((hEe,ZL)=>{function fQ(i){t.debug=t,t.default=t,t.coerce=u,t.disable=a,t.enable=s,t.enabled=c,t.humanize=KL(),t.destroy=l,Object.keys(i).forEach(h=>{t[h]=i[h]}),t.names=[],t.skips=[],t.formatters={};function e(h){let f=0;for(let p=0;p<h.length;p++)f=(f<<5)-f+h.charCodeAt(p),f|=0;return t.colors[Math.abs(f)%t.colors.length]}o(e,"selectColor"),t.selectColor=e;function t(h){let f,p=null,m,y;function g(...S){if(!g.enabled)return;let E=g,_=Number(new Date),b=_-(f||_);E.diff=b,E.prev=f,E.curr=_,f=_,S[0]=t.coerce(S[0]),typeof S[0]!="string"&&S.unshift("%O");let w=0;S[0]=S[0].replace(/%([a-zA-Z%])/g,(v,N)=>{if(v==="%%")return"%";w++;let P=t.formatters[N];if(typeof P=="function"){let U=S[w];v=P.call(E,U),S.splice(w,1),w--}return v}),t.formatArgs.call(E,S),(E.log||t.log).apply(E,S)}return o(g,"debug"),g.namespace=h,g.useColors=t.useColors(),g.color=t.selectColor(h),g.extend=r,g.destroy=t.destroy,Object.defineProperty(g,"enabled",{enumerable:!0,configurable:!1,get:o(()=>p!==null?p:(m!==t.namespaces&&(m=t.namespaces,y=t.enabled(h)),y),"get"),set:o(S=>{p=S},"set")}),typeof t.init=="function"&&t.init(g),g}o(t,"createDebug");function r(h,f){let p=t(this.namespace+(typeof f>"u"?":":f)+h);return p.log=this.log,p}o(r,"extend");function s(h){t.save(h),t.namespaces=h,t.names=[],t.skips=[];let f=(typeof h=="string"?h:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let p of f)p[0]==="-"?t.skips.push(p.slice(1)):t.names.push(p)}o(s,"enable");function n(h,f){let p=0,m=0,y=-1,g=0;for(;p<h.length;)if(m<f.length&&(f[m]===h[p]||f[m]==="*"))f[m]==="*"?(y=m,g=p,m++):(p++,m++);else if(y!==-1)m=y+1,g++,p=g;else return!1;for(;m<f.length&&f[m]==="*";)m++;return m===f.length}o(n,"matchesTemplate");function a(){let h=[...t.names,...t.skips.map(f=>"-"+f)].join(",");return t.enable(""),h}o(a,"disable");function c(h){for(let f of t.skips)if(n(h,f))return!1;for(let f of t.names)if(n(h,f))return!0;return!1}o(c,"enabled");function u(h){return h instanceof Error?h.stack||h.message:h}o(u,"coerce");function l(){}return o(l,"destroy"),t.enable(t.load()),t}o(fQ,"setup");ZL.exports=fQ});var YL=d((rt,ld)=>{rt.formatArgs=pQ;rt.save=mQ;rt.load=gQ;rt.useColors=dQ;rt.storage=yQ();rt.destroy=(()=>{let i=!1;return()=>{i||(i=!0)}})();rt.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function dQ(){let i;return!1}o(dQ,"useColors");function pQ(i){if(i[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+i[0]+(this.useColors?"%c ":" ")+"+"+ld.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;i.splice(1,0,e,"color: inherit");let t=0,r=0;i[0].replace(/%[a-zA-Z%]/g,s=>{s!=="%%"&&(t++,s==="%c"&&(r=t))}),i.splice(r,0,e)}o(pQ,"formatArgs");rt.log=console.debug||console.log||(()=>{});function mQ(i){try{i?rt.storage.setItem("debug",i):rt.storage.removeItem("debug")}catch{}}o(mQ,"save");function gQ(){let i;try{i=rt.storage.getItem("debug")||rt.storage.getItem("DEBUG")}catch{}return!i&&typeof process<"u"&&"env"in process&&(i=void 0),i}o(gQ,"load");function yQ(){try{return}catch{}}o(yQ,"localstorage");ld.exports=s_()(rt);var{formatters:SQ}=ld.exports;SQ.j=function(i){try{return JSON.stringify(i)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var QL=d((pEe,XL)=>{"use strict";XL.exports=(i,e=process.argv)=>{let t=i.startsWith("-")?"":i.length===1?"-":"--",r=e.indexOf(t+i),s=e.indexOf("--");return r!==-1&&(s===-1||r<s)}});var iM=d((mEe,tM)=>{"use strict";var EQ=require("os"),eM=require("tty"),xt=QL(),{env:Te}=process,qr;xt("no-color")||xt("no-colors")||xt("color=false")||xt("color=never")?qr=0:(xt("color")||xt("colors")||xt("color=true")||xt("color=always"))&&(qr=1);"FORCE_COLOR"in Te&&(Te.FORCE_COLOR==="true"?qr=1:Te.FORCE_COLOR==="false"?qr=0:qr=Te.FORCE_COLOR.length===0?1:Math.min(parseInt(Te.FORCE_COLOR,10),3));function n_(i){return i===0?!1:{level:i,hasBasic:!0,has256:i>=2,has16m:i>=3}}o(n_,"translateLevel");function o_(i,e){if(qr===0)return 0;if(xt("color=16m")||xt("color=full")||xt("color=truecolor"))return 3;if(xt("color=256"))return 2;if(i&&!e&&qr===void 0)return 0;let t=qr||0;if(Te.TERM==="dumb")return t;if(process.platform==="win32"){let r=EQ.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in Te)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(r=>r in Te)||Te.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in Te)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Te.TEAMCITY_VERSION)?1:0;if(Te.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Te){let r=parseInt((Te.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Te.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Te.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Te.TERM)||"COLORTERM"in Te?1:t}o(o_,"supportsColor");function wQ(i){let e=o_(i,i&&i.isTTY);return n_(e)}o(wQ,"getSupportLevel");tM.exports={supportsColor:wQ,stdout:n_(o_(!0,eM.isatty(1))),stderr:n_(o_(!0,eM.isatty(2)))}});var sM=d((Ne,fd)=>{var _Q=require("tty"),hd=require("util");Ne.init=AQ;Ne.log=vQ;Ne.formatArgs=IQ;Ne.save=CQ;Ne.load=RQ;Ne.useColors=bQ;Ne.destroy=hd.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Ne.colors=[6,2,3,4,5,1];try{let i=iM();i&&(i.stderr||i).level>=2&&(Ne.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}Ne.inspectOpts=Object.keys(process.env).filter(i=>/^debug_/i.test(i)).reduce((i,e)=>{let t=e.substring(6).toLowerCase().replace(/_([a-z])/g,(s,n)=>n.toUpperCase()),r=process.env[e];return/^(yes|on|true|enabled)$/i.test(r)?r=!0:/^(no|off|false|disabled)$/i.test(r)?r=!1:r==="null"?r=null:r=Number(r),i[t]=r,i},{});function bQ(){return"colors"in Ne.inspectOpts?!!Ne.inspectOpts.colors:_Q.isatty(process.stderr.fd)}o(bQ,"useColors");function IQ(i){let{namespace:e,useColors:t}=this;if(t){let r=this.color,s="\x1B[3"+(r<8?r:"8;5;"+r),n=` ${s};1m${e} \x1B[0m`;i[0]=n+i[0].split(`
44
+ `).join(`
45
+ `+n),i.push(s+"m+"+fd.exports.humanize(this.diff)+"\x1B[0m")}else i[0]=OQ()+e+" "+i[0]}o(IQ,"formatArgs");function OQ(){return Ne.inspectOpts.hideDate?"":new Date().toISOString()+" "}o(OQ,"getDate");function vQ(...i){return process.stderr.write(hd.formatWithOptions(Ne.inspectOpts,...i)+`
46
+ `)}o(vQ,"log");function CQ(i){i?process.env.DEBUG=i:delete void 0}o(CQ,"save");function RQ(){}o(RQ,"load");function AQ(i){i.inspectOpts={};let e=Object.keys(Ne.inspectOpts);for(let t=0;t<e.length;t++)i.inspectOpts[e[t]]=Ne.inspectOpts[e[t]]}o(AQ,"init");fd.exports=s_()(Ne);var{formatters:rM}=fd.exports;rM.o=function(i){return this.inspectOpts.colors=this.useColors,hd.inspect(i,this.inspectOpts).split(`
47
+ `).map(e=>e.trim()).join(" ")};rM.O=function(i){return this.inspectOpts.colors=this.useColors,hd.inspect(i,this.inspectOpts)}});var zs=d((SEe,a_)=>{typeof process>"u"||process.type==="renderer"||process.__nwjs?a_.exports=YL():a_.exports=sM()});var aM=d(st=>{"use strict";var TQ=st&&st.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(i,r,s)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),NQ=st&&st.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),nM=st&&st.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&TQ(e,i,t);return NQ(e,i),e};Object.defineProperty(st,"__esModule",{value:!0});st.req=st.json=st.toBuffer=void 0;var PQ=nM(require("http")),DQ=nM(require("https"));async function oM(i){let e=0,t=[];for await(let r of i)e+=r.length,t.push(r);return Buffer.concat(t,e)}o(oM,"toBuffer");st.toBuffer=oM;async function xQ(i){let t=(await oM(i)).toString("utf8");try{return JSON.parse(t)}catch(r){let s=r;throw s.message+=` (input: ${t})`,s}}o(xQ,"json");st.json=xQ;function LQ(i,e={}){let r=((typeof i=="string"?i:i.href).startsWith("https:")?DQ:PQ).request(i,e),s=new Promise((n,a)=>{r.once("response",n).once("error",a).end()});return r.then=s.then.bind(s),r}o(LQ,"req");st.req=LQ});var nu=d(St=>{"use strict";var uM=St&&St.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(i,r,s)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),MQ=St&&St.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),lM=St&&St.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&uM(e,i,t);return MQ(e,i),e},BQ=St&&St.__exportStar||function(i,e){for(var t in i)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&uM(e,i,t)};Object.defineProperty(St,"__esModule",{value:!0});St.Agent=void 0;var kQ=lM(require("net")),cM=lM(require("http")),FQ=require("https");BQ(aM(),St);var vi=Symbol("AgentBaseInternalState"),c_=class extends cM.Agent{static{o(this,"Agent")}constructor(e){super(e),this[vi]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:t}=new Error;return typeof t!="string"?!1:t.split(`
48
+ `).some(r=>r.indexOf("(https.js:")!==-1||r.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let t=new kQ.Socket({writable:!1});return this.sockets[e].push(t),this.totalSocketCount++,t}decrementSockets(e,t){if(!this.sockets[e]||t===null)return;let r=this.sockets[e],s=r.indexOf(t);s!==-1&&(r.splice(s,1),this.totalSocketCount--,r.length===0&&delete this.sockets[e])}getName(e){return this.isSecureEndpoint(e)?FQ.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,t,r){let s={...t,secureEndpoint:this.isSecureEndpoint(t)},n=this.getName(s),a=this.incrementSockets(n);Promise.resolve().then(()=>this.connect(e,s)).then(c=>{if(this.decrementSockets(n,a),c instanceof cM.Agent)try{return c.addRequest(e,s)}catch(u){return r(u)}this[vi].currentSocket=c,super.createSocket(e,t,r)},c=>{this.decrementSockets(n,a),r(c)})}createConnection(){let e=this[vi].currentSocket;if(this[vi].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[vi].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[vi]&&(this[vi].defaultPort=e)}get protocol(){return this[vi].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[vi]&&(this[vi].protocol=e)}};St.Agent=c_});var dM=d(Lt=>{"use strict";var UQ=Lt&&Lt.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(i,r,s)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),jQ=Lt&&Lt.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),fM=Lt&&Lt.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&UQ(e,i,t);return jQ(e,i),e},$Q=Lt&&Lt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Lt,"__esModule",{value:!0});Lt.HttpProxyAgent=void 0;var qQ=fM(require("net")),VQ=fM(require("tls")),zQ=$Q(zs()),HQ=require("events"),GQ=nu(),hM=require("url"),To=(0,zQ.default)("http-proxy-agent"),dd=class extends GQ.Agent{static{o(this,"HttpProxyAgent")}constructor(e,t){super(t),this.proxy=typeof e=="string"?new hM.URL(e):e,this.proxyHeaders=t?.headers??{},To("Creating new HttpProxyAgent instance: %o",this.proxy.href);let r=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),s=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={...t?WQ(t,"headers"):null,host:r,port:s}}addRequest(e,t){e._header=null,this.setRequestProps(e,t),super.addRequest(e,t)}setRequestProps(e,t){let{proxy:r}=this,s=t.secureEndpoint?"https:":"http:",n=e.getHeader("host")||"localhost",a=`${s}//${n}`,c=new hM.URL(e.path,a);t.port!==80&&(c.port=String(t.port)),e.path=String(c);let u=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders};if(r.username||r.password){let l=`${decodeURIComponent(r.username)}:${decodeURIComponent(r.password)}`;u["Proxy-Authorization"]=`Basic ${Buffer.from(l).toString("base64")}`}u["Proxy-Connection"]||(u["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let l of Object.keys(u)){let h=u[l];h&&e.setHeader(l,h)}}async connect(e,t){e._header=null,e.path.includes("://")||this.setRequestProps(e,t);let r,s;To("Regenerating stored HTTP header string for request"),e._implicitHeader(),e.outputData&&e.outputData.length>0&&(To("Patching connection write() output buffer with updated header"),r=e.outputData[0].data,s=r.indexOf(`\r
49
+ \r
50
+ `)+4,e.outputData[0].data=e._header+r.substring(s),To("Output buffer: %o",e.outputData[0].data));let n;return this.proxy.protocol==="https:"?(To("Creating `tls.Socket`: %o",this.connectOpts),n=VQ.connect(this.connectOpts)):(To("Creating `net.Socket`: %o",this.connectOpts),n=qQ.connect(this.connectOpts)),await(0,HQ.once)(n,"connect"),n}};dd.protocols=["http","https"];Lt.HttpProxyAgent=dd;function WQ(i,...e){let t={},r;for(r in i)e.includes(r)||(t[r]=i[r]);return t}o(WQ,"omit")});var pM=d(No=>{"use strict";var JQ=No&&No.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(No,"__esModule",{value:!0});No.parseProxyResponse=void 0;var KQ=JQ(zs()),pd=(0,KQ.default)("https-proxy-agent:parse-proxy-response");function ZQ(i){return new Promise((e,t)=>{let r=0,s=[];function n(){let h=i.read();h?l(h):i.once("readable",n)}o(n,"read");function a(){i.removeListener("end",c),i.removeListener("error",u),i.removeListener("readable",n)}o(a,"cleanup");function c(){a(),pd("onend"),t(new Error("Proxy connection ended before receiving CONNECT response"))}o(c,"onend");function u(h){a(),pd("onerror %o",h),t(h)}o(u,"onerror");function l(h){s.push(h),r+=h.length;let f=Buffer.concat(s,r),p=f.indexOf(`\r
51
+ \r
52
+ `);if(p===-1){pd("have not received end of HTTP headers yet..."),n();return}let m=f.slice(0,p).toString("ascii").split(`\r
53
+ `),y=m.shift();if(!y)return i.destroy(),t(new Error("No header received from proxy CONNECT response"));let g=y.split(" "),S=+g[1],E=g.slice(2).join(" "),_={};for(let b of m){if(!b)continue;let w=b.indexOf(":");if(w===-1)return i.destroy(),t(new Error(`Invalid header from proxy CONNECT response: "${b}"`));let I=b.slice(0,w).toLowerCase(),v=b.slice(w+1).trimStart(),N=_[I];typeof N=="string"?_[I]=[N,v]:Array.isArray(N)?N.push(v):_[I]=v}pd("got proxy server response: %o %o",y,_),a(),e({connect:{statusCode:S,statusText:E,headers:_},buffered:f})}o(l,"ondata"),i.on("error",u),i.on("end",c),n()})}o(ZQ,"parseProxyResponse");No.parseProxyResponse=ZQ});var wM=d(Mt=>{"use strict";var YQ=Mt&&Mt.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(i,r,s)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),XQ=Mt&&Mt.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),SM=Mt&&Mt.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&YQ(e,i,t);return XQ(e,i),e},EM=Mt&&Mt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Mt,"__esModule",{value:!0});Mt.HttpsProxyAgent=void 0;var md=SM(require("net")),mM=SM(require("tls")),QQ=EM(require("assert")),e7=EM(zs()),t7=nu(),i7=require("url"),r7=pM(),ou=(0,e7.default)("https-proxy-agent"),gM=o(i=>i.servername===void 0&&i.host&&!md.isIP(i.host)?{...i,servername:i.host}:i,"setServernameFromNonIpHost"),gd=class extends t7.Agent{static{o(this,"HttpsProxyAgent")}constructor(e,t){super(t),this.options={path:void 0},this.proxy=typeof e=="string"?new i7.URL(e):e,this.proxyHeaders=t?.headers??{},ou("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let r=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),s=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...t?yM(t,"headers"):null,host:r,port:s}}async connect(e,t){let{proxy:r}=this;if(!t.host)throw new TypeError('No "host" provided');let s;r.protocol==="https:"?(ou("Creating `tls.Socket`: %o",this.connectOpts),s=mM.connect(gM(this.connectOpts))):(ou("Creating `net.Socket`: %o",this.connectOpts),s=md.connect(this.connectOpts));let n=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},a=md.isIPv6(t.host)?`[${t.host}]`:t.host,c=`CONNECT ${a}:${t.port} HTTP/1.1\r
54
+ `;if(r.username||r.password){let p=`${decodeURIComponent(r.username)}:${decodeURIComponent(r.password)}`;n["Proxy-Authorization"]=`Basic ${Buffer.from(p).toString("base64")}`}n.Host=`${a}:${t.port}`,n["Proxy-Connection"]||(n["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let p of Object.keys(n))c+=`${p}: ${n[p]}\r
55
+ `;let u=(0,r7.parseProxyResponse)(s);s.write(`${c}\r
56
+ `);let{connect:l,buffered:h}=await u;if(e.emit("proxyConnect",l),this.emit("proxyConnect",l,e),l.statusCode===200)return e.once("socket",s7),t.secureEndpoint?(ou("Upgrading socket connection to TLS"),mM.connect({...yM(gM(t),"host","path","port"),socket:s})):s;s.destroy();let f=new md.Socket({writable:!1});return f.readable=!0,e.once("socket",p=>{ou("Replaying proxy buffer for failed request"),(0,QQ.default)(p.listenerCount("data")>0),p.push(h),p.push(null)}),f}};gd.protocols=["http","https"];Mt.HttpsProxyAgent=gd;function s7(i){i.resume()}o(s7,"resume");function yM(i,...e){let t={},r;for(r in i)e.includes(r)||(t[r]=i[r]);return t}o(yM,"omit")});var OM=d(hr=>{"use strict";Object.defineProperty(hr,"__esModule",{value:!0});var _M=require("buffer"),Hs={INVALID_ENCODING:"Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.",INVALID_SMARTBUFFER_SIZE:"Invalid size provided. Size must be a valid integer greater than zero.",INVALID_SMARTBUFFER_BUFFER:"Invalid Buffer provided in SmartBufferOptions.",INVALID_SMARTBUFFER_OBJECT:"Invalid SmartBufferOptions object supplied to SmartBuffer constructor or factory methods.",INVALID_OFFSET:"An invalid offset value was provided.",INVALID_OFFSET_NON_NUMBER:"An invalid offset value was provided. A numeric value is required.",INVALID_LENGTH:"An invalid length value was provided.",INVALID_LENGTH_NON_NUMBER:"An invalid length value was provived. A numeric value is required.",INVALID_TARGET_OFFSET:"Target offset is beyond the bounds of the internal SmartBuffer data.",INVALID_TARGET_LENGTH:"Specified length value moves cursor beyong the bounds of the internal SmartBuffer data.",INVALID_READ_BEYOND_BOUNDS:"Attempted to read beyond the bounds of the managed data.",INVALID_WRITE_BEYOND_BOUNDS:"Attempted to write beyond the bounds of the managed data."};hr.ERRORS=Hs;function n7(i){if(!_M.Buffer.isEncoding(i))throw new Error(Hs.INVALID_ENCODING)}o(n7,"checkEncoding");hr.checkEncoding=n7;function bM(i){return typeof i=="number"&&isFinite(i)&&u7(i)}o(bM,"isFiniteInteger");hr.isFiniteInteger=bM;function IM(i,e){if(typeof i=="number"){if(!bM(i)||i<0)throw new Error(e?Hs.INVALID_OFFSET:Hs.INVALID_LENGTH)}else throw new Error(e?Hs.INVALID_OFFSET_NON_NUMBER:Hs.INVALID_LENGTH_NON_NUMBER)}o(IM,"checkOffsetOrLengthValue");function o7(i){IM(i,!1)}o(o7,"checkLengthValue");hr.checkLengthValue=o7;function a7(i){IM(i,!0)}o(a7,"checkOffsetValue");hr.checkOffsetValue=a7;function c7(i,e){if(i<0||i>e.length)throw new Error(Hs.INVALID_TARGET_OFFSET)}o(c7,"checkTargetOffset");hr.checkTargetOffset=c7;function u7(i){return typeof i=="number"&&isFinite(i)&&Math.floor(i)===i}o(u7,"isInteger");function l7(i){if(typeof BigInt>"u")throw new Error("Platform does not support JS BigInt type.");if(typeof _M.Buffer.prototype[i]>"u")throw new Error(`Platform does not support Buffer.prototype.${i}.`)}o(l7,"bigIntAndBufferInt64Check");hr.bigIntAndBufferInt64Check=l7});var CM=d(l_=>{"use strict";Object.defineProperty(l_,"__esModule",{value:!0});var F=OM(),vM=4096,h7="utf8",u_=class i{static{o(this,"SmartBuffer")}constructor(e){if(this.length=0,this._encoding=h7,this._writeOffset=0,this._readOffset=0,i.isSmartBufferOptions(e))if(e.encoding&&(F.checkEncoding(e.encoding),this._encoding=e.encoding),e.size)if(F.isFiniteInteger(e.size)&&e.size>0)this._buff=Buffer.allocUnsafe(e.size);else throw new Error(F.ERRORS.INVALID_SMARTBUFFER_SIZE);else if(e.buff)if(Buffer.isBuffer(e.buff))this._buff=e.buff,this.length=e.buff.length;else throw new Error(F.ERRORS.INVALID_SMARTBUFFER_BUFFER);else this._buff=Buffer.allocUnsafe(vM);else{if(typeof e<"u")throw new Error(F.ERRORS.INVALID_SMARTBUFFER_OBJECT);this._buff=Buffer.allocUnsafe(vM)}}static fromSize(e,t){return new this({size:e,encoding:t})}static fromBuffer(e,t){return new this({buff:e,encoding:t})}static fromOptions(e){return new this(e)}static isSmartBufferOptions(e){let t=e;return t&&(t.encoding!==void 0||t.size!==void 0||t.buff!==void 0)}readInt8(e){return this._readNumberValue(Buffer.prototype.readInt8,1,e)}readInt16BE(e){return this._readNumberValue(Buffer.prototype.readInt16BE,2,e)}readInt16LE(e){return this._readNumberValue(Buffer.prototype.readInt16LE,2,e)}readInt32BE(e){return this._readNumberValue(Buffer.prototype.readInt32BE,4,e)}readInt32LE(e){return this._readNumberValue(Buffer.prototype.readInt32LE,4,e)}readBigInt64BE(e){return F.bigIntAndBufferInt64Check("readBigInt64BE"),this._readNumberValue(Buffer.prototype.readBigInt64BE,8,e)}readBigInt64LE(e){return F.bigIntAndBufferInt64Check("readBigInt64LE"),this._readNumberValue(Buffer.prototype.readBigInt64LE,8,e)}writeInt8(e,t){return this._writeNumberValue(Buffer.prototype.writeInt8,1,e,t),this}insertInt8(e,t){return this._insertNumberValue(Buffer.prototype.writeInt8,1,e,t)}writeInt16BE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt16BE,2,e,t)}insertInt16BE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt16BE,2,e,t)}writeInt16LE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt16LE,2,e,t)}insertInt16LE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt16LE,2,e,t)}writeInt32BE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt32BE,4,e,t)}insertInt32BE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt32BE,4,e,t)}writeInt32LE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt32LE,4,e,t)}insertInt32LE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt32LE,4,e,t)}writeBigInt64BE(e,t){return F.bigIntAndBufferInt64Check("writeBigInt64BE"),this._writeNumberValue(Buffer.prototype.writeBigInt64BE,8,e,t)}insertBigInt64BE(e,t){return F.bigIntAndBufferInt64Check("writeBigInt64BE"),this._insertNumberValue(Buffer.prototype.writeBigInt64BE,8,e,t)}writeBigInt64LE(e,t){return F.bigIntAndBufferInt64Check("writeBigInt64LE"),this._writeNumberValue(Buffer.prototype.writeBigInt64LE,8,e,t)}insertBigInt64LE(e,t){return F.bigIntAndBufferInt64Check("writeBigInt64LE"),this._insertNumberValue(Buffer.prototype.writeBigInt64LE,8,e,t)}readUInt8(e){return this._readNumberValue(Buffer.prototype.readUInt8,1,e)}readUInt16BE(e){return this._readNumberValue(Buffer.prototype.readUInt16BE,2,e)}readUInt16LE(e){return this._readNumberValue(Buffer.prototype.readUInt16LE,2,e)}readUInt32BE(e){return this._readNumberValue(Buffer.prototype.readUInt32BE,4,e)}readUInt32LE(e){return this._readNumberValue(Buffer.prototype.readUInt32LE,4,e)}readBigUInt64BE(e){return F.bigIntAndBufferInt64Check("readBigUInt64BE"),this._readNumberValue(Buffer.prototype.readBigUInt64BE,8,e)}readBigUInt64LE(e){return F.bigIntAndBufferInt64Check("readBigUInt64LE"),this._readNumberValue(Buffer.prototype.readBigUInt64LE,8,e)}writeUInt8(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt8,1,e,t)}insertUInt8(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt8,1,e,t)}writeUInt16BE(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt16BE,2,e,t)}insertUInt16BE(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt16BE,2,e,t)}writeUInt16LE(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt16LE,2,e,t)}insertUInt16LE(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt16LE,2,e,t)}writeUInt32BE(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt32BE,4,e,t)}insertUInt32BE(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt32BE,4,e,t)}writeUInt32LE(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt32LE,4,e,t)}insertUInt32LE(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt32LE,4,e,t)}writeBigUInt64BE(e,t){return F.bigIntAndBufferInt64Check("writeBigUInt64BE"),this._writeNumberValue(Buffer.prototype.writeBigUInt64BE,8,e,t)}insertBigUInt64BE(e,t){return F.bigIntAndBufferInt64Check("writeBigUInt64BE"),this._insertNumberValue(Buffer.prototype.writeBigUInt64BE,8,e,t)}writeBigUInt64LE(e,t){return F.bigIntAndBufferInt64Check("writeBigUInt64LE"),this._writeNumberValue(Buffer.prototype.writeBigUInt64LE,8,e,t)}insertBigUInt64LE(e,t){return F.bigIntAndBufferInt64Check("writeBigUInt64LE"),this._insertNumberValue(Buffer.prototype.writeBigUInt64LE,8,e,t)}readFloatBE(e){return this._readNumberValue(Buffer.prototype.readFloatBE,4,e)}readFloatLE(e){return this._readNumberValue(Buffer.prototype.readFloatLE,4,e)}writeFloatBE(e,t){return this._writeNumberValue(Buffer.prototype.writeFloatBE,4,e,t)}insertFloatBE(e,t){return this._insertNumberValue(Buffer.prototype.writeFloatBE,4,e,t)}writeFloatLE(e,t){return this._writeNumberValue(Buffer.prototype.writeFloatLE,4,e,t)}insertFloatLE(e,t){return this._insertNumberValue(Buffer.prototype.writeFloatLE,4,e,t)}readDoubleBE(e){return this._readNumberValue(Buffer.prototype.readDoubleBE,8,e)}readDoubleLE(e){return this._readNumberValue(Buffer.prototype.readDoubleLE,8,e)}writeDoubleBE(e,t){return this._writeNumberValue(Buffer.prototype.writeDoubleBE,8,e,t)}insertDoubleBE(e,t){return this._insertNumberValue(Buffer.prototype.writeDoubleBE,8,e,t)}writeDoubleLE(e,t){return this._writeNumberValue(Buffer.prototype.writeDoubleLE,8,e,t)}insertDoubleLE(e,t){return this._insertNumberValue(Buffer.prototype.writeDoubleLE,8,e,t)}readString(e,t){let r;typeof e=="number"?(F.checkLengthValue(e),r=Math.min(e,this.length-this._readOffset)):(t=e,r=this.length-this._readOffset),typeof t<"u"&&F.checkEncoding(t);let s=this._buff.slice(this._readOffset,this._readOffset+r).toString(t||this._encoding);return this._readOffset+=r,s}insertString(e,t,r){return F.checkOffsetValue(t),this._handleString(e,!0,t,r)}writeString(e,t,r){return this._handleString(e,!1,t,r)}readStringNT(e){typeof e<"u"&&F.checkEncoding(e);let t=this.length;for(let s=this._readOffset;s<this.length;s++)if(this._buff[s]===0){t=s;break}let r=this._buff.slice(this._readOffset,t);return this._readOffset=t+1,r.toString(e||this._encoding)}insertStringNT(e,t,r){return F.checkOffsetValue(t),this.insertString(e,t,r),this.insertUInt8(0,t+e.length),this}writeStringNT(e,t,r){return this.writeString(e,t,r),this.writeUInt8(0,typeof t=="number"?t+e.length:this.writeOffset),this}readBuffer(e){typeof e<"u"&&F.checkLengthValue(e);let t=typeof e=="number"?e:this.length,r=Math.min(this.length,this._readOffset+t),s=this._buff.slice(this._readOffset,r);return this._readOffset=r,s}insertBuffer(e,t){return F.checkOffsetValue(t),this._handleBuffer(e,!0,t)}writeBuffer(e,t){return this._handleBuffer(e,!1,t)}readBufferNT(){let e=this.length;for(let r=this._readOffset;r<this.length;r++)if(this._buff[r]===0){e=r;break}let t=this._buff.slice(this._readOffset,e);return this._readOffset=e+1,t}insertBufferNT(e,t){return F.checkOffsetValue(t),this.insertBuffer(e,t),this.insertUInt8(0,t+e.length),this}writeBufferNT(e,t){return typeof t<"u"&&F.checkOffsetValue(t),this.writeBuffer(e,t),this.writeUInt8(0,typeof t=="number"?t+e.length:this._writeOffset),this}clear(){return this._writeOffset=0,this._readOffset=0,this.length=0,this}remaining(){return this.length-this._readOffset}get readOffset(){return this._readOffset}set readOffset(e){F.checkOffsetValue(e),F.checkTargetOffset(e,this),this._readOffset=e}get writeOffset(){return this._writeOffset}set writeOffset(e){F.checkOffsetValue(e),F.checkTargetOffset(e,this),this._writeOffset=e}get encoding(){return this._encoding}set encoding(e){F.checkEncoding(e),this._encoding=e}get internalBuffer(){return this._buff}toBuffer(){return this._buff.slice(0,this.length)}toString(e){let t=typeof e=="string"?e:this._encoding;return F.checkEncoding(t),this._buff.toString(t,0,this.length)}destroy(){return this.clear(),this}_handleString(e,t,r,s){let n=this._writeOffset,a=this._encoding;typeof r=="number"?n=r:typeof r=="string"&&(F.checkEncoding(r),a=r),typeof s=="string"&&(F.checkEncoding(s),a=s);let c=Buffer.byteLength(e,a);return t?this.ensureInsertable(c,n):this._ensureWriteable(c,n),this._buff.write(e,n,c,a),t?this._writeOffset+=c:typeof r=="number"?this._writeOffset=Math.max(this._writeOffset,n+c):this._writeOffset+=c,this}_handleBuffer(e,t,r){let s=typeof r=="number"?r:this._writeOffset;return t?this.ensureInsertable(e.length,s):this._ensureWriteable(e.length,s),e.copy(this._buff,s),t?this._writeOffset+=e.length:typeof r=="number"?this._writeOffset=Math.max(this._writeOffset,s+e.length):this._writeOffset+=e.length,this}ensureReadable(e,t){let r=this._readOffset;if(typeof t<"u"&&(F.checkOffsetValue(t),r=t),r<0||r+e>this.length)throw new Error(F.ERRORS.INVALID_READ_BEYOND_BOUNDS)}ensureInsertable(e,t){F.checkOffsetValue(t),this._ensureCapacity(this.length+e),t<this.length&&this._buff.copy(this._buff,t+e,t,this._buff.length),t+e>this.length?this.length=t+e:this.length+=e}_ensureWriteable(e,t){let r=typeof t=="number"?t:this._writeOffset;this._ensureCapacity(r+e),r+e>this.length&&(this.length=r+e)}_ensureCapacity(e){let t=this._buff.length;if(e>t){let r=this._buff,s=t*3/2+1;s<e&&(s=e),this._buff=Buffer.allocUnsafe(s),r.copy(this._buff,0,0,t)}}_readNumberValue(e,t,r){this.ensureReadable(t,r);let s=e.call(this._buff,typeof r=="number"?r:this._readOffset);return typeof r>"u"&&(this._readOffset+=t),s}_insertNumberValue(e,t,r,s){return F.checkOffsetValue(s),this.ensureInsertable(t,s),e.call(this._buff,r,s),this._writeOffset+=t,this}_writeNumberValue(e,t,r,s){if(typeof s=="number"){if(s<0)throw new Error(F.ERRORS.INVALID_WRITE_BEYOND_BOUNDS);F.checkOffsetValue(s)}let n=typeof s=="number"?s:this._writeOffset;return this._ensureWriteable(t,n),e.call(this._buff,r,n),typeof s=="number"?this._writeOffset=Math.max(this._writeOffset,n+t):this._writeOffset+=t,this}};l_.SmartBuffer=u_});var h_=d(re=>{"use strict";Object.defineProperty(re,"__esModule",{value:!0});re.SOCKS5_NO_ACCEPTABLE_AUTH=re.SOCKS5_CUSTOM_AUTH_END=re.SOCKS5_CUSTOM_AUTH_START=re.SOCKS_INCOMING_PACKET_SIZES=re.SocksClientState=re.Socks5Response=re.Socks5HostType=re.Socks5Auth=re.Socks4Response=re.SocksCommand=re.ERRORS=re.DEFAULT_TIMEOUT=void 0;var f7=3e4;re.DEFAULT_TIMEOUT=f7;var d7={InvalidSocksCommand:"An invalid SOCKS command was provided. Valid options are connect, bind, and associate.",InvalidSocksCommandForOperation:"An invalid SOCKS command was provided. Only a subset of commands are supported for this operation.",InvalidSocksCommandChain:"An invalid SOCKS command was provided. Chaining currently only supports the connect command.",InvalidSocksClientOptionsDestination:"An invalid destination host was provided.",InvalidSocksClientOptionsExistingSocket:"An invalid existing socket was provided. This should be an instance of stream.Duplex.",InvalidSocksClientOptionsProxy:"Invalid SOCKS proxy details were provided.",InvalidSocksClientOptionsTimeout:"An invalid timeout value was provided. Please enter a value above 0 (in ms).",InvalidSocksClientOptionsProxiesLength:"At least two socks proxies must be provided for chaining.",InvalidSocksClientOptionsCustomAuthRange:"Custom auth must be a value between 0x80 and 0xFE.",InvalidSocksClientOptionsCustomAuthOptions:"When a custom_auth_method is provided, custom_auth_request_handler, custom_auth_response_size, and custom_auth_response_handler must also be provided and valid.",NegotiationError:"Negotiation error",SocketClosed:"Socket closed",ProxyConnectionTimedOut:"Proxy connection timed out",InternalError:"SocksClient internal error (this should not happen)",InvalidSocks4HandshakeResponse:"Received invalid Socks4 handshake response",Socks4ProxyRejectedConnection:"Socks4 Proxy rejected connection",InvalidSocks4IncomingConnectionResponse:"Socks4 invalid incoming connection response",Socks4ProxyRejectedIncomingBoundConnection:"Socks4 Proxy rejected incoming bound connection",InvalidSocks5InitialHandshakeResponse:"Received invalid Socks5 initial handshake response",InvalidSocks5IntiailHandshakeSocksVersion:"Received invalid Socks5 initial handshake (invalid socks version)",InvalidSocks5InitialHandshakeNoAcceptedAuthType:"Received invalid Socks5 initial handshake (no accepted authentication type)",InvalidSocks5InitialHandshakeUnknownAuthType:"Received invalid Socks5 initial handshake (unknown authentication type)",Socks5AuthenticationFailed:"Socks5 Authentication failed",InvalidSocks5FinalHandshake:"Received invalid Socks5 final handshake response",InvalidSocks5FinalHandshakeRejected:"Socks5 proxy rejected connection",InvalidSocks5IncomingConnectionResponse:"Received invalid Socks5 incoming connection response",Socks5ProxyRejectedIncomingBoundConnection:"Socks5 Proxy rejected incoming bound connection"};re.ERRORS=d7;var p7={Socks5InitialHandshakeResponse:2,Socks5UserPassAuthenticationResponse:2,Socks5ResponseHeader:5,Socks5ResponseIPv4:10,Socks5ResponseIPv6:22,Socks5ResponseHostname:o(i=>i+7,"Socks5ResponseHostname"),Socks4Response:8};re.SOCKS_INCOMING_PACKET_SIZES=p7;var RM;(function(i){i[i.connect=1]="connect",i[i.bind=2]="bind",i[i.associate=3]="associate"})(RM||(re.SocksCommand=RM={}));var AM;(function(i){i[i.Granted=90]="Granted",i[i.Failed=91]="Failed",i[i.Rejected=92]="Rejected",i[i.RejectedIdent=93]="RejectedIdent"})(AM||(re.Socks4Response=AM={}));var TM;(function(i){i[i.NoAuth=0]="NoAuth",i[i.GSSApi=1]="GSSApi",i[i.UserPass=2]="UserPass"})(TM||(re.Socks5Auth=TM={}));var m7=128;re.SOCKS5_CUSTOM_AUTH_START=m7;var g7=254;re.SOCKS5_CUSTOM_AUTH_END=g7;var y7=255;re.SOCKS5_NO_ACCEPTABLE_AUTH=y7;var NM;(function(i){i[i.Granted=0]="Granted",i[i.Failure=1]="Failure",i[i.NotAllowed=2]="NotAllowed",i[i.NetworkUnreachable=3]="NetworkUnreachable",i[i.HostUnreachable=4]="HostUnreachable",i[i.ConnectionRefused=5]="ConnectionRefused",i[i.TTLExpired=6]="TTLExpired",i[i.CommandNotSupported=7]="CommandNotSupported",i[i.AddressNotSupported=8]="AddressNotSupported"})(NM||(re.Socks5Response=NM={}));var PM;(function(i){i[i.IPv4=1]="IPv4",i[i.Hostname=3]="Hostname",i[i.IPv6=4]="IPv6"})(PM||(re.Socks5HostType=PM={}));var DM;(function(i){i[i.Created=0]="Created",i[i.Connecting=1]="Connecting",i[i.Connected=2]="Connected",i[i.SentInitialHandshake=3]="SentInitialHandshake",i[i.ReceivedInitialHandshakeResponse=4]="ReceivedInitialHandshakeResponse",i[i.SentAuthentication=5]="SentAuthentication",i[i.ReceivedAuthenticationResponse=6]="ReceivedAuthenticationResponse",i[i.SentFinalHandshake=7]="SentFinalHandshake",i[i.ReceivedFinalResponse=8]="ReceivedFinalResponse",i[i.BoundWaitingForConnection=9]="BoundWaitingForConnection",i[i.Established=10]="Established",i[i.Disconnected=11]="Disconnected",i[i.Error=99]="Error"})(DM||(re.SocksClientState=DM={}))});var d_=d(Po=>{"use strict";Object.defineProperty(Po,"__esModule",{value:!0});Po.shuffleArray=Po.SocksClientError=void 0;var f_=class extends Error{static{o(this,"SocksClientError")}constructor(e,t){super(e),this.options=t}};Po.SocksClientError=f_;function S7(i){for(let e=i.length-1;e>0;e--){let t=Math.floor(Math.random()*(e+1));[i[e],i[t]]=[i[t],i[e]]}}o(S7,"shuffleArray");Po.shuffleArray=S7});var yd=d(Gs=>{"use strict";Object.defineProperty(Gs,"__esModule",{value:!0});Gs.isInSubnet=E7;Gs.isCorrect=w7;Gs.numberToPaddedHex=xM;Gs.stringToPaddedHex=_7;Gs.testBit=b7;function E7(i){return this.subnetMask<i.subnetMask?!1:this.mask(i.subnetMask)===i.mask()}o(E7,"isInSubnet");function w7(i){return function(){return this.addressMinusSuffix!==this.correctForm()?!1:this.subnetMask===i&&!this.parsedSubnet?!0:this.parsedSubnet===String(this.subnetMask)}}o(w7,"isCorrect");function xM(i){return i.toString(16).padStart(2,"0")}o(xM,"numberToPaddedHex");function _7(i){return xM(parseInt(i,10))}o(_7,"stringToPaddedHex");function b7(i,e){let{length:t}=i;if(e>t)return!1;let r=t-e;return i.substring(r,r+1)==="1"}o(b7,"testBit")});var p_=d(Ci=>{"use strict";Object.defineProperty(Ci,"__esModule",{value:!0});Ci.RE_SUBNET_STRING=Ci.RE_ADDRESS=Ci.GROUPS=Ci.BITS=void 0;Ci.BITS=32;Ci.GROUPS=4;Ci.RE_ADDRESS=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/g;Ci.RE_SUBNET_STRING=/\/\d{1,2}$/});var Ed=d(Sd=>{"use strict";Object.defineProperty(Sd,"__esModule",{value:!0});Sd.AddressError=void 0;var m_=class extends Error{static{o(this,"AddressError")}constructor(e,t){super(e),this.name="AddressError",this.parseMessage=t}};Sd.AddressError=m_});var y_=d(Ri=>{"use strict";var I7=Ri&&Ri.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(i,r,s)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),O7=Ri&&Ri.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),MM=Ri&&Ri.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&I7(e,i,t);return O7(e,i),e};Object.defineProperty(Ri,"__esModule",{value:!0});Ri.Address4=void 0;var Do=MM(yd()),ii=MM(p_()),LM=Ed(),g_=class i{static{o(this,"Address4")}constructor(e){this.groups=ii.GROUPS,this.parsedAddress=[],this.parsedSubnet="",this.subnet="/32",this.subnetMask=32,this.v4=!0,this.isCorrect=Do.isCorrect(ii.BITS),this.isInSubnet=Do.isInSubnet,this.address=e;let t=ii.RE_SUBNET_STRING.exec(e);if(t){if(this.parsedSubnet=t[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet=`/${this.subnetMask}`,this.subnetMask<0||this.subnetMask>ii.BITS)throw new LM.AddressError("Invalid subnet mask.");e=e.replace(ii.RE_SUBNET_STRING,"")}this.addressMinusSuffix=e,this.parsedAddress=this.parse(e)}static isValid(e){try{return new i(e),!0}catch{return!1}}parse(e){let t=e.split(".");if(!e.match(ii.RE_ADDRESS))throw new LM.AddressError("Invalid IPv4 address.");return t}correctForm(){return this.parsedAddress.map(e=>parseInt(e,10)).join(".")}static fromHex(e){let t=e.replace(/:/g,"").padStart(8,"0"),r=[],s;for(s=0;s<8;s+=2){let n=t.slice(s,s+2);r.push(parseInt(n,16))}return new i(r.join("."))}static fromInteger(e){return i.fromHex(e.toString(16))}static fromArpa(e){let r=e.replace(/(\.in-addr\.arpa)?\.$/,"").split(".").reverse().join(".");return new i(r)}toHex(){return this.parsedAddress.map(e=>Do.stringToPaddedHex(e)).join(":")}toArray(){return this.parsedAddress.map(e=>parseInt(e,10))}toGroup6(){let e=[],t;for(t=0;t<ii.GROUPS;t+=2)e.push(`${Do.stringToPaddedHex(this.parsedAddress[t])}${Do.stringToPaddedHex(this.parsedAddress[t+1])}`);return e.join(":")}bigInt(){return BigInt(`0x${this.parsedAddress.map(e=>Do.stringToPaddedHex(e)).join("")}`)}_startAddress(){return BigInt(`0b${this.mask()+"0".repeat(ii.BITS-this.subnetMask)}`)}startAddress(){return i.fromBigInt(this._startAddress())}startAddressExclusive(){let e=BigInt("1");return i.fromBigInt(this._startAddress()+e)}_endAddress(){return BigInt(`0b${this.mask()+"1".repeat(ii.BITS-this.subnetMask)}`)}endAddress(){return i.fromBigInt(this._endAddress())}endAddressExclusive(){let e=BigInt("1");return i.fromBigInt(this._endAddress()-e)}static fromBigInt(e){return i.fromHex(e.toString(16))}mask(e){return e===void 0&&(e=this.subnetMask),this.getBitsBase2(0,e)}getBitsBase2(e,t){return this.binaryZeroPad().slice(e,t)}reverseForm(e){e||(e={});let t=this.correctForm().split(".").reverse().join(".");return e.omitSuffix?t:`${t}.in-addr.arpa.`}isMulticast(){return this.isInSubnet(new i("224.0.0.0/4"))}binaryZeroPad(){return this.bigInt().toString(2).padStart(ii.BITS,"0")}groupForV6(){let e=this.parsedAddress;return this.address.replace(ii.RE_ADDRESS,`<span class="hover-group group-v4 group-6">${e.slice(0,2).join(".")}</span>.<span class="hover-group group-v4 group-7">${e.slice(2,4).join(".")}</span>`)}};Ri.Address4=g_});var S_=d(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.RE_URL_WITH_PORT=he.RE_URL=he.RE_ZONE_STRING=he.RE_SUBNET_STRING=he.RE_BAD_ADDRESS=he.RE_BAD_CHARACTERS=he.TYPES=he.SCOPES=he.GROUPS=he.BITS=void 0;he.BITS=128;he.GROUPS=8;he.SCOPES={0:"Reserved",1:"Interface local",2:"Link local",4:"Admin local",5:"Site local",8:"Organization local",14:"Global",15:"Reserved"};he.TYPES={"ff01::1/128":"Multicast (All nodes on this interface)","ff01::2/128":"Multicast (All routers on this interface)","ff02::1/128":"Multicast (All nodes on this link)","ff02::2/128":"Multicast (All routers on this link)","ff05::2/128":"Multicast (All routers in this site)","ff02::5/128":"Multicast (OSPFv3 AllSPF routers)","ff02::6/128":"Multicast (OSPFv3 AllDR routers)","ff02::9/128":"Multicast (RIP routers)","ff02::a/128":"Multicast (EIGRP routers)","ff02::d/128":"Multicast (PIM routers)","ff02::16/128":"Multicast (MLDv2 reports)","ff01::fb/128":"Multicast (mDNSv6)","ff02::fb/128":"Multicast (mDNSv6)","ff05::fb/128":"Multicast (mDNSv6)","ff02::1:2/128":"Multicast (All DHCP servers and relay agents on this link)","ff05::1:2/128":"Multicast (All DHCP servers and relay agents in this site)","ff02::1:3/128":"Multicast (All DHCP servers on this link)","ff05::1:3/128":"Multicast (All DHCP servers in this site)","::/128":"Unspecified","::1/128":"Loopback","ff00::/8":"Multicast","fe80::/10":"Link-local unicast"};he.RE_BAD_CHARACTERS=/([^0-9a-f:/%])/gi;he.RE_BAD_ADDRESS=/([0-9a-f]{5,}|:{3,}|[^:]:$|^:[^:]|\/$)/gi;he.RE_SUBNET_STRING=/\/\d{1,3}(?=%|$)/;he.RE_ZONE_STRING=/%.*$/;he.RE_URL=/^\[{0,1}([0-9a-f:]+)\]{0,1}/;he.RE_URL_WITH_PORT=/\[([0-9a-f:]+)\]:([0-9]{1,5})/});var E_=d(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});xo.spanAllZeroes=BM;xo.spanAll=v7;xo.spanLeadingZeroes=C7;xo.simpleGroup=R7;function BM(i){return i.replace(/(0+)/g,'<span class="zero">$1</span>')}o(BM,"spanAllZeroes");function v7(i,e=0){return i.split("").map((r,s)=>`<span class="digit value-${r} position-${s+e}">${BM(r)}</span>`).join("")}o(v7,"spanAll");function kM(i){return i.replace(/^(0+)/,'<span class="zero">$1</span>')}o(kM,"spanLeadingZeroesSimple");function C7(i){return i.split(":").map(t=>kM(t)).join(":")}o(C7,"spanLeadingZeroes");function R7(i,e=0){return i.split(":").map((r,s)=>/group-v4/.test(r)?r:`<span class="hover-group group-${s+e}">${kM(r)}</span>`)}o(R7,"simpleGroup")});var FM=d(nt=>{"use strict";var A7=nt&&nt.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(i,r,s)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),T7=nt&&nt.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),N7=nt&&nt.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&A7(e,i,t);return T7(e,i),e};Object.defineProperty(nt,"__esModule",{value:!0});nt.ADDRESS_BOUNDARY=void 0;nt.groupPossibilities=_d;nt.padGroup=wd;nt.simpleRegularExpression=D7;nt.possibleElisions=x7;var P7=N7(S_());function _d(i){return`(${i.join("|")})`}o(_d,"groupPossibilities");function wd(i){return i.length<4?`0{0,${4-i.length}}${i}`:i}o(wd,"padGroup");nt.ADDRESS_BOUNDARY="[^A-Fa-f0-9:]";function D7(i){let e=[];i.forEach((r,s)=>{parseInt(r,16)===0&&e.push(s)});let t=e.map(r=>i.map((s,n)=>{if(n===r){let a=n===0||n===P7.GROUPS-1?":":"";return _d([wd(s),a])}return wd(s)}).join(":"));return t.push(i.map(wd).join(":")),_d(t)}o(D7,"simpleRegularExpression");function x7(i,e,t){let r=e?"":":",s=t?"":":",n=[];!e&&!t&&n.push("::"),e&&t&&n.push(""),(t&&!e||!t&&e)&&n.push(":"),n.push(`${r}(:0{1,4}){1,${i-1}}`),n.push(`(0{1,4}:){1,${i-1}}${s}`),n.push(`(0{1,4}:){${i-1}}0{1,4}`);for(let a=1;a<i-1;a++)for(let c=1;c<i-a;c++)n.push(`(0{1,4}:){${c}}:(0{1,4}:){${i-c-a-1}}0{1,4}`);return _d(n)}o(x7,"possibleElisions")});var qM=d(Ai=>{"use strict";var L7=Ai&&Ai.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(i,r,s)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),M7=Ai&&Ai.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),Od=Ai&&Ai.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&L7(e,i,t);return M7(e,i),e};Object.defineProperty(Ai,"__esModule",{value:!0});Ai.Address6=void 0;var UM=Od(yd()),w_=Od(p_()),se=Od(S_()),__=Od(E_()),Ws=y_(),Js=FM(),fr=Ed(),bd=yd();function Id(i){if(!i)throw new Error("Assertion failed.")}o(Id,"assert");function B7(i){let e=/(\d+)(\d{3})/;for(;e.test(i);)i=i.replace(e,"$1,$2");return i}o(B7,"addCommas");function k7(i){return i=i.replace(/^(0{1,})([1-9]+)$/,'<span class="parse-error">$1</span>$2'),i=i.replace(/^(0{1,})(0)$/,'<span class="parse-error">$1</span>$2'),i}o(k7,"spanLeadingZeroes4");function F7(i,e){let t=[],r=[],s;for(s=0;s<i.length;s++)s<e[0]?t.push(i[s]):s>e[1]&&r.push(i[s]);return t.concat(["compact"]).concat(r)}o(F7,"compact");function jM(i){return parseInt(i,16).toString(16).padStart(4,"0")}o(jM,"paddedHex");function $M(i){return i&255}o($M,"unsignByte");var b_=class i{static{o(this,"Address6")}constructor(e,t){this.addressMinusSuffix="",this.parsedSubnet="",this.subnet="/128",this.subnetMask=128,this.v4=!1,this.zone="",this.isInSubnet=UM.isInSubnet,this.isCorrect=UM.isCorrect(se.BITS),t===void 0?this.groups=se.GROUPS:this.groups=t,this.address=e;let r=se.RE_SUBNET_STRING.exec(e);if(r){if(this.parsedSubnet=r[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet=`/${this.subnetMask}`,Number.isNaN(this.subnetMask)||this.subnetMask<0||this.subnetMask>se.BITS)throw new fr.AddressError("Invalid subnet mask.");e=e.replace(se.RE_SUBNET_STRING,"")}else if(/\//.test(e))throw new fr.AddressError("Invalid subnet mask.");let s=se.RE_ZONE_STRING.exec(e);s&&(this.zone=s[0],e=e.replace(se.RE_ZONE_STRING,"")),this.addressMinusSuffix=e,this.parsedAddress=this.parse(this.addressMinusSuffix)}static isValid(e){try{return new i(e),!0}catch{return!1}}static fromBigInt(e){let t=e.toString(16).padStart(32,"0"),r=[],s;for(s=0;s<se.GROUPS;s++)r.push(t.slice(s*4,(s+1)*4));return new i(r.join(":"))}static fromURL(e){let t,r=null,s;if(e.indexOf("[")!==-1&&e.indexOf("]:")!==-1){if(s=se.RE_URL_WITH_PORT.exec(e),s===null)return{error:"failed to parse address with port",address:null,port:null};t=s[1],r=s[2]}else if(e.indexOf("/")!==-1){if(e=e.replace(/^[a-z0-9]+:\/\//,""),s=se.RE_URL.exec(e),s===null)return{error:"failed to parse address from URL",address:null,port:null};t=s[1]}else t=e;return r?(r=parseInt(r,10),(r<0||r>65536)&&(r=null)):r=null,{address:new i(t),port:r}}static fromAddress4(e){let t=new Ws.Address4(e),r=se.BITS-(w_.BITS-t.subnetMask);return new i(`::ffff:${t.correctForm()}/${r}`)}static fromArpa(e){let t=e.replace(/(\.ip6\.arpa)?\.$/,""),r=7;if(t.length!==63)throw new fr.AddressError("Invalid 'ip6.arpa' form.");let s=t.split(".").reverse();for(let n=r;n>0;n--){let a=n*4;s.splice(a,0,":")}return t=s.join(""),new i(t)}microsoftTranscription(){return`${this.correctForm().replace(/:/g,"-")}.ipv6-literal.net`}mask(e=this.subnetMask){return this.getBitsBase2(0,e)}possibleSubnets(e=128){let t=se.BITS-this.subnetMask,r=Math.abs(e-se.BITS),s=t-r;return s<0?"0":B7((BigInt("2")**BigInt(s)).toString(10))}_startAddress(){return BigInt(`0b${this.mask()+"0".repeat(se.BITS-this.subnetMask)}`)}startAddress(){return i.fromBigInt(this._startAddress())}startAddressExclusive(){let e=BigInt("1");return i.fromBigInt(this._startAddress()+e)}_endAddress(){return BigInt(`0b${this.mask()+"1".repeat(se.BITS-this.subnetMask)}`)}endAddress(){return i.fromBigInt(this._endAddress())}endAddressExclusive(){let e=BigInt("1");return i.fromBigInt(this._endAddress()-e)}getScope(){let e=se.SCOPES[parseInt(this.getBits(12,16).toString(10),10)];return this.getType()==="Global unicast"&&e!=="Link local"&&(e="Global"),e||"Unknown"}getType(){for(let e of Object.keys(se.TYPES))if(this.isInSubnet(new i(e)))return se.TYPES[e];return"Global unicast"}getBits(e,t){return BigInt(`0b${this.getBitsBase2(e,t)}`)}getBitsBase2(e,t){return this.binaryZeroPad().slice(e,t)}getBitsBase16(e,t){let r=t-e;if(r%4!==0)throw new Error("Length of bits to retrieve must be divisible by four");return this.getBits(e,t).toString(16).padStart(r/4,"0")}getBitsPastSubnet(){return this.getBitsBase2(this.subnetMask,se.BITS)}reverseForm(e){e||(e={});let t=Math.floor(this.subnetMask/4),r=this.canonicalForm().replace(/:/g,"").split("").slice(0,t).reverse().join(".");return t>0?e.omitSuffix?r:`${r}.ip6.arpa.`:e.omitSuffix?"":"ip6.arpa."}correctForm(){let e,t=[],r=0,s=[];for(e=0;e<this.parsedAddress.length;e++){let c=parseInt(this.parsedAddress[e],16);c===0&&r++,c!==0&&r>0&&(r>1&&s.push([e-r,e-1]),r=0)}r>1&&s.push([this.parsedAddress.length-r,this.parsedAddress.length-1]);let n=s.map(c=>c[1]-c[0]+1);if(s.length>0){let c=n.indexOf(Math.max(...n));t=F7(this.parsedAddress,s[c])}else t=this.parsedAddress;for(e=0;e<t.length;e++)t[e]!=="compact"&&(t[e]=parseInt(t[e],16).toString(16));let a=t.join(":");return a=a.replace(/^compact$/,"::"),a=a.replace(/(^compact)|(compact$)/,":"),a=a.replace(/compact/,""),a}binaryZeroPad(){return this.bigInt().toString(2).padStart(se.BITS,"0")}parse4in6(e){let t=e.split(":"),s=t.slice(-1)[0].match(w_.RE_ADDRESS);if(s){this.parsedAddress4=s[0],this.address4=new Ws.Address4(this.parsedAddress4);for(let n=0;n<this.address4.groups;n++)if(/^0[0-9]+/.test(this.address4.parsedAddress[n]))throw new fr.AddressError("IPv4 addresses can't have leading zeroes.",e.replace(w_.RE_ADDRESS,this.address4.parsedAddress.map(k7).join(".")));this.v4=!0,t[t.length-1]=this.address4.toGroup6(),e=t.join(":")}return e}parse(e){e=this.parse4in6(e);let t=e.match(se.RE_BAD_CHARACTERS);if(t)throw new fr.AddressError(`Bad character${t.length>1?"s":""} detected in address: ${t.join("")}`,e.replace(se.RE_BAD_CHARACTERS,'<span class="parse-error">$1</span>'));let r=e.match(se.RE_BAD_ADDRESS);if(r)throw new fr.AddressError(`Address failed regex: ${r.join("")}`,e.replace(se.RE_BAD_ADDRESS,'<span class="parse-error">$1</span>'));let s=[],n=e.split("::");if(n.length===2){let a=n[0].split(":"),c=n[1].split(":");a.length===1&&a[0]===""&&(a=[]),c.length===1&&c[0]===""&&(c=[]);let u=this.groups-(a.length+c.length);if(!u)throw new fr.AddressError("Error parsing groups");this.elidedGroups=u,this.elisionBegin=a.length,this.elisionEnd=a.length+this.elidedGroups,s=s.concat(a);for(let l=0;l<u;l++)s.push("0");s=s.concat(c)}else if(n.length===1)s=e.split(":"),this.elidedGroups=0;else throw new fr.AddressError("Too many :: groups found");if(s=s.map(a=>parseInt(a,16).toString(16)),s.length!==this.groups)throw new fr.AddressError("Incorrect number of groups found");return s}canonicalForm(){return this.parsedAddress.map(jM).join(":")}decimal(){return this.parsedAddress.map(e=>parseInt(e,16).toString(10).padStart(5,"0")).join(":")}bigInt(){return BigInt(`0x${this.parsedAddress.map(jM).join("")}`)}to4(){let e=this.binaryZeroPad().split("");return Ws.Address4.fromHex(BigInt(`0b${e.slice(96,128).join("")}`).toString(16))}to4in6(){let e=this.to4(),r=new i(this.parsedAddress.slice(0,6).join(":"),6).correctForm(),s="";return/:$/.test(r)||(s=":"),r+s+e.address}inspectTeredo(){let e=this.getBitsBase16(0,32),r=(this.getBits(80,96)^BigInt("0xffff")).toString(),s=Ws.Address4.fromHex(this.getBitsBase16(32,64)),n=this.getBits(96,128),a=Ws.Address4.fromHex((n^BigInt("0xffffffff")).toString(16)),c=this.getBitsBase2(64,80),u=(0,bd.testBit)(c,15),l=(0,bd.testBit)(c,14),h=(0,bd.testBit)(c,8),f=(0,bd.testBit)(c,9),p=BigInt(`0b${c.slice(2,6)+c.slice(8,16)}`).toString(10);return{prefix:`${e.slice(0,4)}:${e.slice(4,8)}`,server4:s.address,client4:a.address,flags:c,coneNat:u,microsoft:{reserved:l,universalLocal:f,groupIndividual:h,nonce:p},udpPort:r}}inspect6to4(){let e=this.getBitsBase16(0,16),t=Ws.Address4.fromHex(this.getBitsBase16(16,48));return{prefix:e.slice(0,4),gateway:t.address}}to6to4(){if(!this.is4())return null;let e=["2002",this.getBitsBase16(96,112),this.getBitsBase16(112,128),"","/16"].join(":");return new i(e)}toByteArray(){let e=this.bigInt().toString(16),r=`${"0".repeat(e.length%2)}${e}`,s=[];for(let n=0,a=r.length;n<a;n+=2)s.push(parseInt(r.substring(n,n+2),16));return s}toUnsignedByteArray(){return this.toByteArray().map($M)}static fromByteArray(e){return this.fromUnsignedByteArray(e.map($M))}static fromUnsignedByteArray(e){let t=BigInt("256"),r=BigInt("0"),s=BigInt("1");for(let n=e.length-1;n>=0;n--)r+=s*BigInt(e[n].toString(10)),s*=t;return i.fromBigInt(r)}isCanonical(){return this.addressMinusSuffix===this.canonicalForm()}isLinkLocal(){return this.getBitsBase2(0,64)==="1111111010000000000000000000000000000000000000000000000000000000"}isMulticast(){return this.getType()==="Multicast"}is4(){return this.v4}isTeredo(){return this.isInSubnet(new i("2001::/32"))}is6to4(){return this.isInSubnet(new i("2002::/16"))}isLoopback(){return this.getType()==="Loopback"}href(e){return e===void 0?e="":e=`:${e}`,`http://[${this.correctForm()}]${e}/`}link(e){e||(e={}),e.className===void 0&&(e.className=""),e.prefix===void 0&&(e.prefix="/#address="),e.v4===void 0&&(e.v4=!1);let t=this.correctForm;e.v4&&(t=this.to4in6);let r=t.call(this);return e.className?`<a href="${e.prefix}${r}" class="${e.className}">${r}</a>`:`<a href="${e.prefix}${r}">${r}</a>`}group(){if(this.elidedGroups===0)return __.simpleGroup(this.address).join(":");Id(typeof this.elidedGroups=="number"),Id(typeof this.elisionBegin=="number");let e=[],[t,r]=this.address.split("::");t.length?e.push(...__.simpleGroup(t)):e.push("");let s=["hover-group"];for(let n=this.elisionBegin;n<this.elisionBegin+this.elidedGroups;n++)s.push(`group-${n}`);return e.push(`<span class="${s.join(" ")}"></span>`),r.length?e.push(...__.simpleGroup(r,this.elisionEnd)):e.push(""),this.is4()&&(Id(this.address4 instanceof Ws.Address4),e.pop(),e.push(this.address4.groupForV6())),e.join(":")}regularExpressionString(e=!1){let t=[],r=new i(this.correctForm());if(r.elidedGroups===0)t.push((0,Js.simpleRegularExpression)(r.parsedAddress));else if(r.elidedGroups===se.GROUPS)t.push((0,Js.possibleElisions)(se.GROUPS));else{let s=r.address.split("::");s[0].length&&t.push((0,Js.simpleRegularExpression)(s[0].split(":"))),Id(typeof r.elidedGroups=="number"),t.push((0,Js.possibleElisions)(r.elidedGroups,s[0].length!==0,s[1].length!==0)),s[1].length&&t.push((0,Js.simpleRegularExpression)(s[1].split(":"))),t=[t.join(":")]}return e||(t=["(?=^|",Js.ADDRESS_BOUNDARY,"|[^\\w\\:])(",...t,")(?=[^\\w\\:]|",Js.ADDRESS_BOUNDARY,"|$)"]),t.join("")}regularExpression(e=!1){return new RegExp(this.regularExpressionString(e),"i")}};Ai.Address6=b_});var I_=d($e=>{"use strict";var U7=$e&&$e.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(i,r,s)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),j7=$e&&$e.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),$7=$e&&$e.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&U7(e,i,t);return j7(e,i),e};Object.defineProperty($e,"__esModule",{value:!0});$e.v6=$e.AddressError=$e.Address6=$e.Address4=void 0;var q7=y_();Object.defineProperty($e,"Address4",{enumerable:!0,get:o(function(){return q7.Address4},"get")});var V7=qM();Object.defineProperty($e,"Address6",{enumerable:!0,get:o(function(){return V7.Address6},"get")});var z7=Ed();Object.defineProperty($e,"AddressError",{enumerable:!0,get:o(function(){return z7.AddressError},"get")});var H7=$7(E_());$e.v6={helpers:H7}});var JM=d(Bt=>{"use strict";Object.defineProperty(Bt,"__esModule",{value:!0});Bt.ipToBuffer=Bt.int32ToIpv4=Bt.ipv4ToInt32=Bt.validateSocksClientChainOptions=Bt.validateSocksClientOptions=void 0;var Ke=d_(),Pe=h_(),G7=require("stream"),O_=I_(),VM=require("net");function W7(i,e=["connect","bind","associate"]){if(!Pe.SocksCommand[i.command])throw new Ke.SocksClientError(Pe.ERRORS.InvalidSocksCommand,i);if(e.indexOf(i.command)===-1)throw new Ke.SocksClientError(Pe.ERRORS.InvalidSocksCommandForOperation,i);if(!HM(i.destination))throw new Ke.SocksClientError(Pe.ERRORS.InvalidSocksClientOptionsDestination,i);if(!GM(i.proxy))throw new Ke.SocksClientError(Pe.ERRORS.InvalidSocksClientOptionsProxy,i);if(zM(i.proxy,i),i.timeout&&!WM(i.timeout))throw new Ke.SocksClientError(Pe.ERRORS.InvalidSocksClientOptionsTimeout,i);if(i.existing_socket&&!(i.existing_socket instanceof G7.Duplex))throw new Ke.SocksClientError(Pe.ERRORS.InvalidSocksClientOptionsExistingSocket,i)}o(W7,"validateSocksClientOptions");Bt.validateSocksClientOptions=W7;function J7(i){if(i.command!=="connect")throw new Ke.SocksClientError(Pe.ERRORS.InvalidSocksCommandChain,i);if(!HM(i.destination))throw new Ke.SocksClientError(Pe.ERRORS.InvalidSocksClientOptionsDestination,i);if(!(i.proxies&&Array.isArray(i.proxies)&&i.proxies.length>=2))throw new Ke.SocksClientError(Pe.ERRORS.InvalidSocksClientOptionsProxiesLength,i);if(i.proxies.forEach(e=>{if(!GM(e))throw new Ke.SocksClientError(Pe.ERRORS.InvalidSocksClientOptionsProxy,i);zM(e,i)}),i.timeout&&!WM(i.timeout))throw new Ke.SocksClientError(Pe.ERRORS.InvalidSocksClientOptionsTimeout,i)}o(J7,"validateSocksClientChainOptions");Bt.validateSocksClientChainOptions=J7;function zM(i,e){if(i.custom_auth_method!==void 0){if(i.custom_auth_method<Pe.SOCKS5_CUSTOM_AUTH_START||i.custom_auth_method>Pe.SOCKS5_CUSTOM_AUTH_END)throw new Ke.SocksClientError(Pe.ERRORS.InvalidSocksClientOptionsCustomAuthRange,e);if(i.custom_auth_request_handler===void 0||typeof i.custom_auth_request_handler!="function")throw new Ke.SocksClientError(Pe.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,e);if(i.custom_auth_response_size===void 0)throw new Ke.SocksClientError(Pe.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,e);if(i.custom_auth_response_handler===void 0||typeof i.custom_auth_response_handler!="function")throw new Ke.SocksClientError(Pe.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,e)}}o(zM,"validateCustomProxyAuth");function HM(i){return i&&typeof i.host=="string"&&Buffer.byteLength(i.host)<256&&typeof i.port=="number"&&i.port>=0&&i.port<=65535}o(HM,"isValidSocksRemoteHost");function GM(i){return i&&(typeof i.host=="string"||typeof i.ipaddress=="string")&&typeof i.port=="number"&&i.port>=0&&i.port<=65535&&(i.type===4||i.type===5)}o(GM,"isValidSocksProxy");function WM(i){return typeof i=="number"&&i>0}o(WM,"isValidTimeoutValue");function K7(i){return new O_.Address4(i).toArray().reduce((t,r)=>(t<<8)+r,0)>>>0}o(K7,"ipv4ToInt32");Bt.ipv4ToInt32=K7;function Z7(i){let e=i>>>24&255,t=i>>>16&255,r=i>>>8&255,s=i&255;return[e,t,r,s].join(".")}o(Z7,"int32ToIpv4");Bt.int32ToIpv4=Z7;function Y7(i){if(VM.isIPv4(i)){let e=new O_.Address4(i);return Buffer.from(e.toArray())}else if(VM.isIPv6(i)){let e=new O_.Address6(i);return Buffer.from(e.canonicalForm().split(":").map(t=>t.padStart(4,"0")).join(""),"hex")}else throw new Error("Invalid IP address format")}o(Y7,"ipToBuffer");Bt.ipToBuffer=Y7});var KM=d(vd=>{"use strict";Object.defineProperty(vd,"__esModule",{value:!0});vd.ReceiveBuffer=void 0;var v_=class{static{o(this,"ReceiveBuffer")}constructor(e=4096){this.buffer=Buffer.allocUnsafe(e),this.offset=0,this.originalSize=e}get length(){return this.offset}append(e){if(!Buffer.isBuffer(e))throw new Error("Attempted to append a non-buffer instance to ReceiveBuffer.");if(this.offset+e.length>=this.buffer.length){let t=this.buffer;this.buffer=Buffer.allocUnsafe(Math.max(this.buffer.length+this.originalSize,this.buffer.length+e.length)),t.copy(this.buffer)}return e.copy(this.buffer,this.offset),this.offset+=e.length}peek(e){if(e>this.offset)throw new Error("Attempted to read beyond the bounds of the managed internal data.");return this.buffer.slice(0,e)}get(e){if(e>this.offset)throw new Error("Attempted to read beyond the bounds of the managed internal data.");let t=Buffer.allocUnsafe(e);return this.buffer.slice(0,e).copy(t),this.buffer.copyWithin(0,e,e+this.offset-e),this.offset-=e,t}};vd.ReceiveBuffer=v_});var ZM=d(Vr=>{"use strict";var Lo=Vr&&Vr.__awaiter||function(i,e,t,r){function s(n){return n instanceof t?n:new t(function(a){a(n)})}return o(s,"adopt"),new(t||(t=Promise))(function(n,a){function c(h){try{l(r.next(h))}catch(f){a(f)}}o(c,"fulfilled");function u(h){try{l(r.throw(h))}catch(f){a(f)}}o(u,"rejected");function l(h){h.done?n(h.value):s(h.value).then(c,u)}o(l,"step"),l((r=r.apply(i,e||[])).next())})};Object.defineProperty(Vr,"__esModule",{value:!0});Vr.SocksClientError=Vr.SocksClient=void 0;var X7=require("events"),Mo=require("net"),ot=CM(),O=h_(),Et=JM(),Q7=KM(),R_=d_();Object.defineProperty(Vr,"SocksClientError",{enumerable:!0,get:o(function(){return R_.SocksClientError},"get")});var C_=I_(),A_=class i extends X7.EventEmitter{static{o(this,"SocksClient")}constructor(e){super(),this.options=Object.assign({},e),(0,Et.validateSocksClientOptions)(e),this.setState(O.SocksClientState.Created)}static createConnection(e,t){return new Promise((r,s)=>{try{(0,Et.validateSocksClientOptions)(e,["connect"])}catch(a){return typeof t=="function"?(t(a),r(a)):s(a)}let n=new i(e);n.connect(e.existing_socket),n.once("established",a=>{n.removeAllListeners(),typeof t=="function"&&t(null,a),r(a)}),n.once("error",a=>{n.removeAllListeners(),typeof t=="function"?(t(a),r(a)):s(a)})})}static createConnectionChain(e,t){return new Promise((r,s)=>Lo(this,void 0,void 0,function*(){try{(0,Et.validateSocksClientChainOptions)(e)}catch(n){return typeof t=="function"?(t(n),r(n)):s(n)}e.randomizeChain&&(0,R_.shuffleArray)(e.proxies);try{let n;for(let a=0;a<e.proxies.length;a++){let c=e.proxies[a],u=a===e.proxies.length-1?e.destination:{host:e.proxies[a+1].host||e.proxies[a+1].ipaddress,port:e.proxies[a+1].port},l=yield i.createConnection({command:"connect",proxy:c,destination:u,existing_socket:n});n=n||l.socket}typeof t=="function"?(t(null,{socket:n}),r({socket:n})):r({socket:n})}catch(n){typeof t=="function"?(t(n),r(n)):s(n)}}))}static createUDPFrame(e){let t=new ot.SmartBuffer;return t.writeUInt16BE(0),t.writeUInt8(e.frameNumber||0),Mo.isIPv4(e.remoteHost.host)?(t.writeUInt8(O.Socks5HostType.IPv4),t.writeUInt32BE((0,Et.ipv4ToInt32)(e.remoteHost.host))):Mo.isIPv6(e.remoteHost.host)?(t.writeUInt8(O.Socks5HostType.IPv6),t.writeBuffer((0,Et.ipToBuffer)(e.remoteHost.host))):(t.writeUInt8(O.Socks5HostType.Hostname),t.writeUInt8(Buffer.byteLength(e.remoteHost.host)),t.writeString(e.remoteHost.host)),t.writeUInt16BE(e.remoteHost.port),t.writeBuffer(e.data),t.toBuffer()}static parseUDPFrame(e){let t=ot.SmartBuffer.fromBuffer(e);t.readOffset=2;let r=t.readUInt8(),s=t.readUInt8(),n;s===O.Socks5HostType.IPv4?n=(0,Et.int32ToIpv4)(t.readUInt32BE()):s===O.Socks5HostType.IPv6?n=C_.Address6.fromByteArray(Array.from(t.readBuffer(16))).canonicalForm():n=t.readString(t.readUInt8());let a=t.readUInt16BE();return{frameNumber:r,remoteHost:{host:n,port:a},data:t.readBuffer()}}setState(e){this.state!==O.SocksClientState.Error&&(this.state=e)}connect(e){this.onDataReceived=r=>this.onDataReceivedHandler(r),this.onClose=()=>this.onCloseHandler(),this.onError=r=>this.onErrorHandler(r),this.onConnect=()=>this.onConnectHandler();let t=setTimeout(()=>this.onEstablishedTimeout(),this.options.timeout||O.DEFAULT_TIMEOUT);t.unref&&typeof t.unref=="function"&&t.unref(),e?this.socket=e:this.socket=new Mo.Socket,this.socket.once("close",this.onClose),this.socket.once("error",this.onError),this.socket.once("connect",this.onConnect),this.socket.on("data",this.onDataReceived),this.setState(O.SocksClientState.Connecting),this.receiveBuffer=new Q7.ReceiveBuffer,e?this.socket.emit("connect"):(this.socket.connect(this.getSocketOptions()),this.options.set_tcp_nodelay!==void 0&&this.options.set_tcp_nodelay!==null&&this.socket.setNoDelay(!!this.options.set_tcp_nodelay)),this.prependOnceListener("established",r=>{setImmediate(()=>{if(this.receiveBuffer.length>0){let s=this.receiveBuffer.get(this.receiveBuffer.length);r.socket.emit("data",s)}r.socket.resume()})})}getSocketOptions(){return Object.assign(Object.assign({},this.options.socket_options),{host:this.options.proxy.host||this.options.proxy.ipaddress,port:this.options.proxy.port})}onEstablishedTimeout(){this.state!==O.SocksClientState.Established&&this.state!==O.SocksClientState.BoundWaitingForConnection&&this.closeSocket(O.ERRORS.ProxyConnectionTimedOut)}onConnectHandler(){this.setState(O.SocksClientState.Connected),this.options.proxy.type===4?this.sendSocks4InitialHandshake():this.sendSocks5InitialHandshake(),this.setState(O.SocksClientState.SentInitialHandshake)}onDataReceivedHandler(e){this.receiveBuffer.append(e),this.processData()}processData(){for(;this.state!==O.SocksClientState.Established&&this.state!==O.SocksClientState.Error&&this.receiveBuffer.length>=this.nextRequiredPacketBufferSize;)if(this.state===O.SocksClientState.SentInitialHandshake)this.options.proxy.type===4?this.handleSocks4FinalHandshakeResponse():this.handleInitialSocks5HandshakeResponse();else if(this.state===O.SocksClientState.SentAuthentication)this.handleInitialSocks5AuthenticationHandshakeResponse();else if(this.state===O.SocksClientState.SentFinalHandshake)this.handleSocks5FinalHandshakeResponse();else if(this.state===O.SocksClientState.BoundWaitingForConnection)this.options.proxy.type===4?this.handleSocks4IncomingConnectionResponse():this.handleSocks5IncomingConnectionResponse();else{this.closeSocket(O.ERRORS.InternalError);break}}onCloseHandler(){this.closeSocket(O.ERRORS.SocketClosed)}onErrorHandler(e){this.closeSocket(e.message)}removeInternalSocketHandlers(){this.socket.pause(),this.socket.removeListener("data",this.onDataReceived),this.socket.removeListener("close",this.onClose),this.socket.removeListener("error",this.onError),this.socket.removeListener("connect",this.onConnect)}closeSocket(e){this.state!==O.SocksClientState.Error&&(this.setState(O.SocksClientState.Error),this.socket.destroy(),this.removeInternalSocketHandlers(),this.emit("error",new R_.SocksClientError(e,this.options)))}sendSocks4InitialHandshake(){let e=this.options.proxy.userId||"",t=new ot.SmartBuffer;t.writeUInt8(4),t.writeUInt8(O.SocksCommand[this.options.command]),t.writeUInt16BE(this.options.destination.port),Mo.isIPv4(this.options.destination.host)?(t.writeBuffer((0,Et.ipToBuffer)(this.options.destination.host)),t.writeStringNT(e)):(t.writeUInt8(0),t.writeUInt8(0),t.writeUInt8(0),t.writeUInt8(1),t.writeStringNT(e),t.writeStringNT(this.options.destination.host)),this.nextRequiredPacketBufferSize=O.SOCKS_INCOMING_PACKET_SIZES.Socks4Response,this.socket.write(t.toBuffer())}handleSocks4FinalHandshakeResponse(){let e=this.receiveBuffer.get(8);if(e[1]!==O.Socks4Response.Granted)this.closeSocket(`${O.ERRORS.Socks4ProxyRejectedConnection} - (${O.Socks4Response[e[1]]})`);else if(O.SocksCommand[this.options.command]===O.SocksCommand.bind){let t=ot.SmartBuffer.fromBuffer(e);t.readOffset=2;let r={port:t.readUInt16BE(),host:(0,Et.int32ToIpv4)(t.readUInt32BE())};r.host==="0.0.0.0"&&(r.host=this.options.proxy.ipaddress),this.setState(O.SocksClientState.BoundWaitingForConnection),this.emit("bound",{remoteHost:r,socket:this.socket})}else this.setState(O.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{socket:this.socket})}handleSocks4IncomingConnectionResponse(){let e=this.receiveBuffer.get(8);if(e[1]!==O.Socks4Response.Granted)this.closeSocket(`${O.ERRORS.Socks4ProxyRejectedIncomingBoundConnection} - (${O.Socks4Response[e[1]]})`);else{let t=ot.SmartBuffer.fromBuffer(e);t.readOffset=2;let r={port:t.readUInt16BE(),host:(0,Et.int32ToIpv4)(t.readUInt32BE())};this.setState(O.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:r,socket:this.socket})}}sendSocks5InitialHandshake(){let e=new ot.SmartBuffer,t=[O.Socks5Auth.NoAuth];(this.options.proxy.userId||this.options.proxy.password)&&t.push(O.Socks5Auth.UserPass),this.options.proxy.custom_auth_method!==void 0&&t.push(this.options.proxy.custom_auth_method),e.writeUInt8(5),e.writeUInt8(t.length);for(let r of t)e.writeUInt8(r);this.nextRequiredPacketBufferSize=O.SOCKS_INCOMING_PACKET_SIZES.Socks5InitialHandshakeResponse,this.socket.write(e.toBuffer()),this.setState(O.SocksClientState.SentInitialHandshake)}handleInitialSocks5HandshakeResponse(){let e=this.receiveBuffer.get(2);e[0]!==5?this.closeSocket(O.ERRORS.InvalidSocks5IntiailHandshakeSocksVersion):e[1]===O.SOCKS5_NO_ACCEPTABLE_AUTH?this.closeSocket(O.ERRORS.InvalidSocks5InitialHandshakeNoAcceptedAuthType):e[1]===O.Socks5Auth.NoAuth?(this.socks5ChosenAuthType=O.Socks5Auth.NoAuth,this.sendSocks5CommandRequest()):e[1]===O.Socks5Auth.UserPass?(this.socks5ChosenAuthType=O.Socks5Auth.UserPass,this.sendSocks5UserPassAuthentication()):e[1]===this.options.proxy.custom_auth_method?(this.socks5ChosenAuthType=this.options.proxy.custom_auth_method,this.sendSocks5CustomAuthentication()):this.closeSocket(O.ERRORS.InvalidSocks5InitialHandshakeUnknownAuthType)}sendSocks5UserPassAuthentication(){let e=this.options.proxy.userId||"",t=this.options.proxy.password||"",r=new ot.SmartBuffer;r.writeUInt8(1),r.writeUInt8(Buffer.byteLength(e)),r.writeString(e),r.writeUInt8(Buffer.byteLength(t)),r.writeString(t),this.nextRequiredPacketBufferSize=O.SOCKS_INCOMING_PACKET_SIZES.Socks5UserPassAuthenticationResponse,this.socket.write(r.toBuffer()),this.setState(O.SocksClientState.SentAuthentication)}sendSocks5CustomAuthentication(){return Lo(this,void 0,void 0,function*(){this.nextRequiredPacketBufferSize=this.options.proxy.custom_auth_response_size,this.socket.write(yield this.options.proxy.custom_auth_request_handler()),this.setState(O.SocksClientState.SentAuthentication)})}handleSocks5CustomAuthHandshakeResponse(e){return Lo(this,void 0,void 0,function*(){return yield this.options.proxy.custom_auth_response_handler(e)})}handleSocks5AuthenticationNoAuthHandshakeResponse(e){return Lo(this,void 0,void 0,function*(){return e[1]===0})}handleSocks5AuthenticationUserPassHandshakeResponse(e){return Lo(this,void 0,void 0,function*(){return e[1]===0})}handleInitialSocks5AuthenticationHandshakeResponse(){return Lo(this,void 0,void 0,function*(){this.setState(O.SocksClientState.ReceivedAuthenticationResponse);let e=!1;this.socks5ChosenAuthType===O.Socks5Auth.NoAuth?e=yield this.handleSocks5AuthenticationNoAuthHandshakeResponse(this.receiveBuffer.get(2)):this.socks5ChosenAuthType===O.Socks5Auth.UserPass?e=yield this.handleSocks5AuthenticationUserPassHandshakeResponse(this.receiveBuffer.get(2)):this.socks5ChosenAuthType===this.options.proxy.custom_auth_method&&(e=yield this.handleSocks5CustomAuthHandshakeResponse(this.receiveBuffer.get(this.options.proxy.custom_auth_response_size))),e?this.sendSocks5CommandRequest():this.closeSocket(O.ERRORS.Socks5AuthenticationFailed)})}sendSocks5CommandRequest(){let e=new ot.SmartBuffer;e.writeUInt8(5),e.writeUInt8(O.SocksCommand[this.options.command]),e.writeUInt8(0),Mo.isIPv4(this.options.destination.host)?(e.writeUInt8(O.Socks5HostType.IPv4),e.writeBuffer((0,Et.ipToBuffer)(this.options.destination.host))):Mo.isIPv6(this.options.destination.host)?(e.writeUInt8(O.Socks5HostType.IPv6),e.writeBuffer((0,Et.ipToBuffer)(this.options.destination.host))):(e.writeUInt8(O.Socks5HostType.Hostname),e.writeUInt8(this.options.destination.host.length),e.writeString(this.options.destination.host)),e.writeUInt16BE(this.options.destination.port),this.nextRequiredPacketBufferSize=O.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader,this.socket.write(e.toBuffer()),this.setState(O.SocksClientState.SentFinalHandshake)}handleSocks5FinalHandshakeResponse(){let e=this.receiveBuffer.peek(5);if(e[0]!==5||e[1]!==O.Socks5Response.Granted)this.closeSocket(`${O.ERRORS.InvalidSocks5FinalHandshakeRejected} - ${O.Socks5Response[e[1]]}`);else{let t=e[3],r,s;if(t===O.Socks5HostType.IPv4){let n=O.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4;if(this.receiveBuffer.length<n){this.nextRequiredPacketBufferSize=n;return}s=ot.SmartBuffer.fromBuffer(this.receiveBuffer.get(n).slice(4)),r={host:(0,Et.int32ToIpv4)(s.readUInt32BE()),port:s.readUInt16BE()},r.host==="0.0.0.0"&&(r.host=this.options.proxy.ipaddress)}else if(t===O.Socks5HostType.Hostname){let n=e[4],a=O.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname(n);if(this.receiveBuffer.length<a){this.nextRequiredPacketBufferSize=a;return}s=ot.SmartBuffer.fromBuffer(this.receiveBuffer.get(a).slice(5)),r={host:s.readString(n),port:s.readUInt16BE()}}else if(t===O.Socks5HostType.IPv6){let n=O.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6;if(this.receiveBuffer.length<n){this.nextRequiredPacketBufferSize=n;return}s=ot.SmartBuffer.fromBuffer(this.receiveBuffer.get(n).slice(4)),r={host:C_.Address6.fromByteArray(Array.from(s.readBuffer(16))).canonicalForm(),port:s.readUInt16BE()}}this.setState(O.SocksClientState.ReceivedFinalResponse),O.SocksCommand[this.options.command]===O.SocksCommand.connect?(this.setState(O.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:r,socket:this.socket})):O.SocksCommand[this.options.command]===O.SocksCommand.bind?(this.setState(O.SocksClientState.BoundWaitingForConnection),this.nextRequiredPacketBufferSize=O.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader,this.emit("bound",{remoteHost:r,socket:this.socket})):O.SocksCommand[this.options.command]===O.SocksCommand.associate&&(this.setState(O.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:r,socket:this.socket}))}}handleSocks5IncomingConnectionResponse(){let e=this.receiveBuffer.peek(5);if(e[0]!==5||e[1]!==O.Socks5Response.Granted)this.closeSocket(`${O.ERRORS.Socks5ProxyRejectedIncomingBoundConnection} - ${O.Socks5Response[e[1]]}`);else{let t=e[3],r,s;if(t===O.Socks5HostType.IPv4){let n=O.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4;if(this.receiveBuffer.length<n){this.nextRequiredPacketBufferSize=n;return}s=ot.SmartBuffer.fromBuffer(this.receiveBuffer.get(n).slice(4)),r={host:(0,Et.int32ToIpv4)(s.readUInt32BE()),port:s.readUInt16BE()},r.host==="0.0.0.0"&&(r.host=this.options.proxy.ipaddress)}else if(t===O.Socks5HostType.Hostname){let n=e[4],a=O.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname(n);if(this.receiveBuffer.length<a){this.nextRequiredPacketBufferSize=a;return}s=ot.SmartBuffer.fromBuffer(this.receiveBuffer.get(a).slice(5)),r={host:s.readString(n),port:s.readUInt16BE()}}else if(t===O.Socks5HostType.IPv6){let n=O.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6;if(this.receiveBuffer.length<n){this.nextRequiredPacketBufferSize=n;return}s=ot.SmartBuffer.fromBuffer(this.receiveBuffer.get(n).slice(4)),r={host:C_.Address6.fromByteArray(Array.from(s.readBuffer(16))).canonicalForm(),port:s.readUInt16BE()}}this.setState(O.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:r,socket:this.socket})}}get socksClientOptions(){return Object.assign({},this.options)}};Vr.SocksClient=A_});var YM=d(Ks=>{"use strict";var eee=Ks&&Ks.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(i,r,s)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),tee=Ks&&Ks.__exportStar||function(i,e){for(var t in i)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&eee(e,i,t)};Object.defineProperty(Ks,"__esModule",{value:!0});tee(ZM(),Ks)});var XM=d(kt=>{"use strict";var iee=kt&&kt.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(i,r,s)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),ree=kt&&kt.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),T_=kt&&kt.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&iee(e,i,t);return ree(e,i),e},see=kt&&kt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(kt,"__esModule",{value:!0});kt.SocksProxyAgent=void 0;var nee=YM(),oee=nu(),aee=see(zs()),cee=T_(require("dns")),uee=T_(require("net")),lee=T_(require("tls")),hee=require("url"),Cd=(0,aee.default)("socks-proxy-agent"),fee=o(i=>i.servername===void 0&&i.host&&!uee.isIP(i.host)?{...i,servername:i.host}:i,"setServernameFromNonIpHost");function dee(i){let e=!1,t=5,r=i.hostname,s=parseInt(i.port,10)||1080;switch(i.protocol.replace(":","")){case"socks4":e=!0,t=4;break;case"socks4a":t=4;break;case"socks5":e=!0,t=5;break;case"socks":t=5;break;case"socks5h":t=5;break;default:throw new TypeError(`A "socks" protocol must be specified! Got: ${String(i.protocol)}`)}let n={host:r,port:s,type:t};return i.username&&Object.defineProperty(n,"userId",{value:decodeURIComponent(i.username),enumerable:!1}),i.password!=null&&Object.defineProperty(n,"password",{value:decodeURIComponent(i.password),enumerable:!1}),{lookup:e,proxy:n}}o(dee,"parseSocksURL");var Rd=class extends oee.Agent{static{o(this,"SocksProxyAgent")}constructor(e,t){super(t);let r=typeof e=="string"?new hee.URL(e):e,{proxy:s,lookup:n}=dee(r);this.shouldLookup=n,this.proxy=s,this.timeout=t?.timeout??null,this.socketOptions=t?.socketOptions??null}async connect(e,t){let{shouldLookup:r,proxy:s,timeout:n}=this;if(!t.host)throw new Error("No `host` defined!");let{host:a}=t,{port:c,lookup:u=cee.lookup}=t;r&&(a=await new Promise((p,m)=>{u(a,{},(y,g)=>{y?m(y):p(g)})}));let l={proxy:s,destination:{host:a,port:typeof c=="number"?c:parseInt(c,10)},command:"connect",timeout:n??void 0,socket_options:this.socketOptions??void 0},h=o(p=>{e.destroy(),f.destroy(),p&&p.destroy()},"cleanup");Cd("Creating socks proxy connection: %o",l);let{socket:f}=await nee.SocksClient.createConnection(l);if(Cd("Successfully created socks proxy connection"),n!==null&&(f.setTimeout(n),f.on("timeout",()=>h())),t.secureEndpoint){Cd("Upgrading socket connection to TLS");let p=lee.connect({...pee(fee(t),"host","path","port"),socket:f});return p.once("error",m=>{Cd("Socket TLS error",m.message),h(p)}),p}return f}};Rd.protocols=["socks","socks4","socks4a","socks5","socks5h"];kt.SocksProxyAgent=Rd;function pee(i,...e){let t={},r;for(r in i)e.includes(r)||(t[r]=i[r]);return t}o(pee,"omit")});var M_=d((uwe,QM)=>{"use strict";var N_=class extends Error{static{o(this,"InvalidProxyProtocolError")}constructor(e){super(`Invalid protocol \`${e.protocol}\` connecting to proxy \`${e.host}\``),this.code="EINVALIDPROXY",this.proxy=e}},P_=class extends Error{static{o(this,"ConnectionTimeoutError")}constructor(e){super(`Timeout connecting to host \`${e}\``),this.code="ECONNECTIONTIMEOUT",this.host=e}},D_=class extends Error{static{o(this,"IdleTimeoutError")}constructor(e){super(`Idle timeout reached for host \`${e}\``),this.code="EIDLETIMEOUT",this.host=e}},x_=class extends Error{static{o(this,"ResponseTimeoutError")}constructor(e,t){let r="Response timeout ";t&&(r+=`from proxy \`${t.host}\` `),r+=`connecting to host \`${e.host}\``,super(r),this.code="ERESPONSETIMEOUT",this.proxy=t,this.request=e}},L_=class extends Error{static{o(this,"TransferTimeoutError")}constructor(e,t){let r="Transfer timeout ";t&&(r+=`from proxy \`${t.host}\` `),r+=`for \`${e.host}\``,super(r),this.code="ETRANSFERTIMEOUT",this.proxy=t,this.request=e}};QM.exports={InvalidProxyProtocolError:N_,ConnectionTimeoutError:P_,IdleTimeoutError:D_,ResponseTimeoutError:x_,TransferTimeoutError:L_}});var B_=d((hwe,tB)=>{"use strict";var{HttpProxyAgent:mee}=dM(),{HttpsProxyAgent:gee}=wM(),{SocksProxyAgent:eB}=XM(),{LRUCache:yee}=hs(),{InvalidProxyProtocolError:See}=M_(),Eee=new yee({max:20}),wee=new Set(eB.protocols),_ee=new Set(["https_proxy","http_proxy","proxy","no_proxy"]),au=Object.entries(process.env).reduce((i,[e,t])=>(e=e.toLowerCase(),_ee.has(e)&&(i[e]=t),i),{}),bee=o(i=>{i=new URL(i);let e=i.protocol.slice(0,-1);if(wee.has(e))return eB;if(e==="https"||e==="http")return[mee,gee];throw new See(i)},"getProxyAgent"),Iee=o((i,e)=>{if(typeof e=="string"&&(e=e.split(",").map(r=>r.trim()).filter(Boolean)),!e||!e.length)return!1;let t=i.hostname.split(".").reverse();return e.some(r=>{let s=r.split(".").filter(Boolean).reverse();if(!s.length)return!1;for(let n=0;n<s.length;n++)if(t[n]!==s[n])return!1;return!0})},"isNoProxy"),Oee=o((i,{proxy:e,noProxy:t})=>(i=new URL(i),e||(e=i.protocol==="https:"?au.https_proxy:au.https_proxy||au.http_proxy||au.proxy),t||(t=au.no_proxy),!e||Iee(i,t)?null:new URL(e)),"getProxy");tB.exports={getProxyAgent:bee,getProxy:Oee,proxyCache:Eee}});var sB=d((pwe,rB)=>{"use strict";var vee=require("net"),Cee=require("tls"),{once:iB}=require("events"),Ree=require("timers/promises"),{normalizeOptions:Aee,cacheOptions:Tee}=r_(),{getProxy:Nee,getProxyAgent:Pee,proxyCache:k_}=B_(),Ad=M_(),{Agent:Dee}=nu();rB.exports=class extends Dee{static{o(this,"Agent")}#e;#t;#i;#r;#s;constructor(e={}){let{timeouts:t,proxy:r,noProxy:s,...n}=Aee(e);super(n),this.#e=n,this.#t=t,r&&(this.#i=new URL(r),this.#r=s,this.#s=Pee(r))}get proxy(){return this.#i?{url:this.#i}:{}}#u(e){if(!this.#i)return;let t=Nee(`${e.protocol}//${e.host}:${e.port}`,{proxy:this.#i,noProxy:this.#r});if(!t)return;let r=Tee({...e,...this.#e,timeouts:this.#t,proxy:t});if(k_.has(r))return k_.get(r);let s=this.#s;Array.isArray(s)&&(s=this.isSecureEndpoint(e)?s[1]:s[0]);let n=new s(t,{...this.#e,socketOptions:{family:this.#e.family}});return k_.set(r,n),n}async#c({promises:e,options:t,timeout:r},s=new AbortController){if(r){let a=Ree.setTimeout(r,null,{signal:s.signal}).then(()=>{throw new Ad.ConnectionTimeoutError(`${t.host}:${t.port}`)}).catch(c=>{if(c.name!=="AbortError")throw c});e.push(a)}let n;try{n=await Promise.race(e),s.abort()}catch(a){throw s.abort(),a}return n}async connect(e,t){t.lookup??=this.#e.lookup;let r,s=this.#t.connection,n=this.isSecureEndpoint(t),a=this.#u(t);if(a){let h=Date.now();r=await this.#c({options:t,timeout:s,promises:[a.connect(e,t)]}),s&&(s=s-(Date.now()-h))}else r=(n?Cee:vee).connect(t);r.setKeepAlive(this.keepAlive,this.keepAliveMsecs),r.setNoDelay(this.keepAlive);let c=new AbortController,{signal:u}=c,l=r[n?"secureConnecting":"connecting"]?iB(r,n?"secureConnect":"connect",{signal:u}):Promise.resolve();return await this.#c({options:t,timeout:s,promises:[l,iB(r,"error",{signal:u}).then(h=>{throw h[0]})]},c),this.#t.idle&&r.setTimeout(this.#t.idle,()=>{r.destroy(new Ad.IdleTimeoutError(`${t.host}:${t.port}`))}),r}addRequest(e,t){let r=this.#u(t);if(r?.setRequestProps&&r.setRequestProps(e,t),e.setHeader("connection",this.keepAlive?"keep-alive":"close"),this.#t.response){let s;e.once("finish",()=>{setTimeout(()=>{e.destroy(new Ad.ResponseTimeoutError(e,this.#i))},this.#t.response)}),e.once("response",()=>{clearTimeout(s)})}if(this.#t.transfer){let s;e.once("response",n=>{setTimeout(()=>{n.destroy(new Ad.TransferTimeoutError(e,this.#i))},this.#t.transfer),n.once("close",()=>{clearTimeout(s)})})}return super.addRequest(e,t)}}});var cB=d((gwe,aB)=>{"use strict";var{LRUCache:xee}=hs(),{normalizeOptions:Lee,cacheOptions:Mee}=r_(),{getProxy:Bee,proxyCache:nB}=B_(),oB=i_(),Td=sB(),cu=new xee({max:20}),kee=o((i,{agent:e,proxy:t,noProxy:r,...s}={})=>{if(e!=null)return e;i=new URL(i);let n=Bee(i,{proxy:t,noProxy:r}),a={...Lee(s),proxy:n},c=Mee({...a,secureEndpoint:i.protocol==="https:"});if(cu.has(c))return cu.get(c);let u=new Td(a);return cu.set(c,u),u},"getAgent");aB.exports={getAgent:kee,Agent:Td,HttpAgent:Td,HttpsAgent:Td,cache:{proxy:nB,agent:cu,dns:oB.cache,clear:o(()=>{nB.clear(),cu.clear(),oB.cache.clear()},"clear")}}});var uB=d((Swe,Fee)=>{Fee.exports={name:"make-fetch-happen",version:"15.0.2",description:"Opinionated, caching, retrying fetch client",main:"lib/index.js",files:["bin/","lib/"],scripts:{test:"tap",posttest:"npm run lint",eslint:'eslint "**/*.{js,cjs,ts,mjs,jsx,tsx}"',lint:"npm run eslint",lintfix:"npm run eslint -- --fix",postlint:"template-oss-check",snap:"tap","template-oss-apply":"template-oss-apply --force"},repository:{type:"git",url:"git+https://github.com/npm/make-fetch-happen.git"},keywords:["http","request","fetch","mean girls","caching","cache","subresource integrity"],author:"GitHub Inc.",license:"ISC",dependencies:{"@npmcli/agent":"^4.0.0",cacache:"^20.0.1","http-cache-semantics":"^4.1.1",minipass:"^7.0.2","minipass-fetch":"^4.0.0","minipass-flush":"^1.0.5","minipass-pipeline":"^1.2.4",negotiator:"^1.0.0","proc-log":"^5.0.0","promise-retry":"^2.0.1",ssri:"^12.0.0"},devDependencies:{"@npmcli/eslint-config":"^5.0.0","@npmcli/template-oss":"4.25.0",nock:"^13.2.4","safe-buffer":"^5.2.1","standard-version":"^9.3.2",tap:"^16.0.0"},engines:{node:"^20.17.0 || >=22.9.0"},tap:{color:1,files:"test/*.js","check-coverage":!0,timeout:60,"nyc-arg":["--exclude","tap-snapshots/**"]},templateOSS:{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",version:"4.25.0",publish:"true"}}});var Pd=d((Ewe,hB)=>{var{Minipass:Uee}=te(),Nd=bo(),jee=qa(),$ee=hi(),{log:lB}=_t(),qee=t_(),{getAgent:Vee}=cB(),F_=uB(),zee=`${F_.name}/${F_.version} (+https://npm.im/${F_.name})`,Hee=["ECONNRESET","ECONNREFUSED","EADDRINUSE","ETIMEDOUT","ECONNECTIONTIMEOUT","EIDLETIMEOUT","ERESPONSETIMEOUT","ETRANSFERTIMEOUT"],Gee=["request-timeout"],Wee=o((i,e)=>{let t=Vee(i.url,{...e,signal:void 0});i.headers.has("connection")||i.headers.set("connection",t?"keep-alive":"close"),i.headers.has("user-agent")||i.headers.set("user-agent",zee);let r={...e,agent:t,redirect:"manual"};return jee(async(s,n)=>{let a=new Nd.Request(i,r);try{let c=await Nd(a,r);if(r.integrity&&c.status===200){let h=$ee.integrityStream({algorithms:r.algorithms,integrity:r.integrity,size:r.size}),f=new qee({events:["integrity","size"]},c.body,h);h.on("integrity",p=>f.emit("integrity",p)),h.on("size",p=>f.emit("size",p)),c=new Nd.Response(f,c),c.body.hasIntegrityEmitter=!0}c.headers.set("x-fetch-attempts",n);let u=Uee.isStream(a.body);return a.method!=="POST"&&!u&&([408,420,429].includes(c.status)||c.status>=500)?(typeof e.onRetry=="function"&&e.onRetry(c),lB.http("fetch",`${a.method} ${a.url} attempt ${n} failed with ${c.status}`),s(c)):c}catch(c){let u=c.code==="EPROMISERETRY"?c.retried.code:c.code,l=c.retried instanceof Nd.Response||Hee.includes(u)&&Gee.includes(c.type);if(a.method==="POST"||l)throw c;return typeof e.onRetry=="function"&&e.onRetry(c),lB.http("fetch",`${a.method} ${a.url} attempt ${n} failed with ${c.code}`),s(c)}},e.retry).catch(s=>{if(s.status>=400&&s.type!=="system")return s;throw s})},"remoteFetch");hB.exports=Wee});var yB=d((_we,gB)=>{var{Request:fB,Response:U_}=bo(),{Minipass:dB}=te(),Jee=Ph(),Zs=bc(),Kee=require("url"),Zee=t_(),Yee=Xw(),j_=VL(),Xee=Pd(),uu=o((i,e)=>Object.prototype.hasOwnProperty.call(i,e),"hasOwnProperty"),Qee=["accept-charset","accept-encoding","accept-language","accept","cache-control"],mB=["cache-control","content-encoding","content-language","content-type","date","etag","expires","last-modified","link","location","pragma","vary"],pB=o((i,e,t)=>{let r={time:Date.now(),url:i.url,reqHeaders:{},resHeaders:{},options:{compress:t.compress!=null?t.compress:i.compress}};e.status!==200&&e.status!==304&&(r.status=e.status);for(let a of Qee)i.headers.has(a)&&(r.reqHeaders[a]=i.headers.get(a));let s=i.headers.get("host"),n=new Kee.URL(i.url);if(s&&n.host!==s&&(r.reqHeaders.host=s),e.headers.has("vary")){let a=e.headers.get("vary");if(a!=="*"){let c=a.trim().toLowerCase().split(/\s*,\s*/);for(let u of c)i.headers.has(u)&&(r.reqHeaders[u]=i.headers.get(u))}}for(let a of mB)e.headers.has(a)&&(r.resHeaders[a]=e.headers.get(a));for(let a of t.cacheAdditionalHeaders)e.headers.has(a)&&(r.resHeaders[a]=e.headers.get(a));return r},"getMetadata"),Dd=Symbol("request"),xd=Symbol("response"),Ld=Symbol("policy"),$_=class i{static{o(this,"CacheEntry")}constructor({entry:e,request:t,response:r,options:s}){e?(this.key=e.key,this.entry=e,this.entry.metadata.time=this.entry.metadata.time||this.entry.time):this.key=j_(t),this.options=s,this[Dd]=t,this[xd]=r,this[Ld]=null}static async find(e,t){try{var r=await Zs.index.compact(t.cachePath,j_(e),(n,a)=>{let c=new i({entry:n,options:t}),u=new i({entry:a,options:t});return c.policy.satisfies(u.request)},{validateEntry:o(n=>n.metadata&&n.metadata.resHeaders&&n.metadata.resHeaders["content-encoding"]===null?!1:n.integrity===null?!!(n.metadata&&n.metadata.status):!0,"validateEntry")})}catch{return}if(t.cache==="reload")return;let s;for(let n of r){let a=new i({entry:n,options:t});if(a.policy.satisfies(e)){s=a;break}}return s}static async invalidate(e,t){let r=j_(e);try{await Zs.rm.entry(t.cachePath,r,{removeFully:!0})}catch{}}get request(){return this[Dd]||(this[Dd]=new fB(this.entry.metadata.url,{method:"GET",headers:this.entry.metadata.reqHeaders,...this.entry.metadata.options})),this[Dd]}get response(){return this[xd]||(this[xd]=new U_(null,{url:this.entry.metadata.url,counter:this.options.counter,status:this.entry.metadata.status||200,headers:{...this.entry.metadata.resHeaders,"content-length":this.entry.size}})),this[xd]}get policy(){return this[Ld]||(this[Ld]=new Yee({entry:this.entry,request:this.request,response:this.response,options:this.options})),this[Ld]}async store(e){if(this.request.method!=="GET"||![200,301,308].includes(this.response.status)||!this.policy.storable())return this.response.headers.set("x-local-cache-status","skip"),this.response;let t=this.response.headers.get("content-length"),r={algorithms:this.options.algorithms,metadata:pB(this.request,this.response,this.options),size:t,integrity:this.options.integrity,integrityEmitter:this.response.body.hasIntegrityEmitter&&this.response.body},s=null;if(this.response.status===200){let a,c,u=new Promise((h,f)=>{a=h,c=f}).catch(h=>{s.emit("error",h)});s=new Zee({events:["integrity","size"]},new Jee({flush(){return u}})),s.hasIntegrityEmitter=!0;let l=o(()=>{let h=new dB,f=Zs.put.stream(this.options.cachePath,this.key,r);f.on("integrity",p=>s.emit("integrity",p)),f.on("size",p=>s.emit("size",p)),h.pipe(f),f.promise().then(a,c),s.unshift(h),s.unshift(this.response.body)},"onResume");s.once("resume",l),s.once("end",()=>s.removeListener("resume",l))}else await Zs.index.insert(this.options.cachePath,this.key,null,r);return this.response.headers.set("x-local-cache",encodeURIComponent(this.options.cachePath)),this.response.headers.set("x-local-cache-key",encodeURIComponent(this.key)),this.response.headers.set("x-local-cache-mode","stream"),this.response.headers.set("x-local-cache-status",e),this.response.headers.set("x-local-cache-time",new Date().toISOString()),new U_(s,{url:this.response.url,status:this.response.status,headers:this.response.headers,counter:this.options.counter})}async respond(e,t,r){let s;if(e==="HEAD"||[301,308].includes(this.response.status))s=this.response;else{let n=new dB,a={...this.policy.responseHeaders()},c=o(()=>{let u=Zs.get.stream.byDigest(this.options.cachePath,this.entry.integrity,{memoize:this.options.memoize});u.on("error",async l=>{u.pause(),l.code==="EINTEGRITY"&&await Zs.rm.content(this.options.cachePath,this.entry.integrity,{memoize:this.options.memoize}),(l.code==="ENOENT"||l.code==="EINTEGRITY")&&await i.invalidate(this.request,this.options),n.emit("error",l),u.resume()}),n.emit("integrity",this.entry.integrity),n.emit("size",Number(a["content-length"])),u.pipe(n)},"onResume");n.once("resume",c),n.once("end",()=>n.removeListener("resume",c)),s=new U_(n,{url:this.entry.metadata.url,counter:t.counter,status:200,headers:a})}return s.headers.set("x-local-cache",encodeURIComponent(this.options.cachePath)),s.headers.set("x-local-cache-hash",encodeURIComponent(this.entry.integrity)),s.headers.set("x-local-cache-key",encodeURIComponent(this.key)),s.headers.set("x-local-cache-mode","stream"),s.headers.set("x-local-cache-status",r),s.headers.set("x-local-cache-time",new Date(this.entry.metadata.time).toUTCString()),s}async revalidate(e,t){let r=new fB(e,{headers:this.policy.revalidationHeaders(e)});try{var s=await Xee(r,{...t,headers:void 0})}catch(a){if(!this.policy.mustRevalidate)return this.respond(e.method,t,"stale");throw a}if(this.policy.revalidated(r,s)){let a=pB(e,s,t);for(let c of mB)!uu(a.resHeaders,c)&&uu(this.entry.metadata.resHeaders,c)&&(a.resHeaders[c]=this.entry.metadata.resHeaders[c]);for(let c of t.cacheAdditionalHeaders){let u=uu(a.resHeaders,c),l=uu(this.entry.metadata.resHeaders,c),h=uu(this.policy.response.headers,c);!u&&l&&(a.resHeaders[c]=this.entry.metadata.resHeaders[c]),!h&&u&&(this.policy.response.headers[c]=a.resHeaders[c])}try{await Zs.index.insert(t.cachePath,this.key,this.entry.integrity,{size:this.entry.size,metadata:a})}catch{}return this.respond(e.method,t,"revalidated")}return new i({request:e,response:s,options:t}).store("updated")}};gB.exports=$_});var wB=d((Iwe,EB)=>{var{NotCachedError:ete}=jL(),q_=yB(),tte=Pd(),SB=o(async(i,e)=>{let t=await q_.find(i,e);if(!t){if(e.cache==="only-if-cached")throw new ete(i.url);let s=await tte(i,e);return new q_({request:i,response:s,options:e}).store("miss")}if(e.cache==="no-cache")return t.revalidate(i,e);let r=t.policy.needsRevalidation(i);return e.cache==="force-cache"||e.cache==="only-if-cached"||!r?t.respond(i.method,e,r?"stale":"hit"):t.revalidate(i,e)},"cacheFetch");SB.invalidate=async(i,e)=>{if(e.cachePath)return q_.invalidate(i,e)};EB.exports=SB});var OB=d((vwe,IB)=>{"use strict";var{FetchError:V_,Request:ite,isRedirect:rte}=bo(),z_=require("url"),ste=Xw(),_B=wB(),nte=Pd(),ote=o((i,e,t)=>{if(!rte(e.status)||t.redirect==="manual")return!1;if(t.redirect==="error")throw new V_(`redirect mode is set to error: ${i.url}`,"no-redirect",{code:"ENOREDIRECT"});if(!e.headers.has("location"))throw new V_(`redirect location header missing for: ${i.url}`,"no-location",{code:"EINVALIDREDIRECT"});if(i.counter>=i.follow)throw new V_(`maximum redirect reached at: ${i.url}`,"max-redirect",{code:"EMAXREDIRECT"});return!0},"canFollowRedirect"),ate=o((i,e,t)=>{let r={...t},s=e.headers.get("location"),n=new z_.URL(s,/^https?:/.test(s)?void 0:i.url);return new z_.URL(i.url).hostname!==n.hostname&&(i.headers.delete("authorization"),i.headers.delete("cookie")),(e.status===303||i.method==="POST"&&[301,302].includes(e.status))&&(r.method="GET",r.body=null,i.headers.delete("content-length")),r.headers={},i.headers.forEach((c,u)=>{r.headers[u]=c}),r.counter=++i.counter,{request:new ite(z_.format(n),r),options:r}},"getRedirect"),bB=o(async(i,e)=>{let t=ste.storable(i,e)?await _B(i,e):await nte(i,e);if(!["GET","HEAD"].includes(i.method)&&t.status>=200&&t.status<=399&&await _B.invalidate(i,e),!ote(i,t,e))return t;let r=ate(i,t,e);return bB(r.request,r.options)},"fetch");IB.exports=bB});var lu=d((Rwe,Bo)=>{var{FetchError:cte,Headers:ute,Request:vB,Response:lte}=bo(),hte=hL(),fte=OB(),Md=o((i,e)=>{let t=hte(e),r=new vB(i,t);return fte(r,t)},"makeFetchHappen");Md.defaults=(i,e={},t=Md)=>{typeof i=="object"&&(e=i,i=null);let r=o((s,n={})=>{let a=s||i,c={...e,...n,headers:{...e.headers,...n.headers}};return t(a,c)},"defaultedFetch");return r.defaults=(s,n={})=>Md.defaults(s,n,r),r};Bo.exports=Md;Bo.exports.FetchError=cte;Bo.exports.Headers=ute;Bo.exports.Request=vB;Bo.exports.Response=lte});var JB=d((Twe,WB)=>{var $={},jB=$.LEFT_BRACE=1,Fd=$.RIGHT_BRACE=2,$B=$.LEFT_BRACKET=3,W_=$.RIGHT_BRACKET=4,Ud=$.COLON=5,jd=$.COMMA=6,qB=$.TRUE=7,VB=$.FALSE=8,zB=$.NULL=9,$d=$.STRING=10,HB=$.NUMBER=11,Ys=$.START=17,GB=$.STOP=18,CB=$.TRUE1=33,RB=$.TRUE2=34,AB=$.TRUE3=35,TB=$.FALSE1=49,NB=$.FALSE2=50,PB=$.FALSE3=51,DB=$.FALSE4=52,xB=$.NULL1=65,LB=$.NULL2=66,MB=$.NULL3=67,BB=$.NUMBER1=81,H_=$.NUMBER3=83,ri=$.STRING1=97,kB=$.STRING2=98,FB=$.STRING3=99,dte=$.STRING4=100,pte=$.STRING5=101,UB=$.STRING6=102,ko=$.VALUE=113,G_=$.KEY=114,Bd=$.OBJECT=129,kd=$.ARRAY=130,mte=92,gte=47,yte=8,Ste=12,Ete=10,wte=13,_te=9,qd=64*1024;function zr(){this.tState=Ys,this.value=void 0,this.string=void 0,this.stringBuffer=Buffer.alloc?Buffer.alloc(qd):new Buffer(qd),this.stringBufferOffset=0,this.unicode=void 0,this.highSurrogate=void 0,this.key=void 0,this.mode=void 0,this.stack=[],this.state=ko,this.bytes_remaining=0,this.bytes_in_sequence=0,this.temp_buffs={2:new Buffer(2),3:new Buffer(3),4:new Buffer(4)},this.offset=-1}o(zr,"Parser");zr.toknam=function(i){for(var e=Object.keys($),t=0,r=e.length;t<r;t++){var s=e[t];if($[s]===i)return s}return i&&"0x"+i.toString(16)};var Ft=zr.prototype;Ft.onError=function(i){throw i};Ft.charError=function(i,e){this.tState=GB,this.onError(new Error("Unexpected "+JSON.stringify(String.fromCharCode(i[e]))+" at position "+e+" in state "+zr.toknam(this.tState)))};Ft.appendStringChar=function(i){this.stringBufferOffset>=qd&&(this.string+=this.stringBuffer.toString("utf8"),this.stringBufferOffset=0),this.stringBuffer[this.stringBufferOffset++]=i};Ft.appendStringBuf=function(i,e,t){var r=i.length;typeof e=="number"&&(typeof t=="number"?t<0?r=i.length-e+t:r=t-e:r=i.length-e),r<0&&(r=0),this.stringBufferOffset+r>qd&&(this.string+=this.stringBuffer.toString("utf8",0,this.stringBufferOffset),this.stringBufferOffset=0),i.copy(this.stringBuffer,this.stringBufferOffset,e,t),this.stringBufferOffset+=r};Ft.write=function(i){typeof i=="string"&&(i=new Buffer(i));for(var e,t=0,r=i.length;t<r;t++)if(this.tState===Ys){if(e=i[t],this.offset++,e===123)this.onToken(jB,"{");else if(e===125)this.onToken(Fd,"}");else if(e===91)this.onToken($B,"[");else if(e===93)this.onToken(W_,"]");else if(e===58)this.onToken(Ud,":");else if(e===44)this.onToken(jd,",");else if(e===116)this.tState=CB;else if(e===102)this.tState=TB;else if(e===110)this.tState=xB;else if(e===34)this.string="",this.stringBufferOffset=0,this.tState=ri;else if(e===45)this.string="-",this.tState=BB;else if(e>=48&&e<64)this.string=String.fromCharCode(e),this.tState=H_;else if(!(e===32||e===9||e===10||e===13))return this.charError(i,t)}else if(this.tState===ri)if(e=i[t],this.bytes_remaining>0){for(var s=0;s<this.bytes_remaining;s++)this.temp_buffs[this.bytes_in_sequence][this.bytes_in_sequence-this.bytes_remaining+s]=i[s];this.appendStringBuf(this.temp_buffs[this.bytes_in_sequence]),this.bytes_in_sequence=this.bytes_remaining=0,t=t+s-1}else if(this.bytes_remaining===0&&e>=128){if(e<=193||e>244)return this.onError(new Error("Invalid UTF-8 character at position "+t+" in state "+zr.toknam(this.tState)));if(e>=194&&e<=223&&(this.bytes_in_sequence=2),e>=224&&e<=239&&(this.bytes_in_sequence=3),e>=240&&e<=244&&(this.bytes_in_sequence=4),this.bytes_in_sequence+t>i.length){for(var n=0;n<=i.length-1-t;n++)this.temp_buffs[this.bytes_in_sequence][n]=i[t+n];this.bytes_remaining=t+this.bytes_in_sequence-i.length,t=i.length-1}else this.appendStringBuf(i,t,t+this.bytes_in_sequence),t=t+this.bytes_in_sequence-1}else if(e===34)this.tState=Ys,this.string+=this.stringBuffer.toString("utf8",0,this.stringBufferOffset),this.stringBufferOffset=0,this.onToken($d,this.string),this.offset+=Buffer.byteLength(this.string,"utf8")+1,this.string=void 0;else if(e===92)this.tState=kB;else if(e>=32)this.appendStringChar(e);else return this.charError(i,t);else if(this.tState===kB)if(e=i[t],e===34)this.appendStringChar(e),this.tState=ri;else if(e===92)this.appendStringChar(mte),this.tState=ri;else if(e===47)this.appendStringChar(gte),this.tState=ri;else if(e===98)this.appendStringChar(yte),this.tState=ri;else if(e===102)this.appendStringChar(Ste),this.tState=ri;else if(e===110)this.appendStringChar(Ete),this.tState=ri;else if(e===114)this.appendStringChar(wte),this.tState=ri;else if(e===116)this.appendStringChar(_te),this.tState=ri;else if(e===117)this.unicode="",this.tState=FB;else return this.charError(i,t);else if(this.tState===FB||this.tState===dte||this.tState===pte||this.tState===UB)if(e=i[t],e>=48&&e<64||e>64&&e<=70||e>96&&e<=102){if(this.unicode+=String.fromCharCode(e),this.tState++===UB){var a=parseInt(this.unicode,16);this.unicode=void 0,this.highSurrogate!==void 0&&a>=56320&&a<57344?(this.appendStringBuf(new Buffer(String.fromCharCode(this.highSurrogate,a))),this.highSurrogate=void 0):this.highSurrogate===void 0&&a>=55296&&a<56320?this.highSurrogate=a:(this.highSurrogate!==void 0&&(this.appendStringBuf(new Buffer(String.fromCharCode(this.highSurrogate))),this.highSurrogate=void 0),this.appendStringBuf(new Buffer(String.fromCharCode(a)))),this.tState=ri}}else return this.charError(i,t);else if(this.tState===BB||this.tState===H_)switch(e=i[t],e){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 46:case 101:case 69:case 43:case 45:this.string+=String.fromCharCode(e),this.tState=H_;break;default:this.tState=Ys;var c=Number(this.string);if(isNaN(c))return this.charError(i,t);this.string.match(/[0-9]+/)==this.string&&c.toString()!=this.string?this.onToken($d,this.string):this.onToken(HB,c),this.offset+=this.string.length-1,this.string=void 0,t--;break}else if(this.tState===CB)if(i[t]===114)this.tState=RB;else return this.charError(i,t);else if(this.tState===RB)if(i[t]===117)this.tState=AB;else return this.charError(i,t);else if(this.tState===AB)if(i[t]===101)this.tState=Ys,this.onToken(qB,!0),this.offset+=3;else return this.charError(i,t);else if(this.tState===TB)if(i[t]===97)this.tState=NB;else return this.charError(i,t);else if(this.tState===NB)if(i[t]===108)this.tState=PB;else return this.charError(i,t);else if(this.tState===PB)if(i[t]===115)this.tState=DB;else return this.charError(i,t);else if(this.tState===DB)if(i[t]===101)this.tState=Ys,this.onToken(VB,!1),this.offset+=4;else return this.charError(i,t);else if(this.tState===xB)if(i[t]===117)this.tState=LB;else return this.charError(i,t);else if(this.tState===LB)if(i[t]===108)this.tState=MB;else return this.charError(i,t);else if(this.tState===MB)if(i[t]===108)this.tState=Ys,this.onToken(zB,null),this.offset+=3;else return this.charError(i,t)};Ft.onToken=function(i,e){};Ft.parseError=function(i,e){this.tState=GB,this.onError(new Error("Unexpected "+zr.toknam(i)+(e?"("+JSON.stringify(e)+")":"")+" in state "+zr.toknam(this.state)))};Ft.push=function(){this.stack.push({value:this.value,key:this.key,mode:this.mode})};Ft.pop=function(){var i=this.value,e=this.stack.pop();this.value=e.value,this.key=e.key,this.mode=e.mode,this.emit(i),this.mode||(this.state=ko)};Ft.emit=function(i){this.mode&&(this.state=jd),this.onValue(i)};Ft.onValue=function(i){};Ft.onToken=function(i,e){if(this.state===ko)if(i===$d||i===HB||i===qB||i===VB||i===zB)this.value&&(this.value[this.key]=e),this.emit(e);else if(i===jB)this.push(),this.value?this.value=this.value[this.key]={}:this.value={},this.key=void 0,this.state=G_,this.mode=Bd;else if(i===$B)this.push(),this.value?this.value=this.value[this.key]=[]:this.value=[],this.key=0,this.mode=kd,this.state=ko;else if(i===Fd)if(this.mode===Bd)this.pop();else return this.parseError(i,e);else if(i===W_)if(this.mode===kd)this.pop();else return this.parseError(i,e);else return this.parseError(i,e);else if(this.state===G_)if(i===$d)this.key=e,this.state=Ud;else if(i===Fd)this.pop();else return this.parseError(i,e);else if(this.state===Ud)if(i===Ud)this.state=ko;else return this.parseError(i,e);else if(this.state===jd)if(i===jd)this.mode===kd?(this.key++,this.state=ko):this.mode===Bd&&(this.state=G_);else if(i===W_&&this.mode===kd||i===Fd&&this.mode===Bd)this.pop();else return this.parseError(i,e);else return this.parseError(i,e)};zr.C=$;WB.exports=zr});var YB=d((Pwe,ZB)=>{var bte=JB(),{Minipass:Ite}=te(),Vd=class extends Error{static{o(this,"JSONStreamError")}constructor(e,t){super(e.message),Error.captureStackTrace(this,t||this.constructor)}get name(){return"JSONStreamError"}},KB=o((i,e)=>typeof i=="string"?String(e)===i:i&&typeof i.test=="function"?i.test(e):typeof i=="boolean"||typeof i=="object"?i:typeof i=="function"?i(e):!1,"check"),J_=class i extends Ite{static{o(this,"JSONStream")}#e=0;#t=!1;#i=null;#r=null;#s=null;#u;#c;#f=null;#n=null;constructor(e){super({...e,objectMode:!0});let t=this.#c=new bte;t.onValue=r=>this.#a(r),this.#u=t.onToken,t.onToken=(r,s)=>this.#d(r,s),t.onError=r=>this.#o(r),this.#f=typeof e.path=="string"?e.path.split(".").map(r=>r==="$*"?{emitKey:!0}:r==="*"?!0:r===""?{recurse:!0}:r):Array.isArray(e.path)&&e.path.length?e.path:null,typeof e.map=="function"&&(this.#s=e.map)}#h(e,t){this.#r!==!1&&(this.#r=this.#r||{},this.#r[e]=t),this.#i!==!1&&this.#r===!1&&(this.#i=this.#i||{},this.#i[e]=t)}#o(e){let t=this.#t?this.end:this.write;return this.#t=!1,this.emit("error",new Vd(e,t))}#d(e,t){let r=this.#c;if(this.#u.call(this.#c,e,t),r.stack.length===0&&this.#n){let s=this.#n;this.#f||super.write(s),this.#n=null,this.#e=0}}#a(e){let t=this.#c;if(this.#n=e,!this.#f)return;let r=0,s=0,n=!1;for(;r<this.#f.length;){let c=this.#f[r];if(s++,c&&!c.recurse){let u=s===t.stack.length?t:t.stack[s];if(!u)return;if(!KB(c,u.key)){this.#h(u.key,e);return}n=!!c.emitKey,r++}else{if(r++,r>=this.#f.length)return;let u=this.#f[r];if(!u)return;for(;;){let l=s===t.stack.length?t:t.stack[s];if(!l)return;if(KB(u,l.key)){r++,Object.isFrozen(t.stack[s])||(t.stack[s].value=null);break}else this.#h(l.key,e);s++}}}if(this.#r){let c=this.#r;this.#r=!1,this.emit("header",c)}if(s!==t.stack.length)return;this.#e++;let a=t.stack.slice(1).map(c=>c.key).concat([t.key]);if(e!=null){let c=this.#s?this.#s(e,a):e;if(c!=null){let u=n?{value:c}:c;n&&(u.key=t.key),super.write(u)}}t.value&&delete t.value[t.key];for(let c of t.stack)c.value=null}write(e,t){if(typeof e=="string")e=Buffer.from(e,t);else if(!Buffer.isBuffer(e))return this.emit("error",new TypeError("Can only parse JSON from string or buffer input"));return this.#c.write(e),this.flowing}end(e,t){this.#t=!0,e&&this.write(e,t);let r=this.#r;this.#r=null;let s=this.#i;return this.#i=null,r&&this.emit("header",r),s&&this.emit("footer",s),super.end()}static get JSONStreamError(){return Vd}static parse(e,t){return new i({path:e,map:t})}};ZB.exports=J_});var K_=d((xwe,Fo)=>{"use strict";var{HttpErrorAuthOTP:Ote}=vw(),vte=sL(),QB=uL(),Cte=lu(),Rte=YB(),Ate=Hn(),Tte=require("querystring"),zd=require("url"),XB=Lc(),{Minipass:Nte}=te(),Hd=Uw(),Pte=o(i=>{try{return!!new zd.URL(i)}catch{return!1}},"urlIsValid");Fo.exports=Gd;function Gd(i,e={}){let t={...Hd,...e},r=Pte(i),s=t.registry||Hd.registry;r||(s=t.registry=t.spec&&ek(t.spec,t)||t.registry||s,i=`${s.trim().replace(/\/?$/g,"")}/${i.trim().replace(/^\//,"")}`,new zd.URL(i));let n=t.method||"GET",a=Date.now(),c=QB(i,t),u=Mte(i,c,t),l=t.body,h=Nte.isStream(l),f=l&&typeof l=="object"&&typeof l.then=="function";if(l&&!h&&!f&&typeof l!="string"&&!Buffer.isBuffer(l)?(u["content-type"]=u["content-type"]||"application/json",l=JSON.stringify(l)):l&&!u["content-type"]&&(u["content-type"]="application/octet-stream"),t.gzip)if(u["content-encoding"]="gzip",h){let y=new XB.Gzip;l.on("error",g=>y.emit("error",g)),l=l.pipe(y)}else f||(l=new XB.Gzip().end(l).concat());let p=new zd.URL(i);if(t.query){let y=typeof t.query=="string"?Tte.parse(t.query):t.query;Object.keys(y).forEach(g=>{y[g]!==void 0&&p.searchParams.set(g,y[g])}),i=zd.format(p)}p.searchParams.get("write")==="true"&&n==="GET"&&(t.offline=!1,t.preferOffline=!1,t.preferOnline=!0);let m=o(async y=>{let g=Cte(i,{agent:t.agent,algorithms:t.algorithms,body:y,cache:Lte(t),cachePath:t.cache,ca:t.ca,cert:c.cert||t.cert,headers:u,integrity:t.integrity,key:c.key||t.key,localAddress:t.localAddress,maxSockets:t.maxSockets,memoize:t.memoize,method:n,noProxy:t.noProxy,proxy:t.httpsProxy||t.proxy,retry:t.retry?t.retry:{retries:t.fetchRetries,factor:t.fetchRetryFactor,minTimeout:t.fetchRetryMintimeout,maxTimeout:t.fetchRetryMaxtimeout},strictSSL:t.strictSSL,timeout:t.timeout||3e4}).then(S=>vte({method:n,uri:i,res:S,registry:s,startTime:a,auth:c,opts:t}));return typeof t.otpPrompt=="function"?g.catch(async S=>{if(S instanceof Ote){let E;try{E=await t.otpPrompt()}catch{}if(!E)throw S;return Gd(i,{...t,otp:E})}throw S}):g},"doFetch");return Promise.resolve(l).then(m)}o(Gd,"regFetch");Fo.exports.getAuth=QB;Fo.exports.json=Dte;function Dte(i,e){return Gd(i,e).then(t=>t.json())}o(Dte,"fetchJSON");Fo.exports.json.stream=xte;function xte(i,e,t={}){let r={...Hd,...t},s=Rte.parse(e,r.mapJSON);return Gd(i,r).then(n=>n.body.on("error",a=>s.emit("error",a)).pipe(s)).catch(n=>s.emit("error",n)),s}o(xte,"fetchJSONStream");Fo.exports.pickRegistry=ek;function ek(i,e={}){i=Ate(i);let t=i.scope&&e[i.scope.replace(/^@?/,"@")+":registry"];return!t&&e.scope&&(t=e[e.scope.replace(/^@?/,"@")+":registry"]),t||(t=e.registry||Hd.registry),t}o(ek,"pickRegistry");function Lte(i){return i.offline?"only-if-cached":i.preferOffline?"force-cache":i.preferOnline?"no-cache":"default"}o(Lte,"getCacheMode");function Mte(i,e,t){let r=Object.assign({"user-agent":t.userAgent},t.headers||{});return t.authType&&(r["npm-auth-type"]=t.authType),t.scope&&(r["npm-scope"]=t.scope),t.npmSession&&(r["npm-session"]=t.npmSession),t.npmCommand&&(r["npm-command"]=t.npmCommand),e.token?r.authorization=`Bearer ${e.token}`:e.auth&&(r.authorization=`Basic ${e.auth}`),t.otp&&(r["npm-otp"]=t.otp),r}o(Mte,"getHeaders")});var Z_=d((Mwe,Bte)=>{Bte.exports={name:"pacote",version:"21.0.1",description:"JavaScript package downloader",author:"GitHub Inc.",bin:{pacote:"bin/index.js"},license:"ISC",main:"lib/index.js",scripts:{test:"tap",snap:"tap",lint:"npm run eslint",postlint:"template-oss-check",lintfix:"npm run eslint -- --fix",posttest:"npm run lint","template-oss-apply":"template-oss-apply --force",eslint:'eslint "**/*.{js,cjs,ts,mjs,jsx,tsx}"'},tap:{timeout:300,"nyc-arg":["--exclude","tap-snapshots/**"]},devDependencies:{"@npmcli/arborist":"^9.0.2","@npmcli/eslint-config":"^5.0.0","@npmcli/template-oss":"4.23.4","hosted-git-info":"^9.0.0","mutate-fs":"^2.1.1",nock:"^13.2.4","npm-registry-mock":"^1.3.2",rimraf:"^6.0.1",tap:"^16.0.1"},files:["bin/","lib/"],keywords:["packages","npm","git"],dependencies:{"@npmcli/git":"^6.0.0","@npmcli/installed-package-contents":"^3.0.0","@npmcli/package-json":"^7.0.0","@npmcli/promise-spawn":"^8.0.0","@npmcli/run-script":"^10.0.0",cacache:"^20.0.0","fs-minipass":"^3.0.0",minipass:"^7.0.2","npm-package-arg":"^13.0.0","npm-packlist":"^10.0.1","npm-pick-manifest":"^10.0.0","npm-registry-fetch":"^19.0.0","proc-log":"^5.0.0","promise-retry":"^2.0.1",sigstore:"^4.0.0",ssri:"^12.0.0",tar:"^7.4.3"},engines:{node:"^20.17.0 || >=22.9.0"},repository:{type:"git",url:"git+https://github.com/npm/pacote.git"},templateOSS:{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",version:"4.23.4",windowsCI:!1,publish:"true"}}});var hu=d((Bwe,sk)=>{var kte=K_(),{Minipass:Fte}=te(),Ute=Fs(),tk=Eo(),ik=ks(),rk=Z_().version,Y_=class extends Ute{static{o(this,"RemoteFetcher")}constructor(e,t){super(e,t),this.resolved=this.spec.fetchSpec;let r=new URL(this.resolved);this.replaceRegistryHost!=="never"&&(this.replaceRegistryHost==="always"||this.replaceRegistryHost===r.host)&&(this.resolved=new URL(r.pathname,this.registry).href);let s=this.spec.name?`${this.spec.name}@`:"";this.pkgid=t.pkgid?t.pkgid:`remote:${s}${this.resolved}`}get[ik.cacheFetches](){return!1}[ik.tarballFromResolved](){let e=new Fte;e.hasIntegrityEmitter=!0;let t={...this.opts,headers:this.#e(),spec:this.spec,integrity:this.integrity,algorithms:[this.pickIntegrityAlgorithm()]};return kte(this.resolved,t).then(r=>{r.body.on("error",s=>e.emit("error",s)),r.body.on("integrity",s=>{this.integrity=s,e.emit("integrity",s)}),r.body.pipe(e)}).catch(r=>e.emit("error",r)),e}#e(){return{"user-agent":this.opts.userAgent||`pacote/${rk} node/${process.version}`,...this.opts.headers||{},"pacote-version":rk,"pacote-req-type":"tarball","pacote-pkg-id":this.pkgid,...this.integrity?{"pacote-integrity":String(this.integrity)}:{},...this.opts.headers||{}}}get types(){return["remote"]}packument(){return tk.prototype.packument.apply(this)}manifest(){return tk.prototype.manifest.apply(this)}};sk.exports=Y_});var ok=d((Fwe,nk)=>{var jte=o((i,e)=>{if(i.hosted){let t=i.hosted,r={noCommittish:!0};return`${t.https&&t.auth?t.https(r):t.shortcut(r)}#${e}`}else return i.rawSpec.replace(/#.*$/,"")+`#${e}`},"addGitSha");nk.exports=jte});var ck=d((jwe,ak)=>{var $te=jl();ak.exports=(i,e,t,r,s)=>{let n=i.endsWith(".js"),a=n?process.execPath:i,c=(n?[i]:[]).concat(e);return $te(a,c,{cwd:t,env:r},s)}});var Q_=d(($we,fk)=>{var qte=bc(),Wd=_y(),Vte=Hn(),zte=ih(),{Minipass:Hte}=te(),{log:uk}=_t(),Gte=Kf(),Wte=Fs(),lk=Eo(),Jte=hu(),Jd=ks(),Kte=ok(),Zte=ck(),Yte=/^[a-f0-9]{40}$/,Kd=o((i,e)=>i.sshurl&&!(i.https&&i.auth)&&hk(i.sshurl(e))||i.https&&hk(i.https(e)),"repoUrl"),hk=o(i=>i&&`git+${i}`.replace(/^(git\+)+/,"git+"),"addGitPlus"),X_=class extends Wte{static{o(this,"GitFetcher")}constructor(e,t){super(e,t),this.opts.integrity&&(delete this.opts.integrity,uk.warn(`skipping integrity check for git dependency ${this.spec.fetchSpec}`)),this.resolvedRef=null,this.spec.hosted&&(this.from=this.spec.hosted.shortcut({noCommittish:!1})),this.spec.gitCommittish&&Yte.test(this.spec.gitCommittish)?(this.resolvedSha=this.spec.gitCommittish,this.resolved=this.spec.hosted?Kd(this.spec.hosted,{noCommittish:!1}):this.spec.rawSpec):this.resolvedSha="",this.Arborist=t.Arborist||null}static repoUrl(e,t){return Kd(e,t)}get types(){return["git"]}resolve(){if(this.resolved)return super.resolve();let e=this.spec.hosted;return e?this.#e(e):this.#t(this.spec.fetchSpec)}#e(e){return this.#t(e.https&&e.https()).catch(t=>{if(t instanceof Wd.errors.GitPathspecError)throw t;let r=e.sshurl&&e.sshurl();if(!r||e.auth)throw t;return this.#t(r)})}#t(e){if(!e)return Promise.reject(new Error(`No git url for ${this.spec}`));let t=this.spec.gitRange,r=this.spec.name;return Wd.revs(e,this.opts).then(s=>t?zte({versions:s.versions,"dist-tags":s["dist-tags"],name:r},t,this.opts):this.spec.gitCommittish?s.refs[this.spec.gitCommittish]||s.refs[s.shas[this.spec.gitCommittish]]:s.refs.HEAD).then(s=>!s||!s.sha?this.#s():(this.resolvedRef=s,this.resolvedSha=s.sha,this.#r(s.sha),this.resolved))}#i(e){this.resolved=this.spec.hosted?Kd(Vte(e).hosted,{noCommittish:!1}):e}#r(e){this.#i(Kte(this.spec,e))}#s(){return this.#c(()=>this.resolved)}#u(e){return this[Jd.readPackageJson](e).then(t=>{let r=t.scripts;if(!t.workspaces&&(!r||!(r.postinstall||r.build||r.preinstall||r.install||r.prepack||r.prepare)))return;let s=process.env._PACOTE_NO_PREPARE_?process.env._PACOTE_NO_PREPARE_.split(`
57
+ `):[];if(s.includes(this.resolved)){uk.info("prepare","skip prepare, already seen",this.resolved);return}return s.push(this.resolved),Zte(this.npmBin,[].concat(this.npmInstallCmd).concat(this.npmCliConfig),e,{...process.env,_PACOTE_NO_PREPARE_:s.join(`
58
+ `)},{message:"git dep preparation failed"})})}[Jd.tarballFromResolved](){let e=new Hte;return e.resolved=this.resolved,e.from=this.from,this.#c(t=>this.#u(t).then(()=>new Promise((r,s)=>{if(!this.Arborist)throw new Error("GitFetcher requires an Arborist constructor to pack a tarball");let a=new Gte(`file:${t}`,{...this.opts,Arborist:this.Arborist,resolved:null,integrity:null})[Jd.tarballFromResolved]();a.on("error",s),a.on("end",r),a.pipe(e)}))).catch(t=>e.emit("error",t)),e}#c(e,t=!0){let r={tmpPrefix:"git-clone"},s=this.resolvedSha||this.spec.gitCommittish,n=this.spec.hosted,a=this.resolved;return t=t&&n&&a===Kd(n,{noCommittish:!1})&&n.tarball,qte.tmp.withTmp(this.cache,r,async c=>{if(t){let l=this.spec.name?`${this.spec.name}@`:"";return new Jte(n.tarball({noCommittish:!1}),{...this.opts,allowGitIgnore:!0,pkgid:`git:${l}${this.resolved}`,resolved:this.resolved,integrity:null}).extract(c).then(()=>e(c),h=>{if(h.constructor.name.match(/^Http/))return this.#c(e,!1);throw h})}let u=await(n?this.#f(s,c):this.#n(this.spec.fetchSpec,s,c));return this.resolvedSha=u,this.resolved||await this.#r(u),e(c)})}#f(e,t){let r=this.spec.hosted;return this.#n(r.https({noCommittish:!0}),e,t).catch(s=>{if(s instanceof Wd.errors.GitPathspecError)throw s;let n=r.sshurl&&r.sshurl({noCommittish:!0});if(!n||r.auth)throw s;return this.#n(n,e,t)})}#n(e,t,r){let{opts:s,spec:n}=this;return Wd.clone(e,t,r,{...s,spec:n})}manifest(){return this.package?Promise.resolve(this.package):this.spec.hosted&&this.resolved?lk.prototype.manifest.apply(this):this.#c(e=>this[Jd.readPackageJson](e).then(t=>this.package={...t,_resolved:this.resolved,_from:this.from}))}packument(){return lk.prototype.packument.apply(this)}};fk.exports=X_});var eb=d(Hr=>{"use strict";Object.defineProperty(Hr,"__esModule",{value:!0});Hr.Signature=Hr.Envelope=void 0;Hr.Envelope={fromJSON(i){return{payload:Zd(i.payload)?Buffer.from(dk(i.payload)):Buffer.alloc(0),payloadType:Zd(i.payloadType)?globalThis.String(i.payloadType):"",signatures:globalThis.Array.isArray(i?.signatures)?i.signatures.map(e=>Hr.Signature.fromJSON(e)):[]}},toJSON(i){let e={};return i.payload.length!==0&&(e.payload=pk(i.payload)),i.payloadType!==""&&(e.payloadType=i.payloadType),i.signatures?.length&&(e.signatures=i.signatures.map(t=>Hr.Signature.toJSON(t))),e}};Hr.Signature={fromJSON(i){return{sig:Zd(i.sig)?Buffer.from(dk(i.sig)):Buffer.alloc(0),keyid:Zd(i.keyid)?globalThis.String(i.keyid):""}},toJSON(i){let e={};return i.sig.length!==0&&(e.sig=pk(i.sig)),i.keyid!==""&&(e.keyid=i.keyid),e}};function dk(i){return Uint8Array.from(globalThis.Buffer.from(i,"base64"))}o(dk,"bytesFromBase64");function pk(i){return globalThis.Buffer.from(i).toString("base64")}o(pk,"base64FromBytes");function Zd(i){return i!=null}o(Zd,"isSet")});var gk=d(Yd=>{"use strict";Object.defineProperty(Yd,"__esModule",{value:!0});Yd.Timestamp=void 0;Yd.Timestamp={fromJSON(i){return{seconds:mk(i.seconds)?globalThis.String(i.seconds):"0",nanos:mk(i.nanos)?globalThis.Number(i.nanos):0}},toJSON(i){let e={};return i.seconds!=="0"&&(e.seconds=i.seconds),i.nanos!==0&&(e.nanos=Math.round(i.nanos)),e}};function mk(i){return i!=null}o(mk,"isSet")});var Uo=d(x=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0});x.TimeRange=x.X509CertificateChain=x.SubjectAlternativeName=x.X509Certificate=x.DistinguishedName=x.ObjectIdentifierValuePair=x.ObjectIdentifier=x.PublicKeyIdentifier=x.PublicKey=x.RFC3161SignedTimestamp=x.LogId=x.MessageSignature=x.HashOutput=x.SubjectAlternativeNameType=x.PublicKeyDetails=x.HashAlgorithm=void 0;x.hashAlgorithmFromJSON=Sk;x.hashAlgorithmToJSON=Ek;x.publicKeyDetailsFromJSON=wk;x.publicKeyDetailsToJSON=_k;x.subjectAlternativeNameTypeFromJSON=bk;x.subjectAlternativeNameTypeToJSON=Ik;var Xte=gk(),at;(function(i){i[i.HASH_ALGORITHM_UNSPECIFIED=0]="HASH_ALGORITHM_UNSPECIFIED",i[i.SHA2_256=1]="SHA2_256",i[i.SHA2_384=2]="SHA2_384",i[i.SHA2_512=3]="SHA2_512",i[i.SHA3_256=4]="SHA3_256",i[i.SHA3_384=5]="SHA3_384"})(at||(x.HashAlgorithm=at={}));function Sk(i){switch(i){case 0:case"HASH_ALGORITHM_UNSPECIFIED":return at.HASH_ALGORITHM_UNSPECIFIED;case 1:case"SHA2_256":return at.SHA2_256;case 2:case"SHA2_384":return at.SHA2_384;case 3:case"SHA2_512":return at.SHA2_512;case 4:case"SHA3_256":return at.SHA3_256;case 5:case"SHA3_384":return at.SHA3_384;default:throw new globalThis.Error("Unrecognized enum value "+i+" for enum HashAlgorithm")}}o(Sk,"hashAlgorithmFromJSON");function Ek(i){switch(i){case at.HASH_ALGORITHM_UNSPECIFIED:return"HASH_ALGORITHM_UNSPECIFIED";case at.SHA2_256:return"SHA2_256";case at.SHA2_384:return"SHA2_384";case at.SHA2_512:return"SHA2_512";case at.SHA3_256:return"SHA3_256";case at.SHA3_384:return"SHA3_384";default:throw new globalThis.Error("Unrecognized enum value "+i+" for enum HashAlgorithm")}}o(Ek,"hashAlgorithmToJSON");var D;(function(i){i[i.PUBLIC_KEY_DETAILS_UNSPECIFIED=0]="PUBLIC_KEY_DETAILS_UNSPECIFIED",i[i.PKCS1_RSA_PKCS1V5=1]="PKCS1_RSA_PKCS1V5",i[i.PKCS1_RSA_PSS=2]="PKCS1_RSA_PSS",i[i.PKIX_RSA_PKCS1V5=3]="PKIX_RSA_PKCS1V5",i[i.PKIX_RSA_PSS=4]="PKIX_RSA_PSS",i[i.PKIX_RSA_PKCS1V15_2048_SHA256=9]="PKIX_RSA_PKCS1V15_2048_SHA256",i[i.PKIX_RSA_PKCS1V15_3072_SHA256=10]="PKIX_RSA_PKCS1V15_3072_SHA256",i[i.PKIX_RSA_PKCS1V15_4096_SHA256=11]="PKIX_RSA_PKCS1V15_4096_SHA256",i[i.PKIX_RSA_PSS_2048_SHA256=16]="PKIX_RSA_PSS_2048_SHA256",i[i.PKIX_RSA_PSS_3072_SHA256=17]="PKIX_RSA_PSS_3072_SHA256",i[i.PKIX_RSA_PSS_4096_SHA256=18]="PKIX_RSA_PSS_4096_SHA256",i[i.PKIX_ECDSA_P256_HMAC_SHA_256=6]="PKIX_ECDSA_P256_HMAC_SHA_256",i[i.PKIX_ECDSA_P256_SHA_256=5]="PKIX_ECDSA_P256_SHA_256",i[i.PKIX_ECDSA_P384_SHA_384=12]="PKIX_ECDSA_P384_SHA_384",i[i.PKIX_ECDSA_P521_SHA_512=13]="PKIX_ECDSA_P521_SHA_512",i[i.PKIX_ED25519=7]="PKIX_ED25519",i[i.PKIX_ED25519_PH=8]="PKIX_ED25519_PH",i[i.PKIX_ECDSA_P384_SHA_256=19]="PKIX_ECDSA_P384_SHA_256",i[i.PKIX_ECDSA_P521_SHA_256=20]="PKIX_ECDSA_P521_SHA_256",i[i.LMS_SHA256=14]="LMS_SHA256",i[i.LMOTS_SHA256=15]="LMOTS_SHA256",i[i.ML_DSA_65=21]="ML_DSA_65",i[i.ML_DSA_87=22]="ML_DSA_87"})(D||(x.PublicKeyDetails=D={}));function wk(i){switch(i){case 0:case"PUBLIC_KEY_DETAILS_UNSPECIFIED":return D.PUBLIC_KEY_DETAILS_UNSPECIFIED;case 1:case"PKCS1_RSA_PKCS1V5":return D.PKCS1_RSA_PKCS1V5;case 2:case"PKCS1_RSA_PSS":return D.PKCS1_RSA_PSS;case 3:case"PKIX_RSA_PKCS1V5":return D.PKIX_RSA_PKCS1V5;case 4:case"PKIX_RSA_PSS":return D.PKIX_RSA_PSS;case 9:case"PKIX_RSA_PKCS1V15_2048_SHA256":return D.PKIX_RSA_PKCS1V15_2048_SHA256;case 10:case"PKIX_RSA_PKCS1V15_3072_SHA256":return D.PKIX_RSA_PKCS1V15_3072_SHA256;case 11:case"PKIX_RSA_PKCS1V15_4096_SHA256":return D.PKIX_RSA_PKCS1V15_4096_SHA256;case 16:case"PKIX_RSA_PSS_2048_SHA256":return D.PKIX_RSA_PSS_2048_SHA256;case 17:case"PKIX_RSA_PSS_3072_SHA256":return D.PKIX_RSA_PSS_3072_SHA256;case 18:case"PKIX_RSA_PSS_4096_SHA256":return D.PKIX_RSA_PSS_4096_SHA256;case 6:case"PKIX_ECDSA_P256_HMAC_SHA_256":return D.PKIX_ECDSA_P256_HMAC_SHA_256;case 5:case"PKIX_ECDSA_P256_SHA_256":return D.PKIX_ECDSA_P256_SHA_256;case 12:case"PKIX_ECDSA_P384_SHA_384":return D.PKIX_ECDSA_P384_SHA_384;case 13:case"PKIX_ECDSA_P521_SHA_512":return D.PKIX_ECDSA_P521_SHA_512;case 7:case"PKIX_ED25519":return D.PKIX_ED25519;case 8:case"PKIX_ED25519_PH":return D.PKIX_ED25519_PH;case 19:case"PKIX_ECDSA_P384_SHA_256":return D.PKIX_ECDSA_P384_SHA_256;case 20:case"PKIX_ECDSA_P521_SHA_256":return D.PKIX_ECDSA_P521_SHA_256;case 14:case"LMS_SHA256":return D.LMS_SHA256;case 15:case"LMOTS_SHA256":return D.LMOTS_SHA256;case 21:case"ML_DSA_65":return D.ML_DSA_65;case 22:case"ML_DSA_87":return D.ML_DSA_87;default:throw new globalThis.Error("Unrecognized enum value "+i+" for enum PublicKeyDetails")}}o(wk,"publicKeyDetailsFromJSON");function _k(i){switch(i){case D.PUBLIC_KEY_DETAILS_UNSPECIFIED:return"PUBLIC_KEY_DETAILS_UNSPECIFIED";case D.PKCS1_RSA_PKCS1V5:return"PKCS1_RSA_PKCS1V5";case D.PKCS1_RSA_PSS:return"PKCS1_RSA_PSS";case D.PKIX_RSA_PKCS1V5:return"PKIX_RSA_PKCS1V5";case D.PKIX_RSA_PSS:return"PKIX_RSA_PSS";case D.PKIX_RSA_PKCS1V15_2048_SHA256:return"PKIX_RSA_PKCS1V15_2048_SHA256";case D.PKIX_RSA_PKCS1V15_3072_SHA256:return"PKIX_RSA_PKCS1V15_3072_SHA256";case D.PKIX_RSA_PKCS1V15_4096_SHA256:return"PKIX_RSA_PKCS1V15_4096_SHA256";case D.PKIX_RSA_PSS_2048_SHA256:return"PKIX_RSA_PSS_2048_SHA256";case D.PKIX_RSA_PSS_3072_SHA256:return"PKIX_RSA_PSS_3072_SHA256";case D.PKIX_RSA_PSS_4096_SHA256:return"PKIX_RSA_PSS_4096_SHA256";case D.PKIX_ECDSA_P256_HMAC_SHA_256:return"PKIX_ECDSA_P256_HMAC_SHA_256";case D.PKIX_ECDSA_P256_SHA_256:return"PKIX_ECDSA_P256_SHA_256";case D.PKIX_ECDSA_P384_SHA_384:return"PKIX_ECDSA_P384_SHA_384";case D.PKIX_ECDSA_P521_SHA_512:return"PKIX_ECDSA_P521_SHA_512";case D.PKIX_ED25519:return"PKIX_ED25519";case D.PKIX_ED25519_PH:return"PKIX_ED25519_PH";case D.PKIX_ECDSA_P384_SHA_256:return"PKIX_ECDSA_P384_SHA_256";case D.PKIX_ECDSA_P521_SHA_256:return"PKIX_ECDSA_P521_SHA_256";case D.LMS_SHA256:return"LMS_SHA256";case D.LMOTS_SHA256:return"LMOTS_SHA256";case D.ML_DSA_65:return"ML_DSA_65";case D.ML_DSA_87:return"ML_DSA_87";default:throw new globalThis.Error("Unrecognized enum value "+i+" for enum PublicKeyDetails")}}o(_k,"publicKeyDetailsToJSON");var Ti;(function(i){i[i.SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED=0]="SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED",i[i.EMAIL=1]="EMAIL",i[i.URI=2]="URI",i[i.OTHER_NAME=3]="OTHER_NAME"})(Ti||(x.SubjectAlternativeNameType=Ti={}));function bk(i){switch(i){case 0:case"SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED":return Ti.SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED;case 1:case"EMAIL":return Ti.EMAIL;case 2:case"URI":return Ti.URI;case 3:case"OTHER_NAME":return Ti.OTHER_NAME;default:throw new globalThis.Error("Unrecognized enum value "+i+" for enum SubjectAlternativeNameType")}}o(bk,"subjectAlternativeNameTypeFromJSON");function Ik(i){switch(i){case Ti.SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED:return"SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED";case Ti.EMAIL:return"EMAIL";case Ti.URI:return"URI";case Ti.OTHER_NAME:return"OTHER_NAME";default:throw new globalThis.Error("Unrecognized enum value "+i+" for enum SubjectAlternativeNameType")}}o(Ik,"subjectAlternativeNameTypeToJSON");x.HashOutput={fromJSON(i){return{algorithm:we(i.algorithm)?Sk(i.algorithm):0,digest:we(i.digest)?Buffer.from(Xs(i.digest)):Buffer.alloc(0)}},toJSON(i){let e={};return i.algorithm!==0&&(e.algorithm=Ek(i.algorithm)),i.digest.length!==0&&(e.digest=Qs(i.digest)),e}};x.MessageSignature={fromJSON(i){return{messageDigest:we(i.messageDigest)?x.HashOutput.fromJSON(i.messageDigest):void 0,signature:we(i.signature)?Buffer.from(Xs(i.signature)):Buffer.alloc(0)}},toJSON(i){let e={};return i.messageDigest!==void 0&&(e.messageDigest=x.HashOutput.toJSON(i.messageDigest)),i.signature.length!==0&&(e.signature=Qs(i.signature)),e}};x.LogId={fromJSON(i){return{keyId:we(i.keyId)?Buffer.from(Xs(i.keyId)):Buffer.alloc(0)}},toJSON(i){let e={};return i.keyId.length!==0&&(e.keyId=Qs(i.keyId)),e}};x.RFC3161SignedTimestamp={fromJSON(i){return{signedTimestamp:we(i.signedTimestamp)?Buffer.from(Xs(i.signedTimestamp)):Buffer.alloc(0)}},toJSON(i){let e={};return i.signedTimestamp.length!==0&&(e.signedTimestamp=Qs(i.signedTimestamp)),e}};x.PublicKey={fromJSON(i){return{rawBytes:we(i.rawBytes)?Buffer.from(Xs(i.rawBytes)):void 0,keyDetails:we(i.keyDetails)?wk(i.keyDetails):0,validFor:we(i.validFor)?x.TimeRange.fromJSON(i.validFor):void 0}},toJSON(i){let e={};return i.rawBytes!==void 0&&(e.rawBytes=Qs(i.rawBytes)),i.keyDetails!==0&&(e.keyDetails=_k(i.keyDetails)),i.validFor!==void 0&&(e.validFor=x.TimeRange.toJSON(i.validFor)),e}};x.PublicKeyIdentifier={fromJSON(i){return{hint:we(i.hint)?globalThis.String(i.hint):""}},toJSON(i){let e={};return i.hint!==""&&(e.hint=i.hint),e}};x.ObjectIdentifier={fromJSON(i){return{id:globalThis.Array.isArray(i?.id)?i.id.map(e=>globalThis.Number(e)):[]}},toJSON(i){let e={};return i.id?.length&&(e.id=i.id.map(t=>Math.round(t))),e}};x.ObjectIdentifierValuePair={fromJSON(i){return{oid:we(i.oid)?x.ObjectIdentifier.fromJSON(i.oid):void 0,value:we(i.value)?Buffer.from(Xs(i.value)):Buffer.alloc(0)}},toJSON(i){let e={};return i.oid!==void 0&&(e.oid=x.ObjectIdentifier.toJSON(i.oid)),i.value.length!==0&&(e.value=Qs(i.value)),e}};x.DistinguishedName={fromJSON(i){return{organization:we(i.organization)?globalThis.String(i.organization):"",commonName:we(i.commonName)?globalThis.String(i.commonName):""}},toJSON(i){let e={};return i.organization!==""&&(e.organization=i.organization),i.commonName!==""&&(e.commonName=i.commonName),e}};x.X509Certificate={fromJSON(i){return{rawBytes:we(i.rawBytes)?Buffer.from(Xs(i.rawBytes)):Buffer.alloc(0)}},toJSON(i){let e={};return i.rawBytes.length!==0&&(e.rawBytes=Qs(i.rawBytes)),e}};x.SubjectAlternativeName={fromJSON(i){return{type:we(i.type)?bk(i.type):0,identity:we(i.regexp)?{$case:"regexp",regexp:globalThis.String(i.regexp)}:we(i.value)?{$case:"value",value:globalThis.String(i.value)}:void 0}},toJSON(i){let e={};return i.type!==0&&(e.type=Ik(i.type)),i.identity?.$case==="regexp"?e.regexp=i.identity.regexp:i.identity?.$case==="value"&&(e.value=i.identity.value),e}};x.X509CertificateChain={fromJSON(i){return{certificates:globalThis.Array.isArray(i?.certificates)?i.certificates.map(e=>x.X509Certificate.fromJSON(e)):[]}},toJSON(i){let e={};return i.certificates?.length&&(e.certificates=i.certificates.map(t=>x.X509Certificate.toJSON(t))),e}};x.TimeRange={fromJSON(i){return{start:we(i.start)?yk(i.start):void 0,end:we(i.end)?yk(i.end):void 0}},toJSON(i){let e={};return i.start!==void 0&&(e.start=i.start.toISOString()),i.end!==void 0&&(e.end=i.end.toISOString()),e}};function Xs(i){return Uint8Array.from(globalThis.Buffer.from(i,"base64"))}o(Xs,"bytesFromBase64");function Qs(i){return globalThis.Buffer.from(i).toString("base64")}o(Qs,"base64FromBytes");function Qte(i){let e=(globalThis.Number(i.seconds)||0)*1e3;return e+=(i.nanos||0)/1e6,new globalThis.Date(e)}o(Qte,"fromTimestamp");function yk(i){return i instanceof globalThis.Date?i:typeof i=="string"?new globalThis.Date(i):Qte(Xte.Timestamp.fromJSON(i))}o(yk,"fromJsonTimestamp");function we(i){return i!=null}o(we,"isSet")});var tb=d(_e=>{"use strict";Object.defineProperty(_e,"__esModule",{value:!0});_e.TransparencyLogEntry=_e.InclusionPromise=_e.InclusionProof=_e.Checkpoint=_e.KindVersion=void 0;var Ok=Uo();_e.KindVersion={fromJSON(i){return{kind:Ze(i.kind)?globalThis.String(i.kind):"",version:Ze(i.version)?globalThis.String(i.version):""}},toJSON(i){let e={};return i.kind!==""&&(e.kind=i.kind),i.version!==""&&(e.version=i.version),e}};_e.Checkpoint={fromJSON(i){return{envelope:Ze(i.envelope)?globalThis.String(i.envelope):""}},toJSON(i){let e={};return i.envelope!==""&&(e.envelope=i.envelope),e}};_e.InclusionProof={fromJSON(i){return{logIndex:Ze(i.logIndex)?globalThis.String(i.logIndex):"0",rootHash:Ze(i.rootHash)?Buffer.from(Xd(i.rootHash)):Buffer.alloc(0),treeSize:Ze(i.treeSize)?globalThis.String(i.treeSize):"0",hashes:globalThis.Array.isArray(i?.hashes)?i.hashes.map(e=>Buffer.from(Xd(e))):[],checkpoint:Ze(i.checkpoint)?_e.Checkpoint.fromJSON(i.checkpoint):void 0}},toJSON(i){let e={};return i.logIndex!=="0"&&(e.logIndex=i.logIndex),i.rootHash.length!==0&&(e.rootHash=Qd(i.rootHash)),i.treeSize!=="0"&&(e.treeSize=i.treeSize),i.hashes?.length&&(e.hashes=i.hashes.map(t=>Qd(t))),i.checkpoint!==void 0&&(e.checkpoint=_e.Checkpoint.toJSON(i.checkpoint)),e}};_e.InclusionPromise={fromJSON(i){return{signedEntryTimestamp:Ze(i.signedEntryTimestamp)?Buffer.from(Xd(i.signedEntryTimestamp)):Buffer.alloc(0)}},toJSON(i){let e={};return i.signedEntryTimestamp.length!==0&&(e.signedEntryTimestamp=Qd(i.signedEntryTimestamp)),e}};_e.TransparencyLogEntry={fromJSON(i){return{logIndex:Ze(i.logIndex)?globalThis.String(i.logIndex):"0",logId:Ze(i.logId)?Ok.LogId.fromJSON(i.logId):void 0,kindVersion:Ze(i.kindVersion)?_e.KindVersion.fromJSON(i.kindVersion):void 0,integratedTime:Ze(i.integratedTime)?globalThis.String(i.integratedTime):"0",inclusionPromise:Ze(i.inclusionPromise)?_e.InclusionPromise.fromJSON(i.inclusionPromise):void 0,inclusionProof:Ze(i.inclusionProof)?_e.InclusionProof.fromJSON(i.inclusionProof):void 0,canonicalizedBody:Ze(i.canonicalizedBody)?Buffer.from(Xd(i.canonicalizedBody)):Buffer.alloc(0)}},toJSON(i){let e={};return i.logIndex!=="0"&&(e.logIndex=i.logIndex),i.logId!==void 0&&(e.logId=Ok.LogId.toJSON(i.logId)),i.kindVersion!==void 0&&(e.kindVersion=_e.KindVersion.toJSON(i.kindVersion)),i.integratedTime!=="0"&&(e.integratedTime=i.integratedTime),i.inclusionPromise!==void 0&&(e.inclusionPromise=_e.InclusionPromise.toJSON(i.inclusionPromise)),i.inclusionProof!==void 0&&(e.inclusionProof=_e.InclusionProof.toJSON(i.inclusionProof)),i.canonicalizedBody.length!==0&&(e.canonicalizedBody=Qd(i.canonicalizedBody)),e}};function Xd(i){return Uint8Array.from(globalThis.Buffer.from(i,"base64"))}o(Xd,"bytesFromBase64");function Qd(i){return globalThis.Buffer.from(i).toString("base64")}o(Qd,"base64FromBytes");function Ze(i){return i!=null}o(Ze,"isSet")});var ib=d(Ut=>{"use strict";Object.defineProperty(Ut,"__esModule",{value:!0});Ut.Bundle=Ut.VerificationMaterial=Ut.TimestampVerificationData=void 0;var vk=eb(),Ni=Uo(),Ck=tb();Ut.TimestampVerificationData={fromJSON(i){return{rfc3161Timestamps:globalThis.Array.isArray(i?.rfc3161Timestamps)?i.rfc3161Timestamps.map(e=>Ni.RFC3161SignedTimestamp.fromJSON(e)):[]}},toJSON(i){let e={};return i.rfc3161Timestamps?.length&&(e.rfc3161Timestamps=i.rfc3161Timestamps.map(t=>Ni.RFC3161SignedTimestamp.toJSON(t))),e}};Ut.VerificationMaterial={fromJSON(i){return{content:Gr(i.publicKey)?{$case:"publicKey",publicKey:Ni.PublicKeyIdentifier.fromJSON(i.publicKey)}:Gr(i.x509CertificateChain)?{$case:"x509CertificateChain",x509CertificateChain:Ni.X509CertificateChain.fromJSON(i.x509CertificateChain)}:Gr(i.certificate)?{$case:"certificate",certificate:Ni.X509Certificate.fromJSON(i.certificate)}:void 0,tlogEntries:globalThis.Array.isArray(i?.tlogEntries)?i.tlogEntries.map(e=>Ck.TransparencyLogEntry.fromJSON(e)):[],timestampVerificationData:Gr(i.timestampVerificationData)?Ut.TimestampVerificationData.fromJSON(i.timestampVerificationData):void 0}},toJSON(i){let e={};return i.content?.$case==="publicKey"?e.publicKey=Ni.PublicKeyIdentifier.toJSON(i.content.publicKey):i.content?.$case==="x509CertificateChain"?e.x509CertificateChain=Ni.X509CertificateChain.toJSON(i.content.x509CertificateChain):i.content?.$case==="certificate"&&(e.certificate=Ni.X509Certificate.toJSON(i.content.certificate)),i.tlogEntries?.length&&(e.tlogEntries=i.tlogEntries.map(t=>Ck.TransparencyLogEntry.toJSON(t))),i.timestampVerificationData!==void 0&&(e.timestampVerificationData=Ut.TimestampVerificationData.toJSON(i.timestampVerificationData)),e}};Ut.Bundle={fromJSON(i){return{mediaType:Gr(i.mediaType)?globalThis.String(i.mediaType):"",verificationMaterial:Gr(i.verificationMaterial)?Ut.VerificationMaterial.fromJSON(i.verificationMaterial):void 0,content:Gr(i.messageSignature)?{$case:"messageSignature",messageSignature:Ni.MessageSignature.fromJSON(i.messageSignature)}:Gr(i.dsseEnvelope)?{$case:"dsseEnvelope",dsseEnvelope:vk.Envelope.fromJSON(i.dsseEnvelope)}:void 0}},toJSON(i){let e={};return i.mediaType!==""&&(e.mediaType=i.mediaType),i.verificationMaterial!==void 0&&(e.verificationMaterial=Ut.VerificationMaterial.toJSON(i.verificationMaterial)),i.content?.$case==="messageSignature"?e.messageSignature=Ni.MessageSignature.toJSON(i.content.messageSignature):i.content?.$case==="dsseEnvelope"&&(e.dsseEnvelope=vk.Envelope.toJSON(i.content.dsseEnvelope)),e}};function Gr(i){return i!=null}o(Gr,"isSet")});var rb=d(L=>{"use strict";Object.defineProperty(L,"__esModule",{value:!0});L.ClientTrustConfig=L.ServiceConfiguration=L.Service=L.SigningConfig=L.TrustedRoot=L.CertificateAuthority=L.TransparencyLogInstance=L.ServiceSelector=void 0;L.serviceSelectorFromJSON=Rk;L.serviceSelectorToJSON=Ak;var qe=Uo(),Pi;(function(i){i[i.SERVICE_SELECTOR_UNDEFINED=0]="SERVICE_SELECTOR_UNDEFINED",i[i.ALL=1]="ALL",i[i.ANY=2]="ANY",i[i.EXACT=3]="EXACT"})(Pi||(L.ServiceSelector=Pi={}));function Rk(i){switch(i){case 0:case"SERVICE_SELECTOR_UNDEFINED":return Pi.SERVICE_SELECTOR_UNDEFINED;case 1:case"ALL":return Pi.ALL;case 2:case"ANY":return Pi.ANY;case 3:case"EXACT":return Pi.EXACT;default:throw new globalThis.Error("Unrecognized enum value "+i+" for enum ServiceSelector")}}o(Rk,"serviceSelectorFromJSON");function Ak(i){switch(i){case Pi.SERVICE_SELECTOR_UNDEFINED:return"SERVICE_SELECTOR_UNDEFINED";case Pi.ALL:return"ALL";case Pi.ANY:return"ANY";case Pi.EXACT:return"EXACT";default:throw new globalThis.Error("Unrecognized enum value "+i+" for enum ServiceSelector")}}o(Ak,"serviceSelectorToJSON");L.TransparencyLogInstance={fromJSON(i){return{baseUrl:ae(i.baseUrl)?globalThis.String(i.baseUrl):"",hashAlgorithm:ae(i.hashAlgorithm)?(0,qe.hashAlgorithmFromJSON)(i.hashAlgorithm):0,publicKey:ae(i.publicKey)?qe.PublicKey.fromJSON(i.publicKey):void 0,logId:ae(i.logId)?qe.LogId.fromJSON(i.logId):void 0,checkpointKeyId:ae(i.checkpointKeyId)?qe.LogId.fromJSON(i.checkpointKeyId):void 0,operator:ae(i.operator)?globalThis.String(i.operator):""}},toJSON(i){let e={};return i.baseUrl!==""&&(e.baseUrl=i.baseUrl),i.hashAlgorithm!==0&&(e.hashAlgorithm=(0,qe.hashAlgorithmToJSON)(i.hashAlgorithm)),i.publicKey!==void 0&&(e.publicKey=qe.PublicKey.toJSON(i.publicKey)),i.logId!==void 0&&(e.logId=qe.LogId.toJSON(i.logId)),i.checkpointKeyId!==void 0&&(e.checkpointKeyId=qe.LogId.toJSON(i.checkpointKeyId)),i.operator!==""&&(e.operator=i.operator),e}};L.CertificateAuthority={fromJSON(i){return{subject:ae(i.subject)?qe.DistinguishedName.fromJSON(i.subject):void 0,uri:ae(i.uri)?globalThis.String(i.uri):"",certChain:ae(i.certChain)?qe.X509CertificateChain.fromJSON(i.certChain):void 0,validFor:ae(i.validFor)?qe.TimeRange.fromJSON(i.validFor):void 0,operator:ae(i.operator)?globalThis.String(i.operator):""}},toJSON(i){let e={};return i.subject!==void 0&&(e.subject=qe.DistinguishedName.toJSON(i.subject)),i.uri!==""&&(e.uri=i.uri),i.certChain!==void 0&&(e.certChain=qe.X509CertificateChain.toJSON(i.certChain)),i.validFor!==void 0&&(e.validFor=qe.TimeRange.toJSON(i.validFor)),i.operator!==""&&(e.operator=i.operator),e}};L.TrustedRoot={fromJSON(i){return{mediaType:ae(i.mediaType)?globalThis.String(i.mediaType):"",tlogs:globalThis.Array.isArray(i?.tlogs)?i.tlogs.map(e=>L.TransparencyLogInstance.fromJSON(e)):[],certificateAuthorities:globalThis.Array.isArray(i?.certificateAuthorities)?i.certificateAuthorities.map(e=>L.CertificateAuthority.fromJSON(e)):[],ctlogs:globalThis.Array.isArray(i?.ctlogs)?i.ctlogs.map(e=>L.TransparencyLogInstance.fromJSON(e)):[],timestampAuthorities:globalThis.Array.isArray(i?.timestampAuthorities)?i.timestampAuthorities.map(e=>L.CertificateAuthority.fromJSON(e)):[]}},toJSON(i){let e={};return i.mediaType!==""&&(e.mediaType=i.mediaType),i.tlogs?.length&&(e.tlogs=i.tlogs.map(t=>L.TransparencyLogInstance.toJSON(t))),i.certificateAuthorities?.length&&(e.certificateAuthorities=i.certificateAuthorities.map(t=>L.CertificateAuthority.toJSON(t))),i.ctlogs?.length&&(e.ctlogs=i.ctlogs.map(t=>L.TransparencyLogInstance.toJSON(t))),i.timestampAuthorities?.length&&(e.timestampAuthorities=i.timestampAuthorities.map(t=>L.CertificateAuthority.toJSON(t))),e}};L.SigningConfig={fromJSON(i){return{mediaType:ae(i.mediaType)?globalThis.String(i.mediaType):"",caUrls:globalThis.Array.isArray(i?.caUrls)?i.caUrls.map(e=>L.Service.fromJSON(e)):[],oidcUrls:globalThis.Array.isArray(i?.oidcUrls)?i.oidcUrls.map(e=>L.Service.fromJSON(e)):[],rekorTlogUrls:globalThis.Array.isArray(i?.rekorTlogUrls)?i.rekorTlogUrls.map(e=>L.Service.fromJSON(e)):[],rekorTlogConfig:ae(i.rekorTlogConfig)?L.ServiceConfiguration.fromJSON(i.rekorTlogConfig):void 0,tsaUrls:globalThis.Array.isArray(i?.tsaUrls)?i.tsaUrls.map(e=>L.Service.fromJSON(e)):[],tsaConfig:ae(i.tsaConfig)?L.ServiceConfiguration.fromJSON(i.tsaConfig):void 0}},toJSON(i){let e={};return i.mediaType!==""&&(e.mediaType=i.mediaType),i.caUrls?.length&&(e.caUrls=i.caUrls.map(t=>L.Service.toJSON(t))),i.oidcUrls?.length&&(e.oidcUrls=i.oidcUrls.map(t=>L.Service.toJSON(t))),i.rekorTlogUrls?.length&&(e.rekorTlogUrls=i.rekorTlogUrls.map(t=>L.Service.toJSON(t))),i.rekorTlogConfig!==void 0&&(e.rekorTlogConfig=L.ServiceConfiguration.toJSON(i.rekorTlogConfig)),i.tsaUrls?.length&&(e.tsaUrls=i.tsaUrls.map(t=>L.Service.toJSON(t))),i.tsaConfig!==void 0&&(e.tsaConfig=L.ServiceConfiguration.toJSON(i.tsaConfig)),e}};L.Service={fromJSON(i){return{url:ae(i.url)?globalThis.String(i.url):"",majorApiVersion:ae(i.majorApiVersion)?globalThis.Number(i.majorApiVersion):0,validFor:ae(i.validFor)?qe.TimeRange.fromJSON(i.validFor):void 0,operator:ae(i.operator)?globalThis.String(i.operator):""}},toJSON(i){let e={};return i.url!==""&&(e.url=i.url),i.majorApiVersion!==0&&(e.majorApiVersion=Math.round(i.majorApiVersion)),i.validFor!==void 0&&(e.validFor=qe.TimeRange.toJSON(i.validFor)),i.operator!==""&&(e.operator=i.operator),e}};L.ServiceConfiguration={fromJSON(i){return{selector:ae(i.selector)?Rk(i.selector):0,count:ae(i.count)?globalThis.Number(i.count):0}},toJSON(i){let e={};return i.selector!==0&&(e.selector=Ak(i.selector)),i.count!==0&&(e.count=Math.round(i.count)),e}};L.ClientTrustConfig={fromJSON(i){return{mediaType:ae(i.mediaType)?globalThis.String(i.mediaType):"",trustedRoot:ae(i.trustedRoot)?L.TrustedRoot.fromJSON(i.trustedRoot):void 0,signingConfig:ae(i.signingConfig)?L.SigningConfig.fromJSON(i.signingConfig):void 0}},toJSON(i){let e={};return i.mediaType!==""&&(e.mediaType=i.mediaType),i.trustedRoot!==void 0&&(e.trustedRoot=L.TrustedRoot.toJSON(i.trustedRoot)),i.signingConfig!==void 0&&(e.signingConfig=L.SigningConfig.toJSON(i.signingConfig)),e}};function ae(i){return i!=null}o(ae,"isSet")});var Pk=d(M=>{"use strict";Object.defineProperty(M,"__esModule",{value:!0});M.Input=M.Artifact=M.ArtifactVerificationOptions_ObserverTimestampOptions=M.ArtifactVerificationOptions_TlogIntegratedTimestampOptions=M.ArtifactVerificationOptions_TimestampAuthorityOptions=M.ArtifactVerificationOptions_CtlogOptions=M.ArtifactVerificationOptions_TlogOptions=M.ArtifactVerificationOptions=M.PublicKeyIdentities=M.CertificateIdentities=M.CertificateIdentity=void 0;var Tk=ib(),Wr=Uo(),Nk=rb();M.CertificateIdentity={fromJSON(i){return{issuer:Q(i.issuer)?globalThis.String(i.issuer):"",san:Q(i.san)?Wr.SubjectAlternativeName.fromJSON(i.san):void 0,oids:globalThis.Array.isArray(i?.oids)?i.oids.map(e=>Wr.ObjectIdentifierValuePair.fromJSON(e)):[]}},toJSON(i){let e={};return i.issuer!==""&&(e.issuer=i.issuer),i.san!==void 0&&(e.san=Wr.SubjectAlternativeName.toJSON(i.san)),i.oids?.length&&(e.oids=i.oids.map(t=>Wr.ObjectIdentifierValuePair.toJSON(t))),e}};M.CertificateIdentities={fromJSON(i){return{identities:globalThis.Array.isArray(i?.identities)?i.identities.map(e=>M.CertificateIdentity.fromJSON(e)):[]}},toJSON(i){let e={};return i.identities?.length&&(e.identities=i.identities.map(t=>M.CertificateIdentity.toJSON(t))),e}};M.PublicKeyIdentities={fromJSON(i){return{publicKeys:globalThis.Array.isArray(i?.publicKeys)?i.publicKeys.map(e=>Wr.PublicKey.fromJSON(e)):[]}},toJSON(i){let e={};return i.publicKeys?.length&&(e.publicKeys=i.publicKeys.map(t=>Wr.PublicKey.toJSON(t))),e}};M.ArtifactVerificationOptions={fromJSON(i){return{signers:Q(i.certificateIdentities)?{$case:"certificateIdentities",certificateIdentities:M.CertificateIdentities.fromJSON(i.certificateIdentities)}:Q(i.publicKeys)?{$case:"publicKeys",publicKeys:M.PublicKeyIdentities.fromJSON(i.publicKeys)}:void 0,tlogOptions:Q(i.tlogOptions)?M.ArtifactVerificationOptions_TlogOptions.fromJSON(i.tlogOptions):void 0,ctlogOptions:Q(i.ctlogOptions)?M.ArtifactVerificationOptions_CtlogOptions.fromJSON(i.ctlogOptions):void 0,tsaOptions:Q(i.tsaOptions)?M.ArtifactVerificationOptions_TimestampAuthorityOptions.fromJSON(i.tsaOptions):void 0,integratedTsOptions:Q(i.integratedTsOptions)?M.ArtifactVerificationOptions_TlogIntegratedTimestampOptions.fromJSON(i.integratedTsOptions):void 0,observerOptions:Q(i.observerOptions)?M.ArtifactVerificationOptions_ObserverTimestampOptions.fromJSON(i.observerOptions):void 0}},toJSON(i){let e={};return i.signers?.$case==="certificateIdentities"?e.certificateIdentities=M.CertificateIdentities.toJSON(i.signers.certificateIdentities):i.signers?.$case==="publicKeys"&&(e.publicKeys=M.PublicKeyIdentities.toJSON(i.signers.publicKeys)),i.tlogOptions!==void 0&&(e.tlogOptions=M.ArtifactVerificationOptions_TlogOptions.toJSON(i.tlogOptions)),i.ctlogOptions!==void 0&&(e.ctlogOptions=M.ArtifactVerificationOptions_CtlogOptions.toJSON(i.ctlogOptions)),i.tsaOptions!==void 0&&(e.tsaOptions=M.ArtifactVerificationOptions_TimestampAuthorityOptions.toJSON(i.tsaOptions)),i.integratedTsOptions!==void 0&&(e.integratedTsOptions=M.ArtifactVerificationOptions_TlogIntegratedTimestampOptions.toJSON(i.integratedTsOptions)),i.observerOptions!==void 0&&(e.observerOptions=M.ArtifactVerificationOptions_ObserverTimestampOptions.toJSON(i.observerOptions)),e}};M.ArtifactVerificationOptions_TlogOptions={fromJSON(i){return{threshold:Q(i.threshold)?globalThis.Number(i.threshold):0,performOnlineVerification:Q(i.performOnlineVerification)?globalThis.Boolean(i.performOnlineVerification):!1,disable:Q(i.disable)?globalThis.Boolean(i.disable):!1}},toJSON(i){let e={};return i.threshold!==0&&(e.threshold=Math.round(i.threshold)),i.performOnlineVerification!==!1&&(e.performOnlineVerification=i.performOnlineVerification),i.disable!==!1&&(e.disable=i.disable),e}};M.ArtifactVerificationOptions_CtlogOptions={fromJSON(i){return{threshold:Q(i.threshold)?globalThis.Number(i.threshold):0,disable:Q(i.disable)?globalThis.Boolean(i.disable):!1}},toJSON(i){let e={};return i.threshold!==0&&(e.threshold=Math.round(i.threshold)),i.disable!==!1&&(e.disable=i.disable),e}};M.ArtifactVerificationOptions_TimestampAuthorityOptions={fromJSON(i){return{threshold:Q(i.threshold)?globalThis.Number(i.threshold):0,disable:Q(i.disable)?globalThis.Boolean(i.disable):!1}},toJSON(i){let e={};return i.threshold!==0&&(e.threshold=Math.round(i.threshold)),i.disable!==!1&&(e.disable=i.disable),e}};M.ArtifactVerificationOptions_TlogIntegratedTimestampOptions={fromJSON(i){return{threshold:Q(i.threshold)?globalThis.Number(i.threshold):0,disable:Q(i.disable)?globalThis.Boolean(i.disable):!1}},toJSON(i){let e={};return i.threshold!==0&&(e.threshold=Math.round(i.threshold)),i.disable!==!1&&(e.disable=i.disable),e}};M.ArtifactVerificationOptions_ObserverTimestampOptions={fromJSON(i){return{threshold:Q(i.threshold)?globalThis.Number(i.threshold):0,disable:Q(i.disable)?globalThis.Boolean(i.disable):!1}},toJSON(i){let e={};return i.threshold!==0&&(e.threshold=Math.round(i.threshold)),i.disable!==!1&&(e.disable=i.disable),e}};M.Artifact={fromJSON(i){return{data:Q(i.artifactUri)?{$case:"artifactUri",artifactUri:globalThis.String(i.artifactUri)}:Q(i.artifact)?{$case:"artifact",artifact:Buffer.from(eie(i.artifact))}:Q(i.artifactDigest)?{$case:"artifactDigest",artifactDigest:Wr.HashOutput.fromJSON(i.artifactDigest)}:void 0}},toJSON(i){let e={};return i.data?.$case==="artifactUri"?e.artifactUri=i.data.artifactUri:i.data?.$case==="artifact"?e.artifact=tie(i.data.artifact):i.data?.$case==="artifactDigest"&&(e.artifactDigest=Wr.HashOutput.toJSON(i.data.artifactDigest)),e}};M.Input={fromJSON(i){return{artifactTrustRoot:Q(i.artifactTrustRoot)?Nk.TrustedRoot.fromJSON(i.artifactTrustRoot):void 0,artifactVerificationOptions:Q(i.artifactVerificationOptions)?M.ArtifactVerificationOptions.fromJSON(i.artifactVerificationOptions):void 0,bundle:Q(i.bundle)?Tk.Bundle.fromJSON(i.bundle):void 0,artifact:Q(i.artifact)?M.Artifact.fromJSON(i.artifact):void 0}},toJSON(i){let e={};return i.artifactTrustRoot!==void 0&&(e.artifactTrustRoot=Nk.TrustedRoot.toJSON(i.artifactTrustRoot)),i.artifactVerificationOptions!==void 0&&(e.artifactVerificationOptions=M.ArtifactVerificationOptions.toJSON(i.artifactVerificationOptions)),i.bundle!==void 0&&(e.bundle=Tk.Bundle.toJSON(i.bundle)),i.artifact!==void 0&&(e.artifact=M.Artifact.toJSON(i.artifact)),e}};function eie(i){return Uint8Array.from(globalThis.Buffer.from(i,"base64"))}o(eie,"bytesFromBase64");function tie(i){return globalThis.Buffer.from(i).toString("base64")}o(tie,"base64FromBytes");function Q(i){return i!=null}o(Q,"isSet")});var fu=d(jt=>{"use strict";var iie=jt&&jt.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(i,r,s)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),jo=jt&&jt.__exportStar||function(i,e){for(var t in i)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&iie(e,i,t)};Object.defineProperty(jt,"__esModule",{value:!0});jo(eb(),jt);jo(ib(),jt);jo(Uo(),jt);jo(tb(),jt);jo(rb(),jt);jo(Pk(),jt)});var ep=d(ct=>{"use strict";Object.defineProperty(ct,"__esModule",{value:!0});ct.BUNDLE_V03_MEDIA_TYPE=ct.BUNDLE_V03_LEGACY_MEDIA_TYPE=ct.BUNDLE_V02_MEDIA_TYPE=ct.BUNDLE_V01_MEDIA_TYPE=void 0;ct.isBundleWithCertificateChain=rie;ct.isBundleWithPublicKey=sie;ct.isBundleWithMessageSignature=nie;ct.isBundleWithDsseEnvelope=oie;ct.BUNDLE_V01_MEDIA_TYPE="application/vnd.dev.sigstore.bundle+json;version=0.1";ct.BUNDLE_V02_MEDIA_TYPE="application/vnd.dev.sigstore.bundle+json;version=0.2";ct.BUNDLE_V03_LEGACY_MEDIA_TYPE="application/vnd.dev.sigstore.bundle+json;version=0.3";ct.BUNDLE_V03_MEDIA_TYPE="application/vnd.dev.sigstore.bundle.v0.3+json";function rie(i){return i.verificationMaterial.content.$case==="x509CertificateChain"}o(rie,"isBundleWithCertificateChain");function sie(i){return i.verificationMaterial.content.$case==="publicKey"}o(sie,"isBundleWithPublicKey");function nie(i){return i.content.$case==="messageSignature"}o(nie,"isBundleWithMessageSignature");function oie(i){return i.content.$case==="dsseEnvelope"}o(oie,"isBundleWithDsseEnvelope")});var xk=d(ip=>{"use strict";Object.defineProperty(ip,"__esModule",{value:!0});ip.toMessageSignatureBundle=cie;ip.toDSSEBundle=uie;var aie=fu(),tp=ep();function cie(i){return{mediaType:i.certificateChain?tp.BUNDLE_V02_MEDIA_TYPE:tp.BUNDLE_V03_MEDIA_TYPE,content:{$case:"messageSignature",messageSignature:{messageDigest:{algorithm:aie.HashAlgorithm.SHA2_256,digest:i.digest},signature:i.signature}},verificationMaterial:Dk(i)}}o(cie,"toMessageSignatureBundle");function uie(i){return{mediaType:i.certificateChain?tp.BUNDLE_V02_MEDIA_TYPE:tp.BUNDLE_V03_MEDIA_TYPE,content:{$case:"dsseEnvelope",dsseEnvelope:lie(i)},verificationMaterial:Dk(i)}}o(uie,"toDSSEBundle");function lie(i){return{payloadType:i.artifactType,payload:i.artifact,signatures:[hie(i)]}}o(lie,"toEnvelope");function hie(i){return{keyid:i.keyHint||"",sig:i.signature}}o(hie,"toSignature");function Dk(i){return{content:fie(i),tlogEntries:[],timestampVerificationData:{rfc3161Timestamps:[]}}}o(Dk,"toVerificationMaterial");function fie(i){return i.certificate?i.certificateChain?{$case:"x509CertificateChain",x509CertificateChain:{certificates:[{rawBytes:i.certificate}]}}:{$case:"certificate",certificate:{rawBytes:i.certificate}}:{$case:"publicKey",publicKey:{hint:i.keyHint||""}}}o(fie,"toKeyContent")});var nb=d(rp=>{"use strict";Object.defineProperty(rp,"__esModule",{value:!0});rp.ValidationError=void 0;var sb=class extends Error{static{o(this,"ValidationError")}constructor(e,t){super(e),this.fields=t}};rp.ValidationError=sb});var ob=d(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.assertBundle=die;en.assertBundleV01=Lk;en.isBundleV01=pie;en.assertBundleV02=mie;en.assertBundleLatest=gie;var sp=nb();function die(i){let e=np(i);if(e.length>0)throw new sp.ValidationError("invalid bundle",e)}o(die,"assertBundle");function Lk(i){let e=[];if(e.push(...np(i)),e.push(...yie(i)),e.length>0)throw new sp.ValidationError("invalid v0.1 bundle",e)}o(Lk,"assertBundleV01");function pie(i){try{return Lk(i),!0}catch{return!1}}o(pie,"isBundleV01");function mie(i){let e=[];if(e.push(...np(i)),e.push(...Mk(i)),e.length>0)throw new sp.ValidationError("invalid v0.2 bundle",e)}o(mie,"assertBundleV02");function gie(i){let e=[];if(e.push(...np(i)),e.push(...Mk(i)),e.push(...Sie(i)),e.length>0)throw new sp.ValidationError("invalid bundle",e)}o(gie,"assertBundleLatest");function np(i){let e=[];if((i.mediaType===void 0||!i.mediaType.match(/^application\/vnd\.dev\.sigstore\.bundle\+json;version=\d\.\d/)&&!i.mediaType.match(/^application\/vnd\.dev\.sigstore\.bundle\.v\d\.\d\+json/))&&e.push("mediaType"),i.content===void 0)e.push("content");else switch(i.content.$case){case"messageSignature":i.content.messageSignature.messageDigest===void 0?e.push("content.messageSignature.messageDigest"):i.content.messageSignature.messageDigest.digest.length===0&&e.push("content.messageSignature.messageDigest.digest"),i.content.messageSignature.signature.length===0&&e.push("content.messageSignature.signature");break;case"dsseEnvelope":i.content.dsseEnvelope.payload.length===0&&e.push("content.dsseEnvelope.payload"),i.content.dsseEnvelope.signatures.length!==1?e.push("content.dsseEnvelope.signatures"):i.content.dsseEnvelope.signatures[0].sig.length===0&&e.push("content.dsseEnvelope.signatures[0].sig");break}if(i.verificationMaterial===void 0)e.push("verificationMaterial");else{if(i.verificationMaterial.content===void 0)e.push("verificationMaterial.content");else switch(i.verificationMaterial.content.$case){case"x509CertificateChain":i.verificationMaterial.content.x509CertificateChain.certificates.length===0&&e.push("verificationMaterial.content.x509CertificateChain.certificates"),i.verificationMaterial.content.x509CertificateChain.certificates.forEach((t,r)=>{t.rawBytes.length===0&&e.push(`verificationMaterial.content.x509CertificateChain.certificates[${r}].rawBytes`)});break;case"certificate":i.verificationMaterial.content.certificate.rawBytes.length===0&&e.push("verificationMaterial.content.certificate.rawBytes");break}i.verificationMaterial.tlogEntries===void 0?e.push("verificationMaterial.tlogEntries"):i.verificationMaterial.tlogEntries.length>0&&i.verificationMaterial.tlogEntries.forEach((t,r)=>{t.logId===void 0&&e.push(`verificationMaterial.tlogEntries[${r}].logId`),t.kindVersion===void 0&&e.push(`verificationMaterial.tlogEntries[${r}].kindVersion`)})}return e}o(np,"validateBundleBase");function yie(i){let e=[];return i.verificationMaterial&&i.verificationMaterial.tlogEntries?.length>0&&i.verificationMaterial.tlogEntries.forEach((t,r)=>{t.inclusionPromise===void 0&&e.push(`verificationMaterial.tlogEntries[${r}].inclusionPromise`)}),e}o(yie,"validateInclusionPromise");function Mk(i){let e=[];return i.verificationMaterial&&i.verificationMaterial.tlogEntries?.length>0&&i.verificationMaterial.tlogEntries.forEach((t,r)=>{t.inclusionProof===void 0?e.push(`verificationMaterial.tlogEntries[${r}].inclusionProof`):t.inclusionProof.checkpoint===void 0&&e.push(`verificationMaterial.tlogEntries[${r}].inclusionProof.checkpoint`)}),e}o(Mk,"validateInclusionProof");function Sie(i){let e=[];return i.verificationMaterial?.content?.$case==="x509CertificateChain"&&e.push("verificationMaterial.content.$case"),e}o(Sie,"validateNoCertificateChain")});var kk=d(Di=>{"use strict";Object.defineProperty(Di,"__esModule",{value:!0});Di.envelopeToJSON=Di.envelopeFromJSON=Di.bundleToJSON=Di.bundleFromJSON=void 0;var op=fu(),Bk=ep(),ab=ob(),Eie=o(i=>{let e=op.Bundle.fromJSON(i);switch(e.mediaType){case Bk.BUNDLE_V01_MEDIA_TYPE:(0,ab.assertBundleV01)(e);break;case Bk.BUNDLE_V02_MEDIA_TYPE:(0,ab.assertBundleV02)(e);break;default:(0,ab.assertBundleLatest)(e);break}return e},"bundleFromJSON");Di.bundleFromJSON=Eie;var wie=o(i=>op.Bundle.toJSON(i),"bundleToJSON");Di.bundleToJSON=wie;var _ie=o(i=>op.Envelope.fromJSON(i),"envelopeFromJSON");Di.envelopeFromJSON=_ie;var bie=o(i=>op.Envelope.toJSON(i),"envelopeToJSON");Di.envelopeToJSON=bie});var pu=d(k=>{"use strict";Object.defineProperty(k,"__esModule",{value:!0});k.isBundleV01=k.assertBundleV02=k.assertBundleV01=k.assertBundleLatest=k.assertBundle=k.envelopeToJSON=k.envelopeFromJSON=k.bundleToJSON=k.bundleFromJSON=k.ValidationError=k.isBundleWithPublicKey=k.isBundleWithMessageSignature=k.isBundleWithDsseEnvelope=k.isBundleWithCertificateChain=k.BUNDLE_V03_MEDIA_TYPE=k.BUNDLE_V03_LEGACY_MEDIA_TYPE=k.BUNDLE_V02_MEDIA_TYPE=k.BUNDLE_V01_MEDIA_TYPE=k.toMessageSignatureBundle=k.toDSSEBundle=void 0;var Fk=xk();Object.defineProperty(k,"toDSSEBundle",{enumerable:!0,get:o(function(){return Fk.toDSSEBundle},"get")});Object.defineProperty(k,"toMessageSignatureBundle",{enumerable:!0,get:o(function(){return Fk.toMessageSignatureBundle},"get")});var Jr=ep();Object.defineProperty(k,"BUNDLE_V01_MEDIA_TYPE",{enumerable:!0,get:o(function(){return Jr.BUNDLE_V01_MEDIA_TYPE},"get")});Object.defineProperty(k,"BUNDLE_V02_MEDIA_TYPE",{enumerable:!0,get:o(function(){return Jr.BUNDLE_V02_MEDIA_TYPE},"get")});Object.defineProperty(k,"BUNDLE_V03_LEGACY_MEDIA_TYPE",{enumerable:!0,get:o(function(){return Jr.BUNDLE_V03_LEGACY_MEDIA_TYPE},"get")});Object.defineProperty(k,"BUNDLE_V03_MEDIA_TYPE",{enumerable:!0,get:o(function(){return Jr.BUNDLE_V03_MEDIA_TYPE},"get")});Object.defineProperty(k,"isBundleWithCertificateChain",{enumerable:!0,get:o(function(){return Jr.isBundleWithCertificateChain},"get")});Object.defineProperty(k,"isBundleWithDsseEnvelope",{enumerable:!0,get:o(function(){return Jr.isBundleWithDsseEnvelope},"get")});Object.defineProperty(k,"isBundleWithMessageSignature",{enumerable:!0,get:o(function(){return Jr.isBundleWithMessageSignature},"get")});Object.defineProperty(k,"isBundleWithPublicKey",{enumerable:!0,get:o(function(){return Jr.isBundleWithPublicKey},"get")});var Iie=nb();Object.defineProperty(k,"ValidationError",{enumerable:!0,get:o(function(){return Iie.ValidationError},"get")});var ap=kk();Object.defineProperty(k,"bundleFromJSON",{enumerable:!0,get:o(function(){return ap.bundleFromJSON},"get")});Object.defineProperty(k,"bundleToJSON",{enumerable:!0,get:o(function(){return ap.bundleToJSON},"get")});Object.defineProperty(k,"envelopeFromJSON",{enumerable:!0,get:o(function(){return ap.envelopeFromJSON},"get")});Object.defineProperty(k,"envelopeToJSON",{enumerable:!0,get:o(function(){return ap.envelopeToJSON},"get")});var du=ob();Object.defineProperty(k,"assertBundle",{enumerable:!0,get:o(function(){return du.assertBundle},"get")});Object.defineProperty(k,"assertBundleLatest",{enumerable:!0,get:o(function(){return du.assertBundleLatest},"get")});Object.defineProperty(k,"assertBundleV01",{enumerable:!0,get:o(function(){return du.assertBundleV01},"get")});Object.defineProperty(k,"assertBundleV02",{enumerable:!0,get:o(function(){return du.assertBundleV02},"get")});Object.defineProperty(k,"isBundleV01",{enumerable:!0,get:o(function(){return du.isBundleV01},"get")})});var mu=d(up=>{"use strict";Object.defineProperty(up,"__esModule",{value:!0});up.ByteStream=void 0;var cb=class extends Error{static{o(this,"StreamError")}},cp=class i{static{o(this,"ByteStream")}constructor(e){this.start=0,e?(this.buf=e,this.view=Buffer.from(e)):(this.buf=new ArrayBuffer(0),this.view=Buffer.from(this.buf))}get buffer(){return this.view.subarray(0,this.start)}get length(){return this.view.byteLength}get position(){return this.start}seek(e){this.start=e}slice(e,t){let r=e+t;if(r>this.length)throw new cb("request past end of buffer");return this.view.subarray(e,r)}appendChar(e){this.ensureCapacity(1),this.view[this.start]=e,this.start+=1}appendUint16(e){this.ensureCapacity(2);let t=new Uint16Array([e]),r=new Uint8Array(t.buffer);this.view[this.start]=r[1],this.view[this.start+1]=r[0],this.start+=2}appendUint24(e){this.ensureCapacity(3);let t=new Uint32Array([e]),r=new Uint8Array(t.buffer);this.view[this.start]=r[2],this.view[this.start+1]=r[1],this.view[this.start+2]=r[0],this.start+=3}appendView(e){this.ensureCapacity(e.length),this.view.set(e,this.start),this.start+=e.length}getBlock(e){if(e<=0)return Buffer.alloc(0);if(this.start+e>this.view.length)throw new Error("request past end of buffer");let t=this.view.subarray(this.start,this.start+e);return this.start+=e,t}getUint8(){return this.getBlock(1)[0]}getUint16(){let e=this.getBlock(2);return e[0]<<8|e[1]}ensureCapacity(e){if(this.start+e>this.view.byteLength){let t=i.BLOCK_SIZE+(e>i.BLOCK_SIZE?e:0);this.realloc(this.view.byteLength+t)}}realloc(e){let t=new ArrayBuffer(e),r=Buffer.from(t);r.set(this.view),this.buf=t,this.view=r}};up.ByteStream=cp;cp.BLOCK_SIZE=1024});var lp=d($o=>{"use strict";Object.defineProperty($o,"__esModule",{value:!0});$o.ASN1TypeError=$o.ASN1ParseError=void 0;var ub=class extends Error{static{o(this,"ASN1ParseError")}};$o.ASN1ParseError=ub;var lb=class extends Error{static{o(this,"ASN1TypeError")}};$o.ASN1TypeError=lb});var jk=d(hp=>{"use strict";Object.defineProperty(hp,"__esModule",{value:!0});hp.decodeLength=Oie;hp.encodeLength=vie;var Uk=lp();function Oie(i){let e=i.getUint8();if((e&128)===0)return e;let t=e&127;if(t>6)throw new Uk.ASN1ParseError("length exceeds 6 byte limit");let r=0;for(let s=0;s<t;s++)r=r*256+i.getUint8();if(r===0)throw new Uk.ASN1ParseError("indefinite length encoding not supported");return r}o(Oie,"decodeLength");function vie(i){if(i<128)return Buffer.from([i]);let e=BigInt(i),t=[];for(;e>0n;)t.unshift(Number(e&255n)),e=e>>8n;return Buffer.from([128|t.length,...t])}o(vie,"encodeLength")});var qk=d(Kr=>{"use strict";Object.defineProperty(Kr,"__esModule",{value:!0});Kr.parseInteger=Aie;Kr.parseStringASCII=$k;Kr.parseTime=Tie;Kr.parseOID=Nie;Kr.parseBoolean=Pie;Kr.parseBitString=Die;var Cie=/^(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(\.\d{3})?Z$/,Rie=/^(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(\.\d{3})?Z$/;function Aie(i){let e=0,t=i.length,r=i[e],s=r>127,n=s?255:0;for(;r==n&&++e<t;)r=i[e];if(t-e===0)return BigInt(s?-1:0);r=s?r-256:r;let c=BigInt(r);for(let u=e+1;u<t;++u)c=c*BigInt(256)+BigInt(i[u]);return c}o(Aie,"parseInteger");function $k(i){return i.toString("ascii")}o($k,"parseStringASCII");function Tie(i,e){let t=$k(i),r=e?Cie.exec(t):Rie.exec(t);if(!r)throw new Error("invalid time");if(e){let s=Number(r[1]);s+=s>=50?1900:2e3,r[1]=s.toString()}return new Date(`${r[1]}-${r[2]}-${r[3]}T${r[4]}:${r[5]}:${r[6]}Z`)}o(Tie,"parseTime");function Nie(i){let e=0,t=i.length,r=i[e++],s=Math.floor(r/40),n=r%40,a=`${s}.${n}`,c=0;for(;e<t;++e)r=i[e],c=(c<<7)+(r&127),(r&128)===0&&(a+=`.${c}`,c=0);return a}o(Nie,"parseOID");function Pie(i){return i[0]!==0}o(Pie,"parseBoolean");function Die(i){let e=i[0],t=1,r=i.length,s=[];for(let n=t;n<r;++n){let a=i[n],c=n===r-1?e:0;for(let u=7;u>=c;--u)s.push(a>>u&1)}return s}o(Die,"parseBitString")});var zk=d(fp=>{"use strict";Object.defineProperty(fp,"__esModule",{value:!0});fp.ASN1Tag=void 0;var Vk=lp(),tn={BOOLEAN:1,INTEGER:2,BIT_STRING:3,OCTET_STRING:4,OBJECT_IDENTIFIER:6,SEQUENCE:16,SET:17,PRINTABLE_STRING:19,UTC_TIME:23,GENERALIZED_TIME:24},hb={UNIVERSAL:0,APPLICATION:1,CONTEXT_SPECIFIC:2,PRIVATE:3},fb=class{static{o(this,"ASN1Tag")}constructor(e){if(this.number=e&31,this.constructed=(e&32)===32,this.class=e>>6,this.number===31)throw new Vk.ASN1ParseError("long form tags not supported");if(this.class===hb.UNIVERSAL&&this.number===0)throw new Vk.ASN1ParseError("unsupported tag 0x00")}isUniversal(){return this.class===hb.UNIVERSAL}isContextSpecific(e){let t=this.class===hb.CONTEXT_SPECIFIC;return e!==void 0?t&&this.number===e:t}isBoolean(){return this.isUniversal()&&this.number===tn.BOOLEAN}isInteger(){return this.isUniversal()&&this.number===tn.INTEGER}isBitString(){return this.isUniversal()&&this.number===tn.BIT_STRING}isOctetString(){return this.isUniversal()&&this.number===tn.OCTET_STRING}isOID(){return this.isUniversal()&&this.number===tn.OBJECT_IDENTIFIER}isUTCTime(){return this.isUniversal()&&this.number===tn.UTC_TIME}isGeneralizedTime(){return this.isUniversal()&&this.number===tn.GENERALIZED_TIME}toDER(){return this.number|(this.constructed?32:0)|this.class<<6}};fp.ASN1Tag=fb});var Jk=d(pp=>{"use strict";Object.defineProperty(pp,"__esModule",{value:!0});pp.ASN1Obj=void 0;var db=mu(),rn=lp(),Gk=jk(),qo=qk(),xie=zk(),dp=class{static{o(this,"ASN1Obj")}constructor(e,t,r){this.tag=e,this.value=t,this.subs=r}static parseBuffer(e){return Wk(new db.ByteStream(e))}toDER(){let e=new db.ByteStream;if(this.subs.length>0)for(let s of this.subs)e.appendView(s.toDER());else e.appendView(this.value);let t=e.buffer,r=new db.ByteStream;return r.appendChar(this.tag.toDER()),r.appendView((0,Gk.encodeLength)(t.length)),r.appendView(t),r.buffer}toBoolean(){if(!this.tag.isBoolean())throw new rn.ASN1TypeError("not a boolean");return(0,qo.parseBoolean)(this.value)}toInteger(){if(!this.tag.isInteger())throw new rn.ASN1TypeError("not an integer");return(0,qo.parseInteger)(this.value)}toOID(){if(!this.tag.isOID())throw new rn.ASN1TypeError("not an OID");return(0,qo.parseOID)(this.value)}toDate(){switch(!0){case this.tag.isUTCTime():return(0,qo.parseTime)(this.value,!0);case this.tag.isGeneralizedTime():return(0,qo.parseTime)(this.value,!1);default:throw new rn.ASN1TypeError("not a date")}}toBitString(){if(!this.tag.isBitString())throw new rn.ASN1TypeError("not a bit string");return(0,qo.parseBitString)(this.value)}};pp.ASN1Obj=dp;function Wk(i){let e=new xie.ASN1Tag(i.getUint8()),t=(0,Gk.decodeLength)(i),r=i.slice(i.position,t),s=i.position,n=[];if(e.constructed)n=Hk(i,t);else if(e.isOctetString())try{n=Hk(i,t)}catch{}return n.length===0&&i.seek(s+t),new dp(e,r,n)}o(Wk,"parseStream");function Hk(i,e){let t=i.position+e;if(t>i.length)throw new rn.ASN1ParseError("invalid length");let r=[];for(;i.position<t;)r.push(Wk(i));if(i.position!==t)throw new rn.ASN1ParseError("invalid length");return r}o(Hk,"collectSubs")});var gp=d(mp=>{"use strict";Object.defineProperty(mp,"__esModule",{value:!0});mp.ASN1Obj=void 0;var Lie=Jk();Object.defineProperty(mp,"ASN1Obj",{enumerable:!0,get:o(function(){return Lie.ASN1Obj},"get")})});var Vo=d(Zr=>{"use strict";var Mie=Zr&&Zr.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Zr,"__esModule",{value:!0});Zr.createPublicKey=Bie;Zr.digest=kie;Zr.verify=Fie;Zr.bufferEqual=Uie;var gu=Mie(require("crypto"));function Bie(i,e="spki"){return typeof i=="string"?gu.default.createPublicKey(i):gu.default.createPublicKey({key:i,format:"der",type:e})}o(Bie,"createPublicKey");function kie(i,...e){let t=gu.default.createHash(i);for(let r of e)t.update(r);return t.digest()}o(kie,"digest");function Fie(i,e,t,r){try{return gu.default.verify(r,i,e,t)}catch{return!1}}o(Fie,"verify");function Uie(i,e){try{return gu.default.timingSafeEqual(i,e)}catch{return!1}}o(Uie,"bufferEqual")});var Kk=d(pb=>{"use strict";Object.defineProperty(pb,"__esModule",{value:!0});pb.preAuthEncoding=$ie;var jie="DSSEv1";function $ie(i,e){let t=[jie,i.length,i,e.length,""].join(" ");return Buffer.concat([Buffer.from(t,"ascii"),e])}o($ie,"preAuthEncoding")});var Xk=d(yp=>{"use strict";Object.defineProperty(yp,"__esModule",{value:!0});yp.base64Encode=qie;yp.base64Decode=Vie;var Zk="base64",Yk="utf-8";function qie(i){return Buffer.from(i,Yk).toString(Zk)}o(qie,"base64Encode");function Vie(i){return Buffer.from(i,Zk).toString(Yk)}o(Vie,"base64Decode")});var Qk=d(gb=>{"use strict";Object.defineProperty(gb,"__esModule",{value:!0});gb.canonicalize=mb;function mb(i){let e="";if(i===null||typeof i!="object"||i.toJSON!=null)e+=JSON.stringify(i);else if(Array.isArray(i)){e+="[";let t=!0;i.forEach(r=>{t||(e+=","),t=!1,e+=mb(r)}),e+="]"}else{e+="{";let t=!0;Object.keys(i).sort().forEach(r=>{t||(e+=","),t=!1,e+=JSON.stringify(r),e+=":",e+=mb(i[r])}),e+="}"}return e}o(mb,"canonicalize")});var yb=d(Sp=>{"use strict";Object.defineProperty(Sp,"__esModule",{value:!0});Sp.toDER=Gie;Sp.fromDER=Wie;var zie=/-----BEGIN (.*)-----/,Hie=/-----END (.*)-----/;function Gie(i){let e="";return i.split(`
59
+ `).forEach(t=>{t.match(zie)||t.match(Hie)||(e+=t)}),Buffer.from(e,"base64")}o(Gie,"toDER");function Wie(i,e="CERTIFICATE"){let r=i.toString("base64").match(/.{1,64}/g)||"";return[`-----BEGIN ${e}-----`,...r,`-----END ${e}-----`].join(`
60
+ `).concat(`
61
+ `)}o(Wie,"fromDER")});var Ep=d(zo=>{"use strict";Object.defineProperty(zo,"__esModule",{value:!0});zo.SHA2_HASH_ALGOS=zo.ECDSA_SIGNATURE_ALGOS=void 0;zo.ECDSA_SIGNATURE_ALGOS={"1.2.840.10045.4.3.1":"sha224","1.2.840.10045.4.3.2":"sha256","1.2.840.10045.4.3.3":"sha384","1.2.840.10045.4.3.4":"sha512"};zo.SHA2_HASH_ALGOS={"2.16.840.1.101.3.4.2.1":"sha256","2.16.840.1.101.3.4.2.2":"sha384","2.16.840.1.101.3.4.2.3":"sha512"}});var Eb=d(wp=>{"use strict";Object.defineProperty(wp,"__esModule",{value:!0});wp.RFC3161TimestampVerificationError=void 0;var Sb=class extends Error{static{o(this,"RFC3161TimestampVerificationError")}};wp.RFC3161TimestampVerificationError=Sb});var tF=d(xi=>{"use strict";var Jie=xi&&xi.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(i,r,s)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),Kie=xi&&xi.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),Zie=xi&&xi.__importStar||(function(){var i=o(function(e){return i=Object.getOwnPropertyNames||function(t){var r=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[r.length]=s);return r},i(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=i(e),s=0;s<r.length;s++)r[s]!=="default"&&Jie(t,e,r[s]);return Kie(t,e),t}})();Object.defineProperty(xi,"__esModule",{value:!0});xi.TSTInfo=void 0;var eF=Zie(Vo()),Yie=Ep(),Xie=Eb(),wb=class{static{o(this,"TSTInfo")}constructor(e){this.root=e}get version(){return this.root.subs[0].toInteger()}get genTime(){return this.root.subs[4].toDate()}get messageImprintHashAlgorithm(){let e=this.messageImprintObj.subs[0].subs[0].toOID();return Yie.SHA2_HASH_ALGOS[e]}get messageImprintHashedMessage(){return this.messageImprintObj.subs[1].value}get raw(){return this.root.toDER()}verify(e){let t=eF.digest(this.messageImprintHashAlgorithm,e);if(!eF.bufferEqual(t,this.messageImprintHashedMessage))throw new Xie.RFC3161TimestampVerificationError("message imprint does not match artifact")}get messageImprintObj(){return this.root.subs[2]}};xi.TSTInfo=wb});var rF=d(Li=>{"use strict";var Qie=Li&&Li.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(i,r,s)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),ere=Li&&Li.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),tre=Li&&Li.__importStar||(function(){var i=o(function(e){return i=Object.getOwnPropertyNames||function(t){var r=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[r.length]=s);return r},i(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=i(e),s=0;s<r.length;s++)r[s]!=="default"&&Qie(t,e,r[s]);return ere(t,e),t}})();Object.defineProperty(Li,"__esModule",{value:!0});Li.RFC3161Timestamp=void 0;var ire=gp(),_b=tre(Vo()),iF=Ep(),yu=Eb(),rre=tF(),sre="1.2.840.113549.1.7.2",nre="1.2.840.113549.1.9.16.1.4",ore="1.2.840.113549.1.9.4",bb=class i{static{o(this,"RFC3161Timestamp")}constructor(e){this.root=e}static parse(e){let t=ire.ASN1Obj.parseBuffer(e);return new i(t)}get status(){return this.pkiStatusInfoObj.subs[0].toInteger()}get contentType(){return this.contentTypeObj.toOID()}get eContentType(){return this.eContentTypeObj.toOID()}get signingTime(){return this.tstInfo.genTime}get signerIssuer(){return this.signerSidObj.subs[0].value}get signerSerialNumber(){return this.signerSidObj.subs[1].value}get signerDigestAlgorithm(){let e=this.signerDigestAlgorithmObj.subs[0].toOID();return iF.SHA2_HASH_ALGOS[e]}get signatureAlgorithm(){let e=this.signatureAlgorithmObj.subs[0].toOID();return iF.ECDSA_SIGNATURE_ALGOS[e]}get signatureValue(){return this.signatureValueObj.value}get tstInfo(){return new rre.TSTInfo(this.eContentObj.subs[0].subs[0])}verify(e,t){if(!this.timeStampTokenObj)throw new yu.RFC3161TimestampVerificationError("timeStampToken is missing");if(this.contentType!==sre)throw new yu.RFC3161TimestampVerificationError(`incorrect content type: ${this.contentType}`);if(this.eContentType!==nre)throw new yu.RFC3161TimestampVerificationError(`incorrect encapsulated content type: ${this.eContentType}`);this.tstInfo.verify(e),this.verifyMessageDigest(),this.verifySignature(t)}verifyMessageDigest(){let e=_b.digest(this.signerDigestAlgorithm,this.tstInfo.raw),t=this.messageDigestAttributeObj.subs[1].subs[0].value;if(!_b.bufferEqual(e,t))throw new yu.RFC3161TimestampVerificationError("signed data does not match tstInfo")}verifySignature(e){let t=this.signedAttrsObj.toDER();if(t[0]=49,!_b.verify(t,e,this.signatureValue,this.signatureAlgorithm))throw new yu.RFC3161TimestampVerificationError("signature verification failed")}get pkiStatusInfoObj(){return this.root.subs[0]}get timeStampTokenObj(){return this.root.subs[1]}get contentTypeObj(){return this.timeStampTokenObj.subs[0]}get signedDataObj(){return this.timeStampTokenObj.subs.find(t=>t.tag.isContextSpecific(0)).subs[0]}get encapContentInfoObj(){return this.signedDataObj.subs[2]}get signerInfosObj(){let e=this.signedDataObj;return e.subs[e.subs.length-1]}get signerInfoObj(){return this.signerInfosObj.subs[0]}get eContentTypeObj(){return this.encapContentInfoObj.subs[0]}get eContentObj(){return this.encapContentInfoObj.subs[1]}get signedAttrsObj(){return this.signerInfoObj.subs.find(t=>t.tag.isContextSpecific(0))}get messageDigestAttributeObj(){return this.signedAttrsObj.subs.find(t=>t.subs[0].tag.isOID()&&t.subs[0].toOID()===ore)}get signerSidObj(){return this.signerInfoObj.subs[1]}get signerDigestAlgorithmObj(){return this.signerInfoObj.subs[2]}get signatureAlgorithmObj(){return this.signerInfoObj.subs[4]}get signatureValueObj(){return this.signerInfoObj.subs[5]}};Li.RFC3161Timestamp=bb});var sF=d(_p=>{"use strict";Object.defineProperty(_p,"__esModule",{value:!0});_p.RFC3161Timestamp=void 0;var are=rF();Object.defineProperty(_p,"RFC3161Timestamp",{enumerable:!0,get:o(function(){return are.RFC3161Timestamp},"get")})});var oF=d(Mi=>{"use strict";var cre=Mi&&Mi.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(i,r,s)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),ure=Mi&&Mi.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),lre=Mi&&Mi.__importStar||(function(){var i=o(function(e){return i=Object.getOwnPropertyNames||function(t){var r=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[r.length]=s);return r},i(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=i(e),s=0;s<r.length;s++)r[s]!=="default"&&cre(t,e,r[s]);return ure(t,e),t}})();Object.defineProperty(Mi,"__esModule",{value:!0});Mi.SignedCertificateTimestamp=void 0;var hre=lre(Vo()),nF=mu(),Ib=class i{static{o(this,"SignedCertificateTimestamp")}constructor(e){this.version=e.version,this.logID=e.logID,this.timestamp=e.timestamp,this.extensions=e.extensions,this.hashAlgorithm=e.hashAlgorithm,this.signatureAlgorithm=e.signatureAlgorithm,this.signature=e.signature}get datetime(){return new Date(Number(this.timestamp.readBigInt64BE()))}get algorithm(){switch(this.hashAlgorithm){case 0:return"none";case 1:return"md5";case 2:return"sha1";case 3:return"sha224";case 4:return"sha256";case 5:return"sha384";case 6:return"sha512";default:return"unknown"}}verify(e,t){let r=new nF.ByteStream;return r.appendChar(this.version),r.appendChar(0),r.appendView(this.timestamp),r.appendUint16(1),r.appendView(e),r.appendUint16(this.extensions.byteLength),this.extensions.byteLength>0&&r.appendView(this.extensions),hre.verify(r.buffer,t,this.signature,this.algorithm)}static parse(e){let t=new nF.ByteStream(e),r=t.getUint8(),s=t.getBlock(32),n=t.getBlock(8),a=t.getUint16(),c=t.getBlock(a),u=t.getUint8(),l=t.getUint8(),h=t.getUint16(),f=t.getBlock(h);if(t.position!==e.length)throw new Error("SCT buffer length mismatch");return new i({version:r,logID:s,timestamp:n,extensions:c,hashAlgorithm:u,signatureAlgorithm:l,signature:f})}};Mi.SignedCertificateTimestamp=Ib});var Nb=d(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.X509SCTExtension=Ve.X509SubjectKeyIDExtension=Ve.X509AuthorityKeyIDExtension=Ve.X509SubjectAlternativeNameExtension=Ve.X509KeyUsageExtension=Ve.X509BasicConstraintsExtension=Ve.X509Extension=void 0;var fre=mu(),dre=oF(),dr=class{static{o(this,"X509Extension")}constructor(e){this.root=e}get oid(){return this.root.subs[0].toOID()}get critical(){return this.root.subs.length===3?this.root.subs[1].toBoolean():!1}get value(){return this.extnValueObj.value}get valueObj(){return this.extnValueObj}get extnValueObj(){return this.root.subs[this.root.subs.length-1]}};Ve.X509Extension=dr;var Ob=class extends dr{static{o(this,"X509BasicConstraintsExtension")}get isCA(){return this.sequence.subs[0]?.toBoolean()??!1}get pathLenConstraint(){return this.sequence.subs.length>1?this.sequence.subs[1].toInteger():void 0}get sequence(){return this.extnValueObj.subs[0]}};Ve.X509BasicConstraintsExtension=Ob;var vb=class extends dr{static{o(this,"X509KeyUsageExtension")}get digitalSignature(){return this.bitString[0]===1}get keyCertSign(){return this.bitString[5]===1}get crlSign(){return this.bitString[6]===1}get bitString(){return this.extnValueObj.subs[0].toBitString()}};Ve.X509KeyUsageExtension=vb;var Cb=class extends dr{static{o(this,"X509SubjectAlternativeNameExtension")}get rfc822Name(){return this.findGeneralName(1)?.value.toString("ascii")}get uri(){return this.findGeneralName(6)?.value.toString("ascii")}otherName(e){let t=this.findGeneralName(0);return t===void 0||t.subs[0].toOID()!==e?void 0:t.subs[1].subs[0].value.toString("ascii")}findGeneralName(e){return this.generalNames.find(t=>t.tag.isContextSpecific(e))}get generalNames(){return this.extnValueObj.subs[0].subs}};Ve.X509SubjectAlternativeNameExtension=Cb;var Rb=class extends dr{static{o(this,"X509AuthorityKeyIDExtension")}get keyIdentifier(){return this.findSequenceMember(0)?.value}findSequenceMember(e){return this.sequence.subs.find(t=>t.tag.isContextSpecific(e))}get sequence(){return this.extnValueObj.subs[0]}};Ve.X509AuthorityKeyIDExtension=Rb;var Ab=class extends dr{static{o(this,"X509SubjectKeyIDExtension")}get keyIdentifier(){return this.extnValueObj.subs[0].value}};Ve.X509SubjectKeyIDExtension=Ab;var Tb=class extends dr{static{o(this,"X509SCTExtension")}constructor(e){super(e)}get signedCertificateTimestamps(){let e=this.extnValueObj.subs[0].value,t=new fre.ByteStream(e),r=t.getUint16()+2,s=[];for(;t.position<r;){let n=t.getUint16(),a=t.getBlock(n);s.push(dre.SignedCertificateTimestamp.parse(a))}if(t.position!==r)throw new Error("SCT list length does not match actual length");return s}};Ve.X509SCTExtension=Tb});var uF=d(wt=>{"use strict";var pre=wt&&wt.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(i,r,s)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),mre=wt&&wt.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),cF=wt&&wt.__importStar||(function(){var i=o(function(e){return i=Object.getOwnPropertyNames||function(t){var r=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[r.length]=s);return r},i(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=i(e),s=0;s<r.length;s++)r[s]!=="default"&&pre(t,e,r[s]);return mre(t,e),t}})();Object.defineProperty(wt,"__esModule",{value:!0});wt.X509Certificate=wt.EXTENSION_OID_SCT=void 0;var gre=gp(),aF=cF(Vo()),yre=Ep(),Sre=cF(yb()),sn=Nb(),Ere="2.5.29.14",wre="2.5.29.15",_re="2.5.29.17",bre="2.5.29.19",Ire="2.5.29.35";wt.EXTENSION_OID_SCT="1.3.6.1.4.1.11129.2.4.2";var Pb=class i{static{o(this,"X509Certificate")}constructor(e){this.root=e}static parse(e){let t=typeof e=="string"?Sre.toDER(e):e,r=gre.ASN1Obj.parseBuffer(t);return new i(r)}get tbsCertificate(){return this.tbsCertificateObj}get version(){return`v${(this.versionObj.subs[0].toInteger()+BigInt(1)).toString()}`}get serialNumber(){return this.serialNumberObj.value}get notBefore(){return this.validityObj.subs[0].toDate()}get notAfter(){return this.validityObj.subs[1].toDate()}get issuer(){return this.issuerObj.value}get subject(){return this.subjectObj.value}get publicKey(){return this.subjectPublicKeyInfoObj.toDER()}get signatureAlgorithm(){let e=this.signatureAlgorithmObj.subs[0].toOID();return yre.ECDSA_SIGNATURE_ALGOS[e]}get signatureValue(){return this.signatureValueObj.value.subarray(1)}get subjectAltName(){let e=this.extSubjectAltName;return e?.uri||e?.rfc822Name}get extensions(){return this.extensionsObj?.subs[0]?.subs||[]}get extKeyUsage(){let e=this.findExtension(wre);return e?new sn.X509KeyUsageExtension(e):void 0}get extBasicConstraints(){let e=this.findExtension(bre);return e?new sn.X509BasicConstraintsExtension(e):void 0}get extSubjectAltName(){let e=this.findExtension(_re);return e?new sn.X509SubjectAlternativeNameExtension(e):void 0}get extAuthorityKeyID(){let e=this.findExtension(Ire);return e?new sn.X509AuthorityKeyIDExtension(e):void 0}get extSubjectKeyID(){let e=this.findExtension(Ere);return e?new sn.X509SubjectKeyIDExtension(e):void 0}get extSCT(){let e=this.findExtension(wt.EXTENSION_OID_SCT);return e?new sn.X509SCTExtension(e):void 0}get isCA(){let e=this.extBasicConstraints?.isCA||!1;return this.extKeyUsage?e&&this.extKeyUsage.keyCertSign:e}extension(e){let t=this.findExtension(e);return t?new sn.X509Extension(t):void 0}verify(e){let t=e?.publicKey||this.publicKey,r=aF.createPublicKey(t);return aF.verify(this.tbsCertificate.toDER(),r,this.signatureValue,this.signatureAlgorithm)}validForDate(e){return this.notBefore<=e&&e<=this.notAfter}equals(e){return this.root.toDER().equals(e.root.toDER())}clone(){let e=this.root.toDER(),t=Buffer.alloc(e.length);return e.copy(t),i.parse(t)}findExtension(e){return this.extensions.find(t=>t.subs[0].toOID()===e)}get tbsCertificateObj(){return this.root.subs[0]}get signatureAlgorithmObj(){return this.root.subs[1]}get signatureValueObj(){return this.root.subs[2]}get versionObj(){return this.tbsCertificateObj.subs[0]}get serialNumberObj(){return this.tbsCertificateObj.subs[1]}get issuerObj(){return this.tbsCertificateObj.subs[3]}get validityObj(){return this.tbsCertificateObj.subs[4]}get subjectObj(){return this.tbsCertificateObj.subs[5]}get subjectPublicKeyInfoObj(){return this.tbsCertificateObj.subs[6]}get extensionsObj(){return this.tbsCertificateObj.subs.find(e=>e.tag.isContextSpecific(3))}};wt.X509Certificate=Pb});var hF=d(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.X509SCTExtension=Yr.X509Certificate=Yr.EXTENSION_OID_SCT=void 0;var lF=uF();Object.defineProperty(Yr,"EXTENSION_OID_SCT",{enumerable:!0,get:o(function(){return lF.EXTENSION_OID_SCT},"get")});Object.defineProperty(Yr,"X509Certificate",{enumerable:!0,get:o(function(){return lF.X509Certificate},"get")});var Ore=Nb();Object.defineProperty(Yr,"X509SCTExtension",{enumerable:!0,get:o(function(){return Ore.X509SCTExtension},"get")})});var ut=d(K=>{"use strict";var vre=K&&K.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(i,r,s)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),Cre=K&&K.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),Su=K&&K.__importStar||(function(){var i=o(function(e){return i=Object.getOwnPropertyNames||function(t){var r=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[r.length]=s);return r},i(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=i(e),s=0;s<r.length;s++)r[s]!=="default"&&vre(t,e,r[s]);return Cre(t,e),t}})();Object.defineProperty(K,"__esModule",{value:!0});K.X509SCTExtension=K.X509Certificate=K.EXTENSION_OID_SCT=K.ByteStream=K.RFC3161Timestamp=K.pem=K.json=K.encoding=K.dsse=K.crypto=K.ASN1Obj=void 0;var Rre=gp();Object.defineProperty(K,"ASN1Obj",{enumerable:!0,get:o(function(){return Rre.ASN1Obj},"get")});K.crypto=Su(Vo());K.dsse=Su(Kk());K.encoding=Su(Xk());K.json=Su(Qk());K.pem=Su(yb());var Are=sF();Object.defineProperty(K,"RFC3161Timestamp",{enumerable:!0,get:o(function(){return Are.RFC3161Timestamp},"get")});var Tre=mu();Object.defineProperty(K,"ByteStream",{enumerable:!0,get:o(function(){return Tre.ByteStream},"get")});var Db=hF();Object.defineProperty(K,"EXTENSION_OID_SCT",{enumerable:!0,get:o(function(){return Db.EXTENSION_OID_SCT},"get")});Object.defineProperty(K,"X509Certificate",{enumerable:!0,get:o(function(){return Db.X509Certificate},"get")});Object.defineProperty(K,"X509SCTExtension",{enumerable:!0,get:o(function(){return Db.X509SCTExtension},"get")})});var fF=d(xb=>{"use strict";Object.defineProperty(xb,"__esModule",{value:!0});xb.extractJWTSubject=Pre;var Nre=ut();function Pre(i){let e=i.split(".",3),t=JSON.parse(Nre.encoding.base64Decode(e[1]));if(t.email){if(!t.email_verified)throw new Error("JWT email not verified by issuer");return t.email}if(t.sub)return t.sub;throw new Error("JWT subject not found")}o(Pre,"extractJWTSubject")});var dF=d((cbe,Dre)=>{Dre.exports={name:"@sigstore/sign",version:"4.0.1",description:"Sigstore signing library",main:"dist/index.js",types:"dist/index.d.ts",scripts:{clean:"shx rm -rf dist *.tsbuildinfo",build:"tsc --build",test:"jest"},files:["dist"],author:"bdehamer@github.com",license:"Apache-2.0",repository:{type:"git",url:"git+https://github.com/sigstore/sigstore-js.git"},bugs:{url:"https://github.com/sigstore/sigstore-js/issues"},homepage:"https://github.com/sigstore/sigstore-js/tree/main/packages/sign#readme",publishConfig:{provenance:!0},devDependencies:{"@sigstore/jest":"^0.0.0","@sigstore/mock":"^0.11.0","@sigstore/rekor-types":"^4.0.0","@types/make-fetch-happen":"^10.0.4","@types/promise-retry":"^1.1.6"},dependencies:{"@sigstore/bundle":"^4.0.0","@sigstore/core":"^3.0.0","@sigstore/protobuf-specs":"^0.5.0","make-fetch-happen":"^15.0.2","proc-log":"^5.0.0","promise-retry":"^2.0.1"},engines:{node:"^20.17.0 || >=22.9.0"}}});var mF=d(Ho=>{"use strict";var xre=Ho&&Ho.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Ho,"__esModule",{value:!0});Ho.getUserAgent=void 0;var pF=xre(require("os")),Lre=o(()=>{let i=dF().version,e=process.version,t=pF.default.platform(),r=pF.default.arch();return`sigstore-js/${i} (Node ${e}) (${t}/${r})`},"getUserAgent");Ho.getUserAgent=Lre});var Xr=d(fe=>{"use strict";var Mre=fe&&fe.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(i,r,s)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),Bre=fe&&fe.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),gF=fe&&fe.__importStar||(function(){var i=o(function(e){return i=Object.getOwnPropertyNames||function(t){var r=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[r.length]=s);return r},i(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=i(e),s=0;s<r.length;s++)r[s]!=="default"&&Mre(t,e,r[s]);return Bre(t,e),t}})();Object.defineProperty(fe,"__esModule",{value:!0});fe.ua=fe.oidc=fe.pem=fe.json=fe.encoding=fe.dsse=fe.crypto=void 0;var Eu=ut();Object.defineProperty(fe,"crypto",{enumerable:!0,get:o(function(){return Eu.crypto},"get")});Object.defineProperty(fe,"dsse",{enumerable:!0,get:o(function(){return Eu.dsse},"get")});Object.defineProperty(fe,"encoding",{enumerable:!0,get:o(function(){return Eu.encoding},"get")});Object.defineProperty(fe,"json",{enumerable:!0,get:o(function(){return Eu.json},"get")});Object.defineProperty(fe,"pem",{enumerable:!0,get:o(function(){return Eu.pem},"get")});fe.oidc=gF(fF());fe.ua=gF(mF())});var Mb=d(bp=>{"use strict";Object.defineProperty(bp,"__esModule",{value:!0});bp.BaseBundleBuilder=void 0;var Lb=class{static{o(this,"BaseBundleBuilder")}constructor(e){this.signer=e.signer,this.witnesses=e.witnesses}async create(e){let t=await this.prepare(e).then(c=>this.signer.sign(c)),r=await this.package(e,t),s=await Promise.all(this.witnesses.map(c=>c.testify(r.content,kre(t.key)))),n=[],a=[];return s.forEach(({tlogEntries:c,rfc3161Timestamps:u})=>{n.push(...c??[]),a.push(...u??[])}),r.verificationMaterial.tlogEntries=n,r.verificationMaterial.timestampVerificationData={rfc3161Timestamps:a},r}async prepare(e){return e.data}};bp.BaseBundleBuilder=Lb;function kre(i){switch(i.$case){case"publicKey":return i.publicKey;case"x509Certificate":return i.certificate}}o(kre,"publicKey")});var kb=d(Bi=>{"use strict";var Fre=Bi&&Bi.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(i,r,s)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),Ure=Bi&&Bi.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),jre=Bi&&Bi.__importStar||(function(){var i=o(function(e){return i=Object.getOwnPropertyNames||function(t){var r=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[r.length]=s);return r},i(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=i(e),s=0;s<r.length;s++)r[s]!=="default"&&Fre(t,e,r[s]);return Ure(t,e),t}})();Object.defineProperty(Bi,"__esModule",{value:!0});Bi.toMessageSignatureBundle=$re;Bi.toDSSEBundle=qre;var yF=jre(pu()),Bb=Xr();function $re(i,e){let t=Bb.crypto.digest("sha256",i.data);return yF.toMessageSignatureBundle({digest:t,signature:e.signature,certificate:e.key.$case==="x509Certificate"?Bb.pem.toDER(e.key.certificate):void 0,keyHint:e.key.$case==="publicKey"?e.key.hint:void 0,certificateChain:!0})}o($re,"toMessageSignatureBundle");function qre(i,e,t){return yF.toDSSEBundle({artifact:i.data,artifactType:i.type,signature:e.signature,certificate:e.key.$case==="x509Certificate"?Bb.pem.toDER(e.key.certificate):void 0,keyHint:e.key.$case==="publicKey"?e.key.hint:void 0,certificateChain:t})}o(qre,"toDSSEBundle")});var EF=d(Ip=>{"use strict";Object.defineProperty(Ip,"__esModule",{value:!0});Ip.DSSEBundleBuilder=void 0;var Vre=Xr(),zre=Mb(),Hre=kb(),Fb=class extends zre.BaseBundleBuilder{static{o(this,"DSSEBundleBuilder")}constructor(e){super(e),this.certificateChain=e.certificateChain??!1}async prepare(e){let t=SF(e);return Vre.dsse.preAuthEncoding(t.type,t.data)}async package(e,t){return(0,Hre.toDSSEBundle)(SF(e),t,this.certificateChain)}};Ip.DSSEBundleBuilder=Fb;function SF(i){return{...i,type:i.type??""}}o(SF,"artifactDefaults")});var wF=d(Op=>{"use strict";Object.defineProperty(Op,"__esModule",{value:!0});Op.MessageSignatureBundleBuilder=void 0;var Gre=Mb(),Wre=kb(),Ub=class extends Gre.BaseBundleBuilder{static{o(this,"MessageSignatureBundleBuilder")}constructor(e){super(e)}async package(e,t){return(0,Wre.toMessageSignatureBundle)(e,t)}};Op.MessageSignatureBundleBuilder=Ub});var _F=d(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});Go.MessageSignatureBundleBuilder=Go.DSSEBundleBuilder=void 0;var Jre=EF();Object.defineProperty(Go,"DSSEBundleBuilder",{enumerable:!0,get:o(function(){return Jre.DSSEBundleBuilder},"get")});var Kre=wF();Object.defineProperty(Go,"MessageSignatureBundleBuilder",{enumerable:!0,get:o(function(){return Kre.MessageSignatureBundleBuilder},"get")})});var Cp=d(vp=>{"use strict";Object.defineProperty(vp,"__esModule",{value:!0});vp.HTTPError=void 0;var jb=class extends Error{static{o(this,"HTTPError")}constructor({status:e,message:t,location:r}){super(`(${e}) ${t}`),this.statusCode=e,this.location=r}};vp.HTTPError=jb});var Wo=d(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});wu.InternalError=void 0;wu.internalError=Yre;var Zre=Cp(),Rp=class extends Error{static{o(this,"InternalError")}constructor({code:e,message:t,cause:r}){super(t),this.name=this.constructor.name,this.cause=r,this.code=e}};wu.InternalError=Rp;function Yre(i,e,t){throw i instanceof Zre.HTTPError&&(t+=` - ${i.message}`),new Rp({code:e,message:t,cause:i})}o(Yre,"internalError")});var bF=d(Jo=>{"use strict";var Xre=Jo&&Jo.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Jo,"__esModule",{value:!0});Jo.CIContextProvider=void 0;var Qre=Xre(lu()),ese=[tse,ise],$b=class{static{o(this,"CIContextProvider")}constructor(e="sigstore"){this.audience=e}async getToken(){return Promise.any(ese.map(e=>e(this.audience))).catch(()=>Promise.reject("CI: no tokens available"))}};Jo.CIContextProvider=$b;async function tse(i){if(!process.env.ACTIONS_ID_TOKEN_REQUEST_URL||!process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN)return Promise.reject("no token available");let e=new URL(process.env.ACTIONS_ID_TOKEN_REQUEST_URL);return e.searchParams.append("audience",i),(await(0,Qre.default)(e.href,{retry:2,headers:{Accept:"application/json",Authorization:`Bearer ${process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN}`}})).json().then(r=>r.value)}o(tse,"getGHAToken");async function ise(){return process.env.SIGSTORE_ID_TOKEN?process.env.SIGSTORE_ID_TOKEN:Promise.reject("no token available")}o(ise,"getEnv")});var IF=d(Ap=>{"use strict";Object.defineProperty(Ap,"__esModule",{value:!0});Ap.CIContextProvider=void 0;var rse=bF();Object.defineProperty(Ap,"CIContextProvider",{enumerable:!0,get:o(function(){return rse.CIContextProvider},"get")})});var Tp=d(_u=>{"use strict";var vF=_u&&_u.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(_u,"__esModule",{value:!0});_u.fetchWithRetry=mse;var sse=require("http2"),nse=vF(lu()),OF=_t(),ose=vF(qa()),ase=Xr(),cse=Cp(),{HTTP2_HEADER_LOCATION:use,HTTP2_HEADER_CONTENT_TYPE:lse,HTTP2_HEADER_USER_AGENT:hse,HTTP_STATUS_INTERNAL_SERVER_ERROR:fse,HTTP_STATUS_TOO_MANY_REQUESTS:dse,HTTP_STATUS_REQUEST_TIMEOUT:pse}=sse.constants;async function mse(i,e){return(0,ose.default)(async(t,r)=>{let s=e.method||"POST",n={[hse]:ase.ua.getUserAgent(),...e.headers},a=await(0,nse.default)(i,{method:s,headers:n,body:e.body,timeout:e.timeout,retry:!1}).catch(c=>(OF.log.http("fetch",`${s} ${i} attempt ${r} failed with ${c}`),t(c)));if(a.ok)return a;{let c=await gse(a);if(OF.log.http("fetch",`${s} ${i} attempt ${r} failed with ${a.status}`),yse(a.status))return t(c);throw c}},Sse(e.retry))}o(mse,"fetchWithRetry");var gse=o(async i=>{let e=i.statusText,t=i.headers.get(use)||void 0;if(i.headers.get(lse)?.includes("application/json"))try{e=(await i.json()).message||e}catch{}return new cse.HTTPError({status:i.status,message:e,location:t})},"errorFromResponse"),yse=o(i=>[pse,dse].includes(i)||i>=fse,"retryable"),Sse=o(i=>typeof i=="boolean"?{retries:i?1:0}:typeof i=="number"?{retries:i}:{retries:0,...i},"retryOpts")});var CF=d(Np=>{"use strict";Object.defineProperty(Np,"__esModule",{value:!0});Np.Fulcio=void 0;var Ese=Tp(),qb=class{static{o(this,"Fulcio")}constructor(e){this.options=e}async createSigningCertificate(e){let{baseURL:t,retry:r,timeout:s}=this.options,n=`${t}/api/v2/signingCert`;return(await(0,Ese.fetchWithRetry)(n,{headers:{"Content-Type":"application/json"},body:JSON.stringify(e),timeout:s,retry:r})).json()}};Np.Fulcio=qb});var RF=d(Pp=>{"use strict";Object.defineProperty(Pp,"__esModule",{value:!0});Pp.CAClient=void 0;var wse=Wo(),_se=CF(),Vb=class{static{o(this,"CAClient")}constructor(e){this.fulcio=new _se.Fulcio({baseURL:e.fulcioBaseURL,retry:e.retry,timeout:e.timeout})}async createSigningCertificate(e,t,r){let s=bse(e,t,r);try{let n=await this.fulcio.createSigningCertificate(s);return(n.signedCertificateEmbeddedSct?n.signedCertificateEmbeddedSct:n.signedCertificateDetachedSct).chain.certificates}catch(n){(0,wse.internalError)(n,"CA_CREATE_SIGNING_CERTIFICATE_ERROR","error creating signing certificate")}}};Pp.CAClient=Vb;function bse(i,e,t){return{credentials:{oidcIdentityToken:i},publicKeyRequest:{publicKey:{algorithm:"ECDSA",content:e},proofOfPossession:t.toString("base64")}}}o(bse,"toCertificateRequest")});var TF=d(Ko=>{"use strict";var Ise=Ko&&Ko.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Ko,"__esModule",{value:!0});Ko.EphemeralSigner=void 0;var AF=Ise(require("crypto")),Ose="ec",vse="P-256",zb=class{static{o(this,"EphemeralSigner")}constructor(){this.keypair=AF.default.generateKeyPairSync(Ose,{namedCurve:vse})}async sign(e){let t=AF.default.sign(null,e,this.keypair.privateKey),r=this.keypair.publicKey.export({format:"pem",type:"spki"}).toString("ascii");return{signature:t,key:{$case:"publicKey",publicKey:r}}}};Ko.EphemeralSigner=zb});var NF=d(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.FulcioSigner=nn.DEFAULT_FULCIO_URL=void 0;var Hb=Wo(),Cse=Xr(),Rse=RF(),Ase=TF();nn.DEFAULT_FULCIO_URL="https://fulcio.sigstore.dev";var Gb=class{static{o(this,"FulcioSigner")}constructor(e){this.ca=new Rse.CAClient({...e,fulcioBaseURL:e.fulcioBaseURL||nn.DEFAULT_FULCIO_URL}),this.identityProvider=e.identityProvider,this.keyHolder=e.keyHolder||new Ase.EphemeralSigner}async sign(e){let t=await this.getIdentityToken(),r;try{r=Cse.oidc.extractJWTSubject(t)}catch(c){throw new Hb.InternalError({code:"IDENTITY_TOKEN_PARSE_ERROR",message:`invalid identity token: ${t}`,cause:c})}let s=await this.keyHolder.sign(Buffer.from(r));if(s.key.$case!=="publicKey")throw new Hb.InternalError({code:"CA_CREATE_SIGNING_CERTIFICATE_ERROR",message:"unexpected format for signing key"});let n=await this.ca.createSigningCertificate(t,s.key.publicKey,s.signature);return{signature:(await this.keyHolder.sign(e)).signature,key:{$case:"x509Certificate",certificate:n[0]}}}async getIdentityToken(){try{return await this.identityProvider.getToken()}catch(e){throw new Hb.InternalError({code:"IDENTITY_TOKEN_READ_ERROR",message:"error retrieving identity token",cause:e})}}};nn.FulcioSigner=Gb});var DF=d(Zo=>{"use strict";Object.defineProperty(Zo,"__esModule",{value:!0});Zo.FulcioSigner=Zo.DEFAULT_FULCIO_URL=void 0;var PF=NF();Object.defineProperty(Zo,"DEFAULT_FULCIO_URL",{enumerable:!0,get:o(function(){return PF.DEFAULT_FULCIO_URL},"get")});Object.defineProperty(Zo,"FulcioSigner",{enumerable:!0,get:o(function(){return PF.FulcioSigner},"get")})});var MF=d(Dp=>{"use strict";Object.defineProperty(Dp,"__esModule",{value:!0});Dp.Rekor=void 0;var xF=Tp(),Wb=class{static{o(this,"Rekor")}constructor(e){this.options=e}async createEntry(e){let{baseURL:t,timeout:r,retry:s}=this.options,n=`${t}/api/v1/log/entries`,c=await(await(0,xF.fetchWithRetry)(n,{headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(e),timeout:r,retry:s})).json();return LF(c)}async getEntry(e){let{baseURL:t,timeout:r,retry:s}=this.options,n=`${t}/api/v1/log/entries/${e}`,c=await(await(0,xF.fetchWithRetry)(n,{method:"GET",headers:{Accept:"application/json"},timeout:r,retry:s})).json();return LF(c)}};Dp.Rekor=Wb;function LF(i){let e=Object.entries(i);if(e.length!=1)throw new Error("Received multiple entries in Rekor response");let[t,r]=e[0];return{...r,uuid:t}}o(LF,"entryFromResponse")});var kF=d(xp=>{"use strict";Object.defineProperty(xp,"__esModule",{value:!0});xp.TLogClient=void 0;var BF=Wo(),Tse=Cp(),Nse=MF(),Jb=class{static{o(this,"TLogClient")}constructor(e){this.fetchOnConflict=e.fetchOnConflict??!1,this.rekor=new Nse.Rekor({baseURL:e.rekorBaseURL,retry:e.retry,timeout:e.timeout})}async createEntry(e){let t;try{t=await this.rekor.createEntry(e)}catch(r){if(Pse(r)&&this.fetchOnConflict){let s=r.location.split("/").pop()||"";try{t=await this.rekor.getEntry(s)}catch(n){(0,BF.internalError)(n,"TLOG_FETCH_ENTRY_ERROR","error fetching tlog entry")}}else(0,BF.internalError)(r,"TLOG_CREATE_ENTRY_ERROR","error creating tlog entry")}return t}};xp.TLogClient=Jb;function Pse(i){return i instanceof Tse.HTTPError&&i.statusCode===409&&i.location!==void 0}o(Pse,"entryExistsError")});var FF=d(Kb=>{"use strict";Object.defineProperty(Kb,"__esModule",{value:!0});Kb.toProposedEntry=xse;var Dse=pu(),Qr=Xr(),bu="sha256";function xse(i,e,t="dsse"){switch(i.$case){case"dsseEnvelope":return t==="intoto"?Bse(i.dsseEnvelope,e):Mse(i.dsseEnvelope,e);case"messageSignature":return Lse(i.messageSignature,e)}}o(xse,"toProposedEntry");function Lse(i,e){let t=i.messageDigest.digest.toString("hex"),r=i.signature.toString("base64"),s=Qr.encoding.base64Encode(e);return{apiVersion:"0.0.1",kind:"hashedrekord",spec:{data:{hash:{algorithm:bu,value:t}},signature:{content:r,publicKey:{content:s}}}}}o(Lse,"toProposedHashedRekordEntry");function Mse(i,e){let t=JSON.stringify((0,Dse.envelopeToJSON)(i)),r=Qr.encoding.base64Encode(e);return{apiVersion:"0.0.1",kind:"dsse",spec:{proposedContent:{envelope:t,verifiers:[r]}}}}o(Mse,"toProposedDSSEEntry");function Bse(i,e){let t=Qr.crypto.digest(bu,i.payload).toString("hex"),r=kse(i,e),s=Qr.encoding.base64Encode(i.payload.toString("base64")),n=Qr.encoding.base64Encode(i.signatures[0].sig.toString("base64")),a=i.signatures[0].keyid,c=Qr.encoding.base64Encode(e),u={payloadType:i.payloadType,payload:s,signatures:[{sig:n,publicKey:c}]};return a.length>0&&(u.signatures[0].keyid=a),{apiVersion:"0.0.2",kind:"intoto",spec:{content:{envelope:u,hash:{algorithm:bu,value:r},payloadHash:{algorithm:bu,value:t}}}}}o(Bse,"toProposedIntotoEntry");function kse(i,e){let t={payloadType:i.payloadType,payload:i.payload.toString("base64"),signatures:[{sig:i.signatures[0].sig.toString("base64"),publicKey:e}]};return i.signatures[0].keyid.length>0&&(t.signatures[0].keyid=i.signatures[0].keyid),Qr.crypto.digest(bu,Qr.json.canonicalize(t)).toString("hex")}o(kse,"calculateDSSEHash")});var UF=d(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.RekorWitness=on.DEFAULT_REKOR_URL=void 0;var Fse=Xr(),Use=kF(),jse=FF();on.DEFAULT_REKOR_URL="https://rekor.sigstore.dev";var Zb=class{static{o(this,"RekorWitness")}constructor(e){this.entryType=e.entryType,this.tlog=new Use.TLogClient({...e,rekorBaseURL:e.rekorBaseURL||on.DEFAULT_REKOR_URL})}async testify(e,t){let r=(0,jse.toProposedEntry)(e,t,this.entryType),s=await this.tlog.createEntry(r);return $se(s)}};on.RekorWitness=Zb;function $se(i){let e=Buffer.from(i.logID,"hex"),t=Fse.encoding.base64Decode(i.body),r=JSON.parse(t),s=i?.verification?.signedEntryTimestamp?qse(i.verification.signedEntryTimestamp):void 0,n=i?.verification?.inclusionProof?Vse(i.verification.inclusionProof):void 0;return{tlogEntries:[{logIndex:i.logIndex.toString(),logId:{keyId:e},integratedTime:i.integratedTime.toString(),kindVersion:{kind:r.kind,version:r.apiVersion},inclusionPromise:s,inclusionProof:n,canonicalizedBody:Buffer.from(i.body,"base64")}]}}o($se,"toTransparencyLogEntry");function qse(i){return{signedEntryTimestamp:Buffer.from(i,"base64")}}o(qse,"inclusionPromise");function Vse(i){return{logIndex:i.logIndex.toString(),treeSize:i.treeSize.toString(),rootHash:Buffer.from(i.rootHash,"hex"),hashes:i.hashes.map(e=>Buffer.from(e,"hex")),checkpoint:{envelope:i.checkpoint}}}o(Vse,"inclusionProof")});var jF=d(Lp=>{"use strict";Object.defineProperty(Lp,"__esModule",{value:!0});Lp.TimestampAuthority=void 0;var zse=Tp(),Yb=class{static{o(this,"TimestampAuthority")}constructor(e){this.options=e}async createTimestamp(e){let{baseURL:t,timeout:r,retry:s}=this.options,n=`${t}/api/v1/timestamp`;return(await(0,zse.fetchWithRetry)(n,{headers:{"Content-Type":"application/json"},body:JSON.stringify(e),timeout:r,retry:s})).buffer()}};Lp.TimestampAuthority=Yb});var qF=d(Mp=>{"use strict";Object.defineProperty(Mp,"__esModule",{value:!0});Mp.TSAClient=void 0;var Hse=Wo(),Gse=jF(),Wse=Xr(),$F="sha256",Xb=class{static{o(this,"TSAClient")}constructor(e){this.tsa=new Gse.TimestampAuthority({baseURL:e.tsaBaseURL,retry:e.retry,timeout:e.timeout})}async createTimestamp(e){let t={artifactHash:Wse.crypto.digest($F,e).toString("base64"),hashAlgorithm:$F};try{return await this.tsa.createTimestamp(t)}catch(r){(0,Hse.internalError)(r,"TSA_CREATE_TIMESTAMP_ERROR","error creating timestamp")}}};Mp.TSAClient=Xb});var VF=d(Bp=>{"use strict";Object.defineProperty(Bp,"__esModule",{value:!0});Bp.TSAWitness=void 0;var Jse=qF(),Qb=class{static{o(this,"TSAWitness")}constructor(e){this.tsa=new Jse.TSAClient({tsaBaseURL:e.tsaBaseURL,retry:e.retry,timeout:e.timeout})}async testify(e){let t=Kse(e);return{rfc3161Timestamps:[{signedTimestamp:await this.tsa.createTimestamp(t)}]}}};Bp.TSAWitness=Qb;function Kse(i){switch(i.$case){case"dsseEnvelope":return i.dsseEnvelope.signatures[0].sig;case"messageSignature":return i.messageSignature.signature}}o(Kse,"extractSignature")});var HF=d(es=>{"use strict";Object.defineProperty(es,"__esModule",{value:!0});es.TSAWitness=es.RekorWitness=es.DEFAULT_REKOR_URL=void 0;var zF=UF();Object.defineProperty(es,"DEFAULT_REKOR_URL",{enumerable:!0,get:o(function(){return zF.DEFAULT_REKOR_URL},"get")});Object.defineProperty(es,"RekorWitness",{enumerable:!0,get:o(function(){return zF.RekorWitness},"get")});var Zse=VF();Object.defineProperty(es,"TSAWitness",{enumerable:!0,get:o(function(){return Zse.TSAWitness},"get")})});var t0=d(be=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});be.TSAWitness=be.RekorWitness=be.DEFAULT_REKOR_URL=be.FulcioSigner=be.DEFAULT_FULCIO_URL=be.CIContextProvider=be.InternalError=be.MessageSignatureBundleBuilder=be.DSSEBundleBuilder=void 0;var GF=_F();Object.defineProperty(be,"DSSEBundleBuilder",{enumerable:!0,get:o(function(){return GF.DSSEBundleBuilder},"get")});Object.defineProperty(be,"MessageSignatureBundleBuilder",{enumerable:!0,get:o(function(){return GF.MessageSignatureBundleBuilder},"get")});var Yse=Wo();Object.defineProperty(be,"InternalError",{enumerable:!0,get:o(function(){return Yse.InternalError},"get")});var Xse=IF();Object.defineProperty(be,"CIContextProvider",{enumerable:!0,get:o(function(){return Xse.CIContextProvider},"get")});var WF=DF();Object.defineProperty(be,"DEFAULT_FULCIO_URL",{enumerable:!0,get:o(function(){return WF.DEFAULT_FULCIO_URL},"get")});Object.defineProperty(be,"FulcioSigner",{enumerable:!0,get:o(function(){return WF.FulcioSigner},"get")});var e0=HF();Object.defineProperty(be,"DEFAULT_REKOR_URL",{enumerable:!0,get:o(function(){return e0.DEFAULT_REKOR_URL},"get")});Object.defineProperty(be,"RekorWitness",{enumerable:!0,get:o(function(){return e0.RekorWitness},"get")});Object.defineProperty(be,"TSAWitness",{enumerable:!0,get:o(function(){return e0.TSAWitness},"get")})});var KF=d(Iu=>{"use strict";var JF=Iu&&Iu.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Iu,"__esModule",{value:!0});Iu.appDataPath=ene;var Qse=JF(require("os")),Yo=JF(require("path"));function ene(i){let e=Qse.default.homedir();switch(process.platform){case"darwin":{let t=Yo.default.join(e,"Library","Application Support");return Yo.default.join(t,i)}case"win32":{let t=process.env.LOCALAPPDATA||Yo.default.join(e,"AppData","Local");return Yo.default.join(t,i,"Data")}default:{let t=process.env.XDG_DATA_HOME||Yo.default.join(e,".local","share");return Yo.default.join(t,i)}}}o(ene,"appDataPath")});var ki=d(lt=>{"use strict";Object.defineProperty(lt,"__esModule",{value:!0});lt.UnsupportedAlgorithmError=lt.CryptoError=lt.LengthOrHashMismatchError=lt.UnsignedMetadataError=lt.RepositoryError=lt.ValueError=void 0;var i0=class extends Error{static{o(this,"ValueError")}};lt.ValueError=i0;var Ou=class extends Error{static{o(this,"RepositoryError")}};lt.RepositoryError=Ou;var r0=class extends Ou{static{o(this,"UnsignedMetadataError")}};lt.UnsignedMetadataError=r0;var s0=class extends Ou{static{o(this,"LengthOrHashMismatchError")}};lt.LengthOrHashMismatchError=s0;var kp=class extends Error{static{o(this,"CryptoError")}};lt.CryptoError=kp;var n0=class extends kp{static{o(this,"UnsupportedAlgorithmError")}};lt.UnsupportedAlgorithmError=n0});var YF=d(ts=>{"use strict";Object.defineProperty(ts,"__esModule",{value:!0});ts.isDefined=tne;ts.isObject=ZF;ts.isStringArray=ine;ts.isObjectArray=rne;ts.isStringRecord=sne;ts.isObjectRecord=nne;function tne(i){return i!==void 0}o(tne,"isDefined");function ZF(i){return typeof i=="object"&&i!==null}o(ZF,"isObject");function ine(i){return Array.isArray(i)&&i.every(e=>typeof e=="string")}o(ine,"isStringArray");function rne(i){return Array.isArray(i)&&i.every(ZF)}o(rne,"isObjectArray");function sne(i){return typeof i=="object"&&i!==null&&Object.keys(i).every(e=>typeof e=="string")&&Object.values(i).every(e=>typeof e=="string")}o(sne,"isStringRecord");function nne(i){return typeof i=="object"&&i!==null&&Object.keys(i).every(e=>typeof e=="string")&&Object.values(i).every(e=>typeof e=="object"&&e!==null)}o(nne,"isObjectRecord")});var a0=d((d0e,QF)=>{function o0(i){let e=[];if(typeof i=="string")e.push(XF(i));else if(typeof i=="boolean")e.push(JSON.stringify(i));else if(Number.isInteger(i))e.push(JSON.stringify(i));else if(i===null)e.push(JSON.stringify(i));else if(Array.isArray(i)){e.push("[");let t=!0;i.forEach(r=>{t||e.push(","),t=!1,e.push(o0(r))}),e.push("]")}else if(typeof i=="object"){e.push("{");let t=!0;Object.keys(i).sort().forEach(r=>{t||e.push(","),t=!1,e.push(XF(r)),e.push(":"),e.push(o0(i[r]))}),e.push("}")}else throw new TypeError("cannot encode "+i.toString());return e.join("")}o(o0,"canonicalize");function XF(i){return'"'+i.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'}o(XF,"canonicalizeString");QF.exports={canonicalize:o0}});var eU=d(Xo=>{"use strict";var one=Xo&&Xo.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Xo,"__esModule",{value:!0});Xo.verifySignature=void 0;var ane=a0(),cne=one(require("crypto")),une=o((i,e,t)=>{let r=Buffer.from((0,ane.canonicalize)(i));return cne.default.verify(void 0,r,e,Buffer.from(t,"hex"))},"verifySignature");Xo.verifySignature=une});var si=d($t=>{"use strict";var lne=$t&&$t.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(i,r,s)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),hne=$t&&$t.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),tU=$t&&$t.__importStar||(function(){var i=o(function(e){return i=Object.getOwnPropertyNames||function(t){var r=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[r.length]=s);return r},i(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=i(e),s=0;s<r.length;s++)r[s]!=="default"&&lne(t,e,r[s]);return hne(t,e),t}})();Object.defineProperty($t,"__esModule",{value:!0});$t.crypto=$t.guard=void 0;$t.guard=tU(YF());$t.crypto=tU(eU())});var an=d(pr=>{"use strict";var fne=pr&&pr.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(pr,"__esModule",{value:!0});pr.Signed=pr.MetadataKind=void 0;pr.isMetadataKind=pne;var dne=fne(require("util")),vu=ki(),c0=si(),iU=["1","0","31"],u0;(function(i){i.Root="root",i.Timestamp="timestamp",i.Snapshot="snapshot",i.Targets="targets"})(u0||(pr.MetadataKind=u0={}));function pne(i){return typeof i=="string"&&Object.values(u0).includes(i)}o(pne,"isMetadataKind");var l0=class i{static{o(this,"Signed")}specVersion;expires;version;unrecognizedFields;constructor(e){this.specVersion=e.specVersion||iU.join(".");let t=this.specVersion.split(".");if(!(t.length===2||t.length===3)||!t.every(r=>mne(r)))throw new vu.ValueError("Failed to parse specVersion");if(t[0]!=iU[0])throw new vu.ValueError("Unsupported specVersion");this.expires=e.expires,this.version=e.version,this.unrecognizedFields=e.unrecognizedFields||{}}equals(e){return e instanceof i?this.specVersion===e.specVersion&&this.expires===e.expires&&this.version===e.version&&dne.default.isDeepStrictEqual(this.unrecognizedFields,e.unrecognizedFields):!1}isExpired(e){return e||(e=new Date),e>=new Date(this.expires)}static commonFieldsFromJSON(e){let{spec_version:t,expires:r,version:s,...n}=e;if(c0.guard.isDefined(t)){if(typeof t!="string")throw new TypeError("spec_version must be a string")}else throw new vu.ValueError("spec_version is not defined");if(c0.guard.isDefined(r)){if(typeof r!="string")throw new TypeError("expires must be a string")}else throw new vu.ValueError("expires is not defined");if(c0.guard.isDefined(s)){if(typeof s!="number")throw new TypeError("version must be a number")}else throw new vu.ValueError("version is not defined");return{specVersion:t,expires:r,version:s,unrecognizedFields:n}}};pr.Signed=l0;function mne(i){return!isNaN(Number(i))}o(mne,"isNumeric")});var Cu=d(rs=>{"use strict";var rU=rs&&rs.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(rs,"__esModule",{value:!0});rs.TargetFile=rs.MetaFile=void 0;var sU=rU(require("crypto")),Up=rU(require("util")),is=ki(),Fp=si(),h0=class i{static{o(this,"MetaFile")}version;length;hashes;unrecognizedFields;constructor(e){if(e.version<=0)throw new is.ValueError("Metafile version must be at least 1");e.length!==void 0&&nU(e.length),this.version=e.version,this.length=e.length,this.hashes=e.hashes,this.unrecognizedFields=e.unrecognizedFields||{}}equals(e){return e instanceof i?this.version===e.version&&this.length===e.length&&Up.default.isDeepStrictEqual(this.hashes,e.hashes)&&Up.default.isDeepStrictEqual(this.unrecognizedFields,e.unrecognizedFields):!1}verify(e){if(this.length!==void 0&&e.length!==this.length)throw new is.LengthOrHashMismatchError(`Expected length ${this.length} but got ${e.length}`);this.hashes&&Object.entries(this.hashes).forEach(([t,r])=>{let s;try{s=sU.default.createHash(t)}catch{throw new is.LengthOrHashMismatchError(`Hash algorithm ${t} not supported`)}let n=s.update(e).digest("hex");if(n!==r)throw new is.LengthOrHashMismatchError(`Expected hash ${r} but got ${n}`)})}toJSON(){let e={version:this.version,...this.unrecognizedFields};return this.length!==void 0&&(e.length=this.length),this.hashes&&(e.hashes=this.hashes),e}static fromJSON(e){let{version:t,length:r,hashes:s,...n}=e;if(typeof t!="number")throw new TypeError("version must be a number");if(Fp.guard.isDefined(r)&&typeof r!="number")throw new TypeError("length must be a number");if(Fp.guard.isDefined(s)&&!Fp.guard.isStringRecord(s))throw new TypeError("hashes must be string keys and values");return new i({version:t,length:r,hashes:s,unrecognizedFields:n})}};rs.MetaFile=h0;var f0=class i{static{o(this,"TargetFile")}length;path;hashes;unrecognizedFields;constructor(e){nU(e.length),this.length=e.length,this.path=e.path,this.hashes=e.hashes,this.unrecognizedFields=e.unrecognizedFields||{}}get custom(){let e=this.unrecognizedFields.custom;return!e||Array.isArray(e)||typeof e!="object"?{}:e}equals(e){return e instanceof i?this.length===e.length&&this.path===e.path&&Up.default.isDeepStrictEqual(this.hashes,e.hashes)&&Up.default.isDeepStrictEqual(this.unrecognizedFields,e.unrecognizedFields):!1}async verify(e){let t=0,r=Object.keys(this.hashes).reduce((s,n)=>{try{s[n]=sU.default.createHash(n)}catch{throw new is.LengthOrHashMismatchError(`Hash algorithm ${n} not supported`)}return s},{});for await(let s of e)t+=s.length,Object.values(r).forEach(n=>{n.update(s)});if(t!==this.length)throw new is.LengthOrHashMismatchError(`Expected length ${this.length} but got ${t}`);Object.entries(r).forEach(([s,n])=>{let a=this.hashes[s],c=n.digest("hex");if(c!==a)throw new is.LengthOrHashMismatchError(`Expected hash ${a} but got ${c}`)})}toJSON(){return{length:this.length,hashes:this.hashes,...this.unrecognizedFields}}static fromJSON(e,t){let{length:r,hashes:s,...n}=t;if(typeof r!="number")throw new TypeError("length must be a number");if(!Fp.guard.isStringRecord(s))throw new TypeError("hashes must have string keys and values");return new i({length:r,path:e,hashes:s,unrecognizedFields:n})}};rs.TargetFile=f0;function nU(i){if(i<0)throw new is.ValueError("Length must be at least 0")}o(nU,"validateLength")});var oU=d(d0=>{"use strict";Object.defineProperty(d0,"__esModule",{value:!0});d0.encodeOIDString=yne;var gne=6;function yne(i){let e=i.split("."),t=parseInt(e[0],10)*40+parseInt(e[1],10),r=[];e.slice(2).forEach(n=>{let a=Sne(parseInt(n,10));r.push(...a)});let s=Buffer.from([t,...r]);return Buffer.from([gne,s.length,...s])}o(yne,"encodeOIDString");function Sne(i){let e=[],t=0;for(;i>0;)e.unshift(i&127|t),i>>=7,t=128;return e}o(Sne,"encodeVariableLengthInteger")});var lU=d(Au=>{"use strict";var Ene=Au&&Au.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Au,"__esModule",{value:!0});Au.getPublicKey=Ine;var Qo=Ene(require("crypto")),Ru=ki(),p0=oU(),jp=48,aU=3,cU=0,wne="1.3.101.112",_ne="1.2.840.10045.2.1",bne="1.2.840.10045.3.1.7",m0="-----BEGIN PUBLIC KEY-----";function Ine(i){switch(i.keyType){case"rsa":return One(i);case"ed25519":return vne(i);case"ecdsa":case"ecdsa-sha2-nistp256":case"ecdsa-sha2-nistp384":return Cne(i);default:throw new Ru.UnsupportedAlgorithmError(`Unsupported key type: ${i.keyType}`)}}o(Ine,"getPublicKey");function One(i){if(!i.keyVal.startsWith(m0))throw new Ru.CryptoError("Invalid key format");let e=Qo.default.createPublicKey(i.keyVal);switch(i.scheme){case"rsassa-pss-sha256":return{key:e,padding:Qo.default.constants.RSA_PKCS1_PSS_PADDING};default:throw new Ru.UnsupportedAlgorithmError(`Unsupported RSA scheme: ${i.scheme}`)}}o(One,"getRSAPublicKey");function vne(i){let e;if(i.keyVal.startsWith(m0))e=Qo.default.createPublicKey(i.keyVal);else{if(!uU(i.keyVal))throw new Ru.CryptoError("Invalid key format");e=Qo.default.createPublicKey({key:Rne.hexToDER(i.keyVal),format:"der",type:"spki"})}return{key:e}}o(vne,"getED25519PublicKey");function Cne(i){let e;if(i.keyVal.startsWith(m0))e=Qo.default.createPublicKey(i.keyVal);else{if(!uU(i.keyVal))throw new Ru.CryptoError("Invalid key format");e=Qo.default.createPublicKey({key:Ane.hexToDER(i.keyVal),format:"der",type:"spki"})}return{key:e}}o(Cne,"getECDCSAPublicKey");var Rne={hexToDER:o(i=>{let e=Buffer.from(i,"hex"),t=(0,p0.encodeOIDString)(wne),r=Buffer.concat([Buffer.concat([Buffer.from([jp]),Buffer.from([t.length]),t]),Buffer.concat([Buffer.from([aU]),Buffer.from([e.length+1]),Buffer.from([cU]),e])]);return Buffer.concat([Buffer.from([jp]),Buffer.from([r.length]),r])},"hexToDER")},Ane={hexToDER:o(i=>{let e=Buffer.from(i,"hex"),t=Buffer.concat([Buffer.from([aU]),Buffer.from([e.length+1]),Buffer.from([cU]),e]),r=Buffer.concat([(0,p0.encodeOIDString)(_ne),(0,p0.encodeOIDString)(bne)]),s=Buffer.concat([Buffer.from([jp]),Buffer.from([r.length]),r]);return Buffer.concat([Buffer.from([jp]),Buffer.from([s.length+t.length]),s,t])},"hexToDER")},uU=o(i=>/^[0-9a-fA-F]+$/.test(i),"isHex")});var $p=d(ea=>{"use strict";var Tne=ea&&ea.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(ea,"__esModule",{value:!0});ea.Key=void 0;var hU=Tne(require("util")),Tu=ki(),fU=si(),Nne=lU(),g0=class i{static{o(this,"Key")}keyID;keyType;scheme;keyVal;unrecognizedFields;constructor(e){let{keyID:t,keyType:r,scheme:s,keyVal:n,unrecognizedFields:a}=e;this.keyID=t,this.keyType=r,this.scheme=s,this.keyVal=n,this.unrecognizedFields=a||{}}verifySignature(e){let t=e.signatures[this.keyID];if(!t)throw new Tu.UnsignedMetadataError("no signature for key found in metadata");if(!this.keyVal.public)throw new Tu.UnsignedMetadataError("no public key found");let r=(0,Nne.getPublicKey)({keyType:this.keyType,scheme:this.scheme,keyVal:this.keyVal.public}),s=e.signed.toJSON();try{if(!fU.crypto.verifySignature(s,r,t.sig))throw new Tu.UnsignedMetadataError(`failed to verify ${this.keyID} signature`)}catch(n){throw n instanceof Tu.UnsignedMetadataError?n:new Tu.UnsignedMetadataError(`failed to verify ${this.keyID} signature`)}}equals(e){return e instanceof i?this.keyID===e.keyID&&this.keyType===e.keyType&&this.scheme===e.scheme&&hU.default.isDeepStrictEqual(this.keyVal,e.keyVal)&&hU.default.isDeepStrictEqual(this.unrecognizedFields,e.unrecognizedFields):!1}toJSON(){return{keytype:this.keyType,scheme:this.scheme,keyval:this.keyVal,...this.unrecognizedFields}}static fromJSON(e,t){let{keytype:r,scheme:s,keyval:n,...a}=t;if(typeof r!="string")throw new TypeError("keytype must be a string");if(typeof s!="string")throw new TypeError("scheme must be a string");if(!fU.guard.isStringRecord(n))throw new TypeError("keyval must be a string record");return new i({keyID:e,keyType:r,scheme:s,keyVal:n,unrecognizedFields:a})}};ea.Key=g0});var yU=d((T0e,gU)=>{"use strict";gU.exports=pU;function pU(i,e,t){i instanceof RegExp&&(i=dU(i,t)),e instanceof RegExp&&(e=dU(e,t));var r=mU(i,e,t);return r&&{start:r[0],end:r[1],pre:t.slice(0,r[0]),body:t.slice(r[0]+i.length,r[1]),post:t.slice(r[1]+e.length)}}o(pU,"balanced");function dU(i,e){var t=e.match(i);return t?t[0]:null}o(dU,"maybeMatch");pU.range=mU;function mU(i,e,t){var r,s,n,a,c,u=t.indexOf(i),l=t.indexOf(e,u+1),h=u;if(u>=0&&l>0){if(i===e)return[u,l];for(r=[],n=t.length;h>=0&&!c;)h==u?(r.push(h),u=t.indexOf(i,h+1)):r.length==1?c=[r.pop(),l]:(s=r.pop(),s<n&&(n=s,a=l),l=t.indexOf(e,h+1)),h=u<l&&u>=0?u:l;r.length&&(c=[n,a])}return c}o(mU,"range")});var vU=d((P0e,OU)=>{var SU=yU();OU.exports=xne;var EU="\0SLASH"+Math.random()+"\0",wU="\0OPEN"+Math.random()+"\0",S0="\0CLOSE"+Math.random()+"\0",_U="\0COMMA"+Math.random()+"\0",bU="\0PERIOD"+Math.random()+"\0";function y0(i){return parseInt(i,10)==i?parseInt(i,10):i.charCodeAt(0)}o(y0,"numeric");function Pne(i){return i.split("\\\\").join(EU).split("\\{").join(wU).split("\\}").join(S0).split("\\,").join(_U).split("\\.").join(bU)}o(Pne,"escapeBraces");function Dne(i){return i.split(EU).join("\\").split(wU).join("{").split(S0).join("}").split(_U).join(",").split(bU).join(".")}o(Dne,"unescapeBraces");function IU(i){if(!i)return[""];var e=[],t=SU("{","}",i);if(!t)return i.split(",");var r=t.pre,s=t.body,n=t.post,a=r.split(",");a[a.length-1]+="{"+s+"}";var c=IU(n);return n.length&&(a[a.length-1]+=c.shift(),a.push.apply(a,c)),e.push.apply(e,a),e}o(IU,"parseCommaParts");function xne(i){return i?(i.substr(0,2)==="{}"&&(i="\\{\\}"+i.substr(2)),Nu(Pne(i),!0).map(Dne)):[]}o(xne,"expandTop");function Lne(i){return"{"+i+"}"}o(Lne,"embrace");function Mne(i){return/^-?0\d/.test(i)}o(Mne,"isPadded");function Bne(i,e){return i<=e}o(Bne,"lte");function kne(i,e){return i>=e}o(kne,"gte");function Nu(i,e){var t=[],r=SU("{","}",i);if(!r)return[i];var s=r.pre,n=r.post.length?Nu(r.post,!1):[""];if(/\$$/.test(r.pre))for(var a=0;a<n.length;a++){var c=s+"{"+r.body+"}"+n[a];t.push(c)}else{var u=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(r.body),l=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(r.body),h=u||l,f=r.body.indexOf(",")>=0;if(!h&&!f)return r.post.match(/,(?!,).*\}/)?(i=r.pre+"{"+r.body+S0+r.post,Nu(i)):[i];var p;if(h)p=r.body.split(/\.\./);else if(p=IU(r.body),p.length===1&&(p=Nu(p[0],!1).map(Lne),p.length===1))return n.map(function(ee){return r.pre+p[0]+ee});var m;if(h){var y=y0(p[0]),g=y0(p[1]),S=Math.max(p[0].length,p[1].length),E=p.length==3?Math.abs(y0(p[2])):1,_=Bne,b=g<y;b&&(E*=-1,_=kne);var w=p.some(Mne);m=[];for(var I=y;_(I,g);I+=E){var v;if(l)v=String.fromCharCode(I),v==="\\"&&(v="");else if(v=String(I),w){var N=S-v.length;if(N>0){var P=new Array(N+1).join("0");I<0?v="-"+P+v.slice(1):v=P+v}}m.push(v)}}else{m=[];for(var U=0;U<p.length;U++)m.push.apply(m,Nu(p[U],!1))}for(var U=0;U<m.length;U++)for(var a=0;a<n.length;a++){var c=s+m[U]+n[a];(!e||h||c)&&t.push(c)}}return t}o(Nu,"expand")});var CU=d(qp=>{"use strict";Object.defineProperty(qp,"__esModule",{value:!0});qp.assertValidPattern=void 0;var Fne=1024*64,Une=o(i=>{if(typeof i!="string")throw new TypeError("invalid pattern");if(i.length>Fne)throw new TypeError("pattern is too long")},"assertValidPattern");qp.assertValidPattern=Une});var AU=d(Vp=>{"use strict";Object.defineProperty(Vp,"__esModule",{value:!0});Vp.parseClass=void 0;var jne={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},Pu=o(i=>i.replace(/[[\]\\-]/g,"\\$&"),"braceEscape"),$ne=o(i=>i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regexpEscape"),RU=o(i=>i.join(""),"rangesToString"),qne=o((i,e)=>{let t=e;if(i.charAt(t)!=="[")throw new Error("not in a brace expression");let r=[],s=[],n=t+1,a=!1,c=!1,u=!1,l=!1,h=t,f="";e:for(;n<i.length;){let g=i.charAt(n);if((g==="!"||g==="^")&&n===t+1){l=!0,n++;continue}if(g==="]"&&a&&!u){h=n+1;break}if(a=!0,g==="\\"&&!u){u=!0,n++;continue}if(g==="["&&!u){for(let[S,[E,_,b]]of Object.entries(jne))if(i.startsWith(S,n)){if(f)return["$.",!1,i.length-t,!0];n+=S.length,b?s.push(E):r.push(E),c=c||_;continue e}}if(u=!1,f){g>f?r.push(Pu(f)+"-"+Pu(g)):g===f&&r.push(Pu(g)),f="",n++;continue}if(i.startsWith("-]",n+1)){r.push(Pu(g+"-")),n+=2;continue}if(i.startsWith("-",n+1)){f=g,n+=2;continue}r.push(Pu(g)),n++}if(h<n)return["",!1,0,!1];if(!r.length&&!s.length)return["$.",!1,i.length-t,!0];if(s.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!l){let g=r[0].length===2?r[0].slice(-1):r[0];return[$ne(g),!1,h-t,!1]}let p="["+(l?"^":"")+RU(r)+"]",m="["+(l?"":"^")+RU(s)+"]";return[r.length&&s.length?"("+p+"|"+m+")":r.length?p:m,c,h-t,!0]},"parseClass");Vp.parseClass=qne});var Hp=d(zp=>{"use strict";Object.defineProperty(zp,"__esModule",{value:!0});zp.unescape=void 0;var Vne=o((i,{windowsPathsNoEscape:e=!1}={})=>e?i.replace(/\[([^\/\\])\]/g,"$1"):i.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),"unescape");zp.unescape=Vne});var _0=d(Jp=>{"use strict";Object.defineProperty(Jp,"__esModule",{value:!0});Jp.AST=void 0;var zne=AU(),Gp=Hp(),Hne=new Set(["!","?","+","*","@"]),TU=o(i=>Hne.has(i),"isExtglobType"),Gne="(?!(?:^|/)\\.\\.?(?:$|/))",Wp="(?!\\.)",Wne=new Set(["[","."]),Jne=new Set(["..","."]),Kne=new Set("().*{}+?[]^$\\!"),Zne=o(i=>i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),w0="[^/]",NU=w0+"*?",PU=w0+"+?",E0=class i{static{o(this,"AST")}type;#e;#t;#i=!1;#r=[];#s;#u;#c;#f=!1;#n;#h;#o=!1;constructor(e,t,r={}){this.type=e,e&&(this.#t=!0),this.#s=t,this.#e=this.#s?this.#s.#e:this,this.#n=this.#e===this?r:this.#e.#n,this.#c=this.#e===this?[]:this.#e.#c,e==="!"&&!this.#e.#f&&this.#c.push(this),this.#u=this.#s?this.#s.#r.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let e of this.#r)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#h!==void 0?this.#h:this.type?this.#h=this.type+"("+this.#r.map(e=>String(e)).join("|")+")":this.#h=this.#r.map(e=>String(e)).join("")}#d(){if(this!==this.#e)throw new Error("should only call on root");if(this.#f)return this;this.toString(),this.#f=!0;let e;for(;e=this.#c.pop();){if(e.type!=="!")continue;let t=e,r=t.#s;for(;r;){for(let s=t.#u+1;!r.type&&s<r.#r.length;s++)for(let n of e.#r){if(typeof n=="string")throw new Error("string part in extglob AST??");n.copyIn(r.#r[s])}t=r,r=t.#s}}return this}push(...e){for(let t of e)if(t!==""){if(typeof t!="string"&&!(t instanceof i&&t.#s===this))throw new Error("invalid part: "+t);this.#r.push(t)}}toJSON(){let e=this.type===null?this.#r.slice().map(t=>typeof t=="string"?t:t.toJSON()):[this.type,...this.#r.map(t=>t.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#f&&this.#s?.type==="!")&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#s?.isStart())return!1;if(this.#u===0)return!0;let e=this.#s;for(let t=0;t<this.#u;t++){let r=e.#r[t];if(!(r instanceof i&&r.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#s?.type==="!")return!0;if(!this.#s?.isEnd())return!1;if(!this.type)return this.#s?.isEnd();let e=this.#s?this.#s.#r.length:0;return this.#u===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let t=new i(this.type,e);for(let r of this.#r)t.copyIn(r);return t}static#a(e,t,r,s){let n=!1,a=!1,c=-1,u=!1;if(t.type===null){let m=r,y="";for(;m<e.length;){let g=e.charAt(m++);if(n||g==="\\"){n=!n,y+=g;continue}if(a){m===c+1?(g==="^"||g==="!")&&(u=!0):g==="]"&&!(m===c+2&&u)&&(a=!1),y+=g;continue}else if(g==="["){a=!0,c=m,u=!1,y+=g;continue}if(!s.noext&&TU(g)&&e.charAt(m)==="("){t.push(y),y="";let S=new i(g,t);m=i.#a(e,S,m,s),t.push(S);continue}y+=g}return t.push(y),m}let l=r+1,h=new i(null,t),f=[],p="";for(;l<e.length;){let m=e.charAt(l++);if(n||m==="\\"){n=!n,p+=m;continue}if(a){l===c+1?(m==="^"||m==="!")&&(u=!0):m==="]"&&!(l===c+2&&u)&&(a=!1),p+=m;continue}else if(m==="["){a=!0,c=l,u=!1,p+=m;continue}if(TU(m)&&e.charAt(l)==="("){h.push(p),p="";let y=new i(m,h);h.push(y),l=i.#a(e,y,l,s);continue}if(m==="|"){h.push(p),p="",f.push(h),h=new i(null,t);continue}if(m===")")return p===""&&t.#r.length===0&&(t.#o=!0),h.push(p),p="",t.push(...f,h),l;p+=m}return t.type=null,t.#t=void 0,t.#r=[e.substring(r-1)],l}static fromGlob(e,t={}){let r=new i(null,void 0,t);return i.#a(e,r,0,t),r}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[t,r,s,n]=this.toRegExpSource();if(!(s||this.#t||this.#n.nocase&&!this.#n.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return r;let c=(this.#n.nocase?"i":"")+(n?"u":"");return Object.assign(new RegExp(`^${t}$`,c),{_src:t,_glob:e})}get options(){return this.#n}toRegExpSource(e){let t=e??!!this.#n.dot;if(this.#e===this&&this.#d(),!this.type){let u=this.isStart()&&this.isEnd(),l=this.#r.map(m=>{let[y,g,S,E]=typeof m=="string"?i.#y(m,this.#t,u):m.toRegExpSource(e);return this.#t=this.#t||S,this.#i=this.#i||E,y}).join(""),h="";if(this.isStart()&&typeof this.#r[0]=="string"&&!(this.#r.length===1&&Jne.has(this.#r[0]))){let y=Wne,g=t&&y.has(l.charAt(0))||l.startsWith("\\.")&&y.has(l.charAt(2))||l.startsWith("\\.\\.")&&y.has(l.charAt(4)),S=!t&&!e&&y.has(l.charAt(0));h=g?Gne:S?Wp:""}let f="";return this.isEnd()&&this.#e.#f&&this.#s?.type==="!"&&(f="(?:$|\\/)"),[h+l+f,(0,Gp.unescape)(l),this.#t=!!this.#t,this.#i]}let r=this.type==="*"||this.type==="+",s=this.type==="!"?"(?:(?!(?:":"(?:",n=this.#p(t);if(this.isStart()&&this.isEnd()&&!n&&this.type!=="!"){let u=this.toString();return this.#r=[u],this.type=null,this.#t=void 0,[u,(0,Gp.unescape)(this.toString()),!1,!1]}let a=!r||e||t||!Wp?"":this.#p(!0);a===n&&(a=""),a&&(n=`(?:${n})(?:${a})*?`);let c="";if(this.type==="!"&&this.#o)c=(this.isStart()&&!t?Wp:"")+PU;else{let u=this.type==="!"?"))"+(this.isStart()&&!t&&!e?Wp:"")+NU+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;c=s+n+u}return[c,(0,Gp.unescape)(n),this.#t=!!this.#t,this.#i]}#p(e){return this.#r.map(t=>{if(typeof t=="string")throw new Error("string type in extglob ast??");let[r,s,n,a]=t.toRegExpSource(e);return this.#i=this.#i||a,r}).filter(t=>!(this.isStart()&&this.isEnd())||!!t).join("|")}static#y(e,t,r=!1){let s=!1,n="",a=!1;for(let c=0;c<e.length;c++){let u=e.charAt(c);if(s){s=!1,n+=(Kne.has(u)?"\\":"")+u;continue}if(u==="\\"){c===e.length-1?n+="\\\\":s=!0;continue}if(u==="["){let[l,h,f,p]=(0,zne.parseClass)(e,c);if(f){n+=l,a=a||h,c+=f-1,t=t||p;continue}}if(u==="*"){r&&e==="*"?n+=PU:n+=NU,t=!0;continue}if(u==="?"){n+=w0,t=!0;continue}n+=Zne(u)}return[n,(0,Gp.unescape)(e),!!t,a]}};Jp.AST=E0});var b0=d(Kp=>{"use strict";Object.defineProperty(Kp,"__esModule",{value:!0});Kp.escape=void 0;var Yne=o((i,{windowsPathsNoEscape:e=!1}={})=>e?i.replace(/[?*()[\]]/g,"[$&]"):i.replace(/[?*()[\]\\]/g,"\\$&"),"escape");Kp.escape=Yne});var FU=d(A=>{"use strict";var Xne=A&&A.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(A,"__esModule",{value:!0});A.unescape=A.escape=A.AST=A.Minimatch=A.match=A.makeRe=A.braceExpand=A.defaults=A.filter=A.GLOBSTAR=A.sep=A.minimatch=void 0;var Qne=Xne(vU()),Zp=CU(),LU=_0(),eoe=b0(),toe=Hp(),ioe=o((i,e,t={})=>((0,Zp.assertValidPattern)(e),!t.nocomment&&e.charAt(0)==="#"?!1:new cn(e,t).match(i)),"minimatch");A.minimatch=ioe;var roe=/^\*+([^+@!?\*\[\(]*)$/,soe=o(i=>e=>!e.startsWith(".")&&e.endsWith(i),"starDotExtTest"),noe=o(i=>e=>e.endsWith(i),"starDotExtTestDot"),ooe=o(i=>(i=i.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(i)),"starDotExtTestNocase"),aoe=o(i=>(i=i.toLowerCase(),e=>e.toLowerCase().endsWith(i)),"starDotExtTestNocaseDot"),coe=/^\*+\.\*+$/,uoe=o(i=>!i.startsWith(".")&&i.includes("."),"starDotStarTest"),loe=o(i=>i!=="."&&i!==".."&&i.includes("."),"starDotStarTestDot"),hoe=/^\.\*+$/,foe=o(i=>i!=="."&&i!==".."&&i.startsWith("."),"dotStarTest"),doe=/^\*+$/,poe=o(i=>i.length!==0&&!i.startsWith("."),"starTest"),moe=o(i=>i.length!==0&&i!=="."&&i!=="..","starTestDot"),goe=/^\?+([^+@!?\*\[\(]*)?$/,yoe=o(([i,e=""])=>{let t=MU([i]);return e?(e=e.toLowerCase(),r=>t(r)&&r.toLowerCase().endsWith(e)):t},"qmarksTestNocase"),Soe=o(([i,e=""])=>{let t=BU([i]);return e?(e=e.toLowerCase(),r=>t(r)&&r.toLowerCase().endsWith(e)):t},"qmarksTestNocaseDot"),Eoe=o(([i,e=""])=>{let t=BU([i]);return e?r=>t(r)&&r.endsWith(e):t},"qmarksTestDot"),woe=o(([i,e=""])=>{let t=MU([i]);return e?r=>t(r)&&r.endsWith(e):t},"qmarksTest"),MU=o(([i])=>{let e=i.length;return t=>t.length===e&&!t.startsWith(".")},"qmarksTestNoExt"),BU=o(([i])=>{let e=i.length;return t=>t.length===e&&t!=="."&&t!==".."},"qmarksTestNoExtDot"),kU=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",DU={win32:{sep:"\\"},posix:{sep:"/"}};A.sep=kU==="win32"?DU.win32.sep:DU.posix.sep;A.minimatch.sep=A.sep;A.GLOBSTAR=Symbol("globstar **");A.minimatch.GLOBSTAR=A.GLOBSTAR;var _oe="[^/]",boe=_oe+"*?",Ioe="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Ooe="(?:(?!(?:\\/|^)\\.).)*?",voe=o((i,e={})=>t=>(0,A.minimatch)(t,i,e),"filter");A.filter=voe;A.minimatch.filter=A.filter;var qt=o((i,e={})=>Object.assign({},i,e),"ext"),Coe=o(i=>{if(!i||typeof i!="object"||!Object.keys(i).length)return A.minimatch;let e=A.minimatch;return Object.assign(o((r,s,n={})=>e(r,s,qt(i,n)),"m"),{Minimatch:class extends e.Minimatch{static{o(this,"Minimatch")}constructor(s,n={}){super(s,qt(i,n))}static defaults(s){return e.defaults(qt(i,s)).Minimatch}},AST:class extends e.AST{static{o(this,"AST")}constructor(s,n,a={}){super(s,n,qt(i,a))}static fromGlob(s,n={}){return e.AST.fromGlob(s,qt(i,n))}},unescape:o((r,s={})=>e.unescape(r,qt(i,s)),"unescape"),escape:o((r,s={})=>e.escape(r,qt(i,s)),"escape"),filter:o((r,s={})=>e.filter(r,qt(i,s)),"filter"),defaults:o(r=>e.defaults(qt(i,r)),"defaults"),makeRe:o((r,s={})=>e.makeRe(r,qt(i,s)),"makeRe"),braceExpand:o((r,s={})=>e.braceExpand(r,qt(i,s)),"braceExpand"),match:o((r,s,n={})=>e.match(r,s,qt(i,n)),"match"),sep:e.sep,GLOBSTAR:A.GLOBSTAR})},"defaults");A.defaults=Coe;A.minimatch.defaults=A.defaults;var Roe=o((i,e={})=>((0,Zp.assertValidPattern)(i),e.nobrace||!/\{(?:(?!\{).)*\}/.test(i)?[i]:(0,Qne.default)(i)),"braceExpand");A.braceExpand=Roe;A.minimatch.braceExpand=A.braceExpand;var Aoe=o((i,e={})=>new cn(i,e).makeRe(),"makeRe");A.makeRe=Aoe;A.minimatch.makeRe=A.makeRe;var Toe=o((i,e,t={})=>{let r=new cn(e,t);return i=i.filter(s=>r.match(s)),r.options.nonull&&!i.length&&i.push(e),i},"match");A.match=Toe;A.minimatch.match=A.match;var xU=/[?*]|[+@!]\(.*?\)|\[|\]/,Noe=o(i=>i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),cn=class{static{o(this,"Minimatch")}options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,t={}){(0,Zp.assertValidPattern)(e),t=t||{},this.options=t,this.pattern=e,this.platform=t.platform||kU,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot!==void 0?t.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if(typeof t!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...n)=>{}),this.debug(this.pattern,this.globSet);let r=this.globSet.map(n=>this.slashSplit(n));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let s=this.globParts.map((n,a,c)=>{if(this.isWindows&&this.windowsNoMagicRoot){let u=n[0]===""&&n[1]===""&&(n[2]==="?"||!xU.test(n[2]))&&!xU.test(n[3]),l=/^[a-z]:/i.test(n[0]);if(u)return[...n.slice(0,4),...n.slice(4).map(h=>this.parse(h))];if(l)return[n[0],...n.slice(1).map(h=>this.parse(h))]}return n.map(u=>this.parse(u))});if(this.debug(this.pattern,s),this.set=s.filter(n=>n.indexOf(!1)===-1),this.isWindows)for(let n=0;n<this.set.length;n++){let a=this.set[n];a[0]===""&&a[1]===""&&this.globParts[n][2]==="?"&&typeof a[3]=="string"&&/^[a-z]:$/i.test(a[3])&&(a[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let r=0;r<e.length;r++)for(let s=0;s<e[r].length;s++)e[r][s]==="**"&&(e[r][s]="*");let{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):t>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(t=>{let r=-1;for(;(r=t.indexOf("**",r+1))!==-1;){let s=r;for(;t[s+1]==="**";)s++;s!==r&&t.splice(r,s-r)}return t})}levelOneOptimize(e){return e.map(t=>(t=t.reduce((r,s)=>{let n=r[r.length-1];return s==="**"&&n==="**"?r:s===".."&&n&&n!==".."&&n!=="."&&n!=="**"?(r.pop(),r):(r.push(s),r)},[]),t.length===0?[""]:t))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let s=1;s<e.length-1;s++){let n=e[s];s===1&&n===""&&e[0]===""||(n==="."||n==="")&&(t=!0,e.splice(s,1),s--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(t=!0,e.pop())}let r=0;for(;(r=e.indexOf("..",r+1))!==-1;){let s=e[r-1];s&&s!=="."&&s!==".."&&s!=="**"&&(t=!0,e.splice(r-1,2),r-=2)}}while(t);return e.length===0?[""]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let r of e){let s=-1;for(;(s=r.indexOf("**",s+1))!==-1;){let a=s;for(;r[a+1]==="**";)a++;a>s&&r.splice(s+1,a-s);let c=r[s+1],u=r[s+2],l=r[s+3];if(c!==".."||!u||u==="."||u===".."||!l||l==="."||l==="..")continue;t=!0,r.splice(s,1);let h=r.slice(0);h[s]="**",e.push(h),s--}if(!this.preserveMultipleSlashes){for(let a=1;a<r.length-1;a++){let c=r[a];a===1&&c===""&&r[0]===""||(c==="."||c==="")&&(t=!0,r.splice(a,1),a--)}r[0]==="."&&r.length===2&&(r[1]==="."||r[1]==="")&&(t=!0,r.pop())}let n=0;for(;(n=r.indexOf("..",n+1))!==-1;){let a=r[n-1];if(a&&a!=="."&&a!==".."&&a!=="**"){t=!0;let u=n===1&&r[n+1]==="**"?["."]:[];r.splice(n-1,2,...u),r.length===0&&r.push(""),n-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let r=t+1;r<e.length;r++){let s=this.partsMatch(e[t],e[r],!this.preserveMultipleSlashes);if(s){e[t]=[],e[r]=s;break}}return e.filter(t=>t.length)}partsMatch(e,t,r=!1){let s=0,n=0,a=[],c="";for(;s<e.length&&n<t.length;)if(e[s]===t[n])a.push(c==="b"?t[n]:e[s]),s++,n++;else if(r&&e[s]==="**"&&t[n]===e[s+1])a.push(e[s]),s++;else if(r&&t[n]==="**"&&e[s]===t[n+1])a.push(t[n]),n++;else if(e[s]==="*"&&t[n]&&(this.options.dot||!t[n].startsWith("."))&&t[n]!=="**"){if(c==="b")return!1;c="a",a.push(e[s]),s++,n++}else if(t[n]==="*"&&e[s]&&(this.options.dot||!e[s].startsWith("."))&&e[s]!=="**"){if(c==="a")return!1;c="b",a.push(t[n]),s++,n++}else return!1;return e.length===t.length&&a}parseNegate(){if(this.nonegate)return;let e=this.pattern,t=!1,r=0;for(let s=0;s<e.length&&e.charAt(s)==="!";s++)t=!t,r++;r&&(this.pattern=e.slice(r)),this.negate=t}matchOne(e,t,r=!1){let s=this.options;if(this.isWindows){let g=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),S=!g&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),E=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),_=!E&&t[0]===""&&t[1]===""&&t[2]==="?"&&typeof t[3]=="string"&&/^[a-z]:$/i.test(t[3]),b=S?3:g?0:void 0,w=_?3:E?0:void 0;if(typeof b=="number"&&typeof w=="number"){let[I,v]=[e[b],t[w]];I.toLowerCase()===v.toLowerCase()&&(t[w]=I,w>b?t=t.slice(w):b>w&&(e=e.slice(b)))}}let{optimizationLevel:n=1}=this.options;n>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var a=0,c=0,u=e.length,l=t.length;a<u&&c<l;a++,c++){this.debug("matchOne loop");var h=t[c],f=e[a];if(this.debug(t,h,f),h===!1)return!1;if(h===A.GLOBSTAR){this.debug("GLOBSTAR",[t,h,f]);var p=a,m=c+1;if(m===l){for(this.debug("** at the end");a<u;a++)if(e[a]==="."||e[a]===".."||!s.dot&&e[a].charAt(0)===".")return!1;return!0}for(;p<u;){var y=e[p];if(this.debug(`
62
+ globstar while`,e,p,t,m,y),this.matchOne(e.slice(p),t.slice(m),r))return this.debug("globstar found match!",p,u,y),!0;if(y==="."||y===".."||!s.dot&&y.charAt(0)==="."){this.debug("dot detected!",e,p,t,m);break}this.debug("globstar swallow a segment, and continue"),p++}return!!(r&&(this.debug(`
63
+ >>> no match, partial?`,e,p,t,m),p===u))}let g;if(typeof h=="string"?(g=f===h,this.debug("string match",h,f,g)):(g=h.test(f),this.debug("pattern match",h,f,g)),!g)return!1}if(a===u&&c===l)return!0;if(a===u)return r;if(c===l)return a===u-1&&e[a]==="";throw new Error("wtf?")}braceExpand(){return(0,A.braceExpand)(this.pattern,this.options)}parse(e){(0,Zp.assertValidPattern)(e);let t=this.options;if(e==="**")return A.GLOBSTAR;if(e==="")return"";let r,s=null;(r=e.match(doe))?s=t.dot?moe:poe:(r=e.match(roe))?s=(t.nocase?t.dot?aoe:ooe:t.dot?noe:soe)(r[1]):(r=e.match(goe))?s=(t.nocase?t.dot?Soe:yoe:t.dot?Eoe:woe)(r):(r=e.match(coe))?s=t.dot?loe:uoe:(r=e.match(hoe))&&(s=foe);let n=LU.AST.fromGlob(e,this.options).toMMPattern();return s&&typeof n=="object"&&Reflect.defineProperty(n,"test",{value:s}),n}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let t=this.options,r=t.noglobstar?boe:t.dot?Ioe:Ooe,s=new Set(t.nocase?["i"]:[]),n=e.map(u=>{let l=u.map(h=>{if(h instanceof RegExp)for(let f of h.flags.split(""))s.add(f);return typeof h=="string"?Noe(h):h===A.GLOBSTAR?A.GLOBSTAR:h._src});return l.forEach((h,f)=>{let p=l[f+1],m=l[f-1];h!==A.GLOBSTAR||m===A.GLOBSTAR||(m===void 0?p!==void 0&&p!==A.GLOBSTAR?l[f+1]="(?:\\/|"+r+"\\/)?"+p:l[f]=r:p===void 0?l[f-1]=m+"(?:\\/|"+r+")?":p!==A.GLOBSTAR&&(l[f-1]=m+"(?:\\/|\\/"+r+"\\/)"+p,l[f+1]=A.GLOBSTAR))}),l.filter(h=>h!==A.GLOBSTAR).join("/")}).join("|"),[a,c]=e.length>1?["(?:",")"]:["",""];n="^"+a+n+c+"$",this.negate&&(n="^(?!"+n+").+$");try{this.regexp=new RegExp(n,[...s].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&t)return!0;let r=this.options;this.isWindows&&(e=e.split("\\").join("/"));let s=this.slashSplit(e);this.debug(this.pattern,"split",s);let n=this.set;this.debug(this.pattern,"set",n);let a=s[s.length-1];if(!a)for(let c=s.length-2;!a&&c>=0;c--)a=s[c];for(let c=0;c<n.length;c++){let u=n[c],l=s;if(r.matchBase&&u.length===1&&(l=[a]),this.matchOne(l,u,t))return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate}static defaults(e){return A.minimatch.defaults(e).Minimatch}};A.Minimatch=cn;var Poe=_0();Object.defineProperty(A,"AST",{enumerable:!0,get:o(function(){return Poe.AST},"get")});var Doe=b0();Object.defineProperty(A,"escape",{enumerable:!0,get:o(function(){return Doe.escape},"get")});var xoe=Hp();Object.defineProperty(A,"unescape",{enumerable:!0,get:o(function(){return xoe.unescape},"get")});A.minimatch.AST=LU.AST;A.minimatch.Minimatch=cn;A.minimatch.escape=eoe.escape;A.minimatch.unescape=toe.unescape});var v0=d(Vt=>{"use strict";var UU=Vt&&Vt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Vt,"__esModule",{value:!0});Vt.SuccinctRoles=Vt.DelegatedRole=Vt.Role=Vt.TOP_LEVEL_ROLE_NAMES=void 0;var jU=UU(require("crypto")),Loe=FU(),Yp=UU(require("util")),Xp=ki(),un=si();Vt.TOP_LEVEL_ROLE_NAMES=["root","targets","snapshot","timestamp"];var Du=class i{static{o(this,"Role")}keyIDs;threshold;unrecognizedFields;constructor(e){let{keyIDs:t,threshold:r,unrecognizedFields:s}=e;if(Moe(t))throw new Xp.ValueError("duplicate key IDs found");if(r<1)throw new Xp.ValueError("threshold must be at least 1");this.keyIDs=t,this.threshold=r,this.unrecognizedFields=s||{}}equals(e){return e instanceof i?this.threshold===e.threshold&&Yp.default.isDeepStrictEqual(this.keyIDs,e.keyIDs)&&Yp.default.isDeepStrictEqual(this.unrecognizedFields,e.unrecognizedFields):!1}toJSON(){return{keyids:this.keyIDs,threshold:this.threshold,...this.unrecognizedFields}}static fromJSON(e){let{keyids:t,threshold:r,...s}=e;if(!un.guard.isStringArray(t))throw new TypeError("keyids must be an array");if(typeof r!="number")throw new TypeError("threshold must be a number");return new i({keyIDs:t,threshold:r,unrecognizedFields:s})}};Vt.Role=Du;function Moe(i){return new Set(i).size!==i.length}o(Moe,"hasDuplicates");var I0=class i extends Du{static{o(this,"DelegatedRole")}name;terminating;paths;pathHashPrefixes;constructor(e){super(e);let{name:t,terminating:r,paths:s,pathHashPrefixes:n}=e;if(this.name=t,this.terminating=r,e.paths&&e.pathHashPrefixes)throw new Xp.ValueError("paths and pathHashPrefixes are mutually exclusive");this.paths=s,this.pathHashPrefixes=n}equals(e){return e instanceof i?super.equals(e)&&this.name===e.name&&this.terminating===e.terminating&&Yp.default.isDeepStrictEqual(this.paths,e.paths)&&Yp.default.isDeepStrictEqual(this.pathHashPrefixes,e.pathHashPrefixes):!1}isDelegatedPath(e){if(this.paths)return this.paths.some(t=>koe(e,t));if(this.pathHashPrefixes){let r=jU.default.createHash("sha256").update(e).digest("hex");return this.pathHashPrefixes.some(s=>r.startsWith(s))}return!1}toJSON(){let e={...super.toJSON(),name:this.name,terminating:this.terminating};return this.paths&&(e.paths=this.paths),this.pathHashPrefixes&&(e.path_hash_prefixes=this.pathHashPrefixes),e}static fromJSON(e){let{keyids:t,threshold:r,name:s,terminating:n,paths:a,path_hash_prefixes:c,...u}=e;if(!un.guard.isStringArray(t))throw new TypeError("keyids must be an array of strings");if(typeof r!="number")throw new TypeError("threshold must be a number");if(typeof s!="string")throw new TypeError("name must be a string");if(typeof n!="boolean")throw new TypeError("terminating must be a boolean");if(un.guard.isDefined(a)&&!un.guard.isStringArray(a))throw new TypeError("paths must be an array of strings");if(un.guard.isDefined(c)&&!un.guard.isStringArray(c))throw new TypeError("path_hash_prefixes must be an array of strings");return new i({keyIDs:t,threshold:r,name:s,terminating:n,paths:a,pathHashPrefixes:c,unrecognizedFields:u})}};Vt.DelegatedRole=I0;var Boe=o((i,e)=>i.map((t,r)=>[t,e[r]]),"zip");function koe(i,e){let t=i.split("/"),r=e.split("/");return r.length!=t.length?!1:Boe(t,r).every(([s,n])=>(0,Loe.minimatch)(s,n))}o(koe,"isTargetInPathPattern");var O0=class i extends Du{static{o(this,"SuccinctRoles")}bitLength;namePrefix;numberOfBins;suffixLen;constructor(e){super(e);let{bitLength:t,namePrefix:r}=e;if(t<=0||t>32)throw new Xp.ValueError("bitLength must be between 1 and 32");this.bitLength=t,this.namePrefix=r,this.numberOfBins=Math.pow(2,t),this.suffixLen=(this.numberOfBins-1).toString(16).length}equals(e){return e instanceof i?super.equals(e)&&this.bitLength===e.bitLength&&this.namePrefix===e.namePrefix:!1}getRoleForTarget(e){let s=jU.default.createHash("sha256").update(e).digest().subarray(0,4),n=32-this.bitLength,c=(s.readUInt32BE()>>>n).toString(16).padStart(this.suffixLen,"0");return`${this.namePrefix}-${c}`}*getRoles(){for(let e=0;e<this.numberOfBins;e++){let t=e.toString(16).padStart(this.suffixLen,"0");yield`${this.namePrefix}-${t}`}}isDelegatedRole(e){let t=this.namePrefix+"-";if(!e.startsWith(t))return!1;let r=e.slice(t.length,e.length);if(r.length!=this.suffixLen||!r.match(/^[0-9a-fA-F]+$/))return!1;let s=parseInt(r,16);return 0<=s&&s<this.numberOfBins}toJSON(){return{...super.toJSON(),bit_length:this.bitLength,name_prefix:this.namePrefix}}static fromJSON(e){let{keyids:t,threshold:r,bit_length:s,name_prefix:n,...a}=e;if(!un.guard.isStringArray(t))throw new TypeError("keyids must be an array of strings");if(typeof r!="number")throw new TypeError("threshold must be a number");if(typeof s!="number")throw new TypeError("bit_length must be a number");if(typeof n!="string")throw new TypeError("name_prefix must be a string");return new i({keyIDs:t,threshold:r,bitLength:s,namePrefix:n,unrecognizedFields:a})}};Vt.SuccinctRoles=O0});var A0=d(ta=>{"use strict";var Foe=ta&&ta.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(ta,"__esModule",{value:!0});ta.Root=void 0;var $U=Foe(require("util")),C0=an(),qU=ki(),Uoe=$p(),Qp=v0(),em=si(),R0=class i extends C0.Signed{static{o(this,"Root")}type=C0.MetadataKind.Root;keys;roles;consistentSnapshot;constructor(e){if(super(e),this.keys=e.keys||{},this.consistentSnapshot=e.consistentSnapshot??!0,!e.roles)this.roles=Qp.TOP_LEVEL_ROLE_NAMES.reduce((t,r)=>({...t,[r]:new Qp.Role({keyIDs:[],threshold:1})}),{});else{let t=new Set(Object.keys(e.roles));if(!Qp.TOP_LEVEL_ROLE_NAMES.every(r=>t.has(r)))throw new qU.ValueError("missing top-level role");this.roles=e.roles}}addKey(e,t){if(!this.roles[t])throw new qU.ValueError(`role ${t} does not exist`);this.roles[t].keyIDs.includes(e.keyID)||this.roles[t].keyIDs.push(e.keyID),this.keys[e.keyID]=e}equals(e){return e instanceof i?super.equals(e)&&this.consistentSnapshot===e.consistentSnapshot&&$U.default.isDeepStrictEqual(this.keys,e.keys)&&$U.default.isDeepStrictEqual(this.roles,e.roles):!1}toJSON(){return{_type:this.type,spec_version:this.specVersion,version:this.version,expires:this.expires,keys:joe(this.keys),roles:$oe(this.roles),consistent_snapshot:this.consistentSnapshot,...this.unrecognizedFields}}static fromJSON(e){let{unrecognizedFields:t,...r}=C0.Signed.commonFieldsFromJSON(e),{keys:s,roles:n,consistent_snapshot:a,...c}=t;if(typeof a!="boolean")throw new TypeError("consistent_snapshot must be a boolean");return new i({...r,keys:qoe(s),roles:Voe(n),consistentSnapshot:a,unrecognizedFields:c})}};ta.Root=R0;function joe(i){return Object.entries(i).reduce((e,[t,r])=>({...e,[t]:r.toJSON()}),{})}o(joe,"keysToJSON");function $oe(i){return Object.entries(i).reduce((e,[t,r])=>({...e,[t]:r.toJSON()}),{})}o($oe,"rolesToJSON");function qoe(i){let e;if(em.guard.isDefined(i)){if(!em.guard.isObjectRecord(i))throw new TypeError("keys must be an object");e=Object.entries(i).reduce((t,[r,s])=>({...t,[r]:Uoe.Key.fromJSON(r,s)}),{})}return e}o(qoe,"keysFromJSON");function Voe(i){let e;if(em.guard.isDefined(i)){if(!em.guard.isObjectRecord(i))throw new TypeError("roles must be an object");e=Object.entries(i).reduce((t,[r,s])=>({...t,[r]:Qp.Role.fromJSON(s)}),{})}return e}o(Voe,"rolesFromJSON")});var N0=d(tm=>{"use strict";Object.defineProperty(tm,"__esModule",{value:!0});tm.Signature=void 0;var T0=class i{static{o(this,"Signature")}keyID;sig;constructor(e){let{keyID:t,sig:r}=e;this.keyID=t,this.sig=r}toJSON(){return{keyid:this.keyID,sig:this.sig}}static fromJSON(e){let{keyid:t,sig:r}=e;if(typeof t!="string")throw new TypeError("keyid must be a string");if(typeof r!="string")throw new TypeError("sig must be a string");return new i({keyID:t,sig:r})}};tm.Signature=T0});var x0=d(ia=>{"use strict";var zoe=ia&&ia.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(ia,"__esModule",{value:!0});ia.Snapshot=void 0;var Hoe=zoe(require("util")),P0=an(),zU=Cu(),VU=si(),D0=class i extends P0.Signed{static{o(this,"Snapshot")}type=P0.MetadataKind.Snapshot;meta;constructor(e){super(e),this.meta=e.meta||{"targets.json":new zU.MetaFile({version:1})}}equals(e){return e instanceof i?super.equals(e)&&Hoe.default.isDeepStrictEqual(this.meta,e.meta):!1}toJSON(){return{_type:this.type,meta:Goe(this.meta),spec_version:this.specVersion,version:this.version,expires:this.expires,...this.unrecognizedFields}}static fromJSON(e){let{unrecognizedFields:t,...r}=P0.Signed.commonFieldsFromJSON(e),{meta:s,...n}=t;return new i({...r,meta:Woe(s),unrecognizedFields:n})}};ia.Snapshot=D0;function Goe(i){return Object.entries(i).reduce((e,[t,r])=>({...e,[t]:r.toJSON()}),{})}o(Goe,"metaToJSON");function Woe(i){let e;if(VU.guard.isDefined(i))if(VU.guard.isObjectRecord(i))e=Object.entries(i).reduce((t,[r,s])=>({...t,[r]:zU.MetaFile.fromJSON(s)}),{});else throw new TypeError("meta field is malformed");return e}o(Woe,"metaFromJSON")});var HU=d(ra=>{"use strict";var Joe=ra&&ra.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(ra,"__esModule",{value:!0});ra.Delegations=void 0;var im=Joe(require("util")),Koe=ki(),Zoe=$p(),L0=v0(),rm=si(),M0=class i{static{o(this,"Delegations")}keys;roles;unrecognizedFields;succinctRoles;constructor(e){if(this.keys=e.keys,this.unrecognizedFields=e.unrecognizedFields||{},e.roles&&Object.keys(e.roles).some(t=>L0.TOP_LEVEL_ROLE_NAMES.includes(t)))throw new Koe.ValueError("Delegated role name conflicts with top-level role name");this.succinctRoles=e.succinctRoles,this.roles=e.roles}equals(e){return e instanceof i?im.default.isDeepStrictEqual(this.keys,e.keys)&&im.default.isDeepStrictEqual(this.roles,e.roles)&&im.default.isDeepStrictEqual(this.unrecognizedFields,e.unrecognizedFields)&&im.default.isDeepStrictEqual(this.succinctRoles,e.succinctRoles):!1}*rolesForTarget(e){if(this.roles)for(let t of Object.values(this.roles))t.isDelegatedPath(e)&&(yield{role:t.name,terminating:t.terminating});else this.succinctRoles&&(yield{role:this.succinctRoles.getRoleForTarget(e),terminating:!0})}toJSON(){let e={keys:Yoe(this.keys),...this.unrecognizedFields};return this.roles?e.roles=Xoe(this.roles):this.succinctRoles&&(e.succinct_roles=this.succinctRoles.toJSON()),e}static fromJSON(e){let{keys:t,roles:r,succinct_roles:s,...n}=e,a;return rm.guard.isObject(s)&&(a=L0.SuccinctRoles.fromJSON(s)),new i({keys:Qoe(t),roles:eae(r),unrecognizedFields:n,succinctRoles:a})}};ra.Delegations=M0;function Yoe(i){return Object.entries(i).reduce((e,[t,r])=>({...e,[t]:r.toJSON()}),{})}o(Yoe,"keysToJSON");function Xoe(i){return Object.values(i).map(e=>e.toJSON())}o(Xoe,"rolesToJSON");function Qoe(i){if(!rm.guard.isObjectRecord(i))throw new TypeError("keys is malformed");return Object.entries(i).reduce((e,[t,r])=>({...e,[t]:Zoe.Key.fromJSON(t,r)}),{})}o(Qoe,"keysFromJSON");function eae(i){let e;if(rm.guard.isDefined(i)){if(!rm.guard.isObjectArray(i))throw new TypeError("roles is malformed");e=i.reduce((t,r)=>{let s=L0.DelegatedRole.fromJSON(r);return{...t,[s.name]:s}},{})}return e}o(eae,"rolesFromJSON")});var F0=d(sa=>{"use strict";var tae=sa&&sa.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(sa,"__esModule",{value:!0});sa.Targets=void 0;var GU=tae(require("util")),B0=an(),iae=HU(),rae=Cu(),sm=si(),k0=class i extends B0.Signed{static{o(this,"Targets")}type=B0.MetadataKind.Targets;targets;delegations;constructor(e){super(e),this.targets=e.targets||{},this.delegations=e.delegations}addTarget(e){this.targets[e.path]=e}equals(e){return e instanceof i?super.equals(e)&&GU.default.isDeepStrictEqual(this.targets,e.targets)&&GU.default.isDeepStrictEqual(this.delegations,e.delegations):!1}toJSON(){let e={_type:this.type,spec_version:this.specVersion,version:this.version,expires:this.expires,targets:sae(this.targets),...this.unrecognizedFields};return this.delegations&&(e.delegations=this.delegations.toJSON()),e}static fromJSON(e){let{unrecognizedFields:t,...r}=B0.Signed.commonFieldsFromJSON(e),{targets:s,delegations:n,...a}=t;return new i({...r,targets:nae(s),delegations:oae(n),unrecognizedFields:a})}};sa.Targets=k0;function sae(i){return Object.entries(i).reduce((e,[t,r])=>({...e,[t]:r.toJSON()}),{})}o(sae,"targetsToJSON");function nae(i){let e;if(sm.guard.isDefined(i))if(sm.guard.isObjectRecord(i))e=Object.entries(i).reduce((t,[r,s])=>({...t,[r]:rae.TargetFile.fromJSON(r,s)}),{});else throw new TypeError("targets must be an object");return e}o(nae,"targetsFromJSON");function oae(i){let e;if(sm.guard.isDefined(i))if(sm.guard.isObject(i))e=iae.Delegations.fromJSON(i);else throw new TypeError("delegations must be an object");return e}o(oae,"delegationsFromJSON")});var q0=d(nm=>{"use strict";Object.defineProperty(nm,"__esModule",{value:!0});nm.Timestamp=void 0;var U0=an(),WU=Cu(),j0=si(),$0=class i extends U0.Signed{static{o(this,"Timestamp")}type=U0.MetadataKind.Timestamp;snapshotMeta;constructor(e){super(e),this.snapshotMeta=e.snapshotMeta||new WU.MetaFile({version:1})}equals(e){return e instanceof i?super.equals(e)&&this.snapshotMeta.equals(e.snapshotMeta):!1}toJSON(){return{_type:this.type,spec_version:this.specVersion,version:this.version,expires:this.expires,meta:{"snapshot.json":this.snapshotMeta.toJSON()},...this.unrecognizedFields}}static fromJSON(e){let{unrecognizedFields:t,...r}=U0.Signed.commonFieldsFromJSON(e),{meta:s,...n}=t;return new i({...r,snapshotMeta:aae(s),unrecognizedFields:n})}};nm.Timestamp=$0;function aae(i){let e;if(j0.guard.isDefined(i)){let t=i["snapshot.json"];if(!j0.guard.isDefined(t)||!j0.guard.isObject(t))throw new TypeError("missing snapshot.json in meta");e=WU.MetaFile.fromJSON(t)}return e}o(aae,"snapshotMetaFromJSON")});var KU=d(oa=>{"use strict";var cae=oa&&oa.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(oa,"__esModule",{value:!0});oa.Metadata=void 0;var uae=a0(),JU=cae(require("util")),na=an(),xu=ki(),lae=A0(),hae=N0(),fae=x0(),dae=F0(),pae=q0(),V0=si(),z0=class i{static{o(this,"Metadata")}signed;signatures;unrecognizedFields;constructor(e,t,r){this.signed=e,this.signatures=t||{},this.unrecognizedFields=r||{}}sign(e,t=!0){let r=Buffer.from((0,uae.canonicalize)(this.signed.toJSON())),s=e(r);t||(this.signatures={}),this.signatures[s.keyID]=s}verifyDelegate(e,t){let r,s={};switch(this.signed.type){case na.MetadataKind.Root:s=this.signed.keys,r=this.signed.roles[e];break;case na.MetadataKind.Targets:if(!this.signed.delegations)throw new xu.ValueError(`No delegations found for ${e}`);s=this.signed.delegations.keys,this.signed.delegations.roles?r=this.signed.delegations.roles[e]:this.signed.delegations.succinctRoles&&this.signed.delegations.succinctRoles.isDelegatedRole(e)&&(r=this.signed.delegations.succinctRoles);break;default:throw new TypeError("invalid metadata type")}if(!r)throw new xu.ValueError(`no delegation found for ${e}`);let n=new Set;if(r.keyIDs.forEach(a=>{let c=s[a];if(c)try{c.verifySignature(t),n.add(c.keyID)}catch{}}),n.size<r.threshold)throw new xu.UnsignedMetadataError(`${e} was signed by ${n.size}/${r.threshold} keys`)}equals(e){return e instanceof i?this.signed.equals(e.signed)&&JU.default.isDeepStrictEqual(this.signatures,e.signatures)&&JU.default.isDeepStrictEqual(this.unrecognizedFields,e.unrecognizedFields):!1}toJSON(){return{signatures:Object.values(this.signatures).map(t=>t.toJSON()),signed:this.signed.toJSON(),...this.unrecognizedFields}}static fromJSON(e,t){let{signed:r,signatures:s,...n}=t;if(!V0.guard.isDefined(r)||!V0.guard.isObject(r))throw new TypeError("signed is not defined");if(e!==r._type)throw new xu.ValueError(`expected '${e}', got ${r._type}`);if(!V0.guard.isObjectArray(s))throw new TypeError("signatures is not an array");let a;switch(e){case na.MetadataKind.Root:a=lae.Root.fromJSON(r);break;case na.MetadataKind.Timestamp:a=pae.Timestamp.fromJSON(r);break;case na.MetadataKind.Snapshot:a=fae.Snapshot.fromJSON(r);break;case na.MetadataKind.Targets:a=dae.Targets.fromJSON(r);break;default:throw new TypeError("invalid metadata type")}let c={};return s.forEach(u=>{let l=hae.Signature.fromJSON(u);if(c[l.keyID])throw new xu.ValueError(`multiple signatures found for keyid: ${l.keyID}`);c[l.keyID]=l}),new i(a,c,n)}};oa.Metadata=z0});var om=d(ce=>{"use strict";Object.defineProperty(ce,"__esModule",{value:!0});ce.Timestamp=ce.Targets=ce.Snapshot=ce.Signature=ce.Root=ce.Metadata=ce.Key=ce.TargetFile=ce.MetaFile=ce.ValueError=ce.MetadataKind=void 0;var mae=an();Object.defineProperty(ce,"MetadataKind",{enumerable:!0,get:o(function(){return mae.MetadataKind},"get")});var gae=ki();Object.defineProperty(ce,"ValueError",{enumerable:!0,get:o(function(){return gae.ValueError},"get")});var ZU=Cu();Object.defineProperty(ce,"MetaFile",{enumerable:!0,get:o(function(){return ZU.MetaFile},"get")});Object.defineProperty(ce,"TargetFile",{enumerable:!0,get:o(function(){return ZU.TargetFile},"get")});var yae=$p();Object.defineProperty(ce,"Key",{enumerable:!0,get:o(function(){return yae.Key},"get")});var Sae=KU();Object.defineProperty(ce,"Metadata",{enumerable:!0,get:o(function(){return Sae.Metadata},"get")});var Eae=A0();Object.defineProperty(ce,"Root",{enumerable:!0,get:o(function(){return Eae.Root},"get")});var wae=N0();Object.defineProperty(ce,"Signature",{enumerable:!0,get:o(function(){return wae.Signature},"get")});var _ae=x0();Object.defineProperty(ce,"Snapshot",{enumerable:!0,get:o(function(){return _ae.Snapshot},"get")});var bae=F0();Object.defineProperty(ce,"Targets",{enumerable:!0,get:o(function(){return bae.Targets},"get")});var Iae=q0();Object.defineProperty(ce,"Timestamp",{enumerable:!0,get:o(function(){return Iae.Timestamp},"get")})});var cm=d(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});de.DownloadHTTPError=de.DownloadLengthMismatchError=de.DownloadError=de.ExpiredMetadataError=de.EqualVersionError=de.BadVersionError=de.RepositoryError=de.PersistError=de.RuntimeError=de.ValueError=void 0;var H0=class extends Error{static{o(this,"ValueError")}};de.ValueError=H0;var G0=class extends Error{static{o(this,"RuntimeError")}};de.RuntimeError=G0;var W0=class extends Error{static{o(this,"PersistError")}};de.PersistError=W0;var Lu=class extends Error{static{o(this,"RepositoryError")}};de.RepositoryError=Lu;var am=class extends Lu{static{o(this,"BadVersionError")}};de.BadVersionError=am;var J0=class extends am{static{o(this,"EqualVersionError")}};de.EqualVersionError=J0;var K0=class extends Lu{static{o(this,"ExpiredMetadataError")}};de.ExpiredMetadataError=K0;var Mu=class extends Error{static{o(this,"DownloadError")}};de.DownloadError=Mu;var Z0=class extends Mu{static{o(this,"DownloadLengthMismatchError")}};de.DownloadLengthMismatchError=Z0;var Y0=class extends Mu{static{o(this,"DownloadHTTPError")}statusCode;constructor(e,t){super(e),this.statusCode=t}};de.DownloadHTTPError=Y0});var XU=d(aa=>{"use strict";var Q0=aa&&aa.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(aa,"__esModule",{value:!0});aa.withTempFile=void 0;var X0=Q0(require("fs/promises")),Oae=Q0(require("os")),YU=Q0(require("path")),vae=o(async i=>Cae(async e=>i(YU.default.join(e,"tempfile"))),"withTempFile");aa.withTempFile=vae;var Cae=o(async i=>{let e=await X0.default.realpath(Oae.default.tmpdir()),t=await X0.default.mkdtemp(e+YU.default.sep);try{return await i(t)}finally{await X0.default.rm(t,{force:!0,recursive:!0,maxRetries:3})}},"withTempDir")});var tI=d(ss=>{"use strict";var lm=ss&&ss.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(ss,"__esModule",{value:!0});ss.DefaultFetcher=ss.BaseFetcher=void 0;var Rae=lm(zs()),QU=lm(require("fs")),Aae=lm(lu()),Tae=lm(require("util")),ej=cm(),Nae=XU(),Pae=(0,Rae.default)("tuf:fetch"),um=class{static{o(this,"BaseFetcher")}async downloadFile(e,t,r){return(0,Nae.withTempFile)(async s=>{let n=await this.fetch(e),a=0,c=QU.default.createWriteStream(s);try{for await(let u of n){if(a+=u.length,a>t)throw new ej.DownloadLengthMismatchError("Max length reached");await Dae(c,u)}}finally{await Tae.default.promisify(c.close).bind(c)()}return r(s)})}async downloadBytes(e,t){return this.downloadFile(e,t,async r=>{let s=QU.default.createReadStream(r),n=[];for await(let a of s)n.push(a);return Buffer.concat(n)})}};ss.BaseFetcher=um;var eI=class extends um{static{o(this,"DefaultFetcher")}timeout;retry;constructor(e={}){super(),this.timeout=e.timeout,this.retry=e.retry}async fetch(e){Pae("GET %s",e);let t=await(0,Aae.default)(e,{timeout:this.timeout,retry:this.retry});if(!t.ok||!t?.body)throw new ej.DownloadHTTPError("Failed to download",t.status);return t.body}};ss.DefaultFetcher=eI;var Dae=o(async(i,e)=>new Promise((t,r)=>{i.write(e,s=>{s&&r(s),t(!0)})}),"writeBufferToStream")});var tj=d(hm=>{"use strict";Object.defineProperty(hm,"__esModule",{value:!0});hm.defaultConfig=void 0;hm.defaultConfig={maxRootRotations:256,maxDelegations:32,rootMaxLength:512e3,timestampMaxLength:16384,snapshotMaxLength:2e6,targetsMaxLength:5e6,prefixTargetsWithHash:!0,fetchTimeout:1e5,fetchRetries:void 0,fetchRetry:2}});var ij=d(fm=>{"use strict";Object.defineProperty(fm,"__esModule",{value:!0});fm.TrustedMetadataStore=void 0;var Ie=om(),le=cm(),iI=class{static{o(this,"TrustedMetadataStore")}trustedSet={};referenceTime;constructor(e){this.referenceTime=new Date,this.loadTrustedRoot(e)}get root(){if(!this.trustedSet.root)throw new ReferenceError("No trusted root metadata");return this.trustedSet.root}get timestamp(){return this.trustedSet.timestamp}get snapshot(){return this.trustedSet.snapshot}get targets(){return this.trustedSet.targets}getRole(e){return this.trustedSet[e]}updateRoot(e){let t=JSON.parse(e.toString("utf8")),r=Ie.Metadata.fromJSON(Ie.MetadataKind.Root,t);if(r.signed.type!=Ie.MetadataKind.Root)throw new le.RepositoryError(`Expected 'root', got ${r.signed.type}`);if(this.root.verifyDelegate(Ie.MetadataKind.Root,r),r.signed.version!=this.root.signed.version+1)throw new le.BadVersionError(`Expected version ${this.root.signed.version+1}, got ${r.signed.version}`);return r.verifyDelegate(Ie.MetadataKind.Root,r),this.trustedSet.root=r,r}updateTimestamp(e){if(this.snapshot)throw new le.RuntimeError("Cannot update timestamp after snapshot");if(this.root.signed.isExpired(this.referenceTime))throw new le.ExpiredMetadataError("Final root.json is expired");let t=JSON.parse(e.toString("utf8")),r=Ie.Metadata.fromJSON(Ie.MetadataKind.Timestamp,t);if(r.signed.type!=Ie.MetadataKind.Timestamp)throw new le.RepositoryError(`Expected 'timestamp', got ${r.signed.type}`);if(this.root.verifyDelegate(Ie.MetadataKind.Timestamp,r),this.timestamp){if(r.signed.version<this.timestamp.signed.version)throw new le.BadVersionError(`New timestamp version ${r.signed.version} is less than current version ${this.timestamp.signed.version}`);if(r.signed.version===this.timestamp.signed.version)throw new le.EqualVersionError(`New timestamp version ${r.signed.version} is equal to current version ${this.timestamp.signed.version}`);let s=this.timestamp.signed.snapshotMeta,n=r.signed.snapshotMeta;if(n.version<s.version)throw new le.BadVersionError(`New snapshot version ${n.version} is less than current version ${s.version}`)}return this.trustedSet.timestamp=r,this.checkFinalTimestamp(),r}updateSnapshot(e,t=!1){if(!this.timestamp)throw new le.RuntimeError("Cannot update snapshot before timestamp");if(this.targets)throw new le.RuntimeError("Cannot update snapshot after targets");this.checkFinalTimestamp();let r=this.timestamp.signed.snapshotMeta;t||r.verify(e);let s=JSON.parse(e.toString("utf8")),n=Ie.Metadata.fromJSON(Ie.MetadataKind.Snapshot,s);if(n.signed.type!=Ie.MetadataKind.Snapshot)throw new le.RepositoryError(`Expected 'snapshot', got ${n.signed.type}`);return this.root.verifyDelegate(Ie.MetadataKind.Snapshot,n),this.snapshot&&Object.entries(this.snapshot.signed.meta).forEach(([a,c])=>{let u=n.signed.meta[a];if(!u)throw new le.RepositoryError(`Missing file ${a} in new snapshot`);if(u.version<c.version)throw new le.BadVersionError(`New version ${u.version} of ${a} is less than current version ${c.version}`)}),this.trustedSet.snapshot=n,this.checkFinalSnapsnot(),n}updateDelegatedTargets(e,t,r){if(!this.snapshot)throw new le.RuntimeError("Cannot update delegated targets before snapshot");this.checkFinalSnapsnot();let s=this.trustedSet[r];if(!s)throw new le.RuntimeError(`No trusted ${r} metadata`);let n=this.snapshot.signed.meta?.[`${t}.json`];if(!n)throw new le.RepositoryError(`Missing ${t}.json in snapshot`);n.verify(e);let a=JSON.parse(e.toString("utf8")),c=Ie.Metadata.fromJSON(Ie.MetadataKind.Targets,a);if(c.signed.type!=Ie.MetadataKind.Targets)throw new le.RepositoryError(`Expected 'targets', got ${c.signed.type}`);s.verifyDelegate(t,c);let u=c.signed.version;if(u!=n.version)throw new le.BadVersionError(`Version ${u} of ${t} does not match snapshot version ${n.version}`);if(c.signed.isExpired(this.referenceTime))throw new le.ExpiredMetadataError(`${t}.json is expired`);this.trustedSet[t]=c}loadTrustedRoot(e){let t=JSON.parse(e.toString("utf8")),r=Ie.Metadata.fromJSON(Ie.MetadataKind.Root,t);if(r.signed.type!=Ie.MetadataKind.Root)throw new le.RepositoryError(`Expected 'root', got ${r.signed.type}`);r.verifyDelegate(Ie.MetadataKind.Root,r),this.trustedSet.root=r}checkFinalTimestamp(){if(!this.timestamp)throw new ReferenceError("No trusted timestamp metadata");if(this.timestamp.signed.isExpired(this.referenceTime))throw new le.ExpiredMetadataError("Final timestamp.json is expired")}checkFinalSnapsnot(){if(!this.snapshot)throw new ReferenceError("No trusted snapshot metadata");if(!this.timestamp)throw new ReferenceError("No trusted timestamp metadata");if(this.snapshot.signed.isExpired(this.referenceTime))throw new le.ExpiredMetadataError("snapshot.json is expired");let e=this.timestamp.signed.snapshotMeta;if(this.snapshot.signed.version!==e.version)throw new le.BadVersionError("Snapshot version doesn't match timestamp")}};fm.TrustedMetadataStore=iI});var rj=d(rI=>{"use strict";Object.defineProperty(rI,"__esModule",{value:!0});rI.join=Lae;var xae=require("url");function Lae(i,e){return new xae.URL(Mae(i)+Bae(e)).toString()}o(Lae,"join");function Mae(i){return i.endsWith("/")?i:i+"/"}o(Mae,"ensureTrailingSlash");function Bae(i){return i.startsWith("/")?i.slice(1):i}o(Bae,"removeLeadingSlash")});var sj=d(zt=>{"use strict";var kae=zt&&zt.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(i,r,s)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),Fae=zt&&zt.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),oI=zt&&zt.__importStar||(function(){var i=o(function(e){return i=Object.getOwnPropertyNames||function(t){var r=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[r.length]=s);return r},i(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=i(e),s=0;s<r.length;s++)r[s]!=="default"&&kae(t,e,r[s]);return Fae(t,e),t}})(),Uae=zt&&zt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(zt,"__esModule",{value:!0});zt.Updater=void 0;var Fi=om(),jae=Uae(zs()),ca=oI(require("fs")),dm=oI(require("path")),$ae=tj(),ln=cm(),qae=tI(),Vae=ij(),Bu=oI(rj()),sI=(0,jae.default)("tuf:cache"),nI=class{static{o(this,"Updater")}dir;metadataBaseUrl;targetDir;targetBaseUrl;forceCache;trustedSet;config;fetcher;constructor(e){let{metadataDir:t,metadataBaseUrl:r,targetDir:s,targetBaseUrl:n,fetcher:a,config:c}=e;this.dir=t,this.metadataBaseUrl=r,this.targetDir=s,this.targetBaseUrl=n,this.forceCache=e.forceCache??!1;let u=this.loadLocalMetadata(Fi.MetadataKind.Root);this.trustedSet=new Vae.TrustedMetadataStore(u),this.config={...$ae.defaultConfig,...c},this.fetcher=a||new qae.DefaultFetcher({timeout:this.config.fetchTimeout,retry:this.config.fetchRetries??this.config.fetchRetry})}async refresh(){if(this.forceCache)try{await this.loadTimestamp({checkRemote:!1})}catch{await this.loadRoot(),await this.loadTimestamp()}else await this.loadRoot(),await this.loadTimestamp();await this.loadSnapshot(),await this.loadTargets(Fi.MetadataKind.Targets,Fi.MetadataKind.Root)}async getTargetInfo(e){return this.trustedSet.targets||await this.refresh(),this.preorderDepthFirstWalk(e)}async downloadTarget(e,t,r){let s=t||this.generateTargetPath(e);if(!r){if(!this.targetBaseUrl)throw new ln.ValueError("Target base URL not set");r=this.targetBaseUrl}let n=e.path;if(this.trustedSet.root.signed.consistentSnapshot&&this.config.prefixTargetsWithHash){let u=Object.values(e.hashes),{dir:l,base:h}=dm.parse(n),f=`${u[0]}.${h}`;n=l?`${l}/${f}`:f}let c=Bu.join(r,n);return await this.fetcher.downloadFile(c,e.length,async u=>{await e.verify(ca.createReadStream(u)),sI("WRITE %s",s),ca.copyFileSync(u,s)}),s}async findCachedTarget(e,t){t||(t=this.generateTargetPath(e));try{if(ca.existsSync(t))return await e.verify(ca.createReadStream(t)),t}catch{return}}loadLocalMetadata(e){let t=dm.join(this.dir,`${e}.json`);return sI("READ %s",t),ca.readFileSync(t)}async loadRoot(){let t=this.trustedSet.root.signed.version+1,r=t+this.config.maxRootRotations;for(let s=t;s<r;s++){let n=Bu.join(this.metadataBaseUrl,`${s}.root.json`);try{let a=await this.fetcher.downloadBytes(n,this.config.rootMaxLength);this.trustedSet.updateRoot(a),this.persistMetadata(Fi.MetadataKind.Root,a)}catch(a){if(a instanceof ln.DownloadHTTPError&&[403,404].includes(a.statusCode))break;throw a}}}async loadTimestamp({checkRemote:e}={checkRemote:!0}){try{let s=this.loadLocalMetadata(Fi.MetadataKind.Timestamp);if(this.trustedSet.updateTimestamp(s),!e)return}catch{}let t=Bu.join(this.metadataBaseUrl,"timestamp.json"),r=await this.fetcher.downloadBytes(t,this.config.timestampMaxLength);try{this.trustedSet.updateTimestamp(r)}catch(s){if(s instanceof ln.EqualVersionError)return;throw s}this.persistMetadata(Fi.MetadataKind.Timestamp,r)}async loadSnapshot(){try{let e=this.loadLocalMetadata(Fi.MetadataKind.Snapshot);this.trustedSet.updateSnapshot(e,!0)}catch{if(!this.trustedSet.timestamp)throw new ReferenceError("No timestamp metadata");let t=this.trustedSet.timestamp.signed.snapshotMeta,r=t.length||this.config.snapshotMaxLength,s=this.trustedSet.root.signed.consistentSnapshot?t.version:void 0,n=Bu.join(this.metadataBaseUrl,s?`${s}.snapshot.json`:"snapshot.json");try{let a=await this.fetcher.downloadBytes(n,r);this.trustedSet.updateSnapshot(a),this.persistMetadata(Fi.MetadataKind.Snapshot,a)}catch(a){throw new ln.RuntimeError(`Unable to load snapshot metadata error ${a}`)}}}async loadTargets(e,t){if(this.trustedSet.getRole(e))return this.trustedSet.getRole(e);try{let r=this.loadLocalMetadata(e);this.trustedSet.updateDelegatedTargets(r,e,t)}catch{if(!this.trustedSet.snapshot)throw new ReferenceError("No snapshot metadata");let s=this.trustedSet.snapshot.signed.meta[`${e}.json`],n=s.length||this.config.targetsMaxLength,a=this.trustedSet.root.signed.consistentSnapshot?s.version:void 0,c=encodeURIComponent(e),u=Bu.join(this.metadataBaseUrl,a?`${a}.${c}.json`:`${c}.json`);try{let l=await this.fetcher.downloadBytes(u,n);this.trustedSet.updateDelegatedTargets(l,e,t),this.persistMetadata(e,l)}catch(l){throw new ln.RuntimeError(`Unable to load targets error ${l}`)}}return this.trustedSet.getRole(e)}async preorderDepthFirstWalk(e){let t=[{roleName:Fi.MetadataKind.Targets,parentRoleName:Fi.MetadataKind.Root}],r=new Set;for(;r.size<=this.config.maxDelegations&&t.length>0;){let{roleName:s,parentRoleName:n}=t.pop();if(r.has(s))continue;let a=(await this.loadTargets(s,n))?.signed;if(!a)continue;let c=a.targets?.[e];if(c)return c;if(r.add(s),a.delegations){let u=[],l=a.delegations.rolesForTarget(e);for(let{role:h,terminating:f}of l)if(u.push({roleName:h,parentRoleName:s}),f){t.splice(0);break}u.reverse(),t.push(...u)}}}generateTargetPath(e){if(!this.targetDir)throw new ln.ValueError("Target directory not set");let t=encodeURIComponent(e.path);return dm.join(this.targetDir,t)}persistMetadata(e,t){let r=encodeURIComponent(e);try{let s=dm.join(this.dir,`${r}.json`);sI("WRITE %s",s),ca.writeFileSync(s,t.toString("utf8"))}catch(s){throw new ln.PersistError(`Failed to persist metadata ${r} error: ${s}`)}}};zt.Updater=nI});var nj=d(ns=>{"use strict";Object.defineProperty(ns,"__esModule",{value:!0});ns.Updater=ns.BaseFetcher=ns.TargetFile=void 0;var zae=om();Object.defineProperty(ns,"TargetFile",{enumerable:!0,get:o(function(){return zae.TargetFile},"get")});var Hae=tI();Object.defineProperty(ns,"BaseFetcher",{enumerable:!0,get:o(function(){return Hae.BaseFetcher},"get")});var Gae=sj();Object.defineProperty(ns,"Updater",{enumerable:!0,get:o(function(){return Gae.Updater},"get")})});var cI=d(pm=>{"use strict";Object.defineProperty(pm,"__esModule",{value:!0});pm.TUFError=void 0;var aI=class extends Error{static{o(this,"TUFError")}constructor({code:e,message:t,cause:r}){super(t),this.code=e,this.cause=r,this.name=this.constructor.name}};pm.TUFError=aI});var oj=d(ku=>{"use strict";var Wae=ku&&ku.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(ku,"__esModule",{value:!0});ku.readTarget=Kae;var Jae=Wae(require("fs")),mm=cI();async function Kae(i,e){let t=await Zae(i,e);return new Promise((r,s)=>{Jae.default.readFile(t,"utf-8",(n,a)=>{n?s(new mm.TUFError({code:"TUF_READ_TARGET_ERROR",message:`error reading target ${t}`,cause:n})):r(a)})})}o(Kae,"readTarget");async function Zae(i,e){let t;try{t=await i.getTargetInfo(e)}catch(s){throw new mm.TUFError({code:"TUF_REFRESH_METADATA_ERROR",message:"error refreshing TUF metadata",cause:s})}if(!t)throw new mm.TUFError({code:"TUF_FIND_TARGET_ERROR",message:`target ${e} not found`});let r=await i.findCachedTarget(t);if(!r)try{r=await i.downloadTarget(t)}catch(s){throw new mm.TUFError({code:"TUF_DOWNLOAD_TARGET_ERROR",message:`error downloading target ${r}`,cause:s})}return r}o(Zae,"getTargetPath")});var aj=d((NIe,Yae)=>{Yae.exports={"https://tuf-repo-cdn.sigstore.dev":{"root.json":"ewogInNpZ25hdHVyZXMiOiBbCiAgewogICAia2V5aWQiOiAiNmYyNjAwODlkNTkyM2RhZjIwMTY2Y2E2NTdjNTQzYWY2MTgzNDZhYjk3MTg4NGE5OTk2MmIwMTk4OGJiZTBjMyIsCiAgICJzaWciOiAiIgogIH0sCiAgewogICAia2V5aWQiOiAiZTcxYTU0ZDU0MzgzNWJhODZhZGFkOTQ2MDM3OWM3NjQxZmI4NzI2ZDE2NGVhNzY2ODAxYTFjNTIyYWJhN2VhMiIsCiAgICJzaWciOiAiMzA0NTAyMjEwMGJiZGRkNDY0ZjgwNjZjZWI4OGJhNzg3Mzc1YzEyY2Q2MzMwNjgwZTA4YzI5MTA3MDNlNjUzOGM3MWNjNzlhZDIwMjIwNTE5MGIwNmU0NTM3ZmU5NjFiM2VmODFmZTY4ZWRjZDAwODljMTlmOTE5YWZlZDQyM2I5YWFmZDcwMDY0MTE1MyIKICB9LAogIHsKICAgImtleWlkIjogIjIyZjRjYWVjNmQ4ZTZmOTU1NWFmNjZiM2Q0YzNjYjA2YTNiYjIzZmRjN2UzOWM5MTZjNjFmNDYyZTZmNTJiMDYiLAogICAic2lnIjogIjMwNDQwMjIwNjkzMDZjZDUyNTdmNzMyYTc0MGMxYWZlNjBhOGU0MzNjNWRlNThlYWZlYWRiZTk5YzMzNmM5YzcxZDE5OGNmODAyMjAwZDc3Mzk1M2FlN2RiYzQ4ZDNlNWJhZDlhNmY2NGJhZmZmMTk2YjdlMmFkNGE1MmExOTUxOTM2N2Q0N2RjMDQyIgogIH0sCiAgewogICAia2V5aWQiOiAiNjE2NDM4MzgxMjViNDQwYjQwZGI2OTQyZjVjYjVhMzFjMGRjMDQzNjgzMTZlYjJhYWE1OGI5NTkwNGE1ODIyMiIsCiAgICJzaWciOiAiMzA0NDAyMjA0ZDIxYTJlYzgwZGY2NmU2MWY2ZmUyOTEyOTUxZGM0N2RmODM2MDM2ZjhjMGFiMTA4MTZkMzc1ZTcxZGJmNzllMDIyMDU0N2FkY2UxYWZkZjA0ZTY3OTRlZmEyMDNkZDUyNjRjNmY3ZTBlZjc4ZTU3ZmU5MzRiMGQyNmNiOTk0ZWVjNzYiCiAgfSwKICB7CiAgICJrZXlpZCI6ICJhNjg3ZTViZjRmYWI4MmIwZWU1OGQ0NmUwNWM5NTM1MTQ1YTJjOWFmYjQ1OGY0M2Q0MmI0NWNhMGZkY2UyYTcwIiwKICAgInNpZyI6ICIzMDQ1MDIyMDYwODI2NDk2NTU3MTQ0ZWIxNjQ5ODkzZWQ1ZjZmNGVhNTQ1MzZmZWIwY2E4MmY4Yjg5YWU2NDFiZTM5NzQzZTUwMjIxMDBhZDcxMThiNWU5ZDQ4MzczMjYyMDZlNDEyZmM2ZGEyOTk5OTI1ZDExMDMyOGE3YzE2NmIwNmM2MjQzMzZjOTNmIgogIH0sCiAgewogICAia2V5aWQiOiAiMTgzZTY0ZjM3NjcwZGMxM2NhMGQyODk5NWEzMDUzZjM3NDA5NTRkZGNlNDQzMjFhNDFlNDY1MzRjZjQ0ZTYzMiIsCiAgICJzaWciOiAiMzA0NjAyMjEwMGQ4MTc5NDM5YzJlNzNlYjBjMTczM2FiZWU3ZmFmODMyZGNhZWE3MjYzZWRjYjQ5MTk4OTFjM2EyNDdmMDU5MjMwMjIxMDBlMWE0MzdlMDc5N2U4MDNmOWI3MmRjOWQyZDkyMTU1YjBhMjI3MGMyNGVmZGQ1ZjRiM2E1ZDhmMGIwZjQzMWE3IgogIH0KIF0sCiAic2lnbmVkIjogewogICJfdHlwZSI6ICJyb290IiwKICAiY29uc2lzdGVudF9zbmFwc2hvdCI6IHRydWUsCiAgImV4cGlyZXMiOiAiMjAyNi0wMS0yMlQxMzowNTo1OVoiLAogICJrZXlzIjogewogICAiMGM4NzQzMmMzYmYwOWZkOTkxODlmZGMzMmZhNWVhZWRmNGU0YTVmYWM3YmFiNzNmYTA0YTJlMGZjNjRhZjZmNSI6IHsKICAgICJrZXlpZF9oYXNoX2FsZ29yaXRobXMiOiBbCiAgICAgInNoYTI1NiIsCiAgICAgInNoYTUxMiIKICAgIF0sCiAgICAia2V5dHlwZSI6ICJlY2RzYSIsCiAgICAia2V5dmFsIjogewogICAgICJwdWJsaWMiOiAiLS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS1cbk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRVdSaUdyNStqKzNKNVNzSCtadHI1bkUySDJ3TzdcbkJWK25PM3M5M2dMY2ExOHFUT3pIWTFvV3lBR0R5a01Tc0dUVUJTdDlEK0FuMEtmS3NEMm1mU000MlE9PVxuLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0tXG4iCiAgICB9LAogICAgInNjaGVtZSI6ICJlY2RzYS1zaGEyLW5pc3RwMjU2IiwKICAgICJ4LXR1Zi1vbi1jaS1vbmxpbmUtdXJpIjogImdjcGttczpwcm9qZWN0cy9zaWdzdG9yZS1yb290LXNpZ25pbmcvbG9jYXRpb25zL2dsb2JhbC9rZXlSaW5ncy9yb290L2NyeXB0b0tleXMvdGltZXN0YW1wL2NyeXB0b0tleVZlcnNpb25zLzEiCiAgIH0sCiAgICIxODNlNjRmMzc2NzBkYzEzY2EwZDI4OTk1YTMwNTNmMzc0MDk1NGRkY2U0NDMyMWE0MWU0NjUzNGNmNDRlNjMyIjogewogICAgImtleXR5cGUiOiAiZWNkc2EiLAogICAgImtleXZhbCI6IHsKICAgICAicHVibGljIjogIi0tLS0tQkVHSU4gUFVCTElDIEtFWS0tLS0tXG5NRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUVNeHBQT0pDSVo1b3RHNDEwNmZHSnNlRVFpM1Y5XG5wa01ZUTR1eVY5VGoxTTdXSFhJeUxHK2prZnZ1RzBnbFExSlpiUlpaQlYzZ0FSNHNvamRHSElTZW93PT1cbi0tLS0tRU5EIFBVQkxJQyBLRVktLS0tLVxuIgogICAgfSwKICAgICJzY2hlbWUiOiAiZWNkc2Etc2hhMi1uaXN0cDI1NiIsCiAgICAieC10dWYtb24tY2kta2V5b3duZXIiOiAiQGxhbmNlIgogICB9LAogICAiMjJmNGNhZWM2ZDhlNmY5NTU1YWY2NmIzZDRjM2NiMDZhM2JiMjNmZGM3ZTM5YzkxNmM2MWY0NjJlNmY1MmIwNiI6IHsKICAgICJrZXlpZF9oYXNoX2FsZ29yaXRobXMiOiBbCiAgICAgInNoYTI1NiIsCiAgICAgInNoYTUxMiIKICAgIF0sCiAgICAia2V5dHlwZSI6ICJlY2RzYSIsCiAgICAia2V5dmFsIjogewogICAgICJwdWJsaWMiOiAiLS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS1cbk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRXpCelZPbUhDUG9qTVZMU0kzNjRXaWlWOE5QckRcbjZJZ1J4Vmxpc2t6L3YreTNKRVI1bWNWR2NPTmxpRGNXTUM1SjJsZkhtalBOUGhiNEg3eG04THpmU0E9PVxuLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0tXG4iCiAgICB9LAogICAgInNjaGVtZSI6ICJlY2RzYS1zaGEyLW5pc3RwMjU2IiwKICAgICJ4LXR1Zi1vbi1jaS1rZXlvd25lciI6ICJAc2FudGlhZ290b3JyZXMiCiAgIH0sCiAgICI2MTY0MzgzODEyNWI0NDBiNDBkYjY5NDJmNWNiNWEzMWMwZGMwNDM2ODMxNmViMmFhYTU4Yjk1OTA0YTU4MjIyIjogewogICAgImtleWlkX2hhc2hfYWxnb3JpdGhtcyI6IFsKICAgICAic2hhMjU2IiwKICAgICAic2hhNTEyIgogICAgXSwKICAgICJrZXl0eXBlIjogImVjZHNhIiwKICAgICJrZXl2YWwiOiB7CiAgICAgInB1YmxpYyI6ICItLS0tLUJFR0lOIFBVQkxJQyBLRVktLS0tLVxuTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFaW5pa1NzQVFtWWtOZUg1ZVlxL0NuSXpMYWFjT1xueGxTYWF3UURPd3FLeS90Q3F4cTV4eFBTSmMyMUs0V0loczlHeU9rS2Z6dWVZM0dJTHpjTUpaNGNXdz09XG4tLS0tLUVORCBQVUJMSUMgS0VZLS0tLS1cbiIKICAgIH0sCiAgICAic2NoZW1lIjogImVjZHNhLXNoYTItbmlzdHAyNTYiLAogICAgIngtdHVmLW9uLWNpLWtleW93bmVyIjogIkBib2JjYWxsYXdheSIKICAgfSwKICAgImE2ODdlNWJmNGZhYjgyYjBlZTU4ZDQ2ZTA1Yzk1MzUxNDVhMmM5YWZiNDU4ZjQzZDQyYjQ1Y2EwZmRjZTJhNzAiOiB7CiAgICAia2V5aWRfaGFzaF9hbGdvcml0aG1zIjogWwogICAgICJzaGEyNTYiLAogICAgICJzaGE1MTIiCiAgICBdLAogICAgImtleXR5cGUiOiAiZWNkc2EiLAogICAgImtleXZhbCI6IHsKICAgICAicHVibGljIjogIi0tLS0tQkVHSU4gUFVCTElDIEtFWS0tLS0tXG5NRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUUwZ2hyaDkyTHcxWXIzaWRHVjVXcUN0TURCOEN4XG4rRDhoZEM0dzJaTE5JcGxWUm9WR0xza1lhM2doZU15T2ppSjhrUGkxNWFRMi8vN1Arb2o3VXZKUEd3PT1cbi0tLS0tRU5EIFBVQkxJQyBLRVktLS0tLVxuIgogICAgfSwKICAgICJzY2hlbWUiOiAiZWNkc2Etc2hhMi1uaXN0cDI1NiIsCiAgICAieC10dWYtb24tY2kta2V5b3duZXIiOiAiQGpvc2h1YWdsIgogICB9LAogICAiZTcxYTU0ZDU0MzgzNWJhODZhZGFkOTQ2MDM3OWM3NjQxZmI4NzI2ZDE2NGVhNzY2ODAxYTFjNTIyYWJhN2VhMiI6IHsKICAgICJrZXlpZF9oYXNoX2FsZ29yaXRobXMiOiBbCiAgICAgInNoYTI1NiIsCiAgICAgInNoYTUxMiIKICAgIF0sCiAgICAia2V5dHlwZSI6ICJlY2RzYSIsCiAgICAia2V5dmFsIjogewogICAgICJwdWJsaWMiOiAiLS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS1cbk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRUVYc3ozU1pYRmI4ak1WNDJqNnBKbHlqYmpSOEtcbk4zQndvY2V4cTZMTUliNXFzV0tPUXZMTjE2TlVlZkxjNEhzd09vdW1Sc1ZWYWFqU3BRUzZmb2JrUnc9PVxuLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0tXG4iCiAgICB9LAogICAgInNjaGVtZSI6ICJlY2RzYS1zaGEyLW5pc3RwMjU2IiwKICAgICJ4LXR1Zi1vbi1jaS1rZXlvd25lciI6ICJAbW5tNjc4IgogICB9CiAgfSwKICAicm9sZXMiOiB7CiAgICJyb290IjogewogICAgImtleWlkcyI6IFsKICAgICAiZTcxYTU0ZDU0MzgzNWJhODZhZGFkOTQ2MDM3OWM3NjQxZmI4NzI2ZDE2NGVhNzY2ODAxYTFjNTIyYWJhN2VhMiIsCiAgICAgIjIyZjRjYWVjNmQ4ZTZmOTU1NWFmNjZiM2Q0YzNjYjA2YTNiYjIzZmRjN2UzOWM5MTZjNjFmNDYyZTZmNTJiMDYiLAogICAgICI2MTY0MzgzODEyNWI0NDBiNDBkYjY5NDJmNWNiNWEzMWMwZGMwNDM2ODMxNmViMmFhYTU4Yjk1OTA0YTU4MjIyIiwKICAgICAiYTY4N2U1YmY0ZmFiODJiMGVlNThkNDZlMDVjOTUzNTE0NWEyYzlhZmI0NThmNDNkNDJiNDVjYTBmZGNlMmE3MCIsCiAgICAgIjE4M2U2NGYzNzY3MGRjMTNjYTBkMjg5OTVhMzA1M2YzNzQwOTU0ZGRjZTQ0MzIxYTQxZTQ2NTM0Y2Y0NGU2MzIiCiAgICBdLAogICAgInRocmVzaG9sZCI6IDMKICAgfSwKICAgInNuYXBzaG90IjogewogICAgImtleWlkcyI6IFsKICAgICAiMGM4NzQzMmMzYmYwOWZkOTkxODlmZGMzMmZhNWVhZWRmNGU0YTVmYWM3YmFiNzNmYTA0YTJlMGZjNjRhZjZmNSIKICAgIF0sCiAgICAidGhyZXNob2xkIjogMSwKICAgICJ4LXR1Zi1vbi1jaS1leHBpcnktcGVyaW9kIjogMzY1MCwKICAgICJ4LXR1Zi1vbi1jaS1zaWduaW5nLXBlcmlvZCI6IDM2NQogICB9LAogICAidGFyZ2V0cyI6IHsKICAgICJrZXlpZHMiOiBbCiAgICAgImU3MWE1NGQ1NDM4MzViYTg2YWRhZDk0NjAzNzljNzY0MWZiODcyNmQxNjRlYTc2NjgwMWExYzUyMmFiYTdlYTIiLAogICAgICIyMmY0Y2FlYzZkOGU2Zjk1NTVhZjY2YjNkNGMzY2IwNmEzYmIyM2ZkYzdlMzljOTE2YzYxZjQ2MmU2ZjUyYjA2IiwKICAgICAiNjE2NDM4MzgxMjViNDQwYjQwZGI2OTQyZjVjYjVhMzFjMGRjMDQzNjgzMTZlYjJhYWE1OGI5NTkwNGE1ODIyMiIsCiAgICAgImE2ODdlNWJmNGZhYjgyYjBlZTU4ZDQ2ZTA1Yzk1MzUxNDVhMmM5YWZiNDU4ZjQzZDQyYjQ1Y2EwZmRjZTJhNzAiLAogICAgICIxODNlNjRmMzc2NzBkYzEzY2EwZDI4OTk1YTMwNTNmMzc0MDk1NGRkY2U0NDMyMWE0MWU0NjUzNGNmNDRlNjMyIgogICAgXSwKICAgICJ0aHJlc2hvbGQiOiAzCiAgIH0sCiAgICJ0aW1lc3RhbXAiOiB7CiAgICAia2V5aWRzIjogWwogICAgICIwYzg3NDMyYzNiZjA5ZmQ5OTE4OWZkYzMyZmE1ZWFlZGY0ZTRhNWZhYzdiYWI3M2ZhMDRhMmUwZmM2NGFmNmY1IgogICAgXSwKICAgICJ0aHJlc2hvbGQiOiAxLAogICAgIngtdHVmLW9uLWNpLWV4cGlyeS1wZXJpb2QiOiA3LAogICAgIngtdHVmLW9uLWNpLXNpZ25pbmctcGVyaW9kIjogNgogICB9CiAgfSwKICAic3BlY192ZXJzaW9uIjogIjEuMCIsCiAgInZlcnNpb24iOiAxMywKICAieC10dWYtb24tY2ktZXhwaXJ5LXBlcmlvZCI6IDE5NywKICAieC10dWYtb24tY2ktc2lnbmluZy1wZXJpb2QiOiA0NgogfQp9",targets:{"trusted_root.json":"ewogICJtZWRpYVR5cGUiOiAiYXBwbGljYXRpb24vdm5kLmRldi5zaWdzdG9yZS50cnVzdGVkcm9vdCtqc29uO3ZlcnNpb249MC4xIiwKICAidGxvZ3MiOiBbCiAgICB7CiAgICAgICJiYXNlVXJsIjogImh0dHBzOi8vcmVrb3Iuc2lnc3RvcmUuZGV2IiwKICAgICAgImhhc2hBbGdvcml0aG0iOiAiU0hBMl8yNTYiLAogICAgICAicHVibGljS2V5IjogewogICAgICAgICJyYXdCeXRlcyI6ICJNRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUUyRzJZKzJ0YWJkVFY1QmNHaUJJeDBhOWZBRndya0JibUxTR3RrczRMM3FYNnlZWTB6dWZCbmhDOFVyL2l5NTVHaFdQLzlBL2JZMkxoQzMwTTkrUll0dz09IiwKICAgICAgICAia2V5RGV0YWlscyI6ICJQS0lYX0VDRFNBX1AyNTZfU0hBXzI1NiIsCiAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgInN0YXJ0IjogIjIwMjEtMDEtMTJUMTE6NTM6MjdaIgogICAgICAgIH0KICAgICAgfSwKICAgICAgImxvZ0lkIjogewogICAgICAgICJrZXlJZCI6ICJ3Tkk5YXRRR2x6K1ZXZk82TFJ5Z0g0UVVmWS84VzRSRndpVDVpNVdSZ0IwPSIKICAgICAgfQogICAgfQogIF0sCiAgImNlcnRpZmljYXRlQXV0aG9yaXRpZXMiOiBbCiAgICB7CiAgICAgICJzdWJqZWN0IjogewogICAgICAgICJvcmdhbml6YXRpb24iOiAic2lnc3RvcmUuZGV2IiwKICAgICAgICAiY29tbW9uTmFtZSI6ICJzaWdzdG9yZSIKICAgICAgfSwKICAgICAgInVyaSI6ICJodHRwczovL2Z1bGNpby5zaWdzdG9yZS5kZXYiLAogICAgICAiY2VydENoYWluIjogewogICAgICAgICJjZXJ0aWZpY2F0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJyYXdCeXRlcyI6ICJNSUlCK0RDQ0FYNmdBd0lCQWdJVE5Wa0Rab0Npb2ZQRHN5N2RmbTZnZUxidWh6QUtCZ2dxaGtqT1BRUURBekFxTVJVd0V3WURWUVFLRXd4emFXZHpkRzl5WlM1a1pYWXhFVEFQQmdOVkJBTVRDSE5wWjNOMGIzSmxNQjRYRFRJeE1ETXdOekF6TWpBeU9Wb1hEVE14TURJeU16QXpNakF5T1Zvd0tqRVZNQk1HQTFVRUNoTU1jMmxuYzNSdmNtVXVaR1YyTVJFd0R3WURWUVFERXdoemFXZHpkRzl5WlRCMk1CQUdCeXFHU000OUFnRUdCU3VCQkFBaUEySUFCTFN5QTdJaTVrK3BOTzhaRVdZMHlsZW1XRG93T2tOYTNrTCtHWkU1WjVHV2VoTDkvQTliUk5BM1JicnNaNWkwSmNhc3RhUkw3U3A1ZnAvakQ1ZHhxYy9VZFRWbmx2UzE2YW4rMllmc3dlL1F1TG9sUlVDcmNPRTIrMmlBNSt0emQ2Tm1NR1F3RGdZRFZSMFBBUUgvQkFRREFnRUdNQklHQTFVZEV3RUIvd1FJTUFZQkFmOENBUUV3SFFZRFZSME9CQllFRk1qRkhRQkJtaVFwTWxFazZ3MnVTdTFLQnRQc01COEdBMVVkSXdRWU1CYUFGTWpGSFFCQm1pUXBNbEVrNncydVN1MUtCdFBzTUFvR0NDcUdTTTQ5QkFNREEyZ0FNR1VDTUg4bGlXSmZNdWk2dlhYQmhqRGdZNE13c2xtTi9USnhWZS84M1dyRm9td21OZjA1NnkxWDQ4RjljNG0zYTNvelhBSXhBS2pSYXk1L2FqL2pzS0tHSWttUWF0akk4dXVwSHIvK0N4RnZhSldtcFlxTmtMREdSVSs5b3J6aDVoSTJScmN1YVE9PSIKICAgICAgICAgIH0KICAgICAgICBdCiAgICAgIH0sCiAgICAgICJ2YWxpZEZvciI6IHsKICAgICAgICAic3RhcnQiOiAiMjAyMS0wMy0wN1QwMzoyMDoyOVoiLAogICAgICAgICJlbmQiOiAiMjAyMi0xMi0zMVQyMzo1OTo1OS45OTlaIgogICAgICB9CiAgICB9LAogICAgewogICAgICAic3ViamVjdCI6IHsKICAgICAgICAib3JnYW5pemF0aW9uIjogInNpZ3N0b3JlLmRldiIsCiAgICAgICAgImNvbW1vbk5hbWUiOiAic2lnc3RvcmUiCiAgICAgIH0sCiAgICAgICJ1cmkiOiAiaHR0cHM6Ly9mdWxjaW8uc2lnc3RvcmUuZGV2IiwKICAgICAgImNlcnRDaGFpbiI6IHsKICAgICAgICAiY2VydGlmaWNhdGVzIjogWwogICAgICAgICAgewogICAgICAgICAgICAicmF3Qnl0ZXMiOiAiTUlJQ0dqQ0NBYUdnQXdJQkFnSVVBTG5WaVZmblUwYnJKYXNtUmtIcm4vVW5mYVF3Q2dZSUtvWkl6ajBFQXdNd0tqRVZNQk1HQTFVRUNoTU1jMmxuYzNSdmNtVXVaR1YyTVJFd0R3WURWUVFERXdoemFXZHpkRzl5WlRBZUZ3MHlNakEwTVRNeU1EQTJNVFZhRncwek1URXdNRFV4TXpVMk5UaGFNRGN4RlRBVEJnTlZCQW9UREhOcFozTjBiM0psTG1SbGRqRWVNQndHQTFVRUF4TVZjMmxuYzNSdmNtVXRhVzUwWlhKdFpXUnBZWFJsTUhZd0VBWUhLb1pJemowQ0FRWUZLNEVFQUNJRFlnQUU4UlZTL3lzSCtOT3Z1RFp5UEladGlsZ1VGOU5sYXJZcEFkOUhQMXZCQkgxVTVDVjc3TFNTN3MwWmlING5FN0h2N3B0UzZMdnZSL1NUazc5OExWZ016TGxKNEhlSWZGM3RIU2FleExjWXBTQVNyMWtTME4vUmdCSnovOWpXQ2lYbm8zc3dlVEFPQmdOVkhROEJBZjhFQkFNQ0FRWXdFd1lEVlIwbEJBd3dDZ1lJS3dZQkJRVUhBd013RWdZRFZSMFRBUUgvQkFnd0JnRUIvd0lCQURBZEJnTlZIUTRFRmdRVTM5UHB6MVlrRVpiNXFOanBLRldpeGk0WVpEOHdId1lEVlIwakJCZ3dGb0FVV01BZVg1RkZwV2FwZXN5UW9aTWkwQ3JGeGZvd0NnWUlLb1pJemowRUF3TURad0F3WkFJd1BDc1FLNERZaVpZRFBJYURpNUhGS25meFh4NkFTU1ZtRVJmc3luWUJpWDJYNlNKUm5aVTg0LzlEWmRuRnZ2eG1BakJPdDZRcEJsYzRKLzBEeHZrVENxcGNsdnppTDZCQ0NQbmpkbElCM1B1M0J4c1BteWdVWTdJaTJ6YmRDZGxpaW93PSIKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJyYXdCeXRlcyI6ICJNSUlCOXpDQ0FYeWdBd0lCQWdJVUFMWk5BUEZkeEhQd2plRGxvRHd5WUNoQU8vNHdDZ1lJS29aSXpqMEVBd013S2pFVk1CTUdBMVVFQ2hNTWMybG5jM1J2Y21VdVpHVjJNUkV3RHdZRFZRUURFd2h6YVdkemRHOXlaVEFlRncweU1URXdNRGN4TXpVMk5UbGFGdzB6TVRFd01EVXhNelUyTlRoYU1Db3hGVEFUQmdOVkJBb1RESE5wWjNOMGIzSmxMbVJsZGpFUk1BOEdBMVVFQXhNSWMybG5jM1J2Y21Vd2RqQVFCZ2NxaGtqT1BRSUJCZ1VyZ1FRQUlnTmlBQVQ3WGVGVDRyYjNQUUd3UzRJYWp0TGszL09sbnBnYW5nYUJjbFlwc1lCcjVpKzR5bkIwN2NlYjNMUDBPSU9aZHhleFg2OWM1aVZ1eUpSUStIejA1eWkrVUYzdUJXQWxIcGlTNXNoMCtIMkdIRTdTWHJrMUVDNW0xVHIxOUw5Z2c5MmpZekJoTUE0R0ExVWREd0VCL3dRRUF3SUJCakFQQmdOVkhSTUJBZjhFQlRBREFRSC9NQjBHQTFVZERnUVdCQlJZd0I1ZmtVV2xacWw2ekpDaGt5TFFLc1hGK2pBZkJnTlZIU01FR0RBV2dCUll3QjVma1VXbFpxbDZ6SkNoa3lMUUtzWEYrakFLQmdncWhrak9QUVFEQXdOcEFEQm1BakVBajFuSGVYWnArMTNOV0JOYStFRHNEUDhHMVdXZzF0Q01XUC9XSFBxcGFWbzBqaHN3ZU5GWmdTczBlRTd3WUk0cUFqRUEyV0I5b3Q5OHNJa29GM3ZaWWRkMy9WdFdCNWI5VE5NZWE3SXgvc3RKNVRmY0xMZUFCTEU0Qk5KT3NRNHZuQkhKIgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgInZhbGlkRm9yIjogewogICAgICAgICJzdGFydCI6ICIyMDIyLTA0LTEzVDIwOjA2OjE1WiIKICAgICAgfQogICAgfQogIF0sCiAgImN0bG9ncyI6IFsKICAgIHsKICAgICAgImJhc2VVcmwiOiAiaHR0cHM6Ly9jdGZlLnNpZ3N0b3JlLmRldi90ZXN0IiwKICAgICAgImhhc2hBbGdvcml0aG0iOiAiU0hBMl8yNTYiLAogICAgICAicHVibGljS2V5IjogewogICAgICAgICJyYXdCeXRlcyI6ICJNRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUViZndSK1JKdWRYc2NnUkJScEtYMVhGRHkzUHl1ZER4ei9TZm5SaTFmVDhla3BmQmQyTzF1b3o3anIzWjhuS3p4QTY5RVVRK2VGQ0ZJM3pldWJQV1U3dz09IiwKICAgICAgICAia2V5RGV0YWlscyI6ICJQS0lYX0VDRFNBX1AyNTZfU0hBXzI1NiIsCiAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgInN0YXJ0IjogIjIwMjEtMDMtMTRUMDA6MDA6MDBaIiwKICAgICAgICAgICJlbmQiOiAiMjAyMi0xMC0zMVQyMzo1OTo1OS45OTlaIgogICAgICAgIH0KICAgICAgfSwKICAgICAgImxvZ0lkIjogewogICAgICAgICJrZXlJZCI6ICJDR0NTOENoUy8yaEYwZEZySjRTY1JXY1lyQlk5d3pqU2JlYThJZ1kyYjNJPSIKICAgICAgfQogICAgfSwKICAgIHsKICAgICAgImJhc2VVcmwiOiAiaHR0cHM6Ly9jdGZlLnNpZ3N0b3JlLmRldi8yMDIyIiwKICAgICAgImhhc2hBbGdvcml0aG0iOiAiU0hBMl8yNTYiLAogICAgICAicHVibGljS2V5IjogewogICAgICAgICJyYXdCeXRlcyI6ICJNRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUVpUFNsRmkwQ21GVGZFakNVcUY5SHVDRWNZWE5LQWFZYWxJSm1CWjh5eWV6UGpUcWh4cktCcE1uYW9jVnRMSkJJMWVNM3VYblF6UUdBSmRKNGdzOUZ5dz09IiwKICAgICAgICAia2V5RGV0YWlscyI6ICJQS0lYX0VDRFNBX1AyNTZfU0hBXzI1NiIsCiAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgInN0YXJ0IjogIjIwMjItMTAtMjBUMDA6MDA6MDBaIgogICAgICAgIH0KICAgICAgfSwKICAgICAgImxvZ0lkIjogewogICAgICAgICJrZXlJZCI6ICIzVDB3YXNiSEVUSmpHUjRjbVdjM0FxSktYcmplUEszL2g0cHlnQzhwN280PSIKICAgICAgfQogICAgfQogIF0sCiAgInRpbWVzdGFtcEF1dGhvcml0aWVzIjogWwogICAgewogICAgICAic3ViamVjdCI6IHsKICAgICAgICAib3JnYW5pemF0aW9uIjogInNpZ3N0b3JlLmRldiIsCiAgICAgICAgImNvbW1vbk5hbWUiOiAic2lnc3RvcmUtdHNhLXNlbGZzaWduZWQiCiAgICAgIH0sCiAgICAgICJ1cmkiOiAiaHR0cHM6Ly90aW1lc3RhbXAuc2lnc3RvcmUuZGV2L2FwaS92MS90aW1lc3RhbXAiLAogICAgICAiY2VydENoYWluIjogewogICAgICAgICJjZXJ0aWZpY2F0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJyYXdCeXRlcyI6ICJNSUlDRURDQ0FaYWdBd0lCQWdJVU9oTlVMd3lRWWU2OHdVTXZ5NHFPaXlvaml3d3dDZ1lJS29aSXpqMEVBd013T1RFVk1CTUdBMVVFQ2hNTWMybG5jM1J2Y21VdVpHVjJNU0F3SGdZRFZRUURFeGR6YVdkemRHOXlaUzEwYzJFdGMyVnNabk5wWjI1bFpEQWVGdzB5TlRBME1EZ3dOalU1TkROYUZ3MHpOVEEwTURZd05qVTVORE5hTUM0eEZUQVRCZ05WQkFvVERITnBaM04wYjNKbExtUmxkakVWTUJNR0ExVUVBeE1NYzJsbmMzUnZjbVV0ZEhOaE1IWXdFQVlIS29aSXpqMENBUVlGSzRFRUFDSURZZ0FFNHJhMlo4aEtOaWcyVDlrRmpDQVRvR0czMGpreStXUXYzQnpMK21LdmgxU0tOUi9Vd3V3c2ZOQ2c0c3J5b1lBZDhFNmlzb3ZWQTNNNGFvTmRtOVFEaTUwWjhuVEV5dnFnZkRQdFRJd1hJdGZpVy9BRmYxVjd1d2tia0FvajB4eGNvMm93YURBT0JnTlZIUThCQWY4RUJBTUNCNEF3SFFZRFZSME9CQllFRkluOWVVT0h6OUJsUnNNQ1JzY3NjMXQ5dE9zRE1COEdBMVVkSXdRWU1CYUFGSmpzQWU5L3UxSC8xSlVlYjRxSW1GTUhpYzYvTUJZR0ExVWRKUUVCL3dRTU1Bb0dDQ3NHQVFVRkJ3TUlNQW9HQ0NxR1NNNDlCQU1EQTJnQU1HVUNNRHRwc1YvNkthTzBxeUYvVU1zWDJhU1VYS1FGZG9HVHB0UUdjMGZ0cTFjc3VsSFBHRzZkc215TU5kM0pCK0czRVFJeEFPYWp2QmNqcEptS2I0TnYrMlRhb2o4VWM1K2I2aWg2RlhDQ0tyYVNxdXBlMDd6cXN3TWNYSlRlMWNFeHZIdnZsdz09IgogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgInJhd0J5dGVzIjogIk1JSUI5ekNDQVh5Z0F3SUJBZ0lVVjdmMEdMRE9vRXpJaDhMWFNXODBPSmlVcDE0d0NnWUlLb1pJemowRUF3TXdPVEVWTUJNR0ExVUVDaE1NYzJsbmMzUnZjbVV1WkdWMk1TQXdIZ1lEVlFRREV4ZHphV2R6ZEc5eVpTMTBjMkV0YzJWc1puTnBaMjVsWkRBZUZ3MHlOVEEwTURnd05qVTVORE5hRncwek5UQTBNRFl3TmpVNU5ETmFNRGt4RlRBVEJnTlZCQW9UREhOcFozTjBiM0psTG1SbGRqRWdNQjRHQTFVRUF4TVhjMmxuYzNSdmNtVXRkSE5oTFhObGJHWnphV2R1WldRd2RqQVFCZ2NxaGtqT1BRSUJCZ1VyZ1FRQUlnTmlBQVFVUU50ZlJUL291M1lBVGE2d0Iva0tUZTcwY2ZKd3lSSUJvdk1udDhSY0pwaC9DT0U4MnV5UzZGbXBwTExMMVZCUEdjUGZwUVBZSk5Yeld3aThpY3doS1E2Vy9RZTJoM29lYkJiMkZIcHdOSkRxbytUTWFDL3RkZmt2L0VsSkI3MmpSVEJETUE0R0ExVWREd0VCL3dRRUF3SUJCakFTQmdOVkhSTUJBZjhFQ0RBR0FRSC9BZ0VBTUIwR0ExVWREZ1FXQkJTWTdBSHZmN3RSLzlTVkhtK0tpSmhUQjRuT3Z6QUtCZ2dxaGtqT1BRUURBd05wQURCbUFqRUF3R0VHcmZHWlIxY2VuMVI4L0RUVk1JOTQzTHNzWm1KUnREcC9pN1NmR0htR1JQNmdSYnVqOXZPSzNiNjdaMFFRQWpFQXVUMkg2NzNMUUVhSFRjeVFTWnJrcDRtWDdXd2ttRitzVmJrWVk1bVhOK1JNSDEzS1VFSEhPcUFTYWVtWVdLL0UiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICAidmFsaWRGb3IiOiB7CiAgICAgICAgInN0YXJ0IjogIjIwMjUtMDctMDRUMDA6MDA6MDBaIgogICAgICB9CiAgICB9CiAgXQp9Cg==","registry.npmjs.org%2Fkeys.json":"ewogICAgImtleXMiOiBbCiAgICAgICAgewogICAgICAgICAgICAia2V5SWQiOiAiU0hBMjU2OmpsM2J3c3d1ODBQampva0NnaDBvMnc1YzJVNExoUUFFNTdnajljejFrekEiLAogICAgICAgICAgICAia2V5VXNhZ2UiOiAibnBtOnNpZ25hdHVyZXMiLAogICAgICAgICAgICAicHVibGljS2V5IjogewogICAgICAgICAgICAgICAgInJhd0J5dGVzIjogIk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRTFPbGIzek1BRkZ4WEtIaUlrUU81Y0ozWWhsNWk2VVBwK0lodXRlQkpidUhjQTVVb2dLbzBFV3RsV3dXNktTYUtvVE5FWUw3SmxDUWlWbmtoQmt0VWdnPT0iLAogICAgICAgICAgICAgICAgImtleURldGFpbHMiOiAiUEtJWF9FQ0RTQV9QMjU2X1NIQV8yNTYiLAogICAgICAgICAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgICAgICAgICAgICJzdGFydCI6ICIxOTk5LTAxLTAxVDAwOjAwOjAwLjAwMFoiLAogICAgICAgICAgICAgICAgICAgICJlbmQiOiAiMjAyNS0wMS0yOVQwMDowMDowMC4wMDBaIgogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAgICJrZXlJZCI6ICJTSEEyNTY6amwzYndzd3U4MFBqam9rQ2doMG8ydzVjMlU0TGhRQUU1N2dqOWN6MWt6QSIsCiAgICAgICAgICAgICJrZXlVc2FnZSI6ICJucG06YXR0ZXN0YXRpb25zIiwKICAgICAgICAgICAgInB1YmxpY0tleSI6IHsKICAgICAgICAgICAgICAgICJyYXdCeXRlcyI6ICJNRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUUxT2xiM3pNQUZGeFhLSGlJa1FPNWNKM1lobDVpNlVQcCtJaHV0ZUJKYnVIY0E1VW9nS28wRVd0bFd3VzZLU2FLb1RORVlMN0psQ1FpVm5raEJrdFVnZz09IiwKICAgICAgICAgICAgICAgICJrZXlEZXRhaWxzIjogIlBLSVhfRUNEU0FfUDI1Nl9TSEFfMjU2IiwKICAgICAgICAgICAgICAgICJ2YWxpZEZvciI6IHsKICAgICAgICAgICAgICAgICAgICAic3RhcnQiOiAiMjAyMi0xMi0wMVQwMDowMDowMC4wMDBaIiwKICAgICAgICAgICAgICAgICAgICAiZW5kIjogIjIwMjUtMDEtMjlUMDA6MDA6MDAuMDAwWiIKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0sCiAgICAgICAgewogICAgICAgICAgICAia2V5SWQiOiAiU0hBMjU2OkRoUTh3UjVBUEJ2RkhMRi8rVGMrQVl2UE9kVHBjSURxT2h4c0JIUndDN1UiLAogICAgICAgICAgICAia2V5VXNhZ2UiOiAibnBtOnNpZ25hdHVyZXMiLAogICAgICAgICAgICAicHVibGljS2V5IjogewogICAgICAgICAgICAgICAgInJhd0J5dGVzIjogIk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRVk2WWE3VysrN2FVUHp2TVRyZXpINlljeDNjK0hPS1lDY05HeWJKWlNDSnEvZmQ3UWE4dXVBS3RkSWtVUXRRaUVLRVJoQW1FNWxNTUpoUDhPa0RPYTJnPT0iLAogICAgICAgICAgICAgICAgImtleURldGFpbHMiOiAiUEtJWF9FQ0RTQV9QMjU2X1NIQV8yNTYiLAogICAgICAgICAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgICAgICAgICAgICJzdGFydCI6ICIyMDI1LTAxLTEzVDAwOjAwOjAwLjAwMFoiCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9LAogICAgICAgIHsKICAgICAgICAgICAgImtleUlkIjogIlNIQTI1NjpEaFE4d1I1QVBCdkZITEYvK1RjK0FZdlBPZFRwY0lEcU9oeHNCSFJ3QzdVIiwKICAgICAgICAgICAgImtleVVzYWdlIjogIm5wbTphdHRlc3RhdGlvbnMiLAogICAgICAgICAgICAicHVibGljS2V5IjogewogICAgICAgICAgICAgICAgInJhd0J5dGVzIjogIk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRVk2WWE3VysrN2FVUHp2TVRyZXpINlljeDNjK0hPS1lDY05HeWJKWlNDSnEvZmQ3UWE4dXVBS3RkSWtVUXRRaUVLRVJoQW1FNWxNTUpoUDhPa0RPYTJnPT0iLAogICAgICAgICAgICAgICAgImtleURldGFpbHMiOiAiUEtJWF9FQ0RTQV9QMjU2X1NIQV8yNTYiLAogICAgICAgICAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgICAgICAgICAgICJzdGFydCI6ICIyMDI1LTAxLTEzVDAwOjAwOjAwLjAwMFoiCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICBdCn0K"}}}});var uj=d(ua=>{"use strict";var cj=ua&&ua.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(ua,"__esModule",{value:!0});ua.TUFClient=void 0;var os=cj(require("fs")),Fu=cj(require("path")),Xae=nj(),Qae=gm(),ece=oj(),lI="targets",uI=class{static{o(this,"TUFClient")}constructor(e){let t=new URL(e.mirrorURL),r=encodeURIComponent(t.host+t.pathname.replace(/\/$/,"")),s=Fu.default.join(e.cachePath,r);tce(s),ice({cachePath:s,mirrorURL:e.mirrorURL,tufRootPath:e.rootPath,forceInit:e.forceInit}),this.updater=rce({mirrorURL:e.mirrorURL,cachePath:s,forceCache:e.forceCache,retry:e.retry,timeout:e.timeout})}async refresh(){return this.updater.refresh()}getTarget(e){return(0,ece.readTarget)(this.updater,e)}};ua.TUFClient=uI;function tce(i){let e=Fu.default.join(i,lI);os.default.existsSync(i)||os.default.mkdirSync(i,{recursive:!0}),os.default.existsSync(e)||os.default.mkdirSync(e)}o(tce,"initTufCache");function ice({cachePath:i,mirrorURL:e,tufRootPath:t,forceInit:r}){let s=Fu.default.join(i,"root.json");if(!os.default.existsSync(s)||r)if(t)os.default.copyFileSync(t,s);else{let a=aj()[e];if(!a)throw new Qae.TUFError({code:"TUF_INIT_CACHE_ERROR",message:`No root.json found for mirror: ${e}`});os.default.writeFileSync(s,Buffer.from(a["root.json"],"base64")),Object.entries(a.targets).forEach(([c,u])=>{os.default.writeFileSync(Fu.default.join(i,lI,c),Buffer.from(u,"base64"))})}}o(ice,"seedCache");function rce(i){let e={fetchTimeout:i.timeout,fetchRetry:i.retry};return new Xae.Updater({metadataBaseUrl:i.mirrorURL,targetBaseUrl:`${i.mirrorURL}/targets`,metadataDir:i.cachePath,targetDir:Fu.default.join(i.cachePath,lI),forceCache:i.forceCache,config:e})}o(rce,"initClient")});var gm=d(mr=>{"use strict";Object.defineProperty(mr,"__esModule",{value:!0});mr.TUFError=mr.DEFAULT_MIRROR_URL=void 0;mr.getTrustedRoot=hce;mr.initTUF=fce;var sce=fu(),nce=KF(),oce=uj();mr.DEFAULT_MIRROR_URL="https://tuf-repo-cdn.sigstore.dev";var ace="sigstore-js",cce={retries:2},uce=5e3,lce="trusted_root.json";async function hce(i={}){let t=await lj(i).getTarget(lce);return sce.TrustedRoot.fromJSON(JSON.parse(t))}o(hce,"getTrustedRoot");async function fce(i={}){let e=lj(i);return e.refresh().then(()=>e)}o(fce,"initTUF");function lj(i){return new oce.TUFClient({cachePath:i.cachePath||(0,nce.appDataPath)(ace),rootPath:i.rootPath,mirrorURL:i.mirrorURL||mr.DEFAULT_MIRROR_URL,retry:i.retry??cce,timeout:i.timeout??uce,forceCache:i.forceCache??!1,forceInit:i.forceInit??i.force??!1})}o(lj,"createClient");var dce=cI();Object.defineProperty(mr,"TUFError",{enumerable:!0,get:o(function(){return dce.TUFError},"get")})});var hj=d(ym=>{"use strict";Object.defineProperty(ym,"__esModule",{value:!0});ym.DSSESignatureContent=void 0;var Uu=ut(),hI=class{static{o(this,"DSSESignatureContent")}constructor(e){this.env=e}compareDigest(e){return Uu.crypto.bufferEqual(e,Uu.crypto.digest("sha256",this.env.payload))}compareSignature(e){return Uu.crypto.bufferEqual(e,this.signature)}verifySignature(e){return Uu.crypto.verify(this.preAuthEncoding,e,this.signature)}get signature(){return this.env.signatures.length>0?this.env.signatures[0].sig:Buffer.from("")}get preAuthEncoding(){return Uu.dsse.preAuthEncoding(this.env.payloadType,this.env.payload)}};ym.DSSESignatureContent=hI});var fj=d(Sm=>{"use strict";Object.defineProperty(Sm,"__esModule",{value:!0});Sm.MessageSignatureContent=void 0;var fI=ut(),dI=class{static{o(this,"MessageSignatureContent")}constructor(e,t){this.signature=e.signature,this.messageDigest=e.messageDigest.digest,this.artifact=t}compareSignature(e){return fI.crypto.bufferEqual(e,this.signature)}compareDigest(e){return fI.crypto.bufferEqual(e,this.messageDigest)}verifySignature(e){return fI.crypto.verify(this.artifact,e,this.signature)}};Sm.MessageSignatureContent=dI});var pj=d(Em=>{"use strict";Object.defineProperty(Em,"__esModule",{value:!0});Em.toSignedEntity=gce;Em.signatureContent=dj;var pI=ut(),pce=hj(),mce=fj();function gce(i,e){let{tlogEntries:t,timestampVerificationData:r}=i.verificationMaterial,s=[];for(let n of t)s.push({$case:"transparency-log",tlogEntry:n});for(let n of r?.rfc3161Timestamps??[])s.push({$case:"timestamp-authority",timestamp:pI.RFC3161Timestamp.parse(n.signedTimestamp)});return{signature:dj(i,e),key:yce(i),tlogEntries:t,timestamps:s}}o(gce,"toSignedEntity");function dj(i,e){switch(i.content.$case){case"dsseEnvelope":return new pce.DSSESignatureContent(i.content.dsseEnvelope);case"messageSignature":return new mce.MessageSignatureContent(i.content.messageSignature,e)}}o(dj,"signatureContent");function yce(i){switch(i.verificationMaterial.content.$case){case"publicKey":return{$case:"public-key",hint:i.verificationMaterial.content.publicKey.hint};case"x509CertificateChain":return{$case:"certificate",certificate:pI.X509Certificate.parse(i.verificationMaterial.content.x509CertificateChain.certificates[0].rawBytes)};case"certificate":return{$case:"certificate",certificate:pI.X509Certificate.parse(i.verificationMaterial.content.certificate.rawBytes)}}}o(yce,"key")});var xe=d(la=>{"use strict";Object.defineProperty(la,"__esModule",{value:!0});la.PolicyError=la.VerificationError=void 0;var wm=class extends Error{static{o(this,"BaseError")}constructor({code:e,message:t,cause:r}){super(t),this.code=e,this.cause=r,this.name=this.constructor.name}},mI=class extends wm{static{o(this,"VerificationError")}};la.VerificationError=mI;var gI=class extends wm{static{o(this,"PolicyError")}};la.PolicyError=gI});var mj=d(_m=>{"use strict";Object.defineProperty(_m,"__esModule",{value:!0});_m.filterCertAuthorities=Sce;_m.filterTLogAuthorities=Ece;function Sce(i,e){return i.filter(t=>t.validFor.start<=e&&t.validFor.end>=e)}o(Sce,"filterCertAuthorities");function Ece(i,e){return i.filter(t=>e.logID&&!t.logID.equals(e.logID)?!1:t.validFor.start<=e.targetDate&&e.targetDate<=t.validFor.end)}o(Ece,"filterTLogAuthorities")});var fn=d(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.filterTLogAuthorities=hn.filterCertAuthorities=void 0;hn.toTrustMaterial=_ce;var yI=ut(),ju=fu(),wce=xe(),SI=new Date(0),EI=new Date(864e13),Sj=mj();Object.defineProperty(hn,"filterCertAuthorities",{enumerable:!0,get:o(function(){return Sj.filterCertAuthorities},"get")});Object.defineProperty(hn,"filterTLogAuthorities",{enumerable:!0,get:o(function(){return Sj.filterTLogAuthorities},"get")});function _ce(i,e){let t=typeof e=="function"?e:bce(e);return{certificateAuthorities:i.certificateAuthorities.map(yj),timestampAuthorities:i.timestampAuthorities.map(yj),tlogs:i.tlogs.map(gj),ctlogs:i.ctlogs.map(gj),publicKey:t}}o(_ce,"toTrustMaterial");function gj(i){let e=i.publicKey.keyDetails,t=e===ju.PublicKeyDetails.PKCS1_RSA_PKCS1V5||e===ju.PublicKeyDetails.PKIX_RSA_PKCS1V5||e===ju.PublicKeyDetails.PKIX_RSA_PKCS1V15_2048_SHA256||e===ju.PublicKeyDetails.PKIX_RSA_PKCS1V15_3072_SHA256||e===ju.PublicKeyDetails.PKIX_RSA_PKCS1V15_4096_SHA256?"pkcs1":"spki";return{logID:i.logId.keyId,publicKey:yI.crypto.createPublicKey(i.publicKey.rawBytes,t),validFor:{start:i.publicKey.validFor?.start||SI,end:i.publicKey.validFor?.end||EI}}}o(gj,"createTLogAuthority");function yj(i){return{certChain:i.certChain.certificates.map(e=>yI.X509Certificate.parse(e.rawBytes)),validFor:{start:i.validFor?.start||SI,end:i.validFor?.end||EI}}}o(yj,"createCertAuthority");function bce(i){return e=>{let t=(i||{})[e];if(!t)throw new wce.VerificationError({code:"PUBLIC_KEY_ERROR",message:`key not found: ${e}`});return{publicKey:yI.crypto.createPublicKey(t.rawBytes),validFor:o(r=>(t.validFor?.start||SI)<=r&&(t.validFor?.end||EI)>=r,"validFor")}}}o(bce,"keyLocator")});var wI=d($u=>{"use strict";Object.defineProperty($u,"__esModule",{value:!0});$u.CertificateChainVerifier=void 0;$u.verifyCertificateChain=Oce;var as=xe(),Ice=fn();function Oce(i,e,t){let r=(0,Ice.filterCertAuthorities)(t,i),s;for(let n of r)try{return new bm({trustedCerts:n.certChain,untrustedCert:e,timestamp:i}).verify()}catch(a){s=a}throw new as.VerificationError({code:"CERTIFICATE_ERROR",message:"Failed to verify certificate chain",cause:s})}o(Oce,"verifyCertificateChain");var bm=class{static{o(this,"CertificateChainVerifier")}constructor(e){this.untrustedCert=e.untrustedCert,this.trustedCerts=e.trustedCerts,this.localCerts=vce([...e.trustedCerts,e.untrustedCert]),this.timestamp=e.timestamp}verify(){let e=this.sort();if(this.checkPath(e),!e.every(r=>r.validForDate(this.timestamp)))throw new as.VerificationError({code:"CERTIFICATE_ERROR",message:"certificate is not valid or expired at the specified date"});return e}sort(){let e=this.untrustedCert,t=this.buildPaths(e);if(t=t.filter(s=>s.some(n=>this.trustedCerts.includes(n))),t.length===0)throw new as.VerificationError({code:"CERTIFICATE_ERROR",message:"no trusted certificate path found"});let r=t.reduce((s,n)=>s.length<n.length?s:n);return[e,...r].slice(0,-1)}buildPaths(e){let t=[],r=this.findIssuer(e);if(r.length===0)throw new as.VerificationError({code:"CERTIFICATE_ERROR",message:"no valid certificate path found"});for(let s=0;s<r.length;s++){let n=r[s];if(n.equals(e)){t.push([e]);continue}let a=this.buildPaths(n);for(let c=0;c<a.length;c++)t.push([n,...a[c]])}return t}findIssuer(e){let t=[],r;return e.subject.equals(e.issuer)&&e.verify()?[e]:(e.extAuthorityKeyID&&(r=e.extAuthorityKeyID.keyIdentifier),this.localCerts.forEach(s=>{if(r&&s.extSubjectKeyID){s.extSubjectKeyID.keyIdentifier.equals(r)&&t.push(s);return}s.subject.equals(e.issuer)&&t.push(s)}),t=t.filter(s=>{try{return e.verify(s)}catch{return!1}}),t)}checkPath(e){if(e.length<1)throw new as.VerificationError({code:"CERTIFICATE_ERROR",message:"certificate chain must contain at least one certificate"});if(!e.slice(1).every(r=>r.isCA))throw new as.VerificationError({code:"CERTIFICATE_ERROR",message:"intermediate certificate is not a CA"});for(let r=e.length-2;r>=0;r--)if(!e[r].issuer.equals(e[r+1].subject))throw new as.VerificationError({code:"CERTIFICATE_ERROR",message:"incorrect certificate name chaining"});for(let r=0;r<e.length;r++){let s=e[r];if(s.extBasicConstraints?.isCA){let n=s.extBasicConstraints.pathLenConstraint;if(n!==void 0&&n<r-1)throw new as.VerificationError({code:"CERTIFICATE_ERROR",message:"path length constraint exceeded"})}}}};$u.CertificateChainVerifier=bm;function vce(i){for(let e=0;e<i.length;e++)for(let t=e+1;t<i.length;t++)i[e].equals(i[t])&&(i.splice(t,1),t--);return i}o(vce,"dedupeCertificates")});var Ej=d(_I=>{"use strict";Object.defineProperty(_I,"__esModule",{value:!0});_I.verifySCTs=Ace;var Im=ut(),Cce=xe(),Rce=fn();function Ace(i,e,t){let r,s=i.clone();for(let u=0;u<s.extensions.length;u++){let l=s.extensions[u];if(l.subs[0].toOID()===Im.EXTENSION_OID_SCT){r=new Im.X509SCTExtension(l),s.extensions.splice(u,1);break}}if(!r)return[];if(r.signedCertificateTimestamps.length===0)return[];let n=new Im.ByteStream,a=Im.crypto.digest("sha256",e.publicKey);n.appendView(a);let c=s.tbsCertificate.toDER();return n.appendUint24(c.length),n.appendView(c),r.signedCertificateTimestamps.map(u=>{if(!(0,Rce.filterTLogAuthorities)(t,{logID:u.logID,targetDate:u.datetime}).some(f=>u.verify(n.buffer,f.publicKey)))throw new Cce.VerificationError({code:"CERTIFICATE_ERROR",message:"SCT verification failed"});return u.logID})}o(Ace,"verifySCTs")});var wj=d(Om=>{"use strict";Object.defineProperty(Om,"__esModule",{value:!0});Om.verifyPublicKey=Mce;Om.verifyCertificate=Bce;var Tce=ut(),Nce=xe(),Pce=wI(),Dce=Ej(),xce="1.3.6.1.4.1.57264.1.1",Lce="1.3.6.1.4.1.57264.1.8";function Mce(i,e,t){let r=t.publicKey(i);return e.forEach(s=>{if(!r.validFor(s))throw new Nce.VerificationError({code:"PUBLIC_KEY_ERROR",message:`Public key is not valid for timestamp: ${s.toISOString()}`})}),{key:r.publicKey}}o(Mce,"verifyPublicKey");function Bce(i,e,t){let r=[];return e.forEach(s=>{r=(0,Pce.verifyCertificateChain)(s,i,t.certificateAuthorities)}),{scts:(0,Dce.verifySCTs)(r[0],r[1],t.ctlogs),signer:kce(r[0])}}o(Bce,"verifyCertificate");function kce(i){let e,t=i.extension(Lce);t?e=t.valueObj.subs?.[0]?.value.toString("ascii"):e=i.extension(xce)?.value.toString("ascii");let r={extensions:{issuer:e},subjectAlternativeName:i.subjectAltName};return{key:Tce.crypto.createPublicKey(i.publicKey),identity:r}}o(kce,"getSigner")});var bj=d(vm=>{"use strict";Object.defineProperty(vm,"__esModule",{value:!0});vm.verifySubjectAlternativeName=Fce;vm.verifyExtensions=Uce;var _j=xe();function Fce(i,e){if(e===void 0||!e.match(i))throw new _j.PolicyError({code:"UNTRUSTED_SIGNER_ERROR",message:`certificate identity error - expected ${i}, got ${e}`})}o(Fce,"verifySubjectAlternativeName");function Uce(i,e={}){let t;for(t in i)if(e[t]!==i[t])throw new _j.PolicyError({code:"UNTRUSTED_SIGNER_ERROR",message:`invalid certificate extension - expected ${t}=${i[t]}, got ${t}=${e[t]}`})}o(Uce,"verifyExtensions")});var Ij=d(CI=>{"use strict";Object.defineProperty(CI,"__esModule",{value:!0});CI.verifyCheckpoint=qce;var II=ut(),ha=xe(),jce=fn(),bI=`
64
+
65
+ `,$ce=/\u2014 (\S+) (\S+)\n/g;function qce(i,e){let t=(0,jce.filterTLogAuthorities)(e,{targetDate:new Date(Number(i.integratedTime)*1e3)}),r=i.inclusionProof,s=OI.fromString(r.checkpoint.envelope),n=vI.fromString(s.note);if(!Vce(s,t))throw new ha.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid checkpoint signature"});if(!II.crypto.bufferEqual(n.logHash,r.rootHash))throw new ha.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"root hash mismatch"})}o(qce,"verifyCheckpoint");function Vce(i,e){let t=Buffer.from(i.note,"utf-8");return i.signatures.every(r=>{let s=e.find(n=>II.crypto.bufferEqual(n.logID.subarray(0,4),r.keyHint));return s?II.crypto.verify(t,s.publicKey,r.signature):!1})}o(Vce,"verifySignedNote");var OI=class i{static{o(this,"SignedNote")}constructor(e,t){this.note=e,this.signatures=t}static fromString(e){if(!e.includes(bI))throw new ha.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"missing checkpoint separator"});let t=e.indexOf(bI),r=e.slice(0,t+1),n=e.slice(t+bI.length).matchAll($ce),a=Array.from(n,c=>{let[,u,l]=c,h=Buffer.from(l,"base64");if(h.length<5)throw new ha.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"malformed checkpoint signature"});return{name:u,keyHint:h.subarray(0,4),signature:h.subarray(4)}});if(a.length===0)throw new ha.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"no signatures found in checkpoint"});return new i(r,a)}},vI=class i{static{o(this,"LogCheckpoint")}constructor(e,t,r,s){this.origin=e,this.logSize=t,this.logHash=r,this.rest=s}static fromString(e){let t=e.trimEnd().split(`
66
+ `);if(t.length<3)throw new ha.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"too few lines in checkpoint header"});let r=t[0],s=BigInt(t[1]),n=Buffer.from(t[2],"base64"),a=t.slice(3);return new i(r,s,n,a)}}});var Oj=d(NI=>{"use strict";Object.defineProperty(NI,"__esModule",{value:!0});NI.verifyMerkleInclusion=Gce;var TI=ut(),RI=xe(),zce=Buffer.from([0]),Hce=Buffer.from([1]);function Gce(i){let e=i.inclusionProof,t=BigInt(e.logIndex),r=BigInt(e.treeSize);if(t<0n||t>=r)throw new RI.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:`invalid index: ${t}`});let{inner:s,border:n}=Wce(t,r);if(e.hashes.length!==s+n)throw new RI.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid hash count"});let a=e.hashes.slice(0,s),c=e.hashes.slice(s),u=Qce(i.canonicalizedBody),l=Kce(Jce(u,a,t),c);if(!TI.crypto.bufferEqual(l,e.rootHash))throw new RI.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"calculated root hash does not match inclusion proof"})}o(Gce,"verifyMerkleInclusion");function Wce(i,e){let t=Zce(i,e),r=Yce(i>>BigInt(t));return{inner:t,border:r}}o(Wce,"decompInclProof");function Jce(i,e,t){return e.reduce((r,s,n)=>t>>BigInt(n)&BigInt(1)?AI(s,r):AI(r,s),i)}o(Jce,"chainInner");function Kce(i,e){return e.reduce((t,r)=>AI(r,t),i)}o(Kce,"chainBorderRight");function Zce(i,e){return Xce(i^e-BigInt(1))}o(Zce,"innerProofSize");function Yce(i){return i.toString(2).split("1").length-1}o(Yce,"onesCount");function Xce(i){return i===0n?0:i.toString(2).length}o(Xce,"bitLength");function AI(i,e){return TI.crypto.digest("sha256",Hce,i,e)}o(AI,"hashChildren");function Qce(i){return TI.crypto.digest("sha256",zce,i)}o(Qce,"hashLeaf")});var Cj=d(PI=>{"use strict";Object.defineProperty(PI,"__esModule",{value:!0});PI.verifyTLogSET=iue;var vj=ut(),eue=xe(),tue=fn();function iue(i,e){if(!(0,tue.filterTLogAuthorities)(e,{logID:i.logId.keyId,targetDate:new Date(Number(i.integratedTime)*1e3)}).some(s=>{let n=rue(i),a=Buffer.from(vj.json.canonicalize(n),"utf8"),c=i.inclusionPromise.signedEntryTimestamp;return vj.crypto.verify(a,s.publicKey,c)}))throw new eue.VerificationError({code:"TLOG_INCLUSION_PROMISE_ERROR",message:"inclusion promise could not be verified"})}o(iue,"verifyTLogSET");function rue(i){let{integratedTime:e,logIndex:t,logId:r,canonicalizedBody:s}=i;return{body:s.toString("base64"),integratedTime:Number(e),logIndex:Number(t),logID:r.keyId.toString("hex")}}o(rue,"toVerificationPayload")});var Aj=d(xI=>{"use strict";Object.defineProperty(xI,"__esModule",{value:!0});xI.verifyRFC3161Timestamp=oue;var DI=ut(),Rj=xe(),sue=wI(),nue=fn();function oue(i,e,t){let r=i.signingTime;if(t=(0,nue.filterCertAuthorities)(t,r),t=cue(t,{serialNumber:i.signerSerialNumber,issuer:i.signerIssuer}),!t.some(n=>{try{return aue(i,e,n),!0}catch{return!1}}))throw new Rj.VerificationError({code:"TIMESTAMP_ERROR",message:"timestamp could not be verified"})}o(oue,"verifyRFC3161Timestamp");function aue(i,e,t){let[r,...s]=t.certChain,n=DI.crypto.createPublicKey(r.publicKey),a=i.signingTime;try{new sue.CertificateChainVerifier({untrustedCert:r,trustedCerts:s,timestamp:a}).verify()}catch{throw new Rj.VerificationError({code:"TIMESTAMP_ERROR",message:"invalid certificate chain"})}i.verify(e,n)}o(aue,"verifyTimestampForCA");function cue(i,e){return i.filter(t=>t.certChain.length>0&&DI.crypto.bufferEqual(t.certChain[0].serialNumber,e.serialNumber)&&DI.crypto.bufferEqual(t.certChain[0].issuer,e.issuer))}o(cue,"filterCAsBySerialAndIssuer")});var Tj=d(Cm=>{"use strict";Object.defineProperty(Cm,"__esModule",{value:!0});Cm.verifyTSATimestamp=pue;Cm.verifyTLogTimestamp=mue;var uue=xe(),lue=Ij(),hue=Oj(),fue=Cj(),due=Aj();function pue(i,e,t){return(0,due.verifyRFC3161Timestamp)(i,e,t),{type:"timestamp-authority",logID:i.signerSerialNumber,timestamp:i.signingTime}}o(pue,"verifyTSATimestamp");function mue(i,e){let t=!1;if(gue(i)&&((0,fue.verifyTLogSET)(i,e),t=!0),yue(i)&&((0,hue.verifyMerkleInclusion)(i),(0,lue.verifyCheckpoint)(i,e),t=!0),!t)throw new uue.VerificationError({code:"TLOG_MISSING_INCLUSION_ERROR",message:"inclusion could not be verified"});return{type:"transparency-log",logID:i.logId.keyId,timestamp:new Date(Number(i.integratedTime)*1e3)}}o(mue,"verifyTLogTimestamp");function gue(i){return i.inclusionPromise!==void 0}o(gue,"isTLogEntryWithInclusionPromise");function yue(i){return i.inclusionProof!==void 0}o(yue,"isTLogEntryWithInclusionProof")});var Nj=d(LI=>{"use strict";Object.defineProperty(LI,"__esModule",{value:!0});LI.verifyDSSETLogBody=Sue;var Rm=xe();function Sue(i,e){switch(i.apiVersion){case"0.0.1":return Eue(i,e);default:throw new Rm.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupported dsse version: ${i.apiVersion}`})}}o(Sue,"verifyDSSETLogBody");function Eue(i,e){if(i.spec.signatures?.length!==1)throw new Rm.VerificationError({code:"TLOG_BODY_ERROR",message:"signature count mismatch"});let t=i.spec.signatures[0].signature;if(!e.compareSignature(Buffer.from(t,"base64")))throw new Rm.VerificationError({code:"TLOG_BODY_ERROR",message:"tlog entry signature mismatch"});let r=i.spec.payloadHash?.value||"";if(!e.compareDigest(Buffer.from(r,"hex")))throw new Rm.VerificationError({code:"TLOG_BODY_ERROR",message:"DSSE payload hash mismatch"})}o(Eue,"verifyDSSE001TLogBody")});var Pj=d(BI=>{"use strict";Object.defineProperty(BI,"__esModule",{value:!0});BI.verifyHashedRekordTLogBody=wue;var MI=xe();function wue(i,e){switch(i.apiVersion){case"0.0.1":return _ue(i,e);default:throw new MI.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupported hashedrekord version: ${i.apiVersion}`})}}o(wue,"verifyHashedRekordTLogBody");function _ue(i,e){let t=i.spec.signature.content||"";if(!e.compareSignature(Buffer.from(t,"base64")))throw new MI.VerificationError({code:"TLOG_BODY_ERROR",message:"signature mismatch"});let r=i.spec.data.hash?.value||"";if(!e.compareDigest(Buffer.from(r,"hex")))throw new MI.VerificationError({code:"TLOG_BODY_ERROR",message:"digest mismatch"})}o(_ue,"verifyHashedrekord001TLogBody")});var Dj=d(kI=>{"use strict";Object.defineProperty(kI,"__esModule",{value:!0});kI.verifyIntotoTLogBody=bue;var Am=xe();function bue(i,e){switch(i.apiVersion){case"0.0.2":return Iue(i,e);default:throw new Am.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupported intoto version: ${i.apiVersion}`})}}o(bue,"verifyIntotoTLogBody");function Iue(i,e){if(i.spec.content.envelope.signatures?.length!==1)throw new Am.VerificationError({code:"TLOG_BODY_ERROR",message:"signature count mismatch"});let t=Oue(i.spec.content.envelope.signatures[0].sig);if(!e.compareSignature(Buffer.from(t,"base64")))throw new Am.VerificationError({code:"TLOG_BODY_ERROR",message:"tlog entry signature mismatch"});let r=i.spec.content.payloadHash?.value||"";if(!e.compareDigest(Buffer.from(r,"hex")))throw new Am.VerificationError({code:"TLOG_BODY_ERROR",message:"DSSE payload hash mismatch"})}o(Iue,"verifyIntoto002TLogBody");function Oue(i){return Buffer.from(i,"base64").toString("utf-8")}o(Oue,"base64Decode")});var Lj=d(FI=>{"use strict";Object.defineProperty(FI,"__esModule",{value:!0});FI.verifyTLogBody=Aue;var xj=xe(),vue=Nj(),Cue=Pj(),Rue=Dj();function Aue(i,e){let{kind:t,version:r}=i.kindVersion,s=JSON.parse(i.canonicalizedBody.toString("utf8"));if(t!==s.kind||r!==s.apiVersion)throw new xj.VerificationError({code:"TLOG_BODY_ERROR",message:`kind/version mismatch - expected: ${t}/${r}, received: ${s.kind}/${s.apiVersion}`});switch(s.kind){case"dsse":return(0,vue.verifyDSSETLogBody)(s,e);case"intoto":return(0,Rue.verifyIntotoTLogBody)(s,e);case"hashedrekord":return(0,Cue.verifyHashedRekordTLogBody)(s,e);default:throw new xj.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupported kind: ${t}`})}}o(Aue,"verifyTLogBody")});var Uj=d(Tm=>{"use strict";Object.defineProperty(Tm,"__esModule",{value:!0});Tm.Verifier=void 0;var Tue=require("util"),fa=xe(),Mj=wj(),Bj=bj(),kj=Tj(),Nue=Lj(),UI=class{static{o(this,"Verifier")}constructor(e,t={}){this.trustMaterial=e,this.options={ctlogThreshold:t.ctlogThreshold??1,tlogThreshold:t.tlogThreshold??1,tsaThreshold:t.tsaThreshold??0}}verify(e,t){let r=this.verifyTimestamps(e),s=this.verifySigningKey(e,r);return this.verifyTLogs(e),this.verifySignature(e,s),t&&this.verifyPolicy(t,s.identity||{}),s}verifyTimestamps(e){let t=0,r=0,s=e.timestamps.map(n=>{switch(n.$case){case"timestamp-authority":return r++,(0,kj.verifyTSATimestamp)(n.timestamp,e.signature.signature,this.trustMaterial.timestampAuthorities);case"transparency-log":return t++,(0,kj.verifyTLogTimestamp)(n.tlogEntry,this.trustMaterial.tlogs)}});if(Fj(s))throw new fa.VerificationError({code:"TIMESTAMP_ERROR",message:"duplicate timestamp"});if(t<this.options.tlogThreshold)throw new fa.VerificationError({code:"TIMESTAMP_ERROR",message:`expected ${this.options.tlogThreshold} tlog timestamps, got ${t}`});if(r<this.options.tsaThreshold)throw new fa.VerificationError({code:"TIMESTAMP_ERROR",message:`expected ${this.options.tsaThreshold} tsa timestamps, got ${r}`});return s.map(n=>n.timestamp)}verifySigningKey({key:e},t){switch(e.$case){case"public-key":return(0,Mj.verifyPublicKey)(e.hint,t,this.trustMaterial);case"certificate":{let r=(0,Mj.verifyCertificate)(e.certificate,t,this.trustMaterial);if(Fj(r.scts))throw new fa.VerificationError({code:"CERTIFICATE_ERROR",message:"duplicate SCT"});if(r.scts.length<this.options.ctlogThreshold)throw new fa.VerificationError({code:"CERTIFICATE_ERROR",message:`expected ${this.options.ctlogThreshold} SCTs, got ${r.scts.length}`});return r.signer}}}verifyTLogs({signature:e,tlogEntries:t}){t.forEach(r=>(0,Nue.verifyTLogBody)(r,e))}verifySignature(e,t){if(!e.signature.verifySignature(t.key))throw new fa.VerificationError({code:"SIGNATURE_ERROR",message:"signature verification failed"})}verifyPolicy(e,t){e.subjectAlternativeName&&(0,Bj.verifySubjectAlternativeName)(e.subjectAlternativeName,t.subjectAlternativeName),e.extensions&&(0,Bj.verifyExtensions)(e.extensions,t.extensions)}};Tm.Verifier=UI;function Fj(i){for(let e=0;e<i.length;e++)for(let t=e+1;t<i.length;t++)if((0,Tue.isDeepStrictEqual)(i[e],i[t]))return!0;return!1}o(Fj,"containsDupes")});var Nm=d(Ht=>{"use strict";Object.defineProperty(Ht,"__esModule",{value:!0});Ht.Verifier=Ht.toTrustMaterial=Ht.VerificationError=Ht.PolicyError=Ht.toSignedEntity=void 0;var Pue=pj();Object.defineProperty(Ht,"toSignedEntity",{enumerable:!0,get:o(function(){return Pue.toSignedEntity},"get")});var jj=xe();Object.defineProperty(Ht,"PolicyError",{enumerable:!0,get:o(function(){return jj.PolicyError},"get")});Object.defineProperty(Ht,"VerificationError",{enumerable:!0,get:o(function(){return jj.VerificationError},"get")});var Due=fn();Object.defineProperty(Ht,"toTrustMaterial",{enumerable:!0,get:o(function(){return Due.toTrustMaterial},"get")});var xue=Uj();Object.defineProperty(Ht,"Verifier",{enumerable:!0,get:o(function(){return xue.Verifier},"get")})});var $j=d(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.DEFAULT_TIMEOUT=Ye.DEFAULT_RETRY=void 0;Ye.createBundleBuilder=Bue;Ye.createKeyFinder=kue;Ye.createVerificationPolicy=Fue;var Lue=ut(),da=t0(),Mue=Nm();Ye.DEFAULT_RETRY={retries:2};Ye.DEFAULT_TIMEOUT=5e3;function Bue(i,e){let t={signer:Uue(e),witnesses:$ue(e)};switch(i){case"messageSignature":return new da.MessageSignatureBundleBuilder(t);case"dsseEnvelope":return new da.DSSEBundleBuilder({...t,certificateChain:e.legacyCompatibility})}}o(Bue,"createBundleBuilder");function kue(i){return e=>{let t=i(e);if(!t)throw new Mue.VerificationError({code:"PUBLIC_KEY_ERROR",message:`key not found: ${e}`});return{publicKey:Lue.crypto.createPublicKey(t),validFor:o(()=>!0,"validFor")}}}o(kue,"createKeyFinder");function Fue(i){let e={},t=i.certificateIdentityEmail||i.certificateIdentityURI;return t&&(e.subjectAlternativeName=t),i.certificateIssuer&&(e.extensions={issuer:i.certificateIssuer}),e}o(Fue,"createVerificationPolicy");function Uue(i){return new da.FulcioSigner({fulcioBaseURL:i.fulcioURL,identityProvider:i.identityProvider||jue(i),retry:i.retry??Ye.DEFAULT_RETRY,timeout:i.timeout??Ye.DEFAULT_TIMEOUT})}o(Uue,"initSigner");function jue(i){let e=i.identityToken;return e?{getToken:o(()=>Promise.resolve(e),"getToken")}:new da.CIContextProvider("sigstore")}o(jue,"initIdentityProvider");function $ue(i){let e=[];return que(i)&&e.push(new da.RekorWitness({rekorBaseURL:i.rekorURL,entryType:i.legacyCompatibility?"intoto":"dsse",fetchOnConflict:!1,retry:i.retry??Ye.DEFAULT_RETRY,timeout:i.timeout??Ye.DEFAULT_TIMEOUT})),Vue(i)&&e.push(new da.TSAWitness({tsaBaseURL:i.tsaServerURL,retry:i.retry??Ye.DEFAULT_RETRY,timeout:i.timeout??Ye.DEFAULT_TIMEOUT})),e}o($ue,"initWitnesses");function que(i){return i.tlogUpload!==!1}o(que,"isRekorEnabled");function Vue(i){return i.tsaServerURL!==void 0}o(Vue,"isTSAEnabled")});var zj=d(Gt=>{"use strict";var zue=Gt&&Gt.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(i,r,s)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),Hue=Gt&&Gt.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),qj=Gt&&Gt.__importStar||(function(){var i=o(function(e){return i=Object.getOwnPropertyNames||function(t){var r=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[r.length]=s);return r},i(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=i(e),s=0;s<r.length;s++)r[s]!=="default"&&zue(t,e,r[s]);return Hue(t,e),t}})();Object.defineProperty(Gt,"__esModule",{value:!0});Gt.sign=Wue;Gt.attest=Jue;Gt.verify=Kue;Gt.createVerifier=Vj;var $I=pu(),Gue=qj(gm()),jI=Nm(),pa=qj($j());async function Wue(i,e={}){let r=await pa.createBundleBuilder("messageSignature",e).create({data:i});return(0,$I.bundleToJSON)(r)}o(Wue,"sign");async function Jue(i,e,t={}){let s=await pa.createBundleBuilder("dsseEnvelope",t).create({data:i,type:e});return(0,$I.bundleToJSON)(s)}o(Jue,"attest");async function Kue(i,e,t){let r;return Buffer.isBuffer(e)?r=e:t=e,Vj(t).then(s=>s.verify(i,r))}o(Kue,"verify");async function Vj(i={}){let e=await Gue.getTrustedRoot({mirrorURL:i.tufMirrorURL,rootPath:i.tufRootPath,cachePath:i.tufCachePath,forceCache:i.tufForceCache,retry:i.retry??pa.DEFAULT_RETRY,timeout:i.timeout??pa.DEFAULT_TIMEOUT}),t=i.keySelector?pa.createKeyFinder(i.keySelector):void 0,r=(0,jI.toTrustMaterial)(e,t),s={ctlogThreshold:i.ctLogThreshold,tlogThreshold:i.tlogThreshold},n=new jI.Verifier(r,s),a=pa.createVerificationPolicy(i);return{verify:o((c,u)=>{let l=(0,$I.bundleFromJSON)(c),h=(0,jI.toSignedEntity)(l,u);n.verify(h,a)},"verify")}}o(Vj,"createVerifier")});var Gj=d(ue=>{"use strict";Object.defineProperty(ue,"__esModule",{value:!0});ue.verify=ue.sign=ue.createVerifier=ue.attest=ue.VerificationError=ue.PolicyError=ue.TUFError=ue.InternalError=ue.DEFAULT_REKOR_URL=ue.DEFAULT_FULCIO_URL=ue.ValidationError=void 0;var Zue=pu();Object.defineProperty(ue,"ValidationError",{enumerable:!0,get:o(function(){return Zue.ValidationError},"get")});var qI=t0();Object.defineProperty(ue,"DEFAULT_FULCIO_URL",{enumerable:!0,get:o(function(){return qI.DEFAULT_FULCIO_URL},"get")});Object.defineProperty(ue,"DEFAULT_REKOR_URL",{enumerable:!0,get:o(function(){return qI.DEFAULT_REKOR_URL},"get")});Object.defineProperty(ue,"InternalError",{enumerable:!0,get:o(function(){return qI.InternalError},"get")});var Yue=gm();Object.defineProperty(ue,"TUFError",{enumerable:!0,get:o(function(){return Yue.TUFError},"get")});var Hj=Nm();Object.defineProperty(ue,"PolicyError",{enumerable:!0,get:o(function(){return Hj.PolicyError},"get")});Object.defineProperty(ue,"VerificationError",{enumerable:!0,get:o(function(){return Hj.VerificationError},"get")});var Pm=zj();Object.defineProperty(ue,"attest",{enumerable:!0,get:o(function(){return Pm.attest},"get")});Object.defineProperty(ue,"createVerifier",{enumerable:!0,get:o(function(){return Pm.createVerifier},"get")});Object.defineProperty(ue,"sign",{enumerable:!0,get:o(function(){return Pm.sign},"get")});Object.defineProperty(ue,"verify",{enumerable:!0,get:o(function(){return Pm.verify},"get")})});var GI=d((TOe,Yj)=>{var Xue=require("node:crypto"),Wj=nh(),Que=ih(),VI=hi(),ele=Hn(),tle=Gj(),zI=K_(),ile=Fs(),rle=hu(),Jj=Z_().version,Kj=lw(),Zj=ks(),sle="application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*",nle="application/json",ole="2015-01-01T00:00:00.000Z",HI=class extends ile{static{o(this,"RegistryFetcher")}#e;constructor(e,t){super(e,t),this.packumentCache=this.opts.packumentCache||null,this.registry=zI.pickRegistry(e,t),this.packumentUrl=`${Kj(this.registry)}/${this.spec.escapedName}`,this.#e=`${this.fullMetadata?"full":"corgi"}:${this.packumentUrl}`;let r=new URL(this.registry),s=`//${r.host}${r.pathname}`;this.opts[`${s}:_keys`]&&(this.registryKeys=this.opts[`${s}:_keys`])}async resolve(){if(await this.manifest(),!this.resolved)throw Object.assign(new Error("Invalid package manifest: no `dist.tarball` field"),{package:this.spec.toString()});return this.resolved}#t(){return{"user-agent":this.opts.userAgent||`pacote/${Jj} node/${process.version}`,...this.opts.headers||{},"pacote-version":Jj,"pacote-req-type":"packument","pacote-pkg-id":`registry:${this.spec.name}`,accept:this.fullMetadata?nle:sle}}async packument(){if(this.packumentCache?.has(this.#e))return this.packumentCache.get(this.#e);try{let e=await zI(this.packumentUrl,{...this.opts,headers:this.#t(),spec:this.spec,integrity:null}),t=await e.json(),r=e.headers.get("content-length");return r&&(t._contentLength=Number(r)),this.packumentCache?.set(this.#e,t),t}catch(e){if(this.packumentCache?.delete(this.#e),e.code!=="E404"||this.fullMetadata)throw e;return this.fullMetadata=!0,this.packument()}}async manifest(){if(this.package)return this.package;this.opts.verifySignatures&&(this.fullMetadata=!0);let e=await this.packument(),t=Wj.normalizeSteps.filter(a=>a!=="_attributes"),r=await new Wj().fromContent(Que(e,this.spec.fetchSpec,{...this.opts,defaultTag:this.defaultTag,before:this.before})).normalize({steps:t}).then(a=>a.content),s=e.time?.[r.version];s&&(r._time=s);let{dist:n}=r;if(n){this.resolved=r._resolved=n.tarball,r._from=this.from;let a=n.integrity?VI.parse(n.integrity):n.shasum?VI.fromHex(n.shasum,"sha1",{...this.opts}):null;if(a){if(this.integrity&&!this.integrity.match(a)){for(let c of Object.keys(this.integrity))if(a[c])throw Object.assign(new Error(`Integrity checksum failed when using ${c}: wanted ${this.integrity} but got ${a}.`),{code:"EINTEGRITY"})}this.integrity=a}}if(this.integrity){if(r._integrity=String(this.integrity),n.signatures)if(this.opts.verifySignatures){let a=`${r._id}:${r._integrity}`;for(let c of n.signatures){let u=this.registryKeys&&this.registryKeys.filter(m=>m.keyid===c.keyid)[0];if(!u)throw Object.assign(new Error(`${r._id} has a registry signature with keyid: ${c.keyid} but no corresponding public key can be found`),{code:"EMISSINGSIGNATUREKEY"});let l=Date.parse(r._time||ole);if(!(!u.expires||l<Date.parse(u.expires)))throw Object.assign(new Error(`${r._id} has a registry signature with keyid: ${c.keyid} but the corresponding public key has expired ${u.expires}`),{code:"EEXPIREDSIGNATUREKEY"});let f=Xue.createVerify("SHA256");if(f.write(a),f.end(),!f.verify(u.pemkey,c.sig,"base64"))throw Object.assign(new Error(`${r._id} has an invalid registry signature with keyid: ${u.keyid} and signature: ${c.sig}`),{code:"EINTEGRITYSIGNATURE",keyid:u.keyid,signature:c.sig,resolved:r._resolved,integrity:r._integrity})}r._signatures=n.signatures}else r._signatures=n.signatures;if(n.attestations)if(this.opts.verifyAttestations){let a=new URL(n.attestations.url).pathname,c=Kj(this.registry)+a,u=await zI(c,{...this.opts,integrity:null}),{attestations:l}=await u.json(),h=l.map(({predicateType:m,bundle:y})=>{let g=JSON.parse(Buffer.from(y.dsseEnvelope.payload,"base64").toString("utf8")),S=y.dsseEnvelope.signatures[0].keyid,E=y.dsseEnvelope.signatures[0].sig;return{predicateType:m,bundle:y,statement:g,keyid:S,signature:E}}),f=h.map(m=>m.keyid).filter(m=>!!m),p=(this.registryKeys||[]).filter(m=>f.includes(m.keyid));if(!p.length)throw Object.assign(new Error(`${r._id} has attestations but no corresponding public key(s) can be found`),{code:"EMISSINGSIGNATUREKEY"});for(let{predicateType:m,bundle:y,keyid:g,signature:S,statement:E}of h){let _=p.find(v=>v.keyid===g);if(g){if(!_)throw Object.assign(new Error(`${r._id} has attestations with keyid: ${g} but no corresponding public key can be found`),{code:"EMISSINGSIGNATUREKEY"});let v=new Date(Number(y.verificationMaterial.tlogEntries[0].integratedTime)*1e3);if(!(!_.expires||v<Date.parse(_.expires)))throw Object.assign(new Error(`${r._id} has attestations with keyid: ${g} but the corresponding public key has expired ${_.expires}`),{code:"EEXPIREDSIGNATUREKEY"})}let b={name:E.subject[0].name,sha512:E.subject[0].digest.sha512},w=this.spec.type==="version"?ele.toPurl(this.spec):this.spec;if(b.name!==w)throw Object.assign(new Error(`${r._id} package name and version (PURL): ${w} doesn't match what was signed: ${b.name}`),{code:"EATTESTATIONSUBJECT"});let I=VI.parse(this.integrity).hexDigest();if(b.sha512!==I)throw Object.assign(new Error(`${r._id} package integrity (hex digest): ${I} doesn't match what was signed: ${b.sha512}`),{code:"EATTESTATIONSUBJECT"});try{let v={tufCachePath:this.tufCache,tufForceCache:!0,keySelector:_?()=>_.pemkey:void 0};await tle.verify(y,v)}catch(v){throw Object.assign(new Error(`${r._id} failed to verify attestation: ${v.message}`),{code:"EATTESTATIONVERIFY",predicateType:m,keyid:g,signature:S,resolved:r._resolved,integrity:r._integrity})}}r._attestations=n.attestations}else r._attestations=n.attestations}return this.package=r,this.package}[Zj.tarballFromResolved](){return new rle(this.resolved,{...this.opts,resolved:this.resolved,pkgid:`registry:${this.spec.name}@${this.resolved}`})[Zj.tarballFromResolved]()}get types(){return["tag","version","range"]}};Yj.exports=HI});var Fs=d((POe,r2)=>{var{basename:ale,dirname:Xj}=require("node:path"),{rm:cle,mkdir:Qj}=require("node:fs/promises"),t2=nh(),WI=bc(),ule=jn(),lle=HN(),i2=Hn(),hle=qa(),JI=hi(),fle=aw(),{Minipass:dle}=te(),{log:cs}=_t(),qu=ks(),e2=PD(),ple=uw(),mle=lw(),gle=o(i=>t2.prepare(i).then(e=>e.content),"packageJsonPrepare"),yle=o(i=>t2.normalize(i).then(e=>e.content),"packageJsonNormalize"),Dm=class{static{o(this,"FetcherBase")}constructor(e,t){if(!t||typeof t!="object")throw new TypeError("options object is required");this.spec=i2(e,t.where),this.allowGitIgnore=!!t.allowGitIgnore,this.from=this.spec.registry?`${this.spec.name}@${this.spec.rawSpec}`:this.spec.saveSpec,this.#i(),this.opts={...t},this.cache=t.cache||e2().cacache,this.tufCache=t.tufCache||e2().tufcache,this.resolved=t.resolved||null,this.defaultIntegrityAlgorithm=t.defaultIntegrityAlgorithm||"sha512",typeof t.integrity=="string"&&(this.opts.integrity=JI.parse(t.integrity)),this.package=null,this.type=this.constructor.name,this.fmode=t.fmode||438,this.dmode=t.dmode||511,this.umask=t.umask||0,this.preferOnline=!!t.preferOnline,this.preferOffline=!!t.preferOffline,this.offline=!!t.offline,this.before=t.before,this.fullMetadata=this.before?!0:!!t.fullMetadata,this.fullReadJson=!!t.fullReadJson,this[qu.readPackageJson]=this.fullReadJson?gle:yle,this.replaceRegistryHost=!t.replaceRegistryHost||t.replaceRegistryHost==="npmjs"?"registry.npmjs.org":t.replaceRegistryHost,this.defaultTag=t.defaultTag||"latest",this.registry=mle(t.registry||"https://registry.npmjs.org"),this.npmBin=t.npmBin||"npm",this.npmInstallCmd=t.npmInstallCmd||["install","--force"],this.npmCliConfig=t.npmCliConfig||[`--cache=${Xj(this.cache)}`,`--prefer-offline=${!!this.preferOffline}`,`--prefer-online=${!!this.preferOnline}`,`--offline=${!!this.offline}`,...this.before?[`--before=${this.before.toISOString()}`]:[],"--no-progress","--no-save","--no-audit","--include=dev","--include=peer","--include=optional","--no-package-lock-only","--no-dry-run"]}get integrity(){return this.opts.integrity||null}set integrity(e){if(!e)return;e=JI.parse(e);let t=this.opts.integrity;t?t.merge(e):this.opts.integrity=e}get notImplementedError(){return new Error("not implemented in this fetcher type: "+this.type)}resolve(){return this.resolved?Promise.resolve(this.resolved):Promise.reject(this.notImplementedError)}packument(){return Promise.reject(this.notImplementedError)}manifest(){return Promise.reject(this.notImplementedError)}[qu.tarballFromResolved](){throw this.notImplementedError}tarball(){return this.tarballStream(e=>e.concat().then(t=>(t.integrity=this.integrity&&String(this.integrity),t.resolved=this.resolved,t.from=this.from,t)))}#e(){let e=Date.now(),t=WI.get.stream.byDigest(this.cache,this.integrity,this.opts),r=Date.now()-e;return cs.http("cache",`${this.spec} ${r}ms (cache hit)`),t}get[qu.cacheFetches](){return!0}#t(e){if(!this.opts.cache||!this[qu.cacheFetches]){if(e.hasIntegrityEmitter)return e.on("integrity",n=>this.integrity=n),e;let s=JI.integrityStream(this.opts);return s.on("integrity",n=>this.integrity=n),e.on("error",n=>s.emit("error",n)),e.pipe(s)}let t=new dle;e.on("error",s=>t.emit("error",s)),e.pipe(t,{end:!1});let r=WI.put.stream(this.opts.cache,`pacote:tarball:${this.from}`,this.opts);return r.on("integrity",s=>this.integrity=s),r.on("error",s=>e.emit("error",s)),e.pipe(r),r.promise().catch(()=>{}).then(()=>t.end()),t}pickIntegrityAlgorithm(){return this.integrity?this.integrity.pickAlgorithm(this.opts):this.defaultIntegrityAlgorithm}isDataCorruptionError(e){return e.code==="EINTEGRITY"||e.code==="Z_DATA_ERROR"}get types(){return!1}#i(){if(this.types&&!this.types.includes(this.spec.type))throw new TypeError(`Wrong spec type (${this.spec.type}) for ${this.constructor.name}. Supported types: ${this.types.join(", ")}`)}isRetriableError(e){return this.isDataCorruptionError(e)||e.code==="ENOENT"||e.code==="EISDIR"}tarballStream(e){let t=!this.preferOnline&&this.integrity&&this.resolved?e(this.#e()).catch(s=>{if(this.isDataCorruptionError(s))return cs.warn("tarball",`cached data for ${this.spec} (${this.integrity}) seems to be corrupted. Refreshing cache.`),this.cleanupCached().then(()=>{throw s});throw s}):null,r=o(s=>{if(s){if(!this.isRetriableError(s))throw s;cs.silly("tarball",`no local data for ${this.spec}. Extracting by manifest.`)}return this.resolve().then(()=>hle(n=>e(this.#t(this[qu.tarballFromResolved]())).catch(a=>{if(this.isRetriableError(a))return cs.warn("tarball",`tarball data for ${this.spec} (${this.integrity}) seems to be corrupted. Trying again.`),this.cleanupCached().then(()=>n(a));throw a}),{retries:1,minTimeout:0,maxTimeout:0}))},"fromResolved");return t?t.catch(r):r()}cleanupCached(){return WI.rm.content(this.cache,this.integrity,this.opts)}#r(e){return lle({path:e,depth:1}).then(t=>Promise.all(t.map(r=>cle(r,{recursive:!0,force:!0}))))}async#s(e){return await this.#r(e),await Qj(e,{recursive:!0})}async extract(e){return await this.#s(e),this.tarballStream(t=>this.#c(e,t))}#u(e){return this.tarballStream(t=>new Promise((r,s)=>{let n=new ule.WriteStream(e);t.on("error",a=>n.emit("error",a)),n.on("error",a=>s(a)),n.on("close",()=>r({integrity:this.integrity&&String(this.integrity),resolved:this.resolved,from:this.from})),t.pipe(n)}))}async tarballFile(e){let t=Xj(e);return await Qj(t,{recursive:!0}),this.#u(e)}#c(e,t){let r=fle.x(this.#n({cwd:e})),s=new Promise((n,a)=>{r.on("end",()=>{n({resolved:this.resolved,integrity:this.integrity&&String(this.integrity),from:this.from})}),r.on("error",c=>{cs.warn("tar",c.message),cs.silly("tar",c),a(c)}),t.on("error",c=>a(c))});return t.pipe(r),s}#f(e,t,r){let s=/Directory|GNUDumpDir/.test(r)?this.dmode:/File$/.test(r)?this.fmode:0,n=ple(this.package,e)?73:0;return(t|s)&~this.umask|n|384}#n({cwd:e}){let t=new Set;return{cwd:e,noChmod:!0,noMtime:!0,filter:o((r,s)=>{if(/Link$/.test(s.type))return!1;if(s.mode=this.#f(s.path,s.mode,s.type),/File$/.test(s.type)){let n=ale(s.path);if(n===".npmignore")t.add(s.path);else if(n===".gitignore"&&!this.allowGitIgnore){let a=s.path.replace(/\.gitignore$/,".npmignore");if(t.has(a))return!1;s.path=a}return!0}},"filter"),strip:1,onwarn:o((r,s,n)=>{cs.warn("tar",r,s),cs.silly("tar",r,s,n)},"onwarn"),umask:this.umask,preserveOwner:!1}}};r2.exports=Dm;var Sle=Q_(),Ele=GI(),wle=Eo(),_le=Kf(),ble=hu();Dm.get=(i,e={})=>{let t=i2(i,e.where);switch(t.type){case"git":return new Sle(t,e);case"remote":return new ble(t,e);case"version":case"range":case"tag":case"alias":return new Ele(t.subSpec||t,e);case"file":return new wle(t,e);case"directory":return new _le(t,e);default:throw new TypeError("Unknown spec type: "+t.type)}}});var{get:dn}=Fs(),Ile=Q_(),Ole=GI(),vle=Eo(),Cle=Kf(),Rle=hu(),KI=o((i,e)=>dn(i,e).tarball(),"tarball");KI.stream=(i,e,t)=>dn(i,t).tarballStream(e);KI.file=(i,e,t)=>dn(i,t).tarballFile(e);module.exports={GitFetcher:Ile,RegistryFetcher:Ole,FileFetcher:vle,DirFetcher:Cle,RemoteFetcher:Rle,resolve:o((i,e)=>dn(i,e).resolve(),"resolve"),extract:o((i,e,t)=>dn(i,t).extract(e),"extract"),manifest:o((i,e)=>dn(i,e).manifest(),"manifest"),packument:o((i,e)=>dn(i,e).packument(),"packument"),tarball:KI};
67
+ /*! Bundled license information:
68
+
69
+ imurmurhash/imurmurhash.js:
70
+ (**
71
+ * @preserve
72
+ * JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013)
73
+ *
74
+ * @author <a href="mailto:jensyt@gmail.com">Jens Taylor</a>
75
+ * @see http://github.com/homebrewing/brauhaus-diff
76
+ * @author <a href="mailto:gary.court@gmail.com">Gary Court</a>
77
+ * @see http://github.com/garycourt/murmurhash-js
78
+ * @author <a href="mailto:aappleby@gmail.com">Austin Appleby</a>
79
+ * @see http://sites.google.com/site/murmurhash/
80
+ *)
81
+
82
+ negotiator/index.js:
83
+ (*!
84
+ * negotiator
85
+ * Copyright(c) 2012 Federico Romero
86
+ * Copyright(c) 2012-2014 Isaac Z. Schlueter
87
+ * Copyright(c) 2015 Douglas Christopher Wilson
88
+ * MIT Licensed
89
+ *)
90
+
91
+ make-fetch-happen/lib/fetch.js:
92
+ (**
93
+ * @license
94
+ * Copyright (c) 2010-2012 Mikeal Rogers
95
+ * Licensed under the Apache License, Version 2.0 (the "License");
96
+ * you may not use this file except in compliance with the License.
97
+ * You may obtain a copy of the License at
98
+ * http://www.apache.org/licenses/LICENSE-2.0
99
+ * Unless required by applicable law or agreed to in writing,
100
+ * software distributed under the License is distributed on an "AS
101
+ * IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
102
+ * express or implied. See the License for the specific language
103
+ * governing permissions and limitations under the License.
104
+ *)
105
+ */