@evercam/ui 0.0.51 → 0.0.52-beta.1

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.
package/dist/index.mjs CHANGED
@@ -69,8 +69,8 @@ function I(e, t, r, n, a, o, i, d) {
69
69
  if (l.functional) {
70
70
  l._injectStyles = s;
71
71
  var c = l.render;
72
- l.render = function(E, y) {
73
- return s.call(y), c(E, y);
72
+ l.render = function(E, b) {
73
+ return s.call(b), c(E, b);
74
74
  };
75
75
  } else {
76
76
  var g = l.beforeCreate;
@@ -908,8 +908,8 @@ var We = {}, ie = {};
908
908
  };
909
909
  function d(g, m) {
910
910
  if (i.future.includes(m)) {
911
- var E, y, k;
912
- return g.future === "all" || ((k = (y = g == null || (E = g.future) === null || E === void 0 ? void 0 : E[m]) !== null && y !== void 0 ? y : o[m]) !== null && k !== void 0 ? k : !1);
911
+ var E, b, k;
912
+ return g.future === "all" || ((k = (b = g == null || (E = g.future) === null || E === void 0 ? void 0 : E[m]) !== null && b !== void 0 ? b : o[m]) !== null && k !== void 0 ? k : !1);
913
913
  }
914
914
  if (i.experimental.includes(m)) {
915
915
  var A, z, L;
@@ -1045,29 +1045,29 @@ var We = {}, ie = {};
1045
1045
  })(),
1046
1046
  extract: (() => {
1047
1047
  let s = (() => {
1048
- var m, E, y, k, A, z, L, M, H, G;
1049
- return !((m = i.purge) === null || m === void 0) && m.extract ? i.purge.extract : !((E = i.content) === null || E === void 0) && E.extract ? i.content.extract : !((y = i.purge) === null || y === void 0 || (k = y.extract) === null || k === void 0) && k.DEFAULT ? i.purge.extract.DEFAULT : !((A = i.content) === null || A === void 0 || (z = A.extract) === null || z === void 0) && z.DEFAULT ? i.content.extract.DEFAULT : !((L = i.purge) === null || L === void 0 || (M = L.options) === null || M === void 0) && M.extractors ? i.purge.options.extractors : !((H = i.content) === null || H === void 0 || (G = H.options) === null || G === void 0) && G.extractors ? i.content.options.extractors : {};
1048
+ var m, E, b, k, A, z, L, M, H, G;
1049
+ return !((m = i.purge) === null || m === void 0) && m.extract ? i.purge.extract : !((E = i.content) === null || E === void 0) && E.extract ? i.content.extract : !((b = i.purge) === null || b === void 0 || (k = b.extract) === null || k === void 0) && k.DEFAULT ? i.purge.extract.DEFAULT : !((A = i.content) === null || A === void 0 || (z = A.extract) === null || z === void 0) && z.DEFAULT ? i.content.extract.DEFAULT : !((L = i.purge) === null || L === void 0 || (M = L.options) === null || M === void 0) && M.extractors ? i.purge.options.extractors : !((H = i.content) === null || H === void 0 || (G = H.options) === null || G === void 0) && G.extractors ? i.content.options.extractors : {};
1050
1050
  })(), c = {}, g = (() => {
1051
- var m, E, y, k;
1051
+ var m, E, b, k;
1052
1052
  if (!((m = i.purge) === null || m === void 0 || (E = m.options) === null || E === void 0) && E.defaultExtractor)
1053
1053
  return i.purge.options.defaultExtractor;
1054
- if (!((y = i.content) === null || y === void 0 || (k = y.options) === null || k === void 0) && k.defaultExtractor)
1054
+ if (!((b = i.content) === null || b === void 0 || (k = b.options) === null || k === void 0) && k.defaultExtractor)
1055
1055
  return i.content.options.defaultExtractor;
1056
1056
  })();
1057
1057
  if (g !== void 0 && (c.DEFAULT = g), typeof s == "function")
1058
1058
  c.DEFAULT = s;
1059
1059
  else if (Array.isArray(s))
1060
1060
  for (let { extensions: m, extractor: E } of s != null ? s : [])
1061
- for (let y of m)
1062
- c[y] = E;
1061
+ for (let b of m)
1062
+ c[b] = E;
1063
1063
  else
1064
1064
  typeof s == "object" && s !== null && Object.assign(c, s);
1065
1065
  return c;
1066
1066
  })(),
1067
1067
  transform: (() => {
1068
1068
  let s = (() => {
1069
- var g, m, E, y, k, A;
1070
- return !((g = i.purge) === null || g === void 0) && g.transform ? i.purge.transform : !((m = i.content) === null || m === void 0) && m.transform ? i.content.transform : !((E = i.purge) === null || E === void 0 || (y = E.transform) === null || y === void 0) && y.DEFAULT ? i.purge.transform.DEFAULT : !((k = i.content) === null || k === void 0 || (A = k.transform) === null || A === void 0) && A.DEFAULT ? i.content.transform.DEFAULT : {};
1069
+ var g, m, E, b, k, A;
1070
+ return !((g = i.purge) === null || g === void 0) && g.transform ? i.purge.transform : !((m = i.content) === null || m === void 0) && m.transform ? i.content.transform : !((E = i.purge) === null || E === void 0 || (b = E.transform) === null || b === void 0) && b.DEFAULT ? i.purge.transform.DEFAULT : !((k = i.content) === null || k === void 0 || (A = k.transform) === null || A === void 0) && A.DEFAULT ? i.content.transform.DEFAULT : {};
1071
1071
  })(), c = {};
1072
1072
  return typeof s == "function" && (c.DEFAULT = s), typeof s == "object" && s !== null && Object.assign(c, s), c;
1073
1073
  })()
@@ -1888,9 +1888,9 @@ var ve = {}, ye = {}, Xe = {};
1888
1888
  Object.defineProperty(e, "__esModule", {
1889
1889
  value: !0
1890
1890
  });
1891
- function t(y, k) {
1891
+ function t(b, k) {
1892
1892
  for (var A in k)
1893
- Object.defineProperty(y, A, {
1893
+ Object.defineProperty(b, A, {
1894
1894
  enumerable: !0,
1895
1895
  get: k[A]
1896
1896
  });
@@ -1904,17 +1904,17 @@ var ve = {}, ye = {}, Xe = {};
1904
1904
  }
1905
1905
  });
1906
1906
  const r = /* @__PURE__ */ n(Xe);
1907
- function n(y) {
1908
- return y && y.__esModule ? y : {
1909
- default: y
1907
+ function n(b) {
1908
+ return b && b.__esModule ? b : {
1909
+ default: b
1910
1910
  };
1911
1911
  }
1912
1912
  let a = /^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i, o = /^#([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i, i = /(?:\d+|\d*\.\d+)%?/, d = /(?:\s*,\s*|\s+)/, l = /\s*[,/]\s*/, s = /var\(--(?:[^ )]*?)\)/, c = new RegExp(`^(rgba?)\\(\\s*(${i.source}|${s.source})(?:${d.source}(${i.source}|${s.source}))?(?:${d.source}(${i.source}|${s.source}))?(?:${l.source}(${i.source}|${s.source}))?\\s*\\)$`), g = new RegExp(`^(hsla?)\\(\\s*((?:${i.source})(?:deg|rad|grad|turn)?|${s.source})(?:${d.source}(${i.source}|${s.source}))?(?:${d.source}(${i.source}|${s.source}))?(?:${l.source}(${i.source}|${s.source}))?\\s*\\)$`);
1913
- function m(y, { loose: k = !1 } = {}) {
1913
+ function m(b, { loose: k = !1 } = {}) {
1914
1914
  var A, z;
1915
- if (typeof y != "string")
1915
+ if (typeof b != "string")
1916
1916
  return null;
1917
- if (y = y.trim(), y === "transparent")
1917
+ if (b = b.trim(), b === "transparent")
1918
1918
  return {
1919
1919
  mode: "rgb",
1920
1920
  color: [
@@ -1924,12 +1924,12 @@ var ve = {}, ye = {}, Xe = {};
1924
1924
  ],
1925
1925
  alpha: "0"
1926
1926
  };
1927
- if (y in r.default)
1927
+ if (b in r.default)
1928
1928
  return {
1929
1929
  mode: "rgb",
1930
- color: r.default[y].map((R) => R.toString())
1930
+ color: r.default[b].map((R) => R.toString())
1931
1931
  };
1932
- let L = y.replace(o, (R, N, W, v, D) => [
1932
+ let L = b.replace(o, (R, N, W, v, D) => [
1933
1933
  "#",
1934
1934
  N,
1935
1935
  N,
@@ -1950,7 +1950,7 @@ var ve = {}, ye = {}, Xe = {};
1950
1950
  alpha: L[4] ? (parseInt(L[4], 16) / 255).toString() : void 0
1951
1951
  };
1952
1952
  var M;
1953
- let H = (M = y.match(c)) !== null && M !== void 0 ? M : y.match(g);
1953
+ let H = (M = b.match(c)) !== null && M !== void 0 ? M : b.match(g);
1954
1954
  if (H === null)
1955
1955
  return null;
1956
1956
  let G = [
@@ -1970,9 +1970,9 @@ var ve = {}, ye = {}, Xe = {};
1970
1970
  alpha: (A = H[5]) === null || A === void 0 || (z = A.toString) === null || z === void 0 ? void 0 : z.call(A)
1971
1971
  };
1972
1972
  }
1973
- function E({ mode: y, color: k, alpha: A }) {
1973
+ function E({ mode: b, color: k, alpha: A }) {
1974
1974
  let z = A !== void 0;
1975
- return y === "rgba" || y === "hsla" ? `${y}(${k.join(", ")}${z ? `, ${A}` : ""})` : `${y}(${k.join(" ")}${z ? ` / ${A}` : ""})`;
1975
+ return b === "rgba" || b === "hsla" ? `${b}(${k.join(", ")}${z ? `, ${A}` : ""})` : `${b}(${k.join(" ")}${z ? ` / ${A}` : ""})`;
1976
1976
  }
1977
1977
  })(ye);
1978
1978
  (function(e) {
@@ -2090,9 +2090,9 @@ var be = {}, qe = {}, se = {};
2090
2090
  return (0, r.splitAtTopLevelOnly)(l, ",").map((c) => {
2091
2091
  let g = c.trim(), m = {
2092
2092
  raw: g
2093
- }, E = g.split(a), y = /* @__PURE__ */ new Set();
2093
+ }, E = g.split(a), b = /* @__PURE__ */ new Set();
2094
2094
  for (let k of E)
2095
- o.lastIndex = 0, !y.has("KEYWORD") && n.has(k) ? (m.keyword = k, y.add("KEYWORD")) : o.test(k) ? y.has("X") ? y.has("Y") ? y.has("BLUR") ? y.has("SPREAD") || (m.spread = k, y.add("SPREAD")) : (m.blur = k, y.add("BLUR")) : (m.y = k, y.add("Y")) : (m.x = k, y.add("X")) : m.color ? (m.unknown || (m.unknown = []), m.unknown.push(k)) : m.color = k;
2095
+ o.lastIndex = 0, !b.has("KEYWORD") && n.has(k) ? (m.keyword = k, b.add("KEYWORD")) : o.test(k) ? b.has("X") ? b.has("Y") ? b.has("BLUR") ? b.has("SPREAD") || (m.spread = k, b.add("SPREAD")) : (m.blur = k, b.add("BLUR")) : (m.y = k, b.add("Y")) : (m.x = k, b.add("X")) : m.color ? (m.unknown || (m.unknown = []), m.unknown.push(k)) : m.color = k;
2096
2096
  return m.valid = m.x !== void 0 && m.y !== void 0, m;
2097
2097
  });
2098
2098
  }
@@ -2423,7 +2423,7 @@ var Ye = {};
2423
2423
  function E(v) {
2424
2424
  return v.startsWith("[") && v.endsWith("]");
2425
2425
  }
2426
- function y(v) {
2426
+ function b(v) {
2427
2427
  let D = v.lastIndexOf("/");
2428
2428
  return D === -1 || D === v.length - 1 ? [
2429
2429
  v,
@@ -2452,7 +2452,7 @@ var Ye = {};
2452
2452
  var x;
2453
2453
  return k((x = D.values) === null || x === void 0 ? void 0 : x[v]);
2454
2454
  }
2455
- let [_, p] = y(v);
2455
+ let [_, p] = b(v);
2456
2456
  if (p !== void 0) {
2457
2457
  var $, f, w, F;
2458
2458
  let O = (F = ($ = D.values) === null || $ === void 0 ? void 0 : $[_]) !== null && F !== void 0 ? F : E(_) ? _.slice(1, -1) : void 0;
@@ -2531,7 +2531,7 @@ var Ye = {};
2531
2531
  return [];
2532
2532
  }
2533
2533
  function* W(v, D, C, h) {
2534
- let x = (0, d.flagEnabled)(h, "generalizedModifiers"), [_, p] = y(D);
2534
+ let x = (0, d.flagEnabled)(h, "generalizedModifiers"), [_, p] = b(D);
2535
2535
  if (x && C.modifiers != null && (C.modifiers === "any" || typeof C.modifiers == "object" && (p && E(p) || p in C.modifiers)) || (_ = D, p = void 0), p !== void 0 && _ === "" && (_ = "DEFAULT"), p !== void 0 && typeof C.modifiers == "object") {
2536
2536
  var f, w;
2537
2537
  let F = (w = (f = C.modifiers) === null || f === void 0 ? void 0 : f[p]) !== null && w !== void 0 ? w : null;
@@ -2578,7 +2578,7 @@ var Ze = {};
2578
2578
  default: h
2579
2579
  };
2580
2580
  }
2581
- function y(h) {
2581
+ function b(h) {
2582
2582
  return typeof h == "function";
2583
2583
  }
2584
2584
  function k(h, ...x) {
@@ -2606,7 +2606,7 @@ var Ze = {};
2606
2606
  }
2607
2607
  };
2608
2608
  function z(h, ...x) {
2609
- return y(h) ? h(...x) : h;
2609
+ return b(h) ? h(...x) : h;
2610
2610
  }
2611
2611
  function L(h) {
2612
2612
  return h.reduce((x, { extend: _ }) => k(x, _, (p, $) => p === void 0 ? [
@@ -2639,7 +2639,7 @@ var Ze = {};
2639
2639
  return x;
2640
2640
  }
2641
2641
  function G({ extend: h, ...x }) {
2642
- return k(x, h, (_, p) => !y(_) && !p.some(y) ? k({}, _, ...p, H) : ($, f) => k({}, ...[
2642
+ return k(x, h, (_, p) => !b(_) && !p.some(b) ? k({}, _, ...p, H) : ($, f) => k({}, ...[
2643
2643
  _,
2644
2644
  ...p
2645
2645
  ].map((w) => z(w, $, f)), H));
@@ -2659,7 +2659,7 @@ var Ze = {};
2659
2659
  for (const $ of R(_)) {
2660
2660
  let f = 0, w = h;
2661
2661
  for (; w != null && f < $.length; )
2662
- w = w[$[f++]], w = y(w) && ($.alpha === void 0 || f <= $.length - 1) ? w(x, A) : w;
2662
+ w = w[$[f++]], w = b(w) && ($.alpha === void 0 || f <= $.length - 1) ? w(x, A) : w;
2663
2663
  if (w !== void 0) {
2664
2664
  if ($.alpha !== void 0) {
2665
2665
  let F = (0, c.parseColorFormat)(w);
@@ -2673,7 +2673,7 @@ var Ze = {};
2673
2673
  return Object.assign(x, {
2674
2674
  theme: x,
2675
2675
  ...A
2676
- }), Object.keys(h).reduce((_, p) => (_[p] = y(h[p]) ? h[p](x, A) : h[p], _), {});
2676
+ }), Object.keys(h).reduce((_, p) => (_[p] = b(h[p]) ? h[p](x, A) : h[p], _), {});
2677
2677
  }
2678
2678
  function W(h) {
2679
2679
  let x = [];
@@ -2699,7 +2699,7 @@ var Ze = {};
2699
2699
  function v(h) {
2700
2700
  return [
2701
2701
  ...h
2702
- ].reduceRight((_, p) => y(p) ? p({
2702
+ ].reduceRight((_, p) => b(p) ? p({
2703
2703
  corePlugins: _
2704
2704
  }) : (0, n.default)(p, _), r.default);
2705
2705
  }
@@ -4981,7 +4981,7 @@ const qt = {
4981
4981
  name: "resize-observer",
4982
4982
  definition: tt
4983
4983
  }
4984
- ], b = {
4984
+ ], y = {
4985
4985
  eventGroup: "event-group",
4986
4986
  eventGroupBg: "event-group-bg",
4987
4987
  eventRect: "event-rect",
@@ -5245,6 +5245,12 @@ const qt = {
5245
5245
  },
5246
5246
  isInteractingWithCurtain() {
5247
5247
  return this.isHoveringCurtain || this.isDraggingCurtain;
5248
+ },
5249
+ flattenedCounts() {
5250
+ return [
5251
+ ...Object.values(this.lineGraphGroups),
5252
+ ...Object.values(this.barChartGroups)
5253
+ ].map((e) => e.events).flat();
5248
5254
  }
5249
5255
  },
5250
5256
  watch: {
@@ -5333,22 +5339,24 @@ const qt = {
5333
5339
  const t = 5;
5334
5340
  for (const r in this.xAxesConfig) {
5335
5341
  const n = this.createAxis(r);
5336
- this.xAxes[r] = n, this.svg.append("g").classed(b.xAxis, !0).classed(`${b.xAxis}-${r}`, !0).attr("transform", `translate(0, ${e || t})`).call(n), this.translateTicksText(r), e += this.axisHeight;
5342
+ this.xAxes[r] = n, this.svg.append("g").classed(y.xAxis, !0).classed(`${y.xAxis}-${r}`, !0).attr("transform", `translate(0, ${e || t})`).call(n), this.translateTicksText(r), e += this.axisHeight;
5337
5343
  }
5338
5344
  },
5339
5345
  initYScale() {
5340
- this.yScale = u.scaleLinear().range([this.chartHeight, 0]);
5341
- const e = [
5342
- ...Object.values(this.lineGraphGroups),
5343
- ...Object.values(this.barChartGroups)
5344
- ].map((r) => r.events).flat(), t = u.max(e, (r) => r.count);
5345
- this.yScale.domain([0, t]);
5346
+ this.yScale = u.scaleLinear().range([this.chartHeight, 0]), this.updateYScaleDomain();
5347
+ },
5348
+ updateYScaleDomain() {
5349
+ const [e, t] = this.timeScale.domain(), r = this.flattenedCounts.filter((a) => {
5350
+ const o = new Date(a.startDate || a.timestamp), i = new Date(a.endDate || a.timestamp);
5351
+ return i >= e && i <= t || o >= e && o <= t;
5352
+ }), n = u.max(r, (a) => a.count);
5353
+ this.yScale.domain([0, n]);
5346
5354
  },
5347
5355
  initZoomBehavior() {
5348
5356
  this.disableZoom || (this.zoomBehavior = u.zoom().on("zoom", this.handleZoom).scaleExtent([this.minZoom, this.maxZoom]), this.svg.call(this.zoomBehavior));
5349
5357
  },
5350
5358
  initSelectedTimestampCursor() {
5351
- this.svg.append("line").attr("class", b.selectedTimestampCursor).style("stroke", "red").style("stroke-width", "1px").style("opacity", 0).attr("x1", 0).attr("x2", 0).attr("y1", 0).attr("y2", this.timelineHeight), this.repositionSelectedTimestampCursor();
5359
+ this.svg.append("line").attr("class", y.selectedTimestampCursor).style("stroke", "red").style("stroke-width", "1px").style("opacity", 0).attr("x1", 0).attr("x2", 0).attr("y1", 0).attr("y2", this.timelineHeight), this.repositionSelectedTimestampCursor();
5352
5360
  },
5353
5361
  updateAndRedrawTimeline() {
5354
5362
  const { startDate: e, endDate: t } = this.getCurrentTimeBounds();
@@ -5358,7 +5366,7 @@ const qt = {
5358
5366
  this.svg && this.svg.remove(), this.countsByTimestamp = {};
5359
5367
  },
5360
5368
  repositionSelectedTimestampCursor() {
5361
- const e = this.svg.select(`.${b.selectedTimestampCursor}`);
5369
+ const e = this.svg.select(`.${y.selectedTimestampCursor}`);
5362
5370
  if (!this.selectedTimestamp) {
5363
5371
  e.style("opacity", 0);
5364
5372
  return;
@@ -5409,12 +5417,12 @@ const qt = {
5409
5417
  if (!this.showLabels)
5410
5418
  return;
5411
5419
  const e = this;
5412
- this.svg.selectAll(`.${b.labelBg}`).each(function() {
5420
+ this.svg.selectAll(`.${y.labelBg}`).each(function() {
5413
5421
  u.select(this).style("fill", e.dark ? "black" : "white");
5414
- }), this.svg.selectAll(`.${b.labelBgFill}`).each(function() {
5422
+ }), this.svg.selectAll(`.${y.labelBgFill}`).each(function() {
5415
5423
  const t = u.select(this), r = t.node().dataset.color;
5416
5424
  t.style("fill", e.getLabelBackgroundColor(r)).style("stroke", e.getTextFillColor(r)).style("stroke-width", 0.25);
5417
- }), this.svg.selectAll(`.${b.labelText}`).each(function() {
5425
+ }), this.svg.selectAll(`.${y.labelText}`).each(function() {
5418
5426
  const t = u.select(this), r = t.node().dataset.color;
5419
5427
  t.style("fill", e.getTextFillColor(r));
5420
5428
  });
@@ -5467,26 +5475,26 @@ const qt = {
5467
5475
  this.isHoveringEvent = !1, this.hoveredEvent = null, this.$emit("event-mouseout");
5468
5476
  },
5469
5477
  handleLabelMouseOver(e) {
5470
- u.selectAll(`.${b.lineGraphGroup}-${e}`).classed(
5471
- `${b.lineGraphGroup}--highlighted`,
5478
+ u.selectAll(`.${y.lineGraphGroup}-${e}`).classed(
5479
+ `${y.lineGraphGroup}--highlighted`,
5472
5480
  !0
5473
- ), u.selectAll(`.${b.lineGraphGroup}-label`).classed(
5474
- `${b.lineGraphGroup}-label--highlighted`,
5481
+ ), u.selectAll(`.${y.lineGraphGroup}-label`).classed(
5482
+ `${y.lineGraphGroup}-label--highlighted`,
5475
5483
  !0
5476
5484
  );
5477
5485
  },
5478
5486
  handleLabelMouseLeave(e) {
5479
- u.selectAll(`.${b.lineGraphGroup}-${e}`).classed(
5480
- `${b.lineGraphGroup}--highlighted`,
5487
+ u.selectAll(`.${y.lineGraphGroup}-${e}`).classed(
5488
+ `${y.lineGraphGroup}--highlighted`,
5481
5489
  !1
5482
- ), u.selectAll(`.${b.lineGraphGroup}-label`).classed(
5483
- `${b.lineGraphGroup}-label--highlighted`,
5490
+ ), u.selectAll(`.${y.lineGraphGroup}-label`).classed(
5491
+ `${y.lineGraphGroup}-label--highlighted`,
5484
5492
  !1
5485
5493
  );
5486
5494
  },
5487
5495
  handleZoom(e) {
5488
5496
  const t = e.transform.rescaleX(this.initialTimeScale);
5489
- this.timeScale.domain(t.domain()), this.updateCurrentTimeScaleDensity();
5497
+ this.timeScale.domain(t.domain()), this.updateCurrentTimeScaleDensity(), this.updateYScaleDomain();
5490
5498
  const r = e.transform.k / this.lastTransform.k;
5491
5499
  this.transformDiff = {
5492
5500
  scale: r,
@@ -5509,7 +5517,7 @@ const qt = {
5509
5517
  },
5510
5518
  updateCurtainsOnResize(e) {
5511
5519
  const { startDate: t, endDate: r } = this.calculateDateRangeFromCurtains(), n = this.timeScale.domain(), a = n[1].getTime() - n[0].getTime(), o = t.getTime() - n[0].getTime(), i = n[1].getTime() - r.getTime();
5512
- this.leftCurtainWidth = o / a * e, this.rightCurtainWidth = i / a * e, this.svg.select(`.${b.curtain}--left`).attr("width", this.leftCurtainWidth), this.svg.select(`.${b.curtain}--right`).attr(
5520
+ this.leftCurtainWidth = o / a * e, this.rightCurtainWidth = i / a * e, this.svg.select(`.${y.curtain}--left`).attr("width", this.leftCurtainWidth), this.svg.select(`.${y.curtain}--right`).attr(
5513
5521
  "x",
5514
5522
  e - this.rightCurtainWidth + this.curtainHandleWidth * 2
5515
5523
  ).attr("width", this.rightCurtainWidth);
@@ -5526,7 +5534,7 @@ const qt = {
5526
5534
  e.x,
5527
5535
  this.timeline.offsetWidth - this.rightCurtainWidth
5528
5536
  );
5529
- this.leftCurtainWidth = Math.max(0, t), this.svg.select(`.${b.curtain}--left`).attr("width", this.leftCurtainWidth), this.emitCurtainChange();
5537
+ this.leftCurtainWidth = Math.max(0, t), this.svg.select(`.${y.curtain}--left`).attr("width", this.leftCurtainWidth), this.emitCurtainChange();
5530
5538
  },
5531
5539
  handleRightDrag(e) {
5532
5540
  e.sourceEvent.stopPropagation();
@@ -5534,7 +5542,7 @@ const qt = {
5534
5542
  this.timeline.offsetWidth - e.x,
5535
5543
  this.timeline.offsetWidth - this.leftCurtainWidth
5536
5544
  ), n = t - r;
5537
- this.rightCurtainWidth = Math.max(0, r), this.svg.select(`.${b.curtain}--right`).attr("width", this.rightCurtainWidth).attr("x", n), this.emitCurtainChange();
5545
+ this.rightCurtainWidth = Math.max(0, r), this.svg.select(`.${y.curtain}--right`).attr("width", this.rightCurtainWidth).attr("x", n), this.emitCurtainChange();
5538
5546
  },
5539
5547
  zoomToStartAndEndDates() {
5540
5548
  const e = this.startDate || this.oldestEvent.timestamp || this.oldestEvent.startDate, t = this.endDate || this.latestEvent.timestamp || this.latestEvent.endDate, r = this.tzStringToDate(e), n = this.tzStringToDate(t), a = this.timeline.offsetWidth, o = [r, n], i = [0, a];
@@ -5547,29 +5555,31 @@ const qt = {
5547
5555
  const r = this.xAxes[e], n = this.getAxisTicksConfig(
5548
5556
  this.xAxesConfig[e]
5549
5557
  );
5550
- r.scale(t).ticks(n.interval).tickFormat(n.formatFn).tickSizeOuter(0), this.svg.select(`.${b.xAxis}-${e}`).call(r);
5558
+ r.scale(t).ticks(n.interval).tickFormat(n.formatFn).tickSizeOuter(0), this.svg.select(`.${y.xAxis}-${e}`).call(r);
5551
5559
  },
5552
5560
  translateTicksText(e) {
5553
- this.svg.select(`.${b.xAxis}-${e}`).selectAll(".tick text").each(function() {
5561
+ this.svg.select(`.${y.xAxis}-${e}`).selectAll(".tick text").each(function() {
5554
5562
  let t = u.select(this), r = t.node().getBBox();
5555
5563
  t.attr("x", r.height / 2).attr("y", 0).style("text-anchor", "start");
5556
5564
  });
5557
5565
  },
5558
5566
  updateEventsBars() {
5559
- const e = `.${b.eventGroup} > rect.${b.eventRect}`;
5567
+ const e = `.${y.eventGroup} > rect.${y.eventRect}`;
5560
5568
  this.svg.selectAll(e).attr("x", this.getEventRectX).attr("width", this.getEventRectWidth);
5561
- const t = `.${b.eventGroup} > text.${b.eventRectText}`;
5569
+ const t = `.${y.eventGroup} > text.${y.eventRectText}`;
5562
5570
  this.svg.selectAll(t).attr("x", (r) => this.getEventRectX(r) + this.textPadding).text(this.getEventText);
5563
5571
  },
5564
5572
  updateBarChart() {
5565
- const e = (n) => this.getEventRectX(n) + this.barXPadding, t = (n) => this.getEventRectWidth(n) - this.barXPadding * 2, r = `.${b.barChartGroup} > rect`;
5566
- this.svg.selectAll(r).attr("x", e).attr("width", t);
5573
+ const e = (o) => this.getEventRectX(o) + this.barXPadding, t = (o) => this.yScale(o.count), r = (o) => this.getEventRectWidth(o) - this.barXPadding * 2, n = (o) => this.yScale.range()[0] - this.yScale(o.count), a = `.${y.barChartGroup} > rect`;
5574
+ this.svg.selectAll(a).attr("x", e).attr("width", r).attr("y", t), this.svg.selectAll(
5575
+ `${a}:not(.${y.eventBarCap})`
5576
+ ).attr("height", n);
5567
5577
  },
5568
5578
  updateLineGraphs() {
5569
5579
  Object.entries(this.lineGraphGroups).forEach(([e]) => {
5570
5580
  const t = u.area().x((r) => this.timeScale(this.tzStringToDate(r.timestamp))).y0(this.timelineHeight).y1((r) => this.yScale(r.count)).curve(u.curveMonotoneX);
5571
5581
  this.svg.selectAll(
5572
- `.${b.lineGraphPath}-${e}`
5582
+ `.${y.lineGraphPath}-${e}`
5573
5583
  ).attr("d", (r) => t(r));
5574
5584
  });
5575
5585
  },
@@ -5577,11 +5587,11 @@ const qt = {
5577
5587
  Object.keys(this.lineGraphGroups).forEach((e) => {
5578
5588
  const t = this;
5579
5589
  this.svg.selectAll(
5580
- `.${b.lineGraphDot}-${e}`
5590
+ `.${y.lineGraphDot}-${e}`
5581
5591
  ).each(function(r) {
5582
5592
  u.select(this).attr("cx", t.timeScale(t.tzStringToDate(r.timestamp))).attr("cy", t.yScale(r.count));
5583
5593
  }), this.svg.selectAll(
5584
- `.${b.lineGraphHoverZone}-${e}`
5594
+ `.${y.lineGraphHoverZone}-${e}`
5585
5595
  ).each(function(r) {
5586
5596
  const n = t.timeScale(t.tzStringToDate(r.timestamp).getTime()) - 15;
5587
5597
  u.select(this).attr("x", n).attr("y", 0).attr("width", 30).attr("height", t.chartHeight);
@@ -5611,9 +5621,9 @@ const qt = {
5611
5621
  if (!this.curtains)
5612
5622
  return;
5613
5623
  const e = this.timeline.offsetWidth, t = this.timelineHeight;
5614
- this.svg.append("rect").classed(`${b.curtain} ${b.curtain}--left`, !0).attr("width", this.leftCurtainWidth).attr("height", t + this.curtainHandleWidth * 2).attr("y", -this.curtainHandleWidth).attr("x", -this.curtainHandleWidth).attr("fill", "rgba(0, 0, 0, 0.5)").on("mouseenter", () => this.isHoveringCurtain = !0).on("mouseleave", () => this.isHoveringCurtain = !1).call(
5624
+ this.svg.append("rect").classed(`${y.curtain} ${y.curtain}--left`, !0).attr("width", this.leftCurtainWidth).attr("height", t + this.curtainHandleWidth * 2).attr("y", -this.curtainHandleWidth).attr("x", -this.curtainHandleWidth).attr("fill", "rgba(0, 0, 0, 0.5)").on("mouseenter", () => this.isHoveringCurtain = !0).on("mouseleave", () => this.isHoveringCurtain = !1).call(
5615
5625
  u.drag().on("start", this.handleDragStart).on("drag", this.handleLeftDrag).on("end", this.handleDragEnd)
5616
- ), this.svg.append("rect").classed(`${b.curtain} ${b.curtain}--right`, !0).attr(
5626
+ ), this.svg.append("rect").classed(`${y.curtain} ${y.curtain}--right`, !0).attr(
5617
5627
  "x",
5618
5628
  e - this.rightCurtainWidth + this.curtainHandleWidth * 2
5619
5629
  ).attr("y", -this.curtainHandleWidth).attr("width", this.rightCurtainWidth + this.curtainHandleWidth * 2).attr("height", t + this.curtainHandleWidth * 2).attr("fill", "rgba(0, 0, 0, 0.5)").on("mouseenter", () => this.isHoveringCurtain = !0).on("mouseleave", () => this.isHoveringCurtain = !1).call(
@@ -5621,13 +5631,13 @@ const qt = {
5621
5631
  );
5622
5632
  },
5623
5633
  drawEventsGroups() {
5624
- this.svg.selectAll(`g.${b.eventGroup}`).remove(), this.drawLineGraphEventsGroups(), this.drawBarEventsGroups(), this.drawBarChartEventsGroups();
5634
+ this.svg.selectAll(`g.${y.eventGroup}`).remove(), this.drawLineGraphEventsGroups(), this.drawBarEventsGroups(), this.drawBarChartEventsGroups();
5625
5635
  },
5626
5636
  drawLineGraphEventsGroups() {
5627
5637
  const e = this.combinedXAxesHeight, t = this.insertZerosAtInterval ? this.filledGapsLineGraphGroups : this.lineGraphGroups;
5628
5638
  Object.entries(t).forEach(([r, n]) => {
5629
5639
  const a = this.svg.append("g").classed(
5630
- `${b.lineGraphGroup} ${b.lineGraphGroup}-${r}`,
5640
+ `${y.lineGraphGroup} ${y.lineGraphGroup}-${r}`,
5631
5641
  !0
5632
5642
  ).attr("transform", `translate(0,${e})`), { color: o, events: i } = n;
5633
5643
  this.drawLineGraph({
@@ -5643,7 +5653,7 @@ const qt = {
5643
5653
  });
5644
5654
  }), Object.entries(this.lineGraphGroups).forEach(
5645
5655
  ([r, n], a) => {
5646
- const { color: o, isLoading: i, label: d } = n, l = this.chartHeight - this.barChartHeight * (a + 1), s = e + this.chartHeight - this.barChartHeight, c = this.svg.append("g").classed(`${b.lineGraphGroup}-label`, !0).attr("transform", `translate(0,${e})`).on("mouseover", () => this.handleLabelMouseOver(r)).on("mouseleave", () => this.handleLabelMouseLeave(r));
5656
+ const { color: o, isLoading: i, label: d } = n, l = this.chartHeight - this.barChartHeight * (a + 1), s = e + this.chartHeight - this.barChartHeight, c = this.svg.append("g").classed(`${y.lineGraphGroup}-label`, !0).attr("transform", `translate(0,${e})`).on("mouseover", () => this.handleLabelMouseOver(r)).on("mouseleave", () => this.handleLabelMouseLeave(r));
5647
5657
  this.drawProgressIndicator({
5648
5658
  type: r,
5649
5659
  color: o,
@@ -5665,7 +5675,7 @@ const qt = {
5665
5675
  type: n
5666
5676
  }) {
5667
5677
  const a = u.area().x((i) => this.timeScale(this.tzStringToDate(i.timestamp))).y0(this.timelineHeight).y1((i) => this.yScale(i.count)).curve(u.curveMonotoneX), o = `clip-${n}`;
5668
- t.append("defs").append("clipPath").attr("id", o).append("rect").attr("width", this.timeline.offsetWidth).attr("height", this.chartHeight), t.append("path").datum(e).classed(`${b.lineGraphPath}-${n}`, !0).attr("fill", `url(#${Y.transparencyGradientLight}-${n})`).attr("stroke", r).attr("stroke-linejoin", "round").attr("stroke-linecap", "round").attr("stroke-width", 1).attr("d", (i) => a(i)).attr("clip-path", `url(#${o})`);
5678
+ t.append("defs").append("clipPath").attr("id", o).append("rect").attr("width", this.timeline.offsetWidth).attr("height", this.chartHeight), t.append("path").datum(e).classed(`${y.lineGraphPath}-${n}`, !0).attr("fill", `url(#${Y.transparencyGradientLight}-${n})`).attr("stroke", r).attr("stroke-linejoin", "round").attr("stroke-linecap", "round").attr("stroke-width", 1).attr("d", (i) => a(i)).attr("clip-path", `url(#${o})`);
5669
5679
  },
5670
5680
  drawLineGraphHoverZones({
5671
5681
  events: e,
@@ -5680,19 +5690,19 @@ const qt = {
5680
5690
  [n]: a.count
5681
5691
  };
5682
5692
  const i = t.append("circle").classed(
5683
- `${b.lineGraphDot} ${b.lineGraphDot}-${n}`,
5693
+ `${y.lineGraphDot} ${y.lineGraphDot}-${n}`,
5684
5694
  !0
5685
5695
  ).attr("cx", this.timeScale(this.tzStringToDate(a.timestamp))).attr("cy", this.yScale(a.count)).attr("r", 1.5).attr("fill", r).attr("stroke-width", 0).datum(a);
5686
5696
  this.dotsByTimestamp[o] = [
5687
5697
  ...this.dotsByTimestamp[o] || [],
5688
5698
  i
5689
- ], t.append("rect").classed(`${b.lineGraphHoverZone}-${n}`, !0).attr("x", this.timeScale(this.tzStringToDate(a.timestamp)) - 15).attr("y", 0).attr("width", 30).attr("height", this.chartHeight).attr("fill", "transparent").datum(a).on("mouseover", (d) => {
5699
+ ], t.append("rect").classed(`${y.lineGraphHoverZone}-${n}`, !0).attr("x", this.timeScale(this.tzStringToDate(a.timestamp)) - 15).attr("y", 0).attr("width", 30).attr("height", this.chartHeight).attr("fill", "transparent").datum(a).on("mouseover", (d) => {
5690
5700
  this.handleLineMouseOver(d, a, n), this.dotsByTimestamp[o].forEach(
5691
- (l) => l.classed(`${b.lineGraphDot}--active`, !0)
5701
+ (l) => l.classed(`${y.lineGraphDot}--active`, !0)
5692
5702
  );
5693
5703
  }).on("mouseout", () => {
5694
5704
  this.handleLineMouseOut(), this.dotsByTimestamp[o].forEach(
5695
- (d) => d.classed(`${b.lineGraphDot}--active`, !1)
5705
+ (d) => d.classed(`${y.lineGraphDot}--active`, !1)
5696
5706
  );
5697
5707
  });
5698
5708
  });
@@ -5706,7 +5716,7 @@ const qt = {
5706
5716
  color: n,
5707
5717
  isLoading: d
5708
5718
  });
5709
- const c = this.svg.append("g").attr("data-color", n).classed(b.eventGroup, !0).classed(`${b.eventGroup}-${e}`, !0);
5719
+ const c = this.svg.append("g").attr("data-color", n).classed(y.eventGroup, !0).classed(`${y.eventGroup}-${e}`, !0);
5710
5720
  this.drawBackground({
5711
5721
  color: a || n,
5712
5722
  gElement: c,
@@ -5729,7 +5739,7 @@ const qt = {
5729
5739
  const e = this.combinedXAxesHeight, t = this.barChartGroups;
5730
5740
  Object.entries(t).forEach(([r, n]) => {
5731
5741
  const a = this.svg.append("g").classed(
5732
- `${b.barChartGroup} ${b.barChartGroup}-${r}`,
5742
+ `${y.barChartGroup} ${y.barChartGroup}-${r}`,
5733
5743
  !0
5734
5744
  ).attr("transform", `translate(0,${e})`), { color: o, events: i } = n;
5735
5745
  this.drawBarsChart({
@@ -5746,7 +5756,7 @@ const qt = {
5746
5756
  isLoading: r
5747
5757
  }) {
5748
5758
  this.svg.append("rect").classed(
5749
- `${b.loadingIndicator} ${b.loadingIndicator}-${t}`,
5759
+ `${y.loadingIndicator} ${y.loadingIndicator}-${t}`,
5750
5760
  !0
5751
5761
  ).attr("x", 0).attr("y", e).attr("width", this.timeline.offsetWidth / 3).attr("height", this.barChartHeight).attr("fill", `url(#${Y.loadingGradient}-${t})`).style("visibility", r ? "visible" : "hidden");
5752
5762
  },
@@ -5755,7 +5765,7 @@ const qt = {
5755
5765
  yPosition: t,
5756
5766
  gElement: r
5757
5767
  }) {
5758
- r.append("rect").attr("class", b.eventGroupBg).attr("x", 0).attr("y", t).attr("width", this.timeline.offsetWidth).attr("height", this.barChartHeight).attr("fill", u.color(e).toString()).style("opacity", 0.1);
5768
+ r.append("rect").attr("class", y.eventGroupBg).attr("x", 0).attr("y", t).attr("width", this.timeline.offsetWidth).attr("height", this.barChartHeight).attr("fill", u.color(e).toString()).style("opacity", 0.1);
5759
5769
  },
5760
5770
  drawBars({
5761
5771
  events: e,
@@ -5765,11 +5775,11 @@ const qt = {
5765
5775
  type: a
5766
5776
  }) {
5767
5777
  const o = this;
5768
- t.selectAll(b.eventRect).data(e).enter().append("rect").classed(b.eventRect, !0).attr("x", this.getEventRectX).attr("y", r + this.barYPadding / 2).attr("ry", 1.5).attr("rx", 1.5).attr("width", this.getEventRectWidth).attr("height", this.barChartHeight - this.barYPadding).attr("stroke-width", 5).attr("cursor", "pointer").attr("stroke", "#0000").style("fill", (i) => i.color || n).on("mouseover", function(i, d) {
5769
- u.select(this).classed(`${b.eventRect}--hovered`, !0), o.handleBarMouseOver(i, d, a);
5778
+ t.selectAll(y.eventRect).data(e).enter().append("rect").classed(y.eventRect, !0).attr("x", this.getEventRectX).attr("y", r + this.barYPadding / 2).attr("ry", 1.5).attr("rx", 1.5).attr("width", this.getEventRectWidth).attr("height", this.barChartHeight - this.barYPadding).attr("stroke-width", 5).attr("cursor", "pointer").attr("stroke", "#0000").style("fill", (i) => i.color || n).on("mouseover", function(i, d) {
5779
+ u.select(this).classed(`${y.eventRect}--hovered`, !0), o.handleBarMouseOver(i, d, a);
5770
5780
  }).on("mouseout", function() {
5771
- u.select(this).classed(`${b.eventRect}--hovered`, !1), o.handleBarMouseOut();
5772
- }), t.selectAll(b.eventRectText).data(e.filter((i) => !!i.text)).enter().append("text").attr("class", b.eventRectText).attr("x", (i) => this.getEventRectX(i) + this.textPadding).attr("y", r + this.barChartHeight / 2).attr("dy", "0.35em").style("text-anchor", "start").style("font-size", "12px").style("font-weight", 600).style("stroke-linejoin", "round").style("paint-order", "stroke").style("pointer-events", "none").style(
5781
+ u.select(this).classed(`${y.eventRect}--hovered`, !1), o.handleBarMouseOut();
5782
+ }), t.selectAll(y.eventRectText).data(e.filter((i) => !!i.text)).enter().append("text").attr("class", y.eventRectText).attr("x", (i) => this.getEventRectX(i) + this.textPadding).attr("y", r + this.barChartHeight / 2).attr("dy", "0.35em").style("text-anchor", "start").style("font-size", "12px").style("font-weight", 600).style("stroke-linejoin", "round").style("paint-order", "stroke").style("pointer-events", "none").style(
5773
5783
  "fill",
5774
5784
  (i) => this.getTextFillColor(i.color || n, 0.75)
5775
5785
  ).text(this.getEventText);
@@ -5781,13 +5791,16 @@ const qt = {
5781
5791
  type: n
5782
5792
  }) {
5783
5793
  const a = this, o = (s) => this.getEventRectX(s) + this.barXPadding, i = (s) => this.yScale(s.count), d = (s) => this.getEventRectWidth(s) - this.barXPadding * 2, l = (s) => this.yScale.range()[0] - this.yScale(s.count);
5784
- t.selectAll(b.eventBar).data(e).enter().append("rect").classed(b.eventBar, !0).attr("x", o).attr("y", i).attr("width", d).attr("height", l).attr("stroke-width", 5).attr("cursor", "pointer").attr("stroke", "#0000").attr("fill", `url(#${Y.transparencyGradient}-${n})`).on("mouseover", function(s, c) {
5794
+ t.selectAll(y.eventBar).data(e).enter().append("rect").classed(y.eventBar, !0).attr("x", o).attr("y", i).attr("width", d).attr("height", l).attr("stroke-width", 5).attr("cursor", "pointer").attr("stroke", "#0000").attr(
5795
+ "fill",
5796
+ (s) => s.color || `url(#${Y.transparencyGradient}-${n})`
5797
+ ).on("mouseover", function(s, c) {
5785
5798
  const g = u.select(this);
5786
- g.classed(`${b.eventBar}--hovered`, !0), g.attr("fill", s.color || r), g.attr("fill-opacity", 0.5), a.handleBarMouseOver(s, c, n);
5799
+ g.classed(`${y.eventBar}--hovered`, !0), g.attr("fill", s.color || r), g.attr("fill-opacity", 0.5), a.handleBarMouseOver(s, c, n);
5787
5800
  }).on("mouseout", function() {
5788
5801
  const s = u.select(this);
5789
- s.attr("fill", `url(#${Y.transparencyGradient}-${n})`), s.attr("fill-opacity", 1), s.classed(`${b.eventBar}--hovered`, !1), a.handleBarMouseOut();
5790
- }), t.selectAll(b.eventBarCap).data(e).enter().append("rect").attr("x", o).attr("y", i).attr("width", d).attr("height", 2).attr("stroke-width", 0).style("fill", (s) => s.color || r);
5802
+ s.attr("fill", `url(#${Y.transparencyGradient}-${n})`), s.attr("fill-opacity", 1), s.classed(`${y.eventBar}--hovered`, !1), a.handleBarMouseOut();
5803
+ }), t.selectAll(y.eventBarCap).data(e).enter().append("rect").classed(y.eventBarCap, !0).attr("x", o).attr("y", i).attr("width", d).attr("height", 2).attr("stroke-width", 0).style("fill", (s) => s.color || r);
5791
5804
  },
5792
5805
  drawTextLabel({
5793
5806
  gElement: e,
@@ -5804,7 +5817,7 @@ const qt = {
5804
5817
  h: this.barChartHeight,
5805
5818
  radius: 3
5806
5819
  };
5807
- e.append("rect").attr("class", b.labelBg).attr("data-color", r).attr("x", a.x).attr("y", a.y).attr("width", a.w).attr("height", a.h).attr("rx", a.radius).attr("ry", a.radius).style("fill", this.dark ? "#131a29" : "white"), e.append("rect").attr("class", b.labelBgFill).attr("data-color", r).attr("x", a.x).attr("y", a.y).attr("width", a.w).attr("height", a.h).attr("rx", a.radius).attr("ry", a.radius).style("fill", this.getLabelBackgroundColor(r)).style("stroke", this.getTextFillColor(r)).style("stroke-width", 0.25), e.append("text").attr("class", b.labelText).attr("data-color", r).attr("x", 5).attr("y", t + this.barChartHeight / 2).attr("dy", "0.35em").style("text-anchor", "start").style("font-size", "12px").style("font-weight", 500).style("stroke-linejoin", "round").style("paint-order", "stroke").style("fill", this.getTextFillColor(r)).text(n);
5820
+ e.append("rect").attr("class", y.labelBg).attr("data-color", r).attr("x", a.x).attr("y", a.y).attr("width", a.w).attr("height", a.h).attr("rx", a.radius).attr("ry", a.radius).style("fill", this.dark ? "#131a29" : "white"), e.append("rect").attr("class", y.labelBgFill).attr("data-color", r).attr("x", a.x).attr("y", a.y).attr("width", a.w).attr("height", a.h).attr("rx", a.radius).attr("ry", a.radius).style("fill", this.getLabelBackgroundColor(r)).style("stroke", this.getTextFillColor(r)).style("stroke-width", 0.25), e.append("text").attr("class", y.labelText).attr("data-color", r).attr("x", 5).attr("y", t + this.barChartHeight / 2).attr("dy", "0.35em").style("text-anchor", "start").style("font-size", "12px").style("font-weight", 500).style("stroke-linejoin", "round").style("paint-order", "stroke").style("fill", this.getTextFillColor(r)).text(n);
5808
5821
  },
5809
5822
  getTextFillColor(e, t = 0) {
5810
5823
  var r, n;