@learncard/didkit-plugin 1.9.8 → 1.9.9

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.
@@ -30,7 +30,6 @@ module.exports = __toCommonJS(index_exports);
30
30
  // src/didkit/pkg/didkit_wasm.js
31
31
  var import_meta = {};
32
32
  var wasm;
33
- var WASM_VECTOR_LEN = 0;
34
33
  var cachedUint8ArrayMemory0 = null;
35
34
  function getUint8ArrayMemory0() {
36
35
  if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
@@ -39,19 +38,37 @@ function getUint8ArrayMemory0() {
39
38
  return cachedUint8ArrayMemory0;
40
39
  }
41
40
  __name(getUint8ArrayMemory0, "getUint8ArrayMemory0");
42
- var cachedTextEncoder = typeof TextEncoder !== "undefined" ? new TextEncoder("utf-8") : { encode: /* @__PURE__ */ __name(() => {
43
- throw Error("TextEncoder not available");
44
- }, "encode") };
45
- var encodeString = typeof cachedTextEncoder.encodeInto === "function" ? function(arg, view) {
46
- return cachedTextEncoder.encodeInto(arg, view);
47
- } : function(arg, view) {
48
- const buf = cachedTextEncoder.encode(arg);
49
- view.set(buf);
50
- return {
51
- read: arg.length,
52
- written: buf.length
41
+ var cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true });
42
+ cachedTextDecoder.decode();
43
+ var MAX_SAFARI_DECODE_BYTES = 2146435072;
44
+ var numBytesDecoded = 0;
45
+ function decodeText(ptr, len) {
46
+ numBytesDecoded += len;
47
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
48
+ cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true });
49
+ cachedTextDecoder.decode();
50
+ numBytesDecoded = len;
51
+ }
52
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
53
+ }
54
+ __name(decodeText, "decodeText");
55
+ function getStringFromWasm0(ptr, len) {
56
+ ptr = ptr >>> 0;
57
+ return decodeText(ptr, len);
58
+ }
59
+ __name(getStringFromWasm0, "getStringFromWasm0");
60
+ var WASM_VECTOR_LEN = 0;
61
+ var cachedTextEncoder = new TextEncoder();
62
+ if (!("encodeInto" in cachedTextEncoder)) {
63
+ cachedTextEncoder.encodeInto = function(arg, view) {
64
+ const buf = cachedTextEncoder.encode(arg);
65
+ view.set(buf);
66
+ return {
67
+ read: arg.length,
68
+ written: buf.length
69
+ };
53
70
  };
54
- };
71
+ }
55
72
  function passStringToWasm0(arg, malloc, realloc) {
56
73
  if (realloc === void 0) {
57
74
  const buf = cachedTextEncoder.encode(arg);
@@ -75,7 +92,7 @@ function passStringToWasm0(arg, malloc, realloc) {
75
92
  }
76
93
  ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
77
94
  const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
78
- const ret = encodeString(arg, view);
95
+ const ret = cachedTextEncoder.encodeInto(arg, view);
79
96
  offset += ret.written;
80
97
  ptr = realloc(ptr, len, offset, 1) >>> 0;
81
98
  }
@@ -91,17 +108,6 @@ function getDataViewMemory0() {
91
108
  return cachedDataViewMemory0;
92
109
  }
93
110
  __name(getDataViewMemory0, "getDataViewMemory0");
94
- var cachedTextDecoder = typeof TextDecoder !== "undefined" ? new TextDecoder("utf-8", { ignoreBOM: true, fatal: true }) : { decode: /* @__PURE__ */ __name(() => {
95
- throw Error("TextDecoder not available");
96
- }, "decode") };
97
- if (typeof TextDecoder !== "undefined") {
98
- cachedTextDecoder.decode();
99
- }
100
- function getStringFromWasm0(ptr, len) {
101
- ptr = ptr >>> 0;
102
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
103
- }
104
- __name(getStringFromWasm0, "getStringFromWasm0");
105
111
  function addToExternrefTable0(obj) {
106
112
  const idx = wasm.__externref_table_alloc();
107
113
  wasm.__wbindgen_export_4.set(idx, obj);
@@ -126,33 +132,6 @@ function isLikeNone(x) {
126
132
  return x === void 0 || x === null;
127
133
  }
128
134
  __name(isLikeNone, "isLikeNone");
129
- var CLOSURE_DTORS = typeof FinalizationRegistry === "undefined" ? { register: /* @__PURE__ */ __name(() => {
130
- }, "register"), unregister: /* @__PURE__ */ __name(() => {
131
- }, "unregister") } : new FinalizationRegistry((state) => {
132
- wasm.__wbindgen_export_5.get(state.dtor)(state.a, state.b);
133
- });
134
- function makeMutClosure(arg0, arg1, dtor, f) {
135
- const state = { a: arg0, b: arg1, cnt: 1, dtor };
136
- const real = /* @__PURE__ */ __name((...args) => {
137
- state.cnt++;
138
- const a = state.a;
139
- state.a = 0;
140
- try {
141
- return f(a, state.b, ...args);
142
- } finally {
143
- if (--state.cnt === 0) {
144
- wasm.__wbindgen_export_5.get(state.dtor)(a, state.b);
145
- CLOSURE_DTORS.unregister(state);
146
- } else {
147
- state.a = a;
148
- }
149
- }
150
- }, "real");
151
- real.original = state;
152
- CLOSURE_DTORS.register(real, state, state);
153
- return real;
154
- }
155
- __name(makeMutClosure, "makeMutClosure");
156
135
  function debugString(val) {
157
136
  const type = typeof val;
158
137
  if (type == "number" || type == "boolean" || val == null) {
@@ -210,6 +189,76 @@ ${val.stack}`;
210
189
  return className;
211
190
  }
212
191
  __name(debugString, "debugString");
192
+ var CLOSURE_DTORS = typeof FinalizationRegistry === "undefined" ? { register: /* @__PURE__ */ __name(() => {
193
+ }, "register"), unregister: /* @__PURE__ */ __name(() => {
194
+ }, "unregister") } : new FinalizationRegistry(
195
+ (state) => {
196
+ wasm.__wbindgen_export_5.get(state.dtor)(state.a, state.b);
197
+ }
198
+ );
199
+ function makeMutClosure(arg0, arg1, dtor, f) {
200
+ const state = { a: arg0, b: arg1, cnt: 1, dtor };
201
+ const real = /* @__PURE__ */ __name((...args) => {
202
+ state.cnt++;
203
+ const a = state.a;
204
+ state.a = 0;
205
+ try {
206
+ return f(a, state.b, ...args);
207
+ } finally {
208
+ if (--state.cnt === 0) {
209
+ wasm.__wbindgen_export_5.get(state.dtor)(a, state.b);
210
+ CLOSURE_DTORS.unregister(state);
211
+ } else {
212
+ state.a = a;
213
+ }
214
+ }
215
+ }, "real");
216
+ real.original = state;
217
+ CLOSURE_DTORS.register(real, state, state);
218
+ return real;
219
+ }
220
+ __name(makeMutClosure, "makeMutClosure");
221
+ function verifyPresentation(vp, proof_options, context_map) {
222
+ const ptr0 = passStringToWasm0(vp, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
223
+ const len0 = WASM_VECTOR_LEN;
224
+ const ptr1 = passStringToWasm0(proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
225
+ const len1 = WASM_VECTOR_LEN;
226
+ const ptr2 = passStringToWasm0(context_map, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
227
+ const len2 = WASM_VECTOR_LEN;
228
+ const ret = wasm.verifyPresentation(ptr0, len0, ptr1, len1, ptr2, len2);
229
+ return ret;
230
+ }
231
+ __name(verifyPresentation, "verifyPresentation");
232
+ function contextLoader(url) {
233
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
234
+ const len0 = WASM_VECTOR_LEN;
235
+ const ret = wasm.contextLoader(ptr0, len0);
236
+ return ret;
237
+ }
238
+ __name(contextLoader, "contextLoader");
239
+ function clearCache() {
240
+ const ret = wasm.clearCache();
241
+ return ret;
242
+ }
243
+ __name(clearCache, "clearCache");
244
+ function didResolver(did, input_metadata) {
245
+ const ptr0 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
246
+ const len0 = WASM_VECTOR_LEN;
247
+ const ptr1 = passStringToWasm0(input_metadata, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
248
+ const len1 = WASM_VECTOR_LEN;
249
+ const ret = wasm.didResolver(ptr0, len0, ptr1, len1);
250
+ return ret;
251
+ }
252
+ __name(didResolver, "didResolver");
253
+ function resolveDID(did, input_metadata) {
254
+ const ptr0 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
255
+ const len0 = WASM_VECTOR_LEN;
256
+ const ptr1 = passStringToWasm0(input_metadata, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
257
+ const len1 = WASM_VECTOR_LEN;
258
+ const ret = wasm.resolveDID(ptr0, len0, ptr1, len1);
259
+ return ret;
260
+ }
261
+ __name(resolveDID, "resolveDID");
213
262
  function takeFromExternrefTable0(idx) {
214
263
  const value = wasm.__wbindgen_export_4.get(idx);
215
264
  wasm.__externref_table_dealloc(idx);
@@ -249,52 +298,6 @@ function keyToVerificationMethod(method_pattern, jwk) {
249
298
  return ret;
250
299
  }
251
300
  __name(keyToVerificationMethod, "keyToVerificationMethod");
252
- function passArray8ToWasm0(arg, malloc) {
253
- const ptr = malloc(arg.length * 1, 1) >>> 0;
254
- getUint8ArrayMemory0().set(arg, ptr / 1);
255
- WASM_VECTOR_LEN = arg.length;
256
- return ptr;
257
- }
258
- __name(passArray8ToWasm0, "passArray8ToWasm0");
259
- function generateSecp256k1KeyFromBytes(bytes) {
260
- let deferred3_0;
261
- let deferred3_1;
262
- try {
263
- const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
264
- const len0 = WASM_VECTOR_LEN;
265
- const ret = wasm.generateSecp256k1KeyFromBytes(ptr0, len0);
266
- var ptr2 = ret[0];
267
- var len2 = ret[1];
268
- if (ret[3]) {
269
- ptr2 = 0;
270
- len2 = 0;
271
- throw takeFromExternrefTable0(ret[2]);
272
- }
273
- deferred3_0 = ptr2;
274
- deferred3_1 = len2;
275
- return getStringFromWasm0(ptr2, len2);
276
- } finally {
277
- wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
278
- }
279
- }
280
- __name(generateSecp256k1KeyFromBytes, "generateSecp256k1KeyFromBytes");
281
- function passArrayJsValueToWasm0(array, malloc) {
282
- const ptr = malloc(array.length * 4, 4) >>> 0;
283
- for (let i = 0; i < array.length; i++) {
284
- const add = addToExternrefTable0(array[i]);
285
- getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
286
- }
287
- WASM_VECTOR_LEN = array.length;
288
- return ptr;
289
- }
290
- __name(passArrayJsValueToWasm0, "passArrayJsValueToWasm0");
291
- function createDagJwe(cleartext, recipients) {
292
- const ptr0 = passArrayJsValueToWasm0(recipients, wasm.__wbindgen_malloc);
293
- const len0 = WASM_VECTOR_LEN;
294
- const ret = wasm.createDagJwe(cleartext, ptr0, len0);
295
- return ret;
296
- }
297
- __name(createDagJwe, "createDagJwe");
298
301
  function didToVerificationMethod(did) {
299
302
  const ptr0 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
300
303
  const len0 = WASM_VECTOR_LEN;
@@ -302,17 +305,6 @@ function didToVerificationMethod(did) {
302
305
  return ret;
303
306
  }
304
307
  __name(didToVerificationMethod, "didToVerificationMethod");
305
- function verifyPresentation(vp, proof_options, context_map) {
306
- const ptr0 = passStringToWasm0(vp, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
307
- const len0 = WASM_VECTOR_LEN;
308
- const ptr1 = passStringToWasm0(proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
309
- const len1 = WASM_VECTOR_LEN;
310
- const ptr2 = passStringToWasm0(context_map, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
311
- const len2 = WASM_VECTOR_LEN;
312
- const ret = wasm.verifyPresentation(ptr0, len0, ptr1, len1, ptr2, len2);
313
- return ret;
314
- }
315
- __name(verifyPresentation, "verifyPresentation");
316
308
  function issueCredential(credential, proof_options, key, context_map) {
317
309
  const ptr0 = passStringToWasm0(credential, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
318
310
  const len0 = WASM_VECTOR_LEN;
@@ -326,33 +318,17 @@ function issueCredential(credential, proof_options, key, context_map) {
326
318
  return ret;
327
319
  }
328
320
  __name(issueCredential, "issueCredential");
329
- function didResolver(did, input_metadata) {
330
- const ptr0 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
331
- const len0 = WASM_VECTOR_LEN;
332
- const ptr1 = passStringToWasm0(input_metadata, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
333
- const len1 = WASM_VECTOR_LEN;
334
- const ret = wasm.didResolver(ptr0, len0, ptr1, len1);
335
- return ret;
336
- }
337
- __name(didResolver, "didResolver");
338
- function createJwe(cleartext, recipients) {
339
- const ptr0 = passStringToWasm0(cleartext, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
340
- const len0 = WASM_VECTOR_LEN;
341
- const ptr1 = passArrayJsValueToWasm0(recipients, wasm.__wbindgen_malloc);
342
- const len1 = WASM_VECTOR_LEN;
343
- const ret = wasm.createJwe(ptr0, len0, ptr1, len1);
344
- return ret;
345
- }
346
- __name(createJwe, "createJwe");
347
- function decryptJwe(jwe, jwks) {
348
- const ptr0 = passStringToWasm0(jwe, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
321
+ function verifyCredential(vc, proof_options, context_map) {
322
+ const ptr0 = passStringToWasm0(vc, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
349
323
  const len0 = WASM_VECTOR_LEN;
350
- const ptr1 = passArrayJsValueToWasm0(jwks, wasm.__wbindgen_malloc);
324
+ const ptr1 = passStringToWasm0(proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
351
325
  const len1 = WASM_VECTOR_LEN;
352
- const ret = wasm.decryptJwe(ptr0, len0, ptr1, len1);
326
+ const ptr2 = passStringToWasm0(context_map, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
327
+ const len2 = WASM_VECTOR_LEN;
328
+ const ret = wasm.verifyCredential(ptr0, len0, ptr1, len1, ptr2, len2);
353
329
  return ret;
354
330
  }
355
- __name(decryptJwe, "decryptJwe");
331
+ __name(verifyCredential, "verifyCredential");
356
332
  function issuePresentation(presentation, proof_options, key, context_map) {
357
333
  const ptr0 = passStringToWasm0(presentation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
358
334
  const len0 = WASM_VECTOR_LEN;
@@ -366,38 +342,13 @@ function issuePresentation(presentation, proof_options, key, context_map) {
366
342
  return ret;
367
343
  }
368
344
  __name(issuePresentation, "issuePresentation");
369
- function clearCache() {
370
- const ret = wasm.clearCache();
371
- return ret;
372
- }
373
- __name(clearCache, "clearCache");
374
- function verifyCredential(vc, proof_options, context_map) {
375
- const ptr0 = passStringToWasm0(vc, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
376
- const len0 = WASM_VECTOR_LEN;
377
- const ptr1 = passStringToWasm0(proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
378
- const len1 = WASM_VECTOR_LEN;
379
- const ptr2 = passStringToWasm0(context_map, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
380
- const len2 = WASM_VECTOR_LEN;
381
- const ret = wasm.verifyCredential(ptr0, len0, ptr1, len1, ptr2, len2);
382
- return ret;
383
- }
384
- __name(verifyCredential, "verifyCredential");
385
- function resolveDID(did, input_metadata) {
386
- const ptr0 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
387
- const len0 = WASM_VECTOR_LEN;
388
- const ptr1 = passStringToWasm0(input_metadata, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
389
- const len1 = WASM_VECTOR_LEN;
390
- const ret = wasm.resolveDID(ptr0, len0, ptr1, len1);
391
- return ret;
392
- }
393
- __name(resolveDID, "resolveDID");
394
- function contextLoader(url) {
395
- const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
396
- const len0 = WASM_VECTOR_LEN;
397
- const ret = wasm.contextLoader(ptr0, len0);
398
- return ret;
345
+ function passArray8ToWasm0(arg, malloc) {
346
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
347
+ getUint8ArrayMemory0().set(arg, ptr / 1);
348
+ WASM_VECTOR_LEN = arg.length;
349
+ return ptr;
399
350
  }
400
- __name(contextLoader, "contextLoader");
351
+ __name(passArray8ToWasm0, "passArray8ToWasm0");
401
352
  function generateEd25519KeyFromBytes(bytes) {
402
353
  let deferred3_0;
403
354
  let deferred3_1;
@@ -420,6 +371,63 @@ function generateEd25519KeyFromBytes(bytes) {
420
371
  }
421
372
  }
422
373
  __name(generateEd25519KeyFromBytes, "generateEd25519KeyFromBytes");
374
+ function generateSecp256k1KeyFromBytes(bytes) {
375
+ let deferred3_0;
376
+ let deferred3_1;
377
+ try {
378
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
379
+ const len0 = WASM_VECTOR_LEN;
380
+ const ret = wasm.generateSecp256k1KeyFromBytes(ptr0, len0);
381
+ var ptr2 = ret[0];
382
+ var len2 = ret[1];
383
+ if (ret[3]) {
384
+ ptr2 = 0;
385
+ len2 = 0;
386
+ throw takeFromExternrefTable0(ret[2]);
387
+ }
388
+ deferred3_0 = ptr2;
389
+ deferred3_1 = len2;
390
+ return getStringFromWasm0(ptr2, len2);
391
+ } finally {
392
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
393
+ }
394
+ }
395
+ __name(generateSecp256k1KeyFromBytes, "generateSecp256k1KeyFromBytes");
396
+ function passArrayJsValueToWasm0(array, malloc) {
397
+ const ptr = malloc(array.length * 4, 4) >>> 0;
398
+ for (let i = 0; i < array.length; i++) {
399
+ const add = addToExternrefTable0(array[i]);
400
+ getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
401
+ }
402
+ WASM_VECTOR_LEN = array.length;
403
+ return ptr;
404
+ }
405
+ __name(passArrayJsValueToWasm0, "passArrayJsValueToWasm0");
406
+ function createJwe(cleartext, recipients) {
407
+ const ptr0 = passStringToWasm0(cleartext, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
408
+ const len0 = WASM_VECTOR_LEN;
409
+ const ptr1 = passArrayJsValueToWasm0(recipients, wasm.__wbindgen_malloc);
410
+ const len1 = WASM_VECTOR_LEN;
411
+ const ret = wasm.createJwe(ptr0, len0, ptr1, len1);
412
+ return ret;
413
+ }
414
+ __name(createJwe, "createJwe");
415
+ function decryptJwe(jwe, jwks) {
416
+ const ptr0 = passStringToWasm0(jwe, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
417
+ const len0 = WASM_VECTOR_LEN;
418
+ const ptr1 = passArrayJsValueToWasm0(jwks, wasm.__wbindgen_malloc);
419
+ const len1 = WASM_VECTOR_LEN;
420
+ const ret = wasm.decryptJwe(ptr0, len0, ptr1, len1);
421
+ return ret;
422
+ }
423
+ __name(decryptJwe, "decryptJwe");
424
+ function createDagJwe(cleartext, recipients) {
425
+ const ptr0 = passArrayJsValueToWasm0(recipients, wasm.__wbindgen_malloc);
426
+ const len0 = WASM_VECTOR_LEN;
427
+ const ret = wasm.createDagJwe(cleartext, ptr0, len0);
428
+ return ret;
429
+ }
430
+ __name(createDagJwe, "createDagJwe");
423
431
  function decryptDagJwe(jwe, jwks) {
424
432
  const ptr0 = passStringToWasm0(jwe, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
425
433
  const len0 = WASM_VECTOR_LEN;
@@ -429,23 +437,25 @@ function decryptDagJwe(jwe, jwks) {
429
437
  return ret;
430
438
  }
431
439
  __name(decryptDagJwe, "decryptDagJwe");
432
- function __wbg_adapter_54(arg0, arg1, arg2) {
433
- wasm.closure4149_externref_shim(arg0, arg1, arg2);
440
+ function __wbg_adapter_10(arg0, arg1, arg2) {
441
+ wasm.closure4206_externref_shim(arg0, arg1, arg2);
434
442
  }
435
- __name(__wbg_adapter_54, "__wbg_adapter_54");
436
- function __wbg_adapter_172(arg0, arg1, arg2, arg3) {
437
- wasm.closure4546_externref_shim(arg0, arg1, arg2, arg3);
443
+ __name(__wbg_adapter_10, "__wbg_adapter_10");
444
+ function __wbg_adapter_170(arg0, arg1, arg2, arg3) {
445
+ wasm.closure4605_externref_shim(arg0, arg1, arg2, arg3);
438
446
  }
439
- __name(__wbg_adapter_172, "__wbg_adapter_172");
447
+ __name(__wbg_adapter_170, "__wbg_adapter_170");
440
448
  var __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
441
449
  var __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
450
+ var EXPECTED_RESPONSE_TYPES = /* @__PURE__ */ new Set(["basic", "cors", "default"]);
442
451
  async function __wbg_load(module2, imports) {
443
452
  if (typeof Response === "function" && module2 instanceof Response) {
444
453
  if (typeof WebAssembly.instantiateStreaming === "function") {
445
454
  try {
446
455
  return await WebAssembly.instantiateStreaming(module2, imports);
447
456
  } catch (e) {
448
- if (module2.headers.get("Content-Type") != "application/wasm") {
457
+ const validResponse = module2.ok && EXPECTED_RESPONSE_TYPES.has(module2.type);
458
+ if (validResponse && module2.headers.get("Content-Type") !== "application/wasm") {
449
459
  console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
450
460
  } else {
451
461
  throw e;
@@ -467,6 +477,10 @@ __name(__wbg_load, "__wbg_load");
467
477
  function __wbg_get_imports() {
468
478
  const imports = {};
469
479
  imports.wbg = {};
480
+ imports.wbg.__wbg_Error_e17e777aac105295 = function(arg0, arg1) {
481
+ const ret = Error(getStringFromWasm0(arg0, arg1));
482
+ return ret;
483
+ };
470
484
  imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
471
485
  const ret = String(arg1);
472
486
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -474,31 +488,27 @@ function __wbg_get_imports() {
474
488
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
475
489
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
476
490
  };
477
- imports.wbg.__wbg_abort_775ef1d17fc65868 = function(arg0) {
491
+ imports.wbg.__wbg_abort_67e1b49bf6614565 = function(arg0) {
478
492
  arg0.abort();
479
493
  };
480
- imports.wbg.__wbg_append_8c7dd8d641a5f01b = function() {
494
+ imports.wbg.__wbg_append_72a3c0addd2bce38 = function() {
481
495
  return handleError(function(arg0, arg1, arg2, arg3, arg4) {
482
496
  arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
483
497
  }, arguments);
484
498
  };
485
- imports.wbg.__wbg_arrayBuffer_d1b44c4390db422f = function() {
499
+ imports.wbg.__wbg_arrayBuffer_9c99b8e2809e8cbb = function() {
486
500
  return handleError(function(arg0) {
487
501
  const ret = arg0.arrayBuffer();
488
502
  return ret;
489
503
  }, arguments);
490
504
  };
491
- imports.wbg.__wbg_buffer_609cc3eee51ed158 = function(arg0) {
492
- const ret = arg0.buffer;
493
- return ret;
494
- };
495
- imports.wbg.__wbg_call_672a4d21634d4a24 = function() {
505
+ imports.wbg.__wbg_call_13410aac570ffff7 = function() {
496
506
  return handleError(function(arg0, arg1) {
497
507
  const ret = arg0.call(arg1);
498
508
  return ret;
499
509
  }, arguments);
500
510
  };
501
- imports.wbg.__wbg_call_7cccdd69e0791ae2 = function() {
511
+ imports.wbg.__wbg_call_a5400b25a865cfd8 = function() {
502
512
  return handleError(function(arg0, arg1, arg2) {
503
513
  const ret = arg0.call(arg1, arg2);
504
514
  return ret;
@@ -512,15 +522,15 @@ function __wbg_get_imports() {
512
522
  const ret = arg0.crypto;
513
523
  return ret;
514
524
  };
515
- imports.wbg.__wbg_done_769e5ede4b31c67b = function(arg0) {
525
+ imports.wbg.__wbg_done_75ed0ee6dd243d9d = function(arg0) {
516
526
  const ret = arg0.done;
517
527
  return ret;
518
528
  };
519
- imports.wbg.__wbg_entries_3265d4158b33e5dc = function(arg0) {
529
+ imports.wbg.__wbg_entries_2be2f15bd5554996 = function(arg0) {
520
530
  const ret = Object.entries(arg0);
521
531
  return ret;
522
532
  };
523
- imports.wbg.__wbg_fetch_509096533071c657 = function(arg0, arg1) {
533
+ imports.wbg.__wbg_fetch_87aed7f306ec6d63 = function(arg0, arg1) {
524
534
  const ret = arg0.fetch(arg1);
525
535
  return ret;
526
536
  };
@@ -528,18 +538,18 @@ function __wbg_get_imports() {
528
538
  const ret = fetch(arg0);
529
539
  return ret;
530
540
  };
531
- imports.wbg.__wbg_from_2a5d3e218e67aa85 = function(arg0) {
541
+ imports.wbg.__wbg_from_88bc52ce20ba6318 = function(arg0) {
532
542
  const ret = Array.from(arg0);
533
543
  return ret;
534
544
  };
535
- imports.wbg.__wbg_getRandomValues_371e7ade8bd92088 = function(arg0, arg1) {
536
- arg0.getRandomValues(arg1);
537
- };
538
- imports.wbg.__wbg_getRandomValues_3c9c0d586e575a16 = function() {
545
+ imports.wbg.__wbg_getRandomValues_1c61fac11405ffdc = function() {
539
546
  return handleError(function(arg0, arg1) {
540
547
  globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
541
548
  }, arguments);
542
549
  };
550
+ imports.wbg.__wbg_getRandomValues_371e7ade8bd92088 = function(arg0, arg1) {
551
+ arg0.getRandomValues(arg1);
552
+ };
543
553
  imports.wbg.__wbg_getRandomValues_7dfe5bd1b67c9ca1 = function(arg0) {
544
554
  const ret = arg0.getRandomValues;
545
555
  return ret;
@@ -549,31 +559,31 @@ function __wbg_get_imports() {
549
559
  arg0.getRandomValues(arg1);
550
560
  }, arguments);
551
561
  };
552
- imports.wbg.__wbg_getTime_46267b1c24877e30 = function(arg0) {
562
+ imports.wbg.__wbg_getTime_6bb3f64e0f18f817 = function(arg0) {
553
563
  const ret = arg0.getTime();
554
564
  return ret;
555
565
  };
556
- imports.wbg.__wbg_get_67b2ba62fc30de12 = function() {
566
+ imports.wbg.__wbg_get_0da715ceaecea5c8 = function(arg0, arg1) {
567
+ const ret = arg0[arg1 >>> 0];
568
+ return ret;
569
+ };
570
+ imports.wbg.__wbg_get_458e874b43b18b25 = function() {
557
571
  return handleError(function(arg0, arg1) {
558
572
  const ret = Reflect.get(arg0, arg1);
559
573
  return ret;
560
574
  }, arguments);
561
575
  };
562
- imports.wbg.__wbg_get_b9b93047fe3cf45b = function(arg0, arg1) {
563
- const ret = arg0[arg1 >>> 0];
564
- return ret;
565
- };
566
- imports.wbg.__wbg_has_a5ea9117f258a0ec = function() {
576
+ imports.wbg.__wbg_has_b89e451f638123e3 = function() {
567
577
  return handleError(function(arg0, arg1) {
568
578
  const ret = Reflect.has(arg0, arg1);
569
579
  return ret;
570
580
  }, arguments);
571
581
  };
572
- imports.wbg.__wbg_headers_9cb51cfd2ac780a4 = function(arg0) {
582
+ imports.wbg.__wbg_headers_29fec3c72865cd75 = function(arg0) {
573
583
  const ret = arg0.headers;
574
584
  return ret;
575
585
  };
576
- imports.wbg.__wbg_instanceof_ArrayBuffer_e14585432e3737fc = function(arg0) {
586
+ imports.wbg.__wbg_instanceof_ArrayBuffer_67f3012529f6a2dd = function(arg0) {
577
587
  let result;
578
588
  try {
579
589
  result = arg0 instanceof ArrayBuffer;
@@ -583,7 +593,7 @@ function __wbg_get_imports() {
583
593
  const ret = result;
584
594
  return ret;
585
595
  };
586
- imports.wbg.__wbg_instanceof_Map_f3469ce2244d2430 = function(arg0) {
596
+ imports.wbg.__wbg_instanceof_Map_ebb01a5b6b5ffd0b = function(arg0) {
587
597
  let result;
588
598
  try {
589
599
  result = arg0 instanceof Map;
@@ -593,7 +603,7 @@ function __wbg_get_imports() {
593
603
  const ret = result;
594
604
  return ret;
595
605
  };
596
- imports.wbg.__wbg_instanceof_Response_f2cc20d9f7dfd644 = function(arg0) {
606
+ imports.wbg.__wbg_instanceof_Response_50fde2cd696850bf = function(arg0) {
597
607
  let result;
598
608
  try {
599
609
  result = arg0 instanceof Response;
@@ -603,7 +613,7 @@ function __wbg_get_imports() {
603
613
  const ret = result;
604
614
  return ret;
605
615
  };
606
- imports.wbg.__wbg_instanceof_Uint8Array_17156bcf118086a9 = function(arg0) {
616
+ imports.wbg.__wbg_instanceof_Uint8Array_9a8378d955933db7 = function(arg0) {
607
617
  let result;
608
618
  try {
609
619
  result = arg0 instanceof Uint8Array;
@@ -613,27 +623,27 @@ function __wbg_get_imports() {
613
623
  const ret = result;
614
624
  return ret;
615
625
  };
616
- imports.wbg.__wbg_isArray_a1eab7e0d067391b = function(arg0) {
626
+ imports.wbg.__wbg_isArray_030cce220591fb41 = function(arg0) {
617
627
  const ret = Array.isArray(arg0);
618
628
  return ret;
619
629
  };
620
- imports.wbg.__wbg_isSafeInteger_343e2beeeece1bb0 = function(arg0) {
630
+ imports.wbg.__wbg_isSafeInteger_1c0d1af5542e102a = function(arg0) {
621
631
  const ret = Number.isSafeInteger(arg0);
622
632
  return ret;
623
633
  };
624
- imports.wbg.__wbg_iterator_9a24c88df860dc65 = function() {
634
+ imports.wbg.__wbg_iterator_f370b34483c71a1c = function() {
625
635
  const ret = Symbol.iterator;
626
636
  return ret;
627
637
  };
628
- imports.wbg.__wbg_keys_5c77a08ddc2fb8a6 = function(arg0) {
638
+ imports.wbg.__wbg_keys_ef52390b2ae0e714 = function(arg0) {
629
639
  const ret = Object.keys(arg0);
630
640
  return ret;
631
641
  };
632
- imports.wbg.__wbg_length_a446193dc22c12f8 = function(arg0) {
642
+ imports.wbg.__wbg_length_186546c51cd61acd = function(arg0) {
633
643
  const ret = arg0.length;
634
644
  return ret;
635
645
  };
636
- imports.wbg.__wbg_length_e2d2a49132c1b256 = function(arg0) {
646
+ imports.wbg.__wbg_length_6bb7e81f9d7713e4 = function(arg0) {
637
647
  const ret = arg0.length;
638
648
  return ret;
639
649
  };
@@ -645,24 +655,26 @@ function __wbg_get_imports() {
645
655
  const ret = arg0.msCrypto;
646
656
  return ret;
647
657
  };
648
- imports.wbg.__wbg_new0_f788a2397c7ca929 = function() {
658
+ imports.wbg.__wbg_new0_b0a0a38c201e6df5 = function() {
649
659
  const ret = /* @__PURE__ */ new Date();
650
660
  return ret;
651
661
  };
652
- imports.wbg.__wbg_new_018dcc2d6c8c2f6a = function() {
653
- return handleError(function() {
654
- const ret = new Headers();
655
- return ret;
656
- }, arguments);
662
+ imports.wbg.__wbg_new_19c25a3f2fa63a02 = function() {
663
+ const ret = new Object();
664
+ return ret;
657
665
  };
658
- imports.wbg.__wbg_new_23a2665fac83c611 = function(arg0, arg1) {
666
+ imports.wbg.__wbg_new_1f3a344cf3123716 = function() {
667
+ const ret = new Array();
668
+ return ret;
669
+ };
670
+ imports.wbg.__wbg_new_2e3c58a15f39f5f9 = function(arg0, arg1) {
659
671
  try {
660
672
  var state0 = { a: arg0, b: arg1 };
661
673
  var cb0 = /* @__PURE__ */ __name((arg02, arg12) => {
662
674
  const a = state0.a;
663
675
  state0.a = 0;
664
676
  try {
665
- return __wbg_adapter_172(a, state0.b, arg02, arg12);
677
+ return __wbg_adapter_170(a, state0.b, arg02, arg12);
666
678
  } finally {
667
679
  state0.a = a;
668
680
  }
@@ -673,51 +685,49 @@ function __wbg_get_imports() {
673
685
  state0.a = state0.b = 0;
674
686
  }
675
687
  };
676
- imports.wbg.__wbg_new_405e22f390576ce2 = function() {
677
- const ret = new Object();
678
- return ret;
679
- };
680
- imports.wbg.__wbg_new_5e0be73521bc8c17 = function() {
688
+ imports.wbg.__wbg_new_2ff1f68f3676ea53 = function() {
681
689
  const ret = /* @__PURE__ */ new Map();
682
690
  return ret;
683
691
  };
684
- imports.wbg.__wbg_new_78feb108b6472713 = function() {
685
- const ret = new Array();
686
- return ret;
687
- };
688
- imports.wbg.__wbg_new_a12002a7f91c75be = function(arg0) {
692
+ imports.wbg.__wbg_new_638ebfaedbf32a5e = function(arg0) {
689
693
  const ret = new Uint8Array(arg0);
690
694
  return ret;
691
695
  };
692
- imports.wbg.__wbg_new_e25e5aab09ff45db = function() {
696
+ imports.wbg.__wbg_new_66b9434b4e59b63e = function() {
693
697
  return handleError(function() {
694
698
  const ret = new AbortController();
695
699
  return ret;
696
700
  }, arguments);
697
701
  };
698
- imports.wbg.__wbg_newnoargs_105ed471475aaf50 = function(arg0, arg1) {
699
- const ret = new Function(getStringFromWasm0(arg0, arg1));
702
+ imports.wbg.__wbg_new_f6e53210afea8e45 = function() {
703
+ return handleError(function() {
704
+ const ret = new Headers();
705
+ return ret;
706
+ }, arguments);
707
+ };
708
+ imports.wbg.__wbg_newfromslice_074c56947bd43469 = function(arg0, arg1) {
709
+ const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
700
710
  return ret;
701
711
  };
702
- imports.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function(arg0, arg1, arg2) {
703
- const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
712
+ imports.wbg.__wbg_newnoargs_254190557c45b4ec = function(arg0, arg1) {
713
+ const ret = new Function(getStringFromWasm0(arg0, arg1));
704
714
  return ret;
705
715
  };
706
- imports.wbg.__wbg_newwithlength_a381634e90c276d4 = function(arg0) {
716
+ imports.wbg.__wbg_newwithlength_a167dcc7aaa3ba77 = function(arg0) {
707
717
  const ret = new Uint8Array(arg0 >>> 0);
708
718
  return ret;
709
719
  };
710
- imports.wbg.__wbg_newwithstrandinit_06c535e0a867c635 = function() {
720
+ imports.wbg.__wbg_newwithstrandinit_b5d168a29a3fd85f = function() {
711
721
  return handleError(function(arg0, arg1, arg2) {
712
722
  const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
713
723
  return ret;
714
724
  }, arguments);
715
725
  };
716
- imports.wbg.__wbg_next_25feadfc0913fea9 = function(arg0) {
726
+ imports.wbg.__wbg_next_5b3530e612fde77d = function(arg0) {
717
727
  const ret = arg0.next;
718
728
  return ret;
719
729
  };
720
- imports.wbg.__wbg_next_6574e1a8a62d1055 = function() {
730
+ imports.wbg.__wbg_next_692e82279131b03c = function() {
721
731
  return handleError(function(arg0) {
722
732
  const ret = arg0.next();
723
733
  return ret;
@@ -727,7 +737,7 @@ function __wbg_get_imports() {
727
737
  const ret = arg0.node;
728
738
  return ret;
729
739
  };
730
- imports.wbg.__wbg_now_d18023d54d4e5500 = function(arg0) {
740
+ imports.wbg.__wbg_now_886b39d7ec380719 = function(arg0) {
731
741
  const ret = arg0.now();
732
742
  return ret;
733
743
  };
@@ -735,14 +745,17 @@ function __wbg_get_imports() {
735
745
  const ret = arg0.process;
736
746
  return ret;
737
747
  };
738
- imports.wbg.__wbg_push_737cfc8c1432c2c6 = function(arg0, arg1) {
748
+ imports.wbg.__wbg_prototypesetcall_3d4a26c1ed734349 = function(arg0, arg1, arg2) {
749
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
750
+ };
751
+ imports.wbg.__wbg_push_330b2eb93e4e1212 = function(arg0, arg1) {
739
752
  const ret = arg0.push(arg1);
740
753
  return ret;
741
754
  };
742
- imports.wbg.__wbg_queueMicrotask_97d92b4fcc8a61c5 = function(arg0) {
755
+ imports.wbg.__wbg_queueMicrotask_25d0739ac89e8c88 = function(arg0) {
743
756
  queueMicrotask(arg0);
744
757
  };
745
- imports.wbg.__wbg_queueMicrotask_d3219def82552485 = function(arg0) {
758
+ imports.wbg.__wbg_queueMicrotask_4488407636f5bf24 = function(arg0) {
746
759
  const ret = arg0.queueMicrotask;
747
760
  return ret;
748
761
  };
@@ -764,7 +777,7 @@ function __wbg_get_imports() {
764
777
  return ret;
765
778
  }, arguments);
766
779
  };
767
- imports.wbg.__wbg_resolve_4851785c9c5f573d = function(arg0) {
780
+ imports.wbg.__wbg_resolve_4055c623acdd6a1b = function(arg0) {
768
781
  const ret = Promise.resolve(arg0);
769
782
  return ret;
770
783
  };
@@ -774,52 +787,52 @@ function __wbg_get_imports() {
774
787
  return ret;
775
788
  }, arguments);
776
789
  };
777
- imports.wbg.__wbg_set_37837023f3d740e8 = function(arg0, arg1, arg2) {
778
- arg0[arg1 >>> 0] = arg2;
790
+ imports.wbg.__wbg_set_1353b2a5e96bc48c = function(arg0, arg1, arg2) {
791
+ arg0.set(getArrayU8FromWasm0(arg1, arg2));
779
792
  };
780
793
  imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
781
794
  arg0[arg1] = arg2;
782
795
  };
783
- imports.wbg.__wbg_set_65595bdd868b3009 = function(arg0, arg1, arg2) {
784
- arg0.set(arg1, arg2 >>> 0);
785
- };
786
- imports.wbg.__wbg_set_8fc6bf8a5b1071d1 = function(arg0, arg1, arg2) {
787
- const ret = arg0.set(arg1, arg2);
788
- return ret;
789
- };
790
- imports.wbg.__wbg_set_bb8cecf6a62b9f46 = function() {
796
+ imports.wbg.__wbg_set_453345bcda80b89a = function() {
791
797
  return handleError(function(arg0, arg1, arg2) {
792
798
  const ret = Reflect.set(arg0, arg1, arg2);
793
799
  return ret;
794
800
  }, arguments);
795
801
  };
796
- imports.wbg.__wbg_setbody_5923b78a95eedf29 = function(arg0, arg1) {
802
+ imports.wbg.__wbg_set_90f6c0f7bd8c0415 = function(arg0, arg1, arg2) {
803
+ arg0[arg1 >>> 0] = arg2;
804
+ };
805
+ imports.wbg.__wbg_set_b7f1cf4fae26fe2a = function(arg0, arg1, arg2) {
806
+ const ret = arg0.set(arg1, arg2);
807
+ return ret;
808
+ };
809
+ imports.wbg.__wbg_setbody_c8460bdf44147df8 = function(arg0, arg1) {
797
810
  arg0.body = arg1;
798
811
  };
799
- imports.wbg.__wbg_setcredentials_c3a22f1cd105a2c6 = function(arg0, arg1) {
812
+ imports.wbg.__wbg_setcredentials_9cd60d632c9d5dfc = function(arg0, arg1) {
800
813
  arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
801
814
  };
802
- imports.wbg.__wbg_setheaders_834c0bdb6a8949ad = function(arg0, arg1) {
815
+ imports.wbg.__wbg_setheaders_0052283e2f3503d1 = function(arg0, arg1) {
803
816
  arg0.headers = arg1;
804
817
  };
805
- imports.wbg.__wbg_setmethod_3c5280fe5d890842 = function(arg0, arg1, arg2) {
818
+ imports.wbg.__wbg_setmethod_9b504d5b855b329c = function(arg0, arg1, arg2) {
806
819
  arg0.method = getStringFromWasm0(arg1, arg2);
807
820
  };
808
- imports.wbg.__wbg_setmode_5dc300b865044b65 = function(arg0, arg1) {
821
+ imports.wbg.__wbg_setmode_a23e1a2ad8b512f8 = function(arg0, arg1) {
809
822
  arg0.mode = __wbindgen_enum_RequestMode[arg1];
810
823
  };
811
- imports.wbg.__wbg_setsignal_75b21ef3a81de905 = function(arg0, arg1) {
824
+ imports.wbg.__wbg_setsignal_8c45ad1247a74809 = function(arg0, arg1) {
812
825
  arg0.signal = arg1;
813
826
  };
814
- imports.wbg.__wbg_signal_aaf9ad74119f20a4 = function(arg0) {
827
+ imports.wbg.__wbg_signal_da4d466ce86118b5 = function(arg0) {
815
828
  const ret = arg0.signal;
816
829
  return ret;
817
830
  };
818
- imports.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function() {
831
+ imports.wbg.__wbg_static_accessor_GLOBAL_8921f820c2ce3f12 = function() {
819
832
  const ret = typeof global === "undefined" ? null : global;
820
833
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
821
834
  };
822
- imports.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function() {
835
+ imports.wbg.__wbg_static_accessor_GLOBAL_THIS_f0a4409105898184 = function() {
823
836
  const ret = typeof globalThis === "undefined" ? null : globalThis;
824
837
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
825
838
  };
@@ -827,44 +840,44 @@ function __wbg_get_imports() {
827
840
  const ret = module;
828
841
  return ret;
829
842
  };
830
- imports.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function() {
843
+ imports.wbg.__wbg_static_accessor_SELF_995b214ae681ff99 = function() {
831
844
  const ret = typeof self === "undefined" ? null : self;
832
845
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
833
846
  };
834
- imports.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function() {
847
+ imports.wbg.__wbg_static_accessor_WINDOW_cde3890479c675ea = function() {
835
848
  const ret = typeof window === "undefined" ? null : window;
836
849
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
837
850
  };
838
- imports.wbg.__wbg_status_f6360336ca686bf0 = function(arg0) {
851
+ imports.wbg.__wbg_status_3fea3036088621d6 = function(arg0) {
839
852
  const ret = arg0.status;
840
853
  return ret;
841
854
  };
842
- imports.wbg.__wbg_stringify_f7ed6987935b4a24 = function() {
855
+ imports.wbg.__wbg_stringify_b98c93d0a190446a = function() {
843
856
  return handleError(function(arg0) {
844
857
  const ret = JSON.stringify(arg0);
845
858
  return ret;
846
859
  }, arguments);
847
860
  };
848
- imports.wbg.__wbg_subarray_aa9065fa9dc5df96 = function(arg0, arg1, arg2) {
861
+ imports.wbg.__wbg_subarray_70fd07feefe14294 = function(arg0, arg1, arg2) {
849
862
  const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
850
863
  return ret;
851
864
  };
852
- imports.wbg.__wbg_then_44b73946d2fb3e7d = function(arg0, arg1) {
853
- const ret = arg0.then(arg1);
865
+ imports.wbg.__wbg_then_b33a773d723afa3e = function(arg0, arg1, arg2) {
866
+ const ret = arg0.then(arg1, arg2);
854
867
  return ret;
855
868
  };
856
- imports.wbg.__wbg_then_48b406749878a531 = function(arg0, arg1, arg2) {
857
- const ret = arg0.then(arg1, arg2);
869
+ imports.wbg.__wbg_then_e22500defe16819f = function(arg0, arg1) {
870
+ const ret = arg0.then(arg1);
858
871
  return ret;
859
872
  };
860
- imports.wbg.__wbg_url_ae10c34ca209681d = function(arg0, arg1) {
873
+ imports.wbg.__wbg_url_e5720dfacf77b05e = function(arg0, arg1) {
861
874
  const ret = arg1.url;
862
875
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
863
876
  const len1 = WASM_VECTOR_LEN;
864
877
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
865
878
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
866
879
  };
867
- imports.wbg.__wbg_value_cd1ffa7b1ab794f1 = function(arg0) {
880
+ imports.wbg.__wbg_value_dd9372230531eade = function(arg0) {
868
881
  const ret = arg0.value;
869
882
  return ret;
870
883
  };
@@ -872,30 +885,18 @@ function __wbg_get_imports() {
872
885
  const ret = arg0.versions;
873
886
  return ret;
874
887
  };
875
- imports.wbg.__wbindgen_bigint_from_i128 = function(arg0, arg1) {
876
- const ret = arg0 << BigInt(64) | BigInt.asUintN(64, arg1);
877
- return ret;
878
- };
879
- imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {
880
- const ret = arg0;
881
- return ret;
882
- };
883
- imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
884
- const ret = BigInt.asUintN(64, arg0);
885
- return ret;
886
- };
887
- imports.wbg.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
888
+ imports.wbg.__wbg_wbindgenbigintgetasi64_ac743ece6ab9bba1 = function(arg0, arg1) {
888
889
  const v = arg1;
889
890
  const ret = typeof v === "bigint" ? v : void 0;
890
891
  getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
891
892
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
892
893
  };
893
- imports.wbg.__wbindgen_boolean_get = function(arg0) {
894
+ imports.wbg.__wbg_wbindgenbooleanget_3fe6f642c7d97746 = function(arg0) {
894
895
  const v = arg0;
895
- const ret = typeof v === "boolean" ? v ? 1 : 0 : 2;
896
- return ret;
896
+ const ret = typeof v === "boolean" ? v : void 0;
897
+ return isLikeNone(ret) ? 16777215 : ret ? 1 : 0;
897
898
  };
898
- imports.wbg.__wbindgen_cb_drop = function(arg0) {
899
+ imports.wbg.__wbg_wbindgencbdrop_eb10308566512b88 = function(arg0) {
899
900
  const obj = arg0.original;
900
901
  if (obj.cnt-- == 1) {
901
902
  obj.a = 0;
@@ -904,83 +905,57 @@ function __wbg_get_imports() {
904
905
  const ret = false;
905
906
  return ret;
906
907
  };
907
- imports.wbg.__wbindgen_closure_wrapper12203 = function(arg0, arg1, arg2) {
908
- const ret = makeMutClosure(arg0, arg1, 4150, __wbg_adapter_54);
909
- return ret;
910
- };
911
- imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
908
+ imports.wbg.__wbg_wbindgendebugstring_99ef257a3ddda34d = function(arg0, arg1) {
912
909
  const ret = debugString(arg1);
913
910
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
914
911
  const len1 = WASM_VECTOR_LEN;
915
912
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
916
913
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
917
914
  };
918
- imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
919
- const ret = new Error(getStringFromWasm0(arg0, arg1));
920
- return ret;
921
- };
922
- imports.wbg.__wbindgen_in = function(arg0, arg1) {
915
+ imports.wbg.__wbg_wbindgenin_d7a1ee10933d2d55 = function(arg0, arg1) {
923
916
  const ret = arg0 in arg1;
924
917
  return ret;
925
918
  };
926
- imports.wbg.__wbindgen_init_externref_table = function() {
927
- const table = wasm.__wbindgen_export_4;
928
- const offset = table.grow(4);
929
- table.set(0, void 0);
930
- table.set(offset + 0, void 0);
931
- table.set(offset + 1, null);
932
- table.set(offset + 2, true);
933
- table.set(offset + 3, false);
934
- ;
935
- };
936
- imports.wbg.__wbindgen_is_bigint = function(arg0) {
919
+ imports.wbg.__wbg_wbindgenisbigint_ecb90cc08a5a9154 = function(arg0) {
937
920
  const ret = typeof arg0 === "bigint";
938
921
  return ret;
939
922
  };
940
- imports.wbg.__wbindgen_is_function = function(arg0) {
923
+ imports.wbg.__wbg_wbindgenisfunction_8cee7dce3725ae74 = function(arg0) {
941
924
  const ret = typeof arg0 === "function";
942
925
  return ret;
943
926
  };
944
- imports.wbg.__wbindgen_is_null = function(arg0) {
927
+ imports.wbg.__wbg_wbindgenisnull_f3037694abe4d97a = function(arg0) {
945
928
  const ret = arg0 === null;
946
929
  return ret;
947
930
  };
948
- imports.wbg.__wbindgen_is_object = function(arg0) {
931
+ imports.wbg.__wbg_wbindgenisobject_307a53c6bd97fbf8 = function(arg0) {
949
932
  const val = arg0;
950
933
  const ret = typeof val === "object" && val !== null;
951
934
  return ret;
952
935
  };
953
- imports.wbg.__wbindgen_is_string = function(arg0) {
936
+ imports.wbg.__wbg_wbindgenisstring_d4fa939789f003b0 = function(arg0) {
954
937
  const ret = typeof arg0 === "string";
955
938
  return ret;
956
939
  };
957
- imports.wbg.__wbindgen_is_undefined = function(arg0) {
940
+ imports.wbg.__wbg_wbindgenisundefined_c4b71d073b92f3c5 = function(arg0) {
958
941
  const ret = arg0 === void 0;
959
942
  return ret;
960
943
  };
961
- imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
944
+ imports.wbg.__wbg_wbindgenjsvaleq_e6f2ad59ccae1b58 = function(arg0, arg1) {
962
945
  const ret = arg0 === arg1;
963
946
  return ret;
964
947
  };
965
- imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
948
+ imports.wbg.__wbg_wbindgenjsvallooseeq_9bec8c9be826bed1 = function(arg0, arg1) {
966
949
  const ret = arg0 == arg1;
967
950
  return ret;
968
951
  };
969
- imports.wbg.__wbindgen_memory = function() {
970
- const ret = wasm.memory;
971
- return ret;
972
- };
973
- imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
952
+ imports.wbg.__wbg_wbindgennumberget_f74b4c7525ac05cb = function(arg0, arg1) {
974
953
  const obj = arg1;
975
954
  const ret = typeof obj === "number" ? obj : void 0;
976
955
  getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
977
956
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
978
957
  };
979
- imports.wbg.__wbindgen_number_new = function(arg0) {
980
- const ret = arg0;
981
- return ret;
982
- };
983
- imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
958
+ imports.wbg.__wbg_wbindgenstringget_0f16a6ddddef376f = function(arg0, arg1) {
984
959
  const obj = arg1;
985
960
  const ret = typeof obj === "string" ? obj : void 0;
986
961
  var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -988,12 +963,46 @@ function __wbg_get_imports() {
988
963
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
989
964
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
990
965
  };
991
- imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
966
+ imports.wbg.__wbg_wbindgenthrow_451ec1a8469d7eb6 = function(arg0, arg1) {
967
+ throw new Error(getStringFromWasm0(arg0, arg1));
968
+ };
969
+ imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
992
970
  const ret = getStringFromWasm0(arg0, arg1);
993
971
  return ret;
994
972
  };
995
- imports.wbg.__wbindgen_throw = function(arg0, arg1) {
996
- throw new Error(getStringFromWasm0(arg0, arg1));
973
+ imports.wbg.__wbindgen_cast_2ddd8a25ff58642a = function(arg0, arg1) {
974
+ const ret = BigInt.asUintN(64, arg0) | arg1 << BigInt(64);
975
+ return ret;
976
+ };
977
+ imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
978
+ const ret = BigInt.asUintN(64, arg0);
979
+ return ret;
980
+ };
981
+ imports.wbg.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
982
+ const ret = arg0;
983
+ return ret;
984
+ };
985
+ imports.wbg.__wbindgen_cast_9f5eb788ede76783 = function(arg0, arg1) {
986
+ const ret = makeMutClosure(arg0, arg1, 4205, __wbg_adapter_10);
987
+ return ret;
988
+ };
989
+ imports.wbg.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
990
+ const ret = getArrayU8FromWasm0(arg0, arg1);
991
+ return ret;
992
+ };
993
+ imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
994
+ const ret = arg0;
995
+ return ret;
996
+ };
997
+ imports.wbg.__wbindgen_init_externref_table = function() {
998
+ const table = wasm.__wbindgen_export_4;
999
+ const offset = table.grow(4);
1000
+ table.set(0, void 0);
1001
+ table.set(offset + 0, void 0);
1002
+ table.set(offset + 1, null);
1003
+ table.set(offset + 2, true);
1004
+ table.set(offset + 3, false);
1005
+ ;
997
1006
  };
998
1007
  return imports;
999
1008
  }
@@ -1034,9 +1043,10 @@ __name(__wbg_init, "__wbg_init");
1034
1043
  var didkit_wasm_default = __wbg_init;
1035
1044
 
1036
1045
  // src/didkit/index.ts
1046
+ var DEFAULT_DIDKIT_WASM_URL = "https://assets.learncard.ai/didkit/sha256-60efb6027699fda135db0d817f7a541bbd660ae88bec9cbec9796feeb3740b96/didkit_wasm_bg.wasm";
1037
1047
  var initialized = false;
1038
1048
  var generating = false;
1039
- var init = /* @__PURE__ */ __name(async (arg = "https://cdn.filestackcontent.com/6v059q3KQlmXd6XoVPyC") => {
1049
+ var init = /* @__PURE__ */ __name(async (arg = DEFAULT_DIDKIT_WASM_URL) => {
1040
1050
  while (generating) await new Promise((res) => setTimeout(res, 250));
1041
1051
  if (initialized) return;
1042
1052
  try {