just-bash 3.0.1 → 3.0.3

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 (401) hide show
  1. package/CHANGELOG.md +123 -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/{shell/chunks/chunk-CAZ75E7E.js → chunks/chunk-PKE7GKU5.js} +1 -1
  49. package/dist/bin/{shell/chunks/chunk-7AYT3UKI.js → chunks/chunk-PSJORJRS.js} +1 -1
  50. package/dist/bin/chunks/{chunk-7NC4CPHS.js → chunk-R36DS2UF.js} +1 -1
  51. package/dist/bin/chunks/{chunk-2NRAWO6E.js → chunk-RKBWTGBZ.js} +1 -1
  52. package/dist/bin/{shell/chunks/chunk-LC6D27QJ.js → chunks/chunk-RVGYO2OU.js} +1 -1
  53. package/dist/bin/chunks/{chunk-SMSELHIY.js → chunk-SF2OLINE.js} +1 -1
  54. package/dist/bin/{shell/chunks/chunk-M65CQLJE.js → chunks/chunk-TIRU5FOD.js} +1 -1
  55. package/dist/bin/chunks/{chunk-BE4PARL3.js → chunk-TKYWUEON.js} +1 -1
  56. package/dist/bin/chunks/chunk-TYBXHT6W.js +10 -0
  57. package/dist/bin/chunks/chunk-UI7CV277.js +20 -0
  58. package/dist/bin/chunks/{chunk-KRRM5UCC.js → chunk-UNWZQG7U.js} +1 -1
  59. package/dist/bin/{shell/chunks/chunk-4KSZJAQK.js → chunks/chunk-W5OBQVJ2.js} +1 -1
  60. package/dist/bin/chunks/{chunk-JNUX75OX.js → chunk-WHUKZ3K3.js} +1 -1
  61. package/dist/bin/chunks/chunk-Y2IUEWQD.js +11 -0
  62. package/dist/bin/chunks/chunk-Y5OWCEDV.js +64 -0
  63. package/dist/bin/chunks/{chunk-H7JTIXAO.js → chunk-ZZP3RSWL.js} +1 -1
  64. package/dist/bin/chunks/{column-AQB3A3PJ.js → column-QLGOK3XM.js} +1 -1
  65. package/dist/bin/{shell/chunks/comm-Q4VDF6ZO.js → chunks/comm-PLYUTVP3.js} +1 -1
  66. package/dist/bin/chunks/curl-DCSPNPEW.js +27 -0
  67. package/dist/bin/chunks/{cut-ZI2HIAW7.js → cut-JNQTCQY7.js} +1 -1
  68. package/dist/bin/chunks/date-OFYBOAUE.js +3 -0
  69. package/dist/bin/{shell/chunks/diff-YDJ42RKS.js → chunks/diff-LZ4WRLIF.js} +1 -1
  70. package/dist/bin/chunks/{env-NY32PQJM.js → env-FNVYNLGB.js} +1 -1
  71. package/dist/bin/{shell/chunks/expand-YYSO35NS.js → chunks/expand-CB7FG7LQ.js} +1 -1
  72. package/dist/bin/{shell/chunks/expr-7PLWSWZI.js → chunks/expr-6A2XZORA.js} +1 -1
  73. package/dist/bin/chunks/{find-P4DOE7CE.js → find-5OZWMYCV.js} +1 -1
  74. package/dist/bin/chunks/flag-coverage-H6NG6ZQL.js +3 -0
  75. package/dist/bin/{shell/chunks/fold-5MF7QZWQ.js → chunks/fold-7YEITA5L.js} +1 -1
  76. package/dist/bin/chunks/{grep-VAYCFO4O.js → grep-KKBXRB73.js} +1 -1
  77. package/dist/bin/chunks/{gzip-UGBQQKIH.js → gzip-ZJP5VIAQ.js} +1 -1
  78. package/dist/bin/chunks/{head-QNC2ZYDO.js → head-B6GFQHKF.js} +1 -1
  79. package/dist/bin/{shell/chunks/html-to-markdown-QEFY7XQR.js → chunks/html-to-markdown-3HJ7L7NL.js} +1 -1
  80. package/dist/bin/chunks/{join-EJ73DYTK.js → join-WRM6S6CO.js} +1 -1
  81. package/dist/bin/chunks/{jq-GGTKKMEN.js → jq-33GJJXTL.js} +1 -1
  82. package/dist/bin/chunks/{js-exec-BC6NI55L.js → js-exec-F7JAZ4ZQ.js} +1 -1
  83. package/dist/bin/chunks/js-exec-worker.js +214 -17
  84. package/dist/bin/chunks/{md5sum-MCVDIB35.js → md5sum-ZNYCDRQL.js} +1 -1
  85. package/dist/bin/{shell/chunks/nl-KUPLVCTS.js → chunks/nl-6TVYE4ZB.js} +1 -1
  86. package/dist/bin/{shell/chunks/od-YQ5ZUI2H.js → chunks/od-Y3E3QXOL.js} +1 -1
  87. package/dist/bin/{shell/chunks/paste-A5KKPWXX.js → chunks/paste-LYNFXXCM.js} +1 -1
  88. package/dist/bin/chunks/printf-MR3FXCDE.js +3 -0
  89. package/dist/bin/{shell/chunks/python3-BQWDPUBM.js → chunks/python3-R5OFWJIH.js} +1 -1
  90. package/dist/bin/{shell/chunks/rev-PYHOZ4D4.js → chunks/rev-AJECDD4L.js} +1 -1
  91. package/dist/bin/chunks/{rg-BGFMSIVK.js → rg-2YWJS6TE.js} +1 -1
  92. package/dist/bin/chunks/{sed-FWA634SN.js → sed-IGRH7EGG.js} +1 -1
  93. package/dist/bin/chunks/{sha1sum-4KF52U3Y.js → sha1sum-5QZSNFY3.js} +1 -1
  94. package/dist/bin/chunks/{sha256sum-6YEPULPX.js → sha256sum-DI7JAVAU.js} +1 -1
  95. package/dist/bin/{shell/chunks/sleep-QHAPNY3Q.js → chunks/sleep-RPGCUUGX.js} +1 -1
  96. package/dist/bin/{shell/chunks/sort-4C6WOKNK.js → chunks/sort-HQPAFL76.js} +1 -1
  97. package/dist/bin/chunks/{split-TV7NL7LA.js → split-F6FSB5KI.js} +1 -1
  98. package/dist/bin/chunks/{sqlite3-W777NCI4.js → sqlite3-7TRACAE7.js} +1 -1
  99. package/dist/bin/chunks/sqlite3-worker.js +3 -2
  100. package/dist/bin/chunks/{strings-MDD72LR6.js → strings-6PE3YMPO.js} +1 -1
  101. package/dist/bin/chunks/{tac-C2N4NQ6S.js → tac-NERJXVOM.js} +1 -1
  102. package/dist/bin/chunks/{tail-BCB5W6JC.js → tail-24F643A4.js} +1 -1
  103. package/dist/bin/chunks/tar-5HK3VMV2.js +3 -0
  104. package/dist/bin/chunks/{tee-UQHPO4OW.js → tee-5B7P2QRJ.js} +1 -1
  105. package/dist/bin/chunks/{time-ZPY52VT2.js → time-FN6VJGRS.js} +1 -1
  106. package/dist/bin/chunks/{timeout-5AX3ZS3X.js → timeout-ZARIAF3K.js} +1 -1
  107. package/dist/bin/{shell/chunks/tr-G7K6M6HP.js → chunks/tr-QQZYZ3CH.js} +1 -1
  108. package/dist/bin/chunks/{unexpand-QIR4EDPG.js → unexpand-3JWOSSBQ.js} +1 -1
  109. package/dist/bin/chunks/{uniq-I7PVFJR4.js → uniq-Q5UH5NL3.js} +1 -1
  110. package/dist/bin/{shell/chunks/wc-6NGWULAP.js → chunks/wc-4HXNTHY3.js} +1 -1
  111. package/dist/bin/chunks/worker.js +3 -2
  112. package/dist/bin/chunks/{xan-KX4VPXUN.js → xan-TSDTZVY3.js} +1 -1
  113. package/dist/bin/chunks/{xan-view-JXOZLJ7S.js → xan-view-XBMA362V.js} +1 -1
  114. package/dist/bin/chunks/{xargs-UWHPYLY7.js → xargs-VTFN762K.js} +1 -1
  115. package/dist/bin/chunks/{yq-GCDCJBKB.js → yq-KU5YTNAK.js} +1 -1
  116. package/dist/bin/just-bash.js +378 -303
  117. package/dist/bin/shell/chunks/{awk2-RLMNTGI7.js → awk2-UFCNQFCV.js} +1 -1
  118. package/dist/bin/{chunks/base64-RZRLGMB3.js → shell/chunks/base64-EGKVQIBC.js} +1 -1
  119. package/dist/bin/{chunks/bash-CLP24TE2.js → shell/chunks/bash-BEG4JB7K.js} +1 -1
  120. package/dist/bin/{chunks/cat-LQH5FSAR.js → shell/chunks/cat-NBL6MU5H.js} +1 -1
  121. package/dist/bin/shell/chunks/{chunk-KFMPGSUT.js → chunk-2ZAK22BG.js} +1 -1
  122. package/dist/bin/shell/chunks/chunk-4BNS566Q.js +4 -0
  123. package/dist/bin/shell/chunks/chunk-4J4UC7OD.js +17 -0
  124. package/dist/bin/{chunks/chunk-IEXQTXU5.js → shell/chunks/chunk-52FZYTIX.js} +4 -4
  125. package/dist/bin/{chunks/chunk-EDTBGO7F.js → shell/chunks/chunk-5KX5YUWT.js} +1 -1
  126. package/dist/bin/shell/chunks/{chunk-XFFUAO3F.js → chunk-6FYCU7QB.js} +1 -1
  127. package/dist/bin/shell/chunks/{chunk-PAYQNSZN.js → chunk-6JKLDBRW.js} +1 -1
  128. package/dist/bin/shell/chunks/{chunk-22HCD466.js → chunk-7HK63L6Y.js} +1 -1
  129. package/dist/bin/shell/chunks/chunk-7NDRU2ZN.js +5 -0
  130. package/dist/bin/{chunks/chunk-IZGLHVBB.js → shell/chunks/chunk-AFAD5U2A.js} +1 -1
  131. package/dist/bin/shell/chunks/{chunk-LNNWMRCB.js → chunk-AZH64XMJ.js} +1 -1
  132. package/dist/bin/shell/chunks/{chunk-6FSBHK6H.js → chunk-C6JOQKE2.js} +1 -1
  133. package/dist/bin/{chunks/chunk-77MLOOQS.js → shell/chunks/chunk-CX5CEEGI.js} +1 -1
  134. package/dist/bin/shell/chunks/{chunk-NXVG64T3.js → chunk-D7YFPDMV.js} +1 -1
  135. package/dist/bin/shell/chunks/chunk-DHIKZU63.js +3 -0
  136. package/dist/bin/shell/chunks/{chunk-UR4CEP4Y.js → chunk-DWECIBLJ.js} +1 -1
  137. package/dist/bin/shell/chunks/{chunk-C7ISPH7Y.js → chunk-FEENTUVZ.js} +1 -1
  138. package/dist/bin/shell/chunks/{chunk-FVRXEJYQ.js → chunk-FJABJBIW.js} +2 -2
  139. package/dist/bin/shell/chunks/{chunk-YOKQNNQO.js → chunk-FYCT4DWY.js} +1 -1
  140. package/dist/bin/shell/chunks/{chunk-J7TUF2VI.js → chunk-G7ZWT7BT.js} +1 -1
  141. package/dist/bin/shell/chunks/{chunk-XJ37N3S5.js → chunk-GTO74SFS.js} +1 -1
  142. package/dist/bin/{chunks/chunk-L24QXM5S.js → shell/chunks/chunk-GXX3QUMM.js} +1 -1
  143. package/dist/bin/shell/chunks/chunk-HMCRB24D.js +15 -0
  144. package/dist/bin/shell/chunks/{chunk-FKVQZWJQ.js → chunk-HWNCK5BB.js} +1 -1
  145. package/dist/bin/shell/chunks/{chunk-V2RP73X4.js → chunk-IX7LKVVH.js} +1 -1
  146. package/dist/bin/{chunks/chunk-JZW7NFK2.js → shell/chunks/chunk-J7XTZ47D.js} +1 -1
  147. package/dist/bin/shell/chunks/{chunk-3BYTCO2H.js → chunk-JDFKEXLG.js} +1 -1
  148. package/dist/bin/{chunks/chunk-HN2DCT7T.js → shell/chunks/chunk-JJC4ENJL.js} +1 -1
  149. package/dist/bin/{chunks/chunk-F3WNDKOC.js → shell/chunks/chunk-JSZBZ2XU.js} +1 -1
  150. package/dist/bin/{chunks/chunk-UO5LOD7U.js → shell/chunks/chunk-KMZUSEWI.js} +1 -1
  151. package/dist/bin/{chunks/chunk-OPMLWMNH.js → shell/chunks/chunk-KWCO3YXP.js} +1 -1
  152. package/dist/bin/{chunks/chunk-LSQTB2QK.js → shell/chunks/chunk-LMA4D2KK.js} +1 -1
  153. package/dist/bin/{chunks/chunk-HL4ZS7TX.js → shell/chunks/chunk-LX2H4DPL.js} +3 -3
  154. package/dist/bin/shell/chunks/{chunk-X4MX6EHF.js → chunk-MP77TJMM.js} +1 -1
  155. package/dist/bin/{chunks/chunk-F3GKANW3.js → shell/chunks/chunk-MTK7VLZG.js} +1 -1
  156. package/dist/bin/shell/chunks/chunk-N3FQJLPZ.js +17 -0
  157. package/dist/bin/{chunks/chunk-2SVX7I5P.js → shell/chunks/chunk-NMMVECGD.js} +1 -1
  158. package/dist/bin/shell/chunks/{chunk-LAHBP3FW.js → chunk-NXYVRP6D.js} +1 -1
  159. package/dist/bin/shell/chunks/{chunk-7UU7KPEM.js → chunk-OVVMB2JI.js} +1 -1
  160. package/dist/bin/shell/chunks/{chunk-YY5PJR7O.js → chunk-OXZSG3ZZ.js} +1 -1
  161. package/dist/bin/{chunks/chunk-CAZ75E7E.js → shell/chunks/chunk-PKE7GKU5.js} +1 -1
  162. package/dist/bin/{chunks/chunk-7AYT3UKI.js → shell/chunks/chunk-PSJORJRS.js} +1 -1
  163. package/dist/bin/shell/chunks/{chunk-7NC4CPHS.js → chunk-R36DS2UF.js} +1 -1
  164. package/dist/bin/shell/chunks/{chunk-2NRAWO6E.js → chunk-RKBWTGBZ.js} +1 -1
  165. package/dist/bin/{chunks/chunk-LC6D27QJ.js → shell/chunks/chunk-RVGYO2OU.js} +1 -1
  166. package/dist/bin/shell/chunks/{chunk-SMSELHIY.js → chunk-SF2OLINE.js} +1 -1
  167. package/dist/bin/{chunks/chunk-M65CQLJE.js → shell/chunks/chunk-TIRU5FOD.js} +1 -1
  168. package/dist/bin/shell/chunks/{chunk-BE4PARL3.js → chunk-TKYWUEON.js} +1 -1
  169. package/dist/bin/shell/chunks/chunk-TYBXHT6W.js +10 -0
  170. package/dist/bin/shell/chunks/chunk-UI7CV277.js +20 -0
  171. package/dist/bin/shell/chunks/{chunk-KRRM5UCC.js → chunk-UNWZQG7U.js} +1 -1
  172. package/dist/bin/{chunks/chunk-4KSZJAQK.js → shell/chunks/chunk-W5OBQVJ2.js} +1 -1
  173. package/dist/bin/shell/chunks/{chunk-JNUX75OX.js → chunk-WHUKZ3K3.js} +1 -1
  174. package/dist/bin/shell/chunks/chunk-Y2IUEWQD.js +11 -0
  175. package/dist/bin/shell/chunks/chunk-Y5OWCEDV.js +64 -0
  176. package/dist/bin/shell/chunks/{chunk-H7JTIXAO.js → chunk-ZZP3RSWL.js} +1 -1
  177. package/dist/bin/shell/chunks/{column-AQB3A3PJ.js → column-QLGOK3XM.js} +1 -1
  178. package/dist/bin/{chunks/comm-Q4VDF6ZO.js → shell/chunks/comm-PLYUTVP3.js} +1 -1
  179. package/dist/bin/shell/chunks/curl-DCSPNPEW.js +27 -0
  180. package/dist/bin/shell/chunks/{cut-ZI2HIAW7.js → cut-JNQTCQY7.js} +1 -1
  181. package/dist/bin/shell/chunks/date-OFYBOAUE.js +3 -0
  182. package/dist/bin/{chunks/diff-YDJ42RKS.js → shell/chunks/diff-LZ4WRLIF.js} +1 -1
  183. package/dist/bin/shell/chunks/{env-NY32PQJM.js → env-FNVYNLGB.js} +1 -1
  184. package/dist/bin/{chunks/expand-YYSO35NS.js → shell/chunks/expand-CB7FG7LQ.js} +1 -1
  185. package/dist/bin/{chunks/expr-7PLWSWZI.js → shell/chunks/expr-6A2XZORA.js} +1 -1
  186. package/dist/bin/shell/chunks/{find-P4DOE7CE.js → find-5OZWMYCV.js} +1 -1
  187. package/dist/bin/shell/chunks/flag-coverage-H6NG6ZQL.js +3 -0
  188. package/dist/bin/{chunks/fold-5MF7QZWQ.js → shell/chunks/fold-7YEITA5L.js} +1 -1
  189. package/dist/bin/shell/chunks/{grep-VAYCFO4O.js → grep-KKBXRB73.js} +1 -1
  190. package/dist/bin/shell/chunks/{gzip-UGBQQKIH.js → gzip-ZJP5VIAQ.js} +1 -1
  191. package/dist/bin/shell/chunks/{head-QNC2ZYDO.js → head-B6GFQHKF.js} +1 -1
  192. package/dist/bin/{chunks/html-to-markdown-QEFY7XQR.js → shell/chunks/html-to-markdown-3HJ7L7NL.js} +1 -1
  193. package/dist/bin/shell/chunks/{join-EJ73DYTK.js → join-WRM6S6CO.js} +1 -1
  194. package/dist/bin/shell/chunks/{jq-GGTKKMEN.js → jq-33GJJXTL.js} +1 -1
  195. package/dist/bin/shell/chunks/{js-exec-BC6NI55L.js → js-exec-F7JAZ4ZQ.js} +1 -1
  196. package/dist/bin/shell/chunks/{md5sum-MCVDIB35.js → md5sum-ZNYCDRQL.js} +1 -1
  197. package/dist/bin/{chunks/nl-KUPLVCTS.js → shell/chunks/nl-6TVYE4ZB.js} +1 -1
  198. package/dist/bin/{chunks/od-YQ5ZUI2H.js → shell/chunks/od-Y3E3QXOL.js} +1 -1
  199. package/dist/bin/{chunks/paste-A5KKPWXX.js → shell/chunks/paste-LYNFXXCM.js} +1 -1
  200. package/dist/bin/shell/chunks/printf-MR3FXCDE.js +3 -0
  201. package/dist/bin/{chunks/python3-BQWDPUBM.js → shell/chunks/python3-R5OFWJIH.js} +1 -1
  202. package/dist/bin/{chunks/rev-PYHOZ4D4.js → shell/chunks/rev-AJECDD4L.js} +1 -1
  203. package/dist/bin/shell/chunks/{rg-BGFMSIVK.js → rg-2YWJS6TE.js} +1 -1
  204. package/dist/bin/shell/chunks/{sed-FWA634SN.js → sed-IGRH7EGG.js} +1 -1
  205. package/dist/bin/shell/chunks/{sha1sum-4KF52U3Y.js → sha1sum-5QZSNFY3.js} +1 -1
  206. package/dist/bin/shell/chunks/{sha256sum-6YEPULPX.js → sha256sum-DI7JAVAU.js} +1 -1
  207. package/dist/bin/{chunks/sleep-QHAPNY3Q.js → shell/chunks/sleep-RPGCUUGX.js} +1 -1
  208. package/dist/bin/{chunks/sort-4C6WOKNK.js → shell/chunks/sort-HQPAFL76.js} +1 -1
  209. package/dist/bin/shell/chunks/{split-TV7NL7LA.js → split-F6FSB5KI.js} +1 -1
  210. package/dist/bin/shell/chunks/{sqlite3-W777NCI4.js → sqlite3-7TRACAE7.js} +1 -1
  211. package/dist/bin/shell/chunks/{strings-MDD72LR6.js → strings-6PE3YMPO.js} +1 -1
  212. package/dist/bin/shell/chunks/{tac-C2N4NQ6S.js → tac-NERJXVOM.js} +1 -1
  213. package/dist/bin/shell/chunks/{tail-BCB5W6JC.js → tail-24F643A4.js} +1 -1
  214. package/dist/bin/shell/chunks/tar-5HK3VMV2.js +3 -0
  215. package/dist/bin/shell/chunks/{tee-UQHPO4OW.js → tee-5B7P2QRJ.js} +1 -1
  216. package/dist/bin/shell/chunks/{time-ZPY52VT2.js → time-FN6VJGRS.js} +1 -1
  217. package/dist/bin/shell/chunks/{timeout-5AX3ZS3X.js → timeout-ZARIAF3K.js} +1 -1
  218. package/dist/bin/{chunks/tr-G7K6M6HP.js → shell/chunks/tr-QQZYZ3CH.js} +1 -1
  219. package/dist/bin/shell/chunks/{unexpand-QIR4EDPG.js → unexpand-3JWOSSBQ.js} +1 -1
  220. package/dist/bin/shell/chunks/{uniq-I7PVFJR4.js → uniq-Q5UH5NL3.js} +1 -1
  221. package/dist/bin/{chunks/wc-6NGWULAP.js → shell/chunks/wc-4HXNTHY3.js} +1 -1
  222. package/dist/bin/shell/chunks/{xan-KX4VPXUN.js → xan-TSDTZVY3.js} +1 -1
  223. package/dist/bin/shell/chunks/{xan-view-JXOZLJ7S.js → xan-view-XBMA362V.js} +1 -1
  224. package/dist/bin/shell/chunks/{xargs-UWHPYLY7.js → xargs-VTFN762K.js} +1 -1
  225. package/dist/bin/shell/chunks/{yq-GCDCJBKB.js → yq-KU5YTNAK.js} +1 -1
  226. package/dist/bin/shell/shell.js +383 -308
  227. package/dist/bundle/browser.js +665 -659
  228. package/dist/bundle/chunks/{awk2-LA3USKJP.js → awk2-SREAOJRG.js} +1 -1
  229. package/dist/bundle/chunks/{base64-C2AIWVNC.js → base64-WIGL46P3.js} +1 -1
  230. package/dist/bundle/chunks/{bash-YZ33HQZQ.js → bash-F4KHPMTX.js} +1 -1
  231. package/dist/bundle/chunks/{cat-TSFMZVYS.js → cat-LPZ6XNHG.js} +1 -1
  232. package/dist/bundle/chunks/{chunk-ICIEVHY5.js → chunk-55LZFN6S.js} +1 -1
  233. package/dist/bundle/chunks/{chunk-6VAT5Z2D.js → chunk-5MV7Q5QB.js} +1 -1
  234. package/dist/bundle/chunks/{chunk-UP6MSJGD.js → chunk-6L65G6A7.js} +1 -1
  235. package/dist/bundle/chunks/{chunk-GGC5NEPZ.js → chunk-6NYPZ4NX.js} +1 -1
  236. package/dist/bundle/chunks/{chunk-4RUAZWKT.js → chunk-7CSMHFIJ.js} +4 -4
  237. package/dist/bundle/chunks/{chunk-ACSZB4FE.js → chunk-AAGO7IQ5.js} +1 -1
  238. package/dist/bundle/chunks/chunk-AFQAPVZ3.js +16 -0
  239. package/dist/bundle/chunks/{chunk-5H5SCKJM.js → chunk-AX2X3SZS.js} +1 -1
  240. package/dist/bundle/chunks/{chunk-EBAPSGAO.js → chunk-AXMYAPFA.js} +1 -1
  241. package/dist/bundle/chunks/chunk-BU36VZYL.js +4 -0
  242. package/dist/bundle/chunks/{chunk-CBJVD2XA.js → chunk-CJFAMHFC.js} +1 -1
  243. package/dist/bundle/chunks/{chunk-GJC3WVOW.js → chunk-CQV3EITV.js} +1 -1
  244. package/dist/bundle/chunks/{chunk-Q7H5W7YE.js → chunk-DJ7QC6LC.js} +2 -2
  245. package/dist/bundle/chunks/{chunk-S3LEJEPP.js → chunk-DVJY2RAX.js} +1 -1
  246. package/dist/bundle/chunks/{chunk-N6DXJ2JN.js → chunk-EUCNMMRD.js} +1 -1
  247. package/dist/bundle/chunks/{chunk-GTQIUQM6.js → chunk-FLMHFDSN.js} +1 -1
  248. package/dist/bundle/chunks/chunk-GE6OQDB2.js +10 -0
  249. package/dist/bundle/chunks/{chunk-FW54FHZR.js → chunk-GHB6M7KA.js} +1 -1
  250. package/dist/bundle/chunks/{chunk-LNBPBRV4.js → chunk-GRQJA2J7.js} +1 -1
  251. package/dist/bundle/chunks/{chunk-R74UQCKX.js → chunk-H2TS57O5.js} +1 -1
  252. package/dist/bundle/chunks/{chunk-7JHM3L42.js → chunk-H7WISVP3.js} +1 -1
  253. package/dist/bundle/chunks/chunk-HAIOEUEV.js +63 -0
  254. package/dist/bundle/chunks/{chunk-46RN27KI.js → chunk-IZ6KBTV7.js} +1 -1
  255. package/dist/bundle/chunks/{chunk-T4TFLF3R.js → chunk-JTMQLUCH.js} +1 -1
  256. package/dist/bundle/chunks/{chunk-2JIPICV3.js → chunk-K5JMLDHX.js} +1 -1
  257. package/dist/bundle/chunks/{chunk-L64BMZUV.js → chunk-KAPG5ONA.js} +1 -1
  258. package/dist/bundle/chunks/chunk-KSBHIW2H.js +19 -0
  259. package/dist/bundle/chunks/{chunk-XHLMAZX2.js → chunk-KTL5PAHY.js} +1 -1
  260. package/dist/bundle/chunks/{chunk-YCLFEX4T.js → chunk-KTPCYKBB.js} +1 -1
  261. package/dist/bundle/chunks/chunk-LI6PTSPD.js +9 -0
  262. package/dist/bundle/chunks/{chunk-LEKBROJD.js → chunk-LZUPLYFM.js} +1 -1
  263. package/dist/bundle/chunks/{chunk-4N6J7B5P.js → chunk-MFRETFZB.js} +1 -1
  264. package/dist/bundle/chunks/{chunk-OVGANXCG.js → chunk-MIZIUC5M.js} +1 -1
  265. package/dist/bundle/chunks/chunk-MJLETYZI.js +14 -0
  266. package/dist/bundle/chunks/{chunk-VLCHOJWK.js → chunk-MTHXXA6H.js} +1 -1
  267. package/dist/bundle/chunks/{chunk-6LASZU3O.js → chunk-NGPDJCUE.js} +1 -1
  268. package/dist/bundle/chunks/{chunk-ZZKH2ELC.js → chunk-OVH44QKR.js} +1 -1
  269. package/dist/bundle/chunks/chunk-PDUL32DM.js +16 -0
  270. package/dist/bundle/chunks/{chunk-KD3KENL6.js → chunk-PYDWFCTN.js} +1 -1
  271. package/dist/bundle/chunks/{chunk-AQ6FYS2X.js → chunk-QAJKDPNS.js} +1 -1
  272. package/dist/bundle/chunks/{chunk-XCQWV4AU.js → chunk-R4QNMLOB.js} +1 -1
  273. package/dist/bundle/chunks/chunk-RBQG6ZUG.js +3 -0
  274. package/dist/bundle/chunks/{chunk-U73A73IE.js → chunk-RCXNPPJY.js} +1 -1
  275. package/dist/bundle/chunks/{chunk-S443BAN4.js → chunk-S2BIZAWY.js} +1 -1
  276. package/dist/bundle/chunks/{chunk-XRFHFXFP.js → chunk-SY4HAUHP.js} +1 -1
  277. package/dist/bundle/chunks/{chunk-FJK43EBQ.js → chunk-TA74ENH7.js} +1 -1
  278. package/dist/bundle/chunks/{chunk-OC35HPHG.js → chunk-TC2WHAIS.js} +1 -1
  279. package/dist/bundle/chunks/{chunk-TN7HHBQW.js → chunk-VACKIICN.js} +3 -3
  280. package/dist/bundle/chunks/{chunk-GSPYNYZA.js → chunk-VBLMIJON.js} +1 -1
  281. package/dist/bundle/chunks/{chunk-VPADYNBD.js → chunk-WKPK7M56.js} +1 -1
  282. package/dist/bundle/chunks/chunk-XEKXHOPO.js +2 -0
  283. package/dist/bundle/chunks/{chunk-BVKWRAS6.js → chunk-XPK7ZFVA.js} +1 -1
  284. package/dist/bundle/chunks/{chunk-FAXLQUCQ.js → chunk-XZUZRAAC.js} +1 -1
  285. package/dist/bundle/chunks/{chunk-HJBTD7PY.js → chunk-YRNR2VHY.js} +1 -1
  286. package/dist/bundle/chunks/{chunk-KATRCGLX.js → chunk-YWOZZRSK.js} +1 -1
  287. package/dist/bundle/chunks/{chunk-FX7KQCEA.js → chunk-Z3KJQD7F.js} +1 -1
  288. package/dist/bundle/chunks/{column-XT6UFXNQ.js → column-PVOEF65J.js} +1 -1
  289. package/dist/bundle/chunks/{comm-VV2LDX2J.js → comm-5QMYEAJL.js} +1 -1
  290. package/dist/bundle/chunks/curl-PAWGO3EH.js +26 -0
  291. package/dist/bundle/chunks/{cut-OKARJCCV.js → cut-NDMV7SPO.js} +1 -1
  292. package/dist/bundle/chunks/date-XKUEQ4WF.js +2 -0
  293. package/dist/bundle/chunks/{diff-MWJFIG7X.js → diff-TT4M7WM3.js} +1 -1
  294. package/dist/bundle/chunks/{env-36M5BO7M.js → env-DLFRY633.js} +1 -1
  295. package/dist/bundle/chunks/{expand-JSPG6VOP.js → expand-T2TH4TBQ.js} +1 -1
  296. package/dist/bundle/chunks/{expr-5JAACS4X.js → expr-YLACLCSM.js} +1 -1
  297. package/dist/bundle/chunks/find-T5TGGXUU.js +2 -0
  298. package/dist/bundle/chunks/flag-coverage-TRYUZMPS.js +2 -0
  299. package/dist/bundle/chunks/{fold-4TQNYMSW.js → fold-XR2JMFCW.js} +1 -1
  300. package/dist/bundle/chunks/{grep-V3LQVMRQ.js → grep-VUESTEZ7.js} +1 -1
  301. package/dist/bundle/chunks/{gzip-O5ASJAFY.js → gzip-HF3D26QX.js} +1 -1
  302. package/dist/bundle/chunks/{head-442HYESI.js → head-AEMOMQSZ.js} +1 -1
  303. package/dist/bundle/chunks/{html-to-markdown-JW4MSQZO.js → html-to-markdown-LXXMVQ3V.js} +1 -1
  304. package/dist/bundle/chunks/{join-TBRGI3LQ.js → join-YIABB6WR.js} +1 -1
  305. package/dist/bundle/chunks/{jq-4XLYLOS5.js → jq-3FAAQVR6.js} +1 -1
  306. package/dist/bundle/chunks/{js-exec-N5KEZBH7.js → js-exec-SR6IMNWM.js} +1 -1
  307. package/dist/bundle/chunks/js-exec-worker.js +214 -17
  308. package/dist/bundle/chunks/{md5sum-SPU24VSG.js → md5sum-LU7RVIB7.js} +1 -1
  309. package/dist/bundle/chunks/{nl-WSDW7I4O.js → nl-Q2L5XQWZ.js} +1 -1
  310. package/dist/bundle/chunks/{od-WOKFDJTP.js → od-RDSM4TQJ.js} +1 -1
  311. package/dist/bundle/chunks/{paste-7JC6S4DX.js → paste-ABCY7E6C.js} +1 -1
  312. package/dist/bundle/chunks/printf-JPOOWRJC.js +2 -0
  313. package/dist/bundle/chunks/{python3-POMOR4OA.js → python3-JPCH6LLN.js} +1 -1
  314. package/dist/bundle/chunks/{rev-5EHFX4EJ.js → rev-GCV6X22K.js} +1 -1
  315. package/dist/bundle/chunks/rg-N5WLPMSA.js +2 -0
  316. package/dist/bundle/chunks/{sed-S5UIK574.js → sed-DX2SGXMF.js} +1 -1
  317. package/dist/bundle/chunks/{sha1sum-2PTOAFR6.js → sha1sum-O6DM3TPQ.js} +1 -1
  318. package/dist/bundle/chunks/{sha256sum-NS7D3IXX.js → sha256sum-WPVZLZPS.js} +1 -1
  319. package/dist/bundle/chunks/{sleep-X22JJINO.js → sleep-HZ4QEFOK.js} +1 -1
  320. package/dist/bundle/chunks/{sort-SW2YEO5B.js → sort-VW2NIZHW.js} +1 -1
  321. package/dist/bundle/chunks/{split-4KKZZXXE.js → split-NBMH43M2.js} +1 -1
  322. package/dist/bundle/chunks/{sqlite3-CGOEFJAO.js → sqlite3-UE3PJTDQ.js} +1 -1
  323. package/dist/bundle/chunks/sqlite3-worker.js +3 -2
  324. package/dist/bundle/chunks/{strings-6WDHLGMX.js → strings-MCXFXPDL.js} +1 -1
  325. package/dist/bundle/chunks/{tac-2STMMJYW.js → tac-BQ7EDZW2.js} +1 -1
  326. package/dist/bundle/chunks/{tail-R4PCA2C4.js → tail-GJMTLMNE.js} +1 -1
  327. package/dist/bundle/chunks/tar-WIZ3PDF4.js +2 -0
  328. package/dist/bundle/chunks/{tee-YUZ2FKCJ.js → tee-SGANDVNY.js} +1 -1
  329. package/dist/bundle/chunks/{time-D4LNBSWX.js → time-FCZCDIAM.js} +1 -1
  330. package/dist/bundle/chunks/timeout-VDIEAB4R.js +2 -0
  331. package/dist/bundle/chunks/{tr-36LHWFRQ.js → tr-JNNR5JMS.js} +1 -1
  332. package/dist/bundle/chunks/{unexpand-CADSA4VO.js → unexpand-2TKXAENW.js} +1 -1
  333. package/dist/bundle/chunks/{uniq-XSIZR6PB.js → uniq-DMFKT3AB.js} +1 -1
  334. package/dist/bundle/chunks/{wc-LF7NU4LA.js → wc-TZFYWFLA.js} +1 -1
  335. package/dist/bundle/chunks/worker.js +3 -2
  336. package/dist/bundle/chunks/{xan-Y6WF3IRG.js → xan-U6654PZR.js} +1 -1
  337. package/dist/bundle/chunks/xan-view-YATJ4KAA.js +2 -0
  338. package/dist/bundle/chunks/{xargs-MGZPH7AX.js → xargs-VDP7DLOU.js} +1 -1
  339. package/dist/bundle/chunks/yq-ZBXLBSXV.js +2 -0
  340. package/dist/bundle/index.cjs +934 -928
  341. package/dist/bundle/index.js +385 -310
  342. package/dist/commands/curl/types.d.ts +29 -0
  343. package/dist/commands/js-exec/module-shims.d.ts +1 -1
  344. package/dist/commands/sqlite3/worker.js +3 -2
  345. package/dist/commands/tar/tar-options.d.ts +1 -1
  346. package/dist/encoding.d.ts +14 -0
  347. package/dist/parser/parser-substitution.d.ts +14 -0
  348. package/package.json +1 -1
  349. package/dist/bin/chunks/chunk-3UKQXBQ3.js +0 -6
  350. package/dist/bin/chunks/chunk-ALVEEXFD.js +0 -19
  351. package/dist/bin/chunks/chunk-BGX3RW7H.js +0 -10
  352. package/dist/bin/chunks/chunk-D6CPXGKK.js +0 -75
  353. package/dist/bin/chunks/chunk-FOUVACI7.js +0 -16
  354. package/dist/bin/chunks/chunk-Q4UMTSRO.js +0 -15
  355. package/dist/bin/chunks/chunk-UGJM7CKP.js +0 -17
  356. package/dist/bin/chunks/chunk-VBDLSL7Y.js +0 -10
  357. package/dist/bin/chunks/chunk-VZK4FHWJ.js +0 -3
  358. package/dist/bin/chunks/chunk-Y4FPH5DQ.js +0 -64
  359. package/dist/bin/chunks/curl-AXXGQRR2.js +0 -27
  360. package/dist/bin/chunks/date-JEZYSA4F.js +0 -3
  361. package/dist/bin/chunks/expansion-PPP6PD75.js +0 -3
  362. package/dist/bin/chunks/flag-coverage-RFKIBJ6L.js +0 -3
  363. package/dist/bin/chunks/printf-Z5C2UOI5.js +0 -3
  364. package/dist/bin/chunks/tar-DOO744MK.js +0 -3
  365. package/dist/bin/shell/chunks/chunk-3UKQXBQ3.js +0 -6
  366. package/dist/bin/shell/chunks/chunk-ALVEEXFD.js +0 -19
  367. package/dist/bin/shell/chunks/chunk-BGX3RW7H.js +0 -10
  368. package/dist/bin/shell/chunks/chunk-D6CPXGKK.js +0 -75
  369. package/dist/bin/shell/chunks/chunk-FOUVACI7.js +0 -16
  370. package/dist/bin/shell/chunks/chunk-Q4UMTSRO.js +0 -15
  371. package/dist/bin/shell/chunks/chunk-UGJM7CKP.js +0 -17
  372. package/dist/bin/shell/chunks/chunk-VBDLSL7Y.js +0 -10
  373. package/dist/bin/shell/chunks/chunk-VZK4FHWJ.js +0 -3
  374. package/dist/bin/shell/chunks/chunk-Y4FPH5DQ.js +0 -64
  375. package/dist/bin/shell/chunks/curl-AXXGQRR2.js +0 -27
  376. package/dist/bin/shell/chunks/date-JEZYSA4F.js +0 -3
  377. package/dist/bin/shell/chunks/expansion-PPP6PD75.js +0 -3
  378. package/dist/bin/shell/chunks/flag-coverage-RFKIBJ6L.js +0 -3
  379. package/dist/bin/shell/chunks/printf-Z5C2UOI5.js +0 -3
  380. package/dist/bin/shell/chunks/tar-DOO744MK.js +0 -3
  381. package/dist/bundle/chunks/chunk-CHFEPBH4.js +0 -18
  382. package/dist/bundle/chunks/chunk-G5EVRAOO.js +0 -74
  383. package/dist/bundle/chunks/chunk-GIUR5SNU.js +0 -15
  384. package/dist/bundle/chunks/chunk-MZFCCXPZ.js +0 -63
  385. package/dist/bundle/chunks/chunk-NRSASXYY.js +0 -2
  386. package/dist/bundle/chunks/chunk-OGJ5CFPR.js +0 -9
  387. package/dist/bundle/chunks/chunk-SO6R3ZKN.js +0 -16
  388. package/dist/bundle/chunks/chunk-XDGLKIHR.js +0 -9
  389. package/dist/bundle/chunks/chunk-XUIHBHL5.js +0 -5
  390. package/dist/bundle/chunks/chunk-XYXUMFSU.js +0 -14
  391. package/dist/bundle/chunks/curl-LV5Y3AMS.js +0 -26
  392. package/dist/bundle/chunks/date-UUUPW43J.js +0 -2
  393. package/dist/bundle/chunks/expansion-R25BK4W3.js +0 -2
  394. package/dist/bundle/chunks/find-INTH3OLC.js +0 -2
  395. package/dist/bundle/chunks/flag-coverage-XWSYNE72.js +0 -2
  396. package/dist/bundle/chunks/printf-TWGXF445.js +0 -2
  397. package/dist/bundle/chunks/rg-S4FXYXWB.js +0 -2
  398. package/dist/bundle/chunks/tar-STHHZTZ6.js +0 -2
  399. package/dist/bundle/chunks/timeout-YDCRSLPQ.js +0 -2
  400. package/dist/bundle/chunks/xan-view-HDVKHFC2.js +0 -2
  401. package/dist/bundle/chunks/yq-4QJW3EQG.js +0 -2
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
- import{a as n,b as i,c as r}from"./chunk-UGJM7CKP.js";import{a,b as s}from"./chunk-MUFNRCMY.js";var f={name:"head",summary:"output the first part of files",usage:"head [OPTION]... [FILE]...",options:["-c, --bytes=NUM print the first NUM bytes","-n, --lines=NUM print the first NUM lines (default 10)","-q, --quiet never print headers giving file names","-v, --verbose always print headers giving file names"," --help display this help and exit"]},m={name:"head",async execute(t,l){if(s(t))return a(f);let e=n(t,"head");if(!e.ok)return e.error;let{lines:o,bytes:p}=e.options;return i(l,e.options,"head",d=>r(d,o,p))}},g={name:"head",flags:[{flag:"-n",type:"value",valueHint:"number"},{flag:"-c",type:"value",valueHint:"number"},{flag:"-q",type:"boolean"},{flag:"-v",type:"boolean"}],stdinType:"text",needsFiles:!0};export{m as a,g as b};
3
+ import{a as n,b as i,c as r}from"./chunk-N3FQJLPZ.js";import{a,b as s}from"./chunk-MUFNRCMY.js";var f={name:"head",summary:"output the first part of files",usage:"head [OPTION]... [FILE]...",options:["-c, --bytes=NUM print the first NUM bytes","-n, --lines=NUM print the first NUM lines (default 10)","-q, --quiet never print headers giving file names","-v, --verbose always print headers giving file names"," --help display this help and exit"]},m={name:"head",async execute(t,l){if(s(t))return a(f);let e=n(t,"head");if(!e.ok)return e.error;let{lines:o,bytes:p}=e.options;return i(l,e.options,"head",d=>r(d,o,p))}},g={name:"head",flags:[{flag:"-n",type:"value",valueHint:"number"},{flag:"-c",type:"value",valueHint:"number"},{flag:"-q",type:"boolean"},{flag:"-v",type:"boolean"}],stdinType:"text",needsFiles:!0};export{m as a,g as b};
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
- import{d as a}from"./chunk-VZK4FHWJ.js";import{a as d,b as h,c as p}from"./chunk-MUFNRCMY.js";var k={name:"split",summary:"split a file into pieces",usage:"split [OPTION]... [FILE [PREFIX]]",description:"Output pieces of FILE to PREFIXaa, PREFIXab, ...; default size is 1000 lines, and default PREFIX is 'x'.",options:["-l N Put N lines per output file","-b SIZE Put SIZE bytes per output file (K, M, G suffixes)","-n CHUNKS Split into CHUNKS equal-sized files","-d Use numeric suffixes (00, 01, ...) instead of alphabetic","-a LENGTH Use suffixes of length LENGTH (default: 2)","--additional-suffix=SUFFIX Append SUFFIX to file names"],examples:["split -l 100 file.txt # Split into 100-line chunks","split -b 1M file.bin # Split into 1MB chunks","split -n 5 file.txt # Split into 5 equal parts","split -d file.txt part_ # part_00, part_01, ...","split -a 3 -d file.txt x # x000, x001, ..."]},m=1e5;function b(s){let l=s.match(/^(\d+)([KMGTPEZY]?)([B]?)$/i);if(!l)return null;let e=Number.parseInt(l[1],10);if(Number.isNaN(e)||e<1)return null;let u=(l[2]||"").toUpperCase(),o=new Map([["",1],["K",1024],["M",1024*1024],["G",1024*1024*1024],["T",1024*1024*1024*1024],["P",1024*1024*1024*1024*1024]]).get(u);return o===void 0?null:e*o}function g(s,l,e){if(l)return s.toString().padStart(e,"0");let u="abcdefghijklmnopqrstuvwxyz",t="",o=s;for(let r=0;r<e;r++)t=u[o%26]+t,o=Math.floor(o/26);return t}function C(s,l){let e=s.split(`
3
+ import{d as a}from"./chunk-DHIKZU63.js";import{a as d,b as h,c as p}from"./chunk-MUFNRCMY.js";var k={name:"split",summary:"split a file into pieces",usage:"split [OPTION]... [FILE [PREFIX]]",description:"Output pieces of FILE to PREFIXaa, PREFIXab, ...; default size is 1000 lines, and default PREFIX is 'x'.",options:["-l N Put N lines per output file","-b SIZE Put SIZE bytes per output file (K, M, G suffixes)","-n CHUNKS Split into CHUNKS equal-sized files","-d Use numeric suffixes (00, 01, ...) instead of alphabetic","-a LENGTH Use suffixes of length LENGTH (default: 2)","--additional-suffix=SUFFIX Append SUFFIX to file names"],examples:["split -l 100 file.txt # Split into 100-line chunks","split -b 1M file.bin # Split into 1MB chunks","split -n 5 file.txt # Split into 5 equal parts","split -d file.txt part_ # part_00, part_01, ...","split -a 3 -d file.txt x # x000, x001, ..."]},m=1e5;function b(s){let l=s.match(/^(\d+)([KMGTPEZY]?)([B]?)$/i);if(!l)return null;let e=Number.parseInt(l[1],10);if(Number.isNaN(e)||e<1)return null;let u=(l[2]||"").toUpperCase(),o=new Map([["",1],["K",1024],["M",1024*1024],["G",1024*1024*1024],["T",1024*1024*1024*1024],["P",1024*1024*1024*1024*1024]]).get(u);return o===void 0?null:e*o}function g(s,l,e){if(l)return s.toString().padStart(e,"0");let u="abcdefghijklmnopqrstuvwxyz",t="",o=s;for(let r=0;r<e;r++)t=u[o%26]+t,o=Math.floor(o/26);return t}function C(s,l){let e=s.split(`
4
4
  `),u=s.endsWith(`
5
5
  `)&&e[e.length-1]==="";u&&e.pop();let t=[];for(let o=0;o<e.length;o+=l){let r=e.slice(o,o+l),c=o+l>=e.length&&!u?r.join(`
6
6
  `):`${r.join(`
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
- import{a as s}from"./chunk-FKVQZWJQ.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};
3
+ import{a as s}from"./chunk-HWNCK5BB.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};
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env node
2
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
+ import{a as p}from"./chunk-4BNS566Q.js";import{a as g,b as y,c as h}from"./chunk-MUFNRCMY.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}'
4
+ `,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}
5
+ `,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,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
- import{a as f}from"./chunk-VZK4FHWJ.js";import{a,b as c,c as d}from"./chunk-MUFNRCMY.js";var u={name:"rev",summary:"reverse lines characterwise",usage:"rev [file ...]",description:"Copies the specified files to standard output, reversing the order of characters in every line. If no files are specified, standard input is read.",examples:["echo 'hello' | rev # Output: olleh","rev file.txt # Reverse each line in file"]};function p(r){return Array.from(r).reverse().join("")}var g={name:"rev",execute:async(r,s)=>{if(c(r))return a(u);let o=[];for(let e of r)if(e==="--"){let t=r.indexOf(e);o.push(...r.slice(t+1));break}else{if(e.startsWith("-")&&e!=="-")return d("rev",e);o.push(e)}let n="",l=e=>{let t=e.split(`
3
+ import{a as f}from"./chunk-DHIKZU63.js";import{a,b as c,c as d}from"./chunk-MUFNRCMY.js";var u={name:"rev",summary:"reverse lines characterwise",usage:"rev [file ...]",description:"Copies the specified files to standard output, reversing the order of characters in every line. If no files are specified, standard input is read.",examples:["echo 'hello' | rev # Output: olleh","rev file.txt # Reverse each line in file"]};function p(r){return Array.from(r).reverse().join("")}var g={name:"rev",execute:async(r,s)=>{if(c(r))return a(u);let o=[];for(let e of r)if(e==="--"){let t=r.indexOf(e);o.push(...r.slice(t+1));break}else{if(e.startsWith("-")&&e!=="-")return d("rev",e);o.push(e)}let n="",l=e=>{let t=e.split(`
4
4
  `),i=e.endsWith(`
5
5
  `)&&t[t.length-1]==="";return i&&t.pop(),t.map(p).join(`
6
6
  `)+(i?`
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
- import{a as s,b as i}from"./chunk-HL4ZS7TX.js";function a(t,e,n){if(!t||i.isInSandboxedContext())return;let r=`${e} ${n} attempted outside defense context`;throw new s(r,{timestamp:Date.now(),type:"missing_defense_context",message:r,path:"DefenseInDepthBox.context",stack:new Error().stack,executionId:i.getCurrentExecutionId()})}async function x(t,e,n,r){a(t,e,`${n} (pre-await)`);let o=await r();return a(t,e,`${n} (post-await)`),o}function d(t,e,n,r){let o=((...c)=>(a(t,e,n),r(...c)));return t?i.bindCurrentContext(o):o}export{a,x as b,d as c};
3
+ import{a as s,b as i}from"./chunk-LX2H4DPL.js";function a(t,e,n){if(!t||i.isInSandboxedContext())return;let r=`${e} ${n} attempted outside defense context`;throw new s(r,{timestamp:Date.now(),type:"missing_defense_context",message:r,path:"DefenseInDepthBox.context",stack:new Error().stack,executionId:i.getCurrentExecutionId()})}async function x(t,e,n,r){a(t,e,`${n} (pre-await)`);let o=await r();return a(t,e,`${n} (post-await)`),o}function d(t,e,n,r){let o=((...c)=>(a(t,e,n),r(...c)));return t?i.bindCurrentContext(o):o}export{a,x as b,d as c};
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
- import{a as u}from"./chunk-VZK4FHWJ.js";import{a as S}from"./chunk-PBOVSFTJ.js";import{a as y}from"./chunk-NE4R2FVV.js";import{a as m,b as C}from"./chunk-MUFNRCMY.js";var b={name:"tr",summary:"translate or delete characters",usage:"tr [OPTION]... SET1 [SET2]",options:["-c, -C, --complement use the complement of SET1","-d, --delete delete characters in SET1","-s, --squeeze-repeats squeeze repeated characters"," --help display this help and exit"],description:`SET syntax:
3
+ import{a as u}from"./chunk-DHIKZU63.js";import{a as S}from"./chunk-PBOVSFTJ.js";import{a as y}from"./chunk-NE4R2FVV.js";import{a as m,b as C}from"./chunk-MUFNRCMY.js";var b={name:"tr",summary:"translate or delete characters",usage:"tr [OPTION]... SET1 [SET2]",options:["-c, -C, --complement use the complement of SET1","-d, --delete delete characters in SET1","-s, --squeeze-repeats squeeze repeated characters"," --help display this help and exit"],description:`SET syntax:
4
4
  a-z character range
5
5
  [:alnum:] all letters and digits
6
6
  [:alpha:] all letters
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
- import{a as d}from"./chunk-B2DRBHGQ.js";import{a as n,b as i}from"./chunk-KRRM5UCC.js";import{a,b as l}from"./chunk-MUFNRCMY.js";var u={name:"sleep",summary:"delay for a specified amount of time",usage:"sleep NUMBER[SUFFIX]",description:`Pause for NUMBER seconds. SUFFIX may be:
3
+ import{a as d}from"./chunk-B2DRBHGQ.js";import{a as n,b as i}from"./chunk-UNWZQG7U.js";import{a,b as l}from"./chunk-MUFNRCMY.js";var u={name:"sleep",summary:"delay for a specified amount of time",usage:"sleep NUMBER[SUFFIX]",description:`Pause for NUMBER seconds. SUFFIX may be:
4
4
  s - seconds (default)
5
5
  m - minutes
6
6
  h - hours
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
- import{a as Ee}from"./chunk-MROECM42.js";import{a as D,b as _}from"./chunk-LNNWMRCB.js";import{a as x}from"./chunk-HL4ZS7TX.js";import{a as v,b as H}from"./chunk-IEXQTXU5.js";import{a as z}from"./chunk-VZK4FHWJ.js";import{k as P}from"./chunk-47WZ2U6M.js";import{a as fe,b as de,c as ie}from"./chunk-MUFNRCMY.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
+ import{a as Ee}from"./chunk-MROECM42.js";import{a as D,b as _}from"./chunk-AZH64XMJ.js";import{a as x}from"./chunk-LX2H4DPL.js";import{a as v,b as H}from"./chunk-52FZYTIX.js";import{a as z}from"./chunk-DHIKZU63.js";import{k as P}from"./chunk-47WZ2U6M.js";import{a as fe,b as de,c as ie}from"./chunk-MUFNRCMY.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:`
4
4
  `,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+=`
5
5
  `,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+=`
6
6
  `;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(`
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
+ var d=new TextDecoder("utf-8",{fatal:!0}),c=new TextEncoder;function f(t){let e=t;if(!e)return e;let n=!1;for(let r=0;r<e.length;r++){let u=e.charCodeAt(r);if(u>255)return e;u>127&&(n=!0)}if(!n)return e;let o=new Uint8Array(e.length);for(let r=0;r<e.length;r++)o[r]=e.charCodeAt(r);try{return d.decode(o)}catch{return e}}function s(t){if(!t)return t;let e=c.encode(t),n="";for(let o=0;o<e.length;o++)n+=String.fromCharCode(e[o]);return n}var a="";function y(t){let e="";for(let n=0;n<t.length;n++)e+=String.fromCharCode(t[n]);return e}async function x(t,e){return typeof t.readFileBytes=="function"?t.readFileBytes(e):y(await t.readFileBuffer(e))}function i(t){return t.stdoutKind?t.stdoutKind:t.stdoutEncoding==="binary"?"bytes":"text"}function p(t){return i(t)==="bytes"?t.stdout:s(t.stdout)}function l(t){return i(t)==="bytes"?f(t.stdout):t.stdout}export{f as a,s as b,a as c,x as d,p as e,l as f};
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
- import{a as r}from"./chunk-IEXQTXU5.js";var g=2048,o=new Map;function u(l,c,t){let s=typeof t=="boolean"?{ignoreCase:t}:t??{},e=c;s.stripQuotes&&(e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"))&&(e=e.slice(1,-1));let i=s.ignoreCase?`i:${e}`:e,n=o.get(i);if(!n){if(n=a(e,s.ignoreCase),o.size>=g){let f=o.keys().next().value;f!==void 0&&o.delete(f)}o.set(i,n)}return n.test(l)}function a(l,c){let t="^";for(let s=0;s<l.length;s++){let e=l[s];if(e==="*")t+=".*";else if(e==="?")t+=".";else if(e==="["){let i=s+1;for(;i<l.length&&l[i]!=="]";)i++;t+=l.slice(s,i+1),s=i}else e==="."||e==="+"||e==="^"||e==="$"||e==="{"||e==="}"||e==="("||e===")"||e==="|"||e==="\\"?t+=`\\${e}`:t+=e}return t+="$",r(t,c?"i":"")}export{u as a};
3
+ import{a as r}from"./chunk-52FZYTIX.js";var g=2048,o=new Map;function u(l,c,t){let s=typeof t=="boolean"?{ignoreCase:t}:t??{},e=c;s.stripQuotes&&(e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"))&&(e=e.slice(1,-1));let i=s.ignoreCase?`i:${e}`:e,n=o.get(i);if(!n){if(n=a(e,s.ignoreCase),o.size>=g){let f=o.keys().next().value;f!==void 0&&o.delete(f)}o.set(i,n)}return n.test(l)}function a(l,c){let t="^";for(let s=0;s<l.length;s++){let e=l[s];if(e==="*")t+=".*";else if(e==="?")t+=".";else if(e==="["){let i=s+1;for(;i<l.length&&l[i]!=="]";)i++;t+=l.slice(s,i+1),s=i}else e==="."||e==="+"||e==="^"||e==="$"||e==="{"||e==="}"||e==="("||e===")"||e==="|"||e==="\\"?t+=`\\${e}`:t+=e}return t+="$",r(t,c?"i":"")}export{u as a};
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
- import{a as f}from"./chunk-VZK4FHWJ.js";import{a as m,b as c,c as b}from"./chunk-MUFNRCMY.js";var p={name:"nl",summary:"number lines of files",usage:"nl [OPTION]... [FILE]...",description:"Write each FILE to standard output, with line numbers added. If no FILE is specified, standard input is read.",options:["-b STYLE Body numbering style: a (all), t (non-empty), n (none)","-n FORMAT Number format: ln (left), rn (right), rz (right zeros)","-w WIDTH Number width (default: 6)","-s SEP Separator after number (default: TAB)","-v START Starting line number (default: 1)","-i INCR Line number increment (default: 1)"],examples:["nl file.txt # Number non-empty lines","nl -ba file.txt # Number all lines","nl -n rz -w 3 file.txt # Right-justified with zeros","nl -s ': ' file.txt # Use ': ' as separator"]};function N(r,s,i){let l=String(r);switch(s){case"ln":return l.padEnd(i);case"rn":return l.padStart(i);case"rz":return l.padStart(i,"0");default:return s}}function v(r,s){switch(s){case"a":return!0;case"t":return r.trim().length>0;case"n":return!1;default:return s}}function h(r,s,i){if(r==="")return{output:"",nextNumber:i};let l=r.split(`
3
+ import{a as f}from"./chunk-DHIKZU63.js";import{a as m,b as c,c as b}from"./chunk-MUFNRCMY.js";var p={name:"nl",summary:"number lines of files",usage:"nl [OPTION]... [FILE]...",description:"Write each FILE to standard output, with line numbers added. If no FILE is specified, standard input is read.",options:["-b STYLE Body numbering style: a (all), t (non-empty), n (none)","-n FORMAT Number format: ln (left), rn (right), rz (right zeros)","-w WIDTH Number width (default: 6)","-s SEP Separator after number (default: TAB)","-v START Starting line number (default: 1)","-i INCR Line number increment (default: 1)"],examples:["nl file.txt # Number non-empty lines","nl -ba file.txt # Number all lines","nl -n rz -w 3 file.txt # Right-justified with zeros","nl -s ': ' file.txt # Use ': ' as separator"]};function N(r,s,i){let l=String(r);switch(s){case"ln":return l.padEnd(i);case"rn":return l.padStart(i);case"rz":return l.padStart(i,"0");default:return s}}function v(r,s){switch(s){case"a":return!0;case"t":return r.trim().length>0;case"n":return!1;default:return s}}function h(r,s,i){if(r==="")return{output:"",nextNumber:i};let l=r.split(`
4
4
  `),t=[],u=i,a=r.endsWith(`
5
5
  `)&&l[l.length-1]==="";a&&l.pop();for(let n of l)if(v(n,s.bodyStyle)){let e=N(u,s.numberFormat,s.width);t.push(`${e}${s.separator}${n}`),u+=s.increment}else{let e=" ".repeat(s.width);t.push(`${e}${s.separator}${n}`)}return{output:t.join(`
6
6
  `)+(a?`
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
- 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-LAHBP3FW.js";import{a as st}from"./chunk-MNWK4UIM.js";import{a as $}from"./chunk-LSQTB2QK.js";import{f as qe,g as X}from"./chunk-MLUOPG3W.js";import{a as J}from"./chunk-IEXQTXU5.js";import{a as _e}from"./chunk-H7JTIXAO.js";import{a as _}from"./chunk-VZK4FHWJ.js";import{a as D,b as G}from"./chunk-MUFNRCMY.js";import{b as We,d as et,e as tt,f as nt}from"./chunk-LNVSXNT7.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
+ 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-NXYVRP6D.js";import{a as st}from"./chunk-MNWK4UIM.js";import{a as $}from"./chunk-LMA4D2KK.js";import{f as qe,g as X}from"./chunk-MLUOPG3W.js";import{a as J}from"./chunk-52FZYTIX.js";import{a as _e}from"./chunk-ZZP3RSWL.js";import{a as _}from"./chunk-DHIKZU63.js";import{a as D,b as G}from"./chunk-MUFNRCMY.js";import{b as We,d as et,e as tt,f as nt}from"./chunk-LNVSXNT7.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===`
4
4
  `||n==="\r")this.pos++;else if(n==="#")for(;this.pos<this.input.length&&this.input[this.pos]!==`
5
5
  `;)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+=`
6
6
  `;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
@@ -60,7 +60,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-LAHBP3FW
60
60
  `,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
61
61
  `,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}'
62
62
  `,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
63
- `,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-JXOZLJ7S.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
+ `,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-XBMA362V.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.
64
64
  It provides a simple, ergonomic interface for common data operations.
65
65
 
66
66
  COMMANDS:
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
- import{a as $}from"./chunk-3MRB66F4.js";import{a as v}from"./chunk-VZK4FHWJ.js";import{a as L,b as M,c as w}from"./chunk-MUFNRCMY.js";var N={name:"xargs",summary:"build and execute command lines from standard input",usage:"xargs [OPTION]... [COMMAND [INITIAL-ARGS]]",options:["-I REPLACE replace occurrences of REPLACE with input","-d DELIM use DELIM as input delimiter (e.g., -d '\\n' for newline)","-n NUM use at most NUM arguments per command line","-P NUM run at most NUM processes at a time","-0, --null items are separated by null, not whitespace","-t, --verbose print commands before executing","-r, --no-run-if-empty do not run command if input is empty"," --help display this help and exit"]},U={name:"xargs",async execute(l,i){if(M(l))return L(N);let m=null,g=null,c=null,o=null,h=!1,x=!1,y=!1,s=0;for(let e=0;e<l.length;e++){let t=l[e];if(t==="-I"&&e+1<l.length)m=l[++e],s=e+1;else if(t==="-d"&&e+1<l.length)g=l[++e].replace(/\\n/g,`
3
+ import{a as $}from"./chunk-3MRB66F4.js";import{a as v}from"./chunk-DHIKZU63.js";import{a as L,b as M,c as w}from"./chunk-MUFNRCMY.js";var N={name:"xargs",summary:"build and execute command lines from standard input",usage:"xargs [OPTION]... [COMMAND [INITIAL-ARGS]]",options:["-I REPLACE replace occurrences of REPLACE with input","-d DELIM use DELIM as input delimiter (e.g., -d '\\n' for newline)","-n NUM use at most NUM arguments per command line","-P NUM run at most NUM processes at a time","-0, --null items are separated by null, not whitespace","-t, --verbose print commands before executing","-r, --no-run-if-empty do not run command if input is empty"," --help display this help and exit"]},U={name:"xargs",async execute(l,i){if(M(l))return L(N);let m=null,g=null,c=null,o=null,h=!1,x=!1,y=!1,s=0;for(let e=0;e<l.length;e++){let t=l[e];if(t==="-I"&&e+1<l.length)m=l[++e],s=e+1;else if(t==="-d"&&e+1<l.length)g=l[++e].replace(/\\n/g,`
4
4
  `).replace(/\\t/g," ").replace(/\\r/g,"\r").replace(/\\0/g,"\0").replace(/\\\\/g,"\\"),s=e+1;else if(t==="-n"&&e+1<l.length)c=parseInt(l[++e],10),s=e+1;else if(t==="-P"&&e+1<l.length)o=parseInt(l[++e],10),s=e+1;else if(t==="-0"||t==="--null")h=!0,s=e+1;else if(t==="-t"||t==="--verbose")x=!0,s=e+1;else if(t==="-r"||t==="--no-run-if-empty")y=!0,s=e+1;else{if(t.startsWith("--"))return w("xargs",t);if(t.startsWith("-")&&t.length>1){for(let n of t.slice(1))if(!"0tr".includes(n))return w("xargs",`-${n}`);t.includes("0")&&(h=!0),t.includes("t")&&(x=!0),t.includes("r")&&(y=!0),s=e+1}else if(!t.startsWith("-")){s=e;break}}}let a=l.slice(s);a.length===0&&a.push("echo");let C=v(i.stdin),r;if(h?r=C.split("\0").filter(e=>e.length>0):g!==null?r=C.replace(/\n$/,"").split(g).filter(t=>t.length>0):r=C.split(/\s+/).map(e=>e.trim()).filter(e=>e.length>0),r.length===0)return y?{stdout:"",stderr:"",exitCode:0}:{stdout:"",stderr:"",exitCode:0};let f="",u="",d=0,I=e=>/[\s"'\\$`!*?[\]{}();&|<>#]/.test(e)?`"${e.replace(/([\\"`$])/g,"\\$1")}"`:e,b=async e=>{if(x){let n=e.map(I).join(" ");u+=`${n}
5
5
  `}return i.exec?i.exec($([e[0]]),{cwd:i.cwd,signal:i.signal,args:e.slice(1)}):{stdout:`${e.map(I).join(" ")}
6
6
  `,stderr:"",exitCode:0}},A=async e=>{if(o!==null&&o>1)for(let t=0;t<e.length;t+=o){let n=e.slice(t,t+o),E=await Promise.all(n.map(b));for(let p of E)f+=p.stdout,u+=p.stderr,p.exitCode!==0&&(d=p.exitCode)}else for(let t of e){let n=await b(t);f+=n.stdout,u+=n.stderr,n.exitCode!==0&&(d=n.exitCode)}};if(m!==null){let e=r.map(t=>a.map(n=>n.replaceAll(m,t)));await A(e)}else if(c!==null){let e=[];for(let t=0;t<r.length;t+=c){let n=r.slice(t,t+c);e.push([...a,...n])}await A(e)}else{let e=[...a,...r],t=await b(e);f+=t.stdout,u+=t.stderr,d=t.exitCode}return{stdout:f,stderr:u,exitCode:d}}},O={name:"xargs",flags:[{flag:"-I",type:"value",valueHint:"string"},{flag:"-d",type:"value",valueHint:"delimiter"},{flag:"-n",type:"value",valueHint:"number"},{flag:"-0",type:"boolean"},{flag:"-t",type:"boolean"},{flag:"-r",type:"boolean"}],stdinType:"text"};export{U as a,O as b};
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
- import{a as m}from"./chunk-VZK4FHWJ.js";import{a as x}from"./chunk-NE4R2FVV.js";import{a as g,b as y}from"./chunk-MUFNRCMY.js";var L={name:"paste",summary:"merge lines of files",usage:"paste [OPTION]... [FILE]...",description:["Write lines consisting of the sequentially corresponding lines from","each FILE, separated by TABs, to standard output.","","With no FILE, or when FILE is -, read standard input."],options:["-d, --delimiters=LIST reuse characters from LIST instead of TABs","-s, --serial paste one file at a time instead of in parallel"," --help display this help and exit"],examples:["paste file1 file2 Merge file1 and file2 side by side","paste -d, file1 file2 Use comma as delimiter","paste -s file1 Paste all lines of file1 on one line","paste - - < file Paste pairs of lines from file"]},T={delimiter:{short:"d",long:"delimiters",type:"string",default:" "},serial:{short:"s",long:"serial",type:"boolean"}},w={name:"paste",async execute(s,n){if(y(s))return g(L);let i=x("paste",s,T);if(!i.ok)return i.error;let l=i.result.flags.delimiter,d=i.result.flags.serial,p=i.result.positional;if(p.length===0)return{stdout:"",stderr:`usage: paste [-s] [-d delimiters] file ...
3
+ import{a as m}from"./chunk-DHIKZU63.js";import{a as x}from"./chunk-NE4R2FVV.js";import{a as g,b as y}from"./chunk-MUFNRCMY.js";var L={name:"paste",summary:"merge lines of files",usage:"paste [OPTION]... [FILE]...",description:["Write lines consisting of the sequentially corresponding lines from","each FILE, separated by TABs, to standard output.","","With no FILE, or when FILE is -, read standard input."],options:["-d, --delimiters=LIST reuse characters from LIST instead of TABs","-s, --serial paste one file at a time instead of in parallel"," --help display this help and exit"],examples:["paste file1 file2 Merge file1 and file2 side by side","paste -d, file1 file2 Use comma as delimiter","paste -s file1 Paste all lines of file1 on one line","paste - - < file Paste pairs of lines from file"]},T={delimiter:{short:"d",long:"delimiters",type:"string",default:" "},serial:{short:"s",long:"serial",type:"boolean"}},w={name:"paste",async execute(s,n){if(y(s))return g(L);let i=x("paste",s,T);if(!i.ok)return i.error;let l=i.result.flags.delimiter,d=i.result.flags.serial,p=i.result.positional;if(p.length===0)return{stdout:"",stderr:`usage: paste [-s] [-d delimiters] file ...
4
4
  `,exitCode:1};let c=m(n.stdin),a=c?c.split(`
5
5
  `):[""];a.length>0&&a[a.length-1]===""&&a.pop();let F=p.filter(e=>e==="-").length,f=[],h=0;for(let e of p)if(e==="-"){let t=[];for(let o=h;o<a.length;o+=F)t.push(a[o]);f.push(t),h++}else{let t=n.fs.resolvePath(n.cwd,e);try{let r=(await n.fs.readFile(t)).split(`
6
6
  `);r.length>0&&r[r.length-1]===""&&r.pop(),f.push(r)}catch{return{stdout:"",stderr:`paste: ${e}: No such file or directory
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
- import{a as f}from"./chunk-H7JTIXAO.js";import{a as d}from"./chunk-NE4R2FVV.js";import{a as m,b as p}from"./chunk-MUFNRCMY.js";var b={name:"cat",summary:"concatenate files and print on the standard output",usage:"cat [OPTION]... [FILE]...",options:["-n, --number number all output lines"," --help display this help and exit"]},g={number:{short:"n",long:"number",type:"boolean"}},L={name:"cat",async execute(t,o){if(p(t))return m(b);let e=d("cat",t,g);if(!e.ok)return e.error;let r=e.result.flags.number,s=e.result.positional,a=await f(o,s,{cmdName:"cat",allowStdinMarker:!0,stopOnError:!1}),n="",l=1;for(let{content:i}of a.files){let u=i;if(r){let c=y(u,l);n+=c.content,l=c.nextLineNumber}else n+=u}return{stdout:n,stderr:a.stderr,exitCode:a.exitCode,stdoutEncoding:"binary"}}};function y(t,o){let e=t.split(`
3
+ import{a as f}from"./chunk-ZZP3RSWL.js";import{a as d}from"./chunk-NE4R2FVV.js";import{a as m,b as p}from"./chunk-MUFNRCMY.js";var b={name:"cat",summary:"concatenate files and print on the standard output",usage:"cat [OPTION]... [FILE]...",options:["-n, --number number all output lines"," --help display this help and exit"]},g={number:{short:"n",long:"number",type:"boolean"}},L={name:"cat",async execute(t,o){if(p(t))return m(b);let e=d("cat",t,g);if(!e.ok)return e.error;let r=e.result.flags.number,s=e.result.positional,a=await f(o,s,{cmdName:"cat",allowStdinMarker:!0,stopOnError:!1}),n="",l=1;for(let{content:i}of a.files){let u=i;if(r){let c=y(u,l);n+=c.content,l=c.nextLineNumber}else n+=u}return{stdout:n,stderr:a.stderr,exitCode:a.exitCode,stdoutEncoding:"binary"}}};function y(t,o){let e=t.split(`
4
4
  `),r=t.endsWith(`
5
5
  `),s=r?e.slice(0,-1):e;return{content:s.map((n,l)=>`${String(o+l).padStart(6," ")} ${n}`).join(`
6
6
  `)+(r?`
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
- import{f as G}from"./chunk-MLUOPG3W.js";import{a as q}from"./chunk-3MRB66F4.js";import{a as z,b as E,c as U}from"./chunk-ALVEEXFD.js";import{a as $}from"./chunk-IEXQTXU5.js";import{a as L}from"./chunk-VZK4FHWJ.js";import{a as B,b as _,c as D}from"./chunk-MUFNRCMY.js";var H=G({js:{extensions:[".js",".mjs",".cjs",".jsx"],globs:[]},ts:{extensions:[".ts",".tsx",".mts",".cts"],globs:[]},html:{extensions:[".html",".htm",".xhtml"],globs:[]},css:{extensions:[".css",".scss",".sass",".less"],globs:[]},json:{extensions:[".json",".jsonc",".json5"],globs:[]},xml:{extensions:[".xml",".xsl",".xslt"],globs:[]},c:{extensions:[".c",".h"],globs:[]},cpp:{extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx",".h"],globs:[]},rust:{extensions:[".rs"],globs:[]},go:{extensions:[".go"],globs:[]},zig:{extensions:[".zig"],globs:[]},java:{extensions:[".java"],globs:[]},kotlin:{extensions:[".kt",".kts"],globs:[]},scala:{extensions:[".scala",".sc"],globs:[]},clojure:{extensions:[".clj",".cljc",".cljs",".edn"],globs:[]},py:{extensions:[".py",".pyi",".pyw"],globs:[]},rb:{extensions:[".rb",".rake",".gemspec"],globs:["Rakefile","Gemfile"]},php:{extensions:[".php",".phtml",".php3",".php4",".php5"],globs:[]},perl:{extensions:[".pl",".pm",".pod",".t"],globs:[]},lua:{extensions:[".lua"],globs:[]},sh:{extensions:[".sh",".bash",".zsh",".fish"],globs:[".bashrc",".zshrc",".profile"]},bat:{extensions:[".bat",".cmd"],globs:[]},ps:{extensions:[".ps1",".psm1",".psd1"],globs:[]},yaml:{extensions:[".yaml",".yml"],globs:[]},toml:{extensions:[".toml"],globs:["Cargo.toml","pyproject.toml"]},ini:{extensions:[".ini",".cfg",".conf"],globs:[]},csv:{extensions:[".csv",".tsv"],globs:[]},md:{extensions:[".md",".mdx",".markdown",".mdown",".mkd"],globs:[]},markdown:{extensions:[".md",".mdx",".markdown",".mdown",".mkd"],globs:[]},rst:{extensions:[".rst"],globs:[]},txt:{extensions:[".txt",".text"],globs:[]},tex:{extensions:[".tex",".ltx",".sty",".cls"],globs:[]},sql:{extensions:[".sql"],globs:[]},graphql:{extensions:[".graphql",".gql"],globs:[]},proto:{extensions:[".proto"],globs:[]},make:{extensions:[".mk",".mak"],globs:["Makefile","GNUmakefile","makefile"]},docker:{extensions:[],globs:["Dockerfile","Dockerfile.*","*.dockerfile"]},tf:{extensions:[".tf",".tfvars"],globs:[]}}),M=class{types;constructor(){this.types=new Map(Object.entries(H).map(([t,n])=>[t,{extensions:[...n.extensions],globs:[...n.globs]}]))}addType(t){let n=t.indexOf(":");if(n===-1)return;let s=t.slice(0,n),r=t.slice(n+1);if(r.startsWith("include:")){let l=r.slice(8),i=this.types.get(l);if(i){let a=this.types.get(s)||{extensions:[],globs:[]};a.extensions.push(...i.extensions),a.globs.push(...i.globs),this.types.set(s,a)}}else{let l=this.types.get(s)||{extensions:[],globs:[]};if(r.startsWith("*.")&&!r.slice(2).includes("*")){let i=r.slice(1);l.extensions.includes(i)||l.extensions.push(i)}else l.globs.includes(r)||l.globs.push(r);this.types.set(s,l)}}clearType(t){let n=this.types.get(t);n&&(n.extensions=[],n.globs=[])}getType(t){return this.types.get(t)}getAllTypes(){return this.types}matchesType(t,n){let s=t.toLowerCase();for(let r of n){if(r==="all"){if(this.matchesAnyType(t))return!0;continue}let l=this.types.get(r);if(l){for(let i of l.extensions)if(s.endsWith(i))return!0;for(let i of l.globs)if(i.includes("*")){let a=i.replace(/\./g,"\\.").replace(/\*/g,".*");if($(`^${a}$`,"i").test(t))return!0}else if(s===i.toLowerCase())return!0}}return!1}matchesAnyType(t){let n=t.toLowerCase();for(let s of this.types.values()){for(let r of s.extensions)if(n.endsWith(r))return!0;for(let r of s.globs)if(r.includes("*")){let l=r.replace(/\./g,"\\.").replace(/\*/g,".*");if($(`^${l}$`,"i").test(t))return!0}else if(n===r.toLowerCase())return!0}return!1}};function V(){let e=[];for(let[t,n]of Object.entries(H).sort()){let s=[];for(let r of n.extensions)s.push(`*${r}`);for(let r of n.globs)s.push(r);e.push(`${t}: ${s.join(", ")}`)}return`${e.join(`
3
+ import{f as G}from"./chunk-MLUOPG3W.js";import{a as q}from"./chunk-3MRB66F4.js";import{a as z,b as E,c as U}from"./chunk-UI7CV277.js";import{a as $}from"./chunk-52FZYTIX.js";import{a as L}from"./chunk-DHIKZU63.js";import{a as B,b as _,c as D}from"./chunk-MUFNRCMY.js";var H=G({js:{extensions:[".js",".mjs",".cjs",".jsx"],globs:[]},ts:{extensions:[".ts",".tsx",".mts",".cts"],globs:[]},html:{extensions:[".html",".htm",".xhtml"],globs:[]},css:{extensions:[".css",".scss",".sass",".less"],globs:[]},json:{extensions:[".json",".jsonc",".json5"],globs:[]},xml:{extensions:[".xml",".xsl",".xslt"],globs:[]},c:{extensions:[".c",".h"],globs:[]},cpp:{extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx",".h"],globs:[]},rust:{extensions:[".rs"],globs:[]},go:{extensions:[".go"],globs:[]},zig:{extensions:[".zig"],globs:[]},java:{extensions:[".java"],globs:[]},kotlin:{extensions:[".kt",".kts"],globs:[]},scala:{extensions:[".scala",".sc"],globs:[]},clojure:{extensions:[".clj",".cljc",".cljs",".edn"],globs:[]},py:{extensions:[".py",".pyi",".pyw"],globs:[]},rb:{extensions:[".rb",".rake",".gemspec"],globs:["Rakefile","Gemfile"]},php:{extensions:[".php",".phtml",".php3",".php4",".php5"],globs:[]},perl:{extensions:[".pl",".pm",".pod",".t"],globs:[]},lua:{extensions:[".lua"],globs:[]},sh:{extensions:[".sh",".bash",".zsh",".fish"],globs:[".bashrc",".zshrc",".profile"]},bat:{extensions:[".bat",".cmd"],globs:[]},ps:{extensions:[".ps1",".psm1",".psd1"],globs:[]},yaml:{extensions:[".yaml",".yml"],globs:[]},toml:{extensions:[".toml"],globs:["Cargo.toml","pyproject.toml"]},ini:{extensions:[".ini",".cfg",".conf"],globs:[]},csv:{extensions:[".csv",".tsv"],globs:[]},md:{extensions:[".md",".mdx",".markdown",".mdown",".mkd"],globs:[]},markdown:{extensions:[".md",".mdx",".markdown",".mdown",".mkd"],globs:[]},rst:{extensions:[".rst"],globs:[]},txt:{extensions:[".txt",".text"],globs:[]},tex:{extensions:[".tex",".ltx",".sty",".cls"],globs:[]},sql:{extensions:[".sql"],globs:[]},graphql:{extensions:[".graphql",".gql"],globs:[]},proto:{extensions:[".proto"],globs:[]},make:{extensions:[".mk",".mak"],globs:["Makefile","GNUmakefile","makefile"]},docker:{extensions:[],globs:["Dockerfile","Dockerfile.*","*.dockerfile"]},tf:{extensions:[".tf",".tfvars"],globs:[]}}),M=class{types;constructor(){this.types=new Map(Object.entries(H).map(([t,n])=>[t,{extensions:[...n.extensions],globs:[...n.globs]}]))}addType(t){let n=t.indexOf(":");if(n===-1)return;let s=t.slice(0,n),r=t.slice(n+1);if(r.startsWith("include:")){let l=r.slice(8),i=this.types.get(l);if(i){let a=this.types.get(s)||{extensions:[],globs:[]};a.extensions.push(...i.extensions),a.globs.push(...i.globs),this.types.set(s,a)}}else{let l=this.types.get(s)||{extensions:[],globs:[]};if(r.startsWith("*.")&&!r.slice(2).includes("*")){let i=r.slice(1);l.extensions.includes(i)||l.extensions.push(i)}else l.globs.includes(r)||l.globs.push(r);this.types.set(s,l)}}clearType(t){let n=this.types.get(t);n&&(n.extensions=[],n.globs=[])}getType(t){return this.types.get(t)}getAllTypes(){return this.types}matchesType(t,n){let s=t.toLowerCase();for(let r of n){if(r==="all"){if(this.matchesAnyType(t))return!0;continue}let l=this.types.get(r);if(l){for(let i of l.extensions)if(s.endsWith(i))return!0;for(let i of l.globs)if(i.includes("*")){let a=i.replace(/\./g,"\\.").replace(/\*/g,".*");if($(`^${a}$`,"i").test(t))return!0}else if(s===i.toLowerCase())return!0}}return!1}matchesAnyType(t){let n=t.toLowerCase();for(let s of this.types.values()){for(let r of s.extensions)if(n.endsWith(r))return!0;for(let r of s.globs)if(r.includes("*")){let l=r.replace(/\./g,"\\.").replace(/\*/g,".*");if($(`^${l}$`,"i").test(t))return!0}else if(n===r.toLowerCase())return!0}return!1}};function V(){let e=[];for(let[t,n]of Object.entries(H).sort()){let s=[];for(let r of n.extensions)s.push(`*${r}`);for(let r of n.globs)s.push(r);e.push(`${t}: ${s.join(", ")}`)}return`${e.join(`
4
4
  `)}
5
5
  `}function Z(){return{ignoreCase:!1,caseSensitive:!1,smartCase:!0,fixedStrings:!1,wordRegexp:!1,lineRegexp:!1,invertMatch:!1,multiline:!1,multilineDotall:!1,patterns:[],patternFiles:[],count:!1,countMatches:!1,files:!1,filesWithMatches:!1,filesWithoutMatch:!1,stats:!1,onlyMatching:!1,maxCount:0,lineNumber:!0,noFilename:!1,withFilename:!1,nullSeparator:!1,byteOffset:!1,column:!1,vimgrep:!1,replace:null,afterContext:0,beforeContext:0,contextSeparator:"--",quiet:!1,heading:!1,passthru:!1,includeZero:!1,sort:"path",json:!1,globs:[],iglobs:[],globCaseInsensitive:!1,types:[],typesNot:[],typeAdd:[],typeClear:[],hidden:!1,noIgnore:!1,noIgnoreDot:!1,noIgnoreVcs:!1,ignoreFiles:[],maxDepth:256,maxFilesize:0,followSymlinks:!1,searchZip:!1,searchBinary:!1,preprocessor:null,preprocessorGlobs:[]}}function se(e){let t=e.match(/^(\d+)([KMG])?$/i);if(!t)return 0;let n=parseInt(t[1],10);switch((t[2]||"").toUpperCase()){case"K":return n*1024;case"M":return n*1024*1024;case"G":return n*1024*1024*1024;default:return n}}function ne(e){return/^\d+[KMG]?$/i.test(e)?null:{stdout:"",stderr:`rg: invalid --max-filesize value: ${e}
6
6
  `,exitCode:1}}function J(e){return null}var Y=[{short:"g",long:"glob",target:"globs",multi:!0},{long:"iglob",target:"iglobs",multi:!0},{short:"t",long:"type",target:"types",multi:!0,validate:J},{short:"T",long:"type-not",target:"typesNot",multi:!0,validate:J},{long:"type-add",target:"typeAdd",multi:!0},{long:"type-clear",target:"typeClear",multi:!0},{short:"m",long:"max-count",target:"maxCount",parse:parseInt},{short:"e",long:"regexp",target:"patterns",multi:!0},{short:"f",long:"file",target:"patternFiles",multi:!0},{short:"r",long:"replace",target:"replace"},{short:"d",long:"max-depth",target:"maxDepth",parse:parseInt},{long:"max-filesize",target:"maxFilesize",parse:se,validate:ne},{long:"context-separator",target:"contextSeparator"},{short:"j",long:"threads",ignored:!0},{long:"ignore-file",target:"ignoreFiles",multi:!0},{long:"pre",target:"preprocessor"},{long:"pre-glob",target:"preprocessorGlobs",multi:!0}],re=new Map([["i",e=>{e.ignoreCase=!0,e.caseSensitive=!1,e.smartCase=!1}],["--ignore-case",e=>{e.ignoreCase=!0,e.caseSensitive=!1,e.smartCase=!1}],["s",e=>{e.caseSensitive=!0,e.ignoreCase=!1,e.smartCase=!1}],["--case-sensitive",e=>{e.caseSensitive=!0,e.ignoreCase=!1,e.smartCase=!1}],["S",e=>{e.smartCase=!0,e.ignoreCase=!1,e.caseSensitive=!1}],["--smart-case",e=>{e.smartCase=!0,e.ignoreCase=!1,e.caseSensitive=!1}],["F",e=>{e.fixedStrings=!0}],["--fixed-strings",e=>{e.fixedStrings=!0}],["w",e=>{e.wordRegexp=!0}],["--word-regexp",e=>{e.wordRegexp=!0}],["x",e=>{e.lineRegexp=!0}],["--line-regexp",e=>{e.lineRegexp=!0}],["v",e=>{e.invertMatch=!0}],["--invert-match",e=>{e.invertMatch=!0}],["U",e=>{e.multiline=!0}],["--multiline",e=>{e.multiline=!0}],["--multiline-dotall",e=>{e.multilineDotall=!0,e.multiline=!0}],["c",e=>{e.count=!0}],["--count",e=>{e.count=!0}],["--count-matches",e=>{e.countMatches=!0}],["l",e=>{e.filesWithMatches=!0}],["--files",e=>{e.files=!0}],["--files-with-matches",e=>{e.filesWithMatches=!0}],["--files-without-match",e=>{e.filesWithoutMatch=!0}],["--stats",e=>{e.stats=!0}],["o",e=>{e.onlyMatching=!0}],["--only-matching",e=>{e.onlyMatching=!0}],["q",e=>{e.quiet=!0}],["--quiet",e=>{e.quiet=!0}],["N",e=>{e.lineNumber=!1}],["--no-line-number",e=>{e.lineNumber=!1}],["H",e=>{e.withFilename=!0}],["--with-filename",e=>{e.withFilename=!0}],["I",e=>{e.noFilename=!0}],["--no-filename",e=>{e.noFilename=!0}],["0",e=>{e.nullSeparator=!0}],["--null",e=>{e.nullSeparator=!0}],["b",e=>{e.byteOffset=!0}],["--byte-offset",e=>{e.byteOffset=!0}],["--column",e=>{e.column=!0,e.lineNumber=!0}],["--no-column",e=>{e.column=!1}],["--vimgrep",e=>{e.vimgrep=!0,e.column=!0,e.lineNumber=!0}],["--json",e=>{e.json=!0}],["--hidden",e=>{e.hidden=!0}],["--no-ignore",e=>{e.noIgnore=!0}],["--no-ignore-dot",e=>{e.noIgnoreDot=!0}],["--no-ignore-vcs",e=>{e.noIgnoreVcs=!0}],["L",e=>{e.followSymlinks=!0}],["--follow",e=>{e.followSymlinks=!0}],["z",e=>{e.searchZip=!0}],["--search-zip",e=>{e.searchZip=!0}],["a",e=>{e.searchBinary=!0}],["--text",e=>{e.searchBinary=!0}],["--heading",e=>{e.heading=!0}],["--passthru",e=>{e.passthru=!0}],["--include-zero",e=>{e.includeZero=!0}],["--glob-case-insensitive",e=>{e.globCaseInsensitive=!0}]]),ie=new Set(["n","--line-number"]);function le(e){e.hidden?e.searchBinary=!0:e.noIgnore?e.hidden=!0:e.noIgnore=!0}function oe(e,t,n){let s=e[t];for(let r of Y){if(s.startsWith(`--${r.long}=`)){let l=s.slice(`--${r.long}=`.length),i=P(n,r,l);return i?{newIndex:t,error:i}:{newIndex:t}}if(r.short&&s.startsWith(`-${r.short}`)&&s.length>2){let l=s.slice(2),i=P(n,r,l);return i?{newIndex:t,error:i}:{newIndex:t}}if(r.short&&s===`-${r.short}`||s===`--${r.long}`){if(t+1>=e.length)return null;let l=e[t+1],i=P(n,r,l);return i?{newIndex:t+1,error:i}:{newIndex:t+1}}}return null}function ae(e){return Y.find(t=>t.short===e)}function P(e,t,n){if(t.validate){let r=t.validate(n);if(r)return r}if(t.ignored||!t.target)return;let s=t.parse?t.parse(n):n;t.multi?e[t.target].push(s):e[t.target]=s}function ce(e,t){let n=e[t];if(n==="--sort"&&t+1<e.length){let s=e[t+1];if(s==="path"||s==="none")return{value:s,newIndex:t+1}}if(n.startsWith("--sort=")){let s=n.slice(7);if(s==="path"||s==="none")return{value:s,newIndex:t}}return null}function fe(e,t){let n=e[t],s=n.match(/^-([ABC])(\d+)$/);return s?{flag:s[1],value:parseInt(s[2],10),newIndex:t}:(n==="-A"||n==="-B"||n==="-C")&&t+1<e.length?{flag:n[1],value:parseInt(e[t+1],10),newIndex:t+1}:null}function ue(e){let t=e.match(/^-m(\d+)$/);return t?parseInt(t[1],10):null}function K(e){let t=Z(),n=null,s=[],r=-1,l=-1,i=-1,a=!1;for(let c=0;c<e.length;c++){let o=e[c];if(o.startsWith("-")&&o!=="-"){let u=fe(e,c);if(u){let{flag:f,value:x,newIndex:b}=u;f==="A"?r=Math.max(r,x):f==="B"?l=Math.max(l,x):i=x,c=b;continue}let d=ue(o);if(d!==null){t.maxCount=d;continue}let p=oe(e,c,t);if(p){if(p.error)return{success:!1,error:p.error};c=p.newIndex;continue}let g=ce(e,c);if(g){t.sort=g.value,c=g.newIndex;continue}let w=o.startsWith("--")?[o]:o.slice(1).split(""),m=!1;for(let f of w){if(ie.has(f)){t.lineNumber=!0,a=!0;continue}if(f==="u"||f==="--unrestricted"){le(t);continue}if(f==="P"||f==="--pcre2")return{success:!1,error:{stdout:"",stderr:`rg: PCRE2 is not supported. Use standard regex syntax instead.
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env node
2
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
+ import{a as T}from"./chunk-4BNS566Q.js";import{a as W,c as N}from"./chunk-JXLDT4KX.js";import{k as A}from"./chunk-47WZ2U6M.js";import{a as j}from"./chunk-I4IRHQDW.js";import{a as F,b as z}from"./chunk-MUFNRCMY.js";import{c as L,e as R}from"./chunk-LNVSXNT7.js";var Z=L($=>{(function(){"use strict";var e={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(l){return r(n(l),arguments)}function t(l,a){return o.apply(null,[l].concat(a||[]))}function r(l,a){var c=1,u=l.length,i,g="",d,p,f,h,m,w,E,S;for(d=0;d<u;d++)if(typeof l[d]=="string")g+=l[d];else if(typeof l[d]=="object"){if(f=l[d],f.keys)for(i=a[c],p=0;p<f.keys.length;p++){if(i==null)throw new Error(o('[sprintf] Cannot access property "%s" of undefined value "%s"',f.keys[p],f.keys[p-1]));i=i[f.keys[p]]}else f.param_no?i=a[f.param_no]:i=a[c++];if(e.not_type.test(f.type)&&e.not_primitive.test(f.type)&&i instanceof Function&&(i=i()),e.numeric_arg.test(f.type)&&typeof i!="number"&&isNaN(i))throw new TypeError(o("[sprintf] expecting number but found %T",i));switch(e.number.test(f.type)&&(E=i>=0),f.type){case"b":i=parseInt(i,10).toString(2);break;case"c":i=String.fromCharCode(parseInt(i,10));break;case"d":case"i":i=parseInt(i,10);break;case"j":i=JSON.stringify(i,null,f.width?parseInt(f.width):0);break;case"e":i=f.precision?parseFloat(i).toExponential(f.precision):parseFloat(i).toExponential();break;case"f":i=f.precision?parseFloat(i).toFixed(f.precision):parseFloat(i);break;case"g":i=f.precision?String(Number(i.toPrecision(f.precision))):parseFloat(i);break;case"o":i=(parseInt(i,10)>>>0).toString(8);break;case"s":i=String(i),i=f.precision?i.substring(0,f.precision):i;break;case"t":i=String(!!i),i=f.precision?i.substring(0,f.precision):i;break;case"T":i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=f.precision?i.substring(0,f.precision):i;break;case"u":i=parseInt(i,10)>>>0;break;case"v":i=i.valueOf(),i=f.precision?i.substring(0,f.precision):i;break;case"x":i=(parseInt(i,10)>>>0).toString(16);break;case"X":i=(parseInt(i,10)>>>0).toString(16).toUpperCase();break}e.json.test(f.type)?g+=i:(e.number.test(f.type)&&(!E||f.sign)?(S=E?"+":"-",i=i.toString().replace(e.sign,"")):S="",m=f.pad_char?f.pad_char==="0"?"0":f.pad_char.charAt(1):" ",w=f.width-(S+i).length,h=f.width&&w>0?m.repeat(w):"",g+=f.align?S+i+h:m==="0"?S+h+i:h+S+i)}return g}var s=Object.create(null);function n(l){if(s[l])return s[l];for(var a=l,c,u=[],i=0;a;){if((c=e.text.exec(a))!==null)u.push(c[0]);else if((c=e.modulo.exec(a))!==null)u.push("%");else if((c=e.placeholder.exec(a))!==null){if(c[2]){i|=1;var g=[],d=c[2],p=[];if((p=e.key.exec(d))!==null)for(g.push(p[1]);(d=d.substring(p[0].length))!=="";)if((p=e.key_access.exec(d))!==null)g.push(p[1]);else if((p=e.index_access.exec(d))!==null)g.push(p[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");c[2]=g}else i|=2;if(i===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");u.push({placeholder:c[0],param_no:c[1],keys:c[2],sign:c[3],pad_char:c[4],align:c[5],width:c[6],precision:c[7],type:c[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");a=a.substring(c[0].length)}return s[l]=u}typeof $<"u"&&($.sprintf=o,$.vsprintf=t),typeof window<"u"&&(window.sprintf=o,window.vsprintf=t,typeof define=="function"&&define.amd&&define(function(){return{sprintf:o,vsprintf:t}}))})()});var C=R(Z(),1);function q(e){let o="",t=0;for(;t<e.length;){let r=e[t];if(r<128){o+=String.fromCharCode(r),t++;continue}if((r&224)===192){if(t+1<e.length&&(e[t+1]&192)===128&&r>=194){let s=(r&31)<<6|e[t+1]&63;o+=String.fromCharCode(s),t+=2;continue}o+=String.fromCharCode(r),t++;continue}if((r&240)===224){if(t+2<e.length&&(e[t+1]&192)===128&&(e[t+2]&192)===128){if(r===224&&e[t+1]<160){o+=String.fromCharCode(r),t++;continue}let s=(r&15)<<12|(e[t+1]&63)<<6|e[t+2]&63;if(s>=55296&&s<=57343){o+=String.fromCharCode(r),t++;continue}o+=String.fromCharCode(s),t+=3;continue}o+=String.fromCharCode(r),t++;continue}if((r&248)===240&&r<=244){if(t+3<e.length&&(e[t+1]&192)===128&&(e[t+2]&192)===128&&(e[t+3]&192)===128){if(r===240&&e[t+1]<144){o+=String.fromCharCode(r),t++;continue}let s=(r&7)<<18|(e[t+1]&63)<<12|(e[t+2]&63)<<6|e[t+3]&63;if(s>1114111){o+=String.fromCharCode(r),t++;continue}o+=String.fromCodePoint(s),t+=4;continue}o+=String.fromCharCode(r),t++;continue}o+=String.fromCharCode(r),t++}return o}var H={name:"printf",summary:"format and print data",usage:"printf [-v var] FORMAT [ARGUMENT...]",options:[" -v var assign the output to shell variable VAR rather than display it"," --help display this help and exit"],notes:["FORMAT controls the output like in C printf.","Escape sequences: \\n (newline), \\t (tab), \\\\ (backslash)","Format specifiers: %s (string), %d (integer), %f (float), %x (hex), %o (octal), %% (literal %)","Width and precision: %10s (width 10), %.2f (2 decimal places), %010d (zero-padded)","Flags: %- (left-justify), %+ (show sign), %0 (zero-pad)"]},oe={name:"printf",async execute(e,o){if(z(e))return F(H);if(e.length===0)return{stdout:"",stderr:`printf: usage: printf format [arguments]
4
+ `,exitCode:2};let t=null,r=0;for(;r<e.length;){let l=e[r];if(l==="--"){r++;break}if(l==="-v"){if(r+1>=e.length)return{stdout:"",stderr:`printf: -v: option requires an argument
5
+ `,exitCode:1};if(t=e[r+1],!/^[a-zA-Z_][a-zA-Z0-9_]*(\[[a-zA-Z0-9_@*"'$]+\])?$/.test(t))return{stdout:"",stderr:`printf: \`${t}': not a valid identifier
6
+ `,exitCode:2};r+=2}else{if(l.startsWith("-")&&l!=="-")break;break}}if(r>=e.length)return{stdout:"",stderr:`printf: usage: printf format [arguments]
7
+ `,exitCode:1};let s=e[r],n=e.slice(r+1);try{let l=N(s),a="",c=0,u=!1,i="",g=o.env.get("TZ"),d=o.limits?.maxStringLength;do{let{result:p,argsConsumed:f,error:h,errMsg:m,stopped:w}=D(l,n,c,g);if(a+=p,d!==void 0&&d>0&&a.length>d)throw new A(`printf: output size limit exceeded (${d} bytes)`,"string_length");if(c+=f,h&&(u=!0,m&&(i=m)),w)break}while(c<n.length&&c>0);if(c===0&&n.length>0,t){let p=t.match(/^([a-zA-Z_][a-zA-Z0-9_]*)\[(['"]?)(.+?)\2\]$/);if(p){let f=p[1],h=p[3];h=h.replace(/\$([a-zA-Z_][a-zA-Z0-9_]*)/g,(m,w)=>o.env.get(w)??""),o.env.set(`${f}_${h}`,a)}else o.env.set(t,a);return{stdout:"",stderr:i,exitCode:u?1:0}}return{stdout:a,stderr:i,exitCode:u?1:0}}catch(l){if(l instanceof A)throw l;return{stdout:"",stderr:`printf: ${j(l)}
8
+ `,exitCode:1}}}};function D(e,o,t,r){let s="",n=0,l=0,a=!1,c="";for(;n<e.length;)if(e[n]==="%"&&n+1<e.length){let u=n;if(n++,e[n]==="%"){s+="%",n++;continue}let i=e.slice(u).match(/^%(-?\d*)(?:\.(\d+))?\(([^)]*)\)T/);if(i){let v=i[1]?parseInt(i[1],10):0,_=i[2]?parseInt(i[2],10):-1,X=i[3],U=i[0],k=o[t+l]||"";l++;let y;k===""||k==="-1"||k==="-2"?y=Math.floor(Date.now()/1e3):y=parseInt(k,10)||0;let b=T(X,y,r);if(_>=0&&b.length>_&&(b=b.slice(0,_)),v!==0){let M=Math.abs(v);b.length<M&&(v<0?b=b.padEnd(M," "):b=b.padStart(M," "))}s+=b,n=u+U.length;continue}for(;n<e.length&&"+-0 #'".includes(e[n]);)n++;let g=!1;if(e[n]==="*")g=!0,n++;else for(;n<e.length&&/\d/.test(e[n]);)n++;let d=!1;if(e[n]===".")if(n++,e[n]==="*")d=!0,n++;else for(;n<e.length&&/\d/.test(e[n]);)n++;n<e.length&&"hlL".includes(e[n])&&n++;let p=e[n]||"";n++;let h=e.slice(u,n);if(g){let v=parseInt(o[t+l]||"0",10);l++,h=h.replace("*",String(v))}if(d){let v=parseInt(o[t+l]||"0",10);l++,h=h.replace(".*",`.${v}`)}let m=o[t+l]||"";l++;let{value:w,parseError:E,parseErrMsg:S,stopped:P}=G(h,p,m);if(s+=w,E&&(a=!0,S&&(c=S)),P)return{result:s,argsConsumed:l,error:a,errMsg:c,stopped:!0}}else s+=e[n],n++;return{result:s,argsConsumed:l,error:a,errMsg:c,stopped:!1}}function G(e,o,t){let r=!1,s="";switch(o){case"d":case"i":{let n=I(t);return r=x,r&&(s=`printf: ${t}: invalid number
9
+ `),{value:O(e,n),parseError:r,parseErrMsg:s}}case"o":{let n=I(t);return r=x,r&&(s=`printf: ${t}: invalid number
10
+ `),{value:Q(e,n),parseError:r,parseErrMsg:s}}case"u":{let n=I(t);r=x,r&&(s=`printf: ${t}: invalid number
11
+ `);let l=n<0?n>>>0:n;return{value:O(e.replace("u","d"),l),parseError:r,parseErrMsg:s}}case"x":case"X":{let n=I(t);return r=x,r&&(s=`printf: ${t}: invalid number
12
+ `),{value:V(e,n),parseError:r,parseErrMsg:s}}case"e":case"E":case"f":case"F":case"g":case"G":{let n=parseFloat(t)||0;return{value:Y(e,o,n),parseError:!1,parseErrMsg:""}}case"c":{if(t==="")return{value:"",parseError:!1,parseErrMsg:""};let a=new TextEncoder().encode(t)[0];return{value:String.fromCharCode(a),parseError:!1,parseErrMsg:""}}case"s":return{value:B(e,t),parseError:!1,parseErrMsg:""};case"q":return{value:K(e,t),parseError:!1,parseErrMsg:""};case"b":{let n=ee(t);return{value:n.value,parseError:!1,parseErrMsg:"",stopped:n.stopped}}default:try{return{value:(0,C.sprintf)(e,t),parseError:!1,parseErrMsg:""}}catch{return{value:"",parseError:!0,parseErrMsg:`printf: [sprintf] unexpected placeholder
13
+ `}}}}var x=!1;function I(e){x=!1;let o=e.trimStart(),t=o!==o.trimEnd();if(e=o.trimEnd(),e.startsWith("'")&&e.length>=2||e.startsWith('"')&&e.length>=2)return e.charCodeAt(1);if(e.startsWith("\\'")&&e.length>=3||e.startsWith('\\"')&&e.length>=3)return e.charCodeAt(2);if(e.startsWith("+")&&(e=e.slice(1)),e.startsWith("0x")||e.startsWith("0X")){let r=parseInt(e,16);return Number.isNaN(r)?(x=!0,0):(t&&(x=!0),r)}if(e.startsWith("0")&&e.length>1&&/^-?0[0-7]+$/.test(e))return t&&(x=!0),parseInt(e,8)||0;if(/^\d+#/.test(e)){x=!0;let r=e.match(/^(\d+)#/);return r?parseInt(r[1],10):0}if(e!==""&&!/^-?\d+$/.test(e)){x=!0;let r=parseInt(e,10);return Number.isNaN(r)?0:r}return t&&(x=!0),parseInt(e,10)||0}function O(e,o){let t=e.match(/^%([- +#0']*)(\d*)(\.(\d*))?[diu]$/);if(!t)return(0,C.sprintf)(e.replace(/\.\d*/,""),o);let r=t[1]||"",s=t[2]?parseInt(t[2],10):0,n=t[3]!==void 0?t[4]?parseInt(t[4],10):0:-1,l=o<0,a=Math.abs(o),c=String(a);n>=0&&(c=c.padStart(n,"0"));let u="";l?u="-":r.includes("+")?u="+":r.includes(" ")&&(u=" ");let i=u+c;return s>i.length&&(r.includes("-")?i=i.padEnd(s," "):r.includes("0")&&n<0?i=u+c.padStart(s-u.length,"0"):i=i.padStart(s," ")),i}function Q(e,o){let t=e.match(/^%([- +#0']*)(\d*)(\.(\d*))?o$/);if(!t)return(0,C.sprintf)(e,o);let r=t[1]||"",s=t[2]?parseInt(t[2],10):0,n=t[3]!==void 0?t[4]?parseInt(t[4],10):0:-1,l=Math.abs(o).toString(8);n>=0&&(l=l.padStart(n,"0")),r.includes("#")&&!l.startsWith("0")&&(l=`0${l}`);let a=l;return s>a.length&&(r.includes("-")?a=a.padEnd(s," "):r.includes("0")&&n<0?a=a.padStart(s,"0"):a=a.padStart(s," ")),a}function V(e,o){let t=e.includes("X"),r=e.match(/^%([- +#0']*)(\d*)(\.(\d*))?[xX]$/);if(!r)return(0,C.sprintf)(e,o);let s=r[1]||"",n=r[2]?parseInt(r[2],10):0,l=r[3]!==void 0?r[4]?parseInt(r[4],10):0:-1,a=Math.abs(o).toString(16);t&&(a=a.toUpperCase()),l>=0&&(a=a.padStart(l,"0"));let c="";s.includes("#")&&o!==0&&(c=t?"0X":"0x");let u=c+a;return n>u.length&&(s.includes("-")?u=u.padEnd(n," "):s.includes("0")&&l<0?u=c+a.padStart(n-c.length,"0"):u=u.padStart(n," ")),u}function J(e){if(e==="")return"''";if(/^[a-zA-Z0-9_./-]+$/.test(e))return e;if(/[\x00-\x1f\x7f-\xff]/.test(e)){let r="$'";for(let s of e){let n=s.charCodeAt(0);s==="'"?r+="\\'":s==="\\"?r+="\\\\":s===`
14
+ `?r+="\\n":s===" "?r+="\\t":s==="\r"?r+="\\r":s==="\x07"?r+="\\a":s==="\b"?r+="\\b":s==="\f"?r+="\\f":s==="\v"?r+="\\v":s==="\x1B"?r+="\\E":n<32||n>=127&&n<=255?r+=`\\${n.toString(8).padStart(3,"0")}`:s==='"'?r+='\\"':r+=s}return r+="'",r}let t="";for(let r of e)" |&;<>()$`\\\"'*?[#~=%!{}".includes(r)?t+=`\\${r}`:t+=r;return t}function B(e,o){let t=e.match(/^%(-?)(\d*)(\.(\d*))?s$/);if(!t)return(0,C.sprintf)(e.replace(/0+(?=\d)/,""),o);let r=t[1]==="-",s=t[2]?parseInt(t[2],10):0,n=t[3]!==void 0?t[4]?parseInt(t[4],10):0:-1,l=r?-s:s;return W(o,l,n)}function K(e,o){let t=J(o),r=e.match(/^%(-?)(\d*)q$/);if(!r)return t;let s=r[1]==="-",n=r[2]?parseInt(r[2],10):0,l=t;return n>l.length&&(s?l=l.padEnd(n," "):l=l.padStart(n," ")),l}function Y(e,o,t){let r=e.match(/^%([- +#0']*)(\d*)(\.(\d*))?[eEfFgG]$/);if(!r)return(0,C.sprintf)(e,t);let s=r[1]||"",n=r[2]?parseInt(r[2],10):0,l=r[3]!==void 0?r[4]?parseInt(r[4],10):0:6,a,c=o.toLowerCase();if(c==="e"?(a=t.toExponential(l),a=a.replace(/e([+-])(\d)$/,"e$10$2"),o==="E"&&(a=a.toUpperCase())):c==="f"?(a=t.toFixed(l),s.includes("#")&&l===0&&!a.includes(".")&&(a+=".")):c==="g"?(a=t.toPrecision(l||1),s.includes("#")||(a=a.replace(/\.?0+$/,""),a=a.replace(/\.?0+e/,"e")),a=a.replace(/e([+-])(\d)$/,"e$10$2"),o==="G"&&(a=a.toUpperCase())):a=t.toString(),t>=0&&(s.includes("+")?a=`+${a}`:s.includes(" ")&&(a=` ${a}`)),n>a.length)if(s.includes("-"))a=a.padEnd(n," ");else if(s.includes("0")){let u=a.match(/^[+ -]/)?.[0]||"",i=u?a.slice(1):a;a=u+i.padStart(n-u.length,"0")}else a=a.padStart(n," ");return a}function ee(e){let o="",t=0;for(;t<e.length;)if(e[t]==="\\"&&t+1<e.length)switch(e[t+1]){case"n":o+=`
15
+ `,t+=2;break;case"t":o+=" ",t+=2;break;case"r":o+="\r",t+=2;break;case"\\":o+="\\",t+=2;break;case"a":o+="\x07",t+=2;break;case"b":o+="\b",t+=2;break;case"f":o+="\f",t+=2;break;case"v":o+="\v",t+=2;break;case"c":return{value:o,stopped:!0};case"x":{let s=[],n=t;for(;n+1<e.length&&e[n]==="\\"&&e[n+1]==="x";){let l="",a=n+2;for(;a<e.length&&a<n+4&&/[0-9a-fA-F]/.test(e[a]);)l+=e[a],a++;if(l)s.push(parseInt(l,16)),n=a;else break}s.length>0?(o+=q(s),t=n):(o+="\\x",t+=2);break}case"u":{let s="",n=t+2;for(;n<e.length&&n<t+6&&/[0-9a-fA-F]/.test(e[n]);)s+=e[n],n++;s?(o+=String.fromCodePoint(parseInt(s,16)),t=n):(o+="\\u",t+=2);break}case"0":{let s="",n=t+2;for(;n<e.length&&n<t+5&&/[0-7]/.test(e[n]);)s+=e[n],n++;s?o+=String.fromCharCode(parseInt(s,8)):o+="\0",t=n;break}case"1":case"2":case"3":case"4":case"5":case"6":case"7":{let s="",n=t+1;for(;n<e.length&&n<t+4&&/[0-7]/.test(e[n]);)s+=e[n],n++;o+=String.fromCharCode(parseInt(s,8)),t=n;break}default:o+=e[t],t++}else o+=e[t],t++;return{value:o,stopped:!1}}var le={name:"printf",flags:[{flag:"-v",type:"value",valueHint:"string"}],stdinType:"none",needsArgs:!0};export{oe as a,le as b};
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
- import{a as U}from"./chunk-VZK4FHWJ.js";import{a as $,b as F,c as k}from"./chunk-MUFNRCMY.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
+ import{a as U}from"./chunk-DHIKZU63.js";import{a as $,b as F,c as k}from"./chunk-MUFNRCMY.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
4
4
  `,exitCode:1};for(let m of u.split(`
5
5
  `)){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
6
6
  `,e++;continue}let i=await C(h,t)===x.toLowerCase();f+=`${o}: ${i?"OK":"FAILED"}
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
- import{a as j,b as y}from"./chunk-VZK4FHWJ.js";import{a as g,b as v,c as F}from"./chunk-MUFNRCMY.js";var N={name:"join",summary:"join lines of two files on a common field",usage:"join [OPTION]... FILE1 FILE2",description:"For each pair of input lines with identical join fields, write a line to standard output. The default join field is the first, delimited by blanks.",options:["-1 FIELD Join on this FIELD of file 1 (default: 1)","-2 FIELD Join on this FIELD of file 2 (default: 1)","-t CHAR Use CHAR as input and output field separator","-a FILENUM Also print unpairable lines from file FILENUM (1 or 2)","-v FILENUM Like -a but only output unpairable lines","-e STRING Replace missing fields with STRING","-o FORMAT Output format (comma-separated list of FILENUM.FIELD)","-i Ignore case when comparing fields"],examples:["join file1 file2 # Join on first field","join -1 2 -2 1 file1 file2 # Join file1 col 2 with file2 col 1","join -t ',' file1.csv file2.csv # Join CSV files","join -a 1 file1 file2 # Left outer join"]};function I(i,s){return s?i.split(s):i.split(/[ \t]+/).filter(n=>n.length>0)}function L(i,s,n,f){let e=I(i,s),r=e[n-1]??"";return f&&(r=r.toLowerCase()),{fields:e,joinKey:r,original:i}}function m(i,s,n){let f=n.separator??" ";if(n.outputFormat){let l=[];for(let{file:c,field:p}of n.outputFormat){let a=c===1?i:s;a&&p===0?l.push(a.joinKey):a&&a.fields[p-1]!==void 0?l.push(a.fields[p-1]):l.push(n.emptyString)}return l.join(f)}let e=[],r=i?.joinKey??s?.joinKey??"";if(e.push(r),i)for(let l=0;l<i.fields.length;l++)l!==n.field1-1&&e.push(i.fields[l]);if(s)for(let l=0;l<s.fields.length;l++)l!==n.field2-1&&e.push(s.fields[l]);return e.join(f)}function U(i){let s=i.split(","),n=[];for(let f of s){let e=f.trim().match(/^(\d+)\.(\d+)$/);if(!e)return null;let r=Number.parseInt(e[1],10),l=Number.parseInt(e[2],10);if(r!==1&&r!==2)return null;n.push({file:r,field:l})}return n}var E={name:"join",execute:async(i,s)=>{if(v(i))return g(N);let n={field1:1,field2:1,separator:null,printUnpairable:new Set,onlyUnpairable:new Set,emptyString:"",outputFormat:null,ignoreCase:!1},f=[],e=0;for(;e<i.length;){let t=i[e];if(t==="-1"&&e+1<i.length){let o=Number.parseInt(i[e+1],10);if(Number.isNaN(o)||o<1)return{exitCode:1,stdout:"",stderr:`join: invalid field number: '${i[e+1]}'
3
+ import{a as j,b as y}from"./chunk-DHIKZU63.js";import{a as g,b as v,c as F}from"./chunk-MUFNRCMY.js";var N={name:"join",summary:"join lines of two files on a common field",usage:"join [OPTION]... FILE1 FILE2",description:"For each pair of input lines with identical join fields, write a line to standard output. The default join field is the first, delimited by blanks.",options:["-1 FIELD Join on this FIELD of file 1 (default: 1)","-2 FIELD Join on this FIELD of file 2 (default: 1)","-t CHAR Use CHAR as input and output field separator","-a FILENUM Also print unpairable lines from file FILENUM (1 or 2)","-v FILENUM Like -a but only output unpairable lines","-e STRING Replace missing fields with STRING","-o FORMAT Output format (comma-separated list of FILENUM.FIELD)","-i Ignore case when comparing fields"],examples:["join file1 file2 # Join on first field","join -1 2 -2 1 file1 file2 # Join file1 col 2 with file2 col 1","join -t ',' file1.csv file2.csv # Join CSV files","join -a 1 file1 file2 # Left outer join"]};function I(i,s){return s?i.split(s):i.split(/[ \t]+/).filter(n=>n.length>0)}function L(i,s,n,f){let e=I(i,s),r=e[n-1]??"";return f&&(r=r.toLowerCase()),{fields:e,joinKey:r,original:i}}function m(i,s,n){let f=n.separator??" ";if(n.outputFormat){let l=[];for(let{file:c,field:p}of n.outputFormat){let a=c===1?i:s;a&&p===0?l.push(a.joinKey):a&&a.fields[p-1]!==void 0?l.push(a.fields[p-1]):l.push(n.emptyString)}return l.join(f)}let e=[],r=i?.joinKey??s?.joinKey??"";if(e.push(r),i)for(let l=0;l<i.fields.length;l++)l!==n.field1-1&&e.push(i.fields[l]);if(s)for(let l=0;l<s.fields.length;l++)l!==n.field2-1&&e.push(s.fields[l]);return e.join(f)}function U(i){let s=i.split(","),n=[];for(let f of s){let e=f.trim().match(/^(\d+)\.(\d+)$/);if(!e)return null;let r=Number.parseInt(e[1],10),l=Number.parseInt(e[2],10);if(r!==1&&r!==2)return null;n.push({file:r,field:l})}return n}var E={name:"join",execute:async(i,s)=>{if(v(i))return g(N);let n={field1:1,field2:1,separator:null,printUnpairable:new Set,onlyUnpairable:new Set,emptyString:"",outputFormat:null,ignoreCase:!1},f=[],e=0;for(;e<i.length;){let t=i[e];if(t==="-1"&&e+1<i.length){let o=Number.parseInt(i[e+1],10);if(Number.isNaN(o)||o<1)return{exitCode:1,stdout:"",stderr:`join: invalid field number: '${i[e+1]}'
4
4
  `};n.field1=o,e+=2}else if(t==="-2"&&e+1<i.length){let o=Number.parseInt(i[e+1],10);if(Number.isNaN(o)||o<1)return{exitCode:1,stdout:"",stderr:`join: invalid field number: '${i[e+1]}'
5
5
  `};n.field2=o,e+=2}else if((t==="-t"||t==="--field-separator")&&e+1<i.length)n.separator=i[e+1],e+=2;else if(t.startsWith("-t")&&t.length>2)n.separator=t.slice(2),e++;else if(t==="-a"&&e+1<i.length){let o=Number.parseInt(i[e+1],10);if(o!==1&&o!==2)return{exitCode:1,stdout:"",stderr:`join: invalid file number: '${i[e+1]}'
6
6
  `};n.printUnpairable.add(o),e+=2}else if(t.match(/^-a[12]$/))n.printUnpairable.add(Number.parseInt(t[2],10)),e++;else if(t==="-v"&&e+1<i.length){let o=Number.parseInt(i[e+1],10);if(o!==1&&o!==2)return{exitCode:1,stdout:"",stderr:`join: invalid file number: '${i[e+1]}'
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
- import{a as $l}from"./chunk-MNWK4UIM.js";import{a as Be,b as er}from"./chunk-LSQTB2QK.js";import{d as D}from"./chunk-MLUOPG3W.js";import{a as Qi,b as Zi}from"./chunk-LNNWMRCB.js";import{a as Bs}from"./chunk-HL4ZS7TX.js";import{a as Hi}from"./chunk-VZK4FHWJ.js";import{k as Vs}from"./chunk-47WZ2U6M.js";import{a as js}from"./chunk-PBOVSFTJ.js";import{a as Xi,b as zi,c as he}from"./chunk-MUFNRCMY.js";import{a as Ot,c as w,e as Fs}from"./chunk-LNVSXNT7.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
+ import{a as $l}from"./chunk-MNWK4UIM.js";import{a as Be,b as er}from"./chunk-LMA4D2KK.js";import{d as D}from"./chunk-MLUOPG3W.js";import{a as Qi,b as Zi}from"./chunk-AZH64XMJ.js";import{a as Bs}from"./chunk-LX2H4DPL.js";import{a as Hi}from"./chunk-DHIKZU63.js";import{k as Vs}from"./chunk-47WZ2U6M.js";import{a as js}from"./chunk-PBOVSFTJ.js";import{a as Xi,b as zi,c as he}from"./chunk-MUFNRCMY.js";import{a as Ot,c as w,e as Fs}from"./chunk-LNVSXNT7.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
4
4
  `:`
5
5
  `,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(`
6
6
  `)}};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(`