react-candlesticks 0.0.7 → 0.0.9
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.
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Copyright (c) 2026 Jason Wilson, trendingcandles.com
|
|
3
3
|
* Licensed under the MIT License
|
|
4
|
-
* Build time: 2026-05-
|
|
4
|
+
* Build time: 2026-05-23T20:49:47.601Z
|
|
5
5
|
*/
|
|
6
|
-
import { jsx as
|
|
7
|
-
import z0, { useRef as _, useState as ln, useLayoutEffect as aa, useEffect as Oe, memo as et, useCallback as
|
|
6
|
+
import { jsx as te, jsxs as Kt, Fragment as sa } from "react/jsx-runtime";
|
|
7
|
+
import z0, { useRef as _, useState as ln, useLayoutEffect as aa, useEffect as Oe, memo as et, useCallback as J, forwardRef as sn, useImperativeHandle as an, Fragment as ca, createRef as Ni, useMemo as Ae, Children as ua } from "react";
|
|
8
8
|
const da = {
|
|
9
9
|
backgroundColor: "transparent"
|
|
10
10
|
}, ke = {
|
|
@@ -25,7 +25,7 @@ const da = {
|
|
|
25
25
|
if (ar(e, o) <= 0)
|
|
26
26
|
throw new Error(`${o} must be > 0`);
|
|
27
27
|
return e;
|
|
28
|
-
},
|
|
28
|
+
}, z = (e = {}, o, t) => {
|
|
29
29
|
if (e === !1)
|
|
30
30
|
return null;
|
|
31
31
|
const n = wt(
|
|
@@ -159,7 +159,7 @@ function $i(e, o, t) {
|
|
|
159
159
|
n[e[r]] = 0;
|
|
160
160
|
return n;
|
|
161
161
|
}
|
|
162
|
-
function
|
|
162
|
+
function H(e, ...o) {
|
|
163
163
|
return (...t) => e(...o, ...t);
|
|
164
164
|
}
|
|
165
165
|
function ma() {
|
|
@@ -200,10 +200,10 @@ function Pn(e) {
|
|
|
200
200
|
function Yi(e, o, t) {
|
|
201
201
|
let n = 0, r = 0;
|
|
202
202
|
for (let s = 0; s <= o; s++) {
|
|
203
|
-
const c = e[t[s]], a = eo[s], u =
|
|
203
|
+
const c = e[t[s]], a = eo[s], u = Q / a, [d, h] = Ao(c, u);
|
|
204
204
|
n += h * a, r += d;
|
|
205
205
|
}
|
|
206
|
-
const [l, i] = Ao(n,
|
|
206
|
+
const [l, i] = Ao(n, Q);
|
|
207
207
|
return [r + l, i];
|
|
208
208
|
}
|
|
209
209
|
function Jn(e, o, t) {
|
|
@@ -216,7 +216,7 @@ function Jn(e, o, t) {
|
|
|
216
216
|
}
|
|
217
217
|
function fa(e) {
|
|
218
218
|
if (e !== void 0)
|
|
219
|
-
return
|
|
219
|
+
return me(e);
|
|
220
220
|
}
|
|
221
221
|
function pa(e) {
|
|
222
222
|
if (e !== void 0)
|
|
@@ -263,7 +263,7 @@ function fr(e) {
|
|
|
263
263
|
return String(e);
|
|
264
264
|
}
|
|
265
265
|
function Cn(e, o) {
|
|
266
|
-
return Te(e) ? String(e) :
|
|
266
|
+
return Te(e) ? String(e) : me(e, o);
|
|
267
267
|
}
|
|
268
268
|
function pr(e) {
|
|
269
269
|
if (typeof e == "string")
|
|
@@ -289,9 +289,9 @@ function Hl(e, o) {
|
|
|
289
289
|
return Ri(ge(e, o), o);
|
|
290
290
|
}
|
|
291
291
|
function vr(e, o) {
|
|
292
|
-
let [t, n] = Ao(o,
|
|
292
|
+
let [t, n] = Ao(o, Q), r = e + t;
|
|
293
293
|
const l = Math.sign(r);
|
|
294
|
-
return l && l === -Math.sign(n) && (r -= l, n += l *
|
|
294
|
+
return l && l === -Math.sign(n) && (r -= l, n += l * Q), [r, n];
|
|
295
295
|
}
|
|
296
296
|
function Zt(e, o, t = 1) {
|
|
297
297
|
return vr(e[0] + o[0] * t, e[1] + o[1] * t);
|
|
@@ -309,27 +309,27 @@ function Wi(e, o, t) {
|
|
|
309
309
|
return xe(e, o) === -1 || xe(e, t) === 1;
|
|
310
310
|
}
|
|
311
311
|
function wr(e, o = 1) {
|
|
312
|
-
const t = BigInt(
|
|
312
|
+
const t = BigInt(Q / o);
|
|
313
313
|
return [Number(e / t), Number(e % t) * o];
|
|
314
314
|
}
|
|
315
315
|
function Fn(e, o = 1) {
|
|
316
|
-
const t =
|
|
316
|
+
const t = Q / o, [n, r] = Ao(e, t);
|
|
317
317
|
return [n, r * o];
|
|
318
318
|
}
|
|
319
319
|
function ga(e, o = 1) {
|
|
320
|
-
const [t, n] = e, r = Math.floor(n / o), l =
|
|
320
|
+
const [t, n] = e, r = Math.floor(n / o), l = Q / o;
|
|
321
321
|
return BigInt(t) * BigInt(l) + BigInt(r);
|
|
322
322
|
}
|
|
323
323
|
function Qe(e, o = 1, t) {
|
|
324
324
|
const [n, r] = e, [l, i] = Ao(r, o);
|
|
325
|
-
return n * (
|
|
325
|
+
return n * (Q / o) + (l + (t ? i / o : 0));
|
|
326
326
|
}
|
|
327
327
|
function va(e) {
|
|
328
|
-
return e[0] + e[1] /
|
|
328
|
+
return e[0] + e[1] / Q;
|
|
329
329
|
}
|
|
330
330
|
function Tr(e, o, t = co) {
|
|
331
331
|
const [n, r] = e, [l, i] = t(r, o);
|
|
332
|
-
return [n * (
|
|
332
|
+
return [n * (Q / o) + l, i];
|
|
333
333
|
}
|
|
334
334
|
function br(e) {
|
|
335
335
|
return Ze(e, "isoYear", nn, tn, 1), e.isoYear === nn ? Ze(e, "isoMonth", 4, 12, 1) : e.isoYear === tn && Ze(e, "isoMonth", 1, 9, 1), e;
|
|
@@ -343,7 +343,7 @@ function _e(e) {
|
|
|
343
343
|
}
|
|
344
344
|
function Me(e) {
|
|
345
345
|
const o = Ze(e, "isoYear", nn, tn, 1), t = o === nn ? 1 : o === tn ? -1 : 0;
|
|
346
|
-
return t && oo(
|
|
346
|
+
return t && oo(ue({
|
|
347
347
|
...e,
|
|
348
348
|
isoDay: e.isoDay + t,
|
|
349
349
|
isoNanosecond: e.isoNanosecond - t
|
|
@@ -358,7 +358,7 @@ function Eo(e) {
|
|
|
358
358
|
return Yi(e, 5, Xe)[1];
|
|
359
359
|
}
|
|
360
360
|
function Qn(e) {
|
|
361
|
-
const [o, t] = co(e,
|
|
361
|
+
const [o, t] = co(e, Q);
|
|
362
362
|
return [Jn(t, 5, Xe), o];
|
|
363
363
|
}
|
|
364
364
|
function wa(e) {
|
|
@@ -370,7 +370,7 @@ function _i(e) {
|
|
|
370
370
|
function we(e) {
|
|
371
371
|
return Lt(e.isoYear, e.isoMonth, e.isoDay, e.isoHour, e.isoMinute, e.isoSecond, e.isoMillisecond);
|
|
372
372
|
}
|
|
373
|
-
function
|
|
373
|
+
function ue(e) {
|
|
374
374
|
const o = we(e);
|
|
375
375
|
if (o !== void 0) {
|
|
376
376
|
const [t, n] = Ao(o, Se);
|
|
@@ -379,7 +379,7 @@ function ce(e) {
|
|
|
379
379
|
}
|
|
380
380
|
function yr(e, o) {
|
|
381
381
|
const [t, n] = Qn(Eo(e) - o);
|
|
382
|
-
return oo(
|
|
382
|
+
return oo(ue({
|
|
383
383
|
...e,
|
|
384
384
|
isoDay: e.isoDay + n,
|
|
385
385
|
...t
|
|
@@ -399,7 +399,7 @@ function ji(e, o = 1, t = 1, n = 0, r = 0, l = 0, i = 0) {
|
|
|
399
399
|
}
|
|
400
400
|
function St(e, o) {
|
|
401
401
|
let [t, n] = qo(e, o);
|
|
402
|
-
n < 0 && (n +=
|
|
402
|
+
n < 0 && (n += Q, t -= 1);
|
|
403
403
|
const [r, l] = co(n, bo), [i, s] = co(l, vn);
|
|
404
404
|
return e0(t * Se + r, i, s);
|
|
405
405
|
}
|
|
@@ -495,7 +495,7 @@ function Gi(e, o) {
|
|
|
495
495
|
function Mt(e, o) {
|
|
496
496
|
return It(Xe, [Ze(e, "isoHour", 0, 23, o), Ze(e, "isoMinute", 0, 59, o), Ze(e, "isoSecond", 0, 59, o), Ze(e, "isoMillisecond", 0, 999, o), Ze(e, "isoMicrosecond", 0, 999, o), Ze(e, "isoNanosecond", 0, 999, o)]);
|
|
497
497
|
}
|
|
498
|
-
function
|
|
498
|
+
function G(e) {
|
|
499
499
|
return e === void 0 ? 0 : g2(un(e));
|
|
500
500
|
}
|
|
501
501
|
function t0(e, o = 0) {
|
|
@@ -539,7 +539,7 @@ function Mr(e) {
|
|
|
539
539
|
return o === void 0 ? 1 : ge(o, Ht);
|
|
540
540
|
}
|
|
541
541
|
function Pr(e, o, t, n) {
|
|
542
|
-
const r = n ?
|
|
542
|
+
const r = n ? Q : eo[o + 1];
|
|
543
543
|
if (r) {
|
|
544
544
|
const l = eo[o];
|
|
545
545
|
if (r % ((e = mo(Ht, e, 1, r / l - (n ? 0 : 1), 1)) * l))
|
|
@@ -645,7 +645,7 @@ function no(e) {
|
|
|
645
645
|
...je(h2, e)
|
|
646
646
|
};
|
|
647
647
|
}
|
|
648
|
-
function
|
|
648
|
+
function le(e) {
|
|
649
649
|
return {
|
|
650
650
|
branding: Il,
|
|
651
651
|
sign: Co(e),
|
|
@@ -664,8 +664,8 @@ function os(e) {
|
|
|
664
664
|
function Sa(e, o, t, n, r) {
|
|
665
665
|
const l = Jo(n), [i, s] = ((b, w) => {
|
|
666
666
|
const Z = w((b = r0(b, er))[m2]);
|
|
667
|
-
let
|
|
668
|
-
return
|
|
667
|
+
let p = S1(b);
|
|
668
|
+
return p = Ci(er, p), [p, Z];
|
|
669
669
|
})(r, e), c = Math.max(i, l);
|
|
670
670
|
if (!s && en(c, s))
|
|
671
671
|
return Kl(n, i);
|
|
@@ -673,20 +673,20 @@ function Sa(e, o, t, n, r) {
|
|
|
673
673
|
throw new RangeError(b0);
|
|
674
674
|
if (!n.sign)
|
|
675
675
|
return 0;
|
|
676
|
-
const [a, u, d] = u0(o, t, s), h = Rr(d), m = d0(d), f = Or(d),
|
|
677
|
-
kt(s) || (Me(a), Me(
|
|
678
|
-
const v = f(u, a,
|
|
679
|
-
return en(i, s) ? Kl(v, i) : Ma(v, h(
|
|
676
|
+
const [a, u, d] = u0(o, t, s), h = Rr(d), m = d0(d), f = Or(d), g = m(u, a, n);
|
|
677
|
+
kt(s) || (Me(a), Me(g));
|
|
678
|
+
const v = f(u, a, g, i);
|
|
679
|
+
return en(i, s) ? Kl(v, i) : Ma(v, h(g), i, u, a, h, m);
|
|
680
680
|
}
|
|
681
681
|
function Ma(e, o, t, n, r, l, i) {
|
|
682
682
|
const s = Co(e), [c, a] = Ar(n, fl(t, e), t, s, r, l, i), u = Er(o, c, a);
|
|
683
|
-
return e[
|
|
683
|
+
return e[q[t]] + u * s;
|
|
684
684
|
}
|
|
685
685
|
function Kl(e, o) {
|
|
686
|
-
return Qe(
|
|
686
|
+
return Qe(de(e), eo[o], 1);
|
|
687
687
|
}
|
|
688
688
|
function Ar(e, o, t, n, r, l, i) {
|
|
689
|
-
const s =
|
|
689
|
+
const s = q[t], c = {
|
|
690
690
|
...o,
|
|
691
691
|
[s]: o[s] + n
|
|
692
692
|
}, a = i(e, r, o), u = i(e, r, c);
|
|
@@ -771,21 +771,21 @@ function ls(e) {
|
|
|
771
771
|
}
|
|
772
772
|
function Ba(e, o, t) {
|
|
773
773
|
const n = Math.min(Jo(e), 6);
|
|
774
|
-
return Nt(a0(
|
|
774
|
+
return Nt(a0(de(e, n), o, t), n);
|
|
775
775
|
}
|
|
776
776
|
function i0(e, o, t, n, r, l, i, s, c, a) {
|
|
777
777
|
if (n === 0 && r === 1)
|
|
778
778
|
return e;
|
|
779
779
|
const u = en(n, s) ? kt(s) && n < 6 && t >= 6 ? Fa : Ca : Ra;
|
|
780
780
|
let [d, h, m] = u(e, o, t, n, r, l, i, s, c, a);
|
|
781
|
-
return m && n !== 7 && (d = ((f,
|
|
781
|
+
return m && n !== 7 && (d = ((f, g, v, b, w, Z, p, T) => {
|
|
782
782
|
const y = Co(f);
|
|
783
783
|
for (let k = b + 1; k <= v; k++) {
|
|
784
784
|
if (k === 7 && v !== 7)
|
|
785
785
|
continue;
|
|
786
786
|
const L = fl(k, f);
|
|
787
|
-
L[
|
|
788
|
-
const I = Qe(Je(
|
|
787
|
+
L[q[k]] += y;
|
|
788
|
+
const I = Qe(Je(p(T(w, Z, L)), g));
|
|
789
789
|
if (I && Math.sign(I) !== y)
|
|
790
790
|
break;
|
|
791
791
|
f = L;
|
|
@@ -798,8 +798,8 @@ function s0(e, o, t, n, r) {
|
|
|
798
798
|
}
|
|
799
799
|
function a0(e, o, t, n) {
|
|
800
800
|
let [r, l] = e;
|
|
801
|
-
n && l < 0 && (l +=
|
|
802
|
-
const [i, s] = co(xo(l, o, t),
|
|
801
|
+
n && l < 0 && (l += Q, r -= 1);
|
|
802
|
+
const [i, s] = co(xo(l, o, t), Q);
|
|
803
803
|
return vr(r + i, s);
|
|
804
804
|
}
|
|
805
805
|
function xo(e, o, t) {
|
|
@@ -809,21 +809,21 @@ function is(e, o) {
|
|
|
809
809
|
return N1[o](e);
|
|
810
810
|
}
|
|
811
811
|
function Ca(e, o, t, n, r, l) {
|
|
812
|
-
const i = Co(e), s =
|
|
812
|
+
const i = Co(e), s = de(e), c = s0(s, n, r, l), a = Je(s, c), u = Math.sign(c[0] - s[0]) === i, d = Nt(c, Math.min(t, 6));
|
|
813
813
|
return [{
|
|
814
814
|
...e,
|
|
815
815
|
...d
|
|
816
816
|
}, Zt(o, a), u];
|
|
817
817
|
}
|
|
818
818
|
function Fa(e, o, t, n, r, l, i, s, c, a) {
|
|
819
|
-
const u = Co(e) || 1, d = Qe(
|
|
819
|
+
const u = Co(e) || 1, d = Qe(de(e, 5)), h = dn(n, r);
|
|
820
820
|
let m = xo(d, h, l);
|
|
821
|
-
const [f,
|
|
821
|
+
const [f, g] = Ar(i, {
|
|
822
822
|
...e,
|
|
823
823
|
...ml
|
|
824
|
-
}, 6, u, s, c, a), v = m - Qe(Je(f,
|
|
824
|
+
}, 6, u, s, c, a), v = m - Qe(Je(f, g));
|
|
825
825
|
let b = 0;
|
|
826
|
-
v && Math.sign(v) !== u ? o = qo(f, m) : (b += u, m = xo(v, h, l), o = qo(
|
|
826
|
+
v && Math.sign(v) !== u ? o = qo(f, m) : (b += u, m = xo(v, h, l), o = qo(g, m));
|
|
827
827
|
const w = h0(m);
|
|
828
828
|
return [{
|
|
829
829
|
...e,
|
|
@@ -832,15 +832,15 @@ function Fa(e, o, t, n, r, l, i, s, c, a) {
|
|
|
832
832
|
}, o, !!b];
|
|
833
833
|
}
|
|
834
834
|
function Ra(e, o, t, n, r, l, i, s, c, a) {
|
|
835
|
-
const u = Co(e), d =
|
|
835
|
+
const u = Co(e), d = q[n], h = fl(n, e);
|
|
836
836
|
n === 7 && (e = {
|
|
837
837
|
...e,
|
|
838
838
|
weeks: e.weeks + Math.trunc(e.days / 7)
|
|
839
839
|
});
|
|
840
840
|
const m = qn(e[d], r) * r;
|
|
841
841
|
h[d] = m;
|
|
842
|
-
const [f,
|
|
843
|
-
return h[d] = b, [h, w ?
|
|
842
|
+
const [f, g] = Ar(i, h, n, r * u, s, c, a), v = m + Er(o, f, g) * u * r, b = xo(v, r, l), w = Math.sign(b - v) === u;
|
|
843
|
+
return h[d] = b, [h, w ? g : f, w];
|
|
844
844
|
}
|
|
845
845
|
function N0(e, o, t, n) {
|
|
846
846
|
const [r, l, i, s] = ((a) => {
|
|
@@ -849,8 +849,8 @@ function N0(e, o, t, n) {
|
|
|
849
849
|
})(n), c = r !== void 0;
|
|
850
850
|
return ((a, u, d, h, m, f) => {
|
|
851
851
|
d = a0(d, m, h, 1);
|
|
852
|
-
const
|
|
853
|
-
return $r(St(d,
|
|
852
|
+
const g = u.N(d);
|
|
853
|
+
return $r(St(d, g), f) + (a ? hn(Wn(g)) : "Z");
|
|
854
854
|
})(c, o(c ? e(r) : it), t.epochNanoseconds, l, i, s);
|
|
855
855
|
}
|
|
856
856
|
function A0(e, o, t) {
|
|
@@ -859,10 +859,10 @@ function A0(e, o, t) {
|
|
|
859
859
|
const u = Tl(a), d = Qi(a), h = D1(a), m = bn(a, 4), f = Tn(a, 4);
|
|
860
860
|
return [u, P1(a), h, m, ...Ji(f, d)];
|
|
861
861
|
})(t);
|
|
862
|
-
return ((a, u, d, h, m, f,
|
|
862
|
+
return ((a, u, d, h, m, f, g, v, b, w) => {
|
|
863
863
|
h = a0(h, b, v, 1);
|
|
864
864
|
const Z = a(d).N(h);
|
|
865
|
-
return $r(St(h, Z), w) + hn(Wn(Z),
|
|
865
|
+
return $r(St(h, Z), w) + hn(Wn(Z), g) + ((p, T) => T !== 1 ? "[" + (T === 2 ? "!" : "") + p + "]" : "")(d, f) + Yr(u, m);
|
|
866
866
|
})(e, o.calendar, o.timeZone, o.epochNanoseconds, n, r, l, i, s, c);
|
|
867
867
|
}
|
|
868
868
|
function E0(e, o) {
|
|
@@ -891,7 +891,7 @@ function Dn(e, o) {
|
|
|
891
891
|
...e,
|
|
892
892
|
...Ba(e, n, t)
|
|
893
893
|
}), ((l, i) => {
|
|
894
|
-
const { sign: s } = l, c = s === -1 ? be(l) : l, { hours: a, minutes: u } = c, [d, h] = Tr(
|
|
894
|
+
const { sign: s } = l, c = s === -1 ? be(l) : l, { hours: a, minutes: u } = c, [d, h] = Tr(de(c, 3), qe, Ao);
|
|
895
895
|
ms(d);
|
|
896
896
|
const m = Br(h, i), f = i >= 0 || !s || m;
|
|
897
897
|
return (s < 0 ? "-" : "") + "P" + Gl({
|
|
@@ -907,8 +907,8 @@ function Dn(e, o) {
|
|
|
907
907
|
})(e, r);
|
|
908
908
|
}
|
|
909
909
|
function ss(e, o, t, n) {
|
|
910
|
-
const r = n > 1 || n === 0 && e !==
|
|
911
|
-
return n === 1 ? e ===
|
|
910
|
+
const r = n > 1 || n === 0 && e !== X;
|
|
911
|
+
return n === 1 ? e === X ? o(t) : _n(t) : r ? _n(t) + us(e, n === 2) : o(t);
|
|
912
912
|
}
|
|
913
913
|
function Gl(e) {
|
|
914
914
|
const o = [];
|
|
@@ -942,7 +942,7 @@ function hn(e, o = 0) {
|
|
|
942
942
|
return ds(e) + We(t) + ":" + We(r) + (i || s ? ":" + We(i) + Br(s) : "");
|
|
943
943
|
}
|
|
944
944
|
function Yr(e, o) {
|
|
945
|
-
return o !== 1 && (o > 1 || o === 0 && e !==
|
|
945
|
+
return o !== 1 && (o > 1 || o === 0 && e !== X) ? us(e, o === 2) : "";
|
|
946
946
|
}
|
|
947
947
|
function us(e, o) {
|
|
948
948
|
return "[" + (o ? "!" : "") + "u-ca=" + e + "]";
|
|
@@ -973,11 +973,11 @@ function Dt(e, o, t, n = 0, r = 0, l, i) {
|
|
|
973
973
|
const s = e.v(o);
|
|
974
974
|
if (t !== void 0 && n !== 3) {
|
|
975
975
|
const c = ((a, u, d, h) => {
|
|
976
|
-
const m =
|
|
976
|
+
const m = ue(u);
|
|
977
977
|
h && (d = Wn(d));
|
|
978
978
|
for (const f of a) {
|
|
979
|
-
let
|
|
980
|
-
if (h && (
|
|
979
|
+
let g = Qe(Je(f, m));
|
|
980
|
+
if (h && (g = Wn(g)), g === d)
|
|
981
981
|
return f;
|
|
982
982
|
}
|
|
983
983
|
})(s, o, t, l);
|
|
@@ -986,7 +986,7 @@ function Dt(e, o, t, n = 0, r = 0, l, i) {
|
|
|
986
986
|
if (n === 0)
|
|
987
987
|
throw new RangeError(Xu);
|
|
988
988
|
}
|
|
989
|
-
return i ?
|
|
989
|
+
return i ? ue(o) : mn(e, o, r, s);
|
|
990
990
|
}
|
|
991
991
|
function mn(e, o, t = 0, n = e.v(o)) {
|
|
992
992
|
if (n.length === 1)
|
|
@@ -995,13 +995,13 @@ function mn(e, o, t = 0, n = e.v(o)) {
|
|
|
995
995
|
throw new RangeError(Hu);
|
|
996
996
|
if (n.length)
|
|
997
997
|
return n[t === 3 ? 1 : 0];
|
|
998
|
-
const r =
|
|
999
|
-
const a = s.N(qo(c, -
|
|
998
|
+
const r = ue(o), l = ((s, c) => {
|
|
999
|
+
const a = s.N(qo(c, -Q));
|
|
1000
1000
|
return ((u) => {
|
|
1001
|
-
if (u >
|
|
1001
|
+
if (u > Q)
|
|
1002
1002
|
throw new RangeError(Uu);
|
|
1003
1003
|
return u;
|
|
1004
|
-
})(s.N(qo(c,
|
|
1004
|
+
})(s.N(qo(c, Q)) - a);
|
|
1005
1005
|
})(e, r), i = l * (t === 2 ? -1 : 1);
|
|
1006
1006
|
return (n = e.v(St(r, i)))[t === 2 ? 0 : n.length - 1];
|
|
1007
1007
|
}
|
|
@@ -1009,14 +1009,14 @@ function $o(e, o) {
|
|
|
1009
1009
|
const t = e.v(o);
|
|
1010
1010
|
if (t.length)
|
|
1011
1011
|
return t[0];
|
|
1012
|
-
const n = qo(
|
|
1012
|
+
const n = qo(ue(o), -Q);
|
|
1013
1013
|
return e.l(n, 1);
|
|
1014
1014
|
}
|
|
1015
1015
|
function ql(e, o, t) {
|
|
1016
1016
|
return wo(oo(Zt(o.epochNanoseconds, ((n) => {
|
|
1017
1017
|
if (fs(n))
|
|
1018
1018
|
throw new RangeError(Gu);
|
|
1019
|
-
return
|
|
1019
|
+
return de(n, 5);
|
|
1020
1020
|
})(e ? be(t) : t))));
|
|
1021
1021
|
}
|
|
1022
1022
|
function Jl(e, o, t, n, r, l = /* @__PURE__ */ Object.create(null)) {
|
|
@@ -1038,7 +1038,7 @@ function oi(e, o, t, n, r) {
|
|
|
1038
1038
|
const l = t.calendar, i = e(l);
|
|
1039
1039
|
let s = _e(Qt(i, t));
|
|
1040
1040
|
o && (n = Wr(n)), n.sign < 0 && (s = i.P(s, {
|
|
1041
|
-
...
|
|
1041
|
+
...he,
|
|
1042
1042
|
months: 1
|
|
1043
1043
|
}), s = tt(s, -1));
|
|
1044
1044
|
const c = i.P(s, n, r);
|
|
@@ -1048,7 +1048,7 @@ function ti(e, o, t) {
|
|
|
1048
1048
|
return no(hs(o, e ? be(t) : t)[0]);
|
|
1049
1049
|
}
|
|
1050
1050
|
function Cr(e, o, t, n, r) {
|
|
1051
|
-
const l =
|
|
1051
|
+
const l = de(n, 5);
|
|
1052
1052
|
let i = t.epochNanoseconds;
|
|
1053
1053
|
if (fs(n)) {
|
|
1054
1054
|
const s = Ye(t, e);
|
|
@@ -1060,7 +1060,7 @@ function Cr(e, o, t, n, r) {
|
|
|
1060
1060
|
...je(Xe, s)
|
|
1061
1061
|
}), l);
|
|
1062
1062
|
} else
|
|
1063
|
-
i = Zt(i, l),
|
|
1063
|
+
i = Zt(i, l), G(r);
|
|
1064
1064
|
return {
|
|
1065
1065
|
epochNanoseconds: oo(i)
|
|
1066
1066
|
};
|
|
@@ -1079,21 +1079,21 @@ function Fr(e, o, t, n) {
|
|
|
1079
1079
|
function c0(e, o, t, n) {
|
|
1080
1080
|
if (t.years || t.months || t.weeks)
|
|
1081
1081
|
return e.P(o, t, n);
|
|
1082
|
-
|
|
1083
|
-
const r = t.days +
|
|
1082
|
+
G(n);
|
|
1083
|
+
const r = t.days + de(t, 5)[0];
|
|
1084
1084
|
return r ? _e(tt(o, r)) : o;
|
|
1085
1085
|
}
|
|
1086
1086
|
function Qt(e, o, t = 1) {
|
|
1087
1087
|
return tt(o, t - e.day(o));
|
|
1088
1088
|
}
|
|
1089
1089
|
function hs(e, o) {
|
|
1090
|
-
const [t, n] =
|
|
1090
|
+
const [t, n] = de(o, 5), [r, l] = Qn(Eo(e) + n);
|
|
1091
1091
|
return [r, t + l];
|
|
1092
1092
|
}
|
|
1093
1093
|
function _a(e, o, t) {
|
|
1094
|
-
const n =
|
|
1094
|
+
const n = G(t);
|
|
1095
1095
|
let r, { years: l, months: i, weeks: s, days: c } = o;
|
|
1096
|
-
if (c +=
|
|
1096
|
+
if (c += de(o, 5)[0], l || i)
|
|
1097
1097
|
r = ja(this, e, l, i, n);
|
|
1098
1098
|
else {
|
|
1099
1099
|
if (!s && !c)
|
|
@@ -1144,13 +1144,13 @@ function u0(e, o, t) {
|
|
|
1144
1144
|
}, n];
|
|
1145
1145
|
}
|
|
1146
1146
|
function Rr(e) {
|
|
1147
|
-
return e ? os :
|
|
1147
|
+
return e ? os : ue;
|
|
1148
1148
|
}
|
|
1149
1149
|
function d0(e) {
|
|
1150
|
-
return e ?
|
|
1150
|
+
return e ? H(Cr, e) : Fr;
|
|
1151
1151
|
}
|
|
1152
1152
|
function Or(e) {
|
|
1153
|
-
return e ?
|
|
1153
|
+
return e ? H(pc, e) : gc;
|
|
1154
1154
|
}
|
|
1155
1155
|
function kt(e) {
|
|
1156
1156
|
return e && e.epochNanoseconds;
|
|
@@ -1161,12 +1161,12 @@ function en(e, o) {
|
|
|
1161
1161
|
function ni(e, o, t, n, r, l, i) {
|
|
1162
1162
|
const s = e(to(i).relativeTo), c = Math.max(Jo(r), Jo(l));
|
|
1163
1163
|
if (en(c, s))
|
|
1164
|
-
return
|
|
1165
|
-
const Z = Zt(
|
|
1164
|
+
return le(nt(((g, v, b, w) => {
|
|
1165
|
+
const Z = Zt(de(g), de(v), w ? -1 : 1);
|
|
1166
1166
|
if (!Number.isFinite(Z[0]))
|
|
1167
1167
|
throw new RangeError(_o);
|
|
1168
1168
|
return {
|
|
1169
|
-
...
|
|
1169
|
+
...he,
|
|
1170
1170
|
...Nt(Z, b)
|
|
1171
1171
|
};
|
|
1172
1172
|
})(r, l, c, n)));
|
|
@@ -1174,7 +1174,7 @@ function ni(e, o, t, n, r, l, i) {
|
|
|
1174
1174
|
throw new RangeError(b0);
|
|
1175
1175
|
n && (l = be(l));
|
|
1176
1176
|
const [a, u, d] = u0(o, t, s), h = d0(d), m = Or(d), f = h(u, a, r);
|
|
1177
|
-
return
|
|
1177
|
+
return le(m(u, a, h(u, f, l), c));
|
|
1178
1178
|
}
|
|
1179
1179
|
function Xa(e, o, t, n, r) {
|
|
1180
1180
|
const l = Jo(n), [i, s, c, a, u] = ((y, k, L) => {
|
|
@@ -1191,10 +1191,10 @@ function Xa(e, o, t, n, r) {
|
|
|
1191
1191
|
return [I, D, S, M, P];
|
|
1192
1192
|
})(r, l, e), d = Math.max(l, i);
|
|
1193
1193
|
if (!u && d <= 6)
|
|
1194
|
-
return
|
|
1195
|
-
const S = s0(
|
|
1194
|
+
return le(nt(((y, k, L, I, P) => {
|
|
1195
|
+
const S = s0(de(y), L, I, P);
|
|
1196
1196
|
return {
|
|
1197
|
-
...
|
|
1197
|
+
...he,
|
|
1198
1198
|
...Nt(S, k)
|
|
1199
1199
|
};
|
|
1200
1200
|
})(n, i, s, c, a)));
|
|
@@ -1202,30 +1202,30 @@ function Xa(e, o, t, n, r) {
|
|
|
1202
1202
|
return n;
|
|
1203
1203
|
if (!u)
|
|
1204
1204
|
throw new RangeError(b0);
|
|
1205
|
-
const [h, m, f] = u0(o, t, u),
|
|
1205
|
+
const [h, m, f] = u0(o, t, u), g = Rr(f), v = d0(f), b = Or(f), w = v(m, h, n);
|
|
1206
1206
|
kt(u) || (Me(h), Me(w));
|
|
1207
1207
|
let Z = b(m, h, w, i);
|
|
1208
|
-
const
|
|
1209
|
-
if (
|
|
1208
|
+
const p = n.sign, T = Co(Z);
|
|
1209
|
+
if (p && T && p !== T)
|
|
1210
1210
|
throw new RangeError(xt);
|
|
1211
|
-
return Z = i0(Z,
|
|
1211
|
+
return Z = i0(Z, g(w), i, s, c, a, m, h, g, v), le(Z);
|
|
1212
1212
|
}
|
|
1213
1213
|
function Ha(e) {
|
|
1214
1214
|
return e.sign === -1 ? Wr(e) : e;
|
|
1215
1215
|
}
|
|
1216
1216
|
function Wr(e) {
|
|
1217
|
-
return
|
|
1217
|
+
return le(be(e));
|
|
1218
1218
|
}
|
|
1219
1219
|
function be(e) {
|
|
1220
1220
|
const o = {};
|
|
1221
|
-
for (const t of
|
|
1221
|
+
for (const t of q)
|
|
1222
1222
|
o[t] = -1 * e[t] || 0;
|
|
1223
1223
|
return o;
|
|
1224
1224
|
}
|
|
1225
1225
|
function za(e) {
|
|
1226
1226
|
return !e.sign;
|
|
1227
1227
|
}
|
|
1228
|
-
function Co(e, o =
|
|
1228
|
+
function Co(e, o = q) {
|
|
1229
1229
|
let t = 0;
|
|
1230
1230
|
for (const n of o) {
|
|
1231
1231
|
const r = Math.sign(e[n]);
|
|
@@ -1240,30 +1240,30 @@ function Co(e, o = G) {
|
|
|
1240
1240
|
function nt(e) {
|
|
1241
1241
|
for (const o of a1)
|
|
1242
1242
|
mo(o, e[o], -mi, mi, 1);
|
|
1243
|
-
return ms(Qe(
|
|
1243
|
+
return ms(Qe(de(e), qe)), e;
|
|
1244
1244
|
}
|
|
1245
1245
|
function ms(e) {
|
|
1246
1246
|
if (!Number.isSafeInteger(e))
|
|
1247
1247
|
throw new RangeError(zu);
|
|
1248
1248
|
}
|
|
1249
|
-
function
|
|
1250
|
-
return Yi(e, o,
|
|
1249
|
+
function de(e, o = 6) {
|
|
1250
|
+
return Yi(e, o, q);
|
|
1251
1251
|
}
|
|
1252
1252
|
function Nt(e, o = 6) {
|
|
1253
|
-
const [t, n] = e, r = Jn(n, o,
|
|
1254
|
-
if (r[
|
|
1253
|
+
const [t, n] = e, r = Jn(n, o, q);
|
|
1254
|
+
if (r[q[o]] += t * (Q / eo[o]), !Number.isFinite(r[q[o]]))
|
|
1255
1255
|
throw new RangeError(_o);
|
|
1256
1256
|
return r;
|
|
1257
1257
|
}
|
|
1258
1258
|
function h0(e, o = 5) {
|
|
1259
|
-
return Jn(e, o,
|
|
1259
|
+
return Jn(e, o, q);
|
|
1260
1260
|
}
|
|
1261
1261
|
function fs(e) {
|
|
1262
1262
|
return !!Co(e, d2);
|
|
1263
1263
|
}
|
|
1264
1264
|
function Jo(e) {
|
|
1265
1265
|
let o = 9;
|
|
1266
|
-
for (; o > 0 && !e[
|
|
1266
|
+
for (; o > 0 && !e[q[o]]; o--)
|
|
1267
1267
|
;
|
|
1268
1268
|
return o;
|
|
1269
1269
|
}
|
|
@@ -1289,7 +1289,7 @@ function Ga(e) {
|
|
|
1289
1289
|
return o.timeZone && Xr(o.timeZone, 1), wo(yr(o0(o), t));
|
|
1290
1290
|
}
|
|
1291
1291
|
function qa(e) {
|
|
1292
|
-
const o = Fo(
|
|
1292
|
+
const o = Fo(me(e));
|
|
1293
1293
|
if (!o)
|
|
1294
1294
|
throw new RangeError(Ie(e));
|
|
1295
1295
|
if (o.timeZone)
|
|
@@ -1299,7 +1299,7 @@ function qa(e) {
|
|
|
1299
1299
|
return vs(o);
|
|
1300
1300
|
}
|
|
1301
1301
|
function Ja(e, o) {
|
|
1302
|
-
const t = Fo(
|
|
1302
|
+
const t = Fo(me(e));
|
|
1303
1303
|
if (!t || !t.timeZone)
|
|
1304
1304
|
throw new RangeError(Ie(e));
|
|
1305
1305
|
const { offset: n } = t, r = n ? rt(n) : void 0, [, l, i] = t0(o);
|
|
@@ -1312,16 +1312,16 @@ function rt(e) {
|
|
|
1312
1312
|
return o;
|
|
1313
1313
|
}
|
|
1314
1314
|
function Qa(e) {
|
|
1315
|
-
const o = Fo(
|
|
1315
|
+
const o = Fo(me(e));
|
|
1316
1316
|
if (!o || o.C)
|
|
1317
1317
|
throw new RangeError(Ie(e));
|
|
1318
1318
|
return Ue(gs(o));
|
|
1319
1319
|
}
|
|
1320
1320
|
function _r(e, o, t) {
|
|
1321
|
-
let n = Fo(
|
|
1321
|
+
let n = Fo(me(e));
|
|
1322
1322
|
if (!n || n.C)
|
|
1323
1323
|
throw new RangeError(Ie(e));
|
|
1324
|
-
return o ? n.calendar ===
|
|
1324
|
+
return o ? n.calendar === X && (n = n.isoYear === -271821 && n.isoMonth === 4 ? {
|
|
1325
1325
|
...n,
|
|
1326
1326
|
isoDay: 20,
|
|
1327
1327
|
...Pe
|
|
@@ -1329,24 +1329,24 @@ function _r(e, o, t) {
|
|
|
1329
1329
|
...n,
|
|
1330
1330
|
isoDay: 1,
|
|
1331
1331
|
...Pe
|
|
1332
|
-
}) : t && n.calendar ===
|
|
1332
|
+
}) : t && n.calendar === X && (n = {
|
|
1333
1333
|
...n,
|
|
1334
1334
|
isoYear: ho
|
|
1335
1335
|
}), To(n.k ? gs(n) : vs(n));
|
|
1336
1336
|
}
|
|
1337
1337
|
function ec(e, o) {
|
|
1338
|
-
const t = Vr(
|
|
1338
|
+
const t = Vr(me(o));
|
|
1339
1339
|
if (t)
|
|
1340
1340
|
return jr(t), Jt(br(ot(t)));
|
|
1341
1341
|
const n = _r(o, 1);
|
|
1342
1342
|
return Jt(Qt(e(n.calendar), n));
|
|
1343
1343
|
}
|
|
1344
1344
|
function jr(e) {
|
|
1345
|
-
if (e.calendar !==
|
|
1345
|
+
if (e.calendar !== X)
|
|
1346
1346
|
throw new RangeError(uo(e.calendar));
|
|
1347
1347
|
}
|
|
1348
1348
|
function oc(e, o) {
|
|
1349
|
-
const t = Ur(
|
|
1349
|
+
const t = Ur(me(o));
|
|
1350
1350
|
if (t)
|
|
1351
1351
|
return jr(t), On(ot(t));
|
|
1352
1352
|
const n = _r(o, 0, 1), { calendar: r } = n, l = e(r), [i, s, c] = l.u(n), [a, u] = l.m(i, s), [d, h] = l.R(a, u, c);
|
|
@@ -1356,7 +1356,7 @@ function tc(e) {
|
|
|
1356
1356
|
let o, t = ((n) => {
|
|
1357
1357
|
const r = O1.exec(n);
|
|
1358
1358
|
return r ? (m0(r[10]), bs(r)) : void 0;
|
|
1359
|
-
})(
|
|
1359
|
+
})(me(e));
|
|
1360
1360
|
if (!t) {
|
|
1361
1361
|
if (t = Fo(e), !t)
|
|
1362
1362
|
throw new RangeError(Ie(e));
|
|
@@ -1381,27 +1381,27 @@ function nc(e) {
|
|
|
1381
1381
|
if (h && ([m, c] = co(c, eo[h])), u !== void 0) {
|
|
1382
1382
|
if (s)
|
|
1383
1383
|
throw new RangeError(uo(u));
|
|
1384
|
-
f = ((
|
|
1385
|
-
const v = parseInt(
|
|
1384
|
+
f = ((g) => {
|
|
1385
|
+
const v = parseInt(g);
|
|
1386
1386
|
if (!Number.isFinite(v))
|
|
1387
|
-
throw new RangeError(uo(
|
|
1387
|
+
throw new RangeError(uo(g));
|
|
1388
1388
|
return v;
|
|
1389
1389
|
})(u), i = 1, d && (c = Hr(d) * (eo[h] / qe), s = 1);
|
|
1390
1390
|
}
|
|
1391
1391
|
return m + f;
|
|
1392
1392
|
}
|
|
1393
1393
|
let i = 0, s = 0, c = 0, a = {
|
|
1394
|
-
...It(
|
|
1395
|
-
...Jn(c, 2,
|
|
1394
|
+
...It(q, [l(r[2]), l(r[3]), l(r[4]), l(r[5]), l(r[6], r[7], 5), l(r[8], r[9], 4), l(r[10], r[11], 3)]),
|
|
1395
|
+
...Jn(c, 2, q)
|
|
1396
1396
|
};
|
|
1397
1397
|
if (!i)
|
|
1398
|
-
throw new RangeError(zs(
|
|
1398
|
+
throw new RangeError(zs(q));
|
|
1399
1399
|
return zr(r[1]) < 0 && (a = be(a)), a;
|
|
1400
1400
|
})(n) : void 0;
|
|
1401
|
-
})(
|
|
1401
|
+
})(me(e));
|
|
1402
1402
|
if (!o)
|
|
1403
1403
|
throw new RangeError(Ie(e));
|
|
1404
|
-
return
|
|
1404
|
+
return le(nt(o));
|
|
1405
1405
|
}
|
|
1406
1406
|
function rc(e) {
|
|
1407
1407
|
const o = Fo(e) || Vr(e) || Ur(e);
|
|
@@ -1469,7 +1469,7 @@ function Xr(e, o) {
|
|
|
1469
1469
|
if (r && l)
|
|
1470
1470
|
throw new RangeError(uo(l));
|
|
1471
1471
|
return ((i) => {
|
|
1472
|
-
if (Math.abs(i) >=
|
|
1472
|
+
if (Math.abs(i) >= Q)
|
|
1473
1473
|
throw new RangeError(Vu);
|
|
1474
1474
|
return i;
|
|
1475
1475
|
})((Tt(n[2]) * Z0 + Tt(n[3]) * y0 + Tt(n[4]) * qe + Hr(n[5] || "")) * zr(n[1]));
|
|
@@ -1510,7 +1510,7 @@ function m0(e) {
|
|
|
1510
1510
|
throw new RangeError(uo(e));
|
|
1511
1511
|
return {
|
|
1512
1512
|
timeZone: t,
|
|
1513
|
-
calendar: n[0] ||
|
|
1513
|
+
calendar: n[0] || X
|
|
1514
1514
|
};
|
|
1515
1515
|
}
|
|
1516
1516
|
function Hr(e) {
|
|
@@ -1526,7 +1526,7 @@ function Tt(e) {
|
|
|
1526
1526
|
return e === void 0 ? 0 : parseInt(e);
|
|
1527
1527
|
}
|
|
1528
1528
|
function ic(e) {
|
|
1529
|
-
return Kr(
|
|
1529
|
+
return Kr(me(e));
|
|
1530
1530
|
}
|
|
1531
1531
|
function Kr(e) {
|
|
1532
1532
|
const o = Gr(e);
|
|
@@ -1554,10 +1554,10 @@ function Zs(e, o) {
|
|
|
1554
1554
|
}
|
|
1555
1555
|
function sc(e, o, t, n, r, l) {
|
|
1556
1556
|
const i = e(to(l).relativeTo), s = Math.max(Jo(n), Jo(r));
|
|
1557
|
-
if (xi(
|
|
1557
|
+
if (xi(q, n, r))
|
|
1558
1558
|
return 0;
|
|
1559
1559
|
if (en(s, i))
|
|
1560
|
-
return xe(
|
|
1560
|
+
return xe(de(n), de(r));
|
|
1561
1561
|
if (!i)
|
|
1562
1562
|
throw new RangeError(b0);
|
|
1563
1563
|
const [c, a, u] = u0(o, t, i), d = Rr(u), h = d0(u);
|
|
@@ -1603,7 +1603,7 @@ function Is(e, o) {
|
|
|
1603
1603
|
}
|
|
1604
1604
|
function ii(e, o, t, n) {
|
|
1605
1605
|
const r = Pt(e, n, 3, 5), l = f0(o.epochNanoseconds, t.epochNanoseconds, ...r);
|
|
1606
|
-
return
|
|
1606
|
+
return le(e ? be(l) : l);
|
|
1607
1607
|
}
|
|
1608
1608
|
function si(e, o, t, n, r, l) {
|
|
1609
1609
|
const i = g0(n.calendar, r.calendar), [s, c, a, u] = Pt(t, l, 5), d = n.epochNanoseconds, h = r.epochNanoseconds, m = xe(h, d);
|
|
@@ -1612,26 +1612,26 @@ function si(e, o, t, n, r, l) {
|
|
|
1612
1612
|
if (s < 6)
|
|
1613
1613
|
f = f0(d, h, s, c, a, u);
|
|
1614
1614
|
else {
|
|
1615
|
-
const
|
|
1616
|
-
f = Ss(v,
|
|
1615
|
+
const g = o(yc(n.timeZone, r.timeZone)), v = e(i);
|
|
1616
|
+
f = Ss(v, g, n, r, m, s, l), f = i0(f, h, s, c, a, u, v, n, os, H(Cr, g));
|
|
1617
1617
|
}
|
|
1618
1618
|
else
|
|
1619
|
-
f =
|
|
1620
|
-
return
|
|
1619
|
+
f = he;
|
|
1620
|
+
return le(t ? be(f) : f);
|
|
1621
1621
|
}
|
|
1622
1622
|
function ai(e, o, t, n, r) {
|
|
1623
|
-
const l = g0(t.calendar, n.calendar), [i, s, c, a] = Pt(o, r, 6), u =
|
|
1623
|
+
const l = g0(t.calendar, n.calendar), [i, s, c, a] = Pt(o, r, 6), u = ue(t), d = ue(n), h = xe(d, u);
|
|
1624
1624
|
let m;
|
|
1625
1625
|
if (h)
|
|
1626
1626
|
if (i <= 6)
|
|
1627
1627
|
m = f0(u, d, i, s, c, a);
|
|
1628
1628
|
else {
|
|
1629
1629
|
const f = e(l);
|
|
1630
|
-
m = Ms(f, t, n, h, i, r), m = i0(m, d, i, s, c, a, f, t,
|
|
1630
|
+
m = Ms(f, t, n, h, i, r), m = i0(m, d, i, s, c, a, f, t, ue, Fr);
|
|
1631
1631
|
}
|
|
1632
1632
|
else
|
|
1633
|
-
m =
|
|
1634
|
-
return
|
|
1633
|
+
m = he;
|
|
1634
|
+
return le(o ? be(m) : m);
|
|
1635
1635
|
}
|
|
1636
1636
|
function ci(e, o, t, n, r) {
|
|
1637
1637
|
const l = g0(t.calendar, n.calendar);
|
|
@@ -1639,10 +1639,10 @@ function ci(e, o, t, n, r) {
|
|
|
1639
1639
|
}
|
|
1640
1640
|
function ui(e, o, t, n, r) {
|
|
1641
1641
|
const l = g0(t.calendar, n.calendar), i = Pt(o, r, 9, 9, 8), s = e(l), c = Qt(s, t), a = Qt(s, n);
|
|
1642
|
-
return c.isoYear === a.isoYear && c.isoMonth === a.isoMonth && c.isoDay === a.isoDay ?
|
|
1642
|
+
return c.isoYear === a.isoYear && c.isoMonth === a.isoMonth && c.isoDay === a.isoDay ? le(he) : Ls(o, (() => s), _e(c), _e(a), ...i, 8);
|
|
1643
1643
|
}
|
|
1644
1644
|
function Ls(e, o, t, n, r, l, i, s, c = 6) {
|
|
1645
|
-
const a =
|
|
1645
|
+
const a = ue(t), u = ue(n);
|
|
1646
1646
|
if (a === void 0 || u === void 0)
|
|
1647
1647
|
throw new RangeError(_o);
|
|
1648
1648
|
let d;
|
|
@@ -1651,33 +1651,33 @@ function Ls(e, o, t, n, r, l, i, s, c = 6) {
|
|
|
1651
1651
|
d = f0(a, u, r, l, i, s);
|
|
1652
1652
|
else {
|
|
1653
1653
|
const h = o();
|
|
1654
|
-
d = h.h(t, n, r), l === c && i === 1 || (d = i0(d, u, r, l, i, s, h, t,
|
|
1654
|
+
d = h.h(t, n, r), l === c && i === 1 || (d = i0(d, u, r, l, i, s, h, t, ue, c0));
|
|
1655
1655
|
}
|
|
1656
1656
|
else
|
|
1657
|
-
d =
|
|
1658
|
-
return
|
|
1657
|
+
d = he;
|
|
1658
|
+
return le(e ? be(d) : d);
|
|
1659
1659
|
}
|
|
1660
1660
|
function di(e, o, t, n) {
|
|
1661
1661
|
const [r, l, i, s] = Pt(e, n, 5, 5), c = xo(Jr(o, t), dn(l, i), s), a = {
|
|
1662
|
-
...
|
|
1662
|
+
...he,
|
|
1663
1663
|
...h0(c, r)
|
|
1664
1664
|
};
|
|
1665
|
-
return
|
|
1665
|
+
return le(e ? be(a) : a);
|
|
1666
1666
|
}
|
|
1667
1667
|
function pc(e, o, t, n, r, l) {
|
|
1668
1668
|
const i = xe(n.epochNanoseconds, t.epochNanoseconds);
|
|
1669
|
-
return i ? r < 6 ? Ps(t.epochNanoseconds, n.epochNanoseconds, r) : Ss(o, e, t, n, i, r, l) :
|
|
1669
|
+
return i ? r < 6 ? Ps(t.epochNanoseconds, n.epochNanoseconds, r) : Ss(o, e, t, n, i, r, l) : he;
|
|
1670
1670
|
}
|
|
1671
1671
|
function gc(e, o, t, n, r) {
|
|
1672
|
-
const l =
|
|
1673
|
-
return s ? n <= 6 ? Ps(l, i, n) : Ms(e, o, t, s, n, r) :
|
|
1672
|
+
const l = ue(o), i = ue(t), s = xe(i, l);
|
|
1673
|
+
return s ? n <= 6 ? Ps(l, i, n) : Ms(e, o, t, s, n, r) : he;
|
|
1674
1674
|
}
|
|
1675
1675
|
function Ss(e, o, t, n, r, l, i) {
|
|
1676
1676
|
const [s, c, a] = vc(o, t, n, r);
|
|
1677
1677
|
var u, d;
|
|
1678
1678
|
return {
|
|
1679
1679
|
...l === 6 ? (u = s, d = c, {
|
|
1680
|
-
...
|
|
1680
|
+
...he,
|
|
1681
1681
|
days: Ds(u, d)
|
|
1682
1682
|
}) : e.h(s, c, l, i),
|
|
1683
1683
|
...h0(a)
|
|
@@ -1686,7 +1686,7 @@ function Ss(e, o, t, n, r, l, i) {
|
|
|
1686
1686
|
function Ms(e, o, t, n, r, l) {
|
|
1687
1687
|
const [i, s, c] = ((a, u, d) => {
|
|
1688
1688
|
let h = u, m = Jr(a, u);
|
|
1689
|
-
return Math.sign(m) === -d && (h = tt(u, -d), m +=
|
|
1689
|
+
return Math.sign(m) === -d && (h = tt(u, -d), m += Q * d), [a, h, m];
|
|
1690
1690
|
})(o, t, n);
|
|
1691
1691
|
return {
|
|
1692
1692
|
...e.h(i, s, r, l),
|
|
@@ -1711,13 +1711,13 @@ function vc(e, o, t, n) {
|
|
|
1711
1711
|
}
|
|
1712
1712
|
function f0(e, o, t, n, r, l) {
|
|
1713
1713
|
return {
|
|
1714
|
-
...
|
|
1714
|
+
...he,
|
|
1715
1715
|
...Nt(s0(Je(e, o), n, r, l), t)
|
|
1716
1716
|
};
|
|
1717
1717
|
}
|
|
1718
1718
|
function Ps(e, o, t) {
|
|
1719
1719
|
return {
|
|
1720
|
-
...
|
|
1720
|
+
...he,
|
|
1721
1721
|
...Nt(Je(e, o), t)
|
|
1722
1722
|
};
|
|
1723
1723
|
}
|
|
@@ -1740,33 +1740,33 @@ function wc(e, o, t) {
|
|
|
1740
1740
|
...Pe
|
|
1741
1741
|
});
|
|
1742
1742
|
return t === 7 && ([c, a] = Ao(a, 7)), {
|
|
1743
|
-
...
|
|
1743
|
+
...he,
|
|
1744
1744
|
weeks: c,
|
|
1745
1745
|
days: a
|
|
1746
1746
|
};
|
|
1747
1747
|
}
|
|
1748
1748
|
const n = this.u(e), r = this.u(o);
|
|
1749
1749
|
let [l, i, s] = ((c, a, u, d, h, m, f) => {
|
|
1750
|
-
let
|
|
1751
|
-
if (
|
|
1752
|
-
const w = Math.sign(
|
|
1753
|
-
let Z = c.B(h, m),
|
|
1750
|
+
let g = h - a, v = m - u, b = f - d;
|
|
1751
|
+
if (g || v) {
|
|
1752
|
+
const w = Math.sign(g || v);
|
|
1753
|
+
let Z = c.B(h, m), p = 0;
|
|
1754
1754
|
if (Math.sign(b) === -w) {
|
|
1755
1755
|
const T = Z;
|
|
1756
|
-
[h, m] = c.p(h, m, -w),
|
|
1756
|
+
[h, m] = c.p(h, m, -w), g = h - a, v = m - u, Z = c.B(h, m), p = w < 0 ? -T : Z;
|
|
1757
1757
|
}
|
|
1758
|
-
if (b = f - Math.min(d, Z) +
|
|
1758
|
+
if (b = f - Math.min(d, Z) + p, g) {
|
|
1759
1759
|
const [T, y] = c.m(a, u), [k, L] = c.m(h, m);
|
|
1760
1760
|
if (v = k - T || Number(L) - Number(y), Math.sign(v) === -w) {
|
|
1761
1761
|
const I = w < 0 && -c.O(h);
|
|
1762
|
-
|
|
1762
|
+
g = (h -= w) - a, v = m - v0(T, y, c.F(h)) + (I || c.O(h));
|
|
1763
1763
|
}
|
|
1764
1764
|
}
|
|
1765
1765
|
}
|
|
1766
|
-
return [
|
|
1766
|
+
return [g, v, b];
|
|
1767
1767
|
})(this, ...n, ...r);
|
|
1768
1768
|
return t === 8 && (i += this.q(l, n[0]), l = 0), {
|
|
1769
|
-
...
|
|
1769
|
+
...he,
|
|
1770
1770
|
years: l,
|
|
1771
1771
|
months: i,
|
|
1772
1772
|
days: s
|
|
@@ -1843,7 +1843,7 @@ function xs(e) {
|
|
|
1843
1843
|
return r1[$s(e)];
|
|
1844
1844
|
}
|
|
1845
1845
|
function $s(e) {
|
|
1846
|
-
return Qo(e.id ||
|
|
1846
|
+
return Qo(e.id || X);
|
|
1847
1847
|
}
|
|
1848
1848
|
function Sc(e) {
|
|
1849
1849
|
function o(r) {
|
|
@@ -1994,10 +1994,10 @@ function hi(e, o) {
|
|
|
1994
1994
|
return Object.keys(e.J(o).X);
|
|
1995
1995
|
}
|
|
1996
1996
|
function pn(e) {
|
|
1997
|
-
return T0(
|
|
1997
|
+
return T0(me(e));
|
|
1998
1998
|
}
|
|
1999
1999
|
function T0(e) {
|
|
2000
|
-
if ((e = e.toLowerCase()) !==
|
|
2000
|
+
if ((e = e.toLowerCase()) !== X && e !== Yt) {
|
|
2001
2001
|
const o = Pl(e).resolvedOptions().calendar;
|
|
2002
2002
|
if (Qo(e) !== Qo(o))
|
|
2003
2003
|
throw new RangeError(qs(e));
|
|
@@ -2009,7 +2009,7 @@ function Qo(e) {
|
|
|
2009
2009
|
return e === "islamicc" && (e = "islamic"), e.split("-")[0];
|
|
2010
2010
|
}
|
|
2011
2011
|
function Os(e, o) {
|
|
2012
|
-
return (t) => t ===
|
|
2012
|
+
return (t) => t === X ? e : t === Yt || t === Yo ? Object.assign(Object.create(e), {
|
|
2013
2013
|
id: t
|
|
2014
2014
|
}) : Object.assign(Object.create(o), z1(t));
|
|
2015
2015
|
}
|
|
@@ -2038,7 +2038,7 @@ function $c(e, o, t, n, r, l) {
|
|
|
2038
2038
|
}, i.offset !== void 0 ? rt(i.offset) : void 0, a, u), s, n);
|
|
2039
2039
|
}
|
|
2040
2040
|
function Yc(e, o, t) {
|
|
2041
|
-
const n = Ro(e, o, Zo, [], yo), r =
|
|
2041
|
+
const n = Ro(e, o, Zo, [], yo), r = G(t);
|
|
2042
2042
|
return Ue(Me({
|
|
2043
2043
|
...e.ee(n, l0(r)),
|
|
2044
2044
|
...gn(n, r)
|
|
@@ -2057,12 +2057,12 @@ function Fc(e, o, t, n) {
|
|
|
2057
2057
|
return o && r.month !== void 0 && r.monthCode === void 0 && r.year === void 0 && (r.year = ho), e.te(r, n);
|
|
2058
2058
|
}
|
|
2059
2059
|
function Rc(e, o) {
|
|
2060
|
-
return no(gn($e(e, Q0, [], 1),
|
|
2060
|
+
return no(gn($e(e, Q0, [], 1), G(o)));
|
|
2061
2061
|
}
|
|
2062
2062
|
function Oc(e) {
|
|
2063
2063
|
const o = $e(e, hl);
|
|
2064
|
-
return
|
|
2065
|
-
...
|
|
2064
|
+
return le(nt({
|
|
2065
|
+
...he,
|
|
2066
2066
|
...o
|
|
2067
2067
|
}));
|
|
2068
2068
|
}
|
|
@@ -2099,7 +2099,7 @@ function gn(e, o) {
|
|
|
2099
2099
|
}
|
|
2100
2100
|
function Wc(e, o, t, n, r) {
|
|
2101
2101
|
const { calendar: l, timeZone: i } = t, s = e(l), c = o(i), a = [...s.fields(Zo), ...r2].sort(), u = ((b) => {
|
|
2102
|
-
const w = Ye(b, W), Z = hn(w.offsetNanoseconds),
|
|
2102
|
+
const w = Ye(b, W), Z = hn(w.offsetNanoseconds), p = L0(b.calendar), [T, y, k] = p.u(w), [L, I] = p.m(T, y), P = fn(L, I);
|
|
2103
2103
|
return {
|
|
2104
2104
|
...ad(w),
|
|
2105
2105
|
year: T,
|
|
@@ -2110,11 +2110,11 @@ function Wc(e, o, t, n, r) {
|
|
|
2110
2110
|
})(t), d = $e(n, a), h = s.oe(u, d), m = {
|
|
2111
2111
|
...u,
|
|
2112
2112
|
...d
|
|
2113
|
-
}, [f,
|
|
2113
|
+
}, [f, g, v] = t0(r, 2);
|
|
2114
2114
|
return Ve(Dt(c, {
|
|
2115
2115
|
...s.ee(h, l0(f)),
|
|
2116
2116
|
...Mt(Dl(m), f)
|
|
2117
|
-
}, rt(m.offset),
|
|
2117
|
+
}, rt(m.offset), g, v), i, l);
|
|
2118
2118
|
}
|
|
2119
2119
|
function _c(e, o, t, n) {
|
|
2120
2120
|
const r = e(o.calendar), l = [...r.fields(Zo), ...yo].sort(), i = {
|
|
@@ -2127,7 +2127,7 @@ function _c(e, o, t, n) {
|
|
|
2127
2127
|
nanosecond: s.isoNanosecond
|
|
2128
2128
|
};
|
|
2129
2129
|
var s;
|
|
2130
|
-
const c = $e(t, l), a =
|
|
2130
|
+
const c = $e(t, l), a = G(n), u = r.oe(i, c), d = {
|
|
2131
2131
|
...i,
|
|
2132
2132
|
...c
|
|
2133
2133
|
};
|
|
@@ -2152,9 +2152,9 @@ function Vc(e, o, t, n) {
|
|
|
2152
2152
|
}
|
|
2153
2153
|
function Uc(e, o, t, n) {
|
|
2154
2154
|
const r = e(o.calendar), l = r.fields(Zo).sort(), i = ((a) => {
|
|
2155
|
-
const u = L0(a.calendar), [d, h, m] = u.u(a), [f,
|
|
2155
|
+
const u = L0(a.calendar), [d, h, m] = u.u(a), [f, g] = u.m(d, h);
|
|
2156
2156
|
return {
|
|
2157
|
-
monthCode: fn(f,
|
|
2157
|
+
monthCode: fn(f, g),
|
|
2158
2158
|
day: m
|
|
2159
2159
|
};
|
|
2160
2160
|
})(o), s = $e(t, l), c = r.oe(i, s);
|
|
@@ -2164,10 +2164,10 @@ function Xc(e, o, t) {
|
|
|
2164
2164
|
return no(((n, r, l) => gn({
|
|
2165
2165
|
...je(Q0, n),
|
|
2166
2166
|
...$e(r, Q0)
|
|
2167
|
-
},
|
|
2167
|
+
}, G(l)))(e, o, t));
|
|
2168
2168
|
}
|
|
2169
2169
|
function Hc(e, o) {
|
|
2170
|
-
return
|
|
2170
|
+
return le((t = e, n = o, nt({
|
|
2171
2171
|
...t,
|
|
2172
2172
|
...$e(n, hl)
|
|
2173
2173
|
})));
|
|
@@ -2187,15 +2187,15 @@ function Ws(e, o, t, n, r) {
|
|
|
2187
2187
|
return l = $e(l, [...t, ...r].sort(), []), e.ee(l);
|
|
2188
2188
|
}
|
|
2189
2189
|
function Gc(e, o) {
|
|
2190
|
-
const t =
|
|
2191
|
-
return To(_e(this.U(n, r, l)), this.id ||
|
|
2190
|
+
const t = G(o), n = nl(this, e), r = Un(this, e, n, t), l = K0(this, e, r, n, t);
|
|
2191
|
+
return To(_e(this.U(n, r, l)), this.id || X);
|
|
2192
2192
|
}
|
|
2193
2193
|
function qc(e, o) {
|
|
2194
|
-
const t =
|
|
2195
|
-
return Jt(br(this.U(n, r, 1)), this.id ||
|
|
2194
|
+
const t = G(o), n = nl(this, e), r = Un(this, e, n, t);
|
|
2195
|
+
return Jt(br(this.U(n, r, 1)), this.id || X);
|
|
2196
2196
|
}
|
|
2197
2197
|
function Jc(e, o) {
|
|
2198
|
-
const t =
|
|
2198
|
+
const t = G(o);
|
|
2199
2199
|
let n, r, l, i = e.eraYear !== void 0 || e.year !== void 0 ? nl(this, e) : void 0;
|
|
2200
2200
|
const s = !this.id;
|
|
2201
2201
|
if (i === void 0 && s && (i = ho), i !== void 0) {
|
|
@@ -2222,7 +2222,7 @@ function Jc(e, o) {
|
|
|
2222
2222
|
if (!c)
|
|
2223
2223
|
throw new RangeError("Cannot guess year");
|
|
2224
2224
|
const [a, u] = c;
|
|
2225
|
-
return On(_e(this.U(a, u, n)), this.id ||
|
|
2225
|
+
return On(_e(this.U(a, u, n)), this.id || X);
|
|
2226
2226
|
}
|
|
2227
2227
|
function Qc(e) {
|
|
2228
2228
|
return tl(this) && e.includes("year") ? [...e, ...sl] : e;
|
|
@@ -2257,11 +2257,11 @@ function Un(e, o, t, n) {
|
|
|
2257
2257
|
const d = s.F(a), [h, m] = el(c);
|
|
2258
2258
|
let f = v0(h, m, d);
|
|
2259
2259
|
if (m) {
|
|
2260
|
-
const
|
|
2261
|
-
if (
|
|
2260
|
+
const g = xs(s);
|
|
2261
|
+
if (g === void 0)
|
|
2262
2262
|
throw new RangeError(Rt);
|
|
2263
|
-
if (
|
|
2264
|
-
if (f >
|
|
2263
|
+
if (g > 0) {
|
|
2264
|
+
if (f > g)
|
|
2265
2265
|
throw new RangeError(Rt);
|
|
2266
2266
|
if (d === void 0) {
|
|
2267
2267
|
if (u === 1)
|
|
@@ -2269,7 +2269,7 @@ function Un(e, o, t, n) {
|
|
|
2269
2269
|
f--;
|
|
2270
2270
|
}
|
|
2271
2271
|
} else {
|
|
2272
|
-
if (f !== -
|
|
2272
|
+
if (f !== -g)
|
|
2273
2273
|
throw new RangeError(Rt);
|
|
2274
2274
|
if (d === void 0 && u === 1)
|
|
2275
2275
|
throw new RangeError(Rt);
|
|
@@ -2307,20 +2307,20 @@ function _s(e) {
|
|
|
2307
2307
|
function ou(e) {
|
|
2308
2308
|
return wo(oo(wr(pr(e))));
|
|
2309
2309
|
}
|
|
2310
|
-
function tu(e, o, t, n, r =
|
|
2310
|
+
function tu(e, o, t, n, r = X) {
|
|
2311
2311
|
return Ve(oo(wr(pr(t))), o(n), e(r));
|
|
2312
2312
|
}
|
|
2313
|
-
function nu(e, o, t, n, r = 0, l = 0, i = 0, s = 0, c = 0, a = 0, u =
|
|
2313
|
+
function nu(e, o, t, n, r = 0, l = 0, i = 0, s = 0, c = 0, a = 0, u = X) {
|
|
2314
2314
|
return Ue(Me(o0(fo(ge, It(k0, [o, t, n, r, l, i, s, c, a])))), e(u));
|
|
2315
2315
|
}
|
|
2316
|
-
function ru(e, o, t, n, r =
|
|
2316
|
+
function ru(e, o, t, n, r = X) {
|
|
2317
2317
|
return To(_e(ot(fo(ge, {
|
|
2318
2318
|
isoYear: o,
|
|
2319
2319
|
isoMonth: t,
|
|
2320
2320
|
isoDay: n
|
|
2321
2321
|
}))), e(r));
|
|
2322
2322
|
}
|
|
2323
|
-
function lu(e, o, t, n =
|
|
2323
|
+
function lu(e, o, t, n = X, r = 1) {
|
|
2324
2324
|
const l = ge(o), i = ge(t), s = e(n);
|
|
2325
2325
|
return Jt(br(ot({
|
|
2326
2326
|
isoYear: l,
|
|
@@ -2328,7 +2328,7 @@ function lu(e, o, t, n = V, r = 1) {
|
|
|
2328
2328
|
isoDay: ge(r)
|
|
2329
2329
|
})), s);
|
|
2330
2330
|
}
|
|
2331
|
-
function iu(e, o, t, n =
|
|
2331
|
+
function iu(e, o, t, n = X, r = ho) {
|
|
2332
2332
|
const l = ge(o), i = ge(t), s = e(n);
|
|
2333
2333
|
return On(_e(ot({
|
|
2334
2334
|
isoYear: ge(r),
|
|
@@ -2340,9 +2340,9 @@ function su(e = 0, o = 0, t = 0, n = 0, r = 0, l = 0) {
|
|
|
2340
2340
|
return no(Mt(fo(ge, It(Xe, [e, o, t, n, r, l])), 1));
|
|
2341
2341
|
}
|
|
2342
2342
|
function au(e = 0, o = 0, t = 0, n = 0, r = 0, l = 0, i = 0, s = 0, c = 0, a = 0) {
|
|
2343
|
-
return
|
|
2343
|
+
return le(nt(fo(gr, It(q, [e, o, t, n, r, l, i, s, c, a]))));
|
|
2344
2344
|
}
|
|
2345
|
-
function cu(e, o, t =
|
|
2345
|
+
function cu(e, o, t = X) {
|
|
2346
2346
|
return Ve(e.epochNanoseconds, o, t);
|
|
2347
2347
|
}
|
|
2348
2348
|
function uu(e) {
|
|
@@ -2436,13 +2436,13 @@ function Xs(e, o, t, n, r) {
|
|
|
2436
2436
|
}
|
|
2437
2437
|
function bu() {
|
|
2438
2438
|
return new Do(void 0, {
|
|
2439
|
-
calendar:
|
|
2440
|
-
}).resolvedOptions().calendar ===
|
|
2439
|
+
calendar: X
|
|
2440
|
+
}).resolvedOptions().calendar === X;
|
|
2441
2441
|
}
|
|
2442
2442
|
function yu(e, o, t) {
|
|
2443
2443
|
const [, n, r] = e;
|
|
2444
2444
|
return t.map(((l) => (l.calendar && ((i, s, c) => {
|
|
2445
|
-
if ((c || i !==
|
|
2445
|
+
if ((c || i !== X) && i !== s)
|
|
2446
2446
|
throw new RangeError(Js);
|
|
2447
2447
|
})(l.calendar, o.calendar, r), n(l, o))));
|
|
2448
2448
|
}
|
|
@@ -2482,7 +2482,7 @@ function G0() {
|
|
|
2482
2482
|
function Ft() {
|
|
2483
2483
|
return new Do().resolvedOptions().timeZone;
|
|
2484
2484
|
}
|
|
2485
|
-
const Lu = (e, o) => `Non-integer ${e}: ${o}`, Su = (e, o) => `Non-positive ${e}: ${o}`, Mu = (e, o) => `Non-finite ${e}: ${o}`, Pu = (e) => `Cannot convert bigint to ${e}`, Du = (e) => `Invalid bigint: ${e}`, Nu = "Cannot convert Symbol to string", Au = "Invalid object", Hs = (e, o, t, n, r) => r ? Hs(e, r[o], r[t], r[n]) : Wo(e, o) + `; must be between ${t}-${n}`, Wo = (e, o) => `Invalid ${e}: ${o}`, ll = (e) => `Missing ${e}`, Eu = (e) => `Invalid field ${e}`, xu = (e) => `Duplicate field ${e}`, zs = (e) => "No valid fields: " + e.join(), $u = "Invalid bag", Ks = (e, o, t) => Wo(e, o) + "; must be " + Object.keys(t).join(), Yu = "Cannot use valueOf", q0 = "Invalid calling context", Bu = "Forbidden era/eraYear", Cu = "Mismatching era/eraYear", Fu = "Mismatching year/eraYear", Ru = (e) => `Invalid era: ${e}`, Ou = (e) => "Missing year" + (e ? "/era/eraYear" : ""), Wu = (e) => `Invalid monthCode: ${e}`, _u = "Mismatching month/monthCode", Gs = "Missing month/monthCode", Rt = "Invalid leap month", xt = "Invalid protocol results", qs = (e) => Wo("Calendar", e), Js = "Mismatching Calendars", Qs = (e) => Wo("TimeZone", e), e2 = "Mismatching TimeZones", ju = "Forbidden ICU TimeZone", Vu = "Out-of-bounds offset", Uu = "Out-of-bounds TimeZone gap", Xu = "Invalid TimeZone offset", Hu = "Ambiguous offset", _o = "Out-of-bounds date", zu = "Out-of-bounds duration", Ku = "Cannot mix duration signs", b0 = "Missing relativeTo", Gu = "Cannot use large units", qu = "Required smallestUnit or largestUnit", Ju = "smallestUnit > largestUnit", Ie = (e) => `Cannot parse: ${e}`, uo = (e) => `Invalid substring: ${e}`, Qu = (e) => `Cannot format ${e}`, R0 = "Mismatching types for formatting", e1 = "Cannot specify TimeZone", o2 = /* @__PURE__ */
|
|
2485
|
+
const Lu = (e, o) => `Non-integer ${e}: ${o}`, Su = (e, o) => `Non-positive ${e}: ${o}`, Mu = (e, o) => `Non-finite ${e}: ${o}`, Pu = (e) => `Cannot convert bigint to ${e}`, Du = (e) => `Invalid bigint: ${e}`, Nu = "Cannot convert Symbol to string", Au = "Invalid object", Hs = (e, o, t, n, r) => r ? Hs(e, r[o], r[t], r[n]) : Wo(e, o) + `; must be between ${t}-${n}`, Wo = (e, o) => `Invalid ${e}: ${o}`, ll = (e) => `Missing ${e}`, Eu = (e) => `Invalid field ${e}`, xu = (e) => `Duplicate field ${e}`, zs = (e) => "No valid fields: " + e.join(), $u = "Invalid bag", Ks = (e, o, t) => Wo(e, o) + "; must be " + Object.keys(t).join(), Yu = "Cannot use valueOf", q0 = "Invalid calling context", Bu = "Forbidden era/eraYear", Cu = "Mismatching era/eraYear", Fu = "Mismatching year/eraYear", Ru = (e) => `Invalid era: ${e}`, Ou = (e) => "Missing year" + (e ? "/era/eraYear" : ""), Wu = (e) => `Invalid monthCode: ${e}`, _u = "Mismatching month/monthCode", Gs = "Missing month/monthCode", Rt = "Invalid leap month", xt = "Invalid protocol results", qs = (e) => Wo("Calendar", e), Js = "Mismatching Calendars", Qs = (e) => Wo("TimeZone", e), e2 = "Mismatching TimeZones", ju = "Forbidden ICU TimeZone", Vu = "Out-of-bounds offset", Uu = "Out-of-bounds TimeZone gap", Xu = "Invalid TimeZone offset", Hu = "Ambiguous offset", _o = "Out-of-bounds date", zu = "Out-of-bounds duration", Ku = "Cannot mix duration signs", b0 = "Missing relativeTo", Gu = "Cannot use large units", qu = "Required smallestUnit or largestUnit", Ju = "smallestUnit > largestUnit", Ie = (e) => `Cannot parse: ${e}`, uo = (e) => `Invalid substring: ${e}`, Qu = (e) => `Cannot format ${e}`, R0 = "Mismatching types for formatting", e1 = "Cannot specify TimeZone", o2 = /* @__PURE__ */ H(Gn, ((e, o) => o)), $t = /* @__PURE__ */ H(Gn, ((e, o, t) => t)), We = /* @__PURE__ */ H(Bn, 2), J0 = {
|
|
2486
2486
|
nanosecond: 0,
|
|
2487
2487
|
microsecond: 1,
|
|
2488
2488
|
millisecond: 2,
|
|
@@ -2493,7 +2493,7 @@ const Lu = (e, o) => `Non-integer ${e}: ${o}`, Su = (e, o) => `Non-positive ${e}
|
|
|
2493
2493
|
week: 7,
|
|
2494
2494
|
month: 8,
|
|
2495
2495
|
year: 9
|
|
2496
|
-
}, il = /* @__PURE__ */ Object.keys(J0), Se = 864e5, t2 = 1e3, vn = 1e3, bo = 1e6, qe = 1e9, y0 = 6e10, Z0 = 36e11,
|
|
2496
|
+
}, il = /* @__PURE__ */ Object.keys(J0), Se = 864e5, t2 = 1e3, vn = 1e3, bo = 1e6, qe = 1e9, y0 = 6e10, Z0 = 36e11, Q = 864e11, eo = [1, vn, bo, qe, y0, Z0, Q], yo = /* @__PURE__ */ il.slice(0, 6), Q0 = /* @__PURE__ */ cn(yo), o1 = ["offset"], n2 = ["timeZone"], r2 = /* @__PURE__ */ yo.concat(o1), l2 = /* @__PURE__ */ r2.concat(n2), sl = ["era", "eraYear"], t1 = /* @__PURE__ */ sl.concat(["year"]), al = ["year"], cl = ["monthCode"], ul = /* @__PURE__ */ ["month"].concat(cl), wn = ["day"], dl = /* @__PURE__ */ ul.concat(al), i2 = /* @__PURE__ */ cl.concat(al), Zo = /* @__PURE__ */ wn.concat(dl), n1 = /* @__PURE__ */ wn.concat(ul), s2 = /* @__PURE__ */ wn.concat(cl), a2 = /* @__PURE__ */ $t(yo, 0), X = "iso8601", Yt = "gregory", Yo = "japanese", c2 = {
|
|
2497
2497
|
[Yt]: {
|
|
2498
2498
|
"gregory-inverse": -1,
|
|
2499
2499
|
gregory: 0
|
|
@@ -2556,7 +2556,7 @@ const Lu = (e, o) => `Non-integer ${e}: ${o}`, Su = (e, o) => `Non-positive ${e}
|
|
|
2556
2556
|
chinese: 13,
|
|
2557
2557
|
dangi: 13,
|
|
2558
2558
|
hebrew: -6
|
|
2559
|
-
},
|
|
2559
|
+
}, me = /* @__PURE__ */ H(mr, "string"), l1 = /* @__PURE__ */ H(mr, "boolean"), i1 = /* @__PURE__ */ H(mr, "number"), q = /* @__PURE__ */ il.map(((e) => e + "s")), hl = /* @__PURE__ */ cn(q), s1 = /* @__PURE__ */ q.slice(0, 6), d2 = /* @__PURE__ */ q.slice(6), a1 = /* @__PURE__ */ d2.slice(1), c1 = /* @__PURE__ */ o2(q), he = /* @__PURE__ */ $t(q, 0), ml = /* @__PURE__ */ $t(s1, 0), fl = /* @__PURE__ */ H($i, q), Xe = ["isoNanosecond", "isoMicrosecond", "isoMillisecond", "isoSecond", "isoMinute", "isoHour"], pl = ["isoDay", "isoMonth", "isoYear"], k0 = /* @__PURE__ */ Xe.concat(pl), gl = /* @__PURE__ */ cn(pl), h2 = /* @__PURE__ */ cn(Xe), u1 = /* @__PURE__ */ cn(k0), Pe = /* @__PURE__ */ $t(h2, 0), d1 = /* @__PURE__ */ H($i, k0), vl = 1e8, wl = vl * Se, h1 = [vl, 0], m1 = [-vl, 0], tn = 275760, nn = -271821, Do = Intl.DateTimeFormat, f1 = 1970, ho = 1972, So = 12, p1 = /* @__PURE__ */ Lt(1868, 9, 8), g1 = /* @__PURE__ */ Ee(ka, WeakMap), Xn = "smallestUnit", er = "unit", v1 = "roundingMode", Ht = "roundingIncrement", O0 = "fractionalSecondDigits", m2 = "relativeTo", W0 = "direction", f2 = {
|
|
2560
2560
|
constrain: 0,
|
|
2561
2561
|
reject: 1
|
|
2562
2562
|
}, w1 = /* @__PURE__ */ Object.keys(f2), T1 = {
|
|
@@ -2594,7 +2594,7 @@ const Lu = (e, o) => `Non-integer ${e}: ${o}`, Su = (e, o) => `Non-positive ${e}
|
|
|
2594
2594
|
}, L1 = {
|
|
2595
2595
|
previous: -1,
|
|
2596
2596
|
next: 1
|
|
2597
|
-
}, Tn = /* @__PURE__ */
|
|
2597
|
+
}, Tn = /* @__PURE__ */ H(Dr, Xn), p2 = /* @__PURE__ */ H(Dr, "largestUnit"), S1 = /* @__PURE__ */ H(Dr, er), g2 = /* @__PURE__ */ H(Bo, "overflow", f2), v2 = /* @__PURE__ */ H(Bo, "disambiguation", T1), M1 = /* @__PURE__ */ H(Bo, "offset", b1), Tl = /* @__PURE__ */ H(Bo, "calendarName", y1), P1 = /* @__PURE__ */ H(Bo, "timeZoneName", Z1), D1 = /* @__PURE__ */ H(Bo, "offset", k1), bn = /* @__PURE__ */ H(Bo, v1, I1), bl = "PlainYearMonth", yl = "PlainMonthDay", yn = "PlainDate", Bt = "PlainDateTime", Zl = "PlainTime", jo = "ZonedDateTime", kl = "Instant", Il = "Duration", N1 = [Math.floor, (e) => Pn(e) ? Math.floor(e) : Math.round(e), Math.ceil, (e) => Pn(e) ? Math.ceil(e) : Math.round(e), Math.trunc, (e) => Pn(e) ? Math.trunc(e) || 0 : Math.round(e), (e) => e < 0 ? Math.floor(e) : Math.ceil(e), (e) => Math.sign(e) * Math.round(Math.abs(e)) || 0, (e) => Pn(e) ? (e = Math.trunc(e) || 0) + e % 2 : Math.round(e)], it = "UTC", xn = 5184e3, A1 = /* @__PURE__ */ Rn(1847), E1 = /* @__PURE__ */ Rn((() => {
|
|
2598
2598
|
const e = /* @__PURE__ */ new Date();
|
|
2599
2599
|
return (e.getTime() === 0 ? 2040 : e.getUTCFullYear()) + 10;
|
|
2600
2600
|
})()), x1 = /0+$/, Ye = /* @__PURE__ */ Ee(Wa, WeakMap), mi = 2 ** 32 - 1, W = /* @__PURE__ */ Ee(((e) => {
|
|
@@ -2610,7 +2610,7 @@ class $1 {
|
|
|
2610
2610
|
}
|
|
2611
2611
|
v(o) {
|
|
2612
2612
|
return ((t) => {
|
|
2613
|
-
const n =
|
|
2613
|
+
const n = ue({
|
|
2614
2614
|
...t,
|
|
2615
2615
|
...Pe
|
|
2616
2616
|
});
|
|
@@ -2631,8 +2631,8 @@ class Y1 {
|
|
|
2631
2631
|
function r(a, u, d, h) {
|
|
2632
2632
|
let m, f;
|
|
2633
2633
|
for (; (h === void 0 || (m = h < a[0] ? u : h >= a[1] ? d : void 0) === void 0) && (f = a[1] - a[0]); ) {
|
|
2634
|
-
const
|
|
2635
|
-
t(
|
|
2634
|
+
const g = a[0] + Math.floor(f / 2);
|
|
2635
|
+
t(g) === d ? a[1] = g : a[0] = g + 1;
|
|
2636
2636
|
}
|
|
2637
2637
|
return m;
|
|
2638
2638
|
}
|
|
@@ -2650,8 +2650,8 @@ class Y1 {
|
|
|
2650
2650
|
l(a, u) {
|
|
2651
2651
|
const d = qt(a, s, c);
|
|
2652
2652
|
let [h, m] = ri(d);
|
|
2653
|
-
const f = xn * u,
|
|
2654
|
-
for (;
|
|
2653
|
+
const f = xn * u, g = u < 0 ? () => m > s || (s = d, 0) : () => h < c || (c = d, 0);
|
|
2654
|
+
for (; g(); ) {
|
|
2655
2655
|
const v = l(h), b = l(m);
|
|
2656
2656
|
if (v !== b) {
|
|
2657
2657
|
const w = i(h, m);
|
|
@@ -2684,7 +2684,7 @@ class Y1 {
|
|
|
2684
2684
|
}
|
|
2685
2685
|
}
|
|
2686
2686
|
const Ll = "([+-])", $n = "(?:[.,](\\d{1,9}))?", w2 = `(?:(?:${Ll}(\\d{6}))|(\\d{4}))-?(\\d{2})`, Sl = "(\\d{2})(?::?(\\d{2})(?::?(\\d{2})" + $n + ")?)?", Ml = Ll + Sl, B1 = w2 + "-?(\\d{2})(?:[T ]" + Sl + "(Z|" + Ml + ")?)?", T2 = "\\[(!?)([^\\]]*)\\]", I0 = `((?:${T2}){0,9})`, C1 = /* @__PURE__ */ At(w2 + I0), F1 = /* @__PURE__ */ At("(?:--)?(\\d{2})-?(\\d{2})" + I0), R1 = /* @__PURE__ */ At(B1 + I0), O1 = /* @__PURE__ */ At("T?" + Sl + "(?:" + Ml + ")?" + I0), W1 = /* @__PURE__ */ At(Ml), _1 = /* @__PURE__ */ new RegExp(T2, "g"), j1 = /* @__PURE__ */ At(`${Ll}?P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(?:T(?:(\\d+)${$n}H)?(?:(\\d+)${$n}M)?(?:(\\d+)${$n}S)?)?`), V1 = /* @__PURE__ */ Ee(((e) => new Do("en", {
|
|
2687
|
-
calendar:
|
|
2687
|
+
calendar: X,
|
|
2688
2688
|
timeZone: e,
|
|
2689
2689
|
era: "short",
|
|
2690
2690
|
year: "numeric",
|
|
@@ -2743,8 +2743,8 @@ const Ll = "([+-])", $n = "(?:[.,](\\d{1,9}))?", w2 = `(?:(?:${Ll}(\\d{6}))|(\\d
|
|
|
2743
2743
|
return (7 - m < n ? 7 : 0) - m;
|
|
2744
2744
|
}
|
|
2745
2745
|
function t(m) {
|
|
2746
|
-
const f = Hi(h + m),
|
|
2747
|
-
return u = (f + (v - a) *
|
|
2746
|
+
const f = Hi(h + m), g = m || 1, v = o(Xt(c + f * g, 7));
|
|
2747
|
+
return u = (f + (v - a) * g) / 7;
|
|
2748
2748
|
}
|
|
2749
2749
|
const n = this.id ? 1 : 4, r = zi(e), l = this.dayOfYear(e), i = Xt(r - 1, 7), s = l - 1, c = Xt(i - s, 7), a = o(c);
|
|
2750
2750
|
let u, d = Math.floor((s - a) / 7) + 1, h = e.isoYear;
|
|
@@ -2818,12 +2818,12 @@ const Ll = "([+-])", $n = "(?:[.,](\\d{1,9}))?", w2 = `(?:(?:${Ll}(\\d{6}))|(\\d
|
|
|
2818
2818
|
return el(o), o;
|
|
2819
2819
|
},
|
|
2820
2820
|
day: Hl
|
|
2821
|
-
}, ld = /* @__PURE__ */ $t(yo, ge), id = /* @__PURE__ */ $t(
|
|
2821
|
+
}, ld = /* @__PURE__ */ $t(yo, ge), id = /* @__PURE__ */ $t(q, gr), sd = {
|
|
2822
2822
|
offset(e) {
|
|
2823
2823
|
const o = Cn(e);
|
|
2824
2824
|
return rt(o), o;
|
|
2825
2825
|
}
|
|
2826
|
-
}, fi = /* @__PURE__ */ Object.assign({}, rd, ld, id, sd), Dl = /* @__PURE__ */
|
|
2826
|
+
}, fi = /* @__PURE__ */ Object.assign({}, rd, ld, id, sd), Dl = /* @__PURE__ */ H(Ei, yo, Xe), ad = /* @__PURE__ */ H(Ei, Xe, yo), No = "numeric", Zn = ["timeZoneName"], y2 = {
|
|
2827
2827
|
month: No,
|
|
2828
2828
|
day: No
|
|
2829
2829
|
}, Nl = {
|
|
@@ -2889,7 +2889,7 @@ function or(e, o, t) {
|
|
|
2889
2889
|
});
|
|
2890
2890
|
}
|
|
2891
2891
|
function In(e) {
|
|
2892
|
-
return D2(e) ||
|
|
2892
|
+
return D2(e) || X;
|
|
2893
2893
|
}
|
|
2894
2894
|
function D2(e) {
|
|
2895
2895
|
const { calendar: o } = e;
|
|
@@ -2903,7 +2903,7 @@ function S0(e) {
|
|
|
2903
2903
|
throw new TypeError(qs(e));
|
|
2904
2904
|
return o;
|
|
2905
2905
|
}
|
|
2906
|
-
return ((o) => T0(rc(
|
|
2906
|
+
return ((o) => T0(rc(me(o))))(e);
|
|
2907
2907
|
}
|
|
2908
2908
|
function Cl(e) {
|
|
2909
2909
|
const o = {};
|
|
@@ -2924,9 +2924,9 @@ function Le(e) {
|
|
|
2924
2924
|
throw new TypeError(Qs(e));
|
|
2925
2925
|
return o;
|
|
2926
2926
|
}
|
|
2927
|
-
return ((o) => Kr(lc(
|
|
2927
|
+
return ((o) => Kr(lc(me(o))))(e);
|
|
2928
2928
|
}
|
|
2929
|
-
function
|
|
2929
|
+
function re(e) {
|
|
2930
2930
|
if (Te(e)) {
|
|
2931
2931
|
const o = ye(e);
|
|
2932
2932
|
return o && o.branding === Il ? o : Oc(e);
|
|
@@ -2958,16 +2958,16 @@ function Io(e, o) {
|
|
|
2958
2958
|
const n = ye(e) || {};
|
|
2959
2959
|
switch (n.branding) {
|
|
2960
2960
|
case Zl:
|
|
2961
|
-
return
|
|
2961
|
+
return G(o), n;
|
|
2962
2962
|
case Bt:
|
|
2963
|
-
return
|
|
2963
|
+
return G(o), no(n);
|
|
2964
2964
|
case jo:
|
|
2965
|
-
return
|
|
2965
|
+
return G(o), Us(W, n);
|
|
2966
2966
|
}
|
|
2967
2967
|
return Rc(e, o);
|
|
2968
2968
|
}
|
|
2969
2969
|
const t = tc(e);
|
|
2970
|
-
return
|
|
2970
|
+
return G(o), t;
|
|
2971
2971
|
}
|
|
2972
2972
|
function Fl(e) {
|
|
2973
2973
|
return e === void 0 ? void 0 : Io(e);
|
|
@@ -2977,54 +2977,54 @@ function ct(e, o) {
|
|
|
2977
2977
|
const n = ye(e) || {};
|
|
2978
2978
|
switch (n.branding) {
|
|
2979
2979
|
case Bt:
|
|
2980
|
-
return
|
|
2980
|
+
return G(o), n;
|
|
2981
2981
|
case yn:
|
|
2982
|
-
return
|
|
2982
|
+
return G(o), Ue({
|
|
2983
2983
|
...n,
|
|
2984
2984
|
...Pe
|
|
2985
2985
|
});
|
|
2986
2986
|
case jo:
|
|
2987
|
-
return
|
|
2987
|
+
return G(o), js(W, n);
|
|
2988
2988
|
}
|
|
2989
2989
|
return Yc(R(In(e)), e, o);
|
|
2990
2990
|
}
|
|
2991
2991
|
const t = Qa(e);
|
|
2992
|
-
return
|
|
2992
|
+
return G(o), t;
|
|
2993
2993
|
}
|
|
2994
2994
|
function pi(e, o) {
|
|
2995
2995
|
if (Te(e)) {
|
|
2996
2996
|
const n = ye(e);
|
|
2997
2997
|
if (n && n.branding === yl)
|
|
2998
|
-
return
|
|
2998
|
+
return G(o), n;
|
|
2999
2999
|
const r = D2(e);
|
|
3000
|
-
return Fc(R(r ||
|
|
3000
|
+
return Fc(R(r || X), !r, e, o);
|
|
3001
3001
|
}
|
|
3002
3002
|
const t = oc(R, e);
|
|
3003
|
-
return
|
|
3003
|
+
return G(o), t;
|
|
3004
3004
|
}
|
|
3005
3005
|
function ut(e, o) {
|
|
3006
3006
|
if (Te(e)) {
|
|
3007
3007
|
const n = ye(e);
|
|
3008
|
-
return n && n.branding === bl ? (
|
|
3008
|
+
return n && n.branding === bl ? (G(o), n) : Cc(R(In(e)), e, o);
|
|
3009
3009
|
}
|
|
3010
3010
|
const t = ec(R, e);
|
|
3011
|
-
return
|
|
3011
|
+
return G(o), t;
|
|
3012
3012
|
}
|
|
3013
3013
|
function dt(e, o) {
|
|
3014
3014
|
if (Te(e)) {
|
|
3015
3015
|
const n = ye(e) || {};
|
|
3016
3016
|
switch (n.branding) {
|
|
3017
3017
|
case yn:
|
|
3018
|
-
return
|
|
3018
|
+
return G(o), n;
|
|
3019
3019
|
case Bt:
|
|
3020
|
-
return
|
|
3020
|
+
return G(o), To(n);
|
|
3021
3021
|
case jo:
|
|
3022
|
-
return
|
|
3022
|
+
return G(o), Vs(W, n);
|
|
3023
3023
|
}
|
|
3024
3024
|
return Bc(R(In(e)), e, o);
|
|
3025
3025
|
}
|
|
3026
3026
|
const t = _r(e);
|
|
3027
|
-
return
|
|
3027
|
+
return G(o), t;
|
|
3028
3028
|
}
|
|
3029
3029
|
function ht(e, o) {
|
|
3030
3030
|
if (Te(e)) {
|
|
@@ -3061,19 +3061,19 @@ function Dd() {
|
|
|
3061
3061
|
}
|
|
3062
3062
|
function o(l, i = /* @__PURE__ */ Object.create(null)) {
|
|
3063
3063
|
zn.set(this, ((s, c) => {
|
|
3064
|
-
const a = new Do(s, c), u = a.resolvedOptions(), d = u.locale, h = je(Object.keys(c), u), m = Ee(Ed), f = (
|
|
3065
|
-
if (
|
|
3064
|
+
const a = new Do(s, c), u = a.resolvedOptions(), d = u.locale, h = je(Object.keys(c), u), m = Ee(Ed), f = (g, ...v) => {
|
|
3065
|
+
if (g) {
|
|
3066
3066
|
if (v.length !== 2)
|
|
3067
3067
|
throw new TypeError(R0);
|
|
3068
|
-
for (const
|
|
3069
|
-
if (
|
|
3068
|
+
for (const p of v)
|
|
3069
|
+
if (p === void 0)
|
|
3070
3070
|
throw new TypeError(R0);
|
|
3071
3071
|
}
|
|
3072
|
-
|
|
3073
|
-
const b = v.map(((
|
|
3072
|
+
g || v[0] !== void 0 || (v = []);
|
|
3073
|
+
const b = v.map(((p) => ye(p) || Number(p)));
|
|
3074
3074
|
let w, Z = 0;
|
|
3075
|
-
for (const
|
|
3076
|
-
const T = typeof
|
|
3075
|
+
for (const p of b) {
|
|
3076
|
+
const T = typeof p == "object" ? p.branding : void 0;
|
|
3077
3077
|
if (Z++ && T !== w)
|
|
3078
3078
|
throw new TypeError(R0);
|
|
3079
3079
|
w = T;
|
|
@@ -3121,7 +3121,7 @@ const Hn = /* @__PURE__ */ new WeakMap(), ye = /* @__PURE__ */ Hn.get.bind(Hn),
|
|
|
3121
3121
|
inLeapYear: l1,
|
|
3122
3122
|
monthsInYear: ao
|
|
3123
3123
|
}, Rl = {
|
|
3124
|
-
monthCode:
|
|
3124
|
+
monthCode: me
|
|
3125
3125
|
}, A2 = {
|
|
3126
3126
|
day: ao
|
|
3127
3127
|
}, xd = {
|
|
@@ -3138,19 +3138,19 @@ const Hn = /* @__PURE__ */ new WeakMap(), ye = /* @__PURE__ */ Hn.get.bind(Hn),
|
|
|
3138
3138
|
...A2
|
|
3139
3139
|
}), Ln = {
|
|
3140
3140
|
calendarId: (e) => e.calendar
|
|
3141
|
-
}, Bd = /* @__PURE__ */ Gn(((e) => (o) => o[e]),
|
|
3141
|
+
}, Bd = /* @__PURE__ */ Gn(((e) => (o) => o[e]), q.concat("sign")), Wl = /* @__PURE__ */ Gn(((e, o) => (t) => t[Xe[o]]), yo), E2 = {
|
|
3142
3142
|
epochMilliseconds: Nr,
|
|
3143
3143
|
epochNanoseconds: La
|
|
3144
|
-
}, [Cd,
|
|
3144
|
+
}, [Cd, ee] = Vo(Il, au, {
|
|
3145
3145
|
...Bd,
|
|
3146
3146
|
blank: za
|
|
3147
3147
|
}, {
|
|
3148
|
-
with: (e, o) =>
|
|
3149
|
-
negated: (e) =>
|
|
3150
|
-
abs: (e) =>
|
|
3151
|
-
add: (e, o, t) =>
|
|
3152
|
-
subtract: (e, o, t) =>
|
|
3153
|
-
round: (e, o) =>
|
|
3148
|
+
with: (e, o) => ee(Hc(e, o)),
|
|
3149
|
+
negated: (e) => ee(Wr(e)),
|
|
3150
|
+
abs: (e) => ee(Ha(e)),
|
|
3151
|
+
add: (e, o, t) => ee(ni(Ot, R, W, 0, e, re(o), t)),
|
|
3152
|
+
subtract: (e, o, t) => ee(ni(Ot, R, W, 1, e, re(o), t)),
|
|
3153
|
+
round: (e, o) => ee(Xa(Ot, R, W, e, o)),
|
|
3154
3154
|
total: (e, o) => Sa(Ot, R, W, e, o),
|
|
3155
3155
|
toLocaleString(e, o, t) {
|
|
3156
3156
|
return Intl.DurationFormat ? new Intl.DurationFormat(o, t).format(this) : Dn(e);
|
|
@@ -3159,8 +3159,8 @@ const Hn = /* @__PURE__ */ new WeakMap(), ye = /* @__PURE__ */ Hn.get.bind(Hn),
|
|
|
3159
3159
|
toJSON: (e) => Dn(e),
|
|
3160
3160
|
valueOf: Uo
|
|
3161
3161
|
}, {
|
|
3162
|
-
from: (e) =>
|
|
3163
|
-
compare: (e, o, t) => sc(Ot, R, W,
|
|
3162
|
+
from: (e) => ee(re(e)),
|
|
3163
|
+
compare: (e, o, t) => sc(Ot, R, W, re(e), re(o), t)
|
|
3164
3164
|
}, Dn), Fd = {
|
|
3165
3165
|
Instant: k2,
|
|
3166
3166
|
PlainDateTime: I2,
|
|
@@ -3172,10 +3172,10 @@ const Hn = /* @__PURE__ */ new WeakMap(), ye = /* @__PURE__ */ Hn.get.bind(Hn),
|
|
|
3172
3172
|
with(e, o, t) {
|
|
3173
3173
|
return Mo(Xc(this, Ct(o), t));
|
|
3174
3174
|
},
|
|
3175
|
-
add: (e, o) => Mo(ti(0, e,
|
|
3176
|
-
subtract: (e, o) => Mo(ti(1, e,
|
|
3177
|
-
until: (e, o, t) =>
|
|
3178
|
-
since: (e, o, t) =>
|
|
3175
|
+
add: (e, o) => Mo(ti(0, e, re(o))),
|
|
3176
|
+
subtract: (e, o) => Mo(ti(1, e, re(o))),
|
|
3177
|
+
until: (e, o, t) => ee(di(0, e, Io(o), t)),
|
|
3178
|
+
since: (e, o, t) => ee(di(1, e, Io(o), t)),
|
|
3179
3179
|
round: (e, o) => Mo(Aa(e, o)),
|
|
3180
3180
|
equals: (e, o) => fc(e, Io(o)),
|
|
3181
3181
|
toLocaleString(e, o, t) {
|
|
@@ -3188,7 +3188,7 @@ const Hn = /* @__PURE__ */ new WeakMap(), ye = /* @__PURE__ */ Hn.get.bind(Hn),
|
|
|
3188
3188
|
}, {
|
|
3189
3189
|
from: (e, o) => Mo(Io(e, o)),
|
|
3190
3190
|
compare: (e, o) => qr(Io(e), Io(o))
|
|
3191
|
-
}, B0), [Hd, ze] = Vo(Bt,
|
|
3191
|
+
}, B0), [Hd, ze] = Vo(Bt, H(nu, pn), {
|
|
3192
3192
|
...Ln,
|
|
3193
3193
|
...Ol,
|
|
3194
3194
|
...Wl
|
|
@@ -3196,10 +3196,10 @@ const Hn = /* @__PURE__ */ new WeakMap(), ye = /* @__PURE__ */ Hn.get.bind(Hn),
|
|
|
3196
3196
|
with: (e, o, t) => ze(_c(R, e, Ct(o), t)),
|
|
3197
3197
|
withCalendar: (e, o) => ze(rl(e, S0(o))),
|
|
3198
3198
|
withPlainTime: (e, o) => ze(ku(e, Fl(o))),
|
|
3199
|
-
add: (e, o, t) => ze(Ql(R, 0, e,
|
|
3200
|
-
subtract: (e, o, t) => ze(Ql(R, 1, e,
|
|
3201
|
-
until: (e, o, t) =>
|
|
3202
|
-
since: (e, o, t) =>
|
|
3199
|
+
add: (e, o, t) => ze(Ql(R, 0, e, re(o), t)),
|
|
3200
|
+
subtract: (e, o, t) => ze(Ql(R, 1, e, re(o), t)),
|
|
3201
|
+
until: (e, o, t) => ee(ai(R, 0, e, ct(o), t)),
|
|
3202
|
+
since: (e, o, t) => ee(ai(R, 1, e, ct(o), t)),
|
|
3203
3203
|
round: (e, o) => ze(Na(e, o)),
|
|
3204
3204
|
equals: (e, o) => uc(e, ct(o)),
|
|
3205
3205
|
toZonedDateTime: (e, o, t) => pe(du(W, e, Le(o), t)),
|
|
@@ -3215,7 +3215,7 @@ const Hn = /* @__PURE__ */ new WeakMap(), ye = /* @__PURE__ */ Hn.get.bind(Hn),
|
|
|
3215
3215
|
}, {
|
|
3216
3216
|
from: (e, o) => ze(ct(e, o)),
|
|
3217
3217
|
compare: (e, o) => ks(ct(e), ct(o))
|
|
3218
|
-
}, E0), [zd, nr] = Vo(yl,
|
|
3218
|
+
}, E0), [zd, nr] = Vo(yl, H(iu, pn), {
|
|
3219
3219
|
...Ln,
|
|
3220
3220
|
...Yd
|
|
3221
3221
|
}, {
|
|
@@ -3233,15 +3233,15 @@ const Hn = /* @__PURE__ */ new WeakMap(), ye = /* @__PURE__ */ Hn.get.bind(Hn),
|
|
|
3233
3233
|
valueOf: Uo
|
|
3234
3234
|
}, {
|
|
3235
3235
|
from: (e, o) => nr(pi(e, o))
|
|
3236
|
-
}, Y0), [Kd, Ut] = Vo(bl,
|
|
3236
|
+
}, Y0), [Kd, Ut] = Vo(bl, H(lu, pn), {
|
|
3237
3237
|
...Ln,
|
|
3238
3238
|
...$d
|
|
3239
3239
|
}, {
|
|
3240
3240
|
with: (e, o, t) => Ut(Vc(R, e, Ct(o), t)),
|
|
3241
|
-
add: (e, o, t) => Ut(oi(R, 0, e,
|
|
3242
|
-
subtract: (e, o, t) => Ut(oi(R, 1, e,
|
|
3243
|
-
until: (e, o, t) =>
|
|
3244
|
-
since: (e, o, t) =>
|
|
3241
|
+
add: (e, o, t) => Ut(oi(R, 0, e, re(o), t)),
|
|
3242
|
+
subtract: (e, o, t) => Ut(oi(R, 1, e, re(o), t)),
|
|
3243
|
+
until: (e, o, t) => ee(ui(R, 0, e, ut(o), t)),
|
|
3244
|
+
since: (e, o, t) => ee(ui(R, 1, e, ut(o), t)),
|
|
3245
3245
|
equals: (e, o) => hc(e, ut(o)),
|
|
3246
3246
|
toPlainDate(e, o) {
|
|
3247
3247
|
return Ge(gu(R, e, this, o));
|
|
@@ -3256,16 +3256,16 @@ const Hn = /* @__PURE__ */ new WeakMap(), ye = /* @__PURE__ */ Hn.get.bind(Hn),
|
|
|
3256
3256
|
}, {
|
|
3257
3257
|
from: (e, o) => Ut(ut(e, o)),
|
|
3258
3258
|
compare: (e, o) => Et(ut(e), ut(o))
|
|
3259
|
-
}, $0), [Gd, Ge] = Vo(yn,
|
|
3259
|
+
}, $0), [Gd, Ge] = Vo(yn, H(ru, pn), {
|
|
3260
3260
|
...Ln,
|
|
3261
3261
|
...Ol
|
|
3262
3262
|
}, {
|
|
3263
3263
|
with: (e, o, t) => Ge(jc(R, e, Ct(o), t)),
|
|
3264
3264
|
withCalendar: (e, o) => Ge(rl(e, S0(o))),
|
|
3265
|
-
add: (e, o, t) => Ge(ei(R, 0, e,
|
|
3266
|
-
subtract: (e, o, t) => Ge(ei(R, 1, e,
|
|
3267
|
-
until: (e, o, t) =>
|
|
3268
|
-
since: (e, o, t) =>
|
|
3265
|
+
add: (e, o, t) => Ge(ei(R, 0, e, re(o), t)),
|
|
3266
|
+
subtract: (e, o, t) => Ge(ei(R, 1, e, re(o), t)),
|
|
3267
|
+
until: (e, o, t) => ee(ci(R, 0, e, dt(o), t)),
|
|
3268
|
+
since: (e, o, t) => ee(ci(R, 1, e, dt(o), t)),
|
|
3269
3269
|
equals: (e, o) => dc(e, dt(o)),
|
|
3270
3270
|
toZonedDateTime(e, o) {
|
|
3271
3271
|
const t = Te(o) ? o : {
|
|
@@ -3290,7 +3290,7 @@ const Hn = /* @__PURE__ */ new WeakMap(), ye = /* @__PURE__ */ Hn.get.bind(Hn),
|
|
|
3290
3290
|
}, {
|
|
3291
3291
|
from: (e, o) => Ge(dt(e, o)),
|
|
3292
3292
|
compare: (e, o) => Et(dt(e), dt(o))
|
|
3293
|
-
}, x0), [qd, pe] = Vo(jo,
|
|
3293
|
+
}, x0), [qd, pe] = Vo(jo, H(tu, pn, ic), {
|
|
3294
3294
|
...E2,
|
|
3295
3295
|
...Ln,
|
|
3296
3296
|
...gi(Ol),
|
|
@@ -3304,10 +3304,10 @@ const Hn = /* @__PURE__ */ new WeakMap(), ye = /* @__PURE__ */ Hn.get.bind(Hn),
|
|
|
3304
3304
|
withCalendar: (e, o) => pe(rl(e, S0(o))),
|
|
3305
3305
|
withTimeZone: (e, o) => pe(Iu(e, Le(o))),
|
|
3306
3306
|
withPlainTime: (e, o) => pe(Zu(W, e, Fl(o))),
|
|
3307
|
-
add: (e, o, t) => pe(Jl(R, W, 0, e,
|
|
3308
|
-
subtract: (e, o, t) => pe(Jl(R, W, 1, e,
|
|
3309
|
-
until: (e, o, t) =>
|
|
3310
|
-
since: (e, o, t) =>
|
|
3307
|
+
add: (e, o, t) => pe(Jl(R, W, 0, e, re(o), t)),
|
|
3308
|
+
subtract: (e, o, t) => pe(Jl(R, W, 1, e, re(o), t)),
|
|
3309
|
+
until: (e, o, t) => ee(le(si(R, W, 0, e, ht(o), t))),
|
|
3310
|
+
since: (e, o, t) => ee(le(si(R, W, 1, e, ht(o), t))),
|
|
3311
3311
|
round: (e, o) => pe(Da(W, e, o)),
|
|
3312
3312
|
startOfDay: (e) => pe(xa(W, e)),
|
|
3313
3313
|
equals: (e, o) => cc(e, ht(o)),
|
|
@@ -3333,10 +3333,10 @@ const Hn = /* @__PURE__ */ new WeakMap(), ye = /* @__PURE__ */ Hn.get.bind(Hn),
|
|
|
3333
3333
|
from: (e, o) => pe(ht(e, o)),
|
|
3334
3334
|
compare: (e, o) => Zs(ht(e), ht(o))
|
|
3335
3335
|
}, ((e) => A0(W, e))), [Jd, Lo] = Vo(kl, ou, E2, {
|
|
3336
|
-
add: (e, o) => Lo(ql(0, e,
|
|
3337
|
-
subtract: (e, o) => Lo(ql(1, e,
|
|
3338
|
-
until: (e, o, t) =>
|
|
3339
|
-
since: (e, o, t) =>
|
|
3336
|
+
add: (e, o) => Lo(ql(0, e, re(o))),
|
|
3337
|
+
subtract: (e, o) => Lo(ql(1, e, re(o))),
|
|
3338
|
+
until: (e, o, t) => ee(ii(0, e, mt(o), t)),
|
|
3339
|
+
since: (e, o, t) => ee(ii(1, e, mt(o), t)),
|
|
3340
3340
|
round: (e, o) => Lo(Pa(e, o)),
|
|
3341
3341
|
equals: (e, o) => ac(e, mt(o)),
|
|
3342
3342
|
toZonedDateTimeISO: (e, o) => pe(cu(e, Le(o))),
|
|
@@ -3357,9 +3357,9 @@ const Hn = /* @__PURE__ */ new WeakMap(), ye = /* @__PURE__ */ Hn.get.bind(Hn),
|
|
|
3357
3357
|
...yt({
|
|
3358
3358
|
timeZoneId: () => Ft(),
|
|
3359
3359
|
instant: () => Lo(wo(G0())),
|
|
3360
|
-
zonedDateTimeISO: (e = Ft()) => pe(Ve(G0(), Le(e),
|
|
3361
|
-
plainDateTimeISO: (e = Ft()) => ze(Ue(F0(W(Le(e))),
|
|
3362
|
-
plainDateISO: (e = Ft()) => Ge(To(F0(W(Le(e))),
|
|
3360
|
+
zonedDateTimeISO: (e = Ft()) => pe(Ve(G0(), Le(e), X)),
|
|
3361
|
+
plainDateTimeISO: (e = Ft()) => ze(Ue(F0(W(Le(e))), X)),
|
|
3362
|
+
plainDateISO: (e = Ft()) => Ge(To(F0(W(Le(e))), X)),
|
|
3363
3363
|
plainTimeISO: (e = Ft()) => Mo(no(F0(W(Le(e)))))
|
|
3364
3364
|
})
|
|
3365
3365
|
}), e4 = /* @__PURE__ */ Object.defineProperties({}, {
|
|
@@ -3528,7 +3528,7 @@ const d4 = ({
|
|
|
3528
3528
|
formatter: t ?? d4
|
|
3529
3529
|
};
|
|
3530
3530
|
}, m4 = (e = {}, o) => e === !1 ? null : {
|
|
3531
|
-
line:
|
|
3531
|
+
line: z(e.line, o.line),
|
|
3532
3532
|
label: h4(e.label, o.label)
|
|
3533
3533
|
}, jl = {
|
|
3534
3534
|
...Ke,
|
|
@@ -3558,14 +3558,14 @@ const d4 = ({
|
|
|
3558
3558
|
vPadding: e.vPadding ?? o.vPadding ?? Ko.vPadding
|
|
3559
3559
|
};
|
|
3560
3560
|
}, f4 = (e = {}, o) => e === !1 ? null : {
|
|
3561
|
-
line:
|
|
3561
|
+
line: z(e.line, o.line),
|
|
3562
3562
|
label: $2(e.label, o.label)
|
|
3563
3563
|
}, p4 = (e = {}, o) => e === !1 ? null : {
|
|
3564
3564
|
value: f4(e.value, o.value),
|
|
3565
3565
|
time: m4(e.time, o.time)
|
|
3566
3566
|
}, g4 = (e = {}, o) => e === !1 ? null : {
|
|
3567
|
-
time:
|
|
3568
|
-
value:
|
|
3567
|
+
time: z(e.time, o.time),
|
|
3568
|
+
value: z(e.value, o.value)
|
|
3569
3569
|
}, Y2 = {
|
|
3570
3570
|
left: { ...ke, color: "#ddd" },
|
|
3571
3571
|
right: { ...ke, color: "#ddd" },
|
|
@@ -3576,10 +3576,10 @@ const d4 = ({
|
|
|
3576
3576
|
return null;
|
|
3577
3577
|
const n = o ?? Y2;
|
|
3578
3578
|
return {
|
|
3579
|
-
left:
|
|
3580
|
-
right:
|
|
3581
|
-
top:
|
|
3582
|
-
bottom:
|
|
3579
|
+
left: z(e.left, n.left, t),
|
|
3580
|
+
right: z(e.right, n.right, t),
|
|
3581
|
+
top: z(e.top, n.top, t),
|
|
3582
|
+
bottom: z(e.bottom, n.bottom, t)
|
|
3583
3583
|
};
|
|
3584
3584
|
}, w4 = {
|
|
3585
3585
|
height: 36
|
|
@@ -3588,7 +3588,7 @@ const d4 = ({
|
|
|
3588
3588
|
e.height ?? o.height ?? w4.height,
|
|
3589
3589
|
"xAxis.height"
|
|
3590
3590
|
),
|
|
3591
|
-
border:
|
|
3591
|
+
border: z(e.border, o.border),
|
|
3592
3592
|
minorLabels: lr(e.minorLabels, o.minorLabels),
|
|
3593
3593
|
majorLabels: lr(e.majorLabels, o.majorLabels),
|
|
3594
3594
|
timeZoneId: e.timeZoneId ?? t ?? null
|
|
@@ -3646,33 +3646,33 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
3646
3646
|
onZoom: t
|
|
3647
3647
|
}) => {
|
|
3648
3648
|
const n = _(null), r = _(null), l = _(null), i = _(null), s = _({ x: 0, y: 0 }), c = _(1), a = _(/* @__PURE__ */ new Map()), u = _(null), d = () => {
|
|
3649
|
-
const
|
|
3650
|
-
if (
|
|
3651
|
-
const [T, y] =
|
|
3649
|
+
const p = Array.from(a.current.values());
|
|
3650
|
+
if (p.length < 2) return null;
|
|
3651
|
+
const [T, y] = p;
|
|
3652
3652
|
return Math.hypot(y.x - T.x, y.y - T.y);
|
|
3653
|
-
}, h =
|
|
3653
|
+
}, h = J(() => {
|
|
3654
3654
|
l.current === null && (l.current = requestAnimationFrame(() => {
|
|
3655
3655
|
e(s.current.x, s.current.y), s.current = { x: 0, y: 0 }, l.current = null;
|
|
3656
3656
|
}));
|
|
3657
|
-
}, [e]), m =
|
|
3657
|
+
}, [e]), m = J(() => {
|
|
3658
3658
|
i.current === null && (i.current = requestAnimationFrame(() => {
|
|
3659
3659
|
t(c.current), c.current = 1, i.current = null;
|
|
3660
3660
|
}));
|
|
3661
|
-
}, [t]), f = (
|
|
3662
|
-
if (!(
|
|
3663
|
-
if (a.current.set(
|
|
3664
|
-
r.current = { x:
|
|
3661
|
+
}, [t]), f = (p) => {
|
|
3662
|
+
if (!(p.pointerType === "mouse" && p.button !== 0)) {
|
|
3663
|
+
if (a.current.set(p.pointerId, { x: p.clientX, y: p.clientY }), p.pointerType !== "mouse" && n.current?.setPointerCapture && n.current.setPointerCapture(p.pointerId), n.current && (n.current.style.cursor = "grabbing"), a.current.size === 1) {
|
|
3664
|
+
r.current = { x: p.clientX, y: p.clientY }, u.current = null;
|
|
3665
3665
|
return;
|
|
3666
3666
|
}
|
|
3667
3667
|
a.current.size === 2 && (r.current = null, u.current = d());
|
|
3668
3668
|
}
|
|
3669
|
-
},
|
|
3670
|
-
a.current.size === 0 && o(
|
|
3671
|
-
}, v = (
|
|
3672
|
-
if (a.current.has(
|
|
3673
|
-
if (a.current.set(
|
|
3674
|
-
const T =
|
|
3675
|
-
s.current.x += T, s.current.y += y, r.current = { x:
|
|
3669
|
+
}, g = (p) => {
|
|
3670
|
+
a.current.size === 0 && o(p.clientX, p.clientY);
|
|
3671
|
+
}, v = (p) => {
|
|
3672
|
+
if (a.current.has(p.pointerId)) {
|
|
3673
|
+
if (a.current.set(p.pointerId, { x: p.clientX, y: p.clientY }), a.current.size === 1 && r.current) {
|
|
3674
|
+
const T = p.clientX - r.current.x, y = p.clientY - r.current.y;
|
|
3675
|
+
s.current.x += T, s.current.y += y, r.current = { x: p.clientX, y: p.clientY }, h();
|
|
3676
3676
|
return;
|
|
3677
3677
|
}
|
|
3678
3678
|
if (a.current.size >= 2) {
|
|
@@ -3680,8 +3680,8 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
3680
3680
|
u.current && T && u.current > 0 && (c.current *= T / u.current, m()), u.current = T;
|
|
3681
3681
|
}
|
|
3682
3682
|
}
|
|
3683
|
-
}, b = (
|
|
3684
|
-
if (a.current.delete(
|
|
3683
|
+
}, b = (p) => {
|
|
3684
|
+
if (a.current.delete(p.pointerId), n.current?.hasPointerCapture?.(p.pointerId) && n.current.releasePointerCapture(p.pointerId), a.current.size === 0) {
|
|
3685
3685
|
n.current && (n.current.style.cursor = "crosshair"), r.current = null, u.current = null;
|
|
3686
3686
|
return;
|
|
3687
3687
|
}
|
|
@@ -3691,24 +3691,24 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
3691
3691
|
return;
|
|
3692
3692
|
}
|
|
3693
3693
|
u.current = d();
|
|
3694
|
-
}, w =
|
|
3695
|
-
|
|
3696
|
-
const T = Math.abs(
|
|
3694
|
+
}, w = J((p) => {
|
|
3695
|
+
p.preventDefault();
|
|
3696
|
+
const T = Math.abs(p.deltaX), y = Math.abs(p.deltaY);
|
|
3697
3697
|
if (T > y)
|
|
3698
|
-
s.current.x -=
|
|
3698
|
+
s.current.x -= p.deltaX, l.current === null && (l.current = requestAnimationFrame(() => {
|
|
3699
3699
|
e(s.current.x, s.current.y, !0), s.current = { x: 0, y: 0 }, l.current = null;
|
|
3700
3700
|
}));
|
|
3701
3701
|
else {
|
|
3702
|
-
const k =
|
|
3702
|
+
const k = p.deltaY > 0 ? 0.975 : 1.025;
|
|
3703
3703
|
c.current *= k, m();
|
|
3704
3704
|
}
|
|
3705
3705
|
}, [e, m]);
|
|
3706
3706
|
Oe(() => {
|
|
3707
|
-
const
|
|
3708
|
-
if (!
|
|
3707
|
+
const p = n.current;
|
|
3708
|
+
if (!p) return;
|
|
3709
3709
|
const T = a.current;
|
|
3710
|
-
return
|
|
3711
|
-
|
|
3710
|
+
return p.addEventListener("wheel", w, { passive: !1 }), () => {
|
|
3711
|
+
p.removeEventListener("wheel", w), T.clear(), r.current = null, u.current = null, s.current = { x: 0, y: 0 }, c.current = 1, p.style.cursor = "crosshair";
|
|
3712
3712
|
};
|
|
3713
3713
|
}, [w]), Oe(() => {
|
|
3714
3714
|
if (!n.current) return;
|
|
@@ -3726,9 +3726,9 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
3726
3726
|
window.removeEventListener("pointerup", T), window.removeEventListener("pointercancel", T), l.current !== null && (cancelAnimationFrame(l.current), l.current = null), i.current !== null && (cancelAnimationFrame(i.current), i.current = null);
|
|
3727
3727
|
};
|
|
3728
3728
|
}, []);
|
|
3729
|
-
const Z = (
|
|
3730
|
-
if (a.current.has(
|
|
3731
|
-
if (a.current.delete(
|
|
3729
|
+
const Z = (p) => {
|
|
3730
|
+
if (a.current.has(p.pointerId))
|
|
3731
|
+
if (a.current.delete(p.pointerId), a.current.size === 0)
|
|
3732
3732
|
n.current && (n.current.style.cursor = "crosshair"), r.current = null, u.current = null;
|
|
3733
3733
|
else if (a.current.size === 1) {
|
|
3734
3734
|
const [T] = a.current.values();
|
|
@@ -3738,12 +3738,12 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
3738
3738
|
};
|
|
3739
3739
|
return Oe(() => () => {
|
|
3740
3740
|
l.current !== null && (cancelAnimationFrame(l.current), l.current = null), i.current !== null && (cancelAnimationFrame(i.current), i.current = null);
|
|
3741
|
-
}, []), /* @__PURE__ */
|
|
3741
|
+
}, []), /* @__PURE__ */ te(
|
|
3742
3742
|
"div",
|
|
3743
3743
|
{
|
|
3744
3744
|
ref: n,
|
|
3745
3745
|
className: I4.interactiveArea,
|
|
3746
|
-
onMouseMove:
|
|
3746
|
+
onMouseMove: g,
|
|
3747
3747
|
onPointerDown: f,
|
|
3748
3748
|
onPointerMove: v,
|
|
3749
3749
|
onPointerUp: b,
|
|
@@ -3766,11 +3766,11 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
3766
3766
|
color: h,
|
|
3767
3767
|
width: m,
|
|
3768
3768
|
style: f,
|
|
3769
|
-
dashes:
|
|
3769
|
+
dashes: g
|
|
3770
3770
|
} = d, {
|
|
3771
3771
|
topPx: v
|
|
3772
3772
|
} = c;
|
|
3773
|
-
e.strokeStyle = h, e.lineWidth = m, f === "dashed" &&
|
|
3773
|
+
e.strokeStyle = h, e.lineWidth = m, f === "dashed" && g && e.setLineDash(g), e.beginPath(), e.moveTo(a, v - 1), e.lineTo(u, v - 1), e.stroke(), e.setLineDash([]);
|
|
3774
3774
|
}, P4 = (e, o, t) => {
|
|
3775
3775
|
const n = Math.pow(10, Math.floor(Math.log10(e)) - 1);
|
|
3776
3776
|
for (const r of t) {
|
|
@@ -3845,8 +3845,8 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
3845
3845
|
for (let m = 0; m < r.length; m++) {
|
|
3846
3846
|
const { y: f } = r[m];
|
|
3847
3847
|
if (f > s && f < c) {
|
|
3848
|
-
const
|
|
3849
|
-
e.beginPath(), e.moveTo(0,
|
|
3848
|
+
const g = f + 0.5;
|
|
3849
|
+
e.beginPath(), e.moveTo(0, g), e.lineTo(i, g), e.stroke();
|
|
3850
3850
|
}
|
|
3851
3851
|
}
|
|
3852
3852
|
}, A4 = (e, o, t, n, r) => {
|
|
@@ -3861,16 +3861,16 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
3861
3861
|
const c = s[t].width, a = s[t].borderWidth, u = s[t].backgroundColor, d = s[t].borderColor, h = Math.round(Math.min(r, l)), m = Math.round(Math.abs(l - r));
|
|
3862
3862
|
let f = Math.round(i * c);
|
|
3863
3863
|
f % 2 === 0 && (f += 1);
|
|
3864
|
-
const
|
|
3864
|
+
const g = Math.round(n) + 0.5, v = Math.round(g - f / 2);
|
|
3865
3865
|
if (m > 0)
|
|
3866
3866
|
if (a > 0 && d) {
|
|
3867
3867
|
e.fillStyle = d, e.fillRect(v, h, f, m);
|
|
3868
|
-
const b = v + a, w = h + a, Z = f - a * 2,
|
|
3869
|
-
Z > 0 &&
|
|
3868
|
+
const b = v + a, w = h + a, Z = f - a * 2, p = m - a * 2;
|
|
3869
|
+
Z > 0 && p > 0 && (e.fillStyle = u, e.fillRect(b, w, Z, p));
|
|
3870
3870
|
} else
|
|
3871
3871
|
e.fillStyle = u, e.fillRect(v, h, f, m);
|
|
3872
3872
|
else {
|
|
3873
|
-
const b = h + 0.5, w =
|
|
3873
|
+
const b = h + 0.5, w = g - f / 2, Z = g + f / 2;
|
|
3874
3874
|
e.beginPath(), e.moveTo(w, b), e.lineTo(Z, b), e.stroke();
|
|
3875
3875
|
}
|
|
3876
3876
|
}, x4 = (e, o, t, n, r, l) => {
|
|
@@ -3884,19 +3884,19 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
3884
3884
|
e.strokeStyle = c, e.lineWidth = s, e.beginPath(), e.moveTo(a, r), e.lineTo(a, l), e.stroke();
|
|
3885
3885
|
}, $4 = (e, o, t, n, r, l, i, s, c, a, u) => {
|
|
3886
3886
|
const d = r(l), h = r(c), m = r(i), f = r(s);
|
|
3887
|
-
let
|
|
3888
|
-
c > l ?
|
|
3887
|
+
let g;
|
|
3888
|
+
c > l ? g = "up" : c < l ? g = "down" : g = "flat", x4(e, t, g, a, m, f), E4(e, t, g, a, d, h, n);
|
|
3889
3889
|
}, Y4 = (e, o, t, n, r, l, i, s, c, a, u, d, h, m) => {
|
|
3890
3890
|
if (!a || !u || !d) return;
|
|
3891
3891
|
const {
|
|
3892
3892
|
drawingAreaX: f,
|
|
3893
|
-
drawingAreaX1:
|
|
3893
|
+
drawingAreaX1: g
|
|
3894
3894
|
} = o, {
|
|
3895
3895
|
backgroundColor: v,
|
|
3896
3896
|
borderColor: b,
|
|
3897
3897
|
color: w,
|
|
3898
3898
|
borderWidth: Z,
|
|
3899
|
-
fontFamily:
|
|
3899
|
+
fontFamily: p,
|
|
3900
3900
|
fontSize: T,
|
|
3901
3901
|
fontWeight: y,
|
|
3902
3902
|
fontVariant: k,
|
|
@@ -3905,21 +3905,21 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
3905
3905
|
vPadding: P
|
|
3906
3906
|
} = s, S = m;
|
|
3907
3907
|
if (S === void 0) return;
|
|
3908
|
-
const { layersData: { layersTopology: { deducedLayerScales: M } } } = h, D = M[r.id], { key:
|
|
3909
|
-
paddedTopPx:
|
|
3908
|
+
const { layersData: { layersTopology: { deducedLayerScales: M } } } = h, D = M[r.id], { key: $ } = D, { yAxes: { axesByScale: Y } } = n, U = Y[$], {
|
|
3909
|
+
paddedTopPx: C,
|
|
3910
3910
|
paddedBottomPx: E
|
|
3911
3911
|
} = u, {
|
|
3912
|
-
valueToY:
|
|
3912
|
+
valueToY: A
|
|
3913
3913
|
} = d;
|
|
3914
|
-
let x = Math.round(
|
|
3915
|
-
c === "last-data" && (x <
|
|
3914
|
+
let x = Math.round(A(S));
|
|
3915
|
+
c === "last-data" && (x < C ? x = C : x > E && (x = E));
|
|
3916
3916
|
const {
|
|
3917
|
-
side:
|
|
3918
|
-
width:
|
|
3919
|
-
} = l, { offsetPx:
|
|
3917
|
+
side: N,
|
|
3918
|
+
width: B
|
|
3919
|
+
} = l, { offsetPx: F } = U, j = N === "left" ? f - F - B : g + F;
|
|
3920
3920
|
e.lineWidth = 1, e.strokeStyle = b, e.fillStyle = v;
|
|
3921
|
-
const
|
|
3922
|
-
Z > 0 ? (e.fillStyle = b, e.fillRect(j, De,
|
|
3921
|
+
const V = i(S), ie = Math.round(e.measureText(V).width + I * 2), K = T + P * 2, se = Math.round(K / 2), De = x - se;
|
|
3922
|
+
Z > 0 ? (e.fillStyle = b, e.fillRect(j, De, ie, K), e.fillStyle = v, e.fillRect(j + Z, De + Z, ie - Z * 2, K - Z * 2)) : (e.fillStyle = v, e.fillRect(j, De, ie, K)), e.textBaseline = "middle", e.textAlign = "left", e.fillStyle = w, e.font = `${L} ${k} ${y} ${T}px ${p}`, e.fillText(V, j + I, x);
|
|
3923
3923
|
}, B4 = (e, o, t, n, r, l, i, s, c) => {
|
|
3924
3924
|
if (!r || !l || !i) return;
|
|
3925
3925
|
const {
|
|
@@ -3930,27 +3930,27 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
3930
3930
|
width: h,
|
|
3931
3931
|
style: m,
|
|
3932
3932
|
dashes: f
|
|
3933
|
-
} = t,
|
|
3934
|
-
if (
|
|
3933
|
+
} = t, g = c;
|
|
3934
|
+
if (g === void 0) return;
|
|
3935
3935
|
const {
|
|
3936
3936
|
paddedTopPx: v,
|
|
3937
3937
|
paddedBottomPx: b
|
|
3938
3938
|
} = l, {
|
|
3939
3939
|
valueToY: w
|
|
3940
3940
|
} = i;
|
|
3941
|
-
let Z = Math.round(w(
|
|
3941
|
+
let Z = Math.round(w(g));
|
|
3942
3942
|
n === "last-data" && (Z < v ? Z = v : Z > b && (Z = b)), e.lineWidth = h, e.strokeStyle = d, m === "dashed" && f && e.setLineDash(f), e.beginPath(), e.moveTo(a, Z + 0.5), e.lineTo(u, Z + 0.5), e.stroke(), e.setLineDash([]);
|
|
3943
3943
|
}, Be = (e, o, t, n, r, l, i, s, c, a, u, d, h, m) => {
|
|
3944
3944
|
if (!c || !u) return;
|
|
3945
3945
|
const {
|
|
3946
3946
|
mode: f,
|
|
3947
|
-
line:
|
|
3947
|
+
line: g,
|
|
3948
3948
|
label: v
|
|
3949
3949
|
} = h;
|
|
3950
|
-
|
|
3950
|
+
g && B4(
|
|
3951
3951
|
o,
|
|
3952
3952
|
t,
|
|
3953
|
-
|
|
3953
|
+
g,
|
|
3954
3954
|
f,
|
|
3955
3955
|
c,
|
|
3956
3956
|
a,
|
|
@@ -3976,16 +3976,16 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
3976
3976
|
}, C4 = (e, o, t, n, r, l, i, s, c, a, u, d, h, m, f = 0) => {
|
|
3977
3977
|
if (!c || !u) return;
|
|
3978
3978
|
const {
|
|
3979
|
-
mode:
|
|
3979
|
+
mode: g,
|
|
3980
3980
|
showLine: v,
|
|
3981
3981
|
showLabel: b,
|
|
3982
3982
|
up: w,
|
|
3983
3983
|
down: Z,
|
|
3984
|
-
flat:
|
|
3984
|
+
flat: p
|
|
3985
3985
|
} = h;
|
|
3986
3986
|
if (!v && !b) return;
|
|
3987
3987
|
let T;
|
|
3988
|
-
f > 0 ? T = w : f < 0 ? T = Z : T =
|
|
3988
|
+
f > 0 ? T = w : f < 0 ? T = Z : T = p, Be(
|
|
3989
3989
|
e,
|
|
3990
3990
|
o,
|
|
3991
3991
|
t,
|
|
@@ -4000,7 +4000,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
4000
4000
|
d,
|
|
4001
4001
|
{
|
|
4002
4002
|
...T,
|
|
4003
|
-
mode:
|
|
4003
|
+
mode: g
|
|
4004
4004
|
},
|
|
4005
4005
|
m
|
|
4006
4006
|
);
|
|
@@ -4013,7 +4013,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
4013
4013
|
},
|
|
4014
4014
|
startBarIndex: m,
|
|
4015
4015
|
endBarIndex: f,
|
|
4016
|
-
getLastVisibleBarIndex:
|
|
4016
|
+
getLastVisibleBarIndex: g
|
|
4017
4017
|
},
|
|
4018
4018
|
dataMap: {
|
|
4019
4019
|
ohlcvs: {
|
|
@@ -4021,7 +4021,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
4021
4021
|
high: b,
|
|
4022
4022
|
low: w,
|
|
4023
4023
|
close: Z,
|
|
4024
|
-
timestamp:
|
|
4024
|
+
timestamp: p
|
|
4025
4025
|
}
|
|
4026
4026
|
}
|
|
4027
4027
|
} = i, {
|
|
@@ -4046,11 +4046,11 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
4046
4046
|
w[S],
|
|
4047
4047
|
Z[S],
|
|
4048
4048
|
M,
|
|
4049
|
-
|
|
4049
|
+
p[S]
|
|
4050
4050
|
), P = S;
|
|
4051
4051
|
}
|
|
4052
4052
|
if (L && P >= 0) {
|
|
4053
|
-
const S =
|
|
4053
|
+
const S = g(P), M = v[S], D = Z[S];
|
|
4054
4054
|
C4(
|
|
4055
4055
|
e,
|
|
4056
4056
|
o,
|
|
@@ -4134,15 +4134,15 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
4134
4134
|
color: "#10b981"
|
|
4135
4135
|
}
|
|
4136
4136
|
}, O4 = (e = {}, o) => e === !1 ? null : {
|
|
4137
|
-
up:
|
|
4137
|
+
up: z(
|
|
4138
4138
|
e.up,
|
|
4139
4139
|
o?.up ?? V0.up
|
|
4140
4140
|
),
|
|
4141
|
-
down:
|
|
4141
|
+
down: z(
|
|
4142
4142
|
e.down,
|
|
4143
4143
|
o?.down ?? V0.down
|
|
4144
4144
|
),
|
|
4145
|
-
flat:
|
|
4145
|
+
flat: z(
|
|
4146
4146
|
e.flat,
|
|
4147
4147
|
o?.flat ?? V0.flat
|
|
4148
4148
|
)
|
|
@@ -4161,7 +4161,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
4161
4161
|
}, ve = (e = {}, o, t) => {
|
|
4162
4162
|
if (e === !1)
|
|
4163
4163
|
return null;
|
|
4164
|
-
const n = o ?? Yn, r = e.line ?
|
|
4164
|
+
const n = o ?? Yn, r = e.line ? z(e.line, n.line, t) : null;
|
|
4165
4165
|
return {
|
|
4166
4166
|
mode: e.mode ?? W4.mode,
|
|
4167
4167
|
line: r,
|
|
@@ -4196,10 +4196,10 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
4196
4196
|
), u = { line: c, label: a }, { line: d, label: h } = ve(
|
|
4197
4197
|
e.down,
|
|
4198
4198
|
i
|
|
4199
|
-
), m = { line: d, label: h }, { line: f, label:
|
|
4199
|
+
), m = { line: d, label: h }, { line: f, label: g } = ve(
|
|
4200
4200
|
e.flat,
|
|
4201
4201
|
s
|
|
4202
|
-
), v = { line: f, label:
|
|
4202
|
+
), v = { line: f, label: g };
|
|
4203
4203
|
return {
|
|
4204
4204
|
mode: e.mode ?? U0.mode,
|
|
4205
4205
|
showLine: n,
|
|
@@ -4217,7 +4217,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
4217
4217
|
borderColor: "#1a1a1a",
|
|
4218
4218
|
borderRadius: 4,
|
|
4219
4219
|
label: ""
|
|
4220
|
-
},
|
|
4220
|
+
}, ce = {
|
|
4221
4221
|
...O,
|
|
4222
4222
|
left: 12,
|
|
4223
4223
|
backgroundColor: "#ffffff77",
|
|
@@ -4267,7 +4267,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
4267
4267
|
label: e.label ?? o.label ?? Ho.label,
|
|
4268
4268
|
fields: X4(e.fields, o.fields, t)
|
|
4269
4269
|
};
|
|
4270
|
-
},
|
|
4270
|
+
}, oe = (e) => {
|
|
4271
4271
|
const o = e.split(".");
|
|
4272
4272
|
switch (o.length) {
|
|
4273
4273
|
case 1:
|
|
@@ -4294,7 +4294,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
4294
4294
|
}, ir = {
|
|
4295
4295
|
width: 80,
|
|
4296
4296
|
side: "right"
|
|
4297
|
-
},
|
|
4297
|
+
}, ne = {
|
|
4298
4298
|
...ir,
|
|
4299
4299
|
border: { color: "#ddd", width: 1, style: "solid" },
|
|
4300
4300
|
labels: { ...jl, padding: 6 }
|
|
@@ -4302,7 +4302,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
4302
4302
|
side: e.side ?? o.side ?? ir.side,
|
|
4303
4303
|
// todo: tier variation
|
|
4304
4304
|
width: e.width ?? o.width ?? ir.width,
|
|
4305
|
-
border:
|
|
4305
|
+
border: z(e.border, o.border),
|
|
4306
4306
|
labels: x2(e.labels, o.labels)
|
|
4307
4307
|
}, io = (e, o) => {
|
|
4308
4308
|
const t = new Set(e.map((l) => l.key)), n = o.filter((l) => !t.has(l));
|
|
@@ -4316,22 +4316,22 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
4316
4316
|
open: {
|
|
4317
4317
|
output: "open",
|
|
4318
4318
|
label: "O",
|
|
4319
|
-
valueSelector:
|
|
4319
|
+
valueSelector: oe("open")
|
|
4320
4320
|
},
|
|
4321
4321
|
high: {
|
|
4322
4322
|
output: "high",
|
|
4323
4323
|
label: "H",
|
|
4324
|
-
valueSelector:
|
|
4324
|
+
valueSelector: oe("high")
|
|
4325
4325
|
},
|
|
4326
4326
|
low: {
|
|
4327
4327
|
output: "low",
|
|
4328
4328
|
label: "L",
|
|
4329
|
-
valueSelector:
|
|
4329
|
+
valueSelector: oe("low")
|
|
4330
4330
|
},
|
|
4331
4331
|
close: {
|
|
4332
4332
|
output: "close",
|
|
4333
4333
|
label: "C",
|
|
4334
|
-
valueSelector:
|
|
4334
|
+
valueSelector: oe("close")
|
|
4335
4335
|
}
|
|
4336
4336
|
};
|
|
4337
4337
|
return io(l, R4), {
|
|
@@ -4397,7 +4397,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
4397
4397
|
value: m
|
|
4398
4398
|
},
|
|
4399
4399
|
yAxis: f,
|
|
4400
|
-
valueLabelFormatter:
|
|
4400
|
+
valueLabelFormatter: g
|
|
4401
4401
|
} = u;
|
|
4402
4402
|
if (!h) return;
|
|
4403
4403
|
const {
|
|
@@ -4405,7 +4405,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
4405
4405
|
metadata: { intervalSize: v, scrollOffset: b },
|
|
4406
4406
|
startBarIndex: w,
|
|
4407
4407
|
endBarIndex: Z,
|
|
4408
|
-
getLastVisibleBarIndex:
|
|
4408
|
+
getLastVisibleBarIndex: p
|
|
4409
4409
|
},
|
|
4410
4410
|
layersData: {
|
|
4411
4411
|
layerDataInstances: T
|
|
@@ -4417,19 +4417,19 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
4417
4417
|
for (let M = w; M <= Z; M++) {
|
|
4418
4418
|
const D = L[M];
|
|
4419
4419
|
if (!isNaN(D)) {
|
|
4420
|
-
const
|
|
4420
|
+
const $ = M * v - b;
|
|
4421
4421
|
P === void 0 ? po(
|
|
4422
4422
|
e,
|
|
4423
4423
|
I,
|
|
4424
4424
|
D,
|
|
4425
|
-
|
|
4425
|
+
$,
|
|
4426
4426
|
h
|
|
4427
4427
|
) : go(
|
|
4428
4428
|
e,
|
|
4429
4429
|
I,
|
|
4430
4430
|
D,
|
|
4431
|
-
|
|
4432
|
-
), P =
|
|
4431
|
+
$
|
|
4432
|
+
), P = $, S = M;
|
|
4433
4433
|
}
|
|
4434
4434
|
}
|
|
4435
4435
|
if (P && S >= 0 && vo(
|
|
@@ -4440,7 +4440,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
4440
4440
|
h
|
|
4441
4441
|
// lastBarIndex === lastBarIndexWithData,
|
|
4442
4442
|
), m && S >= 0) {
|
|
4443
|
-
const M =
|
|
4443
|
+
const M = p(S);
|
|
4444
4444
|
Be(
|
|
4445
4445
|
e,
|
|
4446
4446
|
o,
|
|
@@ -4449,7 +4449,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
4449
4449
|
n,
|
|
4450
4450
|
r,
|
|
4451
4451
|
f,
|
|
4452
|
-
|
|
4452
|
+
g,
|
|
4453
4453
|
s,
|
|
4454
4454
|
c,
|
|
4455
4455
|
a,
|
|
@@ -4475,7 +4475,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
4475
4475
|
price: {
|
|
4476
4476
|
output: "price",
|
|
4477
4477
|
label: "Price",
|
|
4478
|
-
valueSelector:
|
|
4478
|
+
valueSelector: oe("close")
|
|
4479
4479
|
}
|
|
4480
4480
|
};
|
|
4481
4481
|
return io(l, q4), {
|
|
@@ -4487,7 +4487,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
4487
4487
|
scale: e.scale ?? null,
|
|
4488
4488
|
scalePolicy: "fixed",
|
|
4489
4489
|
series: {
|
|
4490
|
-
value:
|
|
4490
|
+
value: z(e.series?.value, n.series.value)
|
|
4491
4491
|
},
|
|
4492
4492
|
valueToY: e.valueToY ?? pt.valueToY,
|
|
4493
4493
|
markers: {
|
|
@@ -4519,23 +4519,23 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
4519
4519
|
} = o;
|
|
4520
4520
|
if (!s) return;
|
|
4521
4521
|
const c = s[t].width, a = s[t].borderWidth, u = s[t].backgroundColor, d = s[t].borderColor, h = Math.round(r), m = Math.round(l), f = Math.round(m - h);
|
|
4522
|
-
let
|
|
4523
|
-
|
|
4524
|
-
const v = Math.round(n), b = Math.round(v -
|
|
4522
|
+
let g = Math.round(i * c);
|
|
4523
|
+
g % 2 === 0 && (g += 1);
|
|
4524
|
+
const v = Math.round(n), b = Math.round(v - g / 2);
|
|
4525
4525
|
if (f > 0)
|
|
4526
4526
|
if (a > 0) {
|
|
4527
|
-
e.fillStyle = d, e.fillRect(b, h,
|
|
4528
|
-
const w = b + a, Z = h + a,
|
|
4529
|
-
|
|
4527
|
+
e.fillStyle = d, e.fillRect(b, h, g, f);
|
|
4528
|
+
const w = b + a, Z = h + a, p = g - a * 2, T = f - a * 2;
|
|
4529
|
+
p > 0 && T > 0 && (e.fillStyle = u, e.fillRect(w, Z, p, T));
|
|
4530
4530
|
} else
|
|
4531
|
-
e.fillStyle = u, e.fillRect(b, h,
|
|
4531
|
+
e.fillStyle = u, e.fillRect(b, h, g, f);
|
|
4532
4532
|
}, th = (e, o, t, n, r, l, i, s, c, a) => {
|
|
4533
4533
|
const u = r, {
|
|
4534
4534
|
timeScale: {
|
|
4535
4535
|
metadata: { intervalSize: d, scrollOffset: h },
|
|
4536
4536
|
startBarIndex: m,
|
|
4537
4537
|
endBarIndex: f,
|
|
4538
|
-
getLastVisibleBarIndex:
|
|
4538
|
+
getLastVisibleBarIndex: g
|
|
4539
4539
|
},
|
|
4540
4540
|
dataMap: {
|
|
4541
4541
|
ohlcvs: {
|
|
@@ -4546,27 +4546,27 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
4546
4546
|
}
|
|
4547
4547
|
} = i, {
|
|
4548
4548
|
markers: Z,
|
|
4549
|
-
series:
|
|
4549
|
+
series: p,
|
|
4550
4550
|
yAxis: T,
|
|
4551
4551
|
valueLabelFormatter: y
|
|
4552
4552
|
} = u, k = Z?.value;
|
|
4553
|
-
if (!
|
|
4553
|
+
if (!p.bars || !s || !c || !a) return;
|
|
4554
4554
|
const {
|
|
4555
4555
|
paddedBottomPx: I
|
|
4556
4556
|
} = c, { valueToY: P } = a;
|
|
4557
4557
|
let S = -1;
|
|
4558
4558
|
for (let M = m; M <= f; M++) {
|
|
4559
|
-
const D = v[M],
|
|
4559
|
+
const D = v[M], $ = b[M], Y = w[M];
|
|
4560
4560
|
if (!isNaN(Y)) {
|
|
4561
|
-
const
|
|
4562
|
-
let
|
|
4563
|
-
|
|
4561
|
+
const U = M * d - h;
|
|
4562
|
+
let C;
|
|
4563
|
+
$ > D ? C = "up" : $ < D ? C = "down" : C = "flat";
|
|
4564
4564
|
const E = P(Y);
|
|
4565
4565
|
oh(
|
|
4566
4566
|
e,
|
|
4567
4567
|
u,
|
|
4568
|
-
|
|
4569
|
-
|
|
4568
|
+
C,
|
|
4569
|
+
U,
|
|
4570
4570
|
E,
|
|
4571
4571
|
I,
|
|
4572
4572
|
d
|
|
@@ -4574,7 +4574,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
4574
4574
|
}
|
|
4575
4575
|
}
|
|
4576
4576
|
if (k && S >= 0) {
|
|
4577
|
-
const M =
|
|
4577
|
+
const M = g(S);
|
|
4578
4578
|
Be(
|
|
4579
4579
|
e,
|
|
4580
4580
|
o,
|
|
@@ -4624,7 +4624,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
4624
4624
|
volume: {
|
|
4625
4625
|
output: "volume",
|
|
4626
4626
|
label: "",
|
|
4627
|
-
valueSelector:
|
|
4627
|
+
valueSelector: oe("volume")
|
|
4628
4628
|
}
|
|
4629
4629
|
};
|
|
4630
4630
|
return io(l, nh), {
|
|
@@ -4677,7 +4677,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
4677
4677
|
output: "value",
|
|
4678
4678
|
label: "",
|
|
4679
4679
|
color: typeof e.series?.value == "object" ? e.series.value.color : void 0,
|
|
4680
|
-
valueSelector:
|
|
4680
|
+
valueSelector: oe(`indicators.${a}.value`)
|
|
4681
4681
|
}
|
|
4682
4682
|
};
|
|
4683
4683
|
return io(s, bi), {
|
|
@@ -4697,7 +4697,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
4697
4697
|
inputs: s,
|
|
4698
4698
|
outputs: e.outputs ?? so.outputs,
|
|
4699
4699
|
series: {
|
|
4700
|
-
value:
|
|
4700
|
+
value: z(e.series?.value, n.series.value)
|
|
4701
4701
|
},
|
|
4702
4702
|
markers: {
|
|
4703
4703
|
value: ve(e.markers?.value, n.markers.value, u)
|
|
@@ -4712,26 +4712,26 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
4712
4712
|
} = l, s = "value", c = o.high.values, a = o.low.values, u = o.close.values, d = /* @__PURE__ */ new Map();
|
|
4713
4713
|
for (let h = n; h < r; h++) {
|
|
4714
4714
|
if (isNaN(u[h])) continue;
|
|
4715
|
-
const m = c[h], f = a[h],
|
|
4716
|
-
if (isNaN(
|
|
4715
|
+
const m = c[h], f = a[h], g = u[h - 1];
|
|
4716
|
+
if (isNaN(g))
|
|
4717
4717
|
d.set(h, m - f);
|
|
4718
4718
|
else {
|
|
4719
|
-
const v = m - f, b = Math.abs(m -
|
|
4719
|
+
const v = m - f, b = Math.abs(m - g), w = Math.abs(f - g);
|
|
4720
4720
|
d.set(h, Math.max(v, b, w));
|
|
4721
4721
|
}
|
|
4722
4722
|
}
|
|
4723
4723
|
for (let h = n; h < r; h++) {
|
|
4724
4724
|
const m = h - 1, f = t[s][m];
|
|
4725
4725
|
if (f !== void 0 && !isNaN(f)) {
|
|
4726
|
-
const
|
|
4727
|
-
|
|
4726
|
+
const g = d.get(h);
|
|
4727
|
+
g !== void 0 && (t[s][h] = (f * (i - 1) + g) / i);
|
|
4728
4728
|
} else {
|
|
4729
|
-
let
|
|
4729
|
+
let g = 0, v = 0;
|
|
4730
4730
|
for (let b = 0; b < i; b++) {
|
|
4731
4731
|
const w = h - b, Z = d.get(w);
|
|
4732
|
-
Z !== void 0 && (
|
|
4732
|
+
Z !== void 0 && (g += Z, v++);
|
|
4733
4733
|
}
|
|
4734
|
-
v === i && (t[s][h] =
|
|
4734
|
+
v === i && (t[s][h] = g / i);
|
|
4735
4735
|
}
|
|
4736
4736
|
}
|
|
4737
4737
|
}, ah = (e, o, t, n, r, l, i, s, c, a) => {
|
|
@@ -4746,7 +4746,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
4746
4746
|
value: m
|
|
4747
4747
|
},
|
|
4748
4748
|
yAxis: f,
|
|
4749
|
-
valueLabelFormatter:
|
|
4749
|
+
valueLabelFormatter: g
|
|
4750
4750
|
} = u;
|
|
4751
4751
|
if (!h) return;
|
|
4752
4752
|
const {
|
|
@@ -4754,7 +4754,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
4754
4754
|
metadata: { intervalSize: v, scrollOffset: b },
|
|
4755
4755
|
startBarIndex: w,
|
|
4756
4756
|
endBarIndex: Z,
|
|
4757
|
-
getLastVisibleBarIndex:
|
|
4757
|
+
getLastVisibleBarIndex: p
|
|
4758
4758
|
},
|
|
4759
4759
|
layersData: {
|
|
4760
4760
|
layerDataInstances: T
|
|
@@ -4766,19 +4766,19 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
4766
4766
|
for (let M = w; M <= Z; M++) {
|
|
4767
4767
|
const D = L[M];
|
|
4768
4768
|
if (!isNaN(D)) {
|
|
4769
|
-
const
|
|
4769
|
+
const $ = M * v - b;
|
|
4770
4770
|
P === void 0 ? po(
|
|
4771
4771
|
e,
|
|
4772
4772
|
I,
|
|
4773
4773
|
D,
|
|
4774
|
-
|
|
4774
|
+
$,
|
|
4775
4775
|
h
|
|
4776
4776
|
) : go(
|
|
4777
4777
|
e,
|
|
4778
4778
|
I,
|
|
4779
4779
|
D,
|
|
4780
|
-
|
|
4781
|
-
), P =
|
|
4780
|
+
$
|
|
4781
|
+
), P = $, S = M;
|
|
4782
4782
|
}
|
|
4783
4783
|
}
|
|
4784
4784
|
if (P && S >= 0 && vo(
|
|
@@ -4788,7 +4788,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
4788
4788
|
P,
|
|
4789
4789
|
h
|
|
4790
4790
|
), m && S >= 0) {
|
|
4791
|
-
const M =
|
|
4791
|
+
const M = p(S);
|
|
4792
4792
|
Be(
|
|
4793
4793
|
e,
|
|
4794
4794
|
o,
|
|
@@ -4797,7 +4797,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
4797
4797
|
n,
|
|
4798
4798
|
r,
|
|
4799
4799
|
f,
|
|
4800
|
-
|
|
4800
|
+
g,
|
|
4801
4801
|
s,
|
|
4802
4802
|
c,
|
|
4803
4803
|
a,
|
|
@@ -4810,7 +4810,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
4810
4810
|
parseConfig: ih,
|
|
4811
4811
|
calculate2: sh,
|
|
4812
4812
|
draw: ah
|
|
4813
|
-
}, uh = ["input"],
|
|
4813
|
+
}, uh = ["input"], ae = {
|
|
4814
4814
|
...ko,
|
|
4815
4815
|
id: "bollinger-bands-layer",
|
|
4816
4816
|
defaultScale: { key: "price_auto", domain: "price", range: { type: "auto" } },
|
|
@@ -4838,24 +4838,24 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
4838
4838
|
}
|
|
4839
4839
|
}
|
|
4840
4840
|
}, dh = (e, o, t) => {
|
|
4841
|
-
const n = o.bollingerBands, r = Sn("input", e.inputs, e.source,
|
|
4841
|
+
const n = o.bollingerBands, r = Sn("input", e.inputs, e.source, ae.inputs), l = e.period ?? ae.period, i = e.id ?? `${ae.id}_${t}_${l}`, s = e.standardDeviations ?? ae.standardDeviations, c = typeof e.series?.middle == "object" ? e.series.middle.color : void 0, a = n.bands.channel.fillColor ?? ae.bands.channel?.fillColor ?? "rgba(0, 100, 200, 0.1)", u = `BB ${l} ${s}`, d = {
|
|
4842
4842
|
upper: {
|
|
4843
4843
|
output: "upper",
|
|
4844
4844
|
label: "",
|
|
4845
4845
|
color: typeof e.series?.upper == "object" ? e.series.upper.color : void 0,
|
|
4846
|
-
valueSelector:
|
|
4846
|
+
valueSelector: oe(`indicators.${i}.upper`)
|
|
4847
4847
|
},
|
|
4848
4848
|
middle: {
|
|
4849
4849
|
output: "middle",
|
|
4850
4850
|
label: "",
|
|
4851
4851
|
color: typeof e.series?.middle == "object" ? e.series.middle.color : void 0,
|
|
4852
|
-
valueSelector:
|
|
4852
|
+
valueSelector: oe(`indicators.${i}.middle`)
|
|
4853
4853
|
},
|
|
4854
4854
|
lower: {
|
|
4855
4855
|
output: "lower",
|
|
4856
4856
|
label: "",
|
|
4857
4857
|
color: typeof e.series?.lower == "object" ? e.series.lower.color : void 0,
|
|
4858
|
-
valueSelector:
|
|
4858
|
+
valueSelector: oe(`indicators.${i}.lower`)
|
|
4859
4859
|
}
|
|
4860
4860
|
};
|
|
4861
4861
|
return io(r, uh), {
|
|
@@ -4863,22 +4863,22 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
4863
4863
|
type: "bollinger-bands",
|
|
4864
4864
|
requiredInputKeys: ["input"],
|
|
4865
4865
|
indicator: !0,
|
|
4866
|
-
defaultScale:
|
|
4866
|
+
defaultScale: ae.defaultScale,
|
|
4867
4867
|
scale: e.scale ?? null,
|
|
4868
4868
|
scalePolicy: "derived",
|
|
4869
4869
|
period: l,
|
|
4870
|
-
lookback: st(l, e.lookback ??
|
|
4871
|
-
calculate: e.calculate ??
|
|
4872
|
-
includeInAutoScale: e.includeInAutoScale ??
|
|
4873
|
-
valueToY: e.valueToY ??
|
|
4870
|
+
lookback: st(l, e.lookback ?? ae.lookback),
|
|
4871
|
+
calculate: e.calculate ?? ae.calculate,
|
|
4872
|
+
includeInAutoScale: e.includeInAutoScale ?? ae.includeInAutoScale,
|
|
4873
|
+
valueToY: e.valueToY ?? ae.valueToY,
|
|
4874
4874
|
inputs: r,
|
|
4875
|
-
outputs: e.outputs ??
|
|
4875
|
+
outputs: e.outputs ?? ae.outputs,
|
|
4876
4876
|
standardDeviations: s,
|
|
4877
|
-
offset: e.offset ??
|
|
4877
|
+
offset: e.offset ?? ae.offset,
|
|
4878
4878
|
series: {
|
|
4879
|
-
middle:
|
|
4880
|
-
upper:
|
|
4881
|
-
lower:
|
|
4879
|
+
middle: z(e.series?.middle, n.series.middle ?? ae.series.middle),
|
|
4880
|
+
upper: z(e.series?.upper, n.series.upper ?? ae.series.upper),
|
|
4881
|
+
lower: z(e.series?.lower, n.series.lower ?? ae.series.lower)
|
|
4882
4882
|
},
|
|
4883
4883
|
bands: {
|
|
4884
4884
|
channel: e.bands?.channel === !1 ? null : {
|
|
@@ -4890,7 +4890,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
4890
4890
|
},
|
|
4891
4891
|
legend: ro(e.legend, { ...n.legend, label: u }, d),
|
|
4892
4892
|
yAxis: lo(e.yAxis, n.yAxis),
|
|
4893
|
-
valueLabelFormatter: e.valueLabelFormatter ??
|
|
4893
|
+
valueLabelFormatter: e.valueLabelFormatter ?? ae.valueLabelFormatter
|
|
4894
4894
|
};
|
|
4895
4895
|
}, hh = (e, o, t, n, r) => {
|
|
4896
4896
|
const l = e, {
|
|
@@ -4899,21 +4899,21 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
4899
4899
|
} = l, c = "middle", a = "lower", u = "upper", d = o.input.values;
|
|
4900
4900
|
for (let h = n; h < r; h++) {
|
|
4901
4901
|
let m = 0, f = 0;
|
|
4902
|
-
const
|
|
4902
|
+
const g = [];
|
|
4903
4903
|
for (let v = 0; v < i; v++) {
|
|
4904
4904
|
const b = h - v, w = d[b];
|
|
4905
|
-
isNaN(w) || (
|
|
4905
|
+
isNaN(w) || (g.push(w), m += w, f++);
|
|
4906
4906
|
}
|
|
4907
4907
|
if (f === i) {
|
|
4908
4908
|
const v = m / i;
|
|
4909
4909
|
t[c][h] = v;
|
|
4910
4910
|
let b = 0;
|
|
4911
|
-
for (let T = 0; T <
|
|
4912
|
-
const y =
|
|
4911
|
+
for (let T = 0; T < g.length; T++) {
|
|
4912
|
+
const y = g[T] - v;
|
|
4913
4913
|
b += y * y;
|
|
4914
4914
|
}
|
|
4915
|
-
const w = b / i,
|
|
4916
|
-
t[u][h] = v +
|
|
4915
|
+
const w = b / i, p = Math.sqrt(w) * s;
|
|
4916
|
+
t[u][h] = v + p, t[a][h] = v - p;
|
|
4917
4917
|
}
|
|
4918
4918
|
}
|
|
4919
4919
|
}, mh = (e, o, t, n, r, l, i, s, c, a) => {
|
|
@@ -4925,7 +4925,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
4925
4925
|
series: {
|
|
4926
4926
|
upper: m,
|
|
4927
4927
|
middle: f,
|
|
4928
|
-
lower:
|
|
4928
|
+
lower: g
|
|
4929
4929
|
},
|
|
4930
4930
|
bands: {
|
|
4931
4931
|
channel: v
|
|
@@ -4936,10 +4936,10 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
4936
4936
|
yAxis: w,
|
|
4937
4937
|
valueLabelFormatter: Z
|
|
4938
4938
|
} = u;
|
|
4939
|
-
if (!m && !f && !
|
|
4939
|
+
if (!m && !f && !g) return;
|
|
4940
4940
|
const {
|
|
4941
4941
|
timeScale: {
|
|
4942
|
-
metadata: { intervalSize:
|
|
4942
|
+
metadata: { intervalSize: p, scrollOffset: T },
|
|
4943
4943
|
startBarIndex: y,
|
|
4944
4944
|
endBarIndex: k,
|
|
4945
4945
|
getLastVisibleBarIndex: L
|
|
@@ -4949,57 +4949,57 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
4949
4949
|
}
|
|
4950
4950
|
} = i, P = I[d];
|
|
4951
4951
|
if (!P) return;
|
|
4952
|
-
const { outputValues: S } = P, M = S.middle ?? S.mid, D = S.lower,
|
|
4953
|
-
if (!M || !D ||
|
|
4952
|
+
const { outputValues: S } = P, M = S.middle ?? S.mid, D = S.lower, $ = S.upper;
|
|
4953
|
+
if (!M || !D || !$) return;
|
|
4954
4954
|
const { valueToY: Y } = a;
|
|
4955
4955
|
e.save();
|
|
4956
|
-
const
|
|
4957
|
-
const
|
|
4958
|
-
e.beginPath(), e.strokeStyle =
|
|
4959
|
-
let j = 0,
|
|
4960
|
-
for (let
|
|
4961
|
-
const
|
|
4962
|
-
if (!isNaN(
|
|
4963
|
-
const De = (
|
|
4964
|
-
|
|
4956
|
+
const U = (E, A, x, N, B) => {
|
|
4957
|
+
const F = S[E];
|
|
4958
|
+
e.beginPath(), e.strokeStyle = A, e.lineWidth = x, N === "dashed" && B && e.setLineDash(B);
|
|
4959
|
+
let j = 0, V = !0, ie = -1;
|
|
4960
|
+
for (let K = y; K <= k; K++) {
|
|
4961
|
+
const se = F[K];
|
|
4962
|
+
if (!isNaN(se)) {
|
|
4963
|
+
const De = (K + h) * p - T, fe = Y(se);
|
|
4964
|
+
V ? (e.moveTo(De, fe), V = !1) : e.lineTo(De, fe), j++, ie = K;
|
|
4965
4965
|
}
|
|
4966
4966
|
}
|
|
4967
|
-
return j > 0 && e.stroke(), e.setLineDash([]),
|
|
4967
|
+
return j > 0 && e.stroke(), e.setLineDash([]), ie;
|
|
4968
4968
|
};
|
|
4969
4969
|
if (v) {
|
|
4970
4970
|
e.beginPath(), e.fillStyle = v.fillColor;
|
|
4971
4971
|
let E = !1;
|
|
4972
|
-
for (let
|
|
4973
|
-
const x =
|
|
4972
|
+
for (let A = y; A <= k; A++) {
|
|
4973
|
+
const x = $[A];
|
|
4974
4974
|
if (!isNaN(x)) {
|
|
4975
|
-
const
|
|
4976
|
-
E ? e.lineTo(
|
|
4975
|
+
const N = (A + h) * p - T, B = Y(x);
|
|
4976
|
+
E ? e.lineTo(N, B) : (e.moveTo(N, B), E = !0);
|
|
4977
4977
|
}
|
|
4978
4978
|
}
|
|
4979
|
-
for (let
|
|
4980
|
-
const x = D[
|
|
4979
|
+
for (let A = k; A >= y; A--) {
|
|
4980
|
+
const x = D[A];
|
|
4981
4981
|
if (!isNaN(x)) {
|
|
4982
|
-
const
|
|
4983
|
-
e.lineTo(
|
|
4982
|
+
const N = (A + h) * p - T, B = Y(x);
|
|
4983
|
+
e.lineTo(N, B);
|
|
4984
4984
|
}
|
|
4985
4985
|
}
|
|
4986
4986
|
e.closePath(), e.fill();
|
|
4987
4987
|
}
|
|
4988
|
-
let
|
|
4988
|
+
let C = -1;
|
|
4989
4989
|
if (m) {
|
|
4990
|
-
const { color: E, width:
|
|
4991
|
-
|
|
4990
|
+
const { color: E, width: A, style: x, dashes: N } = m;
|
|
4991
|
+
U("upper", E, A, x, N);
|
|
4992
4992
|
}
|
|
4993
|
-
if (
|
|
4994
|
-
const { color: E, width:
|
|
4995
|
-
|
|
4993
|
+
if (g) {
|
|
4994
|
+
const { color: E, width: A, style: x, dashes: N } = g;
|
|
4995
|
+
U("lower", E, A, x, N);
|
|
4996
4996
|
}
|
|
4997
4997
|
if (f) {
|
|
4998
|
-
const { color: E, width:
|
|
4999
|
-
|
|
4998
|
+
const { color: E, width: A, style: x, dashes: N } = f;
|
|
4999
|
+
C = U("middle", E, A, x, N);
|
|
5000
5000
|
}
|
|
5001
|
-
if (e.restore(), b &&
|
|
5002
|
-
const E = L(
|
|
5001
|
+
if (e.restore(), b && C >= 0) {
|
|
5002
|
+
const E = L(C);
|
|
5003
5003
|
Be(
|
|
5004
5004
|
e,
|
|
5005
5005
|
o,
|
|
@@ -5045,7 +5045,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
5045
5045
|
output: "value",
|
|
5046
5046
|
label: "",
|
|
5047
5047
|
color: typeof e.series?.value == "object" ? e.series.value.color : void 0,
|
|
5048
|
-
valueSelector:
|
|
5048
|
+
valueSelector: oe(`indicators.${i}.value`)
|
|
5049
5049
|
}
|
|
5050
5050
|
};
|
|
5051
5051
|
return io(r, ph), {
|
|
@@ -5065,7 +5065,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
5065
5065
|
outputs: e.outputs ?? Ce.outputs,
|
|
5066
5066
|
offset: e.offset ?? Ce.offset,
|
|
5067
5067
|
series: {
|
|
5068
|
-
value:
|
|
5068
|
+
value: z(e.series?.value, n.series.value ?? Ce.series.value)
|
|
5069
5069
|
},
|
|
5070
5070
|
markers: {
|
|
5071
5071
|
value: ve(e.markers?.value, n.markers.value, s)
|
|
@@ -5085,12 +5085,12 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
5085
5085
|
if (m !== void 0 && !isNaN(m))
|
|
5086
5086
|
t[s][u] = d * a + m * (1 - a);
|
|
5087
5087
|
else {
|
|
5088
|
-
let f = 0,
|
|
5088
|
+
let f = 0, g = 0;
|
|
5089
5089
|
for (let v = 0; v < i; v++) {
|
|
5090
5090
|
const b = u - v, w = c[b];
|
|
5091
|
-
isNaN(w) || (f += w,
|
|
5091
|
+
isNaN(w) || (f += w, g++);
|
|
5092
5092
|
}
|
|
5093
|
-
|
|
5093
|
+
g === i && (t[s][u] = f / i);
|
|
5094
5094
|
}
|
|
5095
5095
|
}
|
|
5096
5096
|
}, wh = (e, o, t, n, r, l, i, s, c, a) => {
|
|
@@ -5105,7 +5105,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
5105
5105
|
markers: {
|
|
5106
5106
|
value: f
|
|
5107
5107
|
},
|
|
5108
|
-
yAxis:
|
|
5108
|
+
yAxis: g,
|
|
5109
5109
|
valueLabelFormatter: v
|
|
5110
5110
|
} = u;
|
|
5111
5111
|
if (!m) return;
|
|
@@ -5113,7 +5113,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
5113
5113
|
timeScale: {
|
|
5114
5114
|
metadata: { intervalSize: b, scrollOffset: w },
|
|
5115
5115
|
startBarIndex: Z,
|
|
5116
|
-
endBarIndex:
|
|
5116
|
+
endBarIndex: p,
|
|
5117
5117
|
getLastVisibleBarIndex: T
|
|
5118
5118
|
},
|
|
5119
5119
|
layersData: {
|
|
@@ -5123,20 +5123,20 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
5123
5123
|
if (!k) return;
|
|
5124
5124
|
const { outputValues: L } = k, I = L.value, { valueToY: P } = a;
|
|
5125
5125
|
let S, M = -1;
|
|
5126
|
-
for (let D = Z; D <=
|
|
5127
|
-
const
|
|
5128
|
-
if (!isNaN(
|
|
5126
|
+
for (let D = Z; D <= p; D++) {
|
|
5127
|
+
const $ = I[D];
|
|
5128
|
+
if (!isNaN($)) {
|
|
5129
5129
|
const Y = (D + h) * b - w;
|
|
5130
5130
|
S === void 0 ? po(
|
|
5131
5131
|
e,
|
|
5132
5132
|
P,
|
|
5133
|
-
|
|
5133
|
+
$,
|
|
5134
5134
|
Y,
|
|
5135
5135
|
m
|
|
5136
5136
|
) : go(
|
|
5137
5137
|
e,
|
|
5138
5138
|
P,
|
|
5139
|
-
|
|
5139
|
+
$,
|
|
5140
5140
|
Y
|
|
5141
5141
|
), S = Y, M = D;
|
|
5142
5142
|
}
|
|
@@ -5156,7 +5156,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
5156
5156
|
t,
|
|
5157
5157
|
n,
|
|
5158
5158
|
r,
|
|
5159
|
-
|
|
5159
|
+
g,
|
|
5160
5160
|
v,
|
|
5161
5161
|
s,
|
|
5162
5162
|
c,
|
|
@@ -5176,59 +5176,59 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
5176
5176
|
period: s = 12,
|
|
5177
5177
|
slowPeriod: c = 26,
|
|
5178
5178
|
signalPeriod: a = 9
|
|
5179
|
-
} = l, u = i ?? s, d = "macd", h = "signal", m = "histogram", f = o.input.values,
|
|
5180
|
-
for (let
|
|
5181
|
-
const T = f[
|
|
5179
|
+
} = l, u = i ?? s, d = "macd", h = "signal", m = "histogram", f = o.input.values, g = 2 / (u + 1), v = 2 / (c + 1), b = 2 / (a + 1), w = /* @__PURE__ */ new Map(), Z = /* @__PURE__ */ new Map();
|
|
5180
|
+
for (let p = n; p < r; p++) {
|
|
5181
|
+
const T = f[p];
|
|
5182
5182
|
if (isNaN(T)) continue;
|
|
5183
|
-
const y =
|
|
5183
|
+
const y = p - 1, k = w.get(y);
|
|
5184
5184
|
if (k !== void 0 && !isNaN(k) && k !== 0)
|
|
5185
|
-
w.set(
|
|
5185
|
+
w.set(p, T * g + k * (1 - g));
|
|
5186
5186
|
else {
|
|
5187
5187
|
let L = 0, I = 0;
|
|
5188
5188
|
for (let P = 0; P < u; P++) {
|
|
5189
|
-
const S =
|
|
5189
|
+
const S = p - P, M = f[S];
|
|
5190
5190
|
isNaN(M) || (L += M, I++);
|
|
5191
5191
|
}
|
|
5192
|
-
I === u && w.set(
|
|
5192
|
+
I === u && w.set(p, L / u);
|
|
5193
5193
|
}
|
|
5194
5194
|
}
|
|
5195
|
-
for (let
|
|
5196
|
-
const T = f[
|
|
5195
|
+
for (let p = n; p < r; p++) {
|
|
5196
|
+
const T = f[p];
|
|
5197
5197
|
if (isNaN(T)) continue;
|
|
5198
|
-
const y =
|
|
5198
|
+
const y = p - 1, k = Z.get(y);
|
|
5199
5199
|
if (k !== void 0 && !isNaN(k) && k !== 0)
|
|
5200
|
-
Z.set(
|
|
5200
|
+
Z.set(p, T * v + k * (1 - v));
|
|
5201
5201
|
else {
|
|
5202
5202
|
let L = 0, I = 0;
|
|
5203
5203
|
for (let P = 0; P < c; P++) {
|
|
5204
|
-
const S =
|
|
5204
|
+
const S = p - P, M = f[S];
|
|
5205
5205
|
isNaN(M) || (L += M, I++);
|
|
5206
5206
|
}
|
|
5207
|
-
I === c && Z.set(
|
|
5207
|
+
I === c && Z.set(p, L / c);
|
|
5208
5208
|
}
|
|
5209
5209
|
}
|
|
5210
|
-
for (let
|
|
5211
|
-
const T = w.get(
|
|
5212
|
-
T !== void 0 && !isNaN(T) && T !== 0 && y !== void 0 && !isNaN(y) && y !== 0 && (t[d][
|
|
5210
|
+
for (let p = n; p < r; p++) {
|
|
5211
|
+
const T = w.get(p), y = Z.get(p);
|
|
5212
|
+
T !== void 0 && !isNaN(T) && T !== 0 && y !== void 0 && !isNaN(y) && y !== 0 && (t[d][p] = T - y);
|
|
5213
5213
|
}
|
|
5214
|
-
for (let
|
|
5215
|
-
const T = t[d][
|
|
5214
|
+
for (let p = n; p < r; p++) {
|
|
5215
|
+
const T = t[d][p];
|
|
5216
5216
|
if (T === void 0 || isNaN(T)) continue;
|
|
5217
|
-
const y =
|
|
5217
|
+
const y = p - 1, k = t[h][y];
|
|
5218
5218
|
if (k !== void 0 && !isNaN(k) && k !== 0)
|
|
5219
|
-
t[h][
|
|
5219
|
+
t[h][p] = T * b + k * (1 - b);
|
|
5220
5220
|
else {
|
|
5221
5221
|
let L = 0, I = 0;
|
|
5222
5222
|
for (let P = 0; P < a; P++) {
|
|
5223
|
-
const S =
|
|
5223
|
+
const S = p - P, M = t[d][S];
|
|
5224
5224
|
M !== void 0 && !isNaN(M) && (L += M, I++);
|
|
5225
5225
|
}
|
|
5226
|
-
I === a && (t[h][
|
|
5226
|
+
I === a && (t[h][p] = L / a);
|
|
5227
5227
|
}
|
|
5228
5228
|
}
|
|
5229
|
-
for (let
|
|
5230
|
-
const T = t[d][
|
|
5231
|
-
T !== void 0 && !isNaN(T) && y !== void 0 && !isNaN(y) && (t[m][
|
|
5229
|
+
for (let p = n; p < r; p++) {
|
|
5230
|
+
const T = t[d][p], y = t[h][p];
|
|
5231
|
+
T !== void 0 && !isNaN(T) && y !== void 0 && !isNaN(y) && (t[m][p] = T - y);
|
|
5232
5232
|
}
|
|
5233
5233
|
}, yi = (e, o, t, n, r, l, i) => {
|
|
5234
5234
|
const {
|
|
@@ -5246,7 +5246,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
5246
5246
|
macd: h,
|
|
5247
5247
|
signal: m,
|
|
5248
5248
|
histogramUp: f,
|
|
5249
|
-
histogramDown:
|
|
5249
|
+
histogramDown: g
|
|
5250
5250
|
},
|
|
5251
5251
|
markers: {
|
|
5252
5252
|
macd: v,
|
|
@@ -5255,10 +5255,10 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
5255
5255
|
yAxis: w,
|
|
5256
5256
|
valueLabelFormatter: Z
|
|
5257
5257
|
} = u;
|
|
5258
|
-
if (!h && !m && !f && !
|
|
5258
|
+
if (!h && !m && !f && !g) return;
|
|
5259
5259
|
const {
|
|
5260
5260
|
timeScale: {
|
|
5261
|
-
metadata: { intervalSize:
|
|
5261
|
+
metadata: { intervalSize: p, scrollOffset: T },
|
|
5262
5262
|
startBarIndex: y,
|
|
5263
5263
|
endBarIndex: k,
|
|
5264
5264
|
getLastVisibleBarIndex: L
|
|
@@ -5268,91 +5268,91 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
5268
5268
|
}
|
|
5269
5269
|
} = i, P = I[d];
|
|
5270
5270
|
if (!P) return;
|
|
5271
|
-
const { outputValues: S } = P, M = S.macd, D = S.signal,
|
|
5272
|
-
let
|
|
5271
|
+
const { outputValues: S } = P, M = S.macd, D = S.signal, $ = S.histogram, { valueToY: Y } = a;
|
|
5272
|
+
let U = -1;
|
|
5273
5273
|
if (h) {
|
|
5274
5274
|
let E;
|
|
5275
|
-
for (let
|
|
5276
|
-
const x = M[
|
|
5275
|
+
for (let A = y; A <= k; A++) {
|
|
5276
|
+
const x = M[A];
|
|
5277
5277
|
if (!isNaN(x)) {
|
|
5278
|
-
const
|
|
5278
|
+
const N = A * p - T;
|
|
5279
5279
|
E === void 0 ? po(
|
|
5280
5280
|
e,
|
|
5281
5281
|
Y,
|
|
5282
5282
|
x,
|
|
5283
|
-
|
|
5283
|
+
N,
|
|
5284
5284
|
h
|
|
5285
5285
|
) : go(
|
|
5286
5286
|
e,
|
|
5287
5287
|
Y,
|
|
5288
5288
|
x,
|
|
5289
|
-
|
|
5290
|
-
), E =
|
|
5289
|
+
N
|
|
5290
|
+
), E = N, U = A;
|
|
5291
5291
|
}
|
|
5292
5292
|
}
|
|
5293
|
-
E &&
|
|
5293
|
+
E && U >= 0 && vo(
|
|
5294
5294
|
e,
|
|
5295
5295
|
Y,
|
|
5296
|
-
M[
|
|
5296
|
+
M[U],
|
|
5297
5297
|
E,
|
|
5298
5298
|
h
|
|
5299
5299
|
);
|
|
5300
5300
|
}
|
|
5301
|
-
let
|
|
5301
|
+
let C = -1;
|
|
5302
5302
|
if (m) {
|
|
5303
5303
|
let E;
|
|
5304
|
-
for (let
|
|
5305
|
-
const x = D[
|
|
5304
|
+
for (let A = y; A <= k; A++) {
|
|
5305
|
+
const x = D[A];
|
|
5306
5306
|
if (!isNaN(x)) {
|
|
5307
|
-
const
|
|
5307
|
+
const N = A * p - T;
|
|
5308
5308
|
E === void 0 ? po(
|
|
5309
5309
|
e,
|
|
5310
5310
|
Y,
|
|
5311
5311
|
x,
|
|
5312
|
-
|
|
5312
|
+
N,
|
|
5313
5313
|
m
|
|
5314
5314
|
) : go(
|
|
5315
5315
|
e,
|
|
5316
5316
|
Y,
|
|
5317
5317
|
x,
|
|
5318
|
-
|
|
5319
|
-
), E =
|
|
5318
|
+
N
|
|
5319
|
+
), E = N, C = A;
|
|
5320
5320
|
}
|
|
5321
5321
|
}
|
|
5322
|
-
E &&
|
|
5322
|
+
E && C >= 0 && vo(
|
|
5323
5323
|
e,
|
|
5324
5324
|
Y,
|
|
5325
|
-
D[
|
|
5325
|
+
D[C],
|
|
5326
5326
|
E,
|
|
5327
5327
|
m
|
|
5328
5328
|
);
|
|
5329
5329
|
}
|
|
5330
|
-
if (f &&
|
|
5330
|
+
if (f && g)
|
|
5331
5331
|
for (let E = y; E <= k; E++) {
|
|
5332
|
-
const
|
|
5333
|
-
if (!isNaN(
|
|
5334
|
-
const x = E *
|
|
5335
|
-
|
|
5332
|
+
const A = $[E];
|
|
5333
|
+
if (!isNaN(A)) {
|
|
5334
|
+
const x = E * p - T, N = A >= 0 ? f.width : g.width, B = Math.max(1, Math.round(p * N)), F = x - B / 2;
|
|
5335
|
+
A >= 0 ? yi(
|
|
5336
5336
|
e,
|
|
5337
5337
|
Y,
|
|
5338
|
-
|
|
5338
|
+
A,
|
|
5339
5339
|
0,
|
|
5340
|
-
|
|
5341
|
-
|
|
5340
|
+
F,
|
|
5341
|
+
B,
|
|
5342
5342
|
f
|
|
5343
5343
|
) : yi(
|
|
5344
5344
|
e,
|
|
5345
5345
|
Y,
|
|
5346
|
-
|
|
5346
|
+
A,
|
|
5347
5347
|
0,
|
|
5348
|
-
|
|
5349
|
-
|
|
5350
|
-
|
|
5348
|
+
F,
|
|
5349
|
+
B,
|
|
5350
|
+
g
|
|
5351
5351
|
);
|
|
5352
5352
|
}
|
|
5353
5353
|
}
|
|
5354
|
-
if (b &&
|
|
5355
|
-
const E = L(
|
|
5354
|
+
if (b && C >= 0) {
|
|
5355
|
+
const E = L(C);
|
|
5356
5356
|
Be(
|
|
5357
5357
|
e,
|
|
5358
5358
|
o,
|
|
@@ -5370,8 +5370,8 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
5370
5370
|
M[E]
|
|
5371
5371
|
);
|
|
5372
5372
|
}
|
|
5373
|
-
if (v &&
|
|
5374
|
-
const E = L(
|
|
5373
|
+
if (v && U >= 0) {
|
|
5374
|
+
const E = L(U);
|
|
5375
5375
|
Be(
|
|
5376
5376
|
e,
|
|
5377
5377
|
o,
|
|
@@ -5412,18 +5412,18 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
5412
5412
|
output: "macd",
|
|
5413
5413
|
label: "",
|
|
5414
5414
|
color: typeof e.series?.macd == "object" ? e.series.macd.color : void 0,
|
|
5415
|
-
valueSelector:
|
|
5415
|
+
valueSelector: oe(`indicators.${c}.macd`)
|
|
5416
5416
|
},
|
|
5417
5417
|
signal: {
|
|
5418
5418
|
output: "signal",
|
|
5419
5419
|
label: "",
|
|
5420
5420
|
color: typeof e.series?.signal == "object" ? e.series.signal.color : void 0,
|
|
5421
|
-
valueSelector:
|
|
5421
|
+
valueSelector: oe(`indicators.${c}.signal`)
|
|
5422
5422
|
},
|
|
5423
5423
|
histogram: {
|
|
5424
5424
|
output: "histogram",
|
|
5425
5425
|
label: "",
|
|
5426
|
-
valueSelector:
|
|
5426
|
+
valueSelector: oe(`indicators.${c}.histogram`)
|
|
5427
5427
|
}
|
|
5428
5428
|
};
|
|
5429
5429
|
return io(r, Zh), {
|
|
@@ -5447,8 +5447,8 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
5447
5447
|
inputs: r,
|
|
5448
5448
|
outputs: e.outputs ?? Ne.outputs,
|
|
5449
5449
|
series: {
|
|
5450
|
-
macd:
|
|
5451
|
-
signal:
|
|
5450
|
+
macd: z(e.series?.macd, n.series.macd),
|
|
5451
|
+
signal: z(e.series?.signal, n.series.signal),
|
|
5452
5452
|
histogramUp: zt(e.series?.histogramUp, n.series.histogramUp),
|
|
5453
5453
|
histogramDown: zt(e.series?.histogramDown, n.series.histogramDown)
|
|
5454
5454
|
},
|
|
@@ -5473,7 +5473,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
5473
5473
|
if (isNaN(h)) continue;
|
|
5474
5474
|
const m = d - 1, f = c[m];
|
|
5475
5475
|
if (isNaN(f)) continue;
|
|
5476
|
-
const
|
|
5476
|
+
const g = h - f, v = g > 0 ? g : 0, b = g < 0 ? -g : 0, w = a.get(m), Z = u.get(m);
|
|
5477
5477
|
if (w !== void 0 && !isNaN(w) && w !== 0 && Z !== void 0 && !isNaN(Z))
|
|
5478
5478
|
a.set(d, (w * (i - 1) + v) / i), u.set(d, (Z * (i - 1) + b) / i);
|
|
5479
5479
|
else {
|
|
@@ -5481,18 +5481,18 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
5481
5481
|
for (let I = 1; I <= i; I++) {
|
|
5482
5482
|
const P = d - I + 1, S = c[P], M = P - 1, D = c[M];
|
|
5483
5483
|
if (!isNaN(S) && !isNaN(D)) {
|
|
5484
|
-
const
|
|
5485
|
-
|
|
5484
|
+
const $ = S - D;
|
|
5485
|
+
$ > 0 ? y += $ : $ < 0 && (k += -$), L++;
|
|
5486
5486
|
}
|
|
5487
5487
|
}
|
|
5488
5488
|
L === i && (a.set(d, y / i), u.set(d, k / i));
|
|
5489
5489
|
}
|
|
5490
|
-
const
|
|
5491
|
-
if (
|
|
5490
|
+
const p = a.get(d), T = u.get(d);
|
|
5491
|
+
if (p !== void 0 && !isNaN(p) && T !== void 0 && !isNaN(T))
|
|
5492
5492
|
if (T === 0)
|
|
5493
5493
|
t[s][d] = 100;
|
|
5494
5494
|
else {
|
|
5495
|
-
const y =
|
|
5495
|
+
const y = p / T;
|
|
5496
5496
|
t[s][d] = 100 - 100 / (1 + y);
|
|
5497
5497
|
}
|
|
5498
5498
|
}
|
|
@@ -5508,7 +5508,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
5508
5508
|
value: m
|
|
5509
5509
|
},
|
|
5510
5510
|
yAxis: f,
|
|
5511
|
-
valueLabelFormatter:
|
|
5511
|
+
valueLabelFormatter: g
|
|
5512
5512
|
} = u;
|
|
5513
5513
|
if (!h) return;
|
|
5514
5514
|
const {
|
|
@@ -5516,7 +5516,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
5516
5516
|
metadata: { intervalSize: v, scrollOffset: b },
|
|
5517
5517
|
startBarIndex: w,
|
|
5518
5518
|
endBarIndex: Z,
|
|
5519
|
-
getLastVisibleBarIndex:
|
|
5519
|
+
getLastVisibleBarIndex: p
|
|
5520
5520
|
},
|
|
5521
5521
|
layersData: {
|
|
5522
5522
|
layerDataInstances: T
|
|
@@ -5528,19 +5528,19 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
5528
5528
|
for (let M = w; M <= Z; M++) {
|
|
5529
5529
|
const D = L[M];
|
|
5530
5530
|
if (!isNaN(D)) {
|
|
5531
|
-
const
|
|
5531
|
+
const $ = M * v - b;
|
|
5532
5532
|
P === void 0 ? po(
|
|
5533
5533
|
e,
|
|
5534
5534
|
I,
|
|
5535
5535
|
D,
|
|
5536
|
-
|
|
5536
|
+
$,
|
|
5537
5537
|
h
|
|
5538
5538
|
) : go(
|
|
5539
5539
|
e,
|
|
5540
5540
|
I,
|
|
5541
5541
|
D,
|
|
5542
|
-
|
|
5543
|
-
), P =
|
|
5542
|
+
$
|
|
5543
|
+
), P = $, S = M;
|
|
5544
5544
|
}
|
|
5545
5545
|
}
|
|
5546
5546
|
if (P && S >= 0 && vo(
|
|
@@ -5550,7 +5550,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
5550
5550
|
P,
|
|
5551
5551
|
h
|
|
5552
5552
|
), m && S >= 0) {
|
|
5553
|
-
const M =
|
|
5553
|
+
const M = p(S);
|
|
5554
5554
|
Be(
|
|
5555
5555
|
e,
|
|
5556
5556
|
o,
|
|
@@ -5559,7 +5559,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
5559
5559
|
n,
|
|
5560
5560
|
r,
|
|
5561
5561
|
f,
|
|
5562
|
-
|
|
5562
|
+
g,
|
|
5563
5563
|
s,
|
|
5564
5564
|
c,
|
|
5565
5565
|
a,
|
|
@@ -5590,7 +5590,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
5590
5590
|
output: "value",
|
|
5591
5591
|
label: "",
|
|
5592
5592
|
color: typeof e.series?.value == "object" ? e.series.value.color : void 0,
|
|
5593
|
-
valueSelector:
|
|
5593
|
+
valueSelector: oe(`indicators.${i}.value`)
|
|
5594
5594
|
}
|
|
5595
5595
|
};
|
|
5596
5596
|
return io(r, Mh), {
|
|
@@ -5611,7 +5611,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
5611
5611
|
inputs: r,
|
|
5612
5612
|
outputs: e.outputs ?? He.outputs,
|
|
5613
5613
|
series: {
|
|
5614
|
-
value:
|
|
5614
|
+
value: z(e.series?.value, n.series.value ?? He.series.value)
|
|
5615
5615
|
},
|
|
5616
5616
|
markers: {
|
|
5617
5617
|
value: ve(e.markers?.value, n.markers.value, s)
|
|
@@ -5648,7 +5648,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
5648
5648
|
markers: {
|
|
5649
5649
|
value: f
|
|
5650
5650
|
},
|
|
5651
|
-
yAxis:
|
|
5651
|
+
yAxis: g,
|
|
5652
5652
|
valueLabelFormatter: v
|
|
5653
5653
|
} = u;
|
|
5654
5654
|
if (!h) return;
|
|
@@ -5656,7 +5656,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
5656
5656
|
timeScale: {
|
|
5657
5657
|
metadata: { intervalSize: b, scrollOffset: w },
|
|
5658
5658
|
startBarIndex: Z,
|
|
5659
|
-
endBarIndex:
|
|
5659
|
+
endBarIndex: p,
|
|
5660
5660
|
getLastVisibleBarIndex: T
|
|
5661
5661
|
},
|
|
5662
5662
|
layersData: {
|
|
@@ -5666,20 +5666,20 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
5666
5666
|
if (!k) return;
|
|
5667
5667
|
const { outputValues: L } = k, I = L.value, { valueToY: P } = a;
|
|
5668
5668
|
let S, M = -1;
|
|
5669
|
-
for (let D = Z; D <=
|
|
5670
|
-
const
|
|
5671
|
-
if (!isNaN(
|
|
5669
|
+
for (let D = Z; D <= p; D++) {
|
|
5670
|
+
const $ = I[D];
|
|
5671
|
+
if (!isNaN($)) {
|
|
5672
5672
|
const Y = (D + m) * b - w;
|
|
5673
5673
|
S === void 0 ? po(
|
|
5674
5674
|
e,
|
|
5675
5675
|
P,
|
|
5676
|
-
|
|
5676
|
+
$,
|
|
5677
5677
|
Y,
|
|
5678
5678
|
h
|
|
5679
5679
|
) : go(
|
|
5680
5680
|
e,
|
|
5681
5681
|
P,
|
|
5682
|
-
|
|
5682
|
+
$,
|
|
5683
5683
|
Y
|
|
5684
5684
|
), S = Y, M = D;
|
|
5685
5685
|
}
|
|
@@ -5700,7 +5700,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
5700
5700
|
t,
|
|
5701
5701
|
n,
|
|
5702
5702
|
r,
|
|
5703
|
-
|
|
5703
|
+
g,
|
|
5704
5704
|
v,
|
|
5705
5705
|
s,
|
|
5706
5706
|
c,
|
|
@@ -5733,7 +5733,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
5733
5733
|
output: "value",
|
|
5734
5734
|
label: "",
|
|
5735
5735
|
color: typeof e.series?.value == "object" ? e.series.value.color : void 0,
|
|
5736
|
-
valueSelector:
|
|
5736
|
+
valueSelector: oe(`indicators.${i}.value`)
|
|
5737
5737
|
}
|
|
5738
5738
|
};
|
|
5739
5739
|
return io(r, Eh), {
|
|
@@ -5753,7 +5753,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
5753
5753
|
outputs: e.outputs ?? Fe.outputs,
|
|
5754
5754
|
offset: e.offset ?? Fe.offset,
|
|
5755
5755
|
series: {
|
|
5756
|
-
value:
|
|
5756
|
+
value: z(e.series?.value, n.series.value ?? Fe.series.value)
|
|
5757
5757
|
},
|
|
5758
5758
|
markers: {
|
|
5759
5759
|
value: ve(e.markers?.value, n.markers.value, s)
|
|
@@ -5772,31 +5772,31 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
5772
5772
|
period: s,
|
|
5773
5773
|
dPeriod: c,
|
|
5774
5774
|
kSmoothing: a
|
|
5775
|
-
} = l, u = i ?? s, d = "k", h = "kSmoothed", m = "d", f = o.high.values,
|
|
5775
|
+
} = l, u = i ?? s, d = "k", h = "kSmoothed", m = "d", f = o.high.values, g = o.low.values, v = o.close.values;
|
|
5776
5776
|
for (let b = n; b < r; b++) {
|
|
5777
|
-
let w = 1 / 0, Z = -1 / 0,
|
|
5777
|
+
let w = 1 / 0, Z = -1 / 0, p = 0;
|
|
5778
5778
|
const T = v[b];
|
|
5779
5779
|
for (let y = 0; y < u; y++) {
|
|
5780
|
-
const k = b - y, L = f[k], I =
|
|
5781
|
-
!isNaN(L) && !isNaN(I) && (L > Z && (Z = L), I < w && (w = I),
|
|
5780
|
+
const k = b - y, L = f[k], I = g[k];
|
|
5781
|
+
!isNaN(L) && !isNaN(I) && (L > Z && (Z = L), I < w && (w = I), p++);
|
|
5782
5782
|
}
|
|
5783
|
-
if (
|
|
5783
|
+
if (p === u && !isNaN(T) && Z !== w) {
|
|
5784
5784
|
const y = (T - w) / (Z - w) * 100;
|
|
5785
5785
|
t[d][b] = y;
|
|
5786
5786
|
}
|
|
5787
5787
|
}
|
|
5788
5788
|
for (let b = n; b < r; b++) {
|
|
5789
5789
|
let w = 0, Z = 0;
|
|
5790
|
-
for (let
|
|
5791
|
-
const T = b -
|
|
5790
|
+
for (let p = 0; p < a; p++) {
|
|
5791
|
+
const T = b - p, y = t[d][T];
|
|
5792
5792
|
y !== void 0 && !isNaN(y) && (w += y, Z++);
|
|
5793
5793
|
}
|
|
5794
5794
|
Z === a && (t[h][b] = w / a);
|
|
5795
5795
|
}
|
|
5796
5796
|
for (let b = n; b < r; b++) {
|
|
5797
5797
|
let w = 0, Z = 0;
|
|
5798
|
-
for (let
|
|
5799
|
-
const T = b -
|
|
5798
|
+
for (let p = 0; p < c; p++) {
|
|
5799
|
+
const T = b - p, y = t[h][T];
|
|
5800
5800
|
y !== void 0 && !isNaN(y) && (w += y, Z++);
|
|
5801
5801
|
}
|
|
5802
5802
|
Z === c && (t[m][b] = w / c);
|
|
@@ -5809,12 +5809,12 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
5809
5809
|
series: h,
|
|
5810
5810
|
markers: m,
|
|
5811
5811
|
yAxis: f,
|
|
5812
|
-
valueLabelFormatter:
|
|
5812
|
+
valueLabelFormatter: g
|
|
5813
5813
|
} = u, v = h.k, b = h.d, w = m?.k, Z = m?.d;
|
|
5814
5814
|
if (!v && !b) return;
|
|
5815
5815
|
const {
|
|
5816
5816
|
timeScale: {
|
|
5817
|
-
metadata: { intervalSize:
|
|
5817
|
+
metadata: { intervalSize: p, scrollOffset: T },
|
|
5818
5818
|
startBarIndex: y,
|
|
5819
5819
|
endBarIndex: k,
|
|
5820
5820
|
getLastVisibleBarIndex: L
|
|
@@ -5824,67 +5824,67 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
5824
5824
|
}
|
|
5825
5825
|
} = i, P = I[d];
|
|
5826
5826
|
if (!P) return;
|
|
5827
|
-
const { outputValues: S } = P, M = S.kSmoothed, D = S.d, { valueToY:
|
|
5827
|
+
const { outputValues: S } = P, M = S.kSmoothed, D = S.d, { valueToY: $ } = a;
|
|
5828
5828
|
let Y = -1;
|
|
5829
5829
|
if (b) {
|
|
5830
|
-
let
|
|
5830
|
+
let C;
|
|
5831
5831
|
for (let E = y; E <= k; E++) {
|
|
5832
|
-
const
|
|
5833
|
-
if (!isNaN(
|
|
5834
|
-
const x = E *
|
|
5835
|
-
|
|
5832
|
+
const A = D[E];
|
|
5833
|
+
if (!isNaN(A)) {
|
|
5834
|
+
const x = E * p - T;
|
|
5835
|
+
C === void 0 ? po(
|
|
5836
5836
|
e,
|
|
5837
|
-
|
|
5838
|
-
|
|
5837
|
+
$,
|
|
5838
|
+
A,
|
|
5839
5839
|
x,
|
|
5840
5840
|
b
|
|
5841
5841
|
) : go(
|
|
5842
5842
|
e,
|
|
5843
|
-
|
|
5844
|
-
|
|
5843
|
+
$,
|
|
5844
|
+
A,
|
|
5845
5845
|
x
|
|
5846
|
-
),
|
|
5846
|
+
), C = x, Y = E;
|
|
5847
5847
|
}
|
|
5848
5848
|
}
|
|
5849
|
-
|
|
5849
|
+
C && Y >= 0 && vo(
|
|
5850
5850
|
e,
|
|
5851
|
-
|
|
5851
|
+
$,
|
|
5852
5852
|
D[Y],
|
|
5853
|
-
|
|
5853
|
+
C,
|
|
5854
5854
|
b
|
|
5855
5855
|
);
|
|
5856
5856
|
}
|
|
5857
|
-
let
|
|
5857
|
+
let U = -1;
|
|
5858
5858
|
if (v) {
|
|
5859
|
-
let
|
|
5859
|
+
let C;
|
|
5860
5860
|
for (let E = y; E <= k; E++) {
|
|
5861
|
-
const
|
|
5862
|
-
if (!isNaN(
|
|
5863
|
-
const x = E *
|
|
5864
|
-
|
|
5861
|
+
const A = M[E];
|
|
5862
|
+
if (!isNaN(A)) {
|
|
5863
|
+
const x = E * p - T;
|
|
5864
|
+
C === void 0 ? po(
|
|
5865
5865
|
e,
|
|
5866
|
-
|
|
5867
|
-
|
|
5866
|
+
$,
|
|
5867
|
+
A,
|
|
5868
5868
|
x,
|
|
5869
5869
|
v
|
|
5870
5870
|
) : go(
|
|
5871
5871
|
e,
|
|
5872
|
-
|
|
5873
|
-
|
|
5872
|
+
$,
|
|
5873
|
+
A,
|
|
5874
5874
|
x
|
|
5875
|
-
),
|
|
5875
|
+
), C = x, U = E;
|
|
5876
5876
|
}
|
|
5877
5877
|
}
|
|
5878
|
-
|
|
5878
|
+
C && U >= 0 && vo(
|
|
5879
5879
|
e,
|
|
5880
|
-
|
|
5881
|
-
M[
|
|
5882
|
-
|
|
5880
|
+
$,
|
|
5881
|
+
M[U],
|
|
5882
|
+
C,
|
|
5883
5883
|
v
|
|
5884
5884
|
);
|
|
5885
5885
|
}
|
|
5886
5886
|
if (Z && Y >= 0) {
|
|
5887
|
-
const
|
|
5887
|
+
const C = L(Y);
|
|
5888
5888
|
Be(
|
|
5889
5889
|
e,
|
|
5890
5890
|
o,
|
|
@@ -5893,17 +5893,17 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
5893
5893
|
n,
|
|
5894
5894
|
u,
|
|
5895
5895
|
f,
|
|
5896
|
-
|
|
5896
|
+
g,
|
|
5897
5897
|
s,
|
|
5898
5898
|
c,
|
|
5899
5899
|
a,
|
|
5900
5900
|
i,
|
|
5901
5901
|
Z,
|
|
5902
|
-
D[
|
|
5902
|
+
D[C]
|
|
5903
5903
|
);
|
|
5904
5904
|
}
|
|
5905
|
-
if (w &&
|
|
5906
|
-
const
|
|
5905
|
+
if (w && U >= 0) {
|
|
5906
|
+
const C = L(U);
|
|
5907
5907
|
Be(
|
|
5908
5908
|
e,
|
|
5909
5909
|
o,
|
|
@@ -5912,13 +5912,13 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
5912
5912
|
n,
|
|
5913
5913
|
u,
|
|
5914
5914
|
f,
|
|
5915
|
-
|
|
5915
|
+
g,
|
|
5916
5916
|
s,
|
|
5917
5917
|
c,
|
|
5918
5918
|
a,
|
|
5919
5919
|
i,
|
|
5920
5920
|
w,
|
|
5921
|
-
M[
|
|
5921
|
+
M[C]
|
|
5922
5922
|
);
|
|
5923
5923
|
}
|
|
5924
5924
|
}, Ch = ["high", "low", "close"], Re = {
|
|
@@ -5941,18 +5941,18 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
5941
5941
|
bt("high", r ?? "high"),
|
|
5942
5942
|
bt("low", l ?? "low"),
|
|
5943
5943
|
bt("close", i ?? "close")
|
|
5944
|
-
], c = e.kPeriod ?? e.period ?? Re.kPeriod, a = e.kSmoothing ?? Re.kSmoothing, u = e.dPeriod ?? Re.dPeriod, d = e.id ?? `${Re.id}_${t}_${c}_${a}_${u}`, h = typeof e.series?.k == "object" ? e.series.k.color : void 0, m = typeof e.series?.d == "object" ? e.series.d.color : void 0, f = `Stochastic ${c} ${a} ${u}`,
|
|
5944
|
+
], c = e.kPeriod ?? e.period ?? Re.kPeriod, a = e.kSmoothing ?? Re.kSmoothing, u = e.dPeriod ?? Re.dPeriod, d = e.id ?? `${Re.id}_${t}_${c}_${a}_${u}`, h = typeof e.series?.k == "object" ? e.series.k.color : void 0, m = typeof e.series?.d == "object" ? e.series.d.color : void 0, f = `Stochastic ${c} ${a} ${u}`, g = {
|
|
5945
5945
|
k: {
|
|
5946
5946
|
output: "k",
|
|
5947
5947
|
label: "",
|
|
5948
5948
|
color: typeof e.series?.k == "object" ? e.series.k.color : void 0,
|
|
5949
|
-
valueSelector:
|
|
5949
|
+
valueSelector: oe(`indicators.${d}.smoothedK`)
|
|
5950
5950
|
},
|
|
5951
5951
|
d: {
|
|
5952
5952
|
output: "d",
|
|
5953
5953
|
label: "",
|
|
5954
5954
|
color: typeof e.series?.d == "object" ? e.series.d.color : void 0,
|
|
5955
|
-
valueSelector:
|
|
5955
|
+
valueSelector: oe(`indicators.${d}.dValue`)
|
|
5956
5956
|
}
|
|
5957
5957
|
};
|
|
5958
5958
|
return io(s, Ch), {
|
|
@@ -5977,14 +5977,14 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
5977
5977
|
dPeriod: u,
|
|
5978
5978
|
offset: 0,
|
|
5979
5979
|
series: {
|
|
5980
|
-
k:
|
|
5981
|
-
d:
|
|
5980
|
+
k: z(e.series?.k, n.series.k),
|
|
5981
|
+
d: z(e.series?.d, n.series.d)
|
|
5982
5982
|
},
|
|
5983
5983
|
markers: {
|
|
5984
5984
|
k: ve(e.markers?.k, n.markers.k, h),
|
|
5985
5985
|
d: ve(e.markers?.d, n.markers.d, m)
|
|
5986
5986
|
},
|
|
5987
|
-
legend: ro(e.legend, { ...n.legend, label: f },
|
|
5987
|
+
legend: ro(e.legend, { ...n.legend, label: f }, g),
|
|
5988
5988
|
yAxis: lo(e.yAxis, n.yAxis),
|
|
5989
5989
|
valueLabelFormatter: e.valueLabelFormatter ?? Re.valueLabelFormatter
|
|
5990
5990
|
};
|
|
@@ -6088,11 +6088,11 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
6088
6088
|
max: i
|
|
6089
6089
|
};
|
|
6090
6090
|
}, jh = (e, o, t, n, r, l, i, s) => {
|
|
6091
|
-
const { ohlcvs: c } = e, { layerDataInstances: a } = o, u = r.map((w) => a[w.id]), { paddedHeightPx: d, paddedTopPx: h } = i, { valueToY: m } = l, { min: f, max:
|
|
6092
|
-
return
|
|
6093
|
-
valueToY: m(f,
|
|
6091
|
+
const { ohlcvs: c } = e, { layerDataInstances: a } = o, u = r.map((w) => a[w.id]), { paddedHeightPx: d, paddedTopPx: h } = i, { valueToY: m } = l, { min: f, max: g } = _h(c, u, s, t, n);
|
|
6092
|
+
return g - f === 0 ? null : {
|
|
6093
|
+
valueToY: m(f, g, h, d),
|
|
6094
6094
|
min: f,
|
|
6095
|
-
max:
|
|
6095
|
+
max: g
|
|
6096
6096
|
};
|
|
6097
6097
|
}, Vh = (e, o, t, n, r, l, i, s) => {
|
|
6098
6098
|
const { yAxis: c, valueLabelFormatter: a } = r;
|
|
@@ -6105,23 +6105,23 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
6105
6105
|
} = o, {
|
|
6106
6106
|
side: m = "right",
|
|
6107
6107
|
width: f,
|
|
6108
|
-
labels:
|
|
6108
|
+
labels: g
|
|
6109
6109
|
} = c;
|
|
6110
|
-
if (!
|
|
6110
|
+
if (!g) return null;
|
|
6111
6111
|
const {
|
|
6112
6112
|
color: v,
|
|
6113
6113
|
fontFamily: b,
|
|
6114
6114
|
fontSize: w,
|
|
6115
6115
|
fontWeight: Z,
|
|
6116
|
-
fontVariant:
|
|
6116
|
+
fontVariant: p,
|
|
6117
6117
|
fontStyle: T,
|
|
6118
6118
|
padding: y
|
|
6119
|
-
} =
|
|
6119
|
+
} = g, {
|
|
6120
6120
|
topPx: k,
|
|
6121
6121
|
bottomPx: L
|
|
6122
6122
|
} = i;
|
|
6123
6123
|
let I;
|
|
6124
|
-
m === "left" ? I = d - u - f + y : I = h + u + y, e.fillStyle = v, e.font = `${T} ${
|
|
6124
|
+
m === "left" ? I = d - u - f + y : I = h + u + y, e.fillStyle = v, e.font = `${T} ${p} ${Z} ${w}px ${b}`, e.textBaseline = "middle", e.textAlign = "left";
|
|
6125
6125
|
for (let P = 0; P < l.length; P++) {
|
|
6126
6126
|
const { value: S, y: M } = l[P];
|
|
6127
6127
|
if (M > w && M > k && M < L) {
|
|
@@ -6135,18 +6135,18 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
6135
6135
|
yAxes: {
|
|
6136
6136
|
axesByScale: m
|
|
6137
6137
|
}
|
|
6138
|
-
} = n, f = m[u.key],
|
|
6138
|
+
} = n, f = m[u.key], g = d[0], {
|
|
6139
6139
|
valueGridLines: v
|
|
6140
|
-
} =
|
|
6140
|
+
} = g, {
|
|
6141
6141
|
topPx: b,
|
|
6142
6142
|
heightPx: w
|
|
6143
|
-
} = c, { dataMap: Z, layersData:
|
|
6143
|
+
} = c, { dataMap: Z, layersData: p, timeScale: { startBarIndex: T, endBarIndex: y } } = i, k = jh(
|
|
6144
6144
|
Z,
|
|
6145
|
-
|
|
6145
|
+
p,
|
|
6146
6146
|
T,
|
|
6147
6147
|
y,
|
|
6148
6148
|
d,
|
|
6149
|
-
|
|
6149
|
+
g,
|
|
6150
6150
|
c,
|
|
6151
6151
|
u
|
|
6152
6152
|
);
|
|
@@ -6179,7 +6179,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
6179
6179
|
r,
|
|
6180
6180
|
t,
|
|
6181
6181
|
n,
|
|
6182
|
-
|
|
6182
|
+
g,
|
|
6183
6183
|
S,
|
|
6184
6184
|
c,
|
|
6185
6185
|
f
|
|
@@ -6217,8 +6217,8 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
6217
6217
|
return;
|
|
6218
6218
|
}
|
|
6219
6219
|
const { layersData: { layersTopology: { deducedLayerScales: h } } } = i, m = F2(u, h), f = {};
|
|
6220
|
-
for (const
|
|
6221
|
-
const v = m[
|
|
6220
|
+
for (const g in m) {
|
|
6221
|
+
const v = m[g], b = v[0];
|
|
6222
6222
|
if (b) {
|
|
6223
6223
|
const w = h[b.id], Z = Uh(
|
|
6224
6224
|
e,
|
|
@@ -6234,7 +6234,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
6234
6234
|
w,
|
|
6235
6235
|
v
|
|
6236
6236
|
);
|
|
6237
|
-
Z && (f[
|
|
6237
|
+
Z && (f[g] = Z);
|
|
6238
6238
|
}
|
|
6239
6239
|
}
|
|
6240
6240
|
return c >= 1 && M4(
|
|
@@ -6323,10 +6323,10 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
6323
6323
|
fontSize: h,
|
|
6324
6324
|
fontStyle: m,
|
|
6325
6325
|
fontVariant: f,
|
|
6326
|
-
fontWeight:
|
|
6326
|
+
fontWeight: g,
|
|
6327
6327
|
formatter: v
|
|
6328
6328
|
} = l, b = o + a;
|
|
6329
|
-
e.fillStyle = u, e.font = `${m} ${f} ${s ? "bold" :
|
|
6329
|
+
e.fillStyle = u, e.font = `${m} ${f} ${s ? "bold" : g} ${h}px ${d}`, e.textBaseline = "top", e.textAlign = "center";
|
|
6330
6330
|
const w = v({
|
|
6331
6331
|
utcTs: r,
|
|
6332
6332
|
timeUnit: c,
|
|
@@ -6383,7 +6383,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
6383
6383
|
const { left: c, right: a, top: u, bottom: d } = s;
|
|
6384
6384
|
if (!c && !a && !u && !d) return;
|
|
6385
6385
|
e.lineJoin = "miter", e.lineCap = "butt";
|
|
6386
|
-
const h = [n + 0.5, l + 0.5], m = [r
|
|
6386
|
+
const h = [n + 0.5, l + 0.5], m = [r - 0.5, l + 0.5], f = [r - 0.5, i - 0.5], g = [n + 0.5, i - 0.5], v = (T, y) => T && y && T.color === y.color && T.style === y.style && T.width === y.width, b = (T) => {
|
|
6387
6387
|
e.strokeStyle = T.color, e.lineWidth = T.width, T.style === "dashed" && T.dashes ? e.setLineDash(T.dashes) : e.setLineDash([]);
|
|
6388
6388
|
}, w = { left: !1, right: !1, top: !1, bottom: !1 }, Z = (T, y, k) => {
|
|
6389
6389
|
if (y.some((L) => !L) || !y.every((L, I) => I === 0 || v(L, y[0])))
|
|
@@ -6396,12 +6396,12 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
6396
6396
|
Z(
|
|
6397
6397
|
["left", "bottom", "right", "top"],
|
|
6398
6398
|
[c, d, a, u],
|
|
6399
|
-
[h,
|
|
6400
|
-
), !w.left && !w.bottom && Z(["left", "bottom"], [c, d], [h,
|
|
6401
|
-
const
|
|
6399
|
+
[h, g, f, m, h]
|
|
6400
|
+
), !w.left && !w.bottom && Z(["left", "bottom"], [c, d], [h, g, f]), !w.bottom && !w.right && Z(["bottom", "right"], [d, a], [g, f, m]), !w.right && !w.top && Z(["right", "top"], [a, u], [f, m, h]), !w.top && !w.left && Z(["top", "left"], [u, c], [m, h, g]);
|
|
6401
|
+
const p = (T, y, k, L) => {
|
|
6402
6402
|
!w[T] && y && (b(y), e.beginPath(), e.moveTo(k[0], k[1]), e.lineTo(L[0], L[1]), e.stroke());
|
|
6403
6403
|
};
|
|
6404
|
-
|
|
6404
|
+
p("left", c, h, g), p("bottom", d, g, f), p("right", a, f, m), p("top", u, m, h), e.setLineDash([]);
|
|
6405
6405
|
}, Qh = (e, o, t, n, r, l) => {
|
|
6406
6406
|
const { timeScale: i } = r;
|
|
6407
6407
|
e.save(), e.setTransform(1, 0, 0, 1, 0, 0), e.clearRect(0, 0, e.canvas.width, e.canvas.height), e.restore(), o.save(), o.setTransform(1, 0, 0, 1, 0, 0), o.clearRect(0, 0, o.canvas.width, o.canvas.height), o.restore();
|
|
@@ -6456,13 +6456,13 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
6456
6456
|
fontWeight: h,
|
|
6457
6457
|
fontStyle: m,
|
|
6458
6458
|
hPadding: f,
|
|
6459
|
-
vPadding:
|
|
6459
|
+
vPadding: g
|
|
6460
6460
|
} = t, {
|
|
6461
6461
|
side: v,
|
|
6462
6462
|
offsetPx: b,
|
|
6463
6463
|
width: w
|
|
6464
|
-
} = n, Z = v === "left" ? i - b - w : s + b,
|
|
6465
|
-
e.fillStyle = c, e.fillRect(Z, r - k / 2, y, k), e.fillStyle = a, e.font = `${h} ${m} ${u}px ${d}`, e.textAlign = "left", e.textBaseline = "middle", e.fillText(
|
|
6464
|
+
} = n, Z = v === "left" ? i - b - w : s + b, p = n.labelFormatter(l), y = Math.round(e.measureText(p).width) + f * 2, k = u + g * 2;
|
|
6465
|
+
e.fillStyle = c, e.fillRect(Z, r - k / 2, y, k), e.fillStyle = a, e.font = `${h} ${m} ${u}px ${d}`, e.textAlign = "left", e.textBaseline = "middle", e.fillText(p, Z + f, r);
|
|
6466
6466
|
}, om = (e, o, t, n) => {
|
|
6467
6467
|
const r = o - e;
|
|
6468
6468
|
return (l) => o - (l - t) / n * r;
|
|
@@ -6477,7 +6477,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
6477
6477
|
const {
|
|
6478
6478
|
drawingAreaX: m,
|
|
6479
6479
|
drawingAreaX1: f,
|
|
6480
|
-
drawingAreaY:
|
|
6480
|
+
drawingAreaY: g,
|
|
6481
6481
|
drawingAreaY1: v
|
|
6482
6482
|
} = n;
|
|
6483
6483
|
e.save(), e.setTransform(1, 0, 0, 1, 0, 0), e.clearRect(0, 0, e.canvas.width, e.canvas.height), e.restore();
|
|
@@ -6491,99 +6491,99 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
6491
6491
|
granularity: w
|
|
6492
6492
|
},
|
|
6493
6493
|
xToIntervalX: Z,
|
|
6494
|
-
xToBarIndex:
|
|
6494
|
+
xToBarIndex: p
|
|
6495
6495
|
},
|
|
6496
6496
|
scrollOffset: T,
|
|
6497
6497
|
xToDataPoint: y
|
|
6498
6498
|
} = l, { left: k, top: L } = e.canvas.getBoundingClientRect(), I = i - k, P = Math.round(s - L);
|
|
6499
|
-
if (I < m || I > f || P <
|
|
6499
|
+
if (I < m || I > f || P < g || P > v) return;
|
|
6500
6500
|
const S = {};
|
|
6501
6501
|
let M;
|
|
6502
|
-
for (let
|
|
6503
|
-
const { id: x, paddingTop:
|
|
6502
|
+
for (let A = 0; A < t.length; A++) {
|
|
6503
|
+
const { id: x, paddingTop: N, paddingBottom: B, yAxes: F } = t[A], j = r[x];
|
|
6504
6504
|
if (!j) {
|
|
6505
6505
|
console.warn("Metrics not found for panel:", x);
|
|
6506
6506
|
break;
|
|
6507
6507
|
}
|
|
6508
6508
|
const {
|
|
6509
6509
|
panelMetrics: {
|
|
6510
|
-
topPx:
|
|
6511
|
-
heightPx:
|
|
6510
|
+
topPx: V,
|
|
6511
|
+
heightPx: ie
|
|
6512
6512
|
}
|
|
6513
6513
|
} = j;
|
|
6514
|
-
if (P >=
|
|
6515
|
-
const { layerMetricsByScale:
|
|
6516
|
-
for (const
|
|
6517
|
-
const De =
|
|
6518
|
-
S[
|
|
6514
|
+
if (P >= V && P < V + ie) {
|
|
6515
|
+
const { layerMetricsByScale: K } = j;
|
|
6516
|
+
for (const se in K) {
|
|
6517
|
+
const De = K[se], { min: fe, max: at } = De;
|
|
6518
|
+
S[se] = om(fe, at, V + N, ie - (N + B));
|
|
6519
6519
|
}
|
|
6520
|
-
M =
|
|
6520
|
+
M = F;
|
|
6521
6521
|
}
|
|
6522
6522
|
}
|
|
6523
6523
|
if (Object.keys(S).length === 0 || !M) return;
|
|
6524
|
-
const D = Z(I - m, T),
|
|
6525
|
-
c && Y && c(Y,
|
|
6526
|
-
const
|
|
6524
|
+
const D = Z(I - m, T), $ = p(D), Y = b($) ?? null, U = y(I);
|
|
6525
|
+
c && Y && c(Y, U);
|
|
6526
|
+
const C = m + D + 0.5, E = P + 0.5;
|
|
6527
6527
|
if (d && d.line) {
|
|
6528
6528
|
const {
|
|
6529
|
-
color:
|
|
6529
|
+
color: A,
|
|
6530
6530
|
width: x,
|
|
6531
|
-
style:
|
|
6532
|
-
dashes:
|
|
6531
|
+
style: N,
|
|
6532
|
+
dashes: B
|
|
6533
6533
|
} = d.line;
|
|
6534
|
-
e.strokeStyle =
|
|
6534
|
+
e.strokeStyle = A, e.lineWidth = x, N === "dashed" && e.setLineDash(B), e.beginPath(), e.moveTo(m, E), e.lineTo(f, E), e.stroke(), e.setLineDash([]);
|
|
6535
6535
|
}
|
|
6536
|
-
if (h && h.line &&
|
|
6536
|
+
if (h && h.line && C >= m && C <= f) {
|
|
6537
6537
|
const {
|
|
6538
|
-
color:
|
|
6538
|
+
color: A,
|
|
6539
6539
|
width: x,
|
|
6540
|
-
style:
|
|
6541
|
-
dashes:
|
|
6540
|
+
style: N,
|
|
6541
|
+
dashes: B
|
|
6542
6542
|
} = h.line;
|
|
6543
|
-
e.strokeStyle =
|
|
6543
|
+
e.strokeStyle = A, e.lineWidth = x, N === "dashed" && e.setLineDash(B), e.beginPath(), e.moveTo(C, g), e.lineTo(C, v), e.stroke(), e.setLineDash([]);
|
|
6544
6544
|
}
|
|
6545
6545
|
if (d && d.label) {
|
|
6546
|
-
const { leftAxes:
|
|
6547
|
-
for (let
|
|
6548
|
-
const
|
|
6549
|
-
Ii(
|
|
6546
|
+
const { leftAxes: A, rightAxes: x } = M;
|
|
6547
|
+
for (let N = 0; N < A.length; N++) {
|
|
6548
|
+
const B = A[N], F = S[B.scale.key](P);
|
|
6549
|
+
Ii(B.scale, F) && ki(
|
|
6550
6550
|
e,
|
|
6551
6551
|
n,
|
|
6552
6552
|
d.label,
|
|
6553
|
-
|
|
6553
|
+
B,
|
|
6554
6554
|
E,
|
|
6555
|
-
|
|
6555
|
+
F
|
|
6556
6556
|
);
|
|
6557
6557
|
}
|
|
6558
|
-
for (let
|
|
6559
|
-
const
|
|
6560
|
-
Ii(
|
|
6558
|
+
for (let N = 0; N < x.length; N++) {
|
|
6559
|
+
const B = x[N], F = S[B.scale.key](P);
|
|
6560
|
+
Ii(B.scale, F) && ki(
|
|
6561
6561
|
e,
|
|
6562
6562
|
n,
|
|
6563
6563
|
d.label,
|
|
6564
|
-
|
|
6564
|
+
B,
|
|
6565
6565
|
E,
|
|
6566
|
-
|
|
6566
|
+
F
|
|
6567
6567
|
);
|
|
6568
6568
|
}
|
|
6569
6569
|
}
|
|
6570
|
-
if (h && h.label &&
|
|
6570
|
+
if (h && h.label && C >= m && C <= f && Y) {
|
|
6571
6571
|
const {
|
|
6572
|
-
hPadding:
|
|
6572
|
+
hPadding: A,
|
|
6573
6573
|
vPadding: x,
|
|
6574
|
-
backgroundColor:
|
|
6575
|
-
color:
|
|
6576
|
-
fontSize:
|
|
6574
|
+
backgroundColor: N,
|
|
6575
|
+
color: B,
|
|
6576
|
+
fontSize: F,
|
|
6577
6577
|
fontFamily: j,
|
|
6578
|
-
fontWeight:
|
|
6579
|
-
fontStyle:
|
|
6580
|
-
formatter:
|
|
6581
|
-
} = h.label,
|
|
6578
|
+
fontWeight: V,
|
|
6579
|
+
fontStyle: ie,
|
|
6580
|
+
formatter: K
|
|
6581
|
+
} = h.label, se = K({
|
|
6582
6582
|
utcTs: Y,
|
|
6583
6583
|
timeUnit: em(w),
|
|
6584
6584
|
timeZoneId: u?.timeZoneId
|
|
6585
|
-
}), fe = Math.round(e.measureText(
|
|
6586
|
-
e.fillStyle =
|
|
6585
|
+
}), fe = Math.round(e.measureText(se).width) + A * 2, at = F + x * 2;
|
|
6586
|
+
e.fillStyle = N, e.fillRect(C - Math.round(fe / 2), v, fe, at), e.fillStyle = B, e.font = `${V} ${ie} ${F}px ${j}`, e.textAlign = "center", e.textBaseline = "middle", e.fillText(`${se}`, C, v + at / 2);
|
|
6587
6587
|
}
|
|
6588
6588
|
}, nm = "_canvases_u908y_8", rm = "_drawingCanvas_u908y_14", lm = "_axesCanvas_u908y_19", im = "_crosshairsCanvas_u908y_25", Nn = {
|
|
6589
6589
|
canvases: nm,
|
|
@@ -6597,7 +6597,7 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
6597
6597
|
}, r) {
|
|
6598
6598
|
const {
|
|
6599
6599
|
drawingAreaX: l
|
|
6600
|
-
} = n, i = _(null), s = _(null), c = _(null), a = _(null), u = _(null), d = _(null), h = _(null), m = _(null), f = _(null),
|
|
6600
|
+
} = n, i = _(null), s = _(null), c = _(null), a = _(null), u = _(null), d = _(null), h = _(null), m = _(null), f = _(null), g = J((T, y, k) => {
|
|
6601
6601
|
const L = _0(i, y.drawingAreaWidth, y.chartHeight, y.dpr, h.current), I = _0(s, y.chartWidth, y.chartHeight, y.dpr, m.current);
|
|
6602
6602
|
L && I && (d.current = Qh(L, I, o, t, T, y), k && k(d.current)), h.current = {
|
|
6603
6603
|
width: y.drawingAreaX1,
|
|
@@ -6608,11 +6608,11 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
6608
6608
|
height: y.chartHeight,
|
|
6609
6609
|
dpr: y.dpr
|
|
6610
6610
|
};
|
|
6611
|
-
}, [o, t]), v =
|
|
6611
|
+
}, [o, t]), v = J((T, y, k) => {
|
|
6612
6612
|
a.current !== null && cancelAnimationFrame(a.current), a.current = requestAnimationFrame(() => {
|
|
6613
|
-
|
|
6613
|
+
g(T, y, k);
|
|
6614
6614
|
});
|
|
6615
|
-
}, [
|
|
6615
|
+
}, [g]), b = J((T, y, k, L, I) => {
|
|
6616
6616
|
const P = _0(c, T.chartWidth, T.chartHeight, T.dpr, f.current, !0);
|
|
6617
6617
|
P && d.current && tm(
|
|
6618
6618
|
P,
|
|
@@ -6629,12 +6629,12 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
6629
6629
|
height: T.chartHeight,
|
|
6630
6630
|
dpr: T.dpr
|
|
6631
6631
|
};
|
|
6632
|
-
}, [o, t]), w =
|
|
6632
|
+
}, [o, t]), w = J((T, y, k, L, I) => {
|
|
6633
6633
|
u.current !== null && cancelAnimationFrame(u.current), u.current = requestAnimationFrame(() => {
|
|
6634
6634
|
b(T, y, k, L, I);
|
|
6635
6635
|
});
|
|
6636
|
-
}, [b]), Z =
|
|
6637
|
-
}, []),
|
|
6636
|
+
}, [b]), Z = J(() => {
|
|
6637
|
+
}, []), p = J(() => {
|
|
6638
6638
|
}, []);
|
|
6639
6639
|
return an(
|
|
6640
6640
|
r,
|
|
@@ -6642,15 +6642,15 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
6642
6642
|
requestDraw: v,
|
|
6643
6643
|
requestDrawCrosshairs: w,
|
|
6644
6644
|
updateCrosshairsCanvas: Z,
|
|
6645
|
-
hideCrosshairs:
|
|
6645
|
+
hideCrosshairs: p
|
|
6646
6646
|
}),
|
|
6647
|
-
[v, w,
|
|
6647
|
+
[v, w, p, Z]
|
|
6648
6648
|
), /* @__PURE__ */ Kt(
|
|
6649
6649
|
"div",
|
|
6650
6650
|
{
|
|
6651
6651
|
className: Nn.canvases,
|
|
6652
6652
|
children: [
|
|
6653
|
-
/* @__PURE__ */
|
|
6653
|
+
/* @__PURE__ */ te(
|
|
6654
6654
|
"canvas",
|
|
6655
6655
|
{
|
|
6656
6656
|
ref: i,
|
|
@@ -6660,14 +6660,14 @@ const k4 = "_interactiveArea_1ela9_8", I4 = {
|
|
|
6660
6660
|
}
|
|
6661
6661
|
}
|
|
6662
6662
|
),
|
|
6663
|
-
/* @__PURE__ */
|
|
6663
|
+
/* @__PURE__ */ te(
|
|
6664
6664
|
"canvas",
|
|
6665
6665
|
{
|
|
6666
6666
|
ref: s,
|
|
6667
6667
|
className: Nn.axesCanvas
|
|
6668
6668
|
}
|
|
6669
6669
|
),
|
|
6670
|
-
/* @__PURE__ */
|
|
6670
|
+
/* @__PURE__ */ te(
|
|
6671
6671
|
"canvas",
|
|
6672
6672
|
{
|
|
6673
6673
|
id: "ch-canvas",
|
|
@@ -6708,12 +6708,12 @@ const sm = "_uis_1h7fp_8", am = {
|
|
|
6708
6708
|
borderRadius: u,
|
|
6709
6709
|
label: d,
|
|
6710
6710
|
fields: h
|
|
6711
|
-
} = t, m =
|
|
6712
|
-
const
|
|
6713
|
-
if (
|
|
6711
|
+
} = t, m = J((f) => {
|
|
6712
|
+
const g = f?.layerDataInstances[o.id];
|
|
6713
|
+
if (g && r.current.length > 0)
|
|
6714
6714
|
for (let v = 0; v < r.current.length; v++) {
|
|
6715
|
-
const b = r.current[v], { output: w } = h[v], { valueLabelFormatter: Z } = o,
|
|
6716
|
-
b.textContent = isNaN(
|
|
6715
|
+
const b = r.current[v], { output: w } = h[v], { valueLabelFormatter: Z } = o, p = g.outputValues[w][f.barIndex];
|
|
6716
|
+
b.textContent = isNaN(p) ? "-" : Z(p);
|
|
6717
6717
|
}
|
|
6718
6718
|
}, [o, h]);
|
|
6719
6719
|
return an(n, () => ({
|
|
@@ -6733,20 +6733,20 @@ const sm = "_uis_1h7fp_8", am = {
|
|
|
6733
6733
|
borderRadius: `${u}px`
|
|
6734
6734
|
},
|
|
6735
6735
|
children: [
|
|
6736
|
-
d && /* @__PURE__ */
|
|
6737
|
-
h.map((f,
|
|
6738
|
-
f.label && /* @__PURE__ */
|
|
6736
|
+
d && /* @__PURE__ */ te("span", { className: An.legendLabel, children: d }),
|
|
6737
|
+
h.map((f, g) => /* @__PURE__ */ Kt(ca, { children: [
|
|
6738
|
+
f.label && /* @__PURE__ */ te(
|
|
6739
6739
|
"span",
|
|
6740
6740
|
{
|
|
6741
6741
|
className: An.fieldLabel,
|
|
6742
6742
|
children: f.label
|
|
6743
6743
|
}
|
|
6744
6744
|
),
|
|
6745
|
-
/* @__PURE__ */
|
|
6745
|
+
/* @__PURE__ */ te(
|
|
6746
6746
|
"span",
|
|
6747
6747
|
{
|
|
6748
6748
|
ref: (v) => {
|
|
6749
|
-
v && (r.current[
|
|
6749
|
+
v && (r.current[g] = v);
|
|
6750
6750
|
},
|
|
6751
6751
|
className: An.fieldValue,
|
|
6752
6752
|
style: {
|
|
@@ -6776,19 +6776,19 @@ const mm = et(O2), fm = "_panelUis_b5fyk_8", pm = {
|
|
|
6776
6776
|
heightPx: a
|
|
6777
6777
|
} = o, {
|
|
6778
6778
|
goToLatestButton: u
|
|
6779
|
-
} = t, d =
|
|
6779
|
+
} = t, d = J((f) => {
|
|
6780
6780
|
s(f);
|
|
6781
6781
|
}, []);
|
|
6782
6782
|
an(l, () => ({
|
|
6783
6783
|
updateGoToLatestButton: d
|
|
6784
6784
|
}), [d]);
|
|
6785
|
-
const h =
|
|
6785
|
+
const h = J(() => {
|
|
6786
6786
|
r(!0);
|
|
6787
|
-
}, [r]), m =
|
|
6787
|
+
}, [r]), m = J(() => {
|
|
6788
6788
|
r(!1);
|
|
6789
6789
|
}, [r]);
|
|
6790
6790
|
if (u && i)
|
|
6791
|
-
return /* @__PURE__ */
|
|
6791
|
+
return /* @__PURE__ */ te(
|
|
6792
6792
|
"button",
|
|
6793
6793
|
{
|
|
6794
6794
|
className: vm.goToLatestButton,
|
|
@@ -6822,8 +6822,8 @@ const wm = et(W2), _2 = sn(function({
|
|
|
6822
6822
|
}, [i]), an(l, () => ({
|
|
6823
6823
|
updateLegends: (d, h) => {
|
|
6824
6824
|
for (let m = 0; m < i.length; m++) {
|
|
6825
|
-
const f = i[m],
|
|
6826
|
-
|
|
6825
|
+
const f = i[m], g = a.current[f.id];
|
|
6826
|
+
g?.current && g.current.update(d, h);
|
|
6827
6827
|
}
|
|
6828
6828
|
},
|
|
6829
6829
|
updateGoToLatestButton: (d) => {
|
|
@@ -6831,7 +6831,7 @@ const wm = et(W2), _2 = sn(function({
|
|
|
6831
6831
|
}
|
|
6832
6832
|
}), [i]), c && t)
|
|
6833
6833
|
return /* @__PURE__ */ Kt(sa, { children: [
|
|
6834
|
-
/* @__PURE__ */
|
|
6834
|
+
/* @__PURE__ */ te(
|
|
6835
6835
|
"div",
|
|
6836
6836
|
{
|
|
6837
6837
|
className: pm.panelUis,
|
|
@@ -6839,7 +6839,7 @@ const wm = et(W2), _2 = sn(function({
|
|
|
6839
6839
|
top: `${t.topPx}px`,
|
|
6840
6840
|
height: `${t.heightPx}px`
|
|
6841
6841
|
},
|
|
6842
|
-
children: i.filter((d) => d.legend).map((d) => /* @__PURE__ */
|
|
6842
|
+
children: i.filter((d) => d.legend).map((d) => /* @__PURE__ */ te(
|
|
6843
6843
|
mm,
|
|
6844
6844
|
{
|
|
6845
6845
|
ref: a.current[d.id],
|
|
@@ -6850,7 +6850,7 @@ const wm = et(W2), _2 = sn(function({
|
|
|
6850
6850
|
))
|
|
6851
6851
|
}
|
|
6852
6852
|
),
|
|
6853
|
-
s.goToLatestButton && /* @__PURE__ */
|
|
6853
|
+
s.goToLatestButton && /* @__PURE__ */ te(
|
|
6854
6854
|
wm,
|
|
6855
6855
|
{
|
|
6856
6856
|
ref: u,
|
|
@@ -6881,14 +6881,14 @@ const Tm = et(_2), j2 = sn(function({
|
|
|
6881
6881
|
v[b.id] = u.current[b.id] ?? Ni();
|
|
6882
6882
|
}), u.current = v;
|
|
6883
6883
|
}, [t]);
|
|
6884
|
-
const [d, h] = ln(), m =
|
|
6884
|
+
const [d, h] = ln(), m = J((v) => {
|
|
6885
6885
|
h(v);
|
|
6886
|
-
}, []), f =
|
|
6886
|
+
}, []), f = J((v, b) => {
|
|
6887
6887
|
for (let w = 0; w < t.length; w++) {
|
|
6888
6888
|
const Z = t[w];
|
|
6889
6889
|
u.current[Z.id].current?.updateLegends(v, b);
|
|
6890
6890
|
}
|
|
6891
|
-
}, [t]),
|
|
6891
|
+
}, [t]), g = J((v) => {
|
|
6892
6892
|
for (let b = 0; b < t.length; b++) {
|
|
6893
6893
|
const w = t[b];
|
|
6894
6894
|
u.current[w.id].current?.updateGoToLatestButton(v);
|
|
@@ -6899,10 +6899,10 @@ const Tm = et(_2), j2 = sn(function({
|
|
|
6899
6899
|
() => ({
|
|
6900
6900
|
updatePanelMetrics: m,
|
|
6901
6901
|
updateLegends: f,
|
|
6902
|
-
updateGoToLatestButton:
|
|
6902
|
+
updateGoToLatestButton: g
|
|
6903
6903
|
}),
|
|
6904
|
-
[m, f,
|
|
6905
|
-
), /* @__PURE__ */
|
|
6904
|
+
[m, f, g]
|
|
6905
|
+
), /* @__PURE__ */ te(
|
|
6906
6906
|
"div",
|
|
6907
6907
|
{
|
|
6908
6908
|
className: am.uis,
|
|
@@ -6912,7 +6912,7 @@ const Tm = et(_2), j2 = sn(function({
|
|
|
6912
6912
|
width: `${c}px`,
|
|
6913
6913
|
height: `${a}px`
|
|
6914
6914
|
},
|
|
6915
|
-
children: t.map((v) => /* @__PURE__ */
|
|
6915
|
+
children: t.map((v) => /* @__PURE__ */ te(
|
|
6916
6916
|
Tm,
|
|
6917
6917
|
{
|
|
6918
6918
|
ref: u.current[v.id],
|
|
@@ -6940,10 +6940,10 @@ function ym(e, o, t, n, r, l) {
|
|
|
6940
6940
|
startBarIndex: d,
|
|
6941
6941
|
endBarIndex: h,
|
|
6942
6942
|
xToDataPoint: (f) => {
|
|
6943
|
-
const
|
|
6943
|
+
const g = s(f);
|
|
6944
6944
|
return {
|
|
6945
6945
|
x: f,
|
|
6946
|
-
barIndex:
|
|
6946
|
+
barIndex: g,
|
|
6947
6947
|
ohlcvs: a,
|
|
6948
6948
|
layerDataInstances: u
|
|
6949
6949
|
};
|
|
@@ -7038,69 +7038,69 @@ const km = (e, o) => ({
|
|
|
7038
7038
|
scrollToLatestMargin: h,
|
|
7039
7039
|
initialScrollToLatest: m,
|
|
7040
7040
|
onScroll: f,
|
|
7041
|
-
onZoom:
|
|
7041
|
+
onZoom: g
|
|
7042
7042
|
}) => {
|
|
7043
|
-
const v = _(null), b = _(null), w = _(t), Z = _(t),
|
|
7043
|
+
const v = _(null), b = _(null), w = _(t), Z = _(t), p = _(n), T = _(void 0), y = _(void 0), k = _(null), L = _(null), I = _(!1), P = _(!1), S = _(!1), M = _(!1);
|
|
7044
7044
|
Oe(() => {
|
|
7045
7045
|
L.current = a;
|
|
7046
7046
|
}, [a]);
|
|
7047
7047
|
const D = Ae(
|
|
7048
|
-
() => Li((
|
|
7049
|
-
v.current?.requestDraw(
|
|
7048
|
+
() => Li((N, B, F) => {
|
|
7049
|
+
v.current?.requestDraw(N, B, F);
|
|
7050
7050
|
}, 16),
|
|
7051
7051
|
// ~60fps
|
|
7052
7052
|
[]
|
|
7053
|
-
),
|
|
7054
|
-
() => Li((
|
|
7055
|
-
v.current?.requestDrawCrosshairs(
|
|
7053
|
+
), $ = Ae(
|
|
7054
|
+
() => Li((N, B, F, j, V) => {
|
|
7055
|
+
v.current?.requestDrawCrosshairs(N, B, F, j, V);
|
|
7056
7056
|
}, 16),
|
|
7057
7057
|
// ~60fps
|
|
7058
7058
|
[]
|
|
7059
|
-
), Y =
|
|
7060
|
-
(
|
|
7061
|
-
w.current =
|
|
7059
|
+
), Y = J(
|
|
7060
|
+
(N, B, F, j, V, ie, K, se = 0) => {
|
|
7061
|
+
w.current = F;
|
|
7062
7062
|
const {
|
|
7063
7063
|
firstDataPointIndex: De,
|
|
7064
7064
|
lastDataPointIndex: fe,
|
|
7065
7065
|
indexToTimestamp: at,
|
|
7066
7066
|
findClosestIndex: ta,
|
|
7067
7067
|
getTimescale: na
|
|
7068
|
-
} =
|
|
7069
|
-
if (Vl ||
|
|
7070
|
-
const Mn = De !== void 0 ? De *
|
|
7068
|
+
} = B, Vl = m && S.current === !1 && M.current === !1 && se === 0 && fe !== void 0;
|
|
7069
|
+
if (Vl || se !== 0 || T.current === void 0 || F !== Z.current || j !== p.current) {
|
|
7070
|
+
const Mn = De !== void 0 ? De * F - V.drawingAreaWidth + 1 : 0, la = fe !== void 0 ? (fe + 1) * F - F : 0;
|
|
7071
7071
|
if (Vl)
|
|
7072
|
-
T.current = fe *
|
|
7072
|
+
T.current = fe * F - (V.drawingAreaWidth - F * h), M.current = !0;
|
|
7073
7073
|
else {
|
|
7074
7074
|
const ia = Zm(
|
|
7075
7075
|
y.current ?? 0,
|
|
7076
|
-
-
|
|
7076
|
+
-se,
|
|
7077
7077
|
at,
|
|
7078
7078
|
ta,
|
|
7079
|
-
|
|
7080
|
-
|
|
7079
|
+
F,
|
|
7080
|
+
V.drawingAreaWidth,
|
|
7081
7081
|
Z.current,
|
|
7082
|
-
j !==
|
|
7082
|
+
j !== p.current,
|
|
7083
7083
|
Mn,
|
|
7084
7084
|
la
|
|
7085
7085
|
);
|
|
7086
7086
|
T.current = ia;
|
|
7087
7087
|
}
|
|
7088
7088
|
}
|
|
7089
|
-
const D0 = na(
|
|
7090
|
-
L.current && Sm(L.current,
|
|
7089
|
+
const D0 = na(F, T.current, V.drawingAreaWidth);
|
|
7090
|
+
L.current && Sm(L.current, N, D0.startBarIndex - (ie + Dm), D0.endBarIndex + K);
|
|
7091
7091
|
const ra = ym(
|
|
7092
|
-
|
|
7092
|
+
B,
|
|
7093
7093
|
D0,
|
|
7094
7094
|
L.current,
|
|
7095
7095
|
T.current,
|
|
7096
|
-
|
|
7097
|
-
|
|
7096
|
+
V.drawingAreaWidth,
|
|
7097
|
+
F
|
|
7098
7098
|
);
|
|
7099
|
-
if (k.current = ra, D(k.current,
|
|
7100
|
-
const Mn = T.current - (fe - 1) *
|
|
7101
|
-
b.current?.updateGoToLatestButton(Mn < 0 || Mn >
|
|
7099
|
+
if (k.current = ra, D(k.current, V, b.current?.updatePanelMetrics), T.current !== y.current && fe !== void 0) {
|
|
7100
|
+
const Mn = T.current - (fe - 1) * F + V.drawingAreaWidth;
|
|
7101
|
+
b.current?.updateGoToLatestButton(Mn < 0 || Mn > V.drawingAreaWidth / 2);
|
|
7102
7102
|
}
|
|
7103
|
-
return Z.current =
|
|
7103
|
+
return Z.current = F, p.current = j, y.current = T.current, T.current;
|
|
7104
7104
|
},
|
|
7105
7105
|
[m, h, D]
|
|
7106
7106
|
);
|
|
@@ -7125,11 +7125,11 @@ const km = (e, o) => ({
|
|
|
7125
7125
|
u,
|
|
7126
7126
|
d
|
|
7127
7127
|
]);
|
|
7128
|
-
const
|
|
7129
|
-
(
|
|
7130
|
-
if (
|
|
7128
|
+
const U = J(
|
|
7129
|
+
(N) => {
|
|
7130
|
+
if (N !== 0) {
|
|
7131
7131
|
S.current = !0, I.current === !1 && (v.current?.hideCrosshairs(i), I.current = !0);
|
|
7132
|
-
const
|
|
7132
|
+
const B = Y(
|
|
7133
7133
|
c,
|
|
7134
7134
|
s,
|
|
7135
7135
|
t,
|
|
@@ -7137,9 +7137,9 @@ const km = (e, o) => ({
|
|
|
7137
7137
|
i,
|
|
7138
7138
|
u,
|
|
7139
7139
|
d,
|
|
7140
|
-
|
|
7140
|
+
N
|
|
7141
7141
|
);
|
|
7142
|
-
f && f(
|
|
7142
|
+
f && f(B);
|
|
7143
7143
|
}
|
|
7144
7144
|
},
|
|
7145
7145
|
[
|
|
@@ -7153,24 +7153,24 @@ const km = (e, o) => ({
|
|
|
7153
7153
|
d,
|
|
7154
7154
|
f
|
|
7155
7155
|
]
|
|
7156
|
-
),
|
|
7157
|
-
I.current = !1, k.current &&
|
|
7156
|
+
), C = J((N, B) => {
|
|
7157
|
+
I.current = !1, k.current && $(
|
|
7158
7158
|
i,
|
|
7159
7159
|
k.current,
|
|
7160
|
-
|
|
7161
|
-
|
|
7162
|
-
(
|
|
7160
|
+
N,
|
|
7161
|
+
B,
|
|
7162
|
+
(F, j) => b.current?.updateLegends(j, k.current ? k.current.data[k.current.data.length - 1] : void 0)
|
|
7163
7163
|
);
|
|
7164
|
-
}, [
|
|
7165
|
-
if (
|
|
7164
|
+
}, [$, i]), E = J((N) => {
|
|
7165
|
+
if (N !== 1) {
|
|
7166
7166
|
S.current = !0, I.current === !1 && (v.current?.hideCrosshairs(i), I.current = !0);
|
|
7167
|
-
const
|
|
7168
|
-
let
|
|
7169
|
-
|
|
7167
|
+
const B = w.current;
|
|
7168
|
+
let F = B * N;
|
|
7169
|
+
F < 1 && (F = 1), g && F !== B && g(F);
|
|
7170
7170
|
}
|
|
7171
|
-
}, [
|
|
7171
|
+
}, [g, i]), A = J(() => {
|
|
7172
7172
|
S.current = !0, I.current === !1 && (v.current?.hideCrosshairs(i), I.current = !0);
|
|
7173
|
-
const { lastDataPointIndex:
|
|
7173
|
+
const { lastDataPointIndex: N } = s, B = N !== void 0 ? N * t - (i.drawingAreaWidth - t * h) : 0, F = (y.current ?? 0) - B;
|
|
7174
7174
|
Y(
|
|
7175
7175
|
c,
|
|
7176
7176
|
s,
|
|
@@ -7179,7 +7179,7 @@ const km = (e, o) => ({
|
|
|
7179
7179
|
i,
|
|
7180
7180
|
u,
|
|
7181
7181
|
d,
|
|
7182
|
-
|
|
7182
|
+
F
|
|
7183
7183
|
);
|
|
7184
7184
|
}, [
|
|
7185
7185
|
Y,
|
|
@@ -7191,8 +7191,8 @@ const km = (e, o) => ({
|
|
|
7191
7191
|
u,
|
|
7192
7192
|
d,
|
|
7193
7193
|
h
|
|
7194
|
-
]), x =
|
|
7195
|
-
P.current =
|
|
7194
|
+
]), x = J((N) => {
|
|
7195
|
+
P.current = N, P.current === !0 ? (v.current?.hideCrosshairs(i), I.current = !0) : I.current = !1;
|
|
7196
7196
|
}, [i]);
|
|
7197
7197
|
return /* @__PURE__ */ Kt(
|
|
7198
7198
|
"div",
|
|
@@ -7202,7 +7202,7 @@ const km = (e, o) => ({
|
|
|
7202
7202
|
backgroundColor: r.backgroundColor
|
|
7203
7203
|
},
|
|
7204
7204
|
children: [
|
|
7205
|
-
/* @__PURE__ */
|
|
7205
|
+
/* @__PURE__ */ te(
|
|
7206
7206
|
R2,
|
|
7207
7207
|
{
|
|
7208
7208
|
ref: v,
|
|
@@ -7213,21 +7213,21 @@ const km = (e, o) => ({
|
|
|
7213
7213
|
panels: l
|
|
7214
7214
|
}
|
|
7215
7215
|
),
|
|
7216
|
-
/* @__PURE__ */
|
|
7216
|
+
/* @__PURE__ */ te(
|
|
7217
7217
|
S4,
|
|
7218
7218
|
{
|
|
7219
|
-
onScroll:
|
|
7220
|
-
onMouseMove:
|
|
7219
|
+
onScroll: U,
|
|
7220
|
+
onMouseMove: C,
|
|
7221
7221
|
onZoom: E
|
|
7222
7222
|
}
|
|
7223
7223
|
),
|
|
7224
|
-
/* @__PURE__ */
|
|
7224
|
+
/* @__PURE__ */ te(
|
|
7225
7225
|
bm,
|
|
7226
7226
|
{
|
|
7227
7227
|
ref: b,
|
|
7228
7228
|
layout: i,
|
|
7229
7229
|
panels: l,
|
|
7230
|
-
onGoToLatest:
|
|
7230
|
+
onGoToLatest: A,
|
|
7231
7231
|
onButtonMouseEnterLeave: x
|
|
7232
7232
|
}
|
|
7233
7233
|
)
|
|
@@ -7291,7 +7291,7 @@ const km = (e, o) => ({
|
|
|
7291
7291
|
heightRatio: l,
|
|
7292
7292
|
paddingTop: i,
|
|
7293
7293
|
paddingBottom: s,
|
|
7294
|
-
borderTop:
|
|
7294
|
+
borderTop: z(e.borderTop, n.borderTop),
|
|
7295
7295
|
layers: xm(e.layers, o.layers, r),
|
|
7296
7296
|
controls: Bm(e.controls ?? {}, n.controls)
|
|
7297
7297
|
};
|
|
@@ -7466,7 +7466,7 @@ const km = (e, o) => ({
|
|
|
7466
7466
|
}
|
|
7467
7467
|
},
|
|
7468
7468
|
legend: {
|
|
7469
|
-
...
|
|
7469
|
+
...ce,
|
|
7470
7470
|
fields: [
|
|
7471
7471
|
{ output: "open", color: "#1a1a1a" },
|
|
7472
7472
|
{ output: "high", color: "#1a1a1a" },
|
|
@@ -7475,7 +7475,7 @@ const km = (e, o) => ({
|
|
|
7475
7475
|
]
|
|
7476
7476
|
},
|
|
7477
7477
|
yAxis: {
|
|
7478
|
-
...
|
|
7478
|
+
...ne
|
|
7479
7479
|
}
|
|
7480
7480
|
},
|
|
7481
7481
|
priceLine: {
|
|
@@ -7489,11 +7489,11 @@ const km = (e, o) => ({
|
|
|
7489
7489
|
}
|
|
7490
7490
|
},
|
|
7491
7491
|
legend: {
|
|
7492
|
-
...
|
|
7492
|
+
...ce,
|
|
7493
7493
|
fields: [{ output: "price", color: "dodgerblue", label: "" }]
|
|
7494
7494
|
},
|
|
7495
7495
|
yAxis: {
|
|
7496
|
-
...
|
|
7496
|
+
...ne
|
|
7497
7497
|
}
|
|
7498
7498
|
},
|
|
7499
7499
|
volumeBars: {
|
|
@@ -7540,11 +7540,11 @@ const km = (e, o) => ({
|
|
|
7540
7540
|
}
|
|
7541
7541
|
},
|
|
7542
7542
|
legend: {
|
|
7543
|
-
...
|
|
7543
|
+
...ce,
|
|
7544
7544
|
fields: [{ output: "volume", color: "#1a1a1a" }]
|
|
7545
7545
|
},
|
|
7546
7546
|
yAxis: {
|
|
7547
|
-
...
|
|
7547
|
+
...ne
|
|
7548
7548
|
}
|
|
7549
7549
|
},
|
|
7550
7550
|
atr: {
|
|
@@ -7558,11 +7558,11 @@ const km = (e, o) => ({
|
|
|
7558
7558
|
}
|
|
7559
7559
|
},
|
|
7560
7560
|
legend: {
|
|
7561
|
-
...
|
|
7561
|
+
...ce,
|
|
7562
7562
|
fields: [{ output: "value", color: "#1a1a1a" }]
|
|
7563
7563
|
},
|
|
7564
7564
|
yAxis: {
|
|
7565
|
-
...
|
|
7565
|
+
...ne
|
|
7566
7566
|
}
|
|
7567
7567
|
},
|
|
7568
7568
|
bollingerBands: {
|
|
@@ -7581,7 +7581,7 @@ const km = (e, o) => ({
|
|
|
7581
7581
|
}
|
|
7582
7582
|
},
|
|
7583
7583
|
legend: {
|
|
7584
|
-
...
|
|
7584
|
+
...ce,
|
|
7585
7585
|
fields: [
|
|
7586
7586
|
{ output: "upper", color: "#1a1a1a" },
|
|
7587
7587
|
{ output: "middle", color: "#1a1a1a" },
|
|
@@ -7589,7 +7589,7 @@ const km = (e, o) => ({
|
|
|
7589
7589
|
]
|
|
7590
7590
|
},
|
|
7591
7591
|
yAxis: {
|
|
7592
|
-
...
|
|
7592
|
+
...ne
|
|
7593
7593
|
}
|
|
7594
7594
|
},
|
|
7595
7595
|
ema: {
|
|
@@ -7603,11 +7603,11 @@ const km = (e, o) => ({
|
|
|
7603
7603
|
}
|
|
7604
7604
|
},
|
|
7605
7605
|
legend: {
|
|
7606
|
-
...
|
|
7606
|
+
...ce,
|
|
7607
7607
|
fields: [{ output: "value", color: "#1a1a1a" }]
|
|
7608
7608
|
},
|
|
7609
7609
|
yAxis: {
|
|
7610
|
-
...
|
|
7610
|
+
...ne
|
|
7611
7611
|
}
|
|
7612
7612
|
},
|
|
7613
7613
|
macd: {
|
|
@@ -7628,7 +7628,7 @@ const km = (e, o) => ({
|
|
|
7628
7628
|
}
|
|
7629
7629
|
},
|
|
7630
7630
|
legend: {
|
|
7631
|
-
...
|
|
7631
|
+
...ce,
|
|
7632
7632
|
fields: [
|
|
7633
7633
|
{ output: "macd", color: "#1a1a1a" },
|
|
7634
7634
|
{ output: "signal", color: "#ef4444" },
|
|
@@ -7636,7 +7636,7 @@ const km = (e, o) => ({
|
|
|
7636
7636
|
]
|
|
7637
7637
|
},
|
|
7638
7638
|
yAxis: {
|
|
7639
|
-
...
|
|
7639
|
+
...ne
|
|
7640
7640
|
}
|
|
7641
7641
|
},
|
|
7642
7642
|
rsi: {
|
|
@@ -7650,11 +7650,11 @@ const km = (e, o) => ({
|
|
|
7650
7650
|
}
|
|
7651
7651
|
},
|
|
7652
7652
|
legend: {
|
|
7653
|
-
...
|
|
7653
|
+
...ce,
|
|
7654
7654
|
fields: [{ output: "value", color: "#1a1a1a" }]
|
|
7655
7655
|
},
|
|
7656
7656
|
yAxis: {
|
|
7657
|
-
...
|
|
7657
|
+
...ne
|
|
7658
7658
|
}
|
|
7659
7659
|
},
|
|
7660
7660
|
sma: {
|
|
@@ -7668,11 +7668,11 @@ const km = (e, o) => ({
|
|
|
7668
7668
|
}
|
|
7669
7669
|
},
|
|
7670
7670
|
legend: {
|
|
7671
|
-
...
|
|
7671
|
+
...ce,
|
|
7672
7672
|
fields: [{ output: "value", color: "orange" }]
|
|
7673
7673
|
},
|
|
7674
7674
|
yAxis: {
|
|
7675
|
-
...
|
|
7675
|
+
...ne
|
|
7676
7676
|
}
|
|
7677
7677
|
},
|
|
7678
7678
|
stochastic: {
|
|
@@ -7691,26 +7691,26 @@ const km = (e, o) => ({
|
|
|
7691
7691
|
}
|
|
7692
7692
|
},
|
|
7693
7693
|
legend: {
|
|
7694
|
-
...
|
|
7694
|
+
...ce,
|
|
7695
7695
|
fields: [
|
|
7696
7696
|
{ output: "k", color: "#1a1a1a" },
|
|
7697
7697
|
{ output: "d", color: "#ef4444" }
|
|
7698
7698
|
]
|
|
7699
7699
|
},
|
|
7700
7700
|
yAxis: {
|
|
7701
|
-
...
|
|
7701
|
+
...ne
|
|
7702
7702
|
}
|
|
7703
7703
|
}
|
|
7704
7704
|
}
|
|
7705
7705
|
}, jt = {
|
|
7706
|
-
...
|
|
7706
|
+
...ce,
|
|
7707
7707
|
backgroundColor: "#ffffff16",
|
|
7708
7708
|
vPadding: 2,
|
|
7709
7709
|
color: "#ffffff99"
|
|
7710
7710
|
}, Vt = {
|
|
7711
|
-
...
|
|
7711
|
+
...ne,
|
|
7712
7712
|
labels: {
|
|
7713
|
-
...
|
|
7713
|
+
...ne.labels,
|
|
7714
7714
|
color: "#ffffff99"
|
|
7715
7715
|
}
|
|
7716
7716
|
}, Om = {
|
|
@@ -7872,11 +7872,11 @@ const km = (e, o) => ({
|
|
|
7872
7872
|
}
|
|
7873
7873
|
},
|
|
7874
7874
|
legend: {
|
|
7875
|
-
...
|
|
7875
|
+
...ce,
|
|
7876
7876
|
fields: [{ output: "value", color: "#ddd" }]
|
|
7877
7877
|
},
|
|
7878
7878
|
yAxis: {
|
|
7879
|
-
...
|
|
7879
|
+
...ne
|
|
7880
7880
|
}
|
|
7881
7881
|
},
|
|
7882
7882
|
bollingerBands: {
|
|
@@ -7895,7 +7895,7 @@ const km = (e, o) => ({
|
|
|
7895
7895
|
}
|
|
7896
7896
|
},
|
|
7897
7897
|
legend: {
|
|
7898
|
-
...
|
|
7898
|
+
...ce,
|
|
7899
7899
|
fields: [
|
|
7900
7900
|
{ output: "upper", color: "#ddd" },
|
|
7901
7901
|
{ output: "middle", color: "#ddd" },
|
|
@@ -7903,7 +7903,7 @@ const km = (e, o) => ({
|
|
|
7903
7903
|
]
|
|
7904
7904
|
},
|
|
7905
7905
|
yAxis: {
|
|
7906
|
-
...
|
|
7906
|
+
...ne
|
|
7907
7907
|
}
|
|
7908
7908
|
},
|
|
7909
7909
|
ema: {
|
|
@@ -7917,11 +7917,11 @@ const km = (e, o) => ({
|
|
|
7917
7917
|
}
|
|
7918
7918
|
},
|
|
7919
7919
|
legend: {
|
|
7920
|
-
...
|
|
7920
|
+
...ce,
|
|
7921
7921
|
fields: [{ output: "value", color: "#ddd" }]
|
|
7922
7922
|
},
|
|
7923
7923
|
yAxis: {
|
|
7924
|
-
...
|
|
7924
|
+
...ne
|
|
7925
7925
|
}
|
|
7926
7926
|
},
|
|
7927
7927
|
macd: {
|
|
@@ -7942,7 +7942,7 @@ const km = (e, o) => ({
|
|
|
7942
7942
|
}
|
|
7943
7943
|
},
|
|
7944
7944
|
legend: {
|
|
7945
|
-
...
|
|
7945
|
+
...ce,
|
|
7946
7946
|
fields: [
|
|
7947
7947
|
{ output: "macd", color: "#ddd" },
|
|
7948
7948
|
{ output: "signal", color: "#ef4444" },
|
|
@@ -7950,7 +7950,7 @@ const km = (e, o) => ({
|
|
|
7950
7950
|
]
|
|
7951
7951
|
},
|
|
7952
7952
|
yAxis: {
|
|
7953
|
-
...
|
|
7953
|
+
...ne
|
|
7954
7954
|
}
|
|
7955
7955
|
},
|
|
7956
7956
|
rsi: {
|
|
@@ -7964,11 +7964,11 @@ const km = (e, o) => ({
|
|
|
7964
7964
|
}
|
|
7965
7965
|
},
|
|
7966
7966
|
legend: {
|
|
7967
|
-
...
|
|
7967
|
+
...ce,
|
|
7968
7968
|
fields: [{ output: "value", color: "#ddd" }]
|
|
7969
7969
|
},
|
|
7970
7970
|
yAxis: {
|
|
7971
|
-
...
|
|
7971
|
+
...ne
|
|
7972
7972
|
}
|
|
7973
7973
|
},
|
|
7974
7974
|
sma: {
|
|
@@ -8125,7 +8125,7 @@ const Um = (e) => ua.toArray(e).map(Vm).filter((t) => t !== null), Xm = (e, o) =
|
|
|
8125
8125
|
layersTopology: o
|
|
8126
8126
|
};
|
|
8127
8127
|
}, qm = (e, o, t, n, r) => {
|
|
8128
|
-
const l = Math.max(...r.map((w) => w.yAxes.leftTotalWidth)), i = Math.max(...r.map((w) => w.yAxes.rightTotalWidth)), { xAxis: s } = n, c = s, a = c ? c.height : 0, u = l, d = e - i, h = 0, m = d - u, f = o - a,
|
|
8128
|
+
const l = Math.max(...r.map((w) => w.yAxes.leftTotalWidth)), i = Math.max(...r.map((w) => w.yAxes.rightTotalWidth)), { xAxis: s } = n, c = s, a = c ? c.height : 0, u = l, d = e - i, h = 0, m = d - u, f = o - a, g = h + f, v = e - d, b = o - g;
|
|
8129
8129
|
return {
|
|
8130
8130
|
dpr: t,
|
|
8131
8131
|
chartWidth: e,
|
|
@@ -8135,7 +8135,7 @@ const Um = (e) => ua.toArray(e).map(Vm).filter((t) => t !== null), Xm = (e, o) =
|
|
|
8135
8135
|
drawingAreaWidth: m,
|
|
8136
8136
|
drawingAreaHeight: f,
|
|
8137
8137
|
drawingAreaX1: d,
|
|
8138
|
-
drawingAreaY1:
|
|
8138
|
+
drawingAreaY1: g,
|
|
8139
8139
|
drawingAreaRight: v,
|
|
8140
8140
|
drawingAreaBottom: b
|
|
8141
8141
|
};
|
|
@@ -8160,23 +8160,23 @@ const Um = (e) => ua.toArray(e).map(Vm).filter((t) => t !== null), Xm = (e, o) =
|
|
|
8160
8160
|
s.fill(-1);
|
|
8161
8161
|
const c = new Float64Array(i), a = new Float64Array(i), u = new Float64Array(i), d = new Float64Array(i), h = new Float64Array(i), m = new Float64Array(i), f = new Float64Array(i);
|
|
8162
8162
|
c.fill(NaN), a.fill(NaN), u.fill(NaN), d.fill(NaN), h.fill(NaN), m.fill(NaN), f.fill(NaN);
|
|
8163
|
-
let
|
|
8163
|
+
let g;
|
|
8164
8164
|
if (o === "d1" || o === "w1" || o === "M1") {
|
|
8165
|
-
const b = r.map((
|
|
8165
|
+
const b = r.map((p) => p.startTs), w = r.map((p) => p.endTs), Z = (p) => {
|
|
8166
8166
|
let T = 0, y = r.length - 1;
|
|
8167
8167
|
for (; T <= y; ) {
|
|
8168
8168
|
const k = T + y >> 1;
|
|
8169
|
-
if (
|
|
8170
|
-
else if (
|
|
8169
|
+
if (p < b[k]) y = k - 1;
|
|
8170
|
+
else if (p > w[k]) T = k + 1;
|
|
8171
8171
|
else return k;
|
|
8172
8172
|
}
|
|
8173
8173
|
return -1;
|
|
8174
8174
|
};
|
|
8175
|
-
for (let
|
|
8176
|
-
const T = sr(e[
|
|
8175
|
+
for (let p = 0; p < e.length; p++) {
|
|
8176
|
+
const T = sr(e[p].time), y = Z(T);
|
|
8177
8177
|
if (y === -1) continue;
|
|
8178
|
-
const k = r[y], L = k.startIndex, I = e[
|
|
8179
|
-
s[L] =
|
|
8178
|
+
const k = r[y], L = k.startIndex, I = e[p];
|
|
8179
|
+
s[L] = p, c[L] = T, a[L] = k.labelTs ?? k.startTs, u[L] = I.open, d[L] = I.high, h[L] = I.low, m[L] = I.close, f[L] = I.volume, g = L;
|
|
8180
8180
|
}
|
|
8181
8181
|
} else {
|
|
8182
8182
|
const b = /* @__PURE__ */ new Map();
|
|
@@ -8186,11 +8186,11 @@ const Um = (e) => ua.toArray(e).map(Vm).filter((t) => t !== null), Xm = (e, o) =
|
|
|
8186
8186
|
}
|
|
8187
8187
|
for (let w = 0; w < r.length; w++) {
|
|
8188
8188
|
const Z = r[w];
|
|
8189
|
-
for (let
|
|
8190
|
-
const T = Z.startTs + (
|
|
8189
|
+
for (let p = Z.startIndex; p < Z.startIndex + Z.bars; p++) {
|
|
8190
|
+
const T = Z.startTs + (p - Z.startIndex) * Z.barSizeMs, y = b.get(T);
|
|
8191
8191
|
if (y === void 0) continue;
|
|
8192
8192
|
const k = e[y];
|
|
8193
|
-
s[
|
|
8193
|
+
s[p] = y, c[p] = T, a[p] = T, u[p] = k.open, d[p] = k.high, h[p] = k.low, m[p] = k.close, f[p] = k.volume, g = p;
|
|
8194
8194
|
}
|
|
8195
8195
|
}
|
|
8196
8196
|
}
|
|
@@ -8207,7 +8207,7 @@ const Um = (e) => ua.toArray(e).map(Vm).filter((t) => t !== null), Xm = (e, o) =
|
|
|
8207
8207
|
close: m,
|
|
8208
8208
|
volume: f
|
|
8209
8209
|
},
|
|
8210
|
-
lastBarWithDataIndex:
|
|
8210
|
+
lastBarWithDataIndex: g
|
|
8211
8211
|
};
|
|
8212
8212
|
}, V2 = (e, o) => {
|
|
8213
8213
|
let t = 0, n = e.length;
|
|
@@ -8279,9 +8279,9 @@ function m5(e, o, t, n, r, l, i, s) {
|
|
|
8279
8279
|
const c = [], { ohlcvs: { timestamp: a, timeLabel: u } } = e;
|
|
8280
8280
|
let d, h = d ? Kn[n.unit](d) : void 0;
|
|
8281
8281
|
for (let m = o; m <= t; m++) {
|
|
8282
|
-
const f = a[m],
|
|
8282
|
+
const f = a[m], g = u[m];
|
|
8283
8283
|
if (isNaN(f)) continue;
|
|
8284
|
-
const v = _l(
|
|
8284
|
+
const v = _l(g, s), b = h5(n, v, d, h);
|
|
8285
8285
|
b && c.push({
|
|
8286
8286
|
step: n,
|
|
8287
8287
|
barIndex: m,
|
|
@@ -8459,12 +8459,12 @@ const Mi = 80, f5 = [
|
|
|
8459
8459
|
endBarIndex: m,
|
|
8460
8460
|
gridLines: f,
|
|
8461
8461
|
xToBarIndex: (w, Z = !0) => {
|
|
8462
|
-
const
|
|
8463
|
-
return Math[Z ? "round" : "floor"](
|
|
8462
|
+
const p = w + n;
|
|
8463
|
+
return Math[Z ? "round" : "floor"](p / t);
|
|
8464
8464
|
},
|
|
8465
8465
|
xToIntervalX: (w, Z) => {
|
|
8466
|
-
const
|
|
8467
|
-
return Math.round(
|
|
8466
|
+
const p = w + Z;
|
|
8467
|
+
return Math.round(p / t) * t - Z;
|
|
8468
8468
|
},
|
|
8469
8469
|
timestampToIndex: i,
|
|
8470
8470
|
getLastVisibleBarIndex: (w) => w * t - n - c >= r ? w - 1 : w
|
|
@@ -8622,85 +8622,87 @@ const Y5 = (e) => {
|
|
|
8622
8622
|
xAxis: l,
|
|
8623
8623
|
grid: i,
|
|
8624
8624
|
crosshairs: s,
|
|
8625
|
-
|
|
8626
|
-
|
|
8627
|
-
|
|
8628
|
-
|
|
8629
|
-
|
|
8630
|
-
|
|
8631
|
-
|
|
8632
|
-
|
|
8633
|
-
|
|
8625
|
+
borders: c,
|
|
8626
|
+
theme: a = Si.light,
|
|
8627
|
+
panels: u,
|
|
8628
|
+
data: d,
|
|
8629
|
+
scrollToLatestMargin: h = 5,
|
|
8630
|
+
initialScrollToLatest: m = !1,
|
|
8631
|
+
onScroll: f,
|
|
8632
|
+
onZoom: g,
|
|
8633
|
+
children: v,
|
|
8634
|
+
...b
|
|
8634
8635
|
}) => {
|
|
8635
|
-
const
|
|
8636
|
-
const
|
|
8637
|
-
if (
|
|
8636
|
+
const Z = Ae(() => n || (d.length < 2 ? "m1" : Y5(d)), [n, d]), [p, T] = y4(e === "auto" || o === "auto"), y = Z4(), k = _(null), L = _(t), [I, P] = ln(t), [S, M] = Ae(() => [e === "auto" ? p.width : e, o === "auto" ? p.height : o], [e, o, p]), D = Ae(() => {
|
|
8637
|
+
const j = v ? Um(v) : [], V = u ?? j;
|
|
8638
|
+
if (V.length === 0)
|
|
8638
8639
|
throw new Error(
|
|
8639
8640
|
"Chart requires at least one panel. Provide `panels` prop or panel components as children."
|
|
8640
8641
|
);
|
|
8641
|
-
return
|
|
8642
|
-
}, [
|
|
8642
|
+
return V;
|
|
8643
|
+
}, [v, u]), $ = Ae(() => typeof a == "string" ? Si[a] : a, [a]), Y = Ae(() => b4({
|
|
8643
8644
|
backgroundColor: r,
|
|
8644
8645
|
xAxis: l,
|
|
8645
8646
|
grid: i,
|
|
8646
|
-
crosshairs: s
|
|
8647
|
-
|
|
8648
|
-
|
|
8647
|
+
crosshairs: s,
|
|
8648
|
+
borders: c
|
|
8649
|
+
}, $, "UTC"), [r, l, i, s, c, $, "UTC"]), { panelConfigs: U, layersTopology: C } = Ae(() => {
|
|
8650
|
+
const j = Fm(D, $), V = W5(j);
|
|
8649
8651
|
return {
|
|
8650
|
-
panelConfigs: zm(
|
|
8651
|
-
layersTopology:
|
|
8652
|
+
panelConfigs: zm(j, V),
|
|
8653
|
+
layersTopology: V
|
|
8652
8654
|
};
|
|
8653
|
-
}, [
|
|
8654
|
-
() => qm(
|
|
8655
|
-
[
|
|
8656
|
-
), { maxLookback:
|
|
8657
|
-
const
|
|
8655
|
+
}, [D, $]), E = Ae(
|
|
8656
|
+
() => qm(S, M, y, Y, U),
|
|
8657
|
+
[S, M, y, Y, U]
|
|
8658
|
+
), { maxLookback: A, maxLookForward: x } = Ae(() => {
|
|
8659
|
+
const j = U.flatMap((K) => K.layers.filter((se) => se.indicator === !0)), V = Math.max(0, ...j.map((K) => typeof K.lookback == "number" ? K.lookback : K.lookback(K.period))), ie = Math.max(0, ...j.map((K) => K.offset));
|
|
8658
8660
|
return {
|
|
8659
|
-
maxLookback:
|
|
8660
|
-
maxLookForward:
|
|
8661
|
+
maxLookback: V,
|
|
8662
|
+
maxLookForward: ie
|
|
8661
8663
|
};
|
|
8662
|
-
}, [
|
|
8664
|
+
}, [U]), N = Ae(() => A5(d, Z), [d, Z]), B = Ae(() => Gm(U.flatMap((j) => j.layers), C, N.barsLength), [U, C, N.barsLength]);
|
|
8663
8665
|
Oe(() => {
|
|
8664
|
-
|
|
8666
|
+
P(t);
|
|
8665
8667
|
}, [t]);
|
|
8666
|
-
const
|
|
8667
|
-
|
|
8668
|
-
const
|
|
8669
|
-
|
|
8668
|
+
const F = J((j) => {
|
|
8669
|
+
P(j), g && (k.current !== null && clearTimeout(k.current), k.current = window.setTimeout(() => {
|
|
8670
|
+
const V = Math.round(j);
|
|
8671
|
+
V !== L.current && (g(V), L.current = V), k.current = null;
|
|
8670
8672
|
}, 150));
|
|
8671
|
-
}, [
|
|
8673
|
+
}, [g]);
|
|
8672
8674
|
return Oe(() => () => {
|
|
8673
|
-
|
|
8674
|
-
}, []), /* @__PURE__ */
|
|
8675
|
+
k.current !== null && clearTimeout(k.current);
|
|
8676
|
+
}, []), /* @__PURE__ */ te(
|
|
8675
8677
|
"div",
|
|
8676
8678
|
{
|
|
8677
|
-
ref:
|
|
8679
|
+
ref: T,
|
|
8678
8680
|
className: j5.chart,
|
|
8679
|
-
...
|
|
8681
|
+
...b,
|
|
8680
8682
|
style: {
|
|
8681
8683
|
width: e === "auto" ? "100%" : `${e}px`,
|
|
8682
8684
|
height: o === "auto" ? "100%" : `${o}px`,
|
|
8683
|
-
...
|
|
8685
|
+
...b.style
|
|
8684
8686
|
},
|
|
8685
|
-
children:
|
|
8687
|
+
children: S > 0 && M > 0 && /* @__PURE__ */ te(
|
|
8686
8688
|
Am,
|
|
8687
8689
|
{
|
|
8688
|
-
chartWidth:
|
|
8689
|
-
chartHeight:
|
|
8690
|
-
intervalSize:
|
|
8691
|
-
granularity:
|
|
8692
|
-
config:
|
|
8693
|
-
panels:
|
|
8694
|
-
layout:
|
|
8695
|
-
indexProvider:
|
|
8696
|
-
dataMap:
|
|
8697
|
-
initialLayersData:
|
|
8698
|
-
maxLookback:
|
|
8699
|
-
maxLookForward:
|
|
8700
|
-
scrollToLatestMargin:
|
|
8701
|
-
initialScrollToLatest:
|
|
8702
|
-
onScroll:
|
|
8703
|
-
onZoom:
|
|
8690
|
+
chartWidth: S,
|
|
8691
|
+
chartHeight: M,
|
|
8692
|
+
intervalSize: I,
|
|
8693
|
+
granularity: Z,
|
|
8694
|
+
config: Y,
|
|
8695
|
+
panels: U,
|
|
8696
|
+
layout: E,
|
|
8697
|
+
indexProvider: N,
|
|
8698
|
+
dataMap: N.dataMap,
|
|
8699
|
+
initialLayersData: B,
|
|
8700
|
+
maxLookback: A,
|
|
8701
|
+
maxLookForward: x,
|
|
8702
|
+
scrollToLatestMargin: h,
|
|
8703
|
+
initialScrollToLatest: m,
|
|
8704
|
+
onScroll: f,
|
|
8705
|
+
onZoom: F
|
|
8704
8706
|
}
|
|
8705
8707
|
)
|
|
8706
8708
|
}
|