@iyulab/u-numflow 0.7.0 → 0.9.0
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 +98 -13
- package/node/u_numflow.cjs +500 -40
- package/node/u_numflow.d.cts +120 -9
- package/node/u_numflow_bg.wasm +0 -0
- package/package.json +1 -1
- package/u_numflow.d.ts +120 -9
- package/u_numflow.js +1 -1
- package/u_numflow_bg.js +490 -39
- package/u_numflow_bg.wasm +0 -0
package/u_numflow_bg.js
CHANGED
|
@@ -7,20 +7,18 @@
|
|
|
7
7
|
* Throws `non_positive_data`, `value_not_finite` or `insufficient_data` when
|
|
8
8
|
* data contains a value ≤ 0, a NaN or infinity, or fewer than 2 elements, and
|
|
9
9
|
* `invalid_transform` when a result is not finite.
|
|
10
|
-
* @param {Float64Array} data
|
|
10
|
+
* @param {number[] | Float64Array} data
|
|
11
11
|
* @param {number} lambda
|
|
12
12
|
* @returns {Float64Array}
|
|
13
13
|
*/
|
|
14
14
|
export function box_cox(data, lambda) {
|
|
15
|
-
const
|
|
16
|
-
const len0 = WASM_VECTOR_LEN;
|
|
17
|
-
const ret = wasm.box_cox(ptr0, len0, lambda);
|
|
15
|
+
const ret = wasm.box_cox(data, lambda);
|
|
18
16
|
if (ret[3]) {
|
|
19
17
|
throw takeFromExternrefTable0(ret[2]);
|
|
20
18
|
}
|
|
21
|
-
var
|
|
19
|
+
var v1 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
|
|
22
20
|
wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
|
|
23
|
-
return
|
|
21
|
+
return v1;
|
|
24
22
|
}
|
|
25
23
|
|
|
26
24
|
/**
|
|
@@ -58,6 +56,87 @@ export function chi_squared_quantile(p, k) {
|
|
|
58
56
|
return ret[0];
|
|
59
57
|
}
|
|
60
58
|
|
|
59
|
+
/**
|
|
60
|
+
* `P(X ≤ x)` for the distribution `{ kind, ...parameters }`.
|
|
61
|
+
*
|
|
62
|
+
* # Errors
|
|
63
|
+
* As every `distribution` argument: `malformed_input` for a value that is
|
|
64
|
+
* not such an object, `unknown_option` for an unknown `kind` (with
|
|
65
|
+
* `expected`), `value_not_finite` for a NaN or infinite parameter,
|
|
66
|
+
* `parameter_out_of_range` for a parameter that must be `> 0`, and
|
|
67
|
+
* `invalid_option` for parameters out of order (`min < max`,
|
|
68
|
+
* `min ≤ mode ≤ max`). `x` NaN throws `value_not_finite`.
|
|
69
|
+
* @param {DistributionSpec} distribution
|
|
70
|
+
* @param {number} x
|
|
71
|
+
* @returns {number}
|
|
72
|
+
*/
|
|
73
|
+
export function distribution_cdf(distribution, x) {
|
|
74
|
+
const ret = wasm.distribution_cdf(distribution, x);
|
|
75
|
+
if (ret[2]) {
|
|
76
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
77
|
+
}
|
|
78
|
+
return ret[0];
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Mean and variance of `distribution` — also the way to check a
|
|
83
|
+
* specification before using it.
|
|
84
|
+
*
|
|
85
|
+
* # Errors
|
|
86
|
+
* As [`distribution_cdf`] for `distribution`.
|
|
87
|
+
* @param {DistributionSpec} distribution
|
|
88
|
+
* @returns {MomentsDto}
|
|
89
|
+
*/
|
|
90
|
+
export function distribution_moments(distribution) {
|
|
91
|
+
const ret = wasm.distribution_moments(distribution);
|
|
92
|
+
if (ret[2]) {
|
|
93
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
94
|
+
}
|
|
95
|
+
return takeFromExternrefTable0(ret[0]);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* The `x` with `P(X ≤ x) = p`.
|
|
100
|
+
*
|
|
101
|
+
* # Errors
|
|
102
|
+
* As [`distribution_cdf`] for `distribution`; `p` outside `(0, 1)` throws
|
|
103
|
+
* `parameter_out_of_range`.
|
|
104
|
+
* @param {DistributionSpec} distribution
|
|
105
|
+
* @param {number} p
|
|
106
|
+
* @returns {number}
|
|
107
|
+
*/
|
|
108
|
+
export function distribution_quantile(distribution, p) {
|
|
109
|
+
const ret = wasm.distribution_quantile(distribution, p);
|
|
110
|
+
if (ret[2]) {
|
|
111
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
112
|
+
}
|
|
113
|
+
return ret[0];
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* `n` random variates, reproducible from `seed`: the same `(distribution, n,
|
|
118
|
+
* seed)` always returns the same values. Uniforms are drawn from the open
|
|
119
|
+
* interval (0, 1), so no variate is infinite.
|
|
120
|
+
*
|
|
121
|
+
* # Errors
|
|
122
|
+
* As [`distribution_cdf`] for `distribution`; `n` not a whole number in
|
|
123
|
+
* `[0, 2³² − 1]` or `seed` not a whole number in `[0, 2⁵³]` throws
|
|
124
|
+
* `parameter_out_of_range`.
|
|
125
|
+
* @param {DistributionSpec} distribution
|
|
126
|
+
* @param {number} n
|
|
127
|
+
* @param {number} seed
|
|
128
|
+
* @returns {Float64Array}
|
|
129
|
+
*/
|
|
130
|
+
export function distribution_sample(distribution, n, seed) {
|
|
131
|
+
const ret = wasm.distribution_sample(distribution, n, seed);
|
|
132
|
+
if (ret[3]) {
|
|
133
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
134
|
+
}
|
|
135
|
+
var v1 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
|
|
136
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
|
|
137
|
+
return v1;
|
|
138
|
+
}
|
|
139
|
+
|
|
61
140
|
/**
|
|
62
141
|
* Estimate the optimal Box-Cox lambda via profile maximum likelihood.
|
|
63
142
|
*
|
|
@@ -70,15 +149,13 @@ export function chi_squared_quantile(p, k) {
|
|
|
70
149
|
* # Errors
|
|
71
150
|
* Throws as [`box_cox`] does for the data, and `invalid_lambda_range` when the
|
|
72
151
|
* range is not finite with `lambda_min < lambda_max`.
|
|
73
|
-
* @param {Float64Array} data
|
|
152
|
+
* @param {number[] | Float64Array} data
|
|
74
153
|
* @param {number} lambda_min
|
|
75
154
|
* @param {number} lambda_max
|
|
76
155
|
* @returns {LambdaEstimateDto}
|
|
77
156
|
*/
|
|
78
157
|
export function estimate_lambda(data, lambda_min, lambda_max) {
|
|
79
|
-
const
|
|
80
|
-
const len0 = WASM_VECTOR_LEN;
|
|
81
|
-
const ret = wasm.estimate_lambda(ptr0, len0, lambda_min, lambda_max);
|
|
158
|
+
const ret = wasm.estimate_lambda(data, lambda_min, lambda_max);
|
|
82
159
|
if (ret[2]) {
|
|
83
160
|
throw takeFromExternrefTable0(ret[1]);
|
|
84
161
|
}
|
|
@@ -122,6 +199,96 @@ export function f_distribution_quantile(p, df1, df2) {
|
|
|
122
199
|
return ret[0];
|
|
123
200
|
}
|
|
124
201
|
|
|
202
|
+
/**
|
|
203
|
+
* Points in `a` but not in `b`, in normal form — e.g. a reporting window
|
|
204
|
+
* minus down-time is up-time.
|
|
205
|
+
*
|
|
206
|
+
* # Errors
|
|
207
|
+
* As [`interval_normalize`], naming `a` or `b`.
|
|
208
|
+
* @param {[number, number][]} a
|
|
209
|
+
* @param {[number, number][]} b
|
|
210
|
+
* @returns {[number, number][]}
|
|
211
|
+
*/
|
|
212
|
+
export function interval_difference(a, b) {
|
|
213
|
+
const ret = wasm.interval_difference(a, b);
|
|
214
|
+
if (ret[2]) {
|
|
215
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
216
|
+
}
|
|
217
|
+
return takeFromExternrefTable0(ret[0]);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Points in both `a` and `b`, in normal form. Clipping to a window is
|
|
222
|
+
* `interval_intersection(a, [[from, to]])`.
|
|
223
|
+
*
|
|
224
|
+
* # Errors
|
|
225
|
+
* As [`interval_normalize`], naming `a` or `b`.
|
|
226
|
+
* @param {[number, number][]} a
|
|
227
|
+
* @param {[number, number][]} b
|
|
228
|
+
* @returns {[number, number][]}
|
|
229
|
+
*/
|
|
230
|
+
export function interval_intersection(a, b) {
|
|
231
|
+
const ret = wasm.interval_intersection(a, b);
|
|
232
|
+
if (ret[2]) {
|
|
233
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
234
|
+
}
|
|
235
|
+
return takeFromExternrefTable0(ret[0]);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Total length of the union of `intervals`: each point counts once, however
|
|
240
|
+
* many rows cover it.
|
|
241
|
+
*
|
|
242
|
+
* # Errors
|
|
243
|
+
* As [`interval_normalize`].
|
|
244
|
+
* @param {[number, number][]} intervals
|
|
245
|
+
* @returns {number}
|
|
246
|
+
*/
|
|
247
|
+
export function interval_measure(intervals) {
|
|
248
|
+
const ret = wasm.interval_measure(intervals);
|
|
249
|
+
if (ret[2]) {
|
|
250
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
251
|
+
}
|
|
252
|
+
return ret[0];
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* The union of `intervals` (each `[start, end]`, half-open) in normal form:
|
|
257
|
+
* sorted, disjoint, touching pieces merged, empty ones dropped.
|
|
258
|
+
*
|
|
259
|
+
* # Errors
|
|
260
|
+
* Throws `malformed_input` for a row that is not two numbers (`parameter` is
|
|
261
|
+
* the row's path, e.g. `intervals[2]`), `value_not_finite` for a NaN or
|
|
262
|
+
* ±Infinity bound, and `reversed_interval` (`parameter`, `index`) for a row
|
|
263
|
+
* with start > end — reversed rows are refused, not swapped.
|
|
264
|
+
* @param {[number, number][]} intervals
|
|
265
|
+
* @returns {[number, number][]}
|
|
266
|
+
*/
|
|
267
|
+
export function interval_normalize(intervals) {
|
|
268
|
+
const ret = wasm.interval_normalize(intervals);
|
|
269
|
+
if (ret[2]) {
|
|
270
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
271
|
+
}
|
|
272
|
+
return takeFromExternrefTable0(ret[0]);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* Points in `a` or `b`, in normal form.
|
|
277
|
+
*
|
|
278
|
+
* # Errors
|
|
279
|
+
* As [`interval_normalize`], naming `a` or `b`.
|
|
280
|
+
* @param {[number, number][]} a
|
|
281
|
+
* @param {[number, number][]} b
|
|
282
|
+
* @returns {[number, number][]}
|
|
283
|
+
*/
|
|
284
|
+
export function interval_union(a, b) {
|
|
285
|
+
const ret = wasm.interval_union(a, b);
|
|
286
|
+
if (ret[2]) {
|
|
287
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
288
|
+
}
|
|
289
|
+
return takeFromExternrefTable0(ret[0]);
|
|
290
|
+
}
|
|
291
|
+
|
|
125
292
|
/**
|
|
126
293
|
* Standard normal quantile Φ⁻¹(p): the `z` with `P(Z ≤ z) = p`.
|
|
127
294
|
*
|
|
@@ -141,15 +308,18 @@ export function inverse_normal_cdf(p) {
|
|
|
141
308
|
/**
|
|
142
309
|
* Arithmetic mean of `data` using Kahan compensated summation.
|
|
143
310
|
*
|
|
144
|
-
*
|
|
145
|
-
*
|
|
311
|
+
* # Errors
|
|
312
|
+
* Throws `empty_input` when `data` is empty, and as every `data` argument
|
|
313
|
+
* does for an element that is not a finite number.
|
|
314
|
+
* @param {number[] | Float64Array} data
|
|
146
315
|
* @returns {number}
|
|
147
316
|
*/
|
|
148
317
|
export function mean(data) {
|
|
149
|
-
const
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
318
|
+
const ret = wasm.mean(data);
|
|
319
|
+
if (ret[2]) {
|
|
320
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
321
|
+
}
|
|
322
|
+
return ret[0];
|
|
153
323
|
}
|
|
154
324
|
|
|
155
325
|
/**
|
|
@@ -187,30 +357,37 @@ export function normal_sf(x) {
|
|
|
187
357
|
* Returns the `n` complex bins interleaved as `[re0, im0, re1, im1, …]`
|
|
188
358
|
* (length `2n`). Bins `k` and `n − k` are conjugates, so the spectrum of a
|
|
189
359
|
* real signal is fully described by bins `0..=n/2`.
|
|
190
|
-
*
|
|
360
|
+
*
|
|
361
|
+
* # Errors
|
|
362
|
+
* Throws as every `data` argument does for an element that is not a finite
|
|
363
|
+
* number.
|
|
364
|
+
* @param {number[] | Float64Array} data
|
|
191
365
|
* @returns {Float64Array}
|
|
192
366
|
*/
|
|
193
367
|
export function rfft(data) {
|
|
194
|
-
const
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
368
|
+
const ret = wasm.rfft(data);
|
|
369
|
+
if (ret[3]) {
|
|
370
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
371
|
+
}
|
|
372
|
+
var v1 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
|
|
198
373
|
wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
|
|
199
|
-
return
|
|
374
|
+
return v1;
|
|
200
375
|
}
|
|
201
376
|
|
|
202
377
|
/**
|
|
203
378
|
* Sample standard deviation of `data` (Bessel-corrected, denominator n−1).
|
|
204
379
|
*
|
|
205
|
-
*
|
|
206
|
-
*
|
|
380
|
+
* # Errors
|
|
381
|
+
* Throws `insufficient_data` below 2 values.
|
|
382
|
+
* @param {number[] | Float64Array} data
|
|
207
383
|
* @returns {number}
|
|
208
384
|
*/
|
|
209
385
|
export function std_dev(data) {
|
|
210
|
-
const
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
386
|
+
const ret = wasm.std_dev(data);
|
|
387
|
+
if (ret[2]) {
|
|
388
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
389
|
+
}
|
|
390
|
+
return ret[0];
|
|
214
391
|
}
|
|
215
392
|
|
|
216
393
|
/**
|
|
@@ -252,14 +429,20 @@ export function t_distribution_quantile(p, df) {
|
|
|
252
429
|
/**
|
|
253
430
|
* Sample variance of `data` (Bessel-corrected, denominator n−1).
|
|
254
431
|
*
|
|
255
|
-
*
|
|
256
|
-
*
|
|
432
|
+
* # Errors
|
|
433
|
+
* Throws `insufficient_data` below 2 values.
|
|
434
|
+
* @param {number[] | Float64Array} data
|
|
257
435
|
* @returns {number}
|
|
258
436
|
*/
|
|
259
437
|
export function variance(data) {
|
|
260
|
-
const
|
|
261
|
-
|
|
262
|
-
|
|
438
|
+
const ret = wasm.variance(data);
|
|
439
|
+
if (ret[2]) {
|
|
440
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
441
|
+
}
|
|
442
|
+
return ret[0];
|
|
443
|
+
}
|
|
444
|
+
export function __wbg_Error_30c8987f7c2ed4e2(arg0, arg1) {
|
|
445
|
+
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
263
446
|
return ret;
|
|
264
447
|
}
|
|
265
448
|
export function __wbg_String_8564e559799eccda(arg0, arg1) {
|
|
@@ -269,9 +452,170 @@ export function __wbg_String_8564e559799eccda(arg0, arg1) {
|
|
|
269
452
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
270
453
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
271
454
|
}
|
|
455
|
+
export function __wbg___wbindgen_bigint_get_as_i64_a2383202b9353e4c(arg0, arg1) {
|
|
456
|
+
const v = arg1;
|
|
457
|
+
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
458
|
+
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
459
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
460
|
+
}
|
|
461
|
+
export function __wbg___wbindgen_boolean_get_5b446f51afd21013(arg0) {
|
|
462
|
+
const v = arg0;
|
|
463
|
+
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
464
|
+
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
465
|
+
}
|
|
466
|
+
export function __wbg___wbindgen_debug_string_4687d8d8c2017d52(arg0, arg1) {
|
|
467
|
+
const ret = debugString(arg1);
|
|
468
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
469
|
+
const len1 = WASM_VECTOR_LEN;
|
|
470
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
471
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
472
|
+
}
|
|
473
|
+
export function __wbg___wbindgen_in_92f62ee1427d9e49(arg0, arg1) {
|
|
474
|
+
const ret = arg0 in arg1;
|
|
475
|
+
return ret;
|
|
476
|
+
}
|
|
477
|
+
export function __wbg___wbindgen_is_bigint_b123553bed3bb382(arg0) {
|
|
478
|
+
const ret = typeof(arg0) === 'bigint';
|
|
479
|
+
return ret;
|
|
480
|
+
}
|
|
481
|
+
export function __wbg___wbindgen_is_function_1f9d30630b8b1d3d(arg0) {
|
|
482
|
+
const ret = typeof(arg0) === 'function';
|
|
483
|
+
return ret;
|
|
484
|
+
}
|
|
485
|
+
export function __wbg___wbindgen_is_null_e343b7d08827ba72(arg0) {
|
|
486
|
+
const ret = arg0 === null;
|
|
487
|
+
return ret;
|
|
488
|
+
}
|
|
489
|
+
export function __wbg___wbindgen_is_object_3c45d4f2dde4e749(arg0) {
|
|
490
|
+
const val = arg0;
|
|
491
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
492
|
+
return ret;
|
|
493
|
+
}
|
|
494
|
+
export function __wbg___wbindgen_jsval_eq_02babf21faa37971(arg0, arg1) {
|
|
495
|
+
const ret = arg0 === arg1;
|
|
496
|
+
return ret;
|
|
497
|
+
}
|
|
498
|
+
export function __wbg___wbindgen_jsval_loose_eq_677f21e468d6b461(arg0, arg1) {
|
|
499
|
+
const ret = arg0 == arg1;
|
|
500
|
+
return ret;
|
|
501
|
+
}
|
|
502
|
+
export function __wbg___wbindgen_number_get_2e0e7dee9f701a71(arg0, arg1) {
|
|
503
|
+
const obj = arg1;
|
|
504
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
505
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
506
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
507
|
+
}
|
|
508
|
+
export function __wbg___wbindgen_string_get_0380ccaa2f57f0d9(arg0, arg1) {
|
|
509
|
+
const obj = arg1;
|
|
510
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
511
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
512
|
+
var len1 = WASM_VECTOR_LEN;
|
|
513
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
514
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
515
|
+
}
|
|
272
516
|
export function __wbg___wbindgen_throw_41e9ee4f547fc59a(arg0, arg1) {
|
|
273
517
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
274
518
|
}
|
|
519
|
+
export function __wbg___wbindgen_typeof_e777a26e115d416b(arg0) {
|
|
520
|
+
const ret = typeof arg0;
|
|
521
|
+
return ret;
|
|
522
|
+
}
|
|
523
|
+
export function __wbg_call_6137034ef55c9d0f() { return handleError(function (arg0, arg1) {
|
|
524
|
+
const ret = arg0.call(arg1);
|
|
525
|
+
return ret;
|
|
526
|
+
}, arguments); }
|
|
527
|
+
export function __wbg_done_b41a1d26cdb37fb6(arg0) {
|
|
528
|
+
const ret = arg0.done;
|
|
529
|
+
return ret;
|
|
530
|
+
}
|
|
531
|
+
export function __wbg_entries_fb6397112b1de25f(arg0) {
|
|
532
|
+
const ret = Object.entries(arg0);
|
|
533
|
+
return ret;
|
|
534
|
+
}
|
|
535
|
+
export function __wbg_get_31af05bd4842a84f() { return handleError(function (arg0, arg1) {
|
|
536
|
+
const ret = Reflect.get(arg0, arg1);
|
|
537
|
+
return ret;
|
|
538
|
+
}, arguments); }
|
|
539
|
+
export function __wbg_get_658f6698067d9515() { return handleError(function (arg0, arg1) {
|
|
540
|
+
const ret = Reflect.get(arg0, arg1);
|
|
541
|
+
return ret;
|
|
542
|
+
}, arguments); }
|
|
543
|
+
export function __wbg_get_6c896e0571ddae51(arg0, arg1) {
|
|
544
|
+
const ret = arg0[arg1 >>> 0];
|
|
545
|
+
return ret;
|
|
546
|
+
}
|
|
547
|
+
export function __wbg_get_unchecked_288889d017702237(arg0, arg1) {
|
|
548
|
+
const ret = arg0[arg1 >>> 0];
|
|
549
|
+
return ret;
|
|
550
|
+
}
|
|
551
|
+
export function __wbg_instanceof_ArrayBuffer_a99f175873e5d9b8(arg0) {
|
|
552
|
+
let result;
|
|
553
|
+
try {
|
|
554
|
+
result = arg0 instanceof ArrayBuffer;
|
|
555
|
+
} catch (_) {
|
|
556
|
+
result = false;
|
|
557
|
+
}
|
|
558
|
+
const ret = result;
|
|
559
|
+
return ret;
|
|
560
|
+
}
|
|
561
|
+
export function __wbg_instanceof_Float64Array_8a59377f9eec1b8b(arg0) {
|
|
562
|
+
let result;
|
|
563
|
+
try {
|
|
564
|
+
result = arg0 instanceof Float64Array;
|
|
565
|
+
} catch (_) {
|
|
566
|
+
result = false;
|
|
567
|
+
}
|
|
568
|
+
const ret = result;
|
|
569
|
+
return ret;
|
|
570
|
+
}
|
|
571
|
+
export function __wbg_instanceof_Map_b2611749102d7ba3(arg0) {
|
|
572
|
+
let result;
|
|
573
|
+
try {
|
|
574
|
+
result = arg0 instanceof Map;
|
|
575
|
+
} catch (_) {
|
|
576
|
+
result = false;
|
|
577
|
+
}
|
|
578
|
+
const ret = result;
|
|
579
|
+
return ret;
|
|
580
|
+
}
|
|
581
|
+
export function __wbg_instanceof_Uint8Array_828cef2aaacafc31(arg0) {
|
|
582
|
+
let result;
|
|
583
|
+
try {
|
|
584
|
+
result = arg0 instanceof Uint8Array;
|
|
585
|
+
} catch (_) {
|
|
586
|
+
result = false;
|
|
587
|
+
}
|
|
588
|
+
const ret = result;
|
|
589
|
+
return ret;
|
|
590
|
+
}
|
|
591
|
+
export function __wbg_isArray_e15a2ff68ffdbef2(arg0) {
|
|
592
|
+
const ret = Array.isArray(arg0);
|
|
593
|
+
return ret;
|
|
594
|
+
}
|
|
595
|
+
export function __wbg_isSafeInteger_717808ad6a54bd9e(arg0) {
|
|
596
|
+
const ret = Number.isSafeInteger(arg0);
|
|
597
|
+
return ret;
|
|
598
|
+
}
|
|
599
|
+
export function __wbg_iterator_e3c31c892080e444() {
|
|
600
|
+
const ret = Symbol.iterator;
|
|
601
|
+
return ret;
|
|
602
|
+
}
|
|
603
|
+
export function __wbg_length_7f3c00c40364105e(arg0) {
|
|
604
|
+
const ret = arg0.length;
|
|
605
|
+
return ret;
|
|
606
|
+
}
|
|
607
|
+
export function __wbg_length_b5f0008bbf60cf59(arg0) {
|
|
608
|
+
const ret = arg0.length;
|
|
609
|
+
return ret;
|
|
610
|
+
}
|
|
611
|
+
export function __wbg_length_d4bdea10311bd9cf(arg0) {
|
|
612
|
+
const ret = arg0.length;
|
|
613
|
+
return ret;
|
|
614
|
+
}
|
|
615
|
+
export function __wbg_new_1dbf7428bba60a42(arg0) {
|
|
616
|
+
const ret = new Uint8Array(arg0);
|
|
617
|
+
return ret;
|
|
618
|
+
}
|
|
275
619
|
export function __wbg_new_343a093a3c2ffb4e(arg0, arg1) {
|
|
276
620
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
277
621
|
return ret;
|
|
@@ -280,6 +624,32 @@ export function __wbg_new_617a8cdb8bb1130e() {
|
|
|
280
624
|
const ret = new Object();
|
|
281
625
|
return ret;
|
|
282
626
|
}
|
|
627
|
+
export function __wbg_new_ee2291f50781bf1d() {
|
|
628
|
+
const ret = new Array();
|
|
629
|
+
return ret;
|
|
630
|
+
}
|
|
631
|
+
export function __wbg_next_33784799010f1bbe(arg0) {
|
|
632
|
+
const ret = arg0.next;
|
|
633
|
+
return ret;
|
|
634
|
+
}
|
|
635
|
+
export function __wbg_next_f4aac29c42af995c() { return handleError(function (arg0) {
|
|
636
|
+
const ret = arg0.next();
|
|
637
|
+
return ret;
|
|
638
|
+
}, arguments); }
|
|
639
|
+
export function __wbg_of_20798cb14708764f(arg0, arg1) {
|
|
640
|
+
const ret = Array.of(arg0, arg1);
|
|
641
|
+
return ret;
|
|
642
|
+
}
|
|
643
|
+
export function __wbg_prototypesetcall_bc27214492979395(arg0, arg1, arg2) {
|
|
644
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
645
|
+
}
|
|
646
|
+
export function __wbg_prototypesetcall_d49a4fab5ca427bc(arg0, arg1, arg2) {
|
|
647
|
+
Float64Array.prototype.set.call(getArrayF64FromWasm0(arg0, arg1), arg2);
|
|
648
|
+
}
|
|
649
|
+
export function __wbg_push_2baf45db356cf468(arg0, arg1) {
|
|
650
|
+
const ret = arg0.push(arg1);
|
|
651
|
+
return ret;
|
|
652
|
+
}
|
|
283
653
|
export function __wbg_set_145a351398b48c65() { return handleError(function (arg0, arg1, arg2) {
|
|
284
654
|
const ret = Reflect.set(arg0, arg1, arg2);
|
|
285
655
|
return ret;
|
|
@@ -287,16 +657,30 @@ export function __wbg_set_145a351398b48c65() { return handleError(function (arg0
|
|
|
287
657
|
export function __wbg_set_6be42768c690e380(arg0, arg1, arg2) {
|
|
288
658
|
arg0[arg1] = arg2;
|
|
289
659
|
}
|
|
660
|
+
export function __wbg_value_f3c585ee8f5ba40c(arg0) {
|
|
661
|
+
const ret = arg0.value;
|
|
662
|
+
return ret;
|
|
663
|
+
}
|
|
290
664
|
export function __wbindgen_generic_0000000000000001(arg0) {
|
|
291
665
|
// Cast intrinsic for `F64 -> Externref`.
|
|
292
666
|
const ret = arg0;
|
|
293
667
|
return ret;
|
|
294
668
|
}
|
|
295
|
-
export function __wbindgen_generic_0000000000000002(arg0
|
|
669
|
+
export function __wbindgen_generic_0000000000000002(arg0) {
|
|
670
|
+
// Cast intrinsic for `I64 -> Externref`.
|
|
671
|
+
const ret = arg0;
|
|
672
|
+
return ret;
|
|
673
|
+
}
|
|
674
|
+
export function __wbindgen_generic_0000000000000003(arg0, arg1) {
|
|
296
675
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
297
676
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
298
677
|
return ret;
|
|
299
678
|
}
|
|
679
|
+
export function __wbindgen_generic_0000000000000004(arg0) {
|
|
680
|
+
// Cast intrinsic for `U64 -> Externref`.
|
|
681
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
682
|
+
return ret;
|
|
683
|
+
}
|
|
300
684
|
export function __wbindgen_init_externref_table() {
|
|
301
685
|
const table = wasm.__wbindgen_externrefs;
|
|
302
686
|
const offset = table.grow(4);
|
|
@@ -312,11 +696,81 @@ function addToExternrefTable0(obj) {
|
|
|
312
696
|
return idx;
|
|
313
697
|
}
|
|
314
698
|
|
|
699
|
+
function debugString(val) {
|
|
700
|
+
// primitive types
|
|
701
|
+
const type = typeof val;
|
|
702
|
+
if (type == 'number' || type == 'boolean' || val == null) {
|
|
703
|
+
return `${val}`;
|
|
704
|
+
}
|
|
705
|
+
if (type == 'string') {
|
|
706
|
+
return `"${val}"`;
|
|
707
|
+
}
|
|
708
|
+
if (type == 'symbol') {
|
|
709
|
+
const description = val.description;
|
|
710
|
+
if (description == null) {
|
|
711
|
+
return 'Symbol';
|
|
712
|
+
} else {
|
|
713
|
+
return `Symbol(${description})`;
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
if (type == 'function') {
|
|
717
|
+
const name = val.name;
|
|
718
|
+
if (typeof name == 'string' && name.length > 0) {
|
|
719
|
+
return `Function(${name})`;
|
|
720
|
+
} else {
|
|
721
|
+
return 'Function';
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
// objects
|
|
725
|
+
if (Array.isArray(val)) {
|
|
726
|
+
const length = val.length;
|
|
727
|
+
let debug = '[';
|
|
728
|
+
if (length > 0) {
|
|
729
|
+
debug += debugString(val[0]);
|
|
730
|
+
}
|
|
731
|
+
for(let i = 1; i < length; i++) {
|
|
732
|
+
debug += ', ' + debugString(val[i]);
|
|
733
|
+
}
|
|
734
|
+
debug += ']';
|
|
735
|
+
return debug;
|
|
736
|
+
}
|
|
737
|
+
// Test for built-in
|
|
738
|
+
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
739
|
+
let className;
|
|
740
|
+
if (builtInMatches && builtInMatches.length > 1) {
|
|
741
|
+
className = builtInMatches[1];
|
|
742
|
+
} else {
|
|
743
|
+
// Failed to match the standard '[object ClassName]'
|
|
744
|
+
return toString.call(val);
|
|
745
|
+
}
|
|
746
|
+
if (className == 'Object') {
|
|
747
|
+
// we're a user defined class or Object
|
|
748
|
+
// JSON.stringify avoids problems with cycles, and is generally much
|
|
749
|
+
// easier than looping through ownProperties of `val`.
|
|
750
|
+
try {
|
|
751
|
+
return 'Object(' + JSON.stringify(val) + ')';
|
|
752
|
+
} catch (_) {
|
|
753
|
+
return 'Object';
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
// errors
|
|
757
|
+
if (val instanceof Error) {
|
|
758
|
+
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
759
|
+
}
|
|
760
|
+
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
761
|
+
return className;
|
|
762
|
+
}
|
|
763
|
+
|
|
315
764
|
function getArrayF64FromWasm0(ptr, len) {
|
|
316
765
|
ptr = ptr >>> 0;
|
|
317
766
|
return getFloat64ArrayMemory0().subarray(ptr / 8, ptr / 8 + len);
|
|
318
767
|
}
|
|
319
768
|
|
|
769
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
770
|
+
ptr = ptr >>> 0;
|
|
771
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
772
|
+
}
|
|
773
|
+
|
|
320
774
|
let cachedDataViewMemory0 = null;
|
|
321
775
|
function getDataViewMemory0() {
|
|
322
776
|
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
@@ -354,11 +808,8 @@ function handleError(f, args) {
|
|
|
354
808
|
}
|
|
355
809
|
}
|
|
356
810
|
|
|
357
|
-
function
|
|
358
|
-
|
|
359
|
-
getFloat64ArrayMemory0().set(arg, ptr / 8);
|
|
360
|
-
WASM_VECTOR_LEN = arg.length;
|
|
361
|
-
return ptr;
|
|
811
|
+
function isLikeNone(x) {
|
|
812
|
+
return x === undefined || x === null;
|
|
362
813
|
}
|
|
363
814
|
|
|
364
815
|
function passStringToWasm0(arg, malloc, realloc) {
|
package/u_numflow_bg.wasm
CHANGED
|
Binary file
|