avbridge 2.0.0 → 2.1.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.
- package/CHANGELOG.md +52 -1
- package/NOTICE.md +82 -0
- package/THIRD_PARTY_LICENSES.md +121 -0
- package/dist/{avi-M5B4SHRM.cjs → avi-GNTV5ZOH.cjs} +4 -4
- package/dist/{avi-M5B4SHRM.cjs.map → avi-GNTV5ZOH.cjs.map} +1 -1
- package/dist/{avi-POCGZ4JX.js → avi-V6HYQVR2.js} +3 -3
- package/dist/{avi-POCGZ4JX.js.map → avi-V6HYQVR2.js.map} +1 -1
- package/dist/{chunk-HZF5JDOO.js → chunk-CUQD23WO.js} +4 -4
- package/dist/{chunk-HZF5JDOO.js.map → chunk-CUQD23WO.js.map} +1 -1
- package/dist/{chunk-5ISVAODK.js → chunk-EJH67FXG.js} +30 -6
- package/dist/chunk-EJH67FXG.js.map +1 -0
- package/dist/{chunk-Z2FJ5TJC.cjs → chunk-JQH6D4OE.cjs} +31 -6
- package/dist/chunk-JQH6D4OE.cjs.map +1 -0
- package/dist/{chunk-TTV56KDB.cjs → chunk-O34444ID.cjs} +6 -6
- package/dist/{chunk-TTV56KDB.cjs.map → chunk-O34444ID.cjs.map} +1 -1
- package/dist/element-browser.js +33647 -0
- package/dist/element-browser.js.map +1 -0
- package/dist/element.cjs +3 -3
- package/dist/element.js +2 -2
- package/dist/index.cjs +16 -16
- package/dist/index.js +4 -4
- package/dist/libav-loader-6APXVNIV.cjs +12 -0
- package/dist/{libav-loader-ZHOERPHW.cjs.map → libav-loader-6APXVNIV.cjs.map} +1 -1
- package/dist/libav-loader-XKH2TKUW.js +3 -0
- package/dist/{libav-loader-KA2MAWLM.js.map → libav-loader-XKH2TKUW.js.map} +1 -1
- package/package.json +19 -7
- package/src/strategies/fallback/libav-loader.ts +49 -7
- package/src/stubs/node-fs-promises.ts +29 -0
- package/vendor/libav/README.md +139 -0
- package/vendor/libav/avbridge/libav-6.8.8.0-avbridge.wasm.mjs +688 -0
- package/vendor/libav/avbridge/libav-6.8.8.0-avbridge.wasm.wasm +0 -0
- package/vendor/libav/avbridge/libav-avbridge.mjs +1 -0
- package/vendor/libav/webcodecs/libav-6.8.8.0-webcodecs.wasm.mjs +747 -0
- package/vendor/libav/webcodecs/libav-6.8.8.0-webcodecs.wasm.wasm +0 -0
- package/vendor/libav/webcodecs/libav-webcodecs.mjs +1 -0
- package/vendor/libav/webcodecs/libav.types.d.ts +5222 -0
- package/dist/chunk-5ISVAODK.js.map +0 -1
- package/dist/chunk-Z2FJ5TJC.cjs.map +0 -1
- package/dist/libav-loader-KA2MAWLM.js +0 -3
- package/dist/libav-loader-ZHOERPHW.cjs +0 -12
|
@@ -0,0 +1,688 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* libav.js v6.8.8.0
|
|
3
|
+
*
|
|
4
|
+
* This software is compiled from several sources, the licenses for which are
|
|
5
|
+
* included herein.
|
|
6
|
+
*
|
|
7
|
+
* ---
|
|
8
|
+
*
|
|
9
|
+
* ffmpeg:
|
|
10
|
+
*
|
|
11
|
+
* Copyright (c) 2000-2024 Fabrice Bellard et al
|
|
12
|
+
*
|
|
13
|
+
* GNU LESSER GENERAL PUBLIC LICENSE
|
|
14
|
+
* Version 2.1, February 1999
|
|
15
|
+
*
|
|
16
|
+
* Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
|
17
|
+
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
18
|
+
* Everyone is permitted to copy and distribute verbatim copies
|
|
19
|
+
* of this license document, but changing it is not allowed.
|
|
20
|
+
*
|
|
21
|
+
* [This is the first released version of the Lesser GPL. It also counts
|
|
22
|
+
* as the successor of the GNU Library Public License, version 2, hence
|
|
23
|
+
* the version number 2.1.]
|
|
24
|
+
*
|
|
25
|
+
* Preamble
|
|
26
|
+
*
|
|
27
|
+
* The licenses for most software are designed to take away your
|
|
28
|
+
* freedom to share and change it. By contrast, the GNU General Public
|
|
29
|
+
* Licenses are intended to guarantee your freedom to share and change
|
|
30
|
+
* free software--to make sure the software is free for all its users.
|
|
31
|
+
*
|
|
32
|
+
* This license, the Lesser General Public License, applies to some
|
|
33
|
+
* specially designated software packages--typically libraries--of the
|
|
34
|
+
* Free Software Foundation and other authors who decide to use it. You
|
|
35
|
+
* can use it too, but we suggest you first think carefully about whether
|
|
36
|
+
* this license or the ordinary General Public License is the better
|
|
37
|
+
* strategy to use in any particular case, based on the explanations below.
|
|
38
|
+
*
|
|
39
|
+
* When we speak of free software, we are referring to freedom of use,
|
|
40
|
+
* not price. Our General Public Licenses are designed to make sure that
|
|
41
|
+
* you have the freedom to distribute copies of free software (and charge
|
|
42
|
+
* for this service if you wish); that you receive source code or can get
|
|
43
|
+
* it if you want it; that you can change the software and use pieces of
|
|
44
|
+
* it in new free programs; and that you are informed that you can do
|
|
45
|
+
* these things.
|
|
46
|
+
*
|
|
47
|
+
* To protect your rights, we need to make restrictions that forbid
|
|
48
|
+
* distributors to deny you these rights or to ask you to surrender these
|
|
49
|
+
* rights. These restrictions translate to certain responsibilities for
|
|
50
|
+
* you if you distribute copies of the library or if you modify it.
|
|
51
|
+
*
|
|
52
|
+
* For example, if you distribute copies of the library, whether gratis
|
|
53
|
+
* or for a fee, you must give the recipients all the rights that we gave
|
|
54
|
+
* you. You must make sure that they, too, receive or can get the source
|
|
55
|
+
* code. If you link other code with the library, you must provide
|
|
56
|
+
* complete object files to the recipients, so that they can relink them
|
|
57
|
+
* with the library after making changes to the library and recompiling
|
|
58
|
+
* it. And you must show them these terms so they know their rights.
|
|
59
|
+
*
|
|
60
|
+
* We protect your rights with a two-step method: (1) we copyright the
|
|
61
|
+
* library, and (2) we offer you this license, which gives you legal
|
|
62
|
+
* permission to copy, distribute and/or modify the library.
|
|
63
|
+
*
|
|
64
|
+
* To protect each distributor, we want to make it very clear that
|
|
65
|
+
* there is no warranty for the free library. Also, if the library is
|
|
66
|
+
* modified by someone else and passed on, the recipients should know
|
|
67
|
+
* that what they have is not the original version, so that the original
|
|
68
|
+
* author's reputation will not be affected by problems that might be
|
|
69
|
+
* introduced by others.
|
|
70
|
+
*
|
|
71
|
+
* Finally, software patents pose a constant threat to the existence of
|
|
72
|
+
* any free program. We wish to make sure that a company cannot
|
|
73
|
+
* effectively restrict the users of a free program by obtaining a
|
|
74
|
+
* restrictive license from a patent holder. Therefore, we insist that
|
|
75
|
+
* any patent license obtained for a version of the library must be
|
|
76
|
+
* consistent with the full freedom of use specified in this license.
|
|
77
|
+
*
|
|
78
|
+
* Most GNU software, including some libraries, is covered by the
|
|
79
|
+
* ordinary GNU General Public License. This license, the GNU Lesser
|
|
80
|
+
* General Public License, applies to certain designated libraries, and
|
|
81
|
+
* is quite different from the ordinary General Public License. We use
|
|
82
|
+
* this license for certain libraries in order to permit linking those
|
|
83
|
+
* libraries into non-free programs.
|
|
84
|
+
*
|
|
85
|
+
* When a program is linked with a library, whether statically or using
|
|
86
|
+
* a shared library, the combination of the two is legally speaking a
|
|
87
|
+
* combined work, a derivative of the original library. The ordinary
|
|
88
|
+
* General Public License therefore permits such linking only if the
|
|
89
|
+
* entire combination fits its criteria of freedom. The Lesser General
|
|
90
|
+
* Public License permits more lax criteria for linking other code with
|
|
91
|
+
* the library.
|
|
92
|
+
*
|
|
93
|
+
* We call this license the "Lesser" General Public License because it
|
|
94
|
+
* does Less to protect the user's freedom than the ordinary General
|
|
95
|
+
* Public License. It also provides other free software developers Less
|
|
96
|
+
* of an advantage over competing non-free programs. These disadvantages
|
|
97
|
+
* are the reason we use the ordinary General Public License for many
|
|
98
|
+
* libraries. However, the Lesser license provides advantages in certain
|
|
99
|
+
* special circumstances.
|
|
100
|
+
*
|
|
101
|
+
* For example, on rare occasions, there may be a special need to
|
|
102
|
+
* encourage the widest possible use of a certain library, so that it becomes
|
|
103
|
+
* a de-facto standard. To achieve this, non-free programs must be
|
|
104
|
+
* allowed to use the library. A more frequent case is that a free
|
|
105
|
+
* library does the same job as widely used non-free libraries. In this
|
|
106
|
+
* case, there is little to gain by limiting the free library to free
|
|
107
|
+
* software only, so we use the Lesser General Public License.
|
|
108
|
+
*
|
|
109
|
+
* In other cases, permission to use a particular library in non-free
|
|
110
|
+
* programs enables a greater number of people to use a large body of
|
|
111
|
+
* free software. For example, permission to use the GNU C Library in
|
|
112
|
+
* non-free programs enables many more people to use the whole GNU
|
|
113
|
+
* operating system, as well as its variant, the GNU/Linux operating
|
|
114
|
+
* system.
|
|
115
|
+
*
|
|
116
|
+
* Although the Lesser General Public License is Less protective of the
|
|
117
|
+
* users' freedom, it does ensure that the user of a program that is
|
|
118
|
+
* linked with the Library has the freedom and the wherewithal to run
|
|
119
|
+
* that program using a modified version of the Library.
|
|
120
|
+
*
|
|
121
|
+
* The precise terms and conditions for copying, distribution and
|
|
122
|
+
* modification follow. Pay close attention to the difference between a
|
|
123
|
+
* "work based on the library" and a "work that uses the library". The
|
|
124
|
+
* former contains code derived from the library, whereas the latter must
|
|
125
|
+
* be combined with the library in order to run.
|
|
126
|
+
*
|
|
127
|
+
* GNU LESSER GENERAL PUBLIC LICENSE
|
|
128
|
+
* TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
|
129
|
+
*
|
|
130
|
+
* 0. This License Agreement applies to any software library or other
|
|
131
|
+
* program which contains a notice placed by the copyright holder or
|
|
132
|
+
* other authorized party saying it may be distributed under the terms of
|
|
133
|
+
* this Lesser General Public License (also called "this License").
|
|
134
|
+
* Each licensee is addressed as "you".
|
|
135
|
+
*
|
|
136
|
+
* A "library" means a collection of software functions and/or data
|
|
137
|
+
* prepared so as to be conveniently linked with application programs
|
|
138
|
+
* (which use some of those functions and data) to form executables.
|
|
139
|
+
*
|
|
140
|
+
* The "Library", below, refers to any such software library or work
|
|
141
|
+
* which has been distributed under these terms. A "work based on the
|
|
142
|
+
* Library" means either the Library or any derivative work under
|
|
143
|
+
* copyright law: that is to say, a work containing the Library or a
|
|
144
|
+
* portion of it, either verbatim or with modifications and/or translated
|
|
145
|
+
* straightforwardly into another language. (Hereinafter, translation is
|
|
146
|
+
* included without limitation in the term "modification".)
|
|
147
|
+
*
|
|
148
|
+
* "Source code" for a work means the preferred form of the work for
|
|
149
|
+
* making modifications to it. For a library, complete source code means
|
|
150
|
+
* all the source code for all modules it contains, plus any associated
|
|
151
|
+
* interface definition files, plus the scripts used to control compilation
|
|
152
|
+
* and installation of the library.
|
|
153
|
+
*
|
|
154
|
+
* Activities other than copying, distribution and modification are not
|
|
155
|
+
* covered by this License; they are outside its scope. The act of
|
|
156
|
+
* running a program using the Library is not restricted, and output from
|
|
157
|
+
* such a program is covered only if its contents constitute a work based
|
|
158
|
+
* on the Library (independent of the use of the Library in a tool for
|
|
159
|
+
* writing it). Whether that is true depends on what the Library does
|
|
160
|
+
* and what the program that uses the Library does.
|
|
161
|
+
*
|
|
162
|
+
* 1. You may copy and distribute verbatim copies of the Library's
|
|
163
|
+
* complete source code as you receive it, in any medium, provided that
|
|
164
|
+
* you conspicuously and appropriately publish on each copy an
|
|
165
|
+
* appropriate copyright notice and disclaimer of warranty; keep intact
|
|
166
|
+
* all the notices that refer to this License and to the absence of any
|
|
167
|
+
* warranty; and distribute a copy of this License along with the
|
|
168
|
+
* Library.
|
|
169
|
+
*
|
|
170
|
+
* You may charge a fee for the physical act of transferring a copy,
|
|
171
|
+
* and you may at your option offer warranty protection in exchange for a
|
|
172
|
+
* fee.
|
|
173
|
+
*
|
|
174
|
+
* 2. You may modify your copy or copies of the Library or any portion
|
|
175
|
+
* of it, thus forming a work based on the Library, and copy and
|
|
176
|
+
* distribute such modifications or work under the terms of Section 1
|
|
177
|
+
* above, provided that you also meet all of these conditions:
|
|
178
|
+
*
|
|
179
|
+
* a) The modified work must itself be a software library.
|
|
180
|
+
*
|
|
181
|
+
* b) You must cause the files modified to carry prominent notices
|
|
182
|
+
* stating that you changed the files and the date of any change.
|
|
183
|
+
*
|
|
184
|
+
* c) You must cause the whole of the work to be licensed at no
|
|
185
|
+
* charge to all third parties under the terms of this License.
|
|
186
|
+
*
|
|
187
|
+
* d) If a facility in the modified Library refers to a function or a
|
|
188
|
+
* table of data to be supplied by an application program that uses
|
|
189
|
+
* the facility, other than as an argument passed when the facility
|
|
190
|
+
* is invoked, then you must make a good faith effort to ensure that,
|
|
191
|
+
* in the event an application does not supply such function or
|
|
192
|
+
* table, the facility still operates, and performs whatever part of
|
|
193
|
+
* its purpose remains meaningful.
|
|
194
|
+
*
|
|
195
|
+
* (For example, a function in a library to compute square roots has
|
|
196
|
+
* a purpose that is entirely well-defined independent of the
|
|
197
|
+
* application. Therefore, Subsection 2d requires that any
|
|
198
|
+
* application-supplied function or table used by this function must
|
|
199
|
+
* be optional: if the application does not supply it, the square
|
|
200
|
+
* root function must still compute square roots.)
|
|
201
|
+
*
|
|
202
|
+
* These requirements apply to the modified work as a whole. If
|
|
203
|
+
* identifiable sections of that work are not derived from the Library,
|
|
204
|
+
* and can be reasonably considered independent and separate works in
|
|
205
|
+
* themselves, then this License, and its terms, do not apply to those
|
|
206
|
+
* sections when you distribute them as separate works. But when you
|
|
207
|
+
* distribute the same sections as part of a whole which is a work based
|
|
208
|
+
* on the Library, the distribution of the whole must be on the terms of
|
|
209
|
+
* this License, whose permissions for other licensees extend to the
|
|
210
|
+
* entire whole, and thus to each and every part regardless of who wrote
|
|
211
|
+
* it.
|
|
212
|
+
*
|
|
213
|
+
* Thus, it is not the intent of this section to claim rights or contest
|
|
214
|
+
* your rights to work written entirely by you; rather, the intent is to
|
|
215
|
+
* exercise the right to control the distribution of derivative or
|
|
216
|
+
* collective works based on the Library.
|
|
217
|
+
*
|
|
218
|
+
* In addition, mere aggregation of another work not based on the Library
|
|
219
|
+
* with the Library (or with a work based on the Library) on a volume of
|
|
220
|
+
* a storage or distribution medium does not bring the other work under
|
|
221
|
+
* the scope of this License.
|
|
222
|
+
*
|
|
223
|
+
* 3. You may opt to apply the terms of the ordinary GNU General Public
|
|
224
|
+
* License instead of this License to a given copy of the Library. To do
|
|
225
|
+
* this, you must alter all the notices that refer to this License, so
|
|
226
|
+
* that they refer to the ordinary GNU General Public License, version 2,
|
|
227
|
+
* instead of to this License. (If a newer version than version 2 of the
|
|
228
|
+
* ordinary GNU General Public License has appeared, then you can specify
|
|
229
|
+
* that version instead if you wish.) Do not make any other change in
|
|
230
|
+
* these notices.
|
|
231
|
+
*
|
|
232
|
+
* Once this change is made in a given copy, it is irreversible for
|
|
233
|
+
* that copy, so the ordinary GNU General Public License applies to all
|
|
234
|
+
* subsequent copies and derivative works made from that copy.
|
|
235
|
+
*
|
|
236
|
+
* This option is useful when you wish to copy part of the code of
|
|
237
|
+
* the Library into a program that is not a library.
|
|
238
|
+
*
|
|
239
|
+
* 4. You may copy and distribute the Library (or a portion or
|
|
240
|
+
* derivative of it, under Section 2) in object code or executable form
|
|
241
|
+
* under the terms of Sections 1 and 2 above provided that you accompany
|
|
242
|
+
* it with the complete corresponding machine-readable source code, which
|
|
243
|
+
* must be distributed under the terms of Sections 1 and 2 above on a
|
|
244
|
+
* medium customarily used for software interchange.
|
|
245
|
+
*
|
|
246
|
+
* If distribution of object code is made by offering access to copy
|
|
247
|
+
* from a designated place, then offering equivalent access to copy the
|
|
248
|
+
* source code from the same place satisfies the requirement to
|
|
249
|
+
* distribute the source code, even though third parties are not
|
|
250
|
+
* compelled to copy the source along with the object code.
|
|
251
|
+
*
|
|
252
|
+
* 5. A program that contains no derivative of any portion of the
|
|
253
|
+
* Library, but is designed to work with the Library by being compiled or
|
|
254
|
+
* linked with it, is called a "work that uses the Library". Such a
|
|
255
|
+
* work, in isolation, is not a derivative work of the Library, and
|
|
256
|
+
* therefore falls outside the scope of this License.
|
|
257
|
+
*
|
|
258
|
+
* However, linking a "work that uses the Library" with the Library
|
|
259
|
+
* creates an executable that is a derivative of the Library (because it
|
|
260
|
+
* contains portions of the Library), rather than a "work that uses the
|
|
261
|
+
* library". The executable is therefore covered by this License.
|
|
262
|
+
* Section 6 states terms for distribution of such executables.
|
|
263
|
+
*
|
|
264
|
+
* When a "work that uses the Library" uses material from a header file
|
|
265
|
+
* that is part of the Library, the object code for the work may be a
|
|
266
|
+
* derivative work of the Library even though the source code is not.
|
|
267
|
+
* Whether this is true is especially significant if the work can be
|
|
268
|
+
* linked without the Library, or if the work is itself a library. The
|
|
269
|
+
* threshold for this to be true is not precisely defined by law.
|
|
270
|
+
*
|
|
271
|
+
* If such an object file uses only numerical parameters, data
|
|
272
|
+
* structure layouts and accessors, and small macros and small inline
|
|
273
|
+
* functions (ten lines or less in length), then the use of the object
|
|
274
|
+
* file is unrestricted, regardless of whether it is legally a derivative
|
|
275
|
+
* work. (Executables containing this object code plus portions of the
|
|
276
|
+
* Library will still fall under Section 6.)
|
|
277
|
+
*
|
|
278
|
+
* Otherwise, if the work is a derivative of the Library, you may
|
|
279
|
+
* distribute the object code for the work under the terms of Section 6.
|
|
280
|
+
* Any executables containing that work also fall under Section 6,
|
|
281
|
+
* whether or not they are linked directly with the Library itself.
|
|
282
|
+
*
|
|
283
|
+
* 6. As an exception to the Sections above, you may also combine or
|
|
284
|
+
* link a "work that uses the Library" with the Library to produce a
|
|
285
|
+
* work containing portions of the Library, and distribute that work
|
|
286
|
+
* under terms of your choice, provided that the terms permit
|
|
287
|
+
* modification of the work for the customer's own use and reverse
|
|
288
|
+
* engineering for debugging such modifications.
|
|
289
|
+
*
|
|
290
|
+
* You must give prominent notice with each copy of the work that the
|
|
291
|
+
* Library is used in it and that the Library and its use are covered by
|
|
292
|
+
* this License. You must supply a copy of this License. If the work
|
|
293
|
+
* during execution displays copyright notices, you must include the
|
|
294
|
+
* copyright notice for the Library among them, as well as a reference
|
|
295
|
+
* directing the user to the copy of this License. Also, you must do one
|
|
296
|
+
* of these things:
|
|
297
|
+
*
|
|
298
|
+
* a) Accompany the work with the complete corresponding
|
|
299
|
+
* machine-readable source code for the Library including whatever
|
|
300
|
+
* changes were used in the work (which must be distributed under
|
|
301
|
+
* Sections 1 and 2 above); and, if the work is an executable linked
|
|
302
|
+
* with the Library, with the complete machine-readable "work that
|
|
303
|
+
* uses the Library", as object code and/or source code, so that the
|
|
304
|
+
* user can modify the Library and then relink to produce a modified
|
|
305
|
+
* executable containing the modified Library. (It is understood
|
|
306
|
+
* that the user who changes the contents of definitions files in the
|
|
307
|
+
* Library will not necessarily be able to recompile the application
|
|
308
|
+
* to use the modified definitions.)
|
|
309
|
+
*
|
|
310
|
+
* b) Use a suitable shared library mechanism for linking with the
|
|
311
|
+
* Library. A suitable mechanism is one that (1) uses at run time a
|
|
312
|
+
* copy of the library already present on the user's computer system,
|
|
313
|
+
* rather than copying library functions into the executable, and (2)
|
|
314
|
+
* will operate properly with a modified version of the library, if
|
|
315
|
+
* the user installs one, as long as the modified version is
|
|
316
|
+
* interface-compatible with the version that the work was made with.
|
|
317
|
+
*
|
|
318
|
+
* c) Accompany the work with a written offer, valid for at
|
|
319
|
+
* least three years, to give the same user the materials
|
|
320
|
+
* specified in Subsection 6a, above, for a charge no more
|
|
321
|
+
* than the cost of performing this distribution.
|
|
322
|
+
*
|
|
323
|
+
* d) If distribution of the work is made by offering access to copy
|
|
324
|
+
* from a designated place, offer equivalent access to copy the above
|
|
325
|
+
* specified materials from the same place.
|
|
326
|
+
*
|
|
327
|
+
* e) Verify that the user has already received a copy of these
|
|
328
|
+
* materials or that you have already sent this user a copy.
|
|
329
|
+
*
|
|
330
|
+
* For an executable, the required form of the "work that uses the
|
|
331
|
+
* Library" must include any data and utility programs needed for
|
|
332
|
+
* reproducing the executable from it. However, as a special exception,
|
|
333
|
+
* the materials to be distributed need not include anything that is
|
|
334
|
+
* normally distributed (in either source or binary form) with the major
|
|
335
|
+
* components (compiler, kernel, and so on) of the operating system on
|
|
336
|
+
* which the executable runs, unless that component itself accompanies
|
|
337
|
+
* the executable.
|
|
338
|
+
*
|
|
339
|
+
* It may happen that this requirement contradicts the license
|
|
340
|
+
* restrictions of other proprietary libraries that do not normally
|
|
341
|
+
* accompany the operating system. Such a contradiction means you cannot
|
|
342
|
+
* use both them and the Library together in an executable that you
|
|
343
|
+
* distribute.
|
|
344
|
+
*
|
|
345
|
+
* 7. You may place library facilities that are a work based on the
|
|
346
|
+
* Library side-by-side in a single library together with other library
|
|
347
|
+
* facilities not covered by this License, and distribute such a combined
|
|
348
|
+
* library, provided that the separate distribution of the work based on
|
|
349
|
+
* the Library and of the other library facilities is otherwise
|
|
350
|
+
* permitted, and provided that you do these two things:
|
|
351
|
+
*
|
|
352
|
+
* a) Accompany the combined library with a copy of the same work
|
|
353
|
+
* based on the Library, uncombined with any other library
|
|
354
|
+
* facilities. This must be distributed under the terms of the
|
|
355
|
+
* Sections above.
|
|
356
|
+
*
|
|
357
|
+
* b) Give prominent notice with the combined library of the fact
|
|
358
|
+
* that part of it is a work based on the Library, and explaining
|
|
359
|
+
* where to find the accompanying uncombined form of the same work.
|
|
360
|
+
*
|
|
361
|
+
* 8. You may not copy, modify, sublicense, link with, or distribute
|
|
362
|
+
* the Library except as expressly provided under this License. Any
|
|
363
|
+
* attempt otherwise to copy, modify, sublicense, link with, or
|
|
364
|
+
* distribute the Library is void, and will automatically terminate your
|
|
365
|
+
* rights under this License. However, parties who have received copies,
|
|
366
|
+
* or rights, from you under this License will not have their licenses
|
|
367
|
+
* terminated so long as such parties remain in full compliance.
|
|
368
|
+
*
|
|
369
|
+
* 9. You are not required to accept this License, since you have not
|
|
370
|
+
* signed it. However, nothing else grants you permission to modify or
|
|
371
|
+
* distribute the Library or its derivative works. These actions are
|
|
372
|
+
* prohibited by law if you do not accept this License. Therefore, by
|
|
373
|
+
* modifying or distributing the Library (or any work based on the
|
|
374
|
+
* Library), you indicate your acceptance of this License to do so, and
|
|
375
|
+
* all its terms and conditions for copying, distributing or modifying
|
|
376
|
+
* the Library or works based on it.
|
|
377
|
+
*
|
|
378
|
+
* 10. Each time you redistribute the Library (or any work based on the
|
|
379
|
+
* Library), the recipient automatically receives a license from the
|
|
380
|
+
* original licensor to copy, distribute, link with or modify the Library
|
|
381
|
+
* subject to these terms and conditions. You may not impose any further
|
|
382
|
+
* restrictions on the recipients' exercise of the rights granted herein.
|
|
383
|
+
* You are not responsible for enforcing compliance by third parties with
|
|
384
|
+
* this License.
|
|
385
|
+
*
|
|
386
|
+
* 11. If, as a consequence of a court judgment or allegation of patent
|
|
387
|
+
* infringement or for any other reason (not limited to patent issues),
|
|
388
|
+
* conditions are imposed on you (whether by court order, agreement or
|
|
389
|
+
* otherwise) that contradict the conditions of this License, they do not
|
|
390
|
+
* excuse you from the conditions of this License. If you cannot
|
|
391
|
+
* distribute so as to satisfy simultaneously your obligations under this
|
|
392
|
+
* License and any other pertinent obligations, then as a consequence you
|
|
393
|
+
* may not distribute the Library at all. For example, if a patent
|
|
394
|
+
* license would not permit royalty-free redistribution of the Library by
|
|
395
|
+
* all those who receive copies directly or indirectly through you, then
|
|
396
|
+
* the only way you could satisfy both it and this License would be to
|
|
397
|
+
* refrain entirely from distribution of the Library.
|
|
398
|
+
*
|
|
399
|
+
* If any portion of this section is held invalid or unenforceable under any
|
|
400
|
+
* particular circumstance, the balance of the section is intended to apply,
|
|
401
|
+
* and the section as a whole is intended to apply in other circumstances.
|
|
402
|
+
*
|
|
403
|
+
* It is not the purpose of this section to induce you to infringe any
|
|
404
|
+
* patents or other property right claims or to contest validity of any
|
|
405
|
+
* such claims; this section has the sole purpose of protecting the
|
|
406
|
+
* integrity of the free software distribution system which is
|
|
407
|
+
* implemented by public license practices. Many people have made
|
|
408
|
+
* generous contributions to the wide range of software distributed
|
|
409
|
+
* through that system in reliance on consistent application of that
|
|
410
|
+
* system; it is up to the author/donor to decide if he or she is willing
|
|
411
|
+
* to distribute software through any other system and a licensee cannot
|
|
412
|
+
* impose that choice.
|
|
413
|
+
*
|
|
414
|
+
* This section is intended to make thoroughly clear what is believed to
|
|
415
|
+
* be a consequence of the rest of this License.
|
|
416
|
+
*
|
|
417
|
+
* 12. If the distribution and/or use of the Library is restricted in
|
|
418
|
+
* certain countries either by patents or by copyrighted interfaces, the
|
|
419
|
+
* original copyright holder who places the Library under this License may add
|
|
420
|
+
* an explicit geographical distribution limitation excluding those countries,
|
|
421
|
+
* so that distribution is permitted only in or among countries not thus
|
|
422
|
+
* excluded. In such case, this License incorporates the limitation as if
|
|
423
|
+
* written in the body of this License.
|
|
424
|
+
*
|
|
425
|
+
* 13. The Free Software Foundation may publish revised and/or new
|
|
426
|
+
* versions of the Lesser General Public License from time to time.
|
|
427
|
+
* Such new versions will be similar in spirit to the present version,
|
|
428
|
+
* but may differ in detail to address new problems or concerns.
|
|
429
|
+
*
|
|
430
|
+
* Each version is given a distinguishing version number. If the Library
|
|
431
|
+
* specifies a version number of this License which applies to it and
|
|
432
|
+
* "any later version", you have the option of following the terms and
|
|
433
|
+
* conditions either of that version or of any later version published by
|
|
434
|
+
* the Free Software Foundation. If the Library does not specify a
|
|
435
|
+
* license version number, you may choose any version ever published by
|
|
436
|
+
* the Free Software Foundation.
|
|
437
|
+
*
|
|
438
|
+
* 14. If you wish to incorporate parts of the Library into other free
|
|
439
|
+
* programs whose distribution conditions are incompatible with these,
|
|
440
|
+
* write to the author to ask for permission. For software which is
|
|
441
|
+
* copyrighted by the Free Software Foundation, write to the Free
|
|
442
|
+
* Software Foundation; we sometimes make exceptions for this. Our
|
|
443
|
+
* decision will be guided by the two goals of preserving the free status
|
|
444
|
+
* of all derivatives of our free software and of promoting the sharing
|
|
445
|
+
* and reuse of software generally.
|
|
446
|
+
*
|
|
447
|
+
* NO WARRANTY
|
|
448
|
+
*
|
|
449
|
+
* 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
|
450
|
+
* WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
|
451
|
+
* EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
|
452
|
+
* OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
|
453
|
+
* KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
|
454
|
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
455
|
+
* PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
|
456
|
+
* LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
|
457
|
+
* THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
|
458
|
+
*
|
|
459
|
+
* 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
|
460
|
+
* WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
|
461
|
+
* AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
|
462
|
+
* FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
|
463
|
+
* CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
|
464
|
+
* LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
|
465
|
+
* RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
|
466
|
+
* FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
|
467
|
+
* SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
|
468
|
+
* DAMAGES.
|
|
469
|
+
*
|
|
470
|
+
* END OF TERMS AND CONDITIONS
|
|
471
|
+
*
|
|
472
|
+
* How to Apply These Terms to Your New Libraries
|
|
473
|
+
*
|
|
474
|
+
* If you develop a new library, and you want it to be of the greatest
|
|
475
|
+
* possible use to the public, we recommend making it free software that
|
|
476
|
+
* everyone can redistribute and change. You can do so by permitting
|
|
477
|
+
* redistribution under these terms (or, alternatively, under the terms of the
|
|
478
|
+
* ordinary General Public License).
|
|
479
|
+
*
|
|
480
|
+
* To apply these terms, attach the following notices to the library. It is
|
|
481
|
+
* safest to attach them to the start of each source file to most effectively
|
|
482
|
+
* convey the exclusion of warranty; and each file should have at least the
|
|
483
|
+
* "copyright" line and a pointer to where the full notice is found.
|
|
484
|
+
*
|
|
485
|
+
* <one line to give the library's name and a brief idea of what it does.>
|
|
486
|
+
* Copyright (C) <year> <name of author>
|
|
487
|
+
*
|
|
488
|
+
* This library is free software; you can redistribute it and/or
|
|
489
|
+
* modify it under the terms of the GNU Lesser General Public
|
|
490
|
+
* License as published by the Free Software Foundation; either
|
|
491
|
+
* version 2.1 of the License, or (at your option) any later version.
|
|
492
|
+
*
|
|
493
|
+
* This library is distributed in the hope that it will be useful,
|
|
494
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
495
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
496
|
+
* Lesser General Public License for more details.
|
|
497
|
+
*
|
|
498
|
+
* You should have received a copy of the GNU Lesser General Public
|
|
499
|
+
* License along with this library; if not, write to the Free Software
|
|
500
|
+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
501
|
+
*
|
|
502
|
+
* Also add information on how to contact you by electronic and paper mail.
|
|
503
|
+
*
|
|
504
|
+
* You should also get your employer (if you work as a programmer) or your
|
|
505
|
+
* school, if any, to sign a "copyright disclaimer" for the library, if
|
|
506
|
+
* necessary. Here is a sample; alter the names:
|
|
507
|
+
*
|
|
508
|
+
* Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
|
509
|
+
* library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
|
510
|
+
*
|
|
511
|
+
* <signature of Ty Coon>, 1 April 1990
|
|
512
|
+
* Ty Coon, President of Vice
|
|
513
|
+
*
|
|
514
|
+
* That's all there is to it!
|
|
515
|
+
*
|
|
516
|
+
*
|
|
517
|
+
* ---
|
|
518
|
+
*
|
|
519
|
+
* ffmpeg oggdec:
|
|
520
|
+
*
|
|
521
|
+
* Copyright (C) 2005 Michael Ahlberg, Måns Rullgård
|
|
522
|
+
* Copyright (C) 2005 Matthieu CASTET, Alex Beregszaszi
|
|
523
|
+
* Copyright (C) 2008 Reimar Döffinger
|
|
524
|
+
*
|
|
525
|
+
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
526
|
+
* copy of this software and associated documentation files (the
|
|
527
|
+
* "Software"), to deal in the Software without restriction, including
|
|
528
|
+
* without limitation the rights to use, copy, modify, merge, publish,
|
|
529
|
+
* distribute, sublicense, and/or sell copies of the Software, and to
|
|
530
|
+
* permit persons to whom the Software is furnished to do so, subject to
|
|
531
|
+
* the following conditions:
|
|
532
|
+
*
|
|
533
|
+
* The above copyright notice and this permission notice shall be included
|
|
534
|
+
* in all copies or substantial portions of the Software.
|
|
535
|
+
*
|
|
536
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
537
|
+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
538
|
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
539
|
+
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
540
|
+
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
541
|
+
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
542
|
+
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
543
|
+
*
|
|
544
|
+
*
|
|
545
|
+
* ---
|
|
546
|
+
*
|
|
547
|
+
* emscripten and musl:
|
|
548
|
+
*
|
|
549
|
+
* Copyright (c) 2010-2024 Emscripten authors, see AUTHORS file.
|
|
550
|
+
* Copyright © 2005-2024 Rich Felker, et al.
|
|
551
|
+
*
|
|
552
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
553
|
+
* of this software and associated documentation files (the "Software"), to
|
|
554
|
+
* deal in the Software without restriction, including without limitation the
|
|
555
|
+
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
556
|
+
* sell copies of the Software, and to permit persons to whom the Software is
|
|
557
|
+
* furnished to do so, subject to the following conditions:
|
|
558
|
+
*
|
|
559
|
+
* The above copyright notice and this permission notice shall be included in
|
|
560
|
+
* all copies or substantial portions of the Software.
|
|
561
|
+
*
|
|
562
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
563
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
564
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
565
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
566
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
567
|
+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
568
|
+
* IN THE SOFTWARE.
|
|
569
|
+
*
|
|
570
|
+
* emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 5.0.5 (bc569045b14c3fa7b960734ed2c50da7b20adea4)
|
|
571
|
+
*
|
|
572
|
+
*/
|
|
573
|
+
async function LibAVFactory(moduleArg={}){var moduleRtn;var Module=moduleArg;var ENVIRONMENT_IS_WEB=!!globalThis.window;var ENVIRONMENT_IS_WORKER=!!globalThis.WorkerGlobalScope;var ENVIRONMENT_IS_NODE=globalThis.process?.versions?.node&&globalThis.process?.type!="renderer";if(ENVIRONMENT_IS_NODE){const{createRequire}=await import("node:module");var require=createRequire(import.meta.url)}if(typeof _scriptName==="undefined"){if(typeof LibAV==="object"&&LibAV&&LibAV.base)_scriptName=LibAV.base+"/libav-6.8.8.0-avbridge.wasm.mjs";else if(typeof self==="object"&&self&&self.location)_scriptName=self.location.href}Module.locateFile=function(path,prefix){if(path.lastIndexOf(".wasm")===path.length-5&&path.indexOf("libav-")!==-1){if(Module.wasmurl)return Module.wasmurl;if(Module.variant)return prefix+"libav-6.8.8.0-"+Module.variant+".wasm.wasm"}return prefix+path};var arguments_=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};var _scriptName=import.meta.url;var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var readAsync,readBinary;if(ENVIRONMENT_IS_NODE){var fs=require("node:fs");if(_scriptName.startsWith("file:")){scriptDirectory=require("node:path").dirname(require("node:url").fileURLToPath(_scriptName))+"/"}readBinary=filename=>{filename=isFileURI(filename)?new URL(filename):filename;var ret=fs.readFileSync(filename);return ret};readAsync=async(filename,binary=true)=>{filename=isFileURI(filename)?new URL(filename):filename;var ret=fs.readFileSync(filename,binary?undefined:"utf8");return ret};if(process.argv.length>1){thisProgram=process.argv[1].replace(/\\/g,"/")}arguments_=process.argv.slice(2);quit_=(status,toThrow)=>{process.exitCode=status;throw toThrow}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){try{scriptDirectory=new URL(".",_scriptName).href}catch{}{if(ENVIRONMENT_IS_WORKER){readBinary=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=async url=>{if(isFileURI(url)){return new Promise((resolve,reject)=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=()=>{if(xhr.status==200||xhr.status==0&&xhr.response){resolve(xhr.response);return}reject(xhr.status)};xhr.onerror=reject;xhr.send(null)})}var response=await fetch(url,{credentials:"same-origin"});if(response.ok){return response.arrayBuffer()}throw new Error(response.status+" : "+response.url)}}}else{}var out=console.log.bind(console);var err=console.error.bind(console);var wasmBinary;var ABORT=false;var EXITSTATUS;var isFileURI=filename=>filename.startsWith("file://");class EmscriptenEH{}class EmscriptenSjLj extends EmscriptenEH{}var readyPromiseResolve,readyPromiseReject;var runtimeInitialized=false;function updateMemoryViews(){var b=wasmMemory.buffer;Module["HEAP8"]=HEAP8=new Int8Array(b);Module["HEAP16"]=HEAP16=new Int16Array(b);Module["HEAPU8"]=HEAPU8=new Uint8Array(b);Module["HEAPU16"]=HEAPU16=new Uint16Array(b);Module["HEAP32"]=HEAP32=new Int32Array(b);Module["HEAPU32"]=HEAPU32=new Uint32Array(b);Module["HEAPF32"]=HEAPF32=new Float32Array(b);HEAPF64=new Float64Array(b)}function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(onPreRuns)}function initRuntime(){runtimeInitialized=true;if(!Module["noFSInit"]&&!FS.initialized)FS.init();TTY.init();wasmExports["J"]();FS.ignorePermissions=false}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(onPostRuns)}function abort(what){Module["onAbort"]?.(what);what=`Aborted(${what})`;err(what);ABORT=true;what+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(what);readyPromiseReject?.(e);throw e}var wasmBinaryFile;function findWasmBinary(){if(Module["locateFile"]){return locateFile("libav-6.8.8.0-avbridge.wasm.wasm")}return new URL("libav-6.8.8.0-avbridge.wasm.wasm",import.meta.url).href}function getBinarySync(file){if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}throw"both async and sync fetching of the wasm failed"}async function getWasmBinary(binaryFile){if(!wasmBinary){try{var response=await readAsync(binaryFile);return new Uint8Array(response)}catch{}}return getBinarySync(binaryFile)}async function instantiateArrayBuffer(binaryFile,imports){try{var binary=await getWasmBinary(binaryFile);var instance=await WebAssembly.instantiate(binary,imports);return instance}catch(reason){err(`failed to asynchronously prepare wasm: ${reason}`);abort(reason)}}async function instantiateAsync(binary,binaryFile,imports){if(!binary&&!isFileURI(binaryFile)&&!ENVIRONMENT_IS_NODE){try{var response=fetch(binaryFile,{credentials:"same-origin"});var instantiationResult=await WebAssembly.instantiateStreaming(response,imports);return instantiationResult}catch(reason){err(`wasm streaming compile failed: ${reason}`);err("falling back to ArrayBuffer instantiation")}}return instantiateArrayBuffer(binaryFile,imports)}function getWasmImports(){var imports={a:wasmImports};return imports}async function createWasm(){function receiveInstance(instance,module){wasmExports=instance.exports;wasmExports=Asyncify.instrumentWasmExports(wasmExports);assignWasmExports(wasmExports);updateMemoryViews();return wasmExports}function receiveInstantiationResult(result){return receiveInstance(result["instance"])}var info=getWasmImports();if(Module["instantiateWasm"]){return new Promise((resolve,reject)=>{Module["instantiateWasm"](info,(inst,mod)=>{resolve(receiveInstance(inst,mod))})})}wasmBinaryFile??=findWasmBinary();var result=await instantiateAsync(wasmBinary,wasmBinaryFile,info);var exports=receiveInstantiationResult(result);return exports}var tempDouble;var tempI64;class ExitStatus{name="ExitStatus";constructor(status){this.message=`Program terminated with exit(${status})`;this.status=status}}var HEAP16;var HEAP32;var HEAP8;var HEAPF32;var HEAPF64;var HEAPU16;var HEAPU32;var HEAPU8;var callRuntimeCallbacks=callbacks=>{while(callbacks.length>0){callbacks.shift()(Module)}};var onPostRuns=[];var addOnPostRun=cb=>onPostRuns.push(cb);var onPreRuns=[];var addOnPreRun=cb=>onPreRuns.push(cb);var dynCalls={};var noExitRuntime=true;var stackRestore=val=>__emscripten_stack_restore(val);var stackSave=()=>_emscripten_stack_get_current();var UTF8Decoder=globalThis.TextDecoder&&new TextDecoder;var findStringEnd=(heapOrArray,idx,maxBytesToRead,ignoreNul)=>{var maxIdx=idx+maxBytesToRead;if(ignoreNul)return maxIdx;while(heapOrArray[idx]&&!(idx>=maxIdx))++idx;return idx};var UTF8ArrayToString=(heapOrArray,idx=0,maxBytesToRead,ignoreNul)=>{var endPtr=findStringEnd(heapOrArray,idx,maxBytesToRead,ignoreNul);if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.subarray(idx,endPtr))}var str="";while(idx<endPtr){var u0=heapOrArray[idx++];if(!(u0&128)){str+=String.fromCharCode(u0);continue}var u1=heapOrArray[idx++]&63;if((u0&224)==192){str+=String.fromCharCode((u0&31)<<6|u1);continue}var u2=heapOrArray[idx++]&63;if((u0&240)==224){u0=(u0&15)<<12|u1<<6|u2}else{u0=(u0&7)<<18|u1<<12|u2<<6|heapOrArray[idx++]&63}if(u0<65536){str+=String.fromCharCode(u0)}else{var ch=u0-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}}return str};var UTF8ToString=(ptr,maxBytesToRead,ignoreNul)=>ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead,ignoreNul):"";var ___assert_fail=(condition,filename,line,func)=>abort(`Assertion failed: ${UTF8ToString(condition)}, at: `+[filename?UTF8ToString(filename):"unknown filename",line,func?UTF8ToString(func):"unknown function"]);var PATH={isAbs:path=>path.charAt(0)==="/",splitPath:filename=>{var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return splitPathRe.exec(filename).slice(1)},normalizeArray:(parts,allowAboveRoot)=>{var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up;up--){parts.unshift("..")}}return parts},normalize:path=>{var isAbsolute=PATH.isAbs(path),trailingSlash=path.slice(-1)==="/";path=PATH.normalizeArray(path.split("/").filter(p=>!!p),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path},dirname:path=>{var result=PATH.splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return"."}if(dir){dir=dir.slice(0,-1)}return root+dir},basename:path=>path&&path.match(/([^\/]+|\/)\/*$/)[1],join:(...paths)=>PATH.normalize(paths.join("/")),join2:(l,r)=>PATH.normalize(l+"/"+r)};var initRandomFill=()=>{if(ENVIRONMENT_IS_NODE){var nodeCrypto=require("node:crypto");return view=>nodeCrypto.randomFillSync(view)}return view=>(crypto.getRandomValues(view),0)};var randomFill=view=>(randomFill=initRandomFill())(view);var PATH_FS={resolve:(...args)=>{var resolvedPath="",resolvedAbsolute=false;for(var i=args.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?args[i]:FS.cwd();if(typeof path!="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){return""}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=PATH.isAbs(path)}resolvedPath=PATH.normalizeArray(resolvedPath.split("/").filter(p=>!!p),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."},relative:(from,to)=>{from=PATH_FS.resolve(from).slice(1);to=PATH_FS.resolve(to).slice(1);function trim(arr){var start=0;for(;start<arr.length;start++){if(arr[start]!=="")break}var end=arr.length-1;for(;end>=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i<length;i++){if(fromParts[i]!==toParts[i]){samePartsLength=i;break}}var outputParts=[];for(var i=samePartsLength;i<fromParts.length;i++){outputParts.push("..")}outputParts=outputParts.concat(toParts.slice(samePartsLength));return outputParts.join("/")}};var FS_stdin_getChar_buffer=[];var lengthBytesUTF8=str=>{var len=0;for(var i=0;i<str.length;++i){var c=str.charCodeAt(i);if(c<=127){len++}else if(c<=2047){len+=2}else if(c>=55296&&c<=57343){len+=4;++i}else{len+=3}}return len};var stringToUTF8Array=(str,heap,outIdx,maxBytesToWrite)=>{if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i<str.length;++i){var u=str.codePointAt(i);if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63;i++}}heap[outIdx]=0;return outIdx-startIdx};var intArrayFromString=(stringy,dontAddNull,length)=>{var len=length>0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array};var FS_stdin_getChar=()=>{if(!FS_stdin_getChar_buffer.length){var result=null;if(ENVIRONMENT_IS_NODE){var BUFSIZE=256;var buf=Buffer.alloc(BUFSIZE);var bytesRead=0;var fd=process.stdin.fd;try{bytesRead=fs.readSync(fd,buf,0,BUFSIZE)}catch(e){if(e.toString().includes("EOF"))bytesRead=0;else throw e}if(bytesRead>0){result=buf.slice(0,bytesRead).toString("utf-8")}}else if(globalThis.window?.prompt){result=window.prompt("Input: ");if(result!==null){result+="\n"}}else{}if(!result){return null}FS_stdin_getChar_buffer=intArrayFromString(result,true)}return FS_stdin_getChar_buffer.shift()};var TTY={ttys:[],init(){},shutdown(){},register(dev,ops){TTY.ttys[dev]={input:[],output:[],ops};FS.registerDevice(dev,TTY.stream_ops)},stream_ops:{open(stream){var tty=TTY.ttys[stream.node.rdev];if(!tty){throw new FS.ErrnoError(43)}stream.tty=tty;stream.seekable=false},close(stream){stream.tty.ops.fsync(stream.tty)},fsync(stream){stream.tty.ops.fsync(stream.tty)},read(stream,buffer,offset,length,pos){if(!stream.tty||!stream.tty.ops.get_char){throw new FS.ErrnoError(60)}var bytesRead=0;for(var i=0;i<length;i++){var result;try{result=stream.tty.ops.get_char(stream.tty)}catch(e){throw new FS.ErrnoError(29)}if(result===undefined&&bytesRead===0){throw new FS.ErrnoError(6)}if(result===null||result===undefined)break;bytesRead++;buffer[offset+i]=result}if(bytesRead){stream.node.atime=Date.now()}return bytesRead},write(stream,buffer,offset,length,pos){if(!stream.tty||!stream.tty.ops.put_char){throw new FS.ErrnoError(60)}try{for(var i=0;i<length;i++){stream.tty.ops.put_char(stream.tty,buffer[offset+i])}}catch(e){throw new FS.ErrnoError(29)}if(length){stream.node.mtime=stream.node.ctime=Date.now()}return i}},default_tty_ops:{get_char(tty){return FS_stdin_getChar()},put_char(tty,val){if(val===null||val===10){out(UTF8ArrayToString(tty.output));tty.output=[]}else{if(val!=0)tty.output.push(val)}},fsync(tty){if(tty.output?.length>0){out(UTF8ArrayToString(tty.output));tty.output=[]}},ioctl_tcgets(tty){return{c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},ioctl_tcsets(tty,optional_actions,data){return 0},ioctl_tiocgwinsz(tty){return[24,80]}},default_tty1_ops:{put_char(tty,val){if(val===null||val===10){err(UTF8ArrayToString(tty.output));tty.output=[]}else{if(val!=0)tty.output.push(val)}},fsync(tty){if(tty.output?.length>0){err(UTF8ArrayToString(tty.output));tty.output=[]}}}};var mmapAlloc=size=>{abort()};var MEMFS={ops_table:null,mount(mount){return MEMFS.createNode(null,"/",16895,0)},createNode(parent,name,mode,dev){if(FS.isBlkdev(mode)||FS.isFIFO(mode)){throw new FS.ErrnoError(63)}MEMFS.ops_table||={dir:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,lookup:MEMFS.node_ops.lookup,mknod:MEMFS.node_ops.mknod,rename:MEMFS.node_ops.rename,unlink:MEMFS.node_ops.unlink,rmdir:MEMFS.node_ops.rmdir,readdir:MEMFS.node_ops.readdir,symlink:MEMFS.node_ops.symlink},stream:{llseek:MEMFS.stream_ops.llseek}},file:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:{llseek:MEMFS.stream_ops.llseek,read:MEMFS.stream_ops.read,write:MEMFS.stream_ops.write,mmap:MEMFS.stream_ops.mmap,msync:MEMFS.stream_ops.msync}},link:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,readlink:MEMFS.node_ops.readlink},stream:{}},chrdev:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:FS.chrdev_stream_ops}};var node=FS.createNode(parent,name,mode,dev);if(FS.isDir(node.mode)){node.node_ops=MEMFS.ops_table.dir.node;node.stream_ops=MEMFS.ops_table.dir.stream;node.contents={}}else if(FS.isFile(node.mode)){node.node_ops=MEMFS.ops_table.file.node;node.stream_ops=MEMFS.ops_table.file.stream;node.usedBytes=0;node.contents=MEMFS.emptyFileContents??=new Uint8Array(0)}else if(FS.isLink(node.mode)){node.node_ops=MEMFS.ops_table.link.node;node.stream_ops=MEMFS.ops_table.link.stream}else if(FS.isChrdev(node.mode)){node.node_ops=MEMFS.ops_table.chrdev.node;node.stream_ops=MEMFS.ops_table.chrdev.stream}node.atime=node.mtime=node.ctime=Date.now();if(parent){parent.contents[name]=node;parent.atime=parent.mtime=parent.ctime=node.atime}return node},getFileDataAsTypedArray(node){return node.contents.subarray(0,node.usedBytes)},expandFileStorage(node,newCapacity){var prevCapacity=node.contents.length;if(prevCapacity>=newCapacity)return;var CAPACITY_DOUBLING_MAX=1024*1024;newCapacity=Math.max(newCapacity,prevCapacity*(prevCapacity<CAPACITY_DOUBLING_MAX?2:1.125)>>>0);if(prevCapacity)newCapacity=Math.max(newCapacity,256);var oldContents=MEMFS.getFileDataAsTypedArray(node);node.contents=new Uint8Array(newCapacity);node.contents.set(oldContents)},resizeFileStorage(node,newSize){if(node.usedBytes==newSize)return;var oldContents=node.contents;node.contents=new Uint8Array(newSize);node.contents.set(oldContents.subarray(0,Math.min(newSize,node.usedBytes)));node.usedBytes=newSize},node_ops:{getattr(node){var attr={};attr.dev=FS.isChrdev(node.mode)?node.id:1;attr.ino=node.id;attr.mode=node.mode;attr.nlink=1;attr.uid=0;attr.gid=0;attr.rdev=node.rdev;if(FS.isDir(node.mode)){attr.size=4096}else if(FS.isFile(node.mode)){attr.size=node.usedBytes}else if(FS.isLink(node.mode)){attr.size=node.link.length}else{attr.size=0}attr.atime=new Date(node.atime);attr.mtime=new Date(node.mtime);attr.ctime=new Date(node.ctime);attr.blksize=4096;attr.blocks=Math.ceil(attr.size/attr.blksize);return attr},setattr(node,attr){for(const key of["mode","atime","mtime","ctime"]){if(attr[key]!=null){node[key]=attr[key]}}if(attr.size!==undefined){MEMFS.resizeFileStorage(node,attr.size)}},lookup(parent,name){if(!MEMFS.doesNotExistError){MEMFS.doesNotExistError=new FS.ErrnoError(44);MEMFS.doesNotExistError.stack="<generic error, no stack>"}throw MEMFS.doesNotExistError},mknod(parent,name,mode,dev){return MEMFS.createNode(parent,name,mode,dev)},rename(old_node,new_dir,new_name){var new_node;try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(new_node){if(FS.isDir(old_node.mode)){for(var i in new_node.contents){throw new FS.ErrnoError(55)}}FS.hashRemoveNode(new_node)}delete old_node.parent.contents[old_node.name];new_dir.contents[new_name]=old_node;old_node.name=new_name;new_dir.ctime=new_dir.mtime=old_node.parent.ctime=old_node.parent.mtime=Date.now()},unlink(parent,name){delete parent.contents[name];parent.ctime=parent.mtime=Date.now()},rmdir(parent,name){var node=FS.lookupNode(parent,name);for(var i in node.contents){throw new FS.ErrnoError(55)}delete parent.contents[name];parent.ctime=parent.mtime=Date.now()},readdir(node){return[".","..",...Object.keys(node.contents)]},symlink(parent,newname,oldpath){var node=MEMFS.createNode(parent,newname,511|40960,0);node.link=oldpath;return node},readlink(node){if(!FS.isLink(node.mode)){throw new FS.ErrnoError(28)}return node.link}},stream_ops:{read(stream,buffer,offset,length,position){var contents=stream.node.contents;if(position>=stream.node.usedBytes)return 0;var size=Math.min(stream.node.usedBytes-position,length);buffer.set(contents.subarray(position,position+size),offset);return size},write(stream,buffer,offset,length,position,canOwn){if(buffer.buffer===HEAP8.buffer){canOwn=false}if(!length)return 0;var node=stream.node;node.mtime=node.ctime=Date.now();if(canOwn){node.contents=buffer.subarray(offset,offset+length);node.usedBytes=length}else if(node.usedBytes===0&&position===0){node.contents=buffer.slice(offset,offset+length);node.usedBytes=length}else{MEMFS.expandFileStorage(node,position+length);node.contents.set(buffer.subarray(offset,offset+length),position);node.usedBytes=Math.max(node.usedBytes,position+length)}return length},llseek(stream,offset,whence){var position=offset;if(whence===1){position+=stream.position}else if(whence===2){if(FS.isFile(stream.node.mode)){position+=stream.node.usedBytes}}if(position<0){throw new FS.ErrnoError(28)}return position},mmap(stream,length,position,prot,flags){if(!FS.isFile(stream.node.mode)){throw new FS.ErrnoError(43)}var ptr;var allocated;var contents=stream.node.contents;if(!(flags&2)&&contents.buffer===HEAP8.buffer){allocated=false;ptr=contents.byteOffset}else{allocated=true;ptr=mmapAlloc(length);if(!ptr){throw new FS.ErrnoError(48)}if(contents){if(position>0||position+length<contents.length){if(contents.subarray){contents=contents.subarray(position,position+length)}else{contents=Array.prototype.slice.call(contents,position,position+length)}}HEAP8.set(contents,ptr)}}return{ptr,allocated}},msync(stream,buffer,offset,length,mmapFlags){MEMFS.stream_ops.write(stream,buffer,0,length,offset,false);return 0}}};var FS_modeStringToFlags=str=>{if(typeof str!="string")return str;var flagModes={r:0,"r+":2,w:512|64|1,"w+":512|64|2,a:1024|64|1,"a+":1024|64|2};var flags=flagModes[str];if(typeof flags=="undefined"){throw new Error(`Unknown file open mode: ${str}`)}return flags};var FS_fileDataToTypedArray=data=>{if(typeof data=="string"){data=intArrayFromString(data,true)}if(!data.subarray){data=new Uint8Array(data)}return data};var FS_getMode=(canRead,canWrite)=>{var mode=0;if(canRead)mode|=292|73;if(canWrite)mode|=146;return mode};var asyncLoad=async url=>{var arrayBuffer=await readAsync(url);return new Uint8Array(arrayBuffer)};var FS_createDataFile=(...args)=>FS.createDataFile(...args);var getUniqueRunDependency=id=>id;var runDependencies=0;var dependenciesFulfilled=null;var removeRunDependency=id=>{runDependencies--;Module["monitorRunDependencies"]?.(runDependencies);if(runDependencies==0){if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}};var addRunDependency=id=>{runDependencies++;Module["monitorRunDependencies"]?.(runDependencies)};var preloadPlugins=[];var FS_handledByPreloadPlugin=async(byteArray,fullname)=>{if(typeof Browser!="undefined")Browser.init();for(var plugin of preloadPlugins){if(plugin["canHandle"](fullname)){return plugin["handle"](byteArray,fullname)}}return byteArray};var FS_preloadFile=async(parent,name,url,canRead,canWrite,dontCreateFile,canOwn,preFinish)=>{var fullname=name?PATH_FS.resolve(PATH.join2(parent,name)):parent;var dep=getUniqueRunDependency(`cp ${fullname}`);addRunDependency(dep);try{var byteArray=url;if(typeof url=="string"){byteArray=await asyncLoad(url)}byteArray=await FS_handledByPreloadPlugin(byteArray,fullname);preFinish?.();if(!dontCreateFile){FS_createDataFile(parent,name,byteArray,canRead,canWrite,canOwn)}}finally{removeRunDependency(dep)}};var FS_createPreloadedFile=(parent,name,url,canRead,canWrite,onload,onerror,dontCreateFile,canOwn,preFinish)=>{FS_preloadFile(parent,name,url,canRead,canWrite,dontCreateFile,canOwn,preFinish).then(onload).catch(onerror)};var FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,filesystems:null,syncFSRequests:0,ErrnoError:class{name="ErrnoError";constructor(errno){this.errno=errno}},FSStream:class{shared={};get object(){return this.node}set object(val){this.node=val}get isRead(){return(this.flags&2097155)!==1}get isWrite(){return(this.flags&2097155)!==0}get isAppend(){return this.flags&1024}get flags(){return this.shared.flags}set flags(val){this.shared.flags=val}get position(){return this.shared.position}set position(val){this.shared.position=val}},FSNode:class{node_ops={};stream_ops={};readMode=292|73;writeMode=146;mounted=null;constructor(parent,name,mode,rdev){if(!parent){parent=this}this.parent=parent;this.mount=parent.mount;this.id=FS.nextInode++;this.name=name;this.mode=mode;this.rdev=rdev;this.atime=this.mtime=this.ctime=Date.now()}get read(){return(this.mode&this.readMode)===this.readMode}set read(val){val?this.mode|=this.readMode:this.mode&=~this.readMode}get write(){return(this.mode&this.writeMode)===this.writeMode}set write(val){val?this.mode|=this.writeMode:this.mode&=~this.writeMode}get isFolder(){return FS.isDir(this.mode)}get isDevice(){return FS.isChrdev(this.mode)}},lookupPath(path,opts={}){if(!path){throw new FS.ErrnoError(44)}opts.follow_mount??=true;if(!PATH.isAbs(path)){path=FS.cwd()+"/"+path}linkloop:for(var nlinks=0;nlinks<40;nlinks++){var parts=path.split("/").filter(p=>!!p);var current=FS.root;var current_path="/";for(var i=0;i<parts.length;i++){var islast=i===parts.length-1;if(islast&&opts.parent){break}if(parts[i]==="."){continue}if(parts[i]===".."){current_path=PATH.dirname(current_path);if(FS.isRoot(current)){path=current_path+"/"+parts.slice(i+1).join("/");nlinks--;continue linkloop}else{current=current.parent}continue}current_path=PATH.join2(current_path,parts[i]);try{current=FS.lookupNode(current,parts[i])}catch(e){if(e?.errno===44&&islast&&opts.noent_okay){return{path:current_path}}throw e}if(FS.isMountpoint(current)&&(!islast||opts.follow_mount)){current=current.mounted.root}if(FS.isLink(current.mode)&&(!islast||opts.follow)){if(!current.node_ops.readlink){throw new FS.ErrnoError(52)}var link=current.node_ops.readlink(current);if(!PATH.isAbs(link)){link=PATH.dirname(current_path)+"/"+link}path=link+"/"+parts.slice(i+1).join("/");continue linkloop}}return{path:current_path,node:current}}throw new FS.ErrnoError(32)},getPath(node){var path;while(true){if(FS.isRoot(node)){var mount=node.mount.mountpoint;if(!path)return mount;return mount[mount.length-1]!=="/"?`${mount}/${path}`:mount+path}path=path?`${node.name}/${path}`:node.name;node=node.parent}},hashName(parentid,name){var hash=0;for(var i=0;i<name.length;i++){hash=(hash<<5)-hash+name.charCodeAt(i)|0}return(parentid+hash>>>0)%FS.nameTable.length},hashAddNode(node){var hash=FS.hashName(node.parent.id,node.name);node.name_next=FS.nameTable[hash];FS.nameTable[hash]=node},hashRemoveNode(node){var hash=FS.hashName(node.parent.id,node.name);if(FS.nameTable[hash]===node){FS.nameTable[hash]=node.name_next}else{var current=FS.nameTable[hash];while(current){if(current.name_next===node){current.name_next=node.name_next;break}current=current.name_next}}},lookupNode(parent,name){var errCode=FS.mayLookup(parent);if(errCode){throw new FS.ErrnoError(errCode)}var hash=FS.hashName(parent.id,name);for(var node=FS.nameTable[hash];node;node=node.name_next){var nodeName=node.name;if(node.parent.id===parent.id&&nodeName===name){return node}}return FS.lookup(parent,name)},createNode(parent,name,mode,rdev){var node=new FS.FSNode(parent,name,mode,rdev);FS.hashAddNode(node);return node},destroyNode(node){FS.hashRemoveNode(node)},isRoot(node){return node===node.parent},isMountpoint(node){return!!node.mounted},isFile(mode){return(mode&61440)===32768},isDir(mode){return(mode&61440)===16384},isLink(mode){return(mode&61440)===40960},isChrdev(mode){return(mode&61440)===8192},isBlkdev(mode){return(mode&61440)===24576},isFIFO(mode){return(mode&61440)===4096},isSocket(mode){return(mode&49152)===49152},flagsToPermissionString(flag){var perms=["r","w","rw"][flag&3];if(flag&512){perms+="w"}return perms},nodePermissions(node,perms){if(FS.ignorePermissions){return 0}if(perms.includes("r")&&!(node.mode&292)){return 2}if(perms.includes("w")&&!(node.mode&146)){return 2}if(perms.includes("x")&&!(node.mode&73)){return 2}return 0},mayLookup(dir){if(!FS.isDir(dir.mode))return 54;var errCode=FS.nodePermissions(dir,"x");if(errCode)return errCode;if(!dir.node_ops.lookup)return 2;return 0},mayCreate(dir,name){if(!FS.isDir(dir.mode)){return 54}try{var node=FS.lookupNode(dir,name);return 20}catch(e){}return FS.nodePermissions(dir,"wx")},mayDelete(dir,name,isdir){var node;try{node=FS.lookupNode(dir,name)}catch(e){return e.errno}var errCode=FS.nodePermissions(dir,"wx");if(errCode){return errCode}if(isdir){if(!FS.isDir(node.mode)){return 54}if(FS.isRoot(node)||FS.getPath(node)===FS.cwd()){return 10}}else if(FS.isDir(node.mode)){return 31}return 0},mayOpen(node,flags){if(!node){return 44}if(FS.isLink(node.mode)){return 32}var mode=FS.flagsToPermissionString(flags);if(FS.isDir(node.mode)){if(mode!=="r"||flags&(512|64)){return 31}}return FS.nodePermissions(node,mode)},checkOpExists(op,err){if(!op){throw new FS.ErrnoError(err)}return op},MAX_OPEN_FDS:4096,nextfd(){for(var fd=0;fd<=FS.MAX_OPEN_FDS;fd++){if(!FS.streams[fd]){return fd}}throw new FS.ErrnoError(33)},getStreamChecked(fd){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}return stream},getStream:fd=>FS.streams[fd],createStream(stream,fd=-1){stream=Object.assign(new FS.FSStream,stream);if(fd==-1){fd=FS.nextfd()}stream.fd=fd;FS.streams[fd]=stream;return stream},closeStream(fd){FS.streams[fd]=null},dupStream(origStream,fd=-1){var stream=FS.createStream(origStream,fd);stream.stream_ops?.dup?.(stream);return stream},doSetAttr(stream,node,attr){var setattr=stream?.stream_ops.setattr;var arg=setattr?stream:node;setattr??=node.node_ops.setattr;FS.checkOpExists(setattr,63);setattr(arg,attr)},chrdev_stream_ops:{open(stream){var device=FS.getDevice(stream.node.rdev);stream.stream_ops=device.stream_ops;stream.stream_ops.open?.(stream)},llseek(){throw new FS.ErrnoError(70)}},major:dev=>dev>>8,minor:dev=>dev&255,makedev:(ma,mi)=>ma<<8|mi,registerDevice(dev,ops){FS.devices[dev]={stream_ops:ops}},getDevice:dev=>FS.devices[dev],getMounts(mount){var mounts=[];var check=[mount];while(check.length){var m=check.pop();mounts.push(m);check.push(...m.mounts)}return mounts},syncfs(populate,callback){if(typeof populate=="function"){callback=populate;populate=false}FS.syncFSRequests++;if(FS.syncFSRequests>1){err(`warning: ${FS.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`)}var mounts=FS.getMounts(FS.root.mount);var completed=0;function doCallback(errCode){FS.syncFSRequests--;return callback(errCode)}function done(errCode){if(errCode){if(!done.errored){done.errored=true;return doCallback(errCode)}return}if(++completed>=mounts.length){doCallback(null)}}for(var mount of mounts){if(mount.type.syncfs){mount.type.syncfs(mount,populate,done)}else{done(null)}}},mount(type,opts,mountpoint){var root=mountpoint==="/";var pseudo=!mountpoint;var node;if(root&&FS.root){throw new FS.ErrnoError(10)}else if(!root&&!pseudo){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});mountpoint=lookup.path;node=lookup.node;if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}if(!FS.isDir(node.mode)){throw new FS.ErrnoError(54)}}var mount={type,opts,mountpoint,mounts:[]};var mountRoot=type.mount(mount);mountRoot.mount=mount;mount.root=mountRoot;if(root){FS.root=mountRoot}else if(node){node.mounted=mount;if(node.mount){node.mount.mounts.push(mount)}}return mountRoot},unmount(mountpoint){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});if(!FS.isMountpoint(lookup.node)){throw new FS.ErrnoError(28)}var node=lookup.node;var mount=node.mounted;var mounts=FS.getMounts(mount);for(var[hash,current]of Object.entries(FS.nameTable)){while(current){var next=current.name_next;if(mounts.includes(current.mount)){FS.destroyNode(current)}current=next}}node.mounted=null;var idx=node.mount.mounts.indexOf(mount);node.mount.mounts.splice(idx,1)},lookup(parent,name){return parent.node_ops.lookup(parent,name)},mknod(path,mode,dev){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);if(!name){throw new FS.ErrnoError(28)}if(name==="."||name===".."){throw new FS.ErrnoError(20)}var errCode=FS.mayCreate(parent,name);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.mknod){throw new FS.ErrnoError(63)}return parent.node_ops.mknod(parent,name,mode,dev)},statfs(path){return FS.statfsNode(FS.lookupPath(path,{follow:true}).node)},statfsStream(stream){return FS.statfsNode(stream.node)},statfsNode(node){var rtn={bsize:4096,frsize:4096,blocks:1e6,bfree:5e5,bavail:5e5,files:FS.nextInode,ffree:FS.nextInode-1,fsid:42,flags:2,namelen:255};if(node.node_ops.statfs){Object.assign(rtn,node.node_ops.statfs(node.mount.opts.root))}return rtn},create(path,mode=438){mode&=4095;mode|=32768;return FS.mknod(path,mode,0)},mkdir(path,mode=511){mode&=511|512;mode|=16384;return FS.mknod(path,mode,0)},mkdirTree(path,mode){var dirs=path.split("/");var d="";for(var dir of dirs){if(!dir)continue;if(d||PATH.isAbs(path))d+="/";d+=dir;try{FS.mkdir(d,mode)}catch(e){if(e.errno!=20)throw e}}},mkdev(path,mode,dev){if(typeof dev=="undefined"){dev=mode;mode=438}mode|=8192;return FS.mknod(path,mode,dev)},symlink(oldpath,newpath){if(!PATH_FS.resolve(oldpath)){throw new FS.ErrnoError(44)}var lookup=FS.lookupPath(newpath,{parent:true});var parent=lookup.node;if(!parent){throw new FS.ErrnoError(44)}var newname=PATH.basename(newpath);var errCode=FS.mayCreate(parent,newname);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.symlink){throw new FS.ErrnoError(63)}return parent.node_ops.symlink(parent,newname,oldpath)},rename(old_path,new_path){var old_dirname=PATH.dirname(old_path);var new_dirname=PATH.dirname(new_path);var old_name=PATH.basename(old_path);var new_name=PATH.basename(new_path);var lookup,old_dir,new_dir;lookup=FS.lookupPath(old_path,{parent:true});old_dir=lookup.node;lookup=FS.lookupPath(new_path,{parent:true});new_dir=lookup.node;if(!old_dir||!new_dir)throw new FS.ErrnoError(44);if(old_dir.mount!==new_dir.mount){throw new FS.ErrnoError(75)}var old_node=FS.lookupNode(old_dir,old_name);var relative=PATH_FS.relative(old_path,new_dirname);if(relative.charAt(0)!=="."){throw new FS.ErrnoError(28)}relative=PATH_FS.relative(new_path,old_dirname);if(relative.charAt(0)!=="."){throw new FS.ErrnoError(55)}var new_node;try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(old_node===new_node){return}var isdir=FS.isDir(old_node.mode);var errCode=FS.mayDelete(old_dir,old_name,isdir);if(errCode){throw new FS.ErrnoError(errCode)}errCode=new_node?FS.mayDelete(new_dir,new_name,isdir):FS.mayCreate(new_dir,new_name);if(errCode){throw new FS.ErrnoError(errCode)}if(!old_dir.node_ops.rename){throw new FS.ErrnoError(63)}if(FS.isMountpoint(old_node)||new_node&&FS.isMountpoint(new_node)){throw new FS.ErrnoError(10)}if(new_dir!==old_dir){errCode=FS.nodePermissions(old_dir,"w");if(errCode){throw new FS.ErrnoError(errCode)}}FS.hashRemoveNode(old_node);try{old_dir.node_ops.rename(old_node,new_dir,new_name);old_node.parent=new_dir}catch(e){throw e}finally{FS.hashAddNode(old_node)}},rmdir(path){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var errCode=FS.mayDelete(parent,name,true);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.rmdir){throw new FS.ErrnoError(63)}if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}parent.node_ops.rmdir(parent,name);FS.destroyNode(node)},readdir(path){var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;var readdir=FS.checkOpExists(node.node_ops.readdir,54);return readdir(node)},unlink(path){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;if(!parent){throw new FS.ErrnoError(44)}var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var errCode=FS.mayDelete(parent,name,false);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.unlink){throw new FS.ErrnoError(63)}if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}parent.node_ops.unlink(parent,name);FS.destroyNode(node)},readlink(path){var lookup=FS.lookupPath(path);var link=lookup.node;if(!link){throw new FS.ErrnoError(44)}if(!link.node_ops.readlink){throw new FS.ErrnoError(28)}return link.node_ops.readlink(link)},stat(path,dontFollow){var lookup=FS.lookupPath(path,{follow:!dontFollow});var node=lookup.node;var getattr=FS.checkOpExists(node.node_ops.getattr,63);return getattr(node)},fstat(fd){var stream=FS.getStreamChecked(fd);var node=stream.node;var getattr=stream.stream_ops.getattr;var arg=getattr?stream:node;getattr??=node.node_ops.getattr;FS.checkOpExists(getattr,63);return getattr(arg)},lstat(path){return FS.stat(path,true)},doChmod(stream,node,mode,dontFollow){FS.doSetAttr(stream,node,{mode:mode&4095|node.mode&~4095,ctime:Date.now(),dontFollow})},chmod(path,mode,dontFollow){var node;if(typeof path=="string"){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node}else{node=path}FS.doChmod(null,node,mode,dontFollow)},lchmod(path,mode){FS.chmod(path,mode,true)},fchmod(fd,mode){var stream=FS.getStreamChecked(fd);FS.doChmod(stream,stream.node,mode,false)},doChown(stream,node,dontFollow){FS.doSetAttr(stream,node,{timestamp:Date.now(),dontFollow})},chown(path,uid,gid,dontFollow){var node;if(typeof path=="string"){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node}else{node=path}FS.doChown(null,node,dontFollow)},lchown(path,uid,gid){FS.chown(path,uid,gid,true)},fchown(fd,uid,gid){var stream=FS.getStreamChecked(fd);FS.doChown(stream,stream.node,false)},doTruncate(stream,node,len){if(FS.isDir(node.mode)){throw new FS.ErrnoError(31)}if(!FS.isFile(node.mode)){throw new FS.ErrnoError(28)}var errCode=FS.nodePermissions(node,"w");if(errCode){throw new FS.ErrnoError(errCode)}FS.doSetAttr(stream,node,{size:len,timestamp:Date.now()})},truncate(path,len){if(len<0){throw new FS.ErrnoError(28)}var node;if(typeof path=="string"){var lookup=FS.lookupPath(path,{follow:true});node=lookup.node}else{node=path}FS.doTruncate(null,node,len)},ftruncate(fd,len){var stream=FS.getStreamChecked(fd);if(len<0||(stream.flags&2097155)===0){throw new FS.ErrnoError(28)}FS.doTruncate(stream,stream.node,len)},utime(path,atime,mtime){var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;var setattr=FS.checkOpExists(node.node_ops.setattr,63);setattr(node,{atime,mtime})},open(path,flags,mode=438){if(path===""){throw new FS.ErrnoError(44)}flags=FS_modeStringToFlags(flags);if(flags&64){mode=mode&4095|32768}else{mode=0}var node;var isDirPath;if(typeof path=="object"){node=path}else{isDirPath=path.endsWith("/");var lookup=FS.lookupPath(path,{follow:!(flags&131072),noent_okay:true});node=lookup.node;path=lookup.path}var created=false;if(flags&64){if(node){if(flags&128){throw new FS.ErrnoError(20)}}else if(isDirPath){throw new FS.ErrnoError(31)}else{node=FS.mknod(path,mode|511,0);created=true}}if(!node){throw new FS.ErrnoError(44)}if(FS.isChrdev(node.mode)){flags&=~512}if(flags&65536&&!FS.isDir(node.mode)){throw new FS.ErrnoError(54)}if(!created){var errCode=FS.mayOpen(node,flags);if(errCode){throw new FS.ErrnoError(errCode)}}if(flags&512&&!created){FS.truncate(node,0)}flags&=~(128|512|131072);var stream=FS.createStream({node,path:FS.getPath(node),flags,seekable:true,position:0,stream_ops:node.stream_ops,ungotten:[],error:false});if(stream.stream_ops.open){stream.stream_ops.open(stream)}if(created){FS.chmod(node,mode&511)}return stream},close(stream){if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(stream.getdents)stream.getdents=null;try{if(stream.stream_ops.close){stream.stream_ops.close(stream)}}catch(e){throw e}finally{FS.closeStream(stream.fd)}stream.fd=null},isClosed(stream){return stream.fd===null},llseek(stream,offset,whence){if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(!stream.seekable||!stream.stream_ops.llseek){throw new FS.ErrnoError(70)}if(whence!=0&&whence!=1&&whence!=2){throw new FS.ErrnoError(28)}stream.position=stream.stream_ops.llseek(stream,offset,whence);stream.ungotten=[];return stream.position},read(stream,buffer,offset,length,position){if(length<0||position<0){throw new FS.ErrnoError(28)}if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===1){throw new FS.ErrnoError(8)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(31)}if(!stream.stream_ops.read){throw new FS.ErrnoError(28)}var seeking=typeof position!="undefined";if(!seeking){position=stream.position}else if(!stream.seekable){throw new FS.ErrnoError(70)}var bytesRead=stream.stream_ops.read(stream,buffer,offset,length,position);if(!seeking)stream.position+=bytesRead;return bytesRead},write(stream,buffer,offset,length,position,canOwn){if(length<0||position<0){throw new FS.ErrnoError(28)}if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(8)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(31)}if(!stream.stream_ops.write){throw new FS.ErrnoError(28)}if(stream.seekable&&stream.flags&1024){FS.llseek(stream,0,2)}var seeking=typeof position!="undefined";if(!seeking){position=stream.position}else if(!stream.seekable){throw new FS.ErrnoError(70)}var bytesWritten=stream.stream_ops.write(stream,buffer,offset,length,position,canOwn);if(!seeking)stream.position+=bytesWritten;return bytesWritten},mmap(stream,length,position,prot,flags){if((prot&2)!==0&&(flags&2)===0&&(stream.flags&2097155)!==2){throw new FS.ErrnoError(2)}if((stream.flags&2097155)===1){throw new FS.ErrnoError(2)}if(!stream.stream_ops.mmap){throw new FS.ErrnoError(43)}if(!length){throw new FS.ErrnoError(28)}return stream.stream_ops.mmap(stream,length,position,prot,flags)},msync(stream,buffer,offset,length,mmapFlags){if(!stream.stream_ops.msync){return 0}return stream.stream_ops.msync(stream,buffer,offset,length,mmapFlags)},ioctl(stream,cmd,arg){if(!stream.stream_ops.ioctl){throw new FS.ErrnoError(59)}return stream.stream_ops.ioctl(stream,cmd,arg)},readFile(path,opts={}){opts.flags=opts.flags||0;opts.encoding=opts.encoding||"binary";if(opts.encoding!=="utf8"&&opts.encoding!=="binary"){abort(`Invalid encoding type "${opts.encoding}"`)}var stream=FS.open(path,opts.flags);var stat=FS.stat(path);var length=stat.size;var buf=new Uint8Array(length);FS.read(stream,buf,0,length,0);if(opts.encoding==="utf8"){buf=UTF8ArrayToString(buf)}FS.close(stream);return buf},writeFile(path,data,opts={}){opts.flags=opts.flags||577;var stream=FS.open(path,opts.flags,opts.mode);data=FS_fileDataToTypedArray(data);FS.write(stream,data,0,data.byteLength,undefined,opts.canOwn);FS.close(stream)},cwd:()=>FS.currentPath,chdir(path){var lookup=FS.lookupPath(path,{follow:true});if(lookup.node===null){throw new FS.ErrnoError(44)}if(!FS.isDir(lookup.node.mode)){throw new FS.ErrnoError(54)}var errCode=FS.nodePermissions(lookup.node,"x");if(errCode){throw new FS.ErrnoError(errCode)}FS.currentPath=lookup.path},createDefaultDirectories(){FS.mkdir("/tmp");FS.mkdir("/home");FS.mkdir("/home/web_user")},createDefaultDevices(){FS.mkdir("/dev");FS.registerDevice(FS.makedev(1,3),{read:()=>0,write:(stream,buffer,offset,length,pos)=>length,llseek:()=>0});FS.mkdev("/dev/null",FS.makedev(1,3));TTY.register(FS.makedev(5,0),TTY.default_tty_ops);TTY.register(FS.makedev(6,0),TTY.default_tty1_ops);FS.mkdev("/dev/tty",FS.makedev(5,0));FS.mkdev("/dev/tty1",FS.makedev(6,0));var randomBuffer=new Uint8Array(1024),randomLeft=0;var randomByte=()=>{if(randomLeft===0){randomFill(randomBuffer);randomLeft=randomBuffer.byteLength}return randomBuffer[--randomLeft]};FS.createDevice("/dev","random",randomByte);FS.createDevice("/dev","urandom",randomByte);FS.mkdir("/dev/shm");FS.mkdir("/dev/shm/tmp")},createSpecialDirectories(){FS.mkdir("/proc");var proc_self=FS.mkdir("/proc/self");FS.mkdir("/proc/self/fd");FS.mount({mount(){var node=FS.createNode(proc_self,"fd",16895,73);node.stream_ops={llseek:MEMFS.stream_ops.llseek};node.node_ops={lookup(parent,name){var fd=+name;var stream=FS.getStreamChecked(fd);var ret={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>stream.path},id:fd+1};ret.parent=ret;return ret},readdir(){return Array.from(FS.streams.entries()).filter(([k,v])=>v).map(([k,v])=>k.toString())}};return node}},{},"/proc/self/fd")},createStandardStreams(input,output,error){if(input){FS.createDevice("/dev","stdin",input)}else{FS.symlink("/dev/tty","/dev/stdin")}if(output){FS.createDevice("/dev","stdout",null,output)}else{FS.symlink("/dev/tty","/dev/stdout")}if(error){FS.createDevice("/dev","stderr",null,error)}else{FS.symlink("/dev/tty1","/dev/stderr")}var stdin=FS.open("/dev/stdin",0);var stdout=FS.open("/dev/stdout",1);var stderr=FS.open("/dev/stderr",1)},staticInit(){FS.nameTable=new Array(4096);FS.mount(MEMFS,{},"/");FS.createDefaultDirectories();FS.createDefaultDevices();FS.createSpecialDirectories();FS.filesystems={MEMFS}},init(input,output,error){FS.initialized=true;input??=Module["stdin"];output??=Module["stdout"];error??=Module["stderr"];FS.createStandardStreams(input,output,error)},quit(){FS.initialized=false;for(var stream of FS.streams){if(stream){FS.close(stream)}}},findObject(path,dontResolveLastLink){var ret=FS.analyzePath(path,dontResolveLastLink);if(!ret.exists){return null}return ret.object},analyzePath(path,dontResolveLastLink){try{var lookup=FS.lookupPath(path,{follow:!dontResolveLastLink});path=lookup.path}catch(e){}var ret={isRoot:false,exists:false,error:0,name:null,path:null,object:null,parentExists:false,parentPath:null,parentObject:null};try{var lookup=FS.lookupPath(path,{parent:true});ret.parentExists=true;ret.parentPath=lookup.path;ret.parentObject=lookup.node;ret.name=PATH.basename(path);lookup=FS.lookupPath(path,{follow:!dontResolveLastLink});ret.exists=true;ret.path=lookup.path;ret.object=lookup.node;ret.name=lookup.node.name;ret.isRoot=lookup.path==="/"}catch(e){ret.error=e.errno}return ret},createPath(parent,path,canRead,canWrite){parent=typeof parent=="string"?parent:FS.getPath(parent);var parts=path.split("/").reverse();while(parts.length){var part=parts.pop();if(!part)continue;var current=PATH.join2(parent,part);try{FS.mkdir(current)}catch(e){if(e.errno!=20)throw e}parent=current}return current},createFile(parent,name,properties,canRead,canWrite){var path=PATH.join2(typeof parent=="string"?parent:FS.getPath(parent),name);var mode=FS_getMode(canRead,canWrite);return FS.create(path,mode)},createDataFile(parent,name,data,canRead,canWrite,canOwn){var path=name;if(parent){parent=typeof parent=="string"?parent:FS.getPath(parent);path=name?PATH.join2(parent,name):parent}var mode=FS_getMode(canRead,canWrite);var node=FS.create(path,mode);if(data){data=FS_fileDataToTypedArray(data);FS.chmod(node,mode|146);var stream=FS.open(node,577);FS.write(stream,data,0,data.length,0,canOwn);FS.close(stream);FS.chmod(node,mode)}},createDevice(parent,name,input,output){var path=PATH.join2(typeof parent=="string"?parent:FS.getPath(parent),name);var mode=FS_getMode(!!input,!!output);FS.createDevice.major??=64;var dev=FS.makedev(FS.createDevice.major++,0);FS.registerDevice(dev,{open(stream){stream.seekable=false},close(stream){if(output?.buffer?.length){output(10)}},read(stream,buffer,offset,length,pos){var bytesRead=0;for(var i=0;i<length;i++){var result;try{result=input()}catch(e){throw new FS.ErrnoError(29)}if(result===undefined&&bytesRead===0){throw new FS.ErrnoError(6)}if(result===null||result===undefined)break;bytesRead++;buffer[offset+i]=result}if(bytesRead){stream.node.atime=Date.now()}return bytesRead},write(stream,buffer,offset,length,pos){for(var i=0;i<length;i++){try{output(buffer[offset+i])}catch(e){throw new FS.ErrnoError(29)}}if(length){stream.node.mtime=stream.node.ctime=Date.now()}return i}});return FS.mkdev(path,mode,dev)},forceLoadFile(obj){if(obj.isDevice||obj.isFolder||obj.link||obj.contents)return true;if(globalThis.XMLHttpRequest){abort("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.")}else{try{obj.contents=readBinary(obj.url)}catch(e){throw new FS.ErrnoError(29)}}},createLazyFile(parent,name,url,canRead,canWrite){class LazyUint8Array{lengthKnown=false;chunks=[];get(idx){if(idx>this.length-1||idx<0){return undefined}var chunkOffset=idx%this.chunkSize;var chunkNum=idx/this.chunkSize|0;return this.getter(chunkNum)[chunkOffset]}setDataGetter(getter){this.getter=getter}cacheLength(){var xhr=new XMLHttpRequest;xhr.open("HEAD",url,false);xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))abort("Couldn't load "+url+". Status: "+xhr.status);var datalength=Number(xhr.getResponseHeader("Content-length"));var header;var hasByteServing=(header=xhr.getResponseHeader("Accept-Ranges"))&&header==="bytes";var usesGzip=(header=xhr.getResponseHeader("Content-Encoding"))&&header==="gzip";var chunkSize=1024*1024;if(!hasByteServing)chunkSize=datalength;var doXHR=(from,to)=>{if(from>to)abort("invalid range ("+from+", "+to+") or no bytes requested!");if(to>datalength-1)abort("only "+datalength+" bytes available! programmer error!");var xhr=new XMLHttpRequest;xhr.open("GET",url,false);if(datalength!==chunkSize)xhr.setRequestHeader("Range","bytes="+from+"-"+to);xhr.responseType="arraybuffer";if(xhr.overrideMimeType){xhr.overrideMimeType("text/plain; charset=x-user-defined")}xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))abort("Couldn't load "+url+". Status: "+xhr.status);if(xhr.response!==undefined){return new Uint8Array(xhr.response||[])}return intArrayFromString(xhr.responseText||"",true)};var lazyArray=this;lazyArray.setDataGetter(chunkNum=>{var start=chunkNum*chunkSize;var end=(chunkNum+1)*chunkSize-1;end=Math.min(end,datalength-1);if(typeof lazyArray.chunks[chunkNum]=="undefined"){lazyArray.chunks[chunkNum]=doXHR(start,end)}if(typeof lazyArray.chunks[chunkNum]=="undefined")abort("doXHR failed!");return lazyArray.chunks[chunkNum]});if(usesGzip||!datalength){chunkSize=datalength=1;datalength=this.getter(0).length;chunkSize=datalength;out("LazyFiles on gzip forces download of the whole file when length is accessed")}this._length=datalength;this._chunkSize=chunkSize;this.lengthKnown=true}get length(){if(!this.lengthKnown){this.cacheLength()}return this._length}get chunkSize(){if(!this.lengthKnown){this.cacheLength()}return this._chunkSize}}if(globalThis.XMLHttpRequest){if(!ENVIRONMENT_IS_WORKER)abort("Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc");var lazyArray=new LazyUint8Array;var properties={isDevice:false,contents:lazyArray}}else{var properties={isDevice:false,url}}var node=FS.createFile(parent,name,properties,canRead,canWrite);if(properties.contents){node.contents=properties.contents}else if(properties.url){node.contents=null;node.url=properties.url}Object.defineProperties(node,{usedBytes:{get:function(){return this.contents.length}}});var stream_ops={};for(const[key,fn]of Object.entries(node.stream_ops)){stream_ops[key]=(...args)=>{FS.forceLoadFile(node);return fn(...args)}}function writeChunks(stream,buffer,offset,length,position){var contents=stream.node.contents;if(position>=contents.length)return 0;var size=Math.min(contents.length-position,length);if(contents.slice){for(var i=0;i<size;i++){buffer[offset+i]=contents[position+i]}}else{for(var i=0;i<size;i++){buffer[offset+i]=contents.get(position+i)}}return size}stream_ops.read=(stream,buffer,offset,length,position)=>{FS.forceLoadFile(node);return writeChunks(stream,buffer,offset,length,position)};stream_ops.mmap=(stream,length,position,prot,flags)=>{FS.forceLoadFile(node);var ptr=mmapAlloc(length);if(!ptr){throw new FS.ErrnoError(48)}writeChunks(stream,HEAP8,ptr,length,position);return{ptr,allocated:true}};node.stream_ops=stream_ops;return node}};var SYSCALLS={calculateAt(dirfd,path,allowEmpty){if(PATH.isAbs(path)){return path}var dir;if(dirfd===-100){dir=FS.cwd()}else{var dirstream=SYSCALLS.getStreamFromFD(dirfd);dir=dirstream.path}if(path.length==0){if(!allowEmpty){throw new FS.ErrnoError(44)}return dir}return dir+"/"+path},writeStat(buf,stat){HEAPU32[buf>>2]=stat.dev;HEAPU32[buf+4>>2]=stat.mode;HEAPU32[buf+8>>2]=stat.nlink;HEAPU32[buf+12>>2]=stat.uid;HEAPU32[buf+16>>2]=stat.gid;HEAPU32[buf+20>>2]=stat.rdev;tempI64=[stat.size>>>0,(tempDouble=stat.size,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+24>>2]=tempI64[0],HEAP32[buf+28>>2]=tempI64[1];HEAP32[buf+32>>2]=4096;HEAP32[buf+36>>2]=stat.blocks;var atime=stat.atime.getTime();var mtime=stat.mtime.getTime();var ctime=stat.ctime.getTime();tempI64=[Math.floor(atime/1e3)>>>0,(tempDouble=Math.floor(atime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+40>>2]=tempI64[0],HEAP32[buf+44>>2]=tempI64[1];HEAPU32[buf+48>>2]=atime%1e3*1e3*1e3;tempI64=[Math.floor(mtime/1e3)>>>0,(tempDouble=Math.floor(mtime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+56>>2]=tempI64[0],HEAP32[buf+60>>2]=tempI64[1];HEAPU32[buf+64>>2]=mtime%1e3*1e3*1e3;tempI64=[Math.floor(ctime/1e3)>>>0,(tempDouble=Math.floor(ctime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+72>>2]=tempI64[0],HEAP32[buf+76>>2]=tempI64[1];HEAPU32[buf+80>>2]=ctime%1e3*1e3*1e3;tempI64=[stat.ino>>>0,(tempDouble=stat.ino,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+88>>2]=tempI64[0],HEAP32[buf+92>>2]=tempI64[1];return 0},writeStatFs(buf,stats){HEAPU32[buf+4>>2]=stats.bsize;HEAPU32[buf+60>>2]=stats.bsize;tempI64=[stats.blocks>>>0,(tempDouble=stats.blocks,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+8>>2]=tempI64[0],HEAP32[buf+12>>2]=tempI64[1];tempI64=[stats.bfree>>>0,(tempDouble=stats.bfree,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+16>>2]=tempI64[0],HEAP32[buf+20>>2]=tempI64[1];tempI64=[stats.bavail>>>0,(tempDouble=stats.bavail,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+24>>2]=tempI64[0],HEAP32[buf+28>>2]=tempI64[1];tempI64=[stats.files>>>0,(tempDouble=stats.files,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+32>>2]=tempI64[0],HEAP32[buf+36>>2]=tempI64[1];tempI64=[stats.ffree>>>0,(tempDouble=stats.ffree,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+40>>2]=tempI64[0],HEAP32[buf+44>>2]=tempI64[1];HEAPU32[buf+48>>2]=stats.fsid;HEAPU32[buf+64>>2]=stats.flags;HEAPU32[buf+56>>2]=stats.namelen},doMsync(addr,stream,len,flags,offset){if(!FS.isFile(stream.node.mode)){throw new FS.ErrnoError(43)}if(flags&2){return 0}var buffer=HEAPU8.slice(addr,addr+len);FS.msync(stream,buffer,offset,len,flags)},getStreamFromFD(fd){var stream=FS.getStreamChecked(fd);return stream},varargs:undefined,getStr(ptr){var ret=UTF8ToString(ptr);return ret}};function ___syscall_dup3(fd,newfd,flags){try{var old=SYSCALLS.getStreamFromFD(fd);if(old.fd===newfd)return-28;if(newfd<0||newfd>=FS.MAX_OPEN_FDS)return-8;var existing=FS.getStream(newfd);if(existing)FS.close(existing);return FS.dupStream(old,newfd).fd}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_faccessat(dirfd,path,amode,flags){try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);if(amode&~7){return-28}var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;if(!node){return-44}var perms="";if(amode&4)perms+="r";if(amode&2)perms+="w";if(amode&1)perms+="x";if(perms&&FS.nodePermissions(node,perms)){return-2}return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}var syscallGetVarargI=()=>{var ret=HEAP32[+SYSCALLS.varargs>>2];SYSCALLS.varargs+=4;return ret};var syscallGetVarargP=syscallGetVarargI;function ___syscall_fcntl64(fd,cmd,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(fd);switch(cmd){case 0:{var arg=syscallGetVarargI();if(arg<0){return-28}while(FS.streams[arg]){arg++}var newStream;newStream=FS.dupStream(stream,arg);return newStream.fd}case 1:case 2:return 0;case 3:return stream.flags;case 4:{var arg=syscallGetVarargI();stream.flags|=arg;return 0}case 12:{var arg=syscallGetVarargP();var offset=0;HEAP16[arg+offset>>1]=2;return 0}case 13:case 14:return 0}return-28}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_fstat64(fd,buf){try{return SYSCALLS.writeStat(buf,FS.fstat(fd))}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}var stringToUTF8=(str,outPtr,maxBytesToWrite)=>stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite);function ___syscall_getdents64(fd,dirp,count){try{var stream=SYSCALLS.getStreamFromFD(fd);stream.getdents||=FS.readdir(stream.path);var struct_size=280;var pos=0;var off=FS.llseek(stream,0,1);var startIdx=Math.floor(off/struct_size);var endIdx=Math.min(stream.getdents.length,startIdx+Math.floor(count/struct_size));for(var idx=startIdx;idx<endIdx;idx++){var id;var type;var name=stream.getdents[idx];if(name==="."){id=stream.node.id;type=4}else if(name===".."){var lookup=FS.lookupPath(stream.path,{parent:true});id=lookup.node.id;type=4}else{var child;try{child=FS.lookupNode(stream.node,name)}catch(e){if(e?.errno===28){continue}throw e}id=child.id;type=FS.isChrdev(child.mode)?2:FS.isDir(child.mode)?4:FS.isLink(child.mode)?10:8}tempI64=[id>>>0,(tempDouble=id,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[dirp+pos>>2]=tempI64[0],HEAP32[dirp+pos+4>>2]=tempI64[1];tempI64=[(idx+1)*struct_size>>>0,(tempDouble=(idx+1)*struct_size,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[dirp+pos+8>>2]=tempI64[0],HEAP32[dirp+pos+12>>2]=tempI64[1];HEAP16[dirp+pos+16>>1]=280;HEAP8[dirp+pos+18]=type;stringToUTF8(name,dirp+pos+19,256);pos+=struct_size}FS.llseek(stream,idx*struct_size,0);return pos}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_ioctl(fd,op,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(fd);switch(op){case 21509:{if(!stream.tty)return-59;return 0}case 21505:{if(!stream.tty)return-59;if(stream.tty.ops.ioctl_tcgets){var termios=stream.tty.ops.ioctl_tcgets(stream);var argp=syscallGetVarargP();HEAP32[argp>>2]=termios.c_iflag||0;HEAP32[argp+4>>2]=termios.c_oflag||0;HEAP32[argp+8>>2]=termios.c_cflag||0;HEAP32[argp+12>>2]=termios.c_lflag||0;for(var i=0;i<32;i++){HEAP8[argp+i+17]=termios.c_cc[i]||0}return 0}return 0}case 21510:case 21511:case 21512:{if(!stream.tty)return-59;return 0}case 21506:case 21507:case 21508:{if(!stream.tty)return-59;if(stream.tty.ops.ioctl_tcsets){var argp=syscallGetVarargP();var c_iflag=HEAP32[argp>>2];var c_oflag=HEAP32[argp+4>>2];var c_cflag=HEAP32[argp+8>>2];var c_lflag=HEAP32[argp+12>>2];var c_cc=[];for(var i=0;i<32;i++){c_cc.push(HEAP8[argp+i+17])}return stream.tty.ops.ioctl_tcsets(stream.tty,op,{c_iflag,c_oflag,c_cflag,c_lflag,c_cc})}return 0}case 21519:{if(!stream.tty)return-59;var argp=syscallGetVarargP();HEAP32[argp>>2]=0;return 0}case 21520:{if(!stream.tty)return-59;return-28}case 21537:case 21531:{var argp=syscallGetVarargP();return FS.ioctl(stream,op,argp)}case 21523:{if(!stream.tty)return-59;if(stream.tty.ops.ioctl_tiocgwinsz){var winsize=stream.tty.ops.ioctl_tiocgwinsz(stream.tty);var argp=syscallGetVarargP();HEAP16[argp>>1]=winsize[0];HEAP16[argp+2>>1]=winsize[1]}return 0}case 21524:{if(!stream.tty)return-59;return 0}case 21515:{if(!stream.tty)return-59;return 0}default:return-28}}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_lstat64(path,buf){try{path=SYSCALLS.getStr(path);return SYSCALLS.writeStat(buf,FS.lstat(path))}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_newfstatat(dirfd,path,buf,flags){try{path=SYSCALLS.getStr(path);var nofollow=flags&256;var allowEmpty=flags&4096;flags=flags&~6400;path=SYSCALLS.calculateAt(dirfd,path,allowEmpty);return SYSCALLS.writeStat(buf,nofollow?FS.lstat(path):FS.stat(path))}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_openat(dirfd,path,flags,varargs){SYSCALLS.varargs=varargs;try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);var mode=varargs?syscallGetVarargI():0;return FS.open(path,flags,mode).fd}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_renameat(olddirfd,oldpath,newdirfd,newpath){try{oldpath=SYSCALLS.getStr(oldpath);newpath=SYSCALLS.getStr(newpath);oldpath=SYSCALLS.calculateAt(olddirfd,oldpath);newpath=SYSCALLS.calculateAt(newdirfd,newpath);FS.rename(oldpath,newpath);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_rmdir(path){try{path=SYSCALLS.getStr(path);FS.rmdir(path);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_stat64(path,buf){try{path=SYSCALLS.getStr(path);return SYSCALLS.writeStat(buf,FS.stat(path))}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_unlinkat(dirfd,path,flags){try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);if(!flags){FS.unlink(path)}else if(flags===512){FS.rmdir(path)}else{return-28}return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}var __abort_js=()=>abort("");var convertI32PairToI53Checked=(lo,hi)=>hi+2097152>>>0<4194305-!!lo?(lo>>>0)+hi*4294967296:NaN;function __gmtime_js(time_low,time_high,tmPtr){var time=convertI32PairToI53Checked(time_low,time_high);var date=new Date(time*1e3);HEAP32[tmPtr>>2]=date.getUTCSeconds();HEAP32[tmPtr+4>>2]=date.getUTCMinutes();HEAP32[tmPtr+8>>2]=date.getUTCHours();HEAP32[tmPtr+12>>2]=date.getUTCDate();HEAP32[tmPtr+16>>2]=date.getUTCMonth();HEAP32[tmPtr+20>>2]=date.getUTCFullYear()-1900;HEAP32[tmPtr+24>>2]=date.getUTCDay();var start=Date.UTC(date.getUTCFullYear(),0,1,0,0,0,0);var yday=(date.getTime()-start)/(1e3*60*60*24)|0;HEAP32[tmPtr+28>>2]=yday}var isLeapYear=year=>year%4===0&&(year%100!==0||year%400===0);var MONTH_DAYS_LEAP_CUMULATIVE=[0,31,60,91,121,152,182,213,244,274,305,335];var MONTH_DAYS_REGULAR_CUMULATIVE=[0,31,59,90,120,151,181,212,243,273,304,334];var ydayFromDate=date=>{var leap=isLeapYear(date.getFullYear());var monthDaysCumulative=leap?MONTH_DAYS_LEAP_CUMULATIVE:MONTH_DAYS_REGULAR_CUMULATIVE;var yday=monthDaysCumulative[date.getMonth()]+date.getDate()-1;return yday};function __localtime_js(time_low,time_high,tmPtr){var time=convertI32PairToI53Checked(time_low,time_high);var date=new Date(time*1e3);HEAP32[tmPtr>>2]=date.getSeconds();HEAP32[tmPtr+4>>2]=date.getMinutes();HEAP32[tmPtr+8>>2]=date.getHours();HEAP32[tmPtr+12>>2]=date.getDate();HEAP32[tmPtr+16>>2]=date.getMonth();HEAP32[tmPtr+20>>2]=date.getFullYear()-1900;HEAP32[tmPtr+24>>2]=date.getDay();var yday=ydayFromDate(date)|0;HEAP32[tmPtr+28>>2]=yday;HEAP32[tmPtr+36>>2]=-(date.getTimezoneOffset()*60);var start=new Date(date.getFullYear(),0,1);var summerOffset=new Date(date.getFullYear(),6,1).getTimezoneOffset();var winterOffset=start.getTimezoneOffset();var dst=(summerOffset!=winterOffset&&date.getTimezoneOffset()==Math.min(winterOffset,summerOffset))|0;HEAP32[tmPtr+32>>2]=dst}var __tzset_js=(timezone,daylight,std_name,dst_name)=>{var currentYear=(new Date).getFullYear();var winter=new Date(currentYear,0,1);var summer=new Date(currentYear,6,1);var winterOffset=winter.getTimezoneOffset();var summerOffset=summer.getTimezoneOffset();var stdTimezoneOffset=Math.max(winterOffset,summerOffset);HEAPU32[timezone>>2]=stdTimezoneOffset*60;HEAP32[daylight>>2]=Number(winterOffset!=summerOffset);var extractZone=timezoneOffset=>{var sign=timezoneOffset>=0?"-":"+";var absOffset=Math.abs(timezoneOffset);var hours=String(Math.floor(absOffset/60)).padStart(2,"0");var minutes=String(absOffset%60).padStart(2,"0");return`UTC${sign}${hours}${minutes}`};var winterName=extractZone(winterOffset);var summerName=extractZone(summerOffset);if(summerOffset<winterOffset){stringToUTF8(winterName,std_name,17);stringToUTF8(summerName,dst_name,17)}else{stringToUTF8(winterName,dst_name,17);stringToUTF8(summerName,std_name,17)}};var _emscripten_get_now=()=>performance.now();var _emscripten_date_now=()=>Date.now();var nowIsMonotonic=1;var checkWasiClock=clock_id=>clock_id>=0&&clock_id<=3;function _clock_time_get(clk_id,ignored_precision_low,ignored_precision_high,ptime){var ignored_precision=convertI32PairToI53Checked(ignored_precision_low,ignored_precision_high);if(!checkWasiClock(clk_id)){return 28}var now;if(clk_id===0){now=_emscripten_date_now()}else if(nowIsMonotonic){now=_emscripten_get_now()}else{return 52}var nsec=Math.round(now*1e3*1e3);tempI64=[nsec>>>0,(tempDouble=nsec,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[ptime>>2]=tempI64[0],HEAP32[ptime+4>>2]=tempI64[1];return 0}var readEmAsmArgsArray=[];var readEmAsmArgs=(sigPtr,buf)=>{readEmAsmArgsArray.length=0;var ch;while(ch=HEAPU8[sigPtr++]){var wide=ch!=105;wide&=ch!=112;buf+=wide&&buf%8?4:0;readEmAsmArgsArray.push(ch==112?HEAPU32[buf>>2]:ch==105?HEAP32[buf>>2]:HEAPF64[buf>>3]);buf+=wide?8:4}return readEmAsmArgsArray};var runEmAsmFunction=(code,sigPtr,argbuf)=>{var args=readEmAsmArgs(sigPtr,argbuf);return ASM_CONSTS[code](...args)};var _emscripten_asm_const_int=(code,sigPtr,argbuf)=>runEmAsmFunction(code,sigPtr,argbuf);var runAndAbortIfError=func=>{try{return func()}catch(e){abort(e)}};var handleException=e=>{if(e instanceof ExitStatus||e=="unwind"){return EXITSTATUS}quit_(1,e)};var runtimeKeepaliveCounter=0;var keepRuntimeAlive=()=>noExitRuntime||runtimeKeepaliveCounter>0;var _proc_exit=code=>{EXITSTATUS=code;if(!keepRuntimeAlive()){Module["onExit"]?.(code);ABORT=true}quit_(code,new ExitStatus(code))};var exitJS=(status,implicit)=>{EXITSTATUS=status;_proc_exit(status)};var _exit=exitJS;var maybeExit=()=>{if(!keepRuntimeAlive()){try{_exit(EXITSTATUS)}catch(e){handleException(e)}}};var callUserCallback=func=>{if(ABORT){return}try{return func()}catch(e){handleException(e)}finally{maybeExit()}};var runtimeKeepalivePush=()=>{runtimeKeepaliveCounter+=1};var runtimeKeepalivePop=()=>{runtimeKeepaliveCounter-=1};var Asyncify={instrumentWasmImports(imports){var importPattern=/^(libavjs_wait_reader|jsfetch_open_js|jsfetch_read_js|jsfetch_seek_js|invoke_.*|__asyncjs__.*)$/;for(let[x,original]of Object.entries(imports)){if(typeof original=="function"){let isAsyncifyImport=original.isAsync||importPattern.test(x)}}},instrumentFunction(original){var wrapper=(...args)=>{Asyncify.exportCallStack.push(original);try{return original(...args)}finally{if(!ABORT){var top=Asyncify.exportCallStack.pop();Asyncify.maybeStopUnwind()}}};Asyncify.funcWrappers.set(original,wrapper);return wrapper},instrumentWasmExports(exports){var ret={};for(let[x,original]of Object.entries(exports)){if(typeof original=="function"){var wrapper=Asyncify.instrumentFunction(original);ret[x]=wrapper}else{ret[x]=original}}return ret},State:{Normal:0,Unwinding:1,Rewinding:2,Disabled:3},state:0,StackSize:4096,currData:null,handleSleepReturnValue:0,exportCallStack:[],callstackFuncToId:new Map,callStackIdToFunc:new Map,funcWrappers:new Map,callStackId:0,asyncPromiseHandlers:null,sleepCallbacks:[],getCallStackId(func){if(!Asyncify.callstackFuncToId.has(func)){var id=Asyncify.callStackId++;Asyncify.callstackFuncToId.set(func,id);Asyncify.callStackIdToFunc.set(id,func)}return Asyncify.callstackFuncToId.get(func)},maybeStopUnwind(){if(Asyncify.currData&&Asyncify.state===Asyncify.State.Unwinding&&Asyncify.exportCallStack.length===0){Asyncify.state=Asyncify.State.Normal;runAndAbortIfError(_asyncify_stop_unwind);if(typeof Fibers!="undefined"){Fibers.trampoline()}}},whenDone(){return new Promise((resolve,reject)=>{Asyncify.asyncPromiseHandlers={resolve,reject}})},allocateData(){var ptr=_malloc(12+Asyncify.StackSize);Asyncify.setDataHeader(ptr,ptr+12,Asyncify.StackSize);Asyncify.setDataRewindFunc(ptr);return ptr},setDataHeader(ptr,stack,stackSize){HEAPU32[ptr>>2]=stack;HEAPU32[ptr+4>>2]=stack+stackSize},setDataRewindFunc(ptr){var bottomOfCallStack=Asyncify.exportCallStack[0];var rewindId=Asyncify.getCallStackId(bottomOfCallStack);HEAP32[ptr+8>>2]=rewindId},getDataRewindFunc(ptr){var id=HEAP32[ptr+8>>2];var func=Asyncify.callStackIdToFunc.get(id);return func},doRewind(ptr){var original=Asyncify.getDataRewindFunc(ptr);var func=Asyncify.funcWrappers.get(original);return callUserCallback(func)},handleSleep(startAsync){if(ABORT)return;if(Asyncify.state===Asyncify.State.Normal){var reachedCallback=false;var reachedAfterCallback=false;startAsync((handleSleepReturnValue=0)=>{if(ABORT)return;Asyncify.handleSleepReturnValue=handleSleepReturnValue;reachedCallback=true;if(!reachedAfterCallback){return}Asyncify.state=Asyncify.State.Rewinding;runAndAbortIfError(()=>_asyncify_start_rewind(Asyncify.currData));if(typeof MainLoop!="undefined"&&MainLoop.func){MainLoop.resume()}var asyncWasmReturnValue,isError=false;try{asyncWasmReturnValue=Asyncify.doRewind(Asyncify.currData)}catch(err){asyncWasmReturnValue=err;isError=true}var handled=false;if(!Asyncify.currData){var asyncPromiseHandlers=Asyncify.asyncPromiseHandlers;if(asyncPromiseHandlers){Asyncify.asyncPromiseHandlers=null;(isError?asyncPromiseHandlers.reject:asyncPromiseHandlers.resolve)(asyncWasmReturnValue);handled=true}}if(isError&&!handled){throw asyncWasmReturnValue}});reachedAfterCallback=true;if(!reachedCallback){Asyncify.state=Asyncify.State.Unwinding;Asyncify.currData=Asyncify.allocateData();if(typeof MainLoop!="undefined"&&MainLoop.func){MainLoop.pause()}runAndAbortIfError(()=>_asyncify_start_unwind(Asyncify.currData))}}else if(Asyncify.state===Asyncify.State.Rewinding){Asyncify.state=Asyncify.State.Normal;runAndAbortIfError(_asyncify_stop_rewind);_free(Asyncify.currData);Asyncify.currData=null;Asyncify.sleepCallbacks.forEach(callUserCallback)}else{abort(`invalid state: ${Asyncify.state}`)}return Asyncify.handleSleepReturnValue},handleAsync:startAsync=>Asyncify.handleSleep(async wakeUp=>{wakeUp(await startAsync())})};var Fibers={nextFiber:0,trampolineRunning:false,trampoline(){if(!Fibers.trampolineRunning&&Fibers.nextFiber){Fibers.trampolineRunning=true;do{var fiber=Fibers.nextFiber;Fibers.nextFiber=0;Fibers.finishContextSwitch(fiber)}while(Fibers.nextFiber);Fibers.trampolineRunning=false}},finishContextSwitch(newFiber){var stack_base=HEAPU32[newFiber>>2];var stack_max=HEAPU32[newFiber+4>>2];_emscripten_stack_set_limits(stack_base,stack_max);stackRestore(HEAPU32[newFiber+8>>2]);var entryPoint=HEAPU32[newFiber+12>>2];if(entryPoint!==0){Asyncify.currData=null;HEAPU32[newFiber+12>>2]=0;var userData=HEAPU32[newFiber+16>>2];(a1=>dynCall_vi(entryPoint,a1))(userData)}else{var asyncifyData=newFiber+20;Asyncify.currData=asyncifyData;Asyncify.state=Asyncify.State.Rewinding;_asyncify_start_rewind(asyncifyData);Asyncify.doRewind(asyncifyData)}}};var _emscripten_fiber_swap=(oldFiber,newFiber)=>{if(ABORT)return;if(Asyncify.state===Asyncify.State.Normal){Asyncify.state=Asyncify.State.Unwinding;var asyncifyData=oldFiber+20;Asyncify.setDataRewindFunc(asyncifyData);Asyncify.currData=asyncifyData;_asyncify_start_unwind(asyncifyData);var stackTop=stackSave();HEAPU32[oldFiber+8>>2]=stackTop;Fibers.nextFiber=newFiber}else{Asyncify.state=Asyncify.State.Normal;_asyncify_stop_rewind();Asyncify.currData=null}};_emscripten_fiber_swap.isAsync=true;var getHeapMax=()=>2147483648;var _emscripten_get_heap_max=()=>getHeapMax();var alignMemory=(size,alignment)=>Math.ceil(size/alignment)*alignment;var growMemory=size=>{var oldHeapSize=wasmMemory.buffer.byteLength;var pages=(size-oldHeapSize+65535)/65536|0;try{wasmMemory.grow(pages);updateMemoryViews();return 1}catch(e){}};var _emscripten_resize_heap=requestedSize=>{var oldSize=HEAPU8.length;requestedSize>>>=0;var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false}for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignMemory(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=growMemory(newSize);if(replacement){return true}}return false};var ENV={};var getExecutableName=()=>thisProgram||"./this.program";var getEnvStrings=()=>{if(!getEnvStrings.strings){var lang=(globalThis.navigator?.language??"C").replace("-","_")+".UTF-8";var env={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:lang,_:getExecutableName()};for(var x in ENV){if(ENV[x]===undefined)delete env[x];else env[x]=ENV[x]}var strings=[];for(var x in env){strings.push(`${x}=${env[x]}`)}getEnvStrings.strings=strings}return getEnvStrings.strings};var _environ_get=(__environ,environ_buf)=>{var bufSize=0;var envp=0;for(var string of getEnvStrings()){var ptr=environ_buf+bufSize;HEAPU32[__environ+envp>>2]=ptr;bufSize+=stringToUTF8(string,ptr,Infinity)+1;envp+=4}return 0};var _environ_sizes_get=(penviron_count,penviron_buf_size)=>{var strings=getEnvStrings();HEAPU32[penviron_count>>2]=strings.length;var bufSize=0;for(var string of strings){bufSize+=lengthBytesUTF8(string)+1}HEAPU32[penviron_buf_size>>2]=bufSize;return 0};function _fd_close(fd){try{var stream=SYSCALLS.getStreamFromFD(fd);FS.close(stream);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}function _fd_fdstat_get(fd,pbuf){try{var rightsBase=0;var rightsInheriting=0;var flags=0;{var stream=SYSCALLS.getStreamFromFD(fd);var type=stream.tty?2:FS.isDir(stream.mode)?3:FS.isLink(stream.mode)?7:4}HEAP8[pbuf]=type;HEAP16[pbuf+2>>1]=flags;tempI64=[rightsBase>>>0,(tempDouble=rightsBase,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[pbuf+8>>2]=tempI64[0],HEAP32[pbuf+12>>2]=tempI64[1];tempI64=[rightsInheriting>>>0,(tempDouble=rightsInheriting,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[pbuf+16>>2]=tempI64[0],HEAP32[pbuf+20>>2]=tempI64[1];return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}var doReadv=(stream,iov,iovcnt,offset)=>{var ret=0;for(var i=0;i<iovcnt;i++){var ptr=HEAPU32[iov>>2];var len=HEAPU32[iov+4>>2];iov+=8;var curr=FS.read(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(curr<len)break;if(typeof offset!="undefined"){offset+=curr}}return ret};function _fd_read(fd,iov,iovcnt,pnum){try{var stream=SYSCALLS.getStreamFromFD(fd);var num=doReadv(stream,iov,iovcnt);HEAPU32[pnum>>2]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}function _fd_seek(fd,offset_low,offset_high,whence,newOffset){var offset=convertI32PairToI53Checked(offset_low,offset_high);try{if(isNaN(offset))return 61;var stream=SYSCALLS.getStreamFromFD(fd);FS.llseek(stream,offset,whence);tempI64=[stream.position>>>0,(tempDouble=stream.position,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[newOffset>>2]=tempI64[0],HEAP32[newOffset+4>>2]=tempI64[1];if(stream.getdents&&offset===0&&whence===0)stream.getdents=null;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}var doWritev=(stream,iov,iovcnt,offset)=>{var ret=0;for(var i=0;i<iovcnt;i++){var ptr=HEAPU32[iov>>2];var len=HEAPU32[iov+4>>2];iov+=8;var curr=FS.write(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(curr<len){break}if(typeof offset!="undefined"){offset+=curr}}return ret};function _fd_write(fd,iov,iovcnt,pnum){try{var stream=SYSCALLS.getStreamFromFD(fd);var num=doWritev(stream,iov,iovcnt);HEAPU32[pnum>>2]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}var getCFunc=ident=>{var func=Module["_"+ident];return func};var writeArrayToMemory=(array,buffer)=>{HEAP8.set(array,buffer)};var stackAlloc=sz=>__emscripten_stack_alloc(sz);var stringToUTF8OnStack=str=>{var size=lengthBytesUTF8(str)+1;var ret=stackAlloc(size);stringToUTF8(str,ret,size);return ret};var ccall=(ident,returnType,argTypes,args,opts)=>{var toC={string:str=>{var ret=0;if(str!==null&&str!==undefined&&str!==0){ret=stringToUTF8OnStack(str)}return ret},array:arr=>{var ret=stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret}};function convertReturnValue(ret){if(returnType==="string"){return UTF8ToString(ret)}if(returnType==="boolean")return Boolean(ret);return ret}var func=getCFunc(ident);var cArgs=[];var stack=0;if(args){for(var i=0;i<args.length;i++){var converter=toC[argTypes[i]];if(converter){if(stack===0)stack=stackSave();cArgs[i]=converter(args[i])}else{cArgs[i]=args[i]}}}var previousAsync=Asyncify.currData;var ret=func(...cArgs);function onDone(ret){runtimeKeepalivePop();if(stack!==0)stackRestore(stack);return convertReturnValue(ret)}var asyncMode=opts?.async;runtimeKeepalivePush();if(Asyncify.currData!=previousAsync){return Asyncify.whenDone().then(onDone)}ret=onDone(ret);if(asyncMode)return Promise.resolve(ret);return ret};var cwrap=(ident,returnType,argTypes,opts)=>{var numericArgs=!argTypes||argTypes.every(type=>type==="number"||type==="boolean");var numericRet=returnType!=="string";if(numericRet&&numericArgs&&!opts){return getCFunc(ident)}return(...args)=>ccall(ident,returnType,argTypes,args,opts)};FS.createPreloadedFile=FS_createPreloadedFile;FS.preloadFile=FS_preloadFile;FS.staticInit();{if(Module["noExitRuntime"])noExitRuntime=Module["noExitRuntime"];if(Module["preloadPlugins"])preloadPlugins=Module["preloadPlugins"];if(Module["print"])out=Module["print"];if(Module["printErr"])err=Module["printErr"];if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].shift()()}}}Module["ccall"]=ccall;Module["cwrap"]=cwrap;var ASM_CONSTS={573851:()=>{Fibers.trampolineRunning=false}};function writeoutEmscriptenOOM(){throw new Error("Out of memory")}function libavjs_wait_reader(fd){return Asyncify.handleAsync(function(){return new Promise(function(res){var name=Module.fdName(fd);var waiters=Module.ff_reader_dev_waiters[name];if(!waiters)waiters=Module.ff_reader_dev_waiters[name]=[];waiters.push(res)})})}var _ff_nothing,_AVFrame_crop_bottom,_AVFrame_crop_bottom_s,_AVFrame_crop_left,_AVFrame_crop_left_s,_AVFrame_crop_right,_AVFrame_crop_right_s,_AVFrame_crop_top,_AVFrame_crop_top_s,_AVFrame_data_a,_AVFrame_data_a_s,_AVFrame_duration,_AVFrame_duration_s,_AVFrame_flags,_AVFrame_flags_s,_AVFrame_format,_AVFrame_format_s,_AVFrame_height,_AVFrame_height_s,_AVFrame_linesize_a,_AVFrame_linesize_a_s,_AVFrame_nb_samples,_AVFrame_nb_samples_s,_AVFrame_pict_type,_AVFrame_pict_type_s,_AVFrame_pts,_AVFrame_ptshi,_AVFrame_pts_s,_AVFrame_ptshi_s,_AVFrame_sample_rate,_AVFrame_sample_rate_s,_AVFrame_width,_AVFrame_width_s,_AVFrame_sample_aspect_ratio_num,_AVFrame_sample_aspect_ratio_den,_AVFrame_sample_aspect_ratio_num_s,_AVFrame_sample_aspect_ratio_den_s,_AVFrame_sample_aspect_ratio_s,_AVFrame_time_base_num,_AVFrame_time_base_den,_AVFrame_time_base_num_s,_AVFrame_time_base_den_s,_AVFrame_time_base_s,_AVFrame_key_frame,_AVFrame_key_frame_s,_AVFrame_channel_layoutmask_s,_AVFrame_channel_layoutmask,_AVFrame_channels,_AVFrame_channels_s,_AVFrame_ch_layout_nb_channels,_AVFrame_ch_layout_nb_channels_s,_AVFrame_channel_layout,_AVFrame_channel_layouthi,_AVFrame_channel_layout_s,_AVFrame_channel_layouthi_s,_ff_frame_rescale_ts_js,_AVPixFmtDescriptor_flags,_AVPixFmtDescriptor_flags_s,_AVPixFmtDescriptor_nb_components,_AVPixFmtDescriptor_nb_components_s,_AVPixFmtDescriptor_log2_chroma_h,_AVPixFmtDescriptor_log2_chroma_h_s,_AVPixFmtDescriptor_log2_chroma_w,_AVPixFmtDescriptor_log2_chroma_w_s,_AVPixFmtDescriptor_comp_depth,_av_opt_set_int_list_js,_av_dict_copy_js,_av_dict_set_js,_av_compare_ts_js,_AVCodec_name,_AVCodec_sample_fmts,_AVCodec_sample_fmts_s,_AVCodec_sample_fmts_a,_AVCodec_sample_fmts_a_s,_AVCodec_supported_samplerates,_AVCodec_supported_samplerates_s,_AVCodec_supported_samplerates_a,_AVCodec_supported_samplerates_a_s,_AVCodec_type,_AVCodec_type_s,_AVCodecContext_codec_id,_AVCodecContext_codec_id_s,_AVCodecContext_codec_type,_AVCodecContext_codec_type_s,_AVCodecContext_bit_rate,_AVCodecContext_bit_ratehi,_AVCodecContext_bit_rate_s,_AVCodecContext_bit_ratehi_s,_AVCodecContext_coded_side_data,_AVCodecContext_coded_side_data_s,_AVCodecContext_compression_level,_AVCodecContext_compression_level_s,_AVCodecContext_extradata,_AVCodecContext_extradata_s,_AVCodecContext_extradata_size,_AVCodecContext_extradata_size_s,_AVCodecContext_frame_size,_AVCodecContext_frame_size_s,_AVCodecContext_gop_size,_AVCodecContext_gop_size_s,_AVCodecContext_height,_AVCodecContext_height_s,_AVCodecContext_keyint_min,_AVCodecContext_keyint_min_s,_AVCodecContext_level,_AVCodecContext_level_s,_AVCodecContext_max_b_frames,_AVCodecContext_max_b_frames_s,_AVCodecContext_nb_coded_side_data,_AVCodecContext_nb_coded_side_data_s,_AVCodecContext_pix_fmt,_AVCodecContext_pix_fmt_s,_AVCodecContext_profile,_AVCodecContext_profile_s,_AVCodecContext_rc_max_rate,_AVCodecContext_rc_max_ratehi,_AVCodecContext_rc_max_rate_s,_AVCodecContext_rc_max_ratehi_s,_AVCodecContext_rc_min_rate,_AVCodecContext_rc_min_ratehi,_AVCodecContext_rc_min_rate_s,_AVCodecContext_rc_min_ratehi_s,_AVCodecContext_sample_fmt,_AVCodecContext_sample_fmt_s,_AVCodecContext_sample_rate,_AVCodecContext_sample_rate_s,_AVCodecContext_strict_std_compliance,_AVCodecContext_strict_std_compliance_s,_AVCodecContext_qmax,_AVCodecContext_qmax_s,_AVCodecContext_qmin,_AVCodecContext_qmin_s,_AVCodecContext_width,_AVCodecContext_width_s,_AVCodecContext_framerate_num,_AVCodecContext_framerate_den,_AVCodecContext_framerate_num_s,_AVCodecContext_framerate_den_s,_AVCodecContext_framerate_s,_AVCodecContext_sample_aspect_ratio_num,_AVCodecContext_sample_aspect_ratio_den,_AVCodecContext_sample_aspect_ratio_num_s,_AVCodecContext_sample_aspect_ratio_den_s,_AVCodecContext_sample_aspect_ratio_s,_AVCodecContext_time_base_num,_AVCodecContext_time_base_den,_AVCodecContext_time_base_num_s,_AVCodecContext_time_base_den_s,_AVCodecContext_time_base_s,_AVCodecContext_pkt_timebase_num,_AVCodecContext_pkt_timebase_den,_AVCodecContext_pkt_timebase_num_s,_AVCodecContext_pkt_timebase_den_s,_AVCodecContext_pkt_timebase_s,_AVCodecContext_channel_layoutmask_s,_AVCodecContext_channel_layoutmask,_AVCodecContext_channels,_AVCodecContext_channels_s,_AVCodecContext_ch_layout_nb_channels,_AVCodecContext_ch_layout_nb_channels_s,_AVCodecContext_channel_layout,_AVCodecContext_channel_layouthi,_AVCodecContext_channel_layout_s,_AVCodecContext_channel_layouthi_s,_AVCodecDescriptor_id,_AVCodecDescriptor_id_s,_AVCodecDescriptor_long_name,_AVCodecDescriptor_mime_types_a,_AVCodecDescriptor_mime_types_a_s,_AVCodecDescriptor_name,_AVCodecDescriptor_props,_AVCodecDescriptor_props_s,_AVCodecDescriptor_type,_AVCodecDescriptor_type_s,_AVCodecParameters_codec_id,_AVCodecParameters_codec_id_s,_AVCodecParameters_codec_tag,_AVCodecParameters_codec_tag_s,_AVCodecParameters_codec_type,_AVCodecParameters_codec_type_s,_AVCodecParameters_extradata,_AVCodecParameters_extradata_s,_AVCodecParameters_extradata_size,_AVCodecParameters_extradata_size_s,_AVCodecParameters_format,_AVCodecParameters_format_s,_AVCodecParameters_bit_rate,_AVCodecParameters_bit_rate_s,_AVCodecParameters_profile,_AVCodecParameters_profile_s,_AVCodecParameters_level,_AVCodecParameters_level_s,_AVCodecParameters_width,_AVCodecParameters_width_s,_AVCodecParameters_height,_AVCodecParameters_height_s,_AVCodecParameters_color_range,_AVCodecParameters_color_range_s,_AVCodecParameters_color_primaries,_AVCodecParameters_color_primaries_s,_AVCodecParameters_color_trc,_AVCodecParameters_color_trc_s,_AVCodecParameters_color_space,_AVCodecParameters_color_space_s,_AVCodecParameters_chroma_location,_AVCodecParameters_chroma_location_s,_AVCodecParameters_sample_rate,_AVCodecParameters_sample_rate_s,_AVCodecParameters_coded_side_data,_AVCodecParameters_coded_side_data_s,_AVCodecParameters_nb_coded_side_data,_AVCodecParameters_nb_coded_side_data_s,_AVCodecParameters_framerate_num,_AVCodecParameters_framerate_den,_AVCodecParameters_framerate_num_s,_AVCodecParameters_framerate_den_s,_AVCodecParameters_framerate_s,_AVCodecParameters_channel_layoutmask_s,_AVCodecParameters_channel_layoutmask,_AVCodecParameters_channels,_AVCodecParameters_channels_s,_AVCodecParameters_ch_layout_nb_channels,_AVCodecParameters_ch_layout_nb_channels_s,_ff_codecpar_new_side_data,_AVPacket_data,_AVPacket_data_s,_AVPacket_dts,_AVPacket_dtshi,_AVPacket_dts_s,_AVPacket_dtshi_s,_AVPacket_duration,_AVPacket_durationhi,_AVPacket_duration_s,_AVPacket_durationhi_s,_AVPacket_flags,_AVPacket_flags_s,_AVPacket_pos,_AVPacket_poshi,_AVPacket_pos_s,_AVPacket_poshi_s,_AVPacket_pts,_AVPacket_ptshi,_AVPacket_pts_s,_AVPacket_ptshi_s,_AVPacket_side_data,_AVPacket_side_data_s,_AVPacket_side_data_elems,_AVPacket_side_data_elems_s,_AVPacket_size,_AVPacket_size_s,_AVPacket_stream_index,_AVPacket_stream_index_s,_AVPacket_time_base_num,_AVPacket_time_base_den,_AVPacket_time_base_num_s,_AVPacket_time_base_den_s,_AVPacket_time_base_s,_AVPacketSideData_data,_AVPacketSideData_size,_AVPacketSideData_type,_avcodec_open2_js,_avcodec_open2,_av_packet_rescale_ts_js,_LIBAVCODEC_VERSION_INT,_AVFormatContext_duration,_AVFormatContext_durationhi,_AVFormatContext_duration_s,_AVFormatContext_durationhi_s,_AVFormatContext_flags,_AVFormatContext_flags_s,_AVFormatContext_nb_streams,_AVFormatContext_nb_streams_s,_AVFormatContext_oformat,_AVFormatContext_oformat_s,_AVFormatContext_pb,_AVFormatContext_pb_s,_AVFormatContext_start_time,_AVFormatContext_start_timehi,_AVFormatContext_start_time_s,_AVFormatContext_start_timehi_s,_AVFormatContext_streams_a,_AVFormatContext_streams_a_s,_AVStream_codecpar,_AVStream_codecpar_s,_AVStream_discard,_AVStream_discard_s,_AVStream_duration,_AVStream_durationhi,_AVStream_duration_s,_AVStream_durationhi_s,_AVStream_time_base_num,_AVStream_time_base_den,_AVStream_time_base_num_s,_AVStream_time_base_den_s,_AVStream_time_base_s,_avformat_seek_file_min,_avformat_seek_file,_avformat_seek_file_max,_avformat_seek_file_approx,_avformat_alloc_output_context2_js,_avformat_open_input_js,_avformat_open_input,_avio_open2_js,_LIBAVFORMAT_VERSION_INT,_libavjs_with_swscale,_libavjs_create_main_thread,_ff_error,_mallinfo_uordblks,_LIBAVUTIL_VERSION_INT,_av_strdup,_av_dict_free,_av_frame_alloc,_av_frame_free,_av_frame_unref,_av_frame_get_buffer,_av_frame_ref,_av_frame_clone,_av_frame_make_writable,_av_log_get_level,_av_log_set_level,_free,_malloc,_av_opt_set,_av_get_sample_fmt_name,_av_pix_fmt_desc_get,_open,_av_get_bytes_per_sample,_avformat_free_context,_av_find_best_stream,_avio_close,_avio_flush,_avformat_alloc_context,_av_packet_unref,_avcodec_free_context,_avcodec_parameters_free,_av_packet_free,_avformat_new_stream,_avcodec_parameters_copy,_av_packet_ref,_avcodec_find_decoder,_avcodec_descriptor_get,_avcodec_parameters_to_context,_avformat_close_input,_av_read_frame,_avcodec_get_name,_av_packet_new_side_data,_avformat_find_stream_info,_avcodec_parameters_from_context,_avcodec_find_decoder_by_name,_avcodec_send_packet,_avcodec_receive_frame,_avcodec_alloc_context3,_avcodec_parameters_alloc,_av_find_input_format,_av_shrink_packet,_av_packet_alloc,_avformat_write_header,_av_write_frame,_av_interleaved_write_frame,_av_write_trailer,_close,_av_seek_frame,_avformat_flush,_av_grow_packet,_avcodec_find_encoder,_avcodec_find_encoder_by_name,_avcodec_flush_buffers,_av_packet_make_writable,_avcodec_descriptor_next,_avcodec_descriptor_get_by_name,_avcodec_send_frame,_avcodec_receive_packet,_av_packet_clone,_sws_scale_frame,_sws_getContext,_sws_freeContext,_calloc,_emfiberthreads_timeout_expiry,_dup2,_strerror,__emscripten_tempret_set,_emscripten_stack_set_limits,__emscripten_stack_restore,__emscripten_stack_alloc,_emscripten_stack_get_current,dynCall_iiii,dynCall_ii,dynCall_viiii,dynCall_dd,dynCall_iiiiii,dynCall_iii,dynCall_vii,dynCall_jiji,dynCall_v,dynCall_vi,dynCall_viiiiii,dynCall_iiiji,dynCall_jiiij,dynCall_iiiii,dynCall_jiiji,dynCall_iiijiiii,dynCall_viiiii,dynCall_viiiiiifi,dynCall_viii,dynCall_iiiiiii,dynCall_viifi,dynCall_diii,dynCall_fiii,dynCall_viidi,dynCall_viiiiiiii,dynCall_ijii,dynCall_viiiiij,dynCall_viiiiiiiii,dynCall_viiiiiiiiiiiiii,dynCall_viiiiiiiiiii,dynCall_viiiiiii,dynCall_viiiiiiiiiiii,dynCall_viiiifii,dynCall_fii,dynCall_viiiiiiiiii,dynCall_iidiiii,dynCall_vddi,dynCall_iiiiiiii,dynCall_viiiij,dynCall_viiij,_asyncify_start_unwind,_asyncify_stop_unwind,_asyncify_start_rewind,_asyncify_stop_rewind,memory,__indirect_function_table,_ff_h264_cabac_tables,wasmMemory;function assignWasmExports(wasmExports){_ff_nothing=Module["_ff_nothing"]=wasmExports["K"];_AVFrame_crop_bottom=Module["_AVFrame_crop_bottom"]=wasmExports["L"];_AVFrame_crop_bottom_s=Module["_AVFrame_crop_bottom_s"]=wasmExports["M"];_AVFrame_crop_left=Module["_AVFrame_crop_left"]=wasmExports["N"];_AVFrame_crop_left_s=Module["_AVFrame_crop_left_s"]=wasmExports["O"];_AVFrame_crop_right=Module["_AVFrame_crop_right"]=wasmExports["P"];_AVFrame_crop_right_s=Module["_AVFrame_crop_right_s"]=wasmExports["Q"];_AVFrame_crop_top=Module["_AVFrame_crop_top"]=wasmExports["R"];_AVFrame_crop_top_s=Module["_AVFrame_crop_top_s"]=wasmExports["S"];_AVFrame_data_a=Module["_AVFrame_data_a"]=wasmExports["T"];_AVFrame_data_a_s=Module["_AVFrame_data_a_s"]=wasmExports["U"];_AVFrame_duration=Module["_AVFrame_duration"]=wasmExports["V"];_AVFrame_duration_s=Module["_AVFrame_duration_s"]=wasmExports["W"];_AVFrame_flags=Module["_AVFrame_flags"]=wasmExports["X"];_AVFrame_flags_s=Module["_AVFrame_flags_s"]=wasmExports["Y"];_AVFrame_format=Module["_AVFrame_format"]=wasmExports["Z"];_AVFrame_format_s=Module["_AVFrame_format_s"]=wasmExports["_"];_AVFrame_height=Module["_AVFrame_height"]=wasmExports["$"];_AVFrame_height_s=Module["_AVFrame_height_s"]=wasmExports["aa"];_AVFrame_linesize_a=Module["_AVFrame_linesize_a"]=wasmExports["ba"];_AVFrame_linesize_a_s=Module["_AVFrame_linesize_a_s"]=wasmExports["ca"];_AVFrame_nb_samples=Module["_AVFrame_nb_samples"]=wasmExports["da"];_AVFrame_nb_samples_s=Module["_AVFrame_nb_samples_s"]=wasmExports["ea"];_AVFrame_pict_type=Module["_AVFrame_pict_type"]=wasmExports["fa"];_AVFrame_pict_type_s=Module["_AVFrame_pict_type_s"]=wasmExports["ga"];_AVFrame_pts=Module["_AVFrame_pts"]=wasmExports["ha"];_AVFrame_ptshi=Module["_AVFrame_ptshi"]=wasmExports["ia"];_AVFrame_pts_s=Module["_AVFrame_pts_s"]=wasmExports["ja"];_AVFrame_ptshi_s=Module["_AVFrame_ptshi_s"]=wasmExports["ka"];_AVFrame_sample_rate=Module["_AVFrame_sample_rate"]=wasmExports["la"];_AVFrame_sample_rate_s=Module["_AVFrame_sample_rate_s"]=wasmExports["ma"];_AVFrame_width=Module["_AVFrame_width"]=wasmExports["na"];_AVFrame_width_s=Module["_AVFrame_width_s"]=wasmExports["oa"];_AVFrame_sample_aspect_ratio_num=Module["_AVFrame_sample_aspect_ratio_num"]=wasmExports["pa"];_AVFrame_sample_aspect_ratio_den=Module["_AVFrame_sample_aspect_ratio_den"]=wasmExports["qa"];_AVFrame_sample_aspect_ratio_num_s=Module["_AVFrame_sample_aspect_ratio_num_s"]=wasmExports["ra"];_AVFrame_sample_aspect_ratio_den_s=Module["_AVFrame_sample_aspect_ratio_den_s"]=wasmExports["sa"];_AVFrame_sample_aspect_ratio_s=Module["_AVFrame_sample_aspect_ratio_s"]=wasmExports["ta"];_AVFrame_time_base_num=Module["_AVFrame_time_base_num"]=wasmExports["ua"];_AVFrame_time_base_den=Module["_AVFrame_time_base_den"]=wasmExports["va"];_AVFrame_time_base_num_s=Module["_AVFrame_time_base_num_s"]=wasmExports["wa"];_AVFrame_time_base_den_s=Module["_AVFrame_time_base_den_s"]=wasmExports["xa"];_AVFrame_time_base_s=Module["_AVFrame_time_base_s"]=wasmExports["ya"];_AVFrame_key_frame=Module["_AVFrame_key_frame"]=wasmExports["za"];_AVFrame_key_frame_s=Module["_AVFrame_key_frame_s"]=wasmExports["Aa"];_AVFrame_channel_layoutmask_s=Module["_AVFrame_channel_layoutmask_s"]=wasmExports["Ba"];_AVFrame_channel_layoutmask=Module["_AVFrame_channel_layoutmask"]=wasmExports["Ca"];_AVFrame_channels=Module["_AVFrame_channels"]=wasmExports["Da"];_AVFrame_channels_s=Module["_AVFrame_channels_s"]=wasmExports["Ea"];_AVFrame_ch_layout_nb_channels=Module["_AVFrame_ch_layout_nb_channels"]=wasmExports["Fa"];_AVFrame_ch_layout_nb_channels_s=Module["_AVFrame_ch_layout_nb_channels_s"]=wasmExports["Ga"];_AVFrame_channel_layout=Module["_AVFrame_channel_layout"]=wasmExports["Ha"];_AVFrame_channel_layouthi=Module["_AVFrame_channel_layouthi"]=wasmExports["Ia"];_AVFrame_channel_layout_s=Module["_AVFrame_channel_layout_s"]=wasmExports["Ja"];_AVFrame_channel_layouthi_s=Module["_AVFrame_channel_layouthi_s"]=wasmExports["Ka"];_ff_frame_rescale_ts_js=Module["_ff_frame_rescale_ts_js"]=wasmExports["La"];_AVPixFmtDescriptor_flags=Module["_AVPixFmtDescriptor_flags"]=wasmExports["Ma"];_AVPixFmtDescriptor_flags_s=Module["_AVPixFmtDescriptor_flags_s"]=wasmExports["Na"];_AVPixFmtDescriptor_nb_components=Module["_AVPixFmtDescriptor_nb_components"]=wasmExports["Oa"];_AVPixFmtDescriptor_nb_components_s=Module["_AVPixFmtDescriptor_nb_components_s"]=wasmExports["Pa"];_AVPixFmtDescriptor_log2_chroma_h=Module["_AVPixFmtDescriptor_log2_chroma_h"]=wasmExports["Qa"];_AVPixFmtDescriptor_log2_chroma_h_s=Module["_AVPixFmtDescriptor_log2_chroma_h_s"]=wasmExports["Ra"];_AVPixFmtDescriptor_log2_chroma_w=Module["_AVPixFmtDescriptor_log2_chroma_w"]=wasmExports["Sa"];_AVPixFmtDescriptor_log2_chroma_w_s=Module["_AVPixFmtDescriptor_log2_chroma_w_s"]=wasmExports["Ta"];_AVPixFmtDescriptor_comp_depth=Module["_AVPixFmtDescriptor_comp_depth"]=wasmExports["Ua"];_av_opt_set_int_list_js=Module["_av_opt_set_int_list_js"]=wasmExports["Va"];_av_dict_copy_js=Module["_av_dict_copy_js"]=wasmExports["Wa"];_av_dict_set_js=Module["_av_dict_set_js"]=wasmExports["Xa"];_av_compare_ts_js=Module["_av_compare_ts_js"]=wasmExports["Ya"];_AVCodec_name=Module["_AVCodec_name"]=wasmExports["Za"];_AVCodec_sample_fmts=Module["_AVCodec_sample_fmts"]=wasmExports["_a"];_AVCodec_sample_fmts_s=Module["_AVCodec_sample_fmts_s"]=wasmExports["$a"];_AVCodec_sample_fmts_a=Module["_AVCodec_sample_fmts_a"]=wasmExports["ab"];_AVCodec_sample_fmts_a_s=Module["_AVCodec_sample_fmts_a_s"]=wasmExports["bb"];_AVCodec_supported_samplerates=Module["_AVCodec_supported_samplerates"]=wasmExports["cb"];_AVCodec_supported_samplerates_s=Module["_AVCodec_supported_samplerates_s"]=wasmExports["db"];_AVCodec_supported_samplerates_a=Module["_AVCodec_supported_samplerates_a"]=wasmExports["eb"];_AVCodec_supported_samplerates_a_s=Module["_AVCodec_supported_samplerates_a_s"]=wasmExports["fb"];_AVCodec_type=Module["_AVCodec_type"]=wasmExports["gb"];_AVCodec_type_s=Module["_AVCodec_type_s"]=wasmExports["hb"];_AVCodecContext_codec_id=Module["_AVCodecContext_codec_id"]=wasmExports["ib"];_AVCodecContext_codec_id_s=Module["_AVCodecContext_codec_id_s"]=wasmExports["jb"];_AVCodecContext_codec_type=Module["_AVCodecContext_codec_type"]=wasmExports["kb"];_AVCodecContext_codec_type_s=Module["_AVCodecContext_codec_type_s"]=wasmExports["lb"];_AVCodecContext_bit_rate=Module["_AVCodecContext_bit_rate"]=wasmExports["mb"];_AVCodecContext_bit_ratehi=Module["_AVCodecContext_bit_ratehi"]=wasmExports["nb"];_AVCodecContext_bit_rate_s=Module["_AVCodecContext_bit_rate_s"]=wasmExports["ob"];_AVCodecContext_bit_ratehi_s=Module["_AVCodecContext_bit_ratehi_s"]=wasmExports["pb"];_AVCodecContext_coded_side_data=Module["_AVCodecContext_coded_side_data"]=wasmExports["qb"];_AVCodecContext_coded_side_data_s=Module["_AVCodecContext_coded_side_data_s"]=wasmExports["rb"];_AVCodecContext_compression_level=Module["_AVCodecContext_compression_level"]=wasmExports["sb"];_AVCodecContext_compression_level_s=Module["_AVCodecContext_compression_level_s"]=wasmExports["tb"];_AVCodecContext_extradata=Module["_AVCodecContext_extradata"]=wasmExports["ub"];_AVCodecContext_extradata_s=Module["_AVCodecContext_extradata_s"]=wasmExports["vb"];_AVCodecContext_extradata_size=Module["_AVCodecContext_extradata_size"]=wasmExports["wb"];_AVCodecContext_extradata_size_s=Module["_AVCodecContext_extradata_size_s"]=wasmExports["xb"];_AVCodecContext_frame_size=Module["_AVCodecContext_frame_size"]=wasmExports["yb"];_AVCodecContext_frame_size_s=Module["_AVCodecContext_frame_size_s"]=wasmExports["zb"];_AVCodecContext_gop_size=Module["_AVCodecContext_gop_size"]=wasmExports["Ab"];_AVCodecContext_gop_size_s=Module["_AVCodecContext_gop_size_s"]=wasmExports["Bb"];_AVCodecContext_height=Module["_AVCodecContext_height"]=wasmExports["Cb"];_AVCodecContext_height_s=Module["_AVCodecContext_height_s"]=wasmExports["Db"];_AVCodecContext_keyint_min=Module["_AVCodecContext_keyint_min"]=wasmExports["Eb"];_AVCodecContext_keyint_min_s=Module["_AVCodecContext_keyint_min_s"]=wasmExports["Fb"];_AVCodecContext_level=Module["_AVCodecContext_level"]=wasmExports["Gb"];_AVCodecContext_level_s=Module["_AVCodecContext_level_s"]=wasmExports["Hb"];_AVCodecContext_max_b_frames=Module["_AVCodecContext_max_b_frames"]=wasmExports["Ib"];_AVCodecContext_max_b_frames_s=Module["_AVCodecContext_max_b_frames_s"]=wasmExports["Jb"];_AVCodecContext_nb_coded_side_data=Module["_AVCodecContext_nb_coded_side_data"]=wasmExports["Kb"];_AVCodecContext_nb_coded_side_data_s=Module["_AVCodecContext_nb_coded_side_data_s"]=wasmExports["Lb"];_AVCodecContext_pix_fmt=Module["_AVCodecContext_pix_fmt"]=wasmExports["Mb"];_AVCodecContext_pix_fmt_s=Module["_AVCodecContext_pix_fmt_s"]=wasmExports["Nb"];_AVCodecContext_profile=Module["_AVCodecContext_profile"]=wasmExports["Ob"];_AVCodecContext_profile_s=Module["_AVCodecContext_profile_s"]=wasmExports["Pb"];_AVCodecContext_rc_max_rate=Module["_AVCodecContext_rc_max_rate"]=wasmExports["Qb"];_AVCodecContext_rc_max_ratehi=Module["_AVCodecContext_rc_max_ratehi"]=wasmExports["Rb"];_AVCodecContext_rc_max_rate_s=Module["_AVCodecContext_rc_max_rate_s"]=wasmExports["Sb"];_AVCodecContext_rc_max_ratehi_s=Module["_AVCodecContext_rc_max_ratehi_s"]=wasmExports["Tb"];_AVCodecContext_rc_min_rate=Module["_AVCodecContext_rc_min_rate"]=wasmExports["Ub"];_AVCodecContext_rc_min_ratehi=Module["_AVCodecContext_rc_min_ratehi"]=wasmExports["Vb"];_AVCodecContext_rc_min_rate_s=Module["_AVCodecContext_rc_min_rate_s"]=wasmExports["Wb"];_AVCodecContext_rc_min_ratehi_s=Module["_AVCodecContext_rc_min_ratehi_s"]=wasmExports["Xb"];_AVCodecContext_sample_fmt=Module["_AVCodecContext_sample_fmt"]=wasmExports["Yb"];_AVCodecContext_sample_fmt_s=Module["_AVCodecContext_sample_fmt_s"]=wasmExports["Zb"];_AVCodecContext_sample_rate=Module["_AVCodecContext_sample_rate"]=wasmExports["_b"];_AVCodecContext_sample_rate_s=Module["_AVCodecContext_sample_rate_s"]=wasmExports["$b"];_AVCodecContext_strict_std_compliance=Module["_AVCodecContext_strict_std_compliance"]=wasmExports["ac"];_AVCodecContext_strict_std_compliance_s=Module["_AVCodecContext_strict_std_compliance_s"]=wasmExports["bc"];_AVCodecContext_qmax=Module["_AVCodecContext_qmax"]=wasmExports["cc"];_AVCodecContext_qmax_s=Module["_AVCodecContext_qmax_s"]=wasmExports["dc"];_AVCodecContext_qmin=Module["_AVCodecContext_qmin"]=wasmExports["ec"];_AVCodecContext_qmin_s=Module["_AVCodecContext_qmin_s"]=wasmExports["fc"];_AVCodecContext_width=Module["_AVCodecContext_width"]=wasmExports["gc"];_AVCodecContext_width_s=Module["_AVCodecContext_width_s"]=wasmExports["hc"];_AVCodecContext_framerate_num=Module["_AVCodecContext_framerate_num"]=wasmExports["ic"];_AVCodecContext_framerate_den=Module["_AVCodecContext_framerate_den"]=wasmExports["jc"];_AVCodecContext_framerate_num_s=Module["_AVCodecContext_framerate_num_s"]=wasmExports["kc"];_AVCodecContext_framerate_den_s=Module["_AVCodecContext_framerate_den_s"]=wasmExports["lc"];_AVCodecContext_framerate_s=Module["_AVCodecContext_framerate_s"]=wasmExports["mc"];_AVCodecContext_sample_aspect_ratio_num=Module["_AVCodecContext_sample_aspect_ratio_num"]=wasmExports["nc"];_AVCodecContext_sample_aspect_ratio_den=Module["_AVCodecContext_sample_aspect_ratio_den"]=wasmExports["oc"];_AVCodecContext_sample_aspect_ratio_num_s=Module["_AVCodecContext_sample_aspect_ratio_num_s"]=wasmExports["pc"];_AVCodecContext_sample_aspect_ratio_den_s=Module["_AVCodecContext_sample_aspect_ratio_den_s"]=wasmExports["qc"];_AVCodecContext_sample_aspect_ratio_s=Module["_AVCodecContext_sample_aspect_ratio_s"]=wasmExports["rc"];_AVCodecContext_time_base_num=Module["_AVCodecContext_time_base_num"]=wasmExports["sc"];_AVCodecContext_time_base_den=Module["_AVCodecContext_time_base_den"]=wasmExports["tc"];_AVCodecContext_time_base_num_s=Module["_AVCodecContext_time_base_num_s"]=wasmExports["uc"];_AVCodecContext_time_base_den_s=Module["_AVCodecContext_time_base_den_s"]=wasmExports["vc"];_AVCodecContext_time_base_s=Module["_AVCodecContext_time_base_s"]=wasmExports["wc"];_AVCodecContext_pkt_timebase_num=Module["_AVCodecContext_pkt_timebase_num"]=wasmExports["xc"];_AVCodecContext_pkt_timebase_den=Module["_AVCodecContext_pkt_timebase_den"]=wasmExports["yc"];_AVCodecContext_pkt_timebase_num_s=Module["_AVCodecContext_pkt_timebase_num_s"]=wasmExports["zc"];_AVCodecContext_pkt_timebase_den_s=Module["_AVCodecContext_pkt_timebase_den_s"]=wasmExports["Ac"];_AVCodecContext_pkt_timebase_s=Module["_AVCodecContext_pkt_timebase_s"]=wasmExports["Bc"];_AVCodecContext_channel_layoutmask_s=Module["_AVCodecContext_channel_layoutmask_s"]=wasmExports["Cc"];_AVCodecContext_channel_layoutmask=Module["_AVCodecContext_channel_layoutmask"]=wasmExports["Dc"];_AVCodecContext_channels=Module["_AVCodecContext_channels"]=wasmExports["Ec"];_AVCodecContext_channels_s=Module["_AVCodecContext_channels_s"]=wasmExports["Fc"];_AVCodecContext_ch_layout_nb_channels=Module["_AVCodecContext_ch_layout_nb_channels"]=wasmExports["Gc"];_AVCodecContext_ch_layout_nb_channels_s=Module["_AVCodecContext_ch_layout_nb_channels_s"]=wasmExports["Hc"];_AVCodecContext_channel_layout=Module["_AVCodecContext_channel_layout"]=wasmExports["Ic"];_AVCodecContext_channel_layouthi=Module["_AVCodecContext_channel_layouthi"]=wasmExports["Jc"];_AVCodecContext_channel_layout_s=Module["_AVCodecContext_channel_layout_s"]=wasmExports["Kc"];_AVCodecContext_channel_layouthi_s=Module["_AVCodecContext_channel_layouthi_s"]=wasmExports["Lc"];_AVCodecDescriptor_id=Module["_AVCodecDescriptor_id"]=wasmExports["Mc"];_AVCodecDescriptor_id_s=Module["_AVCodecDescriptor_id_s"]=wasmExports["Nc"];_AVCodecDescriptor_long_name=Module["_AVCodecDescriptor_long_name"]=wasmExports["Oc"];_AVCodecDescriptor_mime_types_a=Module["_AVCodecDescriptor_mime_types_a"]=wasmExports["Pc"];_AVCodecDescriptor_mime_types_a_s=Module["_AVCodecDescriptor_mime_types_a_s"]=wasmExports["Qc"];_AVCodecDescriptor_name=Module["_AVCodecDescriptor_name"]=wasmExports["Rc"];_AVCodecDescriptor_props=Module["_AVCodecDescriptor_props"]=wasmExports["Sc"];_AVCodecDescriptor_props_s=Module["_AVCodecDescriptor_props_s"]=wasmExports["Tc"];_AVCodecDescriptor_type=Module["_AVCodecDescriptor_type"]=wasmExports["Uc"];_AVCodecDescriptor_type_s=Module["_AVCodecDescriptor_type_s"]=wasmExports["Vc"];_AVCodecParameters_codec_id=Module["_AVCodecParameters_codec_id"]=wasmExports["Wc"];_AVCodecParameters_codec_id_s=Module["_AVCodecParameters_codec_id_s"]=wasmExports["Xc"];_AVCodecParameters_codec_tag=Module["_AVCodecParameters_codec_tag"]=wasmExports["Yc"];_AVCodecParameters_codec_tag_s=Module["_AVCodecParameters_codec_tag_s"]=wasmExports["Zc"];_AVCodecParameters_codec_type=Module["_AVCodecParameters_codec_type"]=wasmExports["_c"];_AVCodecParameters_codec_type_s=Module["_AVCodecParameters_codec_type_s"]=wasmExports["$c"];_AVCodecParameters_extradata=Module["_AVCodecParameters_extradata"]=wasmExports["ad"];_AVCodecParameters_extradata_s=Module["_AVCodecParameters_extradata_s"]=wasmExports["bd"];_AVCodecParameters_extradata_size=Module["_AVCodecParameters_extradata_size"]=wasmExports["cd"];_AVCodecParameters_extradata_size_s=Module["_AVCodecParameters_extradata_size_s"]=wasmExports["dd"];_AVCodecParameters_format=Module["_AVCodecParameters_format"]=wasmExports["ed"];_AVCodecParameters_format_s=Module["_AVCodecParameters_format_s"]=wasmExports["fd"];_AVCodecParameters_bit_rate=Module["_AVCodecParameters_bit_rate"]=wasmExports["gd"];_AVCodecParameters_bit_rate_s=Module["_AVCodecParameters_bit_rate_s"]=wasmExports["hd"];_AVCodecParameters_profile=Module["_AVCodecParameters_profile"]=wasmExports["id"];_AVCodecParameters_profile_s=Module["_AVCodecParameters_profile_s"]=wasmExports["jd"];_AVCodecParameters_level=Module["_AVCodecParameters_level"]=wasmExports["kd"];_AVCodecParameters_level_s=Module["_AVCodecParameters_level_s"]=wasmExports["ld"];_AVCodecParameters_width=Module["_AVCodecParameters_width"]=wasmExports["md"];_AVCodecParameters_width_s=Module["_AVCodecParameters_width_s"]=wasmExports["nd"];_AVCodecParameters_height=Module["_AVCodecParameters_height"]=wasmExports["od"];_AVCodecParameters_height_s=Module["_AVCodecParameters_height_s"]=wasmExports["pd"];_AVCodecParameters_color_range=Module["_AVCodecParameters_color_range"]=wasmExports["qd"];_AVCodecParameters_color_range_s=Module["_AVCodecParameters_color_range_s"]=wasmExports["rd"];_AVCodecParameters_color_primaries=Module["_AVCodecParameters_color_primaries"]=wasmExports["sd"];_AVCodecParameters_color_primaries_s=Module["_AVCodecParameters_color_primaries_s"]=wasmExports["td"];_AVCodecParameters_color_trc=Module["_AVCodecParameters_color_trc"]=wasmExports["ud"];_AVCodecParameters_color_trc_s=Module["_AVCodecParameters_color_trc_s"]=wasmExports["vd"];_AVCodecParameters_color_space=Module["_AVCodecParameters_color_space"]=wasmExports["wd"];_AVCodecParameters_color_space_s=Module["_AVCodecParameters_color_space_s"]=wasmExports["xd"];_AVCodecParameters_chroma_location=Module["_AVCodecParameters_chroma_location"]=wasmExports["yd"];_AVCodecParameters_chroma_location_s=Module["_AVCodecParameters_chroma_location_s"]=wasmExports["zd"];_AVCodecParameters_sample_rate=Module["_AVCodecParameters_sample_rate"]=wasmExports["Ad"];_AVCodecParameters_sample_rate_s=Module["_AVCodecParameters_sample_rate_s"]=wasmExports["Bd"];_AVCodecParameters_coded_side_data=Module["_AVCodecParameters_coded_side_data"]=wasmExports["Cd"];_AVCodecParameters_coded_side_data_s=Module["_AVCodecParameters_coded_side_data_s"]=wasmExports["Dd"];_AVCodecParameters_nb_coded_side_data=Module["_AVCodecParameters_nb_coded_side_data"]=wasmExports["Ed"];_AVCodecParameters_nb_coded_side_data_s=Module["_AVCodecParameters_nb_coded_side_data_s"]=wasmExports["Fd"];_AVCodecParameters_framerate_num=Module["_AVCodecParameters_framerate_num"]=wasmExports["Gd"];_AVCodecParameters_framerate_den=Module["_AVCodecParameters_framerate_den"]=wasmExports["Hd"];_AVCodecParameters_framerate_num_s=Module["_AVCodecParameters_framerate_num_s"]=wasmExports["Id"];_AVCodecParameters_framerate_den_s=Module["_AVCodecParameters_framerate_den_s"]=wasmExports["Jd"];_AVCodecParameters_framerate_s=Module["_AVCodecParameters_framerate_s"]=wasmExports["Kd"];_AVCodecParameters_channel_layoutmask_s=Module["_AVCodecParameters_channel_layoutmask_s"]=wasmExports["Ld"];_AVCodecParameters_channel_layoutmask=Module["_AVCodecParameters_channel_layoutmask"]=wasmExports["Md"];_AVCodecParameters_channels=Module["_AVCodecParameters_channels"]=wasmExports["Nd"];_AVCodecParameters_channels_s=Module["_AVCodecParameters_channels_s"]=wasmExports["Od"];_AVCodecParameters_ch_layout_nb_channels=Module["_AVCodecParameters_ch_layout_nb_channels"]=wasmExports["Pd"];_AVCodecParameters_ch_layout_nb_channels_s=Module["_AVCodecParameters_ch_layout_nb_channels_s"]=wasmExports["Qd"];_ff_codecpar_new_side_data=Module["_ff_codecpar_new_side_data"]=wasmExports["Rd"];_AVPacket_data=Module["_AVPacket_data"]=wasmExports["Sd"];_AVPacket_data_s=Module["_AVPacket_data_s"]=wasmExports["Td"];_AVPacket_dts=Module["_AVPacket_dts"]=wasmExports["Ud"];_AVPacket_dtshi=Module["_AVPacket_dtshi"]=wasmExports["Vd"];_AVPacket_dts_s=Module["_AVPacket_dts_s"]=wasmExports["Wd"];_AVPacket_dtshi_s=Module["_AVPacket_dtshi_s"]=wasmExports["Xd"];_AVPacket_duration=Module["_AVPacket_duration"]=wasmExports["Yd"];_AVPacket_durationhi=Module["_AVPacket_durationhi"]=wasmExports["Zd"];_AVPacket_duration_s=Module["_AVPacket_duration_s"]=wasmExports["_d"];_AVPacket_durationhi_s=Module["_AVPacket_durationhi_s"]=wasmExports["$d"];_AVPacket_flags=Module["_AVPacket_flags"]=wasmExports["ae"];_AVPacket_flags_s=Module["_AVPacket_flags_s"]=wasmExports["be"];_AVPacket_pos=Module["_AVPacket_pos"]=wasmExports["ce"];_AVPacket_poshi=Module["_AVPacket_poshi"]=wasmExports["de"];_AVPacket_pos_s=Module["_AVPacket_pos_s"]=wasmExports["ee"];_AVPacket_poshi_s=Module["_AVPacket_poshi_s"]=wasmExports["fe"];_AVPacket_pts=Module["_AVPacket_pts"]=wasmExports["ge"];_AVPacket_ptshi=Module["_AVPacket_ptshi"]=wasmExports["he"];_AVPacket_pts_s=Module["_AVPacket_pts_s"]=wasmExports["ie"];_AVPacket_ptshi_s=Module["_AVPacket_ptshi_s"]=wasmExports["je"];_AVPacket_side_data=Module["_AVPacket_side_data"]=wasmExports["ke"];_AVPacket_side_data_s=Module["_AVPacket_side_data_s"]=wasmExports["le"];_AVPacket_side_data_elems=Module["_AVPacket_side_data_elems"]=wasmExports["me"];_AVPacket_side_data_elems_s=Module["_AVPacket_side_data_elems_s"]=wasmExports["ne"];_AVPacket_size=Module["_AVPacket_size"]=wasmExports["oe"];_AVPacket_size_s=Module["_AVPacket_size_s"]=wasmExports["pe"];_AVPacket_stream_index=Module["_AVPacket_stream_index"]=wasmExports["qe"];_AVPacket_stream_index_s=Module["_AVPacket_stream_index_s"]=wasmExports["re"];_AVPacket_time_base_num=Module["_AVPacket_time_base_num"]=wasmExports["se"];_AVPacket_time_base_den=Module["_AVPacket_time_base_den"]=wasmExports["te"];_AVPacket_time_base_num_s=Module["_AVPacket_time_base_num_s"]=wasmExports["ue"];_AVPacket_time_base_den_s=Module["_AVPacket_time_base_den_s"]=wasmExports["ve"];_AVPacket_time_base_s=Module["_AVPacket_time_base_s"]=wasmExports["we"];_AVPacketSideData_data=Module["_AVPacketSideData_data"]=wasmExports["xe"];_AVPacketSideData_size=Module["_AVPacketSideData_size"]=wasmExports["ye"];_AVPacketSideData_type=Module["_AVPacketSideData_type"]=wasmExports["ze"];_avcodec_open2_js=Module["_avcodec_open2_js"]=wasmExports["Ae"];_avcodec_open2=Module["_avcodec_open2"]=wasmExports["Be"];_av_packet_rescale_ts_js=Module["_av_packet_rescale_ts_js"]=wasmExports["Ce"];_LIBAVCODEC_VERSION_INT=Module["_LIBAVCODEC_VERSION_INT"]=wasmExports["De"];_AVFormatContext_duration=Module["_AVFormatContext_duration"]=wasmExports["Ee"];_AVFormatContext_durationhi=Module["_AVFormatContext_durationhi"]=wasmExports["Fe"];_AVFormatContext_duration_s=Module["_AVFormatContext_duration_s"]=wasmExports["Ge"];_AVFormatContext_durationhi_s=Module["_AVFormatContext_durationhi_s"]=wasmExports["He"];_AVFormatContext_flags=Module["_AVFormatContext_flags"]=wasmExports["Ie"];_AVFormatContext_flags_s=Module["_AVFormatContext_flags_s"]=wasmExports["Je"];_AVFormatContext_nb_streams=Module["_AVFormatContext_nb_streams"]=wasmExports["Ke"];_AVFormatContext_nb_streams_s=Module["_AVFormatContext_nb_streams_s"]=wasmExports["Le"];_AVFormatContext_oformat=Module["_AVFormatContext_oformat"]=wasmExports["Me"];_AVFormatContext_oformat_s=Module["_AVFormatContext_oformat_s"]=wasmExports["Ne"];_AVFormatContext_pb=Module["_AVFormatContext_pb"]=wasmExports["Oe"];_AVFormatContext_pb_s=Module["_AVFormatContext_pb_s"]=wasmExports["Pe"];_AVFormatContext_start_time=Module["_AVFormatContext_start_time"]=wasmExports["Qe"];_AVFormatContext_start_timehi=Module["_AVFormatContext_start_timehi"]=wasmExports["Re"];_AVFormatContext_start_time_s=Module["_AVFormatContext_start_time_s"]=wasmExports["Se"];_AVFormatContext_start_timehi_s=Module["_AVFormatContext_start_timehi_s"]=wasmExports["Te"];_AVFormatContext_streams_a=Module["_AVFormatContext_streams_a"]=wasmExports["Ue"];_AVFormatContext_streams_a_s=Module["_AVFormatContext_streams_a_s"]=wasmExports["Ve"];_AVStream_codecpar=Module["_AVStream_codecpar"]=wasmExports["We"];_AVStream_codecpar_s=Module["_AVStream_codecpar_s"]=wasmExports["Xe"];_AVStream_discard=Module["_AVStream_discard"]=wasmExports["Ye"];_AVStream_discard_s=Module["_AVStream_discard_s"]=wasmExports["Ze"];_AVStream_duration=Module["_AVStream_duration"]=wasmExports["_e"];_AVStream_durationhi=Module["_AVStream_durationhi"]=wasmExports["$e"];_AVStream_duration_s=Module["_AVStream_duration_s"]=wasmExports["af"];_AVStream_durationhi_s=Module["_AVStream_durationhi_s"]=wasmExports["bf"];_AVStream_time_base_num=Module["_AVStream_time_base_num"]=wasmExports["cf"];_AVStream_time_base_den=Module["_AVStream_time_base_den"]=wasmExports["df"];_AVStream_time_base_num_s=Module["_AVStream_time_base_num_s"]=wasmExports["ef"];_AVStream_time_base_den_s=Module["_AVStream_time_base_den_s"]=wasmExports["ff"];_AVStream_time_base_s=Module["_AVStream_time_base_s"]=wasmExports["gf"];_avformat_seek_file_min=Module["_avformat_seek_file_min"]=wasmExports["hf"];_avformat_seek_file=Module["_avformat_seek_file"]=wasmExports["jf"];_avformat_seek_file_max=Module["_avformat_seek_file_max"]=wasmExports["kf"];_avformat_seek_file_approx=Module["_avformat_seek_file_approx"]=wasmExports["lf"];_avformat_alloc_output_context2_js=Module["_avformat_alloc_output_context2_js"]=wasmExports["mf"];_avformat_open_input_js=Module["_avformat_open_input_js"]=wasmExports["nf"];_avformat_open_input=Module["_avformat_open_input"]=wasmExports["of"];_avio_open2_js=Module["_avio_open2_js"]=wasmExports["pf"];_LIBAVFORMAT_VERSION_INT=Module["_LIBAVFORMAT_VERSION_INT"]=wasmExports["qf"];_libavjs_with_swscale=Module["_libavjs_with_swscale"]=wasmExports["rf"];_libavjs_create_main_thread=Module["_libavjs_create_main_thread"]=wasmExports["sf"];_ff_error=Module["_ff_error"]=wasmExports["tf"];_mallinfo_uordblks=Module["_mallinfo_uordblks"]=wasmExports["uf"];_LIBAVUTIL_VERSION_INT=Module["_LIBAVUTIL_VERSION_INT"]=wasmExports["vf"];_av_strdup=Module["_av_strdup"]=wasmExports["wf"];_av_dict_free=Module["_av_dict_free"]=wasmExports["xf"];_av_frame_alloc=Module["_av_frame_alloc"]=wasmExports["yf"];_av_frame_free=Module["_av_frame_free"]=wasmExports["zf"];_av_frame_unref=Module["_av_frame_unref"]=wasmExports["Af"];_av_frame_get_buffer=Module["_av_frame_get_buffer"]=wasmExports["Bf"];_av_frame_ref=Module["_av_frame_ref"]=wasmExports["Cf"];_av_frame_clone=Module["_av_frame_clone"]=wasmExports["Df"];_av_frame_make_writable=Module["_av_frame_make_writable"]=wasmExports["Ef"];_av_log_get_level=Module["_av_log_get_level"]=wasmExports["Ff"];_av_log_set_level=Module["_av_log_set_level"]=wasmExports["Gf"];_free=Module["_free"]=wasmExports["Hf"];_malloc=Module["_malloc"]=wasmExports["If"];_av_opt_set=Module["_av_opt_set"]=wasmExports["Jf"];_av_get_sample_fmt_name=Module["_av_get_sample_fmt_name"]=wasmExports["Kf"];_av_pix_fmt_desc_get=Module["_av_pix_fmt_desc_get"]=wasmExports["Lf"];_open=Module["_open"]=wasmExports["Mf"];_av_get_bytes_per_sample=Module["_av_get_bytes_per_sample"]=wasmExports["Nf"];_avformat_free_context=Module["_avformat_free_context"]=wasmExports["Of"];_av_find_best_stream=Module["_av_find_best_stream"]=wasmExports["Pf"];_avio_close=Module["_avio_close"]=wasmExports["Qf"];_avio_flush=Module["_avio_flush"]=wasmExports["Rf"];_avformat_alloc_context=Module["_avformat_alloc_context"]=wasmExports["Sf"];_av_packet_unref=Module["_av_packet_unref"]=wasmExports["Tf"];_avcodec_free_context=Module["_avcodec_free_context"]=wasmExports["Uf"];_avcodec_parameters_free=Module["_avcodec_parameters_free"]=wasmExports["Vf"];_av_packet_free=Module["_av_packet_free"]=wasmExports["Wf"];_avformat_new_stream=Module["_avformat_new_stream"]=wasmExports["Xf"];_avcodec_parameters_copy=Module["_avcodec_parameters_copy"]=wasmExports["Yf"];_av_packet_ref=Module["_av_packet_ref"]=wasmExports["Zf"];_avcodec_find_decoder=Module["_avcodec_find_decoder"]=wasmExports["_f"];_avcodec_descriptor_get=Module["_avcodec_descriptor_get"]=wasmExports["$f"];_avcodec_parameters_to_context=Module["_avcodec_parameters_to_context"]=wasmExports["ag"];_avformat_close_input=Module["_avformat_close_input"]=wasmExports["bg"];_av_read_frame=Module["_av_read_frame"]=wasmExports["cg"];_avcodec_get_name=Module["_avcodec_get_name"]=wasmExports["dg"];_av_packet_new_side_data=Module["_av_packet_new_side_data"]=wasmExports["eg"];_avformat_find_stream_info=Module["_avformat_find_stream_info"]=wasmExports["fg"];_avcodec_parameters_from_context=Module["_avcodec_parameters_from_context"]=wasmExports["gg"];_avcodec_find_decoder_by_name=Module["_avcodec_find_decoder_by_name"]=wasmExports["hg"];_avcodec_send_packet=Module["_avcodec_send_packet"]=wasmExports["ig"];_avcodec_receive_frame=Module["_avcodec_receive_frame"]=wasmExports["jg"];_avcodec_alloc_context3=Module["_avcodec_alloc_context3"]=wasmExports["kg"];_avcodec_parameters_alloc=Module["_avcodec_parameters_alloc"]=wasmExports["lg"];_av_find_input_format=Module["_av_find_input_format"]=wasmExports["mg"];_av_shrink_packet=Module["_av_shrink_packet"]=wasmExports["ng"];_av_packet_alloc=Module["_av_packet_alloc"]=wasmExports["og"];_avformat_write_header=Module["_avformat_write_header"]=wasmExports["pg"];_av_write_frame=Module["_av_write_frame"]=wasmExports["qg"];_av_interleaved_write_frame=Module["_av_interleaved_write_frame"]=wasmExports["rg"];_av_write_trailer=Module["_av_write_trailer"]=wasmExports["sg"];_close=Module["_close"]=wasmExports["tg"];_av_seek_frame=Module["_av_seek_frame"]=wasmExports["ug"];_avformat_flush=Module["_avformat_flush"]=wasmExports["vg"];_av_grow_packet=Module["_av_grow_packet"]=wasmExports["wg"];_avcodec_find_encoder=Module["_avcodec_find_encoder"]=wasmExports["xg"];_avcodec_find_encoder_by_name=Module["_avcodec_find_encoder_by_name"]=wasmExports["yg"];_avcodec_flush_buffers=Module["_avcodec_flush_buffers"]=wasmExports["zg"];_av_packet_make_writable=Module["_av_packet_make_writable"]=wasmExports["Ag"];_avcodec_descriptor_next=Module["_avcodec_descriptor_next"]=wasmExports["Cg"];_avcodec_descriptor_get_by_name=Module["_avcodec_descriptor_get_by_name"]=wasmExports["Dg"];_avcodec_send_frame=Module["_avcodec_send_frame"]=wasmExports["Eg"];_avcodec_receive_packet=Module["_avcodec_receive_packet"]=wasmExports["Fg"];_av_packet_clone=Module["_av_packet_clone"]=wasmExports["Gg"];_sws_scale_frame=Module["_sws_scale_frame"]=wasmExports["Hg"];_sws_getContext=Module["_sws_getContext"]=wasmExports["Ig"];_sws_freeContext=Module["_sws_freeContext"]=wasmExports["Jg"];_calloc=Module["_calloc"]=wasmExports["Kg"];_emfiberthreads_timeout_expiry=Module["_emfiberthreads_timeout_expiry"]=wasmExports["Lg"];_dup2=Module["_dup2"]=wasmExports["Mg"];_strerror=Module["_strerror"]=wasmExports["Ng"];__emscripten_tempret_set=wasmExports["Og"];_emscripten_stack_set_limits=wasmExports["Pg"];__emscripten_stack_restore=wasmExports["Qg"];__emscripten_stack_alloc=wasmExports["Rg"];_emscripten_stack_get_current=wasmExports["Sg"];dynCall_iiii=dynCalls["iiii"]=wasmExports["Tg"];dynCall_ii=dynCalls["ii"]=wasmExports["Ug"];dynCall_viiii=dynCalls["viiii"]=wasmExports["Vg"];dynCall_dd=dynCalls["dd"]=wasmExports["Wg"];dynCall_iiiiii=dynCalls["iiiiii"]=wasmExports["Xg"];dynCall_iii=dynCalls["iii"]=wasmExports["Yg"];dynCall_vii=dynCalls["vii"]=wasmExports["Zg"];dynCall_jiji=dynCalls["jiji"]=wasmExports["_g"];dynCall_v=dynCalls["v"]=wasmExports["$g"];dynCall_vi=dynCalls["vi"]=wasmExports["ah"];dynCall_viiiiii=dynCalls["viiiiii"]=wasmExports["bh"];dynCall_iiiji=dynCalls["iiiji"]=wasmExports["ch"];dynCall_jiiij=dynCalls["jiiij"]=wasmExports["dh"];dynCall_iiiii=dynCalls["iiiii"]=wasmExports["eh"];dynCall_jiiji=dynCalls["jiiji"]=wasmExports["fh"];dynCall_iiijiiii=dynCalls["iiijiiii"]=wasmExports["gh"];dynCall_viiiii=dynCalls["viiiii"]=wasmExports["hh"];dynCall_viiiiiifi=dynCalls["viiiiiifi"]=wasmExports["ih"];dynCall_viii=dynCalls["viii"]=wasmExports["jh"];dynCall_iiiiiii=dynCalls["iiiiiii"]=wasmExports["kh"];dynCall_viifi=dynCalls["viifi"]=wasmExports["lh"];dynCall_diii=dynCalls["diii"]=wasmExports["mh"];dynCall_fiii=dynCalls["fiii"]=wasmExports["nh"];dynCall_viidi=dynCalls["viidi"]=wasmExports["oh"];dynCall_viiiiiiii=dynCalls["viiiiiiii"]=wasmExports["ph"];dynCall_ijii=dynCalls["ijii"]=wasmExports["qh"];dynCall_viiiiij=dynCalls["viiiiij"]=wasmExports["rh"];dynCall_viiiiiiiii=dynCalls["viiiiiiiii"]=wasmExports["sh"];dynCall_viiiiiiiiiiiiii=dynCalls["viiiiiiiiiiiiii"]=wasmExports["th"];dynCall_viiiiiiiiiii=dynCalls["viiiiiiiiiii"]=wasmExports["uh"];dynCall_viiiiiii=dynCalls["viiiiiii"]=wasmExports["vh"];dynCall_viiiiiiiiiiii=dynCalls["viiiiiiiiiiii"]=wasmExports["wh"];dynCall_viiiifii=dynCalls["viiiifii"]=wasmExports["xh"];dynCall_fii=dynCalls["fii"]=wasmExports["yh"];dynCall_viiiiiiiiii=dynCalls["viiiiiiiiii"]=wasmExports["zh"];dynCall_iidiiii=dynCalls["iidiiii"]=wasmExports["Ah"];dynCall_vddi=dynCalls["vddi"]=wasmExports["Bh"];dynCall_iiiiiiii=dynCalls["iiiiiiii"]=wasmExports["Ch"];dynCall_viiiij=dynCalls["viiiij"]=wasmExports["Dh"];dynCall_viiij=dynCalls["viiij"]=wasmExports["Eh"];_asyncify_start_unwind=wasmExports["Fh"];_asyncify_stop_unwind=wasmExports["Gh"];_asyncify_start_rewind=wasmExports["Hh"];_asyncify_stop_rewind=wasmExports["Ih"];memory=wasmMemory=wasmExports["I"];__indirect_function_table=wasmExports["__indirect_function_table"];_ff_h264_cabac_tables=Module["_ff_h264_cabac_tables"]=wasmExports["Bg"].value}var wasmImports={a:___assert_fail,o:___syscall_dup3,F:___syscall_faccessat,d:___syscall_fcntl64,D:___syscall_fstat64,u:___syscall_getdents64,h:___syscall_ioctl,A:___syscall_lstat64,B:___syscall_newfstatat,v:___syscall_openat,t:___syscall_renameat,s:___syscall_rmdir,C:___syscall_stat64,q:___syscall_unlinkat,G:__abort_js,j:__gmtime_js,k:__localtime_js,w:__tzset_js,m:_clock_time_get,i:_emscripten_asm_const_int,E:_emscripten_date_now,n:_emscripten_fiber_swap,r:_emscripten_get_heap_max,f:_emscripten_get_now,p:_emscripten_resize_heap,y:_environ_get,z:_environ_sizes_get,c:_fd_close,g:_fd_fdstat_get,e:_fd_read,l:_fd_seek,b:_fd_write,x:libavjs_wait_reader,H:writeoutEmscriptenOOM};function run(){if(runDependencies>0){dependenciesFulfilled=run;return}preRun();if(runDependencies>0){dependenciesFulfilled=run;return}function doRun(){Module["calledRun"]=true;if(ABORT)return;initRuntime();readyPromiseResolve?.(Module);Module["onRuntimeInitialized"]?.();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(()=>{setTimeout(()=>Module["setStatus"](""),1);doRun()},1)}else{doRun()}}var wasmExports;wasmExports=await (createWasm());run();var serializationPromise=null;function serially(f){var p;if(serializationPromise){p=serializationPromise.catch(function(){}).then(function(){return f()})}else{p=f()}serializationPromise=p=p.finally(function(){if(serializationPromise===p)serializationPromise=null});return p}Module.fsThrownError=null;var ERRNO_CODES={EPERM:1,EIO:5,EAGAIN:6,ECANCELED:11,ESPIPE:29};var CAccessors={};var ff_malloc_int32_list=Module.ff_malloc_int32_list=function(list){var ptr=malloc(list.length*4);if(ptr===0)throw new Error("Failed to malloc");var arr=new Uint32Array(Module.HEAPU8.buffer,ptr,list.length);for(var i=0;i<list.length;i++)arr[i]=list[i];return ptr};var ff_malloc_int64_list=Module.ff_malloc_int64_list=function(list){var ptr=malloc(list.length*8);if(ptr===0)throw new Error("Failed to malloc");var arr=new Int32Array(Module.HEAPU8.buffer,ptr,list.length*2);for(var i=0;i<list.length;i++){arr[i*2]=list[i];arr[i*2+1]=list[i]<0?-1:0}return ptr};var ff_malloc_string_array=Module.ff_malloc_string_array=function(arr){var ptr=malloc((arr.length+1)*4);if(ptr===0)throw new Error("Failed to malloc");var inArr=new Uint32Array(Module.HEAPU8.buffer,ptr,arr.length+1);var i;for(i=0;i<arr.length;i++)inArr[i]=av_strdup(arr[i]);inArr[i]=0;return ptr};var ff_free_string_array=Module.ff_free_string_array=function(ptr){var iPtr=ptr/4;for(;;iPtr++){var elPtr=Module.HEAPU32[iPtr];if(!elPtr)break;free(elPtr)}free(ptr)};var calloc=Module.calloc=CAccessors.calloc=Module.cwrap("calloc","number",["number","number"]);var close=Module.close=CAccessors.close=Module.cwrap("close","number",["number"]);var dup2=Module.dup2=CAccessors.dup2=Module.cwrap("dup2","number",["number","number"]);var free=Module.free=CAccessors.free=Module.cwrap("free",null,["number"]);var malloc=Module.malloc=CAccessors.malloc=Module.cwrap("malloc","number",["number"]);var mallinfo_uordblks=Module.mallinfo_uordblks=CAccessors.mallinfo_uordblks=Module.cwrap("mallinfo_uordblks","number",[]);var open=Module.open=CAccessors.open=Module.cwrap("open","number",["string","number","number"]);var strerror=Module.strerror=CAccessors.strerror=Module.cwrap("strerror","string",["number"]);var libavjs_create_main_thread=Module.libavjs_create_main_thread=CAccessors.libavjs_create_main_thread=Module.cwrap("libavjs_create_main_thread","number",[]);var libavjs_with_swscale=Module.libavjs_with_swscale=CAccessors.libavjs_with_swscale=Module.cwrap("libavjs_with_swscale","number",[]);var copyin_u8=Module.copyin_u8=CAccessors.copyin_u8=function(ptr,arr){var buf=new Uint8Array(Module.HEAPU8.buffer,ptr);buf.set(arr)};var copyout_u8=Module.copyout_u8=CAccessors.copyout_u8=function(ptr,len){var ret=new Uint8Array(Module.HEAPU8.buffer,ptr,len).slice(0);ret.libavjsTransfer=[ret.buffer];return ret};var copyin_s16=Module.copyin_s16=CAccessors.copyin_s16=function(ptr,arr){var buf=new Int16Array(Module.HEAPU8.buffer,ptr);buf.set(arr)};var copyout_s16=Module.copyout_s16=CAccessors.copyout_s16=function(ptr,len){var ret=new Int16Array(Module.HEAPU8.buffer,ptr,len).slice(0);ret.libavjsTransfer=[ret.buffer];return ret};var copyin_s32=Module.copyin_s32=CAccessors.copyin_s32=function(ptr,arr){var buf=new Int32Array(Module.HEAPU8.buffer,ptr);buf.set(arr)};var copyout_s32=Module.copyout_s32=CAccessors.copyout_s32=function(ptr,len){var ret=new Int32Array(Module.HEAPU8.buffer,ptr,len).slice(0);ret.libavjsTransfer=[ret.buffer];return ret};var copyin_f32=Module.copyin_f32=CAccessors.copyin_f32=function(ptr,arr){var buf=new Float32Array(Module.HEAPU8.buffer,ptr);buf.set(arr)};var copyout_f32=Module.copyout_f32=CAccessors.copyout_f32=function(ptr,len){var ret=new Float32Array(Module.HEAPU8.buffer,ptr,len).slice(0);ret.libavjsTransfer=[ret.buffer];return ret};var av_compare_ts_js=Module.av_compare_ts_js=CAccessors.av_compare_ts_js=Module.cwrap("av_compare_ts_js","number",["number","number","number","number","number","number","number","number"]);var av_dict_copy_js=Module.av_dict_copy_js=CAccessors.av_dict_copy_js=Module.cwrap("av_dict_copy_js","number",["number","number","number"]);var av_dict_free=Module.av_dict_free=CAccessors.av_dict_free=Module.cwrap("av_dict_free",null,["number"]);var av_dict_set_js=Module.av_dict_set_js=CAccessors.av_dict_set_js=Module.cwrap("av_dict_set_js","number",["number","string","string","number"]);var av_log_get_level=Module.av_log_get_level=CAccessors.av_log_get_level=Module.cwrap("av_log_get_level","number",[]);var av_log_set_level=Module.av_log_set_level=CAccessors.av_log_set_level=Module.cwrap("av_log_set_level",null,["number"]);var av_opt_set=Module.av_opt_set=CAccessors.av_opt_set=Module.cwrap("av_opt_set","number",["number","string","string","number"]);var av_opt_set_int_list_js=Module.av_opt_set_int_list_js=CAccessors.av_opt_set_int_list_js=Module.cwrap("av_opt_set_int_list_js","number",["number","string","number","number","number","number"]);var av_strdup=Module.av_strdup=CAccessors.av_strdup=Module.cwrap("av_strdup","number",["string"]);var ff_error=Module.ff_error=CAccessors.ff_error=Module.cwrap("ff_error","string",["number"]);var ff_nothing=Module.ff_nothing=CAccessors.ff_nothing=Module.cwrap("ff_nothing",null,[],{async:true});Module.ff_nothing=function(){var args=arguments;return serially(function(){return ff_nothing.apply(void 0,args)})};var LIBAVUTIL_VERSION_INT=Module.LIBAVUTIL_VERSION_INT=CAccessors.LIBAVUTIL_VERSION_INT=Module.cwrap("LIBAVUTIL_VERSION_INT","number",[]);var av_dict_free_js=Module.av_dict_free_js=CAccessors.av_dict_free_js=function(p){var p2=malloc(4);if(p2===0)throw new Error("Could not malloc");new Uint32Array(Module.HEAPU8.buffer,p2,1)[0]=p;CAccessors.av_dict_free(p2);free(p2)};var av_find_best_stream=Module.av_find_best_stream=CAccessors.av_find_best_stream=Module.cwrap("av_find_best_stream","number",["number","number","number","number","number","number"]);var av_find_input_format=Module.av_find_input_format=CAccessors.av_find_input_format=Module.cwrap("av_find_input_format","number",["string"]);var avformat_alloc_context=Module.avformat_alloc_context=CAccessors.avformat_alloc_context=Module.cwrap("avformat_alloc_context","number",[]);var avformat_alloc_output_context2_js=Module.avformat_alloc_output_context2_js=CAccessors.avformat_alloc_output_context2_js=Module.cwrap("avformat_alloc_output_context2_js","number",["number","string","string"]);var avformat_close_input=Module.avformat_close_input=CAccessors.avformat_close_input=Module.cwrap("avformat_close_input",null,["number"]);var avformat_find_stream_info=Module.avformat_find_stream_info=CAccessors.avformat_find_stream_info=Module.cwrap("avformat_find_stream_info","number",["number","number"],{async:true});var avformat_find_stream_info__raw=avformat_find_stream_info;avformat_find_stream_info=Module.avformat_find_stream_info=function(){var args=arguments;var ret=avformat_find_stream_info__raw.apply(void 0,args);if(ret===-11)throw Module.fsThrownError;else if(ret&&ret.then){return ret.then(function(ret){if(ret===-11)throw Module.fsThrownError;return ret})}return ret};Module.avformat_find_stream_info=function(){var args=arguments;return serially(function(){return avformat_find_stream_info.apply(void 0,args)})};var avformat_flush=Module.avformat_flush=CAccessors.avformat_flush=Module.cwrap("avformat_flush","number",["number"]);var avformat_free_context=Module.avformat_free_context=CAccessors.avformat_free_context=Module.cwrap("avformat_free_context",null,["number"]);var avformat_new_stream=Module.avformat_new_stream=CAccessors.avformat_new_stream=Module.cwrap("avformat_new_stream","number",["number","number"]);var avformat_open_input=Module.avformat_open_input=CAccessors.avformat_open_input=Module.cwrap("avformat_open_input","number",["number","string","number","number"],{async:true});var avformat_open_input__raw=avformat_open_input;avformat_open_input=Module.avformat_open_input=function(){var args=arguments;var ret=avformat_open_input__raw.apply(void 0,args);if(ret===-11)throw Module.fsThrownError;else if(ret&&ret.then){return ret.then(function(ret){if(ret===-11)throw Module.fsThrownError;return ret})}return ret};Module.avformat_open_input=function(){var args=arguments;return serially(function(){return avformat_open_input.apply(void 0,args)})};var avformat_open_input_js=Module.avformat_open_input_js=CAccessors.avformat_open_input_js=Module.cwrap("avformat_open_input_js","number",["string","number","number"],{async:true});var avformat_open_input_js__raw=avformat_open_input_js;avformat_open_input_js=Module.avformat_open_input_js=function(){var args=arguments;var ret=avformat_open_input_js__raw.apply(void 0,args);if(ret===-11)throw Module.fsThrownError;else if(ret&&ret.then){return ret.then(function(ret){if(ret===-11)throw Module.fsThrownError;return ret})}return ret};Module.avformat_open_input_js=function(){var args=arguments;return serially(function(){return avformat_open_input_js.apply(void 0,args)})};var avformat_seek_file=Module.avformat_seek_file=CAccessors.avformat_seek_file=Module.cwrap("avformat_seek_file","number",["number","number","number","number","number","number"],{async:true});var avformat_seek_file__raw=avformat_seek_file;avformat_seek_file=Module.avformat_seek_file=function(){var args=arguments;var ret=avformat_seek_file__raw.apply(void 0,args);if(ret===-11)throw Module.fsThrownError;else if(ret&&ret.then){return ret.then(function(ret){if(ret===-11)throw Module.fsThrownError;return ret})}return ret};Module.avformat_seek_file=function(){var args=arguments;return serially(function(){return avformat_seek_file.apply(void 0,args)})};var avformat_seek_file_min=Module.avformat_seek_file_min=CAccessors.avformat_seek_file_min=Module.cwrap("avformat_seek_file_min","number",["number","number","number","number"],{async:true});var avformat_seek_file_min__raw=avformat_seek_file_min;avformat_seek_file_min=Module.avformat_seek_file_min=function(){var args=arguments;var ret=avformat_seek_file_min__raw.apply(void 0,args);if(ret===-11)throw Module.fsThrownError;else if(ret&&ret.then){return ret.then(function(ret){if(ret===-11)throw Module.fsThrownError;return ret})}return ret};Module.avformat_seek_file_min=function(){var args=arguments;return serially(function(){return avformat_seek_file_min.apply(void 0,args)})};var avformat_seek_file_max=Module.avformat_seek_file_max=CAccessors.avformat_seek_file_max=Module.cwrap("avformat_seek_file_max","number",["number","number","number","number"],{async:true});var avformat_seek_file_max__raw=avformat_seek_file_max;avformat_seek_file_max=Module.avformat_seek_file_max=function(){var args=arguments;var ret=avformat_seek_file_max__raw.apply(void 0,args);if(ret===-11)throw Module.fsThrownError;else if(ret&&ret.then){return ret.then(function(ret){if(ret===-11)throw Module.fsThrownError;return ret})}return ret};Module.avformat_seek_file_max=function(){var args=arguments;return serially(function(){return avformat_seek_file_max.apply(void 0,args)})};var avformat_seek_file_approx=Module.avformat_seek_file_approx=CAccessors.avformat_seek_file_approx=Module.cwrap("avformat_seek_file_approx","number",["number","number","number","number"],{async:true});var avformat_seek_file_approx__raw=avformat_seek_file_approx;avformat_seek_file_approx=Module.avformat_seek_file_approx=function(){var args=arguments;var ret=avformat_seek_file_approx__raw.apply(void 0,args);if(ret===-11)throw Module.fsThrownError;else if(ret&&ret.then){return ret.then(function(ret){if(ret===-11)throw Module.fsThrownError;return ret})}return ret};Module.avformat_seek_file_approx=function(){var args=arguments;return serially(function(){return avformat_seek_file_approx.apply(void 0,args)})};var avformat_write_header=Module.avformat_write_header=CAccessors.avformat_write_header=Module.cwrap("avformat_write_header","number",["number","number"]);var av_interleaved_write_frame=Module.av_interleaved_write_frame=CAccessors.av_interleaved_write_frame=Module.cwrap("av_interleaved_write_frame","number",["number","number"]);var avio_open2_js=Module.avio_open2_js=CAccessors.avio_open2_js=Module.cwrap("avio_open2_js","number",["string","number","number","number"]);var avio_close=Module.avio_close=CAccessors.avio_close=Module.cwrap("avio_close","number",["number"]);var avio_flush=Module.avio_flush=CAccessors.avio_flush=Module.cwrap("avio_flush",null,["number"]);var av_read_frame=Module.av_read_frame=CAccessors.av_read_frame=Module.cwrap("av_read_frame","number",["number","number"],{async:true});var av_read_frame__raw=av_read_frame;av_read_frame=Module.av_read_frame=function(){var args=arguments;var ret=av_read_frame__raw.apply(void 0,args);if(ret===-11)throw Module.fsThrownError;else if(ret&&ret.then){return ret.then(function(ret){if(ret===-11)throw Module.fsThrownError;return ret})}return ret};Module.av_read_frame=function(){var args=arguments;return serially(function(){return av_read_frame.apply(void 0,args)})};var av_seek_frame=Module.av_seek_frame=CAccessors.av_seek_frame=Module.cwrap("av_seek_frame","number",["number","number","number","number"],{async:true});var av_seek_frame__raw=av_seek_frame;av_seek_frame=Module.av_seek_frame=function(){var args=arguments;var ret=av_seek_frame__raw.apply(void 0,args);if(ret===-11)throw Module.fsThrownError;else if(ret&&ret.then){return ret.then(function(ret){if(ret===-11)throw Module.fsThrownError;return ret})}return ret};Module.av_seek_frame=function(){var args=arguments;return serially(function(){return av_seek_frame.apply(void 0,args)})};var av_write_frame=Module.av_write_frame=CAccessors.av_write_frame=Module.cwrap("av_write_frame","number",["number","number"]);var av_write_trailer=Module.av_write_trailer=CAccessors.av_write_trailer=Module.cwrap("av_write_trailer","number",["number"]);var LIBAVFORMAT_VERSION_INT=Module.LIBAVFORMAT_VERSION_INT=CAccessors.LIBAVFORMAT_VERSION_INT=Module.cwrap("LIBAVFORMAT_VERSION_INT","number",[]);var AVFormatContext_duration=Module.AVFormatContext_duration=CAccessors.AVFormatContext_duration=Module.cwrap("AVFormatContext_duration","number",["number"]);var AVFormatContext_duration_s=Module.AVFormatContext_duration_s=CAccessors.AVFormatContext_duration_s=Module.cwrap("AVFormatContext_duration_s",null,["number","number"]);var AVFormatContext_durationhi=Module.AVFormatContext_durationhi=CAccessors.AVFormatContext_durationhi=Module.cwrap("AVFormatContext_durationhi","number",["number"]);var AVFormatContext_durationhi_s=Module.AVFormatContext_durationhi_s=CAccessors.AVFormatContext_durationhi_s=Module.cwrap("AVFormatContext_durationhi_s",null,["number","number"]);var AVFormatContext_flags=Module.AVFormatContext_flags=CAccessors.AVFormatContext_flags=Module.cwrap("AVFormatContext_flags","number",["number"]);var AVFormatContext_flags_s=Module.AVFormatContext_flags_s=CAccessors.AVFormatContext_flags_s=Module.cwrap("AVFormatContext_flags_s",null,["number","number"]);var AVFormatContext_nb_streams=Module.AVFormatContext_nb_streams=CAccessors.AVFormatContext_nb_streams=Module.cwrap("AVFormatContext_nb_streams","number",["number"]);var AVFormatContext_nb_streams_s=Module.AVFormatContext_nb_streams_s=CAccessors.AVFormatContext_nb_streams_s=Module.cwrap("AVFormatContext_nb_streams_s",null,["number","number"]);var AVFormatContext_oformat=Module.AVFormatContext_oformat=CAccessors.AVFormatContext_oformat=Module.cwrap("AVFormatContext_oformat","number",["number"]);var AVFormatContext_oformat_s=Module.AVFormatContext_oformat_s=CAccessors.AVFormatContext_oformat_s=Module.cwrap("AVFormatContext_oformat_s",null,["number","number"]);var AVFormatContext_pb=Module.AVFormatContext_pb=CAccessors.AVFormatContext_pb=Module.cwrap("AVFormatContext_pb","number",["number"]);var AVFormatContext_pb_s=Module.AVFormatContext_pb_s=CAccessors.AVFormatContext_pb_s=Module.cwrap("AVFormatContext_pb_s",null,["number","number"]);var AVFormatContext_start_time=Module.AVFormatContext_start_time=CAccessors.AVFormatContext_start_time=Module.cwrap("AVFormatContext_start_time","number",["number"]);var AVFormatContext_start_time_s=Module.AVFormatContext_start_time_s=CAccessors.AVFormatContext_start_time_s=Module.cwrap("AVFormatContext_start_time_s",null,["number","number"]);var AVFormatContext_start_timehi=Module.AVFormatContext_start_timehi=CAccessors.AVFormatContext_start_timehi=Module.cwrap("AVFormatContext_start_timehi","number",["number"]);var AVFormatContext_start_timehi_s=Module.AVFormatContext_start_timehi_s=CAccessors.AVFormatContext_start_timehi_s=Module.cwrap("AVFormatContext_start_timehi_s",null,["number","number"]);var AVFormatContext_streams_a=Module.AVFormatContext_streams_a=CAccessors.AVFormatContext_streams_a=Module.cwrap("AVFormatContext_streams_a","number",["number","number"]);var AVFormatContext_streams_a_s=Module.AVFormatContext_streams_a_s=CAccessors.AVFormatContext_streams_a_s=Module.cwrap("AVFormatContext_streams_a_s",null,["number","number","number"]);var AVStream_codecpar=Module.AVStream_codecpar=CAccessors.AVStream_codecpar=Module.cwrap("AVStream_codecpar","number",["number"]);var AVStream_codecpar_s=Module.AVStream_codecpar_s=CAccessors.AVStream_codecpar_s=Module.cwrap("AVStream_codecpar_s",null,["number","number"]);var AVStream_discard=Module.AVStream_discard=CAccessors.AVStream_discard=Module.cwrap("AVStream_discard","number",["number"]);var AVStream_discard_s=Module.AVStream_discard_s=CAccessors.AVStream_discard_s=Module.cwrap("AVStream_discard_s",null,["number","number"]);var AVStream_duration=Module.AVStream_duration=CAccessors.AVStream_duration=Module.cwrap("AVStream_duration","number",["number"]);var AVStream_duration_s=Module.AVStream_duration_s=CAccessors.AVStream_duration_s=Module.cwrap("AVStream_duration_s",null,["number","number"]);var AVStream_durationhi=Module.AVStream_durationhi=CAccessors.AVStream_durationhi=Module.cwrap("AVStream_durationhi","number",["number"]);var AVStream_durationhi_s=Module.AVStream_durationhi_s=CAccessors.AVStream_durationhi_s=Module.cwrap("AVStream_durationhi_s",null,["number","number"]);var AVStream_time_base_num=Module.AVStream_time_base_num=CAccessors.AVStream_time_base_num=Module.cwrap("AVStream_time_base_num","number",["number"]);var AVStream_time_base_den=Module.AVStream_time_base_den=CAccessors.AVStream_time_base_den=Module.cwrap("AVStream_time_base_den","number",["number"]);var AVStream_time_base_num_s=Module.AVStream_time_base_num_s=CAccessors.AVStream_time_base_num_s=Module.cwrap("AVStream_time_base_num_s",null,["number","number"]);var AVStream_time_base_den_s=Module.AVStream_time_base_den_s=CAccessors.AVStream_time_base_den_s=Module.cwrap("AVStream_time_base_den_s",null,["number","number"]);var AVStream_time_base_s=Module.AVStream_time_base_s=CAccessors.AVStream_time_base_s=Module.cwrap("AVStream_time_base_s",null,["number","number","number"]);var avformat_close_input_js=Module.avformat_close_input_js=CAccessors.avformat_close_input_js=function(p){var p2=malloc(4);if(p2===0)throw new Error("Could not malloc");new Uint32Array(Module.HEAPU8.buffer,p2,1)[0]=p;CAccessors.avformat_close_input(p2);free(p2)};var avcodec_descriptor_get=Module.avcodec_descriptor_get=CAccessors.avcodec_descriptor_get=Module.cwrap("avcodec_descriptor_get","number",["number"]);var avcodec_descriptor_get_by_name=Module.avcodec_descriptor_get_by_name=CAccessors.avcodec_descriptor_get_by_name=Module.cwrap("avcodec_descriptor_get_by_name","number",["string"]);var avcodec_descriptor_next=Module.avcodec_descriptor_next=CAccessors.avcodec_descriptor_next=Module.cwrap("avcodec_descriptor_next","number",["number"]);var av_grow_packet=Module.av_grow_packet=CAccessors.av_grow_packet=Module.cwrap("av_grow_packet","number",["number","number"]);var av_packet_alloc=Module.av_packet_alloc=CAccessors.av_packet_alloc=Module.cwrap("av_packet_alloc","number",[]);var av_packet_clone=Module.av_packet_clone=CAccessors.av_packet_clone=Module.cwrap("av_packet_clone","number",["number"]);var av_packet_free=Module.av_packet_free=CAccessors.av_packet_free=Module.cwrap("av_packet_free",null,["number"]);var av_packet_make_writable=Module.av_packet_make_writable=CAccessors.av_packet_make_writable=Module.cwrap("av_packet_make_writable","number",["number"]);var av_packet_new_side_data=Module.av_packet_new_side_data=CAccessors.av_packet_new_side_data=Module.cwrap("av_packet_new_side_data","number",["number","number","number"]);var av_packet_ref=Module.av_packet_ref=CAccessors.av_packet_ref=Module.cwrap("av_packet_ref","number",["number","number"]);var av_packet_rescale_ts_js=Module.av_packet_rescale_ts_js=CAccessors.av_packet_rescale_ts_js=Module.cwrap("av_packet_rescale_ts_js",null,["number","number","number","number","number"]);var AVPacketSideData_data=Module.AVPacketSideData_data=CAccessors.AVPacketSideData_data=Module.cwrap("AVPacketSideData_data","number",["number","number"]);var AVPacketSideData_size=Module.AVPacketSideData_size=CAccessors.AVPacketSideData_size=Module.cwrap("AVPacketSideData_size","number",["number","number"]);var AVPacketSideData_type=Module.AVPacketSideData_type=CAccessors.AVPacketSideData_type=Module.cwrap("AVPacketSideData_type","number",["number","number"]);var av_packet_unref=Module.av_packet_unref=CAccessors.av_packet_unref=Module.cwrap("av_packet_unref",null,["number"]);var av_shrink_packet=Module.av_shrink_packet=CAccessors.av_shrink_packet=Module.cwrap("av_shrink_packet",null,["number","number"]);var ff_codecpar_new_side_data=Module.ff_codecpar_new_side_data=CAccessors.ff_codecpar_new_side_data=Module.cwrap("ff_codecpar_new_side_data","number",["number","number","number"]);var LIBAVCODEC_VERSION_INT=Module.LIBAVCODEC_VERSION_INT=CAccessors.LIBAVCODEC_VERSION_INT=Module.cwrap("LIBAVCODEC_VERSION_INT","number",[]);var AVCodecDescriptor_id=Module.AVCodecDescriptor_id=CAccessors.AVCodecDescriptor_id=Module.cwrap("AVCodecDescriptor_id","number",["number"]);var AVCodecDescriptor_id_s=Module.AVCodecDescriptor_id_s=CAccessors.AVCodecDescriptor_id_s=Module.cwrap("AVCodecDescriptor_id_s",null,["number","number"]);var AVCodecDescriptor_long_name=Module.AVCodecDescriptor_long_name=CAccessors.AVCodecDescriptor_long_name=Module.cwrap("AVCodecDescriptor_long_name","string",["number"]);var AVCodecDescriptor_mime_types_a=Module.AVCodecDescriptor_mime_types_a=CAccessors.AVCodecDescriptor_mime_types_a=Module.cwrap("AVCodecDescriptor_mime_types_a","number",["number","number"]);var AVCodecDescriptor_mime_types_a_s=Module.AVCodecDescriptor_mime_types_a_s=CAccessors.AVCodecDescriptor_mime_types_a_s=Module.cwrap("AVCodecDescriptor_mime_types_a_s",null,["number","number","number"]);var AVCodecDescriptor_name=Module.AVCodecDescriptor_name=CAccessors.AVCodecDescriptor_name=Module.cwrap("AVCodecDescriptor_name","string",["number"]);var AVCodecDescriptor_props=Module.AVCodecDescriptor_props=CAccessors.AVCodecDescriptor_props=Module.cwrap("AVCodecDescriptor_props","number",["number"]);var AVCodecDescriptor_props_s=Module.AVCodecDescriptor_props_s=CAccessors.AVCodecDescriptor_props_s=Module.cwrap("AVCodecDescriptor_props_s",null,["number","number"]);var AVCodecDescriptor_type=Module.AVCodecDescriptor_type=CAccessors.AVCodecDescriptor_type=Module.cwrap("AVCodecDescriptor_type","number",["number"]);var AVCodecDescriptor_type_s=Module.AVCodecDescriptor_type_s=CAccessors.AVCodecDescriptor_type_s=Module.cwrap("AVCodecDescriptor_type_s",null,["number","number"]);var AVCodecParameters_bit_rate=Module.AVCodecParameters_bit_rate=CAccessors.AVCodecParameters_bit_rate=Module.cwrap("AVCodecParameters_bit_rate","number",["number"]);var AVCodecParameters_bit_rate_s=Module.AVCodecParameters_bit_rate_s=CAccessors.AVCodecParameters_bit_rate_s=Module.cwrap("AVCodecParameters_bit_rate_s",null,["number","number"]);var AVCodecParameters_channel_layoutmask=Module.AVCodecParameters_channel_layoutmask=CAccessors.AVCodecParameters_channel_layoutmask=Module.cwrap("AVCodecParameters_channel_layoutmask","number",["number"]);var AVCodecParameters_channel_layoutmask_s=Module.AVCodecParameters_channel_layoutmask_s=CAccessors.AVCodecParameters_channel_layoutmask_s=Module.cwrap("AVCodecParameters_channel_layoutmask_s",null,["number","number"]);var AVCodecParameters_channels=Module.AVCodecParameters_channels=CAccessors.AVCodecParameters_channels=Module.cwrap("AVCodecParameters_channels","number",["number"]);var AVCodecParameters_channels_s=Module.AVCodecParameters_channels_s=CAccessors.AVCodecParameters_channels_s=Module.cwrap("AVCodecParameters_channels_s",null,["number","number"]);var AVCodecParameters_ch_layout_nb_channels=Module.AVCodecParameters_ch_layout_nb_channels=CAccessors.AVCodecParameters_ch_layout_nb_channels=Module.cwrap("AVCodecParameters_ch_layout_nb_channels","number",["number"]);var AVCodecParameters_ch_layout_nb_channels_s=Module.AVCodecParameters_ch_layout_nb_channels_s=CAccessors.AVCodecParameters_ch_layout_nb_channels_s=Module.cwrap("AVCodecParameters_ch_layout_nb_channels_s",null,["number","number"]);var AVCodecParameters_chroma_location=Module.AVCodecParameters_chroma_location=CAccessors.AVCodecParameters_chroma_location=Module.cwrap("AVCodecParameters_chroma_location","number",["number"]);var AVCodecParameters_chroma_location_s=Module.AVCodecParameters_chroma_location_s=CAccessors.AVCodecParameters_chroma_location_s=Module.cwrap("AVCodecParameters_chroma_location_s",null,["number","number"]);var AVCodecParameters_codec_id=Module.AVCodecParameters_codec_id=CAccessors.AVCodecParameters_codec_id=Module.cwrap("AVCodecParameters_codec_id","number",["number"]);var AVCodecParameters_codec_id_s=Module.AVCodecParameters_codec_id_s=CAccessors.AVCodecParameters_codec_id_s=Module.cwrap("AVCodecParameters_codec_id_s",null,["number","number"]);var AVCodecParameters_codec_tag=Module.AVCodecParameters_codec_tag=CAccessors.AVCodecParameters_codec_tag=Module.cwrap("AVCodecParameters_codec_tag","number",["number"]);var AVCodecParameters_codec_tag_s=Module.AVCodecParameters_codec_tag_s=CAccessors.AVCodecParameters_codec_tag_s=Module.cwrap("AVCodecParameters_codec_tag_s",null,["number","number"]);var AVCodecParameters_codec_type=Module.AVCodecParameters_codec_type=CAccessors.AVCodecParameters_codec_type=Module.cwrap("AVCodecParameters_codec_type","number",["number"]);var AVCodecParameters_codec_type_s=Module.AVCodecParameters_codec_type_s=CAccessors.AVCodecParameters_codec_type_s=Module.cwrap("AVCodecParameters_codec_type_s",null,["number","number"]);var AVCodecParameters_coded_side_data=Module.AVCodecParameters_coded_side_data=CAccessors.AVCodecParameters_coded_side_data=Module.cwrap("AVCodecParameters_coded_side_data","number",["number"]);var AVCodecParameters_coded_side_data_s=Module.AVCodecParameters_coded_side_data_s=CAccessors.AVCodecParameters_coded_side_data_s=Module.cwrap("AVCodecParameters_coded_side_data_s",null,["number","number"]);var AVCodecParameters_color_primaries=Module.AVCodecParameters_color_primaries=CAccessors.AVCodecParameters_color_primaries=Module.cwrap("AVCodecParameters_color_primaries","number",["number"]);var AVCodecParameters_color_primaries_s=Module.AVCodecParameters_color_primaries_s=CAccessors.AVCodecParameters_color_primaries_s=Module.cwrap("AVCodecParameters_color_primaries_s",null,["number","number"]);var AVCodecParameters_color_range=Module.AVCodecParameters_color_range=CAccessors.AVCodecParameters_color_range=Module.cwrap("AVCodecParameters_color_range","number",["number"]);var AVCodecParameters_color_range_s=Module.AVCodecParameters_color_range_s=CAccessors.AVCodecParameters_color_range_s=Module.cwrap("AVCodecParameters_color_range_s",null,["number","number"]);var AVCodecParameters_color_space=Module.AVCodecParameters_color_space=CAccessors.AVCodecParameters_color_space=Module.cwrap("AVCodecParameters_color_space","number",["number"]);var AVCodecParameters_color_space_s=Module.AVCodecParameters_color_space_s=CAccessors.AVCodecParameters_color_space_s=Module.cwrap("AVCodecParameters_color_space_s",null,["number","number"]);var AVCodecParameters_color_trc=Module.AVCodecParameters_color_trc=CAccessors.AVCodecParameters_color_trc=Module.cwrap("AVCodecParameters_color_trc","number",["number"]);var AVCodecParameters_color_trc_s=Module.AVCodecParameters_color_trc_s=CAccessors.AVCodecParameters_color_trc_s=Module.cwrap("AVCodecParameters_color_trc_s",null,["number","number"]);var AVCodecParameters_extradata=Module.AVCodecParameters_extradata=CAccessors.AVCodecParameters_extradata=Module.cwrap("AVCodecParameters_extradata","number",["number"]);var AVCodecParameters_extradata_s=Module.AVCodecParameters_extradata_s=CAccessors.AVCodecParameters_extradata_s=Module.cwrap("AVCodecParameters_extradata_s",null,["number","number"]);var AVCodecParameters_extradata_size=Module.AVCodecParameters_extradata_size=CAccessors.AVCodecParameters_extradata_size=Module.cwrap("AVCodecParameters_extradata_size","number",["number"]);var AVCodecParameters_extradata_size_s=Module.AVCodecParameters_extradata_size_s=CAccessors.AVCodecParameters_extradata_size_s=Module.cwrap("AVCodecParameters_extradata_size_s",null,["number","number"]);var AVCodecParameters_format=Module.AVCodecParameters_format=CAccessors.AVCodecParameters_format=Module.cwrap("AVCodecParameters_format","number",["number"]);var AVCodecParameters_format_s=Module.AVCodecParameters_format_s=CAccessors.AVCodecParameters_format_s=Module.cwrap("AVCodecParameters_format_s",null,["number","number"]);var AVCodecParameters_framerate_num=Module.AVCodecParameters_framerate_num=CAccessors.AVCodecParameters_framerate_num=Module.cwrap("AVCodecParameters_framerate_num","number",["number"]);var AVCodecParameters_framerate_den=Module.AVCodecParameters_framerate_den=CAccessors.AVCodecParameters_framerate_den=Module.cwrap("AVCodecParameters_framerate_den","number",["number"]);var AVCodecParameters_framerate_num_s=Module.AVCodecParameters_framerate_num_s=CAccessors.AVCodecParameters_framerate_num_s=Module.cwrap("AVCodecParameters_framerate_num_s",null,["number","number"]);var AVCodecParameters_framerate_den_s=Module.AVCodecParameters_framerate_den_s=CAccessors.AVCodecParameters_framerate_den_s=Module.cwrap("AVCodecParameters_framerate_den_s",null,["number","number"]);var AVCodecParameters_framerate_s=Module.AVCodecParameters_framerate_s=CAccessors.AVCodecParameters_framerate_s=Module.cwrap("AVCodecParameters_framerate_s",null,["number","number","number"]);var AVCodecParameters_height=Module.AVCodecParameters_height=CAccessors.AVCodecParameters_height=Module.cwrap("AVCodecParameters_height","number",["number"]);var AVCodecParameters_height_s=Module.AVCodecParameters_height_s=CAccessors.AVCodecParameters_height_s=Module.cwrap("AVCodecParameters_height_s",null,["number","number"]);var AVCodecParameters_level=Module.AVCodecParameters_level=CAccessors.AVCodecParameters_level=Module.cwrap("AVCodecParameters_level","number",["number"]);var AVCodecParameters_level_s=Module.AVCodecParameters_level_s=CAccessors.AVCodecParameters_level_s=Module.cwrap("AVCodecParameters_level_s",null,["number","number"]);var AVCodecParameters_nb_coded_side_data=Module.AVCodecParameters_nb_coded_side_data=CAccessors.AVCodecParameters_nb_coded_side_data=Module.cwrap("AVCodecParameters_nb_coded_side_data","number",["number"]);var AVCodecParameters_nb_coded_side_data_s=Module.AVCodecParameters_nb_coded_side_data_s=CAccessors.AVCodecParameters_nb_coded_side_data_s=Module.cwrap("AVCodecParameters_nb_coded_side_data_s",null,["number","number"]);var AVCodecParameters_profile=Module.AVCodecParameters_profile=CAccessors.AVCodecParameters_profile=Module.cwrap("AVCodecParameters_profile","number",["number"]);var AVCodecParameters_profile_s=Module.AVCodecParameters_profile_s=CAccessors.AVCodecParameters_profile_s=Module.cwrap("AVCodecParameters_profile_s",null,["number","number"]);var AVCodecParameters_sample_rate=Module.AVCodecParameters_sample_rate=CAccessors.AVCodecParameters_sample_rate=Module.cwrap("AVCodecParameters_sample_rate","number",["number"]);var AVCodecParameters_sample_rate_s=Module.AVCodecParameters_sample_rate_s=CAccessors.AVCodecParameters_sample_rate_s=Module.cwrap("AVCodecParameters_sample_rate_s",null,["number","number"]);var AVCodecParameters_width=Module.AVCodecParameters_width=CAccessors.AVCodecParameters_width=Module.cwrap("AVCodecParameters_width","number",["number"]);var AVCodecParameters_width_s=Module.AVCodecParameters_width_s=CAccessors.AVCodecParameters_width_s=Module.cwrap("AVCodecParameters_width_s",null,["number","number"]);var AVPacket_data=Module.AVPacket_data=CAccessors.AVPacket_data=Module.cwrap("AVPacket_data","number",["number"]);var AVPacket_data_s=Module.AVPacket_data_s=CAccessors.AVPacket_data_s=Module.cwrap("AVPacket_data_s",null,["number","number"]);var AVPacket_dts=Module.AVPacket_dts=CAccessors.AVPacket_dts=Module.cwrap("AVPacket_dts","number",["number"]);var AVPacket_dts_s=Module.AVPacket_dts_s=CAccessors.AVPacket_dts_s=Module.cwrap("AVPacket_dts_s",null,["number","number"]);var AVPacket_dtshi=Module.AVPacket_dtshi=CAccessors.AVPacket_dtshi=Module.cwrap("AVPacket_dtshi","number",["number"]);var AVPacket_dtshi_s=Module.AVPacket_dtshi_s=CAccessors.AVPacket_dtshi_s=Module.cwrap("AVPacket_dtshi_s",null,["number","number"]);var AVPacket_duration=Module.AVPacket_duration=CAccessors.AVPacket_duration=Module.cwrap("AVPacket_duration","number",["number"]);var AVPacket_duration_s=Module.AVPacket_duration_s=CAccessors.AVPacket_duration_s=Module.cwrap("AVPacket_duration_s",null,["number","number"]);var AVPacket_durationhi=Module.AVPacket_durationhi=CAccessors.AVPacket_durationhi=Module.cwrap("AVPacket_durationhi","number",["number"]);var AVPacket_durationhi_s=Module.AVPacket_durationhi_s=CAccessors.AVPacket_durationhi_s=Module.cwrap("AVPacket_durationhi_s",null,["number","number"]);var AVPacket_flags=Module.AVPacket_flags=CAccessors.AVPacket_flags=Module.cwrap("AVPacket_flags","number",["number"]);var AVPacket_flags_s=Module.AVPacket_flags_s=CAccessors.AVPacket_flags_s=Module.cwrap("AVPacket_flags_s",null,["number","number"]);var AVPacket_pos=Module.AVPacket_pos=CAccessors.AVPacket_pos=Module.cwrap("AVPacket_pos","number",["number"]);var AVPacket_pos_s=Module.AVPacket_pos_s=CAccessors.AVPacket_pos_s=Module.cwrap("AVPacket_pos_s",null,["number","number"]);var AVPacket_poshi=Module.AVPacket_poshi=CAccessors.AVPacket_poshi=Module.cwrap("AVPacket_poshi","number",["number"]);var AVPacket_poshi_s=Module.AVPacket_poshi_s=CAccessors.AVPacket_poshi_s=Module.cwrap("AVPacket_poshi_s",null,["number","number"]);var AVPacket_pts=Module.AVPacket_pts=CAccessors.AVPacket_pts=Module.cwrap("AVPacket_pts","number",["number"]);var AVPacket_pts_s=Module.AVPacket_pts_s=CAccessors.AVPacket_pts_s=Module.cwrap("AVPacket_pts_s",null,["number","number"]);var AVPacket_ptshi=Module.AVPacket_ptshi=CAccessors.AVPacket_ptshi=Module.cwrap("AVPacket_ptshi","number",["number"]);var AVPacket_ptshi_s=Module.AVPacket_ptshi_s=CAccessors.AVPacket_ptshi_s=Module.cwrap("AVPacket_ptshi_s",null,["number","number"]);var AVPacket_side_data=Module.AVPacket_side_data=CAccessors.AVPacket_side_data=Module.cwrap("AVPacket_side_data","number",["number"]);var AVPacket_side_data_s=Module.AVPacket_side_data_s=CAccessors.AVPacket_side_data_s=Module.cwrap("AVPacket_side_data_s",null,["number","number"]);var AVPacket_side_data_elems=Module.AVPacket_side_data_elems=CAccessors.AVPacket_side_data_elems=Module.cwrap("AVPacket_side_data_elems","number",["number"]);var AVPacket_side_data_elems_s=Module.AVPacket_side_data_elems_s=CAccessors.AVPacket_side_data_elems_s=Module.cwrap("AVPacket_side_data_elems_s",null,["number","number"]);var AVPacket_size=Module.AVPacket_size=CAccessors.AVPacket_size=Module.cwrap("AVPacket_size","number",["number"]);var AVPacket_size_s=Module.AVPacket_size_s=CAccessors.AVPacket_size_s=Module.cwrap("AVPacket_size_s",null,["number","number"]);var AVPacket_stream_index=Module.AVPacket_stream_index=CAccessors.AVPacket_stream_index=Module.cwrap("AVPacket_stream_index","number",["number"]);var AVPacket_stream_index_s=Module.AVPacket_stream_index_s=CAccessors.AVPacket_stream_index_s=Module.cwrap("AVPacket_stream_index_s",null,["number","number"]);var AVPacket_time_base_num=Module.AVPacket_time_base_num=CAccessors.AVPacket_time_base_num=Module.cwrap("AVPacket_time_base_num","number",["number"]);var AVPacket_time_base_den=Module.AVPacket_time_base_den=CAccessors.AVPacket_time_base_den=Module.cwrap("AVPacket_time_base_den","number",["number"]);var AVPacket_time_base_num_s=Module.AVPacket_time_base_num_s=CAccessors.AVPacket_time_base_num_s=Module.cwrap("AVPacket_time_base_num_s",null,["number","number"]);var AVPacket_time_base_den_s=Module.AVPacket_time_base_den_s=CAccessors.AVPacket_time_base_den_s=Module.cwrap("AVPacket_time_base_den_s",null,["number","number"]);var AVPacket_time_base_s=Module.AVPacket_time_base_s=CAccessors.AVPacket_time_base_s=Module.cwrap("AVPacket_time_base_s",null,["number","number","number"]);var av_packet_free_js=Module.av_packet_free_js=CAccessors.av_packet_free_js=function(p){var p2=malloc(4);if(p2===0)throw new Error("Could not malloc");new Uint32Array(Module.HEAPU8.buffer,p2,1)[0]=p;CAccessors.av_packet_free(p2);free(p2)};var avcodec_parameters_free_js=Module.avcodec_parameters_free_js=CAccessors.avcodec_parameters_free_js=function(p){var p2=malloc(4);if(p2===0)throw new Error("Could not malloc");new Uint32Array(Module.HEAPU8.buffer,p2,1)[0]=p;CAccessors.avcodec_parameters_free(p2);free(p2)};var avcodec_alloc_context3=Module.avcodec_alloc_context3=CAccessors.avcodec_alloc_context3=Module.cwrap("avcodec_alloc_context3","number",["number"]);var avcodec_find_decoder=Module.avcodec_find_decoder=CAccessors.avcodec_find_decoder=Module.cwrap("avcodec_find_decoder","number",["number"]);var avcodec_find_decoder_by_name=Module.avcodec_find_decoder_by_name=CAccessors.avcodec_find_decoder_by_name=Module.cwrap("avcodec_find_decoder_by_name","number",["string"]);var avcodec_find_encoder=Module.avcodec_find_encoder=CAccessors.avcodec_find_encoder=Module.cwrap("avcodec_find_encoder","number",["number"]);var avcodec_find_encoder_by_name=Module.avcodec_find_encoder_by_name=CAccessors.avcodec_find_encoder_by_name=Module.cwrap("avcodec_find_encoder_by_name","number",["string"]);var avcodec_flush_buffers=Module.avcodec_flush_buffers=CAccessors.avcodec_flush_buffers=Module.cwrap("avcodec_flush_buffers",null,["number"]);var avcodec_free_context=Module.avcodec_free_context=CAccessors.avcodec_free_context=Module.cwrap("avcodec_free_context",null,["number"]);var avcodec_get_name=Module.avcodec_get_name=CAccessors.avcodec_get_name=Module.cwrap("avcodec_get_name","string",["number"]);var avcodec_open2=Module.avcodec_open2=CAccessors.avcodec_open2=Module.cwrap("avcodec_open2","number",["number","number","number"]);var avcodec_open2_js=Module.avcodec_open2_js=CAccessors.avcodec_open2_js=Module.cwrap("avcodec_open2_js","number",["number","number","number"]);var avcodec_parameters_alloc=Module.avcodec_parameters_alloc=CAccessors.avcodec_parameters_alloc=Module.cwrap("avcodec_parameters_alloc","number",[]);var avcodec_parameters_copy=Module.avcodec_parameters_copy=CAccessors.avcodec_parameters_copy=Module.cwrap("avcodec_parameters_copy","number",["number","number"]);var avcodec_parameters_free=Module.avcodec_parameters_free=CAccessors.avcodec_parameters_free=Module.cwrap("avcodec_parameters_free",null,["number"]);var avcodec_parameters_from_context=Module.avcodec_parameters_from_context=CAccessors.avcodec_parameters_from_context=Module.cwrap("avcodec_parameters_from_context","number",["number","number"]);var avcodec_parameters_to_context=Module.avcodec_parameters_to_context=CAccessors.avcodec_parameters_to_context=Module.cwrap("avcodec_parameters_to_context","number",["number","number"]);var avcodec_receive_frame=Module.avcodec_receive_frame=CAccessors.avcodec_receive_frame=Module.cwrap("avcodec_receive_frame","number",["number","number"]);var avcodec_receive_packet=Module.avcodec_receive_packet=CAccessors.avcodec_receive_packet=Module.cwrap("avcodec_receive_packet","number",["number","number"]);var avcodec_send_frame=Module.avcodec_send_frame=CAccessors.avcodec_send_frame=Module.cwrap("avcodec_send_frame","number",["number","number"]);var avcodec_send_packet=Module.avcodec_send_packet=CAccessors.avcodec_send_packet=Module.cwrap("avcodec_send_packet","number",["number","number"]);var AVCodec_name=Module.AVCodec_name=CAccessors.AVCodec_name=Module.cwrap("AVCodec_name","string",["number"]);var AVCodec_sample_fmts=Module.AVCodec_sample_fmts=CAccessors.AVCodec_sample_fmts=Module.cwrap("AVCodec_sample_fmts","number",["number"]);var AVCodec_sample_fmts_s=Module.AVCodec_sample_fmts_s=CAccessors.AVCodec_sample_fmts_s=Module.cwrap("AVCodec_sample_fmts_s",null,["number","number"]);var AVCodec_sample_fmts_a=Module.AVCodec_sample_fmts_a=CAccessors.AVCodec_sample_fmts_a=Module.cwrap("AVCodec_sample_fmts_a","number",["number","number"]);var AVCodec_sample_fmts_a_s=Module.AVCodec_sample_fmts_a_s=CAccessors.AVCodec_sample_fmts_a_s=Module.cwrap("AVCodec_sample_fmts_a_s",null,["number","number","number"]);var AVCodec_supported_samplerates=Module.AVCodec_supported_samplerates=CAccessors.AVCodec_supported_samplerates=Module.cwrap("AVCodec_supported_samplerates","number",["number"]);var AVCodec_supported_samplerates_s=Module.AVCodec_supported_samplerates_s=CAccessors.AVCodec_supported_samplerates_s=Module.cwrap("AVCodec_supported_samplerates_s",null,["number","number"]);var AVCodec_supported_samplerates_a=Module.AVCodec_supported_samplerates_a=CAccessors.AVCodec_supported_samplerates_a=Module.cwrap("AVCodec_supported_samplerates_a","number",["number","number"]);var AVCodec_supported_samplerates_a_s=Module.AVCodec_supported_samplerates_a_s=CAccessors.AVCodec_supported_samplerates_a_s=Module.cwrap("AVCodec_supported_samplerates_a_s",null,["number","number","number"]);var AVCodec_type=Module.AVCodec_type=CAccessors.AVCodec_type=Module.cwrap("AVCodec_type","number",["number"]);var AVCodec_type_s=Module.AVCodec_type_s=CAccessors.AVCodec_type_s=Module.cwrap("AVCodec_type_s",null,["number","number"]);var AVCodecContext_codec_id=Module.AVCodecContext_codec_id=CAccessors.AVCodecContext_codec_id=Module.cwrap("AVCodecContext_codec_id","number",["number"]);var AVCodecContext_codec_id_s=Module.AVCodecContext_codec_id_s=CAccessors.AVCodecContext_codec_id_s=Module.cwrap("AVCodecContext_codec_id_s",null,["number","number"]);var AVCodecContext_codec_type=Module.AVCodecContext_codec_type=CAccessors.AVCodecContext_codec_type=Module.cwrap("AVCodecContext_codec_type","number",["number"]);var AVCodecContext_codec_type_s=Module.AVCodecContext_codec_type_s=CAccessors.AVCodecContext_codec_type_s=Module.cwrap("AVCodecContext_codec_type_s",null,["number","number"]);var AVCodecContext_bit_rate=Module.AVCodecContext_bit_rate=CAccessors.AVCodecContext_bit_rate=Module.cwrap("AVCodecContext_bit_rate","number",["number"]);var AVCodecContext_bit_rate_s=Module.AVCodecContext_bit_rate_s=CAccessors.AVCodecContext_bit_rate_s=Module.cwrap("AVCodecContext_bit_rate_s",null,["number","number"]);var AVCodecContext_bit_ratehi=Module.AVCodecContext_bit_ratehi=CAccessors.AVCodecContext_bit_ratehi=Module.cwrap("AVCodecContext_bit_ratehi","number",["number"]);var AVCodecContext_bit_ratehi_s=Module.AVCodecContext_bit_ratehi_s=CAccessors.AVCodecContext_bit_ratehi_s=Module.cwrap("AVCodecContext_bit_ratehi_s",null,["number","number"]);var AVCodecContext_channel_layout=Module.AVCodecContext_channel_layout=CAccessors.AVCodecContext_channel_layout=Module.cwrap("AVCodecContext_channel_layout","number",["number"]);var AVCodecContext_channel_layout_s=Module.AVCodecContext_channel_layout_s=CAccessors.AVCodecContext_channel_layout_s=Module.cwrap("AVCodecContext_channel_layout_s",null,["number","number"]);var AVCodecContext_channel_layouthi=Module.AVCodecContext_channel_layouthi=CAccessors.AVCodecContext_channel_layouthi=Module.cwrap("AVCodecContext_channel_layouthi","number",["number"]);var AVCodecContext_channel_layouthi_s=Module.AVCodecContext_channel_layouthi_s=CAccessors.AVCodecContext_channel_layouthi_s=Module.cwrap("AVCodecContext_channel_layouthi_s",null,["number","number"]);var AVCodecContext_channels=Module.AVCodecContext_channels=CAccessors.AVCodecContext_channels=Module.cwrap("AVCodecContext_channels","number",["number"]);var AVCodecContext_channels_s=Module.AVCodecContext_channels_s=CAccessors.AVCodecContext_channels_s=Module.cwrap("AVCodecContext_channels_s",null,["number","number"]);var AVCodecContext_channel_layoutmask=Module.AVCodecContext_channel_layoutmask=CAccessors.AVCodecContext_channel_layoutmask=Module.cwrap("AVCodecContext_channel_layoutmask","number",["number"]);var AVCodecContext_channel_layoutmask_s=Module.AVCodecContext_channel_layoutmask_s=CAccessors.AVCodecContext_channel_layoutmask_s=Module.cwrap("AVCodecContext_channel_layoutmask_s",null,["number","number"]);var AVCodecContext_ch_layout_nb_channels=Module.AVCodecContext_ch_layout_nb_channels=CAccessors.AVCodecContext_ch_layout_nb_channels=Module.cwrap("AVCodecContext_ch_layout_nb_channels","number",["number"]);var AVCodecContext_ch_layout_nb_channels_s=Module.AVCodecContext_ch_layout_nb_channels_s=CAccessors.AVCodecContext_ch_layout_nb_channels_s=Module.cwrap("AVCodecContext_ch_layout_nb_channels_s",null,["number","number"]);var AVCodecContext_coded_side_data=Module.AVCodecContext_coded_side_data=CAccessors.AVCodecContext_coded_side_data=Module.cwrap("AVCodecContext_coded_side_data","number",["number"]);var AVCodecContext_coded_side_data_s=Module.AVCodecContext_coded_side_data_s=CAccessors.AVCodecContext_coded_side_data_s=Module.cwrap("AVCodecContext_coded_side_data_s",null,["number","number"]);var AVCodecContext_compression_level=Module.AVCodecContext_compression_level=CAccessors.AVCodecContext_compression_level=Module.cwrap("AVCodecContext_compression_level","number",["number"]);var AVCodecContext_compression_level_s=Module.AVCodecContext_compression_level_s=CAccessors.AVCodecContext_compression_level_s=Module.cwrap("AVCodecContext_compression_level_s",null,["number","number"]);var AVCodecContext_extradata=Module.AVCodecContext_extradata=CAccessors.AVCodecContext_extradata=Module.cwrap("AVCodecContext_extradata","number",["number"]);var AVCodecContext_extradata_s=Module.AVCodecContext_extradata_s=CAccessors.AVCodecContext_extradata_s=Module.cwrap("AVCodecContext_extradata_s",null,["number","number"]);var AVCodecContext_extradata_size=Module.AVCodecContext_extradata_size=CAccessors.AVCodecContext_extradata_size=Module.cwrap("AVCodecContext_extradata_size","number",["number"]);var AVCodecContext_extradata_size_s=Module.AVCodecContext_extradata_size_s=CAccessors.AVCodecContext_extradata_size_s=Module.cwrap("AVCodecContext_extradata_size_s",null,["number","number"]);var AVCodecContext_frame_size=Module.AVCodecContext_frame_size=CAccessors.AVCodecContext_frame_size=Module.cwrap("AVCodecContext_frame_size","number",["number"]);var AVCodecContext_frame_size_s=Module.AVCodecContext_frame_size_s=CAccessors.AVCodecContext_frame_size_s=Module.cwrap("AVCodecContext_frame_size_s",null,["number","number"]);var AVCodecContext_framerate_num=Module.AVCodecContext_framerate_num=CAccessors.AVCodecContext_framerate_num=Module.cwrap("AVCodecContext_framerate_num","number",["number"]);var AVCodecContext_framerate_den=Module.AVCodecContext_framerate_den=CAccessors.AVCodecContext_framerate_den=Module.cwrap("AVCodecContext_framerate_den","number",["number"]);var AVCodecContext_framerate_num_s=Module.AVCodecContext_framerate_num_s=CAccessors.AVCodecContext_framerate_num_s=Module.cwrap("AVCodecContext_framerate_num_s",null,["number","number"]);var AVCodecContext_framerate_den_s=Module.AVCodecContext_framerate_den_s=CAccessors.AVCodecContext_framerate_den_s=Module.cwrap("AVCodecContext_framerate_den_s",null,["number","number"]);var AVCodecContext_framerate_s=Module.AVCodecContext_framerate_s=CAccessors.AVCodecContext_framerate_s=Module.cwrap("AVCodecContext_framerate_s",null,["number","number","number"]);var AVCodecContext_gop_size=Module.AVCodecContext_gop_size=CAccessors.AVCodecContext_gop_size=Module.cwrap("AVCodecContext_gop_size","number",["number"]);var AVCodecContext_gop_size_s=Module.AVCodecContext_gop_size_s=CAccessors.AVCodecContext_gop_size_s=Module.cwrap("AVCodecContext_gop_size_s",null,["number","number"]);var AVCodecContext_height=Module.AVCodecContext_height=CAccessors.AVCodecContext_height=Module.cwrap("AVCodecContext_height","number",["number"]);var AVCodecContext_height_s=Module.AVCodecContext_height_s=CAccessors.AVCodecContext_height_s=Module.cwrap("AVCodecContext_height_s",null,["number","number"]);var AVCodecContext_keyint_min=Module.AVCodecContext_keyint_min=CAccessors.AVCodecContext_keyint_min=Module.cwrap("AVCodecContext_keyint_min","number",["number"]);var AVCodecContext_keyint_min_s=Module.AVCodecContext_keyint_min_s=CAccessors.AVCodecContext_keyint_min_s=Module.cwrap("AVCodecContext_keyint_min_s",null,["number","number"]);var AVCodecContext_level=Module.AVCodecContext_level=CAccessors.AVCodecContext_level=Module.cwrap("AVCodecContext_level","number",["number"]);var AVCodecContext_level_s=Module.AVCodecContext_level_s=CAccessors.AVCodecContext_level_s=Module.cwrap("AVCodecContext_level_s",null,["number","number"]);var AVCodecContext_max_b_frames=Module.AVCodecContext_max_b_frames=CAccessors.AVCodecContext_max_b_frames=Module.cwrap("AVCodecContext_max_b_frames","number",["number"]);var AVCodecContext_max_b_frames_s=Module.AVCodecContext_max_b_frames_s=CAccessors.AVCodecContext_max_b_frames_s=Module.cwrap("AVCodecContext_max_b_frames_s",null,["number","number"]);var AVCodecContext_nb_coded_side_data=Module.AVCodecContext_nb_coded_side_data=CAccessors.AVCodecContext_nb_coded_side_data=Module.cwrap("AVCodecContext_nb_coded_side_data","number",["number"]);var AVCodecContext_nb_coded_side_data_s=Module.AVCodecContext_nb_coded_side_data_s=CAccessors.AVCodecContext_nb_coded_side_data_s=Module.cwrap("AVCodecContext_nb_coded_side_data_s",null,["number","number"]);var AVCodecContext_pix_fmt=Module.AVCodecContext_pix_fmt=CAccessors.AVCodecContext_pix_fmt=Module.cwrap("AVCodecContext_pix_fmt","number",["number"]);var AVCodecContext_pix_fmt_s=Module.AVCodecContext_pix_fmt_s=CAccessors.AVCodecContext_pix_fmt_s=Module.cwrap("AVCodecContext_pix_fmt_s",null,["number","number"]);var AVCodecContext_profile=Module.AVCodecContext_profile=CAccessors.AVCodecContext_profile=Module.cwrap("AVCodecContext_profile","number",["number"]);var AVCodecContext_profile_s=Module.AVCodecContext_profile_s=CAccessors.AVCodecContext_profile_s=Module.cwrap("AVCodecContext_profile_s",null,["number","number"]);var AVCodecContext_rc_max_rate=Module.AVCodecContext_rc_max_rate=CAccessors.AVCodecContext_rc_max_rate=Module.cwrap("AVCodecContext_rc_max_rate","number",["number"]);var AVCodecContext_rc_max_rate_s=Module.AVCodecContext_rc_max_rate_s=CAccessors.AVCodecContext_rc_max_rate_s=Module.cwrap("AVCodecContext_rc_max_rate_s",null,["number","number"]);var AVCodecContext_rc_max_ratehi=Module.AVCodecContext_rc_max_ratehi=CAccessors.AVCodecContext_rc_max_ratehi=Module.cwrap("AVCodecContext_rc_max_ratehi","number",["number"]);var AVCodecContext_rc_max_ratehi_s=Module.AVCodecContext_rc_max_ratehi_s=CAccessors.AVCodecContext_rc_max_ratehi_s=Module.cwrap("AVCodecContext_rc_max_ratehi_s",null,["number","number"]);var AVCodecContext_rc_min_rate=Module.AVCodecContext_rc_min_rate=CAccessors.AVCodecContext_rc_min_rate=Module.cwrap("AVCodecContext_rc_min_rate","number",["number"]);var AVCodecContext_rc_min_rate_s=Module.AVCodecContext_rc_min_rate_s=CAccessors.AVCodecContext_rc_min_rate_s=Module.cwrap("AVCodecContext_rc_min_rate_s",null,["number","number"]);var AVCodecContext_rc_min_ratehi=Module.AVCodecContext_rc_min_ratehi=CAccessors.AVCodecContext_rc_min_ratehi=Module.cwrap("AVCodecContext_rc_min_ratehi","number",["number"]);var AVCodecContext_rc_min_ratehi_s=Module.AVCodecContext_rc_min_ratehi_s=CAccessors.AVCodecContext_rc_min_ratehi_s=Module.cwrap("AVCodecContext_rc_min_ratehi_s",null,["number","number"]);var AVCodecContext_sample_aspect_ratio_num=Module.AVCodecContext_sample_aspect_ratio_num=CAccessors.AVCodecContext_sample_aspect_ratio_num=Module.cwrap("AVCodecContext_sample_aspect_ratio_num","number",["number"]);var AVCodecContext_sample_aspect_ratio_den=Module.AVCodecContext_sample_aspect_ratio_den=CAccessors.AVCodecContext_sample_aspect_ratio_den=Module.cwrap("AVCodecContext_sample_aspect_ratio_den","number",["number"]);var AVCodecContext_sample_aspect_ratio_num_s=Module.AVCodecContext_sample_aspect_ratio_num_s=CAccessors.AVCodecContext_sample_aspect_ratio_num_s=Module.cwrap("AVCodecContext_sample_aspect_ratio_num_s",null,["number","number"]);var AVCodecContext_sample_aspect_ratio_den_s=Module.AVCodecContext_sample_aspect_ratio_den_s=CAccessors.AVCodecContext_sample_aspect_ratio_den_s=Module.cwrap("AVCodecContext_sample_aspect_ratio_den_s",null,["number","number"]);var AVCodecContext_sample_aspect_ratio_s=Module.AVCodecContext_sample_aspect_ratio_s=CAccessors.AVCodecContext_sample_aspect_ratio_s=Module.cwrap("AVCodecContext_sample_aspect_ratio_s",null,["number","number","number"]);var AVCodecContext_sample_fmt=Module.AVCodecContext_sample_fmt=CAccessors.AVCodecContext_sample_fmt=Module.cwrap("AVCodecContext_sample_fmt","number",["number"]);var AVCodecContext_sample_fmt_s=Module.AVCodecContext_sample_fmt_s=CAccessors.AVCodecContext_sample_fmt_s=Module.cwrap("AVCodecContext_sample_fmt_s",null,["number","number"]);var AVCodecContext_sample_rate=Module.AVCodecContext_sample_rate=CAccessors.AVCodecContext_sample_rate=Module.cwrap("AVCodecContext_sample_rate","number",["number"]);var AVCodecContext_sample_rate_s=Module.AVCodecContext_sample_rate_s=CAccessors.AVCodecContext_sample_rate_s=Module.cwrap("AVCodecContext_sample_rate_s",null,["number","number"]);var AVCodecContext_strict_std_compliance=Module.AVCodecContext_strict_std_compliance=CAccessors.AVCodecContext_strict_std_compliance=Module.cwrap("AVCodecContext_strict_std_compliance","number",["number"]);var AVCodecContext_strict_std_compliance_s=Module.AVCodecContext_strict_std_compliance_s=CAccessors.AVCodecContext_strict_std_compliance_s=Module.cwrap("AVCodecContext_strict_std_compliance_s",null,["number","number"]);var AVCodecContext_time_base_num=Module.AVCodecContext_time_base_num=CAccessors.AVCodecContext_time_base_num=Module.cwrap("AVCodecContext_time_base_num","number",["number"]);var AVCodecContext_time_base_den=Module.AVCodecContext_time_base_den=CAccessors.AVCodecContext_time_base_den=Module.cwrap("AVCodecContext_time_base_den","number",["number"]);var AVCodecContext_time_base_num_s=Module.AVCodecContext_time_base_num_s=CAccessors.AVCodecContext_time_base_num_s=Module.cwrap("AVCodecContext_time_base_num_s",null,["number","number"]);var AVCodecContext_time_base_den_s=Module.AVCodecContext_time_base_den_s=CAccessors.AVCodecContext_time_base_den_s=Module.cwrap("AVCodecContext_time_base_den_s",null,["number","number"]);var AVCodecContext_time_base_s=Module.AVCodecContext_time_base_s=CAccessors.AVCodecContext_time_base_s=Module.cwrap("AVCodecContext_time_base_s",null,["number","number","number"]);var AVCodecContext_pkt_timebase_num=Module.AVCodecContext_pkt_timebase_num=CAccessors.AVCodecContext_pkt_timebase_num=Module.cwrap("AVCodecContext_pkt_timebase_num","number",["number"]);var AVCodecContext_pkt_timebase_den=Module.AVCodecContext_pkt_timebase_den=CAccessors.AVCodecContext_pkt_timebase_den=Module.cwrap("AVCodecContext_pkt_timebase_den","number",["number"]);var AVCodecContext_pkt_timebase_num_s=Module.AVCodecContext_pkt_timebase_num_s=CAccessors.AVCodecContext_pkt_timebase_num_s=Module.cwrap("AVCodecContext_pkt_timebase_num_s",null,["number","number"]);var AVCodecContext_pkt_timebase_den_s=Module.AVCodecContext_pkt_timebase_den_s=CAccessors.AVCodecContext_pkt_timebase_den_s=Module.cwrap("AVCodecContext_pkt_timebase_den_s",null,["number","number"]);var AVCodecContext_pkt_timebase_s=Module.AVCodecContext_pkt_timebase_s=CAccessors.AVCodecContext_pkt_timebase_s=Module.cwrap("AVCodecContext_pkt_timebase_s",null,["number","number","number"]);var AVCodecContext_qmax=Module.AVCodecContext_qmax=CAccessors.AVCodecContext_qmax=Module.cwrap("AVCodecContext_qmax","number",["number"]);var AVCodecContext_qmax_s=Module.AVCodecContext_qmax_s=CAccessors.AVCodecContext_qmax_s=Module.cwrap("AVCodecContext_qmax_s",null,["number","number"]);var AVCodecContext_qmin=Module.AVCodecContext_qmin=CAccessors.AVCodecContext_qmin=Module.cwrap("AVCodecContext_qmin","number",["number"]);var AVCodecContext_qmin_s=Module.AVCodecContext_qmin_s=CAccessors.AVCodecContext_qmin_s=Module.cwrap("AVCodecContext_qmin_s",null,["number","number"]);var AVCodecContext_width=Module.AVCodecContext_width=CAccessors.AVCodecContext_width=Module.cwrap("AVCodecContext_width","number",["number"]);var AVCodecContext_width_s=Module.AVCodecContext_width_s=CAccessors.AVCodecContext_width_s=Module.cwrap("AVCodecContext_width_s",null,["number","number"]);var avcodec_free_context_js=Module.avcodec_free_context_js=CAccessors.avcodec_free_context_js=function(p){var p2=malloc(4);if(p2===0)throw new Error("Could not malloc");new Uint32Array(Module.HEAPU8.buffer,p2,1)[0]=p;CAccessors.avcodec_free_context(p2);free(p2)};var av_frame_alloc=Module.av_frame_alloc=CAccessors.av_frame_alloc=Module.cwrap("av_frame_alloc","number",[]);var av_frame_clone=Module.av_frame_clone=CAccessors.av_frame_clone=Module.cwrap("av_frame_clone","number",["number","number"]);var av_frame_free=Module.av_frame_free=CAccessors.av_frame_free=Module.cwrap("av_frame_free",null,["number"]);var av_frame_get_buffer=Module.av_frame_get_buffer=CAccessors.av_frame_get_buffer=Module.cwrap("av_frame_get_buffer","number",["number","number"]);var av_frame_make_writable=Module.av_frame_make_writable=CAccessors.av_frame_make_writable=Module.cwrap("av_frame_make_writable","number",["number"]);var av_frame_ref=Module.av_frame_ref=CAccessors.av_frame_ref=Module.cwrap("av_frame_ref","number",["number","number"]);var av_frame_unref=Module.av_frame_unref=CAccessors.av_frame_unref=Module.cwrap("av_frame_unref",null,["number"]);var av_get_bytes_per_sample=Module.av_get_bytes_per_sample=CAccessors.av_get_bytes_per_sample=Module.cwrap("av_get_bytes_per_sample","number",["number"]);var av_get_sample_fmt_name=Module.av_get_sample_fmt_name=CAccessors.av_get_sample_fmt_name=Module.cwrap("av_get_sample_fmt_name","string",["number"]);var av_pix_fmt_desc_get=Module.av_pix_fmt_desc_get=CAccessors.av_pix_fmt_desc_get=Module.cwrap("av_pix_fmt_desc_get","number",["number"]);var AVPixFmtDescriptor_comp_depth=Module.AVPixFmtDescriptor_comp_depth=CAccessors.AVPixFmtDescriptor_comp_depth=Module.cwrap("AVPixFmtDescriptor_comp_depth","number",["number","number"]);var ff_frame_rescale_ts_js=Module.ff_frame_rescale_ts_js=CAccessors.ff_frame_rescale_ts_js=Module.cwrap("ff_frame_rescale_ts_js",null,["number","number","number","number","number"]);var AVFrame_channel_layout=Module.AVFrame_channel_layout=CAccessors.AVFrame_channel_layout=Module.cwrap("AVFrame_channel_layout","number",["number"]);var AVFrame_channel_layout_s=Module.AVFrame_channel_layout_s=CAccessors.AVFrame_channel_layout_s=Module.cwrap("AVFrame_channel_layout_s",null,["number","number"]);var AVFrame_channel_layouthi=Module.AVFrame_channel_layouthi=CAccessors.AVFrame_channel_layouthi=Module.cwrap("AVFrame_channel_layouthi","number",["number"]);var AVFrame_channel_layouthi_s=Module.AVFrame_channel_layouthi_s=CAccessors.AVFrame_channel_layouthi_s=Module.cwrap("AVFrame_channel_layouthi_s",null,["number","number"]);var AVFrame_channels=Module.AVFrame_channels=CAccessors.AVFrame_channels=Module.cwrap("AVFrame_channels","number",["number"]);var AVFrame_channels_s=Module.AVFrame_channels_s=CAccessors.AVFrame_channels_s=Module.cwrap("AVFrame_channels_s",null,["number","number"]);var AVFrame_channel_layoutmask=Module.AVFrame_channel_layoutmask=CAccessors.AVFrame_channel_layoutmask=Module.cwrap("AVFrame_channel_layoutmask","number",["number"]);var AVFrame_channel_layoutmask_s=Module.AVFrame_channel_layoutmask_s=CAccessors.AVFrame_channel_layoutmask_s=Module.cwrap("AVFrame_channel_layoutmask_s",null,["number","number"]);var AVFrame_ch_layout_nb_channels=Module.AVFrame_ch_layout_nb_channels=CAccessors.AVFrame_ch_layout_nb_channels=Module.cwrap("AVFrame_ch_layout_nb_channels","number",["number"]);var AVFrame_ch_layout_nb_channels_s=Module.AVFrame_ch_layout_nb_channels_s=CAccessors.AVFrame_ch_layout_nb_channels_s=Module.cwrap("AVFrame_ch_layout_nb_channels_s",null,["number","number"]);var AVFrame_crop_bottom=Module.AVFrame_crop_bottom=CAccessors.AVFrame_crop_bottom=Module.cwrap("AVFrame_crop_bottom","number",["number"]);var AVFrame_crop_bottom_s=Module.AVFrame_crop_bottom_s=CAccessors.AVFrame_crop_bottom_s=Module.cwrap("AVFrame_crop_bottom_s",null,["number","number"]);var AVFrame_crop_left=Module.AVFrame_crop_left=CAccessors.AVFrame_crop_left=Module.cwrap("AVFrame_crop_left","number",["number"]);var AVFrame_crop_left_s=Module.AVFrame_crop_left_s=CAccessors.AVFrame_crop_left_s=Module.cwrap("AVFrame_crop_left_s",null,["number","number"]);var AVFrame_crop_right=Module.AVFrame_crop_right=CAccessors.AVFrame_crop_right=Module.cwrap("AVFrame_crop_right","number",["number"]);var AVFrame_crop_right_s=Module.AVFrame_crop_right_s=CAccessors.AVFrame_crop_right_s=Module.cwrap("AVFrame_crop_right_s",null,["number","number"]);var AVFrame_crop_top=Module.AVFrame_crop_top=CAccessors.AVFrame_crop_top=Module.cwrap("AVFrame_crop_top","number",["number"]);var AVFrame_crop_top_s=Module.AVFrame_crop_top_s=CAccessors.AVFrame_crop_top_s=Module.cwrap("AVFrame_crop_top_s",null,["number","number"]);var AVFrame_data_a=Module.AVFrame_data_a=CAccessors.AVFrame_data_a=Module.cwrap("AVFrame_data_a","number",["number","number"]);var AVFrame_data_a_s=Module.AVFrame_data_a_s=CAccessors.AVFrame_data_a_s=Module.cwrap("AVFrame_data_a_s",null,["number","number","number"]);var AVFrame_duration=Module.AVFrame_duration=CAccessors.AVFrame_duration=Module.cwrap("AVFrame_duration","number",["number"]);var AVFrame_duration_s=Module.AVFrame_duration_s=CAccessors.AVFrame_duration_s=Module.cwrap("AVFrame_duration_s",null,["number","number"]);var AVFrame_flags=Module.AVFrame_flags=CAccessors.AVFrame_flags=Module.cwrap("AVFrame_flags","number",["number"]);var AVFrame_flags_s=Module.AVFrame_flags_s=CAccessors.AVFrame_flags_s=Module.cwrap("AVFrame_flags_s",null,["number","number"]);var AVFrame_format=Module.AVFrame_format=CAccessors.AVFrame_format=Module.cwrap("AVFrame_format","number",["number"]);var AVFrame_format_s=Module.AVFrame_format_s=CAccessors.AVFrame_format_s=Module.cwrap("AVFrame_format_s",null,["number","number"]);var AVFrame_height=Module.AVFrame_height=CAccessors.AVFrame_height=Module.cwrap("AVFrame_height","number",["number"]);var AVFrame_height_s=Module.AVFrame_height_s=CAccessors.AVFrame_height_s=Module.cwrap("AVFrame_height_s",null,["number","number"]);var AVFrame_key_frame=Module.AVFrame_key_frame=CAccessors.AVFrame_key_frame=Module.cwrap("AVFrame_key_frame","number",["number"]);var AVFrame_key_frame_s=Module.AVFrame_key_frame_s=CAccessors.AVFrame_key_frame_s=Module.cwrap("AVFrame_key_frame_s",null,["number","number"]);var AVFrame_linesize_a=Module.AVFrame_linesize_a=CAccessors.AVFrame_linesize_a=Module.cwrap("AVFrame_linesize_a","number",["number","number"]);var AVFrame_linesize_a_s=Module.AVFrame_linesize_a_s=CAccessors.AVFrame_linesize_a_s=Module.cwrap("AVFrame_linesize_a_s",null,["number","number","number"]);var AVFrame_nb_samples=Module.AVFrame_nb_samples=CAccessors.AVFrame_nb_samples=Module.cwrap("AVFrame_nb_samples","number",["number"]);var AVFrame_nb_samples_s=Module.AVFrame_nb_samples_s=CAccessors.AVFrame_nb_samples_s=Module.cwrap("AVFrame_nb_samples_s",null,["number","number"]);var AVFrame_pict_type=Module.AVFrame_pict_type=CAccessors.AVFrame_pict_type=Module.cwrap("AVFrame_pict_type","number",["number"]);var AVFrame_pict_type_s=Module.AVFrame_pict_type_s=CAccessors.AVFrame_pict_type_s=Module.cwrap("AVFrame_pict_type_s",null,["number","number"]);var AVFrame_pts=Module.AVFrame_pts=CAccessors.AVFrame_pts=Module.cwrap("AVFrame_pts","number",["number"]);var AVFrame_pts_s=Module.AVFrame_pts_s=CAccessors.AVFrame_pts_s=Module.cwrap("AVFrame_pts_s",null,["number","number"]);var AVFrame_ptshi=Module.AVFrame_ptshi=CAccessors.AVFrame_ptshi=Module.cwrap("AVFrame_ptshi","number",["number"]);var AVFrame_ptshi_s=Module.AVFrame_ptshi_s=CAccessors.AVFrame_ptshi_s=Module.cwrap("AVFrame_ptshi_s",null,["number","number"]);var AVFrame_sample_aspect_ratio_num=Module.AVFrame_sample_aspect_ratio_num=CAccessors.AVFrame_sample_aspect_ratio_num=Module.cwrap("AVFrame_sample_aspect_ratio_num","number",["number"]);var AVFrame_sample_aspect_ratio_den=Module.AVFrame_sample_aspect_ratio_den=CAccessors.AVFrame_sample_aspect_ratio_den=Module.cwrap("AVFrame_sample_aspect_ratio_den","number",["number"]);var AVFrame_sample_aspect_ratio_num_s=Module.AVFrame_sample_aspect_ratio_num_s=CAccessors.AVFrame_sample_aspect_ratio_num_s=Module.cwrap("AVFrame_sample_aspect_ratio_num_s",null,["number","number"]);var AVFrame_sample_aspect_ratio_den_s=Module.AVFrame_sample_aspect_ratio_den_s=CAccessors.AVFrame_sample_aspect_ratio_den_s=Module.cwrap("AVFrame_sample_aspect_ratio_den_s",null,["number","number"]);var AVFrame_sample_aspect_ratio_s=Module.AVFrame_sample_aspect_ratio_s=CAccessors.AVFrame_sample_aspect_ratio_s=Module.cwrap("AVFrame_sample_aspect_ratio_s",null,["number","number","number"]);var AVFrame_sample_rate=Module.AVFrame_sample_rate=CAccessors.AVFrame_sample_rate=Module.cwrap("AVFrame_sample_rate","number",["number"]);var AVFrame_sample_rate_s=Module.AVFrame_sample_rate_s=CAccessors.AVFrame_sample_rate_s=Module.cwrap("AVFrame_sample_rate_s",null,["number","number"]);var AVFrame_time_base_num=Module.AVFrame_time_base_num=CAccessors.AVFrame_time_base_num=Module.cwrap("AVFrame_time_base_num","number",["number"]);var AVFrame_time_base_den=Module.AVFrame_time_base_den=CAccessors.AVFrame_time_base_den=Module.cwrap("AVFrame_time_base_den","number",["number"]);var AVFrame_time_base_num_s=Module.AVFrame_time_base_num_s=CAccessors.AVFrame_time_base_num_s=Module.cwrap("AVFrame_time_base_num_s",null,["number","number"]);var AVFrame_time_base_den_s=Module.AVFrame_time_base_den_s=CAccessors.AVFrame_time_base_den_s=Module.cwrap("AVFrame_time_base_den_s",null,["number","number"]);var AVFrame_time_base_s=Module.AVFrame_time_base_s=CAccessors.AVFrame_time_base_s=Module.cwrap("AVFrame_time_base_s",null,["number","number","number"]);var AVFrame_width=Module.AVFrame_width=CAccessors.AVFrame_width=Module.cwrap("AVFrame_width","number",["number"]);var AVFrame_width_s=Module.AVFrame_width_s=CAccessors.AVFrame_width_s=Module.cwrap("AVFrame_width_s",null,["number","number"]);var AVPixFmtDescriptor_flags=Module.AVPixFmtDescriptor_flags=CAccessors.AVPixFmtDescriptor_flags=Module.cwrap("AVPixFmtDescriptor_flags","number",["number"]);var AVPixFmtDescriptor_flags_s=Module.AVPixFmtDescriptor_flags_s=CAccessors.AVPixFmtDescriptor_flags_s=Module.cwrap("AVPixFmtDescriptor_flags_s",null,["number","number"]);var AVPixFmtDescriptor_log2_chroma_h=Module.AVPixFmtDescriptor_log2_chroma_h=CAccessors.AVPixFmtDescriptor_log2_chroma_h=Module.cwrap("AVPixFmtDescriptor_log2_chroma_h","number",["number"]);var AVPixFmtDescriptor_log2_chroma_h_s=Module.AVPixFmtDescriptor_log2_chroma_h_s=CAccessors.AVPixFmtDescriptor_log2_chroma_h_s=Module.cwrap("AVPixFmtDescriptor_log2_chroma_h_s",null,["number","number"]);var AVPixFmtDescriptor_log2_chroma_w=Module.AVPixFmtDescriptor_log2_chroma_w=CAccessors.AVPixFmtDescriptor_log2_chroma_w=Module.cwrap("AVPixFmtDescriptor_log2_chroma_w","number",["number"]);var AVPixFmtDescriptor_log2_chroma_w_s=Module.AVPixFmtDescriptor_log2_chroma_w_s=CAccessors.AVPixFmtDescriptor_log2_chroma_w_s=Module.cwrap("AVPixFmtDescriptor_log2_chroma_w_s",null,["number","number"]);var AVPixFmtDescriptor_nb_components=Module.AVPixFmtDescriptor_nb_components=CAccessors.AVPixFmtDescriptor_nb_components=Module.cwrap("AVPixFmtDescriptor_nb_components","number",["number"]);var AVPixFmtDescriptor_nb_components_s=Module.AVPixFmtDescriptor_nb_components_s=CAccessors.AVPixFmtDescriptor_nb_components_s=Module.cwrap("AVPixFmtDescriptor_nb_components_s",null,["number","number"]);var av_frame_free_js=Module.av_frame_free_js=CAccessors.av_frame_free_js=function(p){var p2=malloc(4);if(p2===0)throw new Error("Could not malloc");new Uint32Array(Module.HEAPU8.buffer,p2,1)[0]=p;CAccessors.av_frame_free(p2);free(p2)};var sws_getContext=Module.sws_getContext=CAccessors.sws_getContext=Module.cwrap("sws_getContext","number",["number","number","number","number","number","number","number","number","number","number"]);var sws_freeContext=Module.sws_freeContext=CAccessors.sws_freeContext=Module.cwrap("sws_freeContext",null,["number"]);var sws_scale_frame=Module.sws_scale_frame=CAccessors.sws_scale_frame=Module.cwrap("sws_scale_frame","number",["number","number","number"]);var readerCallbacks={open:function(stream){if(stream.flags&3){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}},close:function(){},read:function(stream,buffer,offset,length,position){var data=Module.readBuffers[stream.node.name];if(!data||data.buf.length===0&&!data.eof){if(Module.onread){try{var rr=Module.onread(stream.node.name,position,length);if(rr&&rr.then&&rr.catch){rr.catch(function(ex){ff_reader_dev_send(stream.node.name,null,{error:ex})})}}catch(ex){ff_reader_dev_send(stream.node.name,null,{error:ex})}}data=Module.readBuffers[stream.node.name]}if(!data)throw new FS.ErrnoError(ERRNO_CODES.EAGAIN);if(data.error){Module.fsThrownError=data.error;throw new FS.ErrnoError(ERRNO_CODES.ECANCELED)}if(data.errorCode)throw new FS.ErrnoError(data.errorCode);if(data.buf.length===0){if(data.eof){return 0}else{data.ready=false;throw new FS.ErrnoError(ERRNO_CODES.EAGAIN)}}var ret;if(length<data.buf.length){ret=data.buf.subarray(0,length);data.buf=data.buf.slice(length)}else{ret=data.buf;data.buf=new Uint8Array(0)}new Uint8Array(buffer.buffer).set(ret,offset);return ret.length},write:function(){throw new FS.ErrnoError(ERRNO_CODES.EIO)},llseek:function(){throw new FS.ErrnoError(ERRNO_CODES.ESPIPE)}};var blockReaderCallbacks={open:function(stream){if(stream.flags&3)throw new FS.ErrnoError(ERRNO_CODES.EPERM)},close:function(){},read:function(stream,buffer,offset,length,position){var data=Module.blockReadBuffers[stream.node.name];if(!data)throw new FS.ErrnoError(ERRNO_CODES.EAGAIN);if(data.error){Module.fsThrownError=data.error;throw new FS.ErrnoError(ERRNO_CODES.ECANCELED)}if(data.errorCode)throw new FS.ErrnoError(data.errorCode);var bufMin=data.position;var bufMax=data.position+data.buf.length;if(position<bufMin||position>=bufMax){if(position>=stream.node.ff_block_reader_dev_size)return 0;if(!Module.onblockread)throw new FS.ErrnoError(ERRNO_CODES.EIO);try{var brr=Module.onblockread(stream.node.name,position,length);if(brr&&brr.then&&brr.catch){brr.catch(function(ex){ff_block_reader_dev_send(stream.node.name,position,null,{error:ex})})}}catch(ex){Module.fsThrownError=ex;throw new FS.ErrnoError(ERRNO_CODES.ECANCELED)}bufMin=data.position;bufMax=data.position+data.buf.length;if(position<bufMin||position>=bufMax){data.ready=false;throw new FS.ErrnoError(ERRNO_CODES.EAGAIN)}}var bufPos=position-bufMin;var ret;if(bufPos+length<data.buf.length){ret=data.buf.subarray(bufPos,bufPos+length)}else{ret=data.buf.subarray(bufPos,data.buf.length)}new Uint8Array(buffer.buffer).set(ret,offset);return ret.length},write:function(){throw new FS.ErrnoError(ERRNO_CODES.EIO)},llseek:function(stream,offset,whence){if(whence===2)offset=stream.node.size+offset;else if(whence===1)offset+=stream.position;return offset}};var writerCallbacks={open:function(stream){if(!(stream.flags&1)){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}},close:function(){},read:function(){throw new FS.ErrnoError(ERRNO_CODES.EIO)},write:function(stream,buffer,offset,length,position){if(!Module.onwrite)throw new FS.ErrnoError(ERRNO_CODES.EIO);Module.onwrite(stream.node.name,position,buffer.subarray(offset,offset+length));return length},llseek:function(stream,offset,whence){if(whence===2)throw new FS.ErrnoError(ERRNO_CODES.EIO);else if(whence===1)offset+=stream.position;return offset}};var streamWriterCallbacks=Object.create(writerCallbacks);streamWriterCallbacks.write=function(stream,buffer,offset,length,position){if(position!=stream.position)throw new FS.ErrnoError(ERRNO_CODES.ESPIPE);return writerCallbacks.write(stream,buffer,offset,length,position)};streamWriterCallbacks.llseek=function(){throw new FS.ErrnoError(ERRNO_CODES.ESPIPE)};var streamWriterFS=Object.create(MEMFS);streamWriterFS.mount=function(mount){return streamWriterFS.createNode(null,"/",16384|511,0)};streamWriterFS.createNode=function(){var node=MEMFS.createNode.apply(MEMFS,arguments);if(FS.isDir(node.mode)){if(!streamWriterFS.dir_node_ops){streamWriterFS.dir_node_ops=Object.create(node.node_ops);streamWriterFS.dir_node_ops.mknod=function(parent,name,mode,dev){return streamWriterFS.createNode(parent,name,mode,dev)}}node.node_ops=streamWriterFS.dir_node_ops}else if(FS.isFile(node.mode)){node.stream_ops=writerCallbacks}return node};function fsBinding(of){Module[of]=function(){try{return FS[of].apply(FS,arguments)}catch(ex){if(ex&&ex.name==="ErrnoError"){ex.message=strerror(ex.errno);if(typeof arguments[0]==="string")ex.message=arguments[0]+": "+ex.message}throw ex}}}var readerDev=FS.makedev(44,0);FS.registerDevice(readerDev,readerCallbacks);Module.readBuffers=Object.create(null);Module.blockReadBuffers=Object.create(null);var writerDev=FS.makedev(44,1);FS.registerDevice(writerDev,writerCallbacks);var streamWriterDev=FS.makedev(44,2);FS.registerDevice(streamWriterDev,streamWriterCallbacks);fsBinding("readFile");fsBinding("writeFile");fsBinding("unlink");fsBinding("unmount");fsBinding("mkdev");fsBinding("createLazyFile");Module.mkreaderdev=function(loc,mode){FS.mkdev(loc,mode?mode:511,readerDev);Module.readBuffers[loc]={buf:new Uint8Array(0),eof:false,errorCode:0,error:null};return 0};var mkblockreaderdev=Module.mkblockreaderdev=function(name,size){FS.writeFile(name,new Uint8Array(0));var f=FS.open(name,0);var super_node_ops=f.node.node_ops;var node_ops=f.node.node_ops=Object.create(super_node_ops);node_ops.getattr=function(node){var ret=super_node_ops.getattr(node);ret.size=size;ret.blksize=4096;ret.blocks=Math.ceil(size/4096);return ret};f.node.stream_ops=blockReaderCallbacks;f.node.ff_block_reader_dev_size=size;Module.blockReadBuffers[name]={position:-1,buf:new Uint8Array(0),ready:false,errorCode:0,error:null};FS.close(f)};var readaheads={};var preReadaheadOnBlockRead=null;function readaheadOnBlockRead(name,position,length){if(!(name in readaheads)){if(preReadaheadOnBlockRead)return preReadaheadOnBlockRead(name,position,length);return}var ra=readaheads[name];function then(){if(ra.position!==position){ra.position=position;ra.buf=null;ra.bufPromise=ra.file.slice(position,position+length).arrayBuffer().then(function(ret){ra.buf=ret}).catch(function(ex){console.error(ex+"\n"+ex.stack);ra.buf=new Uint8Array(0)}).then(then);return}ff_block_reader_dev_send(name,position,new Uint8Array(ra.buf));position+=length;ra.position=position;ra.buf=null;ra.bufPromise=ra.file.slice(position,position+length).arrayBuffer().then(function(ret){ra.buf=ret}).catch(function(ex){console.error(ex+"\n"+ex.stack);ra.buf=new Uint8Array(0)})}if(!ra.buf&&ra.bufPromise)ra.bufPromise.then(then);else then()}Module.mkreadaheadfile=function(name,file){if(Module.onblockread!==readaheadOnBlockRead){preReadaheadOnBlockRead=Module.onblockread;Module.onblockread=readaheadOnBlockRead}mkblockreaderdev(name,file.size);readaheads[name]={file,position:-1,bufPromise:null,buf:null}};Module.unlinkreadaheadfile=function(name){FS.unlink(name);delete readaheads[name]};var mkwriterdev=Module.mkwriterdev=function(loc,mode){FS.mkdev(loc,mode?mode:511,writerDev);return 0};Module.mkstreamwriterdev=function(loc,mode){FS.mkdev(loc,mode?mode:511,streamWriterDev);return 0};Module.mountwriterfs=function(mountpoint){try{FS.mkdir(mountpoint)}catch(ex){}FS.mount(streamWriterFS,{},mountpoint);return 0};Module.ff_reader_dev_waiters=Object.create(null);Module.mkworkerfsfile=function(name,blob){FS.mkdir("/"+name+".d");FS.mount(WORKERFS,{blobs:[{name,data:blob}]},"/"+name+".d");return"/"+name+".d/"+name};Module.unlinkworkerfsfile=function(name){FS.unmount("/"+name+".d");FS.rmdir("/"+name+".d")};var fsfhs={};var preFSFHOnWrite=null;function fsfhOnWrite(name,position,buffer){if(!(name in fsfhs)){if(preFSFHOnWrite)return preFSFHOnWrite(name,position,buffer);return}var h=fsfhs[name];buffer=buffer.slice(0);if(h.syncHandle){h.syncHandle.write(buffer.buffer,{at:position});return}var p=h.promise.then(function(){return h.handle.write({type:"write",position,data:buffer})});h.promise=p.catch(console.error);return p}Module.mkfsfhfile=function(name,fsfh){if(Module.onwrite!==fsfhOnWrite){preFSFHOnWrite=Module.onwrite;Module.onwrite=fsfhOnWrite}mkwriterdev(name);var h=fsfhs[name]={promise:Promise.all([])};h.promise=h.promise.then(function(){return fsfh.createSyncAccessHandle()}).then(function(syncHandle){h.syncHandle=syncHandle}).catch(function(){return fsfh.createWritable()}).then(function(handle){h.handle=handle});return h.promise};Module.unlinkfsfhfile=function(name){FS.unlink(name);var h=fsfhs[name];delete fsfhs[name];if(h.syncHandle){h.syncHandle.close();return Promise.all([])}return h.promise.then(function(){return h.handle.close()})};var ff_reader_dev_send=Module.ff_reader_dev_send=function(name,data,opts){opts=opts||{};var idata=Module.readBuffers[name];if(data===null){idata.eof=true}else{var newbuf=new Uint8Array(idata.buf.length+data.length);newbuf.set(idata.buf);newbuf.set(data,idata.buf.length);idata.buf=newbuf}idata.ready=true;idata.errorCode=0;if(typeof opts.errorCode==="number")idata.errorCode=opts.errorCode;idata.error=null;if(opts.error)idata.error=opts.error;var waiters=Module.ff_reader_dev_waiters[name]||[];delete Module.ff_reader_dev_waiters[name];for(var i=0;i<waiters.length;i++)waiters[i]()};var ff_block_reader_dev_send=Module.ff_block_reader_dev_send=function(name,pos,data,opts){opts=opts||{};var idata=Module.blockReadBuffers[name];idata.position=pos;idata.buf=data;idata.ready=true;idata.errorCode=0;idata.error=null;if(data===null)idata.buf=new Uint8Array(0);if(typeof opts.errorCode==="number")idata.errorCode=opts.errorCode;if(opts.error)idata.error=opts.error;var waiters=Module.ff_reader_dev_waiters[name]||[];delete Module.ff_reader_dev_waiters[name];for(var i=0;i<waiters.length;i++)waiters[i]()};var ff_reader_dev_waiting=Module.ff_reader_dev_waiting=function(name){console.log("[libav.js] ff_reader_dev_waiting is deprecated. Use the onread callback.");return ff_nothing().then(function(){if(name)return!!Module.ff_reader_dev_waiters[name];else return!!Object.keys(Module.ff_reader_dev_waiters).length})};Module.readerDevReady=function(fd){var stream=FS.streams[fd].node.name;if(stream in Module.readBuffers)return Module.readBuffers[stream].ready;else if(stream in Module.blockReadBuffers)return Module.blockReadBuffers[stream].ready;return false};Module.fdName=function(fd){return FS.streams[fd].node.name};var ff_init_muxer=Module.ff_init_muxer=function(opts,streamCtxs){var oformat=opts.oformat?opts.oformat:0;var format_name=opts.format_name?opts.format_name:null;var filename=opts.filename?opts.filename:null;var oc=avformat_alloc_output_context2_js(oformat,format_name,filename);if(oc===0)throw new Error("Failed to allocate output context");var fmt=AVFormatContext_oformat(oc);var sts=[];streamCtxs.forEach(function(ctx){var st=avformat_new_stream(oc,0);if(st===0)throw new Error("Could not allocate stream");sts.push(st);var codecpar=AVStream_codecpar(st);var ret;if(opts.codecpars){ret=avcodec_parameters_copy(codecpar,ctx[0]);AVCodecParameters_codec_tag_s(codecpar,0)}else{ret=avcodec_parameters_from_context(codecpar,ctx[0])}if(ret<0)throw new Error("Could not copy the stream parameters: "+ff_error(ret));AVStream_time_base_s(st,ctx[1],ctx[2])});if(opts.device)FS.mkdev(opts.filename,511,writerDev);var pb=null;if(opts.open){pb=avio_open2_js(opts.filename,2,0,0);if(pb===0)throw new Error("Could not open file");AVFormatContext_pb_s(oc,pb)}return[oc,fmt,pb,sts]};var ff_free_muxer=Module.ff_free_muxer=function(oc,pb){avformat_free_context(oc);if(pb)avio_close(pb)};function ff_init_demuxer_file(filename,fmt){var fmt_ctx;return avformat_open_input_js(filename,fmt?fmt:null,null).then(function(ret){fmt_ctx=ret;if(fmt_ctx===0)throw new Error("Could not open source file");return avformat_find_stream_info(fmt_ctx,0)}).then(function(){var nb_streams=AVFormatContext_nb_streams(fmt_ctx);var streams=[];for(var i=0;i<nb_streams;i++){var inStream=AVFormatContext_streams_a(fmt_ctx,i);var outStream={ptr:inStream,index:i};var codecpar=AVStream_codecpar(inStream);outStream.codecpar=codecpar;outStream.codec_type=AVCodecParameters_codec_type(codecpar);outStream.codec_id=AVCodecParameters_codec_id(codecpar);outStream.time_base_num=AVStream_time_base_num(inStream);outStream.time_base_den=AVStream_time_base_den(inStream);outStream.duration_time_base=AVStream_duration(inStream)+AVStream_durationhi(inStream)*4294967296;outStream.duration=outStream.duration_time_base*outStream.time_base_num/outStream.time_base_den;streams.push(outStream)}return[fmt_ctx,streams]})}Module.ff_init_demuxer_file=function(){var args=arguments;return serially(function(){return ff_init_demuxer_file.apply(void 0,args)})};var ff_write_multi=Module.ff_write_multi=function(oc,pkt,inPackets,interleave){var step=av_interleaved_write_frame;if(interleave===false)step=av_write_frame;var tbs={};inPackets.forEach(function(inPacket){var ret=av_packet_make_writable(pkt);if(ret<0)throw new Error("Error making packet writable: "+ff_error(ret));ff_copyin_packet(pkt,inPacket);var sti=inPacket.stream_index||0;var iptbNum,iptbDen;if(typeof inPacket==="number"){iptbNum=AVPacket_time_base_num(pkt);iptbDen=AVPacket_time_base_den(pkt)}else{iptbNum=inPacket.time_base_num;iptbDen=inPacket.time_base_den}if(iptbNum){var tb=tbs[sti];if(!tb){var str=AVFormatContext_streams_a(oc,sti);tb=tbs[sti]=[AVStream_time_base_num(str),AVStream_time_base_den(str)]}if(tb[0]){av_packet_rescale_ts_js(pkt,iptbNum,iptbDen,tb[0],tb[1]);AVPacket_time_base_s(pkt,tb[0],tb[1])}}step(oc,pkt);av_packet_unref(pkt)});av_packet_unref(pkt)};function ff_read_frame_multi(fmt_ctx,pkt,opts){var sz=0;var outPackets={};var tbs={};if(typeof opts==="number")opts={limit:opts};if(typeof opts==="undefined")opts={};var unify=!!opts.unify;var copyoutPacket=ff_copyout_packet;if(opts.copyoutPacket)copyoutPacket=ff_copyout_packet_versions[opts.copyoutPacket];function step(){return av_read_frame(fmt_ctx,pkt).then(function(ret){if(ret<0)return[ret,outPackets];var packet=copyoutPacket(pkt);var stri=AVPacket_stream_index(pkt);var ptbNum,ptbDen;if(typeof packet==="number"){ptbNum=AVPacket_time_base_num(packet);ptbDen=AVPacket_time_base_den(packet)}else{ptbNum=packet.time_base_num;ptbDen=packet.time_base_den}if(!ptbNum){var tb=tbs[stri];if(!tb){var str=AVFormatContext_streams_a(fmt_ctx,stri);tb=tbs[stri]=[AVStream_time_base_num(str),AVStream_time_base_den(str)]}if(typeof packet==="number"){AVPacket_time_base_s(packet,tb[0],tb[1])}else{packet.time_base_num=tb[0];packet.time_base_den=tb[1]}}var idx=unify?0:stri;if(!(idx in outPackets))outPackets[idx]=[];outPackets[idx].push(packet);sz+=AVPacket_size(pkt);av_packet_unref(pkt);if(opts.limit&&sz>=opts.limit)return[-6,outPackets];return Promise.all([]).then(step)})}return step()}Module.ff_read_frame_multi=function(){var args=arguments;return serially(function(){return ff_read_frame_multi.apply(void 0,args)})};Module.ff_read_multi=function(fmt_ctx,pkt,devfile,opts){console.log("[libav.js] ff_read_multi is deprecated. Use ff_read_frame_multi.");return Module.ff_read_frame_multi(fmt_ctx,pkt,opts)};var ff_set_packet=Module.ff_set_packet=function(pkt,data){if(data.length===0){av_packet_unref(pkt)}else{var size=AVPacket_size(pkt);if(size<data.length){var ret=av_grow_packet(pkt,data.length-size);if(ret<0)throw new Error("Error growing packet: "+ff_error(ret))}else if(size>data.length)av_shrink_packet(pkt,data.length)}var ptr=AVPacket_data(pkt);Module.HEAPU8.set(data,ptr)};var ff_copyout_packet=Module.ff_copyout_packet=function(pkt){var data=AVPacket_data(pkt);var size=AVPacket_size(pkt);var data=copyout_u8(data,size);return{data,libavjsTransfer:[data.buffer],pts:AVPacket_pts(pkt),ptshi:AVPacket_ptshi(pkt),dts:AVPacket_dts(pkt),dtshi:AVPacket_dtshi(pkt),time_base_num:AVPacket_time_base_num(pkt),time_base_den:AVPacket_time_base_den(pkt),stream_index:AVPacket_stream_index(pkt),flags:AVPacket_flags(pkt),duration:AVPacket_duration(pkt),durationhi:AVPacket_durationhi(pkt),side_data:ff_copyout_side_data(AVPacket_side_data(pkt),AVPacket_side_data_elems(pkt))}};var ff_copyout_side_data=Module.ff_copyout_side_data=function(side_data,side_data_elems){if(!side_data)return null;var ret=[];for(var i=0;i<side_data_elems;i++){var data=AVPacketSideData_data(side_data,i);var size=AVPacketSideData_size(side_data,i);ret.push({data:copyout_u8(data,size),type:AVPacketSideData_type(side_data,i)})}return ret};var ff_copyout_packet_ptr=Module.ff_copyout_packet_ptr=function(pkt){var ret=av_packet_clone(pkt);if(!ret)throw new Error("Failed to clone packet");return ret};var ff_copyout_packet_versions={default:ff_copyout_packet,ptr:ff_copyout_packet_ptr};var ff_copyin_packet=Module.ff_copyin_packet=function(pktPtr,packet){if(typeof packet==="number"){av_packet_unref(pktPtr);var res=av_packet_ref(pktPtr,packet);if(res<0)throw new Error("Failed to reference packet: "+ff_error(res));av_packet_unref(packet);av_packet_free_js(packet);return}ff_set_packet(pktPtr,packet.data);["dts","dtshi","duration","durationhi","flags","stream_index","pts","ptshi","time_base_num","time_base_den"].forEach(function(key){if(key in packet)CAccessors["AVPacket_"+key+"_s"](pktPtr,packet[key])});ff_copyin_side_data(pktPtr,packet.side_data)};var ff_copyin_side_data=Module.ff_copyin_side_data=function(pktPtr,side_data){AVPacket_side_data_s(pktPtr,0);AVPacket_side_data_elems_s(pktPtr,0);if(!side_data)return;side_data.forEach(function(elem){var data=av_packet_new_side_data(pktPtr,elem.type,elem.data.length);if(data===0)throw new Error("Failed to allocate side data!");copyin_u8(data,elem.data)})};var ff_copyout_codecpar=Module.ff_copyout_codecpar=function(codecpar){return{bit_rate:AVCodecParameters_bit_rate(codecpar),channel_layoutmask:AVCodecParameters_channel_layoutmask(codecpar),channels:AVCodecParameters_channels(codecpar),chroma_location:AVCodecParameters_chroma_location(codecpar),codec_id:AVCodecParameters_codec_id(codecpar),codec_tag:AVCodecParameters_codec_tag(codecpar),codec_type:AVCodecParameters_codec_type(codecpar),color_primaries:AVCodecParameters_color_primaries(codecpar),color_range:AVCodecParameters_color_range(codecpar),color_space:AVCodecParameters_color_space(codecpar),color_trc:AVCodecParameters_color_trc(codecpar),format:AVCodecParameters_format(codecpar),height:AVCodecParameters_height(codecpar),level:AVCodecParameters_level(codecpar),profile:AVCodecParameters_profile(codecpar),sample_rate:AVCodecParameters_sample_rate(codecpar),width:AVCodecParameters_width(codecpar),extradata:ff_copyout_codecpar_extradata(codecpar),coded_side_data:ff_copyout_side_data(AVCodecParameters_coded_side_data(codecpar),AVCodecParameters_nb_coded_side_data(codecpar))}};var ff_copyout_codecpar_extradata=Module.ff_copyout_codecpar_extradata=function(codecpar){var extradata=AVCodecParameters_extradata(codecpar);var extradata_size=AVCodecParameters_extradata_size(codecpar);if(!extradata||!extradata_size)return null;return copyout_u8(extradata,extradata_size)};var ff_copyin_codecpar=Module.ff_copyin_codecpar=function(codecparPtr,codecpar){["bit_rate","channel_layoutmask","channels","chroma_location","codec_id","codec_tag","codec_type","color_primaries","color_range","color_space","color_trc","format","height","level","profile","sample_rate","width"].forEach(function(key){if(key in codecpar)CAccessors["AVCodecParameters_"+key+"_s"](codecparPtr,codecpar[key])});ff_copyin_codecpar_extradata(codecparPtr,codecpar.extradata);ff_copyin_codecpar_side_data(codecparPtr,codecpar.side_data)};var ff_copyin_codecpar_extradata=Module.ff_copyin_codecpar_extradata=function(codecparPtr,extradata){if(!extradata){AVCodecParameters_extradata_s(codecparPtr,0);AVCodecParameters_extradata_size_s(codecparPtr,0)}else{var extradataPtr=malloc(extradata.length);copyin_u8(extradataPtr,extradata);AVCodecParameters_extradata_s(codecparPtr,extradataPtr);AVCodecParameters_extradata_size_s(codecparPtr,extradata.length)}};var ff_copyin_codecpar_side_data=Module.ff_copyin_codecpar_side_data=function(codecpar,side_data){AVCodecParameters_coded_side_data_s(codecpar,0);AVCodecParameters_nb_coded_side_data_s(codecpar,0);if(!side_data)return;side_data.forEach(function(elem){var data=ff_codecpar_new_side_data(codecpar,elem.type,elem.data.length);if(data===0)throw new Error("Failed to allocate side data!");copyin_u8(data,elem.data)})};var ff_init_encoder=Module.ff_init_encoder=function(name,opts){opts=opts||{};var codec=avcodec_find_encoder_by_name(name);if(codec===0)throw new Error("Codec not found");var c=avcodec_alloc_context3(codec);if(c===0)throw new Error("Could not allocate audio codec context");var ctxProps=opts.ctx||{};for(var prop in ctxProps)this["AVCodecContext_"+prop+"_s"](c,ctxProps[prop]);var time_base=opts.time_base||[1,1e3];AVCodecContext_time_base_s(c,time_base[0],time_base[1]);var options=0;if(opts.options){for(var prop in opts.options)options=av_dict_set_js(options,prop,opts.options[prop],0)}var ret=avcodec_open2_js(c,codec,options);if(ret<0)throw new Error("Could not open codec: "+ff_error(ret));var frame=av_frame_alloc();if(frame===0)throw new Error("Could not allocate frame");var pkt=av_packet_alloc();if(pkt===0)throw new Error("Could not allocate packet");var frame_size=AVCodecContext_frame_size(c);return[codec,c,frame,pkt,frame_size]};var ff_init_decoder=Module.ff_init_decoder=function(name,config){if(typeof config==="number"){config={codecpar:config}}else{config=config||{}}var codec,ret;if(typeof name==="string")codec=avcodec_find_decoder_by_name(name);else codec=avcodec_find_decoder(name);if(codec===0)throw new Error("Codec not found");var c=avcodec_alloc_context3(codec);if(c===0)throw new Error("Could not allocate audio codec context");var codecid=AVCodecContext_codec_id(c);if(config.codecpar){var codecparPtr=0;var codecpar=config.codecpar;if(typeof codecpar==="object"){codecparPtr=avcodec_parameters_alloc();if(codecparPtr===0)throw new Error("Failed to allocate codec parameters");ff_copyin_codecpar(codecparPtr,codecpar);codecpar=codecparPtr}ret=avcodec_parameters_to_context(c,codecpar);if(codecparPtr)avcodec_parameters_free_js(codecparPtr);if(ret<0)throw new Error("Could not set codec parameters: "+ff_error(ret))}if(AVCodecContext_codec_id(c)===0)AVCodecContext_codec_id_s(c,codecid);if(config.time_base)AVCodecContext_time_base_s(c,config.time_base[0],config.time_base[1]);ret=avcodec_open2(c,codec,0);if(ret<0)throw new Error("Could not open codec: "+ff_error(ret));var pkt=av_packet_alloc();if(pkt===0)throw new Error("Could not allocate packet");var frame=av_frame_alloc();if(frame===0)throw new Error("Could not allocate frame");return[codec,c,pkt,frame]};var ff_free_encoder=Module.ff_free_encoder=function(c,frame,pkt){av_frame_free_js(frame);av_packet_free_js(pkt);avcodec_free_context_js(c)};var ff_free_decoder=Module.ff_free_decoder=function(c,pkt,frame){ff_free_encoder(c,frame,pkt)};var ff_encode_multi=Module.ff_encode_multi=function(ctx,frame,pkt,inFrames,config){if(typeof config==="boolean"){config={fin:config}}else{config=config||{}}var outPackets=[];var tbNum=AVCodecContext_time_base_num(ctx);var tbDen=AVCodecContext_time_base_den(ctx);var copyoutPacket=function(ptr){var ret=ff_copyout_packet(ptr);if(!ret.time_base_num){ret.time_base_num=tbNum;ret.time_base_den=tbDen}return ret};if(config.copyoutPacket==="ptr"){copyoutPacket=function(ptr){var ret=ff_copyout_packet_ptr(ptr);if(!AVPacket_time_base_num(ret))AVPacket_time_base_s(ret,tbNum,tbDen);return ret}}function handleFrame(inFrame){if(inFrame!==null){ff_copyin_frame(frame,inFrame);if(tbNum){if(typeof inFrame==="number"){var itbn=AVFrame_time_base_num(frame);if(itbn){ff_frame_rescale_ts_js(frame,itbn,AVFrame_time_base_den(frame),tbNum,tbDen);AVFrame_time_base_s(frame,tbNum,tbDen)}}else if(inFrame&&inFrame.time_base_num){ff_frame_rescale_ts_js(frame,inFrame.time_base_num,inFrame.time_base_den,tbNum,tbDen);AVFrame_time_base_s(frame,tbNum,tbDen)}}}var ret=avcodec_send_frame(ctx,inFrame?frame:0);if(ret<0)throw new Error("Error sending the frame to the encoder: "+ff_error(ret));if(inFrame)av_frame_unref(frame);while(true){ret=avcodec_receive_packet(ctx,pkt);if(ret===-6||ret===-541478725)return;else if(ret<0)throw new Error("Error encoding audio frame: "+ff_error(ret));outPackets.push(copyoutPacket(pkt));av_packet_unref(pkt)}}inFrames.forEach(handleFrame);if(config.fin)handleFrame(null);return outPackets};var ff_decode_multi=Module.ff_decode_multi=function(ctx,pkt,frame,inPackets,config){var outFrames=[];var transfer=[];if(typeof config==="boolean"){config={fin:config}}else{config=config||{}}var tbNum=AVCodecContext_time_base_num(ctx);var tbDen=AVCodecContext_time_base_den(ctx);var copyoutFrameO=ff_copyout_frame;if(config.copyoutFrame)copyoutFrameO=ff_copyout_frame_versions[config.copyoutFrame];var copyoutFrame=function(ptr){var ret=copyoutFrameO(ptr);if(!ret.time_base_num){ret.time_base_num=tbNum;ret.time_base_den=tbDen}return ret};if(config.copyoutFrame==="ptr"){copyoutFrame=function(ptr){var ret=ff_copyout_frame_ptr(ptr);if(!AVFrame_time_base_num(ret))AVFrame_time_base_s(ret,tbNum,tbDen);return ret}}function handlePacket(inPacket){var ret;if(inPacket!==null){ret=av_packet_make_writable(pkt);if(ret<0)throw new Error("Failed to make packet writable: "+ff_error(ret));ff_copyin_packet(pkt,inPacket);if(tbNum){if(typeof inPacket==="number"){var iptbn=AVPacket_time_base_num(pkt);if(iptbn){av_packet_rescale_ts_js(pkt,iptbn,AVPacket_time_base_den(pkt),tbNum,tbDen);AVPacket_time_base_s(pkt,tbNum,tbDen)}}else if(inPacket&&inPacket.time_base_num){av_packet_rescale_ts_js(pkt,inPacket.time_base_num,inPacket.time_base_den,tbNum,tbDen);AVPacket_time_base_s(pkt,tbNum,tbDen)}}}else{av_packet_unref(pkt)}ret=avcodec_send_packet(ctx,pkt);if(ret<0){var err="Error submitting the packet to the decoder: "+ff_error(ret);if(!config.ignoreErrors)throw new Error(err);else{console.log(err);av_packet_unref(pkt);return}}av_packet_unref(pkt);while(true){ret=avcodec_receive_frame(ctx,frame);if(ret===-6||ret===-541478725)return;else if(ret<0)throw new Error("Error decoding audio frame: "+ff_error(ret));var outFrame=copyoutFrame(frame);if(outFrame&&outFrame.libavjsTransfer&&outFrame.libavjsTransfer.length)transfer.push.apply(transfer,outFrame.libavjsTransfer);outFrames.push(outFrame);av_frame_unref(frame)}}inPackets.forEach(handlePacket);if(config.fin)handlePacket(null);outFrames.libavjsTransfer=transfer;return outFrames};var ff_copyout_frame=Module.ff_copyout_frame=function(frame){var nb_samples=AVFrame_nb_samples(frame);if(nb_samples===0){var width=AVFrame_width(frame);if(width)return ff_copyout_frame_video_width(frame,width)}var channels=AVFrame_channels(frame);var format=AVFrame_format(frame);var transfer=[];var outFrame={data:null,libavjsTransfer:transfer,channel_layout:AVFrame_channel_layout(frame),channels,format,nb_samples,pts:AVFrame_pts(frame),ptshi:AVFrame_ptshi(frame),time_base_num:AVFrame_time_base_num(frame),time_base_den:AVFrame_time_base_den(frame),sample_rate:AVFrame_sample_rate(frame)};if(format>=5){var data=[];for(var ci=0;ci<channels;ci++){var inData=AVFrame_data_a(frame,ci);var outData=null;switch(format){case 5:outData=copyout_u8(inData,nb_samples);break;case 6:outData=copyout_s16(inData,nb_samples);break;case 7:outData=copyout_s32(inData,nb_samples);break;case 8:outData=copyout_f32(inData,nb_samples);break}if(outData){data.push(outData);transfer.push(outData.buffer)}}outFrame.data=data}else{var ct=channels*nb_samples;var inData=AVFrame_data_a(frame,0);var outData=null;switch(format){case 0:outData=copyout_u8(inData,ct);break;case 1:outData=copyout_s16(inData,ct);break;case 2:outData=copyout_s32(inData,ct);break;case 3:outData=copyout_f32(inData,ct);break}if(outData){outFrame.data=outData;transfer.push(outData.buffer)}}return outFrame};var ff_copyout_frame_video=Module.ff_copyout_frame_video=function(frame){return ff_copyout_frame_video_width(frame,AVFrame_width(frame))};var ff_copyout_frame_video_width=Module.ff_copyout_frame_video=function(frame,width){var height=AVFrame_height(frame);var format=AVFrame_format(frame);var desc=av_pix_fmt_desc_get(format);var log2ch=AVPixFmtDescriptor_log2_chroma_h(desc);var layout=[];var transfer=[];var outFrame={data:null,layout,libavjsTransfer:transfer,width,height,crop:{top:AVFrame_crop_top(frame),bottom:AVFrame_crop_bottom(frame),left:AVFrame_crop_left(frame),right:AVFrame_crop_right(frame)},format:AVFrame_format(frame),flags:AVFrame_flags(frame),key_frame:AVFrame_key_frame(frame),pict_type:AVFrame_pict_type(frame),pts:AVFrame_pts(frame),ptshi:AVFrame_ptshi(frame),time_base_num:AVFrame_time_base_num(frame),time_base_den:AVFrame_time_base_den(frame),sample_aspect_ratio:[AVFrame_sample_aspect_ratio_num(frame),AVFrame_sample_aspect_ratio_den(frame)]};var dataLo=1/0;var dataHi=0;for(var p=0;p<8;p++){var linesize=AVFrame_linesize_a(frame,p);if(!linesize)break;var plane=AVFrame_data_a(frame,p);if(plane<dataLo)dataLo=plane;var h=height;if(p===1||p===2)h>>=log2ch;plane+=linesize*h;if(plane>dataHi)dataHi=plane}outFrame.data=Module.HEAPU8.slice(dataLo,dataHi);transfer.push(outFrame.data.buffer);for(var p=0;p<8;p++){var linesize=AVFrame_linesize_a(frame,p);if(!linesize)break;var plane=AVFrame_data_a(frame,p);layout.push({offset:plane-dataLo,stride:linesize})}return outFrame};var ff_frame_video_packed_size=Module.ff_frame_video_packed_size=function(frame){var width=AVFrame_width(frame);var height=AVFrame_height(frame);var format=AVFrame_format(frame);var desc=av_pix_fmt_desc_get(format);var bpp=1;if(!(AVPixFmtDescriptor_flags(desc)&16))bpp*=AVPixFmtDescriptor_nb_components(desc);var dataSz=0;for(var i=0;i<8;i++){var linesize=AVFrame_linesize_a(frame,i);if(!linesize)break;var w=width*bpp;var h=height;if(i===1||i===2){w>>=AVPixFmtDescriptor_log2_chroma_w(desc);h>>=AVPixFmtDescriptor_log2_chroma_h(desc)}dataSz+=w*h}return dataSz};function ff_copyout_frame_data_packed(data,layout,frame){var width=AVFrame_width(frame);var height=AVFrame_height(frame);var format=AVFrame_format(frame);var desc=av_pix_fmt_desc_get(format);var bpp=1;if(!(AVPixFmtDescriptor_flags(desc)&16))bpp*=AVPixFmtDescriptor_nb_components(desc);var dIdx=0;for(var i=0;i<8;i++){var linesize=AVFrame_linesize_a(frame,i);if(!linesize)break;var inData=AVFrame_data_a(frame,i);var w=width*bpp;var h=height;if(i===1||i===2){w>>=AVPixFmtDescriptor_log2_chroma_w(desc);h>>=AVPixFmtDescriptor_log2_chroma_h(desc)}layout.push({offset:dIdx,stride:w});for(var y=0;y<h;y++){var line=inData+y*linesize;data.set(Module.HEAPU8.subarray(line,line+w),dIdx);dIdx+=w}}}var ff_copyout_frame_video_packed=Module.ff_copyout_frame_video_packed=function(frame){var data=new Uint8Array(ff_frame_video_packed_size(frame));var layout=[];ff_copyout_frame_data_packed(data,layout,frame);var outFrame={data,libavjsTransfer:[data.buffer],width:AVFrame_width(frame),height:AVFrame_height(frame),format:AVFrame_format(frame),flags:AVFrame_flags(frame),key_frame:AVFrame_key_frame(frame),pict_type:AVFrame_pict_type(frame),pts:AVFrame_pts(frame),ptshi:AVFrame_ptshi(frame),time_base_num:AVFrame_time_base_num(frame),time_base_den:AVFrame_time_base_den(frame),sample_aspect_ratio:[AVFrame_sample_aspect_ratio_num(frame),AVFrame_sample_aspect_ratio_den(frame)]};return outFrame};var ff_copyout_frame_video_imagedata=Module.ff_copyout_frame_video_imagedata=function(frame){var width=AVFrame_width(frame);var height=AVFrame_height(frame);var id=new ImageData(width,height);var layout=[];ff_copyout_frame_data_packed(id.data,layout,frame);id.libavjsTransfer=[id.data.buffer];return id};var ff_copyout_frame_ptr=Module.ff_copyout_frame_ptr=function(frame){var ret=av_frame_clone(frame);if(!ret)throw new Error("Failed to allocate new frame");return ret};var ff_copyout_frame_versions={default:ff_copyout_frame,video:ff_copyout_frame_video,video_packed:ff_copyout_frame_video_packed,ImageData:ff_copyout_frame_video_imagedata,ptr:ff_copyout_frame_ptr};var ff_copyin_frame=Module.ff_copyin_frame=function(framePtr,frame){if(typeof frame==="number"){av_frame_unref(framePtr);var ret=av_frame_ref(framePtr,frame);if(ret<0)throw new Error("Failed to reference frame data: "+ff_error(ret));av_frame_unref(frame);av_frame_free_js(frame);return}if(frame.width)return ff_copyin_frame_video(framePtr,frame);var format=frame.format;var channels=frame.channels;if(!channels){var channel_layout=frame.channel_layout;channels=0;while(channel_layout){if(channel_layout&1)channels++;channel_layout>>>=1}}["channel_layout","channels","format","pts","ptshi","sample_rate","time_base_num","time_base_den"].forEach(function(key){if(key in frame)CAccessors["AVFrame_"+key+"_s"](framePtr,frame[key])});var nb_samples;if(format>=5){nb_samples=frame.data[0].length}else{nb_samples=frame.data.length/channels}AVFrame_nb_samples_s(framePtr,nb_samples);if(av_frame_make_writable(framePtr)<0){var ret=av_frame_get_buffer(framePtr,0);if(ret<0)throw new Error("Failed to allocate frame buffers: "+ff_error(ret))}if(format>=5){for(var ci=0;ci<channels;ci++){var data=AVFrame_data_a(framePtr,ci);var inData=frame.data[ci];switch(format){case 5:copyin_u8(data,inData);break;case 6:copyin_s16(data,inData);break;case 7:copyin_s32(data,inData);break;case 8:copyin_f32(data,inData);break}}}else{var data=AVFrame_data_a(framePtr,0);var inData=frame.data;switch(format){case 0:copyin_u8(data,inData);break;case 1:copyin_s16(data,inData);break;case 2:copyin_s32(data,inData);break;case 3:copyin_f32(data,inData);break}}};var ff_copyin_frame_video=Module.ff_copyin_frame_video=function(framePtr,frame){["format","height","key_frame","flags","pict_type","pts","ptshi","width","time_base_num","time_base_den"].forEach(function(key){if(key in frame)CAccessors["AVFrame_"+key+"_s"](framePtr,frame[key])});if("sample_aspect_ratio"in frame){AVFrame_sample_aspect_ratio_s(framePtr,frame.sample_aspect_ratio[0],frame.sample_aspect_ratio[1])}var crop=frame.crop||{top:0,bottom:0,left:0,right:0};AVFrame_crop_top_s(framePtr,crop.top);AVFrame_crop_bottom_s(framePtr,crop.bottom);AVFrame_crop_left_s(framePtr,crop.left);AVFrame_crop_right_s(framePtr,crop.right);var desc=av_pix_fmt_desc_get(frame.format);var log2cw=AVPixFmtDescriptor_log2_chroma_w(desc);var log2ch=AVPixFmtDescriptor_log2_chroma_h(desc);if(av_frame_make_writable(framePtr)<0){var ret=av_frame_get_buffer(framePtr,0);if(ret<0)throw new Error("Failed to allocate frame buffers: "+ff_error(ret))}var layout=frame.layout;if(!layout){layout=[];var bpp=1;if(!(AVPixFmtDescriptor_flags(desc)&16))bpp*=AVPixFmtDescriptor_nb_components(desc);var off=0;for(var p=0;p<8;p++){var linesize=AVFrame_linesize_a(framePtr,p);if(!linesize)break;var w=frame.width;var h=frame.height;if(p===1||p===2){w>>=log2cw;h>>=log2ch}layout.push({offset:off,stride:w*bpp});off+=w*h*bpp}}for(var p=0;p<layout.length;p++){var lplane=layout[p];var linesize=AVFrame_linesize_a(framePtr,p);var data=AVFrame_data_a(framePtr,p);var h=frame.height;if(p===1||p===2)h>>=log2ch;var ioff=lplane.offset;var ooff=0;var stride=Math.min(lplane.stride,linesize);for(var y=0;y<h;y++){copyin_u8(data+ooff,frame.data.subarray(ioff,ioff+stride));ooff+=linesize;ioff+=lplane.stride}}};if(runtimeInitialized){moduleRtn=Module}else{moduleRtn=new Promise((resolve,reject)=>{readyPromiseResolve=resolve;readyPromiseReject=reject})}
|
|
574
|
+
;return moduleRtn}export default LibAVFactory;
|
|
575
|
+
/*
|
|
576
|
+
* Copyright (C) 2019-2024 Yahweasel
|
|
577
|
+
*
|
|
578
|
+
* Permission to use, copy, modify, and/or distribute this software for any
|
|
579
|
+
* purpose with or without fee is hereby granted.
|
|
580
|
+
*
|
|
581
|
+
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
582
|
+
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
583
|
+
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
|
584
|
+
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
585
|
+
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
|
|
586
|
+
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
|
587
|
+
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
588
|
+
*/
|
|
589
|
+
|
|
590
|
+
if (/* We're in a worker */
|
|
591
|
+
typeof importScripts !== "undefined" &&
|
|
592
|
+
/* We're not being loaded with noworker from the main code */
|
|
593
|
+
typeof LibAV === "undefined" &&
|
|
594
|
+
/* We're not being loaded as a thread */
|
|
595
|
+
(
|
|
596
|
+
(typeof self === "undefined" && typeof Module === "undefined") ||
|
|
597
|
+
(typeof self !== "undefined" && self.name !== "em-pthread")
|
|
598
|
+
)
|
|
599
|
+
) (function() {
|
|
600
|
+
var libav;
|
|
601
|
+
|
|
602
|
+
Promise.all([]).then(function() {
|
|
603
|
+
/* We're the primary code for this worker. The host should ask us to
|
|
604
|
+
* load immediately. */
|
|
605
|
+
return new Promise(function(res, rej) {
|
|
606
|
+
onmessage = function(e) {
|
|
607
|
+
if (e && e.data && e.data.config) {
|
|
608
|
+
LibAVFactory({
|
|
609
|
+
wasmurl: e.data.config.wasmurl,
|
|
610
|
+
variant: e.data.config.variant
|
|
611
|
+
}).then(res).catch(rej);
|
|
612
|
+
}
|
|
613
|
+
};
|
|
614
|
+
});
|
|
615
|
+
|
|
616
|
+
}).then(function(lib) {
|
|
617
|
+
libav = lib;
|
|
618
|
+
|
|
619
|
+
// Now we're ready for normal messages
|
|
620
|
+
onmessage = function(e) {
|
|
621
|
+
var id = e.data[0];
|
|
622
|
+
var fun = e.data[1];
|
|
623
|
+
var args = e.data.slice(2);
|
|
624
|
+
var ret = void 0;
|
|
625
|
+
var succ = true;
|
|
626
|
+
|
|
627
|
+
function reply() {
|
|
628
|
+
var transfer = [];
|
|
629
|
+
if (ret && ret.libavjsTransfer)
|
|
630
|
+
transfer = ret.libavjsTransfer
|
|
631
|
+
try {
|
|
632
|
+
postMessage([id, fun, succ, ret], transfer);
|
|
633
|
+
} catch (ex) {
|
|
634
|
+
try {
|
|
635
|
+
ret = JSON.parse(JSON.stringify(
|
|
636
|
+
ret, function(k, v) { return v; }
|
|
637
|
+
));
|
|
638
|
+
postMessage([id, fun, succ, ret], transfer);
|
|
639
|
+
} catch (ex) {
|
|
640
|
+
postMessage([id, fun, succ, "" + ret]);
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
try {
|
|
646
|
+
ret = libav[fun].apply(libav, args);
|
|
647
|
+
} catch (ex) {
|
|
648
|
+
succ = false;
|
|
649
|
+
ret = ex;
|
|
650
|
+
}
|
|
651
|
+
if (succ && ret && ret.then) {
|
|
652
|
+
// Let the promise resolve
|
|
653
|
+
ret.then(function(res) {
|
|
654
|
+
ret = res;
|
|
655
|
+
}).catch(function(ex) {
|
|
656
|
+
succ = false;
|
|
657
|
+
ret = ex;
|
|
658
|
+
}).then(reply);
|
|
659
|
+
|
|
660
|
+
} else reply();
|
|
661
|
+
};
|
|
662
|
+
|
|
663
|
+
libav.onwrite = function(name, pos, buf) {
|
|
664
|
+
/* We have to buf.slice(0) so we don't duplicate the entire heap just
|
|
665
|
+
* to get one part of it in postMessage */
|
|
666
|
+
buf = buf.slice(0);
|
|
667
|
+
postMessage(["onwrite", "onwrite", true, [name, pos, buf]], [buf.buffer]);
|
|
668
|
+
};
|
|
669
|
+
|
|
670
|
+
libav.onread = function(name, pos, len) {
|
|
671
|
+
postMessage(["onread", "onread", true, [name, pos, len]]);
|
|
672
|
+
};
|
|
673
|
+
|
|
674
|
+
libav.onblockread = function(name, pos, len) {
|
|
675
|
+
postMessage(["onblockread", "onblockread", true, [name, pos, len]]);
|
|
676
|
+
};
|
|
677
|
+
|
|
678
|
+
postMessage(["onready", "onready", true, null]);
|
|
679
|
+
|
|
680
|
+
}).catch(function(ex) {
|
|
681
|
+
try {
|
|
682
|
+
postMessage(["error", "error", false, ex]);
|
|
683
|
+
} catch (_) {
|
|
684
|
+
postMessage(["error", "error", false, ex + "\n" + ex.stack]);
|
|
685
|
+
}
|
|
686
|
+
console.log("Loading LibAV failed\n" + ex + "\n" + ex.stack);
|
|
687
|
+
});
|
|
688
|
+
})();
|