charts-core 1.1.29 → 1.1.31

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.
@@ -20,8 +20,8 @@ const Hs = (i) => {
20
20
  const v = p.nodes().map((w) => w.getBBox().width), b = Math.max(...v);
21
21
  _.selectAll(".tick").each(function(w, x) {
22
22
  var $;
23
- const y = L.select(this), C = y.select("text"), M = v[x], S = b - M, N = y.append("g").attr("transform", "translate(10, 0)");
24
- C.attr("x", S), C.remove(), ($ = N.node()) == null || $.appendChild(C.node());
23
+ const y = L.select(this), C = y.select("text"), S = v[x], T = b - S, N = y.append("g").attr("transform", "translate(10, 0)");
24
+ C.attr("x", T), C.remove(), ($ = N.node()) == null || $.appendChild(C.node());
25
25
  });
26
26
  }).attr("font-family", "inherit");
27
27
  }, Bs = (i) => {
@@ -100,35 +100,35 @@ const qt = (i, { x1: e, x2: t, y1: s, y2: n }) => i.append("line").attr("x1", e)
100
100
  }), h === "hovered-circles")) {
101
101
  const p = n.range()[0], v = s(r[0].date), b = s(r[r.length - 1].date);
102
102
  qt(e, { x1: v, x2: b, y1: p, y2: p });
103
- const { tooltipContainer: w, tooltip: x, tooltipArrow: y } = Rs(o), C = (S) => {
103
+ const { tooltipContainer: w, tooltip: x, tooltipArrow: y } = Rs(o), C = (T) => {
104
104
  if (!d) return;
105
- _i(x), w.style.display = "block", x.append(d({ date: S.date, value: S.value }));
105
+ _i(x), w.style.display = "block", x.append(d({ date: T.date, value: T.value }));
106
106
  const N = x.getBoundingClientRect(), $ = Os(
107
107
  N,
108
- s(S.date),
108
+ s(T.date),
109
109
  i.config.margin.left - i.config.grid.tooltipArrowSize,
110
110
  i.width - i.config.margin.right + i.config.grid.tooltipArrowSize
111
111
  );
112
- $ !== null && (x.style.left = $ + "px"), y.style.left = s(S.date) + "px";
113
- }, M = () => {
112
+ $ !== null && (x.style.left = $ + "px"), y.style.left = s(T.date) + "px";
113
+ }, S = () => {
114
114
  w.style.display = "none";
115
115
  };
116
116
  i.gridHoverTooltip = d ? {
117
- show: (S) => C(S),
118
- hide: M
119
- } : null, r.forEach((S, N) => {
120
- const $ = s(S.date), z = n(S.value), V = r[N - 1], Y = N > 0 && V && S.value === V.value;
121
- Y || qt(e, { x1: $, x2: $, y1: z, y2: p });
122
- const re = $s(e, Y, {
117
+ show: (T) => C(T),
118
+ hide: S
119
+ } : null, r.forEach((T, N) => {
120
+ const $ = s(T.date), X = n(T.value), U = r[N - 1], te = N > 0 && U && T.value === U.value;
121
+ te || qt(e, { x1: $, x2: $, y1: X, y2: p });
122
+ const K = $s(e, te, {
123
123
  x: $,
124
124
  y: p,
125
125
  r: g,
126
126
  hr: _
127
127
  });
128
- d && re.on("mouseover", function() {
129
- C({ date: S.date, value: Y ? null : S.value });
128
+ d && K.on("mouseover", function() {
129
+ C({ date: T.date, value: te ? null : T.value });
130
130
  }).on("mouseout", function() {
131
- M();
131
+ S();
132
132
  });
133
133
  });
134
134
  }
@@ -137,15 +137,15 @@ const qt = (i, { x1: e, x2: t, y1: s, y2: n }) => i.append("line").attr("x1", e)
137
137
  }, Vs = (i) => {
138
138
  const { svg: e, config: t, width: s, height: n } = i, { margin: a, logo: r } = t;
139
139
  Bs(i), Hs(i), r && e.append("image").attr("xlink:href", t.theme === "dark" ? r.picDarkTheme : r.picLightTheme).attr("width", r.width).attr("height", r.height).attr("x", r.x ?? (s - a.left - a.right) / 2 - r.width / 2 + a.left).attr("y", r.y ?? (n - a.top - a.bottom) / 2 - r.height / 2 + a.top), zs(i);
140
- }, Le = (i, e, t) => {
140
+ }, Ee = (i, e, t) => {
141
141
  let s = i.select(`#${e}`);
142
142
  return s.empty() && (s = i.append("linearGradient").attr("gradientUnits", "userSpaceOnUse").attr("id", e)), s.attr("x1", t.x1).attr("y1", t.x2).attr("x2", t.y1).attr("y2", t.y2), t.stops.forEach(({ offset: n, stopColor: a }) => {
143
143
  s.append("stop").attr("offset", n).attr("stop-color", a);
144
144
  }), s;
145
- }, _e = (i) => {
145
+ }, ve = (i) => {
146
146
  const e = L.select(i).select("defs");
147
147
  return e.empty() ? L.select(i).append("defs") : e;
148
- }, St = (i) => {
148
+ }, Tt = (i) => {
149
149
  const {
150
150
  y: e,
151
151
  config: { margin: t }
@@ -187,7 +187,7 @@ const qt = (i, { x1: e, x2: t, y1: s, y2: n }) => i.append("line").attr("x1", e)
187
187
  ...e == null ? void 0 : e.selection
188
188
  }
189
189
  }), Qt = (i, e = {}) => {
190
- const t = i.node(), s = _e(t), n = (o, c) => Le(s, o, {
190
+ const t = i.node(), s = ve(t), n = (o, c) => Ee(s, o, {
191
191
  x1: "0%",
192
192
  y1: "0%",
193
193
  x2: "0%",
@@ -226,8 +226,8 @@ const qt = (i, { x1: e, x2: t, y1: s, y2: n }) => i.append("line").attr("x1", e)
226
226
  }
227
227
  };
228
228
  }, Ys = (i, e = {}) => {
229
- const t = "sc-charts__hover-line", s = i.append("line").style("display", e.hidden ? "none" : "block").classed(t, !0), n = i.node(), a = _e(n);
230
- return ((o, c) => Le(a, o, {
229
+ const t = "sc-charts__hover-line", s = i.append("line").style("display", e.hidden ? "none" : "block").classed(t, !0), n = i.node(), a = ve(n);
230
+ return ((o, c) => Ee(a, o, {
231
231
  x1: "0%",
232
232
  y1: "0%",
233
233
  x2: "0%",
@@ -249,19 +249,19 @@ const qt = (i, { x1: e, x2: t, y1: s, y2: n }) => i.append("line").attr("x1", e)
249
249
  s.remove();
250
250
  }
251
251
  };
252
- }, fe = "sc-charts__range-tooltip", Kt = L.timeFormat("%b %e, %I:%M %p"), Ws = (i) => {
252
+ }, ge = "sc-charts__range-tooltip", Kt = L.timeFormat("%b %e, %I:%M %p"), Ws = (i) => {
253
253
  const e = L.format(",.2f");
254
254
  return `${i < 0 ? "-" : ""}$${e(Math.abs(i))}`;
255
255
  };
256
256
  function js(i) {
257
257
  const e = "http://www.w3.org/2000/svg", t = document.createElement("div");
258
- t.className = fe, t.style.position = "absolute", t.style.top = "0", t.style.pointerEvents = "none", t.style.display = "none", i.append(t);
258
+ t.className = ge, t.style.position = "absolute", t.style.top = "0", t.style.pointerEvents = "none", t.style.display = "none", i.append(t);
259
259
  const s = document.createElement("div");
260
- s.className = `${fe}-container`, t.append(s);
260
+ s.className = `${ge}-container`, t.append(s);
261
261
  const n = document.createElement("div");
262
- n.className = `${fe}-sum`, s.append(n);
262
+ n.className = `${ge}-sum`, s.append(n);
263
263
  const a = document.createElement("div");
264
- a.className = `${fe}-sum-icon`;
264
+ a.className = `${ge}-sum-icon`;
265
265
  const r = document.createElementNS(e, "svg");
266
266
  r.setAttribute("width", "14"), r.setAttribute("height", "14"), r.setAttribute("viewBox", "0 0 14 14"), r.setAttribute("fill", "none"), r.setAttribute("xmlns", e);
267
267
  const o = document.createElementNS(e, "path");
@@ -272,13 +272,13 @@ function js(i) {
272
272
  const c = document.createElement("div");
273
273
  n.append(c);
274
274
  const h = document.createElement("div");
275
- return h.className = `${fe}-time`, s.append(h), { wrapper: t, sumNode: c, timeNode: h };
275
+ return h.className = `${ge}-time`, s.append(h), { wrapper: t, sumNode: c, timeNode: h };
276
276
  }
277
277
  const Xs = (i) => {
278
278
  const { wrapper: e, sumNode: t, timeNode: s } = js(i.wrapperNode);
279
279
  return {
280
280
  className(n, a) {
281
- n === "remove" ? e.classList.remove(`${fe}${a}`) : e.classList.add(`${fe}${a}`);
281
+ n === "remove" ? e.classList.remove(`${ge}${a}`) : e.classList.add(`${ge}${a}`);
282
282
  },
283
283
  update({ leftPoint: n, rightPoint: a, x: r, y: o, hidden: c, closest: h }) {
284
284
  if (n && a && h && r !== void 0) {
@@ -291,10 +291,10 @@ const Xs = (i) => {
291
291
  b = `${Ws(d)} (${x}%)`;
292
292
  }
293
293
  _ ? w = _({ left: n.date, right: a.date, direction: v }) : w = `${Kt(n.date)} to ${Kt(a.date)}`, t.textContent = b, s.textContent = w, requestAnimationFrame(() => {
294
- const x = e.getBoundingClientRect(), y = i.wrapperNode.getBoundingClientRect(), C = i.x(n.date), M = i.x(a.date);
295
- let N = (C + M) / 2 - x.width / 2;
296
- const $ = 0, z = y.width - x.width;
297
- N < $ && (N = $), N > z && (N = z), e.style.left = `${N}px`, e.style.top = `${o}px`;
294
+ const x = e.getBoundingClientRect(), y = i.wrapperNode.getBoundingClientRect(), C = i.x(n.date), S = i.x(a.date);
295
+ let N = (C + S) / 2 - x.width / 2;
296
+ const $ = 0, X = y.width - x.width;
297
+ N < $ && (N = $), N > X && (N = X), e.style.left = `${N}px`, e.style.top = `${o}px`;
298
298
  });
299
299
  }
300
300
  c !== void 0 && (e.style.display = c ? "none" : "block");
@@ -303,17 +303,17 @@ const Xs = (i) => {
303
303
  e.remove();
304
304
  }
305
305
  };
306
- }, ke = "sc-charts__hover-tooltip", _t = 16, Us = L.timeFormat("%a, %b %d, %-I:%M %p"), Gs = (i) => {
306
+ }, Le = "sc-charts__hover-tooltip", _t = 16, Us = L.timeFormat("%a, %b %d, %-I:%M %p"), Gs = (i) => {
307
307
  const e = L.format(",.2f");
308
308
  return `${i < 0 ? "-" : ""}$${e(Math.abs(i))}`;
309
309
  };
310
310
  function Zs(i) {
311
311
  const e = document.createElement("div");
312
- e.className = `${ke}-container`, e.style.position = "absolute", e.style.top = "0", e.style.pointerEvents = "none", e.style.display = "none", i.appendChild(e);
312
+ e.className = `${Le}-container`, e.style.position = "absolute", e.style.top = "0", e.style.pointerEvents = "none", e.style.display = "none", i.appendChild(e);
313
313
  const t = document.createElement("div");
314
- t.className = `${ke}-sum`;
314
+ t.className = `${Le}-sum`;
315
315
  const s = document.createElement("div");
316
- return s.className = `${ke}-time`, { wrapper: e, sumNode: t, timeNode: s };
316
+ return s.className = `${Le}-time`, { wrapper: e, sumNode: t, timeNode: s };
317
317
  }
318
318
  function qs(i, e, t) {
319
319
  return i ? e + _t + i.width < t ? e + _t : e - _t - i.width : null;
@@ -324,7 +324,7 @@ const Js = (i) => {
324
324
  };
325
325
  return {
326
326
  className(a, r) {
327
- a === "remove" ? e.classList.remove(`${ke}${r}`) : e.classList.add(`${ke}${r}`);
327
+ a === "remove" ? e.classList.remove(`${Le}${r}`) : e.classList.add(`${Le}${r}`);
328
328
  },
329
329
  update({ hidden: a, dataItem: r }) {
330
330
  if (!i.config.hover.showDefaultTooltip) {
@@ -403,8 +403,8 @@ const Js = (i) => {
403
403
  enableBelowZeroLine: !1,
404
404
  curveTension: 1
405
405
  }, tt = () => L.curveMonotoneX, Ks = (i) => {
406
- const { svg: e, data: t, x: s, y: n, config: a } = i, r = e.node(), o = _e(r);
407
- Le(o, "main-line-area-gradient", {
406
+ const { svg: e, data: t, x: s, y: n, config: a } = i, r = e.node(), o = ve(r);
407
+ Ee(o, "main-line-area-gradient", {
408
408
  x1: "0%",
409
409
  y1: "0%",
410
410
  x2: "0%",
@@ -430,8 +430,8 @@ const Js = (i) => {
430
430
  }
431
431
  };
432
432
  }, en = (i, e = {}) => {
433
- const t = "sc-charts__range-line-area", { svg: s, x: n, y: a, config: r, data: o, chartId: c } = i, { clip: h } = e, d = s.node(), g = _e(d), _ = "range-line-area-gradient";
434
- Le(g, _ + "_up", {
433
+ const t = "sc-charts__range-line-area", { svg: s, x: n, y: a, config: r, data: o, chartId: c } = i, { clip: h } = e, d = s.node(), g = ve(d), _ = "range-line-area-gradient";
434
+ Ee(g, _ + "_up", {
435
435
  x1: "0%",
436
436
  y1: "0%",
437
437
  x2: "0%",
@@ -440,7 +440,7 @@ const Js = (i) => {
440
440
  { offset: "0%", stopColor: "var(--sc-color-selection-up)" },
441
441
  { offset: "100%", stopColor: "rgba(255, 255, 255, 0)" }
442
442
  ]
443
- }), Le(g, _ + "_down", {
443
+ }), Ee(g, _ + "_down", {
444
444
  x1: "0%",
445
445
  y1: "0%",
446
446
  x2: "0%",
@@ -455,15 +455,15 @@ const Js = (i) => {
455
455
  className(y, C) {
456
456
  y === "remove" ? x.classed(`${t}${C}`, !1) : x.classed(`${t}${C}`, !0);
457
457
  },
458
- update({ data: y, hidden: C, clip: M }) {
459
- y !== void 0 && x.datum(y).attr("d", p), C !== void 0 && x.classed(`${t}_hidden`, C), M !== void 0 && w.attr("x", M.x).attr("y", M.y).attr("width", M.width).attr("height", M.height);
458
+ update({ data: y, hidden: C, clip: S }) {
459
+ y !== void 0 && x.datum(y).attr("d", p), C !== void 0 && x.classed(`${t}_hidden`, C), S !== void 0 && w.attr("x", S.x).attr("y", S.y).attr("width", S.width).attr("height", S.height);
460
460
  },
461
461
  destroy() {
462
462
  x.remove();
463
463
  }
464
464
  };
465
465
  }, vt = (i, e) => {
466
- const { svg: t, data: s, x: n, y: a, chartId: r } = i, { baseClassName: o, id: c, clip: h } = e, d = t.node(), g = _e(d), _ = L.line().x((x) => n(x.date)).y((x) => a(x.value)).curve(tt()), p = `${r}-clip-${o}`, b = g.append("clipPath").attr("id", p).append("rect").attr("x", (h == null ? void 0 : h.x) || 0).attr("y", (h == null ? void 0 : h.y) || 0).attr("width", (h == null ? void 0 : h.width) || "100%").attr("height", (h == null ? void 0 : h.height) || "100%"), w = t.append("path").classed(o, !0).datum(s).attr("d", _).attr("id", c).attr("clip-path", `url(#${p})`);
466
+ const { svg: t, data: s, x: n, y: a, chartId: r } = i, { baseClassName: o, id: c, clip: h } = e, d = t.node(), g = ve(d), _ = L.line().x((x) => n(x.date)).y((x) => a(x.value)).curve(tt()), p = `${r}-clip-${o}`, b = g.append("clipPath").attr("id", p).append("rect").attr("x", (h == null ? void 0 : h.x) || 0).attr("y", (h == null ? void 0 : h.y) || 0).attr("width", (h == null ? void 0 : h.width) || "100%").attr("height", (h == null ? void 0 : h.height) || "100%"), w = t.append("path").classed(o, !0).datum(s).attr("d", _).attr("id", c).attr("clip-path", `url(#${p})`);
467
467
  return {
468
468
  className(x, y) {
469
469
  x === "remove" ? w.classed(`${o}${y}`, !1) : w.classed(`${o}${y}`, !0);
@@ -476,13 +476,13 @@ const Js = (i) => {
476
476
  }
477
477
  };
478
478
  }, tn = (i, e) => {
479
- const { svg: t, data: s, x: n, y: a, chartId: r, config: o } = i, { baseClassName: c, id: h, clip: d } = e, g = t.node(), _ = _e(g), p = L.line().x((y) => n(y.date)).y((y) => a(y.value)).curve(tt()), v = `${r}-clip-${c}`, w = _.append("clipPath").attr("id", v).append("rect").attr("x", (d == null ? void 0 : d.x) || 0).attr("y", (d == null ? void 0 : d.y) || 0).attr("width", (d == null ? void 0 : d.width) || "100%").attr("height", (d == null ? void 0 : d.height) || "100%"), x = t.append("path").classed(c, !0).datum(s).attr("d", p).attr("id", h).attr("clip-path", `url(#${v})`);
479
+ const { svg: t, data: s, x: n, y: a, chartId: r, config: o } = i, { baseClassName: c, id: h, clip: d } = e, g = t.node(), _ = ve(g), p = L.line().x((y) => n(y.date)).y((y) => a(y.value)).curve(tt()), v = `${r}-clip-${c}`, w = _.append("clipPath").attr("id", v).append("rect").attr("x", (d == null ? void 0 : d.x) || 0).attr("y", (d == null ? void 0 : d.y) || 0).attr("width", (d == null ? void 0 : d.width) || "100%").attr("height", (d == null ? void 0 : d.height) || "100%"), x = t.append("path").classed(c, !0).datum(s).attr("d", p).attr("id", h).attr("clip-path", `url(#${v})`);
480
480
  return {
481
481
  className(y, C) {
482
482
  y === "remove" ? x.classed(`${c}${C}`, !1) : x.classed(`${c}${C}`, !0);
483
483
  },
484
- update({ data: y, clip: C, hidden: M }) {
485
- y !== void 0 && x.datum(y).attr("d", p), M !== void 0 && x.classed(`${c}_hidden`, M), C !== void 0 && (o.hover.transitionName === "default" ? w.transition().duration(o.hover.transitionDuration).attr("x", C.x).attr("y", C.y).attr("width", C.width).attr("height", C.height).ease(L.easeLinear) : w.attr("x", C.x).attr("y", C.y).attr("width", C.width).attr("height", C.height));
484
+ update({ data: y, clip: C, hidden: S }) {
485
+ y !== void 0 && x.datum(y).attr("d", p), S !== void 0 && x.classed(`${c}_hidden`, S), C !== void 0 && (o.hover.transitionName === "default" ? w.transition().duration(o.hover.transitionDuration).attr("x", C.x).attr("y", C.y).attr("width", C.width).attr("height", C.height).ease(L.easeLinear) : w.attr("x", C.x).attr("y", C.y).attr("width", C.width).attr("height", C.height));
486
486
  },
487
487
  destroy() {
488
488
  x.remove();
@@ -529,7 +529,7 @@ const Js = (i) => {
529
529
  i.config.enableBelowZeroLine && (r = vt(i, {
530
530
  baseClassName: "sc-charts__below-zero-line",
531
531
  id: `${i.chartId}-sc-charts__below-zero-line`,
532
- clip: St(i)
532
+ clip: Tt(i)
533
533
  }));
534
534
  const o = pt(i.svg, {
535
535
  className: "sc-charts__hover-circle",
@@ -681,14 +681,14 @@ const Js = (i) => {
681
681
  })), n.mainLine.className("add", "_muted");
682
682
  } else
683
683
  n.highlightLine.update({ hidden: !0 }), n.mainLine.className("remove", "_muted"), (h = n.belowZeroLine) == null || h.update({
684
- clip: St(i)
684
+ clip: Tt(i)
685
685
  });
686
686
  (d = i.gridHoverTooltip) == null || d.show({ date: e.date, value: e.value });
687
687
  }, ti = (i) => {
688
688
  var t, s;
689
689
  const { elements: e } = i;
690
690
  e.hoverLine.update({ hidden: !0 }), e.hoverCircle.update({ hidden: !0 }), e.highlightLine.update({ hidden: !0 }), e.mainLine.className("remove", "_muted"), e.hoverTooltip.update({ hidden: !0 }), (t = i.gridHoverTooltip) == null || t.hide(), i.action !== "selection" && ((s = e.belowZeroLine) == null || s.update({
691
- clip: St(i)
691
+ clip: Tt(i)
692
692
  }));
693
693
  }, on = (i, e) => {
694
694
  [
@@ -803,7 +803,7 @@ const Js = (i) => {
803
803
  window.addEventListener("resize", g);
804
804
  const _ = (p, v = !1) => {
805
805
  v && p.config && (h = Jt(h, p.config)), v && p.data && (d = p.data);
806
- const b = d.map((M) => ({ date: new Date(M.date), value: M.value })).sort((M, S) => M.date.getTime() - S.date.getTime()), w = hn(b, h, o), x = dn(b, h, c);
806
+ const b = d.map((S) => ({ date: new Date(S.date), value: S.value })).sort((S, T) => S.date.getTime() - T.date.getTime()), w = hn(b, h, o), x = dn(b, h, c);
807
807
  s.attr("class", `sc-charts sc-charts__${h.theme}`), n.attr("preserveAspectRatio", "xMinYMin meet").attr("viewBox", `0 0 ${o} ${c}`).style("width", "100%").style("height", "100%").selectAll("*").remove();
808
808
  const y = {
809
809
  chartId: e.chartId,
@@ -836,20 +836,20 @@ var Ze = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
836
836
  function un(i) {
837
837
  return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
838
838
  }
839
- var Se = { exports: {} };
840
- Se.exports;
839
+ var De = { exports: {} };
840
+ De.exports;
841
841
  var si;
842
842
  function fn() {
843
843
  return si || (si = 1, function(i, e) {
844
- var t = 200, s = "__lodash_hash_undefined__", n = 800, a = 16, r = 9007199254740991, o = "[object Arguments]", c = "[object Array]", h = "[object AsyncFunction]", d = "[object Boolean]", g = "[object Date]", _ = "[object Error]", p = "[object Function]", v = "[object GeneratorFunction]", b = "[object Map]", w = "[object Number]", x = "[object Null]", y = "[object Object]", C = "[object Proxy]", M = "[object RegExp]", S = "[object Set]", N = "[object String]", $ = "[object Undefined]", z = "[object WeakMap]", V = "[object ArrayBuffer]", Y = "[object DataView]", re = "[object Float32Array]", P = "[object Float64Array]", U = "[object Int8Array]", G = "[object Int16Array]", Fe = "[object Int32Array]", st = "[object Uint8Array]", oe = "[object Uint8ClampedArray]", ve = "[object Uint16Array]", be = "[object Uint32Array]", He = /[\\^$.*+?()[\]{}|]/g, Be = /^\[object .+?Constructor\]$/, Ie = /^(?:0|[1-9]\d*)$/, F = {};
845
- F[re] = F[P] = F[U] = F[G] = F[Fe] = F[st] = F[oe] = F[ve] = F[be] = !0, F[o] = F[c] = F[V] = F[d] = F[Y] = F[g] = F[_] = F[p] = F[b] = F[w] = F[y] = F[M] = F[S] = F[N] = F[z] = !1;
846
- var Re = typeof Ze == "object" && Ze && Ze.Object === Object && Ze, $e = typeof self == "object" && self && self.Object === Object && self, O = Re || $e || Function("return this")(), ee = e && !e.nodeType && e, Z = ee && !0 && i && !i.nodeType && i, q = Z && Z.exports === ee, ge = q && Re.process, ye = function() {
844
+ var t = 200, s = "__lodash_hash_undefined__", n = 800, a = 16, r = 9007199254740991, o = "[object Arguments]", c = "[object Array]", h = "[object AsyncFunction]", d = "[object Boolean]", g = "[object Date]", _ = "[object Error]", p = "[object Function]", v = "[object GeneratorFunction]", b = "[object Map]", w = "[object Number]", x = "[object Null]", y = "[object Object]", C = "[object Proxy]", S = "[object RegExp]", T = "[object Set]", N = "[object String]", $ = "[object Undefined]", X = "[object WeakMap]", U = "[object ArrayBuffer]", te = "[object DataView]", K = "[object Float32Array]", z = "[object Float64Array]", V = "[object Int8Array]", O = "[object Int16Array]", oe = "[object Int32Array]", st = "[object Uint8Array]", le = "[object Uint8ClampedArray]", be = "[object Uint16Array]", ye = "[object Uint32Array]", He = /[\\^$.*+?()[\]{}|]/g, Be = /^\[object .+?Constructor\]$/, Ie = /^(?:0|[1-9]\d*)$/, F = {};
845
+ F[K] = F[z] = F[V] = F[O] = F[oe] = F[st] = F[le] = F[be] = F[ye] = !0, F[o] = F[c] = F[U] = F[d] = F[te] = F[g] = F[_] = F[p] = F[b] = F[w] = F[y] = F[S] = F[T] = F[N] = F[X] = !1;
846
+ var Re = typeof Ze == "object" && Ze && Ze.Object === Object && Ze, $e = typeof self == "object" && self && self.Object === Object && self, P = Re || $e || Function("return this")(), ee = e && !e.nodeType && e, G = ee && !0 && i && !i.nodeType && i, Z = G && G.exports === ee, me = Z && Re.process, we = function() {
847
847
  try {
848
- var l = Z && Z.require && Z.require("util").types;
849
- return l || ge && ge.binding && ge.binding("util");
848
+ var l = G && G.require && G.require("util").types;
849
+ return l || me && me.binding && me.binding("util");
850
850
  } catch {
851
851
  }
852
- }(), we = ye && ye.isTypedArray;
852
+ }(), xe = we && we.isTypedArray;
853
853
  function Oe(l, u, m) {
854
854
  switch (m.length) {
855
855
  case 0:
@@ -864,16 +864,16 @@ function fn() {
864
864
  return l.apply(u, m);
865
865
  }
866
866
  function Pe(l, u) {
867
- for (var m = -1, T = Array(l); ++m < l; )
868
- T[m] = u(m);
869
- return T;
867
+ for (var m = -1, A = Array(l); ++m < l; )
868
+ A[m] = u(m);
869
+ return A;
870
870
  }
871
- function le(l) {
871
+ function ce(l) {
872
872
  return function(u) {
873
873
  return l(u);
874
874
  };
875
875
  }
876
- function ce(l, u) {
876
+ function he(l, u) {
877
877
  return l == null ? void 0 : l[u];
878
878
  }
879
879
  function nt(l, u) {
@@ -881,24 +881,24 @@ function fn() {
881
881
  return l(u(m));
882
882
  };
883
883
  }
884
- var xe = Array.prototype, Ai = Function.prototype, ze = Object.prototype, at = O["__core-js_shared__"], Ve = Ai.toString, ne = ze.hasOwnProperty, Nt = function() {
884
+ var Ce = Array.prototype, Mi = Function.prototype, ze = Object.prototype, at = P["__core-js_shared__"], Ve = Mi.toString, ae = ze.hasOwnProperty, Nt = function() {
885
885
  var l = /[^.]+$/.exec(at && at.keys && at.keys.IE_PROTO || "");
886
886
  return l ? "Symbol(src)_1." + l : "";
887
- }(), Ft = ze.toString, Mi = Ve.call(Object), Si = RegExp(
888
- "^" + Ve.call(ne).replace(He, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
889
- ), Ye = q ? O.Buffer : void 0, Ht = O.Symbol, Bt = O.Uint8Array;
887
+ }(), Ft = ze.toString, Si = Ve.call(Object), Ti = RegExp(
888
+ "^" + Ve.call(ae).replace(He, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
889
+ ), Ye = Z ? P.Buffer : void 0, Ht = P.Symbol, Bt = P.Uint8Array;
890
890
  Ye && Ye.allocUnsafe;
891
- var It = nt(Object.getPrototypeOf, Object), Rt = Object.create, Di = ze.propertyIsEnumerable, ki = xe.splice, he = Ht ? Ht.toStringTag : void 0, We = function() {
891
+ var It = nt(Object.getPrototypeOf, Object), Rt = Object.create, Di = ze.propertyIsEnumerable, ki = Ce.splice, de = Ht ? Ht.toStringTag : void 0, We = function() {
892
892
  try {
893
893
  var l = lt(Object, "defineProperty");
894
894
  return l({}, "", {}), l;
895
895
  } catch {
896
896
  }
897
- }(), Li = Ye ? Ye.isBuffer : void 0, $t = Math.max, Ei = Date.now, Ot = lt(O, "Map"), Ce = lt(Object, "create"), Ni = /* @__PURE__ */ function() {
897
+ }(), Li = Ye ? Ye.isBuffer : void 0, $t = Math.max, Ei = Date.now, Ot = lt(P, "Map"), Ae = lt(Object, "create"), Ni = /* @__PURE__ */ function() {
898
898
  function l() {
899
899
  }
900
900
  return function(u) {
901
- if (!ue(u))
901
+ if (!fe(u))
902
902
  return {};
903
903
  if (Rt)
904
904
  return Rt(u);
@@ -907,15 +907,15 @@ function fn() {
907
907
  return l.prototype = void 0, m;
908
908
  };
909
909
  }();
910
- function de(l) {
910
+ function ue(l) {
911
911
  var u = -1, m = l == null ? 0 : l.length;
912
912
  for (this.clear(); ++u < m; ) {
913
- var T = l[u];
914
- this.set(T[0], T[1]);
913
+ var A = l[u];
914
+ this.set(A[0], A[1]);
915
915
  }
916
916
  }
917
917
  function Fi() {
918
- this.__data__ = Ce ? Ce(null) : {}, this.size = 0;
918
+ this.__data__ = Ae ? Ae(null) : {}, this.size = 0;
919
919
  }
920
920
  function Hi(l) {
921
921
  var u = this.has(l) && delete this.__data__[l];
@@ -923,26 +923,26 @@ function fn() {
923
923
  }
924
924
  function Bi(l) {
925
925
  var u = this.__data__;
926
- if (Ce) {
926
+ if (Ae) {
927
927
  var m = u[l];
928
928
  return m === s ? void 0 : m;
929
929
  }
930
- return ne.call(u, l) ? u[l] : void 0;
930
+ return ae.call(u, l) ? u[l] : void 0;
931
931
  }
932
932
  function Ii(l) {
933
933
  var u = this.__data__;
934
- return Ce ? u[l] !== void 0 : ne.call(u, l);
934
+ return Ae ? u[l] !== void 0 : ae.call(u, l);
935
935
  }
936
936
  function Ri(l, u) {
937
937
  var m = this.__data__;
938
- return this.size += this.has(l) ? 0 : 1, m[l] = Ce && u === void 0 ? s : u, this;
938
+ return this.size += this.has(l) ? 0 : 1, m[l] = Ae && u === void 0 ? s : u, this;
939
939
  }
940
- de.prototype.clear = Fi, de.prototype.delete = Hi, de.prototype.get = Bi, de.prototype.has = Ii, de.prototype.set = Ri;
941
- function te(l) {
940
+ ue.prototype.clear = Fi, ue.prototype.delete = Hi, ue.prototype.get = Bi, ue.prototype.has = Ii, ue.prototype.set = Ri;
941
+ function ie(l) {
942
942
  var u = -1, m = l == null ? 0 : l.length;
943
943
  for (this.clear(); ++u < m; ) {
944
- var T = l[u];
945
- this.set(T[0], T[1]);
944
+ var A = l[u];
945
+ this.set(A[0], A[1]);
946
946
  }
947
947
  }
948
948
  function $i() {
@@ -952,8 +952,8 @@ function fn() {
952
952
  var u = this.__data__, m = je(u, l);
953
953
  if (m < 0)
954
954
  return !1;
955
- var T = u.length - 1;
956
- return m == T ? u.pop() : ki.call(u, m, 1), --this.size, !0;
955
+ var A = u.length - 1;
956
+ return m == A ? u.pop() : ki.call(u, m, 1), --this.size, !0;
957
957
  }
958
958
  function Pi(l) {
959
959
  var u = this.__data__, m = je(u, l);
@@ -963,22 +963,22 @@ function fn() {
963
963
  return je(this.__data__, l) > -1;
964
964
  }
965
965
  function Vi(l, u) {
966
- var m = this.__data__, T = je(m, l);
967
- return T < 0 ? (++this.size, m.push([l, u])) : m[T][1] = u, this;
966
+ var m = this.__data__, A = je(m, l);
967
+ return A < 0 ? (++this.size, m.push([l, u])) : m[A][1] = u, this;
968
968
  }
969
- te.prototype.clear = $i, te.prototype.delete = Oi, te.prototype.get = Pi, te.prototype.has = zi, te.prototype.set = Vi;
970
- function me(l) {
969
+ ie.prototype.clear = $i, ie.prototype.delete = Oi, ie.prototype.get = Pi, ie.prototype.has = zi, ie.prototype.set = Vi;
970
+ function pe(l) {
971
971
  var u = -1, m = l == null ? 0 : l.length;
972
972
  for (this.clear(); ++u < m; ) {
973
- var T = l[u];
974
- this.set(T[0], T[1]);
973
+ var A = l[u];
974
+ this.set(A[0], A[1]);
975
975
  }
976
976
  }
977
977
  function Yi() {
978
978
  this.size = 0, this.__data__ = {
979
- hash: new de(),
980
- map: new (Ot || te)(),
981
- string: new de()
979
+ hash: new ue(),
980
+ map: new (Ot || ie)(),
981
+ string: new ue()
982
982
  };
983
983
  }
984
984
  function Wi(l) {
@@ -992,16 +992,16 @@ function fn() {
992
992
  return Ue(this, l).has(l);
993
993
  }
994
994
  function Ui(l, u) {
995
- var m = Ue(this, l), T = m.size;
996
- return m.set(l, u), this.size += m.size == T ? 0 : 1, this;
995
+ var m = Ue(this, l), A = m.size;
996
+ return m.set(l, u), this.size += m.size == A ? 0 : 1, this;
997
997
  }
998
- me.prototype.clear = Yi, me.prototype.delete = Wi, me.prototype.get = ji, me.prototype.has = Xi, me.prototype.set = Ui;
999
- function pe(l) {
1000
- var u = this.__data__ = new te(l);
998
+ pe.prototype.clear = Yi, pe.prototype.delete = Wi, pe.prototype.get = ji, pe.prototype.has = Xi, pe.prototype.set = Ui;
999
+ function _e(l) {
1000
+ var u = this.__data__ = new ie(l);
1001
1001
  this.size = u.size;
1002
1002
  }
1003
1003
  function Gi() {
1004
- this.__data__ = new te(), this.size = 0;
1004
+ this.__data__ = new ie(), this.size = 0;
1005
1005
  }
1006
1006
  function Zi(l) {
1007
1007
  var u = this.__data__, m = u.delete(l);
@@ -1015,31 +1015,31 @@ function fn() {
1015
1015
  }
1016
1016
  function Qi(l, u) {
1017
1017
  var m = this.__data__;
1018
- if (m instanceof te) {
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);
1018
+ if (m instanceof ie) {
1019
+ var A = m.__data__;
1020
+ if (!Ot || A.length < t - 1)
1021
+ return A.push([l, u]), this.size = ++m.size, this;
1022
+ m = this.__data__ = new pe(A);
1023
1023
  }
1024
1024
  return m.set(l, u), this.size = m.size, this;
1025
1025
  }
1026
- pe.prototype.clear = Gi, pe.prototype.delete = Zi, pe.prototype.get = qi, pe.prototype.has = Ji, pe.prototype.set = Qi;
1026
+ _e.prototype.clear = Gi, _e.prototype.delete = Zi, _e.prototype.get = qi, _e.prototype.has = Ji, _e.prototype.set = Qi;
1027
1027
  function Ki(l, u) {
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;
1029
- for (var J in l)
1028
+ 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;
1029
+ for (var q in l)
1030
1030
  B && // Safari 9 has enumerable `arguments.length` in strict mode.
1031
- (J == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
1032
- D && (J == "offset" || J == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
1033
- H && (J == "buffer" || J == "byteLength" || J == "byteOffset") || // Skip index properties.
1034
- Vt(J, I)) || E.push(J);
1031
+ (q == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
1032
+ D && (q == "offset" || q == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
1033
+ H && (q == "buffer" || q == "byteLength" || q == "byteOffset") || // Skip index properties.
1034
+ Vt(q, I)) || E.push(q);
1035
1035
  return E;
1036
1036
  }
1037
1037
  function rt(l, u, m) {
1038
1038
  (m !== void 0 && !Ge(l[u], m) || m === void 0 && !(u in l)) && ot(l, u, m);
1039
1039
  }
1040
1040
  function es(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);
1041
+ var A = l[u];
1042
+ (!(ae.call(l, u) && Ge(A, m)) || m === void 0 && !(u in l)) && ot(l, u, m);
1043
1043
  }
1044
1044
  function je(l, u) {
1045
1045
  for (var m = l.length; m--; )
@@ -1057,50 +1057,50 @@ function fn() {
1057
1057
  }
1058
1058
  var ts = gs();
1059
1059
  function Xe(l) {
1060
- return l == null ? l === void 0 ? $ : x : he && he in Object(l) ? ms(l) : ws(l);
1060
+ return l == null ? l === void 0 ? $ : x : de && de in Object(l) ? ms(l) : ws(l);
1061
1061
  }
1062
1062
  function Pt(l) {
1063
- return Te(l) && Xe(l) == o;
1063
+ return Me(l) && Xe(l) == o;
1064
1064
  }
1065
1065
  function is(l) {
1066
- if (!ue(l) || bs(l))
1066
+ if (!fe(l) || bs(l))
1067
1067
  return !1;
1068
- var u = ft(l) ? Si : Be;
1069
- return u.test(As(l));
1068
+ var u = ft(l) ? Ti : Be;
1069
+ return u.test(Ms(l));
1070
1070
  }
1071
1071
  function ss(l) {
1072
- return Te(l) && jt(l.length) && !!F[Xe(l)];
1072
+ return Me(l) && jt(l.length) && !!F[Xe(l)];
1073
1073
  }
1074
1074
  function ns(l) {
1075
- if (!ue(l))
1075
+ if (!fe(l))
1076
1076
  return ys(l);
1077
1077
  var u = Yt(l), m = [];
1078
- for (var T in l)
1079
- T == "constructor" && (u || !ne.call(l, T)) || m.push(T);
1078
+ for (var A in l)
1079
+ A == "constructor" && (u || !ae.call(l, A)) || m.push(A);
1080
1080
  return m;
1081
1081
  }
1082
- function zt(l, u, m, T, D) {
1082
+ function zt(l, u, m, A, D) {
1083
1083
  l !== u && ts(u, function(H, B) {
1084
- if (D || (D = new pe()), ue(H))
1085
- as(l, u, B, m, zt, T, D);
1084
+ if (D || (D = new _e()), fe(H))
1085
+ as(l, u, B, m, zt, A, D);
1086
1086
  else {
1087
- var E = T ? T(ct(l, B), H, B + "", l, u, D) : void 0;
1087
+ var E = A ? A(ct(l, B), H, B + "", l, u, D) : void 0;
1088
1088
  E === void 0 && (E = H), rt(l, B, E);
1089
1089
  }
1090
1090
  }, Ut);
1091
1091
  }
1092
- function as(l, u, m, T, D, H, B) {
1093
- var E = ct(l, m), I = ct(u, m), J = B.get(I);
1094
- if (J) {
1095
- rt(l, m, J);
1092
+ function as(l, u, m, A, D, H, B) {
1093
+ var E = ct(l, m), I = ct(u, m), q = B.get(I);
1094
+ if (q) {
1095
+ rt(l, m, q);
1096
1096
  return;
1097
1097
  }
1098
- var W = H ? H(E, I, m + "", l, u, B) : void 0, Ae = W === void 0;
1099
- if (Ae) {
1098
+ var Y = H ? H(E, I, m + "", l, u, B) : void 0, Se = Y === void 0;
1099
+ if (Se) {
1100
1100
  var gt = dt(I), mt = !gt && Wt(I), Zt = !gt && !mt && Xt(I);
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;
1101
+ Y = I, gt || mt || Zt ? dt(E) ? Y = E : Ss(E) ? Y = ds(E) : mt ? (Se = !1, Y = ls(I)) : Zt ? (Se = !1, Y = hs(I)) : Y = [] : Ts(I) || ht(I) ? (Y = E, ht(E) ? Y = Ds(E) : (!fe(E) || ft(E)) && (Y = ps(I))) : Se = !1;
1102
1102
  }
1103
- Ae && (B.set(I, W), D(W, I, T, H, B), B.delete(I)), rt(l, m, W);
1103
+ Se && (B.set(I, Y), D(Y, I, A, H, B), B.delete(I)), rt(l, m, Y);
1104
1104
  }
1105
1105
  function rs(l, u) {
1106
1106
  return Cs(xs(l, u, Gt), l + "");
@@ -1125,12 +1125,12 @@ function fn() {
1125
1125
  return new l.constructor(m, l.byteOffset, l.length);
1126
1126
  }
1127
1127
  function ds(l, u) {
1128
- var m = -1, T = l.length;
1129
- for (u || (u = Array(T)); ++m < T; )
1128
+ var m = -1, A = l.length;
1129
+ for (u || (u = Array(A)); ++m < A; )
1130
1130
  u[m] = l[m];
1131
1131
  return u;
1132
1132
  }
1133
- function us(l, u, m, T) {
1133
+ function us(l, u, m, A) {
1134
1134
  var D = !m;
1135
1135
  m || (m = {});
1136
1136
  for (var H = -1, B = u.length; ++H < B; ) {
@@ -1141,17 +1141,17 @@ function fn() {
1141
1141
  }
1142
1142
  function fs(l) {
1143
1143
  return rs(function(u, m) {
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);
1144
+ var A = -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); ++A < D; ) {
1146
+ var E = m[A];
1147
+ E && l(u, E, A, H);
1148
1148
  }
1149
1149
  return u;
1150
1150
  });
1151
1151
  }
1152
1152
  function gs(l) {
1153
- return function(u, m, T) {
1154
- for (var D = -1, H = Object(u), B = T(u), E = B.length; E--; ) {
1153
+ return function(u, m, A) {
1154
+ for (var D = -1, H = Object(u), B = A(u), E = B.length; E--; ) {
1155
1155
  var I = B[++D];
1156
1156
  if (m(H[I], I, H) === !1)
1157
1157
  break;
@@ -1164,18 +1164,18 @@ function fn() {
1164
1164
  return vs(u) ? m[typeof u == "string" ? "string" : "hash"] : m.map;
1165
1165
  }
1166
1166
  function lt(l, u) {
1167
- var m = ce(l, u);
1167
+ var m = he(l, u);
1168
1168
  return is(m) ? m : void 0;
1169
1169
  }
1170
1170
  function ms(l) {
1171
- var u = ne.call(l, he), m = l[he];
1171
+ var u = ae.call(l, de), m = l[de];
1172
1172
  try {
1173
- l[he] = void 0;
1174
- var T = !0;
1173
+ l[de] = void 0;
1174
+ var A = !0;
1175
1175
  } catch {
1176
1176
  }
1177
1177
  var D = Ft.call(l);
1178
- return T && (u ? l[he] = m : delete l[he]), D;
1178
+ return A && (u ? l[de] = m : delete l[de]), D;
1179
1179
  }
1180
1180
  function ps(l) {
1181
1181
  return typeof l.constructor == "function" && !Yt(l) ? Ni(It(l)) : {};
@@ -1185,10 +1185,10 @@ function fn() {
1185
1185
  return u = u ?? r, !!u && (m == "number" || m != "symbol" && Ie.test(l)) && l > -1 && l % 1 == 0 && l < u;
1186
1186
  }
1187
1187
  function _s(l, u, m) {
1188
- if (!ue(m))
1188
+ if (!fe(m))
1189
1189
  return !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;
1190
+ var A = typeof u;
1191
+ return (A == "number" ? ut(m) && Vt(u, m.length) : A == "string" && u in m) ? Ge(m[u], l) : !1;
1192
1192
  }
1193
1193
  function vs(l) {
1194
1194
  var u = typeof l;
@@ -1213,11 +1213,11 @@ function fn() {
1213
1213
  }
1214
1214
  function xs(l, u, m) {
1215
1215
  return u = $t(u === void 0 ? l.length - 1 : u, 0), function() {
1216
- for (var T = arguments, D = -1, H = $t(T.length - u, 0), B = Array(H); ++D < H; )
1217
- B[D] = T[u + D];
1216
+ for (var A = arguments, D = -1, H = $t(A.length - u, 0), B = Array(H); ++D < H; )
1217
+ B[D] = A[u + D];
1218
1218
  D = -1;
1219
1219
  for (var E = Array(u + 1); ++D < u; )
1220
- E[D] = T[D];
1220
+ E[D] = A[D];
1221
1221
  return E[u] = m(B), Oe(l, this, E);
1222
1222
  };
1223
1223
  }
@@ -1225,12 +1225,12 @@ function fn() {
1225
1225
  if (!(u === "constructor" && typeof l[u] == "function") && u != "__proto__")
1226
1226
  return l[u];
1227
1227
  }
1228
- var Cs = Ts(os);
1229
- function Ts(l) {
1228
+ var Cs = As(os);
1229
+ function As(l) {
1230
1230
  var u = 0, m = 0;
1231
1231
  return function() {
1232
- var T = Ei(), D = a - (T - m);
1233
- if (m = T, D > 0) {
1232
+ var A = Ei(), D = a - (A - m);
1233
+ if (m = A, D > 0) {
1234
1234
  if (++u >= n)
1235
1235
  return arguments[0];
1236
1236
  } else
@@ -1238,7 +1238,7 @@ function fn() {
1238
1238
  return l.apply(void 0, arguments);
1239
1239
  };
1240
1240
  }
1241
- function As(l) {
1241
+ function Ms(l) {
1242
1242
  if (l != null) {
1243
1243
  try {
1244
1244
  return Ve.call(l);
@@ -1257,17 +1257,17 @@ function fn() {
1257
1257
  var ht = Pt(/* @__PURE__ */ function() {
1258
1258
  return arguments;
1259
1259
  }()) ? Pt : function(l) {
1260
- return Te(l) && ne.call(l, "callee") && !Di.call(l, "callee");
1260
+ return Me(l) && ae.call(l, "callee") && !Di.call(l, "callee");
1261
1261
  }, dt = Array.isArray;
1262
1262
  function ut(l) {
1263
1263
  return l != null && jt(l.length) && !ft(l);
1264
1264
  }
1265
- function Ms(l) {
1266
- return Te(l) && ut(l);
1265
+ function Ss(l) {
1266
+ return Me(l) && ut(l);
1267
1267
  }
1268
1268
  var Wt = Li || Es;
1269
1269
  function ft(l) {
1270
- if (!ue(l))
1270
+ if (!fe(l))
1271
1271
  return !1;
1272
1272
  var u = Xe(l);
1273
1273
  return u == p || u == v || u == h || u == C;
@@ -1275,23 +1275,23 @@ function fn() {
1275
1275
  function jt(l) {
1276
1276
  return typeof l == "number" && l > -1 && l % 1 == 0 && l <= r;
1277
1277
  }
1278
- function ue(l) {
1278
+ function fe(l) {
1279
1279
  var u = typeof l;
1280
1280
  return l != null && (u == "object" || u == "function");
1281
1281
  }
1282
- function Te(l) {
1282
+ function Me(l) {
1283
1283
  return l != null && typeof l == "object";
1284
1284
  }
1285
- function Ss(l) {
1286
- if (!Te(l) || Xe(l) != y)
1285
+ function Ts(l) {
1286
+ if (!Me(l) || Xe(l) != y)
1287
1287
  return !1;
1288
1288
  var u = It(l);
1289
1289
  if (u === null)
1290
1290
  return !0;
1291
- var m = ne.call(u, "constructor") && u.constructor;
1292
- return typeof m == "function" && m instanceof m && Ve.call(m) == Mi;
1291
+ var m = ae.call(u, "constructor") && u.constructor;
1292
+ return typeof m == "function" && m instanceof m && Ve.call(m) == Si;
1293
1293
  }
1294
- var Xt = we ? le(we) : ss;
1294
+ var Xt = xe ? ce(xe) : ss;
1295
1295
  function Ds(l) {
1296
1296
  return us(l, Ut(l));
1297
1297
  }
@@ -1313,7 +1313,7 @@ function fn() {
1313
1313
  return !1;
1314
1314
  }
1315
1315
  i.exports = ks;
1316
- }(Se, Se.exports)), Se.exports;
1316
+ }(De, De.exports)), De.exports;
1317
1317
  }
1318
1318
  var gn = fn();
1319
1319
  const Qe = /* @__PURE__ */ un(gn), ni = 12, mn = {
@@ -1403,7 +1403,7 @@ class pn {
1403
1403
  return this._trade;
1404
1404
  }
1405
1405
  }
1406
- class X {
1406
+ class j {
1407
1407
  constructor(e) {
1408
1408
  f(this, "x");
1409
1409
  f(this, "y");
@@ -1446,32 +1446,32 @@ class X {
1446
1446
  }
1447
1447
  class _n {
1448
1448
  constructor(e, t) {
1449
- f(this, "_chart", new X());
1450
- f(this, "_area", new X());
1451
- f(this, "_xAxis", new X());
1452
- f(this, "_yAxis", new X());
1453
- f(this, "_axisIntersection", new X());
1449
+ f(this, "_chart", new j());
1450
+ f(this, "_area", new j());
1451
+ f(this, "_xAxis", new j());
1452
+ f(this, "_yAxis", new j());
1453
+ f(this, "_axisIntersection", new j());
1454
1454
  const { xAxis: s, yAxis: n } = t;
1455
- this._chart = new X(e), this._calc(s, n);
1455
+ this._chart = new j(e), this._calc(s, n);
1456
1456
  }
1457
1457
  _calc(e, t) {
1458
1458
  const s = e.isShow ? e.height : 0, n = t.isShow ? t.width : 0, a = this._chart.height - s, r = this._chart.width - n;
1459
- this._area = new X({
1459
+ this._area = new j({
1460
1460
  x: t.position === "left" ? n : 0,
1461
1461
  y: e.position === "top" ? s : 0,
1462
1462
  width: r,
1463
1463
  height: a
1464
- }), this._xAxis = new X({
1464
+ }), this._xAxis = new j({
1465
1465
  y: e.position === "top" ? 0 : a,
1466
1466
  x: t.position === "left" ? n : 0,
1467
1467
  height: s,
1468
1468
  width: r
1469
- }), this._yAxis = new X({
1469
+ }), this._yAxis = new j({
1470
1470
  y: e.position === "top" ? s : 0,
1471
1471
  x: t.position === "left" ? 0 : r,
1472
1472
  width: n,
1473
1473
  height: a
1474
- }), this._axisIntersection = new X({
1474
+ }), this._axisIntersection = new j({
1475
1475
  y: e.position === "top" ? 0 : a,
1476
1476
  x: t.position === "left" ? 0 : r,
1477
1477
  width: n,
@@ -1484,7 +1484,7 @@ class _n {
1484
1484
  }
1485
1485
  update(e) {
1486
1486
  const { xAxis: t, yAxis: s } = e.config;
1487
- this._chart = new X(e.container), this._calc(t, s);
1487
+ this._chart = new j(e.container), this._calc(t, s);
1488
1488
  }
1489
1489
  get area() {
1490
1490
  return this._area;
@@ -1534,11 +1534,11 @@ function ai(i, e) {
1534
1534
  const w = Math.abs(v - b);
1535
1535
  let x = Math.max(v, b) + w / 2, y = Math.min(v, b) - w / 2;
1536
1536
  if (e.trade) {
1537
- const M = [...e.trade.entries, ...e.trade.exits].find((S) => {
1538
- const N = S.time.getTime();
1537
+ const S = [...e.trade.entries, ...e.trade.exits].find((T) => {
1538
+ const N = T.time.getTime();
1539
1539
  return N >= g && N < g + t;
1540
1540
  });
1541
- M && (M.type === "buy" ? (y = M.price, b = Math.max(y, b), v = b + w, x = Math.max(v, b) + w / 2, d = v) : M.type === "sell" && (x = M.price, b = Math.min(x, b), v = b - w, y = Math.min(v, b) - w / 2, d = v));
1541
+ S && (S.type === "buy" ? (y = S.price, b = Math.max(y, b), v = b + w, x = Math.max(v, b) + w / 2, d = v) : S.type === "sell" && (x = S.price, b = Math.min(x, b), v = b - w, y = Math.min(v, b) - w / 2, d = v));
1542
1542
  }
1543
1543
  const C = {
1544
1544
  open_time: new Date(g),
@@ -1668,7 +1668,7 @@ const ri = { x: 0.2, y: 0.2 }, oi = 1e-3, xn = {
1668
1668
  const e = i.match(/^(\d+)([a-zA-Z]+)$/);
1669
1669
  if (!e) throw new Error(`Invalid offset format: "${i}"`);
1670
1670
  return [parseInt(e[1]), e[2]];
1671
- }, Tn = (i, e) => {
1671
+ }, An = (i, e) => {
1672
1672
  const [t, s] = e.domain().map((o) => o.getTime()), n = i.filter((o) => {
1673
1673
  const c = o.open_time.getTime();
1674
1674
  return c >= t && c <= s;
@@ -1676,7 +1676,7 @@ const ri = { x: 0.2, y: 0.2 }, oi = 1e-3, xn = {
1676
1676
  if (a == null || r == null) throw new Error("Invalid Y data");
1677
1677
  return [a, r];
1678
1678
  };
1679
- class An {
1679
+ class Mn {
1680
1680
  constructor(e) {
1681
1681
  this.model = e;
1682
1682
  }
@@ -1686,7 +1686,7 @@ class An {
1686
1686
  e.setDomain(s), this.setRange(e, this.model.layout.xAxis), this.setDefaultXDomain(e), this.applyOffset(e);
1687
1687
  }
1688
1688
  initY(e, t) {
1689
- const s = Tn(this.model.candles.preparedData, t);
1689
+ const s = An(this.model.candles.preparedData, t);
1690
1690
  e.setDomain(s), this.setRange(e, this.model.layout.yAxis);
1691
1691
  }
1692
1692
  init(e) {
@@ -1715,7 +1715,7 @@ class An {
1715
1715
  e.setDomain([new Date(h.getTime() + c), new Date(d.getTime() + c)]);
1716
1716
  }
1717
1717
  }
1718
- class Mn {
1718
+ class Sn {
1719
1719
  constructor(e) {
1720
1720
  f(this, "_model");
1721
1721
  f(this, "_scaleX");
@@ -1727,7 +1727,7 @@ class Mn {
1727
1727
  });
1728
1728
  f(this, "scaleFactor", { x: 1, y: 1 });
1729
1729
  f(this, "panOffset", { x: 0, y: 0 });
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 = {
1730
+ this._model = e, this._scaleX = new bi(), this._scaleY = new wn(), this._initializer = new Mn(e), this._initializer.init({ x: this._scaleX, y: this._scaleY }), this._baseDomain = {
1731
1731
  x: this._scaleX.domain(),
1732
1732
  y: this._scaleY.domain()
1733
1733
  };
@@ -1799,7 +1799,7 @@ class Mn {
1799
1799
  this._model.eventBus.emit("scale_event");
1800
1800
  }
1801
1801
  }
1802
- class Sn {
1802
+ class Tn {
1803
1803
  constructor(e, { entry: t = [], exit: s = [] }) {
1804
1804
  f(this, "_model");
1805
1805
  f(this, "_rawEntry");
@@ -2078,7 +2078,7 @@ class Nn {
2078
2078
  f(this, "trade");
2079
2079
  f(this, "userMarkers");
2080
2080
  f(this, "comments");
2081
- this.chartId = e, this.container = t, this.candles = new Dt(s, this), this.config = new pn(n), this.colorScheme = new Ln(o), this.layout = new _n(t, this.config), this.scales = new Mn(this), this.trade = new Sn(this, a), this.candles.updateMissingCandles(), this.trade.recalculate(), this.userMarkers = new Dn(this, r), this.comments = new En(c, this);
2081
+ this.chartId = e, this.container = t, this.candles = new Dt(s, this), this.config = new pn(n), this.colorScheme = new Ln(o), this.layout = new _n(t, this.config), this.scales = new Sn(this), this.trade = new Tn(this, a), this.candles.updateMissingCandles(), this.trade.recalculate(), this.userMarkers = new Dn(this, r), this.comments = new En(c, this);
2082
2082
  }
2083
2083
  init() {
2084
2084
  this.eventBus.emit("init_model");
@@ -2147,7 +2147,7 @@ class k {
2147
2147
  this.node.style.opacity = e ? "1" : "0", this.node.style.visibility = e ? "visible" : "hidden";
2148
2148
  }
2149
2149
  }
2150
- class Ee extends k {
2150
+ class Ne extends k {
2151
2151
  constructor({ className: t, id: s, width: n, height: a, isMain: r }) {
2152
2152
  super({
2153
2153
  tag: "canvas",
@@ -2277,15 +2277,15 @@ function et(i) {
2277
2277
  }, et(i);
2278
2278
  }
2279
2279
  var Pn = /^\s+/, zn = /\s+$/;
2280
- function A(i, e) {
2281
- if (i = i || "", e = e || {}, i instanceof A)
2280
+ function M(i, e) {
2281
+ if (i = i || "", e = e || {}, i instanceof M)
2282
2282
  return i;
2283
- if (!(this instanceof A))
2284
- return new A(i, e);
2283
+ if (!(this instanceof M))
2284
+ return new M(i, e);
2285
2285
  var t = Vn(i);
2286
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;
2287
2287
  }
2288
- A.prototype = {
2288
+ M.prototype = {
2289
2289
  isDark: function() {
2290
2290
  return this.getBrightness() < 128;
2291
2291
  },
@@ -2381,7 +2381,7 @@ A.prototype = {
2381
2381
  toFilter: function(e) {
2382
2382
  var t = "#" + di(this._r, this._g, this._b, this._a), s = t, n = this._gradientType ? "GradientType = 1, " : "";
2383
2383
  if (e) {
2384
- var a = A(e);
2384
+ var a = M(e);
2385
2385
  s = "#" + di(a._r, a._g, a._b, a._a);
2386
2386
  }
2387
2387
  return "progid:DXImageTransform.Microsoft.gradient(" + n + "startColorstr=" + t + ",endColorstr=" + s + ")";
@@ -2393,7 +2393,7 @@ A.prototype = {
2393
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());
2394
2394
  },
2395
2395
  clone: function() {
2396
- return A(this.toString());
2396
+ return M(this.toString());
2397
2397
  },
2398
2398
  _applyModification: function(e, t) {
2399
2399
  var s = e.apply(null, [this].concat([].slice.call(t)));
@@ -2446,14 +2446,14 @@ A.prototype = {
2446
2446
  return this._applyCombination(ui, [4]);
2447
2447
  }
2448
2448
  };
2449
- A.fromRatio = function(i, e) {
2449
+ M.fromRatio = function(i, e) {
2450
2450
  if (et(i) == "object") {
2451
2451
  var t = {};
2452
2452
  for (var s in i)
2453
- i.hasOwnProperty(s) && (s === "a" ? t[s] = i[s] : t[s] = De(i[s]));
2453
+ i.hasOwnProperty(s) && (s === "a" ? t[s] = i[s] : t[s] = ke(i[s]));
2454
2454
  i = t;
2455
2455
  }
2456
- return A(i, e);
2456
+ return M(i, e);
2457
2457
  };
2458
2458
  function Vn(i) {
2459
2459
  var e = {
@@ -2461,7 +2461,7 @@ function Vn(i) {
2461
2461
  g: 0,
2462
2462
  b: 0
2463
2463
  }, t = 1, s = null, n = null, a = null, r = !1, o = !1;
2464
- return typeof i == "string" && (i = la(i)), et(i) == "object" && (ie(i.r) && ie(i.g) && ie(i.b) ? (e = Yn(i.r, i.g, i.b), r = !0, o = String(i.r).substr(-1) === "%" ? "prgb" : "rgb") : ie(i.h) && ie(i.s) && ie(i.v) ? (s = De(i.s), n = De(i.v), e = jn(i.h, s, n), r = !0, o = "hsv") : ie(i.h) && ie(i.s) && ie(i.l) && (s = De(i.s), a = De(i.l), e = Wn(i.h, s, a), r = !0, o = "hsl"), i.hasOwnProperty("a") && (t = i.a)), t = yi(t), {
2464
+ return typeof i == "string" && (i = la(i)), et(i) == "object" && (se(i.r) && se(i.g) && se(i.b) ? (e = Yn(i.r, i.g, i.b), r = !0, o = String(i.r).substr(-1) === "%" ? "prgb" : "rgb") : se(i.h) && se(i.s) && se(i.v) ? (s = ke(i.s), n = ke(i.v), e = jn(i.h, s, n), r = !0, o = "hsv") : se(i.h) && se(i.s) && se(i.l) && (s = ke(i.s), a = ke(i.l), e = Wn(i.h, s, a), r = !0, o = "hsl"), i.hasOwnProperty("a") && (t = i.a)), t = yi(t), {
2465
2465
  ok: r,
2466
2466
  format: i.format || o,
2467
2467
  r: Math.min(255, Math.max(e.r, 0)),
@@ -2556,22 +2556,22 @@ function jn(i, e, t) {
2556
2556
  };
2557
2557
  }
2558
2558
  function hi(i, e, t, s) {
2559
- var n = [K(Math.round(i).toString(16)), K(Math.round(e).toString(16)), K(Math.round(t).toString(16))];
2559
+ var n = [Q(Math.round(i).toString(16)), Q(Math.round(e).toString(16)), Q(Math.round(t).toString(16))];
2560
2560
  return s && n[0].charAt(0) == n[0].charAt(1) && n[1].charAt(0) == n[1].charAt(1) && n[2].charAt(0) == n[2].charAt(1) ? n[0].charAt(0) + n[1].charAt(0) + n[2].charAt(0) : n.join("");
2561
2561
  }
2562
2562
  function Xn(i, e, t, s, n) {
2563
- var a = [K(Math.round(i).toString(16)), K(Math.round(e).toString(16)), K(Math.round(t).toString(16)), K(wi(s))];
2563
+ var a = [Q(Math.round(i).toString(16)), Q(Math.round(e).toString(16)), Q(Math.round(t).toString(16)), Q(wi(s))];
2564
2564
  return n && a[0].charAt(0) == a[0].charAt(1) && a[1].charAt(0) == a[1].charAt(1) && a[2].charAt(0) == a[2].charAt(1) && a[3].charAt(0) == a[3].charAt(1) ? a[0].charAt(0) + a[1].charAt(0) + a[2].charAt(0) + a[3].charAt(0) : a.join("");
2565
2565
  }
2566
2566
  function di(i, e, t, s) {
2567
- var n = [K(wi(s)), K(Math.round(i).toString(16)), K(Math.round(e).toString(16)), K(Math.round(t).toString(16))];
2567
+ var n = [Q(wi(s)), Q(Math.round(i).toString(16)), Q(Math.round(e).toString(16)), Q(Math.round(t).toString(16))];
2568
2568
  return n.join("");
2569
2569
  }
2570
- A.equals = function(i, e) {
2571
- return !i || !e ? !1 : A(i).toRgbString() == A(e).toRgbString();
2570
+ M.equals = function(i, e) {
2571
+ return !i || !e ? !1 : M(i).toRgbString() == M(e).toRgbString();
2572
2572
  };
2573
- A.random = function() {
2574
- return A.fromRatio({
2573
+ M.random = function() {
2574
+ return M.fromRatio({
2575
2575
  r: Math.random(),
2576
2576
  g: Math.random(),
2577
2577
  b: Math.random()
@@ -2579,45 +2579,45 @@ A.random = function() {
2579
2579
  };
2580
2580
  function Un(i, e) {
2581
2581
  e = e === 0 ? 0 : e || 10;
2582
- var t = A(i).toHsl();
2583
- return t.s -= e / 100, t.s = it(t.s), A(t);
2582
+ var t = M(i).toHsl();
2583
+ return t.s -= e / 100, t.s = it(t.s), M(t);
2584
2584
  }
2585
2585
  function Gn(i, e) {
2586
2586
  e = e === 0 ? 0 : e || 10;
2587
- var t = A(i).toHsl();
2588
- return t.s += e / 100, t.s = it(t.s), A(t);
2587
+ var t = M(i).toHsl();
2588
+ return t.s += e / 100, t.s = it(t.s), M(t);
2589
2589
  }
2590
2590
  function Zn(i) {
2591
- return A(i).desaturate(100);
2591
+ return M(i).desaturate(100);
2592
2592
  }
2593
2593
  function qn(i, e) {
2594
2594
  e = e === 0 ? 0 : e || 10;
2595
- var t = A(i).toHsl();
2596
- return t.l += e / 100, t.l = it(t.l), A(t);
2595
+ var t = M(i).toHsl();
2596
+ return t.l += e / 100, t.l = it(t.l), M(t);
2597
2597
  }
2598
2598
  function Jn(i, e) {
2599
2599
  e = e === 0 ? 0 : e || 10;
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);
2600
+ var t = M(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)))), M(t);
2602
2602
  }
2603
2603
  function Qn(i, e) {
2604
2604
  e = e === 0 ? 0 : e || 10;
2605
- var t = A(i).toHsl();
2606
- return t.l -= e / 100, t.l = it(t.l), A(t);
2605
+ var t = M(i).toHsl();
2606
+ return t.l -= e / 100, t.l = it(t.l), M(t);
2607
2607
  }
2608
2608
  function Kn(i, e) {
2609
- var t = A(i).toHsl(), s = (t.h + e) % 360;
2610
- return t.h = s < 0 ? 360 + s : s, A(t);
2609
+ var t = M(i).toHsl(), s = (t.h + e) % 360;
2610
+ return t.h = s < 0 ? 360 + s : s, M(t);
2611
2611
  }
2612
2612
  function ea(i) {
2613
- var e = A(i).toHsl();
2614
- return e.h = (e.h + 180) % 360, A(e);
2613
+ var e = M(i).toHsl();
2614
+ return e.h = (e.h + 180) % 360, M(e);
2615
2615
  }
2616
2616
  function ui(i, e) {
2617
2617
  if (isNaN(e) || e <= 0)
2618
2618
  throw new Error("Argument to polyad must be a positive number");
2619
- for (var t = A(i).toHsl(), s = [A(i)], n = 360 / e, a = 1; a < e; a++)
2620
- s.push(A({
2619
+ for (var t = M(i).toHsl(), s = [M(i)], n = 360 / e, a = 1; a < e; a++)
2620
+ s.push(M({
2621
2621
  h: (t.h + a * n) % 360,
2622
2622
  s: t.s,
2623
2623
  l: t.l
@@ -2625,12 +2625,12 @@ function ui(i, e) {
2625
2625
  return s;
2626
2626
  }
2627
2627
  function ta(i) {
2628
- var e = A(i).toHsl(), t = e.h;
2629
- return [A(i), A({
2628
+ var e = M(i).toHsl(), t = e.h;
2629
+ return [M(i), M({
2630
2630
  h: (t + 72) % 360,
2631
2631
  s: e.s,
2632
2632
  l: e.l
2633
- }), A({
2633
+ }), M({
2634
2634
  h: (t + 216) % 360,
2635
2635
  s: e.s,
2636
2636
  l: e.l
@@ -2638,37 +2638,37 @@ function ta(i) {
2638
2638
  }
2639
2639
  function ia(i, e, t) {
2640
2640
  e = e || 6, t = t || 30;
2641
- var s = A(i).toHsl(), n = 360 / t, a = [A(i)];
2641
+ var s = M(i).toHsl(), n = 360 / t, a = [M(i)];
2642
2642
  for (s.h = (s.h - (n * e >> 1) + 720) % 360; --e; )
2643
- s.h = (s.h + n) % 360, a.push(A(s));
2643
+ s.h = (s.h + n) % 360, a.push(M(s));
2644
2644
  return a;
2645
2645
  }
2646
2646
  function sa(i, e) {
2647
2647
  e = e || 6;
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({
2648
+ for (var t = M(i).toHsv(), s = t.h, n = t.s, a = t.v, r = [], o = 1 / e; e--; )
2649
+ r.push(M({
2650
2650
  h: s,
2651
2651
  s: n,
2652
2652
  v: a
2653
2653
  })), a = (a + o) % 1;
2654
2654
  return r;
2655
2655
  }
2656
- A.mix = function(i, e, t) {
2656
+ M.mix = function(i, e, t) {
2657
2657
  t = t === 0 ? 0 : t || 50;
2658
- var s = A(i).toRgb(), n = A(e).toRgb(), a = t / 100, r = {
2658
+ var s = M(i).toRgb(), n = M(e).toRgb(), a = t / 100, r = {
2659
2659
  r: (n.r - s.r) * a + s.r,
2660
2660
  g: (n.g - s.g) * a + s.g,
2661
2661
  b: (n.b - s.b) * a + s.b,
2662
2662
  a: (n.a - s.a) * a + s.a
2663
2663
  };
2664
- return A(r);
2664
+ return M(r);
2665
2665
  };
2666
- A.readability = function(i, e) {
2667
- var t = A(i), s = A(e);
2666
+ M.readability = function(i, e) {
2667
+ var t = M(i), s = M(e);
2668
2668
  return (Math.max(t.getLuminance(), s.getLuminance()) + 0.05) / (Math.min(t.getLuminance(), s.getLuminance()) + 0.05);
2669
2669
  };
2670
- A.isReadable = function(i, e, t) {
2671
- var s = A.readability(i, e), n, a;
2670
+ M.isReadable = function(i, e, t) {
2671
+ var s = M.readability(i, e), n, a;
2672
2672
  switch (a = !1, n = ca(t), n.level + n.size) {
2673
2673
  case "AAsmall":
2674
2674
  case "AAAlarge":
@@ -2683,17 +2683,17 @@ A.isReadable = function(i, e, t) {
2683
2683
  }
2684
2684
  return a;
2685
2685
  };
2686
- A.mostReadable = function(i, e, t) {
2686
+ M.mostReadable = function(i, e, t) {
2687
2687
  var s = null, n = 0, a, r, o, c;
2688
2688
  t = t || {}, r = t.includeFallbackColors, o = t.level, c = t.size;
2689
2689
  for (var h = 0; h < e.length; h++)
2690
- a = A.readability(i, e[h]), a > n && (n = a, s = A(e[h]));
2691
- return A.isReadable(i, s, {
2690
+ a = M.readability(i, e[h]), a > n && (n = a, s = M(e[h]));
2691
+ return M.isReadable(i, s, {
2692
2692
  level: o,
2693
2693
  size: c
2694
- }) || !r ? s : (t.includeFallbackColors = !1, A.mostReadable(i, ["#fff", "#000"], t));
2694
+ }) || !r ? s : (t.includeFallbackColors = !1, M.mostReadable(i, ["#fff", "#000"], t));
2695
2695
  };
2696
- var Tt = A.names = {
2696
+ var At = M.names = {
2697
2697
  aliceblue: "f0f8ff",
2698
2698
  antiquewhite: "faebd7",
2699
2699
  aqua: "0ff",
@@ -2843,7 +2843,7 @@ var Tt = A.names = {
2843
2843
  whitesmoke: "f5f5f5",
2844
2844
  yellow: "ff0",
2845
2845
  yellowgreen: "9acd32"
2846
- }, na = A.hexNames = aa(Tt);
2846
+ }, na = M.hexNames = aa(At);
2847
2847
  function aa(i) {
2848
2848
  var e = {};
2849
2849
  for (var t in i)
@@ -2861,7 +2861,7 @@ function R(i, e) {
2861
2861
  function it(i) {
2862
2862
  return Math.min(1, Math.max(0, i));
2863
2863
  }
2864
- function j(i) {
2864
+ function W(i) {
2865
2865
  return parseInt(i, 16);
2866
2866
  }
2867
2867
  function ra(i) {
@@ -2870,19 +2870,19 @@ function ra(i) {
2870
2870
  function oa(i) {
2871
2871
  return typeof i == "string" && i.indexOf("%") != -1;
2872
2872
  }
2873
- function K(i) {
2873
+ function Q(i) {
2874
2874
  return i.length == 1 ? "0" + i : "" + i;
2875
2875
  }
2876
- function De(i) {
2876
+ function ke(i) {
2877
2877
  return i <= 1 && (i = i * 100 + "%"), i;
2878
2878
  }
2879
2879
  function wi(i) {
2880
2880
  return Math.round(parseFloat(i) * 255).toString(16);
2881
2881
  }
2882
2882
  function fi(i) {
2883
- return j(i) / 255;
2883
+ return W(i) / 255;
2884
2884
  }
2885
- var Q = function() {
2885
+ var J = function() {
2886
2886
  var i = "[-\\+]?\\d+%?", e = "[-\\+]?\\d*\\.\\d+%?", t = "(?:" + e + ")|(?:" + i + ")", s = "[\\s|\\(]+(" + t + ")[,|\\s]+(" + t + ")[,|\\s]+(" + t + ")\\s*\\)?", n = "[\\s|\\(]+(" + t + ")[,|\\s]+(" + t + ")[,|\\s]+(" + t + ")[,|\\s]+(" + t + ")\\s*\\)?";
2887
2887
  return {
2888
2888
  CSS_UNIT: new RegExp(t),
@@ -2898,14 +2898,14 @@ var Q = function() {
2898
2898
  hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
2899
2899
  };
2900
2900
  }();
2901
- function ie(i) {
2902
- return !!Q.CSS_UNIT.exec(i);
2901
+ function se(i) {
2902
+ return !!J.CSS_UNIT.exec(i);
2903
2903
  }
2904
2904
  function la(i) {
2905
2905
  i = i.replace(Pn, "").replace(zn, "").toLowerCase();
2906
2906
  var e = !1;
2907
- if (Tt[i])
2908
- i = Tt[i], e = !0;
2907
+ if (At[i])
2908
+ i = At[i], e = !0;
2909
2909
  else if (i == "transparent")
2910
2910
  return {
2911
2911
  r: 0,
@@ -2915,54 +2915,54 @@ function la(i) {
2915
2915
  format: "name"
2916
2916
  };
2917
2917
  var t;
2918
- return (t = Q.rgb.exec(i)) ? {
2918
+ return (t = J.rgb.exec(i)) ? {
2919
2919
  r: t[1],
2920
2920
  g: t[2],
2921
2921
  b: t[3]
2922
- } : (t = Q.rgba.exec(i)) ? {
2922
+ } : (t = J.rgba.exec(i)) ? {
2923
2923
  r: t[1],
2924
2924
  g: t[2],
2925
2925
  b: t[3],
2926
2926
  a: t[4]
2927
- } : (t = Q.hsl.exec(i)) ? {
2927
+ } : (t = J.hsl.exec(i)) ? {
2928
2928
  h: t[1],
2929
2929
  s: t[2],
2930
2930
  l: t[3]
2931
- } : (t = Q.hsla.exec(i)) ? {
2931
+ } : (t = J.hsla.exec(i)) ? {
2932
2932
  h: t[1],
2933
2933
  s: t[2],
2934
2934
  l: t[3],
2935
2935
  a: t[4]
2936
- } : (t = Q.hsv.exec(i)) ? {
2936
+ } : (t = J.hsv.exec(i)) ? {
2937
2937
  h: t[1],
2938
2938
  s: t[2],
2939
2939
  v: t[3]
2940
- } : (t = Q.hsva.exec(i)) ? {
2940
+ } : (t = J.hsva.exec(i)) ? {
2941
2941
  h: t[1],
2942
2942
  s: t[2],
2943
2943
  v: t[3],
2944
2944
  a: t[4]
2945
- } : (t = Q.hex8.exec(i)) ? {
2946
- r: j(t[1]),
2947
- g: j(t[2]),
2948
- b: j(t[3]),
2945
+ } : (t = J.hex8.exec(i)) ? {
2946
+ r: W(t[1]),
2947
+ g: W(t[2]),
2948
+ b: W(t[3]),
2949
2949
  a: fi(t[4]),
2950
2950
  format: e ? "name" : "hex8"
2951
- } : (t = Q.hex6.exec(i)) ? {
2952
- r: j(t[1]),
2953
- g: j(t[2]),
2954
- b: j(t[3]),
2951
+ } : (t = J.hex6.exec(i)) ? {
2952
+ r: W(t[1]),
2953
+ g: W(t[2]),
2954
+ b: W(t[3]),
2955
2955
  format: e ? "name" : "hex"
2956
- } : (t = Q.hex4.exec(i)) ? {
2957
- r: j(t[1] + "" + t[1]),
2958
- g: j(t[2] + "" + t[2]),
2959
- b: j(t[3] + "" + t[3]),
2956
+ } : (t = J.hex4.exec(i)) ? {
2957
+ r: W(t[1] + "" + t[1]),
2958
+ g: W(t[2] + "" + t[2]),
2959
+ b: W(t[3] + "" + t[3]),
2960
2960
  a: fi(t[4] + "" + t[4]),
2961
2961
  format: e ? "name" : "hex8"
2962
- } : (t = Q.hex3.exec(i)) ? {
2963
- r: j(t[1] + "" + t[1]),
2964
- g: j(t[2] + "" + t[2]),
2965
- b: j(t[3] + "" + t[3]),
2962
+ } : (t = J.hex3.exec(i)) ? {
2963
+ r: W(t[1] + "" + t[1]),
2964
+ g: W(t[2] + "" + t[2]),
2965
+ b: W(t[3] + "" + t[3]),
2966
2966
  format: e ? "name" : "hex"
2967
2967
  } : !1;
2968
2968
  }
@@ -2991,12 +2991,12 @@ function ha(i, e) {
2991
2991
  const p = s.convert(g.open_time);
2992
2992
  _.forEach((v) => {
2993
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;
2994
- let M = b ? o.buyLabel.main : o.sellLabel.main;
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, {
2994
+ let S = b ? o.buyLabel.main : o.sellLabel.main;
2995
+ h && h[1] && h[0] === v.type && (S = M.mix(S, a.bg, 20).toString()), d && d[1] && d[0] === v.type && (S = o.activeLabel), C(i, {
2996
2996
  x: p,
2997
2997
  y,
2998
2998
  symbol: x,
2999
- mainColor: M,
2999
+ mainColor: S,
3000
3000
  textColor: w,
3001
3001
  size: 16,
3002
3002
  fontSize: 12
@@ -3108,27 +3108,29 @@ const ma = 10, pa = 6, _a = 4, va = 12, ba = (i, e) => {
3108
3108
  if (!c) return;
3109
3109
  const _ = n.at(0), p = a.at(-1);
3110
3110
  if (!_ || !p) return;
3111
- const v = (Y) => Y ? Y instanceof Date ? Y : new Date(Y) : null, b = t.convert(v(d == null ? void 0 : d[0]) || _.candle.open_time), w = t.convert(v(d == null ? void 0 : d[1]) || p.candle.open_time), x = s.convert(g || (((V = n.at(0)) == null ? void 0 : V.price) ?? 0));
3112
- i.beginPath(), i.setLineDash([4, 4]), i.strokeStyle = o.main, i.moveTo(b, x), i.lineTo(w, x), i.stroke(), i.setLineDash([]);
3113
- const y = (b + w) / 2, C = h || `Hold: ${ga(r)}`, S = getComputedStyle(
3111
+ const v = (O) => O ? O instanceof Date ? O : new Date(O) : null, b = v(d == null ? void 0 : d[0]) || _.candle.open_time, w = v(d == null ? void 0 : d[1]) || p.candle.close_time, x = t.convert(v(d == null ? void 0 : d[0]) || _.candle.open_time), y = t.convert(v(d == null ? void 0 : d[1]) || p.candle.open_time), C = e.candles.allData.filter(
3112
+ (O) => O.open_time <= w && O.close_time >= b
3113
+ ), S = C.length > 0 ? C.reduce((O, oe) => oe.low < O ? oe.low : O, C[0].low) : ((V = n.at(0)) == null ? void 0 : V.price) ?? 0, T = s.convert(g || S);
3114
+ i.beginPath(), i.setLineDash([4, 4]), i.strokeStyle = o.main, i.moveTo(x, T), i.lineTo(y, T), i.stroke(), i.setLineDash([]);
3115
+ const N = (x + y) / 2, $ = h || `Hold: ${ga(r)}`, U = getComputedStyle(
3114
3116
  document.querySelector(".sc-charts-cs") || document.body
3115
3117
  ).font.replace(/^\s*\S+/, "").trim();
3116
- i.font = `600 ${ma}px ${S}`;
3117
- const $ = i.measureText(C).width + pa * 2, z = va + _a * 2;
3118
+ i.font = `600 ${ma}px ${U}`;
3119
+ const K = i.measureText($).width + pa * 2, z = va + _a * 2;
3118
3120
  xi(i, {
3119
3121
  radius: 4,
3120
3122
  coords: {
3121
- x: y - $ / 2,
3122
- y: x - z / 2
3123
+ x: N - K / 2,
3124
+ y: T - z / 2
3123
3125
  },
3124
- width: $,
3126
+ width: K,
3125
3127
  height: z,
3126
3128
  fillColor: o.main
3127
- }), i.fillStyle = o.text, i.textBaseline = "middle", i.textAlign = "center", i.fillText(C, y, x), i.restore();
3129
+ }), i.fillStyle = o.text, i.textBaseline = "middle", i.textAlign = "center", i.fillText($, N, T), i.restore();
3128
3130
  };
3129
- class Ne {
3131
+ class Fe {
3130
3132
  constructor(e, t, {
3131
- CanvasClass: s = Ee,
3133
+ CanvasClass: s = Ne,
3132
3134
  noCanvas: n = !1,
3133
3135
  noDOM: a = !1
3134
3136
  } = {}) {
@@ -3158,18 +3160,18 @@ const ya = {
3158
3160
  offset: n = 8
3159
3161
  }) => {
3160
3162
  const { width: a, height: r } = i, o = e.right - e.left, c = e.bottom - e.top, h = (y) => {
3161
- const { dx: C, dy: M } = ya[y], S = t.x + (C === 1 ? n : -a - n), N = t.y + (M === 1 ? n : -r - n);
3162
- return { x: S, y: N, side: y };
3163
+ const { dx: C, dy: S } = ya[y], T = t.x + (C === 1 ? n : -a - n), N = t.y + (S === 1 ? n : -r - n);
3164
+ return { x: T, y: N, side: y };
3163
3165
  }, d = ({ x: y, y: C }) => y >= 0 && C >= 0 && y + a <= o && C + r <= c, g = () => {
3164
- const y = t.y < 0, C = t.y + r > c, M = t.x < 0, S = t.x + a > o;
3165
- return M && y ? "right-bottom" : M && C ? "right-top" : S && y ? "left-bottom" : S && C ? "left-top" : M ? "right-bottom" : S ? "left-bottom" : y ? "right-bottom" : C ? "right-top" : s;
3166
+ const y = t.y < 0, C = t.y + r > c, S = t.x < 0, T = t.x + a > o;
3167
+ return S && y ? "right-bottom" : S && C ? "right-top" : T && y ? "left-bottom" : T && C ? "left-top" : S ? "right-bottom" : T ? "left-bottom" : y ? "right-bottom" : C ? "right-top" : s;
3166
3168
  }, p = [
3167
3169
  s,
3168
3170
  "right-bottom",
3169
3171
  "right-top",
3170
3172
  "left-bottom",
3171
3173
  "left-top"
3172
- ].filter((y, C, M) => M.indexOf(y) === C), v = g();
3174
+ ].filter((y, C, S) => S.indexOf(y) === C), v = g();
3173
3175
  let b = null;
3174
3176
  for (const y of [v, ...p]) {
3175
3177
  const C = h(y);
@@ -3186,7 +3188,7 @@ const ya = {
3186
3188
  side: b.side
3187
3189
  };
3188
3190
  };
3189
- class se extends k {
3191
+ class ne extends k {
3190
3192
  constructor(t) {
3191
3193
  super(t);
3192
3194
  f(this, "_state", {});
@@ -3221,7 +3223,7 @@ class se extends k {
3221
3223
  this._scheduleUpdate();
3222
3224
  }
3223
3225
  }
3224
- class wa extends se {
3226
+ class wa extends ne {
3225
3227
  constructor(t) {
3226
3228
  const s = "label-tooltip";
3227
3229
  super({ className: t.cx(s) });
@@ -3238,7 +3240,7 @@ class wa extends se {
3238
3240
  }), this.oneBox = new k({
3239
3241
  tag: "div",
3240
3242
  className: this.clsx("box_one")
3241
- }), t.dom.append(this.title.node, this.oneBox.node, this.manyBox.node), this.state = { isShow: !1, x: 0, y: 0, parent: X.empty() };
3243
+ }), t.dom.append(this.title.node, this.oneBox.node, this.manyBox.node), this.state = { isShow: !1, x: 0, y: 0, parent: j.empty() };
3242
3244
  }
3243
3245
  _createLineNodes(t, s) {
3244
3246
  const n = [];
@@ -3301,7 +3303,7 @@ class wa extends se {
3301
3303
  this.position(r.x, r.y);
3302
3304
  }
3303
3305
  }
3304
- class xa extends Ne {
3306
+ class xa extends Fe {
3305
3307
  constructor(t) {
3306
3308
  super("trade", t);
3307
3309
  f(this, "labelTooltip");
@@ -3316,7 +3318,7 @@ class xa extends Ne {
3316
3318
  function Ca(i, { color: e = "#000000", lineWidth: t = 1, dashed: s, coords: n }) {
3317
3319
  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();
3318
3320
  }
3319
- const Ta = { text: "#FFFFFF", bg: "#000000" }, Aa = (i, e) => {
3321
+ const Aa = { text: "#FFFFFF", bg: "#000000" }, Ma = (i, e) => {
3320
3322
  const {
3321
3323
  coords: t,
3322
3324
  text: s,
@@ -3327,7 +3329,7 @@ const Ta = { text: "#FFFFFF", bg: "#000000" }, Aa = (i, e) => {
3327
3329
  borderRadius: c = 0,
3328
3330
  colors: h,
3329
3331
  align: d = { x: "left", y: "top" }
3330
- } = e, g = { ...Ta, ...h }, p = getComputedStyle(
3332
+ } = e, g = { ...Aa, ...h }, p = getComputedStyle(
3331
3333
  document.querySelector(".sc-charts-cs") || document.body
3332
3334
  ).font.replace(/^\s*\S+/, "").trim();
3333
3335
  i.font = `${a} ${n}px ${p}`;
@@ -3358,7 +3360,7 @@ const Ta = { text: "#FFFFFF", bg: "#000000" }, Aa = (i, e) => {
3358
3360
  x2: r.x,
3359
3361
  y2: r.y
3360
3362
  }
3361
- }), Aa(i, {
3363
+ }), Ma(i, {
3362
3364
  text: e,
3363
3365
  coords: r,
3364
3366
  padding: { x: 6, y: 4 },
@@ -3375,7 +3377,7 @@ const Ta = { text: "#FFFFFF", bg: "#000000" }, Aa = (i, e) => {
3375
3377
  }
3376
3378
  }), i.restore();
3377
3379
  };
3378
- class Ma extends Ee {
3380
+ class Sa extends Ne {
3379
3381
  constructor(e) {
3380
3382
  super(e);
3381
3383
  }
@@ -3383,9 +3385,9 @@ class Ma extends Ee {
3383
3385
  Ci(this.ctx, e);
3384
3386
  }
3385
3387
  }
3386
- class Sa extends Ne {
3388
+ class Ta extends Fe {
3387
3389
  constructor(e) {
3388
- if (super("user-markers", e, { CanvasClass: Ma, noDOM: !0 }), !this.canvas) throw new Error("[CS_V_UserMarkers] this.canvas must be defined");
3390
+ if (super("user-markers", e, { CanvasClass: Sa, noDOM: !0 }), !this.canvas) throw new Error("[CS_V_UserMarkers] this.canvas must be defined");
3389
3391
  }
3390
3392
  render(e) {
3391
3393
  this.canvas.clear();
@@ -3414,7 +3416,7 @@ class Sa extends Ne {
3414
3416
  }
3415
3417
  }
3416
3418
  const Da = "sc-charts-cs";
3417
- class ae {
3419
+ class re {
3418
3420
  constructor(e) {
3419
3421
  f(this, "block");
3420
3422
  this.block = e;
@@ -3423,7 +3425,7 @@ class ae {
3423
3425
  return `${Da}__${this.block}${e ? "-" + e : ""}`;
3424
3426
  }
3425
3427
  }
3426
- const yt = new ae("comment-actions");
3428
+ const yt = new re("comment-actions");
3427
3429
  class ka extends k {
3428
3430
  constructor({ onDelete: e, onUpdate: t }) {
3429
3431
  super({ className: yt.gen() });
@@ -3494,19 +3496,19 @@ class La {
3494
3496
  this.node = t;
3495
3497
  }
3496
3498
  }
3497
- const Me = new ae("comment-list");
3499
+ const Te = new re("comment-list");
3498
3500
  class Ea extends k {
3499
3501
  constructor({ onDelete: t, onOpenEditor: s, comment: n, layout: a }) {
3500
- super({ className: Me.gen("item") });
3502
+ super({ className: Te.gen("item") });
3501
3503
  f(this, "actionTooltip");
3502
3504
  f(this, "actionsTrigger");
3503
- const r = new k({ className: Me.gen("text"), textContent: n.text }), o = new k({
3504
- className: Me.gen("created-at"),
3505
+ const r = new k({ className: Te.gen("text"), textContent: n.text }), o = new k({
3506
+ className: Te.gen("created-at"),
3505
3507
  textContent: fa(new Date(n.createdAt))
3506
3508
  });
3507
3509
  this.actionsTrigger = new k({
3508
3510
  tag: "button",
3509
- className: Me.gen("action-trigger")
3511
+ className: Te.gen("action-trigger")
3510
3512
  });
3511
3513
  const c = new ka({
3512
3514
  onDelete: t,
@@ -3517,7 +3519,7 @@ class Ea extends k {
3517
3519
  }), this.actionsTrigger.node.addEventListener("click", () => {
3518
3520
  this.actionsTrigger.updateAbsolutePosition(), this.actionTooltip.updateAbsolutePosition(), this.actionTooltip.node.style.top = this.actionsTrigger.absolutePosition.top - a.chart.top + 20 + "px", this.actionTooltip.node.style.left = this.actionsTrigger.absolutePosition.left - a.chart.left - this.actionTooltip.absolutePosition.width + 10 + "px", this.actionTooltip.setVisible(!0);
3519
3521
  });
3520
- const h = new k({ className: Me.gen("text-wrap") });
3522
+ const h = new k({ className: Te.gen("text-wrap") });
3521
3523
  this.actionTooltip.node.setAttribute("id", `ac-${n.id}`), h.append(r.node, this.actionsTrigger.node), this.actionsTrigger.append(new La().node), this.append(h.node, o.node);
3522
3524
  }
3523
3525
  }
@@ -3545,7 +3547,7 @@ class Fa {
3545
3547
  ), s.setAttribute("fill", "currentColor"), t.appendChild(s), this.node = t;
3546
3548
  }
3547
3549
  }
3548
- class Ha extends se {
3550
+ class Ha extends ne {
3549
3551
  constructor(t) {
3550
3552
  super({ className: "sc-charts-cs__comments-edit" });
3551
3553
  f(this, "input");
@@ -3575,8 +3577,8 @@ class Ha extends se {
3575
3577
  this.input.node.value = this.state.inputValue, this.saveBtn.node.disabled = !this.state.inputValue.trim(), this.state.hasInitFocused || (requestAnimationFrame(() => this.input.node.focus()), this.setState({ hasInitFocused: !0 }));
3576
3578
  }
3577
3579
  }
3578
- const Ba = new ae("comment-list");
3579
- class Ia extends se {
3580
+ const Ba = new re("comment-list");
3581
+ class Ia extends ne {
3580
3582
  constructor(t, s, n, a = {}) {
3581
3583
  super({ tag: "ul", className: Ba.gen(), ...a });
3582
3584
  f(this, "_elements", {});
@@ -3631,8 +3633,8 @@ class Ra {
3631
3633
  ), s.setAttribute("stroke", "currentColor"), s.setAttribute("stroke-linecap", "round"), s.setAttribute("stroke-linejoin", "round"), t.appendChild(s), this.node = t;
3632
3634
  }
3633
3635
  }
3634
- const Je = new ae(""), wt = new ae("add-field");
3635
- class Ti extends se {
3636
+ const Je = new re(""), wt = new re("add-field");
3637
+ class Ai extends ne {
3636
3638
  constructor({ onAdd: t, blockName: s }) {
3637
3639
  Je.block = s;
3638
3640
  super({ className: Je.gen() + " " + wt.gen() });
@@ -3664,8 +3666,8 @@ class Ti extends se {
3664
3666
  this.btn.node.disabled = !this.state.inputValue.trim();
3665
3667
  }
3666
3668
  }
3667
- const $a = new ae("list-tooltip"), xt = 8;
3668
- class Oa extends se {
3669
+ const $a = new re("list-tooltip"), xt = 8;
3670
+ class Oa extends ne {
3669
3671
  constructor(t, s, n) {
3670
3672
  super({ className: $a.gen() });
3671
3673
  f(this, "_list");
@@ -3673,7 +3675,7 @@ class Oa extends se {
3673
3675
  f(this, "_size", null);
3674
3676
  f(this, "_model");
3675
3677
  f(this, "_prevIsShow", !1);
3676
- this._model = s, this.state = { isShow: !1, comments: t }, this._list = new Ia(t, s, n), this._addField = new Ti({
3678
+ this._model = s, this.state = { isShow: !1, comments: t }, this._list = new Ia(t, s, n), this._addField = new Ai({
3677
3679
  blockName: "list-tooltip-add",
3678
3680
  onAdd: (a) => {
3679
3681
  const r = t[0].date, o = t[0].price, c = {
@@ -3709,7 +3711,7 @@ class Pa {
3709
3711
  ), s.setAttribute("fill", "currentColor"), t.appendChild(s), this.node = t;
3710
3712
  }
3711
3713
  }
3712
- class za extends se {
3714
+ class za extends ne {
3713
3715
  constructor({ x: t, ...s }, n) {
3714
3716
  super(s);
3715
3717
  f(this, "_colors");
@@ -3726,8 +3728,8 @@ class za extends se {
3726
3728
  this.node.style.backgroundColor = this._colors[`bg${a}`], this.node.style.color = this._colors[`icon${a}`];
3727
3729
  }
3728
3730
  }
3729
- const mi = new ae("comment-box");
3730
- class Va extends se {
3731
+ const mi = new re("comment-box");
3732
+ class Va extends ne {
3731
3733
  constructor({ boxId: t, model: s, view: n, comments: a, coords: r, onBoxActivate: o, onBoxDeactivate: c }) {
3732
3734
  super({ className: mi.gen() });
3733
3735
  f(this, "pointer", new k({ className: "sc-charts-cs__comments-pointer" }));
@@ -3765,8 +3767,8 @@ class Ya {
3765
3767
  this.animateTo(e, a, r, n);
3766
3768
  }
3767
3769
  }
3768
- const Ct = new ae("comments-context");
3769
- class Wa extends se {
3770
+ const Ct = new re("comments-context");
3771
+ class Wa extends ne {
3770
3772
  constructor() {
3771
3773
  super({ className: Ct.gen() });
3772
3774
  f(this, "pointer");
@@ -3777,7 +3779,7 @@ class Wa extends se {
3777
3779
  f(this, "_candle", null);
3778
3780
  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, () => {
3779
3781
  this.setState({ isShow: !1 });
3780
- }), this.addField = new Ti({
3782
+ }), this.addField = new Ai({
3781
3783
  blockName: "context-add",
3782
3784
  onAdd: (t) => {
3783
3785
  !this._model || !this._candle || (this._model.comments.add({
@@ -3811,7 +3813,7 @@ class Wa extends se {
3811
3813
  this._changeInputCorner(r.side), this.menu.position(r.x, r.y);
3812
3814
  }
3813
3815
  }
3814
- class ja extends Ne {
3816
+ class ja extends Fe {
3815
3817
  constructor(t) {
3816
3818
  super("comments", t, { noCanvas: !0 });
3817
3819
  f(this, "boxes", {});
@@ -3852,7 +3854,7 @@ class ja extends Ne {
3852
3854
  });
3853
3855
  }
3854
3856
  }
3855
- class Xa extends Ee {
3857
+ class Xa extends Ne {
3856
3858
  constructor(e) {
3857
3859
  super(e);
3858
3860
  }
@@ -3867,7 +3869,7 @@ class Xa extends Ee {
3867
3869
  });
3868
3870
  }
3869
3871
  }
3870
- class Ua extends Ne {
3872
+ class Ua extends Fe {
3871
3873
  constructor(e) {
3872
3874
  if (super("guides", e, { CanvasClass: Xa, noDOM: !0 }), !this.canvas) throw new Error("[CS_V_Guides] Canvas must be defined");
3873
3875
  }
@@ -3896,12 +3898,12 @@ class Ua extends Ne {
3896
3898
  }
3897
3899
  }
3898
3900
  }
3899
- class Ga extends se {
3901
+ class Ga extends ne {
3900
3902
  constructor(t) {
3901
3903
  super({ className: t });
3902
3904
  f(this, "_isFirstShow", !1);
3903
3905
  const s = new k({ tag: "p" });
3904
- s.node.textContent = "No data from broker", this.append(s.node), this.state = { isShow: !1, x: 0, y: 0, parent: X.empty() }, this.render();
3906
+ s.node.textContent = "No data from broker", this.append(s.node), this.state = { isShow: !1, x: 0, y: 0, parent: j.empty() }, this.render();
3905
3907
  }
3906
3908
  render() {
3907
3909
  const { isShow: t, x: s, y: n, parent: a } = this.state;
@@ -3914,7 +3916,7 @@ class Ga extends se {
3914
3916
  this.position(r.x, r.y);
3915
3917
  }
3916
3918
  }
3917
- class Za extends Ee {
3919
+ class Za extends Ne {
3918
3920
  constructor(t) {
3919
3921
  super(t);
3920
3922
  f(this, "domain", null);
@@ -3954,7 +3956,7 @@ class Za extends Ee {
3954
3956
  });
3955
3957
  }
3956
3958
  _mix(t, s, n) {
3957
- return n ? A.mix(t, s).toString() : t;
3959
+ return n ? M.mix(t, s).toString() : t;
3958
3960
  }
3959
3961
  _getBasicCandleProps(t, s) {
3960
3962
  return {
@@ -3970,7 +3972,7 @@ class Za extends Ee {
3970
3972
  };
3971
3973
  }
3972
3974
  }
3973
- class qa extends Ne {
3975
+ class qa extends Fe {
3974
3976
  constructor(t) {
3975
3977
  super("candles", t, { CanvasClass: Za });
3976
3978
  f(this, "_noDataTooltip", null);
@@ -4012,12 +4014,12 @@ class Ja {
4012
4014
  f(this, "candles");
4013
4015
  this.container = e, this.wrapper = new k({ tag: "div", className: "sc-charts-cs" }), e.append(this.wrapper.node);
4014
4016
  const { width: t, height: s } = e.getBoundingClientRect();
4015
- this.width = t, this.height = s, this.mainCanvas = new Ee({
4017
+ this.width = t, this.height = s, this.mainCanvas = new Ne({
4016
4018
  className: "sc-charts-cs__canvas-main",
4017
4019
  width: t,
4018
4020
  height: s,
4019
4021
  isMain: !0
4020
- }), this.domElements = new k({ tag: "div", className: "sc-charts-cs__dom-elements" }), this.canvasesContainer = new k({ tag: "div", className: "sc-charts-cs__canvases" }), this.canvasesContainer.append(this.mainCanvas.node), this.wrapper.append(this.canvasesContainer.node, this.domElements.node), this.mainCanvas.updateAbsolutePosition(), this.binding = new Rn(this.mainCanvas.node), this.comments = new ja(this), this.candles = new qa(this), this.trade = new xa(this), this.guideMarkers = new Ua(this), this.userMarkers = new Sa(this);
4022
+ }), this.domElements = new k({ tag: "div", className: "sc-charts-cs__dom-elements" }), this.canvasesContainer = new k({ tag: "div", className: "sc-charts-cs__canvases" }), this.canvasesContainer.append(this.mainCanvas.node), this.wrapper.append(this.canvasesContainer.node, this.domElements.node), this.mainCanvas.updateAbsolutePosition(), this.binding = new Rn(this.mainCanvas.node), this.comments = new ja(this), this.candles = new qa(this), this.trade = new xa(this), this.guideMarkers = new Ua(this), this.userMarkers = new Ta(this);
4021
4023
  }
4022
4024
  renderAll(e) {
4023
4025
  this.mainCanvas.clear(), this.candles.render(e), bt.xAxis(this.mainCanvas.ctx, e), bt.yAxis(this.mainCanvas.ctx, e), bt.intersection(this.mainCanvas.ctx, e), this.trade.renderAll(e), this.userMarkers.render(e), this.comments.render(e);
@@ -4446,11 +4448,11 @@ function cr(i, e) {
4446
4448
  }));
4447
4449
  };
4448
4450
  }
4449
- function At(i, e) {
4451
+ function Mt(i, e) {
4450
4452
  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;
4451
4453
  r > 0 && i.scales.pan("x", -r);
4452
4454
  }
4453
- function Mt(i) {
4455
+ function St(i) {
4454
4456
  return i.candles.limiter.absolutePosition.width > 0;
4455
4457
  }
4456
4458
  class Et {
@@ -4470,7 +4472,7 @@ class hr extends Et {
4470
4472
  register() {
4471
4473
  this._hitManager.on(this._hit, "drag", (t) => {
4472
4474
  const s = t.x - (t.prevX ?? t.x);
4473
- this._model.scales.scale("x", -s), this._view && Mt(this._view) && At(this._model, this._view);
4475
+ this._model.scales.scale("x", -s), this._view && St(this._view) && Mt(this._model, this._view);
4474
4476
  }), this._hitManager.on(this._hit, "dblclick", () => {
4475
4477
  this._model.scales.scale("x", 1, "absolute"), this._model.scales.pan("x", 0, "absolute");
4476
4478
  });
@@ -4508,7 +4510,7 @@ class ur extends Et {
4508
4510
  this._hit,
4509
4511
  "drag",
4510
4512
  cr(1, (t) => {
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 });
4513
+ this._model.scales.pan("x", t.x - (t.prevX ?? t.x)), St(this._view) && Mt(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 });
4512
4514
  })
4513
4515
  ), this._hitManager.on(this._hit, "contextmenu", ({ x: t }) => {
4514
4516
  const s = this._model.scales.x.invert(t), n = Dt.findByDate(s, this._model.candles.allData);
@@ -4517,7 +4519,7 @@ class ur extends Et {
4517
4519
  var a, r;
4518
4520
  if (!t.deltaY) return;
4519
4521
  const s = -t.deltaY, n = (r = (a = this._model.config) == null ? void 0 : a.candles) == null ? void 0 : r.zoomOnWheel;
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);
4522
+ ["x", "both"].includes(n) && (this._model.scales.scale("x", s), St(this._view) && Mt(this._model, this._view)), ["y", "both"].includes(n) && this._model.scales.scale("y", s);
4521
4523
  });
4522
4524
  }
4523
4525
  }
@@ -4703,9 +4705,9 @@ class _r {
4703
4705
  const w = o ? "#878788" : "#8E8E93", x = o ? "#FAFAFA" : "#1C2026";
4704
4706
  let y = h;
4705
4707
  p.forEach((C) => {
4706
- const M = e.measureText(C.label).width, S = e.measureText(C.value).width, N = M + g + S;
4708
+ const S = e.measureText(C.label).width, T = e.measureText(C.value).width, N = S + g + T;
4707
4709
  e.fillStyle = w, e.font = `500 ${d}px Geist, Arial, sans-serif`, e.fillText(C.label, y, v);
4708
- const $ = y + M + g;
4710
+ const $ = y + S + g;
4709
4711
  e.fillStyle = C.valueColor || x, e.font = `500 ${d}px Geist, Arial, sans-serif`, e.fillText(C.value, $, v), y += N + b;
4710
4712
  });
4711
4713
  }
@@ -4724,67 +4726,67 @@ class _r {
4724
4726
  console.warn("No canvas elements found for screenshot");
4725
4727
  return;
4726
4728
  }
4727
- const b = 1440, w = 900, x = 48, y = 20, C = c ? 32 : 0, M = w - x - y - C, S = b, N = _ / p, $ = S / M;
4728
- let z, V, Y = 0, re = 0;
4729
- N > $ ? (V = M, z = V * N, Y = 0, re = 0) : (z = S, V = z / N, re = (M - V) / 2);
4730
- const P = window.devicePixelRatio || 1, U = document.createElement("canvas");
4731
- U.width = b * P, U.height = w * P;
4732
- const G = U.getContext("2d");
4733
- if (!G) {
4729
+ const b = 1440, w = 900, x = 48, y = 20, C = c ? 32 : 0, S = w - x - y - C, T = b, N = _ / p, $ = T / S;
4730
+ let X, U, te = 0, K = 0;
4731
+ N > $ ? (U = S, X = U * N, te = 0, K = 0) : (X = T, U = X / N, K = (S - U) / 2);
4732
+ const z = window.devicePixelRatio || 1, V = document.createElement("canvas");
4733
+ V.width = b * z, V.height = w * z;
4734
+ const O = V.getContext("2d");
4735
+ if (!O) {
4734
4736
  console.error("Failed to get 2D context for merged canvas");
4735
4737
  return;
4736
4738
  }
4737
- G.fillStyle = h ? "#101011" : "#ffffff", G.fillRect(0, 0, U.width, U.height);
4738
- const Fe = x * P, st = y * P, oe = M * P, ve = S * P, be = Fe + st;
4739
- await this._drawHeader(G, U.width, P, h), this._drawHeaderSecondLine(G, r, o, U.width, Fe, P, h);
4739
+ O.fillStyle = h ? "#101011" : "#ffffff", O.fillRect(0, 0, V.width, V.height);
4740
+ const oe = x * z, st = y * z, le = S * z, be = T * z, ye = oe + st;
4741
+ await this._drawHeader(O, V.width, z, h), this._drawHeaderSecondLine(O, r, o, V.width, oe, z, h);
4740
4742
  const He = this._view.mainCanvas;
4741
- He.background && (G.fillStyle = He.background, G.fillRect(0, be, U.width, oe));
4742
- const Be = z * P, Ie = V * P, F = Y * P, Re = re * P;
4743
- v.forEach((O) => {
4744
- let ee = 0, Z = 0, q = O.width, ge = O.height, ye = Be, we = Ie, Oe = F, Pe = Re;
4743
+ He.background && (O.fillStyle = He.background, O.fillRect(0, ye, V.width, le));
4744
+ const Be = X * z, Ie = U * z, F = te * z, Re = K * z;
4745
+ v.forEach((P) => {
4746
+ let ee = 0, G = 0, Z = P.width, me = P.height, we = Be, xe = Ie, Oe = F, Pe = Re;
4745
4747
  if (N > $) {
4746
- const le = Ie / O.height, ce = O.width * le;
4747
- ce > ve && (ee = (ce - ve) / le, q = O.width - ee, ye = ve, Oe = 0);
4748
+ const ce = Ie / P.height, he = P.width * ce;
4749
+ he > be && (ee = (he - be) / ce, Z = P.width - ee, we = be, Oe = 0);
4748
4750
  } else {
4749
- const le = Be / O.width, ce = O.height * le;
4750
- if (ce > oe) {
4751
- const xe = (ce - oe) / le;
4752
- Z = xe / 2, ge = O.height - xe, we = oe, Pe = 0;
4751
+ const ce = Be / P.width, he = P.height * ce;
4752
+ if (he > le) {
4753
+ const Ce = (he - le) / ce;
4754
+ G = Ce / 2, me = P.height - Ce, xe = le, Pe = 0;
4753
4755
  }
4754
4756
  }
4755
- G.drawImage(
4756
- O,
4757
+ O.drawImage(
4758
+ P,
4757
4759
  ee,
4760
+ G,
4758
4761
  Z,
4759
- q,
4760
- ge,
4762
+ me,
4761
4763
  Oe,
4762
- be + Pe,
4763
- ye,
4764
- we
4764
+ ye + Pe,
4765
+ we,
4766
+ xe
4765
4767
  );
4766
- }), c && this._drawFooter(G, c, U.width, be, oe, P, h);
4767
- const $e = (O, ee) => {
4768
- const Z = URL.createObjectURL(O), q = document.createElement("a");
4769
- q.href = Z, q.download = ee, document.body.appendChild(q), q.click(), document.body.removeChild(q), URL.revokeObjectURL(Z);
4768
+ }), c && this._drawFooter(O, c, V.width, ye, le, z, h);
4769
+ const $e = (P, ee) => {
4770
+ const G = URL.createObjectURL(P), Z = document.createElement("a");
4771
+ Z.href = G, Z.download = ee, document.body.appendChild(Z), Z.click(), document.body.removeChild(Z), URL.revokeObjectURL(G);
4770
4772
  };
4771
- U.toBlob(
4772
- async (O) => {
4773
- if (!O) {
4773
+ V.toBlob(
4774
+ async (P) => {
4775
+ if (!P) {
4774
4776
  console.error("Failed to create blob from canvas");
4775
4777
  return;
4776
4778
  }
4777
4779
  if (d)
4778
- $e(O, t);
4780
+ $e(P, t);
4779
4781
  else
4780
4782
  try {
4781
4783
  await navigator.clipboard.write([
4782
4784
  new ClipboardItem({
4783
- "image/png": O
4785
+ "image/png": P
4784
4786
  })
4785
4787
  ]);
4786
4788
  } catch (ee) {
4787
- console.error("Failed to copy to clipboard:", ee), $e(O, t);
4789
+ console.error("Failed to copy to clipboard:", ee), $e(P, t);
4788
4790
  }
4789
4791
  },
4790
4792
  "image/png",