@contentauth/c2pa-web 0.12.4 → 0.13.1
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/dist/c2pa-8eeyObgG.js +469 -0
- package/dist/c2pa_worker.js +254 -191
- package/dist/index.js +1 -1
- package/dist/inline.js +9 -9
- package/dist/lib/builder.d.ts +35 -0
- package/dist/lib/builder.d.ts.map +1 -1
- package/dist/lib/worker/rpc.d.ts +6 -0
- package/dist/lib/worker/rpc.d.ts.map +1 -1
- package/dist/resources/c2pa_bg.wasm +0 -0
- package/package.json +3 -3
- package/dist/c2pa-p9Dcnu2z.js +0 -447
package/dist/c2pa_worker.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var G = (r, e) => () => (e || r((e = { exports: {} }).exports, e), e.exports);
|
|
2
|
+
var be = G((de, C) => {
|
|
3
3
|
class h {
|
|
4
4
|
static __wrap(e) {
|
|
5
5
|
const t = Object.create(h.prototype);
|
|
6
|
-
return t.__wbg_ptr = e,
|
|
6
|
+
return t.__wbg_ptr = e, U.register(t, t.__wbg_ptr, t), t;
|
|
7
7
|
}
|
|
8
8
|
__destroy_into_raw() {
|
|
9
9
|
const e = this.__wbg_ptr;
|
|
10
|
-
return this.__wbg_ptr = 0,
|
|
10
|
+
return this.__wbg_ptr = 0, U.unregister(this), e;
|
|
11
11
|
}
|
|
12
12
|
free() {
|
|
13
13
|
const e = this.__destroy_into_raw();
|
|
@@ -20,7 +20,17 @@ var ie = C((ue, q) => {
|
|
|
20
20
|
addAction(e) {
|
|
21
21
|
const t = o.wasmbuilder_addAction(this.__wbg_ptr, e);
|
|
22
22
|
if (t[1])
|
|
23
|
-
throw
|
|
23
|
+
throw b(t[0]);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Add an assertion to the manifest under `label` with the given `data`.
|
|
27
|
+
* @param {string} label
|
|
28
|
+
* @param {any} data
|
|
29
|
+
*/
|
|
30
|
+
addAssertion(e, t) {
|
|
31
|
+
const n = f(e, o.__wbindgen_malloc, o.__wbindgen_realloc), _ = a, c = o.wasmbuilder_addAssertion(this.__wbg_ptr, n, _, t);
|
|
32
|
+
if (c[1])
|
|
33
|
+
throw b(c[0]);
|
|
24
34
|
}
|
|
25
35
|
/**
|
|
26
36
|
* Add an ingredient to the manifest from a JSON ingredient definition without a blob
|
|
@@ -30,9 +40,9 @@ var ie = C((ue, q) => {
|
|
|
30
40
|
* @param {string} json
|
|
31
41
|
*/
|
|
32
42
|
addIngredient(e) {
|
|
33
|
-
const t = f(e, o.__wbindgen_malloc, o.__wbindgen_realloc), n =
|
|
43
|
+
const t = f(e, o.__wbindgen_malloc, o.__wbindgen_realloc), n = a, _ = o.wasmbuilder_addIngredient(this.__wbg_ptr, t, n);
|
|
34
44
|
if (_[1])
|
|
35
|
-
throw
|
|
45
|
+
throw b(_[0]);
|
|
36
46
|
}
|
|
37
47
|
/**
|
|
38
48
|
* Add an ingredient to the manifest from a JSON ingredient definition and a [`Blob`].
|
|
@@ -47,8 +57,8 @@ var ie = C((ue, q) => {
|
|
|
47
57
|
* @returns {Promise<void>}
|
|
48
58
|
*/
|
|
49
59
|
addIngredientFromBlob(e, t, n) {
|
|
50
|
-
const _ = f(e, o.__wbindgen_malloc, o.__wbindgen_realloc), c =
|
|
51
|
-
return o.wasmbuilder_addIngredientFromBlob(this.__wbg_ptr, _, c,
|
|
60
|
+
const _ = f(e, o.__wbindgen_malloc, o.__wbindgen_realloc), c = a, i = f(t, o.__wbindgen_malloc, o.__wbindgen_realloc), s = a;
|
|
61
|
+
return o.wasmbuilder_addIngredientFromBlob(this.__wbg_ptr, _, c, i, s, n);
|
|
52
62
|
}
|
|
53
63
|
/**
|
|
54
64
|
* Add a redaction for a JUMBF URI with the given reason.
|
|
@@ -59,9 +69,9 @@ var ie = C((ue, q) => {
|
|
|
59
69
|
* @param {any} reason
|
|
60
70
|
*/
|
|
61
71
|
addRedaction(e, t) {
|
|
62
|
-
const n = f(e, o.__wbindgen_malloc, o.__wbindgen_realloc), _ =
|
|
72
|
+
const n = f(e, o.__wbindgen_malloc, o.__wbindgen_realloc), _ = a, c = o.wasmbuilder_addRedaction(this.__wbg_ptr, n, _, t);
|
|
63
73
|
if (c[1])
|
|
64
|
-
throw
|
|
74
|
+
throw b(c[0]);
|
|
65
75
|
}
|
|
66
76
|
/**
|
|
67
77
|
* Add a [`Blob`] to the manifest as a resource. The ID must match an identifier in the manifest.
|
|
@@ -69,9 +79,45 @@ var ie = C((ue, q) => {
|
|
|
69
79
|
* @param {Blob} blob
|
|
70
80
|
*/
|
|
71
81
|
addResourceFromBlob(e, t) {
|
|
72
|
-
const n = f(e, o.__wbindgen_malloc, o.__wbindgen_realloc), _ =
|
|
82
|
+
const n = f(e, o.__wbindgen_malloc, o.__wbindgen_realloc), _ = a, c = o.wasmbuilder_addResourceFromBlob(this.__wbg_ptr, n, _, t);
|
|
73
83
|
if (c[1])
|
|
74
|
-
throw
|
|
84
|
+
throw b(c[0]);
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Retains only the actions at the given 0-based indices into the actions currently returned
|
|
88
|
+
* by [`Self::get_definition`]'s `c2pa.actions` assertion.
|
|
89
|
+
*
|
|
90
|
+
* The inception action, `c2pa.created` or `c2pa.opened`, is always kept regardless of
|
|
91
|
+
* `indices`, and is moved to index 0 if needed, so the manifest stays valid per the C2PA
|
|
92
|
+
* spec. Sets `allActionsIncluded = false` when anything is removed.
|
|
93
|
+
*
|
|
94
|
+
* Indices are resolved on the JS side, rather than accepting a predicate here, because the
|
|
95
|
+
* builder lives in a worker and JS callbacks can't be invoked synchronously across that
|
|
96
|
+
* boundary.
|
|
97
|
+
*
|
|
98
|
+
* This does not touch ingredients. Call [`Self::filter_ingredients_at`] with an empty list
|
|
99
|
+
* to drop all orphans afterwards if you also want to drop ingredients now orphaned by the
|
|
100
|
+
* removed actions.
|
|
101
|
+
* @param {Uint32Array} indices
|
|
102
|
+
*/
|
|
103
|
+
filterActionsAt(e) {
|
|
104
|
+
const t = J(e, o.__wbindgen_malloc), n = a, _ = o.wasmbuilder_filterActionsAt(this.__wbg_ptr, t, n);
|
|
105
|
+
if (_[1])
|
|
106
|
+
throw b(_[0]);
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Retains ingredients, rescuing an otherwise-orphaned ingredient when its 0-based index into
|
|
110
|
+
* [`Self::get_definition`]'s `ingredients` array is present in `indices`. Referenced and
|
|
111
|
+
* `parentOf` ingredients are always kept, per `Builder::filter_ingredients`; `indices` can
|
|
112
|
+
* only rescue an orphan, never drop a referenced or lineage ingredient.
|
|
113
|
+
*
|
|
114
|
+
* See [`Self::filter_actions_at`] for why this takes indices rather than a predicate.
|
|
115
|
+
* @param {Uint32Array} indices
|
|
116
|
+
*/
|
|
117
|
+
filterIngredientsAt(e) {
|
|
118
|
+
const t = J(e, o.__wbindgen_malloc), n = a, _ = o.wasmbuilder_filterIngredientsAt(this.__wbg_ptr, t, n);
|
|
119
|
+
if (_[1])
|
|
120
|
+
throw b(_[0]);
|
|
75
121
|
}
|
|
76
122
|
/**
|
|
77
123
|
* Attempts to create a new `WasmBuilder` from a builder archive.
|
|
@@ -81,10 +127,10 @@ var ie = C((ue, q) => {
|
|
|
81
127
|
* @returns {WasmBuilder}
|
|
82
128
|
*/
|
|
83
129
|
static fromArchive(e, t) {
|
|
84
|
-
var n = w(t) ? 0 : f(t, o.__wbindgen_malloc, o.__wbindgen_realloc), _ =
|
|
130
|
+
var n = w(t) ? 0 : f(t, o.__wbindgen_malloc, o.__wbindgen_realloc), _ = a;
|
|
85
131
|
const c = o.wasmbuilder_fromArchive(e, n, _);
|
|
86
132
|
if (c[2])
|
|
87
|
-
throw
|
|
133
|
+
throw b(c[1]);
|
|
88
134
|
return h.__wrap(c[0]);
|
|
89
135
|
}
|
|
90
136
|
/**
|
|
@@ -95,12 +141,12 @@ var ie = C((ue, q) => {
|
|
|
95
141
|
* @returns {WasmBuilder}
|
|
96
142
|
*/
|
|
97
143
|
static fromJson(e, t) {
|
|
98
|
-
const n = f(e, o.__wbindgen_malloc, o.__wbindgen_realloc), _ =
|
|
99
|
-
var c = w(t) ? 0 : f(t, o.__wbindgen_malloc, o.__wbindgen_realloc),
|
|
100
|
-
const
|
|
101
|
-
if (
|
|
102
|
-
throw
|
|
103
|
-
return h.__wrap(
|
|
144
|
+
const n = f(e, o.__wbindgen_malloc, o.__wbindgen_realloc), _ = a;
|
|
145
|
+
var c = w(t) ? 0 : f(t, o.__wbindgen_malloc, o.__wbindgen_realloc), i = a;
|
|
146
|
+
const s = o.wasmbuilder_fromJson(n, _, c, i);
|
|
147
|
+
if (s[2])
|
|
148
|
+
throw b(s[1]);
|
|
149
|
+
return h.__wrap(s[0]);
|
|
104
150
|
}
|
|
105
151
|
/**
|
|
106
152
|
* Get the current manifest definition.
|
|
@@ -109,8 +155,8 @@ var ie = C((ue, q) => {
|
|
|
109
155
|
getDefinition() {
|
|
110
156
|
const e = o.wasmbuilder_getDefinition(this.__wbg_ptr);
|
|
111
157
|
if (e[2])
|
|
112
|
-
throw
|
|
113
|
-
return
|
|
158
|
+
throw b(e[1]);
|
|
159
|
+
return b(e[0]);
|
|
114
160
|
}
|
|
115
161
|
/**
|
|
116
162
|
* Creates a new `WasmBuilder` with a minimal manifest definition.
|
|
@@ -119,10 +165,10 @@ var ie = C((ue, q) => {
|
|
|
119
165
|
* @returns {WasmBuilder}
|
|
120
166
|
*/
|
|
121
167
|
static new(e) {
|
|
122
|
-
var t = w(e) ? 0 : f(e, o.__wbindgen_malloc, o.__wbindgen_realloc), n =
|
|
168
|
+
var t = w(e) ? 0 : f(e, o.__wbindgen_malloc, o.__wbindgen_realloc), n = a;
|
|
123
169
|
const _ = o.wasmbuilder_new(t, n);
|
|
124
170
|
if (_[2])
|
|
125
|
-
throw
|
|
171
|
+
throw b(_[1]);
|
|
126
172
|
return h.__wrap(_[0]);
|
|
127
173
|
}
|
|
128
174
|
/**
|
|
@@ -132,7 +178,7 @@ var ie = C((ue, q) => {
|
|
|
132
178
|
setIntent(e) {
|
|
133
179
|
const t = o.wasmbuilder_setIntent(this.__wbg_ptr, e);
|
|
134
180
|
if (t[1])
|
|
135
|
-
throw
|
|
181
|
+
throw b(t[0]);
|
|
136
182
|
}
|
|
137
183
|
/**
|
|
138
184
|
* Sets the state of the no_embed flag.
|
|
@@ -149,7 +195,7 @@ var ie = C((ue, q) => {
|
|
|
149
195
|
* @param {string} url
|
|
150
196
|
*/
|
|
151
197
|
setRemoteUrl(e) {
|
|
152
|
-
const t = f(e, o.__wbindgen_malloc, o.__wbindgen_realloc), n =
|
|
198
|
+
const t = f(e, o.__wbindgen_malloc, o.__wbindgen_realloc), n = a;
|
|
153
199
|
o.wasmbuilder_setRemoteUrl(this.__wbg_ptr, t, n);
|
|
154
200
|
}
|
|
155
201
|
/**
|
|
@@ -158,9 +204,9 @@ var ie = C((ue, q) => {
|
|
|
158
204
|
* @param {Blob} blob
|
|
159
205
|
*/
|
|
160
206
|
setThumbnailFromBlob(e, t) {
|
|
161
|
-
const n = f(e, o.__wbindgen_malloc, o.__wbindgen_realloc), _ =
|
|
207
|
+
const n = f(e, o.__wbindgen_malloc, o.__wbindgen_realloc), _ = a, c = o.wasmbuilder_setThumbnailFromBlob(this.__wbg_ptr, n, _, t);
|
|
162
208
|
if (c[1])
|
|
163
|
-
throw
|
|
209
|
+
throw b(c[0]);
|
|
164
210
|
}
|
|
165
211
|
/**
|
|
166
212
|
* Sign an asset using the provided SignerDefinition, format, and source Blob.
|
|
@@ -170,7 +216,7 @@ var ie = C((ue, q) => {
|
|
|
170
216
|
* @returns {Promise<Uint8Array>}
|
|
171
217
|
*/
|
|
172
218
|
sign(e, t, n) {
|
|
173
|
-
const _ = f(t, o.__wbindgen_malloc, o.__wbindgen_realloc), c =
|
|
219
|
+
const _ = f(t, o.__wbindgen_malloc, o.__wbindgen_realloc), c = a;
|
|
174
220
|
return o.wasmbuilder_sign(this.__wbg_ptr, e, _, c, n);
|
|
175
221
|
}
|
|
176
222
|
/**
|
|
@@ -182,7 +228,7 @@ var ie = C((ue, q) => {
|
|
|
182
228
|
* @returns {Promise<any>}
|
|
183
229
|
*/
|
|
184
230
|
signAndGetManifestBytes(e, t, n) {
|
|
185
|
-
const _ = f(t, o.__wbindgen_malloc, o.__wbindgen_realloc), c =
|
|
231
|
+
const _ = f(t, o.__wbindgen_malloc, o.__wbindgen_realloc), c = a;
|
|
186
232
|
return o.wasmbuilder_signAndGetManifestBytes(this.__wbg_ptr, e, _, c, n);
|
|
187
233
|
}
|
|
188
234
|
/**
|
|
@@ -192,8 +238,8 @@ var ie = C((ue, q) => {
|
|
|
192
238
|
toArchive() {
|
|
193
239
|
const e = o.wasmbuilder_toArchive(this.__wbg_ptr);
|
|
194
240
|
if (e[2])
|
|
195
|
-
throw
|
|
196
|
-
return
|
|
241
|
+
throw b(e[1]);
|
|
242
|
+
return b(e[0]);
|
|
197
243
|
}
|
|
198
244
|
}
|
|
199
245
|
Symbol.dispose && (h.prototype[Symbol.dispose] = h.prototype.free);
|
|
@@ -226,8 +272,8 @@ var ie = C((ue, q) => {
|
|
|
226
272
|
activeManifest() {
|
|
227
273
|
const e = o.wasmreader_activeManifest(this.__wbg_ptr);
|
|
228
274
|
if (e[2])
|
|
229
|
-
throw
|
|
230
|
-
return
|
|
275
|
+
throw b(e[1]);
|
|
276
|
+
return b(e[0]);
|
|
231
277
|
}
|
|
232
278
|
/**
|
|
233
279
|
* Returns the asset's manifest store as crJSON.
|
|
@@ -251,9 +297,9 @@ var ie = C((ue, q) => {
|
|
|
251
297
|
* @returns {Promise<WasmReader>}
|
|
252
298
|
*/
|
|
253
299
|
static fromBlob(e, t, n) {
|
|
254
|
-
const _ = f(e, o.__wbindgen_malloc, o.__wbindgen_realloc), c =
|
|
255
|
-
var
|
|
256
|
-
return o.wasmreader_fromBlob(_, c, t,
|
|
300
|
+
const _ = f(e, o.__wbindgen_malloc, o.__wbindgen_realloc), c = a;
|
|
301
|
+
var i = w(n) ? 0 : f(n, o.__wbindgen_malloc, o.__wbindgen_realloc), s = a;
|
|
302
|
+
return o.wasmreader_fromBlob(_, c, t, i, s);
|
|
257
303
|
}
|
|
258
304
|
/**
|
|
259
305
|
* Attempts to create a new `WasmReader` from an asset format, a `Blob` of the bytes of the initial segment, and a fragment `Blob`.
|
|
@@ -265,9 +311,9 @@ var ie = C((ue, q) => {
|
|
|
265
311
|
* @returns {Promise<WasmReader>}
|
|
266
312
|
*/
|
|
267
313
|
static fromBlobFragment(e, t, n, _) {
|
|
268
|
-
const c = f(e, o.__wbindgen_malloc, o.__wbindgen_realloc),
|
|
269
|
-
var
|
|
270
|
-
return o.wasmreader_fromBlobFragment(c,
|
|
314
|
+
const c = f(e, o.__wbindgen_malloc, o.__wbindgen_realloc), i = a;
|
|
315
|
+
var s = w(_) ? 0 : f(_, o.__wbindgen_malloc, o.__wbindgen_realloc), u = a;
|
|
316
|
+
return o.wasmreader_fromBlobFragment(c, i, t, n, s, u);
|
|
271
317
|
}
|
|
272
318
|
/**
|
|
273
319
|
* Returns a JSON representation of the asset's manifest store.
|
|
@@ -289,8 +335,8 @@ var ie = C((ue, q) => {
|
|
|
289
335
|
manifestStore() {
|
|
290
336
|
const e = o.wasmreader_manifestStore(this.__wbg_ptr);
|
|
291
337
|
if (e[2])
|
|
292
|
-
throw
|
|
293
|
-
return
|
|
338
|
+
throw b(e[1]);
|
|
339
|
+
return b(e[0]);
|
|
294
340
|
}
|
|
295
341
|
/**
|
|
296
342
|
* Accepts a URI reference to a binary object in the resource store and returns a `js_sys::Uint8Array` containing the resource's bytes.
|
|
@@ -298,19 +344,19 @@ var ie = C((ue, q) => {
|
|
|
298
344
|
* @returns {Uint8Array}
|
|
299
345
|
*/
|
|
300
346
|
resourceToBytes(e) {
|
|
301
|
-
const t = f(e, o.__wbindgen_malloc, o.__wbindgen_realloc), n =
|
|
347
|
+
const t = f(e, o.__wbindgen_malloc, o.__wbindgen_realloc), n = a, _ = o.wasmreader_resourceToBytes(this.__wbg_ptr, t, n);
|
|
302
348
|
if (_[2])
|
|
303
|
-
throw
|
|
304
|
-
return
|
|
349
|
+
throw b(_[1]);
|
|
350
|
+
return b(_[0]);
|
|
305
351
|
}
|
|
306
352
|
}
|
|
307
353
|
Symbol.dispose && (F.prototype[Symbol.dispose] = F.prototype.free);
|
|
308
|
-
function
|
|
309
|
-
const e = f(r, o.__wbindgen_malloc, o.__wbindgen_realloc), t =
|
|
354
|
+
function $(r) {
|
|
355
|
+
const e = f(r, o.__wbindgen_malloc, o.__wbindgen_realloc), t = a, n = o.loadSettings(e, t);
|
|
310
356
|
if (n[1])
|
|
311
|
-
throw
|
|
357
|
+
throw b(n[0]);
|
|
312
358
|
}
|
|
313
|
-
function
|
|
359
|
+
function H() {
|
|
314
360
|
return {
|
|
315
361
|
__proto__: null,
|
|
316
362
|
"./c2pa_bg.js": {
|
|
@@ -330,7 +376,7 @@ var ie = C((ue, q) => {
|
|
|
330
376
|
return w(n) ? 16777215 : n ? 1 : 0;
|
|
331
377
|
},
|
|
332
378
|
__wbg___wbindgen_debug_string_0accd80f45e5faa2: function(e, t) {
|
|
333
|
-
const n =
|
|
379
|
+
const n = x(t), _ = f(n, o.__wbindgen_malloc, o.__wbindgen_realloc), c = a;
|
|
334
380
|
m().setInt32(e + 4, c, !0), m().setInt32(e + 0, _, !0);
|
|
335
381
|
},
|
|
336
382
|
__wbg___wbindgen_in_70a403a56e771704: function(e, t) {
|
|
@@ -364,8 +410,8 @@ var ie = C((ue, q) => {
|
|
|
364
410
|
},
|
|
365
411
|
__wbg___wbindgen_string_get_72bdf95d3ae505b1: function(e, t) {
|
|
366
412
|
const n = t, _ = typeof n == "string" ? n : void 0;
|
|
367
|
-
var c = w(_) ? 0 : f(_, o.__wbindgen_malloc, o.__wbindgen_realloc),
|
|
368
|
-
m().setInt32(e + 4,
|
|
413
|
+
var c = w(_) ? 0 : f(_, o.__wbindgen_malloc, o.__wbindgen_realloc), i = a;
|
|
414
|
+
m().setInt32(e + 4, i, !0), m().setInt32(e + 0, c, !0);
|
|
369
415
|
},
|
|
370
416
|
__wbg___wbindgen_throw_1506f2235d1bdba0: function(e, t) {
|
|
371
417
|
throw new Error(y(e, t));
|
|
@@ -380,12 +426,12 @@ var ie = C((ue, q) => {
|
|
|
380
426
|
e.abort(t);
|
|
381
427
|
},
|
|
382
428
|
__wbg_append_e1746995edcb0170: function() {
|
|
383
|
-
return
|
|
429
|
+
return d(function(e, t, n, _, c) {
|
|
384
430
|
e.append(y(t, n), y(_, c));
|
|
385
431
|
}, arguments);
|
|
386
432
|
},
|
|
387
433
|
__wbg_arrayBuffer_05927079aabe6d46: function() {
|
|
388
|
-
return
|
|
434
|
+
return d(function(e) {
|
|
389
435
|
return e.arrayBuffer();
|
|
390
436
|
}, arguments);
|
|
391
437
|
},
|
|
@@ -393,12 +439,12 @@ var ie = C((ue, q) => {
|
|
|
393
439
|
return e.byteLength;
|
|
394
440
|
},
|
|
395
441
|
__wbg_call_8a89609d89f6608a: function() {
|
|
396
|
-
return
|
|
442
|
+
return d(function(e, t) {
|
|
397
443
|
return e.call(t);
|
|
398
444
|
}, arguments);
|
|
399
445
|
},
|
|
400
446
|
__wbg_call_9c758de292015997: function() {
|
|
401
|
-
return
|
|
447
|
+
return d(function(e, t, n) {
|
|
402
448
|
return e.call(t, n);
|
|
403
449
|
}, arguments);
|
|
404
450
|
},
|
|
@@ -432,22 +478,22 @@ var ie = C((ue, q) => {
|
|
|
432
478
|
return Array.from(e);
|
|
433
479
|
},
|
|
434
480
|
__wbg_getRandomValues_3f44b700395062e5: function() {
|
|
435
|
-
return
|
|
436
|
-
globalThis.crypto.getRandomValues(
|
|
481
|
+
return d(function(e, t) {
|
|
482
|
+
globalThis.crypto.getRandomValues(A(e, t));
|
|
437
483
|
}, arguments);
|
|
438
484
|
},
|
|
439
485
|
__wbg_getRandomValues_76dfc69825c9c552: function() {
|
|
440
|
-
return
|
|
441
|
-
globalThis.crypto.getRandomValues(
|
|
486
|
+
return d(function(e, t) {
|
|
487
|
+
globalThis.crypto.getRandomValues(A(e, t));
|
|
442
488
|
}, arguments);
|
|
443
489
|
},
|
|
444
490
|
__wbg_getRandomValues_8aa3112c6615eef6: function() {
|
|
445
|
-
return
|
|
446
|
-
globalThis.crypto.getRandomValues(
|
|
491
|
+
return d(function(e, t) {
|
|
492
|
+
globalThis.crypto.getRandomValues(A(e, t));
|
|
447
493
|
}, arguments);
|
|
448
494
|
},
|
|
449
495
|
__wbg_getRandomValues_c44a50d8cfdaebeb: function() {
|
|
450
|
-
return
|
|
496
|
+
return d(function(e, t) {
|
|
451
497
|
e.getRandomValues(t);
|
|
452
498
|
}, arguments);
|
|
453
499
|
},
|
|
@@ -455,7 +501,7 @@ var ie = C((ue, q) => {
|
|
|
455
501
|
return e.getTime();
|
|
456
502
|
},
|
|
457
503
|
__wbg_get_1f8f054ddbaa7db2: function() {
|
|
458
|
-
return
|
|
504
|
+
return d(function(e, t) {
|
|
459
505
|
return Reflect.get(e, t);
|
|
460
506
|
}, arguments);
|
|
461
507
|
},
|
|
@@ -463,7 +509,7 @@ var ie = C((ue, q) => {
|
|
|
463
509
|
return e[t >>> 0];
|
|
464
510
|
},
|
|
465
511
|
__wbg_get_de6a0f7d4d18a304: function() {
|
|
466
|
-
return
|
|
512
|
+
return d(function(e, t) {
|
|
467
513
|
return Reflect.get(e, t);
|
|
468
514
|
}, arguments);
|
|
469
515
|
},
|
|
@@ -474,7 +520,7 @@ var ie = C((ue, q) => {
|
|
|
474
520
|
return e[t];
|
|
475
521
|
},
|
|
476
522
|
__wbg_has_73740b27f436fed3: function() {
|
|
477
|
-
return
|
|
523
|
+
return d(function(e, t) {
|
|
478
524
|
return Reflect.has(e, t);
|
|
479
525
|
}, arguments);
|
|
480
526
|
},
|
|
@@ -548,7 +594,7 @@ var ie = C((ue, q) => {
|
|
|
548
594
|
return /* @__PURE__ */ new Date();
|
|
549
595
|
},
|
|
550
596
|
__wbg_new_0d09705104e164af: function() {
|
|
551
|
-
return
|
|
597
|
+
return d(function() {
|
|
552
598
|
return new AbortController();
|
|
553
599
|
}, arguments);
|
|
554
600
|
},
|
|
@@ -562,7 +608,7 @@ var ie = C((ue, q) => {
|
|
|
562
608
|
return /* @__PURE__ */ new Map();
|
|
563
609
|
},
|
|
564
610
|
__wbg_new_a1b9f645bba64f0f: function() {
|
|
565
|
-
return
|
|
611
|
+
return d(function() {
|
|
566
612
|
return new FileReaderSync();
|
|
567
613
|
}, arguments);
|
|
568
614
|
},
|
|
@@ -573,22 +619,22 @@ var ie = C((ue, q) => {
|
|
|
573
619
|
return new Array();
|
|
574
620
|
},
|
|
575
621
|
__wbg_new_e436d06bc8e77460: function() {
|
|
576
|
-
return
|
|
622
|
+
return d(function() {
|
|
577
623
|
return new Headers();
|
|
578
624
|
}, arguments);
|
|
579
625
|
},
|
|
580
626
|
__wbg_new_from_slice_18fa1f71286d66b8: function(e, t) {
|
|
581
|
-
return new Uint8Array(
|
|
627
|
+
return new Uint8Array(A(e, t));
|
|
582
628
|
},
|
|
583
629
|
__wbg_new_typed_bf31d18f92484486: function(e, t) {
|
|
584
630
|
try {
|
|
585
|
-
var n = { a: e, b: t }, _ = (
|
|
586
|
-
const
|
|
631
|
+
var n = { a: e, b: t }, _ = (i, s) => {
|
|
632
|
+
const u = n.a;
|
|
587
633
|
n.a = 0;
|
|
588
634
|
try {
|
|
589
|
-
return
|
|
635
|
+
return K(u, n.b, i, s);
|
|
590
636
|
} finally {
|
|
591
|
-
n.a =
|
|
637
|
+
n.a = u;
|
|
592
638
|
}
|
|
593
639
|
};
|
|
594
640
|
return new Promise(_);
|
|
@@ -600,7 +646,7 @@ var ie = C((ue, q) => {
|
|
|
600
646
|
return new Uint8Array(e >>> 0);
|
|
601
647
|
},
|
|
602
648
|
__wbg_new_with_str_and_init_bcd02b79a793d27f: function() {
|
|
603
|
-
return
|
|
649
|
+
return d(function(e, t, n) {
|
|
604
650
|
return new Request(y(e, t), n);
|
|
605
651
|
}, arguments);
|
|
606
652
|
},
|
|
@@ -608,7 +654,7 @@ var ie = C((ue, q) => {
|
|
|
608
654
|
return e.next;
|
|
609
655
|
},
|
|
610
656
|
__wbg_next_eb8ca7351fa27906: function() {
|
|
611
|
-
return
|
|
657
|
+
return d(function(e) {
|
|
612
658
|
return e.next();
|
|
613
659
|
}, arguments);
|
|
614
660
|
},
|
|
@@ -622,7 +668,7 @@ var ie = C((ue, q) => {
|
|
|
622
668
|
return e.process;
|
|
623
669
|
},
|
|
624
670
|
__wbg_prototypesetcall_3249fc62a0fafa30: function(e, t, n) {
|
|
625
|
-
Uint8Array.prototype.set.call(
|
|
671
|
+
Uint8Array.prototype.set.call(A(e, t), n);
|
|
626
672
|
},
|
|
627
673
|
__wbg_queueMicrotask_35c611f4a14830b2: function(e) {
|
|
628
674
|
queueMicrotask(e);
|
|
@@ -631,18 +677,18 @@ var ie = C((ue, q) => {
|
|
|
631
677
|
return e.queueMicrotask;
|
|
632
678
|
},
|
|
633
679
|
__wbg_randomFillSync_6c25eac9869eb53c: function() {
|
|
634
|
-
return
|
|
680
|
+
return d(function(e, t) {
|
|
635
681
|
e.randomFillSync(t);
|
|
636
682
|
}, arguments);
|
|
637
683
|
},
|
|
638
684
|
__wbg_readAsArrayBuffer_f1b8da05559618d9: function() {
|
|
639
|
-
return
|
|
685
|
+
return d(function(e, t) {
|
|
640
686
|
return e.readAsArrayBuffer(t);
|
|
641
687
|
}, arguments);
|
|
642
688
|
},
|
|
643
689
|
__wbg_require_b4edbdcf3e2a1ef0: function() {
|
|
644
|
-
return
|
|
645
|
-
return
|
|
690
|
+
return d(function() {
|
|
691
|
+
return C.require;
|
|
646
692
|
}, arguments);
|
|
647
693
|
},
|
|
648
694
|
__wbg_resolve_25a7e548d5881dca: function(e) {
|
|
@@ -652,7 +698,7 @@ var ie = C((ue, q) => {
|
|
|
652
698
|
return setTimeout(e, t);
|
|
653
699
|
},
|
|
654
700
|
__wbg_set_29c99a8aac1c01e5: function(e, t, n) {
|
|
655
|
-
e.set(
|
|
701
|
+
e.set(A(t, n));
|
|
656
702
|
},
|
|
657
703
|
__wbg_set_52b1e1eb5bed906a: function(e, t, n) {
|
|
658
704
|
return e.set(t, n);
|
|
@@ -664,10 +710,10 @@ var ie = C((ue, q) => {
|
|
|
664
710
|
e.body = t;
|
|
665
711
|
},
|
|
666
712
|
__wbg_set_cache_488ea16c11cbf20d: function(e, t) {
|
|
667
|
-
e.cache =
|
|
713
|
+
e.cache = Q[t];
|
|
668
714
|
},
|
|
669
715
|
__wbg_set_credentials_fa9c491a27c4bdf0: function(e, t) {
|
|
670
|
-
e.credentials =
|
|
716
|
+
e.credentials = Z[t];
|
|
671
717
|
},
|
|
672
718
|
__wbg_set_dca99999bba88a9a: function(e, t, n) {
|
|
673
719
|
e[t >>> 0] = n;
|
|
@@ -679,7 +725,7 @@ var ie = C((ue, q) => {
|
|
|
679
725
|
e.method = y(t, n);
|
|
680
726
|
},
|
|
681
727
|
__wbg_set_mode_c90e3667002857d4: function(e, t) {
|
|
682
|
-
e.mode =
|
|
728
|
+
e.mode = ee[t];
|
|
683
729
|
},
|
|
684
730
|
__wbg_set_signal_d9da62b3f215c821: function(e, t) {
|
|
685
731
|
e.signal = t;
|
|
@@ -691,35 +737,35 @@ var ie = C((ue, q) => {
|
|
|
691
737
|
return e.size;
|
|
692
738
|
},
|
|
693
739
|
__wbg_slice_02bb778501725738: function() {
|
|
694
|
-
return
|
|
740
|
+
return d(function(e, t, n) {
|
|
695
741
|
return e.slice(t, n);
|
|
696
742
|
}, arguments);
|
|
697
743
|
},
|
|
698
744
|
__wbg_stack_3b0d974bbf31e44f: function(e, t) {
|
|
699
|
-
const n = t.stack, _ = f(n, o.__wbindgen_malloc, o.__wbindgen_realloc), c =
|
|
745
|
+
const n = t.stack, _ = f(n, o.__wbindgen_malloc, o.__wbindgen_realloc), c = a;
|
|
700
746
|
m().setInt32(e + 4, c, !0), m().setInt32(e + 0, _, !0);
|
|
701
747
|
},
|
|
702
748
|
__wbg_static_accessor_GLOBAL_9d53f2689e622ca1: function() {
|
|
703
749
|
const e = typeof global > "u" ? null : global;
|
|
704
|
-
return w(e) ? 0 :
|
|
750
|
+
return w(e) ? 0 : R(e);
|
|
705
751
|
},
|
|
706
752
|
__wbg_static_accessor_GLOBAL_THIS_a1a35cec07001a8a: function() {
|
|
707
753
|
const e = typeof globalThis > "u" ? null : globalThis;
|
|
708
|
-
return w(e) ? 0 :
|
|
754
|
+
return w(e) ? 0 : R(e);
|
|
709
755
|
},
|
|
710
756
|
__wbg_static_accessor_SELF_4c59f6c7ea29a144: function() {
|
|
711
757
|
const e = typeof self > "u" ? null : self;
|
|
712
|
-
return w(e) ? 0 :
|
|
758
|
+
return w(e) ? 0 : R(e);
|
|
713
759
|
},
|
|
714
760
|
__wbg_static_accessor_WINDOW_e70ae9f2eb052253: function() {
|
|
715
761
|
const e = typeof window > "u" ? null : window;
|
|
716
|
-
return w(e) ? 0 :
|
|
762
|
+
return w(e) ? 0 : R(e);
|
|
717
763
|
},
|
|
718
764
|
__wbg_status_00549d55b78d949e: function(e) {
|
|
719
765
|
return e.status;
|
|
720
766
|
},
|
|
721
767
|
__wbg_stringify_8286df6dcc591521: function() {
|
|
722
|
-
return
|
|
768
|
+
return d(function(e) {
|
|
723
769
|
return JSON.stringify(e);
|
|
724
770
|
}, arguments);
|
|
725
771
|
},
|
|
@@ -733,7 +779,7 @@ var ie = C((ue, q) => {
|
|
|
733
779
|
return e.then(t);
|
|
734
780
|
},
|
|
735
781
|
__wbg_url_6808f1c468f2d0cd: function(e, t) {
|
|
736
|
-
const n = t.url, _ = f(n, o.__wbindgen_malloc, o.__wbindgen_realloc), c =
|
|
782
|
+
const n = t.url, _ = f(n, o.__wbindgen_malloc, o.__wbindgen_realloc), c = a;
|
|
737
783
|
m().setInt32(e + 4, c, !0), m().setInt32(e + 0, _, !0);
|
|
738
784
|
},
|
|
739
785
|
__wbg_valueOf_41ae57308c1f031c: function(e) {
|
|
@@ -749,10 +795,10 @@ var ie = C((ue, q) => {
|
|
|
749
795
|
return F.__wrap(e);
|
|
750
796
|
},
|
|
751
797
|
__wbindgen_cast_0000000000000001: function(e, t) {
|
|
752
|
-
return z(e, t,
|
|
798
|
+
return z(e, t, Y);
|
|
753
799
|
},
|
|
754
800
|
__wbindgen_cast_0000000000000002: function(e, t) {
|
|
755
|
-
return z(e, t,
|
|
801
|
+
return z(e, t, X);
|
|
756
802
|
},
|
|
757
803
|
__wbindgen_cast_0000000000000003: function(e) {
|
|
758
804
|
return e;
|
|
@@ -761,7 +807,7 @@ var ie = C((ue, q) => {
|
|
|
761
807
|
return e;
|
|
762
808
|
},
|
|
763
809
|
__wbindgen_cast_0000000000000005: function(e, t) {
|
|
764
|
-
return
|
|
810
|
+
return A(e, t);
|
|
765
811
|
},
|
|
766
812
|
__wbindgen_cast_0000000000000006: function(e, t) {
|
|
767
813
|
return y(e, t);
|
|
@@ -770,7 +816,7 @@ var ie = C((ue, q) => {
|
|
|
770
816
|
return BigInt.asUintN(64, e);
|
|
771
817
|
},
|
|
772
818
|
__wbindgen_cast_0000000000000008: function(e, t) {
|
|
773
|
-
var n =
|
|
819
|
+
var n = A(e, t).slice();
|
|
774
820
|
return o.__wbindgen_free(e, t * 1, 1), n;
|
|
775
821
|
},
|
|
776
822
|
__wbindgen_init_externref_table: function() {
|
|
@@ -780,31 +826,31 @@ var ie = C((ue, q) => {
|
|
|
780
826
|
}
|
|
781
827
|
};
|
|
782
828
|
}
|
|
783
|
-
function
|
|
829
|
+
function X(r, e) {
|
|
784
830
|
o.wasm_bindgen_304c265eb9e6f0af___convert__closures_____invoke_______true_(r, e);
|
|
785
831
|
}
|
|
786
|
-
function
|
|
832
|
+
function Y(r, e, t) {
|
|
787
833
|
const n = o.wasm_bindgen_304c265eb9e6f0af___convert__closures_____invoke___wasm_bindgen_304c265eb9e6f0af___JsValue__core_9b3796e30d99ddb7___result__Result_____wasm_bindgen_304c265eb9e6f0af___JsError___true_(r, e, t);
|
|
788
834
|
if (n[1])
|
|
789
|
-
throw
|
|
835
|
+
throw b(n[0]);
|
|
790
836
|
}
|
|
791
|
-
function
|
|
837
|
+
function K(r, e, t, n) {
|
|
792
838
|
o.wasm_bindgen_304c265eb9e6f0af___convert__closures_____invoke___js_sys_74e7014fb12660c3___Function_fn_wasm_bindgen_304c265eb9e6f0af___JsValue_____wasm_bindgen_304c265eb9e6f0af___sys__Undefined___js_sys_74e7014fb12660c3___Function_fn_wasm_bindgen_304c265eb9e6f0af___JsValue_____wasm_bindgen_304c265eb9e6f0af___sys__Undefined_______true_(r, e, t, n);
|
|
793
839
|
}
|
|
794
|
-
const
|
|
840
|
+
const Q = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"], Z = ["omit", "same-origin", "include"], ee = ["same-origin", "no-cors", "cors", "navigate"], U = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
795
841
|
}, unregister: () => {
|
|
796
842
|
} } : new FinalizationRegistry((r) => o.__wbg_wasmbuilder_free(r, 1)), k = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
797
843
|
}, unregister: () => {
|
|
798
844
|
} } : new FinalizationRegistry((r) => o.__wbg_wasmreader_free(r, 1));
|
|
799
845
|
typeof FinalizationRegistry > "u" || new FinalizationRegistry((r) => o.__wbg_wasmsigner_free(r, 1));
|
|
800
|
-
function
|
|
846
|
+
function R(r) {
|
|
801
847
|
const e = o.__externref_table_alloc();
|
|
802
848
|
return o.__wbindgen_externrefs.set(e, r), e;
|
|
803
849
|
}
|
|
804
850
|
const N = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
805
851
|
}, unregister: () => {
|
|
806
852
|
} } : new FinalizationRegistry((r) => o.__wbindgen_destroy_closure(r.a, r.b));
|
|
807
|
-
function
|
|
853
|
+
function x(r) {
|
|
808
854
|
const e = typeof r;
|
|
809
855
|
if (e == "number" || e == "boolean" || r == null)
|
|
810
856
|
return `${r}`;
|
|
@@ -821,9 +867,9 @@ var ie = C((ue, q) => {
|
|
|
821
867
|
if (Array.isArray(r)) {
|
|
822
868
|
const _ = r.length;
|
|
823
869
|
let c = "[";
|
|
824
|
-
_ > 0 && (c +=
|
|
825
|
-
for (let
|
|
826
|
-
c += ", " +
|
|
870
|
+
_ > 0 && (c += x(r[0]));
|
|
871
|
+
for (let i = 1; i < _; i++)
|
|
872
|
+
c += ", " + x(r[i]);
|
|
827
873
|
return c += "]", c;
|
|
828
874
|
}
|
|
829
875
|
const t = /\[object ([^\]]+)\]/.exec(toString.call(r));
|
|
@@ -841,25 +887,29 @@ var ie = C((ue, q) => {
|
|
|
841
887
|
return r instanceof Error ? `${r.name}: ${r.message}
|
|
842
888
|
${r.stack}` : n;
|
|
843
889
|
}
|
|
844
|
-
function
|
|
845
|
-
return r = r >>> 0,
|
|
890
|
+
function A(r, e) {
|
|
891
|
+
return r = r >>> 0, T().subarray(r / 1, r / 1 + e);
|
|
846
892
|
}
|
|
847
|
-
let
|
|
893
|
+
let v = null;
|
|
848
894
|
function m() {
|
|
849
|
-
return (
|
|
895
|
+
return (v === null || v.buffer.detached === !0 || v.buffer.detached === void 0 && v.buffer !== o.memory.buffer) && (v = new DataView(o.memory.buffer)), v;
|
|
850
896
|
}
|
|
851
897
|
function y(r, e) {
|
|
852
|
-
return
|
|
898
|
+
return re(r >>> 0, e);
|
|
853
899
|
}
|
|
854
900
|
let S = null;
|
|
855
|
-
function
|
|
856
|
-
return (S === null || S.byteLength === 0) && (S = new
|
|
901
|
+
function te() {
|
|
902
|
+
return (S === null || S.byteLength === 0) && (S = new Uint32Array(o.memory.buffer)), S;
|
|
857
903
|
}
|
|
858
|
-
|
|
904
|
+
let B = null;
|
|
905
|
+
function T() {
|
|
906
|
+
return (B === null || B.byteLength === 0) && (B = new Uint8Array(o.memory.buffer)), B;
|
|
907
|
+
}
|
|
908
|
+
function d(r, e) {
|
|
859
909
|
try {
|
|
860
910
|
return r.apply(this, e);
|
|
861
911
|
} catch (t) {
|
|
862
|
-
const n =
|
|
912
|
+
const n = R(t);
|
|
863
913
|
o.__wbindgen_exn_store(n);
|
|
864
914
|
}
|
|
865
915
|
}
|
|
@@ -869,48 +919,52 @@ ${r.stack}` : n;
|
|
|
869
919
|
function z(r, e, t) {
|
|
870
920
|
const n = { a: r, b: e, cnt: 1 }, _ = (...c) => {
|
|
871
921
|
n.cnt++;
|
|
872
|
-
const
|
|
922
|
+
const i = n.a;
|
|
873
923
|
n.a = 0;
|
|
874
924
|
try {
|
|
875
|
-
return t(
|
|
925
|
+
return t(i, n.b, ...c);
|
|
876
926
|
} finally {
|
|
877
|
-
n.a =
|
|
927
|
+
n.a = i, _._wbg_cb_unref();
|
|
878
928
|
}
|
|
879
929
|
};
|
|
880
930
|
return _._wbg_cb_unref = () => {
|
|
881
931
|
--n.cnt === 0 && (o.__wbindgen_destroy_closure(n.a, n.b), n.a = 0, N.unregister(n));
|
|
882
932
|
}, N.register(_, n, n), _;
|
|
883
933
|
}
|
|
934
|
+
function J(r, e) {
|
|
935
|
+
const t = e(r.length * 4, 4) >>> 0;
|
|
936
|
+
return te().set(r, t / 4), a = r.length, t;
|
|
937
|
+
}
|
|
884
938
|
function f(r, e, t) {
|
|
885
939
|
if (t === void 0) {
|
|
886
|
-
const
|
|
887
|
-
return
|
|
940
|
+
const s = j.encode(r), u = e(s.length, 1) >>> 0;
|
|
941
|
+
return T().subarray(u, u + s.length).set(s), a = s.length, u;
|
|
888
942
|
}
|
|
889
943
|
let n = r.length, _ = e(n, 1) >>> 0;
|
|
890
|
-
const c =
|
|
891
|
-
let
|
|
892
|
-
for (;
|
|
893
|
-
const
|
|
894
|
-
if (
|
|
895
|
-
c[_ +
|
|
944
|
+
const c = T();
|
|
945
|
+
let i = 0;
|
|
946
|
+
for (; i < n; i++) {
|
|
947
|
+
const s = r.charCodeAt(i);
|
|
948
|
+
if (s > 127) break;
|
|
949
|
+
c[_ + i] = s;
|
|
896
950
|
}
|
|
897
|
-
if (
|
|
898
|
-
|
|
899
|
-
const
|
|
900
|
-
|
|
951
|
+
if (i !== n) {
|
|
952
|
+
i !== 0 && (r = r.slice(i)), _ = t(_, n, n = i + r.length * 3, 1) >>> 0;
|
|
953
|
+
const s = T().subarray(_ + i, _ + n), u = j.encodeInto(r, s);
|
|
954
|
+
i += u.written, _ = t(_, n, i, 1) >>> 0;
|
|
901
955
|
}
|
|
902
|
-
return
|
|
956
|
+
return a = i, _;
|
|
903
957
|
}
|
|
904
|
-
function
|
|
958
|
+
function b(r) {
|
|
905
959
|
const e = o.__wbindgen_externrefs.get(r);
|
|
906
960
|
return o.__externref_table_dealloc(r), e;
|
|
907
961
|
}
|
|
908
|
-
let
|
|
909
|
-
|
|
910
|
-
const
|
|
911
|
-
let
|
|
912
|
-
function
|
|
913
|
-
return
|
|
962
|
+
let E = new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 });
|
|
963
|
+
E.decode();
|
|
964
|
+
const ne = 2146435072;
|
|
965
|
+
let O = 0;
|
|
966
|
+
function re(r, e) {
|
|
967
|
+
return O += e, O >= ne && (E = new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 }), E.decode(), O = e), E.decode(T().subarray(r, r + e));
|
|
914
968
|
}
|
|
915
969
|
const j = new TextEncoder();
|
|
916
970
|
"encodeInto" in j || (j.encodeInto = function(r, e) {
|
|
@@ -920,19 +974,19 @@ ${r.stack}` : n;
|
|
|
920
974
|
written: t.length
|
|
921
975
|
};
|
|
922
976
|
});
|
|
923
|
-
let
|
|
924
|
-
function
|
|
925
|
-
return o = r.exports,
|
|
977
|
+
let a = 0, o;
|
|
978
|
+
function _e(r, e) {
|
|
979
|
+
return o = r.exports, v = null, S = null, B = null, o.__wbindgen_start(), o;
|
|
926
980
|
}
|
|
927
|
-
function
|
|
981
|
+
function oe(r) {
|
|
928
982
|
if (o !== void 0) return o;
|
|
929
983
|
r !== void 0 && (Object.getPrototypeOf(r) === Object.prototype ? { module: r } = r : console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));
|
|
930
|
-
const e =
|
|
984
|
+
const e = H();
|
|
931
985
|
r instanceof WebAssembly.Module || (r = new WebAssembly.Module(r));
|
|
932
986
|
const t = new WebAssembly.Instance(r, e);
|
|
933
|
-
return
|
|
987
|
+
return _e(t);
|
|
934
988
|
}
|
|
935
|
-
function
|
|
989
|
+
function D() {
|
|
936
990
|
let r = 0;
|
|
937
991
|
const e = /* @__PURE__ */ new Map();
|
|
938
992
|
return {
|
|
@@ -951,18 +1005,18 @@ ${r.stack}` : n;
|
|
|
951
1005
|
}
|
|
952
1006
|
};
|
|
953
1007
|
}
|
|
954
|
-
const
|
|
955
|
-
function
|
|
1008
|
+
const q = Symbol("transfer");
|
|
1009
|
+
function M(r, e) {
|
|
956
1010
|
return {
|
|
957
|
-
type:
|
|
1011
|
+
type: q,
|
|
958
1012
|
value: r,
|
|
959
1013
|
transfer: e ? Array.isArray(e) ? e : [e] : [r]
|
|
960
1014
|
};
|
|
961
1015
|
}
|
|
962
|
-
function
|
|
963
|
-
return !!(r && typeof r == "object" && Reflect.get(r, "type") ===
|
|
1016
|
+
function L(r) {
|
|
1017
|
+
return !!(r && typeof r == "object" && Reflect.get(r, "type") === q);
|
|
964
1018
|
}
|
|
965
|
-
function
|
|
1019
|
+
function W(r = "default") {
|
|
966
1020
|
return {
|
|
967
1021
|
createTx(e) {
|
|
968
1022
|
const t = /* @__PURE__ */ new Map(), n = e ?? self;
|
|
@@ -970,21 +1024,21 @@ ${r.stack}` : n;
|
|
|
970
1024
|
const { data: c } = _;
|
|
971
1025
|
if (c.channelName !== r)
|
|
972
1026
|
return;
|
|
973
|
-
const { id:
|
|
974
|
-
g && (
|
|
1027
|
+
const { id: i, result: s, error: u } = c, g = t.get(i);
|
|
1028
|
+
g && (u ? g.reject(u) : g.resolve(s), t.delete(i));
|
|
975
1029
|
}), new Proxy(
|
|
976
1030
|
{},
|
|
977
1031
|
{
|
|
978
1032
|
get(_, c) {
|
|
979
|
-
return (...
|
|
980
|
-
const
|
|
981
|
-
return
|
|
982
|
-
|
|
1033
|
+
return (...i) => {
|
|
1034
|
+
const s = ce(), u = [], g = [];
|
|
1035
|
+
return i.forEach((I) => {
|
|
1036
|
+
L(I) ? (u.push(I.value), g.push(...I.transfer)) : u.push(I);
|
|
983
1037
|
}), n.postMessage(
|
|
984
|
-
{ method: c, args:
|
|
1038
|
+
{ method: c, args: u, id: s, channelName: r },
|
|
985
1039
|
{ transfer: g }
|
|
986
|
-
), new Promise((
|
|
987
|
-
t.set(
|
|
1040
|
+
), new Promise((I, P) => {
|
|
1041
|
+
t.set(s, { resolve: I, reject: P });
|
|
988
1042
|
});
|
|
989
1043
|
};
|
|
990
1044
|
}
|
|
@@ -997,35 +1051,35 @@ ${r.stack}` : n;
|
|
|
997
1051
|
const { data: c } = _;
|
|
998
1052
|
if (c.channelName !== r)
|
|
999
1053
|
return;
|
|
1000
|
-
const { method:
|
|
1054
|
+
const { method: i, args: s, id: u } = c;
|
|
1001
1055
|
try {
|
|
1002
|
-
const g = await e[
|
|
1003
|
-
|
|
1004
|
-
{ result: g.value, id:
|
|
1056
|
+
const g = await e[i](...s);
|
|
1057
|
+
L(g) ? n.postMessage(
|
|
1058
|
+
{ result: g.value, id: u, channelName: r },
|
|
1005
1059
|
{ transfer: g.transfer }
|
|
1006
|
-
) : n.postMessage({ result: g, id:
|
|
1060
|
+
) : n.postMessage({ result: g, id: u, channelName: r });
|
|
1007
1061
|
} catch (g) {
|
|
1008
|
-
n.postMessage({ error: g, id:
|
|
1062
|
+
n.postMessage({ error: g, id: u, channelName: r });
|
|
1009
1063
|
}
|
|
1010
1064
|
});
|
|
1011
1065
|
}
|
|
1012
1066
|
};
|
|
1013
1067
|
}
|
|
1014
|
-
function
|
|
1068
|
+
function ce() {
|
|
1015
1069
|
return new Array(4).fill(0).map(() => Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(16)).join("-");
|
|
1016
1070
|
}
|
|
1017
|
-
const { rx:
|
|
1018
|
-
function
|
|
1071
|
+
const { rx: ie } = W(), { createTx: se } = W("worker");
|
|
1072
|
+
function ae(r) {
|
|
1019
1073
|
if (!(r != null && r.manifests))
|
|
1020
1074
|
return r;
|
|
1021
1075
|
const e = r.manifests, t = Object.assign(/* @__PURE__ */ Object.create(null), e), n = Object.getPrototypeOf(e);
|
|
1022
1076
|
return n !== null && n !== Object.prototype && r.active_manifest && (t[r.active_manifest] = n), r.manifests = t, r;
|
|
1023
1077
|
}
|
|
1024
|
-
const p =
|
|
1025
|
-
|
|
1026
|
-
|
|
1078
|
+
const p = D(), l = D(), V = se();
|
|
1079
|
+
ie(
|
|
1080
|
+
ue({
|
|
1027
1081
|
async initWorker(r, e) {
|
|
1028
|
-
|
|
1082
|
+
oe({ module: r }), e && $(e);
|
|
1029
1083
|
},
|
|
1030
1084
|
async reader_fromBlob(r, e, t) {
|
|
1031
1085
|
const n = await F.fromBlob(r, e, t);
|
|
@@ -1045,7 +1099,7 @@ ${r.stack}` : n;
|
|
|
1045
1099
|
},
|
|
1046
1100
|
reader_manifestStore(r) {
|
|
1047
1101
|
const e = p.get(r);
|
|
1048
|
-
return
|
|
1102
|
+
return ae(e.manifestStore());
|
|
1049
1103
|
},
|
|
1050
1104
|
reader_activeManifest(r) {
|
|
1051
1105
|
return p.get(r).activeManifest();
|
|
@@ -1058,7 +1112,7 @@ ${r.stack}` : n;
|
|
|
1058
1112
|
},
|
|
1059
1113
|
reader_resourceToBytes(r, e) {
|
|
1060
1114
|
const n = p.get(r).resourceToBytes(e);
|
|
1061
|
-
return
|
|
1115
|
+
return M(n, n.buffer);
|
|
1062
1116
|
},
|
|
1063
1117
|
reader_free(r) {
|
|
1064
1118
|
p.get(r).free(), p.remove(r);
|
|
@@ -1081,9 +1135,18 @@ ${r.stack}` : n;
|
|
|
1081
1135
|
builder_addAction(r, e) {
|
|
1082
1136
|
l.get(r).addAction(e);
|
|
1083
1137
|
},
|
|
1138
|
+
builder_addAssertion(r, e, t) {
|
|
1139
|
+
l.get(r).addAssertion(e, t);
|
|
1140
|
+
},
|
|
1084
1141
|
builder_addRedaction(r, e, t) {
|
|
1085
1142
|
l.get(r).addRedaction(e, t);
|
|
1086
1143
|
},
|
|
1144
|
+
builder_filterActionsAt(r, e) {
|
|
1145
|
+
l.get(r).filterActionsAt(Uint32Array.from(e));
|
|
1146
|
+
},
|
|
1147
|
+
builder_filterIngredientsAt(r, e) {
|
|
1148
|
+
l.get(r).filterIngredientsAt(Uint32Array.from(e));
|
|
1149
|
+
},
|
|
1087
1150
|
builder_setRemoteUrl(r, e) {
|
|
1088
1151
|
l.get(r).setRemoteUrl(e);
|
|
1089
1152
|
},
|
|
@@ -1107,44 +1170,44 @@ ${r.stack}` : n;
|
|
|
1107
1170
|
},
|
|
1108
1171
|
builder_toArchive(r) {
|
|
1109
1172
|
const t = l.get(r).toArchive();
|
|
1110
|
-
return
|
|
1173
|
+
return M(t, t.buffer);
|
|
1111
1174
|
},
|
|
1112
1175
|
async builder_sign(r, e, t, n, _) {
|
|
1113
|
-
const
|
|
1176
|
+
const i = await l.get(r).sign(
|
|
1114
1177
|
{
|
|
1115
1178
|
reserveSize: t.reserveSize,
|
|
1116
1179
|
alg: t.alg,
|
|
1117
|
-
sign: async (
|
|
1180
|
+
sign: async (s) => await V.sign(
|
|
1118
1181
|
e,
|
|
1119
|
-
|
|
1182
|
+
M(s, s.buffer),
|
|
1120
1183
|
t.reserveSize
|
|
1121
1184
|
)
|
|
1122
1185
|
},
|
|
1123
1186
|
n,
|
|
1124
1187
|
_
|
|
1125
1188
|
);
|
|
1126
|
-
return
|
|
1189
|
+
return M(i, i.buffer);
|
|
1127
1190
|
},
|
|
1128
1191
|
async builder_signAndGetManifestBytes(r, e, t, n, _) {
|
|
1129
|
-
const c = l.get(r), { manifest:
|
|
1192
|
+
const c = l.get(r), { manifest: i, asset: s } = await c.signAndGetManifestBytes(
|
|
1130
1193
|
{
|
|
1131
1194
|
reserveSize: t.reserveSize,
|
|
1132
1195
|
alg: t.alg,
|
|
1133
|
-
sign: async (
|
|
1196
|
+
sign: async (u) => await V.sign(
|
|
1134
1197
|
e,
|
|
1135
|
-
|
|
1198
|
+
M(u, u.buffer),
|
|
1136
1199
|
t.reserveSize
|
|
1137
1200
|
)
|
|
1138
1201
|
},
|
|
1139
1202
|
n,
|
|
1140
1203
|
_
|
|
1141
1204
|
);
|
|
1142
|
-
return
|
|
1205
|
+
return M(
|
|
1143
1206
|
{
|
|
1144
|
-
manifest:
|
|
1145
|
-
asset:
|
|
1207
|
+
manifest: i,
|
|
1208
|
+
asset: s
|
|
1146
1209
|
},
|
|
1147
|
-
[
|
|
1210
|
+
[i.buffer, s.buffer]
|
|
1148
1211
|
);
|
|
1149
1212
|
},
|
|
1150
1213
|
builder_free(r) {
|
|
@@ -1152,7 +1215,7 @@ ${r.stack}` : n;
|
|
|
1152
1215
|
}
|
|
1153
1216
|
})
|
|
1154
1217
|
);
|
|
1155
|
-
function
|
|
1218
|
+
function ue(r) {
|
|
1156
1219
|
const e = {};
|
|
1157
1220
|
for (const [t, n] of Object.entries(r))
|
|
1158
1221
|
e[t] = async (..._) => {
|
|
@@ -1165,4 +1228,4 @@ ${r.stack}` : n;
|
|
|
1165
1228
|
return e;
|
|
1166
1229
|
}
|
|
1167
1230
|
});
|
|
1168
|
-
export default
|
|
1231
|
+
export default be();
|