@bitwarden/sdk-internal 0.2.0-main.9 → 0.2.0-main.91

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.
@@ -1,58 +1,26 @@
1
1
  let imports = {};
2
2
  imports["__wbindgen_placeholder__"] = module.exports;
3
3
  let wasm;
4
- const { TextDecoder, TextEncoder } = require(`util`);
5
-
6
- let cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true });
7
-
8
- cachedTextDecoder.decode();
9
-
10
- let cachedUint8ArrayMemory0 = null;
11
-
12
- function getUint8ArrayMemory0() {
13
- if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
14
- cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
15
- }
16
- return cachedUint8ArrayMemory0;
17
- }
18
-
19
- function getStringFromWasm0(ptr, len) {
20
- ptr = ptr >>> 0;
21
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
22
- }
4
+ const { TextEncoder, TextDecoder } = require(`util`);
23
5
 
24
6
  const heap = new Array(128).fill(undefined);
25
7
 
26
8
  heap.push(undefined, null, true, false);
27
9
 
28
- let heap_next = heap.length;
29
-
30
- function addHeapObject(obj) {
31
- if (heap_next === heap.length) heap.push(heap.length + 1);
32
- const idx = heap_next;
33
- heap_next = heap[idx];
34
-
35
- heap[idx] = obj;
36
- return idx;
37
- }
38
-
39
10
  function getObject(idx) {
40
11
  return heap[idx];
41
12
  }
42
13
 
43
- function dropObject(idx) {
44
- if (idx < 132) return;
45
- heap[idx] = heap_next;
46
- heap_next = idx;
47
- }
14
+ let WASM_VECTOR_LEN = 0;
48
15
 
49
- function takeObject(idx) {
50
- const ret = getObject(idx);
51
- dropObject(idx);
52
- return ret;
53
- }
16
+ let cachedUint8ArrayMemory0 = null;
54
17
 
55
- let WASM_VECTOR_LEN = 0;
18
+ function getUint8ArrayMemory0() {
19
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
20
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
21
+ }
22
+ return cachedUint8ArrayMemory0;
23
+ }
56
24
 
57
25
  let cachedTextEncoder = new TextEncoder("utf-8");
58
26
 
@@ -110,10 +78,6 @@ function passStringToWasm0(arg, malloc, realloc) {
110
78
  return ptr;
111
79
  }
112
80
 
113
- function isLikeNone(x) {
114
- return x === undefined || x === null;
115
- }
116
-
117
81
  let cachedDataViewMemory0 = null;
118
82
 
119
83
  function getDataViewMemory0() {
@@ -128,6 +92,82 @@ function getDataViewMemory0() {
128
92
  return cachedDataViewMemory0;
129
93
  }
130
94
 
95
+ let cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true });
96
+
97
+ cachedTextDecoder.decode();
98
+
99
+ function getStringFromWasm0(ptr, len) {
100
+ ptr = ptr >>> 0;
101
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
102
+ }
103
+
104
+ let heap_next = heap.length;
105
+
106
+ function addHeapObject(obj) {
107
+ if (heap_next === heap.length) heap.push(heap.length + 1);
108
+ const idx = heap_next;
109
+ heap_next = heap[idx];
110
+
111
+ heap[idx] = obj;
112
+ return idx;
113
+ }
114
+
115
+ function handleError(f, args) {
116
+ try {
117
+ return f.apply(this, args);
118
+ } catch (e) {
119
+ wasm.__wbindgen_exn_store(addHeapObject(e));
120
+ }
121
+ }
122
+
123
+ function dropObject(idx) {
124
+ if (idx < 132) return;
125
+ heap[idx] = heap_next;
126
+ heap_next = idx;
127
+ }
128
+
129
+ function takeObject(idx) {
130
+ const ret = getObject(idx);
131
+ dropObject(idx);
132
+ return ret;
133
+ }
134
+
135
+ function isLikeNone(x) {
136
+ return x === undefined || x === null;
137
+ }
138
+
139
+ const CLOSURE_DTORS =
140
+ typeof FinalizationRegistry === "undefined"
141
+ ? { register: () => {}, unregister: () => {} }
142
+ : new FinalizationRegistry((state) => {
143
+ wasm.__wbindgen_export_4.get(state.dtor)(state.a, state.b);
144
+ });
145
+
146
+ function makeMutClosure(arg0, arg1, dtor, f) {
147
+ const state = { a: arg0, b: arg1, cnt: 1, dtor };
148
+ const real = (...args) => {
149
+ // First up with a closure we increment the internal reference
150
+ // count. This ensures that the Rust closure environment won't
151
+ // be deallocated while we're invoking it.
152
+ state.cnt++;
153
+ const a = state.a;
154
+ state.a = 0;
155
+ try {
156
+ return f(a, state.b, ...args);
157
+ } finally {
158
+ if (--state.cnt === 0) {
159
+ wasm.__wbindgen_export_4.get(state.dtor)(a, state.b);
160
+ CLOSURE_DTORS.unregister(state);
161
+ } else {
162
+ state.a = a;
163
+ }
164
+ }
165
+ };
166
+ real.original = state;
167
+ CLOSURE_DTORS.register(real, state, state);
168
+ return real;
169
+ }
170
+
131
171
  function debugString(val) {
132
172
  // primitive types
133
173
  const type = typeof val;
@@ -169,7 +209,7 @@ function debugString(val) {
169
209
  // Test for built-in
170
210
  const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
171
211
  let className;
172
- if (builtInMatches.length > 1) {
212
+ if (builtInMatches && builtInMatches.length > 1) {
173
213
  className = builtInMatches[1];
174
214
  } else {
175
215
  // Failed to match the standard '[object ClassName]'
@@ -193,45 +233,6 @@ function debugString(val) {
193
233
  return className;
194
234
  }
195
235
 
196
- const CLOSURE_DTORS =
197
- typeof FinalizationRegistry === "undefined"
198
- ? { register: () => {}, unregister: () => {} }
199
- : new FinalizationRegistry((state) => {
200
- wasm.__wbindgen_export_2.get(state.dtor)(state.a, state.b);
201
- });
202
-
203
- function makeMutClosure(arg0, arg1, dtor, f) {
204
- const state = { a: arg0, b: arg1, cnt: 1, dtor };
205
- const real = (...args) => {
206
- // First up with a closure we increment the internal reference
207
- // count. This ensures that the Rust closure environment won't
208
- // be deallocated while we're invoking it.
209
- state.cnt++;
210
- const a = state.a;
211
- state.a = 0;
212
- try {
213
- return f(a, state.b, ...args);
214
- } finally {
215
- if (--state.cnt === 0) {
216
- wasm.__wbindgen_export_2.get(state.dtor)(a, state.b);
217
- CLOSURE_DTORS.unregister(state);
218
- } else {
219
- state.a = a;
220
- }
221
- }
222
- };
223
- real.original = state;
224
- CLOSURE_DTORS.register(real, state, state);
225
- return real;
226
- }
227
- function __wbg_adapter_38(arg0, arg1, arg2) {
228
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hcab43b83560065d8(
229
- arg0,
230
- arg1,
231
- addHeapObject(arg2),
232
- );
233
- }
234
-
235
236
  let stack_pointer = 128;
236
237
 
237
238
  function addBorrowedObject(obj) {
@@ -243,9 +244,9 @@ function addBorrowedObject(obj) {
243
244
  * @param {any} error
244
245
  * @returns {boolean}
245
246
  */
246
- module.exports.isCoreError = function (error) {
247
+ module.exports.isEncryptionSettingsError = function (error) {
247
248
  try {
248
- const ret = wasm.isCoreError(addBorrowedObject(error));
249
+ const ret = wasm.isEncryptionSettingsError(addBorrowedObject(error));
249
250
  return ret !== 0;
250
251
  } finally {
251
252
  heap[stack_pointer++] = undefined;
@@ -256,9 +257,9 @@ module.exports.isCoreError = function (error) {
256
257
  * @param {any} error
257
258
  * @returns {boolean}
258
259
  */
259
- module.exports.isEncryptionSettingsError = function (error) {
260
+ module.exports.isCryptoError = function (error) {
260
261
  try {
261
- const ret = wasm.isEncryptionSettingsError(addBorrowedObject(error));
262
+ const ret = wasm.isCryptoError(addBorrowedObject(error));
262
263
  return ret !== 0;
263
264
  } finally {
264
265
  heap[stack_pointer++] = undefined;
@@ -269,71 +270,247 @@ module.exports.isEncryptionSettingsError = function (error) {
269
270
  * @param {any} error
270
271
  * @returns {boolean}
271
272
  */
272
- module.exports.isTestError = function (error) {
273
+ module.exports.isSshKeyExportError = function (error) {
273
274
  try {
274
- const ret = wasm.isTestError(addBorrowedObject(error));
275
+ const ret = wasm.isSshKeyExportError(addBorrowedObject(error));
275
276
  return ret !== 0;
276
277
  } finally {
277
278
  heap[stack_pointer++] = undefined;
278
279
  }
279
280
  };
280
281
 
281
- function handleError(f, args) {
282
+ /**
283
+ * @param {any} error
284
+ * @returns {boolean}
285
+ */
286
+ module.exports.isSshKeyImportError = function (error) {
282
287
  try {
283
- return f.apply(this, args);
284
- } catch (e) {
285
- wasm.__wbindgen_exn_store(addHeapObject(e));
288
+ const ret = wasm.isSshKeyImportError(addBorrowedObject(error));
289
+ return ret !== 0;
290
+ } finally {
291
+ heap[stack_pointer++] = undefined;
286
292
  }
287
- }
288
- function __wbg_adapter_107(arg0, arg1, arg2, arg3) {
289
- wasm.wasm_bindgen__convert__closures__invoke2_mut__h7363c1bfa226a55d(
290
- arg0,
291
- arg1,
292
- addHeapObject(arg2),
293
- addHeapObject(arg3),
294
- );
295
- }
296
-
297
- module.exports.LogLevel = Object.freeze({
298
- Trace: 0,
299
- 0: "Trace",
300
- Debug: 1,
301
- 1: "Debug",
302
- Info: 2,
303
- 2: "Info",
304
- Warn: 3,
305
- 3: "Warn",
306
- Error: 4,
307
- 4: "Error",
308
- });
309
-
310
- const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
293
+ };
311
294
 
312
- const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
295
+ /**
296
+ * @param {any} error
297
+ * @returns {boolean}
298
+ */
299
+ module.exports.isKeyGenerationError = function (error) {
300
+ try {
301
+ const ret = wasm.isKeyGenerationError(addBorrowedObject(error));
302
+ return ret !== 0;
303
+ } finally {
304
+ heap[stack_pointer++] = undefined;
305
+ }
306
+ };
313
307
 
314
- const BitwardenClientFinalization =
315
- typeof FinalizationRegistry === "undefined"
316
- ? { register: () => {}, unregister: () => {} }
317
- : new FinalizationRegistry((ptr) => wasm.__wbg_bitwardenclient_free(ptr >>> 0, 1));
308
+ /**
309
+ * @param {any} error
310
+ * @returns {boolean}
311
+ */
312
+ module.exports.isDecryptFileError = function (error) {
313
+ try {
314
+ const ret = wasm.isDecryptFileError(addBorrowedObject(error));
315
+ return ret !== 0;
316
+ } finally {
317
+ heap[stack_pointer++] = undefined;
318
+ }
319
+ };
318
320
 
319
- class BitwardenClient {
320
- __destroy_into_raw() {
321
- const ptr = this.__wbg_ptr;
322
- this.__wbg_ptr = 0;
323
- BitwardenClientFinalization.unregister(this);
324
- return ptr;
321
+ /**
322
+ * @param {any} error
323
+ * @returns {boolean}
324
+ */
325
+ module.exports.isEncryptFileError = function (error) {
326
+ try {
327
+ const ret = wasm.isEncryptFileError(addBorrowedObject(error));
328
+ return ret !== 0;
329
+ } finally {
330
+ heap[stack_pointer++] = undefined;
325
331
  }
332
+ };
326
333
 
327
- free() {
328
- const ptr = this.__destroy_into_raw();
329
- wasm.__wbg_bitwardenclient_free(ptr, 0);
334
+ /**
335
+ * @param {any} error
336
+ * @returns {boolean}
337
+ */
338
+ module.exports.isDecryptError = function (error) {
339
+ try {
340
+ const ret = wasm.isDecryptError(addBorrowedObject(error));
341
+ return ret !== 0;
342
+ } finally {
343
+ heap[stack_pointer++] = undefined;
330
344
  }
331
- /**
332
- * @param {ClientSettings | undefined} [settings]
333
- * @param {LogLevel | undefined} [log_level]
334
- */
335
- constructor(settings, log_level) {
336
- const ret = wasm.bitwardenclient_new(
345
+ };
346
+
347
+ /**
348
+ * @param {any} error
349
+ * @returns {boolean}
350
+ */
351
+ module.exports.isEncryptError = function (error) {
352
+ try {
353
+ const ret = wasm.isEncryptError(addBorrowedObject(error));
354
+ return ret !== 0;
355
+ } finally {
356
+ heap[stack_pointer++] = undefined;
357
+ }
358
+ };
359
+
360
+ /**
361
+ * @param {any} error
362
+ * @returns {boolean}
363
+ */
364
+ module.exports.isTotpError = function (error) {
365
+ try {
366
+ const ret = wasm.isTotpError(addBorrowedObject(error));
367
+ return ret !== 0;
368
+ } finally {
369
+ heap[stack_pointer++] = undefined;
370
+ }
371
+ };
372
+
373
+ /**
374
+ * @param {any} error
375
+ * @returns {boolean}
376
+ */
377
+ module.exports.isTestError = function (error) {
378
+ try {
379
+ const ret = wasm.isTestError(addBorrowedObject(error));
380
+ return ret !== 0;
381
+ } finally {
382
+ heap[stack_pointer++] = undefined;
383
+ }
384
+ };
385
+
386
+ /**
387
+ * Generate a new SSH key pair
388
+ *
389
+ * # Arguments
390
+ * - `key_algorithm` - The algorithm to use for the key pair
391
+ *
392
+ * # Returns
393
+ * - `Ok(SshKey)` if the key was successfully generated
394
+ * - `Err(KeyGenerationError)` if the key could not be generated
395
+ * @param {KeyAlgorithm} key_algorithm
396
+ * @returns {SshKey}
397
+ */
398
+ module.exports.generate_ssh_key = function (key_algorithm) {
399
+ try {
400
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
401
+ wasm.generate_ssh_key(retptr, addHeapObject(key_algorithm));
402
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
403
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
404
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
405
+ if (r2) {
406
+ throw takeObject(r1);
407
+ }
408
+ return takeObject(r0);
409
+ } finally {
410
+ wasm.__wbindgen_add_to_stack_pointer(16);
411
+ }
412
+ };
413
+
414
+ /**
415
+ * Convert a PCKS8 or OpenSSH encrypted or unencrypted private key
416
+ * to an OpenSSH private key with public key and fingerprint
417
+ *
418
+ * # Arguments
419
+ * - `imported_key` - The private key to convert
420
+ * - `password` - The password to use for decrypting the key
421
+ *
422
+ * # Returns
423
+ * - `Ok(SshKey)` if the key was successfully coneverted
424
+ * - `Err(PasswordRequired)` if the key is encrypted and no password was provided
425
+ * - `Err(WrongPassword)` if the password provided is incorrect
426
+ * - `Err(ParsingError)` if the key could not be parsed
427
+ * - `Err(UnsupportedKeyType)` if the key type is not supported
428
+ * @param {string} imported_key
429
+ * @param {string | null} [password]
430
+ * @returns {SshKey}
431
+ */
432
+ module.exports.import_ssh_key = function (imported_key, password) {
433
+ try {
434
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
435
+ const ptr0 = passStringToWasm0(imported_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
436
+ const len0 = WASM_VECTOR_LEN;
437
+ var ptr1 = isLikeNone(password)
438
+ ? 0
439
+ : passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
440
+ var len1 = WASM_VECTOR_LEN;
441
+ wasm.import_ssh_key(retptr, ptr0, len0, ptr1, len1);
442
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
443
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
444
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
445
+ if (r2) {
446
+ throw takeObject(r1);
447
+ }
448
+ return takeObject(r0);
449
+ } finally {
450
+ wasm.__wbindgen_add_to_stack_pointer(16);
451
+ }
452
+ };
453
+
454
+ function __wbg_adapter_40(arg0, arg1, arg2) {
455
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h7af7927fe391910e(
456
+ arg0,
457
+ arg1,
458
+ addHeapObject(arg2),
459
+ );
460
+ }
461
+
462
+ function __wbg_adapter_143(arg0, arg1, arg2, arg3) {
463
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__h69e15f428907d894(
464
+ arg0,
465
+ arg1,
466
+ addHeapObject(arg2),
467
+ addHeapObject(arg3),
468
+ );
469
+ }
470
+
471
+ /**
472
+ * @enum {0 | 1 | 2 | 3 | 4}
473
+ */
474
+ module.exports.LogLevel = Object.freeze({
475
+ Trace: 0,
476
+ 0: "Trace",
477
+ Debug: 1,
478
+ 1: "Debug",
479
+ Info: 2,
480
+ 2: "Info",
481
+ Warn: 3,
482
+ 3: "Warn",
483
+ Error: 4,
484
+ 4: "Error",
485
+ });
486
+
487
+ const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
488
+
489
+ const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
490
+
491
+ const BitwardenClientFinalization =
492
+ typeof FinalizationRegistry === "undefined"
493
+ ? { register: () => {}, unregister: () => {} }
494
+ : new FinalizationRegistry((ptr) => wasm.__wbg_bitwardenclient_free(ptr >>> 0, 1));
495
+
496
+ class BitwardenClient {
497
+ __destroy_into_raw() {
498
+ const ptr = this.__wbg_ptr;
499
+ this.__wbg_ptr = 0;
500
+ BitwardenClientFinalization.unregister(this);
501
+ return ptr;
502
+ }
503
+
504
+ free() {
505
+ const ptr = this.__destroy_into_raw();
506
+ wasm.__wbg_bitwardenclient_free(ptr, 0);
507
+ }
508
+ /**
509
+ * @param {ClientSettings | null} [settings]
510
+ * @param {LogLevel | null} [log_level]
511
+ */
512
+ constructor(settings, log_level) {
513
+ const ret = wasm.bitwardenclient_new(
337
514
  isLikeNone(settings) ? 0 : addHeapObject(settings),
338
515
  isLikeNone(log_level) ? 5 : log_level,
339
516
  );
@@ -385,13 +562,21 @@ class BitwardenClient {
385
562
  }
386
563
  /**
387
564
  * @param {string} msg
388
- * @returns {Promise<void>}
389
565
  */
390
566
  throw(msg) {
391
- const ptr0 = passStringToWasm0(msg, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
392
- const len0 = WASM_VECTOR_LEN;
393
- const ret = wasm.bitwardenclient_throw(this.__wbg_ptr, ptr0, len0);
394
- return takeObject(ret);
567
+ try {
568
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
569
+ const ptr0 = passStringToWasm0(msg, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
570
+ const len0 = WASM_VECTOR_LEN;
571
+ wasm.bitwardenclient_throw(retptr, this.__wbg_ptr, ptr0, len0);
572
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
573
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
574
+ if (r1) {
575
+ throw takeObject(r0);
576
+ }
577
+ } finally {
578
+ wasm.__wbindgen_add_to_stack_pointer(16);
579
+ }
395
580
  }
396
581
  /**
397
582
  * Test method, calls http endpoint
@@ -405,104 +590,218 @@ class BitwardenClient {
405
590
  return takeObject(ret);
406
591
  }
407
592
  /**
408
- * @returns {ClientCrypto}
593
+ * @returns {CryptoClient}
409
594
  */
410
595
  crypto() {
411
596
  const ret = wasm.bitwardenclient_crypto(this.__wbg_ptr);
412
- return ClientCrypto.__wrap(ret);
597
+ return CryptoClient.__wrap(ret);
413
598
  }
414
599
  /**
415
- * @returns {ClientVault}
600
+ * @returns {VaultClient}
416
601
  */
417
602
  vault() {
418
603
  const ret = wasm.bitwardenclient_crypto(this.__wbg_ptr);
419
- return ClientVault.__wrap(ret);
604
+ return VaultClient.__wrap(ret);
420
605
  }
421
606
  }
422
607
  module.exports.BitwardenClient = BitwardenClient;
423
608
 
424
- const ClientCryptoFinalization =
609
+ const ClientFoldersFinalization =
425
610
  typeof FinalizationRegistry === "undefined"
426
611
  ? { register: () => {}, unregister: () => {} }
427
- : new FinalizationRegistry((ptr) => wasm.__wbg_clientcrypto_free(ptr >>> 0, 1));
612
+ : new FinalizationRegistry((ptr) => wasm.__wbg_clientfolders_free(ptr >>> 0, 1));
428
613
 
429
- class ClientCrypto {
614
+ class ClientFolders {
430
615
  static __wrap(ptr) {
431
616
  ptr = ptr >>> 0;
432
- const obj = Object.create(ClientCrypto.prototype);
617
+ const obj = Object.create(ClientFolders.prototype);
433
618
  obj.__wbg_ptr = ptr;
434
- ClientCryptoFinalization.register(obj, obj.__wbg_ptr, obj);
619
+ ClientFoldersFinalization.register(obj, obj.__wbg_ptr, obj);
435
620
  return obj;
436
621
  }
437
622
 
438
623
  __destroy_into_raw() {
439
624
  const ptr = this.__wbg_ptr;
440
625
  this.__wbg_ptr = 0;
441
- ClientCryptoFinalization.unregister(this);
626
+ ClientFoldersFinalization.unregister(this);
442
627
  return ptr;
443
628
  }
444
629
 
445
630
  free() {
446
631
  const ptr = this.__destroy_into_raw();
447
- wasm.__wbg_clientcrypto_free(ptr, 0);
632
+ wasm.__wbg_clientfolders_free(ptr, 0);
448
633
  }
449
634
  /**
450
- * Initialization method for the user crypto. Needs to be called before any other crypto
451
- * operations.
452
- * @param {InitUserCryptoRequest} req
453
- * @returns {Promise<void>}
635
+ * Decrypt folder
636
+ * @param {Folder} folder
637
+ * @returns {FolderView}
454
638
  */
455
- initialize_user_crypto(req) {
456
- const ret = wasm.clientcrypto_initialize_user_crypto(this.__wbg_ptr, addHeapObject(req));
457
- return takeObject(ret);
639
+ decrypt(folder) {
640
+ try {
641
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
642
+ wasm.clientfolders_decrypt(retptr, this.__wbg_ptr, addHeapObject(folder));
643
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
644
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
645
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
646
+ if (r2) {
647
+ throw takeObject(r1);
648
+ }
649
+ return takeObject(r0);
650
+ } finally {
651
+ wasm.__wbindgen_add_to_stack_pointer(16);
652
+ }
653
+ }
654
+ }
655
+ module.exports.ClientFolders = ClientFolders;
656
+
657
+ const ClientTotpFinalization =
658
+ typeof FinalizationRegistry === "undefined"
659
+ ? { register: () => {}, unregister: () => {} }
660
+ : new FinalizationRegistry((ptr) => wasm.__wbg_clienttotp_free(ptr >>> 0, 1));
661
+
662
+ class ClientTotp {
663
+ static __wrap(ptr) {
664
+ ptr = ptr >>> 0;
665
+ const obj = Object.create(ClientTotp.prototype);
666
+ obj.__wbg_ptr = ptr;
667
+ ClientTotpFinalization.register(obj, obj.__wbg_ptr, obj);
668
+ return obj;
669
+ }
670
+
671
+ __destroy_into_raw() {
672
+ const ptr = this.__wbg_ptr;
673
+ this.__wbg_ptr = 0;
674
+ ClientTotpFinalization.unregister(this);
675
+ return ptr;
676
+ }
677
+
678
+ free() {
679
+ const ptr = this.__destroy_into_raw();
680
+ wasm.__wbg_clienttotp_free(ptr, 0);
458
681
  }
459
682
  /**
460
- * Initialization method for the organization crypto. Needs to be called after
461
- * `initialize_user_crypto` but before any other crypto operations.
462
- * @param {InitOrgCryptoRequest} req
463
- * @returns {Promise<void>}
683
+ * Generates a TOTP code from a provided key
684
+ *
685
+ * # Arguments
686
+ * - `key` - Can be:
687
+ * - A base32 encoded string
688
+ * - OTP Auth URI
689
+ * - Steam URI
690
+ * - `time_ms` - Optional timestamp in milliseconds
691
+ *
692
+ * # Returns
693
+ * - `Ok(TotpResponse)` containing the generated code and period
694
+ * - `Err(TotpError)` if code generation fails
695
+ * @param {string} key
696
+ * @param {number | null} [time_ms]
697
+ * @returns {TotpResponse}
464
698
  */
465
- initialize_org_crypto(req) {
466
- const ret = wasm.clientcrypto_initialize_org_crypto(this.__wbg_ptr, addHeapObject(req));
467
- return takeObject(ret);
699
+ generate_totp(key, time_ms) {
700
+ try {
701
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
702
+ const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
703
+ const len0 = WASM_VECTOR_LEN;
704
+ wasm.clienttotp_generate_totp(
705
+ retptr,
706
+ this.__wbg_ptr,
707
+ ptr0,
708
+ len0,
709
+ !isLikeNone(time_ms),
710
+ isLikeNone(time_ms) ? 0 : time_ms,
711
+ );
712
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
713
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
714
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
715
+ if (r2) {
716
+ throw takeObject(r1);
717
+ }
718
+ return takeObject(r0);
719
+ } finally {
720
+ wasm.__wbindgen_add_to_stack_pointer(16);
721
+ }
468
722
  }
469
723
  }
470
- module.exports.ClientCrypto = ClientCrypto;
724
+ module.exports.ClientTotp = ClientTotp;
471
725
 
472
- const ClientFoldersFinalization =
726
+ const CryptoClientFinalization =
473
727
  typeof FinalizationRegistry === "undefined"
474
728
  ? { register: () => {}, unregister: () => {} }
475
- : new FinalizationRegistry((ptr) => wasm.__wbg_clientfolders_free(ptr >>> 0, 1));
729
+ : new FinalizationRegistry((ptr) => wasm.__wbg_cryptoclient_free(ptr >>> 0, 1));
476
730
 
477
- class ClientFolders {
731
+ class CryptoClient {
478
732
  static __wrap(ptr) {
479
733
  ptr = ptr >>> 0;
480
- const obj = Object.create(ClientFolders.prototype);
734
+ const obj = Object.create(CryptoClient.prototype);
481
735
  obj.__wbg_ptr = ptr;
482
- ClientFoldersFinalization.register(obj, obj.__wbg_ptr, obj);
736
+ CryptoClientFinalization.register(obj, obj.__wbg_ptr, obj);
483
737
  return obj;
484
738
  }
485
739
 
486
740
  __destroy_into_raw() {
487
741
  const ptr = this.__wbg_ptr;
488
742
  this.__wbg_ptr = 0;
489
- ClientFoldersFinalization.unregister(this);
743
+ CryptoClientFinalization.unregister(this);
490
744
  return ptr;
491
745
  }
492
746
 
493
747
  free() {
494
748
  const ptr = this.__destroy_into_raw();
495
- wasm.__wbg_clientfolders_free(ptr, 0);
749
+ wasm.__wbg_cryptoclient_free(ptr, 0);
496
750
  }
497
751
  /**
498
- * Decrypt folder
499
- * @param {Folder} folder
500
- * @returns {FolderView}
752
+ * Initialization method for the user crypto. Needs to be called before any other crypto
753
+ * operations.
754
+ * @param {InitUserCryptoRequest} req
755
+ * @returns {Promise<void>}
501
756
  */
502
- decrypt(folder) {
757
+ initialize_user_crypto(req) {
758
+ const ret = wasm.cryptoclient_initialize_user_crypto(this.__wbg_ptr, addHeapObject(req));
759
+ return takeObject(ret);
760
+ }
761
+ /**
762
+ * Initialization method for the organization crypto. Needs to be called after
763
+ * `initialize_user_crypto` but before any other crypto operations.
764
+ * @param {InitOrgCryptoRequest} req
765
+ * @returns {Promise<void>}
766
+ */
767
+ initialize_org_crypto(req) {
768
+ const ret = wasm.cryptoclient_initialize_org_crypto(this.__wbg_ptr, addHeapObject(req));
769
+ return takeObject(ret);
770
+ }
771
+ /**
772
+ * Generates a new key pair and encrypts the private key with the provided user key.
773
+ * Crypto initialization not required.
774
+ * @param {string} user_key
775
+ * @returns {MakeKeyPairResponse}
776
+ */
777
+ make_key_pair(user_key) {
503
778
  try {
504
779
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
505
- wasm.clientfolders_decrypt(retptr, this.__wbg_ptr, addHeapObject(folder));
780
+ const ptr0 = passStringToWasm0(user_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
781
+ const len0 = WASM_VECTOR_LEN;
782
+ wasm.cryptoclient_make_key_pair(retptr, this.__wbg_ptr, ptr0, len0);
783
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
784
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
785
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
786
+ if (r2) {
787
+ throw takeObject(r1);
788
+ }
789
+ return takeObject(r0);
790
+ } finally {
791
+ wasm.__wbindgen_add_to_stack_pointer(16);
792
+ }
793
+ }
794
+ /**
795
+ * Verifies a user's asymmetric keys by decrypting the private key with the provided user
796
+ * key. Returns if the private key is decryptable and if it is a valid matching key.
797
+ * Crypto initialization not required.
798
+ * @param {VerifyAsymmetricKeysRequest} request
799
+ * @returns {VerifyAsymmetricKeysResponse}
800
+ */
801
+ verify_asymmetric_keys(request) {
802
+ try {
803
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
804
+ wasm.cryptoclient_verify_asymmetric_keys(retptr, this.__wbg_ptr, addHeapObject(request));
506
805
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
507
806
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
508
807
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -515,32 +814,32 @@ class ClientFolders {
515
814
  }
516
815
  }
517
816
  }
518
- module.exports.ClientFolders = ClientFolders;
817
+ module.exports.CryptoClient = CryptoClient;
519
818
 
520
- const ClientVaultFinalization =
819
+ const VaultClientFinalization =
521
820
  typeof FinalizationRegistry === "undefined"
522
821
  ? { register: () => {}, unregister: () => {} }
523
- : new FinalizationRegistry((ptr) => wasm.__wbg_clientvault_free(ptr >>> 0, 1));
822
+ : new FinalizationRegistry((ptr) => wasm.__wbg_vaultclient_free(ptr >>> 0, 1));
524
823
 
525
- class ClientVault {
824
+ class VaultClient {
526
825
  static __wrap(ptr) {
527
826
  ptr = ptr >>> 0;
528
- const obj = Object.create(ClientVault.prototype);
827
+ const obj = Object.create(VaultClient.prototype);
529
828
  obj.__wbg_ptr = ptr;
530
- ClientVaultFinalization.register(obj, obj.__wbg_ptr, obj);
829
+ VaultClientFinalization.register(obj, obj.__wbg_ptr, obj);
531
830
  return obj;
532
831
  }
533
832
 
534
833
  __destroy_into_raw() {
535
834
  const ptr = this.__wbg_ptr;
536
835
  this.__wbg_ptr = 0;
537
- ClientVaultFinalization.unregister(this);
836
+ VaultClientFinalization.unregister(this);
538
837
  return ptr;
539
838
  }
540
839
 
541
840
  free() {
542
841
  const ptr = this.__destroy_into_raw();
543
- wasm.__wbg_clientvault_free(ptr, 0);
842
+ wasm.__wbg_vaultclient_free(ptr, 0);
544
843
  }
545
844
  /**
546
845
  * @returns {ClientFolders}
@@ -549,201 +848,176 @@ class ClientVault {
549
848
  const ret = wasm.bitwardenclient_crypto(this.__wbg_ptr);
550
849
  return ClientFolders.__wrap(ret);
551
850
  }
851
+ /**
852
+ * @returns {ClientTotp}
853
+ */
854
+ totp() {
855
+ const ret = wasm.bitwardenclient_crypto(this.__wbg_ptr);
856
+ return ClientTotp.__wrap(ret);
857
+ }
552
858
  }
553
- module.exports.ClientVault = ClientVault;
859
+ module.exports.VaultClient = VaultClient;
554
860
 
555
- module.exports.__wbg_new_fe19e4f3db5c3999 = function (arg0, arg1) {
556
- let deferred0_0;
557
- let deferred0_1;
558
- try {
559
- deferred0_0 = arg0;
560
- deferred0_1 = arg1;
561
- const ret = new Error(getStringFromWasm0(arg0, arg1));
562
- return addHeapObject(ret);
563
- } finally {
564
- wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
565
- }
861
+ module.exports.__wbg_String_8f0eb39a4a4c2f66 = function (arg0, arg1) {
862
+ const ret = String(getObject(arg1));
863
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
864
+ const len1 = WASM_VECTOR_LEN;
865
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
866
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
566
867
  };
567
868
 
568
- module.exports.__wbg_setname_46d623c31ae39910 = function (arg0, arg1, arg2) {
569
- let deferred0_0;
570
- let deferred0_1;
571
- try {
572
- deferred0_0 = arg1;
573
- deferred0_1 = arg2;
574
- getObject(arg0).name = getStringFromWasm0(arg1, arg2);
575
- } finally {
576
- wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
577
- }
578
- };
579
-
580
- module.exports.__wbg_setvariant_262a12673324f71b = function (arg0, arg1, arg2) {
581
- let deferred0_0;
582
- let deferred0_1;
583
- try {
584
- deferred0_0 = arg1;
585
- deferred0_1 = arg2;
586
- getObject(arg0).variant = getStringFromWasm0(arg1, arg2);
587
- } finally {
588
- wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
589
- }
590
- };
591
-
592
- module.exports.__wbindgen_string_new = function (arg0, arg1) {
593
- const ret = getStringFromWasm0(arg0, arg1);
594
- return addHeapObject(ret);
869
+ module.exports.__wbg_abort_775ef1d17fc65868 = function (arg0) {
870
+ getObject(arg0).abort();
595
871
  };
596
872
 
597
- module.exports.__wbg_get_ef828680c64da212 = function () {
598
- return handleError(function (arg0, arg1) {
599
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
600
- return addHeapObject(ret);
873
+ module.exports.__wbg_append_299d5d48292c0495 = function () {
874
+ return handleError(function (arg0, arg1, arg2, arg3, arg4) {
875
+ getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
601
876
  }, arguments);
602
877
  };
603
878
 
604
- module.exports.__wbindgen_object_drop_ref = function (arg0) {
605
- takeObject(arg0);
879
+ module.exports.__wbg_append_8c7dd8d641a5f01b = function () {
880
+ return handleError(function (arg0, arg1, arg2, arg3, arg4) {
881
+ getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
882
+ }, arguments);
606
883
  };
607
884
 
608
- module.exports.__wbindgen_string_get = function (arg0, arg1) {
609
- const obj = getObject(arg1);
610
- const ret = typeof obj === "string" ? obj : undefined;
611
- var ptr1 = isLikeNone(ret)
612
- ? 0
613
- : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
614
- var len1 = WASM_VECTOR_LEN;
615
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
616
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
885
+ module.exports.__wbg_append_b2d1fc16de2a0e81 = function () {
886
+ return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
887
+ getObject(arg0).append(
888
+ getStringFromWasm0(arg1, arg2),
889
+ getObject(arg3),
890
+ getStringFromWasm0(arg4, arg5),
891
+ );
892
+ }, arguments);
617
893
  };
618
894
 
619
- module.exports.__wbindgen_is_object = function (arg0) {
620
- const val = getObject(arg0);
621
- const ret = typeof val === "object" && val !== null;
622
- return ret;
895
+ module.exports.__wbg_append_b44785ebeb668479 = function () {
896
+ return handleError(function (arg0, arg1, arg2, arg3) {
897
+ getObject(arg0).append(getStringFromWasm0(arg1, arg2), getObject(arg3));
898
+ }, arguments);
623
899
  };
624
900
 
625
- module.exports.__wbg_getwithrefkey_edc2c8960f0f1191 = function (arg0, arg1) {
626
- const ret = getObject(arg0)[getObject(arg1)];
901
+ module.exports.__wbg_buffer_609cc3eee51ed158 = function (arg0) {
902
+ const ret = getObject(arg0).buffer;
627
903
  return addHeapObject(ret);
628
904
  };
629
905
 
630
- module.exports.__wbindgen_is_undefined = function (arg0) {
631
- const ret = getObject(arg0) === undefined;
632
- return ret;
906
+ module.exports.__wbg_call_672a4d21634d4a24 = function () {
907
+ return handleError(function (arg0, arg1) {
908
+ const ret = getObject(arg0).call(getObject(arg1));
909
+ return addHeapObject(ret);
910
+ }, arguments);
633
911
  };
634
912
 
635
- module.exports.__wbindgen_in = function (arg0, arg1) {
636
- const ret = getObject(arg0) in getObject(arg1);
637
- return ret;
913
+ module.exports.__wbg_call_7cccdd69e0791ae2 = function () {
914
+ return handleError(function (arg0, arg1, arg2) {
915
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
916
+ return addHeapObject(ret);
917
+ }, arguments);
638
918
  };
639
919
 
640
- module.exports.__wbg_isSafeInteger_b9dff570f01a9100 = function (arg0) {
641
- const ret = Number.isSafeInteger(getObject(arg0));
642
- return ret;
920
+ module.exports.__wbg_crypto_ed58b8e10a292839 = function (arg0) {
921
+ const ret = getObject(arg0).crypto;
922
+ return addHeapObject(ret);
643
923
  };
644
924
 
645
- module.exports.__wbindgen_as_number = function (arg0) {
646
- const ret = +getObject(arg0);
647
- return ret;
925
+ module.exports.__wbg_debug_e17b51583ca6a632 = function (arg0, arg1, arg2, arg3) {
926
+ console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
648
927
  };
649
928
 
650
- module.exports.__wbindgen_is_string = function (arg0) {
651
- const ret = typeof getObject(arg0) === "string";
929
+ module.exports.__wbg_done_769e5ede4b31c67b = function (arg0) {
930
+ const ret = getObject(arg0).done;
652
931
  return ret;
653
932
  };
654
933
 
655
- module.exports.__wbg_entries_c02034de337d3ee2 = function (arg0) {
934
+ module.exports.__wbg_entries_3265d4158b33e5dc = function (arg0) {
656
935
  const ret = Object.entries(getObject(arg0));
657
936
  return addHeapObject(ret);
658
937
  };
659
938
 
660
- module.exports.__wbg_length_f217bbbf7e8e4df4 = function (arg0) {
661
- const ret = getObject(arg0).length;
662
- return ret;
939
+ module.exports.__wbg_error_7534b8e9a36f1ab4 = function (arg0, arg1) {
940
+ let deferred0_0;
941
+ let deferred0_1;
942
+ try {
943
+ deferred0_0 = arg0;
944
+ deferred0_1 = arg1;
945
+ console.error(getStringFromWasm0(arg0, arg1));
946
+ } finally {
947
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
948
+ }
663
949
  };
664
950
 
665
- module.exports.__wbg_get_5419cf6b954aa11d = function (arg0, arg1) {
666
- const ret = getObject(arg0)[arg1 >>> 0];
667
- return addHeapObject(ret);
951
+ module.exports.__wbg_error_80de38b3f7cc3c3c = function (arg0, arg1, arg2, arg3) {
952
+ console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
668
953
  };
669
954
 
670
- module.exports.__wbg_call_3bfa248576352471 = function () {
671
- return handleError(function (arg0, arg1, arg2) {
672
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
673
- return addHeapObject(ret);
674
- }, arguments);
955
+ module.exports.__wbg_fetch_4465c2b10f21a927 = function (arg0) {
956
+ const ret = fetch(getObject(arg0));
957
+ return addHeapObject(ret);
675
958
  };
676
959
 
677
- module.exports.__wbindgen_object_clone_ref = function (arg0) {
678
- const ret = getObject(arg0);
960
+ module.exports.__wbg_fetch_509096533071c657 = function (arg0, arg1) {
961
+ const ret = getObject(arg0).fetch(getObject(arg1));
679
962
  return addHeapObject(ret);
680
963
  };
681
964
 
682
- module.exports.__wbg_next_b06e115d1b01e10b = function () {
683
- return handleError(function (arg0) {
684
- const ret = getObject(arg0).next();
685
- return addHeapObject(ret);
965
+ module.exports.__wbg_getRandomValues_bcb4912f16000dc4 = function () {
966
+ return handleError(function (arg0, arg1) {
967
+ getObject(arg0).getRandomValues(getObject(arg1));
686
968
  }, arguments);
687
969
  };
688
970
 
689
- module.exports.__wbg_done_983b5ffcaec8c583 = function (arg0) {
690
- const ret = getObject(arg0).done;
971
+ module.exports.__wbg_getTime_46267b1c24877e30 = function (arg0) {
972
+ const ret = getObject(arg0).getTime();
691
973
  return ret;
692
974
  };
693
975
 
694
- module.exports.__wbg_value_2ab8a198c834c26a = function (arg0) {
695
- const ret = getObject(arg0).value;
696
- return addHeapObject(ret);
697
- };
698
-
699
- module.exports.__wbg_new_e69b5f66fda8f13c = function () {
700
- const ret = new Object();
701
- return addHeapObject(ret);
702
- };
703
-
704
- module.exports.__wbg_setmethod_ce2da76000b02f6a = function (arg0, arg1, arg2) {
705
- getObject(arg0).method = getStringFromWasm0(arg1, arg2);
706
- };
707
-
708
- module.exports.__wbg_new_a9ae04a5200606a5 = function () {
709
- return handleError(function () {
710
- const ret = new Headers();
976
+ module.exports.__wbg_get_67b2ba62fc30de12 = function () {
977
+ return handleError(function (arg0, arg1) {
978
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
711
979
  return addHeapObject(ret);
712
980
  }, arguments);
713
981
  };
714
982
 
715
- module.exports.__wbg_setheaders_f5205d36e423a544 = function (arg0, arg1) {
716
- getObject(arg0).headers = getObject(arg1);
717
- };
718
-
719
- module.exports.__wbg_setmode_4919fd636102c586 = function (arg0, arg1) {
720
- getObject(arg0).mode = __wbindgen_enum_RequestMode[arg1];
983
+ module.exports.__wbg_get_b9b93047fe3cf45b = function (arg0, arg1) {
984
+ const ret = getObject(arg0)[arg1 >>> 0];
985
+ return addHeapObject(ret);
721
986
  };
722
987
 
723
- module.exports.__wbg_setcredentials_a4e661320cdb9738 = function (arg0, arg1) {
724
- getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
988
+ module.exports.__wbg_getwithrefkey_1dc361bd10053bfe = function (arg0, arg1) {
989
+ const ret = getObject(arg0)[getObject(arg1)];
990
+ return addHeapObject(ret);
725
991
  };
726
992
 
727
- module.exports.__wbg_setbody_aa8b691bec428bf4 = function (arg0, arg1) {
728
- getObject(arg0).body = getObject(arg1);
993
+ module.exports.__wbg_has_a5ea9117f258a0ec = function () {
994
+ return handleError(function (arg0, arg1) {
995
+ const ret = Reflect.has(getObject(arg0), getObject(arg1));
996
+ return ret;
997
+ }, arguments);
729
998
  };
730
999
 
731
- module.exports.__wbg_signal_9acfcec9e7dffc22 = function (arg0) {
732
- const ret = getObject(arg0).signal;
1000
+ module.exports.__wbg_headers_9cb51cfd2ac780a4 = function (arg0) {
1001
+ const ret = getObject(arg0).headers;
733
1002
  return addHeapObject(ret);
734
1003
  };
735
1004
 
736
- module.exports.__wbg_setsignal_812ccb8269a7fd90 = function (arg0, arg1) {
737
- getObject(arg0).signal = getObject(arg1);
1005
+ module.exports.__wbg_info_033d8b8a0838f1d3 = function (arg0, arg1, arg2, arg3) {
1006
+ console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
738
1007
  };
739
1008
 
740
- module.exports.__wbg_append_8b3e7f74a47ea7d5 = function () {
741
- return handleError(function (arg0, arg1, arg2, arg3, arg4) {
742
- getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
743
- }, arguments);
1009
+ module.exports.__wbg_instanceof_ArrayBuffer_e14585432e3737fc = function (arg0) {
1010
+ let result;
1011
+ try {
1012
+ result = getObject(arg0) instanceof ArrayBuffer;
1013
+ } catch (_) {
1014
+ result = false;
1015
+ }
1016
+ const ret = result;
1017
+ return ret;
744
1018
  };
745
1019
 
746
- module.exports.__wbg_instanceof_Response_3c0e210a57ff751d = function (arg0) {
1020
+ module.exports.__wbg_instanceof_Response_f2cc20d9f7dfd644 = function (arg0) {
747
1021
  let result;
748
1022
  try {
749
1023
  result = getObject(arg0) instanceof Response;
@@ -754,70 +1028,66 @@ module.exports.__wbg_instanceof_Response_3c0e210a57ff751d = function (arg0) {
754
1028
  return ret;
755
1029
  };
756
1030
 
757
- module.exports.__wbg_status_5f4e900d22140a18 = function (arg0) {
758
- const ret = getObject(arg0).status;
1031
+ module.exports.__wbg_instanceof_Uint8Array_17156bcf118086a9 = function (arg0) {
1032
+ let result;
1033
+ try {
1034
+ result = getObject(arg0) instanceof Uint8Array;
1035
+ } catch (_) {
1036
+ result = false;
1037
+ }
1038
+ const ret = result;
759
1039
  return ret;
760
1040
  };
761
1041
 
762
- module.exports.__wbg_url_58af972663531d16 = function (arg0, arg1) {
763
- const ret = getObject(arg1).url;
764
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
765
- const len1 = WASM_VECTOR_LEN;
766
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
767
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1042
+ module.exports.__wbg_isSafeInteger_343e2beeeece1bb0 = function (arg0) {
1043
+ const ret = Number.isSafeInteger(getObject(arg0));
1044
+ return ret;
768
1045
  };
769
1046
 
770
- module.exports.__wbg_headers_1b9bf90c73fae600 = function (arg0) {
771
- const ret = getObject(arg0).headers;
1047
+ module.exports.__wbg_iterator_9a24c88df860dc65 = function () {
1048
+ const ret = Symbol.iterator;
772
1049
  return addHeapObject(ret);
773
1050
  };
774
1051
 
775
- module.exports.__wbg_stringify_eead5648c09faaf8 = function () {
776
- return handleError(function (arg0) {
777
- const ret = JSON.stringify(getObject(arg0));
778
- return addHeapObject(ret);
779
- }, arguments);
1052
+ module.exports.__wbg_length_a446193dc22c12f8 = function (arg0) {
1053
+ const ret = getObject(arg0).length;
1054
+ return ret;
780
1055
  };
781
1056
 
782
- module.exports.__wbg_abort_c57daab47a6c1215 = function (arg0) {
783
- getObject(arg0).abort();
1057
+ module.exports.__wbg_length_e2d2a49132c1b256 = function (arg0) {
1058
+ const ret = getObject(arg0).length;
1059
+ return ret;
784
1060
  };
785
1061
 
786
- module.exports.__wbg_text_ebeee8b31af4c919 = function () {
787
- return handleError(function (arg0) {
788
- const ret = getObject(arg0).text();
789
- return addHeapObject(ret);
790
- }, arguments);
1062
+ module.exports.__wbg_log_cad59bb680daec67 = function (arg0, arg1, arg2, arg3) {
1063
+ console.log(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
791
1064
  };
792
1065
 
793
- module.exports.__wbindgen_jsval_loose_eq = function (arg0, arg1) {
794
- const ret = getObject(arg0) == getObject(arg1);
795
- return ret;
1066
+ module.exports.__wbg_msCrypto_0a36e2ec3a343d26 = function (arg0) {
1067
+ const ret = getObject(arg0).msCrypto;
1068
+ return addHeapObject(ret);
796
1069
  };
797
1070
 
798
- module.exports.__wbindgen_cb_drop = function (arg0) {
799
- const obj = takeObject(arg0).original;
800
- if (obj.cnt-- == 1) {
801
- obj.a = 0;
802
- return true;
803
- }
804
- const ret = false;
805
- return ret;
1071
+ module.exports.__wbg_new0_f788a2397c7ca929 = function () {
1072
+ const ret = new Date();
1073
+ return addHeapObject(ret);
806
1074
  };
807
1075
 
808
- module.exports.__wbindgen_error_new = function (arg0, arg1) {
809
- const ret = new Error(getStringFromWasm0(arg0, arg1));
810
- return addHeapObject(ret);
1076
+ module.exports.__wbg_new_018dcc2d6c8c2f6a = function () {
1077
+ return handleError(function () {
1078
+ const ret = new Headers();
1079
+ return addHeapObject(ret);
1080
+ }, arguments);
811
1081
  };
812
1082
 
813
- module.exports.__wbg_new_1073970097e5a420 = function (arg0, arg1) {
1083
+ module.exports.__wbg_new_23a2665fac83c611 = function (arg0, arg1) {
814
1084
  try {
815
1085
  var state0 = { a: arg0, b: arg1 };
816
1086
  var cb0 = (arg0, arg1) => {
817
1087
  const a = state0.a;
818
1088
  state0.a = 0;
819
1089
  try {
820
- return __wbg_adapter_107(a, state0.b, arg0, arg1);
1090
+ return __wbg_adapter_143(a, state0.b, arg0, arg1);
821
1091
  } finally {
822
1092
  state0.a = a;
823
1093
  }
@@ -829,233 +1099,293 @@ module.exports.__wbg_new_1073970097e5a420 = function (arg0, arg1) {
829
1099
  }
830
1100
  };
831
1101
 
832
- module.exports.__wbg_set_f975102236d3c502 = function (arg0, arg1, arg2) {
833
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
1102
+ module.exports.__wbg_new_405e22f390576ce2 = function () {
1103
+ const ret = new Object();
1104
+ return addHeapObject(ret);
1105
+ };
1106
+
1107
+ module.exports.__wbg_new_78feb108b6472713 = function () {
1108
+ const ret = new Array();
1109
+ return addHeapObject(ret);
834
1110
  };
835
1111
 
836
- module.exports.__wbg_new_abda76e883ba8a5f = function () {
1112
+ module.exports.__wbg_new_8a6f238a6ece86ea = function () {
837
1113
  const ret = new Error();
838
1114
  return addHeapObject(ret);
839
1115
  };
840
1116
 
841
- module.exports.__wbg_stack_658279fe44541cf6 = function (arg0, arg1) {
842
- const ret = getObject(arg1).stack;
843
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
844
- const len1 = WASM_VECTOR_LEN;
845
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
846
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1117
+ module.exports.__wbg_new_9fd39a253424609a = function () {
1118
+ return handleError(function () {
1119
+ const ret = new FormData();
1120
+ return addHeapObject(ret);
1121
+ }, arguments);
1122
+ };
1123
+
1124
+ module.exports.__wbg_new_a12002a7f91c75be = function (arg0) {
1125
+ const ret = new Uint8Array(getObject(arg0));
1126
+ return addHeapObject(ret);
1127
+ };
1128
+
1129
+ module.exports.__wbg_new_c68d7209be747379 = function (arg0, arg1) {
1130
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
1131
+ return addHeapObject(ret);
1132
+ };
1133
+
1134
+ module.exports.__wbg_new_e25e5aab09ff45db = function () {
1135
+ return handleError(function () {
1136
+ const ret = new AbortController();
1137
+ return addHeapObject(ret);
1138
+ }, arguments);
847
1139
  };
848
1140
 
849
- module.exports.__wbg_error_f851667af71bcfc6 = function (arg0, arg1) {
1141
+ module.exports.__wbg_new_f24b6d53abe5bc82 = function (arg0, arg1) {
850
1142
  let deferred0_0;
851
1143
  let deferred0_1;
852
1144
  try {
853
1145
  deferred0_0 = arg0;
854
1146
  deferred0_1 = arg1;
855
- console.error(getStringFromWasm0(arg0, arg1));
1147
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
1148
+ return addHeapObject(ret);
856
1149
  } finally {
857
1150
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
858
1151
  }
859
1152
  };
860
1153
 
861
- module.exports.__wbg_self_bf91bf94d9e04084 = function () {
862
- return handleError(function () {
863
- const ret = self.self;
864
- return addHeapObject(ret);
865
- }, arguments);
1154
+ module.exports.__wbg_newnoargs_105ed471475aaf50 = function (arg0, arg1) {
1155
+ const ret = new Function(getStringFromWasm0(arg0, arg1));
1156
+ return addHeapObject(ret);
866
1157
  };
867
1158
 
868
- module.exports.__wbg_window_52dd9f07d03fd5f8 = function () {
869
- return handleError(function () {
870
- const ret = window.window;
871
- return addHeapObject(ret);
872
- }, arguments);
1159
+ module.exports.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function (arg0, arg1, arg2) {
1160
+ const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
1161
+ return addHeapObject(ret);
873
1162
  };
874
1163
 
875
- module.exports.__wbg_globalThis_05c129bf37fcf1be = function () {
876
- return handleError(function () {
877
- const ret = globalThis.globalThis;
878
- return addHeapObject(ret);
879
- }, arguments);
1164
+ module.exports.__wbg_newwithlength_a381634e90c276d4 = function (arg0) {
1165
+ const ret = new Uint8Array(arg0 >>> 0);
1166
+ return addHeapObject(ret);
880
1167
  };
881
1168
 
882
- module.exports.__wbg_global_3eca19bb09e9c484 = function () {
883
- return handleError(function () {
884
- const ret = global.global;
1169
+ module.exports.__wbg_newwithstrandinit_06c535e0a867c635 = function () {
1170
+ return handleError(function (arg0, arg1, arg2) {
1171
+ const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
885
1172
  return addHeapObject(ret);
886
1173
  }, arguments);
887
1174
  };
888
1175
 
889
- module.exports.__wbg_newnoargs_1ede4bf2ebbaaf43 = function (arg0, arg1) {
890
- const ret = new Function(getStringFromWasm0(arg0, arg1));
891
- return addHeapObject(ret);
892
- };
893
-
894
- module.exports.__wbg_call_a9ef466721e824f2 = function () {
1176
+ module.exports.__wbg_newwithu8arraysequenceandoptions_068570c487f69127 = function () {
895
1177
  return handleError(function (arg0, arg1) {
896
- const ret = getObject(arg0).call(getObject(arg1));
1178
+ const ret = new Blob(getObject(arg0), getObject(arg1));
897
1179
  return addHeapObject(ret);
898
1180
  }, arguments);
899
1181
  };
900
1182
 
901
- module.exports.__wbg_iterator_695d699a44d6234c = function () {
902
- const ret = Symbol.iterator;
1183
+ module.exports.__wbg_next_25feadfc0913fea9 = function (arg0) {
1184
+ const ret = getObject(arg0).next;
903
1185
  return addHeapObject(ret);
904
1186
  };
905
1187
 
906
- module.exports.__wbindgen_is_function = function (arg0) {
907
- const ret = typeof getObject(arg0) === "function";
908
- return ret;
1188
+ module.exports.__wbg_next_6574e1a8a62d1055 = function () {
1189
+ return handleError(function (arg0) {
1190
+ const ret = getObject(arg0).next();
1191
+ return addHeapObject(ret);
1192
+ }, arguments);
909
1193
  };
910
1194
 
911
- module.exports.__wbg_next_13b477da1eaa3897 = function (arg0) {
912
- const ret = getObject(arg0).next;
1195
+ module.exports.__wbg_node_02999533c4ea02e3 = function (arg0) {
1196
+ const ret = getObject(arg0).node;
913
1197
  return addHeapObject(ret);
914
1198
  };
915
1199
 
916
- module.exports.__wbg_new_034f913e7636e987 = function () {
917
- const ret = new Array();
1200
+ module.exports.__wbg_process_5c1d670bc53614b8 = function (arg0) {
1201
+ const ret = getObject(arg0).process;
918
1202
  return addHeapObject(ret);
919
1203
  };
920
1204
 
921
- module.exports.__wbg_push_36cf4d81d7da33d1 = function (arg0, arg1) {
1205
+ module.exports.__wbg_push_737cfc8c1432c2c6 = function (arg0, arg1) {
922
1206
  const ret = getObject(arg0).push(getObject(arg1));
923
1207
  return ret;
924
1208
  };
925
1209
 
926
- module.exports.__wbg_instanceof_ArrayBuffer_74945570b4a62ec7 = function (arg0) {
927
- let result;
928
- try {
929
- result = getObject(arg0) instanceof ArrayBuffer;
930
- } catch (_) {
931
- result = false;
932
- }
933
- const ret = result;
934
- return ret;
1210
+ module.exports.__wbg_queueMicrotask_97d92b4fcc8a61c5 = function (arg0) {
1211
+ queueMicrotask(getObject(arg0));
935
1212
  };
936
1213
 
937
- module.exports.__wbg_new_70a2f23d1565c04c = function (arg0, arg1) {
938
- const ret = new Error(getStringFromWasm0(arg0, arg1));
1214
+ module.exports.__wbg_queueMicrotask_d3219def82552485 = function (arg0) {
1215
+ const ret = getObject(arg0).queueMicrotask;
939
1216
  return addHeapObject(ret);
940
1217
  };
941
1218
 
942
- module.exports.__wbg_has_bd717f25f195f23d = function () {
1219
+ module.exports.__wbg_randomFillSync_ab2cfe79ebbf2740 = function () {
943
1220
  return handleError(function (arg0, arg1) {
944
- const ret = Reflect.has(getObject(arg0), getObject(arg1));
945
- return ret;
1221
+ getObject(arg0).randomFillSync(takeObject(arg1));
1222
+ }, arguments);
1223
+ };
1224
+
1225
+ module.exports.__wbg_require_79b1e9274cde3c87 = function () {
1226
+ return handleError(function () {
1227
+ const ret = module.require;
1228
+ return addHeapObject(ret);
946
1229
  }, arguments);
947
1230
  };
948
1231
 
949
- module.exports.__wbg_resolve_0aad7c1484731c99 = function (arg0) {
1232
+ module.exports.__wbg_resolve_4851785c9c5f573d = function (arg0) {
950
1233
  const ret = Promise.resolve(getObject(arg0));
951
1234
  return addHeapObject(ret);
952
1235
  };
953
1236
 
954
- module.exports.__wbg_then_748f75edfb032440 = function (arg0, arg1) {
955
- const ret = getObject(arg0).then(getObject(arg1));
956
- return addHeapObject(ret);
1237
+ module.exports.__wbg_set_3f1d0b984ed272ed = function (arg0, arg1, arg2) {
1238
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
957
1239
  };
958
1240
 
959
- module.exports.__wbg_then_4866a7d9f55d8f3e = function (arg0, arg1, arg2) {
960
- const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
961
- return addHeapObject(ret);
1241
+ module.exports.__wbg_set_65595bdd868b3009 = function (arg0, arg1, arg2) {
1242
+ getObject(arg0).set(getObject(arg1), arg2 >>> 0);
962
1243
  };
963
1244
 
964
- module.exports.__wbindgen_memory = function () {
965
- const ret = wasm.memory;
966
- return addHeapObject(ret);
1245
+ module.exports.__wbg_setbody_5923b78a95eedf29 = function (arg0, arg1) {
1246
+ getObject(arg0).body = getObject(arg1);
967
1247
  };
968
1248
 
969
- module.exports.__wbg_buffer_ccaed51a635d8a2d = function (arg0) {
970
- const ret = getObject(arg0).buffer;
971
- return addHeapObject(ret);
1249
+ module.exports.__wbg_setcredentials_c3a22f1cd105a2c6 = function (arg0, arg1) {
1250
+ getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
972
1251
  };
973
1252
 
974
- module.exports.__wbg_newwithbyteoffsetandlength_7e3eb787208af730 = function (arg0, arg1, arg2) {
975
- const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
976
- return addHeapObject(ret);
1253
+ module.exports.__wbg_setheaders_834c0bdb6a8949ad = function (arg0, arg1) {
1254
+ getObject(arg0).headers = getObject(arg1);
977
1255
  };
978
1256
 
979
- module.exports.__wbg_length_9254c4bd3b9f23c4 = function (arg0) {
980
- const ret = getObject(arg0).length;
981
- return ret;
1257
+ module.exports.__wbg_setmethod_3c5280fe5d890842 = function (arg0, arg1, arg2) {
1258
+ getObject(arg0).method = getStringFromWasm0(arg1, arg2);
982
1259
  };
983
1260
 
984
- module.exports.__wbg_new_fec2611eb9180f95 = function (arg0) {
985
- const ret = new Uint8Array(getObject(arg0));
986
- return addHeapObject(ret);
1261
+ module.exports.__wbg_setmode_5dc300b865044b65 = function (arg0, arg1) {
1262
+ getObject(arg0).mode = __wbindgen_enum_RequestMode[arg1];
987
1263
  };
988
1264
 
989
- module.exports.__wbg_set_ec2fcf81bc573fd9 = function (arg0, arg1, arg2) {
990
- getObject(arg0).set(getObject(arg1), arg2 >>> 0);
1265
+ module.exports.__wbg_setname_c0e2d6f348c746f4 = function (arg0, arg1, arg2) {
1266
+ let deferred0_0;
1267
+ let deferred0_1;
1268
+ try {
1269
+ deferred0_0 = arg1;
1270
+ deferred0_1 = arg2;
1271
+ getObject(arg0).name = getStringFromWasm0(arg1, arg2);
1272
+ } finally {
1273
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1274
+ }
991
1275
  };
992
1276
 
993
- module.exports.__wbg_instanceof_Uint8Array_df0761410414ef36 = function (arg0) {
994
- let result;
1277
+ module.exports.__wbg_setsignal_75b21ef3a81de905 = function (arg0, arg1) {
1278
+ getObject(arg0).signal = getObject(arg1);
1279
+ };
1280
+
1281
+ module.exports.__wbg_settype_39ed370d3edd403c = function (arg0, arg1, arg2) {
1282
+ getObject(arg0).type = getStringFromWasm0(arg1, arg2);
1283
+ };
1284
+
1285
+ module.exports.__wbg_setvariant_d1d41b778dfe9c17 = function (arg0, arg1, arg2) {
1286
+ let deferred0_0;
1287
+ let deferred0_1;
995
1288
  try {
996
- result = getObject(arg0) instanceof Uint8Array;
997
- } catch (_) {
998
- result = false;
1289
+ deferred0_0 = arg1;
1290
+ deferred0_1 = arg2;
1291
+ getObject(arg0).variant = getStringFromWasm0(arg1, arg2);
1292
+ } finally {
1293
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
999
1294
  }
1000
- const ret = result;
1001
- return ret;
1002
1295
  };
1003
1296
 
1004
- module.exports.__wbg_new_4e7308fbedde3997 = function () {
1005
- return handleError(function () {
1006
- const ret = new FormData();
1007
- return addHeapObject(ret);
1008
- }, arguments);
1297
+ module.exports.__wbg_signal_aaf9ad74119f20a4 = function (arg0) {
1298
+ const ret = getObject(arg0).signal;
1299
+ return addHeapObject(ret);
1009
1300
  };
1010
1301
 
1011
- module.exports.__wbg_append_43a4b1c9d5df4168 = function () {
1012
- return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1013
- getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
1014
- }, arguments);
1302
+ module.exports.__wbg_stack_0ed75d68575b0f3c = function (arg0, arg1) {
1303
+ const ret = getObject(arg1).stack;
1304
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1305
+ const len1 = WASM_VECTOR_LEN;
1306
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1307
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1015
1308
  };
1016
1309
 
1017
- module.exports.__wbg_settype_623d2ee701e6310a = function (arg0, arg1, arg2) {
1018
- getObject(arg0).type = getStringFromWasm0(arg1, arg2);
1310
+ module.exports.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function () {
1311
+ const ret = typeof global === "undefined" ? null : global;
1312
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
1019
1313
  };
1020
1314
 
1021
- module.exports.__wbg_newwithu8arraysequenceandoptions_d41c0fdf78490206 = function () {
1022
- return handleError(function (arg0, arg1) {
1023
- const ret = new Blob(getObject(arg0), getObject(arg1));
1315
+ module.exports.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function () {
1316
+ const ret = typeof globalThis === "undefined" ? null : globalThis;
1317
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
1318
+ };
1319
+
1320
+ module.exports.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function () {
1321
+ const ret = typeof self === "undefined" ? null : self;
1322
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
1323
+ };
1324
+
1325
+ module.exports.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function () {
1326
+ const ret = typeof window === "undefined" ? null : window;
1327
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
1328
+ };
1329
+
1330
+ module.exports.__wbg_status_f6360336ca686bf0 = function (arg0) {
1331
+ const ret = getObject(arg0).status;
1332
+ return ret;
1333
+ };
1334
+
1335
+ module.exports.__wbg_stringify_f7ed6987935b4a24 = function () {
1336
+ return handleError(function (arg0) {
1337
+ const ret = JSON.stringify(getObject(arg0));
1024
1338
  return addHeapObject(ret);
1025
1339
  }, arguments);
1026
1340
  };
1027
1341
 
1028
- module.exports.__wbg_append_7ee78799a92a9731 = function () {
1029
- return handleError(function (arg0, arg1, arg2, arg3) {
1030
- getObject(arg0).append(getStringFromWasm0(arg1, arg2), getObject(arg3));
1031
- }, arguments);
1342
+ module.exports.__wbg_subarray_aa9065fa9dc5df96 = function (arg0, arg1, arg2) {
1343
+ const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
1344
+ return addHeapObject(ret);
1032
1345
  };
1033
1346
 
1034
- module.exports.__wbg_append_8135c71037096394 = function () {
1035
- return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
1036
- getObject(arg0).append(
1037
- getStringFromWasm0(arg1, arg2),
1038
- getObject(arg3),
1039
- getStringFromWasm0(arg4, arg5),
1040
- );
1347
+ module.exports.__wbg_text_7805bea50de2af49 = function () {
1348
+ return handleError(function (arg0) {
1349
+ const ret = getObject(arg0).text();
1350
+ return addHeapObject(ret);
1041
1351
  }, arguments);
1042
1352
  };
1043
1353
 
1044
- module.exports.__wbg_fetch_f8d735ba6fe1b719 = function (arg0) {
1045
- const ret = fetch(getObject(arg0));
1354
+ module.exports.__wbg_then_44b73946d2fb3e7d = function (arg0, arg1) {
1355
+ const ret = getObject(arg0).then(getObject(arg1));
1046
1356
  return addHeapObject(ret);
1047
1357
  };
1048
1358
 
1049
- module.exports.__wbg_fetch_1fdc4448ed9eec00 = function (arg0, arg1) {
1050
- const ret = getObject(arg0).fetch(getObject(arg1));
1359
+ module.exports.__wbg_then_48b406749878a531 = function (arg0, arg1, arg2) {
1360
+ const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
1051
1361
  return addHeapObject(ret);
1052
1362
  };
1053
1363
 
1054
- module.exports.__wbg_new_75169ae5a9683c55 = function () {
1055
- return handleError(function () {
1056
- const ret = new AbortController();
1057
- return addHeapObject(ret);
1058
- }, arguments);
1364
+ module.exports.__wbg_url_ae10c34ca209681d = function (arg0, arg1) {
1365
+ const ret = getObject(arg1).url;
1366
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1367
+ const len1 = WASM_VECTOR_LEN;
1368
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1369
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1370
+ };
1371
+
1372
+ module.exports.__wbg_value_cd1ffa7b1ab794f1 = function (arg0) {
1373
+ const ret = getObject(arg0).value;
1374
+ return addHeapObject(ret);
1375
+ };
1376
+
1377
+ module.exports.__wbg_versions_c71aa1626a93e0a1 = function (arg0) {
1378
+ const ret = getObject(arg0).versions;
1379
+ return addHeapObject(ret);
1380
+ };
1381
+
1382
+ module.exports.__wbg_warn_aaf1f4664a035bd6 = function (arg0, arg1, arg2, arg3) {
1383
+ console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
1384
+ };
1385
+
1386
+ module.exports.__wbindgen_as_number = function (arg0) {
1387
+ const ret = +getObject(arg0);
1388
+ return ret;
1059
1389
  };
1060
1390
 
1061
1391
  module.exports.__wbindgen_boolean_get = function (arg0) {
@@ -1064,19 +1394,19 @@ module.exports.__wbindgen_boolean_get = function (arg0) {
1064
1394
  return ret;
1065
1395
  };
1066
1396
 
1067
- module.exports.__wbindgen_number_get = function (arg0, arg1) {
1068
- const obj = getObject(arg1);
1069
- const ret = typeof obj === "number" ? obj : undefined;
1070
- getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
1071
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
1397
+ module.exports.__wbindgen_cb_drop = function (arg0) {
1398
+ const obj = takeObject(arg0).original;
1399
+ if (obj.cnt-- == 1) {
1400
+ obj.a = 0;
1401
+ return true;
1402
+ }
1403
+ const ret = false;
1404
+ return ret;
1072
1405
  };
1073
1406
 
1074
- module.exports.__wbg_String_b9412f8799faab3e = function (arg0, arg1) {
1075
- const ret = String(getObject(arg1));
1076
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1077
- const len1 = WASM_VECTOR_LEN;
1078
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1079
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1407
+ module.exports.__wbindgen_closure_wrapper2086 = function (arg0, arg1, arg2) {
1408
+ const ret = makeMutClosure(arg0, arg1, 559, __wbg_adapter_40);
1409
+ return addHeapObject(ret);
1080
1410
  };
1081
1411
 
1082
1412
  module.exports.__wbindgen_debug_string = function (arg0, arg1) {
@@ -1087,51 +1417,88 @@ module.exports.__wbindgen_debug_string = function (arg0, arg1) {
1087
1417
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1088
1418
  };
1089
1419
 
1090
- module.exports.__wbindgen_throw = function (arg0, arg1) {
1091
- throw new Error(getStringFromWasm0(arg0, arg1));
1420
+ module.exports.__wbindgen_error_new = function (arg0, arg1) {
1421
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
1422
+ return addHeapObject(ret);
1092
1423
  };
1093
1424
 
1094
- module.exports.__wbg_queueMicrotask_848aa4969108a57e = function (arg0) {
1095
- const ret = getObject(arg0).queueMicrotask;
1096
- return addHeapObject(ret);
1425
+ module.exports.__wbindgen_in = function (arg0, arg1) {
1426
+ const ret = getObject(arg0) in getObject(arg1);
1427
+ return ret;
1097
1428
  };
1098
1429
 
1099
- module.exports.__wbg_queueMicrotask_c5419c06eab41e73 = function (arg0) {
1100
- queueMicrotask(getObject(arg0));
1430
+ module.exports.__wbindgen_is_function = function (arg0) {
1431
+ const ret = typeof getObject(arg0) === "function";
1432
+ return ret;
1101
1433
  };
1102
1434
 
1103
- module.exports.__wbg_newwithstrandinit_4b92c89af0a8e383 = function () {
1104
- return handleError(function (arg0, arg1, arg2) {
1105
- const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
1106
- return addHeapObject(ret);
1107
- }, arguments);
1435
+ module.exports.__wbindgen_is_object = function (arg0) {
1436
+ const val = getObject(arg0);
1437
+ const ret = typeof val === "object" && val !== null;
1438
+ return ret;
1108
1439
  };
1109
1440
 
1110
- module.exports.__wbg_debug_a0b6c2c5ac9a4bfd = function (arg0, arg1, arg2, arg3) {
1111
- console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
1441
+ module.exports.__wbindgen_is_string = function (arg0) {
1442
+ const ret = typeof getObject(arg0) === "string";
1443
+ return ret;
1112
1444
  };
1113
1445
 
1114
- module.exports.__wbg_error_4d17c5bb1ca90c94 = function (arg0, arg1, arg2, arg3) {
1115
- console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
1446
+ module.exports.__wbindgen_is_undefined = function (arg0) {
1447
+ const ret = getObject(arg0) === undefined;
1448
+ return ret;
1116
1449
  };
1117
1450
 
1118
- module.exports.__wbg_info_1c7fba7da21072d1 = function (arg0, arg1, arg2, arg3) {
1119
- console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
1451
+ module.exports.__wbindgen_jsval_loose_eq = function (arg0, arg1) {
1452
+ const ret = getObject(arg0) == getObject(arg1);
1453
+ return ret;
1120
1454
  };
1121
1455
 
1122
- module.exports.__wbg_log_4de37a0274d94769 = function (arg0, arg1, arg2, arg3) {
1123
- console.log(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
1456
+ module.exports.__wbindgen_memory = function () {
1457
+ const ret = wasm.memory;
1458
+ return addHeapObject(ret);
1124
1459
  };
1125
1460
 
1126
- module.exports.__wbg_warn_2e2787d40aad9a81 = function (arg0, arg1, arg2, arg3) {
1127
- console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
1461
+ module.exports.__wbindgen_number_get = function (arg0, arg1) {
1462
+ const obj = getObject(arg1);
1463
+ const ret = typeof obj === "number" ? obj : undefined;
1464
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
1465
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
1466
+ };
1467
+
1468
+ module.exports.__wbindgen_number_new = function (arg0) {
1469
+ const ret = arg0;
1470
+ return addHeapObject(ret);
1128
1471
  };
1129
1472
 
1130
- module.exports.__wbindgen_closure_wrapper1630 = function (arg0, arg1, arg2) {
1131
- const ret = makeMutClosure(arg0, arg1, 434, __wbg_adapter_38);
1473
+ module.exports.__wbindgen_object_clone_ref = function (arg0) {
1474
+ const ret = getObject(arg0);
1132
1475
  return addHeapObject(ret);
1133
1476
  };
1134
1477
 
1478
+ module.exports.__wbindgen_object_drop_ref = function (arg0) {
1479
+ takeObject(arg0);
1480
+ };
1481
+
1482
+ module.exports.__wbindgen_string_get = function (arg0, arg1) {
1483
+ const obj = getObject(arg1);
1484
+ const ret = typeof obj === "string" ? obj : undefined;
1485
+ var ptr1 = isLikeNone(ret)
1486
+ ? 0
1487
+ : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1488
+ var len1 = WASM_VECTOR_LEN;
1489
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1490
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1491
+ };
1492
+
1493
+ module.exports.__wbindgen_string_new = function (arg0, arg1) {
1494
+ const ret = getStringFromWasm0(arg0, arg1);
1495
+ return addHeapObject(ret);
1496
+ };
1497
+
1498
+ module.exports.__wbindgen_throw = function (arg0, arg1) {
1499
+ throw new Error(getStringFromWasm0(arg0, arg1));
1500
+ };
1501
+
1135
1502
  const path = require("path").join(__dirname, "bitwarden_wasm_internal_bg.wasm");
1136
1503
  const bytes = require("fs").readFileSync(path);
1137
1504