@agentdocumentformat/cli 0.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +45 -0
  3. package/dist/adf.mjs +162 -0
  4. package/dist/chunks/APEv2Parser-2CNNHMXV.mjs +22 -0
  5. package/dist/chunks/AiffParser-7BR4RL6G.mjs +162 -0
  6. package/dist/chunks/App-L5L37JI5.mjs +16747 -0
  7. package/dist/chunks/AsfParser-VVRSLFOM.mjs +538 -0
  8. package/dist/chunks/DsdiffParser-CMD4AX7A.mjs +156 -0
  9. package/dist/chunks/DsfParser-UOGZDS2M.mjs +94 -0
  10. package/dist/chunks/FlacParser-HB3T3CD4.mjs +23 -0
  11. package/dist/chunks/MP4Parser-66HBRUSX.mjs +973 -0
  12. package/dist/chunks/MatroskaParser-J3HUIMEW.mjs +579 -0
  13. package/dist/chunks/MpegParser-YW6LIUEW.mjs +442 -0
  14. package/dist/chunks/MusepackParser-PAUSXP7D.mjs +252 -0
  15. package/dist/chunks/OggParser-NUBV3GWC.mjs +359 -0
  16. package/dist/chunks/WavPackParser-WQAGT7TC.mjs +171 -0
  17. package/dist/chunks/WaveParser-EWLQVDX4.mjs +238 -0
  18. package/dist/chunks/adf-schema-JRU2BTOG.mjs +62 -0
  19. package/dist/chunks/build-QF5W473T.mjs +60 -0
  20. package/dist/chunks/chatgpt-subscription-BQGWYZXE.mjs +23 -0
  21. package/dist/chunks/chunk-2DIECGFL.mjs +6 -0
  22. package/dist/chunks/chunk-2NAP2ZF7.mjs +60 -0
  23. package/dist/chunks/chunk-3AT7IIP7.mjs +25696 -0
  24. package/dist/chunks/chunk-3GNIDM53.mjs +35 -0
  25. package/dist/chunks/chunk-3M4ZPOA3.mjs +1477 -0
  26. package/dist/chunks/chunk-4MQPTCXY.mjs +510 -0
  27. package/dist/chunks/chunk-5PO5PKRV.mjs +366 -0
  28. package/dist/chunks/chunk-5QU5VY7N.mjs +52 -0
  29. package/dist/chunks/chunk-5W7KES6P.mjs +436 -0
  30. package/dist/chunks/chunk-62NE4LG4.mjs +61 -0
  31. package/dist/chunks/chunk-64OKE4X3.mjs +45 -0
  32. package/dist/chunks/chunk-6GJ4QHRI.mjs +1278 -0
  33. package/dist/chunks/chunk-6VQEXLE2.mjs +144 -0
  34. package/dist/chunks/chunk-6XUV6EK6.mjs +41 -0
  35. package/dist/chunks/chunk-776TSXEP.mjs +43 -0
  36. package/dist/chunks/chunk-7CV2SA3H.mjs +285 -0
  37. package/dist/chunks/chunk-7MTRVW2U.mjs +3103 -0
  38. package/dist/chunks/chunk-7N2R2VCG.mjs +1434 -0
  39. package/dist/chunks/chunk-7T2YMTWL.mjs +374 -0
  40. package/dist/chunks/chunk-7XYNI52E.mjs +149 -0
  41. package/dist/chunks/chunk-APHX6HSV.mjs +7731 -0
  42. package/dist/chunks/chunk-APRU6PHC.mjs +40 -0
  43. package/dist/chunks/chunk-AUYKRQPJ.mjs +499 -0
  44. package/dist/chunks/chunk-DXWDD5XJ.mjs +136 -0
  45. package/dist/chunks/chunk-EWL5FG4I.mjs +39 -0
  46. package/dist/chunks/chunk-EYX2YLJW.mjs +117 -0
  47. package/dist/chunks/chunk-F5ELW46V.mjs +27 -0
  48. package/dist/chunks/chunk-G426FACA.mjs +49 -0
  49. package/dist/chunks/chunk-GEKSJHIV.mjs +2472 -0
  50. package/dist/chunks/chunk-HBUENVQL.mjs +570 -0
  51. package/dist/chunks/chunk-HPVFJYXR.mjs +112 -0
  52. package/dist/chunks/chunk-HWLWPXQ7.mjs +721 -0
  53. package/dist/chunks/chunk-I2HJYHFT.mjs +665 -0
  54. package/dist/chunks/chunk-I3UYSITV.mjs +68 -0
  55. package/dist/chunks/chunk-IC4JDZCI.mjs +3864 -0
  56. package/dist/chunks/chunk-IHDDCZBS.mjs +112 -0
  57. package/dist/chunks/chunk-IIGMZHQQ.mjs +10416 -0
  58. package/dist/chunks/chunk-KWFOS5WC.mjs +41 -0
  59. package/dist/chunks/chunk-LAZIXV2F.mjs +5290 -0
  60. package/dist/chunks/chunk-LFMB4PAA.mjs +10814 -0
  61. package/dist/chunks/chunk-M2RX3S2T.mjs +49 -0
  62. package/dist/chunks/chunk-M3WPIJYM.mjs +65 -0
  63. package/dist/chunks/chunk-NBTUWMGP.mjs +263 -0
  64. package/dist/chunks/chunk-NGK6PVSF.mjs +2676 -0
  65. package/dist/chunks/chunk-NZ7JTHEO.mjs +85 -0
  66. package/dist/chunks/chunk-OQN33RGQ.mjs +52 -0
  67. package/dist/chunks/chunk-RIX34QHC.mjs +2935 -0
  68. package/dist/chunks/chunk-SGUTYISF.mjs +16 -0
  69. package/dist/chunks/chunk-SLJ5L7PY.mjs +1473 -0
  70. package/dist/chunks/chunk-SLUKGXKH.mjs +68 -0
  71. package/dist/chunks/chunk-TMT32MXT.mjs +419 -0
  72. package/dist/chunks/chunk-UYY5M2PB.mjs +151 -0
  73. package/dist/chunks/chunk-VAUOM3IN.mjs +298 -0
  74. package/dist/chunks/chunk-VMHTYDH4.mjs +172 -0
  75. package/dist/chunks/chunk-VZS54AA5.mjs +200 -0
  76. package/dist/chunks/chunk-WFQUVXML.mjs +295 -0
  77. package/dist/chunks/chunk-X34PDRUH.mjs +809 -0
  78. package/dist/chunks/chunk-XNPZBLYL.mjs +33 -0
  79. package/dist/chunks/chunk-XX7OSWTO.mjs +157 -0
  80. package/dist/chunks/chunk-XYTWGHFS.mjs +600 -0
  81. package/dist/chunks/chunk-XYV3VCIX.mjs +336 -0
  82. package/dist/chunks/chunk-Y5ZLKFLE.mjs +1469 -0
  83. package/dist/chunks/chunk-ZJKXHM4Q.mjs +230 -0
  84. package/dist/chunks/cli-TCMBNZF6.mjs +1030 -0
  85. package/dist/chunks/commands-DTEKM4ZL.mjs +20 -0
  86. package/dist/chunks/daemon-ZC3FZ2P4.mjs +112449 -0
  87. package/dist/chunks/daemon-control-WDX7PMTC.mjs +300 -0
  88. package/dist/chunks/daemon-token-WRSULP7G.mjs +23 -0
  89. package/dist/chunks/devtools-H7CI2ZVG.mjs +85 -0
  90. package/dist/chunks/discord-IWDQJA7A.mjs +70588 -0
  91. package/dist/chunks/dist-C57KYFS2.mjs +4952 -0
  92. package/dist/chunks/dist-I3XBAGDL.mjs +11 -0
  93. package/dist/chunks/email-V4Q4VJON.mjs +58679 -0
  94. package/dist/chunks/environment-NX277MQG.mjs +15 -0
  95. package/dist/chunks/grok-subscription-4PYX7TBF.mjs +19 -0
  96. package/dist/chunks/layout-EPJQNFAI.mjs +22 -0
  97. package/dist/chunks/lib-N7FCZWKH.mjs +4038 -0
  98. package/dist/chunks/open-OTQDGDH5.mjs +36 -0
  99. package/dist/chunks/parser-JVY2PWSM.mjs +19 -0
  100. package/dist/chunks/pipeline-executor-BHBSJX2K.mjs +19 -0
  101. package/dist/chunks/react-IUIDQ5LX.mjs +11 -0
  102. package/dist/chunks/screen-54BUTYCW.mjs +27 -0
  103. package/dist/chunks/slack-3L5QTDZX.mjs +8113 -0
  104. package/dist/chunks/store-WR7TZJZS.mjs +32 -0
  105. package/dist/chunks/telegram-5ISVFBV3.mjs +14918 -0
  106. package/dist/chunks/terminal-O5WO7C5U.mjs +48 -0
  107. package/dist/chunks/theme-NORU4J74.mjs +20 -0
  108. package/dist/chunks/themes-F2FKU7CP.mjs +23 -0
  109. package/dist/chunks/token-6G3HCMNX.mjs +54 -0
  110. package/dist/chunks/token-util-UXYSDQIW.mjs +12 -0
  111. package/dist/chunks/tui-ODVYUIMT.mjs +197 -0
  112. package/dist/chunks/welcome-XHXFV7SH.mjs +32 -0
  113. package/dist/chunks/whatsapp-XSAMNGPJ.mjs +85412 -0
  114. package/dist/chunks/xterm-headless-YF53XWXE.mjs +3353 -0
  115. package/package.json +53 -0
  116. package/resources/wasm/coreutils.LICENSE +18 -0
  117. package/resources/wasm/coreutils.wasm +0 -0
@@ -0,0 +1,665 @@
1
+ import { createRequire as __adfCreateRequire } from 'node:module';
2
+ import { fileURLToPath as __adfFileURLToPath } from 'node:url';
3
+ import { dirname as __adfDirname } from 'node:path';
4
+ const require = __adfCreateRequire(import.meta.url);
5
+ const __filename = __adfFileURLToPath(import.meta.url);
6
+ const __dirname = __adfDirname(__filename);
7
+ import {
8
+ __commonJS,
9
+ __export,
10
+ __toESM
11
+ } from "./chunk-M2RX3S2T.mjs";
12
+
13
+ // node_modules/ieee754/index.js
14
+ var require_ieee754 = __commonJS({
15
+ "node_modules/ieee754/index.js"(exports) {
16
+ "use strict";
17
+ exports.read = function(buffer, offset, isLE, mLen, nBytes) {
18
+ var e, m, eLen = nBytes * 8 - mLen - 1, eMax = (1 << eLen) - 1, eBias = eMax >> 1, nBits = -7, i = isLE ? nBytes - 1 : 0, d = isLE ? -1 : 1, s = buffer[offset + i];
19
+ for (i += d, e = s & (1 << -nBits) - 1, s >>= -nBits, nBits += eLen; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8)
20
+ ;
21
+ for (m = e & (1 << -nBits) - 1, e >>= -nBits, nBits += mLen; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8)
22
+ ;
23
+ if (e === 0)
24
+ e = 1 - eBias;
25
+ else {
26
+ if (e === eMax)
27
+ return m ? NaN : (s ? -1 : 1) * (1 / 0);
28
+ m = m + Math.pow(2, mLen), e = e - eBias;
29
+ }
30
+ return (s ? -1 : 1) * m * Math.pow(2, e - mLen);
31
+ };
32
+ exports.write = function(buffer, value, offset, isLE, mLen, nBytes) {
33
+ var e, m, c, eLen = nBytes * 8 - mLen - 1, eMax = (1 << eLen) - 1, eBias = eMax >> 1, rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, i = isLE ? 0 : nBytes - 1, d = isLE ? 1 : -1, s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
34
+ for (value = Math.abs(value), isNaN(value) || value === 1 / 0 ? (m = isNaN(value) ? 1 : 0, e = eMax) : (e = Math.floor(Math.log(value) / Math.LN2), value * (c = Math.pow(2, -e)) < 1 && (e--, c *= 2), e + eBias >= 1 ? value += rt / c : value += rt * Math.pow(2, 1 - eBias), value * c >= 2 && (e++, c /= 2), e + eBias >= eMax ? (m = 0, e = eMax) : e + eBias >= 1 ? (m = (value * c - 1) * Math.pow(2, mLen), e = e + eBias) : (m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen), e = 0)); mLen >= 8; buffer[offset + i] = m & 255, i += d, m /= 256, mLen -= 8)
35
+ ;
36
+ for (e = e << mLen | m, eLen += mLen; eLen > 0; buffer[offset + i] = e & 255, i += d, e /= 256, eLen -= 8)
37
+ ;
38
+ buffer[offset + i - d] |= s * 128;
39
+ };
40
+ }
41
+ });
42
+
43
+ // node_modules/@borewit/text-codec/lib/index.js
44
+ var WINDOWS_1252_EXTRA = {
45
+ 128: "\u20AC",
46
+ 130: "\u201A",
47
+ 131: "\u0192",
48
+ 132: "\u201E",
49
+ 133: "\u2026",
50
+ 134: "\u2020",
51
+ 135: "\u2021",
52
+ 136: "\u02C6",
53
+ 137: "\u2030",
54
+ 138: "\u0160",
55
+ 139: "\u2039",
56
+ 140: "\u0152",
57
+ 142: "\u017D",
58
+ 145: "\u2018",
59
+ 146: "\u2019",
60
+ 147: "\u201C",
61
+ 148: "\u201D",
62
+ 149: "\u2022",
63
+ 150: "\u2013",
64
+ 151: "\u2014",
65
+ 152: "\u02DC",
66
+ 153: "\u2122",
67
+ 154: "\u0161",
68
+ 155: "\u203A",
69
+ 156: "\u0153",
70
+ 158: "\u017E",
71
+ 159: "\u0178"
72
+ }, WINDOWS_1252_REVERSE = {};
73
+ for (let [code, char] of Object.entries(WINDOWS_1252_EXTRA))
74
+ WINDOWS_1252_REVERSE[char] = Number.parseInt(code, 10);
75
+ var _utf8Decoder, _utf8Encoder;
76
+ function utf8Decoder() {
77
+ if (!(typeof globalThis.TextDecoder > "u"))
78
+ return _utf8Decoder ?? (_utf8Decoder = new globalThis.TextDecoder("utf-8"));
79
+ }
80
+ function utf8Encoder() {
81
+ if (!(typeof globalThis.TextEncoder > "u"))
82
+ return _utf8Encoder ?? (_utf8Encoder = new globalThis.TextEncoder());
83
+ }
84
+ var CHUNK = 32 * 1024, REPLACEMENT = 65533;
85
+ function textDecode(bytes, encoding = "utf-8") {
86
+ switch (encoding.toLowerCase()) {
87
+ case "utf-8":
88
+ case "utf8": {
89
+ let dec = utf8Decoder();
90
+ return dec ? dec.decode(bytes) : decodeUTF8(bytes);
91
+ }
92
+ case "utf-16le":
93
+ return decodeUTF16LE(bytes);
94
+ case "us-ascii":
95
+ case "ascii":
96
+ return decodeASCII(bytes);
97
+ case "latin1":
98
+ case "iso-8859-1":
99
+ return decodeLatin1(bytes);
100
+ case "windows-1252":
101
+ return decodeWindows1252(bytes);
102
+ default:
103
+ throw new RangeError(`Encoding '${encoding}' not supported`);
104
+ }
105
+ }
106
+ function textEncode(input = "", encoding = "utf-8") {
107
+ switch (encoding.toLowerCase()) {
108
+ case "utf-8":
109
+ case "utf8": {
110
+ let enc = utf8Encoder();
111
+ return enc ? enc.encode(input) : encodeUTF8(input);
112
+ }
113
+ case "utf-16le":
114
+ return encodeUTF16LE(input);
115
+ case "us-ascii":
116
+ case "ascii":
117
+ return encodeASCII(input);
118
+ case "latin1":
119
+ case "iso-8859-1":
120
+ return encodeLatin1(input);
121
+ case "windows-1252":
122
+ return encodeWindows1252(input);
123
+ default:
124
+ throw new RangeError(`Encoding '${encoding}' not supported`);
125
+ }
126
+ }
127
+ function flushChunk(parts, chunk) {
128
+ chunk.length !== 0 && (parts.push(String.fromCharCode.apply(null, chunk)), chunk.length = 0);
129
+ }
130
+ function pushCodeUnit(parts, chunk, codeUnit) {
131
+ chunk.push(codeUnit), chunk.length >= CHUNK && flushChunk(parts, chunk);
132
+ }
133
+ function pushCodePoint(parts, chunk, cp) {
134
+ if (cp <= 65535) {
135
+ pushCodeUnit(parts, chunk, cp);
136
+ return;
137
+ }
138
+ cp -= 65536, pushCodeUnit(parts, chunk, 55296 + (cp >> 10)), pushCodeUnit(parts, chunk, 56320 + (cp & 1023));
139
+ }
140
+ function decodeUTF8(bytes) {
141
+ let parts = [], chunk = [], i = 0;
142
+ for (bytes.length >= 3 && bytes[0] === 239 && bytes[1] === 187 && bytes[2] === 191 && (i = 3); i < bytes.length; ) {
143
+ let b1 = bytes[i];
144
+ if (b1 <= 127) {
145
+ pushCodeUnit(parts, chunk, b1), i++;
146
+ continue;
147
+ }
148
+ if (b1 < 194 || b1 > 244) {
149
+ pushCodeUnit(parts, chunk, REPLACEMENT), i++;
150
+ continue;
151
+ }
152
+ if (b1 <= 223) {
153
+ if (i + 1 >= bytes.length) {
154
+ pushCodeUnit(parts, chunk, REPLACEMENT), i++;
155
+ continue;
156
+ }
157
+ let b22 = bytes[i + 1];
158
+ if ((b22 & 192) !== 128) {
159
+ pushCodeUnit(parts, chunk, REPLACEMENT), i++;
160
+ continue;
161
+ }
162
+ let cp2 = (b1 & 31) << 6 | b22 & 63;
163
+ pushCodeUnit(parts, chunk, cp2), i += 2;
164
+ continue;
165
+ }
166
+ if (b1 <= 239) {
167
+ if (i + 2 >= bytes.length) {
168
+ pushCodeUnit(parts, chunk, REPLACEMENT), i++;
169
+ continue;
170
+ }
171
+ let b22 = bytes[i + 1], b32 = bytes[i + 2];
172
+ if (!((b22 & 192) === 128 && (b32 & 192) === 128 && !(b1 === 224 && b22 < 160) && // overlong
173
+ !(b1 === 237 && b22 >= 160))) {
174
+ pushCodeUnit(parts, chunk, REPLACEMENT), i++;
175
+ continue;
176
+ }
177
+ let cp2 = (b1 & 15) << 12 | (b22 & 63) << 6 | b32 & 63;
178
+ pushCodeUnit(parts, chunk, cp2), i += 3;
179
+ continue;
180
+ }
181
+ if (i + 3 >= bytes.length) {
182
+ pushCodeUnit(parts, chunk, REPLACEMENT), i++;
183
+ continue;
184
+ }
185
+ let b2 = bytes[i + 1], b3 = bytes[i + 2], b4 = bytes[i + 3];
186
+ if (!((b2 & 192) === 128 && (b3 & 192) === 128 && (b4 & 192) === 128 && !(b1 === 240 && b2 < 144) && // overlong
187
+ !(b1 === 244 && b2 > 143))) {
188
+ pushCodeUnit(parts, chunk, REPLACEMENT), i++;
189
+ continue;
190
+ }
191
+ let cp = (b1 & 7) << 18 | (b2 & 63) << 12 | (b3 & 63) << 6 | b4 & 63;
192
+ pushCodePoint(parts, chunk, cp), i += 4;
193
+ }
194
+ return flushChunk(parts, chunk), parts.join("");
195
+ }
196
+ function decodeUTF16LE(bytes) {
197
+ let parts = [], chunk = [], len = bytes.length, i = 0;
198
+ for (; i + 1 < len; ) {
199
+ let u1 = bytes[i] | bytes[i + 1] << 8;
200
+ if (i += 2, u1 >= 55296 && u1 <= 56319) {
201
+ if (i + 1 < len) {
202
+ let u2 = bytes[i] | bytes[i + 1] << 8;
203
+ u2 >= 56320 && u2 <= 57343 ? (pushCodeUnit(parts, chunk, u1), pushCodeUnit(parts, chunk, u2), i += 2) : pushCodeUnit(parts, chunk, REPLACEMENT);
204
+ } else
205
+ pushCodeUnit(parts, chunk, REPLACEMENT);
206
+ continue;
207
+ }
208
+ if (u1 >= 56320 && u1 <= 57343) {
209
+ pushCodeUnit(parts, chunk, REPLACEMENT);
210
+ continue;
211
+ }
212
+ pushCodeUnit(parts, chunk, u1);
213
+ }
214
+ return i < len && pushCodeUnit(parts, chunk, REPLACEMENT), flushChunk(parts, chunk), parts.join("");
215
+ }
216
+ function decodeASCII(bytes) {
217
+ let parts = [];
218
+ for (let i = 0; i < bytes.length; i += CHUNK) {
219
+ let end = Math.min(bytes.length, i + CHUNK), codes = new Array(end - i);
220
+ for (let j = i, k = 0; j < end; j++, k++)
221
+ codes[k] = bytes[j] & 127;
222
+ parts.push(String.fromCharCode.apply(null, codes));
223
+ }
224
+ return parts.join("");
225
+ }
226
+ function decodeLatin1(bytes) {
227
+ let parts = [];
228
+ for (let i = 0; i < bytes.length; i += CHUNK) {
229
+ let end = Math.min(bytes.length, i + CHUNK), codes = new Array(end - i);
230
+ for (let j = i, k = 0; j < end; j++, k++)
231
+ codes[k] = bytes[j];
232
+ parts.push(String.fromCharCode.apply(null, codes));
233
+ }
234
+ return parts.join("");
235
+ }
236
+ function decodeWindows1252(bytes) {
237
+ let parts = [], out = "";
238
+ for (let i = 0; i < bytes.length; i++) {
239
+ let b = bytes[i], extra = b >= 128 && b <= 159 ? WINDOWS_1252_EXTRA[b] : void 0;
240
+ out += extra ?? String.fromCharCode(b), out.length >= CHUNK && (parts.push(out), out = "");
241
+ }
242
+ return out && parts.push(out), parts.join("");
243
+ }
244
+ function encodeUTF8(str) {
245
+ let out = [];
246
+ for (let i = 0; i < str.length; i++) {
247
+ let cp = str.charCodeAt(i);
248
+ if (cp >= 55296 && cp <= 56319)
249
+ if (i + 1 < str.length) {
250
+ let lo = str.charCodeAt(i + 1);
251
+ lo >= 56320 && lo <= 57343 ? (cp = 65536 + (cp - 55296 << 10) + (lo - 56320), i++) : cp = REPLACEMENT;
252
+ } else
253
+ cp = REPLACEMENT;
254
+ else cp >= 56320 && cp <= 57343 && (cp = REPLACEMENT);
255
+ cp < 128 ? out.push(cp) : cp < 2048 ? out.push(192 | cp >> 6, 128 | cp & 63) : cp < 65536 ? out.push(224 | cp >> 12, 128 | cp >> 6 & 63, 128 | cp & 63) : out.push(240 | cp >> 18, 128 | cp >> 12 & 63, 128 | cp >> 6 & 63, 128 | cp & 63);
256
+ }
257
+ return new Uint8Array(out);
258
+ }
259
+ function encodeUTF16LE(str) {
260
+ let units = [];
261
+ for (let i = 0; i < str.length; i++) {
262
+ let u = str.charCodeAt(i);
263
+ if (u >= 55296 && u <= 56319) {
264
+ if (i + 1 < str.length) {
265
+ let lo = str.charCodeAt(i + 1);
266
+ lo >= 56320 && lo <= 57343 ? (units.push(u, lo), i++) : units.push(REPLACEMENT);
267
+ } else
268
+ units.push(REPLACEMENT);
269
+ continue;
270
+ }
271
+ if (u >= 56320 && u <= 57343) {
272
+ units.push(REPLACEMENT);
273
+ continue;
274
+ }
275
+ units.push(u);
276
+ }
277
+ let out = new Uint8Array(units.length * 2);
278
+ for (let i = 0; i < units.length; i++) {
279
+ let code = units[i], o = i * 2;
280
+ out[o] = code & 255, out[o + 1] = code >>> 8;
281
+ }
282
+ return out;
283
+ }
284
+ function encodeASCII(str) {
285
+ let out = new Uint8Array(str.length);
286
+ for (let i = 0; i < str.length; i++)
287
+ out[i] = str.charCodeAt(i) & 127;
288
+ return out;
289
+ }
290
+ function encodeLatin1(str) {
291
+ let out = new Uint8Array(str.length);
292
+ for (let i = 0; i < str.length; i++)
293
+ out[i] = str.charCodeAt(i) & 255;
294
+ return out;
295
+ }
296
+ function encodeWindows1252(str) {
297
+ let out = new Uint8Array(str.length);
298
+ for (let i = 0; i < str.length; i++) {
299
+ let ch = str[i], code = ch.charCodeAt(0);
300
+ if (WINDOWS_1252_REVERSE[ch] !== void 0) {
301
+ out[i] = WINDOWS_1252_REVERSE[ch];
302
+ continue;
303
+ }
304
+ if (code >= 0 && code <= 127 || code >= 160 && code <= 255) {
305
+ out[i] = code;
306
+ continue;
307
+ }
308
+ out[i] = 63;
309
+ }
310
+ return out;
311
+ }
312
+
313
+ // node_modules/token-types/lib/index.js
314
+ var lib_exports = {};
315
+ __export(lib_exports, {
316
+ AnsiStringType: () => AnsiStringType,
317
+ Float16_BE: () => Float16_BE,
318
+ Float16_LE: () => Float16_LE,
319
+ Float32_BE: () => Float32_BE,
320
+ Float32_LE: () => Float32_LE,
321
+ Float64_BE: () => Float64_BE,
322
+ Float64_LE: () => Float64_LE,
323
+ Float80_BE: () => Float80_BE,
324
+ Float80_LE: () => Float80_LE,
325
+ INT16_BE: () => INT16_BE,
326
+ INT16_LE: () => INT16_LE,
327
+ INT24_BE: () => INT24_BE,
328
+ INT24_LE: () => INT24_LE,
329
+ INT32_BE: () => INT32_BE,
330
+ INT32_LE: () => INT32_LE,
331
+ INT64_BE: () => INT64_BE,
332
+ INT64_LE: () => INT64_LE,
333
+ INT8: () => INT8,
334
+ IgnoreType: () => IgnoreType,
335
+ StringType: () => StringType,
336
+ UINT16_BE: () => UINT16_BE,
337
+ UINT16_LE: () => UINT16_LE,
338
+ UINT24_BE: () => UINT24_BE,
339
+ UINT24_LE: () => UINT24_LE,
340
+ UINT32_BE: () => UINT32_BE,
341
+ UINT32_LE: () => UINT32_LE,
342
+ UINT64_BE: () => UINT64_BE,
343
+ UINT64_LE: () => UINT64_LE,
344
+ UINT8: () => UINT8,
345
+ Uint8ArrayType: () => Uint8ArrayType
346
+ });
347
+ var ieee754 = __toESM(require_ieee754(), 1);
348
+ function dv(array) {
349
+ return new DataView(array.buffer, array.byteOffset);
350
+ }
351
+ var UINT8 = {
352
+ len: 1,
353
+ get(array, offset) {
354
+ return dv(array).getUint8(offset);
355
+ },
356
+ put(array, offset, value) {
357
+ return dv(array).setUint8(offset, value), offset + 1;
358
+ }
359
+ }, UINT16_LE = {
360
+ len: 2,
361
+ get(array, offset) {
362
+ return dv(array).getUint16(offset, !0);
363
+ },
364
+ put(array, offset, value) {
365
+ return dv(array).setUint16(offset, value, !0), offset + 2;
366
+ }
367
+ }, UINT16_BE = {
368
+ len: 2,
369
+ get(array, offset) {
370
+ return dv(array).getUint16(offset);
371
+ },
372
+ put(array, offset, value) {
373
+ return dv(array).setUint16(offset, value), offset + 2;
374
+ }
375
+ }, UINT24_LE = {
376
+ len: 3,
377
+ get(array, offset) {
378
+ let dataView = dv(array);
379
+ return dataView.getUint8(offset) + (dataView.getUint16(offset + 1, !0) << 8);
380
+ },
381
+ put(array, offset, value) {
382
+ let dataView = dv(array);
383
+ return dataView.setUint8(offset, value & 255), dataView.setUint16(offset + 1, value >> 8, !0), offset + 3;
384
+ }
385
+ }, UINT24_BE = {
386
+ len: 3,
387
+ get(array, offset) {
388
+ let dataView = dv(array);
389
+ return (dataView.getUint16(offset) << 8) + dataView.getUint8(offset + 2);
390
+ },
391
+ put(array, offset, value) {
392
+ let dataView = dv(array);
393
+ return dataView.setUint16(offset, value >> 8), dataView.setUint8(offset + 2, value & 255), offset + 3;
394
+ }
395
+ }, UINT32_LE = {
396
+ len: 4,
397
+ get(array, offset) {
398
+ return dv(array).getUint32(offset, !0);
399
+ },
400
+ put(array, offset, value) {
401
+ return dv(array).setUint32(offset, value, !0), offset + 4;
402
+ }
403
+ }, UINT32_BE = {
404
+ len: 4,
405
+ get(array, offset) {
406
+ return dv(array).getUint32(offset);
407
+ },
408
+ put(array, offset, value) {
409
+ return dv(array).setUint32(offset, value), offset + 4;
410
+ }
411
+ }, INT8 = {
412
+ len: 1,
413
+ get(array, offset) {
414
+ return dv(array).getInt8(offset);
415
+ },
416
+ put(array, offset, value) {
417
+ return dv(array).setInt8(offset, value), offset + 1;
418
+ }
419
+ }, INT16_BE = {
420
+ len: 2,
421
+ get(array, offset) {
422
+ return dv(array).getInt16(offset);
423
+ },
424
+ put(array, offset, value) {
425
+ return dv(array).setInt16(offset, value), offset + 2;
426
+ }
427
+ }, INT16_LE = {
428
+ len: 2,
429
+ get(array, offset) {
430
+ return dv(array).getInt16(offset, !0);
431
+ },
432
+ put(array, offset, value) {
433
+ return dv(array).setInt16(offset, value, !0), offset + 2;
434
+ }
435
+ }, INT24_LE = {
436
+ len: 3,
437
+ get(array, offset) {
438
+ let unsigned = UINT24_LE.get(array, offset);
439
+ return unsigned > 8388607 ? unsigned - 16777216 : unsigned;
440
+ },
441
+ put(array, offset, value) {
442
+ let dataView = dv(array);
443
+ return dataView.setUint8(offset, value & 255), dataView.setUint16(offset + 1, value >> 8, !0), offset + 3;
444
+ }
445
+ }, INT24_BE = {
446
+ len: 3,
447
+ get(array, offset) {
448
+ let unsigned = UINT24_BE.get(array, offset);
449
+ return unsigned > 8388607 ? unsigned - 16777216 : unsigned;
450
+ },
451
+ put(array, offset, value) {
452
+ let dataView = dv(array);
453
+ return dataView.setUint16(offset, value >> 8), dataView.setUint8(offset + 2, value & 255), offset + 3;
454
+ }
455
+ }, INT32_BE = {
456
+ len: 4,
457
+ get(array, offset) {
458
+ return dv(array).getInt32(offset);
459
+ },
460
+ put(array, offset, value) {
461
+ return dv(array).setInt32(offset, value), offset + 4;
462
+ }
463
+ }, INT32_LE = {
464
+ len: 4,
465
+ get(array, offset) {
466
+ return dv(array).getInt32(offset, !0);
467
+ },
468
+ put(array, offset, value) {
469
+ return dv(array).setInt32(offset, value, !0), offset + 4;
470
+ }
471
+ }, UINT64_LE = {
472
+ len: 8,
473
+ get(array, offset) {
474
+ return dv(array).getBigUint64(offset, !0);
475
+ },
476
+ put(array, offset, value) {
477
+ return dv(array).setBigUint64(offset, value, !0), offset + 8;
478
+ }
479
+ }, INT64_LE = {
480
+ len: 8,
481
+ get(array, offset) {
482
+ return dv(array).getBigInt64(offset, !0);
483
+ },
484
+ put(array, offset, value) {
485
+ return dv(array).setBigInt64(offset, value, !0), offset + 8;
486
+ }
487
+ }, UINT64_BE = {
488
+ len: 8,
489
+ get(array, offset) {
490
+ return dv(array).getBigUint64(offset);
491
+ },
492
+ put(array, offset, value) {
493
+ return dv(array).setBigUint64(offset, value), offset + 8;
494
+ }
495
+ }, INT64_BE = {
496
+ len: 8,
497
+ get(array, offset) {
498
+ return dv(array).getBigInt64(offset);
499
+ },
500
+ put(array, offset, value) {
501
+ return dv(array).setBigInt64(offset, value), offset + 8;
502
+ }
503
+ }, Float16_BE = {
504
+ len: 2,
505
+ get(dataView, offset) {
506
+ return ieee754.read(dataView, offset, !1, 10, this.len);
507
+ },
508
+ put(dataView, offset, value) {
509
+ return ieee754.write(dataView, value, offset, !1, 10, this.len), offset + this.len;
510
+ }
511
+ }, Float16_LE = {
512
+ len: 2,
513
+ get(array, offset) {
514
+ return ieee754.read(array, offset, !0, 10, this.len);
515
+ },
516
+ put(array, offset, value) {
517
+ return ieee754.write(array, value, offset, !0, 10, this.len), offset + this.len;
518
+ }
519
+ }, Float32_BE = {
520
+ len: 4,
521
+ get(array, offset) {
522
+ return dv(array).getFloat32(offset);
523
+ },
524
+ put(array, offset, value) {
525
+ return dv(array).setFloat32(offset, value), offset + 4;
526
+ }
527
+ }, Float32_LE = {
528
+ len: 4,
529
+ get(array, offset) {
530
+ return dv(array).getFloat32(offset, !0);
531
+ },
532
+ put(array, offset, value) {
533
+ return dv(array).setFloat32(offset, value, !0), offset + 4;
534
+ }
535
+ }, Float64_BE = {
536
+ len: 8,
537
+ get(array, offset) {
538
+ return dv(array).getFloat64(offset);
539
+ },
540
+ put(array, offset, value) {
541
+ return dv(array).setFloat64(offset, value), offset + 8;
542
+ }
543
+ }, Float64_LE = {
544
+ len: 8,
545
+ get(array, offset) {
546
+ return dv(array).getFloat64(offset, !0);
547
+ },
548
+ put(array, offset, value) {
549
+ return dv(array).setFloat64(offset, value, !0), offset + 8;
550
+ }
551
+ }, Float80_BE = {
552
+ len: 10,
553
+ get(array, offset) {
554
+ return ieee754.read(array, offset, !1, 63, this.len);
555
+ },
556
+ put(array, offset, value) {
557
+ return ieee754.write(array, value, offset, !1, 63, this.len), offset + this.len;
558
+ }
559
+ }, Float80_LE = {
560
+ len: 10,
561
+ get(array, offset) {
562
+ return ieee754.read(array, offset, !0, 63, this.len);
563
+ },
564
+ put(array, offset, value) {
565
+ return ieee754.write(array, value, offset, !0, 63, this.len), offset + this.len;
566
+ }
567
+ }, IgnoreType = class {
568
+ /**
569
+ * @param len number of bytes to ignore
570
+ */
571
+ constructor(len) {
572
+ this.len = len;
573
+ }
574
+ // ToDo: don't read, but skip data
575
+ get(_array, _off) {
576
+ }
577
+ }, Uint8ArrayType = class {
578
+ constructor(len) {
579
+ this.len = len;
580
+ }
581
+ get(array, offset) {
582
+ return array.subarray(offset, offset + this.len);
583
+ }
584
+ }, StringType = class {
585
+ constructor(len, encoding) {
586
+ this.len = len, this.encoding = encoding;
587
+ }
588
+ get(data, offset = 0) {
589
+ let bytes = data.subarray(offset, offset + this.len);
590
+ return textDecode(bytes, this.encoding);
591
+ }
592
+ }, AnsiStringType = class extends StringType {
593
+ constructor(len) {
594
+ super(len, "windows-1252");
595
+ }
596
+ };
597
+
598
+ // node_modules/music-metadata/lib/ParseError.js
599
+ var makeParseError = (name) => class extends Error {
600
+ constructor(message) {
601
+ super(message), this.name = name;
602
+ }
603
+ }, CouldNotDetermineFileTypeError = class extends makeParseError("CouldNotDetermineFileTypeError") {
604
+ }, UnsupportedFileTypeError = class extends makeParseError("UnsupportedFileTypeError") {
605
+ }, UnexpectedFileContentError = class extends makeParseError("UnexpectedFileContentError") {
606
+ constructor(fileType, message) {
607
+ super(message), this.fileType = fileType;
608
+ }
609
+ // Override toString to include file type information.
610
+ toString() {
611
+ return `${this.name} (FileType: ${this.fileType}): ${this.message}`;
612
+ }
613
+ }, FieldDecodingError = class extends makeParseError("FieldDecodingError") {
614
+ }, InternalParserError = class extends makeParseError("InternalParserError") {
615
+ }, makeUnexpectedFileContentError = (fileType) => class extends UnexpectedFileContentError {
616
+ constructor(message) {
617
+ super(fileType, message);
618
+ }
619
+ };
620
+
621
+ // node_modules/music-metadata/lib/common/BasicParser.js
622
+ var BasicParser = class {
623
+ /**
624
+ * Initialize parser with output (metadata), input (tokenizer) & parsing options (options).
625
+ * @param {INativeMetadataCollector} metadata Output
626
+ * @param {ITokenizer} tokenizer Input
627
+ * @param {IOptions} options Parsing options
628
+ */
629
+ constructor(metadata, tokenizer, options) {
630
+ this.metadata = metadata, this.tokenizer = tokenizer, this.options = options;
631
+ }
632
+ };
633
+
634
+ export {
635
+ textDecode,
636
+ textEncode,
637
+ UINT8,
638
+ UINT16_LE,
639
+ UINT16_BE,
640
+ UINT24_LE,
641
+ UINT24_BE,
642
+ UINT32_LE,
643
+ UINT32_BE,
644
+ INT8,
645
+ INT16_BE,
646
+ INT24_BE,
647
+ INT32_BE,
648
+ INT32_LE,
649
+ UINT64_LE,
650
+ INT64_LE,
651
+ UINT64_BE,
652
+ INT64_BE,
653
+ Float32_BE,
654
+ Float64_BE,
655
+ Uint8ArrayType,
656
+ StringType,
657
+ lib_exports,
658
+ makeParseError,
659
+ CouldNotDetermineFileTypeError,
660
+ UnsupportedFileTypeError,
661
+ FieldDecodingError,
662
+ InternalParserError,
663
+ makeUnexpectedFileContentError,
664
+ BasicParser
665
+ };