node-av 1.1.0 → 1.2.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 (134) hide show
  1. package/README.md +51 -38
  2. package/dist/api/bitstream-filter.d.ts +180 -123
  3. package/dist/api/bitstream-filter.js +180 -125
  4. package/dist/api/bitstream-filter.js.map +1 -1
  5. package/dist/api/decoder.d.ts +279 -132
  6. package/dist/api/decoder.js +285 -142
  7. package/dist/api/decoder.js.map +1 -1
  8. package/dist/api/encoder.d.ts +246 -162
  9. package/dist/api/encoder.js +272 -208
  10. package/dist/api/encoder.js.map +1 -1
  11. package/dist/api/filter-presets.d.ts +690 -94
  12. package/dist/api/filter-presets.js +686 -102
  13. package/dist/api/filter-presets.js.map +1 -1
  14. package/dist/api/filter.d.ts +249 -213
  15. package/dist/api/filter.js +252 -242
  16. package/dist/api/filter.js.map +1 -1
  17. package/dist/api/hardware.d.ts +224 -117
  18. package/dist/api/hardware.js +380 -214
  19. package/dist/api/hardware.js.map +1 -1
  20. package/dist/api/index.d.ts +3 -3
  21. package/dist/api/index.js +1 -1
  22. package/dist/api/index.js.map +1 -1
  23. package/dist/api/io-stream.d.ts +65 -61
  24. package/dist/api/io-stream.js +43 -46
  25. package/dist/api/io-stream.js.map +1 -1
  26. package/dist/api/media-input.d.ts +242 -140
  27. package/dist/api/media-input.js +205 -103
  28. package/dist/api/media-input.js.map +1 -1
  29. package/dist/api/media-output.d.ts +206 -128
  30. package/dist/api/media-output.js +210 -128
  31. package/dist/api/media-output.js.map +1 -1
  32. package/dist/api/pipeline.d.ts +168 -38
  33. package/dist/api/pipeline.js +238 -14
  34. package/dist/api/pipeline.js.map +1 -1
  35. package/dist/api/types.d.ts +21 -187
  36. package/dist/api/utils.d.ts +1 -2
  37. package/dist/api/utils.js +9 -0
  38. package/dist/api/utils.js.map +1 -1
  39. package/dist/lib/audio-fifo.d.ts +127 -170
  40. package/dist/lib/audio-fifo.js +130 -173
  41. package/dist/lib/audio-fifo.js.map +1 -1
  42. package/dist/lib/binding.js +5 -0
  43. package/dist/lib/binding.js.map +1 -1
  44. package/dist/lib/bitstream-filter-context.d.ts +139 -184
  45. package/dist/lib/bitstream-filter-context.js +139 -188
  46. package/dist/lib/bitstream-filter-context.js.map +1 -1
  47. package/dist/lib/bitstream-filter.d.ts +68 -54
  48. package/dist/lib/bitstream-filter.js +68 -54
  49. package/dist/lib/bitstream-filter.js.map +1 -1
  50. package/dist/lib/codec-context.d.ts +316 -380
  51. package/dist/lib/codec-context.js +316 -381
  52. package/dist/lib/codec-context.js.map +1 -1
  53. package/dist/lib/codec-parameters.d.ts +160 -170
  54. package/dist/lib/codec-parameters.js +162 -172
  55. package/dist/lib/codec-parameters.js.map +1 -1
  56. package/dist/lib/codec-parser.d.ts +91 -104
  57. package/dist/lib/codec-parser.js +92 -103
  58. package/dist/lib/codec-parser.js.map +1 -1
  59. package/dist/lib/codec.d.ts +264 -281
  60. package/dist/lib/codec.js +268 -285
  61. package/dist/lib/codec.js.map +1 -1
  62. package/dist/lib/dictionary.d.ts +149 -203
  63. package/dist/lib/dictionary.js +158 -212
  64. package/dist/lib/dictionary.js.map +1 -1
  65. package/dist/lib/error.d.ts +96 -130
  66. package/dist/lib/error.js +98 -128
  67. package/dist/lib/error.js.map +1 -1
  68. package/dist/lib/filter-context.d.ts +284 -218
  69. package/dist/lib/filter-context.js +290 -227
  70. package/dist/lib/filter-context.js.map +1 -1
  71. package/dist/lib/filter-graph.d.ts +251 -292
  72. package/dist/lib/filter-graph.js +253 -294
  73. package/dist/lib/filter-graph.js.map +1 -1
  74. package/dist/lib/filter-inout.d.ts +87 -95
  75. package/dist/lib/filter-inout.js +87 -95
  76. package/dist/lib/filter-inout.js.map +1 -1
  77. package/dist/lib/filter.d.ts +93 -111
  78. package/dist/lib/filter.js +93 -111
  79. package/dist/lib/filter.js.map +1 -1
  80. package/dist/lib/format-context.d.ts +320 -428
  81. package/dist/lib/format-context.js +313 -385
  82. package/dist/lib/format-context.js.map +1 -1
  83. package/dist/lib/frame.d.ts +262 -405
  84. package/dist/lib/frame.js +263 -408
  85. package/dist/lib/frame.js.map +1 -1
  86. package/dist/lib/hardware-device-context.d.ts +149 -203
  87. package/dist/lib/hardware-device-context.js +149 -203
  88. package/dist/lib/hardware-device-context.js.map +1 -1
  89. package/dist/lib/hardware-frames-context.d.ts +170 -180
  90. package/dist/lib/hardware-frames-context.js +171 -181
  91. package/dist/lib/hardware-frames-context.js.map +1 -1
  92. package/dist/lib/index.d.ts +2 -1
  93. package/dist/lib/index.js +2 -2
  94. package/dist/lib/index.js.map +1 -1
  95. package/dist/lib/input-format.d.ts +89 -117
  96. package/dist/lib/input-format.js +89 -117
  97. package/dist/lib/input-format.js.map +1 -1
  98. package/dist/lib/io-context.d.ts +209 -241
  99. package/dist/lib/io-context.js +220 -252
  100. package/dist/lib/io-context.js.map +1 -1
  101. package/dist/lib/log.d.ts +85 -119
  102. package/dist/lib/log.js +85 -122
  103. package/dist/lib/log.js.map +1 -1
  104. package/dist/lib/native-types.d.ts +117 -106
  105. package/dist/lib/native-types.js +0 -7
  106. package/dist/lib/native-types.js.map +1 -1
  107. package/dist/lib/option.d.ts +284 -241
  108. package/dist/lib/option.js +309 -249
  109. package/dist/lib/option.js.map +1 -1
  110. package/dist/lib/output-format.d.ts +77 -101
  111. package/dist/lib/output-format.js +77 -101
  112. package/dist/lib/output-format.js.map +1 -1
  113. package/dist/lib/packet.d.ts +172 -240
  114. package/dist/lib/packet.js +172 -241
  115. package/dist/lib/packet.js.map +1 -1
  116. package/dist/lib/rational.d.ts +0 -2
  117. package/dist/lib/rational.js +0 -2
  118. package/dist/lib/rational.js.map +1 -1
  119. package/dist/lib/software-resample-context.d.ts +241 -325
  120. package/dist/lib/software-resample-context.js +242 -326
  121. package/dist/lib/software-resample-context.js.map +1 -1
  122. package/dist/lib/software-scale-context.d.ts +129 -173
  123. package/dist/lib/software-scale-context.js +131 -175
  124. package/dist/lib/software-scale-context.js.map +1 -1
  125. package/dist/lib/stream.d.ts +87 -197
  126. package/dist/lib/stream.js +87 -197
  127. package/dist/lib/stream.js.map +1 -1
  128. package/dist/lib/utilities.d.ts +372 -181
  129. package/dist/lib/utilities.js +373 -182
  130. package/dist/lib/utilities.js.map +1 -1
  131. package/install/check.js +0 -1
  132. package/package.json +21 -12
  133. package/release_notes.md +43 -59
  134. package/CHANGELOG.md +0 -8
package/dist/lib/error.js CHANGED
@@ -2,6 +2,15 @@ import { bindings } from './binding.js';
2
2
  /**
3
3
  * POSIX error names that can be converted to FFmpeg error codes.
4
4
  * These are platform-specific and resolved at runtime.
5
+ *
6
+ * @example
7
+ * ```typescript
8
+ * import { PosixError, FFmpegError } from 'node-av';
9
+ *
10
+ * // Get platform-specific error code
11
+ * const errorCode = FFmpegError.AVERROR(PosixError.EAGAIN);
12
+ * console.log(`EAGAIN on this platform: ${errorCode}`);
13
+ * ```
5
14
  */
6
15
  export var PosixError;
7
16
  (function (PosixError) {
@@ -26,6 +35,10 @@ export var PosixError;
26
35
  const errorCache = {};
27
36
  /**
28
37
  * Get a cached FFmpeg error code by name.
38
+ *
39
+ * @param name - POSIX error name
40
+ * @returns FFmpeg error code
41
+ *
29
42
  * @internal
30
43
  */
31
44
  function getCachedError(name) {
@@ -37,73 +50,71 @@ function getCachedError(name) {
37
50
  // Platform-specific POSIX errors used by FFmpeg
38
51
  // These MUST be computed at runtime because POSIX error codes
39
52
  // differ between operating systems (e.g., EAGAIN is 35 on macOS but 11 on Linux)
53
+ /** FFmpeg error code for EAGAIN (resource temporarily unavailable) */
40
54
  export const AVERROR_EAGAIN = getCachedError(PosixError.EAGAIN);
55
+ /** FFmpeg error code for ENOMEM (out of memory) */
41
56
  export const AVERROR_ENOMEM = getCachedError(PosixError.ENOMEM);
57
+ /** FFmpeg error code for EINVAL (invalid argument) */
42
58
  export const AVERROR_EINVAL = getCachedError(PosixError.EINVAL);
59
+ /** FFmpeg error code for EIO (I/O error) */
43
60
  export const AVERROR_EIO = getCachedError(PosixError.EIO);
61
+ /** FFmpeg error code for EPIPE (broken pipe) */
44
62
  export const AVERROR_EPIPE = getCachedError(PosixError.EPIPE);
63
+ /** FFmpeg error code for ENOSPC (no space left on device) */
45
64
  export const AVERROR_ENOSPC = getCachedError(PosixError.ENOSPC);
65
+ /** FFmpeg error code for ENOENT (no such file or directory) */
46
66
  export const AVERROR_ENOENT = getCachedError(PosixError.ENOENT);
67
+ /** FFmpeg error code for EACCES (permission denied) */
47
68
  export const AVERROR_EACCES = getCachedError(PosixError.EACCES);
69
+ /** FFmpeg error code for EPERM (operation not permitted) */
48
70
  export const AVERROR_EPERM = getCachedError(PosixError.EPERM);
71
+ /** FFmpeg error code for EEXIST (file exists) */
49
72
  export const AVERROR_EEXIST = getCachedError(PosixError.EEXIST);
73
+ /** FFmpeg error code for ENODEV (no such device) */
50
74
  export const AVERROR_ENODEV = getCachedError(PosixError.ENODEV);
75
+ /** FFmpeg error code for ENOTDIR (not a directory) */
51
76
  export const AVERROR_ENOTDIR = getCachedError(PosixError.ENOTDIR);
77
+ /** FFmpeg error code for EISDIR (is a directory) */
52
78
  export const AVERROR_EISDIR = getCachedError(PosixError.EISDIR);
79
+ /** FFmpeg error code for EBUSY (device or resource busy) */
53
80
  export const AVERROR_EBUSY = getCachedError(PosixError.EBUSY);
81
+ /** FFmpeg error code for EMFILE (too many open files) */
54
82
  export const AVERROR_EMFILE = getCachedError(PosixError.EMFILE);
83
+ /** FFmpeg error code for ERANGE (result too large) */
55
84
  export const AVERROR_ERANGE = getCachedError(PosixError.ERANGE);
56
85
  /**
57
- * FFmpeg error handling.
58
- *
59
- * Represents FFmpeg errors with error codes and human-readable messages.
60
- * Provides utilities for error checking and throwing.
61
- * Essential for proper error handling in FFmpeg operations.
86
+ * FFmpeg error handling class.
62
87
  *
63
- * Direct mapping to FFmpeg's error system.
88
+ * Provides utilities for handling and converting FFmpeg error codes.
89
+ * FFmpeg uses negative values for errors, with both FFmpeg-specific codes
90
+ * and POSIX error codes converted to negative values. This class provides
91
+ * methods to check, convert, and throw errors based on FFmpeg return codes.
64
92
  *
65
93
  * @example
66
94
  * ```typescript
67
95
  * import { FFmpegError } from 'node-av';
96
+ * import { AVERROR_EAGAIN, AVERROR_EOF } from 'node-av/constants';
68
97
  *
69
- * // Check return codes
98
+ * // Check and throw errors
70
99
  * const ret = await codecContext.sendPacket(packet);
71
100
  * FFmpegError.throwIfError(ret, 'sendPacket');
72
101
  *
73
102
  * // Handle specific errors
74
- * try {
75
- * const openRet = await formatContext.openInput('file.mp4', null, null);
76
- * FFmpegError.throwIfError(openRet, 'openInput');
77
- * } catch (error) {
78
- * if (error instanceof FFmpegError) {
79
- * console.error(`Error code: ${error.code}`);
80
- * console.error(`Message: ${error.message}`);
81
- * }
103
+ * if (ret === AVERROR_EAGAIN) {
104
+ * // Need to receive frames first
105
+ * } else if (ret === AVERROR_EOF) {
106
+ * // End of stream
82
107
  * }
108
+ *
109
+ * // Get error description
110
+ * const errorMsg = FFmpegError.strerror(ret);
111
+ * console.error(`Error: ${errorMsg}`);
83
112
  * ```
113
+ *
114
+ * @see [av_strerror](https://ffmpeg.org/doxygen/trunk/group__lavu__error.html#ga5792b4a2d18d7d9cb0efbcfc335dce2d) - FFmpeg Doxygen
84
115
  */
85
116
  export class FFmpegError extends Error {
86
117
  native;
87
- /**
88
- * Create a new FFmpegError instance.
89
- *
90
- * Wraps an FFmpeg error code with a JavaScript Error.
91
- * Automatically retrieves the error message from FFmpeg.
92
- *
93
- * Direct wrapper around FFmpeg error codes.
94
- *
95
- * @param code - FFmpeg error code (negative number)
96
- *
97
- * @example
98
- * ```typescript
99
- * import { FFmpegError } from 'node-av';
100
- * import { AVERROR_EOF } from 'node-av/constants';
101
- *
102
- * const error = new FFmpegError(AVERROR_EOF);
103
- * console.log(error.message); // "End of file"
104
- * console.log(error.code); // -541478725
105
- * ```
106
- */
107
118
  constructor(code) {
108
119
  const native = new bindings.FFmpegError(code);
109
120
  const message = code !== undefined ? native.message : 'FFmpeg Error';
@@ -116,83 +127,60 @@ export class FFmpegError extends Error {
116
127
  }
117
128
  }
118
129
  /**
119
- * Put a description of the AVERROR code errnum in a string.
120
- *
121
- * Converts an error code to a human-readable message.
130
+ * Get human-readable error message for code.
122
131
  *
123
- * Direct mapping to av_strerror()
132
+ * Converts an FFmpeg error code to a descriptive string.
124
133
  *
125
- * @param errnum - Error code to describe
134
+ * Direct mapping to av_strerror().
126
135
  *
136
+ * @param errnum - FFmpeg error code
127
137
  * @returns Error description string
128
138
  *
129
139
  * @example
130
140
  * ```typescript
131
- * import { FFmpegError } from 'node-av';
132
- * import { AVERROR_EAGAIN, AVERROR_EOF } from 'node-av/constants';
133
- *
134
- * const message = FFmpegError.strerror(AVERROR_EAGAIN);
135
- * console.log(message); // "Resource temporarily unavailable"
136
- *
137
- * const message2 = FFmpegError.strerror(AVERROR_EOF);
138
- * console.log(message2); // "End of file"
141
+ * const message = FFmpegError.strerror(-22);
142
+ * console.log(message); // "Invalid argument"
139
143
  * ```
140
144
  */
141
145
  static strerror(errnum) {
142
146
  return bindings.FFmpegError.strerror(errnum);
143
147
  }
144
148
  /**
145
- * Get FFmpeg error code by POSIX error name dynamically.
146
- *
147
- * This method provides platform-independent access to POSIX error codes
148
- * converted to FFmpeg format. The POSIX error codes are resolved at runtime
149
- * to ensure correct platform-specific values.
149
+ * Convert POSIX error name to FFmpeg error code.
150
150
  *
151
- * @param errorName - POSIX error name from the PosixError enum
151
+ * Converts platform-specific POSIX error to FFmpeg's negative error code.
152
152
  *
153
- * @returns FFmpeg error code (negative)
153
+ * Direct mapping to AVERROR() macro.
154
154
  *
155
- * @throws {TypeError} If the error name is unknown
155
+ * @param errorName - POSIX error name
156
+ * @returns FFmpeg error code
156
157
  *
157
158
  * @example
158
159
  * ```typescript
159
- * import { FFmpegError, PosixError } from 'node-av';
160
+ * import { PosixError } from 'node-av';
160
161
  *
161
- * // Get platform-specific error codes at runtime
162
- * const AVERROR_EAGAIN = FFmpegError.AVERROR(PosixError.EAGAIN);
163
- * const AVERROR_EIO = FFmpegError.AVERROR(PosixError.EIO);
164
- *
165
- * // Use in comparisons
166
- * const ret = await codecContext.receiveFrame(frame);
167
- * if (ret === FFmpegError.AVERROR(PosixError.EAGAIN)) {
168
- * console.log('Need more input');
169
- * }
170
- *
171
- * // Or use the pre-cached constants
172
- * import { AVERROR_EAGAIN } from 'node-av';
173
- * if (ret === AVERROR_EAGAIN) {
174
- * console.log('Need more input');
175
- * }
162
+ * const code = FFmpegError.AVERROR(PosixError.ENOMEM);
163
+ * // Returns platform-specific negative error code
176
164
  * ```
177
165
  *
178
- * @see {@link getKnownErrors} To get all available POSIX error codes
179
- * @see {@link PosixError} For the list of supported POSIX errors
166
+ * @see {@link PosixError} For available error names
180
167
  */
181
168
  static AVERROR(errorName) {
182
169
  return bindings.FFmpegError.getAverror(errorName);
183
170
  }
184
171
  /**
185
- * Check if a value is an error code.
172
+ * Check if a code is an FFmpeg error.
186
173
  *
187
- * @param code - Value to check
174
+ * FFmpeg errors are negative values.
188
175
  *
189
- * @returns true if code is negative (error), false otherwise
176
+ * @param code - Return code to check
177
+ * @returns True if code is an error
190
178
  *
191
179
  * @example
192
180
  * ```typescript
193
181
  * const ret = await formatContext.readFrame(packet);
194
182
  * if (FFmpegError.isFFmpegError(ret)) {
195
- * console.error('Read frame failed');
183
+ * console.error('Read failed');
196
184
  * }
197
185
  * ```
198
186
  */
@@ -203,21 +191,18 @@ export class FFmpegError extends Error {
203
191
  return code < 0;
204
192
  }
205
193
  /**
206
- * Create FFmpegError from error code if it's an error.
194
+ * Create error from code.
207
195
  *
208
- * Helper method to conditionally create error objects.
196
+ * Creates an FFmpegError instance if the code is an error.
209
197
  *
210
198
  * @param code - FFmpeg return code
211
- *
212
- * @returns FFmpegError if code < 0, null otherwise
199
+ * @returns Error instance or null if not an error
213
200
  *
214
201
  * @example
215
202
  * ```typescript
216
- * const ret = await formatContext.openInput('video.mp4', null, null);
217
203
  * const error = FFmpegError.fromCode(ret);
218
204
  * if (error) {
219
- * console.error(`Failed: ${error.message}`);
220
- * console.error(`Code: ${error.code}`);
205
+ * console.error(`Error: ${error.message}`);
221
206
  * }
222
207
  * ```
223
208
  */
@@ -228,32 +213,26 @@ export class FFmpegError extends Error {
228
213
  return new FFmpegError(code);
229
214
  }
230
215
  /**
231
- * Throw FFmpegError if code indicates error.
216
+ * Throw if code indicates an error.
232
217
  *
233
- * Checks return code and throws an error if negative.
234
- * Essential for FFmpeg error handling pattern.
218
+ * Checks if the code is an error and throws an FFmpegError if so.
219
+ * Commonly used pattern for FFmpeg API calls.
235
220
  *
236
221
  * @param code - FFmpeg return code
237
- * @param operation - Optional operation name for better error messages
238
- *
239
- * @throws {FFmpegError} If code < 0
222
+ * @param operation - Optional operation name for context
223
+ * @throws {FFmpegError} If code is negative
240
224
  *
241
225
  * @example
242
226
  * ```typescript
243
- * import { FFmpegError } from 'node-av';
244
- *
245
- * const ret = await codecContext.sendPacket(packet);
246
- * FFmpegError.throwIfError(ret, 'sendPacket');
247
- * // Continues if successful, throws if error
248
- *
249
- * // With operation name for better error messages
250
- * const ret2 = formatContext.allocOutputContext2(null, 'mp4', 'out.mp4');
251
- * FFmpegError.throwIfError(ret2, 'allocOutputContext2');
252
- * // Error message: "allocOutputContext2 failed: ..."
227
+ * // Simple error check
228
+ * const ret = codecContext.open(codec);
229
+ * FFmpegError.throwIfError(ret);
230
+ *
231
+ * // With operation context
232
+ * const ret2 = await formatContext.writeHeader();
233
+ * FFmpegError.throwIfError(ret2, 'writeHeader');
234
+ * // Throws: "writeHeader failed: [error message]"
253
235
  * ```
254
- *
255
- * @see {@link fromCode} To create error without throwing
256
- * @see {@link isFFmpegError} To check if value is error
257
236
  */
258
237
  static throwIfError(code, operation) {
259
238
  if (FFmpegError.isFFmpegError(code)) {
@@ -265,26 +244,20 @@ export class FFmpegError extends Error {
265
244
  }
266
245
  }
267
246
  /**
268
- * Check if error code matches specific error.
269
- *
270
- * Compares return code with specific error constant.
271
- * Useful for handling different error conditions.
247
+ * Check if code matches specific error.
272
248
  *
273
- * @param code - FFmpeg return code
274
- * @param errorCode - Error code to check against
249
+ * Convenience method to check for specific error codes.
275
250
  *
276
- * @returns true if codes match, false otherwise
251
+ * @param code - Return code to check
252
+ * @param errorCode - Error code to compare against
253
+ * @returns True if codes match
277
254
  *
278
255
  * @example
279
256
  * ```typescript
280
- * import { FFmpegError } from 'node-av';
281
- * import { AVERROR_EOF, AVERROR_EAGAIN } from 'node-av/constants';
257
+ * import { AVERROR_EOF } from 'node-av/constants';
282
258
  *
283
- * const ret = await codecContext.receiveFrame(frame);
284
259
  * if (FFmpegError.is(ret, AVERROR_EOF)) {
285
- * console.log('End of stream reached');
286
- * } else if (FFmpegError.is(ret, AVERROR_EAGAIN)) {
287
- * console.log('Need more input');
260
+ * console.log('End of file reached');
288
261
  * }
289
262
  * ```
290
263
  */
@@ -292,30 +265,27 @@ export class FFmpegError extends Error {
292
265
  return code === errorCode;
293
266
  }
294
267
  /**
295
- * Get error code.
296
- *
297
- * Direct mapping to AVERROR code
268
+ * Error code.
298
269
  *
299
- * FFmpeg error code (negative number).
270
+ * The FFmpeg error code (negative value).
300
271
  */
301
272
  get code() {
302
273
  return this.native.code;
303
274
  }
304
275
  /**
305
- * Get human-readable error message.
276
+ * Error message.
306
277
  *
307
- * Direct mapping to av_strerror() output
308
- *
309
- * Error description string.
278
+ * Human-readable description of the error.
310
279
  */
311
280
  get message() {
312
281
  return this.native.message;
313
282
  }
314
283
  /**
315
- * Get the native FFmpeg error object.
284
+ * Get the underlying native FFmpegError object.
285
+ *
286
+ * @returns The native FFmpegError binding object
316
287
  *
317
- * @internal For use by other wrapper classes
318
- * @returns The underlying native error object
288
+ * @internal
319
289
  */
320
290
  getNative() {
321
291
  return this.native;
@@ -1 +1 @@
1
- {"version":3,"file":"error.js","sourceRoot":"","sources":["../../src/lib/error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAKxC;;;GAGG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