@shopify/cli 4.0.0 → 4.2.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 (392) hide show
  1. package/README.md +2 -2
  2. package/dist/analytics-CX22YIUZ.js +1 -0
  3. package/dist/analytics-UBWQIQYF.js +1 -0
  4. package/dist/angular-UTTM4Y4S.js +4 -0
  5. package/dist/bootstrap.js +1 -1
  6. package/dist/{chunk-DU4WR4OP.js → chunk-23AMFHXC.js} +1 -1
  7. package/dist/{chunk-LNHLDRC5.js → chunk-2EJCY4CE.js} +1 -1
  8. package/dist/{chunk-YMWHHINU.js → chunk-2KH2S7PI.js} +1 -1
  9. package/dist/chunk-2N4O33VM.js +6 -0
  10. package/dist/{chunk-WZBSLU4Q.js → chunk-2VLMN5QZ.js} +1 -1
  11. package/dist/chunk-2WNODIWJ.js +1 -0
  12. package/dist/chunk-2YXKZWYW.js +1 -0
  13. package/dist/{chunk-GFJ7UV74.js → chunk-3BRUCKZ2.js} +1 -1
  14. package/dist/{chunk-RM5SJJN6.js → chunk-3V63X7WZ.js} +66 -66
  15. package/dist/chunk-3YWUSKWF.js +159 -0
  16. package/dist/chunk-42RMKTCJ.js +8 -0
  17. package/dist/{chunk-V2CNCPIE.js → chunk-4EXYYBQ6.js} +1 -1
  18. package/dist/chunk-4KRT35A2.js +1 -0
  19. package/dist/chunk-4V4DQ6W7.js +836 -0
  20. package/dist/chunk-4Z2WYNTE.js +1 -0
  21. package/dist/chunk-57N2DFIF.js +1 -0
  22. package/dist/chunk-5TIJLYZU.js +3 -0
  23. package/dist/{chunk-GNPS5SBU.js → chunk-6AJZKIZ3.js} +1 -1
  24. package/dist/{chunk-XNO6DZYP.js → chunk-6HZTMQD6.js} +1 -1
  25. package/dist/chunk-6LK6ZP3Q.js +1 -0
  26. package/dist/chunk-6SXOUZ7V.js +1 -0
  27. package/dist/chunk-6TEXPRI2.js +2 -0
  28. package/dist/{chunk-OUOYKNMY.js → chunk-6TORWTD7.js} +1 -1
  29. package/dist/{chunk-IASVAERO.js → chunk-6YAXFS6V.js} +1 -1
  30. package/dist/chunk-6YHJ554P.js +6 -0
  31. package/dist/chunk-6ZIOYXEF.js +3 -0
  32. package/dist/chunk-7BFDUVOG.js +1 -0
  33. package/dist/chunk-7DVOSOEP.js +11 -0
  34. package/dist/chunk-7JESXDF2.js +14 -0
  35. package/dist/chunk-7KJ5TBWG.js +5 -0
  36. package/dist/{chunk-7MUKLZOL.js → chunk-A3VYI4LO.js} +2 -2
  37. package/dist/{chunk-4HHXSMD7.js → chunk-A5SQCM63.js} +2 -2
  38. package/dist/chunk-A6X2IVGT.js +4 -0
  39. package/dist/{chunk-HUZUORYM.js → chunk-AP3RFOPL.js} +10 -10
  40. package/dist/{chunk-3LVGAQB4.js → chunk-ATPFTRCC.js} +1 -1
  41. package/dist/chunk-AWQ5AR2K.js +5 -0
  42. package/dist/chunk-BECEP46I.js +16 -0
  43. package/dist/{chunk-JPGO36XP.js → chunk-BHWEA4V2.js} +1 -1
  44. package/dist/chunk-BPVZ7E63.js +1 -0
  45. package/dist/chunk-C2FFA4O4.js +1 -0
  46. package/dist/chunk-C3LZPAAH.js +3 -0
  47. package/dist/chunk-C6ABJCRG.js +1 -0
  48. package/dist/chunk-CCEA5CUX.js +1 -0
  49. package/dist/chunk-CE6FKJFS.js +1 -0
  50. package/dist/chunk-CW7WJZKR.js +28 -0
  51. package/dist/chunk-D3DDLLNF.js +2 -0
  52. package/dist/chunk-D656BV5Z.js +25 -0
  53. package/dist/chunk-DCBYHVKW.js +1 -0
  54. package/dist/{chunk-RF2DPBA6.js → chunk-DCK2FX6J.js} +1 -1
  55. package/dist/chunk-DERA4K6A.js +32 -0
  56. package/dist/chunk-DNLOSMHL.js +3 -0
  57. package/dist/chunk-E2YBU6D3.js +294 -0
  58. package/dist/{chunk-INEU4XKS.js → chunk-F47MFBKM.js} +1 -1
  59. package/dist/chunk-F6T3UBBL.js +1 -0
  60. package/dist/{chunk-WXVZJJOR.js → chunk-FBVBO5YQ.js} +1 -1
  61. package/dist/chunk-FD5S2O6M.js +7 -0
  62. package/dist/chunk-FFYYJKF7.js +1 -0
  63. package/dist/{chunk-LX3ZOW52.js → chunk-FGVC22EY.js} +1 -1
  64. package/dist/{chunk-NRAFVIU3.js → chunk-FP2NOZSD.js} +1 -1
  65. package/dist/chunk-FQDRVPCY.js +2 -0
  66. package/dist/{chunk-IOLVEXM6.js → chunk-FSTCEWXX.js} +1 -1
  67. package/dist/chunk-FTN7Y6HD.js +7 -0
  68. package/dist/{chunk-52GC6XUT.js → chunk-GVITHCQJ.js} +1 -1
  69. package/dist/chunk-H4W4DFKK.js +1 -0
  70. package/dist/{chunk-72F3YBNA.js → chunk-HD5TYIDZ.js} +1 -1
  71. package/dist/chunk-HHXHOQQP.js +3 -0
  72. package/dist/chunk-HJSYHK4S.js +8 -0
  73. package/dist/chunk-HLMFVORT.js +1 -0
  74. package/dist/chunk-HSYRYSX4.js +3 -0
  75. package/dist/chunk-I3LX25MB.js +1 -0
  76. package/dist/chunk-INFBVFMU.js +4 -0
  77. package/dist/chunk-IOQQUHST.js +18 -0
  78. package/dist/chunk-IVGWFPMA.js +19 -0
  79. package/dist/chunk-IWCPQD7X.js +1382 -0
  80. package/dist/chunk-IWE4RUI7.js +1 -0
  81. package/dist/chunk-IXUVSFW2.js +1 -0
  82. package/dist/chunk-J6VTZEE2.js +15 -0
  83. package/dist/{chunk-MQNYGGAM.js → chunk-K3PGC6DC.js} +1 -1
  84. package/dist/{chunk-MBAFWQSZ.js → chunk-K77WAKOB.js} +1 -1
  85. package/dist/{chunk-UGDBJTLP.js → chunk-K7K6GNF6.js} +1 -1
  86. package/dist/chunk-KFCGMT67.js +1 -0
  87. package/dist/chunk-KLA7AWG6.js +7 -0
  88. package/dist/{chunk-6B53BWJW.js → chunk-KQU6HOJ3.js} +1 -1
  89. package/dist/{chunk-A74GETYC.js → chunk-KU5OPV7U.js} +1 -1
  90. package/dist/chunk-L2VSSINY.js +1 -0
  91. package/dist/chunk-LCCMXY6N.js +1 -0
  92. package/dist/{chunk-GOJ2QHSR.js → chunk-LITB5QQX.js} +1 -1
  93. package/dist/chunk-LKS47US7.js +8 -0
  94. package/dist/{chunk-DJONKJSZ.js → chunk-LQMSF3F7.js} +1 -1
  95. package/dist/chunk-LTWXTDDR.js +5 -0
  96. package/dist/{chunk-D6JARNEH.js → chunk-M2TJICTB.js} +1 -1
  97. package/dist/chunk-M4LOKANA.js +1 -0
  98. package/dist/chunk-M4V2OQAX.js +1 -0
  99. package/dist/chunk-MA52QGHP.js +1 -0
  100. package/dist/chunk-MFLBTJO7.js +1 -0
  101. package/dist/chunk-MGL4YM3S.js +28 -0
  102. package/dist/{chunk-6TZAAS5H.js → chunk-MIO2CV3Q.js} +1 -1
  103. package/dist/{chunk-2APPXD5Z.js → chunk-MKE434RB.js} +1 -1
  104. package/dist/chunk-MZJRNFAU.js +1 -0
  105. package/dist/{chunk-HSK7YMRE.js → chunk-N3YWHJMB.js} +11 -11
  106. package/dist/{chunk-TQYMC7TH.js → chunk-N5ROZKPZ.js} +1 -1
  107. package/dist/chunk-NBYS6YQ2.js +5 -0
  108. package/dist/chunk-NEZEHBT2.js +1 -0
  109. package/dist/chunk-NO5KVFTV.js +22 -0
  110. package/dist/{chunk-3DQIVE24.js → chunk-NP4UFPAX.js} +1 -1
  111. package/dist/chunk-NPM3MFB3.js +7 -0
  112. package/dist/{chunk-JVIKCGDY.js → chunk-NXL6LDJU.js} +1 -1
  113. package/dist/chunk-OA4P6AKS.js +1 -0
  114. package/dist/chunk-OKNBZSGN.js +2 -0
  115. package/dist/chunk-OKOYLEA7.js +278 -0
  116. package/dist/chunk-OLOBQ42K.js +1 -0
  117. package/dist/chunk-OYP7DKPU.js +1 -0
  118. package/dist/{chunk-7UYZQN4V.js → chunk-PBTXPBI6.js} +2 -2
  119. package/dist/chunk-PLQFX5ZP.js +9 -0
  120. package/dist/{chunk-JLBH7RCF.js → chunk-PS25FEBF.js} +1 -1
  121. package/dist/{chunk-OLZHWPZP.js → chunk-PSQFZAF3.js} +1 -1
  122. package/dist/chunk-PUTZFF2Z.js +613 -0
  123. package/dist/chunk-QLQGHMVU.js +15 -0
  124. package/dist/{chunk-XLELNRFF.js → chunk-QTGMS62F.js} +1 -1
  125. package/dist/chunk-R6JNXEB3.js +1 -0
  126. package/dist/chunk-RAH5NW3R.js +1 -0
  127. package/dist/{chunk-R466TU3N.js → chunk-RGNAWKD7.js} +1 -1
  128. package/dist/chunk-RL5BWZ7D.js +15 -0
  129. package/dist/{chunk-Y5JKV2AI.js → chunk-RVMB5LC2.js} +1 -1
  130. package/dist/chunk-SSM346XI.js +5 -0
  131. package/dist/chunk-T5MK7ZSF.js +1 -0
  132. package/dist/{chunk-22PCRFG4.js → chunk-TGACBJIY.js} +1 -1
  133. package/dist/{chunk-KBQ4LGFB.js → chunk-TLSAQ6FG.js} +1 -1
  134. package/dist/chunk-TNQXTZAX.js +32 -0
  135. package/dist/{chunk-ELVFJ7BR.js → chunk-TQGTEVSR.js} +1 -1
  136. package/dist/chunk-TXUTT6UA.js +17 -0
  137. package/dist/chunk-U3ZG675O.js +5 -0
  138. package/dist/chunk-UARVYVLN.js +3 -0
  139. package/dist/chunk-UBKVCI7A.js +3 -0
  140. package/dist/{chunk-SRCQVUMC.js → chunk-UCLSPAVX.js} +1 -1
  141. package/dist/chunk-ULQG3XQS.js +1 -0
  142. package/dist/chunk-UOQ75BL3.js +1 -0
  143. package/dist/{chunk-OXPWCC7I.js → chunk-UOQQNAHX.js} +2 -2
  144. package/dist/chunk-UURFVUAH.js +11 -0
  145. package/dist/chunk-VA5IUGZV.js +2 -0
  146. package/dist/{chunk-YZDDTYTU.js → chunk-VEDZUOVI.js} +3 -3
  147. package/dist/chunk-VICNWPLQ.js +567 -0
  148. package/dist/chunk-VPL2NDH6.js +370 -0
  149. package/dist/chunk-VT77EFRL.js +10 -0
  150. package/dist/chunk-VYXVYOIJ.js +3 -0
  151. package/dist/chunk-WCWNI3ZV.js +283 -0
  152. package/dist/chunk-WNGV4JQS.js +4 -0
  153. package/dist/chunk-WUK5NQSX.js +6 -0
  154. package/dist/chunk-X2TC7S57.js +103 -0
  155. package/dist/chunk-X4CV6TRE.js +1 -0
  156. package/dist/chunk-XDAOLCPN.js +4 -0
  157. package/dist/chunk-XFKCDWXB.js +5 -0
  158. package/dist/chunk-XP6IRAZN.js +1 -0
  159. package/dist/{chunk-JGXWQULI.js → chunk-XX343DDG.js} +1 -1
  160. package/dist/{chunk-Q7ING5F5.js → chunk-XXE7667M.js} +1 -1
  161. package/dist/chunk-YGMVL6NZ.js +6 -0
  162. package/dist/chunk-YJB7P2HC.js +1 -0
  163. package/dist/{chunk-P6XE4MH5.js → chunk-YS6VOQ7I.js} +1 -1
  164. package/dist/chunk-ZZYFG22L.js +26 -0
  165. package/dist/cli/commands/app/app-logs/sources.js +1 -2
  166. package/dist/cli/commands/app/build.js +1 -1
  167. package/dist/cli/commands/app/bulk/cancel.js +1 -1
  168. package/dist/cli/commands/app/bulk/execute.js +1 -9
  169. package/dist/cli/commands/app/bulk/status.js +1 -5
  170. package/dist/cli/commands/app/config/link.js +1 -4
  171. package/dist/cli/commands/app/config/pull.js +1 -1
  172. package/dist/cli/commands/app/config/use.js +1 -1
  173. package/dist/cli/commands/app/config/validate.js +1 -3
  174. package/dist/cli/commands/app/demo/watcher.js +1 -1
  175. package/dist/cli/commands/app/deploy.js +1 -22
  176. package/dist/cli/commands/app/dev/clean.js +1 -5
  177. package/dist/cli/commands/app/dev.js +1 -320
  178. package/dist/cli/commands/app/env/pull.js +1 -11
  179. package/dist/cli/commands/app/env/show.js +1 -1
  180. package/dist/cli/commands/app/execute.js +1 -1
  181. package/dist/cli/commands/app/function/build.js +1 -1
  182. package/dist/cli/commands/app/function/info.js +1 -16
  183. package/dist/cli/commands/app/function/replay.js +1 -5
  184. package/dist/cli/commands/app/function/run.js +1 -1
  185. package/dist/cli/commands/app/function/schema.js +1 -1
  186. package/dist/cli/commands/app/function/typegen.js +1 -1
  187. package/dist/cli/commands/app/generate/extension.js +1 -5
  188. package/dist/cli/commands/app/import-custom-data-definitions.js +1 -4
  189. package/dist/cli/commands/app/import-extensions.js +1 -1
  190. package/dist/cli/commands/app/info.js +1 -11
  191. package/dist/cli/commands/app/init.js +1 -10
  192. package/dist/cli/commands/app/logs.js +1 -2
  193. package/dist/cli/commands/app/release.js +1 -4
  194. package/dist/cli/commands/app/versions/list.js +1 -1
  195. package/dist/cli/commands/app/webhook/trigger.js +1 -25
  196. package/dist/cli/commands/auth/login.js +1 -1
  197. package/dist/cli/commands/auth/logout.js +1 -1
  198. package/dist/cli/commands/cache/clear.js +1 -1
  199. package/dist/cli/commands/config/autoupgrade/off.js +1 -1
  200. package/dist/cli/commands/config/autoupgrade/on.js +1 -1
  201. package/dist/cli/commands/config/autoupgrade/status.js +1 -1
  202. package/dist/cli/commands/debug/command-flags.js +1 -1
  203. package/dist/cli/commands/docs/generate.d.ts +0 -8
  204. package/dist/cli/commands/docs/generate.js +1 -1
  205. package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
  206. package/dist/cli/commands/doctor-release/theme/index.js +1 -1
  207. package/dist/cli/commands/help.js +1 -1
  208. package/dist/cli/commands/kitchen-sink/async.js +1 -1
  209. package/dist/cli/commands/kitchen-sink/index.js +1 -1
  210. package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
  211. package/dist/cli/commands/kitchen-sink/static.js +1 -1
  212. package/dist/cli/commands/notifications/generate.js +1 -1
  213. package/dist/cli/commands/notifications/list.js +1 -1
  214. package/dist/cli/commands/organization/list.js +1 -1
  215. package/dist/cli/commands/search.js +1 -1
  216. package/dist/cli/commands/theme/check.js +1 -1
  217. package/dist/cli/commands/theme/console.js +1 -15
  218. package/dist/cli/commands/theme/delete.js +1 -7
  219. package/dist/cli/commands/theme/dev.js +1 -26
  220. package/dist/cli/commands/theme/duplicate.js +1 -32
  221. package/dist/cli/commands/theme/info.js +1 -1
  222. package/dist/cli/commands/theme/init.js +1 -8
  223. package/dist/cli/commands/theme/language-server.js +1 -1
  224. package/dist/cli/commands/theme/list.js +1 -1
  225. package/dist/cli/commands/theme/metafields/pull.js +1 -3
  226. package/dist/cli/commands/theme/open.js +1 -8
  227. package/dist/cli/commands/theme/package.js +1 -7
  228. package/dist/cli/commands/theme/preview.js +1 -1
  229. package/dist/cli/commands/theme/profile.js +1 -3
  230. package/dist/cli/commands/theme/publish.js +1 -7
  231. package/dist/cli/commands/theme/pull.js +1 -3
  232. package/dist/cli/commands/theme/push.js +1 -28
  233. package/dist/cli/commands/theme/rename.js +1 -6
  234. package/dist/cli/commands/theme/share.js +1 -3
  235. package/dist/cli/commands/upgrade.js +1 -1
  236. package/dist/cli/commands/version.js +1 -1
  237. package/dist/command-registry.js +1 -1
  238. package/dist/conf-store-6QNH5BID.js +1 -0
  239. package/dist/configs/all.yml +3 -0
  240. package/dist/configs/recommended.yml +3 -0
  241. package/dist/{custom-oclif-loader-DVFFWCBV.js → custom-oclif-loader-TSPWW5YF.js} +1 -1
  242. package/dist/data/filters.json +60 -0
  243. package/dist/data/latest.json +1 -1
  244. package/dist/data/setting.json +29 -9
  245. package/dist/data/shopify_system_translations.json +71 -19
  246. package/dist/data/tags.json +3 -3
  247. package/dist/deprecations-F6JWVV2W.js +1 -0
  248. package/dist/{devtools-OLOT2NY4.js → devtools-HCKYP7DQ.js} +1 -1
  249. package/dist/{devtools-UFRKBFGI.js → devtools-VEZNCV6W.js} +1 -1
  250. package/dist/dist-4BD6KOLR.js +1 -0
  251. package/dist/dist-AUABCVPI.js +1 -0
  252. package/dist/environments-RGLI75HN.js +1 -0
  253. package/dist/error-OZALZZ3U.js +1 -0
  254. package/dist/error-handler-V7LSEXHM.js +1 -0
  255. package/dist/{estree-KI7NUW53.js → estree-BYYJYS3A.js} +1 -1
  256. package/dist/fs-YMUQ6JLE.js +1 -0
  257. package/dist/hooks/app-init.js +1 -1
  258. package/dist/hooks/did-you-mean.js +1 -1
  259. package/dist/hooks/hydrogen-init.js +1 -1
  260. package/dist/hooks/plugin-plugins.js +1 -1
  261. package/dist/hooks/postrun.js +1 -1
  262. package/dist/hooks/prerun.js +1 -1
  263. package/dist/hooks/public-metadata.js +1 -1
  264. package/dist/hooks/sensitive-metadata.js +1 -1
  265. package/dist/hooks/tunnel-provider.js +1 -1
  266. package/dist/hooks/tunnel-start.js +1 -1
  267. package/dist/html-HETICZ2F.js +25 -0
  268. package/dist/index.js +9 -1182
  269. package/dist/is-global-BLIZ57HQ.js +1 -0
  270. package/dist/is-wsl-TN2CXYI7.js +1 -0
  271. package/dist/{latest-version-EFWBOTWM.js → latest-version-6OAYLOBL.js} +1 -1
  272. package/dist/{lib-QB6I6CTC.js → lib-AK5EOIKR.js} +1 -1
  273. package/dist/{lib-C3VO2BQW.js → lib-LVUMLZ4H.js} +1 -1
  274. package/dist/lib-ME6554NA.js +1 -0
  275. package/dist/local-GPDAXHE6.js +1 -0
  276. package/dist/local-storage-P66KJG6I.js +1 -0
  277. package/dist/{markdown-PLKL4IZK.js → markdown-5TVCXM53.js} +1 -1
  278. package/dist/{metadata-UDMOTRS7.js → metadata-TRH25EHU.js} +1 -1
  279. package/dist/{morph-EMYAITFM.js → morph-I35VYPBH.js} +4 -4
  280. package/dist/node-package-manager-GO4ZRTKQ.js +1 -0
  281. package/dist/notifications-system-HM6JZ6WJ.js +1 -0
  282. package/dist/{npa-ICFSA3NL.js → npa-VNALV7XY.js} +1 -1
  283. package/dist/output-7IYOMPSA.js +1 -0
  284. package/dist/{postcss-3FJQPJI2.js → postcss-IIK6CGAW.js} +1 -1
  285. package/dist/{prettier-NVRHEAFO.js → prettier-ZSBNNQTK.js} +1 -1
  286. package/dist/system-X5C4EQQH.js +1 -0
  287. package/dist/tsconfig.tsbuildinfo +1 -1
  288. package/dist/ui-H62CMRLG.js +1 -0
  289. package/dist/upgrade-EEOPH464.js +1 -0
  290. package/dist/version-76NBQR4K.js +1 -0
  291. package/dist/version-IGSEISUA.js +1 -0
  292. package/dist/{workerd-L2EJKIAQ.js → workerd-ST6XJKUN.js} +1 -1
  293. package/oclif.manifest.json +142 -7
  294. package/package.json +14 -11
  295. package/dist/analytics-6IHHYAV6.js +0 -1
  296. package/dist/analytics-KKVP5DT3.js +0 -1
  297. package/dist/angular-VRDO2DBE.js +0 -4
  298. package/dist/chunk-26D72ZNV.js +0 -1
  299. package/dist/chunk-2I4PRX2I.js +0 -1
  300. package/dist/chunk-2VQJQ36C.js +0 -103
  301. package/dist/chunk-323UTVMM.js +0 -1
  302. package/dist/chunk-3F6NZK7S.js +0 -2
  303. package/dist/chunk-4G7J6HIV.js +0 -1
  304. package/dist/chunk-66RJ5T7A.js +0 -102
  305. package/dist/chunk-6BMMB2UO.js +0 -1
  306. package/dist/chunk-6HBRBQAN.js +0 -6
  307. package/dist/chunk-74HYYXXE.js +0 -17
  308. package/dist/chunk-7BGM2GAH.js +0 -1
  309. package/dist/chunk-AIV5RI3X.js +0 -1
  310. package/dist/chunk-AKML26N3.js +0 -7
  311. package/dist/chunk-ALKTLKQ6.js +0 -5
  312. package/dist/chunk-B2EHO7ZC.js +0 -847
  313. package/dist/chunk-B2IVY4V5.js +0 -1
  314. package/dist/chunk-BDVAE5MS.js +0 -28
  315. package/dist/chunk-CERXUPGC.js +0 -14
  316. package/dist/chunk-D3TSJA5S.js +0 -1
  317. package/dist/chunk-DFMQWJQ3.js +0 -3
  318. package/dist/chunk-DJQVNH7P.js +0 -567
  319. package/dist/chunk-ELYP4KFP.js +0 -8
  320. package/dist/chunk-FFQ5EWII.js +0 -294
  321. package/dist/chunk-FUOIGXI4.js +0 -1
  322. package/dist/chunk-GD7FWXJ5.js +0 -2
  323. package/dist/chunk-GFEAKSGV.js +0 -374
  324. package/dist/chunk-IIIVWD4R.js +0 -1
  325. package/dist/chunk-IX5ICOBV.js +0 -7
  326. package/dist/chunk-J3KVONB3.js +0 -6
  327. package/dist/chunk-JHPRFW5B.js +0 -19
  328. package/dist/chunk-K2WUCOQJ.js +0 -32
  329. package/dist/chunk-K5YV6UVF.js +0 -4
  330. package/dist/chunk-KGXQS7LS.js +0 -1
  331. package/dist/chunk-KL5Z3T6L.js +0 -1
  332. package/dist/chunk-KNVM7N3U.js +0 -1
  333. package/dist/chunk-KWJ562F2.js +0 -12
  334. package/dist/chunk-LALIKZPS.js +0 -5
  335. package/dist/chunk-LAZJ47DZ.js +0 -6
  336. package/dist/chunk-LDGAHMS7.js +0 -159
  337. package/dist/chunk-LW7U753G.js +0 -1
  338. package/dist/chunk-LXFJDCNG.js +0 -1
  339. package/dist/chunk-N5YIPQ6J.js +0 -1
  340. package/dist/chunk-N7RBSKYT.js +0 -1
  341. package/dist/chunk-NF2ABOOU.js +0 -1
  342. package/dist/chunk-ODNGDO4H.js +0 -50
  343. package/dist/chunk-OHY4ZL3U.js +0 -2
  344. package/dist/chunk-P5VVOLGV.js +0 -1
  345. package/dist/chunk-P7R7FBY2.js +0 -3
  346. package/dist/chunk-QRRNOVJ3.js +0 -1
  347. package/dist/chunk-RFG5RMPL.js +0 -1
  348. package/dist/chunk-RVNMVBPM.js +0 -1
  349. package/dist/chunk-SBEZBZM7.js +0 -144
  350. package/dist/chunk-SGQ6D3LU.js +0 -15
  351. package/dist/chunk-TFSBQ4RY.js +0 -5
  352. package/dist/chunk-UGXYQ23Y.js +0 -1411
  353. package/dist/chunk-VS3T5YOG.js +0 -264
  354. package/dist/chunk-VWYM4OWK.js +0 -1
  355. package/dist/chunk-VY6SNDKW.js +0 -3
  356. package/dist/chunk-WFXRSKRK.js +0 -1
  357. package/dist/chunk-XBXMPFXM.js +0 -1
  358. package/dist/chunk-YC6G4MHD.js +0 -3
  359. package/dist/chunk-YI232QLS.js +0 -1
  360. package/dist/chunk-ZTMSBSYD.js +0 -1
  361. package/dist/chunk-ZV6NCNI4.js +0 -586
  362. package/dist/chunk-ZVJVDCIM.js +0 -1
  363. package/dist/conf-store-U5ZITKJN.js +0 -1
  364. package/dist/deprecations-TU5UQJVV.js +0 -1
  365. package/dist/dist-2Z5TND4U.js +0 -1
  366. package/dist/dist-GYHFDHKP.js +0 -1
  367. package/dist/environments-Z5PR7DSI.js +0 -1
  368. package/dist/error-IJGNYKZ3.js +0 -1
  369. package/dist/error-handler-WSCGNS2P.js +0 -1
  370. package/dist/fs-5BDEA2KD.js +0 -1
  371. package/dist/html-VSSXOZOQ.js +0 -25
  372. package/dist/is-global-V4ZRHQG2.js +0 -1
  373. package/dist/is-wsl-FVUIXDOK.js +0 -1
  374. package/dist/lib-5L7UKDEK.js +0 -1
  375. package/dist/local-6QPX4GCJ.js +0 -1
  376. package/dist/local-storage-JLXBZVWO.js +0 -1
  377. package/dist/node-package-manager-HAFRYGUM.js +0 -1
  378. package/dist/notifications-system-MP7WDOCS.js +0 -1
  379. package/dist/output-YGMHXEIS.js +0 -1
  380. package/dist/system-KLXD4FXF.js +0 -1
  381. package/dist/ui-GHG3UGB3.js +0 -1
  382. package/dist/upgrade-OPZGPM5J.js +0 -1
  383. package/dist/version-D5PJZIRW.js +0 -1
  384. package/dist/version-KRQBMYCH.js +0 -1
  385. /package/dist/{acorn-LOOAJL3S.js → acorn-QBS5IYTX.js} +0 -0
  386. /package/dist/{babel-URCL33XX.js → babel-JS32NLHY.js} +0 -0
  387. /package/dist/{flow-MLHT7MTJ.js → flow-M3Q2HPQT.js} +0 -0
  388. /package/dist/{glimmer-HAJ4HQCW.js → glimmer-3DEJJGOJ.js} +0 -0
  389. /package/dist/{graphql-F7IHGXDT.js → graphql-A4HHE3MB.js} +0 -0
  390. /package/dist/{meriyah-AYZQ3BGY.js → meriyah-23OZNYWC.js} +0 -0
  391. /package/dist/{typescript-ODJ335NU.js → typescript-YKZ232QT.js} +0 -0
  392. /package/dist/{yaml-BIHS2GQW.js → yaml-SJKIH3VD.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{a as e}from"./chunk-OCOY5MV2.js";import{r as t}from"./chunk-GOJ2QHSR.js";import{b as r}from"./chunk-YZDDTYTU.js";import{u as i}from"./chunk-BDVAE5MS.js";import{g as a}from"./chunk-VPRTJUIN.js";a();var o=class extends r{static{this.summary="Disable automatic upgrades for Shopify CLI."}static{this.descriptionWithMarkdown=`Disable automatic upgrades for Shopify CLI.
1
+ import{a as e}from"./chunk-OCOY5MV2.js";import{r as t}from"./chunk-LITB5QQX.js";import{b as r}from"./chunk-VEDZUOVI.js";import{u as i}from"./chunk-MGL4YM3S.js";import{g as a}from"./chunk-VPRTJUIN.js";a();var o=class extends r{static{this.summary="Disable automatic upgrades for Shopify CLI."}static{this.descriptionWithMarkdown=`Disable automatic upgrades for Shopify CLI.
2
2
 
3
3
  When auto-upgrade is disabled, Shopify CLI won't automatically update. Run \`shopify upgrade\` to update manually.
4
4
 
@@ -0,0 +1 @@
1
+ import{a as b}from"./chunk-T5MK7ZSF.js";import{a as k}from"./chunk-DCK2FX6J.js";import{Fa as N,ga as x}from"./chunk-WCWNI3ZV.js";import{b as C,c as R}from"./chunk-4KRT35A2.js";import{C as y}from"./chunk-MGL4YM3S.js";import{d as v}from"./chunk-BHWEA4V2.js";import{Fb as w,Hb as E,Lb as L,Mb as m,Vb as T,ca as h}from"./chunk-VPL2NDH6.js";import{u as A}from"./chunk-7JESXDF2.js";import{j as u}from"./chunk-IU2ZQ6TE.js";import{g as l}from"./chunk-VPRTJUIN.js";l();l();var M=12;async function S(p,t,o){let n=await p.appVersions(t);if(!n.app)throw new v(`Invalid API Key: ${t.apiKey}`);let a=n.app.appVersions.nodes.map(e=>{let r=e.message??"";return{...e,status:e.status==="active"&&!o?A.green(`\u2605 ${e.status}`):e.status,createdBy:e.createdBy?.displayName??"",createdAt:h(new Date(e.createdAt)),message:r}});if(!o){let e=(process.stdout.columns??75)-M,r=e;a.forEach(s=>{let f=s.message.length+(s.versionTag?.length??0)+T(s.status).length+s.createdAt.length+s.createdBy.length;if(f>e){let I=f-s.message.length,g=Math.max(e-I,10);g<r&&(r=g)}}),a.forEach(s=>{s.message.length>r&&(s.message=`${s.message.slice(0,r-3)}...`)})}return{appVersions:a,totalResults:n.app.appVersions.pageInfo.totalResults,app:n.app}}async function c(p){let{remoteApp:t,developerPlatformClient:o,organization:n}=p,{appVersions:a,totalResults:e}=await S(o,t,p.json);if(p.json)return L(JSON.stringify(a,null,2));if(x({org:n.businessName,appName:t.title,configFile:u(p.app.configPath)}),a.length===0){m("No app versions found for this app");return}y({rows:a,columns:{versionTag:{header:"VERSION"},status:{header:"STATUS"},message:{header:"MESSAGE"},createdAt:{header:"DATE CREATED"},createdBy:{header:"CREATED BY"}}});let r=w.link(o.webUiName,[await o.appDeepLink(t),"versions"].join("/"));m(E`\nView all ${String(e)} app versions in the ${r}`)}var d,i=class extends b{async run(){let{flags:t}=await this.parse(d),{app:o,remoteApp:n,developerPlatformClient:a,organization:e}=await N({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config});return await c({app:o,remoteApp:n,organization:e,developerPlatformClient:a,json:t.json}),{app:o}}};d=i;i.summary="List deployed versions of your app.";i.descriptionWithMarkdown="Lists the deployed app versions. An app version is a snapshot of your app extensions.";i.description=d.descriptionWithoutMarkdown();i.flags={...C,...k,...R};var J=i;export{J as a};
@@ -1,4 +1,4 @@
1
- import{b as C}from"./chunk-4HHXSMD7.js";import{b as f}from"./chunk-YZDDTYTU.js";import{A as S,u as i,y as x}from"./chunk-BDVAE5MS.js";import{d as v}from"./chunk-JPGO36XP.js";import{Qb as I}from"./chunk-GFEAKSGV.js";import{g as a}from"./chunk-VPRTJUIN.js";a();a();a();var m={on:"Autocorrect on. The system will automatically run commands even when you mistype them.",off:"Autocorrect off. You'll need to confirm corrections for mistyped commands."};a();function p(o=W()){return!!o.get("autocorrectEnabled")}function y(o,n=W()){n.set("autocorrectEnabled",o)}function W(){return b??(b=new C({projectName:"did-you-mean"})),b}var b;var A,s=class extends f{async run(){y(!0),i({body:m.on})}};A=s;s.summary="Enable autocorrect. Off by default.";s.descriptionWithMarkdown=`Enable autocorrect. Off by default.
1
+ import{b as C}from"./chunk-A5SQCM63.js";import{b as f}from"./chunk-VEDZUOVI.js";import{A as S,u as i,y as x}from"./chunk-MGL4YM3S.js";import{d as v}from"./chunk-BHWEA4V2.js";import{Pb as I}from"./chunk-VPL2NDH6.js";import{g as a}from"./chunk-VPRTJUIN.js";a();a();a();var m={on:"Autocorrect on. The system will automatically run commands even when you mistype them.",off:"Autocorrect off. You'll need to confirm corrections for mistyped commands."};a();function p(o=W()){return!!o.get("autocorrectEnabled")}function y(o,n=W()){n.set("autocorrectEnabled",o)}function W(){return b??(b=new C({projectName:"did-you-mean"})),b}var b;var A,s=class extends f{async run(){y(!0),i({body:m.on})}};A=s;s.summary="Enable autocorrect. Off by default.";s.descriptionWithMarkdown=`Enable autocorrect. Off by default.
2
2
 
3
3
  When autocorrection is enabled, Shopify CLI automatically runs a corrected version of your command if a correction is available.
4
4
 
@@ -0,0 +1,7 @@
1
+ import{a as g,c as E,e as P,g as d}from"./chunk-VPRTJUIN.js";var k=E((vr,ze)=>{"use strict";d();var je=["nodebuffer","arraybuffer","fragments"],Ve=typeof Blob<"u";Ve&&je.push("blob");ze.exports={BINARY_TYPES:je,CLOSE_TIMEOUT:3e4,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:Ve,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var Z=E((wr,ie)=>{"use strict";d();var{EMPTY_BUFFER:Kt}=k(),Se=Buffer[Symbol.species];function Xt(t,e){if(t.length===0)return Kt;if(t.length===1)return t[0];let s=Buffer.allocUnsafe(e),r=0;for(let i=0;i<t.length;i++){let n=t[i];s.set(n,r),r+=n.length}return r<e?new Se(s.buffer,s.byteOffset,r):s}function He(t,e,s,r,i){for(let n=0;n<i;n++)s[r+n]=t[n]^e[n&3]}function Ye(t,e){for(let s=0;s<t.length;s++)t[s]^=e[s&3]}function Zt(t){return t.length===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.length)}function Ee(t){if(Ee.readOnly=!0,Buffer.isBuffer(t))return t;let e;return t instanceof ArrayBuffer?e=new Se(t):ArrayBuffer.isView(t)?e=new Se(t.buffer,t.byteOffset,t.byteLength):(e=Buffer.from(t),Ee.readOnly=!1),e}ie.exports={concat:Xt,mask:He,toArrayBuffer:Zt,toBuffer:Ee,unmask:Ye};if(!process.env.WS_NO_BUFFER_UTIL)try{let t=g("bufferutil");ie.exports.mask=function(e,s,r,i,n){n<48?He(e,s,r,i,n):t.mask(e,s,r,i,n)},ie.exports.unmask=function(e,s){e.length<32?Ye(e,s):t.unmask(e,s)}}catch{}});var Ze=E((Tr,Xe)=>{"use strict";d();var Ke=Symbol("kDone"),ve=Symbol("kRun"),be=class{constructor(e){this[Ke]=()=>{this.pending--,this[ve]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[ve]()}[ve](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[Ke])}}};Xe.exports=be});var $=E((Cr,tt)=>{"use strict";d();var Q=g("zlib"),Qe=Z(),Qt=Ze(),{kStatusCode:Je}=k(),Jt=Buffer[Symbol.species],es=Buffer.from([0,0,255,255]),oe=Symbol("permessage-deflate"),C=Symbol("total-length"),q=Symbol("callback"),B=Symbol("buffers"),G=Symbol("error"),ne,we=class{constructor(e){if(this._options=e||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._maxPayload=this._options.maxPayload|0,this._isServer=!!this._options.isServer,this._deflate=null,this._inflate=null,this.params=null,!ne){let s=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;ne=new Qt(s)}}static get extensionName(){return"permessage-deflate"}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let e=this._deflate[q];this._deflate.close(),this._deflate=null,e&&e(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){let s=this._options,r=e.find(i=>!(s.serverNoContextTakeover===!1&&i.server_no_context_takeover||i.server_max_window_bits&&(s.serverMaxWindowBits===!1||typeof s.serverMaxWindowBits=="number"&&s.serverMaxWindowBits>i.server_max_window_bits)||typeof s.clientMaxWindowBits=="number"&&!i.client_max_window_bits));if(!r)throw new Error("None of the extension offers can be accepted");return s.serverNoContextTakeover&&(r.server_no_context_takeover=!0),s.clientNoContextTakeover&&(r.client_no_context_takeover=!0),typeof s.serverMaxWindowBits=="number"&&(r.server_max_window_bits=s.serverMaxWindowBits),typeof s.clientMaxWindowBits=="number"?r.client_max_window_bits=s.clientMaxWindowBits:(r.client_max_window_bits===!0||s.clientMaxWindowBits===!1)&&delete r.client_max_window_bits,r}acceptAsClient(e){let s=e[0];if(this._options.clientNoContextTakeover===!1&&s.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!s.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(s.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&s.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return s}normalizeParams(e){return e.forEach(s=>{Object.keys(s).forEach(r=>{let i=s[r];if(i.length>1)throw new Error(`Parameter "${r}" must have only a single value`);if(i=i[0],r==="client_max_window_bits"){if(i!==!0){let n=+i;if(!Number.isInteger(n)||n<8||n>15)throw new TypeError(`Invalid value for parameter "${r}": ${i}`);i=n}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${r}": ${i}`)}else if(r==="server_max_window_bits"){let n=+i;if(!Number.isInteger(n)||n<8||n>15)throw new TypeError(`Invalid value for parameter "${r}": ${i}`);i=n}else if(r==="client_no_context_takeover"||r==="server_no_context_takeover"){if(i!==!0)throw new TypeError(`Invalid value for parameter "${r}": ${i}`)}else throw new Error(`Unknown parameter "${r}"`);s[r]=i})}),e}decompress(e,s,r){ne.add(i=>{this._decompress(e,s,(n,o)=>{i(),r(n,o)})})}compress(e,s,r){ne.add(i=>{this._compress(e,s,(n,o)=>{i(),r(n,o)})})}_decompress(e,s,r){let i=this._isServer?"client":"server";if(!this._inflate){let n=`${i}_max_window_bits`,o=typeof this.params[n]!="number"?Q.Z_DEFAULT_WINDOWBITS:this.params[n];this._inflate=Q.createInflateRaw({...this._options.zlibInflateOptions,windowBits:o}),this._inflate[oe]=this,this._inflate[C]=0,this._inflate[B]=[],this._inflate.on("error",ss),this._inflate.on("data",et)}this._inflate[q]=r,this._inflate.write(e),s&&this._inflate.write(es),this._inflate.flush(()=>{let n=this._inflate[G];if(n){this._inflate.close(),this._inflate=null,r(n);return}let o=Qe.concat(this._inflate[B],this._inflate[C]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[C]=0,this._inflate[B]=[],s&&this.params[`${i}_no_context_takeover`]&&this._inflate.reset()),r(null,o)})}_compress(e,s,r){let i=this._isServer?"server":"client";if(!this._deflate){let n=`${i}_max_window_bits`,o=typeof this.params[n]!="number"?Q.Z_DEFAULT_WINDOWBITS:this.params[n];this._deflate=Q.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:o}),this._deflate[C]=0,this._deflate[B]=[],this._deflate.on("data",ts)}this._deflate[q]=r,this._deflate.write(e),this._deflate.flush(Q.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let n=Qe.concat(this._deflate[B],this._deflate[C]);s&&(n=new Jt(n.buffer,n.byteOffset,n.length-4)),this._deflate[q]=null,this._deflate[C]=0,this._deflate[B]=[],s&&this.params[`${i}_no_context_takeover`]&&this._deflate.reset(),r(null,n)})}};tt.exports=we;function ts(t){this[B].push(t),this[C]+=t.length}function et(t){if(this[C]+=t.length,this[oe]._maxPayload<1||this[C]<=this[oe]._maxPayload){this[B].push(t);return}this[G]=new RangeError("Max payload size exceeded"),this[G].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[G][Je]=1009,this.removeListener("data",et),this.reset()}function ss(t){if(this[oe]._inflate=null,this[G]){this[q](this[G]);return}t[Je]=1007,this[q](t)}});var j=E((Nr,ae)=>{"use strict";d();var{isUtf8:st}=g("buffer"),{hasBlob:rs}=k(),is=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function ns(t){return t>=1e3&&t<=1014&&t!==1004&&t!==1005&&t!==1006||t>=3e3&&t<=4999}function Oe(t){let e=t.length,s=0;for(;s<e;)if((t[s]&128)===0)s++;else if((t[s]&224)===192){if(s+1===e||(t[s+1]&192)!==128||(t[s]&254)===192)return!1;s+=2}else if((t[s]&240)===224){if(s+2>=e||(t[s+1]&192)!==128||(t[s+2]&192)!==128||t[s]===224&&(t[s+1]&224)===128||t[s]===237&&(t[s+1]&224)===160)return!1;s+=3}else if((t[s]&248)===240){if(s+3>=e||(t[s+1]&192)!==128||(t[s+2]&192)!==128||(t[s+3]&192)!==128||t[s]===240&&(t[s+1]&240)===128||t[s]===244&&t[s+1]>143||t[s]>244)return!1;s+=4}else return!1;return!0}function os(t){return rs&&typeof t=="object"&&typeof t.arrayBuffer=="function"&&typeof t.type=="string"&&typeof t.stream=="function"&&(t[Symbol.toStringTag]==="Blob"||t[Symbol.toStringTag]==="File")}ae.exports={isBlob:os,isValidStatusCode:ns,isValidUTF8:Oe,tokenChars:is};if(st)ae.exports.isValidUTF8=function(t){return t.length<24?Oe(t):st(t)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let t=g("utf-8-validate");ae.exports.isValidUTF8=function(e){return e.length<32?Oe(e):t(e)}}catch{}});var Ne=E((Br,lt)=>{"use strict";d();var{Writable:as}=g("stream"),rt=$(),{BINARY_TYPES:fs,EMPTY_BUFFER:it,kStatusCode:ls,kWebSocket:hs}=k(),{concat:Te,toArrayBuffer:cs,unmask:us}=Z(),{isValidStatusCode:ds,isValidUTF8:nt}=j(),fe=Buffer[Symbol.species],b=0,ot=1,at=2,ft=3,ke=4,Ce=5,le=6,Le=class extends as{constructor(e={}){super(),this._allowSynchronousEvents=e.allowSynchronousEvents!==void 0?e.allowSynchronousEvents:!0,this._binaryType=e.binaryType||fs[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxBufferedChunks=e.maxBufferedChunks|0,this._maxFragments=e.maxFragments|0,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[hs]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=b}_write(e,s,r){if(this._opcode===8&&this._state==b)return r();if(this._maxBufferedChunks>0&&this._buffers.length>=this._maxBufferedChunks){r(this.createError(RangeError,"Too many buffered chunks",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS"));return}this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(r)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let r=this._buffers[0];return this._buffers[0]=new fe(r.buffer,r.byteOffset+e,r.length-e),new fe(r.buffer,r.byteOffset,e)}let s=Buffer.allocUnsafe(e);do{let r=this._buffers[0],i=s.length-e;e>=r.length?s.set(this._buffers.shift(),i):(s.set(new Uint8Array(r.buffer,r.byteOffset,e),i),this._buffers[0]=new fe(r.buffer,r.byteOffset+e,r.length-e)),e-=r.length}while(e>0);return s}startLoop(e){this._loop=!0;do switch(this._state){case b:this.getInfo(e);break;case ot:this.getPayloadLength16(e);break;case at:this.getPayloadLength64(e);break;case ft:this.getMask();break;case ke:this.getData(e);break;case Ce:case le:this._loop=!1;return}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2){this._loop=!1;return}let s=this.consume(2);if((s[0]&48)!==0){let i=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");e(i);return}let r=(s[0]&64)===64;if(r&&!this._extensions[rt.extensionName]){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(this._fin=(s[0]&128)===128,this._opcode=s[0]&15,this._payloadLength=s[1]&127,this._opcode===0){if(r){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(!this._fragmented){let i=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let i=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}this._compressed=r}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let i=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");e(i);return}if(r){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let i=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");e(i);return}}else{let i=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(s[1]&128)===128,this._isServer){if(!this._masked){let i=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");e(i);return}}else if(this._masked){let i=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");e(i);return}this._payloadLength===126?this._state=ot:this._payloadLength===127?this._state=at:this.haveLength(e)}getPayloadLength16(e){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e)}getPayloadLength64(e){if(this._bufferedBytes<8){this._loop=!1;return}let s=this.consume(8),r=s.readUInt32BE(0);if(r>Math.pow(2,21)-1){let i=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");e(i);return}this._payloadLength=r*Math.pow(2,32)+s.readUInt32BE(4),this.haveLength(e)}haveLength(e){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let s=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");e(s);return}this._masked?this._state=ft:this._state=ke}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=ke}getData(e){let s=it;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}s=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!==0&&us(s,this._mask)}if(this._opcode>7){this.controlMessage(s,e);return}if(this._compressed){this._state=Ce,this.decompress(s,e);return}if(s.length){if(this._maxFragments>0&&this._fragments.length>=this._maxFragments){let r=this.createError(RangeError,"Too many message fragments",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS");e(r);return}this._messageLength=this._totalPayloadLength,this._fragments.push(s)}this.dataMessage(e)}decompress(e,s){this._extensions[rt.extensionName].decompress(e,this._fin,(i,n)=>{if(i)return s(i);if(n.length){if(this._messageLength+=n.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let o=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");s(o);return}if(this._maxFragments>0&&this._fragments.length>=this._maxFragments){let o=this.createError(RangeError,"Too many message fragments",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS");s(o);return}this._fragments.push(n)}this.dataMessage(s),this._state===b&&this.startLoop(s)})}dataMessage(e){if(!this._fin){this._state=b;return}let s=this._messageLength,r=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let i;this._binaryType==="nodebuffer"?i=Te(r,s):this._binaryType==="arraybuffer"?i=cs(Te(r,s)):this._binaryType==="blob"?i=new Blob(r):i=r,this._allowSynchronousEvents?(this.emit("message",i,!0),this._state=b):(this._state=le,setImmediate(()=>{this.emit("message",i,!0),this._state=b,this.startLoop(e)}))}else{let i=Te(r,s);if(!this._skipUTF8Validation&&!nt(i)){let n=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");e(n);return}this._state===Ce||this._allowSynchronousEvents?(this.emit("message",i,!1),this._state=b):(this._state=le,setImmediate(()=>{this.emit("message",i,!1),this._state=b,this.startLoop(e)}))}}controlMessage(e,s){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit("conclude",1005,it),this.end();else{let r=e.readUInt16BE(0);if(!ds(r)){let n=this.createError(RangeError,`invalid status code ${r}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");s(n);return}let i=new fe(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!nt(i)){let n=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");s(n);return}this._loop=!1,this.emit("conclude",r,i),this.end()}this._state=b;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",e),this._state=b):(this._state=le,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",e),this._state=b,this.startLoop(s)}))}createError(e,s,r,i,n){this._loop=!1,this._errored=!0;let o=new e(r?`Invalid WebSocket frame: ${s}`:s);return Error.captureStackTrace(o,this.createError),o.code=n,o[ls]=i,o}};lt.exports=Le});var Re=E((Ir,ut)=>{"use strict";d();var{Duplex:Ur}=g("stream"),{randomFillSync:_s}=g("crypto"),{types:{isUint8Array:ms}}=g("util"),ht=$(),{EMPTY_BUFFER:ps,kWebSocket:gs,NOOP:ys}=k(),{isBlob:V,isValidStatusCode:xs}=j(),{mask:ct,toBuffer:U}=Z(),w=Symbol("kByteLength"),Ss=Buffer.alloc(4),he=8*1024,I,z=he,O=0,Es=1,vs=2,Pe=class t{constructor(e,s,r){this._extensions=s||{},r&&(this._generateMask=r,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=O,this.onerror=ys,this[gs]=void 0}static frame(e,s){let r,i=!1,n=2,o=!1;s.mask&&(r=s.maskBuffer||Ss,s.generateMask?s.generateMask(r):(z===he&&(I===void 0&&(I=Buffer.alloc(he)),_s(I,0,he),z=0),r[0]=I[z++],r[1]=I[z++],r[2]=I[z++],r[3]=I[z++]),o=(r[0]|r[1]|r[2]|r[3])===0,n=6);let f;typeof e=="string"?(!s.mask||o)&&s[w]!==void 0?f=s[w]:(e=Buffer.from(e),f=e.length):(f=e.length,i=s.mask&&s.readOnly&&!o);let l=f;f>=65536?(n+=8,l=127):f>125&&(n+=2,l=126);let a=Buffer.allocUnsafe(i?f+n:n);return a[0]=s.fin?s.opcode|128:s.opcode,s.rsv1&&(a[0]|=64),a[1]=l,l===126?a.writeUInt16BE(f,2):l===127&&(a[2]=a[3]=0,a.writeUIntBE(f,4,6)),s.mask?(a[1]|=128,a[n-4]=r[0],a[n-3]=r[1],a[n-2]=r[2],a[n-1]=r[3],o?[a,e]:i?(ct(e,r,a,n,f),[a]):(ct(e,r,e,0,f),[a,e])):[a,e]}close(e,s,r,i){let n;if(e===void 0)n=ps;else{if(typeof e!="number"||!xs(e))throw new TypeError("First argument must be a valid error code number");if(s===void 0||!s.length)n=Buffer.allocUnsafe(2),n.writeUInt16BE(e,0);else{let f=Buffer.byteLength(s);if(f>123)throw new RangeError("The message must not be greater than 123 bytes");if(n=Buffer.allocUnsafe(2+f),n.writeUInt16BE(e,0),typeof s=="string")n.write(s,2);else if(ms(s))n.set(s,2);else throw new TypeError("Second argument must be a string or a Uint8Array")}}let o={[w]:n.length,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state!==O?this.enqueue([this.dispatch,n,!1,o,i]):this.sendFrame(t.frame(n,o),i)}ping(e,s,r){let i,n;if(typeof e=="string"?(i=Buffer.byteLength(e),n=!1):V(e)?(i=e.size,n=!1):(e=U(e),i=e.length,n=U.readOnly),i>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[w]:i,fin:!0,generateMask:this._generateMask,mask:s,maskBuffer:this._maskBuffer,opcode:9,readOnly:n,rsv1:!1};V(e)?this._state!==O?this.enqueue([this.getBlobData,e,!1,o,r]):this.getBlobData(e,!1,o,r):this._state!==O?this.enqueue([this.dispatch,e,!1,o,r]):this.sendFrame(t.frame(e,o),r)}pong(e,s,r){let i,n;if(typeof e=="string"?(i=Buffer.byteLength(e),n=!1):V(e)?(i=e.size,n=!1):(e=U(e),i=e.length,n=U.readOnly),i>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[w]:i,fin:!0,generateMask:this._generateMask,mask:s,maskBuffer:this._maskBuffer,opcode:10,readOnly:n,rsv1:!1};V(e)?this._state!==O?this.enqueue([this.getBlobData,e,!1,o,r]):this.getBlobData(e,!1,o,r):this._state!==O?this.enqueue([this.dispatch,e,!1,o,r]):this.sendFrame(t.frame(e,o),r)}send(e,s,r){let i=this._extensions[ht.extensionName],n=s.binary?2:1,o=s.compress,f,l;typeof e=="string"?(f=Buffer.byteLength(e),l=!1):V(e)?(f=e.size,l=!1):(e=U(e),f=e.length,l=U.readOnly),this._firstFragment?(this._firstFragment=!1,o&&i&&i.params[i._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(o=f>=i._threshold),this._compress=o):(o=!1,n=0),s.fin&&(this._firstFragment=!0);let a={[w]:f,fin:s.fin,generateMask:this._generateMask,mask:s.mask,maskBuffer:this._maskBuffer,opcode:n,readOnly:l,rsv1:o};V(e)?this._state!==O?this.enqueue([this.getBlobData,e,this._compress,a,r]):this.getBlobData(e,this._compress,a,r):this._state!==O?this.enqueue([this.dispatch,e,this._compress,a,r]):this.dispatch(e,this._compress,a,r)}getBlobData(e,s,r,i){this._bufferedBytes+=r[w],this._state=vs,e.arrayBuffer().then(n=>{if(this._socket.destroyed){let f=new Error("The socket was closed while the blob was being read");process.nextTick(Be,this,f,i);return}this._bufferedBytes-=r[w];let o=U(n);s?this.dispatch(o,s,r,i):(this._state=O,this.sendFrame(t.frame(o,r),i),this.dequeue())}).catch(n=>{process.nextTick(bs,this,n,i)})}dispatch(e,s,r,i){if(!s){this.sendFrame(t.frame(e,r),i);return}let n=this._extensions[ht.extensionName];this._bufferedBytes+=r[w],this._state=Es,n.compress(e,r.fin,(o,f)=>{if(this._socket.destroyed){let l=new Error("The socket was closed while data was being compressed");Be(this,l,i);return}this._bufferedBytes-=r[w],this._state=O,r.readOnly=!1,this.sendFrame(t.frame(f,r),i),this.dequeue()})}dequeue(){for(;this._state===O&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][w],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][w],this._queue.push(e)}sendFrame(e,s){e.length===2?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],s),this._socket.uncork()):this._socket.write(e[0],s)}};ut.exports=Pe;function Be(t,e,s){typeof s=="function"&&s(e);for(let r=0;r<t._queue.length;r++){let i=t._queue[r],n=i[i.length-1];typeof n=="function"&&n(e)}}function bs(t,e,s){Be(t,e,s),t.onerror(e)}});var Et=E((Mr,St)=>{"use strict";d();var{kForOnEventAttribute:J,kListener:Ue}=k(),dt=Symbol("kCode"),_t=Symbol("kData"),mt=Symbol("kError"),pt=Symbol("kMessage"),gt=Symbol("kReason"),H=Symbol("kTarget"),yt=Symbol("kType"),xt=Symbol("kWasClean"),L=class{constructor(e){this[H]=null,this[yt]=e}get target(){return this[H]}get type(){return this[yt]}};Object.defineProperty(L.prototype,"target",{enumerable:!0});Object.defineProperty(L.prototype,"type",{enumerable:!0});var D=class extends L{constructor(e,s={}){super(e),this[dt]=s.code===void 0?0:s.code,this[gt]=s.reason===void 0?"":s.reason,this[xt]=s.wasClean===void 0?!1:s.wasClean}get code(){return this[dt]}get reason(){return this[gt]}get wasClean(){return this[xt]}};Object.defineProperty(D.prototype,"code",{enumerable:!0});Object.defineProperty(D.prototype,"reason",{enumerable:!0});Object.defineProperty(D.prototype,"wasClean",{enumerable:!0});var Y=class extends L{constructor(e,s={}){super(e),this[mt]=s.error===void 0?null:s.error,this[pt]=s.message===void 0?"":s.message}get error(){return this[mt]}get message(){return this[pt]}};Object.defineProperty(Y.prototype,"error",{enumerable:!0});Object.defineProperty(Y.prototype,"message",{enumerable:!0});var ee=class extends L{constructor(e,s={}){super(e),this[_t]=s.data===void 0?null:s.data}get data(){return this[_t]}};Object.defineProperty(ee.prototype,"data",{enumerable:!0});var ws={addEventListener(t,e,s={}){for(let i of this.listeners(t))if(!s[J]&&i[Ue]===e&&!i[J])return;let r;if(t==="message")r=function(n,o){let f=new ee("message",{data:o?n:n.toString()});f[H]=this,ce(e,this,f)};else if(t==="close")r=function(n,o){let f=new D("close",{code:n,reason:o.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});f[H]=this,ce(e,this,f)};else if(t==="error")r=function(n){let o=new Y("error",{error:n,message:n.message});o[H]=this,ce(e,this,o)};else if(t==="open")r=function(){let n=new L("open");n[H]=this,ce(e,this,n)};else return;r[J]=!!s[J],r[Ue]=e,s.once?this.once(t,r):this.on(t,r)},removeEventListener(t,e){for(let s of this.listeners(t))if(s[Ue]===e&&!s[J]){this.removeListener(t,s);break}}};St.exports={CloseEvent:D,ErrorEvent:Y,Event:L,EventTarget:ws,MessageEvent:ee};function ce(t,e,s){typeof t=="object"&&t.handleEvent?t.handleEvent.call(t,s):t.call(e,s)}});var ue=E((Ar,vt)=>{"use strict";d();var{tokenChars:te}=j();function T(t,e,s){t[e]===void 0?t[e]=[s]:t[e].push(s)}function Os(t){let e=Object.create(null),s=Object.create(null),r=!1,i=!1,n=!1,o,f,l=-1,a=-1,h=-1,c=0;for(;c<t.length;c++)if(a=t.charCodeAt(c),o===void 0)if(h===-1&&te[a]===1)l===-1&&(l=c);else if(c!==0&&(a===32||a===9))h===-1&&l!==-1&&(h=c);else if(a===59||a===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${c}`);h===-1&&(h=c);let y=t.slice(l,h);a===44?(T(e,y,s),s=Object.create(null)):o=y,l=h=-1}else throw new SyntaxError(`Unexpected character at index ${c}`);else if(f===void 0)if(h===-1&&te[a]===1)l===-1&&(l=c);else if(a===32||a===9)h===-1&&l!==-1&&(h=c);else if(a===59||a===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${c}`);h===-1&&(h=c),T(s,t.slice(l,h),!0),a===44&&(T(e,o,s),s=Object.create(null),o=void 0),l=h=-1}else if(a===61&&l!==-1&&h===-1)f=t.slice(l,c),l=h=-1;else throw new SyntaxError(`Unexpected character at index ${c}`);else if(i){if(te[a]!==1)throw new SyntaxError(`Unexpected character at index ${c}`);l===-1?l=c:r||(r=!0),i=!1}else if(n)if(te[a]===1)l===-1&&(l=c);else if(a===34&&l!==-1)n=!1,h=c;else if(a===92)i=!0;else throw new SyntaxError(`Unexpected character at index ${c}`);else if(a===34&&t.charCodeAt(c-1)===61)n=!0;else if(h===-1&&te[a]===1)l===-1&&(l=c);else if(l!==-1&&(a===32||a===9))h===-1&&(h=c);else if(a===59||a===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${c}`);h===-1&&(h=c);let y=t.slice(l,h);r&&(y=y.replace(/\\/g,""),r=!1),T(s,f,y),a===44&&(T(e,o,s),s=Object.create(null),o=void 0),f=void 0,l=h=-1}else throw new SyntaxError(`Unexpected character at index ${c}`);if(l===-1||n||a===32||a===9)throw new SyntaxError("Unexpected end of input");h===-1&&(h=c);let m=t.slice(l,h);return o===void 0?T(e,m,s):(f===void 0?T(s,m,!0):r?T(s,f,m.replace(/\\/g,"")):T(s,f,m),T(e,o,s)),e}function Ts(t){return Object.keys(t).map(e=>{let s=t[e];return Array.isArray(s)||(s=[s]),s.map(r=>[e].concat(Object.keys(r).map(i=>{let n=r[i];return Array.isArray(n)||(n=[n]),n.map(o=>o===!0?i:`${i}=${o}`).join("; ")})).join("; ")).join(", ")}).join(", ")}vt.exports={format:Ts,parse:Os}});var pe=E(($r,Ut)=>{"use strict";d();var ks=g("events"),Cs=g("https"),Ls=g("http"),Ot=g("net"),Ns=g("tls"),{randomBytes:Ps,createHash:Bs}=g("crypto"),{Duplex:qr,Readable:Gr}=g("stream"),{URL:Ie}=g("url"),R=$(),Rs=Ne(),Us=Re(),{isBlob:Is}=j(),{BINARY_TYPES:bt,CLOSE_TIMEOUT:Ds,EMPTY_BUFFER:de,GUID:Ms,kForOnEventAttribute:De,kListener:Fs,kStatusCode:As,kWebSocket:x,NOOP:Tt}=k(),{EventTarget:{addEventListener:Ws,removeEventListener:qs}}=Et(),{format:Gs,parse:$s}=ue(),{toBuffer:js}=Z(),kt=Symbol("kAborted"),Me=[8,13],N=["CONNECTING","OPEN","CLOSING","CLOSED"],Vs=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,_=class t extends ks{constructor(e,s,r){super(),this._binaryType=bt[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=de,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=t.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,e!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,s===void 0?s=[]:Array.isArray(s)||(typeof s=="object"&&s!==null?(r=s,s=[]):s=[s]),Ct(this,e,s,r)):(this._autoPong=r.autoPong,this._closeTimeout=r.closeTimeout,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){bt.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(e,s,r){let i=new Rs({allowSynchronousEvents:r.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxBufferedChunks:r.maxBufferedChunks,maxFragments:r.maxFragments,maxPayload:r.maxPayload,skipUTF8Validation:r.skipUTF8Validation}),n=new Us(e,this._extensions,r.generateMask);this._receiver=i,this._sender=n,this._socket=e,i[x]=this,n[x]=this,e[x]=this,i.on("conclude",Ys),i.on("drain",Ks),i.on("error",Xs),i.on("message",Zs),i.on("ping",Qs),i.on("pong",Js),n.onerror=er,e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),s.length>0&&e.unshift(s),e.on("close",Pt),e.on("data",me),e.on("end",Bt),e.on("error",Rt),this._readyState=t.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=t.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[R.extensionName]&&this._extensions[R.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=t.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,s){if(this.readyState!==t.CLOSED){if(this.readyState===t.CONNECTING){v(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===t.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=t.CLOSING,this._sender.close(e,s,!this._isServer,r=>{r||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),Nt(this)}}pause(){this.readyState===t.CONNECTING||this.readyState===t.CLOSED||(this._paused=!0,this._socket.pause())}ping(e,s,r){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(r=e,e=s=void 0):typeof s=="function"&&(r=s,s=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){Fe(this,e,r);return}s===void 0&&(s=!this._isServer),this._sender.ping(e||de,s,r)}pong(e,s,r){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(r=e,e=s=void 0):typeof s=="function"&&(r=s,s=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){Fe(this,e,r);return}s===void 0&&(s=!this._isServer),this._sender.pong(e||de,s,r)}resume(){this.readyState===t.CONNECTING||this.readyState===t.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,s,r){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof s=="function"&&(r=s,s={}),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){Fe(this,e,r);return}let i={binary:typeof e!="string",mask:!this._isServer,compress:!0,fin:!0,...s};this._extensions[R.extensionName]||(i.compress=!1),this._sender.send(e||de,i,r)}terminate(){if(this.readyState!==t.CLOSED){if(this.readyState===t.CONNECTING){v(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=t.CLOSING,this._socket.destroy())}}};Object.defineProperty(_,"CONNECTING",{enumerable:!0,value:N.indexOf("CONNECTING")});Object.defineProperty(_.prototype,"CONNECTING",{enumerable:!0,value:N.indexOf("CONNECTING")});Object.defineProperty(_,"OPEN",{enumerable:!0,value:N.indexOf("OPEN")});Object.defineProperty(_.prototype,"OPEN",{enumerable:!0,value:N.indexOf("OPEN")});Object.defineProperty(_,"CLOSING",{enumerable:!0,value:N.indexOf("CLOSING")});Object.defineProperty(_.prototype,"CLOSING",{enumerable:!0,value:N.indexOf("CLOSING")});Object.defineProperty(_,"CLOSED",{enumerable:!0,value:N.indexOf("CLOSED")});Object.defineProperty(_.prototype,"CLOSED",{enumerable:!0,value:N.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(t=>{Object.defineProperty(_.prototype,t,{enumerable:!0})});["open","error","close","message"].forEach(t=>{Object.defineProperty(_.prototype,`on${t}`,{enumerable:!0,get(){for(let e of this.listeners(t))if(e[De])return e[Fs];return null},set(e){for(let s of this.listeners(t))if(s[De]){this.removeListener(t,s);break}typeof e=="function"&&this.addEventListener(t,e,{[De]:!0})}})});_.prototype.addEventListener=Ws;_.prototype.removeEventListener=qs;Ut.exports=_;function Ct(t,e,s,r){let i={allowSynchronousEvents:!0,autoPong:!0,closeTimeout:Ds,protocolVersion:Me[1],maxBufferedChunks:1048576,maxFragments:131072,maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(t._autoPong=i.autoPong,t._closeTimeout=i.closeTimeout,!Me.includes(i.protocolVersion))throw new RangeError(`Unsupported protocol version: ${i.protocolVersion} (supported versions: ${Me.join(", ")})`);let n;if(e instanceof Ie)n=e;else try{n=new Ie(e)}catch{throw new SyntaxError(`Invalid URL: ${e}`)}n.protocol==="http:"?n.protocol="ws:":n.protocol==="https:"&&(n.protocol="wss:"),t._url=n.href;let o=n.protocol==="wss:",f=n.protocol==="ws+unix:",l;if(n.protocol!=="ws:"&&!o&&!f?l=`The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`:f&&!n.pathname?l="The URL's pathname is empty":n.hash&&(l="The URL contains a fragment identifier"),l){let u=new SyntaxError(l);if(t._redirects===0)throw u;_e(t,u);return}let a=o?443:80,h=Ps(16).toString("base64"),c=o?Cs.request:Ls.request,m=new Set,y;if(i.createConnection=i.createConnection||(o?Hs:zs),i.defaultPort=i.defaultPort||a,i.port=n.port||a,i.host=n.hostname.startsWith("[")?n.hostname.slice(1,-1):n.hostname,i.headers={...i.headers,"Sec-WebSocket-Version":i.protocolVersion,"Sec-WebSocket-Key":h,Connection:"Upgrade",Upgrade:"websocket"},i.path=n.pathname+n.search,i.timeout=i.handshakeTimeout,i.perMessageDeflate&&(y=new R({...i.perMessageDeflate,isServer:!1,maxPayload:i.maxPayload}),i.headers["Sec-WebSocket-Extensions"]=Gs({[R.extensionName]:y.offer()})),s.length){for(let u of s){if(typeof u!="string"||!Vs.test(u)||m.has(u))throw new SyntaxError("An invalid or duplicated subprotocol was specified");m.add(u)}i.headers["Sec-WebSocket-Protocol"]=s.join(",")}if(i.origin&&(i.protocolVersion<13?i.headers["Sec-WebSocket-Origin"]=i.origin:i.headers.Origin=i.origin),(n.username||n.password)&&(i.auth=`${n.username}:${n.password}`),f){let u=i.path.split(":");i.socketPath=u[0],i.path=u[1]}let p;if(i.followRedirects){if(t._redirects===0){t._originalIpc=f,t._originalSecure=o,t._originalHostOrSocketPath=f?i.socketPath:n.host;let u=r&&r.headers;if(r={...r,headers:{}},u)for(let[S,A]of Object.entries(u))r.headers[S.toLowerCase()]=A}else if(t.listenerCount("redirect")===0){let u=f?t._originalIpc?i.socketPath===t._originalHostOrSocketPath:!1:t._originalIpc?!1:n.host===t._originalHostOrSocketPath;(!u||t._originalSecure&&!o)&&(delete i.headers.authorization,delete i.headers.cookie,u||delete i.headers.host,i.auth=void 0)}i.auth&&!r.headers.authorization&&(r.headers.authorization="Basic "+Buffer.from(i.auth).toString("base64")),p=t._req=c(i),t._redirects&&t.emit("redirect",t.url,p)}else p=t._req=c(i);i.timeout&&p.on("timeout",()=>{v(t,p,"Opening handshake has timed out")}),p.on("error",u=>{p===null||p[kt]||(p=t._req=null,_e(t,u))}),p.on("response",u=>{let S=u.headers.location,A=u.statusCode;if(S&&i.followRedirects&&A>=300&&A<400){if(++t._redirects>i.maxRedirects){v(t,p,"Maximum redirects exceeded");return}p.abort();let K;try{K=new Ie(S,e)}catch{let W=new SyntaxError(`Invalid URL: ${S}`);_e(t,W);return}Ct(t,K,s,r)}else t.emit("unexpected-response",p,u)||v(t,p,`Unexpected server response: ${u.statusCode}`)}),p.on("upgrade",(u,S,A)=>{if(t.emit("upgrade",u),t.readyState!==_.CONNECTING)return;p=t._req=null;let K=u.headers.upgrade;if(K===void 0||K.toLowerCase()!=="websocket"){v(t,S,"Invalid Upgrade header");return}let qe=Bs("sha1").update(h+Ms).digest("base64");if(u.headers["sec-websocket-accept"]!==qe){v(t,S,"Invalid Sec-WebSocket-Accept header");return}let W=u.headers["sec-websocket-protocol"],X;if(W!==void 0?m.size?m.has(W)||(X="Server sent an invalid subprotocol"):X="Server sent a subprotocol but none was requested":m.size&&(X="Server sent no subprotocol"),X){v(t,S,X);return}W&&(t._protocol=W);let Ge=u.headers["sec-websocket-extensions"];if(Ge!==void 0){if(!y){v(t,S,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let ye;try{ye=$s(Ge)}catch{v(t,S,"Invalid Sec-WebSocket-Extensions header");return}let $e=Object.keys(ye);if($e.length!==1||$e[0]!==R.extensionName){v(t,S,"Server indicated an extension that was not requested");return}try{y.accept(ye[R.extensionName])}catch{v(t,S,"Invalid Sec-WebSocket-Extensions header");return}t._extensions[R.extensionName]=y}t.setSocket(S,A,{allowSynchronousEvents:i.allowSynchronousEvents,generateMask:i.generateMask,maxBufferedChunks:i.maxBufferedChunks,maxFragments:i.maxFragments,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation})}),i.finishRequest?i.finishRequest(p,t):p.end()}function _e(t,e){t._readyState=_.CLOSING,t._errorEmitted=!0,t.emit("error",e),t.emitClose()}function zs(t){return t.path=t.socketPath,Ot.connect(t)}function Hs(t){return t.path=void 0,!t.servername&&t.servername!==""&&(t.servername=Ot.isIP(t.host)?"":t.host),Ns.connect(t)}function v(t,e,s){t._readyState=_.CLOSING;let r=new Error(s);Error.captureStackTrace(r,v),e.setHeader?(e[kt]=!0,e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),process.nextTick(_e,t,r)):(e.destroy(r),e.once("error",t.emit.bind(t,"error")),e.once("close",t.emitClose.bind(t)))}function Fe(t,e,s){if(e){let r=Is(e)?e.size:js(e).length;t._socket?t._sender._bufferedBytes+=r:t._bufferedAmount+=r}if(s){let r=new Error(`WebSocket is not open: readyState ${t.readyState} (${N[t.readyState]})`);process.nextTick(s,r)}}function Ys(t,e){let s=this[x];s._closeFrameReceived=!0,s._closeMessage=e,s._closeCode=t,s._socket[x]!==void 0&&(s._socket.removeListener("data",me),process.nextTick(Lt,s._socket),t===1005?s.close():s.close(t,e))}function Ks(){let t=this[x];t.isPaused||t._socket.resume()}function Xs(t){let e=this[x];e._socket[x]!==void 0&&(e._socket.removeListener("data",me),process.nextTick(Lt,e._socket),e.close(t[As])),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",t))}function wt(){this[x].emitClose()}function Zs(t,e){this[x].emit("message",t,e)}function Qs(t){let e=this[x];e._autoPong&&e.pong(t,!this._isServer,Tt),e.emit("ping",t)}function Js(t){this[x].emit("pong",t)}function Lt(t){t.resume()}function er(t){let e=this[x];e.readyState!==_.CLOSED&&(e.readyState===_.OPEN&&(e._readyState=_.CLOSING,Nt(e)),this._socket.end(),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",t)))}function Nt(t){t._closeTimer=setTimeout(t._socket.destroy.bind(t._socket),t._closeTimeout)}function Pt(){let t=this[x];if(this.removeListener("close",Pt),this.removeListener("data",me),this.removeListener("end",Bt),t._readyState=_.CLOSING,!this._readableState.endEmitted&&!t._closeFrameReceived&&!t._receiver._writableState.errorEmitted&&this._readableState.length!==0){let e=this.read(this._readableState.length);t._receiver.write(e)}t._receiver.end(),this[x]=void 0,clearTimeout(t._closeTimer),t._receiver._writableState.finished||t._receiver._writableState.errorEmitted?t.emitClose():(t._receiver.on("error",wt),t._receiver.on("finish",wt))}function me(t){this[x]._receiver.write(t)||this.pause()}function Bt(){let t=this[x];t._readyState=_.CLOSING,t._receiver.end(),this.end()}function Rt(){let t=this[x];this.removeListener("error",Rt),this.on("error",Tt),t&&(t._readyState=_.CLOSING,this.destroy())}});var Ft=E((zr,Mt)=>{"use strict";d();var Vr=pe(),{Duplex:tr}=g("stream");function It(t){t.emit("close")}function sr(){!this.destroyed&&this._writableState.finished&&this.destroy()}function Dt(t){this.removeListener("error",Dt),this.destroy(),this.listenerCount("error")===0&&this.emit("error",t)}function rr(t,e){let s=!0,r=new tr({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return t.on("message",function(n,o){let f=!o&&r._readableState.objectMode?n.toString():n;r.push(f)||t.pause()}),t.once("error",function(n){r.destroyed||(s=!1,r.destroy(n))}),t.once("close",function(){r.destroyed||r.push(null)}),r._destroy=function(i,n){if(t.readyState===t.CLOSED){n(i),process.nextTick(It,r);return}let o=!1;t.once("error",function(l){o=!0,n(l)}),t.once("close",function(){o||n(i),process.nextTick(It,r)}),s&&t.terminate()},r._final=function(i){if(t.readyState===t.CONNECTING){t.once("open",function(){r._final(i)});return}t._socket!==null&&(t._socket._writableState.finished?(i(),r._readableState.endEmitted&&r.destroy()):(t._socket.once("finish",function(){i()}),t.close()))},r._read=function(){t.isPaused&&t.resume()},r._write=function(i,n,o){if(t.readyState===t.CONNECTING){t.once("open",function(){r._write(i,n,o)});return}t.send(i,o)},r.on("end",sr),r.on("error",Dt),r}Mt.exports=rr});var Ae=E((Yr,At)=>{"use strict";d();var{tokenChars:ir}=j();function nr(t){let e=new Set,s=-1,r=-1,i=0;for(i;i<t.length;i++){let o=t.charCodeAt(i);if(r===-1&&ir[o]===1)s===-1&&(s=i);else if(i!==0&&(o===32||o===9))r===-1&&s!==-1&&(r=i);else if(o===44){if(s===-1)throw new SyntaxError(`Unexpected character at index ${i}`);r===-1&&(r=i);let f=t.slice(s,r);if(e.has(f))throw new SyntaxError(`The "${f}" subprotocol is duplicated`);e.add(f),s=r=-1}else throw new SyntaxError(`Unexpected character at index ${i}`)}if(s===-1||r!==-1)throw new SyntaxError("Unexpected end of input");let n=t.slice(s,i);if(e.has(n))throw new SyntaxError(`The "${n}" subprotocol is duplicated`);return e.add(n),e}At.exports={parse:nr}});var zt=E((Zr,Vt)=>{"use strict";d();var or=g("events"),ge=g("http"),{Duplex:Xr}=g("stream"),{createHash:ar}=g("crypto"),Wt=ue(),M=$(),fr=Ae(),lr=pe(),{CLOSE_TIMEOUT:hr,GUID:cr,kWebSocket:ur}=k(),dr=/^[+/0-9A-Za-z]{22}==$/,qt=0,Gt=1,jt=2,We=class extends or{constructor(e,s){if(super(),e={allowSynchronousEvents:!0,autoPong:!0,maxBufferedChunks:1024*1024,maxFragments:128*1024,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,closeTimeout:hr,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:lr,...e},e.port==null&&!e.server&&!e.noServer||e.port!=null&&(e.server||e.noServer)||e.server&&e.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(e.port!=null?(this._server=ge.createServer((r,i)=>{let n=ge.STATUS_CODES[426];i.writeHead(426,{"Content-Length":n.length,"Content-Type":"text/plain"}),i.end(n)}),this._server.listen(e.port,e.host,e.backlog,s)):e.server&&(this._server=e.server),this._server){let r=this.emit.bind(this,"connection");this._removeListeners=_r(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(i,n,o)=>{this.handleUpgrade(i,n,o,r)}})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=qt}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(e){if(this._state===jt){e&&this.once("close",()=>{e(new Error("The server is not running"))}),process.nextTick(se,this);return}if(e&&this.once("close",e),this._state!==Gt)if(this._state=Gt,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(se,this):process.nextTick(se,this);else{let s=this._server;this._removeListeners(),this._removeListeners=this._server=null,s.close(()=>{se(this)})}}shouldHandle(e){if(this.options.path){let s=e.url.indexOf("?");if((s!==-1?e.url.slice(0,s):e.url)!==this.options.path)return!1}return!0}handleUpgrade(e,s,r,i){s.on("error",$t);let n=e.headers["sec-websocket-key"],o=e.headers.upgrade,f=+e.headers["sec-websocket-version"];if(e.method!=="GET"){F(this,e,s,405,"Invalid HTTP method");return}if(o===void 0||o.toLowerCase()!=="websocket"){F(this,e,s,400,"Invalid Upgrade header");return}if(n===void 0||!dr.test(n)){F(this,e,s,400,"Missing or invalid Sec-WebSocket-Key header");return}if(f!==13&&f!==8){F(this,e,s,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});return}if(!this.shouldHandle(e)){re(s,400);return}let l=e.headers["sec-websocket-protocol"],a=new Set;if(l!==void 0)try{a=fr.parse(l)}catch{F(this,e,s,400,"Invalid Sec-WebSocket-Protocol header");return}let h=e.headers["sec-websocket-extensions"],c={};if(this.options.perMessageDeflate&&h!==void 0){let m=new M({...this.options.perMessageDeflate,isServer:!0,maxPayload:this.options.maxPayload});try{let y=Wt.parse(h);y[M.extensionName]&&(m.accept(y[M.extensionName]),c[M.extensionName]=m)}catch{F(this,e,s,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let m={origin:e.headers[`${f===8?"sec-websocket-origin":"origin"}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(this.options.verifyClient.length===2){this.options.verifyClient(m,(y,p,u,S)=>{if(!y)return re(s,p||401,u,S);this.completeUpgrade(c,n,a,e,s,r,i)});return}if(!this.options.verifyClient(m))return re(s,401)}this.completeUpgrade(c,n,a,e,s,r,i)}completeUpgrade(e,s,r,i,n,o,f){if(!n.readable||!n.writable)return n.destroy();if(n[ur])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>qt)return re(n,503);let a=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${ar("sha1").update(s+cr).digest("base64")}`],h=new this.options.WebSocket(null,void 0,this.options);if(r.size){let c=this.options.handleProtocols?this.options.handleProtocols(r,i):r.values().next().value;c&&(a.push(`Sec-WebSocket-Protocol: ${c}`),h._protocol=c)}if(e[M.extensionName]){let c=e[M.extensionName].params,m=Wt.format({[M.extensionName]:[c]});a.push(`Sec-WebSocket-Extensions: ${m}`),h._extensions=e}this.emit("headers",a,i),n.write(a.concat(`\r
2
+ `).join(`\r
3
+ `)),n.removeListener("error",$t),h.setSocket(n,o,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxBufferedChunks:this.options.maxBufferedChunks,maxFragments:this.options.maxFragments,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(h),h.on("close",()=>{this.clients.delete(h),this._shouldEmitClose&&!this.clients.size&&process.nextTick(se,this)})),f(h,i)}};Vt.exports=We;function _r(t,e){for(let s of Object.keys(e))t.on(s,e[s]);return function(){for(let r of Object.keys(e))t.removeListener(r,e[r])}}function se(t){t._state=jt,t.emit("close")}function $t(){this.destroy()}function re(t,e,s,r){s=s||ge.STATUS_CODES[e],r={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(s),...r},t.once("finish",t.destroy),t.end(`HTTP/1.1 ${e} ${ge.STATUS_CODES[e]}\r
4
+ `+Object.keys(r).map(i=>`${i}: ${r[i]}`).join(`\r
5
+ `)+`\r
6
+ \r
7
+ `+s)}function F(t,e,s,r,i,n){if(t.listenerCount("wsClientError")){let o=new Error(i);Error.captureStackTrace(o,F),t.emit("wsClientError",o,s,e)}else re(s,r,i,n)}});d();var mr=P(Ft(),1),pr=P(ue(),1),gr=P($(),1),yr=P(Ne(),1),xr=P(Re(),1),Sr=P(Ae(),1),Ht=P(pe(),1),Er=P(zt(),1);var Jr=Ht.default;export{Er as a,Jr as b};
@@ -0,0 +1 @@
1
+ import{a as f}from"./chunk-UOQ75BL3.js";import{a as n}from"./chunk-DCK2FX6J.js";import{C as p,F as s,Ga as c}from"./chunk-WCWNI3ZV.js";import{b as e}from"./chunk-4KRT35A2.js";import{r as d}from"./chunk-3YWUSKWF.js";import{e as l,g as r}from"./chunk-VPRTJUIN.js";r();var m=l(d(),1);var t,{config:b,...u}=n,o=class extends f{async run(){let{flags:a,args:i}=await this.parse(t),{app:g}=await c({directory:a.path,userProvidedConfigName:i.config});return await s(a.path),await p({directory:a.path,configName:i.config,reset:a.reset}),{app:g}}};t=o;o.summary="Activate an app configuration.";o.descriptionWithMarkdown="Sets default configuration when you run app-related CLI commands. If you omit the `config-name` parameter, then you'll be prompted to choose from the configuration files in your project.";o.description=t.descriptionWithoutMarkdown();o.usage="app config use [config] [flags]";o.flags={...e,...u};o.args={config:m.Args.string({description:"The name of the app configuration. Can be 'shopify.app.staging.toml' or simply 'staging'."})};var v=o;export{v as a};
@@ -1,4 +1,4 @@
1
- import{a as Ju,b as Nn,c as ee}from"./chunk-QSTEVZFQ.js";import{Ba as Zu}from"./chunk-B2EHO7ZC.js";import{a as $,c as A,g as v}from"./chunk-VPRTJUIN.js";var eo=A((ir,In)=>{v();(function(e,t){typeof ir=="object"&&typeof In<"u"?t(ir):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.async={}))})(ir,(function(e){"use strict";function t(f,...n){return(...u)=>f(...n,...u)}function r(f){return function(...n){var u=n.pop();return f.call(this,n,u)}}var i=typeof queueMicrotask=="function"&&queueMicrotask,a=typeof setImmediate=="function"&&setImmediate,o=typeof process=="object"&&typeof process.nextTick=="function";function l(f){setTimeout(f,0)}function y(f){return(n,...u)=>f(()=>n(...u))}var _;i?_=queueMicrotask:a?_=setImmediate:o?_=process.nextTick:_=l;var T=y(_);function x(f){return O(f)?function(...n){let u=n.pop(),s=f.apply(this,n);return M(s,u)}:r(function(n,u){var s;try{s=f.apply(this,n)}catch(h){return u(h)}if(s&&typeof s.then=="function")return M(s,u);u(null,s)})}function M(f,n){return f.then(u=>{L(n,null,u)},u=>{L(n,u&&(u instanceof Error||u.message)?u:new Error(u))})}function L(f,n,u){try{f(n,u)}catch(s){T(h=>{throw h},s)}}function O(f){return f[Symbol.toStringTag]==="AsyncFunction"}function H(f){return f[Symbol.toStringTag]==="AsyncGenerator"}function Q(f){return typeof f[Symbol.asyncIterator]=="function"}function b(f){if(typeof f!="function")throw new Error("expected a function");return O(f)?x(f):f}function S(f,n){if(n||(n=f.length),!n)throw new Error("arity is undefined");function u(...s){return typeof s[n-1]=="function"?f.apply(this,s):new Promise((h,c)=>{s[n-1]=(d,...p)=>{if(d)return c(d);h(p.length>1?p:p[0])},f.apply(this,s)})}return u}function ye(f){return function(u,...s){return S(function(c){var d=this;return f(u,(p,g)=>{b(p).apply(d,s.concat(g))},c)})}}function Br(f,n,u,s){n=n||[];var h=[],c=0,d=b(u);return f(n,(p,g,m)=>{var C=c++;d(p,(B,P)=>{h[C]=P,m(B)})},p=>{s(p,h)})}function xt(f){return f&&typeof f.length=="number"&&f.length>=0&&f.length%1===0}let Ct={};function ve(f){function n(...u){if(f!==null){var s=f;f=null,s.apply(this,u)}}return Object.assign(n,f),n}function Kf(f){return f[Symbol.iterator]&&f[Symbol.iterator]()}function Yf(f){var n=-1,u=f.length;return function(){return++n<u?{value:f[n],key:n}:null}}function Qf(f){var n=-1;return function(){var s=f.next();return s.done?null:(n++,{value:s.value,key:n})}}function Xf(f){var n=f?Object.keys(f):[],u=-1,s=n.length;return function h(){var c=n[++u];return c==="__proto__"?h():u<s?{value:f[c],key:c}:null}}function Zf(f){if(xt(f))return Yf(f);var n=Kf(f);return n?Qf(n):Xf(f)}function _e(f){return function(...n){if(f===null)throw new Error("Callback was already called.");var u=f;f=null,u.apply(this,n)}}function Vi(f,n,u,s){let h=!1,c=!1,d=!1,p=0,g=0;function m(){p>=n||d||h||(d=!0,f.next().then(({value:P,done:Z})=>{if(!(c||h)){if(d=!1,Z){h=!0,p<=0&&s(null);return}p++,u(P,g,C),g++,m()}}).catch(B))}function C(P,Z){if(p-=1,!c){if(P)return B(P);if(P===!1){h=!0,c=!0;return}if(Z===Ct||h&&p<=0)return h=!0,s(null);m()}}function B(P){c||(d=!1,h=!0,s(P))}m()}var ie=f=>(n,u,s)=>{if(s=ve(s),f<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!n)return s(null);if(H(n))return Vi(n,f,u,s);if(Q(n))return Vi(n[Symbol.asyncIterator](),f,u,s);var h=Zf(n),c=!1,d=!1,p=0,g=!1;function m(B,P){if(!d)if(p-=1,B)c=!0,s(B);else if(B===!1)c=!0,d=!0;else{if(P===Ct||c&&p<=0)return c=!0,s(null);g||C()}}function C(){for(g=!0;p<f&&!c;){var B=h();if(B===null){c=!0,p<=0&&s(null);return}p+=1,u(B.value,B.key,_e(m))}g=!1}C()};function Jf(f,n,u,s){return ie(n)(f,b(u),s)}var Be=S(Jf,4);function eu(f,n,u){u=ve(u);var s=0,h=0,{length:c}=f,d=!1;c===0&&u(null);function p(g,m){g===!1&&(d=!0),d!==!0&&(g?u(g):(++h===c||m===Ct)&&u(null))}for(;s<c;s++)n(f[s],s,_e(p))}function tu(f,n,u){return Be(f,1/0,n,u)}function ru(f,n,u){var s=xt(f)?eu:tu;return s(f,b(n),u)}var X=S(ru,3);function iu(f,n,u){return Br(X,f,n,u)}var Pt=S(iu,3),Ki=ye(Pt);function nu(f,n,u){return Be(f,1,n,u)}var ne=S(nu,3);function au(f,n,u){return Br(ne,f,n,u)}var Nr=S(au,3),Yi=ye(Nr);let Ne=Symbol("promiseCallback");function Ie(){let f,n;function u(s,...h){if(s)return n(s);f(h.length>1?h:h[0])}return u[Ne]=new Promise((s,h)=>{f=s,n=h}),u}function Ir(f,n,u){typeof n!="number"&&(u=n,n=null),u=ve(u||Ie());var s=Object.keys(f).length;if(!s)return u(null);n||(n=s);var h={},c=0,d=!1,p=!1,g=Object.create(null),m=[],C=[],B={};Object.keys(f).forEach(w=>{var R=f[w];if(!Array.isArray(R)){P(w,[R]),C.push(w);return}var D=R.slice(0,R.length-1),U=D.length;if(U===0){P(w,R),C.push(w);return}B[w]=U,D.forEach(z=>{if(!f[z])throw new Error("async.auto task `"+w+"` has a non-existent dependency `"+z+"` in "+D.join(", "));We(z,()=>{U--,U===0&&P(w,R)})})}),N(),Z();function P(w,R){m.push(()=>ut(w,R))}function Z(){if(!d){if(m.length===0&&c===0)return u(null,h);for(;m.length&&c<n;){var w=m.shift();w()}}}function We(w,R){var D=g[w];D||(D=g[w]=[]),D.push(R)}function Oe(w){var R=g[w]||[];R.forEach(D=>D()),Z()}function ut(w,R){if(!p){var D=_e((z,...J)=>{if(c--,z===!1){d=!0;return}if(J.length<2&&([J]=J),z){var Ue={};if(Object.keys(h).forEach(Me=>{Ue[Me]=h[Me]}),Ue[w]=J,p=!0,g=Object.create(null),d)return;u(z,Ue)}else h[w]=J,Oe(w)});c++;var U=b(R[R.length-1]);R.length>1?U(h,D):U(D)}}function N(){for(var w,R=0;C.length;)w=C.pop(),R++,E(w).forEach(D=>{--B[D]===0&&C.push(D)});if(R!==s)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}function E(w){var R=[];return Object.keys(f).forEach(D=>{let U=f[D];Array.isArray(U)&&U.indexOf(w)>=0&&R.push(D)}),R}return u[Ne]}var fu=/^(?:async\s)?(?:function)?\s*(?:\w+\s*)?\(([^)]+)\)(?:\s*{)/,uu=/^(?:async\s)?\s*(?:\(\s*)?((?:[^)=\s]\s*)*)(?:\)\s*)?=>/,ou=/,/,su=/(=.+)?(\s*)$/;function lu(f){let n="",u=0,s=f.indexOf("*/");for(;u<f.length;)if(f[u]==="/"&&f[u+1]==="/"){let h=f.indexOf(`
1
+ import{a as Ju,b as Nn,c as ee}from"./chunk-QSTEVZFQ.js";import{Ea as Zu}from"./chunk-4V4DQ6W7.js";import{a as $,c as A,g as v}from"./chunk-VPRTJUIN.js";var eo=A((ir,In)=>{v();(function(e,t){typeof ir=="object"&&typeof In<"u"?t(ir):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.async={}))})(ir,(function(e){"use strict";function t(f,...n){return(...u)=>f(...n,...u)}function r(f){return function(...n){var u=n.pop();return f.call(this,n,u)}}var i=typeof queueMicrotask=="function"&&queueMicrotask,a=typeof setImmediate=="function"&&setImmediate,o=typeof process=="object"&&typeof process.nextTick=="function";function l(f){setTimeout(f,0)}function y(f){return(n,...u)=>f(()=>n(...u))}var _;i?_=queueMicrotask:a?_=setImmediate:o?_=process.nextTick:_=l;var T=y(_);function x(f){return O(f)?function(...n){let u=n.pop(),s=f.apply(this,n);return M(s,u)}:r(function(n,u){var s;try{s=f.apply(this,n)}catch(h){return u(h)}if(s&&typeof s.then=="function")return M(s,u);u(null,s)})}function M(f,n){return f.then(u=>{L(n,null,u)},u=>{L(n,u&&(u instanceof Error||u.message)?u:new Error(u))})}function L(f,n,u){try{f(n,u)}catch(s){T(h=>{throw h},s)}}function O(f){return f[Symbol.toStringTag]==="AsyncFunction"}function H(f){return f[Symbol.toStringTag]==="AsyncGenerator"}function Q(f){return typeof f[Symbol.asyncIterator]=="function"}function b(f){if(typeof f!="function")throw new Error("expected a function");return O(f)?x(f):f}function S(f,n){if(n||(n=f.length),!n)throw new Error("arity is undefined");function u(...s){return typeof s[n-1]=="function"?f.apply(this,s):new Promise((h,c)=>{s[n-1]=(d,...p)=>{if(d)return c(d);h(p.length>1?p:p[0])},f.apply(this,s)})}return u}function ye(f){return function(u,...s){return S(function(c){var d=this;return f(u,(p,g)=>{b(p).apply(d,s.concat(g))},c)})}}function Br(f,n,u,s){n=n||[];var h=[],c=0,d=b(u);return f(n,(p,g,m)=>{var C=c++;d(p,(B,P)=>{h[C]=P,m(B)})},p=>{s(p,h)})}function xt(f){return f&&typeof f.length=="number"&&f.length>=0&&f.length%1===0}let Ct={};function ve(f){function n(...u){if(f!==null){var s=f;f=null,s.apply(this,u)}}return Object.assign(n,f),n}function Kf(f){return f[Symbol.iterator]&&f[Symbol.iterator]()}function Yf(f){var n=-1,u=f.length;return function(){return++n<u?{value:f[n],key:n}:null}}function Qf(f){var n=-1;return function(){var s=f.next();return s.done?null:(n++,{value:s.value,key:n})}}function Xf(f){var n=f?Object.keys(f):[],u=-1,s=n.length;return function h(){var c=n[++u];return c==="__proto__"?h():u<s?{value:f[c],key:c}:null}}function Zf(f){if(xt(f))return Yf(f);var n=Kf(f);return n?Qf(n):Xf(f)}function _e(f){return function(...n){if(f===null)throw new Error("Callback was already called.");var u=f;f=null,u.apply(this,n)}}function Vi(f,n,u,s){let h=!1,c=!1,d=!1,p=0,g=0;function m(){p>=n||d||h||(d=!0,f.next().then(({value:P,done:Z})=>{if(!(c||h)){if(d=!1,Z){h=!0,p<=0&&s(null);return}p++,u(P,g,C),g++,m()}}).catch(B))}function C(P,Z){if(p-=1,!c){if(P)return B(P);if(P===!1){h=!0,c=!0;return}if(Z===Ct||h&&p<=0)return h=!0,s(null);m()}}function B(P){c||(d=!1,h=!0,s(P))}m()}var ie=f=>(n,u,s)=>{if(s=ve(s),f<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!n)return s(null);if(H(n))return Vi(n,f,u,s);if(Q(n))return Vi(n[Symbol.asyncIterator](),f,u,s);var h=Zf(n),c=!1,d=!1,p=0,g=!1;function m(B,P){if(!d)if(p-=1,B)c=!0,s(B);else if(B===!1)c=!0,d=!0;else{if(P===Ct||c&&p<=0)return c=!0,s(null);g||C()}}function C(){for(g=!0;p<f&&!c;){var B=h();if(B===null){c=!0,p<=0&&s(null);return}p+=1,u(B.value,B.key,_e(m))}g=!1}C()};function Jf(f,n,u,s){return ie(n)(f,b(u),s)}var Be=S(Jf,4);function eu(f,n,u){u=ve(u);var s=0,h=0,{length:c}=f,d=!1;c===0&&u(null);function p(g,m){g===!1&&(d=!0),d!==!0&&(g?u(g):(++h===c||m===Ct)&&u(null))}for(;s<c;s++)n(f[s],s,_e(p))}function tu(f,n,u){return Be(f,1/0,n,u)}function ru(f,n,u){var s=xt(f)?eu:tu;return s(f,b(n),u)}var X=S(ru,3);function iu(f,n,u){return Br(X,f,n,u)}var Pt=S(iu,3),Ki=ye(Pt);function nu(f,n,u){return Be(f,1,n,u)}var ne=S(nu,3);function au(f,n,u){return Br(ne,f,n,u)}var Nr=S(au,3),Yi=ye(Nr);let Ne=Symbol("promiseCallback");function Ie(){let f,n;function u(s,...h){if(s)return n(s);f(h.length>1?h:h[0])}return u[Ne]=new Promise((s,h)=>{f=s,n=h}),u}function Ir(f,n,u){typeof n!="number"&&(u=n,n=null),u=ve(u||Ie());var s=Object.keys(f).length;if(!s)return u(null);n||(n=s);var h={},c=0,d=!1,p=!1,g=Object.create(null),m=[],C=[],B={};Object.keys(f).forEach(w=>{var R=f[w];if(!Array.isArray(R)){P(w,[R]),C.push(w);return}var D=R.slice(0,R.length-1),U=D.length;if(U===0){P(w,R),C.push(w);return}B[w]=U,D.forEach(z=>{if(!f[z])throw new Error("async.auto task `"+w+"` has a non-existent dependency `"+z+"` in "+D.join(", "));We(z,()=>{U--,U===0&&P(w,R)})})}),N(),Z();function P(w,R){m.push(()=>ut(w,R))}function Z(){if(!d){if(m.length===0&&c===0)return u(null,h);for(;m.length&&c<n;){var w=m.shift();w()}}}function We(w,R){var D=g[w];D||(D=g[w]=[]),D.push(R)}function Oe(w){var R=g[w]||[];R.forEach(D=>D()),Z()}function ut(w,R){if(!p){var D=_e((z,...J)=>{if(c--,z===!1){d=!0;return}if(J.length<2&&([J]=J),z){var Ue={};if(Object.keys(h).forEach(Me=>{Ue[Me]=h[Me]}),Ue[w]=J,p=!0,g=Object.create(null),d)return;u(z,Ue)}else h[w]=J,Oe(w)});c++;var U=b(R[R.length-1]);R.length>1?U(h,D):U(D)}}function N(){for(var w,R=0;C.length;)w=C.pop(),R++,E(w).forEach(D=>{--B[D]===0&&C.push(D)});if(R!==s)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}function E(w){var R=[];return Object.keys(f).forEach(D=>{let U=f[D];Array.isArray(U)&&U.indexOf(w)>=0&&R.push(D)}),R}return u[Ne]}var fu=/^(?:async\s)?(?:function)?\s*(?:\w+\s*)?\(([^)]+)\)(?:\s*{)/,uu=/^(?:async\s)?\s*(?:\(\s*)?((?:[^)=\s]\s*)*)(?:\)\s*)?=>/,ou=/,/,su=/(=.+)?(\s*)$/;function lu(f){let n="",u=0,s=f.indexOf("*/");for(;u<f.length;)if(f[u]==="/"&&f[u+1]==="/"){let h=f.indexOf(`
2
2
  `,u);u=h===-1?f.length:h}else if(s!==-1&&f[u]==="/"&&f[u+1]==="*"){let h=f.indexOf("*/",u);h!==-1?(u=h+2,s=f.indexOf("*/",u)):(n+=f[u],u++)}else n+=f[u],u++;return n}function hu(f){let n=lu(f.toString()),u=n.match(fu);if(u||(u=n.match(uu)),!u)throw new Error(`could not parse args in autoInject
3
3
  Source:
4
4
  `+n);let[,s]=u;return s.replace(/\s/g,"").split(ou).map(h=>h.replace(su,"").trim())}function Qi(f,n){var u={};return Object.keys(f).forEach(s=>{var h=f[s],c,d=O(h),p=!d&&h.length===1||d&&h.length===0;if(Array.isArray(h))c=[...h],h=c.pop(),u[s]=c.concat(c.length>0?g:h);else if(p)u[s]=h;else{if(c=hu(h),h.length===0&&!d&&c.length===0)throw new Error("autoInject task functions require explicit parameters.");d||c.pop(),u[s]=c.concat(g)}function g(m,C){var B=c.map(P=>m[P]);B.push(C),b(h)(...B)}}),Ir(u,n)}class cu{constructor(){this.head=this.tail=null,this.length=0}removeLink(n){return n.prev?n.prev.next=n.next:this.head=n.next,n.next?n.next.prev=n.prev:this.tail=n.prev,n.prev=n.next=null,this.length-=1,n}empty(){for(;this.head;)this.shift();return this}insertAfter(n,u){u.prev=n,u.next=n.next,n.next?n.next.prev=u:this.tail=u,n.next=u,this.length+=1}insertBefore(n,u){u.prev=n.prev,u.next=n,n.prev?n.prev.next=u:this.head=u,n.prev=u,this.length+=1}unshift(n){this.head?this.insertBefore(this.head,n):Xi(this,n)}push(n){this.tail?this.insertAfter(this.tail,n):Xi(this,n)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var n=this.head;n;)yield n.data,n=n.next}remove(n){for(var u=this.head;u;){var{next:s}=u;n(u)&&this.removeLink(u),u=s}return this}}function Xi(f,n){f.length=1,f.head=f.tail=n}function kr(f,n,u){if(n==null)n=1;else if(n===0)throw new RangeError("Concurrency must not be zero");var s=b(f),h=0,c=[];let d={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function p(E,w){d[E].push(w)}function g(E,w){let R=(...D)=>{m(E,R),w(...D)};d[E].push(R)}function m(E,w){if(!E)return Object.keys(d).forEach(R=>d[R]=[]);if(!w)return d[E]=[];d[E]=d[E].filter(R=>R!==w)}function C(E,...w){d[E].forEach(R=>R(...w))}var B=!1;function P(E,w,R,D){if(D!=null&&typeof D!="function")throw new Error("task callback must be a function");N.started=!0;var U,z;function J(Me,...ot){if(Me)return R?z(Me):U();if(ot.length<=1)return U(ot[0]);U(ot)}var Ue=N._createTaskItem(E,R?J:D||J);if(w?N._tasks.unshift(Ue):N._tasks.push(Ue),B||(B=!0,T(()=>{B=!1,N.process()})),R||!D)return new Promise((Me,ot)=>{U=Me,z=ot})}function Z(E){return function(w,...R){h-=1;for(var D=0,U=E.length;D<U;D++){var z=E[D],J=c.indexOf(z);J===0?c.shift():J>0&&c.splice(J,1),z.callback(w,...R),w!=null&&C("error",w,z.data)}h<=N.concurrency-N.buffer&&C("unsaturated"),N.idle()&&C("drain"),N.process()}}function We(E){return E.length===0&&N.idle()?(T(()=>C("drain")),!0):!1}let Oe=E=>w=>{if(!w)return new Promise((R,D)=>{g(E,(U,z)=>{if(U)return D(U);R(z)})});m(E),p(E,w)};var ut=!1,N={_tasks:new cu,_createTaskItem(E,w){return{data:E,callback:w}},*[Symbol.iterator](){yield*N._tasks[Symbol.iterator]()},concurrency:n,payload:u,buffer:n/4,started:!1,paused:!1,push(E,w){return Array.isArray(E)?We(E)?void 0:E.map(R=>P(R,!1,!1,w)):P(E,!1,!1,w)},pushAsync(E,w){return Array.isArray(E)?We(E)?void 0:E.map(R=>P(R,!1,!0,w)):P(E,!1,!0,w)},kill(){m(),N._tasks.empty()},unshift(E,w){return Array.isArray(E)?We(E)?void 0:E.map(R=>P(R,!0,!1,w)):P(E,!0,!1,w)},unshiftAsync(E,w){return Array.isArray(E)?We(E)?void 0:E.map(R=>P(R,!0,!0,w)):P(E,!0,!0,w)},remove(E){N._tasks.remove(E)},process(){if(!ut){for(ut=!0;!N.paused&&h<N.concurrency&&N._tasks.length;){var E=[],w=[],R=N._tasks.length;N.payload&&(R=Math.min(R,N.payload));for(var D=0;D<R;D++){var U=N._tasks.shift();E.push(U),c.push(U),w.push(U.data)}h+=1,N._tasks.length===0&&C("empty"),h===N.concurrency&&C("saturated");var z=_e(Z(E));s(w,z)}ut=!1}},length(){return N._tasks.length},running(){return h},workersList(){return c},idle(){return N._tasks.length+h===0},pause(){N.paused=!0},resume(){N.paused!==!1&&(N.paused=!1,T(N.process))}};return Object.defineProperties(N,{saturated:{writable:!1,value:Oe("saturated")},unsaturated:{writable:!1,value:Oe("unsaturated")},empty:{writable:!1,value:Oe("empty")},drain:{writable:!1,value:Oe("drain")},error:{writable:!1,value:Oe("error")}}),N}function Zi(f,n){return kr(f,1,n)}function Ji(f,n,u){return kr(f,n,u)}function du(f,n,u,s){s=ve(s);var h=b(u);return ne(f,(c,d,p)=>{h(n,c,(g,m)=>{n=m,p(g)})},c=>s(c,n))}var we=S(du,4);function Wr(...f){var n=f.map(b);return function(...u){var s=this,h=u[u.length-1];return typeof h=="function"?u.pop():h=Ie(),we(n,u,(c,d,p)=>{d.apply(s,c.concat((g,...m)=>{p(g,m)}))},(c,d)=>h(c,...d)),h[Ne]}}function en(...f){return Wr(...f.reverse())}function pu(f,n,u,s){return Br(ie(n),f,u,s)}var rt=S(pu,4);function gu(f,n,u,s){var h=b(u);return rt(f,n,(c,d)=>{h(c,(p,...g)=>p?d(p):d(p,g))},(c,d)=>{for(var p=[],g=0;g<d.length;g++)d[g]&&(p=p.concat(...d[g]));return s(c,p)})}var ke=S(gu,4);function yu(f,n,u){return ke(f,1/0,n,u)}var Dt=S(yu,3);function vu(f,n,u){return ke(f,1,n,u)}var jt=S(vu,3);function tn(...f){return function(...n){var u=n.pop();return u(null,...f)}}function le(f,n){return(u,s,h,c)=>{var d=!1,p;let g=b(h);u(s,(m,C,B)=>{g(m,(P,Z)=>{if(P||P===!1)return B(P);if(f(Z)&&!p)return d=!0,p=n(!0,m),B(null,Ct);B()})},m=>{if(m)return c(m);c(null,d?p:n(!1))})}}function _u(f,n,u){return le(s=>s,(s,h)=>h)(X,f,n,u)}var Bt=S(_u,3);function wu(f,n,u,s){return le(h=>h,(h,c)=>c)(ie(n),f,u,s)}var Nt=S(wu,4);function mu(f,n,u){return le(s=>s,(s,h)=>h)(ie(1),f,n,u)}var It=S(mu,3);function rn(f){return(n,...u)=>b(n)(...u,(s,...h)=>{typeof console=="object"&&(s?console.error&&console.error(s):console[f]&&h.forEach(c=>console[f](c)))})}var nn=rn("dir");function bu(f,n,u){u=_e(u);var s=b(f),h=b(n),c;function d(g,...m){if(g)return u(g);g!==!1&&(c=m,h(...m,p))}function p(g,m){if(g)return u(g);if(g!==!1){if(!m)return u(null,...c);s(d)}}return p(null,!0)}var it=S(bu,3);function an(f,n,u){let s=b(n);return it(f,(...h)=>{let c=h.pop();s(...h,(d,p)=>c(d,!p))},u)}function fn(f){return(n,u,s)=>f(n,s)}function Su(f,n,u){return X(f,fn(b(n)),u)}var kt=S(Su,3);function Eu(f,n,u,s){return ie(n)(f,fn(b(u)),s)}var nt=S(Eu,4);function Ru(f,n,u){return nt(f,1,n,u)}var at=S(Ru,3);function Ur(f){return O(f)?f:function(...n){var u=n.pop(),s=!0;n.push((...h)=>{s?T(()=>u(...h)):u(...h)}),f.apply(this,n),s=!1}}function Tu(f,n,u){return le(s=>!s,s=>!s)(X,f,n,u)}var Wt=S(Tu,3);function Lu(f,n,u,s){return le(h=>!h,h=>!h)(ie(n),f,u,s)}var Ut=S(Lu,4);function Ou(f,n,u){return le(s=>!s,s=>!s)(ne,f,n,u)}var Ft=S(Ou,3);function Mu(f,n,u,s){var h=new Array(n.length);f(n,(c,d,p)=>{u(c,(g,m)=>{h[d]=!!m,p(g)})},c=>{if(c)return s(c);for(var d=[],p=0;p<n.length;p++)h[p]&&d.push(n[p]);s(null,d)})}function Au(f,n,u,s){var h=[];f(n,(c,d,p)=>{u(c,(g,m)=>{if(g)return p(g);m&&h.push({index:d,value:c}),p(g)})},c=>{if(c)return s(c);s(null,h.sort((d,p)=>d.index-p.index).map(d=>d.value))})}function $t(f,n,u,s){var h=xt(n)?Mu:Au;return h(f,n,b(u),s)}function qu(f,n,u){return $t(X,f,n,u)}var Ht=S(qu,3);function xu(f,n,u,s){return $t(ie(n),f,u,s)}var Gt=S(xu,4);function Cu(f,n,u){return $t(ne,f,n,u)}var zt=S(Cu,3);function Pu(f,n){var u=_e(n),s=b(Ur(f));function h(c){if(c)return u(c);c!==!1&&s(h)}return h()}var un=S(Pu,2);function Du(f,n,u,s){var h=b(u);return rt(f,n,(c,d)=>{h(c,(p,g)=>p?d(p):d(p,{key:g,val:c}))},(c,d)=>{for(var p={},{hasOwnProperty:g}=Object.prototype,m=0;m<d.length;m++)if(d[m]){var{key:C}=d[m],{val:B}=d[m];g.call(p,C)?p[C].push(B):p[C]=[B]}return s(c,p)})}var Vt=S(Du,4);function on(f,n,u){return Vt(f,1/0,n,u)}function sn(f,n,u){return Vt(f,1,n,u)}var ln=rn("log");function ju(f,n,u,s){s=ve(s);var h={},c=b(u);return ie(n)(f,(d,p,g)=>{c(d,p,(m,C)=>{if(m)return g(m);h[p]=C,g(m)})},d=>s(d,h))}var Kt=S(ju,4);function hn(f,n,u){return Kt(f,1/0,n,u)}function cn(f,n,u){return Kt(f,1,n,u)}function dn(f,n=u=>u){var u=Object.create(null),s=Object.create(null),h=b(f),c=r((d,p)=>{var g=n(...d);g in u?T(()=>p(null,...u[g])):g in s?s[g].push(p):(s[g]=[p],h(...d,(m,...C)=>{m||(u[g]=C);var B=s[g];delete s[g];for(var P=0,Z=B.length;P<Z;P++)B[P](m,...C)}))});return c.memo=u,c.unmemoized=f,c}var Yt;o?Yt=process.nextTick:a?Yt=setImmediate:Yt=l;var pn=y(Yt),Fr=S((f,n,u)=>{var s=xt(n)?[]:{};f(n,(h,c,d)=>{b(h)((p,...g)=>{g.length<2&&([g]=g),s[c]=g,d(p)})},h=>u(h,s))},3);function gn(f,n){return Fr(X,f,n)}function yn(f,n,u){return Fr(ie(n),f,u)}function $r(f,n){var u=b(f);return kr((s,h)=>{u(s[0],h)},n,1)}class Bu{constructor(){this.heap=[],this.pushCount=Number.MIN_SAFE_INTEGER}get length(){return this.heap.length}empty(){return this.heap=[],this}percUp(n){let u;for(;n>0&&Hr(this.heap[n],this.heap[u=vn(n)]);){let s=this.heap[n];this.heap[n]=this.heap[u],this.heap[u]=s,n=u}}percDown(n){let u;for(;(u=Nu(n))<this.heap.length&&(u+1<this.heap.length&&Hr(this.heap[u+1],this.heap[u])&&(u=u+1),!Hr(this.heap[n],this.heap[u]));){let s=this.heap[n];this.heap[n]=this.heap[u],this.heap[u]=s,n=u}}push(n){n.pushCount=++this.pushCount,this.heap.push(n),this.percUp(this.heap.length-1)}unshift(n){return this.heap.push(n)}shift(){let[n]=this.heap;return this.heap[0]=this.heap[this.heap.length-1],this.heap.pop(),this.percDown(0),n}toArray(){return[...this]}*[Symbol.iterator](){for(let n=0;n<this.heap.length;n++)yield this.heap[n].data}remove(n){let u=0;for(let s=0;s<this.heap.length;s++)n(this.heap[s])||(this.heap[u]=this.heap[s],u++);this.heap.splice(u);for(let s=vn(this.heap.length-1);s>=0;s--)this.percDown(s);return this}}function Nu(f){return(f<<1)+1}function vn(f){return(f+1>>1)-1}function Hr(f,n){return f.priority!==n.priority?f.priority<n.priority:f.pushCount<n.pushCount}function _n(f,n){var u=$r(f,n),{push:s,pushAsync:h}=u;u._tasks=new Bu,u._createTaskItem=({data:d,priority:p},g)=>({data:d,priority:p,callback:g});function c(d,p){return Array.isArray(d)?d.map(g=>({data:g,priority:p})):{data:d,priority:p}}return u.push=function(d,p=0,g){return s(c(d,p),g)},u.pushAsync=function(d,p=0,g){return h(c(d,p),g)},delete u.unshift,delete u.unshiftAsync,u}function Iu(f,n){if(n=ve(n),!Array.isArray(f))return n(new TypeError("First argument to race must be an array of functions"));if(!f.length)return n();for(var u=0,s=f.length;u<s;u++)b(f[u])(n)}var wn=S(Iu,2);function Qt(f,n,u,s){var h=[...f].reverse();return we(h,n,u,s)}function Xt(f){var n=b(f);return r(function(s,h){return s.push((c,...d)=>{let p={};if(c&&(p.error=c),d.length>0){var g=d;d.length<=1&&([g]=d),p.value=g}h(null,p)}),n.apply(this,s)})}function mn(f){var n;return Array.isArray(f)?n=f.map(Xt):(n={},Object.keys(f).forEach(u=>{n[u]=Xt.call(this,f[u])})),n}function Gr(f,n,u,s){let h=b(u);return $t(f,n,(c,d)=>{h(c,(p,g)=>{d(p,!g)})},s)}function ku(f,n,u){return Gr(X,f,n,u)}var bn=S(ku,3);function Wu(f,n,u,s){return Gr(ie(n),f,u,s)}var Sn=S(Wu,4);function Uu(f,n,u){return Gr(ne,f,n,u)}var En=S(Uu,3);function Rn(f){return function(){return f}}let zr=5,Tn=0;function Zt(f,n,u){var s={times:zr,intervalFunc:Rn(Tn)};if(arguments.length<3&&typeof f=="function"?(u=n||Ie(),n=f):(Fu(s,f),u=u||Ie()),typeof n!="function")throw new Error("Invalid arguments for async.retry");var h=b(n),c=1;function d(){h((p,...g)=>{p!==!1&&(p&&c++<s.times&&(typeof s.errorFilter!="function"||s.errorFilter(p))?setTimeout(d,s.intervalFunc(c-1)):u(p,...g))})}return d(),u[Ne]}function Fu(f,n){if(typeof n=="object")f.times=+n.times||zr,f.intervalFunc=typeof n.interval=="function"?n.interval:Rn(+n.interval||Tn),f.errorFilter=n.errorFilter;else if(typeof n=="number"||typeof n=="string")f.times=+n||zr;else throw new Error("Invalid arguments for async.retry")}function Ln(f,n){n||(n=f,f=null);let u=f&&f.arity||n.length;O(n)&&(u+=1);var s=b(n);return r((h,c)=>{(h.length<u-1||c==null)&&(h.push(c),c=Ie());function d(p){s(...h,p)}return f?Zt(f,d,c):Zt(d,c),c[Ne]})}function On(f,n){return Fr(ne,f,n)}function $u(f,n,u){return le(Boolean,s=>s)(X,f,n,u)}var Jt=S($u,3);function Hu(f,n,u,s){return le(Boolean,h=>h)(ie(n),f,u,s)}var er=S(Hu,4);function Gu(f,n,u){return le(Boolean,s=>s)(ne,f,n,u)}var tr=S(Gu,3);function zu(f,n,u){var s=b(n);return Pt(f,(c,d)=>{s(c,(p,g)=>{if(p)return d(p);d(p,{value:c,criteria:g})})},(c,d)=>{if(c)return u(c);u(null,d.sort(h).map(p=>p.value))});function h(c,d){var p=c.criteria,g=d.criteria;return p<g?-1:p>g?1:0}}var Mn=S(zu,3);function An(f,n,u){var s=b(f);return r((h,c)=>{var d=!1,p;function g(){var m=f.name||"anonymous",C=new Error('Callback function "'+m+'" timed out.');C.code="ETIMEDOUT",u&&(C.info=u),d=!0,c(C)}h.push((...m)=>{d||(c(...m),clearTimeout(p))}),p=setTimeout(g,n),s(...h)})}function Vu(f){for(var n=Array(f);f--;)n[f]=f;return n}function rr(f,n,u,s){var h=b(u);return rt(Vu(f),n,h,s)}function qn(f,n,u){return rr(f,1/0,n,u)}function xn(f,n,u){return rr(f,1,n,u)}function Cn(f,n,u,s){arguments.length<=3&&typeof n=="function"&&(s=u,u=n,n=Array.isArray(f)?[]:{}),s=ve(s||Ie());var h=b(u);return X(f,(c,d,p)=>{h(n,c,d,p)},c=>s(c,n)),s[Ne]}function Ku(f,n){var u=null,s;return at(f,(h,c)=>{b(h)((d,...p)=>{if(d===!1)return c(d);p.length<2?[s]=p:s=p,u=d,c(d?null:{})})},()=>n(u,s))}var Pn=S(Ku);function Dn(f){return(...n)=>(f.unmemoized||f)(...n)}function Yu(f,n,u){u=_e(u);var s=b(n),h=b(f),c=[];function d(g,...m){if(g)return u(g);c=m,g!==!1&&h(p)}function p(g,m){if(g)return u(g);if(g!==!1){if(!m)return u(null,...c);s(d)}}return h(p)}var ft=S(Yu,3);function jn(f,n,u){let s=b(f);return ft(h=>s((c,d)=>h(c,!d)),n,u)}function Qu(f,n){if(n=ve(n),!Array.isArray(f))return n(new Error("First argument to waterfall must be an array of functions"));if(!f.length)return n();var u=0;function s(c){var d=b(f[u++]);d(...c,_e(h))}function h(c,...d){if(c!==!1){if(c||u===f.length)return n(c,...d);s(d)}}s([])}var Bn=S(Qu),Xu={apply:t,applyEach:Ki,applyEachSeries:Yi,asyncify:x,auto:Ir,autoInject:Qi,cargo:Zi,cargoQueue:Ji,compose:en,concat:Dt,concatLimit:ke,concatSeries:jt,constant:tn,detect:Bt,detectLimit:Nt,detectSeries:It,dir:nn,doUntil:an,doWhilst:it,each:kt,eachLimit:nt,eachOf:X,eachOfLimit:Be,eachOfSeries:ne,eachSeries:at,ensureAsync:Ur,every:Wt,everyLimit:Ut,everySeries:Ft,filter:Ht,filterLimit:Gt,filterSeries:zt,forever:un,groupBy:on,groupByLimit:Vt,groupBySeries:sn,log:ln,map:Pt,mapLimit:rt,mapSeries:Nr,mapValues:hn,mapValuesLimit:Kt,mapValuesSeries:cn,memoize:dn,nextTick:pn,parallel:gn,parallelLimit:yn,priorityQueue:_n,queue:$r,race:wn,reduce:we,reduceRight:Qt,reflect:Xt,reflectAll:mn,reject:bn,rejectLimit:Sn,rejectSeries:En,retry:Zt,retryable:Ln,seq:Wr,series:On,setImmediate:T,some:Jt,someLimit:er,someSeries:tr,sortBy:Mn,timeout:An,times:qn,timesLimit:rr,timesSeries:xn,transform:Cn,tryEach:Pn,unmemoize:Dn,until:jn,waterfall:Bn,whilst:ft,all:Wt,allLimit:Ut,allSeries:Ft,any:Jt,anyLimit:er,anySeries:tr,find:Bt,findLimit:Nt,findSeries:It,flatMap:Dt,flatMapLimit:ke,flatMapSeries:jt,forEach:kt,forEachSeries:at,forEachLimit:nt,forEachOf:X,forEachOfSeries:ne,forEachOfLimit:Be,inject:we,foldl:we,foldr:Qt,select:Ht,selectLimit:Gt,selectSeries:zt,wrapSync:x,during:ft,doDuring:it};e.all=Wt,e.allLimit=Ut,e.allSeries=Ft,e.any=Jt,e.anyLimit=er,e.anySeries=tr,e.apply=t,e.applyEach=Ki,e.applyEachSeries=Yi,e.asyncify=x,e.auto=Ir,e.autoInject=Qi,e.cargo=Zi,e.cargoQueue=Ji,e.compose=en,e.concat=Dt,e.concatLimit=ke,e.concatSeries=jt,e.constant=tn,e.default=Xu,e.detect=Bt,e.detectLimit=Nt,e.detectSeries=It,e.dir=nn,e.doDuring=it,e.doUntil=an,e.doWhilst=it,e.during=ft,e.each=kt,e.eachLimit=nt,e.eachOf=X,e.eachOfLimit=Be,e.eachOfSeries=ne,e.eachSeries=at,e.ensureAsync=Ur,e.every=Wt,e.everyLimit=Ut,e.everySeries=Ft,e.filter=Ht,e.filterLimit=Gt,e.filterSeries=zt,e.find=Bt,e.findLimit=Nt,e.findSeries=It,e.flatMap=Dt,e.flatMapLimit=ke,e.flatMapSeries=jt,e.foldl=we,e.foldr=Qt,e.forEach=kt,e.forEachLimit=nt,e.forEachOf=X,e.forEachOfLimit=Be,e.forEachOfSeries=ne,e.forEachSeries=at,e.forever=un,e.groupBy=on,e.groupByLimit=Vt,e.groupBySeries=sn,e.inject=we,e.log=ln,e.map=Pt,e.mapLimit=rt,e.mapSeries=Nr,e.mapValues=hn,e.mapValuesLimit=Kt,e.mapValuesSeries=cn,e.memoize=dn,e.nextTick=pn,e.parallel=gn,e.parallelLimit=yn,e.priorityQueue=_n,e.queue=$r,e.race=wn,e.reduce=we,e.reduceRight=Qt,e.reflect=Xt,e.reflectAll=mn,e.reject=bn,e.rejectLimit=Sn,e.rejectSeries=En,e.retry=Zt,e.retryable=Ln,e.select=Ht,e.selectLimit=Gt,e.selectSeries=zt,e.seq=Wr,e.series=On,e.setImmediate=T,e.some=Jt,e.someLimit=er,e.someSeries=tr,e.sortBy=Mn,e.timeout=An,e.times=qn,e.timesLimit=rr,e.timesSeries=xn,e.transform=Cn,e.tryEach=Pn,e.unmemoize=Dn,e.until=jn,e.waterfall=Bn,e.whilst=ft,e.wrapSync=x,Object.defineProperty(e,"__esModule",{value:!0})}))});var Vr=A((Qh,kn)=>{v();kn.exports=$("stream")});var Gn=A((Zh,Hn)=>{"use strict";v();function Wn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,i)}return r}function Un(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Wn(Object(r),!0).forEach(function(i){to(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wn(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function to(e,t,r){return t=$n(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ro(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fn(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,$n(i.key),i)}}function io(e,t,r){return t&&Fn(e.prototype,t),r&&Fn(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function $n(e){var t=no(e,"string");return typeof t=="symbol"?t:String(t)}function no(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ao=$("buffer"),nr=ao.Buffer,fo=$("util"),Kr=fo.inspect,uo=Kr&&Kr.custom||"inspect";function oo(e,t,r){nr.prototype.copy.call(e,t,r)}Hn.exports=(function(){function e(){ro(this,e),this.head=null,this.tail=null,this.length=0}return io(e,[{key:"push",value:function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var i=this.head,a=""+i.data;i=i.next;)a+=r+i.data;return a}},{key:"concat",value:function(r){if(this.length===0)return nr.alloc(0);for(var i=nr.allocUnsafe(r>>>0),a=this.head,o=0;a;)oo(a.data,i,o),o+=a.data.length,a=a.next;return i}},{key:"consume",value:function(r,i){var a;return r<this.head.data.length?(a=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?a=this.shift():a=i?this._getString(r):this._getBuffer(r),a}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var i=this.head,a=1,o=i.data;for(r-=o.length;i=i.next;){var l=i.data,y=r>l.length?l.length:r;if(y===l.length?o+=l:o+=l.slice(0,r),r-=y,r===0){y===l.length?(++a,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=l.slice(y));break}++a}return this.length-=a,o}},{key:"_getBuffer",value:function(r){var i=nr.allocUnsafe(r),a=this.head,o=1;for(a.data.copy(i),r-=a.data.length;a=a.next;){var l=a.data,y=r>l.length?l.length:r;if(l.copy(i,i.length-r,0,y),r-=y,r===0){y===l.length?(++o,a.next?this.head=a.next:this.head=this.tail=null):(this.head=a,a.data=l.slice(y));break}++o}return this.length-=o,i}},{key:uo,value:function(r,i){return Kr(this,Un(Un({},i),{},{depth:0,customInspect:!1}))}}]),e})()});var Qr=A((ec,Vn)=>{"use strict";v();function so(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return i||a?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(Yr,this,e)):process.nextTick(Yr,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(o){!t&&o?r._writableState?r._writableState.errorEmitted?process.nextTick(ar,r):(r._writableState.errorEmitted=!0,process.nextTick(zn,r,o)):process.nextTick(zn,r,o):t?(process.nextTick(ar,r),t(o)):process.nextTick(ar,r)}),this)}function zn(e,t){Yr(e,t),ar(e)}function ar(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function lo(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Yr(e,t){e.emit("error",t)}function ho(e,t){var r=e._readableState,i=e._writableState;r&&r.autoDestroy||i&&i.autoDestroy?e.destroy(t):e.emit("error",t)}Vn.exports={destroy:so,undestroy:lo,errorOrDestroy:ho}});var me=A((rc,Qn)=>{"use strict";v();var Yn={};function te(e,t,r){r||(r=Error);function i(o,l,y){return typeof t=="string"?t:t(o,l,y)}class a extends r{constructor(l,y,_){super(i(l,y,_))}}a.prototype.name=r.name,a.prototype.code=e,Yn[e]=a}function Kn(e,t){if(Array.isArray(e)){let r=e.length;return e=e.map(i=>String(i)),r>2?`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]:r===2?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}else return`of ${t} ${String(e)}`}function co(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function po(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function go(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}te("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);te("ERR_INVALID_ARG_TYPE",function(e,t,r){let i;typeof t=="string"&&co(t,"not ")?(i="must not be",t=t.replace(/^not /,"")):i="must be";let a;if(po(e," argument"))a=`The ${e} ${i} ${Kn(t,"type")}`;else{let o=go(e,".")?"property":"argument";a=`The "${e}" ${o} ${i} ${Kn(t,"type")}`}return a+=`. Received type ${typeof r}`,a},TypeError);te("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");te("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});te("ERR_STREAM_PREMATURE_CLOSE","Premature close");te("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});te("ERR_MULTIPLE_CALLBACK","Callback called multiple times");te("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");te("ERR_STREAM_WRITE_AFTER_END","write after end");te("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);te("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);te("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Qn.exports.codes=Yn});var Xr=A((nc,Xn)=>{"use strict";v();var yo=me().codes.ERR_INVALID_OPT_VALUE;function vo(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function _o(e,t,r,i){var a=vo(t,i,r);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var o=i?r:"highWaterMark";throw new yo(o,a)}return Math.floor(a)}return e.objectMode?16:16*1024}Xn.exports={getHighWaterMark:_o}});var ei=A((fc,ia)=>{"use strict";v();ia.exports=F;function Jn(e){var t=this;this.next=null,this.entry=null,this.finish=function(){Go(t,e)}}var Fe;F.WritableState=lt;var wo={deprecate:Nn()},ea=Vr(),ur=$("buffer").Buffer,mo=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function bo(e){return ur.from(e)}function So(e){return ur.isBuffer(e)||e instanceof mo}var Jr=Qr(),Eo=Xr(),Ro=Eo.getHighWaterMark,be=me().codes,To=be.ERR_INVALID_ARG_TYPE,Lo=be.ERR_METHOD_NOT_IMPLEMENTED,Oo=be.ERR_MULTIPLE_CALLBACK,Mo=be.ERR_STREAM_CANNOT_PIPE,Ao=be.ERR_STREAM_DESTROYED,qo=be.ERR_STREAM_NULL_VALUES,xo=be.ERR_STREAM_WRITE_AFTER_END,Co=be.ERR_UNKNOWN_ENCODING,$e=Jr.errorOrDestroy;ee()(F,ea);function Po(){}function lt(e,t,r){Fe=Fe||Ae(),e=e||{},typeof r!="boolean"&&(r=t instanceof Fe),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=Ro(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=e.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(a){Wo(t,a)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new Jn(this)}lt.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(lt.prototype,"buffer",{get:wo.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var fr;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(fr=Function.prototype[Symbol.hasInstance],Object.defineProperty(F,Symbol.hasInstance,{value:function(t){return fr.call(this,t)?!0:this!==F?!1:t&&t._writableState instanceof lt}})):fr=function(t){return t instanceof this};function F(e){Fe=Fe||Ae();var t=this instanceof Fe;if(!t&&!fr.call(F,this))return new F(e);this._writableState=new lt(e,this,t),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),ea.call(this)}F.prototype.pipe=function(){$e(this,new Mo)};function Do(e,t){var r=new xo;$e(e,r),process.nextTick(t,r)}function jo(e,t,r,i){var a;return r===null?a=new qo:typeof r!="string"&&!t.objectMode&&(a=new To("chunk",["string","Buffer"],r)),a?($e(e,a),process.nextTick(i,a),!1):!0}F.prototype.write=function(e,t,r){var i=this._writableState,a=!1,o=!i.objectMode&&So(e);return o&&!ur.isBuffer(e)&&(e=bo(e)),typeof t=="function"&&(r=t,t=null),o?t="buffer":t||(t=i.defaultEncoding),typeof r!="function"&&(r=Po),i.ending?Do(this,r):(o||jo(this,i,e,r))&&(i.pendingcb++,a=No(this,i,o,e,t,r)),a};F.prototype.cork=function(){this._writableState.corked++};F.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&ta(this,e))};F.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new Co(t);return this._writableState.defaultEncoding=t,this};Object.defineProperty(F.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Bo(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=ur.from(t,r)),t}Object.defineProperty(F.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function No(e,t,r,i,a,o){if(!r){var l=Bo(t,i,a);i!==l&&(r=!0,a="buffer",i=l)}var y=t.objectMode?1:i.length;t.length+=y;var _=t.length<t.highWaterMark;if(_||(t.needDrain=!0),t.writing||t.corked){var T=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:a,isBuf:r,callback:o,next:null},T?T.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else Zr(e,t,!1,y,i,a,o);return _}function Zr(e,t,r,i,a,o,l){t.writelen=i,t.writecb=l,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new Ao("write")):r?e._writev(a,t.onwrite):e._write(a,o,t.onwrite),t.sync=!1}function Io(e,t,r,i,a){--t.pendingcb,r?(process.nextTick(a,i),process.nextTick(st,e,t),e._writableState.errorEmitted=!0,$e(e,i)):(a(i),e._writableState.errorEmitted=!0,$e(e,i),st(e,t))}function ko(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function Wo(e,t){var r=e._writableState,i=r.sync,a=r.writecb;if(typeof a!="function")throw new Oo;if(ko(r),t)Io(e,r,i,t,a);else{var o=ra(r)||e.destroyed;!o&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&ta(e,r),i?process.nextTick(Zn,e,r,o,a):Zn(e,r,o,a)}}function Zn(e,t,r,i){r||Uo(e,t),t.pendingcb--,i(),st(e,t)}function Uo(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function ta(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,a=new Array(i),o=t.corkedRequestsFree;o.entry=r;for(var l=0,y=!0;r;)a[l]=r,r.isBuf||(y=!1),r=r.next,l+=1;a.allBuffers=y,Zr(e,t,!0,t.length,a,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new Jn(t),t.bufferedRequestCount=0}else{for(;r;){var _=r.chunk,T=r.encoding,x=r.callback,M=t.objectMode?1:_.length;if(Zr(e,t,!1,M,_,T,x),r=r.next,t.bufferedRequestCount--,t.writing)break}r===null&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}F.prototype._write=function(e,t,r){r(new Lo("_write()"))};F.prototype._writev=null;F.prototype.end=function(e,t,r){var i=this._writableState;return typeof e=="function"?(r=e,e=null,t=null):typeof t=="function"&&(r=t,t=null),e!=null&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||Ho(this,i,r),this};Object.defineProperty(F.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function ra(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function Fo(e,t){e._final(function(r){t.pendingcb--,r&&$e(e,r),t.prefinished=!0,e.emit("prefinish"),st(e,t)})}function $o(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"&&!t.destroyed?(t.pendingcb++,t.finalCalled=!0,process.nextTick(Fo,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function st(e,t){var r=ra(t);if(r&&($o(e,t),t.pendingcb===0&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return r}function Ho(e,t,r){t.ending=!0,st(e,t),r&&(t.finished?process.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function Go(e,t,r){var i=e.entry;for(e.entry=null;i;){var a=i.callback;t.pendingcb--,a(r),i=i.next}t.corkedRequestsFree.next=e}Object.defineProperty(F.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}});F.prototype.destroy=Jr.destroy;F.prototype._undestroy=Jr.undestroy;F.prototype._destroy=function(e,t){t(e)}});var Ae=A((oc,aa)=>{"use strict";v();var zo=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};aa.exports=fe;var na=ii(),ri=ei();ee()(fe,na);for(ti=zo(ri.prototype),or=0;or<ti.length;or++)sr=ti[or],fe.prototype[sr]||(fe.prototype[sr]=ri.prototype[sr]);var ti,sr,or;function fe(e){if(!(this instanceof fe))return new fe(e);na.call(this,e),ri.call(this,e),this.allowHalfOpen=!0,e&&(e.readable===!1&&(this.readable=!1),e.writable===!1&&(this.writable=!1),e.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",Vo)))}Object.defineProperty(fe.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(fe.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(fe.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Vo(){this._writableState.ended||process.nextTick(Ko,this)}function Ko(e){e.end()}Object.defineProperty(fe.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(t){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=t,this._writableState.destroyed=t)}})});var oa=A((ni,ua)=>{v();var lr=$("buffer"),ue=lr.Buffer;function fa(e,t){for(var r in e)t[r]=e[r]}ue.from&&ue.alloc&&ue.allocUnsafe&&ue.allocUnsafeSlow?ua.exports=lr:(fa(lr,ni),ni.Buffer=qe);function qe(e,t,r){return ue(e,t,r)}qe.prototype=Object.create(ue.prototype);fa(ue,qe);qe.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return ue(e,t,r)};qe.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var i=ue(e);return t!==void 0?typeof r=="string"?i.fill(t,r):i.fill(t):i.fill(0),i};qe.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return ue(e)};qe.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return lr.SlowBuffer(e)}});var ui=A(la=>{"use strict";v();var fi=oa().Buffer,sa=fi.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Yo(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function Qo(e){var t=Yo(e);if(typeof t!="string"&&(fi.isEncoding===sa||!sa(e)))throw new Error("Unknown encoding: "+e);return t||e}la.StringDecoder=ht;function ht(e){this.encoding=Qo(e);var t;switch(this.encoding){case"utf16le":this.text=rs,this.end=is,t=4;break;case"utf8":this.fillLast=Jo,t=4;break;case"base64":this.text=ns,this.end=as,t=3;break;default:this.write=fs,this.end=us;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=fi.allocUnsafe(t)}ht.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""};ht.prototype.end=ts;ht.prototype.text=es;ht.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function ai(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function Xo(e,t,r){var i=t.length-1;if(i<r)return 0;var a=ai(t[i]);return a>=0?(a>0&&(e.lastNeed=a-1),a):--i<r||a===-2?0:(a=ai(t[i]),a>=0?(a>0&&(e.lastNeed=a-2),a):--i<r||a===-2?0:(a=ai(t[i]),a>=0?(a>0&&(a===2?a=0:e.lastNeed=a-3),a):0))}function Zo(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}function Jo(e){var t=this.lastTotal-this.lastNeed,r=Zo(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function es(e,t){var r=Xo(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)}function ts(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function rs(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function is(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function ns(e,t){var r=(e.length-t)%3;return r===0?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function as(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function fs(e){return e.toString(this.encoding)}function us(e){return e&&e.length?this.write(e):""}});var hr=A((dc,da)=>{"use strict";v();var ha=me().codes.ERR_STREAM_PREMATURE_CLOSE;function os(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];e.apply(this,i)}}}function ss(){}function ls(e){return e.setHeader&&typeof e.abort=="function"}function ca(e,t,r){if(typeof t=="function")return ca(e,null,t);t||(t={}),r=os(r||ss);var i=t.readable||t.readable!==!1&&e.readable,a=t.writable||t.writable!==!1&&e.writable,o=function(){e.writable||y()},l=e._writableState&&e._writableState.finished,y=function(){a=!1,l=!0,i||r.call(e)},_=e._readableState&&e._readableState.endEmitted,T=function(){i=!1,_=!0,a||r.call(e)},x=function(H){r.call(e,H)},M=function(){var H;if(i&&!_)return(!e._readableState||!e._readableState.ended)&&(H=new ha),r.call(e,H);if(a&&!l)return(!e._writableState||!e._writableState.ended)&&(H=new ha),r.call(e,H)},L=function(){e.req.on("finish",y)};return ls(e)?(e.on("complete",y),e.on("abort",M),e.req?L():e.on("request",L)):a&&!e._writableState&&(e.on("end",o),e.on("close",o)),e.on("end",T),e.on("finish",y),t.error!==!1&&e.on("error",x),e.on("close",M),function(){e.removeListener("complete",y),e.removeListener("abort",M),e.removeListener("request",L),e.req&&e.req.removeListener("finish",y),e.removeListener("end",o),e.removeListener("close",o),e.removeListener("finish",y),e.removeListener("end",T),e.removeListener("error",x),e.removeListener("close",M)}}da.exports=ca});var ga=A((gc,pa)=>{"use strict";v();var cr;function Se(e,t,r){return t=hs(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hs(e){var t=cs(e,"string");return typeof t=="symbol"?t:String(t)}function cs(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ds=hr(),Ee=Symbol("lastResolve"),xe=Symbol("lastReject"),ct=Symbol("error"),dr=Symbol("ended"),Ce=Symbol("lastPromise"),oi=Symbol("handlePromise"),Pe=Symbol("stream");function Re(e,t){return{value:e,done:t}}function ps(e){var t=e[Ee];if(t!==null){var r=e[Pe].read();r!==null&&(e[Ce]=null,e[Ee]=null,e[xe]=null,t(Re(r,!1)))}}function gs(e){process.nextTick(ps,e)}function ys(e,t){return function(r,i){e.then(function(){if(t[dr]){r(Re(void 0,!0));return}t[oi](r,i)},i)}}var vs=Object.getPrototypeOf(function(){}),_s=Object.setPrototypeOf((cr={get stream(){return this[Pe]},next:function(){var t=this,r=this[ct];if(r!==null)return Promise.reject(r);if(this[dr])return Promise.resolve(Re(void 0,!0));if(this[Pe].destroyed)return new Promise(function(l,y){process.nextTick(function(){t[ct]?y(t[ct]):l(Re(void 0,!0))})});var i=this[Ce],a;if(i)a=new Promise(ys(i,this));else{var o=this[Pe].read();if(o!==null)return Promise.resolve(Re(o,!1));a=new Promise(this[oi])}return this[Ce]=a,a}},Se(cr,Symbol.asyncIterator,function(){return this}),Se(cr,"return",function(){var t=this;return new Promise(function(r,i){t[Pe].destroy(null,function(a){if(a){i(a);return}r(Re(void 0,!0))})})}),cr),vs),ws=function(t){var r,i=Object.create(_s,(r={},Se(r,Pe,{value:t,writable:!0}),Se(r,Ee,{value:null,writable:!0}),Se(r,xe,{value:null,writable:!0}),Se(r,ct,{value:null,writable:!0}),Se(r,dr,{value:t._readableState.endEmitted,writable:!0}),Se(r,oi,{value:function(o,l){var y=i[Pe].read();y?(i[Ce]=null,i[Ee]=null,i[xe]=null,o(Re(y,!1))):(i[Ee]=o,i[xe]=l)},writable:!0}),r));return i[Ce]=null,ds(t,function(a){if(a&&a.code!=="ERR_STREAM_PREMATURE_CLOSE"){var o=i[xe];o!==null&&(i[Ce]=null,i[Ee]=null,i[xe]=null,o(a)),i[ct]=a;return}var l=i[Ee];l!==null&&(i[Ce]=null,i[Ee]=null,i[xe]=null,l(Re(void 0,!0))),i[dr]=!0}),t.on("readable",gs.bind(null,i)),i};pa.exports=ws});var wa=A((vc,_a)=>{"use strict";v();function ya(e,t,r,i,a,o,l){try{var y=e[o](l),_=y.value}catch(T){r(T);return}y.done?t(_):Promise.resolve(_).then(i,a)}function ms(e){return function(){var t=this,r=arguments;return new Promise(function(i,a){var o=e.apply(t,r);function l(_){ya(o,i,a,l,y,"next",_)}function y(_){ya(o,i,a,l,y,"throw",_)}l(void 0)})}}function va(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,i)}return r}function bs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?va(Object(r),!0).forEach(function(i){Ss(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):va(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function Ss(e,t,r){return t=Es(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Es(e){var t=Rs(e,"string");return typeof t=="symbol"?t:String(t)}function Rs(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ts=me().codes.ERR_INVALID_ARG_TYPE;function Ls(e,t,r){var i;if(t&&typeof t.next=="function")i=t;else if(t&&t[Symbol.asyncIterator])i=t[Symbol.asyncIterator]();else if(t&&t[Symbol.iterator])i=t[Symbol.iterator]();else throw new Ts("iterable",["Iterable"],t);var a=new e(bs({objectMode:!0},r)),o=!1;a._read=function(){o||(o=!0,l())};function l(){return y.apply(this,arguments)}function y(){return y=ms(function*(){try{var _=yield i.next(),T=_.value,x=_.done;x?a.push(null):a.push(yield T)?l():o=!1}catch(M){a.destroy(M)}}),y.apply(this,arguments)}return a}_a.exports=Ls});var ii=A((mc,Aa)=>{"use strict";v();Aa.exports=j;var He;j.ReadableState=Ea;var wc=$("events").EventEmitter,Sa=function(t,r){return t.listeners(r).length},pt=Vr(),pr=$("buffer").Buffer,Os=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Ms(e){return pr.from(e)}function As(e){return pr.isBuffer(e)||e instanceof Os}var si=$("util"),q;si&&si.debuglog?q=si.debuglog("stream"):q=function(){};var qs=Gn(),yi=Qr(),xs=Xr(),Cs=xs.getHighWaterMark,gr=me().codes,Ps=gr.ERR_INVALID_ARG_TYPE,Ds=gr.ERR_STREAM_PUSH_AFTER_EOF,js=gr.ERR_METHOD_NOT_IMPLEMENTED,Bs=gr.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Ge,li,hi;ee()(j,pt);var dt=yi.errorOrDestroy,ci=["error","close","destroy","pause","resume"];function Ns(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}function Ea(e,t,r){He=He||Ae(),e=e||{},typeof r!="boolean"&&(r=t instanceof He),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=Cs(this,e,"readableHighWaterMark",r),this.buffer=new qs,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(Ge||(Ge=ui().StringDecoder),this.decoder=new Ge(e.encoding),this.encoding=e.encoding)}function j(e){if(He=He||Ae(),!(this instanceof j))return new j(e);var t=this instanceof He;this._readableState=new Ea(e,this,t),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),pt.call(this)}Object.defineProperty(j.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});j.prototype.destroy=yi.destroy;j.prototype._undestroy=yi.undestroy;j.prototype._destroy=function(e,t){t(e)};j.prototype.push=function(e,t){var r=this._readableState,i;return r.objectMode?i=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=pr.from(e,t),t=""),i=!0),Ra(this,e,t,!1,i)};j.prototype.unshift=function(e){return Ra(this,e,null,!0,!1)};function Ra(e,t,r,i,a){q("readableAddChunk",t);var o=e._readableState;if(t===null)o.reading=!1,Ws(e,o);else{var l;if(a||(l=Is(o,t)),l)dt(e,l);else if(o.objectMode||t&&t.length>0)if(typeof t!="string"&&!o.objectMode&&Object.getPrototypeOf(t)!==pr.prototype&&(t=Ms(t)),i)o.endEmitted?dt(e,new Bs):di(e,o,t,!0);else if(o.ended)dt(e,new Ds);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||t.length!==0?di(e,o,t,!1):gi(e,o)):di(e,o,t,!1)}else i||(o.reading=!1,gi(e,o))}return!o.ended&&(o.length<o.highWaterMark||o.length===0)}function di(e,t,r,i){t.flowing&&t.length===0&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&yr(e)),gi(e,t)}function Is(e,t){var r;return!As(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(r=new Ps("chunk",["string","Buffer","Uint8Array"],t)),r}j.prototype.isPaused=function(){return this._readableState.flowing===!1};j.prototype.setEncoding=function(e){Ge||(Ge=ui().StringDecoder);var t=new Ge(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";r!==null;)i+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),i!==""&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var ma=1073741824;function ks(e){return e>=ma?e=ma:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function ba(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=ks(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}j.prototype.read=function(e){q("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended))return q("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?pi(this):yr(this),null;if(e=ba(e,t),e===0&&t.ended)return t.length===0&&pi(this),null;var i=t.needReadable;q("need readable",i),(t.length===0||t.length-e<t.highWaterMark)&&(i=!0,q("length less than watermark",i)),t.ended||t.reading?(i=!1,q("reading or ended",i)):i&&(q("do read"),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=ba(r,t)));var a;return e>0?a=Oa(e,t):a=null,a===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&pi(this)),a!==null&&this.emit("data",a),a};function Ws(e,t){if(q("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?yr(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,Ta(e)))}}function yr(e){var t=e._readableState;q("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(q("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(Ta,e))}function Ta(e){var t=e._readableState;q("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,vi(e)}function gi(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(Us,e,t))}function Us(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&t.length===0);){var r=t.length;if(q("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}j.prototype._read=function(e){dt(this,new js("_read()"))};j.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e);break}i.pipesCount+=1,q("pipe count=%d opts=%j",i.pipesCount,t);var a=(!t||t.end!==!1)&&e!==process.stdout&&e!==process.stderr,o=a?y:Q;i.endEmitted?process.nextTick(o):r.once("end",o),e.on("unpipe",l);function l(b,S){q("onunpipe"),b===r&&S&&S.hasUnpiped===!1&&(S.hasUnpiped=!0,x())}function y(){q("onend"),e.end()}var _=Fs(r);e.on("drain",_);var T=!1;function x(){q("cleanup"),e.removeListener("close",O),e.removeListener("finish",H),e.removeListener("drain",_),e.removeListener("error",L),e.removeListener("unpipe",l),r.removeListener("end",y),r.removeListener("end",Q),r.removeListener("data",M),T=!0,i.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&_()}r.on("data",M);function M(b){q("ondata");var S=e.write(b);q("dest.write",S),S===!1&&((i.pipesCount===1&&i.pipes===e||i.pipesCount>1&&Ma(i.pipes,e)!==-1)&&!T&&(q("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function L(b){q("onerror",b),Q(),e.removeListener("error",L),Sa(e,"error")===0&&dt(e,b)}Ns(e,"error",L);function O(){e.removeListener("finish",H),Q()}e.once("close",O);function H(){q("onfinish"),e.removeListener("close",O),Q()}e.once("finish",H);function Q(){q("unpipe"),r.unpipe(e)}return e.emit("pipe",r),i.flowing||(q("pipe resume"),r.resume()),e};function Fs(e){return function(){var r=e._readableState;q("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&Sa(e,"data")&&(r.flowing=!0,vi(e))}}j.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var i=t.pipes,a=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<a;o++)i[o].emit("unpipe",this,{hasUnpiped:!1});return this}var l=Ma(t.pipes,e);return l===-1?this:(t.pipes.splice(l,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)};j.prototype.on=function(e,t){var r=pt.prototype.on.call(this,e,t),i=this._readableState;return e==="data"?(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1&&this.resume()):e==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,q("on readable",i.length,i.reading),i.length?yr(this):i.reading||process.nextTick($s,this)),r};j.prototype.addListener=j.prototype.on;j.prototype.removeListener=function(e,t){var r=pt.prototype.removeListener.call(this,e,t);return e==="readable"&&process.nextTick(La,this),r};j.prototype.removeAllListeners=function(e){var t=pt.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&process.nextTick(La,this),t};function La(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function $s(e){q("readable nexttick read 0"),e.read(0)}j.prototype.resume=function(){var e=this._readableState;return e.flowing||(q("resume"),e.flowing=!e.readableListening,Hs(this,e)),e.paused=!1,this};function Hs(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(Gs,e,t))}function Gs(e,t){q("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),vi(e),t.flowing&&!t.reading&&e.read(0)}j.prototype.pause=function(){return q("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(q("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function vi(e){var t=e._readableState;for(q("flow",t.flowing);t.flowing&&e.read()!==null;);}j.prototype.wrap=function(e){var t=this,r=this._readableState,i=!1;e.on("end",function(){if(q("wrapped end"),r.decoder&&!r.ended){var l=r.decoder.end();l&&l.length&&t.push(l)}t.push(null)}),e.on("data",function(l){if(q("wrapped data"),r.decoder&&(l=r.decoder.write(l)),!(r.objectMode&&l==null)&&!(!r.objectMode&&(!l||!l.length))){var y=t.push(l);y||(i=!0,e.pause())}});for(var a in e)this[a]===void 0&&typeof e[a]=="function"&&(this[a]=(function(y){return function(){return e[y].apply(e,arguments)}})(a));for(var o=0;o<ci.length;o++)e.on(ci[o],this.emit.bind(this,ci[o]));return this._read=function(l){q("wrapped _read",l),i&&(i=!1,e.resume())},this};typeof Symbol=="function"&&(j.prototype[Symbol.asyncIterator]=function(){return li===void 0&&(li=ga()),li(this)});Object.defineProperty(j.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(j.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(j.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}});j._fromList=Oa;Object.defineProperty(j.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Oa(e,t){if(t.length===0)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.first():r=t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function pi(e){var t=e._readableState;q("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(zs,t,e))}function zs(e,t){if(q("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}typeof Symbol=="function"&&(j.from=function(e,t){return hi===void 0&&(hi=wa()),hi(j,e,t)});function Ma(e,t){for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1}});var _i=A((Sc,xa)=>{"use strict";v();xa.exports=he;var vr=me().codes,Vs=vr.ERR_METHOD_NOT_IMPLEMENTED,Ks=vr.ERR_MULTIPLE_CALLBACK,Ys=vr.ERR_TRANSFORM_ALREADY_TRANSFORMING,Qs=vr.ERR_TRANSFORM_WITH_LENGTH_0,_r=Ae();ee()(he,_r);function Xs(e,t){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new Ks);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),i(e);var a=this._readableState;a.reading=!1,(a.needReadable||a.length<a.highWaterMark)&&this._read(a.highWaterMark)}function he(e){if(!(this instanceof he))return new he(e);_r.call(this,e),this._transformState={afterTransform:Xs.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",Zs)}function Zs(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(t,r){qa(e,t,r)}):qa(this,null,null)}he.prototype.push=function(e,t){return this._transformState.needTransform=!1,_r.prototype.push.call(this,e,t)};he.prototype._transform=function(e,t,r){r(new Vs("_transform()"))};he.prototype._write=function(e,t,r){var i=this._transformState;if(i.writecb=r,i.writechunk=e,i.writeencoding=t,!i.transforming){var a=this._readableState;(i.needTransform||a.needReadable||a.length<a.highWaterMark)&&this._read(a.highWaterMark)}};he.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};he.prototype._destroy=function(e,t){_r.prototype._destroy.call(this,e,function(r){t(r)})};function qa(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new Qs;if(e._transformState.transforming)throw new Ys;return e.push(null)}});var Da=A((Rc,Pa)=>{"use strict";v();Pa.exports=gt;var Ca=_i();ee()(gt,Ca);function gt(e){if(!(this instanceof gt))return new gt(e);Ca.call(this,e)}gt.prototype._transform=function(e,t,r){r(null,e)}});var ka=A((Lc,Ia)=>{"use strict";v();var wi;function Js(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var Na=me().codes,el=Na.ERR_MISSING_ARGS,tl=Na.ERR_STREAM_DESTROYED;function ja(e){if(e)throw e}function rl(e){return e.setHeader&&typeof e.abort=="function"}function il(e,t,r,i){i=Js(i);var a=!1;e.on("close",function(){a=!0}),wi===void 0&&(wi=hr()),wi(e,{readable:t,writable:r},function(l){if(l)return i(l);a=!0,i()});var o=!1;return function(l){if(!a&&!o){if(o=!0,rl(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();i(l||new tl("pipe"))}}}function Ba(e){e()}function nl(e,t){return e.pipe(t)}function al(e){return!e.length||typeof e[e.length-1]!="function"?ja:e.pop()}function fl(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var i=al(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new el("streams");var a,o=t.map(function(l,y){var _=y<t.length-1,T=y>0;return il(l,_,T,function(x){a||(a=x),x&&o.forEach(Ba),!_&&(o.forEach(Ba),i(a))})});return t.reduce(nl)}Ia.exports=fl});var ze=A((re,vt)=>{v();var yt=$("stream");process.env.READABLE_STREAM==="disable"&&yt?(vt.exports=yt.Readable,Object.assign(vt.exports,yt),vt.exports.Stream=yt):(re=vt.exports=ii(),re.Stream=yt||re,re.Readable=re,re.Writable=ei(),re.Duplex=Ae(),re.Transform=_i(),re.PassThrough=Da(),re.finished=hr(),re.pipeline=ka())});var Fa=A((Ac,Ua)=>{"use strict";v();var{Buffer:ae}=$("buffer"),Wa=Symbol.for("BufferList");function k(e){if(!(this instanceof k))return new k(e);k._init.call(this,e)}k._init=function(t){Object.defineProperty(this,Wa,{value:!0}),this._bufs=[],this.length=0,t&&this.append(t)};k.prototype._new=function(t){return new k(t)};k.prototype._offset=function(t){if(t===0)return[0,0];let r=0;for(let i=0;i<this._bufs.length;i++){let a=r+this._bufs[i].length;if(t<a||i===this._bufs.length-1)return[i,t-r];r=a}};k.prototype._reverseOffset=function(e){let t=e[0],r=e[1];for(let i=0;i<t;i++)r+=this._bufs[i].length;return r};k.prototype.get=function(t){if(t>this.length||t<0)return;let r=this._offset(t);return this._bufs[r[0]][r[1]]};k.prototype.slice=function(t,r){return typeof t=="number"&&t<0&&(t+=this.length),typeof r=="number"&&r<0&&(r+=this.length),this.copy(null,0,t,r)};k.prototype.copy=function(t,r,i,a){if((typeof i!="number"||i<0)&&(i=0),(typeof a!="number"||a>this.length)&&(a=this.length),i>=this.length||a<=0)return t||ae.alloc(0);let o=!!t,l=this._offset(i),y=a-i,_=y,T=o&&r||0,x=l[1];if(i===0&&a===this.length){if(!o)return this._bufs.length===1?this._bufs[0]:ae.concat(this._bufs,this.length);for(let M=0;M<this._bufs.length;M++)this._bufs[M].copy(t,T),T+=this._bufs[M].length;return t}if(_<=this._bufs[l[0]].length-x)return o?this._bufs[l[0]].copy(t,r,x,x+_):this._bufs[l[0]].slice(x,x+_);o||(t=ae.allocUnsafe(y));for(let M=l[0];M<this._bufs.length;M++){let L=this._bufs[M].length-x;if(_>L)this._bufs[M].copy(t,T,x),T+=L;else{this._bufs[M].copy(t,T,x,x+_),T+=L;break}_-=L,x&&(x=0)}return t.length>T?t.slice(0,T):t};k.prototype.shallowSlice=function(t,r){if(t=t||0,r=typeof r!="number"?this.length:r,t<0&&(t+=this.length),r<0&&(r+=this.length),t===r)return this._new();let i=this._offset(t),a=this._offset(r),o=this._bufs.slice(i[0],a[0]+1);return a[1]===0?o.pop():o[o.length-1]=o[o.length-1].slice(0,a[1]),i[1]!==0&&(o[0]=o[0].slice(i[1])),this._new(o)};k.prototype.toString=function(t,r,i){return this.slice(r,i).toString(t)};k.prototype.consume=function(t){if(t=Math.trunc(t),Number.isNaN(t)||t<=0)return this;for(;this._bufs.length;)if(t>=this._bufs[0].length)t-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(t),this.length-=t;break}return this};k.prototype.duplicate=function(){let t=this._new();for(let r=0;r<this._bufs.length;r++)t.append(this._bufs[r]);return t};k.prototype.append=function(t){if(t==null)return this;if(t.buffer)this._appendBuffer(ae.from(t.buffer,t.byteOffset,t.byteLength));else if(Array.isArray(t))for(let r=0;r<t.length;r++)this.append(t[r]);else if(this._isBufferList(t))for(let r=0;r<t._bufs.length;r++)this.append(t._bufs[r]);else typeof t=="number"&&(t=t.toString()),this._appendBuffer(ae.from(t));return this};k.prototype._appendBuffer=function(t){this._bufs.push(t),this.length+=t.length};k.prototype.indexOf=function(e,t,r){if(r===void 0&&typeof t=="string"&&(r=t,t=void 0),typeof e=="function"||Array.isArray(e))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if(typeof e=="number"?e=ae.from([e]):typeof e=="string"?e=ae.from(e,r):this._isBufferList(e)?e=e.slice():Array.isArray(e.buffer)?e=ae.from(e.buffer,e.byteOffset,e.byteLength):ae.isBuffer(e)||(e=ae.from(e)),t=Number(t||0),isNaN(t)&&(t=0),t<0&&(t=this.length+t),t<0&&(t=0),e.length===0)return t>this.length?this.length:t;let i=this._offset(t),a=i[0],o=i[1];for(;a<this._bufs.length;a++){let l=this._bufs[a];for(;o<l.length;)if(l.length-o>=e.length){let _=l.indexOf(e,o);if(_!==-1)return this._reverseOffset([a,_]);o=l.length-e.length+1}else{let _=this._reverseOffset([a,o]);if(this._match(_,e))return _;o++}o=0}return-1};k.prototype._match=function(e,t){if(this.length-e<t.length)return!1;for(let r=0;r<t.length;r++)if(this.get(e+r)!==t[r])return!1;return!0};(function(){let e={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(let t in e)(function(r){e[r]===null?k.prototype[r]=function(i,a){return this.slice(i,i+a)[r](0,a)}:k.prototype[r]=function(i=0){return this.slice(i,i+e[r])[r](0)}})(t)})();k.prototype._isBufferList=function(t){return t instanceof k||k.isBufferList(t)};k.isBufferList=function(t){return t!=null&&t[Wa]};Ua.exports=k});var $a=A((xc,wr)=>{"use strict";v();var mi=ze().Duplex,ul=ee(),_t=Fa();function K(e){if(!(this instanceof K))return new K(e);if(typeof e=="function"){this._callback=e;let t=function(i){this._callback&&(this._callback(i),this._callback=null)}.bind(this);this.on("pipe",function(i){i.on("error",t)}),this.on("unpipe",function(i){i.removeListener("error",t)}),e=null}_t._init.call(this,e),mi.call(this)}ul(K,mi);Object.assign(K.prototype,_t.prototype);K.prototype._new=function(t){return new K(t)};K.prototype._write=function(t,r,i){this._appendBuffer(t),typeof i=="function"&&i()};K.prototype._read=function(t){if(!this.length)return this.push(null);t=Math.min(t,this.length),this.push(this.slice(0,t)),this.consume(t)};K.prototype.end=function(t){mi.prototype.end.call(this,t),this._callback&&(this._callback(null,this.slice()),this._callback=null)};K.prototype._destroy=function(t,r){this._bufs.length=0,this.length=0,r(t)};K.prototype._isBufferList=function(t){return t instanceof K||t instanceof _t||K.isBufferList(t)};K.isBufferList=_t.isBufferList;wr.exports=K;wr.exports.BufferListStream=K;wr.exports.BufferList=_t});var Ei=A(Ke=>{v();var ol=Buffer.alloc,sl="0000000000000000000",ll="7777777777777777777",Ha=48,Ga=Buffer.from("ustar\0","binary"),hl=Buffer.from("00","binary"),cl=Buffer.from("ustar ","binary"),dl=Buffer.from(" \0","binary"),pl=parseInt("7777",8),wt=257,Si=263,gl=function(e,t,r){return typeof e!="number"?r:(e=~~e,e>=t?t:e>=0||(e+=t,e>=0)?e:0)},yl=function(e){switch(e){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null},vl=function(e){switch(e){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0},za=function(e,t,r,i){for(;r<i;r++)if(e[r]===t)return r;return i},Va=function(e){for(var t=256,r=0;r<148;r++)t+=e[r];for(var i=156;i<512;i++)t+=e[i];return t},Te=function(e,t){return e=e.toString(8),e.length>t?ll.slice(0,t)+" ":sl.slice(0,t-e.length)+e+" "};function _l(e){var t;if(e[0]===128)t=!0;else if(e[0]===255)t=!1;else return null;for(var r=[],i=e.length-1;i>0;i--){var a=e[i];t?r.push(a):r.push(255-a)}var o=0,l=r.length;for(i=0;i<l;i++)o+=r[i]*Math.pow(256,i);return t?o:-1*o}var Le=function(e,t,r){if(e=e.slice(t,t+r),t=0,e[t]&128)return _l(e);for(;t<e.length&&e[t]===32;)t++;for(var i=gl(za(e,32,t,e.length),e.length,e.length);t<i&&e[t]===0;)t++;return i===t?0:parseInt(e.slice(t,i).toString(),8)},Ve=function(e,t,r,i){return e.slice(t,za(e,0,t,t+r)).toString(i)},bi=function(e){var t=Buffer.byteLength(e),r=Math.floor(Math.log(t)/Math.log(10))+1;return t+r>=Math.pow(10,r)&&r++,t+r+e};Ke.decodeLongPath=function(e,t){return Ve(e,0,e.length,t)};Ke.encodePax=function(e){var t="";e.name&&(t+=bi(" path="+e.name+`
@@ -1 +1 @@
1
- import{a as e}from"./chunk-IASVAERO.js";import{g as a}from"./chunk-VPRTJUIN.js";a();var t=e({cmd_app_warning_api_key_deprecation_displayed:!1}),i=t;export{i as a};
1
+ import{a as e}from"./chunk-6YAXFS6V.js";import{g as a}from"./chunk-VPRTJUIN.js";a();var t=e({cmd_app_warning_api_key_deprecation_displayed:!1}),i=t;export{i as a};
@@ -0,0 +1,2 @@
1
+ import{a as N,b as $,c as w}from"./chunk-HD5TYIDZ.js";import{n as T}from"./chunk-4V4DQ6W7.js";import{a as D,b}from"./chunk-6HZTMQD6.js";import{O as P,P as k,a as F}from"./chunk-MGL4YM3S.js";import{g as A}from"./chunk-BHWEA4V2.js";import{Ia as U,La as I,N as x,Pa as O,Pb as u,Ua as p,xa as y,za as _}from"./chunk-VPL2NDH6.js";import{f as h}from"./chunk-UARVYVLN.js";import{d as m,i as l,j as S}from"./chunk-IU2ZQ6TE.js";import{g as f}from"./chunk-VPRTJUIN.js";f();f();import{fileURLToPath as q}from"url";import Y from"util";import{pipeline as j}from"stream";import{execSync as z,execFileSync as B}from"child_process";var H="2024.8.2",W=`https://github.com/cloudflare/cloudflared/releases/download/${H}/`,G={arm64:"cloudflared-linux-arm64",arm:"cloudflared-linux-arm",x64:"cloudflared-linux-amd64",ia32:"cloudflared-linux-386"},V={arm64:"cloudflared-darwin-arm64.tgz",x64:"cloudflared-darwin-amd64.tgz"},X={x64:"cloudflared-windows-amd64.exe",ia32:"cloudflared-windows-386.exe",arm64:"cloudflared-windows-amd64.exe"},v={linux:G,darwin:V,win32:X};function Z(r=process.platform,t=process.arch){if(!Object.keys(v).includes(r))throw new Error(`Unsupported system platform: ${r}`);let n=v[r][t];if(n===void 0)throw new Error(`Unsupported system arch: ${t}`);return W+n}function J(r=process.env,t=process.platform){return r.SHOPIFY_CLI_CLOUDFLARED_PATH?r.SHOPIFY_CLI_CLOUDFLARED_PATH:m(l(q(import.meta.url)),"..","bin",t==="win32"?"cloudflared.exe":"cloudflared")}async function g(r=process.env,t=process.platform,e=process.arch){if(r.SHOPIFY_CLI_IGNORE_CLOUDFLARED){u("Skipping cloudflared installation because SHOPIFY_CLI_IGNORE_CLOUDFLARED is set");return}let n=Z(t,e),o=J(r,t);if(p(o))try{let a=B(o,["--version"],{encoding:"utf8"}).split(" "),i=a.length>2?a[2]:"0.0.0";if(!K(H,i)){u("cloudflared already installed, skipping");return}}catch{u("version check failed, reinstalling")}if(t==="linux")await Q(n,o);else if(t==="darwin")await rt(n,o);else if(t==="win32")await tt(n,o);else throw new Error(`Unsupported platform: ${t}`)}function K(r,t){let[e,n,o]=r.split(".").map(Number),[a,i,c]=t.split(".").map(Number);return e!==a?(e??0)>(a??0):n!==i?(n??0)>(i??0):(o??0)>(c??0)}async function Q(r,t){await C(r,t),await O(t,"755")}async function tt(r,t){await C(r,t)}async function rt(r,t){await C(r,`${t}.tgz`);let e=S(`${t}.tgz`);z(`tar -xzf ${e}`,{cwd:l(t)}),U(`${t}.tgz`),await _(`${l(t)}/cloudflared`,t)}async function C(r,t){p(l(t))||y(l(t));let e=Y.promisify(j),n=await T(r,{redirect:"follow"},"slow-request");if(!n.ok||!n.body)throw new Error(`Couldn't download file ${r} (${n.status} ${n.statusText})`);let o=I(t);return await e(n.body,o),t}import{Writable as et}from"stream";import{fileURLToPath as nt}from"url";var $t=$({provider:w,action:it}),ot=h()?.2:40,st=5;async function it(r){try{let t=new R(r);return await t.startTunnel(),D(t)}catch(t){let e=new N("unknown",t.message);return b(e)}}var R=class{constructor(t){this.provider=w,this.currentStatus={status:"not-started"},this.abortController=void 0,this.port=t}async startTunnel(){try{await g(),this.tunnel()}catch(t){this.currentStatus={status:"error",message:t.message,tryMessage:d()}}}getTunnelStatus(){return this.currentStatus}stopTunnel(){this.abortController?.abort()}tunnel(t=0){this.abortController=new F;let e=!1;if(t>=st){e=!0,this.currentStatus={status:"error",message:"Could not start Cloudflare tunnel: max retries reached.",tryMessage:d()};return}let n=["tunnel","--url",`http://localhost:${this.port}`,"--no-autoupdate"],o=[],a=!1,i;this.currentStatus={status:"starting"},setTimeout(()=>{if(!e){e=!0;let s=x(o).slice(-5).join(`
2
+ `);s===""?this.currentStatus={status:"error",message:"Could not start Cloudflare tunnel: unknown error.",tryMessage:d()}:this.currentStatus={status:"error",message:s,tryMessage:d()},this.abortController?.abort()}},ot*1e3);let c=this,E=new et({write(s,mt,M){if(u(s.toString()),e)return;i??(i=at(s)),ct(s)&&(a=!0),a&&(i?(e=!0,c.currentStatus={status:"connected",url:i}):c.currentStatus={status:"error",message:"Could not start Cloudflare tunnel: URL not found."});let L=lt(s);L&&o.push(L),M()}});P(dt(),n,{stdout:E,stderr:E,signal:this.abortController.signal,externalErrorHandler:async s=>{if(e)throw new A(`Could not start Cloudflare tunnel: process crashed after stablishing a connection: ${s.message}`,d());u(`Cloudflare tunnel crashed: ${s.message}, restarting...`),h()||await k(1),this.tunnel(t+1)}})}};function d(){return["You can run the command again, or try networking with Shopify via",{command:"--use-localhost"},"or",{command:"--tunnel-url <custom tunnel>"},".",{link:{label:"See documentation for details.",url:"https://shopify.dev/docs/apps/build/cli-for-apps/networking-options"}}]}function at(r){let t=new RegExp(`(https:\\/\\/[^\\s]+\\.${ft()})`),e=r.toString().match(t)??void 0;return e&&e[1]}function lt(r){if([/failed to request quick Tunnel/,/failed to unmarshal quick Tunnel/,/failed to parse quick Tunnel ID/,/failed to provision routing/,/ERR Couldn't start tunnel/,/ERR Failed to serve quic connection/,/ERR Failed to create new quic connection error/].some(n=>n.test(r.toString())))return`Could not start Cloudflare tunnel: ${ut(r.toString())}`}function ut(r){let t=/^[0-9TZ:-]+ (ERR )?/g,e=/connIndex.*/g;return r.replace(t,"").replace(e,"")}function ct(r){let t=r.toString().match(/(INF Registered tunnel connection|INF Connection)/)??void 0;return t&&t[0]}function dt(){return process.env.SHOPIFY_CLI_CLOUDFLARED_PATH?process.env.SHOPIFY_CLI_CLOUDFLARED_PATH:m(l(nt(import.meta.url)),"..","bin",process.platform==="win32"?"cloudflared.exe":"cloudflared")}function ft(){return process.env.SHOPIFY_CLI_CLOUDFLARED_DOMAIN??"trycloudflare.com"}export{$t as a};
@@ -1 +1 @@
1
- import{a}from"./chunk-NRAFVIU3.js";import{g as t}from"./chunk-VPRTJUIN.js";t();var e=async()=>a.getAllPublicMetadata(),l=e;export{l as a};
1
+ import{a}from"./chunk-FP2NOZSD.js";import{g as t}from"./chunk-VPRTJUIN.js";t();var e=async()=>a.getAllPublicMetadata(),l=e;export{l as a};
@@ -0,0 +1,7 @@
1
+ import{a as c,b as F}from"./chunk-M4V2OQAX.js";import{a as D}from"./chunk-2YXKZWYW.js";import{a as _,c as b}from"./chunk-7BFDUVOG.js";import{e as y,q as T}from"./chunk-MZJRNFAU.js";import{d as v,k as g,q as w}from"./chunk-HHXHOQQP.js";import{b as u}from"./chunk-4KRT35A2.js";import{A as p,v as d}from"./chunk-MGL4YM3S.js";import{r as C}from"./chunk-3YWUSKWF.js";import{V as f}from"./chunk-VPL2NDH6.js";import{e as Y,g as h}from"./chunk-VPRTJUIN.js";h();h();async function I(t,e,i){let r=e.themes;e.development&&(r=[(await new D(t).find()).id.toString()]);let n=t.storeFqdn,s=await L(t,{...e,themes:r,development:!1});if(!e.force&&!i&&!await M(s,n))return;await Promise.all(s.map(o=>(y(o)&&v(),T(o.id,t))));let l=e.environment?[{subdued:`Environment: ${e.environment}
2
+
3
+ `}]:[];d({body:f(s,o=>[...l,`The following themes were deleted from ${n}:`,F(o)],o=>[...l,"The theme",...c(o),`was deleted from ${n}.`])})}async function L(t,e){if(e.selectTheme||e.themes.length>0)return b(t,e);let i=t.storeFqdn;return[await _(t,{header:`Select a theme to delete from ${i}`,filter:{development:e.development}})]}async function M(t,e){let r={message:f(t,n=>[`Delete the following themes from ${e}?`],n=>["Delete",...c(n),`from ${e}?`]),confirmationMessage:"Yes, confirm changes",cancellationMessage:"Cancel"};return t.length>1&&(r.infoTable={"":t.map(c)}),p(r)}var a=Y(C(),1);var O,m=class extends w{async command(e,i,r){let{environment:n,development:s,force:l,theme:o}=e,E=o??[];await I(i,{selectTheme:e["show-all"],environment:n,development:s,themes:E,force:l},r)}};O=m;m.summary="Delete remote themes from the connected store. This command can't be undone.";m.descriptionWithMarkdown=`Deletes a theme from your store.
4
+
5
+ You can specify multiple themes by ID. If no theme is specified, then you're prompted to select the theme that you want to delete from the list of themes in your store.
6
+
7
+ You're asked to confirm that you want to delete the specified themes before they are deleted. You can skip this confirmation using the \`--force\` flag.`;m.description=O.descriptionWithoutMarkdown();m.flags={...u,...g,development:a.Flags.boolean({char:"d",description:"Delete your development theme.",env:"SHOPIFY_FLAG_DEVELOPMENT"}),"show-all":a.Flags.boolean({char:"a",description:"Include others development themes in theme list.",env:"SHOPIFY_FLAG_SHOW_ALL"}),force:a.Flags.boolean({char:"f",description:"Skip confirmation.",env:"SHOPIFY_FLAG_FORCE"}),theme:a.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID",multiple:!0})};m.multiEnvironmentsFlags=["store","password",["development","theme"]];var V=m;export{V as a};
@@ -1 +1 @@
1
- import{K as i}from"./chunk-BDVAE5MS.js";import{a as l}from"./chunk-QUTQDXSL.js";import{a as p}from"./chunk-FUOIGXI4.js";import{e as u,g as a}from"./chunk-VPRTJUIN.js";a();var f=u(l(),1),o=u(p(),1);async function h(t){try{return(await i("npm",["list","@shopify/cli"],{cwd:t})).match(/@shopify\/cli@([\w.-]*)/)?.[1]}catch{return}}async function d(){try{let t={...process.env,SHOPIFY_CLI_NO_ANALYTICS:"1"},e=f.default.sync("shopify",{all:!0}).filter(r=>!r.includes("node_modules"));if(!e[0])return;let n=(await i(e[0],[],{env:t})).match(/@shopify\/cli\/([^\s]+)/);if(n&&n[1]){let r=n[1];if((0,o.satisfies)(r,">=3.59.0")||s(r))return r}return}catch{return}}function s(t){return t.startsWith("0.0.0")}function y(t,e){if(s(t)||s(e))return!1;let c=new o.SemVer(t),n=new o.SemVer(e);return c.major!==n.major}export{h as a,d as b,s as c,y as d};
1
+ import{K as i}from"./chunk-MGL4YM3S.js";import{a as l}from"./chunk-QUTQDXSL.js";import{a as p}from"./chunk-H4W4DFKK.js";import{e as u,g as a}from"./chunk-VPRTJUIN.js";a();var f=u(l(),1),o=u(p(),1);async function h(t){try{return(await i("npm",["list","@shopify/cli"],{cwd:t})).match(/@shopify\/cli@([\w.-]*)/)?.[1]}catch{return}}async function d(){try{let t={...process.env,SHOPIFY_CLI_NO_ANALYTICS:"1"},e=f.default.sync("shopify",{all:!0}).filter(r=>!r.includes("node_modules"));if(!e[0])return;let n=(await i(e[0],[],{env:t})).match(/@shopify\/cli\/([^\s]+)/);if(n&&n[1]){let r=n[1];if((0,o.satisfies)(r,">=3.59.0")||s(r))return r}return}catch{return}}function s(t){return t.startsWith("0.0.0")}function y(t,e){if(s(t)||s(e))return!1;let c=new o.SemVer(t),n=new o.SemVer(e);return c.major!==n.major}export{h as a,d as b,s as c,y as d};
@@ -0,0 +1 @@
1
+ import{c as p,g as o}from"./chunk-VPRTJUIN.js";var g=p((hi,he)=>{"use strict";o();var nt="2.0.0",it=Number.MAX_SAFE_INTEGER||9007199254740991,ot=16,ct=250,lt=["major","premajor","minor","preminor","patch","prepatch","prerelease"];he.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:ot,MAX_SAFE_BUILD_LENGTH:ct,MAX_SAFE_INTEGER:it,RELEASE_TYPES:lt,SEMVER_SPEC_VERSION:nt,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var v=p((Ri,pe)=>{"use strict";o();var at=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};pe.exports=at});var P=p((q,Re)=>{"use strict";o();var{MAX_SAFE_COMPONENT_LENGTH:M,MAX_SAFE_BUILD_LENGTH:ut,MAX_LENGTH:ft}=g(),Et=v();q=Re.exports={};var ht=q.re=[],pt=q.safeRe=[],l=q.src=[],Rt=q.safeSrc=[],a=q.t={},$t=0,W="[a-zA-Z0-9-]",mt=[["\\s",1],["\\d",ft],[W,ut]],It=t=>{for(let[e,r]of mt)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},R=(t,e,r)=>{let s=It(e),n=$t++;Et(t,n,e),a[t]=n,l[n]=e,Rt[n]=s,ht[n]=new RegExp(e,r?"g":void 0),pt[n]=new RegExp(s,r?"g":void 0)};R("NUMERICIDENTIFIER","0|[1-9]\\d*");R("NUMERICIDENTIFIERLOOSE","\\d+");R("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${W}*`);R("MAINVERSION",`(${l[a.NUMERICIDENTIFIER]})\\.(${l[a.NUMERICIDENTIFIER]})\\.(${l[a.NUMERICIDENTIFIER]})`);R("MAINVERSIONLOOSE",`(${l[a.NUMERICIDENTIFIERLOOSE]})\\.(${l[a.NUMERICIDENTIFIERLOOSE]})\\.(${l[a.NUMERICIDENTIFIERLOOSE]})`);R("PRERELEASEIDENTIFIER",`(?:${l[a.NONNUMERICIDENTIFIER]}|${l[a.NUMERICIDENTIFIER]})`);R("PRERELEASEIDENTIFIERLOOSE",`(?:${l[a.NONNUMERICIDENTIFIER]}|${l[a.NUMERICIDENTIFIERLOOSE]})`);R("PRERELEASE",`(?:-(${l[a.PRERELEASEIDENTIFIER]}(?:\\.${l[a.PRERELEASEIDENTIFIER]})*))`);R("PRERELEASELOOSE",`(?:-?(${l[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[a.PRERELEASEIDENTIFIERLOOSE]})*))`);R("BUILDIDENTIFIER",`${W}+`);R("BUILD",`(?:\\+(${l[a.BUILDIDENTIFIER]}(?:\\.${l[a.BUILDIDENTIFIER]})*))`);R("FULLPLAIN",`v?${l[a.MAINVERSION]}${l[a.PRERELEASE]}?${l[a.BUILD]}?`);R("FULL",`^${l[a.FULLPLAIN]}$`);R("LOOSEPLAIN",`[v=\\s]*${l[a.MAINVERSIONLOOSE]}${l[a.PRERELEASELOOSE]}?${l[a.BUILD]}?`);R("LOOSE",`^${l[a.LOOSEPLAIN]}$`);R("GTLT","((?:<|>)?=?)");R("XRANGEIDENTIFIERLOOSE",`${l[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);R("XRANGEIDENTIFIER",`${l[a.NUMERICIDENTIFIER]}|x|X|\\*`);R("XRANGEPLAIN",`[v=\\s]*(${l[a.XRANGEIDENTIFIER]})(?:\\.(${l[a.XRANGEIDENTIFIER]})(?:\\.(${l[a.XRANGEIDENTIFIER]})(?:${l[a.PRERELEASE]})?${l[a.BUILD]}?)?)?`);R("XRANGEPLAINLOOSE",`[v=\\s]*(${l[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[a.XRANGEIDENTIFIERLOOSE]})(?:${l[a.PRERELEASELOOSE]})?${l[a.BUILD]}?)?)?`);R("XRANGE",`^${l[a.GTLT]}\\s*${l[a.XRANGEPLAIN]}$`);R("XRANGELOOSE",`^${l[a.GTLT]}\\s*${l[a.XRANGEPLAINLOOSE]}$`);R("COERCEPLAIN",`(^|[^\\d])(\\d{1,${M}})(?:\\.(\\d{1,${M}}))?(?:\\.(\\d{1,${M}}))?`);R("COERCE",`${l[a.COERCEPLAIN]}(?:$|[^\\d])`);R("COERCEFULL",l[a.COERCEPLAIN]+`(?:${l[a.PRERELEASE]})?(?:${l[a.BUILD]})?(?:$|[^\\d])`);R("COERCERTL",l[a.COERCE],!0);R("COERCERTLFULL",l[a.COERCEFULL],!0);R("LONETILDE","(?:~>?)");R("TILDETRIM",`(\\s*)${l[a.LONETILDE]}\\s+`,!0);q.tildeTrimReplace="$1~";R("TILDE",`^${l[a.LONETILDE]}${l[a.XRANGEPLAIN]}$`);R("TILDELOOSE",`^${l[a.LONETILDE]}${l[a.XRANGEPLAINLOOSE]}$`);R("LONECARET","(?:\\^)");R("CARETTRIM",`(\\s*)${l[a.LONECARET]}\\s+`,!0);q.caretTrimReplace="$1^";R("CARET",`^${l[a.LONECARET]}${l[a.XRANGEPLAIN]}$`);R("CARETLOOSE",`^${l[a.LONECARET]}${l[a.XRANGEPLAINLOOSE]}$`);R("COMPARATORLOOSE",`^${l[a.GTLT]}\\s*(${l[a.LOOSEPLAIN]})$|^$`);R("COMPARATOR",`^${l[a.GTLT]}\\s*(${l[a.FULLPLAIN]})$|^$`);R("COMPARATORTRIM",`(\\s*)${l[a.GTLT]}\\s*(${l[a.LOOSEPLAIN]}|${l[a.XRANGEPLAIN]})`,!0);q.comparatorTrimReplace="$1$2$3";R("HYPHENRANGE",`^\\s*(${l[a.XRANGEPLAIN]})\\s+-\\s+(${l[a.XRANGEPLAIN]})\\s*$`);R("HYPHENRANGELOOSE",`^\\s*(${l[a.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[a.XRANGEPLAINLOOSE]})\\s*$`);R("STAR","(<|>)?=?\\s*\\*");R("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");R("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var y=p((Ii,$e)=>{"use strict";o();var Lt=Object.freeze({loose:!0}),Nt=Object.freeze({}),Ot=t=>t?typeof t!="object"?Lt:t:Nt;$e.exports=Ot});var z=p((Ni,Le)=>{"use strict";o();var me=/^[0-9]+$/,Ie=(t,e)=>{if(typeof t=="number"&&typeof e=="number")return t===e?0:t<e?-1:1;let r=me.test(t),s=me.test(e);return r&&s&&(t=+t,e=+e),t===e?0:r&&!s?-1:s&&!r?1:t<e?-1:1},dt=(t,e)=>Ie(e,t);Le.exports={compareIdentifiers:Ie,rcompareIdentifiers:dt}});var O=p((di,Oe)=>{"use strict";o();var F=v(),{MAX_LENGTH:Ne,MAX_SAFE_INTEGER:j}=g(),{safeRe:U,t:X}=P(),St=y(),{compareIdentifiers:K}=z(),Tt=(t,e)=>{let r=e.split(".");if(r.length>t.length)return!1;for(let s=0;s<r.length;s++)if(K(t[s],r[s])!==0)return!1;return!0},Z=class t{constructor(e,r){if(r=St(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.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>Ne)throw new TypeError(`version is longer than ${Ne} characters`);F("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let s=e.trim().match(r.loose?U[X.LOOSE]:U[X.FULL]);if(!s)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>j||this.major<0)throw new TypeError("Invalid major version");if(this.minor>j||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>j||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(n=>{if(/^[0-9]+$/.test(n)){let i=+n;if(i>=0&&i<j)return i}return n}):this.prerelease=[],this.build=s[5]?s[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(F("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}comparePre(e){if(e instanceof t||(e=new t(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 r=0;do{let s=this.prerelease[r],n=e.prerelease[r];if(F("prerelease compare",r,s,n),s===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(s===void 0)return-1;if(s===n)continue;return K(s,n)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let s=this.build[r],n=e.build[r];if(F("build compare",r,s,n),s===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(s===void 0)return-1;if(s===n)continue;return K(s,n)}while(++r)}inc(e,r,s){if(e.startsWith("pre")){if(!r&&s===!1)throw new Error("invalid increment argument: identifier is empty");if(r){let n=`-${r}`.match(this.options.loose?U[X.PRERELEASELOOSE]:U[X.PRERELEASE]);if(!n||n[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,s);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,s);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,s),this.inc("pre",r,s);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,s),this.inc("pre",r,s);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 n=Number(s)?1:0;if(this.prerelease.length===0)this.prerelease=[n];else{let i=this.prerelease.length;for(;--i>=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(r===this.prerelease.join(".")&&s===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(n)}}if(r){let i=[r,n];if(s===!1&&(i=[r]),Tt(this.prerelease,r)){let c=this.prerelease[r.split(".").length];isNaN(c)&&(this.prerelease=i)}else this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};Oe.exports=Z});var w=p((Ti,Se)=>{"use strict";o();var de=O(),At=(t,e,r=!1)=>{if(t instanceof de)return t;try{return new de(t,e)}catch(s){if(!r)return null;throw s}};Se.exports=At});var Ae=p((qi,Te)=>{"use strict";o();var qt=w(),wt=(t,e)=>{let r=qt(t,e);return r?r.version:null};Te.exports=wt});var we=p((gi,qe)=>{"use strict";o();var gt=w(),Pt=(t,e)=>{let r=gt(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};qe.exports=Pt});var ve=p((vi,Pe)=>{"use strict";o();var ge=O(),vt=(t,e,r,s,n)=>{typeof r=="string"&&(n=s,s=r,r=void 0);try{return new ge(t instanceof ge?t.version:t,r).inc(e,s,n).version}catch{return null}};Pe.exports=vt});var De=p((Ci,Ce)=>{"use strict";o();var xe=w(),xt=(t,e)=>{let r=xe(t,null,!0),s=xe(e,null,!0),n=r.compare(s);if(n===0)return null;let i=n>0,c=i?r:s,u=i?s:r,f=!!c.prerelease.length;if(!!u.prerelease.length&&!f){if(!u.patch&&!u.minor)return"major";if(u.compareMain(c)===0)return u.minor&&!u.patch?"minor":"patch"}let m=f?"pre":"";return r.major!==s.major?m+"major":r.minor!==s.minor?m+"minor":r.patch!==s.patch?m+"patch":"prerelease"};Ce.exports=xt});var ye=p((Gi,Ge)=>{"use strict";o();var Ct=O(),Dt=(t,e)=>new Ct(t,e).major;Ge.exports=Dt});var je=p((Fi,Fe)=>{"use strict";o();var Gt=O(),yt=(t,e)=>new Gt(t,e).minor;Fe.exports=yt});var Xe=p((Ui,Ue)=>{"use strict";o();var Ft=O(),jt=(t,e)=>new Ft(t,e).patch;Ue.exports=jt});var _e=p((Vi,Ve)=>{"use strict";o();var Ut=w(),Xt=(t,e)=>{let r=Ut(t,e);return r&&r.prerelease.length?r.prerelease:null};Ve.exports=Xt});var T=p((bi,He)=>{"use strict";o();var be=O(),Vt=(t,e,r)=>new be(t,r).compare(new be(e,r));He.exports=Vt});var Be=p((ki,ke)=>{"use strict";o();var _t=T(),bt=(t,e,r)=>_t(e,t,r);ke.exports=bt});var Me=p((Yi,Ye)=>{"use strict";o();var Ht=T(),kt=(t,e)=>Ht(t,e,!0);Ye.exports=kt});var V=p((Wi,ze)=>{"use strict";o();var We=O(),Bt=(t,e,r)=>{let s=new We(t,r),n=new We(e,r);return s.compare(n)||s.compareBuild(n)};ze.exports=Bt});var Ze=p((Ki,Ke)=>{"use strict";o();var Yt=V(),Mt=(t,e)=>t.sort((r,s)=>Yt(r,s,e));Ke.exports=Mt});var Qe=p((Ji,Je)=>{"use strict";o();var Wt=V(),zt=(t,e)=>t.sort((r,s)=>Wt(s,r,e));Je.exports=zt});var x=p((eo,er)=>{"use strict";o();var Kt=T(),Zt=(t,e,r)=>Kt(t,e,r)>0;er.exports=Zt});var _=p((to,rr)=>{"use strict";o();var Jt=T(),Qt=(t,e,r)=>Jt(t,e,r)<0;rr.exports=Qt});var J=p((no,tr)=>{"use strict";o();var es=T(),rs=(t,e,r)=>es(t,e,r)===0;tr.exports=rs});var Q=p((oo,sr)=>{"use strict";o();var ts=T(),ss=(t,e,r)=>ts(t,e,r)!==0;sr.exports=ss});var b=p((lo,nr)=>{"use strict";o();var ns=T(),is=(t,e,r)=>ns(t,e,r)>=0;nr.exports=is});var H=p((uo,ir)=>{"use strict";o();var os=T(),cs=(t,e,r)=>os(t,e,r)<=0;ir.exports=cs});var ee=p((Eo,or)=>{"use strict";o();var ls=J(),as=Q(),us=x(),fs=b(),Es=_(),hs=H(),ps=(t,e,r,s)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return ls(t,r,s);case"!=":return as(t,r,s);case">":return us(t,r,s);case">=":return fs(t,r,s);case"<":return Es(t,r,s);case"<=":return hs(t,r,s);default:throw new TypeError(`Invalid operator: ${e}`)}};or.exports=ps});var lr=p((po,cr)=>{"use strict";o();var Rs=O(),$s=w(),{safeRe:k,t:B}=P(),ms=(t,e)=>{if(t instanceof Rs)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?k[B.COERCEFULL]:k[B.COERCE]);else{let f=e.includePrerelease?k[B.COERCERTLFULL]:k[B.COERCERTL],$;for(;($=f.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||$.index+$[0].length!==r.index+r[0].length)&&(r=$),f.lastIndex=$.index+$[1].length+$[2].length;f.lastIndex=-1}if(r===null)return null;let s=r[2],n=r[3]||"0",i=r[4]||"0",c=e.includePrerelease&&r[5]?`-${r[5]}`:"",u=e.includePrerelease&&r[6]?`+${r[6]}`:"";return $s(`${s}.${n}.${i}${c}${u}`,e)};cr.exports=ms});var ur=p(($o,ar)=>{"use strict";o();var Is=w(),Ls=g(),Ns=O(),Os=(t,e,r)=>{if(!Ls.RELEASE_TYPES.includes(e))return null;let s=ds(t,r);return s&&Ss(s,e)},ds=(t,e)=>{let r=t instanceof Ns?t.version:t;return Is(r,e)},Ss=(t,e)=>{if(Ts(e))return t.version;switch(t.prerelease=[],e){case"major":t.minor=0,t.patch=0;break;case"minor":t.patch=0;break}return t.format()},Ts=t=>t.startsWith("pre");ar.exports=Os});var Er=p((Io,fr)=>{"use strict";o();var re=class{constructor(){this.max=1e3,this.map=new Map}get(e){let r=this.map.get(e);if(r!==void 0)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&r!==void 0){if(this.map.size>=this.max){let n=this.map.keys().next().value;this.delete(n)}this.map.set(e,r)}return this}};fr.exports=re});var A=p((No,$r)=>{"use strict";o();var As=/\s+/g,te=class t{constructor(e,r){if(r=ws(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof se)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().replace(As," "),this.set=this.raw.split("||").map(s=>this.parseRange(s.trim())).filter(s=>s.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let s=this.set[0];if(this.set=this.set.filter(n=>!pr(n[0])),this.set.length===0)this.set=[s];else if(this.set.length>1){for(let n of this.set)if(n.length===1&&Fs(n[0])){this.set=[n];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 r=this.set[e];for(let s=0;s<r.length;s++)s>0&&(this.formatted+=" "),this.formatted+=r[s].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){e=e.replace(ys,"");let s=((this.options.includePrerelease&&Ds)|(this.options.loose&&Gs))+":"+e,n=hr.get(s);if(n)return n;let i=this.options.loose,c=i?S[d.HYPHENRANGELOOSE]:S[d.HYPHENRANGE];e=e.replace(c,Ms(this.options.includePrerelease)),I("hyphen replace",e),e=e.replace(S[d.COMPARATORTRIM],vs),I("comparator trim",e),e=e.replace(S[d.TILDETRIM],xs),I("tilde trim",e),e=e.replace(S[d.CARETTRIM],Cs),I("caret trim",e);let u=e.split(" ").map(E=>js(E,this.options)).join(" ").split(/\s+/).map(E=>Ys(E,this.options));i&&(u=u.filter(E=>(I("loose invalid filter",E,this.options),!!E.match(S[d.COMPARATORLOOSE])))),I("range list",u);let f=new Map,$=u.map(E=>new se(E,this.options));for(let E of $){if(pr(E))return[E];f.set(E.value,E)}f.size>1&&f.has("")&&f.delete("");let m=[...f.values()];return hr.set(s,m),m}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(s=>Rr(s,r)&&e.set.some(n=>Rr(n,r)&&s.every(i=>n.every(c=>i.intersects(c,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new gs(e,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(Ws(this.set[r],e,this.options))return!0;return!1}};$r.exports=te;var qs=Er(),hr=new qs,ws=y(),se=C(),I=v(),gs=O(),{safeRe:S,src:Ps,t:d,comparatorTrimReplace:vs,tildeTrimReplace:xs,caretTrimReplace:Cs}=P(),{FLAG_INCLUDE_PRERELEASE:Ds,FLAG_LOOSE:Gs}=g(),ys=new RegExp(Ps[d.BUILD],"g"),pr=t=>t.value==="<0.0.0-0",Fs=t=>t.value==="",Rr=(t,e)=>{let r=!0,s=t.slice(),n=s.pop();for(;r&&s.length;)r=s.every(i=>n.intersects(i,e)),n=s.pop();return r},js=(t,e)=>(t=t.replace(S[d.BUILD],""),I("comp",t,e),t=_s(t,e),I("caret",t),t=Xs(t,e),I("tildes",t),t=Hs(t,e),I("xrange",t),t=Bs(t,e),I("stars",t),t),N=t=>!t||t.toLowerCase()==="x"||t==="*",Us=(t,e,r)=>N(t)&&!N(e)||N(e)&&r&&!N(r),Xs=(t,e)=>t.trim().split(/\s+/).map(r=>Vs(r,e)).join(" "),Vs=(t,e)=>{let r=e.loose?S[d.TILDELOOSE]:S[d.TILDE];return t.replace(r,(s,n,i,c,u)=>{I("tilde",t,s,n,i,c,u);let f;return N(n)?f="":N(i)?f=`>=${n}.0.0 <${+n+1}.0.0-0`:N(c)?f=`>=${n}.${i}.0 <${n}.${+i+1}.0-0`:u?(I("replaceTilde pr",u),f=`>=${n}.${i}.${c}-${u} <${n}.${+i+1}.0-0`):f=`>=${n}.${i}.${c} <${n}.${+i+1}.0-0`,I("tilde return",f),f})},_s=(t,e)=>t.trim().split(/\s+/).map(r=>bs(r,e)).join(" "),bs=(t,e)=>{I("caret",t,e);let r=e.loose?S[d.CARETLOOSE]:S[d.CARET],s=e.includePrerelease?"-0":"";return t.replace(r,(n,i,c,u,f)=>{I("caret",t,n,i,c,u,f);let $;return N(i)?$="":N(c)?$=`>=${i}.0.0${s} <${+i+1}.0.0-0`:N(u)?i==="0"?$=`>=${i}.${c}.0${s} <${i}.${+c+1}.0-0`:$=`>=${i}.${c}.0${s} <${+i+1}.0.0-0`:f?(I("replaceCaret pr",f),i==="0"?c==="0"?$=`>=${i}.${c}.${u}-${f} <${i}.${c}.${+u+1}-0`:$=`>=${i}.${c}.${u}-${f} <${i}.${+c+1}.0-0`:$=`>=${i}.${c}.${u}-${f} <${+i+1}.0.0-0`):(I("no pr"),i==="0"?c==="0"?$=`>=${i}.${c}.${u} <${i}.${c}.${+u+1}-0`:$=`>=${i}.${c}.${u} <${i}.${+c+1}.0-0`:$=`>=${i}.${c}.${u} <${+i+1}.0.0-0`),I("caret return",$),$})},Hs=(t,e)=>(I("replaceXRanges",t,e),t.split(/\s+/).map(r=>ks(r,e)).join(" ")),ks=(t,e)=>{t=t.trim();let r=e.loose?S[d.XRANGELOOSE]:S[d.XRANGE];return t.replace(r,(s,n,i,c,u,f)=>{if(I("xRange",t,s,n,i,c,u,f),Us(i,c,u))return t;let $=N(i),m=$||N(c),E=m||N(u),L=E;return n==="="&&L&&(n=""),f=e.includePrerelease?"-0":"",$?n===">"||n==="<"?s="<0.0.0-0":s="*":n&&L?(m&&(c=0),u=0,n===">"?(n=">=",m?(i=+i+1,c=0,u=0):(c=+c+1,u=0)):n==="<="&&(n="<",m?i=+i+1:c=+c+1),n==="<"&&(f="-0"),s=`${n+i}.${c}.${u}${f}`):m?s=`>=${i}.0.0${f} <${+i+1}.0.0-0`:E&&(s=`>=${i}.${c}.0${f} <${i}.${+c+1}.0-0`),I("xRange return",s),s})},Bs=(t,e)=>(I("replaceStars",t,e),t.trim().replace(S[d.STAR],"")),Ys=(t,e)=>(I("replaceGTE0",t,e),t.trim().replace(S[e.includePrerelease?d.GTE0PRE:d.GTE0],"")),Ms=t=>(e,r,s,n,i,c,u,f,$,m,E,L)=>(N(s)?r="":N(n)?r=`>=${s}.0.0${t?"-0":""}`:N(i)?r=`>=${s}.${n}.0${t?"-0":""}`:c?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,N($)?f="":N(m)?f=`<${+$+1}.0.0-0`:N(E)?f=`<${$}.${+m+1}.0-0`:L?f=`<=${$}.${m}.${E}-${L}`:t?f=`<${$}.${m}.${+E+1}-0`:f=`<=${f}`,`${r} ${f}`.trim()),Ws=(t,e,r)=>{for(let s=0;s<t.length;s++)if(!t[s].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let s=0;s<t.length;s++)if(I(t[s].semver),t[s].semver!==se.ANY&&t[s].semver.prerelease.length>0){let n=t[s].semver;if(n.major===e.major&&n.minor===e.minor&&n.patch===e.patch)return!0}return!1}return!0}});var C=p((So,dr)=>{"use strict";o();var D=Symbol("SemVer ANY"),oe=class t{static get ANY(){return D}constructor(e,r){if(r=mr(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),ie("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===D?this.value="":this.value=this.operator+this.semver.version,ie("comp",this)}parse(e){let r=this.options.loose?Ir[Lr.COMPARATORLOOSE]:Ir[Lr.COMPARATOR],s=e.match(r);if(!s)throw new TypeError(`Invalid comparator: ${e}`);this.operator=s[1]!==void 0?s[1]:"",this.operator==="="&&(this.operator=""),s[2]?this.semver=new Nr(s[2],this.options.loose):this.semver=D}toString(){return this.value}test(e){if(ie("Comparator.test",e,this.options.loose),this.semver===D||e===D)return!0;if(typeof e=="string")try{e=new Nr(e,this.options)}catch{return!1}return ne(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Or(e.value,r).test(this.value):e.operator===""?e.value===""?!0:new Or(this.value,r).test(e.semver):(r=mr(r),r.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!r.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("=")||ne(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||ne(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};dr.exports=oe;var mr=y(),{safeRe:Ir,t:Lr}=P(),ne=ee(),ie=v(),Nr=O(),Or=A()});var G=p((Ao,Sr)=>{"use strict";o();var zs=A(),Ks=(t,e,r)=>{try{e=new zs(e,r)}catch{return!1}return e.test(t)};Sr.exports=Ks});var Ar=p((wo,Tr)=>{"use strict";o();var Zs=A(),Js=(t,e)=>new Zs(t,e).set.map(r=>r.map(s=>s.value).join(" ").trim().split(" "));Tr.exports=Js});var wr=p((Po,qr)=>{"use strict";o();var Qs=O(),en=A(),rn=(t,e,r)=>{let s=null,n=null,i=null;try{i=new en(e,r)}catch{return null}return t.forEach(c=>{i.test(c)&&(!s||n.compare(c)===-1)&&(s=c,n=new Qs(s,r))}),s};qr.exports=rn});var Pr=p((xo,gr)=>{"use strict";o();var tn=O(),sn=A(),nn=(t,e,r)=>{let s=null,n=null,i=null;try{i=new sn(e,r)}catch{return null}return t.forEach(c=>{i.test(c)&&(!s||n.compare(c)===1)&&(s=c,n=new tn(s,r))}),s};gr.exports=nn});var Cr=p((Do,xr)=>{"use strict";o();var ce=O(),on=A(),vr=x(),cn=(t,e)=>{t=new on(t,e);let r=new ce("0.0.0");if(t.test(r)||(r=new ce("0.0.0-0"),t.test(r)))return r;r=null;for(let s=0;s<t.set.length;++s){let n=t.set[s],i=null;n.forEach(c=>{let u=new ce(c.semver.version);switch(c.operator){case">":u.prerelease.length===0?u.patch++:u.prerelease.push(0),u.raw=u.format();case"":case">=":(!i||vr(u,i))&&(i=u);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${c.operator}`)}}),i&&(!r||vr(r,i))&&(r=i)}return r&&t.test(r)?r:null};xr.exports=cn});var Gr=p((yo,Dr)=>{"use strict";o();var ln=A(),an=(t,e)=>{try{return new ln(t,e).range||"*"}catch{return null}};Dr.exports=an});var Y=p((jo,Ur)=>{"use strict";o();var un=O(),jr=C(),{ANY:fn}=jr,En=A(),hn=G(),yr=x(),Fr=_(),pn=H(),Rn=b(),$n=(t,e,r,s)=>{t=new un(t,s),e=new En(e,s);let n,i,c,u,f;switch(r){case">":n=yr,i=pn,c=Fr,u=">",f=">=";break;case"<":n=Fr,i=Rn,c=yr,u="<",f="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(hn(t,e,s))return!1;for(let $=0;$<e.set.length;++$){let m=e.set[$],E=null,L=null;if(m.forEach(h=>{h.semver===fn&&(h=new jr(">=0.0.0")),E=E||h,L=L||h,n(h.semver,E.semver,s)?E=h:c(h.semver,L.semver,s)&&(L=h)}),E.operator===u||E.operator===f||(!L.operator||L.operator===u)&&i(t,L.semver))return!1;if(L.operator===f&&c(t,L.semver))return!1}return!0};Ur.exports=$n});var Vr=p((Xo,Xr)=>{"use strict";o();var mn=Y(),In=(t,e,r)=>mn(t,e,">",r);Xr.exports=In});var br=p((_o,_r)=>{"use strict";o();var Ln=Y(),Nn=(t,e,r)=>Ln(t,e,"<",r);_r.exports=Nn});var Br=p((Ho,kr)=>{"use strict";o();var Hr=A(),On=(t,e,r)=>(t=new Hr(t,r),e=new Hr(e,r),t.intersects(e,r));kr.exports=On});var Mr=p((Bo,Yr)=>{"use strict";o();var dn=G(),Sn=T();Yr.exports=(t,e,r)=>{let s=[],n=null,i=null,c=t.sort((m,E)=>Sn(m,E,r));for(let m of c)dn(m,e,r)?(i=m,n||(n=m)):(i&&s.push([n,i]),i=null,n=null);n&&s.push([n,null]);let u=[];for(let[m,E]of s)m===E?u.push(m):!E&&m===c[0]?u.push("*"):E?m===c[0]?u.push(`<=${E}`):u.push(`${m} - ${E}`):u.push(`>=${m}`);let f=u.join(" || "),$=typeof e.raw=="string"?e.raw:String(e);return f.length<$.length?f:e}});var Qr=p((Mo,Jr)=>{"use strict";o();var Wr=A(),ue=C(),{ANY:le}=ue,ae=G(),fe=T(),Tn=(t,e,r={})=>{if(t===e)return!0;t=new Wr(t,r),e=new Wr(e,r);let s=!1;e:for(let n of t.set){for(let i of e.set){let c=qn(n,i,r);if(s=s||c!==null,c)continue e}if(s)return!1}return!0},An=[new ue(">=0.0.0-0")],zr=[new ue(">=0.0.0")],qn=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===le){if(e.length===1&&e[0].semver===le)return!0;r.includePrerelease?t=An:t=zr}if(e.length===1&&e[0].semver===le){if(r.includePrerelease)return!0;e=zr}let s=new Set,n,i;for(let h of t)h.operator===">"||h.operator===">="?n=Kr(n,h,r):h.operator==="<"||h.operator==="<="?i=Zr(i,h,r):s.add(h.semver);if(s.size>1)return null;let c;if(n&&i){if(c=fe(n.semver,i.semver,r),c>0)return null;if(c===0&&(n.operator!==">="||i.operator!=="<="))return null}for(let h of s){if(n&&!ae(h,String(n),r)||i&&!ae(h,String(i),r))return null;for(let st of e)if(!ae(h,String(st),r))return!1;return!0}let u,f,$,m,E=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1,L=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:!1;E&&E.prerelease.length===1&&i.operator==="<"&&E.prerelease[0]===0&&(E=!1);for(let h of e){if(m=m||h.operator===">"||h.operator===">=",$=$||h.operator==="<"||h.operator==="<=",n){if(L&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===L.major&&h.semver.minor===L.minor&&h.semver.patch===L.patch&&(L=!1),h.operator===">"||h.operator===">="){if(u=Kr(n,h,r),u===h&&u!==n)return!1}else if(n.operator===">="&&!h.test(n.semver))return!1}if(i){if(E&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===E.major&&h.semver.minor===E.minor&&h.semver.patch===E.patch&&(E=!1),h.operator==="<"||h.operator==="<="){if(f=Zr(i,h,r),f===h&&f!==i)return!1}else if(i.operator==="<="&&!h.test(i.semver))return!1}if(!h.operator&&(i||n)&&c!==0)return!1}return!(n&&$&&!i&&c!==0||i&&m&&!n&&c!==0||L||E)},Kr=(t,e,r)=>{if(!t)return e;let s=fe(t.semver,e.semver,r);return s>0?t:s<0||e.operator===">"&&t.operator===">="?e:t},Zr=(t,e,r)=>{if(!t)return e;let s=fe(t.semver,e.semver,r);return s<0?t:s>0||e.operator==="<"&&t.operator==="<="?e:t};Jr.exports=Tn});var Ei=p((zo,tt)=>{"use strict";o();var Ee=P(),et=g(),wn=O(),rt=z(),gn=w(),Pn=Ae(),vn=we(),xn=ve(),Cn=De(),Dn=ye(),Gn=je(),yn=Xe(),Fn=_e(),jn=T(),Un=Be(),Xn=Me(),Vn=V(),_n=Ze(),bn=Qe(),Hn=x(),kn=_(),Bn=J(),Yn=Q(),Mn=b(),Wn=H(),zn=ee(),Kn=lr(),Zn=ur(),Jn=C(),Qn=A(),ei=G(),ri=Ar(),ti=wr(),si=Pr(),ni=Cr(),ii=Gr(),oi=Y(),ci=Vr(),li=br(),ai=Br(),ui=Mr(),fi=Qr();tt.exports={parse:gn,valid:Pn,clean:vn,inc:xn,diff:Cn,major:Dn,minor:Gn,patch:yn,prerelease:Fn,compare:jn,rcompare:Un,compareLoose:Xn,compareBuild:Vn,sort:_n,rsort:bn,gt:Hn,lt:kn,eq:Bn,neq:Yn,gte:Mn,lte:Wn,cmp:zn,coerce:Kn,truncate:Zn,Comparator:Jn,Range:Qn,satisfies:ei,toComparators:ri,maxSatisfying:ti,minSatisfying:si,minVersion:ni,validRange:ii,outside:oi,gtr:ci,ltr:li,intersects:ai,simplifyRange:ui,subset:fi,SemVer:wn,re:Ee.re,src:Ee.src,tokens:Ee.t,SEMVER_SPEC_VERSION:et.SEMVER_SPEC_VERSION,RELEASE_TYPES:et.RELEASE_TYPES,compareIdentifiers:rt.compareIdentifiers,rcompareIdentifiers:rt.rcompareIdentifiers}});export{Ei as a};
@@ -1 +1 @@
1
- import{b as n}from"./chunk-XNO6DZYP.js";import{l as i}from"./chunk-JPGO36XP.js";import{g as t}from"./chunk-VPRTJUIN.js";t();t();var o=class extends i.ExtendableError{constructor(e,p){super(p),this.type=e}},d=r=>async()=>r,f=r=>async e=>e.provider!==r.provider?n(new o("invalid-provider")):r.action(e.port);var a="cloudflare",l=d({name:a});export{o as a,f as b,a as c,l as d};
1
+ import{b as n}from"./chunk-6HZTMQD6.js";import{l as i}from"./chunk-BHWEA4V2.js";import{g as t}from"./chunk-VPRTJUIN.js";t();t();var o=class extends i.ExtendableError{constructor(e,p){super(p),this.type=e}},d=r=>async()=>r,f=r=>async e=>e.provider!==r.provider?n(new o("invalid-provider")):r.action(e.port);var a="cloudflare",l=d({name:a});export{o as a,f as b,a as c,l as d};
@@ -0,0 +1,3 @@
1
+ import{a as te}from"./chunk-TLSAQ6FG.js";import{O as W,va as B,xa as b,ya as Q,z as P}from"./chunk-4V4DQ6W7.js";import{b as T}from"./chunk-A5SQCM63.js";import{a as oe,b as re}from"./chunk-VEDZUOVI.js";import{a as U}from"./chunk-JUVAGMIH.js";import{A as Z,a as J,t as X,w as L,x}from"./chunk-MGL4YM3S.js";import{d as V,e as K}from"./chunk-6YAXFS6V.js";import{d as E,g as ee}from"./chunk-BHWEA4V2.js";import{r as le}from"./chunk-3YWUSKWF.js";import{Fa as z,Fb as C,Hb as c,Pb as d,Ua as _}from"./chunk-VPL2NDH6.js";import{d as H,f as F,i as Y,q as A}from"./chunk-IU2ZQ6TE.js";import{e as pe,g as u}from"./chunk-VPRTJUIN.js";u();var w=pe(le(),1);var I={path:w.Flags.string({description:"The path where you want to run the command. Defaults to the current working directory.",env:"SHOPIFY_FLAG_PATH",parse:async t=>{let e=F(t);return _(e)?z(e)?e:(x({headline:"The path must be a directory, not a file.",body:[`The provided path is not a directory: ${e}`,`Did you mean: ${Y(e)}`]}),process.exit(1)):(x({headline:"A path was explicitly provided but doesn't exist.",body:[`Please check the path and try again: ${e}`]}),process.exit(1))},default:async()=>A(),noCacheDefault:!0}),password:w.Flags.string({description:"Password generated from the Theme Access app or an Admin API token.",env:"SHOPIFY_CLI_THEME_TOKEN"}),store:w.Flags.string({char:"s",description:"Store URL. It can be the store prefix (example) or the full myshopify.com URL (example.myshopify.com, https://example.myshopify.com).",env:"SHOPIFY_FLAG_STORE",parse:async t=>P(t)}),environment:w.Flags.string({char:"e",description:"The environment to apply to the current command.",env:"SHOPIFY_FLAG_ENVIRONMENT",multiple:!0})},ne="Wrap the value in double quotes if you're using wildcards.",ye=t=>({only:w.Flags.string({char:"o",multiple:!0,description:`${t.charAt(0).toUpperCase()+t.slice(1)} only the specified files (Multiple flags allowed). ${ne}`,env:"SHOPIFY_FLAG_ONLY"}),ignore:w.Flags.string({char:"x",multiple:!0,description:`Skip ${t}ing the specified files (Multiple flags allowed). ${ne}`,env:"SHOPIFY_FLAG_IGNORE"})});u();u();import{AsyncLocalStorage as he}from"node:async_hooks";var se=new he,N,R,D,O;function p(){return N??(N=new T({projectName:"shopify-cli-theme-conf"})),N}function q(){return R??(R=new T({projectName:"shopify-cli-development-theme-config"})),R}function G(){return D??(D=new T({projectName:"shopify-cli-repl-theme-config"})),D}function M(){return O??(O=new T({projectName:"shopify-cli-theme-store-password"})),O}function j(t=p()){return se.getStore()?.store??t.get("themeStore")}function ie(t,e=p()){e.set("themeStore",t)}function Ee(t=p()){return d(c`Getting development theme...`),q().get(f(t))}function Fe(t,e=p()){d(c`Setting development theme...`),q().set(f(e),t)}function Ae(t=p()){d(c`Removing development theme...`),q().delete(f(t))}function Pe(t=p()){return d(c`Getting REPL theme...`),G().get(f(t))}function $e(t,e=p()){d(c`Setting REPL theme to ${t}...`),G().set(f(e),t)}function be(t=p()){d(c`Removing REPL theme...`),G().delete(f(t))}function Le(t=p()){let e=f(t);return d(c`Getting storefront password for shop ${e}...`),M().get(e)}function Ce(t,e=p()){let o=f(e);d(c`Setting storefront password for shop ${o}...`),M().set(o,t)}function Ie(t=p()){let e=f(t);d(c`Removing storefront password for ${e}...`),M().delete(e)}function f(t=p()){let e=j(t);if(!e)throw new ee("Theme store is not set. This indicates an unexpected issue with the CLI. Please report this to the Shopify CLI team.",["It may be possible to recover by running",{command:"shopify theme list --store <store>"},"(setting the store flag to the store you wish to use) and then running the command again."]);return e}async function ae(t,e){return se.run({store:t},e)}function me(t){let e=t.store??j();if(!e)throw B(new E("A store is required",`Specify the store passing ${c`${C.genericShellCommand(`--${I.store.name}=example.myshopify.com`)}`.value} or set the ${c`${C.genericShellCommand(I.store.env)}`.value} environment variable.`));return ie(e),e}u();u();var ce="shopify.theme.toml",He=new Intl.DateTimeFormat(void 0,{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),Ye=["**/.git","**/.vscode","**/.hg","**/.bzr","**/.svn","**/_darcs","**/CVS","**/*.sublime-(project|workspace)","**/.DS_Store","**/.sass-cache","**/Thumbs.db","**/desktop.ini","**/config.yml","**/node_modules/",".prettierrc.json"],ze=50;var k=class extends re{environmentsFilename(){return ce}async command(e,o,s=!1,a,r){}async run(e){let o=this.constructor,s=o.multiEnvironmentsFlags,{args:a,flags:r}=await this.parse(o),n="password"in o.flags,h=(Array.isArray(r.environment)?r.environment:[r.environment]).filter(Boolean),l=s!==null&&s.some(i=>Array.isArray(i)?i.includes("store"):i==="store");if(h.length<=1){if(h[0]&&!r.store&&l)throw new E("Please provide a valid environment.");let i=n?await this.createSession(r):void 0,S=this.constructor.name.toLowerCase();if(b(`theme-command:${S}:single-env:authenticated`),r.path&&!_(r.path))throw new E(`Path does not exist: ${r.path}`);try{await this.command(r,i,!1,a)}finally{await this.logAnalyticsData(i)}return}if(s===null){L({body:"This command does not support multiple environments."});return}let{flags:m}=await this.parse(oe(o),this.argv);if("path"in m){this.errorOnGlobalPath();return}let y=await this.loadEnvironments(h,r,m),g=await this.validateEnvironments(y,s,n);"force"in o.flags&&!r.force&&!await this.showConfirmation(this.constructor.name,s,g)||await this.runConcurrent(g.valid)}async loadEnvironments(e,o,s){let a=new Map;for(let r of e){let n=await te(r,"shopify.theme.toml",{from:o.path,silent:!0});n?.store&&typeof n.store=="string"&&(n.store=P(n.store)),n?.path&&typeof n.path=="string"&&(n.path=F(n.path)),a.set(r,{flags:{...o,...n,...s,environment:[r]},validationFlags:{...n,...s}})}return a}async validateEnvironments(e,o,s){let a=[],r=[];for(let[n,{flags:h,validationFlags:l}]of e){let m=this.validConfig(l,o,n);if(m!==!0){let y=m.join(", ");r.push({environment:n,reason:`Missing flags: ${y}`});continue}a.push({environment:n,flags:h,requiresAuth:s})}return{valid:a,invalid:r}}async showConfirmation(e,o,s){let n={message:[`Run ${e.toLowerCase()} in the following environments?`],confirmationMessage:"Yes, proceed",cancellationMessage:"Cancel"},h=[...s.valid.map(({environment:l,flags:m})=>{let y=o.map(g=>{let v=Array.isArray(g)?g.find(i=>m[i]):g;if(v==="password")return"password";if(v==="path"&&typeof m.path=="string"){let i=m.path.split(/[/\\]/);if(i.length===1)return`path: ${m.path}`;let S=i[0]===""?`/${i[1]}`:i[0],$=i.at(-1);return`path: ${S}/.../${$}`}return v&&`${v}: ${m[v]}`}).join(", ");return[l,{subdued:y||"No flags required"}]}),...s.invalid.map(({environment:l,reason:m})=>[l,{error:`Skipping | ${m}`}])];return n.infoTable={Environment:h},s.invalid.length>0&&(n.confirmationMessage="Proceed anyway (will skip invalid environments)"),Z(n)}async runConcurrent(e){let o=new J,s=e.map(n=>n.flags.store),a=new Set(s),r=s.length===a.size?[e]:this.createSequentialGroups(e);for(let n of r)await X({processes:n.map(({environment:h,flags:l,requiresAuth:m})=>({prefix:h,action:async(y,g,v)=>{try{let i=l.store;await ae(i,async()=>{let S=m?await this.createSession(l):void 0,$=this.constructor.name.toLowerCase();b(`theme-command:${$}:multi-env:authenticated`);try{await this.command(l,S,!0,{},{stdout:y,stderr:g})}finally{await this.logAnalyticsData(S)}})}catch(i){i instanceof Error&&(i.message=`Environment ${h} failed:
2
+
3
+ ${i.message}`,x({body:[i.message]}))}}})),abortSignal:o.signal,showTimestamps:!0,renderOptions:{stdout:process.stderr}})}createSequentialGroups(e){let o=[];return e.forEach(s=>{let a=o.find(r=>!r.some(n=>n.flags.store===s.flags.store));a?a.push(s):o.push([s])}),o}async createSession(e){let o=e.store,s=e.password;return await W(me({store:o}),s)}validConfig(e,o,s){let a=o.filter(r=>Array.isArray(r)?!r.some(n=>e[n]):!e[r]).map(r=>Array.isArray(r)?r.join(" or "):r);return a.length>0?(L({body:[`Missing required flags in environment configuration${s?` for ${s}`:""}:`,{list:{items:a}}]}),a):!0}errorOnGlobalPath(){let e=H(A(),"shopify.theme.toml"),o=_(e);x({body:["Can't use `--path` flag with multiple environments.",...o?["Configure each environment's theme path in your shopify.theme.toml file instead."]:["Run this command from the directory containing shopify.theme.toml.","No shopify.theme.toml found in current directory."]]})}async logAnalyticsData(e){if(!e)return;let o=Q();await V(()=>({store_fqdn_hash:U(e.storeFqdn),store_domain:e.storeFqdn,cmd_theme_timings:JSON.stringify(o.timings),cmd_theme_errors:JSON.stringify(o.errors),cmd_theme_retries:JSON.stringify(o.retries),cmd_theme_events:JSON.stringify(o.events)})),await K(()=>({store_fqdn:e.storeFqdn}))}};export{j as a,Ee as b,Fe as c,Ae as d,Pe as e,$e as f,be as g,Le as h,Ce as i,Ie as j,I as k,ye as l,me as m,He as n,Ye as o,ze as p,k as q};
@@ -0,0 +1,8 @@
1
+ import{k as _,q as R}from"./chunk-HHXHOQQP.js";import{c as g,l as P}from"./chunk-VYXVYOIJ.js";import{b as N}from"./chunk-4KRT35A2.js";import{D as w,F as v,R as L,w as T,z as C}from"./chunk-MGL4YM3S.js";import{d as F}from"./chunk-BHWEA4V2.js";import{r as H}from"./chunk-3YWUSKWF.js";import{Aa as I,Ca as k,Ta as A,Va as E,ka as b,ma as f,ua as y}from"./chunk-VPL2NDH6.js";import{d as r}from"./chunk-IU2ZQ6TE.js";import{e as D,g as d}from"./chunk-VPRTJUIN.js";d();d();var h="https://github.com/Shopify/skeleton-theme.git",q="https://github.com/Shopify/theme-liquid-docs.git",S={all:"All",github:"VS Code (GitHub Copilot)",cursor:"Cursor",claude:"Claude"};async function G(t,e){await U(t,e)}async function O(t,e){await U(t,e,!0)}async function U(t,e,o){await w([{title:`Cloning ${t} into ${e}`,task:async()=>{await g({repoUrl:t,destination:e,latestTag:o,shallow:!0}),await P(e),t===h&&(await Promise.all(Object.keys(S).map(async c=>x(r(e,`.${c}`)))),await x(r(e,".git")))}}])}async function x(t){await A(t)&&await k(t)}async function M(){return await C({message:"Which LLM instruction file would you like to include in your theme?",choices:[...Object.entries(S).map(([e,o])=>({label:o,value:e})),{label:"Skip",value:null}]})}async function $(t,e){let o=[];await w([{title:`Adding AI instructions into ${t}`,task:async()=>{await b(async c=>{await g({repoUrl:q,destination:c,shallow:!0});let l=e==="all"?Object.keys(S).filter(a=>a!=="all"):[e];try{let a=r(c,"ai","github","copilot-instructions.md"),s=await f(a),n=r(t,"AGENTS.md"),u=`# AGENTS.md
2
+
3
+ ${s}`;await y(n,u),(await Promise.all(l.map(p=>W(t,n,p)))).forEach(p=>{p.copiedFile&&o.push(p.copiedFile)})}catch{throw new F("Failed to create AI instructions")}})}}]),o.length>0&&T({headline:"Files created instead of symlinks.",body:`Shopify CLI attempted to create symbolic links between AGENTS.md and ${o.join(", ")}, but your system doesn't have Developer Mode enabled or symlinks are disabled. Separate files were created instead.`})}async function W(t,e,o){if(o==="cursor")return{};let l={github:"copilot-instructions.md",claude:"CLAUDE.md"}[o],a=r(t,l);try{return await I(e,a),{}}catch(s){if(s instanceof Error){let n=await f(e);return await y(a,n),{copiedFile:l}}else throw s}}var m=D(H(),1);var j,i=class extends R{async command(e,o,c,l){let a=l.name??await this.promptName(e.path),s=e["clone-url"],n=r(e.path,a);if(e.latest?await O(s,n):await G(s,n),!L())return;let u=await M();u&&await $(n,u)}async promptName(e){let o=await E({suffix:"theme",directory:e,family:"creative"});return v({message:"Name of the new theme",defaultValue:o})}};j=i;i.summary="Clones a Git repository to use as a starting point for building a new theme.";i.descriptionWithMarkdown=`Clones a Git repository to your local machine to use as the starting point for building a theme.
4
+
5
+ If no Git repository is specified, then this command creates a copy of Shopify's [Skeleton theme](${h}), with the specified name in the current folder. If no name is provided, then you're prompted to enter one.
6
+
7
+ > Caution: If you're building a theme for the Shopify Theme Store, then you can use our example theme as a starting point. However, the theme that you submit needs to be [substantively different from existing themes](https://shopify.dev/docs/themes/store/requirements#uniqueness) so that it provides added value for users.
8
+ `;i.description=j.descriptionWithoutMarkdown();i.usage="theme init [name] [flags]";i.args={name:m.Args.string({name:"name",description:"Name of the new theme",required:!1})};i.flags={...N,path:_.path,"clone-url":m.Flags.string({char:"u",default:h,description:"The Git URL to clone from. Defaults to Shopify's Skeleton theme.",env:"SHOPIFY_FLAG_CLONE_URL"}),latest:m.Flags.boolean({char:"l",description:"Downloads the latest release of the `clone-url`",env:"SHOPIFY_FLAG_LATEST"})};i.multiEnvironmentsFlags=null;var se=i;export{se as a};
@@ -0,0 +1 @@
1
+ import{a as c,b as f,c as g,d as x,g as C}from"./chunk-6TEXPRI2.js";import{a as d}from"./chunk-T5MK7ZSF.js";import{a as l}from"./chunk-DCK2FX6J.js";import{Fa as m}from"./chunk-WCWNI3ZV.js";import{b as p}from"./chunk-4KRT35A2.js";import{v as s}from"./chunk-MGL4YM3S.js";import{r as I}from"./chunk-3YWUSKWF.js";import{e as y,g as a}from"./chunk-VPRTJUIN.js";a();var h=y(I(),1);var i=class u extends d{async run(){let{flags:o}=await this.parse(u),e=await m({directory:o.path,clientId:o["client-id"],forceRelink:o.reset,userProvidedConfigName:o.config}),t=await C({developerPlatformClient:e.developerPlatformClient,apiKey:e.remoteApp.apiKey,organizationId:e.remoteApp.organizationId,extensionTypes:g}),n=c(t);if(n.length===0)s({headline:["No extensions to migrate."]});else{let r=await f(n);await x({...e,extensions:t,extensionTypes:r.extensionTypes,buildExtensionConfig:r.buildExtensionConfig})}return{app:e.app}}};i.description="Import dashboard-managed extensions into your app.";i.flags={...p,...l,"client-id":h.Flags.string({hidden:!1,description:"The Client ID of your app.",env:"SHOPIFY_FLAG_CLIENT_ID",exclusive:["config"]})};var k=i;export{k as a};
@@ -0,0 +1,3 @@
1
+ import{c as E,d as g}from"./chunk-IWE4RUI7.js";import{b as A}from"./chunk-N5ROZKPZ.js";import{R as D}from"./chunk-4V4DQ6W7.js";import{C,u as k,v as w,x as c}from"./chunk-MGL4YM3S.js";import{g as S}from"./chunk-BHWEA4V2.js";import{Fb as a,Hb as n,Rb as b,ca as N,ha as v}from"./chunk-VPL2NDH6.js";import{u as f}from"./chunk-7JESXDF2.js";import{g as d}from"./chunk-VPRTJUIN.js";d();d();function I(e){switch(e.status){case"RUNNING":return n`Bulk operation in progress${e.objectCount>0?a.gray(` (${String(e.objectCount)} objects ${e.type==="MUTATION"?"written":"read"})`):""}`;case"CREATED":return n`Starting`;case"COMPLETED":return n`Bulk operation succeeded: ${a.gray(`${String(e.objectCount)} objects`)}`;case"FAILED":return n`Bulk operation failed. ${a.errorText(`Error: ${e.errorCode??"unknown"}`)}`;case"CANCELING":return n`Bulk operation canceling...`;case"CANCELED":return n`Bulk operation canceled.`;case"EXPIRED":return n`Bulk operation expired.`;default:return n`Bulk operation status: ${e.status}`}}function P(e,i){let t=e.map(o=>n`${o.field?.join(".")??"unknown"}: ${o.message}`.value).join(`
2
+ `);c({headline:i,body:t})}function U(e){let i=I(e).value;switch(e.status){case"CANCELING":return{headline:"Bulk operation is being cancelled.",body:[`This may take a few moments. Check the status with:
3
+ `,{command:`shopify app bulk status --id=${h(e.id)}`}],renderType:"success"};case"CANCELED":case"COMPLETED":case"FAILED":{let t=[n`ID: ${a.cyan(e.id)}`.value,n`Status: ${a.yellow(e.status)}`.value,n`Created at: ${a.gray(String(e.createdAt))}`.value,...e.completedAt?[n`Completed at: ${a.gray(String(e.completedAt))}`.value]:[]];return{headline:n`Bulk operation is already ${e.status.toLowerCase()}.`.value,body:n`This operation has already finished and can't be canceled.`.value,customSections:[{body:[{list:{items:t}}]}],renderType:"warning"}}case"CREATED":case"EXPIRED":case"RUNNING":return{headline:i,renderType:"info"}}}d();var O="2026-01";d();var T={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetBulkOperationById"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperation"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"completedAt"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"errorCode"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"objectCount"}},{kind:"Field",name:{kind:"Name",value:"partialDataUrl"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};d();var B={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"ListBulkOperations"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"query"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"first"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"sortKey"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BulkOperationsSortKeys"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperations"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"Variable",name:{kind:"Name",value:"first"}}},{kind:"Argument",name:{kind:"Name",value:"query"},value:{kind:"Variable",name:{kind:"Name",value:"query"}}},{kind:"Argument",name:{kind:"Name",value:"sortKey"},value:{kind:"Variable",name:{kind:"Name",value:"sortKey"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"errorCode"}},{kind:"Field",name:{kind:"Name",value:"objectCount"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"completedAt"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"partialDataUrl"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};function le(e){return e.startsWith("gid://")?e:/^\d+$/.test(e)?`gid://shopify/BulkOperation/${e}`:e}function h(e){return e.match(/^gid:\/\/shopify\/BulkOperation\/(\d+)$/)?.[1]??e}async function se(e){let{organization:i,storeFqdn:t,operationId:o,remoteApp:l}=e;k({headline:"Checking bulk operation status.",body:[{list:{items:g({organization:i,remoteApp:l,storeFqdn:t})}}]});let s=l.apiSecretKeys[0]?.secret;if(!s)throw new S("No API secret keys found for app");let u=await D(t,l.apiKey,s),m=await A({query:T,session:u,variables:{id:o},version:await E({adminSession:u,minimumDefaultVersion:O})});m.bulkOperation?F(m.bulkOperation):c({headline:"Bulk operation not found.",body:n`ID: ${a.yellow(o)}`.value})}async function ue(e){let{organization:i,storeFqdn:t,remoteApp:o}=e;k({headline:"Listing bulk operations.",body:[{list:{items:g({organization:i,remoteApp:o,storeFqdn:t})}}]});let l=o.apiSecretKeys[0]?.secret;if(!l)throw new S("No API secret keys found for app");let s=await D(t,o.apiKey,l),u=new Date(Date.now()-10080*60*1e3).toISOString().split("T")[0],p=(await A({query:B,session:s,variables:{query:`created_at:>=${u}`,first:100,sortKey:"CREATED_AT"},version:await E({adminSession:s,minimumDefaultVersion:O})})).bulkOperations.nodes.map(r=>({id:h(r.id),status:L(r.status),count:V(r.objectCount),dateCreated:N(new Date(String(r.createdAt))),dateFinished:r.completedAt?N(new Date(String(r.completedAt))):"",results:x(r.url??r.partialDataUrl)}));b(),p.length===0?k({body:"No bulk operations found in the last 7 days."}):C({rows:p,columns:{id:{header:"ID",color:"yellow"},status:{header:"STATUS"},count:{header:"COUNT"},dateCreated:{header:"DATE CREATED",color:"cyan"},dateFinished:{header:"DATE FINISHED",color:"cyan"},results:{header:"RESULTS"}}}),b()}function F(e){let{id:i,status:t,createdAt:o,completedAt:l,url:s,partialDataUrl:u}=e,m=I(e).value,p=$(o,l),r=n`ID: ${a.yellow(i)}\n${p}`.value;if(t==="COMPLETED"){let y=s?a.link("Download results",s):"";w({headline:m,body:n`${r}\n${y}`.value})}else if(t==="FAILED"){let y=u?a.link("Download partial results",u):"";c({headline:m,body:n`${r}\n${y}`.value})}else k({headline:m,body:r})}function $(e,i){let t=new Date;return i?`Finished ${v(new Date(String(i)),t)}`:`Started ${v(new Date(String(e)),t)}`}function L(e){return e==="COMPLETED"?f.green(e):e==="FAILED"?f.red(e):f.dim(e)}function V(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e)}function x(e){return e?n`${a.link("download",e)}`.value:""}export{O as a,T as b,le as c,h as d,se as e,ue as f,I as g,P as h,U as i};