ohlcv-indicators 3.4.5 → 3.4.6

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.
@@ -130,21 +130,43 @@ var OHLCV_INDICATORS;
130
130
  t.r(e),
131
131
  // EXPORTS
132
132
  t.d(e, {
133
- default: () => /* binding */ Ar
133
+ default: () => /* binding */ xr
134
134
  });
135
- var u = function(t) {
135
+ var u = function(t, e) {
136
+ if (!Array.isArray(t)) throw new Error('Property "inputParams" must be an "Array" or "Set".');
137
+ var r, n = o(t);
138
+ try {
139
+ for (n.s(); !(r = n.n()).done; ) {
140
+ var i, a = o(r.value.params);
141
+ try {
142
+ for (a.s(); !(i = a.n()).done; ) {
143
+ var u = i.value;
144
+ if ("number" == typeof u && u > e) throw console.log(u, e), new Error("At least one of the params of the indicator is greater than the input OHLCV length. Make sure to have enough datapoints in the input OHLCV.");
145
+ }
146
+ } catch (t) {
147
+ a.e(t);
148
+ } finally {
149
+ a.f();
150
+ }
151
+ }
152
+ } catch (t) {
153
+ n.e(t);
154
+ } finally {
155
+ n.f();
156
+ }
157
+ }, l = function(t) {
136
158
  if (!0 === t.isComputed) throw Error('ohlcv is already computed, you can not add new indicators after "compute", "getLastValues" , "getDataAsCols" or "getData" methods are called.');
137
- }, l = function(t, e, r) {
159
+ }, c = function(t, e, r) {
138
160
  if (!Array.isArray(t)) throw new Error('Param "'.concat(e, '" must be an array in "').concat(r, '".'));
139
161
  return !0;
140
- }, c = function(t, e, r) {
162
+ }, s = function(t, e, r) {
141
163
  if (!Boolean(t) || "object" == !n(t)) throw new Error('Param "'.concat(e, '" must be an object in "').concat(r, '".'));
142
164
  return !0;
143
- }, s = function(t, e, r) {
165
+ }, f = function(t, e, r) {
144
166
  if ("boolean" != typeof t) throw new Error('Param "'.concat(e, '" must be an boolean in "').concat(r, '".'));
145
167
  return !0;
146
- }, f = function(t, e, r, n) {
147
- c(e, "options", "".concat(n, ".").concat(r, ".validateNumber"));
168
+ }, h = function(t, e, r, n) {
169
+ s(e, "options", "".concat(n, ".").concat(r, ".validateNumber"));
148
170
  var o = e.allowDecimals, i = void 0 !== o && o, a = e.min, u = e.max, l = i ? "number" : "integer";
149
171
  if ("number" != typeof t || !1 === i && !Number.isInteger(t)) throw new Error('Param "'.concat(r, '" must be an integer in "').concat(n, '".'));
150
172
  if ("number" != typeof a || "number" != typeof u || a >= u) throw new Error('Param "min" must be a valid '.concat(l, ' lower than "max" "').concat(n, ".").concat(r, '.validateNumber".'));
@@ -155,12 +177,12 @@ var OHLCV_INDICATORS;
155
177
  // The maximum value of DP and Big.DP.
156
178
  y = 1e6, // 0 to 1000000
157
179
  // The maximum magnitude of the exponent argument to the pow method.
158
- h = 1e6, // true or false
180
+ p = 1e6, // true or false
159
181
  /**************************************************************************************************/
160
182
  // Error messages.
161
- p = "[big.js] ", v = p + "Invalid ", m = v + "decimal places", d = v + "rounding mode", b = p + "Division by zero",
183
+ v = "[big.js] ", m = v + "Invalid ", d = m + "decimal places", b = m + "rounding mode", g = v + "Division by zero",
162
184
  // The shared prototype object.
163
- g = {}, w = void 0, O = /^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;
185
+ w = {}, S = void 0, O = /^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;
164
186
  /*
165
187
  * Round Big x to a maximum of sd significant digits using rounding mode rm.
166
188
  *
@@ -169,10 +191,10 @@ var OHLCV_INDICATORS;
169
191
  * rm {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).
170
192
  * [more] {boolean} Whether the result of division was truncated.
171
193
  */
172
- function S(t, e, r, n) {
194
+ function j(t, e, r, n) {
173
195
  var o = t.c;
174
- if (r === w && (r = t.constructor.RM), 0 !== r && 1 !== r && 2 !== r && 3 !== r) throw Error(d);
175
- if (e < 1) n = 3 === r && (n || !!o[0]) || 0 === e && (1 === r && o[0] >= 5 || 2 === r && (o[0] > 5 || 5 === o[0] && (n || o[1] !== w))),
196
+ if (r === S && (r = t.constructor.RM), 0 !== r && 1 !== r && 2 !== r && 3 !== r) throw Error(b);
197
+ if (e < 1) n = 3 === r && (n || !!o[0]) || 0 === e && (1 === r && o[0] >= 5 || 2 === r && (o[0] > 5 || 5 === o[0] && (n || o[1] !== S))),
176
198
  o.length = 1, n ? (
177
199
  // 1, 0.1, 0.01, 0.001, 0.0001 etc.
178
200
  t.e = t.e - e + 1, o[0] = 1) :
@@ -181,7 +203,7 @@ var OHLCV_INDICATORS;
181
203
  // Round up?
182
204
  if (
183
205
  // xc[sd] is the digit after the digit that may be rounded up.
184
- n = 1 === r && o[e] >= 5 || 2 === r && (o[e] > 5 || 5 === o[e] && (n || o[e + 1] !== w || 1 & o[e - 1])) || 3 === r && (n || !!o[0]),
206
+ n = 1 === r && o[e] >= 5 || 2 === r && (o[e] > 5 || 5 === o[e] && (n || o[e + 1] !== S || 1 & o[e - 1])) || 3 === r && (n || !!o[0]),
185
207
  // Remove any digits after the required precision.
186
208
  o.length = e, n)
187
209
  // Rounding up may mean the previous digit has to be rounded up.
@@ -197,7 +219,7 @@ var OHLCV_INDICATORS;
197
219
  /*
198
220
  * Return a string representing the value of Big x in normal or exponential notation.
199
221
  * Handles P.toExponential, P.toFixed, P.toJSON, P.toPrecision, P.toString and P.valueOf.
200
- */ function j(t, e, r) {
222
+ */ function P(t, e, r) {
201
223
  var n = t.e, o = t.c.join(""), i = o.length;
202
224
  // Exponential notation?
203
225
  if (e) o = o.charAt(0) + (i > 1 ? "." + o.slice(1) : "") + (n < 0 ? "e" : "e+") + n;
@@ -211,7 +233,7 @@ var OHLCV_INDICATORS;
211
233
  // Prototype/instance methods
212
234
  /*
213
235
  * Return a new Big whose value is the absolute value of this Big.
214
- */ g.abs = function() {
236
+ */ w.abs = function() {
215
237
  var t = new this.constructor(this);
216
238
  return t.s = 1, t;
217
239
  },
@@ -220,7 +242,7 @@ var OHLCV_INDICATORS;
220
242
  * -1 if the value of this Big is less than the value of Big y, or
221
243
  * 0 if they have the same value.
222
244
  */
223
- g.cmp = function(t) {
245
+ w.cmp = function(t) {
224
246
  var e, r = this, n = r.c, o = (t = new r.constructor(t)).c, i = r.s, a = t.s, u = r.e, l = t.e;
225
247
  // Either zero?
226
248
  if (!n[0] || !o[0]) return n[0] ? i : o[0] ? -a : 0;
@@ -237,103 +259,103 @@ var OHLCV_INDICATORS;
237
259
  * Return a new Big whose value is the value of this Big divided by the value of Big y, rounded,
238
260
  * if necessary, to a maximum of Big.DP decimal places using rounding mode Big.RM.
239
261
  */
240
- g.div = function(t) {
262
+ w.div = function(t) {
241
263
  var e = this, r = e.constructor, n = e.c, // dividend
242
264
  o = (t = new r(t)).c, // divisor
243
265
  i = e.s == t.s ? 1 : -1, a = r.DP;
244
- if (a !== ~~a || a < 0 || a > y) throw Error(m);
266
+ if (a !== ~~a || a < 0 || a > y) throw Error(d);
245
267
  // Divisor is zero?
246
- if (!o[0]) throw Error(b);
268
+ if (!o[0]) throw Error(g);
247
269
  // Dividend is 0? Return +-0.
248
270
  if (!n[0]) return t.s = i, t.c = [ t.e = 0 ], t;
249
- var u, l, c, s, f, h = o.slice(), p = u = o.length, v = n.length, d = n.slice(0, u), // remainder
250
- g = d.length, O = t, // quotient
251
- j = O.c = [], P = 0, _ = a + (O.e = e.e - t.e) + 1;
271
+ var u, l, c, s, f, h = o.slice(), p = u = o.length, v = n.length, m = n.slice(0, u), // remainder
272
+ b = m.length, w = t, // quotient
273
+ O = w.c = [], P = 0, _ = a + (w.e = e.e - t.e) + 1;
252
274
  // precision of the result
253
275
  // Add zeros to make remainder as long as divisor.
254
- for (O.s = i, i = _ < 0 ? 0 : _,
276
+ for (w.s = i, i = _ < 0 ? 0 : _,
255
277
  // Create version of divisor with leading zero.
256
- h.unshift(0); g++ < u; ) d.push(0);
278
+ h.unshift(0); b++ < u; ) m.push(0);
257
279
  do {
258
280
  // n is how many times the divisor goes into current remainder.
259
281
  for (c = 0; c < 10; c++) {
260
282
  // Compare divisor and remainder.
261
- if (u != (g = d.length)) s = u > g ? 1 : -1; else for (f = -1, s = 0; ++f < u; ) if (o[f] != d[f]) {
262
- s = o[f] > d[f] ? 1 : -1;
283
+ if (u != (b = m.length)) s = u > b ? 1 : -1; else for (f = -1, s = 0; ++f < u; ) if (o[f] != m[f]) {
284
+ s = o[f] > m[f] ? 1 : -1;
263
285
  break;
264
286
  }
265
287
  // If divisor < remainder, subtract divisor from remainder.
266
288
  if (!(s < 0)) break;
267
289
  // Remainder can't be more than 1 digit longer than divisor.
268
290
  // Equalise lengths using divisor with extra leading zero?
269
- for (l = g == u ? o : h; g; ) {
270
- if (d[--g] < l[g]) {
271
- for (f = g; f && !d[--f]; ) d[f] = 9;
272
- --d[f], d[g] += 10;
291
+ for (l = b == u ? o : h; b; ) {
292
+ if (m[--b] < l[b]) {
293
+ for (f = b; f && !m[--f]; ) m[f] = 9;
294
+ --m[f], m[b] += 10;
273
295
  }
274
- d[g] -= l[g];
296
+ m[b] -= l[b];
275
297
  }
276
- for (;!d[0]; ) d.shift();
298
+ for (;!m[0]; ) m.shift();
277
299
  }
278
300
  // Add the digit n to the result array.
279
- j[P++] = s ? c : ++c,
301
+ O[P++] = s ? c : ++c,
280
302
  // Update the remainder.
281
- d[0] && s ? d[g] = n[p] || 0 : d = [ n[p] ];
282
- } while ((p++ < v || d[0] !== w) && i--);
303
+ m[0] && s ? m[b] = n[p] || 0 : m = [ n[p] ];
304
+ } while ((p++ < v || m[0] !== S) && i--);
283
305
  // Leading zero? Do not remove if result is simply zero (qi == 1).
284
- return j[0] || 1 == P || (
306
+ return O[0] || 1 == P || (
285
307
  // There can't be more than one zero.
286
- j.shift(), O.e--, _--),
308
+ O.shift(), w.e--, _--),
287
309
  // Round?
288
- P > _ && S(O, _, r.RM, d[0] !== w), O;
310
+ P > _ && j(w, _, r.RM, m[0] !== S), w;
289
311
  },
290
312
  /*
291
313
  * Return true if the value of this Big is equal to the value of Big y, otherwise return false.
292
314
  */
293
- g.eq = function(t) {
315
+ w.eq = function(t) {
294
316
  return 0 === this.cmp(t);
295
317
  },
296
318
  /*
297
319
  * Return true if the value of this Big is greater than the value of Big y, otherwise return
298
320
  * false.
299
321
  */
300
- g.gt = function(t) {
322
+ w.gt = function(t) {
301
323
  return this.cmp(t) > 0;
302
324
  },
303
325
  /*
304
326
  * Return true if the value of this Big is greater than or equal to the value of Big y, otherwise
305
327
  * return false.
306
328
  */
307
- g.gte = function(t) {
329
+ w.gte = function(t) {
308
330
  return this.cmp(t) > -1;
309
331
  },
310
332
  /*
311
333
  * Return true if the value of this Big is less than the value of Big y, otherwise return false.
312
334
  */
313
- g.lt = function(t) {
335
+ w.lt = function(t) {
314
336
  return this.cmp(t) < 0;
315
337
  },
316
338
  /*
317
339
  * Return true if the value of this Big is less than or equal to the value of Big y, otherwise
318
340
  * return false.
319
341
  */
320
- g.lte = function(t) {
342
+ w.lte = function(t) {
321
343
  return this.cmp(t) < 1;
322
344
  },
323
345
  /*
324
346
  * Return a new Big whose value is the value of this Big minus the value of Big y.
325
347
  */
326
- g.minus = g.sub = function(t) {
348
+ w.minus = w.sub = function(t) {
327
349
  var e, r, n, o, i = this, a = i.constructor, u = i.s, l = (t = new a(t)).s;
328
350
  // Signs differ?
329
351
  if (u != l) return t.s = -l, i.plus(t);
330
- var c = i.c.slice(), s = i.e, f = t.c, y = t.e;
352
+ var c = i.c.slice(), s = i.e, f = t.c, h = t.e;
331
353
  // Either zero?
332
354
  if (!c[0] || !f[0]) return f[0] ? t.s = -l : c[0] ? t = new a(i) : t.s = 1,
333
355
  t;
334
356
  // Determine which is the bigger number. Prepend zeros to equalise exponents.
335
- if (u = s - y) {
336
- for ((o = u < 0) ? (u = -u, n = c) : (y = s, n = f), n.reverse(), l = u; l--; ) n.push(0);
357
+ if (u = s - h) {
358
+ for ((o = u < 0) ? (u = -u, n = c) : (h = s, n = f), n.reverse(), l = u; l--; ) n.push(0);
337
359
  n.reverse();
338
360
  } else for (
339
361
  // Exponents equal. Check digit by digit.
@@ -358,33 +380,33 @@ var OHLCV_INDICATORS;
358
380
  // Remove trailing zeros.
359
381
  for (;0 === c[--l]; ) c.pop();
360
382
  // Remove leading zeros and adjust exponent accordingly.
361
- for (;0 === c[0]; ) c.shift(), --y;
383
+ for (;0 === c[0]; ) c.shift(), --h;
362
384
  return c[0] || (
363
385
  // n - n = +0
364
386
  t.s = 1,
365
387
  // Result must be zero.
366
- c = [ y = 0 ]), t.c = c, t.e = y, t;
388
+ c = [ h = 0 ]), t.c = c, t.e = h, t;
367
389
  },
368
390
  /*
369
391
  * Return a new Big whose value is the value of this Big modulo the value of Big y.
370
392
  */
371
- g.mod = function(t) {
393
+ w.mod = function(t) {
372
394
  var e, r = this, n = r.constructor, o = r.s, i = (t = new n(t)).s;
373
- if (!t.c[0]) throw Error(b);
395
+ if (!t.c[0]) throw Error(g);
374
396
  return r.s = t.s = 1, e = 1 == t.cmp(r), r.s = o, t.s = i, e ? new n(r) : (o = n.DP,
375
397
  i = n.RM, n.DP = n.RM = 0, r = r.div(t), n.DP = o, n.RM = i, this.minus(r.times(t)));
376
398
  },
377
399
  /*
378
400
  * Return a new Big whose value is the value of this Big negated.
379
401
  */
380
- g.neg = function() {
402
+ w.neg = function() {
381
403
  var t = new this.constructor(this);
382
404
  return t.s = -t.s, t;
383
405
  },
384
406
  /*
385
407
  * Return a new Big whose value is the value of this Big plus the value of Big y.
386
408
  */
387
- g.plus = g.add = function(t) {
409
+ w.plus = w.add = function(t) {
388
410
  var e, r, n, o = this, i = o.constructor;
389
411
  // Signs differ?
390
412
  if (t = new i(t), o.s != t.s) return t.s = -t.s, o.minus(t);
@@ -413,9 +435,9 @@ var OHLCV_INDICATORS;
413
435
  *
414
436
  * n {number} Integer, -MAX_POWER to MAX_POWER inclusive.
415
437
  */
416
- g.pow = function(t) {
438
+ w.pow = function(t) {
417
439
  var e = this, r = new e.constructor("1"), n = r, o = t < 0;
418
- if (t !== ~~t || t < -1e6 || t > h) throw Error(v + "exponent");
440
+ if (t !== ~~t || t < -1e6 || t > p) throw Error(m + "exponent");
419
441
  for (o && (t = -t); 1 & t && (n = n.times(e)), t >>= 1; ) e = e.times(e);
420
442
  return o ? r.div(n) : n;
421
443
  },
@@ -426,9 +448,9 @@ var OHLCV_INDICATORS;
426
448
  * sd {number} Significant digits: integer, 1 to MAX_DP inclusive.
427
449
  * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).
428
450
  */
429
- g.prec = function(t, e) {
430
- if (t !== ~~t || t < 1 || t > y) throw Error(v + "precision");
431
- return S(new this.constructor(this), t, e);
451
+ w.prec = function(t, e) {
452
+ if (t !== ~~t || t < 1 || t > y) throw Error(m + "precision");
453
+ return j(new this.constructor(this), t, e);
432
454
  },
433
455
  /*
434
456
  * Return a new Big whose value is the value of this Big rounded to a maximum of dp decimal places
@@ -439,20 +461,20 @@ var OHLCV_INDICATORS;
439
461
  * dp? {number} Integer, -MAX_DP to MAX_DP inclusive.
440
462
  * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).
441
463
  */
442
- g.round = function(t, e) {
443
- if (t === w) t = 0; else if (t !== ~~t || t < -y || t > y) throw Error(m);
444
- return S(new this.constructor(this), t + this.e + 1, e);
464
+ w.round = function(t, e) {
465
+ if (t === S) t = 0; else if (t !== ~~t || t < -y || t > y) throw Error(d);
466
+ return j(new this.constructor(this), t + this.e + 1, e);
445
467
  },
446
468
  /*
447
469
  * Return a new Big whose value is the square root of the value of this Big, rounded, if
448
470
  * necessary, to a maximum of Big.DP decimal places using rounding mode Big.RM.
449
471
  */
450
- g.sqrt = function() {
472
+ w.sqrt = function() {
451
473
  var t, e, r, n = this, o = n.constructor, i = n.s, a = n.e, u = new o("0.5");
452
474
  // Zero?
453
475
  if (!n.c[0]) return new o(n);
454
476
  // Negative?
455
- if (i < 0) throw Error(p + "No square root");
477
+ if (i < 0) throw Error(v + "No square root");
456
478
  // Estimate.
457
479
  // Math.sqrt underflow/overflow?
458
480
  // Re-estimate: pass x coefficient to Math.sqrt as integer, then adjust the result exponent.
@@ -463,12 +485,12 @@ var OHLCV_INDICATORS;
463
485
  do {
464
486
  r = t, t = u.times(r.plus(n.div(r)));
465
487
  } while (r.c.slice(0, a).join("") !== t.c.slice(0, a).join(""));
466
- return S(t, (o.DP -= 4) + t.e + 1, o.RM);
488
+ return j(t, (o.DP -= 4) + t.e + 1, o.RM);
467
489
  },
468
490
  /*
469
491
  * Return a new Big whose value is the value of this Big times the value of Big y.
470
492
  */
471
- g.times = g.mul = function(t) {
493
+ w.times = w.mul = function(t) {
472
494
  var e, r = this, n = r.constructor, o = r.c, i = (t = new n(t)).c, a = o.length, u = i.length, l = r.e, c = t.e;
473
495
  // Determine sign of result.
474
496
  // Return signed 0 if either 0.
@@ -501,13 +523,13 @@ var OHLCV_INDICATORS;
501
523
  * dp? {number} Decimal places: integer, 0 to MAX_DP inclusive.
502
524
  * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).
503
525
  */
504
- g.toExponential = function(t, e) {
526
+ w.toExponential = function(t, e) {
505
527
  var r = this, n = r.c[0];
506
- if (t !== w) {
507
- if (t !== ~~t || t < 0 || t > y) throw Error(m);
508
- for (r = S(new r.constructor(r), ++t, e); r.c.length < t; ) r.c.push(0);
528
+ if (t !== S) {
529
+ if (t !== ~~t || t < 0 || t > y) throw Error(d);
530
+ for (r = j(new r.constructor(r), ++t, e); r.c.length < t; ) r.c.push(0);
509
531
  }
510
- return j(r, !0, !!n);
532
+ return P(r, !0, !!n);
511
533
  },
512
534
  /*
513
535
  * Return a string representing the value of this Big in normal notation rounded to dp fixed
@@ -519,14 +541,14 @@ var OHLCV_INDICATORS;
519
541
  * (-0).toFixed(0) is '0', but (-0.1).toFixed(0) is '-0'.
520
542
  * (-0).toFixed(1) is '0.0', but (-0.01).toFixed(1) is '-0.0'.
521
543
  */
522
- g.toFixed = function(t, e) {
544
+ w.toFixed = function(t, e) {
523
545
  var r = this, n = r.c[0];
524
- if (t !== w) {
525
- if (t !== ~~t || t < 0 || t > y) throw Error(m);
546
+ if (t !== S) {
547
+ if (t !== ~~t || t < 0 || t > y) throw Error(d);
526
548
  // x.e may have changed if the value is rounded up.
527
- for (t = t + (r = S(new r.constructor(r), t + r.e + 1, e)).e + 1; r.c.length < t; ) r.c.push(0);
549
+ for (t = t + (r = j(new r.constructor(r), t + r.e + 1, e)).e + 1; r.c.length < t; ) r.c.push(0);
528
550
  }
529
- return j(r, !1, !!n);
551
+ return P(r, !1, !!n);
530
552
  },
531
553
  /*
532
554
  * Return a string representing the value of this Big.
@@ -534,16 +556,16 @@ var OHLCV_INDICATORS;
534
556
  * Big.PE, or a negative exponent equal to or less than Big.NE.
535
557
  * Omit the sign for negative zero.
536
558
  */
537
- g[Symbol.for("nodejs.util.inspect.custom")] = g.toJSON = g.toString = function() {
559
+ w[Symbol.for("nodejs.util.inspect.custom")] = w.toJSON = w.toString = function() {
538
560
  var t = this, e = t.constructor;
539
- return j(t, t.e <= e.NE || t.e >= e.PE, !!t.c[0]);
561
+ return P(t, t.e <= e.NE || t.e >= e.PE, !!t.c[0]);
540
562
  },
541
563
  /*
542
564
  * Return the value of this Big as a primitve number.
543
565
  */
544
- g.toNumber = function() {
545
- var t = Number(j(this, !0, !0));
546
- if (!0 === this.constructor.strict && !this.eq(t.toString())) throw Error(p + "Imprecise conversion");
566
+ w.toNumber = function() {
567
+ var t = Number(P(this, !0, !0));
568
+ if (!0 === this.constructor.strict && !this.eq(t.toString())) throw Error(v + "Imprecise conversion");
547
569
  return t;
548
570
  },
549
571
  /*
@@ -555,13 +577,13 @@ var OHLCV_INDICATORS;
555
577
  * sd {number} Significant digits: integer, 1 to MAX_DP inclusive.
556
578
  * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).
557
579
  */
558
- g.toPrecision = function(t, e) {
580
+ w.toPrecision = function(t, e) {
559
581
  var r = this, n = r.constructor, o = r.c[0];
560
- if (t !== w) {
561
- if (t !== ~~t || t < 1 || t > y) throw Error(v + "precision");
562
- for (r = S(new n(r), t, e); r.c.length < t; ) r.c.push(0);
582
+ if (t !== S) {
583
+ if (t !== ~~t || t < 1 || t > y) throw Error(m + "precision");
584
+ for (r = j(new n(r), t, e); r.c.length < t; ) r.c.push(0);
563
585
  }
564
- return j(r, t <= r.e || r.e <= n.NE || r.e >= n.PE, !!o);
586
+ return P(r, t <= r.e || r.e <= n.NE || r.e >= n.PE, !!o);
565
587
  },
566
588
  /*
567
589
  * Return a string representing the value of this Big.
@@ -569,10 +591,10 @@ var OHLCV_INDICATORS;
569
591
  * Big.PE, or a negative exponent equal to or less than Big.NE.
570
592
  * Include the sign for negative zero.
571
593
  */
572
- g.valueOf = function() {
594
+ w.valueOf = function() {
573
595
  var t = this, e = t.constructor;
574
- if (!0 === e.strict) throw Error(p + "valueOf disallowed");
575
- return j(t, t.e <= e.NE || t.e >= e.PE, !0);
596
+ if (!0 === e.strict) throw Error(v + "valueOf disallowed");
597
+ return P(t, t.e <= e.NE || t.e >= e.PE, !0);
576
598
  };
577
599
  // Export
578
600
  (
@@ -589,11 +611,11 @@ var OHLCV_INDICATORS;
589
611
  function e(r) {
590
612
  var n = this;
591
613
  // Enable constructor usage without new.
592
- if (!(n instanceof e)) return r === w ? t() : new e(r);
614
+ if (!(n instanceof e)) return r === S ? t() : new e(r);
593
615
  // Duplicate.
594
616
  if (r instanceof e) n.s = r.s, n.e = r.e, n.c = r.c.slice(); else {
595
617
  if ("string" != typeof r) {
596
- if (!0 === e.strict && "bigint" != typeof r) throw TypeError(v + "value");
618
+ if (!0 === e.strict && "bigint" != typeof r) throw TypeError(m + "value");
597
619
  // Minus zero?
598
620
  r = 0 === r && 1 / r < 0 ? "-0" : String(r);
599
621
  }
@@ -606,7 +628,7 @@ var OHLCV_INDICATORS;
606
628
  */
607
629
  function(t, e) {
608
630
  var r, n, o;
609
- if (!O.test(e)) throw Error(v + "number");
631
+ if (!O.test(e)) throw Error(m + "number");
610
632
  // Determine sign.
611
633
  // Decimal point?
612
634
  t.s = "-" == e.charAt(0) ? (e = e.slice(1), -1) : 1, (r = e.indexOf(".")) > -1 && (e = e.replace(".", ""));
@@ -632,51 +654,51 @@ var OHLCV_INDICATORS;
632
654
  // Shadow Big.prototype.constructor which points to Object.
633
655
  n.constructor = e;
634
656
  }
635
- return e.prototype = g, e.DP = 20, e.RM = 1, e.NE = -7, e.PE = 21, e.strict = false,
657
+ return e.prototype = w, e.DP = 20, e.RM = 1, e.NE = -7, e.PE = 21, e.strict = false,
636
658
  e.roundDown = 0, e.roundHalfUp = 1, e.roundHalfEven = 2, e.roundUp = 3, e;
637
659
  })();
638
660
  /// <reference types="https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/master/types/big.js/index.d.ts" />
639
661
  /* harmony default export */ // ./node_modules/trading-signals/dist/error/NotEnoughDataError.js
640
- function P(t) {
641
- return P = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
662
+ function _(t) {
663
+ return _ = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
642
664
  return typeof t;
643
665
  } : function(t) {
644
666
  return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
645
- }, P(t);
667
+ }, _(t);
646
668
  }
647
- function _(t, e) {
669
+ function N(t, e) {
648
670
  for (var r = 0; r < e.length; r++) {
649
671
  var n = e[r];
650
672
  n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0),
651
- Object.defineProperty(t, N(n.key), n);
673
+ Object.defineProperty(t, A(n.key), n);
652
674
  }
653
675
  }
654
- function N(t) {
676
+ function A(t) {
655
677
  var e = function(t, e) {
656
- if ("object" != P(t) || !t) return t;
678
+ if ("object" != _(t) || !t) return t;
657
679
  var r = t[Symbol.toPrimitive];
658
680
  if (void 0 !== r) {
659
681
  var n = r.call(t, e || "default");
660
- if ("object" != P(n)) return n;
682
+ if ("object" != _(n)) return n;
661
683
  throw new TypeError("@@toPrimitive must return a primitive value.");
662
684
  }
663
685
  return ("string" === e ? String : Number)(t);
664
686
  }(t, "string");
665
- return "symbol" == P(e) ? e : e + "";
687
+ return "symbol" == _(e) ? e : e + "";
666
688
  }
667
689
  function T(t, e, r) {
668
- return e = k(e), function(t, e) {
669
- if (e && ("object" == P(e) || "function" == typeof e)) return e;
690
+ return e = I(e), function(t, e) {
691
+ if (e && ("object" == _(e) || "function" == typeof e)) return e;
670
692
  if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
671
693
  return function(t) {
672
694
  if (void 0 === t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
673
695
  return t;
674
696
  }(t);
675
- }(t, E() ? Reflect.construct(e, r || [], k(t).constructor) : e.apply(t, r));
697
+ }(t, x() ? Reflect.construct(e, r || [], I(t).constructor) : e.apply(t, r));
676
698
  }
677
- function A(t) {
699
+ function E(t) {
678
700
  var e = "function" == typeof Map ? new Map : void 0;
679
- return A = function(t) {
701
+ return E = function(t) {
680
702
  if (null === t || !function(t) {
681
703
  try {
682
704
  return -1 !== Function.toString.call(t).indexOf("[native code]");
@@ -691,12 +713,12 @@ var OHLCV_INDICATORS;
691
713
  }
692
714
  function r() {
693
715
  return function(t, e, r) {
694
- if (E()) return Reflect.construct.apply(null, arguments);
716
+ if (x()) return Reflect.construct.apply(null, arguments);
695
717
  var n = [ null ];
696
718
  n.push.apply(n, e);
697
719
  var o = new (t.bind.apply(t, n));
698
- return r && x(o, r.prototype), o;
699
- }(t, arguments, k(this).constructor);
720
+ return r && k(o, r.prototype), o;
721
+ }(t, arguments, I(this).constructor);
700
722
  }
701
723
  return r.prototype = Object.create(t.prototype, {
702
724
  constructor: {
@@ -705,28 +727,28 @@ var OHLCV_INDICATORS;
705
727
  writable: !0,
706
728
  configurable: !0
707
729
  }
708
- }), x(r, t);
709
- }, A(t);
730
+ }), k(r, t);
731
+ }, E(t);
710
732
  }
711
- function E() {
733
+ function x() {
712
734
  try {
713
735
  var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
714
736
  } catch (t) {}
715
- return (E = function() {
737
+ return (x = function() {
716
738
  return !!t;
717
739
  })();
718
740
  }
719
- function x(t, e) {
720
- return x = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) {
741
+ function k(t, e) {
742
+ return k = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) {
721
743
  return t.__proto__ = e, t;
722
- }, x(t, e);
744
+ }, k(t, e);
723
745
  }
724
- function k(t) {
725
- return k = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
746
+ function I(t) {
747
+ return I = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
726
748
  return t.__proto__ || Object.getPrototypeOf(t);
727
- }, k(t);
749
+ }, I(t);
728
750
  }
729
- var I = function(t) {
751
+ var M = function(t) {
730
752
  function e() {
731
753
  var t, r = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "Not enough data";
732
754
  return function(t, e) {
@@ -744,60 +766,60 @@ var OHLCV_INDICATORS;
744
766
  }
745
767
  }), Object.defineProperty(t, "prototype", {
746
768
  writable: !1
747
- }), e && x(t, e);
748
- }(e, t), r = e, n && _(r.prototype, n), o && _(r, o), Object.defineProperty(r, "prototype", {
769
+ }), e && k(t, e);
770
+ }(e, t), r = e, n && N(r.prototype, n), o && N(r, o), Object.defineProperty(r, "prototype", {
749
771
  writable: !1
750
772
  }), r;
751
773
  var r, n, o;
752
- }( A(Error));
774
+ }( E(Error));
753
775
  // ./node_modules/trading-signals/dist/Indicator.js
754
- function M(t) {
755
- return M = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
776
+ function D(t) {
777
+ return D = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
756
778
  return typeof t;
757
779
  } : function(t) {
758
780
  return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
759
- }, M(t);
781
+ }, D(t);
760
782
  }
761
- function D(t, e) {
783
+ function R(t, e) {
762
784
  if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
763
785
  }
764
- function R(t, e) {
786
+ function C(t, e) {
765
787
  for (var r = 0; r < e.length; r++) {
766
788
  var n = e[r];
767
789
  n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0),
768
- Object.defineProperty(t, L(n.key), n);
790
+ Object.defineProperty(t, B(n.key), n);
769
791
  }
770
792
  }
771
- function C(t, e, r) {
772
- return e && R(t.prototype, e), r && R(t, r), Object.defineProperty(t, "prototype", {
793
+ function F(t, e, r) {
794
+ return e && C(t.prototype, e), r && C(t, r), Object.defineProperty(t, "prototype", {
773
795
  writable: !1
774
796
  }), t;
775
797
  }
776
- function F(t, e, r) {
777
- return (e = L(e)) in t ? Object.defineProperty(t, e, {
798
+ function L(t, e, r) {
799
+ return (e = B(e)) in t ? Object.defineProperty(t, e, {
778
800
  value: r,
779
801
  enumerable: !0,
780
802
  configurable: !0,
781
803
  writable: !0
782
804
  }) : t[e] = r, t;
783
805
  }
784
- function L(t) {
806
+ function B(t) {
785
807
  var e = function(t, e) {
786
- if ("object" != M(t) || !t) return t;
808
+ if ("object" != D(t) || !t) return t;
787
809
  var r = t[Symbol.toPrimitive];
788
810
  if (void 0 !== r) {
789
811
  var n = r.call(t, e || "default");
790
- if ("object" != M(n)) return n;
812
+ if ("object" != D(n)) return n;
791
813
  throw new TypeError("@@toPrimitive must return a primitive value.");
792
814
  }
793
815
  return ("string" === e ? String : Number)(t);
794
816
  }(t, "string");
795
- return "symbol" == M(e) ? e : e + "";
817
+ return "symbol" == D(e) ? e : e + "";
796
818
  }
797
- var B = function() {
798
- return C((function t() {
799
- D(this, t), F(this, "previousHighest", void 0), F(this, "highest", void 0), F(this, "previousLowest", void 0),
800
- F(this, "lowest", void 0), F(this, "previousResult", void 0), F(this, "result", void 0);
819
+ var H = function() {
820
+ return F((function t() {
821
+ R(this, t), L(this, "previousHighest", void 0), L(this, "highest", void 0), L(this, "previousLowest", void 0),
822
+ L(this, "lowest", void 0), L(this, "previousResult", void 0), L(this, "result", void 0);
801
823
  }), [ {
802
824
  key: "isStable",
803
825
  get: function() {
@@ -806,7 +828,7 @@ var OHLCV_INDICATORS;
806
828
  }, {
807
829
  key: "getResult",
808
830
  value: function() {
809
- if (void 0 === this.result) throw new I;
831
+ if (void 0 === this.result) throw new M;
810
832
  return this.result;
811
833
  }
812
834
  }, {
@@ -826,50 +848,50 @@ var OHLCV_INDICATORS;
826
848
  } ]);
827
849
  }();
828
850
  // ./node_modules/trading-signals/dist/MA/MovingAverage.js
829
- function H(t) {
830
- return H = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
851
+ function V(t) {
852
+ return V = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
831
853
  return typeof t;
832
854
  } : function(t) {
833
855
  return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
834
- }, H(t);
856
+ }, V(t);
835
857
  }
836
- function V(t, e) {
858
+ function U(t, e) {
837
859
  if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
838
860
  }
839
- function U(t, e) {
861
+ function $(t, e) {
840
862
  for (var r = 0; r < e.length; r++) {
841
863
  var n = e[r];
842
864
  n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0),
843
- Object.defineProperty(t, Z(n.key), n);
865
+ Object.defineProperty(t, Q(n.key), n);
844
866
  }
845
867
  }
846
- function $(t, e, r) {
847
- return e && U(t.prototype, e), r && U(t, r), Object.defineProperty(t, "prototype", {
868
+ function q(t, e, r) {
869
+ return e && $(t.prototype, e), r && $(t, r), Object.defineProperty(t, "prototype", {
848
870
  writable: !1
849
871
  }), t;
850
872
  }
851
- function q(t, e, r) {
852
- return e = G(e), function(t, e) {
853
- if (e && ("object" == H(e) || "function" == typeof e)) return e;
873
+ function z(t, e, r) {
874
+ return e = K(e), function(t, e) {
875
+ if (e && ("object" == V(e) || "function" == typeof e)) return e;
854
876
  if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
855
877
  return function(t) {
856
878
  if (void 0 === t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
857
879
  return t;
858
880
  }(t);
859
- }(t, z() ? Reflect.construct(e, r || [], G(t).constructor) : e.apply(t, r));
881
+ }(t, G() ? Reflect.construct(e, r || [], K(t).constructor) : e.apply(t, r));
860
882
  }
861
- function z() {
883
+ function G() {
862
884
  try {
863
885
  var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
864
886
  } catch (t) {}
865
- return (z = function() {
887
+ return (G = function() {
866
888
  return !!t;
867
889
  })();
868
890
  }
869
- function G(t) {
870
- return G = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
891
+ function K(t) {
892
+ return K = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
871
893
  return t.__proto__ || Object.getPrototypeOf(t);
872
- }, G(t);
894
+ }, K(t);
873
895
  }
874
896
  function Y(t, e) {
875
897
  if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
@@ -881,40 +903,40 @@ var OHLCV_INDICATORS;
881
903
  }
882
904
  }), Object.defineProperty(t, "prototype", {
883
905
  writable: !1
884
- }), e && K(t, e);
906
+ }), e && J(t, e);
885
907
  }
886
- function K(t, e) {
887
- return K = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) {
908
+ function J(t, e) {
909
+ return J = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) {
888
910
  return t.__proto__ = e, t;
889
- }, K(t, e);
911
+ }, J(t, e);
890
912
  }
891
- function J(t, e, r) {
892
- return (e = Z(e)) in t ? Object.defineProperty(t, e, {
913
+ function Z(t, e, r) {
914
+ return (e = Q(e)) in t ? Object.defineProperty(t, e, {
893
915
  value: r,
894
916
  enumerable: !0,
895
917
  configurable: !0,
896
918
  writable: !0
897
919
  }) : t[e] = r, t;
898
920
  }
899
- function Z(t) {
921
+ function Q(t) {
900
922
  var e = function(t, e) {
901
- if ("object" != H(t) || !t) return t;
923
+ if ("object" != V(t) || !t) return t;
902
924
  var r = t[Symbol.toPrimitive];
903
925
  if (void 0 !== r) {
904
926
  var n = r.call(t, e || "default");
905
- if ("object" != H(n)) return n;
927
+ if ("object" != V(n)) return n;
906
928
  throw new TypeError("@@toPrimitive must return a primitive value.");
907
929
  }
908
930
  return ("string" === e ? String : Number)(t);
909
931
  }(t, "string");
910
- return "symbol" == H(e) ? e : e + "";
932
+ return "symbol" == V(e) ? e : e + "";
911
933
  }
912
- var Q = function(t) {
934
+ var W = function(t) {
913
935
  function e(t) {
914
936
  var r;
915
- return V(this, e), J(r = q(this, e), "interval", void 0), r.interval = t, r;
937
+ return U(this, e), Z(r = z(this, e), "interval", void 0), r.interval = t, r;
916
938
  }
917
- return Y(e, t), $(e, [ {
939
+ return Y(e, t), q(e, [ {
918
940
  key: "updates",
919
941
  value: function(t) {
920
942
  var e = this;
@@ -928,54 +950,54 @@ var OHLCV_INDICATORS;
928
950
  return this.update(t, !0);
929
951
  }
930
952
  } ]);
931
- }(B);
953
+ }(H);
932
954
  // ./node_modules/trading-signals/dist/SMA/SMA.js
933
- function W(t) {
934
- return W = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
955
+ function X(t) {
956
+ return X = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
935
957
  return typeof t;
936
958
  } : function(t) {
937
959
  return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
938
- }, W(t);
960
+ }, X(t);
939
961
  }
940
- function X(t, e) {
962
+ function tt(t, e) {
941
963
  if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
942
964
  }
943
- function tt(t, e) {
965
+ function et(t, e) {
944
966
  for (var r = 0; r < e.length; r++) {
945
967
  var n = e[r];
946
968
  n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0),
947
- Object.defineProperty(t, lt(n.key), n);
969
+ Object.defineProperty(t, ct(n.key), n);
948
970
  }
949
971
  }
950
- function et(t, e, r) {
951
- return e && tt(t.prototype, e), r && tt(t, r), Object.defineProperty(t, "prototype", {
972
+ function rt(t, e, r) {
973
+ return e && et(t.prototype, e), r && et(t, r), Object.defineProperty(t, "prototype", {
952
974
  writable: !1
953
975
  }), t;
954
976
  }
955
- function rt(t, e, r) {
956
- return e = ot(e), function(t, e) {
957
- if (e && ("object" == W(e) || "function" == typeof e)) return e;
977
+ function nt(t, e, r) {
978
+ return e = it(e), function(t, e) {
979
+ if (e && ("object" == X(e) || "function" == typeof e)) return e;
958
980
  if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
959
981
  return function(t) {
960
982
  if (void 0 === t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
961
983
  return t;
962
984
  }(t);
963
- }(t, nt() ? Reflect.construct(e, r || [], ot(t).constructor) : e.apply(t, r));
985
+ }(t, ot() ? Reflect.construct(e, r || [], it(t).constructor) : e.apply(t, r));
964
986
  }
965
- function nt() {
987
+ function ot() {
966
988
  try {
967
989
  var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
968
990
  } catch (t) {}
969
- return (nt = function() {
991
+ return (ot = function() {
970
992
  return !!t;
971
993
  })();
972
994
  }
973
- function ot(t) {
974
- return ot = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
995
+ function it(t) {
996
+ return it = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
975
997
  return t.__proto__ || Object.getPrototypeOf(t);
976
- }, ot(t);
998
+ }, it(t);
977
999
  }
978
- function it(t, e) {
1000
+ function at(t, e) {
979
1001
  if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
980
1002
  t.prototype = Object.create(e && e.prototype, {
981
1003
  constructor: {
@@ -985,42 +1007,42 @@ var OHLCV_INDICATORS;
985
1007
  }
986
1008
  }), Object.defineProperty(t, "prototype", {
987
1009
  writable: !1
988
- }), e && at(t, e);
1010
+ }), e && ut(t, e);
989
1011
  }
990
- function at(t, e) {
991
- return at = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) {
1012
+ function ut(t, e) {
1013
+ return ut = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) {
992
1014
  return t.__proto__ = e, t;
993
- }, at(t, e);
1015
+ }, ut(t, e);
994
1016
  }
995
- function ut(t, e, r) {
996
- return (e = lt(e)) in t ? Object.defineProperty(t, e, {
1017
+ function lt(t, e, r) {
1018
+ return (e = ct(e)) in t ? Object.defineProperty(t, e, {
997
1019
  value: r,
998
1020
  enumerable: !0,
999
1021
  configurable: !0,
1000
1022
  writable: !0
1001
1023
  }) : t[e] = r, t;
1002
1024
  }
1003
- function lt(t) {
1025
+ function ct(t) {
1004
1026
  var e = function(t, e) {
1005
- if ("object" != W(t) || !t) return t;
1027
+ if ("object" != X(t) || !t) return t;
1006
1028
  var r = t[Symbol.toPrimitive];
1007
1029
  if (void 0 !== r) {
1008
1030
  var n = r.call(t, e || "default");
1009
- if ("object" != W(n)) return n;
1031
+ if ("object" != X(n)) return n;
1010
1032
  throw new TypeError("@@toPrimitive must return a primitive value.");
1011
1033
  }
1012
1034
  return ("string" === e ? String : Number)(t);
1013
1035
  }(t, "string");
1014
- return "symbol" == W(e) ? e : e + "";
1036
+ return "symbol" == X(e) ? e : e + "";
1015
1037
  }
1016
- var ct = function(t) {
1038
+ var st = function(t) {
1017
1039
  function e() {
1018
1040
  var t;
1019
- X(this, e);
1041
+ tt(this, e);
1020
1042
  for (var r = arguments.length, n = new Array(r), o = 0; o < r; o++) n[o] = arguments[o];
1021
- return ut(t = rt(this, e, [].concat(n)), "prices", []), t;
1043
+ return lt(t = nt(this, e, [].concat(n)), "prices", []), t;
1022
1044
  }
1023
- return it(e, t), et(e, [ {
1045
+ return at(e, t), rt(e, [ {
1024
1046
  key: "update",
1025
1047
  value: function(t) {
1026
1048
  var e = arguments.length > 1 && void 0 !== arguments[1] && arguments[1];
@@ -1033,54 +1055,54 @@ var OHLCV_INDICATORS;
1033
1055
  }
1034
1056
  }
1035
1057
  } ]);
1036
- }(Q);
1058
+ }(W);
1037
1059
  // ./node_modules/trading-signals/dist/WSMA/WSMA.js
1038
- function st(t) {
1039
- return st = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
1060
+ function ft(t) {
1061
+ return ft = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
1040
1062
  return typeof t;
1041
1063
  } : function(t) {
1042
1064
  return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
1043
- }, st(t);
1065
+ }, ft(t);
1044
1066
  }
1045
- function ft(t, e) {
1067
+ function ht(t, e) {
1046
1068
  if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
1047
1069
  }
1048
1070
  function yt(t, e) {
1049
1071
  for (var r = 0; r < e.length; r++) {
1050
1072
  var n = e[r];
1051
1073
  n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0),
1052
- Object.defineProperty(t, wt(n.key), n);
1074
+ Object.defineProperty(t, St(n.key), n);
1053
1075
  }
1054
1076
  }
1055
- function ht(t, e, r) {
1077
+ function pt(t, e, r) {
1056
1078
  return e && yt(t.prototype, e), r && yt(t, r), Object.defineProperty(t, "prototype", {
1057
1079
  writable: !1
1058
1080
  }), t;
1059
1081
  }
1060
- function pt(t, e, r) {
1061
- return e = mt(e), function(t, e) {
1062
- if (e && ("object" == st(e) || "function" == typeof e)) return e;
1082
+ function vt(t, e, r) {
1083
+ return e = dt(e), function(t, e) {
1084
+ if (e && ("object" == ft(e) || "function" == typeof e)) return e;
1063
1085
  if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
1064
1086
  return function(t) {
1065
1087
  if (void 0 === t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1066
1088
  return t;
1067
1089
  }(t);
1068
- }(t, vt() ? Reflect.construct(e, r || [], mt(t).constructor) : e.apply(t, r));
1090
+ }(t, mt() ? Reflect.construct(e, r || [], dt(t).constructor) : e.apply(t, r));
1069
1091
  }
1070
- function vt() {
1092
+ function mt() {
1071
1093
  try {
1072
1094
  var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
1073
1095
  } catch (t) {}
1074
- return (vt = function() {
1096
+ return (mt = function() {
1075
1097
  return !!t;
1076
1098
  })();
1077
1099
  }
1078
- function mt(t) {
1079
- return mt = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
1100
+ function dt(t) {
1101
+ return dt = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
1080
1102
  return t.__proto__ || Object.getPrototypeOf(t);
1081
- }, mt(t);
1103
+ }, dt(t);
1082
1104
  }
1083
- function dt(t, e) {
1105
+ function bt(t, e) {
1084
1106
  if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
1085
1107
  t.prototype = Object.create(e && e.prototype, {
1086
1108
  constructor: {
@@ -1090,42 +1112,42 @@ var OHLCV_INDICATORS;
1090
1112
  }
1091
1113
  }), Object.defineProperty(t, "prototype", {
1092
1114
  writable: !1
1093
- }), e && bt(t, e);
1115
+ }), e && gt(t, e);
1094
1116
  }
1095
- function bt(t, e) {
1096
- return bt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) {
1117
+ function gt(t, e) {
1118
+ return gt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) {
1097
1119
  return t.__proto__ = e, t;
1098
- }, bt(t, e);
1120
+ }, gt(t, e);
1099
1121
  }
1100
- function gt(t, e, r) {
1101
- return (e = wt(e)) in t ? Object.defineProperty(t, e, {
1122
+ function wt(t, e, r) {
1123
+ return (e = St(e)) in t ? Object.defineProperty(t, e, {
1102
1124
  value: r,
1103
1125
  enumerable: !0,
1104
1126
  configurable: !0,
1105
1127
  writable: !0
1106
1128
  }) : t[e] = r, t;
1107
1129
  }
1108
- function wt(t) {
1130
+ function St(t) {
1109
1131
  var e = function(t, e) {
1110
- if ("object" != st(t) || !t) return t;
1132
+ if ("object" != ft(t) || !t) return t;
1111
1133
  var r = t[Symbol.toPrimitive];
1112
1134
  if (void 0 !== r) {
1113
1135
  var n = r.call(t, e || "default");
1114
- if ("object" != st(n)) return n;
1136
+ if ("object" != ft(n)) return n;
1115
1137
  throw new TypeError("@@toPrimitive must return a primitive value.");
1116
1138
  }
1117
1139
  return ("string" === e ? String : Number)(t);
1118
1140
  }(t, "string");
1119
- return "symbol" == st(e) ? e : e + "";
1141
+ return "symbol" == ft(e) ? e : e + "";
1120
1142
  }
1121
1143
  var Ot = function(t) {
1122
1144
  function e(t) {
1123
1145
  var r;
1124
- return ft(this, e), gt(r = pt(this, e), "interval", void 0), gt(r, "indicator", void 0),
1125
- gt(r, "smoothingFactor", void 0), r.interval = t, r.indicator = new ct(t), r.smoothingFactor = 1 / r.interval,
1146
+ return ht(this, e), wt(r = vt(this, e), "interval", void 0), wt(r, "indicator", void 0),
1147
+ wt(r, "smoothingFactor", void 0), r.interval = t, r.indicator = new st(t), r.smoothingFactor = 1 / r.interval,
1126
1148
  r;
1127
1149
  }
1128
- return dt(e, t), ht(e, [ {
1150
+ return bt(e, t), pt(e, [ {
1129
1151
  key: "updates",
1130
1152
  value: function(t) {
1131
1153
  var e = this;
@@ -1148,68 +1170,68 @@ var OHLCV_INDICATORS;
1148
1170
  if (void 0 === this.result && void 0 !== r) return this.setResult(r, e);
1149
1171
  }
1150
1172
  } ]);
1151
- }(B);
1152
- function St(t) {
1173
+ }(H);
1174
+ function jt(t) {
1153
1175
  return t.length ? t.reduce((function(t, e) {
1154
1176
  return t + e;
1155
1177
  }), 0) / t.length : 0;
1156
1178
  }
1157
1179
  // ./node_modules/trading-signals/dist/BBANDS/BollingerBands.js
1158
- function jt(t) {
1159
- return jt = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
1180
+ function Pt(t) {
1181
+ return Pt = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
1160
1182
  return typeof t;
1161
1183
  } : function(t) {
1162
1184
  return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
1163
- }, jt(t);
1185
+ }, Pt(t);
1164
1186
  }
1165
- function Pt(t, e) {
1187
+ function _t(t, e) {
1166
1188
  if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
1167
1189
  }
1168
- function _t(t, e) {
1190
+ function Nt(t, e) {
1169
1191
  for (var r = 0; r < e.length; r++) {
1170
1192
  var n = e[r];
1171
1193
  n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0),
1172
- Object.defineProperty(t, At(n.key), n);
1194
+ Object.defineProperty(t, Et(n.key), n);
1173
1195
  }
1174
1196
  }
1175
- function Nt(t, e, r) {
1176
- return e && _t(t.prototype, e), r && _t(t, r), Object.defineProperty(t, "prototype", {
1197
+ function At(t, e, r) {
1198
+ return e && Nt(t.prototype, e), r && Nt(t, r), Object.defineProperty(t, "prototype", {
1177
1199
  writable: !1
1178
1200
  }), t;
1179
1201
  }
1180
1202
  function Tt(t, e, r) {
1181
- return (e = At(e)) in t ? Object.defineProperty(t, e, {
1203
+ return (e = Et(e)) in t ? Object.defineProperty(t, e, {
1182
1204
  value: r,
1183
1205
  enumerable: !0,
1184
1206
  configurable: !0,
1185
1207
  writable: !0
1186
1208
  }) : t[e] = r, t;
1187
1209
  }
1188
- function At(t) {
1210
+ function Et(t) {
1189
1211
  var e = function(t, e) {
1190
- if ("object" != jt(t) || !t) return t;
1212
+ if ("object" != Pt(t) || !t) return t;
1191
1213
  var r = t[Symbol.toPrimitive];
1192
1214
  if (void 0 !== r) {
1193
1215
  var n = r.call(t, e || "default");
1194
- if ("object" != jt(n)) return n;
1216
+ if ("object" != Pt(n)) return n;
1195
1217
  throw new TypeError("@@toPrimitive must return a primitive value.");
1196
1218
  }
1197
1219
  return ("string" === e ? String : Number)(t);
1198
1220
  }(t, "string");
1199
- return "symbol" == jt(e) ? e : e + "";
1221
+ return "symbol" == Pt(e) ? e : e + "";
1200
1222
  }
1201
- var Et = function() {
1202
- return Nt((function t(e) {
1223
+ var xt = function() {
1224
+ return At((function t(e) {
1203
1225
  var r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 2;
1204
- Pt(this, t), Tt(this, "interval", void 0), Tt(this, "deviationMultiplier", void 0),
1226
+ _t(this, t), Tt(this, "interval", void 0), Tt(this, "deviationMultiplier", void 0),
1205
1227
  Tt(this, "prices", []), Tt(this, "result", void 0), this.interval = e, this.deviationMultiplier = r;
1206
1228
  }), [ {
1207
1229
  key: "update",
1208
1230
  value: function(t) {
1209
1231
  if (this.prices.push(t), this.prices.length > this.interval) {
1210
1232
  this.prices.shift();
1211
- var e = St(this.prices), r = function(t, e) {
1212
- var r = e || St(t), n = St(t.map((function(t) {
1233
+ var e = jt(this.prices), r = function(t, e) {
1234
+ var r = e || jt(t), n = jt(t.map((function(t) {
1213
1235
  return t - r;
1214
1236
  })).map((function(t) {
1215
1237
  return t * t;
@@ -1226,7 +1248,7 @@ var OHLCV_INDICATORS;
1226
1248
  }, {
1227
1249
  key: "getResult",
1228
1250
  value: function() {
1229
- if (void 0 === this.result) throw new I;
1251
+ if (void 0 === this.result) throw new M;
1230
1252
  return this.result;
1231
1253
  }
1232
1254
  }, {
@@ -1237,52 +1259,52 @@ var OHLCV_INDICATORS;
1237
1259
  } ]);
1238
1260
  }();
1239
1261
  // ./node_modules/trading-signals/dist/EMA/EMA.js
1240
- function xt(t) {
1241
- return xt = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
1262
+ function kt(t) {
1263
+ return kt = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
1242
1264
  return typeof t;
1243
1265
  } : function(t) {
1244
1266
  return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
1245
- }, xt(t);
1267
+ }, kt(t);
1246
1268
  }
1247
- function kt(t, e) {
1269
+ function It(t, e) {
1248
1270
  if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
1249
1271
  }
1250
- function It(t, e) {
1272
+ function Mt(t, e) {
1251
1273
  for (var r = 0; r < e.length; r++) {
1252
1274
  var n = e[r];
1253
1275
  n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0),
1254
- Object.defineProperty(t, Ht(n.key), n);
1276
+ Object.defineProperty(t, Vt(n.key), n);
1255
1277
  }
1256
1278
  }
1257
- function Mt(t, e, r) {
1258
- return e && It(t.prototype, e), r && It(t, r), Object.defineProperty(t, "prototype", {
1279
+ function Dt(t, e, r) {
1280
+ return e && Mt(t.prototype, e), r && Mt(t, r), Object.defineProperty(t, "prototype", {
1259
1281
  writable: !1
1260
1282
  }), t;
1261
1283
  }
1262
- function Dt(t, e, r) {
1263
- return e = Ct(e), function(t, e) {
1264
- if (e && ("object" == xt(e) || "function" == typeof e)) return e;
1284
+ function Rt(t, e, r) {
1285
+ return e = Ft(e), function(t, e) {
1286
+ if (e && ("object" == kt(e) || "function" == typeof e)) return e;
1265
1287
  if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
1266
1288
  return function(t) {
1267
1289
  if (void 0 === t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1268
1290
  return t;
1269
1291
  }(t);
1270
- }(t, Rt() ? Reflect.construct(e, r || [], Ct(t).constructor) : e.apply(t, r));
1292
+ }(t, Ct() ? Reflect.construct(e, r || [], Ft(t).constructor) : e.apply(t, r));
1271
1293
  }
1272
- function Rt() {
1294
+ function Ct() {
1273
1295
  try {
1274
1296
  var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
1275
1297
  } catch (t) {}
1276
- return (Rt = function() {
1298
+ return (Ct = function() {
1277
1299
  return !!t;
1278
1300
  })();
1279
1301
  }
1280
- function Ct(t) {
1281
- return Ct = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
1302
+ function Ft(t) {
1303
+ return Ft = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
1282
1304
  return t.__proto__ || Object.getPrototypeOf(t);
1283
- }, Ct(t);
1305
+ }, Ft(t);
1284
1306
  }
1285
- function Ft(t, e) {
1307
+ function Lt(t, e) {
1286
1308
  if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
1287
1309
  t.prototype = Object.create(e && e.prototype, {
1288
1310
  constructor: {
@@ -1292,42 +1314,42 @@ var OHLCV_INDICATORS;
1292
1314
  }
1293
1315
  }), Object.defineProperty(t, "prototype", {
1294
1316
  writable: !1
1295
- }), e && Lt(t, e);
1317
+ }), e && Bt(t, e);
1296
1318
  }
1297
- function Lt(t, e) {
1298
- return Lt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) {
1319
+ function Bt(t, e) {
1320
+ return Bt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) {
1299
1321
  return t.__proto__ = e, t;
1300
- }, Lt(t, e);
1322
+ }, Bt(t, e);
1301
1323
  }
1302
- function Bt(t, e, r) {
1303
- return (e = Ht(e)) in t ? Object.defineProperty(t, e, {
1324
+ function Ht(t, e, r) {
1325
+ return (e = Vt(e)) in t ? Object.defineProperty(t, e, {
1304
1326
  value: r,
1305
1327
  enumerable: !0,
1306
1328
  configurable: !0,
1307
1329
  writable: !0
1308
1330
  }) : t[e] = r, t;
1309
1331
  }
1310
- function Ht(t) {
1332
+ function Vt(t) {
1311
1333
  var e = function(t, e) {
1312
- if ("object" != xt(t) || !t) return t;
1334
+ if ("object" != kt(t) || !t) return t;
1313
1335
  var r = t[Symbol.toPrimitive];
1314
1336
  if (void 0 !== r) {
1315
1337
  var n = r.call(t, e || "default");
1316
- if ("object" != xt(n)) return n;
1338
+ if ("object" != kt(n)) return n;
1317
1339
  throw new TypeError("@@toPrimitive must return a primitive value.");
1318
1340
  }
1319
1341
  return ("string" === e ? String : Number)(t);
1320
1342
  }(t, "string");
1321
- return "symbol" == xt(e) ? e : e + "";
1343
+ return "symbol" == kt(e) ? e : e + "";
1322
1344
  }
1323
- var Vt = function(t) {
1345
+ var Ut = function(t) {
1324
1346
  function e(t) {
1325
1347
  var r;
1326
- return kt(this, e), Bt(r = Dt(this, e, [ t ]), "interval", void 0), Bt(r, "pricesCounter", 0),
1327
- Bt(r, "weightFactor", void 0), r.interval = t, r.weightFactor = 2 / (r.interval + 1),
1348
+ return It(this, e), Ht(r = Rt(this, e, [ t ]), "interval", void 0), Ht(r, "pricesCounter", 0),
1349
+ Ht(r, "weightFactor", void 0), r.interval = t, r.weightFactor = 2 / (r.interval + 1),
1328
1350
  r;
1329
1351
  }
1330
- return Ft(e, t), Mt(e, [ {
1352
+ return Lt(e, t), Dt(e, [ {
1331
1353
  key: "update",
1332
1354
  value: function(t) {
1333
1355
  var e = arguments.length > 1 && void 0 !== arguments[1] && arguments[1];
@@ -1337,7 +1359,7 @@ var OHLCV_INDICATORS;
1337
1359
  }, {
1338
1360
  key: "getResult",
1339
1361
  value: function() {
1340
- if (this.pricesCounter < this.interval) throw new I;
1362
+ if (this.pricesCounter < this.interval) throw new M;
1341
1363
  return this.result;
1342
1364
  }
1343
1365
  }, {
@@ -1350,31 +1372,31 @@ var OHLCV_INDICATORS;
1350
1372
  }
1351
1373
  }
1352
1374
  } ]);
1353
- }(Q);
1375
+ }(W);
1354
1376
  // ./node_modules/trading-signals/dist/MACD/MACD.js
1355
- function Ut(t) {
1356
- return Ut = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
1377
+ function $t(t) {
1378
+ return $t = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
1357
1379
  return typeof t;
1358
1380
  } : function(t) {
1359
1381
  return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
1360
- }, Ut(t);
1382
+ }, $t(t);
1361
1383
  }
1362
- function $t(t, e) {
1384
+ function qt(t, e) {
1363
1385
  if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
1364
1386
  }
1365
- function qt(t, e) {
1387
+ function zt(t, e) {
1366
1388
  for (var r = 0; r < e.length; r++) {
1367
1389
  var n = e[r];
1368
1390
  n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0),
1369
1391
  Object.defineProperty(t, Yt(n.key), n);
1370
1392
  }
1371
1393
  }
1372
- function zt(t, e, r) {
1373
- return e && qt(t.prototype, e), r && qt(t, r), Object.defineProperty(t, "prototype", {
1394
+ function Gt(t, e, r) {
1395
+ return e && zt(t.prototype, e), r && zt(t, r), Object.defineProperty(t, "prototype", {
1374
1396
  writable: !1
1375
1397
  }), t;
1376
1398
  }
1377
- function Gt(t, e, r) {
1399
+ function Kt(t, e, r) {
1378
1400
  return (e = Yt(e)) in t ? Object.defineProperty(t, e, {
1379
1401
  value: r,
1380
1402
  enumerable: !0,
@@ -1384,26 +1406,26 @@ var OHLCV_INDICATORS;
1384
1406
  }
1385
1407
  function Yt(t) {
1386
1408
  var e = function(t, e) {
1387
- if ("object" != Ut(t) || !t) return t;
1409
+ if ("object" != $t(t) || !t) return t;
1388
1410
  var r = t[Symbol.toPrimitive];
1389
1411
  if (void 0 !== r) {
1390
1412
  var n = r.call(t, e || "default");
1391
- if ("object" != Ut(n)) return n;
1413
+ if ("object" != $t(n)) return n;
1392
1414
  throw new TypeError("@@toPrimitive must return a primitive value.");
1393
1415
  }
1394
1416
  return ("string" === e ? String : Number)(t);
1395
1417
  }(t, "string");
1396
- return "symbol" == Ut(e) ? e : e + "";
1418
+ return "symbol" == $t(e) ? e : e + "";
1397
1419
  }
1398
- var Kt = function() {
1399
- return zt((function t(e, r, n) {
1400
- $t(this, t), Gt(this, "short", void 0), Gt(this, "long", void 0), Gt(this, "signal", void 0),
1401
- Gt(this, "prices", []), Gt(this, "result", void 0), this.short = e, this.long = r,
1420
+ var Jt = function() {
1421
+ return Gt((function t(e, r, n) {
1422
+ qt(this, t), Kt(this, "short", void 0), Kt(this, "long", void 0), Kt(this, "signal", void 0),
1423
+ Kt(this, "prices", []), Kt(this, "result", void 0), this.short = e, this.long = r,
1402
1424
  this.signal = n;
1403
1425
  }), [ {
1404
1426
  key: "getResult",
1405
1427
  value: function() {
1406
- if (void 0 === this.result) throw new I;
1428
+ if (void 0 === this.result) throw new M;
1407
1429
  return this.result;
1408
1430
  }
1409
1431
  }, {
@@ -1429,52 +1451,52 @@ var OHLCV_INDICATORS;
1429
1451
  } ]);
1430
1452
  }();
1431
1453
  // ./node_modules/trading-signals/dist/RSI/RSI.js
1432
- function Jt(t) {
1433
- return Jt = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
1454
+ function Zt(t) {
1455
+ return Zt = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
1434
1456
  return typeof t;
1435
1457
  } : function(t) {
1436
1458
  return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
1437
- }, Jt(t);
1459
+ }, Zt(t);
1438
1460
  }
1439
- function Zt(t, e) {
1461
+ function Qt(t, e) {
1440
1462
  if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
1441
1463
  }
1442
- function Qt(t, e) {
1464
+ function Wt(t, e) {
1443
1465
  for (var r = 0; r < e.length; r++) {
1444
1466
  var n = e[r];
1445
1467
  n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0),
1446
- Object.defineProperty(t, ie(n.key), n);
1468
+ Object.defineProperty(t, ae(n.key), n);
1447
1469
  }
1448
1470
  }
1449
- function Wt(t, e, r) {
1450
- return e && Qt(t.prototype, e), r && Qt(t, r), Object.defineProperty(t, "prototype", {
1471
+ function Xt(t, e, r) {
1472
+ return e && Wt(t.prototype, e), r && Wt(t, r), Object.defineProperty(t, "prototype", {
1451
1473
  writable: !1
1452
1474
  }), t;
1453
1475
  }
1454
- function Xt(t, e, r) {
1455
- return e = ee(e), function(t, e) {
1456
- if (e && ("object" == Jt(e) || "function" == typeof e)) return e;
1476
+ function te(t, e, r) {
1477
+ return e = re(e), function(t, e) {
1478
+ if (e && ("object" == Zt(e) || "function" == typeof e)) return e;
1457
1479
  if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
1458
1480
  return function(t) {
1459
1481
  if (void 0 === t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1460
1482
  return t;
1461
1483
  }(t);
1462
- }(t, te() ? Reflect.construct(e, r || [], ee(t).constructor) : e.apply(t, r));
1484
+ }(t, ee() ? Reflect.construct(e, r || [], re(t).constructor) : e.apply(t, r));
1463
1485
  }
1464
- function te() {
1486
+ function ee() {
1465
1487
  try {
1466
1488
  var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
1467
1489
  } catch (t) {}
1468
- return (te = function() {
1490
+ return (ee = function() {
1469
1491
  return !!t;
1470
1492
  })();
1471
1493
  }
1472
- function ee(t) {
1473
- return ee = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
1494
+ function re(t) {
1495
+ return re = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
1474
1496
  return t.__proto__ || Object.getPrototypeOf(t);
1475
- }, ee(t);
1497
+ }, re(t);
1476
1498
  }
1477
- function re(t, e) {
1499
+ function ne(t, e) {
1478
1500
  if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
1479
1501
  t.prototype = Object.create(e && e.prototype, {
1480
1502
  constructor: {
@@ -1484,42 +1506,42 @@ var OHLCV_INDICATORS;
1484
1506
  }
1485
1507
  }), Object.defineProperty(t, "prototype", {
1486
1508
  writable: !1
1487
- }), e && ne(t, e);
1509
+ }), e && oe(t, e);
1488
1510
  }
1489
- function ne(t, e) {
1490
- return ne = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) {
1511
+ function oe(t, e) {
1512
+ return oe = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) {
1491
1513
  return t.__proto__ = e, t;
1492
- }, ne(t, e);
1514
+ }, oe(t, e);
1493
1515
  }
1494
- function oe(t, e, r) {
1495
- return (e = ie(e)) in t ? Object.defineProperty(t, e, {
1516
+ function ie(t, e, r) {
1517
+ return (e = ae(e)) in t ? Object.defineProperty(t, e, {
1496
1518
  value: r,
1497
1519
  enumerable: !0,
1498
1520
  configurable: !0,
1499
1521
  writable: !0
1500
1522
  }) : t[e] = r, t;
1501
1523
  }
1502
- function ie(t) {
1524
+ function ae(t) {
1503
1525
  var e = function(t, e) {
1504
- if ("object" != Jt(t) || !t) return t;
1526
+ if ("object" != Zt(t) || !t) return t;
1505
1527
  var r = t[Symbol.toPrimitive];
1506
1528
  if (void 0 !== r) {
1507
1529
  var n = r.call(t, e || "default");
1508
- if ("object" != Jt(n)) return n;
1530
+ if ("object" != Zt(n)) return n;
1509
1531
  throw new TypeError("@@toPrimitive must return a primitive value.");
1510
1532
  }
1511
1533
  return ("string" === e ? String : Number)(t);
1512
1534
  }(t, "string");
1513
- return "symbol" == Jt(e) ? e : e + "";
1535
+ return "symbol" == Zt(e) ? e : e + "";
1514
1536
  }
1515
- var ae = function(t) {
1537
+ var ue = function(t) {
1516
1538
  function e(t) {
1517
1539
  var r, n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : Ot;
1518
- return Zt(this, e), oe(r = Xt(this, e), "interval", void 0), oe(r, "previousPrices", []),
1519
- oe(r, "avgGain", void 0), oe(r, "avgLoss", void 0), oe(r, "maxValue", 100), r.interval = t,
1540
+ return Qt(this, e), ie(r = te(this, e), "interval", void 0), ie(r, "previousPrices", []),
1541
+ ie(r, "avgGain", void 0), ie(r, "avgLoss", void 0), ie(r, "maxValue", 100), r.interval = t,
1520
1542
  r.avgGain = new n(r.interval), r.avgLoss = new n(r.interval), r;
1521
1543
  }
1522
- return re(e, t), Wt(e, [ {
1544
+ return ne(e, t), Xt(e, [ {
1523
1545
  key: "update",
1524
1546
  value: function(t) {
1525
1547
  var e = arguments.length > 1 && void 0 !== arguments[1] && arguments[1];
@@ -1536,28 +1558,28 @@ var OHLCV_INDICATORS;
1536
1558
  }
1537
1559
  }
1538
1560
  } ]);
1539
- }(B);
1561
+ }(H);
1540
1562
  // ./src/oscillators/rsi.js
1541
- function ue(t) {
1542
- return ue = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
1563
+ function le(t) {
1564
+ return le = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
1543
1565
  return typeof t;
1544
1566
  } : function(t) {
1545
1567
  return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
1546
- }, ue(t);
1568
+ }, le(t);
1547
1569
  }
1548
- function le(t, e, r) {
1570
+ function ce(t, e, r) {
1549
1571
  return (e = function(t) {
1550
1572
  var e = function(t, e) {
1551
- if ("object" != ue(t) || !t) return t;
1573
+ if ("object" != le(t) || !t) return t;
1552
1574
  var r = t[Symbol.toPrimitive];
1553
1575
  if (void 0 !== r) {
1554
1576
  var n = r.call(t, e || "default");
1555
- if ("object" != ue(n)) return n;
1577
+ if ("object" != le(n)) return n;
1556
1578
  throw new TypeError("@@toPrimitive must return a primitive value.");
1557
1579
  }
1558
1580
  return ("string" === e ? String : Number)(t);
1559
1581
  }(t, "string");
1560
- return "symbol" == ue(e) ? e : e + "";
1582
+ return "symbol" == le(e) ? e : e + "";
1561
1583
  }(e)) in t ? Object.defineProperty(t, e, {
1562
1584
  value: r,
1563
1585
  enumerable: !0,
@@ -1565,57 +1587,57 @@ var OHLCV_INDICATORS;
1565
1587
  writable: !0
1566
1588
  }) : t[e] = r, t;
1567
1589
  }
1568
- var ce = {
1569
- ema: Vt,
1570
- sma: ct
1571
- }, se = function(t, e, r, n, o) {
1572
- var i = o.target, a = o.lag, u = t.verticalOhlcv, l = t.instances, c = t.priceBased, s = "string" == typeof i && u.hasOwnProperty(i) && "close" !== i ? "_".concat(i) : "", f = "".concat(r, "_").concat(n).concat(s);
1573
- if (0 === e) {
1574
- var y = t.len, h = t.arrayTypes;
1575
- if (!u.hasOwnProperty(i)) throw new Error("Target property ".concat(i, " not found in verticalOhlcv for ").concat(r, "."));
1576
- // Create the main moving average instance.
1577
- l[f] = {
1578
- maInstance: new ce[r](n)
1579
- }, u[f] = new Float64Array(y).fill(NaN), c.add(f), a > 0 && t.lag([ f ], a), h[f] = "Float64Array";
1580
- }
1590
+ var se = {
1591
+ ema: Ut,
1592
+ sma: st
1593
+ }, fe = function(t, e, r, n, o) {
1594
+ var i = o.target, a = (o.lag, o.precomputed), u = t.verticalOhlcv, l = t.instances, c = a.keyName;
1595
+ if (0 === e && !u.hasOwnProperty(i)) throw new Error("Target property ".concat(i, " not found in verticalOhlcv for ").concat(r, "."));
1581
1596
  // Retrieve the current price value.
1582
- var p = u[i][e], v = l[f].maInstance;
1597
+ var s = u[i][e], f = l[c].maInstance;
1583
1598
  // Update the moving average instance.
1584
- v.update(p);
1585
- var m = NaN;
1599
+ f.update(s);
1600
+ var h = NaN;
1586
1601
  try {
1587
- m = v.getResult();
1588
- } catch (t) {
1589
- m = NaN;
1590
- }
1602
+ h = f.getResult();
1603
+ } catch (t) {}
1591
1604
  // Always push the MA value (even if NaN).
1592
1605
  return t.pushToMain({
1593
1606
  index: e,
1594
- key: f,
1595
- value: m
1607
+ key: c,
1608
+ value: h
1596
1609
  }), !0;
1610
+ }, he = function(t) {
1611
+ var e = t.main, r = t.size, n = t.target, o = t.lag, i = t.methodName, a = e.instances, u = e.verticalOhlcv, l = e.priceBased, c = e.arrayTypes, s = e.len, f = "close" !== n ? "_".concat(n) : "", h = "".concat(i, "_").concat(r).concat(f);
1612
+ // Create the main moving average instance.
1613
+ return a[h] = {
1614
+ maInstance: new se[i](r)
1615
+ }, u[h] = new Float64Array(s).fill(NaN), l.add(h), o > 0 && e.lag([ h ], o), c[h] = "Float64Array",
1616
+ {
1617
+ keyName: h
1618
+ };
1597
1619
  };
1598
1620
  // ./src/moving-averages/macd.js
1599
- function fe(t) {
1600
- return fe = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
1621
+ function ye(t) {
1622
+ return ye = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
1601
1623
  return typeof t;
1602
1624
  } : function(t) {
1603
1625
  return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
1604
- }, fe(t);
1626
+ }, ye(t);
1605
1627
  }
1606
- function ye(t, e, r) {
1628
+ function pe(t, e, r) {
1607
1629
  return (e = function(t) {
1608
1630
  var e = function(t, e) {
1609
- if ("object" != fe(t) || !t) return t;
1631
+ if ("object" != ye(t) || !t) return t;
1610
1632
  var r = t[Symbol.toPrimitive];
1611
1633
  if (void 0 !== r) {
1612
1634
  var n = r.call(t, e || "default");
1613
- if ("object" != fe(n)) return n;
1635
+ if ("object" != ye(n)) return n;
1614
1636
  throw new TypeError("@@toPrimitive must return a primitive value.");
1615
1637
  }
1616
1638
  return ("string" === e ? String : Number)(t);
1617
1639
  }(t, "string");
1618
- return "symbol" == fe(e) ? e : e + "";
1640
+ return "symbol" == ye(e) ? e : e + "";
1619
1641
  }(e)) in t ? Object.defineProperty(t, e, {
1620
1642
  value: r,
1621
1643
  enumerable: !0,
@@ -1623,14 +1645,14 @@ var OHLCV_INDICATORS;
1623
1645
  writable: !0
1624
1646
  }) : t[e] = r, t;
1625
1647
  }
1626
- function he(t, e) {
1648
+ function ve(t, e) {
1627
1649
  var r = "undefined" != typeof Symbol && t[Symbol.iterator] || t["@@iterator"];
1628
1650
  if (!r) {
1629
1651
  if (Array.isArray(t) || (r = function(t, e) {
1630
1652
  if (t) {
1631
- if ("string" == typeof t) return pe(t, e);
1653
+ if ("string" == typeof t) return me(t, e);
1632
1654
  var r = {}.toString.call(t).slice(8, -1);
1633
- return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? pe(t, e) : void 0;
1655
+ return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? me(t, e) : void 0;
1634
1656
  }
1635
1657
  }(t)) || e && t && "number" == typeof t.length) {
1636
1658
  r && (t = r);
@@ -1674,21 +1696,83 @@ var OHLCV_INDICATORS;
1674
1696
  }
1675
1697
  };
1676
1698
  }
1677
- function pe(t, e) {
1699
+ function me(t, e) {
1678
1700
  (null == e || e > t.length) && (e = t.length);
1679
1701
  for (var r = 0, n = Array(e); r < e; r++) n[r] = t[r];
1680
1702
  return n;
1681
1703
  }
1682
- var ve = "close";
1704
+ var de = "close";
1705
+ // ./src/utilities/numberUtilities.js
1706
+ function be(t) {
1707
+ return be = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
1708
+ return typeof t;
1709
+ } : function(t) {
1710
+ return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
1711
+ }, be(t);
1712
+ }
1713
+ // Helper to clean non-numeric characters (except "-" at the start and decimal point)
1714
+ var ge = {
1715
+ number: function(t) {
1716
+ return t;
1717
+ },
1718
+ numberCleanString: function(t) {
1719
+ return Number(t);
1720
+ },
1721
+ numberDirtyString: function(t) {
1722
+ return Number(t.replace(/(?!^-)[^0-9.]/g, ""));
1723
+ }
1724
+ }, we = function(t) {
1725
+ var e = arguments.length > 1 && void 0 !== arguments[1] && arguments[1];
1726
+ // 1) true numbers
1727
+ if ("number" == typeof t && !Number.isNaN(t)) return "number";
1728
+ // 2) strings
1729
+ if ("string" == typeof t) {
1730
+ var r = t.trim(), n = /^-?\d+(\.\d+)?$/;
1731
+ // a) clean numeric string: only digits and an optional single period
1732
+ if (n.test(r)) return "numberCleanString";
1733
+ // b) dirty numeric string: contains non-digits (dollar, commas, letters, etc.)
1734
+ // but once you strip those out, you're left with a valid number
1735
+ var o = r.replace(/[^0-9.]/g, "");
1736
+ if (o && n.test(o)) return "numberDirtyString";
1737
+ }
1738
+ if (e) throw new TypeError("Invalid input: expected a number or numeric string");
1739
+ return be(t);
1740
+ }, Se = function(t, e) {
1741
+ var r = Math.pow(10, e);
1742
+ // add a tiny epsilon to mitigate floating-point quirks around .5
1743
+ return Math.round((t + Number.EPSILON) * r) / r;
1744
+ };
1683
1745
  // ./src/moving-averages/donchianChannel.js
1684
- function me(t) {
1685
- return me = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
1746
+ function Oe(t) {
1747
+ return function(t) {
1748
+ if (Array.isArray(t)) return Pe(t);
1749
+ }(t) || function(t) {
1750
+ if ("undefined" != typeof Symbol && null != t[Symbol.iterator] || null != t["@@iterator"]) return Array.from(t);
1751
+ }(t) || je(t) || function() {
1752
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1753
+ }();
1754
+ }
1755
+ function je(t, e) {
1756
+ if (t) {
1757
+ if ("string" == typeof t) return Pe(t, e);
1758
+ var r = {}.toString.call(t).slice(8, -1);
1759
+ return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Pe(t, e) : void 0;
1760
+ }
1761
+ }
1762
+ function Pe(t, e) {
1763
+ (null == e || e > t.length) && (e = t.length);
1764
+ for (var r = 0, n = Array(e); r < e; r++) n[r] = t[r];
1765
+ return n;
1766
+ }
1767
+ // ./src/moving-averages/bollingerBands.js
1768
+ function _e(t) {
1769
+ return _e = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
1686
1770
  return typeof t;
1687
1771
  } : function(t) {
1688
1772
  return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
1689
- }, me(t);
1773
+ }, _e(t);
1690
1774
  }
1691
- function de(t, e) {
1775
+ function Ne(t, e) {
1692
1776
  var r = Object.keys(t);
1693
1777
  if (Object.getOwnPropertySymbols) {
1694
1778
  var n = Object.getOwnPropertySymbols(t);
@@ -1698,19 +1782,19 @@ var OHLCV_INDICATORS;
1698
1782
  }
1699
1783
  return r;
1700
1784
  }
1701
- function be(t, e, r) {
1785
+ function Ae(t, e, r) {
1702
1786
  return (e = function(t) {
1703
1787
  var e = function(t, e) {
1704
- if ("object" != me(t) || !t) return t;
1788
+ if ("object" != _e(t) || !t) return t;
1705
1789
  var r = t[Symbol.toPrimitive];
1706
1790
  if (void 0 !== r) {
1707
1791
  var n = r.call(t, e || "default");
1708
- if ("object" != me(n)) return n;
1792
+ if ("object" != _e(n)) return n;
1709
1793
  throw new TypeError("@@toPrimitive must return a primitive value.");
1710
1794
  }
1711
1795
  return ("string" === e ? String : Number)(t);
1712
1796
  }(t, "string");
1713
- return "symbol" == me(e) ? e : e + "";
1797
+ return "symbol" == _e(e) ? e : e + "";
1714
1798
  }(e)) in t ? Object.defineProperty(t, e, {
1715
1799
  value: r,
1716
1800
  enumerable: !0,
@@ -1718,14 +1802,14 @@ var OHLCV_INDICATORS;
1718
1802
  writable: !0
1719
1803
  }) : t[e] = r, t;
1720
1804
  }
1721
- function ge(t, e) {
1805
+ function Te(t, e) {
1722
1806
  var r = "undefined" != typeof Symbol && t[Symbol.iterator] || t["@@iterator"];
1723
1807
  if (!r) {
1724
1808
  if (Array.isArray(t) || (r = function(t, e) {
1725
1809
  if (t) {
1726
- if ("string" == typeof t) return we(t, e);
1810
+ if ("string" == typeof t) return Ee(t, e);
1727
1811
  var r = {}.toString.call(t).slice(8, -1);
1728
- return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? we(t, e) : void 0;
1812
+ return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Ee(t, e) : void 0;
1729
1813
  }
1730
1814
  }(t)) || e && t && "number" == typeof t.length) {
1731
1815
  r && (t = r);
@@ -1769,42 +1853,32 @@ var OHLCV_INDICATORS;
1769
1853
  }
1770
1854
  };
1771
1855
  }
1772
- function we(t, e) {
1856
+ function Ee(t, e) {
1773
1857
  (null == e || e > t.length) && (e = t.length);
1774
1858
  for (var r = 0, n = Array(e); r < e; r++) n[r] = t[r];
1775
1859
  return n;
1776
1860
  }
1777
- // ./src/moving-averages/bollingerBands.js
1778
- function Oe(t) {
1779
- return Oe = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
1861
+ // ./src/oscillators/volumeOscillator.js
1862
+ function xe(t) {
1863
+ return xe = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
1780
1864
  return typeof t;
1781
1865
  } : function(t) {
1782
1866
  return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
1783
- }, Oe(t);
1784
- }
1785
- function Se(t, e) {
1786
- var r = Object.keys(t);
1787
- if (Object.getOwnPropertySymbols) {
1788
- var n = Object.getOwnPropertySymbols(t);
1789
- e && (n = n.filter((function(e) {
1790
- return Object.getOwnPropertyDescriptor(t, e).enumerable;
1791
- }))), r.push.apply(r, n);
1792
- }
1793
- return r;
1867
+ }, xe(t);
1794
1868
  }
1795
- function je(t, e, r) {
1869
+ function ke(t, e, r) {
1796
1870
  return (e = function(t) {
1797
1871
  var e = function(t, e) {
1798
- if ("object" != Oe(t) || !t) return t;
1872
+ if ("object" != xe(t) || !t) return t;
1799
1873
  var r = t[Symbol.toPrimitive];
1800
1874
  if (void 0 !== r) {
1801
1875
  var n = r.call(t, e || "default");
1802
- if ("object" != Oe(n)) return n;
1876
+ if ("object" != xe(n)) return n;
1803
1877
  throw new TypeError("@@toPrimitive must return a primitive value.");
1804
1878
  }
1805
1879
  return ("string" === e ? String : Number)(t);
1806
1880
  }(t, "string");
1807
- return "symbol" == Oe(e) ? e : e + "";
1881
+ return "symbol" == xe(e) ? e : e + "";
1808
1882
  }(e)) in t ? Object.defineProperty(t, e, {
1809
1883
  value: r,
1810
1884
  enumerable: !0,
@@ -1812,107 +1886,15 @@ var OHLCV_INDICATORS;
1812
1886
  writable: !0
1813
1887
  }) : t[e] = r, t;
1814
1888
  }
1815
- function Pe(t, e) {
1816
- var r = "undefined" != typeof Symbol && t[Symbol.iterator] || t["@@iterator"];
1817
- if (!r) {
1818
- if (Array.isArray(t) || (r = function(t, e) {
1819
- if (t) {
1820
- if ("string" == typeof t) return _e(t, e);
1821
- var r = {}.toString.call(t).slice(8, -1);
1822
- return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? _e(t, e) : void 0;
1823
- }
1824
- }(t)) || e && t && "number" == typeof t.length) {
1825
- r && (t = r);
1826
- var n = 0, o = function() {};
1827
- return {
1828
- s: o,
1829
- n: function() {
1830
- return n >= t.length ? {
1831
- done: !0
1832
- } : {
1833
- done: !1,
1834
- value: t[n++]
1835
- };
1836
- },
1837
- e: function(t) {
1838
- throw t;
1839
- },
1840
- f: o
1841
- };
1842
- }
1843
- throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1844
- }
1845
- var i, a = !0, u = !1;
1846
- return {
1847
- s: function() {
1848
- r = r.call(t);
1849
- },
1850
- n: function() {
1851
- var t = r.next();
1852
- return a = t.done, t;
1853
- },
1854
- e: function(t) {
1855
- u = !0, i = t;
1856
- },
1857
- f: function() {
1858
- try {
1859
- a || null == r.return || r.return();
1860
- } finally {
1861
- if (u) throw i;
1862
- }
1863
- }
1864
- };
1865
- }
1866
- function _e(t, e) {
1867
- (null == e || e > t.length) && (e = t.length);
1868
- for (var r = 0, n = Array(e); r < e; r++) n[r] = t[r];
1869
- return n;
1870
- }
1871
- // ./src/utilities/numberUtilities.js
1872
- function Ne(t) {
1873
- return Ne = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
1874
- return typeof t;
1875
- } : function(t) {
1876
- return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
1877
- }, Ne(t);
1878
- }
1879
- // Helper to clean non-numeric characters (except "-" at the start and decimal point)
1880
- var Te = {
1881
- number: function(t) {
1882
- return t;
1883
- },
1884
- numberCleanString: function(t) {
1885
- return Number(t);
1886
- },
1887
- numberDirtyString: function(t) {
1888
- return Number(t.replace(/(?!^-)[^0-9.]/g, ""));
1889
- }
1890
- }, Ae = function(t) {
1891
- var e = arguments.length > 1 && void 0 !== arguments[1] && arguments[1];
1892
- // 1) true numbers
1893
- if ("number" == typeof t && !Number.isNaN(t)) return "number";
1894
- // 2) strings
1895
- if ("string" == typeof t) {
1896
- var r = t.trim(), n = /^-?\d+(\.\d+)?$/;
1897
- // a) clean numeric string: only digits and an optional single period
1898
- if (n.test(r)) return "numberCleanString";
1899
- // b) dirty numeric string: contains non-digits (dollar, commas, letters, etc.)
1900
- // but once you strip those out, you're left with a valid number
1901
- var o = r.replace(/[^0-9.]/g, "");
1902
- if (o && n.test(o)) return "numberDirtyString";
1903
- }
1904
- if (e) throw new TypeError("Invalid input: expected a number or numeric string");
1905
- return Ne(t);
1906
- };
1907
1889
  // ./src/utilities/dateUtilities.js
1908
- function Ee(t) {
1909
- return Ee = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
1890
+ function Ie(t) {
1891
+ return Ie = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
1910
1892
  return typeof t;
1911
1893
  } : function(t) {
1912
1894
  return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
1913
- }, Ee(t);
1895
+ }, Ie(t);
1914
1896
  }
1915
- var xe = {
1897
+ var Me = {
1916
1898
  dateObject: function(t) {
1917
1899
  return t;
1918
1900
  },
@@ -1928,14 +1910,14 @@ var OHLCV_INDICATORS;
1928
1910
  dateCompleteDateString: function(t) {
1929
1911
  return new Date(t);
1930
1912
  }
1931
- }, ke = function(t) {
1913
+ }, De = function(t) {
1932
1914
  // Regex for a UTC Time Format where the string ends with "Z".
1933
1915
  var e = [ "Date -> object", "Milliseconds Timestamp -> integer", "Seconds Timestamp -> integer", "UTC Time Format (ISO 8601) -> string", "Including a Timezone Offset (ISO 8601) -> string", "Local Time Format (ISO 8601) -> string", "YYYY/MM/DD or YYYY-MM-DD -> string" ], r = function() {
1934
- throw new Error('Invalid "'.concat(Ee(t), '" date value passed in selectDateFormatter. Supported formats: \n-').concat(e.join("\n- ")));
1916
+ throw new Error('Invalid "'.concat(Ie(t), '" date value passed in selectDateFormatter. Supported formats: \n-').concat(e.join("\n- ")));
1935
1917
  };
1936
1918
  // Regex for a Timezone Offset Format,
1937
1919
  // which includes a plus or minus sign followed by HH:MM at the end.
1938
- if ("object" === Ee(t)) {
1920
+ if ("object" === Ie(t)) {
1939
1921
  if (t instanceof Date && !isNaN(t.valueOf())) return "dateObject";
1940
1922
  r();
1941
1923
  } else {
@@ -1952,7 +1934,7 @@ var OHLCV_INDICATORS;
1952
1934
  }
1953
1935
  };
1954
1936
  // ./src/utilities/assignTypes.js
1955
- function Ie(t, e) {
1937
+ function Re(t, e) {
1956
1938
  return function(t) {
1957
1939
  if (Array.isArray(t)) return t;
1958
1940
  }(t) || function(t, e) {
@@ -1977,24 +1959,24 @@ var OHLCV_INDICATORS;
1977
1959
  }
1978
1960
  }(t, e) || function(t, e) {
1979
1961
  if (t) {
1980
- if ("string" == typeof t) return Me(t, e);
1962
+ if ("string" == typeof t) return Ce(t, e);
1981
1963
  var r = {}.toString.call(t).slice(8, -1);
1982
- return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Me(t, e) : void 0;
1964
+ return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Ce(t, e) : void 0;
1983
1965
  }
1984
1966
  }(t, e) || function() {
1985
1967
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1986
1968
  }();
1987
1969
  }
1988
- function Me(t, e) {
1970
+ function Ce(t, e) {
1989
1971
  (null == e || e > t.length) && (e = t.length);
1990
1972
  for (var r = 0, n = Array(e); r < e; r++) n[r] = t[r];
1991
1973
  return n;
1992
1974
  }
1993
- var De = new Set([ "open", "high", "low", "close" ]), Re = function(t, e) {
1975
+ var Fe = new Set([ "open", "high", "low", "close" ]), Le = function(t, e) {
1994
1976
  return "Array" === t ? new Array(e).fill(null) : "Float64Array" === t ? new Float64Array(e).fill(NaN) : "Int32Array" === t ? new Int32Array(e).fill(NaN) : void 0;
1995
1977
  };
1996
1978
  // ./src/studies/lag.js
1997
- function Ce(t, e) {
1979
+ function Be(t, e) {
1998
1980
  return function(t) {
1999
1981
  if (Array.isArray(t)) return t;
2000
1982
  }(t) || function(t, e) {
@@ -2017,14 +1999,14 @@ var OHLCV_INDICATORS;
2017
1999
  }
2018
2000
  return u;
2019
2001
  }
2020
- }(t, e) || Le(t, e) || function() {
2002
+ }(t, e) || Ve(t, e) || function() {
2021
2003
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2022
2004
  }();
2023
2005
  }
2024
- function Fe(t, e) {
2006
+ function He(t, e) {
2025
2007
  var r = "undefined" != typeof Symbol && t[Symbol.iterator] || t["@@iterator"];
2026
2008
  if (!r) {
2027
- if (Array.isArray(t) || (r = Le(t)) || e && t && "number" == typeof t.length) {
2009
+ if (Array.isArray(t) || (r = Ve(t)) || e && t && "number" == typeof t.length) {
2028
2010
  r && (t = r);
2029
2011
  var n = 0, o = function() {};
2030
2012
  return {
@@ -2066,22 +2048,22 @@ var OHLCV_INDICATORS;
2066
2048
  }
2067
2049
  };
2068
2050
  }
2069
- function Le(t, e) {
2051
+ function Ve(t, e) {
2070
2052
  if (t) {
2071
- if ("string" == typeof t) return Be(t, e);
2053
+ if ("string" == typeof t) return Ue(t, e);
2072
2054
  var r = {}.toString.call(t).slice(8, -1);
2073
- return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Be(t, e) : void 0;
2055
+ return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Ue(t, e) : void 0;
2074
2056
  }
2075
2057
  }
2076
- function Be(t, e) {
2058
+ function Ue(t, e) {
2077
2059
  (null == e || e > t.length) && (e = t.length);
2078
2060
  for (var r = 0, n = Array(e); r < e; r++) n[r] = t[r];
2079
2061
  return n;
2080
2062
  }
2081
- var He = function(t, e) {
2063
+ var $e = function(t, e) {
2082
2064
  var r = t.instances, n = t.verticalOhlcv, o = t.len, i = t.arrayTypes, a = t.priceBased;
2083
2065
  if (0 === e) {
2084
- var u, l = [], c = Fe(t.inputParams);
2066
+ var u, l = [], c = He(t.inputParams);
2085
2067
  try {
2086
2068
  for (c.s(); !(u = c.n()).done; ) {
2087
2069
  var s = u.value;
@@ -2092,11 +2074,11 @@ var OHLCV_INDICATORS;
2092
2074
  } finally {
2093
2075
  c.f();
2094
2076
  }
2095
- for (var f = 0, y = l; f < y.length; f++) {
2096
- var h, p = Ce(y[f], 2), v = p[0], m = p[1], d = Fe(v);
2077
+ for (var f = 0, h = l; f < h.length; f++) {
2078
+ var y, p = Be(h[f], 2), v = p[0], m = p[1], d = He(v);
2097
2079
  try {
2098
- for (d.s(); !(h = d.n()).done; ) {
2099
- var b = h.value;
2080
+ for (d.s(); !(y = d.n()).done; ) {
2081
+ var b = y.value;
2100
2082
  if (a.has(b)) for (var g = 1; g <= m; g++) a.add("".concat(b, "_lag_").concat(g));
2101
2083
  }
2102
2084
  } catch (t) {
@@ -2109,22 +2091,22 @@ var OHLCV_INDICATORS;
2109
2091
  lagParams: l
2110
2092
  };
2111
2093
  }
2112
- var w, O = Fe(r.lag.lagParams);
2094
+ var w, S = He(r.lag.lagParams);
2113
2095
  try {
2114
- for (O.s(); !(w = O.n()).done; ) {
2115
- var S, j = Ce(w.value, 2), P = j[0], _ = j[1], N = Fe(P);
2096
+ for (S.s(); !(w = S.n()).done; ) {
2097
+ var O, j = Be(w.value, 2), P = j[0], _ = j[1], N = He(P);
2116
2098
  try {
2117
- for (N.s(); !(S = N.n()).done; ) {
2118
- var T = S.value, A = n[T];
2099
+ for (N.s(); !(O = N.n()).done; ) {
2100
+ var A = O.value, T = n[A];
2119
2101
  // Initialize lagged arrays only on the first index
2120
2102
  if (0 === e) for (var E = 1; E <= _; E++) {
2121
- var x = "".concat(T, "_lag_").concat(E);
2122
- if (!i.hasOwnProperty(T)) throw new Error('Lag processing invoked by "'.concat(T, '" expected arrayTypes to have a "').concat(T, '" property, but it wasn’t found.'));
2123
- n[x] = Re(i[T], o), i[x] = i[T];
2103
+ var x = "".concat(A, "_lag_").concat(E);
2104
+ if (!i.hasOwnProperty(A)) throw new Error('Lag processing invoked by "'.concat(A, '" expected arrayTypes to have a "').concat(A, '" property, but it wasn’t found.'));
2105
+ n[x] = Le(i[A], o), i[x] = i[A];
2124
2106
  }
2125
2107
  // Populate lagged values
2126
2108
  for (var k = 1; k <= _; k++) {
2127
- var I = "".concat(T, "_lag_").concat(k), M = e - k, D = M <= 0 || void 0 === A[M] ? null : A[M];
2109
+ var I = "".concat(A, "_lag_").concat(k), M = e - k, D = M <= 0 || void 0 === T[M] ? null : T[M];
2128
2110
  t.pushToMain({
2129
2111
  index: e,
2130
2112
  key: I,
@@ -2139,21 +2121,21 @@ var OHLCV_INDICATORS;
2139
2121
  }
2140
2122
  }
2141
2123
  } catch (t) {
2142
- O.e(t);
2124
+ S.e(t);
2143
2125
  } finally {
2144
- O.f();
2126
+ S.f();
2145
2127
  }
2146
2128
  return !0;
2147
2129
  };
2148
2130
  // ./src/studies/findCrosses.js
2149
- function Ve(t, e) {
2131
+ function qe(t, e) {
2150
2132
  var r = "undefined" != typeof Symbol && t[Symbol.iterator] || t["@@iterator"];
2151
2133
  if (!r) {
2152
2134
  if (Array.isArray(t) || (r = function(t, e) {
2153
2135
  if (t) {
2154
- if ("string" == typeof t) return Ue(t, e);
2136
+ if ("string" == typeof t) return ze(t, e);
2155
2137
  var r = {}.toString.call(t).slice(8, -1);
2156
- return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Ue(t, e) : void 0;
2138
+ return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? ze(t, e) : void 0;
2157
2139
  }
2158
2140
  }(t)) || e && t && "number" == typeof t.length) {
2159
2141
  r && (t = r);
@@ -2197,43 +2179,43 @@ var OHLCV_INDICATORS;
2197
2179
  }
2198
2180
  };
2199
2181
  }
2200
- function Ue(t, e) {
2182
+ function ze(t, e) {
2201
2183
  (null == e || e > t.length) && (e = t.length);
2202
2184
  for (var r = 0, n = Array(e); r < e; r++) n[r] = t[r];
2203
2185
  return n;
2204
2186
  }
2205
- function $e(t) {
2206
- return $e = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
2187
+ function Ge(t) {
2188
+ return Ge = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
2207
2189
  return typeof t;
2208
2190
  } : function(t) {
2209
2191
  return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
2210
- }, $e(t);
2192
+ }, Ge(t);
2211
2193
  }
2212
- function qe(t, e) {
2194
+ function Ke(t, e) {
2213
2195
  for (var r = 0; r < e.length; r++) {
2214
2196
  var n = e[r];
2215
2197
  n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0),
2216
- Object.defineProperty(t, ze(n.key), n);
2198
+ Object.defineProperty(t, Ye(n.key), n);
2217
2199
  }
2218
2200
  }
2219
- function ze(t) {
2201
+ function Ye(t) {
2220
2202
  var e = function(t, e) {
2221
- if ("object" != $e(t) || !t) return t;
2203
+ if ("object" != Ge(t) || !t) return t;
2222
2204
  var r = t[Symbol.toPrimitive];
2223
2205
  if (void 0 !== r) {
2224
2206
  var n = r.call(t, e || "default");
2225
- if ("object" != $e(n)) return n;
2207
+ if ("object" != Ge(n)) return n;
2226
2208
  throw new TypeError("@@toPrimitive must return a primitive value.");
2227
2209
  }
2228
2210
  return ("string" === e ? String : Number)(t);
2229
2211
  }(t, "string");
2230
- return "symbol" == $e(e) ? e : e + "";
2212
+ return "symbol" == Ge(e) ? e : e + "";
2231
2213
  }
2232
- var Ge = function(t, e) {
2214
+ var Je = function(t, e) {
2233
2215
  return t > e;
2234
- }, Ye = function(t, e) {
2216
+ }, Ze = function(t, e) {
2235
2217
  return t < e;
2236
- }, Ke = function() {
2218
+ }, Qe = function() {
2237
2219
  return t = function t() {
2238
2220
  !function(t, e) {
2239
2221
  if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
@@ -2257,11 +2239,11 @@ var OHLCV_INDICATORS;
2257
2239
  this.areHighAndLowUndefined || void 0 !== n && void 0 !== i || (this.areHighAndLowUndefined = !0),
2258
2240
  Number.isNaN(r) || Number.isNaN(o) || function(t, e) {
2259
2241
  return t === e;
2260
- }(r, o) ? a = .5 : Ge(r, o) ? a = this.areHighAndLowUndefined ? 1 : [ i, o, this.prevLow, this.prevSlow ].every((function(t) {
2242
+ }(r, o) ? a = .5 : Je(r, o) ? a = this.areHighAndLowUndefined ? 1 : [ i, o, this.prevLow, this.prevSlow ].every((function(t) {
2261
2243
  return !Number.isNaN(t);
2262
- })) && Ye(i, o) && Ge(this.prevLow, this.prevSlow) ? 0 : 1 : Ye(r, o) && (a = this.areHighAndLowUndefined ? 0 : [ n, o, this.prevHigh, this.prevSlow ].every((function(t) {
2244
+ })) && Ze(i, o) && Je(this.prevLow, this.prevSlow) ? 0 : 1 : Ze(r, o) && (a = this.areHighAndLowUndefined ? 0 : [ n, o, this.prevHigh, this.prevSlow ].every((function(t) {
2263
2245
  return !Number.isNaN(t);
2264
- })) && Ge(n, o) && Ye(this.prevHigh, this.prevSlow) ? 1 : 0), .5 === a ? this.interval = 0 : 1 === a ? this.prevState <= .5 ? this.interval = 1 : this.interval++ : 0 === a && (this.prevState >= .5 ? this.interval = -1 : this.interval--),
2246
+ })) && Je(n, o) && Ze(this.prevHigh, this.prevSlow) ? 1 : 0), .5 === a ? this.interval = 0 : 1 === a ? this.prevState <= .5 ? this.interval = 1 : this.interval++ : 0 === a && (this.prevState >= .5 ? this.interval = -1 : this.interval--),
2265
2247
  1 === this.interval && this.crossIndexes.up.push(t), -1 === this.interval && this.crossIndexes.down.push(t),
2266
2248
  //save prev state
2267
2249
  Object.assign(this, {
@@ -2277,21 +2259,21 @@ var OHLCV_INDICATORS;
2277
2259
  value: function() {
2278
2260
  return this.interval;
2279
2261
  }
2280
- } ]) && qe(t.prototype, e), r && qe(t, r), Object.defineProperty(t, "prototype", {
2262
+ } ]) && Ke(t.prototype, e), r && Ke(t, r), Object.defineProperty(t, "prototype", {
2281
2263
  writable: !1
2282
2264
  }), t;
2283
2265
  var t, e, r;
2284
- }(), Je = function(t, e) {
2266
+ }(), We = function(t, e) {
2285
2267
  var r = t.verticalOhlcv, n = t.instances, o = t.len, i = t.arrayTypes, a = t.verticalOhlcvTempCols;
2286
2268
  if (0 === e) {
2287
2269
  var u = t.inputParams;
2288
2270
  n.crossPairsList = u.reduce((function(t, e) {
2289
2271
  var r = e.key, n = e.params;
2290
2272
  if ("crossPairs" === r) {
2291
- var o, i = Ve(n);
2273
+ var o, i = qe(n);
2292
2274
  try {
2293
2275
  for (i.s(); !(o = i.n()).done; ) {
2294
- var a, u = Ve(o.value);
2276
+ var a, u = qe(o.value);
2295
2277
  try {
2296
2278
  for (u.s(); !(a = u.n()).done; ) {
2297
2279
  var l = a.value;
@@ -2312,31 +2294,31 @@ var OHLCV_INDICATORS;
2312
2294
  return t;
2313
2295
  }), []);
2314
2296
  }
2315
- var l, c = Ve(n.crossPairsList);
2297
+ var l, c = qe(n.crossPairsList);
2316
2298
  try {
2317
2299
  for (c.s(); !(l = c.n()).done; ) {
2318
- var s = l.value, f = s.fast, y = s.slow;
2319
- if (null != f && null != y) {
2320
- var h = "".concat(f, "_x_").concat(y);
2300
+ var s = l.value, f = s.fast, h = s.slow;
2301
+ if (null != f && null != h) {
2302
+ var y = "".concat(f, "_x_").concat(h);
2321
2303
  if (0 === e) {
2322
- if ("number" == typeof y && (a.add(y.toString()), r[y.toString()] = new Int32Array(o).fill(y)),
2304
+ if ("number" == typeof h && (a.add(h.toString()), r[h.toString()] = new Int32Array(o).fill(h)),
2323
2305
  "price" !== f && !r.hasOwnProperty(f)) throw Error('fast "'.concat(f, ' not found in crossPairs"'));
2324
- if (!r.hasOwnProperty(y)) throw Error('slow "'.concat(y, ' not found in crossPairs"'));
2325
- n[h] = new Ke, r[h] = new Int32Array(o).fill(NaN), i[h] = "Int32Array";
2306
+ if (!r.hasOwnProperty(h)) throw Error('slow "'.concat(h, ' not found in crossPairs"'));
2307
+ n[y] = new Qe, r[y] = new Int32Array(o).fill(NaN), i[y] = "Int32Array";
2326
2308
  }
2327
2309
  var p = void 0, v = void 0, m = void 0, d = void 0, b = void 0;
2328
- "price" === f ? (v = r.close[e], m = r.high[e], d = r.low[e], b = r[y][e], n[h].update(e, {
2310
+ "price" === f ? (v = r.close[e], m = r.high[e], d = r.low[e], b = r[h][e], n[y].update(e, {
2329
2311
  fast: v,
2330
2312
  slow: b,
2331
2313
  high: m,
2332
2314
  low: d
2333
- })) : (p = r[f][e], b = r[y][e], n[h].update(e, {
2315
+ })) : (p = r[f][e], b = r[h][e], n[y].update(e, {
2334
2316
  fast: p,
2335
2317
  slow: b
2336
2318
  })), t.pushToMain({
2337
2319
  index: e,
2338
- key: h,
2339
- value: n[h].getResult()
2320
+ key: y,
2321
+ value: n[y].getResult()
2340
2322
  });
2341
2323
  }
2342
2324
  }
@@ -2347,14 +2329,14 @@ var OHLCV_INDICATORS;
2347
2329
  }
2348
2330
  };
2349
2331
  // ./src/studies/dateTime.js
2350
- function Ze(t) {
2351
- return Ze = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
2332
+ function Xe(t) {
2333
+ return Xe = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
2352
2334
  return typeof t;
2353
2335
  } : function(t) {
2354
2336
  return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
2355
- }, Ze(t);
2337
+ }, Xe(t);
2356
2338
  }
2357
- function Qe(t, e) {
2339
+ function tr(t, e) {
2358
2340
  var r = Object.keys(t);
2359
2341
  if (Object.getOwnPropertySymbols) {
2360
2342
  var n = Object.getOwnPropertySymbols(t);
@@ -2364,19 +2346,19 @@ var OHLCV_INDICATORS;
2364
2346
  }
2365
2347
  return r;
2366
2348
  }
2367
- function We(t, e, r) {
2349
+ function er(t, e, r) {
2368
2350
  return (e = function(t) {
2369
2351
  var e = function(t, e) {
2370
- if ("object" != Ze(t) || !t) return t;
2352
+ if ("object" != Xe(t) || !t) return t;
2371
2353
  var r = t[Symbol.toPrimitive];
2372
2354
  if (void 0 !== r) {
2373
2355
  var n = r.call(t, e || "default");
2374
- if ("object" != Ze(n)) return n;
2356
+ if ("object" != Xe(n)) return n;
2375
2357
  throw new TypeError("@@toPrimitive must return a primitive value.");
2376
2358
  }
2377
2359
  return ("string" === e ? String : Number)(t);
2378
2360
  }(t, "string");
2379
- return "symbol" == Ze(e) ? e : e + "";
2361
+ return "symbol" == Xe(e) ? e : e + "";
2380
2362
  }(e)) in t ? Object.defineProperty(t, e, {
2381
2363
  value: r,
2382
2364
  enumerable: !0,
@@ -2384,7 +2366,7 @@ var OHLCV_INDICATORS;
2384
2366
  writable: !0
2385
2367
  }) : t[e] = r, t;
2386
2368
  }
2387
- var Xe = function(t) {
2369
+ var rr = function(t) {
2388
2370
  var e = t.getMonth(), r = t.getFullYear(), n = t.getHours(), o = t.getMinutes(), i = t.getDay(), a = t.getDate(), u = new Date(t.getFullYear(), t.getMonth(), 1).getDay();
2389
2371
  return {
2390
2372
  month: e,
@@ -2397,19 +2379,19 @@ var OHLCV_INDICATORS;
2397
2379
  };
2398
2380
  };
2399
2381
  // ./src/studies/scaler.js
2400
- function tr(t) {
2382
+ function nr(t) {
2401
2383
  return function(t) {
2402
- if (Array.isArray(t)) return or(t);
2384
+ if (Array.isArray(t)) return ur(t);
2403
2385
  }(t) || function(t) {
2404
2386
  if ("undefined" != typeof Symbol && null != t[Symbol.iterator] || null != t["@@iterator"]) return Array.from(t);
2405
- }(t) || nr(t) || function() {
2387
+ }(t) || ar(t) || function() {
2406
2388
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2407
2389
  }();
2408
2390
  }
2409
- function er(t, e) {
2391
+ function or(t, e) {
2410
2392
  var r = "undefined" != typeof Symbol && t[Symbol.iterator] || t["@@iterator"];
2411
2393
  if (!r) {
2412
- if (Array.isArray(t) || (r = nr(t)) || e && t && "number" == typeof t.length) {
2394
+ if (Array.isArray(t) || (r = ar(t)) || e && t && "number" == typeof t.length) {
2413
2395
  r && (t = r);
2414
2396
  var n = 0, o = function() {};
2415
2397
  return {
@@ -2451,7 +2433,7 @@ var OHLCV_INDICATORS;
2451
2433
  }
2452
2434
  };
2453
2435
  }
2454
- function rr(t, e) {
2436
+ function ir(t, e) {
2455
2437
  return function(t) {
2456
2438
  if (Array.isArray(t)) return t;
2457
2439
  }
@@ -2475,36 +2457,36 @@ var OHLCV_INDICATORS;
2475
2457
  }
2476
2458
  return u;
2477
2459
  }
2478
- }(t, e) || nr(t, e) || function() {
2460
+ }(t, e) || ar(t, e) || function() {
2479
2461
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2480
2462
  }();
2481
2463
  }
2482
- function nr(t, e) {
2464
+ function ar(t, e) {
2483
2465
  if (t) {
2484
- if ("string" == typeof t) return or(t, e);
2466
+ if ("string" == typeof t) return ur(t, e);
2485
2467
  var r = {}.toString.call(t).slice(8, -1);
2486
- return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? or(t, e) : void 0;
2468
+ return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? ur(t, e) : void 0;
2487
2469
  }
2488
2470
  }
2489
- function or(t, e) {
2471
+ function ur(t, e) {
2490
2472
  (null == e || e > t.length) && (e = t.length);
2491
2473
  for (var r = 0, n = Array(e); r < e; r++) n[r] = t[r];
2492
2474
  return n;
2493
2475
  }
2494
2476
  // ./src/core-functions/mainLoop.js
2495
- function ir(t) {
2477
+ function lr(t) {
2496
2478
  return function(t) {
2497
- if (Array.isArray(t)) return cr(t);
2479
+ if (Array.isArray(t)) return hr(t);
2498
2480
  }(t) || function(t) {
2499
2481
  if ("undefined" != typeof Symbol && null != t[Symbol.iterator] || null != t["@@iterator"]) return Array.from(t);
2500
- }(t) || lr(t) || function() {
2482
+ }(t) || fr(t) || function() {
2501
2483
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2502
2484
  }();
2503
2485
  }
2504
- function ar(t, e) {
2486
+ function cr(t, e) {
2505
2487
  var r = "undefined" != typeof Symbol && t[Symbol.iterator] || t["@@iterator"];
2506
2488
  if (!r) {
2507
- if (Array.isArray(t) || (r = lr(t)) || e && t && "number" == typeof t.length) {
2489
+ if (Array.isArray(t) || (r = fr(t)) || e && t && "number" == typeof t.length) {
2508
2490
  r && (t = r);
2509
2491
  var n = 0, o = function() {};
2510
2492
  return {
@@ -2546,7 +2528,7 @@ var OHLCV_INDICATORS;
2546
2528
  }
2547
2529
  };
2548
2530
  }
2549
- function ur(t, e) {
2531
+ function sr(t, e) {
2550
2532
  return function(t) {
2551
2533
  if (Array.isArray(t)) return t;
2552
2534
  }
@@ -2571,23 +2553,23 @@ var OHLCV_INDICATORS;
2571
2553
  }
2572
2554
  return u;
2573
2555
  }
2574
- }(t, e) || lr(t, e) || function() {
2556
+ }(t, e) || fr(t, e) || function() {
2575
2557
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2576
2558
  }();
2577
2559
  }
2578
- function lr(t, e) {
2560
+ function fr(t, e) {
2579
2561
  if (t) {
2580
- if ("string" == typeof t) return cr(t, e);
2562
+ if ("string" == typeof t) return hr(t, e);
2581
2563
  var r = {}.toString.call(t).slice(8, -1);
2582
- return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? cr(t, e) : void 0;
2564
+ return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? hr(t, e) : void 0;
2583
2565
  }
2584
2566
  }
2585
- function cr(t, e) {
2567
+ function hr(t, e) {
2586
2568
  (null == e || e > t.length) && (e = t.length);
2587
2569
  for (var r = 0, n = Array(e); r < e; r++) n[r] = t[r];
2588
2570
  return n;
2589
2571
  }
2590
- var sr = {
2572
+ var yr = {
2591
2573
  dateTime: function(t, e, r) {
2592
2574
  var n = r.lag, o = t.instances, i = t.verticalOhlcv;
2593
2575
  if (0 === e) {
@@ -2601,15 +2583,15 @@ var OHLCV_INDICATORS;
2601
2583
  cachedDayInfo: i.date[0]
2602
2584
  }
2603
2585
  });
2604
- for (var c = [ "day_of_the_week", "day_of_the_month", "week_of_the_month", "hour", "month", "year", "session_daily_index", "session_intraday_index" ], s = 0, f = c; s < f.length; s++) {
2586
+ for (var c = [ "day_of_the_week", "day_of_the_month", "week_of_the_month", "minute", "hour", "month", "year", "session_daily_index", "session_intraday_index" ], s = 0, f = c; s < f.length; s++) {
2605
2587
  l[f[s]] = "Int32Array";
2606
2588
  }
2607
2589
  Object.assign(i, function(t) {
2608
2590
  for (var e = 1; e < arguments.length; e++) {
2609
2591
  var r = null != arguments[e] ? arguments[e] : {};
2610
- e % 2 ? Qe(Object(r), !0).forEach((function(e) {
2611
- We(t, e, r[e]);
2612
- })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : Qe(Object(r)).forEach((function(e) {
2592
+ e % 2 ? tr(Object(r), !0).forEach((function(e) {
2593
+ er(t, e, r[e]);
2594
+ })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : tr(Object(r)).forEach((function(e) {
2613
2595
  Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(r, e));
2614
2596
  }));
2615
2597
  }
@@ -2618,8 +2600,8 @@ var OHLCV_INDICATORS;
2618
2600
  return [ t, new Int32Array(a).fill(NaN) ];
2619
2601
  }))))), n > 0 && t.lag(c, n);
2620
2602
  }
2621
- var y = i.date[e], h = Xe(y), p = h.day_of_the_week, v = h.day_of_the_month, m = h.week_of_the_month, d = h.month, b = h.year, g = h.hour, w = y;
2622
- w !== o.dateTime.prevDateStr && (o.dateTime.prevDateStr = w, o.dateTime.sessionDailyIndexCount++,
2603
+ var h = i.date[e], y = rr(h), p = y.day_of_the_week, v = y.day_of_the_month, m = y.week_of_the_month, d = y.month, b = y.year, g = y.hour, w = y.minute, S = h;
2604
+ S !== o.dateTime.prevDateStr && (o.dateTime.prevDateStr = S, o.dateTime.sessionDailyIndexCount++,
2623
2605
  o.dateTime.sessionIntradayIndexCount = 0), t.pushToMain({
2624
2606
  index: e,
2625
2607
  key: "session_daily_index",
@@ -2652,23 +2634,27 @@ var OHLCV_INDICATORS;
2652
2634
  index: e,
2653
2635
  key: "hour",
2654
2636
  value: g
2637
+ }), t.pushToMain({
2638
+ index: e,
2639
+ key: "minute",
2640
+ value: w
2655
2641
  }), o.dateTime.sessionIntradayIndexCount++;
2656
2642
  },
2657
2643
  rsi: function(t, e, r, n) {
2658
2644
  var o = n.target, i = n.lag, a = t.verticalOhlcv, u = t.instances, l = "close" === o ? "" : "_".concat(o), c = "rsi_".concat(r).concat(l), s = "rsi_sma_".concat(r).concat(l);
2659
2645
  // Initialization on the first index.
2660
2646
  if (0 === e) {
2661
- var f = t.crossPairsList, y = t.len, h = t.arrayTypes;
2647
+ var f = t.crossPairsList, h = t.len, y = t.arrayTypes;
2662
2648
  if (!a.hasOwnProperty(o)) throw new Error("Target property ".concat(o, " not found in verticalOhlcv for rsi."));
2663
2649
  f.push({
2664
2650
  fast: c,
2665
2651
  slow: s,
2666
2652
  isDefault: !0
2667
- }), Object.assign(u, le(le({}, c, new ae(r)), s, new ct(r))), Object.assign(a, le(le({}, c, new Float64Array(y).fill(NaN)), s, new Float64Array(y).fill(NaN)));
2653
+ }), Object.assign(u, ce(ce({}, c, new ue(r)), s, new st(r))), Object.assign(a, ce(ce({}, c, new Float64Array(h).fill(NaN)), s, new Float64Array(h).fill(NaN)));
2668
2654
  var p = [ c, s ];
2669
2655
  i > 0 && t.lag(p, i);
2670
2656
  for (var v = 0, m = p; v < m.length; v++) {
2671
- h[m[v]] = "Float64Array";
2657
+ y[m[v]] = "Float64Array";
2672
2658
  }
2673
2659
  }
2674
2660
  var d = a[o][e], b = NaN, g = NaN;
@@ -2699,65 +2685,64 @@ var OHLCV_INDICATORS;
2699
2685
  value: g
2700
2686
  });
2701
2687
  },
2702
- ema: se,
2703
- sma: se,
2688
+ ema: fe,
2689
+ sma: fe,
2704
2690
  macd: function(t, e, r, n, o, i) {
2705
- var a = i.target, u = i.lag, l = t.verticalOhlcv, c = t.instances, s = "".concat(r, "_").concat(n, "_").concat(o).concat(a === ve ? "" : "_".concat(a));
2691
+ var a = i.target, u = i.lag, l = i.precomputed, c = t.verticalOhlcv, s = t.instances, f = l.instanceKey;
2706
2692
  // Initialization on the first index.
2707
2693
  if (0 === e) {
2708
- var f = t.inputParams, y = t.crossPairsList, h = t.priceBased, p = t.len, v = t.arrayTypes;
2709
- if (!l.hasOwnProperty(a)) throw new Error("Target property ".concat(a, " not found in verticalOhlcv for macd."));
2710
- var m, d = 0, b = he(f);
2694
+ var h = t.inputParams, y = t.crossPairsList, p = t.priceBased, v = t.len, m = t.arrayTypes;
2695
+ if (!c.hasOwnProperty(a)) throw new Error("Target property ".concat(a, " not found in verticalOhlcv for macd."));
2696
+ var d, b = 0, g = ve(h);
2711
2697
  try {
2712
- for (b.s(); !(m = b.n()).done; ) {
2713
- "macd" === m.value.key && d++;
2698
+ for (g.s(); !(d = g.n()).done; ) {
2699
+ "macd" === d.value.key && b++;
2714
2700
  }
2715
2701
  // Choose a display prefix based on the number of indicators.
2716
2702
  } catch (t) {
2717
- b.e(t);
2703
+ g.e(t);
2718
2704
  } finally {
2719
- b.f();
2705
+ g.f();
2720
2706
  }
2721
- var g = d > 1 ? "macd_".concat(r, "_").concat(n, "_").concat(o) : "macd", w = a === ve ? "".concat(g, "_diff") : "".concat(g, "_diff_").concat(a), O = a === ve ? "".concat(g, "_dea") : "".concat(g, "_dea_").concat(a), S = a === ve ? "".concat(g, "_histogram") : "".concat(g, "_histogram_").concat(a);
2707
+ var w = b > 1 ? "macd_".concat(r, "_").concat(n, "_").concat(o) : "macd", S = a === de ? "".concat(w, "_diff") : "".concat(w, "_diff_").concat(a), O = a === de ? "".concat(w, "_dea") : "".concat(w, "_dea_").concat(a), j = a === de ? "".concat(w, "_histogram") : "".concat(w, "_histogram_").concat(a);
2722
2708
  // Build the keys.
2723
2709
  y.push({
2724
- fast: w,
2710
+ fast: S,
2725
2711
  slow: O,
2726
2712
  isDefault: !0
2727
- }), c.hasOwnProperty("macd") || (c.macd = {
2728
- numberOfIndicators: d,
2713
+ }), s.hasOwnProperty("macd") || (s.macd = {
2714
+ numberOfIndicators: b,
2729
2715
  settings: {}
2730
- }), c.macd.settings[s] = new Kt(new Vt(r), new Vt(n), new Vt(o)), Object.assign(l, ye(ye(ye({}, w, new Float64Array(p).fill(NaN)), O, new Float64Array(p).fill(NaN)), S, new Float64Array(p).fill(NaN))),
2731
- [ w, O, S ].forEach((function(t) {
2732
- h.add(t);
2716
+ }), s.macd.settings[f] = new Jt(new Ut(r), new Ut(n), new Ut(o)), Object.assign(c, pe(pe(pe({}, S, new Float64Array(v).fill(NaN)), O, new Float64Array(v).fill(NaN)), j, new Float64Array(v).fill(NaN)))[j].forEach((function(t) {
2717
+ p.add(t);
2733
2718
  }));
2734
- var j = [ w, O, S ];
2735
- u > 0 && t.lag(j, u);
2736
- for (var P = 0, _ = j; P < _.length; P++) {
2737
- v[_[P]] = "Float64Array";
2719
+ var P = [ S, O, j ];
2720
+ u > 0 && t.lag(P, u);
2721
+ for (var _ = 0, N = P; _ < N.length; _++) {
2722
+ m[N[_]] = "Float64Array";
2738
2723
  }
2739
2724
  }
2740
- var N = c.macd, T = N.numberOfIndicators, A = N.settings, E = T > 1 ? "macd_".concat(r, "_").concat(n, "_").concat(o) : "macd", x = a === ve ? "".concat(E, "_diff") : "".concat(E, "_diff_").concat(a), k = a === ve ? "".concat(E, "_dea") : "".concat(E, "_dea_").concat(a), I = a === ve ? "".concat(E, "_histogram") : "".concat(E, "_histogram_").concat(a), M = A[s], D = l[a][e];
2741
- M.update(D);
2742
- var R = {};
2725
+ var A = s.macd, T = A.numberOfIndicators, E = A.settings, x = T > 1 ? "macd_".concat(r, "_").concat(n, "_").concat(o) : "macd", k = a === de ? "".concat(x, "_diff") : "".concat(x, "_diff_").concat(a), I = a === de ? "".concat(x, "_dea") : "".concat(x, "_dea_").concat(a), M = a === de ? "".concat(x, "_histogram") : "".concat(x, "_histogram_").concat(a), D = E[f], R = c[a][e];
2726
+ D.update(R);
2727
+ var C = {};
2743
2728
  try {
2744
- R = M.getResult();
2729
+ C = D.getResult();
2745
2730
  } catch (t) {
2746
2731
  // If the result is unavailable, macdResult remains NaN.
2747
2732
  }
2748
2733
  // Always push values; use NaN as fallback when macdResult is missing.
2749
2734
  return t.pushToMain({
2750
2735
  index: e,
2751
- key: x,
2752
- value: R ? R.macd : NaN
2753
- }), t.pushToMain({
2754
- index: e,
2755
2736
  key: k,
2756
- value: R ? R.signal : NaN
2737
+ value: C ? C.macd : NaN
2757
2738
  }), t.pushToMain({
2758
2739
  index: e,
2759
2740
  key: I,
2760
- value: R ? R.histogram : NaN
2741
+ value: C ? C.signal : NaN
2742
+ }), t.pushToMain({
2743
+ index: e,
2744
+ key: M,
2745
+ value: C ? C.histogram : NaN
2761
2746
  }), !0;
2762
2747
  },
2763
2748
  relativeVolume: function(t, e, r, n) {
@@ -2765,131 +2750,142 @@ var OHLCV_INDICATORS;
2765
2750
  if (0 === e) {
2766
2751
  var l = t.len, c = t.arrayTypes;
2767
2752
  a[i] = {
2768
- instance: new ct(r),
2753
+ instance: new st(r),
2769
2754
  prevRelativeVolumeSma: NaN
2770
2755
  }, u[i] = new Float64Array(l).fill(NaN), o > 0 && t.lag([ i ], o), c[i] = "Float64Array";
2771
2756
  }
2772
2757
  var s = u.volume[e], f = a[i].instance;
2773
2758
  f.update(s);
2774
- var y = NaN;
2759
+ var h = NaN;
2775
2760
  try {
2776
- y = f.getResult();
2761
+ h = f.getResult();
2777
2762
  } catch (t) {}
2778
- var h = a[i].prevRelativeVolumeSma, p = NaN;
2763
+ var y = a[i].prevRelativeVolumeSma, p = NaN;
2779
2764
  // Only calculate relative volume if both current SMA and previous SMA are valid numbers and prevSma is not zero.
2780
- return Number.isNaN(y) || Number.isNaN(h) || (p = s / h), t.pushToMain({
2765
+ return Number.isNaN(h) || Number.isNaN(y) || (p = s / y), t.pushToMain({
2781
2766
  index: e,
2782
2767
  key: i,
2783
2768
  value: p
2784
- }), a[i].prevRelativeVolumeSma = y, !0;
2769
+ }), a[i].prevRelativeVolumeSma = h, !0;
2785
2770
  },
2786
2771
  donchianChannels: function(t, e, r, n, o) {
2787
- var i = o.height, a = o.range, u = o.lag, l = "".concat(r, "_").concat(n), c = t.verticalOhlcv, s = t.instances, f = t.len;
2788
- // Initialization: create output arrays and indicator instance on the first call.
2772
+ var i = t.verticalOhlcv, a = t.instances, u = t.len, l = t.inputParams, c = t.priceBased, s = t.arrayTypes, f = t.lag, h = o.height, y = o.range, p = o.decimals, v = "".concat(r, "_").concat(n);
2773
+ // ---- INIT (only at first bar) ----
2789
2774
  if (0 === e) {
2790
- var y, h = t.inputParams, p = t.priceBased, v = t.arrayTypes, m = 0, d = ge(h);
2775
+ // how many donchianChannels calls in this session?
2776
+ var m = l.filter((function(t) {
2777
+ return "donchianChannels" === t.key;
2778
+ })).length, d = "donchian_channel", b = m > 1 ? "".concat(d, "_").concat(v) : d, g = [ "upper", "basis", "lower" ].map((function(t) {
2779
+ return "".concat(b, "_").concat(t);
2780
+ }));
2781
+ h && g.push("".concat(b, "_height"));
2782
+ var w, S = function(t, e) {
2783
+ var r = "undefined" != typeof Symbol && t[Symbol.iterator] || t["@@iterator"];
2784
+ if (!r) {
2785
+ if (Array.isArray(t) || (r = je(t)) || e && t && "number" == typeof t.length) {
2786
+ r && (t = r);
2787
+ var n = 0, o = function() {};
2788
+ return {
2789
+ s: o,
2790
+ n: function() {
2791
+ return n >= t.length ? {
2792
+ done: !0
2793
+ } : {
2794
+ done: !1,
2795
+ value: t[n++]
2796
+ };
2797
+ },
2798
+ e: function(t) {
2799
+ throw t;
2800
+ },
2801
+ f: o
2802
+ };
2803
+ }
2804
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2805
+ }
2806
+ var i, a = !0, u = !1;
2807
+ return {
2808
+ s: function() {
2809
+ r = r.call(t);
2810
+ },
2811
+ n: function() {
2812
+ var t = r.next();
2813
+ return a = t.done, t;
2814
+ },
2815
+ e: function(t) {
2816
+ u = !0, i = t;
2817
+ },
2818
+ f: function() {
2819
+ try {
2820
+ a || null == r.return || r.return();
2821
+ } finally {
2822
+ if (u) throw i;
2823
+ }
2824
+ }
2825
+ };
2826
+ }(y);
2791
2827
  try {
2792
- for (d.s(); !(y = d.n()).done; ) {
2793
- "donchianChannels" === y.value.key && m++;
2828
+ for (S.s(); !(w = S.n()).done; ) {
2829
+ var O = w.value;
2830
+ if (!(O in i) || !c.has(O)) throw new Error('Invalid range key "'.concat(O, '". Only price-based keys are allowed: ').concat(Oe(c)));
2831
+ g.push("".concat(b, "_range_").concat(O));
2794
2832
  }
2795
- } catch (t) {
2796
- d.e(t);
2833
+ // bootstrap instance
2834
+ } catch (t) {
2835
+ S.e(t);
2797
2836
  } finally {
2798
- d.f();
2837
+ S.f();
2799
2838
  }
2800
- var b = m > 1 ? "donchian_channel_".concat(l) : "donchian_channel", g = [ "".concat(b, "_upper"), "".concat(b, "_basis"), "".concat(b, "_lower") ];
2801
- i && g.push("".concat(b, "_height")), s.hasOwnProperty("donchian_channel") || (s.donchian_channel = {
2839
+ a.donchian_channel || (a.donchian_channel = {
2802
2840
  numberOfIndicators: m,
2803
2841
  settings: {}
2804
- });
2805
- // Set up additional arrays for each range property.
2806
- var w, O = ge(a);
2807
- try {
2808
- for (O.s(); !(w = O.n()).done; ) {
2809
- var S = w.value;
2810
- if (!(S in c) || !p.has(S)) throw new Error('Invalid range item value "'.concat(S, '" property for donchianChannels. Only price based key names are accepted:\n').concat(JSON.stringify(p)));
2811
- g.push("".concat(b, "_range_").concat(S));
2812
- }
2813
- } catch (t) {
2814
- O.e(t);
2815
- } finally {
2816
- O.f();
2817
- }
2818
- var j = Object.fromEntries(g.map((function(t) {
2819
- return [ t, new Float64Array(f).fill(NaN) ];
2820
- })));
2821
- Object.assign(c, function(t) {
2822
- for (var e = 1; e < arguments.length; e++) {
2823
- var r = null != arguments[e] ? arguments[e] : {};
2824
- e % 2 ? de(Object(r), !0).forEach((function(e) {
2825
- be(t, e, r[e]);
2826
- })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : de(Object(r)).forEach((function(e) {
2827
- Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(r, e));
2828
- }));
2829
- }
2830
- return t;
2831
- }({}, j)), u > 0 && t.lag(g, u), [ "".concat(b, "_upper"), "".concat(b, "_basis"), "".concat(b, "_lower") ].forEach((function(t) {
2832
- p.add(t);
2833
- })), s.donchian_channel.settings[l] = {
2842
+ }), a.donchian_channel.numberOfIndicators = m, a.donchian_channel.settings[v] = {
2834
2843
  maxDeque: [],
2835
- // will hold indices for highs in descending order
2836
2844
  minDeque: []
2837
- };
2838
- for (var P = 0, _ = g; P < _.length; P++) {
2839
- v[_[P]] = "Float64Array";
2840
- }
2845
+ },
2846
+ // allocate & fill NaNs
2847
+ Object.assign(i, Object.fromEntries(g.map((function(t) {
2848
+ return [ t, new Float64Array(u).fill(NaN) ];
2849
+ })))),
2850
+ // apply lag if requested
2851
+ f > 0 && t.lag(g, f),
2852
+ // mark price-based outputs
2853
+ [ "upper", "basis", "lower" ].forEach((function(t) {
2854
+ return c.add("".concat(b, "_").concat(t));
2855
+ })), g.forEach((function(t) {
2856
+ return s[t] = "Float64Array";
2857
+ }));
2841
2858
  }
2842
- var N = s.donchian_channel.numberOfIndicators > 1 ? "donchian_channel_".concat(l) : "donchian_channel", T = s.donchian_channel.settings[l], A = T.maxDeque, E = T.minDeque, x = e - n, k = x + 1, I = k - r;
2843
- // window: [startIdx, endIdx)
2844
- // If the window is not fully available, push NaN values for all computed outputs.
2845
- if (I < 0 || k > f) {
2846
- t.pushToMain({
2847
- index: e,
2848
- key: "".concat(N, "_upper"),
2849
- value: NaN
2850
- }), t.pushToMain({
2851
- index: e,
2852
- key: "".concat(N, "_basis"),
2853
- value: NaN
2854
- }), t.pushToMain({
2855
- index: e,
2856
- key: "".concat(N, "_lower"),
2857
- value: NaN
2858
- }), i && t.pushToMain({
2859
+ // ---- PER-BAR COMPUTATION ----
2860
+ var j = a.donchian_channel, P = j.numberOfIndicators, _ = j.settings, N = P > 1 ? "donchian_channel_".concat(v) : "donchian_channel", A = _[v], T = A.maxDeque, E = A.minDeque, x = e - n, k = x - r + 1, I = [ "upper", "basis", "lower" ].map((function(t) {
2861
+ return "".concat(N, "_").concat(t);
2862
+ }));
2863
+ h && I.push("".concat(N, "_height"));
2864
+ var M = y.map((function(t) {
2865
+ return "".concat(N, "_range_").concat(t);
2866
+ }));
2867
+ // not enough data → push NaNs
2868
+ if (k < 0 || x + 1 > u) return [].concat(Oe(I), Oe(M)).forEach((function(r) {
2869
+ return t.pushToMain({
2859
2870
  index: e,
2860
- key: "".concat(N, "_height"),
2871
+ key: r,
2861
2872
  value: NaN
2862
2873
  });
2863
- var M, D = ge(a);
2864
- try {
2865
- for (D.s(); !(M = D.n()).done; ) {
2866
- var R = M.value;
2867
- t.pushToMain({
2868
- index: e,
2869
- key: "".concat(N, "_range_").concat(R),
2870
- value: NaN
2871
- });
2872
- }
2873
- } catch (t) {
2874
- D.e(t);
2875
- } finally {
2876
- D.f();
2877
- }
2878
- return !0;
2879
- }
2880
- // **Update the maximum deque:**
2881
- for (var C = c.high, F = c.low; A.length && A[0] < I; ) A.shift();
2882
- for (;A.length && C[A[A.length - 1]] <= C[x]; ) A.pop();
2883
- // **Update the minimum deque:**
2884
- for (A.push(x); E.length && E[0] < I; ) E.shift();
2885
- for (;E.length && F[E[E.length - 1]] >= F[x]; ) E.pop();
2886
- E.push(x);
2887
- // Retrieve computed values with safety checks.
2888
- var L = A.length ? C[A[0]] : NaN, B = E.length ? F[E[0]] : NaN, H = Number.isNaN(L) || Number.isNaN(B) ? NaN : (L + B) / 2;
2889
- // Process height if enabled.
2890
- if (
2891
- // Always push the main indicator values.
2892
- t.pushToMain({
2874
+ })), !0;
2875
+ var D = i.high, R = i.low, C = function(t, e, r) {
2876
+ for (;t.length && t[0] < k; ) t.shift();
2877
+ for (;t.length && r(e[t.at(-1)], e[x]); ) t.pop();
2878
+ t.push(x);
2879
+ };
2880
+ // tiny helper to keep deques up-to-date
2881
+ C(T, D, (function(t, e) {
2882
+ return t <= e;
2883
+ })), C(E, R, (function(t, e) {
2884
+ return t >= e;
2885
+ }));
2886
+ // single “bounds exist?” flag instead of repeated isNaN
2887
+ var F = T.length && E.length, L = F ? D[T[0]] : NaN, B = F ? R[E[0]] : NaN, H = F ? (L + B) / 2 : NaN;
2888
+ if (t.pushToMain({
2893
2889
  index: e,
2894
2890
  key: "".concat(N, "_upper"),
2895
2891
  value: L
@@ -2901,164 +2897,156 @@ var OHLCV_INDICATORS;
2901
2897
  index: e,
2902
2898
  key: "".concat(N, "_lower"),
2903
2899
  value: B
2904
- }), i) {
2905
- var V = NaN;
2906
- Number.isNaN(L) || Number.isNaN(B) || (V = (L - B) / B), t.pushToMain({
2900
+ }), h) {
2901
+ // avoid divide-by-zero
2902
+ var V = F && B ? (L - B) / B : NaN;
2903
+ t.pushToMain({
2907
2904
  index: e,
2908
2905
  key: "".concat(N, "_height"),
2909
- value: V
2906
+ value: null === p ? V : Se(V, p)
2910
2907
  });
2911
2908
  }
2912
- // Process each range property.
2913
- var U, $ = ge(a);
2914
- try {
2915
- for ($.s(); !(U = $.n()).done; ) {
2916
- var q = U.value, z = NaN, G = c[q][e];
2917
- Number.isNaN(G) || Number.isNaN(L) || Number.isNaN(B) || (z = (G - B) / (L - B)),
2918
- t.pushToMain({
2919
- index: e,
2920
- key: "".concat(N, "_range_").concat(q),
2921
- value: z
2922
- });
2923
- }
2924
- } catch (t) {
2925
- $.e(t);
2926
- } finally {
2927
- $.f();
2909
+ // precompute spread once
2910
+ // for each extra range key, use price===price to skip NaNs
2911
+ for (var U = F ? L - B : NaN, $ = 0; $ < y.length; $++) {
2912
+ var q = i[y[$]][e], z = F && q == q && U ? (q - B) / U : NaN;
2913
+ t.pushToMain({
2914
+ index: e,
2915
+ key: M[$],
2916
+ value: null === p ? z : Se(z, p)
2917
+ });
2928
2918
  }
2929
2919
  return !0;
2930
2920
  },
2931
2921
  bollingerBands: function(t, e, r, n, o) {
2932
- var i, a, u, l, c, s, f, y = o.height, h = o.range, p = void 0 === h ? [] : h, v = o.target, m = o.lag, d = t.verticalOhlcv, b = t.instances, g = "close" === v ? "" : "_".concat(v), w = "".concat(r, "_").concat(n).concat(g);
2922
+ var i, a, u, l, c, s, f, h = o.height, y = o.range, p = void 0 === y ? [] : y, v = o.target, m = o.lag, d = o.decimals, b = t.verticalOhlcv, g = t.instances, w = "close" === v ? "" : "_".concat(v), S = "".concat(r, "_").concat(n).concat(w);
2933
2923
  // Initialization on the first call.
2934
2924
  if (0 === e) {
2935
- var O = t.priceBased, S = t.inputParams, j = t.verticalOhlcv, P = t.len, _ = t.arrayTypes;
2936
- if (!(v in j)) throw new Error('bollingerBands could not find target "'.concat(v, '"'));
2937
- var N, T = 0, A = Pe(S);
2925
+ var O = t.priceBased, j = t.inputParams, P = t.verticalOhlcv, _ = t.len, N = t.arrayTypes;
2926
+ if (!(v in P)) throw new Error('bollingerBands could not find target "'.concat(v, '"'));
2927
+ var A, T = 0, E = Te(j);
2938
2928
  try {
2939
- for (A.s(); !(N = A.n()).done; ) {
2940
- "bollingerBands" === N.value.key && T++;
2929
+ for (E.s(); !(A = E.n()).done; ) {
2930
+ "bollingerBands" === A.value.key && T++;
2941
2931
  }
2942
2932
  } catch (t) {
2943
- A.e(t);
2933
+ E.e(t);
2944
2934
  } finally {
2945
- A.f();
2935
+ E.f();
2946
2936
  }
2947
- f = T > 1 ? "bollinger_bands_".concat(w) : "bollinger_bands".concat(g),
2937
+ f = T > 1 ? "bollinger_bands_".concat(S) : "bollinger_bands".concat(w),
2948
2938
  // Only create the container if it doesn't already exist.
2949
- b.bollinger_bands || (b.bollinger_bands = {
2939
+ g.bollinger_bands || (g.bollinger_bands = {
2950
2940
  numberOfIndicators: T,
2951
2941
  settings: {}
2952
2942
  }),
2953
2943
  // Add (or override) the indicator instance keyed by indicatorKey.
2954
- b.bollinger_bands.settings[w] = new Et(r, n);
2955
- var E = [ "".concat(f, "_upper"), "".concat(f, "_middle"), "".concat(f, "_lower") ];
2956
- y && E.push("".concat(f, "_height"));
2944
+ g.bollinger_bands.settings[S] = new xt(r, n);
2945
+ var x = [ "".concat(f, "_upper"), "".concat(f, "_middle"), "".concat(f, "_lower") ];
2946
+ h && x.push("".concat(f, "_height"));
2957
2947
  // Set up additional arrays for each range property.
2958
- var x, k = Pe(p);
2948
+ var k, I = Te(p);
2959
2949
  try {
2960
- for (k.s(); !(x = k.n()).done; ) {
2961
- var I = x.value;
2962
- if (!(I in j) || !O.has(I)) throw new Error('Invalid range item value "'.concat(I, '" property for bollingerBands. Only price based key names are accepted:\n').concat(JSON.stringify(O)));
2963
- E.push("".concat(f, "_range_").concat(I));
2950
+ for (I.s(); !(k = I.n()).done; ) {
2951
+ var M = k.value;
2952
+ if (!(M in P) || !O.has(M)) throw new Error('Invalid range item value "'.concat(M, '" property for bollingerBands. Only price based key names are accepted:\n').concat(JSON.stringify(O)));
2953
+ x.push("".concat(f, "_range_").concat(M));
2964
2954
  }
2965
2955
  } catch (t) {
2966
- k.e(t);
2956
+ I.e(t);
2967
2957
  } finally {
2968
- k.f();
2958
+ I.f();
2969
2959
  }
2970
- var M = Object.fromEntries(E.map((function(t) {
2971
- return [ t, new Float64Array(P).fill(NaN) ];
2960
+ var D = Object.fromEntries(x.map((function(t) {
2961
+ return [ t, new Float64Array(_).fill(NaN) ];
2972
2962
  })));
2973
- Object.assign(j, function(t) {
2963
+ Object.assign(P, function(t) {
2974
2964
  for (var e = 1; e < arguments.length; e++) {
2975
2965
  var r = null != arguments[e] ? arguments[e] : {};
2976
- e % 2 ? Se(Object(r), !0).forEach((function(e) {
2977
- je(t, e, r[e]);
2978
- })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : Se(Object(r)).forEach((function(e) {
2966
+ e % 2 ? Ne(Object(r), !0).forEach((function(e) {
2967
+ Ae(t, e, r[e]);
2968
+ })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : Ne(Object(r)).forEach((function(e) {
2979
2969
  Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(r, e));
2980
2970
  }));
2981
2971
  }
2982
2972
  return t;
2983
- }({}, M)), m > 0 && t.lag(E, m), [ "".concat(f, "_upper"), "".concat(f, "_middle"), "".concat(f, "_lower") ].forEach((function(t) {
2973
+ }({}, D)), m > 0 && t.lag(x, m), [ "".concat(f, "_upper"), "".concat(f, "_middle"), "".concat(f, "_lower") ].forEach((function(t) {
2984
2974
  O.add(t);
2985
2975
  }));
2986
- for (var D = 0, R = E; D < R.length; D++) {
2987
- _[R[D]] = "Float64Array";
2976
+ for (var R = 0, C = x; R < C.length; R++) {
2977
+ N[C[R]] = "Float64Array";
2988
2978
  }
2989
2979
  }
2990
2980
  // Derive prefix for subsequent calls if not set.
2991
- f || (f = b.bollinger_bands.numberOfIndicators > 1 ? "bollinger_bands_".concat(w) : "bollinger_bands".concat(g));
2992
- var C = f, F = b.bollinger_bands.settings[w], L = d[v][e];
2981
+ f || (f = g.bollinger_bands.numberOfIndicators > 1 ? "bollinger_bands_".concat(S) : "bollinger_bands".concat(w));
2982
+ var F = f, L = g.bollinger_bands.settings[S], B = b[v][e];
2993
2983
  // Update the indicator with the current value.
2994
- F.update(L);
2984
+ L.update(B);
2995
2985
  // Attempt to retrieve the result.
2996
- var B = {};
2986
+ var H = {};
2997
2987
  try {
2998
- B = F.getResult();
2988
+ H = L.getResult();
2999
2989
  } catch (t) {
3000
2990
  // If not available, result stays {}.
3001
2991
  }
3002
2992
  // Use NaN fallbacks for the primary values.
3003
- var H = null !== (i = null === (a = B) || void 0 === a ? void 0 : a.upper) && void 0 !== i ? i : NaN, V = null !== (u = null === (l = B) || void 0 === l ? void 0 : l.middle) && void 0 !== u ? u : NaN, U = null !== (c = null === (s = B) || void 0 === s ? void 0 : s.lower) && void 0 !== c ? c : NaN;
2993
+ var V = null !== (i = null === (a = H) || void 0 === a ? void 0 : a.upper) && void 0 !== i ? i : NaN, U = null !== (u = null === (l = H) || void 0 === l ? void 0 : l.middle) && void 0 !== u ? u : NaN, $ = null !== (c = null === (s = H) || void 0 === s ? void 0 : s.lower) && void 0 !== c ? c : NaN;
3004
2994
  // Process height if requested.
3005
2995
  if (
3006
2996
  // Always push the indicator outputs.
3007
2997
  t.pushToMain({
3008
2998
  index: e,
3009
- key: "".concat(C, "_upper"),
3010
- value: H
3011
- }), t.pushToMain({
3012
- index: e,
3013
- key: "".concat(C, "_middle"),
2999
+ key: "".concat(F, "_upper"),
3014
3000
  value: V
3015
3001
  }), t.pushToMain({
3016
3002
  index: e,
3017
- key: "".concat(C, "_lower"),
3003
+ key: "".concat(F, "_middle"),
3018
3004
  value: U
3019
- }), y) {
3020
- var $ = NaN;
3021
- Number.isNaN(U) || Number.isNaN(H) || ($ = (H - U) / U), t.pushToMain({
3005
+ }), t.pushToMain({
3006
+ index: e,
3007
+ key: "".concat(F, "_lower"),
3008
+ value: $
3009
+ }), h) {
3010
+ var q = NaN;
3011
+ Number.isNaN($) || Number.isNaN(V) || (q = (V - $) / $), t.pushToMain({
3022
3012
  index: e,
3023
- key: "".concat(C, "_height"),
3024
- value: $
3013
+ key: "".concat(F, "_height"),
3014
+ value: null === d ? q : Se(q, d)
3025
3015
  });
3026
3016
  }
3027
3017
  // Process each range property.
3028
- var q, z = Pe(p);
3018
+ var z, G = Te(p);
3029
3019
  try {
3030
- for (z.s(); !(q = z.n()).done; ) {
3031
- var G = q.value, Y = NaN, K = d[G][e];
3032
- Number.isNaN(K) || Number.isNaN(U) || Number.isNaN(H) || (Y = (K - U) / (H - U)),
3020
+ for (G.s(); !(z = G.n()).done; ) {
3021
+ var K = z.value, Y = NaN, J = b[K][e];
3022
+ Number.isNaN(J) || Number.isNaN($) || Number.isNaN(V) || (Y = (J - $) / (V - $)),
3033
3023
  t.pushToMain({
3034
3024
  index: e,
3035
- key: "".concat(C, "_range_").concat(G),
3036
- value: Y
3025
+ key: "".concat(F, "_range_").concat(K),
3026
+ value: null === d ? Y : Se(Y, d)
3037
3027
  });
3038
3028
  }
3039
3029
  } catch (t) {
3040
- z.e(t);
3030
+ G.e(t);
3041
3031
  } finally {
3042
- z.f();
3032
+ G.f();
3043
3033
  }
3044
3034
  return !0;
3045
3035
  },
3046
3036
  volumeOscillator: function(t, e, r, n, o) {
3047
- var i = o.lag, a = t.verticalOhlcv, u = t.instances, l = a.volume[e], c = "volume_oscillator";
3037
+ var i = o.lag, a = t.verticalOhlcv, u = t.instances, l = a.volume[e], c = "volume_oscillator_".concat(r, "_").concat(n);
3048
3038
  if (0 === e) {
3049
- var s = t.crossPairsList, f = t.len, y = t.arrayTypes;
3050
- Object.assign(u, {
3051
- volume_oscillator: {
3052
- fastEMA: new Vt(r),
3053
- slowEMA: new Vt(n)
3054
- }
3055
- }), a[c] = new Float64Array(f).fill(NaN), s.push({
3039
+ var s = t.crossPairsList, f = t.len, h = t.arrayTypes;
3040
+ Object.assign(u, ke({}, c, {
3041
+ fastEMA: new Ut(r),
3042
+ slowEMA: new Ut(n)
3043
+ })), a[c] = new Float64Array(f).fill(NaN), s.push({
3056
3044
  fast: c,
3057
3045
  slow: 0,
3058
3046
  isDefault: !0
3059
- }), i > 0 && t.lag([ c ], i), y[c] = "Float64Array";
3047
+ }), i > 0 && t.lag([ c ], i), h[c] = "Float64Array";
3060
3048
  }
3061
- var h = u[c], p = h.fastEMA, v = h.slowEMA;
3049
+ var y = u[c], p = y.fastEMA, v = y.slowEMA;
3062
3050
  p.update(l), v.update(l);
3063
3051
  var m = NaN, d = NaN;
3064
3052
  try {
@@ -3074,201 +3062,125 @@ var OHLCV_INDICATORS;
3074
3062
  value: b
3075
3063
  }), !0;
3076
3064
  },
3077
- scaler: function(t, e, r, n, o, i, a,
3078
- // used for minmax: [validMin, validMax]
3079
- u) {
3080
- var l = t.verticalOhlcv, c = t.instances, s = t.arrayTypes, f = "".concat(o, "_").concat(r), y = "";
3065
+ scaler: function(t, e, r, n, o) {
3066
+ var i = o.type, a = o.group, u = o.range, l = o.lag, c = o.precomputed, s = o.decimals, f = c.groupKey, h = c.groupKeyLen, y = t.verticalOhlcv, p = t.instances, v = t.arrayTypes, m = "".concat(i, "_").concat(r);
3081
3067
  if (0 === e) {
3082
- var h = t.len, p = t.priceBased;
3083
- t.groups;
3084
- y = "".concat(f, "_group_").concat(n.join("_")), c.scaler = {
3085
- groupKeyLen: n.length,
3086
- groupKey: y,
3068
+ var d = t.len;
3069
+ p.hasOwnProperty("scaler") || (p.scaler = {
3087
3070
  windows: {}
3088
- };
3089
- var v, m = er(n);
3071
+ });
3072
+ var b, g = or(n);
3090
3073
  try {
3091
- var d = function() {
3092
- var e = v.value;
3093
- if (!l.hasOwnProperty(e)) throw new Error('Target property "'.concat(e, '" not found in verticalOhlcv'));
3094
- if (!p.has(e)) throw new Error('Column "'.concat(e, '" is not priceBased and cannot be scaled.'));
3095
- var r = "".concat(f, "_").concat(e);
3096
- l[r] = new Float64Array(h).fill(NaN), s[r] = "Float64Array";
3097
- var n = i ? y : e;
3098
- if (c.scaler.windows[n] = [], i && (t.scaledGroups[y] || (t.scaledGroups[y] = []),
3099
- t.scaledGroups[y].push(r)), u > 0) {
3100
- if (i) {
3101
- var o, a = Array.from({
3102
- length: u
3074
+ var w = function() {
3075
+ var e = b.value;
3076
+ if (!y.hasOwnProperty(e)) throw new Error('Target property "'.concat(e, '" not found in verticalOhlcv'));
3077
+ var r = "".concat(m, "_").concat(e);
3078
+ y[r] = new Float64Array(d).fill(NaN), v[r] = "Float64Array";
3079
+ var n = a ? f : e;
3080
+ if (p.scaler.windows[n] = [], a && (t.scaledGroups[f] || (t.scaledGroups[f] = []),
3081
+ t.scaledGroups[f].push(r)), l > 0) {
3082
+ if (a) {
3083
+ var o, i = Array.from({
3084
+ length: l
3103
3085
  }).map((function(t, e) {
3104
3086
  return "".concat(r, "_lag_").concat(e + 1);
3105
3087
  }));
3106
- (o = t.scaledGroups[y]).push.apply(o, tr(a));
3088
+ (o = t.scaledGroups[f]).push.apply(o, nr(i));
3107
3089
  }
3108
- t.lag([ r ], u);
3090
+ t.lag([ r ], l);
3109
3091
  }
3110
3092
  };
3111
- for (m.s(); !(v = m.n()).done; ) d();
3093
+ for (g.s(); !(b = g.n()).done; ) w();
3112
3094
  } catch (t) {
3113
- m.e(t);
3095
+ g.e(t);
3114
3096
  } finally {
3115
- m.f();
3097
+ g.f();
3116
3098
  }
3117
3099
  }
3118
- var b = c.scaler.windows;
3119
- y = c.scaler.groupKey;
3100
+ var S, O = p.scaler.windows, j = or(n);
3120
3101
  // update windows with current values
3121
- var g, w = er(n);
3122
- try {
3123
- for (w.s(); !(g = w.n()).done; ) {
3124
- var O = g.value, S = l[O][e], j = b[i ? y : O];
3125
- j.push(S), j.length > (i ? r * c.scaler.groupKeyLen : r) && j.shift();
3102
+ try {
3103
+ for (j.s(); !(S = j.n()).done; ) {
3104
+ var P = S.value, _ = y[P][e], N = O[a ? f : P];
3105
+ N.push(_), N.length > (a ? r * h : r) && N.shift();
3126
3106
  }
3127
3107
  } catch (t) {
3128
- w.e(t);
3108
+ j.e(t);
3129
3109
  } finally {
3130
- w.f();
3110
+ j.f();
3131
3111
  }
3132
- var P, _ = e + 1 >= r, N = er(n);
3112
+ var A, T = e + 1 >= r, E = or(n);
3133
3113
  // scale values once enough data
3134
3114
  try {
3135
- var T = function() {
3136
- var r, n, u, c, s, h, p = P.value, v = l[p][e], m = "".concat(f, "_").concat(p), d = null;
3137
- if (_) {
3138
- var g = b[i ? y : p];
3139
- if ("minmax" === o) {
3140
- var w = Math.min.apply(Math, tr(g)), O = Math.max.apply(Math, tr(g));
3141
- r = v, n = w, u = O, c = rr(a, 2), s = c[0], h = c[1], d = (Math.min(Math.max(r, n), u) - n) / (u - n) * (h - s) + s;
3115
+ var x = function() {
3116
+ var r, n, o, l, c, h, p = A.value, v = y[p][e], d = "".concat(m, "_").concat(p), b = null;
3117
+ if (T) {
3118
+ var g = O[a ? f : p];
3119
+ if ("minmax" === i) {
3120
+ var w = Math.min.apply(Math, nr(g)), S = Math.max.apply(Math, nr(g));
3121
+ r = v, n = w, o = S, l = ir(u, 2), c = l[0], h = l[1], b = (Math.min(Math.max(r, n), o) - n) / (o - n) * (h - c) + c;
3142
3122
  } else {
3143
- if ("zscore" !== o) throw new Error('Unknown scaler type "'.concat(o, '"'));
3144
- var S = g.reduce((function(t, e) {
3123
+ if ("zscore" !== i) throw new Error('Unknown scaler type "'.concat(i, '"'));
3124
+ var j = g.reduce((function(t, e) {
3145
3125
  return t + e;
3146
- }), 0) / g.length, j = g.reduce((function(t, e) {
3147
- return t + Math.pow(e - S, 2);
3148
- }), 0) / g.length, N = Math.sqrt(j);
3149
- d = function(t, e, r) {
3126
+ }), 0) / g.length, P = g.reduce((function(t, e) {
3127
+ return t + Math.pow(e - j, 2);
3128
+ }), 0) / g.length, _ = Math.sqrt(P);
3129
+ b = function(t, e, r) {
3150
3130
  return 0 === r ? 0 : (t - e) / r;
3151
- }(v, S, N);
3131
+ }(v, j, _);
3152
3132
  }
3153
3133
  }
3154
3134
  t.pushToMain({
3155
3135
  index: e,
3156
- key: m,
3157
- value: d
3136
+ key: d,
3137
+ value: null === s ? b : Se(b, s)
3158
3138
  });
3159
3139
  };
3160
- for (N.s(); !(P = N.n()).done; ) T();
3161
- } catch (t) {
3162
- N.e(t);
3163
- } finally {
3164
- N.f();
3165
- }
3166
- }
3167
- }, fr = function(t, e) {
3168
- var r = e.len, n = e.inputParams, i = e.priceBased, a = e.precisionMultiplier, u = e.arrayTypes, l = e.verticalOhlcv, c = e.verticalOhlcvKeyNames, s = e.inputTypes;
3169
- !function(t, e) {
3170
- if (!Array.isArray(t)) throw new Error('Property "inputParams" must be an "Array" or "Set".');
3171
- var r, n = o(t);
3172
- try {
3173
- for (n.s(); !(r = n.n()).done; ) {
3174
- var i, a = o(r.value.params);
3175
- try {
3176
- for (a.s(); !(i = a.n()).done; ) {
3177
- var u = i.value;
3178
- if ("number" == typeof u && u > e) throw console.log(u, e), new Error("At least one of the params of the indicator is greater than the input OHLCV length. Make sure to have enough datapoints in the input OHLCV.");
3179
- }
3180
- } catch (t) {
3181
- a.e(t);
3182
- } finally {
3183
- a.f();
3184
- }
3185
- }
3140
+ for (E.s(); !(A = E.n()).done; ) x();
3186
3141
  } catch (t) {
3187
- n.e(t);
3188
- } finally {
3189
- n.f();
3190
- }
3191
- }(n, r);
3192
- for (var f = 0, y = Object.keys(s); f < y.length; f++) {
3193
- var h = y[f];
3194
- l[h] = Re(u[h], r);
3195
- }
3196
- // Process each row in the input
3197
- for (var p = 0; p < r; p++) {
3198
- for (var v = t[p], m = 0, d = Object.entries(s); m < d.length; m++) {
3199
- var b = ur(d[m], 2), g = b[0], w = b[1], O = v[g];
3200
- if (Te.hasOwnProperty(w)) {
3201
- var S = Te[w](O);
3202
- a > 1 && i.has(g) && (S *= a), e.pushToMain({
3203
- index: p,
3204
- key: g,
3205
- value: S
3206
- });
3207
- } else xe.hasOwnProperty(w) ? e.pushToMain({
3208
- index: p,
3209
- key: g,
3210
- value: xe[w](O)
3211
- }) : e.pushToMain({
3212
- index: p,
3213
- key: g,
3214
- value: O
3215
- });
3216
- }
3217
- // Run all indicator functions except for the ones processed later
3218
- var j, P = ar(n);
3219
- try {
3220
- for (P.s(); !(j = P.n()).done; ) {
3221
- var _ = j.value, N = _.key, T = _.params;
3222
- "lag" !== N && "crossPairs" !== N &&
3223
- // resolve fn on-demand, no per-item object allocation here
3224
- sr[N].apply(sr, [ e, p ].concat(ir(T)));
3225
- }
3226
- // Process these indicators separately (ensuring their execution order)
3227
- } catch (t) {
3228
- P.e(t);
3142
+ E.e(t);
3229
3143
  } finally {
3230
- P.f();
3144
+ E.f();
3231
3145
  }
3232
- He(e, p), Je(e, p);
3233
3146
  }
3234
- c.push.apply(c, ir(Object.keys(l)));
3235
- }, yr = function(t, e) {
3236
- for (var r = t.length, n = new ct(e), o = new Array(r), i = 0, a = 0, u = 0, l = 0; l < r; l++) if (n.update(t[l]),
3147
+ }, pr = function(t, e) {
3148
+ for (var r = t.length, n = new st(e), o = new Array(r), i = 0, a = 0, u = 0, l = 0; l < r; l++) if (n.update(t[l]),
3237
3149
  n.isStable) {
3238
3150
  var c = n.getResult();
3239
3151
  o[l] = c, i += c, a += c * c, u++;
3240
3152
  } else o[l] = null;
3241
- var s = i / u, f = a / u - s * s, y = Math.sqrt(f);
3153
+ var s = i / u, f = a / u - s * s, h = Math.sqrt(f);
3242
3154
  return o.map((function(t) {
3243
- return null !== t ? (t - s) / y : null;
3155
+ return null !== t ? (t - s) / h : null;
3244
3156
  }));
3245
- }, hr = function(t, e) {
3157
+ }, vr = function(t, e) {
3246
3158
  var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 5;
3247
3159
  if (t.length !== e.length) throw new Error("Both arrays must have the same length");
3248
- for (var n = yr(t, r), o = yr(e, r), i = t.length, a = [], u = 0, l = 0, c = 0, s = 0, f = 0, y = 0, h = -1, p = 0; p < i; p++) {
3160
+ for (var n = pr(t, r), o = pr(e, r), i = t.length, a = [], u = 0, l = 0, c = 0, s = 0, f = 0, h = 0, y = -1, p = 0; p < i; p++) {
3249
3161
  if (null !== n[p] && null !== o[p]) {
3250
- h = p;
3162
+ y = p;
3251
3163
  break;
3252
3164
  }
3253
3165
  a.push(0);
3254
3166
  }
3255
- if (-1 === h)
3167
+ if (-1 === y)
3256
3168
  // No valid data points
3257
3169
  return new Array(i).fill(0);
3258
- for (var v = h; v < i; v++) {
3170
+ for (var v = y; v < i; v++) {
3259
3171
  var m = n[v], d = o[v];
3260
3172
  if (null !== m && null !== d) if (u += m, l += d, c += m * d, s += m * m, f += d * d,
3261
- ++y < 2) a.push(0); else {
3262
- var b = y * c - u * l, g = Math.sqrt((y * s - u * u) * (y * f - l * l)), w = 0 === g ? 0 : b / g;
3173
+ ++h < 2) a.push(0); else {
3174
+ var b = h * c - u * l, g = Math.sqrt((h * s - u * u) * (h * f - l * l)), w = 0 === g ? 0 : b / g;
3263
3175
  a.push(w);
3264
3176
  } else
3265
3177
  // Reset sums and counts when encountering null values
3266
- u = l = c = s = f = y = 0, a.push(0);
3178
+ u = l = c = s = f = h = 0, a.push(0);
3267
3179
  }
3268
3180
  return a;
3269
3181
  };
3270
3182
  // ./src/utilities/verticalToHorizontal.js
3271
- function pr(t, e) {
3183
+ function mr(t, e) {
3272
3184
  return function(t) {
3273
3185
  if (Array.isArray(t)) return t;
3274
3186
  }(t) || function(t, e) {
@@ -3293,33 +3205,33 @@ var OHLCV_INDICATORS;
3293
3205
  }
3294
3206
  }(t, e) || function(t, e) {
3295
3207
  if (t) {
3296
- if ("string" == typeof t) return vr(t, e);
3208
+ if ("string" == typeof t) return dr(t, e);
3297
3209
  var r = {}.toString.call(t).slice(8, -1);
3298
- return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? vr(t, e) : void 0;
3210
+ return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? dr(t, e) : void 0;
3299
3211
  }
3300
3212
  }(t, e) || function() {
3301
3213
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3302
3214
  }();
3303
3215
  }
3304
- function vr(t, e) {
3216
+ function dr(t, e) {
3305
3217
  (null == e || e > t.length) && (e = t.length);
3306
3218
  for (var r = 0, n = Array(e); r < e; r++) n[r] = t[r];
3307
3219
  return n;
3308
3220
  }
3309
- var mr = function() {
3221
+ var br = function() {
3310
3222
  var t = arguments.length > 0 && void 0 !== arguments[0] && arguments[0], e = arguments.length > 1 ? arguments[1] : void 0, r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 0, n = e.precisionMultiplier, o = e.priceBased, i = e.precision, a = e.verticalOhlcv, u = e.invalidValueIndex, l = e.len, c = e.verticalOhlcvKeyNames, s = e.verticalOhlcvTempCols;
3311
3223
  if (0 === c.length) return [];
3312
- for (var f = t && u >= 0 ? u + 1 : 0, y = Math.max(f, r), h = l - y, p = Array.from({
3313
- length: h
3224
+ for (var f = t && u >= 0 ? u + 1 : 0, h = Math.max(f, r), y = l - h, p = Array.from({
3225
+ length: y
3314
3226
  }, (function() {
3315
3227
  return {};
3316
3228
  })), v = 0, m = Object.entries(a); v < m.length; v++) {
3317
- var d = pr(m[v], 2), b = d[0], g = d[1];
3318
- if (!s.has(b)) for (var w = o.has(b) && i, O = y; O < l; O++) p[O - y][b] = w ? g[O] / n : g[O];
3229
+ var d = mr(m[v], 2), b = d[0], g = d[1];
3230
+ if (!s.has(b)) for (var w = o.has(b) && i, S = h; S < l; S++) p[S - h][b] = w ? g[S] / n : g[S];
3319
3231
  }
3320
3232
  return p;
3321
3233
  };
3322
- function dr(t, e) {
3234
+ function gr(t, e) {
3323
3235
  return function(t) {
3324
3236
  if (Array.isArray(t)) return t;
3325
3237
  }(t) || function(t, e) {
@@ -3342,30 +3254,30 @@ var OHLCV_INDICATORS;
3342
3254
  }
3343
3255
  return u;
3344
3256
  }
3345
- }(t, e) || br(t, e) || function() {
3257
+ }(t, e) || wr(t, e) || function() {
3346
3258
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3347
3259
  }();
3348
3260
  }
3349
- function br(t, e) {
3261
+ function wr(t, e) {
3350
3262
  if (t) {
3351
- if ("string" == typeof t) return gr(t, e);
3263
+ if ("string" == typeof t) return Sr(t, e);
3352
3264
  var r = {}.toString.call(t).slice(8, -1);
3353
- return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? gr(t, e) : void 0;
3265
+ return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Sr(t, e) : void 0;
3354
3266
  }
3355
3267
  }
3356
- function gr(t, e) {
3268
+ function Sr(t, e) {
3357
3269
  (null == e || e > t.length) && (e = t.length);
3358
3270
  for (var r = 0, n = Array(e); r < e; r++) n[r] = t[r];
3359
3271
  return n;
3360
3272
  }
3361
- var wr = function(t, e) {
3273
+ var Or = function(t, e) {
3362
3274
  var r = t.precision, n = t.priceBased;
3363
3275
  if (!1 === r) return 1;
3364
3276
  var o, i = 1, a = // ./src/utilities/precisionMultiplier.js
3365
3277
  function(t, e) {
3366
3278
  var r = "undefined" != typeof Symbol && t[Symbol.iterator] || t["@@iterator"];
3367
3279
  if (!r) {
3368
- if (Array.isArray(t) || (r = br(t)) || e && t && "number" == typeof t.length) {
3280
+ if (Array.isArray(t) || (r = wr(t)) || e && t && "number" == typeof t.length) {
3369
3281
  r && (t = r);
3370
3282
  var n = 0, o = function() {};
3371
3283
  return {
@@ -3407,17 +3319,17 @@ var OHLCV_INDICATORS;
3407
3319
  }
3408
3320
  };
3409
3321
  }(Object.entries(e).filter((function(t) {
3410
- var e = dr(t, 2), r = e[0];
3322
+ var e = gr(t, 2), r = e[0];
3411
3323
  e[1];
3412
3324
  return n.has(r);
3413
3325
  })).map((function(t) {
3414
- var e = dr(t, 2);
3326
+ var e = gr(t, 2);
3415
3327
  e[0];
3416
3328
  return e[1];
3417
3329
  })));
3418
3330
  try {
3419
3331
  for (a.s(); !(o = a.n()).done; ) {
3420
- var u = o.value, l = dr(String(u).split("."), 2)[1], c = void 0 === l ? "" : l, s = Math.max(4, c.length), f = s > 1 ? Math.pow(10, s - 1) : 1;
3332
+ var u = o.value, l = gr(String(u).split("."), 2)[1], c = void 0 === l ? "" : l, s = Math.max(4, c.length), f = s > 1 ? Math.pow(10, s - 1) : 1;
3421
3333
  f > i && (i = f);
3422
3334
  }
3423
3335
  } catch (t) {
@@ -3428,23 +3340,23 @@ var OHLCV_INDICATORS;
3428
3340
  return i;
3429
3341
  };
3430
3342
  // ./index.js
3431
- function Or(t) {
3432
- return Or = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
3343
+ function jr(t) {
3344
+ return jr = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
3433
3345
  return typeof t;
3434
3346
  } : function(t) {
3435
3347
  return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
3436
- }, Or(t);
3348
+ }, jr(t);
3437
3349
  }
3438
- function Sr(t) {
3350
+ function Pr(t) {
3439
3351
  return function(t) {
3440
- if (Array.isArray(t)) return _r(t);
3352
+ if (Array.isArray(t)) return Ar(t);
3441
3353
  }(t) || function(t) {
3442
3354
  if ("undefined" != typeof Symbol && null != t[Symbol.iterator] || null != t["@@iterator"]) return Array.from(t);
3443
- }(t) || Pr(t) || function() {
3355
+ }(t) || Nr(t) || function() {
3444
3356
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3445
3357
  }();
3446
3358
  }
3447
- function jr(t, e) {
3359
+ function _r(t, e) {
3448
3360
  return function(t) {
3449
3361
  if (Array.isArray(t)) return t;
3450
3362
  }(t) || function(t, e) {
@@ -3467,40 +3379,41 @@ var OHLCV_INDICATORS;
3467
3379
  }
3468
3380
  return u;
3469
3381
  }
3470
- }(t, e) || Pr(t, e) || function() {
3382
+ }(t, e) || Nr(t, e) || function() {
3471
3383
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3472
3384
  }();
3473
3385
  }
3474
- function Pr(t, e) {
3386
+ function Nr(t, e) {
3475
3387
  if (t) {
3476
- if ("string" == typeof t) return _r(t, e);
3388
+ if ("string" == typeof t) return Ar(t, e);
3477
3389
  var r = {}.toString.call(t).slice(8, -1);
3478
- return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? _r(t, e) : void 0;
3390
+ return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Ar(t, e) : void 0;
3479
3391
  }
3480
3392
  }
3481
- function _r(t, e) {
3393
+ function Ar(t, e) {
3482
3394
  (null == e || e > t.length) && (e = t.length);
3483
3395
  for (var r = 0, n = Array(e); r < e; r++) n[r] = t[r];
3484
3396
  return n;
3485
3397
  }
3486
- function Nr(t, e) {
3398
+ function Tr(t, e) {
3487
3399
  for (var r = 0; r < e.length; r++) {
3488
3400
  var n = e[r];
3489
3401
  n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0),
3490
- Object.defineProperty(t, Tr(n.key), n);
3402
+ Object.defineProperty(t, Er(n.key), n);
3491
3403
  }
3492
3404
  }
3493
- function Tr(t) {
3405
+ function Er(t) {
3494
3406
  var e = function(t, e) {
3495
- if ("object" != Or(t) || !t) return t;
3407
+ if ("object" != jr(t) || !t) return t;
3496
3408
  var r = t[Symbol.toPrimitive];
3497
3409
  if (void 0 !== r) {
3498
3410
  var n = r.call(t, e || "default");
3499
- if ("object" != Or(n)) return n;
3411
+ if ("object" != jr(n)) return n;
3500
3412
  throw new TypeError("@@toPrimitive must return a primitive value.");
3501
3413
  }
3502
3414
  return ("string" === e ? String : Number)(t);
3503
3415
  }
3416
+ //precomputed
3504
3417
  /**
3505
3418
  * Class OHLCV_INDICATORS
3506
3419
  *
@@ -3509,22 +3422,26 @@ var OHLCV_INDICATORS;
3509
3422
  * to parallel compute various technical indicators in 1 single loop.
3510
3423
  * OHLCV datasets.
3511
3424
  */ (t, "string");
3512
- return "symbol" == Or(e) ? e : e + "";
3425
+ return "symbol" == jr(e) ? e : e + "";
3513
3426
  }
3514
- var Ar = function() {
3427
+ var xr = function() {
3515
3428
  return t = function t(e) {
3516
- var r = this, n = e.input, o = e.ticker, i = void 0 === o ? null : o, a = e.precision, u = void 0 === a || a, c = e.inputParams, f = void 0 === c ? null : c;
3429
+ var r = this, n = e.input, o = e.ticker, i = void 0 === o ? null : o, a = e.precision, l = void 0 === a || a, s = e.inputParams, y = void 0 === s ? null : s, p = e.chunkProcess, v = void 0 === p ? 2e3 : p;
3517
3430
  if (function(t, e) {
3518
3431
  if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
3519
- }(this, t), l(n, "input", null !== i ? "contructor ".concat(i) : "constuctor"),
3432
+ }(this, t), c(n, "input", null !== i ? "contructor ".concat(i) : "constuctor"),
3520
3433
  0 === n.length) throw Error("input OHLCV must not be empty: " + i);
3521
- s(u, "precision", "constructor"), this.firstRow = n[0];
3522
- var y = function(t) {
3434
+ f(l, "precision", "constructor"), h(v, {
3435
+ min: 100,
3436
+ max: 5e4,
3437
+ allowDecimals: !1
3438
+ }, "chunkProcess", "constructor"), this.chunkProcess = v, this.firstRow = n[0];
3439
+ var m = function(t) {
3523
3440
  for (var e = {}, r = {}, n = 0, o = Object.entries(t); n < o.length; n++) {
3524
- var i = Ie(o[n], 2), a = i[0], u = i[1];
3525
- if ("date" === a) e[a] = ke(u), r[a] = "Array"; else if ("volume" === a) e[a] = Ae(u, !0),
3526
- r[a] = "Int32Array"; else if (De.has(a)) e[a] = Ae(u, !0), r[a] = "Float64Array"; else {
3527
- var l = Ae(u, !1);
3441
+ var i = Re(o[n], 2), a = i[0], u = i[1];
3442
+ if ("date" === a) e[a] = De(u), r[a] = "Array"; else if ("volume" === a) e[a] = we(u, !0),
3443
+ r[a] = "Int32Array"; else if (Fe.has(a)) e[a] = we(u, !0), r[a] = "Float64Array"; else {
3444
+ var l = we(u, !1);
3528
3445
  e[a] = l, r[a] = "number" === l ? "Float64Array" : "Array";
3529
3446
  }
3530
3447
  }
@@ -3532,16 +3449,15 @@ var OHLCV_INDICATORS;
3532
3449
  inputTypes: e,
3533
3450
  arrayTypes: r
3534
3451
  };
3535
- }(this.firstRow), h = y.inputTypes, p = y.arrayTypes;
3536
- if (this.inputTypes = h, this.arrayTypes = p, !this.firstRow.hasOwnProperty("close")) throw Error('input OHLCV array objects require at least "close" property: '.concat(i));
3452
+ }(this.firstRow), d = m.inputTypes, b = m.arrayTypes;
3453
+ if (this.inputTypes = d, this.arrayTypes = b, !this.firstRow.hasOwnProperty("close")) throw Error('input OHLCV array objects require at least "close" property: '.concat(i));
3537
3454
  return this.dateType = this.inputTypes.date ? this.inputTypes.date : null, this.isComputed = !1,
3538
3455
  this.input = n, this.priceBased = new Set([ "open", "high", "low", "close" ]), this.len = n.length,
3539
3456
  this.instances = {}, this.crossPairsList = [], this.verticalOhlcv = {}, this.verticalOhlcvKeyNames = [],
3540
3457
  this.verticalOhlcvTempCols = new Set, this.utilities = {
3541
- correlation: hr
3542
- }, this.invalidValueIndex = -1, this.precision = u, this.precisionMultiplier = wr(this, this.firstRow),
3543
- this.scaledGroups = {}, null !== f && (validateInputParams(f, this.len), this.inputParams = f,
3544
- this.compute()), this.inputParams = [], this.pushToMain = function(t) {
3458
+ correlation: vr
3459
+ }, this.invalidValueIndex = -1, this.precision = l, this.precisionMultiplier = Or(this, this.firstRow),
3460
+ this.scaledGroups = {}, this.pushToMain = function(t) {
3545
3461
  var e = t.index, n = t.key, o = t.value;
3546
3462
  return function(t) {
3547
3463
  var e = t.main, r = t.index, n = t.key, o = t.value, i = e.verticalOhlcv;
@@ -3553,17 +3469,18 @@ var OHLCV_INDICATORS;
3553
3469
  key: n,
3554
3470
  value: o
3555
3471
  });
3556
- }, this;
3472
+ }, null !== y && (u(y, this.len), this.inputParams = y, this.compute()), this.inputParams = [],
3473
+ this;
3557
3474
  }, e = [ {
3558
3475
  key: "getDataAsCols",
3559
3476
  value: function() {
3560
3477
  var t = !(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0];
3561
3478
  this.compute();
3562
- for (var e = this.precisionMultiplier, r = this.precision, n = this.invalidValueIndex, o = this.len, i = this.verticalOhlcv, a = this.priceBased, u = this.arrayTypes, l = this.verticalOhlcvTempCols, c = {}, s = t ? n + 1 : 0, f = o - s, y = 0, h = Object.entries(i); y < h.length; y++) {
3563
- var p = jr(h[y], 2), v = p[0], m = p[1];
3479
+ for (var e = this.precisionMultiplier, r = this.precision, n = this.invalidValueIndex, o = this.len, i = this.verticalOhlcv, a = this.priceBased, u = this.arrayTypes, l = this.verticalOhlcvTempCols, c = {}, s = t ? n + 1 : 0, f = o - s, h = 0, y = Object.entries(i); h < y.length; h++) {
3480
+ var p = _r(y[h], 2), v = p[0], m = p[1];
3564
3481
  if (!l.has(v)) {
3565
3482
  var d = a.has(v) && r;
3566
- c[v] = Re(u[v], f);
3483
+ c[v] = Le(u[v], f);
3567
3484
  for (var b = s; b < o; b++) c[v][b] = d ? m[b] / e : m[b];
3568
3485
  }
3569
3486
  }
@@ -3574,12 +3491,12 @@ var OHLCV_INDICATORS;
3574
3491
  value: function() {
3575
3492
  var t = !(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0];
3576
3493
  //getData method returns the last object (row) of the new OHLCV with indicators: {open, high, low, close, rsi_14, bollinger_bands_upper}
3577
- return this.compute(), mr(t, this, 0);
3494
+ return this.compute(), br(t, this, 0);
3578
3495
  }
3579
3496
  }, {
3580
3497
  key: "getLastValues",
3581
3498
  value: function() {
3582
- return this.compute(), mr(!1, this, this.len - 1)[0];
3499
+ return this.compute(), br(!1, this, this.len - 1)[0];
3583
3500
  }
3584
3501
  }, {
3585
3502
  key: "compute",
@@ -3591,7 +3508,53 @@ var OHLCV_INDICATORS;
3591
3508
  // Figure out whether there’s a date field in the inputs
3592
3509
  // Only run the full loop once (or when new data appears later,
3593
3510
  // if you extend this to reset isComputed elsewhere)
3594
- this.len > 0 && (fr(this.input, this), this.isComputed = !0,
3511
+ this.len > 0 && (function(t, e) {
3512
+ var r = e.len, n = e.inputParams, o = e.priceBased, i = e.precisionMultiplier, a = e.arrayTypes, l = e.verticalOhlcv, c = e.verticalOhlcvKeyNames, s = e.inputTypes, f = e.chunkProcess;
3513
+ u(n, r);
3514
+ for (var h = 0, y = Object.keys(s); h < y.length; h++) {
3515
+ var p = y[h];
3516
+ l[p] = Le(a[p], r);
3517
+ }
3518
+ // Process each row in the input
3519
+ for (var v = 0; v < r; v += f) for (var m = Math.min(v + f, r), d = v; d < m; d++) {
3520
+ for (var b = t[d], g = 0, w = Object.entries(s); g < w.length; g++) {
3521
+ var S = sr(w[g], 2), O = S[0], j = S[1], P = b[O];
3522
+ if (ge.hasOwnProperty(j)) {
3523
+ var _ = ge[j](P);
3524
+ i > 1 && o.has(O) && (_ *= i), e.pushToMain({
3525
+ index: d,
3526
+ key: O,
3527
+ value: _
3528
+ });
3529
+ } else Me.hasOwnProperty(j) ? e.pushToMain({
3530
+ index: d,
3531
+ key: O,
3532
+ value: Me[j](P)
3533
+ }) : e.pushToMain({
3534
+ index: d,
3535
+ key: O,
3536
+ value: P
3537
+ });
3538
+ }
3539
+ // Run all indicator functions except for the ones processed later
3540
+ var N, A = cr(n);
3541
+ try {
3542
+ for (A.s(); !(N = A.n()).done; ) {
3543
+ var T = N.value, E = T.key, x = T.params;
3544
+ "lag" !== E && "crossPairs" !== E &&
3545
+ // resolve fn on-demand, no per-item object allocation here
3546
+ yr[E].apply(yr, [ e, d ].concat(lr(x)));
3547
+ }
3548
+ // Process these indicators separately (ensuring their execution order)
3549
+ } catch (t) {
3550
+ A.e(t);
3551
+ } finally {
3552
+ A.f();
3553
+ }
3554
+ $e(e, d), We(e, d), t[d] = null;
3555
+ }
3556
+ c.push.apply(c, lr(Object.keys(l)));
3557
+ }(this.input, this), this.isComputed = !0,
3595
3558
  //flushing after mainLoop
3596
3559
  this.input = [], this.instances = {}, this.firstRow = [])), this;
3597
3560
  }
@@ -3599,7 +3562,7 @@ var OHLCV_INDICATORS;
3599
3562
  key: "crossPairs",
3600
3563
  value: function() {
3601
3564
  var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [], e = "crossPairs";
3602
- return u(this), l(t, "arr", e), this.crossPairsList = [].concat(Sr(this.crossPairsList), Sr(t)),
3565
+ return l(this), c(t, "arr", e), this.crossPairsList = [].concat(Pr(this.crossPairsList), Pr(t)),
3603
3566
  this.inputParams.push({
3604
3567
  key: e,
3605
3568
  params: [ this.crossPairsList ]
@@ -3609,7 +3572,7 @@ var OHLCV_INDICATORS;
3609
3572
  key: "lag",
3610
3573
  value: function() {
3611
3574
  var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [ "close" ], e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1, r = "lag";
3612
- u(this), l(t, "colKeys", r), f(e, {
3575
+ l(this), c(t, "colKeys", r), h(e, {
3613
3576
  min: 1,
3614
3577
  max: this.len,
3615
3578
  allowDecimals: !1
@@ -3620,7 +3583,7 @@ var OHLCV_INDICATORS;
3620
3583
  var n, o = function(t, e) {
3621
3584
  var r = "undefined" != typeof Symbol && t[Symbol.iterator] || t["@@iterator"];
3622
3585
  if (!r) {
3623
- if (Array.isArray(t) || (r = Pr(t)) || e && t && "number" == typeof t.length) {
3586
+ if (Array.isArray(t) || (r = Nr(t)) || e && t && "number" == typeof t.length) {
3624
3587
  r && (t = r);
3625
3588
  var n = 0, o = function() {};
3626
3589
  return {
@@ -3679,13 +3642,13 @@ var OHLCV_INDICATORS;
3679
3642
  value: function() {
3680
3643
  var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 10, e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, r = "relativeVolume";
3681
3644
  if (!this.inputTypes.hasOwnProperty("volume")) throw new Error('If "relativeVolume" is called the input ohlcv must contain valid volume properties.');
3682
- u(this), f(t, {
3645
+ l(this), h(t, {
3683
3646
  min: 1,
3684
3647
  max: this.len,
3685
3648
  allowDecimals: !1
3686
- }, "size", r), c(e, "options", r);
3649
+ }, "size", r), s(e, "options", r);
3687
3650
  var n = e.lag, o = void 0 === n ? 0 : n;
3688
- return f(o, {
3651
+ return h(o, {
3689
3652
  min: 0,
3690
3653
  max: this.len,
3691
3654
  allowDecimals: !1
@@ -3700,21 +3663,30 @@ var OHLCV_INDICATORS;
3700
3663
  key: "ema",
3701
3664
  value: function() {
3702
3665
  var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 5, e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, r = "ema";
3703
- u(this), f(t, {
3666
+ l(this), h(t, {
3704
3667
  min: 1,
3705
3668
  max: this.len,
3706
3669
  allowDecimals: !1
3707
- }, "size", r), c(e, "options", r);
3670
+ }, "size", r), s(e, "options", r);
3708
3671
  var n = e.target, o = void 0 === n ? "close" : n, i = e.lag, a = void 0 === i ? 0 : i;
3709
- return f(a, {
3672
+ h(a, {
3710
3673
  min: 0,
3711
3674
  max: this.len,
3712
3675
  allowDecimals: !1
3713
- }, "options.lag", r), this.inputParams.push({
3676
+ }, "options.lag", r);
3677
+ var u = he({
3678
+ main: this,
3679
+ size: t,
3680
+ target: o,
3681
+ lag: a,
3682
+ methodName: r
3683
+ });
3684
+ return this.inputParams.push({
3714
3685
  key: r,
3715
3686
  params: [ r, t, {
3716
3687
  target: o,
3717
- lag: a
3688
+ lag: a,
3689
+ precomputed: u
3718
3690
  } ]
3719
3691
  }), this;
3720
3692
  }
@@ -3722,21 +3694,30 @@ var OHLCV_INDICATORS;
3722
3694
  key: "sma",
3723
3695
  value: function() {
3724
3696
  var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 5, e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, r = "sma";
3725
- u(this), f(t, {
3697
+ l(this), h(t, {
3726
3698
  min: 1,
3727
3699
  max: this.len,
3728
3700
  allowDecimals: !1
3729
- }, "size", r), c(e, "options", r);
3701
+ }, "size", r), s(e, "options", r);
3730
3702
  var n = e.target, o = void 0 === n ? "close" : n, i = e.lag, a = void 0 === i ? 0 : i;
3731
- return f(a, {
3703
+ h(a, {
3732
3704
  min: 0,
3733
3705
  max: this.len,
3734
3706
  allowDecimals: !1
3735
- }, "options.lag", r), this.inputParams.push({
3707
+ }, "options.lag", r);
3708
+ var u = he({
3709
+ main: this,
3710
+ size: t,
3711
+ target: o,
3712
+ lag: a,
3713
+ methodName: r
3714
+ });
3715
+ return this.inputParams.push({
3736
3716
  key: r,
3737
3717
  params: [ r, t, {
3738
3718
  target: o,
3739
- lag: a
3719
+ lag: a,
3720
+ precomputed: u
3740
3721
  } ]
3741
3722
  }), this;
3742
3723
  }
@@ -3744,29 +3725,34 @@ var OHLCV_INDICATORS;
3744
3725
  key: "macd",
3745
3726
  value: function() {
3746
3727
  var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 12, e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 26, r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 9, n = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {}, o = "macd";
3747
- u(this), f(t, {
3728
+ l(this), h(t, {
3748
3729
  min: 1,
3749
3730
  max: this.len,
3750
3731
  allowDecimals: !1
3751
- }, "fast", o), f(e, {
3732
+ }, "fast", o), h(e, {
3752
3733
  min: 1,
3753
3734
  max: this.len,
3754
3735
  allowDecimals: !1
3755
- }, "slow", o), f(r, {
3736
+ }, "slow", o), h(r, {
3756
3737
  min: 1,
3757
3738
  max: this.len,
3758
3739
  allowDecimals: !1
3759
- }, "signal", o), c(n, "options", o);
3760
- var i = n.target, a = void 0 === i ? "close" : i, l = n.lag, s = void 0 === l ? 0 : l;
3761
- return f(s, {
3740
+ }, "signal", o), s(n, "options", o);
3741
+ var i = n.target, a = void 0 === i ? "close" : i, u = n.lag, c = void 0 === u ? 0 : u;
3742
+ h(c, {
3762
3743
  min: 0,
3763
3744
  max: this.len,
3764
3745
  allowDecimals: !1
3765
- }, "options.lag", o), this.inputParams.push({
3746
+ }, "options.lag", o);
3747
+ var f = {
3748
+ instanceKey: "".concat(t, "_").concat(e, "_").concat(r).concat("close" === a ? "" : "_".concat(a))
3749
+ };
3750
+ return this.inputParams.push({
3766
3751
  key: o,
3767
3752
  params: [ t, e, r, {
3768
3753
  target: a,
3769
- lag: s
3754
+ lag: c,
3755
+ precomputed: f
3770
3756
  } ]
3771
3757
  }), this;
3772
3758
  }
@@ -3774,27 +3760,32 @@ var OHLCV_INDICATORS;
3774
3760
  key: "bollingerBands",
3775
3761
  value: function() {
3776
3762
  var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 20, e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 2, r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}, n = "bollingerBands";
3777
- u(this), f(t, {
3763
+ l(this), h(t, {
3778
3764
  min: 1,
3779
3765
  max: this.len,
3780
3766
  allowDecimals: !1
3781
- }, "size", n), f(e, {
3767
+ }, "size", n), h(e, {
3782
3768
  min: .01,
3783
3769
  max: 50,
3784
3770
  allowDecimals: !0
3785
- }, "stdDev", n), c(r, "options", n);
3786
- var o = r.target, i = void 0 === o ? "close" : o, a = r.height, y = void 0 !== a && a, h = r.range, p = void 0 === h ? [] : h, v = r.lag, m = void 0 === v ? 0 : v;
3787
- return l(p, "options.range", n), f(m, {
3771
+ }, "stdDev", n), s(r, "options", n);
3772
+ var o = r.target, i = void 0 === o ? "close" : o, a = r.height, u = void 0 !== a && a, y = r.range, p = void 0 === y ? [] : y, v = r.lag, m = void 0 === v ? 0 : v, d = r.decimals, b = void 0 === d ? null : d;
3773
+ return c(p, "options.range", n), h(m, {
3788
3774
  min: 0,
3789
3775
  max: this.len,
3790
3776
  allowDecimals: !1
3791
- }, "options.lag", n), s(y, "options.height", n), this.inputParams.push({
3777
+ }, "options.lag", n), f(u, "options.height", n), null !== b && h(b, {
3778
+ min: 1,
3779
+ max: 15,
3780
+ allowDecimals: !1
3781
+ }, "decimals", n), this.inputParams.push({
3792
3782
  key: n,
3793
3783
  params: [ t, e, {
3794
3784
  target: i,
3795
- height: y,
3785
+ height: u,
3796
3786
  range: p,
3797
- lag: m
3787
+ lag: m,
3788
+ decimals: b
3798
3789
  } ]
3799
3790
  }), this;
3800
3791
  }
@@ -3802,13 +3793,13 @@ var OHLCV_INDICATORS;
3802
3793
  key: "rsi",
3803
3794
  value: function() {
3804
3795
  var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 14, e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, r = "rsi";
3805
- u(this), f(t, {
3796
+ l(this), h(t, {
3806
3797
  min: 1,
3807
3798
  max: this.len,
3808
3799
  allowDecimals: !1
3809
- }, "size", r), c(e, "options", r);
3800
+ }, "size", r), s(e, "options", r);
3810
3801
  var n = e.target, o = void 0 === n ? "close" : n, i = e.lag, a = void 0 === i ? 0 : i;
3811
- return f(a, {
3802
+ return h(a, {
3812
3803
  min: 0,
3813
3804
  max: this.len,
3814
3805
  allowDecimals: !1
@@ -3824,26 +3815,31 @@ var OHLCV_INDICATORS;
3824
3815
  key: "donchianChannels",
3825
3816
  value: function() {
3826
3817
  var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 20, e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0, r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}, n = "donchianChannels";
3827
- u(this), f(t, {
3818
+ l(this), h(t, {
3828
3819
  min: 1,
3829
3820
  max: this.len,
3830
3821
  allowDecimals: !1
3831
- }, "size", n), f(e, {
3822
+ }, "size", n), h(e, {
3832
3823
  min: 0,
3833
3824
  max: this.len,
3834
3825
  allowDecimals: !1
3835
- }, "offset", n), c(r, "options", n);
3836
- var o = r.height, i = void 0 !== o && o, a = r.range, y = void 0 === a ? [] : a, h = r.lag, p = void 0 === h ? 0 : h;
3837
- return l(y, "options.range", n), f(p, {
3826
+ }, "offset", n), s(r, "options", n);
3827
+ var o = r.height, i = void 0 !== o && o, a = r.range, u = void 0 === a ? [] : a, y = r.lag, p = void 0 === y ? 0 : y, v = r.decimals, m = void 0 === v ? null : v;
3828
+ return c(u, "options.range", n), h(p, {
3838
3829
  min: 0,
3839
3830
  max: this.len,
3840
3831
  allowDecimals: !1
3841
- }, "options.lag", n), s(i, "options.height", n), this.inputParams.push({
3832
+ }, "options.lag", n), f(i, "options.height", n), null !== m && h(m, {
3833
+ min: 1,
3834
+ max: 15,
3835
+ allowDecimals: !1
3836
+ }, "decimals", n), this.inputParams.push({
3842
3837
  key: n,
3843
3838
  params: [ t, e, {
3844
3839
  height: i,
3845
- range: y,
3846
- lag: p
3840
+ range: u,
3841
+ lag: p,
3842
+ decimals: m
3847
3843
  } ]
3848
3844
  }), this;
3849
3845
  }
@@ -3852,17 +3848,17 @@ var OHLCV_INDICATORS;
3852
3848
  value: function() {
3853
3849
  var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 5, e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 10, r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}, n = "volumeOscillator";
3854
3850
  if (!this.inputTypes.hasOwnProperty("volume")) throw new Error('If "volumeOscillator" is called the input ohlcv must contain valid volume properties.');
3855
- u(this), f(t, {
3851
+ l(this), h(t, {
3856
3852
  min: 1,
3857
3853
  max: this.len,
3858
3854
  allowDecimals: !1
3859
- }, "fastSize", n), f(e, {
3855
+ }, "fastSize", n), h(e, {
3860
3856
  min: t,
3861
3857
  max: this.len,
3862
3858
  allowDecimals: !1
3863
- }, "slowSize", n), c(r, "options", n);
3859
+ }, "slowSize", n), s(r, "options", n);
3864
3860
  var o = r.lag, i = void 0 === o ? 0 : o;
3865
- return f(i, {
3861
+ return h(i, {
3866
3862
  min: 0,
3867
3863
  max: this.len,
3868
3864
  allowDecimals: !1
@@ -3877,9 +3873,9 @@ var OHLCV_INDICATORS;
3877
3873
  key: "dateTime",
3878
3874
  value: function() {
3879
3875
  var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, e = "dateTime";
3880
- u(this), c(t, "options", e);
3876
+ l(this), s(t, "options", e);
3881
3877
  var r = t.lag, n = void 0 === r ? 0 : r;
3882
- return f(n, {
3878
+ return h(n, {
3883
3879
  min: 0,
3884
3880
  max: this.len,
3885
3881
  allowDecimals: !1
@@ -3892,35 +3888,51 @@ var OHLCV_INDICATORS;
3892
3888
  }
3893
3889
  }, {
3894
3890
  key: "scaler",
3895
- value: function(t, e, n) {
3896
- var o = "scaler";
3897
- u(this), f(t, {
3891
+ value: function(t) {
3892
+ var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : [], n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}, o = "scaler";
3893
+ l(this), h(t, {
3898
3894
  min: 1,
3899
3895
  max: this.len,
3900
3896
  allowDecimals: !1
3901
- }, "size", o), l(e, "colKeys", o);
3902
- var i = n.group, a = void 0 !== i && i, c = n.range, y = void 0 === c ? [ 0, 1 ] : c, h = n.lag, p = void 0 === h ? 0 : h, v = n.type, m = void 0 === v ? "minmax" : v;
3903
- return s(a, "options.group", o), function(t, e, n) {
3904
- if (l(t, e, n), 2 !== t.length) throw new Error('Invalid "'.concat(e, '" array length: expected 2 items, but got ').concat(t.length, ' in "').concat(n, ".").concat(e, '".'));
3897
+ }, "size", o), c(e, "colKeys", o);
3898
+ var i = n.group, a = void 0 !== i && i, u = n.range, s = void 0 === u ? [ 0, 1 ] : u, y = n.lag, p = void 0 === y ? 0 : y, v = n.type, m = void 0 === v ? "minmax" : v, d = n.decimals, b = void 0 === d ? null : d;
3899
+ f(a, "options.group", o), function(t, e, n) {
3900
+ if (c(t, e, n), 2 !== t.length) throw new Error('Invalid "'.concat(e, '" array length: expected 2 items, but got ').concat(t.length, ' in "').concat(n, ".").concat(e, '".'));
3905
3901
  var o = r(t, 2), i = o[0], a = o[1];
3906
- if (f(i, {
3902
+ if (h(i, {
3907
3903
  min: -100,
3908
3904
  max: a,
3909
3905
  allowDecimals: !1
3910
- }, "min", n), f(a, {
3906
+ }, "min", n), h(a, {
3911
3907
  min: i,
3912
3908
  max: 100,
3913
3909
  allowDecimals: !1
3914
3910
  }, "max", n), i === a) throw new Error('Invalid "min" can not be equal to "max" property in "'.concat(n, ".").concat(e, '".'));
3915
- }(y, "options.range", o), function(t, e, r, n) {
3916
- if (l(t, "arrayOptions", "".concat(n, ".").concat(r, ".validateArrayOptions")),
3911
+ }(s, "options.range", o), function(t, e, r, n) {
3912
+ if (c(t, "arrayOptions", "".concat(n, ".").concat(r, ".validateArrayOptions")),
3917
3913
  !t.includes(e.toString())) throw new Error('Param "'.concat(r, '" must be any of the following values [').concat(t.join(", "), '] in "').concat(n, '".'));
3918
- }([ "minmax", "zscore" ], m, "options.type", o), this.inputParams.push({
3914
+ }([ "minmax", "zscore" ], m, "options.type", o), null !== b && h(b, {
3915
+ min: 1,
3916
+ max: 15,
3917
+ allowDecimals: !1
3918
+ }, "decimals", o);
3919
+ var g = {
3920
+ groupKey: a ? "".concat(m, "_").concat(t, "_group_").concat(e.join("_")) : "",
3921
+ groupKeyLen: e.length
3922
+ };
3923
+ return this.inputParams.push({
3919
3924
  key: o,
3920
- params: [ t, e, m, a, y, p ]
3925
+ params: [ t, e, {
3926
+ type: m,
3927
+ group: a,
3928
+ range: s,
3929
+ lag: p,
3930
+ precomputed: g,
3931
+ decimals: b
3932
+ } ]
3921
3933
  }), this;
3922
3934
  }
3923
- } ], e && Nr(t.prototype, e), n && Nr(t, n), Object.defineProperty(t, "prototype", {
3935
+ } ], e && Tr(t.prototype, e), n && Tr(t, n), Object.defineProperty(t, "prototype", {
3924
3936
  writable: !1
3925
3937
  }), t;
3926
3938
  var t, e, n;