libchai 0.3.6 → 0.3.8
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/chai.d.ts +40 -36
- package/chai.js +556 -566
- package/chai_bg.wasm +0 -0
- package/package.json +1 -1
package/chai.d.ts
CHANGED
|
@@ -1,55 +1,59 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
|
|
4
|
-
* 用于在图形界面验证输入的配置是否正确
|
|
5
|
-
*/
|
|
6
|
-
export function validate(js_config: any): any;
|
|
3
|
+
|
|
7
4
|
/**
|
|
8
5
|
* 通过图形界面来使用 libchai 的入口,实现了界面特征
|
|
9
6
|
*/
|
|
10
7
|
export class Web {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
private constructor();
|
|
9
|
+
free(): void;
|
|
10
|
+
[Symbol.dispose](): void;
|
|
11
|
+
encode_evaluate(前端目标函数配置: any): any;
|
|
12
|
+
static new(回调: Function): Web;
|
|
13
|
+
optimize(): any;
|
|
14
|
+
sync(前端参数: any): void;
|
|
17
15
|
}
|
|
18
16
|
|
|
17
|
+
/**
|
|
18
|
+
* 用于在图形界面验证输入的配置是否正确
|
|
19
|
+
*/
|
|
20
|
+
export function validate(js_config: any): any;
|
|
21
|
+
|
|
19
22
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
20
23
|
|
|
21
24
|
export interface InitOutput {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
25
|
+
readonly memory: WebAssembly.Memory;
|
|
26
|
+
readonly __wbg_web_free: (a: number, b: number) => void;
|
|
27
|
+
readonly validate: (a: number, b: number) => void;
|
|
28
|
+
readonly web_encode_evaluate: (a: number, b: number, c: number) => void;
|
|
29
|
+
readonly web_new: (a: number) => number;
|
|
30
|
+
readonly web_optimize: (a: number, b: number) => void;
|
|
31
|
+
readonly web_sync: (a: number, b: number, c: number) => void;
|
|
32
|
+
readonly __wbindgen_export: (a: number, b: number) => number;
|
|
33
|
+
readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
34
|
+
readonly __wbindgen_export3: (a: number) => void;
|
|
35
|
+
readonly __wbindgen_export4: (a: number, b: number, c: number) => void;
|
|
36
|
+
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
34
37
|
}
|
|
35
38
|
|
|
36
39
|
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
40
|
+
|
|
37
41
|
/**
|
|
38
|
-
* Instantiates the given `module`, which can either be bytes or
|
|
39
|
-
* a precompiled `WebAssembly.Module`.
|
|
40
|
-
*
|
|
41
|
-
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
42
|
-
*
|
|
43
|
-
* @returns {InitOutput}
|
|
44
|
-
*/
|
|
42
|
+
* Instantiates the given `module`, which can either be bytes or
|
|
43
|
+
* a precompiled `WebAssembly.Module`.
|
|
44
|
+
*
|
|
45
|
+
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
46
|
+
*
|
|
47
|
+
* @returns {InitOutput}
|
|
48
|
+
*/
|
|
45
49
|
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
46
50
|
|
|
47
51
|
/**
|
|
48
|
-
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
49
|
-
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
50
|
-
*
|
|
51
|
-
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
52
|
-
*
|
|
53
|
-
* @returns {Promise<InitOutput>}
|
|
54
|
-
*/
|
|
52
|
+
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
53
|
+
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
54
|
+
*
|
|
55
|
+
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
56
|
+
*
|
|
57
|
+
* @returns {Promise<InitOutput>}
|
|
58
|
+
*/
|
|
55
59
|
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|
package/chai.js
CHANGED
|
@@ -1,86 +1,440 @@
|
|
|
1
|
-
|
|
1
|
+
/* @ts-self-types="./chai.d.ts" */
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
function getUint8ArrayMemory0() {
|
|
14
|
-
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
15
|
-
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
3
|
+
/**
|
|
4
|
+
* 通过图形界面来使用 libchai 的入口,实现了界面特征
|
|
5
|
+
*/
|
|
6
|
+
export class Web {
|
|
7
|
+
static __wrap(ptr) {
|
|
8
|
+
const obj = Object.create(Web.prototype);
|
|
9
|
+
obj.__wbg_ptr = ptr;
|
|
10
|
+
WebFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
11
|
+
return obj;
|
|
16
12
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
23
|
-
? function (arg, view) {
|
|
24
|
-
return cachedTextEncoder.encodeInto(arg, view);
|
|
25
|
-
}
|
|
26
|
-
: function (arg, view) {
|
|
27
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
28
|
-
view.set(buf);
|
|
29
|
-
return {
|
|
30
|
-
read: arg.length,
|
|
31
|
-
written: buf.length
|
|
32
|
-
};
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
function passStringToWasm0(arg, malloc, realloc) {
|
|
36
|
-
|
|
37
|
-
if (realloc === undefined) {
|
|
38
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
39
|
-
const ptr = malloc(buf.length, 1) >>> 0;
|
|
40
|
-
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
41
|
-
WASM_VECTOR_LEN = buf.length;
|
|
13
|
+
__destroy_into_raw() {
|
|
14
|
+
const ptr = this.__wbg_ptr;
|
|
15
|
+
this.__wbg_ptr = 0;
|
|
16
|
+
WebFinalization.unregister(this);
|
|
42
17
|
return ptr;
|
|
43
18
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
const mem = getUint8ArrayMemory0();
|
|
49
|
-
|
|
50
|
-
let offset = 0;
|
|
51
|
-
|
|
52
|
-
for (; offset < len; offset++) {
|
|
53
|
-
const code = arg.charCodeAt(offset);
|
|
54
|
-
if (code > 0x7F) break;
|
|
55
|
-
mem[ptr + offset] = code;
|
|
19
|
+
free() {
|
|
20
|
+
const ptr = this.__destroy_into_raw();
|
|
21
|
+
wasm.__wbg_web_free(ptr, 0);
|
|
56
22
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
23
|
+
/**
|
|
24
|
+
* @param {any} 前端目标函数配置
|
|
25
|
+
* @returns {any}
|
|
26
|
+
*/
|
|
27
|
+
encode_evaluate(前端目标函数配置) {
|
|
28
|
+
try {
|
|
29
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
30
|
+
wasm.web_encode_evaluate(retptr, this.__wbg_ptr, addHeapObject(前端目标函数配置));
|
|
31
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
32
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
33
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
34
|
+
if (r2) {
|
|
35
|
+
throw takeObject(r1);
|
|
36
|
+
}
|
|
37
|
+
return takeObject(r0);
|
|
38
|
+
} finally {
|
|
39
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* @param {Function} 回调
|
|
44
|
+
* @returns {Web}
|
|
45
|
+
*/
|
|
46
|
+
static new(回调) {
|
|
47
|
+
const ret = wasm.web_new(addHeapObject(回调));
|
|
48
|
+
return Web.__wrap(ret);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* @returns {any}
|
|
52
|
+
*/
|
|
53
|
+
optimize() {
|
|
54
|
+
try {
|
|
55
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
56
|
+
wasm.web_optimize(retptr, this.__wbg_ptr);
|
|
57
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
58
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
59
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
60
|
+
if (r2) {
|
|
61
|
+
throw takeObject(r1);
|
|
62
|
+
}
|
|
63
|
+
return takeObject(r0);
|
|
64
|
+
} finally {
|
|
65
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* @param {any} 前端参数
|
|
70
|
+
*/
|
|
71
|
+
sync(前端参数) {
|
|
72
|
+
try {
|
|
73
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
74
|
+
wasm.web_sync(retptr, this.__wbg_ptr, addHeapObject(前端参数));
|
|
75
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
76
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
77
|
+
if (r1) {
|
|
78
|
+
throw takeObject(r0);
|
|
79
|
+
}
|
|
80
|
+
} finally {
|
|
81
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
61
82
|
}
|
|
62
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
63
|
-
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
64
|
-
const ret = encodeString(arg, view);
|
|
65
|
-
|
|
66
|
-
offset += ret.written;
|
|
67
|
-
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
68
83
|
}
|
|
69
|
-
|
|
70
|
-
WASM_VECTOR_LEN = offset;
|
|
71
|
-
return ptr;
|
|
72
84
|
}
|
|
85
|
+
if (Symbol.dispose) Web.prototype[Symbol.dispose] = Web.prototype.free;
|
|
73
86
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
87
|
+
/**
|
|
88
|
+
* 用于在图形界面验证输入的配置是否正确
|
|
89
|
+
* @param {any} js_config
|
|
90
|
+
* @returns {any}
|
|
91
|
+
*/
|
|
92
|
+
export function validate(js_config) {
|
|
93
|
+
try {
|
|
94
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
95
|
+
wasm.validate(retptr, addHeapObject(js_config));
|
|
96
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
97
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
98
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
99
|
+
if (r2) {
|
|
100
|
+
throw takeObject(r1);
|
|
101
|
+
}
|
|
102
|
+
return takeObject(r0);
|
|
103
|
+
} finally {
|
|
104
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
79
105
|
}
|
|
80
|
-
|
|
106
|
+
}
|
|
107
|
+
function __wbg_get_imports() {
|
|
108
|
+
const import0 = {
|
|
109
|
+
__proto__: null,
|
|
110
|
+
__wbg_Error_3639a60ed15f87e7: function(arg0, arg1) {
|
|
111
|
+
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
112
|
+
return addHeapObject(ret);
|
|
113
|
+
},
|
|
114
|
+
__wbg_Number_a3d737fd183f7dca: function(arg0) {
|
|
115
|
+
const ret = Number(getObject(arg0));
|
|
116
|
+
return ret;
|
|
117
|
+
},
|
|
118
|
+
__wbg_String_8564e559799eccda: function(arg0, arg1) {
|
|
119
|
+
const ret = String(getObject(arg1));
|
|
120
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
121
|
+
const len1 = WASM_VECTOR_LEN;
|
|
122
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
123
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
124
|
+
},
|
|
125
|
+
__wbg___wbindgen_bigint_get_as_i64_3af6d4ca77193a4b: function(arg0, arg1) {
|
|
126
|
+
const v = getObject(arg1);
|
|
127
|
+
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
128
|
+
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
129
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
130
|
+
},
|
|
131
|
+
__wbg___wbindgen_boolean_get_c3dd5c39f1b5a12b: function(arg0) {
|
|
132
|
+
const v = getObject(arg0);
|
|
133
|
+
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
134
|
+
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
135
|
+
},
|
|
136
|
+
__wbg___wbindgen_debug_string_07cb72cfcc952e2b: function(arg0, arg1) {
|
|
137
|
+
const ret = debugString(getObject(arg1));
|
|
138
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
139
|
+
const len1 = WASM_VECTOR_LEN;
|
|
140
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
141
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
142
|
+
},
|
|
143
|
+
__wbg___wbindgen_in_2617fa76397620d3: function(arg0, arg1) {
|
|
144
|
+
const ret = getObject(arg0) in getObject(arg1);
|
|
145
|
+
return ret;
|
|
146
|
+
},
|
|
147
|
+
__wbg___wbindgen_is_bigint_d6a8167cac401b95: function(arg0) {
|
|
148
|
+
const ret = typeof(getObject(arg0)) === 'bigint';
|
|
149
|
+
return ret;
|
|
150
|
+
},
|
|
151
|
+
__wbg___wbindgen_is_function_2f0fd7ceb86e64c5: function(arg0) {
|
|
152
|
+
const ret = typeof(getObject(arg0)) === 'function';
|
|
153
|
+
return ret;
|
|
154
|
+
},
|
|
155
|
+
__wbg___wbindgen_is_object_5b22ff2418063a9c: function(arg0) {
|
|
156
|
+
const val = getObject(arg0);
|
|
157
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
158
|
+
return ret;
|
|
159
|
+
},
|
|
160
|
+
__wbg___wbindgen_is_string_eddc07a3efad52e6: function(arg0) {
|
|
161
|
+
const ret = typeof(getObject(arg0)) === 'string';
|
|
162
|
+
return ret;
|
|
163
|
+
},
|
|
164
|
+
__wbg___wbindgen_is_undefined_244a92c34d3b6ec0: function(arg0) {
|
|
165
|
+
const ret = getObject(arg0) === undefined;
|
|
166
|
+
return ret;
|
|
167
|
+
},
|
|
168
|
+
__wbg___wbindgen_jsval_eq_403eaa3610500a25: function(arg0, arg1) {
|
|
169
|
+
const ret = getObject(arg0) === getObject(arg1);
|
|
170
|
+
return ret;
|
|
171
|
+
},
|
|
172
|
+
__wbg___wbindgen_jsval_loose_eq_1978f1e77b4bce62: function(arg0, arg1) {
|
|
173
|
+
const ret = getObject(arg0) == getObject(arg1);
|
|
174
|
+
return ret;
|
|
175
|
+
},
|
|
176
|
+
__wbg___wbindgen_number_get_dd6d69a6079f26f1: function(arg0, arg1) {
|
|
177
|
+
const obj = getObject(arg1);
|
|
178
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
179
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
180
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
181
|
+
},
|
|
182
|
+
__wbg___wbindgen_string_get_965592073e5d848c: function(arg0, arg1) {
|
|
183
|
+
const obj = getObject(arg1);
|
|
184
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
185
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
186
|
+
var len1 = WASM_VECTOR_LEN;
|
|
187
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
188
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
189
|
+
},
|
|
190
|
+
__wbg___wbindgen_throw_9c75d47bf9e7731e: function(arg0, arg1) {
|
|
191
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
192
|
+
},
|
|
193
|
+
__wbg_call_a41d6421b30a32c5: function() { return handleError(function (arg0, arg1, arg2) {
|
|
194
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
195
|
+
return addHeapObject(ret);
|
|
196
|
+
}, arguments); },
|
|
197
|
+
__wbg_call_add9e5a76382e668: function() { return handleError(function (arg0, arg1) {
|
|
198
|
+
const ret = getObject(arg0).call(getObject(arg1));
|
|
199
|
+
return addHeapObject(ret);
|
|
200
|
+
}, arguments); },
|
|
201
|
+
__wbg_codePointAt_3afc55a811920a3c: function(arg0, arg1) {
|
|
202
|
+
const ret = getObject(arg0).codePointAt(arg1 >>> 0);
|
|
203
|
+
return addHeapObject(ret);
|
|
204
|
+
},
|
|
205
|
+
__wbg_done_b1afd6201ac045e0: function(arg0) {
|
|
206
|
+
const ret = getObject(arg0).done;
|
|
207
|
+
return ret;
|
|
208
|
+
},
|
|
209
|
+
__wbg_entries_bb9843ba73dc70d6: function(arg0) {
|
|
210
|
+
const ret = Object.entries(getObject(arg0));
|
|
211
|
+
return addHeapObject(ret);
|
|
212
|
+
},
|
|
213
|
+
__wbg_error_a6fa202b58aa1cd3: function(arg0, arg1) {
|
|
214
|
+
let deferred0_0;
|
|
215
|
+
let deferred0_1;
|
|
216
|
+
try {
|
|
217
|
+
deferred0_0 = arg0;
|
|
218
|
+
deferred0_1 = arg1;
|
|
219
|
+
console.error(getStringFromWasm0(arg0, arg1));
|
|
220
|
+
} finally {
|
|
221
|
+
wasm.__wbindgen_export4(deferred0_0, deferred0_1, 1);
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
__wbg_fromCodePoint_ac3a66d5b95b4ddf: function() { return handleError(function (arg0) {
|
|
225
|
+
const ret = String.fromCodePoint(arg0 >>> 0);
|
|
226
|
+
return addHeapObject(ret);
|
|
227
|
+
}, arguments); },
|
|
228
|
+
__wbg_getDate_3125ccbd2287cd41: function(arg0) {
|
|
229
|
+
const ret = getObject(arg0).getDate();
|
|
230
|
+
return ret;
|
|
231
|
+
},
|
|
232
|
+
__wbg_getHours_c9732aeae765eb42: function(arg0) {
|
|
233
|
+
const ret = getObject(arg0).getHours();
|
|
234
|
+
return ret;
|
|
235
|
+
},
|
|
236
|
+
__wbg_getMinutes_734f5fc547107704: function(arg0) {
|
|
237
|
+
const ret = getObject(arg0).getMinutes();
|
|
238
|
+
return ret;
|
|
239
|
+
},
|
|
240
|
+
__wbg_getMonth_a05a33ddd62f0d8a: function(arg0) {
|
|
241
|
+
const ret = getObject(arg0).getMonth();
|
|
242
|
+
return ret;
|
|
243
|
+
},
|
|
244
|
+
__wbg_getRandomValues_3f44b700395062e5: function() { return handleError(function (arg0, arg1) {
|
|
245
|
+
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
246
|
+
}, arguments); },
|
|
247
|
+
__wbg_getSeconds_540b42f080d49830: function(arg0) {
|
|
248
|
+
const ret = getObject(arg0).getSeconds();
|
|
249
|
+
return ret;
|
|
250
|
+
},
|
|
251
|
+
__wbg_get_652f640b3b0b6e3e: function(arg0, arg1) {
|
|
252
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
|
253
|
+
return addHeapObject(ret);
|
|
254
|
+
},
|
|
255
|
+
__wbg_get_9cfea9b7bbf12a15: function() { return handleError(function (arg0, arg1) {
|
|
256
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
257
|
+
return addHeapObject(ret);
|
|
258
|
+
}, arguments); },
|
|
259
|
+
__wbg_get_unchecked_be562b1421656321: function(arg0, arg1) {
|
|
260
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
|
261
|
+
return addHeapObject(ret);
|
|
262
|
+
},
|
|
263
|
+
__wbg_get_with_ref_key_6412cf3094599694: function(arg0, arg1) {
|
|
264
|
+
const ret = getObject(arg0)[getObject(arg1)];
|
|
265
|
+
return addHeapObject(ret);
|
|
266
|
+
},
|
|
267
|
+
__wbg_instanceof_ArrayBuffer_eab9f28fbec23477: function(arg0) {
|
|
268
|
+
let result;
|
|
269
|
+
try {
|
|
270
|
+
result = getObject(arg0) instanceof ArrayBuffer;
|
|
271
|
+
} catch (_) {
|
|
272
|
+
result = false;
|
|
273
|
+
}
|
|
274
|
+
const ret = result;
|
|
275
|
+
return ret;
|
|
276
|
+
},
|
|
277
|
+
__wbg_instanceof_Map_10d4edf60fcf9327: function(arg0) {
|
|
278
|
+
let result;
|
|
279
|
+
try {
|
|
280
|
+
result = getObject(arg0) instanceof Map;
|
|
281
|
+
} catch (_) {
|
|
282
|
+
result = false;
|
|
283
|
+
}
|
|
284
|
+
const ret = result;
|
|
285
|
+
return ret;
|
|
286
|
+
},
|
|
287
|
+
__wbg_instanceof_Uint8Array_57d77acd50e4c44d: function(arg0) {
|
|
288
|
+
let result;
|
|
289
|
+
try {
|
|
290
|
+
result = getObject(arg0) instanceof Uint8Array;
|
|
291
|
+
} catch (_) {
|
|
292
|
+
result = false;
|
|
293
|
+
}
|
|
294
|
+
const ret = result;
|
|
295
|
+
return ret;
|
|
296
|
+
},
|
|
297
|
+
__wbg_isArray_c6c6ef8308995bcf: function(arg0) {
|
|
298
|
+
const ret = Array.isArray(getObject(arg0));
|
|
299
|
+
return ret;
|
|
300
|
+
},
|
|
301
|
+
__wbg_isSafeInteger_3c56c421a5b4cce4: function(arg0) {
|
|
302
|
+
const ret = Number.isSafeInteger(getObject(arg0));
|
|
303
|
+
return ret;
|
|
304
|
+
},
|
|
305
|
+
__wbg_iterator_9d68985a1d096fc2: function() {
|
|
306
|
+
const ret = Symbol.iterator;
|
|
307
|
+
return addHeapObject(ret);
|
|
308
|
+
},
|
|
309
|
+
__wbg_length_0a6ce016dc1460b0: function(arg0) {
|
|
310
|
+
const ret = getObject(arg0).length;
|
|
311
|
+
return ret;
|
|
312
|
+
},
|
|
313
|
+
__wbg_length_87c21a708fcf5554: function(arg0) {
|
|
314
|
+
const ret = getObject(arg0).length;
|
|
315
|
+
return ret;
|
|
316
|
+
},
|
|
317
|
+
__wbg_length_ba3c032602efe310: function(arg0) {
|
|
318
|
+
const ret = getObject(arg0).length;
|
|
319
|
+
return ret;
|
|
320
|
+
},
|
|
321
|
+
__wbg_new_0_e486ec9936f7edbf: function() {
|
|
322
|
+
const ret = new Date();
|
|
323
|
+
return addHeapObject(ret);
|
|
324
|
+
},
|
|
325
|
+
__wbg_new_227d7c05414eb861: function() {
|
|
326
|
+
const ret = new Error();
|
|
327
|
+
return addHeapObject(ret);
|
|
328
|
+
},
|
|
329
|
+
__wbg_new_2fad8ca02fd00684: function() {
|
|
330
|
+
const ret = new Object();
|
|
331
|
+
return addHeapObject(ret);
|
|
332
|
+
},
|
|
333
|
+
__wbg_new_3baa8d9866155c79: function() {
|
|
334
|
+
const ret = new Array();
|
|
335
|
+
return addHeapObject(ret);
|
|
336
|
+
},
|
|
337
|
+
__wbg_new_46ae4e4ff2a07a64: function() {
|
|
338
|
+
const ret = new Map();
|
|
339
|
+
return addHeapObject(ret);
|
|
340
|
+
},
|
|
341
|
+
__wbg_new_8454eee672b2ba6e: function(arg0) {
|
|
342
|
+
const ret = new Uint8Array(getObject(arg0));
|
|
343
|
+
return addHeapObject(ret);
|
|
344
|
+
},
|
|
345
|
+
__wbg_next_261c3c48c6e309a5: function(arg0) {
|
|
346
|
+
const ret = getObject(arg0).next;
|
|
347
|
+
return addHeapObject(ret);
|
|
348
|
+
},
|
|
349
|
+
__wbg_next_aacee310bcfe6461: function() { return handleError(function (arg0) {
|
|
350
|
+
const ret = getObject(arg0).next();
|
|
351
|
+
return addHeapObject(ret);
|
|
352
|
+
}, arguments); },
|
|
353
|
+
__wbg_now_e7c6795a7f81e10f: function(arg0) {
|
|
354
|
+
const ret = getObject(arg0).now();
|
|
355
|
+
return ret;
|
|
356
|
+
},
|
|
357
|
+
__wbg_performance_3fcf6e32a7e1ed0a: function(arg0) {
|
|
358
|
+
const ret = getObject(arg0).performance;
|
|
359
|
+
return addHeapObject(ret);
|
|
360
|
+
},
|
|
361
|
+
__wbg_prototypesetcall_fd4050e806e1d519: function(arg0, arg1, arg2) {
|
|
362
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
|
|
363
|
+
},
|
|
364
|
+
__wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
|
|
365
|
+
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
366
|
+
},
|
|
367
|
+
__wbg_set_82f7a370f604db70: function(arg0, arg1, arg2) {
|
|
368
|
+
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
|
369
|
+
return addHeapObject(ret);
|
|
370
|
+
},
|
|
371
|
+
__wbg_set_f614f6a0608d1d1d: function(arg0, arg1, arg2) {
|
|
372
|
+
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
373
|
+
},
|
|
374
|
+
__wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
|
|
375
|
+
const ret = getObject(arg1).stack;
|
|
376
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
377
|
+
const len1 = WASM_VECTOR_LEN;
|
|
378
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
379
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
380
|
+
},
|
|
381
|
+
__wbg_static_accessor_GLOBAL_THIS_1c7f1bd6c6941fdb: function() {
|
|
382
|
+
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
383
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
384
|
+
},
|
|
385
|
+
__wbg_static_accessor_GLOBAL_e039bc914f83e74e: function() {
|
|
386
|
+
const ret = typeof global === 'undefined' ? null : global;
|
|
387
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
388
|
+
},
|
|
389
|
+
__wbg_static_accessor_SELF_8bf8c48c28420ad5: function() {
|
|
390
|
+
const ret = typeof self === 'undefined' ? null : self;
|
|
391
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
392
|
+
},
|
|
393
|
+
__wbg_static_accessor_WINDOW_6aeee9b51652ee0f: function() {
|
|
394
|
+
const ret = typeof window === 'undefined' ? null : window;
|
|
395
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
396
|
+
},
|
|
397
|
+
__wbg_value_f852716acdeb3e82: function(arg0) {
|
|
398
|
+
const ret = getObject(arg0).value;
|
|
399
|
+
return addHeapObject(ret);
|
|
400
|
+
},
|
|
401
|
+
__wbindgen_cast_0000000000000001: function(arg0) {
|
|
402
|
+
// Cast intrinsic for `F64 -> Externref`.
|
|
403
|
+
const ret = arg0;
|
|
404
|
+
return addHeapObject(ret);
|
|
405
|
+
},
|
|
406
|
+
__wbindgen_cast_0000000000000002: function(arg0) {
|
|
407
|
+
// Cast intrinsic for `I64 -> Externref`.
|
|
408
|
+
const ret = arg0;
|
|
409
|
+
return addHeapObject(ret);
|
|
410
|
+
},
|
|
411
|
+
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
412
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
413
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
414
|
+
return addHeapObject(ret);
|
|
415
|
+
},
|
|
416
|
+
__wbindgen_cast_0000000000000004: function(arg0) {
|
|
417
|
+
// Cast intrinsic for `U64 -> Externref`.
|
|
418
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
419
|
+
return addHeapObject(ret);
|
|
420
|
+
},
|
|
421
|
+
__wbindgen_object_clone_ref: function(arg0) {
|
|
422
|
+
const ret = getObject(arg0);
|
|
423
|
+
return addHeapObject(ret);
|
|
424
|
+
},
|
|
425
|
+
__wbindgen_object_drop_ref: function(arg0) {
|
|
426
|
+
takeObject(arg0);
|
|
427
|
+
},
|
|
428
|
+
};
|
|
429
|
+
return {
|
|
430
|
+
__proto__: null,
|
|
431
|
+
"./chai_bg.js": import0,
|
|
432
|
+
};
|
|
81
433
|
}
|
|
82
434
|
|
|
83
|
-
|
|
435
|
+
const WebFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
436
|
+
? { register: () => {}, unregister: () => {} }
|
|
437
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_web_free(ptr, 1));
|
|
84
438
|
|
|
85
439
|
function addHeapObject(obj) {
|
|
86
440
|
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
@@ -91,44 +445,6 @@ function addHeapObject(obj) {
|
|
|
91
445
|
return idx;
|
|
92
446
|
}
|
|
93
447
|
|
|
94
|
-
function handleError(f, args) {
|
|
95
|
-
try {
|
|
96
|
-
return f.apply(this, args);
|
|
97
|
-
} catch (e) {
|
|
98
|
-
wasm.__wbindgen_export_2(addHeapObject(e));
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
103
|
-
|
|
104
|
-
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
|
|
105
|
-
|
|
106
|
-
function getStringFromWasm0(ptr, len) {
|
|
107
|
-
ptr = ptr >>> 0;
|
|
108
|
-
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
function getArrayU8FromWasm0(ptr, len) {
|
|
112
|
-
ptr = ptr >>> 0;
|
|
113
|
-
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
function dropObject(idx) {
|
|
117
|
-
if (idx < 132) return;
|
|
118
|
-
heap[idx] = heap_next;
|
|
119
|
-
heap_next = idx;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
function takeObject(idx) {
|
|
123
|
-
const ret = getObject(idx);
|
|
124
|
-
dropObject(idx);
|
|
125
|
-
return ret;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
function isLikeNone(x) {
|
|
129
|
-
return x === undefined || x === null;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
448
|
function debugString(val) {
|
|
133
449
|
// primitive types
|
|
134
450
|
const type = typeof val;
|
|
@@ -193,115 +509,137 @@ function debugString(val) {
|
|
|
193
509
|
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
194
510
|
return className;
|
|
195
511
|
}
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
export function validate(js_config) {
|
|
202
|
-
try {
|
|
203
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
204
|
-
wasm.validate(retptr, addHeapObject(js_config));
|
|
205
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
206
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
207
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
208
|
-
if (r2) {
|
|
209
|
-
throw takeObject(r1);
|
|
210
|
-
}
|
|
211
|
-
return takeObject(r0);
|
|
212
|
-
} finally {
|
|
213
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
214
|
-
}
|
|
512
|
+
|
|
513
|
+
function dropObject(idx) {
|
|
514
|
+
if (idx < 1028) return;
|
|
515
|
+
heap[idx] = heap_next;
|
|
516
|
+
heap_next = idx;
|
|
215
517
|
}
|
|
216
518
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
* 通过图形界面来使用 libchai 的入口,实现了界面特征
|
|
222
|
-
*/
|
|
223
|
-
export class Web {
|
|
519
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
520
|
+
ptr = ptr >>> 0;
|
|
521
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
522
|
+
}
|
|
224
523
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
WebFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
230
|
-
return obj;
|
|
524
|
+
let cachedDataViewMemory0 = null;
|
|
525
|
+
function getDataViewMemory0() {
|
|
526
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
527
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
231
528
|
}
|
|
529
|
+
return cachedDataViewMemory0;
|
|
530
|
+
}
|
|
232
531
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
532
|
+
function getStringFromWasm0(ptr, len) {
|
|
533
|
+
return decodeText(ptr >>> 0, len);
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
let cachedUint8ArrayMemory0 = null;
|
|
537
|
+
function getUint8ArrayMemory0() {
|
|
538
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
539
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
238
540
|
}
|
|
541
|
+
return cachedUint8ArrayMemory0;
|
|
542
|
+
}
|
|
239
543
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
544
|
+
function getObject(idx) { return heap[idx]; }
|
|
545
|
+
|
|
546
|
+
function handleError(f, args) {
|
|
547
|
+
try {
|
|
548
|
+
return f.apply(this, args);
|
|
549
|
+
} catch (e) {
|
|
550
|
+
wasm.__wbindgen_export3(addHeapObject(e));
|
|
243
551
|
}
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
let heap = new Array(1024).fill(undefined);
|
|
555
|
+
heap.push(undefined, null, true, false);
|
|
556
|
+
|
|
557
|
+
let heap_next = heap.length;
|
|
558
|
+
|
|
559
|
+
function isLikeNone(x) {
|
|
560
|
+
return x === undefined || x === null;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
564
|
+
if (realloc === undefined) {
|
|
565
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
566
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
567
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
568
|
+
WASM_VECTOR_LEN = buf.length;
|
|
569
|
+
return ptr;
|
|
262
570
|
}
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
571
|
+
|
|
572
|
+
let len = arg.length;
|
|
573
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
574
|
+
|
|
575
|
+
const mem = getUint8ArrayMemory0();
|
|
576
|
+
|
|
577
|
+
let offset = 0;
|
|
578
|
+
|
|
579
|
+
for (; offset < len; offset++) {
|
|
580
|
+
const code = arg.charCodeAt(offset);
|
|
581
|
+
if (code > 0x7F) break;
|
|
582
|
+
mem[ptr + offset] = code;
|
|
270
583
|
}
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
sync(前端参数) {
|
|
275
|
-
try {
|
|
276
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
277
|
-
wasm.web_sync(retptr, this.__wbg_ptr, addHeapObject(前端参数));
|
|
278
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
279
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
280
|
-
if (r1) {
|
|
281
|
-
throw takeObject(r0);
|
|
282
|
-
}
|
|
283
|
-
} finally {
|
|
284
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
584
|
+
if (offset !== len) {
|
|
585
|
+
if (offset !== 0) {
|
|
586
|
+
arg = arg.slice(offset);
|
|
285
587
|
}
|
|
588
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
589
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
590
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
591
|
+
|
|
592
|
+
offset += ret.written;
|
|
593
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
286
594
|
}
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
595
|
+
|
|
596
|
+
WASM_VECTOR_LEN = offset;
|
|
597
|
+
return ptr;
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
function takeObject(idx) {
|
|
601
|
+
const ret = getObject(idx);
|
|
602
|
+
dropObject(idx);
|
|
603
|
+
return ret;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
607
|
+
cachedTextDecoder.decode();
|
|
608
|
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
609
|
+
let numBytesDecoded = 0;
|
|
610
|
+
function decodeText(ptr, len) {
|
|
611
|
+
numBytesDecoded += len;
|
|
612
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
613
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
614
|
+
cachedTextDecoder.decode();
|
|
615
|
+
numBytesDecoded = len;
|
|
304
616
|
}
|
|
617
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
const cachedTextEncoder = new TextEncoder();
|
|
621
|
+
|
|
622
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
623
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
624
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
625
|
+
view.set(buf);
|
|
626
|
+
return {
|
|
627
|
+
read: arg.length,
|
|
628
|
+
written: buf.length
|
|
629
|
+
};
|
|
630
|
+
};
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
let WASM_VECTOR_LEN = 0;
|
|
634
|
+
|
|
635
|
+
let wasmModule, wasmInstance, wasm;
|
|
636
|
+
function __wbg_finalize_init(instance, module) {
|
|
637
|
+
wasmInstance = instance;
|
|
638
|
+
wasm = instance.exports;
|
|
639
|
+
wasmModule = module;
|
|
640
|
+
cachedDataViewMemory0 = null;
|
|
641
|
+
cachedUint8ArrayMemory0 = null;
|
|
642
|
+
return wasm;
|
|
305
643
|
}
|
|
306
644
|
|
|
307
645
|
async function __wbg_load(module, imports) {
|
|
@@ -309,381 +647,41 @@ async function __wbg_load(module, imports) {
|
|
|
309
647
|
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
310
648
|
try {
|
|
311
649
|
return await WebAssembly.instantiateStreaming(module, imports);
|
|
312
|
-
|
|
313
650
|
} catch (e) {
|
|
314
|
-
|
|
651
|
+
const validResponse = module.ok && expectedResponseType(module.type);
|
|
652
|
+
|
|
653
|
+
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
315
654
|
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
|
|
316
655
|
|
|
317
|
-
} else {
|
|
318
|
-
throw e;
|
|
319
|
-
}
|
|
656
|
+
} else { throw e; }
|
|
320
657
|
}
|
|
321
658
|
}
|
|
322
659
|
|
|
323
660
|
const bytes = await module.arrayBuffer();
|
|
324
661
|
return await WebAssembly.instantiate(bytes, imports);
|
|
325
|
-
|
|
326
662
|
} else {
|
|
327
663
|
const instance = await WebAssembly.instantiate(module, imports);
|
|
328
664
|
|
|
329
665
|
if (instance instanceof WebAssembly.Instance) {
|
|
330
666
|
return { instance, module };
|
|
331
|
-
|
|
332
667
|
} else {
|
|
333
668
|
return instance;
|
|
334
669
|
}
|
|
335
670
|
}
|
|
336
|
-
}
|
|
337
671
|
|
|
338
|
-
function
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
|
|
342
|
-
const ret = String(getObject(arg1));
|
|
343
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
344
|
-
const len1 = WASM_VECTOR_LEN;
|
|
345
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
346
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
347
|
-
};
|
|
348
|
-
imports.wbg.__wbg_buffer_609cc3eee51ed158 = function(arg0) {
|
|
349
|
-
const ret = getObject(arg0).buffer;
|
|
350
|
-
return addHeapObject(ret);
|
|
351
|
-
};
|
|
352
|
-
imports.wbg.__wbg_call_672a4d21634d4a24 = function() { return handleError(function (arg0, arg1) {
|
|
353
|
-
const ret = getObject(arg0).call(getObject(arg1));
|
|
354
|
-
return addHeapObject(ret);
|
|
355
|
-
}, arguments) };
|
|
356
|
-
imports.wbg.__wbg_call_7cccdd69e0791ae2 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
357
|
-
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
358
|
-
return addHeapObject(ret);
|
|
359
|
-
}, arguments) };
|
|
360
|
-
imports.wbg.__wbg_codePointAt_78181f32881e5b59 = function(arg0, arg1) {
|
|
361
|
-
const ret = getObject(arg0).codePointAt(arg1 >>> 0);
|
|
362
|
-
return addHeapObject(ret);
|
|
363
|
-
};
|
|
364
|
-
imports.wbg.__wbg_done_769e5ede4b31c67b = function(arg0) {
|
|
365
|
-
const ret = getObject(arg0).done;
|
|
366
|
-
return ret;
|
|
367
|
-
};
|
|
368
|
-
imports.wbg.__wbg_entries_3265d4158b33e5dc = function(arg0) {
|
|
369
|
-
const ret = Object.entries(getObject(arg0));
|
|
370
|
-
return addHeapObject(ret);
|
|
371
|
-
};
|
|
372
|
-
imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
|
|
373
|
-
let deferred0_0;
|
|
374
|
-
let deferred0_1;
|
|
375
|
-
try {
|
|
376
|
-
deferred0_0 = arg0;
|
|
377
|
-
deferred0_1 = arg1;
|
|
378
|
-
console.error(getStringFromWasm0(arg0, arg1));
|
|
379
|
-
} finally {
|
|
380
|
-
wasm.__wbindgen_export_3(deferred0_0, deferred0_1, 1);
|
|
381
|
-
}
|
|
382
|
-
};
|
|
383
|
-
imports.wbg.__wbg_fromCodePoint_f37c25c172f2e8b5 = function() { return handleError(function (arg0) {
|
|
384
|
-
const ret = String.fromCodePoint(arg0 >>> 0);
|
|
385
|
-
return addHeapObject(ret);
|
|
386
|
-
}, arguments) };
|
|
387
|
-
imports.wbg.__wbg_getDate_ef336e14594b35ce = function(arg0) {
|
|
388
|
-
const ret = getObject(arg0).getDate();
|
|
389
|
-
return ret;
|
|
390
|
-
};
|
|
391
|
-
imports.wbg.__wbg_getHours_70451b8de3ce8638 = function(arg0) {
|
|
392
|
-
const ret = getObject(arg0).getHours();
|
|
393
|
-
return ret;
|
|
394
|
-
};
|
|
395
|
-
imports.wbg.__wbg_getMinutes_e793d718371e18f7 = function(arg0) {
|
|
396
|
-
const ret = getObject(arg0).getMinutes();
|
|
397
|
-
return ret;
|
|
398
|
-
};
|
|
399
|
-
imports.wbg.__wbg_getMonth_d37edcd23642c97d = function(arg0) {
|
|
400
|
-
const ret = getObject(arg0).getMonth();
|
|
401
|
-
return ret;
|
|
402
|
-
};
|
|
403
|
-
imports.wbg.__wbg_getRandomValues_3c9c0d586e575a16 = function() { return handleError(function (arg0, arg1) {
|
|
404
|
-
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
405
|
-
}, arguments) };
|
|
406
|
-
imports.wbg.__wbg_getSeconds_755197b634cca692 = function(arg0) {
|
|
407
|
-
const ret = getObject(arg0).getSeconds();
|
|
408
|
-
return ret;
|
|
409
|
-
};
|
|
410
|
-
imports.wbg.__wbg_get_67b2ba62fc30de12 = function() { return handleError(function (arg0, arg1) {
|
|
411
|
-
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
412
|
-
return addHeapObject(ret);
|
|
413
|
-
}, arguments) };
|
|
414
|
-
imports.wbg.__wbg_get_b9b93047fe3cf45b = function(arg0, arg1) {
|
|
415
|
-
const ret = getObject(arg0)[arg1 >>> 0];
|
|
416
|
-
return addHeapObject(ret);
|
|
417
|
-
};
|
|
418
|
-
imports.wbg.__wbg_getwithrefkey_1dc361bd10053bfe = function(arg0, arg1) {
|
|
419
|
-
const ret = getObject(arg0)[getObject(arg1)];
|
|
420
|
-
return addHeapObject(ret);
|
|
421
|
-
};
|
|
422
|
-
imports.wbg.__wbg_instanceof_ArrayBuffer_e14585432e3737fc = function(arg0) {
|
|
423
|
-
let result;
|
|
424
|
-
try {
|
|
425
|
-
result = getObject(arg0) instanceof ArrayBuffer;
|
|
426
|
-
} catch (_) {
|
|
427
|
-
result = false;
|
|
428
|
-
}
|
|
429
|
-
const ret = result;
|
|
430
|
-
return ret;
|
|
431
|
-
};
|
|
432
|
-
imports.wbg.__wbg_instanceof_Map_f3469ce2244d2430 = function(arg0) {
|
|
433
|
-
let result;
|
|
434
|
-
try {
|
|
435
|
-
result = getObject(arg0) instanceof Map;
|
|
436
|
-
} catch (_) {
|
|
437
|
-
result = false;
|
|
438
|
-
}
|
|
439
|
-
const ret = result;
|
|
440
|
-
return ret;
|
|
441
|
-
};
|
|
442
|
-
imports.wbg.__wbg_instanceof_Uint8Array_17156bcf118086a9 = function(arg0) {
|
|
443
|
-
let result;
|
|
444
|
-
try {
|
|
445
|
-
result = getObject(arg0) instanceof Uint8Array;
|
|
446
|
-
} catch (_) {
|
|
447
|
-
result = false;
|
|
672
|
+
function expectedResponseType(type) {
|
|
673
|
+
switch (type) {
|
|
674
|
+
case 'basic': case 'cors': case 'default': return true;
|
|
448
675
|
}
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
};
|
|
452
|
-
imports.wbg.__wbg_isArray_a1eab7e0d067391b = function(arg0) {
|
|
453
|
-
const ret = Array.isArray(getObject(arg0));
|
|
454
|
-
return ret;
|
|
455
|
-
};
|
|
456
|
-
imports.wbg.__wbg_isSafeInteger_343e2beeeece1bb0 = function(arg0) {
|
|
457
|
-
const ret = Number.isSafeInteger(getObject(arg0));
|
|
458
|
-
return ret;
|
|
459
|
-
};
|
|
460
|
-
imports.wbg.__wbg_iterator_9a24c88df860dc65 = function() {
|
|
461
|
-
const ret = Symbol.iterator;
|
|
462
|
-
return addHeapObject(ret);
|
|
463
|
-
};
|
|
464
|
-
imports.wbg.__wbg_length_a446193dc22c12f8 = function(arg0) {
|
|
465
|
-
const ret = getObject(arg0).length;
|
|
466
|
-
return ret;
|
|
467
|
-
};
|
|
468
|
-
imports.wbg.__wbg_length_d56737991078581b = function(arg0) {
|
|
469
|
-
const ret = getObject(arg0).length;
|
|
470
|
-
return ret;
|
|
471
|
-
};
|
|
472
|
-
imports.wbg.__wbg_length_e2d2a49132c1b256 = function(arg0) {
|
|
473
|
-
const ret = getObject(arg0).length;
|
|
474
|
-
return ret;
|
|
475
|
-
};
|
|
476
|
-
imports.wbg.__wbg_new0_f788a2397c7ca929 = function() {
|
|
477
|
-
const ret = new Date();
|
|
478
|
-
return addHeapObject(ret);
|
|
479
|
-
};
|
|
480
|
-
imports.wbg.__wbg_new_405e22f390576ce2 = function() {
|
|
481
|
-
const ret = new Object();
|
|
482
|
-
return addHeapObject(ret);
|
|
483
|
-
};
|
|
484
|
-
imports.wbg.__wbg_new_5e0be73521bc8c17 = function() {
|
|
485
|
-
const ret = new Map();
|
|
486
|
-
return addHeapObject(ret);
|
|
487
|
-
};
|
|
488
|
-
imports.wbg.__wbg_new_78feb108b6472713 = function() {
|
|
489
|
-
const ret = new Array();
|
|
490
|
-
return addHeapObject(ret);
|
|
491
|
-
};
|
|
492
|
-
imports.wbg.__wbg_new_8a6f238a6ece86ea = function() {
|
|
493
|
-
const ret = new Error();
|
|
494
|
-
return addHeapObject(ret);
|
|
495
|
-
};
|
|
496
|
-
imports.wbg.__wbg_new_a12002a7f91c75be = function(arg0) {
|
|
497
|
-
const ret = new Uint8Array(getObject(arg0));
|
|
498
|
-
return addHeapObject(ret);
|
|
499
|
-
};
|
|
500
|
-
imports.wbg.__wbg_newnoargs_105ed471475aaf50 = function(arg0, arg1) {
|
|
501
|
-
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
502
|
-
return addHeapObject(ret);
|
|
503
|
-
};
|
|
504
|
-
imports.wbg.__wbg_next_25feadfc0913fea9 = function(arg0) {
|
|
505
|
-
const ret = getObject(arg0).next;
|
|
506
|
-
return addHeapObject(ret);
|
|
507
|
-
};
|
|
508
|
-
imports.wbg.__wbg_next_6574e1a8a62d1055 = function() { return handleError(function (arg0) {
|
|
509
|
-
const ret = getObject(arg0).next();
|
|
510
|
-
return addHeapObject(ret);
|
|
511
|
-
}, arguments) };
|
|
512
|
-
imports.wbg.__wbg_now_2c95c9de01293173 = function(arg0) {
|
|
513
|
-
const ret = getObject(arg0).now();
|
|
514
|
-
return ret;
|
|
515
|
-
};
|
|
516
|
-
imports.wbg.__wbg_performance_7a3ffd0b17f663ad = function(arg0) {
|
|
517
|
-
const ret = getObject(arg0).performance;
|
|
518
|
-
return addHeapObject(ret);
|
|
519
|
-
};
|
|
520
|
-
imports.wbg.__wbg_set_37837023f3d740e8 = function(arg0, arg1, arg2) {
|
|
521
|
-
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
522
|
-
};
|
|
523
|
-
imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
|
|
524
|
-
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
525
|
-
};
|
|
526
|
-
imports.wbg.__wbg_set_65595bdd868b3009 = function(arg0, arg1, arg2) {
|
|
527
|
-
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
528
|
-
};
|
|
529
|
-
imports.wbg.__wbg_set_8fc6bf8a5b1071d1 = function(arg0, arg1, arg2) {
|
|
530
|
-
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
|
531
|
-
return addHeapObject(ret);
|
|
532
|
-
};
|
|
533
|
-
imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
|
|
534
|
-
const ret = getObject(arg1).stack;
|
|
535
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
536
|
-
const len1 = WASM_VECTOR_LEN;
|
|
537
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
538
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
539
|
-
};
|
|
540
|
-
imports.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function() {
|
|
541
|
-
const ret = typeof global === 'undefined' ? null : global;
|
|
542
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
543
|
-
};
|
|
544
|
-
imports.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function() {
|
|
545
|
-
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
546
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
547
|
-
};
|
|
548
|
-
imports.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function() {
|
|
549
|
-
const ret = typeof self === 'undefined' ? null : self;
|
|
550
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
551
|
-
};
|
|
552
|
-
imports.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function() {
|
|
553
|
-
const ret = typeof window === 'undefined' ? null : window;
|
|
554
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
555
|
-
};
|
|
556
|
-
imports.wbg.__wbg_value_cd1ffa7b1ab794f1 = function(arg0) {
|
|
557
|
-
const ret = getObject(arg0).value;
|
|
558
|
-
return addHeapObject(ret);
|
|
559
|
-
};
|
|
560
|
-
imports.wbg.__wbindgen_as_number = function(arg0) {
|
|
561
|
-
const ret = +getObject(arg0);
|
|
562
|
-
return ret;
|
|
563
|
-
};
|
|
564
|
-
imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {
|
|
565
|
-
const ret = arg0;
|
|
566
|
-
return addHeapObject(ret);
|
|
567
|
-
};
|
|
568
|
-
imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
569
|
-
const ret = BigInt.asUintN(64, arg0);
|
|
570
|
-
return addHeapObject(ret);
|
|
571
|
-
};
|
|
572
|
-
imports.wbg.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
|
|
573
|
-
const v = getObject(arg1);
|
|
574
|
-
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
575
|
-
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
576
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
577
|
-
};
|
|
578
|
-
imports.wbg.__wbindgen_boolean_get = function(arg0) {
|
|
579
|
-
const v = getObject(arg0);
|
|
580
|
-
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
581
|
-
return ret;
|
|
582
|
-
};
|
|
583
|
-
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
584
|
-
const ret = debugString(getObject(arg1));
|
|
585
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
586
|
-
const len1 = WASM_VECTOR_LEN;
|
|
587
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
588
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
589
|
-
};
|
|
590
|
-
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
|
591
|
-
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
592
|
-
return addHeapObject(ret);
|
|
593
|
-
};
|
|
594
|
-
imports.wbg.__wbindgen_in = function(arg0, arg1) {
|
|
595
|
-
const ret = getObject(arg0) in getObject(arg1);
|
|
596
|
-
return ret;
|
|
597
|
-
};
|
|
598
|
-
imports.wbg.__wbindgen_is_bigint = function(arg0) {
|
|
599
|
-
const ret = typeof(getObject(arg0)) === 'bigint';
|
|
600
|
-
return ret;
|
|
601
|
-
};
|
|
602
|
-
imports.wbg.__wbindgen_is_function = function(arg0) {
|
|
603
|
-
const ret = typeof(getObject(arg0)) === 'function';
|
|
604
|
-
return ret;
|
|
605
|
-
};
|
|
606
|
-
imports.wbg.__wbindgen_is_object = function(arg0) {
|
|
607
|
-
const val = getObject(arg0);
|
|
608
|
-
const ret = typeof(val) === 'object' && val !== null;
|
|
609
|
-
return ret;
|
|
610
|
-
};
|
|
611
|
-
imports.wbg.__wbindgen_is_string = function(arg0) {
|
|
612
|
-
const ret = typeof(getObject(arg0)) === 'string';
|
|
613
|
-
return ret;
|
|
614
|
-
};
|
|
615
|
-
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
|
616
|
-
const ret = getObject(arg0) === undefined;
|
|
617
|
-
return ret;
|
|
618
|
-
};
|
|
619
|
-
imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
|
|
620
|
-
const ret = getObject(arg0) === getObject(arg1);
|
|
621
|
-
return ret;
|
|
622
|
-
};
|
|
623
|
-
imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
|
|
624
|
-
const ret = getObject(arg0) == getObject(arg1);
|
|
625
|
-
return ret;
|
|
626
|
-
};
|
|
627
|
-
imports.wbg.__wbindgen_memory = function() {
|
|
628
|
-
const ret = wasm.memory;
|
|
629
|
-
return addHeapObject(ret);
|
|
630
|
-
};
|
|
631
|
-
imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
|
|
632
|
-
const obj = getObject(arg1);
|
|
633
|
-
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
634
|
-
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
635
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
636
|
-
};
|
|
637
|
-
imports.wbg.__wbindgen_number_new = function(arg0) {
|
|
638
|
-
const ret = arg0;
|
|
639
|
-
return addHeapObject(ret);
|
|
640
|
-
};
|
|
641
|
-
imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
|
|
642
|
-
const ret = getObject(arg0);
|
|
643
|
-
return addHeapObject(ret);
|
|
644
|
-
};
|
|
645
|
-
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
646
|
-
takeObject(arg0);
|
|
647
|
-
};
|
|
648
|
-
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
649
|
-
const obj = getObject(arg1);
|
|
650
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
651
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
652
|
-
var len1 = WASM_VECTOR_LEN;
|
|
653
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
654
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
655
|
-
};
|
|
656
|
-
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
657
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
658
|
-
return addHeapObject(ret);
|
|
659
|
-
};
|
|
660
|
-
imports.wbg.__wbindgen_throw = function(arg0, arg1) {
|
|
661
|
-
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
662
|
-
};
|
|
663
|
-
|
|
664
|
-
return imports;
|
|
665
|
-
}
|
|
666
|
-
|
|
667
|
-
function __wbg_init_memory(imports, memory) {
|
|
668
|
-
|
|
669
|
-
}
|
|
670
|
-
|
|
671
|
-
function __wbg_finalize_init(instance, module) {
|
|
672
|
-
wasm = instance.exports;
|
|
673
|
-
__wbg_init.__wbindgen_wasm_module = module;
|
|
674
|
-
cachedDataViewMemory0 = null;
|
|
675
|
-
cachedUint8ArrayMemory0 = null;
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
return wasm;
|
|
676
|
+
return false;
|
|
677
|
+
}
|
|
680
678
|
}
|
|
681
679
|
|
|
682
680
|
function initSync(module) {
|
|
683
681
|
if (wasm !== undefined) return wasm;
|
|
684
682
|
|
|
685
683
|
|
|
686
|
-
if (
|
|
684
|
+
if (module !== undefined) {
|
|
687
685
|
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
688
686
|
({module} = module)
|
|
689
687
|
} else {
|
|
@@ -692,15 +690,10 @@ function initSync(module) {
|
|
|
692
690
|
}
|
|
693
691
|
|
|
694
692
|
const imports = __wbg_get_imports();
|
|
695
|
-
|
|
696
|
-
__wbg_init_memory(imports);
|
|
697
|
-
|
|
698
693
|
if (!(module instanceof WebAssembly.Module)) {
|
|
699
694
|
module = new WebAssembly.Module(module);
|
|
700
695
|
}
|
|
701
|
-
|
|
702
696
|
const instance = new WebAssembly.Instance(module, imports);
|
|
703
|
-
|
|
704
697
|
return __wbg_finalize_init(instance, module);
|
|
705
698
|
}
|
|
706
699
|
|
|
@@ -708,7 +701,7 @@ async function __wbg_init(module_or_path) {
|
|
|
708
701
|
if (wasm !== undefined) return wasm;
|
|
709
702
|
|
|
710
703
|
|
|
711
|
-
if (
|
|
704
|
+
if (module_or_path !== undefined) {
|
|
712
705
|
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
713
706
|
({module_or_path} = module_or_path)
|
|
714
707
|
} else {
|
|
@@ -716,7 +709,7 @@ async function __wbg_init(module_or_path) {
|
|
|
716
709
|
}
|
|
717
710
|
}
|
|
718
711
|
|
|
719
|
-
if (
|
|
712
|
+
if (module_or_path === undefined) {
|
|
720
713
|
module_or_path = new URL('chai_bg.wasm', import.meta.url);
|
|
721
714
|
}
|
|
722
715
|
const imports = __wbg_get_imports();
|
|
@@ -725,12 +718,9 @@ async function __wbg_init(module_or_path) {
|
|
|
725
718
|
module_or_path = fetch(module_or_path);
|
|
726
719
|
}
|
|
727
720
|
|
|
728
|
-
__wbg_init_memory(imports);
|
|
729
|
-
|
|
730
721
|
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
731
722
|
|
|
732
723
|
return __wbg_finalize_init(instance, module);
|
|
733
724
|
}
|
|
734
725
|
|
|
735
|
-
export { initSync };
|
|
736
|
-
export default __wbg_init;
|
|
726
|
+
export { initSync, __wbg_init as default };
|
package/chai_bg.wasm
CHANGED
|
Binary file
|