@contentauth/c2pa-web 0.8.4 → 0.10.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.
@@ -0,0 +1,941 @@
1
+ import { channel as O } from "highgain";
2
+ const { createTx: P, rx: $ } = O(), { createTx: G, rx: H } = O("worker");
3
+ class y {
4
+ static __wrap(e) {
5
+ const t = Object.create(y.prototype);
6
+ return t.__wbg_ptr = e, B.register(t, t.__wbg_ptr, t), t;
7
+ }
8
+ __destroy_into_raw() {
9
+ const e = this.__wbg_ptr;
10
+ return this.__wbg_ptr = 0, B.unregister(this), e;
11
+ }
12
+ free() {
13
+ const e = this.__destroy_into_raw();
14
+ r.__wbg_wasmbuilder_free(e, 0);
15
+ }
16
+ /**
17
+ * Add an action to the manifest's `Actions` assertion.
18
+ * @param {any} action
19
+ */
20
+ addAction(e) {
21
+ const t = r.wasmbuilder_addAction(this.__wbg_ptr, e);
22
+ if (t[1])
23
+ throw f(t[0]);
24
+ }
25
+ /**
26
+ * Add an ingredient to the manifest from a JSON ingredient definition without a blob
27
+ *
28
+ * # Arguments
29
+ * * `ingredient_json` - A JSON string representing the ingredient.
30
+ * @param {string} json
31
+ */
32
+ addIngredient(e) {
33
+ const t = a(e, r.__wbindgen_malloc, r.__wbindgen_realloc), n = s, _ = r.wasmbuilder_addIngredient(this.__wbg_ptr, t, n);
34
+ if (_[1])
35
+ throw f(_[0]);
36
+ }
37
+ /**
38
+ * Add an ingredient to the manifest from a JSON ingredient definition and a [`Blob`].
39
+ *
40
+ * # Arguments
41
+ * * `ingredient_json` - A JSON string representing the ingredient. This ingredient is merged with the ingredient specified in the `stream` argument, and these values take precedence.
42
+ * * `format` - The format of the ingredient.
43
+ * * `blob` - A [`Blob`] representing an asset which should be included as an ingredient.
44
+ * @param {string} json
45
+ * @param {string} format
46
+ * @param {Blob} blob
47
+ * @returns {Promise<void>}
48
+ */
49
+ addIngredientFromBlob(e, t, n) {
50
+ const _ = a(e, r.__wbindgen_malloc, r.__wbindgen_realloc), c = s, i = a(t, r.__wbindgen_malloc, r.__wbindgen_realloc), u = s;
51
+ return r.wasmbuilder_addIngredientFromBlob(this.__wbg_ptr, _, c, i, u, n);
52
+ }
53
+ /**
54
+ * Add a redaction for a JUMBF URI with the given reason.
55
+ *
56
+ * Adds the URI to the builder's redaction list and appends a `c2pa.redacted` action
57
+ * with the reason and URI parameter, as required by the C2PA spec.
58
+ * @param {string} uri
59
+ * @param {any} reason
60
+ */
61
+ addRedaction(e, t) {
62
+ const n = a(e, r.__wbindgen_malloc, r.__wbindgen_realloc), _ = s, c = r.wasmbuilder_addRedaction(this.__wbg_ptr, n, _, t);
63
+ if (c[1])
64
+ throw f(c[0]);
65
+ }
66
+ /**
67
+ * Add a [`Blob`] to the manifest as a resource. The ID must match an identifier in the manifest.
68
+ * @param {string} id
69
+ * @param {Blob} blob
70
+ */
71
+ addResourceFromBlob(e, t) {
72
+ const n = a(e, r.__wbindgen_malloc, r.__wbindgen_realloc), _ = s, c = r.wasmbuilder_addResourceFromBlob(this.__wbg_ptr, n, _, t);
73
+ if (c[1])
74
+ throw f(c[0]);
75
+ }
76
+ /**
77
+ * Attempts to create a new `WasmBuilder` from a builder archive.
78
+ * Optionally accepts a context JSON string to configure the builder.
79
+ * @param {Blob} archive
80
+ * @param {string | null} [context_json]
81
+ * @returns {WasmBuilder}
82
+ */
83
+ static fromArchive(e, t) {
84
+ var n = d(t) ? 0 : a(t, r.__wbindgen_malloc, r.__wbindgen_realloc), _ = s;
85
+ const c = r.wasmbuilder_fromArchive(e, n, _);
86
+ if (c[2])
87
+ throw f(c[1]);
88
+ return y.__wrap(c[0]);
89
+ }
90
+ /**
91
+ * Attempts to create a new `WasmBuilder` from a JSON ManifestDefinition string.
92
+ * Optionally accepts a context JSON string to configure the builder.
93
+ * @param {string} json
94
+ * @param {string | null} [context_json]
95
+ * @returns {WasmBuilder}
96
+ */
97
+ static fromJson(e, t) {
98
+ const n = a(e, r.__wbindgen_malloc, r.__wbindgen_realloc), _ = s;
99
+ var c = d(t) ? 0 : a(t, r.__wbindgen_malloc, r.__wbindgen_realloc), i = s;
100
+ const u = r.wasmbuilder_fromJson(n, _, c, i);
101
+ if (u[2])
102
+ throw f(u[1]);
103
+ return y.__wrap(u[0]);
104
+ }
105
+ /**
106
+ * Get the current manifest definition.
107
+ * @returns {string}
108
+ */
109
+ getDefinition() {
110
+ const e = r.wasmbuilder_getDefinition(this.__wbg_ptr);
111
+ if (e[2])
112
+ throw f(e[1]);
113
+ return f(e[0]);
114
+ }
115
+ /**
116
+ * Creates a new `WasmBuilder` with a minimal manifest definition.
117
+ * Optionally accepts a context JSON string to configure the builder.
118
+ * @param {string | null} [context_json]
119
+ * @returns {WasmBuilder}
120
+ */
121
+ static new(e) {
122
+ var t = d(e) ? 0 : a(e, r.__wbindgen_malloc, r.__wbindgen_realloc), n = s;
123
+ const _ = r.wasmbuilder_new(t, n);
124
+ if (_[2])
125
+ throw f(_[1]);
126
+ return y.__wrap(_[0]);
127
+ }
128
+ /**
129
+ * Sets the builder "intent."
130
+ * @param {any} json_intent
131
+ */
132
+ setIntent(e) {
133
+ const t = r.wasmbuilder_setIntent(this.__wbg_ptr, e);
134
+ if (t[1])
135
+ throw f(t[0]);
136
+ }
137
+ /**
138
+ * Sets the state of the no_embed flag.
139
+ * @param {boolean} no_embed
140
+ */
141
+ setNoEmbed(e) {
142
+ r.wasmbuilder_setNoEmbed(this.__wbg_ptr, e);
143
+ }
144
+ /**
145
+ * Sets the remote_url for a remote manifest.
146
+ *
147
+ * The URL must return the manifest data and is injected into the destination asset when signing.
148
+ * For remote-only manifests, set the `no_embed` flag to `true`.
149
+ * @param {string} url
150
+ */
151
+ setRemoteUrl(e) {
152
+ const t = a(e, r.__wbindgen_malloc, r.__wbindgen_realloc), n = s;
153
+ r.wasmbuilder_setRemoteUrl(this.__wbg_ptr, t, n);
154
+ }
155
+ /**
156
+ * Sets a thumbnail from a [`Blob`] to be included in the manifest. The thumbnail should represent the asset being signed.
157
+ * @param {string} format
158
+ * @param {Blob} blob
159
+ */
160
+ setThumbnailFromBlob(e, t) {
161
+ const n = a(e, r.__wbindgen_malloc, r.__wbindgen_realloc), _ = s, c = r.wasmbuilder_setThumbnailFromBlob(this.__wbg_ptr, n, _, t);
162
+ if (c[1])
163
+ throw f(c[0]);
164
+ }
165
+ /**
166
+ * Sign an asset using the provided SignerDefinition, format, and source Blob.
167
+ * @param {SignerDefinition} signer_definition
168
+ * @param {string} format
169
+ * @param {Blob} source
170
+ * @returns {Promise<Uint8Array>}
171
+ */
172
+ sign(e, t, n) {
173
+ const _ = a(t, r.__wbindgen_malloc, r.__wbindgen_realloc), c = s;
174
+ return r.wasmbuilder_sign(this.__wbg_ptr, e, _, c, n);
175
+ }
176
+ /**
177
+ * Sign an asset using the provided SignerDefinition, format, and source Blob.
178
+ * Use this method to get both the manifest bytes and the bytes of the signed asset.
179
+ * @param {SignerDefinition} signer_definition
180
+ * @param {string} format
181
+ * @param {Blob} source
182
+ * @returns {Promise<any>}
183
+ */
184
+ signAndGetManifestBytes(e, t, n) {
185
+ const _ = a(t, r.__wbindgen_malloc, r.__wbindgen_realloc), c = s;
186
+ return r.wasmbuilder_signAndGetManifestBytes(this.__wbg_ptr, e, _, c, n);
187
+ }
188
+ /**
189
+ * "Save" a builder to an archive.
190
+ * @returns {Uint8Array}
191
+ */
192
+ toArchive() {
193
+ const e = r.wasmbuilder_toArchive(this.__wbg_ptr);
194
+ if (e[2])
195
+ throw f(e[1]);
196
+ return f(e[0]);
197
+ }
198
+ }
199
+ Symbol.dispose && (y.prototype[Symbol.dispose] = y.prototype.free);
200
+ class R {
201
+ static __wrap(e) {
202
+ const t = Object.create(R.prototype);
203
+ return t.__wbg_ptr = e, x.register(t, t.__wbg_ptr, t), t;
204
+ }
205
+ __destroy_into_raw() {
206
+ const e = this.__wbg_ptr;
207
+ return this.__wbg_ptr = 0, x.unregister(this), e;
208
+ }
209
+ free() {
210
+ const e = this.__destroy_into_raw();
211
+ r.__wbg_wasmreader_free(e, 0);
212
+ }
213
+ /**
214
+ * Returns the label of the asset's active manifest.
215
+ * @returns {string | undefined}
216
+ */
217
+ activeLabel() {
218
+ const e = r.wasmreader_activeLabel(this.__wbg_ptr);
219
+ let t;
220
+ return e[0] !== 0 && (t = w(e[0], e[1]).slice(), r.__wbindgen_free(e[0], e[1] * 1, 1)), t;
221
+ }
222
+ /**
223
+ * Returns the asset's active manifest.
224
+ * @returns {any}
225
+ */
226
+ activeManifest() {
227
+ const e = r.wasmreader_activeManifest(this.__wbg_ptr);
228
+ if (e[2])
229
+ throw f(e[1]);
230
+ return f(e[0]);
231
+ }
232
+ /**
233
+ * Returns the asset's manifest store as crJSON.
234
+ * @returns {string}
235
+ */
236
+ crJson() {
237
+ let e, t;
238
+ try {
239
+ const n = r.wasmreader_crJson(this.__wbg_ptr);
240
+ return e = n[0], t = n[1], w(n[0], n[1]);
241
+ } finally {
242
+ r.__wbindgen_free(e, t, 1);
243
+ }
244
+ }
245
+ /**
246
+ * Attempts to create a new `WasmReader` from an asset format and `Blob` of the asset's bytes.
247
+ * Optionally accepts a context JSON string to configure the reader.
248
+ * @param {string} format
249
+ * @param {Blob} blob
250
+ * @param {string | null} [context_json]
251
+ * @returns {Promise<WasmReader>}
252
+ */
253
+ static fromBlob(e, t, n) {
254
+ const _ = a(e, r.__wbindgen_malloc, r.__wbindgen_realloc), c = s;
255
+ var i = d(n) ? 0 : a(n, r.__wbindgen_malloc, r.__wbindgen_realloc), u = s;
256
+ return r.wasmreader_fromBlob(_, c, t, i, u);
257
+ }
258
+ /**
259
+ * Attempts to create a new `WasmReader` from an asset format, a `Blob` of the bytes of the initial segment, and a fragment `Blob`.
260
+ * Optionally accepts a context JSON string to configure the reader.
261
+ * @param {string} format
262
+ * @param {Blob} init
263
+ * @param {Blob} fragment
264
+ * @param {string | null} [context_json]
265
+ * @returns {Promise<WasmReader>}
266
+ */
267
+ static fromBlobFragment(e, t, n, _) {
268
+ const c = a(e, r.__wbindgen_malloc, r.__wbindgen_realloc), i = s;
269
+ var u = d(_) ? 0 : a(_, r.__wbindgen_malloc, r.__wbindgen_realloc), g = s;
270
+ return r.wasmreader_fromBlobFragment(c, i, t, n, u, g);
271
+ }
272
+ /**
273
+ * Returns a JSON representation of the asset's manifest store.
274
+ * @returns {string}
275
+ */
276
+ json() {
277
+ let e, t;
278
+ try {
279
+ const n = r.wasmreader_json(this.__wbg_ptr);
280
+ return e = n[0], t = n[1], w(n[0], n[1]);
281
+ } finally {
282
+ r.__wbindgen_free(e, t, 1);
283
+ }
284
+ }
285
+ /**
286
+ * Returns the asset's manifest store.
287
+ * @returns {any}
288
+ */
289
+ manifestStore() {
290
+ const e = r.wasmreader_manifestStore(this.__wbg_ptr);
291
+ if (e[2])
292
+ throw f(e[1]);
293
+ return f(e[0]);
294
+ }
295
+ /**
296
+ * Accepts a URI reference to a binary object in the resource store and returns a `js_sys::Uint8Array` containing the resource's bytes.
297
+ * @param {string} uri
298
+ * @returns {Uint8Array}
299
+ */
300
+ resourceToBytes(e) {
301
+ const t = a(e, r.__wbindgen_malloc, r.__wbindgen_realloc), n = s, _ = r.wasmreader_resourceToBytes(this.__wbg_ptr, t, n);
302
+ if (_[2])
303
+ throw f(_[1]);
304
+ return f(_[0]);
305
+ }
306
+ }
307
+ Symbol.dispose && (R.prototype[Symbol.dispose] = R.prototype.free);
308
+ function X(o) {
309
+ const e = a(o, r.__wbindgen_malloc, r.__wbindgen_realloc), t = s, n = r.loadSettings(e, t);
310
+ if (n[1])
311
+ throw f(n[0]);
312
+ }
313
+ function E() {
314
+ return {
315
+ __proto__: null,
316
+ "./c2pa_bg.js": {
317
+ __proto__: null,
318
+ __wbg_Error_ef53bc310eb298a0: function(e, t) {
319
+ return Error(w(e, t));
320
+ },
321
+ __wbg_Number_6b506e6536831eaa: function(e) {
322
+ return Number(e);
323
+ },
324
+ __wbg___wbindgen_bigint_get_as_i64_38130e98eecd467d: function(e, t) {
325
+ const n = t, _ = typeof n == "bigint" ? n : void 0;
326
+ l().setBigInt64(e + 8, d(_) ? BigInt(0) : _, !0), l().setInt32(e + 0, !d(_), !0);
327
+ },
328
+ __wbg___wbindgen_boolean_get_1a45e2c38d4d41b9: function(e) {
329
+ const t = e, n = typeof t == "boolean" ? t : void 0;
330
+ return d(n) ? 16777215 : n ? 1 : 0;
331
+ },
332
+ __wbg___wbindgen_debug_string_0accd80f45e5faa2: function(e, t) {
333
+ const n = I(t), _ = a(n, r.__wbindgen_malloc, r.__wbindgen_realloc), c = s;
334
+ l().setInt32(e + 4, c, !0), l().setInt32(e + 0, _, !0);
335
+ },
336
+ __wbg___wbindgen_in_70a403a56e771704: function(e, t) {
337
+ return e in t;
338
+ },
339
+ __wbg___wbindgen_is_bigint_6ffd6468a9bc44b9: function(e) {
340
+ return typeof e == "bigint";
341
+ },
342
+ __wbg___wbindgen_is_function_754e9f305ff6029e: function(e) {
343
+ return typeof e == "function";
344
+ },
345
+ __wbg___wbindgen_is_object_56732c2bc353f41d: function(e) {
346
+ const t = e;
347
+ return typeof t == "object" && t !== null;
348
+ },
349
+ __wbg___wbindgen_is_string_c236cabd84a4d769: function(e) {
350
+ return typeof e == "string";
351
+ },
352
+ __wbg___wbindgen_is_undefined_67b456be8673d3d7: function(e) {
353
+ return e === void 0;
354
+ },
355
+ __wbg___wbindgen_jsval_eq_1068e624fa87f6ab: function(e, t) {
356
+ return e === t;
357
+ },
358
+ __wbg___wbindgen_jsval_loose_eq_2c56564c75129511: function(e, t) {
359
+ return e == t;
360
+ },
361
+ __wbg___wbindgen_number_get_9bb1761122181af2: function(e, t) {
362
+ const n = t, _ = typeof n == "number" ? n : void 0;
363
+ l().setFloat64(e + 8, d(_) ? 0 : _, !0), l().setInt32(e + 0, !d(_), !0);
364
+ },
365
+ __wbg___wbindgen_string_get_72bdf95d3ae505b1: function(e, t) {
366
+ const n = t, _ = typeof n == "string" ? n : void 0;
367
+ var c = d(_) ? 0 : a(_, r.__wbindgen_malloc, r.__wbindgen_realloc), i = s;
368
+ l().setInt32(e + 4, i, !0), l().setInt32(e + 0, c, !0);
369
+ },
370
+ __wbg___wbindgen_throw_1506f2235d1bdba0: function(e, t) {
371
+ throw new Error(w(e, t));
372
+ },
373
+ __wbg__wbg_cb_unref_61db23ac97f16c31: function(e) {
374
+ e._wbg_cb_unref();
375
+ },
376
+ __wbg_abort_2ec46222bf378517: function(e) {
377
+ e.abort();
378
+ },
379
+ __wbg_abort_b29d719932441c95: function(e, t) {
380
+ e.abort(t);
381
+ },
382
+ __wbg_append_e1746995edcb0170: function() {
383
+ return b(function(e, t, n, _, c) {
384
+ e.append(w(t, n), w(_, c));
385
+ }, arguments);
386
+ },
387
+ __wbg_arrayBuffer_05927079aabe6d46: function() {
388
+ return b(function(e) {
389
+ return e.arrayBuffer();
390
+ }, arguments);
391
+ },
392
+ __wbg_byteLength_2c6dc3b4b85d3547: function(e) {
393
+ return e.byteLength;
394
+ },
395
+ __wbg_call_8a89609d89f6608a: function() {
396
+ return b(function(e, t) {
397
+ return e.call(t);
398
+ }, arguments);
399
+ },
400
+ __wbg_call_9c758de292015997: function() {
401
+ return b(function(e, t, n) {
402
+ return e.call(t, n);
403
+ }, arguments);
404
+ },
405
+ __wbg_clearTimeout_6b8d9a38b9263d65: function(e) {
406
+ return clearTimeout(e);
407
+ },
408
+ __wbg_crypto_38df2bab126b63dc: function(e) {
409
+ return e.crypto;
410
+ },
411
+ __wbg_done_60cf307fcc680536: function(e) {
412
+ return e.done;
413
+ },
414
+ __wbg_entries_04b37a02507f1713: function(e) {
415
+ return Object.entries(e);
416
+ },
417
+ __wbg_error_a6fa202b58aa1cd3: function(e, t) {
418
+ let n, _;
419
+ try {
420
+ n = e, _ = t, console.error(w(e, t));
421
+ } finally {
422
+ r.__wbindgen_free(n, _, 1);
423
+ }
424
+ },
425
+ __wbg_fetch_344c8d3849002659: function(e, t) {
426
+ return e.fetch(t);
427
+ },
428
+ __wbg_fetch_9dad4fe911207b37: function(e) {
429
+ return fetch(e);
430
+ },
431
+ __wbg_from_d300fe49deab18f5: function(e) {
432
+ return Array.from(e);
433
+ },
434
+ __wbg_getRandomValues_3f44b700395062e5: function() {
435
+ return b(function(e, t) {
436
+ globalThis.crypto.getRandomValues(m(e, t));
437
+ }, arguments);
438
+ },
439
+ __wbg_getRandomValues_8aa3112c6615eef6: function() {
440
+ return b(function(e, t) {
441
+ globalThis.crypto.getRandomValues(m(e, t));
442
+ }, arguments);
443
+ },
444
+ __wbg_getRandomValues_c44a50d8cfdaebeb: function() {
445
+ return b(function(e, t) {
446
+ e.getRandomValues(t);
447
+ }, arguments);
448
+ },
449
+ __wbg_getTime_00b3f7db575e4ef5: function(e) {
450
+ return e.getTime();
451
+ },
452
+ __wbg_get_1f8f054ddbaa7db2: function() {
453
+ return b(function(e, t) {
454
+ return Reflect.get(e, t);
455
+ }, arguments);
456
+ },
457
+ __wbg_get_2b48c7d0d006a781: function(e, t) {
458
+ return e[t >>> 0];
459
+ },
460
+ __wbg_get_de6a0f7d4d18a304: function() {
461
+ return b(function(e, t) {
462
+ return Reflect.get(e, t);
463
+ }, arguments);
464
+ },
465
+ __wbg_get_unchecked_33f6e5c9e2f2d6b2: function(e, t) {
466
+ return e[t >>> 0];
467
+ },
468
+ __wbg_get_with_ref_key_6412cf3094599694: function(e, t) {
469
+ return e[t];
470
+ },
471
+ __wbg_has_73740b27f436fed3: function() {
472
+ return b(function(e, t) {
473
+ return Reflect.has(e, t);
474
+ }, arguments);
475
+ },
476
+ __wbg_headers_0feb63d2d374b44a: function(e) {
477
+ return e.headers;
478
+ },
479
+ __wbg_instanceof_ArrayBuffer_8f49811467741499: function(e) {
480
+ let t;
481
+ try {
482
+ t = e instanceof ArrayBuffer;
483
+ } catch {
484
+ t = !1;
485
+ }
486
+ return t;
487
+ },
488
+ __wbg_instanceof_Map_9fc06d9a951bcee6: function(e) {
489
+ let t;
490
+ try {
491
+ t = e instanceof Map;
492
+ } catch {
493
+ t = !1;
494
+ }
495
+ return t;
496
+ },
497
+ __wbg_instanceof_Promise_d0db99486956c8e8: function(e) {
498
+ let t;
499
+ try {
500
+ t = e instanceof Promise;
501
+ } catch {
502
+ t = !1;
503
+ }
504
+ return t;
505
+ },
506
+ __wbg_instanceof_Response_cb984bd66d7bd408: function(e) {
507
+ let t;
508
+ try {
509
+ t = e instanceof Response;
510
+ } catch {
511
+ t = !1;
512
+ }
513
+ return t;
514
+ },
515
+ __wbg_instanceof_Uint8Array_86f30649f63ef9c2: function(e) {
516
+ let t;
517
+ try {
518
+ t = e instanceof Uint8Array;
519
+ } catch {
520
+ t = !1;
521
+ }
522
+ return t;
523
+ },
524
+ __wbg_isArray_67c2c9c4313f4448: function(e) {
525
+ return Array.isArray(e);
526
+ },
527
+ __wbg_isSafeInteger_66acec27e09e99a7: function(e) {
528
+ return Number.isSafeInteger(e);
529
+ },
530
+ __wbg_iterator_8732428d309e270e: function() {
531
+ return Symbol.iterator;
532
+ },
533
+ __wbg_length_4a591ecaa01354d9: function(e) {
534
+ return e.length;
535
+ },
536
+ __wbg_length_66f1a4b2e9026940: function(e) {
537
+ return e.length;
538
+ },
539
+ __wbg_msCrypto_bd5a034af96bcba6: function(e) {
540
+ return e.msCrypto;
541
+ },
542
+ __wbg_new_0_445c13a750296eb6: function() {
543
+ return /* @__PURE__ */ new Date();
544
+ },
545
+ __wbg_new_0d09705104e164af: function() {
546
+ return b(function() {
547
+ return new AbortController();
548
+ }, arguments);
549
+ },
550
+ __wbg_new_227d7c05414eb861: function() {
551
+ return new Error();
552
+ },
553
+ __wbg_new_578aeef4b6b94378: function(e) {
554
+ return new Uint8Array(e);
555
+ },
556
+ __wbg_new_622fc80556be2e26: function() {
557
+ return /* @__PURE__ */ new Map();
558
+ },
559
+ __wbg_new_a1b9f645bba64f0f: function() {
560
+ return b(function() {
561
+ return new FileReaderSync();
562
+ }, arguments);
563
+ },
564
+ __wbg_new_ce1ab61c1c2b300d: function() {
565
+ return new Object();
566
+ },
567
+ __wbg_new_d90091b82fdf5b91: function() {
568
+ return new Array();
569
+ },
570
+ __wbg_new_e436d06bc8e77460: function() {
571
+ return b(function() {
572
+ return new Headers();
573
+ }, arguments);
574
+ },
575
+ __wbg_new_from_slice_18fa1f71286d66b8: function(e, t) {
576
+ return new Uint8Array(m(e, t));
577
+ },
578
+ __wbg_new_typed_bf31d18f92484486: function(e, t) {
579
+ try {
580
+ var n = { a: e, b: t }, _ = (i, u) => {
581
+ const g = n.a;
582
+ n.a = 0;
583
+ try {
584
+ return U(g, n.b, i, u);
585
+ } finally {
586
+ n.a = g;
587
+ }
588
+ };
589
+ return new Promise(_);
590
+ } finally {
591
+ n.a = 0;
592
+ }
593
+ },
594
+ __wbg_new_with_length_36a4998e27b014c5: function(e) {
595
+ return new Uint8Array(e >>> 0);
596
+ },
597
+ __wbg_new_with_str_and_init_bcd02b79a793d27f: function() {
598
+ return b(function(e, t, n) {
599
+ return new Request(w(e, t), n);
600
+ }, arguments);
601
+ },
602
+ __wbg_next_9e03acdf51c4960d: function(e) {
603
+ return e.next;
604
+ },
605
+ __wbg_next_eb8ca7351fa27906: function() {
606
+ return b(function(e) {
607
+ return e.next();
608
+ }, arguments);
609
+ },
610
+ __wbg_node_84ea875411254db1: function(e) {
611
+ return e.node;
612
+ },
613
+ __wbg_now_190933fa139cc119: function() {
614
+ return Date.now();
615
+ },
616
+ __wbg_process_44c7a14e11e9f69e: function(e) {
617
+ return e.process;
618
+ },
619
+ __wbg_prototypesetcall_3249fc62a0fafa30: function(e, t, n) {
620
+ Uint8Array.prototype.set.call(m(e, t), n);
621
+ },
622
+ __wbg_queueMicrotask_35c611f4a14830b2: function(e) {
623
+ queueMicrotask(e);
624
+ },
625
+ __wbg_queueMicrotask_404ed0a58e0b63cc: function(e) {
626
+ return e.queueMicrotask;
627
+ },
628
+ __wbg_randomFillSync_6c25eac9869eb53c: function() {
629
+ return b(function(e, t) {
630
+ e.randomFillSync(t);
631
+ }, arguments);
632
+ },
633
+ __wbg_readAsArrayBuffer_f1b8da05559618d9: function() {
634
+ return b(function(e, t) {
635
+ return e.readAsArrayBuffer(t);
636
+ }, arguments);
637
+ },
638
+ __wbg_require_b4edbdcf3e2a1ef0: function() {
639
+ return b(function() {
640
+ return module.require;
641
+ }, arguments);
642
+ },
643
+ __wbg_resolve_25a7e548d5881dca: function(e) {
644
+ return Promise.resolve(e);
645
+ },
646
+ __wbg_setTimeout_f757f00851f76c42: function(e, t) {
647
+ return setTimeout(e, t);
648
+ },
649
+ __wbg_set_29c99a8aac1c01e5: function(e, t, n) {
650
+ e.set(m(t, n));
651
+ },
652
+ __wbg_set_52b1e1eb5bed906a: function(e, t, n) {
653
+ return e.set(t, n);
654
+ },
655
+ __wbg_set_6be42768c690e380: function(e, t, n) {
656
+ e[t] = n;
657
+ },
658
+ __wbg_set_body_36614c7e61546809: function(e, t) {
659
+ e.body = t;
660
+ },
661
+ __wbg_set_cache_488ea16c11cbf20d: function(e, t) {
662
+ e.cache = z[t];
663
+ },
664
+ __wbg_set_credentials_fa9c491a27c4bdf0: function(e, t) {
665
+ e.credentials = L[t];
666
+ },
667
+ __wbg_set_dca99999bba88a9a: function(e, t, n) {
668
+ e[t >>> 0] = n;
669
+ },
670
+ __wbg_set_headers_7c1e39ece7826bec: function(e, t) {
671
+ e.headers = t;
672
+ },
673
+ __wbg_set_method_7a6811dec7a4feff: function(e, t, n) {
674
+ e.method = w(t, n);
675
+ },
676
+ __wbg_set_mode_c90e3667002857d4: function(e, t) {
677
+ e.mode = q[t];
678
+ },
679
+ __wbg_set_signal_d9da62b3f215c821: function(e, t) {
680
+ e.signal = t;
681
+ },
682
+ __wbg_signal_e03304a84df9ed09: function(e) {
683
+ return e.signal;
684
+ },
685
+ __wbg_size_9970092b88b1094c: function(e) {
686
+ return e.size;
687
+ },
688
+ __wbg_slice_02bb778501725738: function() {
689
+ return b(function(e, t, n) {
690
+ return e.slice(t, n);
691
+ }, arguments);
692
+ },
693
+ __wbg_stack_3b0d974bbf31e44f: function(e, t) {
694
+ const n = t.stack, _ = a(n, r.__wbindgen_malloc, r.__wbindgen_realloc), c = s;
695
+ l().setInt32(e + 4, c, !0), l().setInt32(e + 0, _, !0);
696
+ },
697
+ __wbg_static_accessor_GLOBAL_9d53f2689e622ca1: function() {
698
+ const e = typeof global > "u" ? null : global;
699
+ return d(e) ? 0 : h(e);
700
+ },
701
+ __wbg_static_accessor_GLOBAL_THIS_a1a35cec07001a8a: function() {
702
+ const e = typeof globalThis > "u" ? null : globalThis;
703
+ return d(e) ? 0 : h(e);
704
+ },
705
+ __wbg_static_accessor_SELF_4c59f6c7ea29a144: function() {
706
+ const e = typeof self > "u" ? null : self;
707
+ return d(e) ? 0 : h(e);
708
+ },
709
+ __wbg_static_accessor_WINDOW_e70ae9f2eb052253: function() {
710
+ const e = typeof window > "u" ? null : window;
711
+ return d(e) ? 0 : h(e);
712
+ },
713
+ __wbg_status_00549d55b78d949e: function(e) {
714
+ return e.status;
715
+ },
716
+ __wbg_stringify_8286df6dcc591521: function() {
717
+ return b(function(e) {
718
+ return JSON.stringify(e);
719
+ }, arguments);
720
+ },
721
+ __wbg_subarray_4aa221f6a4f5ab22: function(e, t, n) {
722
+ return e.subarray(t >>> 0, n >>> 0);
723
+ },
724
+ __wbg_then_18f476d590e58992: function(e, t, n) {
725
+ return e.then(t, n);
726
+ },
727
+ __wbg_then_ac7b025999b52837: function(e, t) {
728
+ return e.then(t);
729
+ },
730
+ __wbg_url_6808f1c468f2d0cd: function(e, t) {
731
+ const n = t.url, _ = a(n, r.__wbindgen_malloc, r.__wbindgen_realloc), c = s;
732
+ l().setInt32(e + 4, c, !0), l().setInt32(e + 0, _, !0);
733
+ },
734
+ __wbg_valueOf_41ae57308c1f031c: function(e) {
735
+ return e.valueOf();
736
+ },
737
+ __wbg_value_f3625092ee4b37f4: function(e) {
738
+ return e.value;
739
+ },
740
+ __wbg_versions_276b2795b1c6a219: function(e) {
741
+ return e.versions;
742
+ },
743
+ __wbg_wasmreader_new: function(e) {
744
+ return R.__wrap(e);
745
+ },
746
+ __wbindgen_cast_0000000000000001: function(e, t) {
747
+ return k(e, t, D);
748
+ },
749
+ __wbindgen_cast_0000000000000002: function(e, t) {
750
+ return k(e, t, j);
751
+ },
752
+ __wbindgen_cast_0000000000000003: function(e) {
753
+ return e;
754
+ },
755
+ __wbindgen_cast_0000000000000004: function(e) {
756
+ return e;
757
+ },
758
+ __wbindgen_cast_0000000000000005: function(e, t) {
759
+ return m(e, t);
760
+ },
761
+ __wbindgen_cast_0000000000000006: function(e, t) {
762
+ return w(e, t);
763
+ },
764
+ __wbindgen_cast_0000000000000007: function(e) {
765
+ return BigInt.asUintN(64, e);
766
+ },
767
+ __wbindgen_cast_0000000000000008: function(e, t) {
768
+ var n = m(e, t).slice();
769
+ return r.__wbindgen_free(e, t * 1, 1), n;
770
+ },
771
+ __wbindgen_init_externref_table: function() {
772
+ const e = r.__wbindgen_externrefs, t = e.grow(4);
773
+ e.set(0, void 0), e.set(t + 0, void 0), e.set(t + 1, null), e.set(t + 2, !0), e.set(t + 3, !1);
774
+ }
775
+ }
776
+ };
777
+ }
778
+ function j(o, e) {
779
+ r.wasm_bindgen__convert__closures_____invoke__h9ad77c532ffa5b9e(o, e);
780
+ }
781
+ function D(o, e, t) {
782
+ const n = r.wasm_bindgen__convert__closures_____invoke__hf2acc361175a8d00(o, e, t);
783
+ if (n[1])
784
+ throw f(n[0]);
785
+ }
786
+ function U(o, e, t, n) {
787
+ r.wasm_bindgen__convert__closures_____invoke__h53f6302d12a3bd57(o, e, t, n);
788
+ }
789
+ const z = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"], L = ["omit", "same-origin", "include"], q = ["same-origin", "no-cors", "cors", "navigate"], B = typeof FinalizationRegistry > "u" ? { register: () => {
790
+ }, unregister: () => {
791
+ } } : new FinalizationRegistry((o) => r.__wbg_wasmbuilder_free(o, 1)), x = typeof FinalizationRegistry > "u" ? { register: () => {
792
+ }, unregister: () => {
793
+ } } : new FinalizationRegistry((o) => r.__wbg_wasmreader_free(o, 1));
794
+ typeof FinalizationRegistry > "u" || new FinalizationRegistry((o) => r.__wbg_wasmsigner_free(o, 1));
795
+ function h(o) {
796
+ const e = r.__externref_table_alloc();
797
+ return r.__wbindgen_externrefs.set(e, o), e;
798
+ }
799
+ const M = typeof FinalizationRegistry > "u" ? { register: () => {
800
+ }, unregister: () => {
801
+ } } : new FinalizationRegistry((o) => r.__wbindgen_destroy_closure(o.a, o.b));
802
+ function I(o) {
803
+ const e = typeof o;
804
+ if (e == "number" || e == "boolean" || o == null)
805
+ return `${o}`;
806
+ if (e == "string")
807
+ return `"${o}"`;
808
+ if (e == "symbol") {
809
+ const _ = o.description;
810
+ return _ == null ? "Symbol" : `Symbol(${_})`;
811
+ }
812
+ if (e == "function") {
813
+ const _ = o.name;
814
+ return typeof _ == "string" && _.length > 0 ? `Function(${_})` : "Function";
815
+ }
816
+ if (Array.isArray(o)) {
817
+ const _ = o.length;
818
+ let c = "[";
819
+ _ > 0 && (c += I(o[0]));
820
+ for (let i = 1; i < _; i++)
821
+ c += ", " + I(o[i]);
822
+ return c += "]", c;
823
+ }
824
+ const t = /\[object ([^\]]+)\]/.exec(toString.call(o));
825
+ let n;
826
+ if (t && t.length > 1)
827
+ n = t[1];
828
+ else
829
+ return toString.call(o);
830
+ if (n == "Object")
831
+ try {
832
+ return "Object(" + JSON.stringify(o) + ")";
833
+ } catch {
834
+ return "Object";
835
+ }
836
+ return o instanceof Error ? `${o.name}: ${o.message}
837
+ ${o.stack}` : n;
838
+ }
839
+ function m(o, e) {
840
+ return o = o >>> 0, v().subarray(o / 1, o / 1 + e);
841
+ }
842
+ let p = null;
843
+ function l() {
844
+ return (p === null || p.buffer.detached === !0 || p.buffer.detached === void 0 && p.buffer !== r.memory.buffer) && (p = new DataView(r.memory.buffer)), p;
845
+ }
846
+ function w(o, e) {
847
+ return C(o >>> 0, e);
848
+ }
849
+ let A = null;
850
+ function v() {
851
+ return (A === null || A.byteLength === 0) && (A = new Uint8Array(r.memory.buffer)), A;
852
+ }
853
+ function b(o, e) {
854
+ try {
855
+ return o.apply(this, e);
856
+ } catch (t) {
857
+ const n = h(t);
858
+ r.__wbindgen_exn_store(n);
859
+ }
860
+ }
861
+ function d(o) {
862
+ return o == null;
863
+ }
864
+ function k(o, e, t) {
865
+ const n = { a: o, b: e, cnt: 1 }, _ = (...c) => {
866
+ n.cnt++;
867
+ const i = n.a;
868
+ n.a = 0;
869
+ try {
870
+ return t(i, n.b, ...c);
871
+ } finally {
872
+ n.a = i, _._wbg_cb_unref();
873
+ }
874
+ };
875
+ return _._wbg_cb_unref = () => {
876
+ --n.cnt === 0 && (r.__wbindgen_destroy_closure(n.a, n.b), n.a = 0, M.unregister(n));
877
+ }, M.register(_, n, n), _;
878
+ }
879
+ function a(o, e, t) {
880
+ if (t === void 0) {
881
+ const u = F.encode(o), g = e(u.length, 1) >>> 0;
882
+ return v().subarray(g, g + u.length).set(u), s = u.length, g;
883
+ }
884
+ let n = o.length, _ = e(n, 1) >>> 0;
885
+ const c = v();
886
+ let i = 0;
887
+ for (; i < n; i++) {
888
+ const u = o.charCodeAt(i);
889
+ if (u > 127) break;
890
+ c[_ + i] = u;
891
+ }
892
+ if (i !== n) {
893
+ i !== 0 && (o = o.slice(i)), _ = t(_, n, n = i + o.length * 3, 1) >>> 0;
894
+ const u = v().subarray(_ + i, _ + n), g = F.encodeInto(o, u);
895
+ i += g.written, _ = t(_, n, i, 1) >>> 0;
896
+ }
897
+ return s = i, _;
898
+ }
899
+ function f(o) {
900
+ const e = r.__wbindgen_externrefs.get(o);
901
+ return r.__externref_table_dealloc(o), e;
902
+ }
903
+ let S = new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 });
904
+ S.decode();
905
+ const N = 2146435072;
906
+ let T = 0;
907
+ function C(o, e) {
908
+ return T += e, T >= N && (S = new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 }), S.decode(), T = e), S.decode(v().subarray(o, o + e));
909
+ }
910
+ const F = new TextEncoder();
911
+ "encodeInto" in F || (F.encodeInto = function(o, e) {
912
+ const t = F.encode(o);
913
+ return e.set(t), {
914
+ read: o.length,
915
+ written: t.length
916
+ };
917
+ });
918
+ let s = 0, r;
919
+ function W(o, e) {
920
+ return r = o.exports, p = null, A = null, r.__wbindgen_start(), r;
921
+ }
922
+ function Y(o) {
923
+ if (r !== void 0) return r;
924
+ o !== void 0 && (Object.getPrototypeOf(o) === Object.prototype ? { module: o } = o : console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));
925
+ const e = E();
926
+ o instanceof WebAssembly.Module || (o = new WebAssembly.Module(o));
927
+ const t = new WebAssembly.Instance(o, e);
928
+ return W(t);
929
+ }
930
+ const Q = "sha512-2nvIDEdLBQHSJJqGx1M7hxP8Pyg5rhmPX/Ag0CsgzbeTUrh8zdR0YpwhN8S9ifoqN+ia3BkETxLcmUFmF0ptwA==";
931
+ export {
932
+ y as W,
933
+ R as a,
934
+ P as b,
935
+ G as c,
936
+ Q as d,
937
+ Y as i,
938
+ X as l,
939
+ $ as r,
940
+ H as w
941
+ };