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