@swc/wasm-web 1.3.18 → 1.3.20
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/package.json +1 -1
- package/wasm-web.d.ts +49 -44
- package/wasm-web.js +331 -69
- package/wasm-web_bg.wasm +0 -0
package/package.json
CHANGED
package/wasm-web.d.ts
CHANGED
|
@@ -1,6 +1,42 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
|
|
4
|
+
export function minify(src: string, opts?: JsMinifyOptions): Promise<Output>;
|
|
5
|
+
export function minifySync(code: string, opts?: JsMinifyOptions): Output;
|
|
6
|
+
|
|
7
|
+
export function parse(src: string, options: ParseOptions & {
|
|
8
|
+
isModule: false;
|
|
9
|
+
}): Promise<Script>;
|
|
10
|
+
export function parse(src: string, options?: ParseOptions): Promise<Module>;
|
|
11
|
+
export function parseSync(src: string, options: ParseOptions & {
|
|
12
|
+
isModule: false;
|
|
13
|
+
}): Script;
|
|
14
|
+
export function parseSync(src: string, options?: ParseOptions): Module;
|
|
15
|
+
|
|
16
|
+
export function print(m: Program, options?: Options): Promise<Output>;
|
|
17
|
+
export function printSync(m: Program, options?: Options): Output
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Note: this interface currently does not do _actual_ async work, only provides
|
|
21
|
+
* a corresponding async interfaces to the `@swc/core`'s interface.
|
|
22
|
+
*/
|
|
23
|
+
export function transform(
|
|
24
|
+
code: string | Program,
|
|
25
|
+
options?: Options,
|
|
26
|
+
experimental_plugin_bytes_resolver?: any
|
|
27
|
+
): Promise<Output>;
|
|
28
|
+
/**
|
|
29
|
+
* @param {string} code
|
|
30
|
+
* @param {Options} opts
|
|
31
|
+
* @param {Record<string, ArrayBuffer>} experimental_plugin_bytes_resolver An object contains bytes array for the plugin
|
|
32
|
+
* specified in config. Key of record represents the name of the plugin specified in config. Note this is an experimental
|
|
33
|
+
* interface, likely will change.
|
|
34
|
+
* @returns {Output}
|
|
35
|
+
*/
|
|
36
|
+
export function transformSync(code: string | Program, opts?: Options, experimental_plugin_bytes_resolver?: any): Output;
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
4
40
|
export interface Plugin {
|
|
5
41
|
(module: Program): Program;
|
|
6
42
|
}
|
|
@@ -353,11 +389,11 @@ export interface TerserCompressOptions {
|
|
|
353
389
|
export interface TerserMangleOptions {
|
|
354
390
|
props?: TerserManglePropertiesOptions,
|
|
355
391
|
|
|
356
|
-
|
|
392
|
+
toplevel?: boolean,
|
|
357
393
|
|
|
358
|
-
|
|
394
|
+
keep_classnames?: boolean,
|
|
359
395
|
|
|
360
|
-
|
|
396
|
+
keep_fnames?: boolean,
|
|
361
397
|
|
|
362
398
|
keep_private_props?: boolean,
|
|
363
399
|
|
|
@@ -667,7 +703,7 @@ export interface JscConfig {
|
|
|
667
703
|
baseUrl?: string
|
|
668
704
|
|
|
669
705
|
paths?: {
|
|
670
|
-
[from: string]: [
|
|
706
|
+
[from: string]: string[]
|
|
671
707
|
}
|
|
672
708
|
|
|
673
709
|
minify?: JsMinifyOptions;
|
|
@@ -896,7 +932,7 @@ export interface GlobalPassOption {
|
|
|
896
932
|
envs?: string[];
|
|
897
933
|
}
|
|
898
934
|
|
|
899
|
-
export type ModuleConfig = Es6Config | CommonJsConfig | UmdConfig | AmdConfig | NodeNextConfig;
|
|
935
|
+
export type ModuleConfig = Es6Config | CommonJsConfig | UmdConfig | AmdConfig | NodeNextConfig | SystemjsConfig;
|
|
900
936
|
|
|
901
937
|
export interface BaseModuleConfig {
|
|
902
938
|
/**
|
|
@@ -1057,6 +1093,8 @@ export interface BaseModuleConfig {
|
|
|
1057
1093
|
* If set to true, dynamic imports will be preserved.
|
|
1058
1094
|
*/
|
|
1059
1095
|
ignoreDynamic?: boolean;
|
|
1096
|
+
allowTopLevelThis?: boolean;
|
|
1097
|
+
preserveImportMeta?: boolean;
|
|
1060
1098
|
}
|
|
1061
1099
|
|
|
1062
1100
|
export interface Es6Config extends BaseModuleConfig {
|
|
@@ -1080,7 +1118,10 @@ export interface AmdConfig extends BaseModuleConfig {
|
|
|
1080
1118
|
type: "amd";
|
|
1081
1119
|
moduleId?: string;
|
|
1082
1120
|
}
|
|
1083
|
-
|
|
1121
|
+
export interface SystemjsConfig {
|
|
1122
|
+
type: "systemjs";
|
|
1123
|
+
allowTopLevelThis?: boolean;
|
|
1124
|
+
}
|
|
1084
1125
|
export interface Output {
|
|
1085
1126
|
/**
|
|
1086
1127
|
* Transformed code
|
|
@@ -2790,42 +2831,6 @@ export interface Invalid extends Node, HasSpan {
|
|
|
2790
2831
|
|
|
2791
2832
|
|
|
2792
2833
|
|
|
2793
|
-
export function minify(src: string, opts?: JsMinifyOptions): Promise<Output>;
|
|
2794
|
-
export function minifySync(code: string, opts?: JsMinifyOptions): Output;
|
|
2795
|
-
|
|
2796
|
-
export function parse(src: string, options: ParseOptions & {
|
|
2797
|
-
isModule: false;
|
|
2798
|
-
}): Promise<Script>;
|
|
2799
|
-
export function parse(src: string, options?: ParseOptions): Promise<Module>;
|
|
2800
|
-
export function parseSync(src: string, options: ParseOptions & {
|
|
2801
|
-
isModule: false;
|
|
2802
|
-
}): Script;
|
|
2803
|
-
export function parseSync(src: string, options?: ParseOptions): Module;
|
|
2804
|
-
|
|
2805
|
-
export function print(m: Program, options?: Options): Promise<Output>;
|
|
2806
|
-
export function printSync(m: Program, options?: Options): Output
|
|
2807
|
-
|
|
2808
|
-
/**
|
|
2809
|
-
* Note: this interface currently does not do _actual_ async work, only provides
|
|
2810
|
-
* a corresponding async interfaces to the `@swc/core`'s interface.
|
|
2811
|
-
*/
|
|
2812
|
-
export function transform(
|
|
2813
|
-
code: string | Program,
|
|
2814
|
-
options?: Options,
|
|
2815
|
-
experimental_plugin_bytes_resolver?: any
|
|
2816
|
-
): Promise<Output>;
|
|
2817
|
-
/**
|
|
2818
|
-
* @param {string} code
|
|
2819
|
-
* @param {Options} opts
|
|
2820
|
-
* @param {Record<string, ArrayBuffer>} experimental_plugin_bytes_resolver An object contains bytes array for the plugin
|
|
2821
|
-
* specified in config. Key of record represents the name of the plugin specified in config. Note this is an experimental
|
|
2822
|
-
* interface, likely will change.
|
|
2823
|
-
* @returns {Output}
|
|
2824
|
-
*/
|
|
2825
|
-
export function transformSync(code: string | Program, opts?: Options, experimental_plugin_bytes_resolver?: any): Output;
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
2834
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
2830
2835
|
|
|
2831
2836
|
export interface InitOutput {
|
|
@@ -2834,10 +2839,10 @@ export interface InitOutput {
|
|
|
2834
2839
|
readonly minify: (a: number, b: number) => number;
|
|
2835
2840
|
readonly parseSync: (a: number, b: number, c: number) => void;
|
|
2836
2841
|
readonly parse: (a: number, b: number) => number;
|
|
2837
|
-
readonly transformSync: (a: number, b: number, c: number, d: number) => void;
|
|
2838
|
-
readonly transform: (a: number, b: number, c: number) => number;
|
|
2839
2842
|
readonly printSync: (a: number, b: number, c: number) => void;
|
|
2840
2843
|
readonly print: (a: number, b: number) => number;
|
|
2844
|
+
readonly transformSync: (a: number, b: number, c: number, d: number) => void;
|
|
2845
|
+
readonly transform: (a: number, b: number, c: number) => number;
|
|
2841
2846
|
readonly __wbindgen_export_0: (a: number) => number;
|
|
2842
2847
|
readonly __wbindgen_export_1: (a: number, b: number, c: number) => number;
|
|
2843
2848
|
readonly __wbindgen_export_2: WebAssembly.Table;
|
package/wasm-web.js
CHANGED
|
@@ -1,14 +1,40 @@
|
|
|
1
1
|
|
|
2
2
|
let wasm;
|
|
3
3
|
|
|
4
|
+
const cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
5
|
+
|
|
6
|
+
cachedTextDecoder.decode();
|
|
7
|
+
|
|
8
|
+
let cachedUint8Memory0 = new Uint8Array();
|
|
9
|
+
|
|
10
|
+
function getUint8Memory0() {
|
|
11
|
+
if (cachedUint8Memory0.byteLength === 0) {
|
|
12
|
+
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
13
|
+
}
|
|
14
|
+
return cachedUint8Memory0;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function getStringFromWasm0(ptr, len) {
|
|
18
|
+
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
19
|
+
}
|
|
20
|
+
|
|
4
21
|
const heap = new Array(32).fill(undefined);
|
|
5
22
|
|
|
6
23
|
heap.push(undefined, null, true, false);
|
|
7
24
|
|
|
8
|
-
function getObject(idx) { return heap[idx]; }
|
|
9
|
-
|
|
10
25
|
let heap_next = heap.length;
|
|
11
26
|
|
|
27
|
+
function addHeapObject(obj) {
|
|
28
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
29
|
+
const idx = heap_next;
|
|
30
|
+
heap_next = heap[idx];
|
|
31
|
+
|
|
32
|
+
heap[idx] = obj;
|
|
33
|
+
return idx;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function getObject(idx) { return heap[idx]; }
|
|
37
|
+
|
|
12
38
|
function dropObject(idx) {
|
|
13
39
|
if (idx < 36) return;
|
|
14
40
|
heap[idx] = heap_next;
|
|
@@ -23,15 +49,6 @@ function takeObject(idx) {
|
|
|
23
49
|
|
|
24
50
|
let WASM_VECTOR_LEN = 0;
|
|
25
51
|
|
|
26
|
-
let cachedUint8Memory0 = new Uint8Array();
|
|
27
|
-
|
|
28
|
-
function getUint8Memory0() {
|
|
29
|
-
if (cachedUint8Memory0.byteLength === 0) {
|
|
30
|
-
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
31
|
-
}
|
|
32
|
-
return cachedUint8Memory0;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
52
|
const cachedTextEncoder = new TextEncoder('utf-8');
|
|
36
53
|
|
|
37
54
|
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
@@ -98,21 +115,87 @@ function getInt32Memory0() {
|
|
|
98
115
|
return cachedInt32Memory0;
|
|
99
116
|
}
|
|
100
117
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
cachedTextDecoder.decode();
|
|
118
|
+
let cachedBigInt64Memory0 = new BigInt64Array();
|
|
104
119
|
|
|
105
|
-
function
|
|
106
|
-
|
|
120
|
+
function getBigInt64Memory0() {
|
|
121
|
+
if (cachedBigInt64Memory0.byteLength === 0) {
|
|
122
|
+
cachedBigInt64Memory0 = new BigInt64Array(wasm.memory.buffer);
|
|
123
|
+
}
|
|
124
|
+
return cachedBigInt64Memory0;
|
|
107
125
|
}
|
|
108
126
|
|
|
109
|
-
|
|
110
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
111
|
-
const idx = heap_next;
|
|
112
|
-
heap_next = heap[idx];
|
|
127
|
+
let cachedFloat64Memory0 = new Float64Array();
|
|
113
128
|
|
|
114
|
-
|
|
115
|
-
|
|
129
|
+
function getFloat64Memory0() {
|
|
130
|
+
if (cachedFloat64Memory0.byteLength === 0) {
|
|
131
|
+
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
132
|
+
}
|
|
133
|
+
return cachedFloat64Memory0;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function debugString(val) {
|
|
137
|
+
// primitive types
|
|
138
|
+
const type = typeof val;
|
|
139
|
+
if (type == 'number' || type == 'boolean' || val == null) {
|
|
140
|
+
return `${val}`;
|
|
141
|
+
}
|
|
142
|
+
if (type == 'string') {
|
|
143
|
+
return `"${val}"`;
|
|
144
|
+
}
|
|
145
|
+
if (type == 'symbol') {
|
|
146
|
+
const description = val.description;
|
|
147
|
+
if (description == null) {
|
|
148
|
+
return 'Symbol';
|
|
149
|
+
} else {
|
|
150
|
+
return `Symbol(${description})`;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
if (type == 'function') {
|
|
154
|
+
const name = val.name;
|
|
155
|
+
if (typeof name == 'string' && name.length > 0) {
|
|
156
|
+
return `Function(${name})`;
|
|
157
|
+
} else {
|
|
158
|
+
return 'Function';
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
// objects
|
|
162
|
+
if (Array.isArray(val)) {
|
|
163
|
+
const length = val.length;
|
|
164
|
+
let debug = '[';
|
|
165
|
+
if (length > 0) {
|
|
166
|
+
debug += debugString(val[0]);
|
|
167
|
+
}
|
|
168
|
+
for(let i = 1; i < length; i++) {
|
|
169
|
+
debug += ', ' + debugString(val[i]);
|
|
170
|
+
}
|
|
171
|
+
debug += ']';
|
|
172
|
+
return debug;
|
|
173
|
+
}
|
|
174
|
+
// Test for built-in
|
|
175
|
+
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
176
|
+
let className;
|
|
177
|
+
if (builtInMatches.length > 1) {
|
|
178
|
+
className = builtInMatches[1];
|
|
179
|
+
} else {
|
|
180
|
+
// Failed to match the standard '[object ClassName]'
|
|
181
|
+
return toString.call(val);
|
|
182
|
+
}
|
|
183
|
+
if (className == 'Object') {
|
|
184
|
+
// we're a user defined class or Object
|
|
185
|
+
// JSON.stringify avoids problems with cycles, and is generally much
|
|
186
|
+
// easier than looping through ownProperties of `val`.
|
|
187
|
+
try {
|
|
188
|
+
return 'Object(' + JSON.stringify(val) + ')';
|
|
189
|
+
} catch (_) {
|
|
190
|
+
return 'Object';
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
// errors
|
|
194
|
+
if (val instanceof Error) {
|
|
195
|
+
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
196
|
+
}
|
|
197
|
+
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
198
|
+
return className;
|
|
116
199
|
}
|
|
117
200
|
|
|
118
201
|
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
@@ -139,7 +222,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
139
222
|
|
|
140
223
|
return real;
|
|
141
224
|
}
|
|
142
|
-
function
|
|
225
|
+
function __wbg_adapter_50(arg0, arg1, arg2) {
|
|
143
226
|
wasm.__wbindgen_export_3(arg0, arg1, addHeapObject(arg2));
|
|
144
227
|
}
|
|
145
228
|
|
|
@@ -208,13 +291,12 @@ export function parse(s, opts) {
|
|
|
208
291
|
/**
|
|
209
292
|
* @param {any} s
|
|
210
293
|
* @param {any} opts
|
|
211
|
-
* @param {any} experimental_plugin_bytes_resolver
|
|
212
294
|
* @returns {any}
|
|
213
295
|
*/
|
|
214
|
-
export function
|
|
296
|
+
export function printSync(s, opts) {
|
|
215
297
|
try {
|
|
216
298
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
217
|
-
wasm.
|
|
299
|
+
wasm.printSync(retptr, addHeapObject(s), addHeapObject(opts));
|
|
218
300
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
219
301
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
220
302
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -230,23 +312,23 @@ export function transformSync(s, opts, experimental_plugin_bytes_resolver) {
|
|
|
230
312
|
/**
|
|
231
313
|
* @param {any} s
|
|
232
314
|
* @param {any} opts
|
|
233
|
-
* @param {any} experimental_plugin_bytes_resolver
|
|
234
315
|
* @returns {Promise<any>}
|
|
235
316
|
*/
|
|
236
|
-
export function
|
|
237
|
-
const ret = wasm.
|
|
317
|
+
export function print(s, opts) {
|
|
318
|
+
const ret = wasm.print(addHeapObject(s), addHeapObject(opts));
|
|
238
319
|
return takeObject(ret);
|
|
239
320
|
}
|
|
240
321
|
|
|
241
322
|
/**
|
|
242
323
|
* @param {any} s
|
|
243
324
|
* @param {any} opts
|
|
325
|
+
* @param {any} experimental_plugin_bytes_resolver
|
|
244
326
|
* @returns {any}
|
|
245
327
|
*/
|
|
246
|
-
export function
|
|
328
|
+
export function transformSync(s, opts, experimental_plugin_bytes_resolver) {
|
|
247
329
|
try {
|
|
248
330
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
249
|
-
wasm.
|
|
331
|
+
wasm.transformSync(retptr, addHeapObject(s), addHeapObject(opts), addHeapObject(experimental_plugin_bytes_resolver));
|
|
250
332
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
251
333
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
252
334
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -262,10 +344,11 @@ export function printSync(s, opts) {
|
|
|
262
344
|
/**
|
|
263
345
|
* @param {any} s
|
|
264
346
|
* @param {any} opts
|
|
347
|
+
* @param {any} experimental_plugin_bytes_resolver
|
|
265
348
|
* @returns {Promise<any>}
|
|
266
349
|
*/
|
|
267
|
-
export function
|
|
268
|
-
const ret = wasm.
|
|
350
|
+
export function transform(s, opts, experimental_plugin_bytes_resolver) {
|
|
351
|
+
const ret = wasm.transform(addHeapObject(s), addHeapObject(opts), addHeapObject(experimental_plugin_bytes_resolver));
|
|
269
352
|
return takeObject(ret);
|
|
270
353
|
}
|
|
271
354
|
|
|
@@ -284,7 +367,7 @@ function handleError(f, args) {
|
|
|
284
367
|
wasm.__wbindgen_export_5(addHeapObject(e));
|
|
285
368
|
}
|
|
286
369
|
}
|
|
287
|
-
function
|
|
370
|
+
function __wbg_adapter_107(arg0, arg1, arg2, arg3) {
|
|
288
371
|
wasm.__wbindgen_export_6(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
289
372
|
}
|
|
290
373
|
|
|
@@ -322,39 +405,47 @@ async function load(module, imports) {
|
|
|
322
405
|
function getImports() {
|
|
323
406
|
const imports = {};
|
|
324
407
|
imports.wbg = {};
|
|
408
|
+
imports.wbg.__wbg_new_0b9bfdd97583284e = function() {
|
|
409
|
+
const ret = new Object();
|
|
410
|
+
return addHeapObject(ret);
|
|
411
|
+
};
|
|
412
|
+
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
413
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
414
|
+
return addHeapObject(ret);
|
|
415
|
+
};
|
|
416
|
+
imports.wbg.__wbg_set_20cbc34131e76824 = function(arg0, arg1, arg2) {
|
|
417
|
+
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
418
|
+
};
|
|
325
419
|
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
326
420
|
takeObject(arg0);
|
|
327
421
|
};
|
|
328
|
-
imports.wbg.
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
var cb0 = (arg0, arg1) => {
|
|
332
|
-
const a = state0.a;
|
|
333
|
-
state0.a = 0;
|
|
334
|
-
try {
|
|
335
|
-
return __wbg_adapter_45(a, state0.b, arg0, arg1);
|
|
336
|
-
} finally {
|
|
337
|
-
state0.a = a;
|
|
338
|
-
}
|
|
339
|
-
};
|
|
340
|
-
const ret = new Promise(cb0);
|
|
341
|
-
return addHeapObject(ret);
|
|
342
|
-
} finally {
|
|
343
|
-
state0.a = state0.b = 0;
|
|
344
|
-
}
|
|
422
|
+
imports.wbg.__wbindgen_number_new = function(arg0) {
|
|
423
|
+
const ret = arg0;
|
|
424
|
+
return addHeapObject(ret);
|
|
345
425
|
};
|
|
346
|
-
imports.wbg.
|
|
347
|
-
const ret =
|
|
348
|
-
return ret;
|
|
426
|
+
imports.wbg.__wbg_new_1d9a920c6bfc44a8 = function() {
|
|
427
|
+
const ret = new Array();
|
|
428
|
+
return addHeapObject(ret);
|
|
349
429
|
};
|
|
350
|
-
imports.wbg.
|
|
351
|
-
|
|
352
|
-
|
|
430
|
+
imports.wbg.__wbg_set_a68214f35c417fa9 = function(arg0, arg1, arg2) {
|
|
431
|
+
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
432
|
+
};
|
|
433
|
+
imports.wbg.__wbg_set_933729cf5b66ac11 = function(arg0, arg1, arg2) {
|
|
434
|
+
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
|
435
|
+
return addHeapObject(ret);
|
|
353
436
|
};
|
|
354
437
|
imports.wbg.__wbindgen_is_string = function(arg0) {
|
|
355
438
|
const ret = typeof(getObject(arg0)) === 'string';
|
|
356
439
|
return ret;
|
|
357
440
|
};
|
|
441
|
+
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
|
442
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
443
|
+
return addHeapObject(ret);
|
|
444
|
+
};
|
|
445
|
+
imports.wbg.__wbg_new_268f7b7dd3430798 = function() {
|
|
446
|
+
const ret = new Map();
|
|
447
|
+
return addHeapObject(ret);
|
|
448
|
+
};
|
|
358
449
|
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
359
450
|
const obj = getObject(arg1);
|
|
360
451
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
@@ -363,26 +454,122 @@ function getImports() {
|
|
|
363
454
|
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
364
455
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
365
456
|
};
|
|
366
|
-
imports.wbg.
|
|
457
|
+
imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
|
|
458
|
+
const ret = getObject(arg0) == getObject(arg1);
|
|
459
|
+
return ret;
|
|
460
|
+
};
|
|
461
|
+
imports.wbg.__wbindgen_is_object = function(arg0) {
|
|
462
|
+
const val = getObject(arg0);
|
|
463
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
464
|
+
return ret;
|
|
465
|
+
};
|
|
466
|
+
imports.wbg.__wbg_entries_65a76a413fc91037 = function(arg0) {
|
|
467
|
+
const ret = Object.entries(getObject(arg0));
|
|
468
|
+
return addHeapObject(ret);
|
|
469
|
+
};
|
|
470
|
+
imports.wbg.__wbg_length_6e3bbe7c8bd4dbd8 = function(arg0) {
|
|
471
|
+
const ret = getObject(arg0).length;
|
|
472
|
+
return ret;
|
|
473
|
+
};
|
|
474
|
+
imports.wbg.__wbg_get_57245cc7d7c7619d = function(arg0, arg1) {
|
|
475
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
|
476
|
+
return addHeapObject(ret);
|
|
477
|
+
};
|
|
478
|
+
imports.wbg.__wbg_getwithrefkey_15c62c2b8546208d = function(arg0, arg1) {
|
|
479
|
+
const ret = getObject(arg0)[getObject(arg1)];
|
|
480
|
+
return addHeapObject(ret);
|
|
481
|
+
};
|
|
482
|
+
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
|
483
|
+
const ret = getObject(arg0) === undefined;
|
|
484
|
+
return ret;
|
|
485
|
+
};
|
|
486
|
+
imports.wbg.__wbindgen_in = function(arg0, arg1) {
|
|
487
|
+
const ret = getObject(arg0) in getObject(arg1);
|
|
488
|
+
return ret;
|
|
489
|
+
};
|
|
490
|
+
imports.wbg.__wbindgen_boolean_get = function(arg0) {
|
|
491
|
+
const v = getObject(arg0);
|
|
492
|
+
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
493
|
+
return ret;
|
|
494
|
+
};
|
|
495
|
+
imports.wbg.__wbindgen_is_bigint = function(arg0) {
|
|
496
|
+
const ret = typeof(getObject(arg0)) === 'bigint';
|
|
497
|
+
return ret;
|
|
498
|
+
};
|
|
499
|
+
imports.wbg.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
|
|
500
|
+
const v = getObject(arg1);
|
|
501
|
+
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
502
|
+
getBigInt64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0n : ret;
|
|
503
|
+
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
504
|
+
};
|
|
505
|
+
imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {
|
|
506
|
+
const ret = arg0;
|
|
507
|
+
return addHeapObject(ret);
|
|
508
|
+
};
|
|
509
|
+
imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
|
|
510
|
+
const ret = getObject(arg0) === getObject(arg1);
|
|
511
|
+
return ret;
|
|
512
|
+
};
|
|
513
|
+
imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
|
|
367
514
|
const obj = getObject(arg1);
|
|
368
|
-
const ret =
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
515
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
516
|
+
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
|
|
517
|
+
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
518
|
+
};
|
|
519
|
+
imports.wbg.__wbg_isSafeInteger_dfa0593e8d7ac35a = function(arg0) {
|
|
520
|
+
const ret = Number.isSafeInteger(getObject(arg0));
|
|
521
|
+
return ret;
|
|
522
|
+
};
|
|
523
|
+
imports.wbg.__wbg_isArray_27c46c67f498e15d = function(arg0) {
|
|
524
|
+
const ret = Array.isArray(getObject(arg0));
|
|
525
|
+
return ret;
|
|
526
|
+
};
|
|
527
|
+
imports.wbg.__wbg_iterator_6f9d4f28845f426c = function() {
|
|
528
|
+
const ret = Symbol.iterator;
|
|
529
|
+
return addHeapObject(ret);
|
|
373
530
|
};
|
|
374
|
-
imports.wbg.
|
|
375
|
-
const ret =
|
|
531
|
+
imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
532
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
376
533
|
return addHeapObject(ret);
|
|
377
534
|
};
|
|
378
535
|
imports.wbg.__wbg_call_168da88779e35f61 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
379
536
|
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
380
537
|
return addHeapObject(ret);
|
|
381
538
|
}, arguments) };
|
|
382
|
-
imports.wbg.
|
|
383
|
-
const ret =
|
|
539
|
+
imports.wbg.__wbindgen_is_null = function(arg0) {
|
|
540
|
+
const ret = getObject(arg0) === null;
|
|
541
|
+
return ret;
|
|
542
|
+
};
|
|
543
|
+
imports.wbg.__wbg_next_aaef7c8aa5e212ac = function() { return handleError(function (arg0) {
|
|
544
|
+
const ret = getObject(arg0).next();
|
|
545
|
+
return addHeapObject(ret);
|
|
546
|
+
}, arguments) };
|
|
547
|
+
imports.wbg.__wbg_done_1b73b0672e15f234 = function(arg0) {
|
|
548
|
+
const ret = getObject(arg0).done;
|
|
549
|
+
return ret;
|
|
550
|
+
};
|
|
551
|
+
imports.wbg.__wbg_value_1ccc36bc03462d71 = function(arg0) {
|
|
552
|
+
const ret = getObject(arg0).value;
|
|
384
553
|
return addHeapObject(ret);
|
|
385
554
|
};
|
|
555
|
+
imports.wbg.__wbg_new_9962f939219f1820 = function(arg0, arg1) {
|
|
556
|
+
try {
|
|
557
|
+
var state0 = {a: arg0, b: arg1};
|
|
558
|
+
var cb0 = (arg0, arg1) => {
|
|
559
|
+
const a = state0.a;
|
|
560
|
+
state0.a = 0;
|
|
561
|
+
try {
|
|
562
|
+
return __wbg_adapter_107(a, state0.b, arg0, arg1);
|
|
563
|
+
} finally {
|
|
564
|
+
state0.a = a;
|
|
565
|
+
}
|
|
566
|
+
};
|
|
567
|
+
const ret = new Promise(cb0);
|
|
568
|
+
return addHeapObject(ret);
|
|
569
|
+
} finally {
|
|
570
|
+
state0.a = state0.b = 0;
|
|
571
|
+
}
|
|
572
|
+
};
|
|
386
573
|
imports.wbg.__wbg_new0_a57059d72c5b7aee = function() {
|
|
387
574
|
const ret = new Date();
|
|
388
575
|
return addHeapObject(ret);
|
|
@@ -411,6 +598,79 @@ function getImports() {
|
|
|
411
598
|
if (arg0 !== 0) { wasm.__wbindgen_export_4(arg0, arg1); }
|
|
412
599
|
console.error(v0);
|
|
413
600
|
};
|
|
601
|
+
imports.wbg.__wbg_get_765201544a2b6869 = function() { return handleError(function (arg0, arg1) {
|
|
602
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
603
|
+
return addHeapObject(ret);
|
|
604
|
+
}, arguments) };
|
|
605
|
+
imports.wbg.__wbindgen_is_function = function(arg0) {
|
|
606
|
+
const ret = typeof(getObject(arg0)) === 'function';
|
|
607
|
+
return ret;
|
|
608
|
+
};
|
|
609
|
+
imports.wbg.__wbg_call_97ae9d8645dc388b = function() { return handleError(function (arg0, arg1) {
|
|
610
|
+
const ret = getObject(arg0).call(getObject(arg1));
|
|
611
|
+
return addHeapObject(ret);
|
|
612
|
+
}, arguments) };
|
|
613
|
+
imports.wbg.__wbg_next_579e583d33566a86 = function(arg0) {
|
|
614
|
+
const ret = getObject(arg0).next;
|
|
615
|
+
return addHeapObject(ret);
|
|
616
|
+
};
|
|
617
|
+
imports.wbg.__wbg_length_9e1ae1900cb0fbd5 = function(arg0) {
|
|
618
|
+
const ret = getObject(arg0).length;
|
|
619
|
+
return ret;
|
|
620
|
+
};
|
|
621
|
+
imports.wbg.__wbindgen_memory = function() {
|
|
622
|
+
const ret = wasm.memory;
|
|
623
|
+
return addHeapObject(ret);
|
|
624
|
+
};
|
|
625
|
+
imports.wbg.__wbg_buffer_3f3d764d4747d564 = function(arg0) {
|
|
626
|
+
const ret = getObject(arg0).buffer;
|
|
627
|
+
return addHeapObject(ret);
|
|
628
|
+
};
|
|
629
|
+
imports.wbg.__wbg_new_8c3f0052272a457a = function(arg0) {
|
|
630
|
+
const ret = new Uint8Array(getObject(arg0));
|
|
631
|
+
return addHeapObject(ret);
|
|
632
|
+
};
|
|
633
|
+
imports.wbg.__wbg_set_83db9690f9353e79 = function(arg0, arg1, arg2) {
|
|
634
|
+
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
635
|
+
};
|
|
636
|
+
imports.wbg.__wbg_instanceof_Uint8Array_971eeda69eb75003 = function(arg0) {
|
|
637
|
+
let result;
|
|
638
|
+
try {
|
|
639
|
+
result = getObject(arg0) instanceof Uint8Array;
|
|
640
|
+
} catch {
|
|
641
|
+
result = false;
|
|
642
|
+
}
|
|
643
|
+
const ret = result;
|
|
644
|
+
return ret;
|
|
645
|
+
};
|
|
646
|
+
imports.wbg.__wbg_instanceof_ArrayBuffer_e5e48f4762c5610b = function(arg0) {
|
|
647
|
+
let result;
|
|
648
|
+
try {
|
|
649
|
+
result = getObject(arg0) instanceof ArrayBuffer;
|
|
650
|
+
} catch {
|
|
651
|
+
result = false;
|
|
652
|
+
}
|
|
653
|
+
const ret = result;
|
|
654
|
+
return ret;
|
|
655
|
+
};
|
|
656
|
+
imports.wbg.__wbg_String_91fba7ded13ba54c = function(arg0, arg1) {
|
|
657
|
+
const ret = String(getObject(arg1));
|
|
658
|
+
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
659
|
+
const len0 = WASM_VECTOR_LEN;
|
|
660
|
+
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
661
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
662
|
+
};
|
|
663
|
+
imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
|
|
664
|
+
const ret = getObject(arg0);
|
|
665
|
+
return addHeapObject(ret);
|
|
666
|
+
};
|
|
667
|
+
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
668
|
+
const ret = debugString(getObject(arg1));
|
|
669
|
+
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
670
|
+
const len0 = WASM_VECTOR_LEN;
|
|
671
|
+
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
672
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
673
|
+
};
|
|
414
674
|
imports.wbg.__wbindgen_throw = function(arg0, arg1) {
|
|
415
675
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
416
676
|
};
|
|
@@ -431,8 +691,8 @@ imports.wbg.__wbg_then_11f7a54d67b4bfad = function(arg0, arg1) {
|
|
|
431
691
|
const ret = getObject(arg0).then(getObject(arg1));
|
|
432
692
|
return addHeapObject(ret);
|
|
433
693
|
};
|
|
434
|
-
imports.wbg.
|
|
435
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
694
|
+
imports.wbg.__wbindgen_closure_wrapper18940 = function(arg0, arg1, arg2) {
|
|
695
|
+
const ret = makeMutClosure(arg0, arg1, 226, __wbg_adapter_50);
|
|
436
696
|
return addHeapObject(ret);
|
|
437
697
|
};
|
|
438
698
|
|
|
@@ -446,6 +706,8 @@ function initMemory(imports, maybe_memory) {
|
|
|
446
706
|
function finalizeInit(instance, module) {
|
|
447
707
|
wasm = instance.exports;
|
|
448
708
|
init.__wbindgen_wasm_module = module;
|
|
709
|
+
cachedBigInt64Memory0 = new BigInt64Array();
|
|
710
|
+
cachedFloat64Memory0 = new Float64Array();
|
|
449
711
|
cachedInt32Memory0 = new Int32Array();
|
|
450
712
|
cachedUint8Memory0 = new Uint8Array();
|
|
451
713
|
|
package/wasm-web_bg.wasm
CHANGED
|
Binary file
|