charts-core 1.1.25 → 1.1.26

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.
@@ -53,23 +53,20 @@ const Hs = (i) => {
53
53
  const e = Array.from(i.childNodes);
54
54
  for (let t = 0; t < e.length; t++)
55
55
  i.removeChild(e[t]);
56
- }, Rs = (i, e = {}) => {
57
- const t = "http://www.w3.org/2000/svg", { showArrow: s = !0 } = e, n = document.createElement("div");
58
- n.className = "sc-charts__hovered-circles-tooltip-container", n.style.display = "none";
59
- const a = document.createElement("div");
60
- a.className = "sc-charts__hovered-circles-tooltip";
61
- let r = null;
62
- if (s) {
63
- r = document.createElement("div"), r.className = "sc-charts__hovered-circles-tooltip-arrow";
64
- const o = document.createElementNS(t, "svg");
65
- o.setAttribute("width", "12"), o.setAttribute("height", "4"), o.setAttribute("viewBox", "0 0 12 4"), o.setAttribute("fill", "none"), o.setAttribute("xmlns", t);
66
- const c = document.createElementNS(t, "path");
67
- c.setAttribute("d", "M6 4L0 0H12L6 4Z"), o.appendChild(c), r.appendChild(o), n.append(r);
68
- }
69
- return n.append(a), i.append(n), {
70
- tooltipContainer: n,
71
- tooltip: a,
72
- tooltipArrow: r
56
+ }, Rs = (i) => {
57
+ const e = "http://www.w3.org/2000/svg", t = document.createElement("div");
58
+ t.className = "sc-charts__hovered-circles-tooltip-container", t.style.display = "none";
59
+ const s = document.createElement("div");
60
+ s.className = "sc-charts__hovered-circles-tooltip";
61
+ const n = document.createElement("div");
62
+ n.className = "sc-charts__hovered-circles-tooltip-arrow";
63
+ const a = document.createElementNS(e, "svg");
64
+ a.setAttribute("width", "12"), a.setAttribute("height", "4"), a.setAttribute("viewBox", "0 0 12 4"), a.setAttribute("fill", "none"), a.setAttribute("xmlns", e);
65
+ const r = document.createElementNS(e, "path");
66
+ return r.setAttribute("d", "M6 4L0 0H12L6 4Z"), a.appendChild(r), n.appendChild(a), t.append(n), t.append(s), i.append(t), {
67
+ tooltipContainer: t,
68
+ tooltip: s,
69
+ tooltipArrow: n
73
70
  };
74
71
  }, $s = (i, e, {
75
72
  x: t,
@@ -103,9 +100,7 @@ const qt = (i, { x1: e, x2: t, y1: s, y2: n }) => i.append("line").attr("x1", e)
103
100
  }), h === "hovered-circles")) {
104
101
  const p = n.range()[0], v = s(r[0].date), b = s(r[r.length - 1].date);
105
102
  qt(e, { x1: v, x2: b, y1: p, y2: p });
106
- const { tooltipContainer: w, tooltip: x, tooltipArrow: y } = Rs(o, {
107
- showArrow: !d
108
- }), C = (S) => {
103
+ const { tooltipContainer: w, tooltip: x, tooltipArrow: y } = Rs(o), C = (S) => {
109
104
  if (!d) return;
110
105
  _i(x), w.style.display = "block", x.append(d({ date: S.date, value: S.value }));
111
106
  const N = x.getBoundingClientRect(), $ = Os(
@@ -114,7 +109,7 @@ const qt = (i, { x1: e, x2: t, y1: s, y2: n }) => i.append("line").attr("x1", e)
114
109
  i.config.margin.left - i.config.grid.tooltipArrowSize,
115
110
  i.width - i.config.margin.right + i.config.grid.tooltipArrowSize
116
111
  );
117
- $ !== null && (x.style.left = $ + "px"), y && (y.style.left = s(S.date) + "px");
112
+ $ !== null && (x.style.left = $ + "px"), y.style.left = s(S.date) + "px";
118
113
  }, M = () => {
119
114
  w.style.display = "none";
120
115
  };
@@ -869,9 +864,9 @@ function fn() {
869
864
  return l.apply(u, m);
870
865
  }
871
866
  function Pe(l, u) {
872
- for (var m = -1, A = Array(l); ++m < l; )
873
- A[m] = u(m);
874
- return A;
867
+ for (var m = -1, T = Array(l); ++m < l; )
868
+ T[m] = u(m);
869
+ return T;
875
870
  }
876
871
  function le(l) {
877
872
  return function(u) {
@@ -886,7 +881,7 @@ function fn() {
886
881
  return l(u(m));
887
882
  };
888
883
  }
889
- var xe = Array.prototype, Ti = Function.prototype, ze = Object.prototype, at = O["__core-js_shared__"], Ve = Ti.toString, ne = ze.hasOwnProperty, Nt = function() {
884
+ var xe = Array.prototype, Ai = Function.prototype, ze = Object.prototype, at = O["__core-js_shared__"], Ve = Ai.toString, ne = ze.hasOwnProperty, Nt = function() {
890
885
  var l = /[^.]+$/.exec(at && at.keys && at.keys.IE_PROTO || "");
891
886
  return l ? "Symbol(src)_1." + l : "";
892
887
  }(), Ft = ze.toString, Mi = Ve.call(Object), Si = RegExp(
@@ -915,8 +910,8 @@ function fn() {
915
910
  function de(l) {
916
911
  var u = -1, m = l == null ? 0 : l.length;
917
912
  for (this.clear(); ++u < m; ) {
918
- var A = l[u];
919
- this.set(A[0], A[1]);
913
+ var T = l[u];
914
+ this.set(T[0], T[1]);
920
915
  }
921
916
  }
922
917
  function Fi() {
@@ -946,8 +941,8 @@ function fn() {
946
941
  function te(l) {
947
942
  var u = -1, m = l == null ? 0 : l.length;
948
943
  for (this.clear(); ++u < m; ) {
949
- var A = l[u];
950
- this.set(A[0], A[1]);
944
+ var T = l[u];
945
+ this.set(T[0], T[1]);
951
946
  }
952
947
  }
953
948
  function $i() {
@@ -957,8 +952,8 @@ function fn() {
957
952
  var u = this.__data__, m = je(u, l);
958
953
  if (m < 0)
959
954
  return !1;
960
- var A = u.length - 1;
961
- return m == A ? u.pop() : ki.call(u, m, 1), --this.size, !0;
955
+ var T = u.length - 1;
956
+ return m == T ? u.pop() : ki.call(u, m, 1), --this.size, !0;
962
957
  }
963
958
  function Pi(l) {
964
959
  var u = this.__data__, m = je(u, l);
@@ -968,15 +963,15 @@ function fn() {
968
963
  return je(this.__data__, l) > -1;
969
964
  }
970
965
  function Vi(l, u) {
971
- var m = this.__data__, A = je(m, l);
972
- return A < 0 ? (++this.size, m.push([l, u])) : m[A][1] = u, this;
966
+ var m = this.__data__, T = je(m, l);
967
+ return T < 0 ? (++this.size, m.push([l, u])) : m[T][1] = u, this;
973
968
  }
974
969
  te.prototype.clear = $i, te.prototype.delete = Oi, te.prototype.get = Pi, te.prototype.has = zi, te.prototype.set = Vi;
975
970
  function me(l) {
976
971
  var u = -1, m = l == null ? 0 : l.length;
977
972
  for (this.clear(); ++u < m; ) {
978
- var A = l[u];
979
- this.set(A[0], A[1]);
973
+ var T = l[u];
974
+ this.set(T[0], T[1]);
980
975
  }
981
976
  }
982
977
  function Yi() {
@@ -997,8 +992,8 @@ function fn() {
997
992
  return Ue(this, l).has(l);
998
993
  }
999
994
  function Ui(l, u) {
1000
- var m = Ue(this, l), A = m.size;
1001
- return m.set(l, u), this.size += m.size == A ? 0 : 1, this;
995
+ var m = Ue(this, l), T = m.size;
996
+ return m.set(l, u), this.size += m.size == T ? 0 : 1, this;
1002
997
  }
1003
998
  me.prototype.clear = Yi, me.prototype.delete = Wi, me.prototype.get = ji, me.prototype.has = Xi, me.prototype.set = Ui;
1004
999
  function pe(l) {
@@ -1021,16 +1016,16 @@ function fn() {
1021
1016
  function Qi(l, u) {
1022
1017
  var m = this.__data__;
1023
1018
  if (m instanceof te) {
1024
- var A = m.__data__;
1025
- if (!Ot || A.length < t - 1)
1026
- return A.push([l, u]), this.size = ++m.size, this;
1027
- m = this.__data__ = new me(A);
1019
+ var T = m.__data__;
1020
+ if (!Ot || T.length < t - 1)
1021
+ return T.push([l, u]), this.size = ++m.size, this;
1022
+ m = this.__data__ = new me(T);
1028
1023
  }
1029
1024
  return m.set(l, u), this.size = m.size, this;
1030
1025
  }
1031
1026
  pe.prototype.clear = Gi, pe.prototype.delete = Zi, pe.prototype.get = qi, pe.prototype.has = Ji, pe.prototype.set = Qi;
1032
1027
  function Ki(l, u) {
1033
- var m = dt(l), A = !m && ht(l), D = !m && !A && Wt(l), H = !m && !A && !D && Xt(l), B = m || A || D || H, E = B ? Pe(l.length, String) : [], I = E.length;
1028
+ var m = dt(l), T = !m && ht(l), D = !m && !T && Wt(l), H = !m && !T && !D && Xt(l), B = m || T || D || H, E = B ? Pe(l.length, String) : [], I = E.length;
1034
1029
  for (var J in l)
1035
1030
  B && // Safari 9 has enumerable `arguments.length` in strict mode.
1036
1031
  (J == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
@@ -1043,8 +1038,8 @@ function fn() {
1043
1038
  (m !== void 0 && !Ge(l[u], m) || m === void 0 && !(u in l)) && ot(l, u, m);
1044
1039
  }
1045
1040
  function es(l, u, m) {
1046
- var A = l[u];
1047
- (!(ne.call(l, u) && Ge(A, m)) || m === void 0 && !(u in l)) && ot(l, u, m);
1041
+ var T = l[u];
1042
+ (!(ne.call(l, u) && Ge(T, m)) || m === void 0 && !(u in l)) && ot(l, u, m);
1048
1043
  }
1049
1044
  function je(l, u) {
1050
1045
  for (var m = l.length; m--; )
@@ -1065,47 +1060,47 @@ function fn() {
1065
1060
  return l == null ? l === void 0 ? $ : x : he && he in Object(l) ? ms(l) : ws(l);
1066
1061
  }
1067
1062
  function Pt(l) {
1068
- return Ae(l) && Xe(l) == o;
1063
+ return Te(l) && Xe(l) == o;
1069
1064
  }
1070
1065
  function is(l) {
1071
1066
  if (!ue(l) || bs(l))
1072
1067
  return !1;
1073
1068
  var u = ft(l) ? Si : Be;
1074
- return u.test(Ts(l));
1069
+ return u.test(As(l));
1075
1070
  }
1076
1071
  function ss(l) {
1077
- return Ae(l) && jt(l.length) && !!F[Xe(l)];
1072
+ return Te(l) && jt(l.length) && !!F[Xe(l)];
1078
1073
  }
1079
1074
  function ns(l) {
1080
1075
  if (!ue(l))
1081
1076
  return ys(l);
1082
1077
  var u = Yt(l), m = [];
1083
- for (var A in l)
1084
- A == "constructor" && (u || !ne.call(l, A)) || m.push(A);
1078
+ for (var T in l)
1079
+ T == "constructor" && (u || !ne.call(l, T)) || m.push(T);
1085
1080
  return m;
1086
1081
  }
1087
- function zt(l, u, m, A, D) {
1082
+ function zt(l, u, m, T, D) {
1088
1083
  l !== u && ts(u, function(H, B) {
1089
1084
  if (D || (D = new pe()), ue(H))
1090
- as(l, u, B, m, zt, A, D);
1085
+ as(l, u, B, m, zt, T, D);
1091
1086
  else {
1092
- var E = A ? A(ct(l, B), H, B + "", l, u, D) : void 0;
1087
+ var E = T ? T(ct(l, B), H, B + "", l, u, D) : void 0;
1093
1088
  E === void 0 && (E = H), rt(l, B, E);
1094
1089
  }
1095
1090
  }, Ut);
1096
1091
  }
1097
- function as(l, u, m, A, D, H, B) {
1092
+ function as(l, u, m, T, D, H, B) {
1098
1093
  var E = ct(l, m), I = ct(u, m), J = B.get(I);
1099
1094
  if (J) {
1100
1095
  rt(l, m, J);
1101
1096
  return;
1102
1097
  }
1103
- var W = H ? H(E, I, m + "", l, u, B) : void 0, Te = W === void 0;
1104
- if (Te) {
1098
+ var W = H ? H(E, I, m + "", l, u, B) : void 0, Ae = W === void 0;
1099
+ if (Ae) {
1105
1100
  var gt = dt(I), mt = !gt && Wt(I), Zt = !gt && !mt && Xt(I);
1106
- W = I, gt || mt || Zt ? dt(E) ? W = E : Ms(E) ? W = ds(E) : mt ? (Te = !1, W = ls(I)) : Zt ? (Te = !1, W = hs(I)) : W = [] : Ss(I) || ht(I) ? (W = E, ht(E) ? W = Ds(E) : (!ue(E) || ft(E)) && (W = ps(I))) : Te = !1;
1101
+ W = I, gt || mt || Zt ? dt(E) ? W = E : Ms(E) ? W = ds(E) : mt ? (Ae = !1, W = ls(I)) : Zt ? (Ae = !1, W = hs(I)) : W = [] : Ss(I) || ht(I) ? (W = E, ht(E) ? W = Ds(E) : (!ue(E) || ft(E)) && (W = ps(I))) : Ae = !1;
1107
1102
  }
1108
- Te && (B.set(I, W), D(W, I, A, H, B), B.delete(I)), rt(l, m, W);
1103
+ Ae && (B.set(I, W), D(W, I, T, H, B), B.delete(I)), rt(l, m, W);
1109
1104
  }
1110
1105
  function rs(l, u) {
1111
1106
  return Cs(xs(l, u, Gt), l + "");
@@ -1130,12 +1125,12 @@ function fn() {
1130
1125
  return new l.constructor(m, l.byteOffset, l.length);
1131
1126
  }
1132
1127
  function ds(l, u) {
1133
- var m = -1, A = l.length;
1134
- for (u || (u = Array(A)); ++m < A; )
1128
+ var m = -1, T = l.length;
1129
+ for (u || (u = Array(T)); ++m < T; )
1135
1130
  u[m] = l[m];
1136
1131
  return u;
1137
1132
  }
1138
- function us(l, u, m, A) {
1133
+ function us(l, u, m, T) {
1139
1134
  var D = !m;
1140
1135
  m || (m = {});
1141
1136
  for (var H = -1, B = u.length; ++H < B; ) {
@@ -1146,17 +1141,17 @@ function fn() {
1146
1141
  }
1147
1142
  function fs(l) {
1148
1143
  return rs(function(u, m) {
1149
- var A = -1, D = m.length, H = D > 1 ? m[D - 1] : void 0, B = D > 2 ? m[2] : void 0;
1150
- for (H = l.length > 3 && typeof H == "function" ? (D--, H) : void 0, B && _s(m[0], m[1], B) && (H = D < 3 ? void 0 : H, D = 1), u = Object(u); ++A < D; ) {
1151
- var E = m[A];
1152
- E && l(u, E, A, H);
1144
+ var T = -1, D = m.length, H = D > 1 ? m[D - 1] : void 0, B = D > 2 ? m[2] : void 0;
1145
+ for (H = l.length > 3 && typeof H == "function" ? (D--, H) : void 0, B && _s(m[0], m[1], B) && (H = D < 3 ? void 0 : H, D = 1), u = Object(u); ++T < D; ) {
1146
+ var E = m[T];
1147
+ E && l(u, E, T, H);
1153
1148
  }
1154
1149
  return u;
1155
1150
  });
1156
1151
  }
1157
1152
  function gs(l) {
1158
- return function(u, m, A) {
1159
- for (var D = -1, H = Object(u), B = A(u), E = B.length; E--; ) {
1153
+ return function(u, m, T) {
1154
+ for (var D = -1, H = Object(u), B = T(u), E = B.length; E--; ) {
1160
1155
  var I = B[++D];
1161
1156
  if (m(H[I], I, H) === !1)
1162
1157
  break;
@@ -1176,11 +1171,11 @@ function fn() {
1176
1171
  var u = ne.call(l, he), m = l[he];
1177
1172
  try {
1178
1173
  l[he] = void 0;
1179
- var A = !0;
1174
+ var T = !0;
1180
1175
  } catch {
1181
1176
  }
1182
1177
  var D = Ft.call(l);
1183
- return A && (u ? l[he] = m : delete l[he]), D;
1178
+ return T && (u ? l[he] = m : delete l[he]), D;
1184
1179
  }
1185
1180
  function ps(l) {
1186
1181
  return typeof l.constructor == "function" && !Yt(l) ? Ni(It(l)) : {};
@@ -1192,8 +1187,8 @@ function fn() {
1192
1187
  function _s(l, u, m) {
1193
1188
  if (!ue(m))
1194
1189
  return !1;
1195
- var A = typeof u;
1196
- return (A == "number" ? ut(m) && Vt(u, m.length) : A == "string" && u in m) ? Ge(m[u], l) : !1;
1190
+ var T = typeof u;
1191
+ return (T == "number" ? ut(m) && Vt(u, m.length) : T == "string" && u in m) ? Ge(m[u], l) : !1;
1197
1192
  }
1198
1193
  function vs(l) {
1199
1194
  var u = typeof l;
@@ -1218,11 +1213,11 @@ function fn() {
1218
1213
  }
1219
1214
  function xs(l, u, m) {
1220
1215
  return u = $t(u === void 0 ? l.length - 1 : u, 0), function() {
1221
- for (var A = arguments, D = -1, H = $t(A.length - u, 0), B = Array(H); ++D < H; )
1222
- B[D] = A[u + D];
1216
+ for (var T = arguments, D = -1, H = $t(T.length - u, 0), B = Array(H); ++D < H; )
1217
+ B[D] = T[u + D];
1223
1218
  D = -1;
1224
1219
  for (var E = Array(u + 1); ++D < u; )
1225
- E[D] = A[D];
1220
+ E[D] = T[D];
1226
1221
  return E[u] = m(B), Oe(l, this, E);
1227
1222
  };
1228
1223
  }
@@ -1230,12 +1225,12 @@ function fn() {
1230
1225
  if (!(u === "constructor" && typeof l[u] == "function") && u != "__proto__")
1231
1226
  return l[u];
1232
1227
  }
1233
- var Cs = As(os);
1234
- function As(l) {
1228
+ var Cs = Ts(os);
1229
+ function Ts(l) {
1235
1230
  var u = 0, m = 0;
1236
1231
  return function() {
1237
- var A = Ei(), D = a - (A - m);
1238
- if (m = A, D > 0) {
1232
+ var T = Ei(), D = a - (T - m);
1233
+ if (m = T, D > 0) {
1239
1234
  if (++u >= n)
1240
1235
  return arguments[0];
1241
1236
  } else
@@ -1243,7 +1238,7 @@ function fn() {
1243
1238
  return l.apply(void 0, arguments);
1244
1239
  };
1245
1240
  }
1246
- function Ts(l) {
1241
+ function As(l) {
1247
1242
  if (l != null) {
1248
1243
  try {
1249
1244
  return Ve.call(l);
@@ -1262,13 +1257,13 @@ function fn() {
1262
1257
  var ht = Pt(/* @__PURE__ */ function() {
1263
1258
  return arguments;
1264
1259
  }()) ? Pt : function(l) {
1265
- return Ae(l) && ne.call(l, "callee") && !Di.call(l, "callee");
1260
+ return Te(l) && ne.call(l, "callee") && !Di.call(l, "callee");
1266
1261
  }, dt = Array.isArray;
1267
1262
  function ut(l) {
1268
1263
  return l != null && jt(l.length) && !ft(l);
1269
1264
  }
1270
1265
  function Ms(l) {
1271
- return Ae(l) && ut(l);
1266
+ return Te(l) && ut(l);
1272
1267
  }
1273
1268
  var Wt = Li || Es;
1274
1269
  function ft(l) {
@@ -1284,11 +1279,11 @@ function fn() {
1284
1279
  var u = typeof l;
1285
1280
  return l != null && (u == "object" || u == "function");
1286
1281
  }
1287
- function Ae(l) {
1282
+ function Te(l) {
1288
1283
  return l != null && typeof l == "object";
1289
1284
  }
1290
1285
  function Ss(l) {
1291
- if (!Ae(l) || Xe(l) != y)
1286
+ if (!Te(l) || Xe(l) != y)
1292
1287
  return !1;
1293
1288
  var u = It(l);
1294
1289
  if (u === null)
@@ -1673,7 +1668,7 @@ const ri = { x: 0.2, y: 0.2 }, oi = 1e-3, xn = {
1673
1668
  const e = i.match(/^(\d+)([a-zA-Z]+)$/);
1674
1669
  if (!e) throw new Error(`Invalid offset format: "${i}"`);
1675
1670
  return [parseInt(e[1]), e[2]];
1676
- }, An = (i, e) => {
1671
+ }, Tn = (i, e) => {
1677
1672
  const [t, s] = e.domain().map((o) => o.getTime()), n = i.filter((o) => {
1678
1673
  const c = o.open_time.getTime();
1679
1674
  return c >= t && c <= s;
@@ -1681,7 +1676,7 @@ const ri = { x: 0.2, y: 0.2 }, oi = 1e-3, xn = {
1681
1676
  if (a == null || r == null) throw new Error("Invalid Y data");
1682
1677
  return [a, r];
1683
1678
  };
1684
- class Tn {
1679
+ class An {
1685
1680
  constructor(e) {
1686
1681
  this.model = e;
1687
1682
  }
@@ -1691,7 +1686,7 @@ class Tn {
1691
1686
  e.setDomain(s), this.setRange(e, this.model.layout.xAxis), this.setDefaultXDomain(e), this.applyOffset(e);
1692
1687
  }
1693
1688
  initY(e, t) {
1694
- const s = An(this.model.candles.preparedData, t);
1689
+ const s = Tn(this.model.candles.preparedData, t);
1695
1690
  e.setDomain(s), this.setRange(e, this.model.layout.yAxis);
1696
1691
  }
1697
1692
  init(e) {
@@ -1732,7 +1727,7 @@ class Mn {
1732
1727
  });
1733
1728
  f(this, "scaleFactor", { x: 1, y: 1 });
1734
1729
  f(this, "panOffset", { x: 0, y: 0 });
1735
- this._model = e, this._scaleX = new bi(), this._scaleY = new wn(), this._initializer = new Tn(e), this._initializer.init({ x: this._scaleX, y: this._scaleY }), this._baseDomain = {
1730
+ this._model = e, this._scaleX = new bi(), this._scaleY = new wn(), this._initializer = new An(e), this._initializer.init({ x: this._scaleX, y: this._scaleY }), this._baseDomain = {
1736
1731
  x: this._scaleX.domain(),
1737
1732
  y: this._scaleY.domain()
1738
1733
  };
@@ -2282,15 +2277,15 @@ function et(i) {
2282
2277
  }, et(i);
2283
2278
  }
2284
2279
  var Pn = /^\s+/, zn = /\s+$/;
2285
- function T(i, e) {
2286
- if (i = i || "", e = e || {}, i instanceof T)
2280
+ function A(i, e) {
2281
+ if (i = i || "", e = e || {}, i instanceof A)
2287
2282
  return i;
2288
- if (!(this instanceof T))
2289
- return new T(i, e);
2283
+ if (!(this instanceof A))
2284
+ return new A(i, e);
2290
2285
  var t = Vn(i);
2291
2286
  this._originalInput = i, this._r = t.r, this._g = t.g, this._b = t.b, this._a = t.a, this._roundA = Math.round(100 * this._a) / 100, this._format = e.format || t.format, this._gradientType = e.gradientType, this._r < 1 && (this._r = Math.round(this._r)), this._g < 1 && (this._g = Math.round(this._g)), this._b < 1 && (this._b = Math.round(this._b)), this._ok = t.ok;
2292
2287
  }
2293
- T.prototype = {
2288
+ A.prototype = {
2294
2289
  isDark: function() {
2295
2290
  return this.getBrightness() < 128;
2296
2291
  },
@@ -2386,7 +2381,7 @@ T.prototype = {
2386
2381
  toFilter: function(e) {
2387
2382
  var t = "#" + di(this._r, this._g, this._b, this._a), s = t, n = this._gradientType ? "GradientType = 1, " : "";
2388
2383
  if (e) {
2389
- var a = T(e);
2384
+ var a = A(e);
2390
2385
  s = "#" + di(a._r, a._g, a._b, a._a);
2391
2386
  }
2392
2387
  return "progid:DXImageTransform.Microsoft.gradient(" + n + "startColorstr=" + t + ",endColorstr=" + s + ")";
@@ -2398,7 +2393,7 @@ T.prototype = {
2398
2393
  return a ? e === "name" && this._a === 0 ? this.toName() : this.toRgbString() : (e === "rgb" && (s = this.toRgbString()), e === "prgb" && (s = this.toPercentageRgbString()), (e === "hex" || e === "hex6") && (s = this.toHexString()), e === "hex3" && (s = this.toHexString(!0)), e === "hex4" && (s = this.toHex8String(!0)), e === "hex8" && (s = this.toHex8String()), e === "name" && (s = this.toName()), e === "hsl" && (s = this.toHslString()), e === "hsv" && (s = this.toHsvString()), s || this.toHexString());
2399
2394
  },
2400
2395
  clone: function() {
2401
- return T(this.toString());
2396
+ return A(this.toString());
2402
2397
  },
2403
2398
  _applyModification: function(e, t) {
2404
2399
  var s = e.apply(null, [this].concat([].slice.call(t)));
@@ -2451,14 +2446,14 @@ T.prototype = {
2451
2446
  return this._applyCombination(ui, [4]);
2452
2447
  }
2453
2448
  };
2454
- T.fromRatio = function(i, e) {
2449
+ A.fromRatio = function(i, e) {
2455
2450
  if (et(i) == "object") {
2456
2451
  var t = {};
2457
2452
  for (var s in i)
2458
2453
  i.hasOwnProperty(s) && (s === "a" ? t[s] = i[s] : t[s] = De(i[s]));
2459
2454
  i = t;
2460
2455
  }
2461
- return T(i, e);
2456
+ return A(i, e);
2462
2457
  };
2463
2458
  function Vn(i) {
2464
2459
  var e = {
@@ -2572,11 +2567,11 @@ function di(i, e, t, s) {
2572
2567
  var n = [K(wi(s)), K(Math.round(i).toString(16)), K(Math.round(e).toString(16)), K(Math.round(t).toString(16))];
2573
2568
  return n.join("");
2574
2569
  }
2575
- T.equals = function(i, e) {
2576
- return !i || !e ? !1 : T(i).toRgbString() == T(e).toRgbString();
2570
+ A.equals = function(i, e) {
2571
+ return !i || !e ? !1 : A(i).toRgbString() == A(e).toRgbString();
2577
2572
  };
2578
- T.random = function() {
2579
- return T.fromRatio({
2573
+ A.random = function() {
2574
+ return A.fromRatio({
2580
2575
  r: Math.random(),
2581
2576
  g: Math.random(),
2582
2577
  b: Math.random()
@@ -2584,45 +2579,45 @@ T.random = function() {
2584
2579
  };
2585
2580
  function Un(i, e) {
2586
2581
  e = e === 0 ? 0 : e || 10;
2587
- var t = T(i).toHsl();
2588
- return t.s -= e / 100, t.s = it(t.s), T(t);
2582
+ var t = A(i).toHsl();
2583
+ return t.s -= e / 100, t.s = it(t.s), A(t);
2589
2584
  }
2590
2585
  function Gn(i, e) {
2591
2586
  e = e === 0 ? 0 : e || 10;
2592
- var t = T(i).toHsl();
2593
- return t.s += e / 100, t.s = it(t.s), T(t);
2587
+ var t = A(i).toHsl();
2588
+ return t.s += e / 100, t.s = it(t.s), A(t);
2594
2589
  }
2595
2590
  function Zn(i) {
2596
- return T(i).desaturate(100);
2591
+ return A(i).desaturate(100);
2597
2592
  }
2598
2593
  function qn(i, e) {
2599
2594
  e = e === 0 ? 0 : e || 10;
2600
- var t = T(i).toHsl();
2601
- return t.l += e / 100, t.l = it(t.l), T(t);
2595
+ var t = A(i).toHsl();
2596
+ return t.l += e / 100, t.l = it(t.l), A(t);
2602
2597
  }
2603
2598
  function Jn(i, e) {
2604
2599
  e = e === 0 ? 0 : e || 10;
2605
- var t = T(i).toRgb();
2606
- return t.r = Math.max(0, Math.min(255, t.r - Math.round(255 * -(e / 100)))), t.g = Math.max(0, Math.min(255, t.g - Math.round(255 * -(e / 100)))), t.b = Math.max(0, Math.min(255, t.b - Math.round(255 * -(e / 100)))), T(t);
2600
+ var t = A(i).toRgb();
2601
+ return t.r = Math.max(0, Math.min(255, t.r - Math.round(255 * -(e / 100)))), t.g = Math.max(0, Math.min(255, t.g - Math.round(255 * -(e / 100)))), t.b = Math.max(0, Math.min(255, t.b - Math.round(255 * -(e / 100)))), A(t);
2607
2602
  }
2608
2603
  function Qn(i, e) {
2609
2604
  e = e === 0 ? 0 : e || 10;
2610
- var t = T(i).toHsl();
2611
- return t.l -= e / 100, t.l = it(t.l), T(t);
2605
+ var t = A(i).toHsl();
2606
+ return t.l -= e / 100, t.l = it(t.l), A(t);
2612
2607
  }
2613
2608
  function Kn(i, e) {
2614
- var t = T(i).toHsl(), s = (t.h + e) % 360;
2615
- return t.h = s < 0 ? 360 + s : s, T(t);
2609
+ var t = A(i).toHsl(), s = (t.h + e) % 360;
2610
+ return t.h = s < 0 ? 360 + s : s, A(t);
2616
2611
  }
2617
2612
  function ea(i) {
2618
- var e = T(i).toHsl();
2619
- return e.h = (e.h + 180) % 360, T(e);
2613
+ var e = A(i).toHsl();
2614
+ return e.h = (e.h + 180) % 360, A(e);
2620
2615
  }
2621
2616
  function ui(i, e) {
2622
2617
  if (isNaN(e) || e <= 0)
2623
2618
  throw new Error("Argument to polyad must be a positive number");
2624
- for (var t = T(i).toHsl(), s = [T(i)], n = 360 / e, a = 1; a < e; a++)
2625
- s.push(T({
2619
+ for (var t = A(i).toHsl(), s = [A(i)], n = 360 / e, a = 1; a < e; a++)
2620
+ s.push(A({
2626
2621
  h: (t.h + a * n) % 360,
2627
2622
  s: t.s,
2628
2623
  l: t.l
@@ -2630,12 +2625,12 @@ function ui(i, e) {
2630
2625
  return s;
2631
2626
  }
2632
2627
  function ta(i) {
2633
- var e = T(i).toHsl(), t = e.h;
2634
- return [T(i), T({
2628
+ var e = A(i).toHsl(), t = e.h;
2629
+ return [A(i), A({
2635
2630
  h: (t + 72) % 360,
2636
2631
  s: e.s,
2637
2632
  l: e.l
2638
- }), T({
2633
+ }), A({
2639
2634
  h: (t + 216) % 360,
2640
2635
  s: e.s,
2641
2636
  l: e.l
@@ -2643,37 +2638,37 @@ function ta(i) {
2643
2638
  }
2644
2639
  function ia(i, e, t) {
2645
2640
  e = e || 6, t = t || 30;
2646
- var s = T(i).toHsl(), n = 360 / t, a = [T(i)];
2641
+ var s = A(i).toHsl(), n = 360 / t, a = [A(i)];
2647
2642
  for (s.h = (s.h - (n * e >> 1) + 720) % 360; --e; )
2648
- s.h = (s.h + n) % 360, a.push(T(s));
2643
+ s.h = (s.h + n) % 360, a.push(A(s));
2649
2644
  return a;
2650
2645
  }
2651
2646
  function sa(i, e) {
2652
2647
  e = e || 6;
2653
- for (var t = T(i).toHsv(), s = t.h, n = t.s, a = t.v, r = [], o = 1 / e; e--; )
2654
- r.push(T({
2648
+ for (var t = A(i).toHsv(), s = t.h, n = t.s, a = t.v, r = [], o = 1 / e; e--; )
2649
+ r.push(A({
2655
2650
  h: s,
2656
2651
  s: n,
2657
2652
  v: a
2658
2653
  })), a = (a + o) % 1;
2659
2654
  return r;
2660
2655
  }
2661
- T.mix = function(i, e, t) {
2656
+ A.mix = function(i, e, t) {
2662
2657
  t = t === 0 ? 0 : t || 50;
2663
- var s = T(i).toRgb(), n = T(e).toRgb(), a = t / 100, r = {
2658
+ var s = A(i).toRgb(), n = A(e).toRgb(), a = t / 100, r = {
2664
2659
  r: (n.r - s.r) * a + s.r,
2665
2660
  g: (n.g - s.g) * a + s.g,
2666
2661
  b: (n.b - s.b) * a + s.b,
2667
2662
  a: (n.a - s.a) * a + s.a
2668
2663
  };
2669
- return T(r);
2664
+ return A(r);
2670
2665
  };
2671
- T.readability = function(i, e) {
2672
- var t = T(i), s = T(e);
2666
+ A.readability = function(i, e) {
2667
+ var t = A(i), s = A(e);
2673
2668
  return (Math.max(t.getLuminance(), s.getLuminance()) + 0.05) / (Math.min(t.getLuminance(), s.getLuminance()) + 0.05);
2674
2669
  };
2675
- T.isReadable = function(i, e, t) {
2676
- var s = T.readability(i, e), n, a;
2670
+ A.isReadable = function(i, e, t) {
2671
+ var s = A.readability(i, e), n, a;
2677
2672
  switch (a = !1, n = ca(t), n.level + n.size) {
2678
2673
  case "AAsmall":
2679
2674
  case "AAAlarge":
@@ -2688,17 +2683,17 @@ T.isReadable = function(i, e, t) {
2688
2683
  }
2689
2684
  return a;
2690
2685
  };
2691
- T.mostReadable = function(i, e, t) {
2686
+ A.mostReadable = function(i, e, t) {
2692
2687
  var s = null, n = 0, a, r, o, c;
2693
2688
  t = t || {}, r = t.includeFallbackColors, o = t.level, c = t.size;
2694
2689
  for (var h = 0; h < e.length; h++)
2695
- a = T.readability(i, e[h]), a > n && (n = a, s = T(e[h]));
2696
- return T.isReadable(i, s, {
2690
+ a = A.readability(i, e[h]), a > n && (n = a, s = A(e[h]));
2691
+ return A.isReadable(i, s, {
2697
2692
  level: o,
2698
2693
  size: c
2699
- }) || !r ? s : (t.includeFallbackColors = !1, T.mostReadable(i, ["#fff", "#000"], t));
2694
+ }) || !r ? s : (t.includeFallbackColors = !1, A.mostReadable(i, ["#fff", "#000"], t));
2700
2695
  };
2701
- var At = T.names = {
2696
+ var Tt = A.names = {
2702
2697
  aliceblue: "f0f8ff",
2703
2698
  antiquewhite: "faebd7",
2704
2699
  aqua: "0ff",
@@ -2848,7 +2843,7 @@ var At = T.names = {
2848
2843
  whitesmoke: "f5f5f5",
2849
2844
  yellow: "ff0",
2850
2845
  yellowgreen: "9acd32"
2851
- }, na = T.hexNames = aa(At);
2846
+ }, na = A.hexNames = aa(Tt);
2852
2847
  function aa(i) {
2853
2848
  var e = {};
2854
2849
  for (var t in i)
@@ -2909,8 +2904,8 @@ function ie(i) {
2909
2904
  function la(i) {
2910
2905
  i = i.replace(Pn, "").replace(zn, "").toLowerCase();
2911
2906
  var e = !1;
2912
- if (At[i])
2913
- i = At[i], e = !0;
2907
+ if (Tt[i])
2908
+ i = Tt[i], e = !0;
2914
2909
  else if (i == "transparent")
2915
2910
  return {
2916
2911
  r: 0,
@@ -2997,7 +2992,7 @@ function ha(i, e) {
2997
2992
  _.forEach((v) => {
2998
2993
  const b = v.type === "buy", w = b ? o.buyLabel.text : o.sellLabel.text, x = b ? "B" : "S", y = b ? n.convert(g.low) + c : n.convert(g.high) - c, C = b ? $n : On;
2999
2994
  let M = b ? o.buyLabel.main : o.sellLabel.main;
3000
- h && h[1] && h[0] === v.type && (M = T.mix(M, a.bg, 20).toString()), d && d[1] && d[0] === v.type && (M = o.activeLabel), C(i, {
2995
+ h && h[1] && h[0] === v.type && (M = A.mix(M, a.bg, 20).toString()), d && d[1] && d[0] === v.type && (M = o.activeLabel), C(i, {
3001
2996
  x: p,
3002
2997
  y,
3003
2998
  symbol: x,
@@ -3321,7 +3316,7 @@ class xa extends Ne {
3321
3316
  function Ca(i, { color: e = "#000000", lineWidth: t = 1, dashed: s, coords: n }) {
3322
3317
  i.strokeStyle = e, i.lineWidth = t, s && i.setLineDash(s), i.beginPath(), i.moveTo(n.x1, n.y1), i.lineTo(n.x2, n.y2), i.stroke();
3323
3318
  }
3324
- const Aa = { text: "#FFFFFF", bg: "#000000" }, Ta = (i, e) => {
3319
+ const Ta = { text: "#FFFFFF", bg: "#000000" }, Aa = (i, e) => {
3325
3320
  const {
3326
3321
  coords: t,
3327
3322
  text: s,
@@ -3332,7 +3327,7 @@ const Aa = { text: "#FFFFFF", bg: "#000000" }, Ta = (i, e) => {
3332
3327
  borderRadius: c = 0,
3333
3328
  colors: h,
3334
3329
  align: d = { x: "left", y: "top" }
3335
- } = e, g = { ...Aa, ...h }, p = getComputedStyle(
3330
+ } = e, g = { ...Ta, ...h }, p = getComputedStyle(
3336
3331
  document.querySelector(".sc-charts-cs") || document.body
3337
3332
  ).font.replace(/^\s*\S+/, "").trim();
3338
3333
  i.font = `${a} ${n}px ${p}`;
@@ -3363,7 +3358,7 @@ const Aa = { text: "#FFFFFF", bg: "#000000" }, Ta = (i, e) => {
3363
3358
  x2: r.x,
3364
3359
  y2: r.y
3365
3360
  }
3366
- }), Ta(i, {
3361
+ }), Aa(i, {
3367
3362
  text: e,
3368
3363
  coords: r,
3369
3364
  padding: { x: 6, y: 4 },
@@ -3637,7 +3632,7 @@ class Ra {
3637
3632
  }
3638
3633
  }
3639
3634
  const Je = new ae(""), wt = new ae("add-field");
3640
- class Ai extends se {
3635
+ class Ti extends se {
3641
3636
  constructor({ onAdd: t, blockName: s }) {
3642
3637
  Je.block = s;
3643
3638
  super({ className: Je.gen() + " " + wt.gen() });
@@ -3678,7 +3673,7 @@ class Oa extends se {
3678
3673
  f(this, "_size", null);
3679
3674
  f(this, "_model");
3680
3675
  f(this, "_prevIsShow", !1);
3681
- this._model = s, this.state = { isShow: !1, comments: t }, this._list = new Ia(t, s, n), this._addField = new Ai({
3676
+ this._model = s, this.state = { isShow: !1, comments: t }, this._list = new Ia(t, s, n), this._addField = new Ti({
3682
3677
  blockName: "list-tooltip-add",
3683
3678
  onAdd: (a) => {
3684
3679
  const r = t[0].date, o = t[0].price, c = {
@@ -3782,7 +3777,7 @@ class Wa extends se {
3782
3777
  f(this, "_candle", null);
3783
3778
  this.state = { candle: null, isShow: !1, model: null }, this.pointer = new k({ className: Ct.gen("pointer") }), this.menu = new k({ className: Ct.gen("menu") }), Lt(this.menu, () => {
3784
3779
  this.setState({ isShow: !1 });
3785
- }), this.addField = new Ai({
3780
+ }), this.addField = new Ti({
3786
3781
  blockName: "context-add",
3787
3782
  onAdd: (t) => {
3788
3783
  !this._model || !this._candle || (this._model.comments.add({
@@ -3959,7 +3954,7 @@ class Za extends Ee {
3959
3954
  });
3960
3955
  }
3961
3956
  _mix(t, s, n) {
3962
- return n ? T.mix(t, s).toString() : t;
3957
+ return n ? A.mix(t, s).toString() : t;
3963
3958
  }
3964
3959
  _getBasicCandleProps(t, s) {
3965
3960
  return {
@@ -4451,7 +4446,7 @@ function cr(i, e) {
4451
4446
  }));
4452
4447
  };
4453
4448
  }
4454
- function Tt(i, e) {
4449
+ function At(i, e) {
4455
4450
  const { width: t } = e.candles.limiter.absolutePosition, s = i.config.candles.baseWidth, n = i.config.candles.limiterOffset.left + i.config.candles.limiterOffset.right, r = i.scales.x.convert(i.candles.allData[0].open_time) - t - s / 2 - n;
4456
4451
  r > 0 && i.scales.pan("x", -r);
4457
4452
  }
@@ -4475,7 +4470,7 @@ class hr extends Et {
4475
4470
  register() {
4476
4471
  this._hitManager.on(this._hit, "drag", (t) => {
4477
4472
  const s = t.x - (t.prevX ?? t.x);
4478
- this._model.scales.scale("x", -s), this._view && Mt(this._view) && Tt(this._model, this._view);
4473
+ this._model.scales.scale("x", -s), this._view && Mt(this._view) && At(this._model, this._view);
4479
4474
  }), this._hitManager.on(this._hit, "dblclick", () => {
4480
4475
  this._model.scales.scale("x", 1, "absolute"), this._model.scales.pan("x", 0, "absolute");
4481
4476
  });
@@ -4513,7 +4508,7 @@ class ur extends Et {
4513
4508
  this._hit,
4514
4509
  "drag",
4515
4510
  cr(1, (t) => {
4516
- this._model.scales.pan("x", t.x - (t.prevX ?? t.x)), Mt(this._view) && Tt(this._model, this._view), this._model.scales.pan("y", t.y - (t.prevY ?? t.y)), this._view.guideMarkers.render(this._model, { x: t.x, y: t.y });
4511
+ this._model.scales.pan("x", t.x - (t.prevX ?? t.x)), Mt(this._view) && At(this._model, this._view), this._model.scales.pan("y", t.y - (t.prevY ?? t.y)), this._view.guideMarkers.render(this._model, { x: t.x, y: t.y });
4517
4512
  })
4518
4513
  ), this._hitManager.on(this._hit, "contextmenu", ({ x: t }) => {
4519
4514
  const s = this._model.scales.x.invert(t), n = Dt.findByDate(s, this._model.candles.allData);
@@ -4522,7 +4517,7 @@ class ur extends Et {
4522
4517
  var a, r;
4523
4518
  if (!t.deltaY) return;
4524
4519
  const s = -t.deltaY, n = (r = (a = this._model.config) == null ? void 0 : a.candles) == null ? void 0 : r.zoomOnWheel;
4525
- ["x", "both"].includes(n) && (this._model.scales.scale("x", s), Mt(this._view) && Tt(this._model, this._view)), ["y", "both"].includes(n) && this._model.scales.scale("y", s);
4520
+ ["x", "both"].includes(n) && (this._model.scales.scale("x", s), Mt(this._view) && At(this._model, this._view)), ["y", "both"].includes(n) && this._model.scales.scale("y", s);
4526
4521
  });
4527
4522
  }
4528
4523
  }