@flipt-io/flipt-client-js 0.3.0 → 0.4.1
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/README.md +69 -0
- package/dist/browser/index.cjs +434 -441
- package/dist/browser/index.mjs +434 -441
- package/dist/flipt_engine_wasm_js_bg.wasm +0 -0
- package/dist/node/index.cjs +434 -441
- package/dist/node/index.mjs +434 -441
- package/dist/slim/index.cjs +433 -440
- package/dist/slim/index.mjs +433 -440
- package/dist/types/index.d.ts +2 -0
- package/dist/types/types.d.ts +10 -0
- package/package.json +12 -4
package/dist/slim/index.mjs
CHANGED
|
@@ -1,122 +1,337 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
let cachedUint8ArrayMemory0 = null;
|
|
1
|
+
/* @ts-self-types="./flipt_engine_wasm_js.d.ts" */
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
class Engine {
|
|
4
|
+
__destroy_into_raw() {
|
|
5
|
+
const ptr = this.__wbg_ptr;
|
|
6
|
+
this.__wbg_ptr = 0;
|
|
7
|
+
EngineFinalization.unregister(this);
|
|
8
|
+
return ptr;
|
|
8
9
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
13
|
-
|
|
14
|
-
cachedTextDecoder.decode();
|
|
15
|
-
|
|
16
|
-
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
17
|
-
let numBytesDecoded = 0;
|
|
18
|
-
function decodeText(ptr, len) {
|
|
19
|
-
numBytesDecoded += len;
|
|
20
|
-
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
21
|
-
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
22
|
-
cachedTextDecoder.decode();
|
|
23
|
-
numBytesDecoded = len;
|
|
10
|
+
free() {
|
|
11
|
+
const ptr = this.__destroy_into_raw();
|
|
12
|
+
wasm.__wbg_engine_free(ptr, 0);
|
|
24
13
|
}
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const cachedTextEncoder = new TextEncoder();
|
|
36
|
-
|
|
37
|
-
if (!('encodeInto' in cachedTextEncoder)) {
|
|
38
|
-
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
39
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
40
|
-
view.set(buf);
|
|
41
|
-
return {
|
|
42
|
-
read: arg.length,
|
|
43
|
-
written: buf.length
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
function passStringToWasm0(arg, malloc, realloc) {
|
|
49
|
-
|
|
50
|
-
if (realloc === undefined) {
|
|
51
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
52
|
-
const ptr = malloc(buf.length, 1) >>> 0;
|
|
53
|
-
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
54
|
-
WASM_VECTOR_LEN = buf.length;
|
|
55
|
-
return ptr;
|
|
14
|
+
/**
|
|
15
|
+
* @param {any} request
|
|
16
|
+
* @returns {any}
|
|
17
|
+
*/
|
|
18
|
+
evaluate_batch(request) {
|
|
19
|
+
const ret = wasm.engine_evaluate_batch(this.__wbg_ptr, request);
|
|
20
|
+
if (ret[2]) {
|
|
21
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
22
|
+
}
|
|
23
|
+
return takeFromExternrefTable0(ret[0]);
|
|
56
24
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
if (code > 0x7F) break;
|
|
68
|
-
mem[ptr + offset] = code;
|
|
25
|
+
/**
|
|
26
|
+
* @param {any} request
|
|
27
|
+
* @returns {any}
|
|
28
|
+
*/
|
|
29
|
+
evaluate_boolean(request) {
|
|
30
|
+
const ret = wasm.engine_evaluate_boolean(this.__wbg_ptr, request);
|
|
31
|
+
if (ret[2]) {
|
|
32
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
33
|
+
}
|
|
34
|
+
return takeFromExternrefTable0(ret[0]);
|
|
69
35
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
36
|
+
/**
|
|
37
|
+
* @param {any} request
|
|
38
|
+
* @returns {any}
|
|
39
|
+
*/
|
|
40
|
+
evaluate_variant(request) {
|
|
41
|
+
const ret = wasm.engine_evaluate_variant(this.__wbg_ptr, request);
|
|
42
|
+
if (ret[2]) {
|
|
43
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
44
|
+
}
|
|
45
|
+
return takeFromExternrefTable0(ret[0]);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* @returns {any}
|
|
49
|
+
*/
|
|
50
|
+
list_flags() {
|
|
51
|
+
const ret = wasm.engine_list_flags(this.__wbg_ptr);
|
|
52
|
+
if (ret[2]) {
|
|
53
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
54
|
+
}
|
|
55
|
+
return takeFromExternrefTable0(ret[0]);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* @param {string} namespace
|
|
59
|
+
*/
|
|
60
|
+
constructor(namespace) {
|
|
61
|
+
const ptr0 = passStringToWasm0(namespace, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
62
|
+
const len0 = WASM_VECTOR_LEN;
|
|
63
|
+
const ret = wasm.engine_new(ptr0, len0);
|
|
64
|
+
this.__wbg_ptr = ret >>> 0;
|
|
65
|
+
EngineFinalization.register(this, this.__wbg_ptr, this);
|
|
66
|
+
return this;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* @param {any} data
|
|
70
|
+
*/
|
|
71
|
+
snapshot(data) {
|
|
72
|
+
const ret = wasm.engine_snapshot(this.__wbg_ptr, data);
|
|
73
|
+
if (ret[1]) {
|
|
74
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
74
75
|
}
|
|
75
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
76
|
-
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
77
|
-
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
78
|
-
|
|
79
|
-
offset += ret.written;
|
|
80
|
-
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
81
76
|
}
|
|
82
|
-
|
|
83
|
-
WASM_VECTOR_LEN = offset;
|
|
84
|
-
return ptr;
|
|
85
77
|
}
|
|
78
|
+
if (Symbol.dispose) Engine.prototype[Symbol.dispose] = Engine.prototype.free;
|
|
86
79
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
80
|
+
function __wbg_get_imports() {
|
|
81
|
+
const import0 = {
|
|
82
|
+
__proto__: null,
|
|
83
|
+
__wbg_Error_55538483de6e3abe: function(arg0, arg1) {
|
|
84
|
+
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
85
|
+
return ret;
|
|
86
|
+
},
|
|
87
|
+
__wbg_String_8564e559799eccda: function(arg0, arg1) {
|
|
88
|
+
const ret = String(arg1);
|
|
89
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
90
|
+
const len1 = WASM_VECTOR_LEN;
|
|
91
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
92
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
93
|
+
},
|
|
94
|
+
__wbg___wbindgen_boolean_get_fe2a24fdfdb4064f: function(arg0) {
|
|
95
|
+
const v = arg0;
|
|
96
|
+
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
97
|
+
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
98
|
+
},
|
|
99
|
+
__wbg___wbindgen_debug_string_d89627202d0155b7: function(arg0, arg1) {
|
|
100
|
+
const ret = debugString(arg1);
|
|
101
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
102
|
+
const len1 = WASM_VECTOR_LEN;
|
|
103
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
104
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
105
|
+
},
|
|
106
|
+
__wbg___wbindgen_in_fe3eb6a509f75744: function(arg0, arg1) {
|
|
107
|
+
const ret = arg0 in arg1;
|
|
108
|
+
return ret;
|
|
109
|
+
},
|
|
110
|
+
__wbg___wbindgen_is_function_2a95406423ea8626: function(arg0) {
|
|
111
|
+
const ret = typeof(arg0) === 'function';
|
|
112
|
+
return ret;
|
|
113
|
+
},
|
|
114
|
+
__wbg___wbindgen_is_object_59a002e76b059312: function(arg0) {
|
|
115
|
+
const val = arg0;
|
|
116
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
117
|
+
return ret;
|
|
118
|
+
},
|
|
119
|
+
__wbg___wbindgen_is_string_624d5244bb2bc87c: function(arg0) {
|
|
120
|
+
const ret = typeof(arg0) === 'string';
|
|
121
|
+
return ret;
|
|
122
|
+
},
|
|
123
|
+
__wbg___wbindgen_is_undefined_87a3a837f331fef5: function(arg0) {
|
|
124
|
+
const ret = arg0 === undefined;
|
|
125
|
+
return ret;
|
|
126
|
+
},
|
|
127
|
+
__wbg___wbindgen_jsval_loose_eq_cf851f110c48f9ba: function(arg0, arg1) {
|
|
128
|
+
const ret = arg0 == arg1;
|
|
129
|
+
return ret;
|
|
130
|
+
},
|
|
131
|
+
__wbg___wbindgen_number_get_769f3676dc20c1d7: function(arg0, arg1) {
|
|
132
|
+
const obj = arg1;
|
|
133
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
134
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
135
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
136
|
+
},
|
|
137
|
+
__wbg___wbindgen_string_get_f1161390414f9b59: function(arg0, arg1) {
|
|
138
|
+
const obj = arg1;
|
|
139
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
140
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
141
|
+
var len1 = WASM_VECTOR_LEN;
|
|
142
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
143
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
144
|
+
},
|
|
145
|
+
__wbg___wbindgen_throw_5549492daedad139: function(arg0, arg1) {
|
|
146
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
147
|
+
},
|
|
148
|
+
__wbg_call_6ae20895a60069a2: function() { return handleError(function (arg0, arg1) {
|
|
149
|
+
const ret = arg0.call(arg1);
|
|
150
|
+
return ret;
|
|
151
|
+
}, arguments); },
|
|
152
|
+
__wbg_done_19f92cb1f8738aba: function(arg0) {
|
|
153
|
+
const ret = arg0.done;
|
|
154
|
+
return ret;
|
|
155
|
+
},
|
|
156
|
+
__wbg_entries_28ed7cb892e12eff: function(arg0) {
|
|
157
|
+
const ret = Object.entries(arg0);
|
|
158
|
+
return ret;
|
|
159
|
+
},
|
|
160
|
+
__wbg_error_a6fa202b58aa1cd3: function(arg0, arg1) {
|
|
161
|
+
let deferred0_0;
|
|
162
|
+
let deferred0_1;
|
|
163
|
+
try {
|
|
164
|
+
deferred0_0 = arg0;
|
|
165
|
+
deferred0_1 = arg1;
|
|
166
|
+
console.error(getStringFromWasm0(arg0, arg1));
|
|
167
|
+
} finally {
|
|
168
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
__wbg_getTime_c3af35594e283356: function(arg0) {
|
|
172
|
+
const ret = arg0.getTime();
|
|
173
|
+
return ret;
|
|
174
|
+
},
|
|
175
|
+
__wbg_get_94f5fc088edd3138: function(arg0, arg1) {
|
|
176
|
+
const ret = arg0[arg1 >>> 0];
|
|
177
|
+
return ret;
|
|
178
|
+
},
|
|
179
|
+
__wbg_get_a50328e7325d7f9b: function() { return handleError(function (arg0, arg1) {
|
|
180
|
+
const ret = Reflect.get(arg0, arg1);
|
|
181
|
+
return ret;
|
|
182
|
+
}, arguments); },
|
|
183
|
+
__wbg_get_unchecked_7c6bbabf5b0b1fbf: function(arg0, arg1) {
|
|
184
|
+
const ret = arg0[arg1 >>> 0];
|
|
185
|
+
return ret;
|
|
186
|
+
},
|
|
187
|
+
__wbg_get_with_ref_key_6412cf3094599694: function(arg0, arg1) {
|
|
188
|
+
const ret = arg0[arg1];
|
|
189
|
+
return ret;
|
|
190
|
+
},
|
|
191
|
+
__wbg_instanceof_ArrayBuffer_8d855993947fc3a2: function(arg0) {
|
|
192
|
+
let result;
|
|
193
|
+
try {
|
|
194
|
+
result = arg0 instanceof ArrayBuffer;
|
|
195
|
+
} catch (_) {
|
|
196
|
+
result = false;
|
|
197
|
+
}
|
|
198
|
+
const ret = result;
|
|
199
|
+
return ret;
|
|
200
|
+
},
|
|
201
|
+
__wbg_instanceof_Uint8Array_ce24d58a5f4bdcc3: function(arg0) {
|
|
202
|
+
let result;
|
|
203
|
+
try {
|
|
204
|
+
result = arg0 instanceof Uint8Array;
|
|
205
|
+
} catch (_) {
|
|
206
|
+
result = false;
|
|
207
|
+
}
|
|
208
|
+
const ret = result;
|
|
209
|
+
return ret;
|
|
210
|
+
},
|
|
211
|
+
__wbg_isArray_867202cf8f195ed8: function(arg0) {
|
|
212
|
+
const ret = Array.isArray(arg0);
|
|
213
|
+
return ret;
|
|
214
|
+
},
|
|
215
|
+
__wbg_iterator_54661826e186eb6a: function() {
|
|
216
|
+
const ret = Symbol.iterator;
|
|
217
|
+
return ret;
|
|
218
|
+
},
|
|
219
|
+
__wbg_length_e6e1633fbea6cfa9: function(arg0) {
|
|
220
|
+
const ret = arg0.length;
|
|
221
|
+
return ret;
|
|
222
|
+
},
|
|
223
|
+
__wbg_length_fae3e439140f48a4: function(arg0) {
|
|
224
|
+
const ret = arg0.length;
|
|
225
|
+
return ret;
|
|
226
|
+
},
|
|
227
|
+
__wbg_new_0_e649c99e7382313f: function() {
|
|
228
|
+
const ret = new Date();
|
|
229
|
+
return ret;
|
|
230
|
+
},
|
|
231
|
+
__wbg_new_1d96678aaacca32e: function(arg0) {
|
|
232
|
+
const ret = new Uint8Array(arg0);
|
|
233
|
+
return ret;
|
|
234
|
+
},
|
|
235
|
+
__wbg_new_227d7c05414eb861: function() {
|
|
236
|
+
const ret = new Error();
|
|
237
|
+
return ret;
|
|
238
|
+
},
|
|
239
|
+
__wbg_new_4370be21fa2b2f80: function() {
|
|
240
|
+
const ret = new Array();
|
|
241
|
+
return ret;
|
|
242
|
+
},
|
|
243
|
+
__wbg_new_48e1d86cfd30c8e7: function() {
|
|
244
|
+
const ret = new Object();
|
|
245
|
+
return ret;
|
|
246
|
+
},
|
|
247
|
+
__wbg_next_55d835fe0ab5b3e7: function(arg0) {
|
|
248
|
+
const ret = arg0.next;
|
|
249
|
+
return ret;
|
|
250
|
+
},
|
|
251
|
+
__wbg_next_e34cfb9df1518d7c: function() { return handleError(function (arg0) {
|
|
252
|
+
const ret = arg0.next();
|
|
253
|
+
return ret;
|
|
254
|
+
}, arguments); },
|
|
255
|
+
__wbg_now_e7c6795a7f81e10f: function(arg0) {
|
|
256
|
+
const ret = arg0.now();
|
|
257
|
+
return ret;
|
|
258
|
+
},
|
|
259
|
+
__wbg_performance_3fcf6e32a7e1ed0a: function(arg0) {
|
|
260
|
+
const ret = arg0.performance;
|
|
261
|
+
return ret;
|
|
262
|
+
},
|
|
263
|
+
__wbg_prototypesetcall_3875d54d12ef2eec: function(arg0, arg1, arg2) {
|
|
264
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
265
|
+
},
|
|
266
|
+
__wbg_set_4702dfa37c77f492: function(arg0, arg1, arg2) {
|
|
267
|
+
arg0[arg1 >>> 0] = arg2;
|
|
268
|
+
},
|
|
269
|
+
__wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
|
|
270
|
+
arg0[arg1] = arg2;
|
|
271
|
+
},
|
|
272
|
+
__wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
|
|
273
|
+
const ret = arg1.stack;
|
|
274
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
275
|
+
const len1 = WASM_VECTOR_LEN;
|
|
276
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
277
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
278
|
+
},
|
|
279
|
+
__wbg_static_accessor_GLOBAL_8dfb7f5e26ebe523: function() {
|
|
280
|
+
const ret = typeof global === 'undefined' ? null : global;
|
|
281
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
282
|
+
},
|
|
283
|
+
__wbg_static_accessor_GLOBAL_THIS_941154efc8395cdd: function() {
|
|
284
|
+
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
285
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
286
|
+
},
|
|
287
|
+
__wbg_static_accessor_SELF_58dac9af822f561f: function() {
|
|
288
|
+
const ret = typeof self === 'undefined' ? null : self;
|
|
289
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
290
|
+
},
|
|
291
|
+
__wbg_static_accessor_WINDOW_ee64f0b3d8354c0b: function() {
|
|
292
|
+
const ret = typeof window === 'undefined' ? null : window;
|
|
293
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
294
|
+
},
|
|
295
|
+
__wbg_value_d5b248ce8419bd1b: function(arg0) {
|
|
296
|
+
const ret = arg0.value;
|
|
297
|
+
return ret;
|
|
298
|
+
},
|
|
299
|
+
__wbindgen_cast_0000000000000001: function(arg0) {
|
|
300
|
+
// Cast intrinsic for `F64 -> Externref`.
|
|
301
|
+
const ret = arg0;
|
|
302
|
+
return ret;
|
|
303
|
+
},
|
|
304
|
+
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
305
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
306
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
307
|
+
return ret;
|
|
308
|
+
},
|
|
309
|
+
__wbindgen_init_externref_table: function() {
|
|
310
|
+
const table = wasm.__wbindgen_externrefs;
|
|
311
|
+
const offset = table.grow(4);
|
|
312
|
+
table.set(0, undefined);
|
|
313
|
+
table.set(offset + 0, undefined);
|
|
314
|
+
table.set(offset + 1, null);
|
|
315
|
+
table.set(offset + 2, true);
|
|
316
|
+
table.set(offset + 3, false);
|
|
317
|
+
},
|
|
318
|
+
};
|
|
319
|
+
return {
|
|
320
|
+
__proto__: null,
|
|
321
|
+
"./flipt_engine_wasm_js_bg.js": import0,
|
|
322
|
+
};
|
|
94
323
|
}
|
|
95
324
|
|
|
325
|
+
const EngineFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
326
|
+
? { register: () => {}, unregister: () => {} }
|
|
327
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_engine_free(ptr >>> 0, 1));
|
|
328
|
+
|
|
96
329
|
function addToExternrefTable0(obj) {
|
|
97
330
|
const idx = wasm.__externref_table_alloc();
|
|
98
|
-
wasm.
|
|
331
|
+
wasm.__wbindgen_externrefs.set(idx, obj);
|
|
99
332
|
return idx;
|
|
100
333
|
}
|
|
101
334
|
|
|
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 getArrayU8FromWasm0(ptr, len) {
|
|
112
|
-
ptr = ptr >>> 0;
|
|
113
|
-
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
function isLikeNone(x) {
|
|
117
|
-
return x === undefined || x === null;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
335
|
function debugString(val) {
|
|
121
336
|
// primitive types
|
|
122
337
|
const type = typeof val;
|
|
@@ -182,388 +397,166 @@ function debugString(val) {
|
|
|
182
397
|
return className;
|
|
183
398
|
}
|
|
184
399
|
|
|
185
|
-
function
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
return value;
|
|
400
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
401
|
+
ptr = ptr >>> 0;
|
|
402
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
189
403
|
}
|
|
190
404
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
405
|
+
let cachedDataViewMemory0 = null;
|
|
406
|
+
function getDataViewMemory0() {
|
|
407
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
408
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
409
|
+
}
|
|
410
|
+
return cachedDataViewMemory0;
|
|
411
|
+
}
|
|
194
412
|
|
|
195
|
-
|
|
413
|
+
function getStringFromWasm0(ptr, len) {
|
|
414
|
+
ptr = ptr >>> 0;
|
|
415
|
+
return decodeText(ptr, len);
|
|
416
|
+
}
|
|
196
417
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
return ptr;
|
|
418
|
+
let cachedUint8ArrayMemory0 = null;
|
|
419
|
+
function getUint8ArrayMemory0() {
|
|
420
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
421
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
202
422
|
}
|
|
423
|
+
return cachedUint8ArrayMemory0;
|
|
424
|
+
}
|
|
203
425
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
*/
|
|
211
|
-
constructor(namespace) {
|
|
212
|
-
const ptr0 = passStringToWasm0(namespace, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
213
|
-
const len0 = WASM_VECTOR_LEN;
|
|
214
|
-
const ret = wasm.engine_new(ptr0, len0);
|
|
215
|
-
this.__wbg_ptr = ret >>> 0;
|
|
216
|
-
EngineFinalization.register(this, this.__wbg_ptr, this);
|
|
217
|
-
return this;
|
|
218
|
-
}
|
|
219
|
-
/**
|
|
220
|
-
* @param {any} data
|
|
221
|
-
*/
|
|
222
|
-
snapshot(data) {
|
|
223
|
-
const ret = wasm.engine_snapshot(this.__wbg_ptr, data);
|
|
224
|
-
if (ret[1]) {
|
|
225
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
226
|
-
}
|
|
426
|
+
function handleError(f, args) {
|
|
427
|
+
try {
|
|
428
|
+
return f.apply(this, args);
|
|
429
|
+
} catch (e) {
|
|
430
|
+
const idx = addToExternrefTable0(e);
|
|
431
|
+
wasm.__wbindgen_exn_store(idx);
|
|
227
432
|
}
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
function isLikeNone(x) {
|
|
436
|
+
return x === undefined || x === null;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
440
|
+
if (realloc === undefined) {
|
|
441
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
442
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
443
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
444
|
+
WASM_VECTOR_LEN = buf.length;
|
|
445
|
+
return ptr;
|
|
238
446
|
}
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
447
|
+
|
|
448
|
+
let len = arg.length;
|
|
449
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
450
|
+
|
|
451
|
+
const mem = getUint8ArrayMemory0();
|
|
452
|
+
|
|
453
|
+
let offset = 0;
|
|
454
|
+
|
|
455
|
+
for (; offset < len; offset++) {
|
|
456
|
+
const code = arg.charCodeAt(offset);
|
|
457
|
+
if (code > 0x7F) break;
|
|
458
|
+
mem[ptr + offset] = code;
|
|
249
459
|
}
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
*/
|
|
254
|
-
evaluate_batch(request) {
|
|
255
|
-
const ret = wasm.engine_evaluate_batch(this.__wbg_ptr, request);
|
|
256
|
-
if (ret[2]) {
|
|
257
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
460
|
+
if (offset !== len) {
|
|
461
|
+
if (offset !== 0) {
|
|
462
|
+
arg = arg.slice(offset);
|
|
258
463
|
}
|
|
259
|
-
|
|
464
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
465
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
466
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
467
|
+
|
|
468
|
+
offset += ret.written;
|
|
469
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
260
470
|
}
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
471
|
+
|
|
472
|
+
WASM_VECTOR_LEN = offset;
|
|
473
|
+
return ptr;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
function takeFromExternrefTable0(idx) {
|
|
477
|
+
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
478
|
+
wasm.__externref_table_dealloc(idx);
|
|
479
|
+
return value;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
483
|
+
cachedTextDecoder.decode();
|
|
484
|
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
485
|
+
let numBytesDecoded = 0;
|
|
486
|
+
function decodeText(ptr, len) {
|
|
487
|
+
numBytesDecoded += len;
|
|
488
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
489
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
490
|
+
cachedTextDecoder.decode();
|
|
491
|
+
numBytesDecoded = len;
|
|
270
492
|
}
|
|
493
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
271
494
|
}
|
|
272
|
-
if (Symbol.dispose) Engine.prototype[Symbol.dispose] = Engine.prototype.free;
|
|
273
495
|
|
|
274
|
-
const
|
|
496
|
+
const cachedTextEncoder = new TextEncoder();
|
|
497
|
+
|
|
498
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
499
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
500
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
501
|
+
view.set(buf);
|
|
502
|
+
return {
|
|
503
|
+
read: arg.length,
|
|
504
|
+
written: buf.length
|
|
505
|
+
};
|
|
506
|
+
};
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
let WASM_VECTOR_LEN = 0;
|
|
510
|
+
|
|
511
|
+
let wasm;
|
|
512
|
+
function __wbg_finalize_init(instance, module) {
|
|
513
|
+
wasm = instance.exports;
|
|
514
|
+
cachedDataViewMemory0 = null;
|
|
515
|
+
cachedUint8ArrayMemory0 = null;
|
|
516
|
+
wasm.__wbindgen_start();
|
|
517
|
+
return wasm;
|
|
518
|
+
}
|
|
275
519
|
|
|
276
520
|
async function __wbg_load(module, imports) {
|
|
277
521
|
if (typeof Response === 'function' && module instanceof Response) {
|
|
278
522
|
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
279
523
|
try {
|
|
280
524
|
return await WebAssembly.instantiateStreaming(module, imports);
|
|
281
|
-
|
|
282
525
|
} catch (e) {
|
|
283
|
-
const validResponse = module.ok &&
|
|
526
|
+
const validResponse = module.ok && expectedResponseType(module.type);
|
|
284
527
|
|
|
285
528
|
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
286
529
|
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);
|
|
287
530
|
|
|
288
|
-
} else {
|
|
289
|
-
throw e;
|
|
290
|
-
}
|
|
531
|
+
} else { throw e; }
|
|
291
532
|
}
|
|
292
533
|
}
|
|
293
534
|
|
|
294
535
|
const bytes = await module.arrayBuffer();
|
|
295
536
|
return await WebAssembly.instantiate(bytes, imports);
|
|
296
|
-
|
|
297
537
|
} else {
|
|
298
538
|
const instance = await WebAssembly.instantiate(module, imports);
|
|
299
539
|
|
|
300
540
|
if (instance instanceof WebAssembly.Instance) {
|
|
301
541
|
return { instance, module };
|
|
302
|
-
|
|
303
542
|
} else {
|
|
304
543
|
return instance;
|
|
305
544
|
}
|
|
306
545
|
}
|
|
307
|
-
}
|
|
308
546
|
|
|
309
|
-
function
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
imports.wbg.__wbg_Error_e17e777aac105295 = function(arg0, arg1) {
|
|
313
|
-
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
314
|
-
return ret;
|
|
315
|
-
};
|
|
316
|
-
imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
|
|
317
|
-
const ret = String(arg1);
|
|
318
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
319
|
-
const len1 = WASM_VECTOR_LEN;
|
|
320
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
321
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
322
|
-
};
|
|
323
|
-
imports.wbg.__wbg_call_13410aac570ffff7 = function() { return handleError(function (arg0, arg1) {
|
|
324
|
-
const ret = arg0.call(arg1);
|
|
325
|
-
return ret;
|
|
326
|
-
}, arguments) };
|
|
327
|
-
imports.wbg.__wbg_done_75ed0ee6dd243d9d = function(arg0) {
|
|
328
|
-
const ret = arg0.done;
|
|
329
|
-
return ret;
|
|
330
|
-
};
|
|
331
|
-
imports.wbg.__wbg_entries_2be2f15bd5554996 = function(arg0) {
|
|
332
|
-
const ret = Object.entries(arg0);
|
|
333
|
-
return ret;
|
|
334
|
-
};
|
|
335
|
-
imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
|
|
336
|
-
let deferred0_0;
|
|
337
|
-
let deferred0_1;
|
|
338
|
-
try {
|
|
339
|
-
deferred0_0 = arg0;
|
|
340
|
-
deferred0_1 = arg1;
|
|
341
|
-
console.error(getStringFromWasm0(arg0, arg1));
|
|
342
|
-
} finally {
|
|
343
|
-
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
344
|
-
}
|
|
345
|
-
};
|
|
346
|
-
imports.wbg.__wbg_getTime_6bb3f64e0f18f817 = function(arg0) {
|
|
347
|
-
const ret = arg0.getTime();
|
|
348
|
-
return ret;
|
|
349
|
-
};
|
|
350
|
-
imports.wbg.__wbg_get_0da715ceaecea5c8 = function(arg0, arg1) {
|
|
351
|
-
const ret = arg0[arg1 >>> 0];
|
|
352
|
-
return ret;
|
|
353
|
-
};
|
|
354
|
-
imports.wbg.__wbg_get_458e874b43b18b25 = function() { return handleError(function (arg0, arg1) {
|
|
355
|
-
const ret = Reflect.get(arg0, arg1);
|
|
356
|
-
return ret;
|
|
357
|
-
}, arguments) };
|
|
358
|
-
imports.wbg.__wbg_getwithrefkey_1dc361bd10053bfe = function(arg0, arg1) {
|
|
359
|
-
const ret = arg0[arg1];
|
|
360
|
-
return ret;
|
|
361
|
-
};
|
|
362
|
-
imports.wbg.__wbg_instanceof_ArrayBuffer_67f3012529f6a2dd = function(arg0) {
|
|
363
|
-
let result;
|
|
364
|
-
try {
|
|
365
|
-
result = arg0 instanceof ArrayBuffer;
|
|
366
|
-
} catch (_) {
|
|
367
|
-
result = false;
|
|
547
|
+
function expectedResponseType(type) {
|
|
548
|
+
switch (type) {
|
|
549
|
+
case 'basic': case 'cors': case 'default': return true;
|
|
368
550
|
}
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
};
|
|
372
|
-
imports.wbg.__wbg_instanceof_Uint8Array_9a8378d955933db7 = function(arg0) {
|
|
373
|
-
let result;
|
|
374
|
-
try {
|
|
375
|
-
result = arg0 instanceof Uint8Array;
|
|
376
|
-
} catch (_) {
|
|
377
|
-
result = false;
|
|
378
|
-
}
|
|
379
|
-
const ret = result;
|
|
380
|
-
return ret;
|
|
381
|
-
};
|
|
382
|
-
imports.wbg.__wbg_isArray_030cce220591fb41 = function(arg0) {
|
|
383
|
-
const ret = Array.isArray(arg0);
|
|
384
|
-
return ret;
|
|
385
|
-
};
|
|
386
|
-
imports.wbg.__wbg_iterator_f370b34483c71a1c = function() {
|
|
387
|
-
const ret = Symbol.iterator;
|
|
388
|
-
return ret;
|
|
389
|
-
};
|
|
390
|
-
imports.wbg.__wbg_length_186546c51cd61acd = function(arg0) {
|
|
391
|
-
const ret = arg0.length;
|
|
392
|
-
return ret;
|
|
393
|
-
};
|
|
394
|
-
imports.wbg.__wbg_length_6bb7e81f9d7713e4 = function(arg0) {
|
|
395
|
-
const ret = arg0.length;
|
|
396
|
-
return ret;
|
|
397
|
-
};
|
|
398
|
-
imports.wbg.__wbg_new0_b0a0a38c201e6df5 = function() {
|
|
399
|
-
const ret = new Date();
|
|
400
|
-
return ret;
|
|
401
|
-
};
|
|
402
|
-
imports.wbg.__wbg_new_19c25a3f2fa63a02 = function() {
|
|
403
|
-
const ret = new Object();
|
|
404
|
-
return ret;
|
|
405
|
-
};
|
|
406
|
-
imports.wbg.__wbg_new_1f3a344cf3123716 = function() {
|
|
407
|
-
const ret = new Array();
|
|
408
|
-
return ret;
|
|
409
|
-
};
|
|
410
|
-
imports.wbg.__wbg_new_638ebfaedbf32a5e = function(arg0) {
|
|
411
|
-
const ret = new Uint8Array(arg0);
|
|
412
|
-
return ret;
|
|
413
|
-
};
|
|
414
|
-
imports.wbg.__wbg_new_8a6f238a6ece86ea = function() {
|
|
415
|
-
const ret = new Error();
|
|
416
|
-
return ret;
|
|
417
|
-
};
|
|
418
|
-
imports.wbg.__wbg_newnoargs_254190557c45b4ec = function(arg0, arg1) {
|
|
419
|
-
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
420
|
-
return ret;
|
|
421
|
-
};
|
|
422
|
-
imports.wbg.__wbg_next_5b3530e612fde77d = function(arg0) {
|
|
423
|
-
const ret = arg0.next;
|
|
424
|
-
return ret;
|
|
425
|
-
};
|
|
426
|
-
imports.wbg.__wbg_next_692e82279131b03c = function() { return handleError(function (arg0) {
|
|
427
|
-
const ret = arg0.next();
|
|
428
|
-
return ret;
|
|
429
|
-
}, arguments) };
|
|
430
|
-
imports.wbg.__wbg_now_2c95c9de01293173 = function(arg0) {
|
|
431
|
-
const ret = arg0.now();
|
|
432
|
-
return ret;
|
|
433
|
-
};
|
|
434
|
-
imports.wbg.__wbg_performance_7a3ffd0b17f663ad = function(arg0) {
|
|
435
|
-
const ret = arg0.performance;
|
|
436
|
-
return ret;
|
|
437
|
-
};
|
|
438
|
-
imports.wbg.__wbg_prototypesetcall_3d4a26c1ed734349 = function(arg0, arg1, arg2) {
|
|
439
|
-
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
440
|
-
};
|
|
441
|
-
imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
|
|
442
|
-
arg0[arg1] = arg2;
|
|
443
|
-
};
|
|
444
|
-
imports.wbg.__wbg_set_90f6c0f7bd8c0415 = function(arg0, arg1, arg2) {
|
|
445
|
-
arg0[arg1 >>> 0] = arg2;
|
|
446
|
-
};
|
|
447
|
-
imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
|
|
448
|
-
const ret = arg1.stack;
|
|
449
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
450
|
-
const len1 = WASM_VECTOR_LEN;
|
|
451
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
452
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
453
|
-
};
|
|
454
|
-
imports.wbg.__wbg_static_accessor_GLOBAL_8921f820c2ce3f12 = function() {
|
|
455
|
-
const ret = typeof global === 'undefined' ? null : global;
|
|
456
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
457
|
-
};
|
|
458
|
-
imports.wbg.__wbg_static_accessor_GLOBAL_THIS_f0a4409105898184 = function() {
|
|
459
|
-
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
460
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
461
|
-
};
|
|
462
|
-
imports.wbg.__wbg_static_accessor_SELF_995b214ae681ff99 = function() {
|
|
463
|
-
const ret = typeof self === 'undefined' ? null : self;
|
|
464
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
465
|
-
};
|
|
466
|
-
imports.wbg.__wbg_static_accessor_WINDOW_cde3890479c675ea = function() {
|
|
467
|
-
const ret = typeof window === 'undefined' ? null : window;
|
|
468
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
469
|
-
};
|
|
470
|
-
imports.wbg.__wbg_value_dd9372230531eade = function(arg0) {
|
|
471
|
-
const ret = arg0.value;
|
|
472
|
-
return ret;
|
|
473
|
-
};
|
|
474
|
-
imports.wbg.__wbg_wbindgenbooleanget_3fe6f642c7d97746 = function(arg0) {
|
|
475
|
-
const v = arg0;
|
|
476
|
-
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
477
|
-
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
478
|
-
};
|
|
479
|
-
imports.wbg.__wbg_wbindgendebugstring_99ef257a3ddda34d = function(arg0, arg1) {
|
|
480
|
-
const ret = debugString(arg1);
|
|
481
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
482
|
-
const len1 = WASM_VECTOR_LEN;
|
|
483
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
484
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
485
|
-
};
|
|
486
|
-
imports.wbg.__wbg_wbindgenin_d7a1ee10933d2d55 = function(arg0, arg1) {
|
|
487
|
-
const ret = arg0 in arg1;
|
|
488
|
-
return ret;
|
|
489
|
-
};
|
|
490
|
-
imports.wbg.__wbg_wbindgenisfunction_8cee7dce3725ae74 = function(arg0) {
|
|
491
|
-
const ret = typeof(arg0) === 'function';
|
|
492
|
-
return ret;
|
|
493
|
-
};
|
|
494
|
-
imports.wbg.__wbg_wbindgenisobject_307a53c6bd97fbf8 = function(arg0) {
|
|
495
|
-
const val = arg0;
|
|
496
|
-
const ret = typeof(val) === 'object' && val !== null;
|
|
497
|
-
return ret;
|
|
498
|
-
};
|
|
499
|
-
imports.wbg.__wbg_wbindgenisstring_d4fa939789f003b0 = function(arg0) {
|
|
500
|
-
const ret = typeof(arg0) === 'string';
|
|
501
|
-
return ret;
|
|
502
|
-
};
|
|
503
|
-
imports.wbg.__wbg_wbindgenisundefined_c4b71d073b92f3c5 = function(arg0) {
|
|
504
|
-
const ret = arg0 === undefined;
|
|
505
|
-
return ret;
|
|
506
|
-
};
|
|
507
|
-
imports.wbg.__wbg_wbindgenjsvallooseeq_9bec8c9be826bed1 = function(arg0, arg1) {
|
|
508
|
-
const ret = arg0 == arg1;
|
|
509
|
-
return ret;
|
|
510
|
-
};
|
|
511
|
-
imports.wbg.__wbg_wbindgennumberget_f74b4c7525ac05cb = function(arg0, arg1) {
|
|
512
|
-
const obj = arg1;
|
|
513
|
-
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
514
|
-
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
515
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
516
|
-
};
|
|
517
|
-
imports.wbg.__wbg_wbindgenstringget_0f16a6ddddef376f = function(arg0, arg1) {
|
|
518
|
-
const obj = arg1;
|
|
519
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
520
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
521
|
-
var len1 = WASM_VECTOR_LEN;
|
|
522
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
523
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
524
|
-
};
|
|
525
|
-
imports.wbg.__wbg_wbindgenthrow_451ec1a8469d7eb6 = function(arg0, arg1) {
|
|
526
|
-
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
527
|
-
};
|
|
528
|
-
imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
529
|
-
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
530
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
531
|
-
return ret;
|
|
532
|
-
};
|
|
533
|
-
imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
|
|
534
|
-
// Cast intrinsic for `F64 -> Externref`.
|
|
535
|
-
const ret = arg0;
|
|
536
|
-
return ret;
|
|
537
|
-
};
|
|
538
|
-
imports.wbg.__wbindgen_init_externref_table = function() {
|
|
539
|
-
const table = wasm.__wbindgen_export_4;
|
|
540
|
-
const offset = table.grow(4);
|
|
541
|
-
table.set(0, undefined);
|
|
542
|
-
table.set(offset + 0, undefined);
|
|
543
|
-
table.set(offset + 1, null);
|
|
544
|
-
table.set(offset + 2, true);
|
|
545
|
-
table.set(offset + 3, false);
|
|
546
|
-
};
|
|
547
|
-
|
|
548
|
-
return imports;
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
function __wbg_finalize_init(instance, module) {
|
|
552
|
-
wasm = instance.exports;
|
|
553
|
-
__wbg_init.__wbindgen_wasm_module = module;
|
|
554
|
-
cachedDataViewMemory0 = null;
|
|
555
|
-
cachedUint8ArrayMemory0 = null;
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
wasm.__wbindgen_start();
|
|
559
|
-
return wasm;
|
|
551
|
+
return false;
|
|
552
|
+
}
|
|
560
553
|
}
|
|
561
554
|
|
|
562
555
|
async function __wbg_init(module_or_path) {
|
|
563
556
|
if (wasm !== undefined) return wasm;
|
|
564
557
|
|
|
565
558
|
|
|
566
|
-
if (
|
|
559
|
+
if (module_or_path !== undefined) {
|
|
567
560
|
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
568
561
|
({module_or_path} = module_or_path);
|
|
569
562
|
} else {
|
|
@@ -571,7 +564,7 @@ async function __wbg_init(module_or_path) {
|
|
|
571
564
|
}
|
|
572
565
|
}
|
|
573
566
|
|
|
574
|
-
if (
|
|
567
|
+
if (module_or_path === undefined) {
|
|
575
568
|
module_or_path = new URL('flipt_engine_wasm_js_bg.wasm', import.meta.url);
|
|
576
569
|
}
|
|
577
570
|
const imports = __wbg_get_imports();
|
|
@@ -582,7 +575,7 @@ async function __wbg_init(module_or_path) {
|
|
|
582
575
|
|
|
583
576
|
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
584
577
|
|
|
585
|
-
return __wbg_finalize_init(instance
|
|
578
|
+
return __wbg_finalize_init(instance);
|
|
586
579
|
}
|
|
587
580
|
|
|
588
581
|
/**
|