just-bash 2.15.1-executor.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (643) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/README.md +38 -2
  3. package/dist/Bash.d.ts +23 -84
  4. package/dist/bin/chunks/awk2-CKPJ75GN.js +2 -0
  5. package/dist/bin/chunks/base64-I3CXGD2Q.js +2 -0
  6. package/dist/bin/chunks/bash-UYSJL7VA.js +2 -0
  7. package/dist/bin/chunks/cat-3TMJDECR.js +2 -0
  8. package/dist/bin/chunks/chunk-24DJ4XAS.js +18 -0
  9. package/dist/bin/chunks/{chunk-DOXYBGNA.js → chunk-2ACK45YF.js} +4 -4
  10. package/dist/bin/chunks/chunk-2GZSSMV3.js +14 -0
  11. package/dist/bin/chunks/{chunk-WXMBDX4P.js → chunk-2TMMAY52.js} +7 -7
  12. package/dist/bin/chunks/chunk-575DV2PL.js +9 -0
  13. package/dist/bin/chunks/chunk-5DFR7VRU.js +13 -0
  14. package/dist/bin/chunks/chunk-63XSH3IT.js +2 -0
  15. package/dist/bin/{shell/chunks/chunk-N43DJTSI.js → chunks/chunk-6CW6ATOU.js} +1 -1
  16. package/dist/bin/chunks/chunk-6NYAJMTL.js +14 -0
  17. package/dist/bin/chunks/chunk-6ZKYK7PO.js +63 -0
  18. package/dist/bin/chunks/chunk-7FOU5QKD.js +11 -0
  19. package/dist/bin/chunks/chunk-7RSTZI3G.js +9 -0
  20. package/dist/bin/chunks/{chunk-SGA7Y45Z.js → chunk-A65XLABI.js} +5 -5
  21. package/dist/bin/chunks/{chunk-YLE2OYY6.js → chunk-A6CAHGYF.js} +1 -1
  22. package/dist/bin/{shell/chunks/chunk-XKPFI566.js → chunks/chunk-AM6HJVBI.js} +17 -17
  23. package/dist/bin/chunks/chunk-AQBEVPZP.js +6 -0
  24. package/dist/bin/chunks/chunk-AX3QU3MP.js +6 -0
  25. package/dist/bin/chunks/chunk-B4CUXR3Q.js +33 -0
  26. package/dist/bin/chunks/{chunk-NLBRLRWD.js → chunk-B5DAHNDY.js} +1 -1
  27. package/dist/bin/chunks/chunk-BEWZWAXH.js +8 -0
  28. package/dist/bin/{shell/chunks/chunk-SE4C7FJY.js → chunks/chunk-C6FRS5UB.js} +13 -13
  29. package/dist/bin/chunks/chunk-CUYKY2BK.js +5 -0
  30. package/dist/bin/chunks/chunk-D3JRD3JF.js +36 -0
  31. package/dist/bin/chunks/chunk-D6DORGK7.js +16 -0
  32. package/dist/bin/chunks/{chunk-SXB55JOI.js → chunk-DH7TPGPX.js} +1 -1
  33. package/dist/bin/chunks/chunk-FU7JHPYW.js +9 -0
  34. package/dist/bin/chunks/chunk-G36D7WFF.js +6 -0
  35. package/dist/bin/chunks/chunk-GQQLQPZG.js +7 -0
  36. package/dist/bin/chunks/chunk-HIVPP3AM.js +17 -0
  37. package/dist/bin/{shell/chunks/chunk-NAX7MTAR.js → chunks/chunk-I3X57RP5.js} +6 -6
  38. package/dist/bin/chunks/chunk-IZ3AT2KX.js +19 -0
  39. package/dist/bin/chunks/chunk-KHOBXZFG.js +12 -0
  40. package/dist/bin/chunks/chunk-KMFPV7SR.js +6 -0
  41. package/dist/bin/chunks/chunk-KX2PR2HV.js +16 -0
  42. package/dist/bin/chunks/{chunk-54G6AE72.js → chunk-LCJRVV55.js} +1 -1
  43. package/dist/bin/chunks/chunk-M33SULGQ.js +9 -0
  44. package/dist/bin/chunks/{chunk-3Y32LPNT.js → chunk-M3T6XOXC.js} +1 -1
  45. package/dist/bin/chunks/chunk-MWKPB24E.js +11 -0
  46. package/dist/bin/chunks/chunk-NN2DBOAZ.js +5 -0
  47. package/dist/bin/chunks/{chunk-RMQC3GS7.js → chunk-NOGXKS2G.js} +23 -23
  48. package/dist/bin/chunks/chunk-NTW6IA45.js +2 -0
  49. package/dist/bin/{shell/chunks/chunk-7BORMNPQ.js → chunks/chunk-NWG67HAQ.js} +1 -1
  50. package/dist/bin/chunks/{chunk-A3HQTYHR.js → chunk-P43NQKUN.js} +1 -1
  51. package/dist/bin/chunks/chunk-PHZPFNDZ.js +287 -0
  52. package/dist/bin/chunks/chunk-RX22J4AC.js +14 -0
  53. package/dist/bin/chunks/chunk-S7KZBLGH.js +3 -0
  54. package/dist/bin/{shell/chunks/chunk-ZO5PSLKR.js → chunks/chunk-SDOJRQF5.js} +1 -1
  55. package/dist/bin/chunks/chunk-UFJFAFSS.js +28 -0
  56. package/dist/bin/chunks/chunk-UMYJNWPA.js +140 -0
  57. package/dist/bin/chunks/chunk-UO7ZJYDM.js +11 -0
  58. package/dist/bin/chunks/{chunk-THNL3XFF.js → chunk-VECTAALH.js} +1 -1
  59. package/dist/bin/chunks/chunk-VRU3NTQB.js +3 -0
  60. package/dist/bin/chunks/chunk-WJ3HZK2S.js +5 -0
  61. package/dist/bin/chunks/chunk-WLBA7L7U.js +23 -0
  62. package/dist/bin/{shell/chunks/chunk-SXRVLCZ4.js → chunks/chunk-WRYJHXRE.js} +1 -1
  63. package/dist/bin/chunks/chunk-XZEAAOBW.js +8 -0
  64. package/dist/bin/{shell/chunks/chunk-SDLWFYVT.js → chunks/chunk-YMQY74O7.js} +13 -13
  65. package/dist/bin/chunks/chunk-ZNMFCOTS.js +10 -0
  66. package/dist/bin/chunks/{chunk-GOJZHH3L.js → chunk-ZO3PBKJB.js} +3 -3
  67. package/dist/bin/chunks/column-MTXKQLJH.js +2 -0
  68. package/dist/bin/chunks/comm-YZHVF2XN.js +2 -0
  69. package/dist/bin/chunks/{curl-SRTMGOVV.js → curl-2DCNBIKJ.js} +8 -8
  70. package/dist/bin/chunks/cut-MWPHE25M.js +2 -0
  71. package/dist/bin/chunks/diff-EINZHDTZ.js +2 -0
  72. package/dist/bin/chunks/env-NK55NKL6.js +2 -0
  73. package/dist/bin/chunks/expand-47QQBMM5.js +2 -0
  74. package/dist/bin/{shell/chunks/expansion-2RO5M3QC.js → chunks/expansion-H3VFC532.js} +1 -1
  75. package/dist/bin/chunks/{expr-4CJYC4LY.js → expr-VPJ77DR7.js} +1 -1
  76. package/dist/bin/{shell/chunks/file-D5YKS5NV.js → chunks/file-MMSHRWCJ.js} +1 -1
  77. package/dist/bin/chunks/find-O2KKT6KZ.js +2 -0
  78. package/dist/bin/chunks/flag-coverage-FHFMNAV6.js +2 -0
  79. package/dist/bin/chunks/fold-QC27S46O.js +2 -0
  80. package/dist/bin/chunks/grep-3X5B47DW.js +2 -0
  81. package/dist/bin/chunks/gzip-VYBZGPTA.js +2 -0
  82. package/dist/bin/chunks/head-BM7J6BEI.js +2 -0
  83. package/dist/bin/chunks/html-to-markdown-G2FXKDLR.js +2 -0
  84. package/dist/bin/chunks/join-5J5VA3I7.js +2 -0
  85. package/dist/bin/chunks/jq-HYQ3KMGL.js +2 -0
  86. package/dist/bin/chunks/js-exec-LZPKIZ5V.js +97 -0
  87. package/dist/bin/chunks/js-exec-worker.js +27 -185
  88. package/dist/bin/chunks/{ls-G2PXHSNX.js → ls-WONXDVOX.js} +1 -1
  89. package/dist/bin/chunks/md5sum-GVZ66MRR.js +2 -0
  90. package/dist/bin/chunks/nl-XLPXDHHK.js +2 -0
  91. package/dist/bin/chunks/od-CRBL7ZML.js +2 -0
  92. package/dist/bin/chunks/paste-7MEIW3PG.js +2 -0
  93. package/dist/bin/chunks/{printf-P3QVL4IO.js → printf-NA7DYZBO.js} +1 -1
  94. package/dist/bin/chunks/python3-BBQ4SVHU.js +12 -0
  95. package/dist/bin/chunks/rev-6LTZEDBA.js +2 -0
  96. package/dist/bin/chunks/rg-UPQTBQZR.js +2 -0
  97. package/dist/bin/chunks/sed-OKEUW2KT.js +2 -0
  98. package/dist/bin/chunks/sha1sum-HFI2SRA4.js +2 -0
  99. package/dist/bin/chunks/sha256sum-N44D3OCP.js +2 -0
  100. package/dist/bin/chunks/sort-ES3NRFJA.js +2 -0
  101. package/dist/bin/chunks/split-QFBCCUR5.js +2 -0
  102. package/dist/bin/chunks/sqlite3-V4SEWTIR.js +2 -0
  103. package/dist/bin/chunks/sqlite3-worker.js +1728 -0
  104. package/dist/bin/chunks/strings-YGI6HF5M.js +2 -0
  105. package/dist/bin/chunks/tac-HWXFWOGO.js +2 -0
  106. package/dist/bin/chunks/tail-YX6MELZ5.js +2 -0
  107. package/dist/bin/chunks/tar-UO62YC6N.js +2 -0
  108. package/dist/bin/chunks/tee-XKJM7HV7.js +2 -0
  109. package/dist/bin/chunks/time-RPVNTV72.js +2 -0
  110. package/dist/bin/chunks/timeout-4QMASFQG.js +2 -0
  111. package/dist/bin/chunks/tr-A6IXSBQX.js +2 -0
  112. package/dist/bin/chunks/unexpand-UCJETXUX.js +2 -0
  113. package/dist/bin/chunks/uniq-2KXDTNDX.js +2 -0
  114. package/dist/bin/chunks/wc-KTXPMRYY.js +2 -0
  115. package/dist/bin/chunks/worker.js +28 -9
  116. package/dist/bin/chunks/xan-IHA7IHBM.js +2 -0
  117. package/dist/bin/chunks/xan-view-JFFJAU35.js +2 -0
  118. package/dist/bin/chunks/xargs-EWL5DXR3.js +2 -0
  119. package/dist/bin/chunks/yq-LDGFI4EM.js +2 -0
  120. package/dist/bin/just-bash.js +292 -292
  121. package/dist/bin/shell/chunks/awk2-CKPJ75GN.js +2 -0
  122. package/dist/bin/shell/chunks/base64-I3CXGD2Q.js +2 -0
  123. package/dist/bin/shell/chunks/bash-UYSJL7VA.js +2 -0
  124. package/dist/bin/shell/chunks/cat-3TMJDECR.js +2 -0
  125. package/dist/bin/shell/chunks/chunk-24DJ4XAS.js +18 -0
  126. package/dist/bin/shell/chunks/{chunk-DOXYBGNA.js → chunk-2ACK45YF.js} +4 -4
  127. package/dist/bin/shell/chunks/chunk-2GZSSMV3.js +14 -0
  128. package/dist/bin/shell/chunks/{chunk-WXMBDX4P.js → chunk-2TMMAY52.js} +7 -7
  129. package/dist/bin/shell/chunks/chunk-575DV2PL.js +9 -0
  130. package/dist/bin/shell/chunks/chunk-5DFR7VRU.js +13 -0
  131. package/dist/bin/shell/chunks/chunk-63XSH3IT.js +2 -0
  132. package/dist/bin/{chunks/chunk-N43DJTSI.js → shell/chunks/chunk-6CW6ATOU.js} +1 -1
  133. package/dist/bin/shell/chunks/chunk-6NYAJMTL.js +14 -0
  134. package/dist/bin/shell/chunks/chunk-6ZKYK7PO.js +63 -0
  135. package/dist/bin/shell/chunks/chunk-7FOU5QKD.js +11 -0
  136. package/dist/bin/shell/chunks/chunk-7RSTZI3G.js +9 -0
  137. package/dist/bin/shell/chunks/{chunk-SGA7Y45Z.js → chunk-A65XLABI.js} +5 -5
  138. package/dist/bin/shell/chunks/{chunk-YLE2OYY6.js → chunk-A6CAHGYF.js} +1 -1
  139. package/dist/bin/{chunks/chunk-XKPFI566.js → shell/chunks/chunk-AM6HJVBI.js} +17 -17
  140. package/dist/bin/shell/chunks/chunk-AQBEVPZP.js +6 -0
  141. package/dist/bin/shell/chunks/chunk-AX3QU3MP.js +6 -0
  142. package/dist/bin/shell/chunks/chunk-B4CUXR3Q.js +33 -0
  143. package/dist/bin/shell/chunks/{chunk-NLBRLRWD.js → chunk-B5DAHNDY.js} +1 -1
  144. package/dist/bin/shell/chunks/chunk-BEWZWAXH.js +8 -0
  145. package/dist/bin/{chunks/chunk-SE4C7FJY.js → shell/chunks/chunk-C6FRS5UB.js} +13 -13
  146. package/dist/bin/shell/chunks/chunk-CUYKY2BK.js +5 -0
  147. package/dist/bin/shell/chunks/chunk-D3JRD3JF.js +36 -0
  148. package/dist/bin/shell/chunks/chunk-D6DORGK7.js +16 -0
  149. package/dist/bin/shell/chunks/{chunk-SXB55JOI.js → chunk-DH7TPGPX.js} +1 -1
  150. package/dist/bin/shell/chunks/chunk-FU7JHPYW.js +9 -0
  151. package/dist/bin/shell/chunks/chunk-G36D7WFF.js +6 -0
  152. package/dist/bin/shell/chunks/chunk-GQQLQPZG.js +7 -0
  153. package/dist/bin/shell/chunks/chunk-HIVPP3AM.js +17 -0
  154. package/dist/bin/{chunks/chunk-NAX7MTAR.js → shell/chunks/chunk-I3X57RP5.js} +6 -6
  155. package/dist/bin/shell/chunks/chunk-IZ3AT2KX.js +19 -0
  156. package/dist/bin/shell/chunks/chunk-KHOBXZFG.js +12 -0
  157. package/dist/bin/shell/chunks/chunk-KMFPV7SR.js +6 -0
  158. package/dist/bin/shell/chunks/chunk-KX2PR2HV.js +16 -0
  159. package/dist/bin/shell/chunks/{chunk-54G6AE72.js → chunk-LCJRVV55.js} +1 -1
  160. package/dist/bin/shell/chunks/chunk-M33SULGQ.js +9 -0
  161. package/dist/bin/shell/chunks/{chunk-3Y32LPNT.js → chunk-M3T6XOXC.js} +1 -1
  162. package/dist/bin/shell/chunks/chunk-MWKPB24E.js +11 -0
  163. package/dist/bin/shell/chunks/chunk-NN2DBOAZ.js +5 -0
  164. package/dist/bin/shell/chunks/{chunk-RMQC3GS7.js → chunk-NOGXKS2G.js} +23 -23
  165. package/dist/bin/shell/chunks/chunk-NTW6IA45.js +2 -0
  166. package/dist/bin/{chunks/chunk-7BORMNPQ.js → shell/chunks/chunk-NWG67HAQ.js} +1 -1
  167. package/dist/bin/shell/chunks/{chunk-A3HQTYHR.js → chunk-P43NQKUN.js} +1 -1
  168. package/dist/bin/shell/chunks/chunk-PHZPFNDZ.js +287 -0
  169. package/dist/bin/shell/chunks/chunk-RX22J4AC.js +14 -0
  170. package/dist/bin/shell/chunks/chunk-S7KZBLGH.js +3 -0
  171. package/dist/bin/{chunks/chunk-ZO5PSLKR.js → shell/chunks/chunk-SDOJRQF5.js} +1 -1
  172. package/dist/bin/shell/chunks/chunk-UFJFAFSS.js +28 -0
  173. package/dist/bin/shell/chunks/chunk-UMYJNWPA.js +140 -0
  174. package/dist/bin/shell/chunks/chunk-UO7ZJYDM.js +11 -0
  175. package/dist/bin/shell/chunks/{chunk-THNL3XFF.js → chunk-VECTAALH.js} +1 -1
  176. package/dist/bin/shell/chunks/chunk-VRU3NTQB.js +3 -0
  177. package/dist/bin/shell/chunks/chunk-WJ3HZK2S.js +5 -0
  178. package/dist/bin/shell/chunks/chunk-WLBA7L7U.js +23 -0
  179. package/dist/bin/{chunks/chunk-SXRVLCZ4.js → shell/chunks/chunk-WRYJHXRE.js} +1 -1
  180. package/dist/bin/shell/chunks/chunk-XZEAAOBW.js +8 -0
  181. package/dist/bin/{chunks/chunk-SDLWFYVT.js → shell/chunks/chunk-YMQY74O7.js} +13 -13
  182. package/dist/bin/shell/chunks/chunk-ZNMFCOTS.js +10 -0
  183. package/dist/bin/shell/chunks/{chunk-GOJZHH3L.js → chunk-ZO3PBKJB.js} +3 -3
  184. package/dist/bin/shell/chunks/column-MTXKQLJH.js +2 -0
  185. package/dist/bin/shell/chunks/comm-YZHVF2XN.js +2 -0
  186. package/dist/bin/shell/chunks/{curl-SRTMGOVV.js → curl-2DCNBIKJ.js} +8 -8
  187. package/dist/bin/shell/chunks/cut-MWPHE25M.js +2 -0
  188. package/dist/bin/shell/chunks/diff-EINZHDTZ.js +2 -0
  189. package/dist/bin/shell/chunks/env-NK55NKL6.js +2 -0
  190. package/dist/bin/shell/chunks/expand-47QQBMM5.js +2 -0
  191. package/dist/bin/{chunks/expansion-2RO5M3QC.js → shell/chunks/expansion-H3VFC532.js} +1 -1
  192. package/dist/bin/shell/chunks/{expr-4CJYC4LY.js → expr-VPJ77DR7.js} +1 -1
  193. package/dist/bin/{chunks/file-D5YKS5NV.js → shell/chunks/file-MMSHRWCJ.js} +1 -1
  194. package/dist/bin/shell/chunks/find-O2KKT6KZ.js +2 -0
  195. package/dist/bin/shell/chunks/flag-coverage-FHFMNAV6.js +2 -0
  196. package/dist/bin/shell/chunks/fold-QC27S46O.js +2 -0
  197. package/dist/bin/shell/chunks/grep-3X5B47DW.js +2 -0
  198. package/dist/bin/shell/chunks/gzip-VYBZGPTA.js +2 -0
  199. package/dist/bin/shell/chunks/head-BM7J6BEI.js +2 -0
  200. package/dist/bin/shell/chunks/html-to-markdown-G2FXKDLR.js +2 -0
  201. package/dist/bin/shell/chunks/join-5J5VA3I7.js +2 -0
  202. package/dist/bin/shell/chunks/jq-HYQ3KMGL.js +2 -0
  203. package/dist/bin/shell/chunks/js-exec-LZPKIZ5V.js +97 -0
  204. package/dist/bin/shell/chunks/{ls-G2PXHSNX.js → ls-WONXDVOX.js} +1 -1
  205. package/dist/bin/shell/chunks/md5sum-GVZ66MRR.js +2 -0
  206. package/dist/bin/shell/chunks/nl-XLPXDHHK.js +2 -0
  207. package/dist/bin/shell/chunks/od-CRBL7ZML.js +2 -0
  208. package/dist/bin/shell/chunks/paste-7MEIW3PG.js +2 -0
  209. package/dist/bin/shell/chunks/{printf-P3QVL4IO.js → printf-NA7DYZBO.js} +1 -1
  210. package/dist/bin/shell/chunks/python3-BBQ4SVHU.js +12 -0
  211. package/dist/bin/shell/chunks/rev-6LTZEDBA.js +2 -0
  212. package/dist/bin/shell/chunks/rg-UPQTBQZR.js +2 -0
  213. package/dist/bin/shell/chunks/sed-OKEUW2KT.js +2 -0
  214. package/dist/bin/shell/chunks/sha1sum-HFI2SRA4.js +2 -0
  215. package/dist/bin/shell/chunks/sha256sum-N44D3OCP.js +2 -0
  216. package/dist/bin/shell/chunks/sort-ES3NRFJA.js +2 -0
  217. package/dist/bin/shell/chunks/split-QFBCCUR5.js +2 -0
  218. package/dist/bin/shell/chunks/sqlite3-V4SEWTIR.js +2 -0
  219. package/dist/bin/shell/chunks/strings-YGI6HF5M.js +2 -0
  220. package/dist/bin/shell/chunks/tac-HWXFWOGO.js +2 -0
  221. package/dist/bin/shell/chunks/tail-YX6MELZ5.js +2 -0
  222. package/dist/bin/shell/chunks/tar-UO62YC6N.js +2 -0
  223. package/dist/bin/shell/chunks/tee-XKJM7HV7.js +2 -0
  224. package/dist/bin/shell/chunks/time-RPVNTV72.js +2 -0
  225. package/dist/bin/shell/chunks/timeout-4QMASFQG.js +2 -0
  226. package/dist/bin/shell/chunks/tr-A6IXSBQX.js +2 -0
  227. package/dist/bin/shell/chunks/unexpand-UCJETXUX.js +2 -0
  228. package/dist/bin/shell/chunks/uniq-2KXDTNDX.js +2 -0
  229. package/dist/bin/shell/chunks/wc-KTXPMRYY.js +2 -0
  230. package/dist/bin/shell/chunks/xan-IHA7IHBM.js +2 -0
  231. package/dist/bin/shell/chunks/xan-view-JFFJAU35.js +2 -0
  232. package/dist/bin/shell/chunks/xargs-EWL5DXR3.js +2 -0
  233. package/dist/bin/shell/chunks/yq-LDGFI4EM.js +2 -0
  234. package/dist/bin/shell/shell.js +274 -274
  235. package/dist/browser.d.ts +1 -0
  236. package/dist/bundle/browser.js +676 -674
  237. package/dist/bundle/chunks/awk2-RXRC54TM.js +1 -0
  238. package/dist/bundle/chunks/base64-FJOOBRMC.js +1 -0
  239. package/dist/bundle/chunks/bash-4WLDO24C.js +1 -0
  240. package/dist/bundle/chunks/cat-VQEWZT5O.js +1 -0
  241. package/dist/bundle/chunks/chunk-2TRDZQLB.js +17 -0
  242. package/dist/bundle/chunks/chunk-5DI2YNX7.js +10 -0
  243. package/dist/bundle/chunks/chunk-6N5CMDSQ.js +9 -0
  244. package/dist/bundle/chunks/{chunk-F23WWYKW.js → chunk-7P5JCWX5.js} +5 -5
  245. package/dist/bundle/chunks/chunk-7RIQPKJE.js +2 -0
  246. package/dist/bundle/chunks/{chunk-APT7OOP2.js → chunk-7ZUB672J.js} +1 -1
  247. package/dist/bundle/chunks/chunk-AH77CRWX.js +1 -0
  248. package/dist/bundle/chunks/{chunk-YNYSPYQ5.js → chunk-B74TABJS.js} +13 -13
  249. package/dist/bundle/chunks/{chunk-QJ7O6ZN3.js → chunk-BAXBSHE5.js} +3 -3
  250. package/dist/bundle/chunks/{chunk-FEIOJCZD.js → chunk-BGSUD5R5.js} +1 -1
  251. package/dist/bundle/chunks/chunk-CHRGJY5U.js +10 -0
  252. package/dist/bundle/chunks/chunk-CYJSRRNG.js +4 -0
  253. package/dist/bundle/chunks/chunk-CZYXTGMR.js +139 -0
  254. package/dist/bundle/chunks/{chunk-OL3S66CO.js → chunk-DFS4EHCX.js} +23 -23
  255. package/dist/bundle/chunks/chunk-DIB23V32.js +8 -0
  256. package/dist/bundle/chunks/chunk-DMJSDIQO.js +6 -0
  257. package/dist/bundle/chunks/chunk-DRGAV7ST.js +11 -0
  258. package/dist/bundle/chunks/chunk-DZCB42NK.js +2 -0
  259. package/dist/bundle/chunks/{chunk-DCAAORBQ.js → chunk-EIUAYBIC.js} +1 -1
  260. package/dist/bundle/chunks/chunk-G22IYMH5.js +16 -0
  261. package/dist/bundle/chunks/chunk-GFPLGF6W.js +5 -0
  262. package/dist/bundle/chunks/chunk-HCKS7PTH.js +10 -0
  263. package/dist/bundle/chunks/{chunk-5V6VZH6T.js → chunk-HKY7IG73.js} +1 -1
  264. package/dist/bundle/chunks/chunk-HL6NGDO2.js +22 -0
  265. package/dist/bundle/chunks/chunk-IIJDG7QW.js +13 -0
  266. package/dist/bundle/chunks/{chunk-Z6LRHWXI.js → chunk-JKZMQVSS.js} +7 -7
  267. package/dist/bundle/chunks/chunk-JMNW4NXI.js +8 -0
  268. package/dist/bundle/chunks/{chunk-LPQPILI2.js → chunk-K6LIBGJA.js} +1 -1
  269. package/dist/bundle/chunks/chunk-KBZ5NVXE.js +5 -0
  270. package/dist/bundle/chunks/chunk-KK2SFKTN.js +13 -0
  271. package/dist/bundle/chunks/{chunk-BBXLRYSX.js → chunk-KRBPSX3W.js} +1 -1
  272. package/dist/bundle/chunks/{chunk-LTZRCH7N.js → chunk-LBUR6QMO.js} +1 -1
  273. package/dist/bundle/chunks/chunk-MBDW4C5R.js +8 -0
  274. package/dist/bundle/chunks/chunk-MIV7TH6W.js +32 -0
  275. package/dist/bundle/chunks/chunk-MOLNCDQJ.js +5 -0
  276. package/dist/bundle/chunks/chunk-NUY2ZGZL.js +286 -0
  277. package/dist/bundle/chunks/chunk-OYFKMNOH.js +4 -0
  278. package/dist/bundle/chunks/{chunk-62RKD26F.js → chunk-Q7DN34BC.js} +6 -6
  279. package/dist/bundle/chunks/chunk-R6VWJ2ZL.js +1 -0
  280. package/dist/bundle/chunks/chunk-RGAX6VXO.js +6 -0
  281. package/dist/bundle/chunks/chunk-RHD3NWJY.js +15 -0
  282. package/dist/bundle/chunks/chunk-S7CS4O3M.js +5 -0
  283. package/dist/bundle/chunks/chunk-SFQDTSOG.js +8 -0
  284. package/dist/bundle/chunks/{chunk-J642UCRS.js → chunk-SNN4IESC.js} +1 -1
  285. package/dist/bundle/chunks/{chunk-64BAICW3.js → chunk-T6RP4YO5.js} +1 -1
  286. package/dist/bundle/chunks/chunk-TWHVX65V.js +4 -0
  287. package/dist/bundle/chunks/chunk-U2ATS66X.js +4 -0
  288. package/dist/bundle/chunks/chunk-UGMTY5A7.js +15 -0
  289. package/dist/bundle/chunks/chunk-UKBVVIW7.js +62 -0
  290. package/dist/bundle/chunks/chunk-USP7VSKV.js +12 -0
  291. package/dist/bundle/chunks/{chunk-OARHFVLG.js → chunk-UTKQPLMD.js} +13 -13
  292. package/dist/bundle/chunks/{chunk-YFG2CMIF.js → chunk-V5MWI2OL.js} +1 -1
  293. package/dist/bundle/chunks/{chunk-XKQRETAK.js → chunk-WEZK5ELQ.js} +1 -1
  294. package/dist/bundle/chunks/{chunk-YTNYSM6T.js → chunk-WURK7XMI.js} +4 -4
  295. package/dist/bundle/chunks/chunk-WZG5CB4V.js +7 -0
  296. package/dist/bundle/chunks/chunk-XUZRLD2X.js +35 -0
  297. package/dist/bundle/chunks/chunk-YDILEREV.js +7 -0
  298. package/dist/bundle/chunks/chunk-YXVMSFJA.js +13 -0
  299. package/dist/bundle/chunks/column-DCCLCHUR.js +1 -0
  300. package/dist/bundle/chunks/comm-AXP77KC4.js +1 -0
  301. package/dist/bundle/chunks/{curl-COE4TZE6.js → curl-47BFPSFW.js} +8 -8
  302. package/dist/bundle/chunks/cut-RBX7IXC7.js +1 -0
  303. package/dist/bundle/chunks/diff-AYXX5MI5.js +1 -0
  304. package/dist/bundle/chunks/env-GBSZDQLS.js +1 -0
  305. package/dist/bundle/chunks/expand-UMGRCDTC.js +1 -0
  306. package/dist/bundle/chunks/{expansion-ENLSRCXJ.js → expansion-VBDYWVZR.js} +1 -1
  307. package/dist/bundle/chunks/{expr-5T3UU5KE.js → expr-YYCVMXE3.js} +1 -1
  308. package/dist/bundle/chunks/{file-ZIGAJ4YS.js → file-IGDTDPLG.js} +1 -1
  309. package/dist/bundle/chunks/find-DH2ALKQS.js +1 -0
  310. package/dist/bundle/chunks/flag-coverage-WZWBNOJT.js +1 -0
  311. package/dist/bundle/chunks/fold-V23GDLZD.js +1 -0
  312. package/dist/bundle/chunks/grep-7CE2SS3X.js +1 -0
  313. package/dist/bundle/chunks/gzip-EVI6YRMT.js +1 -0
  314. package/dist/bundle/chunks/head-FG33BE3W.js +1 -0
  315. package/dist/bundle/chunks/html-to-markdown-AQHC3PHD.js +1 -0
  316. package/dist/bundle/chunks/join-TLHD7S7W.js +1 -0
  317. package/dist/bundle/chunks/jq-OKCSVTHN.js +1 -0
  318. package/dist/bundle/chunks/js-exec-2U7NEXAP.js +96 -0
  319. package/dist/bundle/chunks/js-exec-worker.js +27 -185
  320. package/dist/bundle/chunks/md5sum-XMCB7L5Z.js +1 -0
  321. package/dist/bundle/chunks/nl-LBU6FPPF.js +1 -0
  322. package/dist/bundle/chunks/od-O6TPXWVX.js +1 -0
  323. package/dist/bundle/chunks/paste-HIF3YKHC.js +1 -0
  324. package/dist/bundle/chunks/python3-ZR6W2FR3.js +11 -0
  325. package/dist/bundle/chunks/rev-SKETTPXH.js +1 -0
  326. package/dist/bundle/chunks/rg-GMXITNCP.js +1 -0
  327. package/dist/bundle/chunks/sed-YRQXQDMQ.js +1 -0
  328. package/dist/bundle/chunks/sha1sum-ZHNS7PS4.js +1 -0
  329. package/dist/bundle/chunks/sha256sum-YWE2HB65.js +1 -0
  330. package/dist/bundle/chunks/sort-5KALNK6P.js +1 -0
  331. package/dist/bundle/chunks/split-4CXZNBGE.js +1 -0
  332. package/dist/bundle/chunks/sqlite3-FXN2MHWU.js +1 -0
  333. package/dist/bundle/chunks/sqlite3-worker.js +1728 -0
  334. package/dist/bundle/chunks/strings-7VYWRFIZ.js +1 -0
  335. package/dist/bundle/chunks/tac-74F3WHUM.js +1 -0
  336. package/dist/bundle/chunks/tail-EDLAF4WW.js +1 -0
  337. package/dist/bundle/chunks/tar-RKYTUGDT.js +1 -0
  338. package/dist/bundle/chunks/tee-DUMXETDQ.js +1 -0
  339. package/dist/bundle/chunks/time-U22WPHDM.js +1 -0
  340. package/dist/bundle/chunks/timeout-PWE4AOYD.js +1 -0
  341. package/dist/bundle/chunks/tr-2QSZN4JB.js +1 -0
  342. package/dist/bundle/chunks/unexpand-ZTD2RXS2.js +1 -0
  343. package/dist/bundle/chunks/uniq-DCP6SV3B.js +1 -0
  344. package/dist/bundle/chunks/wc-J6YO4AFR.js +1 -0
  345. package/dist/bundle/chunks/worker.js +28 -9
  346. package/dist/bundle/chunks/xan-74G4ZYYZ.js +1 -0
  347. package/dist/bundle/chunks/xan-view-FLG5O7II.js +1 -0
  348. package/dist/bundle/chunks/xargs-LB2QOP6N.js +1 -0
  349. package/dist/bundle/chunks/yq-4NJ2P5VT.js +1 -0
  350. package/dist/bundle/index.cjs +984 -985
  351. package/dist/bundle/index.js +271 -271
  352. package/dist/commands/js-exec/{worker.d.ts → js-exec-worker.d.ts} +4 -10
  353. package/dist/commands/js-exec/js-exec.d.ts +1 -19
  354. package/dist/commands/search-engine/matcher.d.ts +6 -0
  355. package/dist/commands/search-engine/regex.d.ts +13 -0
  356. package/dist/commands/sqlite3/sqlite3.d.ts +1 -0
  357. package/dist/commands/sqlite3/worker.js +1728 -0
  358. package/dist/commands/tar/bzip2-compress.d.ts +17 -0
  359. package/dist/commands/worker-bridge/sync-backend.d.ts +2 -1
  360. package/dist/encoding.d.ts +115 -0
  361. package/dist/fs/in-memory-fs/in-memory-fs.d.ts +2 -0
  362. package/dist/fs/interface.d.ts +23 -1
  363. package/dist/fs/mountable-fs/mountable-fs.d.ts +2 -0
  364. package/dist/fs/overlay-fs/overlay-fs.d.ts +2 -0
  365. package/dist/fs/read-write-fs/read-write-fs.d.ts +2 -0
  366. package/dist/index.d.cts +2 -0
  367. package/dist/index.d.ts +2 -0
  368. package/dist/interpreter/interpreter.d.ts +2 -7
  369. package/dist/interpreter/types.d.ts +3 -8
  370. package/dist/network/dns-pin.d.ts +43 -0
  371. package/dist/network/types.d.ts +2 -1
  372. package/dist/types.d.ts +48 -21
  373. package/dist/utils/file-reader.d.ts +12 -5
  374. package/package.json +36 -40
  375. package/vendor/cpython-emscripten/python.wasm +0 -0
  376. package/dist/bin/chunks/awk2-VTJMI54B.js +0 -2
  377. package/dist/bin/chunks/base64-43M2R3GA.js +0 -2
  378. package/dist/bin/chunks/bash-6ZHZ6BX7.js +0 -2
  379. package/dist/bin/chunks/cat-XZIJZXKP.js +0 -2
  380. package/dist/bin/chunks/chunk-26NO42TF.js +0 -14
  381. package/dist/bin/chunks/chunk-5G2VOPPJ.js +0 -7
  382. package/dist/bin/chunks/chunk-5WFYIUU2.js +0 -3
  383. package/dist/bin/chunks/chunk-AAW7UMPO.js +0 -9
  384. package/dist/bin/chunks/chunk-B3RU2PUI.js +0 -140
  385. package/dist/bin/chunks/chunk-CGE2EHYP.js +0 -5
  386. package/dist/bin/chunks/chunk-CM4532DS.js +0 -36
  387. package/dist/bin/chunks/chunk-CQG2HEAL.js +0 -5
  388. package/dist/bin/chunks/chunk-EUXCM6C4.js +0 -12
  389. package/dist/bin/chunks/chunk-F3LGZXLQ.js +0 -9
  390. package/dist/bin/chunks/chunk-FA2CHD73.js +0 -16
  391. package/dist/bin/chunks/chunk-FLPVVSN5.js +0 -5
  392. package/dist/bin/chunks/chunk-FSZWFMB4.js +0 -16
  393. package/dist/bin/chunks/chunk-G43H2WGH.js +0 -17
  394. package/dist/bin/chunks/chunk-GO6FXSC4.js +0 -6
  395. package/dist/bin/chunks/chunk-GZHFXDDO.js +0 -10
  396. package/dist/bin/chunks/chunk-HJEHIH4P.js +0 -33
  397. package/dist/bin/chunks/chunk-JQBC3FXE.js +0 -8
  398. package/dist/bin/chunks/chunk-L2JBII6Z.js +0 -287
  399. package/dist/bin/chunks/chunk-LGJM5YFT.js +0 -17
  400. package/dist/bin/chunks/chunk-LMK6G2HH.js +0 -8
  401. package/dist/bin/chunks/chunk-MNMRGJJM.js +0 -11
  402. package/dist/bin/chunks/chunk-MRP4ZCD7.js +0 -6
  403. package/dist/bin/chunks/chunk-MXVNCVD6.js +0 -30
  404. package/dist/bin/chunks/chunk-MY5PY2PL.js +0 -2
  405. package/dist/bin/chunks/chunk-N5OTVT4F.js +0 -23
  406. package/dist/bin/chunks/chunk-OBI37ZY4.js +0 -9
  407. package/dist/bin/chunks/chunk-P6GNZPVW.js +0 -19
  408. package/dist/bin/chunks/chunk-RJSAGJQJ.js +0 -11
  409. package/dist/bin/chunks/chunk-ROJPSS6N.js +0 -3
  410. package/dist/bin/chunks/chunk-S7OHMN3F.js +0 -6
  411. package/dist/bin/chunks/chunk-VHUYNUT7.js +0 -13
  412. package/dist/bin/chunks/chunk-WS6P4H4S.js +0 -63
  413. package/dist/bin/chunks/chunk-WWZVR5NN.js +0 -6
  414. package/dist/bin/chunks/chunk-YEKSVVRC.js +0 -11
  415. package/dist/bin/chunks/chunk-YFPDB4PH.js +0 -9
  416. package/dist/bin/chunks/chunk-ZA4HUKJ3.js +0 -13
  417. package/dist/bin/chunks/chunk-ZKC5HQYO.js +0 -14
  418. package/dist/bin/chunks/column-XGV32UPN.js +0 -2
  419. package/dist/bin/chunks/comm-R3F3Z5DX.js +0 -2
  420. package/dist/bin/chunks/cut-5EY2XPXX.js +0 -2
  421. package/dist/bin/chunks/diff-LE7GMFZD.js +0 -2
  422. package/dist/bin/chunks/env-NTPN5QYM.js +0 -2
  423. package/dist/bin/chunks/expand-26XPP5KB.js +0 -2
  424. package/dist/bin/chunks/find-GAYRV4IF.js +0 -2
  425. package/dist/bin/chunks/flag-coverage-LBMWMYOO.js +0 -2
  426. package/dist/bin/chunks/fold-XSVNTAWH.js +0 -2
  427. package/dist/bin/chunks/grep-OZJTRD4D.js +0 -2
  428. package/dist/bin/chunks/gzip-LHOO65AN.js +0 -2
  429. package/dist/bin/chunks/head-YMNRW3F3.js +0 -2
  430. package/dist/bin/chunks/html-to-markdown-WVZA3MCP.js +0 -2
  431. package/dist/bin/chunks/join-Y4Q5WVVE.js +0 -2
  432. package/dist/bin/chunks/jq-FIV5Q5T4.js +0 -2
  433. package/dist/bin/chunks/js-exec-RGKNWHHL.js +0 -100
  434. package/dist/bin/chunks/md5sum-NCLXV2S3.js +0 -2
  435. package/dist/bin/chunks/nl-XH3L75DR.js +0 -2
  436. package/dist/bin/chunks/od-52FBC34W.js +0 -2
  437. package/dist/bin/chunks/paste-3UVLMQ2K.js +0 -2
  438. package/dist/bin/chunks/python3-QOJU2POC.js +0 -12
  439. package/dist/bin/chunks/rev-UHEPS2UL.js +0 -2
  440. package/dist/bin/chunks/rg-C6KMBFNG.js +0 -2
  441. package/dist/bin/chunks/sed-HALRQZKY.js +0 -2
  442. package/dist/bin/chunks/sha1sum-BHNJ5ALF.js +0 -2
  443. package/dist/bin/chunks/sha256sum-HJJ3NJ5L.js +0 -2
  444. package/dist/bin/chunks/sort-7GENYU2I.js +0 -2
  445. package/dist/bin/chunks/split-YWV64TJH.js +0 -2
  446. package/dist/bin/chunks/sqlite3-CVNFMP3Z.js +0 -2
  447. package/dist/bin/chunks/strings-XXKZCWY5.js +0 -2
  448. package/dist/bin/chunks/tac-T42SKDDI.js +0 -2
  449. package/dist/bin/chunks/tail-V537TDFR.js +0 -2
  450. package/dist/bin/chunks/tar-TOWX2TDU.js +0 -2
  451. package/dist/bin/chunks/tee-HK2SYCAR.js +0 -2
  452. package/dist/bin/chunks/time-5R4QWCYF.js +0 -2
  453. package/dist/bin/chunks/timeout-Z24MNWOP.js +0 -2
  454. package/dist/bin/chunks/tr-4FPGAEVB.js +0 -2
  455. package/dist/bin/chunks/unexpand-OYZ7KOYR.js +0 -2
  456. package/dist/bin/chunks/uniq-TMSAIZM3.js +0 -2
  457. package/dist/bin/chunks/wc-ZIV3TFVG.js +0 -2
  458. package/dist/bin/chunks/xan-MOZFJGMY.js +0 -2
  459. package/dist/bin/chunks/xan-view-5SZBYPLG.js +0 -2
  460. package/dist/bin/chunks/xargs-SCYIFXOW.js +0 -2
  461. package/dist/bin/chunks/yq-Q47JUWL6.js +0 -2
  462. package/dist/bin/shell/chunks/awk2-VTJMI54B.js +0 -2
  463. package/dist/bin/shell/chunks/base64-43M2R3GA.js +0 -2
  464. package/dist/bin/shell/chunks/bash-6ZHZ6BX7.js +0 -2
  465. package/dist/bin/shell/chunks/cat-XZIJZXKP.js +0 -2
  466. package/dist/bin/shell/chunks/chunk-26NO42TF.js +0 -14
  467. package/dist/bin/shell/chunks/chunk-5G2VOPPJ.js +0 -7
  468. package/dist/bin/shell/chunks/chunk-5WFYIUU2.js +0 -3
  469. package/dist/bin/shell/chunks/chunk-AAW7UMPO.js +0 -9
  470. package/dist/bin/shell/chunks/chunk-B3RU2PUI.js +0 -140
  471. package/dist/bin/shell/chunks/chunk-CGE2EHYP.js +0 -5
  472. package/dist/bin/shell/chunks/chunk-CM4532DS.js +0 -36
  473. package/dist/bin/shell/chunks/chunk-CQG2HEAL.js +0 -5
  474. package/dist/bin/shell/chunks/chunk-D64U2VGQ.js +0 -2
  475. package/dist/bin/shell/chunks/chunk-EUXCM6C4.js +0 -12
  476. package/dist/bin/shell/chunks/chunk-F3LGZXLQ.js +0 -9
  477. package/dist/bin/shell/chunks/chunk-FA2CHD73.js +0 -16
  478. package/dist/bin/shell/chunks/chunk-FLPVVSN5.js +0 -5
  479. package/dist/bin/shell/chunks/chunk-FSZWFMB4.js +0 -16
  480. package/dist/bin/shell/chunks/chunk-G43H2WGH.js +0 -17
  481. package/dist/bin/shell/chunks/chunk-GO6FXSC4.js +0 -6
  482. package/dist/bin/shell/chunks/chunk-GZHFXDDO.js +0 -10
  483. package/dist/bin/shell/chunks/chunk-HJEHIH4P.js +0 -33
  484. package/dist/bin/shell/chunks/chunk-JQBC3FXE.js +0 -8
  485. package/dist/bin/shell/chunks/chunk-L2JBII6Z.js +0 -287
  486. package/dist/bin/shell/chunks/chunk-LGJM5YFT.js +0 -17
  487. package/dist/bin/shell/chunks/chunk-LMK6G2HH.js +0 -8
  488. package/dist/bin/shell/chunks/chunk-MNMRGJJM.js +0 -11
  489. package/dist/bin/shell/chunks/chunk-MRP4ZCD7.js +0 -6
  490. package/dist/bin/shell/chunks/chunk-MXVNCVD6.js +0 -30
  491. package/dist/bin/shell/chunks/chunk-N5OTVT4F.js +0 -23
  492. package/dist/bin/shell/chunks/chunk-OBI37ZY4.js +0 -9
  493. package/dist/bin/shell/chunks/chunk-P6GNZPVW.js +0 -19
  494. package/dist/bin/shell/chunks/chunk-RJSAGJQJ.js +0 -11
  495. package/dist/bin/shell/chunks/chunk-ROJPSS6N.js +0 -3
  496. package/dist/bin/shell/chunks/chunk-S7OHMN3F.js +0 -6
  497. package/dist/bin/shell/chunks/chunk-VHUYNUT7.js +0 -13
  498. package/dist/bin/shell/chunks/chunk-WS6P4H4S.js +0 -63
  499. package/dist/bin/shell/chunks/chunk-WWZVR5NN.js +0 -6
  500. package/dist/bin/shell/chunks/chunk-YEKSVVRC.js +0 -11
  501. package/dist/bin/shell/chunks/chunk-YFPDB4PH.js +0 -9
  502. package/dist/bin/shell/chunks/chunk-ZA4HUKJ3.js +0 -13
  503. package/dist/bin/shell/chunks/chunk-ZKC5HQYO.js +0 -14
  504. package/dist/bin/shell/chunks/column-XGV32UPN.js +0 -2
  505. package/dist/bin/shell/chunks/comm-R3F3Z5DX.js +0 -2
  506. package/dist/bin/shell/chunks/cut-5EY2XPXX.js +0 -2
  507. package/dist/bin/shell/chunks/diff-LE7GMFZD.js +0 -2
  508. package/dist/bin/shell/chunks/env-NTPN5QYM.js +0 -2
  509. package/dist/bin/shell/chunks/expand-26XPP5KB.js +0 -2
  510. package/dist/bin/shell/chunks/find-GAYRV4IF.js +0 -2
  511. package/dist/bin/shell/chunks/flag-coverage-LBMWMYOO.js +0 -2
  512. package/dist/bin/shell/chunks/fold-XSVNTAWH.js +0 -2
  513. package/dist/bin/shell/chunks/grep-OZJTRD4D.js +0 -2
  514. package/dist/bin/shell/chunks/gzip-LHOO65AN.js +0 -2
  515. package/dist/bin/shell/chunks/head-YMNRW3F3.js +0 -2
  516. package/dist/bin/shell/chunks/html-to-markdown-WVZA3MCP.js +0 -2
  517. package/dist/bin/shell/chunks/join-Y4Q5WVVE.js +0 -2
  518. package/dist/bin/shell/chunks/jq-FIV5Q5T4.js +0 -2
  519. package/dist/bin/shell/chunks/js-exec-DUGJM6RL.js +0 -100
  520. package/dist/bin/shell/chunks/md5sum-NCLXV2S3.js +0 -2
  521. package/dist/bin/shell/chunks/nl-XH3L75DR.js +0 -2
  522. package/dist/bin/shell/chunks/od-52FBC34W.js +0 -2
  523. package/dist/bin/shell/chunks/paste-3UVLMQ2K.js +0 -2
  524. package/dist/bin/shell/chunks/python3-O4VTP6TD.js +0 -12
  525. package/dist/bin/shell/chunks/rev-UHEPS2UL.js +0 -2
  526. package/dist/bin/shell/chunks/rg-C6KMBFNG.js +0 -2
  527. package/dist/bin/shell/chunks/sed-HALRQZKY.js +0 -2
  528. package/dist/bin/shell/chunks/sha1sum-BHNJ5ALF.js +0 -2
  529. package/dist/bin/shell/chunks/sha256sum-HJJ3NJ5L.js +0 -2
  530. package/dist/bin/shell/chunks/sort-7GENYU2I.js +0 -2
  531. package/dist/bin/shell/chunks/split-YWV64TJH.js +0 -2
  532. package/dist/bin/shell/chunks/sqlite3-CVNFMP3Z.js +0 -2
  533. package/dist/bin/shell/chunks/strings-XXKZCWY5.js +0 -2
  534. package/dist/bin/shell/chunks/tac-T42SKDDI.js +0 -2
  535. package/dist/bin/shell/chunks/tail-V537TDFR.js +0 -2
  536. package/dist/bin/shell/chunks/tar-TOWX2TDU.js +0 -2
  537. package/dist/bin/shell/chunks/tee-HK2SYCAR.js +0 -2
  538. package/dist/bin/shell/chunks/time-5R4QWCYF.js +0 -2
  539. package/dist/bin/shell/chunks/timeout-Z24MNWOP.js +0 -2
  540. package/dist/bin/shell/chunks/tr-4FPGAEVB.js +0 -2
  541. package/dist/bin/shell/chunks/unexpand-OYZ7KOYR.js +0 -2
  542. package/dist/bin/shell/chunks/uniq-TMSAIZM3.js +0 -2
  543. package/dist/bin/shell/chunks/wc-ZIV3TFVG.js +0 -2
  544. package/dist/bin/shell/chunks/xan-MOZFJGMY.js +0 -2
  545. package/dist/bin/shell/chunks/xan-view-5SZBYPLG.js +0 -2
  546. package/dist/bin/shell/chunks/xargs-SCYIFXOW.js +0 -2
  547. package/dist/bin/shell/chunks/yq-Q47JUWL6.js +0 -2
  548. package/dist/bundle/chunks/awk2-POPGKRAI.js +0 -1
  549. package/dist/bundle/chunks/base64-4YMZCVJ5.js +0 -1
  550. package/dist/bundle/chunks/bash-IJWYRKFO.js +0 -1
  551. package/dist/bundle/chunks/cat-RDUMLXKC.js +0 -1
  552. package/dist/bundle/chunks/chunk-55VFSPNA.js +0 -2
  553. package/dist/bundle/chunks/chunk-7L36YK2X.js +0 -2
  554. package/dist/bundle/chunks/chunk-A7ICOL4V.js +0 -13
  555. package/dist/bundle/chunks/chunk-B6O2PIY4.js +0 -10
  556. package/dist/bundle/chunks/chunk-CR5AFCPT.js +0 -22
  557. package/dist/bundle/chunks/chunk-D4J545R4.js +0 -11
  558. package/dist/bundle/chunks/chunk-D6CWQ5DW.js +0 -5
  559. package/dist/bundle/chunks/chunk-EIZGF4BS.js +0 -8
  560. package/dist/bundle/chunks/chunk-F55TLFGB.js +0 -9
  561. package/dist/bundle/chunks/chunk-GXVXFKBA.js +0 -5
  562. package/dist/bundle/chunks/chunk-HDQ56CKY.js +0 -15
  563. package/dist/bundle/chunks/chunk-HWBSOZZR.js +0 -35
  564. package/dist/bundle/chunks/chunk-JVPRLUMK.js +0 -7
  565. package/dist/bundle/chunks/chunk-KMEYNNUA.js +0 -15
  566. package/dist/bundle/chunks/chunk-LWEGUNWT.js +0 -7
  567. package/dist/bundle/chunks/chunk-MDLLFABN.js +0 -4
  568. package/dist/bundle/chunks/chunk-MHTUABJP.js +0 -8
  569. package/dist/bundle/chunks/chunk-MYE6AGBJ.js +0 -16
  570. package/dist/bundle/chunks/chunk-NAERJDUW.js +0 -8
  571. package/dist/bundle/chunks/chunk-NYQYO467.js +0 -32
  572. package/dist/bundle/chunks/chunk-PP6PSHAB.js +0 -4
  573. package/dist/bundle/chunks/chunk-PYSFUGCK.js +0 -10
  574. package/dist/bundle/chunks/chunk-QCDB2VPH.js +0 -6
  575. package/dist/bundle/chunks/chunk-SDNKECQQ.js +0 -5
  576. package/dist/bundle/chunks/chunk-TLSUDHID.js +0 -6
  577. package/dist/bundle/chunks/chunk-TOMNU26N.js +0 -4
  578. package/dist/bundle/chunks/chunk-TXBZCHCQ.js +0 -5
  579. package/dist/bundle/chunks/chunk-UNYNJIFU.js +0 -139
  580. package/dist/bundle/chunks/chunk-VJFXDYWH.js +0 -10
  581. package/dist/bundle/chunks/chunk-VLGZJRPG.js +0 -16
  582. package/dist/bundle/chunks/chunk-VYOJP4TV.js +0 -13
  583. package/dist/bundle/chunks/chunk-WKFATFPP.js +0 -4
  584. package/dist/bundle/chunks/chunk-XHM67O4N.js +0 -1
  585. package/dist/bundle/chunks/chunk-XORM457F.js +0 -286
  586. package/dist/bundle/chunks/chunk-YCFVLTST.js +0 -12
  587. package/dist/bundle/chunks/chunk-YS3AZT3J.js +0 -8
  588. package/dist/bundle/chunks/chunk-Z7JVV2SM.js +0 -12
  589. package/dist/bundle/chunks/chunk-ZXL7TQLN.js +0 -62
  590. package/dist/bundle/chunks/column-WLPMMSTS.js +0 -1
  591. package/dist/bundle/chunks/comm-5SLSESQG.js +0 -1
  592. package/dist/bundle/chunks/cut-OPC3VAGB.js +0 -1
  593. package/dist/bundle/chunks/diff-HJF2MPDN.js +0 -1
  594. package/dist/bundle/chunks/env-5EPCWSXR.js +0 -1
  595. package/dist/bundle/chunks/expand-DTNXU4LQ.js +0 -1
  596. package/dist/bundle/chunks/find-TPUOAIUQ.js +0 -1
  597. package/dist/bundle/chunks/flag-coverage-LMTH7T5F.js +0 -1
  598. package/dist/bundle/chunks/fold-LDSORVYE.js +0 -1
  599. package/dist/bundle/chunks/grep-3AIAIJVR.js +0 -1
  600. package/dist/bundle/chunks/gzip-AQXSGOVS.js +0 -1
  601. package/dist/bundle/chunks/head-HT2B6D2J.js +0 -1
  602. package/dist/bundle/chunks/html-to-markdown-TFCECAGV.js +0 -1
  603. package/dist/bundle/chunks/join-GG2LDHE5.js +0 -1
  604. package/dist/bundle/chunks/jq-ODXZBPLY.js +0 -1
  605. package/dist/bundle/chunks/js-exec-LSIPMWTQ.js +0 -99
  606. package/dist/bundle/chunks/md5sum-INMIK4DX.js +0 -1
  607. package/dist/bundle/chunks/nl-U5YJDM32.js +0 -1
  608. package/dist/bundle/chunks/od-VJEF2UR5.js +0 -1
  609. package/dist/bundle/chunks/paste-7N6AFSDS.js +0 -1
  610. package/dist/bundle/chunks/python3-5F2XPEW4.js +0 -11
  611. package/dist/bundle/chunks/rev-XOSYPP45.js +0 -1
  612. package/dist/bundle/chunks/rg-FOQSCCX3.js +0 -1
  613. package/dist/bundle/chunks/sed-VFTTATXJ.js +0 -1
  614. package/dist/bundle/chunks/sha1sum-VJPNLNU6.js +0 -1
  615. package/dist/bundle/chunks/sha256sum-PI32XWXY.js +0 -1
  616. package/dist/bundle/chunks/sort-DCNRDA7U.js +0 -1
  617. package/dist/bundle/chunks/split-SITCSYCZ.js +0 -1
  618. package/dist/bundle/chunks/sqlite3-56UMWEY3.js +0 -1
  619. package/dist/bundle/chunks/strings-7PLOGTPD.js +0 -1
  620. package/dist/bundle/chunks/tac-SJGXQ4T2.js +0 -1
  621. package/dist/bundle/chunks/tail-S5ULNTJU.js +0 -1
  622. package/dist/bundle/chunks/tar-232RCEFK.js +0 -1
  623. package/dist/bundle/chunks/tee-O7VXZDCO.js +0 -1
  624. package/dist/bundle/chunks/time-DEUO3QV2.js +0 -1
  625. package/dist/bundle/chunks/timeout-VRKMCG72.js +0 -1
  626. package/dist/bundle/chunks/tr-2HXZRDSW.js +0 -1
  627. package/dist/bundle/chunks/unexpand-RGTMIGZM.js +0 -1
  628. package/dist/bundle/chunks/uniq-SUNANL47.js +0 -1
  629. package/dist/bundle/chunks/wc-TQB3VNOX.js +0 -1
  630. package/dist/bundle/chunks/xan-BXDXYEIB.js +0 -1
  631. package/dist/bundle/chunks/xan-view-ECQUO7AJ.js +0 -1
  632. package/dist/bundle/chunks/xargs-I6EZUCYF.js +0 -1
  633. package/dist/bundle/chunks/yq-MJMAR36V.js +0 -1
  634. package/dist/commands/js-exec/executor-adapter.d.ts +0 -66
  635. package/dist/executor-init.d.ts +0 -19
  636. package/vendor/executor/executor-sdk-bundle.d.mts +0 -18
  637. package/vendor/executor/executor-sdk-bundle.mjs +0 -512
  638. package/vendor/executor/openapi-extractor-wasm/openapi_extractor_bg.wasm +0 -0
  639. /package/dist/bin/chunks/{chunk-QSDVMMYI.js → chunk-4CFAYBLV.js} +0 -0
  640. /package/dist/bin/chunks/{chunk-ND23BJUM.js → chunk-LCDPWJBA.js} +0 -0
  641. /package/dist/bin/shell/chunks/{chunk-QSDVMMYI.js → chunk-4CFAYBLV.js} +0 -0
  642. /package/dist/bin/shell/chunks/{chunk-ND23BJUM.js → chunk-LCDPWJBA.js} +0 -0
  643. /package/dist/bundle/chunks/{chunk-SYMJJMQ4.js → chunk-PXTK5WE2.js} +0 -0
@@ -1,17 +0,0 @@
1
- #!/usr/bin/env node
2
- import{a,b as d,c as h}from"./chunk-GTNBSMZR.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, ..."]},p=1e5;function m(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 o=(l[2]||"").toUpperCase(),u=new Map([["",1],["K",1024],["M",1024*1024],["G",1024*1024*1024],["T",1024*1024*1024*1024],["P",1024*1024*1024*1024*1024]]).get(o);return u===void 0?null:e*u}function y(s,l,e){if(l)return s.toString().padStart(e,"0");let o="abcdefghijklmnopqrstuvwxyz",t="",u=s;for(let r=0;r<e;r++)t=o[u%26]+t,u=Math.floor(u/26);return t}function g(s,l){let e=s.split(`
3
- `),o=s.endsWith(`
4
- `)&&e[e.length-1]==="";o&&e.pop();let t=[];for(let u=0;u<e.length;u+=l){let r=e.slice(u,u+l),c=u+l>=e.length&&!o?r.join(`
5
- `):`${r.join(`
6
- `)}
7
- `;t.push({content:c,hasContent:!0})}return t}function C(s,l){let o=new TextEncoder().encode(s),t=new TextDecoder,u=[];for(let r=0;r<o.length;r+=l){let f=o.slice(r,r+l);u.push({content:t.decode(f),hasContent:f.length>0})}return u}function S(s,l){let o=new TextEncoder().encode(s),t=new TextDecoder,u=[],r=Math.ceil(o.length/l);for(let f=0;f<l;f++){let c=f*r,i=Math.min(c+r,o.length),n=o.slice(c,i);u.push({content:t.decode(n),hasContent:n.length>0})}return u}var I={name:"split",execute:async(s,l)=>{if(d(s))return a(k);let e={mode:"lines",lines:1e3,bytes:0,chunks:0,useNumericSuffix:!1,suffixLength:2,additionalSuffix:""},o=[],t=0;for(;t<s.length;){let i=s[t];if(i==="-l"&&t+1<s.length){let n=Number.parseInt(s[t+1],10);if(Number.isNaN(n)||n<1)return{exitCode:1,stdout:"",stderr:`split: invalid number of lines: '${s[t+1]}'
8
- `};e.mode="lines",e.lines=n,t+=2}else if(i.match(/^-l\d+$/)){let n=Number.parseInt(i.slice(2),10);if(Number.isNaN(n)||n<1)return{exitCode:1,stdout:"",stderr:`split: invalid number of lines: '${i.slice(2)}'
9
- `};e.mode="lines",e.lines=n,t++}else if(i==="-b"&&t+1<s.length){let n=m(s[t+1]);if(n===null)return{exitCode:1,stdout:"",stderr:`split: invalid number of bytes: '${s[t+1]}'
10
- `};e.mode="bytes",e.bytes=n,t+=2}else if(i.match(/^-b.+$/)){let n=m(i.slice(2));if(n===null)return{exitCode:1,stdout:"",stderr:`split: invalid number of bytes: '${i.slice(2)}'
11
- `};e.mode="bytes",e.bytes=n,t++}else if(i==="-n"&&t+1<s.length){let n=Number.parseInt(s[t+1],10);if(Number.isNaN(n)||n<1)return{exitCode:1,stdout:"",stderr:`split: invalid number of chunks: '${s[t+1]}'
12
- `};e.mode="chunks",e.chunks=n,t+=2}else if(i.match(/^-n\d+$/)){let n=Number.parseInt(i.slice(2),10);if(Number.isNaN(n)||n<1)return{exitCode:1,stdout:"",stderr:`split: invalid number of chunks: '${i.slice(2)}'
13
- `};e.mode="chunks",e.chunks=n,t++}else if(i==="-a"&&t+1<s.length){let n=Number.parseInt(s[t+1],10);if(Number.isNaN(n)||n<1)return{exitCode:1,stdout:"",stderr:`split: invalid suffix length: '${s[t+1]}'
14
- `};e.suffixLength=n,t+=2}else if(i.match(/^-a\d+$/)){let n=Number.parseInt(i.slice(2),10);if(Number.isNaN(n)||n<1)return{exitCode:1,stdout:"",stderr:`split: invalid suffix length: '${i.slice(2)}'
15
- `};e.suffixLength=n,t++}else if(i==="-d"||i==="--numeric-suffixes")e.useNumericSuffix=!0,t++;else if(i.startsWith("--additional-suffix="))e.additionalSuffix=i.slice(20),t++;else if(i==="--additional-suffix"&&t+1<s.length)e.additionalSuffix=s[t+1],t+=2;else if(i==="--"){o.push(...s.slice(t+1));break}else{if(i.startsWith("-")&&i!=="-")return h("split",i);o.push(i),t++}}let u="-",r="x";o.length>=1&&(u=o[0]),o.length>=2&&(r=o[1]);let f;if(u==="-")f=l.stdin??"";else{let i=l.fs.resolvePath(l.cwd,u),n=await l.fs.readFile(i);if(n===null)return{exitCode:1,stdout:"",stderr:`split: ${u}: No such file or directory
16
- `};f=n}if(f==="")return{exitCode:0,stdout:"",stderr:""};let c;switch(e.mode){case"lines":c=g(f,e.lines);break;case"bytes":c=C(f,e.bytes);break;case"chunks":c=S(f,e.chunks);break;default:return e.mode}if(c.length>p)return{exitCode:1,stdout:"",stderr:`split: too many output files (${c.length}), limit is ${p}
17
- `};for(let i=0;i<c.length;i++){let n=c[i];if(!n.hasContent)continue;let x=y(i,e.useNumericSuffix,e.suffixLength),b=`${r}${x}${e.additionalSuffix}`,N=l.fs.resolvePath(l.cwd,b);await l.fs.writeFile(N,n.content)}return{exitCode:0,stdout:"",stderr:""}}},$={name:"split",flags:[{flag:"-l",type:"value",valueHint:"number"},{flag:"-b",type:"value",valueHint:"string"},{flag:"-n",type:"value",valueHint:"number"},{flag:"-d",type:"boolean"},{flag:"-a",type:"value",valueHint:"number"}],needsFiles:!0};export{I as a,$ as b};
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env node
2
- import{a as x}from"./chunk-JBABAK44.js";import{a as b,b as F}from"./chunk-GTNBSMZR.js";var v={name:"column",summary:"columnate lists",usage:"column [OPTION]... [FILE]...",description:"Format input into multiple columns. By default, fills rows first. Use -t to create a table based on whitespace-delimited input.",options:["-t Create a table (determine columns from input)","-s SEP Input field delimiter (default: whitespace)","-o SEP Output field delimiter (default: two spaces)","-c WIDTH Output width for fill mode (default: 80)","-n Don't merge multiple adjacent delimiters"],examples:["ls | column # Fill columns with ls output","cat data | column -t # Format as table","column -t -s ',' file # Format CSV as table","column -c 40 file # Fill 40-char wide columns"]},H={table:{short:"t",long:"table",type:"boolean"},separator:{short:"s",type:"string"},outputSep:{short:"o",type:"string"},width:{short:"c",type:"number",default:80},noMerge:{short:"n",type:"boolean"}};function C(t,e,l){return e?l?t.split(e):t.split(e).filter(n=>n.length>0):l?t.split(/[ \t]/):t.split(/[ \t]+/).filter(n=>n.length>0)}function I(t){let e=[];for(let l of t)for(let n=0;n<l.length;n++){let o=l[n].length;(e[n]===void 0||o>e[n])&&(e[n]=o)}return e}function W(t,e){if(t.length===0)return"";let l=I(t),n=[];for(let o of t){let c=[];for(let s=0;s<o.length;s++)s===o.length-1?c.push(o[s]):c.push(o[s].padEnd(l[s]));n.push(c.join(e))}return n.join(`
3
- `)}function j(t,e,l){if(t.length===0)return"";let n=Math.max(...t.map(a=>a.length)),o=l.length,c=n+o,s=Math.max(1,Math.floor((e+o)/c)),p=Math.ceil(t.length/s),d=[];for(let a=0;a<p;a++){let i=[];for(let r=0;r<s;r++){let m=r*p+a;m<t.length&&(r===s-1||(r+1)*p+a>=t.length?i.push(t[m]):i.push(t[m].padEnd(n)))}d.push(i.join(l))}return d.join(`
4
- `)}var M={name:"column",execute:async(t,e)=>{if(F(t))return b(v);let l=x("column",t,H);if(!l.ok)return l.error;let{table:n,separator:o,outputSep:c,width:s,noMerge:p}=l.result.flags,d=l.result.positional,a=c??" ",i;if(d.length===0)i=e.stdin??"";else{let u=[];for(let f of d)if(f==="-")u.push(e.stdin??"");else{let w=e.fs.resolvePath(e.cwd,f),y=await e.fs.readFile(w);if(y===null)return{exitCode:1,stdout:"",stderr:`column: ${f}: No such file or directory
5
- `};u.push(y)}i=u.join("")}if(i===""||i.trim()==="")return{exitCode:0,stdout:"",stderr:""};let r=i.split(`
6
- `);i.endsWith(`
7
- `)&&r[r.length-1]===""&&r.pop();let g=r.filter(u=>u.trim().length>0),h;if(n){let u=g.map(f=>C(f,o,p));h=W(u,a)}else{let u=[];for(let f of g){let w=C(f,o,p);u.push(...w)}h=j(u,s,a)}return h.length>0&&(h+=`
8
- `),{exitCode:0,stdout:h,stderr:""}}},P={name:"column",flags:[{flag:"-t",type:"boolean"},{flag:"-s",type:"value",valueHint:"delimiter"},{flag:"-o",type:"value",valueHint:"string"},{flag:"-c",type:"value",valueHint:"number"},{flag:"-n",type:"boolean"}],stdinType:"text",needsFiles:!0};export{M as a,P as b};
@@ -1,11 +0,0 @@
1
- #!/usr/bin/env node
2
- import{a as F}from"./chunk-4OALHZXB.js";import{a as w,b as h}from"./chunk-LIYVQA3X.js";import{a as T,b as g}from"./chunk-OOJCYVYF.js";import{a as m}from"./chunk-RLNOQILG.js";var n={NOOP:0,READ_FILE:1,WRITE_FILE:2,STAT:3,READDIR:4,MKDIR:5,RM:6,EXISTS:7,APPEND_FILE:8,SYMLINK:9,READLINK:10,LSTAT:11,CHMOD:12,REALPATH:13,RENAME:14,COPY_FILE:15,WRITE_STDOUT:100,WRITE_STDERR:101,EXIT:102,HTTP_REQUEST:200,EXEC_COMMAND:300,INVOKE_TOOL:400},r={PENDING:0,READY:1,SUCCESS:2,ERROR:3},l={NONE:0,NOT_FOUND:1,IS_DIRECTORY:2,NOT_DIRECTORY:3,EXISTS:4,PERMISSION_DENIED:5,INVALID_PATH:6,IO_ERROR:7,TIMEOUT:8,NETWORK_ERROR:9,NETWORK_NOT_CONFIGURED:10},o={OP_CODE:0,STATUS:4,PATH_LENGTH:8,DATA_LENGTH:12,RESULT_LENGTH:16,ERROR_CODE:20,FLAGS:24,MODE:28,PATH_BUFFER:32,DATA_BUFFER:4128},p={CONTROL_REGION:32,PATH_BUFFER:4096,DATA_BUFFER:1048576,TOTAL:1052704},S={NONE:0,RECURSIVE:1,FORCE:2,MKDIR_RECURSIVE:1},u={IS_FILE:0,IS_DIRECTORY:1,IS_SYMLINK:2,MODE:4,SIZE:8,MTIME:16,TOTAL:24};function _(){return new w(p.TOTAL)}var R=class{int32View;uint8View;dataView;constructor(t){this.int32View=new Int32Array(t),this.uint8View=new Uint8Array(t),this.dataView=new DataView(t)}getOpCode(){return h.load(this.int32View,o.OP_CODE/4)}setOpCode(t){h.store(this.int32View,o.OP_CODE/4,t)}getStatus(){return h.load(this.int32View,o.STATUS/4)}setStatus(t){h.store(this.int32View,o.STATUS/4,t)}getPathLength(){return h.load(this.int32View,o.PATH_LENGTH/4)}setPathLength(t){h.store(this.int32View,o.PATH_LENGTH/4,t)}getDataLength(){return h.load(this.int32View,o.DATA_LENGTH/4)}setDataLength(t){h.store(this.int32View,o.DATA_LENGTH/4,t)}getResultLength(){return h.load(this.int32View,o.RESULT_LENGTH/4)}setResultLength(t){h.store(this.int32View,o.RESULT_LENGTH/4,t)}getErrorCode(){return h.load(this.int32View,o.ERROR_CODE/4)}setErrorCode(t){h.store(this.int32View,o.ERROR_CODE/4,t)}getFlags(){return h.load(this.int32View,o.FLAGS/4)}setFlags(t){h.store(this.int32View,o.FLAGS/4,t)}getMode(){return h.load(this.int32View,o.MODE/4)}setMode(t){h.store(this.int32View,o.MODE/4,t)}getPath(){let t=this.getPathLength(),e=this.uint8View.slice(o.PATH_BUFFER,o.PATH_BUFFER+t);return new TextDecoder().decode(e)}setPath(t){let e=new TextEncoder().encode(t);if(e.length>p.PATH_BUFFER)throw new Error(`Path too long: ${e.length} > ${p.PATH_BUFFER}`);this.uint8View.set(e,o.PATH_BUFFER),this.setPathLength(e.length)}getData(){let t=this.getDataLength();return this.uint8View.slice(o.DATA_BUFFER,o.DATA_BUFFER+t)}setData(t){if(t.length>p.DATA_BUFFER)throw new Error(`Data too large: ${t.length} > ${p.DATA_BUFFER}`);this.uint8View.set(t,o.DATA_BUFFER),this.setDataLength(t.length)}getDataAsString(){let t=this.getData();return new TextDecoder().decode(t)}setDataFromString(t){let e=new TextEncoder().encode(t);this.setData(e)}getResult(){let t=this.getResultLength();return this.uint8View.slice(o.DATA_BUFFER,o.DATA_BUFFER+t)}setResult(t){if(t.length>p.DATA_BUFFER)throw new Error(`Result too large: ${t.length} > ${p.DATA_BUFFER}`);this.uint8View.set(t,o.DATA_BUFFER),this.setResultLength(t.length)}getResultAsString(){let t=this.getResult();return new TextDecoder().decode(t)}setResultFromString(t){let e=new TextEncoder().encode(t);this.setResult(e)}encodeStat(t){this.uint8View[o.DATA_BUFFER+u.IS_FILE]=t.isFile?1:0,this.uint8View[o.DATA_BUFFER+u.IS_DIRECTORY]=t.isDirectory?1:0,this.uint8View[o.DATA_BUFFER+u.IS_SYMLINK]=t.isSymbolicLink?1:0,this.dataView.setInt32(o.DATA_BUFFER+u.MODE,t.mode,!0);let e=Math.min(t.size,Number.MAX_SAFE_INTEGER);this.dataView.setFloat64(o.DATA_BUFFER+u.SIZE,e,!0),this.dataView.setFloat64(o.DATA_BUFFER+u.MTIME,t.mtime.getTime(),!0),this.setResultLength(u.TOTAL)}decodeStat(){return{isFile:this.uint8View[o.DATA_BUFFER+u.IS_FILE]===1,isDirectory:this.uint8View[o.DATA_BUFFER+u.IS_DIRECTORY]===1,isSymbolicLink:this.uint8View[o.DATA_BUFFER+u.IS_SYMLINK]===1,mode:this.dataView.getInt32(o.DATA_BUFFER+u.MODE,!0),size:this.dataView.getFloat64(o.DATA_BUFFER+u.SIZE,!0),mtime:new Date(this.dataView.getFloat64(o.DATA_BUFFER+u.MTIME,!0))}}waitForReady(t){return h.wait(this.int32View,o.STATUS/4,r.PENDING,t)}waitForReadyAsync(t){return h.waitAsync(this.int32View,o.STATUS/4,r.PENDING,t)}async waitUntilReady(t){let e=Date.now();for(;;){let a=this.getStatus();if(a===r.READY)return!0;let s=Date.now()-e;if(s>=t)return!1;let i=t-s,c=h.waitAsync(this.int32View,o.STATUS/4,a,i);if(c.async&&await c.value==="timed-out")return!1}}waitForResult(t){return h.wait(this.int32View,o.STATUS/4,r.READY,t)}notify(){return h.notify(this.int32View,o.STATUS/4)}reset(){this.setOpCode(n.NOOP),this.setStatus(r.PENDING),this.setPathLength(0),this.setDataLength(0),this.setResultLength(0),this.setErrorCode(l.NONE),this.setFlags(S.NONE),this.setMode(0)}};var O=class{fs;cwd;commandName;secureFetch;maxOutputSize;exec;invokeTool;protocol;running=!1;output={stdout:"",stderr:"",exitCode:0};outputLimitExceeded=!1;startTime=0;timeoutMs=0;constructor(t,e,a,s,i=void 0,c=0,d=void 0,E=void 0){this.fs=e,this.cwd=a,this.commandName=s,this.secureFetch=i,this.maxOutputSize=c,this.exec=d,this.invokeTool=E,this.protocol=new R(t)}remainingMs(){return Math.max(0,this.timeoutMs-(Date.now()-this.startTime))}raceDeadline(t){let e=this.remainingMs();if(e<=0)return this.running=!1,this.output.exitCode=124,this.output.stderr+=`
3
- ${this.commandName}: execution timeout exceeded
4
- `,Promise.reject(new Error("Operation timed out"));let a=t();return new Promise((s,i)=>{let c=T(()=>{this.running=!1,this.output.exitCode=124,this.output.stderr+=`
5
- ${this.commandName}: execution timeout exceeded
6
- `,i(new Error("Operation timed out"))},e);a.then(d=>{g(c),s(d)},d=>{g(c),i(d)})})}async run(t){for(this.running=!0,this.startTime=Date.now(),this.timeoutMs=t;this.running;){if(Date.now()-this.startTime>=t){this.output.stderr+=`
7
- ${this.commandName}: execution timeout exceeded
8
- `,this.output.exitCode=124;break}let a=this.remainingMs();if(!await this.protocol.waitUntilReady(a)){this.output.stderr+=`
9
- ${this.commandName}: execution timeout exceeded
10
- `,this.output.exitCode=124;break}let i=this.protocol.getOpCode();await this.handleOperation(i),this.protocol.notify()}return this.output}stop(){this.running=!1}async handleOperation(t){try{switch(t){case n.READ_FILE:await this.handleReadFile();break;case n.WRITE_FILE:await this.handleWriteFile();break;case n.STAT:await this.handleStat();break;case n.LSTAT:await this.handleLstat();break;case n.READDIR:await this.handleReaddir();break;case n.MKDIR:await this.handleMkdir();break;case n.RM:await this.handleRm();break;case n.EXISTS:await this.handleExists();break;case n.APPEND_FILE:await this.handleAppendFile();break;case n.SYMLINK:await this.handleSymlink();break;case n.READLINK:await this.handleReadlink();break;case n.CHMOD:await this.handleChmod();break;case n.REALPATH:await this.handleRealpath();break;case n.RENAME:await this.handleRename();break;case n.COPY_FILE:await this.handleCopyFile();break;case n.WRITE_STDOUT:this.handleWriteStdout();break;case n.WRITE_STDERR:this.handleWriteStderr();break;case n.EXIT:this.handleExit();break;case n.HTTP_REQUEST:await this.handleHttpRequest();break;case n.EXEC_COMMAND:await this.handleExecCommand();break;case n.INVOKE_TOOL:await this.handleInvokeTool();break;default:this.protocol.setErrorCode(l.IO_ERROR),this.protocol.setStatus(r.ERROR)}}catch(e){this.setErrorFromException(e)}}resolvePath(t){return this.fs.resolvePath(this.cwd,t)}async handleReadFile(){let t=this.resolvePath(this.protocol.getPath());try{let e=await this.fs.readFileBuffer(t);this.protocol.setResult(e),this.protocol.setStatus(r.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleWriteFile(){let t=this.resolvePath(this.protocol.getPath()),e=this.protocol.getData();try{await this.fs.writeFile(t,e),this.protocol.setStatus(r.SUCCESS)}catch(a){this.setErrorFromException(a)}}async handleStat(){let t=this.resolvePath(this.protocol.getPath());try{let e=await this.fs.stat(t);this.protocol.encodeStat(e),this.protocol.setStatus(r.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleLstat(){let t=this.resolvePath(this.protocol.getPath());try{let e=await this.fs.lstat(t);this.protocol.encodeStat(e),this.protocol.setStatus(r.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleReaddir(){let t=this.resolvePath(this.protocol.getPath());try{let e=await this.fs.readdir(t);this.protocol.setResultFromString(JSON.stringify(e)),this.protocol.setStatus(r.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleMkdir(){let t=this.resolvePath(this.protocol.getPath()),a=(this.protocol.getFlags()&S.MKDIR_RECURSIVE)!==0;try{await this.fs.mkdir(t,{recursive:a}),this.protocol.setStatus(r.SUCCESS)}catch(s){this.setErrorFromException(s)}}async handleRm(){let t=this.resolvePath(this.protocol.getPath()),e=this.protocol.getFlags(),a=(e&S.RECURSIVE)!==0,s=(e&S.FORCE)!==0;try{await this.fs.rm(t,{recursive:a,force:s}),this.protocol.setStatus(r.SUCCESS)}catch(i){this.setErrorFromException(i)}}async handleExists(){let t=this.resolvePath(this.protocol.getPath());try{let e=await this.fs.exists(t);this.protocol.setResult(new Uint8Array([e?1:0])),this.protocol.setStatus(r.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleAppendFile(){let t=this.resolvePath(this.protocol.getPath()),e=this.protocol.getData();try{await this.fs.appendFile(t,e),this.protocol.setStatus(r.SUCCESS)}catch(a){this.setErrorFromException(a)}}async handleSymlink(){let t=this.protocol.getPath(),e=this.protocol.getDataAsString(),a=this.resolvePath(t);try{await this.fs.symlink(e,a),this.protocol.setStatus(r.SUCCESS)}catch(s){this.setErrorFromException(s)}}async handleReadlink(){let t=this.resolvePath(this.protocol.getPath());try{let e=await this.fs.readlink(t);this.protocol.setResultFromString(e),this.protocol.setStatus(r.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleChmod(){let t=this.resolvePath(this.protocol.getPath()),e=this.protocol.getMode();try{await this.fs.chmod(t,e),this.protocol.setStatus(r.SUCCESS)}catch(a){this.setErrorFromException(a)}}async handleRealpath(){let t=this.resolvePath(this.protocol.getPath());try{let e=await this.fs.realpath(t);this.protocol.setResultFromString(e),this.protocol.setStatus(r.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleRename(){let t=this.resolvePath(this.protocol.getPath()),e=this.resolvePath(this.protocol.getDataAsString());try{await this.fs.mv(t,e),this.protocol.setStatus(r.SUCCESS)}catch(a){this.setErrorFromException(a)}}async handleCopyFile(){let t=this.resolvePath(this.protocol.getPath()),e=this.resolvePath(this.protocol.getDataAsString());try{await this.fs.cp(t,e),this.protocol.setStatus(r.SUCCESS)}catch(a){this.setErrorFromException(a)}}handleWriteStdout(){let t=this.protocol.getDataAsString();if(!this.tryAppendOutput("stdout",t)){this.outputLimitExceeded=!0,this.output.exitCode=1,this.appendOutputLimitError(),this.protocol.setErrorCode(l.IO_ERROR),this.protocol.setResultFromString("Output size limit exceeded"),this.protocol.setStatus(r.ERROR);return}this.protocol.setStatus(r.SUCCESS)}handleWriteStderr(){let t=this.protocol.getDataAsString();if(!this.tryAppendOutput("stderr",t)){this.outputLimitExceeded=!0,this.output.exitCode=1,this.appendOutputLimitError(),this.protocol.setErrorCode(l.IO_ERROR),this.protocol.setResultFromString("Output size limit exceeded"),this.protocol.setStatus(r.ERROR);return}this.protocol.setStatus(r.SUCCESS)}handleExit(){let t=this.protocol.getFlags();this.outputLimitExceeded?this.output.exitCode===0&&(this.output.exitCode=1):this.output.exitCode=t,this.protocol.setStatus(r.SUCCESS),this.running=!1}tryAppendOutput(t,e){return this.outputLimitExceeded?!1:this.maxOutputSize<=0?(t==="stdout"?this.output.stdout+=e:this.output.stderr+=e,!0):this.output.stdout.length+this.output.stderr.length+e.length>this.maxOutputSize?!1:(t==="stdout"?this.output.stdout+=e:this.output.stderr+=e,!0)}appendOutputLimitError(){if(this.maxOutputSize<=0)return;let t=`${this.commandName}: total output size exceeded (>${this.maxOutputSize} bytes), increase executionLimits.maxOutputSize
11
- `,e=t.length>this.maxOutputSize?t.slice(0,this.maxOutputSize):t;if(this.output.stderr.includes("total output size exceeded"))return;let s=this.output.stdout.length+this.output.stderr.length+e.length-this.maxOutputSize;if(s>0)if(this.output.stdout.length>=s)this.output.stdout=this.output.stdout.slice(0,this.output.stdout.length-s);else{let i=s-this.output.stdout.length;this.output.stdout="",i>=this.output.stderr.length?this.output.stderr="":this.output.stderr=this.output.stderr.slice(0,this.output.stderr.length-i)}this.output.stderr+=e}async handleHttpRequest(){let t=this.secureFetch;if(!t){this.protocol.setErrorCode(l.NETWORK_NOT_CONFIGURED),this.protocol.setResultFromString("Network access not configured. Enable network in Bash options."),this.protocol.setStatus(r.ERROR);return}let e=this.protocol.getPath(),a=this.protocol.getDataAsString();try{let s=a?JSON.parse(a):{},i=this.remainingMs(),c=await this.raceDeadline(()=>t(e,{method:s.method,headers:s.headers,body:s.body,timeoutMs:i})),d=JSON.stringify({status:c.status,statusText:c.statusText,headers:c.headers,body:c.body,url:c.url});this.protocol.setResultFromString(d),this.protocol.setStatus(r.SUCCESS)}catch(s){let i=m(s instanceof Error?s.message:String(s));this.protocol.setErrorCode(l.NETWORK_ERROR),this.protocol.setResultFromString(i),this.protocol.setStatus(r.ERROR)}}async handleExecCommand(){let t=this.exec;if(!t){this.protocol.setErrorCode(l.IO_ERROR),this.protocol.setResultFromString("Command execution not available in this context."),this.protocol.setStatus(r.ERROR);return}let e=this.protocol.getPath(),a=this.protocol.getDataAsString(),s=new AbortController;try{let i={cwd:this.cwd,signal:s.signal};if(a){let E=JSON.parse(a);E.stdin&&(i.stdin=E.stdin),E.args&&Array.isArray(E.args)&&(i.args=E.args.map(D=>String(D)),e=F([e]))}let c=await this.raceDeadline(()=>t(e,i)),d=JSON.stringify({stdout:c.stdout,stderr:c.stderr,exitCode:c.exitCode});this.protocol.setResultFromString(d),this.protocol.setStatus(r.SUCCESS)}catch(i){s.abort();let c=i instanceof Error?i.message:String(i);this.protocol.setErrorCode(l.IO_ERROR),this.protocol.setResultFromString(c),this.protocol.setStatus(r.ERROR)}}async handleInvokeTool(){let t=this.invokeTool;if(!t){this.protocol.setErrorCode(l.IO_ERROR),this.protocol.setResultFromString("Tool invocation not available in this context."),this.protocol.setStatus(r.ERROR);return}let e=this.protocol.getPath(),a=this.protocol.getDataAsString();try{let s=await this.raceDeadline(()=>t(e,a));this.protocol.setResultFromString(s),this.protocol.setStatus(r.SUCCESS)}catch(s){let i=s instanceof Error?s.message:String(s);this.protocol.setErrorCode(l.IO_ERROR),this.protocol.setResultFromString(i),this.protocol.setStatus(r.ERROR)}}setErrorFromException(t){let e=t instanceof Error?t.message:String(t),a=m(e),s=l.IO_ERROR,i=e.toLowerCase();i.includes("no such file")||i.includes("not found")||i.includes("enoent")?s=l.NOT_FOUND:i.includes("is a directory")||i.includes("eisdir")?s=l.IS_DIRECTORY:i.includes("not a directory")||i.includes("enotdir")?s=l.NOT_DIRECTORY:i.includes("already exists")||i.includes("eexist")?s=l.EXISTS:(i.includes("permission")||i.includes("eperm")||i.includes("eacces"))&&(s=l.PERMISSION_DENIED),this.protocol.setErrorCode(s),this.protocol.setResultFromString(a),this.protocol.setStatus(r.ERROR)}};export{_ as a,O as b};
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env node
2
- import{a as f}from"./chunk-5WFYIUU2.js";import{a as d}from"./chunk-JBABAK44.js";import{a as m,b as p}from"./chunk-GTNBSMZR.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"}},F={name:"cat",async execute(n,s){if(p(n))return m(b);let e=d("cat",n,g);if(!e.ok)return e.error;let r=e.result.flags.number,t=e.result.positional,a=await f(s,t,{cmdName:"cat",allowStdinMarker:!0,stopOnError:!1}),o="",l=1;for(let{content:i}of a.files)if(r){let c=y(i,l);o+=c.content,l=c.nextLineNumber}else o+=i;let u=t.length>0&&t.some(i=>i!=="-");return{stdout:o,stderr:a.stderr,exitCode:a.exitCode,...u?{stdoutEncoding:"binary"}:{}}}};function y(n,s){let e=n.split(`
3
- `),r=n.endsWith(`
4
- `),t=r?e.slice(0,-1):e;return{content:t.map((o,l)=>`${String(s+l).padStart(6," ")} ${o}`).join(`
5
- `)+(r?`
6
- `:""),nextLineNumber:s+t.length}}var w={name:"cat",flags:[{flag:"-n",type:"boolean"},{flag:"-A",type:"boolean"},{flag:"-b",type:"boolean"},{flag:"-s",type:"boolean"},{flag:"-v",type:"boolean"},{flag:"-e",type:"boolean"},{flag:"-t",type:"boolean"}],stdinType:"text",needsFiles:!0};export{F as a,w as b};
@@ -1,30 +0,0 @@
1
- #!/usr/bin/env node
2
- import{a as K}from"./chunk-JBABAK44.js";import{a as U,b as Z}from"./chunk-GTNBSMZR.js";var B=(n,t,e)=>{let s=n instanceof RegExp?V(n,e):n,r=t instanceof RegExp?V(t,e):t,i=s!==null&&r!=null&&$t(s,r,e);return i&&{start:i[0],end:i[1],pre:e.slice(0,i[0]),body:e.slice(i[0]+s.length,i[1]),post:e.slice(i[1]+r.length)}},V=(n,t)=>{let e=t.match(n);return e?e[0]:null},$t=(n,t,e)=>{let s,r,i,o,c,h=e.indexOf(n),u=e.indexOf(t,h+1),l=h;if(h>=0&&u>0){if(n===t)return[h,u];for(s=[],i=e.length;l>=0&&!c;){if(l===h)s.push(l),h=e.indexOf(n,l+1);else if(s.length===1){let m=s.pop();m!==void 0&&(c=[m,u])}else r=s.pop(),r!==void 0&&r<i&&(i=r,o=u),u=e.indexOf(t,l+1);l=h<u&&h>=0?h:u}s.length&&o!==void 0&&(c=[i,o])}return c};var X="\0SLASH"+Math.random()+"\0",Y="\0OPEN"+Math.random()+"\0",q="\0CLOSE"+Math.random()+"\0",Q="\0COMMA"+Math.random()+"\0",tt="\0PERIOD"+Math.random()+"\0",xt=new RegExp(X,"g"),bt=new RegExp(Y,"g"),Et=new RegExp(q,"g"),At=new RegExp(Q,"g"),Pt=new RegExp(tt,"g"),Tt=/\\\\/g,vt=/\\{/g,Mt=/\\}/g,Nt=/\\,/g,Ot=/\\./g;function _(n){return isNaN(n)?n.charCodeAt(0):parseInt(n,10)}function Ct(n){return n.replace(Tt,X).replace(vt,Y).replace(Mt,q).replace(Nt,Q).replace(Ot,tt)}function zt(n){return n.replace(xt,"\\").replace(bt,"{").replace(Et,"}").replace(At,",").replace(Pt,".")}function et(n){if(!n)return[""];let t=[],e=B("{","}",n);if(!e)return n.split(",");let{pre:s,body:r,post:i}=e,o=s.split(",");o[o.length-1]+="{"+r+"}";let c=et(i);return i.length&&(o[o.length-1]+=c.shift(),o.push.apply(o,c)),t.push.apply(t,o),t}function st(n){return n?(n.slice(0,2)==="{}"&&(n="\\{\\}"+n.slice(2)),W(Ct(n),!0).map(zt)):[]}function Dt(n){return"{"+n+"}"}function Rt(n){return/^-?0\d/.test(n)}function Wt(n,t){return n<=t}function jt(n,t){return n>=t}function W(n,t){let e=[],s=B("{","}",n);if(!s)return[n];let r=s.pre,i=s.post.length?W(s.post,!1):[""];if(/\$$/.test(s.pre))for(let o=0;o<i.length;o++){let c=r+"{"+s.body+"}"+i[o];e.push(c)}else{let o=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(s.body),c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(s.body),h=o||c,u=s.body.indexOf(",")>=0;if(!h&&!u)return s.post.match(/,(?!,).*\}/)?(n=s.pre+"{"+s.body+q+s.post,W(n)):[n];let l;if(h)l=s.body.split(/\.\./);else if(l=et(s.body),l.length===1&&l[0]!==void 0&&(l=W(l[0],!1).map(Dt),l.length===1))return i.map(p=>s.pre+l[0]+p);let m;if(h&&l[0]!==void 0&&l[1]!==void 0){let p=_(l[0]),a=_(l[1]),d=Math.max(l[0].length,l[1].length),f=l.length===3&&l[2]!==void 0?Math.abs(_(l[2])):1,$=Wt;a<p&&(f*=-1,$=jt);let S=l.some(Rt);m=[];for(let y=p;$(y,a);y+=f){let g;if(c)g=String.fromCharCode(y),g==="\\"&&(g="");else if(g=String(y),S){let w=d-g.length;if(w>0){let b=new Array(w+1).join("0");y<0?g="-"+b+g.slice(1):g=b+g}}m.push(g)}}else{m=[];for(let p=0;p<l.length;p++)m.push.apply(m,W(l[p],!1))}for(let p=0;p<m.length;p++)for(let a=0;a<i.length;a++){let d=r+m[p]+i[a];(!t||h||d)&&e.push(d)}}return e}var j=n=>{if(typeof n!="string")throw new TypeError("invalid pattern");if(n.length>65536)throw new TypeError("pattern is too long")};var Lt={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},L=n=>n.replace(/[[\]\\-]/g,"\\$&"),kt=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),nt=n=>n.join(""),it=(n,t)=>{let e=t;if(n.charAt(e)!=="[")throw new Error("not in a brace expression");let s=[],r=[],i=e+1,o=!1,c=!1,h=!1,u=!1,l=e,m="";t:for(;i<n.length;){let f=n.charAt(i);if((f==="!"||f==="^")&&i===e+1){u=!0,i++;continue}if(f==="]"&&o&&!h){l=i+1;break}if(o=!0,f==="\\"&&!h){h=!0,i++;continue}if(f==="["&&!h){for(let[$,[x,S,y]]of Object.entries(Lt))if(n.startsWith($,i)){if(m)return["$.",!1,n.length-e,!0];i+=$.length,y?r.push(x):s.push(x),c=c||S;continue t}}if(h=!1,m){f>m?s.push(L(m)+"-"+L(f)):f===m&&s.push(L(f)),m="",i++;continue}if(n.startsWith("-]",i+1)){s.push(L(f+"-")),i+=2;continue}if(n.startsWith("-",i+1)){m=f,i+=2;continue}s.push(L(f)),i++}if(l<i)return["",!1,0,!1];if(!s.length&&!r.length)return["$.",!1,n.length-e,!0];if(r.length===0&&s.length===1&&/^\\?.$/.test(s[0])&&!u){let f=s[0].length===2?s[0].slice(-1):s[0];return[kt(f),!1,l-e,!1]}let p="["+(u?"^":"")+nt(s)+"]",a="["+(u?"":"^")+nt(r)+"]";return[s.length&&r.length?"("+p+"|"+a+")":s.length?p:a,c,l-e,!0]};var N=(n,{windowsPathsNoEscape:t=!1,magicalBraces:e=!0}={})=>e?t?n.replace(/\[([^\/\\])\]/g,"$1"):n.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"):t?n.replace(/\[([^\/\\{}])\]/g,"$1"):n.replace(/((?!\\).|^)\[([^\/\\{}])\]/g,"$1$2").replace(/\\([^\/{}])/g,"$1");var Ft=new Set(["!","?","+","*","@"]),rt=n=>Ft.has(n),Gt="(?!(?:^|/)\\.\\.?(?:$|/))",k="(?!\\.)",Bt=new Set(["[","."]),_t=new Set(["..","."]),qt=new Set("().*{}+?[]^$\\!"),Ht=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),H="[^/]",ot=H+"*?",at=H+"+?",D=class n{type;#s;#n;#r=!1;#t=[];#e;#o;#l;#a=!1;#i;#c;#f=!1;constructor(t,e,s={}){this.type=t,t&&(this.#n=!0),this.#e=e,this.#s=this.#e?this.#e.#s:this,this.#i=this.#s===this?s:this.#s.#i,this.#l=this.#s===this?[]:this.#s.#l,t==="!"&&!this.#s.#a&&this.#l.push(this),this.#o=this.#e?this.#e.#t.length:0}get hasMagic(){if(this.#n!==void 0)return this.#n;for(let t of this.#t)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#n=!0;return this.#n}toString(){return this.#c!==void 0?this.#c:this.type?this.#c=this.type+"("+this.#t.map(t=>String(t)).join("|")+")":this.#c=this.#t.map(t=>String(t)).join("")}#p(){if(this!==this.#s)throw new Error("should only call on root");if(this.#a)return this;this.toString(),this.#a=!0;let t;for(;t=this.#l.pop();){if(t.type!=="!")continue;let e=t,s=e.#e;for(;s;){for(let r=e.#o+1;!s.type&&r<s.#t.length;r++)for(let i of t.#t){if(typeof i=="string")throw new Error("string part in extglob AST??");i.copyIn(s.#t[r])}e=s,s=e.#e}}return this}push(...t){for(let e of t)if(e!==""){if(typeof e!="string"&&!(e instanceof n&&e.#e===this))throw new Error("invalid part: "+e);this.#t.push(e)}}toJSON(){let t=this.type===null?this.#t.slice().map(e=>typeof e=="string"?e:e.toJSON()):[this.type,...this.#t.map(e=>e.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#s||this.#s.#a&&this.#e?.type==="!")&&t.push({}),t}isStart(){if(this.#s===this)return!0;if(!this.#e?.isStart())return!1;if(this.#o===0)return!0;let t=this.#e;for(let e=0;e<this.#o;e++){let s=t.#t[e];if(!(s instanceof n&&s.type==="!"))return!1}return!0}isEnd(){if(this.#s===this||this.#e?.type==="!")return!0;if(!this.#e?.isEnd())return!1;if(!this.type)return this.#e?.isEnd();let t=this.#e?this.#e.#t.length:0;return this.#o===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let e=new n(this.type,t);for(let s of this.#t)e.copyIn(s);return e}static#h(t,e,s,r){let i=!1,o=!1,c=-1,h=!1;if(e.type===null){let a=s,d="";for(;a<t.length;){let f=t.charAt(a++);if(i||f==="\\"){i=!i,d+=f;continue}if(o){a===c+1?(f==="^"||f==="!")&&(h=!0):f==="]"&&!(a===c+2&&h)&&(o=!1),d+=f;continue}else if(f==="["){o=!0,c=a,h=!1,d+=f;continue}if(!r.noext&&rt(f)&&t.charAt(a)==="("){e.push(d),d="";let $=new n(f,e);a=n.#h(t,$,a,r),e.push($);continue}d+=f}return e.push(d),a}let u=s+1,l=new n(null,e),m=[],p="";for(;u<t.length;){let a=t.charAt(u++);if(i||a==="\\"){i=!i,p+=a;continue}if(o){u===c+1?(a==="^"||a==="!")&&(h=!0):a==="]"&&!(u===c+2&&h)&&(o=!1),p+=a;continue}else if(a==="["){o=!0,c=u,h=!1,p+=a;continue}if(rt(a)&&t.charAt(u)==="("){l.push(p),p="";let d=new n(a,l);l.push(d),u=n.#h(t,d,u,r);continue}if(a==="|"){l.push(p),p="",m.push(l),l=new n(null,e);continue}if(a===")")return p===""&&e.#t.length===0&&(e.#f=!0),l.push(p),p="",e.push(...m,l),u;p+=a}return e.type=null,e.#n=void 0,e.#t=[t.substring(s-1)],u}static fromGlob(t,e={}){let s=new n(null,void 0,e);return n.#h(t,s,0,e),s}toMMPattern(){if(this!==this.#s)return this.#s.toMMPattern();let t=this.toString(),[e,s,r,i]=this.toRegExpSource();if(!(r||this.#n||this.#i.nocase&&!this.#i.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return s;let c=(this.#i.nocase?"i":"")+(i?"u":"");return Object.assign(new RegExp(`^${e}$`,c),{_src:e,_glob:t})}get options(){return this.#i}toRegExpSource(t){let e=t??!!this.#i.dot;if(this.#s===this&&this.#p(),!this.type){let h=this.isStart()&&this.isEnd()&&!this.#t.some(a=>typeof a!="string"),u=this.#t.map(a=>{let[d,f,$,x]=typeof a=="string"?n.#d(a,this.#n,h):a.toRegExpSource(t);return this.#n=this.#n||$,this.#r=this.#r||x,d}).join(""),l="";if(this.isStart()&&typeof this.#t[0]=="string"&&!(this.#t.length===1&&_t.has(this.#t[0]))){let d=Bt,f=e&&d.has(u.charAt(0))||u.startsWith("\\.")&&d.has(u.charAt(2))||u.startsWith("\\.\\.")&&d.has(u.charAt(4)),$=!e&&!t&&d.has(u.charAt(0));l=f?Gt:$?k:""}let m="";return this.isEnd()&&this.#s.#a&&this.#e?.type==="!"&&(m="(?:$|\\/)"),[l+u+m,N(u),this.#n=!!this.#n,this.#r]}let s=this.type==="*"||this.type==="+",r=this.type==="!"?"(?:(?!(?:":"(?:",i=this.#u(e);if(this.isStart()&&this.isEnd()&&!i&&this.type!=="!"){let h=this.toString();return this.#t=[h],this.type=null,this.#n=void 0,[h,N(this.toString()),!1,!1]}let o=!s||t||e||!k?"":this.#u(!0);o===i&&(o=""),o&&(i=`(?:${i})(?:${o})*?`);let c="";if(this.type==="!"&&this.#f)c=(this.isStart()&&!e?k:"")+at;else{let h=this.type==="!"?"))"+(this.isStart()&&!e&&!t?k:"")+ot+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;c=r+i+h}return[c,N(i),this.#n=!!this.#n,this.#r]}#u(t){return this.#t.map(e=>{if(typeof e=="string")throw new Error("string type in extglob ast??");let[s,r,i,o]=e.toRegExpSource(t);return this.#r=this.#r||o,s}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join("|")}static#d(t,e,s=!1){let r=!1,i="",o=!1;for(let c=0;c<t.length;c++){let h=t.charAt(c);if(r){r=!1,i+=(qt.has(h)?"\\":"")+h;continue}if(h==="\\"){c===t.length-1?i+="\\\\":r=!0;continue}if(h==="["){let[u,l,m,p]=it(t,c);if(m){i+=u,o=o||l,c+=m-1,e=e||p;continue}}if(h==="*"){i+=s&&t==="*"?at:ot,e=!0;continue}if(h==="?"){i+=H,e=!0;continue}i+=Ht(h)}return[i,N(t),!!e,o]}};var I=(n,{windowsPathsNoEscape:t=!1,magicalBraces:e=!1}={})=>e?t?n.replace(/[?*()[\]{}]/g,"[$&]"):n.replace(/[?*()[\]\\{}]/g,"\\$&"):t?n.replace(/[?*()[\]]/g,"[$&]"):n.replace(/[?*()[\]\\]/g,"\\$&");var A=(n,t,e={})=>(j(t),!e.nocomment&&t.charAt(0)==="#"?!1:new R(t,e).match(n)),It=/^\*+([^+@!?\*\[\(]*)$/,Jt=n=>t=>!t.startsWith(".")&&t.endsWith(n),Ut=n=>t=>t.endsWith(n),Zt=n=>(n=n.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(n)),Kt=n=>(n=n.toLowerCase(),t=>t.toLowerCase().endsWith(n)),Vt=/^\*+\.\*+$/,Xt=n=>!n.startsWith(".")&&n.includes("."),Yt=n=>n!=="."&&n!==".."&&n.includes("."),Qt=/^\.\*+$/,te=n=>n!=="."&&n!==".."&&n.startsWith("."),ee=/^\*+$/,se=n=>n.length!==0&&!n.startsWith("."),ne=n=>n.length!==0&&n!=="."&&n!=="..",ie=/^\?+([^+@!?\*\[\(]*)?$/,re=([n,t=""])=>{let e=ht([n]);return t?(t=t.toLowerCase(),s=>e(s)&&s.toLowerCase().endsWith(t)):e},oe=([n,t=""])=>{let e=ft([n]);return t?(t=t.toLowerCase(),s=>e(s)&&s.toLowerCase().endsWith(t)):e},ae=([n,t=""])=>{let e=ft([n]);return t?s=>e(s)&&s.endsWith(t):e},le=([n,t=""])=>{let e=ht([n]);return t?s=>e(s)&&s.endsWith(t):e},ht=([n])=>{let t=n.length;return e=>e.length===t&&!e.startsWith(".")},ft=([n])=>{let t=n.length;return e=>e.length===t&&e!=="."&&e!==".."},ut=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",lt={win32:{sep:"\\"},posix:{sep:"/"}},ce=ut==="win32"?lt.win32.sep:lt.posix.sep;A.sep=ce;var v=Symbol("globstar **");A.GLOBSTAR=v;var he="[^/]",fe=he+"*?",ue="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",pe="(?:(?!(?:\\/|^)\\.).)*?",de=(n,t={})=>e=>A(e,n,t);A.filter=de;var T=(n,t={})=>Object.assign({},n,t),ge=n=>{if(!n||typeof n!="object"||!Object.keys(n).length)return A;let t=A;return Object.assign((s,r,i={})=>t(s,r,T(n,i)),{Minimatch:class extends t.Minimatch{constructor(r,i={}){super(r,T(n,i))}static defaults(r){return t.defaults(T(n,r)).Minimatch}},AST:class extends t.AST{constructor(r,i,o={}){super(r,i,T(n,o))}static fromGlob(r,i={}){return t.AST.fromGlob(r,T(n,i))}},unescape:(s,r={})=>t.unescape(s,T(n,r)),escape:(s,r={})=>t.escape(s,T(n,r)),filter:(s,r={})=>t.filter(s,T(n,r)),defaults:s=>t.defaults(T(n,s)),makeRe:(s,r={})=>t.makeRe(s,T(n,r)),braceExpand:(s,r={})=>t.braceExpand(s,T(n,r)),match:(s,r,i={})=>t.match(s,r,T(n,i)),sep:t.sep,GLOBSTAR:v})};A.defaults=ge;var pt=(n,t={})=>(j(n),t.nobrace||!/\{(?:(?!\{).)*\}/.test(n)?[n]:st(n));A.braceExpand=pt;var me=(n,t={})=>new R(n,t).makeRe();A.makeRe=me;var ye=(n,t,e={})=>{let s=new R(t,e);return n=n.filter(r=>s.match(r)),s.options.nonull&&!n.length&&n.push(t),n};A.match=ye;var ct=/[?*]|[+@!]\(.*?\)|\[|\]/,we=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),R=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){j(t),e=e||{},this.options=e,this.pattern=t,this.platform=e.platform||ut,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=e.windowsNoMagicRoot!==void 0?e.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let e of t)if(typeof e!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...i)=>console.error(...i)),this.debug(this.pattern,this.globSet);let s=this.globSet.map(i=>this.slashSplit(i));this.globParts=this.preprocess(s),this.debug(this.pattern,this.globParts);let r=this.globParts.map((i,o,c)=>{if(this.isWindows&&this.windowsNoMagicRoot){let h=i[0]===""&&i[1]===""&&(i[2]==="?"||!ct.test(i[2]))&&!ct.test(i[3]),u=/^[a-z]:/i.test(i[0]);if(h)return[...i.slice(0,4),...i.slice(4).map(l=>this.parse(l))];if(u)return[i[0],...i.slice(1).map(l=>this.parse(l))]}return i.map(h=>this.parse(h))});if(this.debug(this.pattern,r),this.set=r.filter(i=>i.indexOf(!1)===-1),this.isWindows)for(let i=0;i<this.set.length;i++){let o=this.set[i];o[0]===""&&o[1]===""&&this.globParts[i][2]==="?"&&typeof o[3]=="string"&&/^[a-z]:$/i.test(o[3])&&(o[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let s=0;s<t.length;s++)for(let r=0;r<t[s].length;r++)t[s][r]==="**"&&(t[s][r]="*");let{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):e>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(e=>{let s=-1;for(;(s=e.indexOf("**",s+1))!==-1;){let r=s;for(;e[r+1]==="**";)r++;r!==s&&e.splice(s,r-s)}return e})}levelOneOptimize(t){return t.map(e=>(e=e.reduce((s,r)=>{let i=s[s.length-1];return r==="**"&&i==="**"?s:r===".."&&i&&i!==".."&&i!=="."&&i!=="**"?(s.pop(),s):(s.push(r),s)},[]),e.length===0?[""]:e))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let r=1;r<t.length-1;r++){let i=t[r];r===1&&i===""&&t[0]===""||(i==="."||i==="")&&(e=!0,t.splice(r,1),r--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(e=!0,t.pop())}let s=0;for(;(s=t.indexOf("..",s+1))!==-1;){let r=t[s-1];r&&r!=="."&&r!==".."&&r!=="**"&&(e=!0,t.splice(s-1,2),s-=2)}}while(e);return t.length===0?[""]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let s of t){let r=-1;for(;(r=s.indexOf("**",r+1))!==-1;){let o=r;for(;s[o+1]==="**";)o++;o>r&&s.splice(r+1,o-r);let c=s[r+1],h=s[r+2],u=s[r+3];if(c!==".."||!h||h==="."||h===".."||!u||u==="."||u==="..")continue;e=!0,s.splice(r,1);let l=s.slice(0);l[r]="**",t.push(l),r--}if(!this.preserveMultipleSlashes){for(let o=1;o<s.length-1;o++){let c=s[o];o===1&&c===""&&s[0]===""||(c==="."||c==="")&&(e=!0,s.splice(o,1),o--)}s[0]==="."&&s.length===2&&(s[1]==="."||s[1]==="")&&(e=!0,s.pop())}let i=0;for(;(i=s.indexOf("..",i+1))!==-1;){let o=s[i-1];if(o&&o!=="."&&o!==".."&&o!=="**"){e=!0;let h=i===1&&s[i+1]==="**"?["."]:[];s.splice(i-1,2,...h),s.length===0&&s.push(""),i-=2}}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let s=e+1;s<t.length;s++){let r=this.partsMatch(t[e],t[s],!this.preserveMultipleSlashes);if(r){t[e]=[],t[s]=r;break}}return t.filter(e=>e.length)}partsMatch(t,e,s=!1){let r=0,i=0,o=[],c="";for(;r<t.length&&i<e.length;)if(t[r]===e[i])o.push(c==="b"?e[i]:t[r]),r++,i++;else if(s&&t[r]==="**"&&e[i]===t[r+1])o.push(t[r]),r++;else if(s&&e[i]==="**"&&t[r]===e[i+1])o.push(e[i]),i++;else if(t[r]==="*"&&e[i]&&(this.options.dot||!e[i].startsWith("."))&&e[i]!=="**"){if(c==="b")return!1;c="a",o.push(t[r]),r++,i++}else if(e[i]==="*"&&t[r]&&(this.options.dot||!t[r].startsWith("."))&&t[r]!=="**"){if(c==="a")return!1;c="b",o.push(e[i]),r++,i++}else return!1;return t.length===e.length&&o}parseNegate(){if(this.nonegate)return;let t=this.pattern,e=!1,s=0;for(let r=0;r<t.length&&t.charAt(r)==="!";r++)e=!e,s++;s&&(this.pattern=t.slice(s)),this.negate=e}matchOne(t,e,s=!1){let r=this.options;if(this.isWindows){let f=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),$=!f&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),x=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),S=!x&&e[0]===""&&e[1]===""&&e[2]==="?"&&typeof e[3]=="string"&&/^[a-z]:$/i.test(e[3]),y=$?3:f?0:void 0,g=S?3:x?0:void 0;if(typeof y=="number"&&typeof g=="number"){let[w,b]=[t[y],e[g]];w.toLowerCase()===b.toLowerCase()&&(e[g]=w,g>y?e=e.slice(g):y>g&&(t=t.slice(y)))}}let{optimizationLevel:i=1}=this.options;i>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var o=0,c=0,h=t.length,u=e.length;o<h&&c<u;o++,c++){this.debug("matchOne loop");var l=e[c],m=t[o];if(this.debug(e,l,m),l===!1)return!1;if(l===v){this.debug("GLOBSTAR",[e,l,m]);var p=o,a=c+1;if(a===u){for(this.debug("** at the end");o<h;o++)if(t[o]==="."||t[o]===".."||!r.dot&&t[o].charAt(0)===".")return!1;return!0}for(;p<h;){var d=t[p];if(this.debug(`
3
- globstar while`,t,p,e,a,d),this.matchOne(t.slice(p),e.slice(a),s))return this.debug("globstar found match!",p,h,d),!0;if(d==="."||d===".."||!r.dot&&d.charAt(0)==="."){this.debug("dot detected!",t,p,e,a);break}this.debug("globstar swallow a segment, and continue"),p++}return!!(s&&(this.debug(`
4
- >>> no match, partial?`,t,p,e,a),p===h))}let f;if(typeof l=="string"?(f=m===l,this.debug("string match",l,m,f)):(f=l.test(m),this.debug("pattern match",l,m,f)),!f)return!1}if(o===h&&c===u)return!0;if(o===h)return s;if(c===u)return o===h-1&&t[o]==="";throw new Error("wtf?")}braceExpand(){return pt(this.pattern,this.options)}parse(t){j(t);let e=this.options;if(t==="**")return v;if(t==="")return"";let s,r=null;(s=t.match(ee))?r=e.dot?ne:se:(s=t.match(It))?r=(e.nocase?e.dot?Kt:Zt:e.dot?Ut:Jt)(s[1]):(s=t.match(ie))?r=(e.nocase?e.dot?oe:re:e.dot?ae:le)(s):(s=t.match(Vt))?r=e.dot?Yt:Xt:(s=t.match(Qt))&&(r=te);let i=D.fromGlob(t,this.options).toMMPattern();return r&&typeof i=="object"&&Reflect.defineProperty(i,"test",{value:r}),i}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let e=this.options,s=e.noglobstar?fe:e.dot?ue:pe,r=new Set(e.nocase?["i"]:[]),i=t.map(h=>{let u=h.map(m=>{if(m instanceof RegExp)for(let p of m.flags.split(""))r.add(p);return typeof m=="string"?we(m):m===v?v:m._src});u.forEach((m,p)=>{let a=u[p+1],d=u[p-1];m!==v||d===v||(d===void 0?a!==void 0&&a!==v?u[p+1]="(?:\\/|"+s+"\\/)?"+a:u[p]=s:a===void 0?u[p-1]=d+"(?:\\/|\\/"+s+")?":a!==v&&(u[p-1]=d+"(?:\\/|\\/"+s+"\\/)"+a,u[p+1]=v))});let l=u.filter(m=>m!==v);if(this.partial&&l.length>=1){let m=[];for(let p=1;p<=l.length;p++)m.push(l.slice(0,p).join("/"));return"(?:"+m.join("|")+")"}return l.join("/")}).join("|"),[o,c]=t.length>1?["(?:",")"]:["",""];i="^"+o+i+c+"$",this.partial&&(i="^(?:\\/|"+o+i.slice(1,-1)+c+")$"),this.negate&&(i="^(?!"+i+").+$");try{this.regexp=new RegExp(i,[...r].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&e)return!0;let s=this.options;this.isWindows&&(t=t.split("\\").join("/"));let r=this.slashSplit(t);this.debug(this.pattern,"split",r);let i=this.set;this.debug(this.pattern,"set",i);let o=r[r.length-1];if(!o)for(let c=r.length-2;!o&&c>=0;c--)o=r[c];for(let c=0;c<i.length;c++){let h=i[c],u=r;if(s.matchBase&&h.length===1&&(u=[o]),this.matchOne(u,h,e))return s.flipNegate?!0:!this.negate}return s.flipNegate?!1:this.negate}static defaults(t){return A.defaults(t).Minimatch}};A.AST=D;A.Minimatch=R;A.escape=I;A.unescape=N;function F(n){if(n<1024)return String(n);if(n<1024*1024){let e=n/1024;return e<10?`${e.toFixed(1)}K`:`${Math.round(e)}K`}if(n<1024*1024*1024){let e=n/1048576;return e<10?`${e.toFixed(1)}M`:`${Math.round(e)}M`}let t=n/(1024*1024*1024);return t<10?`${t.toFixed(1)}G`:`${Math.round(t)}G`}function G(n){let e=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][n.getMonth()],s=String(n.getDate()).padStart(2," "),r=new Date,i=new Date(r.getTime()-4320*60*60*1e3);if(n>i){let c=String(n.getHours()).padStart(2,"0"),h=String(n.getMinutes()).padStart(2,"0");return`${e} ${s} ${c}:${h}`}let o=n.getFullYear();return`${e} ${s} ${o}`}function C(n){return n.isDirectory?"/":n.isSymbolicLink?"@":(n.mode&73)!==0?"*":""}var Se={name:"ls",summary:"list directory contents",usage:"ls [OPTION]... [FILE]...",options:["-a, --all do not ignore entries starting with .","-A, --almost-all do not list . and ..","-d, --directory list directories themselves, not their contents","-F, --classify append indicator (one of */=>@) to entries","-h, --human-readable with -l, print sizes like 1K 234M 2G etc.","-l use a long listing format","-r, --reverse reverse order while sorting","-R, --recursive list subdirectories recursively","-S sort by file size, largest first","-t sort by time, newest first","-1 list one file per line"," --help display this help and exit"]},$e={showAll:{short:"a",long:"all",type:"boolean"},showAlmostAll:{short:"A",long:"almost-all",type:"boolean"},longFormat:{short:"l",type:"boolean"},humanReadable:{short:"h",long:"human-readable",type:"boolean"},recursive:{short:"R",long:"recursive",type:"boolean"},reverse:{short:"r",long:"reverse",type:"boolean"},sortBySize:{short:"S",type:"boolean"},classifyFiles:{short:"F",long:"classify",type:"boolean"},directoryOnly:{short:"d",long:"directory",type:"boolean"},sortByTime:{short:"t",type:"boolean"},onePerLine:{short:"1",type:"boolean"}},Ue={name:"ls",async execute(n,t){if(Z(n))return U(Se);let e=K("ls",n,$e);if(!e.ok)return e.error;let s=e.result.flags.showAll,r=e.result.flags.showAlmostAll,i=e.result.flags.longFormat,o=e.result.flags.humanReadable,c=e.result.flags.recursive,h=e.result.flags.reverse,u=e.result.flags.sortBySize,l=e.result.flags.classifyFiles,m=e.result.flags.directoryOnly,p=e.result.flags.sortByTime;e.result.flags.onePerLine;let a=e.result.positional;a.length===0&&a.push(".");let d="",f="",$=0;for(let x=0;x<a.length;x++){let S=a[x];if(x>0&&d&&!d.endsWith(`
5
-
6
- `)&&(d+=`
7
- `),m){let y=t.fs.resolvePath(t.cwd,S);try{let g=await t.fs.stat(y);if(i){let w=g.isDirectory?"drwxr-xr-x":"-rw-r--r--",b=l?C(await t.fs.lstat(y)):g.isDirectory?"/":"",E=g.size??0,P=o?F(E).padStart(5):String(E).padStart(5),M=g.mtime??new Date(0),z=G(M);d+=`${w} 1 user user ${P} ${z} ${S}${b}
8
- `}else{let w=l?C(await t.fs.lstat(y)):"";d+=`${S}${w}
9
- `}}catch{f+=`ls: cannot access '${S}': No such file or directory
10
- `,$=2}continue}if(S.includes("*")||S.includes("?")||S.includes("[")){let y=await xe(S,t,s,r,i,h,o,u,l);d+=y.stdout,f+=y.stderr,y.exitCode!==0&&($=y.exitCode)}else{let y=await dt(S,t,s,r,i,c,a.length>1,h,o,u,l);d+=y.stdout,f+=y.stderr,y.exitCode!==0&&($=y.exitCode)}}return{stdout:d,stderr:f,exitCode:$}}};async function xe(n,t,e,s,r,i=!1,o=!1,c=!1,h=!1){let u=e||s,l=t.fs.getAllPaths(),m=t.fs.resolvePath(t.cwd,"."),p=[];for(let a of l){let d=a.startsWith(m)&&a.slice(m.length+1)||a;if(A(d,n)||A(a,n)){let f=d.split("/").pop()||d;if(!u&&f.startsWith("."))continue;p.push(d||a)}}if(p.length===0)return{stdout:"",stderr:`ls: ${n}: No such file or directory
11
- `,exitCode:2};if(c){let a=[];for(let d of p){let f=t.fs.resolvePath(t.cwd,d);try{let $=await t.fs.stat(f);a.push({path:d,size:$.size??0})}catch{a.push({path:d,size:0})}}a.sort((d,f)=>f.size-d.size),p.length=0,p.push(...a.map(d=>d.path))}else p.sort();if(i&&p.reverse(),r){let a=[];for(let d of p){let f=t.fs.resolvePath(t.cwd,d);try{let $=await t.fs.stat(f),x=$.isDirectory?"drwxr-xr-x":"-rw-r--r--",S=h?C(await t.fs.lstat(f)):$.isDirectory?"/":"",y=$.size??0,g=o?F(y).padStart(5):String(y).padStart(5),w=$.mtime??new Date(0),b=G(w);a.push(`${x} 1 user user ${g} ${b} ${d}${S}`)}catch{a.push(`-rw-r--r-- 1 user user 0 Jan 1 00:00 ${d}`)}}return{stdout:`${a.join(`
12
- `)}
13
- `,stderr:"",exitCode:0}}if(h){let a=[];for(let d of p){let f=t.fs.resolvePath(t.cwd,d);try{let $=await t.fs.lstat(f);a.push(`${d}${C($)}`)}catch{a.push(d)}}return{stdout:`${a.join(`
14
- `)}
15
- `,stderr:"",exitCode:0}}return{stdout:`${p.join(`
16
- `)}
17
- `,stderr:"",exitCode:0}}async function dt(n,t,e,s,r,i,o,c=!1,h=!1,u=!1,l=!1,m=!1){let p=e||s,a=t.fs.resolvePath(t.cwd,n);try{let d=await t.fs.stat(a);if(!d.isDirectory){let x=l?C(await t.fs.lstat(a)):"";if(r){let S=d.size??0,y=h?F(S).padStart(5):String(S).padStart(5),g=d.mtime??new Date(0),w=G(g);return{stdout:`-rw-r--r-- 1 user user ${y} ${w} ${n}${x}
18
- `,stderr:"",exitCode:0}}return{stdout:`${n}${x}
19
- `,stderr:"",exitCode:0}}let f=await t.fs.readdir(a);if(p||(f=f.filter(x=>!x.startsWith("."))),u){let x=[];for(let S of f){let y=a==="/"?`/${S}`:`${a}/${S}`;try{let g=await t.fs.stat(y);x.push({name:S,size:g.size??0})}catch{x.push({name:S,size:0})}}x.sort((S,y)=>y.size-S.size),f=x.map(S=>S.name)}else f.sort();e&&(f=[".","..",...f]),c&&f.reverse();let $="";if((i||o)&&($+=`${n}:
20
- `),r){$+=`total ${f.length}
21
- `;let x=f.filter(w=>w==="."||w===".."),S=f.filter(w=>w!=="."&&w!=="..");for(let w of x)$+=`drwxr-xr-x 1 user user 0 Jan 1 00:00 ${w}
22
- `;let y=[];for(let w=0;w<S.length;w+=100){let b=S.slice(w,w+100),E=await Promise.all(b.map(async P=>{let M=a==="/"?`/${P}`:`${a}/${P}`;try{let z=await t.fs.stat(M),gt=z.isDirectory?"drwxr-xr-x":"-rw-r--r--",mt=l?C(await t.fs.lstat(M)):z.isDirectory?"/":"",J=z.size??0,yt=h?F(J).padStart(5):String(J).padStart(5),wt=z.mtime??new Date(0),St=G(wt);return{name:P,line:`${gt} 1 user user ${yt} ${St} ${P}${mt}
23
- `}}catch{return{name:P,line:`-rw-r--r-- 1 user user 0 Jan 1 00:00 ${P}
24
- `}}}));y.push(...E)}let g=new Map(S.map((w,b)=>[w,b]));y.sort((w,b)=>(g.get(w.name)??0)-(g.get(b.name)??0));for(let{line:w}of y)$+=w}else if(l){let x=[],S=f.filter(g=>g!=="."&&g!==".."),y=f.filter(g=>g==="."||g==="..");for(let g of y)x.push(`${g}/`);for(let g=0;g<S.length;g+=100){let w=S.slice(g,g+100),b=await Promise.all(w.map(async E=>{let P=a==="/"?`/${E}`:`${a}/${E}`;try{let M=await t.fs.lstat(P);return`${E}${C(M)}`}catch{return E}}));x.push(...b)}$+=x.join(`
25
- `)+(x.length?`
26
- `:"")}else $+=f.join(`
27
- `)+(f.length?`
28
- `:"");if(i){let x=f.filter(g=>g!=="."&&g!==".."),S=[];if(t.fs.readdirWithFileTypes)S=(await t.fs.readdirWithFileTypes(a)).filter(w=>w.isDirectory&&x.includes(w.name)).map(w=>({name:w.name,isDirectory:!0}));else for(let g=0;g<x.length;g+=100){let w=x.slice(g,g+100),b=await Promise.all(w.map(async E=>{let P=a==="/"?`/${E}`:`${a}/${E}`;try{let M=await t.fs.stat(P);return{name:E,isDirectory:M.isDirectory}}catch{return{name:E,isDirectory:!1}}}));S.push(...b.filter(E=>E.isDirectory))}S.sort((g,w)=>g.name.localeCompare(w.name)),c&&S.reverse();let y=[];for(let g=0;g<S.length;g+=100){let w=S.slice(g,g+100),b=await Promise.all(w.map(async E=>{let P=n==="."?`./${E.name}`:`${n}/${E.name}`,M=await dt(P,t,e,s,r,i,!1,c,h,u,l,!0);return{name:E.name,result:M}}));y.push(...b)}y.sort((g,w)=>g.name.localeCompare(w.name)),c&&y.reverse();for(let{result:g}of y)$+=`
29
- `,$+=g.stdout}return{stdout:$,stderr:"",exitCode:0}}catch{return{stdout:"",stderr:`ls: ${n}: No such file or directory
30
- `,exitCode:2}}}var Ze={name:"ls",flags:[{flag:"-a",type:"boolean"},{flag:"-A",type:"boolean"},{flag:"-l",type:"boolean"},{flag:"-h",type:"boolean"},{flag:"-R",type:"boolean"},{flag:"-r",type:"boolean"},{flag:"-S",type:"boolean"},{flag:"-F",type:"boolean"},{flag:"-d",type:"boolean"},{flag:"-t",type:"boolean"},{flag:"-1",type:"boolean"}],needsFiles:!0};export{Ue as a,Ze as b};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import*as i from"node:fs";import*as o from"node:path";function c(t){if(!t||t==="/")return"/";let e=t.endsWith("/")&&t!=="/"?t.slice(0,-1):t;e.startsWith("/")||(e=`/${e}`);let n=e.split("/").filter(r=>r&&r!=="."),s=[];for(let r of n)r===".."?s.pop():s.push(r);return`/${s.join("/")}`||"/"}function h(t,e){if(t.includes("\0"))throw new Error(`ENOENT: path contains null byte, ${e} '${t}'`)}function m(t){let e=c(t);if(e==="/")return"/";let n=e.lastIndexOf("/");return n===0?"/":e.slice(0,n)}function y(t,e){if(e.startsWith("/"))return c(e);let n=t==="/"?`/${e}`:`${t}/${e}`;return c(n)}function p(t,e){return t==="/"?`/${e}`:`${t}/${e}`}function v(t,e){if(e.startsWith("/"))return c(e);let n=m(t);return c(p(n,e))}function d(t,e){return t===e||t.startsWith(`${e}/`)}function f(t,e){try{let n=i.realpathSync(t);return d(n,e)?n:null}catch(n){if(n.code==="ENOENT"){let s=o.dirname(t);if(s===t)return null;let r=f(s,e);if(r===null)return null;try{if(i.lstatSync(t).isSymbolicLink()){let l=i.readlinkSync(t),u=o.isAbsolute(l)?l:o.resolve(o.dirname(t),l);if(f(u,e)===null)return null}}catch{}return o.join(r,o.basename(t))}return null}}function P(t,e,n){let s=f(t,n);if(s===null)return null;let r=o.resolve(t),a=r.slice(e.length),l=s.slice(n.length);if(a!==l)return null;try{if(i.lstatSync(r).isSymbolicLink())return null}catch{}return s}function $(t,e){if(!i.existsSync(t))throw new Error(`${e} root does not exist`);if(!i.statSync(t).isDirectory())throw new Error(`${e} root is not a directory`)}function D(t,e){if(!o.isAbsolute(t))return{withinRoot:!0,relativePath:t};let n;try{n=i.realpathSync(t)}catch{n=o.resolve(t)}return d(n,e)?{withinRoot:!0,relativePath:n.slice(e.length)||"/"}:{withinRoot:!1,safeName:o.basename(t)}}function N(t,e,n,s){let r=t;if(r.path===void 0){for(let l of s)if(r.message?.includes(l))throw t}let a=r.code||"EIO";throw new Error(`${a}: ${n} '${e}'`)}export{c as a,h as b,m as c,y as d,p as e,v as f,d as g,f as h,P as i,$ as j,D as k,N as l};
@@ -1,23 +0,0 @@
1
- #!/usr/bin/env node
2
- import{a as Ce,b as Fe,c as ne}from"./chunk-GTNBSMZR.js";import{a as G,c as B,e as be}from"./chunk-KGOUQS5A.js";var Te=B(ae=>{ae.read=function(i,e,t,r,n){var o,s,c=n*8-r-1,p=(1<<c)-1,m=p>>1,a=-7,f=t?n-1:0,l=t?-1:1,u=i[e+f];for(f+=l,o=u&(1<<-a)-1,u>>=-a,a+=c;a>0;o=o*256+i[e+f],f+=l,a-=8);for(s=o&(1<<-a)-1,o>>=-a,a+=r;a>0;s=s*256+i[e+f],f+=l,a-=8);if(o===0)o=1-m;else{if(o===p)return s?NaN:(u?-1:1)*(1/0);s=s+Math.pow(2,r),o=o-m}return(u?-1:1)*s*Math.pow(2,o-r)};ae.write=function(i,e,t,r,n,o){var s,c,p,m=o*8-n-1,a=(1<<m)-1,f=a>>1,l=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,u=r?0:o-1,T=r?1:-1,k=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(c=isNaN(e)?1:0,s=a):(s=Math.floor(Math.log(e)/Math.LN2),e*(p=Math.pow(2,-s))<1&&(s--,p*=2),s+f>=1?e+=l/p:e+=l*Math.pow(2,1-f),e*p>=2&&(s++,p/=2),s+f>=a?(c=0,s=a):s+f>=1?(c=(e*p-1)*Math.pow(2,n),s=s+f):(c=e*Math.pow(2,f-1)*Math.pow(2,n),s=0));n>=8;i[t+u]=c&255,u+=T,c/=256,n-=8);for(s=s<<n|c,m+=n;m>0;i[t+u]=s&255,u+=T,s/=256,m-=8);i[t+u-T]|=k*128}});var ze=B((Ki,Me)=>{var j=1e3,P=j*60,N=P*60,z=N*24,wt=z*7,kt=z*365.25;Me.exports=function(i,e){e=e||{};var t=typeof i;if(t==="string"&&i.length>0)return yt(i);if(t==="number"&&isFinite(i))return e.long?Ct(i):bt(i);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(i))};function yt(i){if(i=String(i),!(i.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(i);if(e){var t=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return t*kt;case"weeks":case"week":case"w":return t*wt;case"days":case"day":case"d":return t*z;case"hours":case"hour":case"hrs":case"hr":case"h":return t*N;case"minutes":case"minute":case"mins":case"min":case"m":return t*P;case"seconds":case"second":case"secs":case"sec":case"s":return t*j;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}function bt(i){var e=Math.abs(i);return e>=z?Math.round(i/z)+"d":e>=N?Math.round(i/N)+"h":e>=P?Math.round(i/P)+"m":e>=j?Math.round(i/j)+"s":i+"ms"}function Ct(i){var e=Math.abs(i);return e>=z?Y(i,e,z,"day"):e>=N?Y(i,e,N,"hour"):e>=P?Y(i,e,P,"minute"):e>=j?Y(i,e,j,"second"):i+" ms"}function Y(i,e,t,r){var n=e>=t*1.5;return Math.round(i/t)+" "+r+(n?"s":"")}});var fe=B((er,Ue)=>{function Ft(i){t.debug=t,t.default=t,t.coerce=p,t.disable=s,t.enable=n,t.enabled=c,t.humanize=ze(),t.destroy=m,Object.keys(i).forEach(a=>{t[a]=i[a]}),t.names=[],t.skips=[],t.formatters={};function e(a){let f=0;for(let l=0;l<a.length;l++)f=(f<<5)-f+a.charCodeAt(l),f|=0;return t.colors[Math.abs(f)%t.colors.length]}t.selectColor=e;function t(a){let f,l=null,u,T;function k(...F){if(!k.enabled)return;let O=k,V=Number(new Date),tt=V-(f||V);O.diff=tt,O.prev=f,O.curr=V,f=V,F[0]=t.coerce(F[0]),typeof F[0]!="string"&&F.unshift("%O");let q=0;F[0]=F[0].replace(/%([a-zA-Z%])/g,(re,it)=>{if(re==="%%")return"%";q++;let ye=t.formatters[it];if(typeof ye=="function"){let rt=F[q];re=ye.call(O,rt),F.splice(q,1),q--}return re}),t.formatArgs.call(O,F),(O.log||t.log).apply(O,F)}return k.namespace=a,k.useColors=t.useColors(),k.color=t.selectColor(a),k.extend=r,k.destroy=t.destroy,Object.defineProperty(k,"enabled",{enumerable:!0,configurable:!1,get:()=>l!==null?l:(u!==t.namespaces&&(u=t.namespaces,T=t.enabled(a)),T),set:F=>{l=F}}),typeof t.init=="function"&&t.init(k),k}function r(a,f){let l=t(this.namespace+(typeof f>"u"?":":f)+a);return l.log=this.log,l}function n(a){t.save(a),t.namespaces=a,t.names=[],t.skips=[];let f=(typeof a=="string"?a:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let l of f)l[0]==="-"?t.skips.push(l.slice(1)):t.names.push(l)}function o(a,f){let l=0,u=0,T=-1,k=0;for(;l<a.length;)if(u<f.length&&(f[u]===a[l]||f[u]==="*"))f[u]==="*"?(T=u,k=l,u++):(l++,u++);else if(T!==-1)u=T+1,k++,l=k;else return!1;for(;u<f.length&&f[u]==="*";)u++;return u===f.length}function s(){let a=[...t.names,...t.skips.map(f=>"-"+f)].join(",");return t.enable(""),a}function c(a){for(let f of t.skips)if(o(a,f))return!1;for(let f of t.names)if(o(a,f))return!0;return!1}function p(a){return a instanceof Error?a.stack||a.message:a}function m(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return t.enable(t.load()),t}Ue.exports=Ft});var Le=B((C,K)=>{C.formatArgs=St;C.save=Tt;C.load=Et;C.useColors=vt;C.storage=At();C.destroy=(()=>{let i=!1;return()=>{i||(i=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();C.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function vt(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let i;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(i=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(i[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function St(i){if(i[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+i[0]+(this.useColors?"%c ":" ")+"+"+K.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;i.splice(1,0,e,"color: inherit");let t=0,r=0;i[0].replace(/%[a-zA-Z%]/g,n=>{n!=="%%"&&(t++,n==="%c"&&(r=t))}),i.splice(r,0,e)}C.log=console.debug||console.log||(()=>{});function Tt(i){try{i?C.storage.setItem("debug",i):C.storage.removeItem("debug")}catch{}}function Et(){let i;try{i=C.storage.getItem("debug")||C.storage.getItem("DEBUG")}catch{}return!i&&typeof process<"u"&&"env"in process&&(i=process.env.DEBUG),i}function At(){try{return localStorage}catch{}}K.exports=fe()(C);var{formatters:Bt}=K.exports;Bt.j=function(i){try{return JSON.stringify(i)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var je=B((tr,Re)=>{"use strict";Re.exports=(i,e=process.argv)=>{let t=i.startsWith("-")?"":i.length===1?"-":"--",r=e.indexOf(t+i),n=e.indexOf("--");return r!==-1&&(n===-1||r<n)}});var _e=B((ir,Ne)=>{"use strict";var It=G("os"),Pe=G("tty"),v=je(),{env:g}=process,I;v("no-color")||v("no-colors")||v("color=false")||v("color=never")?I=0:(v("color")||v("colors")||v("color=true")||v("color=always"))&&(I=1);"FORCE_COLOR"in g&&(g.FORCE_COLOR==="true"?I=1:g.FORCE_COLOR==="false"?I=0:I=g.FORCE_COLOR.length===0?1:Math.min(parseInt(g.FORCE_COLOR,10),3));function pe(i){return i===0?!1:{level:i,hasBasic:!0,has256:i>=2,has16m:i>=3}}function me(i,e){if(I===0)return 0;if(v("color=16m")||v("color=full")||v("color=truecolor"))return 3;if(v("color=256"))return 2;if(i&&!e&&I===void 0)return 0;let t=I||0;if(g.TERM==="dumb")return t;if(process.platform==="win32"){let r=It.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in g)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(r=>r in g)||g.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in g)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(g.TEAMCITY_VERSION)?1:0;if(g.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in g){let r=parseInt((g.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(g.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(g.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(g.TERM)||"COLORTERM"in g?1:t}function Ot(i){let e=me(i,i&&i.isTTY);return pe(e)}Ne.exports={supportsColor:Ot,stdout:pe(me(!0,Pe.isatty(1))),stderr:pe(me(!0,Pe.isatty(2)))}});var He=B((w,te)=>{var Dt=G("tty"),ee=G("util");w.init=Pt;w.log=Lt;w.formatArgs=zt;w.save=Rt;w.load=jt;w.useColors=Mt;w.destroy=ee.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");w.colors=[6,2,3,4,5,1];try{let i=_e();i&&(i.stderr||i).level>=2&&(w.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}w.inspectOpts=Object.keys(process.env).filter(i=>/^debug_/i.test(i)).reduce((i,e)=>{let t=e.substring(6).toLowerCase().replace(/_([a-z])/g,(n,o)=>o.toUpperCase()),r=process.env[e];return/^(yes|on|true|enabled)$/i.test(r)?r=!0:/^(no|off|false|disabled)$/i.test(r)?r=!1:r==="null"?r=null:r=Number(r),i[t]=r,i},{});function Mt(){return"colors"in w.inspectOpts?!!w.inspectOpts.colors:Dt.isatty(process.stderr.fd)}function zt(i){let{namespace:e,useColors:t}=this;if(t){let r=this.color,n="\x1B[3"+(r<8?r:"8;5;"+r),o=` ${n};1m${e} \x1B[0m`;i[0]=o+i[0].split(`
3
- `).join(`
4
- `+o),i.push(n+"m+"+te.exports.humanize(this.diff)+"\x1B[0m")}else i[0]=Ut()+e+" "+i[0]}function Ut(){return w.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Lt(...i){return process.stderr.write(ee.formatWithOptions(w.inspectOpts,...i)+`
5
- `)}function Rt(i){i?process.env.DEBUG=i:delete process.env.DEBUG}function jt(){return process.env.DEBUG}function Pt(i){i.inspectOpts={};let e=Object.keys(w.inspectOpts);for(let t=0;t<e.length;t++)i.inspectOpts[e[t]]=w.inspectOpts[e[t]]}te.exports=fe()(w);var{formatters:$e}=te.exports;$e.o=function(i){return this.inspectOpts.colors=this.useColors,ee.inspect(i,this.inspectOpts).split(`
6
- `).map(e=>e.trim()).join(" ")};$e.O=function(i){return this.inspectOpts.colors=this.useColors,ee.inspect(i,this.inspectOpts)}});var We=B((rr,le)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?le.exports=Le():le.exports=He()});var nt="End-Of-Stream",x=class extends Error{constructor(){super(nt),this.name="EndOfStreamError"}},D=class extends Error{constructor(e="The operation was aborted"){super(e),this.name="AbortError"}};var M=class{constructor(){this.endOfStream=!1,this.interrupted=!1,this.peekQueue=[]}async peek(e,t=!1){let r=await this.read(e,t);return this.peekQueue.push(e.subarray(0,r)),r}async read(e,t=!1){if(e.length===0)return 0;let r=this.readFromPeekBuffer(e);if(this.endOfStream||(r+=await this.readRemainderFromStream(e.subarray(r),t)),r===0&&!t)throw new x;return r}readFromPeekBuffer(e){let t=e.length,r=0;for(;this.peekQueue.length>0&&t>0;){let n=this.peekQueue.pop();if(!n)throw new Error("peekData should be defined");let o=Math.min(n.length,t);e.set(n.subarray(0,o),r),r+=o,t-=o,o<n.length&&this.peekQueue.push(n.subarray(o))}return r}async readRemainderFromStream(e,t){let r=0;for(;r<e.length&&!this.endOfStream;){if(this.interrupted)throw new D;let n=await this.readFromStream(e.subarray(r),t);if(n===0)break;r+=n}if(!t&&r<e.length)throw new x;return r}};var J=class extends M{constructor(e){super(),this.reader=e}async abort(){return this.close()}async close(){this.reader.releaseLock()}};var _=class extends J{async readFromStream(e,t){if(e.length===0)return 0;let r=await this.reader.read(new Uint8Array(e.length),{min:t?void 0:e.length});return r.done&&(this.endOfStream=r.done),r.value?(e.set(r.value),r.value.length):0}};var L=class extends M{constructor(e){super(),this.reader=e,this.buffer=null}writeChunk(e,t){let r=Math.min(t.length,e.length);return e.set(t.subarray(0,r)),r<t.length?this.buffer=t.subarray(r):this.buffer=null,r}async readFromStream(e,t){if(e.length===0)return 0;let r=0;for(this.buffer&&(r+=this.writeChunk(e,this.buffer));r<e.length&&!this.endOfStream;){let n=await this.reader.read();if(n.done){this.endOfStream=!0;break}n.value&&(r+=this.writeChunk(e.subarray(r),n.value))}if(!t&&r===0&&this.endOfStream)throw new x;return r}abort(){return this.interrupted=!0,this.reader.cancel()}async close(){await this.abort(),this.reader.releaseLock()}};function oe(i){try{let e=i.getReader({mode:"byob"});return e instanceof ReadableStreamDefaultReader?new L(e):new _(e)}catch(e){if(e instanceof TypeError)return new L(i.getReader());throw e}}var S=class{constructor(e){this.numBuffer=new Uint8Array(8),this.position=0,this.onClose=e?.onClose,e?.abortSignal&&e.abortSignal.addEventListener("abort",()=>{this.abort()})}async readToken(e,t=this.position){let r=new Uint8Array(e.len);if(await this.readBuffer(r,{position:t})<e.len)throw new x;return e.get(r,0)}async peekToken(e,t=this.position){let r=new Uint8Array(e.len);if(await this.peekBuffer(r,{position:t})<e.len)throw new x;return e.get(r,0)}async readNumber(e){if(await this.readBuffer(this.numBuffer,{length:e.len})<e.len)throw new x;return e.get(this.numBuffer,0)}async peekNumber(e){if(await this.peekBuffer(this.numBuffer,{length:e.len})<e.len)throw new x;return e.get(this.numBuffer,0)}async ignore(e){if(this.fileInfo.size!==void 0){let t=this.fileInfo.size-this.position;if(e>t)return this.position+=t,t}return this.position+=e,e}async close(){await this.abort(),await this.onClose?.()}normalizeOptions(e,t){if(!this.supportsRandomAccess()&&t&&t.position!==void 0&&t.position<this.position)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");return{mayBeLess:!1,offset:0,length:e.length,position:this.position,...t}}abort(){return Promise.resolve()}};var st=256e3,X=class extends S{constructor(e,t){super(t),this.streamReader=e,this.fileInfo=t?.fileInfo??{}}async readBuffer(e,t){let r=this.normalizeOptions(e,t),n=r.position-this.position;if(n>0)return await this.ignore(n),this.readBuffer(e,t);if(n<0)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");if(r.length===0)return 0;let o=await this.streamReader.read(e.subarray(0,r.length),r.mayBeLess);if(this.position+=o,(!t||!t.mayBeLess)&&o<r.length)throw new x;return o}async peekBuffer(e,t){let r=this.normalizeOptions(e,t),n=0;if(r.position){let o=r.position-this.position;if(o>0){let s=new Uint8Array(r.length+o);return n=await this.peekBuffer(s,{mayBeLess:r.mayBeLess}),e.set(s.subarray(o)),n-o}if(o<0)throw new Error("Cannot peek from a negative offset in a stream")}if(r.length>0){try{n=await this.streamReader.peek(e.subarray(0,r.length),r.mayBeLess)}catch(o){if(t?.mayBeLess&&o instanceof x)return 0;throw o}if(!r.mayBeLess&&n<r.length)throw new x}return n}async ignore(e){let t=Math.min(st,e),r=new Uint8Array(t),n=0;for(;n<e;){let o=e-n,s=await this.readBuffer(r,{length:Math.min(t,o)});if(s<0)return s;n+=s}return n}abort(){return this.streamReader.abort()}async close(){return this.streamReader.close()}supportsRandomAccess(){return!1}};var Z=class extends S{constructor(e,t){super(t),this.uint8Array=e,this.fileInfo={...t?.fileInfo??{},size:e.length}}async readBuffer(e,t){t?.position&&(this.position=t.position);let r=await this.peekBuffer(e,t);return this.position+=r,r}async peekBuffer(e,t){let r=this.normalizeOptions(e,t),n=Math.min(this.uint8Array.length-r.position,r.length);if(!r.mayBeLess&&n<r.length)throw new x;return e.set(this.uint8Array.subarray(r.position,r.position+n)),n}close(){return super.close()}supportsRandomAccess(){return!0}setPosition(e){this.position=e}};var Q=class extends S{constructor(e,t){super(t),this.blob=e,this.fileInfo={...t?.fileInfo??{},size:e.size,mimeType:e.type}}async readBuffer(e,t){t?.position&&(this.position=t.position);let r=await this.peekBuffer(e,t);return this.position+=r,r}async peekBuffer(e,t){let r=this.normalizeOptions(e,t),n=Math.min(this.blob.size-r.position,r.length);if(!r.mayBeLess&&n<r.length)throw new x;let o=await this.blob.slice(r.position,r.position+n).arrayBuffer();return e.set(new Uint8Array(o)),n}close(){return super.close()}supportsRandomAccess(){return!0}setPosition(e){this.position=e}};function se(i,e){let t=oe(i),r=e??{},n=r.onClose;return r.onClose=async()=>{if(await t.close(),n)return n()},new X(t,r)}function ve(i,e){return new Z(i,e)}function Se(i,e){return new Q(i,e)}import{open as ct}from"node:fs/promises";var $=class i extends S{static async fromFile(e){let t=await ct(e,"r"),r=await t.stat();return new i(t,{fileInfo:{path:e,size:r.size}})}constructor(e,t){super(t),this.fileHandle=e,this.fileInfo=t.fileInfo}async readBuffer(e,t){let r=this.normalizeOptions(e,t);if(this.position=r.position,r.length===0)return 0;let n=await this.fileHandle.read(e,0,r.length,r.position);if(this.position+=n.bytesRead,n.bytesRead<r.length&&(!t||!t.mayBeLess))throw new x;return n.bytesRead}async peekBuffer(e,t){let r=this.normalizeOptions(e,t),n=await this.fileHandle.read(e,0,r.length,r.position);if(!r.mayBeLess&&n.bytesRead<r.length)throw new x;return n.bytesRead}async close(){return await this.fileHandle.close(),super.close()}setPosition(e){this.position=e}supportsRandomAccess(){return!0}};var ft=$.fromFile;var Ae=be(Te(),1);var ce={128:"\u20AC",130:"\u201A",131:"\u0192",132:"\u201E",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02C6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017D",145:"\u2018",146:"\u2019",147:"\u201C",148:"\u201D",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02DC",153:"\u2122",154:"\u0161",155:"\u203A",156:"\u0153",158:"\u017E",159:"\u0178"},mt={};for(let[i,e]of Object.entries(ce))mt[e]=Number.parseInt(i);function Ee(i,e="utf-8"){switch(e.toLowerCase()){case"utf-8":case"utf8":return typeof globalThis.TextDecoder<"u"?new globalThis.TextDecoder("utf-8").decode(i):lt(i);case"utf-16le":return ut(i);case"ascii":return xt(i);case"latin1":case"iso-8859-1":return dt(i);case"windows-1252":return ht(i);default:throw new RangeError(`Encoding '${e}' not supported`)}}function lt(i){let e="",t=0;for(;t<i.length;){let r=i[t++];if(r<128)e+=String.fromCharCode(r);else if(r<224){let n=i[t++]&63;e+=String.fromCharCode((r&31)<<6|n)}else if(r<240){let n=i[t++]&63,o=i[t++]&63;e+=String.fromCharCode((r&15)<<12|n<<6|o)}else{let n=i[t++]&63,o=i[t++]&63,s=i[t++]&63,c=(r&7)<<18|n<<12|o<<6|s;c-=65536,e+=String.fromCharCode(55296+(c>>10&1023),56320+(c&1023))}}return e}function ut(i){let e="";for(let t=0;t<i.length;t+=2)e+=String.fromCharCode(i[t]|i[t+1]<<8);return e}function xt(i){return String.fromCharCode(...i.map(e=>e&127))}function dt(i){return String.fromCharCode(...i)}function ht(i){let e="";for(let t of i)t>=128&&t<=159&&ce[t]?e+=ce[t]:e+=String.fromCharCode(t);return e}function y(i){return new DataView(i.buffer,i.byteOffset)}var Be={len:1,get(i,e){return y(i).getUint8(e)},put(i,e,t){return y(i).setUint8(e,t),e+1}},d={len:2,get(i,e){return y(i).getUint16(e,!0)},put(i,e,t){return y(i).setUint16(e,t,!0),e+2}},R={len:2,get(i,e){return y(i).getUint16(e)},put(i,e,t){return y(i).setUint16(e,t),e+2}};var h={len:4,get(i,e){return y(i).getUint32(e,!0)},put(i,e,t){return y(i).setUint32(e,t,!0),e+4}},Ie={len:4,get(i,e){return y(i).getUint32(e)},put(i,e,t){return y(i).setUint32(e,t),e+4}};var Oe={len:4,get(i,e){return y(i).getInt32(e)},put(i,e,t){return y(i).setInt32(e,t),e+4}};var De={len:8,get(i,e){return y(i).getBigUint64(e,!0)},put(i,e,t){return y(i).setBigUint64(e,t,!0),e+8}};var b=class{constructor(e,t){this.len=e,this.encoding=t}get(e,t=0){let r=e.subarray(t,t+this.len);return Ee(r,this.encoding)}};var Je=be(We(),1);var U={LocalFileHeader:67324752,DataDescriptor:134695760,CentralFileHeader:33639248,EndOfCentralDirectory:101010256},ue={get(i){return{signature:h.get(i,0),compressedSize:h.get(i,8),uncompressedSize:h.get(i,12)}},len:16},Ve={get(i){let e=d.get(i,6);return{signature:h.get(i,0),minVersion:d.get(i,4),dataDescriptor:!!(e&8),compressedMethod:d.get(i,8),compressedSize:h.get(i,18),uncompressedSize:h.get(i,22),filenameLength:d.get(i,26),extraFieldLength:d.get(i,28),filename:null}},len:30},qe={get(i){return{signature:h.get(i,0),nrOfThisDisk:d.get(i,4),nrOfThisDiskWithTheStart:d.get(i,6),nrOfEntriesOnThisDisk:d.get(i,8),nrOfEntriesOfSize:d.get(i,10),sizeOfCd:h.get(i,12),offsetOfStartOfCd:h.get(i,16),zipFileCommentLength:d.get(i,20)}},len:22},Ge={get(i){let e=d.get(i,8);return{signature:h.get(i,0),minVersion:d.get(i,6),dataDescriptor:!!(e&8),compressedMethod:d.get(i,10),compressedSize:h.get(i,20),uncompressedSize:h.get(i,24),filenameLength:d.get(i,28),extraFieldLength:d.get(i,30),fileCommentLength:d.get(i,32),relativeOffsetOfLocalHeader:h.get(i,42),filename:null}},len:46};function Xe(i){let e=new Uint8Array(h.len);return h.put(e,0,i),e}var E=(0,Je.default)("tokenizer:inflate"),xe=256*1024,Nt=Xe(U.DataDescriptor),ie=Xe(U.EndOfCentralDirectory),H=class i{constructor(e){this.tokenizer=e,this.syncBuffer=new Uint8Array(xe)}async isZip(){return await this.peekSignature()===U.LocalFileHeader}peekSignature(){return this.tokenizer.peekToken(h)}async findEndOfCentralDirectoryLocator(){let e=this.tokenizer,t=Math.min(16*1024,e.fileInfo.size),r=this.syncBuffer.subarray(0,t);await this.tokenizer.readBuffer(r,{position:e.fileInfo.size-t});for(let n=r.length-4;n>=0;n--)if(r[n]===ie[0]&&r[n+1]===ie[1]&&r[n+2]===ie[2]&&r[n+3]===ie[3])return e.fileInfo.size-t+n;return-1}async readCentralDirectory(){if(!this.tokenizer.supportsRandomAccess()){E("Cannot reading central-directory without random-read support");return}E("Reading central-directory...");let e=this.tokenizer.position,t=await this.findEndOfCentralDirectoryLocator();if(t>0){E("Central-directory 32-bit signature found");let r=await this.tokenizer.readToken(qe,t),n=[];this.tokenizer.setPosition(r.offsetOfStartOfCd);for(let o=0;o<r.nrOfEntriesOfSize;++o){let s=await this.tokenizer.readToken(Ge);if(s.signature!==U.CentralFileHeader)throw new Error("Expected Central-File-Header signature");s.filename=await this.tokenizer.readToken(new b(s.filenameLength,"utf-8")),await this.tokenizer.ignore(s.extraFieldLength),await this.tokenizer.ignore(s.fileCommentLength),n.push(s),E(`Add central-directory file-entry: n=${o+1}/${n.length}: filename=${n[o].filename}`)}return this.tokenizer.setPosition(e),n}this.tokenizer.setPosition(e)}async unzip(e){let t=await this.readCentralDirectory();if(t)return this.iterateOverCentralDirectory(t,e);let r=!1;do{let n=await this.readLocalFileHeader();if(!n)break;let o=e(n);r=!!o.stop;let s;if(await this.tokenizer.ignore(n.extraFieldLength),n.dataDescriptor&&n.compressedSize===0){let c=[],p=xe;E("Compressed-file-size unknown, scanning for next data-descriptor-signature....");let m=-1;for(;m<0&&p===xe;){p=await this.tokenizer.peekBuffer(this.syncBuffer,{mayBeLess:!0}),m=_t(this.syncBuffer.subarray(0,p),Nt);let a=m>=0?m:p;if(o.handler){let f=new Uint8Array(a);await this.tokenizer.readBuffer(f),c.push(f)}else await this.tokenizer.ignore(a)}E(`Found data-descriptor-signature at pos=${this.tokenizer.position}`),o.handler&&await this.inflate(n,$t(c),o.handler)}else o.handler?(E(`Reading compressed-file-data: ${n.compressedSize} bytes`),s=new Uint8Array(n.compressedSize),await this.tokenizer.readBuffer(s),await this.inflate(n,s,o.handler)):(E(`Ignoring compressed-file-data: ${n.compressedSize} bytes`),await this.tokenizer.ignore(n.compressedSize));if(E(`Reading data-descriptor at pos=${this.tokenizer.position}`),n.dataDescriptor&&(await this.tokenizer.readToken(ue)).signature!==134695760)throw new Error(`Expected data-descriptor-signature at position ${this.tokenizer.position-ue.len}`)}while(!r)}async iterateOverCentralDirectory(e,t){for(let r of e){let n=t(r);if(n.handler){this.tokenizer.setPosition(r.relativeOffsetOfLocalHeader);let o=await this.readLocalFileHeader();if(o){await this.tokenizer.ignore(o.extraFieldLength);let s=new Uint8Array(r.compressedSize);await this.tokenizer.readBuffer(s),await this.inflate(o,s,n.handler)}}if(n.stop)break}}async inflate(e,t,r){if(e.compressedMethod===0)return r(t);if(e.compressedMethod!==8)throw new Error(`Unsupported ZIP compression method: ${e.compressedMethod}`);E(`Decompress filename=${e.filename}, compressed-size=${t.length}`);let n=await i.decompressDeflateRaw(t);return r(n)}static async decompressDeflateRaw(e){let t=new ReadableStream({start(o){o.enqueue(e),o.close()}}),r=new DecompressionStream("deflate-raw"),n=t.pipeThrough(r);try{let s=await new Response(n).arrayBuffer();return new Uint8Array(s)}catch(o){let s=o instanceof Error?`Failed to deflate ZIP entry: ${o.message}`:"Unknown decompression error in ZIP entry";throw new TypeError(s)}}async readLocalFileHeader(){let e=await this.tokenizer.peekToken(h);if(e===U.LocalFileHeader){let t=await this.tokenizer.readToken(Ve);return t.filename=await this.tokenizer.readToken(new b(t.filenameLength,"utf-8")),t}if(e===U.CentralFileHeader)return!1;throw e===3759263696?new Error("Encrypted ZIP"):new Error("Unexpected signature")}};function _t(i,e){let t=i.length,r=e.length;if(r>t)return-1;for(let n=0;n<=t-r;n++){let o=!0;for(let s=0;s<r;s++)if(i[n+s]!==e[s]){o=!1;break}if(o)return n}return-1}function $t(i){let e=i.reduce((n,o)=>n+o.length,0),t=new Uint8Array(e),r=0;for(let n of i)t.set(n,r),r+=n.length;return t}var W=class{constructor(e){this.tokenizer=e}inflate(){let e=this.tokenizer;return new ReadableStream({async pull(t){let r=new Uint8Array(1024),n=await e.readBuffer(r,{mayBeLess:!0});if(n===0){t.close();return}t.enqueue(r.subarray(0,n))}}).pipeThrough(new DecompressionStream("gzip"))}};var ur={utf8:new globalThis.TextDecoder("utf8")};var xr=new globalThis.TextEncoder;var dr=Array.from({length:256},(i,e)=>e.toString(16).padStart(2,"0"));function de(i){let{byteLength:e}=i;if(e===6)return i.getUint16(0)*2**32+i.getUint32(2);if(e===5)return i.getUint8(0)*2**32+i.getUint32(1);if(e===4)return i.getUint32(0);if(e===3)return i.getUint8(0)*2**16+i.getUint16(1);if(e===2)return i.getUint16(0);if(e===1)return i.getUint8(0)}function Ze(i,e){if(e==="utf-16le"){let t=[];for(let r=0;r<i.length;r++){let n=i.charCodeAt(r);t.push(n&255,n>>8&255)}return t}if(e==="utf-16be"){let t=[];for(let r=0;r<i.length;r++){let n=i.charCodeAt(r);t.push(n>>8&255,n&255)}return t}return[...i].map(t=>t.charCodeAt(0))}function Qe(i,e=0){let t=Number.parseInt(new b(6).get(i,148).replace(/\0.*$/,"").trim(),8);if(Number.isNaN(t))return!1;let r=256;for(let n=e;n<e+148;n++)r+=i[n];for(let n=e+156;n<e+512;n++)r+=i[n];return t===r}var Ye={get:(i,e)=>i[e+3]&127|i[e+2]<<7|i[e+1]<<14|i[e]<<21,len:4};var Ke=["jpg","png","apng","gif","webp","flif","xcf","cr2","cr3","orf","arw","dng","nef","rw2","raf","tif","bmp","icns","jxr","psd","indd","zip","tar","rar","gz","bz2","7z","dmg","mp4","mid","mkv","webm","mov","avi","mpg","mp2","mp3","m4a","oga","ogg","ogv","opus","flac","wav","spx","amr","pdf","epub","elf","macho","exe","swf","rtf","wasm","woff","woff2","eot","ttf","otf","ttc","ico","flv","ps","xz","sqlite","nes","crx","xpi","cab","deb","ar","rpm","Z","lz","cfb","mxf","mts","blend","bpg","docx","pptx","xlsx","3gp","3g2","j2c","jp2","jpm","jpx","mj2","aif","qcp","odt","ods","odp","xml","mobi","heic","cur","ktx","ape","wv","dcm","ics","glb","pcap","dsf","lnk","alias","voc","ac3","m4v","m4p","m4b","f4v","f4p","f4b","f4a","mie","asf","ogm","ogx","mpc","arrow","shp","aac","mp1","it","s3m","xm","skp","avif","eps","lzh","pgp","asar","stl","chm","3mf","zst","jxl","vcf","jls","pst","dwg","parquet","class","arj","cpio","ace","avro","icc","fbx","vsdx","vtt","apk","drc","lz4","potx","xltx","dotx","xltm","ott","ots","otp","odg","otg","xlsm","docm","dotm","potm","pptm","jar","jmp","rm","sav","ppsm","ppsx","tar.gz","reg","dat"],et=["image/jpeg","image/png","image/gif","image/webp","image/flif","image/x-xcf","image/x-canon-cr2","image/x-canon-cr3","image/tiff","image/bmp","image/vnd.ms-photo","image/vnd.adobe.photoshop","application/x-indesign","application/epub+zip","application/x-xpinstall","application/vnd.ms-powerpoint.slideshow.macroenabled.12","application/vnd.oasis.opendocument.text","application/vnd.oasis.opendocument.spreadsheet","application/vnd.oasis.opendocument.presentation","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/zip","application/x-tar","application/x-rar-compressed","application/gzip","application/x-bzip2","application/x-7z-compressed","application/x-apple-diskimage","application/vnd.apache.arrow.file","video/mp4","audio/midi","video/matroska","video/webm","video/quicktime","video/vnd.avi","audio/wav","audio/qcelp","audio/x-ms-asf","video/x-ms-asf","application/vnd.ms-asf","video/mpeg","video/3gpp","audio/mpeg","audio/mp4","video/ogg","audio/ogg","audio/ogg; codecs=opus","application/ogg","audio/flac","audio/ape","audio/wavpack","audio/amr","application/pdf","application/x-elf","application/x-mach-binary","application/x-msdownload","application/x-shockwave-flash","application/rtf","application/wasm","font/woff","font/woff2","application/vnd.ms-fontobject","font/ttf","font/otf","font/collection","image/x-icon","video/x-flv","application/postscript","application/eps","application/x-xz","application/x-sqlite3","application/x-nintendo-nes-rom","application/x-google-chrome-extension","application/vnd.ms-cab-compressed","application/x-deb","application/x-unix-archive","application/x-rpm","application/x-compress","application/x-lzip","application/x-cfb","application/x-mie","application/mxf","video/mp2t","application/x-blender","image/bpg","image/j2c","image/jp2","image/jpx","image/jpm","image/mj2","audio/aiff","application/xml","application/x-mobipocket-ebook","image/heif","image/heif-sequence","image/heic","image/heic-sequence","image/icns","image/ktx","application/dicom","audio/x-musepack","text/calendar","text/vcard","text/vtt","model/gltf-binary","application/vnd.tcpdump.pcap","audio/x-dsf","application/x.ms.shortcut","application/x.apple.alias","audio/x-voc","audio/vnd.dolby.dd-raw","audio/x-m4a","image/apng","image/x-olympus-orf","image/x-sony-arw","image/x-adobe-dng","image/x-nikon-nef","image/x-panasonic-rw2","image/x-fujifilm-raf","video/x-m4v","video/3gpp2","application/x-esri-shape","audio/aac","audio/x-it","audio/x-s3m","audio/x-xm","video/MP1S","video/MP2P","application/vnd.sketchup.skp","image/avif","application/x-lzh-compressed","application/pgp-encrypted","application/x-asar","model/stl","application/vnd.ms-htmlhelp","model/3mf","image/jxl","application/zstd","image/jls","application/vnd.ms-outlook","image/vnd.dwg","application/vnd.apache.parquet","application/java-vm","application/x-arj","application/x-cpio","application/x-ace-compressed","application/avro","application/vnd.iccprofile","application/x.autodesk.fbx","application/vnd.visio","application/vnd.android.package-archive","application/vnd.google.draco","application/x-lz4","application/vnd.openxmlformats-officedocument.presentationml.template","application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/vnd.ms-excel.template.macroenabled.12","application/vnd.oasis.opendocument.text-template","application/vnd.oasis.opendocument.spreadsheet-template","application/vnd.oasis.opendocument.presentation-template","application/vnd.oasis.opendocument.graphics","application/vnd.oasis.opendocument.graphics-template","application/vnd.ms-excel.sheet.macroenabled.12","application/vnd.ms-word.document.macroenabled.12","application/vnd.ms-word.template.macroenabled.12","application/vnd.ms-powerpoint.template.macroenabled.12","application/vnd.ms-powerpoint.presentation.macroenabled.12","application/java-archive","application/vnd.rn-realmedia","application/x-spss-sav","application/x-ms-regedit","application/x-ft-windows-registry-hive","application/x-jmp-data"];var he=4100;async function ke(i,e){return new we(e).fromBuffer(i)}function ge(i){switch(i=i.toLowerCase(),i){case"application/epub+zip":return{ext:"epub",mime:i};case"application/vnd.oasis.opendocument.text":return{ext:"odt",mime:i};case"application/vnd.oasis.opendocument.text-template":return{ext:"ott",mime:i};case"application/vnd.oasis.opendocument.spreadsheet":return{ext:"ods",mime:i};case"application/vnd.oasis.opendocument.spreadsheet-template":return{ext:"ots",mime:i};case"application/vnd.oasis.opendocument.presentation":return{ext:"odp",mime:i};case"application/vnd.oasis.opendocument.presentation-template":return{ext:"otp",mime:i};case"application/vnd.oasis.opendocument.graphics":return{ext:"odg",mime:i};case"application/vnd.oasis.opendocument.graphics-template":return{ext:"otg",mime:i};case"application/vnd.openxmlformats-officedocument.presentationml.slideshow":return{ext:"ppsx",mime:i};case"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":return{ext:"xlsx",mime:i};case"application/vnd.ms-excel.sheet.macroenabled":return{ext:"xlsm",mime:"application/vnd.ms-excel.sheet.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.spreadsheetml.template":return{ext:"xltx",mime:i};case"application/vnd.ms-excel.template.macroenabled":return{ext:"xltm",mime:"application/vnd.ms-excel.template.macroenabled.12"};case"application/vnd.ms-powerpoint.slideshow.macroenabled":return{ext:"ppsm",mime:"application/vnd.ms-powerpoint.slideshow.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return{ext:"docx",mime:i};case"application/vnd.ms-word.document.macroenabled":return{ext:"docm",mime:"application/vnd.ms-word.document.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.wordprocessingml.template":return{ext:"dotx",mime:i};case"application/vnd.ms-word.template.macroenabledtemplate":return{ext:"dotm",mime:"application/vnd.ms-word.template.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.presentationml.template":return{ext:"potx",mime:i};case"application/vnd.ms-powerpoint.template.macroenabled":return{ext:"potm",mime:"application/vnd.ms-powerpoint.template.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.presentationml.presentation":return{ext:"pptx",mime:i};case"application/vnd.ms-powerpoint.presentation.macroenabled":return{ext:"pptm",mime:"application/vnd.ms-powerpoint.presentation.macroenabled.12"};case"application/vnd.ms-visio.drawing":return{ext:"vsdx",mime:"application/vnd.visio"};case"application/vnd.ms-package.3dmanufacturing-3dmodel+xml":return{ext:"3mf",mime:"model/3mf"};default:}}function A(i,e,t){t={offset:0,...t};for(let[r,n]of e.entries())if(t.mask){if(n!==(t.mask[r]&i[r+t.offset]))return!1}else if(n!==i[r+t.offset])return!1;return!0}var we=class{constructor(e){this.options={mpegOffsetTolerance:0,...e},this.detectors=[...e?.customDetectors??[],{id:"core",detect:this.detectConfident},{id:"core.imprecise",detect:this.detectImprecise}],this.tokenizerOptions={abortSignal:e?.signal}}async fromTokenizer(e){let t=e.position;for(let r of this.detectors){let n=await r.detect(e);if(n)return n;if(t!==e.position)return}}async fromBuffer(e){if(!(e instanceof Uint8Array||e instanceof ArrayBuffer))throw new TypeError(`Expected the \`input\` argument to be of type \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof e}\``);let t=e instanceof Uint8Array?e:new Uint8Array(e);if(t?.length>1)return this.fromTokenizer(ve(t,this.tokenizerOptions))}async fromBlob(e){let t=Se(e,this.tokenizerOptions);try{return await this.fromTokenizer(t)}finally{await t.close()}}async fromStream(e){let t=se(e,this.tokenizerOptions);try{return await this.fromTokenizer(t)}finally{await t.close()}}async toDetectionStream(e,t){let{sampleSize:r=he}=t,n,o,s=e.getReader({mode:"byob"});try{let{value:m,done:a}=await s.read(new Uint8Array(r));if(o=m,!a&&m)try{n=await this.fromBuffer(m.subarray(0,r))}catch(f){if(!(f instanceof x))throw f;n=void 0}o=m}finally{s.releaseLock()}let c=new TransformStream({async start(m){m.enqueue(o)},transform(m,a){a.enqueue(m)}}),p=e.pipeThrough(c);return p.fileType=n,p}check(e,t){return A(this.buffer,e,t)}checkString(e,t){return this.check(Ze(e,t?.encoding),t)}detectConfident=async e=>{if(this.buffer=new Uint8Array(he),e.fileInfo.size===void 0&&(e.fileInfo.size=Number.MAX_SAFE_INTEGER),this.tokenizer=e,await e.peekBuffer(this.buffer,{length:32,mayBeLess:!0}),this.check([66,77]))return{ext:"bmp",mime:"image/bmp"};if(this.check([11,119]))return{ext:"ac3",mime:"audio/vnd.dolby.dd-raw"};if(this.check([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(this.check([77,90]))return{ext:"exe",mime:"application/x-msdownload"};if(this.check([37,33]))return await e.peekBuffer(this.buffer,{length:24,mayBeLess:!0}),this.checkString("PS-Adobe-",{offset:2})&&this.checkString(" EPSF-",{offset:14})?{ext:"eps",mime:"application/eps"}:{ext:"ps",mime:"application/postscript"};if(this.check([31,160])||this.check([31,157]))return{ext:"Z",mime:"application/x-compress"};if(this.check([199,113]))return{ext:"cpio",mime:"application/x-cpio"};if(this.check([96,234]))return{ext:"arj",mime:"application/x-arj"};if(this.check([239,187,191]))return this.tokenizer.ignore(3),this.detectConfident(e);if(this.check([71,73,70]))return{ext:"gif",mime:"image/gif"};if(this.check([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(this.check([31,139,8])){let r=new W(e).inflate(),n=!0;try{let o;try{o=await this.fromStream(r)}catch{n=!1}if(o&&o.ext==="tar")return{ext:"tar.gz",mime:"application/gzip"}}finally{n&&await r.cancel()}return{ext:"gz",mime:"application/gzip"}}if(this.check([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(this.checkString("ID3")){await e.ignore(6);let t=await e.readToken(Ye);return e.position+t>e.fileInfo.size?{ext:"mp3",mime:"audio/mpeg"}:(await e.ignore(t),this.fromTokenizer(e))}if(this.checkString("MP+"))return{ext:"mpc",mime:"audio/x-musepack"};if((this.buffer[0]===67||this.buffer[0]===70)&&this.check([87,83],{offset:1}))return{ext:"swf",mime:"application/x-shockwave-flash"};if(this.check([255,216,255]))return this.check([247],{offset:3})?{ext:"jls",mime:"image/jls"}:{ext:"jpg",mime:"image/jpeg"};if(this.check([79,98,106,1]))return{ext:"avro",mime:"application/avro"};if(this.checkString("FLIF"))return{ext:"flif",mime:"image/flif"};if(this.checkString("8BPS"))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(this.checkString("MPCK"))return{ext:"mpc",mime:"audio/x-musepack"};if(this.checkString("FORM"))return{ext:"aif",mime:"audio/aiff"};if(this.checkString("icns",{offset:0}))return{ext:"icns",mime:"image/icns"};if(this.check([80,75,3,4])){let t;return await new H(e).unzip(r=>{switch(r.filename){case"META-INF/mozilla.rsa":return t={ext:"xpi",mime:"application/x-xpinstall"},{stop:!0};case"META-INF/MANIFEST.MF":return t={ext:"jar",mime:"application/java-archive"},{stop:!0};case"mimetype":return{async handler(n){let o=new TextDecoder("utf-8").decode(n).trim();t=ge(o)},stop:!0};case"[Content_Types].xml":return{async handler(n){let o=new TextDecoder("utf-8").decode(n),s=o.indexOf('.main+xml"');if(s===-1){let c="application/vnd.ms-package.3dmanufacturing-3dmodel+xml";o.includes(`ContentType="${c}"`)&&(t=ge(c))}else{o=o.slice(0,Math.max(0,s));let c=o.lastIndexOf('"'),p=o.slice(Math.max(0,c+1));t=ge(p)}},stop:!0};default:return/classes\d*\.dex/.test(r.filename)?(t={ext:"apk",mime:"application/vnd.android.package-archive"},{stop:!0}):{}}}).catch(r=>{if(!(r instanceof x))throw r}),t??{ext:"zip",mime:"application/zip"}}if(this.checkString("OggS")){await e.ignore(28);let t=new Uint8Array(8);return await e.readBuffer(t),A(t,[79,112,117,115,72,101,97,100])?{ext:"opus",mime:"audio/ogg; codecs=opus"}:A(t,[128,116,104,101,111,114,97])?{ext:"ogv",mime:"video/ogg"}:A(t,[1,118,105,100,101,111,0])?{ext:"ogm",mime:"video/ogg"}:A(t,[127,70,76,65,67])?{ext:"oga",mime:"audio/ogg"}:A(t,[83,112,101,101,120,32,32])?{ext:"spx",mime:"audio/ogg"}:A(t,[1,118,111,114,98,105,115])?{ext:"ogg",mime:"audio/ogg"}:{ext:"ogx",mime:"application/ogg"}}if(this.check([80,75])&&(this.buffer[2]===3||this.buffer[2]===5||this.buffer[2]===7)&&(this.buffer[3]===4||this.buffer[3]===6||this.buffer[3]===8))return{ext:"zip",mime:"application/zip"};if(this.checkString("MThd"))return{ext:"mid",mime:"audio/midi"};if(this.checkString("wOFF")&&(this.check([0,1,0,0],{offset:4})||this.checkString("OTTO",{offset:4})))return{ext:"woff",mime:"font/woff"};if(this.checkString("wOF2")&&(this.check([0,1,0,0],{offset:4})||this.checkString("OTTO",{offset:4})))return{ext:"woff2",mime:"font/woff2"};if(this.check([212,195,178,161])||this.check([161,178,195,212]))return{ext:"pcap",mime:"application/vnd.tcpdump.pcap"};if(this.checkString("DSD "))return{ext:"dsf",mime:"audio/x-dsf"};if(this.checkString("LZIP"))return{ext:"lz",mime:"application/x-lzip"};if(this.checkString("fLaC"))return{ext:"flac",mime:"audio/flac"};if(this.check([66,80,71,251]))return{ext:"bpg",mime:"image/bpg"};if(this.checkString("wvpk"))return{ext:"wv",mime:"audio/wavpack"};if(this.checkString("%PDF"))return{ext:"pdf",mime:"application/pdf"};if(this.check([0,97,115,109]))return{ext:"wasm",mime:"application/wasm"};if(this.check([73,73])){let t=await this.readTiffHeader(!1);if(t)return t}if(this.check([77,77])){let t=await this.readTiffHeader(!0);if(t)return t}if(this.checkString("MAC "))return{ext:"ape",mime:"audio/ape"};if(this.check([26,69,223,163])){async function t(){let c=await e.peekNumber(Be),p=128,m=0;for(;(c&p)===0&&p!==0;)++m,p>>=1;let a=new Uint8Array(m+1);return await e.readBuffer(a),a}async function r(){let c=await t(),p=await t();p[0]^=128>>p.length-1;let m=Math.min(6,p.length),a=new DataView(c.buffer),f=new DataView(p.buffer,p.length-m,m);return{id:de(a),len:de(f)}}async function n(c){for(;c>0;){let p=await r();if(p.id===17026)return(await e.readToken(new b(p.len))).replaceAll(/\00.*$/g,"");await e.ignore(p.len),--c}}let o=await r();switch(await n(o.len)){case"webm":return{ext:"webm",mime:"video/webm"};case"matroska":return{ext:"mkv",mime:"video/matroska"};default:return}}if(this.checkString("SQLi"))return{ext:"sqlite",mime:"application/x-sqlite3"};if(this.check([78,69,83,26]))return{ext:"nes",mime:"application/x-nintendo-nes-rom"};if(this.checkString("Cr24"))return{ext:"crx",mime:"application/x-google-chrome-extension"};if(this.checkString("MSCF")||this.checkString("ISc("))return{ext:"cab",mime:"application/vnd.ms-cab-compressed"};if(this.check([237,171,238,219]))return{ext:"rpm",mime:"application/x-rpm"};if(this.check([197,208,211,198]))return{ext:"eps",mime:"application/eps"};if(this.check([40,181,47,253]))return{ext:"zst",mime:"application/zstd"};if(this.check([127,69,76,70]))return{ext:"elf",mime:"application/x-elf"};if(this.check([33,66,68,78]))return{ext:"pst",mime:"application/vnd.ms-outlook"};if(this.checkString("PAR1")||this.checkString("PARE"))return{ext:"parquet",mime:"application/vnd.apache.parquet"};if(this.checkString("ttcf"))return{ext:"ttc",mime:"font/collection"};if(this.check([207,250,237,254]))return{ext:"macho",mime:"application/x-mach-binary"};if(this.check([4,34,77,24]))return{ext:"lz4",mime:"application/x-lz4"};if(this.checkString("regf"))return{ext:"dat",mime:"application/x-ft-windows-registry-hive"};if(this.checkString("$FL2")||this.checkString("$FL3"))return{ext:"sav",mime:"application/x-spss-sav"};if(this.check([79,84,84,79,0]))return{ext:"otf",mime:"font/otf"};if(this.checkString("#!AMR"))return{ext:"amr",mime:"audio/amr"};if(this.checkString("{\\rtf"))return{ext:"rtf",mime:"application/rtf"};if(this.check([70,76,86,1]))return{ext:"flv",mime:"video/x-flv"};if(this.checkString("IMPM"))return{ext:"it",mime:"audio/x-it"};if(this.checkString("-lh0-",{offset:2})||this.checkString("-lh1-",{offset:2})||this.checkString("-lh2-",{offset:2})||this.checkString("-lh3-",{offset:2})||this.checkString("-lh4-",{offset:2})||this.checkString("-lh5-",{offset:2})||this.checkString("-lh6-",{offset:2})||this.checkString("-lh7-",{offset:2})||this.checkString("-lzs-",{offset:2})||this.checkString("-lz4-",{offset:2})||this.checkString("-lz5-",{offset:2})||this.checkString("-lhd-",{offset:2}))return{ext:"lzh",mime:"application/x-lzh-compressed"};if(this.check([0,0,1,186])){if(this.check([33],{offset:4,mask:[241]}))return{ext:"mpg",mime:"video/MP1S"};if(this.check([68],{offset:4,mask:[196]}))return{ext:"mpg",mime:"video/MP2P"}}if(this.checkString("ITSF"))return{ext:"chm",mime:"application/vnd.ms-htmlhelp"};if(this.check([202,254,186,190]))return{ext:"class",mime:"application/java-vm"};if(this.checkString(".RMF"))return{ext:"rm",mime:"application/vnd.rn-realmedia"};if(this.checkString("DRACO"))return{ext:"drc",mime:"application/vnd.google.draco"};if(this.check([253,55,122,88,90,0]))return{ext:"xz",mime:"application/x-xz"};if(this.checkString("<?xml "))return{ext:"xml",mime:"application/xml"};if(this.check([55,122,188,175,39,28]))return{ext:"7z",mime:"application/x-7z-compressed"};if(this.check([82,97,114,33,26,7])&&(this.buffer[6]===0||this.buffer[6]===1))return{ext:"rar",mime:"application/x-rar-compressed"};if(this.checkString("solid "))return{ext:"stl",mime:"model/stl"};if(this.checkString("AC")){let t=new b(4,"latin1").get(this.buffer,2);if(t.match("^d*")&&t>=1e3&&t<=1050)return{ext:"dwg",mime:"image/vnd.dwg"}}if(this.checkString("070707"))return{ext:"cpio",mime:"application/x-cpio"};if(this.checkString("BLENDER"))return{ext:"blend",mime:"application/x-blender"};if(this.checkString("!<arch>"))return await e.ignore(8),await e.readToken(new b(13,"ascii"))==="debian-binary"?{ext:"deb",mime:"application/x-deb"}:{ext:"ar",mime:"application/x-unix-archive"};if(this.checkString("WEBVTT")&&[`
7
- `,"\r"," "," ","\0"].some(t=>this.checkString(t,{offset:6})))return{ext:"vtt",mime:"text/vtt"};if(this.check([137,80,78,71,13,10,26,10])){await e.ignore(8);async function t(){return{length:await e.readToken(Oe),type:await e.readToken(new b(4,"latin1"))}}do{let r=await t();if(r.length<0)return;switch(r.type){case"IDAT":return{ext:"png",mime:"image/png"};case"acTL":return{ext:"apng",mime:"image/apng"};default:await e.ignore(r.length+4)}}while(e.position+8<e.fileInfo.size);return{ext:"png",mime:"image/png"}}if(this.check([65,82,82,79,87,49,0,0]))return{ext:"arrow",mime:"application/vnd.apache.arrow.file"};if(this.check([103,108,84,70,2,0,0,0]))return{ext:"glb",mime:"model/gltf-binary"};if(this.check([102,114,101,101],{offset:4})||this.check([109,100,97,116],{offset:4})||this.check([109,111,111,118],{offset:4})||this.check([119,105,100,101],{offset:4}))return{ext:"mov",mime:"video/quicktime"};if(this.check([73,73,82,79,8,0,0,0,24]))return{ext:"orf",mime:"image/x-olympus-orf"};if(this.checkString("gimp xcf "))return{ext:"xcf",mime:"image/x-xcf"};if(this.checkString("ftyp",{offset:4})&&(this.buffer[8]&96)!==0){let t=new b(4,"latin1").get(this.buffer,8).replace("\0"," ").trim();switch(t){case"avif":case"avis":return{ext:"avif",mime:"image/avif"};case"mif1":return{ext:"heic",mime:"image/heif"};case"msf1":return{ext:"heic",mime:"image/heif-sequence"};case"heic":case"heix":return{ext:"heic",mime:"image/heic"};case"hevc":case"hevx":return{ext:"heic",mime:"image/heic-sequence"};case"qt":return{ext:"mov",mime:"video/quicktime"};case"M4V":case"M4VH":case"M4VP":return{ext:"m4v",mime:"video/x-m4v"};case"M4P":return{ext:"m4p",mime:"video/mp4"};case"M4B":return{ext:"m4b",mime:"audio/mp4"};case"M4A":return{ext:"m4a",mime:"audio/x-m4a"};case"F4V":return{ext:"f4v",mime:"video/mp4"};case"F4P":return{ext:"f4p",mime:"video/mp4"};case"F4A":return{ext:"f4a",mime:"audio/mp4"};case"F4B":return{ext:"f4b",mime:"audio/mp4"};case"crx":return{ext:"cr3",mime:"image/x-canon-cr3"};default:return t.startsWith("3g")?t.startsWith("3g2")?{ext:"3g2",mime:"video/3gpp2"}:{ext:"3gp",mime:"video/3gpp"}:{ext:"mp4",mime:"video/mp4"}}}if(this.checkString(`REGEDIT4\r
8
- `))return{ext:"reg",mime:"application/x-ms-regedit"};if(this.check([82,73,70,70])){if(this.checkString("WEBP",{offset:8}))return{ext:"webp",mime:"image/webp"};if(this.check([65,86,73],{offset:8}))return{ext:"avi",mime:"video/vnd.avi"};if(this.check([87,65,86,69],{offset:8}))return{ext:"wav",mime:"audio/wav"};if(this.check([81,76,67,77],{offset:8}))return{ext:"qcp",mime:"audio/qcelp"}}if(this.check([73,73,85,0,24,0,0,0,136,231,116,216]))return{ext:"rw2",mime:"image/x-panasonic-rw2"};if(this.check([48,38,178,117,142,102,207,17,166,217])){async function t(){let r=new Uint8Array(16);return await e.readBuffer(r),{id:r,size:Number(await e.readToken(De))}}for(await e.ignore(30);e.position+24<e.fileInfo.size;){let r=await t(),n=r.size-24;if(A(r.id,[145,7,220,183,183,169,207,17,142,230,0,192,12,32,83,101])){let o=new Uint8Array(16);if(n-=await e.readBuffer(o),A(o,[64,158,105,248,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"asf",mime:"audio/x-ms-asf"};if(A(o,[192,239,25,188,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"asf",mime:"video/x-ms-asf"};break}await e.ignore(n)}return{ext:"asf",mime:"application/vnd.ms-asf"}}if(this.check([171,75,84,88,32,49,49,187,13,10,26,10]))return{ext:"ktx",mime:"image/ktx"};if((this.check([126,16,4])||this.check([126,24,4]))&&this.check([48,77,73,69],{offset:4}))return{ext:"mie",mime:"application/x-mie"};if(this.check([39,10,0,0,0,0,0,0,0,0,0,0],{offset:2}))return{ext:"shp",mime:"application/x-esri-shape"};if(this.check([255,79,255,81]))return{ext:"j2c",mime:"image/j2c"};if(this.check([0,0,0,12,106,80,32,32,13,10,135,10]))switch(await e.ignore(20),await e.readToken(new b(4,"ascii"))){case"jp2 ":return{ext:"jp2",mime:"image/jp2"};case"jpx ":return{ext:"jpx",mime:"image/jpx"};case"jpm ":return{ext:"jpm",mime:"image/jpm"};case"mjp2":return{ext:"mj2",mime:"image/mj2"};default:return}if(this.check([255,10])||this.check([0,0,0,12,74,88,76,32,13,10,135,10]))return{ext:"jxl",mime:"image/jxl"};if(this.check([254,255]))return this.checkString("<?xml ",{offset:2,encoding:"utf-16be"})?{ext:"xml",mime:"application/xml"}:void 0;if(this.check([208,207,17,224,161,177,26,225]))return{ext:"cfb",mime:"application/x-cfb"};if(await e.peekBuffer(this.buffer,{length:Math.min(256,e.fileInfo.size),mayBeLess:!0}),this.check([97,99,115,112],{offset:36}))return{ext:"icc",mime:"application/vnd.iccprofile"};if(this.checkString("**ACE",{offset:7})&&this.checkString("**",{offset:12}))return{ext:"ace",mime:"application/x-ace-compressed"};if(this.checkString("BEGIN:")){if(this.checkString("VCARD",{offset:6}))return{ext:"vcf",mime:"text/vcard"};if(this.checkString("VCALENDAR",{offset:6}))return{ext:"ics",mime:"text/calendar"}}if(this.checkString("FUJIFILMCCD-RAW"))return{ext:"raf",mime:"image/x-fujifilm-raf"};if(this.checkString("Extended Module:"))return{ext:"xm",mime:"audio/x-xm"};if(this.checkString("Creative Voice File"))return{ext:"voc",mime:"audio/x-voc"};if(this.check([4,0,0,0])&&this.buffer.length>=16){let t=new DataView(this.buffer.buffer).getUint32(12,!0);if(t>12&&this.buffer.length>=t+16)try{let r=new TextDecoder().decode(this.buffer.subarray(16,t+16));if(JSON.parse(r).files)return{ext:"asar",mime:"application/x-asar"}}catch{}}if(this.check([6,14,43,52,2,5,1,1,13,1,2,1,1,2]))return{ext:"mxf",mime:"application/mxf"};if(this.checkString("SCRM",{offset:44}))return{ext:"s3m",mime:"audio/x-s3m"};if(this.check([71])&&this.check([71],{offset:188}))return{ext:"mts",mime:"video/mp2t"};if(this.check([71],{offset:4})&&this.check([71],{offset:196}))return{ext:"mts",mime:"video/mp2t"};if(this.check([66,79,79,75,77,79,66,73],{offset:60}))return{ext:"mobi",mime:"application/x-mobipocket-ebook"};if(this.check([68,73,67,77],{offset:128}))return{ext:"dcm",mime:"application/dicom"};if(this.check([76,0,0,0,1,20,2,0,0,0,0,0,192,0,0,0,0,0,0,70]))return{ext:"lnk",mime:"application/x.ms.shortcut"};if(this.check([98,111,111,107,0,0,0,0,109,97,114,107,0,0,0,0]))return{ext:"alias",mime:"application/x.apple.alias"};if(this.checkString("Kaydara FBX Binary \0"))return{ext:"fbx",mime:"application/x.autodesk.fbx"};if(this.check([76,80],{offset:34})&&(this.check([0,0,1],{offset:8})||this.check([1,0,2],{offset:8})||this.check([2,0,2],{offset:8})))return{ext:"eot",mime:"application/vnd.ms-fontobject"};if(this.check([6,6,237,245,216,29,70,229,189,49,239,231,254,116,183,29]))return{ext:"indd",mime:"application/x-indesign"};if(this.check([255,255,0,0,7,0,0,0,4,0,0,0,1,0,1,0])||this.check([0,0,255,255,0,0,0,7,0,0,0,4,0,1,0,1]))return{ext:"jmp",mime:"application/x-jmp-data"};if(await e.peekBuffer(this.buffer,{length:Math.min(512,e.fileInfo.size),mayBeLess:!0}),this.checkString("ustar",{offset:257})&&(this.checkString("\0",{offset:262})||this.checkString(" ",{offset:262}))||this.check([0,0,0,0,0,0],{offset:257})&&Qe(this.buffer))return{ext:"tar",mime:"application/x-tar"};if(this.check([255,254])){let t="utf-16le";return this.checkString("<?xml ",{offset:2,encoding:t})?{ext:"xml",mime:"application/xml"}:this.check([255,14],{offset:2})&&this.checkString("SketchUp Model",{offset:4,encoding:t})?{ext:"skp",mime:"application/vnd.sketchup.skp"}:this.checkString(`Windows Registry Editor Version 5.00\r
9
- `,{offset:2,encoding:t})?{ext:"reg",mime:"application/x-ms-regedit"}:void 0}if(this.checkString("-----BEGIN PGP MESSAGE-----"))return{ext:"pgp",mime:"application/pgp-encrypted"}};detectImprecise=async e=>{if(this.buffer=new Uint8Array(he),await e.peekBuffer(this.buffer,{length:Math.min(8,e.fileInfo.size),mayBeLess:!0}),this.check([0,0,1,186])||this.check([0,0,1,179]))return{ext:"mpg",mime:"video/mpeg"};if(this.check([0,1,0,0,0]))return{ext:"ttf",mime:"font/ttf"};if(this.check([0,0,1,0]))return{ext:"ico",mime:"image/x-icon"};if(this.check([0,0,2,0]))return{ext:"cur",mime:"image/x-icon"};if(await e.peekBuffer(this.buffer,{length:Math.min(2+this.options.mpegOffsetTolerance,e.fileInfo.size),mayBeLess:!0}),this.buffer.length>=2+this.options.mpegOffsetTolerance)for(let t=0;t<=this.options.mpegOffsetTolerance;++t){let r=this.scanMpeg(t);if(r)return r}};async readTiffTag(e){let t=await this.tokenizer.readToken(e?R:d);switch(this.tokenizer.ignore(10),t){case 50341:return{ext:"arw",mime:"image/x-sony-arw"};case 50706:return{ext:"dng",mime:"image/x-adobe-dng"};default:}}async readTiffIFD(e){let t=await this.tokenizer.readToken(e?R:d);for(let r=0;r<t;++r){let n=await this.readTiffTag(e);if(n)return n}}async readTiffHeader(e){let t=(e?R:d).get(this.buffer,2),r=(e?Ie:h).get(this.buffer,4);if(t===42){if(r>=6){if(this.checkString("CR",{offset:8}))return{ext:"cr2",mime:"image/x-canon-cr2"};if(r>=8){let o=(e?R:d).get(this.buffer,8),s=(e?R:d).get(this.buffer,10);if(o===28&&s===254||o===31&&s===11)return{ext:"nef",mime:"image/x-nikon-nef"}}}return await this.tokenizer.ignore(r),await this.readTiffIFD(e)??{ext:"tif",mime:"image/tiff"}}if(t===43)return{ext:"tif",mime:"image/tiff"}}scanMpeg(e){if(this.check([255,224],{offset:e,mask:[255,224]})){if(this.check([16],{offset:e+1,mask:[22]}))return this.check([8],{offset:e+1,mask:[8]})?{ext:"aac",mime:"audio/aac"}:{ext:"aac",mime:"audio/aac"};if(this.check([2],{offset:e+1,mask:[6]}))return{ext:"mp3",mime:"audio/mpeg"};if(this.check([4],{offset:e+1,mask:[6]}))return{ext:"mp2",mime:"audio/mpeg"};if(this.check([6],{offset:e+1,mask:[6]}))return{ext:"mp1",mime:"audio/mpeg"}}}},Ht=new Set(Ke),Wt=new Set(et);var Vt={name:"file",summary:"determine file type",usage:"file [OPTION]... FILE...",options:["-b, --brief do not prepend filenames to output","-i, --mime output MIME type strings","-L, --dereference follow symlinks"," --help display this help and exit"]},qt=new Map([[".js",{description:"JavaScript source",mime:"text/javascript"}],[".mjs",{description:"JavaScript module",mime:"text/javascript"}],[".cjs",{description:"CommonJS module",mime:"text/javascript"}],[".ts",{description:"TypeScript source",mime:"text/typescript"}],[".tsx",{description:"TypeScript JSX source",mime:"text/typescript"}],[".jsx",{description:"JavaScript JSX source",mime:"text/javascript"}],[".py",{description:"Python script",mime:"text/x-python"}],[".rb",{description:"Ruby script",mime:"text/x-ruby"}],[".go",{description:"Go source",mime:"text/x-go"}],[".rs",{description:"Rust source",mime:"text/x-rust"}],[".c",{description:"C source",mime:"text/x-c"}],[".h",{description:"C header",mime:"text/x-c"}],[".cpp",{description:"C++ source",mime:"text/x-c++"}],[".hpp",{description:"C++ header",mime:"text/x-c++"}],[".java",{description:"Java source",mime:"text/x-java"}],[".sh",{description:"Bourne-Again shell script",mime:"text/x-shellscript"}],[".bash",{description:"Bourne-Again shell script",mime:"text/x-shellscript"}],[".zsh",{description:"Zsh shell script",mime:"text/x-shellscript"}],[".json",{description:"JSON data",mime:"application/json"}],[".yaml",{description:"YAML data",mime:"text/yaml"}],[".yml",{description:"YAML data",mime:"text/yaml"}],[".xml",{description:"XML document",mime:"application/xml"}],[".csv",{description:"CSV text",mime:"text/csv"}],[".toml",{description:"TOML data",mime:"text/toml"}],[".html",{description:"HTML document",mime:"text/html"}],[".htm",{description:"HTML document",mime:"text/html"}],[".css",{description:"CSS stylesheet",mime:"text/css"}],[".svg",{description:"SVG image",mime:"image/svg+xml"}],[".md",{description:"Markdown document",mime:"text/markdown"}],[".markdown",{description:"Markdown document",mime:"text/markdown"}],[".txt",{description:"ASCII text",mime:"text/plain"}],[".rst",{description:"reStructuredText",mime:"text/x-rst"}],[".env",{description:"ASCII text",mime:"text/plain"}],[".gitignore",{description:"ASCII text",mime:"text/plain"}],[".dockerignore",{description:"ASCII text",mime:"text/plain"}]]),Gt=new Map([["jpg","JPEG image data"],["jpeg","JPEG image data"],["png","PNG image data"],["gif","GIF image data"],["webp","WebP image data"],["bmp","PC bitmap"],["ico","MS Windows icon resource"],["tif","TIFF image data"],["tiff","TIFF image data"],["psd","Adobe Photoshop Document"],["avif","AVIF image"],["heic","HEIC image"],["heif","HEIF image"],["jxl","JPEG XL image"],["icns","Mac OS X icon"],["svg","SVG Scalable Vector Graphics image"],["pdf","PDF document"],["epub","EPUB document"],["mobi","Mobipocket E-book"],["djvu","DjVu document"],["zip","Zip archive data"],["gz","gzip compressed data"],["gzip","gzip compressed data"],["bz2","bzip2 compressed data"],["xz","XZ compressed data"],["tar","POSIX tar archive"],["rar","RAR archive data"],["7z","7-zip archive data"],["lz","lzip compressed data"],["lzma","LZMA compressed data"],["zst","Zstandard compressed data"],["cab","Microsoft Cabinet archive"],["ar","Unix ar archive"],["rpm","RPM package"],["deb","Debian binary package"],["apk","Android Package"],["dmg","Apple disk image"],["iso","ISO 9660 CD-ROM filesystem data"],["vhd","Microsoft Virtual Hard Disk"],["vhdx","Microsoft Virtual Hard Disk (new format)"],["qcow2","QEMU QCOW Image"],["mp3","Audio file with ID3"],["m4a","MPEG-4 audio"],["aac","AAC audio"],["wav","RIFF (little-endian) data, WAVE audio"],["flac","FLAC audio bitstream data"],["ogg","Ogg data"],["oga","Ogg audio"],["opus","Ogg Opus audio"],["aiff","AIFF audio"],["wma","Windows Media Audio"],["amr","AMR audio"],["mid","MIDI audio"],["midi","MIDI audio"],["ape","Monkey's Audio"],["mp4","ISO Media, MPEG-4"],["m4v","MPEG-4 video"],["webm","WebM"],["avi","RIFF (little-endian) data, AVI"],["mov","ISO Media, Apple QuickTime movie"],["mkv","Matroska data"],["wmv","Windows Media Video"],["flv","Flash Video"],["3gp","3GPP multimedia"],["3g2","3GPP2 multimedia"],["ogv","Ogg video"],["mts","MPEG transport stream"],["m2ts","MPEG transport stream"],["ts","MPEG transport stream"],["mpg","MPEG video"],["mpeg","MPEG video"],["exe","PE32 executable"],["dll","PE32 DLL"],["elf","ELF executable"],["mach","Mach-O executable"],["wasm","WebAssembly (wasm) binary module"],["dex","Android Dalvik executable"],["class","Java class file"],["swf","Adobe Flash"],["doc","Microsoft Word Document"],["docx","Microsoft Word 2007+ Document"],["xls","Microsoft Excel Spreadsheet"],["xlsx","Microsoft Excel 2007+ Spreadsheet"],["ppt","Microsoft PowerPoint Presentation"],["pptx","Microsoft PowerPoint 2007+ Presentation"],["odt","OpenDocument Text"],["ods","OpenDocument Spreadsheet"],["odp","OpenDocument Presentation"],["ttf","TrueType Font"],["otf","OpenType Font"],["woff","Web Open Font Format"],["woff2","Web Open Font Format 2"],["eot","Embedded OpenType font"],["stl","Stereolithography CAD"],["obj","Wavefront 3D Object"],["gltf","GL Transmission Format"],["glb","GL Transmission Format (binary)"],["sqlite","SQLite 3.x database"],["mdb","Microsoft Access Database"],["xml","XML document"],["json","JSON data"],["macho","Mach-O binary"],["ics","iCalendar data"],["vcf","vCard data"],["msi","Microsoft Installer"],["ps","PostScript"],["ai","Adobe Illustrator"],["indd","Adobe InDesign"],["sketch","Sketch design file"],["fig","Figma design file"],["xd","Adobe XD"],["blend","Blender"],["fbx","Autodesk FBX"],["lnk","MS Windows shortcut"],["alias","Mac OS alias"],["torrent","BitTorrent file"],["pcap","pcap capture file"],["arrow","Apache Arrow"],["parquet","Apache Parquet"]]);function Jt(i,e){let t=Gt.get(i);if(t)return t;let[r,n]=e.split("/"),o=n?.split("+")[0]?.replace(/-/g," ")||i;switch(r){case"image":return`${o.toUpperCase()} image data`;case"audio":return`${o.toUpperCase()} audio`;case"video":return`${o.toUpperCase()} video`;case"font":return`${o} font`;case"model":return`${o} 3D model`;case"application":return n?.includes("zip")||n?.includes("compressed")?`${o} archive data`:n?.includes("executable")?`${o} executable`:`${i.toUpperCase()} data`;default:return`${i.toUpperCase()} data`}}function Xt(i){let e=i.split("/").pop()||i;if(e.startsWith(".")&&!e.includes(".",1))return e;let t=e.lastIndexOf(".");return t===-1||t===0?"":e.slice(t).toLowerCase()}function Zt(i,e){if(i.startsWith("#!")){let m=i.split(`
10
- `)[0];return m.includes("python")?{description:"Python script, ASCII text executable",mime:"text/x-python"}:m.includes("node")||m.includes("bun")||m.includes("deno")?{description:"JavaScript script, ASCII text executable",mime:"text/javascript"}:m.includes("bash")?{description:"Bourne-Again shell script, ASCII text executable",mime:"text/x-shellscript"}:m.includes("sh")?{description:"POSIX shell script, ASCII text executable",mime:"text/x-shellscript"}:m.includes("ruby")?{description:"Ruby script, ASCII text executable",mime:"text/x-ruby"}:m.includes("perl")?{description:"Perl script, ASCII text executable",mime:"text/x-perl"}:{description:"script, ASCII text executable",mime:"text/plain"}}let t=i.trimStart();if(t.startsWith("<?xml"))return{description:"XML document",mime:"application/xml"};if(t.startsWith("<!DOCTYPE html")||t.toLowerCase().startsWith("<html"))return{description:"HTML document",mime:"text/html"};let r=i.includes(`\r
11
- `),n=i.includes("\r")&&!r,o="";r?o=", with CRLF line terminators":n&&(o=", with CR line terminators");let s=Xt(e),c=s?qt.get(s):void 0;if(c)return c.mime.startsWith("text/")&&o?{description:`${c.description}${o}`,mime:c.mime}:c;let p=!1;for(let m=0;m<Math.min(i.length,8192);m++)if(i.charCodeAt(m)>127){p=!0;break}return p?{description:`UTF-8 Unicode text${o}`,mime:"text/plain; charset=utf-8"}:{description:`ASCII text${o}`,mime:"text/plain"}}async function Qt(i,e){if(e.length===0)return{description:"empty",mime:"inode/x-empty"};let t=await ke(e);if(t)return{description:Jt(t.ext,t.mime),mime:t.mime};let r=new TextDecoder("utf-8",{fatal:!1}).decode(e);return Zt(r,i)}var Dr={name:"file",async execute(i,e){if(Fe(i))return Ce(Vt);let t=!1,r=!1,n=[];for(let c of i)if(c.startsWith("--")){if(c==="--brief")t=!0;else if(c==="--mime"||c==="--mime-type")r=!0;else if(c!=="--dereference")return ne("file",c)}else if(c.startsWith("-")&&c!=="-"){for(let p of c.slice(1))if(p==="b")t=!0;else if(p==="i")r=!0;else if(p!=="L")return ne("file",`-${p}`)}else n.push(c);if(n.length===0)return{stdout:"",stderr:`Usage: file [-bLi] FILE...
12
- `,exitCode:1};let o="",s=0;for(let c of n)try{let p=e.fs.resolvePath(e.cwd,c);if((await e.fs.stat(p)).isDirectory){let u=r?"inode/directory":"directory";o+=t?`${u}
13
- `:`${c}: ${u}
14
- `;continue}let a=await e.fs.readFileBuffer(p),f=await Qt(c,a),l=r?f.mime:f.description;o+=t?`${l}
15
- `:`${c}: ${l}
16
- `}catch{o+=t?`cannot open
17
- `:`${c}: cannot open (No such file or directory)
18
- `,s=1}return{stdout:o,stderr:"",exitCode:s}}},Mr={name:"file",flags:[{flag:"-b",type:"boolean"},{flag:"-i",type:"boolean"},{flag:"-L",type:"boolean"}],needsArgs:!0};export{Dr as a,Mr as b};
19
- /*! Bundled license information:
20
-
21
- ieee754/index.js:
22
- (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
23
- */
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env node
2
- import{a as m,b as y,c as k}from"./chunk-GTNBSMZR.js";var F=new Map([["sha1","SHA-1"],["sha256","SHA-256"]]);function L(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,o=(n.length%64<56?56:120)-n.length%64,s=new Uint8Array(n.length+o+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 U=w,a=l,x=p,c=e;for(let t=0;t<64;t++){let i,$;t<16?(i=a&x|~a&c,$=t):t<32?(i=c&a|~c&x,$=(5*t+1)%16):t<48?(i=a^x^c,$=(3*t+5)%16):(i=x^(a|~c),$=7*t%16),i=i+U+g[t]+u[$]>>>0,U=c,c=x,x=a,a=a+h(i,A[t])>>>0}w=w+U>>>0,l=l+a>>>0,p=p+x>>>0,e=e+c>>>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 L(h);let g=F.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 S(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,o){if(y(b))return m(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(o.stdin,f=>f.charCodeAt(0));try{return await o.fs.readFileBuffer(o.fs.resolvePath(o.cwd,e))}catch{return null}};if(s){let e=0,f="";for(let r of d){let u=r==="-"?o.stdin:await o.fs.readFile(o.fs.resolvePath(o.cwd,r)).catch(()=>null);if(u===null)return{stdout:"",stderr:`${n}: ${r}: No such file or directory
3
- `,exitCode:1};for(let U of u.split(`
4
- `)){let a=U.match(/^([a-fA-F0-9]+)\s+[* ]?(.+)$/);if(!a)continue;let[,x,c]=a,t=await w(c);if(t===null){f+=`${c}: FAILED open or read
5
- `,e++;continue}let i=await C(h,t)===x.toLowerCase();f+=`${c}: ${i?"OK":"FAILED"}
6
- `,i||e++}}return e>0&&(f+=`${n}: WARNING: ${e} computed checksum${e>1?"s":""} did NOT match
7
- `),{stdout:f,stderr:"",exitCode:e>0?1:0}}let l="",p=0;for(let e of d){let f=await w(e);if(f===null){l+=`${n}: ${e}: No such file or directory
8
- `,p=1;continue}l+=`${await C(h,f)} ${e}
9
- `}return{stdout:l,stderr:"",exitCode:p}}}}export{S as a};
@@ -1,19 +0,0 @@
1
- #!/usr/bin/env node
2
- import{a as N}from"./chunk-JBABAK44.js";import{a as S,b as E}from"./chunk-GTNBSMZR.js";var b=class{diff(e,t,n={}){let s;typeof n=="function"?(s=n,n={}):"callback"in n&&(s=n.callback);let c=this.castInput(e,n),f=this.castInput(t,n),i=this.removeEmpty(this.tokenize(c,n)),a=this.removeEmpty(this.tokenize(f,n));return this.diffWithOptionsObj(i,a,n,s)}diffWithOptionsObj(e,t,n,s){var c;let f=r=>{if(r=this.postProcess(r,n),s){setTimeout(function(){s(r)},0);return}else return r},i=t.length,a=e.length,d=1,o=i+a;n.maxEditLength!=null&&(o=Math.min(o,n.maxEditLength));let g=(c=n.timeout)!==null&&c!==void 0?c:1/0,w=Date.now()+g,m=[{oldPos:-1,lastComponent:void 0}],P=this.extractCommon(m[0],t,e,0,n);if(m[0].oldPos+1>=a&&P+1>=i)return f(this.buildValues(m[0].lastComponent,t,e));let C=-1/0,x=1/0,y=()=>{for(let r=Math.max(C,-d);r<=Math.min(x,d);r+=2){let u,h=m[r-1],p=m[r+1];h&&(m[r-1]=void 0);let L=!1;if(p){let I=p.oldPos-r;L=p&&0<=I&&I<i}let v=h&&h.oldPos+1<a;if(!L&&!v){m[r]=void 0;continue}if(!v||L&&h.oldPos<p.oldPos?u=this.addToPath(p,!0,!1,0,n):u=this.addToPath(h,!1,!0,1,n),P=this.extractCommon(u,t,e,r,n),u.oldPos+1>=a&&P+1>=i)return f(this.buildValues(u.lastComponent,t,e))||!0;m[r]=u,u.oldPos+1>=a&&(x=Math.min(x,r-1)),P+1>=i&&(C=Math.max(C,r+1))}d++};if(s)(function r(){setTimeout(function(){if(d>o||Date.now()>w)return s(void 0);y()||r()},0)})();else for(;d<=o&&Date.now()<=w;){let r=y();if(r)return r}}addToPath(e,t,n,s,c){let f=e.lastComponent;return f&&!c.oneChangePerToken&&f.added===t&&f.removed===n?{oldPos:e.oldPos+s,lastComponent:{count:f.count+1,added:t,removed:n,previousComponent:f.previousComponent}}:{oldPos:e.oldPos+s,lastComponent:{count:1,added:t,removed:n,previousComponent:f}}}extractCommon(e,t,n,s,c){let f=t.length,i=n.length,a=e.oldPos,d=a-s,o=0;for(;d+1<f&&a+1<i&&this.equals(n[a+1],t[d+1],c);)d++,a++,o++,c.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return o&&!c.oneChangePerToken&&(e.lastComponent={count:o,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=a,d}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join("")}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let s=[],c;for(;e;)s.push(e),c=e.previousComponent,delete e.previousComponent,e=c;s.reverse();let f=s.length,i=0,a=0,d=0;for(;i<f;i++){let o=s[i];if(o.removed)o.value=this.join(n.slice(d,d+o.count)),d+=o.count;else{if(!o.added&&this.useLongestToken){let g=t.slice(a,a+o.count);g=g.map(function(w,m){let P=n[d+m];return P.length>w.length?P:w}),o.value=this.join(g)}else o.value=this.join(t.slice(a,a+o.count));a+=o.count,o.added||(d+=o.count)}}return s}};var T=class extends b{constructor(){super(...arguments),this.tokenize=W}equals(e,t,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(`
3
- `))&&(e=e.trim()),(!n.newlineIsToken||!t.includes(`
4
- `))&&(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith(`
5
- `)&&(e=e.slice(0,-1)),t.endsWith(`
6
- `)&&(t=t.slice(0,-1))),super.equals(e,t,n)}},O=new T;function D(l,e,t){return O.diff(l,e,t)}function W(l,e){e.stripTrailingCr&&(l=l.replace(/\r\n/g,`
7
- `));let t=[],n=l.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(let s=0;s<n.length;s++){let c=n[s];s%2&&!e.newlineIsToken?t[t.length-1]+=c:t.push(c)}return t}function F(l,e,t,n,s,c,f){let i;f?typeof f=="function"?i={callback:f}:i=f:i={},typeof i.context>"u"&&(i.context=4);let a=i.context;if(i.newlineIsToken)throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(i.callback){let{callback:o}=i;D(t,n,Object.assign(Object.assign({},i),{callback:g=>{let w=d(g);o(w)}}))}else return d(D(t,n,i));function d(o){if(!o)return;o.push({value:"",lines:[]});function g(r){return r.map(function(u){return" "+u})}let w=[],m=0,P=0,C=[],x=1,y=1;for(let r=0;r<o.length;r++){let u=o[r],h=u.lines||A(u.value);if(u.lines=h,u.added||u.removed){if(!m){let p=o[r-1];m=x,P=y,p&&(C=a>0?g(p.lines.slice(-a)):[],m-=C.length,P-=C.length)}for(let p of h)C.push((u.added?"+":"-")+p);u.added?y+=h.length:x+=h.length}else{if(m)if(h.length<=a*2&&r<o.length-2)for(let p of g(h))C.push(p);else{let p=Math.min(h.length,a);for(let v of g(h.slice(0,p)))C.push(v);let L={oldStart:m,oldLines:x-m+p,newStart:P,newLines:y-P+p,lines:C};w.push(L),m=0,P=0,C=[]}x+=h.length,y+=h.length}}for(let r of w)for(let u=0;u<r.lines.length;u++)r.lines[u].endsWith(`
8
- `)?r.lines[u]=r.lines[u].slice(0,-1):(r.lines.splice(u+1,0,"\"),u++);return{oldFileName:l,newFileName:e,oldHeader:s,newHeader:c,hunks:w}}}function k(l){if(Array.isArray(l))return l.map(k).join(`
9
- `);let e=[];l.oldFileName==l.newFileName&&e.push("Index: "+l.oldFileName),e.push("==================================================================="),e.push("--- "+l.oldFileName+(typeof l.oldHeader>"u"?"":" "+l.oldHeader)),e.push("+++ "+l.newFileName+(typeof l.newHeader>"u"?"":" "+l.newHeader));for(let t=0;t<l.hunks.length;t++){let n=l.hunks[t];n.oldLines===0&&(n.oldStart-=1),n.newLines===0&&(n.newStart-=1),e.push("@@ -"+n.oldStart+","+n.oldLines+" +"+n.newStart+","+n.newLines+" @@");for(let s of n.lines)e.push(s)}return e.join(`
10
- `)+`
11
- `}function j(l,e,t,n,s,c,f){if(typeof f=="function"&&(f={callback:f}),f?.callback){let{callback:i}=f;F(l,e,t,n,s,c,Object.assign(Object.assign({},f),{callback:a=>{i(a?k(a):void 0)}}))}else{let i=F(l,e,t,n,s,c,f);return i?k(i):void 0}}function A(l){let e=l.endsWith(`
12
- `),t=l.split(`
13
- `).map(n=>n+`
14
- `);return e?t.pop():t.push(t.pop().slice(0,-1)),t}var M={name:"diff",summary:"compare files line by line",usage:"diff [OPTION]... FILE1 FILE2",options:["-u, --unified output unified diff format (default)","-q, --brief report only whether files differ","-s, --report-identical-files report when files are the same","-i, --ignore-case ignore case differences"," --help display this help and exit"]},q={unified:{short:"u",long:"unified",type:"boolean"},brief:{short:"q",long:"brief",type:"boolean"},reportSame:{short:"s",long:"report-identical-files",type:"boolean"},ignoreCase:{short:"i",long:"ignore-case",type:"boolean"}},K={name:"diff",async execute(l,e){if(E(l))return S(M);let t=N("diff",l,q);if(!t.ok)return t.error;let n=t.result.flags.brief,s=t.result.flags.reportSame,c=t.result.flags.ignoreCase,f=t.result.positional;if(t.result.flags.unified,f.length<2)return{stdout:"",stderr:`diff: missing operand
15
- `,exitCode:2};let i,a,[d,o]=f;try{i=d==="-"?e.stdin:await e.fs.readFile(e.fs.resolvePath(e.cwd,d))}catch{return{stdout:"",stderr:`diff: ${d}: No such file or directory
16
- `,exitCode:2}}try{a=o==="-"?e.stdin:await e.fs.readFile(e.fs.resolvePath(e.cwd,o))}catch{return{stdout:"",stderr:`diff: ${o}: No such file or directory
17
- `,exitCode:2}}let g=i,w=a;return c&&(g=g.toLowerCase(),w=w.toLowerCase()),g===w?s?{stdout:`Files ${d} and ${o} are identical
18
- `,stderr:"",exitCode:0}:{stdout:"",stderr:"",exitCode:0}:n?{stdout:`Files ${d} and ${o} differ
19
- `,stderr:"",exitCode:1}:{stdout:j(d,o,i,a,"","",{context:3}),stderr:"",exitCode:1}}},Q={name:"diff",flags:[{flag:"-u",type:"boolean"},{flag:"-q",type:"boolean"},{flag:"-s",type:"boolean"},{flag:"-i",type:"boolean"}],needsArgs:!0,minArgs:2};export{K as a,Q as b};
@@ -1,11 +0,0 @@
1
- #!/usr/bin/env node
2
- import{a as d,b as f,c as u}from"./chunk-GTNBSMZR.js";var h={name:"expand",summary:"convert tabs to spaces",usage:"expand [OPTION]... [FILE]...",description:"Convert TABs in each FILE to spaces, writing to standard output. If no FILE is specified, standard input is read.",options:["-t N Use N spaces per tab (default: 8)","-t LIST Use comma-separated list of tab stops","-i Only convert leading tabs on each line"],examples:["expand file.txt # Convert all tabs to 8 spaces","expand -t 4 file.txt # Use 4-space tabs","expand -t 4,8,12 file.txt # Custom tab stops"]};function p(n){let i=n.split(",").map(o=>o.trim()),t=[];for(let o of i){let e=parseInt(o,10);if(Number.isNaN(e)||e<1)return null;t.push(e)}for(let o=1;o<t.length;o++)if(t[o]<=t[o-1])return null;return t}function x(n,i){if(i.length===1){let t=i[0];return t-n%t}for(let t of i)if(t>n)return t-n;if(i.length>=2){let t=i[i.length-1]-i[i.length-2],o=i[i.length-1],e=Math.floor((n-o)/t)+1;return o+e*t-n}return 1}function g(n,i){let{tabStops:t,leadingOnly:o}=i,e="",l=0,s=!0;for(let a of n)if(a===" ")if(o&&!s)e+=a,l++;else{let r=x(l,t);e+=" ".repeat(r),l+=r}else a!==" "&&a!==" "&&(s=!1),e+=a,l++;return e}function c(n,i){if(n==="")return"";let t=n.split(`
3
- `),o=n.endsWith(`
4
- `)&&t[t.length-1]==="";return o&&t.pop(),t.map(l=>g(l,i)).join(`
5
- `)+(o?`
6
- `:"")}var m={name:"expand",execute:async(n,i)=>{if(f(n))return d(h);let t={tabStops:[8],leadingOnly:!1},o=[],e=0;for(;e<n.length;){let s=n[e];if(s==="-t"&&e+1<n.length){let a=p(n[e+1]);if(!a)return{exitCode:1,stdout:"",stderr:`expand: invalid tab size: '${n[e+1]}'
7
- `};t.tabStops=a,e+=2}else if(s.startsWith("-t")&&s.length>2){let a=p(s.slice(2));if(!a)return{exitCode:1,stdout:"",stderr:`expand: invalid tab size: '${s.slice(2)}'
8
- `};t.tabStops=a,e++}else if(s==="--tabs"&&e+1<n.length){let a=p(n[e+1]);if(!a)return{exitCode:1,stdout:"",stderr:`expand: invalid tab size: '${n[e+1]}'
9
- `};t.tabStops=a,e+=2}else if(s.startsWith("--tabs=")){let a=p(s.slice(7));if(!a)return{exitCode:1,stdout:"",stderr:`expand: invalid tab size: '${s.slice(7)}'
10
- `};t.tabStops=a,e++}else if(s==="-i"||s==="--initial")t.leadingOnly=!0,e++;else if(s==="--"){o.push(...n.slice(e+1));break}else{if(s.startsWith("-")&&s!=="-")return u("expand",s);o.push(s),e++}}let l="";if(o.length===0){let s=i.stdin??"";l=c(s,t)}else for(let s of o){let a=i.fs.resolvePath(i.cwd,s),r=await i.fs.readFile(a);if(r===null)return{exitCode:1,stdout:l,stderr:`expand: ${s}: No such file or directory
11
- `};l+=c(r,t)}return{exitCode:0,stdout:l,stderr:""}}},v={name:"expand",flags:[{flag:"-t",type:"value",valueHint:"number"},{flag:"-i",type:"boolean"}],stdinType:"text",needsFiles:!0};export{m as a,v as b};
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- import{a as d}from"./chunk-JBABAK44.js";import{a as p,b as l}from"./chunk-GTNBSMZR.js";var u={name:"tee",summary:"read from stdin and write to stdout and files",usage:"tee [OPTION]... [FILE]...",options:["-a, --append append to the given FILEs, do not overwrite"," --help display this help and exit"]},m={append:{short:"a",long:"append",type:"boolean"}},y={name:"tee",async execute(n,e){if(l(n))return p(u);let t=d("tee",n,m);if(!t.ok)return t.error;let{append:f}=t.result.flags,c=t.result.positional,o=e.stdin,r="",a=0;for(let i of c)try{let s=e.fs.resolvePath(e.cwd,i);f?await e.fs.appendFile(s,o):await e.fs.writeFile(s,o)}catch{r+=`tee: ${i}: No such file or directory
3
- `,a=1}return{stdout:o,stderr:r,exitCode:a}}},w={name:"tee",flags:[{flag:"-a",type:"boolean"}],stdinType:"text",needsArgs:!0};export{y as a,w as b};
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env node
2
- import{a as S}from"./chunk-5WFYIUU2.js";import{a as b}from"./chunk-JBABAK44.js";import{a as x,b as y}from"./chunk-GTNBSMZR.js";var $={name:"wc",summary:"print newline, word, and byte counts for each file",usage:"wc [OPTION]... [FILE]...",options:["-c, --bytes print the byte counts","-m, --chars print the character counts","-l, --lines print the newline counts","-w, --words print the word counts"," --help display this help and exit"]},H={lines:{short:"l",long:"lines",type:"boolean"},words:{short:"w",long:"words",type:"boolean"},bytes:{short:"c",long:"bytes",type:"boolean"},chars:{short:"m",long:"chars",type:"boolean"}},E={name:"wc",async execute(a,c){if(y(a))return x($);let n=b("wc",a,H);if(!n.ok)return n.error;let{lines:o,words:e}=n.result.flags,s=n.result.flags.bytes||n.result.flags.chars,t=n.result.positional;!o&&!e&&!s&&(o=e=s=!0);let i=await S(c,t,{cmdName:"wc",stopOnError:!1});if(t.length===0){let r=C(i.files[0].content);return{stdout:`${w(r,o,e,s,"",0)}
3
- `,stderr:"",exitCode:0}}let h=[],p=0,d=0,u=0;for(let{filename:r,content:m}of i.files){let f=C(m);p+=f.lines,d+=f.words,u+=f.chars,h.push({filename:r,stats:f})}let F=t.length>1?p:Math.max(...h.map(r=>r.stats.lines)),M=t.length>1?d:Math.max(...h.map(r=>r.stats.words)),L=t.length>1?u:Math.max(...h.map(r=>r.stats.chars)),l=t.length>1?3:0;o&&(l=Math.max(l,String(F).length)),e&&(l=Math.max(l,String(M).length)),s&&(l=Math.max(l,String(L).length));let g="";for(let{filename:r,stats:m}of h)g+=`${w(m,o,e,s,r,l)}
4
- `;return t.length>1&&(g+=`${w({lines:p,words:d,chars:u},o,e,s,"total",l)}
5
- `),{stdout:g,stderr:i.stderr,exitCode:i.exitCode}}};function C(a){let c=a.length,n=0,o=0,e=!1;for(let s=0;s<c;s++){let t=a[s];t===`
6
- `?(n++,e&&(o++,e=!1)):t===" "||t===" "||t==="\r"?e&&(o++,e=!1):e=!0}return e&&o++,{lines:n,words:o,chars:c}}function w(a,c,n,o,e,s){let t=[];c&&t.push(String(a.lines).padStart(s)),n&&t.push(String(a.words).padStart(s)),o&&t.push(String(a.chars).padStart(s));let i=t.join(" ");return e&&(i+=` ${e}`),i}var I={name:"wc",flags:[{flag:"-l",type:"boolean"},{flag:"-w",type:"boolean"},{flag:"-c",type:"boolean"},{flag:"-m",type:"boolean"}],stdinType:"text",needsFiles:!0};export{E as a,I as b};
@@ -1,13 +0,0 @@
1
- #!/usr/bin/env node
2
- import{a as C,b as L}from"./chunk-ZO5PSLKR.js";import{d as b}from"./chunk-V7ZOPVQS.js";import{a as F,b as z}from"./chunk-MO4RPBN2.js";import{a as J}from"./chunk-YU6OGPZR.js";import{a as D}from"./chunk-5WFYIUU2.js";import{k as $}from"./chunk-6KZRLMG3.js";import{a as E}from"./chunk-RLNOQILG.js";import{a as I,b as k,c as O}from"./chunk-GTNBSMZR.js";function A(s){let r=[],t=0,l=s.length;for(;t<l;){for(;t<l&&/\s/.test(s[t]);)t++;if(t>=l)break;let u=t,n=s[t];if(n==="{"||n==="["){let i=n,a=n==="{"?"}":"]",c=1,p=!1,d=!1;for(t++;t<l&&c>0;){let h=s[t];d?d=!1:h==="\\"?d=!0:h==='"'?p=!p:p||(h===i?c++:h===a&&c--),t++}if(c!==0)throw new Error(`Unexpected end of JSON input at position ${t} (unclosed ${i})`);r.push(b(JSON.parse(s.slice(u,t))))}else if(n==='"'){let i=!1;for(t++;t<l;){let a=s[t];if(i)i=!1;else if(a==="\\")i=!0;else if(a==='"'){t++;break}t++}r.push(b(JSON.parse(s.slice(u,t))))}else if(n==="-"||n>="0"&&n<="9"){for(;t<l&&/[\d.eE+-]/.test(s[t]);)t++;r.push(b(JSON.parse(s.slice(u,t))))}else if(s.slice(t,t+4)==="true")r.push(!0),t+=4;else if(s.slice(t,t+5)==="false")r.push(!1),t+=5;else if(s.slice(t,t+4)==="null")r.push(null),t+=4;else{let i=s.slice(t,t+10);throw new Error(`Invalid JSON at position ${u}: unexpected '${i.split(/\s/)[0]}'`)}}return r}var W={name:"jq",summary:"command-line JSON processor",usage:"jq [OPTIONS] FILTER [FILE]",options:["-r, --raw-output output strings without quotes","-c, --compact compact output (no pretty printing)","-e, --exit-status set exit status based on output","-s, --slurp read entire input into array","-n, --null-input don't read any input","-j, --join-output don't print newlines after each output","-a, --ascii force ASCII output","-S, --sort-keys sort object keys","-C, --color colorize output (ignored)","-M, --monochrome monochrome output (ignored)"," --tab use tabs for indentation"," --help display this help and exit"]};function j(s,r,t,l,u,n=0){if(s===null||s===void 0)return"null";if(typeof s=="boolean")return String(s);if(typeof s=="number")return Number.isFinite(s)?String(s):"null";if(typeof s=="string")return t?s:JSON.stringify(s);let i=u?" ":" ";if(Array.isArray(s))return s.length===0?"[]":r?`[${s.map(c=>j(c,!0,!1,l,u)).join(",")}]`:`[
3
- ${s.map(c=>i.repeat(n+1)+j(c,!1,!1,l,u,n+1)).join(`,
4
- `)}
5
- ${i.repeat(n)}]`;if(typeof s=="object"){let a=Object.keys(s);return l&&(a=a.sort()),a.length===0?"{}":r?`{${a.map(p=>`${JSON.stringify(p)}:${j(s[p],!0,!1,l,u)}`).join(",")}}`:`{
6
- ${a.map(p=>{let d=j(s[p],!1,!1,l,u,n+1);return`${i.repeat(n+1)}${JSON.stringify(p)}: ${d}`}).join(`,
7
- `)}
8
- ${i.repeat(n)}}`}return String(s)}var Y={name:"jq",async execute(s,r){F(r.requireDefenseContext,"jq","execution entry");let t=(o,e)=>z(r.requireDefenseContext,"jq",o,e);if(k(s))return I(W);let l=!1,u=!1,n=!1,i=!1,a=!1,c=!1,p=!1,d=!1,h=".",N=!1,g=[];for(let o=0;o<s.length;o++){let e=s[o];if(e==="-r"||e==="--raw-output")l=!0;else if(e==="-c"||e==="--compact-output")u=!0;else if(e==="-e"||e==="--exit-status")n=!0;else if(e==="-s"||e==="--slurp")i=!0;else if(e==="-n"||e==="--null-input")a=!0;else if(e==="-j"||e==="--join-output")c=!0;else if(!(e==="-a"||e==="--ascii")){if(e==="-S"||e==="--sort-keys")p=!0;else if(!(e==="-C"||e==="--color")){if(!(e==="-M"||e==="--monochrome"))if(e==="--tab")d=!0;else if(e==="-")g.push("-");else{if(e.startsWith("--"))return O("jq",e);if(e.startsWith("-")){for(let f of e.slice(1))if(f==="r")l=!0;else if(f==="c")u=!0;else if(f==="e")n=!0;else if(f==="s")i=!0;else if(f==="n")a=!0;else if(f==="j")c=!0;else if(f!=="a"){if(f==="S")p=!0;else if(f!=="C"){if(f!=="M")return O("jq",`-${f}`)}}}else N?g.push(e):(h=e,N=!0)}}}}let y=[];if(!a)if(g.length===0||g.length===1&&g[0]==="-")y.push({source:"stdin",content:r.stdin});else{let o=await t("file read",()=>D(r,g,{cmdName:"jq",stopOnError:!0}));if(o.exitCode!==0)return{stdout:"",stderr:o.stderr,exitCode:2};y=o.files.map(e=>({source:e.filename||"stdin",content:e.content}))}try{let o=L(h),e=[],f={limits:r.limits?{maxIterations:r.limits.maxJqIterations}:void 0,env:r.env,coverage:r.coverage,requireDefenseContext:r.requireDefenseContext};if(a)e=C(null,o,f);else if(i){let m=[];for(let{content:x}of y){let q=x.trim();q&&m.push(...A(q))}e=C(m,o,f)}else for(let{content:m}of y){let x=m.trim();if(!x)continue;let q=A(x);for(let P of q)e.push(...C(P,o,f))}let M=e.map(m=>j(m,u,l,p,d)),V=c?"":`
9
- `,S=M.join(V),w=r.limits?.maxStringLength;if(w!==void 0&&w>0&&S.length>w)throw new $(`jq: output size limit exceeded (${w} bytes)`,"string_length");let H=n&&(e.length===0||e.every(m=>m==null||m===!1))?1:0;return{stdout:S?c?S:`${S}
10
- `:"",stderr:"",exitCode:H}}catch(o){if(o instanceof J)throw o;if(o instanceof $)return{stdout:"",stderr:`jq: ${E(o.message)}
11
- `,exitCode:$.EXIT_CODE};let e=E(o.message);return e.includes("Unknown function")?{stdout:"",stderr:`jq: error: ${e}
12
- `,exitCode:3}:{stdout:"",stderr:`jq: parse error: ${e}
13
- `,exitCode:5}}}},Z={name:"jq",flags:[{flag:"-r",type:"boolean"},{flag:"-c",type:"boolean"},{flag:"-e",type:"boolean"},{flag:"-s",type:"boolean"},{flag:"-n",type:"boolean"},{flag:"-j",type:"boolean"},{flag:"-S",type:"boolean"},{flag:"--tab",type:"boolean"}],stdinType:"json",needsArgs:!0};export{Y as a,Z as b};