@mozaic-ds/chart 0.1.0-beta.8 → 0.1.0-beta.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -649,11 +649,11 @@ function we(i, t, e, n) {
649
649
  const s = it(i), o = it(t), a = it(e), r = it(o - s), l = it(a - s), c = it(s - o), h = it(s - a);
650
650
  return s === o || s === a || n && o === a || r > l && c < h;
651
651
  }
652
- function G(i, t, e) {
652
+ function K(i, t, e) {
653
653
  return Math.max(t, Math.min(e, i));
654
654
  }
655
655
  function Na(i) {
656
- return G(i, -32768, 32767);
656
+ return K(i, -32768, 32767);
657
657
  }
658
658
  function pt(i, t, e, n = 1e-6) {
659
659
  return i >= Math.min(t, e) - n && i <= Math.max(t, e) + n;
@@ -746,18 +746,18 @@ function Ya(i, t) {
746
746
  return t ? (clearTimeout(e), e = setTimeout(i, t, n)) : i.apply(this, n), t;
747
747
  };
748
748
  }
749
- const dn = (i) => i === "start" ? "left" : i === "end" ? "right" : "center", q = (i, t, e) => i === "start" ? t : i === "end" ? e : (t + e) / 2, Ua = (i, t, e, n) => i === (n ? "left" : "right") ? e : i === "center" ? (t + e) / 2 : t;
749
+ const dn = (i) => i === "start" ? "left" : i === "end" ? "right" : "center", G = (i, t, e) => i === "start" ? t : i === "end" ? e : (t + e) / 2, Ua = (i, t, e, n) => i === (n ? "left" : "right") ? e : i === "center" ? (t + e) / 2 : t;
750
750
  function Xa(i, t, e) {
751
751
  const n = t.length;
752
752
  let s = 0, o = n;
753
753
  if (i._sorted) {
754
754
  const { iScale: a, _parsed: r } = i, l = a.axis, { min: c, max: h, minDefined: d, maxDefined: u } = a.getUserBounds();
755
- d && (s = G(Math.min(
755
+ d && (s = K(Math.min(
756
756
  // @ts-expect-error Need to type _parsed
757
757
  Et(r, l, c).lo,
758
758
  // @ts-expect-error Need to fix types on _lookupByKey
759
759
  e ? n : Et(t, l, a.getPixelForValue(c)).lo
760
- ), 0, n - 1)), u ? o = G(Math.max(
760
+ ), 0, n - 1)), u ? o = K(Math.max(
761
761
  // @ts-expect-error Need to type _parsed
762
762
  Et(r, a.axis, h, !0).hi + 1,
763
763
  // @ts-expect-error Need to fix types on _lookupByKey
@@ -1295,7 +1295,7 @@ function Bt(i) {
1295
1295
  "bottomRight"
1296
1296
  ]);
1297
1297
  }
1298
- function K(i) {
1298
+ function Z(i) {
1299
1299
  const t = fo(i);
1300
1300
  return t.width = t.left + t.right, t.height = t.top + t.bottom, t;
1301
1301
  }
@@ -3723,7 +3723,7 @@ var st = {
3723
3723
  update(i, t, e, n) {
3724
3724
  if (!i)
3725
3725
  return;
3726
- const s = K(i.options.layout.padding), o = Math.max(t - s.width, 0), a = Math.max(e - s.height, 0), r = Dl(i.boxes), l = r.vertical, c = r.horizontal;
3726
+ const s = Z(i.options.layout.padding), o = Math.max(t - s.width, 0), a = Math.max(e - s.height, 0), r = Dl(i.boxes), l = r.vertical, c = r.horizontal;
3727
3727
  F(i.boxes, (m) => {
3728
3728
  typeof m.beforeLayout == "function" && m.beforeLayout();
3729
3729
  });
@@ -3736,7 +3736,7 @@ var st = {
3736
3736
  vBoxMaxWidth: o / 2 / h,
3737
3737
  hBoxMaxHeight: a / 2
3738
3738
  }), u = Object.assign({}, s);
3739
- Do(u, K(n));
3739
+ Do(u, Z(n));
3740
3740
  const f = Object.assign({
3741
3741
  maxPadding: u,
3742
3742
  w: o,
@@ -4093,7 +4093,7 @@ function oe(i) {
4093
4093
  function us(i, t) {
4094
4094
  if (!i.display)
4095
4095
  return 0;
4096
- const e = U(i.font, t), n = K(i.padding);
4096
+ const e = U(i.font, t), n = Z(i.padding);
4097
4097
  return (z(i.text) ? i.text.length : 1) * e.lineHeight + n.height;
4098
4098
  }
4099
4099
  function ic(i, t) {
@@ -4118,7 +4118,7 @@ function oc(i, t, e, n) {
4118
4118
  let d = 0, u, f, p;
4119
4119
  const m = a - s, g = r - o;
4120
4120
  if (i.isHorizontal()) {
4121
- if (f = q(n, o, r), T(e)) {
4121
+ if (f = G(n, o, r), T(e)) {
4122
4122
  const b = Object.keys(e)[0], y = e[b];
4123
4123
  p = h[b].getPixelForValue(y) + m - t;
4124
4124
  } else
@@ -4130,7 +4130,7 @@ function oc(i, t, e, n) {
4130
4130
  f = h[b].getPixelForValue(y) - g + t;
4131
4131
  } else
4132
4132
  e === "center" ? f = (c.left + c.right) / 2 - g + t : f = cs(i, e, t);
4133
- p = q(n, a, s), d = e === "left" ? -$ : $;
4133
+ p = G(n, a, s), d = e === "left" ? -$ : $;
4134
4134
  }
4135
4135
  return {
4136
4136
  titleX: f,
@@ -4291,8 +4291,8 @@ class Nt extends at {
4291
4291
  this.labelRotation = s;
4292
4292
  return;
4293
4293
  }
4294
- const h = this._getLabelSizes(), d = h.widest.width, u = h.highest.height, f = G(this.chart.width - d, 0, this.maxWidth);
4295
- r = t.offset ? this.maxWidth / n : f / (n - 1), d + 6 > r && (r = f / (n - (t.offset ? 0.5 : 1)), l = this.maxHeight - oe(t.grid) - e.padding - us(t.title, this.chart.options.font), c = Math.sqrt(d * d + u * u), a = cn(Math.min(Math.asin(G((h.highest.height + 6) / r, -1, 1)), Math.asin(G(l / c, -1, 1)) - Math.asin(G(u / c, -1, 1)))), a = Math.max(s, Math.min(o, a))), this.labelRotation = a;
4294
+ const h = this._getLabelSizes(), d = h.widest.width, u = h.highest.height, f = K(this.chart.width - d, 0, this.maxWidth);
4295
+ r = t.offset ? this.maxWidth / n : f / (n - 1), d + 6 > r && (r = f / (n - (t.offset ? 0.5 : 1)), l = this.maxHeight - oe(t.grid) - e.padding - us(t.title, this.chart.options.font), c = Math.sqrt(d * d + u * u), a = cn(Math.min(Math.asin(K((h.highest.height + 6) / r, -1, 1)), Math.asin(K(l / c, -1, 1)) - Math.asin(K(u / c, -1, 1)))), a = Math.max(s, Math.min(o, a))), this.labelRotation = a;
4296
4296
  }
4297
4297
  afterCalculateLabelRotation() {
4298
4298
  B(this.options.afterCalculateLabelRotation, [
@@ -4442,14 +4442,14 @@ class Nt extends at {
4442
4442
  return t !== "auto" ? !!t : this.getMatchingVisibleMetas().length > 0;
4443
4443
  }
4444
4444
  _computeGridLineItems(t) {
4445
- const e = this.axis, n = this.chart, s = this.options, { grid: o, position: a, border: r } = s, l = o.offset, c = this.isHorizontal(), d = this.ticks.length + (l ? 1 : 0), u = oe(o), f = [], p = r.setContext(this.getContext()), m = p.display ? p.width : 0, g = m / 2, b = function(E) {
4446
- return Tt(n, E, m);
4445
+ const e = this.axis, n = this.chart, s = this.options, { grid: o, position: a, border: r } = s, l = o.offset, c = this.isHorizontal(), d = this.ticks.length + (l ? 1 : 0), u = oe(o), f = [], p = r.setContext(this.getContext()), m = p.display ? p.width : 0, g = m / 2, b = function(R) {
4446
+ return Tt(n, R, m);
4447
4447
  };
4448
- let y, x, v, _, C, S, k, M, P, A, D, R;
4448
+ let y, x, v, _, C, S, k, M, P, A, D, E;
4449
4449
  if (a === "top")
4450
- y = b(this.bottom), S = this.bottom - u, M = y - g, A = b(t.top) + g, R = t.bottom;
4450
+ y = b(this.bottom), S = this.bottom - u, M = y - g, A = b(t.top) + g, E = t.bottom;
4451
4451
  else if (a === "bottom")
4452
- y = b(this.top), A = t.top, R = b(t.bottom) - g, S = y + g, M = this.top + u;
4452
+ y = b(this.top), A = t.top, E = b(t.bottom) - g, S = y + g, M = this.top + u;
4453
4453
  else if (a === "left")
4454
4454
  y = b(this.right), C = this.right - u, k = y - g, P = b(t.left) + g, D = t.right;
4455
4455
  else if (a === "right")
@@ -4458,23 +4458,23 @@ class Nt extends at {
4458
4458
  if (a === "center")
4459
4459
  y = b((t.top + t.bottom) / 2 + 0.5);
4460
4460
  else if (T(a)) {
4461
- const E = Object.keys(a)[0], j = a[E];
4462
- y = b(this.chart.scales[E].getPixelForValue(j));
4461
+ const R = Object.keys(a)[0], j = a[R];
4462
+ y = b(this.chart.scales[R].getPixelForValue(j));
4463
4463
  }
4464
- A = t.top, R = t.bottom, S = y + g, M = S + u;
4464
+ A = t.top, E = t.bottom, S = y + g, M = S + u;
4465
4465
  } else if (e === "y") {
4466
4466
  if (a === "center")
4467
4467
  y = b((t.left + t.right) / 2);
4468
4468
  else if (T(a)) {
4469
- const E = Object.keys(a)[0], j = a[E];
4470
- y = b(this.chart.scales[E].getPixelForValue(j));
4469
+ const R = Object.keys(a)[0], j = a[R];
4470
+ y = b(this.chart.scales[R].getPixelForValue(j));
4471
4471
  }
4472
4472
  C = y - g, k = C - u, P = t.left, D = t.right;
4473
4473
  }
4474
- const Z = L(s.ticks.maxTicksLimit, d), O = Math.max(1, Math.ceil(d / Z));
4474
+ const X = L(s.ticks.maxTicksLimit, d), O = Math.max(1, Math.ceil(d / X));
4475
4475
  for (x = 0; x < d; x += O) {
4476
- const E = this.getContext(x), j = o.setContext(E), ot = r.setContext(E), X = j.lineWidth, jt = j.color, Le = ot.dash || [], $t = ot.dashOffset, Qt = j.tickWidth, Jt = j.tickColor, te = j.tickBorderDash || [], ee = j.tickBorderDashOffset;
4477
- v = tc(this, x, l), v !== void 0 && (_ = Tt(n, v, X), c ? C = k = P = D = _ : S = M = A = R = _, f.push({
4476
+ const R = this.getContext(x), j = o.setContext(R), ot = r.setContext(R), q = j.lineWidth, jt = j.color, Le = ot.dash || [], $t = ot.dashOffset, Qt = j.tickWidth, Jt = j.tickColor, te = j.tickBorderDash || [], ee = j.tickBorderDashOffset;
4477
+ v = tc(this, x, l), v !== void 0 && (_ = Tt(n, v, q), c ? C = k = P = D = _ : S = M = A = E = _, f.push({
4478
4478
  tx1: C,
4479
4479
  ty1: S,
4480
4480
  tx2: k,
@@ -4482,8 +4482,8 @@ class Nt extends at {
4482
4482
  x1: P,
4483
4483
  y1: A,
4484
4484
  x2: D,
4485
- y2: R,
4486
- width: X,
4485
+ y2: E,
4486
+ width: q,
4487
4487
  color: jt,
4488
4488
  borderDash: Le,
4489
4489
  borderDashOffset: $t,
@@ -4497,7 +4497,7 @@ class Nt extends at {
4497
4497
  }
4498
4498
  _computeLabelItems(t) {
4499
4499
  const e = this.axis, n = this.options, { position: s, ticks: o } = n, a = this.isHorizontal(), r = this.ticks, { align: l, crossAlign: c, padding: h, mirror: d } = o, u = oe(n.grid), f = u + h, p = d ? -h : f, m = -ct(this.labelRotation), g = [];
4500
- let b, y, x, v, _, C, S, k, M, P, A, D, R = "middle";
4500
+ let b, y, x, v, _, C, S, k, M, P, A, D, E = "middle";
4501
4501
  if (s === "top")
4502
4502
  C = this.bottom - p, S = this._getXAxisLabelAlignment();
4503
4503
  else if (s === "bottom")
@@ -4512,33 +4512,33 @@ class Nt extends at {
4512
4512
  if (s === "center")
4513
4513
  C = (t.top + t.bottom) / 2 + f;
4514
4514
  else if (T(s)) {
4515
- const O = Object.keys(s)[0], E = s[O];
4516
- C = this.chart.scales[O].getPixelForValue(E) + f;
4515
+ const O = Object.keys(s)[0], R = s[O];
4516
+ C = this.chart.scales[O].getPixelForValue(R) + f;
4517
4517
  }
4518
4518
  S = this._getXAxisLabelAlignment();
4519
4519
  } else if (e === "y") {
4520
4520
  if (s === "center")
4521
4521
  _ = (t.left + t.right) / 2 - f;
4522
4522
  else if (T(s)) {
4523
- const O = Object.keys(s)[0], E = s[O];
4524
- _ = this.chart.scales[O].getPixelForValue(E);
4523
+ const O = Object.keys(s)[0], R = s[O];
4524
+ _ = this.chart.scales[O].getPixelForValue(R);
4525
4525
  }
4526
4526
  S = this._getYAxisLabelAlignment(u).textAlign;
4527
4527
  }
4528
- e === "y" && (l === "start" ? R = "top" : l === "end" && (R = "bottom"));
4529
- const Z = this._getLabelSizes();
4528
+ e === "y" && (l === "start" ? E = "top" : l === "end" && (E = "bottom"));
4529
+ const X = this._getLabelSizes();
4530
4530
  for (b = 0, y = r.length; b < y; ++b) {
4531
4531
  x = r[b], v = x.label;
4532
4532
  const O = o.setContext(this.getContext(b));
4533
4533
  k = this.getPixelForTick(b) + o.labelOffset, M = this._resolveTickFontOptions(b), P = M.lineHeight, A = z(v) ? v.length : 1;
4534
- const E = A / 2, j = O.color, ot = O.textStrokeColor, X = O.textStrokeWidth;
4534
+ const R = A / 2, j = O.color, ot = O.textStrokeColor, q = O.textStrokeWidth;
4535
4535
  let jt = S;
4536
- a ? (_ = k, S === "inner" && (b === y - 1 ? jt = this.options.reverse ? "left" : "right" : b === 0 ? jt = this.options.reverse ? "right" : "left" : jt = "center"), s === "top" ? c === "near" || m !== 0 ? D = -A * P + P / 2 : c === "center" ? D = -Z.highest.height / 2 - E * P + P : D = -Z.highest.height + P / 2 : c === "near" || m !== 0 ? D = P / 2 : c === "center" ? D = Z.highest.height / 2 - E * P : D = Z.highest.height - A * P, d && (D *= -1), m !== 0 && !O.showLabelBackdrop && (_ += P / 2 * Math.sin(m))) : (C = k, D = (1 - A) * P / 2);
4536
+ a ? (_ = k, S === "inner" && (b === y - 1 ? jt = this.options.reverse ? "left" : "right" : b === 0 ? jt = this.options.reverse ? "right" : "left" : jt = "center"), s === "top" ? c === "near" || m !== 0 ? D = -A * P + P / 2 : c === "center" ? D = -X.highest.height / 2 - R * P + P : D = -X.highest.height + P / 2 : c === "near" || m !== 0 ? D = P / 2 : c === "center" ? D = X.highest.height / 2 - R * P : D = X.highest.height - A * P, d && (D *= -1), m !== 0 && !O.showLabelBackdrop && (_ += P / 2 * Math.sin(m))) : (C = k, D = (1 - A) * P / 2);
4537
4537
  let Le;
4538
4538
  if (O.showLabelBackdrop) {
4539
- const $t = K(O.backdropPadding), Qt = Z.heights[b], Jt = Z.widths[b];
4539
+ const $t = Z(O.backdropPadding), Qt = X.heights[b], Jt = X.widths[b];
4540
4540
  let te = D - $t.top, ee = 0 - $t.left;
4541
- switch (R) {
4541
+ switch (E) {
4542
4542
  case "middle":
4543
4543
  te -= Qt / 2;
4544
4544
  break;
@@ -4570,9 +4570,9 @@ class Nt extends at {
4570
4570
  rotation: m,
4571
4571
  color: j,
4572
4572
  strokeColor: ot,
4573
- strokeWidth: X,
4573
+ strokeWidth: q,
4574
4574
  textAlign: jt,
4575
- textBaseline: R,
4575
+ textBaseline: E,
4576
4576
  translation: [
4577
4577
  _,
4578
4578
  C
@@ -4681,7 +4681,7 @@ class Nt extends at {
4681
4681
  const { ctx: t, options: { position: e, title: n, reverse: s } } = this;
4682
4682
  if (!n.display)
4683
4683
  return;
4684
- const o = U(n.font), a = K(n.padding), r = n.align;
4684
+ const o = U(n.font), a = Z(n.padding), r = n.align;
4685
4685
  let l = o.lineHeight / 2;
4686
4686
  e === "bottom" || e === "center" || T(e) ? (l += a.bottom, z(n.text) && (l += o.lineHeight * (n.text.length - 1))) : l += a.top;
4687
4687
  const { titleX: c, titleY: h, maxWidth: d, rotation: u } = oc(this, l, e, r);
@@ -5762,13 +5762,13 @@ function Tc(i) {
5762
5762
  function Oc(i, t, e, n) {
5763
5763
  const s = Tc(i.options.borderRadius), o = (e - t) / 2, a = Math.min(o, n * t / 2), r = (l) => {
5764
5764
  const c = (e - Math.min(o, l)) * n / 2;
5765
- return G(l, 0, Math.min(o, c));
5765
+ return K(l, 0, Math.min(o, c));
5766
5766
  };
5767
5767
  return {
5768
5768
  outerStart: r(s.outerStart),
5769
5769
  outerEnd: r(s.outerEnd),
5770
- innerStart: G(s.innerStart, 0, a),
5771
- innerEnd: G(s.innerEnd, 0, a)
5770
+ innerStart: K(s.innerStart, 0, a),
5771
+ innerEnd: K(s.innerEnd, 0, a)
5772
5772
  };
5773
5773
  }
5774
5774
  function Ut(i, t, e, n) {
@@ -5782,35 +5782,35 @@ function si(i, t, e, n, s, o) {
5782
5782
  let f = 0;
5783
5783
  const p = s - l;
5784
5784
  if (n) {
5785
- const O = h > 0 ? h - n : 0, E = d > 0 ? d - n : 0, j = (O + E) / 2, ot = j !== 0 ? p * j / (j + n) : p;
5785
+ const O = h > 0 ? h - n : 0, R = d > 0 ? d - n : 0, j = (O + R) / 2, ot = j !== 0 ? p * j / (j + n) : p;
5786
5786
  f = (p - ot) / 2;
5787
5787
  }
5788
- const m = Math.max(1e-3, p * d - e / H) / d, g = (p - m) / 2, b = l + g + f, y = s - g - f, { outerStart: x, outerEnd: v, innerStart: _, innerEnd: C } = Oc(t, u, d, y - b), S = d - x, k = d - v, M = b + x / S, P = y - v / k, A = u + _, D = u + C, R = b + _ / A, Z = y - C / D;
5788
+ const m = Math.max(1e-3, p * d - e / H) / d, g = (p - m) / 2, b = l + g + f, y = s - g - f, { outerStart: x, outerEnd: v, innerStart: _, innerEnd: C } = Oc(t, u, d, y - b), S = d - x, k = d - v, M = b + x / S, P = y - v / k, A = u + _, D = u + C, E = b + _ / A, X = y - C / D;
5789
5789
  if (i.beginPath(), o) {
5790
5790
  const O = (M + P) / 2;
5791
5791
  if (i.arc(a, r, d, M, O), i.arc(a, r, d, O, P), v > 0) {
5792
- const X = Ut(k, P, a, r);
5793
- i.arc(X.x, X.y, v, P, y + $);
5792
+ const q = Ut(k, P, a, r);
5793
+ i.arc(q.x, q.y, v, P, y + $);
5794
5794
  }
5795
- const E = Ut(D, y, a, r);
5796
- if (i.lineTo(E.x, E.y), C > 0) {
5797
- const X = Ut(D, Z, a, r);
5798
- i.arc(X.x, X.y, C, y + $, Z + Math.PI);
5795
+ const R = Ut(D, y, a, r);
5796
+ if (i.lineTo(R.x, R.y), C > 0) {
5797
+ const q = Ut(D, X, a, r);
5798
+ i.arc(q.x, q.y, C, y + $, X + Math.PI);
5799
5799
  }
5800
5800
  const j = (y - C / u + (b + _ / u)) / 2;
5801
5801
  if (i.arc(a, r, u, y - C / u, j, !0), i.arc(a, r, u, j, b + _ / u, !0), _ > 0) {
5802
- const X = Ut(A, R, a, r);
5803
- i.arc(X.x, X.y, _, R + Math.PI, b - $);
5802
+ const q = Ut(A, E, a, r);
5803
+ i.arc(q.x, q.y, _, E + Math.PI, b - $);
5804
5804
  }
5805
5805
  const ot = Ut(S, b, a, r);
5806
5806
  if (i.lineTo(ot.x, ot.y), x > 0) {
5807
- const X = Ut(S, M, a, r);
5808
- i.arc(X.x, X.y, x, b - $, M);
5807
+ const q = Ut(S, M, a, r);
5808
+ i.arc(q.x, q.y, x, b - $, M);
5809
5809
  }
5810
5810
  } else {
5811
5811
  i.moveTo(a, r);
5812
- const O = Math.cos(M) * d + a, E = Math.sin(M) * d + r;
5813
- i.lineTo(O, E);
5812
+ const O = Math.cos(M) * d + a, R = Math.sin(M) * d + r;
5813
+ i.lineTo(O, R);
5814
5814
  const j = Math.cos(P) * d + a, ot = Math.sin(P) * d + r;
5815
5815
  i.lineTo(j, ot);
5816
5816
  }
@@ -6152,7 +6152,7 @@ function Wo(i, t) {
6152
6152
  };
6153
6153
  }
6154
6154
  function St(i, t, e, n) {
6155
- return i ? 0 : G(t, e, n);
6155
+ return i ? 0 : K(t, e, n);
6156
6156
  }
6157
6157
  function $c(i, t, e) {
6158
6158
  const n = i.options.borderWidth, s = i.borderSkipped, o = fo(n);
@@ -6705,13 +6705,13 @@ class Ds extends at {
6705
6705
  return;
6706
6706
  const t = this._computeTitleHeight(), { legendHitBoxes: e, options: { align: n, labels: { padding: s }, rtl: o } } = this, a = qt(o, this.left, this.width);
6707
6707
  if (this.isHorizontal()) {
6708
- let r = 0, l = q(n, this.left + s, this.right - this.lineWidths[r]);
6708
+ let r = 0, l = G(n, this.left + s, this.right - this.lineWidths[r]);
6709
6709
  for (const c of e)
6710
- r !== c.row && (r = c.row, l = q(n, this.left + s, this.right - this.lineWidths[r])), c.top += this.top + t + s, c.left = a.leftForLtr(a.x(l), c.width), l += c.width + s;
6710
+ r !== c.row && (r = c.row, l = G(n, this.left + s, this.right - this.lineWidths[r])), c.top += this.top + t + s, c.left = a.leftForLtr(a.x(l), c.width), l += c.width + s;
6711
6711
  } else {
6712
- let r = 0, l = q(n, this.top + t + s, this.bottom - this.columnSizes[r].height);
6712
+ let r = 0, l = G(n, this.top + t + s, this.bottom - this.columnSizes[r].height);
6713
6713
  for (const c of e)
6714
- c.col !== r && (r = c.col, l = q(n, this.top + t + s, this.bottom - this.columnSizes[r].height)), c.top = l, c.left += this.left + s, c.left = a.leftForLtr(a.x(c.left), c.width), l += c.height + s;
6714
+ c.col !== r && (r = c.col, l = G(n, this.top + t + s, this.bottom - this.columnSizes[r].height)), c.top = l, c.left += this.left + s, c.left = a.leftForLtr(a.x(c.left), c.width), l += c.height + s;
6715
6715
  }
6716
6716
  }
6717
6717
  isHorizontal() {
@@ -6742,7 +6742,7 @@ class Ds extends at {
6742
6742
  uo(s, P, A, D, a.pointStyleWidth && p);
6743
6743
  } else {
6744
6744
  const P = S + Math.max((d - m) / 2, 0), A = l.leftForLtr(C, p), D = Bt(k.borderRadius);
6745
- s.beginPath(), Object.values(D).some((R) => R !== 0) ? ke(s, {
6745
+ s.beginPath(), Object.values(D).some((E) => E !== 0) ? ke(s, {
6746
6746
  x: A,
6747
6747
  y: P,
6748
6748
  w: p,
@@ -6758,12 +6758,12 @@ class Ds extends at {
6758
6758
  });
6759
6759
  }, x = this.isHorizontal(), v = this._computeTitleHeight();
6760
6760
  x ? f = {
6761
- x: q(o, this.left + h, this.right - n[0]),
6761
+ x: G(o, this.left + h, this.right - n[0]),
6762
6762
  y: this.top + h + v,
6763
6763
  line: 0
6764
6764
  } : f = {
6765
6765
  x: this.left + h,
6766
- y: q(o, this.top + v + h, this.bottom - e[0].height),
6766
+ y: G(o, this.top + v + h, this.bottom - e[0].height),
6767
6767
  line: 0
6768
6768
  }, _o(this.ctx, t.textDirection);
6769
6769
  const _ = g + h;
@@ -6771,34 +6771,34 @@ class Ds extends at {
6771
6771
  s.strokeStyle = C.fontColor, s.fillStyle = C.fontColor;
6772
6772
  const k = s.measureText(C.text).width, M = l.textAlign(C.textAlign || (C.textAlign = a.textAlign)), P = p + u + k;
6773
6773
  let A = f.x, D = f.y;
6774
- l.setWidth(this.width), x ? S > 0 && A + P + h > this.right && (D = f.y += _, f.line++, A = f.x = q(o, this.left + h, this.right - n[f.line])) : S > 0 && D + _ > this.bottom && (A = f.x = A + e[f.line].width + h, f.line++, D = f.y = q(o, this.top + v + h, this.bottom - e[f.line].height));
6775
- const R = l.x(A);
6776
- if (b(R, D, C), A = Ua(M, A + p + u, x ? A + P : this.right, t.rtl), y(l.x(A), D, C), x)
6774
+ l.setWidth(this.width), x ? S > 0 && A + P + h > this.right && (D = f.y += _, f.line++, A = f.x = G(o, this.left + h, this.right - n[f.line])) : S > 0 && D + _ > this.bottom && (A = f.x = A + e[f.line].width + h, f.line++, D = f.y = G(o, this.top + v + h, this.bottom - e[f.line].height));
6775
+ const E = l.x(A);
6776
+ if (b(E, D, C), A = Ua(M, A + p + u, x ? A + P : this.right, t.rtl), y(l.x(A), D, C), x)
6777
6777
  f.x += P + h;
6778
6778
  else if (typeof C.text != "string") {
6779
- const Z = c.lineHeight;
6780
- f.y += Vo(C, Z) + h;
6779
+ const X = c.lineHeight;
6780
+ f.y += Vo(C, X) + h;
6781
6781
  } else
6782
6782
  f.y += _;
6783
6783
  }), vo(this.ctx, t.textDirection);
6784
6784
  }
6785
6785
  drawTitle() {
6786
- const t = this.options, e = t.title, n = U(e.font), s = K(e.padding);
6786
+ const t = this.options, e = t.title, n = U(e.font), s = Z(e.padding);
6787
6787
  if (!e.display)
6788
6788
  return;
6789
6789
  const o = qt(t.rtl, this.left, this.width), a = this.ctx, r = e.position, l = n.size / 2, c = s.top + l;
6790
6790
  let h, d = this.left, u = this.width;
6791
6791
  if (this.isHorizontal())
6792
- u = Math.max(...this.lineWidths), h = this.top + c, d = q(t.align, d, this.right - u);
6792
+ u = Math.max(...this.lineWidths), h = this.top + c, d = G(t.align, d, this.right - u);
6793
6793
  else {
6794
6794
  const p = this.columnSizes.reduce((m, g) => Math.max(m, g.height), 0);
6795
- h = c + q(t.align, this.top, this.bottom - p - t.labels.padding - this._computeTitleHeight());
6795
+ h = c + G(t.align, this.top, this.bottom - p - t.labels.padding - this._computeTitleHeight());
6796
6796
  }
6797
- const f = q(r, d, d + u);
6797
+ const f = G(r, d, d + u);
6798
6798
  a.textAlign = o.textAlign(dn(r)), a.textBaseline = "middle", a.strokeStyle = e.color, a.fillStyle = e.color, a.font = n.string, Ht(a, e.text, f, h, n);
6799
6799
  }
6800
6800
  _computeTitleHeight() {
6801
- const t = this.options.title, e = U(t.font), n = K(t.padding);
6801
+ const t = this.options.title, e = U(t.font), n = Z(t.padding);
6802
6802
  return t.display ? e.lineHeight + n.height : 0;
6803
6803
  }
6804
6804
  _getLegendItemAt(t, e) {
@@ -6901,7 +6901,7 @@ var vi = {
6901
6901
  generateLabels(i) {
6902
6902
  const t = i.data.datasets, { labels: { usePointStyle: e, pointStyle: n, textAlign: s, color: o, useBorderRadius: a, borderRadius: r } } = i.legend.options;
6903
6903
  return i._getSortedDatasetMetas().map((l) => {
6904
- const c = l.controller.getStyle(e ? 0 : void 0), h = K(c.borderWidth);
6904
+ const c = l.controller.getStyle(e ? 0 : void 0), h = Z(c.borderWidth);
6905
6905
  return {
6906
6906
  text: t[l.index].label,
6907
6907
  fillStyle: c.backgroundColor,
@@ -6952,7 +6952,7 @@ class jo extends at {
6952
6952
  }
6953
6953
  this.width = this.right = t, this.height = this.bottom = e;
6954
6954
  const s = z(n.text) ? n.text.length : 1;
6955
- this._padding = K(n.padding);
6955
+ this._padding = Z(n.padding);
6956
6956
  const o = s * U(n.font).lineHeight + this._padding.height;
6957
6957
  this.isHorizontal() ? this.height = o : this.width = o;
6958
6958
  }
@@ -6963,7 +6963,7 @@ class jo extends at {
6963
6963
  _drawArgs(t) {
6964
6964
  const { top: e, left: n, bottom: s, right: o, options: a } = this, r = a.align;
6965
6965
  let l = 0, c, h, d;
6966
- return this.isHorizontal() ? (h = q(r, n, o), d = e + t, c = o - n) : (a.position === "left" ? (h = n + t, d = q(r, s, e), l = H * -0.5) : (h = o - t, d = q(r, e, s), l = H * 0.5), c = s - e), {
6966
+ return this.isHorizontal() ? (h = G(r, n, o), d = e + t, c = o - n) : (a.position === "left" ? (h = n + t, d = G(r, s, e), l = H * -0.5) : (h = o - t, d = G(r, e, s), l = H * 0.5), c = s - e), {
6967
6967
  titleX: h,
6968
6968
  titleY: d,
6969
6969
  maxWidth: c,
@@ -7091,7 +7091,7 @@ function vh(i, t) {
7091
7091
  };
7092
7092
  }
7093
7093
  function Ls(i, t) {
7094
- const e = i.chart.ctx, { body: n, footer: s, title: o } = i, { boxWidth: a, boxHeight: r } = t, l = U(t.bodyFont), c = U(t.titleFont), h = U(t.footerFont), d = o.length, u = s.length, f = n.length, p = K(t.padding);
7094
+ const e = i.chart.ctx, { body: n, footer: s, title: o } = i, { boxWidth: a, boxHeight: r } = t, l = U(t.bodyFont), c = U(t.titleFont), h = U(t.footerFont), d = o.length, u = s.length, f = n.length, p = Z(t.padding);
7095
7095
  let m = p.height, g = 0, b = n.reduce((v, _) => v + _.before.length + _.lines.length + _.after.length, 0);
7096
7096
  if (b += i.beforeBody.length + i.afterBody.length, d && (m += d * c.lineHeight + (d - 1) * t.titleSpacing + t.titleMarginBottom), b) {
7097
7097
  const v = t.displayColors ? Math.max(r, l.lineHeight) : l.lineHeight;
@@ -7143,12 +7143,12 @@ function Os(i, t, e, n) {
7143
7143
  let p = Mh(t, r);
7144
7144
  const m = Ch(t, l, c);
7145
7145
  return l === "center" ? r === "left" ? p += c : r === "right" && (p -= c) : r === "left" ? p -= Math.max(h, u) + s : r === "right" && (p += Math.max(d, f) + s), {
7146
- x: G(p, 0, n.width - t.width),
7147
- y: G(m, 0, n.height - t.height)
7146
+ x: K(p, 0, n.width - t.width),
7147
+ y: K(m, 0, n.height - t.height)
7148
7148
  };
7149
7149
  }
7150
7150
  function je(i, t, e) {
7151
- const n = K(e.padding);
7151
+ const n = Z(e.padding);
7152
7152
  return t === "center" ? i.x + i.width / 2 : t === "right" ? i.x + i.width - n.right : i.x + n.left;
7153
7153
  }
7154
7154
  function Fs(i) {
@@ -7410,7 +7410,7 @@ class Qi extends at {
7410
7410
  y: this.y
7411
7411
  };
7412
7412
  n = Math.abs(n) < 1e-3 ? 0 : n;
7413
- const a = K(e.padding), r = this.title.length || this.beforeBody.length || this.body.length || this.afterBody.length || this.footer.length;
7413
+ const a = Z(e.padding), r = this.title.length || this.beforeBody.length || this.body.length || this.afterBody.length || this.footer.length;
7414
7414
  e.enabled && r && (t.save(), t.globalAlpha = n, this.drawBackground(o, t, s, e), _o(t, e.textDirection), o.y += a.top, this.drawTitle(o, t, e), this.drawBody(o, t, e), this.drawFooter(o, t, e), vo(t, e.textDirection), t.restore());
7415
7415
  }
7416
7416
  getActiveElements() {
@@ -7581,7 +7581,7 @@ function Dh(i, t, e, n) {
7581
7581
  const o = i.lastIndexOf(t);
7582
7582
  return s !== o ? e : s;
7583
7583
  }
7584
- const Lh = (i, t) => i === null ? null : G(Math.round(i), 0, t);
7584
+ const Lh = (i, t) => i === null ? null : K(Math.round(i), 0, t);
7585
7585
  function Rs(i) {
7586
7586
  const t = this.getLabels();
7587
7587
  return i >= 0 && i < t.length ? t[i] : i;
@@ -7858,7 +7858,7 @@ w(Ws, "id", "logarithmic"), w(Ws, "defaults", {
7858
7858
  function Ji(i) {
7859
7859
  const t = i.ticks;
7860
7860
  if (t.display && i.display) {
7861
- const e = K(t.backdropPadding);
7861
+ const e = Z(t.backdropPadding);
7862
7862
  return L(t.font && t.font.size, V.font.size) + e.height;
7863
7863
  }
7864
7864
  return 0;
@@ -7961,7 +7961,7 @@ function Vh(i, t, e) {
7961
7961
  function jh(i, t, e) {
7962
7962
  const { left: n, top: s, right: o, bottom: a } = e, { backdropColor: r } = t;
7963
7963
  if (!I(r)) {
7964
- const l = Bt(t.borderRadius), c = K(t.backdropPadding);
7964
+ const l = Bt(t.borderRadius), c = Z(t.backdropPadding);
7965
7965
  i.fillStyle = r;
7966
7966
  const h = n - c.left, d = s - c.top, u = o - n + c.width, f = a - s + c.height;
7967
7967
  Object.values(l).some((p) => p !== 0) ? (i.beginPath(), ke(i, {
@@ -8016,7 +8016,7 @@ class ue extends ai {
8016
8016
  super(t), this.xCenter = void 0, this.yCenter = void 0, this.drawingArea = void 0, this._pointLabels = [], this._pointLabelItems = [];
8017
8017
  }
8018
8018
  setDimensions() {
8019
- const t = this._padding = K(Ji(this.options) / 2), e = this.width = this.maxWidth - t.width, n = this.height = this.maxHeight - t.height;
8019
+ const t = this._padding = Z(Ji(this.options) / 2), e = this.width = this.maxWidth - t.width, n = this.height = this.maxHeight - t.height;
8020
8020
  this.xCenter = Math.floor(this.left + e / 2 + t.left), this.yCenter = Math.floor(this.top + n / 2 + t.top), this.drawingArea = Math.floor(Math.min(e, n) / 2);
8021
8021
  }
8022
8022
  determineDataLimits() {
@@ -8126,7 +8126,7 @@ class ue extends ai {
8126
8126
  const c = n.setContext(this.getContext(l)), h = U(c.font);
8127
8127
  if (o = this.getDistanceFromCenterForValue(this.ticks[l].value), c.showLabelBackdrop) {
8128
8128
  t.font = h.string, a = t.measureText(r.label).width, t.fillStyle = c.backdropColor;
8129
- const d = K(c.backdropPadding);
8129
+ const d = Z(c.backdropPadding);
8130
8130
  t.fillRect(-a / 2 - d.left, -o - h.size / 2 - d.top, a + d.width, h.size + d.height);
8131
8131
  }
8132
8132
  Ht(t, r.label, 0, -o, h, {
@@ -8337,7 +8337,7 @@ class li extends Nt {
8337
8337
  let e = 0, n = 0, s, o;
8338
8338
  this.options.offset && t.length && (s = this.getDecimalForValue(t[0]), t.length === 1 ? e = 1 - s : e = (this.getDecimalForValue(t[1]) - s) / 2, o = this.getDecimalForValue(t[t.length - 1]), t.length === 1 ? n = o : n = (o - this.getDecimalForValue(t[t.length - 2])) / 2);
8339
8339
  const a = t.length < 3 ? 0.5 : 0.25;
8340
- e = G(e, 0, a), n = G(n, 0, a), this._offsets = {
8340
+ e = K(e, 0, a), n = K(n, 0, a), this._offsets = {
8341
8341
  start: e,
8342
8342
  end: n,
8343
8343
  factor: 1 / (e + 1 + n)
@@ -8786,8 +8786,8 @@ function Ci(i, t, e) {
8786
8786
  Qo(i) ? i.toggleDataVisibility(t) : i.setDatasetVisibility(t, !i.isDatasetVisible(t)), e && _d(i) && (e.value = !1), i.update();
8787
8787
  }
8788
8788
  function ea(i, t) {
8789
- const e = Zo(i, ""), n = yd(i);
8790
- return (i.index || i.datasetIndex) === 0 ? t ? n.style.borderRadius = "25px" : n.style.transform = "rotate(45deg)" : t ? n.style.transform = "rotate(45deg)" : n.style.borderRadius = "25px", e.appendChild(n), e;
8789
+ const e = Zo(i, ""), n = yd(i), s = i.index || i.datasetIndex;
8790
+ return n.style.width = "10px", n.style.height = "10px", s === 0 ? t ? n.style.borderRadius = "25px" : n.style.transform = "rotate(45deg)" : t ? n.style.transform = "rotate(45deg)" : n.style.borderRadius = "25px", e.appendChild(n), e;
8791
8791
  }
8792
8792
  function kn(i, t) {
8793
8793
  var n, s;
@@ -9265,11 +9265,11 @@ const Dd = { class: "container" }, Ld = { class: "main" }, Td = /* @__PURE__ */
9265
9265
  }), v = (M, P, A = !1) => {
9266
9266
  const D = Object.assign([], t.datasets[M].data);
9267
9267
  return P && x.value && D.splice(x.value, 1), D.map(
9268
- (R) => t.unit === "%" ? R.rate : R.amount
9268
+ (E) => t.unit === "%" ? E.rate : E.amount
9269
9269
  );
9270
9270
  }, _ = (M) => {
9271
- const P = M.tooltip.dataPoints[0].datasetIndex, A = M.tooltip.dataPoints[0].dataIndex, D = M.tooltip.body[0].lines[0].split(":")[1], R = t.datasets[P].data[A], Z = R.rate ? parseFloat(D.replace(",", ".")).toFixed(2) + "% " : "", O = R.amountUnit ? R.amountUnit : "", E = R.amount ? yt(R.amount) : "";
9272
- return Z + E + O;
9271
+ const P = M.tooltip.dataPoints[0].datasetIndex, A = M.tooltip.dataPoints[0].dataIndex, D = M.tooltip.body[0].lines[0].split(":")[1], E = t.datasets[P].data[A], X = E.rate ? parseFloat(D.replace(",", ".")).toFixed(2) + "% " : "", O = E.amountUnit ? E.amountUnit : "", R = E.amount ? yt(E.amount) : "";
9272
+ return X + (X && R ? "/ " : "") + R + O;
9273
9273
  }, C = (M) => {
9274
9274
  const P = Object.assign([], t.labels);
9275
9275
  return M && P.splice(M, 1), P.map((A) => A);
@@ -9311,15 +9311,14 @@ const Dd = { class: "container" }, Ld = { class: "main" }, Td = /* @__PURE__ */
9311
9311
  },
9312
9312
  scales: {
9313
9313
  x: {
9314
- stacked: !0
9314
+ stacked: t.stacked
9315
9315
  },
9316
9316
  y: {
9317
- stacked: !0,
9317
+ stacked: t.stacked,
9318
9318
  ticks: {
9319
9319
  callback: function(M) {
9320
9320
  return t.unit === "%" ? ad(M, t.unit) : yt(M) + " " + t.unit;
9321
- },
9322
- maxTicksLimit: 8
9321
+ }
9323
9322
  }
9324
9323
  }
9325
9324
  }
@@ -9364,7 +9363,7 @@ const Di = (i, t) => {
9364
9363
  for (const [n, s] of t)
9365
9364
  e[n] = s;
9366
9365
  return e;
9367
- }, tn = /* @__PURE__ */ Di(Td, [["__scopeId", "data-v-74a5e189"]]);
9366
+ }, tn = /* @__PURE__ */ Di(Td, [["__scopeId", "data-v-fae6dcc9"]]);
9368
9367
  tn.install = (i) => {
9369
9368
  i.component("BarChart", tn);
9370
9369
  };
@@ -9887,8 +9886,7 @@ const Ed = { class: "container" }, Bd = { class: "main" }, zd = /* @__PURE__ */
9887
9886
  callback: function(g) {
9888
9887
  const b = t.lines[0].unit;
9889
9888
  return `${yt(g)} ${b || ""}`;
9890
- },
9891
- maxTicksLimit: 8
9889
+ }
9892
9890
  }
9893
9891
  }
9894
9892
  }
@@ -9913,7 +9911,7 @@ const Ed = { class: "container" }, Bd = { class: "main" }, zd = /* @__PURE__ */
9913
9911
  ]));
9914
9912
  }
9915
9913
  });
9916
- const nn = /* @__PURE__ */ Di(zd, [["__scopeId", "data-v-dceadcc0"]]);
9914
+ const nn = /* @__PURE__ */ Di(zd, [["__scopeId", "data-v-d99146c4"]]);
9917
9915
  nn.install = (i) => {
9918
9916
  i.component("LineChart", nn);
9919
9917
  };
@@ -10106,7 +10104,7 @@ const Hd = (i) => i.datasets[0].areaData.map((t) => {
10106
10104
  },
10107
10105
  layout: {
10108
10106
  padding: {
10109
- left: 105,
10107
+ left: 130,
10110
10108
  right: 95,
10111
10109
  top: 95,
10112
10110
  bottom: 95
@@ -10119,7 +10117,8 @@ const Hd = (i) => i.datasets[0].areaData.map((t) => {
10119
10117
  pointLabels: {
10120
10118
  display: !1,
10121
10119
  font: {
10122
- size: 12
10120
+ weight: 400,
10121
+ family: "Roboto"
10123
10122
  }
10124
10123
  },
10125
10124
  ticks: {
@@ -10203,7 +10202,7 @@ const Hd = (i) => i.datasets[0].areaData.map((t) => {
10203
10202
  ]));
10204
10203
  }
10205
10204
  });
10206
- const sn = /* @__PURE__ */ Di(jd, [["__scopeId", "data-v-a0d48bf9"]]);
10205
+ const sn = /* @__PURE__ */ Di(jd, [["__scopeId", "data-v-f61a6516"]]);
10207
10206
  sn.install = (i) => {
10208
10207
  i.component("RadarChart", sn);
10209
10208
  };