just-bash 3.0.1 → 3.0.2

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 (404) hide show
  1. package/CHANGELOG.md +63 -0
  2. package/README.md +11 -0
  3. package/dist/AGENTS.md +2 -0
  4. package/dist/bin/chunks/{awk2-RLMNTGI7.js → awk2-UFCNQFCV.js} +1 -1
  5. package/dist/bin/{shell/chunks/base64-RZRLGMB3.js → chunks/base64-EGKVQIBC.js} +1 -1
  6. package/dist/bin/{shell/chunks/bash-CLP24TE2.js → chunks/bash-BEG4JB7K.js} +1 -1
  7. package/dist/bin/{shell/chunks/cat-LQH5FSAR.js → chunks/cat-NBL6MU5H.js} +1 -1
  8. package/dist/bin/chunks/{chunk-KFMPGSUT.js → chunk-2ZAK22BG.js} +1 -1
  9. package/dist/bin/chunks/chunk-4BNS566Q.js +4 -0
  10. package/dist/bin/chunks/chunk-4J4UC7OD.js +17 -0
  11. package/dist/bin/{shell/chunks/chunk-IEXQTXU5.js → chunks/chunk-52FZYTIX.js} +4 -4
  12. package/dist/bin/{shell/chunks/chunk-EDTBGO7F.js → chunks/chunk-5KX5YUWT.js} +1 -1
  13. package/dist/bin/chunks/{chunk-XFFUAO3F.js → chunk-6FYCU7QB.js} +1 -1
  14. package/dist/bin/chunks/{chunk-PAYQNSZN.js → chunk-6JKLDBRW.js} +1 -1
  15. package/dist/bin/chunks/{chunk-22HCD466.js → chunk-7HK63L6Y.js} +1 -1
  16. package/dist/bin/chunks/chunk-7NDRU2ZN.js +5 -0
  17. package/dist/bin/{shell/chunks/chunk-IZGLHVBB.js → chunks/chunk-AFAD5U2A.js} +1 -1
  18. package/dist/bin/chunks/{chunk-LNNWMRCB.js → chunk-AZH64XMJ.js} +1 -1
  19. package/dist/bin/chunks/{chunk-6FSBHK6H.js → chunk-C6JOQKE2.js} +1 -1
  20. package/dist/bin/{shell/chunks/chunk-77MLOOQS.js → chunks/chunk-CX5CEEGI.js} +1 -1
  21. package/dist/bin/chunks/{chunk-NXVG64T3.js → chunk-D7YFPDMV.js} +1 -1
  22. package/dist/bin/chunks/chunk-DHIKZU63.js +3 -0
  23. package/dist/bin/chunks/{chunk-UR4CEP4Y.js → chunk-DWECIBLJ.js} +1 -1
  24. package/dist/bin/chunks/{chunk-C7ISPH7Y.js → chunk-FEENTUVZ.js} +1 -1
  25. package/dist/bin/chunks/{chunk-FVRXEJYQ.js → chunk-FJABJBIW.js} +2 -2
  26. package/dist/bin/chunks/{chunk-YOKQNNQO.js → chunk-FYCT4DWY.js} +1 -1
  27. package/dist/bin/chunks/{chunk-J7TUF2VI.js → chunk-G7ZWT7BT.js} +1 -1
  28. package/dist/bin/chunks/{chunk-XJ37N3S5.js → chunk-GTO74SFS.js} +1 -1
  29. package/dist/bin/{shell/chunks/chunk-L24QXM5S.js → chunks/chunk-GXX3QUMM.js} +1 -1
  30. package/dist/bin/chunks/chunk-HMCRB24D.js +15 -0
  31. package/dist/bin/chunks/{chunk-FKVQZWJQ.js → chunk-HWNCK5BB.js} +1 -1
  32. package/dist/bin/chunks/{chunk-V2RP73X4.js → chunk-IX7LKVVH.js} +1 -1
  33. package/dist/bin/{shell/chunks/chunk-JZW7NFK2.js → chunks/chunk-J7XTZ47D.js} +1 -1
  34. package/dist/bin/chunks/{chunk-3BYTCO2H.js → chunk-JDFKEXLG.js} +1 -1
  35. package/dist/bin/{shell/chunks/chunk-HN2DCT7T.js → chunks/chunk-JJC4ENJL.js} +1 -1
  36. package/dist/bin/{shell/chunks/chunk-F3WNDKOC.js → chunks/chunk-JSZBZ2XU.js} +1 -1
  37. package/dist/bin/{shell/chunks/chunk-UO5LOD7U.js → chunks/chunk-KMZUSEWI.js} +1 -1
  38. package/dist/bin/{shell/chunks/chunk-OPMLWMNH.js → chunks/chunk-KWCO3YXP.js} +1 -1
  39. package/dist/bin/{shell/chunks/chunk-LSQTB2QK.js → chunks/chunk-LMA4D2KK.js} +1 -1
  40. package/dist/bin/{shell/chunks/chunk-HL4ZS7TX.js → chunks/chunk-LX2H4DPL.js} +3 -3
  41. package/dist/bin/chunks/{chunk-X4MX6EHF.js → chunk-MP77TJMM.js} +1 -1
  42. package/dist/bin/{shell/chunks/chunk-F3GKANW3.js → chunks/chunk-MTK7VLZG.js} +1 -1
  43. package/dist/bin/chunks/chunk-N3FQJLPZ.js +17 -0
  44. package/dist/bin/{shell/chunks/chunk-2SVX7I5P.js → chunks/chunk-NMMVECGD.js} +1 -1
  45. package/dist/bin/chunks/{chunk-LAHBP3FW.js → chunk-NXYVRP6D.js} +1 -1
  46. package/dist/bin/chunks/{chunk-7UU7KPEM.js → chunk-OVVMB2JI.js} +1 -1
  47. package/dist/bin/chunks/{chunk-YY5PJR7O.js → chunk-OXZSG3ZZ.js} +1 -1
  48. package/dist/bin/chunks/chunk-PDS5TEMS.js +80 -0
  49. package/dist/bin/{shell/chunks/chunk-CAZ75E7E.js → chunks/chunk-PKE7GKU5.js} +1 -1
  50. package/dist/bin/{shell/chunks/chunk-7AYT3UKI.js → chunks/chunk-PSJORJRS.js} +1 -1
  51. package/dist/bin/chunks/{chunk-7NC4CPHS.js → chunk-R36DS2UF.js} +1 -1
  52. package/dist/bin/chunks/{chunk-2NRAWO6E.js → chunk-RKBWTGBZ.js} +1 -1
  53. package/dist/bin/{shell/chunks/chunk-LC6D27QJ.js → chunks/chunk-RVGYO2OU.js} +1 -1
  54. package/dist/bin/chunks/{chunk-SMSELHIY.js → chunk-SF2OLINE.js} +1 -1
  55. package/dist/bin/{shell/chunks/chunk-M65CQLJE.js → chunks/chunk-TIRU5FOD.js} +1 -1
  56. package/dist/bin/chunks/{chunk-BE4PARL3.js → chunk-TKYWUEON.js} +1 -1
  57. package/dist/bin/chunks/chunk-TYBXHT6W.js +10 -0
  58. package/dist/bin/chunks/chunk-UI7CV277.js +20 -0
  59. package/dist/bin/chunks/{chunk-KRRM5UCC.js → chunk-UNWZQG7U.js} +1 -1
  60. package/dist/bin/{shell/chunks/chunk-4KSZJAQK.js → chunks/chunk-W5OBQVJ2.js} +1 -1
  61. package/dist/bin/chunks/{chunk-JNUX75OX.js → chunk-WHUKZ3K3.js} +1 -1
  62. package/dist/bin/chunks/chunk-Y2IUEWQD.js +11 -0
  63. package/dist/bin/chunks/chunk-Y5OWCEDV.js +64 -0
  64. package/dist/bin/chunks/{chunk-H7JTIXAO.js → chunk-ZZP3RSWL.js} +1 -1
  65. package/dist/bin/chunks/{column-AQB3A3PJ.js → column-QLGOK3XM.js} +1 -1
  66. package/dist/bin/{shell/chunks/comm-Q4VDF6ZO.js → chunks/comm-PLYUTVP3.js} +1 -1
  67. package/dist/bin/chunks/curl-DCSPNPEW.js +27 -0
  68. package/dist/bin/chunks/{cut-ZI2HIAW7.js → cut-JNQTCQY7.js} +1 -1
  69. package/dist/bin/chunks/date-OFYBOAUE.js +3 -0
  70. package/dist/bin/{shell/chunks/diff-YDJ42RKS.js → chunks/diff-LZ4WRLIF.js} +1 -1
  71. package/dist/bin/chunks/{env-NY32PQJM.js → env-FNVYNLGB.js} +1 -1
  72. package/dist/bin/{shell/chunks/expand-YYSO35NS.js → chunks/expand-CB7FG7LQ.js} +1 -1
  73. package/dist/bin/chunks/{expansion-PPP6PD75.js → expansion-PCODPDNZ.js} +1 -1
  74. package/dist/bin/{shell/chunks/expr-7PLWSWZI.js → chunks/expr-6A2XZORA.js} +1 -1
  75. package/dist/bin/chunks/{find-P4DOE7CE.js → find-5OZWMYCV.js} +1 -1
  76. package/dist/bin/chunks/flag-coverage-H6NG6ZQL.js +3 -0
  77. package/dist/bin/{shell/chunks/fold-5MF7QZWQ.js → chunks/fold-7YEITA5L.js} +1 -1
  78. package/dist/bin/chunks/{grep-VAYCFO4O.js → grep-KKBXRB73.js} +1 -1
  79. package/dist/bin/chunks/{gzip-UGBQQKIH.js → gzip-ZJP5VIAQ.js} +1 -1
  80. package/dist/bin/chunks/{head-QNC2ZYDO.js → head-B6GFQHKF.js} +1 -1
  81. package/dist/bin/{shell/chunks/html-to-markdown-QEFY7XQR.js → chunks/html-to-markdown-3HJ7L7NL.js} +1 -1
  82. package/dist/bin/chunks/{join-EJ73DYTK.js → join-WRM6S6CO.js} +1 -1
  83. package/dist/bin/chunks/{jq-GGTKKMEN.js → jq-33GJJXTL.js} +1 -1
  84. package/dist/bin/chunks/{js-exec-BC6NI55L.js → js-exec-F7JAZ4ZQ.js} +1 -1
  85. package/dist/bin/chunks/js-exec-worker.js +214 -17
  86. package/dist/bin/chunks/{md5sum-MCVDIB35.js → md5sum-ZNYCDRQL.js} +1 -1
  87. package/dist/bin/{shell/chunks/nl-KUPLVCTS.js → chunks/nl-6TVYE4ZB.js} +1 -1
  88. package/dist/bin/{shell/chunks/od-YQ5ZUI2H.js → chunks/od-Y3E3QXOL.js} +1 -1
  89. package/dist/bin/{shell/chunks/paste-A5KKPWXX.js → chunks/paste-LYNFXXCM.js} +1 -1
  90. package/dist/bin/chunks/printf-MR3FXCDE.js +3 -0
  91. package/dist/bin/{shell/chunks/python3-BQWDPUBM.js → chunks/python3-R5OFWJIH.js} +1 -1
  92. package/dist/bin/{shell/chunks/rev-PYHOZ4D4.js → chunks/rev-AJECDD4L.js} +1 -1
  93. package/dist/bin/chunks/{rg-BGFMSIVK.js → rg-2YWJS6TE.js} +1 -1
  94. package/dist/bin/chunks/{sed-FWA634SN.js → sed-IGRH7EGG.js} +1 -1
  95. package/dist/bin/chunks/{sha1sum-4KF52U3Y.js → sha1sum-5QZSNFY3.js} +1 -1
  96. package/dist/bin/chunks/{sha256sum-6YEPULPX.js → sha256sum-DI7JAVAU.js} +1 -1
  97. package/dist/bin/{shell/chunks/sleep-QHAPNY3Q.js → chunks/sleep-RPGCUUGX.js} +1 -1
  98. package/dist/bin/{shell/chunks/sort-4C6WOKNK.js → chunks/sort-HQPAFL76.js} +1 -1
  99. package/dist/bin/chunks/{split-TV7NL7LA.js → split-F6FSB5KI.js} +1 -1
  100. package/dist/bin/chunks/{sqlite3-W777NCI4.js → sqlite3-7TRACAE7.js} +1 -1
  101. package/dist/bin/chunks/sqlite3-worker.js +3 -2
  102. package/dist/bin/chunks/{strings-MDD72LR6.js → strings-6PE3YMPO.js} +1 -1
  103. package/dist/bin/chunks/{tac-C2N4NQ6S.js → tac-NERJXVOM.js} +1 -1
  104. package/dist/bin/chunks/{tail-BCB5W6JC.js → tail-24F643A4.js} +1 -1
  105. package/dist/bin/chunks/tar-5HK3VMV2.js +3 -0
  106. package/dist/bin/chunks/{tee-UQHPO4OW.js → tee-5B7P2QRJ.js} +1 -1
  107. package/dist/bin/chunks/{time-ZPY52VT2.js → time-FN6VJGRS.js} +1 -1
  108. package/dist/bin/chunks/{timeout-5AX3ZS3X.js → timeout-ZARIAF3K.js} +1 -1
  109. package/dist/bin/{shell/chunks/tr-G7K6M6HP.js → chunks/tr-QQZYZ3CH.js} +1 -1
  110. package/dist/bin/chunks/{unexpand-QIR4EDPG.js → unexpand-3JWOSSBQ.js} +1 -1
  111. package/dist/bin/chunks/{uniq-I7PVFJR4.js → uniq-Q5UH5NL3.js} +1 -1
  112. package/dist/bin/{shell/chunks/wc-6NGWULAP.js → chunks/wc-4HXNTHY3.js} +1 -1
  113. package/dist/bin/chunks/worker.js +3 -2
  114. package/dist/bin/chunks/{xan-KX4VPXUN.js → xan-TSDTZVY3.js} +1 -1
  115. package/dist/bin/chunks/{xan-view-JXOZLJ7S.js → xan-view-XBMA362V.js} +1 -1
  116. package/dist/bin/chunks/{xargs-UWHPYLY7.js → xargs-VTFN762K.js} +1 -1
  117. package/dist/bin/chunks/{yq-GCDCJBKB.js → yq-KU5YTNAK.js} +1 -1
  118. package/dist/bin/just-bash.js +171 -170
  119. package/dist/bin/shell/chunks/{awk2-RLMNTGI7.js → awk2-UFCNQFCV.js} +1 -1
  120. package/dist/bin/{chunks/base64-RZRLGMB3.js → shell/chunks/base64-EGKVQIBC.js} +1 -1
  121. package/dist/bin/{chunks/bash-CLP24TE2.js → shell/chunks/bash-BEG4JB7K.js} +1 -1
  122. package/dist/bin/{chunks/cat-LQH5FSAR.js → shell/chunks/cat-NBL6MU5H.js} +1 -1
  123. package/dist/bin/shell/chunks/{chunk-KFMPGSUT.js → chunk-2ZAK22BG.js} +1 -1
  124. package/dist/bin/shell/chunks/chunk-4BNS566Q.js +4 -0
  125. package/dist/bin/shell/chunks/chunk-4J4UC7OD.js +17 -0
  126. package/dist/bin/{chunks/chunk-IEXQTXU5.js → shell/chunks/chunk-52FZYTIX.js} +4 -4
  127. package/dist/bin/{chunks/chunk-EDTBGO7F.js → shell/chunks/chunk-5KX5YUWT.js} +1 -1
  128. package/dist/bin/shell/chunks/{chunk-XFFUAO3F.js → chunk-6FYCU7QB.js} +1 -1
  129. package/dist/bin/shell/chunks/{chunk-PAYQNSZN.js → chunk-6JKLDBRW.js} +1 -1
  130. package/dist/bin/shell/chunks/{chunk-22HCD466.js → chunk-7HK63L6Y.js} +1 -1
  131. package/dist/bin/shell/chunks/chunk-7NDRU2ZN.js +5 -0
  132. package/dist/bin/{chunks/chunk-IZGLHVBB.js → shell/chunks/chunk-AFAD5U2A.js} +1 -1
  133. package/dist/bin/shell/chunks/{chunk-LNNWMRCB.js → chunk-AZH64XMJ.js} +1 -1
  134. package/dist/bin/shell/chunks/{chunk-6FSBHK6H.js → chunk-C6JOQKE2.js} +1 -1
  135. package/dist/bin/{chunks/chunk-77MLOOQS.js → shell/chunks/chunk-CX5CEEGI.js} +1 -1
  136. package/dist/bin/shell/chunks/{chunk-NXVG64T3.js → chunk-D7YFPDMV.js} +1 -1
  137. package/dist/bin/shell/chunks/chunk-DHIKZU63.js +3 -0
  138. package/dist/bin/shell/chunks/{chunk-UR4CEP4Y.js → chunk-DWECIBLJ.js} +1 -1
  139. package/dist/bin/shell/chunks/{chunk-C7ISPH7Y.js → chunk-FEENTUVZ.js} +1 -1
  140. package/dist/bin/shell/chunks/{chunk-FVRXEJYQ.js → chunk-FJABJBIW.js} +2 -2
  141. package/dist/bin/shell/chunks/{chunk-YOKQNNQO.js → chunk-FYCT4DWY.js} +1 -1
  142. package/dist/bin/shell/chunks/{chunk-J7TUF2VI.js → chunk-G7ZWT7BT.js} +1 -1
  143. package/dist/bin/shell/chunks/{chunk-XJ37N3S5.js → chunk-GTO74SFS.js} +1 -1
  144. package/dist/bin/{chunks/chunk-L24QXM5S.js → shell/chunks/chunk-GXX3QUMM.js} +1 -1
  145. package/dist/bin/shell/chunks/chunk-HMCRB24D.js +15 -0
  146. package/dist/bin/shell/chunks/{chunk-FKVQZWJQ.js → chunk-HWNCK5BB.js} +1 -1
  147. package/dist/bin/shell/chunks/{chunk-V2RP73X4.js → chunk-IX7LKVVH.js} +1 -1
  148. package/dist/bin/{chunks/chunk-JZW7NFK2.js → shell/chunks/chunk-J7XTZ47D.js} +1 -1
  149. package/dist/bin/shell/chunks/{chunk-3BYTCO2H.js → chunk-JDFKEXLG.js} +1 -1
  150. package/dist/bin/{chunks/chunk-HN2DCT7T.js → shell/chunks/chunk-JJC4ENJL.js} +1 -1
  151. package/dist/bin/{chunks/chunk-F3WNDKOC.js → shell/chunks/chunk-JSZBZ2XU.js} +1 -1
  152. package/dist/bin/{chunks/chunk-UO5LOD7U.js → shell/chunks/chunk-KMZUSEWI.js} +1 -1
  153. package/dist/bin/{chunks/chunk-OPMLWMNH.js → shell/chunks/chunk-KWCO3YXP.js} +1 -1
  154. package/dist/bin/{chunks/chunk-LSQTB2QK.js → shell/chunks/chunk-LMA4D2KK.js} +1 -1
  155. package/dist/bin/{chunks/chunk-HL4ZS7TX.js → shell/chunks/chunk-LX2H4DPL.js} +3 -3
  156. package/dist/bin/shell/chunks/{chunk-X4MX6EHF.js → chunk-MP77TJMM.js} +1 -1
  157. package/dist/bin/{chunks/chunk-F3GKANW3.js → shell/chunks/chunk-MTK7VLZG.js} +1 -1
  158. package/dist/bin/shell/chunks/chunk-N3FQJLPZ.js +17 -0
  159. package/dist/bin/{chunks/chunk-2SVX7I5P.js → shell/chunks/chunk-NMMVECGD.js} +1 -1
  160. package/dist/bin/shell/chunks/{chunk-LAHBP3FW.js → chunk-NXYVRP6D.js} +1 -1
  161. package/dist/bin/shell/chunks/{chunk-7UU7KPEM.js → chunk-OVVMB2JI.js} +1 -1
  162. package/dist/bin/shell/chunks/{chunk-YY5PJR7O.js → chunk-OXZSG3ZZ.js} +1 -1
  163. package/dist/bin/shell/chunks/chunk-PDS5TEMS.js +80 -0
  164. package/dist/bin/{chunks/chunk-CAZ75E7E.js → shell/chunks/chunk-PKE7GKU5.js} +1 -1
  165. package/dist/bin/{chunks/chunk-7AYT3UKI.js → shell/chunks/chunk-PSJORJRS.js} +1 -1
  166. package/dist/bin/shell/chunks/{chunk-7NC4CPHS.js → chunk-R36DS2UF.js} +1 -1
  167. package/dist/bin/shell/chunks/{chunk-2NRAWO6E.js → chunk-RKBWTGBZ.js} +1 -1
  168. package/dist/bin/{chunks/chunk-LC6D27QJ.js → shell/chunks/chunk-RVGYO2OU.js} +1 -1
  169. package/dist/bin/shell/chunks/{chunk-SMSELHIY.js → chunk-SF2OLINE.js} +1 -1
  170. package/dist/bin/{chunks/chunk-M65CQLJE.js → shell/chunks/chunk-TIRU5FOD.js} +1 -1
  171. package/dist/bin/shell/chunks/{chunk-BE4PARL3.js → chunk-TKYWUEON.js} +1 -1
  172. package/dist/bin/shell/chunks/chunk-TYBXHT6W.js +10 -0
  173. package/dist/bin/shell/chunks/chunk-UI7CV277.js +20 -0
  174. package/dist/bin/shell/chunks/{chunk-KRRM5UCC.js → chunk-UNWZQG7U.js} +1 -1
  175. package/dist/bin/{chunks/chunk-4KSZJAQK.js → shell/chunks/chunk-W5OBQVJ2.js} +1 -1
  176. package/dist/bin/shell/chunks/{chunk-JNUX75OX.js → chunk-WHUKZ3K3.js} +1 -1
  177. package/dist/bin/shell/chunks/chunk-Y2IUEWQD.js +11 -0
  178. package/dist/bin/shell/chunks/chunk-Y5OWCEDV.js +64 -0
  179. package/dist/bin/shell/chunks/{chunk-H7JTIXAO.js → chunk-ZZP3RSWL.js} +1 -1
  180. package/dist/bin/shell/chunks/{column-AQB3A3PJ.js → column-QLGOK3XM.js} +1 -1
  181. package/dist/bin/{chunks/comm-Q4VDF6ZO.js → shell/chunks/comm-PLYUTVP3.js} +1 -1
  182. package/dist/bin/shell/chunks/curl-DCSPNPEW.js +27 -0
  183. package/dist/bin/shell/chunks/{cut-ZI2HIAW7.js → cut-JNQTCQY7.js} +1 -1
  184. package/dist/bin/shell/chunks/date-OFYBOAUE.js +3 -0
  185. package/dist/bin/{chunks/diff-YDJ42RKS.js → shell/chunks/diff-LZ4WRLIF.js} +1 -1
  186. package/dist/bin/shell/chunks/{env-NY32PQJM.js → env-FNVYNLGB.js} +1 -1
  187. package/dist/bin/{chunks/expand-YYSO35NS.js → shell/chunks/expand-CB7FG7LQ.js} +1 -1
  188. package/dist/bin/shell/chunks/{expansion-PPP6PD75.js → expansion-PCODPDNZ.js} +1 -1
  189. package/dist/bin/{chunks/expr-7PLWSWZI.js → shell/chunks/expr-6A2XZORA.js} +1 -1
  190. package/dist/bin/shell/chunks/{find-P4DOE7CE.js → find-5OZWMYCV.js} +1 -1
  191. package/dist/bin/shell/chunks/flag-coverage-H6NG6ZQL.js +3 -0
  192. package/dist/bin/{chunks/fold-5MF7QZWQ.js → shell/chunks/fold-7YEITA5L.js} +1 -1
  193. package/dist/bin/shell/chunks/{grep-VAYCFO4O.js → grep-KKBXRB73.js} +1 -1
  194. package/dist/bin/shell/chunks/{gzip-UGBQQKIH.js → gzip-ZJP5VIAQ.js} +1 -1
  195. package/dist/bin/shell/chunks/{head-QNC2ZYDO.js → head-B6GFQHKF.js} +1 -1
  196. package/dist/bin/{chunks/html-to-markdown-QEFY7XQR.js → shell/chunks/html-to-markdown-3HJ7L7NL.js} +1 -1
  197. package/dist/bin/shell/chunks/{join-EJ73DYTK.js → join-WRM6S6CO.js} +1 -1
  198. package/dist/bin/shell/chunks/{jq-GGTKKMEN.js → jq-33GJJXTL.js} +1 -1
  199. package/dist/bin/shell/chunks/{js-exec-BC6NI55L.js → js-exec-F7JAZ4ZQ.js} +1 -1
  200. package/dist/bin/shell/chunks/{md5sum-MCVDIB35.js → md5sum-ZNYCDRQL.js} +1 -1
  201. package/dist/bin/{chunks/nl-KUPLVCTS.js → shell/chunks/nl-6TVYE4ZB.js} +1 -1
  202. package/dist/bin/{chunks/od-YQ5ZUI2H.js → shell/chunks/od-Y3E3QXOL.js} +1 -1
  203. package/dist/bin/{chunks/paste-A5KKPWXX.js → shell/chunks/paste-LYNFXXCM.js} +1 -1
  204. package/dist/bin/shell/chunks/printf-MR3FXCDE.js +3 -0
  205. package/dist/bin/{chunks/python3-BQWDPUBM.js → shell/chunks/python3-R5OFWJIH.js} +1 -1
  206. package/dist/bin/{chunks/rev-PYHOZ4D4.js → shell/chunks/rev-AJECDD4L.js} +1 -1
  207. package/dist/bin/shell/chunks/{rg-BGFMSIVK.js → rg-2YWJS6TE.js} +1 -1
  208. package/dist/bin/shell/chunks/{sed-FWA634SN.js → sed-IGRH7EGG.js} +1 -1
  209. package/dist/bin/shell/chunks/{sha1sum-4KF52U3Y.js → sha1sum-5QZSNFY3.js} +1 -1
  210. package/dist/bin/shell/chunks/{sha256sum-6YEPULPX.js → sha256sum-DI7JAVAU.js} +1 -1
  211. package/dist/bin/{chunks/sleep-QHAPNY3Q.js → shell/chunks/sleep-RPGCUUGX.js} +1 -1
  212. package/dist/bin/{chunks/sort-4C6WOKNK.js → shell/chunks/sort-HQPAFL76.js} +1 -1
  213. package/dist/bin/shell/chunks/{split-TV7NL7LA.js → split-F6FSB5KI.js} +1 -1
  214. package/dist/bin/shell/chunks/{sqlite3-W777NCI4.js → sqlite3-7TRACAE7.js} +1 -1
  215. package/dist/bin/shell/chunks/{strings-MDD72LR6.js → strings-6PE3YMPO.js} +1 -1
  216. package/dist/bin/shell/chunks/{tac-C2N4NQ6S.js → tac-NERJXVOM.js} +1 -1
  217. package/dist/bin/shell/chunks/{tail-BCB5W6JC.js → tail-24F643A4.js} +1 -1
  218. package/dist/bin/shell/chunks/tar-5HK3VMV2.js +3 -0
  219. package/dist/bin/shell/chunks/{tee-UQHPO4OW.js → tee-5B7P2QRJ.js} +1 -1
  220. package/dist/bin/shell/chunks/{time-ZPY52VT2.js → time-FN6VJGRS.js} +1 -1
  221. package/dist/bin/shell/chunks/{timeout-5AX3ZS3X.js → timeout-ZARIAF3K.js} +1 -1
  222. package/dist/bin/{chunks/tr-G7K6M6HP.js → shell/chunks/tr-QQZYZ3CH.js} +1 -1
  223. package/dist/bin/shell/chunks/{unexpand-QIR4EDPG.js → unexpand-3JWOSSBQ.js} +1 -1
  224. package/dist/bin/shell/chunks/{uniq-I7PVFJR4.js → uniq-Q5UH5NL3.js} +1 -1
  225. package/dist/bin/{chunks/wc-6NGWULAP.js → shell/chunks/wc-4HXNTHY3.js} +1 -1
  226. package/dist/bin/shell/chunks/{xan-KX4VPXUN.js → xan-TSDTZVY3.js} +1 -1
  227. package/dist/bin/shell/chunks/{xan-view-JXOZLJ7S.js → xan-view-XBMA362V.js} +1 -1
  228. package/dist/bin/shell/chunks/{xargs-UWHPYLY7.js → xargs-VTFN762K.js} +1 -1
  229. package/dist/bin/shell/chunks/{yq-GCDCJBKB.js → yq-KU5YTNAK.js} +1 -1
  230. package/dist/bin/shell/shell.js +170 -169
  231. package/dist/bundle/browser.js +646 -637
  232. package/dist/bundle/chunks/{awk2-LA3USKJP.js → awk2-SREAOJRG.js} +1 -1
  233. package/dist/bundle/chunks/{base64-C2AIWVNC.js → base64-WIGL46P3.js} +1 -1
  234. package/dist/bundle/chunks/{bash-YZ33HQZQ.js → bash-F4KHPMTX.js} +1 -1
  235. package/dist/bundle/chunks/{cat-TSFMZVYS.js → cat-LPZ6XNHG.js} +1 -1
  236. package/dist/bundle/chunks/{chunk-ICIEVHY5.js → chunk-55LZFN6S.js} +1 -1
  237. package/dist/bundle/chunks/{chunk-6VAT5Z2D.js → chunk-5MV7Q5QB.js} +1 -1
  238. package/dist/bundle/chunks/{chunk-UP6MSJGD.js → chunk-6L65G6A7.js} +1 -1
  239. package/dist/bundle/chunks/{chunk-GGC5NEPZ.js → chunk-6NYPZ4NX.js} +1 -1
  240. package/dist/bundle/chunks/{chunk-4RUAZWKT.js → chunk-7CSMHFIJ.js} +4 -4
  241. package/dist/bundle/chunks/{chunk-ACSZB4FE.js → chunk-AAGO7IQ5.js} +1 -1
  242. package/dist/bundle/chunks/chunk-AFQAPVZ3.js +16 -0
  243. package/dist/bundle/chunks/{chunk-5H5SCKJM.js → chunk-AX2X3SZS.js} +1 -1
  244. package/dist/bundle/chunks/{chunk-EBAPSGAO.js → chunk-AXMYAPFA.js} +1 -1
  245. package/dist/bundle/chunks/chunk-BU36VZYL.js +4 -0
  246. package/dist/bundle/chunks/{chunk-CBJVD2XA.js → chunk-CJFAMHFC.js} +1 -1
  247. package/dist/bundle/chunks/{chunk-GJC3WVOW.js → chunk-CQV3EITV.js} +1 -1
  248. package/dist/bundle/chunks/{chunk-Q7H5W7YE.js → chunk-DJ7QC6LC.js} +2 -2
  249. package/dist/bundle/chunks/{chunk-S3LEJEPP.js → chunk-DVJY2RAX.js} +1 -1
  250. package/dist/bundle/chunks/{chunk-N6DXJ2JN.js → chunk-EUCNMMRD.js} +1 -1
  251. package/dist/bundle/chunks/{chunk-GTQIUQM6.js → chunk-FLMHFDSN.js} +1 -1
  252. package/dist/bundle/chunks/chunk-GE6OQDB2.js +10 -0
  253. package/dist/bundle/chunks/{chunk-FW54FHZR.js → chunk-GHB6M7KA.js} +1 -1
  254. package/dist/bundle/chunks/{chunk-LNBPBRV4.js → chunk-GRQJA2J7.js} +1 -1
  255. package/dist/bundle/chunks/{chunk-R74UQCKX.js → chunk-H2TS57O5.js} +1 -1
  256. package/dist/bundle/chunks/{chunk-7JHM3L42.js → chunk-H7WISVP3.js} +1 -1
  257. package/dist/bundle/chunks/chunk-HAIOEUEV.js +63 -0
  258. package/dist/bundle/chunks/{chunk-46RN27KI.js → chunk-IZ6KBTV7.js} +1 -1
  259. package/dist/bundle/chunks/{chunk-T4TFLF3R.js → chunk-JTMQLUCH.js} +1 -1
  260. package/dist/bundle/chunks/{chunk-2JIPICV3.js → chunk-K5JMLDHX.js} +1 -1
  261. package/dist/bundle/chunks/{chunk-L64BMZUV.js → chunk-KAPG5ONA.js} +1 -1
  262. package/dist/bundle/chunks/chunk-KSBHIW2H.js +19 -0
  263. package/dist/bundle/chunks/{chunk-XHLMAZX2.js → chunk-KTL5PAHY.js} +1 -1
  264. package/dist/bundle/chunks/{chunk-YCLFEX4T.js → chunk-KTPCYKBB.js} +1 -1
  265. package/dist/bundle/chunks/chunk-LI6PTSPD.js +9 -0
  266. package/dist/bundle/chunks/{chunk-LEKBROJD.js → chunk-LZUPLYFM.js} +1 -1
  267. package/dist/bundle/chunks/{chunk-4N6J7B5P.js → chunk-MFRETFZB.js} +1 -1
  268. package/dist/bundle/chunks/{chunk-OVGANXCG.js → chunk-MIZIUC5M.js} +1 -1
  269. package/dist/bundle/chunks/chunk-MJLETYZI.js +14 -0
  270. package/dist/bundle/chunks/{chunk-VLCHOJWK.js → chunk-MTHXXA6H.js} +1 -1
  271. package/dist/bundle/chunks/{chunk-6LASZU3O.js → chunk-NGPDJCUE.js} +1 -1
  272. package/dist/bundle/chunks/{chunk-ZZKH2ELC.js → chunk-OVH44QKR.js} +1 -1
  273. package/dist/bundle/chunks/chunk-PDUL32DM.js +16 -0
  274. package/dist/bundle/chunks/{chunk-KD3KENL6.js → chunk-PYDWFCTN.js} +1 -1
  275. package/dist/bundle/chunks/{chunk-AQ6FYS2X.js → chunk-QAJKDPNS.js} +1 -1
  276. package/dist/bundle/chunks/{chunk-XCQWV4AU.js → chunk-R4QNMLOB.js} +1 -1
  277. package/dist/bundle/chunks/chunk-RBQG6ZUG.js +3 -0
  278. package/dist/bundle/chunks/{chunk-U73A73IE.js → chunk-RCXNPPJY.js} +1 -1
  279. package/dist/bundle/chunks/{chunk-S443BAN4.js → chunk-S2BIZAWY.js} +1 -1
  280. package/dist/bundle/chunks/chunk-STFC2ZJT.js +79 -0
  281. package/dist/bundle/chunks/{chunk-XRFHFXFP.js → chunk-SY4HAUHP.js} +1 -1
  282. package/dist/bundle/chunks/{chunk-FJK43EBQ.js → chunk-TA74ENH7.js} +1 -1
  283. package/dist/bundle/chunks/{chunk-OC35HPHG.js → chunk-TC2WHAIS.js} +1 -1
  284. package/dist/bundle/chunks/{chunk-TN7HHBQW.js → chunk-VACKIICN.js} +3 -3
  285. package/dist/bundle/chunks/{chunk-GSPYNYZA.js → chunk-VBLMIJON.js} +1 -1
  286. package/dist/bundle/chunks/{chunk-VPADYNBD.js → chunk-WKPK7M56.js} +1 -1
  287. package/dist/bundle/chunks/chunk-XEKXHOPO.js +2 -0
  288. package/dist/bundle/chunks/{chunk-BVKWRAS6.js → chunk-XPK7ZFVA.js} +1 -1
  289. package/dist/bundle/chunks/{chunk-FAXLQUCQ.js → chunk-XZUZRAAC.js} +1 -1
  290. package/dist/bundle/chunks/{chunk-HJBTD7PY.js → chunk-YRNR2VHY.js} +1 -1
  291. package/dist/bundle/chunks/{chunk-KATRCGLX.js → chunk-YWOZZRSK.js} +1 -1
  292. package/dist/bundle/chunks/{chunk-FX7KQCEA.js → chunk-Z3KJQD7F.js} +1 -1
  293. package/dist/bundle/chunks/{column-XT6UFXNQ.js → column-PVOEF65J.js} +1 -1
  294. package/dist/bundle/chunks/{comm-VV2LDX2J.js → comm-5QMYEAJL.js} +1 -1
  295. package/dist/bundle/chunks/curl-PAWGO3EH.js +26 -0
  296. package/dist/bundle/chunks/{cut-OKARJCCV.js → cut-NDMV7SPO.js} +1 -1
  297. package/dist/bundle/chunks/date-XKUEQ4WF.js +2 -0
  298. package/dist/bundle/chunks/{diff-MWJFIG7X.js → diff-TT4M7WM3.js} +1 -1
  299. package/dist/bundle/chunks/{env-36M5BO7M.js → env-DLFRY633.js} +1 -1
  300. package/dist/bundle/chunks/{expand-JSPG6VOP.js → expand-T2TH4TBQ.js} +1 -1
  301. package/dist/bundle/chunks/{expansion-R25BK4W3.js → expansion-CDGKP4VC.js} +1 -1
  302. package/dist/bundle/chunks/{expr-5JAACS4X.js → expr-YLACLCSM.js} +1 -1
  303. package/dist/bundle/chunks/find-T5TGGXUU.js +2 -0
  304. package/dist/bundle/chunks/flag-coverage-TRYUZMPS.js +2 -0
  305. package/dist/bundle/chunks/{fold-4TQNYMSW.js → fold-XR2JMFCW.js} +1 -1
  306. package/dist/bundle/chunks/{grep-V3LQVMRQ.js → grep-VUESTEZ7.js} +1 -1
  307. package/dist/bundle/chunks/{gzip-O5ASJAFY.js → gzip-HF3D26QX.js} +1 -1
  308. package/dist/bundle/chunks/{head-442HYESI.js → head-AEMOMQSZ.js} +1 -1
  309. package/dist/bundle/chunks/{html-to-markdown-JW4MSQZO.js → html-to-markdown-LXXMVQ3V.js} +1 -1
  310. package/dist/bundle/chunks/{join-TBRGI3LQ.js → join-YIABB6WR.js} +1 -1
  311. package/dist/bundle/chunks/{jq-4XLYLOS5.js → jq-3FAAQVR6.js} +1 -1
  312. package/dist/bundle/chunks/{js-exec-N5KEZBH7.js → js-exec-SR6IMNWM.js} +1 -1
  313. package/dist/bundle/chunks/js-exec-worker.js +214 -17
  314. package/dist/bundle/chunks/{md5sum-SPU24VSG.js → md5sum-LU7RVIB7.js} +1 -1
  315. package/dist/bundle/chunks/{nl-WSDW7I4O.js → nl-Q2L5XQWZ.js} +1 -1
  316. package/dist/bundle/chunks/{od-WOKFDJTP.js → od-RDSM4TQJ.js} +1 -1
  317. package/dist/bundle/chunks/{paste-7JC6S4DX.js → paste-ABCY7E6C.js} +1 -1
  318. package/dist/bundle/chunks/printf-JPOOWRJC.js +2 -0
  319. package/dist/bundle/chunks/{python3-POMOR4OA.js → python3-JPCH6LLN.js} +1 -1
  320. package/dist/bundle/chunks/{rev-5EHFX4EJ.js → rev-GCV6X22K.js} +1 -1
  321. package/dist/bundle/chunks/rg-N5WLPMSA.js +2 -0
  322. package/dist/bundle/chunks/{sed-S5UIK574.js → sed-DX2SGXMF.js} +1 -1
  323. package/dist/bundle/chunks/{sha1sum-2PTOAFR6.js → sha1sum-O6DM3TPQ.js} +1 -1
  324. package/dist/bundle/chunks/{sha256sum-NS7D3IXX.js → sha256sum-WPVZLZPS.js} +1 -1
  325. package/dist/bundle/chunks/{sleep-X22JJINO.js → sleep-HZ4QEFOK.js} +1 -1
  326. package/dist/bundle/chunks/{sort-SW2YEO5B.js → sort-VW2NIZHW.js} +1 -1
  327. package/dist/bundle/chunks/{split-4KKZZXXE.js → split-NBMH43M2.js} +1 -1
  328. package/dist/bundle/chunks/{sqlite3-CGOEFJAO.js → sqlite3-UE3PJTDQ.js} +1 -1
  329. package/dist/bundle/chunks/sqlite3-worker.js +3 -2
  330. package/dist/bundle/chunks/{strings-6WDHLGMX.js → strings-MCXFXPDL.js} +1 -1
  331. package/dist/bundle/chunks/{tac-2STMMJYW.js → tac-BQ7EDZW2.js} +1 -1
  332. package/dist/bundle/chunks/{tail-R4PCA2C4.js → tail-GJMTLMNE.js} +1 -1
  333. package/dist/bundle/chunks/tar-WIZ3PDF4.js +2 -0
  334. package/dist/bundle/chunks/{tee-YUZ2FKCJ.js → tee-SGANDVNY.js} +1 -1
  335. package/dist/bundle/chunks/{time-D4LNBSWX.js → time-FCZCDIAM.js} +1 -1
  336. package/dist/bundle/chunks/timeout-VDIEAB4R.js +2 -0
  337. package/dist/bundle/chunks/{tr-36LHWFRQ.js → tr-JNNR5JMS.js} +1 -1
  338. package/dist/bundle/chunks/{unexpand-CADSA4VO.js → unexpand-2TKXAENW.js} +1 -1
  339. package/dist/bundle/chunks/{uniq-XSIZR6PB.js → uniq-DMFKT3AB.js} +1 -1
  340. package/dist/bundle/chunks/{wc-LF7NU4LA.js → wc-TZFYWFLA.js} +1 -1
  341. package/dist/bundle/chunks/worker.js +3 -2
  342. package/dist/bundle/chunks/{xan-Y6WF3IRG.js → xan-U6654PZR.js} +1 -1
  343. package/dist/bundle/chunks/xan-view-YATJ4KAA.js +2 -0
  344. package/dist/bundle/chunks/{xargs-MGZPH7AX.js → xargs-VDP7DLOU.js} +1 -1
  345. package/dist/bundle/chunks/yq-ZBXLBSXV.js +2 -0
  346. package/dist/bundle/index.cjs +914 -905
  347. package/dist/bundle/index.js +215 -214
  348. package/dist/commands/curl/types.d.ts +29 -0
  349. package/dist/commands/js-exec/module-shims.d.ts +1 -1
  350. package/dist/commands/sqlite3/worker.js +3 -2
  351. package/dist/commands/tar/tar-options.d.ts +1 -1
  352. package/dist/encoding.d.ts +14 -0
  353. package/dist/parser/parser-substitution.d.ts +14 -0
  354. package/package.json +1 -1
  355. package/dist/bin/chunks/chunk-3UKQXBQ3.js +0 -6
  356. package/dist/bin/chunks/chunk-ALVEEXFD.js +0 -19
  357. package/dist/bin/chunks/chunk-BGX3RW7H.js +0 -10
  358. package/dist/bin/chunks/chunk-D6CPXGKK.js +0 -75
  359. package/dist/bin/chunks/chunk-FOUVACI7.js +0 -16
  360. package/dist/bin/chunks/chunk-Q4UMTSRO.js +0 -15
  361. package/dist/bin/chunks/chunk-UGJM7CKP.js +0 -17
  362. package/dist/bin/chunks/chunk-VBDLSL7Y.js +0 -10
  363. package/dist/bin/chunks/chunk-VZK4FHWJ.js +0 -3
  364. package/dist/bin/chunks/chunk-Y4FPH5DQ.js +0 -64
  365. package/dist/bin/chunks/curl-AXXGQRR2.js +0 -27
  366. package/dist/bin/chunks/date-JEZYSA4F.js +0 -3
  367. package/dist/bin/chunks/flag-coverage-RFKIBJ6L.js +0 -3
  368. package/dist/bin/chunks/printf-Z5C2UOI5.js +0 -3
  369. package/dist/bin/chunks/tar-DOO744MK.js +0 -3
  370. package/dist/bin/shell/chunks/chunk-3UKQXBQ3.js +0 -6
  371. package/dist/bin/shell/chunks/chunk-ALVEEXFD.js +0 -19
  372. package/dist/bin/shell/chunks/chunk-BGX3RW7H.js +0 -10
  373. package/dist/bin/shell/chunks/chunk-D6CPXGKK.js +0 -75
  374. package/dist/bin/shell/chunks/chunk-FOUVACI7.js +0 -16
  375. package/dist/bin/shell/chunks/chunk-Q4UMTSRO.js +0 -15
  376. package/dist/bin/shell/chunks/chunk-UGJM7CKP.js +0 -17
  377. package/dist/bin/shell/chunks/chunk-VBDLSL7Y.js +0 -10
  378. package/dist/bin/shell/chunks/chunk-VZK4FHWJ.js +0 -3
  379. package/dist/bin/shell/chunks/chunk-Y4FPH5DQ.js +0 -64
  380. package/dist/bin/shell/chunks/curl-AXXGQRR2.js +0 -27
  381. package/dist/bin/shell/chunks/date-JEZYSA4F.js +0 -3
  382. package/dist/bin/shell/chunks/flag-coverage-RFKIBJ6L.js +0 -3
  383. package/dist/bin/shell/chunks/printf-Z5C2UOI5.js +0 -3
  384. package/dist/bin/shell/chunks/tar-DOO744MK.js +0 -3
  385. package/dist/bundle/chunks/chunk-CHFEPBH4.js +0 -18
  386. package/dist/bundle/chunks/chunk-G5EVRAOO.js +0 -74
  387. package/dist/bundle/chunks/chunk-GIUR5SNU.js +0 -15
  388. package/dist/bundle/chunks/chunk-MZFCCXPZ.js +0 -63
  389. package/dist/bundle/chunks/chunk-NRSASXYY.js +0 -2
  390. package/dist/bundle/chunks/chunk-OGJ5CFPR.js +0 -9
  391. package/dist/bundle/chunks/chunk-SO6R3ZKN.js +0 -16
  392. package/dist/bundle/chunks/chunk-XDGLKIHR.js +0 -9
  393. package/dist/bundle/chunks/chunk-XUIHBHL5.js +0 -5
  394. package/dist/bundle/chunks/chunk-XYXUMFSU.js +0 -14
  395. package/dist/bundle/chunks/curl-LV5Y3AMS.js +0 -26
  396. package/dist/bundle/chunks/date-UUUPW43J.js +0 -2
  397. package/dist/bundle/chunks/find-INTH3OLC.js +0 -2
  398. package/dist/bundle/chunks/flag-coverage-XWSYNE72.js +0 -2
  399. package/dist/bundle/chunks/printf-TWGXF445.js +0 -2
  400. package/dist/bundle/chunks/rg-S4FXYXWB.js +0 -2
  401. package/dist/bundle/chunks/tar-STHHZTZ6.js +0 -2
  402. package/dist/bundle/chunks/timeout-YDCRSLPQ.js +0 -2
  403. package/dist/bundle/chunks/xan-view-HDVKHFC2.js +0 -2
  404. package/dist/bundle/chunks/yq-4QJW3EQG.js +0 -2
@@ -0,0 +1,16 @@
1
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
+ import{a as w,b as V}from"./chunk-LZUPLYFM.js";import{d as E}from"./chunk-4WKZNNJK.js";import{a as T,b as M}from"./chunk-KAPG5ONA.js";import{a as F}from"./chunk-VACKIICN.js";import{a as R}from"./chunk-KTPCYKBB.js";import{c as J}from"./chunk-XEKXHOPO.js";import{k as O}from"./chunk-SAI2SPQQ.js";import{a as N}from"./chunk-FOCWZZDE.js";import{a as A,b as L,c as I}from"./chunk-QAYAQNCG.js";function W(t){switch(t){case"\b":return"\\b";case"\f":return"\\f";case`
3
+ `:return"\\n";case"\r":return"\\r";case" ":return"\\t";default:return`\\u${t.charCodeAt(0).toString(16).padStart(4,"0")}`}}function _(t){let n="",s=!1,i=!1;for(let a=0;a<t.length;a++){let r=t[a];if(i){n+=r,i=!1;continue}if(r==="\\"){n+=r,i=!0;continue}if(r==='"'){n+=r,s=!s;continue}if(s&&r.charCodeAt(0)<=31){n+=W(r);continue}n+=r}return n}function k(t,n,s){return JSON.parse(_(t.slice(n,s)))}function B(t){let n=[],s=0,i=t.length;for(;s<i;){for(;s<i&&/\s/.test(t[s]);)s++;if(s>=i)break;let a=s,r=t[s];if(r==="{"||r==="["){let f=r,c=r==="{"?"}":"]",p=1,m=!1,d=!1;for(s++;s<i&&p>0;){let j=t[s];d?d=!1:j==="\\"?d=!0:j==='"'?m=!m:m||(j===f?p++:j===c&&p--),s++}if(p!==0)throw new Error(`Unexpected end of JSON input at position ${s} (unclosed ${f})`);n.push(E(k(t,a,s)))}else if(r==='"'){let f=!1;for(s++;s<i;){let c=t[s];if(f)f=!1;else if(c==="\\")f=!0;else if(c==='"'){s++;break}s++}n.push(E(k(t,a,s)))}else if(r==="-"||r>="0"&&r<="9"){for(;s<i&&/[\d.eE+-]/.test(t[s]);)s++;n.push(E(k(t,a,s)))}else if(t.slice(s,s+4)==="true")n.push(!0),s+=4;else if(t.slice(s,s+5)==="false")n.push(!1),s+=5;else if(t.slice(s,s+4)==="null")n.push(null),s+=4;else{let f=t.slice(s,s+10);throw new Error(`Invalid JSON at position ${a}: unexpected '${f.split(/\s/)[0]}'`)}}return n}var X={name:"jq",summary:"command-line JSON processor",usage:"jq [OPTIONS] FILTER [FILE...]",options:["-R, --raw-input read each line as string instead of JSON","-r, --raw-output output strings without quotes","-c, --compact-output compact instead of pretty-printed output","-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 C(t,n,s,i,a,r=0){if(t===null||t===void 0)return"null";if(typeof t=="boolean")return String(t);if(typeof t=="number")return Number.isFinite(t)?String(t):"null";if(typeof t=="string")return s?t:JSON.stringify(t);let f=a?" ":" ";if(Array.isArray(t))return t.length===0?"[]":n?`[${t.map(p=>C(p,!0,!1,i,a)).join(",")}]`:`[
4
+ ${t.map(p=>f.repeat(r+1)+C(p,!1,!1,i,a,r+1)).join(`,
5
+ `)}
6
+ ${f.repeat(r)}]`;if(typeof t=="object"){let c=Object.keys(t);return i&&(c=c.sort()),c.length===0?"{}":n?`{${c.map(m=>`${JSON.stringify(m)}:${C(t[m],!0,!1,i,a)}`).join(",")}}`:`{
7
+ ${c.map(m=>{let d=C(t[m],!1,!1,i,a,r+1);return`${f.repeat(r+1)}${JSON.stringify(m)}: ${d}`}).join(`,
8
+ `)}
9
+ ${f.repeat(r)}}`}return String(t)}var re={name:"jq",async execute(t,n){T(n.requireDefenseContext,"jq","execution entry");let s=(o,e)=>M(n.requireDefenseContext,"jq",o,e);if(L(t))return A(X);let i=!1,a=!1,r=!1,f=!1,c=!1,p=!1,m=!1,d=!1,j=!1,D=".",z=!1,x=[];for(let o=0;o<t.length;o++){let e=t[o];if(e==="-R"||e==="--raw-input")a=!0;else if(e==="-r"||e==="--raw-output")i=!0;else if(e==="-c"||e==="--compact-output")r=!0;else if(e==="-e"||e==="--exit-status")f=!0;else if(e==="-s"||e==="--slurp")c=!0;else if(e==="-n"||e==="--null-input")p=!0;else if(e==="-j"||e==="--join-output")m=!0;else if(!(e==="-a"||e==="--ascii")){if(e==="-S"||e==="--sort-keys")d=!0;else if(!(e==="-C"||e==="--color")){if(!(e==="-M"||e==="--monochrome"))if(e==="--tab")j=!0;else if(e==="-")x.push("-");else{if(e.startsWith("--"))return I("jq",e);if(e.startsWith("-")){for(let l of e.slice(1))if(l==="R")a=!0;else if(l==="r")i=!0;else if(l==="c")r=!0;else if(l==="e")f=!0;else if(l==="s")c=!0;else if(l==="n")p=!0;else if(l==="j")m=!0;else if(l!=="a"){if(l==="S")d=!0;else if(l!=="C"){if(l!=="M")return I("jq",`-${l}`)}}}else z?x.push(e):(D=e,z=!0)}}}}let S=[];if(!p)if(x.length===0||x.length===1&&x[0]==="-")S.push({source:"stdin",content:J(n.stdin)});else{let o=await s("file read",()=>R(n,x,{cmdName:"jq",stopOnError:!0}));if(o.exitCode!==0)return{stdout:"",stderr:o.stderr,exitCode:2};S=o.files.map(e=>({source:e.filename||"stdin",content:J(e.content)}))}try{let o=V(D),e=[],l={limits:n.limits?{maxIterations:n.limits.maxJqIterations}:void 0,env:n.env,coverage:n.coverage,requireDefenseContext:n.requireDefenseContext};if(p)e=w(null,o,l);else if(a&&c){let u=S.map(({content:g})=>g).join("");e=w(u,o,l)}else if(a){let u="";for(let{content:g}of S){let h=u+g,y=0,q=h.indexOf(`
10
+ `,y);for(;q!==-1;)e.push(...w(h.slice(y,q),o,l)),y=q+1,q=h.indexOf(`
11
+ `,y);u=h.slice(y)}u!==""&&e.push(...w(u,o,l))}else if(c){let u=[];for(let{content:g}of S){let h=g.trim();h&&u.push(...B(h))}e=w(u,o,l)}else for(let{content:u}of S){let g=u.trim();if(!g)continue;let h=B(g);for(let y of h)e.push(...w(y,o,l))}let H=e.map(u=>C(u,r,i,d,j)),P=m?"":`
12
+ `,b=H.join(P),$=n.limits?.maxStringLength;if($!==void 0&&$>0&&b.length>$)throw new O(`jq: output size limit exceeded (${$} bytes)`,"string_length");let U=f&&(e.length===0||e.every(u=>u==null||u===!1))?1:0;return{stdout:b?m?b:`${b}
13
+ `:"",stderr:"",exitCode:U}}catch(o){if(o instanceof F)throw o;if(o instanceof O)return{stdout:"",stderr:`jq: ${N(o.message)}
14
+ `,exitCode:O.EXIT_CODE};let e=N(o.message);return e.includes("Unknown function")?{stdout:"",stderr:`jq: error: ${e}
15
+ `,exitCode:3}:{stdout:"",stderr:`jq: parse error: ${e}
16
+ `,exitCode:5}}}},oe={name:"jq",flags:[{flag:"-R",type:"boolean"},{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{re as a,oe as b};
@@ -1,5 +1,5 @@
1
1
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
- import{b as D}from"./chunk-WNH3HOQA.js";import{a as A,b as h}from"./chunk-HBVMHTO5.js";import{a as F,b as g}from"./chunk-XRFHFXFP.js";import{a as O}from"./chunk-L2UW7DWF.js";import{b as T}from"./chunk-TN7HHBQW.js";import{a as m,b as w}from"./chunk-FOCWZZDE.js";var n={NOOP:0,READ_FILE:1,WRITE_FILE:2,STAT:3,READDIR:4,MKDIR:5,RM:6,EXISTS:7,APPEND_FILE:8,SYMLINK:9,READLINK:10,LSTAT:11,CHMOD:12,REALPATH:13,RENAME:14,COPY_FILE:15,WRITE_STDOUT:100,WRITE_STDERR:101,EXIT:102,HTTP_REQUEST:200,EXEC_COMMAND:300,INVOKE_TOOL:400},r={PENDING:0,READY:1,SUCCESS:2,ERROR:3},l={NONE:0,NOT_FOUND:1,IS_DIRECTORY:2,NOT_DIRECTORY:3,EXISTS:4,PERMISSION_DENIED:5,INVALID_PATH:6,IO_ERROR:7,TIMEOUT:8,NETWORK_ERROR:9,NETWORK_NOT_CONFIGURED:10},o={OP_CODE:0,STATUS:4,PATH_LENGTH:8,DATA_LENGTH:12,RESULT_LENGTH:16,ERROR_CODE:20,FLAGS:24,MODE:28,PATH_BUFFER:32,DATA_BUFFER:4128},p={CONTROL_REGION:32,PATH_BUFFER:4096,DATA_BUFFER:8388608,TOTAL:8392736},S={NONE:0,RECURSIVE:1,FORCE:2,MKDIR_RECURSIVE:1},u={IS_FILE:0,IS_DIRECTORY:1,IS_SYMLINK:2,MODE:4,SIZE:8,MTIME:16,TOTAL:24};function x(){return new A(p.TOTAL)}var R=class{int32View;uint8View;dataView;constructor(t){this.int32View=new Int32Array(t),this.uint8View=new Uint8Array(t),this.dataView=new DataView(t)}getOpCode(){return h.load(this.int32View,o.OP_CODE/4)}setOpCode(t){h.store(this.int32View,o.OP_CODE/4,t)}getStatus(){return h.load(this.int32View,o.STATUS/4)}setStatus(t){h.store(this.int32View,o.STATUS/4,t)}getPathLength(){return h.load(this.int32View,o.PATH_LENGTH/4)}setPathLength(t){h.store(this.int32View,o.PATH_LENGTH/4,t)}getDataLength(){return h.load(this.int32View,o.DATA_LENGTH/4)}setDataLength(t){h.store(this.int32View,o.DATA_LENGTH/4,t)}getResultLength(){return h.load(this.int32View,o.RESULT_LENGTH/4)}setResultLength(t){h.store(this.int32View,o.RESULT_LENGTH/4,t)}getErrorCode(){return h.load(this.int32View,o.ERROR_CODE/4)}setErrorCode(t){h.store(this.int32View,o.ERROR_CODE/4,t)}getFlags(){return h.load(this.int32View,o.FLAGS/4)}setFlags(t){h.store(this.int32View,o.FLAGS/4,t)}getMode(){return h.load(this.int32View,o.MODE/4)}setMode(t){h.store(this.int32View,o.MODE/4,t)}getPath(){let t=this.getPathLength(),e=this.uint8View.slice(o.PATH_BUFFER,o.PATH_BUFFER+t);return new TextDecoder().decode(e)}setPath(t){let e=new TextEncoder().encode(t);if(e.length>p.PATH_BUFFER)throw new Error(`Path too long: ${e.length} > ${p.PATH_BUFFER}`);this.uint8View.set(e,o.PATH_BUFFER),this.setPathLength(e.length)}getData(){let t=this.getDataLength();return this.uint8View.slice(o.DATA_BUFFER,o.DATA_BUFFER+t)}setData(t){if(t.length>p.DATA_BUFFER)throw new Error(`Data too large: ${t.length} > ${p.DATA_BUFFER}`);this.uint8View.set(t,o.DATA_BUFFER),this.setDataLength(t.length)}getDataAsString(){let t=this.getData();return new TextDecoder().decode(t)}setDataFromString(t){let e=new TextEncoder().encode(t);this.setData(e)}getResult(){let t=this.getResultLength();return this.uint8View.slice(o.DATA_BUFFER,o.DATA_BUFFER+t)}setResult(t){if(t.length>p.DATA_BUFFER)throw new Error(`Result too large: ${t.length} > ${p.DATA_BUFFER}`);this.uint8View.set(t,o.DATA_BUFFER),this.setResultLength(t.length)}getResultAsString(){let t=this.getResult();return new TextDecoder().decode(t)}setResultFromString(t){let e=new TextEncoder().encode(t);this.setResult(e)}encodeStat(t){this.uint8View[o.DATA_BUFFER+u.IS_FILE]=t.isFile?1:0,this.uint8View[o.DATA_BUFFER+u.IS_DIRECTORY]=t.isDirectory?1:0,this.uint8View[o.DATA_BUFFER+u.IS_SYMLINK]=t.isSymbolicLink?1:0,this.dataView.setInt32(o.DATA_BUFFER+u.MODE,t.mode,!0);let e=Math.min(t.size,Number.MAX_SAFE_INTEGER);this.dataView.setFloat64(o.DATA_BUFFER+u.SIZE,e,!0),this.dataView.setFloat64(o.DATA_BUFFER+u.MTIME,t.mtime.getTime(),!0),this.setResultLength(u.TOTAL)}decodeStat(){return{isFile:this.uint8View[o.DATA_BUFFER+u.IS_FILE]===1,isDirectory:this.uint8View[o.DATA_BUFFER+u.IS_DIRECTORY]===1,isSymbolicLink:this.uint8View[o.DATA_BUFFER+u.IS_SYMLINK]===1,mode:this.dataView.getInt32(o.DATA_BUFFER+u.MODE,!0),size:this.dataView.getFloat64(o.DATA_BUFFER+u.SIZE,!0),mtime:new Date(this.dataView.getFloat64(o.DATA_BUFFER+u.MTIME,!0))}}waitForReady(t){return h.wait(this.int32View,o.STATUS/4,r.PENDING,t)}waitForReadyAsync(t){return h.waitAsync(this.int32View,o.STATUS/4,r.PENDING,t)}async waitUntilReady(t){let e=Date.now();for(;;){let a=this.getStatus();if(a===r.READY)return!0;let s=Date.now()-e;if(s>=t)return!1;let i=t-s,c=h.waitAsync(this.int32View,o.STATUS/4,a,i);if(c.async&&await c.value==="timed-out")return!1}}waitForResult(t){return h.wait(this.int32View,o.STATUS/4,r.READY,t)}notify(){return h.notify(this.int32View,o.STATUS/4)}reset(){this.setOpCode(n.NOOP),this.setStatus(r.PENDING),this.setPathLength(0),this.setDataLength(0),this.setResultLength(0),this.setErrorCode(l.NONE),this.setFlags(S.NONE),this.setMode(0)}};var C=class{fs;cwd;commandName;secureFetch;maxOutputSize;exec;invokeTool;protocol;running=!1;output={stdout:"",stderr:"",exitCode:0};outputLimitExceeded=!1;startTime=0;timeoutMs=0;constructor(t,e,a,s,i=void 0,c=0,d=void 0,E=void 0){this.fs=e,this.cwd=a,this.commandName=s,this.secureFetch=i,this.maxOutputSize=c,this.exec=d,this.invokeTool=E,this.protocol=new R(t)}remainingMs(){return Math.max(0,this.timeoutMs-(Date.now()-this.startTime))}raceDeadline(t){let e=this.remainingMs();if(e<=0)return this.running=!1,this.output.exitCode=124,this.output.stderr+=`
2
+ import{b as D}from"./chunk-WNH3HOQA.js";import{a as A,b as h}from"./chunk-HBVMHTO5.js";import{a as F,b as g}from"./chunk-SY4HAUHP.js";import{a as O}from"./chunk-L2UW7DWF.js";import{b as T}from"./chunk-VACKIICN.js";import{a as m,b as w}from"./chunk-FOCWZZDE.js";var n={NOOP:0,READ_FILE:1,WRITE_FILE:2,STAT:3,READDIR:4,MKDIR:5,RM:6,EXISTS:7,APPEND_FILE:8,SYMLINK:9,READLINK:10,LSTAT:11,CHMOD:12,REALPATH:13,RENAME:14,COPY_FILE:15,WRITE_STDOUT:100,WRITE_STDERR:101,EXIT:102,HTTP_REQUEST:200,EXEC_COMMAND:300,INVOKE_TOOL:400},r={PENDING:0,READY:1,SUCCESS:2,ERROR:3},l={NONE:0,NOT_FOUND:1,IS_DIRECTORY:2,NOT_DIRECTORY:3,EXISTS:4,PERMISSION_DENIED:5,INVALID_PATH:6,IO_ERROR:7,TIMEOUT:8,NETWORK_ERROR:9,NETWORK_NOT_CONFIGURED:10},o={OP_CODE:0,STATUS:4,PATH_LENGTH:8,DATA_LENGTH:12,RESULT_LENGTH:16,ERROR_CODE:20,FLAGS:24,MODE:28,PATH_BUFFER:32,DATA_BUFFER:4128},p={CONTROL_REGION:32,PATH_BUFFER:4096,DATA_BUFFER:8388608,TOTAL:8392736},S={NONE:0,RECURSIVE:1,FORCE:2,MKDIR_RECURSIVE:1},u={IS_FILE:0,IS_DIRECTORY:1,IS_SYMLINK:2,MODE:4,SIZE:8,MTIME:16,TOTAL:24};function x(){return new A(p.TOTAL)}var R=class{int32View;uint8View;dataView;constructor(t){this.int32View=new Int32Array(t),this.uint8View=new Uint8Array(t),this.dataView=new DataView(t)}getOpCode(){return h.load(this.int32View,o.OP_CODE/4)}setOpCode(t){h.store(this.int32View,o.OP_CODE/4,t)}getStatus(){return h.load(this.int32View,o.STATUS/4)}setStatus(t){h.store(this.int32View,o.STATUS/4,t)}getPathLength(){return h.load(this.int32View,o.PATH_LENGTH/4)}setPathLength(t){h.store(this.int32View,o.PATH_LENGTH/4,t)}getDataLength(){return h.load(this.int32View,o.DATA_LENGTH/4)}setDataLength(t){h.store(this.int32View,o.DATA_LENGTH/4,t)}getResultLength(){return h.load(this.int32View,o.RESULT_LENGTH/4)}setResultLength(t){h.store(this.int32View,o.RESULT_LENGTH/4,t)}getErrorCode(){return h.load(this.int32View,o.ERROR_CODE/4)}setErrorCode(t){h.store(this.int32View,o.ERROR_CODE/4,t)}getFlags(){return h.load(this.int32View,o.FLAGS/4)}setFlags(t){h.store(this.int32View,o.FLAGS/4,t)}getMode(){return h.load(this.int32View,o.MODE/4)}setMode(t){h.store(this.int32View,o.MODE/4,t)}getPath(){let t=this.getPathLength(),e=this.uint8View.slice(o.PATH_BUFFER,o.PATH_BUFFER+t);return new TextDecoder().decode(e)}setPath(t){let e=new TextEncoder().encode(t);if(e.length>p.PATH_BUFFER)throw new Error(`Path too long: ${e.length} > ${p.PATH_BUFFER}`);this.uint8View.set(e,o.PATH_BUFFER),this.setPathLength(e.length)}getData(){let t=this.getDataLength();return this.uint8View.slice(o.DATA_BUFFER,o.DATA_BUFFER+t)}setData(t){if(t.length>p.DATA_BUFFER)throw new Error(`Data too large: ${t.length} > ${p.DATA_BUFFER}`);this.uint8View.set(t,o.DATA_BUFFER),this.setDataLength(t.length)}getDataAsString(){let t=this.getData();return new TextDecoder().decode(t)}setDataFromString(t){let e=new TextEncoder().encode(t);this.setData(e)}getResult(){let t=this.getResultLength();return this.uint8View.slice(o.DATA_BUFFER,o.DATA_BUFFER+t)}setResult(t){if(t.length>p.DATA_BUFFER)throw new Error(`Result too large: ${t.length} > ${p.DATA_BUFFER}`);this.uint8View.set(t,o.DATA_BUFFER),this.setResultLength(t.length)}getResultAsString(){let t=this.getResult();return new TextDecoder().decode(t)}setResultFromString(t){let e=new TextEncoder().encode(t);this.setResult(e)}encodeStat(t){this.uint8View[o.DATA_BUFFER+u.IS_FILE]=t.isFile?1:0,this.uint8View[o.DATA_BUFFER+u.IS_DIRECTORY]=t.isDirectory?1:0,this.uint8View[o.DATA_BUFFER+u.IS_SYMLINK]=t.isSymbolicLink?1:0,this.dataView.setInt32(o.DATA_BUFFER+u.MODE,t.mode,!0);let e=Math.min(t.size,Number.MAX_SAFE_INTEGER);this.dataView.setFloat64(o.DATA_BUFFER+u.SIZE,e,!0),this.dataView.setFloat64(o.DATA_BUFFER+u.MTIME,t.mtime.getTime(),!0),this.setResultLength(u.TOTAL)}decodeStat(){return{isFile:this.uint8View[o.DATA_BUFFER+u.IS_FILE]===1,isDirectory:this.uint8View[o.DATA_BUFFER+u.IS_DIRECTORY]===1,isSymbolicLink:this.uint8View[o.DATA_BUFFER+u.IS_SYMLINK]===1,mode:this.dataView.getInt32(o.DATA_BUFFER+u.MODE,!0),size:this.dataView.getFloat64(o.DATA_BUFFER+u.SIZE,!0),mtime:new Date(this.dataView.getFloat64(o.DATA_BUFFER+u.MTIME,!0))}}waitForReady(t){return h.wait(this.int32View,o.STATUS/4,r.PENDING,t)}waitForReadyAsync(t){return h.waitAsync(this.int32View,o.STATUS/4,r.PENDING,t)}async waitUntilReady(t){let e=Date.now();for(;;){let a=this.getStatus();if(a===r.READY)return!0;let s=Date.now()-e;if(s>=t)return!1;let i=t-s,c=h.waitAsync(this.int32View,o.STATUS/4,a,i);if(c.async&&await c.value==="timed-out")return!1}}waitForResult(t){return h.wait(this.int32View,o.STATUS/4,r.READY,t)}notify(){return h.notify(this.int32View,o.STATUS/4)}reset(){this.setOpCode(n.NOOP),this.setStatus(r.PENDING),this.setPathLength(0),this.setDataLength(0),this.setResultLength(0),this.setErrorCode(l.NONE),this.setFlags(S.NONE),this.setMode(0)}};var C=class{fs;cwd;commandName;secureFetch;maxOutputSize;exec;invokeTool;protocol;running=!1;output={stdout:"",stderr:"",exitCode:0};outputLimitExceeded=!1;startTime=0;timeoutMs=0;constructor(t,e,a,s,i=void 0,c=0,d=void 0,E=void 0){this.fs=e,this.cwd=a,this.commandName=s,this.secureFetch=i,this.maxOutputSize=c,this.exec=d,this.invokeTool=E,this.protocol=new R(t)}remainingMs(){return Math.max(0,this.timeoutMs-(Date.now()-this.startTime))}raceDeadline(t){let e=this.remainingMs();if(e<=0)return this.running=!1,this.output.exitCode=124,this.output.stderr+=`
3
3
  ${this.commandName}: execution timeout exceeded
4
4
  `,Promise.reject(new Error("Operation timed out"));let a=t();return new Promise((s,i)=>{let c=F(()=>{this.running=!1,this.output.exitCode=124,this.output.stderr+=`
5
5
  ${this.commandName}: execution timeout exceeded
@@ -1,5 +1,5 @@
1
1
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
- import{c as U}from"./chunk-NRSASXYY.js";import{a as $,b as F,c as k}from"./chunk-QAYAQNCG.js";var L=new Map([["sha1","SHA-1"],["sha256","SHA-256"]]);function D(n){function h(r,u){return r<<u|r>>>32-u}let g=new Uint32Array([3614090360,3905402710,606105819,3250441966,4118548399,1200080426,2821735955,4249261313,1770035416,2336552879,4294925233,2304563134,1804603682,4254626195,2792965006,1236535329,4129170786,3225465664,643717713,3921069994,3593408605,38016083,3634488961,3889429448,568446438,3275163606,4107603335,1163531501,2850285829,4243563512,1735328473,2368359562,4294588738,2272392833,1839030562,4259657740,2763975236,1272893353,4139469664,3200236656,681279174,3936430074,3572445317,76029189,3654602809,3873151461,530742520,3299628645,4096336452,1126891415,2878612391,4237533241,1700485571,2399980690,4293915773,2240044497,1873313359,4264355552,2734768916,1309151649,4149444226,3174756917,718787259,3951481745]),A=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21],b=n.length*8,c=(n.length%64<56?56:120)-n.length%64,s=new Uint8Array(n.length+c+8);s.set(n),s[n.length]=128;let d=new DataView(s.buffer);d.setUint32(s.length-8,b>>>0,!0),d.setUint32(s.length-4,Math.floor(b/4294967296),!0);let w=1732584193,l=4023233417,p=2562383102,e=271733878;for(let r=0;r<s.length;r+=64){let u=new Uint32Array(16);for(let t=0;t<16;t++)u[t]=d.getUint32(r+t*4,!0);let m=w,a=l,x=p,o=e;for(let t=0;t<64;t++){let i,y;t<16?(i=a&x|~a&o,y=t):t<32?(i=o&a|~o&x,y=(5*t+1)%16):t<48?(i=a^x^o,y=(3*t+5)%16):(i=x^(a|~o),y=7*t%16),i=i+m+g[t]+u[y]>>>0,m=o,o=x,x=a,a=a+h(i,A[t])>>>0}w=w+m>>>0,l=l+a>>>0,p=p+x>>>0,e=e+o>>>0}let f=new Uint8Array(16);return new DataView(f.buffer).setUint32(0,w,!0),new DataView(f.buffer).setUint32(4,l,!0),new DataView(f.buffer).setUint32(8,p,!0),new DataView(f.buffer).setUint32(12,e,!0),Array.from(f).map(r=>r.toString(16).padStart(2,"0")).join("")}async function C(n,h){if(n==="md5")return D(h);let g=L.get(n);if(!g)throw new Error(`Unknown algorithm: ${n}`);let A=await globalThis.crypto.subtle.digest(g,new Uint8Array(h).buffer);return Array.from(new Uint8Array(A)).map(b=>b.toString(16).padStart(2,"0")).join("")}function I(n,h,g){let A={name:n,summary:g,usage:`${n} [OPTION]... [FILE]...`,options:["-c, --check read checksums from FILEs and check them"," --help display this help and exit"]};return{name:n,async execute(b,c){if(F(b))return $(A);let s=!1,d=[];for(let e of b)if(e==="-c"||e==="--check")s=!0;else if(!(e==="-b"||e==="-t"||e==="--binary"||e==="--text")){if(e.startsWith("-")&&e!=="-")return k(n,e);d.push(e)}d.length===0&&d.push("-");let w=async e=>{if(e==="-")return Uint8Array.from(c.stdin,f=>f.charCodeAt(0));try{return await c.fs.readFileBuffer(c.fs.resolvePath(c.cwd,e))}catch{return null}};if(s){let e=0,f="";for(let r of d){let u=r==="-"?U(c.stdin):await c.fs.readFile(c.fs.resolvePath(c.cwd,r)).catch(()=>null);if(u===null)return{stdout:"",stderr:`${n}: ${r}: No such file or directory
2
+ import{c as U}from"./chunk-XEKXHOPO.js";import{a as $,b as F,c as k}from"./chunk-QAYAQNCG.js";var L=new Map([["sha1","SHA-1"],["sha256","SHA-256"]]);function D(n){function h(r,u){return r<<u|r>>>32-u}let g=new Uint32Array([3614090360,3905402710,606105819,3250441966,4118548399,1200080426,2821735955,4249261313,1770035416,2336552879,4294925233,2304563134,1804603682,4254626195,2792965006,1236535329,4129170786,3225465664,643717713,3921069994,3593408605,38016083,3634488961,3889429448,568446438,3275163606,4107603335,1163531501,2850285829,4243563512,1735328473,2368359562,4294588738,2272392833,1839030562,4259657740,2763975236,1272893353,4139469664,3200236656,681279174,3936430074,3572445317,76029189,3654602809,3873151461,530742520,3299628645,4096336452,1126891415,2878612391,4237533241,1700485571,2399980690,4293915773,2240044497,1873313359,4264355552,2734768916,1309151649,4149444226,3174756917,718787259,3951481745]),A=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21],b=n.length*8,c=(n.length%64<56?56:120)-n.length%64,s=new Uint8Array(n.length+c+8);s.set(n),s[n.length]=128;let d=new DataView(s.buffer);d.setUint32(s.length-8,b>>>0,!0),d.setUint32(s.length-4,Math.floor(b/4294967296),!0);let w=1732584193,l=4023233417,p=2562383102,e=271733878;for(let r=0;r<s.length;r+=64){let u=new Uint32Array(16);for(let t=0;t<16;t++)u[t]=d.getUint32(r+t*4,!0);let m=w,a=l,x=p,o=e;for(let t=0;t<64;t++){let i,y;t<16?(i=a&x|~a&o,y=t):t<32?(i=o&a|~o&x,y=(5*t+1)%16):t<48?(i=a^x^o,y=(3*t+5)%16):(i=x^(a|~o),y=7*t%16),i=i+m+g[t]+u[y]>>>0,m=o,o=x,x=a,a=a+h(i,A[t])>>>0}w=w+m>>>0,l=l+a>>>0,p=p+x>>>0,e=e+o>>>0}let f=new Uint8Array(16);return new DataView(f.buffer).setUint32(0,w,!0),new DataView(f.buffer).setUint32(4,l,!0),new DataView(f.buffer).setUint32(8,p,!0),new DataView(f.buffer).setUint32(12,e,!0),Array.from(f).map(r=>r.toString(16).padStart(2,"0")).join("")}async function C(n,h){if(n==="md5")return D(h);let g=L.get(n);if(!g)throw new Error(`Unknown algorithm: ${n}`);let A=await globalThis.crypto.subtle.digest(g,new Uint8Array(h).buffer);return Array.from(new Uint8Array(A)).map(b=>b.toString(16).padStart(2,"0")).join("")}function I(n,h,g){let A={name:n,summary:g,usage:`${n} [OPTION]... [FILE]...`,options:["-c, --check read checksums from FILEs and check them"," --help display this help and exit"]};return{name:n,async execute(b,c){if(F(b))return $(A);let s=!1,d=[];for(let e of b)if(e==="-c"||e==="--check")s=!0;else if(!(e==="-b"||e==="-t"||e==="--binary"||e==="--text")){if(e.startsWith("-")&&e!=="-")return k(n,e);d.push(e)}d.length===0&&d.push("-");let w=async e=>{if(e==="-")return Uint8Array.from(c.stdin,f=>f.charCodeAt(0));try{return await c.fs.readFileBuffer(c.fs.resolvePath(c.cwd,e))}catch{return null}};if(s){let e=0,f="";for(let r of d){let u=r==="-"?U(c.stdin):await c.fs.readFile(c.fs.resolvePath(c.cwd,r)).catch(()=>null);if(u===null)return{stdout:"",stderr:`${n}: ${r}: No such file or directory
3
3
  `,exitCode:1};for(let m of u.split(`
4
4
  `)){let a=m.match(/^([a-fA-F0-9]+)\s+[* ]?(.+)$/);if(!a)continue;let[,x,o]=a,t=await w(o);if(t===null){f+=`${o}: FAILED open or read
5
5
  `,e++;continue}let i=await C(h,t)===x.toLowerCase();f+=`${o}: ${i?"OK":"FAILED"}
@@ -0,0 +1,4 @@
1
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
+ import{a as p}from"./chunk-RBQG6ZUG.js";import{a as g,b as y,c as h}from"./chunk-QAYAQNCG.js";var w={name:"date",summary:"display the current time in the given FORMAT",usage:"date [OPTION]... [+FORMAT]",options:["-d, --date=STRING display time described by STRING, not 'now'","-u, --utc print Coordinated Universal Time (UTC)","-I, --iso-8601 output date/time in ISO 8601 format","-R, --rfc-email output RFC 5322 date format"," --help display this help and exit"]};function $(t){try{return new Intl.DateTimeFormat(void 0,{timeZone:t}),!0}catch{return!1}}function D(t,s){let r=new Intl.DateTimeFormat("en-US",{timeZone:s,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).formatToParts(t),n=d=>r.find(o=>o.type===d)?.value??"00",i=Number.parseInt(n("hour"),10)%24,l=new Date(`${n("year")}-${n("month")}-${n("day")}T${String(i).padStart(2,"0")}:${n("minute")}:${n("second")}Z`);return Number.isNaN(l.getTime())?null:l}function I(t,s){let r=t.match(/^(\d{4})-(\d{2})-(\d{2})(?:[T ](\d{2}):(\d{2})(?::(\d{2}))?)?$/);if(!r)return null;let[,n,i,l,d="00",o="00",m="00"]=r,c=new Date(`${n}-${i}-${l}T${d}:${o}:${m}Z`);if(Number.isNaN(c.getTime()))return null;try{let a=c;for(let u=0;u<3;u++){let f=D(a,s);if(f===null)return null;let e=f.getTime()-c.getTime();if(e===0)return a;a=new Date(a.getTime()-e)}return a}catch{return null}}function N(t,s){if(t.startsWith("@")){let i=t.slice(1);return/^-?\d+$/.test(i)?new Date(Number.parseInt(i,10)*1e3):null}let r=t.toLowerCase().trim();if(r==="now"||r==="today")return new Date;if(r==="yesterday")return new Date(Date.now()-864e5);if(r==="tomorrow")return new Date(Date.now()+864e5);if(s&&!/Z$/i.test(t)&&!/[+-]\d{2}:?\d{2}$/.test(t)){let i=I(t,s);if(i)return i}let n=new Date(t);return Number.isNaN(n.getTime())?null:n}var C={name:"date",async execute(t,s){if(y(t))return g(w);let r=!1,n=null,i=null,l=!1,d=!1;for(let f=0;f<t.length;f++){let e=t[f];if(e==="-u"||e==="--utc")r=!0;else if(e==="-d"||e==="--date")n=t[++f]??"";else if(e.startsWith("--date="))n=e.slice(7);else if(e==="-I"||e==="--iso-8601")l=!0;else if(e==="-R"||e==="--rfc-email")d=!0;else if(e.startsWith("+"))i=e.slice(1);else{if(e.startsWith("--"))return h("date",e);if(e.startsWith("-"))for(let T of e.slice(1))if(T==="u")r=!0;else if(T==="I")l=!0;else if(T==="R")d=!0;else return h("date",`-${T}`)}}let o=s.env.get("TZ");o&&!$(o)&&(o=void 0);let m=r?"UTC":o??"UTC",c=n!==null?N(n,o):new Date;if(!c)return{stdout:"",stderr:`date: invalid date '${n}'
3
+ `,exitCode:1};let a=Math.floor(c.getTime()/1e3),u;return i?u=p(i,a,m):l?u=p("%Y-%m-%dT%H:%M:%S%z",a,m):d?u=p("%a, %d %b %Y %H:%M:%S %z",a,m):u=p("%a %b %e %H:%M:%S %Z %Y",a,m),{stdout:`${u}
4
+ `,stderr:"",exitCode:0}}},R={name:"date",flags:[{flag:"-d",type:"value",valueHint:"string"},{flag:"-u",type:"boolean"},{flag:"-I",type:"boolean"},{flag:"-R",type:"boolean"}]};export{C as a,R as b};
@@ -1,5 +1,5 @@
1
1
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
- import{c as a}from"./chunk-NRSASXYY.js";import{a as c}from"./chunk-QIQMJJZ4.js";import{a as u,b as p}from"./chunk-QAYAQNCG.js";import*as g from"diff";var b={name:"diff",summary:"compare files line by line",usage:"diff [OPTION]... FILE1 FILE2",options:["-u, --unified output unified diff format (default)","-q, --brief report only whether files differ","-s, --report-identical-files report when files are the same","-i, --ignore-case ignore case differences"," --help display this help and exit"]},C={unified:{short:"u",long:"unified",type:"boolean"},brief:{short:"q",long:"brief",type:"boolean"},reportSame:{short:"s",long:"report-identical-files",type:"boolean"},ignoreCase:{short:"i",long:"ignore-case",type:"boolean"}},L={name:"diff",async execute(d,e){if(p(d))return u(b);let t=c("diff",d,C);if(!t.ok)return t.error;let m=t.result.flags.brief,h=t.result.flags.reportSame,y=t.result.flags.ignoreCase,l=t.result.positional;if(t.result.flags.unified,l.length<2)return{stdout:"",stderr:`diff: missing operand
2
+ import{c as a}from"./chunk-XEKXHOPO.js";import{a as c}from"./chunk-QIQMJJZ4.js";import{a as u,b as p}from"./chunk-QAYAQNCG.js";import*as g from"diff";var b={name:"diff",summary:"compare files line by line",usage:"diff [OPTION]... FILE1 FILE2",options:["-u, --unified output unified diff format (default)","-q, --brief report only whether files differ","-s, --report-identical-files report when files are the same","-i, --ignore-case ignore case differences"," --help display this help and exit"]},C={unified:{short:"u",long:"unified",type:"boolean"},brief:{short:"q",long:"brief",type:"boolean"},reportSame:{short:"s",long:"report-identical-files",type:"boolean"},ignoreCase:{short:"i",long:"ignore-case",type:"boolean"}},L={name:"diff",async execute(d,e){if(p(d))return u(b);let t=c("diff",d,C);if(!t.ok)return t.error;let m=t.result.flags.brief,h=t.result.flags.reportSame,y=t.result.flags.ignoreCase,l=t.result.positional;if(t.result.flags.unified,l.length<2)return{stdout:"",stderr:`diff: missing operand
3
3
  `,exitCode:2};let i,s,[r,o]=l;try{i=r==="-"?a(e.stdin):await e.fs.readFile(e.fs.resolvePath(e.cwd,r))}catch{return{stdout:"",stderr:`diff: ${r}: No such file or directory
4
4
  `,exitCode:2}}try{s=o==="-"?a(e.stdin):await e.fs.readFile(e.fs.resolvePath(e.cwd,o))}catch{return{stdout:"",stderr:`diff: ${o}: No such file or directory
5
5
  `,exitCode:2}}let f=i,n=s;return y&&(f=f.toLowerCase(),n=n.toLowerCase()),f===n?h?{stdout:`Files ${r} and ${o} are identical
@@ -1,2 +1,2 @@
1
1
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
- import{a as m}from"./chunk-EBAPSGAO.js";var s=m("md5sum","md5","compute MD5 message digest"),o={name:"md5sum",flags:[{flag:"-c",type:"boolean"}],needsFiles:!0};export{s as a,o as b};
2
+ import{a as m}from"./chunk-AXMYAPFA.js";var s=m("md5sum","md5","compute MD5 message digest"),o={name:"md5sum",flags:[{flag:"-c",type:"boolean"}],needsFiles:!0};export{s as a,o as b};
@@ -1,5 +1,5 @@
1
1
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
- import{a as F,b,c as M,d as He,e as w,f as v,g as Y,h as Z}from"./chunk-VPADYNBD.js";import{a as st}from"./chunk-4I3HOE5Z.js";import{a as $}from"./chunk-LEKBROJD.js";import{f as qe,g as X}from"./chunk-4WKZNNJK.js";import{a as J}from"./chunk-4RUAZWKT.js";import{a as _e}from"./chunk-YCLFEX4T.js";import{c as _}from"./chunk-NRSASXYY.js";import{a as D,b as G}from"./chunk-QAYAQNCG.js";import{b as We,d as et,e as tt,f as nt}from"./chunk-BZUGFHVS.js";var q,Je=We(()=>{"use strict";q=class{input;pos=0;tokens=[];constructor(n){this.input=n}tokenize(){for(;this.pos<this.input.length&&(this.skipWhitespace(),!(this.pos>=this.input.length));){let n=this.nextToken();n&&this.tokens.push(n)}return this.tokens.push({type:"eof",value:"",pos:this.pos}),this.tokens}skipWhitespace(){for(;this.pos<this.input.length;){let n=this.input[this.pos];if(n===" "||n===" "||n===`
2
+ import{a as F,b,c as M,d as He,e as w,f as v,g as Y,h as Z}from"./chunk-WKPK7M56.js";import{a as st}from"./chunk-4I3HOE5Z.js";import{a as $}from"./chunk-LZUPLYFM.js";import{f as qe,g as X}from"./chunk-4WKZNNJK.js";import{a as J}from"./chunk-7CSMHFIJ.js";import{a as _e}from"./chunk-KTPCYKBB.js";import{c as _}from"./chunk-XEKXHOPO.js";import{a as D,b as G}from"./chunk-QAYAQNCG.js";import{b as We,d as et,e as tt,f as nt}from"./chunk-BZUGFHVS.js";var q,Je=We(()=>{"use strict";q=class{input;pos=0;tokens=[];constructor(n){this.input=n}tokenize(){for(;this.pos<this.input.length&&(this.skipWhitespace(),!(this.pos>=this.input.length));){let n=this.nextToken();n&&this.tokens.push(n)}return this.tokens.push({type:"eof",value:"",pos:this.pos}),this.tokens}skipWhitespace(){for(;this.pos<this.input.length;){let n=this.input[this.pos];if(n===" "||n===" "||n===`
3
3
  `||n==="\r")this.pos++;else if(n==="#")for(;this.pos<this.input.length&&this.input[this.pos]!==`
4
4
  `;)this.pos++;else break}}nextToken(){let n=this.pos,t=this.input[this.pos];if(t>="0"&&t<="9")return this.readNumber();if(t==='"'||t==="'"||t==="`")return this.readString(t);if(t==="b"&&this.pos+1<this.input.length){let o=this.input[this.pos+1];if(o==='"'||o==="'"||o==="`")return this.pos++,this.readString(o)}if(t==="/"){let o=this.tokens[this.tokens.length-1];return o&&(o.type==="int"||o.type==="float"||o.type==="string"||o.type==="ident"||o.type===")"||o.type==="]")?this.input[this.pos+1]==="/"?(this.pos+=2,{type:"//",value:"//",pos:n}):(this.pos++,{type:"/",value:"/",pos:n}):this.readRegex()}if(this.match("not in"))return{type:"not in",value:"not in",pos:n};if(this.match("=>"))return{type:"=>",value:"=>",pos:n};if(this.match("**"))return{type:"**",value:"**",pos:n};if(this.match("++"))return{type:"++",value:"++",pos:n};if(this.match("//"))return{type:"//",value:"//",pos:n};if(this.match("=="))return{type:"==",value:"==",pos:n};if(this.match("!="))return{type:"!=",value:"!=",pos:n};if(this.match("<="))return{type:"<=",value:"<=",pos:n};if(this.match(">="))return{type:">=",value:">=",pos:n};if(this.match("&&"))return{type:"&&",value:"&&",pos:n};if(this.match("||"))return{type:"||",value:"||",pos:n};let r=new Map([["(","("],[")",")"],["[","["],["]","]"],["{","{"],["}","}"],[",",","],[":",":"],[";",";"],["+","+"],["-","-"],["*","*"],["%","%"],["<","<"],[">",">"],["!","!"],[".","."],["|","|"],["=","="]]).get(t);if(r!==void 0)return this.pos++,{type:r,value:t,pos:n};if(this.isIdentStart(t))return this.readIdentifier();throw new Error(`Unexpected character '${t}' at position ${this.pos}`)}match(n){if(this.input.slice(this.pos,this.pos+n.length)===n){if(/^[a-zA-Z]/.test(n)){let t=this.input[this.pos+n.length];if(t&&this.isIdentChar(t))return!1}return this.pos+=n.length,!0}return!1}isIdentStart(n){return n>="a"&&n<="z"||n>="A"&&n<="Z"||n==="_"}isIdentChar(n){return this.isIdentStart(n)||n>="0"&&n<="9"}readNumber(){let n=this.pos,t=!1,s=!1;for(;this.pos<this.input.length;){let o=this.input[this.pos];if(o>="0"&&o<="9")this.pos++;else if(o==="_")this.pos++;else if(o==="."&&!t&&!s)t=!0,this.pos++;else if((o==="e"||o==="E")&&!s)s=!0,t=!0,this.pos++,this.pos<this.input.length&&(this.input[this.pos]==="+"||this.input[this.pos]==="-")&&this.pos++;else break}let r=this.input.slice(n,this.pos).replace(/_/g,"");return{type:t?"float":"int",value:r,pos:n}}readString(n){let t=this.pos;this.pos++;let s="";for(;this.pos<this.input.length;){let r=this.input[this.pos];if(r===n)return this.pos++,{type:"string",value:s,pos:t};if(r==="\\"){if(this.pos++,this.pos<this.input.length){let o=this.input[this.pos];switch(o){case"n":s+=`
5
5
  `;break;case"r":s+="\r";break;case"t":s+=" ";break;case"\\":s+="\\";break;case'"':s+='"';break;case"'":s+="'";break;case"`":s+="`";break;case"0":s+="\0";break;default:s+=o}this.pos++}}else s+=r,this.pos++}throw new Error(`Unterminated string starting at position ${t}`)}readRegex(){let n=this.pos;this.pos++;let t="",s="";for(;this.pos<this.input.length;){let r=this.input[this.pos];if(r==="/"){for(this.pos++;this.pos<this.input.length&&this.input[this.pos]==="i";)s+=this.input[this.pos],this.pos++;return{type:"regex",value:t+(s?`/${s}`:""),pos:n}}r==="\\"?(t+=r,this.pos++,this.pos<this.input.length&&(t+=this.input[this.pos],this.pos++)):(t+=r,this.pos++)}throw new Error(`Unterminated regex starting at position ${n}`)}readIdentifier(){let n=this.pos;for(;this.pos<this.input.length&&this.isIdentChar(this.input[this.pos]);)this.pos++;let t=!1;this.pos<this.input.length&&this.input[this.pos]==="?"&&(t=!0,this.pos++);let s=this.input.slice(n,t?this.pos-1:this.pos);t&&(s+="?");let r=new Map([["true","true"],["false","false"],["null","null"],["and","and"],["or","or"],["eq","eq"],["ne","ne"],["lt","lt"],["le","le"],["gt","gt"],["ge","ge"],["in","in"],["as","as"],["_","_"]]),o=s.replace(/\?$/,""),a=r.get(o);return a!==void 0&&!t?{type:a,value:o,pos:n}:{type:"ident",value:s,pos:n}}}});var ze={};et(ze,{parseMoonblade:()=>H,parseNamedExpressions:()=>U});function U(e){let n=[],s=new q(e).tokenize(),r=0,o=()=>s[r]||{type:"eof",value:"",pos:0},a=()=>s[r++];for(;o().type!=="eof";){if(o().type===","&&n.length>0){a();continue}let d=[],u=0,p=r;for(;o().type!=="eof";){let i=o();if((i.type===","||i.type==="as")&&u===0)break;(i.type==="("||i.type==="["||i.type==="{")&&u++,(i.type===")"||i.type==="]"||i.type==="}")&&u--,d.push(a())}d.push({type:"eof",value:"",pos:0});let h=new z(d).parse(),l;if(o().type==="as")if(a(),o().type==="("){a();let i=[];for(;o().type!==")"&&o().type!=="eof";)(o().type==="ident"||o().type==="string")&&(i.push(o().value),a()),o().type===","&&a();o().type===")"&&a(),l=i}else if(o().type==="ident"||o().type==="string")l=o().value,a();else throw new Error(`Expected name after 'as', got ${o().type}`);else l=e.slice(s[p].pos,s[r-1]?.pos||e.length).trim(),h.type==="identifier"&&(l=h.name);n.push({expr:h,name:l})}return n}function H(e){let t=new q(e).tokenize();return new z(t).parse()}var R,z,V=We(()=>{"use strict";Je();R={PIPE:1,OR:2,AND:3,EQUALITY:4,COMPARISON:5,ADDITIVE:6,MULTIPLICATIVE:7,POWER:8,UNARY:9,POSTFIX:10},z=class{pos=0;tokens;constructor(n){this.tokens=n}parse(){let n=this.parseExpr(0);if(this.peek().type!=="eof")throw new Error(`Unexpected token: ${this.peek().value}`);return n}parseExpr(n){let t=this.parsePrefix();for(;;){let s=this.peek(),r=this.getInfixPrec(s.type);if(r<n)break;t=this.parseInfix(t,r)}return t}parsePrefix(){let n=this.peek();switch(n.type){case"int":return this.advance(),{type:"int",value:Number.parseInt(n.value,10)};case"float":return this.advance(),{type:"float",value:Number.parseFloat(n.value)};case"string":return this.advance(),{type:"string",value:n.value};case"regex":{this.advance();let t=n.value.split("/"),s=t.length>1?t[t.length-1]:"";return{type:"regex",pattern:t.slice(0,-1).join("/")||n.value,caseInsensitive:s.includes("i")}}case"true":return this.advance(),{type:"bool",value:!0};case"false":return this.advance(),{type:"bool",value:!1};case"null":return this.advance(),{type:"null"};case"_":return this.advance(),{type:"underscore"};case"ident":{let t=n.value,s=t.endsWith("?"),r=s?t.slice(0,-1):t;if(this.advance(),this.peek().type==="(")return this.parseFunctionCall(r);if(this.peek().type==="=>"){this.advance();let o=this.parseExpr(0);return this.bindLambdaArgs({type:"lambda",params:[r],body:o},[r])}return{type:"identifier",name:r,unsure:s}}case"(":{this.advance();let t=this.pos;if(this.peek().type===")"){if(this.advance(),this.peek().type==="=>"){this.advance();let r=this.parseExpr(0);return{type:"lambda",params:[],body:r}}throw new Error("Empty parentheses not allowed")}if(this.peek().type==="ident"){let r=[this.peek().value];this.advance();let o=!0;for(;this.peek().type===",";)if(this.advance(),this.peek().type==="ident")r.push(this.peek().value),this.advance();else{o=!1;break}if(o&&this.peek().type===")"&&this.peekAt(1).type==="=>"){this.advance(),this.advance();let a=this.parseExpr(0);return this.bindLambdaArgs({type:"lambda",params:r,body:a},r)}this.pos=t}let s=this.parseExpr(0);return this.expect(")"),s}case"[":return this.parseList();case"{":return this.parseMap();case"-":{this.advance();let t=this.parseExpr(R.UNARY);return t.type==="int"?{type:"int",value:-t.value}:t.type==="float"?{type:"float",value:-t.value}:{type:"func",name:"neg",args:[{expr:t}]}}case"!":return this.advance(),{type:"func",name:"not",args:[{expr:this.parseExpr(R.UNARY)}]};default:throw new Error(`Unexpected token: ${n.type} (${n.value})`)}}parseFunctionCall(n){this.expect("(");let t=[];if(this.peek().type!==")")do{t.length>0&&this.peek().type===","&&this.advance();let s;if(this.peek().type==="ident"){let o=this.peek().value,a=this.pos+1;a<this.tokens.length&&this.tokens[a].type==="="&&(s=o,this.advance(),this.advance())}let r=this.parseExpr(0);t.push({name:s,expr:r})}while(this.peek().type===",");return this.expect(")"),{type:"func",name:n.toLowerCase(),args:t}}parseList(){this.expect("[");let n=[];if(this.peek().type!=="]")do n.length>0&&this.peek().type===","&&this.advance(),n.push(this.parseExpr(0));while(this.peek().type===",");return this.expect("]"),{type:"list",elements:n}}parseMap(){this.expect("{");let n=[];if(this.peek().type!=="}")do{n.length>0&&this.peek().type===","&&this.advance();let t;if(this.peek().type==="ident")t=this.peek().value,this.advance();else if(this.peek().type==="string")t=this.peek().value,this.advance();else throw new Error(`Expected map key, got ${this.peek().type}`);this.expect(":");let s=this.parseExpr(0);n.push({key:t,value:s})}while(this.peek().type===",");return this.expect("}"),{type:"map",entries:n}}parseInfix(n,t){let s=this.peek(),o=new Map([["+","add"],["-","sub"],["*","mul"],["/","div"],["//","idiv"],["%","mod"],["**","pow"],["++","concat"],["==","=="],["!=","!="],["<","<"],["<=","<="],[">",">"],[">=",">="],["eq","eq"],["ne","ne"],["lt","lt"],["le","le"],["gt","gt"],["ge","ge"],["&&","and"],["and","and"],["||","or"],["or","or"]]).get(s.type);if(o!==void 0){this.advance();let a=this.parseExpr(t+(this.isRightAssoc(s.type)?0:1));return{type:"func",name:o,args:[{expr:n},{expr:a}]}}if(s.type==="|"){this.advance();let a=this.parseExpr(t);return this.handlePipe(n,a)}if(s.type===".")return this.advance(),this.handleDot(n);if(s.type==="[")return this.advance(),this.handleIndexing(n);if(s.type==="in")return this.advance(),{type:"func",name:"contains",args:[{expr:this.parseExpr(t+1)},{expr:n}]};if(s.type==="not in")return this.advance(),{type:"func",name:"not",args:[{expr:{type:"func",name:"contains",args:[{expr:this.parseExpr(t+1)},{expr:n}]}}]};throw new Error(`Unexpected infix token: ${s.type}`)}handlePipe(n,t){if(t.type==="identifier")return{type:"func",name:t.name,args:[{expr:n}]};if(t.type==="func"){let s=this.countUnderscores(t);return s===0?t:s===1?this.fillUnderscore(t,n):{type:"pipeline",exprs:[n,t]}}return this.countUnderscores(t)===1?this.fillUnderscore(t,n):t}handleDot(n){let t=this.peek();if(t.type==="ident"){let s=t.value;if(this.advance(),this.peek().type==="("){let r=this.parseFunctionCall(s);return r.type==="func"&&r.args.unshift({expr:n}),r}return{type:"func",name:"get",args:[{expr:n},{expr:{type:"string",value:s}}]}}if(t.type==="int"){let s=Number.parseInt(t.value,10);return this.advance(),{type:"func",name:"get",args:[{expr:n},{expr:{type:"int",value:s}}]}}if(t.type==="string"){let s=t.value;return this.advance(),{type:"func",name:"get",args:[{expr:n},{expr:{type:"string",value:s}}]}}throw new Error(`Expected identifier, number, or string after dot, got ${t.type}`)}handleIndexing(n){if(this.peek().type===":"){if(this.advance(),this.peek().type==="]")return this.advance(),{type:"func",name:"slice",args:[{expr:n}]};let s=this.parseExpr(0);return this.expect("]"),{type:"func",name:"slice",args:[{expr:n},{expr:{type:"int",value:0}},{expr:s}]}}let t=this.parseExpr(0);if(this.peek().type===":"){if(this.advance(),this.peek().type==="]")return this.advance(),{type:"func",name:"slice",args:[{expr:n},{expr:t}]};let s=this.parseExpr(0);return this.expect("]"),{type:"func",name:"slice",args:[{expr:n},{expr:t},{expr:s}]}}return this.expect("]"),{type:"func",name:"get",args:[{expr:n},{expr:t}]}}countUnderscores(n){return n.type==="underscore"?1:n.type==="func"?n.args.reduce((t,s)=>t+this.countUnderscores(s.expr),0):n.type==="list"?n.elements.reduce((t,s)=>t+this.countUnderscores(s),0):n.type==="map"?n.entries.reduce((t,s)=>t+this.countUnderscores(s.value),0):0}fillUnderscore(n,t){return n.type==="underscore"?t:n.type==="func"?{...n,args:n.args.map(s=>({...s,expr:this.fillUnderscore(s.expr,t)}))}:n.type==="list"?{...n,elements:n.elements.map(s=>this.fillUnderscore(s,t))}:n.type==="map"?{...n,entries:n.entries.map(s=>({...s,value:this.fillUnderscore(s.value,t)}))}:n}bindLambdaArgs(n,t){return{...n,body:this.bindLambdaArgsInExpr(n.body,t)}}bindLambdaArgsInExpr(n,t){return n.type==="identifier"&&t.includes(n.name)?{type:"lambdaBinding",name:n.name}:n.type==="func"?{...n,args:n.args.map(s=>({...s,expr:this.bindLambdaArgsInExpr(s.expr,t)}))}:n.type==="list"?{...n,elements:n.elements.map(s=>this.bindLambdaArgsInExpr(s,t))}:n.type==="map"?{...n,entries:n.entries.map(s=>({...s,value:this.bindLambdaArgsInExpr(s.value,t)}))}:n}getInfixPrec(n){switch(n){case"|":return R.PIPE;case"||":case"or":return R.OR;case"&&":case"and":return R.AND;case"==":case"!=":case"eq":case"ne":return R.EQUALITY;case"<":case"<=":case">":case">=":case"lt":case"le":case"gt":case"ge":case"in":case"not in":return R.COMPARISON;case"+":case"-":case"++":return R.ADDITIVE;case"*":case"/":case"//":case"%":return R.MULTIPLICATIVE;case"**":return R.POWER;case".":case"[":return R.POSTFIX;default:return-1}}isRightAssoc(n){return n==="**"}peek(){return this.tokens[this.pos]||{type:"eof",value:"",pos:0}}peekAt(n){return this.tokens[this.pos+n]||{type:"eof",value:"",pos:0}}advance(){return this.tokens[this.pos++]}expect(n){let t=this.peek();if(t.type!==n)throw new Error(`Expected ${n}, got ${t.type}`);return this.advance()}}});V();function E(e,n){return n.length===0?I(e,[]):n.length===1?{type:"Pipe",left:n[0],right:I(e,[])}:{type:"Pipe",left:n[0],right:I(e,n.slice(1))}}var K={add:e=>S("+",e[0],e[1]),sub:e=>S("-",e[0],e[1]),mul:e=>S("*",e[0],e[1]),div:e=>S("/",e[0],e[1]),mod:e=>S("%",e[0],e[1]),idiv:e=>I("floor",[S("/",e[0],e[1])]),pow:e=>E("pow",e),neg:e=>({type:"UnaryOp",op:"-",operand:e[0]}),"==":e=>S("==",e[0],e[1]),"!=":e=>S("!=",e[0],e[1]),"<":e=>S("<",e[0],e[1]),"<=":e=>S("<=",e[0],e[1]),">":e=>S(">",e[0],e[1]),">=":e=>S(">=",e[0],e[1]),eq:e=>S("==",P(e[0]),P(e[1])),ne:e=>S("!=",P(e[0]),P(e[1])),lt:e=>S("<",P(e[0]),P(e[1])),le:e=>S("<=",P(e[0]),P(e[1])),gt:e=>S(">",P(e[0]),P(e[1])),ge:e=>S(">=",P(e[0]),P(e[1])),and:e=>S("and",e[0],e[1]),or:e=>S("or",e[0],e[1]),not:e=>({type:"UnaryOp",op:"not",operand:e[0]}),len:e=>E("length",e),length:e=>E("length",e),upper:e=>E("ascii_upcase",e),lower:e=>E("ascii_downcase",e),trim:e=>E("trim",e),ltrim:e=>e.length===0?I("ltrimstr",[{type:"Literal",value:" "}]):{type:"Pipe",left:e[0],right:I("ltrimstr",[{type:"Literal",value:" "}])},rtrim:e=>e.length===0?I("rtrimstr",[{type:"Literal",value:" "}]):{type:"Pipe",left:e[0],right:I("rtrimstr",[{type:"Literal",value:" "}])},split:e=>E("split",e),join:e=>e.length===1?I("join",[{type:"Literal",value:""}]):E("join",e),concat:e=>S("+",e[0],e[1]),startswith:e=>E("startswith",e),endswith:e=>E("endswith",e),contains:e=>E("contains",e),replace:e=>E("gsub",e),substr:e=>e.length===2?{type:"Slice",base:e[0],start:e[1]}:{type:"Slice",base:e[0],start:e[1],end:S("+",e[1],e[2])},abs:e=>E("fabs",e),floor:e=>E("floor",e),ceil:e=>E("ceil",e),round:e=>E("round",e),sqrt:e=>E("sqrt",e),log:e=>E("log",e),log10:e=>E("log10",e),log2:e=>E("log2",e),exp:e=>E("exp",e),sin:e=>E("sin",e),cos:e=>E("cos",e),tan:e=>E("tan",e),asin:e=>E("asin",e),acos:e=>E("acos",e),atan:e=>E("atan",e),min:e=>E("min",e),max:e=>E("max",e),first:e=>e.length===0?{type:"Index",index:{type:"Literal",value:0}}:{type:"Index",index:{type:"Literal",value:0},base:e[0]},last:e=>e.length===0?{type:"Index",index:{type:"Literal",value:-1}}:{type:"Index",index:{type:"Literal",value:-1},base:e[0]},get:e=>e.length===1?{type:"Index",index:e[0]}:{type:"Index",index:e[1],base:e[0]},slice:e=>e.length===1?{type:"Slice",base:e[0]}:e.length===2?{type:"Slice",base:e[0],start:e[1]}:{type:"Slice",base:e[0],start:e[1],end:e[2]},keys:"keys",values:"values",entries:e=>I("to_entries",e),from_entries:"from_entries",reverse:"reverse",sort:"sort",sort_by:"sort_by",group_by:"group_by",unique:"unique",unique_by:"unique_by",flatten:"flatten",map:e=>({type:"Pipe",left:e[0],right:{type:"Array",elements:e[1]}}),select:e=>I("select",e),empty:()=>I("empty",[]),count:()=>I("length",[]),sum:e=>e.length===0?I("add",[]):{type:"Pipe",left:{type:"Array",elements:e[0]},right:I("add",[])},mean:e=>e.length===0?{type:"Pipe",left:{type:"Identity"},right:S("/",I("add",[]),I("length",[]))}:{type:"Pipe",left:{type:"Array",elements:e[0]},right:S("/",I("add",[]),I("length",[]))},avg:e=>e.length===0?{type:"Pipe",left:{type:"Identity"},right:S("/",I("add",[]),I("length",[]))}:{type:"Pipe",left:{type:"Array",elements:e[0]},right:S("/",I("add",[]),I("length",[]))},type:"type",isnull:e=>e.length===0?S("==",{type:"Identity"},{type:"Literal",value:null}):S("==",e[0],{type:"Literal",value:null}),isempty:e=>e.length===0?S("==",{type:"Identity"},{type:"Literal",value:""}):S("==",e[0],{type:"Literal",value:""}),tonumber:e=>e.length===0?I("tonumber",[]):I("tonumber",e),tostring:e=>e.length===0?I("tostring",[]):I("tostring",e),if:e=>Ke(e[0],e[1],e[2]),coalesce:e=>{if(e.length===0)return{type:"Literal",value:null};if(e.length===1)return e[0];let[n,...t]=e,s=S("and",S("!=",n,{type:"Literal",value:null}),S("!=",n,{type:"Literal",value:""}));return Ke(s,n,t.length===1?t[0]:K.coalesce(t))},index:()=>({type:"Field",name:"_row_index"}),now:()=>I("now",[]),fmt:e=>I("tostring",e),format:e=>I("tostring",e)};Object.setPrototypeOf(K,null);function S(e,n,t){return{type:"BinaryOp",op:e,left:n,right:t}}function I(e,n){return{type:"Call",name:e,args:n}}var rt="then";function Ke(e,n,t){let s=qe({type:"Cond",cond:e,elifs:[],else:t||{type:"Literal",value:null}});return s[rt]=n,s}function P(e){return{type:"Pipe",left:e,right:{type:"Call",name:"tostring",args:[]}}}function O(e,n=!0){switch(e.type){case"int":case"float":return{type:"Literal",value:e.value};case"string":return{type:"Literal",value:e.value};case"bool":return{type:"Literal",value:e.value};case"null":return{type:"Literal",value:null};case"underscore":return{type:"Index",base:{type:"Identity"},index:{type:"Literal",value:"_"}};case"identifier":return n?{type:"Field",name:e.name}:{type:"VarRef",name:e.name};case"lambdaBinding":return{type:"VarRef",name:e.name};case"func":{let t=e.args.map(r=>O(r.expr,n)),s=Object.hasOwn(K,e.name)?K[e.name]:void 0;return typeof s=="function"?s(t):I(typeof s=="string"?s:e.name,t)}case"list":return e.elements.length===0?{type:"Array"}:{type:"Array",elements:e.elements.reduce((t,s,r)=>{let o=O(s,n);return r===0?o:{type:"Comma",left:t,right:o}},null)};case"map":return{type:"Object",entries:e.entries.map(t=>({key:t.key,value:O(t.value,n)}))};case"regex":return{type:"Literal",value:e.pattern};case"slice":return{type:"Slice",start:e.start?O(e.start,n):void 0,end:e.end?O(e.end,n):void 0};case"lambda":return O(e.body,n);case"pipeline":return{type:"Identity"};default:throw new Error(`Unknown moonblade expression type: ${e.type}`)}}function ee(e){let n=[],t=0;for(;t<e.length;){for(;t<e.length&&(e[t]===" "||e[t]===",");)t++;if(t>=e.length)break;let s=t;for(;t<e.length&&/\w/.test(e[t]);)t++;let r=e.slice(s,t);for(;t<e.length&&e[t]===" ";)t++;if(e[t]!=="(")break;t++;let o=1,a=t;for(;t<e.length&&o>0;)e[t]==="("?o++:e[t]===")"&&o--,o>0&&t++;let d=e.slice(a,t).trim();for(t++;t<e.length&&e[t]===" ";)t++;let u="";if(e.slice(t,t+3).toLowerCase()==="as "){for(t+=3;t<e.length&&e[t]===" ";)t++;let p=t;for(;t<e.length&&/\w/.test(e[t]);)t++;u=e.slice(p,t)}u||(u=d?`${r}(${d})`:`${r}()`),n.push({func:r,expr:d,alias:u})}return n}function Be(e){return/^\w+$/.test(e)}function Q(e,n,t){let s=O(H(n)),r=$(e,s,t);return r.length>0?r[0]:null}function te(e,n,t={}){let{func:s,expr:r}=n;if(s==="count"&&!r)return e.length;let o;switch(Be(r)?o=e.map(a=>a[r]).filter(a=>a!=null):o=e.map(a=>Q(a,r,t)).filter(a=>a!=null),s){case"count":return Be(r)?o.length:o.filter(a=>!!a).length;case"sum":return o.map(d=>typeof d=="number"?d:Number.parseFloat(String(d))).reduce((d,u)=>d+u,0);case"mean":case"avg":{let a=o.map(d=>typeof d=="number"?d:Number.parseFloat(String(d)));return a.length>0?a.reduce((d,u)=>d+u,0)/a.length:0}case"min":{let a=o.map(d=>typeof d=="number"?d:Number.parseFloat(String(d)));return a.length>0?Math.min(...a):null}case"max":{let a=o.map(d=>typeof d=="number"?d:Number.parseFloat(String(d)));return a.length>0?Math.max(...a):null}case"first":return o.length>0?o[0]:null;case"last":return o.length>0?o[o.length-1]:null;case"median":{let a=o.map(u=>typeof u=="number"?u:Number.parseFloat(String(u))).filter(u=>!Number.isNaN(u)).sort((u,p)=>u-p);if(a.length===0)return null;let d=Math.floor(a.length/2);return a.length%2===0?(a[d-1]+a[d])/2:a[d]}case"mode":{let a=new Map;for(let p of o){let c=String(p);a.set(c,(a.get(c)||0)+1)}let d=0,u=null;for(let[p,c]of a)c>d&&(d=c,u=p);return u}case"cardinality":return new Set(o.map(d=>String(d))).size;case"values":return o.map(a=>String(a)).join("|");case"distinct_values":return[...new Set(o.map(d=>String(d)))].sort().join("|");case"all":{if(e.length===0)return!0;for(let a of e)if(!Q(a,r,t))return!1;return!0}case"any":{for(let a of e)if(Q(a,r,t))return!0;return!1}default:return null}}function Ge(e,n,t={}){let s=F();for(let r of n)b(s,r.alias,te(e,r,t));return s}async function ne(e,n){let t="",s=[];for(let c of e)c.startsWith("-")||(t?s.push(c):t=c);if(!t)return{stdout:"",stderr:`xan agg: no aggregation expression
@@ -59,7 +59,7 @@ import{a as F,b,c as M,d as He,e as w,f as v,g as Y,h as Z}from"./chunk-VPADYNBD
59
59
  `,exitCode:1};a=o[0].headers}let d=[];for(let{headers:u,data:p}of o)for(let c of p){let h=F();for(let l of a)b(h,l,u.includes(l)?c[l]:"");d.push(h)}return{stdout:w(a,d),stderr:"",exitCode:0}}async function De(e,n){let t="",s=[],r=!1,o=!1,a=[];for(let i=0;i<e.length;i++){let f=e[i];(f==="-s"||f==="--select")&&i+1<e.length?s=e[++i].split(","):f==="-v"||f==="--invert"?r=!0:f==="-i"||f==="--ignore-case"?o=!0:f==="-r"||f==="--regex"||f.startsWith("-")||(t?a.push(f):t=f)}if(!t)return{stdout:"",stderr:`xan search: no pattern specified
60
60
  `,exitCode:1};let{headers:d,data:u,error:p}=await v(a,n);if(p)return p;let c=s.length>0?s:d,h;try{h=J(t,o?"i":"")}catch{return{stdout:"",stderr:`xan search: invalid regex pattern '${t}'
61
61
  `,exitCode:1}}let l=u.filter(i=>{let f=c.some(m=>{let g=i[m];return g!=null&&h.test(String(g))});return r?!f:f});return{stdout:w(d,l),stderr:"",exitCode:0}}async function Ue(e,n){let t="",s=[];for(let l of e)l.startsWith("-")||(t?s.push(l):t=l);if(!t)return{stdout:"",stderr:`xan flatmap: no expression specified
62
- `,exitCode:1};let{headers:r,data:o,error:a}=await v(s,n);if(a)return a;let u=U(t).map(({expr:l,name:i})=>({alias:typeof i=="string"?i:i[0],ast:O(l)})),p={limits:n.limits?{maxIterations:n.limits.maxJqIterations}:void 0},c=[...r,...u.map(l=>l.alias)],h=[];for(let l of o){let i=[],f=1;for(let m of u){let g=$(l,m.ast,p),y=g.length>0&&Array.isArray(g[0])?g[0]:g;i.push(y),f=Math.max(f,y.length)}for(let m=0;m<f;m++){let g=M(l);for(let y=0;y<u.length;y++){let x=i[y][m]??null;b(g,u[y].alias,x)}h.push(g)}}return{stdout:w(c,h),stderr:"",exitCode:0}}async function Ve(e,n){let{cmdView:t}=await import("./xan-view-HDVKHFC2.js");return t(e,n)}var Qe=new Set(["fuzzy-join","glob","hist","input","parallel","plot","progress","range","scrape","tokenize","union-find"]),pt=new Set(["agg","behead","cat","count","dedup","drop","enum","explode","f","filter","fixlengths","flatmap","flatten","fmt","frequency","freq","from","groupby","head","headers","implode","join","map","merge","partition","pivot","rename","reverse","sample","search","select","shuffle","slice","sort","split","stats","tail","to","top","transform","transpose","view",...Qe]),Ze={name:"xan",summary:"CSV toolkit for data manipulation",usage:"xan <COMMAND> [OPTIONS] [FILE]",description:`xan is a collection of commands for working with CSV data.
62
+ `,exitCode:1};let{headers:r,data:o,error:a}=await v(s,n);if(a)return a;let u=U(t).map(({expr:l,name:i})=>({alias:typeof i=="string"?i:i[0],ast:O(l)})),p={limits:n.limits?{maxIterations:n.limits.maxJqIterations}:void 0},c=[...r,...u.map(l=>l.alias)],h=[];for(let l of o){let i=[],f=1;for(let m of u){let g=$(l,m.ast,p),y=g.length>0&&Array.isArray(g[0])?g[0]:g;i.push(y),f=Math.max(f,y.length)}for(let m=0;m<f;m++){let g=M(l);for(let y=0;y<u.length;y++){let x=i[y][m]??null;b(g,u[y].alias,x)}h.push(g)}}return{stdout:w(c,h),stderr:"",exitCode:0}}async function Ve(e,n){let{cmdView:t}=await import("./xan-view-YATJ4KAA.js");return t(e,n)}var Qe=new Set(["fuzzy-join","glob","hist","input","parallel","plot","progress","range","scrape","tokenize","union-find"]),pt=new Set(["agg","behead","cat","count","dedup","drop","enum","explode","f","filter","fixlengths","flatmap","flatten","fmt","frequency","freq","from","groupby","head","headers","implode","join","map","merge","partition","pivot","rename","reverse","sample","search","select","shuffle","slice","sort","split","stats","tail","to","top","transform","transpose","view",...Qe]),Ze={name:"xan",summary:"CSV toolkit for data manipulation",usage:"xan <COMMAND> [OPTIONS] [FILE]",description:`xan is a collection of commands for working with CSV data.
63
63
  It provides a simple, ergonomic interface for common data operations.
64
64
 
65
65
  COMMANDS:
@@ -1,2 +1,2 @@
1
1
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
- import{a as s}from"./chunk-EBAPSGAO.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};
2
+ import{a as s}from"./chunk-AXMYAPFA.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};
@@ -1,5 +1,5 @@
1
1
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
- import{a as $l}from"./chunk-4I3HOE5Z.js";import{a as Be,b as er}from"./chunk-LEKBROJD.js";import{d as D}from"./chunk-4WKZNNJK.js";import{a as Qi,b as Zi}from"./chunk-L64BMZUV.js";import{a as Bs}from"./chunk-TN7HHBQW.js";import{c as Hi}from"./chunk-NRSASXYY.js";import{k as Vs}from"./chunk-SAI2SPQQ.js";import{a as js}from"./chunk-FOCWZZDE.js";import{a as Xi,b as zi,c as he}from"./chunk-QAYAQNCG.js";import{a as Ot,c as w,e as Fs}from"./chunk-BZUGFHVS.js";var xr=w((xm,_r)=>{var{hasOwnProperty:nn}=Object.prototype,rn=(s,e={})=>{typeof e=="string"&&(e={section:e}),e.align=e.align===!0,e.newline=e.newline===!0,e.sort=e.sort===!0,e.whitespace=e.whitespace===!0||e.align===!0,e.platform=e.platform||typeof process<"u"&&process.platform,e.bracketedArray=e.bracketedArray!==!1;let t=e.platform==="win32"?`\r
2
+ import{a as $l}from"./chunk-4I3HOE5Z.js";import{a as Be,b as er}from"./chunk-LZUPLYFM.js";import{d as D}from"./chunk-4WKZNNJK.js";import{a as Qi,b as Zi}from"./chunk-KAPG5ONA.js";import{a as Bs}from"./chunk-VACKIICN.js";import{c as Hi}from"./chunk-XEKXHOPO.js";import{k as Vs}from"./chunk-SAI2SPQQ.js";import{a as js}from"./chunk-FOCWZZDE.js";import{a as Xi,b as zi,c as he}from"./chunk-QAYAQNCG.js";import{a as Ot,c as w,e as Fs}from"./chunk-BZUGFHVS.js";var xr=w((xm,_r)=>{var{hasOwnProperty:nn}=Object.prototype,rn=(s,e={})=>{typeof e=="string"&&(e={section:e}),e.align=e.align===!0,e.newline=e.newline===!0,e.sort=e.sort===!0,e.whitespace=e.whitespace===!0||e.align===!0,e.platform=e.platform||typeof process<"u"&&process.platform,e.bracketedArray=e.bracketedArray!==!1;let t=e.platform==="win32"?`\r
3
3
  `:`
4
4
  `,n=e.whitespace?" = ":"=",i=[],r=e.sort?Object.keys(s).sort():Object.keys(s),o=0;e.align&&(o=z(r.filter(c=>s[c]===null||Array.isArray(s[c])||typeof s[c]!="object").map(c=>Array.isArray(s[c])?`${c}[]`:c).concat([""]).reduce((c,u)=>z(c).length>=z(u).length?c:u)).length);let a="",l=e.bracketedArray?"[]":"";for(let c of r){let u=s[c];if(u&&Array.isArray(u))for(let f of u)a+=z(`${c}${l}`).padEnd(o," ")+n+z(f)+t;else u&&typeof u=="object"?i.push(c):a+=z(c).padEnd(o," ")+n+z(u)+t}e.section&&a.length&&(a="["+z(e.section)+"]"+(e.newline?t+t:t)+a);for(let c of i){let u=qr(c,".").join("\\."),f=(e.section?e.section+".":"")+u,h=rn(s[c],{...e,section:f});a.length&&h.length&&(a+=t),a+=h}return a};function qr(s,e){var t=0,n=0,i=0,r=[];do if(i=s.indexOf(e,t),i!==-1){if(t=i+e.length,i>0&&s[i-1]==="\\")continue;r.push(s.slice(n,i)),n=i+e.length}while(i!==-1);return r.push(s.slice(n)),r}var Lr=(s,e={})=>{e.bracketedArray=e.bracketedArray!==!1;let t=Object.create(null),n=t,i=null,r=/^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i,o=s.split(/[\r\n]+/g),a={};for(let c of o){if(!c||c.match(/^\s*[;#]/)||c.match(/^\s*$/))continue;let u=c.match(r);if(!u)continue;if(u[1]!==void 0){if(i=Mt(u[1]),i==="__proto__"){n=Object.create(null);continue}n=t[i]=t[i]||Object.create(null);continue}let f=Mt(u[2]),h;e.bracketedArray?h=f.length>2&&f.slice(-2)==="[]":(a[f]=(a?.[f]||0)+1,h=a[f]>1);let p=h&&f.endsWith("[]")?f.slice(0,-2):f;if(p==="__proto__")continue;let g=u[3]?Mt(u[4]):!0,d=g==="true"||g==="false"||g==="null"?JSON.parse(g):g;h&&(nn.call(n,p)?Array.isArray(n[p])||(n[p]=[n[p]]):n[p]=[]),Array.isArray(n[p])?n[p].push(d):n[p]=d}let l=[];for(let c of Object.keys(t)){if(!nn.call(t,c)||typeof t[c]!="object"||Array.isArray(t[c]))continue;let u=qr(c,".");n=t;let f=u.pop(),h=f.replace(/\\\./g,".");for(let p of u)p!=="__proto__"&&((!nn.call(n,p)||typeof n[p]!="object")&&(n[p]=Object.create(null)),n=n[p]);n===t&&h===f||(n[h]=t[c],l.push(c))}for(let c of l)delete t[c];return t},Pr=s=>s.startsWith('"')&&s.endsWith('"')||s.startsWith("'")&&s.endsWith("'"),z=s=>typeof s!="string"||s.match(/[=\r\n]/)||s.match(/^\[/)||s.length>1&&Pr(s)||s!==s.trim()?JSON.stringify(s):s.split(";").join("\\;").split("#").join("\\#"),Mt=s=>{if(s=(s||"").trim(),Pr(s)){s.charAt(0)==="'"&&(s=s.slice(1,-1));try{s=JSON.parse(s)}catch{}}else{let e=!1,t="";for(let n=0,i=s.length;n<i;n++){let r=s.charAt(n);if(e)"\\;#".indexOf(r)!==-1?t+=r:t+="\\"+r,e=!1;else{if(";#".indexOf(r)!==-1)break;r==="\\"?e=!0:t+=r}}return e&&(t+="\\"),t.trim()}return s};_r.exports={parse:Lr,decode:Lr,stringify:rn,encode:rn,safe:z,unsafe:Mt}});var C=w(x=>{"use strict";var un=Symbol.for("yaml.alias"),Ur=Symbol.for("yaml.document"),jt=Symbol.for("yaml.map"),Kr=Symbol.for("yaml.pair"),fn=Symbol.for("yaml.scalar"),Ut=Symbol.for("yaml.seq"),Q=Symbol.for("yaml.node.type"),zc=s=>!!s&&typeof s=="object"&&s[Q]===un,Qc=s=>!!s&&typeof s=="object"&&s[Q]===Ur,Zc=s=>!!s&&typeof s=="object"&&s[Q]===jt,eu=s=>!!s&&typeof s=="object"&&s[Q]===Kr,Yr=s=>!!s&&typeof s=="object"&&s[Q]===fn,tu=s=>!!s&&typeof s=="object"&&s[Q]===Ut;function Dr(s){if(s&&typeof s=="object")switch(s[Q]){case jt:case Ut:return!0}return!1}function su(s){if(s&&typeof s=="object")switch(s[Q]){case un:case jt:case fn:case Ut:return!0}return!1}var nu=s=>(Yr(s)||Dr(s))&&!!s.anchor;x.ALIAS=un;x.DOC=Ur;x.MAP=jt;x.NODE_TYPE=Q;x.PAIR=Kr;x.SCALAR=fn;x.SEQ=Ut;x.hasAnchor=nu;x.isAlias=zc;x.isCollection=Dr;x.isDocument=Qc;x.isMap=Zc;x.isNode=su;x.isPair=eu;x.isScalar=Yr;x.isSeq=tu});var He=w(hn=>{"use strict";var _=C(),V=Symbol("break visit"),Jr=Symbol("skip children"),H=Symbol("remove node");function Kt(s,e){let t=Gr(e);_.isDocument(s)?ke(null,s.contents,t,Object.freeze([s]))===H&&(s.contents=null):ke(null,s,t,Object.freeze([]))}Kt.BREAK=V;Kt.SKIP=Jr;Kt.REMOVE=H;function ke(s,e,t,n){let i=Wr(s,e,t,n);if(_.isNode(i)||_.isPair(i))return Hr(s,n,i),ke(s,i,t,n);if(typeof i!="symbol"){if(_.isCollection(e)){n=Object.freeze(n.concat(e));for(let r=0;r<e.items.length;++r){let o=ke(r,e.items[r],t,n);if(typeof o=="number")r=o-1;else{if(o===V)return V;o===H&&(e.items.splice(r,1),r-=1)}}}else if(_.isPair(e)){n=Object.freeze(n.concat(e));let r=ke("key",e.key,t,n);if(r===V)return V;r===H&&(e.key=null);let o=ke("value",e.value,t,n);if(o===V)return V;o===H&&(e.value=null)}}return i}async function Yt(s,e){let t=Gr(e);_.isDocument(s)?await Ie(null,s.contents,t,Object.freeze([s]))===H&&(s.contents=null):await Ie(null,s,t,Object.freeze([]))}Yt.BREAK=V;Yt.SKIP=Jr;Yt.REMOVE=H;async function Ie(s,e,t,n){let i=await Wr(s,e,t,n);if(_.isNode(i)||_.isPair(i))return Hr(s,n,i),Ie(s,i,t,n);if(typeof i!="symbol"){if(_.isCollection(e)){n=Object.freeze(n.concat(e));for(let r=0;r<e.items.length;++r){let o=await Ie(r,e.items[r],t,n);if(typeof o=="number")r=o-1;else{if(o===V)return V;o===H&&(e.items.splice(r,1),r-=1)}}}else if(_.isPair(e)){n=Object.freeze(n.concat(e));let r=await Ie("key",e.key,t,n);if(r===V)return V;r===H&&(e.key=null);let o=await Ie("value",e.value,t,n);if(o===V)return V;o===H&&(e.value=null)}}return i}function Gr(s){return typeof s=="object"&&(s.Collection||s.Node||s.Value)?Object.assign({Alias:s.Node,Map:s.Node,Scalar:s.Node,Seq:s.Node},s.Value&&{Map:s.Value,Scalar:s.Value,Seq:s.Value},s.Collection&&{Map:s.Collection,Seq:s.Collection},s):s}function Wr(s,e,t,n){if(typeof t=="function")return t(s,e,n);if(_.isMap(e))return t.Map?.(s,e,n);if(_.isSeq(e))return t.Seq?.(s,e,n);if(_.isPair(e))return t.Pair?.(s,e,n);if(_.isScalar(e))return t.Scalar?.(s,e,n);if(_.isAlias(e))return t.Alias?.(s,e,n)}function Hr(s,e,t){let n=e[e.length-1];if(_.isCollection(n))n.items[s]=t;else if(_.isPair(n))s==="key"?n.key=t:n.value=t;else if(_.isDocument(n))n.contents=t;else{let i=_.isAlias(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}hn.visit=Kt;hn.visitAsync=Yt});var dn=w(zr=>{"use strict";var Xr=C(),iu=He(),ru={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},ou=s=>s.replace(/[!,[\]{}]/g,e=>ru[e]),Xe=class s{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},s.defaultYaml,e),this.tags=Object.assign({},s.defaultTags,t)}clone(){let e=new s(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new s(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:s.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},s.defaultTags);break}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:s.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},s.defaultTags),this.atNextDocument=!1);let n=e.trim().split(/[ \t]+/),i=n.shift();switch(i){case"%TAG":{if(n.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;let[r,o]=n;return this.tags[r]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,n.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;let[r]=n;if(r==="1.1"||r==="1.2")return this.yaml.version=r,!0;{let o=/^\d+\.\d+$/.test(r);return t(6,`Unsupported YAML version ${r}`,o),!1}}default:return t(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let o=e.slice(2,-1);return o==="!"||o==="!!"?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&t("Verbatim tags must end with a >"),o)}let[,n,i]=e.match(/^(.*!)([^!]*)$/s);i||t(`The ${e} tag has no suffix`);let r=this.tags[n];if(r)try{return r+decodeURIComponent(i)}catch(o){return t(String(o)),null}return n==="!"?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+ou(e.substring(n.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags),i;if(e&&n.length>0&&Xr.isNode(e.contents)){let r={};iu.visit(e.contents,(o,a)=>{Xr.isNode(a)&&a.tag&&(r[a.tag]=!0)}),i=Object.keys(r)}else i=[];for(let[r,o]of n)r==="!!"&&o==="tag:yaml.org,2002:"||(!e||i.some(a=>a.startsWith(o)))&&t.push(`%TAG ${r} ${o}`);return t.join(`
5
5
  `)}};Xe.defaultYaml={explicit:!1,version:"1.2"};Xe.defaultTags={"!!":"tag:yaml.org,2002:"};zr.Directives=Xe});var Dt=w(ze=>{"use strict";var Qr=C(),au=He();function lu(s){if(/[\x00-\x19\s,[\]{}]/.test(s)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(s)}`;throw new Error(t)}return!0}function Zr(s){let e=new Set;return au.visit(s,{Value(t,n){n.anchor&&e.add(n.anchor)}}),e}function eo(s,e){for(let t=1;;++t){let n=`${s}${t}`;if(!e.has(n))return n}}function cu(s,e){let t=[],n=new Map,i=null;return{onAnchor:r=>{t.push(r),i??(i=Zr(s));let o=eo(e,i);return i.add(o),o},setAnchors:()=>{for(let r of t){let o=n.get(r);if(typeof o=="object"&&o.anchor&&(Qr.isScalar(o.node)||Qr.isCollection(o.node)))o.node.anchor=o.anchor;else{let a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=r,a}}},sourceObjects:n}}ze.anchorIsValid=lu;ze.anchorNames=Zr;ze.createNodeAnchors=cu;ze.findNewAnchor=eo});var pn=w(to=>{"use strict";function Qe(s,e,t,n){if(n&&typeof n=="object")if(Array.isArray(n))for(let i=0,r=n.length;i<r;++i){let o=n[i],a=Qe(s,n,String(i),o);a===void 0?delete n[i]:a!==o&&(n[i]=a)}else if(n instanceof Map)for(let i of Array.from(n.keys())){let r=n.get(i),o=Qe(s,n,i,r);o===void 0?n.delete(i):o!==r&&n.set(i,o)}else if(n instanceof Set)for(let i of Array.from(n)){let r=Qe(s,n,i,i);r===void 0?n.delete(i):r!==i&&(n.delete(i),n.add(r))}else for(let[i,r]of Object.entries(n)){let o=Qe(s,n,i,r);o===void 0?delete n[i]:o!==r&&(n[i]=o)}return s.call(e,t,n)}to.applyReviver=Qe});var se=w(no=>{"use strict";var uu=C();function so(s,e,t){if(Array.isArray(s))return s.map((n,i)=>so(n,String(i),t));if(s&&typeof s.toJSON=="function"){if(!t||!uu.hasAnchor(s))return s.toJSON(e,t);let n={aliasCount:0,count:1,res:void 0};t.anchors.set(s,n),t.onCreate=r=>{n.res=r,delete t.onCreate};let i=s.toJSON(e,t);return t.onCreate&&t.onCreate(i),i}return typeof s=="bigint"&&!t?.keep?Number(s):s}no.toJS=so});var Jt=w(ro=>{"use strict";var fu=pn(),io=C(),hu=se(),mn=class{constructor(e){Object.defineProperty(this,io.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:i,reviver:r}={}){if(!io.isDocument(e))throw new TypeError("A document argument is required");let o={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},a=hu.toJS(this,"",o);if(typeof i=="function")for(let{count:l,res:c}of o.anchors.values())i(c,l);return typeof r=="function"?fu.applyReviver(r,{"":a},"",a):a}};ro.NodeBase=mn});var Ze=w(oo=>{"use strict";var du=Dt(),pu=He(),Le=C(),mu=Jt(),gu=se(),gn=class extends mu.NodeBase{constructor(e){super(Le.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,t){let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],pu.visit(e,{Node:(r,o)=>{(Le.isAlias(o)||Le.hasAnchor(o))&&n.push(o)}}),t&&(t.aliasResolveCache=n));let i;for(let r of n){if(r===this)break;r.anchor===this.source&&(i=r)}return i}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:i,maxAliasCount:r}=t,o=this.resolve(i,t);if(!o){let l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let a=n.get(o);if(a||(gu.toJS(o,null,t),a=n.get(o)),a?.res===void 0){let l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(r>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=Gt(i,o,n)),a.count*a.aliasCount>r)){let l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return a.res}toString(e,t,n){let i=`*${this.source}`;if(e){if(du.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let r=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(r)}if(e.implicitKey)return`${i} `}return i}};function Gt(s,e,t){if(Le.isAlias(e)){let n=e.resolve(s),i=t&&n&&t.get(n);return i?i.count*i.aliasCount:0}else if(Le.isCollection(e)){let n=0;for(let i of e.items){let r=Gt(s,i,t);r>n&&(n=r)}return n}else if(Le.isPair(e)){let n=Gt(s,e.key,t),i=Gt(s,e.value,t);return Math.max(n,i)}return 1}oo.Alias=gn});var L=w(yn=>{"use strict";var yu=C(),bu=Jt(),wu=se(),Su=s=>!s||typeof s!="function"&&typeof s!="object",ne=class extends bu.NodeBase{constructor(e){super(yu.SCALAR),this.value=e}toJSON(e,t){return t?.keep?this.value:wu.toJS(this.value,e,t)}toString(){return String(this.value)}};ne.BLOCK_FOLDED="BLOCK_FOLDED";ne.BLOCK_LITERAL="BLOCK_LITERAL";ne.PLAIN="PLAIN";ne.QUOTE_DOUBLE="QUOTE_DOUBLE";ne.QUOTE_SINGLE="QUOTE_SINGLE";yn.Scalar=ne;yn.isScalarValue=Su});var et=w(lo=>{"use strict";var Nu=Ze(),me=C(),ao=L(),Au="tag:yaml.org,2002:";function Eu(s,e,t){if(e){let n=t.filter(r=>r.tag===e),i=n.find(r=>!r.format)??n[0];if(!i)throw new Error(`Tag ${e} not found`);return i}return t.find(n=>n.identify?.(s)&&!n.format)}function vu(s,e,t){if(me.isDocument(s)&&(s=s.contents),me.isNode(s))return s;if(me.isPair(s)){let f=t.schema[me.MAP].createNode?.(t.schema,null,t);return f.items.push(s),f}(s instanceof String||s instanceof Number||s instanceof Boolean||typeof BigInt<"u"&&s instanceof BigInt)&&(s=s.valueOf());let{aliasDuplicateObjects:n,onAnchor:i,onTagObj:r,schema:o,sourceObjects:a}=t,l;if(n&&s&&typeof s=="object"){if(l=a.get(s),l)return l.anchor??(l.anchor=i(s)),new Nu.Alias(l.anchor);l={anchor:null,node:null},a.set(s,l)}e?.startsWith("!!")&&(e=Au+e.slice(2));let c=Eu(s,e,o.tags);if(!c){if(s&&typeof s.toJSON=="function"&&(s=s.toJSON()),!s||typeof s!="object"){let f=new ao.Scalar(s);return l&&(l.node=f),f}c=s instanceof Map?o[me.MAP]:Symbol.iterator in Object(s)?o[me.SEQ]:o[me.MAP]}r&&(r(c),delete t.onTagObj);let u=c?.createNode?c.createNode(t.schema,s,t):typeof c?.nodeClass?.from=="function"?c.nodeClass.from(t.schema,s,t):new ao.Scalar(s);return e?u.tag=e:c.default||(u.tag=c.tag),l&&(l.node=u),u}lo.createNode=vu});var Ht=w(Wt=>{"use strict";var Tu=et(),X=C(),Cu=Jt();function bn(s,e,t){let n=t;for(let i=e.length-1;i>=0;--i){let r=e[i];if(typeof r=="number"&&Number.isInteger(r)&&r>=0){let o=[];o[r]=n,n=o}else n=new Map([[r,n]])}return Tu.createNode(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:s,sourceObjects:new Map})}var co=s=>s==null||typeof s=="object"&&!!s[Symbol.iterator]().next().done,wn=class extends Cu.NodeBase{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(n=>X.isNode(n)||X.isPair(n)?n.clone(e):n),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(co(e))this.add(t);else{let[n,...i]=e,r=this.get(n,!0);if(X.isCollection(r))r.addIn(i,t);else if(r===void 0&&this.schema)this.set(n,bn(this.schema,i,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let i=this.get(t,!0);if(X.isCollection(i))return i.deleteIn(n);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...i]=e,r=this.get(n,!0);return i.length===0?!t&&X.isScalar(r)?r.value:r:X.isCollection(r)?r.getIn(i,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!X.isPair(t))return!1;let n=t.value;return n==null||e&&X.isScalar(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let i=this.get(t,!0);return X.isCollection(i)?i.hasIn(n):!1}setIn(e,t){let[n,...i]=e;if(i.length===0)this.set(n,t);else{let r=this.get(n,!0);if(X.isCollection(r))r.setIn(i,t);else if(r===void 0&&this.schema)this.set(n,bn(this.schema,i,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}};Wt.Collection=wn;Wt.collectionFromPath=bn;Wt.isEmptyPath=co});var tt=w(Xt=>{"use strict";var Ou=s=>s.replace(/^(?!$)(?: $)?/gm,"#");function Sn(s,e){return/^\n+$/.test(s)?s.substring(1):e?s.replace(/^(?! *$)/gm,e):s}var ku=(s,e,t)=>s.endsWith(`
@@ -1,5 +1,5 @@
1
1
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
- import{a}from"./chunk-4RUAZWKT.js";import{a as d}from"./chunk-FOCWZZDE.js";var S={name:"expr",async execute(s,r){if(s.length===0)return{stdout:"",stderr:`expr: missing operand
2
+ import{a}from"./chunk-7CSMHFIJ.js";import{a as d}from"./chunk-FOCWZZDE.js";var S={name:"expr",async execute(s,r){if(s.length===0)return{stdout:"",stderr:`expr: missing operand
3
3
  `,exitCode:2};try{let c=x(s),h=c==="0"||c===""?1:0;return{stdout:`${c}
4
4
  `,stderr:"",exitCode:h}}catch(c){return{stdout:"",stderr:`expr: ${d(c.message)}
5
5
  `,exitCode:2}}}};function x(s){if(s.length===1)return s[0];let r=0;function c(){let e=h();for(;r<s.length&&s[r]==="|";){r++;let t=h();if(e!=="0"&&e!=="")return e;e=t}return e}function h(){let e=m();for(;r<s.length&&s[r]==="&";){r++;let t=m();(e==="0"||e===""||t==="0"||t==="")&&(e="0")}return e}function m(){let e=g();for(;r<s.length;){let t=s[r];if(["=","!=","<",">","<=",">="].includes(t)){r++;let o=g(),n=parseInt(e,10),i=parseInt(o,10),f=!Number.isNaN(n)&&!Number.isNaN(i),l;t==="="?l=f?n===i:e===o:t==="!="?l=f?n!==i:e!==o:t==="<"?l=f?n<i:e<o:t===">"?l=f?n>i:e>o:t==="<="?l=f?n<=i:e<=o:l=f?n>=i:e>=o,e=l?"1":"0"}else break}return e}function g(){let e=p();for(;r<s.length;){let t=s[r];if(t==="+"||t==="-"){r++;let o=p(),n=parseInt(e,10),i=parseInt(o,10);if(Number.isNaN(n)||Number.isNaN(i))throw new Error("non-integer argument");e=String(t==="+"?n+i:n-i)}else break}return e}function p(){let e=N();for(;r<s.length;){let t=s[r];if(t==="*"||t==="/"||t==="%"){r++;let o=N(),n=parseInt(e,10),i=parseInt(o,10);if(Number.isNaN(n)||Number.isNaN(i))throw new Error("non-integer argument");if((t==="/"||t==="%")&&i===0)throw new Error("division by zero");t==="*"?e=String(n*i):t==="/"?e=String(Math.trunc(n/i)):e=String(n%i)}else break}return e}function N(){let e=u();for(;r<s.length&&s[r]===":";){r++;let t=u(),n=a(`^${t}`).match(e);n?e=n[1]!==void 0?n[1]:String(n[0].length):e="0"}return e}function u(){if(r>=s.length)throw new Error("syntax error");let e=s[r];if(e==="match"){r++;let t=u(),o=u(),i=a(o).match(t);return i?i[1]!==void 0?i[1]:String(i[0].length):"0"}if(e==="substr"){r++;let t=u(),o=parseInt(u(),10),n=parseInt(u(),10);if(Number.isNaN(o)||Number.isNaN(n))throw new Error("non-integer argument");return t.substring(o-1,o-1+n)}if(e==="index"){r++;let t=u(),o=u();for(let n=0;n<t.length;n++)if(o.includes(t[n]))return String(n+1);return"0"}if(e==="length"){r++;let t=u();return String(t.length)}if(e==="("){r++;let t=c();if(r>=s.length||s[r]!==")")throw new Error("syntax error");return r++,t}return r++,e}return c()}var E={name:"expr",flags:[],needsArgs:!0};export{S as a,E as b};
@@ -0,0 +1,10 @@
1
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
+ import{a as x}from"./chunk-QAJKDPNS.js";import{a as D,b as ee}from"./chunk-KSBHIW2H.js";import{c as K}from"./chunk-XEKXHOPO.js";import{a as V,b as Y,c as z}from"./chunk-QAYAQNCG.js";var le={name:"grep",summary:"print lines that match patterns",usage:"grep [OPTION]... PATTERN [FILE]...",options:["-E, --extended-regexp PATTERN is an extended regular expression","-P, --perl-regexp PATTERN is a Perl regular expression","-F, --fixed-strings PATTERN is a set of newline-separated strings","-i, --ignore-case ignore case distinctions","-v, --invert-match select non-matching lines","-w, --word-regexp match only whole words","-x, --line-regexp match only whole lines","-c, --count print only a count of matching lines","-l, --files-with-matches print only names of files with matches","-L, --files-without-match print names of files with no matches","-m NUM, --max-count=NUM stop after NUM matches","-n, --line-number print line number with output lines","-h, --no-filename suppress the file name prefix on output","-o, --only-matching show only nonempty parts of lines that match","-q, --quiet, --silent suppress all normal output","-r, -R, --recursive search directories recursively","-A NUM print NUM lines of trailing context","-B NUM print NUM lines of leading context","-C NUM print NUM lines of context","-e PATTERN use PATTERN for matching"," --include=GLOB search only files matching GLOB"," --exclude=GLOB skip files matching GLOB"," --exclude-dir=DIR skip directories matching DIR"," --help display this help and exit"]},te={name:"grep",async execute(t,s){if(Y(t))return V(le);let l=!1,f=!1,u=!1,p=!1,m=!1,a=!1,n=!1,c=!1,y=!1,w=!1,h=!1,d=!1,F=!1,C=!1,I=!1,W=0,P=0,T=0,A=[],E=[],U=[],R=null,H=[];for(let r=0;r<t.length;r++){let i=t[r];if(i.startsWith("-")&&i!=="-"){if(i==="-e"&&r+1<t.length){R=t[++r];continue}if(i.startsWith("--include=")){A.push(i.slice(10));continue}if(i.startsWith("--exclude=")){E.push(i.slice(10));continue}if(i.startsWith("--exclude-dir=")){U.push(i.slice(14));continue}if(i.startsWith("--max-count=")){W=parseInt(i.slice(12),10);continue}let b=i.match(/^-m(\d+)$/);if(b){W=parseInt(b[1],10);continue}if(i==="-m"&&r+1<t.length){W=parseInt(t[++r],10);continue}let o=i.match(/^-([ABC])(\d+)$/);if(o){let e=parseInt(o[2],10);o[1]==="A"?T=e:o[1]==="B"?P=e:o[1]==="C"&&(P=e,T=e);continue}if((i==="-A"||i==="-B"||i==="-C")&&r+1<t.length){let e=parseInt(t[++r],10);i==="-A"?T=e:i==="-B"?P=e:(P=e,T=e);continue}let g=i.startsWith("--")?[i]:i.slice(1).split("");for(let e of g)if(e==="i"||e==="--ignore-case")l=!0;else if(e==="n"||e==="--line-number")f=!0;else if(e==="v"||e==="--invert-match")u=!0;else if(e==="c"||e==="--count")p=!0;else if(e==="l"||e==="--files-with-matches")m=!0;else if(e==="L"||e==="--files-without-match")a=!0;else if(e==="r"||e==="R"||e==="--recursive")n=!0;else if(e==="w"||e==="--word-regexp")c=!0;else if(e==="x"||e==="--line-regexp")y=!0;else if(e==="E"||e==="--extended-regexp")w=!0;else if(e==="P"||e==="--perl-regexp")h=!0;else if(e==="F"||e==="--fixed-strings")d=!0;else if(e==="o"||e==="--only-matching")F=!0;else if(e==="h"||e==="--no-filename")C=!0;else if(e==="q"||e==="--quiet"||e==="--silent")I=!0;else{if(e.startsWith("--"))return z("grep",e);if(e.length===1)return z("grep",`-${e}`)}}else R===null?R=i:H.push(i)}if(R===null)return{stdout:"",stderr:`grep: missing pattern
3
+ `,exitCode:2};let ie=d?"fixed":w?"extended":h?"perl":"basic",O,Q,$;try{let r=ee(R,{mode:ie,ignoreCase:l,wholeWord:c,lineRegexp:y});O=r.regex,Q=r.kResetGroup,$=r.preFilter}catch{return{stdout:"",stderr:`grep: invalid regular expression: ${R}
4
+ `,exitCode:2}}if(H.length===0&&s.stdin!==void 0){let r=D(K(s.stdin),O,{invertMatch:u,showLineNumbers:f,countOnly:p,filename:"",onlyMatching:F,beforeContext:P,afterContext:T,maxCount:W,kResetGroup:Q,preFilter:$});return I?{stdout:"",stderr:"",exitCode:r.matched?0:1}:{stdout:r.output,stderr:"",exitCode:r.matched?0:1}}if(H.length===0)return{stdout:"",stderr:`grep: no input files
5
+ `,exitCode:2};let M="",k="",_=!1,X=!1,v=[];for(let r of H)if(r.includes("*")||r.includes("?")||r.includes("[")){let i=await oe(r,s);if(n)for(let b of i){let o=await L(b.path,s,A,E,U,b.isFile);v.push(...o)}else v.push(...i)}else if(n){let i=await L(r,s,A,E,U);v.push(...i)}else v.push({path:r});let Z=(v.length>1||n)&&!C,j=50;for(let r=0;r<v.length;r+=j){let i=v.slice(r,r+j),b=await Promise.all(i.map(async o=>{let g=o.path,e=g.split("/").pop()||g;if(E.length>0&&!n&&E.some(N=>x(e,N,{stripQuotes:!0}))||A.length>0&&!n&&!A.some(N=>x(e,N,{stripQuotes:!0})))return null;try{let N=s.fs.resolvePath(s.cwd,g),G=!1;if(o.isFile===void 0?G=(await s.fs.stat(N)).isDirectory:G=!o.isFile,G)return n?null:{error:`grep: ${g}: Is a directory
6
+ `};let S=await s.fs.readFile(N);if($&&!u){let J=$.ignoreCase?S.toLowerCase():S;if(!$.needles.some(q=>J.includes(q))){if(p){let q=Z?`${g}:0`:"0";return{file:g,result:{output:`${q}
7
+ `,matched:!1,matchCount:0}}}return{file:g,result:{output:"",matched:!1,matchCount:0}}}}let re=D(S,O,{invertMatch:u,showLineNumbers:f,countOnly:p,filename:Z?g:"",onlyMatching:F,beforeContext:P,afterContext:T,maxCount:W,kResetGroup:Q,preFilter:$});return{file:g,result:re}}catch{return{error:`grep: ${g}: No such file or directory
8
+ `}}}));for(let o of b){if(o===null)continue;if("error"in o&&o.error){k+=o.error,o.error.includes("Is a directory")||(X=!0);continue}if(!("file"in o)||!o.result)continue;let{file:g,result:e}=o;if(e.matched){if(_=!0,I)return{stdout:"",stderr:"",exitCode:0};m?M+=`${g}
9
+ `:a||(M+=e.output)}else a?M+=`${g}
10
+ `:p&&!m&&(M+=e.output)}}let B;return X?B=2:a?B=M.length>0?0:1:B=_?0:1,I?{stdout:"",stderr:"",exitCode:B}:{stdout:M,stderr:k,exitCode:B}}},se=256;async function ne(t,s,l,f,u=0){if(u>=se)return;let p=l.fs.resolvePath(l.cwd,t);try{if(!(await l.fs.stat(p)).isDirectory){let n=t.split("/").pop()||"";if(s){let c=s.replace(/^\//,"");x(n,c,{stripQuotes:!0})&&f.push(t)}return}let a=await l.fs.readdir(p);for(let n of a){let c=t==="."?n:`${t}/${n}`,y=l.fs.resolvePath(l.cwd,c);if((await l.fs.stat(y)).isDirectory)await ne(c,s,l,f,u+1);else if(s){let h=s.replace(/^\//,"");x(n,h,{stripQuotes:!0})&&f.push(c)}}}catch{}}async function oe(t,s){let l=[],f=t.lastIndexOf("/"),u,p;if(f===-1?(u=s.cwd,p=t):(u=t.slice(0,f)||"/",p=t.slice(f+1)),t.includes("**")){let a=[],n=t.split("**"),c=n[0].replace(/\/$/,"")||".",y=n[1]||"";return await ne(c,y,s,a),a.map(w=>({path:w}))}let m=s.fs.resolvePath(s.cwd,u);try{if(s.fs.readdirWithFileTypes){let a=await s.fs.readdirWithFileTypes(m);for(let n of a)if(x(n.name,p,{stripQuotes:!0})){let c=f===-1?n.name:`${u}/${n.name}`;l.push({path:c,isFile:n.isFile})}}else{let a=await s.fs.readdir(m);for(let n of a)if(x(n,p,{stripQuotes:!0})){let c=f===-1?n:`${u}/${n}`;l.push({path:c})}}}catch{}return l.sort((a,n)=>a.path.localeCompare(n.path))}async function L(t,s,l=[],f=[],u=[],p,m=0){if(m>=se)return[];let a=s.fs.resolvePath(s.cwd,t),n=[];try{let c,y;if(p!==void 0)c=p,y=!p;else{let h=await s.fs.stat(a);c=h.isFile,y=h.isDirectory}if(c){let h=t.split("/").pop()||t;return f.length>0&&f.some(d=>x(h,d,{stripQuotes:!0}))?[]:l.length>0&&!l.some(d=>x(h,d,{stripQuotes:!0}))?[]:[{path:t,isFile:!0}]}if(!y)return[];let w=t.split("/").pop()||t;if(u.length>0&&u.some(h=>x(w,h,{stripQuotes:!0})))return[];if(s.fs.readdirWithFileTypes){let h=await s.fs.readdirWithFileTypes(a);for(let d of h){if(d.name.startsWith("."))continue;let F=t==="."?d.name:`${t}/${d.name}`,C=await L(F,s,l,f,u,d.isFile,m+1);n.push(...C)}}else{let h=await s.fs.readdir(a);for(let d of h){if(d.startsWith("."))continue;let F=t==="."?d:`${t}/${d}`,C=await L(F,s,l,f,u,void 0,m+1);n.push(...C)}}}catch{}return n}var pe={name:"fgrep",async execute(t,s){return te.execute(["-F",...t],s)}},he={name:"egrep",async execute(t,s){return te.execute(["-E",...t],s)}},de={name:"grep",flags:[{flag:"-E",type:"boolean"},{flag:"-F",type:"boolean"},{flag:"-P",type:"boolean"},{flag:"-i",type:"boolean"},{flag:"-v",type:"boolean"},{flag:"-w",type:"boolean"},{flag:"-x",type:"boolean"},{flag:"-c",type:"boolean"},{flag:"-l",type:"boolean"},{flag:"-L",type:"boolean"},{flag:"-n",type:"boolean"},{flag:"-h",type:"boolean"},{flag:"-o",type:"boolean"},{flag:"-q",type:"boolean"},{flag:"-r",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:"-e",type:"value",valueHint:"pattern"}],stdinType:"text",needsArgs:!0},ge={name:"fgrep",flags:[],stdinType:"text",needsArgs:!0},me={name:"egrep",flags:[],stdinType:"text",needsArgs:!0};export{te as a,pe as b,he as c,de as d,ge as e,me as f};
@@ -1,2 +1,2 @@
1
1
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
- import{a as s}from"./chunk-EBAPSGAO.js";var a=s("sha256sum","sha256","compute SHA256 message digest"),m={name:"sha256sum",flags:[{flag:"-c",type:"boolean"}],needsFiles:!0};export{a,m as b};
2
+ import{a as s}from"./chunk-AXMYAPFA.js";var a=s("sha256sum","sha256","compute SHA256 message digest"),m={name:"sha256sum",flags:[{flag:"-c",type:"boolean"}],needsFiles:!0};export{a,m as b};
@@ -1,5 +1,5 @@
1
1
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
- import{a as Ee}from"./chunk-DLL7UR66.js";import{a as D,b as _}from"./chunk-L64BMZUV.js";import{a as x}from"./chunk-TN7HHBQW.js";import{a as v,b as H}from"./chunk-4RUAZWKT.js";import{c as z}from"./chunk-NRSASXYY.js";import{k as P}from"./chunk-SAI2SPQQ.js";import{a as fe,b as de,c as ie}from"./chunk-QAYAQNCG.js";var Be=1e4,He=100,$e=new H(/\s+/);function se(e={}){let{fieldSep:t=$e,maxIterations:n=Be,maxRecursionDepth:i=He,maxOutputSize:s=0,fs:a,cwd:o,exec:l,coverage:u,requireDefenseContext:N}=e;return{FS:" ",OFS:" ",ORS:`
2
+ import{a as Ee}from"./chunk-DLL7UR66.js";import{a as D,b as _}from"./chunk-KAPG5ONA.js";import{a as x}from"./chunk-VACKIICN.js";import{a as v,b as H}from"./chunk-7CSMHFIJ.js";import{c as z}from"./chunk-XEKXHOPO.js";import{k as P}from"./chunk-SAI2SPQQ.js";import{a as fe,b as de,c as ie}from"./chunk-QAYAQNCG.js";var Be=1e4,He=100,$e=new H(/\s+/);function se(e={}){let{fieldSep:t=$e,maxIterations:n=Be,maxRecursionDepth:i=He,maxOutputSize:s=0,fs:a,cwd:o,exec:l,coverage:u,requireDefenseContext:N}=e;return{FS:" ",OFS:" ",ORS:`
3
3
  `,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:n,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:l,coverage:u,requireDefenseContext:N}}function Ne(e,t,n){switch(n){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 M(e){if(typeof e=="number")return e;let t=parseFloat(e);return Number.isNaN(t)?0:t}function k(e){return typeof e=="string"?e:(Number.isInteger(e),String(e))}async function j(e,t){if(e.type==="regex")return e.pattern;let n=k(await t.evalExpr(e));return n.startsWith("/")&&n.endsWith("/")&&(n=n.slice(1,-1)),n}async function Se(e,t){return e?e.type==="variable"?e.name:e.type==="field"?`$${Math.floor(M(await t.evalExpr(e.index)))}`:"$0":"$0"}function me(e,t){if(e==="$0")return t.line;if(e.startsWith("$")){let n=parseInt(e.slice(1),10)-1;return t.fields[n]||""}return k(t.vars[e]??"")}function we(e,t,n){if(e==="$0")n.line=t,n.fields=n.FS===" "?t.trim().split(/\s+/).filter(Boolean):n.fieldSep.split(t),n.NF=n.fields.length;else if(e.startsWith("$")){let i=parseInt(e.slice(1),10)-1;for(;n.fields.length<=i;)n.fields.push("");n.fields[i]=t,n.NF=n.fields.length,n.line=n.fields.join(n.OFS)}else n.vars[e]=t}async function We(e,t,n){return e.length===0?t.line.length:k(await n.evalExpr(e[0])).length}async function Ve(e,t,n){if(e.length<2)return"";let i=k(await n.evalExpr(e[0])),s=Math.floor(M(await n.evalExpr(e[1])))-1;if(e.length>=3){let a=Math.floor(M(await n.evalExpr(e[2])));return i.substr(Math.max(0,s),a)}return i.substr(Math.max(0,s))}async function Ke(e,t,n){if(e.length<2)return 0;let i=k(await n.evalExpr(e[0])),s=k(await n.evalExpr(e[1])),a=i.indexOf(s);return a===-1?0:a+1}async function Xe(e,t,n){if(e.length<2)return 0;let i=k(await n.evalExpr(e[0])),s=e[1];if(s.type!=="variable")return 0;let a=s.name,o=t.FS;if(e.length>=3){let u=e[2];if(u.type==="regex")o=v(u.pattern);else{let N=k(await n.evalExpr(u));o=N===" "?v("\\s+"):N}}else t.FS===" "&&(o=v("\\s+"));let l=typeof o=="string"?i.split(o):o.split(i);t.arrays[a]=Object.create(null);for(let u=0;u<l.length;u++)t.arrays[a][String(u+1)]=l[u];return l.length}async function qe(e,t,n){if(e.length<2)return 0;let i=await j(e[0],n),s=k(await n.evalExpr(e[1])),a=await Se(e[2],n),o=me(a,t);try{let u=v(i).replace(o,Re(s)),N=u!==o?1:0;return we(a,u,t),N}catch{return 0}}async function ze(e,t,n){if(e.length<2)return 0;let i=await j(e[0],n),s=k(await n.evalExpr(e[1])),a=await Se(e[2],n),o=me(a,t);try{let l=v(i,"g"),u=l.match(o),N=u?u.length:0,A=l.replace(o,Re(s));return we(a,A,t),N}catch{return 0}}function Re(e){return t=>{let n="",i=0;for(;i<e.length;)if(e[i]==="\\"&&i+1<e.length){let s=e[i+1];s==="&"?(n+="&",i+=2):s==="\\"?(n+="\\",i+=2):(n+=e[i+1],i+=2)}else e[i]==="&"?(n+=t,i++):(n+=e[i],i++);return n}}async function je(e,t,n){if(e.length<2)return t.RSTART=0,t.RLENGTH=-1,0;let i=k(await n.evalExpr(e[0])),s=await j(e[1],n);try{let o=v(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 Qe(e,t,n){if(e.length<3)return"";let i=await j(e[0],n),s=k(await n.evalExpr(e[1])),a=k(await n.evalExpr(e[2])),o=e.length>=4?k(await n.evalExpr(e[3])):t.line;try{let l=a.toLowerCase()==="g",u=l?0:parseInt(a,10)||1;if(l)return v(i,"g").replace(o,(A,...C)=>ye(s,A,C.slice(0,-2)));{let N=0;return v(i,"g").replace(o,(C,...O)=>(N++,N===u?ye(s,C,O.slice(0,-2)):C))}}catch{return o}}function ye(e,t,n){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+=n[o]||"",s+=2}else a==="n"?(i+=`
4
4
  `,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 Je(e,t,n){return e.length===0?"":k(await n.evalExpr(e[0])).toLowerCase()}async function Ze(e,t,n){return e.length===0?"":k(await n.evalExpr(e[0])).toUpperCase()}async function Ye(e,t,n){if(e.length===0)return"";let i=k(await n.evalExpr(e[0])),s=[];for(let a=1;a<e.length;a++)s.push(await n.evalExpr(e[a]));return Q(i,s)}async function et(e,t,n){return e.length===0?0:Math.floor(M(await n.evalExpr(e[0])))}async function tt(e,t,n){return e.length===0?0:Math.sqrt(M(await n.evalExpr(e[0])))}async function nt(e,t,n){return e.length===0?0:Math.sin(M(await n.evalExpr(e[0])))}async function rt(e,t,n){return e.length===0?0:Math.cos(M(await n.evalExpr(e[0])))}async function it(e,t,n){let i=e.length>0?M(await n.evalExpr(e[0])):0,s=e.length>1?M(await n.evalExpr(e[1])):0;return Math.atan2(i,s)}async function st(e,t,n){return e.length===0?0:Math.log(M(await n.evalExpr(e[0])))}async function at(e,t,n){return e.length===0?1:Math.exp(M(await n.evalExpr(e[0])))}function ot(e,t,n){return t.random?t.random():Math.random()}async function lt(e,t,n){let i=e.length>0?M(await n.evalExpr(e[0])):Date.now();return t.vars._srand_seed=i,i}function ut(e,t){return()=>{throw new Error(`${e}() is not supported - ${t}`)}}function ae(e){return()=>{throw new Error(`function '${e}()' is not implemented`)}}var U=1e4;function Q(e,t){let n=0,i="",s=0;for(;s<e.length;)if(e[s]==="%"&&s+1<e.length){let a=s+1,o="",l="",u="",N,A=a;for(;a<e.length&&/\d/.test(e[a]);)a++;a>A&&e[a]==="$"?(N=parseInt(e.substring(A,a),10)-1,a++):a=A;let C=()=>{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 d=t[n++],R=d!==void 0?Math.floor(Number(d)):0;R<0?(o+="-",l=String(Math.min(-R,U))):l=String(Math.min(R,U)),a++}else for(;a<e.length&&/\d/.test(e[a]);)l+=e[a++];if(l&&parseInt(l,10)>U&&(l=String(U)),e[a]==="."){if(a++,e[a]==="*"){let d=t[n++];u=String(Math.min(d!==void 0?Math.floor(Number(d)):0,U)),a++}else for(;a<e.length&&/\d/.test(e[a]);)u+=e[a++];u&&parseInt(u,10)>U&&(u=String(U))}C();let O=e[a],w=t[N!==void 0?N:n];switch(O){case"s":{let d=w!==void 0?String(w):"";if(u&&(d=d.substring(0,parseInt(u,10))),l){let R=parseInt(l,10);o.includes("-")?d=d.padEnd(R):d=d.padStart(R)}i+=d,N===void 0&&n++;break}case"d":case"i":{let d=w!==void 0?Math.floor(Number(w)):0;Number.isNaN(d)&&(d=0);let R=d<0,h=Math.abs(d).toString();if(u){let F=parseInt(u,10);h=h.padStart(F,"0")}let c="";R?c="-":o.includes("+")?c="+":o.includes(" ")&&(c=" ");let E=c+h;if(l){let F=parseInt(l,10);o.includes("-")?E=E.padEnd(F):o.includes("0")&&!u?E=c+h.padStart(F-c.length,"0"):E=E.padStart(F)}i+=E,N===void 0&&n++;break}case"f":{let d=w!==void 0?Number(w):0;Number.isNaN(d)&&(d=0);let R=u?parseInt(u,10):6,h=d.toFixed(R);if(l){let c=parseInt(l,10);o.includes("-")?h=h.padEnd(c):h=h.padStart(c)}i+=h,N===void 0&&n++;break}case"e":case"E":{let d=w!==void 0?Number(w):0;Number.isNaN(d)&&(d=0);let R=u?parseInt(u,10):6,h=d.toExponential(R);if(O==="E"&&(h=h.toUpperCase()),l){let c=parseInt(l,10);o.includes("-")?h=h.padEnd(c):h=h.padStart(c)}i+=h,N===void 0&&n++;break}case"g":case"G":{let d=w!==void 0?Number(w):0;Number.isNaN(d)&&(d=0);let R=u?parseInt(u,10):6,h=d!==0?Math.floor(Math.log10(Math.abs(d))):0,c;if(d===0?c="0":h<-4||h>=R?(c=d.toExponential(R-1),O==="G"&&(c=c.toUpperCase())):c=d.toPrecision(R),c.includes(".")&&(c=c.replace(/\.?0+$/,"").replace(/\.?0+e/,"e")),c.includes("e")&&(c=c.replace(/\.?0+e/,"e")),l){let E=parseInt(l,10);o.includes("-")?c=c.padEnd(E):c=c.padStart(E)}i+=c,N===void 0&&n++;break}case"x":case"X":{let d=w!==void 0?Math.floor(Number(w)):0;Number.isNaN(d)&&(d=0);let R=Math.abs(d).toString(16);if(O==="X"&&(R=R.toUpperCase()),u){let E=parseInt(u,10);R=R.padStart(E,"0")}let h=d<0?"-":"",c=h+R;if(l){let E=parseInt(l,10);o.includes("-")?c=c.padEnd(E):o.includes("0")&&!u?c=h+R.padStart(E-h.length,"0"):c=c.padStart(E)}i+=c,N===void 0&&n++;break}case"o":{let d=w!==void 0?Math.floor(Number(w)):0;Number.isNaN(d)&&(d=0);let R=Math.abs(d).toString(8);if(u){let E=parseInt(u,10);R=R.padStart(E,"0")}let h=d<0?"-":"",c=h+R;if(l){let E=parseInt(l,10);o.includes("-")?c=c.padEnd(E):o.includes("0")&&!u?c=h+R.padStart(E-h.length,"0"):c=c.padStart(E)}i+=c,N===void 0&&n++;break}case"c":{typeof w=="number"?i+=String.fromCharCode(w):i+=String(w??"").charAt(0)||"",N===void 0&&n++;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+=`
5
5
  `;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 ge=new Map([["length",We],["substr",Ve],["index",Ke],["split",Xe],["sub",qe],["gsub",ze],["match",je],["gensub",Qe],["tolower",Je],["toupper",Ze],["sprintf",Ye],["int",et],["sqrt",tt],["sin",nt],["cos",rt],["atan2",it],["log",st],["exp",at],["rand",ot],["srand",lt],["system",ut("system","shell execution not allowed in sandboxed environment")],["close",()=>0],["fflush",()=>0],["systime",ae("systime")],["mktime",ae("mktime")],["strftime",ae("strftime")]]);function b(e){return typeof e=="number"?e!==0:!(e===""||e==="0")}function g(e){if(typeof e=="number")return e;let t=parseFloat(e);return Number.isNaN(t)?0:t}function m(e){return typeof e=="string"?e:(Number.isInteger(e),String(e))}function oe(e){if(typeof e=="number")return!0;let t=String(e).trim();return t===""?!1:!Number.isNaN(Number(t))}function K(e,t){try{return v(e).test(t)}catch{return!1}}function Ae(e,t){return t===""?[]:e.FS===" "?t.trim().split(/\s+/).filter(Boolean):e.fieldSep.split(t)}function J(e,t){return t===0?e.line:t<0||t>e.fields.length?"":e.fields[t-1]??""}function le(e,t,n){if(t===0)e.line=m(n),e.fields=Ae(e,e.line),e.NF=e.fields.length;else if(t>0){for(;e.fields.length<t;)e.fields.push("");e.fields[t-1]=m(n),e.NF=e.fields.length,e.line=e.fields.join(e.OFS)}}function $(e,t){e.line=t,e.fields=Ae(e,t),e.NF=e.fields.length}function ve(e,t){if(e.FS=t,t===" ")e.fieldSep=new H(/\s+/);else try{e.fieldSep=v(t)}catch{e.fieldSep=v(t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))}}function Z(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 W(e,t,n){switch(t){case"FS":ve(e,m(n));return;case"OFS":e.OFS=m(n);return;case"ORS":e.ORS=m(n);return;case"OFMT":e.OFMT=m(n);return;case"NR":e.NR=Math.floor(g(n));return;case"NF":{let i=Math.floor(g(n));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(g(n));return;case"FILENAME":e.FILENAME=m(n);return;case"RSTART":e.RSTART=Math.floor(g(n));return;case"RLENGTH":e.RLENGTH=Math.floor(g(n));return;case"SUBSEP":e.SUBSEP=m(n);return}e.vars[t]=n}function X(e,t){let n=t,i=new Set,s=e.arrayAliases.get(n);for(;s!==void 0&&!i.has(n);)i.add(n),n=s,s=e.arrayAliases.get(n);return n}function Y(e,t,n){if(t==="ARGV")return e.ARGV[n]??"";if(t==="ENVIRON")return e.ENVIRON[n]??"";let i=X(e,t);return e.arrays[i]?.[n]??""}function ue(e,t,n,i){let s=X(e,t);e.arrays[s]||(e.arrays[s]=Object.create(null)),e.arrays[s][n]=i}function Ie(e,t,n){if(t==="ARGV")return e.ARGV[n]!==void 0;if(t==="ENVIRON")return e.ENVIRON[n]!==void 0;let i=X(e,t);return e.arrays[i]?.[n]!==void 0}function ke(e,t,n){let i=X(e,t);e.arrays[i]&&delete e.arrays[i][n]}function Ce(e,t){let n=X(e,t);delete e.arrays[n]}var be=null;function Oe(e){be=e}function L(e,t){D(e.requireDefenseContext,"awk",t)}function S(e,t,n){return _(e.requireDefenseContext,"awk",t,n)}async function f(e,t){switch(L(e,"expression evaluation"),e.coverage?.hit(`awk:expr:${t.type}`),t.type){case"number":return t.value;case"string":return t.value;case"regex":return K(t.pattern,e.line)?1:0;case"field":return ct(e,t);case"variable":return Z(e,t.name);case"array_access":return ht(e,t);case"binary":return pt(e,t);case"unary":return Et(e,t);case"ternary":return b(await S(e,"ternary condition evaluation",()=>f(e,t.condition)))?await S(e,"ternary consequent evaluation",()=>f(e,t.consequent)):await S(e,"ternary alternate evaluation",()=>f(e,t.alternate));case"call":return Nt(e,t.name,t.args);case"assignment":return St(e,t);case"pre_increment":return mt(e,t.operand);case"pre_decrement":return wt(e,t.operand);case"post_increment":return Rt(e,t.operand);case"post_decrement":return gt(e,t.operand);case"in":return At(e,t.key,t.array);case"getline":return vt(e,t.variable,t.file,t.command);case"tuple":return Ct(e,t.elements);default:return""}}async function ct(e,t){L(e,"field reference evaluation");let n=Math.floor(g(await S(e,"field index evaluation",()=>f(e,t.index))));return J(e,n)}async function ht(e,t){L(e,"array access evaluation");let n=m(await S(e,"array key evaluation",()=>f(e,t.key)));return Y(e,t.array,n)}async function pt(e,t){L(e,"binary expression evaluation");let n=t.operator;if(n==="||")return b(await S(e,"logical-or left evaluation",()=>f(e,t.left)))||b(await S(e,"logical-or right evaluation",()=>f(e,t.right)))?1:0;if(n==="&&")return b(await S(e,"logical-and left evaluation",()=>f(e,t.left)))&&b(await S(e,"logical-and right evaluation",()=>f(e,t.right)))?1:0;if(n==="~"){let l=await S(e,"regex left evaluation",()=>f(e,t.left));t.right.type==="regex"&&e.coverage?.hit("awk:expr:regex");let u=t.right.type==="regex"?t.right.pattern:m(await S(e,"regex right evaluation",()=>f(e,t.right)));try{return v(u).test(m(l))?1:0}catch{return 0}}if(n==="!~"){let l=await S(e,"negated-regex left evaluation",()=>f(e,t.left));t.right.type==="regex"&&e.coverage?.hit("awk:expr:regex");let u=t.right.type==="regex"?t.right.pattern:m(await S(e,"negated-regex right evaluation",()=>f(e,t.right)));try{return v(u).test(m(l))?0:1}catch{return 1}}let i=await S(e,"binary left evaluation",()=>f(e,t.left)),s=await S(e,"binary right evaluation",()=>f(e,t.right));if(n===" "){let l=m(i)+m(s);if(e.maxOutputSize>0&&l.length>e.maxOutputSize)throw new P(`awk: string concatenation size limit exceeded (${e.maxOutputSize} bytes)`,"string_length",e.output);return l}if(ft(n))return dt(i,s,n);let a=g(i),o=g(s);return Ne(a,o,n)}function ft(e){return["<","<=",">",">=","==","!="].includes(e)}function dt(e,t,n){let i=oe(e),s=oe(t);if(i&&s){let l=g(e),u=g(t);switch(n){case"<":return l<u?1:0;case"<=":return l<=u?1:0;case">":return l>u?1:0;case">=":return l>=u?1:0;case"==":return l===u?1:0;case"!=":return l!==u?1:0}}let a=m(e),o=m(t);switch(n){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 Et(e,t){L(e,"unary expression evaluation");let n=await S(e,"unary operand evaluation",()=>f(e,t.operand));switch(t.operator){case"!":return b(n)?0:1;case"-":return-g(n);case"+":return+g(n);default:return n}}async function Nt(e,t,n){L(e,"function call evaluation");let i=ge.get(t);if(i)return i(n,e,{evalExpr:a=>f(e,a)});let s=e.functions.get(t);return s?yt(e,s,n):""}async function yt(e,t,n){if(L(e,"user function call"),e.currentRecursionDepth++,e.currentRecursionDepth>e.maxRecursionDepth)throw e.currentRecursionDepth--,new P(`awk: recursion depth exceeded maximum (${e.maxRecursionDepth})`,"recursion",e.output);let i=Object.create(null);for(let l of t.params)i[l]=e.vars[l];let s=[];for(let l=0;l<t.params.length;l++){let u=t.params[l];if(l<n.length){let N=n[l];N.type==="variable"&&(e.arrayAliases.set(u,N.name),s.push(u));let A=await S(e,"user function argument evaluation",()=>f(e,N));e.vars[u]=A}else e.vars[u]=""}e.hasReturn=!1,e.returnValue=void 0;let a=be;a&&await S(e,"user function body execution",()=>a(e,t.body.statements));let o=e.returnValue??"";for(let l of t.params)i[l]!==void 0?e.vars[l]=i[l]:delete e.vars[l];for(let l of s)e.arrayAliases.delete(l);return e.hasReturn=!1,e.returnValue=void 0,e.currentRecursionDepth--,o}async function St(e,t){L(e,"assignment evaluation");let n=await S(e,"assignment value evaluation",()=>f(e,t.value)),i=t.target,s=t.operator,a;if(s==="=")a=n;else{let o;if(i.type==="field"){let N=Math.floor(g(await S(e,"assignment field index",()=>f(e,i.index))));o=J(e,N)}else if(i.type==="variable")o=Z(e,i.name);else{let N=m(await S(e,"assignment array key",()=>f(e,i.key)));o=Y(e,i.array,N)}let l=g(o),u=g(n);switch(s){case"+=":a=l+u;break;case"-=":a=l-u;break;case"*=":a=l*u;break;case"/=":a=u!==0?l/u:0;break;case"%=":a=u!==0?l%u:0;break;case"^=":a=l**u;break;default:a=n}}if(i.type==="field"){let o=Math.floor(g(await S(e,"assignment target field index",()=>f(e,i.index))));le(e,o,a)}else if(i.type==="variable")W(e,i.name,a);else{let o=m(await S(e,"assignment target array key",()=>f(e,i.key)));ue(e,i.array,o,a)}return a}async function ee(e,t,n,i){L(e,"inc/dec evaluation");let s;if(t.type==="field"){let a=Math.floor(g(await S(e,"inc/dec field index",()=>f(e,t.index))));s=g(J(e,a)),le(e,a,s+n)}else if(t.type==="variable")s=g(Z(e,t.name)),W(e,t.name,s+n);else{let a=m(await S(e,"inc/dec array key",()=>f(e,t.key)));s=g(Y(e,t.array,a)),ue(e,t.array,a,s+n)}return i?s+n:s}async function mt(e,t){return ee(e,t,1,!0)}async function wt(e,t){return ee(e,t,-1,!0)}async function Rt(e,t){return ee(e,t,1,!1)}async function gt(e,t){return ee(e,t,-1,!1)}async function At(e,t,n){L(e,"in-expression evaluation");let i;if(t.type==="tuple"){e.coverage?.hit("awk:expr:tuple");let s=[];for(let a of t.elements)s.push(m(await S(e,"tuple key element evaluation",()=>f(e,a))));i=s.join(e.SUBSEP)}else i=m(await S(e,"in-expression key evaluation",()=>f(e,t)));return Ie(e,n,i)?1:0}async function vt(e,t,n,i){if(L(e,"getline evaluation"),i)return It(e,t,i);if(n)return kt(e,t,n);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?W(e,t,a):$(e,a),e.NR++,e.lineIndex=s,1}async function It(e,t,n){let i=e.exec;if(!i)return-1;L(e,"getline command source");let s=m(await S(e,"getline command expression",()=>f(e,n))),a=`__cmd_${s}`,o=`__cmdi_${s}`,l,u;if(e.vars[a]===void 0)try{let C=await S(e,"getline command exec",()=>i(s));l=z(C.stdout).split(`
@@ -1,5 +1,5 @@
1
1
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
- import{c}from"./chunk-NRSASXYY.js";import{a as u,b as f,c as h}from"./chunk-QAYAQNCG.js";import p from"turndown";var w={name:"html-to-markdown",summary:"convert HTML to Markdown (BashEnv extension)",usage:"html-to-markdown [OPTION]... [FILE]",description:["Convert HTML content to Markdown format using the turndown library.","This is a non-standard BashEnv extension command, not available in regular bash.","","Read HTML from FILE or standard input and output Markdown to standard output.","Commonly used with curl to convert web pages:"," curl -s https://example.com | html-to-markdown","","Supported HTML elements:"," - Headings (h1-h6) \u2192 # Markdown headings"," - Paragraphs (p) \u2192 Plain text with blank lines"," - Links (a) \u2192 [text](url)"," - Images (img) \u2192 ![alt](src)"," - Bold/Strong \u2192 **text**"," - Italic/Em \u2192 _text_"," - Code (code, pre) \u2192 `inline` or fenced blocks"," - Lists (ul, ol, li) \u2192 - or 1. items"," - Blockquotes \u2192 > quoted text"," - Horizontal rules (hr) \u2192 ---"],options:["-b, --bullet=CHAR bullet character for unordered lists (-, +, or *)","-c, --code=FENCE fence style for code blocks (``` or ~~~)","-r, --hr=STRING string for horizontal rules (default: ---)"," --heading-style=STYLE"," heading style: 'atx' for # headings (default),"," 'setext' for underlined headings (h1/h2 only)"," --help display this help and exit"],examples:["echo '<h1>Hello</h1><p>World</p>' | html-to-markdown","html-to-markdown page.html","curl -s https://example.com | html-to-markdown > page.md"]},y={name:"html-to-markdown",async execute(r,n){if(f(r))return u(w);let s="-",a="```",i="---",m="atx",o=[];for(let e=0;e<r.length;e++){let t=r[e];if(t==="-b"||t==="--bullet")s=r[++e]??"-";else if(t.startsWith("--bullet="))s=t.slice(9);else if(t==="-c"||t==="--code")a=r[++e]??"```";else if(t.startsWith("--code="))a=t.slice(7);else if(t==="-r"||t==="--hr")i=r[++e]??"---";else if(t.startsWith("--hr="))i=t.slice(5);else if(t.startsWith("--heading-style=")){let d=t.slice(16);(d==="setext"||d==="atx")&&(m=d)}else if(t==="-")o.push("-");else{if(t.startsWith("--"))return h("html-to-markdown",t);if(t.startsWith("-"))return h("html-to-markdown",t);o.push(t)}}let l;if(o.length===0||o.length===1&&o[0]==="-")l=c(n.stdin);else try{let e=n.fs.resolvePath(n.cwd,o[0]);l=await n.fs.readFile(e)}catch{return{stdout:"",stderr:`html-to-markdown: ${o[0]}: No such file or directory
2
+ import{c}from"./chunk-XEKXHOPO.js";import{a as u,b as f,c as h}from"./chunk-QAYAQNCG.js";import p from"turndown";var w={name:"html-to-markdown",summary:"convert HTML to Markdown (BashEnv extension)",usage:"html-to-markdown [OPTION]... [FILE]",description:["Convert HTML content to Markdown format using the turndown library.","This is a non-standard BashEnv extension command, not available in regular bash.","","Read HTML from FILE or standard input and output Markdown to standard output.","Commonly used with curl to convert web pages:"," curl -s https://example.com | html-to-markdown","","Supported HTML elements:"," - Headings (h1-h6) \u2192 # Markdown headings"," - Paragraphs (p) \u2192 Plain text with blank lines"," - Links (a) \u2192 [text](url)"," - Images (img) \u2192 ![alt](src)"," - Bold/Strong \u2192 **text**"," - Italic/Em \u2192 _text_"," - Code (code, pre) \u2192 `inline` or fenced blocks"," - Lists (ul, ol, li) \u2192 - or 1. items"," - Blockquotes \u2192 > quoted text"," - Horizontal rules (hr) \u2192 ---"],options:["-b, --bullet=CHAR bullet character for unordered lists (-, +, or *)","-c, --code=FENCE fence style for code blocks (``` or ~~~)","-r, --hr=STRING string for horizontal rules (default: ---)"," --heading-style=STYLE"," heading style: 'atx' for # headings (default),"," 'setext' for underlined headings (h1/h2 only)"," --help display this help and exit"],examples:["echo '<h1>Hello</h1><p>World</p>' | html-to-markdown","html-to-markdown page.html","curl -s https://example.com | html-to-markdown > page.md"]},y={name:"html-to-markdown",async execute(r,n){if(f(r))return u(w);let s="-",a="```",i="---",m="atx",o=[];for(let e=0;e<r.length;e++){let t=r[e];if(t==="-b"||t==="--bullet")s=r[++e]??"-";else if(t.startsWith("--bullet="))s=t.slice(9);else if(t==="-c"||t==="--code")a=r[++e]??"```";else if(t.startsWith("--code="))a=t.slice(7);else if(t==="-r"||t==="--hr")i=r[++e]??"---";else if(t.startsWith("--hr="))i=t.slice(5);else if(t.startsWith("--heading-style=")){let d=t.slice(16);(d==="setext"||d==="atx")&&(m=d)}else if(t==="-")o.push("-");else{if(t.startsWith("--"))return h("html-to-markdown",t);if(t.startsWith("-"))return h("html-to-markdown",t);o.push(t)}}let l;if(o.length===0||o.length===1&&o[0]==="-")l=c(n.stdin);else try{let e=n.fs.resolvePath(n.cwd,o[0]);l=await n.fs.readFile(e)}catch{return{stdout:"",stderr:`html-to-markdown: ${o[0]}: No such file or directory
3
3
  `,exitCode:1}}if(!l.trim())return{stdout:"",stderr:"",exitCode:0};try{let e=new p({bulletListMarker:s,codeBlockStyle:"fenced",fence:a,hr:i,headingStyle:m});return e.remove(["script","style","footer"]),{stdout:`${e.turndown(l).trim()}
4
4
  `,stderr:"",exitCode:0}}catch(e){return{stdout:"",stderr:`html-to-markdown: conversion error: ${e.message}
5
5
  `,exitCode:1}}}},b={name:"html-to-markdown",flags:[],stdinType:"text"};export{y as a,b};
@@ -1,5 +1,5 @@
1
1
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
- import{b as v}from"./chunk-YCLFEX4T.js";import{c as y}from"./chunk-NRSASXYY.js";import{a as x,b as I,c as m}from"./chunk-QAYAQNCG.js";var T={name:"cut",summary:"remove sections from each line of files",usage:"cut [OPTION]... [FILE]...",options:["-c LIST select only these characters","-d DELIM use DELIM instead of TAB for field delimiter","-f LIST select only these fields","-s, --only-delimited do not print lines without delimiters"," --help display this help and exit"]};function b(s){let c=[],l=s.split(",");for(let n of l)if(n.includes("-")){let[t,r]=n.split("-");c.push({start:t?parseInt(t,10):1,end:r?parseInt(r,10):null})}else{let t=parseInt(n,10);c.push({start:t,end:t})}return c}function w(s,c){let l=[];for(let n of c){let t=n.start-1,r=n.end===null?s.length:n.end;for(let i=t;i<r&&i<s.length;i++)i>=0&&!l.includes(s[i])&&l.push(s[i])}return l}var E={name:"cut",async execute(s,c){if(I(s))return x(T);let l=" ",n=null,t=null,r=!1,i=[];for(let o=0;o<s.length;o++){let e=s[o];if(e==="-d")l=s[++o]||" ";else if(e.startsWith("-d"))l=e.slice(2);else if(e==="-f")n=s[++o];else if(e.startsWith("-f"))n=e.slice(2);else if(e==="-c")t=s[++o];else if(e.startsWith("-c"))t=e.slice(2);else if(e==="-s"||e==="--only-delimited")r=!0;else{if(e.startsWith("--"))return m("cut",e);if(e.startsWith("-")){let f=!1;for(let u of e.slice(1))if(u==="s")r=!0;else if(!"dfc".includes(u)){f=!0;break}if(f)return m("cut",e)}else i.push(e)}}if(!n&&!t)return{stdout:"",stderr:`cut: you must specify a list of bytes, characters, or fields
2
+ import{b as v}from"./chunk-KTPCYKBB.js";import{c as y}from"./chunk-XEKXHOPO.js";import{a as x,b as I,c as m}from"./chunk-QAYAQNCG.js";var T={name:"cut",summary:"remove sections from each line of files",usage:"cut [OPTION]... [FILE]...",options:["-c LIST select only these characters","-d DELIM use DELIM instead of TAB for field delimiter","-f LIST select only these fields","-s, --only-delimited do not print lines without delimiters"," --help display this help and exit"]};function b(s){let c=[],l=s.split(",");for(let n of l)if(n.includes("-")){let[t,r]=n.split("-");c.push({start:t?parseInt(t,10):1,end:r?parseInt(r,10):null})}else{let t=parseInt(n,10);c.push({start:t,end:t})}return c}function w(s,c){let l=[];for(let n of c){let t=n.start-1,r=n.end===null?s.length:n.end;for(let i=t;i<r&&i<s.length;i++)i>=0&&!l.includes(s[i])&&l.push(s[i])}return l}var E={name:"cut",async execute(s,c){if(I(s))return x(T);let l=" ",n=null,t=null,r=!1,i=[];for(let o=0;o<s.length;o++){let e=s[o];if(e==="-d")l=s[++o]||" ";else if(e.startsWith("-d"))l=e.slice(2);else if(e==="-f")n=s[++o];else if(e.startsWith("-f"))n=e.slice(2);else if(e==="-c")t=s[++o];else if(e.startsWith("-c"))t=e.slice(2);else if(e==="-s"||e==="--only-delimited")r=!0;else{if(e.startsWith("--"))return m("cut",e);if(e.startsWith("-")){let f=!1;for(let u of e.slice(1))if(u==="s")r=!0;else if(!"dfc".includes(u)){f=!0;break}if(f)return m("cut",e)}else i.push(e)}}if(!n&&!t)return{stdout:"",stderr:`cut: you must specify a list of bytes, characters, or fields
3
3
  `,exitCode:1};let p=await v(c,i,{cmdName:"cut"});if(!p.ok)return p.error;let a=(t?y(p.content):p.content).split(`
4
4
  `);a.length>0&&a[a.length-1]===""&&a.pop();let g=b(n||t||"1"),h="";for(let o of a)if(t){let e=Array.from(o),f=[];for(let u of g){let F=u.start-1,H=u.end===null?e.length:u.end;for(let d=F;d<H&&d<e.length;d++)d>=0&&f.push(e[d])}h+=`${f.join("")}
5
5
  `}else{if(r&&!o.includes(l))continue;let e=o.split(l),f=w(e,g);h+=`${f.join(l)}