@fedimint/core-web 0.0.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,1181 @@
1
+ let wasm;
2
+
3
+ const heap = new Array(128).fill(undefined);
4
+
5
+ heap.push(undefined, null, true, false);
6
+
7
+ function getObject(idx) { return heap[idx]; }
8
+
9
+ let heap_next = heap.length;
10
+
11
+ function dropObject(idx) {
12
+ if (idx < 132) return;
13
+ heap[idx] = heap_next;
14
+ heap_next = idx;
15
+ }
16
+
17
+ function takeObject(idx) {
18
+ const ret = getObject(idx);
19
+ dropObject(idx);
20
+ return ret;
21
+ }
22
+
23
+ const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } });
24
+
25
+ if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
26
+
27
+ let cachedUint8Memory0 = null;
28
+
29
+ function getUint8Memory0() {
30
+ if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
31
+ cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
32
+ }
33
+ return cachedUint8Memory0;
34
+ }
35
+
36
+ function getStringFromWasm0(ptr, len) {
37
+ ptr = ptr >>> 0;
38
+ return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
39
+ }
40
+
41
+ function addHeapObject(obj) {
42
+ if (heap_next === heap.length) heap.push(heap.length + 1);
43
+ const idx = heap_next;
44
+ heap_next = heap[idx];
45
+
46
+ heap[idx] = obj;
47
+ return idx;
48
+ }
49
+
50
+ let WASM_VECTOR_LEN = 0;
51
+
52
+ const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } });
53
+
54
+ const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
55
+ ? function (arg, view) {
56
+ return cachedTextEncoder.encodeInto(arg, view);
57
+ }
58
+ : function (arg, view) {
59
+ const buf = cachedTextEncoder.encode(arg);
60
+ view.set(buf);
61
+ return {
62
+ read: arg.length,
63
+ written: buf.length
64
+ };
65
+ });
66
+
67
+ function passStringToWasm0(arg, malloc, realloc) {
68
+
69
+ if (realloc === undefined) {
70
+ const buf = cachedTextEncoder.encode(arg);
71
+ const ptr = malloc(buf.length, 1) >>> 0;
72
+ getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
73
+ WASM_VECTOR_LEN = buf.length;
74
+ return ptr;
75
+ }
76
+
77
+ let len = arg.length;
78
+ let ptr = malloc(len, 1) >>> 0;
79
+
80
+ const mem = getUint8Memory0();
81
+
82
+ let offset = 0;
83
+
84
+ for (; offset < len; offset++) {
85
+ const code = arg.charCodeAt(offset);
86
+ if (code > 0x7F) break;
87
+ mem[ptr + offset] = code;
88
+ }
89
+
90
+ if (offset !== len) {
91
+ if (offset !== 0) {
92
+ arg = arg.slice(offset);
93
+ }
94
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
95
+ const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
96
+ const ret = encodeString(arg, view);
97
+
98
+ offset += ret.written;
99
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
100
+ }
101
+
102
+ WASM_VECTOR_LEN = offset;
103
+ return ptr;
104
+ }
105
+
106
+ function isLikeNone(x) {
107
+ return x === undefined || x === null;
108
+ }
109
+
110
+ let cachedInt32Memory0 = null;
111
+
112
+ function getInt32Memory0() {
113
+ if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
114
+ cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
115
+ }
116
+ return cachedInt32Memory0;
117
+ }
118
+
119
+ function debugString(val) {
120
+ // primitive types
121
+ const type = typeof val;
122
+ if (type == 'number' || type == 'boolean' || val == null) {
123
+ return `${val}`;
124
+ }
125
+ if (type == 'string') {
126
+ return `"${val}"`;
127
+ }
128
+ if (type == 'symbol') {
129
+ const description = val.description;
130
+ if (description == null) {
131
+ return 'Symbol';
132
+ } else {
133
+ return `Symbol(${description})`;
134
+ }
135
+ }
136
+ if (type == 'function') {
137
+ const name = val.name;
138
+ if (typeof name == 'string' && name.length > 0) {
139
+ return `Function(${name})`;
140
+ } else {
141
+ return 'Function';
142
+ }
143
+ }
144
+ // objects
145
+ if (Array.isArray(val)) {
146
+ const length = val.length;
147
+ let debug = '[';
148
+ if (length > 0) {
149
+ debug += debugString(val[0]);
150
+ }
151
+ for (let i = 1; i < length; i++) {
152
+ debug += ', ' + debugString(val[i]);
153
+ }
154
+ debug += ']';
155
+ return debug;
156
+ }
157
+ // Test for built-in
158
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
159
+ let className;
160
+ if (builtInMatches.length > 1) {
161
+ className = builtInMatches[1];
162
+ } else {
163
+ // Failed to match the standard '[object ClassName]'
164
+ return toString.call(val);
165
+ }
166
+ if (className == 'Object') {
167
+ // we're a user defined class or Object
168
+ // JSON.stringify avoids problems with cycles, and is generally much
169
+ // easier than looping through ownProperties of `val`.
170
+ try {
171
+ return 'Object(' + JSON.stringify(val) + ')';
172
+ } catch (_) {
173
+ return 'Object';
174
+ }
175
+ }
176
+ // errors
177
+ if (val instanceof Error) {
178
+ return `${val.name}: ${val.message}\n${val.stack}`;
179
+ }
180
+ // TODO we could test for more things here, like `Set`s and `Map`s.
181
+ return className;
182
+ }
183
+
184
+ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
185
+ ? { register: () => { }, unregister: () => { } }
186
+ : new FinalizationRegistry(state => {
187
+ wasm.__wbindgen_export_2.get(state.dtor)(state.a, state.b)
188
+ });
189
+
190
+ function makeMutClosure(arg0, arg1, dtor, f) {
191
+ const state = { a: arg0, b: arg1, cnt: 1, dtor };
192
+ const real = (...args) => {
193
+ // First up with a closure we increment the internal reference
194
+ // count. This ensures that the Rust closure environment won't
195
+ // be deallocated while we're invoking it.
196
+ state.cnt++;
197
+ const a = state.a;
198
+ state.a = 0;
199
+ try {
200
+ return f(a, state.b, ...args);
201
+ } finally {
202
+ if (--state.cnt === 0) {
203
+ wasm.__wbindgen_export_2.get(state.dtor)(a, state.b);
204
+ CLOSURE_DTORS.unregister(state);
205
+ } else {
206
+ state.a = a;
207
+ }
208
+ }
209
+ };
210
+ real.original = state;
211
+ CLOSURE_DTORS.register(real, state, state);
212
+ return real;
213
+ }
214
+ function __wbg_adapter_32(arg0, arg1, arg2) {
215
+ try {
216
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
217
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h30ddf3bee31ebb33(retptr, arg0, arg1, addHeapObject(arg2));
218
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
219
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
220
+ if (r1) {
221
+ throw takeObject(r0);
222
+ }
223
+ } finally {
224
+ wasm.__wbindgen_add_to_stack_pointer(16);
225
+ }
226
+ }
227
+
228
+ function __wbg_adapter_35(arg0, arg1, arg2) {
229
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h31a94cc9a05d5ca0(arg0, arg1, addHeapObject(arg2));
230
+ }
231
+
232
+ function __wbg_adapter_42(arg0, arg1) {
233
+ wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h4d11ec113460b95d(arg0, arg1);
234
+ }
235
+
236
+ function __wbg_adapter_45(arg0, arg1, arg2) {
237
+ try {
238
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
239
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__he7056307c6986185(retptr, arg0, arg1, addHeapObject(arg2));
240
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
241
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
242
+ if (r1) {
243
+ throw takeObject(r0);
244
+ }
245
+ } finally {
246
+ wasm.__wbindgen_add_to_stack_pointer(16);
247
+ }
248
+ }
249
+
250
+ function __wbg_adapter_48(arg0, arg1) {
251
+ wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h5b16159cdfa166b0(arg0, arg1);
252
+ }
253
+
254
+ function __wbg_adapter_51(arg0, arg1, arg2) {
255
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hebf1bd391d12b3cb(arg0, arg1, addHeapObject(arg2));
256
+ }
257
+
258
+ function __wbg_adapter_54(arg0, arg1) {
259
+ wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h09ee3e3abd173580(arg0, arg1);
260
+ }
261
+
262
+ function handleError(f, args) {
263
+ try {
264
+ return f.apply(this, args);
265
+ } catch (e) {
266
+ wasm.__wbindgen_exn_store(addHeapObject(e));
267
+ }
268
+ }
269
+
270
+ function getArrayU8FromWasm0(ptr, len) {
271
+ ptr = ptr >>> 0;
272
+ return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
273
+ }
274
+ function __wbg_adapter_260(arg0, arg1, arg2, arg3) {
275
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__h8bdaa9faeb7d5075(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
276
+ }
277
+
278
+ const WasmClientFinalization = (typeof FinalizationRegistry === 'undefined')
279
+ ? { register: () => { }, unregister: () => { } }
280
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmclient_free(ptr >>> 0));
281
+ /**
282
+ */
283
+ export class WasmClient {
284
+
285
+ static __wrap(ptr) {
286
+ ptr = ptr >>> 0;
287
+ const obj = Object.create(WasmClient.prototype);
288
+ obj.__wbg_ptr = ptr;
289
+ WasmClientFinalization.register(obj, obj.__wbg_ptr, obj);
290
+ return obj;
291
+ }
292
+
293
+ __destroy_into_raw() {
294
+ const ptr = this.__wbg_ptr;
295
+ this.__wbg_ptr = 0;
296
+ WasmClientFinalization.unregister(this);
297
+ return ptr;
298
+ }
299
+
300
+ free() {
301
+ const ptr = this.__destroy_into_raw();
302
+ wasm.__wbg_wasmclient_free(ptr);
303
+ }
304
+ /**
305
+ * Open fedimint client with already joined federation.
306
+ *
307
+ * After you have joined a federation, you can reopen the fedimint client
308
+ * with same client_name. Opening client with same name at same time is
309
+ * not supported. You can close the current client by calling
310
+ * `client.free()`. NOTE: The client will remain active until all the
311
+ * running rpc calls have finished.
312
+ * @param {string} client_name
313
+ * @returns {Promise<WasmClient | undefined>}
314
+ */
315
+ static open(client_name) {
316
+ const ptr0 = passStringToWasm0(client_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
317
+ const len0 = WASM_VECTOR_LEN;
318
+ const ret = wasm.wasmclient_open(ptr0, len0);
319
+ return takeObject(ret);
320
+ }
321
+ /**
322
+ * Open a fedimint client by join a federation.
323
+ * @param {string} client_name
324
+ * @param {string} invite_code
325
+ * @returns {Promise<WasmClient>}
326
+ */
327
+ static join_federation(client_name, invite_code) {
328
+ const ptr0 = passStringToWasm0(client_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
329
+ const len0 = WASM_VECTOR_LEN;
330
+ const ptr1 = passStringToWasm0(invite_code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
331
+ const len1 = WASM_VECTOR_LEN;
332
+ const ret = wasm.wasmclient_join_federation(ptr0, len0, ptr1, len1);
333
+ return takeObject(ret);
334
+ }
335
+ /**
336
+ * Call a fedimint client rpc the responses are returned using `cb`
337
+ * callback. Each rpc call *can* return multiple responses by calling
338
+ * `cb` multiple times. You should ignore the promise by this function
339
+ * because it has no significance.
340
+ * @param {string} module
341
+ * @param {string} method
342
+ * @param {string} payload
343
+ * @param {Function} cb
344
+ * @returns {Promise<void>}
345
+ */
346
+ rpc(module, method, payload, cb) {
347
+ const ptr0 = passStringToWasm0(module, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
348
+ const len0 = WASM_VECTOR_LEN;
349
+ const ptr1 = passStringToWasm0(method, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
350
+ const len1 = WASM_VECTOR_LEN;
351
+ const ptr2 = passStringToWasm0(payload, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
352
+ const len2 = WASM_VECTOR_LEN;
353
+ const ret = wasm.wasmclient_rpc(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, addHeapObject(cb));
354
+ return takeObject(ret);
355
+ }
356
+ }
357
+
358
+ async function __wbg_load(module, imports) {
359
+ if (typeof Response === 'function' && module instanceof Response) {
360
+ if (typeof WebAssembly.instantiateStreaming === 'function') {
361
+ try {
362
+ return await WebAssembly.instantiateStreaming(module, imports);
363
+
364
+ } catch (e) {
365
+ if (module.headers.get('Content-Type') != 'application/wasm') {
366
+ 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);
367
+
368
+ } else {
369
+ throw e;
370
+ }
371
+ }
372
+ }
373
+
374
+ const bytes = await module.arrayBuffer();
375
+ return await WebAssembly.instantiate(bytes, imports);
376
+
377
+ } else {
378
+ const instance = await WebAssembly.instantiate(module, imports);
379
+
380
+ if (instance instanceof WebAssembly.Instance) {
381
+ return { instance, module };
382
+
383
+ } else {
384
+ return instance;
385
+ }
386
+ }
387
+ }
388
+
389
+ function __wbg_get_imports() {
390
+ const imports = {};
391
+ imports.wbg = {};
392
+ imports.wbg.__wbg_wasmclient_new = function (arg0) {
393
+ const ret = WasmClient.__wrap(arg0);
394
+ return addHeapObject(ret);
395
+ };
396
+ imports.wbg.__wbindgen_object_drop_ref = function (arg0) {
397
+ takeObject(arg0);
398
+ };
399
+ imports.wbg.__wbindgen_cb_drop = function (arg0) {
400
+ const obj = takeObject(arg0).original;
401
+ if (obj.cnt-- == 1) {
402
+ obj.a = 0;
403
+ return true;
404
+ }
405
+ const ret = false;
406
+ return ret;
407
+ };
408
+ imports.wbg.__wbindgen_string_new = function (arg0, arg1) {
409
+ const ret = getStringFromWasm0(arg0, arg1);
410
+ return addHeapObject(ret);
411
+ };
412
+ imports.wbg.__wbindgen_error_new = function (arg0, arg1) {
413
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
414
+ return addHeapObject(ret);
415
+ };
416
+ imports.wbg.__wbindgen_string_get = function (arg0, arg1) {
417
+ const obj = getObject(arg1);
418
+ const ret = typeof (obj) === 'string' ? obj : undefined;
419
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
420
+ var len1 = WASM_VECTOR_LEN;
421
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
422
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
423
+ };
424
+ imports.wbg.__wbindgen_object_clone_ref = function (arg0) {
425
+ const ret = getObject(arg0);
426
+ return addHeapObject(ret);
427
+ };
428
+ imports.wbg.__wbg_fetch_25e3a297f7b04639 = function (arg0) {
429
+ const ret = fetch(getObject(arg0));
430
+ return addHeapObject(ret);
431
+ };
432
+ imports.wbg.__wbindgen_is_string = function (arg0) {
433
+ const ret = typeof (getObject(arg0)) === 'string';
434
+ return ret;
435
+ };
436
+ imports.wbg.__wbindgen_is_falsy = function (arg0) {
437
+ const ret = !getObject(arg0);
438
+ return ret;
439
+ };
440
+ imports.wbg.__wbg_new_abda76e883ba8a5f = function () {
441
+ const ret = new Error();
442
+ return addHeapObject(ret);
443
+ };
444
+ imports.wbg.__wbg_stack_658279fe44541cf6 = function (arg0, arg1) {
445
+ const ret = getObject(arg1).stack;
446
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
447
+ const len1 = WASM_VECTOR_LEN;
448
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
449
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
450
+ };
451
+ imports.wbg.__wbg_error_f851667af71bcfc6 = function (arg0, arg1) {
452
+ let deferred0_0;
453
+ let deferred0_1;
454
+ try {
455
+ deferred0_0 = arg0;
456
+ deferred0_1 = arg1;
457
+ console.error(getStringFromWasm0(arg0, arg1));
458
+ } finally {
459
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
460
+ }
461
+ };
462
+ imports.wbg.__wbg_fetch_693453ca3f88c055 = function (arg0, arg1) {
463
+ const ret = getObject(arg0).fetch(getObject(arg1));
464
+ return addHeapObject(ret);
465
+ };
466
+ imports.wbg.__wbindgen_number_new = function (arg0) {
467
+ const ret = arg0;
468
+ return addHeapObject(ret);
469
+ };
470
+ imports.wbg.__wbg_instanceof_IdbFactory_32ca5b61b481d0d4 = function (arg0) {
471
+ let result;
472
+ try {
473
+ result = getObject(arg0) instanceof IDBFactory;
474
+ } catch (_) {
475
+ result = false;
476
+ }
477
+ const ret = result;
478
+ return ret;
479
+ };
480
+ imports.wbg.__wbg_open_65e0826fa9c7929c = function () {
481
+ return handleError(function (arg0, arg1, arg2, arg3) {
482
+ const ret = getObject(arg0).open(getStringFromWasm0(arg1, arg2), arg3 >>> 0);
483
+ return addHeapObject(ret);
484
+ }, arguments)
485
+ };
486
+ imports.wbg.__wbg_open_7cc5c5a15ff86a65 = function () {
487
+ return handleError(function (arg0, arg1, arg2) {
488
+ const ret = getObject(arg0).open(getStringFromWasm0(arg1, arg2));
489
+ return addHeapObject(ret);
490
+ }, arguments)
491
+ };
492
+ imports.wbg.__wbg_key_f5b181c13a2893c4 = function () {
493
+ return handleError(function (arg0) {
494
+ const ret = getObject(arg0).key;
495
+ return addHeapObject(ret);
496
+ }, arguments)
497
+ };
498
+ imports.wbg.__wbg_advance_4a9fc46f41566dd7 = function () {
499
+ return handleError(function (arg0, arg1) {
500
+ getObject(arg0).advance(arg1 >>> 0);
501
+ }, arguments)
502
+ };
503
+ imports.wbg.__wbg_continue_ff6b09291a37ea4f = function () {
504
+ return handleError(function (arg0) {
505
+ getObject(arg0).continue();
506
+ }, arguments)
507
+ };
508
+ imports.wbg.__wbg_target_52ddf6955f636bf5 = function (arg0) {
509
+ const ret = getObject(arg0).target;
510
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
511
+ };
512
+ imports.wbg.__wbg_objectStoreNames_71c3096b04c76bcd = function (arg0) {
513
+ const ret = getObject(arg0).objectStoreNames;
514
+ return addHeapObject(ret);
515
+ };
516
+ imports.wbg.__wbg_createObjectStore_45c05e7be9907fde = function () {
517
+ return handleError(function (arg0, arg1, arg2, arg3) {
518
+ const ret = getObject(arg0).createObjectStore(getStringFromWasm0(arg1, arg2), getObject(arg3));
519
+ return addHeapObject(ret);
520
+ }, arguments)
521
+ };
522
+ imports.wbg.__wbg_deleteObjectStore_517effefcf018434 = function () {
523
+ return handleError(function (arg0, arg1, arg2) {
524
+ getObject(arg0).deleteObjectStore(getStringFromWasm0(arg1, arg2));
525
+ }, arguments)
526
+ };
527
+ imports.wbg.__wbg_transaction_632c349fd48458fb = function () {
528
+ return handleError(function (arg0, arg1, arg2) {
529
+ const ret = getObject(arg0).transaction(getObject(arg1), takeObject(arg2));
530
+ return addHeapObject(ret);
531
+ }, arguments)
532
+ };
533
+ imports.wbg.__wbg_new_7a20246daa6eec7e = function () {
534
+ return handleError(function () {
535
+ const ret = new Headers();
536
+ return addHeapObject(ret);
537
+ }, arguments)
538
+ };
539
+ imports.wbg.__wbg_append_aa3f462f9e2b5ff2 = function () {
540
+ return handleError(function (arg0, arg1, arg2, arg3, arg4) {
541
+ getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
542
+ }, arguments)
543
+ };
544
+ imports.wbg.__wbg_value_818a84b71c8d6a92 = function () {
545
+ return handleError(function (arg0) {
546
+ const ret = getObject(arg0).value;
547
+ return addHeapObject(ret);
548
+ }, arguments)
549
+ };
550
+ imports.wbg.__wbg_newwithstrandinit_f581dff0d19a8b03 = function () {
551
+ return handleError(function (arg0, arg1, arg2) {
552
+ const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
553
+ return addHeapObject(ret);
554
+ }, arguments)
555
+ };
556
+ imports.wbg.__wbg_indexNames_cd26d0c4a3e2e6d3 = function (arg0) {
557
+ const ret = getObject(arg0).indexNames;
558
+ return addHeapObject(ret);
559
+ };
560
+ imports.wbg.__wbg_createIndex_e1a9dfc378a45abb = function () {
561
+ return handleError(function (arg0, arg1, arg2, arg3, arg4) {
562
+ const ret = getObject(arg0).createIndex(getStringFromWasm0(arg1, arg2), getObject(arg3), getObject(arg4));
563
+ return addHeapObject(ret);
564
+ }, arguments)
565
+ };
566
+ imports.wbg.__wbg_delete_e8e3bfaf1ea215be = function () {
567
+ return handleError(function (arg0, arg1) {
568
+ const ret = getObject(arg0).delete(getObject(arg1));
569
+ return addHeapObject(ret);
570
+ }, arguments)
571
+ };
572
+ imports.wbg.__wbg_deleteIndex_fdc764ebf52d4c6e = function () {
573
+ return handleError(function (arg0, arg1, arg2) {
574
+ getObject(arg0).deleteIndex(getStringFromWasm0(arg1, arg2));
575
+ }, arguments)
576
+ };
577
+ imports.wbg.__wbg_openCursor_218846b7f56f5d54 = function () {
578
+ return handleError(function (arg0) {
579
+ const ret = getObject(arg0).openCursor();
580
+ return addHeapObject(ret);
581
+ }, arguments)
582
+ };
583
+ imports.wbg.__wbg_openCursor_31878cfe72aac75c = function () {
584
+ return handleError(function (arg0, arg1) {
585
+ const ret = getObject(arg0).openCursor(getObject(arg1));
586
+ return addHeapObject(ret);
587
+ }, arguments)
588
+ };
589
+ imports.wbg.__wbg_openCursor_028e15e1e8bc1d13 = function () {
590
+ return handleError(function (arg0, arg1, arg2) {
591
+ const ret = getObject(arg0).openCursor(getObject(arg1), takeObject(arg2));
592
+ return addHeapObject(ret);
593
+ }, arguments)
594
+ };
595
+ imports.wbg.__wbg_put_23b163c3aeb63c96 = function () {
596
+ return handleError(function (arg0, arg1) {
597
+ const ret = getObject(arg0).put(getObject(arg1));
598
+ return addHeapObject(ret);
599
+ }, arguments)
600
+ };
601
+ imports.wbg.__wbg_put_f50a8dd6e4a8a13a = function () {
602
+ return handleError(function (arg0, arg1, arg2) {
603
+ const ret = getObject(arg0).put(getObject(arg1), getObject(arg2));
604
+ return addHeapObject(ret);
605
+ }, arguments)
606
+ };
607
+ imports.wbg.__wbg_setonupgradeneeded_73793bc200a4f7b8 = function (arg0, arg1) {
608
+ getObject(arg0).onupgradeneeded = getObject(arg1);
609
+ };
610
+ imports.wbg.__wbg_result_915d75a0bb0397a1 = function () {
611
+ return handleError(function (arg0) {
612
+ const ret = getObject(arg0).result;
613
+ return addHeapObject(ret);
614
+ }, arguments)
615
+ };
616
+ imports.wbg.__wbg_error_a093a4b69c2260a3 = function () {
617
+ return handleError(function (arg0) {
618
+ const ret = getObject(arg0).error;
619
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
620
+ }, arguments)
621
+ };
622
+ imports.wbg.__wbg_transaction_fe8e1f87ae7ea4cc = function (arg0) {
623
+ const ret = getObject(arg0).transaction;
624
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
625
+ };
626
+ imports.wbg.__wbg_setonsuccess_a04d5d5a703ed886 = function (arg0, arg1) {
627
+ getObject(arg0).onsuccess = getObject(arg1);
628
+ };
629
+ imports.wbg.__wbg_setonerror_80c9bac4e4864adf = function (arg0, arg1) {
630
+ getObject(arg0).onerror = getObject(arg1);
631
+ };
632
+ imports.wbg.__wbg_setonabort_568145f0fa09b9be = function (arg0, arg1) {
633
+ getObject(arg0).onabort = getObject(arg1);
634
+ };
635
+ imports.wbg.__wbg_setoncomplete_e9993a45b7bfaec4 = function (arg0, arg1) {
636
+ getObject(arg0).oncomplete = getObject(arg1);
637
+ };
638
+ imports.wbg.__wbg_setonerror_d17408c3482b10eb = function (arg0, arg1) {
639
+ getObject(arg0).onerror = getObject(arg1);
640
+ };
641
+ imports.wbg.__wbg_abort_7691b818613905b3 = function () {
642
+ return handleError(function (arg0) {
643
+ getObject(arg0).abort();
644
+ }, arguments)
645
+ };
646
+ imports.wbg.__wbg_commit_07f92304c2c4ba17 = function () {
647
+ return handleError(function (arg0) {
648
+ getObject(arg0).commit();
649
+ }, arguments)
650
+ };
651
+ imports.wbg.__wbg_objectStore_b0e52dee7e737df7 = function () {
652
+ return handleError(function (arg0, arg1, arg2) {
653
+ const ret = getObject(arg0).objectStore(getStringFromWasm0(arg1, arg2));
654
+ return addHeapObject(ret);
655
+ }, arguments)
656
+ };
657
+ imports.wbg.__wbg_instanceof_Response_4c3b1446206114d1 = function (arg0) {
658
+ let result;
659
+ try {
660
+ result = getObject(arg0) instanceof Response;
661
+ } catch (_) {
662
+ result = false;
663
+ }
664
+ const ret = result;
665
+ return ret;
666
+ };
667
+ imports.wbg.__wbg_url_83a6a4f65f7a2b38 = function (arg0, arg1) {
668
+ const ret = getObject(arg1).url;
669
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
670
+ const len1 = WASM_VECTOR_LEN;
671
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
672
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
673
+ };
674
+ imports.wbg.__wbg_status_d6d47ad2837621eb = function (arg0) {
675
+ const ret = getObject(arg0).status;
676
+ return ret;
677
+ };
678
+ imports.wbg.__wbg_headers_24def508a7518df9 = function (arg0) {
679
+ const ret = getObject(arg0).headers;
680
+ return addHeapObject(ret);
681
+ };
682
+ imports.wbg.__wbg_arrayBuffer_5b2688e3dd873fed = function () {
683
+ return handleError(function (arg0) {
684
+ const ret = getObject(arg0).arrayBuffer();
685
+ return addHeapObject(ret);
686
+ }, arguments)
687
+ };
688
+ imports.wbg.__wbg_text_668782292b0bc561 = function () {
689
+ return handleError(function (arg0) {
690
+ const ret = getObject(arg0).text();
691
+ return addHeapObject(ret);
692
+ }, arguments)
693
+ };
694
+ imports.wbg.__wbg_data_ba3ea616b5392abf = function (arg0) {
695
+ const ret = getObject(arg0).data;
696
+ return addHeapObject(ret);
697
+ };
698
+ imports.wbg.__wbg_length_acb2c4bcbfef2f1a = function (arg0) {
699
+ const ret = getObject(arg0).length;
700
+ return ret;
701
+ };
702
+ imports.wbg.__wbg_contains_f2be25be0242ccea = function (arg0, arg1, arg2) {
703
+ const ret = getObject(arg0).contains(getStringFromWasm0(arg1, arg2));
704
+ return ret;
705
+ };
706
+ imports.wbg.__wbg_get_f31a9f341421cffd = function (arg0, arg1, arg2) {
707
+ const ret = getObject(arg1)[arg2 >>> 0];
708
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
709
+ var len1 = WASM_VECTOR_LEN;
710
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
711
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
712
+ };
713
+ imports.wbg.__wbg_addEventListener_9bf60ea8a362e5e4 = function () {
714
+ return handleError(function (arg0, arg1, arg2, arg3) {
715
+ getObject(arg0).addEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3));
716
+ }, arguments)
717
+ };
718
+ imports.wbg.__wbg_addEventListener_374cbfd2bbc19ccf = function () {
719
+ return handleError(function (arg0, arg1, arg2, arg3, arg4) {
720
+ getObject(arg0).addEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3), getObject(arg4));
721
+ }, arguments)
722
+ };
723
+ imports.wbg.__wbg_dispatchEvent_40c3472e9e4dcf5e = function () {
724
+ return handleError(function (arg0, arg1) {
725
+ const ret = getObject(arg0).dispatchEvent(getObject(arg1));
726
+ return ret;
727
+ }, arguments)
728
+ };
729
+ imports.wbg.__wbg_removeEventListener_66ee1536a0b32c11 = function () {
730
+ return handleError(function (arg0, arg1, arg2, arg3) {
731
+ getObject(arg0).removeEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3));
732
+ }, arguments)
733
+ };
734
+ imports.wbg.__wbg_signal_3c701f5f40a5f08d = function (arg0) {
735
+ const ret = getObject(arg0).signal;
736
+ return addHeapObject(ret);
737
+ };
738
+ imports.wbg.__wbg_new_0ae46f44b7485bb2 = function () {
739
+ return handleError(function () {
740
+ const ret = new AbortController();
741
+ return addHeapObject(ret);
742
+ }, arguments)
743
+ };
744
+ imports.wbg.__wbg_abort_2c4fb490d878d2b2 = function (arg0) {
745
+ getObject(arg0).abort();
746
+ };
747
+ imports.wbg.__wbg_wasClean_1efd9561c5671b45 = function (arg0) {
748
+ const ret = getObject(arg0).wasClean;
749
+ return ret;
750
+ };
751
+ imports.wbg.__wbg_code_72a380a2ce61a242 = function (arg0) {
752
+ const ret = getObject(arg0).code;
753
+ return ret;
754
+ };
755
+ imports.wbg.__wbg_reason_ad453a16ee68a1b9 = function (arg0, arg1) {
756
+ const ret = getObject(arg1).reason;
757
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
758
+ const len1 = WASM_VECTOR_LEN;
759
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
760
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
761
+ };
762
+ imports.wbg.__wbg_newwitheventinitdict_744eb6eb61245b7c = function () {
763
+ return handleError(function (arg0, arg1, arg2) {
764
+ const ret = new CloseEvent(getStringFromWasm0(arg0, arg1), getObject(arg2));
765
+ return addHeapObject(ret);
766
+ }, arguments)
767
+ };
768
+ imports.wbg.__wbg_readyState_c8f9a5deaec3bb41 = function (arg0) {
769
+ const ret = getObject(arg0).readyState;
770
+ return ret;
771
+ };
772
+ imports.wbg.__wbg_setbinaryType_68fc3c6feda7310c = function (arg0, arg1) {
773
+ getObject(arg0).binaryType = takeObject(arg1);
774
+ };
775
+ imports.wbg.__wbg_new_2575c598b4006174 = function () {
776
+ return handleError(function (arg0, arg1) {
777
+ const ret = new WebSocket(getStringFromWasm0(arg0, arg1));
778
+ return addHeapObject(ret);
779
+ }, arguments)
780
+ };
781
+ imports.wbg.__wbg_close_328b8b803521cbdd = function () {
782
+ return handleError(function (arg0) {
783
+ getObject(arg0).close();
784
+ }, arguments)
785
+ };
786
+ imports.wbg.__wbg_send_5bf3f962e9ffe0f6 = function () {
787
+ return handleError(function (arg0, arg1, arg2) {
788
+ getObject(arg0).send(getStringFromWasm0(arg1, arg2));
789
+ }, arguments)
790
+ };
791
+ imports.wbg.__wbg_send_2ba7d32fcb03b9a4 = function () {
792
+ return handleError(function (arg0, arg1, arg2) {
793
+ getObject(arg0).send(getArrayU8FromWasm0(arg1, arg2));
794
+ }, arguments)
795
+ };
796
+ imports.wbg.__wbg_clearTimeout_541ac0980ffcef74 = function (arg0) {
797
+ const ret = clearTimeout(takeObject(arg0));
798
+ return addHeapObject(ret);
799
+ };
800
+ imports.wbg.__wbg_setTimeout_7d81d052875b0f4f = function () {
801
+ return handleError(function (arg0, arg1) {
802
+ const ret = setTimeout(getObject(arg0), arg1);
803
+ return addHeapObject(ret);
804
+ }, arguments)
805
+ };
806
+ imports.wbg.__wbg_queueMicrotask_3cbae2ec6b6cd3d6 = function (arg0) {
807
+ const ret = getObject(arg0).queueMicrotask;
808
+ return addHeapObject(ret);
809
+ };
810
+ imports.wbg.__wbindgen_is_function = function (arg0) {
811
+ const ret = typeof (getObject(arg0)) === 'function';
812
+ return ret;
813
+ };
814
+ imports.wbg.__wbg_queueMicrotask_481971b0d87f3dd4 = function (arg0) {
815
+ queueMicrotask(getObject(arg0));
816
+ };
817
+ imports.wbg.__wbg_clearTimeout_76877dbc010e786d = function (arg0) {
818
+ const ret = clearTimeout(takeObject(arg0));
819
+ return addHeapObject(ret);
820
+ };
821
+ imports.wbg.__wbg_setTimeout_75cb9b6991a4031d = function () {
822
+ return handleError(function (arg0, arg1) {
823
+ const ret = setTimeout(getObject(arg0), arg1);
824
+ return addHeapObject(ret);
825
+ }, arguments)
826
+ };
827
+ imports.wbg.__wbg_crypto_1d1f22824a6a080c = function (arg0) {
828
+ const ret = getObject(arg0).crypto;
829
+ return addHeapObject(ret);
830
+ };
831
+ imports.wbg.__wbindgen_is_object = function (arg0) {
832
+ const val = getObject(arg0);
833
+ const ret = typeof (val) === 'object' && val !== null;
834
+ return ret;
835
+ };
836
+ imports.wbg.__wbg_process_4a72847cc503995b = function (arg0) {
837
+ const ret = getObject(arg0).process;
838
+ return addHeapObject(ret);
839
+ };
840
+ imports.wbg.__wbg_versions_f686565e586dd935 = function (arg0) {
841
+ const ret = getObject(arg0).versions;
842
+ return addHeapObject(ret);
843
+ };
844
+ imports.wbg.__wbg_node_104a2ff8d6ea03a2 = function (arg0) {
845
+ const ret = getObject(arg0).node;
846
+ return addHeapObject(ret);
847
+ };
848
+ imports.wbg.__wbg_require_cca90b1a94a0255b = function () {
849
+ return handleError(function () {
850
+ const ret = module.require;
851
+ return addHeapObject(ret);
852
+ }, arguments)
853
+ };
854
+ imports.wbg.__wbg_msCrypto_eb05e62b530a1508 = function (arg0) {
855
+ const ret = getObject(arg0).msCrypto;
856
+ return addHeapObject(ret);
857
+ };
858
+ imports.wbg.__wbg_randomFillSync_5c9c955aa56b6049 = function () {
859
+ return handleError(function (arg0, arg1) {
860
+ getObject(arg0).randomFillSync(takeObject(arg1));
861
+ }, arguments)
862
+ };
863
+ imports.wbg.__wbg_getRandomValues_3aa56aa6edec874c = function () {
864
+ return handleError(function (arg0, arg1) {
865
+ getObject(arg0).getRandomValues(getObject(arg1));
866
+ }, arguments)
867
+ };
868
+ imports.wbg.__wbg_new_16b304a2cfa7ff4a = function () {
869
+ const ret = new Array();
870
+ return addHeapObject(ret);
871
+ };
872
+ imports.wbg.__wbg_newnoargs_e258087cd0daa0ea = function (arg0, arg1) {
873
+ const ret = new Function(getStringFromWasm0(arg0, arg1));
874
+ return addHeapObject(ret);
875
+ };
876
+ imports.wbg.__wbg_next_40fc327bfc8770e6 = function (arg0) {
877
+ const ret = getObject(arg0).next;
878
+ return addHeapObject(ret);
879
+ };
880
+ imports.wbg.__wbg_next_196c84450b364254 = function () {
881
+ return handleError(function (arg0) {
882
+ const ret = getObject(arg0).next();
883
+ return addHeapObject(ret);
884
+ }, arguments)
885
+ };
886
+ imports.wbg.__wbg_done_298b57d23c0fc80c = function (arg0) {
887
+ const ret = getObject(arg0).done;
888
+ return ret;
889
+ };
890
+ imports.wbg.__wbg_value_d93c65011f51a456 = function (arg0) {
891
+ const ret = getObject(arg0).value;
892
+ return addHeapObject(ret);
893
+ };
894
+ imports.wbg.__wbg_iterator_2cee6dadfd956dfa = function () {
895
+ const ret = Symbol.iterator;
896
+ return addHeapObject(ret);
897
+ };
898
+ imports.wbg.__wbg_get_e3c254076557e348 = function () {
899
+ return handleError(function (arg0, arg1) {
900
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
901
+ return addHeapObject(ret);
902
+ }, arguments)
903
+ };
904
+ imports.wbg.__wbg_call_27c0f87801dedf93 = function () {
905
+ return handleError(function (arg0, arg1) {
906
+ const ret = getObject(arg0).call(getObject(arg1));
907
+ return addHeapObject(ret);
908
+ }, arguments)
909
+ };
910
+ imports.wbg.__wbg_new_72fb9a18b5ae2624 = function () {
911
+ const ret = new Object();
912
+ return addHeapObject(ret);
913
+ };
914
+ imports.wbg.__wbg_self_ce0dbfc45cf2f5be = function () {
915
+ return handleError(function () {
916
+ const ret = self.self;
917
+ return addHeapObject(ret);
918
+ }, arguments)
919
+ };
920
+ imports.wbg.__wbg_window_c6fb939a7f436783 = function () {
921
+ return handleError(function () {
922
+ const ret = window.window;
923
+ return addHeapObject(ret);
924
+ }, arguments)
925
+ };
926
+ imports.wbg.__wbg_globalThis_d1e6af4856ba331b = function () {
927
+ return handleError(function () {
928
+ const ret = globalThis.globalThis;
929
+ return addHeapObject(ret);
930
+ }, arguments)
931
+ };
932
+ imports.wbg.__wbg_global_207b558942527489 = function () {
933
+ return handleError(function () {
934
+ const ret = global.global;
935
+ return addHeapObject(ret);
936
+ }, arguments)
937
+ };
938
+ imports.wbg.__wbindgen_is_undefined = function (arg0) {
939
+ const ret = getObject(arg0) === undefined;
940
+ return ret;
941
+ };
942
+ imports.wbg.__wbg_push_a5b05aedc7234f9f = function (arg0, arg1) {
943
+ const ret = getObject(arg0).push(getObject(arg1));
944
+ return ret;
945
+ };
946
+ imports.wbg.__wbg_instanceof_ArrayBuffer_836825be07d4c9d2 = function (arg0) {
947
+ let result;
948
+ try {
949
+ result = getObject(arg0) instanceof ArrayBuffer;
950
+ } catch (_) {
951
+ result = false;
952
+ }
953
+ const ret = result;
954
+ return ret;
955
+ };
956
+ imports.wbg.__wbg_instanceof_Error_e20bb56fd5591a93 = function (arg0) {
957
+ let result;
958
+ try {
959
+ result = getObject(arg0) instanceof Error;
960
+ } catch (_) {
961
+ result = false;
962
+ }
963
+ const ret = result;
964
+ return ret;
965
+ };
966
+ imports.wbg.__wbg_message_5bf28016c2b49cfb = function (arg0) {
967
+ const ret = getObject(arg0).message;
968
+ return addHeapObject(ret);
969
+ };
970
+ imports.wbg.__wbg_name_e7429f0dda6079e2 = function (arg0) {
971
+ const ret = getObject(arg0).name;
972
+ return addHeapObject(ret);
973
+ };
974
+ imports.wbg.__wbg_toString_ffe4c9ea3b3532e9 = function (arg0) {
975
+ const ret = getObject(arg0).toString();
976
+ return addHeapObject(ret);
977
+ };
978
+ imports.wbg.__wbg_call_b3ca7c6051f9bec1 = function () {
979
+ return handleError(function (arg0, arg1, arg2) {
980
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
981
+ return addHeapObject(ret);
982
+ }, arguments)
983
+ };
984
+ imports.wbg.__wbg_getTime_2bc4375165f02d15 = function (arg0) {
985
+ const ret = getObject(arg0).getTime();
986
+ return ret;
987
+ };
988
+ imports.wbg.__wbg_new0_7d84e5b2cd9fdc73 = function () {
989
+ const ret = new Date();
990
+ return addHeapObject(ret);
991
+ };
992
+ imports.wbg.__wbg_new_81740750da40724f = function (arg0, arg1) {
993
+ try {
994
+ var state0 = { a: arg0, b: arg1 };
995
+ var cb0 = (arg0, arg1) => {
996
+ const a = state0.a;
997
+ state0.a = 0;
998
+ try {
999
+ return __wbg_adapter_260(a, state0.b, arg0, arg1);
1000
+ } finally {
1001
+ state0.a = a;
1002
+ }
1003
+ };
1004
+ const ret = new Promise(cb0);
1005
+ return addHeapObject(ret);
1006
+ } finally {
1007
+ state0.a = state0.b = 0;
1008
+ }
1009
+ };
1010
+ imports.wbg.__wbg_resolve_b0083a7967828ec8 = function (arg0) {
1011
+ const ret = Promise.resolve(getObject(arg0));
1012
+ return addHeapObject(ret);
1013
+ };
1014
+ imports.wbg.__wbg_then_0c86a60e8fcfe9f6 = function (arg0, arg1) {
1015
+ const ret = getObject(arg0).then(getObject(arg1));
1016
+ return addHeapObject(ret);
1017
+ };
1018
+ imports.wbg.__wbg_then_a73caa9a87991566 = function (arg0, arg1, arg2) {
1019
+ const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
1020
+ return addHeapObject(ret);
1021
+ };
1022
+ imports.wbg.__wbg_buffer_12d079cc21e14bdb = function (arg0) {
1023
+ const ret = getObject(arg0).buffer;
1024
+ return addHeapObject(ret);
1025
+ };
1026
+ imports.wbg.__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb = function (arg0, arg1, arg2) {
1027
+ const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
1028
+ return addHeapObject(ret);
1029
+ };
1030
+ imports.wbg.__wbg_new_63b92bc8671ed464 = function (arg0) {
1031
+ const ret = new Uint8Array(getObject(arg0));
1032
+ return addHeapObject(ret);
1033
+ };
1034
+ imports.wbg.__wbg_set_a47bac70306a19a7 = function (arg0, arg1, arg2) {
1035
+ getObject(arg0).set(getObject(arg1), arg2 >>> 0);
1036
+ };
1037
+ imports.wbg.__wbg_length_c20a40f15020d68a = function (arg0) {
1038
+ const ret = getObject(arg0).length;
1039
+ return ret;
1040
+ };
1041
+ imports.wbg.__wbg_instanceof_Uint8Array_2b3bbecd033d19f6 = function (arg0) {
1042
+ let result;
1043
+ try {
1044
+ result = getObject(arg0) instanceof Uint8Array;
1045
+ } catch (_) {
1046
+ result = false;
1047
+ }
1048
+ const ret = result;
1049
+ return ret;
1050
+ };
1051
+ imports.wbg.__wbg_newwithlength_e9b4878cebadb3d3 = function (arg0) {
1052
+ const ret = new Uint8Array(arg0 >>> 0);
1053
+ return addHeapObject(ret);
1054
+ };
1055
+ imports.wbg.__wbg_subarray_a1f73cd4b5b42fe1 = function (arg0, arg1, arg2) {
1056
+ const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
1057
+ return addHeapObject(ret);
1058
+ };
1059
+ imports.wbg.__wbg_has_0af94d20077affa2 = function () {
1060
+ return handleError(function (arg0, arg1) {
1061
+ const ret = Reflect.has(getObject(arg0), getObject(arg1));
1062
+ return ret;
1063
+ }, arguments)
1064
+ };
1065
+ imports.wbg.__wbg_set_1f9b04f170055d33 = function () {
1066
+ return handleError(function (arg0, arg1, arg2) {
1067
+ const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
1068
+ return ret;
1069
+ }, arguments)
1070
+ };
1071
+ imports.wbg.__wbg_stringify_8887fe74e1c50d81 = function () {
1072
+ return handleError(function (arg0) {
1073
+ const ret = JSON.stringify(getObject(arg0));
1074
+ return addHeapObject(ret);
1075
+ }, arguments)
1076
+ };
1077
+ imports.wbg.__wbindgen_debug_string = function (arg0, arg1) {
1078
+ const ret = debugString(getObject(arg1));
1079
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1080
+ const len1 = WASM_VECTOR_LEN;
1081
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
1082
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
1083
+ };
1084
+ imports.wbg.__wbindgen_throw = function (arg0, arg1) {
1085
+ throw new Error(getStringFromWasm0(arg0, arg1));
1086
+ };
1087
+ imports.wbg.__wbindgen_memory = function () {
1088
+ const ret = wasm.memory;
1089
+ return addHeapObject(ret);
1090
+ };
1091
+ imports.wbg.__wbindgen_closure_wrapper268 = function (arg0, arg1, arg2) {
1092
+ const ret = makeMutClosure(arg0, arg1, 6, __wbg_adapter_32);
1093
+ return addHeapObject(ret);
1094
+ };
1095
+ imports.wbg.__wbindgen_closure_wrapper11866 = function (arg0, arg1, arg2) {
1096
+ const ret = makeMutClosure(arg0, arg1, 5985, __wbg_adapter_35);
1097
+ return addHeapObject(ret);
1098
+ };
1099
+ imports.wbg.__wbindgen_closure_wrapper11868 = function (arg0, arg1, arg2) {
1100
+ const ret = makeMutClosure(arg0, arg1, 5985, __wbg_adapter_35);
1101
+ return addHeapObject(ret);
1102
+ };
1103
+ imports.wbg.__wbindgen_closure_wrapper11870 = function (arg0, arg1, arg2) {
1104
+ const ret = makeMutClosure(arg0, arg1, 5985, __wbg_adapter_35);
1105
+ return addHeapObject(ret);
1106
+ };
1107
+ imports.wbg.__wbindgen_closure_wrapper11872 = function (arg0, arg1, arg2) {
1108
+ const ret = makeMutClosure(arg0, arg1, 5985, __wbg_adapter_42);
1109
+ return addHeapObject(ret);
1110
+ };
1111
+ imports.wbg.__wbindgen_closure_wrapper11928 = function (arg0, arg1, arg2) {
1112
+ const ret = makeMutClosure(arg0, arg1, 6010, __wbg_adapter_45);
1113
+ return addHeapObject(ret);
1114
+ };
1115
+ imports.wbg.__wbindgen_closure_wrapper13198 = function (arg0, arg1, arg2) {
1116
+ const ret = makeMutClosure(arg0, arg1, 6410, __wbg_adapter_48);
1117
+ return addHeapObject(ret);
1118
+ };
1119
+ imports.wbg.__wbindgen_closure_wrapper13913 = function (arg0, arg1, arg2) {
1120
+ const ret = makeMutClosure(arg0, arg1, 6595, __wbg_adapter_51);
1121
+ return addHeapObject(ret);
1122
+ };
1123
+ imports.wbg.__wbindgen_closure_wrapper13954 = function (arg0, arg1, arg2) {
1124
+ const ret = makeMutClosure(arg0, arg1, 6615, __wbg_adapter_54);
1125
+ return addHeapObject(ret);
1126
+ };
1127
+
1128
+ return imports;
1129
+ }
1130
+
1131
+ function __wbg_init_memory(imports, maybe_memory) {
1132
+
1133
+ }
1134
+
1135
+ function __wbg_finalize_init(instance, module) {
1136
+ wasm = instance.exports;
1137
+ __wbg_init.__wbindgen_wasm_module = module;
1138
+ cachedInt32Memory0 = null;
1139
+ cachedUint8Memory0 = null;
1140
+
1141
+
1142
+ return wasm;
1143
+ }
1144
+
1145
+ function initSync(module) {
1146
+ if (wasm !== undefined) return wasm;
1147
+
1148
+ const imports = __wbg_get_imports();
1149
+
1150
+ __wbg_init_memory(imports);
1151
+
1152
+ if (!(module instanceof WebAssembly.Module)) {
1153
+ module = new WebAssembly.Module(module);
1154
+ }
1155
+
1156
+ const instance = new WebAssembly.Instance(module, imports);
1157
+
1158
+ return __wbg_finalize_init(instance, module);
1159
+ }
1160
+
1161
+ async function __wbg_init(input) {
1162
+ if (wasm !== undefined) return wasm;
1163
+
1164
+ if (typeof input === 'undefined') {
1165
+ input = new URL('fedimint_client_wasm_bg.wasm', import.meta.url);
1166
+ }
1167
+ const imports = __wbg_get_imports();
1168
+
1169
+ if (typeof input === 'string' || (typeof Request === 'function' && input instanceof Request) || (typeof URL === 'function' && input instanceof URL)) {
1170
+ input = fetch(input);
1171
+ }
1172
+
1173
+ __wbg_init_memory(imports);
1174
+
1175
+ const { instance, module } = await __wbg_load(await input, imports);
1176
+
1177
+ return __wbg_finalize_init(instance, module);
1178
+ }
1179
+
1180
+ export { initSync }
1181
+ export default __wbg_init;