just-binary 3.2.5 → 3.3.1

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 (1049) hide show
  1. package/README.md +1 -1
  2. package/dist/Bash.d.ts +56 -1
  3. package/dist/bin/chunks/alias-MILMQPGR.js +2 -0
  4. package/dist/bin/chunks/awk2-FB5MXVFV.js +2 -0
  5. package/dist/bin/chunks/base64-NGAPXZAM.js +2 -0
  6. package/dist/bin/chunks/basename-ZFBDKUVW.js +2 -0
  7. package/dist/bin/chunks/bash-FQY3C37R.js +2 -0
  8. package/dist/bin/chunks/cat-UO3ZDQHP.js +2 -0
  9. package/dist/bin/chunks/chmod-GYXHDITN.js +2 -0
  10. package/dist/bin/chunks/chunk-2FWUPGJH.js +6 -0
  11. package/dist/bin/chunks/chunk-2JQKBSIH.js +14 -0
  12. package/dist/bin/chunks/chunk-2MX7URRE.js +10 -0
  13. package/dist/bin/chunks/chunk-3G7ONQFJ.js +11 -0
  14. package/dist/bin/chunks/chunk-3KKXX5QY.js +13 -0
  15. package/dist/bin/chunks/chunk-3SWITKTS.js +7 -0
  16. package/dist/bin/chunks/chunk-3V7N5SEN.js +9 -0
  17. package/dist/bin/chunks/chunk-45S6IACR.js +3 -0
  18. package/dist/bin/chunks/chunk-4PDI7A54.js +20 -0
  19. package/dist/bin/chunks/chunk-532RLOPK.js +14 -0
  20. package/dist/bin/chunks/chunk-5B4HIQFQ.js +7 -0
  21. package/dist/bin/chunks/chunk-5CTS5L3T.js +18 -0
  22. package/dist/bin/chunks/chunk-5RANCCE2.js +6 -0
  23. package/dist/bin/chunks/chunk-63FHXCEF.js +4 -0
  24. package/dist/bin/chunks/chunk-64ICY43M.js +8 -0
  25. package/dist/bin/chunks/chunk-6MJ6NBIG.js +8 -0
  26. package/dist/bin/chunks/chunk-6N6IRP6G.js +6 -0
  27. package/dist/bin/chunks/chunk-6VQWCKYE.js +2 -0
  28. package/dist/bin/chunks/chunk-6WKRPHAZ.js +36 -0
  29. package/dist/bin/chunks/chunk-73X3QWRT.js +80 -0
  30. package/dist/bin/chunks/chunk-7FCHB2LT.js +14 -0
  31. package/dist/bin/chunks/chunk-7FGPQVVJ.js +12 -0
  32. package/dist/bin/chunks/chunk-7FUCLMNU.js +7 -0
  33. package/dist/bin/chunks/chunk-7LGOLTRR.js +5 -0
  34. package/dist/bin/chunks/chunk-7POGKC42.js +11 -0
  35. package/dist/bin/chunks/chunk-A257OMG4.js +2 -0
  36. package/dist/bin/chunks/chunk-BH4O34VZ.js +26 -0
  37. package/dist/bin/chunks/chunk-BTCJZ7OY.js +10 -0
  38. package/dist/bin/chunks/chunk-CEU7KGBV.js +24 -0
  39. package/dist/bin/chunks/chunk-COM2NIBS.js +3 -0
  40. package/dist/bin/chunks/chunk-CXEBUGVP.js +7 -0
  41. package/dist/bin/chunks/chunk-CY4RP66Q.js +21 -0
  42. package/dist/bin/chunks/chunk-DM55Q4EM.js +5 -0
  43. package/dist/bin/chunks/chunk-DUBCYODB.js +11 -0
  44. package/dist/bin/chunks/chunk-DUPNDZ3H.js +6 -0
  45. package/dist/bin/chunks/chunk-EKD22SYR.js +23 -0
  46. package/dist/bin/chunks/chunk-EOMAF5KQ.js +6 -0
  47. package/dist/bin/chunks/chunk-EQOXJHK3.js +2 -0
  48. package/dist/bin/chunks/chunk-EYZ62W3A.js +8 -0
  49. package/dist/bin/chunks/chunk-FHWRQZ3L.js +9 -0
  50. package/dist/bin/chunks/chunk-FUPQF256.js +10 -0
  51. package/dist/bin/chunks/chunk-GNVKOWAD.js +7 -0
  52. package/dist/bin/chunks/chunk-GZGWA6JM.js +3 -0
  53. package/dist/bin/chunks/chunk-HMHPYX5K.js +9 -0
  54. package/dist/bin/chunks/chunk-IA7QY73Z.js +9 -0
  55. package/dist/bin/chunks/chunk-J7ARATA6.js +4 -0
  56. package/dist/bin/chunks/chunk-JGKR7YR7.js +2 -0
  57. package/dist/bin/chunks/chunk-JILAHEMU.js +2 -0
  58. package/dist/bin/chunks/chunk-JKVUWQVK.js +12 -0
  59. package/dist/bin/chunks/chunk-JVUFZWPW.js +3 -0
  60. package/dist/bin/chunks/chunk-JYZZJOWW.js +2 -0
  61. package/dist/bin/chunks/chunk-KSXVXC3N.js +2 -0
  62. package/dist/bin/chunks/chunk-KTGY5SRV.js +2 -0
  63. package/dist/bin/chunks/chunk-KTZIEG4R.js +13 -0
  64. package/dist/bin/chunks/chunk-LNAXROAQ.js +5 -0
  65. package/dist/bin/chunks/chunk-LV3CC7SU.js +7 -0
  66. package/dist/bin/chunks/chunk-LVWII44I.js +23 -0
  67. package/dist/bin/chunks/chunk-LZC6DGAO.js +8 -0
  68. package/dist/bin/chunks/chunk-M3JG3HYB.js +14 -0
  69. package/dist/bin/chunks/chunk-MJODCFGH.js +140 -0
  70. package/dist/bin/chunks/chunk-MJTA3OJF.js +7 -0
  71. package/dist/bin/chunks/chunk-OF45CXLB.js +2 -0
  72. package/dist/bin/chunks/chunk-PAD6GYRH.js +5 -0
  73. package/dist/bin/chunks/chunk-PJ7H3LY6.js +8 -0
  74. package/dist/bin/chunks/chunk-QD4WQ5KK.js +17 -0
  75. package/dist/bin/chunks/chunk-R2BBWDS3.js +2 -0
  76. package/dist/bin/chunks/chunk-SIDKYUUQ.js +7 -0
  77. package/dist/bin/chunks/chunk-TDOAJ4YU.js +3 -0
  78. package/dist/bin/chunks/chunk-U34CFKX2.js +13 -0
  79. package/dist/bin/chunks/chunk-U7TJRQHK.js +16 -0
  80. package/dist/bin/chunks/chunk-UIRJNX5Z.js +2 -0
  81. package/dist/bin/chunks/chunk-UKL6PNC2.js +63 -0
  82. package/dist/bin/chunks/chunk-UN3P7MOR.js +16 -0
  83. package/dist/bin/chunks/chunk-UQKQCSRP.js +16 -0
  84. package/dist/bin/chunks/chunk-UYAEZFQS.js +100 -0
  85. package/dist/bin/chunks/chunk-V7OGIT4K.js +3 -0
  86. package/dist/bin/chunks/chunk-VK4UPKZF.js +3 -0
  87. package/dist/bin/chunks/chunk-VUUGFF6A.js +9 -0
  88. package/dist/bin/chunks/chunk-WATFCWHB.js +12 -0
  89. package/dist/bin/chunks/chunk-WIJCOCAS.js +9 -0
  90. package/dist/bin/chunks/chunk-XSCMU2VT.js +19 -0
  91. package/dist/bin/chunks/chunk-XWJ3KFMY.js +287 -0
  92. package/dist/bin/chunks/chunk-Y6NUYQQX.js +84 -0
  93. package/dist/bin/chunks/chunk-YLIFZDMR.js +9 -0
  94. package/dist/bin/chunks/chunk-YQFW27YU.js +33 -0
  95. package/dist/bin/chunks/chunk-YXVJUBRG.js +5 -0
  96. package/dist/bin/chunks/chunk-Z6BNZUNQ.js +32 -0
  97. package/dist/bin/chunks/chunk-ZLGIFJBA.js +5 -0
  98. package/dist/bin/chunks/clear-FZZM6QD2.js +2 -0
  99. package/dist/bin/chunks/column-UCIEGSHJ.js +2 -0
  100. package/dist/bin/chunks/comm-WKYJTISA.js +2 -0
  101. package/dist/bin/chunks/cp-YSXTOMBS.js +2 -0
  102. package/dist/bin/chunks/curl-YFYJ2XNC.js +26 -0
  103. package/dist/bin/chunks/cut-2MSOLU4C.js +2 -0
  104. package/dist/bin/chunks/date-5LA42436.js +2 -0
  105. package/dist/bin/chunks/diff-4PEKV4XS.js +2 -0
  106. package/dist/bin/chunks/dirname-XXQNLCA4.js +2 -0
  107. package/dist/bin/chunks/du-IKBAW7PG.js +2 -0
  108. package/dist/bin/chunks/echo-DHVSEP57.js +2 -0
  109. package/dist/bin/chunks/env-A43LGO53.js +2 -0
  110. package/dist/bin/chunks/expand-L4NT2YFK.js +2 -0
  111. package/dist/bin/chunks/expansion-IB7ZIBIF.js +2 -0
  112. package/dist/bin/chunks/expr-BGBONRHV.js +2 -0
  113. package/dist/bin/chunks/file-DZRWWDPH.js +2 -0
  114. package/dist/bin/chunks/find-B6JV4QSG.js +2 -0
  115. package/dist/bin/chunks/flag-coverage-FTS7XXHM.js +2 -0
  116. package/dist/bin/chunks/fold-OVU7UR2E.js +2 -0
  117. package/dist/bin/chunks/grep-RG26XCUN.js +2 -0
  118. package/dist/bin/chunks/gzip-XZZL25AV.js +2 -0
  119. package/dist/bin/chunks/head-HT46A7YT.js +2 -0
  120. package/dist/bin/chunks/help-AOETY73Q.js +2 -0
  121. package/dist/bin/chunks/history-WO6CMWMT.js +2 -0
  122. package/dist/bin/chunks/hostname-4O6NEPL2.js +2 -0
  123. package/dist/bin/chunks/html-to-markdown-34LV4LFQ.js +2 -0
  124. package/dist/bin/chunks/join-6M3ARIFB.js +2 -0
  125. package/dist/bin/chunks/jq-HP7VLWBL.js +2 -0
  126. package/dist/bin/chunks/ln-2OLFXJYU.js +2 -0
  127. package/dist/bin/chunks/ls-LBW3TTPI.js +2 -0
  128. package/dist/bin/chunks/md5sum-GAWU76ZU.js +2 -0
  129. package/dist/bin/chunks/mkdir-UUOVKGHS.js +2 -0
  130. package/dist/bin/chunks/mv-7VY5OVAU.js +2 -0
  131. package/dist/bin/chunks/nl-34JIXDXD.js +2 -0
  132. package/dist/bin/chunks/od-IGVFBAFH.js +2 -0
  133. package/dist/bin/chunks/paste-Q23K6FU7.js +2 -0
  134. package/dist/bin/chunks/printf-CVEJOTYB.js +2 -0
  135. package/dist/bin/chunks/pwd-6OLMY3MQ.js +2 -0
  136. package/dist/bin/chunks/python3-VZL5HRHR.js +14 -0
  137. package/dist/bin/chunks/readlink-T4CDCG4Z.js +2 -0
  138. package/dist/bin/chunks/rev-O3PQMT23.js +2 -0
  139. package/dist/bin/chunks/rg-PQP4HTR3.js +2 -0
  140. package/dist/bin/chunks/rm-UMIY7ESO.js +2 -0
  141. package/dist/bin/chunks/rmdir-NJCSEPRP.js +2 -0
  142. package/dist/bin/chunks/sed-BZW7POX3.js +2 -0
  143. package/dist/bin/chunks/seq-3FRPQG5E.js +2 -0
  144. package/dist/bin/chunks/sha1sum-AOZWHFTU.js +2 -0
  145. package/dist/bin/chunks/sha256sum-EXJTAPU4.js +2 -0
  146. package/dist/bin/chunks/sleep-HDMKKRCV.js +2 -0
  147. package/dist/bin/chunks/sort-TO3IPXI2.js +2 -0
  148. package/dist/bin/chunks/split-JXCUP73P.js +2 -0
  149. package/dist/bin/chunks/sqlite3-K7LHCU76.js +2 -0
  150. package/dist/bin/chunks/stat-J5TUE4U5.js +2 -0
  151. package/dist/bin/chunks/strings-TDUSHGAB.js +2 -0
  152. package/dist/bin/chunks/tac-QXOHN3J4.js +2 -0
  153. package/dist/bin/chunks/tail-LOVA3SKT.js +2 -0
  154. package/dist/bin/chunks/tar-BAKR5OJO.js +2 -0
  155. package/dist/bin/chunks/tee-SREYEKO6.js +2 -0
  156. package/dist/bin/chunks/time-GS6SIFPK.js +2 -0
  157. package/dist/bin/chunks/timeout-XBYZ5LW5.js +2 -0
  158. package/dist/bin/chunks/touch-4ZSEFYEW.js +2 -0
  159. package/dist/bin/chunks/tr-ARR7JBLN.js +2 -0
  160. package/dist/bin/chunks/tree-7Y7H64VI.js +2 -0
  161. package/dist/bin/chunks/true-CKHNKYAT.js +2 -0
  162. package/dist/bin/chunks/unexpand-B4WHWJHL.js +2 -0
  163. package/dist/bin/chunks/uniq-I2KNCRR6.js +2 -0
  164. package/dist/bin/chunks/wc-TDIG4RIU.js +2 -0
  165. package/dist/bin/chunks/which-QMZ276XE.js +2 -0
  166. package/dist/bin/chunks/whoami-XYB47VCX.js +2 -0
  167. package/dist/bin/chunks/xan-STBKXZ5W.js +2 -0
  168. package/dist/bin/chunks/xan-view-BIT4WIPP.js +2 -0
  169. package/dist/bin/chunks/xargs-6K57XYD6.js +2 -0
  170. package/dist/bin/chunks/yes-7ZGUE2PX.js +2 -0
  171. package/dist/bin/chunks/yq-ZHYSTGN3.js +2 -0
  172. package/dist/bin/just-bash.js +320 -303
  173. package/dist/bin/shell/chunks/alias-MILMQPGR.js +2 -0
  174. package/dist/bin/shell/chunks/awk2-FB5MXVFV.js +2 -0
  175. package/dist/bin/shell/chunks/base64-NGAPXZAM.js +2 -0
  176. package/dist/bin/shell/chunks/basename-ZFBDKUVW.js +2 -0
  177. package/dist/bin/shell/chunks/bash-FQY3C37R.js +2 -0
  178. package/dist/bin/shell/chunks/cat-UO3ZDQHP.js +2 -0
  179. package/dist/bin/shell/chunks/chmod-GYXHDITN.js +2 -0
  180. package/dist/bin/shell/chunks/chunk-2FWUPGJH.js +6 -0
  181. package/dist/bin/shell/chunks/chunk-2JQKBSIH.js +14 -0
  182. package/dist/bin/shell/chunks/chunk-2MX7URRE.js +10 -0
  183. package/dist/bin/shell/chunks/chunk-3G7ONQFJ.js +11 -0
  184. package/dist/bin/shell/chunks/chunk-3KKXX5QY.js +13 -0
  185. package/dist/bin/shell/chunks/chunk-3SWITKTS.js +7 -0
  186. package/dist/bin/shell/chunks/chunk-3V7N5SEN.js +9 -0
  187. package/dist/bin/shell/chunks/chunk-45S6IACR.js +3 -0
  188. package/dist/bin/shell/chunks/chunk-4PDI7A54.js +20 -0
  189. package/dist/bin/shell/chunks/chunk-532RLOPK.js +14 -0
  190. package/dist/bin/shell/chunks/chunk-5B4HIQFQ.js +7 -0
  191. package/dist/bin/shell/chunks/chunk-5CTS5L3T.js +18 -0
  192. package/dist/bin/shell/chunks/chunk-5RANCCE2.js +6 -0
  193. package/dist/bin/shell/chunks/chunk-63FHXCEF.js +4 -0
  194. package/dist/bin/shell/chunks/chunk-64ICY43M.js +8 -0
  195. package/dist/bin/shell/chunks/chunk-6MJ6NBIG.js +8 -0
  196. package/dist/bin/shell/chunks/chunk-6N6IRP6G.js +6 -0
  197. package/dist/bin/shell/chunks/chunk-6VQWCKYE.js +2 -0
  198. package/dist/bin/shell/chunks/chunk-6WKRPHAZ.js +36 -0
  199. package/dist/bin/shell/chunks/chunk-73X3QWRT.js +80 -0
  200. package/dist/bin/shell/chunks/chunk-7FCHB2LT.js +14 -0
  201. package/dist/bin/shell/chunks/chunk-7FGPQVVJ.js +12 -0
  202. package/dist/bin/shell/chunks/chunk-7FUCLMNU.js +7 -0
  203. package/dist/bin/shell/chunks/chunk-7LGOLTRR.js +5 -0
  204. package/dist/bin/shell/chunks/chunk-7POGKC42.js +11 -0
  205. package/dist/bin/shell/chunks/chunk-A257OMG4.js +2 -0
  206. package/dist/bin/shell/chunks/chunk-BH4O34VZ.js +26 -0
  207. package/dist/bin/shell/chunks/chunk-BTCJZ7OY.js +10 -0
  208. package/dist/bin/shell/chunks/chunk-CEU7KGBV.js +24 -0
  209. package/dist/bin/shell/chunks/chunk-COM2NIBS.js +3 -0
  210. package/dist/bin/shell/chunks/chunk-CXEBUGVP.js +7 -0
  211. package/dist/bin/shell/chunks/chunk-CY4RP66Q.js +21 -0
  212. package/dist/bin/shell/chunks/chunk-DM55Q4EM.js +5 -0
  213. package/dist/bin/shell/chunks/chunk-DUBCYODB.js +11 -0
  214. package/dist/bin/shell/chunks/chunk-DUPNDZ3H.js +6 -0
  215. package/dist/bin/shell/chunks/chunk-EKD22SYR.js +23 -0
  216. package/dist/bin/shell/chunks/chunk-EOMAF5KQ.js +6 -0
  217. package/dist/bin/shell/chunks/chunk-EQOXJHK3.js +2 -0
  218. package/dist/bin/shell/chunks/chunk-EYZ62W3A.js +8 -0
  219. package/dist/bin/shell/chunks/chunk-FHWRQZ3L.js +9 -0
  220. package/dist/bin/shell/chunks/chunk-FUPQF256.js +10 -0
  221. package/dist/bin/shell/chunks/chunk-GNVKOWAD.js +7 -0
  222. package/dist/bin/shell/chunks/chunk-GZGWA6JM.js +3 -0
  223. package/dist/bin/shell/chunks/chunk-HMHPYX5K.js +9 -0
  224. package/dist/bin/shell/chunks/chunk-IA7QY73Z.js +9 -0
  225. package/dist/bin/shell/chunks/chunk-J7ARATA6.js +4 -0
  226. package/dist/bin/shell/chunks/chunk-JGKR7YR7.js +2 -0
  227. package/dist/bin/shell/chunks/chunk-JILAHEMU.js +2 -0
  228. package/dist/bin/shell/chunks/chunk-JKVUWQVK.js +12 -0
  229. package/dist/bin/shell/chunks/chunk-JVUFZWPW.js +3 -0
  230. package/dist/bin/shell/chunks/chunk-JYZZJOWW.js +2 -0
  231. package/dist/bin/shell/chunks/chunk-KSXVXC3N.js +2 -0
  232. package/dist/bin/shell/chunks/chunk-KTGY5SRV.js +2 -0
  233. package/dist/bin/shell/chunks/chunk-KTZIEG4R.js +13 -0
  234. package/dist/bin/shell/chunks/chunk-LNAXROAQ.js +5 -0
  235. package/dist/bin/shell/chunks/chunk-LV3CC7SU.js +7 -0
  236. package/dist/bin/shell/chunks/chunk-LVWII44I.js +23 -0
  237. package/dist/bin/shell/chunks/chunk-LZC6DGAO.js +8 -0
  238. package/dist/bin/shell/chunks/chunk-M3JG3HYB.js +14 -0
  239. package/dist/bin/shell/chunks/chunk-MJODCFGH.js +140 -0
  240. package/dist/bin/shell/chunks/chunk-MJTA3OJF.js +7 -0
  241. package/dist/bin/shell/chunks/chunk-OF45CXLB.js +2 -0
  242. package/dist/bin/shell/chunks/chunk-PAD6GYRH.js +5 -0
  243. package/dist/bin/shell/chunks/chunk-PJ7H3LY6.js +8 -0
  244. package/dist/bin/shell/chunks/chunk-QD4WQ5KK.js +17 -0
  245. package/dist/bin/shell/chunks/chunk-R2BBWDS3.js +2 -0
  246. package/dist/bin/shell/chunks/chunk-SIDKYUUQ.js +7 -0
  247. package/dist/bin/shell/chunks/chunk-TDOAJ4YU.js +3 -0
  248. package/dist/bin/shell/chunks/chunk-U34CFKX2.js +13 -0
  249. package/dist/bin/shell/chunks/chunk-U7TJRQHK.js +16 -0
  250. package/dist/bin/shell/chunks/chunk-UIRJNX5Z.js +2 -0
  251. package/dist/bin/shell/chunks/chunk-UKL6PNC2.js +63 -0
  252. package/dist/bin/shell/chunks/chunk-UN3P7MOR.js +16 -0
  253. package/dist/bin/shell/chunks/chunk-UQKQCSRP.js +16 -0
  254. package/dist/bin/shell/chunks/chunk-UYAEZFQS.js +100 -0
  255. package/dist/bin/shell/chunks/chunk-V7OGIT4K.js +3 -0
  256. package/dist/bin/shell/chunks/chunk-VK4UPKZF.js +3 -0
  257. package/dist/bin/shell/chunks/chunk-VUUGFF6A.js +9 -0
  258. package/dist/bin/shell/chunks/chunk-WATFCWHB.js +12 -0
  259. package/dist/bin/shell/chunks/chunk-WIJCOCAS.js +9 -0
  260. package/dist/bin/shell/chunks/chunk-XSCMU2VT.js +19 -0
  261. package/dist/bin/shell/chunks/chunk-XWJ3KFMY.js +287 -0
  262. package/dist/bin/shell/chunks/chunk-Y6NUYQQX.js +84 -0
  263. package/dist/bin/shell/chunks/chunk-YLIFZDMR.js +9 -0
  264. package/dist/bin/shell/chunks/chunk-YQFW27YU.js +33 -0
  265. package/dist/bin/shell/chunks/chunk-YXVJUBRG.js +5 -0
  266. package/dist/bin/shell/chunks/chunk-Z6BNZUNQ.js +32 -0
  267. package/dist/bin/shell/chunks/chunk-ZLGIFJBA.js +5 -0
  268. package/dist/bin/shell/chunks/clear-FZZM6QD2.js +2 -0
  269. package/dist/bin/shell/chunks/column-UCIEGSHJ.js +2 -0
  270. package/dist/bin/shell/chunks/comm-WKYJTISA.js +2 -0
  271. package/dist/bin/shell/chunks/cp-YSXTOMBS.js +2 -0
  272. package/dist/bin/shell/chunks/curl-YFYJ2XNC.js +26 -0
  273. package/dist/bin/shell/chunks/cut-2MSOLU4C.js +2 -0
  274. package/dist/bin/shell/chunks/date-5LA42436.js +2 -0
  275. package/dist/bin/shell/chunks/diff-4PEKV4XS.js +2 -0
  276. package/dist/bin/shell/chunks/dirname-XXQNLCA4.js +2 -0
  277. package/dist/bin/shell/chunks/du-IKBAW7PG.js +2 -0
  278. package/dist/bin/shell/chunks/echo-DHVSEP57.js +2 -0
  279. package/dist/bin/shell/chunks/env-A43LGO53.js +2 -0
  280. package/dist/bin/shell/chunks/expand-L4NT2YFK.js +2 -0
  281. package/dist/bin/shell/chunks/expansion-IB7ZIBIF.js +2 -0
  282. package/dist/bin/shell/chunks/expr-BGBONRHV.js +2 -0
  283. package/dist/bin/shell/chunks/file-DZRWWDPH.js +2 -0
  284. package/dist/bin/shell/chunks/find-B6JV4QSG.js +2 -0
  285. package/dist/bin/shell/chunks/flag-coverage-FTS7XXHM.js +2 -0
  286. package/dist/bin/shell/chunks/fold-OVU7UR2E.js +2 -0
  287. package/dist/bin/shell/chunks/grep-RG26XCUN.js +2 -0
  288. package/dist/bin/shell/chunks/gzip-XZZL25AV.js +2 -0
  289. package/dist/bin/shell/chunks/head-HT46A7YT.js +2 -0
  290. package/dist/bin/shell/chunks/help-AOETY73Q.js +2 -0
  291. package/dist/bin/shell/chunks/history-WO6CMWMT.js +2 -0
  292. package/dist/bin/shell/chunks/hostname-4O6NEPL2.js +2 -0
  293. package/dist/bin/shell/chunks/html-to-markdown-34LV4LFQ.js +2 -0
  294. package/dist/bin/shell/chunks/join-6M3ARIFB.js +2 -0
  295. package/dist/bin/shell/chunks/jq-HP7VLWBL.js +2 -0
  296. package/dist/bin/shell/chunks/ln-2OLFXJYU.js +2 -0
  297. package/dist/bin/shell/chunks/ls-LBW3TTPI.js +2 -0
  298. package/dist/bin/shell/chunks/md5sum-GAWU76ZU.js +2 -0
  299. package/dist/bin/shell/chunks/mkdir-UUOVKGHS.js +2 -0
  300. package/dist/bin/shell/chunks/mv-7VY5OVAU.js +2 -0
  301. package/dist/bin/shell/chunks/nl-34JIXDXD.js +2 -0
  302. package/dist/bin/shell/chunks/od-IGVFBAFH.js +2 -0
  303. package/dist/bin/shell/chunks/paste-Q23K6FU7.js +2 -0
  304. package/dist/bin/shell/chunks/printf-CVEJOTYB.js +2 -0
  305. package/dist/bin/shell/chunks/pwd-6OLMY3MQ.js +2 -0
  306. package/dist/bin/shell/chunks/python3-VZL5HRHR.js +14 -0
  307. package/dist/bin/shell/chunks/readlink-T4CDCG4Z.js +2 -0
  308. package/dist/bin/shell/chunks/rev-O3PQMT23.js +2 -0
  309. package/dist/bin/shell/chunks/rg-PQP4HTR3.js +2 -0
  310. package/dist/bin/shell/chunks/rm-UMIY7ESO.js +2 -0
  311. package/dist/bin/shell/chunks/rmdir-NJCSEPRP.js +2 -0
  312. package/dist/bin/shell/chunks/sed-BZW7POX3.js +2 -0
  313. package/dist/bin/shell/chunks/seq-3FRPQG5E.js +2 -0
  314. package/dist/bin/shell/chunks/sha1sum-AOZWHFTU.js +2 -0
  315. package/dist/bin/shell/chunks/sha256sum-EXJTAPU4.js +2 -0
  316. package/dist/bin/shell/chunks/sleep-HDMKKRCV.js +2 -0
  317. package/dist/bin/shell/chunks/sort-TO3IPXI2.js +2 -0
  318. package/dist/bin/shell/chunks/split-JXCUP73P.js +2 -0
  319. package/dist/bin/shell/chunks/sqlite3-K7LHCU76.js +2 -0
  320. package/dist/bin/shell/chunks/stat-J5TUE4U5.js +2 -0
  321. package/dist/bin/shell/chunks/strings-TDUSHGAB.js +2 -0
  322. package/dist/bin/shell/chunks/tac-QXOHN3J4.js +2 -0
  323. package/dist/bin/shell/chunks/tail-LOVA3SKT.js +2 -0
  324. package/dist/bin/shell/chunks/tar-BAKR5OJO.js +2 -0
  325. package/dist/bin/shell/chunks/tee-SREYEKO6.js +2 -0
  326. package/dist/bin/shell/chunks/time-GS6SIFPK.js +2 -0
  327. package/dist/bin/shell/chunks/timeout-XBYZ5LW5.js +2 -0
  328. package/dist/bin/shell/chunks/touch-4ZSEFYEW.js +2 -0
  329. package/dist/bin/shell/chunks/tr-ARR7JBLN.js +2 -0
  330. package/dist/bin/shell/chunks/tree-7Y7H64VI.js +2 -0
  331. package/dist/bin/shell/chunks/true-CKHNKYAT.js +2 -0
  332. package/dist/bin/shell/chunks/unexpand-B4WHWJHL.js +2 -0
  333. package/dist/bin/shell/chunks/uniq-I2KNCRR6.js +2 -0
  334. package/dist/bin/shell/chunks/wc-TDIG4RIU.js +2 -0
  335. package/dist/bin/shell/chunks/which-QMZ276XE.js +2 -0
  336. package/dist/bin/shell/chunks/whoami-XYB47VCX.js +2 -0
  337. package/dist/bin/shell/chunks/xan-STBKXZ5W.js +2 -0
  338. package/dist/bin/shell/chunks/xan-view-BIT4WIPP.js +2 -0
  339. package/dist/bin/shell/chunks/xargs-6K57XYD6.js +2 -0
  340. package/dist/bin/shell/chunks/yes-7ZGUE2PX.js +2 -0
  341. package/dist/bin/shell/chunks/yq-ZHYSTGN3.js +2 -0
  342. package/dist/bin/shell/shell.js +325 -308
  343. package/dist/browser.d.ts +4 -0
  344. package/dist/bundle/browser.js +865 -847
  345. package/dist/bundle/chunks/alias-CIPN5HGG.js +1 -0
  346. package/dist/bundle/chunks/awk2-RAKURI6M.js +1 -0
  347. package/dist/bundle/chunks/base64-4GSA7KNI.js +1 -0
  348. package/dist/bundle/chunks/basename-Q7SIX77Q.js +1 -0
  349. package/dist/bundle/chunks/bash-HKSQMKKV.js +1 -0
  350. package/dist/bundle/chunks/cat-L3YELBYM.js +1 -0
  351. package/dist/bundle/chunks/chmod-IJMA7OGQ.js +1 -0
  352. package/dist/bundle/chunks/chunk-23R5HQHH.js +22 -0
  353. package/dist/bundle/chunks/chunk-2C5744E3.js +16 -0
  354. package/dist/bundle/chunks/chunk-2UAAXNHX.js +1 -0
  355. package/dist/bundle/chunks/chunk-3JEPB2CL.js +10 -0
  356. package/dist/bundle/chunks/chunk-4NRX5HFD.js +2 -0
  357. package/dist/bundle/chunks/chunk-5JHQRYUS.js +5 -0
  358. package/dist/bundle/chunks/chunk-6B44NYQO.js +8 -0
  359. package/dist/bundle/chunks/chunk-6D5UCV65.js +23 -0
  360. package/dist/bundle/chunks/chunk-6TAOLIZ7.js +13 -0
  361. package/dist/bundle/chunks/chunk-734O2UB7.js +9 -0
  362. package/dist/bundle/chunks/chunk-7B7AWU7X.js +2 -0
  363. package/dist/bundle/chunks/chunk-7KFBK6FW.js +1 -0
  364. package/dist/bundle/chunks/chunk-7ROHLV74.js +31 -0
  365. package/dist/bundle/chunks/chunk-7SQ2RTI2.js +139 -0
  366. package/dist/bundle/chunks/chunk-7UPROJVF.js +4 -0
  367. package/dist/bundle/chunks/chunk-7Z65ZFBM.js +10 -0
  368. package/dist/bundle/chunks/chunk-A5FEGJHF.js +4 -0
  369. package/dist/bundle/chunks/chunk-AAVEDJ2B.js +4 -0
  370. package/dist/bundle/chunks/chunk-AFEP7ZTB.js +4 -0
  371. package/dist/bundle/chunks/chunk-ALZ5CSTK.js +9 -0
  372. package/dist/bundle/chunks/chunk-ANMMLK7G.js +2 -0
  373. package/dist/bundle/chunks/chunk-AXMBAF6A.js +5 -0
  374. package/dist/bundle/chunks/chunk-BX5K34KY.js +1 -0
  375. package/dist/bundle/chunks/chunk-BZXBFTL2.js +4 -0
  376. package/dist/bundle/chunks/chunk-C4UC4TPC.js +8 -0
  377. package/dist/bundle/chunks/chunk-CNBBFQPC.js +1 -0
  378. package/dist/bundle/chunks/chunk-CVM2MFM3.js +2 -0
  379. package/dist/bundle/chunks/chunk-DL5GRV7N.js +5 -0
  380. package/dist/bundle/chunks/chunk-DS5ORKKQ.js +3 -0
  381. package/dist/bundle/chunks/chunk-ESLB4XKL.js +15 -0
  382. package/dist/bundle/chunks/chunk-FPJIAK37.js +8 -0
  383. package/dist/bundle/chunks/chunk-GBVVD7OP.js +12 -0
  384. package/dist/bundle/chunks/chunk-GJQGDOOO.js +8 -0
  385. package/dist/bundle/chunks/chunk-GZRZD5YF.js +4 -0
  386. package/dist/bundle/chunks/chunk-HDHI347R.js +6 -0
  387. package/dist/bundle/chunks/chunk-HKMBFRTV.js +2 -0
  388. package/dist/bundle/chunks/chunk-HMRLLHZE.js +7 -0
  389. package/dist/bundle/chunks/chunk-HVMFTOQY.js +1 -0
  390. package/dist/bundle/chunks/chunk-IVTIGXSE.js +11 -0
  391. package/dist/bundle/chunks/chunk-IXPY5PYY.js +13 -0
  392. package/dist/bundle/chunks/chunk-J2BTXVXN.js +6 -0
  393. package/dist/bundle/chunks/chunk-J2GAF4HH.js +15 -0
  394. package/dist/bundle/chunks/chunk-JJXSCNTG.js +5 -0
  395. package/dist/bundle/chunks/chunk-JZLKE4XX.js +23 -0
  396. package/dist/bundle/chunks/chunk-KL7SL7ES.js +1 -0
  397. package/dist/bundle/chunks/chunk-KLSVVM53.js +6 -0
  398. package/dist/bundle/chunks/chunk-KMDWD5I5.js +8 -0
  399. package/dist/bundle/chunks/chunk-KMFEA7OG.js +2 -0
  400. package/dist/bundle/chunks/chunk-KXZALX7Z.js +7 -0
  401. package/dist/bundle/chunks/chunk-MQY52TBM.js +7 -0
  402. package/dist/bundle/chunks/chunk-N552BMHP.js +1 -0
  403. package/dist/bundle/chunks/chunk-NCNBSBGV.js +286 -0
  404. package/dist/bundle/chunks/chunk-OBYDR4XV.js +4 -0
  405. package/dist/bundle/chunks/chunk-OGUNWUEY.js +17 -0
  406. package/dist/bundle/chunks/chunk-ORNEVHL4.js +99 -0
  407. package/dist/bundle/chunks/chunk-P3THD7GM.js +6 -0
  408. package/dist/bundle/chunks/chunk-PEEBONF2.js +2 -0
  409. package/dist/bundle/chunks/chunk-PMGKXEU7.js +13 -0
  410. package/dist/bundle/chunks/chunk-PVCFRKJJ.js +13 -0
  411. package/dist/bundle/chunks/chunk-QFO6LPNQ.js +7 -0
  412. package/dist/bundle/chunks/chunk-QMUDG3KU.js +12 -0
  413. package/dist/bundle/chunks/chunk-QWZOR6OX.js +5 -0
  414. package/dist/bundle/chunks/chunk-R42D4RK2.js +15 -0
  415. package/dist/bundle/chunks/chunk-S6UKQQAB.js +79 -0
  416. package/dist/bundle/chunks/chunk-SRQ7BXVR.js +1 -0
  417. package/dist/bundle/chunks/chunk-SXA5BV42.js +20 -0
  418. package/dist/bundle/chunks/chunk-TL7ILCBE.js +6 -0
  419. package/dist/bundle/chunks/chunk-TMW4OG4N.js +6 -0
  420. package/dist/bundle/chunks/chunk-UPLN3OMW.js +11 -0
  421. package/dist/bundle/chunks/chunk-UPUUONKD.js +6 -0
  422. package/dist/bundle/chunks/chunk-USPQ6LOW.js +10 -0
  423. package/dist/bundle/chunks/chunk-UY2R54E5.js +8 -0
  424. package/dist/bundle/chunks/chunk-V6WGFVZA.js +6 -0
  425. package/dist/bundle/chunks/chunk-VAEB4OUK.js +1 -0
  426. package/dist/bundle/chunks/chunk-VEE747JZ.js +6 -0
  427. package/dist/bundle/chunks/chunk-WBPZNWSY.js +35 -0
  428. package/dist/bundle/chunks/chunk-WPPIJX5K.js +22 -0
  429. package/dist/bundle/chunks/chunk-X7M472ST.js +32 -0
  430. package/dist/bundle/chunks/chunk-XAYT3L2B.js +1 -0
  431. package/dist/bundle/chunks/chunk-XCI3COKM.js +12 -0
  432. package/dist/bundle/chunks/chunk-XDY76TEA.js +19 -0
  433. package/dist/bundle/chunks/chunk-XEKBP4I4.js +62 -0
  434. package/dist/bundle/chunks/chunk-XGMYS2QC.js +3 -0
  435. package/dist/bundle/chunks/chunk-YIIBJSJS.js +11 -0
  436. package/dist/bundle/chunks/chunk-YMPJSDL2.js +7 -0
  437. package/dist/bundle/chunks/chunk-YU2FN4NA.js +8 -0
  438. package/dist/bundle/chunks/chunk-YZSDCIXP.js +9 -0
  439. package/dist/bundle/chunks/chunk-ZLBJV2VD.js +1 -0
  440. package/dist/bundle/chunks/clear-J6WBUIX6.js +1 -0
  441. package/dist/bundle/chunks/column-N7MHP5SX.js +1 -0
  442. package/dist/bundle/chunks/comm-X7VETT2U.js +1 -0
  443. package/dist/bundle/chunks/cp-73PGBEPL.js +1 -0
  444. package/dist/bundle/chunks/curl-MGBYKD7U.js +25 -0
  445. package/dist/bundle/chunks/cut-7I6UA67F.js +1 -0
  446. package/dist/bundle/chunks/date-MOZRIQXR.js +1 -0
  447. package/dist/bundle/chunks/diff-O5NFSBS5.js +1 -0
  448. package/dist/bundle/chunks/dirname-2TM4IG7K.js +1 -0
  449. package/dist/bundle/chunks/du-KTUJVIGD.js +1 -0
  450. package/dist/bundle/chunks/echo-PC3TVS6B.js +1 -0
  451. package/dist/bundle/chunks/env-MFQH47JH.js +1 -0
  452. package/dist/bundle/chunks/expand-OYPZZOZC.js +1 -0
  453. package/dist/bundle/chunks/expansion-QM4WQBBG.js +1 -0
  454. package/dist/bundle/chunks/expr-4PIUWNB7.js +1 -0
  455. package/dist/bundle/chunks/file-DZRW6GNH.js +1 -0
  456. package/dist/bundle/chunks/find-DESNHKKS.js +1 -0
  457. package/dist/bundle/chunks/flag-coverage-QMBN7WOW.js +1 -0
  458. package/dist/bundle/chunks/fold-5VRJN4CL.js +1 -0
  459. package/dist/bundle/chunks/grep-7RC5DPOS.js +1 -0
  460. package/dist/bundle/chunks/gzip-WH2JWAWT.js +1 -0
  461. package/dist/bundle/chunks/head-EFRLGDOE.js +1 -0
  462. package/dist/bundle/chunks/help-3XYFOR43.js +1 -0
  463. package/dist/bundle/chunks/history-J3C24VIU.js +1 -0
  464. package/dist/bundle/chunks/hostname-D54LLZ5I.js +1 -0
  465. package/dist/bundle/chunks/html-to-markdown-TFBDHAZZ.js +1 -0
  466. package/dist/bundle/chunks/join-36QXZEGR.js +1 -0
  467. package/dist/bundle/chunks/jq-5KN27BBY.js +1 -0
  468. package/dist/bundle/chunks/ln-SHI7B5FY.js +1 -0
  469. package/dist/bundle/chunks/ls-7JNJXADY.js +1 -0
  470. package/dist/bundle/chunks/md5sum-J7XPNTQZ.js +1 -0
  471. package/dist/bundle/chunks/mkdir-NM4BUUUC.js +1 -0
  472. package/dist/bundle/chunks/mv-VDGF4VTT.js +1 -0
  473. package/dist/bundle/chunks/nl-PD7BPFUB.js +1 -0
  474. package/dist/bundle/chunks/od-D6RO3GJE.js +1 -0
  475. package/dist/bundle/chunks/paste-HD4NKO4X.js +1 -0
  476. package/dist/bundle/chunks/printf-6XMXHDAE.js +1 -0
  477. package/dist/bundle/chunks/pwd-KKLARPNT.js +1 -0
  478. package/dist/bundle/chunks/python3-KPG6SQQV.js +13 -0
  479. package/dist/bundle/chunks/readlink-6XCFQQJH.js +1 -0
  480. package/dist/bundle/chunks/rev-NJ2ZPNAT.js +1 -0
  481. package/dist/bundle/chunks/rg-NIW2Q5SV.js +1 -0
  482. package/dist/bundle/chunks/rm-7ERREV4V.js +1 -0
  483. package/dist/bundle/chunks/rmdir-Z4ZRV32S.js +1 -0
  484. package/dist/bundle/chunks/sed-VLSHT4XR.js +1 -0
  485. package/dist/bundle/chunks/seq-RCBD3IYO.js +1 -0
  486. package/dist/bundle/chunks/sha1sum-RMRQ75AE.js +1 -0
  487. package/dist/bundle/chunks/sha256sum-TGW5BMJR.js +1 -0
  488. package/dist/bundle/chunks/sleep-SAQIXUFW.js +1 -0
  489. package/dist/bundle/chunks/sort-KCG2A34N.js +1 -0
  490. package/dist/bundle/chunks/split-EVSSQ6VR.js +1 -0
  491. package/dist/bundle/chunks/sqlite3-M6BXLMYI.js +1 -0
  492. package/dist/bundle/chunks/stat-Z22X56GM.js +1 -0
  493. package/dist/bundle/chunks/strings-EKWOLUFJ.js +1 -0
  494. package/dist/bundle/chunks/tac-RSIVIUEI.js +1 -0
  495. package/dist/bundle/chunks/tail-TULUAGKH.js +1 -0
  496. package/dist/bundle/chunks/tar-KQPQPRTZ.js +1 -0
  497. package/dist/bundle/chunks/tee-DPV6AVMH.js +1 -0
  498. package/dist/bundle/chunks/time-RXWT5RNC.js +1 -0
  499. package/dist/bundle/chunks/timeout-YRSN3MWF.js +1 -0
  500. package/dist/bundle/chunks/touch-PC42E2OS.js +1 -0
  501. package/dist/bundle/chunks/tr-F7JZV44S.js +1 -0
  502. package/dist/bundle/chunks/tree-SVRMFKLQ.js +1 -0
  503. package/dist/bundle/chunks/true-T4XKISHJ.js +1 -0
  504. package/dist/bundle/chunks/unexpand-KAIAW5TX.js +1 -0
  505. package/dist/bundle/chunks/uniq-7HD4DCMD.js +1 -0
  506. package/dist/bundle/chunks/wc-U424DF7O.js +1 -0
  507. package/dist/bundle/chunks/which-OY73BBGP.js +1 -0
  508. package/dist/bundle/chunks/whoami-KUZQQOVR.js +1 -0
  509. package/dist/bundle/chunks/xan-N66EXZFT.js +1 -0
  510. package/dist/bundle/chunks/xan-view-RLM3746X.js +1 -0
  511. package/dist/bundle/chunks/xargs-SWPLSROG.js +1 -0
  512. package/dist/bundle/chunks/yes-5BWAW2VY.js +1 -0
  513. package/dist/bundle/chunks/yq-URX6MHLP.js +1 -0
  514. package/dist/bundle/index.js +315 -298
  515. package/dist/index.d.ts +4 -0
  516. package/dist/interpreter/builtins/break.d.ts +1 -1
  517. package/dist/interpreter/builtins/continue.d.ts +1 -1
  518. package/dist/interpreter/builtins/exit.d.ts +1 -1
  519. package/dist/interpreter/builtins/index.d.ts +3 -0
  520. package/dist/interpreter/builtins/jobs.d.ts +5 -0
  521. package/dist/interpreter/builtins/kill.d.ts +3 -0
  522. package/dist/interpreter/builtins/set.d.ts +1 -1
  523. package/dist/interpreter/builtins/shift.d.ts +1 -1
  524. package/dist/interpreter/builtins/wait.d.ts +3 -0
  525. package/dist/interpreter/errors.d.ts +45 -26
  526. package/dist/interpreter/functions.d.ts +1 -1
  527. package/dist/interpreter/helpers/condition.d.ts +1 -1
  528. package/dist/interpreter/helpers/loop.d.ts +1 -6
  529. package/dist/interpreter/helpers/readonly.d.ts +1 -1
  530. package/dist/interpreter/helpers/result.d.ts +1 -1
  531. package/dist/interpreter/helpers/statements.d.ts +2 -5
  532. package/dist/interpreter/index.d.ts +1 -1
  533. package/dist/interpreter/interpreter.d.ts +12 -2
  534. package/dist/interpreter/output-channels.d.ts +50 -0
  535. package/dist/interpreter/redirect-channels.d.ts +34 -0
  536. package/dist/interpreter/redirections.d.ts +33 -27
  537. package/dist/interpreter/types.d.ts +20 -6
  538. package/dist/limits.d.ts +2 -0
  539. package/dist/process/process-table.d.ts +102 -0
  540. package/dist/sandbox/Command.d.ts +22 -2
  541. package/dist/sandbox/Sandbox.d.ts +5 -0
  542. package/dist/types.d.ts +13 -1
  543. package/dist/utils/abort.d.ts +12 -0
  544. package/dist/utils/stream.d.ts +5 -0
  545. package/package.json +2 -1
  546. package/dist/bin/chunks/alias-VEEWI66Q.js +0 -2
  547. package/dist/bin/chunks/awk2-LEBSBFO3.js +0 -2
  548. package/dist/bin/chunks/base64-Q2G4GF6R.js +0 -2
  549. package/dist/bin/chunks/basename-TNVKQHP5.js +0 -2
  550. package/dist/bin/chunks/bash-E26LCUON.js +0 -2
  551. package/dist/bin/chunks/cat-6WUYWK6Q.js +0 -2
  552. package/dist/bin/chunks/chmod-YHG2ADMJ.js +0 -2
  553. package/dist/bin/chunks/chunk-25DBXZPM.js +0 -100
  554. package/dist/bin/chunks/chunk-272ZYGP4.js +0 -8
  555. package/dist/bin/chunks/chunk-2KW5JZDM.js +0 -2
  556. package/dist/bin/chunks/chunk-33EFJFXL.js +0 -10
  557. package/dist/bin/chunks/chunk-3CCRFBBL.js +0 -23
  558. package/dist/bin/chunks/chunk-3OP7VRO7.js +0 -6
  559. package/dist/bin/chunks/chunk-3PIWDQZL.js +0 -19
  560. package/dist/bin/chunks/chunk-4C26CCJR.js +0 -4
  561. package/dist/bin/chunks/chunk-4G37X3GZ.js +0 -14
  562. package/dist/bin/chunks/chunk-4KTWLZ5A.js +0 -8
  563. package/dist/bin/chunks/chunk-55N7NX6G.js +0 -9
  564. package/dist/bin/chunks/chunk-5OQOWWIB.js +0 -7
  565. package/dist/bin/chunks/chunk-5WAR3CU3.js +0 -3
  566. package/dist/bin/chunks/chunk-63VB22X2.js +0 -33
  567. package/dist/bin/chunks/chunk-6KVPD5H7.js +0 -13
  568. package/dist/bin/chunks/chunk-6OVV6A5W.js +0 -3
  569. package/dist/bin/chunks/chunk-6PU2WD4P.js +0 -7
  570. package/dist/bin/chunks/chunk-7ICAP454.js +0 -12
  571. package/dist/bin/chunks/chunk-7QKMCOGE.js +0 -16
  572. package/dist/bin/chunks/chunk-7SXBGUE4.js +0 -3
  573. package/dist/bin/chunks/chunk-7VQY35S5.js +0 -8
  574. package/dist/bin/chunks/chunk-7VVTANT2.js +0 -7
  575. package/dist/bin/chunks/chunk-7XV5FI5D.js +0 -8
  576. package/dist/bin/chunks/chunk-7Y5TZ5CE.js +0 -6
  577. package/dist/bin/chunks/chunk-A2V4EW6Y.js +0 -10
  578. package/dist/bin/chunks/chunk-ACV764YE.js +0 -5
  579. package/dist/bin/chunks/chunk-AJBYK52Q.js +0 -36
  580. package/dist/bin/chunks/chunk-BCE7PDXY.js +0 -32
  581. package/dist/bin/chunks/chunk-BVWBX3A2.js +0 -9
  582. package/dist/bin/chunks/chunk-COBNN6FR.js +0 -11
  583. package/dist/bin/chunks/chunk-CVXSPZVY.js +0 -2
  584. package/dist/bin/chunks/chunk-CX7XUPMH.js +0 -13
  585. package/dist/bin/chunks/chunk-D2V2UKR2.js +0 -12
  586. package/dist/bin/chunks/chunk-DD4R5YY7.js +0 -7
  587. package/dist/bin/chunks/chunk-DN7JDLUW.js +0 -26
  588. package/dist/bin/chunks/chunk-DVODFXEH.js +0 -5
  589. package/dist/bin/chunks/chunk-EC57ABPL.js +0 -9
  590. package/dist/bin/chunks/chunk-F7RPLNVE.js +0 -11
  591. package/dist/bin/chunks/chunk-FEA5SLRN.js +0 -6
  592. package/dist/bin/chunks/chunk-FJTEZ7ZL.js +0 -9
  593. package/dist/bin/chunks/chunk-FO6UO5LY.js +0 -12
  594. package/dist/bin/chunks/chunk-FYKWQWLG.js +0 -9
  595. package/dist/bin/chunks/chunk-GETENI3B.js +0 -18
  596. package/dist/bin/chunks/chunk-GTLVINNE.js +0 -4
  597. package/dist/bin/chunks/chunk-H7WPPRUD.js +0 -2
  598. package/dist/bin/chunks/chunk-HHBZ7ZEV.js +0 -5
  599. package/dist/bin/chunks/chunk-IGPJA6SA.js +0 -17
  600. package/dist/bin/chunks/chunk-J7REVEWS.js +0 -14
  601. package/dist/bin/chunks/chunk-JHKFD4EI.js +0 -24
  602. package/dist/bin/chunks/chunk-JUQT3ZM5.js +0 -23
  603. package/dist/bin/chunks/chunk-LXRRE42A.js +0 -5
  604. package/dist/bin/chunks/chunk-LYTEJIUW.js +0 -14
  605. package/dist/bin/chunks/chunk-MFXVUOM3.js +0 -2
  606. package/dist/bin/chunks/chunk-N3IFSXB3.js +0 -8
  607. package/dist/bin/chunks/chunk-NHZGQ3Y7.js +0 -84
  608. package/dist/bin/chunks/chunk-NIBKZJZM.js +0 -3
  609. package/dist/bin/chunks/chunk-NJTMAMPV.js +0 -3
  610. package/dist/bin/chunks/chunk-NQSOOEX5.js +0 -20
  611. package/dist/bin/chunks/chunk-NVK6GU4P.js +0 -3
  612. package/dist/bin/chunks/chunk-O4WYCXT4.js +0 -2
  613. package/dist/bin/chunks/chunk-OJGWI2DA.js +0 -63
  614. package/dist/bin/chunks/chunk-OXIM6UEO.js +0 -11
  615. package/dist/bin/chunks/chunk-PLF6WISW.js +0 -10
  616. package/dist/bin/chunks/chunk-PVAWMOD4.js +0 -8
  617. package/dist/bin/chunks/chunk-PXK4KVSW.js +0 -73
  618. package/dist/bin/chunks/chunk-Q2EFJFW4.js +0 -2
  619. package/dist/bin/chunks/chunk-Q5UK2Q5U.js +0 -2
  620. package/dist/bin/chunks/chunk-Q7XQB3YI.js +0 -7
  621. package/dist/bin/chunks/chunk-RXYSXOZE.js +0 -287
  622. package/dist/bin/chunks/chunk-SUC7ET2R.js +0 -14
  623. package/dist/bin/chunks/chunk-SXGBKAL5.js +0 -16
  624. package/dist/bin/chunks/chunk-T26GDTOU.js +0 -3
  625. package/dist/bin/chunks/chunk-T67GIEZU.js +0 -2
  626. package/dist/bin/chunks/chunk-TC7RJRFD.js +0 -16
  627. package/dist/bin/chunks/chunk-TWWOPYOU.js +0 -5
  628. package/dist/bin/chunks/chunk-UDJ6HRS4.js +0 -9
  629. package/dist/bin/chunks/chunk-UQXDPK2T.js +0 -7
  630. package/dist/bin/chunks/chunk-UREODEQQ.js +0 -21
  631. package/dist/bin/chunks/chunk-VDS4FNGM.js +0 -7
  632. package/dist/bin/chunks/chunk-VKE6V3ZO.js +0 -7
  633. package/dist/bin/chunks/chunk-VTQCQCQO.js +0 -140
  634. package/dist/bin/chunks/chunk-W4YU2U3A.js +0 -13
  635. package/dist/bin/chunks/chunk-X4GHJ5JH.js +0 -6
  636. package/dist/bin/chunks/chunk-XBI3O5AF.js +0 -9
  637. package/dist/bin/chunks/chunk-XNMKTUHV.js +0 -6
  638. package/dist/bin/chunks/chunk-ZTU6ENBH.js +0 -2
  639. package/dist/bin/chunks/chunk-ZVROZHDE.js +0 -5
  640. package/dist/bin/chunks/clear-Z6NC6SU4.js +0 -2
  641. package/dist/bin/chunks/column-UMVTEOKJ.js +0 -2
  642. package/dist/bin/chunks/comm-Q4W6PSZ3.js +0 -2
  643. package/dist/bin/chunks/cp-CAN7P3HK.js +0 -2
  644. package/dist/bin/chunks/curl-3PDMZXZI.js +0 -26
  645. package/dist/bin/chunks/cut-BQM2BHFI.js +0 -2
  646. package/dist/bin/chunks/date-XUF36E35.js +0 -2
  647. package/dist/bin/chunks/diff-7GMSJUJG.js +0 -2
  648. package/dist/bin/chunks/dirname-F7P24OLR.js +0 -2
  649. package/dist/bin/chunks/du-HDXNSQIT.js +0 -2
  650. package/dist/bin/chunks/echo-53OGHYIZ.js +0 -2
  651. package/dist/bin/chunks/env-N4LYWUJ6.js +0 -2
  652. package/dist/bin/chunks/expand-535WDY3S.js +0 -2
  653. package/dist/bin/chunks/expansion-GOJYNUQR.js +0 -2
  654. package/dist/bin/chunks/expr-Q7K5RKW2.js +0 -2
  655. package/dist/bin/chunks/file-XMHYEYO5.js +0 -2
  656. package/dist/bin/chunks/find-SJAABILU.js +0 -2
  657. package/dist/bin/chunks/flag-coverage-TBMB7M2N.js +0 -2
  658. package/dist/bin/chunks/fold-MAXEXDKA.js +0 -2
  659. package/dist/bin/chunks/grep-NXW3ZS2T.js +0 -2
  660. package/dist/bin/chunks/gzip-4TZR4OHX.js +0 -2
  661. package/dist/bin/chunks/head-BCMKSPGP.js +0 -2
  662. package/dist/bin/chunks/help-27WXVVW7.js +0 -2
  663. package/dist/bin/chunks/history-T6LTHEYW.js +0 -2
  664. package/dist/bin/chunks/hostname-QJD6DLJM.js +0 -2
  665. package/dist/bin/chunks/html-to-markdown-V7M7ZTGL.js +0 -2
  666. package/dist/bin/chunks/join-PWZ5VYJD.js +0 -2
  667. package/dist/bin/chunks/jq-XOCFM26Q.js +0 -2
  668. package/dist/bin/chunks/ln-X4VQOGPC.js +0 -2
  669. package/dist/bin/chunks/ls-O4UJCH3R.js +0 -2
  670. package/dist/bin/chunks/md5sum-2TRYEYPO.js +0 -2
  671. package/dist/bin/chunks/mkdir-Z65Y7YPB.js +0 -2
  672. package/dist/bin/chunks/mv-UULWKEXQ.js +0 -2
  673. package/dist/bin/chunks/nl-SIHFBFWW.js +0 -2
  674. package/dist/bin/chunks/od-YQTILXPI.js +0 -2
  675. package/dist/bin/chunks/paste-JA7SPT5I.js +0 -2
  676. package/dist/bin/chunks/printf-U3BAFNQW.js +0 -2
  677. package/dist/bin/chunks/pwd-JNTHRUS7.js +0 -2
  678. package/dist/bin/chunks/python3-BQAB3G6R.js +0 -14
  679. package/dist/bin/chunks/readlink-KGURBO5B.js +0 -2
  680. package/dist/bin/chunks/rev-TGHAXMHE.js +0 -2
  681. package/dist/bin/chunks/rg-PCNNZYUZ.js +0 -2
  682. package/dist/bin/chunks/rm-6BNEQYJH.js +0 -2
  683. package/dist/bin/chunks/rmdir-7PTJOZ3J.js +0 -2
  684. package/dist/bin/chunks/sed-IBSHYX2R.js +0 -2
  685. package/dist/bin/chunks/seq-WPCW5LYK.js +0 -2
  686. package/dist/bin/chunks/sha1sum-LHZ223LR.js +0 -2
  687. package/dist/bin/chunks/sha256sum-BFG6UGEY.js +0 -2
  688. package/dist/bin/chunks/sleep-HI2AX63U.js +0 -2
  689. package/dist/bin/chunks/sort-KLSRAA3S.js +0 -2
  690. package/dist/bin/chunks/split-OXHHEEHV.js +0 -2
  691. package/dist/bin/chunks/sqlite3-AKDJPDT5.js +0 -2
  692. package/dist/bin/chunks/stat-T6DAFOAE.js +0 -2
  693. package/dist/bin/chunks/strings-4AJIU4EW.js +0 -2
  694. package/dist/bin/chunks/tac-4GAH3XJY.js +0 -2
  695. package/dist/bin/chunks/tail-G2U2PW6H.js +0 -2
  696. package/dist/bin/chunks/tar-FYLHDP55.js +0 -2
  697. package/dist/bin/chunks/tee-T572YIXT.js +0 -2
  698. package/dist/bin/chunks/time-XSLSFXAR.js +0 -2
  699. package/dist/bin/chunks/timeout-ZPMBHNEN.js +0 -2
  700. package/dist/bin/chunks/touch-PKHKB4B2.js +0 -2
  701. package/dist/bin/chunks/tr-T7NEIDU6.js +0 -2
  702. package/dist/bin/chunks/tree-K2GININJ.js +0 -2
  703. package/dist/bin/chunks/true-JKHT73F3.js +0 -2
  704. package/dist/bin/chunks/unexpand-OAFTIEDP.js +0 -2
  705. package/dist/bin/chunks/uniq-2HGY5ABO.js +0 -2
  706. package/dist/bin/chunks/wc-ZTIOZ2H6.js +0 -2
  707. package/dist/bin/chunks/which-AHZHM3GH.js +0 -2
  708. package/dist/bin/chunks/whoami-IM7KVJBM.js +0 -2
  709. package/dist/bin/chunks/xan-EEBMX2PC.js +0 -2
  710. package/dist/bin/chunks/xan-view-Z7GM75UK.js +0 -2
  711. package/dist/bin/chunks/xargs-QPWVMTQK.js +0 -2
  712. package/dist/bin/chunks/yes-CK5F4N34.js +0 -2
  713. package/dist/bin/chunks/yq-R26WXE6W.js +0 -2
  714. package/dist/bin/shell/chunks/alias-VEEWI66Q.js +0 -2
  715. package/dist/bin/shell/chunks/awk2-LEBSBFO3.js +0 -2
  716. package/dist/bin/shell/chunks/base64-Q2G4GF6R.js +0 -2
  717. package/dist/bin/shell/chunks/basename-TNVKQHP5.js +0 -2
  718. package/dist/bin/shell/chunks/bash-E26LCUON.js +0 -2
  719. package/dist/bin/shell/chunks/cat-6WUYWK6Q.js +0 -2
  720. package/dist/bin/shell/chunks/chmod-YHG2ADMJ.js +0 -2
  721. package/dist/bin/shell/chunks/chunk-25DBXZPM.js +0 -100
  722. package/dist/bin/shell/chunks/chunk-272ZYGP4.js +0 -8
  723. package/dist/bin/shell/chunks/chunk-2KW5JZDM.js +0 -2
  724. package/dist/bin/shell/chunks/chunk-33EFJFXL.js +0 -10
  725. package/dist/bin/shell/chunks/chunk-3CCRFBBL.js +0 -23
  726. package/dist/bin/shell/chunks/chunk-3OP7VRO7.js +0 -6
  727. package/dist/bin/shell/chunks/chunk-3PIWDQZL.js +0 -19
  728. package/dist/bin/shell/chunks/chunk-4C26CCJR.js +0 -4
  729. package/dist/bin/shell/chunks/chunk-4G37X3GZ.js +0 -14
  730. package/dist/bin/shell/chunks/chunk-4KTWLZ5A.js +0 -8
  731. package/dist/bin/shell/chunks/chunk-55N7NX6G.js +0 -9
  732. package/dist/bin/shell/chunks/chunk-5OQOWWIB.js +0 -7
  733. package/dist/bin/shell/chunks/chunk-5WAR3CU3.js +0 -3
  734. package/dist/bin/shell/chunks/chunk-63VB22X2.js +0 -33
  735. package/dist/bin/shell/chunks/chunk-6KVPD5H7.js +0 -13
  736. package/dist/bin/shell/chunks/chunk-6OVV6A5W.js +0 -3
  737. package/dist/bin/shell/chunks/chunk-6PU2WD4P.js +0 -7
  738. package/dist/bin/shell/chunks/chunk-7ICAP454.js +0 -12
  739. package/dist/bin/shell/chunks/chunk-7QKMCOGE.js +0 -16
  740. package/dist/bin/shell/chunks/chunk-7SXBGUE4.js +0 -3
  741. package/dist/bin/shell/chunks/chunk-7VQY35S5.js +0 -8
  742. package/dist/bin/shell/chunks/chunk-7VVTANT2.js +0 -7
  743. package/dist/bin/shell/chunks/chunk-7XV5FI5D.js +0 -8
  744. package/dist/bin/shell/chunks/chunk-7Y5TZ5CE.js +0 -6
  745. package/dist/bin/shell/chunks/chunk-A2V4EW6Y.js +0 -10
  746. package/dist/bin/shell/chunks/chunk-ACV764YE.js +0 -5
  747. package/dist/bin/shell/chunks/chunk-AJBYK52Q.js +0 -36
  748. package/dist/bin/shell/chunks/chunk-BCE7PDXY.js +0 -32
  749. package/dist/bin/shell/chunks/chunk-BVWBX3A2.js +0 -9
  750. package/dist/bin/shell/chunks/chunk-COBNN6FR.js +0 -11
  751. package/dist/bin/shell/chunks/chunk-CVXSPZVY.js +0 -2
  752. package/dist/bin/shell/chunks/chunk-CX7XUPMH.js +0 -13
  753. package/dist/bin/shell/chunks/chunk-D2V2UKR2.js +0 -12
  754. package/dist/bin/shell/chunks/chunk-DD4R5YY7.js +0 -7
  755. package/dist/bin/shell/chunks/chunk-DN7JDLUW.js +0 -26
  756. package/dist/bin/shell/chunks/chunk-DVODFXEH.js +0 -5
  757. package/dist/bin/shell/chunks/chunk-EC57ABPL.js +0 -9
  758. package/dist/bin/shell/chunks/chunk-F7RPLNVE.js +0 -11
  759. package/dist/bin/shell/chunks/chunk-FEA5SLRN.js +0 -6
  760. package/dist/bin/shell/chunks/chunk-FJTEZ7ZL.js +0 -9
  761. package/dist/bin/shell/chunks/chunk-FO6UO5LY.js +0 -12
  762. package/dist/bin/shell/chunks/chunk-FYKWQWLG.js +0 -9
  763. package/dist/bin/shell/chunks/chunk-GETENI3B.js +0 -18
  764. package/dist/bin/shell/chunks/chunk-GTLVINNE.js +0 -4
  765. package/dist/bin/shell/chunks/chunk-H7WPPRUD.js +0 -2
  766. package/dist/bin/shell/chunks/chunk-HHBZ7ZEV.js +0 -5
  767. package/dist/bin/shell/chunks/chunk-IGPJA6SA.js +0 -17
  768. package/dist/bin/shell/chunks/chunk-J7REVEWS.js +0 -14
  769. package/dist/bin/shell/chunks/chunk-JHKFD4EI.js +0 -24
  770. package/dist/bin/shell/chunks/chunk-JUQT3ZM5.js +0 -23
  771. package/dist/bin/shell/chunks/chunk-LXRRE42A.js +0 -5
  772. package/dist/bin/shell/chunks/chunk-LYTEJIUW.js +0 -14
  773. package/dist/bin/shell/chunks/chunk-MFXVUOM3.js +0 -2
  774. package/dist/bin/shell/chunks/chunk-N3IFSXB3.js +0 -8
  775. package/dist/bin/shell/chunks/chunk-NHZGQ3Y7.js +0 -84
  776. package/dist/bin/shell/chunks/chunk-NIBKZJZM.js +0 -3
  777. package/dist/bin/shell/chunks/chunk-NJTMAMPV.js +0 -3
  778. package/dist/bin/shell/chunks/chunk-NQSOOEX5.js +0 -20
  779. package/dist/bin/shell/chunks/chunk-NVK6GU4P.js +0 -3
  780. package/dist/bin/shell/chunks/chunk-O4WYCXT4.js +0 -2
  781. package/dist/bin/shell/chunks/chunk-OJGWI2DA.js +0 -63
  782. package/dist/bin/shell/chunks/chunk-OXIM6UEO.js +0 -11
  783. package/dist/bin/shell/chunks/chunk-PLF6WISW.js +0 -10
  784. package/dist/bin/shell/chunks/chunk-PVAWMOD4.js +0 -8
  785. package/dist/bin/shell/chunks/chunk-PXK4KVSW.js +0 -73
  786. package/dist/bin/shell/chunks/chunk-Q2EFJFW4.js +0 -2
  787. package/dist/bin/shell/chunks/chunk-Q5UK2Q5U.js +0 -2
  788. package/dist/bin/shell/chunks/chunk-Q7XQB3YI.js +0 -7
  789. package/dist/bin/shell/chunks/chunk-RXYSXOZE.js +0 -287
  790. package/dist/bin/shell/chunks/chunk-SUC7ET2R.js +0 -14
  791. package/dist/bin/shell/chunks/chunk-SXGBKAL5.js +0 -16
  792. package/dist/bin/shell/chunks/chunk-T26GDTOU.js +0 -3
  793. package/dist/bin/shell/chunks/chunk-T67GIEZU.js +0 -2
  794. package/dist/bin/shell/chunks/chunk-TC7RJRFD.js +0 -16
  795. package/dist/bin/shell/chunks/chunk-TWWOPYOU.js +0 -5
  796. package/dist/bin/shell/chunks/chunk-UDJ6HRS4.js +0 -9
  797. package/dist/bin/shell/chunks/chunk-UQXDPK2T.js +0 -7
  798. package/dist/bin/shell/chunks/chunk-UREODEQQ.js +0 -21
  799. package/dist/bin/shell/chunks/chunk-VDS4FNGM.js +0 -7
  800. package/dist/bin/shell/chunks/chunk-VKE6V3ZO.js +0 -7
  801. package/dist/bin/shell/chunks/chunk-VTQCQCQO.js +0 -140
  802. package/dist/bin/shell/chunks/chunk-W4YU2U3A.js +0 -13
  803. package/dist/bin/shell/chunks/chunk-X4GHJ5JH.js +0 -6
  804. package/dist/bin/shell/chunks/chunk-XBI3O5AF.js +0 -9
  805. package/dist/bin/shell/chunks/chunk-XNMKTUHV.js +0 -6
  806. package/dist/bin/shell/chunks/chunk-ZTU6ENBH.js +0 -2
  807. package/dist/bin/shell/chunks/chunk-ZVROZHDE.js +0 -5
  808. package/dist/bin/shell/chunks/clear-Z6NC6SU4.js +0 -2
  809. package/dist/bin/shell/chunks/column-UMVTEOKJ.js +0 -2
  810. package/dist/bin/shell/chunks/comm-Q4W6PSZ3.js +0 -2
  811. package/dist/bin/shell/chunks/cp-CAN7P3HK.js +0 -2
  812. package/dist/bin/shell/chunks/curl-3PDMZXZI.js +0 -26
  813. package/dist/bin/shell/chunks/cut-BQM2BHFI.js +0 -2
  814. package/dist/bin/shell/chunks/date-XUF36E35.js +0 -2
  815. package/dist/bin/shell/chunks/diff-7GMSJUJG.js +0 -2
  816. package/dist/bin/shell/chunks/dirname-F7P24OLR.js +0 -2
  817. package/dist/bin/shell/chunks/du-HDXNSQIT.js +0 -2
  818. package/dist/bin/shell/chunks/echo-53OGHYIZ.js +0 -2
  819. package/dist/bin/shell/chunks/env-N4LYWUJ6.js +0 -2
  820. package/dist/bin/shell/chunks/expand-535WDY3S.js +0 -2
  821. package/dist/bin/shell/chunks/expansion-GOJYNUQR.js +0 -2
  822. package/dist/bin/shell/chunks/expr-Q7K5RKW2.js +0 -2
  823. package/dist/bin/shell/chunks/file-XMHYEYO5.js +0 -2
  824. package/dist/bin/shell/chunks/find-SJAABILU.js +0 -2
  825. package/dist/bin/shell/chunks/flag-coverage-TBMB7M2N.js +0 -2
  826. package/dist/bin/shell/chunks/fold-MAXEXDKA.js +0 -2
  827. package/dist/bin/shell/chunks/grep-NXW3ZS2T.js +0 -2
  828. package/dist/bin/shell/chunks/gzip-4TZR4OHX.js +0 -2
  829. package/dist/bin/shell/chunks/head-BCMKSPGP.js +0 -2
  830. package/dist/bin/shell/chunks/help-27WXVVW7.js +0 -2
  831. package/dist/bin/shell/chunks/history-T6LTHEYW.js +0 -2
  832. package/dist/bin/shell/chunks/hostname-QJD6DLJM.js +0 -2
  833. package/dist/bin/shell/chunks/html-to-markdown-V7M7ZTGL.js +0 -2
  834. package/dist/bin/shell/chunks/join-PWZ5VYJD.js +0 -2
  835. package/dist/bin/shell/chunks/jq-XOCFM26Q.js +0 -2
  836. package/dist/bin/shell/chunks/ln-X4VQOGPC.js +0 -2
  837. package/dist/bin/shell/chunks/ls-O4UJCH3R.js +0 -2
  838. package/dist/bin/shell/chunks/md5sum-2TRYEYPO.js +0 -2
  839. package/dist/bin/shell/chunks/mkdir-Z65Y7YPB.js +0 -2
  840. package/dist/bin/shell/chunks/mv-UULWKEXQ.js +0 -2
  841. package/dist/bin/shell/chunks/nl-SIHFBFWW.js +0 -2
  842. package/dist/bin/shell/chunks/od-YQTILXPI.js +0 -2
  843. package/dist/bin/shell/chunks/paste-JA7SPT5I.js +0 -2
  844. package/dist/bin/shell/chunks/printf-U3BAFNQW.js +0 -2
  845. package/dist/bin/shell/chunks/pwd-JNTHRUS7.js +0 -2
  846. package/dist/bin/shell/chunks/python3-BQAB3G6R.js +0 -14
  847. package/dist/bin/shell/chunks/readlink-KGURBO5B.js +0 -2
  848. package/dist/bin/shell/chunks/rev-TGHAXMHE.js +0 -2
  849. package/dist/bin/shell/chunks/rg-PCNNZYUZ.js +0 -2
  850. package/dist/bin/shell/chunks/rm-6BNEQYJH.js +0 -2
  851. package/dist/bin/shell/chunks/rmdir-7PTJOZ3J.js +0 -2
  852. package/dist/bin/shell/chunks/sed-IBSHYX2R.js +0 -2
  853. package/dist/bin/shell/chunks/seq-WPCW5LYK.js +0 -2
  854. package/dist/bin/shell/chunks/sha1sum-LHZ223LR.js +0 -2
  855. package/dist/bin/shell/chunks/sha256sum-BFG6UGEY.js +0 -2
  856. package/dist/bin/shell/chunks/sleep-HI2AX63U.js +0 -2
  857. package/dist/bin/shell/chunks/sort-KLSRAA3S.js +0 -2
  858. package/dist/bin/shell/chunks/split-OXHHEEHV.js +0 -2
  859. package/dist/bin/shell/chunks/sqlite3-AKDJPDT5.js +0 -2
  860. package/dist/bin/shell/chunks/stat-T6DAFOAE.js +0 -2
  861. package/dist/bin/shell/chunks/strings-4AJIU4EW.js +0 -2
  862. package/dist/bin/shell/chunks/tac-4GAH3XJY.js +0 -2
  863. package/dist/bin/shell/chunks/tail-G2U2PW6H.js +0 -2
  864. package/dist/bin/shell/chunks/tar-FYLHDP55.js +0 -2
  865. package/dist/bin/shell/chunks/tee-T572YIXT.js +0 -2
  866. package/dist/bin/shell/chunks/time-XSLSFXAR.js +0 -2
  867. package/dist/bin/shell/chunks/timeout-ZPMBHNEN.js +0 -2
  868. package/dist/bin/shell/chunks/touch-PKHKB4B2.js +0 -2
  869. package/dist/bin/shell/chunks/tr-T7NEIDU6.js +0 -2
  870. package/dist/bin/shell/chunks/tree-K2GININJ.js +0 -2
  871. package/dist/bin/shell/chunks/true-JKHT73F3.js +0 -2
  872. package/dist/bin/shell/chunks/unexpand-OAFTIEDP.js +0 -2
  873. package/dist/bin/shell/chunks/uniq-2HGY5ABO.js +0 -2
  874. package/dist/bin/shell/chunks/wc-ZTIOZ2H6.js +0 -2
  875. package/dist/bin/shell/chunks/which-AHZHM3GH.js +0 -2
  876. package/dist/bin/shell/chunks/whoami-IM7KVJBM.js +0 -2
  877. package/dist/bin/shell/chunks/xan-EEBMX2PC.js +0 -2
  878. package/dist/bin/shell/chunks/xan-view-Z7GM75UK.js +0 -2
  879. package/dist/bin/shell/chunks/xargs-QPWVMTQK.js +0 -2
  880. package/dist/bin/shell/chunks/yes-CK5F4N34.js +0 -2
  881. package/dist/bin/shell/chunks/yq-R26WXE6W.js +0 -2
  882. package/dist/bundle/chunks/alias-PFS6JBTL.js +0 -1
  883. package/dist/bundle/chunks/awk2-HG7QFRRO.js +0 -1
  884. package/dist/bundle/chunks/base64-UOYRM4DO.js +0 -1
  885. package/dist/bundle/chunks/basename-PRS2OP6R.js +0 -1
  886. package/dist/bundle/chunks/bash-UQXFZUPD.js +0 -1
  887. package/dist/bundle/chunks/cat-VI6AVTST.js +0 -1
  888. package/dist/bundle/chunks/chmod-5F3XJPPG.js +0 -1
  889. package/dist/bundle/chunks/chunk-2ERMTDAT.js +0 -1
  890. package/dist/bundle/chunks/chunk-2KW7BHBP.js +0 -5
  891. package/dist/bundle/chunks/chunk-2LC6GLRD.js +0 -10
  892. package/dist/bundle/chunks/chunk-2MWUJW7E.js +0 -13
  893. package/dist/bundle/chunks/chunk-2U6EPFDM.js +0 -4
  894. package/dist/bundle/chunks/chunk-4ECLUXYK.js +0 -5
  895. package/dist/bundle/chunks/chunk-4JZXWCPG.js +0 -2
  896. package/dist/bundle/chunks/chunk-4R3AYXSH.js +0 -6
  897. package/dist/bundle/chunks/chunk-4RPVMPGO.js +0 -4
  898. package/dist/bundle/chunks/chunk-4UNYQEQN.js +0 -6
  899. package/dist/bundle/chunks/chunk-525AJ4MJ.js +0 -9
  900. package/dist/bundle/chunks/chunk-54Z5HIDC.js +0 -7
  901. package/dist/bundle/chunks/chunk-5GE72EGR.js +0 -11
  902. package/dist/bundle/chunks/chunk-5HZ5BSXK.js +0 -1
  903. package/dist/bundle/chunks/chunk-5IUZJGTB.js +0 -99
  904. package/dist/bundle/chunks/chunk-5WPVRWBN.js +0 -12
  905. package/dist/bundle/chunks/chunk-63X77WZM.js +0 -15
  906. package/dist/bundle/chunks/chunk-6BNDUHW7.js +0 -72
  907. package/dist/bundle/chunks/chunk-6V3KZ3UR.js +0 -9
  908. package/dist/bundle/chunks/chunk-77R5SWIQ.js +0 -10
  909. package/dist/bundle/chunks/chunk-A6JH2Z2E.js +0 -7
  910. package/dist/bundle/chunks/chunk-AFZSOIRR.js +0 -1
  911. package/dist/bundle/chunks/chunk-AYQHTCJ6.js +0 -6
  912. package/dist/bundle/chunks/chunk-BJQSDFGC.js +0 -139
  913. package/dist/bundle/chunks/chunk-BOWOEGYM.js +0 -7
  914. package/dist/bundle/chunks/chunk-BXM5UMV3.js +0 -13
  915. package/dist/bundle/chunks/chunk-CDJANZJX.js +0 -5
  916. package/dist/bundle/chunks/chunk-CWN6Z4S3.js +0 -22
  917. package/dist/bundle/chunks/chunk-DGBRICQ7.js +0 -3
  918. package/dist/bundle/chunks/chunk-DGCTBS7B.js +0 -13
  919. package/dist/bundle/chunks/chunk-EBRN7NWX.js +0 -8
  920. package/dist/bundle/chunks/chunk-EHXIMSVW.js +0 -15
  921. package/dist/bundle/chunks/chunk-F2PTB6MB.js +0 -5
  922. package/dist/bundle/chunks/chunk-FTXRTVTE.js +0 -4
  923. package/dist/bundle/chunks/chunk-GNLJZOAK.js +0 -4
  924. package/dist/bundle/chunks/chunk-HACWJFGU.js +0 -1
  925. package/dist/bundle/chunks/chunk-HH6GYTGE.js +0 -13
  926. package/dist/bundle/chunks/chunk-HHGXJW4R.js +0 -6
  927. package/dist/bundle/chunks/chunk-HKR53LNA.js +0 -2
  928. package/dist/bundle/chunks/chunk-HZSJHPS7.js +0 -1
  929. package/dist/bundle/chunks/chunk-I3XSMOC3.js +0 -12
  930. package/dist/bundle/chunks/chunk-IYJXP33F.js +0 -1
  931. package/dist/bundle/chunks/chunk-JKPRCVTG.js +0 -6
  932. package/dist/bundle/chunks/chunk-K5ZCP6UY.js +0 -62
  933. package/dist/bundle/chunks/chunk-KMP3F7WZ.js +0 -17
  934. package/dist/bundle/chunks/chunk-KNKWEAIB.js +0 -4
  935. package/dist/bundle/chunks/chunk-KNU7V7YY.js +0 -8
  936. package/dist/bundle/chunks/chunk-KY5NMRVZ.js +0 -4
  937. package/dist/bundle/chunks/chunk-LHCQ2NLV.js +0 -6
  938. package/dist/bundle/chunks/chunk-M732FP7L.js +0 -2
  939. package/dist/bundle/chunks/chunk-MWKKYA7N.js +0 -19
  940. package/dist/bundle/chunks/chunk-MXTZUALD.js +0 -8
  941. package/dist/bundle/chunks/chunk-N52SZCYB.js +0 -2
  942. package/dist/bundle/chunks/chunk-N5W4XZNS.js +0 -32
  943. package/dist/bundle/chunks/chunk-NFM234IX.js +0 -23
  944. package/dist/bundle/chunks/chunk-NMWKV3TE.js +0 -9
  945. package/dist/bundle/chunks/chunk-O3BQP2BR.js +0 -7
  946. package/dist/bundle/chunks/chunk-ODBLLQG2.js +0 -35
  947. package/dist/bundle/chunks/chunk-OQWK6IJW.js +0 -1
  948. package/dist/bundle/chunks/chunk-OR2BZKU5.js +0 -31
  949. package/dist/bundle/chunks/chunk-OSYWE22E.js +0 -6
  950. package/dist/bundle/chunks/chunk-PJV5BSDQ.js +0 -8
  951. package/dist/bundle/chunks/chunk-PUYKMBEQ.js +0 -3
  952. package/dist/bundle/chunks/chunk-PXCZA2UF.js +0 -2
  953. package/dist/bundle/chunks/chunk-QDJ7TVPH.js +0 -2
  954. package/dist/bundle/chunks/chunk-QIE3SEPQ.js +0 -12
  955. package/dist/bundle/chunks/chunk-QIKTQFYF.js +0 -22
  956. package/dist/bundle/chunks/chunk-RDRBPOO3.js +0 -4
  957. package/dist/bundle/chunks/chunk-RO3SVOT2.js +0 -16
  958. package/dist/bundle/chunks/chunk-RQ7EV7AC.js +0 -7
  959. package/dist/bundle/chunks/chunk-RTIOH4X2.js +0 -1
  960. package/dist/bundle/chunks/chunk-RX22KJ4J.js +0 -10
  961. package/dist/bundle/chunks/chunk-SMDXZHIL.js +0 -8
  962. package/dist/bundle/chunks/chunk-SVBJBJ5T.js +0 -6
  963. package/dist/bundle/chunks/chunk-SYMUCSH2.js +0 -5
  964. package/dist/bundle/chunks/chunk-TPMG4TM3.js +0 -286
  965. package/dist/bundle/chunks/chunk-TYRM7VD4.js +0 -8
  966. package/dist/bundle/chunks/chunk-UL3YZMPQ.js +0 -8
  967. package/dist/bundle/chunks/chunk-V2LCHTLH.js +0 -15
  968. package/dist/bundle/chunks/chunk-V2U6WR7A.js +0 -11
  969. package/dist/bundle/chunks/chunk-WLD7KZYW.js +0 -6
  970. package/dist/bundle/chunks/chunk-WTU2M6ZH.js +0 -1
  971. package/dist/bundle/chunks/chunk-XG2PXUNT.js +0 -7
  972. package/dist/bundle/chunks/chunk-XREOVOVJ.js +0 -20
  973. package/dist/bundle/chunks/chunk-Y33UPDYF.js +0 -23
  974. package/dist/bundle/chunks/chunk-ZMLEPT2B.js +0 -2
  975. package/dist/bundle/chunks/chunk-ZVA3RKAH.js +0 -11
  976. package/dist/bundle/chunks/clear-AQF5Q2LP.js +0 -1
  977. package/dist/bundle/chunks/column-DTV4DT7Z.js +0 -1
  978. package/dist/bundle/chunks/comm-XNF4ZFIQ.js +0 -1
  979. package/dist/bundle/chunks/cp-O5R6UUTB.js +0 -1
  980. package/dist/bundle/chunks/curl-YF5UPZSP.js +0 -25
  981. package/dist/bundle/chunks/cut-A6AD4XLN.js +0 -1
  982. package/dist/bundle/chunks/date-5DATBXSY.js +0 -1
  983. package/dist/bundle/chunks/diff-4RUNUODF.js +0 -1
  984. package/dist/bundle/chunks/dirname-UXBVN4ZU.js +0 -1
  985. package/dist/bundle/chunks/du-URMOHN4N.js +0 -1
  986. package/dist/bundle/chunks/echo-BU4WS5NB.js +0 -1
  987. package/dist/bundle/chunks/env-PRCSFHFD.js +0 -1
  988. package/dist/bundle/chunks/expand-RSU7HJNU.js +0 -1
  989. package/dist/bundle/chunks/expansion-TBT2U5OQ.js +0 -1
  990. package/dist/bundle/chunks/expr-WHQ3N3VC.js +0 -1
  991. package/dist/bundle/chunks/file-OCSDEMRX.js +0 -1
  992. package/dist/bundle/chunks/find-KQBG3YXR.js +0 -1
  993. package/dist/bundle/chunks/flag-coverage-ZFQWXDD4.js +0 -1
  994. package/dist/bundle/chunks/fold-4XHCZTIH.js +0 -1
  995. package/dist/bundle/chunks/grep-MTDYJMIU.js +0 -1
  996. package/dist/bundle/chunks/gzip-JISR2QXU.js +0 -1
  997. package/dist/bundle/chunks/head-25BYUDHC.js +0 -1
  998. package/dist/bundle/chunks/help-A3QG3UR4.js +0 -1
  999. package/dist/bundle/chunks/history-GTNR2KMK.js +0 -1
  1000. package/dist/bundle/chunks/hostname-4YOTMKM4.js +0 -1
  1001. package/dist/bundle/chunks/html-to-markdown-3JPCPF2J.js +0 -1
  1002. package/dist/bundle/chunks/join-KEFNDBL6.js +0 -1
  1003. package/dist/bundle/chunks/jq-EBNRPZT5.js +0 -1
  1004. package/dist/bundle/chunks/ln-TBYICXCX.js +0 -1
  1005. package/dist/bundle/chunks/ls-C7B2SA5A.js +0 -1
  1006. package/dist/bundle/chunks/md5sum-2VY2ODII.js +0 -1
  1007. package/dist/bundle/chunks/mkdir-ZLWSOZZZ.js +0 -1
  1008. package/dist/bundle/chunks/mv-VA4VIZE2.js +0 -1
  1009. package/dist/bundle/chunks/nl-VNFLBUHM.js +0 -1
  1010. package/dist/bundle/chunks/od-3KUUCW5I.js +0 -1
  1011. package/dist/bundle/chunks/paste-5WOFHNWA.js +0 -1
  1012. package/dist/bundle/chunks/printf-U3U7M7RB.js +0 -1
  1013. package/dist/bundle/chunks/pwd-QYQ4FLB5.js +0 -1
  1014. package/dist/bundle/chunks/python3-NDB2XLKG.js +0 -13
  1015. package/dist/bundle/chunks/readlink-B3Y2BKAH.js +0 -1
  1016. package/dist/bundle/chunks/rev-ROSGTRA6.js +0 -1
  1017. package/dist/bundle/chunks/rg-F5QIE3YM.js +0 -1
  1018. package/dist/bundle/chunks/rm-7JBDYEU5.js +0 -1
  1019. package/dist/bundle/chunks/rmdir-A2RQAESC.js +0 -1
  1020. package/dist/bundle/chunks/sed-T3Z6L6KJ.js +0 -1
  1021. package/dist/bundle/chunks/seq-JDQVNKUK.js +0 -1
  1022. package/dist/bundle/chunks/sha1sum-DQ6NXZL5.js +0 -1
  1023. package/dist/bundle/chunks/sha256sum-OHTALYKZ.js +0 -1
  1024. package/dist/bundle/chunks/sleep-T43AU6EO.js +0 -1
  1025. package/dist/bundle/chunks/sort-NBGMSGSP.js +0 -1
  1026. package/dist/bundle/chunks/split-KHHBFS6N.js +0 -1
  1027. package/dist/bundle/chunks/sqlite3-XSQIVKH7.js +0 -1
  1028. package/dist/bundle/chunks/stat-LL77MZ57.js +0 -1
  1029. package/dist/bundle/chunks/strings-UEBU67ZB.js +0 -1
  1030. package/dist/bundle/chunks/tac-GPG772JP.js +0 -1
  1031. package/dist/bundle/chunks/tail-Z2TRGEQE.js +0 -1
  1032. package/dist/bundle/chunks/tar-3BUIIPMD.js +0 -1
  1033. package/dist/bundle/chunks/tee-ZZKDAZU6.js +0 -1
  1034. package/dist/bundle/chunks/time-66YFGDFJ.js +0 -1
  1035. package/dist/bundle/chunks/timeout-QN47GEC7.js +0 -1
  1036. package/dist/bundle/chunks/touch-BOVDTDEU.js +0 -1
  1037. package/dist/bundle/chunks/tr-LEOUNZSP.js +0 -1
  1038. package/dist/bundle/chunks/tree-OLQFL5TR.js +0 -1
  1039. package/dist/bundle/chunks/true-3GSKFWKO.js +0 -1
  1040. package/dist/bundle/chunks/unexpand-AV4WTA4X.js +0 -1
  1041. package/dist/bundle/chunks/uniq-RBOLK7C3.js +0 -1
  1042. package/dist/bundle/chunks/wc-VYPMUZSO.js +0 -1
  1043. package/dist/bundle/chunks/which-6QROVGQN.js +0 -1
  1044. package/dist/bundle/chunks/whoami-NJ6ZQ54Y.js +0 -1
  1045. package/dist/bundle/chunks/xan-IVSICJOO.js +0 -1
  1046. package/dist/bundle/chunks/xan-view-JIIHMXCO.js +0 -1
  1047. package/dist/bundle/chunks/xargs-QQG6OLB3.js +0 -1
  1048. package/dist/bundle/chunks/yes-JBIBIE7V.js +0 -1
  1049. package/dist/bundle/chunks/yq-RIVAIAQ2.js +0 -1
@@ -0,0 +1,20 @@
1
+ import{a as he}from"./chunk-UBLR5ACC.js";import{a as A,b as _}from"./chunk-XYWNAVNS.js";import{k as b}from"./chunk-BX5K34KY.js";import{a as le,b as ue,c as Z}from"./chunk-WPPIJX5K.js";import{b as P,f as M,h as $}from"./chunk-KL7SL7ES.js";import{k as ce}from"./chunk-DEQBZDPB.js";var _e=1e4,Ge=100,xe=new _(/\s+/);function Y(e={}){let{fieldSep:t=xe,maxIterations:r=_e,maxRecursionDepth:i=Ge,maxOutputSize:s=0,fs:a,cwd:o,exec:c,coverage:l}=e;return{FS:" ",OFS:" ",ORS:`
2
+ `,OFMT:"%.6g",NR:0,NF:0,FNR:0,FILENAME:"",RSTART:0,RLENGTH:-1,SUBSEP:"",fields:[],line:"",vars:Object.create(null),arrays:Object.create(null),arrayAliases:new Map,ARGC:0,ARGV:Object.create(null),ENVIRON:Object.create(null),functions:new Map,fieldSep:t,maxIterations:r,maxRecursionDepth:i,maxOutputSize:s,currentRecursionDepth:0,exitCode:0,shouldExit:!1,shouldNext:!1,shouldNextFile:!1,loopBreak:!1,loopContinue:!1,hasReturn:!1,inEndBlock:!1,output:"",openedFiles:new Set,fs:a,cwd:o,exec:c,coverage:l}}function pe(e,t,r){switch(r){case"+":return e+t;case"-":return e-t;case"*":return e*t;case"/":return t!==0?e/t:0;case"%":return t!==0?e%t:0;case"^":case"**":return e**t;default:return 0}}function O(e){if(typeof e=="number")return e;let t=parseFloat(e);return Number.isNaN(t)?0:t}function I(e){return typeof e=="string"?e:(Number.isInteger(e),String(e))}async function W(e,t){if(e.type==="regex")return e.pattern;let r=I(await t.evalExpr(e));return r.startsWith("/")&&r.endsWith("/")&&(r=r.slice(1,-1)),r}async function de(e,t){return e?e.type==="variable"?e.name:e.type==="field"?`$${Math.floor(O(await t.evalExpr(e.index)))}`:"$0":"$0"}function Ee(e,t){if(e==="$0")return t.line;if(e.startsWith("$")){let r=parseInt(e.slice(1),10)-1;return t.fields[r]||""}return I(t.vars[e]??"")}function Ne(e,t,r){if(e==="$0")r.line=t,r.fields=r.FS===" "?t.trim().split(/\s+/).filter(Boolean):r.fieldSep.split(t),r.NF=r.fields.length;else if(e.startsWith("$")){let i=parseInt(e.slice(1),10)-1;for(;r.fields.length<=i;)r.fields.push("");r.fields[i]=t,r.NF=r.fields.length,r.line=r.fields.join(r.OFS)}else r.vars[e]=t}async function De(e,t,r){return e.length===0?t.line.length:I(await r.evalExpr(e[0])).length}async function Ue(e,t,r){if(e.length<2)return"";let i=I(await r.evalExpr(e[0])),s=Math.floor(O(await r.evalExpr(e[1])))-1;if(e.length>=3){let a=Math.floor(O(await r.evalExpr(e[2])));return i.substr(Math.max(0,s),a)}return i.substr(Math.max(0,s))}async function Be(e,t,r){if(e.length<2)return 0;let i=I(await r.evalExpr(e[0])),s=I(await r.evalExpr(e[1])),a=i.indexOf(s);return a===-1?0:a+1}async function He(e,t,r){if(e.length<2)return 0;let i=I(await r.evalExpr(e[0])),s=e[1];if(s.type!=="variable")return 0;let a=s.name,o=t.FS;if(e.length>=3){let l=e[2];if(l.type==="regex")o=A(l.pattern);else{let N=I(await r.evalExpr(l));o=N===" "?A("\\s+"):N}}else t.FS===" "&&(o=A("\\s+"));let c=typeof o=="string"?i.split(o):o.split(i);t.arrays[a]=Object.create(null);for(let l=0;l<c.length;l++)t.arrays[a][String(l+1)]=c[l];return c.length}async function $e(e,t,r){if(e.length<2)return 0;let i=await W(e[0],r),s=I(await r.evalExpr(e[1])),a=await de(e[2],r),o=Ee(a,t);try{let l=A(i).replace(o,Se(s)),N=l!==o?1:0;return Ne(a,l,t),N}catch{return 0}}async function We(e,t,r){if(e.length<2)return 0;let i=await W(e[0],r),s=I(await r.evalExpr(e[1])),a=await de(e[2],r),o=Ee(a,t);try{let c=A(i,"g"),l=c.match(o),N=l?l.length:0,w=c.replace(o,Se(s));return Ne(a,w,t),N}catch{return 0}}function Se(e){return t=>{let r="",i=0;for(;i<e.length;)if(e[i]==="\\"&&i+1<e.length){let s=e[i+1];s==="&"?(r+="&",i+=2):s==="\\"?(r+="\\",i+=2):(r+=e[i+1],i+=2)}else e[i]==="&"?(r+=t,i++):(r+=e[i],i++);return r}}async function Ve(e,t,r){if(e.length<2)return t.RSTART=0,t.RLENGTH=-1,0;let i=I(await r.evalExpr(e[0])),s=await W(e[1],r);try{let o=A(s).exec(i);if(o)return t.RSTART=o.index+1,t.RLENGTH=o[0].length,t.RSTART}catch{}return t.RSTART=0,t.RLENGTH=-1,0}async function Ke(e,t,r){if(e.length<3)return"";let i=await W(e[0],r),s=I(await r.evalExpr(e[1])),a=I(await r.evalExpr(e[2])),o=e.length>=4?I(await r.evalExpr(e[3])):t.line;try{let c=a.toLowerCase()==="g",l=c?0:parseInt(a,10)||1;if(c)return A(i,"g").replace(o,(w,...L)=>fe(s,w,L.slice(0,-2)));{let N=0;return A(i,"g").replace(o,(L,...y)=>(N++,N===l?fe(s,L,y.slice(0,-2)):L))}}catch{return o}}function fe(e,t,r){let i="",s=0;for(;s<e.length;)if(e[s]==="\\"&&s+1<e.length){let a=e[s+1];if(a==="&")i+="&",s+=2;else if(a==="0")i+=t,s+=2;else if(a>="1"&&a<="9"){let o=parseInt(a,10)-1;i+=r[o]||"",s+=2}else a==="n"?(i+=`
3
+ `,s+=2):a==="t"?(i+=" ",s+=2):(i+=a,s+=2)}else e[s]==="&"?(i+=t,s++):(i+=e[s],s++);return i}async function Xe(e,t,r){return e.length===0?"":I(await r.evalExpr(e[0])).toLowerCase()}async function je(e,t,r){return e.length===0?"":I(await r.evalExpr(e[0])).toUpperCase()}async function ze(e,t,r){if(e.length===0)return"";let i=I(await r.evalExpr(e[0])),s=[];for(let a=1;a<e.length;a++)s.push(await r.evalExpr(e[a]));return V(i,s)}async function Qe(e,t,r){return e.length===0?0:Math.floor(O(await r.evalExpr(e[0])))}async function qe(e,t,r){return e.length===0?0:Math.sqrt(O(await r.evalExpr(e[0])))}async function Je(e,t,r){return e.length===0?0:Math.sin(O(await r.evalExpr(e[0])))}async function Ze(e,t,r){return e.length===0?0:Math.cos(O(await r.evalExpr(e[0])))}async function Ye(e,t,r){let i=e.length>0?O(await r.evalExpr(e[0])):0,s=e.length>1?O(await r.evalExpr(e[1])):0;return Math.atan2(i,s)}async function et(e,t,r){return e.length===0?0:Math.log(O(await r.evalExpr(e[0])))}async function tt(e,t,r){return e.length===0?1:Math.exp(O(await r.evalExpr(e[0])))}function rt(e,t,r){return t.random?t.random():Math.random()}async function nt(e,t,r){let i=e.length>0?O(await r.evalExpr(e[0])):Date.now();return t.vars._srand_seed=i,i}function it(e,t){return()=>{throw new Error(`${e}() is not supported - ${t}`)}}function ee(e){return()=>{throw new Error(`function '${e}()' is not implemented`)}}var T=1e4;function V(e,t){let r=0,i="",s=0;for(;s<e.length;)if(e[s]==="%"&&s+1<e.length){let a=s+1,o="",c="",l="",N,w=a;for(;a<e.length&&/\d/.test(e[a]);)a++;a>w&&e[a]==="$"?(N=parseInt(e.substring(w,a),10)-1,a++):a=w;let L=()=>{if(a<e.length){if(a+1<e.length&&(e[a]==="h"&&e[a+1]==="h"||e[a]==="l"&&e[a+1]==="l")){a+=2;return}/[lzjh]/.test(e[a])&&a++}};for(;a<e.length&&/[-+ #0]/.test(e[a]);)o+=e[a++];if(e[a]==="*"){let E=t[r++],h=E!==void 0?Math.floor(Number(E)):0;h<0?(o+="-",c=String(Math.min(-h,T))):c=String(Math.min(h,T)),a++}else for(;a<e.length&&/\d/.test(e[a]);)c+=e[a++];if(c&&parseInt(c,10)>T&&(c=String(T)),e[a]==="."){if(a++,e[a]==="*"){let E=t[r++];l=String(Math.min(E!==void 0?Math.floor(Number(E)):0,T)),a++}else for(;a<e.length&&/\d/.test(e[a]);)l+=e[a++];l&&parseInt(l,10)>T&&(l=String(T))}L();let y=e[a],g=t[N!==void 0?N:r];switch(y){case"s":{let E=g!==void 0?String(g):"";if(l&&(E=E.substring(0,parseInt(l,10))),c){let h=parseInt(c,10);o.includes("-")?E=E.padEnd(h):E=E.padStart(h)}i+=E,N===void 0&&r++;break}case"d":case"i":{let E=g!==void 0?Math.floor(Number(g)):0;Number.isNaN(E)&&(E=0);let h=E<0,p=Math.abs(E).toString();if(l){let C=parseInt(l,10);p=p.padStart(C,"0")}let f="";h?f="-":o.includes("+")?f="+":o.includes(" ")&&(f=" ");let R=f+p;if(c){let C=parseInt(c,10);o.includes("-")?R=R.padEnd(C):o.includes("0")&&!l?R=f+p.padStart(C-f.length,"0"):R=R.padStart(C)}i+=R,N===void 0&&r++;break}case"f":{let E=g!==void 0?Number(g):0;Number.isNaN(E)&&(E=0);let h=l?parseInt(l,10):6,p=E.toFixed(h);if(c){let f=parseInt(c,10);o.includes("-")?p=p.padEnd(f):p=p.padStart(f)}i+=p,N===void 0&&r++;break}case"e":case"E":{let E=g!==void 0?Number(g):0;Number.isNaN(E)&&(E=0);let h=l?parseInt(l,10):6,p=E.toExponential(h);if(y==="E"&&(p=p.toUpperCase()),c){let f=parseInt(c,10);o.includes("-")?p=p.padEnd(f):p=p.padStart(f)}i+=p,N===void 0&&r++;break}case"g":case"G":{let E=g!==void 0?Number(g):0;Number.isNaN(E)&&(E=0);let h=l?parseInt(l,10):6,p=E!==0?Math.floor(Math.log10(Math.abs(E))):0,f;if(E===0?f="0":p<-4||p>=h?(f=E.toExponential(h-1),y==="G"&&(f=f.toUpperCase())):f=E.toPrecision(h),f.includes(".")&&(f=f.replace(/\.?0+$/,"").replace(/\.?0+e/,"e")),f.includes("e")&&(f=f.replace(/\.?0+e/,"e")),c){let R=parseInt(c,10);o.includes("-")?f=f.padEnd(R):f=f.padStart(R)}i+=f,N===void 0&&r++;break}case"x":case"X":{let E=g!==void 0?Math.floor(Number(g)):0;Number.isNaN(E)&&(E=0);let h=Math.abs(E).toString(16);if(y==="X"&&(h=h.toUpperCase()),l){let R=parseInt(l,10);h=h.padStart(R,"0")}let p=E<0?"-":"",f=p+h;if(c){let R=parseInt(c,10);o.includes("-")?f=f.padEnd(R):o.includes("0")&&!l?f=p+h.padStart(R-p.length,"0"):f=f.padStart(R)}i+=f,N===void 0&&r++;break}case"o":{let E=g!==void 0?Math.floor(Number(g)):0;Number.isNaN(E)&&(E=0);let h=Math.abs(E).toString(8);if(l){let R=parseInt(l,10);h=h.padStart(R,"0")}let p=E<0?"-":"",f=p+h;if(c){let R=parseInt(c,10);o.includes("-")?f=f.padEnd(R):o.includes("0")&&!l?f=p+h.padStart(R-p.length,"0"):f=f.padStart(R)}i+=f,N===void 0&&r++;break}case"c":{typeof g=="number"?i+=String.fromCharCode(g):i+=String(g??"").charAt(0)||"",N===void 0&&r++;break}case"%":i+="%";break;default:i+=e.substring(s,a+1)}s=a+1}else if(e[s]==="\\"&&s+1<e.length){let a=e[s+1];switch(a){case"n":i+=`
4
+ `;break;case"t":i+=" ";break;case"r":i+="\r";break;case"\\":i+="\\";break;default:i+=a}s+=2}else i+=e[s++];return i}var ye=new Map([["length",De],["substr",Ue],["index",Be],["split",He],["sub",$e],["gsub",We],["match",Ve],["gensub",Ke],["tolower",Xe],["toupper",je],["sprintf",ze],["int",Qe],["sqrt",qe],["sin",Je],["cos",Ze],["atan2",Ye],["log",et],["exp",tt],["rand",rt],["srand",nt],["system",it("system","shell execution not allowed in sandboxed environment")],["close",()=>0],["fflush",()=>0],["systime",ee("systime")],["mktime",ee("mktime")],["strftime",ee("strftime")]]);function v(e){return typeof e=="number"?e!==0:!(e===""||e==="0")}function m(e){if(typeof e=="number")return e;let t=parseFloat(e);return Number.isNaN(t)?0:t}function S(e){return typeof e=="string"?e:(Number.isInteger(e),String(e))}function te(e){if(typeof e=="number")return!0;let t=String(e).trim();return t===""?!1:!Number.isNaN(Number(t))}function U(e,t){try{return A(e).test(t)}catch{return!1}}function Re(e,t){return t===""?[]:e.FS===" "?t.trim().split(/\s+/).filter(Boolean):e.fieldSep.split(t)}function K(e,t){return t===0?e.line:t<0||t>e.fields.length?"":e.fields[t-1]??""}function re(e,t,r){if(t===0)e.line=S(r),e.fields=Re(e,e.line),e.NF=e.fields.length;else if(t>0){for(;e.fields.length<t;)e.fields.push("");e.fields[t-1]=S(r),e.NF=e.fields.length,e.line=e.fields.join(e.OFS)}}function G(e,t){e.line=t,e.fields=Re(e,t),e.NF=e.fields.length}function me(e,t){if(e.FS=t,t===" ")e.fieldSep=new _(/\s+/);else try{e.fieldSep=A(t)}catch{e.fieldSep=A(t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))}}function X(e,t){switch(t){case"FS":return e.FS;case"OFS":return e.OFS;case"ORS":return e.ORS;case"OFMT":return e.OFMT;case"NR":return e.NR;case"NF":return e.NF;case"FNR":return e.FNR;case"FILENAME":return e.FILENAME;case"RSTART":return e.RSTART;case"RLENGTH":return e.RLENGTH;case"SUBSEP":return e.SUBSEP;case"ARGC":return e.ARGC}return e.vars[t]??""}function x(e,t,r){switch(t){case"FS":me(e,S(r));return;case"OFS":e.OFS=S(r);return;case"ORS":e.ORS=S(r);return;case"OFMT":e.OFMT=S(r);return;case"NR":e.NR=Math.floor(m(r));return;case"NF":{let i=Math.floor(m(r));if(i<e.NF)e.fields=e.fields.slice(0,i),e.line=e.fields.join(e.OFS);else if(i>e.NF){for(;e.fields.length<i;)e.fields.push("");e.line=e.fields.join(e.OFS)}e.NF=i;return}case"FNR":e.FNR=Math.floor(m(r));return;case"FILENAME":e.FILENAME=S(r);return;case"RSTART":e.RSTART=Math.floor(m(r));return;case"RLENGTH":e.RLENGTH=Math.floor(m(r));return;case"SUBSEP":e.SUBSEP=S(r);return}e.vars[t]=r}function B(e,t){let r=t,i=new Set,s=e.arrayAliases.get(r);for(;s!==void 0&&!i.has(r);)i.add(r),r=s,s=e.arrayAliases.get(r);return r}function j(e,t,r){if(t==="ARGV")return e.ARGV[r]??"";if(t==="ENVIRON")return e.ENVIRON[r]??"";let i=B(e,t);return e.arrays[i]?.[r]??""}function ne(e,t,r,i){let s=B(e,t);e.arrays[s]||(e.arrays[s]=Object.create(null)),e.arrays[s][r]=i}function Ae(e,t,r){if(t==="ARGV")return e.ARGV[r]!==void 0;if(t==="ENVIRON")return e.ENVIRON[r]!==void 0;let i=B(e,t);return e.arrays[i]?.[r]!==void 0}function ge(e,t,r){let i=B(e,t);e.arrays[i]&&delete e.arrays[i][r]}function we(e,t){let r=B(e,t);delete e.arrays[r]}var ie=null;function Ie(e){ie=e}async function d(e,t){switch(e.coverage?.hit(`awk:expr:${t.type}`),t.type){case"number":return t.value;case"string":return t.value;case"regex":return U(t.pattern,e.line)?1:0;case"field":return st(e,t);case"variable":return X(e,t.name);case"array_access":return at(e,t);case"binary":return ot(e,t);case"unary":return ut(e,t);case"ternary":return v(await d(e,t.condition))?await d(e,t.consequent):await d(e,t.alternate);case"call":return ht(e,t.name,t.args);case"assignment":return ft(e,t);case"pre_increment":return dt(e,t.operand);case"pre_decrement":return Et(e,t.operand);case"post_increment":return Nt(e,t.operand);case"post_decrement":return St(e,t.operand);case"in":return yt(e,t.key,t.array);case"getline":return Rt(e,t.variable,t.file,t.command);case"tuple":return gt(e,t.elements);default:return""}}async function st(e,t){let r=Math.floor(m(await d(e,t.index)));return K(e,r)}async function at(e,t){let r=S(await d(e,t.key));return j(e,t.array,r)}async function ot(e,t){let r=t.operator;if(r==="||")return v(await d(e,t.left))||v(await d(e,t.right))?1:0;if(r==="&&")return v(await d(e,t.left))&&v(await d(e,t.right))?1:0;if(r==="~"){let c=await d(e,t.left);t.right.type==="regex"&&e.coverage?.hit("awk:expr:regex");let l=t.right.type==="regex"?t.right.pattern:S(await d(e,t.right));try{return A(l).test(S(c))?1:0}catch{return 0}}if(r==="!~"){let c=await d(e,t.left);t.right.type==="regex"&&e.coverage?.hit("awk:expr:regex");let l=t.right.type==="regex"?t.right.pattern:S(await d(e,t.right));try{return A(l).test(S(c))?0:1}catch{return 1}}let i=await d(e,t.left),s=await d(e,t.right);if(r===" "){let c=S(i)+S(s);if(e.maxOutputSize>0&&c.length>e.maxOutputSize)throw new b(`awk: string concatenation size limit exceeded (${e.maxOutputSize} bytes)`,"string_length");return c}if(ct(r))return lt(i,s,r);let a=m(i),o=m(s);return pe(a,o,r)}function ct(e){return["<","<=",">",">=","==","!="].includes(e)}function lt(e,t,r){let i=te(e),s=te(t);if(i&&s){let c=m(e),l=m(t);switch(r){case"<":return c<l?1:0;case"<=":return c<=l?1:0;case">":return c>l?1:0;case">=":return c>=l?1:0;case"==":return c===l?1:0;case"!=":return c!==l?1:0}}let a=S(e),o=S(t);switch(r){case"<":return a<o?1:0;case"<=":return a<=o?1:0;case">":return a>o?1:0;case">=":return a>=o?1:0;case"==":return a===o?1:0;case"!=":return a!==o?1:0}return 0}async function ut(e,t){let r=await d(e,t.operand);switch(t.operator){case"!":return v(r)?0:1;case"-":return-m(r);case"+":return+m(r);default:return r}}async function ht(e,t,r){let i=ye.get(t);if(i)return i(r,e,{evalExpr:a=>d(e,a)});let s=e.functions.get(t);return s?pt(e,s,r):""}async function pt(e,t,r){if(e.currentRecursionDepth++,e.currentRecursionDepth>e.maxRecursionDepth)throw e.currentRecursionDepth--,new b(`awk: recursion depth exceeded maximum (${e.maxRecursionDepth})`,"recursion");let i=Object.create(null);for(let o of t.params)i[o]=e.vars[o];let s=[];for(let o=0;o<t.params.length;o++){let c=t.params[o];if(o<r.length){let l=r[o];l.type==="variable"&&(e.arrayAliases.set(c,l.name),s.push(c));let N=await d(e,l);e.vars[c]=N}else e.vars[c]=""}e.hasReturn=!1,e.returnValue=void 0,ie&&await ie(e,t.body.statements);let a=e.returnValue??"";for(let o of t.params)i[o]!==void 0?e.vars[o]=i[o]:delete e.vars[o];for(let o of s)e.arrayAliases.delete(o);return e.hasReturn=!1,e.returnValue=void 0,e.currentRecursionDepth--,a}async function ft(e,t){let r=await d(e,t.value),i=t.target,s=t.operator,a;if(s==="=")a=r;else{let o;if(i.type==="field"){let N=Math.floor(m(await d(e,i.index)));o=K(e,N)}else if(i.type==="variable")o=X(e,i.name);else{let N=S(await d(e,i.key));o=j(e,i.array,N)}let c=m(o),l=m(r);switch(s){case"+=":a=c+l;break;case"-=":a=c-l;break;case"*=":a=c*l;break;case"/=":a=l!==0?c/l:0;break;case"%=":a=l!==0?c%l:0;break;case"^=":a=c**l;break;default:a=r}}if(i.type==="field"){let o=Math.floor(m(await d(e,i.index)));re(e,o,a)}else if(i.type==="variable")x(e,i.name,a);else{let o=S(await d(e,i.key));ne(e,i.array,o,a)}return a}async function z(e,t,r,i){let s;if(t.type==="field"){let a=Math.floor(m(await d(e,t.index)));s=m(K(e,a)),re(e,a,s+r)}else if(t.type==="variable")s=m(X(e,t.name)),x(e,t.name,s+r);else{let a=S(await d(e,t.key));s=m(j(e,t.array,a)),ne(e,t.array,a,s+r)}return i?s+r:s}async function dt(e,t){return z(e,t,1,!0)}async function Et(e,t){return z(e,t,-1,!0)}async function Nt(e,t){return z(e,t,1,!1)}async function St(e,t){return z(e,t,-1,!1)}async function yt(e,t,r){let i;if(t.type==="tuple"){e.coverage?.hit("awk:expr:tuple");let s=[];for(let a of t.elements)s.push(S(await d(e,a)));i=s.join(e.SUBSEP)}else i=S(await d(e,t));return Ae(e,r,i)?1:0}async function Rt(e,t,r,i){if(i)return mt(e,t,i);if(r)return At(e,t,r);if(!e.lines||e.lineIndex===void 0)return-1;let s=e.lineIndex+1;if(s>=e.lines.length)return 0;let a=e.lines[s];return t?x(e,t,a):G(e,a),e.NR++,e.lineIndex=s,1}async function mt(e,t,r){if(!e.exec)return-1;let i=S(await d(e,r)),s=`__cmd_${i}`,a=`__cmdi_${i}`,o,c;if(e.vars[s]===void 0)try{o=(await e.exec(i)).stdout.split(`
5
+ `),o.length>0&&o[o.length-1]===""&&o.pop(),e.vars[s]=JSON.stringify(o),e.vars[a]=-1,c=-1}catch{return-1}else o=JSON.parse(e.vars[s]),c=e.vars[a];let l=c+1;if(l>=o.length)return 0;let N=o[l];return e.vars[a]=l,t?x(e,t,N):G(e,N),1}async function At(e,t,r){if(!e.fs||!e.cwd)return-1;let i=S(await d(e,r));if(i==="/dev/null")return 0;let s=e.fs.resolvePath(e.cwd,i),a=`__fc_${s}`,o=`__fi_${s}`,c,l;if(e.vars[a]===void 0)try{c=(await e.fs.readFile(s)).split(`
6
+ `),c.length>0&&c[c.length-1]===""&&c.pop(),e.vars[a]=JSON.stringify(c),e.vars[o]=-1,l=-1}catch{return-1}else c=JSON.parse(e.vars[a]),l=e.vars[o];let N=l+1;if(N>=c.length)return 0;let w=c[N];return e.vars[o]=N,t?x(e,t,w):G(e,w),1}async function gt(e,t){if(t.length===0)return"";for(let r=0;r<t.length-1;r++)await d(e,t[r]);return d(e,t[t.length-1])}Ie(D);function se(e){if(e.maxOutputSize>0&&e.output.length>e.maxOutputSize)throw new b(`awk: output size limit exceeded (${e.maxOutputSize} bytes)`,"string_length")}async function D(e,t){for(let r of t)if(await F(e,r),wt(e))break}function wt(e){return e.shouldExit||e.shouldNext||e.shouldNextFile||e.loopBreak||e.loopContinue||e.hasReturn}async function F(e,t){switch(e.coverage?.hit(`awk:stmt:${t.type}`),t.type){case"block":await D(e,t.statements);break;case"expr_stmt":await d(e,t.expression);break;case"print":await It(e,t.args,t.output);break;case"printf":await vt(e,t.format,t.args,t.output);break;case"if":await kt(e,t);break;case"while":await Ct(e,t);break;case"do_while":await Ot(e,t);break;case"for":await bt(e,t);break;case"for_in":await Lt(e,t);break;case"break":e.loopBreak=!0;break;case"continue":e.loopContinue=!0;break;case"next":e.shouldNext=!0;break;case"nextfile":e.shouldNextFile=!0;break;case"exit":e.shouldExit=!0,e.exitCode=t.code?Math.floor(m(await d(e,t.code))):0;break;case"return":e.hasReturn=!0,e.returnValue=t.value?await d(e,t.value):"";break;case"delete":await Mt(e,t.target);break}}async function It(e,t,r){let i=[];for(let a of t){let o=await d(e,a);typeof o=="number"?Number.isInteger(o)&&Math.abs(o)<Number.MAX_SAFE_INTEGER?i.push(String(o)):i.push(V(e.OFMT,[o])):i.push(S(o))}let s=i.join(e.OFS)+e.ORS;r?await ve(e,r.redirect,r.file,s):(e.output+=s,se(e))}async function vt(e,t,r,i){let s=S(await d(e,t)),a=[];for(let c of r)a.push(await d(e,c));let o=V(s,a);i?await ve(e,i.redirect,i.file,o):(e.output+=o,se(e))}async function ve(e,t,r,i){if(!e.fs||!e.cwd){e.output+=i,se(e);return}let s=S(await d(e,r)),a=e.fs.resolvePath(e.cwd,s);t===">"?e.openedFiles.has(a)?await e.fs.appendFile(a,i):(await e.fs.writeFile(a,i),e.openedFiles.add(a)):(e.openedFiles.has(a)||e.openedFiles.add(a),await e.fs.appendFile(a,i))}async function kt(e,t){v(await d(e,t.condition))?await F(e,t.consequent):t.alternate&&await F(e,t.alternate)}async function Ct(e,t){let r=0;for(;v(await d(e,t.condition));){if(r++,r>e.maxIterations)throw new b(`awk: while loop exceeded maximum iterations (${e.maxIterations})`,"iterations");if(e.loopContinue=!1,await F(e,t.body),e.loopBreak){e.loopBreak=!1;break}if(e.shouldExit||e.shouldNext||e.hasReturn)break}}async function Ot(e,t){let r=0;do{if(r++,r>e.maxIterations)throw new b(`awk: do-while loop exceeded maximum iterations (${e.maxIterations})`,"iterations");if(e.loopContinue=!1,await F(e,t.body),e.loopBreak){e.loopBreak=!1;break}if(e.shouldExit||e.shouldNext||e.hasReturn)break}while(v(await d(e,t.condition)))}async function bt(e,t){t.init&&await d(e,t.init);let r=0;for(;!t.condition||v(await d(e,t.condition));){if(r++,r>e.maxIterations)throw new b(`awk: for loop exceeded maximum iterations (${e.maxIterations})`,"iterations");if(e.loopContinue=!1,await F(e,t.body),e.loopBreak){e.loopBreak=!1;break}if(e.shouldExit||e.shouldNext||e.hasReturn)break;t.update&&await d(e,t.update)}}async function Lt(e,t){let r=e.arrays[t.array];if(r)for(let i of Object.keys(r)){if(e.vars[t.variable]=i,e.loopContinue=!1,await F(e,t.body),e.loopBreak){e.loopBreak=!1;break}if(e.shouldExit||e.shouldNext||e.hasReturn)break}}async function Mt(e,t){if(t.type==="array_access"){let r=S(await d(e,t.key));ge(e,t.array,r)}else t.type==="variable"&&we(e,t.name)}var H=class{ctx;program=null;rangeStates=[];constructor(t){this.ctx=t}execute(t){this.program=t,this.ctx.output="";for(let r of t.functions)this.ctx.functions.set(r.name,r);this.rangeStates=t.rules.map(()=>!1)}async executeBegin(){if(this.program){for(let t of this.program.rules)if(t.pattern?.type==="begin"&&(await D(this.ctx,t.action.statements),this.ctx.shouldExit))break}}async executeLine(t){if(!(!this.program||this.ctx.shouldExit)){G(this.ctx,t),this.ctx.NR++,this.ctx.FNR++,this.ctx.shouldNext=!1;for(let r=0;r<this.program.rules.length&&!(this.ctx.shouldExit||this.ctx.shouldNext||this.ctx.shouldNextFile);r++){let i=this.program.rules[r];i.pattern?.type==="begin"||i.pattern?.type==="end"||await this.matchesRule(i,r)&&await D(this.ctx,i.action.statements)}}}async executeEnd(){if(this.program&&!this.ctx.inEndBlock){this.ctx.inEndBlock=!0,this.ctx.shouldExit=!1;for(let t of this.program.rules)if(t.pattern?.type==="end"&&(await D(this.ctx,t.action.statements),this.ctx.shouldExit))break;this.ctx.inEndBlock=!1}}getOutput(){return this.ctx.output}getExitCode(){return this.ctx.exitCode}getContext(){return this.ctx}async matchesRule(t,r){let i=t.pattern;if(!i)return!0;switch(i.type){case"begin":case"end":return!1;case"regex_pattern":return U(i.pattern,this.ctx.line);case"expr_pattern":return v(await d(this.ctx,i.expression));case"range":{let s=await this.matchPattern(i.start),a=await this.matchPattern(i.end);return this.rangeStates[r]?(a&&(this.rangeStates[r]=!1),!0):s?(this.rangeStates[r]=!0,a&&(this.rangeStates[r]=!1),!0):!1}default:return!1}}async matchPattern(t){switch(t.type){case"regex_pattern":return U(t.pattern,this.ctx.line);case"expr_pattern":return v(await d(this.ctx,t.expression));default:return!1}}};var n;(function(e){e.NUMBER="NUMBER",e.STRING="STRING",e.REGEX="REGEX",e.IDENT="IDENT",e.BEGIN="BEGIN",e.END="END",e.IF="IF",e.ELSE="ELSE",e.WHILE="WHILE",e.DO="DO",e.FOR="FOR",e.IN="IN",e.BREAK="BREAK",e.CONTINUE="CONTINUE",e.NEXT="NEXT",e.NEXTFILE="NEXTFILE",e.EXIT="EXIT",e.RETURN="RETURN",e.DELETE="DELETE",e.FUNCTION="FUNCTION",e.PRINT="PRINT",e.PRINTF="PRINTF",e.GETLINE="GETLINE",e.PLUS="PLUS",e.MINUS="MINUS",e.STAR="STAR",e.SLASH="SLASH",e.PERCENT="PERCENT",e.CARET="CARET",e.EQ="EQ",e.NE="NE",e.LT="LT",e.GT="GT",e.LE="LE",e.GE="GE",e.MATCH="MATCH",e.NOT_MATCH="NOT_MATCH",e.AND="AND",e.OR="OR",e.NOT="NOT",e.ASSIGN="ASSIGN",e.PLUS_ASSIGN="PLUS_ASSIGN",e.MINUS_ASSIGN="MINUS_ASSIGN",e.STAR_ASSIGN="STAR_ASSIGN",e.SLASH_ASSIGN="SLASH_ASSIGN",e.PERCENT_ASSIGN="PERCENT_ASSIGN",e.CARET_ASSIGN="CARET_ASSIGN",e.INCREMENT="INCREMENT",e.DECREMENT="DECREMENT",e.QUESTION="QUESTION",e.COLON="COLON",e.COMMA="COMMA",e.SEMICOLON="SEMICOLON",e.NEWLINE="NEWLINE",e.LPAREN="LPAREN",e.RPAREN="RPAREN",e.LBRACE="LBRACE",e.RBRACE="RBRACE",e.LBRACKET="LBRACKET",e.RBRACKET="RBRACKET",e.DOLLAR="DOLLAR",e.APPEND="APPEND",e.PIPE="PIPE",e.EOF="EOF"})(n||(n={}));var Pt=new Map([["BEGIN",n.BEGIN],["END",n.END],["if",n.IF],["else",n.ELSE],["while",n.WHILE],["do",n.DO],["for",n.FOR],["in",n.IN],["break",n.BREAK],["continue",n.CONTINUE],["next",n.NEXT],["nextfile",n.NEXTFILE],["exit",n.EXIT],["return",n.RETURN],["delete",n.DELETE],["function",n.FUNCTION],["print",n.PRINT],["printf",n.PRINTF],["getline",n.GETLINE]]);function Tt(e){return e.replace(/\[\[:space:\]\]/g,"[ \\t\\n\\r\\f\\v]").replace(/\[\[:blank:\]\]/g,"[ \\t]").replace(/\[\[:alpha:\]\]/g,"[a-zA-Z]").replace(/\[\[:digit:\]\]/g,"[0-9]").replace(/\[\[:alnum:\]\]/g,"[a-zA-Z0-9]").replace(/\[\[:upper:\]\]/g,"[A-Z]").replace(/\[\[:lower:\]\]/g,"[a-z]").replace(/\[\[:punct:\]\]/g,"[!\"#$%&'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~]").replace(/\[\[:xdigit:\]\]/g,"[0-9A-Fa-f]").replace(/\[\[:graph:\]\]/g,"[!-~]").replace(/\[\[:print:\]\]/g,"[ -~]").replace(/\[\[:cntrl:\]\]/g,"[\\x00-\\x1f\\x7f]")}var Q=class{input;pos=0;line=1;column=1;lastTokenType=null;constructor(t){this.input=t}tokenize(){let t=[];for(;this.pos<this.input.length;){let r=this.nextToken();r&&(t.push(r),this.lastTokenType=r.type)}return t.push(this.makeToken(n.EOF,"")),t}makeToken(t,r){return{type:t,value:r,line:this.line,column:this.column}}peek(t=0){return this.input[this.pos+t]||""}advance(){let t=this.input[this.pos++]||"";return t===`
7
+ `?(this.line++,this.column=1):this.column++,t}skipWhitespace(){for(;this.pos<this.input.length;){let t=this.peek();if(t===" "||t===" "||t==="\r")this.advance();else if(t==="\\")if(this.peek(1)===`
8
+ `)this.advance(),this.advance();else break;else if(t==="#")for(;this.pos<this.input.length&&this.peek()!==`
9
+ `;)this.advance();else break}}nextToken(){if(this.skipWhitespace(),this.pos>=this.input.length)return null;let t=this.line,r=this.column,i=this.peek();return i===`
10
+ `?(this.advance(),{type:n.NEWLINE,value:`
11
+ `,line:t,column:r}):i==='"'?this.readString():i==="/"&&this.canBeRegex()?this.readRegex():this.isDigit(i)||i==="."&&this.isDigit(this.peek(1))?this.readNumber():this.isAlpha(i)||i==="_"?this.readIdentifier():this.readOperator()}canBeRegex(){return new Set([null,n.NEWLINE,n.SEMICOLON,n.LBRACE,n.RBRACE,n.LPAREN,n.LBRACKET,n.COMMA,n.ASSIGN,n.PLUS_ASSIGN,n.MINUS_ASSIGN,n.STAR_ASSIGN,n.SLASH_ASSIGN,n.PERCENT_ASSIGN,n.CARET_ASSIGN,n.AND,n.OR,n.NOT,n.MATCH,n.NOT_MATCH,n.QUESTION,n.COLON,n.LT,n.GT,n.LE,n.GE,n.EQ,n.NE,n.PLUS,n.MINUS,n.STAR,n.PERCENT,n.CARET,n.PRINT,n.PRINTF,n.IF,n.WHILE,n.DO,n.FOR,n.RETURN]).has(this.lastTokenType)}readString(){let t=this.line,r=this.column;this.advance();let i="";for(;this.pos<this.input.length&&this.peek()!=='"';)if(this.peek()==="\\"){this.advance();let s=this.advance();switch(s){case"n":i+=`
12
+ `;break;case"t":i+=" ";break;case"r":i+="\r";break;case"f":i+="\f";break;case"b":i+="\b";break;case"v":i+="\v";break;case"a":i+="\x07";break;case"\\":i+="\\";break;case'"':i+='"';break;case"/":i+="/";break;case"x":{let a="";for(;a.length<2&&/[0-9a-fA-F]/.test(this.peek());)a+=this.advance();a.length>0?i+=String.fromCharCode(parseInt(a,16)):i+="x";break}default:if(/[0-7]/.test(s)){let a=s;for(;a.length<3&&/[0-7]/.test(this.peek());)a+=this.advance();i+=String.fromCharCode(parseInt(a,8))}else i+=s}}else i+=this.advance();return this.peek()==='"'&&this.advance(),{type:n.STRING,value:i,line:t,column:r}}readRegex(){let t=this.line,r=this.column;this.advance();let i="";for(;this.pos<this.input.length&&this.peek()!=="/";)if(this.peek()==="\\")i+=this.advance(),this.pos<this.input.length&&(i+=this.advance());else{if(this.peek()===`
13
+ `)break;i+=this.advance()}return this.peek()==="/"&&this.advance(),i=Tt(i),{type:n.REGEX,value:i,line:t,column:r}}readNumber(){let t=this.line,r=this.column,i="";for(;this.isDigit(this.peek());)i+=this.advance();if(this.peek()==="."&&this.isDigit(this.peek(1)))for(i+=this.advance();this.isDigit(this.peek());)i+=this.advance();if(this.peek()==="e"||this.peek()==="E")for(i+=this.advance(),(this.peek()==="+"||this.peek()==="-")&&(i+=this.advance());this.isDigit(this.peek());)i+=this.advance();return{type:n.NUMBER,value:parseFloat(i),line:t,column:r}}readIdentifier(){let t=this.line,r=this.column,i="";for(;this.isAlphaNumeric(this.peek())||this.peek()==="_";)i+=this.advance();let s=Pt.get(i);return s!==void 0?{type:s,value:i,line:t,column:r}:{type:n.IDENT,value:i,line:t,column:r}}readOperator(){let t=this.line,r=this.column,i=this.advance(),s=this.peek();switch(i){case"+":return s==="+"?(this.advance(),{type:n.INCREMENT,value:"++",line:t,column:r}):s==="="?(this.advance(),{type:n.PLUS_ASSIGN,value:"+=",line:t,column:r}):{type:n.PLUS,value:"+",line:t,column:r};case"-":return s==="-"?(this.advance(),{type:n.DECREMENT,value:"--",line:t,column:r}):s==="="?(this.advance(),{type:n.MINUS_ASSIGN,value:"-=",line:t,column:r}):{type:n.MINUS,value:"-",line:t,column:r};case"*":return s==="*"?(this.advance(),{type:n.CARET,value:"**",line:t,column:r}):s==="="?(this.advance(),{type:n.STAR_ASSIGN,value:"*=",line:t,column:r}):{type:n.STAR,value:"*",line:t,column:r};case"/":return s==="="?(this.advance(),{type:n.SLASH_ASSIGN,value:"/=",line:t,column:r}):{type:n.SLASH,value:"/",line:t,column:r};case"%":return s==="="?(this.advance(),{type:n.PERCENT_ASSIGN,value:"%=",line:t,column:r}):{type:n.PERCENT,value:"%",line:t,column:r};case"^":return s==="="?(this.advance(),{type:n.CARET_ASSIGN,value:"^=",line:t,column:r}):{type:n.CARET,value:"^",line:t,column:r};case"=":return s==="="?(this.advance(),{type:n.EQ,value:"==",line:t,column:r}):{type:n.ASSIGN,value:"=",line:t,column:r};case"!":return s==="="?(this.advance(),{type:n.NE,value:"!=",line:t,column:r}):s==="~"?(this.advance(),{type:n.NOT_MATCH,value:"!~",line:t,column:r}):{type:n.NOT,value:"!",line:t,column:r};case"<":return s==="="?(this.advance(),{type:n.LE,value:"<=",line:t,column:r}):{type:n.LT,value:"<",line:t,column:r};case">":return s==="="?(this.advance(),{type:n.GE,value:">=",line:t,column:r}):s===">"?(this.advance(),{type:n.APPEND,value:">>",line:t,column:r}):{type:n.GT,value:">",line:t,column:r};case"&":return s==="&"?(this.advance(),{type:n.AND,value:"&&",line:t,column:r}):{type:n.IDENT,value:"&",line:t,column:r};case"|":return s==="|"?(this.advance(),{type:n.OR,value:"||",line:t,column:r}):{type:n.PIPE,value:"|",line:t,column:r};case"~":return{type:n.MATCH,value:"~",line:t,column:r};case"?":return{type:n.QUESTION,value:"?",line:t,column:r};case":":return{type:n.COLON,value:":",line:t,column:r};case",":return{type:n.COMMA,value:",",line:t,column:r};case";":return{type:n.SEMICOLON,value:";",line:t,column:r};case"(":return{type:n.LPAREN,value:"(",line:t,column:r};case")":return{type:n.RPAREN,value:")",line:t,column:r};case"{":return{type:n.LBRACE,value:"{",line:t,column:r};case"}":return{type:n.RBRACE,value:"}",line:t,column:r};case"[":return{type:n.LBRACKET,value:"[",line:t,column:r};case"]":return{type:n.RBRACKET,value:"]",line:t,column:r};case"$":return{type:n.DOLLAR,value:"$",line:t,column:r};default:return{type:n.IDENT,value:i,line:t,column:r}}}isDigit(t){return t>="0"&&t<="9"}isAlpha(t){return t>="a"&&t<="z"||t>="A"&&t<="Z"}isAlphaNumeric(t){return this.isDigit(t)||this.isAlpha(t)}};var u={LPAREN:"LPAREN",RPAREN:"RPAREN",QUESTION:"QUESTION",NEWLINE:"NEWLINE",SEMICOLON:"SEMICOLON",RBRACE:"RBRACE",COMMA:"COMMA",PIPE:"PIPE",GT:"GT",APPEND:"APPEND",AND:"AND",OR:"OR",ASSIGN:"ASSIGN",PLUS_ASSIGN:"PLUS_ASSIGN",MINUS_ASSIGN:"MINUS_ASSIGN",STAR_ASSIGN:"STAR_ASSIGN",SLASH_ASSIGN:"SLASH_ASSIGN",PERCENT_ASSIGN:"PERCENT_ASSIGN",CARET_ASSIGN:"CARET_ASSIGN",RBRACKET:"RBRACKET",COLON:"COLON",IN:"IN",PRINT:"PRINT",PRINTF:"PRINTF",IDENT:"IDENT",LT:"LT",LE:"LE",GE:"GE",EQ:"EQ",NE:"NE",MATCH:"MATCH",NOT_MATCH:"NOT_MATCH",NUMBER:"NUMBER",STRING:"STRING",DOLLAR:"DOLLAR",NOT:"NOT",MINUS:"MINUS",PLUS:"PLUS",INCREMENT:"INCREMENT",DECREMENT:"DECREMENT"};function Le(e){e.expect(u.PRINT);let t=[];if(e.check(u.NEWLINE)||e.check(u.SEMICOLON)||e.check(u.RBRACE)||e.check(u.PIPE)||e.check(u.GT)||e.check(u.APPEND))t.push({type:"field",index:{type:"number",value:0}});else for(t.push(q(e));e.check(u.COMMA);)e.advance(),t.push(q(e));let r;return e.check(u.GT)?(e.advance(),r={redirect:">",file:e.parsePrimary()}):e.check(u.APPEND)&&(e.advance(),r={redirect:">>",file:e.parsePrimary()}),{type:"print",args:t,output:r}}function q(e){return Ft(e)?ae(e,!0):ae(e,!1)}function ae(e,t){let r=t?e.parseTernary():_t(e);if(e.match(u.ASSIGN,u.PLUS_ASSIGN,u.MINUS_ASSIGN,u.STAR_ASSIGN,u.SLASH_ASSIGN,u.PERCENT_ASSIGN,u.CARET_ASSIGN)){let i=e.advance(),s=ae(e,t);if(r.type!=="variable"&&r.type!=="field"&&r.type!=="array_access")throw new Error("Invalid assignment target");return{type:"assignment",operator:new Map([["=","="],["+=","+="],["-=","-="],["*=","*="],["/=","/="],["%=","%="],["^=","^="]]).get(i.value)??"=",target:r,value:s}}return r}function Ft(e){let t=0,r=e.pos;for(;r<e.tokens.length;){let i=e.tokens[r];if(i.type===u.LPAREN&&t++,i.type===u.RPAREN&&t--,i.type===u.QUESTION&&t===0)return!0;if(i.type===u.NEWLINE||i.type===u.SEMICOLON||i.type===u.RBRACE||i.type===u.COMMA||i.type===u.PIPE)return!1;r++}return!1}function _t(e){let t=ke(e);for(;e.check(u.OR);){e.advance();let r=ke(e);t={type:"binary",operator:"||",left:t,right:r}}return t}function ke(e){let t=Ce(e);for(;e.check(u.AND);){e.advance();let r=Ce(e);t={type:"binary",operator:"&&",left:t,right:r}}return t}function Ce(e){let t=Gt(e);if(e.check(u.IN)){e.advance();let r=String(e.expect(u.IDENT).value);return{type:"in",key:t,array:r}}return t}function Gt(e){let t=Oe(e);for(;xt(e)&&!Dt(e);){let r=Oe(e);t={type:"binary",operator:" ",left:t,right:r}}return t}function Oe(e){let t=be(e);for(;e.match(u.MATCH,u.NOT_MATCH);){let r=e.advance().type===u.MATCH?"~":"!~",i=be(e);t={type:"binary",operator:r,left:t,right:i}}return t}function be(e){let t=e.parseAddSub();for(;e.match(u.LT,u.LE,u.GE,u.EQ,u.NE);){let r=e.advance(),i=e.parseAddSub();t={type:"binary",operator:new Map([["<","<"],["<=","<="],[">=",">="],["==","=="],["!=","!="]]).get(r.value)??"==",left:t,right:i}}return t}function xt(e){return e.match(u.NUMBER,u.STRING,u.IDENT,u.DOLLAR,u.LPAREN,u.NOT,u.MINUS,u.PLUS,u.INCREMENT,u.DECREMENT)}function Dt(e){return e.match(u.AND,u.OR,u.QUESTION,u.ASSIGN,u.PLUS_ASSIGN,u.MINUS_ASSIGN,u.STAR_ASSIGN,u.SLASH_ASSIGN,u.PERCENT_ASSIGN,u.CARET_ASSIGN,u.COMMA,u.SEMICOLON,u.NEWLINE,u.RBRACE,u.RPAREN,u.RBRACKET,u.COLON,u.PIPE,u.APPEND,u.GT,u.IN)}function Me(e){e.expect(u.PRINTF);let t=e.check(u.LPAREN);t&&(e.advance(),e.skipNewlines());let r=t?e.parseExpression():q(e),i=[];for(;e.check(u.COMMA);)e.advance(),t&&e.skipNewlines(),i.push(t?e.parseExpression():q(e));t&&(e.skipNewlines(),e.expect(u.RPAREN));let s;return e.check(u.GT)?(e.advance(),s={redirect:">",file:e.parsePrimary()}):e.check(u.APPEND)&&(e.advance(),s={redirect:">>",file:e.parsePrimary()}),{type:"printf",format:r,args:i,output:s}}var J=class{tokens=[];pos=0;parse(t){let r=new Q(t);return this.tokens=r.tokenize(),this.pos=0,this.parseProgram()}setPos(t){this.pos=t}current(){return this.tokens[this.pos]||{type:n.EOF,value:"",line:0,column:0}}advance(){let t=this.current();return this.pos<this.tokens.length&&this.pos++,t}match(...t){return t.includes(this.current().type)}check(t){return this.current().type===t}expect(t,r){if(!this.check(t)){let i=this.current();throw new Error(r||`Expected ${t}, got ${i.type} at line ${i.line}:${i.column}`)}return this.advance()}skipNewlines(){for(;this.check(n.NEWLINE);)this.advance()}skipTerminators(){for(;this.check(n.NEWLINE)||this.check(n.SEMICOLON);)this.advance()}parseProgram(){let t=[],r=[];for(this.skipNewlines();!this.check(n.EOF)&&(this.skipNewlines(),!this.check(n.EOF));)this.check(n.FUNCTION)?t.push(this.parseFunction()):r.push(this.parseRule()),this.skipTerminators();return{functions:t,rules:r}}parseFunction(){this.expect(n.FUNCTION);let t=this.expect(n.IDENT).value;this.expect(n.LPAREN);let r=[];if(!this.check(n.RPAREN))for(r.push(this.expect(n.IDENT).value);this.check(n.COMMA);)this.advance(),r.push(this.expect(n.IDENT).value);this.expect(n.RPAREN),this.skipNewlines();let i=this.parseBlock();return{name:t,params:r,body:i}}parseRule(){let t;if(this.check(n.BEGIN))this.advance(),t={type:"begin"};else if(this.check(n.END))this.advance(),t={type:"end"};else if(this.check(n.LBRACE))t=void 0;else if(this.check(n.REGEX)){let i=this.advance();if(this.check(n.AND)||this.check(n.OR)){let s={type:"binary",operator:"~",left:{type:"field",index:{type:"number",value:0}},right:{type:"regex",pattern:i.value}};t={type:"expr_pattern",expression:this.parseLogicalOrRest(s)}}else{let s={type:"regex_pattern",pattern:i.value};if(this.check(n.COMMA)){this.advance();let a;this.check(n.REGEX)?a={type:"regex_pattern",pattern:this.advance().value}:a={type:"expr_pattern",expression:this.parseExpression()},t={type:"range",start:s,end:a}}else t=s}}else{let s={type:"expr_pattern",expression:this.parseExpression()};if(this.check(n.COMMA)){this.advance();let a;this.check(n.REGEX)?a={type:"regex_pattern",pattern:this.advance().value}:a={type:"expr_pattern",expression:this.parseExpression()},t={type:"range",start:s,end:a}}else t=s}this.skipNewlines();let r;return this.check(n.LBRACE)?r=this.parseBlock():r={type:"block",statements:[{type:"print",args:[{type:"field",index:{type:"number",value:0}}]}]},{pattern:t,action:r}}parseBlock(){this.expect(n.LBRACE),this.skipNewlines();let t=[];for(;!this.check(n.RBRACE)&&!this.check(n.EOF);)t.push(this.parseStatement()),this.skipTerminators();return this.expect(n.RBRACE),{type:"block",statements:t}}parseStatement(){if(this.check(n.SEMICOLON)||this.check(n.NEWLINE))return this.advance(),{type:"block",statements:[]};if(this.check(n.LBRACE))return this.parseBlock();if(this.check(n.IF))return this.parseIf();if(this.check(n.WHILE))return this.parseWhile();if(this.check(n.DO))return this.parseDoWhile();if(this.check(n.FOR))return this.parseFor();if(this.check(n.BREAK))return this.advance(),{type:"break"};if(this.check(n.CONTINUE))return this.advance(),{type:"continue"};if(this.check(n.NEXT))return this.advance(),{type:"next"};if(this.check(n.NEXTFILE))return this.advance(),{type:"nextfile"};if(this.check(n.EXIT)){this.advance();let r;return!this.check(n.NEWLINE)&&!this.check(n.SEMICOLON)&&!this.check(n.RBRACE)&&!this.check(n.EOF)&&(r=this.parseExpression()),{type:"exit",code:r}}if(this.check(n.RETURN)){this.advance();let r;return!this.check(n.NEWLINE)&&!this.check(n.SEMICOLON)&&!this.check(n.RBRACE)&&!this.check(n.EOF)&&(r=this.parseExpression()),{type:"return",value:r}}if(this.check(n.DELETE)){this.advance();let r=this.parsePrimary();if(r.type!=="array_access"&&r.type!=="variable")throw new Error("delete requires array element or array");return{type:"delete",target:r}}return this.check(n.PRINT)?Le(this):this.check(n.PRINTF)?Me(this):{type:"expr_stmt",expression:this.parseExpression()}}parseIf(){this.expect(n.IF),this.expect(n.LPAREN);let t=this.parseExpression();this.expect(n.RPAREN),this.skipNewlines();let r=this.parseStatement();this.skipTerminators();let i;return this.check(n.ELSE)&&(this.advance(),this.skipNewlines(),i=this.parseStatement()),{type:"if",condition:t,consequent:r,alternate:i}}parseWhile(){this.expect(n.WHILE),this.expect(n.LPAREN);let t=this.parseExpression();this.expect(n.RPAREN),this.skipNewlines();let r=this.parseStatement();return{type:"while",condition:t,body:r}}parseDoWhile(){this.expect(n.DO),this.skipNewlines();let t=this.parseStatement();this.skipNewlines(),this.expect(n.WHILE),this.expect(n.LPAREN);let r=this.parseExpression();return this.expect(n.RPAREN),{type:"do_while",body:t,condition:r}}parseFor(){if(this.expect(n.FOR),this.expect(n.LPAREN),this.check(n.IDENT)){let a=this.advance();if(this.check(n.IN)){this.advance();let o=this.expect(n.IDENT).value;this.expect(n.RPAREN),this.skipNewlines();let c=this.parseStatement();return{type:"for_in",variable:a.value,array:o,body:c}}this.pos--}let t;this.check(n.SEMICOLON)||(t=this.parseExpression()),this.expect(n.SEMICOLON);let r;this.check(n.SEMICOLON)||(r=this.parseExpression()),this.expect(n.SEMICOLON);let i;this.check(n.RPAREN)||(i=this.parseExpression()),this.expect(n.RPAREN),this.skipNewlines();let s=this.parseStatement();return{type:"for",init:t,condition:r,update:i,body:s}}parseExpression(){return this.parseAssignment()}parseAssignment(){let t=this.parseTernary();if(this.match(n.ASSIGN,n.PLUS_ASSIGN,n.MINUS_ASSIGN,n.STAR_ASSIGN,n.SLASH_ASSIGN,n.PERCENT_ASSIGN,n.CARET_ASSIGN)){let r=this.advance(),i=this.parseAssignment();if(t.type!=="variable"&&t.type!=="field"&&t.type!=="array_access")throw new Error("Invalid assignment target");return{type:"assignment",operator:{"=":"=","+=":"+=","-=":"-=","*=":"*=","/=":"/=","%=":"%=","^=":"^="}[r.value],target:t,value:i}}return t}parseTernary(){let t=this.parsePipeGetline();if(this.check(n.QUESTION)){this.advance();let r=this.parseExpression();this.expect(n.COLON);let i=this.parseExpression();t={type:"ternary",condition:t,consequent:r,alternate:i}}return t}parsePipeGetline(){let t=this.parseOr();if(this.check(n.PIPE)){if(this.advance(),!this.check(n.GETLINE))throw new Error("Expected 'getline' after '|' in expression context");this.advance();let r;return this.check(n.IDENT)&&(r=this.advance().value),{type:"getline",command:t,variable:r}}return t}parseOr(){let t=this.parseAnd();for(;this.check(n.OR);){this.advance();let r=this.parseAnd();t={type:"binary",operator:"||",left:t,right:r}}return t}parseLogicalOrRest(t){for(t=this.parseLogicalAndRest(t);this.check(n.OR);){this.advance();let r=this.parseAnd();t={type:"binary",operator:"||",left:t,right:r}}return t}parseLogicalAndRest(t){for(;this.check(n.AND);){this.advance();let r=this.parseIn();t={type:"binary",operator:"&&",left:t,right:r}}return t}parseAnd(){let t=this.parseIn();for(;this.check(n.AND);){this.advance();let r=this.parseIn();t={type:"binary",operator:"&&",left:t,right:r}}return t}parseIn(){let t=this.parseConcatenation();if(this.check(n.IN)){this.advance();let r=this.expect(n.IDENT).value;return{type:"in",key:t,array:r}}return t}parseConcatenation(){let t=this.parseMatch();for(;this.canStartExpression()&&!this.isConcatTerminator();){let r=this.parseMatch();t={type:"binary",operator:" ",left:t,right:r}}return t}parseMatch(){let t=this.parseComparison();for(;this.match(n.MATCH,n.NOT_MATCH);){let r=this.advance().type===n.MATCH?"~":"!~",i=this.parseComparison();t={type:"binary",operator:r,left:t,right:i}}return t}parseComparison(){let t=this.parseAddSub();for(;this.match(n.LT,n.LE,n.GT,n.GE,n.EQ,n.NE);){let r=this.advance(),i=this.parseAddSub();t={type:"binary",operator:new Map([["<","<"],["<=","<="],[">",">"],[">=",">="],["==","=="],["!=","!="]]).get(r.value)??"==",left:t,right:i}}return t}canStartExpression(){return this.match(n.NUMBER,n.STRING,n.IDENT,n.DOLLAR,n.LPAREN,n.NOT,n.MINUS,n.PLUS,n.INCREMENT,n.DECREMENT)}isConcatTerminator(){return this.match(n.AND,n.OR,n.QUESTION,n.ASSIGN,n.PLUS_ASSIGN,n.MINUS_ASSIGN,n.STAR_ASSIGN,n.SLASH_ASSIGN,n.PERCENT_ASSIGN,n.CARET_ASSIGN,n.COMMA,n.SEMICOLON,n.NEWLINE,n.RBRACE,n.RPAREN,n.RBRACKET,n.COLON,n.PIPE,n.APPEND,n.IN)}parseAddSub(){let t=this.parseMulDiv();for(;this.match(n.PLUS,n.MINUS);){let r=this.advance().value,i=this.parseMulDiv();t={type:"binary",operator:r,left:t,right:i}}return t}parseMulDiv(){let t=this.parseUnary();for(;this.match(n.STAR,n.SLASH,n.PERCENT);){let r=this.advance(),i=this.parseUnary();t={type:"binary",operator:new Map([["*","*"],["/","/"],["%","%"]]).get(r.value)??"*",left:t,right:i}}return t}parseUnary(){if(this.check(n.INCREMENT)){this.advance();let t=this.parseUnary();return t.type!=="variable"&&t.type!=="field"&&t.type!=="array_access"?{type:"unary",operator:"+",operand:{type:"unary",operator:"+",operand:t}}:{type:"pre_increment",operand:t}}if(this.check(n.DECREMENT)){this.advance();let t=this.parseUnary();return t.type!=="variable"&&t.type!=="field"&&t.type!=="array_access"?{type:"unary",operator:"-",operand:{type:"unary",operator:"-",operand:t}}:{type:"pre_decrement",operand:t}}if(this.match(n.NOT,n.MINUS,n.PLUS)){let t=this.advance().value,r=this.parseUnary();return{type:"unary",operator:t,operand:r}}return this.parsePower()}parsePower(){let t=this.parsePostfix();if(this.check(n.CARET)){this.advance();let r=this.parsePower();t={type:"binary",operator:"^",left:t,right:r}}return t}parsePostfix(){let t=this.parsePrimary();if(this.check(n.INCREMENT)){if(this.advance(),t.type!=="variable"&&t.type!=="field"&&t.type!=="array_access")throw new Error("Invalid increment operand");return{type:"post_increment",operand:t}}if(this.check(n.DECREMENT)){if(this.advance(),t.type!=="variable"&&t.type!=="field"&&t.type!=="array_access")throw new Error("Invalid decrement operand");return{type:"post_decrement",operand:t}}return t}parseFieldIndex(){if(this.check(n.INCREMENT)){this.advance();let t=this.parseFieldIndex();return t.type!=="variable"&&t.type!=="field"&&t.type!=="array_access"?{type:"unary",operator:"+",operand:{type:"unary",operator:"+",operand:t}}:{type:"pre_increment",operand:t}}if(this.check(n.DECREMENT)){this.advance();let t=this.parseFieldIndex();return t.type!=="variable"&&t.type!=="field"&&t.type!=="array_access"?{type:"unary",operator:"-",operand:{type:"unary",operator:"-",operand:t}}:{type:"pre_decrement",operand:t}}if(this.match(n.NOT,n.MINUS,n.PLUS)){let t=this.advance().value,r=this.parseFieldIndex();return{type:"unary",operator:t,operand:r}}return this.parseFieldIndexPower()}parseFieldIndexPower(){let t=this.parseFieldIndexPrimary();if(this.check(n.CARET)){this.advance();let r=this.parseFieldIndexPower();t={type:"binary",operator:"^",left:t,right:r}}return t}parseFieldIndexPrimary(){if(this.check(n.NUMBER))return{type:"number",value:this.advance().value};if(this.check(n.STRING))return{type:"string",value:this.advance().value};if(this.check(n.DOLLAR))return this.advance(),{type:"field",index:this.parseFieldIndex()};if(this.check(n.LPAREN)){this.advance();let t=this.parseExpression();return this.expect(n.RPAREN),t}if(this.check(n.IDENT)){let t=this.advance().value;if(this.check(n.LPAREN)){this.advance();let r=[];if(!this.check(n.RPAREN))for(r.push(this.parseExpression());this.check(n.COMMA);)this.advance(),r.push(this.parseExpression());return this.expect(n.RPAREN),{type:"call",name:t,args:r}}if(this.check(n.LBRACKET)){this.advance();let r=this.parseExpression();if(this.check(n.COMMA)){let i=[r];for(;this.check(n.COMMA);)this.advance(),i.push(this.parseExpression());this.expect(n.RBRACKET);let s=i.reduce((a,o)=>({type:"binary",operator:" ",left:{type:"binary",operator:" ",left:a,right:{type:"variable",name:"SUBSEP"}},right:o}));return{type:"array_access",array:t,key:s}}return this.expect(n.RBRACKET),{type:"array_access",array:t,key:r}}return{type:"variable",name:t}}throw new Error(`Unexpected token in field index: ${this.current().type} at line ${this.current().line}:${this.current().column}`)}parsePrimary(){if(this.check(n.NUMBER))return{type:"number",value:this.advance().value};if(this.check(n.STRING))return{type:"string",value:this.advance().value};if(this.check(n.REGEX))return{type:"regex",pattern:this.advance().value};if(this.check(n.DOLLAR))return this.advance(),{type:"field",index:this.parseFieldIndex()};if(this.check(n.LPAREN)){this.advance();let t=this.parseExpression();if(this.check(n.COMMA)){let r=[t];for(;this.check(n.COMMA);)this.advance(),r.push(this.parseExpression());return this.expect(n.RPAREN),{type:"tuple",elements:r}}return this.expect(n.RPAREN),t}if(this.check(n.GETLINE)){this.advance();let t,r;return this.check(n.IDENT)&&(t=this.advance().value),this.check(n.LT)&&(this.advance(),r=this.parsePrimary()),{type:"getline",variable:t,file:r}}if(this.check(n.IDENT)){let t=this.advance().value;if(this.check(n.LPAREN)){this.advance();let r=[];if(this.skipNewlines(),!this.check(n.RPAREN))for(r.push(this.parseExpression());this.check(n.COMMA);)this.advance(),this.skipNewlines(),r.push(this.parseExpression());return this.skipNewlines(),this.expect(n.RPAREN),{type:"call",name:t,args:r}}if(this.check(n.LBRACKET)){this.advance();let r=[this.parseExpression()];for(;this.check(n.COMMA);)this.advance(),r.push(this.parseExpression());this.expect(n.RBRACKET);let i;if(r.length===1)i=r[0];else{i=r[0];for(let s=1;s<r.length;s++)i={type:"binary",operator:" ",left:{type:"binary",operator:" ",left:i,right:{type:"variable",name:"SUBSEP"}},right:r[s]}}return{type:"array_access",array:t,key:i}}return{type:"variable",name:t}}throw new Error(`Unexpected token: ${this.current().type} at line ${this.current().line}:${this.current().column}`)}};var Ut={name:"awk",summary:"pattern scanning and text processing language",usage:"awk [OPTIONS] 'PROGRAM' [FILE...]",options:["-F FS use FS as field separator","-v VAR=VAL assign VAL to variable VAR"," --help display this help and exit"]},Fr={name:"awk",async execute(e,t){let r=ce(e);if(ue(r))return le(Ut);let i=new _(/\s+/),s=" ",a=Object.create(null),o=0;for(let h=0;h<r.length;h++){let p=r[h];if(p==="-F"&&h+1<r.length)s=oe(r[++h]),i=Pe(s),o=h+1;else if(p.startsWith("-F"))s=oe(p.slice(2)),i=Pe(s),o=h+1;else if(p==="-v"&&h+1<r.length){let f=r[++h],R=f.indexOf("=");if(R>0){let C=f.slice(0,R),Fe=oe(f.slice(R+1));a[C]=Fe}o=h+1}else{if(p.startsWith("--"))return Z("awk",p);if(p.startsWith("-")&&p.length>1){let f=p[1];if(f!=="F"&&f!=="v")return Z("awk",`-${f}`);o=h+1}else if(!p.startsWith("-")){o=h;break}}}if(o>=r.length)return{stdout:P(),stderr:M(`awk: missing program
14
+ `),exitCode:1};let c=r[o],l=r.slice(o+1),N=new J,w;try{w=N.parse(c)}catch(h){let p=h instanceof Error?h.message:String(h);return{stdout:P(),stderr:M(`awk: ${p}
15
+ `),exitCode:1}}let L={readFile:h=>t.fs.readFileText(h),writeFile:t.fs.writeFile.bind(t.fs),appendFile:async(h,p)=>{try{let f=await t.fs.readFileText(h);await t.fs.writeFile(h,f+p)}catch{await t.fs.writeFile(h,p)}},resolvePath:t.fs.resolvePath.bind(t.fs)},y=Y({fieldSep:i,maxIterations:t.limits?.maxAwkIterations,maxOutputSize:t.limits?.maxStringLength,fs:L,cwd:t.cwd,exec:t.exec?async h=>{let p=await t.exec(h,{cwd:t.cwd});return{stdout:await $(p.stdout),stderr:await $(p.stderr),exitCode:p.exitCode}}:void 0,coverage:t.coverage});y.FS=s,y.vars=Object.assign(Object.create(null),a),y.ARGC=l.length+1,y.ARGV=Object.create(null),y.ARGV[0]="awk";for(let h=0;h<l.length;h++)y.ARGV[String(h+1)]=l[h];y.ENVIRON=he(t.env);let k=new H(y);k.execute(w);let g=w.rules.some(h=>h.pattern?.type!=="begin"&&h.pattern?.type!=="end"),E=w.rules.some(h=>h.pattern?.type==="end");try{if(await k.executeBegin(),y.shouldExit)return await k.executeEnd(),{stdout:M(k.getOutput()),stderr:P(),exitCode:k.getExitCode()};if(!g&&!E)return{stdout:M(k.getOutput()),stderr:P(),exitCode:k.getExitCode()};let h=[];if(l.length>0)for(let p of l)try{let f=t.fs.resolvePath(t.cwd,p),C=(await t.fs.readFileText(f)).split(`
16
+ `);C.length>0&&C[C.length-1]===""&&C.pop(),h.push({filename:p,lines:C})}catch{return{stdout:P(),stderr:M(`awk: ${p}: No such file or directory
17
+ `),exitCode:1}}else{let p=(await $(t.stdin)).split(`
18
+ `);p.length>0&&p[p.length-1]===""&&p.pop(),h.push({filename:"",lines:p})}for(let p of h){for(y.FILENAME=p.filename,y.FNR=0,y.lines=p.lines,y.lineIndex=-1,y.shouldNextFile=!1;y.lineIndex<p.lines.length-1&&(y.lineIndex++,await k.executeLine(p.lines[y.lineIndex]),!(y.shouldExit||y.shouldNextFile)););if(y.shouldExit)break}return await k.executeEnd(),{stdout:M(k.getOutput()),stderr:P(),exitCode:k.getExitCode()}}catch(h){let p=h instanceof Error?h.message:String(h),f=h instanceof b?b.EXIT_CODE:2;return{stdout:M(k.getOutput()),stderr:M(`awk: ${p}
19
+ `),exitCode:f}}}};function oe(e){return e.replace(/\\t/g," ").replace(/\\n/g,`
20
+ `).replace(/\\r/g,"\r").replace(/\\b/g,"\b").replace(/\\f/g,"\f").replace(/\\a/g,"\x07").replace(/\\v/g,"\v").replace(/\\\\/g,"\\")}function Pe(e){if(e===" ")return A("\\s+");if(/[[\](){}.*+?^$|\\]/.test(e))try{return A(e)}catch{return A(Te(e))}return A(Te(e))}function Te(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var Gr={name:"awk",flags:[{flag:"-F",type:"value",valueHint:"delimiter"},{flag:"-v",type:"value",valueHint:"string"}],stdinType:"text",needsArgs:!0};export{Fr as a,Gr as b};
@@ -0,0 +1,6 @@
1
+ import{a as p,b as u}from"./chunk-WPPIJX5K.js";import{b as i,f as l}from"./chunk-KL7SL7ES.js";import{k as h}from"./chunk-DEQBZDPB.js";var b={name:"readlink",summary:"print resolved symbolic links or canonical file names",usage:"readlink [OPTIONS] FILE...",options:["-f canonicalize by following every symlink in every component of the given name recursively"," --help display this help and exit"]},x={name:"readlink",async execute(k,r){let a=h(k);if(u(a))return p(b);let o=!1,t=0;for(;t<a.length&&a[t].startsWith("-");){let n=a[t];if(n==="-f"||n==="--canonicalize")o=!0,t++;else if(n==="--"){t++;break}else return{stdout:i(),stderr:l(`readlink: invalid option -- '${n.slice(1)}'
2
+ `),exitCode:1}}let c=a.slice(t);if(c.length===0)return{stdout:i(),stderr:l(`readlink: missing operand
3
+ `),exitCode:1};let s="",m=!1;for(let n of c){let d=r.fs.resolvePath(r.cwd,n);try{if(o){let e=d,g=new Set;for(;!g.has(e);){g.add(e);try{let f=await r.fs.readlink(e);if(f.startsWith("/"))e=f;else{let y=e.substring(0,e.lastIndexOf("/"))||"/";e=r.fs.resolvePath(y,f)}}catch{break}}s+=`${e}
4
+ `}else{let e=await r.fs.readlink(d);s+=`${e}
5
+ `}}catch{o?s+=`${d}
6
+ `:m=!0}}return{stdout:l(s),stderr:i(),exitCode:m?1:0}}},P={name:"readlink",flags:[{flag:"-f",type:"boolean"},{flag:"-e",type:"boolean"}],needsArgs:!0};export{x as a,P as b};
@@ -0,0 +1,6 @@
1
+ import{a as u}from"./chunk-44UOCSGV.js";import{a as f}from"./chunk-XGMYS2QC.js";import{b as m,f as s}from"./chunk-KL7SL7ES.js";import{k as l}from"./chunk-DEQBZDPB.js";var v={recursive:{short:"p",long:"parents",type:"boolean"},verbose:{short:"v",long:"verbose",type:"boolean"}},E={name:"mkdir",async execute(g,n){let p=l(g),e=f("mkdir",p,v);if(!e.ok)return e.error;let y=e.result.flags.recursive,k=e.result.flags.verbose,a=e.result.positional;if(a.length===0)return{stdout:m(),stderr:s(`mkdir: missing operand
2
+ `),exitCode:1};let d="",o="",c=0;for(let r of a)try{let i=n.fs.resolvePath(n.cwd,r);await n.fs.mkdir(i,{recursive:y}),k&&(d+=`mkdir: created directory '${r}'
3
+ `)}catch(i){let t=u(i);t.includes("ENOENT")||t.includes("no such file")?o+=`mkdir: cannot create directory '${r}': No such file or directory
4
+ `:t.includes("EEXIST")||t.includes("already exists")?o+=`mkdir: cannot create directory '${r}': File exists
5
+ `:o+=`mkdir: cannot create directory '${r}': ${t}
6
+ `,c=1}return{stdout:s(d),stderr:s(o),exitCode:c}}},A={name:"mkdir",flags:[{flag:"-p",type:"boolean"},{flag:"-v",type:"boolean"}],needsArgs:!0};export{E as a,A as b};
@@ -0,0 +1,11 @@
1
+ import{a as P}from"./chunk-XGMYS2QC.js";import{a as $,b as w}from"./chunk-WPPIJX5K.js";import{f as D}from"./chunk-KL7SL7ES.js";import{k as g}from"./chunk-DEQBZDPB.js";var T={name:"tree",summary:"list contents of directories in a tree-like format",usage:"tree [OPTION]... [DIRECTORY]...",options:["-a include hidden files","-d list directories only","-L LEVEL limit depth of directory tree","-f print full path prefix for each file"," --help display this help and exit"]},H={showHidden:{short:"a",type:"boolean"},directoriesOnly:{short:"d",type:"boolean"},fullPath:{short:"f",type:"boolean"},maxDepth:{short:"L",type:"number"}},N={name:"tree",async execute(o,u){let n=g(o);if(w(n))return $(T);let l=P("tree",n,H);if(!l.ok)return l.error;let m={showHidden:l.result.flags.showHidden,directoriesOnly:l.result.flags.directoriesOnly,maxDepth:l.result.flags.maxDepth??null,fullPath:l.result.flags.fullPath},e=l.result.positional;e.length===0&&e.push(".");let i="",c="",s=0,t=0;for(let r of e){let a=await W(u,r,m,"",0);i+=a.output,c+=a.stderr,s+=a.dirCount,t+=a.fileCount}return i+=`
2
+ ${s} director${s===1?"y":"ies"}`,m.directoriesOnly||(i+=`, ${t} file${t===1?"":"s"}`),i+=`
3
+ `,{stdout:D(i),stderr:D(c),exitCode:c?1:0}}};async function W(o,u,n,l,m){let e={output:"",stderr:"",dirCount:0,fileCount:0},i=o.fs.resolvePath(o.cwd,u);try{if(!(await o.fs.stat(i)).isDirectory)return e.output=`${u}
4
+ `,e.fileCount=1,e}catch{return e.stderr=`tree: ${u}: No such file or directory
5
+ `,e}if(e.output=`${u}
6
+ `,n.maxDepth!==null&&m>=n.maxDepth)return e;try{let c=[];if(o.fs.readdirWithFileTypes)c=(await o.fs.readdirWithFileTypes(i)).map(r=>({name:r.name,isDirectory:r.isDirectory}));else{let t=await o.fs.readdir(i);for(let r=0;r<t.length;r+=100){let a=t.slice(r,r+100),f=await Promise.all(a.map(async d=>{let y=i==="/"?`/${d}`:`${i}/${d}`;try{let h=await o.fs.stat(y);return{name:d,isDirectory:h.isDirectory}}catch{return null}}));c.push(...f.filter(d=>d!==null))}}let s=c.filter(t=>!(!n.showHidden&&t.name.startsWith(".")||n.directoriesOnly&&!t.isDirectory));s.sort((t,r)=>t.name.localeCompare(r.name));for(let t=0;t<s.length;t++){let r=s[t],a=i==="/"?`/${r.name}`:`${i}/${r.name}`,f=t===s.length-1,d=f?"`-- ":"|-- ",y=l+(f?" ":"| ");if(r.isDirectory){e.dirCount++;let h=n.fullPath?a:r.name;if(e.output+=`${l+d+h}
7
+ `,n.maxDepth===null||m+1<n.maxDepth){let C=await b(o,a,n,y,m+1);e.output+=C.output,e.dirCount+=C.dirCount,e.fileCount+=C.fileCount}}else{e.fileCount++;let h=n.fullPath?a:r.name;e.output+=`${l+d+h}
8
+ `}}}catch{e.stderr=`tree: ${u}: Permission denied
9
+ `}return e}async function b(o,u,n,l,m){let e={output:"",stderr:"",dirCount:0,fileCount:0};if(n.maxDepth!==null&&m>=n.maxDepth)return e;try{let i=[];if(o.fs.readdirWithFileTypes)i=(await o.fs.readdirWithFileTypes(u)).map(t=>({name:t.name,isDirectory:t.isDirectory}));else{let s=await o.fs.readdir(u);for(let t=0;t<s.length;t+=100){let r=s.slice(t,t+100),a=await Promise.all(r.map(async f=>{let d=u==="/"?`/${f}`:`${u}/${f}`;try{let y=await o.fs.stat(d);return{name:f,isDirectory:y.isDirectory}}catch{return null}}));i.push(...a.filter(f=>f!==null))}}let c=i.filter(s=>!(!n.showHidden&&s.name.startsWith(".")||n.directoriesOnly&&!s.isDirectory));c.sort((s,t)=>s.name.localeCompare(t.name));for(let s=0;s<c.length;s++){let t=c[s],r=u==="/"?`/${t.name}`:`${u}/${t.name}`,a=s===c.length-1,f=a?"`-- ":"|-- ",d=l+(a?" ":"| ");if(t.isDirectory){e.dirCount++;let y=n.fullPath?r:t.name;e.output+=`${l+f+y}
10
+ `;let h=await b(o,r,n,d,m+1);e.output+=h.output,e.dirCount+=h.dirCount,e.fileCount+=h.fileCount}else{e.fileCount++;let y=n.fullPath?r:t.name;e.output+=`${l+f+y}
11
+ `}}}catch{}return e}var R={name:"tree",flags:[{flag:"-a",type:"boolean"},{flag:"-d",type:"boolean"},{flag:"-f",type:"boolean"},{flag:"-L",type:"value",valueHint:"number"}],needsFiles:!0};export{N as a,R as b};
@@ -0,0 +1,6 @@
1
+ import{a as N}from"./chunk-44UOCSGV.js";import{c as g}from"./chunk-WPPIJX5K.js";import{b as f,f as d}from"./chunk-KL7SL7ES.js";import{k as p}from"./chunk-DEQBZDPB.js";function b(h){let s=h.replace(/\//g,"-"),t=new Date(s);if(!Number.isNaN(t.getTime()))return t;let o=s.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(o){let[,i,u,l]=o;if(t=new Date(Number.parseInt(i,10),Number.parseInt(u,10)-1,Number.parseInt(l,10)),!Number.isNaN(t.getTime()))return t}let a=s.match(/^(\d{4})-(\d{2})-(\d{2})\s+(\d{2}):(\d{2}):(\d{2})$/);if(a){let[,i,u,l,m,r,e]=a;if(t=new Date(Number.parseInt(i,10),Number.parseInt(u,10)-1,Number.parseInt(l,10),Number.parseInt(m,10),Number.parseInt(r,10),Number.parseInt(e,10)),!Number.isNaN(t.getTime()))return t}return null}var C={name:"touch",async execute(h,s){let t=p(h),o=[],a=null,i=!1;for(let r=0;r<t.length;r++){let e=t[r];if(e==="--"){o.push(...t.slice(r+1));break}else if(e==="-d"||e==="--date"){if(r+1>=t.length)return{stdout:f(),stderr:d(`touch: option requires an argument -- 'd'
2
+ `),exitCode:1};a=t[++r]}else if(e.startsWith("--date="))a=e.slice(7);else if(e==="-c"||e==="--no-create")i=!0;else if(e==="-a"||e==="-m"||e==="-r"||e==="-t")(e==="-r"||e==="-t")&&r++;else{if(e.startsWith("--"))return g("touch",e);if(e.startsWith("-")&&e.length>1){let c=!1;for(let n of e.slice(1))if(n==="c")i=!0;else if(!(n==="a"||n==="m"))if(n==="d"){if(r+1>=t.length)return{stdout:f(),stderr:d(`touch: option requires an argument -- 'd'
3
+ `),exitCode:1};a=t[++r],c=!0;break}else if(n==="r"||n==="t"){r++,c=!0;break}else return g("touch",`-${n}`);if(c)continue}else o.push(e)}}if(o.length===0)return{stdout:f(),stderr:d(`touch: missing file operand
4
+ `),exitCode:1};let u=null;if(a!==null&&(u=b(a),u===null))return{stdout:f(),stderr:d(`touch: invalid date format '${a}'
5
+ `),exitCode:1};let l="",m=0;for(let r of o)try{let e=s.fs.resolvePath(s.cwd,r);if(!await s.fs.exists(e)){if(i)continue;await s.fs.writeFile(e,"")}let n=u??new Date;await s.fs.utimes(e,n,n)}catch(e){l+=`touch: cannot touch '${r}': ${N(e)}
6
+ `,m=1}return{stdout:f(),stderr:d(l),exitCode:m}}},$={name:"touch",flags:[{flag:"-c",type:"boolean"},{flag:"-a",type:"boolean"},{flag:"-m",type:"boolean"},{flag:"-d",type:"value",valueHint:"string"}],needsArgs:!0};export{C as a,$ as b};
@@ -0,0 +1,10 @@
1
+ import{a as _}from"./chunk-4YUPFOYA.js";import{a as ae}from"./chunk-XYWNAVNS.js";import{a as ue,b as he,d as de}from"./chunk-BMKJMOWP.js";import{a as pe,b as fe}from"./chunk-WPPIJX5K.js";import{b as re,f as Z,h as Y}from"./chunk-KL7SL7ES.js";import{k as ce}from"./chunk-DEQBZDPB.js";function k(e,t){switch(e.type){case"name":{let n=e.pattern,r=n.match(/^\*(\.[a-zA-Z0-9]+)$/);if(r){let s=r[1],c=t.name;if(e.ignoreCase){if(!c.toLowerCase().endsWith(s.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!c.endsWith(s))return{matches:!1,pruned:!1,printed:!1};return{matches:!0,pruned:!1,printed:!1}}return{matches:_(t.name,n,e.ignoreCase),pruned:!1,printed:!1}}case"path":{let n=e.pattern,r=t.relativePath,s=n.split("/");for(let i=0;i<s.length-1;i++){let a=s[i];if(a&&a!=="."&&a!==".."&&!a.includes("*")&&!a.includes("?")&&!a.includes("[")){let l=`/${a}/`;if(e.ignoreCase){if(!r.toLowerCase().includes(l.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!r.includes(l))return{matches:!1,pruned:!1,printed:!1}}}let c=n.match(/\*(\.[a-zA-Z0-9]+)$/);if(c){let i=c[1];if(e.ignoreCase){if(!r.toLowerCase().endsWith(i.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!r.endsWith(i))return{matches:!1,pruned:!1,printed:!1}}return{matches:_(r,n,e.ignoreCase),pruned:!1,printed:!1}}case"regex":try{let n=e.ignoreCase?"i":"";return{matches:ae(e.pattern,n).test(t.relativePath),pruned:!1,printed:!1}}catch{return{matches:!1,pruned:!1,printed:!1}}case"type":return e.fileType==="f"?{matches:t.isFile,pruned:!1,printed:!1}:e.fileType==="d"?{matches:t.isDirectory,pruned:!1,printed:!1}:{matches:!1,pruned:!1,printed:!1};case"empty":return{matches:t.isEmpty,pruned:!1,printed:!1};case"mtime":{let r=(Date.now()-t.mtime)/(1e3*60*60*24),s;return e.comparison==="more"?s=r>e.days:e.comparison==="less"?s=r<e.days:s=Math.floor(r)===e.days,{matches:s,pruned:!1,printed:!1}}case"newer":{let n=t.newerRefTimes.get(e.refPath);return n===void 0?{matches:!1,pruned:!1,printed:!1}:{matches:t.mtime>n,pruned:!1,printed:!1}}case"size":{let n=e.value;switch(e.unit){case"c":n=e.value;break;case"k":n=e.value*1024;break;case"M":n=e.value*1024*1024;break;case"G":n=e.value*1024*1024*1024;break;case"b":n=e.value*512;break}let r;return e.comparison==="more"?r=t.size>n:e.comparison==="less"?r=t.size<n:e.unit==="b"?r=Math.ceil(t.size/512)===e.value:r=t.size===n,{matches:r,pruned:!1,printed:!1}}case"perm":{let n=t.mode&511,r=e.mode&511,s;return e.matchType==="exact"?s=n===r:e.matchType==="all"?s=(n&r)===r:s=(n&r)!==0,{matches:s,pruned:!1,printed:!1}}case"prune":return{matches:!0,pruned:!0,printed:!1};case"print":return{matches:!0,pruned:!1,printed:!0};case"not":{let n=k(e.expr,t);return{matches:!n.matches,pruned:n.pruned,printed:!1}}case"and":{let n=k(e.left,t);if(!n.matches)return{matches:!1,pruned:n.pruned,printed:!1};let r=k(e.right,t);return{matches:r.matches,pruned:n.pruned||r.pruned,printed:n.printed||r.printed}}case"or":{let n=k(e.left,t);if(n.matches)return n;let r=k(e.right,t);return{matches:r.matches,pruned:n.pruned||r.pruned,printed:r.printed}}}}function V(e){if(!e)return!1;switch(e.type){case"name":case"path":case"regex":case"type":case"prune":case"print":return!1;case"empty":case"mtime":case"newer":case"size":case"perm":return!0;case"not":return V(e.expr);case"and":case"or":return V(e.left)||V(e.right)}}function J(e){if(!e)return!1;switch(e.type){case"empty":return!0;case"not":return J(e.expr);case"and":case"or":return J(e.left)||J(e.right);default:return!1}}function me(e){let t={terminalDirName:null,requiredExtension:null};if(!e)return t;let n=Fe(e);if(Ie(e)&&n.length===1){let c=n[0].split("/").filter(i=>i.length>0);if(c.length>=2)for(let i=c.length-2;i>=0;i--){let a=c[i];if(!a.includes("*")&&!a.includes("?")&&!a.includes("[")&&a!=="."&&a!==".."){let l=c[i+1];if(l&&(l.includes("*")||l.includes("?"))){t.terminalDirName=a;let o=l.match(/^\*(\.[a-zA-Z0-9]+)$/);o&&(t.requiredExtension=o[1])}break}}}return t}function Fe(e){let t=[],n=r=>{r.type==="path"?t.push(r.pattern):r.type==="not"?n(r.expr):(r.type==="and"||r.type==="or")&&(n(r.left),n(r.right))};return n(e),t}function Ie(e){let t=n=>n.type==="type"&&n.fileType==="f"?!0:n.type==="not"?t(n.expr):n.type==="and"||n.type==="or"?t(n.left)||t(n.right):!1;return t(e)}function ye(e){let t=[],n=r=>{r&&(r.type==="newer"?t.push(r.refPath):r.type==="not"?n(r.expr):(r.type==="and"||r.type==="or")&&(n(r.left),n(r.right)))};return n(e),t}function Q(e){if(!e)return!0;switch(e.type){case"name":case"path":case"regex":case"type":case"prune":case"print":return!0;case"empty":case"mtime":case"newer":case"size":case"perm":return!1;case"not":return Q(e.expr);case"and":case"or":return Q(e.left)&&Q(e.right)}}function H(e,t,n,r,s){switch(e.type){case"name":{let c=e.pattern,i=c.match(/^\*(\.[a-zA-Z0-9]+)$/);if(i){let a=i[1];if(e.ignoreCase){if(!t.toLowerCase().endsWith(a.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!t.endsWith(a))return{matches:!1,pruned:!1,printed:!1};return{matches:!0,pruned:!1,printed:!1}}return{matches:_(t,c,e.ignoreCase),pruned:!1,printed:!1}}case"path":{let c=e.pattern,i=c.split("/");for(let l=0;l<i.length-1;l++){let o=i[l];if(o&&o!=="."&&o!==".."&&!o.includes("*")&&!o.includes("?")&&!o.includes("[")){let u=`/${o}/`;if(e.ignoreCase){if(!n.toLowerCase().includes(u.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!n.includes(u))return{matches:!1,pruned:!1,printed:!1}}}let a=c.match(/\*(\.[a-zA-Z0-9]+)$/);if(a){let l=a[1];if(e.ignoreCase){if(!n.toLowerCase().endsWith(l.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!n.endsWith(l))return{matches:!1,pruned:!1,printed:!1}}return{matches:_(n,c,e.ignoreCase),pruned:!1,printed:!1}}case"regex":try{let c=e.ignoreCase?"i":"";return{matches:ae(e.pattern,c).test(n),pruned:!1,printed:!1}}catch{return{matches:!1,pruned:!1,printed:!1}}case"type":return e.fileType==="f"?{matches:r,pruned:!1,printed:!1}:e.fileType==="d"?{matches:s,pruned:!1,printed:!1}:{matches:!1,pruned:!1,printed:!1};case"prune":return{matches:!0,pruned:!0,printed:!1};case"print":return{matches:!0,pruned:!1,printed:!0};case"not":{let c=H(e.expr,t,n,r,s);return{matches:!c.matches,pruned:c.pruned,printed:!1}}case"and":{let c=H(e.left,t,n,r,s);if(!c.matches)return{matches:!1,pruned:c.pruned,printed:!1};let i=H(e.right,t,n,r,s);return{matches:i.matches,pruned:c.pruned||i.pruned,printed:c.printed||i.printed}}case"or":{let c=H(e.left,t,n,r,s);if(c.matches)return c;let i=H(e.right,t,n,r,s);return{matches:i.matches,pruned:c.pruned||i.pruned,printed:i.printed}}default:return{matches:!1,pruned:!1,printed:!1}}}function U(e){if(!e)return!1;switch(e.type){case"prune":return!0;case"not":return U(e.expr);case"and":case"or":return U(e.left)||U(e.right);default:return!1}}function z(e){switch(e.type){case"name":case"path":case"regex":case"type":case"prune":case"print":return!0;case"empty":case"mtime":case"newer":case"size":case"perm":return!1;case"not":return z(e.expr);case"and":case"or":return z(e.left)&&z(e.right)}}function ge(e,t){if(!e||!t.isDirectory)return{shouldPrune:!1};if(!z(e))return ie(e,t);let n={name:t.name,relativePath:t.relativePath,isFile:t.isFile,isDirectory:t.isDirectory,isEmpty:!1,mtime:0,size:0,mode:0,newerRefTimes:new Map};return{shouldPrune:k(e,n).pruned}}function ie(e,t){switch(e.type){case"or":{if(z(e.left)){let n={name:t.name,relativePath:t.relativePath,isFile:t.isFile,isDirectory:t.isDirectory,isEmpty:!1,mtime:0,size:0,mode:0,newerRefTimes:new Map};if(k(e.left,n).pruned)return{shouldPrune:!0}}return ie(e.right,t)}case"and":{if(z(e.left)&&z(e.right)){let n={name:t.name,relativePath:t.relativePath,isFile:t.isFile,isDirectory:t.isDirectory,isEmpty:!1,mtime:0,size:0,mode:0,newerRefTimes:new Map};return{shouldPrune:k(e,n).pruned}}if(z(e.left)){let n={name:t.name,relativePath:t.relativePath,isFile:t.isFile,isDirectory:t.isDirectory,isEmpty:!1,mtime:0,size:0,mode:0,newerRefTimes:new Map};return k(e.left,n).matches?ie(e.right,t):{shouldPrune:!1}}return{shouldPrune:!1}}case"not":return{shouldPrune:!1};default:return{shouldPrune:!1}}}function we(e,t){let n=[],r=[],s=t;for(;s<e.length;){let i=e[s];if(i==="("||i==="\\("){n.push({type:"lparen"}),s++;continue}if(i===")"||i==="\\)"){n.push({type:"rparen"}),s++;continue}if(i==="-name"&&s+1<e.length)n.push({type:"expr",expr:{type:"name",pattern:e[++s]}});else if(i==="-iname"&&s+1<e.length)n.push({type:"expr",expr:{type:"name",pattern:e[++s],ignoreCase:!0}});else if(i==="-path"&&s+1<e.length)n.push({type:"expr",expr:{type:"path",pattern:e[++s]}});else if(i==="-ipath"&&s+1<e.length)n.push({type:"expr",expr:{type:"path",pattern:e[++s],ignoreCase:!0}});else if(i==="-regex"&&s+1<e.length)n.push({type:"expr",expr:{type:"regex",pattern:e[++s]}});else if(i==="-iregex"&&s+1<e.length)n.push({type:"expr",expr:{type:"regex",pattern:e[++s],ignoreCase:!0}});else if(i==="-type"&&s+1<e.length){let a=e[++s];if(a==="f"||a==="d")n.push({type:"expr",expr:{type:"type",fileType:a}});else return{expr:null,pathIndex:s,error:`find: Unknown argument to -type: ${a}
2
+ `,actions:[]}}else if(i==="-empty")n.push({type:"expr",expr:{type:"empty"}});else if(i==="-mtime"&&s+1<e.length){let a=e[++s],l="exact",o=a;a.startsWith("+")?(l="more",o=a.slice(1)):a.startsWith("-")&&(l="less",o=a.slice(1));let u=parseInt(o,10);Number.isNaN(u)||n.push({type:"expr",expr:{type:"mtime",days:u,comparison:l}})}else if(i==="-newer"&&s+1<e.length){let a=e[++s];n.push({type:"expr",expr:{type:"newer",refPath:a}})}else if(i==="-size"&&s+1<e.length){let a=e[++s],l="exact",o=a;a.startsWith("+")?(l="more",o=a.slice(1)):a.startsWith("-")&&(l="less",o=a.slice(1));let u=o.match(/^(\d+)([ckMGb])?$/);if(u){let B=parseInt(u[1],10),X=u[2]||"b";n.push({type:"expr",expr:{type:"size",value:B,unit:X,comparison:l}})}}else if(i==="-perm"&&s+1<e.length){let a=e[++s],l="exact",o=a;a.startsWith("-")?(l="all",o=a.slice(1)):a.startsWith("/")&&(l="any",o=a.slice(1));let u=parseInt(o,8);Number.isNaN(u)||n.push({type:"expr",expr:{type:"perm",mode:u,matchType:l}})}else if(i==="-prune")n.push({type:"expr",expr:{type:"prune"}});else if(i==="-not"||i==="!")n.push({type:"not"});else if(i==="-o"||i==="-or")n.push({type:"op",op:"or"});else if(i==="-a"||i==="-and")n.push({type:"op",op:"and"});else if(i==="-maxdepth"||i==="-mindepth")s++;else if(i!=="-depth")if(i==="-exec"){let a=[];for(s++;s<e.length&&e[s]!==";"&&e[s]!=="+";)a.push(e[s]),s++;if(s>=e.length)return{expr:null,pathIndex:s,error:"find: missing argument to `-exec'\n",actions:[]};let l=e[s]==="+";r.push({type:"exec",command:a,batchMode:l})}else if(i==="-print")n.push({type:"expr",expr:{type:"print"}}),r.push({type:"print"});else if(i==="-print0")r.push({type:"print0"});else if(i==="-printf"&&s+1<e.length){let a=e[++s];r.push({type:"printf",format:a})}else if(i==="-delete")r.push({type:"delete"});else{if(i.startsWith("-"))return{expr:null,pathIndex:s,error:`find: unknown predicate '${i}'
3
+ `,actions:[]};if(n.length===0){s++;continue}break}s++}if(n.length===0)return{expr:null,pathIndex:s,actions:r};let c=$e(n);return c.error?{expr:null,pathIndex:s,error:c.error,actions:r}:{expr:c.expr,pathIndex:s,actions:r}}function $e(e){let t=0;function n(){let a=r();if(!a)return null;for(;t<e.length;){let l=e[t];if(l.type==="op"&&l.op==="or"){t++;let o=r();if(!o)return a;a={type:"or",left:a,right:o}}else break}return a}function r(){let a=s();if(!a)return null;for(;t<e.length;){let l=e[t];if(l.type==="op"&&l.op==="and"){t++;let o=s();if(!o)return a;a={type:"and",left:a,right:o}}else if(l.type==="expr"||l.type==="not"||l.type==="lparen"){let o=s();if(!o)return a;a={type:"and",left:a,right:o}}else break}return a}function s(){if(t<e.length&&e[t].type==="not"){t++;let a=s();return a?{type:"not",expr:a}:null}return c()}function c(){if(t>=e.length)return null;let a=e[t];if(a.type==="lparen"){t++;let l=n();return t<e.length&&e[t].type==="rparen"&&t++,l}return a.type==="expr"?(t++,a.expr):(a.type==="rparen",null)}return{expr:n()}}var De=500;function Re(){return{readdirCalls:0,readdirTime:0,statCalls:0,statTime:0,evalCalls:0,evalTime:0,nodeCount:0,batchCount:0,batchTime:0,earlyPrunes:0}}function ke(e,t,n){e({category:"find",name:"summary",durationMs:n,details:{readdirCalls:t.readdirCalls,readdirTimeMs:t.readdirTime,statCalls:t.statCalls,statTimeMs:t.statTime,evalCalls:t.evalCalls,evalTimeMs:t.evalTime,nodeCount:t.nodeCount,batchCount:t.batchCount,batchTimeMs:t.batchTime,earlyPrunes:t.earlyPrunes,otherTimeMs:n-t.readdirTime-t.statTime-t.evalTime-t.batchTime}})}var Ne={name:"find",summary:"search for files in a directory hierarchy",usage:"find [path...] [expression]",options:["-name PATTERN file name matches shell pattern PATTERN","-iname PATTERN like -name but case insensitive","-path PATTERN file path matches shell pattern PATTERN","-ipath PATTERN like -path but case insensitive","-regex PATTERN file path matches regular expression PATTERN","-iregex PATTERN like -regex but case insensitive","-type TYPE file is of type: f (regular file), d (directory)","-empty file is empty or directory is empty","-mtime N file's data was modified N*24 hours ago","-newer FILE file was modified more recently than FILE","-size N[ckMGb] file uses N units of space (c=bytes, k=KB, M=MB, G=GB, b=512B blocks)","-perm MODE file's permission bits are exactly MODE (octal)","-perm -MODE all permission bits MODE are set","-perm /MODE any permission bits MODE are set","-maxdepth LEVELS descend at most LEVELS directories","-mindepth LEVELS do not apply tests at levels less than LEVELS","-depth process directory contents before directory itself","-prune do not descend into this directory","-not, ! negate the following expression","-a, -and logical AND (default)","-o, -or logical OR","-exec CMD {} ; execute CMD on each file ({} is replaced by filename)","-exec CMD {} + execute CMD with multiple files at once","-print print the full file name (default action)","-print0 print the full file name followed by a null character","-printf FORMAT print FORMAT with directives: %f %h %p %P %s %d %m %M %t","-delete delete found files/directories"," --help display this help and exit"]},We=new Set(["-name","-iname","-path","-ipath","-regex","-iregex","-type","-maxdepth","-mindepth","-mtime","-newer","-size","-perm"]),Qe={name:"find",async execute(e,t){let n=ce(e);if(fe(n))return pe(Ne);let r=[],s=null,c=null,i=!1,a=!1;for(let p=0;p<n.length;p++){let f=n[p];if(f==="-maxdepth"&&p+1<n.length)a=!0,s=parseInt(n[++p],10);else if(f==="-mindepth"&&p+1<n.length)a=!0,c=parseInt(n[++p],10);else if(f==="-depth")a=!0,i=!0;else if(f==="-exec")for(a=!0,p++;p<n.length&&n[p]!==";"&&n[p]!=="+";)p++;else!f.startsWith("-")&&f!==";"&&f!=="+"&&f!=="("&&f!==")"&&f!=="\\("&&f!=="\\)"&&f!=="!"?a||r.push(f):We.has(f)?(a=!0,p++):(f.startsWith("-")||f==="("||f==="\\("||f==="!")&&(a=!0)}r.length===0&&r.push(".");let{expr:l,error:o,actions:u}=we(n,0);if(o)return{stdout:re(),stderr:Z(o),exitCode:1};let B=u.some(p=>p.type==="print"),X=u.length===0,N=[],Te=u.some(p=>p.type==="printf"),le=[],q="",G=0,Se=ye(l),ee=new Map;for(let p of Se){let f=t.fs.resolvePath(t.cwd,p);try{let d=await t.fs.stat(f);ee.set(p,d.mtime?.getTime()??Date.now())}catch{}}let Ce=u.some(p=>{if(p.type!=="printf")return!1;let f=p.format.replace(/%%/g,"");return/%[-+]?[0-9]*\.?[0-9]*(s|m|M|t|T)/.test(f)}),Pe=V(l)||Ce,be=J(l),te=me(l),oe=U(l),ve=Q(l),Ee=typeof t.fs.readdirWithFileTypes=="function";for(let p of r){let W=function(h){let $=c===null||h.depth>=c,C=!1;if($&&l!==null){let P=Date.now(),y;if(ve)y=H(l,h.name,h.relativePath,h.isFile,h.isDirectory);else{let m={name:h.name,relativePath:h.relativePath,isFile:h.isFile,isDirectory:h.isDirectory,isEmpty:h.isEmpty,mtime:h.stat?.mtime?.getTime()??Date.now(),size:h.stat?.size??0,mode:h.stat?.mode??420,newerRefTimes:ee};y=k(l,m)}$=y.matches,C=B?y.printed:$,d.evalCalls++,d.evalTime+=Date.now()-P}else $&&(C=!0);return C?{print:!0,printfData:Te?{path:h.relativePath,name:h.name,size:h.stat?.size??0,mtime:h.stat?.mtime?.getTime()??Date.now(),mode:h.stat?.mode??420,isDirectory:h.isDirectory,depth:h.depth,startingPoint:p}:null}:{print:!1,printfData:null}};var Oe=W;p.length>1&&p.endsWith("/")&&(p=p.slice(0,-1));let f=t.fs.resolvePath(t.cwd,p);try{await t.fs.stat(f)}catch{q+=`find: ${p}: No such file or directory
4
+ `,G=1;continue}let d=Re(),I=Date.now();async function b(h){let{path:v,depth:$,typeInfo:C}=h;if(d.nodeCount++,s!==null&&$>s)return null;let E,P,y;if(C&&!Pe)E=C.isFile,P=C.isDirectory;else{try{let L=Date.now();y=await t.fs.stat(v),d.statCalls++,d.statTime+=Date.now()-L}catch{return null}if(!y)return null;E=y.isFile,P=y.isDirectory}let m;v===f?m=p.split("/").pop()||p:m=v.split("/").pop()||"";let g=v===f?p:p==="."?`./${v.slice(f==="/"?f.length:f.length+1)}`:p+v.slice(f.length),T=[],S=null,w=null,D=!1;P&&oe&&!i&&(D=ge(l,{name:m,relativePath:g,isFile:E,isDirectory:P}).shouldPrune,D&&d.earlyPrunes++);let x=s!==null&&$>=s,F=te.terminalDirName!==null&&m===te.terminalDirName,j=!x&&!F&&!D;if(P&&((j||be||F)&&!D)){let L=Date.now();if(Ee&&t.fs.readdirWithFileTypes){if(S=await t.fs.readdirWithFileTypes(v),w=S.map(M=>M.name),d.readdirCalls++,d.readdirTime+=Date.now()-L,j)T=S.map((M,R)=>({path:v==="/"?`/${M.name}`:`${v}/${M.name}`,depth:$+1,typeInfo:{isFile:M.isFile,isDirectory:M.isDirectory},resultIndex:R}));else if(F){let M=te.requiredExtension;T=S.filter(R=>R.isFile&&(!M||R.name.endsWith(M))).map((R,xe)=>({path:v==="/"?`/${R.name}`:`${v}/${R.name}`,depth:$+1,typeInfo:{isFile:R.isFile,isDirectory:R.isDirectory},resultIndex:xe}))}}else w=await t.fs.readdir(v),d.readdirCalls++,d.readdirTime+=Date.now()-L,j&&(T=w.map((M,R)=>({path:v==="/"?`/${M}`:`${v}/${M}`,depth:$+1,resultIndex:R})))}let K=E?(y?.size??0)===0:w!==null&&w.length===0,O=D;if(!i&&l!==null&&!D&&oe){let L=Date.now(),M={name:m,relativePath:g,isFile:E,isDirectory:P,isEmpty:K,mtime:y?.mtime?.getTime()??Date.now(),size:y?.size??0,mode:y?.mode??420,newerRefTimes:ee};O=k(l,M).pruned,d.evalCalls++,d.evalTime+=Date.now()-L}return{relativePath:g,name:m,isFile:E,isDirectory:P,isEmpty:K,stat:y,depth:$,children:O?[]:T,pruned:O}}async function Me(){let h={paths:[],printfData:[]};if(i){let y=function(m){let g={paths:[],printfData:[]},T=C[m];if(!T)return g;for(let D of T.childIndices){let x=y(D);g.paths.push(...x.paths),g.printfData.push(...x.printfData)}let{print:S,printfData:w}=W(T.node);return S&&(g.paths.push(T.node.relativePath),w&&g.printfData.push(w)),g};var v=y;let C=[],E=[{item:{path:f,depth:0,resultIndex:0},parentIndex:-1,childOrderInParent:0}],P=new Map;for(;E.length>0;){let m=Date.now(),g=E.splice(0,De),T=await Promise.all(g.map(S=>b(S.item)));d.batchCount++,d.batchTime+=Date.now()-m;for(let S=0;S<g.length;S++){let w=T[S],D=g[S];if(!w)continue;let x=C.length;if(D.parentIndex>=0){let F=P.get(D.parentIndex)||[];F.push(x),P.set(D.parentIndex,F)}C.push({node:w,parentIndex:D.parentIndex,childIndices:[]});for(let F=0;F<w.children.length;F++)E.push({item:w.children[F],parentIndex:x,childOrderInParent:F})}}for(let[m,g]of P)m>=0&&m<C.length&&(C[m].childIndices=g);if(C.length>0){let m=y(0);h.paths.push(...m.paths),h.printfData.push(...m.printfData)}}else{let m=function(g){let T=C.get(g);T&&(h.paths.push(T.path),T.printfData&&h.printfData.push(T.printfData));let S=y.get(g);if(S)for(let w of S)m(w)};var $=m;let C=new Map,E=0,P=[{item:{path:f,depth:0,resultIndex:0},orderIndex:E++}],y=new Map;for(;P.length>0;){let g=Date.now(),T=P.splice(0,De),S=await Promise.all(T.map(async({item:w,orderIndex:D})=>{let x=await b(w);return x?{node:x,orderIndex:D}:null}));d.batchCount++,d.batchTime+=Date.now()-g;for(let w of S){if(!w)continue;let{node:D,orderIndex:x}=w,{print:F,printfData:j}=W(D);if(F&&C.set(x,{path:D.relativePath,printfData:j}),D.children.length>0){let se=[];for(let K of D.children){let O=E++;se.push(O),P.push({item:K,orderIndex:O})}y.set(x,se)}}}m(0)}return h}let ne=await Me();if(N.push(...ne.paths),le.push(...ne.printfData),t.trace){let h=Date.now()-I;ke(t.trace,d,h),t.trace({category:"find",name:"searchPath",durationMs:h,details:{path:p,resultsFound:ne.paths.length}})}}let A="";if(u.length>0)for(let p of u)switch(p.type){case"print":A+=N.length>0?`${N.join(`
5
+ `)}
6
+ `:"";break;case"print0":A+=N.length>0?`${N.join("\0")}\0`:"";break;case"delete":{let f=[...N].sort((d,I)=>I.length-d.length);for(let d of f){let I=t.fs.resolvePath(t.cwd,d);try{await t.fs.rm(I,{recursive:!1})}catch(b){let W=b instanceof Error?b.message:String(b);q+=`find: cannot delete '${d}': ${W}
7
+ `,G=1}}break}case"printf":for(let f of le)A+=ze(p.format,f);break;case"exec":if(!t.exec)return{stdout:re(),stderr:Z(`find: -exec not supported in this context
8
+ `),exitCode:1};if(p.batchMode){let f=[];for(let b of p.command)b==="{}"?f.push(...N):f.push(b);let d=f.map(b=>`"${b}"`).join(" "),I=await t.exec(d,{cwd:t.cwd});A+=await Y(I.stdout),q+=await Y(I.stderr),I.exitCode!==0&&(G=I.exitCode)}else for(let f of N){let I=p.command.map(W=>W==="{}"?f:W).map(W=>`"${W}"`).join(" "),b=await t.exec(I,{cwd:t.cwd});A+=await Y(b.stdout),q+=await Y(b.stderr),b.exitCode!==0&&(G=b.exitCode)}break}else X&&(A=N.length>0?`${N.join(`
9
+ `)}
10
+ `:"");return{stdout:Z(A),stderr:Z(q),exitCode:G}}};function ze(e,t){let n=de(e),r="",s=0;for(;s<n.length;)if(n[s]==="%"&&s+1<n.length){if(s++,n[s]==="%"){r+="%",s++;continue}let[c,i,a]=he(n,s);if(s+=a,s>=n.length){r+="%";break}let l=n[s],o;switch(l){case"f":o=t.name,s++;break;case"h":{let u=t.path.lastIndexOf("/");o=u>0?t.path.slice(0,u):".",s++;break}case"p":o=t.path,s++;break;case"P":{let u=t.startingPoint;t.path===u?o="":t.path.startsWith(`${u}/`)?o=t.path.slice(u.length+1):u==="."&&t.path.startsWith("./")?o=t.path.slice(2):o=t.path,s++;break}case"s":o=String(t.size),s++;break;case"d":o=String(t.depth),s++;break;case"m":o=(t.mode&511).toString(8),s++;break;case"M":o=Ae(t.mode,t.isDirectory),s++;break;case"t":{let u=new Date(t.mtime);o=Le(u),s++;break}case"T":{if(s+1<n.length){let u=n[s+1],B=new Date(t.mtime);o=He(B,u),s+=2}else o="%T",s++;break}default:r+=`%${c!==0||i!==-1?`${c}.${i}`:""}${l}`,s++;continue}r+=ue(o,c,i)}else r+=n[s],s++;return r}function Ae(e,t){let n=e&511,r=t?"d":"-";return r+=n&256?"r":"-",r+=n&128?"w":"-",r+=n&64?"x":"-",r+=n&32?"r":"-",r+=n&16?"w":"-",r+=n&8?"x":"-",r+=n&4?"r":"-",r+=n&2?"w":"-",r+=n&1?"x":"-",r}function Le(e){let t=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],n=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],r=t[e.getDay()],s=n[e.getMonth()],c=String(e.getDate()).padStart(2," "),i=String(e.getHours()).padStart(2,"0"),a=String(e.getMinutes()).padStart(2,"0"),l=String(e.getSeconds()).padStart(2,"0"),o=e.getFullYear();return`${r} ${s} ${c} ${i}:${a}:${l} ${o}`}function He(e,t){switch(t){case"@":return String(e.getTime()/1e3);case"Y":return String(e.getFullYear());case"m":return String(e.getMonth()+1).padStart(2,"0");case"d":return String(e.getDate()).padStart(2,"0");case"H":return String(e.getHours()).padStart(2,"0");case"M":return String(e.getMinutes()).padStart(2,"0");case"S":return String(e.getSeconds()).padStart(2,"0");case"T":return`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}:${String(e.getSeconds()).padStart(2,"0")}`;case"F":return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`;default:return`%T${t}`}}var Ke={name:"find",flags:[{flag:"-name",type:"value",valueHint:"pattern"},{flag:"-iname",type:"value",valueHint:"pattern"},{flag:"-type",type:"value",valueHint:"string"},{flag:"-maxdepth",type:"value",valueHint:"number"},{flag:"-mindepth",type:"value",valueHint:"number"},{flag:"-empty",type:"boolean"},{flag:"-print",type:"boolean"},{flag:"-print0",type:"boolean"}],needsFiles:!0};export{Qe as a,Ke as b};
@@ -0,0 +1,8 @@
1
+ import{b as r,f as o,h as d}from"./chunk-KL7SL7ES.js";import{k as a}from"./chunk-DEQBZDPB.js";async function p(l,s){let t=a(l);if(t.length>0&&t[0]!=="-"){let f=t[0].startsWith("/")?t[0]:`${s.cwd}/${t[0]}`;try{let n=(await s.fs.readFileText(f)).split(`
2
+ `);n[n.length-1]===""&&n.pop();let i=n.reverse();return{stdout:o(i.length>0?`${i.join(`
3
+ `)}
4
+ `:""),stderr:r(),exitCode:0}}catch{return{stdout:r(),stderr:o(`tac: ${t[0]}: No such file or directory
5
+ `),exitCode:1}}}let e=(await d(s.stdin)).split(`
6
+ `);e[e.length-1]===""&&e.pop();let c=e.reverse();return{stdout:o(c.length>0?`${c.join(`
7
+ `)}
8
+ `:""),stderr:r(),exitCode:0}}var m={name:"tac",execute:p},y={name:"tac",flags:[],stdinType:"text",needsFiles:!0};export{m as a,y as b};
@@ -0,0 +1,6 @@
1
+ import{a as P}from"./chunk-44UOCSGV.js";import{a as C}from"./chunk-XGMYS2QC.js";import{a as $,b as w}from"./chunk-WPPIJX5K.js";import{b as p,f as s}from"./chunk-KL7SL7ES.js";import{k as y}from"./chunk-DEQBZDPB.js";var A={name:"mv",summary:"move (rename) files",usage:"mv [OPTION]... SOURCE... DEST",options:["-f, --force do not prompt before overwriting","-n, --no-clobber do not overwrite an existing file","-v, --verbose explain what is being done"," --help display this help and exit"]},D={force:{short:"f",long:"force",type:"boolean"},noClobber:{short:"n",long:"no-clobber",type:"boolean"},verbose:{short:"v",long:"verbose",type:"boolean"}},H={name:"mv",async execute(E,t){let d=y(E);if(w(d))return $(A);let r=C("mv",d,D);if(!r.ok)return r.error;let g=r.result.flags.force,v=r.result.flags.noClobber,N=r.result.flags.verbose,f=r.result.positional;if(v&&(g=!1),f.length<2)return{stdout:p(),stderr:s(`mv: missing destination file operand
2
+ `),exitCode:1};let n=f.pop()??"",b=f,a=t.fs.resolvePath(t.cwd,n),u="",c="",h=0,i=!1;try{i=(await t.fs.stat(a)).isDirectory}catch{}if(b.length>1&&!i)return{stdout:p(),stderr:s(`mv: target '${n}' is not a directory
3
+ `),exitCode:1};for(let e of b)try{let m=t.fs.resolvePath(t.cwd,e),o=a;if(i){let l=e.split("/").pop()||e;o=a==="/"?`/${l}`:`${a}/${l}`}if(v)try{await t.fs.stat(o);continue}catch{}if(await t.fs.mv(m,o),N){let l=i?`${n}/${e.split("/").pop()||e}`:n;u+=`renamed '${e}' -> '${l}'
4
+ `}}catch(m){let o=P(m);o.includes("ENOENT")||o.includes("no such file")?c+=`mv: cannot stat '${e}': No such file or directory
5
+ `:c+=`mv: cannot move '${e}': ${o}
6
+ `,h=1}return{stdout:s(u),stderr:s(c),exitCode:h}}},z={name:"mv",flags:[{flag:"-f",type:"boolean"},{flag:"-n",type:"boolean"},{flag:"-v",type:"boolean"}],needsArgs:!0,minArgs:2};export{H as a,z as b};
@@ -0,0 +1 @@
1
+ function i(r,e){if(!r)return e;if(!e||r===e)return r;if(typeof AbortSignal.any=="function")return AbortSignal.any([r,e]);let n=new AbortController,t=o=>()=>n.abort(o.reason);return r.aborted?n.abort(r.reason):e.aborted?n.abort(e.reason):(r.addEventListener("abort",t(r),{once:!0}),e.addEventListener("abort",t(e),{once:!0})),n.signal}export{i as a};
@@ -0,0 +1,6 @@
1
+ import{a as c,b as p}from"./chunk-WPPIJX5K.js";import{b as r,f as i}from"./chunk-KL7SL7ES.js";import{k as f,l as m,m as g}from"./chunk-DEQBZDPB.js";var h={name:"alias",summary:"define or display aliases",usage:"alias [name[=value] ...]",options:[" --help display this help and exit"]},l="BASH_ALIAS_",C={name:"alias",async execute(d,a){let e=f(d);if(p(e))return c(h);if(e.length===0){let s="";for(let n of a.env.keys())if(n.startsWith(l)){let t=n.slice(l.length);s+=`alias ${t}='${m(a.env,n)}'
2
+ `}return{stdout:i(s),stderr:r(),exitCode:0}}let u=e[0]==="--"?e.slice(1):e;for(let s of u){let n=s.indexOf("=");if(n===-1){let t=l+s;return a.env.get(t)?{stdout:i(`alias ${s}='${m(a.env,t)}'
3
+ `),stderr:r(),exitCode:0}:{stdout:r(),stderr:i(`alias: ${s}: not found
4
+ `),exitCode:1}}else{let t=s.slice(0,n),o=s.slice(n+1);(o.startsWith("'")&&o.endsWith("'")||o.startsWith('"')&&o.endsWith('"'))&&(o=o.slice(1,-1)),g(a.env,l+t,o)}}return{stdout:r(),stderr:r(),exitCode:0}}},A={name:"unalias",async execute(d,a){let e=f(d);if(p(e))return c({name:"unalias",summary:"remove alias definitions",usage:"unalias name [name ...]",options:["-a remove all aliases"," --help display this help and exit"]});if(e.length===0)return{stdout:r(),stderr:i(`unalias: usage: unalias [-a] name [name ...]
5
+ `),exitCode:1};if(e[0]==="-a"){for(let t of a.env.keys())t.startsWith(l)&&a.env.delete(t);return{stdout:r(),stderr:r(),exitCode:0}}let u=e[0]==="--"?e.slice(1):e,s=!1,n="";for(let t of u){let o=l+t;a.env.get(o)?a.env.delete(o):(n+=`unalias: ${t}: not found
6
+ `,s=!0)}return{stdout:r(),stderr:i(n),exitCode:s?1:0}}},F={name:"alias",flags:[]},k={name:"unalias",flags:[{flag:"-a",type:"boolean"}]};export{C as a,A as b,F as c,k as d};
@@ -0,0 +1,35 @@
1
+ import{a as E,b as T}from"./chunk-WPPIJX5K.js";import{b as d,f as a,g as q,h as x}from"./chunk-KL7SL7ES.js";import{k as S}from"./chunk-DEQBZDPB.js";import{existsSync as g}from"node:fs";import{dirname as _,join as w}from"node:path";import{fileURLToPath as z}from"node:url";import{Worker as X}from"node:worker_threads";import Y from"sql.js";function L(e,t,r){switch(r.mode){case"list":return P(e,t,r);case"csv":return I(e,t,r);case"json":return N(e,t);case"line":return R(e,t,r);case"column":return F(e,t,r);case"table":return Q(e,t,r);case"markdown":return B(e,t,r);case"tabs":return U(e,t,r);case"box":return D(e,t,r);case"quote":return H(e,t,r);case"html":return J(e,t,r);case"ascii":return W(e,t,r)}}function c(e,t){return e==null?t:e instanceof Uint8Array||Buffer.isBuffer(e)?Buffer.from(e).toString("utf8"):typeof e=="number"&&!Number.isInteger(e)?e.toPrecision(17).replace(/\.?0+$/,""):String(e)}function P(e,t,r){let n=[];r.header&&e.length>0&&n.push(e.join(r.separator));for(let s of t)n.push(s.map(o=>c(o,r.nullValue)).join(r.separator));return n.length>0?`${n.join(r.newline)}${r.newline}`:""}function I(e,t,r){let n=[];r.header&&e.length>0&&n.push(e.map(C).join(","));for(let s of t)n.push(s.map(o=>C(c(o,r.nullValue))).join(","));return n.length>0?`${n.join(`
2
+ `)}
3
+ `:""}function C(e){return e.includes(",")||e.includes('"')||e.includes("'")||e.includes(`
4
+ `)?`"${e.replace(/"/g,'""')}"`:e}function k(e){return e.toPrecision(17).replace(/\.?0+$/,"")}function M(e){return e===null?"null":typeof e=="number"?Number.isInteger(e)?String(e):k(e):JSON.stringify(e)}function N(e,t){return t.length===0?"":`[${t.map(n=>`{${e.map((o,l)=>`${JSON.stringify(o)}:${M(n[l])}`).join(",")}}`).join(`,
5
+ `)}]
6
+ `}function R(e,t,r){if(e.length===0||t.length===0)return"";let n=Math.max(5,...e.map(o=>o.length)),s=[];for(let o of t)for(let l=0;l<e.length;l++){let i=e[l].padStart(n);s.push(`${i} = ${c(o[l],r.nullValue)}`)}return`${s.join(`
7
+ `)}
8
+ `}function F(e,t,r){if(e.length===0)return"";let n=e.map(o=>o.length);for(let o of t)for(let l=0;l<o.length;l++){let i=c(o[l],r.nullValue).length;i>n[l]&&(n[l]=i)}let s=[];r.header&&(s.push(e.map((o,l)=>o.padEnd(n[l])).join(" ")),s.push(n.map(o=>"-".repeat(o)).join(" ")));for(let o of t)s.push(o.map((l,i)=>c(l,r.nullValue).padEnd(n[i])).join(" "));return s.length>0?`${s.join(`
9
+ `)}
10
+ `:""}function Q(e,t,r){if(e.length===0)return"";let n=e.map(l=>l.length);for(let l of t)for(let i=0;i<l.length;i++){let f=c(l[i],r.nullValue).length;f>n[i]&&(n[i]=f)}let s=[],o=`+${n.map(l=>"-".repeat(l+2)).join("+")}+`;s.push(o),r.header&&(s.push(`| ${e.map((l,i)=>l.padEnd(n[i])).join(" | ")} |`),s.push(o));for(let l of t)s.push(`| ${l.map((i,f)=>c(i,r.nullValue).padEnd(n[f])).join(" | ")} |`);return s.push(o),`${s.join(`
11
+ `)}
12
+ `}function B(e,t,r){if(e.length===0)return"";let n=[];r.header&&(n.push(`| ${e.join(" | ")} |`),n.push(`|${e.map(()=>"---").join("|")}|`));for(let s of t)n.push(`| ${s.map(o=>c(o,r.nullValue)).join(" | ")} |`);return n.length>0?`${n.join(`
13
+ `)}
14
+ `:""}function U(e,t,r){let n=[];r.header&&e.length>0&&n.push(e.join(" "));for(let s of t)n.push(s.map(o=>c(o,r.nullValue)).join(" "));return n.length>0?`${n.join(r.newline)}${r.newline}`:""}function D(e,t,r){if(e.length===0)return"";let n=e.map(o=>o.length);for(let o of t)for(let l=0;l<o.length;l++){let i=c(o[l],r.nullValue).length;i>n[l]&&(n[l]=i)}let s=[];s.push(`\u250C${n.map(o=>"\u2500".repeat(o+2)).join("\u252C")}\u2510`),s.push(`\u2502 ${e.map((o,l)=>o.padEnd(n[l])).join(" \u2502 ")} \u2502`),s.push(`\u251C${n.map(o=>"\u2500".repeat(o+2)).join("\u253C")}\u2524`);for(let o of t)s.push(`\u2502 ${o.map((l,i)=>c(l,r.nullValue).padEnd(n[i])).join(" \u2502 ")} \u2502`);return s.push(`\u2514${n.map(o=>"\u2500".repeat(o+2)).join("\u2534")}\u2518`),`${s.join(`
15
+ `)}
16
+ `}function H(e,t,r){let n=[];r.header&&e.length>0&&n.push(e.map(s=>`'${s}'`).join(","));for(let s of t)n.push(s.map(o=>o==null?"NULL":typeof o=="number"?Number.isInteger(o)?String(o):k(o):`'${String(o)}'`).join(","));return n.length>0?`${n.join(r.newline)}${r.newline}`:""}function J(e,t,r){let n=[];r.header&&e.length>0&&(n.push(`<TR>${e.map(s=>`<TH>${y(s)}</TH>`).join("")}`),n.push("</TR>"));for(let s of t)n.push(`<TR>${s.map(o=>`<TD>${y(c(o,r.nullValue))}</TD>`).join("")}`),n.push("</TR>");return n.length>0?`${n.join(`
17
+ `)}
18
+ `:""}function y(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function W(e,t,r){let o=[];r.header&&e.length>0&&o.push(e.join(""));for(let l of t)o.push(l.map(i=>c(i,r.nullValue)).join(""));return o.length>0?o.join("")+"":""}var G=5e3,K={name:"sqlite3",summary:"SQLite database CLI",usage:"sqlite3 [OPTIONS] DATABASE [SQL]",options:["-list output in list mode (default)","-csv output in CSV mode","-json output in JSON mode","-line output in line mode","-column output in column mode","-table output as ASCII table","-markdown output as markdown table","-tabs output in tab-separated mode","-box output in Unicode box mode","-quote output in SQL quote mode","-html output as HTML table","-ascii output in ASCII mode (control chars)","-header show column headers","-noheader hide column headers","-separator SEP field separator for list mode (default: |)","-newline SEP row separator (default: \\n)","-nullvalue TEXT text for NULL values (default: empty)","-readonly open database read-only (no writeback)","-bail stop on first error","-echo print SQL before execution","-cmd COMMAND run SQL command before main SQL","-version show SQLite version","-- end of options","--help show this help"],examples:['sqlite3 :memory: "CREATE TABLE t(x); INSERT INTO t VALUES(1); SELECT * FROM t"','sqlite3 -json data.db "SELECT * FROM users"','sqlite3 -csv -header data.db "SELECT id, name FROM products"','sqlite3 -box data.db "SELECT * FROM users"']};function Z(e){let t={mode:"list",header:!1,separator:"|",newline:`
19
+ `,nullValue:"",readonly:!1,bail:!1,echo:!1,cmd:null},r=null,n=null,s=!1,o=!1;for(let l=0;l<e.length;l++){let i=e[l];if(o){r===null?r=i:n===null&&(n=i);continue}if(i==="--")o=!0;else if(i==="-version")s=!0;else if(i==="-list")t.mode="list";else if(i==="-csv")t.mode="csv";else if(i==="-json")t.mode="json";else if(i==="-line")t.mode="line";else if(i==="-column")t.mode="column";else if(i==="-table")t.mode="table";else if(i==="-markdown")t.mode="markdown";else if(i==="-tabs")t.mode="tabs";else if(i==="-box")t.mode="box";else if(i==="-quote")t.mode="quote";else if(i==="-html")t.mode="html";else if(i==="-ascii")t.mode="ascii";else if(i==="-header")t.header=!0;else if(i==="-noheader")t.header=!1;else if(i==="-readonly")t.readonly=!0;else if(i==="-bail")t.bail=!0;else if(i==="-echo")t.echo=!0;else if(i==="-separator"){if(l+1>=e.length)return{stdout:d(),stderr:a(`sqlite3: Error: missing argument to -separator
20
+ `),exitCode:1};t.separator=e[++l]}else if(i==="-newline"){if(l+1>=e.length)return{stdout:d(),stderr:a(`sqlite3: Error: missing argument to -newline
21
+ `),exitCode:1};t.newline=e[++l]}else if(i==="-nullvalue"){if(l+1>=e.length)return{stdout:d(),stderr:a(`sqlite3: Error: missing argument to -nullvalue
22
+ `),exitCode:1};t.nullValue=e[++l]}else if(i==="-cmd"){if(l+1>=e.length)return{stdout:d(),stderr:a(`sqlite3: Error: missing argument to -cmd
23
+ `),exitCode:1};t.cmd=e[++l]}else if(i.startsWith("-")){let f=i.startsWith("--")?i.slice(1):i;return{stdout:d(),stderr:a(`sqlite3: Error: unknown option: ${f}
24
+ Use -help for a list of options.
25
+ `),exitCode:1}}else r===null?r=i:n===null&&(n=i)}return{options:t,database:r,sql:n,showVersion:s}}async function v(){let e=await Y(),t=new e.Database;try{let r=t.exec("SELECT sqlite_version()");return r.length>0&&r[0].values.length>0?String(r[0].values[0][0]):"unknown"}finally{t.close()}}function ee(){let e=_(z(import.meta.url)),t=w(e,"../../commands/sqlite3/worker.js");if(g(t))return t;let r=w(e,"worker.js");if(g(r))return r;let n=w(e,"../../../dist/commands/sqlite3/worker.js");if(g(n))return n;throw new Error("sqlite3 worker not found. Run 'pnpm build' to compile the worker.")}async function te(e,t){try{let r=ee();return await new Promise((n,s)=>{let o=new X(r,{workerData:e}),l=setTimeout(()=>{o.terminate(),n({success:!1,error:`Query timeout: execution exceeded ${t}ms limit`})},t);o.on("message",i=>{clearTimeout(l),n(i)}),o.on("error",i=>{clearTimeout(l),s(i)}),o.on("exit",i=>{clearTimeout(l),i!==0&&n({success:!1,error:`Worker exited with code ${i}`})})})}catch(r){throw new Error(`sqlite3 worker failed to load: ${r.message}`)}}var ce={name:"sqlite3",async execute(e,t){let r=S(e);if(T(r)||r.includes("-help"))return E(K);let n=Z(r);if("exitCode"in n)return n;let{options:s,database:o,sql:l,showVersion:i}=n;if(i){let u=await v();return{stdout:a(`${u}
26
+ `),stderr:d(),exitCode:0}}if(!o)return{stdout:d(),stderr:a(`sqlite3: missing database argument
27
+ `),exitCode:1};let f=l||(await x(t.stdin)).trim();if(s.cmd&&(f=s.cmd+(f?`; ${f}`:"")),!f)return{stdout:d(),stderr:a(`sqlite3: no SQL provided
28
+ `),exitCode:1};let b=o===":memory:",p="",$=null;try{b||(p=t.fs.resolvePath(t.cwd,o),await t.fs.exists(p)&&($=await q(await t.fs.readFile(p))))}catch(u){return{stdout:d(),stderr:a(`sqlite3: unable to open database "${o}": ${u.message}
29
+ `),exitCode:1}}let V=t.limits?.maxSqliteTimeoutMs??G,O={dbBuffer:$,sql:f,options:{bail:s.bail,echo:s.echo}},m;try{m=await te(O,V)}catch(u){return{stdout:d(),stderr:a(`sqlite3: worker error: ${u.message}
30
+ `),exitCode:1}}if(!m.success)return{stdout:d(),stderr:a(`sqlite3: ${m.error}
31
+ `),exitCode:1};let A={mode:s.mode,header:s.header,separator:s.separator,newline:s.newline,nullValue:s.nullValue},h="";s.echo&&(h+=`${f}
32
+ `);let j=!1;for(let u of m.results)if(u.type==="error"){if(s.bail)return{stdout:a(h),stderr:a(`Error: ${u.error}
33
+ `),exitCode:1};h+=`Error: ${u.error}
34
+ `,j=!0}else u.columns&&u.rows&&(u.rows.length>0||s.header)&&(h+=L(u.columns,u.rows,A));if(m.hasModifications&&!s.readonly&&!b&&p&&m.dbBuffer)try{await t.fs.writeFile(p,m.dbBuffer)}catch(u){return{stdout:a(h),stderr:a(`sqlite3: failed to write database: ${u.message}
35
+ `),exitCode:1}}return{stdout:a(h),stderr:d(),exitCode:j&&s.bail?1:0}}},he={name:"sqlite3",flags:[],needsArgs:!0};export{ce as a,he as b};
@@ -0,0 +1,22 @@
1
+ import{b as s,f as o}from"./chunk-KL7SL7ES.js";function p(t){let e=`${t.name} - ${t.summary}
2
+
3
+ `;if(e+=`Usage: ${t.usage}
4
+ `,t.description){if(e+=`
5
+ Description:
6
+ `,typeof t.description=="string")for(let n of t.description.split(`
7
+ `))e+=n?` ${n}
8
+ `:`
9
+ `;else if(t.description.length>0)for(let n of t.description)e+=n?` ${n}
10
+ `:`
11
+ `}if(t.options&&t.options.length>0){e+=`
12
+ Options:
13
+ `;for(let n of t.options)e+=` ${n}
14
+ `}if(t.examples&&t.examples.length>0){e+=`
15
+ Examples:
16
+ `;for(let n of t.examples)e+=` ${n}
17
+ `}if(t.notes&&t.notes.length>0){e+=`
18
+ Notes:
19
+ `;for(let n of t.notes)e+=` ${n}
20
+ `}return{stdout:o(e),stderr:s(),exitCode:0}}function i(t){return t.includes("--help")}function l(t,e){let n=e.startsWith("--")?`${t}: unrecognized option '${e}'
21
+ `:`${t}: invalid option -- '${e.replace(/^-/,"")}'
22
+ `;return{stdout:s(),stderr:o(n),exitCode:1}}export{p as a,i as b,l as c};
@@ -0,0 +1,32 @@
1
+ import{a as q,b as H,c as V}from"./chunk-JZLKE4XX.js";import{a as M}from"./chunk-XYWNAVNS.js";import{a as G,b as U,c as O}from"./chunk-WPPIJX5K.js";import{b as g,f as v,g as E,h as L}from"./chunk-KL7SL7ES.js";import{k as B}from"./chunk-DEQBZDPB.js";var Z={js:{extensions:[".js",".mjs",".cjs",".jsx"],globs:[]},ts:{extensions:[".ts",".tsx",".mts",".cts"],globs:[]},html:{extensions:[".html",".htm",".xhtml"],globs:[]},css:{extensions:[".css",".scss",".sass",".less"],globs:[]},json:{extensions:[".json",".jsonc",".json5"],globs:[]},xml:{extensions:[".xml",".xsl",".xslt"],globs:[]},c:{extensions:[".c",".h"],globs:[]},cpp:{extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx",".h"],globs:[]},rust:{extensions:[".rs"],globs:[]},go:{extensions:[".go"],globs:[]},zig:{extensions:[".zig"],globs:[]},java:{extensions:[".java"],globs:[]},kotlin:{extensions:[".kt",".kts"],globs:[]},scala:{extensions:[".scala",".sc"],globs:[]},clojure:{extensions:[".clj",".cljc",".cljs",".edn"],globs:[]},py:{extensions:[".py",".pyi",".pyw"],globs:[]},rb:{extensions:[".rb",".rake",".gemspec"],globs:["Rakefile","Gemfile"]},php:{extensions:[".php",".phtml",".php3",".php4",".php5"],globs:[]},perl:{extensions:[".pl",".pm",".pod",".t"],globs:[]},lua:{extensions:[".lua"],globs:[]},sh:{extensions:[".sh",".bash",".zsh",".fish"],globs:[".bashrc",".zshrc",".profile"]},bat:{extensions:[".bat",".cmd"],globs:[]},ps:{extensions:[".ps1",".psm1",".psd1"],globs:[]},yaml:{extensions:[".yaml",".yml"],globs:[]},toml:{extensions:[".toml"],globs:["Cargo.toml","pyproject.toml"]},ini:{extensions:[".ini",".cfg",".conf"],globs:[]},csv:{extensions:[".csv",".tsv"],globs:[]},md:{extensions:[".md",".mdx",".markdown",".mdown",".mkd"],globs:[]},markdown:{extensions:[".md",".mdx",".markdown",".mdown",".mkd"],globs:[]},rst:{extensions:[".rst"],globs:[]},txt:{extensions:[".txt",".text"],globs:[]},tex:{extensions:[".tex",".ltx",".sty",".cls"],globs:[]},sql:{extensions:[".sql"],globs:[]},graphql:{extensions:[".graphql",".gql"],globs:[]},proto:{extensions:[".proto"],globs:[]},make:{extensions:[".mk",".mak"],globs:["Makefile","GNUmakefile","makefile"]},docker:{extensions:[],globs:["Dockerfile","Dockerfile.*","*.dockerfile"]},tf:{extensions:[".tf",".tfvars"],globs:[]}},k=class{types;constructor(){this.types=new Map(Object.entries(Z).map(([t,n])=>[t,{extensions:[...n.extensions],globs:[...n.globs]}]))}addType(t){let n=t.indexOf(":");if(n===-1)return;let s=t.slice(0,n),r=t.slice(n+1);if(r.startsWith("include:")){let l=r.slice(8),i=this.types.get(l);if(i){let a=this.types.get(s)||{extensions:[],globs:[]};a.extensions.push(...i.extensions),a.globs.push(...i.globs),this.types.set(s,a)}}else{let l=this.types.get(s)||{extensions:[],globs:[]};if(r.startsWith("*.")&&!r.slice(2).includes("*")){let i=r.slice(1);l.extensions.includes(i)||l.extensions.push(i)}else l.globs.includes(r)||l.globs.push(r);this.types.set(s,l)}}clearType(t){let n=this.types.get(t);n&&(n.extensions=[],n.globs=[])}getType(t){return this.types.get(t)}getAllTypes(){return this.types}matchesType(t,n){let s=t.toLowerCase();for(let r of n){if(r==="all"){if(this.matchesAnyType(t))return!0;continue}let l=this.types.get(r);if(l){for(let i of l.extensions)if(s.endsWith(i))return!0;for(let i of l.globs)if(i.includes("*")){let a=i.replace(/\./g,"\\.").replace(/\*/g,".*");if(M(`^${a}$`,"i").test(t))return!0}else if(s===i.toLowerCase())return!0}}return!1}matchesAnyType(t){let n=t.toLowerCase();for(let s of this.types.values()){for(let r of s.extensions)if(n.endsWith(r))return!0;for(let r of s.globs)if(r.includes("*")){let l=r.replace(/\./g,"\\.").replace(/\*/g,".*");if(M(`^${l}$`,"i").test(t))return!0}else if(n===r.toLowerCase())return!0}return!1}};function J(){let e=[];for(let[t,n]of Object.entries(Z).sort()){let s=[];for(let r of n.extensions)s.push(`*${r}`);for(let r of n.globs)s.push(r);e.push(`${t}: ${s.join(", ")}`)}return`${e.join(`
2
+ `)}
3
+ `}function Y(){return{ignoreCase:!1,caseSensitive:!1,smartCase:!0,fixedStrings:!1,wordRegexp:!1,lineRegexp:!1,invertMatch:!1,multiline:!1,multilineDotall:!1,patterns:[],patternFiles:[],count:!1,countMatches:!1,files:!1,filesWithMatches:!1,filesWithoutMatch:!1,stats:!1,onlyMatching:!1,maxCount:0,lineNumber:!0,noFilename:!1,withFilename:!1,nullSeparator:!1,byteOffset:!1,column:!1,vimgrep:!1,replace:null,afterContext:0,beforeContext:0,contextSeparator:"--",quiet:!1,heading:!1,passthru:!1,includeZero:!1,sort:"path",json:!1,globs:[],iglobs:[],globCaseInsensitive:!1,types:[],typesNot:[],typeAdd:[],typeClear:[],hidden:!1,noIgnore:!1,noIgnoreDot:!1,noIgnoreVcs:!1,ignoreFiles:[],maxDepth:1/0,maxFilesize:0,followSymlinks:!1,searchZip:!1,searchBinary:!1,preprocessor:null,preprocessorGlobs:[]}}function re(e){let t=e.match(/^(\d+)([KMG])?$/i);if(!t)return 0;let n=parseInt(t[1],10);switch((t[2]||"").toUpperCase()){case"K":return n*1024;case"M":return n*1024*1024;case"G":return n*1024*1024*1024;default:return n}}function ie(e){return/^\d+[KMG]?$/i.test(e)?null:{stdout:g(),stderr:v(`rg: invalid --max-filesize value: ${e}
4
+ `),exitCode:1}}function K(e){return null}var X=[{short:"g",long:"glob",target:"globs",multi:!0},{long:"iglob",target:"iglobs",multi:!0},{short:"t",long:"type",target:"types",multi:!0,validate:K},{short:"T",long:"type-not",target:"typesNot",multi:!0,validate:K},{long:"type-add",target:"typeAdd",multi:!0},{long:"type-clear",target:"typeClear",multi:!0},{short:"m",long:"max-count",target:"maxCount",parse:parseInt},{short:"e",long:"regexp",target:"patterns",multi:!0},{short:"f",long:"file",target:"patternFiles",multi:!0},{short:"r",long:"replace",target:"replace"},{short:"d",long:"max-depth",target:"maxDepth",parse:parseInt},{long:"max-filesize",target:"maxFilesize",parse:re,validate:ie},{long:"context-separator",target:"contextSeparator"},{short:"j",long:"threads",target:"maxDepth",parse:()=>1/0},{long:"ignore-file",target:"ignoreFiles",multi:!0},{long:"pre",target:"preprocessor"},{long:"pre-glob",target:"preprocessorGlobs",multi:!0}],le=new Map([["i",e=>{e.ignoreCase=!0,e.caseSensitive=!1,e.smartCase=!1}],["--ignore-case",e=>{e.ignoreCase=!0,e.caseSensitive=!1,e.smartCase=!1}],["s",e=>{e.caseSensitive=!0,e.ignoreCase=!1,e.smartCase=!1}],["--case-sensitive",e=>{e.caseSensitive=!0,e.ignoreCase=!1,e.smartCase=!1}],["S",e=>{e.smartCase=!0,e.ignoreCase=!1,e.caseSensitive=!1}],["--smart-case",e=>{e.smartCase=!0,e.ignoreCase=!1,e.caseSensitive=!1}],["F",e=>{e.fixedStrings=!0}],["--fixed-strings",e=>{e.fixedStrings=!0}],["w",e=>{e.wordRegexp=!0}],["--word-regexp",e=>{e.wordRegexp=!0}],["x",e=>{e.lineRegexp=!0}],["--line-regexp",e=>{e.lineRegexp=!0}],["v",e=>{e.invertMatch=!0}],["--invert-match",e=>{e.invertMatch=!0}],["U",e=>{e.multiline=!0}],["--multiline",e=>{e.multiline=!0}],["--multiline-dotall",e=>{e.multilineDotall=!0,e.multiline=!0}],["c",e=>{e.count=!0}],["--count",e=>{e.count=!0}],["--count-matches",e=>{e.countMatches=!0}],["l",e=>{e.filesWithMatches=!0}],["--files",e=>{e.files=!0}],["--files-with-matches",e=>{e.filesWithMatches=!0}],["--files-without-match",e=>{e.filesWithoutMatch=!0}],["--stats",e=>{e.stats=!0}],["o",e=>{e.onlyMatching=!0}],["--only-matching",e=>{e.onlyMatching=!0}],["q",e=>{e.quiet=!0}],["--quiet",e=>{e.quiet=!0}],["N",e=>{e.lineNumber=!1}],["--no-line-number",e=>{e.lineNumber=!1}],["H",e=>{e.withFilename=!0}],["--with-filename",e=>{e.withFilename=!0}],["I",e=>{e.noFilename=!0}],["--no-filename",e=>{e.noFilename=!0}],["0",e=>{e.nullSeparator=!0}],["--null",e=>{e.nullSeparator=!0}],["b",e=>{e.byteOffset=!0}],["--byte-offset",e=>{e.byteOffset=!0}],["--column",e=>{e.column=!0,e.lineNumber=!0}],["--no-column",e=>{e.column=!1}],["--vimgrep",e=>{e.vimgrep=!0,e.column=!0,e.lineNumber=!0}],["--json",e=>{e.json=!0}],["--hidden",e=>{e.hidden=!0}],["--no-ignore",e=>{e.noIgnore=!0}],["--no-ignore-dot",e=>{e.noIgnoreDot=!0}],["--no-ignore-vcs",e=>{e.noIgnoreVcs=!0}],["L",e=>{e.followSymlinks=!0}],["--follow",e=>{e.followSymlinks=!0}],["z",e=>{e.searchZip=!0}],["--search-zip",e=>{e.searchZip=!0}],["a",e=>{e.searchBinary=!0}],["--text",e=>{e.searchBinary=!0}],["--heading",e=>{e.heading=!0}],["--passthru",e=>{e.passthru=!0}],["--include-zero",e=>{e.includeZero=!0}],["--glob-case-insensitive",e=>{e.globCaseInsensitive=!0}]]),oe=new Set(["n","--line-number"]);function ae(e){e.hidden?e.searchBinary=!0:e.noIgnore?e.hidden=!0:e.noIgnore=!0}function ce(e,t,n){let s=e[t];for(let r of X){if(s.startsWith(`--${r.long}=`)){let l=s.slice(`--${r.long}=`.length),i=P(n,r,l);return i?{newIndex:t,error:i}:{newIndex:t}}if(r.short&&s.startsWith(`-${r.short}`)&&s.length>2){let l=s.slice(2),i=P(n,r,l);return i?{newIndex:t,error:i}:{newIndex:t}}if(r.short&&s===`-${r.short}`||s===`--${r.long}`){if(t+1>=e.length)return null;let l=e[t+1],i=P(n,r,l);return i?{newIndex:t+1,error:i}:{newIndex:t+1}}}return null}function fe(e){return X.find(t=>t.short===e)}function P(e,t,n){if(t.validate){let r=t.validate(n);if(r)return r}let s=t.parse?t.parse(n):n;t.multi?e[t.target].push(s):e[t.target]=s}function ue(e,t){let n=e[t];if(n==="--sort"&&t+1<e.length){let s=e[t+1];if(s==="path"||s==="none")return{value:s,newIndex:t+1}}if(n.startsWith("--sort=")){let s=n.slice(7);if(s==="path"||s==="none")return{value:s,newIndex:t}}return null}function he(e,t){let n=e[t],s=n.match(/^-([ABC])(\d+)$/);return s?{flag:s[1],value:parseInt(s[2],10),newIndex:t}:(n==="-A"||n==="-B"||n==="-C")&&t+1<e.length?{flag:n[1],value:parseInt(e[t+1],10),newIndex:t+1}:null}function ge(e){let t=e.match(/^-m(\d+)$/);return t?parseInt(t[1],10):null}function Q(e){let t=Y(),n=null,s=[],r=-1,l=-1,i=-1,a=!1;for(let c=0;c<e.length;c++){let o=e[c];if(o.startsWith("-")&&o!=="-"){let u=he(e,c);if(u){let{flag:f,value:y,newIndex:w}=u;f==="A"?r=Math.max(r,y):f==="B"?l=Math.max(l,y):i=y,c=w;continue}let x=ge(o);if(x!==null){t.maxCount=x;continue}let m=ce(e,c,t);if(m){if(m.error)return{success:!1,error:m.error};c=m.newIndex;continue}let p=ue(e,c);if(p){t.sort=p.value,c=p.newIndex;continue}let C=o.startsWith("--")?[o]:o.slice(1).split(""),d=!1;for(let f of C){if(oe.has(f)){t.lineNumber=!0,a=!0;continue}if(f==="u"||f==="--unrestricted"){ae(t);continue}if(f==="P"||f==="--pcre2")return{success:!1,error:{stdout:g(),stderr:v(`rg: PCRE2 is not supported. Use standard regex syntax instead.
5
+ `),exitCode:1}};if(f.length===1){let w=fe(f);if(w){if(c+1>=e.length)return{success:!1,error:O("rg",`-${f}`)};let h=P(t,w,e[c+1]);if(h)return{success:!1,error:h};c++,d=!0;continue}}let y=le.get(f);if(y){y(t);continue}if(f.startsWith("--"))return{success:!1,error:O("rg",f)};if(f.length===1)return{success:!1,error:O("rg",`-${f}`)}}}else n===null&&t.patterns.length===0&&t.patternFiles.length===0?n=o:s.push(o)}return(r>=0||i>=0)&&(t.afterContext=Math.max(r>=0?r:0,i>=0?i:0)),(l>=0||i>=0)&&(t.beforeContext=Math.max(l>=0?l:0,i>=0?i:0)),n!==null&&t.patterns.push(n),(t.column||t.vimgrep)&&(a=!0),{success:!0,options:t,paths:s,explicitLineNumbers:a}}var N=class{patterns=[];basePath;constructor(t="/"){this.basePath=t}parse(t){let n=t.split(`
6
+ `);for(let s of n){let r=s.replace(/\s+$/,"");if(!r||r.startsWith("#"))continue;let l=!1;r.startsWith("!")&&(l=!0,r=r.slice(1));let i=!1;r.endsWith("/")&&(i=!0,r=r.slice(0,-1));let a=!1;r.startsWith("/")?(a=!0,r=r.slice(1)):r.includes("/")&&!r.startsWith("**/")&&(a=!0);let c=this.patternToRegex(r,a);this.patterns.push({pattern:s,regex:c,negated:l,directoryOnly:i,rooted:a})}}patternToRegex(t,n){let s="";n?s="^":s="(?:^|/)";let r=0;for(;r<t.length;){let l=t[r];if(l==="*")t[r+1]==="*"?t[r+2]==="/"?(s+="(?:.*/)?",r+=3):(r+2>=t.length,s+=".*",r+=2):(s+="[^/]*",r++);else if(l==="?")s+="[^/]",r++;else if(l==="["){let i=r+1;for(i<t.length&&t[i]==="!"&&i++,i<t.length&&t[i]==="]"&&i++;i<t.length&&t[i]!=="]";)i++;if(i<t.length){let a=t.slice(r,i+1);a.startsWith("[!")&&(a=`[^${a.slice(2)}`),s+=a,r=i+1}else s+="\\[",r++}else l==="/"?(s+="/",r++):(s+=l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r++)}return s+="(?:/.*)?$",M(s)}matches(t,n){let s=t.replace(/^\.\//,"");s=s.replace(/^\//,"");let r=!1;for(let l of this.patterns)l.directoryOnly&&!n||l.regex.test(s)&&(r=!l.negated);return r}isWhitelisted(t,n){let s=t.replace(/^\.\//,"");s=s.replace(/^\//,"");for(let r of this.patterns)if(!(r.directoryOnly&&!n)&&r.negated&&r.regex.test(s))return!0;return!1}getBasePath(){return this.basePath}},W=class{parsers=[];fs;skipDotIgnore;skipVcsIgnore;loadedDirs=new Set;constructor(t,n,s=!1,r=!1){this.fs=t,this.skipDotIgnore=s,this.skipVcsIgnore=r}async load(t){let n=[],s=t;for(;;){n.unshift(s);let l=this.fs.resolvePath(s,"..");if(l===s)break;s=l}let r=[];this.skipVcsIgnore||r.push(".gitignore"),this.skipDotIgnore||r.push(".rgignore",".ignore");for(let l of n){this.loadedDirs.add(l);for(let i of r){let a=this.fs.resolvePath(l,i);try{let c=await this.fs.readFileText(a),o=new N(l);o.parse(c),this.parsers.push(o)}catch{}}}}async loadForDirectory(t){if(this.loadedDirs.has(t))return;this.loadedDirs.add(t);let n=[];this.skipVcsIgnore||n.push(".gitignore"),this.skipDotIgnore||n.push(".rgignore",".ignore");for(let s of n){let r=this.fs.resolvePath(t,s);try{let l=await this.fs.readFileText(r),i=new N(t);i.parse(l),this.parsers.push(i)}catch{}}}addPatternsFromContent(t,n){let s=new N(n);s.parse(t),this.parsers.push(s)}matches(t,n){for(let s of this.parsers){let r=s.getBasePath();if(!t.startsWith(r))continue;let l=t.slice(r.length).replace(/^\//,"");if(s.matches(l,n))return!0}return!1}isWhitelisted(t,n){for(let s of this.parsers){let r=s.getBasePath();if(!t.startsWith(r))continue;let l=t.slice(r.length).replace(/^\//,"");if(s.isWhitelisted(l,n))return!0}return!1}static isCommonIgnored(t){return new Set(["node_modules",".git",".svn",".hg","__pycache__",".pytest_cache",".mypy_cache","venv",".venv",".next",".nuxt",".cargo"]).has(t)}};async function R(e,t,n=!1,s=!1,r=[]){let l=new W(e,t,n,s);await l.load(t);for(let i of r)try{let a=e.resolvePath(t,i),c=await e.readFileText(a);l.addPatternsFromContent(c,t)}catch{}return l}async function pe(e){return(await import("node:zlib")).gunzipSync(e)}function me(e){return e.length>=2&&e[0]===31&&e[1]===139}function de(e){let t=!1;for(let n=0;n<e.length;n++){let s=e[n];s==="["&&!t?t=!0:s==="]"&&t&&(t=!1)}return t?`rg: glob '${e}' has an unclosed character class`:null}async function ee(e){let{ctx:t,options:n,paths:s,explicitLineNumbers:r}=e;for(let f of n.globs){let y=f.startsWith("!")?f.slice(1):f,w=de(y);if(w)return{stdout:g(),stderr:v(`${w}
7
+ `),exitCode:1}}if(n.files){let f=[...n.patterns,...s];return be(t,f,n)}let l=[...n.patterns];for(let f of n.patternFiles)try{let y;if(f==="-")y=await L(t.stdin);else{let h=t.fs.resolvePath(t.cwd,f);y=await t.fs.readFileText(h)}let w=y.split(`
8
+ `).filter(h=>h.length>0);l.push(...w)}catch{return{stdout:g(),stderr:v(`rg: ${f}: No such file or directory
9
+ `),exitCode:2}}if(l.length===0)return n.patternFiles.length>0?{stdout:g(),stderr:g(),exitCode:1}:{stdout:g(),stderr:v(`rg: no pattern given
10
+ `),exitCode:2};let i=s.length===0?["."]:s,a=xe(n,l),c,o;try{let f=ye(l,n,a);c=f.regex,o=f.kResetGroup}catch{return{stdout:g(),stderr:v(`rg: invalid regex: ${l.join(", ")}
11
+ `),exitCode:2}}let u=null;n.noIgnore||(u=await R(t.fs,t.cwd,n.noIgnoreDot,n.noIgnoreVcs,n.ignoreFiles));let x=new k;for(let f of n.typeClear)x.clearType(f);for(let f of n.typeAdd)x.addType(f);let{files:m,singleExplicitFile:p}=await te(t,i,n,u,x);if(m.length===0)return{stdout:g(),stderr:g(),exitCode:1};let C=!n.noFilename&&(n.withFilename||!p||m.length>1),d=n.lineNumber;return r||(p&&m.length===1&&(d=!1),n.onlyMatching&&(d=!1)),Ce(t,m,c,n,C,d,o)}function xe(e,t){return e.caseSensitive?!1:e.ignoreCase?!0:e.smartCase?!t.some(n=>/[A-Z]/.test(n)):!1}function ye(e,t,n){let s;return e.length===1?s=e[0]:s=e.map(r=>t.fixedStrings?r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"):`(?:${r})`).join("|"),H(s,{mode:t.fixedStrings&&e.length===1?"fixed":"perl",ignoreCase:n,wholeWord:t.wordRegexp,lineRegexp:t.lineRegexp,multiline:t.multiline,multilineDotall:t.multilineDotall})}async function te(e,t,n,s,r){let l=[],i=0,a=0;for(let o of t){let u=e.fs.resolvePath(e.cwd,o);try{let x=await e.fs.stat(u);if(x.isFile){if(i++,n.maxFilesize>0&&x.size>n.maxFilesize)continue;ne(o,n,s,u,r)&&l.push(o)}else x.isDirectory&&(a++,await se(e,o,u,0,n,s,r,l))}catch{}}return{files:n.sort==="path"?l.sort():l,singleExplicitFile:i===1&&a===0}}async function se(e,t,n,s,r,l,i,a){if(!(s>=r.maxDepth)){l&&await l.loadForDirectory(n);try{let c=e.fs.readdirWithFileTypes?await e.fs.readdirWithFileTypes(n):(await e.fs.readdir(n)).map(o=>({name:o,isFile:void 0}));for(let o of c){let u=o.name;if(!r.noIgnore&&W.isCommonIgnored(u))continue;let x=u.startsWith("."),m=t==="."?u:t==="./"?`./${u}`:t.endsWith("/")?`${t}${u}`:`${t}/${u}`,p=e.fs.resolvePath(n,u),C,d,f=!1;if(o.isFile!==void 0&&"isDirectory"in o){let h=o;if(f=h.isSymbolicLink===!0,f&&!r.followSymlinks)continue;if(f&&r.followSymlinks)try{let b=await e.fs.stat(p);C=b.isFile,d=b.isDirectory}catch{continue}else C=h.isFile,d=h.isDirectory}else try{let h=e.fs.lstat?await e.fs.lstat(p):await e.fs.stat(p);if(f=h.isSymbolicLink===!0,f&&!r.followSymlinks)continue;let b=f&&r.followSymlinks?await e.fs.stat(p):h;C=b.isFile,d=b.isDirectory}catch{continue}if(!l?.matches(p,d)&&!(x&&!r.hidden&&!l?.isWhitelisted(p,d))){if(d)await se(e,m,p,s+1,r,l,i,a);else if(C){if(r.maxFilesize>0)try{if((await e.fs.stat(p)).size>r.maxFilesize)continue}catch{continue}ne(m,r,l,p,i)&&a.push(m)}}}}catch{}}}function ne(e,t,n,s,r){let l=e.split("/").pop()||e;if(n?.matches(s,!1)||t.types.length>0&&!r.matchesType(l,t.types)||t.typesNot.length>0&&r.matchesType(l,t.typesNot))return!1;if(t.globs.length>0){let i=t.globCaseInsensitive,a=t.globs.filter(o=>!o.startsWith("!")),c=t.globs.filter(o=>o.startsWith("!")).map(o=>o.slice(1));if(a.length>0){let o=!1;for(let u of a)if(S(l,u,i)||S(e,u,i)){o=!0;break}if(!o)return!1}for(let o of c)if(o.startsWith("/")){let u=o.slice(1);if(S(e,u,i))return!1}else if(S(l,o,i)||S(e,o,i))return!1}if(t.iglobs.length>0){let i=t.iglobs.filter(c=>!c.startsWith("!")),a=t.iglobs.filter(c=>c.startsWith("!")).map(c=>c.slice(1));if(i.length>0){let c=!1;for(let o of i)if(S(l,o,!0)||S(e,o,!0)){c=!0;break}if(!c)return!1}for(let c of a)if(c.startsWith("/")){let o=c.slice(1);if(S(e,o,!0))return!1}else if(S(l,c,!0)||S(e,c,!0))return!1}return!0}function S(e,t,n=!1){let s="^";for(let r=0;r<t.length;r++){let l=t[r];if(l==="*")t[r+1]==="*"?(s+=".*",r++):s+="[^/]*";else if(l==="?")s+="[^/]";else if(l==="["){let i=r+1;for(i<t.length&&t[i]==="!"&&i++,i<t.length&&t[i]==="]"&&i++;i<t.length&&t[i]!=="]";)i++;if(i<t.length){let a=t.slice(r,i+1);a.startsWith("[!")&&(a=`[^${a.slice(2)}`),s+=a,r=i}else s+="\\["}else s+=l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}return s+="$",M(s,n?"i":"").test(e)}async function be(e,t,n){let s=null;n.noIgnore||(s=await R(e.fs,e.cwd,n.noIgnoreDot,n.noIgnoreVcs,n.ignoreFiles));let r=new k;for(let o of n.typeClear)r.clearType(o);for(let o of n.typeAdd)r.addType(o);let l=t.length===0?["."]:t,{files:i}=await te(e,l,n,s,r);if(i.length===0)return{stdout:g(),stderr:g(),exitCode:1};if(n.quiet)return{stdout:g(),stderr:g(),exitCode:0};let a=n.nullSeparator?"\0":`
12
+ `,c=i.map(o=>o+a).join("");return{stdout:v(c),stderr:g(),exitCode:0}}function we(e,t){if(t.length===0)return!0;for(let n of t)if(S(e,n,!1))return!0;return!1}async function ve(e,t,n,s){try{if(s.preprocessor&&e.exec){let i=n.split("/").pop()||n;if(we(i,s.preprocessorGlobs)){let a=await e.exec(`${s.preprocessor} "${t}"`,{cwd:e.cwd});if(a.exitCode===0){let c=await L(a.stdout);if(c.length>0){let o=c.slice(0,8192);return{content:c,isBinary:o.includes("\0")}}}}}if(s.searchZip&&n.endsWith(".gz")){let i=await E(await e.fs.readFile(t));if(me(i))try{let a=await pe(i),c=new TextDecoder().decode(a),o=c.slice(0,8192);return{content:c,isBinary:o.includes("\0")}}catch{return null}}let r=await e.fs.readFileText(t),l=r.slice(0,8192);return{content:r,isBinary:l.includes("\0")}}catch{return null}}async function Ce(e,t,n,s,r,l,i){let a="",c=!1,o=[],u=0,x=0,m=0,p=50;e:for(let f=0;f<t.length;f+=p){let y=t.slice(f,f+p),w=await Promise.all(y.map(async h=>{let b=e.fs.resolvePath(e.cwd,h),I=await ve(e,b,h,s);if(!I)return null;let{content:F,isBinary:j}=I;if(m+=F.length,j&&!s.searchBinary)return null;let D=r&&!s.heading?h:"",T=q(F,n,{invertMatch:s.invertMatch,showLineNumbers:l,countOnly:s.count,countMatches:s.countMatches,filename:D,onlyMatching:s.onlyMatching,beforeContext:s.beforeContext,afterContext:s.afterContext,maxCount:s.maxCount,contextSeparator:s.contextSeparator,showColumn:s.column,vimgrep:s.vimgrep,showByteOffset:s.byteOffset,replace:s.replace!==null?V(s.replace):null,passthru:s.passthru,multiline:s.multiline,kResetGroup:i});return s.json&&T.matched?{file:h,result:T,content:F,isBinary:!1}:{file:h,result:T}}));for(let h of w){if(!h)continue;let{file:b,result:I}=h;if(I.matched){if(c=!0,x++,u+=I.matchCount,s.quiet&&!s.json)break e;if(s.json&&!s.quiet){let F=h.content||"";o.push(JSON.stringify({type:"begin",data:{path:{text:b}}}));let j=F.split(`
13
+ `);n.lastIndex=0;let D=0;for(let T=0;T<j.length;T++){let z=j[T];n.lastIndex=0;let A=[];for(let $=n.exec(z);$!==null;$=n.exec(z)){let _={match:{text:$[0]},start:$.index,end:$.index+$[0].length};s.replace!==null&&(_.replacement={text:s.replace}),A.push(_),$[0].length===0&&n.lastIndex++}if(A.length>0){let $={type:"match",data:{path:{text:b},lines:{text:`${z}
14
+ `},line_number:T+1,absolute_offset:D,submatches:A}};o.push(JSON.stringify($))}D+=z.length+1}o.push(JSON.stringify({type:"end",data:{path:{text:b},binary_offset:null,stats:{elapsed:{secs:0,nanos:0,human:"0s"},searches:1,searches_with_match:1,bytes_searched:F.length,bytes_printed:0,matched_lines:I.matchCount,matches:I.matchCount}}}))}else if(s.filesWithMatches){let F=s.nullSeparator?"\0":`
15
+ `;a+=`${b}${F}`}else s.filesWithoutMatch||(s.heading&&!s.noFilename&&(a+=`${b}
16
+ `),a+=I.output)}else if(s.filesWithoutMatch){let F=s.nullSeparator?"\0":`
17
+ `;a+=`${b}${F}`}else s.includeZero&&(s.count||s.countMatches)&&(a+=I.output)}}s.json&&(o.push(JSON.stringify({type:"summary",data:{elapsed_total:{secs:0,nanos:0,human:"0s"},stats:{elapsed:{secs:0,nanos:0,human:"0s"},searches:t.length,searches_with_match:x,bytes_searched:m,bytes_printed:0,matched_lines:u,matches:u}}})),a=`${o.join(`
18
+ `)}
19
+ `);let C=s.quiet&&!s.json?"":a;if(s.stats&&!s.json){let f=["",`${u} matches`,`${u} matched lines`,`${x} files contained matches`,`${t.length} files searched`,`${m} bytes searched`].join(`
20
+ `);C+=`${f}
21
+ `}let d;return s.filesWithoutMatch?d=a.length>0?0:1:d=c?0:1,{stdout:v(C),stderr:g(),exitCode:d}}var Se={name:"rg",summary:"recursively search for a pattern",usage:"rg [OPTIONS] PATTERN [PATH ...]",description:`rg (ripgrep) recursively searches directories for a regex pattern.
22
+ Unlike grep, rg is recursive by default and respects .gitignore files.
23
+
24
+ EXAMPLES:
25
+ rg foo Search for 'foo' in current directory
26
+ rg foo src/ Search in src/ directory
27
+ rg -i foo Case-insensitive search
28
+ rg -w foo Match whole words only
29
+ rg -t js foo Search only JavaScript files
30
+ rg -g '*.ts' foo Search files matching glob
31
+ rg --hidden foo Include hidden files
32
+ rg -l foo List files with matches only`,options:["-e, --regexp PATTERN search for PATTERN (can be used multiple times)","-f, --file FILE read patterns from FILE, one per line","-i, --ignore-case case-insensitive search","-s, --case-sensitive case-sensitive search (overrides smart-case)","-S, --smart-case smart case (default: case-insensitive unless pattern has uppercase)","-F, --fixed-strings treat pattern as literal string","-w, --word-regexp match whole words only","-x, --line-regexp match whole lines only","-v, --invert-match select non-matching lines","-r, --replace TEXT replace matches with TEXT","-c, --count print count of matching lines per file"," --count-matches print count of individual matches per file","-l, --files-with-matches print only file names with matches"," --files-without-match print file names without matches"," --files list files that would be searched","-o, --only-matching print only matching parts","-m, --max-count NUM stop after NUM matches per file","-q, --quiet suppress output, exit 0 on match"," --stats print search statistics","-n, --line-number print line numbers (default: on)","-N, --no-line-number do not print line numbers","-I, --no-filename suppress the prefixing of file names","-0, --null use NUL as filename separator","-b, --byte-offset show byte offset of each match"," --column show column number of first match"," --vimgrep show results in vimgrep format"," --json show results in JSON Lines format","-A NUM print NUM lines after each match","-B NUM print NUM lines before each match","-C NUM print NUM lines before and after each match"," --context-separator SEP separator for context groups (default: --)","-U, --multiline match patterns across lines","-z, --search-zip search in compressed files (gzip only)","-g, --glob GLOB include files matching GLOB","-t, --type TYPE only search files of TYPE (e.g., js, py, ts)","-T, --type-not TYPE exclude files of TYPE","-L, --follow follow symbolic links","-u, --unrestricted reduce filtering (-u: no ignore, -uu: +hidden, -uuu: +binary)","-a, --text search binary files as text"," --hidden search hidden files and directories"," --no-ignore don't respect .gitignore/.ignore files","-d, --max-depth NUM maximum search depth"," --sort TYPE sort files (path, none)"," --heading show file path above matches"," --passthru print all lines (non-matches use - separator)"," --include-zero include files with 0 matches in count output"," --type-list list all available file types"," --help display this help and exit"]},Ue={name:"rg",async execute(e,t){let n=B(e);if(U(n))return G(Se);if(n.includes("--type-list"))return{stdout:v(J()),stderr:g(),exitCode:0};let s=Q(n);return s.success?ee({ctx:t,options:s.options,paths:s.paths,explicitLineNumbers:s.explicitLineNumbers}):s.error}},He={name:"rg",flags:[{flag:"-i",type:"boolean"},{flag:"-s",type:"boolean"},{flag:"-S",type:"boolean"},{flag:"-F",type:"boolean"},{flag:"-w",type:"boolean"},{flag:"-x",type:"boolean"},{flag:"-v",type:"boolean"},{flag:"-c",type:"boolean"},{flag:"-l",type:"boolean"},{flag:"-o",type:"boolean"},{flag:"-n",type:"boolean"},{flag:"-N",type:"boolean"},{flag:"--hidden",type:"boolean"},{flag:"--no-ignore",type:"boolean"},{flag:"-m",type:"value",valueHint:"number"},{flag:"-A",type:"value",valueHint:"number"},{flag:"-B",type:"value",valueHint:"number"},{flag:"-C",type:"value",valueHint:"number"},{flag:"-g",type:"value",valueHint:"pattern"},{flag:"-t",type:"value",valueHint:"string"},{flag:"-T",type:"value",valueHint:"string"}],needsArgs:!0};export{Ue as a,He as b};
@@ -0,0 +1 @@
1
+ import{a as s}from"./chunk-KMDWD5I5.js";var a=s("sha1sum","sha1","compute SHA1 message digest"),m={name:"sha1sum",flags:[{flag:"-c",type:"boolean"}],needsFiles:!0};export{a,m as b};
@@ -0,0 +1,12 @@
1
+ import{a as E,b as H}from"./chunk-5JHQRYUS.js";import{a as z}from"./chunk-7B7AWU7X.js";import{k as q}from"./chunk-BX5K34KY.js";import{a as A,b as L,c as C}from"./chunk-WPPIJX5K.js";import{b as j,f as y,h as F}from"./chunk-KL7SL7ES.js";import{i as J,k as I,n as k}from"./chunk-DEQBZDPB.js";function M(s){let n=[],t=0,i=s.length;for(;t<i;){for(;t<i&&/\s/.test(s[t]);)t++;if(t>=i)break;let u=t,r=s[t];if(r==="{"||r==="["){let o=r,l=r==="{"?"}":"]",c=1,p=!1,d=!1;for(t++;t<i&&c>0;){let g=s[t];d?d=!1:g==="\\"?d=!0:g==='"'?p=!p:p||(g===o?c++:g===l&&c--),t++}if(c!==0)throw new Error(`Unexpected end of JSON input at position ${t} (unclosed ${o})`);n.push(JSON.parse(s.slice(u,t)))}else if(r==='"'){let o=!1;for(t++;t<i;){let l=s[t];if(o)o=!1;else if(l==="\\")o=!0;else if(l==='"'){t++;break}t++}n.push(JSON.parse(s.slice(u,t)))}else if(r==="-"||r>="0"&&r<="9"){for(;t<i&&/[\d.eE+-]/.test(s[t]);)t++;n.push(JSON.parse(s.slice(u,t)))}else if(s.slice(t,t+4)==="true")n.push(!0),t+=4;else if(s.slice(t,t+5)==="false")n.push(!1),t+=5;else if(s.slice(t,t+4)==="null")n.push(null),t+=4;else{let o=s.slice(t,t+10);throw new Error(`Invalid JSON at position ${u}: unexpected '${o.split(/\s/)[0]}'`)}}return n}var U={name:"jq",summary:"command-line JSON processor",usage:"jq [OPTIONS] FILTER [FILE]",options:["-r, --raw-output output strings without quotes","-c, --compact compact output (no pretty printing)","-e, --exit-status set exit status based on output","-s, --slurp read entire input into array","-n, --null-input don't read any input","-j, --join-output don't print newlines after each output","-a, --ascii force ASCII output","-S, --sort-keys sort object keys","-C, --color colorize output (ignored)","-M, --monochrome monochrome output (ignored)"," --tab use tabs for indentation"," --help display this help and exit"]};function S(s,n,t,i,u,r=0){if(s===null||s===void 0)return"null";if(typeof s=="boolean")return String(s);if(typeof s=="number")return Number.isFinite(s)?String(s):"null";if(typeof s=="string")return t?s:JSON.stringify(s);let o=u?" ":" ";if(Array.isArray(s))return s.length===0?"[]":n?`[${s.map(c=>S(c,!0,!1,i,u)).join(",")}]`:`[
2
+ ${s.map(c=>o.repeat(r+1)+S(c,!1,!1,i,u,r+1)).join(`,
3
+ `)}
4
+ ${o.repeat(r)}]`;if(typeof s=="object"){let l=Object.keys(s);return i&&(l=l.sort()),l.length===0?"{}":n?`{${l.map(p=>`${JSON.stringify(p)}:${S(s[p],!0,!1,i,u)}`).join(",")}}`:`{
5
+ ${l.map(p=>{let d=S(s[p],!1,!1,i,u,r+1);return`${o.repeat(r+1)}${JSON.stringify(p)}: ${d}`}).join(`,
6
+ `)}
7
+ ${o.repeat(r)}}`}return String(s)}var Q={name:"jq",async execute(s,n){let t=I(s);if(L(t))return A(U);let i=!1,u=!1,r=!1,o=!1,l=!1,c=!1,p=!1,d=!1,g=".",N=!1,h=[];for(let a=0;a<t.length;a++){let e=t[a];if(e==="-r"||e==="--raw-output")i=!0;else if(e==="-c"||e==="--compact-output")u=!0;else if(e==="-e"||e==="--exit-status")r=!0;else if(e==="-s"||e==="--slurp")o=!0;else if(e==="-n"||e==="--null-input")l=!0;else if(e==="-j"||e==="--join-output")c=!0;else if(!(e==="-a"||e==="--ascii")){if(e==="-S"||e==="--sort-keys")p=!0;else if(!(e==="-C"||e==="--color")){if(!(e==="-M"||e==="--monochrome"))if(e==="--tab")d=!0;else if(e==="-")h.push("-");else{if(e.startsWith("--"))return C("jq",e);if(e.startsWith("-")){for(let f of e.slice(1))if(f==="r")i=!0;else if(f==="c")u=!0;else if(f==="e")r=!0;else if(f==="s")o=!0;else if(f==="n")l=!0;else if(f==="j")c=!0;else if(f!=="a"){if(f==="S")p=!0;else if(f!=="C"){if(f!=="M")return C("jq",`-${f}`)}}}else N?h.push(e):(g=e,N=!0)}}}}let w=[];if(!l)if(h.length===0||h.length===1&&h[0]==="-")w.push({source:"stdin",content:await F(n.stdin)});else{let a=await z(n,h,{cmdName:"jq",stopOnError:!0});if(a.exitCode!==0)return{stdout:j(),stderr:y(a.stderr),exitCode:2};w=a.files.map(e=>({source:e.filename||"stdin",content:J(e.content)}))}try{let a=H(g),e=[],f={limits:n.limits?{maxIterations:n.limits.maxJqIterations}:void 0,env:k(n.env),coverage:n.coverage};if(l)e=E(null,a,f);else if(o){let m=[];for(let{content:x}of w){let O=x.trim();O&&m.push(...M(O))}e=E(m,a,f)}else for(let{content:m}of w){let x=m.trim();if(!x)continue;let O=M(x);for(let T of O)e.push(...E(T,a,f))}let V=e.map(m=>S(m,u,i,p,d)),B=c?"":`
8
+ `,$=V.join(B),b=n.limits?.maxStringLength;if(b!==void 0&&b>0&&$.length>b)throw new q(`jq: output size limit exceeded (${b} bytes)`,"string_length");let P=r&&(e.length===0||e.every(m=>m==null||m===!1))?1:0;return{stdout:y($?c?$:`${$}
9
+ `:""),stderr:j(),exitCode:P}}catch(a){if(a instanceof q)return{stdout:j(),stderr:y(`jq: ${a.message}
10
+ `),exitCode:q.EXIT_CODE};let e=a.message;return e.includes("Unknown function")?{stdout:j(),stderr:y(`jq: error: ${e}
11
+ `),exitCode:3}:{stdout:j(),stderr:y(`jq: parse error: ${e}
12
+ `),exitCode:5}}}},Z={name:"jq",flags:[{flag:"-r",type:"boolean"},{flag:"-c",type:"boolean"},{flag:"-e",type:"boolean"},{flag:"-s",type:"boolean"},{flag:"-n",type:"boolean"},{flag:"-j",type:"boolean"},{flag:"-S",type:"boolean"},{flag:"--tab",type:"boolean"}],stdinType:"json",needsArgs:!0};export{Q as a,Z as b};
@@ -0,0 +1,19 @@
1
+ import{a as F}from"./chunk-XGMYS2QC.js";import{a as M,b as D}from"./chunk-WPPIJX5K.js";import{b as m,f as y}from"./chunk-KL7SL7ES.js";import{k}from"./chunk-DEQBZDPB.js";var j={name:"tr",summary:"translate or delete characters",usage:"tr [OPTION]... SET1 [SET2]",options:["-c, -C, --complement use the complement of SET1","-d, --delete delete characters in SET1","-s, --squeeze-repeats squeeze repeated characters"," --help display this help and exit"],description:`SET syntax:
2
+ a-z character range
3
+ [:alnum:] all letters and digits
4
+ [:alpha:] all letters
5
+ [:digit:] all digits
6
+ [:lower:] all lowercase letters
7
+ [:upper:] all uppercase letters
8
+ [:space:] all whitespace
9
+ [:blank:] horizontal whitespace
10
+ [:punct:] all punctuation
11
+ [:print:] all printable characters
12
+ [:graph:] all printable characters except space
13
+ [:cntrl:] all control characters
14
+ [:xdigit:] all hexadecimal digits
15
+ \\n, \\t, \\r escape sequences`},v=new Map([["[:alnum:]","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"],["[:alpha:]","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"],["[:blank:]"," "],["[:cntrl:]",Array.from({length:32},(r,o)=>String.fromCharCode(o)).join("").concat("\x7F")],["[:digit:]","0123456789"],["[:graph:]",Array.from({length:94},(r,o)=>String.fromCharCode(33+o)).join("")],["[:lower:]","abcdefghijklmnopqrstuvwxyz"],["[:print:]",Array.from({length:95},(r,o)=>String.fromCharCode(32+o)).join("")],["[:punct:]","!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"],["[:space:]",`
16
+ \r\f\v`],["[:upper:]","ABCDEFGHIJKLMNOPQRSTUVWXYZ"],["[:xdigit:]","0123456789ABCDEFabcdef"]]);function R(r){let o="",e=0;for(;e<r.length;){if(r[e]==="["&&r[e+1]===":"){let n=!1;for(let[i,s]of v)if(r.slice(e).startsWith(i)){o+=s,e+=i.length,n=!0;break}if(n)continue}if(r[e]==="\\"&&e+1<r.length){let n=r[e+1];n==="n"?o+=`
17
+ `:n==="t"?o+=" ":n==="r"?o+="\r":o+=n,e+=2;continue}if(e+2<r.length&&r[e+1]==="-"){let n=r.charCodeAt(e),i=r.charCodeAt(e+2);for(let s=n;s<=i;s++)o+=String.fromCharCode(s);e+=3;continue}o+=r[e],e++}return o}var H={complement:{short:"c",long:"complement",type:"boolean"},complementUpper:{short:"C",type:"boolean"},delete:{short:"d",long:"delete",type:"boolean"},squeeze:{short:"s",long:"squeeze-repeats",type:"boolean"}},P={name:"tr",async execute(r,o){let e=k(r);if(D(e))return M(j);let n=F("tr",e,H);if(!n.ok)return n.error;let i=n.result.flags.complement||n.result.flags.complementUpper,s=n.result.flags.delete,p=n.result.flags.squeeze,u=n.result.positional;if(u.length<1)return{stdout:m(),stderr:y(`tr: missing operand
18
+ `),exitCode:1};if(!s&&!p&&u.length<2)return{stdout:m(),stderr:y(`tr: missing operand after SET1
19
+ `),exitCode:1};let h=R(u[0]),d=u.length>1?R(u[1]):"",w=a=>{let l=h.includes(a);return i?!l:l},C=null,x="";if(!s&&!(p&&u.length===1))if(i)x=d.length>0?d[d.length-1]:"";else{C=new Map;for(let a=0;a<h.length;a++){let l=a<d.length?d[a]:d[d.length-1];C.set(h[a],l)}}let b=new TextDecoder,T=new TextEncoder,g="",z=a=>{let l="";if(s){for(let t of a)w(t)||(l+=t);return l}if(p&&u.length===1){for(let t of a)w(t)&&t===g||(l+=t,g=t);return l}if(i)for(let t of a)l+=h.includes(t)?t:x;else{let t=C;for(let c of a)l+=t.get(c)??c}if(p){let t="";for(let c of l)d.includes(c)&&c===g||(t+=c,g=c);return t}return l},f=null,S=!1;return{stdout:new ReadableStream({async pull(a){for(f===null&&!S&&(f=o.stdin.getReader());;){if(S){let A=b.decode();if(A.length>0){let E=z(A);if(E.length>0){a.enqueue(T.encode(E));return}}a.close();return}let l=await f.read();if(l.done){S=!0,f.releaseLock(),f=null;continue}let t=l.value;if(!t||t.length===0)continue;let c=b.decode(t,{stream:!0}),q=z(c);if(q.length>0){a.enqueue(T.encode(q));return}}},async cancel(){if(f){try{await f.cancel()}catch{}f=null}}}),stderr:m(),exitCode:0}}},_={name:"tr",flags:[{flag:"-c",type:"boolean"},{flag:"-C",type:"boolean"},{flag:"-d",type:"boolean"},{flag:"-s",type:"boolean"}],stdinType:"text",needsArgs:!0};export{P as a,_ as b};