@shopify/cli 4.1.0 → 4.3.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 (459) hide show
  1. package/dist/{acorn-LOOAJL3S.js → acorn-7M27BPGP.js} +1 -1
  2. package/dist/analytics-JH64XI2J.js +1 -0
  3. package/dist/analytics-MEGKKFGF.js +1 -0
  4. package/dist/angular-DW5TQVCM.js +4 -0
  5. package/dist/{babel-URCL33XX.js → babel-I2RLWM7N.js} +1 -1
  6. package/dist/bootstrap.js +1 -1
  7. package/dist/{chokidar-G4ONJSK4.js → chokidar-VDIVGBZH.js} +1 -1
  8. package/dist/chunk-25HJX3L2.js +5 -0
  9. package/dist/chunk-2EHBJWC6.js +26 -0
  10. package/dist/chunk-2GAFKG64.js +4 -0
  11. package/dist/chunk-2GU7OY3H.js +1 -0
  12. package/dist/{chunk-4IC626OL.js → chunk-2K7FGAT6.js} +1 -1
  13. package/dist/{chunk-PRVQAHWI.js → chunk-2O22LZKV.js} +1 -1
  14. package/dist/{chunk-NMBBTTIH.js → chunk-2RBIR3NM.js} +1 -1
  15. package/dist/chunk-2TMQG2UT.js +1 -0
  16. package/dist/chunk-2XZBQZ5R.js +7 -0
  17. package/dist/{chunk-Q4T2T2QE.js → chunk-33OHQUHZ.js} +1 -1
  18. package/dist/chunk-3AOQKI4B.js +1 -0
  19. package/dist/{chunk-OBEWZXOQ.js → chunk-3SPDFV5D.js} +1 -1
  20. package/dist/chunk-3YDYZ232.js +103 -0
  21. package/dist/chunk-4FFPTEKD.js +1 -0
  22. package/dist/chunk-4J32OHLY.js +1382 -0
  23. package/dist/chunk-4QTEPWEJ.js +283 -0
  24. package/dist/chunk-57PPQKJT.js +15 -0
  25. package/dist/{chunk-AGNMOFJS.js → chunk-5BKCIDMS.js} +1 -1
  26. package/dist/{chunk-JUVAGMIH.js → chunk-5C7HDTHJ.js} +1 -1
  27. package/dist/chunk-5FFHQTRC.js +4 -0
  28. package/dist/{chunk-2GK56X53.js → chunk-5FVB7JHP.js} +1 -1
  29. package/dist/{chunk-UYXEA3Y6.js → chunk-5H3VTG77.js} +1 -1
  30. package/dist/chunk-5O43334U.js +2 -0
  31. package/dist/chunk-5XDQ76DQ.js +1 -0
  32. package/dist/{chunk-PD5ZHJWI.js → chunk-636CTEW7.js} +1 -1
  33. package/dist/chunk-6JKGUQRD.js +1 -0
  34. package/dist/chunk-6KETAPWL.js +1 -0
  35. package/dist/{chunk-ULFWK45W.js → chunk-6LWOWDF4.js} +2 -2
  36. package/dist/chunk-7572RLUP.js +1 -0
  37. package/dist/chunk-762JWOWJ.js +5 -0
  38. package/dist/{chunk-IU2ZQ6TE.js → chunk-773TIA5M.js} +1 -1
  39. package/dist/{chunk-76R52ODR.js → chunk-7D45IAMQ.js} +1 -1
  40. package/dist/chunk-7FQFEB33.js +370 -0
  41. package/dist/chunk-7LV55VWE.js +1 -0
  42. package/dist/{chunk-QUTQDXSL.js → chunk-7UNQOKZW.js} +1 -1
  43. package/dist/chunk-A27NZMWB.js +1 -0
  44. package/dist/chunk-A4SBXDZB.js +14 -0
  45. package/dist/{chunk-4DCQNGUV.js → chunk-A5HKAMAC.js} +10 -10
  46. package/dist/{chunk-Z35BTAM6.js → chunk-AAK376RT.js} +1 -1
  47. package/dist/chunk-AERKD4TO.js +3 -0
  48. package/dist/{chunk-L2MGAEV3.js → chunk-ANBOLDON.js} +2 -2
  49. package/dist/{chunk-UJVH7FZS.js → chunk-AO3RFGNV.js} +1 -1
  50. package/dist/{chunk-KHSYW7I4.js → chunk-ATSMK66C.js} +1 -1
  51. package/dist/chunk-AU5EZQW7.js +5 -0
  52. package/dist/chunk-AVD3INWF.js +1 -0
  53. package/dist/chunk-AWEB5AQM.js +1 -0
  54. package/dist/chunk-AXNAGI32.js +1 -0
  55. package/dist/chunk-BL46CZ2M.js +2 -0
  56. package/dist/chunk-BQWK3C47.js +278 -0
  57. package/dist/chunk-CEHXOWA6.js +3 -0
  58. package/dist/{chunk-EKXY5COY.js → chunk-CFOXXOO2.js} +1 -1
  59. package/dist/{chunk-PIBY5DDZ.js → chunk-CRALWNNO.js} +1 -1
  60. package/dist/chunk-CV5EQGES.js +22 -0
  61. package/dist/chunk-CX5CC6P5.js +1 -0
  62. package/dist/chunk-DCLUZFT7.js +2 -0
  63. package/dist/{chunk-Q33IBIVJ.js → chunk-DNXYKGV2.js} +1 -1
  64. package/dist/chunk-DTIWUT2T.js +18 -0
  65. package/dist/{chunk-VICYNG2W.js → chunk-DYNH5SKT.js} +1 -1
  66. package/dist/chunk-DZQYG32N.js +2 -0
  67. package/dist/{chunk-FQWB2F75.js → chunk-E7DHELFH.js} +1 -1
  68. package/dist/chunk-EH7ZTFS4.js +613 -0
  69. package/dist/{chunk-P6XE4MH5.js → chunk-EJDWYASP.js} +1 -1
  70. package/dist/chunk-EKVTNWHM.js +1 -0
  71. package/dist/{chunk-6M3ZYNGO.js → chunk-ET2CGROE.js} +1 -1
  72. package/dist/chunk-EVZA2TCI.js +3 -0
  73. package/dist/{chunk-QSTEVZFQ.js → chunk-F3TMLDLC.js} +1 -1
  74. package/dist/chunk-FIYAECXH.js +28 -0
  75. package/dist/{chunk-WDC3KIZT.js → chunk-FKIVKNOV.js} +1 -1
  76. package/dist/chunk-FOFJBRSL.js +11 -0
  77. package/dist/chunk-FQ5ZZX2G.js +25 -0
  78. package/dist/chunk-G2LVUM7N.js +6 -0
  79. package/dist/chunk-G2OHWAY2.js +7 -0
  80. package/dist/chunk-G3JJLXPH.js +1 -0
  81. package/dist/chunk-G3RWLAOG.js +1 -0
  82. package/dist/chunk-G4OQABDT.js +836 -0
  83. package/dist/{chunk-KLMDWDT2.js → chunk-GB3YC4TI.js} +1 -1
  84. package/dist/{chunk-OCOY5MV2.js → chunk-GCN4O7HM.js} +1 -1
  85. package/dist/chunk-GDHD3TGC.js +6 -0
  86. package/dist/{chunk-JXW374CL.js → chunk-GJXINXSU.js} +11 -11
  87. package/dist/chunk-GWHV62YT.js +1 -0
  88. package/dist/chunk-HCTZN7L4.js +2 -0
  89. package/dist/{chunk-ZSBA6VIC.js → chunk-HDC5V7RY.js} +1 -1
  90. package/dist/{chunk-7NH7CHVI.js → chunk-HIQHYPLU.js} +1 -1
  91. package/dist/{chunk-XOTA6JTZ.js → chunk-HOSFU6UP.js} +3 -3
  92. package/dist/chunk-I22ZTRKK.js +3 -0
  93. package/dist/chunk-I4R7TML2.js +7 -0
  94. package/dist/{chunk-EENHXSWU.js → chunk-I5A6BPCP.js} +1 -1
  95. package/dist/chunk-IWOTLFOY.js +32 -0
  96. package/dist/{chunk-7UYZQN4V.js → chunk-J3H4LPN6.js} +3 -3
  97. package/dist/{chunk-XULPJ6UG.js → chunk-J3HX6ZGD.js} +1 -1
  98. package/dist/chunk-J3JPJCWP.js +1 -0
  99. package/dist/chunk-J5BRKYGE.js +294 -0
  100. package/dist/chunk-JAWKLBOB.js +3 -0
  101. package/dist/{chunk-MCVRONUY.js → chunk-JAWOP4HJ.js} +1 -1
  102. package/dist/{chunk-ZGK3LGCH.js → chunk-JCIN73BE.js} +1 -1
  103. package/dist/chunk-JEZ3PGVC.js +1 -0
  104. package/dist/{chunk-C7BTJ32Z.js → chunk-JJ6RM54S.js} +1 -1
  105. package/dist/chunk-JK3NIHTX.js +17 -0
  106. package/dist/chunk-JLE4NBMT.js +1 -0
  107. package/dist/chunk-JSOGPMWB.js +5 -0
  108. package/dist/chunk-JUYJZUYU.js +1 -0
  109. package/dist/chunk-KRQGLK2Q.js +3 -0
  110. package/dist/{chunk-3VZEETAV.js → chunk-KRZABRYT.js} +1 -1
  111. package/dist/{chunk-BS3BKORT.js → chunk-L2PC4MUV.js} +1 -1
  112. package/dist/chunk-LCZDC6EE.js +5 -0
  113. package/dist/chunk-LXVORHCQ.js +1 -0
  114. package/dist/chunk-M2YINBHF.js +32 -0
  115. package/dist/chunk-M7YFD4EV.js +10 -0
  116. package/dist/chunk-MEIEEENL.js +1 -0
  117. package/dist/chunk-MIDYZPO4.js +1 -0
  118. package/dist/chunk-MINZGZ4N.js +1 -0
  119. package/dist/chunk-MMIHHCMW.js +5 -0
  120. package/dist/{chunk-PRKBO42R.js → chunk-MPW2YJWU.js} +1 -1
  121. package/dist/chunk-MRS6LAY7.js +1 -0
  122. package/dist/chunk-N3CNWCC2.js +19 -0
  123. package/dist/{chunk-M2D7USAX.js → chunk-N3NE4MVN.js} +1 -1
  124. package/dist/chunk-N3YTDGFY.js +4 -0
  125. package/dist/{chunk-MHWV5RQV.js → chunk-N5LVGFDS.js} +2 -2
  126. package/dist/{chunk-QBSKKQBN.js → chunk-NILXAUUT.js} +1 -1
  127. package/dist/{chunk-5Y7GIF2W.js → chunk-NJOO5XJV.js} +1 -1
  128. package/dist/{chunk-ULQG3XQS.js → chunk-NNOSZ447.js} +1 -1
  129. package/dist/{chunk-6G6TMKXF.js → chunk-NTRAWIEJ.js} +21 -21
  130. package/dist/chunk-NWXDOCL5.js +1 -0
  131. package/dist/{chunk-2AJ5FI2K.js → chunk-OU3M32A2.js} +1 -1
  132. package/dist/chunk-OU4SKQTC.js +5 -0
  133. package/dist/chunk-OXJBYKMX.js +1 -0
  134. package/dist/chunk-OZBY45KT.js +1 -0
  135. package/dist/{chunk-75VPUOC5.js → chunk-P2OI2P2M.js} +1 -1
  136. package/dist/chunk-PCCK4YTE.js +1 -0
  137. package/dist/{chunk-6RE2SNCU.js → chunk-PFGYC53K.js} +1 -1
  138. package/dist/chunk-PMS4MNHB.js +6 -0
  139. package/dist/chunk-PNP5OKNZ.js +1 -0
  140. package/dist/{chunk-KN3WTTHZ.js → chunk-PXHY753L.js} +1 -1
  141. package/dist/chunk-Q73GEVSJ.js +11 -0
  142. package/dist/{chunk-5WVAHE5E.js → chunk-Q77MM2N2.js} +1 -1
  143. package/dist/chunk-Q7C44DX5.js +4 -0
  144. package/dist/chunk-QDVJJKLB.js +1 -0
  145. package/dist/{chunk-5CH3B62S.js → chunk-RJ5VF3QY.js} +1 -1
  146. package/dist/{chunk-E3EMHAJB.js → chunk-RKDZGK5K.js} +1 -1
  147. package/dist/{chunk-TYZXGSHO.js → chunk-RSRYC5ZF.js} +1 -1
  148. package/dist/chunk-S22NCNAJ.js +1 -0
  149. package/dist/chunk-S5IFJ737.js +3 -0
  150. package/dist/chunk-S6B2ADVR.js +8 -0
  151. package/dist/chunk-S7F5KFQP.js +1 -0
  152. package/dist/chunk-SSCYLDSX.js +3 -0
  153. package/dist/{chunk-QFWIDATO.js → chunk-STJ3LWFL.js} +1 -1
  154. package/dist/chunk-T3ERXB7F.js +8 -0
  155. package/dist/chunk-T4IV643Z.js +9 -0
  156. package/dist/chunk-T4NS63K4.js +16 -0
  157. package/dist/chunk-T6CC5WUU.js +159 -0
  158. package/dist/{chunk-3TNEIDOD.js → chunk-T7KHS6RF.js} +1 -1
  159. package/dist/{chunk-QYR5VPQA.js → chunk-TOLPNBZK.js} +1 -1
  160. package/dist/{chunk-DRFGABEB.js → chunk-TP7E54WN.js} +1 -1
  161. package/dist/chunk-TPCG6DCA.js +1 -0
  162. package/dist/{chunk-SXTMSGUE.js → chunk-TRYWVIVJ.js} +1 -1
  163. package/dist/chunk-TU47HMTL.js +1 -0
  164. package/dist/chunk-TUNUEOHO.js +3 -0
  165. package/dist/{chunk-MWY3A7O3.js → chunk-TY6BZTG3.js} +1 -1
  166. package/dist/chunk-TYMYIUIQ.js +1 -0
  167. package/dist/chunk-UB26DGTR.js +6 -0
  168. package/dist/chunk-UC7KMA6W.js +8 -0
  169. package/dist/chunk-UOHNRH6E.js +7 -0
  170. package/dist/{chunk-ZR76GGZ6.js → chunk-UQWFDL3F.js} +1 -1
  171. package/dist/chunk-USLYL5AC.js +1 -0
  172. package/dist/chunk-UTO4Z6P6.js +567 -0
  173. package/dist/{chunk-M2ZHFKPN.js → chunk-UU5P2IYU.js} +1 -1
  174. package/dist/chunk-UYSF234H.js +1 -0
  175. package/dist/chunk-VE35YELD.js +1 -0
  176. package/dist/{chunk-WSDN25F5.js → chunk-VI34CKV6.js} +1 -1
  177. package/dist/chunk-VJ6KDRZI.js +1 -0
  178. package/dist/{chunk-VBUZWRUL.js → chunk-VJEKDBGZ.js} +1 -1
  179. package/dist/chunk-VKWPEFWQ.js +1 -0
  180. package/dist/chunk-VPPWSKOY.js +1 -0
  181. package/dist/chunk-VRJTLVG3.js +1 -0
  182. package/dist/chunk-VUMUCNI7.js +1 -0
  183. package/dist/chunk-W7DDV2EY.js +1 -0
  184. package/dist/chunk-WA3YC5W4.js +15 -0
  185. package/dist/chunk-WHNWE7P2.js +1 -0
  186. package/dist/chunk-WVRGCNBZ.js +1 -0
  187. package/dist/{chunk-MOA33ZFO.js → chunk-WW7TENNA.js} +1 -1
  188. package/dist/{chunk-HZA6IAA4.js → chunk-XVUHUA36.js} +1 -1
  189. package/dist/{chunk-OLZHWPZP.js → chunk-XWPPBOGF.js} +1 -1
  190. package/dist/chunk-YIRFEW5M.js +1 -0
  191. package/dist/{chunk-KR6QDE7D.js → chunk-YL3TYQGT.js} +1 -1
  192. package/dist/{chunk-7MUKLZOL.js → chunk-YLQ3LNNY.js} +3 -3
  193. package/dist/chunk-YMAWEIUR.js +1 -0
  194. package/dist/chunk-YPBCSDFQ.js +1 -0
  195. package/dist/{chunk-KZOBF55B.js → chunk-YSIBRY6C.js} +1 -1
  196. package/dist/{chunk-KHTV6PBV.js → chunk-YVQXEPHY.js} +1 -1
  197. package/dist/{chunk-4LNCYIS3.js → chunk-ZDF5N422.js} +1 -1
  198. package/dist/{chunk-T4M5CWAO.js → chunk-ZG7BVVT2.js} +1 -1
  199. package/dist/chunk-ZGJ3DFTQ.js +9 -0
  200. package/dist/{chunk-NKQBEFPS.js → chunk-ZI7LK3LW.js} +1 -1
  201. package/dist/chunk-ZM75DSIW.js +1 -0
  202. package/dist/{chunk-URZPVSJZ.js → chunk-ZUKLGZOU.js} +66 -66
  203. package/dist/cli/commands/app/app-logs/sources.js +1 -2
  204. package/dist/cli/commands/app/build.js +1 -1
  205. package/dist/cli/commands/app/bulk/cancel.js +1 -1
  206. package/dist/cli/commands/app/bulk/execute.js +1 -9
  207. package/dist/cli/commands/app/bulk/status.js +1 -5
  208. package/dist/cli/commands/app/config/link.js +1 -4
  209. package/dist/cli/commands/app/config/pull.js +1 -1
  210. package/dist/cli/commands/app/config/use.js +1 -1
  211. package/dist/cli/commands/app/config/validate.js +1 -3
  212. package/dist/cli/commands/app/demo/watcher.js +1 -1
  213. package/dist/cli/commands/app/deploy.js +1 -22
  214. package/dist/cli/commands/app/dev/clean.js +1 -5
  215. package/dist/cli/commands/app/dev.js +1 -320
  216. package/dist/cli/commands/app/env/pull.js +1 -11
  217. package/dist/cli/commands/app/env/show.js +1 -1
  218. package/dist/cli/commands/app/execute.js +1 -1
  219. package/dist/cli/commands/app/function/build.js +1 -1
  220. package/dist/cli/commands/app/function/info.js +1 -16
  221. package/dist/cli/commands/app/function/replay.js +1 -5
  222. package/dist/cli/commands/app/function/run.js +1 -1
  223. package/dist/cli/commands/app/function/schema.js +1 -1
  224. package/dist/cli/commands/app/function/typegen.js +1 -1
  225. package/dist/cli/commands/app/generate/extension.js +1 -5
  226. package/dist/cli/commands/app/import-custom-data-definitions.js +1 -4
  227. package/dist/cli/commands/app/import-extensions.js +1 -1
  228. package/dist/cli/commands/app/info.js +1 -11
  229. package/dist/cli/commands/app/init.js +1 -10
  230. package/dist/cli/commands/app/logs.js +1 -2
  231. package/dist/cli/commands/app/release.js +1 -4
  232. package/dist/cli/commands/app/versions/list.js +1 -1
  233. package/dist/cli/commands/app/webhook/trigger.js +1 -25
  234. package/dist/cli/commands/auth/login.js +1 -1
  235. package/dist/cli/commands/auth/logout.js +1 -1
  236. package/dist/cli/commands/cache/clear.js +1 -1
  237. package/dist/cli/commands/config/autoupgrade/constants.js +1 -1
  238. package/dist/cli/commands/config/autoupgrade/off.js +1 -1
  239. package/dist/cli/commands/config/autoupgrade/on.js +1 -1
  240. package/dist/cli/commands/config/autoupgrade/status.js +1 -1
  241. package/dist/cli/commands/debug/command-flags.js +1 -1
  242. package/dist/cli/commands/doc/fetch.d.ts +12 -0
  243. package/dist/cli/commands/doc/fetch.js +1 -0
  244. package/dist/cli/commands/doc/search.d.ts +13 -0
  245. package/dist/cli/commands/doc/search.js +1 -0
  246. package/dist/cli/commands/docs/generate.js +1 -1
  247. package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
  248. package/dist/cli/commands/doctor-release/theme/index.js +1 -1
  249. package/dist/cli/commands/help.js +1 -1
  250. package/dist/cli/commands/kitchen-sink/async.js +1 -1
  251. package/dist/cli/commands/kitchen-sink/index.js +1 -1
  252. package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
  253. package/dist/cli/commands/kitchen-sink/static.js +1 -1
  254. package/dist/cli/commands/notifications/generate.js +1 -1
  255. package/dist/cli/commands/notifications/list.js +1 -1
  256. package/dist/cli/commands/organization/list.js +1 -1
  257. package/dist/cli/commands/search.d.ts +4 -0
  258. package/dist/cli/commands/search.js +1 -1
  259. package/dist/cli/commands/theme/check.js +1 -1
  260. package/dist/cli/commands/theme/console.js +1 -15
  261. package/dist/cli/commands/theme/delete.js +1 -7
  262. package/dist/cli/commands/theme/dev.js +1 -26
  263. package/dist/cli/commands/theme/duplicate.js +1 -32
  264. package/dist/cli/commands/theme/info.js +1 -1
  265. package/dist/cli/commands/theme/init.js +1 -8
  266. package/dist/cli/commands/theme/language-server.js +1 -1
  267. package/dist/cli/commands/theme/list.js +1 -1
  268. package/dist/cli/commands/theme/metafields/pull.js +1 -3
  269. package/dist/cli/commands/theme/open.js +1 -8
  270. package/dist/cli/commands/theme/package.js +1 -7
  271. package/dist/cli/commands/theme/preview.js +1 -1
  272. package/dist/cli/commands/theme/profile.js +1 -3
  273. package/dist/cli/commands/theme/publish.js +1 -7
  274. package/dist/cli/commands/theme/pull.js +1 -3
  275. package/dist/cli/commands/theme/push.js +1 -28
  276. package/dist/cli/commands/theme/rename.js +1 -6
  277. package/dist/cli/commands/theme/share.js +1 -3
  278. package/dist/cli/commands/upgrade.js +1 -1
  279. package/dist/cli/commands/version.js +1 -1
  280. package/dist/cli/services/commands/doc/fetch.d.ts +1 -0
  281. package/dist/cli/services/commands/doc/fetch.js +45 -0
  282. package/dist/cli/services/commands/doc/search.d.ts +1 -0
  283. package/dist/cli/services/commands/doc/search.js +47 -0
  284. package/dist/command-registry.js +1 -1
  285. package/dist/conf-store-UY3MDGGA.js +1 -0
  286. package/dist/configs/all.yml +3 -0
  287. package/dist/configs/recommended.yml +3 -0
  288. package/dist/{custom-oclif-loader-DVFFWCBV.js → custom-oclif-loader-3AICQCNU.js} +1 -1
  289. package/dist/data/filters.json +60 -0
  290. package/dist/data/latest.json +1 -1
  291. package/dist/data/setting.json +29 -9
  292. package/dist/data/shopify_system_translations.json +71 -19
  293. package/dist/data/tags.json +3 -3
  294. package/dist/deprecations-KNUMDRIU.js +1 -0
  295. package/dist/{devtools-OLOT2NY4.js → devtools-37DE4MUR.js} +1 -1
  296. package/dist/{devtools-UFRKBFGI.js → devtools-WAWU5KQL.js} +1 -1
  297. package/dist/dist-C5IV2YDQ.js +1 -0
  298. package/dist/dist-VL4KZWV2.js +1 -0
  299. package/dist/environments-YPRVO2CF.js +1 -0
  300. package/dist/error-XRBQTNFM.js +1 -0
  301. package/dist/error-handler-NI7D6GSY.js +1 -0
  302. package/dist/{estree-KI7NUW53.js → estree-JV5M77BA.js} +2 -2
  303. package/dist/{flow-MLHT7MTJ.js → flow-N4JYPYMQ.js} +1 -1
  304. package/dist/fs-LJWVNO4H.js +1 -0
  305. package/dist/{glimmer-HAJ4HQCW.js → glimmer-JEV3BXHR.js} +1 -1
  306. package/dist/{graphql-F7IHGXDT.js → graphql-DTF6MHYF.js} +1 -1
  307. package/dist/hooks/app-init.js +1 -1
  308. package/dist/hooks/did-you-mean.js +1 -1
  309. package/dist/hooks/hydrogen-init.js +1 -1
  310. package/dist/hooks/plugin-plugins.js +1 -1
  311. package/dist/hooks/postrun.js +1 -1
  312. package/dist/hooks/prerun.js +1 -1
  313. package/dist/hooks/public-metadata.js +1 -1
  314. package/dist/hooks/sensitive-metadata.js +1 -1
  315. package/dist/hooks/tunnel-provider.js +1 -1
  316. package/dist/hooks/tunnel-start.js +1 -1
  317. package/dist/html-LVOJ3RQS.js +25 -0
  318. package/dist/{http-proxy-node16-Q5DZMBHC.js → http-proxy-node16-X2WAMUT5.js} +1 -1
  319. package/dist/index.js +23 -1175
  320. package/dist/is-global-W6ALVC5L.js +1 -0
  321. package/dist/is-wsl-UEMXYJPN.js +1 -0
  322. package/dist/{latest-version-EFWBOTWM.js → latest-version-32HXMWJ7.js} +1 -1
  323. package/dist/lib-AIKYSHWL.js +1 -0
  324. package/dist/lib-O5EZ4NVT.js +1 -0
  325. package/dist/lib-Q4PWEMFD.js +1 -0
  326. package/dist/lib-QJDPPAWN.js +1 -0
  327. package/dist/{local-MTKXSZ3I.js → local-GKEWZAIV.js} +1 -1
  328. package/dist/local-storage-ZOZMA22B.js +1 -0
  329. package/dist/{markdown-PLKL4IZK.js → markdown-J6CE6POI.js} +2 -2
  330. package/dist/{meriyah-AYZQ3BGY.js → meriyah-PNQQZQYI.js} +1 -1
  331. package/dist/metadata-UEUN64TK.js +1 -0
  332. package/dist/{morph-EMYAITFM.js → morph-CGOZEPPZ.js} +4 -4
  333. package/dist/{multipart-parser-Q4QJZK3V.js → multipart-parser-5NSSTW27.js} +1 -1
  334. package/dist/node-package-manager-4ASQQIIF.js +1 -0
  335. package/dist/notifications-system-HLXJCAMG.js +1 -0
  336. package/dist/{npa-ICFSA3NL.js → npa-A4YSCQ5Q.js} +1 -1
  337. package/dist/{open-VA7TLUIL.js → open-KLSGXBIW.js} +1 -1
  338. package/dist/out-CDCY25QC.js +1 -0
  339. package/dist/output-S6E37GJQ.js +1 -0
  340. package/dist/{path-CWUNINMX.js → path-MBXP7ZIC.js} +1 -1
  341. package/dist/{postcss-3FJQPJI2.js → postcss-Q36SHOML.js} +2 -2
  342. package/dist/{prettier-NVRHEAFO.js → prettier-EGVCP5CY.js} +1 -1
  343. package/dist/{source-map-3K6Y2OMO.js → source-map-E7FCCJL7.js} +1 -1
  344. package/dist/system-YQZNGSWB.js +1 -0
  345. package/dist/tsconfig.tsbuildinfo +1 -1
  346. package/dist/typescript-5R4Y7PXE.js +1 -0
  347. package/dist/{typescript-ODJ335NU.js → typescript-WYPDGPSV.js} +1 -1
  348. package/dist/ui-D2FFWRK7.js +1 -0
  349. package/dist/upgrade-TVTCFMXM.js +1 -0
  350. package/dist/version-J6MDN7BZ.js +1 -0
  351. package/dist/version-RIRW5EXQ.js +1 -0
  352. package/dist/workerd-QOTT6UCO.js +18 -0
  353. package/dist/{yaml-BIHS2GQW.js → yaml-6KWCJ64X.js} +1 -1
  354. package/oclif.manifest.json +442 -9
  355. package/package.json +18 -12
  356. package/dist/analytics-5TEIW43T.js +0 -1
  357. package/dist/analytics-GG7CYCGL.js +0 -1
  358. package/dist/angular-VRDO2DBE.js +0 -4
  359. package/dist/chunk-3D4JXJPS.js +0 -2
  360. package/dist/chunk-3NBK56IK.js +0 -1
  361. package/dist/chunk-4ZGSSQC6.js +0 -1
  362. package/dist/chunk-54CAKCYR.js +0 -144
  363. package/dist/chunk-5UHQVR2Z.js +0 -1
  364. package/dist/chunk-67MH4AXG.js +0 -1
  365. package/dist/chunk-6CYMJ76C.js +0 -9
  366. package/dist/chunk-6HBRBQAN.js +0 -6
  367. package/dist/chunk-6ITDI2SD.js +0 -1
  368. package/dist/chunk-6SF3ZETE.js +0 -1
  369. package/dist/chunk-6WL4GA2M.js +0 -15
  370. package/dist/chunk-7ESSIN27.js +0 -567
  371. package/dist/chunk-7QIOUDCX.js +0 -8
  372. package/dist/chunk-7ZT57XT7.js +0 -2
  373. package/dist/chunk-AKML26N3.js +0 -7
  374. package/dist/chunk-C2IK2HY3.js +0 -4
  375. package/dist/chunk-CBXSPL4W.js +0 -1
  376. package/dist/chunk-CEIQFLCN.js +0 -1
  377. package/dist/chunk-CERXUPGC.js +0 -14
  378. package/dist/chunk-DCPBRWVC.js +0 -1
  379. package/dist/chunk-DN2IE3VY.js +0 -1
  380. package/dist/chunk-EQU4MUQJ.js +0 -1
  381. package/dist/chunk-F2QU6WWX.js +0 -1
  382. package/dist/chunk-FFQ5EWII.js +0 -294
  383. package/dist/chunk-FKMC5OFF.js +0 -1
  384. package/dist/chunk-FUOIGXI4.js +0 -1
  385. package/dist/chunk-FYFNUDOC.js +0 -19
  386. package/dist/chunk-G4BPGWJC.js +0 -1
  387. package/dist/chunk-GVQIPEZT.js +0 -1
  388. package/dist/chunk-GZS44BUW.js +0 -102
  389. package/dist/chunk-HIBX234C.js +0 -6
  390. package/dist/chunk-HRUGYZZ4.js +0 -2
  391. package/dist/chunk-HUIJMGVJ.js +0 -586
  392. package/dist/chunk-IX5ICOBV.js +0 -7
  393. package/dist/chunk-IZ3C5J7G.js +0 -5
  394. package/dist/chunk-JAO53IH2.js +0 -1
  395. package/dist/chunk-JCL2RRU6.js +0 -1
  396. package/dist/chunk-JQJBBXMX.js +0 -17
  397. package/dist/chunk-K2WUCOQJ.js +0 -32
  398. package/dist/chunk-K6CTUBFC.js +0 -12
  399. package/dist/chunk-KKTW6ZCA.js +0 -5
  400. package/dist/chunk-LDGAHMS7.js +0 -159
  401. package/dist/chunk-M3RYUB22.js +0 -1
  402. package/dist/chunk-M56NDIMD.js +0 -1
  403. package/dist/chunk-MWGBTOO3.js +0 -1
  404. package/dist/chunk-N5PQPIBF.js +0 -374
  405. package/dist/chunk-NF2ABOOU.js +0 -1
  406. package/dist/chunk-NPEVESCV.js +0 -3
  407. package/dist/chunk-OTY24J2W.js +0 -1
  408. package/dist/chunk-OY3PNHPZ.js +0 -103
  409. package/dist/chunk-PAP22IQO.js +0 -264
  410. package/dist/chunk-PYVAWAUO.js +0 -5
  411. package/dist/chunk-QA23HIH4.js +0 -1
  412. package/dist/chunk-S6EJHWJL.js +0 -1
  413. package/dist/chunk-SIMFNECG.js +0 -1
  414. package/dist/chunk-T542UQBY.js +0 -1
  415. package/dist/chunk-TQ6HYDVC.js +0 -1
  416. package/dist/chunk-UHJYPEY2.js +0 -1
  417. package/dist/chunk-UJXUSRQK.js +0 -1
  418. package/dist/chunk-UWJ73J4B.js +0 -1
  419. package/dist/chunk-UXVZ2P63.js +0 -1411
  420. package/dist/chunk-VPRTJUIN.js +0 -1
  421. package/dist/chunk-WFXRSKRK.js +0 -1
  422. package/dist/chunk-XEFQQPL4.js +0 -1
  423. package/dist/chunk-XITQULK4.js +0 -3
  424. package/dist/chunk-XONFGLJQ.js +0 -847
  425. package/dist/chunk-XR6GMMEU.js +0 -1
  426. package/dist/chunk-XXVEHDVO.js +0 -1
  427. package/dist/chunk-Y7JGYGV7.js +0 -1
  428. package/dist/chunk-YOZNRLFC.js +0 -1
  429. package/dist/chunk-YTNDFQJT.js +0 -3
  430. package/dist/chunk-ZBRRJDGW.js +0 -1
  431. package/dist/chunk-ZTMSBSYD.js +0 -1
  432. package/dist/conf-store-BMZFATRQ.js +0 -1
  433. package/dist/deprecations-7LHRXPXU.js +0 -1
  434. package/dist/dist-LDXPBYSZ.js +0 -1
  435. package/dist/dist-V63ILV6L.js +0 -1
  436. package/dist/environments-5X7S2O5U.js +0 -1
  437. package/dist/error-ZRLNNGIQ.js +0 -1
  438. package/dist/error-handler-PRZFHPRG.js +0 -1
  439. package/dist/fs-H7V6IRSH.js +0 -1
  440. package/dist/html-VSSXOZOQ.js +0 -25
  441. package/dist/is-global-IOWPCT2U.js +0 -1
  442. package/dist/is-wsl-FVUIXDOK.js +0 -1
  443. package/dist/lib-5L7UKDEK.js +0 -1
  444. package/dist/lib-C3VO2BQW.js +0 -1
  445. package/dist/lib-QB6I6CTC.js +0 -1
  446. package/dist/lib-WU3FEA6I.js +0 -1
  447. package/dist/local-storage-CYEL4MXF.js +0 -1
  448. package/dist/metadata-NOVBMKLM.js +0 -1
  449. package/dist/node-package-manager-N5CVNHA3.js +0 -1
  450. package/dist/notifications-system-YX2GPLDW.js +0 -1
  451. package/dist/out-WLY6KV4B.js +0 -1
  452. package/dist/output-Q46DT46U.js +0 -1
  453. package/dist/system-E6Q3OBX3.js +0 -1
  454. package/dist/typescript-K5CWIA4V.js +0 -1
  455. package/dist/ui-WRS2IDPP.js +0 -1
  456. package/dist/upgrade-TKUN2M5P.js +0 -1
  457. package/dist/version-5W5RVAPA.js +0 -1
  458. package/dist/version-BQJ3FPXD.js +0 -1
  459. package/dist/workerd-GOK6GWEX.js +0 -18
@@ -1,4 +1,4 @@
1
- import{a as Nc,e as Mc,f as jc}from"./chunk-TYZXGSHO.js";import{a as Lc}from"./chunk-7QIOUDCX.js";import{c as Bc,i as Rc,o as ly}from"./chunk-7MUKLZOL.js";import{b as cy}from"./chunk-5Y7GIF2W.js";import{N as Ec,P as bc,Q as Dc,fa as Cc,ma as Oc,p as wc,z as un}from"./chunk-XONFGLJQ.js";import{B as kc,D as Tc,l as Ac,m as _c,p as Fc,x as ho}from"./chunk-L2MGAEV3.js";import{b as hn}from"./chunk-XOTA6JTZ.js";import{A as rt,D as Pc,F as Sr,d as uy,r as Be,u as mt,v as Cr,w as Xe,y as cn,z as tt}from"./chunk-6G6TMKXF.js";import{d as I,g as ln}from"./chunk-M56NDIMD.js";import{a as yc,c as vc,d as ao,e as Dr,f as ey,g as uo,h as ty,i as ry,j as xc,k as co,m as sy,n as lo,o as oy,q as ay}from"./chunk-LDGAHMS7.js";import{b as Z0,c as et}from"./chunk-ZR76GGZ6.js";import{b as Q0}from"./chunk-EENHXSWU.js";import{a as ny}from"./chunk-6M3ZYNGO.js";import{c as iy}from"./chunk-QYR5VPQA.js";import{$ as hc,$a as pc,Ca as oo,Ea as an,Gb as gt,Hb as Ic,Ib as Ar,Nb as it,Qb as me,Ta as U,U as uc,Wa as dc,X as cc,Z as lc,ma as X,pa as br,qb as mc,sb as gc,tb as W,ua as V,wa as sn,ya as on,zb as Sc}from"./chunk-N5PQPIBF.js";import{a as K0,b as fc}from"./chunk-T4M5CWAO.js";import{d as M,f as J,g as kt,i as le,j as Tt,k as nn,n as ac}from"./chunk-IU2ZQ6TE.js";import{a as F,c as E,e as rn,g as y}from"./chunk-VPRTJUIN.js";var Ot=E(fo=>{"use strict";y();Object.defineProperty(fo,"__esModule",{value:!0});var dy=e=>{process.stdout.write(e)},py=e=>{process.stderr.write(e)};fo.default={stderr:py,stdout:dy}});var yt=E(Ce=>{"use strict";y();Object.defineProperty(Ce,"__esModule",{value:!0});Ce.existsSync=Ce.safeReadJson=Ce.readJsonSync=Ce.readJson=Ce.fileExists=Ce.dirExists=void 0;var Hc=F("node:fs"),po=F("node:fs/promises"),my=async e=>{let t;try{t=await(0,po.stat)(e)}catch{throw new Error(`No directory found at ${e}`)}if(!t.isDirectory())throw new Error(`${e} exists but is not a directory`);return e};Ce.dirExists=my;var gy=async e=>{let t;try{t=await(0,po.stat)(e)}catch{throw new Error(`No file found at ${e}`)}if(!t.isFile())throw new Error(`${e} exists but is not a file`);return e};Ce.fileExists=gy;async function zc(e){let t=await(0,po.readFile)(e,"utf8");return JSON.parse(t)}Ce.readJson=zc;function yy(e,t=!0){let r=(0,Hc.readFileSync)(e,"utf8");return t?JSON.parse(r):r}Ce.readJsonSync=yy;async function vy(e){try{return await zc(e)}catch{}}Ce.safeReadJson=vy;function xy(e){return(0,Hc.existsSync)(e)}Ce.existsSync=xy});var oe=E(q=>{"use strict";y();Object.defineProperty(q,"__esModule",{value:!0});q.mergeNestedObjects=q.mapValues=q.uniq=q.isNotFalsy=q.isTruthy=q.capitalize=q.sumBy=q.maxBy=q.isProd=q.castArray=q.sortBy=q.last=q.uniqBy=q.compact=q.pickBy=void 0;function wy(e,t){return Object.entries(e).reduce((r,[i,n])=>(t(n)&&(r[i]=n),r),{})}q.pickBy=wy;function Ey(e){return e.filter(t=>!!t)}q.compact=Ey;function by(e,t){return e.filter((r,i)=>{let n=t(r);return!e.some((o,s)=>s>i&&t(o)===n)})}q.uniqBy=by;function Dy(e){if(e)return e.at(-1)}q.last=Dy;function mo(e,t){if(e=e===void 0?0:e,t=t===void 0?0:t,Array.isArray(e)&&Array.isArray(t)){if(e.length===0&&t.length===0)return 0;let r=mo(e[0],t[0]);return r!==0?r:mo(e.slice(1),t.slice(1))}return e<t?-1:e>t?1:0}function Cy(e,t){return e.sort((r,i)=>mo(t(r),t(i)))}q.sortBy=Cy;function Sy(e){return e===void 0?[]:Array.isArray(e)?e:[e]}q.castArray=Sy;function Ay(){return!["development","test"].includes(process.env.NODE_ENV??"")}q.isProd=Ay;function _y(e,t){if(e.length!==0)return e.reduce((r,i)=>{let n=t(i),o=t(r);return n>o?i:r})}q.maxBy=_y;function Fy(e,t){return e.reduce((r,i)=>r+t(i),0)}q.sumBy=Fy;function ky(e){return e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():""}q.capitalize=ky;function Ty(e){return["1","true","y","yes"].includes(e.toLowerCase())}q.isTruthy=Ty;function Oy(e){return!["0","false","n","no"].includes(e.toLowerCase())}q.isNotFalsy=Oy;function Py(e){return[...new Set(e)].sort()}q.uniq=Py;function Iy(e,t){return Object.entries(e).reduce((r,[i,n])=>(r[i]=t(n,i),r),{})}q.mapValues=Iy;function Ny(e,t){return t.split(".").reduce((r,i)=>r?.[i],e)}function My(e,t){return Object.fromEntries(e.flatMap(r=>Object.entries(Ny(r,t)??{})).reverse())}q.mergeNestedObjects=My});var Wc=E(ge=>{"use strict";y();Object.defineProperty(ge,"__esModule",{value:!0});ge.string=ge.url=ge.file=ge.directory=ge.integer=ge.boolean=ge.custom=void 0;var jy=F("node:url"),Jc=yt(),By=oe();function Vt(e){return(t={})=>({parse:async(r,i,n)=>r,...e,...t,input:[],type:"option"})}ge.custom=Vt;ge.boolean=Vt({parse:async e=>!!e&&(0,By.isNotFalsy)(e)});ge.integer=Vt({async parse(e,t,r){if(!/^-?\d+$/.test(e))throw new Error(`Expected an integer but received: ${e}`);let i=Number.parseInt(e,10);if(r.min!==void 0&&i<r.min)throw new Error(`Expected an integer greater than or equal to ${r.min} but received: ${e}`);if(r.max!==void 0&&i>r.max)throw new Error(`Expected an integer less than or equal to ${r.max} but received: ${e}`);return i}});ge.directory=Vt({async parse(e,t,r){return r.exists?(0,Jc.dirExists)(e):e}});ge.file=Vt({async parse(e,t,r){return r.exists?(0,Jc.fileExists)(e):e}});ge.url=Vt({async parse(e){try{return new jy.URL(e)}catch{throw new Error(`Expected a valid url but received: ${e}`)}}});var Ry=Vt({});ge.string=Ry});var Gc=E((rT,Ly)=>{Ly.exports={name:"@oclif/core",description:"base library for oclif CLIs",version:"3.26.5",author:"Salesforce",bugs:"https://github.com/oclif/core/issues",dependencies:{"@types/cli-progress":"^3.11.5","ansi-escapes":"^4.3.2","ansi-styles":"^4.3.0",cardinal:"^2.1.1",chalk:"^4.1.2","clean-stack":"^3.0.1","cli-progress":"^3.12.0",color:"^4.2.3",debug:"^4.3.4",ejs:"^3.1.10","get-package-type":"^0.1.0",globby:"^11.1.0",hyperlinker:"^1.0.0","indent-string":"^4.0.0","is-wsl":"^2.2.0","js-yaml":"^3.14.1",minimatch:"^9.0.4","natural-orderby":"^2.0.3","object-treeify":"^1.1.33","password-prompt":"^1.1.3","slice-ansi":"^4.0.0","string-width":"^4.2.3","strip-ansi":"^6.0.1","supports-color":"^8.1.1","supports-hyperlinks":"^2.2.0","widest-line":"^3.1.0",wordwrap:"^1.0.0","wrap-ansi":"^7.0.0"},devDependencies:{"@commitlint/config-conventional":"^17.8.1","@oclif/plugin-help":"^6","@oclif/plugin-plugins":"^4","@oclif/prettier-config":"^0.2.1","@oclif/test":"^3.2.11","@types/ansi-styles":"^3.2.1","@types/benchmark":"^2.1.5","@types/chai":"^4.3.11","@types/chai-as-promised":"^7.1.8","@types/clean-stack":"^2.1.1","@types/color":"^3.0.6","@types/debug":"^4.1.10","@types/ejs":"^3.1.5","@types/indent-string":"^4.0.1","@types/js-yaml":"^3.12.7","@types/mocha":"^10.0.6","@types/node":"^18","@types/node-notifier":"^8.0.5","@types/pnpapi":"^0.0.5","@types/slice-ansi":"^4.0.0","@types/strip-ansi":"^5.2.1","@types/supports-color":"^8.1.1","@types/wordwrap":"^1.0.3","@types/wrap-ansi":"^3.0.0",benchmark:"^2.1.4",chai:"^4.4.1","chai-as-promised":"^7.1.1",commitlint:"^17.8.1","cross-env":"^7.0.3",eslint:"^8.57.0","eslint-config-oclif":"^5.1.3","eslint-config-oclif-typescript":"^3.1.6","eslint-config-prettier":"^9.1.0","fancy-test":"^3.0.14",globby:"^11.1.0",husky:"^8","lint-staged":"^14.0.1",madge:"^6.1.0",mocha:"^10.4.0",nyc:"^15.1.0",prettier:"^3.2.5",shx:"^0.3.4",sinon:"^16.1.3","ts-node":"^10.9.2",tsd:"^0.31.0",typescript:"^5"},engines:{node:">=18.0.0"},files:["/lib","/flush.js","/flush.d.ts","/handle.js"],homepage:"https://github.com/oclif/core",keywords:["oclif","cli","command","command line","parser","args","argv"],license:"MIT",main:"./lib/index.js",repository:"oclif/core",oclif:{bin:"oclif",devPlugins:["@oclif/plugin-help","@oclif/plugin-plugins"]},publishConfig:{access:"public"},scripts:{build:"shx rm -rf lib && tsc",commitlint:"commitlint",compile:"tsc",format:'prettier --write "+(src|test)/**/*.+(ts|js|json)"',lint:"eslint . --ext .ts",posttest:"yarn lint && yarn test:circular-deps",prepack:"yarn run build",prepare:"husky install",pretest:"yarn build && tsc -p test --noEmit --skipLibCheck","test:circular-deps":"madge lib/ -c","test:debug":'nyc mocha --debug-brk --inspect "test/**/*.test.ts"',"test:integration":'mocha --forbid-only "test/**/*.integration.ts" --parallel --timeout 1200000',"test:interoperability":"cross-env DEBUG=integration:* ts-node test/integration/interop.ts","test:perf":"ts-node test/perf/parser.perf.ts",test:'nyc mocha --forbid-only "test/**/*.test.ts"'},types:"lib/index.d.ts"}});var Ve=E(yo=>{"use strict";y();Object.defineProperty(yo,"__esModule",{value:!0});var $y=F("node:fs"),qy=F("node:path"),go=class e extends Map{static instance;constructor(){super(),this.set("@oclif/core",this.getOclifCoreMeta())}static getInstance(){return e.instance||(e.instance=new e),e.instance}get(t){return super.get(t)}getOclifCoreMeta(){try{return{name:"@oclif/core",version:Gc().version}}catch{try{return{name:"@oclif/core",version:JSON.parse((0,$y.readFileSync)((0,qy.join)(__dirname,"..","package.json"),"utf8"))}}catch{return{name:"@oclif/core",version:"unknown"}}}}};yo.default=go});var Pt=E(fn=>{"use strict";y();Object.defineProperty(fn,"__esModule",{value:!0});fn.settings=void 0;global.oclif||(global.oclif={});fn.settings=global.oclif});var Yt=E(_r=>{"use strict";y();Object.defineProperty(_r,"__esModule",{value:!0});_r.errtermwidth=_r.stdtermwidth=void 0;var Uy=Pt();function Xc(e){if(!e.isTTY)return 80;let t=e.getWindowSize()[0];return t<1?80:t<40?40:t}var Vc=Number.parseInt(process.env.OCLIF_COLUMNS,10)||Uy.settings.columns;_r.stdtermwidth=Vc||Xc(process.stdout);_r.errtermwidth=Vc||Xc(process.stderr)});var wo=E(dn=>{"use strict";y();Object.defineProperty(dn,"__esModule",{value:!0});dn.Logger=void 0;var Yc=F("node:fs/promises"),Hy=F("node:path"),zy=Dr(),Jy=()=>new Date().toISOString(),vo,Wy=e=>new Promise(t=>{vo&&vo.unref(),vo=setTimeout(()=>t(null),e)});function Gy(e){return e.endsWith(`
1
+ import{a as Nc,e as Mc,f as jc}from"./chunk-RSRYC5ZF.js";import{a as Lc}from"./chunk-S6B2ADVR.js";import{c as Bc,i as Rc,o as ly}from"./chunk-YLQ3LNNY.js";import{N as Ec,P as bc,Q as Dc,fa as Cc,ma as Oc,p as wc,z as un}from"./chunk-G4OQABDT.js";import{B as kc,D as Tc,l as Ac,m as _c,p as Fc,x as ho}from"./chunk-ANBOLDON.js";import{b as hn}from"./chunk-HOSFU6UP.js";import{A as rt,D as Pc,F as Sr,d as cy,r as Be,u as mt,v as Cr,w as Xe,y as cn,z as tt}from"./chunk-NTRAWIEJ.js";import{d as I,g as ln}from"./chunk-TPCG6DCA.js";import{a as yc,c as vc,d as ao,e as Dr,f as ty,g as uo,h as ry,i as iy,j as xc,k as co,m as oy,n as lo,o as ay,q as uy}from"./chunk-T6CC5WUU.js";import{b as ey,c as et}from"./chunk-UQWFDL3F.js";import{b as Z0}from"./chunk-I5A6BPCP.js";import{a as sy}from"./chunk-ET2CGROE.js";import{c as ny}from"./chunk-TOLPNBZK.js";import{$ as hc,$a as pc,Ca as oo,Ea as an,Fb as gt,Gb as Ic,Hb as Ar,Mb as it,Pb as me,Ta as U,U as uc,Wa as dc,X as cc,Z as lc,ma as X,pa as br,qb as mc,sb as gc,ua as V,wa as sn,ya as on,yb as Sc}from"./chunk-7FQFEB33.js";import{u as W}from"./chunk-A4SBXDZB.js";import{b as K0}from"./chunk-NJOO5XJV.js";import{a as Q0,b as fc}from"./chunk-ZG7BVVT2.js";import{d as M,f as J,g as kt,i as le,j as Tt,k as nn,n as ac}from"./chunk-773TIA5M.js";import{a as F,c as E,e as rn,g as y}from"./chunk-VKWPEFWQ.js";var Ot=E(fo=>{"use strict";y();Object.defineProperty(fo,"__esModule",{value:!0});var dy=e=>{process.stdout.write(e)},py=e=>{process.stderr.write(e)};fo.default={stderr:py,stdout:dy}});var yt=E(Ce=>{"use strict";y();Object.defineProperty(Ce,"__esModule",{value:!0});Ce.existsSync=Ce.safeReadJson=Ce.readJsonSync=Ce.readJson=Ce.fileExists=Ce.dirExists=void 0;var Hc=F("node:fs"),po=F("node:fs/promises"),my=async e=>{let t;try{t=await(0,po.stat)(e)}catch{throw new Error(`No directory found at ${e}`)}if(!t.isDirectory())throw new Error(`${e} exists but is not a directory`);return e};Ce.dirExists=my;var gy=async e=>{let t;try{t=await(0,po.stat)(e)}catch{throw new Error(`No file found at ${e}`)}if(!t.isFile())throw new Error(`${e} exists but is not a file`);return e};Ce.fileExists=gy;async function zc(e){let t=await(0,po.readFile)(e,"utf8");return JSON.parse(t)}Ce.readJson=zc;function yy(e,t=!0){let r=(0,Hc.readFileSync)(e,"utf8");return t?JSON.parse(r):r}Ce.readJsonSync=yy;async function vy(e){try{return await zc(e)}catch{}}Ce.safeReadJson=vy;function xy(e){return(0,Hc.existsSync)(e)}Ce.existsSync=xy});var oe=E(q=>{"use strict";y();Object.defineProperty(q,"__esModule",{value:!0});q.mergeNestedObjects=q.mapValues=q.uniq=q.isNotFalsy=q.isTruthy=q.capitalize=q.sumBy=q.maxBy=q.isProd=q.castArray=q.sortBy=q.last=q.uniqBy=q.compact=q.pickBy=void 0;function wy(e,t){return Object.entries(e).reduce((r,[i,n])=>(t(n)&&(r[i]=n),r),{})}q.pickBy=wy;function Ey(e){return e.filter(t=>!!t)}q.compact=Ey;function by(e,t){return e.filter((r,i)=>{let n=t(r);return!e.some((o,s)=>s>i&&t(o)===n)})}q.uniqBy=by;function Dy(e){if(e)return e.at(-1)}q.last=Dy;function mo(e,t){if(e=e===void 0?0:e,t=t===void 0?0:t,Array.isArray(e)&&Array.isArray(t)){if(e.length===0&&t.length===0)return 0;let r=mo(e[0],t[0]);return r!==0?r:mo(e.slice(1),t.slice(1))}return e<t?-1:e>t?1:0}function Cy(e,t){return e.sort((r,i)=>mo(t(r),t(i)))}q.sortBy=Cy;function Sy(e){return e===void 0?[]:Array.isArray(e)?e:[e]}q.castArray=Sy;function Ay(){return!["development","test"].includes(process.env.NODE_ENV??"")}q.isProd=Ay;function _y(e,t){if(e.length!==0)return e.reduce((r,i)=>{let n=t(i),o=t(r);return n>o?i:r})}q.maxBy=_y;function Fy(e,t){return e.reduce((r,i)=>r+t(i),0)}q.sumBy=Fy;function ky(e){return e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():""}q.capitalize=ky;function Ty(e){return["1","true","y","yes"].includes(e.toLowerCase())}q.isTruthy=Ty;function Oy(e){return!["0","false","n","no"].includes(e.toLowerCase())}q.isNotFalsy=Oy;function Py(e){return[...new Set(e)].sort()}q.uniq=Py;function Iy(e,t){return Object.entries(e).reduce((r,[i,n])=>(r[i]=t(n,i),r),{})}q.mapValues=Iy;function Ny(e,t){return t.split(".").reduce((r,i)=>r?.[i],e)}function My(e,t){return Object.fromEntries(e.flatMap(r=>Object.entries(Ny(r,t)??{})).reverse())}q.mergeNestedObjects=My});var Wc=E(ge=>{"use strict";y();Object.defineProperty(ge,"__esModule",{value:!0});ge.string=ge.url=ge.file=ge.directory=ge.integer=ge.boolean=ge.custom=void 0;var jy=F("node:url"),Jc=yt(),By=oe();function Vt(e){return(t={})=>({parse:async(r,i,n)=>r,...e,...t,input:[],type:"option"})}ge.custom=Vt;ge.boolean=Vt({parse:async e=>!!e&&(0,By.isNotFalsy)(e)});ge.integer=Vt({async parse(e,t,r){if(!/^-?\d+$/.test(e))throw new Error(`Expected an integer but received: ${e}`);let i=Number.parseInt(e,10);if(r.min!==void 0&&i<r.min)throw new Error(`Expected an integer greater than or equal to ${r.min} but received: ${e}`);if(r.max!==void 0&&i>r.max)throw new Error(`Expected an integer less than or equal to ${r.max} but received: ${e}`);return i}});ge.directory=Vt({async parse(e,t,r){return r.exists?(0,Jc.dirExists)(e):e}});ge.file=Vt({async parse(e,t,r){return r.exists?(0,Jc.fileExists)(e):e}});ge.url=Vt({async parse(e){try{return new jy.URL(e)}catch{throw new Error(`Expected a valid url but received: ${e}`)}}});var Ry=Vt({});ge.string=Ry});var Gc=E((rT,Ly)=>{Ly.exports={name:"@oclif/core",description:"base library for oclif CLIs",version:"3.26.5",author:"Salesforce",bugs:"https://github.com/oclif/core/issues",dependencies:{"@types/cli-progress":"^3.11.5","ansi-escapes":"^4.3.2","ansi-styles":"^4.3.0",cardinal:"^2.1.1",chalk:"^4.1.2","clean-stack":"^3.0.1","cli-progress":"^3.12.0",color:"^4.2.3",debug:"^4.3.4",ejs:"^3.1.10","get-package-type":"^0.1.0",globby:"^11.1.0",hyperlinker:"^1.0.0","indent-string":"^4.0.0","is-wsl":"^2.2.0","js-yaml":"^3.14.1",minimatch:"^9.0.4","natural-orderby":"^2.0.3","object-treeify":"^1.1.33","password-prompt":"^1.1.3","slice-ansi":"^4.0.0","string-width":"^4.2.3","strip-ansi":"^6.0.1","supports-color":"^8.1.1","supports-hyperlinks":"^2.2.0","widest-line":"^3.1.0",wordwrap:"^1.0.0","wrap-ansi":"^7.0.0"},devDependencies:{"@commitlint/config-conventional":"^17.8.1","@oclif/plugin-help":"^6","@oclif/plugin-plugins":"^4","@oclif/prettier-config":"^0.2.1","@oclif/test":"^3.2.11","@types/ansi-styles":"^3.2.1","@types/benchmark":"^2.1.5","@types/chai":"^4.3.11","@types/chai-as-promised":"^7.1.8","@types/clean-stack":"^2.1.1","@types/color":"^3.0.6","@types/debug":"^4.1.10","@types/ejs":"^3.1.5","@types/indent-string":"^4.0.1","@types/js-yaml":"^3.12.7","@types/mocha":"^10.0.6","@types/node":"^18","@types/node-notifier":"^8.0.5","@types/pnpapi":"^0.0.5","@types/slice-ansi":"^4.0.0","@types/strip-ansi":"^5.2.1","@types/supports-color":"^8.1.1","@types/wordwrap":"^1.0.3","@types/wrap-ansi":"^3.0.0",benchmark:"^2.1.4",chai:"^4.4.1","chai-as-promised":"^7.1.1",commitlint:"^17.8.1","cross-env":"^7.0.3",eslint:"^8.57.0","eslint-config-oclif":"^5.1.3","eslint-config-oclif-typescript":"^3.1.6","eslint-config-prettier":"^9.1.0","fancy-test":"^3.0.14",globby:"^11.1.0",husky:"^8","lint-staged":"^14.0.1",madge:"^6.1.0",mocha:"^10.4.0",nyc:"^15.1.0",prettier:"^3.2.5",shx:"^0.3.4",sinon:"^16.1.3","ts-node":"^10.9.2",tsd:"^0.31.0",typescript:"^5"},engines:{node:">=18.0.0"},files:["/lib","/flush.js","/flush.d.ts","/handle.js"],homepage:"https://github.com/oclif/core",keywords:["oclif","cli","command","command line","parser","args","argv"],license:"MIT",main:"./lib/index.js",repository:"oclif/core",oclif:{bin:"oclif",devPlugins:["@oclif/plugin-help","@oclif/plugin-plugins"]},publishConfig:{access:"public"},scripts:{build:"shx rm -rf lib && tsc",commitlint:"commitlint",compile:"tsc",format:'prettier --write "+(src|test)/**/*.+(ts|js|json)"',lint:"eslint . --ext .ts",posttest:"yarn lint && yarn test:circular-deps",prepack:"yarn run build",prepare:"husky install",pretest:"yarn build && tsc -p test --noEmit --skipLibCheck","test:circular-deps":"madge lib/ -c","test:debug":'nyc mocha --debug-brk --inspect "test/**/*.test.ts"',"test:integration":'mocha --forbid-only "test/**/*.integration.ts" --parallel --timeout 1200000',"test:interoperability":"cross-env DEBUG=integration:* ts-node test/integration/interop.ts","test:perf":"ts-node test/perf/parser.perf.ts",test:'nyc mocha --forbid-only "test/**/*.test.ts"'},types:"lib/index.d.ts"}});var Ve=E(yo=>{"use strict";y();Object.defineProperty(yo,"__esModule",{value:!0});var $y=F("node:fs"),qy=F("node:path"),go=class e extends Map{static instance;constructor(){super(),this.set("@oclif/core",this.getOclifCoreMeta())}static getInstance(){return e.instance||(e.instance=new e),e.instance}get(t){return super.get(t)}getOclifCoreMeta(){try{return{name:"@oclif/core",version:Gc().version}}catch{try{return{name:"@oclif/core",version:JSON.parse((0,$y.readFileSync)((0,qy.join)(__dirname,"..","package.json"),"utf8"))}}catch{return{name:"@oclif/core",version:"unknown"}}}}};yo.default=go});var Pt=E(fn=>{"use strict";y();Object.defineProperty(fn,"__esModule",{value:!0});fn.settings=void 0;global.oclif||(global.oclif={});fn.settings=global.oclif});var Yt=E(_r=>{"use strict";y();Object.defineProperty(_r,"__esModule",{value:!0});_r.errtermwidth=_r.stdtermwidth=void 0;var Uy=Pt();function Xc(e){if(!e.isTTY)return 80;let t=e.getWindowSize()[0];return t<1?80:t<40?40:t}var Vc=Number.parseInt(process.env.OCLIF_COLUMNS,10)||Uy.settings.columns;_r.stdtermwidth=Vc||Xc(process.stdout);_r.errtermwidth=Vc||Xc(process.stderr)});var wo=E(dn=>{"use strict";y();Object.defineProperty(dn,"__esModule",{value:!0});dn.Logger=void 0;var Yc=F("node:fs/promises"),Hy=F("node:path"),zy=Dr(),Jy=()=>new Date().toISOString(),vo,Wy=e=>new Promise(t=>{vo&&vo.unref(),vo=setTimeout(()=>t(null),e)});function Gy(e){return e.endsWith(`
2
2
  `)?e.replace(/\n$/,""):e}var xo=class{file;buffer=[];flushing=Promise.resolve();constructor(t){this.file=t}async flush(t=0){await Wy(t),this.flushing=this.flushing.then(async()=>{if(this.buffer.length===0)return;let r=this.buffer;this.buffer=[],await(0,Yc.mkdir)((0,Hy.dirname)(this.file),{recursive:!0}),await(0,Yc.appendFile)(this.file,r.join(`
3
3
  `)+`
4
4
  `)}),await this.flushing}log(t){t=zy(Gy(t));let r=t.split(`
@@ -6,8 +6,8 @@ import{a as Nc,e as Mc,f as jc}from"./chunk-TYZXGSHO.js";import{a as Lc}from"./c
6
6
  `);return`${t}
7
7
  ${(0,yn.default)(r,2)}`};function av(e){if(nv.config.debug)return e.stack;let{bang:t,code:r,message:i,name:n,ref:o,suggestions:s}=e,c=i?`${n||"Error"}: ${i}`:void 0,h=r?`Code: ${r}`:void 0,g=ov(s),d=o?`Reference: ${o}`:void 0,f=[c,h,g,d].filter(Boolean).join(`
8
8
  `),p=(0,rv.default)(f,iv.errtermwidth-6,{hard:!0,trim:!1});return p=(0,yn.default)(p,3),p=(0,yn.default)(p,1,{includeEmptyLines:!0,indent:t||""}),p=(0,yn.default)(p,1),p}Zt.default=av});var Do=E(Oe=>{"use strict";y();var uv=Oe&&Oe.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),cv=Oe&&Oe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),lv=Oe&&Oe.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&uv(t,e,r);return cv(t,e),t},hv=Oe&&Oe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Oe,"__esModule",{value:!0});Oe.error=void 0;var fv=hv(Ot()),el=Kt(),tl=Qt(),rl=lv(vn());function il(e,t={}){let r;if(typeof e=="string")r=new tl.CLIError(e,t);else if(e instanceof Error)r=(0,tl.addOclifExitCode)(e,t);else throw new TypeError("first argument must be a string or instance of Error");if(r=(0,rl.applyPrettyPrintOptions)(r,t),t.exit===!1){let i=(0,rl.default)(r);i&&fv.default.stderr(i+`
9
- `),el.config.errorLogger&&el.config.errorLogger.log(r?.stack??"")}else throw r}Oe.error=il;Oe.default=il});var So=E(xn=>{"use strict";y();Object.defineProperty(xn,"__esModule",{value:!0});xn.ModuleLoadError=void 0;var dv=Qt(),Co=class extends dv.CLIError{code="MODULE_NOT_FOUND";constructor(t){super(`[MODULE_NOT_FOUND] ${t}`,{exit:1}),this.name="ModuleLoadError"}};xn.ModuleLoadError=Co});var sl=E((DT,nl)=>{y();nl.exports=function(t){return!t||typeof t=="string"?!1:t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&t.constructor.name!=="String")}});var ul=E((ST,al)=>{"use strict";y();var pv=sl(),mv=Array.prototype.concat,gv=Array.prototype.slice,ol=al.exports=function(t){for(var r=[],i=0,n=t.length;i<n;i++){var o=t[i];pv(o)?r=mv.call(r,gv.call(o)):r.push(o)}return r};ol.wrap=function(e){return function(){return e(ol(arguments))}}});var fl=E((_T,hl)=>{y();var gi=ty(),yi=ul(),cl=Object.hasOwnProperty,ll=Object.create(null);for(wn in gi)cl.call(gi,wn)&&(ll[gi[wn]]=wn);var wn,Pe=hl.exports={to:{},get:{}};Pe.get=function(e){var t=e.substring(0,3).toLowerCase(),r,i;switch(t){case"hsl":r=Pe.get.hsl(e),i="hsl";break;case"hwb":r=Pe.get.hwb(e),i="hwb";break;default:r=Pe.get.rgb(e),i="rgb";break}return r?{model:i,value:r}:null};Pe.get.rgb=function(e){if(!e)return null;var t=/^#([a-f0-9]{3,4})$/i,r=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,i=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,n=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,o=/^(\w+)$/,s=[0,0,0,1],c,h,g;if(c=e.match(r)){for(g=c[2],c=c[1],h=0;h<3;h++){var d=h*2;s[h]=parseInt(c.slice(d,d+2),16)}g&&(s[3]=parseInt(g,16)/255)}else if(c=e.match(t)){for(c=c[1],g=c[3],h=0;h<3;h++)s[h]=parseInt(c[h]+c[h],16);g&&(s[3]=parseInt(g+g,16)/255)}else if(c=e.match(i)){for(h=0;h<3;h++)s[h]=parseInt(c[h+1],0);c[4]&&(c[5]?s[3]=parseFloat(c[4])*.01:s[3]=parseFloat(c[4]))}else if(c=e.match(n)){for(h=0;h<3;h++)s[h]=Math.round(parseFloat(c[h+1])*2.55);c[4]&&(c[5]?s[3]=parseFloat(c[4])*.01:s[3]=parseFloat(c[4]))}else return(c=e.match(o))?c[1]==="transparent"?[0,0,0,0]:cl.call(gi,c[1])?(s=gi[c[1]],s[3]=1,s):null:null;for(h=0;h<3;h++)s[h]=It(s[h],0,255);return s[3]=It(s[3],0,1),s};Pe.get.hsl=function(e){if(!e)return null;var t=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=e.match(t);if(r){var i=parseFloat(r[4]),n=(parseFloat(r[1])%360+360)%360,o=It(parseFloat(r[2]),0,100),s=It(parseFloat(r[3]),0,100),c=It(isNaN(i)?1:i,0,1);return[n,o,s,c]}return null};Pe.get.hwb=function(e){if(!e)return null;var t=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=e.match(t);if(r){var i=parseFloat(r[4]),n=(parseFloat(r[1])%360+360)%360,o=It(parseFloat(r[2]),0,100),s=It(parseFloat(r[3]),0,100),c=It(isNaN(i)?1:i,0,1);return[n,o,s,c]}return null};Pe.to.hex=function(){var e=yi(arguments);return"#"+En(e[0])+En(e[1])+En(e[2])+(e[3]<1?En(Math.round(e[3]*255)):"")};Pe.to.rgb=function(){var e=yi(arguments);return e.length<4||e[3]===1?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"};Pe.to.rgb.percent=function(){var e=yi(arguments),t=Math.round(e[0]/255*100),r=Math.round(e[1]/255*100),i=Math.round(e[2]/255*100);return e.length<4||e[3]===1?"rgb("+t+"%, "+r+"%, "+i+"%)":"rgba("+t+"%, "+r+"%, "+i+"%, "+e[3]+")"};Pe.to.hsl=function(){var e=yi(arguments);return e.length<4||e[3]===1?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"};Pe.to.hwb=function(){var e=yi(arguments),t="";return e.length>=4&&e[3]!==1&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"};Pe.to.keyword=function(e){return ll[e.slice(0,3)]};function It(e,t,r){return Math.min(Math.max(t,e),r)}function En(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}});var ml=E((kT,pl)=>{y();var Fr=fl(),Ie=ry(),dl=["keyword","gray","hex"],Ao={};for(let e of Object.keys(Ie))Ao[[...Ie[e].labels].sort().join("")]=e;var bn={};function he(e,t){if(!(this instanceof he))return new he(e,t);if(t&&t in dl&&(t=null),t&&!(t in Ie))throw new Error("Unknown model: "+t);let r,i;if(e==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof he)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e=="string"){let n=Fr.get(e);if(n===null)throw new Error("Unable to parse color from string: "+e);this.model=n.model,i=Ie[this.model].channels,this.color=n.value.slice(0,i),this.valpha=typeof n.value[i]=="number"?n.value[i]:1}else if(e.length>0){this.model=t||"rgb",i=Ie[this.model].channels;let n=Array.prototype.slice.call(e,0,i);this.color=_o(n,i),this.valpha=typeof e[i]=="number"?e[i]:1}else if(typeof e=="number")this.model="rgb",this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;let n=Object.keys(e);"alpha"in e&&(n.splice(n.indexOf("alpha"),1),this.valpha=typeof e.alpha=="number"?e.alpha:0);let o=n.sort().join("");if(!(o in Ao))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=Ao[o];let{labels:s}=Ie[this.model],c=[];for(r=0;r<s.length;r++)c.push(e[s[r]]);this.color=_o(c)}if(bn[this.model])for(i=Ie[this.model].channels,r=0;r<i;r++){let n=bn[this.model][r];n&&(this.color[r]=n(this.color[r]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}he.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in Fr.to?this:this.rgb();t=t.round(typeof e=="number"?e:1);let r=t.valpha===1?t.color:[...t.color,this.valpha];return Fr.to[t.model](r)},percentString(e){let t=this.rgb().round(typeof e=="number"?e:1),r=t.valpha===1?t.color:[...t.color,this.valpha];return Fr.to.rgb.percent(r)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let e={},{channels:t}=Ie[this.model],{labels:r}=Ie[this.model];for(let i=0;i<t;i++)e[r[i]]=this.color[i];return this.valpha!==1&&(e.alpha=this.valpha),e},unitArray(){let e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,this.valpha!==1&&e.push(this.valpha),e},unitObject(){let e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,this.valpha!==1&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new he([...this.color.map(vv(e)),this.valpha],this.model)},alpha(e){return e!==void 0?new he([...this.color,Math.max(0,Math.min(1,e))],this.model):this.valpha},red:Y("rgb",0,ae(255)),green:Y("rgb",1,ae(255)),blue:Y("rgb",2,ae(255)),hue:Y(["hsl","hsv","hsl","hwb","hcg"],0,e=>(e%360+360)%360),saturationl:Y("hsl",1,ae(100)),lightness:Y("hsl",2,ae(100)),saturationv:Y("hsv",1,ae(100)),value:Y("hsv",2,ae(100)),chroma:Y("hcg",1,ae(100)),gray:Y("hcg",2,ae(100)),white:Y("hwb",1,ae(100)),wblack:Y("hwb",2,ae(100)),cyan:Y("cmyk",0,ae(100)),magenta:Y("cmyk",1,ae(100)),yellow:Y("cmyk",2,ae(100)),black:Y("cmyk",3,ae(100)),x:Y("xyz",0,ae(95.047)),y:Y("xyz",1,ae(100)),z:Y("xyz",2,ae(108.833)),l:Y("lab",0,ae(100)),a:Y("lab",1),b:Y("lab",2),keyword(e){return e!==void 0?new he(e):Ie[this.model].keyword(this.color)},hex(e){return e!==void 0?new he(e):Fr.to.hex(this.rgb().round().color)},hexa(e){if(e!==void 0)return new he(e);let t=this.rgb().round().color,r=Math.round(this.valpha*255).toString(16).toUpperCase();return r.length===1&&(r="0"+r),Fr.to.hex(t)+r},rgbNumber(){let e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){let e=this.rgb().color,t=[];for(let[r,i]of e.entries()){let n=i/255;t[r]=n<=.04045?n/12.92:((n+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){let t=this.luminosity(),r=e.luminosity();return t>r?(t+.05)/(r+.05):(r+.05)/(t+.05)},level(e){let t=this.contrast(e);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){let e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){let t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){let t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){let t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){let t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){let t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){let t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){let e=this.rgb().color,t=e[0]*.3+e[1]*.59+e[2]*.11;return he.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){let t=this.hsl(),r=t.color[0];return r=(r+e)%360,r=r<0?360+r:r,t.color[0]=r,t},mix(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);let r=e.rgb(),i=this.rgb(),n=t===void 0?.5:t,o=2*n-1,s=r.alpha()-i.alpha(),c=((o*s===-1?o:(o+s)/(1+o*s))+1)/2,h=1-c;return he.rgb(c*r.red()+h*i.red(),c*r.green()+h*i.green(),c*r.blue()+h*i.blue(),r.alpha()*n+i.alpha()*(1-n))}};for(let e of Object.keys(Ie)){if(dl.includes(e))continue;let{channels:t}=Ie[e];he.prototype[e]=function(...r){return this.model===e?new he(this):r.length>0?new he(r,e):new he([...xv(Ie[this.model][e].raw(this.color)),this.valpha],e)},he[e]=function(...r){let i=r[0];return typeof i=="number"&&(i=_o(r,t)),new he(i,e)}}function yv(e,t){return Number(e.toFixed(t))}function vv(e){return function(t){return yv(t,e)}}function Y(e,t,r){e=Array.isArray(e)?e:[e];for(let i of e)(bn[i]||(bn[i]=[]))[t]=r;return e=e[0],function(i){let n;return i!==void 0?(r&&(i=r(i)),n=this[e](),n.color[t]=i,n):(n=this[e]().color[t],r&&(n=r(n)),n)}}function ae(e){return function(t){return Math.max(0,Math.min(e,t))}}function xv(e){return Array.isArray(e)?e:[e]}function _o(e,t){for(let r=0;r<t;r++)typeof e[r]!="number"&&(e[r]=0);return e}pl.exports=he});var gl=E(kr=>{"use strict";y();Object.defineProperty(kr,"__esModule",{value:!0});kr.THEME_KEYS=kr.STANDARD_CHALK=void 0;kr.STANDARD_CHALK=["white","black","blue","yellow","green","red","magenta","cyan","gray","blackBright","redBright","greenBright","yellowBright","blueBright","magentaBright","cyanBright","whiteBright","bgBlack","bgRed","bgGreen","bgYellow","bgBlue","bgMagenta","bgCyan","bgWhite","bgGray","bgBlackBright","bgRedBright","bgGreenBright","bgYellowBright","bgBlueBright","bgMagentaBright","bgCyanBright","bgWhiteBright","bold","underline","dim","italic","strikethrough"];kr.THEME_KEYS=["alias","bin","command","commandSummary","dollarSign","flag","flagDefaultValue","flagOptions","flagRequired","flagSeparator","sectionDescription","sectionHeader","topic","version"]});var er=E(ye=>{"use strict";y();var wv=ye&&ye.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),Ev=ye&&ye.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),bv=ye&&ye.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&wv(t,e,r);return Ev(t,e),t},Dv=ye&&ye.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ye,"__esModule",{value:!0});ye.getColor=ye.parseTheme=ye.colorize=void 0;var yl=Dv(Be()),Cv=bv(ml()),Sv=gl();function vl(e){return Sv.STANDARD_CHALK.includes(e)}function Av(e,t){return vl(e)?yl.default[e](t):e?yl.default.hex(e)(t):t}ye.colorize=Av;function _v(e){return Object.fromEntries(Object.entries(e).map(([t,r])=>[t,xl(r)]).filter(([t,r])=>r))}ye.parseTheme=_v;function xl(e){try{return vl(e)?e:new Cv.default(e).hex()}catch{}}ye.getColor=xl});var Dn=E(xt=>{"use strict";y();var Dl=xt&&xt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xt,"__esModule",{value:!0});xt.memoizedWarn=xt.warn=void 0;var Fv=Dl(Ot()),wl=Kt(),El=Qt(),kv=Dl(vn());function Fo(e){let t;if(typeof e=="string")t=new El.CLIError.Warn(e);else if(e instanceof Error)t=(0,El.addOclifExitCode)(e);else throw new TypeError("first argument must be a string or instance of Error");let r=(0,kv.default)(t);r&&Fv.default.stderr(r+`
10
- `),wl.config.errorLogger&&wl.config.errorLogger.log(t?.stack??"")}xt.warn=Fo;var bl=new Set;function Tv(e){bl.has(e)||Fo(e),bl.add(e)}xt.memoizedWarn=Tv;xt.default=Fo});var kl=E(Tr=>{"use strict";y();var Ov=Tr&&Tr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Tr,"__esModule",{value:!0});Tr.readTSConfig=void 0;var Pv=Ov(et()),Cl=F("node:fs/promises"),_l=F("node:path"),Iv=Dn(),Sl=oe(),Nv=(0,Pv.default)("read-tsconfig");function Al(e,t){try{return F.resolve(t,{paths:[e]})}catch{}}async function Fl(e,t){let r;try{r=await t(e)}catch{r=!1}if(r)return e;let i=(0,_l.dirname)(e);if(i!==e)return Fl(i,t)}async function Mv(e,t="tsconfig.json"){let r=[],i;try{i=ny()}catch{try{i=F(e+"/node_modules/typescript")}catch{}}if(!i){(0,Iv.memoizedWarn)("Could not find typescript. Please ensure that typescript is a devDependency. Falling back to compiled source.");return}let n=async o=>{let s=await Fl(o,async c=>(await(0,Cl.readdir)(c)).includes("package.json"));if(s)try{let c=await(0,Cl.readFile)(o,"utf8"),h=i?.parseConfigFileTextToJson(o,c).config;if(r.push(h),h.extends){if(h.extends.startsWith(".")){let d=Al(s,h.extends);return d?n(d):void 0}let g=Al(s,h.extends);if(g)return n(g)}return h}catch(c){Nv(c)}};return await n((0,_l.join)(e,t)),{compilerOptions:(0,Sl.mergeNestedObjects)(r,"compilerOptions"),"ts-node":(0,Sl.mergeNestedObjects)(r,"ts-node")}}Tr.readTSConfig=Mv});var Or=E(nt=>{"use strict";y();Object.defineProperty(nt,"__esModule",{value:!0});nt.collectUsableIds=nt.getCommandIdPermutations=nt.getPermutations=nt.Debug=void 0;var Tl=et();function jv(){process.listenerCount("warning")>1||process.on("warning",e=>{console.error(e.stack),e.detail&&console.error(e.detail)})}function Bv(...e){if(!Tl)return(...r)=>{};let t=Tl(["config",...e].join(":"));return t.enabled&&jv(),(...r)=>t(...r)}nt.Debug=Bv;function ko(e){if(e.length===0)return[];if(e.length===1)return[e];let t=[],r=ko(e.slice(1)),i=e[0];for(let n=0,o=r.length;n<o;n++){let s=r[n];for(let c=0,h=s.length;c<=h;c++){let g=s.slice(0,c),d=s.slice(c),f=[...g,i,...d];t.push(f)}}return t}nt.getPermutations=ko;function Rv(e){return ko(e.split(":")).flatMap(t=>t.join(":"))}nt.getCommandIdPermutations=Rv;var Lv=e=>new Set(e.flatMap(t=>t.split(":").map((r,i,n)=>n.slice(0,i+1).join(":"))));nt.collectUsableIds=Lv});var Pr=E(Re=>{"use strict";y();var $v=Re&&Re.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Re,"__esModule",{value:!0});Re.tsPath=Re.TS_CONFIGS=void 0;var Ol=F("node:fs/promises"),Se=F("node:path"),qv=$v(Ve()),vi=Dn(),Pl=Pt(),Uv=yt(),Hv=kl(),Nl=oe(),zv=Or(),te=(0,zv.Debug)("ts-path");Re.TS_CONFIGS={};var Il=new Set;function Jv(){return process.execPath.split(Se.sep).includes("bun")?"bun":process.execArgv.length===0?"node":process.execArgv[0]==="--require"&&process.execArgv[1].split(Se.sep).includes("ts-node")||process.execArgv[0].split(Se.sep).includes("ts-node")?"ts-node":process.execArgv[0]==="--require"&&process.execArgv[1].split(Se.sep).includes("tsx")?"tsx":"node"}var Cn=Jv();function Wv(e){return"code"in e&&e.code==="ENOENT"}async function Gv(e){try{if(Re.TS_CONFIGS[e])return Re.TS_CONFIGS[e];let t=await(0,Hv.readTSConfig)(e);return t?(te("tsconfig: %O",t),Re.TS_CONFIGS[e]=t,Re.TS_CONFIGS[e]):void 0}catch(t){if(Wv(t))return;te(`Could not parse tsconfig.json. Skipping typescript path lookup for ${e}.`),(0,vi.memoizedWarn)(`Could not parse tsconfig.json for ${e}. Falling back to compiled source.`)}}async function Xv(e,t){if(Il.has(e))return;te("registering ts-node at",e);let r=F.resolve("ts-node",{paths:[e,__dirname]});te("ts-node path:",r);let i;try{i=F(r)}catch{te(`Could not find ts-node at ${r}. Skipping ts-node registration for ${e}.`),(0,vi.memoizedWarn)(`Could not find ts-node at ${r}. Please ensure that ts-node is a devDependency. Falling back to compiled source.`);return}let n=[(0,Se.join)(e,"node_modules","@types")],o=[];if(t.compilerOptions.rootDirs)for(let d of t.compilerOptions.rootDirs)o.push((0,Se.join)(e,d));else t.compilerOptions.rootDir?o.push((0,Se.join)(e,t.compilerOptions.rootDir)):t.compilerOptions.baseUrl?o.push((0,Se.join)(e,t.compilerOptions.baseUrl)):o.push((0,Se.join)(e,"src"));let{baseUrl:s,rootDir:c,...h}=t.compilerOptions,g={compilerOptions:{...h,rootDirs:o,typeRoots:n},...t["ts-node"],cwd:e,esm:t["ts-node"]?.esm??!0,experimentalSpecifierResolution:t["ts-node"]?.experimentalSpecifierResolution??"explicit",scope:!0,scopeDir:e,skipProject:!0,transpileOnly:!0};te("ts-node options: %O",g),i.register(g),Il.add(e)}function Vv(e,t,r){return(r||e?.moduleType==="commonjs")&&t?.moduleType==="module"}function Yv(e,t,r){if(t?.moduleType!=="module"||r)return!1;let i=Number.parseInt(process.version.replace("v","").split(".")[0],10);return Cn==="ts-node"&&i>=20}async function Kv(e,t){let r=await Gv(e);if(!r)return t;te(`Determining path for ${t}`),Cn==="tsx"||Cn==="bun"?te(`Skipping ts-node registration for ${e} because the runtime is: ${Cn}`):await Xv(e,r);let{baseUrl:i,outDir:n,rootDir:o,rootDirs:s}=r.compilerOptions,c=o??(s??[])[0]??i;if(!c)return te(`no rootDir, rootDirs, or baseUrl specified in tsconfig.json. Returning default path ${t}`),t;if(!n)return te(`no outDir specified in tsconfig.json. Returning default path ${t}`),t;let h=(0,Se.join)(e,n),g=(0,Se.join)(e,c),d=(0,Se.relative)(h,t),f=(0,Se.join)(g,d).replace(/\.js$/,"");return te(`lib dir: ${h}`),te(`src dir: ${g}`),te(`src directory to find: ${f}`),(0,Uv.existsSync)(f)?(te(`Found source directory for ${t} at ${f}`),f):(await Promise.all([(0,Ol.access)(`${f}.ts`).then(()=>`${f}.ts`).catch(()=>!1),(0,Ol.access)(`${f}.tsx`).then(()=>`${f}.tsx`).catch(()=>!1)])).some(Boolean)?(te(`Found source file for ${t} at ${f}`),f):(te(`No source file found. Returning default path ${t}`),(0,Nl.isProd)()||(0,vi.memoizedWarn)(`Could not find source for ${t} based on tsconfig. Defaulting to compiled source.`),t)}async function Qv(e,t,r){let i=r?.options.isRoot?r:qv.default.getInstance().get("rootPlugin");if(!t)return t;t=t.startsWith(e)?t:(0,Se.join)(e,t);let n=Pl.settings.enableAutoTranspile??Pl.settings.tsnodeEnabled;if(n===!1)return te(`Skipping typescript path lookup for ${e} because enableAutoTranspile is explicitly set to false`),t;let o=(0,Nl.isProd)();if(n===void 0&&o&&r?.type!=="link")return te(`Skipping typescript path lookup for ${e} because NODE_ENV is NOT "test" or "development"`),t;if(Vv(i,r,o))return te(`Skipping typescript path lookup for ${e} because it's an ESM module (NODE_ENV: ${process.env.NODE_ENV}, root plugin module type: ${i?.moduleType})`),r?.type==="link"&&(0,vi.memoizedWarn)(`${r?.name} is a linked ESM module and cannot be auto-transpiled. Existing compiled source will be used instead.`),t;if(Yv(e,r,o))return te(`Skipping typescript path lookup for ${e} because ts-node is run in node version ${process.version}"`),(0,vi.memoizedWarn)("ts-node executable cannot transpile ESM in Node 20. Existing compiled source will be used instead. See https://github.com/oclif/core/issues/817."),t;try{return await Kv(e,t)}catch(s){return te(s),t}}Re.tsPath=Qv});var xi=E(st=>{"use strict";y();Object.defineProperty(st,"__esModule",{value:!0});st.isPathModule=st.loadWithDataFromManifest=st.loadWithData=st.load=void 0;var Zv=F("node:fs"),Sn=F("node:path"),Po=F("node:url"),Ml=Pr(),To=So(),Bl=yt(),ex=sy(),tx=[".ts",".js",".mjs",".cjs",".mts",".cts",".tsx",".jsx"],rx=e=>e.type!==void 0;function Io(e,t,r){throw e.code==="MODULE_NOT_FOUND"||e.code==="ERR_MODULE_NOT_FOUND"?new To.ModuleLoadError(`${t?"import()":"require"} failed to load ${r}: ${e.message}`):e}async function ix(e,t){let r,i;try{return{filePath:r,isESM:i}=await Rl(e,t),i?await import((0,Po.pathToFileURL)(r).href):F(r)}catch(n){Io(n,i,r??t)}}st.load=ix;async function nx(e,t){let r,i;try{({filePath:r,isESM:i}=await Rl(e,t));let n=i?await import((0,Po.pathToFileURL)(r).href):F(r);return{filePath:r,isESM:i,module:n}}catch(n){Io(n,i,r??t)}}st.loadWithData=nx;async function sx(e,t){let{id:r,isESM:i,relativePath:n}=e;if(!n)throw new To.ModuleLoadError(`Cached command ${r} does not have a relative path`);if(i===void 0)throw new To.ModuleLoadError(`Cached command ${r} does not have the isESM property set`);let o=(0,Sn.join)(t,n.join(Sn.sep));try{let s=i?await import((0,Po.pathToFileURL)(o).href):F(o);return{filePath:o,isESM:i,module:s}}catch(s){Io(s,i,o??t)}}st.loadWithDataFromManifest=sx;function Oo(e){switch((0,Sn.extname)(e).toLowerCase()){case".js":case".jsx":case".ts":case".tsx":return ex.sync(e)==="module";case".mjs":case".mts":return!0;default:return!1}}st.isPathModule=Oo;async function Rl(e,t){let r,i;try{i=F.resolve(t),r=Oo(i)}catch{i=(rx(e)?await(0,Ml.tsPath)(e.root,t,e):await(0,Ml.tsPath)(e.root,t))??t;let n=!1,o=!1;if((0,Bl.existsSync)(i)){n=!0;try{(0,Zv.lstatSync)(i)?.isDirectory?.()&&(n=!1,o=!0)}catch{}}if(!n){let s=jl(i);!s&&o&&(s=jl((0,Sn.join)(i,"index"))),s&&(i=s)}r=Oo(i)}return{filePath:i,isESM:r}}function jl(e){for(let t of tx){let r=`${e}${t}`;if((0,Bl.existsSync)(r))return r}return null}});var _n=E(An=>{"use strict";y();Object.defineProperty(An,"__esModule",{value:!0});An.SINGLE_COMMAND_CLI_SYMBOL=void 0;An.SINGLE_COMMAND_CLI_SYMBOL=Symbol("SINGLE_COMMAND_CLI").toString()});var No=E(Fn=>{"use strict";y();Object.defineProperty(Fn,"__esModule",{value:!0});Fn.cacheDefaultValue=void 0;var ox=async(e,t)=>{if(!(t&&e.noCacheDefault)){if(typeof e.defaultHelp=="function")try{return await e.defaultHelp({flags:{},options:e})}catch{return}if(typeof e.default=="function")try{return await e.default({flags:{},options:e})}catch{}else return e.default}};Fn.cacheDefaultValue=ox});var Nr=E(Ir=>{"use strict";y();Object.defineProperty(Ir,"__esModule",{value:!0});Ir.toConfiguredId=Ir.toStandardizedId=void 0;function ax(e,t){return e.replaceAll(new RegExp(t.topicSeparator,"g"),":")}Ir.toStandardizedId=ax;function ux(e,t){return e.replaceAll(new RegExp(":","g"),t.topicSeparator||":")}Ir.toConfiguredId=ux});var Tn=E(kn=>{"use strict";y();Object.defineProperty(kn,"__esModule",{value:!0});kn.ensureArgObject=void 0;function cx(e){return Array.isArray(e)?(e??[]).reduce((t,r)=>({...t,[r.name]:r}),{}):e??{}}kn.ensureArgObject=cx});var Ll=E(On=>{"use strict";y();Object.defineProperty(On,"__esModule",{value:!0});On.DocOpts=void 0;var lx=Tn(),Mo=class e{cmd;flagList;flagMap;constructor(t){this.cmd=t,this.flagMap={},this.flagList=Object.entries(t.flags||{}).filter(([r,i])=>!i.hidden).map(([r,i])=>(this.flagMap[r]=i,i))}static generate(t){return new e(t).toString()}toString(){let t=["<%= command.id %>"];if(this.cmd.args){let r=this.cmd.strict===!1?"...":"",i=Object.values((0,lx.ensureArgObject)(this.cmd.args)).map(n=>n.required?`${n.name.toUpperCase()}${r}`:`[${n.name.toUpperCase()}${r}]`)||[];t.push(...i)}try{t.push(...Object.values(this.groupFlagElements()))}catch{t.push(...this.flagList.map(r=>{let i=r.char?`-${r.char}`:`--${r.name}`;return r.type==="boolean"?i:`${i}=<value>`}))}return t.join(" ")}combineElementsToFlag(t,r,i,n){if(!this.flagMap[r])return;let o=this.flagMap[r]?.required;(typeof o!="boolean"||!o)&&(o=i.reduce((s,c)=>s||this.flagMap[c]?.required||!1,!1));for(let s of i)t[r]=`${t[r]||""}${n}${t[s]||""}`,delete t[s],delete this.flagMap[s];t[r]=o?`(${t[r]||""})`:`[${t[r]||""}]`,delete this.flagMap[r]}generateElements(t={},r=[]){let i=[];for(let n of r){let o="",s=n.char?`-${n.char}`:`--${n.name}`;n.type==="option"&&(o=n.options?` ${n.options.join("|")}`:" <value>");let c=`${s}${o}`;t[n.name]=c,i.push(c)}return i}groupFlagElements(){let t={};this.generateElements(t,this.flagList.filter(r=>r.required)),this.generateElements(t,this.flagList.filter(r=>!r.required));for(let r of this.flagList)Array.isArray(r.dependsOn)&&this.combineElementsToFlag(t,r.name,r.dependsOn," "),Array.isArray(r.exclusive)&&this.combineElementsToFlag(t,r.name,r.exclusive," | ");for(let r of Object.keys(this.flagMap)){let i=this.flagMap[r]||{};i.required||(t[i.name]=`[${t[i.name]||""}]`)}return t}};On.DocOpts=Mo});var Mr=E(ie=>{"use strict";y();var hx=ie&&ie.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),fx=ie&&ie.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),dx=ie&&ie.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&hx(t,e,r);return fx(t,e),t};Object.defineProperty(ie,"__esModule",{value:!0});ie.normalizeArgv=ie.formatCommandDeprecationWarning=ie.formatFlagDeprecationWarning=ie.getHelpFlagAdditions=ie.standardizeIDFromArgv=ie.template=void 0;var px=dx(yc()),mx=Or(),gx=Nr();function yx(e){function t(r){return px.render(r,e)}return t}ie.template=yx;var vx=e=>e.startsWith("-"),xx=e=>e.includes("=");function wx(e,t){if(e.length===1)return e;let i=(n=>{let o=(0,mx.collectUsableIds)(t.commandIDs),s=[],c=d=>o.has(d),h=d=>(d?[...s,d]:s).filter(Boolean).join(":"),g=()=>{let d=h();if(!d)return!1;let f=t.findCommand(d);return!!(f&&(f.strict===!1||Object.keys(f.args??{}).length>0))};for(let d of n)if(c(h(d)))s.push(d);else{if(xx(d)||vx(d)||g())break;s.push(d)}return h()})(e);if(i){let n=e.slice(i.split(":").length);return[i,...n]}return e}function $l(e,t){return e.length===0||(t.topicSeparator===" "?e=wx(e,t):t.topicSeparator!==":"&&(e[0]=(0,gx.toStandardizedId)(e[0],t))),e}ie.standardizeIDFromArgv=$l;function Ex(e){let t=["--help"],r=e.pjson.oclif.additionalHelpFlags??[];return[...new Set([...t,...r]).values()]}ie.getHelpFlagAdditions=Ex;function bx(e,t){let r=`The "${e}" flag has been deprecated`;return t===!0?`${r}.`:t.message?t.message:(t.version&&(r+=` and will be removed in version ${t.version}`),r+=t.to?`. Use "${t.to}" instead.`:".",r)}ie.formatFlagDeprecationWarning=bx;function Dx(e,t){let r=`The "${e}" command has been deprecated`;return t?t.message?t.message:(t.version&&(r+=` and will be removed in version ${t.version}`),r+=t.to?`. Use "${t.to}" instead.`:".",r):`${r}.`}ie.formatCommandDeprecationWarning=Dx;function Cx(e,t=process.argv.slice(2)){return e.topicSeparator!==":"&&!t[0]?.includes(":")&&(t=$l(t,e)),t}ie.normalizeArgv=Cx});var Pn=E(jr=>{"use strict";y();var Br=jr&&jr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(jr,"__esModule",{value:!0});jr.HelpFormatter=void 0;var Sx=Br(Be()),Ax=Br(ao()),_x=Br(uo()),wi=Br(Dr()),Fx=Br(oy()),kx=Br(co()),ql=er(),Tx=Yt(),Ox=Mr(),jo=class{config;indentSpacing=2;opts;render;constructor(t,r={}){this.config=t,this.opts={maxWidth:Tx.stdtermwidth,...r},this.render=(0,Ox.template)(this)}indent(t,r=this.indentSpacing){return(0,Ax.default)(t,r)}renderList(t,r){if(t.length===0)return"";let i=()=>{let h="";for(let[g,d]of t)!g&&!d||(g&&(r.stripAnsi&&(g=(0,wi.default)(g)),h+=this.wrap(g.trim(),r.indentation)),d&&(r.stripAnsi&&(d=(0,wi.default)(d)),h+=`
9
+ `),el.config.errorLogger&&el.config.errorLogger.log(r?.stack??"")}else throw r}Oe.error=il;Oe.default=il});var So=E(xn=>{"use strict";y();Object.defineProperty(xn,"__esModule",{value:!0});xn.ModuleLoadError=void 0;var dv=Qt(),Co=class extends dv.CLIError{code="MODULE_NOT_FOUND";constructor(t){super(`[MODULE_NOT_FOUND] ${t}`,{exit:1}),this.name="ModuleLoadError"}};xn.ModuleLoadError=Co});var sl=E((DT,nl)=>{y();nl.exports=function(t){return!t||typeof t=="string"?!1:t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&t.constructor.name!=="String")}});var ul=E((ST,al)=>{"use strict";y();var pv=sl(),mv=Array.prototype.concat,gv=Array.prototype.slice,ol=al.exports=function(t){for(var r=[],i=0,n=t.length;i<n;i++){var o=t[i];pv(o)?r=mv.call(r,gv.call(o)):r.push(o)}return r};ol.wrap=function(e){return function(){return e(ol(arguments))}}});var fl=E((_T,hl)=>{y();var gi=ry(),yi=ul(),cl=Object.hasOwnProperty,ll=Object.create(null);for(wn in gi)cl.call(gi,wn)&&(ll[gi[wn]]=wn);var wn,Pe=hl.exports={to:{},get:{}};Pe.get=function(e){var t=e.substring(0,3).toLowerCase(),r,i;switch(t){case"hsl":r=Pe.get.hsl(e),i="hsl";break;case"hwb":r=Pe.get.hwb(e),i="hwb";break;default:r=Pe.get.rgb(e),i="rgb";break}return r?{model:i,value:r}:null};Pe.get.rgb=function(e){if(!e)return null;var t=/^#([a-f0-9]{3,4})$/i,r=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,i=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,n=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,o=/^(\w+)$/,s=[0,0,0,1],c,h,g;if(c=e.match(r)){for(g=c[2],c=c[1],h=0;h<3;h++){var d=h*2;s[h]=parseInt(c.slice(d,d+2),16)}g&&(s[3]=parseInt(g,16)/255)}else if(c=e.match(t)){for(c=c[1],g=c[3],h=0;h<3;h++)s[h]=parseInt(c[h]+c[h],16);g&&(s[3]=parseInt(g+g,16)/255)}else if(c=e.match(i)){for(h=0;h<3;h++)s[h]=parseInt(c[h+1],0);c[4]&&(c[5]?s[3]=parseFloat(c[4])*.01:s[3]=parseFloat(c[4]))}else if(c=e.match(n)){for(h=0;h<3;h++)s[h]=Math.round(parseFloat(c[h+1])*2.55);c[4]&&(c[5]?s[3]=parseFloat(c[4])*.01:s[3]=parseFloat(c[4]))}else return(c=e.match(o))?c[1]==="transparent"?[0,0,0,0]:cl.call(gi,c[1])?(s=gi[c[1]],s[3]=1,s):null:null;for(h=0;h<3;h++)s[h]=It(s[h],0,255);return s[3]=It(s[3],0,1),s};Pe.get.hsl=function(e){if(!e)return null;var t=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=e.match(t);if(r){var i=parseFloat(r[4]),n=(parseFloat(r[1])%360+360)%360,o=It(parseFloat(r[2]),0,100),s=It(parseFloat(r[3]),0,100),c=It(isNaN(i)?1:i,0,1);return[n,o,s,c]}return null};Pe.get.hwb=function(e){if(!e)return null;var t=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=e.match(t);if(r){var i=parseFloat(r[4]),n=(parseFloat(r[1])%360+360)%360,o=It(parseFloat(r[2]),0,100),s=It(parseFloat(r[3]),0,100),c=It(isNaN(i)?1:i,0,1);return[n,o,s,c]}return null};Pe.to.hex=function(){var e=yi(arguments);return"#"+En(e[0])+En(e[1])+En(e[2])+(e[3]<1?En(Math.round(e[3]*255)):"")};Pe.to.rgb=function(){var e=yi(arguments);return e.length<4||e[3]===1?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"};Pe.to.rgb.percent=function(){var e=yi(arguments),t=Math.round(e[0]/255*100),r=Math.round(e[1]/255*100),i=Math.round(e[2]/255*100);return e.length<4||e[3]===1?"rgb("+t+"%, "+r+"%, "+i+"%)":"rgba("+t+"%, "+r+"%, "+i+"%, "+e[3]+")"};Pe.to.hsl=function(){var e=yi(arguments);return e.length<4||e[3]===1?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"};Pe.to.hwb=function(){var e=yi(arguments),t="";return e.length>=4&&e[3]!==1&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"};Pe.to.keyword=function(e){return ll[e.slice(0,3)]};function It(e,t,r){return Math.min(Math.max(t,e),r)}function En(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}});var ml=E((kT,pl)=>{y();var Fr=fl(),Ie=iy(),dl=["keyword","gray","hex"],Ao={};for(let e of Object.keys(Ie))Ao[[...Ie[e].labels].sort().join("")]=e;var bn={};function he(e,t){if(!(this instanceof he))return new he(e,t);if(t&&t in dl&&(t=null),t&&!(t in Ie))throw new Error("Unknown model: "+t);let r,i;if(e==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof he)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e=="string"){let n=Fr.get(e);if(n===null)throw new Error("Unable to parse color from string: "+e);this.model=n.model,i=Ie[this.model].channels,this.color=n.value.slice(0,i),this.valpha=typeof n.value[i]=="number"?n.value[i]:1}else if(e.length>0){this.model=t||"rgb",i=Ie[this.model].channels;let n=Array.prototype.slice.call(e,0,i);this.color=_o(n,i),this.valpha=typeof e[i]=="number"?e[i]:1}else if(typeof e=="number")this.model="rgb",this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;let n=Object.keys(e);"alpha"in e&&(n.splice(n.indexOf("alpha"),1),this.valpha=typeof e.alpha=="number"?e.alpha:0);let o=n.sort().join("");if(!(o in Ao))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=Ao[o];let{labels:s}=Ie[this.model],c=[];for(r=0;r<s.length;r++)c.push(e[s[r]]);this.color=_o(c)}if(bn[this.model])for(i=Ie[this.model].channels,r=0;r<i;r++){let n=bn[this.model][r];n&&(this.color[r]=n(this.color[r]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}he.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in Fr.to?this:this.rgb();t=t.round(typeof e=="number"?e:1);let r=t.valpha===1?t.color:[...t.color,this.valpha];return Fr.to[t.model](r)},percentString(e){let t=this.rgb().round(typeof e=="number"?e:1),r=t.valpha===1?t.color:[...t.color,this.valpha];return Fr.to.rgb.percent(r)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let e={},{channels:t}=Ie[this.model],{labels:r}=Ie[this.model];for(let i=0;i<t;i++)e[r[i]]=this.color[i];return this.valpha!==1&&(e.alpha=this.valpha),e},unitArray(){let e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,this.valpha!==1&&e.push(this.valpha),e},unitObject(){let e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,this.valpha!==1&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new he([...this.color.map(vv(e)),this.valpha],this.model)},alpha(e){return e!==void 0?new he([...this.color,Math.max(0,Math.min(1,e))],this.model):this.valpha},red:Y("rgb",0,ae(255)),green:Y("rgb",1,ae(255)),blue:Y("rgb",2,ae(255)),hue:Y(["hsl","hsv","hsl","hwb","hcg"],0,e=>(e%360+360)%360),saturationl:Y("hsl",1,ae(100)),lightness:Y("hsl",2,ae(100)),saturationv:Y("hsv",1,ae(100)),value:Y("hsv",2,ae(100)),chroma:Y("hcg",1,ae(100)),gray:Y("hcg",2,ae(100)),white:Y("hwb",1,ae(100)),wblack:Y("hwb",2,ae(100)),cyan:Y("cmyk",0,ae(100)),magenta:Y("cmyk",1,ae(100)),yellow:Y("cmyk",2,ae(100)),black:Y("cmyk",3,ae(100)),x:Y("xyz",0,ae(95.047)),y:Y("xyz",1,ae(100)),z:Y("xyz",2,ae(108.833)),l:Y("lab",0,ae(100)),a:Y("lab",1),b:Y("lab",2),keyword(e){return e!==void 0?new he(e):Ie[this.model].keyword(this.color)},hex(e){return e!==void 0?new he(e):Fr.to.hex(this.rgb().round().color)},hexa(e){if(e!==void 0)return new he(e);let t=this.rgb().round().color,r=Math.round(this.valpha*255).toString(16).toUpperCase();return r.length===1&&(r="0"+r),Fr.to.hex(t)+r},rgbNumber(){let e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){let e=this.rgb().color,t=[];for(let[r,i]of e.entries()){let n=i/255;t[r]=n<=.04045?n/12.92:((n+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){let t=this.luminosity(),r=e.luminosity();return t>r?(t+.05)/(r+.05):(r+.05)/(t+.05)},level(e){let t=this.contrast(e);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){let e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){let t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){let t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){let t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){let t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){let t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){let t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){let e=this.rgb().color,t=e[0]*.3+e[1]*.59+e[2]*.11;return he.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){let t=this.hsl(),r=t.color[0];return r=(r+e)%360,r=r<0?360+r:r,t.color[0]=r,t},mix(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);let r=e.rgb(),i=this.rgb(),n=t===void 0?.5:t,o=2*n-1,s=r.alpha()-i.alpha(),c=((o*s===-1?o:(o+s)/(1+o*s))+1)/2,h=1-c;return he.rgb(c*r.red()+h*i.red(),c*r.green()+h*i.green(),c*r.blue()+h*i.blue(),r.alpha()*n+i.alpha()*(1-n))}};for(let e of Object.keys(Ie)){if(dl.includes(e))continue;let{channels:t}=Ie[e];he.prototype[e]=function(...r){return this.model===e?new he(this):r.length>0?new he(r,e):new he([...xv(Ie[this.model][e].raw(this.color)),this.valpha],e)},he[e]=function(...r){let i=r[0];return typeof i=="number"&&(i=_o(r,t)),new he(i,e)}}function yv(e,t){return Number(e.toFixed(t))}function vv(e){return function(t){return yv(t,e)}}function Y(e,t,r){e=Array.isArray(e)?e:[e];for(let i of e)(bn[i]||(bn[i]=[]))[t]=r;return e=e[0],function(i){let n;return i!==void 0?(r&&(i=r(i)),n=this[e](),n.color[t]=i,n):(n=this[e]().color[t],r&&(n=r(n)),n)}}function ae(e){return function(t){return Math.max(0,Math.min(e,t))}}function xv(e){return Array.isArray(e)?e:[e]}function _o(e,t){for(let r=0;r<t;r++)typeof e[r]!="number"&&(e[r]=0);return e}pl.exports=he});var gl=E(kr=>{"use strict";y();Object.defineProperty(kr,"__esModule",{value:!0});kr.THEME_KEYS=kr.STANDARD_CHALK=void 0;kr.STANDARD_CHALK=["white","black","blue","yellow","green","red","magenta","cyan","gray","blackBright","redBright","greenBright","yellowBright","blueBright","magentaBright","cyanBright","whiteBright","bgBlack","bgRed","bgGreen","bgYellow","bgBlue","bgMagenta","bgCyan","bgWhite","bgGray","bgBlackBright","bgRedBright","bgGreenBright","bgYellowBright","bgBlueBright","bgMagentaBright","bgCyanBright","bgWhiteBright","bold","underline","dim","italic","strikethrough"];kr.THEME_KEYS=["alias","bin","command","commandSummary","dollarSign","flag","flagDefaultValue","flagOptions","flagRequired","flagSeparator","sectionDescription","sectionHeader","topic","version"]});var er=E(ye=>{"use strict";y();var wv=ye&&ye.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),Ev=ye&&ye.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),bv=ye&&ye.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&wv(t,e,r);return Ev(t,e),t},Dv=ye&&ye.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ye,"__esModule",{value:!0});ye.getColor=ye.parseTheme=ye.colorize=void 0;var yl=Dv(Be()),Cv=bv(ml()),Sv=gl();function vl(e){return Sv.STANDARD_CHALK.includes(e)}function Av(e,t){return vl(e)?yl.default[e](t):e?yl.default.hex(e)(t):t}ye.colorize=Av;function _v(e){return Object.fromEntries(Object.entries(e).map(([t,r])=>[t,xl(r)]).filter(([t,r])=>r))}ye.parseTheme=_v;function xl(e){try{return vl(e)?e:new Cv.default(e).hex()}catch{}}ye.getColor=xl});var Dn=E(xt=>{"use strict";y();var Dl=xt&&xt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xt,"__esModule",{value:!0});xt.memoizedWarn=xt.warn=void 0;var Fv=Dl(Ot()),wl=Kt(),El=Qt(),kv=Dl(vn());function Fo(e){let t;if(typeof e=="string")t=new El.CLIError.Warn(e);else if(e instanceof Error)t=(0,El.addOclifExitCode)(e);else throw new TypeError("first argument must be a string or instance of Error");let r=(0,kv.default)(t);r&&Fv.default.stderr(r+`
10
+ `),wl.config.errorLogger&&wl.config.errorLogger.log(t?.stack??"")}xt.warn=Fo;var bl=new Set;function Tv(e){bl.has(e)||Fo(e),bl.add(e)}xt.memoizedWarn=Tv;xt.default=Fo});var kl=E(Tr=>{"use strict";y();var Ov=Tr&&Tr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Tr,"__esModule",{value:!0});Tr.readTSConfig=void 0;var Pv=Ov(et()),Cl=F("node:fs/promises"),_l=F("node:path"),Iv=Dn(),Sl=oe(),Nv=(0,Pv.default)("read-tsconfig");function Al(e,t){try{return F.resolve(t,{paths:[e]})}catch{}}async function Fl(e,t){let r;try{r=await t(e)}catch{r=!1}if(r)return e;let i=(0,_l.dirname)(e);if(i!==e)return Fl(i,t)}async function Mv(e,t="tsconfig.json"){let r=[],i;try{i=sy()}catch{try{i=F(e+"/node_modules/typescript")}catch{}}if(!i){(0,Iv.memoizedWarn)("Could not find typescript. Please ensure that typescript is a devDependency. Falling back to compiled source.");return}let n=async o=>{let s=await Fl(o,async c=>(await(0,Cl.readdir)(c)).includes("package.json"));if(s)try{let c=await(0,Cl.readFile)(o,"utf8"),h=i?.parseConfigFileTextToJson(o,c).config;if(r.push(h),h.extends){if(h.extends.startsWith(".")){let d=Al(s,h.extends);return d?n(d):void 0}let g=Al(s,h.extends);if(g)return n(g)}return h}catch(c){Nv(c)}};return await n((0,_l.join)(e,t)),{compilerOptions:(0,Sl.mergeNestedObjects)(r,"compilerOptions"),"ts-node":(0,Sl.mergeNestedObjects)(r,"ts-node")}}Tr.readTSConfig=Mv});var Or=E(nt=>{"use strict";y();Object.defineProperty(nt,"__esModule",{value:!0});nt.collectUsableIds=nt.getCommandIdPermutations=nt.getPermutations=nt.Debug=void 0;var Tl=et();function jv(){process.listenerCount("warning")>1||process.on("warning",e=>{console.error(e.stack),e.detail&&console.error(e.detail)})}function Bv(...e){if(!Tl)return(...r)=>{};let t=Tl(["config",...e].join(":"));return t.enabled&&jv(),(...r)=>t(...r)}nt.Debug=Bv;function ko(e){if(e.length===0)return[];if(e.length===1)return[e];let t=[],r=ko(e.slice(1)),i=e[0];for(let n=0,o=r.length;n<o;n++){let s=r[n];for(let c=0,h=s.length;c<=h;c++){let g=s.slice(0,c),d=s.slice(c),f=[...g,i,...d];t.push(f)}}return t}nt.getPermutations=ko;function Rv(e){return ko(e.split(":")).flatMap(t=>t.join(":"))}nt.getCommandIdPermutations=Rv;var Lv=e=>new Set(e.flatMap(t=>t.split(":").map((r,i,n)=>n.slice(0,i+1).join(":"))));nt.collectUsableIds=Lv});var Pr=E(Re=>{"use strict";y();var $v=Re&&Re.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Re,"__esModule",{value:!0});Re.tsPath=Re.TS_CONFIGS=void 0;var Ol=F("node:fs/promises"),Se=F("node:path"),qv=$v(Ve()),vi=Dn(),Pl=Pt(),Uv=yt(),Hv=kl(),Nl=oe(),zv=Or(),te=(0,zv.Debug)("ts-path");Re.TS_CONFIGS={};var Il=new Set;function Jv(){return process.execPath.split(Se.sep).includes("bun")?"bun":process.execArgv.length===0?"node":process.execArgv[0]==="--require"&&process.execArgv[1].split(Se.sep).includes("ts-node")||process.execArgv[0].split(Se.sep).includes("ts-node")?"ts-node":process.execArgv[0]==="--require"&&process.execArgv[1].split(Se.sep).includes("tsx")?"tsx":"node"}var Cn=Jv();function Wv(e){return"code"in e&&e.code==="ENOENT"}async function Gv(e){try{if(Re.TS_CONFIGS[e])return Re.TS_CONFIGS[e];let t=await(0,Hv.readTSConfig)(e);return t?(te("tsconfig: %O",t),Re.TS_CONFIGS[e]=t,Re.TS_CONFIGS[e]):void 0}catch(t){if(Wv(t))return;te(`Could not parse tsconfig.json. Skipping typescript path lookup for ${e}.`),(0,vi.memoizedWarn)(`Could not parse tsconfig.json for ${e}. Falling back to compiled source.`)}}async function Xv(e,t){if(Il.has(e))return;te("registering ts-node at",e);let r=F.resolve("ts-node",{paths:[e,__dirname]});te("ts-node path:",r);let i;try{i=F(r)}catch{te(`Could not find ts-node at ${r}. Skipping ts-node registration for ${e}.`),(0,vi.memoizedWarn)(`Could not find ts-node at ${r}. Please ensure that ts-node is a devDependency. Falling back to compiled source.`);return}let n=[(0,Se.join)(e,"node_modules","@types")],o=[];if(t.compilerOptions.rootDirs)for(let d of t.compilerOptions.rootDirs)o.push((0,Se.join)(e,d));else t.compilerOptions.rootDir?o.push((0,Se.join)(e,t.compilerOptions.rootDir)):t.compilerOptions.baseUrl?o.push((0,Se.join)(e,t.compilerOptions.baseUrl)):o.push((0,Se.join)(e,"src"));let{baseUrl:s,rootDir:c,...h}=t.compilerOptions,g={compilerOptions:{...h,rootDirs:o,typeRoots:n},...t["ts-node"],cwd:e,esm:t["ts-node"]?.esm??!0,experimentalSpecifierResolution:t["ts-node"]?.experimentalSpecifierResolution??"explicit",scope:!0,scopeDir:e,skipProject:!0,transpileOnly:!0};te("ts-node options: %O",g),i.register(g),Il.add(e)}function Vv(e,t,r){return(r||e?.moduleType==="commonjs")&&t?.moduleType==="module"}function Yv(e,t,r){if(t?.moduleType!=="module"||r)return!1;let i=Number.parseInt(process.version.replace("v","").split(".")[0],10);return Cn==="ts-node"&&i>=20}async function Kv(e,t){let r=await Gv(e);if(!r)return t;te(`Determining path for ${t}`),Cn==="tsx"||Cn==="bun"?te(`Skipping ts-node registration for ${e} because the runtime is: ${Cn}`):await Xv(e,r);let{baseUrl:i,outDir:n,rootDir:o,rootDirs:s}=r.compilerOptions,c=o??(s??[])[0]??i;if(!c)return te(`no rootDir, rootDirs, or baseUrl specified in tsconfig.json. Returning default path ${t}`),t;if(!n)return te(`no outDir specified in tsconfig.json. Returning default path ${t}`),t;let h=(0,Se.join)(e,n),g=(0,Se.join)(e,c),d=(0,Se.relative)(h,t),f=(0,Se.join)(g,d).replace(/\.js$/,"");return te(`lib dir: ${h}`),te(`src dir: ${g}`),te(`src directory to find: ${f}`),(0,Uv.existsSync)(f)?(te(`Found source directory for ${t} at ${f}`),f):(await Promise.all([(0,Ol.access)(`${f}.ts`).then(()=>`${f}.ts`).catch(()=>!1),(0,Ol.access)(`${f}.tsx`).then(()=>`${f}.tsx`).catch(()=>!1)])).some(Boolean)?(te(`Found source file for ${t} at ${f}`),f):(te(`No source file found. Returning default path ${t}`),(0,Nl.isProd)()||(0,vi.memoizedWarn)(`Could not find source for ${t} based on tsconfig. Defaulting to compiled source.`),t)}async function Qv(e,t,r){let i=r?.options.isRoot?r:qv.default.getInstance().get("rootPlugin");if(!t)return t;t=t.startsWith(e)?t:(0,Se.join)(e,t);let n=Pl.settings.enableAutoTranspile??Pl.settings.tsnodeEnabled;if(n===!1)return te(`Skipping typescript path lookup for ${e} because enableAutoTranspile is explicitly set to false`),t;let o=(0,Nl.isProd)();if(n===void 0&&o&&r?.type!=="link")return te(`Skipping typescript path lookup for ${e} because NODE_ENV is NOT "test" or "development"`),t;if(Vv(i,r,o))return te(`Skipping typescript path lookup for ${e} because it's an ESM module (NODE_ENV: ${process.env.NODE_ENV}, root plugin module type: ${i?.moduleType})`),r?.type==="link"&&(0,vi.memoizedWarn)(`${r?.name} is a linked ESM module and cannot be auto-transpiled. Existing compiled source will be used instead.`),t;if(Yv(e,r,o))return te(`Skipping typescript path lookup for ${e} because ts-node is run in node version ${process.version}"`),(0,vi.memoizedWarn)("ts-node executable cannot transpile ESM in Node 20. Existing compiled source will be used instead. See https://github.com/oclif/core/issues/817."),t;try{return await Kv(e,t)}catch(s){return te(s),t}}Re.tsPath=Qv});var xi=E(st=>{"use strict";y();Object.defineProperty(st,"__esModule",{value:!0});st.isPathModule=st.loadWithDataFromManifest=st.loadWithData=st.load=void 0;var Zv=F("node:fs"),Sn=F("node:path"),Po=F("node:url"),Ml=Pr(),To=So(),Bl=yt(),ex=oy(),tx=[".ts",".js",".mjs",".cjs",".mts",".cts",".tsx",".jsx"],rx=e=>e.type!==void 0;function Io(e,t,r){throw e.code==="MODULE_NOT_FOUND"||e.code==="ERR_MODULE_NOT_FOUND"?new To.ModuleLoadError(`${t?"import()":"require"} failed to load ${r}: ${e.message}`):e}async function ix(e,t){let r,i;try{return{filePath:r,isESM:i}=await Rl(e,t),i?await import((0,Po.pathToFileURL)(r).href):F(r)}catch(n){Io(n,i,r??t)}}st.load=ix;async function nx(e,t){let r,i;try{({filePath:r,isESM:i}=await Rl(e,t));let n=i?await import((0,Po.pathToFileURL)(r).href):F(r);return{filePath:r,isESM:i,module:n}}catch(n){Io(n,i,r??t)}}st.loadWithData=nx;async function sx(e,t){let{id:r,isESM:i,relativePath:n}=e;if(!n)throw new To.ModuleLoadError(`Cached command ${r} does not have a relative path`);if(i===void 0)throw new To.ModuleLoadError(`Cached command ${r} does not have the isESM property set`);let o=(0,Sn.join)(t,n.join(Sn.sep));try{let s=i?await import((0,Po.pathToFileURL)(o).href):F(o);return{filePath:o,isESM:i,module:s}}catch(s){Io(s,i,o??t)}}st.loadWithDataFromManifest=sx;function Oo(e){switch((0,Sn.extname)(e).toLowerCase()){case".js":case".jsx":case".ts":case".tsx":return ex.sync(e)==="module";case".mjs":case".mts":return!0;default:return!1}}st.isPathModule=Oo;async function Rl(e,t){let r,i;try{i=F.resolve(t),r=Oo(i)}catch{i=(rx(e)?await(0,Ml.tsPath)(e.root,t,e):await(0,Ml.tsPath)(e.root,t))??t;let n=!1,o=!1;if((0,Bl.existsSync)(i)){n=!0;try{(0,Zv.lstatSync)(i)?.isDirectory?.()&&(n=!1,o=!0)}catch{}}if(!n){let s=jl(i);!s&&o&&(s=jl((0,Sn.join)(i,"index"))),s&&(i=s)}r=Oo(i)}return{filePath:i,isESM:r}}function jl(e){for(let t of tx){let r=`${e}${t}`;if((0,Bl.existsSync)(r))return r}return null}});var _n=E(An=>{"use strict";y();Object.defineProperty(An,"__esModule",{value:!0});An.SINGLE_COMMAND_CLI_SYMBOL=void 0;An.SINGLE_COMMAND_CLI_SYMBOL=Symbol("SINGLE_COMMAND_CLI").toString()});var No=E(Fn=>{"use strict";y();Object.defineProperty(Fn,"__esModule",{value:!0});Fn.cacheDefaultValue=void 0;var ox=async(e,t)=>{if(!(t&&e.noCacheDefault)){if(typeof e.defaultHelp=="function")try{return await e.defaultHelp({flags:{},options:e})}catch{return}if(typeof e.default=="function")try{return await e.default({flags:{},options:e})}catch{}else return e.default}};Fn.cacheDefaultValue=ox});var Nr=E(Ir=>{"use strict";y();Object.defineProperty(Ir,"__esModule",{value:!0});Ir.toConfiguredId=Ir.toStandardizedId=void 0;function ax(e,t){return e.replaceAll(new RegExp(t.topicSeparator,"g"),":")}Ir.toStandardizedId=ax;function ux(e,t){return e.replaceAll(new RegExp(":","g"),t.topicSeparator||":")}Ir.toConfiguredId=ux});var Tn=E(kn=>{"use strict";y();Object.defineProperty(kn,"__esModule",{value:!0});kn.ensureArgObject=void 0;function cx(e){return Array.isArray(e)?(e??[]).reduce((t,r)=>({...t,[r.name]:r}),{}):e??{}}kn.ensureArgObject=cx});var Ll=E(On=>{"use strict";y();Object.defineProperty(On,"__esModule",{value:!0});On.DocOpts=void 0;var lx=Tn(),Mo=class e{cmd;flagList;flagMap;constructor(t){this.cmd=t,this.flagMap={},this.flagList=Object.entries(t.flags||{}).filter(([r,i])=>!i.hidden).map(([r,i])=>(this.flagMap[r]=i,i))}static generate(t){return new e(t).toString()}toString(){let t=["<%= command.id %>"];if(this.cmd.args){let r=this.cmd.strict===!1?"...":"",i=Object.values((0,lx.ensureArgObject)(this.cmd.args)).map(n=>n.required?`${n.name.toUpperCase()}${r}`:`[${n.name.toUpperCase()}${r}]`)||[];t.push(...i)}try{t.push(...Object.values(this.groupFlagElements()))}catch{t.push(...this.flagList.map(r=>{let i=r.char?`-${r.char}`:`--${r.name}`;return r.type==="boolean"?i:`${i}=<value>`}))}return t.join(" ")}combineElementsToFlag(t,r,i,n){if(!this.flagMap[r])return;let o=this.flagMap[r]?.required;(typeof o!="boolean"||!o)&&(o=i.reduce((s,c)=>s||this.flagMap[c]?.required||!1,!1));for(let s of i)t[r]=`${t[r]||""}${n}${t[s]||""}`,delete t[s],delete this.flagMap[s];t[r]=o?`(${t[r]||""})`:`[${t[r]||""}]`,delete this.flagMap[r]}generateElements(t={},r=[]){let i=[];for(let n of r){let o="",s=n.char?`-${n.char}`:`--${n.name}`;n.type==="option"&&(o=n.options?` ${n.options.join("|")}`:" <value>");let c=`${s}${o}`;t[n.name]=c,i.push(c)}return i}groupFlagElements(){let t={};this.generateElements(t,this.flagList.filter(r=>r.required)),this.generateElements(t,this.flagList.filter(r=>!r.required));for(let r of this.flagList)Array.isArray(r.dependsOn)&&this.combineElementsToFlag(t,r.name,r.dependsOn," "),Array.isArray(r.exclusive)&&this.combineElementsToFlag(t,r.name,r.exclusive," | ");for(let r of Object.keys(this.flagMap)){let i=this.flagMap[r]||{};i.required||(t[i.name]=`[${t[i.name]||""}]`)}return t}};On.DocOpts=Mo});var Mr=E(ie=>{"use strict";y();var hx=ie&&ie.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),fx=ie&&ie.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),dx=ie&&ie.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&hx(t,e,r);return fx(t,e),t};Object.defineProperty(ie,"__esModule",{value:!0});ie.normalizeArgv=ie.formatCommandDeprecationWarning=ie.formatFlagDeprecationWarning=ie.getHelpFlagAdditions=ie.standardizeIDFromArgv=ie.template=void 0;var px=dx(yc()),mx=Or(),gx=Nr();function yx(e){function t(r){return px.render(r,e)}return t}ie.template=yx;var vx=e=>e.startsWith("-"),xx=e=>e.includes("=");function wx(e,t){if(e.length===1)return e;let i=(n=>{let o=(0,mx.collectUsableIds)(t.commandIDs),s=[],c=d=>o.has(d),h=d=>(d?[...s,d]:s).filter(Boolean).join(":"),g=()=>{let d=h();if(!d)return!1;let f=t.findCommand(d);return!!(f&&(f.strict===!1||Object.keys(f.args??{}).length>0))};for(let d of n)if(c(h(d)))s.push(d);else{if(xx(d)||vx(d)||g())break;s.push(d)}return h()})(e);if(i){let n=e.slice(i.split(":").length);return[i,...n]}return e}function $l(e,t){return e.length===0||(t.topicSeparator===" "?e=wx(e,t):t.topicSeparator!==":"&&(e[0]=(0,gx.toStandardizedId)(e[0],t))),e}ie.standardizeIDFromArgv=$l;function Ex(e){let t=["--help"],r=e.pjson.oclif.additionalHelpFlags??[];return[...new Set([...t,...r]).values()]}ie.getHelpFlagAdditions=Ex;function bx(e,t){let r=`The "${e}" flag has been deprecated`;return t===!0?`${r}.`:t.message?t.message:(t.version&&(r+=` and will be removed in version ${t.version}`),r+=t.to?`. Use "${t.to}" instead.`:".",r)}ie.formatFlagDeprecationWarning=bx;function Dx(e,t){let r=`The "${e}" command has been deprecated`;return t?t.message?t.message:(t.version&&(r+=` and will be removed in version ${t.version}`),r+=t.to?`. Use "${t.to}" instead.`:".",r):`${r}.`}ie.formatCommandDeprecationWarning=Dx;function Cx(e,t=process.argv.slice(2)){return e.topicSeparator!==":"&&!t[0]?.includes(":")&&(t=$l(t,e)),t}ie.normalizeArgv=Cx});var Pn=E(jr=>{"use strict";y();var Br=jr&&jr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(jr,"__esModule",{value:!0});jr.HelpFormatter=void 0;var Sx=Br(Be()),Ax=Br(ao()),_x=Br(uo()),wi=Br(Dr()),Fx=Br(ay()),kx=Br(co()),ql=er(),Tx=Yt(),Ox=Mr(),jo=class{config;indentSpacing=2;opts;render;constructor(t,r={}){this.config=t,this.opts={maxWidth:Tx.stdtermwidth,...r},this.render=(0,Ox.template)(this)}indent(t,r=this.indentSpacing){return(0,Ax.default)(t,r)}renderList(t,r){if(t.length===0)return"";let i=()=>{let h="";for(let[g,d]of t)!g&&!d||(g&&(r.stripAnsi&&(g=(0,wi.default)(g)),h+=this.wrap(g.trim(),r.indentation)),d&&(r.stripAnsi&&(d=(0,wi.default)(d)),h+=`
11
11
  `,h+=this.indent(this.wrap(d.trim(),r.indentation+2),4)),h+=`
12
12
 
13
13
  `);return h.trim()};if(r.multiline)return i();let n=(0,Fx.default)(t.map(h=>h[0]).join(`
@@ -70,12 +70,12 @@ ${this.indent(this.wrap(n.description||"",this.indentSpacing*2))}`}).join(`
70
70
  ${i.message}`)}return Mn}fe.loadHelpClass=Qx});var jn=E(Le=>{"use strict";y();var Uo=Le&&Le.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Le,"__esModule",{value:!0});Le.handle=Le.Exit=void 0;var Zx=Uo(vc()),ew=Uo(Ve()),tw=Ci(),qo=Kt(),rw=Qt(),iw=gn(),nw=Uo(vn());Le.Exit={exit(e=0){process.exit(e)}};async function sw(e){try{e||(e=new rw.CLIError("no error?")),e.message==="SIGINT"&&Le.Exit.exit(1);let t=!(e instanceof iw.ExitError)&&!e.skipOclifErrorHandling,r=(0,nw.default)(e),i=(0,Zx.default)(e.stack||"",{pretty:!0});if(t){console.error(r??i);let o=ew.default.getInstance().get("config");if(e.showHelp&&e.parse?.input?.argv&&o){let s={...o.pjson.oclif.helpOptions??o.pjson.helpOptions,sections:["flags","usage","arguments"],sendToStderr:!0},c=new tw.Help(o,s);console.error(),await c.showHelp(process.argv.slice(2))}}let n=e.oclif?.exit??1;qo.config.errorLogger&&e.code!=="EEXIT"?(i&&qo.config.errorLogger.log(i),await qo.config.errorLogger.flush().then(()=>Le.Exit.exit(n)).catch(console.error)):Le.Exit.exit(n)}catch(t){console.error(e.stack),console.error(t.stack),Le.Exit.exit(1)}}Le.handle=sw});var $e=E(ne=>{"use strict";y();Object.defineProperty(ne,"__esModule",{value:!0});ne.warn=ne.exit=ne.Logger=ne.handle=ne.ModuleLoadError=ne.ExitError=ne.CLIError=ne.error=ne.config=void 0;var ow=gn(),aw=Kt();Object.defineProperty(ne,"config",{enumerable:!0,get:function(){return aw.config}});var uw=Do();Object.defineProperty(ne,"error",{enumerable:!0,get:function(){return uw.error}});var cw=Qt();Object.defineProperty(ne,"CLIError",{enumerable:!0,get:function(){return cw.CLIError}});var lw=gn();Object.defineProperty(ne,"ExitError",{enumerable:!0,get:function(){return lw.ExitError}});var hw=So();Object.defineProperty(ne,"ModuleLoadError",{enumerable:!0,get:function(){return hw.ModuleLoadError}});var fw=jn();Object.defineProperty(ne,"handle",{enumerable:!0,get:function(){return fw.handle}});var dw=wo();Object.defineProperty(ne,"Logger",{enumerable:!0,get:function(){return dw.Logger}});function pw(e=0){throw new ow.ExitError(e)}ne.exit=pw;var mw=Dn();Object.defineProperty(ne,"warn",{enumerable:!0,get:function(){return mw.warn}})});var Rn=E(Bn=>{"use strict";y();Object.defineProperty(Bn,"__esModule",{value:!0});Bn.ActionBase=void 0;var Yl=F("node:util"),Kl=oe(),Ho=class{std="stderr";stdmocks;type;stdmockOrigs={stderr:process.stderr.write,stdout:process.stdout.write};get output(){return this.globals.output}set output(t){this.globals.output=t}get running(){return!!this.task}get status(){return this.task?this.task.status:void 0}set status(t){let{task:r}=this;r&&r.status!==t&&(this._updateStatus(t,r.status),r.status=t)}get task(){return this.globals.action.task}set task(t){this.globals.action.task=t}pause(t,r){let{task:i}=this,n=i&&i.active;i&&n&&(this._pause(r),this._stdout(!1),i.active=!1);let o=t();return i&&n&&this._resume(),o}async pauseAsync(t,r){let{task:i}=this,n=i&&i.active;i&&n&&(this._pause(r),this._stdout(!1),i.active=!1);let o=await t();return i&&n&&this._resume(),o}start(t,r,i={}){this.std=i.stdout?"stdout":"stderr";let n={action:t,active:!!(this.task&&this.task.active),status:r};this.task=n,this._start(i),n.active=!0,this._stdout(!0)}stop(t="done"){let{task:r}=this;r&&(this._stop(t),r.active=!1,this.task=void 0,this._stdout(!1))}_flushStdout(){try{let t="",r;for(;this.stdmocks&&this.stdmocks.length>0;){let i=this.stdmocks.shift();r=i[0],this._write(r,i[1]),t+=i[1][0].toString("utf8")}t&&r&&t.at(-1)!==`
71
71
  `&&this._write(r,`
72
72
  `)}catch(t){this._write("stderr",(0,Yl.inspect)(t))}}_pause(t){throw new Error("not implemented")}_resume(){this.task&&this.start(this.task.action,this.task.status)}_start(t){throw new Error("not implemented")}_stdout(t){try{if(t){if(this.stdmocks)return;this.stdmockOrigs={stderr:process.stderr.write,stdout:process.stdout.write},this.stdmocks=[],process.stdout.write=(...r)=>(this.stdmocks.push(["stdout",r]),!0),process.stderr.write=(...r)=>(this.stdmocks.push(["stderr",r]),!0)}else{if(!this.stdmocks)return;delete this.stdmocks,process.stdout.write=this.stdmockOrigs.stdout,process.stderr.write=this.stdmockOrigs.stderr}}catch(r){this._write("stderr",(0,Yl.inspect)(r))}}_stop(t){throw new Error("not implemented")}_updateStatus(t,r){}_write(t,r){switch(t){case"stdout":{this.stdmockOrigs.stdout.apply(process.stdout,(0,Kl.castArray)(r));break}case"stderr":{this.stdmockOrigs.stderr.apply(process.stderr,(0,Kl.castArray)(r));break}default:throw new Error(`invalid std: ${t}`)}}get globals(){global.ux=global.ux||{};let t=global.ux;return t.action=t.action||{},t}};Bn.ActionBase=Ho});var Ql=E(Jo=>{"use strict";y();Object.defineProperty(Jo,"__esModule",{value:!0});var gw=Rn(),zo=class extends gw.ActionBase{type="simple";_flush(){this._write(this.std,`
73
- `),this._flushStdout()}_pause(t){t?this._updateStatus(t):this._flush()}_render(t,r){this.task&&(this.task.active&&this._flush(),this._write(this.std,r?`${t}... ${r}`:`${t}...`))}_resume(){}_start(){this.task&&this._render(this.task.action,this.task.status)}_stop(t){this.task&&this._updateStatus(t,this.task.status,!0)}_updateStatus(t,r,i=!1){this.task&&(this.task.active&&!r?this._write(this.std,` ${t}`):this._write(this.std,`${this.task.action}... ${t}`),(i||!r)&&this._flush())}};Jo.default=zo});var Zl=E(Wo=>{"use strict";y();Object.defineProperty(Wo,"__esModule",{value:!0});Wo.default={arc:{frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"],interval:100},arrow:{frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"],interval:100},arrow2:{frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "],interval:80},arrow3:{frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"],interval:120},balloon:{frames:[" ",".","o","O","@","*"," "],interval:140},balloon2:{frames:[".","o","O","\xB0","O","o","."],interval:120},bounce:{frames:["\u2801","\u2802","\u2804","\u2802"],interval:120},bouncingBall:{frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"],interval:80},bouncingBar:{frames:["[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"],interval:80},boxBounce:{frames:["\u2596","\u2598","\u259D","\u2597"],interval:120},boxBounce2:{frames:["\u258C","\u2580","\u2590","\u2584"],interval:100},circle:{frames:["\u25E1","\u2299","\u25E0"],interval:120},circleHalves:{frames:["\u25D0","\u25D3","\u25D1","\u25D2"],interval:50},circleQuarters:{frames:["\u25F4","\u25F7","\u25F6","\u25F5"],interval:120},clock:{frames:["\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "],interval:100},dots:{frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],interval:80},dots2:{frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"],interval:80},dots3:{frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"],interval:80},dots4:{frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"],interval:80},dots5:{frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"],interval:80},dots6:{frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"],interval:80},dots7:{frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"],interval:80},dots8:{frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"],interval:80},dots9:{frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"],interval:80},dots10:{frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"],interval:80},dots11:{frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"],interval:100},earth:{frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "],interval:180},flip:{frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"],interval:70},growHorizontal:{frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"],interval:120},growVertical:{frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"],interval:120},hamburger:{frames:["\u2631","\u2632","\u2634"],interval:100},hearts:{frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u2764\uFE0F "],interval:100},hexagon:{frames:["\u2B21","\u2B22"],interval:400},line:{frames:["-","\\","|","/"],interval:130},line2:{frames:["\u2802","-","\u2013","\u2014","\u2013","-"],interval:100},monkey:{frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "],interval:300},moon:{frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "],interval:80},noise:{frames:["\u2593","\u2592","\u2591"],interval:100},pipe:{frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"],interval:100},pong:{frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"],interval:80},runner:{frames:["\u{1F6B6} ","\u{1F3C3} "],interval:140},simpleDots:{frames:[". ",".. ","..."," "],interval:400},simpleDotsScrolling:{frames:[". ",".. ","..."," .."," ."," "],interval:200},smiley:{frames:["\u{1F604} ","\u{1F61D} "],interval:200},squareCorners:{frames:["\u25F0","\u25F3","\u25F2","\u25F1"],interval:180},squish:{frames:["\u256B","\u256A"],interval:100},star:{frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"],interval:70},star2:{frames:["+","x","*"],interval:80},toggle:{frames:["\u22B6","\u22B7"],interval:250},toggle2:{frames:["\u25AB","\u25AA"],interval:80},toggle3:{frames:["\u25A1","\u25A0"],interval:120},toggle4:{frames:["\u25A0","\u25A1","\u25AA","\u25AB"],interval:100},toggle5:{frames:["\u25AE","\u25AF"],interval:100},toggle6:{frames:["\u101D","\u1040"],interval:300},toggle7:{frames:["\u29BE","\u29BF"],interval:80},toggle8:{frames:["\u25CD","\u25CC"],interval:100},toggle9:{frames:["\u25C9","\u25CE"],interval:100},toggle10:{frames:["\u3282","\u3280","\u3281"],interval:100},toggle11:{frames:["\u29C7","\u29C6"],interval:50},toggle12:{frames:["\u2617","\u2616"],interval:120},toggle13:{frames:["=","*","-"],interval:80},triangle:{frames:["\u25E2","\u25E3","\u25E4","\u25E5"],interval:50}}});var th=E(Ye=>{"use strict";y();var yw=Ye&&Ye.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),vw=Ye&&Ye.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),xw=Ye&&Ye.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&yw(t,e,r);return vw(t,e),t},Ln=Ye&&Ye.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ye,"__esModule",{value:!0});var ww=Ln(xc()),Ew=Ln(Be()),bw=Ln(Dr()),Go=xw(Z0()),Dw=Yt(),Cw=Rn(),eh=Ln(Zl()),Xo=lo();function Sw(e){return Go?(Go.stdout?Go.stdout.has256:(process.env.TERM||"").includes("256"))?`\x1B[38;5;104m${e}${ww.default.reset.open}`:Ew.default.magenta(e):e}var Vo=class extends Cw.ActionBase{frameIndex;frames;spinner;type="spinner";constructor(){super(),this.frames=this.getFrames(),this.frameIndex=0}_frame(){let t=this.frames[this.frameIndex];return this.frameIndex=++this.frameIndex%this.frames.length,Sw(t)}_lines(t){return(0,bw.default)(t).split(`
73
+ `),this._flushStdout()}_pause(t){t?this._updateStatus(t):this._flush()}_render(t,r){this.task&&(this.task.active&&this._flush(),this._write(this.std,r?`${t}... ${r}`:`${t}...`))}_resume(){}_start(){this.task&&this._render(this.task.action,this.task.status)}_stop(t){this.task&&this._updateStatus(t,this.task.status,!0)}_updateStatus(t,r,i=!1){this.task&&(this.task.active&&!r?this._write(this.std,` ${t}`):this._write(this.std,`${this.task.action}... ${t}`),(i||!r)&&this._flush())}};Jo.default=zo});var Zl=E(Wo=>{"use strict";y();Object.defineProperty(Wo,"__esModule",{value:!0});Wo.default={arc:{frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"],interval:100},arrow:{frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"],interval:100},arrow2:{frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "],interval:80},arrow3:{frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"],interval:120},balloon:{frames:[" ",".","o","O","@","*"," "],interval:140},balloon2:{frames:[".","o","O","\xB0","O","o","."],interval:120},bounce:{frames:["\u2801","\u2802","\u2804","\u2802"],interval:120},bouncingBall:{frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"],interval:80},bouncingBar:{frames:["[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"],interval:80},boxBounce:{frames:["\u2596","\u2598","\u259D","\u2597"],interval:120},boxBounce2:{frames:["\u258C","\u2580","\u2590","\u2584"],interval:100},circle:{frames:["\u25E1","\u2299","\u25E0"],interval:120},circleHalves:{frames:["\u25D0","\u25D3","\u25D1","\u25D2"],interval:50},circleQuarters:{frames:["\u25F4","\u25F7","\u25F6","\u25F5"],interval:120},clock:{frames:["\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "],interval:100},dots:{frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],interval:80},dots2:{frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"],interval:80},dots3:{frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"],interval:80},dots4:{frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"],interval:80},dots5:{frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"],interval:80},dots6:{frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"],interval:80},dots7:{frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"],interval:80},dots8:{frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"],interval:80},dots9:{frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"],interval:80},dots10:{frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"],interval:80},dots11:{frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"],interval:100},earth:{frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "],interval:180},flip:{frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"],interval:70},growHorizontal:{frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"],interval:120},growVertical:{frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"],interval:120},hamburger:{frames:["\u2631","\u2632","\u2634"],interval:100},hearts:{frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u2764\uFE0F "],interval:100},hexagon:{frames:["\u2B21","\u2B22"],interval:400},line:{frames:["-","\\","|","/"],interval:130},line2:{frames:["\u2802","-","\u2013","\u2014","\u2013","-"],interval:100},monkey:{frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "],interval:300},moon:{frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "],interval:80},noise:{frames:["\u2593","\u2592","\u2591"],interval:100},pipe:{frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"],interval:100},pong:{frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"],interval:80},runner:{frames:["\u{1F6B6} ","\u{1F3C3} "],interval:140},simpleDots:{frames:[". ",".. ","..."," "],interval:400},simpleDotsScrolling:{frames:[". ",".. ","..."," .."," ."," "],interval:200},smiley:{frames:["\u{1F604} ","\u{1F61D} "],interval:200},squareCorners:{frames:["\u25F0","\u25F3","\u25F2","\u25F1"],interval:180},squish:{frames:["\u256B","\u256A"],interval:100},star:{frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"],interval:70},star2:{frames:["+","x","*"],interval:80},toggle:{frames:["\u22B6","\u22B7"],interval:250},toggle2:{frames:["\u25AB","\u25AA"],interval:80},toggle3:{frames:["\u25A1","\u25A0"],interval:120},toggle4:{frames:["\u25A0","\u25A1","\u25AA","\u25AB"],interval:100},toggle5:{frames:["\u25AE","\u25AF"],interval:100},toggle6:{frames:["\u101D","\u1040"],interval:300},toggle7:{frames:["\u29BE","\u29BF"],interval:80},toggle8:{frames:["\u25CD","\u25CC"],interval:100},toggle9:{frames:["\u25C9","\u25CE"],interval:100},toggle10:{frames:["\u3282","\u3280","\u3281"],interval:100},toggle11:{frames:["\u29C7","\u29C6"],interval:50},toggle12:{frames:["\u2617","\u2616"],interval:120},toggle13:{frames:["=","*","-"],interval:80},triangle:{frames:["\u25E2","\u25E3","\u25E4","\u25E5"],interval:50}}});var th=E(Ye=>{"use strict";y();var yw=Ye&&Ye.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),vw=Ye&&Ye.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),xw=Ye&&Ye.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&yw(t,e,r);return vw(t,e),t},Ln=Ye&&Ye.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ye,"__esModule",{value:!0});var ww=Ln(xc()),Ew=Ln(Be()),bw=Ln(Dr()),Go=xw(ey()),Dw=Yt(),Cw=Rn(),eh=Ln(Zl()),Xo=lo();function Sw(e){return Go?(Go.stdout?Go.stdout.has256:(process.env.TERM||"").includes("256"))?`\x1B[38;5;104m${e}${ww.default.reset.open}`:Ew.default.magenta(e):e}var Vo=class extends Cw.ActionBase{frameIndex;frames;spinner;type="spinner";constructor(){super(),this.frames=this.getFrames(),this.frameIndex=0}_frame(){let t=this.frames[this.frameIndex];return this.frameIndex=++this.frameIndex%this.frames.length,Sw(t)}_lines(t){return(0,bw.default)(t).split(`
74
74
  `).map(r=>Math.ceil(r.length/Dw.errtermwidth)).reduce((r,i)=>r+i,0)}_pause(t){this.spinner&&clearInterval(this.spinner),this._reset(),t&&this._render(` ${t}`),this.output=void 0}_render(t){if(!this.task)return;this._reset(),this._flushStdout();let r=t==="spinner"?` ${this._frame()}`:t||"",i=this.task.status?` ${this.task.status}`:"";this.output=`${this.task.action}...${r}${i}
75
75
  `,this._write(this.std,this.output)}_reset(){if(!this.output)return;let t=this._lines(this.output);this._write(this.std,Xo.cursorLeft+Xo.cursorUp(t)+Xo.eraseDown),this.output=void 0}_start(t){t.style&&(this.frames=this.getFrames(t)),this._reset(),this.spinner&&clearInterval(this.spinner),this._render(),this.spinner=setInterval(i=>this._render.bind(this)(i),process.platform==="win32"?500:100,"spinner"),this.spinner.unref()}_stop(t){this.task&&(this.task.status=t),this.spinner&&clearInterval(this.spinner),this._render(),this.output=void 0}getFrames(t){return t?.style?eh.default[t.style].frames:eh.default[process.platform==="win32"?"line":"dots2"].frames}};Ye.default=Vo});var qn=E(at=>{"use strict";y();var Yo=at&&at.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(at,"__esModule",{value:!0});at.config=at.Config=void 0;var Aw=Yo(Ve()),_w=Yo(Ql()),Fw=Yo(th()),rh=global,Nt=rh.ux||(rh.ux={}),kw=!!process.stderr.isTTY&&!process.env.CI&&!["dumb","emacs-color"].includes(process.env.TERM)&&"spinner"||"simple",Tw=kw==="spinner"?Fw.default:_w.default,$n=class{action=new Tw;errorsHandled=!1;outputLevel="info";showStackTrace=!0;get context(){return Nt.context||{}}set context(t){Nt.context=t}get debug(){return Nt.debug||process.env.DEBUG==="*"}set debug(t){Nt.debug=t}};at.Config=$n;function Ow(){let t=Aw.default.getInstance().get("@oclif/core")?.version.split(".")[0]||"unknown";return Nt[t]||(Nt[t]=new $n),Nt[t]}at.config=Ow();at.default=at.config});var Hn=E(Un=>{"use strict";y();Object.defineProperty(Un,"__esModule",{value:!0});Un.flush=void 0;var Pw=$e();function Iw(e,t){function r(i,n=!1){return new Promise(o=>{let s=setTimeout(()=>o(null),i);n&&s.unref()})}return Promise.race([e,r(t,!0).then(()=>(0,Pw.error)("timed out"))])}async function Nw(){let e=new Promise(r=>{process.stdout.once("drain",()=>r(null))});if(!process.stdout.write(""))return e}async function Mw(e=1e4){await Iw(Nw(),e)}Un.flush=Mw});var sh=E((TO,nh)=>{"use strict";y();var Mt=process.stdin,ut=process.stderr,zn={hide:(e,t={})=>zn.raw(e,!1,t),mask:(e,t={})=>zn.raw(e,!0,t),raw:(e,t,r={})=>!Mt.setRawMode||process.env.TERM==="dumb"?zn.notty(e):new Promise(function(i,n){let o=lo(),s="";ut.write(o.eraseLine),ut.write(o.cursorLeft),ut.write(e),Mt.resume(),Mt.setRawMode(!0);function c(){t?ut.write(o.cursorHide+o.cursorLeft+e+s.replace(/./g,"*")+`
76
76
  `+o.cursorShow):ut.write(`
77
77
  `),Mt.removeListener("data",p),Mt.setRawMode(!1),Mt.pause()}function h(){r.required&&s.length===0||(c(),s=s.replace(/\r$/,""),s=s||r.default,i(s))}function g(){n(new Error("SIGINT")),c()}function d(){s.length!==0&&(s=s.substr(0,s.length-1),ut.write(o.cursorBackward(1)),ut.write(o.eraseEndLine))}function f(a){s+=a,ut.write(t?a:"*".repeat(a.length))}let p=function(a){switch(a){case"":case"\r":case`
78
- `:return h();case"":return g();default:return a.charCodeAt(0)===127?d():f(a)}};Mt.on("data",p)}),notty:e=>new Promise((t,r)=>{let i=uy();ut.write(e);let n=i.sync("sh",["-c","read -s PASS && echo $PASS"],{stdio:["inherit","pipe","inherit"],encoding:"utf8"});if(ut.write(`
78
+ `:return h();case"":return g();default:return a.charCodeAt(0)===127?d():f(a)}};Mt.on("data",p)}),notty:e=>new Promise((t,r)=>{let i=cy();ut.write(e);let n=i.sync("sh",["-c","read -s PASS && echo $PASS"],{stdio:["inherit","pipe","inherit"],encoding:"utf8"});if(ut.write(`
79
79
  `),n.error)return r(n.error);t(n.stdout.trim())})};function ih(e,t={}){return t=Object.assign({method:"mask",required:t.default===void 0,default:""},t),Mt.setEncoding("utf8"),zn[t.method](e,t).then(r=>r||(t.required?ih(e):""))}nh.exports=ih});var hh=E(ve=>{"use strict";y();var jw=ve&&ve.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),Bw=ve&&ve.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Rw=ve&&ve.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&jw(t,e,r);return Bw(t,e),t},Lw=ve&&ve.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ve,"__esModule",{value:!0});ve.anykey=ve.confirm=ve.prompt=void 0;var Si=Lw(Be()),oh=Rw($e()),uh=qn();function Ko(e,t=100){if(t<0)throw new Error("no input");return new Promise((r,i)=>{let n;e.timeout&&(n=setTimeout(()=>{process.stdin.pause(),i(new Error("Prompt timeout"))},e.timeout),n.unref()),process.stdin.setEncoding("utf8"),process.stderr.write(e.prompt),process.stdin.resume(),process.stdin.once("data",o=>{n&&clearTimeout(n),process.stdin.pause();let s=(typeof o=="string"?o:o.toString()).trim();!e.default&&e.required&&s===""?r(Ko(e,t-1)):r(s||e.default)})})}function ah(e,t,r){let i="> ";return r&&t==="hide"&&(r="*".repeat(r.length)),e&&r?i=e+" "+Si.default.yellow("["+r+"]")+": ":e&&(i=`${e}: `),i}async function $w(e){let t=process.stdin.isRaw;process.stdin.setRawMode&&process.stdin.setRawMode(!0),e.required=e.required??!1;let r=await Ko(e);return process.stdin.setRawMode&&process.stdin.setRawMode(!!t),r}function qw(e){let t=lo();process.stderr.write(t.cursorHide+t.cursorUp(1)+t.cursorLeft+e+t.cursorDown(1)+t.cursorLeft+t.cursorShow)}async function ch(e,t={}){let r=ah(e,t.type,t.default),i={default:"",isTTY:!!(process.env.TERM!=="dumb"&&process.stdin.isTTY),name:e,prompt:r,required:!0,type:"normal",...t},n=sh();switch(i.type){case"normal":return Ko(i);case"single":return $w(i);case"mask":return n(i.prompt,{default:i.default,method:i.type,required:i.required}).then(o=>(qw(ah(e,"hide",t.default)),o));case"hide":return n(i.prompt,{default:i.default,method:i.type,required:i.required});default:throw new Error(`unexpected type ${i.type}`)}}async function lh(e,t={}){return uh.config.action.pauseAsync(()=>ch(e,t),Si.default.cyan("?"))}ve.prompt=lh;function Uw(e){return uh.config.action.pauseAsync(async()=>{let t=async()=>{let i=(await ch(e)).toLowerCase();return["n","no"].includes(i)?!1:["y","yes"].includes(i)?!0:t()};return t()},Si.default.cyan("?"))}ve.confirm=Uw;async function Hw(e){let t=!!process.stdin.setRawMode;e||(e=t?`Press any key to continue or ${Si.default.yellow("q")} to exit`:`Press enter to continue or ${Si.default.yellow("q")} to exit`);let r=await lh(e,{required:!1,type:"single"});return t&&process.stderr.write(`
80
80
  `),r==="q"&&oh.error("quit"),r===""&&oh.error("ctrl-c"),r}ve.anykey=Hw});var dh=E(Ai=>{"use strict";y();var zw=Ai&&Ai.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ai,"__esModule",{value:!0});var Jw=zw(Be()),fh=F("node:util");function Ww(e,t){let r=[],i=Object.keys(e).map(c=>c.toString().length),n=Math.max(...i)+2;function o(c){return typeof c=="string"||typeof c=="number"?c:typeof c=="object"?Object.keys(c).map(h=>h+": "+(0,fh.inspect)(c[h])).join(", "):(0,fh.inspect)(c)}let s=(c,h)=>`${Jw.default.blue(c)}:`+" ".repeat(n-c.length-1)+o(h);for(let c of t||Object.keys(e).sort()){let h=e[c];if(Array.isArray(h)){if(h.length>0){r.push(s(c,h[0]));for(let g of h.slice(1))r.push(" ".repeat(n)+o(g))}}else h!=null&&r.push(s(c,h))}return r.join(`
81
81
  `)}Ai.default=Ww});var mh=E((jO,ph)=>{y();var Qo=class{constructor(t,r,i){this.etaBufferLength=t||100,this.valueBuffer=[i],this.timeBuffer=[r],this.eta="0"}update(t,r,i){this.valueBuffer.push(r),this.timeBuffer.push(t),this.calculate(i-r)}getTime(){return this.eta}calculate(t){let r=this.valueBuffer.length,i=Math.min(this.etaBufferLength,r),n=this.valueBuffer[r-1]-this.valueBuffer[r-i],o=this.timeBuffer[r-1]-this.timeBuffer[r-i],s=n/o;this.valueBuffer=this.valueBuffer.slice(-this.etaBufferLength),this.timeBuffer=this.timeBuffer.slice(-this.etaBufferLength);let c=Math.ceil(t/s/1e3);isNaN(c)?this.eta="NULL":isFinite(c)?c>1e7?this.eta="INF":c<0?this.eta=0:this.eta=c:this.eta="INF"}};ph.exports=Qo});var ea=E((RO,gh)=>{y();var rr=F("readline"),Zo=class{constructor(t){this.stream=t,this.linewrap=!0,this.dy=0}cursorSave(){this.stream.isTTY&&this.stream.write("\x1B7")}cursorRestore(){this.stream.isTTY&&this.stream.write("\x1B8")}cursor(t){this.stream.isTTY&&(t?this.stream.write("\x1B[?25h"):this.stream.write("\x1B[?25l"))}cursorTo(t=null,r=null){this.stream.isTTY&&rr.cursorTo(this.stream,t,r)}cursorRelative(t=null,r=null){this.stream.isTTY&&(this.dy=this.dy+r,rr.moveCursor(this.stream,t,r))}cursorRelativeReset(){this.stream.isTTY&&(rr.moveCursor(this.stream,0,-this.dy),rr.cursorTo(this.stream,0,null),this.dy=0)}clearRight(){this.stream.isTTY&&rr.clearLine(this.stream,1)}clearLine(){this.stream.isTTY&&rr.clearLine(this.stream,0)}clearBottom(){this.stream.isTTY&&rr.clearScreenDown(this.stream)}newline(){this.stream.write(`
@@ -108,7 +108,7 @@ ${i.message}`)}return Mn}fe.loadHelpClass=Qx});var jn=E(Le=>{"use strict";y();va
108
108
  `+e.slice(n,o),n=o+1),s=c;return h+=`
109
109
  `,e.length-n>t&&s>n?h+=e.slice(n,s)+`
110
110
  `+e.slice(s+1):h+=e.slice(n),h.slice(1)}function qD(e){for(var t="",r,i,n,o=0;o<e.length;o++){if(r=e.charCodeAt(o),r>=55296&&r<=56319&&(i=e.charCodeAt(o+1),i>=56320&&i<=57343)){t+=ad((r-55296)*1024+i-56320+65536),o++;continue}n=xe[r],t+=!n&&Gr(r)?e[o]:n||ad(r)}return t}function UD(e,t,r){var i="",n=e.tag,o,s;for(o=0,s=r.length;o<s;o+=1)cr(e,t,r[o],!1,!1)&&(o!==0&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=n,e.dump="["+i+"]"}function HD(e,t,r,i){var n="",o=e.tag,s,c;for(s=0,c=r.length;s<c;s+=1)cr(e,t+1,r[s],!0,!0)&&((!i||s!==0)&&(n+=ma(e,t)),e.dump&&Ti===e.dump.charCodeAt(0)?n+="-":n+="- ",n+=e.dump);e.tag=o,e.dump=n||"[]"}function zD(e,t,r){var i="",n=e.tag,o=Object.keys(r),s,c,h,g,d;for(s=0,c=o.length;s<c;s+=1)d="",s!==0&&(d+=", "),e.condenseFlow&&(d+='"'),h=o[s],g=r[h],cr(e,t,h,!1,!1)&&(e.dump.length>1024&&(d+="? "),d+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),cr(e,t,g,!1,!1)&&(d+=e.dump,i+=d));e.tag=n,e.dump="{"+i+"}"}function JD(e,t,r,i){var n="",o=e.tag,s=Object.keys(r),c,h,g,d,f,p;if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys=="function")s.sort(e.sortKeys);else if(e.sortKeys)throw new Pi("sortKeys must be a boolean or a function");for(c=0,h=s.length;c<h;c+=1)p="",(!i||c!==0)&&(p+=ma(e,t)),g=s[c],d=r[g],cr(e,t+1,g,!0,!0,!0)&&(f=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,f&&(e.dump&&Ti===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,f&&(p+=ma(e,t)),cr(e,t+1,d,!0,f)&&(e.dump&&Ti===e.dump.charCodeAt(0)?p+=":":p+=": ",p+=e.dump,n+=p));e.tag=o,e.dump=n||"{}"}function dd(e,t,r){var i,n,o,s,c,h;for(n=r?e.explicitTypes:e.implicitTypes,o=0,s=n.length;o<s;o+=1)if(c=n[o],(c.instanceOf||c.predicate)&&(!c.instanceOf||typeof t=="object"&&t instanceof c.instanceOf)&&(!c.predicate||c.predicate(t))){if(e.tag=r?c.tag:"?",c.represent){if(h=e.styleMap[c.tag]||c.defaultStyle,pd.call(c.represent)==="[object Function]")i=c.represent(t,h);else if(md.call(c.represent,h))i=c.represent[h](t,h);else throw new Pi("!<"+c.tag+'> tag resolver accepts not "'+h+'" style');e.dump=i}return!0}return!1}function cr(e,t,r,i,n,o){e.tag=null,e.dump=r,dd(e,r,!1)||dd(e,r,!0);var s=pd.call(e.dump);i&&(i=e.flowLevel<0||e.flowLevel>t);var c=s==="[object Object]"||s==="[object Array]",h,g;if(c&&(h=e.duplicates.indexOf(r),g=h!==-1),(e.tag!==null&&e.tag!=="?"||g||e.indent!==2&&t>0)&&(n=!1),g&&e.usedDuplicates[h])e.dump="*ref_"+h;else{if(c&&g&&!e.usedDuplicates[h]&&(e.usedDuplicates[h]=!0),s==="[object Object]")i&&Object.keys(e.dump).length!==0?(JD(e,t,e.dump,n),g&&(e.dump="&ref_"+h+e.dump)):(zD(e,t,e.dump),g&&(e.dump="&ref_"+h+" "+e.dump));else if(s==="[object Array]"){var d=e.noArrayIndent&&t>0?t-1:t;i&&e.dump.length!==0?(HD(e,d,e.dump,n),g&&(e.dump="&ref_"+h+e.dump)):(UD(e,d,e.dump),g&&(e.dump="&ref_"+h+" "+e.dump))}else if(s==="[object String]")e.tag!=="?"&&LD(e,e.dump,t,o);else{if(e.skipInvalid)return!1;throw new Pi("unacceptable kind of an object to dump "+s)}e.tag!==null&&e.tag!=="?"&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function WD(e,t){var r=[],i=[],n,o;for(ga(e,r,i),n=0,o=i.length;n<o;n+=1)t.duplicates.push(r[i[n]]);t.usedDuplicates=new Array(o)}function ga(e,t,r){var i,n,o;if(e!==null&&typeof e=="object")if(n=t.indexOf(e),n!==-1)r.indexOf(n)===-1&&r.push(n);else if(t.push(e),Array.isArray(e))for(n=0,o=e.length;n<o;n+=1)ga(e[n],t,r);else for(i=Object.keys(e),n=0,o=i.length;n<o;n+=1)ga(e[i[n]],t,r)}function Fd(e,t){t=t||{};var r=new ND(t);return r.noRefs||WD(e,r),cr(r,0,e,!0,!0)?r.dump+`
111
- `:""}function GD(e,t){return Fd(e,Oi.extend({schema:mD},t))}va.exports.dump=Fd;va.exports.safeDump=GD});var Od=E((D2,K)=>{"use strict";y();var es=od(),Td=kd();function ts(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}K.exports.Type=ce();K.exports.Schema=sr();K.exports.FAILSAFE_SCHEMA=Gn();K.exports.JSON_SCHEMA=ca();K.exports.CORE_SCHEMA=la();K.exports.DEFAULT_SAFE_SCHEMA=Hr();K.exports.DEFAULT_FULL_SCHEMA=Fi();K.exports.load=es.load;K.exports.loadAll=es.loadAll;K.exports.safeLoad=es.safeLoad;K.exports.safeLoadAll=es.safeLoadAll;K.exports.dump=Td.dump;K.exports.safeDump=Td.safeDump;K.exports.YAMLException=qr();K.exports.MINIMAL_SCHEMA=Gn();K.exports.SAFE_SCHEMA=Hr();K.exports.DEFAULT_SCHEMA=Fi();K.exports.scan=ts("scan");K.exports.parse=ts("parse");K.exports.compose=ts("compose");K.exports.addConstructor=ts("addConstructor")});var Id=E((S2,Pd)=>{"use strict";y();var XD=Od();Pd.exports=XD});var qd=E(rs=>{"use strict";y();Object.defineProperty(rs,"__esModule",{value:!0});var Bd=function(t,r){return t<r?-1:t>r?1:0},VD=/(^0x[\da-fA-F]+$|^([+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?(?!\.\d+)(?=\D|\s|$))|\d+)/g,Rd=/^\s+|\s+$/g,YD=/\s+/g,KD=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/,QD=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[/-]\d{1,4}[/-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,ZD=/^0+[1-9]{1}[0-9]*$/,eC=/[^\x00-\x80]/,tC=function(t,r){var i=t.localeCompare(r);return i?i/Math.abs(i):0},Nd=function(t,r){return t<r?-1:t>r?1:0},rC=function(t,r){for(var i=t.length,n=r.length,o=Math.min(i,n),s=0;s<o;s++){var c=t[s],h=r[s];if(c.normalizedString!==h.normalizedString){if(c.normalizedString===""!=(h.normalizedString===""))return c.normalizedString===""?-1:1;if(c.parsedNumber!==void 0&&h.parsedNumber!==void 0){var g=Bd(c.parsedNumber,h.parsedNumber);return g===0?Nd(c.normalizedString,h.normalizedString):g}else return c.parsedNumber!==void 0||h.parsedNumber!==void 0?c.parsedNumber!==void 0?-1:1:eC.test(c.normalizedString+h.normalizedString)&&c.normalizedString.localeCompare?tC(c.normalizedString,h.normalizedString):Nd(c.normalizedString,h.normalizedString)}}return i>o||n>o?i<=o?-1:1:0},iC=function(t,r){return(t.chunks?!r.chunks:r.chunks)?t.chunks?-1:1:(t.isNaN?!r.isNaN:r.isNaN)?t.isNaN?-1:1:(t.isSymbol?!r.isSymbol:r.isSymbol)?t.isSymbol?-1:1:(t.isObject?!r.isObject:r.isObject)?t.isObject?-1:1:(t.isArray?!r.isArray:r.isArray)?t.isArray?-1:1:(t.isFunction?!r.isFunction:r.isFunction)?t.isFunction?-1:1:(t.isNull?!r.isNull:r.isNull)?t.isNull?-1:1:0},Ld=function(t,r){return t.value===r.value?0:t.parsedNumber!==void 0&&r.parsedNumber!==void 0?Bd(t.parsedNumber,r.parsedNumber):t.chunks&&r.chunks?rC(t.chunks,r.chunks):iC(t,r)},nC=function(t,r,i){for(var n=t.index,o=t.values,s=r.index,c=r.values,h=o.length,g=i.length,d=0;d<h;d++){var f=d<g?i[d]:null;if(f&&typeof f=="function"){var p=f(o[d].value,c[d].value);if(p)return p}else{var a=Ld(o[d],c[d]);if(a)return a*(f==="desc"?-1:1)}}return n-s},sC=function(t){return typeof t=="function"?t:function(r){if(Array.isArray(r)){var i=Number(t);if(Number.isInteger(i))return r[i]}else if(r&&typeof r=="object"&&typeof t!="function")return r[t];return r}},oC=function(t){return typeof t=="boolean"||t instanceof Boolean?Number(t).toString():typeof t=="number"||t instanceof Number?t.toString():t instanceof Date?t.getTime().toString():typeof t=="string"||t instanceof String?t.toLowerCase().replace(Rd,""):""},$d=function(t){if(t.length!==0){var r=Number(t);if(!Number.isNaN(r))return r}},aC=function(t){if(QD.test(t)){var r=Date.parse(t);if(!Number.isNaN(r))return r}},uC=function(t){var r=$d(t);return r!==void 0?r:aC(t)},cC=function(t){return t.replace(VD,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0")},lC=function(t){return t.replace(YD," ").replace(Rd,"")},hC=function(t,r,i){if(KD.test(t)&&(!ZD.test(t)||r===0||i[r-1]!=="."))return $d(t)||0},fC=function(t,r,i){return{parsedNumber:hC(t,r,i),normalizedString:lC(t)}},dC=function(t){var r=cC(t).map(fC);return r},pC=function(t){return typeof t=="function"},Md=function(t){return Number.isNaN(t)||t instanceof Number&&Number.isNaN(t.valueOf())},mC=function(t){return t===null},gC=function(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&!(t instanceof Number)&&!(t instanceof String)&&!(t instanceof Boolean)&&!(t instanceof Date)},yC=function(t){return typeof t=="symbol"},vC=function(t){return t===void 0},xa=function(t){if(typeof t=="string"||t instanceof String||(typeof t=="number"||t instanceof Number)&&!Md(t)||typeof t=="boolean"||t instanceof Boolean||t instanceof Date){var r=oC(t),i=uC(r),n=dC(i?""+i:r);return{parsedNumber:i,chunks:n,value:t}}return{isArray:Array.isArray(t),isFunction:pC(t),isNaN:Md(t),isNull:mC(t),isObject:gC(t),isSymbol:yC(t),isUndefined:vC(t),value:t}},xC=function(t,r){return r(t)},wC=function(t,r){return t[r]},EC=function(t,r,i){var n=r.length?r.map(sC):[function(s){return s}],o=t.map(function(s,c){var h=n.map(function(g){return xC(s,g)}).map(xa);return{index:c,values:h}});return o.sort(function(s,c){return nC(s,c,i)}),o.map(function(s){return wC(t,s.index)})},bC=function(t){if(!t)return[];var r=Array.isArray(t)?[].concat(t):[t];return r.some(function(i){return typeof i!="string"&&typeof i!="number"&&typeof i!="function"})?[]:r},DC=function(t){if(!t)return[];var r=Array.isArray(t)?[].concat(t):[t];return r.some(function(i){return i!=="asc"&&i!=="desc"&&typeof i!="function"})?[]:r};function CC(e,t,r){if(!e||!Array.isArray(e))return[];var i=bC(t),n=DC(r);return EC(e,i,n)}var SC=function(t){return function(r,i){var n=xa(r),o=xa(i),s=Ld(n,o);return s*(t.order==="desc"?-1:1)}},jd=function(t){return typeof t=="string"&&(t==="asc"||t==="desc")},AC=function(t){var r="asc";return typeof t=="string"&&jd(t)?r=t:t&&typeof t=="object"&&t.order&&jd(t.order)&&(r=t.order),{order:r}};function _C(e){var t=AC(e);return SC(t)}rs.orderBy=CC;rs.compare=_C});var zd=E((k2,Hd)=>{"use strict";y();var Ud="[\uD800-\uDBFF][\uDC00-\uDFFF]",FC=e=>e&&e.exact?new RegExp(`^${Ud}$`):new RegExp(Ud,"g");Hd.exports=FC});var Vd=E((O2,Xd)=>{"use strict";y();var kC=ey(),TC=zd(),Jd=xc(),Gd=["\x1B","\x9B"],is=e=>`${Gd[0]}[${e}m`,Wd=(e,t,r)=>{let i=[];e=[...e];for(let n of e){let o=n;n.includes(";")&&(n=n.split(";")[0][0]+"0");let s=Jd.codes.get(Number.parseInt(n,10));if(s){let c=e.indexOf(s.toString());c===-1?i.push(is(t?s:o)):e.splice(c,1)}else if(t){i.push(is(0));break}else i.push(is(o))}if(t&&(i=i.filter((n,o)=>i.indexOf(n)===o),r!==void 0)){let n=is(Jd.codes.get(Number.parseInt(r,10)));i=i.reduce((o,s)=>s===n?[s,...o]:[...o,s],[])}return i.join("")};Xd.exports=(e,t,r)=>{let i=[...e],n=[],o=typeof r=="number"?r:i.length,s=!1,c,h=0,g="";for(let[d,f]of i.entries()){let p=!1;if(Gd.includes(f)){let a=/\d[^m]*/.exec(e.slice(d,d+18));c=a&&a.length>0?a[0]:void 0,h<o&&(s=!0,c!==void 0&&n.push(c))}else s&&f==="m"&&(s=!1,p=!0);if(!s&&!p&&h++,!TC({exact:!0}).test(f)&&kC(f.codePointAt())&&(h++,typeof r!="number"&&o++),h>t&&h<=o)g+=f;else if(h===t&&!s&&c!==void 0)g=Wd(n);else if(h>=o){g+=Wd(n,!0,c);break}}return g}});var ss=E(Q=>{"use strict";y();Object.defineProperty(Q,"__esModule",{value:!0});Q.option=Q.help=Q.version=Q.string=Q.url=Q.file=Q.directory=Q.integer=Q.boolean=Q.custom=void 0;var OC=F("node:url"),ns=$e(),PC=Ci(),Yd=yt();function Xr(e){return(t={})=>({parse:async(r,i,n)=>r,...e,...t,input:[],multiple:!!(t.multiple===void 0?e?.multiple??!1:t.multiple),type:"option"})}Q.custom=Xr;function wa(e={}){return{parse:async(t,r)=>t,...e,allowNo:!!e.allowNo,type:"boolean"}}Q.boolean=wa;Q.integer=Xr({async parse(e,t,r){if(!/^-?\d+$/.test(e))throw new ns.CLIError(`Expected an integer but received: ${e}`);let i=Number.parseInt(e,10);if(r.min!==void 0&&i<r.min)throw new ns.CLIError(`Expected an integer greater than or equal to ${r.min} but received: ${e}`);if(r.max!==void 0&&i>r.max)throw new ns.CLIError(`Expected an integer less than or equal to ${r.max} but received: ${e}`);return i}});Q.directory=Xr({async parse(e,t,r){return r.exists?(0,Yd.dirExists)(e):e}});Q.file=Xr({async parse(e,t,r){return r.exists?(0,Yd.fileExists)(e):e}});Q.url=Xr({async parse(e){try{return new OC.URL(e)}catch{throw new ns.CLIError(`Expected a valid url but received: ${e}`)}}});Q.string=Xr();var IC=(e={})=>wa({description:"Show CLI version.",...e,async parse(t,r){r.log(r.config.userAgent),r.exit(0)}});Q.version=IC;var NC=(e={})=>wa({description:"Show CLI help.",...e,async parse(t,r){let i=await(0,PC.loadHelpClass)(r.config);await new i(r.config,r.config.pjson.oclif.helpOptions??r.config.pjson.helpOptions).showHelp(r.id?[r.id,...r.argv]:r.argv),r.exit(0)}});Q.help=NC;function MC(e){return(t={})=>({parse:async(r,i,n)=>r,...e,...t,input:[],multiple:!!(t.multiple===void 0?e.multiple:t.multiple),type:"option"})}Q.option=MC});var Qd=E(Ne=>{"use strict";y();var jC=Ne&&Ne.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),BC=Ne&&Ne.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),RC=Ne&&Ne.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&jC(t,e,r);return BC(t,e),t},os=Ne&&Ne.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ne,"__esModule",{value:!0});Ne.table=void 0;var Kd=os(Be()),LC=Id(),$C=qd(),qC=F("node:util"),UC=os(Vd()),lr=os(uo()),Rt=RC(ss()),HC=Yt(),Ea=oe(),zC=os(Ot()),ba=class{data;columns;options;constructor(t,r,i={}){this.data=t,this.columns=Object.keys(r).map(p=>{let a=r[p],u=a.extended??!1,l=a.get??(x=>x[p]??""),m=typeof a.header=="string"?a.header:(0,Ea.capitalize)(p.replaceAll("_"," ")),v=Math.max(a.minWidth??0,(0,lr.default)(m)+1);return{extended:u,get:l,header:m,key:p,minWidth:v}});let{columns:n,csv:o,extended:s,filter:c,output:h,printLine:g,sort:d,title:f}=i;this.options={columns:n,extended:s,filter:c,"no-header":i["no-header"]??!1,"no-truncate":i["no-truncate"]??!1,output:o?"csv":h,printLine:g??(p=>zC.default.stdout(p+`
111
+ `:""}function GD(e,t){return Fd(e,Oi.extend({schema:mD},t))}va.exports.dump=Fd;va.exports.safeDump=GD});var Od=E((D2,K)=>{"use strict";y();var es=od(),Td=kd();function ts(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}K.exports.Type=ce();K.exports.Schema=sr();K.exports.FAILSAFE_SCHEMA=Gn();K.exports.JSON_SCHEMA=ca();K.exports.CORE_SCHEMA=la();K.exports.DEFAULT_SAFE_SCHEMA=Hr();K.exports.DEFAULT_FULL_SCHEMA=Fi();K.exports.load=es.load;K.exports.loadAll=es.loadAll;K.exports.safeLoad=es.safeLoad;K.exports.safeLoadAll=es.safeLoadAll;K.exports.dump=Td.dump;K.exports.safeDump=Td.safeDump;K.exports.YAMLException=qr();K.exports.MINIMAL_SCHEMA=Gn();K.exports.SAFE_SCHEMA=Hr();K.exports.DEFAULT_SCHEMA=Fi();K.exports.scan=ts("scan");K.exports.parse=ts("parse");K.exports.compose=ts("compose");K.exports.addConstructor=ts("addConstructor")});var Id=E((S2,Pd)=>{"use strict";y();var XD=Od();Pd.exports=XD});var qd=E(rs=>{"use strict";y();Object.defineProperty(rs,"__esModule",{value:!0});var Bd=function(t,r){return t<r?-1:t>r?1:0},VD=/(^0x[\da-fA-F]+$|^([+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?(?!\.\d+)(?=\D|\s|$))|\d+)/g,Rd=/^\s+|\s+$/g,YD=/\s+/g,KD=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/,QD=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[/-]\d{1,4}[/-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,ZD=/^0+[1-9]{1}[0-9]*$/,eC=/[^\x00-\x80]/,tC=function(t,r){var i=t.localeCompare(r);return i?i/Math.abs(i):0},Nd=function(t,r){return t<r?-1:t>r?1:0},rC=function(t,r){for(var i=t.length,n=r.length,o=Math.min(i,n),s=0;s<o;s++){var c=t[s],h=r[s];if(c.normalizedString!==h.normalizedString){if(c.normalizedString===""!=(h.normalizedString===""))return c.normalizedString===""?-1:1;if(c.parsedNumber!==void 0&&h.parsedNumber!==void 0){var g=Bd(c.parsedNumber,h.parsedNumber);return g===0?Nd(c.normalizedString,h.normalizedString):g}else return c.parsedNumber!==void 0||h.parsedNumber!==void 0?c.parsedNumber!==void 0?-1:1:eC.test(c.normalizedString+h.normalizedString)&&c.normalizedString.localeCompare?tC(c.normalizedString,h.normalizedString):Nd(c.normalizedString,h.normalizedString)}}return i>o||n>o?i<=o?-1:1:0},iC=function(t,r){return(t.chunks?!r.chunks:r.chunks)?t.chunks?-1:1:(t.isNaN?!r.isNaN:r.isNaN)?t.isNaN?-1:1:(t.isSymbol?!r.isSymbol:r.isSymbol)?t.isSymbol?-1:1:(t.isObject?!r.isObject:r.isObject)?t.isObject?-1:1:(t.isArray?!r.isArray:r.isArray)?t.isArray?-1:1:(t.isFunction?!r.isFunction:r.isFunction)?t.isFunction?-1:1:(t.isNull?!r.isNull:r.isNull)?t.isNull?-1:1:0},Ld=function(t,r){return t.value===r.value?0:t.parsedNumber!==void 0&&r.parsedNumber!==void 0?Bd(t.parsedNumber,r.parsedNumber):t.chunks&&r.chunks?rC(t.chunks,r.chunks):iC(t,r)},nC=function(t,r,i){for(var n=t.index,o=t.values,s=r.index,c=r.values,h=o.length,g=i.length,d=0;d<h;d++){var f=d<g?i[d]:null;if(f&&typeof f=="function"){var p=f(o[d].value,c[d].value);if(p)return p}else{var a=Ld(o[d],c[d]);if(a)return a*(f==="desc"?-1:1)}}return n-s},sC=function(t){return typeof t=="function"?t:function(r){if(Array.isArray(r)){var i=Number(t);if(Number.isInteger(i))return r[i]}else if(r&&typeof r=="object"&&typeof t!="function")return r[t];return r}},oC=function(t){return typeof t=="boolean"||t instanceof Boolean?Number(t).toString():typeof t=="number"||t instanceof Number?t.toString():t instanceof Date?t.getTime().toString():typeof t=="string"||t instanceof String?t.toLowerCase().replace(Rd,""):""},$d=function(t){if(t.length!==0){var r=Number(t);if(!Number.isNaN(r))return r}},aC=function(t){if(QD.test(t)){var r=Date.parse(t);if(!Number.isNaN(r))return r}},uC=function(t){var r=$d(t);return r!==void 0?r:aC(t)},cC=function(t){return t.replace(VD,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0")},lC=function(t){return t.replace(YD," ").replace(Rd,"")},hC=function(t,r,i){if(KD.test(t)&&(!ZD.test(t)||r===0||i[r-1]!=="."))return $d(t)||0},fC=function(t,r,i){return{parsedNumber:hC(t,r,i),normalizedString:lC(t)}},dC=function(t){var r=cC(t).map(fC);return r},pC=function(t){return typeof t=="function"},Md=function(t){return Number.isNaN(t)||t instanceof Number&&Number.isNaN(t.valueOf())},mC=function(t){return t===null},gC=function(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&!(t instanceof Number)&&!(t instanceof String)&&!(t instanceof Boolean)&&!(t instanceof Date)},yC=function(t){return typeof t=="symbol"},vC=function(t){return t===void 0},xa=function(t){if(typeof t=="string"||t instanceof String||(typeof t=="number"||t instanceof Number)&&!Md(t)||typeof t=="boolean"||t instanceof Boolean||t instanceof Date){var r=oC(t),i=uC(r),n=dC(i?""+i:r);return{parsedNumber:i,chunks:n,value:t}}return{isArray:Array.isArray(t),isFunction:pC(t),isNaN:Md(t),isNull:mC(t),isObject:gC(t),isSymbol:yC(t),isUndefined:vC(t),value:t}},xC=function(t,r){return r(t)},wC=function(t,r){return t[r]},EC=function(t,r,i){var n=r.length?r.map(sC):[function(s){return s}],o=t.map(function(s,c){var h=n.map(function(g){return xC(s,g)}).map(xa);return{index:c,values:h}});return o.sort(function(s,c){return nC(s,c,i)}),o.map(function(s){return wC(t,s.index)})},bC=function(t){if(!t)return[];var r=Array.isArray(t)?[].concat(t):[t];return r.some(function(i){return typeof i!="string"&&typeof i!="number"&&typeof i!="function"})?[]:r},DC=function(t){if(!t)return[];var r=Array.isArray(t)?[].concat(t):[t];return r.some(function(i){return i!=="asc"&&i!=="desc"&&typeof i!="function"})?[]:r};function CC(e,t,r){if(!e||!Array.isArray(e))return[];var i=bC(t),n=DC(r);return EC(e,i,n)}var SC=function(t){return function(r,i){var n=xa(r),o=xa(i),s=Ld(n,o);return s*(t.order==="desc"?-1:1)}},jd=function(t){return typeof t=="string"&&(t==="asc"||t==="desc")},AC=function(t){var r="asc";return typeof t=="string"&&jd(t)?r=t:t&&typeof t=="object"&&t.order&&jd(t.order)&&(r=t.order),{order:r}};function _C(e){var t=AC(e);return SC(t)}rs.orderBy=CC;rs.compare=_C});var zd=E((k2,Hd)=>{"use strict";y();var Ud="[\uD800-\uDBFF][\uDC00-\uDFFF]",FC=e=>e&&e.exact?new RegExp(`^${Ud}$`):new RegExp(Ud,"g");Hd.exports=FC});var Vd=E((O2,Xd)=>{"use strict";y();var kC=ty(),TC=zd(),Jd=xc(),Gd=["\x1B","\x9B"],is=e=>`${Gd[0]}[${e}m`,Wd=(e,t,r)=>{let i=[];e=[...e];for(let n of e){let o=n;n.includes(";")&&(n=n.split(";")[0][0]+"0");let s=Jd.codes.get(Number.parseInt(n,10));if(s){let c=e.indexOf(s.toString());c===-1?i.push(is(t?s:o)):e.splice(c,1)}else if(t){i.push(is(0));break}else i.push(is(o))}if(t&&(i=i.filter((n,o)=>i.indexOf(n)===o),r!==void 0)){let n=is(Jd.codes.get(Number.parseInt(r,10)));i=i.reduce((o,s)=>s===n?[s,...o]:[...o,s],[])}return i.join("")};Xd.exports=(e,t,r)=>{let i=[...e],n=[],o=typeof r=="number"?r:i.length,s=!1,c,h=0,g="";for(let[d,f]of i.entries()){let p=!1;if(Gd.includes(f)){let a=/\d[^m]*/.exec(e.slice(d,d+18));c=a&&a.length>0?a[0]:void 0,h<o&&(s=!0,c!==void 0&&n.push(c))}else s&&f==="m"&&(s=!1,p=!0);if(!s&&!p&&h++,!TC({exact:!0}).test(f)&&kC(f.codePointAt())&&(h++,typeof r!="number"&&o++),h>t&&h<=o)g+=f;else if(h===t&&!s&&c!==void 0)g=Wd(n);else if(h>=o){g+=Wd(n,!0,c);break}}return g}});var ss=E(Q=>{"use strict";y();Object.defineProperty(Q,"__esModule",{value:!0});Q.option=Q.help=Q.version=Q.string=Q.url=Q.file=Q.directory=Q.integer=Q.boolean=Q.custom=void 0;var OC=F("node:url"),ns=$e(),PC=Ci(),Yd=yt();function Xr(e){return(t={})=>({parse:async(r,i,n)=>r,...e,...t,input:[],multiple:!!(t.multiple===void 0?e?.multiple??!1:t.multiple),type:"option"})}Q.custom=Xr;function wa(e={}){return{parse:async(t,r)=>t,...e,allowNo:!!e.allowNo,type:"boolean"}}Q.boolean=wa;Q.integer=Xr({async parse(e,t,r){if(!/^-?\d+$/.test(e))throw new ns.CLIError(`Expected an integer but received: ${e}`);let i=Number.parseInt(e,10);if(r.min!==void 0&&i<r.min)throw new ns.CLIError(`Expected an integer greater than or equal to ${r.min} but received: ${e}`);if(r.max!==void 0&&i>r.max)throw new ns.CLIError(`Expected an integer less than or equal to ${r.max} but received: ${e}`);return i}});Q.directory=Xr({async parse(e,t,r){return r.exists?(0,Yd.dirExists)(e):e}});Q.file=Xr({async parse(e,t,r){return r.exists?(0,Yd.fileExists)(e):e}});Q.url=Xr({async parse(e){try{return new OC.URL(e)}catch{throw new ns.CLIError(`Expected a valid url but received: ${e}`)}}});Q.string=Xr();var IC=(e={})=>wa({description:"Show CLI version.",...e,async parse(t,r){r.log(r.config.userAgent),r.exit(0)}});Q.version=IC;var NC=(e={})=>wa({description:"Show CLI help.",...e,async parse(t,r){let i=await(0,PC.loadHelpClass)(r.config);await new i(r.config,r.config.pjson.oclif.helpOptions??r.config.pjson.helpOptions).showHelp(r.id?[r.id,...r.argv]:r.argv),r.exit(0)}});Q.help=NC;function MC(e){return(t={})=>({parse:async(r,i,n)=>r,...e,...t,input:[],multiple:!!(t.multiple===void 0?e.multiple:t.multiple),type:"option"})}Q.option=MC});var Qd=E(Ne=>{"use strict";y();var jC=Ne&&Ne.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),BC=Ne&&Ne.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),RC=Ne&&Ne.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&jC(t,e,r);return BC(t,e),t},os=Ne&&Ne.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ne,"__esModule",{value:!0});Ne.table=void 0;var Kd=os(Be()),LC=Id(),$C=qd(),qC=F("node:util"),UC=os(Vd()),lr=os(uo()),Rt=RC(ss()),HC=Yt(),Ea=oe(),zC=os(Ot()),ba=class{data;columns;options;constructor(t,r,i={}){this.data=t,this.columns=Object.keys(r).map(p=>{let a=r[p],u=a.extended??!1,l=a.get??(x=>x[p]??""),m=typeof a.header=="string"?a.header:(0,Ea.capitalize)(p.replaceAll("_"," ")),v=Math.max(a.minWidth??0,(0,lr.default)(m)+1);return{extended:u,get:l,header:m,key:p,minWidth:v}});let{columns:n,csv:o,extended:s,filter:c,output:h,printLine:g,sort:d,title:f}=i;this.options={columns:n,extended:s,filter:c,"no-header":i["no-header"]??!1,"no-truncate":i["no-truncate"]??!1,output:o?"csv":h,printLine:g??(p=>zC.default.stdout(p+`
112
112
  `)),rowStart:" ",sort:d,title:f}}display(){let t=this.data.map(r=>{let i={};for(let n of this.columns){let o=n.get(r);typeof o!="string"&&(o=(0,qC.inspect)(o,{breakLength:Number.POSITIVE_INFINITY})),i[n.key]=o}return i});if(this.options.filter){let[r,i]=this.options.filter.split("="),n=r[0]==="-";n&&(r=r.slice(1));let o=this.findColumnFromHeader(r);if(!o||!i)throw new Error("Filter flag has an invalid value");t=t.filter(s=>{let c=new RegExp(i),g=s[o.key].match(c);return n?!g:g})}if(this.options.sort){let r=this.options.sort.split(","),i=r.map(s=>s[0]==="-"?s.slice(1):s),n=this.filterColumnsFromHeaders(i).map(s=>c=>c[s.key]),o=r.map(s=>s[0]==="-"?"desc":"asc");t=(0,$C.orderBy)(t,n,o)}if(this.options.columns){let r=this.options.columns.split(",");this.columns=this.filterColumnsFromHeaders(r)}else this.options.extended||(this.columns=this.columns.filter(r=>!r.extended));switch(this.data=t,this.options.output){case"csv":{this.outputCSV();break}case"json":{this.outputJSON();break}case"yaml":{this.outputYAML();break}default:this.outputTable()}}filterColumnsFromHeaders(t){t=[...new Set(t)];let r=[];for(let i of t){let n=this.columns.find(o=>o.header.toLowerCase()===i.toLowerCase());n&&r.push(n)}return r}findColumnFromHeader(t){return this.columns.find(r=>r.header.toLowerCase()===t.toLowerCase())}getCSVRow(t){let r=this.columns.map(n=>t[n.key]||""),i=r.find(n=>n.includes('"')||n.includes(`
113
113
  `)||n.includes(`\r
114
114
  `)||n.includes("\r")||n.includes(","));return r.map(n=>i?`"${n.replaceAll('"','""')}"`:n)}outputCSV(){let{columns:t,data:r,options:i}=this;i["no-header"]||i.printLine(t.map(n=>n.header).join(","));for(let n of r){let o=this.getCSVRow(n);i.printLine(o.join(","))}}outputJSON(){this.options.printLine(JSON.stringify(this.resolveColumnsToObjectArray(),void 0,2))}outputTable(){let{data:t,options:r}=this,i=this.columns.map(s=>{let c=Math.max((0,lr.default)(".".padEnd(s.minWidth-1)),(0,lr.default)(s.header),JC(t,s.key))+1;return{...s,maxWidth:c,width:c}}),n=HC.stdtermwidth-2;if((()=>{if(r["no-truncate"]||!process.stdout.isTTY&&!process.env.CLI_UX_SKIP_TTY_CHECK||(0,Ea.sumBy)(i,f=>f.width)-n<=0)return;for(let f of i)f.width=f.minWidth;let h=(0,Ea.sumBy)(i,f=>f.minWidth);if(h>=n)return;let g=n-h,d=i.map(f=>({key:f.key,needs:f.maxWidth-f.width})).sort((f,p)=>f.needs-p.needs);for(let{key:f,needs:p}of d){if(!p)continue;let a=i.find(u=>f===u.key);a&&(g>p?(a.width=a.width+p,g-=p):g&&(a.width=a.width+g,g=0))}})(),r.title&&(r.printLine(r.title),r.printLine("".padEnd(i.reduce((s,c)=>s+c.width,1),"=")),r.rowStart="| "),!r["no-header"]){let s=r.rowStart;for(let h of i){let g=h.header;s+=g.padEnd(h.width)}r.printLine(Kd.default.bold(s));let c=r.rowStart;for(let h of i){let g="".padEnd(h.width-1,"\u2500")+" ";c+=g.padEnd(h.width)}r.printLine(Kd.default.bold(c))}for(let s of t){let c=1;for(let g of i){let f=s[g.key].split(`
@@ -132,11 +132,11 @@ Should be of format "before:after"`);return x.length===1||x[1].length===0?x.inde
132
132
  `)}static log(t,...r){this.info(t||"",...r)}static logToStderr(t,...r){bp.default.stderr((0,fs.format)(t,...r)+`
133
133
  `)}static get progress(){return ds.progress}static get prompt(){return Ia.prompt}static styledHeader(t){this.info(Oa.default.dim("=== ")+Oa.default.bold(t)+`
134
134
  `)}static styledJSON(t){let r=JSON.stringify(t,null,2);if(!Oa.default.level){this.info(r);return}let i=vp(),n=wp();this.info(i.highlight(r,{json:!0,theme:n}))}static styledObject(t,r){this.info(ds.styledObject(t,r))}static get table(){return ds.Table.table}static trace(t,...r){this.config.outputLevel==="trace"&&this.info((0,fs.format)(t,...r)+`
135
- `)}static get tree(){return ds.tree}static url(t,r,i={}){gc().stdout?this.log(vS(t,r,i)):this.log(r)}static get wait(){return yS.default}};_.ux=ji;var{action:xS,annotation:wS,anykey:ES,confirm:bS,debug:DS,done:CS,flush:SS,info:AS,log:_S,logToStderr:FS,progress:kS,prompt:TS,styledHeader:OS,styledJSON:PS,styledObject:IS,table:NS,trace:MS,tree:jS,url:BS,wait:RS}=ji;_.action=xS;_.annotation=wS;_.anykey=ES;_.confirm=bS;_.debug=DS;_.done=CS;_.flush=SS;_.info=AS;_.log=_S;_.logToStderr=FS;_.progress=kS;_.prompt=TS;_.styledHeader=OS;_.styledJSON=PS;_.styledObject=IS;_.table=NS;_.trace=MS;_.tree=jS;_.url=BS;_.wait=RS;var{error:LS,exit:$S,warn:qS}=mS;_.error=LS;_.exit=$S;_.warn=qS;var Dp=async()=>{try{await ji.done()}catch(e){console.error(e),process.exitCode=1}},US=process.listeners("exit").find(e=>e.name===Dp.name);US||process.once("exit",Dp);var HS=Rn();Object.defineProperty(_,"ActionBase",{enumerable:!0,get:function(){return HS.ActionBase}});var Cp=qn();Object.defineProperty(_,"Config",{enumerable:!0,get:function(){return Cp.Config}});Object.defineProperty(_,"config",{enumerable:!0,get:function(){return Cp.config}});var zS=Ep();Object.defineProperty(_,"ExitError",{enumerable:!0,get:function(){return zS.ExitError}});var JS=Sa();Object.defineProperty(_,"Table",{enumerable:!0,get:function(){return JS.Table}});var WS=er();Object.defineProperty(_,"colorize",{enumerable:!0,get:function(){return WS.colorize}});var GS=Ot();Object.defineProperty(_,"write",{enumerable:!0,get:function(){return ps(GS).default}})});var Sp=E(Vr=>{"use strict";y();Object.defineProperty(Vr,"__esModule",{value:!0});Vr.stderr=Vr.stdout=void 0;var ms=class{channel;constructor(t){this.channel=t}get isTTY(){return process[this.channel].isTTY}emit(t,...r){return process[this.channel].emit(t,...r)}getWindowSize(){return process[this.channel].getWindowSize()}on(t,r){return process[this.channel].on(t,r),this}once(t,r){return process[this.channel].once(t,r),this}read(){return process[this.channel].read()}write(t){return process[this.channel].write(t)}};Vr.stdout=new ms("stdout");Vr.stderr=new ms("stderr")});var Yr=E(Ee=>{"use strict";y();Object.defineProperty(Ee,"__esModule",{value:!0});Ee.Performance=Ee.OCLIF_MARKER_OWNER=void 0;var Ri=F("node:perf_hooks"),XS=Pt();Ee.OCLIF_MARKER_OWNER="@oclif/core";var Ma=class{owner;name;details;method;module;scope;stopped=!1;startMarker;stopMarker;constructor(t,r,i={}){this.owner=t,this.name=r,this.details=i,this.startMarker=`${this.name}-start`,this.stopMarker=`${this.name}-stop`;let[n,o]=r.split("#"),[s,c]=n.split(".");this.module=s,this.method=c,this.scope=o,Ri.performance.mark(this.startMarker)}addDetails(t){this.details={...this.details,...t}}measure(){Ri.performance.measure(this.name,this.startMarker,this.stopMarker)}stop(){this.stopped=!0,Ri.performance.mark(this.stopMarker)}},ja=class e{static _oclifPerf;static _results=new Map;static markers=new Map;static async collect(){if(!e.enabled||e._results.size>0)return;let t=[...e.markers.values()];if(t.length!==0){for(let r of t.filter(i=>!i.stopped))r.stop();return new Promise(r=>{new Ri.PerformanceObserver(n=>{for(let f of n.getEntries()){let p=e.markers.get(f.name);if(p){let a={details:p.details,duration:f.duration,method:p.method,module:p.module,name:f.name,scope:p.scope},u=e._results.get(p.owner)??[];e._results.set(p.owner,[...u,a])}}let o=e._results.get(Ee.OCLIF_MARKER_OWNER)??[],s=o.find(f=>f.name.startsWith("config.runCommand")),c=s?e.getResult(Ee.OCLIF_MARKER_OWNER,`plugin.findCommand#${s.details.plugin}.${s.details.command}`)?.duration??0:0,h=Object.fromEntries(o.filter(({name:f})=>f.startsWith("plugin.load#")).sort((f,p)=>p.duration-f.duration).map(({details:f,duration:p,scope:a})=>[a,{details:f,duration:p}])),g=o.filter(({name:f})=>f.startsWith("config.runHook#")).reduce((f,p)=>{let a=p.details.event;if(a)f[a]||(f[a]={}),f[a][p.scope]=p.duration;else{let u=p.scope;f[u]||(f[u]={}),f[u].total=p.duration}return f},{}),d=Object.fromEntries(o.filter(({name:f})=>f.startsWith("config.loadPlugins#")).sort((f,p)=>p.duration-f.duration).map(({duration:f,scope:p})=>[p,f]));e._oclifPerf={hookRunTimes:g,"oclif.commandLoadMs":c,"oclif.commandRunMs":o.find(({name:f})=>f.startsWith("config.runCommand#"))?.duration??0,"oclif.configLoadMs":e.getResult(Ee.OCLIF_MARKER_OWNER,"config.load")?.duration??0,"oclif.corePluginsLoadMs":d.core??0,"oclif.initHookMs":g.init?.total??0,"oclif.initMs":e.getResult(Ee.OCLIF_MARKER_OWNER,"main.run#init")?.duration??0,"oclif.linkedPluginsLoadMs":d.link??0,"oclif.postrunHookMs":g.postrun?.total??0,"oclif.prerunHookMs":g.prerun?.total??0,"oclif.runMs":e.getResult(Ee.OCLIF_MARKER_OWNER,"main.run")?.duration??0,"oclif.userPluginsLoadMs":d.user??0,pluginLoadTimes:h},r()}).observe({buffered:!0,entryTypes:["measure"]});for(let n of t)try{n.measure()}catch{}Ri.performance.clearMarks()})}}static debug(){if(!e.enabled)return;let t=et()("oclif-perf"),r=(process.uptime()*1e3).toFixed(4);t("Process Uptime: %sms",r),t("Oclif Time: %sms",e.oclifPerf["oclif.runMs"].toFixed(4)),t("Init Time: %sms",e.oclifPerf["oclif.initMs"].toFixed(4)),t("Config Load Time: %sms",e.oclifPerf["oclif.configLoadMs"].toFixed(4)),t(" \u2022 Root Plugin Load Time: %sms",e.getResult(Ee.OCLIF_MARKER_OWNER,"plugin.load#root")?.duration.toFixed(4)??0),t(" \u2022 Plugins Load Time: %sms",e.getResult(Ee.OCLIF_MARKER_OWNER,"config.loadAllPlugins")?.duration.toFixed(4)??0),t(" \u2022 Commands Load Time: %sms",e.getResult(Ee.OCLIF_MARKER_OWNER,"config.loadAllCommands")?.duration.toFixed(4)??0),t("Core Plugin Load Time: %sms",e.oclifPerf["oclif.corePluginsLoadMs"].toFixed(4)),t("User Plugin Load Time: %sms",e.oclifPerf["oclif.userPluginsLoadMs"].toFixed(4)),t("Linked Plugin Load Time: %sms",e.oclifPerf["oclif.linkedPluginsLoadMs"].toFixed(4)),t("Plugin Load Times:");for(let[o,s]of Object.entries(e.oclifPerf.pluginLoadTimes))s.details.hasManifest?t(` ${o}: ${s.duration.toFixed(4)}ms`):t(` ${o}: ${s.duration.toFixed(4)}ms (no manifest!)`);t("Hook Run Times:");for(let[o,s]of Object.entries(e.oclifPerf.hookRunTimes)){t(` ${o}:`);for(let[c,h]of Object.entries(s))t(` ${c}: ${h.toFixed(4)}ms`)}t("Command Load Time: %sms",e.oclifPerf["oclif.commandLoadMs"].toFixed(4)),t("Command Run Time: %sms",e.oclifPerf["oclif.commandRunMs"].toFixed(4)),e.oclifPerf["oclif.configLoadMs"]>e.oclifPerf["oclif.runMs"]&&t("! Config load time is greater than total oclif time. This might mean that Config was instantiated before oclif was run.");let i=et()("non-oclif-perf"),n=e.results;if(n.size>0){i("Non-Core Performance Measurements:");for(let[o,s]of n){i(` ${o}:`);for(let c of s)i(` ${c.name}: ${c.duration.toFixed(4)}ms`)}}}static get enabled(){return XS.settings.performanceEnabled??!1}static getResult(t,r){return e._results.get(t)?.find(i=>i.name===r)}static mark(t,r,i={}){if(!e.enabled)return;let n=new Ma(t,r,i);return e.markers.set(n.name,n),n}static get oclifPerf(){if(!e.enabled)return{};if(e._oclifPerf)return e._oclifPerf;throw new Error("Perf results not available. Did you forget to call await Performance.collect()?")}static get results(){return e.enabled?new Map([...e._results.entries()].filter(([t])=>t!==Ee.OCLIF_MARKER_OWNER)):new Map}};Ee.Performance=ja});var _p=E(Kr=>{"use strict";y();Object.defineProperty(Kr,"__esModule",{value:!0});Kr.getPlatform=Kr.getHomeDir=void 0;var Ap=F("node:os");function VS(){return(0,Ap.homedir)()}Kr.getHomeDir=VS;function YS(){return(0,Ap.platform)()}Kr.getPlatform=YS});var Fp=E(gs=>{"use strict";y();Object.defineProperty(gs,"__esModule",{value:!0});gs.assertValidPattern=void 0;var KS=1024*64,QS=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>KS)throw new TypeError("pattern is too long")};gs.assertValidPattern=QS});var Tp=E(ys=>{"use strict";y();Object.defineProperty(ys,"__esModule",{value:!0});ys.parseClass=void 0;var ZS={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},Li=e=>e.replace(/[[\]\\-]/g,"\\$&"),eA=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),kp=e=>e.join(""),tA=(e,t)=>{let r=t;if(e.charAt(r)!=="[")throw new Error("not in a brace expression");let i=[],n=[],o=r+1,s=!1,c=!1,h=!1,g=!1,d=r,f="";e:for(;o<e.length;){let l=e.charAt(o);if((l==="!"||l==="^")&&o===r+1){g=!0,o++;continue}if(l==="]"&&s&&!h){d=o+1;break}if(s=!0,l==="\\"&&!h){h=!0,o++;continue}if(l==="["&&!h){for(let[m,[v,x,w]]of Object.entries(ZS))if(e.startsWith(m,o)){if(f)return["$.",!1,e.length-r,!0];o+=m.length,w?n.push(v):i.push(v),c=c||x;continue e}}if(h=!1,f){l>f?i.push(Li(f)+"-"+Li(l)):l===f&&i.push(Li(l)),f="",o++;continue}if(e.startsWith("-]",o+1)){i.push(Li(l+"-")),o+=2;continue}if(e.startsWith("-",o+1)){f=l,o+=2;continue}i.push(Li(l)),o++}if(d<o)return["",!1,0,!1];if(!i.length&&!n.length)return["$.",!1,e.length-r,!0];if(n.length===0&&i.length===1&&/^\\?.$/.test(i[0])&&!g){let l=i[0].length===2?i[0].slice(-1):i[0];return[eA(l),!1,d-r,!1]}let p="["+(g?"^":"")+kp(i)+"]",a="["+(g?"":"^")+kp(n)+"]";return[i.length&&n.length?"("+p+"|"+a+")":i.length?p:a,c,d-r,!0]};ys.parseClass=tA});var xs=E(vs=>{"use strict";y();Object.defineProperty(vs,"__esModule",{value:!0});vs.unescape=void 0;var rA=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");vs.unescape=rA});var La=E(Ds=>{"use strict";y();var _e;Object.defineProperty(Ds,"__esModule",{value:!0});Ds.AST=void 0;var iA=Tp(),ws=xs(),nA=new Set(["!","?","+","*","@"]),Ba=e=>nA.has(e),Op=e=>Ba(e.type),sA=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),oA=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),aA=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),Pp=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),uA="(?!(?:^|/)\\.\\.?(?:$|/))",Es="(?!\\.)",cA=new Set(["[","."]),lA=new Set(["..","."]),hA=new Set("().*{}+?[]^$\\!"),fA=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Ra="[^/]",Ip=Ra+"*?",Np=Ra+"+?",bs=class{type;#r;#i;#n=!1;#e=[];#t;#a;#c;#u=!1;#s;#o;#l=!1;constructor(t,r,i={}){this.type=t,t&&(this.#i=!0),this.#t=r,this.#r=this.#t?this.#t.#r:this,this.#s=this.#r===this?i:this.#r.#s,this.#c=this.#r===this?[]:this.#r.#c,t==="!"&&!this.#r.#u&&this.#c.push(this),this.#a=this.#t?this.#t.#e.length:0}get hasMagic(){if(this.#i!==void 0)return this.#i;for(let t of this.#e)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#i=!0;return this.#i}toString(){return this.#o!==void 0?this.#o:this.type?this.#o=this.type+"("+this.#e.map(t=>String(t)).join("|")+")":this.#o=this.#e.map(t=>String(t)).join("")}#y(){if(this!==this.#r)throw new Error("should only call on root");if(this.#u)return this;this.toString(),this.#u=!0;let t;for(;t=this.#c.pop();){if(t.type!=="!")continue;let r=t,i=r.#t;for(;i;){for(let n=r.#a+1;!i.type&&n<i.#e.length;n++)for(let o of t.#e){if(typeof o=="string")throw new Error("string part in extglob AST??");o.copyIn(i.#e[n])}r=i,i=r.#t}}return this}push(...t){for(let r of t)if(r!==""){if(typeof r!="string"&&!(r instanceof _e&&r.#t===this))throw new Error("invalid part: "+r);this.#e.push(r)}}toJSON(){let t=this.type===null?this.#e.slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...this.#e.map(r=>r.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#r||this.#r.#u&&this.#t?.type==="!")&&t.push({}),t}isStart(){if(this.#r===this)return!0;if(!this.#t?.isStart())return!1;if(this.#a===0)return!0;let t=this.#t;for(let r=0;r<this.#a;r++){let i=t.#e[r];if(!(i instanceof _e&&i.type==="!"))return!1}return!0}isEnd(){if(this.#r===this||this.#t?.type==="!")return!0;if(!this.#t?.isEnd())return!1;if(!this.type)return this.#t?.isEnd();let t=this.#t?this.#t.#e.length:0;return this.#a===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let r=new _e(this.type,t);for(let i of this.#e)r.copyIn(i);return r}static#h(t,r,i,n,o){let s=n.maxExtglobRecursion??2,c=!1,h=!1,g=-1,d=!1;if(r.type===null){let l=i,m="";for(;l<t.length;){let v=t.charAt(l++);if(c||v==="\\"){c=!c,m+=v;continue}if(h){l===g+1?(v==="^"||v==="!")&&(d=!0):v==="]"&&!(l===g+2&&d)&&(h=!1),m+=v;continue}else if(v==="["){h=!0,g=l,d=!1,m+=v;continue}if(!n.noext&&Ba(v)&&t.charAt(l)==="("&&o<=s){r.push(m),m="";let w=new _e(v,r);l=_e.#h(t,w,l,n,o+1),r.push(w);continue}m+=v}return r.push(m),l}let f=i+1,p=new _e(null,r),a=[],u="";for(;f<t.length;){let l=t.charAt(f++);if(c||l==="\\"){c=!c,u+=l;continue}if(h){f===g+1?(l==="^"||l==="!")&&(d=!0):l==="]"&&!(f===g+2&&d)&&(h=!1),u+=l;continue}else if(l==="["){h=!0,g=f,d=!1,u+=l;continue}if(Ba(l)&&t.charAt(f)==="("&&(o<=s||r&&r.#f(l))){let v=r&&r.#f(l)?0:1;p.push(u),u="";let x=new _e(l,p);p.push(x),f=_e.#h(t,x,f,n,o+v);continue}if(l==="|"){p.push(u),u="",a.push(p),p=new _e(null,r);continue}if(l===")")return u===""&&r.#e.length===0&&(r.#l=!0),p.push(u),u="",r.push(...a,p),f;u+=l}return r.type=null,r.#i=void 0,r.#e=[t.substring(i-1)],f}#v(t){return this.#p(t,oA)}#p(t,r=sA){if(!t||typeof t!="object"||t.type!==null||t.#e.length!==1||this.type===null)return!1;let i=t.#e[0];return!i||typeof i!="object"||i.type===null?!1:this.#f(i.type,r)}#f(t,r=aA){return!!r.get(this.type)?.includes(t)}#x(t,r){let i=t.#e[0],n=new _e(null,i,this.options);n.#e.push(""),i.push(n),this.#m(t,r)}#m(t,r){let i=t.#e[0];this.#e.splice(r,1,...i.#e);for(let n of i.#e)typeof n=="object"&&(n.#t=this);this.#o=void 0}#w(t){return!!Pp.get(this.type)?.has(t)}#E(t){if(!t||typeof t!="object"||t.type!==null||t.#e.length!==1||this.type===null||this.#e.length!==1)return!1;let r=t.#e[0];return!r||typeof r!="object"||r.type===null?!1:this.#w(r.type)}#b(t){let r=Pp.get(this.type),i=t.#e[0],n=r?.get(i.type);if(!n)return!1;this.#e=i.#e;for(let o of this.#e)typeof o=="object"&&(o.#t=this);this.type=n,this.#o=void 0,this.#l=!1}#d(){if(Op(this)){let t=0,r=!1;do{r=!0;for(let i=0;i<this.#e.length;i++){let n=this.#e[i];typeof n=="object"&&(n.#d(),this.#p(n)?(r=!1,this.#m(n,i)):this.#v(n)?(r=!1,this.#x(n,i)):this.#E(n)&&(r=!1,this.#b(n)))}}while(!r&&++t<10)}else for(let t of this.#e)typeof t=="object"&&t.#d();this.#o=void 0}static fromGlob(t,r={}){let i=new _e(null,void 0,r);return _e.#h(t,i,0,r,0),i}toMMPattern(){if(this!==this.#r)return this.#r.toMMPattern();let t=this.toString(),[r,i,n,o]=this.toRegExpSource();if(!(n||this.#i||this.#s.nocase&&!this.#s.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return i;let c=(this.#s.nocase?"i":"")+(o?"u":"");return Object.assign(new RegExp(`^${r}$`,c),{_src:r,_glob:t})}get options(){return this.#s}toRegExpSource(t){let r=t??!!this.#s.dot;if(this.#r===this&&(this.#d(),this.#y()),!Op(this)){let h=this.isStart()&&this.isEnd(),g=this.#e.map(a=>{let[u,l,m,v]=typeof a=="string"?_e.#D(a,this.#i,h):a.toRegExpSource(t);return this.#i=this.#i||m,this.#n=this.#n||v,u}).join(""),d="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&lA.has(this.#e[0]))){let u=cA,l=r&&u.has(g.charAt(0))||g.startsWith("\\.")&&u.has(g.charAt(2))||g.startsWith("\\.\\.")&&u.has(g.charAt(4)),m=!r&&!t&&u.has(g.charAt(0));d=l?uA:m?Es:""}let f="";return this.isEnd()&&this.#r.#u&&this.#t?.type==="!"&&(f="(?:$|\\/)"),[d+g+f,(0,ws.unescape)(g),this.#i=!!this.#i,this.#n]}let i=this.type==="*"||this.type==="+",n=this.type==="!"?"(?:(?!(?:":"(?:",o=this.#g(r);if(this.isStart()&&this.isEnd()&&!o&&this.type!=="!"){let h=this.toString(),g=this;return g.#e=[h],g.type=null,g.#i=void 0,[h,(0,ws.unescape)(this.toString()),!1,!1]}let s=!i||t||r||!Es?"":this.#g(!0);s===o&&(s=""),s&&(o=`(?:${o})(?:${s})*?`);let c="";if(this.type==="!"&&this.#l)c=(this.isStart()&&!r?Es:"")+Np;else{let h=this.type==="!"?"))"+(this.isStart()&&!r&&!t?Es:"")+Ip+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&s?")":this.type==="*"&&s?")?":`)${this.type}`;c=n+o+h}return[c,(0,ws.unescape)(o),this.#i=!!this.#i,this.#n]}#g(t){return this.#e.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[i,n,o,s]=r.toRegExpSource(t);return this.#n=this.#n||s,i}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#D(t,r,i=!1){let n=!1,o="",s=!1,c=!1;for(let h=0;h<t.length;h++){let g=t.charAt(h);if(n){n=!1,o+=(hA.has(g)?"\\":"")+g,c=!1;continue}if(g==="\\"){h===t.length-1?o+="\\\\":n=!0;continue}if(g==="["){let[d,f,p,a]=(0,iA.parseClass)(t,h);if(p){o+=d,s=s||f,h+=p-1,r=r||a,c=!1;continue}}if(g==="*"){if(c)continue;c=!0,o+=i&&/^[*]+$/.test(t)?Np:Ip,r=!0;continue}else c=!1;if(g==="?"){o+=Ra,r=!0;continue}o+=fA(g)}return[o,(0,ws.unescape)(t),!!r,s]}};Ds.AST=bs;_e=bs});var $a=E(Cs=>{"use strict";y();Object.defineProperty(Cs,"__esModule",{value:!0});Cs.escape=void 0;var dA=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&");Cs.escape=dA});var qp=E(k=>{"use strict";y();var pA=k&&k.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(k,"__esModule",{value:!0});k.unescape=k.escape=k.AST=k.Minimatch=k.match=k.makeRe=k.braceExpand=k.defaults=k.filter=k.GLOBSTAR=k.sep=k.minimatch=void 0;var mA=pA(cy()),Ss=Fp(),Bp=La(),gA=$a(),yA=xs(),vA=(e,t,r={})=>((0,Ss.assertValidPattern)(t),!r.nocomment&&t.charAt(0)==="#"?!1:new fr(t,r).match(e));k.minimatch=vA;var xA=/^\*+([^+@!?\*\[\(]*)$/,wA=e=>t=>!t.startsWith(".")&&t.endsWith(e),EA=e=>t=>t.endsWith(e),bA=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),DA=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),CA=/^\*+\.\*+$/,SA=e=>!e.startsWith(".")&&e.includes("."),AA=e=>e!=="."&&e!==".."&&e.includes("."),_A=/^\.\*+$/,FA=e=>e!=="."&&e!==".."&&e.startsWith("."),kA=/^\*+$/,TA=e=>e.length!==0&&!e.startsWith("."),OA=e=>e.length!==0&&e!=="."&&e!=="..",PA=/^\?+([^+@!?\*\[\(]*)?$/,IA=([e,t=""])=>{let r=Rp([e]);return t?(t=t.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(t)):r},NA=([e,t=""])=>{let r=Lp([e]);return t?(t=t.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(t)):r},MA=([e,t=""])=>{let r=Lp([e]);return t?i=>r(i)&&i.endsWith(t):r},jA=([e,t=""])=>{let r=Rp([e]);return t?i=>r(i)&&i.endsWith(t):r},Rp=([e])=>{let t=e.length;return r=>r.length===t&&!r.startsWith(".")},Lp=([e])=>{let t=e.length;return r=>r.length===t&&r!=="."&&r!==".."},$p=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Mp={win32:{sep:"\\"},posix:{sep:"/"}};k.sep=$p==="win32"?Mp.win32.sep:Mp.posix.sep;k.minimatch.sep=k.sep;k.GLOBSTAR=Symbol("globstar **");k.minimatch.GLOBSTAR=k.GLOBSTAR;var BA="[^/]",RA=BA+"*?",LA="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",$A="(?:(?!(?:\\/|^)\\.).)*?",qA=(e,t={})=>r=>(0,k.minimatch)(r,e,t);k.filter=qA;k.minimatch.filter=k.filter;var qe=(e,t={})=>Object.assign({},e,t),UA=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return k.minimatch;let t=k.minimatch;return Object.assign((i,n,o={})=>t(i,n,qe(e,o)),{Minimatch:class extends t.Minimatch{constructor(n,o={}){super(n,qe(e,o))}static defaults(n){return t.defaults(qe(e,n)).Minimatch}},AST:class extends t.AST{constructor(n,o,s={}){super(n,o,qe(e,s))}static fromGlob(n,o={}){return t.AST.fromGlob(n,qe(e,o))}},unescape:(i,n={})=>t.unescape(i,qe(e,n)),escape:(i,n={})=>t.escape(i,qe(e,n)),filter:(i,n={})=>t.filter(i,qe(e,n)),defaults:i=>t.defaults(qe(e,i)),makeRe:(i,n={})=>t.makeRe(i,qe(e,n)),braceExpand:(i,n={})=>t.braceExpand(i,qe(e,n)),match:(i,n,o={})=>t.match(i,n,qe(e,o)),sep:t.sep,GLOBSTAR:k.GLOBSTAR})};k.defaults=UA;k.minimatch.defaults=k.defaults;var HA=(e,t={})=>((0,Ss.assertValidPattern)(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,mA.default)(e));k.braceExpand=HA;k.minimatch.braceExpand=k.braceExpand;var zA=(e,t={})=>new fr(e,t).makeRe();k.makeRe=zA;k.minimatch.makeRe=k.makeRe;var JA=(e,t,r={})=>{let i=new fr(t,r);return e=e.filter(n=>i.match(n)),i.options.nonull&&!e.length&&e.push(t),e};k.match=JA;k.minimatch.match=k.match;var jp=/[?*]|[+@!]\(.*?\)|\[|\]/,WA=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),fr=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(t,r={}){(0,Ss.assertValidPattern)(t),r=r||{},this.options=r,this.maxGlobstarRecursion=r.maxGlobstarRecursion??200,this.pattern=t,this.platform=r.platform||$p,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let r of t)if(typeof r!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,r=this.options;if(!r.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...o)=>console.error(...o)),this.debug(this.pattern,this.globSet);let i=this.globSet.map(o=>this.slashSplit(o));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let n=this.globParts.map((o,s,c)=>{if(this.isWindows&&this.windowsNoMagicRoot){let h=o[0]===""&&o[1]===""&&(o[2]==="?"||!jp.test(o[2]))&&!jp.test(o[3]),g=/^[a-z]:/i.test(o[0]);if(h)return[...o.slice(0,4),...o.slice(4).map(d=>this.parse(d))];if(g)return[o[0],...o.slice(1).map(d=>this.parse(d))]}return o.map(h=>this.parse(h))});if(this.debug(this.pattern,n),this.set=n.filter(o=>o.indexOf(!1)===-1),this.isWindows)for(let o=0;o<this.set.length;o++){let s=this.set[o];s[0]===""&&s[1]===""&&this.globParts[o][2]==="?"&&typeof s[3]=="string"&&/^[a-z]:$/i.test(s[3])&&(s[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let i=0;i<t.length;i++)for(let n=0;n<t[i].length;n++)t[i][n]==="**"&&(t[i][n]="*");let{optimizationLevel:r=1}=this.options;return r>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):r>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(r=>{let i=-1;for(;(i=r.indexOf("**",i+1))!==-1;){let n=i;for(;r[n+1]==="**";)n++;n!==i&&r.splice(i,n-i)}return r})}levelOneOptimize(t){return t.map(r=>(r=r.reduce((i,n)=>{let o=i[i.length-1];return n==="**"&&o==="**"?i:n===".."&&o&&o!==".."&&o!=="."&&o!=="**"?(i.pop(),i):(i.push(n),i)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let n=1;n<t.length-1;n++){let o=t[n];n===1&&o===""&&t[0]===""||(o==="."||o==="")&&(r=!0,t.splice(n,1),n--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(r=!0,t.pop())}let i=0;for(;(i=t.indexOf("..",i+1))!==-1;){let n=t[i-1];n&&n!=="."&&n!==".."&&n!=="**"&&(r=!0,t.splice(i-1,2),i-=2)}}while(r);return t.length===0?[""]:t}firstPhasePreProcess(t){let r=!1;do{r=!1;for(let i of t){let n=-1;for(;(n=i.indexOf("**",n+1))!==-1;){let s=n;for(;i[s+1]==="**";)s++;s>n&&i.splice(n+1,s-n);let c=i[n+1],h=i[n+2],g=i[n+3];if(c!==".."||!h||h==="."||h===".."||!g||g==="."||g==="..")continue;r=!0,i.splice(n,1);let d=i.slice(0);d[n]="**",t.push(d),n--}if(!this.preserveMultipleSlashes){for(let s=1;s<i.length-1;s++){let c=i[s];s===1&&c===""&&i[0]===""||(c==="."||c==="")&&(r=!0,i.splice(s,1),s--)}i[0]==="."&&i.length===2&&(i[1]==="."||i[1]==="")&&(r=!0,i.pop())}let o=0;for(;(o=i.indexOf("..",o+1))!==-1;){let s=i[o-1];if(s&&s!=="."&&s!==".."&&s!=="**"){r=!0;let h=o===1&&i[o+1]==="**"?["."]:[];i.splice(o-1,2,...h),i.length===0&&i.push(""),o-=2}}}}while(r);return t}secondPhasePreProcess(t){for(let r=0;r<t.length-1;r++)for(let i=r+1;i<t.length;i++){let n=this.partsMatch(t[r],t[i],!this.preserveMultipleSlashes);if(n){t[r]=[],t[i]=n;break}}return t.filter(r=>r.length)}partsMatch(t,r,i=!1){let n=0,o=0,s=[],c="";for(;n<t.length&&o<r.length;)if(t[n]===r[o])s.push(c==="b"?r[o]:t[n]),n++,o++;else if(i&&t[n]==="**"&&r[o]===t[n+1])s.push(t[n]),n++;else if(i&&r[o]==="**"&&t[n]===r[o+1])s.push(r[o]),o++;else if(t[n]==="*"&&r[o]&&(this.options.dot||!r[o].startsWith("."))&&r[o]!=="**"){if(c==="b")return!1;c="a",s.push(t[n]),n++,o++}else if(r[o]==="*"&&t[n]&&(this.options.dot||!t[n].startsWith("."))&&t[n]!=="**"){if(c==="a")return!1;c="b",s.push(r[o]),n++,o++}else return!1;return t.length===r.length&&s}parseNegate(){if(this.nonegate)return;let t=this.pattern,r=!1,i=0;for(let n=0;n<t.length&&t.charAt(n)==="!";n++)r=!r,i++;i&&(this.pattern=t.slice(i)),this.negate=r}matchOne(t,r,i=!1){let n=0,o=0;if(this.isWindows){let c=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),h=!c&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),g=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),d=!g&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),f=h?3:c?0:void 0,p=d?3:g?0:void 0;if(typeof f=="number"&&typeof p=="number"){let[a,u]=[t[f],r[p]];a.toLowerCase()===u.toLowerCase()&&(r[p]=a,o=p,n=f)}}let{optimizationLevel:s=1}=this.options;return s>=2&&(t=this.levelTwoFileOptimize(t)),r.includes(k.GLOBSTAR)?this.#r(t,r,i,n,o):this.#n(t,r,i,n,o)}#r(t,r,i,n,o){let s=r.indexOf(k.GLOBSTAR,o),c=r.lastIndexOf(k.GLOBSTAR),[h,g,d]=i?[r.slice(o,s),r.slice(s+1),[]]:[r.slice(o,s),r.slice(s+1,c),r.slice(c+1)];if(h.length){let x=t.slice(n,n+h.length);if(!this.#n(x,h,i,0,0))return!1;n+=h.length}let f=0;if(d.length){if(d.length+n>t.length)return!1;let x=t.length-d.length;if(this.#n(t,d,i,x,0))f=d.length;else{if(t[t.length-1]!==""||n+d.length===t.length||(x--,!this.#n(t,d,i,x,0)))return!1;f=d.length+1}}if(!g.length){let x=!!f;for(let w=n;w<t.length-f;w++){let C=String(t[w]);if(x=!0,C==="."||C===".."||!this.options.dot&&C.startsWith("."))return!1}return i||x}let p=[[[],0]],a=p[0],u=0,l=[0];for(let x of g)x===k.GLOBSTAR?(l.push(u),a=[[],0],p.push(a)):(a[0].push(x),u++);let m=p.length-1,v=t.length-f;for(let x of p)x[1]=v-(l[m--]+x[0].length);return!!this.#i(t,p,n,0,i,0,!!f)}#i(t,r,i,n,o,s,c){let h=r[n];if(!h){for(let f=i;f<t.length;f++){c=!0;let p=t[f];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1}return c}let[g,d]=h;for(;i<=d;){if(this.#n(t.slice(0,i+g.length),g,o,i,0)&&s<this.maxGlobstarRecursion){let a=this.#i(t,r,i+g.length,n+1,o,s+1,c);if(a!==!1)return a}let p=t[i];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1;i++}return o||null}#n(t,r,i,n,o){let s,c,h,g;for(s=n,c=o,g=t.length,h=r.length;s<g&&c<h;s++,c++){this.debug("matchOne loop");let d=r[c],f=t[s];if(this.debug(r,d,f),d===!1||d===k.GLOBSTAR)return!1;let p;if(typeof d=="string"?(p=f===d,this.debug("string match",d,f,p)):(p=d.test(f),this.debug("pattern match",d,f,p)),!p)return!1}if(s===g&&c===h)return!0;if(s===g)return i;if(c===h)return s===g-1&&t[s]==="";throw new Error("wtf?")}braceExpand(){return(0,k.braceExpand)(this.pattern,this.options)}parse(t){(0,Ss.assertValidPattern)(t);let r=this.options;if(t==="**")return k.GLOBSTAR;if(t==="")return"";let i,n=null;(i=t.match(kA))?n=r.dot?OA:TA:(i=t.match(xA))?n=(r.nocase?r.dot?DA:bA:r.dot?EA:wA)(i[1]):(i=t.match(PA))?n=(r.nocase?r.dot?NA:IA:r.dot?MA:jA)(i):(i=t.match(CA))?n=r.dot?AA:SA:(i=t.match(_A))&&(n=FA);let o=Bp.AST.fromGlob(t,this.options).toMMPattern();return n&&typeof o=="object"&&Reflect.defineProperty(o,"test",{value:n}),o}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let r=this.options,i=r.noglobstar?RA:r.dot?LA:$A,n=new Set(r.nocase?["i"]:[]),o=t.map(h=>{let g=h.map(d=>{if(d instanceof RegExp)for(let f of d.flags.split(""))n.add(f);return typeof d=="string"?WA(d):d===k.GLOBSTAR?k.GLOBSTAR:d._src});return g.forEach((d,f)=>{let p=g[f+1],a=g[f-1];d!==k.GLOBSTAR||a===k.GLOBSTAR||(a===void 0?p!==void 0&&p!==k.GLOBSTAR?g[f+1]="(?:\\/|"+i+"\\/)?"+p:g[f]=i:p===void 0?g[f-1]=a+"(?:\\/|"+i+")?":p!==k.GLOBSTAR&&(g[f-1]=a+"(?:\\/|\\/"+i+"\\/)"+p,g[f+1]=k.GLOBSTAR))}),g.filter(d=>d!==k.GLOBSTAR).join("/")}).join("|"),[s,c]=t.length>1?["(?:",")"]:["",""];o="^"+s+o+c+"$",this.negate&&(o="^(?!"+o+").+$");try{this.regexp=new RegExp(o,[...n].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,r=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&r)return!0;let i=this.options;this.isWindows&&(t=t.split("\\").join("/"));let n=this.slashSplit(t);this.debug(this.pattern,"split",n);let o=this.set;this.debug(this.pattern,"set",o);let s=n[n.length-1];if(!s)for(let c=n.length-2;!s&&c>=0;c--)s=n[c];for(let c=0;c<o.length;c++){let h=o[c],g=n;if(i.matchBase&&h.length===1&&(g=[s]),this.matchOne(g,h,r))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(t){return k.minimatch.defaults(t).Minimatch}};k.Minimatch=fr;var GA=La();Object.defineProperty(k,"AST",{enumerable:!0,get:function(){return GA.AST}});var XA=$a();Object.defineProperty(k,"escape",{enumerable:!0,get:function(){return XA.escape}});var VA=xs();Object.defineProperty(k,"unescape",{enumerable:!0,get:function(){return VA.unescape}});k.minimatch.AST=Bp.AST;k.minimatch.Minimatch=fr;k.minimatch.escape=gA.escape;k.minimatch.unescape=yA.unescape});var Hp=E((MI,Up)=>{"use strict";y();Up.exports=(...e)=>[...new Set([].concat(...e))]});var Jp=E(dr=>{"use strict";y();var{promisify:YA}=F("util"),zp=F("fs");async function qa(e,t,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return(await YA(zp[e])(r))[t]()}catch(i){if(i.code==="ENOENT")return!1;throw i}}function Ua(e,t,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return zp[e](r)[t]()}catch(i){if(i.code==="ENOENT")return!1;throw i}}dr.isFile=qa.bind(null,"stat","isFile");dr.isDirectory=qa.bind(null,"stat","isDirectory");dr.isSymlink=qa.bind(null,"lstat","isSymbolicLink");dr.isFileSync=Ua.bind(null,"statSync","isFile");dr.isDirectorySync=Ua.bind(null,"statSync","isDirectory");dr.isSymlinkSync=Ua.bind(null,"lstatSync","isSymbolicLink")});var Yp=E((LI,Ha)=>{"use strict";y();var pr=F("path"),Wp=Jp(),Gp=e=>e.length>1?`{${e.join(",")}}`:e[0],Xp=(e,t)=>{let r=e[0]==="!"?e.slice(1):e;return pr.isAbsolute(r)?r:pr.join(t,r)},KA=(e,t)=>pr.extname(e)?`**/${e}`:`**/${e}.${Gp(t)}`,Vp=(e,t)=>{if(t.files&&!Array.isArray(t.files))throw new TypeError(`Expected \`files\` to be of type \`Array\` but received type \`${typeof t.files}\``);if(t.extensions&&!Array.isArray(t.extensions))throw new TypeError(`Expected \`extensions\` to be of type \`Array\` but received type \`${typeof t.extensions}\``);return t.files&&t.extensions?t.files.map(r=>pr.posix.join(e,KA(r,t.extensions))):t.files?t.files.map(r=>pr.posix.join(e,`**/${r}`)):t.extensions?[pr.posix.join(e,`**/*.${Gp(t.extensions)}`)]:[pr.posix.join(e,"**")]};Ha.exports=async(e,t)=>{if(t={cwd:process.cwd(),...t},typeof t.cwd!="string")throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof t.cwd}\``);let r=await Promise.all([].concat(e).map(async i=>await Wp.isDirectory(Xp(i,t.cwd))?Vp(i,t):i));return[].concat.apply([],r)};Ha.exports.sync=(e,t)=>{if(t={cwd:process.cwd(),...t},typeof t.cwd!="string")throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof t.cwd}\``);let r=[].concat(e).map(i=>Wp.isDirectorySync(Xp(i,t.cwd))?Vp(i,t):i);return[].concat.apply([],r)}});var sm=E((qI,nm)=>{y();function Kp(e){return Array.isArray(e)?e:[e]}var Wa="",Qp=" ",za="\\",QA=/^\s+$/,ZA=/(?:[^\\]|^)\\$/,e1=/^\\!/,t1=/^\\#/,r1=/\r?\n/g,i1=/^\.*\/|^\.+$/,Ja="/",tm="node-ignore";typeof Symbol<"u"&&(tm=Symbol.for("node-ignore"));var Zp=tm,n1=(e,t,r)=>Object.defineProperty(e,t,{value:r}),s1=/([0-z])-([0-z])/g,rm=()=>!1,o1=e=>e.replace(s1,(t,r,i)=>r.charCodeAt(0)<=i.charCodeAt(0)?t:Wa),a1=e=>{let{length:t}=e;return e.slice(0,t-t%2)},u1=[[/^\uFEFF/,()=>Wa],[/((?:\\\\)*?)(\\?\s+)$/,(e,t,r)=>t+(r.indexOf("\\")===0?Qp:Wa)],[/(\\+?)\s/g,(e,t)=>{let{length:r}=t;return t.slice(0,r-r%2)+Qp}],[/[\\$.|*+(){^]/g,e=>`\\${e}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,r)=>t+6<r.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(e,t,r)=>{let i=r.replace(/\\\*/g,"[^\\/]*");return t+i}],[/\\\\\\(?=[$.|*+(){^])/g,()=>za],[/\\\\/g,()=>za],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(e,t,r,i,n)=>t===za?`\\[${r}${a1(i)}${n}`:n==="]"&&i.length%2===0?`[${o1(r)}${i}]`:"[]"],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(e,t)=>`${t?`${t}[^/]+`:"[^/]*"}(?=$|\\/$)`]],em=Object.create(null),c1=(e,t)=>{let r=em[e];return r||(r=u1.reduce((i,[n,o])=>i.replace(n,o.bind(e)),e),em[e]=r),t?new RegExp(r,"i"):new RegExp(r)},Va=e=>typeof e=="string",l1=e=>e&&Va(e)&&!QA.test(e)&&!ZA.test(e)&&e.indexOf("#")!==0,h1=e=>e.split(r1),Ga=class{constructor(t,r,i,n){this.origin=t,this.pattern=r,this.negative=i,this.regex=n}},f1=(e,t)=>{let r=e,i=!1;e.indexOf("!")===0&&(i=!0,e=e.substr(1)),e=e.replace(e1,"!").replace(t1,"#");let n=c1(e,t);return new Ga(r,e,i,n)},d1=(e,t)=>{throw new t(e)},Et=(e,t,r)=>Va(e)?e?Et.isNotRelative(e)?r(`path should be a \`path.relative()\`d string, but got "${t}"`,RangeError):!0:r("path must not be empty",TypeError):r(`path must be a string, but got \`${t}\``,TypeError),im=e=>i1.test(e);Et.isNotRelative=im;Et.convert=e=>e;var Xa=class{constructor({ignorecase:t=!0,ignoreCase:r=t,allowRelativePaths:i=!1}={}){n1(this,Zp,!0),this._rules=[],this._ignoreCase=r,this._allowRelativePaths=i,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(t){if(t&&t[Zp]){this._rules=this._rules.concat(t._rules),this._added=!0;return}if(l1(t)){let r=f1(t,this._ignoreCase);this._added=!0,this._rules.push(r)}}add(t){return this._added=!1,Kp(Va(t)?h1(t):t).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(t){return this.add(t)}_testOne(t,r){let i=!1,n=!1;return this._rules.forEach(o=>{let{negative:s}=o;if(n===s&&i!==n||s&&!i&&!n&&!r)return;o.regex.test(t)&&(i=!s,n=s)}),{ignored:i,unignored:n}}_test(t,r,i,n){let o=t&&Et.convert(t);return Et(o,t,this._allowRelativePaths?rm:d1),this._t(o,r,i,n)}_t(t,r,i,n){if(t in r)return r[t];if(n||(n=t.split(Ja)),n.pop(),!n.length)return r[t]=this._testOne(t,i);let o=this._t(n.join(Ja)+Ja,r,i,n);return r[t]=o.ignored?o:this._testOne(t,i)}ignores(t){return this._test(t,this._ignoreCache,!1).ignored}createFilter(){return t=>!this.ignores(t)}filter(t){return Kp(t).filter(this.createFilter())}test(t){return this._test(t,this._testCache,!0)}},As=e=>new Xa(e),p1=e=>Et(e&&Et.convert(e),e,rm);As.isPathValid=p1;As.default=As;nm.exports=As;if(typeof process<"u"&&(process.env&&process.env.IGNORE_TEST_WIN32||process.platform==="win32")){let e=r=>/^\\\\\?\\/.test(r)||/["<>|\u0000-\u001F]+/u.test(r)?r:r.replace(/\\/g,"/");Et.convert=e;let t=/^[a-z]:\//i;Et.isNotRelative=r=>t.test(r)||im(r)}});var am=E((HI,om)=>{"use strict";y();om.exports=e=>{let t=/^\\\\\?\\/.test(e),r=/[^\u0000-\u0080]+/.test(e);return t||r?e:e.replace(/\\/g,"/")}});var pm=E((JI,Ya)=>{"use strict";y();var{promisify:m1}=F("util"),um=F("fs"),bt=F("path"),cm=fc(),g1=sm(),$i=am(),lm=["**/node_modules/**","**/flow-typed/**","**/coverage/**","**/.git"],y1=m1(um.readFile),v1=e=>t=>t.startsWith("!")?"!"+bt.posix.join(e,t.slice(1)):bt.posix.join(e,t),x1=(e,t)=>{let r=$i(bt.relative(t.cwd,bt.dirname(t.fileName)));return e.split(/\r?\n/).filter(Boolean).filter(i=>!i.startsWith("#")).map(v1(r))},hm=e=>{let t=g1();for(let r of e)t.add(x1(r.content,{cwd:r.cwd,fileName:r.filePath}));return t},w1=(e,t)=>{if(e=$i(e),bt.isAbsolute(t)){if($i(t).startsWith(e))return t;throw new Error(`Path ${t} is not in cwd ${e}`)}return bt.join(e,t)},fm=(e,t)=>r=>e.ignores($i(bt.relative(t,w1(t,r.path||r)))),E1=async(e,t)=>{let r=bt.join(t,e),i=await y1(r,"utf8");return{cwd:t,filePath:r,content:i}},b1=(e,t)=>{let r=bt.join(t,e),i=um.readFileSync(r,"utf8");return{cwd:t,filePath:r,content:i}},dm=({ignore:e=[],cwd:t=$i(process.cwd())}={})=>({ignore:e,cwd:t});Ya.exports=async e=>{e=dm(e);let t=await cm("**/.gitignore",{ignore:lm.concat(e.ignore),cwd:e.cwd}),r=await Promise.all(t.map(n=>E1(n,e.cwd))),i=hm(r);return fm(i,e.cwd)};Ya.exports.sync=e=>{e=dm(e);let r=cm.sync("**/.gitignore",{ignore:lm.concat(e.ignore),cwd:e.cwd}).map(n=>b1(n,e.cwd)),i=hm(r);return fm(i,e.cwd)}});var gm=E((GI,mm)=>{"use strict";y();var{Transform:D1}=F("stream"),_s=class extends D1{constructor(){super({objectMode:!0})}},Ka=class extends _s{constructor(t){super(),this._filter=t}_transform(t,r,i){this._filter(t)&&this.push(t),i()}},Qa=class extends _s{constructor(){super(),this._pushed=new Set}_transform(t,r,i){this._pushed.has(t)||(this.push(t),this._pushed.add(t)),i()}};mm.exports={FilterStream:Ka,UniqueStream:Qa}});var Em=E((VI,mr)=>{"use strict";y();var vm=F("fs"),Fs=Hp(),C1=K0(),ks=fc(),Ts=Yp(),Za=pm(),{FilterStream:S1,UniqueStream:A1}=gm(),xm=()=>!1,ym=e=>e[0]==="!",_1=e=>{if(!e.every(t=>typeof t=="string"))throw new TypeError("Patterns must be a string or an array of strings")},F1=(e={})=>{if(!e.cwd)return;let t;try{t=vm.statSync(e.cwd)}catch{return}if(!t.isDirectory())throw new Error("The `cwd` option must be a path to a directory")},k1=e=>e.stats instanceof vm.Stats?e.path:e,Os=(e,t)=>{e=Fs([].concat(e)),_1(e),F1(t);let r=[];t={ignore:[],expandDirectories:!0,...t};for(let[i,n]of e.entries()){if(ym(n))continue;let o=e.slice(i).filter(c=>ym(c)).map(c=>c.slice(1)),s={...t,ignore:t.ignore.concat(o)};r.push({pattern:n,options:s})}return r},T1=(e,t)=>{let r={};return e.options.cwd&&(r.cwd=e.options.cwd),Array.isArray(e.options.expandDirectories)?r={...r,files:e.options.expandDirectories}:typeof e.options.expandDirectories=="object"&&(r={...r,...e.options.expandDirectories}),t(e.pattern,r)},eu=(e,t)=>e.options.expandDirectories?T1(e,t):[e.pattern],wm=e=>e&&e.gitignore?Za.sync({cwd:e.cwd,ignore:e.ignore}):xm,tu=e=>t=>{let{options:r}=e;return r.ignore&&Array.isArray(r.ignore)&&r.expandDirectories&&(r.ignore=Ts.sync(r.ignore)),{pattern:t,options:r}};mr.exports=async(e,t)=>{let r=Os(e,t),i=async()=>t&&t.gitignore?Za({cwd:t.cwd,ignore:t.ignore}):xm,n=async()=>{let h=await Promise.all(r.map(async g=>{let d=await eu(g,Ts);return Promise.all(d.map(tu(g)))}));return Fs(...h)},[o,s]=await Promise.all([i(),n()]),c=await Promise.all(s.map(h=>ks(h.pattern,h.options)));return Fs(...c).filter(h=>!o(k1(h)))};mr.exports.sync=(e,t)=>{let r=Os(e,t),i=[];for(let s of r){let c=eu(s,Ts.sync).map(tu(s));i.push(...c)}let n=wm(t),o=[];for(let s of i)o=Fs(o,ks.sync(s.pattern,s.options));return o.filter(s=>!n(s))};mr.exports.stream=(e,t)=>{let r=Os(e,t),i=[];for(let c of r){let h=eu(c,Ts.sync).map(tu(c));i.push(...h)}let n=wm(t),o=new S1(c=>!n(c)),s=new A1;return C1(i.map(c=>ks.stream(c.pattern,c.options))).pipe(o).pipe(s)};mr.exports.generateGlobTasks=Os;mr.exports.hasMagic=(e,t)=>[].concat(e).some(r=>ks.isDynamicPattern(r,t));mr.exports.gitignore=Za});var ru=E(Ps=>{"use strict";y();Object.defineProperty(Ps,"__esModule",{value:!0});Ps.aggregateFlags=void 0;var O1=ss(),P1=(0,O1.boolean)({description:"Format output as json.",helpGroup:"GLOBAL"});function I1(e,t,r){let i={...t,...e};return r?{json:P1,...i}:i}Ps.aggregateFlags=I1});var Cm=E(Is=>{"use strict";y();Object.defineProperty(Is,"__esModule",{value:!0});Is.cacheCommand=void 0;var N1=ru(),bm=No(),M1=Tn(),j1=oe();function Dm(e,t){let r=Object.getPrototypeOf(t),i=(0,j1.pickBy)(r,n=>n!==void 0);return Object.keys(r).length>0?Dm({...i,...e},r):e}async function B1(e,t){let r=Object.entries(e).map(async([i,n])=>[i,{aliases:n.aliases,char:n.char,charAliases:n.charAliases,dependsOn:n.dependsOn,deprecateAliases:n.deprecateAliases,deprecated:n.deprecated,description:n.description,env:n.env,exclusive:n.exclusive,helpGroup:n.helpGroup,helpLabel:n.helpLabel,hidden:n.hidden,name:i,noCacheDefault:n.noCacheDefault,relationships:n.relationships,required:n.required,summary:n.summary,...n.type==="boolean"?{allowNo:n.allowNo,type:n.type}:{default:await(0,bm.cacheDefaultValue)(n,t),delimiter:n.delimiter,hasDynamicHelp:typeof n.defaultHelp=="function",helpValue:n.helpValue,multiple:n.multiple,options:n.options,type:n.type}}]);return Object.fromEntries(await Promise.all(r))}async function R1(e,t){let r=Object.entries(e).map(async([i,n])=>[i,{default:await(0,bm.cacheDefaultValue)(n,t),description:n.description,hidden:n.hidden,name:i,noCacheDefault:n.noCacheDefault,options:n.options,required:n.required}]);return Object.fromEntries(await Promise.all(r))}async function L1(e,t,r=!1){let i=Dm(e,e),n=i.flags??i._flags,o=i.baseFlags??i._baseFlags,[s,c]=await Promise.all([await B1((0,N1.aggregateFlags)(n,o,i.enableJsonFlag),r),await R1((0,M1.ensureArgObject)(i.args),r)]),h={aliases:i.aliases??[],args:c,deprecateAliases:i.deprecateAliases,deprecationOptions:i.deprecationOptions,description:i.description,examples:i.examples??i.example,flags:s,hasDynamicHelp:Object.values(s).some(a=>a.hasDynamicHelp),hidden:i.hidden,hiddenAliases:i.hiddenAliases??[],id:i.id,pluginAlias:t&&t.alias,pluginName:t&&t.name,pluginType:t&&t.type,state:i.state,strict:i.strict,summary:i.summary,usage:i.usage},g=["plugin","_flags","_enableJsonFlag","_globalFlags","_baseFlags","baseFlags","_--","_base"],d=new Set([...Object.keys(h),...g]),f=Object.keys(i).filter(a=>!d.has(a)),p=Object.fromEntries(f.map(a=>[a,i[a]]));return{...h,...p}}Is.cacheCommand=L1});var Am=E(Qr=>{"use strict";y();var $1=Qr&&Qr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qr,"__esModule",{value:!0});Qr.findRoot=void 0;var q1=$1(et()),Fe=F("node:path"),Ns=yt(),Me=(0,q1.default)("find-root");function*iu(e){for(;(0,Fe.dirname)(e)!==e;)yield e,e=(0,Fe.dirname)(e);yield e}async function Sm(e,t){if(Me.extend(t??"root-plugin")(`Finding root starting at ${e}`),t){for(let r of iu(e))if(r.endsWith((0,Fe.basename)(t)))return Me.extend(t)("Found root based on plugin name!"),r}for(let r of iu(e))if(!((0,Fe.basename)((0,Fe.dirname)(r))==="bin"&&["dev","dev.cmd","dev.js","run","run.cmd","run.js"].includes((0,Fe.basename)(r))))try{let i=(0,Fe.join)(r,"package.json");if(Me.extend(t??"root-plugin")(`Checking ${i}`),await(0,Ns.safeReadJson)(i))return Me.extend(t??"root-plugin")("Found root by traversing up from starting point!"),(0,Fe.dirname)(i)}catch{}}async function U1(e,t){Me.extend(e??"root-plugin")("Finding root using legacy method");for(let r of iu(t)){let i;if(e){if(i=(0,Fe.join)(r,"node_modules",e,"package.json"),await(0,Ns.safeReadJson)(i))return(0,Fe.dirname)(i);if((await(0,Ns.safeReadJson)((0,Fe.join)(r,"package.json")))?.name===e)return r}else if(i=(0,Fe.join)(r,"package.json"),await(0,Ns.safeReadJson)(i))return(0,Fe.dirname)(i)}}var Lt;function H1(e){if(Lt)return Lt;try{return Lt=F(F.resolve("pnpapi",{paths:[e]})),Lt}catch{}}var nu=e=>JSON.stringify(e),z1=(e,t,r)=>nu(e?.packageDependencies.get(r))===nu(t?.packageDependencies.get(r));function J1(e,t){if(H1(t),!Lt)return;Me.extend(e)("Finding root for using pnp method");let r=new Set,i=(n,o)=>{let s=nu(n);if(r.has(s))return;let c=Lt.getPackageInformation(n);if(n.name===e)return c.packageLocation;r.add(s);for(let[h,g]of c.packageDependencies){if(g===null||o!==null&&z1(c,o,h))continue;let d=Lt.getLocator(h,g),f=i(d,c);if(f)return f}r.delete(s)};for(let n of Lt.getDependencyTreeRoots()){let o=i(n);if(o)return o}}async function W1(e,t){if(e){Me.extend(e)(`Finding root using ${t}`);let i;try{i=F.resolve(e,{paths:[t]}),Me.extend(e)("Found starting point with require.resolve")}catch{Me.extend(e)("require.resolve could not find plugin starting point")}if(i){let o=await Sm((0,Fe.dirname)(i),e);if(o)return Me.extend(e)(`Found root at ${o}`),o}let n=process.versions.pnp?J1(e,t):await U1(e,t);return Me.extend(e)(n?`Found root at ${n}`:"No root found!"),n}Me.extend("root-plugin")(`Finding root plugin using ${t}`);let r=await Sm(t);return Me.extend("root-plugin")(r?`Found root at ${r}`:"No root found!"),r}Qr.findRoot=W1});var uu=E(ti=>{"use strict";y();var Im=ti&&ti.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ti,"__esModule",{value:!0});ti.Plugin=void 0;var G1=Im(Em()),ei=F("node:path"),_m=F("node:util"),X1=Im(Ve()),qi=$e(),Ms=xi(),Zr=Yr(),Nm=_n(),V1=Cm(),Y1=Am(),Fm=yt(),km=oe(),su=Pr(),js=Or(),Tm=X1.default.getInstance().get("@oclif/core");function ou(e,t){return e?(t=t?`${t}:`:"",Array.isArray(e)?[...e,e.flatMap(r=>ou(r.subtopics,`${t}${r.name}`))]:Object.keys(e).flatMap(r=>(e[r].name=r,[{...e[r],name:`${t}${r}`},...ou(e[r].subtopics,`${t}${e[r].name}`)]))):[]}var K1=(e,t)=>!!(e?.commands[t]&&"isESM"in e.commands[t]&&"relativePath"in e.commands[t]),Om=e=>typeof e.run=="function"?e:e.default&&e.default.run?e.default:Object.values(e).find(t=>typeof t.run=="function"),Pm=e=>{if(e&&typeof e.run=="function")return e},Mm=["**/*.+(js|cjs|mjs|ts|tsx|mts|cts)","!**/*.+(d.ts|test.ts|test.js|spec.ts|spec.js|d.mts|d.cts)?(x)"];function Q1(e){return e.map(t=>{let r=(0,ei.parse)(t),i=r.dir.split("/"),n=r.name!=="index"&&r.name,o=[...i,n].filter(Boolean).join(":");return o===""?Nm.SINGLE_COMMAND_CLI_SYMBOL:o})}function Z1(e,t){if(e){if(typeof e=="string"&&t)return{strategy:"single",target:e};if(typeof e=="string")return{globPatterns:Mm,strategy:"pattern",target:e};if(!e.target)throw new qi.CLIError("`oclif.commandDiscovery.target` is required.");if(!e.strategy)throw new qi.CLIError("`oclif.commandDiscovery.strategy` is required.");return e.strategy==="explicit"&&!e.identifier&&(e.identifier="default"),e}}function e_(e){return typeof e=="string"?{identifier:"default",target:e}:e.identifier?e:{...e,identifier:"default"}}var au=class{options;alias;alreadyLoaded=!1;children=[];commandIDs=[];commands;commandsDir;hasManifest=!1;hooks;isRoot=!1;manifest;moduleType;name;parent;pjson;root;tag;type;valid=!1;version;_base=`${Tm.name}@${Tm.version}`;_debug=(0,js.Debug)();commandCache;commandDiscoveryOpts;flexibleTaxonomy;constructor(t){this.options=t}get topics(){return ou(this.pjson.oclif.topics||{})}async findCommand(t,r={}){let i=Zr.Performance.mark(Zr.OCLIF_MARKER_OWNER,`plugin.findCommand#${this.name}.${t}`,{id:t,plugin:this.name}),o=await(async()=>{if(this.commandDiscoveryOpts?.strategy==="pattern"){let s=await this.getCommandsDir();if(!s)return;let c,h,g;try{({filePath:g,isESM:h,module:c}=K1(this.manifest,t)?await(0,Ms.loadWithDataFromManifest)(this.manifest.commands[t],this.root):await(0,Ms.loadWithData)(this,(0,ei.join)(s??this.pjson.oclif.commands,...t.split(":")))),this._debug(h?"(import)":"(require)",g)}catch(f){if(!r.must&&f.code==="MODULE_NOT_FOUND")return;throw f}let d=Om(c);return d?(d.id=t,d.plugin=this,d.isESM=h,d.relativePath=(0,ei.relative)(this.root,g||"").split(ei.sep),d):void 0}if(this.commandDiscoveryOpts?.strategy==="single"||this.commandDiscoveryOpts?.strategy==="explicit"){let s=await this.loadCommandsFromTarget(),c=Pm(s?.[t]);return c?(c.id=t,c.plugin=this,c):void 0}})();return!o&&r.must&&(0,qi.error)(`command ${t} not found`),i?.stop(),o}async load(){this.type=this.options.type??"core",this.tag=this.options.tag,this.isRoot=this.options.isRoot??!1,this.options.parent&&(this.parent=this.options.parent);let t=this.options.pjson&&this.options.isRoot?this.options.root:this.type==="link"&&!this.parent?this.options.root:await(0,Y1.findRoot)(this.options.name,this.options.root);if(!t)throw new qi.CLIError(`could not find package.json with ${(0,_m.inspect)(this.options)}`);if(this.root=t,this._debug(`loading ${this.type} plugin from ${t}`),this.pjson=this.options.pjson??await(0,Fm.readJson)((0,ei.join)(t,"package.json")),this.flexibleTaxonomy=this.options?.flexibleTaxonomy||this.pjson.oclif?.flexibleTaxonomy||!1,this.moduleType=this.pjson.type==="module"?"module":"commonjs",this.name=this.pjson.name,this.alias=this.options.name??this.pjson.name,!this.name)throw new qi.CLIError(`no name in package.json (${t})`);this._debug=(0,js.Debug)(this.name),this.version=this.pjson.version,this.pjson.oclif?this.valid=!0:this.pjson.oclif=this.pjson["cli-engine"]||{},this.hooks=Object.fromEntries(Object.entries(this.pjson.oclif.hooks??{}).map(([r,i])=>[r,(0,km.castArray)(i).map(n=>e_(n))])),this.commandDiscoveryOpts=Z1(this.pjson.oclif?.commands,this.pjson.oclif?.default),this._debug("command discovery options",this.commandDiscoveryOpts),this.manifest=await this._manifest(),this.commands=Object.entries(this.manifest.commands).map(([r,i])=>({...i,load:async()=>this.findCommand(r,{must:!0}),pluginAlias:this.alias,pluginType:i.pluginType==="jit"?"jit":this.type})).sort((r,i)=>r.id.localeCompare(i.id))}async _manifest(){let t=!!this.options.ignoreManifest,r=!!this.options.errorOnManifestCreate,i=!!this.options.respectNoCacheDefault,n=async(c=!1)=>{try{let h=(0,ei.join)(this.root,`${c?".":""}oclif.manifest.json`),g=await(0,Fm.readJson)(h);if(!process.env.OCLIF_NEXT_VERSION&&g.version.split("-")[0]!==this.version.split("-")[0])process.emitWarning(`Mismatched version in ${this.name} plugin manifest. Expected: ${this.version} Received: ${g.version}
135
+ `)}static get tree(){return ds.tree}static url(t,r,i={}){gc().stdout?this.log(vS(t,r,i)):this.log(r)}static get wait(){return yS.default}};_.ux=ji;var{action:xS,annotation:wS,anykey:ES,confirm:bS,debug:DS,done:CS,flush:SS,info:AS,log:_S,logToStderr:FS,progress:kS,prompt:TS,styledHeader:OS,styledJSON:PS,styledObject:IS,table:NS,trace:MS,tree:jS,url:BS,wait:RS}=ji;_.action=xS;_.annotation=wS;_.anykey=ES;_.confirm=bS;_.debug=DS;_.done=CS;_.flush=SS;_.info=AS;_.log=_S;_.logToStderr=FS;_.progress=kS;_.prompt=TS;_.styledHeader=OS;_.styledJSON=PS;_.styledObject=IS;_.table=NS;_.trace=MS;_.tree=jS;_.url=BS;_.wait=RS;var{error:LS,exit:$S,warn:qS}=mS;_.error=LS;_.exit=$S;_.warn=qS;var Dp=async()=>{try{await ji.done()}catch(e){console.error(e),process.exitCode=1}},US=process.listeners("exit").find(e=>e.name===Dp.name);US||process.once("exit",Dp);var HS=Rn();Object.defineProperty(_,"ActionBase",{enumerable:!0,get:function(){return HS.ActionBase}});var Cp=qn();Object.defineProperty(_,"Config",{enumerable:!0,get:function(){return Cp.Config}});Object.defineProperty(_,"config",{enumerable:!0,get:function(){return Cp.config}});var zS=Ep();Object.defineProperty(_,"ExitError",{enumerable:!0,get:function(){return zS.ExitError}});var JS=Sa();Object.defineProperty(_,"Table",{enumerable:!0,get:function(){return JS.Table}});var WS=er();Object.defineProperty(_,"colorize",{enumerable:!0,get:function(){return WS.colorize}});var GS=Ot();Object.defineProperty(_,"write",{enumerable:!0,get:function(){return ps(GS).default}})});var Sp=E(Vr=>{"use strict";y();Object.defineProperty(Vr,"__esModule",{value:!0});Vr.stderr=Vr.stdout=void 0;var ms=class{channel;constructor(t){this.channel=t}get isTTY(){return process[this.channel].isTTY}emit(t,...r){return process[this.channel].emit(t,...r)}getWindowSize(){return process[this.channel].getWindowSize()}on(t,r){return process[this.channel].on(t,r),this}once(t,r){return process[this.channel].once(t,r),this}read(){return process[this.channel].read()}write(t){return process[this.channel].write(t)}};Vr.stdout=new ms("stdout");Vr.stderr=new ms("stderr")});var Yr=E(Ee=>{"use strict";y();Object.defineProperty(Ee,"__esModule",{value:!0});Ee.Performance=Ee.OCLIF_MARKER_OWNER=void 0;var Ri=F("node:perf_hooks"),XS=Pt();Ee.OCLIF_MARKER_OWNER="@oclif/core";var Ma=class{owner;name;details;method;module;scope;stopped=!1;startMarker;stopMarker;constructor(t,r,i={}){this.owner=t,this.name=r,this.details=i,this.startMarker=`${this.name}-start`,this.stopMarker=`${this.name}-stop`;let[n,o]=r.split("#"),[s,c]=n.split(".");this.module=s,this.method=c,this.scope=o,Ri.performance.mark(this.startMarker)}addDetails(t){this.details={...this.details,...t}}measure(){Ri.performance.measure(this.name,this.startMarker,this.stopMarker)}stop(){this.stopped=!0,Ri.performance.mark(this.stopMarker)}},ja=class e{static _oclifPerf;static _results=new Map;static markers=new Map;static async collect(){if(!e.enabled||e._results.size>0)return;let t=[...e.markers.values()];if(t.length!==0){for(let r of t.filter(i=>!i.stopped))r.stop();return new Promise(r=>{new Ri.PerformanceObserver(n=>{for(let f of n.getEntries()){let p=e.markers.get(f.name);if(p){let a={details:p.details,duration:f.duration,method:p.method,module:p.module,name:f.name,scope:p.scope},u=e._results.get(p.owner)??[];e._results.set(p.owner,[...u,a])}}let o=e._results.get(Ee.OCLIF_MARKER_OWNER)??[],s=o.find(f=>f.name.startsWith("config.runCommand")),c=s?e.getResult(Ee.OCLIF_MARKER_OWNER,`plugin.findCommand#${s.details.plugin}.${s.details.command}`)?.duration??0:0,h=Object.fromEntries(o.filter(({name:f})=>f.startsWith("plugin.load#")).sort((f,p)=>p.duration-f.duration).map(({details:f,duration:p,scope:a})=>[a,{details:f,duration:p}])),g=o.filter(({name:f})=>f.startsWith("config.runHook#")).reduce((f,p)=>{let a=p.details.event;if(a)f[a]||(f[a]={}),f[a][p.scope]=p.duration;else{let u=p.scope;f[u]||(f[u]={}),f[u].total=p.duration}return f},{}),d=Object.fromEntries(o.filter(({name:f})=>f.startsWith("config.loadPlugins#")).sort((f,p)=>p.duration-f.duration).map(({duration:f,scope:p})=>[p,f]));e._oclifPerf={hookRunTimes:g,"oclif.commandLoadMs":c,"oclif.commandRunMs":o.find(({name:f})=>f.startsWith("config.runCommand#"))?.duration??0,"oclif.configLoadMs":e.getResult(Ee.OCLIF_MARKER_OWNER,"config.load")?.duration??0,"oclif.corePluginsLoadMs":d.core??0,"oclif.initHookMs":g.init?.total??0,"oclif.initMs":e.getResult(Ee.OCLIF_MARKER_OWNER,"main.run#init")?.duration??0,"oclif.linkedPluginsLoadMs":d.link??0,"oclif.postrunHookMs":g.postrun?.total??0,"oclif.prerunHookMs":g.prerun?.total??0,"oclif.runMs":e.getResult(Ee.OCLIF_MARKER_OWNER,"main.run")?.duration??0,"oclif.userPluginsLoadMs":d.user??0,pluginLoadTimes:h},r()}).observe({buffered:!0,entryTypes:["measure"]});for(let n of t)try{n.measure()}catch{}Ri.performance.clearMarks()})}}static debug(){if(!e.enabled)return;let t=et()("oclif-perf"),r=(process.uptime()*1e3).toFixed(4);t("Process Uptime: %sms",r),t("Oclif Time: %sms",e.oclifPerf["oclif.runMs"].toFixed(4)),t("Init Time: %sms",e.oclifPerf["oclif.initMs"].toFixed(4)),t("Config Load Time: %sms",e.oclifPerf["oclif.configLoadMs"].toFixed(4)),t(" \u2022 Root Plugin Load Time: %sms",e.getResult(Ee.OCLIF_MARKER_OWNER,"plugin.load#root")?.duration.toFixed(4)??0),t(" \u2022 Plugins Load Time: %sms",e.getResult(Ee.OCLIF_MARKER_OWNER,"config.loadAllPlugins")?.duration.toFixed(4)??0),t(" \u2022 Commands Load Time: %sms",e.getResult(Ee.OCLIF_MARKER_OWNER,"config.loadAllCommands")?.duration.toFixed(4)??0),t("Core Plugin Load Time: %sms",e.oclifPerf["oclif.corePluginsLoadMs"].toFixed(4)),t("User Plugin Load Time: %sms",e.oclifPerf["oclif.userPluginsLoadMs"].toFixed(4)),t("Linked Plugin Load Time: %sms",e.oclifPerf["oclif.linkedPluginsLoadMs"].toFixed(4)),t("Plugin Load Times:");for(let[o,s]of Object.entries(e.oclifPerf.pluginLoadTimes))s.details.hasManifest?t(` ${o}: ${s.duration.toFixed(4)}ms`):t(` ${o}: ${s.duration.toFixed(4)}ms (no manifest!)`);t("Hook Run Times:");for(let[o,s]of Object.entries(e.oclifPerf.hookRunTimes)){t(` ${o}:`);for(let[c,h]of Object.entries(s))t(` ${c}: ${h.toFixed(4)}ms`)}t("Command Load Time: %sms",e.oclifPerf["oclif.commandLoadMs"].toFixed(4)),t("Command Run Time: %sms",e.oclifPerf["oclif.commandRunMs"].toFixed(4)),e.oclifPerf["oclif.configLoadMs"]>e.oclifPerf["oclif.runMs"]&&t("! Config load time is greater than total oclif time. This might mean that Config was instantiated before oclif was run.");let i=et()("non-oclif-perf"),n=e.results;if(n.size>0){i("Non-Core Performance Measurements:");for(let[o,s]of n){i(` ${o}:`);for(let c of s)i(` ${c.name}: ${c.duration.toFixed(4)}ms`)}}}static get enabled(){return XS.settings.performanceEnabled??!1}static getResult(t,r){return e._results.get(t)?.find(i=>i.name===r)}static mark(t,r,i={}){if(!e.enabled)return;let n=new Ma(t,r,i);return e.markers.set(n.name,n),n}static get oclifPerf(){if(!e.enabled)return{};if(e._oclifPerf)return e._oclifPerf;throw new Error("Perf results not available. Did you forget to call await Performance.collect()?")}static get results(){return e.enabled?new Map([...e._results.entries()].filter(([t])=>t!==Ee.OCLIF_MARKER_OWNER)):new Map}};Ee.Performance=ja});var _p=E(Kr=>{"use strict";y();Object.defineProperty(Kr,"__esModule",{value:!0});Kr.getPlatform=Kr.getHomeDir=void 0;var Ap=F("node:os");function VS(){return(0,Ap.homedir)()}Kr.getHomeDir=VS;function YS(){return(0,Ap.platform)()}Kr.getPlatform=YS});var Fp=E(gs=>{"use strict";y();Object.defineProperty(gs,"__esModule",{value:!0});gs.assertValidPattern=void 0;var KS=1024*64,QS=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>KS)throw new TypeError("pattern is too long")};gs.assertValidPattern=QS});var Tp=E(ys=>{"use strict";y();Object.defineProperty(ys,"__esModule",{value:!0});ys.parseClass=void 0;var ZS={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},Li=e=>e.replace(/[[\]\\-]/g,"\\$&"),eA=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),kp=e=>e.join(""),tA=(e,t)=>{let r=t;if(e.charAt(r)!=="[")throw new Error("not in a brace expression");let i=[],n=[],o=r+1,s=!1,c=!1,h=!1,g=!1,d=r,f="";e:for(;o<e.length;){let l=e.charAt(o);if((l==="!"||l==="^")&&o===r+1){g=!0,o++;continue}if(l==="]"&&s&&!h){d=o+1;break}if(s=!0,l==="\\"&&!h){h=!0,o++;continue}if(l==="["&&!h){for(let[m,[v,x,w]]of Object.entries(ZS))if(e.startsWith(m,o)){if(f)return["$.",!1,e.length-r,!0];o+=m.length,w?n.push(v):i.push(v),c=c||x;continue e}}if(h=!1,f){l>f?i.push(Li(f)+"-"+Li(l)):l===f&&i.push(Li(l)),f="",o++;continue}if(e.startsWith("-]",o+1)){i.push(Li(l+"-")),o+=2;continue}if(e.startsWith("-",o+1)){f=l,o+=2;continue}i.push(Li(l)),o++}if(d<o)return["",!1,0,!1];if(!i.length&&!n.length)return["$.",!1,e.length-r,!0];if(n.length===0&&i.length===1&&/^\\?.$/.test(i[0])&&!g){let l=i[0].length===2?i[0].slice(-1):i[0];return[eA(l),!1,d-r,!1]}let p="["+(g?"^":"")+kp(i)+"]",a="["+(g?"":"^")+kp(n)+"]";return[i.length&&n.length?"("+p+"|"+a+")":i.length?p:a,c,d-r,!0]};ys.parseClass=tA});var xs=E(vs=>{"use strict";y();Object.defineProperty(vs,"__esModule",{value:!0});vs.unescape=void 0;var rA=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");vs.unescape=rA});var La=E(Ds=>{"use strict";y();var _e;Object.defineProperty(Ds,"__esModule",{value:!0});Ds.AST=void 0;var iA=Tp(),ws=xs(),nA=new Set(["!","?","+","*","@"]),Ba=e=>nA.has(e),Op=e=>Ba(e.type),sA=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),oA=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),aA=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),Pp=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),uA="(?!(?:^|/)\\.\\.?(?:$|/))",Es="(?!\\.)",cA=new Set(["[","."]),lA=new Set(["..","."]),hA=new Set("().*{}+?[]^$\\!"),fA=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Ra="[^/]",Ip=Ra+"*?",Np=Ra+"+?",bs=class{type;#r;#i;#n=!1;#e=[];#t;#a;#c;#u=!1;#s;#o;#l=!1;constructor(t,r,i={}){this.type=t,t&&(this.#i=!0),this.#t=r,this.#r=this.#t?this.#t.#r:this,this.#s=this.#r===this?i:this.#r.#s,this.#c=this.#r===this?[]:this.#r.#c,t==="!"&&!this.#r.#u&&this.#c.push(this),this.#a=this.#t?this.#t.#e.length:0}get hasMagic(){if(this.#i!==void 0)return this.#i;for(let t of this.#e)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#i=!0;return this.#i}toString(){return this.#o!==void 0?this.#o:this.type?this.#o=this.type+"("+this.#e.map(t=>String(t)).join("|")+")":this.#o=this.#e.map(t=>String(t)).join("")}#y(){if(this!==this.#r)throw new Error("should only call on root");if(this.#u)return this;this.toString(),this.#u=!0;let t;for(;t=this.#c.pop();){if(t.type!=="!")continue;let r=t,i=r.#t;for(;i;){for(let n=r.#a+1;!i.type&&n<i.#e.length;n++)for(let o of t.#e){if(typeof o=="string")throw new Error("string part in extglob AST??");o.copyIn(i.#e[n])}r=i,i=r.#t}}return this}push(...t){for(let r of t)if(r!==""){if(typeof r!="string"&&!(r instanceof _e&&r.#t===this))throw new Error("invalid part: "+r);this.#e.push(r)}}toJSON(){let t=this.type===null?this.#e.slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...this.#e.map(r=>r.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#r||this.#r.#u&&this.#t?.type==="!")&&t.push({}),t}isStart(){if(this.#r===this)return!0;if(!this.#t?.isStart())return!1;if(this.#a===0)return!0;let t=this.#t;for(let r=0;r<this.#a;r++){let i=t.#e[r];if(!(i instanceof _e&&i.type==="!"))return!1}return!0}isEnd(){if(this.#r===this||this.#t?.type==="!")return!0;if(!this.#t?.isEnd())return!1;if(!this.type)return this.#t?.isEnd();let t=this.#t?this.#t.#e.length:0;return this.#a===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let r=new _e(this.type,t);for(let i of this.#e)r.copyIn(i);return r}static#h(t,r,i,n,o){let s=n.maxExtglobRecursion??2,c=!1,h=!1,g=-1,d=!1;if(r.type===null){let l=i,m="";for(;l<t.length;){let v=t.charAt(l++);if(c||v==="\\"){c=!c,m+=v;continue}if(h){l===g+1?(v==="^"||v==="!")&&(d=!0):v==="]"&&!(l===g+2&&d)&&(h=!1),m+=v;continue}else if(v==="["){h=!0,g=l,d=!1,m+=v;continue}if(!n.noext&&Ba(v)&&t.charAt(l)==="("&&o<=s){r.push(m),m="";let w=new _e(v,r);l=_e.#h(t,w,l,n,o+1),r.push(w);continue}m+=v}return r.push(m),l}let f=i+1,p=new _e(null,r),a=[],u="";for(;f<t.length;){let l=t.charAt(f++);if(c||l==="\\"){c=!c,u+=l;continue}if(h){f===g+1?(l==="^"||l==="!")&&(d=!0):l==="]"&&!(f===g+2&&d)&&(h=!1),u+=l;continue}else if(l==="["){h=!0,g=f,d=!1,u+=l;continue}if(Ba(l)&&t.charAt(f)==="("&&(o<=s||r&&r.#f(l))){let v=r&&r.#f(l)?0:1;p.push(u),u="";let x=new _e(l,p);p.push(x),f=_e.#h(t,x,f,n,o+v);continue}if(l==="|"){p.push(u),u="",a.push(p),p=new _e(null,r);continue}if(l===")")return u===""&&r.#e.length===0&&(r.#l=!0),p.push(u),u="",r.push(...a,p),f;u+=l}return r.type=null,r.#i=void 0,r.#e=[t.substring(i-1)],f}#v(t){return this.#p(t,oA)}#p(t,r=sA){if(!t||typeof t!="object"||t.type!==null||t.#e.length!==1||this.type===null)return!1;let i=t.#e[0];return!i||typeof i!="object"||i.type===null?!1:this.#f(i.type,r)}#f(t,r=aA){return!!r.get(this.type)?.includes(t)}#x(t,r){let i=t.#e[0],n=new _e(null,i,this.options);n.#e.push(""),i.push(n),this.#m(t,r)}#m(t,r){let i=t.#e[0];this.#e.splice(r,1,...i.#e);for(let n of i.#e)typeof n=="object"&&(n.#t=this);this.#o=void 0}#w(t){return!!Pp.get(this.type)?.has(t)}#E(t){if(!t||typeof t!="object"||t.type!==null||t.#e.length!==1||this.type===null||this.#e.length!==1)return!1;let r=t.#e[0];return!r||typeof r!="object"||r.type===null?!1:this.#w(r.type)}#b(t){let r=Pp.get(this.type),i=t.#e[0],n=r?.get(i.type);if(!n)return!1;this.#e=i.#e;for(let o of this.#e)typeof o=="object"&&(o.#t=this);this.type=n,this.#o=void 0,this.#l=!1}#d(){if(Op(this)){let t=0,r=!1;do{r=!0;for(let i=0;i<this.#e.length;i++){let n=this.#e[i];typeof n=="object"&&(n.#d(),this.#p(n)?(r=!1,this.#m(n,i)):this.#v(n)?(r=!1,this.#x(n,i)):this.#E(n)&&(r=!1,this.#b(n)))}}while(!r&&++t<10)}else for(let t of this.#e)typeof t=="object"&&t.#d();this.#o=void 0}static fromGlob(t,r={}){let i=new _e(null,void 0,r);return _e.#h(t,i,0,r,0),i}toMMPattern(){if(this!==this.#r)return this.#r.toMMPattern();let t=this.toString(),[r,i,n,o]=this.toRegExpSource();if(!(n||this.#i||this.#s.nocase&&!this.#s.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return i;let c=(this.#s.nocase?"i":"")+(o?"u":"");return Object.assign(new RegExp(`^${r}$`,c),{_src:r,_glob:t})}get options(){return this.#s}toRegExpSource(t){let r=t??!!this.#s.dot;if(this.#r===this&&(this.#d(),this.#y()),!Op(this)){let h=this.isStart()&&this.isEnd(),g=this.#e.map(a=>{let[u,l,m,v]=typeof a=="string"?_e.#D(a,this.#i,h):a.toRegExpSource(t);return this.#i=this.#i||m,this.#n=this.#n||v,u}).join(""),d="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&lA.has(this.#e[0]))){let u=cA,l=r&&u.has(g.charAt(0))||g.startsWith("\\.")&&u.has(g.charAt(2))||g.startsWith("\\.\\.")&&u.has(g.charAt(4)),m=!r&&!t&&u.has(g.charAt(0));d=l?uA:m?Es:""}let f="";return this.isEnd()&&this.#r.#u&&this.#t?.type==="!"&&(f="(?:$|\\/)"),[d+g+f,(0,ws.unescape)(g),this.#i=!!this.#i,this.#n]}let i=this.type==="*"||this.type==="+",n=this.type==="!"?"(?:(?!(?:":"(?:",o=this.#g(r);if(this.isStart()&&this.isEnd()&&!o&&this.type!=="!"){let h=this.toString(),g=this;return g.#e=[h],g.type=null,g.#i=void 0,[h,(0,ws.unescape)(this.toString()),!1,!1]}let s=!i||t||r||!Es?"":this.#g(!0);s===o&&(s=""),s&&(o=`(?:${o})(?:${s})*?`);let c="";if(this.type==="!"&&this.#l)c=(this.isStart()&&!r?Es:"")+Np;else{let h=this.type==="!"?"))"+(this.isStart()&&!r&&!t?Es:"")+Ip+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&s?")":this.type==="*"&&s?")?":`)${this.type}`;c=n+o+h}return[c,(0,ws.unescape)(o),this.#i=!!this.#i,this.#n]}#g(t){return this.#e.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[i,n,o,s]=r.toRegExpSource(t);return this.#n=this.#n||s,i}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#D(t,r,i=!1){let n=!1,o="",s=!1,c=!1;for(let h=0;h<t.length;h++){let g=t.charAt(h);if(n){n=!1,o+=(hA.has(g)?"\\":"")+g,c=!1;continue}if(g==="\\"){h===t.length-1?o+="\\\\":n=!0;continue}if(g==="["){let[d,f,p,a]=(0,iA.parseClass)(t,h);if(p){o+=d,s=s||f,h+=p-1,r=r||a,c=!1;continue}}if(g==="*"){if(c)continue;c=!0,o+=i&&/^[*]+$/.test(t)?Np:Ip,r=!0;continue}else c=!1;if(g==="?"){o+=Ra,r=!0;continue}o+=fA(g)}return[o,(0,ws.unescape)(t),!!r,s]}};Ds.AST=bs;_e=bs});var $a=E(Cs=>{"use strict";y();Object.defineProperty(Cs,"__esModule",{value:!0});Cs.escape=void 0;var dA=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&");Cs.escape=dA});var qp=E(k=>{"use strict";y();var pA=k&&k.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(k,"__esModule",{value:!0});k.unescape=k.escape=k.AST=k.Minimatch=k.match=k.makeRe=k.braceExpand=k.defaults=k.filter=k.GLOBSTAR=k.sep=k.minimatch=void 0;var mA=pA(K0()),Ss=Fp(),Bp=La(),gA=$a(),yA=xs(),vA=(e,t,r={})=>((0,Ss.assertValidPattern)(t),!r.nocomment&&t.charAt(0)==="#"?!1:new fr(t,r).match(e));k.minimatch=vA;var xA=/^\*+([^+@!?\*\[\(]*)$/,wA=e=>t=>!t.startsWith(".")&&t.endsWith(e),EA=e=>t=>t.endsWith(e),bA=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),DA=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),CA=/^\*+\.\*+$/,SA=e=>!e.startsWith(".")&&e.includes("."),AA=e=>e!=="."&&e!==".."&&e.includes("."),_A=/^\.\*+$/,FA=e=>e!=="."&&e!==".."&&e.startsWith("."),kA=/^\*+$/,TA=e=>e.length!==0&&!e.startsWith("."),OA=e=>e.length!==0&&e!=="."&&e!=="..",PA=/^\?+([^+@!?\*\[\(]*)?$/,IA=([e,t=""])=>{let r=Rp([e]);return t?(t=t.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(t)):r},NA=([e,t=""])=>{let r=Lp([e]);return t?(t=t.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(t)):r},MA=([e,t=""])=>{let r=Lp([e]);return t?i=>r(i)&&i.endsWith(t):r},jA=([e,t=""])=>{let r=Rp([e]);return t?i=>r(i)&&i.endsWith(t):r},Rp=([e])=>{let t=e.length;return r=>r.length===t&&!r.startsWith(".")},Lp=([e])=>{let t=e.length;return r=>r.length===t&&r!=="."&&r!==".."},$p=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Mp={win32:{sep:"\\"},posix:{sep:"/"}};k.sep=$p==="win32"?Mp.win32.sep:Mp.posix.sep;k.minimatch.sep=k.sep;k.GLOBSTAR=Symbol("globstar **");k.minimatch.GLOBSTAR=k.GLOBSTAR;var BA="[^/]",RA=BA+"*?",LA="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",$A="(?:(?!(?:\\/|^)\\.).)*?",qA=(e,t={})=>r=>(0,k.minimatch)(r,e,t);k.filter=qA;k.minimatch.filter=k.filter;var qe=(e,t={})=>Object.assign({},e,t),UA=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return k.minimatch;let t=k.minimatch;return Object.assign((i,n,o={})=>t(i,n,qe(e,o)),{Minimatch:class extends t.Minimatch{constructor(n,o={}){super(n,qe(e,o))}static defaults(n){return t.defaults(qe(e,n)).Minimatch}},AST:class extends t.AST{constructor(n,o,s={}){super(n,o,qe(e,s))}static fromGlob(n,o={}){return t.AST.fromGlob(n,qe(e,o))}},unescape:(i,n={})=>t.unescape(i,qe(e,n)),escape:(i,n={})=>t.escape(i,qe(e,n)),filter:(i,n={})=>t.filter(i,qe(e,n)),defaults:i=>t.defaults(qe(e,i)),makeRe:(i,n={})=>t.makeRe(i,qe(e,n)),braceExpand:(i,n={})=>t.braceExpand(i,qe(e,n)),match:(i,n,o={})=>t.match(i,n,qe(e,o)),sep:t.sep,GLOBSTAR:k.GLOBSTAR})};k.defaults=UA;k.minimatch.defaults=k.defaults;var HA=(e,t={})=>((0,Ss.assertValidPattern)(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,mA.default)(e));k.braceExpand=HA;k.minimatch.braceExpand=k.braceExpand;var zA=(e,t={})=>new fr(e,t).makeRe();k.makeRe=zA;k.minimatch.makeRe=k.makeRe;var JA=(e,t,r={})=>{let i=new fr(t,r);return e=e.filter(n=>i.match(n)),i.options.nonull&&!e.length&&e.push(t),e};k.match=JA;k.minimatch.match=k.match;var jp=/[?*]|[+@!]\(.*?\)|\[|\]/,WA=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),fr=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(t,r={}){(0,Ss.assertValidPattern)(t),r=r||{},this.options=r,this.maxGlobstarRecursion=r.maxGlobstarRecursion??200,this.pattern=t,this.platform=r.platform||$p,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let r of t)if(typeof r!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,r=this.options;if(!r.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...o)=>console.error(...o)),this.debug(this.pattern,this.globSet);let i=this.globSet.map(o=>this.slashSplit(o));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let n=this.globParts.map((o,s,c)=>{if(this.isWindows&&this.windowsNoMagicRoot){let h=o[0]===""&&o[1]===""&&(o[2]==="?"||!jp.test(o[2]))&&!jp.test(o[3]),g=/^[a-z]:/i.test(o[0]);if(h)return[...o.slice(0,4),...o.slice(4).map(d=>this.parse(d))];if(g)return[o[0],...o.slice(1).map(d=>this.parse(d))]}return o.map(h=>this.parse(h))});if(this.debug(this.pattern,n),this.set=n.filter(o=>o.indexOf(!1)===-1),this.isWindows)for(let o=0;o<this.set.length;o++){let s=this.set[o];s[0]===""&&s[1]===""&&this.globParts[o][2]==="?"&&typeof s[3]=="string"&&/^[a-z]:$/i.test(s[3])&&(s[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let i=0;i<t.length;i++)for(let n=0;n<t[i].length;n++)t[i][n]==="**"&&(t[i][n]="*");let{optimizationLevel:r=1}=this.options;return r>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):r>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(r=>{let i=-1;for(;(i=r.indexOf("**",i+1))!==-1;){let n=i;for(;r[n+1]==="**";)n++;n!==i&&r.splice(i,n-i)}return r})}levelOneOptimize(t){return t.map(r=>(r=r.reduce((i,n)=>{let o=i[i.length-1];return n==="**"&&o==="**"?i:n===".."&&o&&o!==".."&&o!=="."&&o!=="**"?(i.pop(),i):(i.push(n),i)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let n=1;n<t.length-1;n++){let o=t[n];n===1&&o===""&&t[0]===""||(o==="."||o==="")&&(r=!0,t.splice(n,1),n--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(r=!0,t.pop())}let i=0;for(;(i=t.indexOf("..",i+1))!==-1;){let n=t[i-1];n&&n!=="."&&n!==".."&&n!=="**"&&(r=!0,t.splice(i-1,2),i-=2)}}while(r);return t.length===0?[""]:t}firstPhasePreProcess(t){let r=!1;do{r=!1;for(let i of t){let n=-1;for(;(n=i.indexOf("**",n+1))!==-1;){let s=n;for(;i[s+1]==="**";)s++;s>n&&i.splice(n+1,s-n);let c=i[n+1],h=i[n+2],g=i[n+3];if(c!==".."||!h||h==="."||h===".."||!g||g==="."||g==="..")continue;r=!0,i.splice(n,1);let d=i.slice(0);d[n]="**",t.push(d),n--}if(!this.preserveMultipleSlashes){for(let s=1;s<i.length-1;s++){let c=i[s];s===1&&c===""&&i[0]===""||(c==="."||c==="")&&(r=!0,i.splice(s,1),s--)}i[0]==="."&&i.length===2&&(i[1]==="."||i[1]==="")&&(r=!0,i.pop())}let o=0;for(;(o=i.indexOf("..",o+1))!==-1;){let s=i[o-1];if(s&&s!=="."&&s!==".."&&s!=="**"){r=!0;let h=o===1&&i[o+1]==="**"?["."]:[];i.splice(o-1,2,...h),i.length===0&&i.push(""),o-=2}}}}while(r);return t}secondPhasePreProcess(t){for(let r=0;r<t.length-1;r++)for(let i=r+1;i<t.length;i++){let n=this.partsMatch(t[r],t[i],!this.preserveMultipleSlashes);if(n){t[r]=[],t[i]=n;break}}return t.filter(r=>r.length)}partsMatch(t,r,i=!1){let n=0,o=0,s=[],c="";for(;n<t.length&&o<r.length;)if(t[n]===r[o])s.push(c==="b"?r[o]:t[n]),n++,o++;else if(i&&t[n]==="**"&&r[o]===t[n+1])s.push(t[n]),n++;else if(i&&r[o]==="**"&&t[n]===r[o+1])s.push(r[o]),o++;else if(t[n]==="*"&&r[o]&&(this.options.dot||!r[o].startsWith("."))&&r[o]!=="**"){if(c==="b")return!1;c="a",s.push(t[n]),n++,o++}else if(r[o]==="*"&&t[n]&&(this.options.dot||!t[n].startsWith("."))&&t[n]!=="**"){if(c==="a")return!1;c="b",s.push(r[o]),n++,o++}else return!1;return t.length===r.length&&s}parseNegate(){if(this.nonegate)return;let t=this.pattern,r=!1,i=0;for(let n=0;n<t.length&&t.charAt(n)==="!";n++)r=!r,i++;i&&(this.pattern=t.slice(i)),this.negate=r}matchOne(t,r,i=!1){let n=0,o=0;if(this.isWindows){let c=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),h=!c&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),g=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),d=!g&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),f=h?3:c?0:void 0,p=d?3:g?0:void 0;if(typeof f=="number"&&typeof p=="number"){let[a,u]=[t[f],r[p]];a.toLowerCase()===u.toLowerCase()&&(r[p]=a,o=p,n=f)}}let{optimizationLevel:s=1}=this.options;return s>=2&&(t=this.levelTwoFileOptimize(t)),r.includes(k.GLOBSTAR)?this.#r(t,r,i,n,o):this.#n(t,r,i,n,o)}#r(t,r,i,n,o){let s=r.indexOf(k.GLOBSTAR,o),c=r.lastIndexOf(k.GLOBSTAR),[h,g,d]=i?[r.slice(o,s),r.slice(s+1),[]]:[r.slice(o,s),r.slice(s+1,c),r.slice(c+1)];if(h.length){let x=t.slice(n,n+h.length);if(!this.#n(x,h,i,0,0))return!1;n+=h.length}let f=0;if(d.length){if(d.length+n>t.length)return!1;let x=t.length-d.length;if(this.#n(t,d,i,x,0))f=d.length;else{if(t[t.length-1]!==""||n+d.length===t.length||(x--,!this.#n(t,d,i,x,0)))return!1;f=d.length+1}}if(!g.length){let x=!!f;for(let w=n;w<t.length-f;w++){let C=String(t[w]);if(x=!0,C==="."||C===".."||!this.options.dot&&C.startsWith("."))return!1}return i||x}let p=[[[],0]],a=p[0],u=0,l=[0];for(let x of g)x===k.GLOBSTAR?(l.push(u),a=[[],0],p.push(a)):(a[0].push(x),u++);let m=p.length-1,v=t.length-f;for(let x of p)x[1]=v-(l[m--]+x[0].length);return!!this.#i(t,p,n,0,i,0,!!f)}#i(t,r,i,n,o,s,c){let h=r[n];if(!h){for(let f=i;f<t.length;f++){c=!0;let p=t[f];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1}return c}let[g,d]=h;for(;i<=d;){if(this.#n(t.slice(0,i+g.length),g,o,i,0)&&s<this.maxGlobstarRecursion){let a=this.#i(t,r,i+g.length,n+1,o,s+1,c);if(a!==!1)return a}let p=t[i];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1;i++}return o||null}#n(t,r,i,n,o){let s,c,h,g;for(s=n,c=o,g=t.length,h=r.length;s<g&&c<h;s++,c++){this.debug("matchOne loop");let d=r[c],f=t[s];if(this.debug(r,d,f),d===!1||d===k.GLOBSTAR)return!1;let p;if(typeof d=="string"?(p=f===d,this.debug("string match",d,f,p)):(p=d.test(f),this.debug("pattern match",d,f,p)),!p)return!1}if(s===g&&c===h)return!0;if(s===g)return i;if(c===h)return s===g-1&&t[s]==="";throw new Error("wtf?")}braceExpand(){return(0,k.braceExpand)(this.pattern,this.options)}parse(t){(0,Ss.assertValidPattern)(t);let r=this.options;if(t==="**")return k.GLOBSTAR;if(t==="")return"";let i,n=null;(i=t.match(kA))?n=r.dot?OA:TA:(i=t.match(xA))?n=(r.nocase?r.dot?DA:bA:r.dot?EA:wA)(i[1]):(i=t.match(PA))?n=(r.nocase?r.dot?NA:IA:r.dot?MA:jA)(i):(i=t.match(CA))?n=r.dot?AA:SA:(i=t.match(_A))&&(n=FA);let o=Bp.AST.fromGlob(t,this.options).toMMPattern();return n&&typeof o=="object"&&Reflect.defineProperty(o,"test",{value:n}),o}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let r=this.options,i=r.noglobstar?RA:r.dot?LA:$A,n=new Set(r.nocase?["i"]:[]),o=t.map(h=>{let g=h.map(d=>{if(d instanceof RegExp)for(let f of d.flags.split(""))n.add(f);return typeof d=="string"?WA(d):d===k.GLOBSTAR?k.GLOBSTAR:d._src});return g.forEach((d,f)=>{let p=g[f+1],a=g[f-1];d!==k.GLOBSTAR||a===k.GLOBSTAR||(a===void 0?p!==void 0&&p!==k.GLOBSTAR?g[f+1]="(?:\\/|"+i+"\\/)?"+p:g[f]=i:p===void 0?g[f-1]=a+"(?:\\/|"+i+")?":p!==k.GLOBSTAR&&(g[f-1]=a+"(?:\\/|\\/"+i+"\\/)"+p,g[f+1]=k.GLOBSTAR))}),g.filter(d=>d!==k.GLOBSTAR).join("/")}).join("|"),[s,c]=t.length>1?["(?:",")"]:["",""];o="^"+s+o+c+"$",this.negate&&(o="^(?!"+o+").+$");try{this.regexp=new RegExp(o,[...n].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,r=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&r)return!0;let i=this.options;this.isWindows&&(t=t.split("\\").join("/"));let n=this.slashSplit(t);this.debug(this.pattern,"split",n);let o=this.set;this.debug(this.pattern,"set",o);let s=n[n.length-1];if(!s)for(let c=n.length-2;!s&&c>=0;c--)s=n[c];for(let c=0;c<o.length;c++){let h=o[c],g=n;if(i.matchBase&&h.length===1&&(g=[s]),this.matchOne(g,h,r))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(t){return k.minimatch.defaults(t).Minimatch}};k.Minimatch=fr;var GA=La();Object.defineProperty(k,"AST",{enumerable:!0,get:function(){return GA.AST}});var XA=$a();Object.defineProperty(k,"escape",{enumerable:!0,get:function(){return XA.escape}});var VA=xs();Object.defineProperty(k,"unescape",{enumerable:!0,get:function(){return VA.unescape}});k.minimatch.AST=Bp.AST;k.minimatch.Minimatch=fr;k.minimatch.escape=gA.escape;k.minimatch.unescape=yA.unescape});var Hp=E((MI,Up)=>{"use strict";y();Up.exports=(...e)=>[...new Set([].concat(...e))]});var Jp=E(dr=>{"use strict";y();var{promisify:YA}=F("util"),zp=F("fs");async function qa(e,t,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return(await YA(zp[e])(r))[t]()}catch(i){if(i.code==="ENOENT")return!1;throw i}}function Ua(e,t,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return zp[e](r)[t]()}catch(i){if(i.code==="ENOENT")return!1;throw i}}dr.isFile=qa.bind(null,"stat","isFile");dr.isDirectory=qa.bind(null,"stat","isDirectory");dr.isSymlink=qa.bind(null,"lstat","isSymbolicLink");dr.isFileSync=Ua.bind(null,"statSync","isFile");dr.isDirectorySync=Ua.bind(null,"statSync","isDirectory");dr.isSymlinkSync=Ua.bind(null,"lstatSync","isSymbolicLink")});var Yp=E((LI,Ha)=>{"use strict";y();var pr=F("path"),Wp=Jp(),Gp=e=>e.length>1?`{${e.join(",")}}`:e[0],Xp=(e,t)=>{let r=e[0]==="!"?e.slice(1):e;return pr.isAbsolute(r)?r:pr.join(t,r)},KA=(e,t)=>pr.extname(e)?`**/${e}`:`**/${e}.${Gp(t)}`,Vp=(e,t)=>{if(t.files&&!Array.isArray(t.files))throw new TypeError(`Expected \`files\` to be of type \`Array\` but received type \`${typeof t.files}\``);if(t.extensions&&!Array.isArray(t.extensions))throw new TypeError(`Expected \`extensions\` to be of type \`Array\` but received type \`${typeof t.extensions}\``);return t.files&&t.extensions?t.files.map(r=>pr.posix.join(e,KA(r,t.extensions))):t.files?t.files.map(r=>pr.posix.join(e,`**/${r}`)):t.extensions?[pr.posix.join(e,`**/*.${Gp(t.extensions)}`)]:[pr.posix.join(e,"**")]};Ha.exports=async(e,t)=>{if(t={cwd:process.cwd(),...t},typeof t.cwd!="string")throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof t.cwd}\``);let r=await Promise.all([].concat(e).map(async i=>await Wp.isDirectory(Xp(i,t.cwd))?Vp(i,t):i));return[].concat.apply([],r)};Ha.exports.sync=(e,t)=>{if(t={cwd:process.cwd(),...t},typeof t.cwd!="string")throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof t.cwd}\``);let r=[].concat(e).map(i=>Wp.isDirectorySync(Xp(i,t.cwd))?Vp(i,t):i);return[].concat.apply([],r)}});var sm=E((qI,nm)=>{y();function Kp(e){return Array.isArray(e)?e:[e]}var Wa="",Qp=" ",za="\\",QA=/^\s+$/,ZA=/(?:[^\\]|^)\\$/,e1=/^\\!/,t1=/^\\#/,r1=/\r?\n/g,i1=/^\.*\/|^\.+$/,Ja="/",tm="node-ignore";typeof Symbol<"u"&&(tm=Symbol.for("node-ignore"));var Zp=tm,n1=(e,t,r)=>Object.defineProperty(e,t,{value:r}),s1=/([0-z])-([0-z])/g,rm=()=>!1,o1=e=>e.replace(s1,(t,r,i)=>r.charCodeAt(0)<=i.charCodeAt(0)?t:Wa),a1=e=>{let{length:t}=e;return e.slice(0,t-t%2)},u1=[[/^\uFEFF/,()=>Wa],[/((?:\\\\)*?)(\\?\s+)$/,(e,t,r)=>t+(r.indexOf("\\")===0?Qp:Wa)],[/(\\+?)\s/g,(e,t)=>{let{length:r}=t;return t.slice(0,r-r%2)+Qp}],[/[\\$.|*+(){^]/g,e=>`\\${e}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,r)=>t+6<r.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(e,t,r)=>{let i=r.replace(/\\\*/g,"[^\\/]*");return t+i}],[/\\\\\\(?=[$.|*+(){^])/g,()=>za],[/\\\\/g,()=>za],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(e,t,r,i,n)=>t===za?`\\[${r}${a1(i)}${n}`:n==="]"&&i.length%2===0?`[${o1(r)}${i}]`:"[]"],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(e,t)=>`${t?`${t}[^/]+`:"[^/]*"}(?=$|\\/$)`]],em=Object.create(null),c1=(e,t)=>{let r=em[e];return r||(r=u1.reduce((i,[n,o])=>i.replace(n,o.bind(e)),e),em[e]=r),t?new RegExp(r,"i"):new RegExp(r)},Va=e=>typeof e=="string",l1=e=>e&&Va(e)&&!QA.test(e)&&!ZA.test(e)&&e.indexOf("#")!==0,h1=e=>e.split(r1),Ga=class{constructor(t,r,i,n){this.origin=t,this.pattern=r,this.negative=i,this.regex=n}},f1=(e,t)=>{let r=e,i=!1;e.indexOf("!")===0&&(i=!0,e=e.substr(1)),e=e.replace(e1,"!").replace(t1,"#");let n=c1(e,t);return new Ga(r,e,i,n)},d1=(e,t)=>{throw new t(e)},Et=(e,t,r)=>Va(e)?e?Et.isNotRelative(e)?r(`path should be a \`path.relative()\`d string, but got "${t}"`,RangeError):!0:r("path must not be empty",TypeError):r(`path must be a string, but got \`${t}\``,TypeError),im=e=>i1.test(e);Et.isNotRelative=im;Et.convert=e=>e;var Xa=class{constructor({ignorecase:t=!0,ignoreCase:r=t,allowRelativePaths:i=!1}={}){n1(this,Zp,!0),this._rules=[],this._ignoreCase=r,this._allowRelativePaths=i,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(t){if(t&&t[Zp]){this._rules=this._rules.concat(t._rules),this._added=!0;return}if(l1(t)){let r=f1(t,this._ignoreCase);this._added=!0,this._rules.push(r)}}add(t){return this._added=!1,Kp(Va(t)?h1(t):t).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(t){return this.add(t)}_testOne(t,r){let i=!1,n=!1;return this._rules.forEach(o=>{let{negative:s}=o;if(n===s&&i!==n||s&&!i&&!n&&!r)return;o.regex.test(t)&&(i=!s,n=s)}),{ignored:i,unignored:n}}_test(t,r,i,n){let o=t&&Et.convert(t);return Et(o,t,this._allowRelativePaths?rm:d1),this._t(o,r,i,n)}_t(t,r,i,n){if(t in r)return r[t];if(n||(n=t.split(Ja)),n.pop(),!n.length)return r[t]=this._testOne(t,i);let o=this._t(n.join(Ja)+Ja,r,i,n);return r[t]=o.ignored?o:this._testOne(t,i)}ignores(t){return this._test(t,this._ignoreCache,!1).ignored}createFilter(){return t=>!this.ignores(t)}filter(t){return Kp(t).filter(this.createFilter())}test(t){return this._test(t,this._testCache,!0)}},As=e=>new Xa(e),p1=e=>Et(e&&Et.convert(e),e,rm);As.isPathValid=p1;As.default=As;nm.exports=As;if(typeof process<"u"&&(process.env&&process.env.IGNORE_TEST_WIN32||process.platform==="win32")){let e=r=>/^\\\\\?\\/.test(r)||/["<>|\u0000-\u001F]+/u.test(r)?r:r.replace(/\\/g,"/");Et.convert=e;let t=/^[a-z]:\//i;Et.isNotRelative=r=>t.test(r)||im(r)}});var am=E((HI,om)=>{"use strict";y();om.exports=e=>{let t=/^\\\\\?\\/.test(e),r=/[^\u0000-\u0080]+/.test(e);return t||r?e:e.replace(/\\/g,"/")}});var pm=E((JI,Ya)=>{"use strict";y();var{promisify:m1}=F("util"),um=F("fs"),bt=F("path"),cm=fc(),g1=sm(),$i=am(),lm=["**/node_modules/**","**/flow-typed/**","**/coverage/**","**/.git"],y1=m1(um.readFile),v1=e=>t=>t.startsWith("!")?"!"+bt.posix.join(e,t.slice(1)):bt.posix.join(e,t),x1=(e,t)=>{let r=$i(bt.relative(t.cwd,bt.dirname(t.fileName)));return e.split(/\r?\n/).filter(Boolean).filter(i=>!i.startsWith("#")).map(v1(r))},hm=e=>{let t=g1();for(let r of e)t.add(x1(r.content,{cwd:r.cwd,fileName:r.filePath}));return t},w1=(e,t)=>{if(e=$i(e),bt.isAbsolute(t)){if($i(t).startsWith(e))return t;throw new Error(`Path ${t} is not in cwd ${e}`)}return bt.join(e,t)},fm=(e,t)=>r=>e.ignores($i(bt.relative(t,w1(t,r.path||r)))),E1=async(e,t)=>{let r=bt.join(t,e),i=await y1(r,"utf8");return{cwd:t,filePath:r,content:i}},b1=(e,t)=>{let r=bt.join(t,e),i=um.readFileSync(r,"utf8");return{cwd:t,filePath:r,content:i}},dm=({ignore:e=[],cwd:t=$i(process.cwd())}={})=>({ignore:e,cwd:t});Ya.exports=async e=>{e=dm(e);let t=await cm("**/.gitignore",{ignore:lm.concat(e.ignore),cwd:e.cwd}),r=await Promise.all(t.map(n=>E1(n,e.cwd))),i=hm(r);return fm(i,e.cwd)};Ya.exports.sync=e=>{e=dm(e);let r=cm.sync("**/.gitignore",{ignore:lm.concat(e.ignore),cwd:e.cwd}).map(n=>b1(n,e.cwd)),i=hm(r);return fm(i,e.cwd)}});var gm=E((GI,mm)=>{"use strict";y();var{Transform:D1}=F("stream"),_s=class extends D1{constructor(){super({objectMode:!0})}},Ka=class extends _s{constructor(t){super(),this._filter=t}_transform(t,r,i){this._filter(t)&&this.push(t),i()}},Qa=class extends _s{constructor(){super(),this._pushed=new Set}_transform(t,r,i){this._pushed.has(t)||(this.push(t),this._pushed.add(t)),i()}};mm.exports={FilterStream:Ka,UniqueStream:Qa}});var Em=E((VI,mr)=>{"use strict";y();var vm=F("fs"),Fs=Hp(),C1=Q0(),ks=fc(),Ts=Yp(),Za=pm(),{FilterStream:S1,UniqueStream:A1}=gm(),xm=()=>!1,ym=e=>e[0]==="!",_1=e=>{if(!e.every(t=>typeof t=="string"))throw new TypeError("Patterns must be a string or an array of strings")},F1=(e={})=>{if(!e.cwd)return;let t;try{t=vm.statSync(e.cwd)}catch{return}if(!t.isDirectory())throw new Error("The `cwd` option must be a path to a directory")},k1=e=>e.stats instanceof vm.Stats?e.path:e,Os=(e,t)=>{e=Fs([].concat(e)),_1(e),F1(t);let r=[];t={ignore:[],expandDirectories:!0,...t};for(let[i,n]of e.entries()){if(ym(n))continue;let o=e.slice(i).filter(c=>ym(c)).map(c=>c.slice(1)),s={...t,ignore:t.ignore.concat(o)};r.push({pattern:n,options:s})}return r},T1=(e,t)=>{let r={};return e.options.cwd&&(r.cwd=e.options.cwd),Array.isArray(e.options.expandDirectories)?r={...r,files:e.options.expandDirectories}:typeof e.options.expandDirectories=="object"&&(r={...r,...e.options.expandDirectories}),t(e.pattern,r)},eu=(e,t)=>e.options.expandDirectories?T1(e,t):[e.pattern],wm=e=>e&&e.gitignore?Za.sync({cwd:e.cwd,ignore:e.ignore}):xm,tu=e=>t=>{let{options:r}=e;return r.ignore&&Array.isArray(r.ignore)&&r.expandDirectories&&(r.ignore=Ts.sync(r.ignore)),{pattern:t,options:r}};mr.exports=async(e,t)=>{let r=Os(e,t),i=async()=>t&&t.gitignore?Za({cwd:t.cwd,ignore:t.ignore}):xm,n=async()=>{let h=await Promise.all(r.map(async g=>{let d=await eu(g,Ts);return Promise.all(d.map(tu(g)))}));return Fs(...h)},[o,s]=await Promise.all([i(),n()]),c=await Promise.all(s.map(h=>ks(h.pattern,h.options)));return Fs(...c).filter(h=>!o(k1(h)))};mr.exports.sync=(e,t)=>{let r=Os(e,t),i=[];for(let s of r){let c=eu(s,Ts.sync).map(tu(s));i.push(...c)}let n=wm(t),o=[];for(let s of i)o=Fs(o,ks.sync(s.pattern,s.options));return o.filter(s=>!n(s))};mr.exports.stream=(e,t)=>{let r=Os(e,t),i=[];for(let c of r){let h=eu(c,Ts.sync).map(tu(c));i.push(...h)}let n=wm(t),o=new S1(c=>!n(c)),s=new A1;return C1(i.map(c=>ks.stream(c.pattern,c.options))).pipe(o).pipe(s)};mr.exports.generateGlobTasks=Os;mr.exports.hasMagic=(e,t)=>[].concat(e).some(r=>ks.isDynamicPattern(r,t));mr.exports.gitignore=Za});var ru=E(Ps=>{"use strict";y();Object.defineProperty(Ps,"__esModule",{value:!0});Ps.aggregateFlags=void 0;var O1=ss(),P1=(0,O1.boolean)({description:"Format output as json.",helpGroup:"GLOBAL"});function I1(e,t,r){let i={...t,...e};return r?{json:P1,...i}:i}Ps.aggregateFlags=I1});var Cm=E(Is=>{"use strict";y();Object.defineProperty(Is,"__esModule",{value:!0});Is.cacheCommand=void 0;var N1=ru(),bm=No(),M1=Tn(),j1=oe();function Dm(e,t){let r=Object.getPrototypeOf(t),i=(0,j1.pickBy)(r,n=>n!==void 0);return Object.keys(r).length>0?Dm({...i,...e},r):e}async function B1(e,t){let r=Object.entries(e).map(async([i,n])=>[i,{aliases:n.aliases,char:n.char,charAliases:n.charAliases,dependsOn:n.dependsOn,deprecateAliases:n.deprecateAliases,deprecated:n.deprecated,description:n.description,env:n.env,exclusive:n.exclusive,helpGroup:n.helpGroup,helpLabel:n.helpLabel,hidden:n.hidden,name:i,noCacheDefault:n.noCacheDefault,relationships:n.relationships,required:n.required,summary:n.summary,...n.type==="boolean"?{allowNo:n.allowNo,type:n.type}:{default:await(0,bm.cacheDefaultValue)(n,t),delimiter:n.delimiter,hasDynamicHelp:typeof n.defaultHelp=="function",helpValue:n.helpValue,multiple:n.multiple,options:n.options,type:n.type}}]);return Object.fromEntries(await Promise.all(r))}async function R1(e,t){let r=Object.entries(e).map(async([i,n])=>[i,{default:await(0,bm.cacheDefaultValue)(n,t),description:n.description,hidden:n.hidden,name:i,noCacheDefault:n.noCacheDefault,options:n.options,required:n.required}]);return Object.fromEntries(await Promise.all(r))}async function L1(e,t,r=!1){let i=Dm(e,e),n=i.flags??i._flags,o=i.baseFlags??i._baseFlags,[s,c]=await Promise.all([await B1((0,N1.aggregateFlags)(n,o,i.enableJsonFlag),r),await R1((0,M1.ensureArgObject)(i.args),r)]),h={aliases:i.aliases??[],args:c,deprecateAliases:i.deprecateAliases,deprecationOptions:i.deprecationOptions,description:i.description,examples:i.examples??i.example,flags:s,hasDynamicHelp:Object.values(s).some(a=>a.hasDynamicHelp),hidden:i.hidden,hiddenAliases:i.hiddenAliases??[],id:i.id,pluginAlias:t&&t.alias,pluginName:t&&t.name,pluginType:t&&t.type,state:i.state,strict:i.strict,summary:i.summary,usage:i.usage},g=["plugin","_flags","_enableJsonFlag","_globalFlags","_baseFlags","baseFlags","_--","_base"],d=new Set([...Object.keys(h),...g]),f=Object.keys(i).filter(a=>!d.has(a)),p=Object.fromEntries(f.map(a=>[a,i[a]]));return{...h,...p}}Is.cacheCommand=L1});var Am=E(Qr=>{"use strict";y();var $1=Qr&&Qr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qr,"__esModule",{value:!0});Qr.findRoot=void 0;var q1=$1(et()),Fe=F("node:path"),Ns=yt(),Me=(0,q1.default)("find-root");function*iu(e){for(;(0,Fe.dirname)(e)!==e;)yield e,e=(0,Fe.dirname)(e);yield e}async function Sm(e,t){if(Me.extend(t??"root-plugin")(`Finding root starting at ${e}`),t){for(let r of iu(e))if(r.endsWith((0,Fe.basename)(t)))return Me.extend(t)("Found root based on plugin name!"),r}for(let r of iu(e))if(!((0,Fe.basename)((0,Fe.dirname)(r))==="bin"&&["dev","dev.cmd","dev.js","run","run.cmd","run.js"].includes((0,Fe.basename)(r))))try{let i=(0,Fe.join)(r,"package.json");if(Me.extend(t??"root-plugin")(`Checking ${i}`),await(0,Ns.safeReadJson)(i))return Me.extend(t??"root-plugin")("Found root by traversing up from starting point!"),(0,Fe.dirname)(i)}catch{}}async function U1(e,t){Me.extend(e??"root-plugin")("Finding root using legacy method");for(let r of iu(t)){let i;if(e){if(i=(0,Fe.join)(r,"node_modules",e,"package.json"),await(0,Ns.safeReadJson)(i))return(0,Fe.dirname)(i);if((await(0,Ns.safeReadJson)((0,Fe.join)(r,"package.json")))?.name===e)return r}else if(i=(0,Fe.join)(r,"package.json"),await(0,Ns.safeReadJson)(i))return(0,Fe.dirname)(i)}}var Lt;function H1(e){if(Lt)return Lt;try{return Lt=F(F.resolve("pnpapi",{paths:[e]})),Lt}catch{}}var nu=e=>JSON.stringify(e),z1=(e,t,r)=>nu(e?.packageDependencies.get(r))===nu(t?.packageDependencies.get(r));function J1(e,t){if(H1(t),!Lt)return;Me.extend(e)("Finding root for using pnp method");let r=new Set,i=(n,o)=>{let s=nu(n);if(r.has(s))return;let c=Lt.getPackageInformation(n);if(n.name===e)return c.packageLocation;r.add(s);for(let[h,g]of c.packageDependencies){if(g===null||o!==null&&z1(c,o,h))continue;let d=Lt.getLocator(h,g),f=i(d,c);if(f)return f}r.delete(s)};for(let n of Lt.getDependencyTreeRoots()){let o=i(n);if(o)return o}}async function W1(e,t){if(e){Me.extend(e)(`Finding root using ${t}`);let i;try{i=F.resolve(e,{paths:[t]}),Me.extend(e)("Found starting point with require.resolve")}catch{Me.extend(e)("require.resolve could not find plugin starting point")}if(i){let o=await Sm((0,Fe.dirname)(i),e);if(o)return Me.extend(e)(`Found root at ${o}`),o}let n=process.versions.pnp?J1(e,t):await U1(e,t);return Me.extend(e)(n?`Found root at ${n}`:"No root found!"),n}Me.extend("root-plugin")(`Finding root plugin using ${t}`);let r=await Sm(t);return Me.extend("root-plugin")(r?`Found root at ${r}`:"No root found!"),r}Qr.findRoot=W1});var uu=E(ti=>{"use strict";y();var Im=ti&&ti.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ti,"__esModule",{value:!0});ti.Plugin=void 0;var G1=Im(Em()),ei=F("node:path"),_m=F("node:util"),X1=Im(Ve()),qi=$e(),Ms=xi(),Zr=Yr(),Nm=_n(),V1=Cm(),Y1=Am(),Fm=yt(),km=oe(),su=Pr(),js=Or(),Tm=X1.default.getInstance().get("@oclif/core");function ou(e,t){return e?(t=t?`${t}:`:"",Array.isArray(e)?[...e,e.flatMap(r=>ou(r.subtopics,`${t}${r.name}`))]:Object.keys(e).flatMap(r=>(e[r].name=r,[{...e[r],name:`${t}${r}`},...ou(e[r].subtopics,`${t}${e[r].name}`)]))):[]}var K1=(e,t)=>!!(e?.commands[t]&&"isESM"in e.commands[t]&&"relativePath"in e.commands[t]),Om=e=>typeof e.run=="function"?e:e.default&&e.default.run?e.default:Object.values(e).find(t=>typeof t.run=="function"),Pm=e=>{if(e&&typeof e.run=="function")return e},Mm=["**/*.+(js|cjs|mjs|ts|tsx|mts|cts)","!**/*.+(d.ts|test.ts|test.js|spec.ts|spec.js|d.mts|d.cts)?(x)"];function Q1(e){return e.map(t=>{let r=(0,ei.parse)(t),i=r.dir.split("/"),n=r.name!=="index"&&r.name,o=[...i,n].filter(Boolean).join(":");return o===""?Nm.SINGLE_COMMAND_CLI_SYMBOL:o})}function Z1(e,t){if(e){if(typeof e=="string"&&t)return{strategy:"single",target:e};if(typeof e=="string")return{globPatterns:Mm,strategy:"pattern",target:e};if(!e.target)throw new qi.CLIError("`oclif.commandDiscovery.target` is required.");if(!e.strategy)throw new qi.CLIError("`oclif.commandDiscovery.strategy` is required.");return e.strategy==="explicit"&&!e.identifier&&(e.identifier="default"),e}}function e_(e){return typeof e=="string"?{identifier:"default",target:e}:e.identifier?e:{...e,identifier:"default"}}var au=class{options;alias;alreadyLoaded=!1;children=[];commandIDs=[];commands;commandsDir;hasManifest=!1;hooks;isRoot=!1;manifest;moduleType;name;parent;pjson;root;tag;type;valid=!1;version;_base=`${Tm.name}@${Tm.version}`;_debug=(0,js.Debug)();commandCache;commandDiscoveryOpts;flexibleTaxonomy;constructor(t){this.options=t}get topics(){return ou(this.pjson.oclif.topics||{})}async findCommand(t,r={}){let i=Zr.Performance.mark(Zr.OCLIF_MARKER_OWNER,`plugin.findCommand#${this.name}.${t}`,{id:t,plugin:this.name}),o=await(async()=>{if(this.commandDiscoveryOpts?.strategy==="pattern"){let s=await this.getCommandsDir();if(!s)return;let c,h,g;try{({filePath:g,isESM:h,module:c}=K1(this.manifest,t)?await(0,Ms.loadWithDataFromManifest)(this.manifest.commands[t],this.root):await(0,Ms.loadWithData)(this,(0,ei.join)(s??this.pjson.oclif.commands,...t.split(":")))),this._debug(h?"(import)":"(require)",g)}catch(f){if(!r.must&&f.code==="MODULE_NOT_FOUND")return;throw f}let d=Om(c);return d?(d.id=t,d.plugin=this,d.isESM=h,d.relativePath=(0,ei.relative)(this.root,g||"").split(ei.sep),d):void 0}if(this.commandDiscoveryOpts?.strategy==="single"||this.commandDiscoveryOpts?.strategy==="explicit"){let s=await this.loadCommandsFromTarget(),c=Pm(s?.[t]);return c?(c.id=t,c.plugin=this,c):void 0}})();return!o&&r.must&&(0,qi.error)(`command ${t} not found`),i?.stop(),o}async load(){this.type=this.options.type??"core",this.tag=this.options.tag,this.isRoot=this.options.isRoot??!1,this.options.parent&&(this.parent=this.options.parent);let t=this.options.pjson&&this.options.isRoot?this.options.root:this.type==="link"&&!this.parent?this.options.root:await(0,Y1.findRoot)(this.options.name,this.options.root);if(!t)throw new qi.CLIError(`could not find package.json with ${(0,_m.inspect)(this.options)}`);if(this.root=t,this._debug(`loading ${this.type} plugin from ${t}`),this.pjson=this.options.pjson??await(0,Fm.readJson)((0,ei.join)(t,"package.json")),this.flexibleTaxonomy=this.options?.flexibleTaxonomy||this.pjson.oclif?.flexibleTaxonomy||!1,this.moduleType=this.pjson.type==="module"?"module":"commonjs",this.name=this.pjson.name,this.alias=this.options.name??this.pjson.name,!this.name)throw new qi.CLIError(`no name in package.json (${t})`);this._debug=(0,js.Debug)(this.name),this.version=this.pjson.version,this.pjson.oclif?this.valid=!0:this.pjson.oclif=this.pjson["cli-engine"]||{},this.hooks=Object.fromEntries(Object.entries(this.pjson.oclif.hooks??{}).map(([r,i])=>[r,(0,km.castArray)(i).map(n=>e_(n))])),this.commandDiscoveryOpts=Z1(this.pjson.oclif?.commands,this.pjson.oclif?.default),this._debug("command discovery options",this.commandDiscoveryOpts),this.manifest=await this._manifest(),this.commands=Object.entries(this.manifest.commands).map(([r,i])=>({...i,load:async()=>this.findCommand(r,{must:!0}),pluginAlias:this.alias,pluginType:i.pluginType==="jit"?"jit":this.type})).sort((r,i)=>r.id.localeCompare(i.id))}async _manifest(){let t=!!this.options.ignoreManifest,r=!!this.options.errorOnManifestCreate,i=!!this.options.respectNoCacheDefault,n=async(c=!1)=>{try{let h=(0,ei.join)(this.root,`${c?".":""}oclif.manifest.json`),g=await(0,Fm.readJson)(h);if(!process.env.OCLIF_NEXT_VERSION&&g.version.split("-")[0]!==this.version.split("-")[0])process.emitWarning(`Mismatched version in ${this.name} plugin manifest. Expected: ${this.version} Received: ${g.version}
136
136
  This usually means you have an oclif.manifest.json file that should be deleted in development. This file should be automatically generated when publishing.`);else return this._debug("using manifest from",h),this.hasManifest=!0,g}catch(h){if(h.code==="ENOENT"){if(!c)return n(!0)}else this.warn(h,"readManifest")}},o=Zr.Performance.mark(Zr.OCLIF_MARKER_OWNER,`plugin.manifest#${this.name}`,{plugin:this.name});if(!t){let c=await n();if(c)return o?.addDetails({commandCount:Object.keys(c.commands).length,fromCache:!0}),o?.stop(),this.commandIDs=Object.keys(c.commands),c}this.commandIDs=await this.getCommandIDs();let s={commands:(await Promise.all(this.commandIDs.map(async c=>{try{let h=await this.findCommand(c,{must:!0}),g=await(0,V1.cacheCommand)(h,this,i);if(g.id=c,this.flexibleTaxonomy){let d=(0,js.getCommandIdPermutations)(c),f=g.aliases.flatMap(p=>(0,js.getCommandIdPermutations)(p));return[c,{...g,aliasPermutations:f,permutations:d}]}return[c,g]}catch(h){let g=`findCommand (${c})`;if(!r)this.warn(h,g);else throw this.addErrorScope(h,g)}}))).filter(c=>!!c).reduce((c,[h,g])=>(c[h]=g,c),{}),version:this.version};return o?.addDetails({commandCount:Object.keys(s.commands).length,fromCache:!1}),o?.stop(),s}addErrorScope(t,r){return t.name=t.name??(0,_m.inspect)(t).trim(),t.detail=(0,km.compact)([t.detail,`module: ${this._base}`,r&&`task: ${r}`,`plugin: ${this.name}`,`root: ${this.root}`,...t.code?[`code: ${t.code}`]:[],...t.message?[`message: ${t.message}`]:[],"See more details with DEBUG=*"]).join(`
137
- `),t}async getCommandIDs(){let t=Zr.Performance.mark(Zr.OCLIF_MARKER_OWNER,`plugin.getCommandIDs#${this.name}`,{plugin:this.name}),r;switch(this.commandDiscoveryOpts?.strategy){case"explicit":{r=await this.getCommandIdsFromTarget()??[];break}case"pattern":{r=await this.getCommandIdsFromPattern();break}case"single":{r=await this.getCommandIdsFromTarget()??[];break}default:r=[]}return this._debug("found commands",r),t?.addDetails({count:r.length}),t?.stop(),r}async getCommandIdsFromPattern(){let t=await this.getCommandsDir();if(!t)return[];this._debug(`loading IDs from ${t}`);let r=await(0,G1.default)(this.commandDiscoveryOpts?.globPatterns??Mm,{cwd:t});return Q1(r)}async getCommandIdsFromTarget(){if(await this.loadCommandsFromTarget())return Object.entries(await this.loadCommandsFromTarget()??[]).filter(([,r])=>Pm(r)).map(([r])=>r)}async getCommandsDir(){return this.commandsDir?this.commandsDir:(this.commandsDir=await(0,su.tsPath)(this.root,this.commandDiscoveryOpts?.target,this),this.commandsDir)}async loadCommandsFromTarget(){if(this.commandCache)return this.commandCache;if(this.commandDiscoveryOpts?.strategy==="explicit"&&this.commandDiscoveryOpts.target){let t=await(0,su.tsPath)(this.root,this.commandDiscoveryOpts.target,this),r=await(0,Ms.load)(this,t);return this.commandCache=r[this.commandDiscoveryOpts?.identifier??"default"]??{},this.commandCache}if(this.commandDiscoveryOpts?.strategy==="single"&&this.commandDiscoveryOpts.target){let t=await(0,su.tsPath)(this.root,this.commandDiscoveryOpts?.target??this.root,this),r=await(0,Ms.load)(this,t);return this.commandCache={[Nm.SINGLE_COMMAND_CLI_SYMBOL]:Om(r)},this.commandCache}}warn(t,r){typeof t=="string"&&(t=new Error(t));let i=this.addErrorScope(t,r);process.emitWarning(i.name,i)}};ti.Plugin=au});var Rm=E(Dt=>{"use strict";y();var t_=Dt&&Dt.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),r_=Dt&&Dt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),i_=Dt&&Dt.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&t_(t,e,r);return r_(t,e),t};Object.defineProperty(Dt,"__esModule",{value:!0});var n_=qp(),cu=F("node:path"),ri=Yr(),lu=yt(),s_=oe(),jm=i_(uu()),o_=Or(),Bm=(0,o_.Debug)();function gr(e,t){return Object.keys(e).filter(r=>t.some(i=>(0,n_.minimatch)(r,i)))}var hu=class{options;errors=[];plugins=new Map;pluginsProvided=!1;constructor(t){this.options=t,t.plugins&&(this.pluginsProvided=!0,this.plugins=Array.isArray(t.plugins)?new Map(t.plugins.map(r=>[r.name,r])):t.plugins)}async loadChildren(t){return(!this.pluginsProvided||t.force)&&(await this.loadUserPlugins(t),await this.loadDevPlugins(t),await this.loadCorePlugins(t)),{errors:this.errors,plugins:this.plugins}}async loadRoot({pjson:t}){let r;if(this.pluginsProvided){let i=[...this.plugins.values()];r=i.find(n=>n.root===this.options.root)??i[0]}else{let i=ri.Performance.mark(ri.OCLIF_MARKER_OWNER,"plugin.load#root");r=new jm.Plugin({isRoot:!0,pjson:t,root:this.options.root}),await r.load(),i?.addDetails({commandCount:r.commands.length,hasManifest:r.hasManifest??!1,name:r.name,topicCount:r.topics.length,type:r.type,usesMain:!!r.pjson.main}),i?.stop()}return this.plugins.set(r.name,r),r}async loadCorePlugins(t){let{plugins:r}=t.rootPlugin.pjson.oclif;if(r){let o=gr(t.rootPlugin.pjson.dependencies??{},r);await this.loadPlugins(t.rootPlugin.root,"core",o)}let{core:i,path:n}=t.pluginAdditions??{core:[]};if(i)if(n){let o=await(0,lu.readJson)((0,cu.join)(n,"package.json")),s=gr(o.dependencies??{},i);await this.loadPlugins(n,"core",s)}else{let o=gr(t.rootPlugin.pjson.dependencies??{},i);await this.loadPlugins(t.rootPlugin.root,"core",o)}}async loadDevPlugins(t){if(t.devPlugins!==!1){if((0,s_.isProd)())return;try{let{devPlugins:r}=t.rootPlugin.pjson.oclif;if(r){let o={...t.rootPlugin.pjson.dependencies,...t.rootPlugin.pjson.devDependencies},s=gr(o??{},r);await this.loadPlugins(t.rootPlugin.root,"dev",s)}let{dev:i,path:n}=t.pluginAdditions??{core:[]};if(i)if(n){let o=await(0,lu.readJson)((0,cu.join)(n,"package.json")),s={...o.dependencies,...o.devDependencies},c=gr(s??{},i);await this.loadPlugins(n,"dev",c)}else{let o={...t.rootPlugin.pjson.dependencies,...t.rootPlugin.pjson.devDependencies},s=gr(o??{},i);await this.loadPlugins(t.rootPlugin.root,"dev",s)}}catch(r){process.emitWarning(r)}}}async loadPlugins(t,r,i,n){if(!i||i.length===0)return;let o=ri.Performance.mark(ri.OCLIF_MARKER_OWNER,`config.loadPlugins#${r}`);Bm("loading plugins",i),await Promise.all((i||[]).map(async s=>{try{let c=typeof s=="string"?s:s.name,h={name:c,root:t,type:r};if(typeof s!="string"&&(h.tag=s.tag||h.tag,h.root=s.root||h.root,h.url=s.url),n&&(h.parent=n),this.plugins.has(c))return;let g=ri.Performance.mark(ri.OCLIF_MARKER_OWNER,`plugin.load#${c}`),d=new jm.Plugin(h);if(await d.load(),g?.addDetails({commandCount:d.commands.length,hasManifest:d.hasManifest,name:d.name,topicCount:d.topics.length,type:d.type,usesMain:!!d.pjson.main}),g?.stop(),this.plugins.set(d.name,d),n&&(d.parent=n,n.children||(n.children=[]),n.children.push(d)),d.pjson.oclif.plugins){let f=r==="dev"?{...d.pjson.dependencies,...d.pjson.devDependencies}:d.pjson.dependencies,p=gr(f??{},d.pjson.oclif.plugins);await this.loadPlugins(d.root,r,p,d)}}catch(c){this.errors.push(c)}})),o?.addDetails({pluginCount:i.length}),o?.stop()}async loadUserPlugins(t){if(t.userPlugins!==!1)try{let r=(0,cu.join)(t.dataDir,"package.json");Bm("reading user plugins pjson %s",r);let i=await(0,lu.readJson)(r);i.oclif||(i.oclif={schema:1}),i.oclif.plugins||(i.oclif.plugins=[]),await this.loadPlugins(r,"user",i.oclif.plugins.filter(n=>n.type==="user")),await this.loadPlugins(r,"link",i.oclif.plugins.filter(n=>n.type==="link"))}catch(r){r.code!=="ENOENT"&&process.emitWarning(r)}}};Dt.default=hu});var Jm=E((Ue,zm)=>{"use strict";y();var a_=Ue&&Ue.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),u_=Ue&&Ue.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),c_=Ue&&Ue.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&a_(t,e,r);return u_(t,e),t},mu=Ue&&Ue.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ue,"__esModule",{value:!0});Ue.Config=void 0;var l_=c_(yc()),h_=mu(Q0()),ii=F("node:os"),Ct=F("node:path"),Lm=F("node:url"),Hm=mu(Ve()),f_=Bi(),d_=er(),ni=$e(),p_=Mr(),m_=xi(),we=Yr(),fu=Pt(),$m=yt(),qm=_p(),Bs=oe(),g_=mu(Rm()),y_=Pr(),Hi=Or(),Ui=(0,Hi.Debug)(),Um=Hm.default.getInstance().get("@oclif/core"),du=`${Um.name}@${Um.version}`,v_=new Set(["preparse"]);function x_(e){let t=e.match(/[^-]+(?:-([^.]+))?/);return t&&t[1]||"stable"}function w_(e){return e&&!!e._base}var Rs=class extends Map{validPermutations=new Map;add(t,r){this.validPermutations.set(t,r);for(let i of(0,Hi.collectUsableIds)([t]))this.has(i)?this.set(i,this.get(i).add(r)):this.set(i,new Set([r]))}get(t){return super.get(t)??new Set}getAllValid(){return[...this.validPermutations.keys()]}getValid(t){return this.validPermutations.get(t)}hasValid(t){return this.validPermutations.has(t)}},pu=class e{options;arch;bin;binAliases;binPath;cacheDir;channel;configDir;dataDir;debug=0;dirname;errlog;flexibleTaxonomy;home;isSingleCommandCLI=!1;name;npmRegistry;nsisCustomization;pjson;platform;plugins=new Map;root;shell;theme;topicSeparator=":";userAgent;userPJSON;valid;version;warned=!1;windows;_base=du;_commandIDs;_commands=new Map;_topics=new Map;commandPermutations=new Rs;pluginLoader;rootPlugin;topicPermutations=new Rs;constructor(t){this.options=t}static async load(t=zm.filename||__dirname){if(typeof t=="string"&&t.startsWith("file://")&&(t=(0,Lm.fileURLToPath)(t)),typeof t=="string"&&(t={root:t}),w_(t)){if(du!==t._base){Ui(`reloading config from ${t._base} to ${du}`);let i=new e({...t.options,plugins:t.plugins});return await i.load(),i}return t}let r=new e(t);return await r.load(),r}static get rootPlugin(){return this.rootPlugin}get commandIDs(){return this._commandIDs?this._commandIDs:(this._commandIDs=this.commands.map(t=>t.id),this._commandIDs)}get commands(){return[...this._commands.values()]}get isProd(){return(0,Bs.isProd)()}get topics(){return[...this._topics.values()]}get versionDetails(){let[t,r,i]=this.userAgent.split(" ");return{architecture:r,cliVersion:t,nodeVersion:i,osVersion:`${(0,ii.type)()} ${(0,ii.release)()}`,pluginVersions:Object.fromEntries([...this.plugins.values()].map(n=>[n.name,{root:n.root,type:n.type,version:n.version}])),rootPath:this.root,shell:this.shell}}dir(t){let r=process.env[`XDG_${t.toUpperCase()}_HOME`]||this.windows&&process.env.LOCALAPPDATA||(0,Ct.join)(this.home,t==="data"?".local/share":"."+t);return(0,Ct.join)(r,this.dirname)}findCommand(t,r={}){let i=this.getCmdLookupId(t),n=this._commands.get(i);return r.must&&!n&&(0,ni.error)(`command ${i} not found`),n}findMatches(t,r){let i=r.filter(s=>!(0,p_.getHelpFlagAdditions)(this).includes(s)&&s.startsWith("-")).map(s=>s.replaceAll("-",""));return[...this.commandPermutations.get(t)].map(s=>this._commands.get(s)).filter(s=>{let c=Object.entries(s.flags).flatMap(([h,g])=>g.char?[g.char,h]:[h]);return i.every(h=>c.includes(h))})}findTopic(t,r={}){let i=this.getTopicLookupId(t),n=this._topics.get(i);if(n)return n;if(r.must)throw new Error(`topic ${t} not found`)}getAllCommandIDs(){return this.getAllCommands().map(t=>t.id)}getAllCommands(){let t=[...this._commands.values()],r=[...this.commandPermutations.getAllValid()];for(let i of r)if(!this._commands.has(i)){let n=this._commands.get(this.getCmdLookupId(i));t.push({...n,id:i})}return t}getPluginsList(){return[...this.plugins.values()]}async load(){fu.settings.performanceEnabled=(fu.settings.performanceEnabled===void 0?this.options.enablePerf:fu.settings.performanceEnabled)??!1;let t=we.Performance.mark(we.OCLIF_MARKER_OWNER,"config.load");this.pluginLoader=new g_.default({plugins:this.options.plugins,root:this.options.root}),this.rootPlugin=await this.pluginLoader.loadRoot({pjson:this.options.pjson});let r=Hm.default.getInstance();if(r.set("rootPlugin",this.rootPlugin),r.set("exitCodes",this.rootPlugin.pjson.oclif.exitCodes??{}),this.root=this.rootPlugin.root,this.pjson=this.rootPlugin.pjson,this.plugins.set(this.rootPlugin.name,this.rootPlugin),this.root=this.rootPlugin.root,this.pjson=this.rootPlugin.pjson,this.name=this.pjson.name,this.version=this.options.version||this.pjson.version||"0.0.0",this.channel=this.options.channel||x_(this.version),this.valid=this.rootPlugin.valid,this.arch=(0,ii.arch)()==="ia32"?"x86":(0,ii.arch)(),this.platform=h_.default?"wsl":(0,qm.getPlatform)(),this.windows=this.platform==="win32",this.bin=this.pjson.oclif.bin||this.name,this.binAliases=this.pjson.oclif.binAliases,this.nsisCustomization=this.pjson.oclif.nsisCustomization,this.dirname=this.pjson.oclif.dirname||this.name,this.flexibleTaxonomy=this.pjson.oclif.flexibleTaxonomy||!1,this.pjson.oclif.topicSeparator&&[" ",":"].includes(this.pjson.oclif.topicSeparator)&&(this.topicSeparator=this.pjson.oclif.topicSeparator),this.platform==="win32"&&(this.dirname=this.dirname.replace("/","\\")),this.userAgent=`${this.name}/${this.version} ${this.platform}-${this.arch} node-${process.version}`,this.shell=this._shell(),this.debug=this._debug(),this.home=process.env.HOME||this.windows&&this.windowsHome()||(0,qm.getHomeDir)()||(0,ii.tmpdir)(),this.cacheDir=this.scopedEnvVar("CACHE_DIR")||this.macosCacheDir()||this.dir("cache"),this.configDir=this.scopedEnvVar("CONFIG_DIR")||this.dir("config"),this.dataDir=this.scopedEnvVar("DATA_DIR")||this.dir("data"),this.errlog=(0,Ct.join)(this.cacheDir,"error.log"),this.binPath=this.scopedEnvVar("BINPATH"),this.npmRegistry=this.scopedEnvVar("NPM_REGISTRY")||this.pjson.oclif.npmRegistry,!this.scopedEnvVarTrue("DISABLE_THEME")){let{theme:n}=await this.loadThemes();this.theme=n}this.pjson.oclif.update=this.pjson.oclif.update||{},this.pjson.oclif.update.node=this.pjson.oclif.update.node||{};let i=this.pjson.oclif.update.s3||{};this.pjson.oclif.update.s3=i,i.bucket=this.scopedEnvVar("S3_BUCKET")||i.bucket,i.bucket&&!i.host&&(i.host=`https://${i.bucket}.s3.amazonaws.com`),i.templates={...i.templates,target:{baseDir:"<%- bin %>",manifest:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- platform %>-<%- arch %>",unversioned:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-<%- platform %>-<%- arch %><%- ext %>",versioned:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-v<%- version %>/<%- bin %>-v<%- version %>-<%- platform %>-<%- arch %><%- ext %>",...i.templates&&i.templates.target},vanilla:{baseDir:"<%- bin %>",manifest:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %>version",unversioned:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %><%- ext %>",versioned:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-v<%- version %>/<%- bin %>-v<%- version %><%- ext %>",...i.templates&&i.templates.vanilla}},this.isSingleCommandCLI=!!(this.pjson.oclif.default||typeof this.pjson.oclif.commands!="string"&&this.pjson.oclif.commands?.strategy==="single"&&this.pjson.oclif.commands?.target),await this.loadPluginsAndCommands(),Ui("config done"),t?.addDetails({commandPermutations:this.commands.length,commands:[...this.plugins.values()].reduce((n,o)=>n+o.commands.length,0),plugins:this.plugins.size,topics:this.topics.length}),t?.stop()}async loadPluginsAndCommands(t){let r=we.Performance.mark(we.OCLIF_MARKER_OWNER,"config.loadAllPlugins"),{errors:i,plugins:n}=await this.pluginLoader.loadChildren({dataDir:this.dataDir,devPlugins:this.options.devPlugins,force:t?.force??!1,pluginAdditions:this.options.pluginAdditions,rootPlugin:this.rootPlugin,userPlugins:this.options.userPlugins});this.plugins=n,r?.stop();let o=we.Performance.mark(we.OCLIF_MARKER_OWNER,"config.loadAllCommands");for(let s of this.plugins.values())this.loadCommands(s),this.loadTopics(s);o?.stop();for(let s of i)this.warn(s)}async loadThemes(){let t=this.pjson.oclif.theme?(0,Ct.resolve)(this.root,this.pjson.oclif.theme):this.pjson.oclif.theme,r=(0,Ct.resolve)(this.configDir,"theme.json"),[i,n]=await Promise.all([t?await(0,$m.safeReadJson)(t):void 0,await(0,$m.safeReadJson)(r)]),o={...i,...n};return{file:n?r:t,theme:Object.keys(o).length>0?(0,d_.parseTheme)(o):void 0}}macosCacheDir(){return this.platform==="darwin"&&(0,Ct.join)(this.home,"Library","Caches",this.dirname)||void 0}async runCommand(t,r=[],i=null){let n=we.Performance.mark(we.OCLIF_MARKER_OWNER,`config.runCommand#${t}`);Ui("runCommand %s %o",t,r);let o=i??this.findCommand(t);if(!o){let h=this.flexibleTaxonomy?this.findMatches(t,r):[],g=this.flexibleTaxonomy&&h.length>0?await this.runHook("command_incomplete",{argv:r,id:t,matches:h}):await this.runHook("command_not_found",{argv:r,id:t});if(g.successes[0])return g.successes[0].result;throw g.failures[0]?g.failures[0].error:new ni.CLIError(`command ${t} not found`)}if(this.isJitPluginCommand(o)){let h=o.pluginName,g=this.pjson.oclif.jitPlugins[h],d=await this.runHook("jit_plugin_not_installed",{argv:r,command:o,id:t,pluginName:h,pluginVersion:g});if(d.failures[0])throw d.failures[0].error;if(d.successes[0])await this.loadPluginsAndCommands({force:!0}),o=this.findCommand(t)??o;else{let f=await this.runHook("command_not_found",{argv:r,id:t});if(f.successes[0])return f.successes[0].result;throw f.failures[0]?f.failures[0].error:new ni.CLIError(`command ${t} not found`)}}let s=await o.load();await this.runHook("prerun",{Command:s,argv:r});let c=await s.run(r,this);if(o.id==="plugins:uninstall")for(let h of r)this.plugins.delete(h);return await this.runHook("postrun",{Command:s,argv:r,result:c}),n?.addDetails({command:t,plugin:o.pluginName}),n?.stop(),c}async runHook(t,r,i,n){let o=we.Performance.mark(we.OCLIF_MARKER_OWNER,`config.runHook#${t}`);Ui("start %s hook",t);let s=f=>typeof f=="function"?f:f.default&&typeof f.default=="function"?f.default:Object.values(f).find(p=>typeof p=="function"),c=async(f,p)=>{let a,u=new Promise((l,m)=>{a=setTimeout(()=>{m(new Error(`Timed out after ${f} ms.`))},f).unref()});return Promise.race([p,u]).then(l=>(clearTimeout(a),l))},h={failures:[],successes:[]},d=(v_.has(t)?[this.rootPlugin]:[...this.plugins.values()]).map(async f=>{let p=et()([this.bin,f.name,"hooks",t].join(":")),a={config:this,debug:p,error(l,m={}){(0,ni.error)(l,m)},exit(l=0){(0,ni.exit)(l)},log(l,...m){f_.ux.info(l,...m)},warn(l){(0,ni.warn)(l)}},u=f.hooks[t]||[];for(let l of u){let m=we.Performance.mark(we.OCLIF_MARKER_OWNER,`config.runHook#${f.name}(${l.target})`);try{let{filePath:v,isESM:x,module:w}=await(0,m_.loadWithData)(f,await(0,y_.tsPath)(f.root,l.target,f));p("start",x?"(import)":"(require)",v);let C=w[l.identifier]??(l.identifier==="default"?s(w):void 0);if(!C){p("No hook found for hook definition:",l);continue}let S=i?await c(i,C.call(a,{...r,config:this,context:a})):await C.call(a,{...r,config:this,context:a});h.successes.push({plugin:f,result:S}),f.name==="@oclif/plugin-legacy"&&t==="init"&&this.insertLegacyPlugins(S),p("done")}catch(v){if(h.failures.push({error:v,plugin:f}),p(v),!n&&v.oclif?.exit!==void 0&&v.oclif?.exit!==0&&v.code!=="MODULE_NOT_FOUND")throw v}m?.addDetails({event:t,hook:l.target,plugin:f.name}),m?.stop()}});return await Promise.all(d),Ui("%s hook done",t),o?.stop(),h}s3Key(t,r,i={}){typeof r=="object"?i=r:r&&(i.ext=r);let n=this.pjson.oclif.update.s3.templates[i.platform?"target":"vanilla"][t]??"";return l_.render(n,{...this,...i})}s3Url(t){let{host:r}=this.pjson.oclif.update.s3;if(!r)throw new Error("no s3 host is set");let i=new Lm.URL(r);return i.pathname=(0,Ct.join)(i.pathname,t),i.toString()}scopedEnvVar(t){return process.env[this.scopedEnvVarKeys(t).find(r=>process.env[r])]}scopedEnvVarKey(t){return[this.bin,t].map(r=>r.replaceAll("@","").replaceAll(/[/-]/g,"_")).join("_").toUpperCase()}scopedEnvVarKeys(t){return[this.bin,...this.binAliases??[]].filter(Boolean).map(r=>[r.replaceAll("@","").replaceAll(/[/-]/g,"_"),t].join("_").toUpperCase())}scopedEnvVarTrue(t){let r=this.scopedEnvVar(t);return r==="1"||r==="true"}warn(t,r){if(!this.warned){if(typeof t=="string"){process.emitWarning(t);return}if(t instanceof Error){let i=t;i.name=`${t.name} Plugin: ${this.name}`,i.detail=(0,Bs.compact)([t.detail,`module: ${this._base}`,r&&`task: ${r}`,`plugin: ${this.name}`,`root: ${this.root}`,"See more details with DEBUG=*"]).join(`
137
+ `),t}async getCommandIDs(){let t=Zr.Performance.mark(Zr.OCLIF_MARKER_OWNER,`plugin.getCommandIDs#${this.name}`,{plugin:this.name}),r;switch(this.commandDiscoveryOpts?.strategy){case"explicit":{r=await this.getCommandIdsFromTarget()??[];break}case"pattern":{r=await this.getCommandIdsFromPattern();break}case"single":{r=await this.getCommandIdsFromTarget()??[];break}default:r=[]}return this._debug("found commands",r),t?.addDetails({count:r.length}),t?.stop(),r}async getCommandIdsFromPattern(){let t=await this.getCommandsDir();if(!t)return[];this._debug(`loading IDs from ${t}`);let r=await(0,G1.default)(this.commandDiscoveryOpts?.globPatterns??Mm,{cwd:t});return Q1(r)}async getCommandIdsFromTarget(){if(await this.loadCommandsFromTarget())return Object.entries(await this.loadCommandsFromTarget()??[]).filter(([,r])=>Pm(r)).map(([r])=>r)}async getCommandsDir(){return this.commandsDir?this.commandsDir:(this.commandsDir=await(0,su.tsPath)(this.root,this.commandDiscoveryOpts?.target,this),this.commandsDir)}async loadCommandsFromTarget(){if(this.commandCache)return this.commandCache;if(this.commandDiscoveryOpts?.strategy==="explicit"&&this.commandDiscoveryOpts.target){let t=await(0,su.tsPath)(this.root,this.commandDiscoveryOpts.target,this),r=await(0,Ms.load)(this,t);return this.commandCache=r[this.commandDiscoveryOpts?.identifier??"default"]??{},this.commandCache}if(this.commandDiscoveryOpts?.strategy==="single"&&this.commandDiscoveryOpts.target){let t=await(0,su.tsPath)(this.root,this.commandDiscoveryOpts?.target??this.root,this),r=await(0,Ms.load)(this,t);return this.commandCache={[Nm.SINGLE_COMMAND_CLI_SYMBOL]:Om(r)},this.commandCache}}warn(t,r){typeof t=="string"&&(t=new Error(t));let i=this.addErrorScope(t,r);process.emitWarning(i.name,i)}};ti.Plugin=au});var Rm=E(Dt=>{"use strict";y();var t_=Dt&&Dt.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),r_=Dt&&Dt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),i_=Dt&&Dt.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&t_(t,e,r);return r_(t,e),t};Object.defineProperty(Dt,"__esModule",{value:!0});var n_=qp(),cu=F("node:path"),ri=Yr(),lu=yt(),s_=oe(),jm=i_(uu()),o_=Or(),Bm=(0,o_.Debug)();function gr(e,t){return Object.keys(e).filter(r=>t.some(i=>(0,n_.minimatch)(r,i)))}var hu=class{options;errors=[];plugins=new Map;pluginsProvided=!1;constructor(t){this.options=t,t.plugins&&(this.pluginsProvided=!0,this.plugins=Array.isArray(t.plugins)?new Map(t.plugins.map(r=>[r.name,r])):t.plugins)}async loadChildren(t){return(!this.pluginsProvided||t.force)&&(await this.loadUserPlugins(t),await this.loadDevPlugins(t),await this.loadCorePlugins(t)),{errors:this.errors,plugins:this.plugins}}async loadRoot({pjson:t}){let r;if(this.pluginsProvided){let i=[...this.plugins.values()];r=i.find(n=>n.root===this.options.root)??i[0]}else{let i=ri.Performance.mark(ri.OCLIF_MARKER_OWNER,"plugin.load#root");r=new jm.Plugin({isRoot:!0,pjson:t,root:this.options.root}),await r.load(),i?.addDetails({commandCount:r.commands.length,hasManifest:r.hasManifest??!1,name:r.name,topicCount:r.topics.length,type:r.type,usesMain:!!r.pjson.main}),i?.stop()}return this.plugins.set(r.name,r),r}async loadCorePlugins(t){let{plugins:r}=t.rootPlugin.pjson.oclif;if(r){let o=gr(t.rootPlugin.pjson.dependencies??{},r);await this.loadPlugins(t.rootPlugin.root,"core",o)}let{core:i,path:n}=t.pluginAdditions??{core:[]};if(i)if(n){let o=await(0,lu.readJson)((0,cu.join)(n,"package.json")),s=gr(o.dependencies??{},i);await this.loadPlugins(n,"core",s)}else{let o=gr(t.rootPlugin.pjson.dependencies??{},i);await this.loadPlugins(t.rootPlugin.root,"core",o)}}async loadDevPlugins(t){if(t.devPlugins!==!1){if((0,s_.isProd)())return;try{let{devPlugins:r}=t.rootPlugin.pjson.oclif;if(r){let o={...t.rootPlugin.pjson.dependencies,...t.rootPlugin.pjson.devDependencies},s=gr(o??{},r);await this.loadPlugins(t.rootPlugin.root,"dev",s)}let{dev:i,path:n}=t.pluginAdditions??{core:[]};if(i)if(n){let o=await(0,lu.readJson)((0,cu.join)(n,"package.json")),s={...o.dependencies,...o.devDependencies},c=gr(s??{},i);await this.loadPlugins(n,"dev",c)}else{let o={...t.rootPlugin.pjson.dependencies,...t.rootPlugin.pjson.devDependencies},s=gr(o??{},i);await this.loadPlugins(t.rootPlugin.root,"dev",s)}}catch(r){process.emitWarning(r)}}}async loadPlugins(t,r,i,n){if(!i||i.length===0)return;let o=ri.Performance.mark(ri.OCLIF_MARKER_OWNER,`config.loadPlugins#${r}`);Bm("loading plugins",i),await Promise.all((i||[]).map(async s=>{try{let c=typeof s=="string"?s:s.name,h={name:c,root:t,type:r};if(typeof s!="string"&&(h.tag=s.tag||h.tag,h.root=s.root||h.root,h.url=s.url),n&&(h.parent=n),this.plugins.has(c))return;let g=ri.Performance.mark(ri.OCLIF_MARKER_OWNER,`plugin.load#${c}`),d=new jm.Plugin(h);if(await d.load(),g?.addDetails({commandCount:d.commands.length,hasManifest:d.hasManifest,name:d.name,topicCount:d.topics.length,type:d.type,usesMain:!!d.pjson.main}),g?.stop(),this.plugins.set(d.name,d),n&&(d.parent=n,n.children||(n.children=[]),n.children.push(d)),d.pjson.oclif.plugins){let f=r==="dev"?{...d.pjson.dependencies,...d.pjson.devDependencies}:d.pjson.dependencies,p=gr(f??{},d.pjson.oclif.plugins);await this.loadPlugins(d.root,r,p,d)}}catch(c){this.errors.push(c)}})),o?.addDetails({pluginCount:i.length}),o?.stop()}async loadUserPlugins(t){if(t.userPlugins!==!1)try{let r=(0,cu.join)(t.dataDir,"package.json");Bm("reading user plugins pjson %s",r);let i=await(0,lu.readJson)(r);i.oclif||(i.oclif={schema:1}),i.oclif.plugins||(i.oclif.plugins=[]),await this.loadPlugins(r,"user",i.oclif.plugins.filter(n=>n.type==="user")),await this.loadPlugins(r,"link",i.oclif.plugins.filter(n=>n.type==="link"))}catch(r){r.code!=="ENOENT"&&process.emitWarning(r)}}};Dt.default=hu});var Jm=E((Ue,zm)=>{"use strict";y();var a_=Ue&&Ue.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),u_=Ue&&Ue.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),c_=Ue&&Ue.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&a_(t,e,r);return u_(t,e),t},mu=Ue&&Ue.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ue,"__esModule",{value:!0});Ue.Config=void 0;var l_=c_(yc()),h_=mu(Z0()),ii=F("node:os"),Ct=F("node:path"),Lm=F("node:url"),Hm=mu(Ve()),f_=Bi(),d_=er(),ni=$e(),p_=Mr(),m_=xi(),we=Yr(),fu=Pt(),$m=yt(),qm=_p(),Bs=oe(),g_=mu(Rm()),y_=Pr(),Hi=Or(),Ui=(0,Hi.Debug)(),Um=Hm.default.getInstance().get("@oclif/core"),du=`${Um.name}@${Um.version}`,v_=new Set(["preparse"]);function x_(e){let t=e.match(/[^-]+(?:-([^.]+))?/);return t&&t[1]||"stable"}function w_(e){return e&&!!e._base}var Rs=class extends Map{validPermutations=new Map;add(t,r){this.validPermutations.set(t,r);for(let i of(0,Hi.collectUsableIds)([t]))this.has(i)?this.set(i,this.get(i).add(r)):this.set(i,new Set([r]))}get(t){return super.get(t)??new Set}getAllValid(){return[...this.validPermutations.keys()]}getValid(t){return this.validPermutations.get(t)}hasValid(t){return this.validPermutations.has(t)}},pu=class e{options;arch;bin;binAliases;binPath;cacheDir;channel;configDir;dataDir;debug=0;dirname;errlog;flexibleTaxonomy;home;isSingleCommandCLI=!1;name;npmRegistry;nsisCustomization;pjson;platform;plugins=new Map;root;shell;theme;topicSeparator=":";userAgent;userPJSON;valid;version;warned=!1;windows;_base=du;_commandIDs;_commands=new Map;_topics=new Map;commandPermutations=new Rs;pluginLoader;rootPlugin;topicPermutations=new Rs;constructor(t){this.options=t}static async load(t=zm.filename||__dirname){if(typeof t=="string"&&t.startsWith("file://")&&(t=(0,Lm.fileURLToPath)(t)),typeof t=="string"&&(t={root:t}),w_(t)){if(du!==t._base){Ui(`reloading config from ${t._base} to ${du}`);let i=new e({...t.options,plugins:t.plugins});return await i.load(),i}return t}let r=new e(t);return await r.load(),r}static get rootPlugin(){return this.rootPlugin}get commandIDs(){return this._commandIDs?this._commandIDs:(this._commandIDs=this.commands.map(t=>t.id),this._commandIDs)}get commands(){return[...this._commands.values()]}get isProd(){return(0,Bs.isProd)()}get topics(){return[...this._topics.values()]}get versionDetails(){let[t,r,i]=this.userAgent.split(" ");return{architecture:r,cliVersion:t,nodeVersion:i,osVersion:`${(0,ii.type)()} ${(0,ii.release)()}`,pluginVersions:Object.fromEntries([...this.plugins.values()].map(n=>[n.name,{root:n.root,type:n.type,version:n.version}])),rootPath:this.root,shell:this.shell}}dir(t){let r=process.env[`XDG_${t.toUpperCase()}_HOME`]||this.windows&&process.env.LOCALAPPDATA||(0,Ct.join)(this.home,t==="data"?".local/share":"."+t);return(0,Ct.join)(r,this.dirname)}findCommand(t,r={}){let i=this.getCmdLookupId(t),n=this._commands.get(i);return r.must&&!n&&(0,ni.error)(`command ${i} not found`),n}findMatches(t,r){let i=r.filter(s=>!(0,p_.getHelpFlagAdditions)(this).includes(s)&&s.startsWith("-")).map(s=>s.replaceAll("-",""));return[...this.commandPermutations.get(t)].map(s=>this._commands.get(s)).filter(s=>{let c=Object.entries(s.flags).flatMap(([h,g])=>g.char?[g.char,h]:[h]);return i.every(h=>c.includes(h))})}findTopic(t,r={}){let i=this.getTopicLookupId(t),n=this._topics.get(i);if(n)return n;if(r.must)throw new Error(`topic ${t} not found`)}getAllCommandIDs(){return this.getAllCommands().map(t=>t.id)}getAllCommands(){let t=[...this._commands.values()],r=[...this.commandPermutations.getAllValid()];for(let i of r)if(!this._commands.has(i)){let n=this._commands.get(this.getCmdLookupId(i));t.push({...n,id:i})}return t}getPluginsList(){return[...this.plugins.values()]}async load(){fu.settings.performanceEnabled=(fu.settings.performanceEnabled===void 0?this.options.enablePerf:fu.settings.performanceEnabled)??!1;let t=we.Performance.mark(we.OCLIF_MARKER_OWNER,"config.load");this.pluginLoader=new g_.default({plugins:this.options.plugins,root:this.options.root}),this.rootPlugin=await this.pluginLoader.loadRoot({pjson:this.options.pjson});let r=Hm.default.getInstance();if(r.set("rootPlugin",this.rootPlugin),r.set("exitCodes",this.rootPlugin.pjson.oclif.exitCodes??{}),this.root=this.rootPlugin.root,this.pjson=this.rootPlugin.pjson,this.plugins.set(this.rootPlugin.name,this.rootPlugin),this.root=this.rootPlugin.root,this.pjson=this.rootPlugin.pjson,this.name=this.pjson.name,this.version=this.options.version||this.pjson.version||"0.0.0",this.channel=this.options.channel||x_(this.version),this.valid=this.rootPlugin.valid,this.arch=(0,ii.arch)()==="ia32"?"x86":(0,ii.arch)(),this.platform=h_.default?"wsl":(0,qm.getPlatform)(),this.windows=this.platform==="win32",this.bin=this.pjson.oclif.bin||this.name,this.binAliases=this.pjson.oclif.binAliases,this.nsisCustomization=this.pjson.oclif.nsisCustomization,this.dirname=this.pjson.oclif.dirname||this.name,this.flexibleTaxonomy=this.pjson.oclif.flexibleTaxonomy||!1,this.pjson.oclif.topicSeparator&&[" ",":"].includes(this.pjson.oclif.topicSeparator)&&(this.topicSeparator=this.pjson.oclif.topicSeparator),this.platform==="win32"&&(this.dirname=this.dirname.replace("/","\\")),this.userAgent=`${this.name}/${this.version} ${this.platform}-${this.arch} node-${process.version}`,this.shell=this._shell(),this.debug=this._debug(),this.home=process.env.HOME||this.windows&&this.windowsHome()||(0,qm.getHomeDir)()||(0,ii.tmpdir)(),this.cacheDir=this.scopedEnvVar("CACHE_DIR")||this.macosCacheDir()||this.dir("cache"),this.configDir=this.scopedEnvVar("CONFIG_DIR")||this.dir("config"),this.dataDir=this.scopedEnvVar("DATA_DIR")||this.dir("data"),this.errlog=(0,Ct.join)(this.cacheDir,"error.log"),this.binPath=this.scopedEnvVar("BINPATH"),this.npmRegistry=this.scopedEnvVar("NPM_REGISTRY")||this.pjson.oclif.npmRegistry,!this.scopedEnvVarTrue("DISABLE_THEME")){let{theme:n}=await this.loadThemes();this.theme=n}this.pjson.oclif.update=this.pjson.oclif.update||{},this.pjson.oclif.update.node=this.pjson.oclif.update.node||{};let i=this.pjson.oclif.update.s3||{};this.pjson.oclif.update.s3=i,i.bucket=this.scopedEnvVar("S3_BUCKET")||i.bucket,i.bucket&&!i.host&&(i.host=`https://${i.bucket}.s3.amazonaws.com`),i.templates={...i.templates,target:{baseDir:"<%- bin %>",manifest:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- platform %>-<%- arch %>",unversioned:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-<%- platform %>-<%- arch %><%- ext %>",versioned:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-v<%- version %>/<%- bin %>-v<%- version %>-<%- platform %>-<%- arch %><%- ext %>",...i.templates&&i.templates.target},vanilla:{baseDir:"<%- bin %>",manifest:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %>version",unversioned:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %><%- ext %>",versioned:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-v<%- version %>/<%- bin %>-v<%- version %><%- ext %>",...i.templates&&i.templates.vanilla}},this.isSingleCommandCLI=!!(this.pjson.oclif.default||typeof this.pjson.oclif.commands!="string"&&this.pjson.oclif.commands?.strategy==="single"&&this.pjson.oclif.commands?.target),await this.loadPluginsAndCommands(),Ui("config done"),t?.addDetails({commandPermutations:this.commands.length,commands:[...this.plugins.values()].reduce((n,o)=>n+o.commands.length,0),plugins:this.plugins.size,topics:this.topics.length}),t?.stop()}async loadPluginsAndCommands(t){let r=we.Performance.mark(we.OCLIF_MARKER_OWNER,"config.loadAllPlugins"),{errors:i,plugins:n}=await this.pluginLoader.loadChildren({dataDir:this.dataDir,devPlugins:this.options.devPlugins,force:t?.force??!1,pluginAdditions:this.options.pluginAdditions,rootPlugin:this.rootPlugin,userPlugins:this.options.userPlugins});this.plugins=n,r?.stop();let o=we.Performance.mark(we.OCLIF_MARKER_OWNER,"config.loadAllCommands");for(let s of this.plugins.values())this.loadCommands(s),this.loadTopics(s);o?.stop();for(let s of i)this.warn(s)}async loadThemes(){let t=this.pjson.oclif.theme?(0,Ct.resolve)(this.root,this.pjson.oclif.theme):this.pjson.oclif.theme,r=(0,Ct.resolve)(this.configDir,"theme.json"),[i,n]=await Promise.all([t?await(0,$m.safeReadJson)(t):void 0,await(0,$m.safeReadJson)(r)]),o={...i,...n};return{file:n?r:t,theme:Object.keys(o).length>0?(0,d_.parseTheme)(o):void 0}}macosCacheDir(){return this.platform==="darwin"&&(0,Ct.join)(this.home,"Library","Caches",this.dirname)||void 0}async runCommand(t,r=[],i=null){let n=we.Performance.mark(we.OCLIF_MARKER_OWNER,`config.runCommand#${t}`);Ui("runCommand %s %o",t,r);let o=i??this.findCommand(t);if(!o){let h=this.flexibleTaxonomy?this.findMatches(t,r):[],g=this.flexibleTaxonomy&&h.length>0?await this.runHook("command_incomplete",{argv:r,id:t,matches:h}):await this.runHook("command_not_found",{argv:r,id:t});if(g.successes[0])return g.successes[0].result;throw g.failures[0]?g.failures[0].error:new ni.CLIError(`command ${t} not found`)}if(this.isJitPluginCommand(o)){let h=o.pluginName,g=this.pjson.oclif.jitPlugins[h],d=await this.runHook("jit_plugin_not_installed",{argv:r,command:o,id:t,pluginName:h,pluginVersion:g});if(d.failures[0])throw d.failures[0].error;if(d.successes[0])await this.loadPluginsAndCommands({force:!0}),o=this.findCommand(t)??o;else{let f=await this.runHook("command_not_found",{argv:r,id:t});if(f.successes[0])return f.successes[0].result;throw f.failures[0]?f.failures[0].error:new ni.CLIError(`command ${t} not found`)}}let s=await o.load();await this.runHook("prerun",{Command:s,argv:r});let c=await s.run(r,this);if(o.id==="plugins:uninstall")for(let h of r)this.plugins.delete(h);return await this.runHook("postrun",{Command:s,argv:r,result:c}),n?.addDetails({command:t,plugin:o.pluginName}),n?.stop(),c}async runHook(t,r,i,n){let o=we.Performance.mark(we.OCLIF_MARKER_OWNER,`config.runHook#${t}`);Ui("start %s hook",t);let s=f=>typeof f=="function"?f:f.default&&typeof f.default=="function"?f.default:Object.values(f).find(p=>typeof p=="function"),c=async(f,p)=>{let a,u=new Promise((l,m)=>{a=setTimeout(()=>{m(new Error(`Timed out after ${f} ms.`))},f).unref()});return Promise.race([p,u]).then(l=>(clearTimeout(a),l))},h={failures:[],successes:[]},d=(v_.has(t)?[this.rootPlugin]:[...this.plugins.values()]).map(async f=>{let p=et()([this.bin,f.name,"hooks",t].join(":")),a={config:this,debug:p,error(l,m={}){(0,ni.error)(l,m)},exit(l=0){(0,ni.exit)(l)},log(l,...m){f_.ux.info(l,...m)},warn(l){(0,ni.warn)(l)}},u=f.hooks[t]||[];for(let l of u){let m=we.Performance.mark(we.OCLIF_MARKER_OWNER,`config.runHook#${f.name}(${l.target})`);try{let{filePath:v,isESM:x,module:w}=await(0,m_.loadWithData)(f,await(0,y_.tsPath)(f.root,l.target,f));p("start",x?"(import)":"(require)",v);let C=w[l.identifier]??(l.identifier==="default"?s(w):void 0);if(!C){p("No hook found for hook definition:",l);continue}let S=i?await c(i,C.call(a,{...r,config:this,context:a})):await C.call(a,{...r,config:this,context:a});h.successes.push({plugin:f,result:S}),f.name==="@oclif/plugin-legacy"&&t==="init"&&this.insertLegacyPlugins(S),p("done")}catch(v){if(h.failures.push({error:v,plugin:f}),p(v),!n&&v.oclif?.exit!==void 0&&v.oclif?.exit!==0&&v.code!=="MODULE_NOT_FOUND")throw v}m?.addDetails({event:t,hook:l.target,plugin:f.name}),m?.stop()}});return await Promise.all(d),Ui("%s hook done",t),o?.stop(),h}s3Key(t,r,i={}){typeof r=="object"?i=r:r&&(i.ext=r);let n=this.pjson.oclif.update.s3.templates[i.platform?"target":"vanilla"][t]??"";return l_.render(n,{...this,...i})}s3Url(t){let{host:r}=this.pjson.oclif.update.s3;if(!r)throw new Error("no s3 host is set");let i=new Lm.URL(r);return i.pathname=(0,Ct.join)(i.pathname,t),i.toString()}scopedEnvVar(t){return process.env[this.scopedEnvVarKeys(t).find(r=>process.env[r])]}scopedEnvVarKey(t){return[this.bin,t].map(r=>r.replaceAll("@","").replaceAll(/[/-]/g,"_")).join("_").toUpperCase()}scopedEnvVarKeys(t){return[this.bin,...this.binAliases??[]].filter(Boolean).map(r=>[r.replaceAll("@","").replaceAll(/[/-]/g,"_"),t].join("_").toUpperCase())}scopedEnvVarTrue(t){let r=this.scopedEnvVar(t);return r==="1"||r==="true"}warn(t,r){if(!this.warned){if(typeof t=="string"){process.emitWarning(t);return}if(t instanceof Error){let i=t;i.name=`${t.name} Plugin: ${this.name}`,i.detail=(0,Bs.compact)([t.detail,`module: ${this._base}`,r&&`task: ${r}`,`plugin: ${this.name}`,`root: ${this.root}`,"See more details with DEBUG=*"]).join(`
138
138
  `),process.emitWarning(t);return}process.emitWarning("Config.warn expected either a string or Error, but instead received an object"),t.name=`${t.name} Plugin: ${this.name}`,t.detail=(0,Bs.compact)([t.detail,`module: ${this._base}`,r&&`task: ${r}`,`plugin: ${this.name}`,`root: ${this.root}`,"See more details with DEBUG=*"]).join(`
139
- `),process.emitWarning(JSON.stringify(t))}}windowsHome(){return this.windowsHomedriveHome()||this.windowsUserprofileHome()}windowsHomedriveHome(){return process.env.HOMEDRIVE&&process.env.HOMEPATH&&(0,Ct.join)(process.env.HOMEDRIVE,process.env.HOMEPATH)}windowsUserprofileHome(){return process.env.USERPROFILE}_debug(){if(this.scopedEnvVarTrue("DEBUG"))return 1;try{let{enabled:t}=et()(this.bin);if(t)return 1}catch{}return 0}_shell(){let t,{COMSPEC:r}=process.env,i=process.env.SHELL??(0,ii.userInfo)().shell?.split(Ct.sep)?.pop();return i?t=i.split("/"):this.windows&&r?t=r.split(/\\|\//):t=["unknown"],t.at(-1)??"unknown"}determinePriority(t){let r=this.pjson.oclif?.plugins??[];return t.sort((n,o)=>{let s=n.pluginAlias??"A-Cannot-Find-This",c=o.pluginAlias??"B-Cannot-Find-This",h=r.indexOf(s),g=r.indexOf(c);return n.pluginType==="core"&&o.pluginType==="core"?h-g:o.pluginType==="core"&&n.pluginType!=="core"?1:n.pluginType==="core"&&o.pluginType!=="core"?-1:n.pluginType==="jit"&&o.pluginType!=="jit"?1:o.pluginType==="jit"&&n.pluginType!=="jit"?-1:0})[0]}getCmdLookupId(t){return this._commands.has(t)?t:this.commandPermutations.hasValid(t)?this.commandPermutations.getValid(t):t}getTopicLookupId(t){return this._topics.has(t)?t:this.topicPermutations.hasValid(t)?this.topicPermutations.getValid(t):t}insertLegacyPlugins(t){for(let r of t){this.plugins.set(r.name,r);for(let i of r.commands??[]){this._commands.delete(i.id);for(let n of[...i.aliases??[],...i.hiddenAliases??[]])this._commands.delete(n)}this.loadCommands(r)}}isJitPluginCommand(t){return Object.keys(this.pjson.oclif.jitPlugins??{}).includes(t.pluginName??"")&&!!(t?.pluginName&&!this.plugins.has(t.pluginName))}loadCommands(t){let r=we.Performance.mark(we.OCLIF_MARKER_OWNER,`config.loadCommands#${t.name}`,{plugin:t.name});for(let i of t.commands){if(this._commands.has(i.id)){let s=this.determinePriority([this._commands.get(i.id),i]);this._commands.set(s.id,s)}else this._commands.set(i.id,i);let n=this.flexibleTaxonomy&&i.permutations===void 0?(0,Hi.getCommandIdPermutations)(i.id):i.permutations??[i.id];for(let s of n)this.commandPermutations.add(s,i.id);let o=(s,c=!1)=>{if(this._commands.has(s)){let g=this.determinePriority([this._commands.get(s),i]);this._commands.set(s,{...g,id:s})}else this._commands.set(s,{...i,hidden:c,id:s});let h=this.flexibleTaxonomy&&i.aliasPermutations===void 0?(0,Hi.getCommandIdPermutations)(s):i.permutations??[s];for(let g of h)this.commandPermutations.add(g,i.id)};for(let s of i.aliases??[])o(s);for(let s of i.hiddenAliases??[])o(s,!0)}r?.addDetails({commandCount:t.commands.length}),r?.stop()}loadTopics(t){let r=we.Performance.mark(we.OCLIF_MARKER_OWNER,`config.loadTopics#${t.name}`,{plugin:t.name});for(let i of(0,Bs.compact)(t.topics)){let n=this._topics.get(i.name);n?(n.description=i.description||n.description,n.hidden=n.hidden||i.hidden):this._topics.set(i.name,i);let o=this.flexibleTaxonomy?(0,Hi.getCommandIdPermutations)(i.name):[i.name];for(let s of o)this.topicPermutations.add(s,i.name)}for(let i of t.commands.filter(n=>!n.hidden)){let n=i.id.split(":");for(;n.length>0;){let o=n.join(":");o&&!this._topics.has(o)&&this._topics.set(o,{description:i.summary||i.description,name:o}),n.pop()}}r?.stop()}};Ue.Config=pu});var Ls=E($t=>{"use strict";y();Object.defineProperty($t,"__esModule",{value:!0});$t.tsPath=$t.Plugin=$t.Config=void 0;var E_=Jm();Object.defineProperty($t,"Config",{enumerable:!0,get:function(){return E_.Config}});var b_=uu();Object.defineProperty($t,"Plugin",{enumerable:!0,get:function(){return b_.Plugin}});var D_=Pr();Object.defineProperty($t,"tsPath",{enumerable:!0,get:function(){return D_.tsPath}})});var Wm=E($s=>{"use strict";y();Object.defineProperty($s,"__esModule",{value:!0});$s.renderList=void 0;var C_=Yt(),S_=oe(),A_=ay();function __(e,t){return A_(e,C_.stdtermwidth,{skipScheme:"ansi-color"})(t).trim()}function F_(e){if(e.length===0)return"";let t=(0,S_.maxBy)(e,i=>i[0].length)?.[0].length??0;return e.map(i=>{let n=i[0],o=i[1];return o?(n=n.padEnd(t),o=__(t+2,o),`${n} ${o}`):n}).join(`
139
+ `),process.emitWarning(JSON.stringify(t))}}windowsHome(){return this.windowsHomedriveHome()||this.windowsUserprofileHome()}windowsHomedriveHome(){return process.env.HOMEDRIVE&&process.env.HOMEPATH&&(0,Ct.join)(process.env.HOMEDRIVE,process.env.HOMEPATH)}windowsUserprofileHome(){return process.env.USERPROFILE}_debug(){if(this.scopedEnvVarTrue("DEBUG"))return 1;try{let{enabled:t}=et()(this.bin);if(t)return 1}catch{}return 0}_shell(){let t,{COMSPEC:r}=process.env,i=process.env.SHELL??(0,ii.userInfo)().shell?.split(Ct.sep)?.pop();return i?t=i.split("/"):this.windows&&r?t=r.split(/\\|\//):t=["unknown"],t.at(-1)??"unknown"}determinePriority(t){let r=this.pjson.oclif?.plugins??[];return t.sort((n,o)=>{let s=n.pluginAlias??"A-Cannot-Find-This",c=o.pluginAlias??"B-Cannot-Find-This",h=r.indexOf(s),g=r.indexOf(c);return n.pluginType==="core"&&o.pluginType==="core"?h-g:o.pluginType==="core"&&n.pluginType!=="core"?1:n.pluginType==="core"&&o.pluginType!=="core"?-1:n.pluginType==="jit"&&o.pluginType!=="jit"?1:o.pluginType==="jit"&&n.pluginType!=="jit"?-1:0})[0]}getCmdLookupId(t){return this._commands.has(t)?t:this.commandPermutations.hasValid(t)?this.commandPermutations.getValid(t):t}getTopicLookupId(t){return this._topics.has(t)?t:this.topicPermutations.hasValid(t)?this.topicPermutations.getValid(t):t}insertLegacyPlugins(t){for(let r of t){this.plugins.set(r.name,r);for(let i of r.commands??[]){this._commands.delete(i.id);for(let n of[...i.aliases??[],...i.hiddenAliases??[]])this._commands.delete(n)}this.loadCommands(r)}}isJitPluginCommand(t){return Object.keys(this.pjson.oclif.jitPlugins??{}).includes(t.pluginName??"")&&!!(t?.pluginName&&!this.plugins.has(t.pluginName))}loadCommands(t){let r=we.Performance.mark(we.OCLIF_MARKER_OWNER,`config.loadCommands#${t.name}`,{plugin:t.name});for(let i of t.commands){if(this._commands.has(i.id)){let s=this.determinePriority([this._commands.get(i.id),i]);this._commands.set(s.id,s)}else this._commands.set(i.id,i);let n=this.flexibleTaxonomy&&i.permutations===void 0?(0,Hi.getCommandIdPermutations)(i.id):i.permutations??[i.id];for(let s of n)this.commandPermutations.add(s,i.id);let o=(s,c=!1)=>{if(this._commands.has(s)){let g=this.determinePriority([this._commands.get(s),i]);this._commands.set(s,{...g,id:s})}else this._commands.set(s,{...i,hidden:c,id:s});let h=this.flexibleTaxonomy&&i.aliasPermutations===void 0?(0,Hi.getCommandIdPermutations)(s):i.permutations??[s];for(let g of h)this.commandPermutations.add(g,i.id)};for(let s of i.aliases??[])o(s);for(let s of i.hiddenAliases??[])o(s,!0)}r?.addDetails({commandCount:t.commands.length}),r?.stop()}loadTopics(t){let r=we.Performance.mark(we.OCLIF_MARKER_OWNER,`config.loadTopics#${t.name}`,{plugin:t.name});for(let i of(0,Bs.compact)(t.topics)){let n=this._topics.get(i.name);n?(n.description=i.description||n.description,n.hidden=n.hidden||i.hidden):this._topics.set(i.name,i);let o=this.flexibleTaxonomy?(0,Hi.getCommandIdPermutations)(i.name):[i.name];for(let s of o)this.topicPermutations.add(s,i.name)}for(let i of t.commands.filter(n=>!n.hidden)){let n=i.id.split(":");for(;n.length>0;){let o=n.join(":");o&&!this._topics.has(o)&&this._topics.set(o,{description:i.summary||i.description,name:o}),n.pop()}}r?.stop()}};Ue.Config=pu});var Ls=E($t=>{"use strict";y();Object.defineProperty($t,"__esModule",{value:!0});$t.tsPath=$t.Plugin=$t.Config=void 0;var E_=Jm();Object.defineProperty($t,"Config",{enumerable:!0,get:function(){return E_.Config}});var b_=uu();Object.defineProperty($t,"Plugin",{enumerable:!0,get:function(){return b_.Plugin}});var D_=Pr();Object.defineProperty($t,"tsPath",{enumerable:!0,get:function(){return D_.tsPath}})});var Wm=E($s=>{"use strict";y();Object.defineProperty($s,"__esModule",{value:!0});$s.renderList=void 0;var C_=Yt(),S_=oe(),A_=uy();function __(e,t){return A_(e,C_.stdtermwidth,{skipScheme:"ansi-color"})(t).trim()}function F_(e){if(e.length===0)return"";let t=(0,S_.maxBy)(e,i=>i[0].length)?.[0].length??0;return e.map(i=>{let n=i[0],o=i[1];return o?(n=n.padEnd(t),o=__(t+2,o),`${n} ${o}`):n}).join(`
140
140
  `)}$s.renderList=F_});var Du=E(Z=>{"use strict";y();var Gm=Z&&Z.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Z,"__esModule",{value:!0});Z.FailedFlagValidationError=Z.ArgInvalidOptionError=Z.FlagInvalidOptionError=Z.NonExistentFlagsError=Z.UnexpectedArgsError=Z.RequiredArgsError=Z.InvalidArgsSpecError=Z.CLIParseError=Z.CLIError=void 0;var k_=Gm(Be()),zi=Gm(Ve()),Xm=Wm(),T_=$e(),O_=oe(),P_=$e();Object.defineProperty(Z,"CLIError",{enumerable:!0,get:function(){return P_.CLIError}});var lt=class extends T_.CLIError{parse;showHelp=!1;constructor(t){t.message+=`
141
141
  See more help with --help`,super(t.message,{exit:t.exit}),this.parse=t.parse}};Z.CLIParseError=lt;var gu=class extends lt{args;constructor({args:t,exit:r,parse:i}){let n="Invalid argument spec",o=Object.values(t).filter(s=>s.name);if(o.length>0){let s=(0,Xm.renderList)(o.map(c=>[`${c.name} (${c.required?"required":"optional"})`,c.description]));n+=`:
142
142
  ${s}`}super({exit:zi.default.getInstance().get("exitCodes")?.invalidArgsSpec??r,message:n,parse:i}),this.args=t}};Z.InvalidArgsSpecError=gu;var yu=class extends lt{args;constructor({args:t,exit:r,flagsWithMultiple:i,parse:n}){let o=`Missing ${t.length} required arg${t.length===1?"":"s"}`,s=t.filter(c=>c.name);if(s.length>0){let c=(0,Xm.renderList)(s.map(h=>{let g=h.options?`(${h.options.join("|")}) ${h.description}`:h.description;return[h.name,g]}));o+=`:
@@ -151,7 +151,7 @@ See more help with --help`,Vm.default.getInstance().get("exitCodes")?.failedFlag
151
151
  `)}}vF();O.Args=vr(Wc());O.ux=vr(Bi());var xF=Hn();Object.defineProperty(O,"flush",{enumerable:!0,get:function(){return xF.flush}});var hg=Sp();Object.defineProperty(O,"stderr",{enumerable:!0,get:function(){return hg.stderr}});Object.defineProperty(O,"stdout",{enumerable:!0,get:function(){return hg.stdout}});var wF=og();Object.defineProperty(O,"Command",{enumerable:!0,get:function(){return wF.Command}});var fg=Ls();Object.defineProperty(O,"Config",{enumerable:!0,get:function(){return fg.Config}});Object.defineProperty(O,"Plugin",{enumerable:!0,get:function(){return fg.Plugin}});O.Errors=vr($e());var EF=jn();Object.defineProperty(O,"handle",{enumerable:!0,get:function(){return EF.handle}});var bF=ug();Object.defineProperty(O,"execute",{enumerable:!0,get:function(){return bF.execute}});O.Flags=vr(ss());var Js=Ci();Object.defineProperty(O,"CommandHelp",{enumerable:!0,get:function(){return Js.CommandHelp}});Object.defineProperty(O,"Help",{enumerable:!0,get:function(){return Js.Help}});Object.defineProperty(O,"HelpBase",{enumerable:!0,get:function(){return Js.HelpBase}});Object.defineProperty(O,"loadHelpClass",{enumerable:!0,get:function(){return Js.loadHelpClass}});O.Interfaces=vr(lg());var DF=Tu();Object.defineProperty(O,"run",{enumerable:!0,get:function(){return DF.run}});O.ModuleLoader=vr(xi());O.Parser=vr(Su());var CF=Yr();Object.defineProperty(O,"Performance",{enumerable:!0,get:function(){return CF.Performance}});var SF=Pt();Object.defineProperty(O,"settings",{enumerable:!0,get:function(){return SF.settings}});var dg=Nr();Object.defineProperty(O,"toConfiguredId",{enumerable:!0,get:function(){return dg.toConfiguredId}});Object.defineProperty(O,"toStandardizedId",{enumerable:!0,get:function(){return dg.toStandardizedId}})});y();import{createRequire as hy}from"node:module";import{pathToFileURL as $c}from"node:url";var qc=hy(import.meta.url);async function Uc(e){let t=qc.resolve("vite",process.env.SHOPIFY_UNIT_TEST?void 0:{paths:[e]}),r=await kc(t),i=r.content.exports?.["."];typeof i!="string"&&(i=i?.import),typeof i!="string"&&(i=i.default);let n=M(le(r.path),i);return import($c(n).href)}function fy(e,t){let r=qc.resolve(e,process.env.SHOPIFY_UNIT_TEST?void 0:{paths:[t]});return import($c(r).href)}y();var c0=rn(Ws(),1);y();var ee=rn(Ws(),1);y();y();y();import{fileURLToPath as pg}from"node:url";import{existsSync as FF}from"node:fs";y();import{exec as AF}from"node:child_process";import{promisify as _F}from"node:util";var Qe=_F(AF);function BN(){let e=process.listeners("warning")[0];e&&(process.removeAllListeners("warning"),process.prependListener("warning",t=>{t.name!="ExperimentalWarning"&&e(t)}))}var Pu=new URL("../../..",import.meta.url).pathname,Gi=(()=>{try{let e=M(le(Pu),"templates","skeleton");return FF(e)}catch{return!1}})(),WN=Gi?Pu:void 0,kF="assets/hydrogen",TF="starter",Ht="routes",Ou;async function OF(){if(Ou??=await pc("package.json",{cwd:pg(import.meta.url),type:"file"}),!Ou)throw new I("Could not find assets directory","Please report this error.");return Ou}async function Ze(e,...t){return M(le(await OF()),process.env.SHOPIFY_UNIT_TEST?"assets":`dist/${kF}`,e??"",...t)}async function Xi(e,t){t??=await Iu();let r=new URL(`${t}/app${e?`/${e}`:""}`,import.meta.url);return r.protocol==="file:"?pg(r):r.toString()}function Iu(e=!!process.env.SHOPIFY_UNIT_TEST){return e?Gs():Ze(TF)}function Gs(){if(!Gi)throw new I("Trying to use skeleton source dir outside of Hydrogen monorepo.","Please report this error.");return M(le(Pu),"templates","skeleton")}function PF(){return M(Gs(),"node_modules")}async function mg(){if(Gi)return PF();let{stdout:e}=await Qe("npm root");return e.trim()}var Nu=["tailwind","vanilla-extract","css-modules","postcss"];async function gg(e,t,r,i=(n,o)=>n){let n=await Ze(e);return Promise.all(Object.entries(t).map(async([o,s])=>{let c=await X(M(n,o));await V(M(r,s),i(c,o))}))}async function yg(e,t,r){let i=Object.values(e).map(o=>U(M(t,o)).then(s=>s?o:null)),n=(await Promise.all(i)).filter(Boolean);return!(n.length>0&&!r&&!await rt({message:`Some files already exist (${n.join(", ")}). Overwrite?`,defaultValue:!1}))}y();y();import{readdir as IF}from"node:fs/promises";y();ly();import*as vg from"fs/promises";import*as xg from"path";var Mu={arrowParens:"always",singleQuote:!0,bracketSpacing:!1,trailingComma:"all"};async function ft(e=process.cwd()){let t=(await vg.lstat(e)).isFile()?e:xg.resolve(e,"prettier.file");try{return await Bc(t)||Mu}catch{return Mu}}async function zt(e,t=Mu,r=""){let i=nn(r);return Rc(e,{parser:i===".tsx"||i===".ts"?"typescript":"babel",...t})}async function ui(e,t,r){let i=await r(await X(e));if(typeof i=="string")return t&&(i=await zt(i,t,e)),V(e,i)}var NF=["tsx","ts","jsx","js","mjs","cjs"];async function be(e,t,r=NF){let i=await IF(e);if(i.includes(t)){let n=J(e,t);if(!await an(n))return{filepath:n};for(let o of["ts","js"]){let s=J(e,`${t}/index.${o}`);if(await U(J(e,s)))return{filepath:s,extension:o,astType:o}}}else for(let n of r){let o=`${t}.${n}`;if(i.includes(o)){let s=n==="mjs"||n==="cjs"?"js":n;return{filepath:J(e,o),extension:n,astType:s}}}return{}}var wg=Object.freeze(["dependencies","devDependencies","peerDependencies"]);async function Xs(e,t,r){let i=await ho(M(t,"package.json")),n=await ho(M(e,"package.json")),o=new Set(["comment",...r?.ignoredKeys??[]]),s=Object.keys(n).filter(h=>!wg.includes(h));for(let h of s){if(o.has(h))continue;let g=n[h],d=i[h],f=Array.isArray(g)&&Array.isArray(d)?[...d,...g]:typeof g=="object"&&typeof d=="object"?{...d,...g}:g;i[h]=f}let c=Object.entries(i.dependencies||{}).find(([h])=>h.startsWith("@remix-run/"))?.[1];for(let h of wg)o.has(h)||n[h]&&(i[h]=[...new Set([...Object.keys(i[h]??{}),...Object.keys(n[h]??{})])].sort().reduce((g,d)=>{let f=n[h]?.[d]??i[h]?.[d];return d.startsWith("@remix-run/")&&c&&(f=c),g[d]=f,g},{}));await Tc(t,r?.onResult?.(i)??i)}y();y();async function Vi(e){let t=await import("@ast-grep/napi");if(!(e in t))throw new Error(`Wrong language for AST: ${e}`);return t[e]}async function Eg(e,t,r){let{filepath:i,astType:n}=await be(e,"root");if(!i||!n)throw new I(`Could not find root file in ${e}`);await ui(i,t,async o=>{let s=`import ${r.isDefault?r.name:`{${r.name}}`} from '${(r.isAbsolute?"":"./")+r.path}';`;if(o.includes(s.split("from")[0]))return;let h=(await Vi(n)).parse(o).root(),g=h.findAll({rule:{kind:"import_statement"}}).reverse(),d=g.find(l=>l.text().includes(".css"))||g.shift(),f=h.find({rule:{kind:"jsx_element",regex:"resetStyles",has:{kind:"jsx_opening_element",has:{kind:"identifier",pattern:"link"}}}});if(!d||!f)throw new I('Could not find a "links" export in root file. Please add one and try again.');let p=d.text(),a=f.text(),u=r.isConditional?`{${r.name} && <link rel="stylesheet" href={${r.name}}></link>}`:`<link rel="stylesheet" href={${r.name}}></link>`;return o.replace(p,p+`
152
152
  `+s).replace(a,u+`
153
153
  `+a)})}async function Vs(e,t,r,i){let{filepath:n,astType:o}=await be(e,"vite.config");if(!n||!o)throw new I(`Could not find vite.config file in ${e}`);await ui(n,t,async s=>{let c=`import ${r.isDefault?r.name:`{${r.name}}`} from '${r.path}';`;if(new RegExp(`['"]${r.path.replace("/","\\/")}['"]`).test(s))return;let g=(await Vi(o)).parse(s).root(),d=g.findAll({rule:{kind:"import_statement"}}).pop(),f=g.find(MF);if(!d||!f)throw new I('Could not find a "plugins" key in Vite config file. Please add one and try again.');let p=d.text(),a=f.text(),u=`${r.name}(${i?JSON.stringify(i):""})`;return s.replace(p,p+`
154
- `+c).replace(a,a.replace("[",`[${u},`))})}var MF={rule:{pattern:"[$$$]",inside:{kind:"pair",stopBy:"neighbor",has:{field:"key",regex:"^plugins$",stopBy:"neighbor"},inside:{kind:"object",stopBy:"neighbor",all:[{inside:{kind:"export_statement",regex:"export default",stopBy:"end"}},{not:{inside:{kind:"object",stopBy:"end"}}}]}}}};var bg="styles/tailwind.css";async function Dg({rootDirectory:e,appDirectory:t},r=!1){let i=kt(e,t),n={"tailwind.css":M(i,bg)};if(!await yg(n,t,r)){it("Skipping CSS setup as some files already exist. You may use `--force` or `-f` to override it.");return}return{workPromise:Promise.all([Xs(await Ze("tailwind"),e),gg("tailwind",n,e),ft(e).then(s=>Promise.all([Eg(t,s,{name:"tailwindCss",path:`${bg}?url`,isDefault:!0}),Vs(e,s,{name:"tailwindcss",path:"@tailwindcss/vite",isDefault:!0})]))]),generatedAssets:Object.values(n),needsInstallDeps:!0}}y();async function Cg({rootDirectory:e}){return{workPromise:Promise.all([Xs(await Ze("vanilla-extract"),e),ft(e).then(r=>Vs(e,r,{path:"@vanilla-extract/vite-plugin",name:"vanillaExtractPlugin",isDefault:!1}))]),generatedAssets:[],needsInstallDeps:!0}}var ju=[...Nu,"none"],Bu={tailwind:"Tailwind v4","vanilla-extract":"Vanilla Extract","css-modules":"CSS Modules",postcss:"PostCSS"},RM={postcss:"https://vitejs.dev/guide/features.html#postcss","css-modules":"https://vitejs.dev/guide/features.html#css-modules","vanilla-extract":"https://vanilla-extract.style/documentation/styling/",tailwind:"https://tailwindcss.com/docs/configuration"};function Sg(e,t,r){switch(e){case"tailwind":return Dg(t,r);case"vanilla-extract":return Cg(t);case"postcss":case"css-modules":return{workPromise:Promise.resolve(),generatedAssets:[],needsInstallDeps:!1};default:throw new Error("Unknown strategy")}}async function Ag(e){let t=Object.entries({...Bu,...e?.extraChoices});return tt({message:"Select a styling library",...e,choices:t.map(([r,i])=>({value:r,label:i})),defaultValue:"tailwind"})}y();y();y();y();async function Jt(e,t,r=!0){let{transpileTs:i}=await import("./morph-EMYAITFM.js");return i(e,t,r)}y();var _g={checkJs:!1,target:"ES2022",module:"ES2022",moduleResolution:"bundler",baseUrl:".",paths:{"~/*":["app/*"]}},jF=new Set(["noLib","target","module","moduleResolution","checkJs","experimentalDecorators","allowSyntheticDefaultImports","baseUrl","paths",...Object.keys(_g)]);function BF(e,t=!1){let r={compilerOptions:{..._g}};if(e.include&&(r.include=e.include.filter(i=>t||!i.endsWith(".d.ts")).map(i=>i.replace(/(?<!\.d)\.ts(x?)$/,".js$1"))),e.compilerOptions)for(let i of jF)e.compilerOptions[i]!==void 0&&(r.compilerOptions[i]=e.compilerOptions[i]);return r}async function Ru(e,t=!0){let r=M(e,"app/routes.ts");if(await U(r)){let s=(await X(r)).replace("./layout.tsx","./layout.jsx");await V(r,s)}let i=await dc("**/*.+(ts|tsx)",{absolute:!0,cwd:e,dot:!0,ignore:["**/node_modules/**"]}),n=await ft();for(let o of i){if(o.endsWith(".d.ts")){t||await on(o);continue}let s=await X(o),c=await zt(await Jt(s,o,t),n);await on(o),await V(o.replace(/\.ts(x?)$/,".js$1"),c)}try{let o=M(e,"remix.config.js"),s=await X(o);s=s.replace(/\/server\.ts/gim,"/server.js"),await V(o,s)}catch(o){me(`Could not change TS extensions in remix.config.js:
154
+ `+c).replace(a,a.replace("[",`[${u},`))})}var MF={rule:{pattern:"[$$$]",inside:{kind:"pair",stopBy:"neighbor",has:{field:"key",regex:"^plugins$",stopBy:"neighbor"},inside:{kind:"object",stopBy:"neighbor",all:[{inside:{kind:"export_statement",regex:"export default",stopBy:"end"}},{not:{inside:{kind:"object",stopBy:"end"}}}]}}}};var bg="styles/tailwind.css";async function Dg({rootDirectory:e,appDirectory:t},r=!1){let i=kt(e,t),n={"tailwind.css":M(i,bg)};if(!await yg(n,t,r)){it("Skipping CSS setup as some files already exist. You may use `--force` or `-f` to override it.");return}return{workPromise:Promise.all([Xs(await Ze("tailwind"),e),gg("tailwind",n,e),ft(e).then(s=>Promise.all([Eg(t,s,{name:"tailwindCss",path:`${bg}?url`,isDefault:!0}),Vs(e,s,{name:"tailwindcss",path:"@tailwindcss/vite",isDefault:!0})]))]),generatedAssets:Object.values(n),needsInstallDeps:!0}}y();async function Cg({rootDirectory:e}){return{workPromise:Promise.all([Xs(await Ze("vanilla-extract"),e),ft(e).then(r=>Vs(e,r,{path:"@vanilla-extract/vite-plugin",name:"vanillaExtractPlugin",isDefault:!1}))]),generatedAssets:[],needsInstallDeps:!0}}var ju=[...Nu,"none"],Bu={tailwind:"Tailwind v4","vanilla-extract":"Vanilla Extract","css-modules":"CSS Modules",postcss:"PostCSS"},RM={postcss:"https://vitejs.dev/guide/features.html#postcss","css-modules":"https://vitejs.dev/guide/features.html#css-modules","vanilla-extract":"https://vanilla-extract.style/documentation/styling/",tailwind:"https://tailwindcss.com/docs/configuration"};function Sg(e,t,r){switch(e){case"tailwind":return Dg(t,r);case"vanilla-extract":return Cg(t);case"postcss":case"css-modules":return{workPromise:Promise.resolve(),generatedAssets:[],needsInstallDeps:!1};default:throw new Error("Unknown strategy")}}async function Ag(e){let t=Object.entries({...Bu,...e?.extraChoices});return tt({message:"Select a styling library",...e,choices:t.map(([r,i])=>({value:r,label:i})),defaultValue:"tailwind"})}y();y();y();y();async function Jt(e,t,r=!0){let{transpileTs:i}=await import("./morph-CGOZEPPZ.js");return i(e,t,r)}y();var _g={checkJs:!1,target:"ES2022",module:"ES2022",moduleResolution:"bundler",baseUrl:".",paths:{"~/*":["app/*"]}},jF=new Set(["noLib","target","module","moduleResolution","checkJs","experimentalDecorators","allowSyntheticDefaultImports","baseUrl","paths",...Object.keys(_g)]);function BF(e,t=!1){let r={compilerOptions:{..._g}};if(e.include&&(r.include=e.include.filter(i=>t||!i.endsWith(".d.ts")).map(i=>i.replace(/(?<!\.d)\.ts(x?)$/,".js$1"))),e.compilerOptions)for(let i of jF)e.compilerOptions[i]!==void 0&&(r.compilerOptions[i]=e.compilerOptions[i]);return r}async function Ru(e,t=!0){let r=M(e,"app/routes.ts");if(await U(r)){let s=(await X(r)).replace("./layout.tsx","./layout.jsx");await V(r,s)}let i=await dc("**/*.+(ts|tsx)",{absolute:!0,cwd:e,dot:!0,ignore:["**/node_modules/**"]}),n=await ft();for(let o of i){if(o.endsWith(".d.ts")){t||await on(o);continue}let s=await X(o),c=await zt(await Jt(s,o,t),n);await on(o),await V(o.replace(/\.ts(x?)$/,".js$1"),c)}try{let o=M(e,"remix.config.js"),s=await X(o);s=s.replace(/\/server\.ts/gim,"/server.js"),await V(o,s)}catch(o){me(`Could not change TS extensions in remix.config.js:
155
155
  `+o.stack)}try{let o=M(e,"tsconfig.json"),s=await X(o),c=BF(JSON.parse(s.replace(/^\s*\/\/.*$/gm,"")),t);await on(o),await V(M(e,"jsconfig.json"),JSON.stringify(c,null,2))}catch(o){me(`Could not transpile tsconfig.json:
156
156
  `+o.stack)}try{let o=JSON.parse(await X(M(e,"package.json")));delete o.scripts.typecheck;let s=/react-router typegen\s*&&\s*/g;for(let[c,h]of Object.entries(o.scripts||{}))typeof h=="string"&&h.includes("react-router typegen")&&(o.scripts[c]=h.replace(s,""));if(!t){delete o.devDependencies.typescript,delete o.devDependencies["@shopify/oxygen-workers-types"];for(let h of Object.keys(o.devDependencies))h.startsWith("@types/")&&delete o.devDependencies[h];let c=/\s*--codegen/;o.scripts?.dev&&(o.scripts.dev=o.scripts.dev.replace(c,"")),o.scripts?.build&&(o.scripts.build=o.scripts.build.replace(c,""))}await V(M(e,"package.json"),JSON.stringify(o,null,2))}catch(o){me(`Could not remove TS dependencies from package.json:
157
157
  `+o.stack)}try{let{filepath:o=M(e,".eslintrc.cjs")}=await be(e,".eslintrc",["cjs","js"]),s=await X(o);t||(s=s.replace(/\/\*\*[\s*]+@type.+\s+\*\/\s?/gim,"")),s=s.replace(/\s*,?\s*['"`]plugin:hydrogen\/typescript['"`]/gim,"").replace(/\s+['"`]@typescript-eslint\/.+,/gim,""),await V(o,await zt(s,n))}catch(o){me(`Could not remove TS rules from .eslintrc:
@@ -313,7 +313,7 @@ node_modules
313
313
  `;async function ec(e,t,r){let{hydrogenStorefrontCustomerApplicationUrlsReplace:{success:i,userErrors:n}}=await Je(Tk,e,{storefrontId:t,urlsReplaceInput:r});return{success:i,userErrors:n}}var l0=class e extends hn{static description="Push project configuration to admin";static flags={...Yi.path,"storefront-id":Zi.Flags.string({description:"The id of the storefront the configuration should be pushed to. Must start with 'gid://shopify/HydrogenStorefront/'"}),"dev-origin":Zi.Flags.string({description:"The development domain of your application.",required:!0}),"relative-redirect-uri":Zi.Flags.string({description:"The relative url of allowed callback url for Customer Account API OAuth flow. Default is '/account/authorize'"}),"relative-logout-uri":Zi.Flags.string({description:"The relative url of allowed url that will be redirected to post-logout for Customer Account API OAuth flow. Default to nothing."})};async run(){let{flags:t}=await this.parse(e);await tc({...qu(t)})}};async function tc({path:e=process.cwd(),storefrontId:t,devOrigin:r,redirectUriRelativeUrl:i="/account/authorize",logoutUriRelativeUrl:n}){let o=await rc(e,t);try{if(!o)throw new Error("No storefrontId was found in --storefront-id flag or .shopify/project.json");let s=i?new URL(i,r).toString():r,c=r,h=n?new URL(n,r).toString():r;if(!s&&!c&&!h)return;let{session:g,config:d}=await At(e),f=d?.storefront?.customerAccountConfig,{success:p,userErrors:a}=await ec(g,o,{redirectUri:{add:s?[s]:void 0,removeRegex:f?.redirectUri},javascriptOrigin:{add:c?[c]:void 0,removeRegex:f?.javascriptOrigin},logoutUris:{add:h?[h]:void 0,removeRegex:f?.logoutUri}});if(!p||a.length){let u=new Error("Customer Account Application setup update fail.");throw u.userErrors=a,u}return await Mg(e,{redirectUri:s,javascriptOrigin:c,logoutUri:h}),()=>Ok(g,o,{redirectUri:s,javascriptOrigin:c,logoutUri:h})}catch(s){let c=!1,h=s?.userErrors?.length?s.userErrors.map(d=>(/Javascript origin is not allowed for this application type/i.test(d.message)&&(c=!0),`${d.field}: ${d.message}`)):s.message?[s.message]:[],g=[{link:{label:"Manually update application setup",url:"https://shopify.dev/docs/custom-storefronts/building-with-the-customer-account-api/hydrogen#update-the-application-setup"}}];throw c&&g.unshift({link:{label:"Enable Public access for Hydrogen",url:"https://shopify.dev/docs/custom-storefronts/building-with-the-customer-account-api/getting-started#step-1-enable-customer-account-api-access"}}),new I("Customer Account Application setup update fail.",h.length?[{list:{title:"The following error occurs during update:",items:h.map((d,f)=>`${f!=0?`
314
314
 
315
315
  `:""}${d}`)}}]:void 0,g)}}async function Ok(e,t,r={}){Object.values(r).some(Boolean)&&(me(`Cleaning up Customer Application url "${r.redirectUri}"`),await ec(e,t,{redirectUri:{removeRegex:r?.redirectUri},javascriptOrigin:{removeRegex:r?.javascriptOrigin},logoutUris:{removeRegex:r?.logoutUri}}).catch(i=>{me(`Failed to clean up Customer Application url "${r.redirectUri}":
316
- ${i?.message}`)}))}async function rc(e,t){if(t)return t;let{session:r,config:i}=await At(e);if(i.storefront?.id)return i.storefront.id;let n=await Zs();return await Zu(e,r,i,{cliCommand:n})?(await li(e)).storefront?.id:void 0}y();import ic from"node:path";import{EventEmitter as Pk}from"node:events";import{ReadableStream as Ik}from"node:stream/web";var h0=rn(iy(),1),RL="H2O_LOG_EVENT",f0;function LL(e){f0=e.Response}var sc=new Set(["/graphiql","/graphiql/customer-account.schema.json","/subrequest-profiler","/debug-network-server"]),Nk={request:"Request",subrequest:"Sub request"};async function Mk(e){let t=await e.json();return{...t,requestId:t.requestId??"",eventType:t.eventType||"unknown",endTime:t.endTime||Date.now(),purpose:t.purpose==="prefetch"?"(prefetch)":"",cacheStatus:t.cacheStatus??"",graphql:t.graphql?JSON.parse(t.graphql):null}}var nc=new Pk,en=[];function ro(e="ok",t){return new f0(e,t)}function jk(e){return en.length=0,ro()}function $L(e){return async function(r){let i=new URL(r.url);if(sc.has(i.pathname))return ro();let{url:n,displayName:o,eventType:s,purpose:c,graphql:h,stackInfo:g,...d}=await Mk(r),f="",p=r.url,a=o;s==="subrequest"&&(a=a||h?.query.match(/(query|mutation)\s+(\w+)/)?.[0]?.replace(/\s+/," "),p=n||r.url,h&&(f=hi({graphql:h})));let u=null,l=null;if(g?.file){e?.transformLocation&&(g.file=e.transformLocation(g.file));let{source:v,line:x,column:w}=(0,h0.mapSourcePosition)({source:g.file,line:g.line??0,column:g.column??0});u=`${v}:${x}:${w+1}`,l=`vscode://${ic.join("file",u)}`,u=u.split(ic.sep+"app"+ic.sep)[1]??u,g.func&&(u=`${g.func.replace(/\d+$/,"")} (${u})`)}let m={event:Nk[s]||s,data:JSON.stringify({...d,displayName:a,url:`${c} ${p}`.trim(),graphiqlLink:f,stackLine:u,stackLink:l})};return en.push(m),en.length>100&&en.shift(),nc.emit("request",m),ro()}}function Bk(e){let t=new Ik({start(r){let i=new TextEncoder,n=({event:c="message",data:h})=>{r.enqueue(i.encode(`event: ${c}
316
+ ${i?.message}`)}))}async function rc(e,t){if(t)return t;let{session:r,config:i}=await At(e);if(i.storefront?.id)return i.storefront.id;let n=await Zs();return await Zu(e,r,i,{cliCommand:n})?(await li(e)).storefront?.id:void 0}y();import ic from"node:path";import{EventEmitter as Pk}from"node:events";import{ReadableStream as Ik}from"node:stream/web";var h0=rn(ny(),1),RL="H2O_LOG_EVENT",f0;function LL(e){f0=e.Response}var sc=new Set(["/graphiql","/graphiql/customer-account.schema.json","/subrequest-profiler","/debug-network-server"]),Nk={request:"Request",subrequest:"Sub request"};async function Mk(e){let t=await e.json();return{...t,requestId:t.requestId??"",eventType:t.eventType||"unknown",endTime:t.endTime||Date.now(),purpose:t.purpose==="prefetch"?"(prefetch)":"",cacheStatus:t.cacheStatus??"",graphql:t.graphql?JSON.parse(t.graphql):null}}var nc=new Pk,en=[];function ro(e="ok",t){return new f0(e,t)}function jk(e){return en.length=0,ro()}function $L(e){return async function(r){let i=new URL(r.url);if(sc.has(i.pathname))return ro();let{url:n,displayName:o,eventType:s,purpose:c,graphql:h,stackInfo:g,...d}=await Mk(r),f="",p=r.url,a=o;s==="subrequest"&&(a=a||h?.query.match(/(query|mutation)\s+(\w+)/)?.[0]?.replace(/\s+/," "),p=n||r.url,h&&(f=hi({graphql:h})));let u=null,l=null;if(g?.file){e?.transformLocation&&(g.file=e.transformLocation(g.file));let{source:v,line:x,column:w}=(0,h0.mapSourcePosition)({source:g.file,line:g.line??0,column:g.column??0});u=`${v}:${x}:${w+1}`,l=`vscode://${ic.join("file",u)}`,u=u.split(ic.sep+"app"+ic.sep)[1]??u,g.func&&(u=`${g.func.replace(/\d+$/,"")} (${u})`)}let m={event:Nk[s]||s,data:JSON.stringify({...d,displayName:a,url:`${c} ${p}`.trim(),graphiqlLink:f,stackLine:u,stackLink:l})};return en.push(m),en.length>100&&en.shift(),nc.emit("request",m),ro()}}function Bk(e){let t=new Ik({start(r){let i=new TextEncoder,n=({event:c="message",data:h})=>{r.enqueue(i.encode(`event: ${c}
317
317
  `)),r.enqueue(i.encode(`data: ${h}
318
318
 
319
319
  `))};en.forEach(n),nc.addListener("request",n);let o=!1;function s(){o||(o=!0,e.signal.removeEventListener("abort",s),nc.removeListener("request",n),r.close())}if(e.signal.addEventListener("abort",s),e.signal.aborted)return s()}});return ro(t,{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-store",Connection:"keep-alive"}})}function qL(e){return e.method==="DELETE"?jk():Bk(e)}y();var XL="/debug-network-server";function VL(){throw new I("Could not load MiniOxygen.","Please make sure you have `@shopify/mini-oxygen` installed.")}function YL({request:e,response:t,meta:r}){try{let i=new URL(e.url);if(!r.durationMs&&r.startTimeMs&&r.endTimeMs&&(r.durationMs=r.endTimeMs-r.startTimeMs),sc.has(i.pathname)||i.pathname==="/favicon.ico")return;let n=i.searchParams.has("_data"),o=e.url.replace(i.origin,""),s="",c="render";if(n){c=e.method==="GET"?"loader":"action";let g=i.searchParams.get("_data")?.replace("routes/","");o=i.pathname,s=`[${g}]`}let h=t.status<300?gt.green:t.status<400?gt.cyan:gt.errorText;it(Ar`${e.method.padStart(6)} ${h(String(t.status))} ${gt.italic(c.padEnd(7," "))} ${o} ${r.durationMs&&r.durationMs>0?W.dim(` ${r.durationMs}ms`):""}${s?" "+W.dim(s):""}${e.headers.purpose==="prefetch"?W.italic(W.dim(" prefetch")):""}`)}catch{e&&t?.status&&it(`${e.method} ${t.status} ${e.url}`)}}y();y();y();var Rk=`#graphql