@adyen/lume 0.3.1 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
- import q, { isRef as Kt, reactive as it, computed as d, ref as L, watch as R, defineComponent as k, toRefs as S, onMounted as H, onBeforeUnmount as Jt, watchEffect as Qt, useSlots as j, defineAsyncComponent as ht } from "vue";
2
- import { sankeyLinkHorizontal as Oe, sankey as xe, sankeyJustify as Le } from "d3-sankey";
3
- import { format as $e, ticks as ke, scaleBand as J, scaleLinear as Q, line as we, area as Se } from "d3";
4
- import { createPopper as Ce } from "@popperjs/core";
1
+ import Y, { isRef as Yt, computed as d, ref as L, watch as C, defineComponent as $, toRefs as I, reactive as it, inject as Kt, onMounted as G, onBeforeUnmount as Jt, watchEffect as Qt, useSlots as H, provide as Et, defineAsyncComponent as _t } from "vue";
2
+ import { sankeyLinkHorizontal as xe, sankey as Le, sankeyJustify as $e } from "d3-sankey";
3
+ import { format as we, ticks as Ie, scaleBand as Q, scaleLinear as q, line as Se, area as De } from "d3";
4
+ import { createPopper as Re } from "@popperjs/core";
5
5
  function rt(e) {
6
6
  return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? rt = function(t) {
7
7
  return typeof t;
@@ -9,35 +9,35 @@ function rt(e) {
9
9
  return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
10
10
  }, rt(e);
11
11
  }
12
- function Ie(e) {
13
- return Re(e) || Pe(e) || De();
12
+ function Pe(e) {
13
+ return Ee(e) || Ce(e) || Ne();
14
14
  }
15
- function Re(e) {
15
+ function Ee(e) {
16
16
  if (Array.isArray(e)) {
17
17
  for (var t = 0, r = new Array(e.length); t < e.length; t++)
18
18
  r[t] = e[t];
19
19
  return r;
20
20
  }
21
21
  }
22
- function Pe(e) {
22
+ function Ce(e) {
23
23
  if (Symbol.iterator in Object(e) || Object.prototype.toString.call(e) === "[object Arguments]")
24
24
  return Array.from(e);
25
25
  }
26
- function De() {
26
+ function Ne() {
27
27
  throw new TypeError("Invalid attempt to spread non-iterable instance");
28
28
  }
29
29
  var nt = typeof window < "u";
30
- function Ee(e) {
30
+ function Be(e) {
31
31
  return Array.isArray(e) || rt(e) === "object" ? Object.freeze(e) : e;
32
32
  }
33
- function Ne(e) {
33
+ function Ge(e) {
34
34
  var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
35
35
  return e.reduce(function(r, n) {
36
36
  var a = n.passengers[0], o = typeof a == "function" ? a(t) : n.passengers;
37
37
  return r.concat(o);
38
38
  }, []);
39
39
  }
40
- function Be(e, t) {
40
+ function He(e, t) {
41
41
  return e.map(function(r, n) {
42
42
  return [n, r];
43
43
  }).sort(function(r, n) {
@@ -46,16 +46,16 @@ function Be(e, t) {
46
46
  return r[1];
47
47
  });
48
48
  }
49
- function Nt(e, t) {
49
+ function Ct(e, t) {
50
50
  return t.reduce(function(r, n) {
51
51
  return e.hasOwnProperty(n) && (r[n] = e[n]), r;
52
52
  }, {});
53
53
  }
54
- var te = {}, He = {}, je = {}, Ve = q.extend({
54
+ var qt = {}, Ve = {}, je = {}, Fe = Y.extend({
55
55
  data: function() {
56
56
  return {
57
- transports: te,
58
- targets: He,
57
+ transports: qt,
58
+ targets: Ve,
59
59
  sources: je,
60
60
  trackInstances: nt
61
61
  };
@@ -68,13 +68,13 @@ var te = {}, He = {}, je = {}, Ve = q.extend({
68
68
  var i = {
69
69
  to: r,
70
70
  from: n,
71
- passengers: Ee(a),
71
+ passengers: Be(a),
72
72
  order: s
73
73
  }, l = Object.keys(this.transports);
74
- l.indexOf(r) === -1 && q.set(this.transports, r, []);
74
+ l.indexOf(r) === -1 && Y.set(this.transports, r, []);
75
75
  var u = this.$_getTransportIndex(i), c = this.transports[r].slice(0);
76
- u === -1 ? c.push(i) : c[u] = i, this.transports[r] = Be(c, function(f, _) {
77
- return f.order - _.order;
76
+ u === -1 ? c.push(i) : c[u] = i, this.transports[r] = He(c, function(p, v) {
77
+ return p.order - v.order;
78
78
  });
79
79
  }
80
80
  }
@@ -121,7 +121,7 @@ var te = {}, He = {}, je = {}, Ve = q.extend({
121
121
  return -1;
122
122
  }
123
123
  }
124
- }), I = new Ve(te), Fe = 1, Lt = q.extend({
124
+ }), E = new Fe(qt), Me = 1, te = Y.extend({
125
125
  name: "portal",
126
126
  props: {
127
127
  disabled: {
@@ -130,7 +130,7 @@ var te = {}, He = {}, je = {}, Ve = q.extend({
130
130
  name: {
131
131
  type: String,
132
132
  default: function() {
133
- return String(Fe++);
133
+ return String(Me++);
134
134
  }
135
135
  },
136
136
  order: {
@@ -160,7 +160,7 @@ var te = {}, He = {}, je = {}, Ve = q.extend({
160
160
  created: function() {
161
161
  var t = this;
162
162
  this.$nextTick(function() {
163
- I.registerSource(t.name, t);
163
+ E.registerSource(t.name, t);
164
164
  });
165
165
  },
166
166
  mounted: function() {
@@ -170,7 +170,7 @@ var te = {}, He = {}, je = {}, Ve = q.extend({
170
170
  this.disabled ? this.clear() : this.sendUpdate();
171
171
  },
172
172
  beforeDestroy: function() {
173
- I.unregisterSource(this.name), this.clear();
173
+ E.unregisterSource(this.name), this.clear();
174
174
  },
175
175
  watch: {
176
176
  to: function(t, r) {
@@ -183,7 +183,7 @@ var te = {}, He = {}, je = {}, Ve = q.extend({
183
183
  from: this.name,
184
184
  to: t || this.to
185
185
  };
186
- I.close(r);
186
+ E.close(r);
187
187
  },
188
188
  normalizeSlots: function() {
189
189
  return this.$scopedSlots.default ? [this.$scopedSlots.default] : this.$slots.default;
@@ -197,10 +197,10 @@ var te = {}, He = {}, je = {}, Ve = q.extend({
197
197
  var r = {
198
198
  from: this.name,
199
199
  to: this.to,
200
- passengers: Ie(t),
200
+ passengers: Pe(t),
201
201
  order: this.order
202
202
  };
203
- I.open(r);
203
+ E.open(r);
204
204
  } else
205
205
  this.clear();
206
206
  }
@@ -217,7 +217,7 @@ var te = {}, He = {}, je = {}, Ve = q.extend({
217
217
  key: "v-portal-placeholder"
218
218
  });
219
219
  }
220
- }), $t = q.extend({
220
+ }), ee = Y.extend({
221
221
  name: "portalTarget",
222
222
  props: {
223
223
  multiple: {
@@ -248,14 +248,14 @@ var te = {}, He = {}, je = {}, Ve = q.extend({
248
248
  },
249
249
  data: function() {
250
250
  return {
251
- transports: I.transports,
251
+ transports: E.transports,
252
252
  firstRender: !0
253
253
  };
254
254
  },
255
255
  created: function() {
256
256
  var t = this;
257
257
  this.$nextTick(function() {
258
- I.registerTarget(t.name, t);
258
+ E.registerTarget(t.name, t);
259
259
  });
260
260
  },
261
261
  watch: {
@@ -263,7 +263,7 @@ var te = {}, He = {}, je = {}, Ve = q.extend({
263
263
  this.$emit("change", this.children().length > 0);
264
264
  },
265
265
  name: function(t, r) {
266
- I.unregisterTarget(r), I.registerTarget(t, this);
266
+ E.unregisterTarget(r), E.registerTarget(t, this);
267
267
  }
268
268
  },
269
269
  mounted: function() {
@@ -273,7 +273,7 @@ var te = {}, He = {}, je = {}, Ve = q.extend({
273
273
  });
274
274
  },
275
275
  beforeDestroy: function() {
276
- I.unregisterTarget(this.name);
276
+ E.unregisterTarget(this.name);
277
277
  },
278
278
  computed: {
279
279
  ownTransports: function() {
@@ -281,7 +281,7 @@ var te = {}, He = {}, je = {}, Ve = q.extend({
281
281
  return this.multiple ? t : t.length === 0 ? [] : [t[t.length - 1]];
282
282
  },
283
283
  passengers: function() {
284
- return Ne(this.ownTransports, this.slotProps);
284
+ return Ge(this.ownTransports, this.slotProps);
285
285
  }
286
286
  },
287
287
  methods: {
@@ -304,8 +304,8 @@ var te = {}, He = {}, je = {}, Ve = q.extend({
304
304
  }
305
305
  }, n);
306
306
  }
307
- }), Ge = 0, Me = ["disabled", "name", "order", "slim", "slotProps", "tag", "to"], ze = ["multiple", "transition"];
308
- q.extend({
307
+ }), ze = 0, We = ["disabled", "name", "order", "slim", "slotProps", "tag", "to"], Ze = ["multiple", "transition"];
308
+ Y.extend({
309
309
  name: "MountingPortal",
310
310
  inheritAttrs: !1,
311
311
  props: {
@@ -325,7 +325,7 @@ q.extend({
325
325
  name: {
326
326
  type: String,
327
327
  default: function() {
328
- return "mounted_" + String(Ge++);
328
+ return "mounted_" + String(ze++);
329
329
  }
330
330
  },
331
331
  order: {
@@ -380,9 +380,9 @@ q.extend({
380
380
  return;
381
381
  }
382
382
  var r = this.$props;
383
- if (I.targets[r.name]) {
383
+ if (E.targets[r.name]) {
384
384
  r.bail ? console.warn("[portal-vue]: Target ".concat(r.name, ` is already mounted.
385
- Aborting because 'bail: true' is set`)) : this.portalTarget = I.targets[r.name];
385
+ Aborting because 'bail: true' is set`)) : this.portalTarget = E.targets[r.name];
386
386
  return;
387
387
  }
388
388
  var n = r.append;
@@ -390,8 +390,8 @@ q.extend({
390
390
  var a = typeof n == "string" ? n : "DIV", o = document.createElement(a);
391
391
  t.appendChild(o), t = o;
392
392
  }
393
- var s = Nt(this.$props, ze);
394
- s.slim = this.targetSlim, s.tag = this.targetTag, s.slotProps = this.targetSlotProps, s.name = this.to, this.portalTarget = new $t({
393
+ var s = Ct(this.$props, Ze);
394
+ s.slim = this.targetSlim, s.tag = this.targetTag, s.slotProps = this.targetSlotProps, s.name = this.to, this.portalTarget = new ee({
395
395
  el: t,
396
396
  parent: this.$parent || this,
397
397
  propsData: s
@@ -410,8 +410,8 @@ q.extend({
410
410
  if (!this.portalTarget)
411
411
  return console.warn("[portal-vue] Target wasn't mounted"), t();
412
412
  if (!this.$scopedSlots.manual) {
413
- var r = Nt(this.$props, Me);
414
- return t(Lt, {
413
+ var r = Ct(this.$props, We);
414
+ return t(te, {
415
415
  props: r,
416
416
  attrs: this.$attrs,
417
417
  on: this.$listeners,
@@ -424,75 +424,36 @@ q.extend({
424
424
  return Array.isArray(n) && (n = n[0]), n || t();
425
425
  }
426
426
  });
427
- var E = /* @__PURE__ */ ((e) => (e.Skyblue = "skyblue", e.Royalblue = "royalblue", e.Violet = "violet", e.Darkteal = "darkteal", e.Gold = "gold", e))(E || {}), kt = /* @__PURE__ */ ((e) => (e.SkyTeal = "skyblue-darkteal", e.VioletRoyal = "violet-royalblue", e.VioletTeal = "violet-darkteal", e.GoldTeal = "gold-darkteal", e.GoldRoyal = "gold-royalblue", e))(kt || {}), ee = /* @__PURE__ */ ((e) => (e.Grey = "grey", e.Green = "green", e.Orange = "orange", e.Red = "red", e))(ee || {}), wt = /* @__PURE__ */ ((e) => (e["01"] = "01", e["02"] = "02", e["03"] = "03", e["04"] = "04", e["05"] = "05", e["06"] = "06", e["07"] = "07", e["08"] = "08", e["09"] = "09", e))(wt || {});
428
- const b = {
429
- HORIZONTAL: "horizontal",
430
- VERTICAL: "vertical"
431
- }, We = {
432
- SINGLE: "single",
433
- GROUPED: "grouped",
434
- STACKED: "stacked"
435
- }, G = {
436
- VERTICAL: {
437
- top: 16,
438
- right: 0,
439
- bottom: 28,
440
- left: 24
441
- },
442
- HORIZONTAL: {
443
- top: 16,
444
- right: 0,
445
- bottom: 28,
446
- left: 24
447
- }
448
- }, ne = "No data", Ze = 20, Xe = 0.33, Ue = 0.5, qe = 1, Ye = [
449
- "auto",
450
- "auto-start",
451
- "auto-end",
452
- "top",
453
- "top-start",
454
- "top-end",
455
- "right",
456
- "right-start",
457
- "right-end",
458
- "bottom",
459
- "bottom-start",
460
- "bottom-end",
461
- "left",
462
- "left-start",
463
- "left-end"
464
- ];
465
- var F = /* @__PURE__ */ ((e) => (e.Categorical = "categorical", e.Sequential = "sequential", e.Divergent = "divergent", e))(F || {});
466
- function re() {
427
+ function ne() {
467
428
  return process.env.NODE_ENV === "production";
468
429
  }
469
- function ae(e) {
430
+ function re(e) {
470
431
  return (e == null ? void 0 : e.map(
471
432
  (t) => t.values.map((r) => r == null ? void 0 : r.value).flat()
472
433
  ).flat()) || [];
473
434
  }
474
- function St(e) {
435
+ function kt(e) {
475
436
  return e.length === 1;
476
437
  }
477
- function mt(e) {
438
+ function ht(e) {
478
439
  return !!e && typeof e == "object" && !Array.isArray(e);
479
440
  }
480
- function oe(e, t) {
441
+ function ae(e, t) {
481
442
  const r = { ...e };
482
443
  return Object.entries(t).forEach(([n, a]) => {
483
- r[n] = mt(e[n]) && mt(a) ? oe(e[n], a) : a;
444
+ r[n] = ht(e[n]) && ht(a) ? ae(e[n], a) : a;
484
445
  }), r;
485
446
  }
486
- function Ke(e) {
487
- return e != null && mt(e) && "value" in e;
447
+ function Xe(e) {
448
+ return e != null && ht(e) && "value" in e;
488
449
  }
489
- function M(e) {
450
+ function F(e) {
490
451
  return (e == null ? void 0 : e.bandwidth) !== void 0;
491
452
  }
492
- function Ct(e) {
493
- return M(e) ? e.bandwidth() : Math.max(...e.range()) / Math.max(...e.domain());
453
+ function xt(e) {
454
+ return F(e) ? e.bandwidth() : Math.max(...e.range()) / Math.max(...e.domain());
494
455
  }
495
- const Je = (e, t) => {
456
+ const Ue = (e, t) => {
496
457
  if (!e)
497
458
  throw new Error("Data is not a valid array");
498
459
  if (e.length === 0)
@@ -502,17 +463,17 @@ const Je = (e, t) => {
502
463
  throw new Error("Index exceeds length of at least one of the datasets");
503
464
  });
504
465
  };
505
- function Qe(e, t) {
466
+ function Ye(e, t) {
506
467
  var r;
507
- return Je(e, t), ((r = e.reduce(
468
+ return Ue(e, t), ((r = e.reduce(
508
469
  (n, a) => {
509
470
  var o, s, i, l;
510
471
  return ((s = (o = n.values[t]) == null ? void 0 : o.value) != null ? s : 0) > ((l = (i = a.values[t]) == null ? void 0 : i.value) != null ? l : 0) ? n : a;
511
472
  }
512
473
  ).values[t]) == null ? void 0 : r.value) || 0;
513
474
  }
514
- function gt(e) {
515
- const t = Kt(e) ? e.value : e;
475
+ function mt(e) {
476
+ const t = Yt(e) ? e.value : e;
516
477
  if (!t)
517
478
  throw new Error("No empty array can be created from specified data value");
518
479
  const r = Math.max(
@@ -521,17 +482,17 @@ function gt(e) {
521
482
  );
522
483
  return Array(r).fill(null);
523
484
  }
524
- function tn(e) {
525
- return M(e) ? e.domain().length : Math.max(...e.domain());
485
+ function Ke(e) {
486
+ return F(e) ? e.domain().length : Math.max(...e.domain());
526
487
  }
527
- function en(e, t) {
488
+ function Je(e, t) {
528
489
  return (r) => Math.round(e * (1 - r) + t * r);
529
490
  }
530
- function nn(e, t, r) {
491
+ function Qe(e, t, r) {
531
492
  const n = r ? e.length - t : t, a = e.slice(0, n);
532
493
  return e.slice(n).concat(a);
533
494
  }
534
- function z(e) {
495
+ function M(e) {
535
496
  if (e.groups) {
536
497
  const t = Object.keys(e);
537
498
  return Object.assign(
@@ -541,118 +502,22 @@ function z(e) {
541
502
  }
542
503
  return e;
543
504
  }
544
- const rn = (e = 21) => crypto.getRandomValues(new Uint8Array(e)).reduce(
505
+ const qe = (e = 21) => crypto.getRandomValues(new Uint8Array(e)).reduce(
545
506
  (t, r) => t += (r &= 63) < 36 ? r.toString(36) : r < 62 ? (r - 26).toString(36).toUpperCase() : r > 62 ? "-" : "_",
546
507
  ""
547
508
  );
548
509
  var tt = /* @__PURE__ */ ((e) => (e.DatasetLength = `Our guidelines highly recommend not having more than 5 datasets in one chart.
549
510
  Learn more: https://lume.design/guidelines/datasets`, e.ColorLoop = "Colors will loop around after the 5th dataset. You can prevent this by setting specific colors for your datasets.", e.InvalidFormat = "The string provided to format is invalid. Please refer to https://github.com/d3/d3-format for valid arguments.", e.NotContainedInSvg = "This component is an `SVGElement`, thus it is required to be inside an `<svg>` container.", e))(tt || {});
550
- const an = "[lume] ";
511
+ const tn = "[lume] ";
551
512
  function ut(e, t = !0) {
552
- t && re() || console.warn(an + "Warning: " + e);
553
- }
554
- const on = F.Categorical, lt = E.Skyblue, sn = kt.SkyTeal;
555
- function un(e) {
556
- return e === F.Divergent ? sn : lt;
557
- }
558
- function ln(e) {
559
- return Object.values(wt).includes(e);
560
- }
561
- function Bt(e, t) {
562
- return t === F.Divergent ? Object.values(kt).includes(e) : Object.values({ ...E, ...ee, ...wt }).includes(
563
- e
564
- );
565
- }
566
- function cn(e, t) {
567
- const r = Object.values(E).indexOf(e);
568
- return nn(Object.values(E), r > -1 ? r : 0)[t];
569
- }
570
- function dn(e, t) {
571
- const r = 50 + t * 10;
572
- return `${e}-${r}`;
573
- }
574
- function pn(e, t) {
575
- const r = (t + 1) * 10;
576
- return `${e}-${r}`;
577
- }
578
- function Ht(e, t, r) {
579
- switch (t) {
580
- default:
581
- case F.Categorical:
582
- return ln(e) ? e : cn(e, r);
583
- case F.Sequential:
584
- return dn(e, r);
585
- case F.Divergent:
586
- return pn(e, r);
587
- }
588
- }
589
- function fn(e, t, r = on, n) {
590
- return Bt(e, r) ? e : (n > 4 && (ut(tt.ColorLoop), n = n % 5), Bt(t, r) ? Ht(t, r, n) : Ht(un(r), r, n));
591
- }
592
- function vn(e) {
593
- return e.map((t) => Ke(t) ? t : { value: t });
594
- }
595
- function _n(e) {
596
- return e.__internal === !0;
597
- }
598
- const se = (e = null) => ({
599
- data: {
600
- type: Array,
601
- required: !0,
602
- validator: e || void 0
603
- },
604
- labels: {
605
- type: Array,
606
- default: void 0
607
- },
608
- color: {
609
- type: String,
610
- default: E.Skyblue
611
- }
612
- });
613
- function ct(e, t, r, n, a) {
614
- const o = it({
615
- width: 0,
616
- height: 0
617
- }), s = rn(12), i = d(() => {
618
- var c;
619
- return e.value.length > 5 && ut(tt.DatasetLength), (c = e.value) == null ? void 0 : c.map(
620
- (f, _) => {
621
- if (_n(f))
622
- return f;
623
- const m = vn(f.values), p = fn(
624
- f.color,
625
- r == null ? void 0 : r.value,
626
- n == null ? void 0 : n.value.colorPalette,
627
- _
628
- );
629
- return {
630
- ...f,
631
- values: m,
632
- color: p,
633
- __internal: !0
634
- };
635
- }
636
- );
637
- }), l = d(() => Array.isArray(t.value) ? t.value : gt(e.value).map((c, f) => f));
638
- function u(c) {
639
- const f = (a == null ? void 0 : a.value) === b.HORIZONTAL ? gt(e).length * (Ze * 2) : c.height;
640
- o.width = c.width, o.height = f;
641
- }
642
- return {
643
- chartID: s,
644
- computedLabels: l,
645
- containerSize: o,
646
- internalData: i,
647
- updateSize: u
648
- };
513
+ t && ne() || console.warn(tn + "Warning: " + e);
649
514
  }
650
- const It = (e) => {
515
+ const Lt = (e) => {
651
516
  let t = null;
652
517
  switch (typeof e) {
653
518
  case "string":
654
519
  try {
655
- t = $e(e);
520
+ t = we(e);
656
521
  } catch {
657
522
  ut(tt.InvalidFormat), t = null;
658
523
  }
@@ -667,29 +532,29 @@ const It = (e) => {
667
532
  return t ? t(n) : n;
668
533
  }
669
534
  return r;
670
- }, dt = () => ({
535
+ }, lt = () => ({
671
536
  options: {
672
537
  type: Object,
673
538
  default: () => ({})
674
539
  }
675
540
  });
676
- function N(e, t) {
541
+ function B(e, t) {
677
542
  return { allOptions: d(() => {
678
- const n = Kt(t) ? t == null ? void 0 : t.value : t;
679
- return n ? oe(n, e.value) : e.value;
543
+ const n = Yt(t) ? t == null ? void 0 : t.value : t;
544
+ return n ? ae(n, e.value) : e.value;
680
545
  }) };
681
546
  }
682
- const hn = 0.15;
683
- function mn(e, t, r) {
547
+ const en = 0.15;
548
+ function nn(e, t, r) {
684
549
  const n = L(), a = d(() => Math.max(...e.value.range())), o = d(() => t.value.length);
685
550
  function s() {
686
551
  if (!t.value)
687
552
  return;
688
553
  const l = t.value.reduce(
689
- (c, f) => c + f.getBoundingClientRect().width,
554
+ (c, p) => c + p.getBoundingClientRect().width,
690
555
  0
691
556
  ), u = Math.ceil(l / o.value);
692
- n.value = u + u * hn;
557
+ n.value = u + u * en;
693
558
  }
694
559
  function i(l) {
695
560
  if (!t.value)
@@ -697,29 +562,67 @@ function mn(e, t, r) {
697
562
  const u = t.value.length;
698
563
  if (l === 0)
699
564
  return !0;
700
- const c = a.value / u, f = typeof r == "number" && r > 0 && r + 1 || Math.ceil(n.value / c);
701
- return l % f === 0;
565
+ const c = a.value / u, p = typeof r == "number" && r > 0 && r + 1 || Math.ceil(n.value / c);
566
+ return l % p === 0;
702
567
  }
703
- return R(t, s), { showTick: i };
568
+ return C(t, s), { showTick: i };
704
569
  }
705
- function pt(e) {
570
+ var N = /* @__PURE__ */ ((e) => (e.Skyblue = "skyblue", e.Royalblue = "royalblue", e.Violet = "violet", e.Darkteal = "darkteal", e.Gold = "gold", e))(N || {}), oe = /* @__PURE__ */ ((e) => (e.Skyblue10 = "skyblue-10", e.Skyblue20 = "skyblue-20", e.Skyblue30 = "skyblue-30", e.Skyblue40 = "skyblue-40", e.Skyblue50 = "skyblue-50", e.Skyblue60 = "skyblue-60", e.Skyblue70 = "skyblue-70", e.Skyblue80 = "skyblue-80", e.Skyblue90 = "skyblue-90", e.Skyblue100 = "skyblue-100", e.Royalblue10 = "royalblue-10", e.Royalblue20 = "royalblue-20", e.Royalblue30 = "royalblue-30", e.Royalblue40 = "royalblue-40", e.Royalblue50 = "royalblue-50", e.Royalblue60 = "royalblue-60", e.Royalblue70 = "royalblue-70", e.Royalblue80 = "royalblue-80", e.Royalblue90 = "royalblue-90", e.Royalblue100 = "royalblue-100", e.Violet10 = "violet-10", e.Violet20 = "violet-20", e.Violet30 = "violet-30", e.Violet40 = "violet-40", e.Violet50 = "violet-50", e.Violet60 = "violet-60", e.Violet70 = "violet-70", e.Violet80 = "violet-80", e.Violet90 = "violet-90", e.Violet100 = "violet-100", e.Darkteal10 = "darkteal-10", e.Darkteal20 = "darkteal-20", e.Darkteal30 = "darkteal-30", e.Darkteal40 = "darkteal-40", e.Darkteal50 = "darkteal-50", e.Darkteal60 = "darkteal-60", e.Darkteal70 = "darkteal-70", e.Darkteal80 = "darkteal-80", e.Darkteal90 = "darkteal-90", e.Darkteal100 = "darkteal-100", e.Gold10 = "gold-10", e.Gold20 = "gold-20", e.Gold30 = "gold-30", e.Gold40 = "gold-40", e.Gold50 = "gold-50", e.Gold60 = "gold-60", e.Gold70 = "gold-70", e.Gold80 = "gold-80", e.Gold90 = "gold-90", e.Gold100 = "gold-100", e))(oe || {}), $t = /* @__PURE__ */ ((e) => (e.SkyTeal = "skyblue-darkteal", e.VioletRoyal = "violet-royalblue", e.VioletTeal = "violet-darkteal", e.GoldTeal = "gold-darkteal", e.GoldRoyal = "gold-royalblue", e))($t || {}), se = /* @__PURE__ */ ((e) => (e.Grey = "grey", e.Green = "green", e.Orange = "orange", e.Red = "red", e))(se || {}), wt = /* @__PURE__ */ ((e) => (e["01"] = "01", e["02"] = "02", e["03"] = "03", e["04"] = "04", e["05"] = "05", e["06"] = "06", e["07"] = "07", e["08"] = "08", e["09"] = "09", e))(wt || {});
571
+ const A = {
572
+ HORIZONTAL: "horizontal",
573
+ VERTICAL: "vertical"
574
+ }, rn = {
575
+ SINGLE: "single",
576
+ GROUPED: "grouped",
577
+ STACKED: "stacked"
578
+ }, j = {
579
+ VERTICAL: {
580
+ top: 16,
581
+ right: 0,
582
+ bottom: 28,
583
+ left: 24
584
+ },
585
+ HORIZONTAL: {
586
+ top: 16,
587
+ right: 0,
588
+ bottom: 28,
589
+ left: 24
590
+ }
591
+ }, ie = "No data", an = 20, on = 0.33, sn = 0.5, un = 1, ln = [
592
+ "auto",
593
+ "auto-start",
594
+ "auto-end",
595
+ "top",
596
+ "top-start",
597
+ "top-end",
598
+ "right",
599
+ "right-start",
600
+ "right-end",
601
+ "bottom",
602
+ "bottom-start",
603
+ "bottom-end",
604
+ "left",
605
+ "left-start",
606
+ "left-end"
607
+ ];
608
+ function ct(e) {
706
609
  e != null && e.closest("svg") || ut(tt.NotContainedInSvg);
707
610
  }
708
- const ie = {
611
+ const ue = {
709
612
  gridLines: !1,
710
613
  withTitle: !0,
711
614
  showTicks: !0,
712
615
  tickCount: 10,
713
616
  tickFormat: null,
714
617
  tickPadding: 8
715
- }, gn = {
716
- ...ie,
618
+ }, cn = {
619
+ ...ue,
717
620
  withTitle: !1,
718
621
  skip: !0
719
- }, yn = {
720
- ...ie,
622
+ }, dn = {
623
+ ...ue,
721
624
  gridLines: !0
722
- }, bn = 12, Tn = 8, An = function(e, t, r) {
625
+ }, pn = 12, fn = 8, vn = function(e, t, r) {
723
626
  const n = d(() => e.value.step() * e.value.paddingInner() / 2);
724
627
  function a(l, u) {
725
628
  var c;
@@ -732,7 +635,7 @@ const ie = {
732
635
  return {
733
636
  x: -(u - e.value.step()) / 2,
734
637
  width: u,
735
- height: r.value.tickPadding + bn + Tn
638
+ height: r.value.tickPadding + pn + fn
736
639
  };
737
640
  }
738
641
  function s() {
@@ -757,7 +660,7 @@ const ie = {
757
660
  getTickGroupAttributes: a,
758
661
  getTickLabelAttributes: i
759
662
  };
760
- }, On = function(e, t, r) {
663
+ }, _n = function(e, t, r) {
761
664
  const n = d(() => e.value.step() * e.value.paddingInner() / 2);
762
665
  function a(l, u) {
763
666
  var c;
@@ -794,7 +697,7 @@ const ie = {
794
697
  getTickGroupAttributes: a,
795
698
  getTickLabelAttributes: i
796
699
  };
797
- }, xn = function(e, t, r) {
700
+ }, hn = function(e, t, r) {
798
701
  function n(i) {
799
702
  return {
800
703
  transform: `translate(${e.value(i)}, 0)`
@@ -821,7 +724,7 @@ const ie = {
821
724
  getTickGroupAttributes: n,
822
725
  getTickLabelAttributes: s
823
726
  };
824
- }, Ln = function(e, t, r) {
727
+ }, mn = function(e, t, r) {
825
728
  function n(i) {
826
729
  return {
827
730
  transform: `translate(0, ${e.value(i)})`
@@ -848,14 +751,14 @@ const ie = {
848
751
  getTickGroupAttributes: n,
849
752
  getTickLabelAttributes: s
850
753
  };
851
- }, $n = {
852
- "x-band-scale-axis": An,
853
- "y-band-scale-axis": On,
854
- "x-linear-scale-axis": xn,
855
- "y-linear-scale-axis": Ln
754
+ }, gn = {
755
+ "x-band-scale-axis": vn,
756
+ "y-band-scale-axis": _n,
757
+ "x-linear-scale-axis": hn,
758
+ "y-linear-scale-axis": mn
856
759
  };
857
- var yt = /* @__PURE__ */ ((e) => (e.bandScale = "band-scale-axis", e.linearScale = "linear-scale-axis", e))(yt || {}), bt = /* @__PURE__ */ ((e) => (e.left = "left", e.bottom = "bottom", e))(bt || {}), at = /* @__PURE__ */ ((e) => (e.x = "bottom", e.y = "left", e))(at || {});
858
- const kn = /* @__PURE__ */ k({
760
+ var gt = /* @__PURE__ */ ((e) => (e.bandScale = "band-scale-axis", e.linearScale = "linear-scale-axis", e))(gt || {}), yt = /* @__PURE__ */ ((e) => (e.left = "left", e.bottom = "bottom", e))(yt || {}), at = /* @__PURE__ */ ((e) => (e.x = "bottom", e.y = "left", e))(at || {});
761
+ const yn = /* @__PURE__ */ $({
859
762
  __name: "lume-axis",
860
763
  props: {
861
764
  scale: {
@@ -870,7 +773,7 @@ const kn = /* @__PURE__ */ k({
870
773
  position: {
871
774
  type: String,
872
775
  default: void 0,
873
- validator: (e) => e in bt
776
+ validator: (e) => e in yt
874
777
  },
875
778
  containerSize: {
876
779
  type: Object,
@@ -882,87 +785,87 @@ const kn = /* @__PURE__ */ k({
882
785
  },
883
786
  orientation: {
884
787
  type: String,
885
- default: b.VERTICAL
788
+ default: A.VERTICAL
886
789
  },
887
- ...dt()
790
+ ...lt()
888
791
  },
889
792
  emits: ["tick-mouseover"],
890
793
  setup(e, { emit: t }) {
891
- const r = e, { scale: n, containerSize: a, hoveredIndex: o, options: s, orientation: i } = S(r), l = it({}), u = L(null), c = L(null), f = L(null), { chartID: _ } = ct(), m = d(
794
+ const r = e, { scale: n, containerSize: a, hoveredIndex: o, options: s, orientation: i } = I(r), l = it({}), u = L(null), c = L(null), p = L(null), v = Kt("chartID"), g = d(
892
795
  () => r.type ? at[r.type] : r.position
893
- ), p = d(
894
- () => r.type || (m.value === "left" ? "y" : "x")
895
- ), h = d(
896
- () => p.value === "x" && i.value === b.VERTICAL || p.value === "y" && i.value === b.HORIZONTAL
897
- ), { allOptions: g } = N(
796
+ ), f = d(
797
+ () => r.type || (g.value === "left" ? "y" : "x")
798
+ ), _ = d(
799
+ () => f.value === "x" && i.value === A.VERTICAL || f.value === "y" && i.value === A.HORIZONTAL
800
+ ), { allOptions: h } = B(
898
801
  s,
899
- p.value === "x" ? gn : yn
900
- ), { showTick: v } = mn(n, u, g.value.skip), y = d(
802
+ f.value === "x" ? cn : dn
803
+ ), { showTick: y } = nn(n, u, h.value.skip), b = d(
901
804
  () => {
902
- var x;
903
- return `translate(0, ${p.value === "x" ? (x = a.value) == null ? void 0 : x.height : 0})`;
805
+ var k;
806
+ return `translate(0, ${f.value === "x" ? (k = a.value) == null ? void 0 : k.height : 0})`;
904
807
  }
905
- ), O = d(() => {
906
- if (M(n.value))
808
+ ), m = d(() => {
809
+ if (F(n.value))
907
810
  return n.value.labels || n.value.domain();
908
- const { tickCount: x } = g.value, [C, K] = n.value.domain();
909
- return ke(C, K, x);
811
+ const { tickCount: k } = h.value, [R, J] = n.value.domain();
812
+ return Ie(R, J, k);
910
813
  }), T = d(() => {
911
- const { tickFormat: x } = g.value;
912
- return It(x);
814
+ const { tickFormat: k } = h.value;
815
+ return Lt(k);
913
816
  });
914
- function $(x) {
915
- const { showTicks: C } = g.value;
916
- return C === !1 ? "" : T.value(x);
817
+ function x(k) {
818
+ const { showTicks: R } = h.value;
819
+ return R === !1 ? "" : T.value(k);
917
820
  }
918
- function P(x) {
919
- h.value && t("tick-mouseover", x);
821
+ function S(k) {
822
+ _.value && t("tick-mouseover", k);
920
823
  }
921
- function D(x) {
922
- return g.value.withHover && h.value && o.value === x;
824
+ function D(k) {
825
+ return h.value.withHover && _.value && o.value === k;
923
826
  }
924
- function B(x) {
925
- return `${_}-${p.value}-tick--${x}`;
827
+ function P(k) {
828
+ return `${v}-${f.value}-tick--${k}`;
926
829
  }
927
- function Z(x) {
830
+ function W(k) {
928
831
  if (!!u.value)
929
- return u.value.find((C) => +C.dataset.index === x);
832
+ return u.value.find((R) => +R.dataset.index === k);
930
833
  }
931
- function V() {
932
- f.value = O.value.map((x, C) => ({
933
- value: x,
934
- group: l.getTickGroupAttributes(x, C),
935
- ghost: l.getTickGhostAttributes(Z(C)),
834
+ function Z() {
835
+ p.value = m.value.map((k, R) => ({
836
+ value: k,
837
+ group: l.getTickGroupAttributes(k, R),
838
+ ghost: l.getTickGhostAttributes(W(R)),
936
839
  label: l.getTickLabelAttributes(),
937
840
  gridLine: l.getGridLinesAttributes()
938
841
  }));
939
842
  }
940
843
  function X() {
941
- const x = n.value.step ? "bandScale" : "linearScale", C = $n[`${p.value}-${yt[x]}`];
942
- Object.entries(C(n, a, g) || []).forEach(
943
- ([K, vt]) => {
944
- l[K] = vt;
844
+ const k = n.value.step ? "bandScale" : "linearScale", R = gn[`${f.value}-${gt[k]}`];
845
+ Object.entries(R(n, a, h) || []).forEach(
846
+ ([J, ft]) => {
847
+ l[J] = ft;
945
848
  }
946
849
  );
947
850
  }
948
- return R(n, X, { flush: "sync", immediate: !0 }), R(
851
+ return C(n, X, { flush: "sync", immediate: !0 }), C(
949
852
  [
950
- O,
853
+ m,
951
854
  u,
952
855
  () => a.value.width,
953
856
  () => a.value.height
954
857
  ],
955
- V,
858
+ Z,
956
859
  { immediate: !0 }
957
- ), H(() => pt(c.value)), { __sfc: !0, SCALE_MIXIN_MAP: yt, POSITIONS: bt, TYPES: at, props: r, emit: t, scale: n, containerSize: a, hoveredIndex: o, options: s, orientation: i, mixins: l, tickRefs: u, root: c, ticksWithAttributes: f, chartID: _, computedPosition: m, computedType: p, shouldHover: h, allOptions: g, showTick: v, axisTransform: y, ticks: O, tickFormatter: T, formatTick: $, onTickMouseover: P, isHovering: D, getTickId: B, getTextNode: Z, setTicks: V, init: X, VuePortal: Lt, VuePortalTarget: $t };
860
+ ), G(() => ct(c.value)), { __sfc: !0, SCALE_MIXIN_MAP: gt, POSITIONS: yt, TYPES: at, props: r, emit: t, scale: n, containerSize: a, hoveredIndex: o, options: s, orientation: i, mixins: l, tickRefs: u, root: c, ticksWithAttributes: p, chartID: v, computedPosition: g, computedType: f, shouldHover: _, allOptions: h, showTick: y, axisTransform: b, ticks: m, tickFormatter: T, formatTick: x, onTickMouseover: S, isHovering: D, getTickId: P, getTextNode: W, setTicks: Z, init: X, VuePortal: te, VuePortalTarget: ee };
958
861
  }
959
862
  });
960
863
  function w(e, t, r, n, a, o, s, i) {
961
864
  var l = typeof e == "function" ? e.options : e;
962
865
  t && (l.render = t, l.staticRenderFns = r, l._compiled = !0), n && (l.functional = !0), o && (l._scopeId = "data-v-" + o);
963
866
  var u;
964
- if (s ? (u = function(_) {
965
- _ = _ || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !_ && typeof __VUE_SSR_CONTEXT__ < "u" && (_ = __VUE_SSR_CONTEXT__), a && a.call(this, _), _ && _._registeredComponents && _._registeredComponents.add(s);
867
+ if (s ? (u = function(v) {
868
+ v = v || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !v && typeof __VUE_SSR_CONTEXT__ < "u" && (v = __VUE_SSR_CONTEXT__), a && a.call(this, v), v && v._registeredComponents && v._registeredComponents.add(s);
966
869
  }, l._ssrRegister = u) : a && (u = i ? function() {
967
870
  a.call(
968
871
  this,
@@ -972,19 +875,19 @@ function w(e, t, r, n, a, o, s, i) {
972
875
  if (l.functional) {
973
876
  l._injectStyles = u;
974
877
  var c = l.render;
975
- l.render = function(m, p) {
976
- return u.call(p), c(m, p);
878
+ l.render = function(g, f) {
879
+ return u.call(f), c(g, f);
977
880
  };
978
881
  } else {
979
- var f = l.beforeCreate;
980
- l.beforeCreate = f ? [].concat(f, u) : [u];
882
+ var p = l.beforeCreate;
883
+ l.beforeCreate = p ? [].concat(p, u) : [u];
981
884
  }
982
885
  return {
983
886
  exports: e,
984
887
  options: l
985
888
  };
986
889
  }
987
- var wn = function() {
890
+ var bn = function() {
988
891
  var t = this, r = t._self._c, n = t._self._setupProxy;
989
892
  return n.scale ? r("g", { ref: "root", staticClass: "axis", attrs: { transform: n.axisTransform, "data-j-axis": "" } }, [n.computedType === "x" ? r("defs", [r("linearGradient", { attrs: { id: "lume-tick-gradient" } }, [r("stop", { attrs: { offset: "0%", "stop-color": "rgba(255,255,255,0)" } }), r("stop", { attrs: { offset: "10%", "stop-color": "var(--lume-chart-background-color)" } }), r("stop", { attrs: { offset: "90%", "stop-color": "var(--lume-chart-background-color)" } }), r("stop", { attrs: { offset: "100%", "stop-color": "rgba(255,255,255,0)" } })], 1)], 1) : t._e(), t._l(n.ticksWithAttributes, function(a, o) {
990
893
  return r(n.VuePortal, { key: `${a.value}_${o}`, attrs: { slim: "", disabled: !n.isHovering(o), to: `${n.chartID}-${n.computedType}-hovered-portal` } }, [r("g", t._b({ staticClass: "axis__tick", class: {
@@ -994,18 +897,18 @@ var wn = function() {
994
897
  return n.onTickMouseover(o);
995
898
  } } }, [r("rect", t._b({ staticClass: "axis__ghost", attrs: { fill: "url(#lume-tick-gradient)" } }, "rect", a.ghost, !1)), r("text", t._b({ ref: "tickRefs", refInFor: !0, staticClass: "axis__label", attrs: { "data-index": o } }, "text", a.label, !1), [t._v(" " + t._s(n.formatTick(a.value)) + " ")])]), n.allOptions.gridLines ? r("line", t._b({ staticClass: "axis__grid-line" }, "line", a.gridLine, !1)) : t._e()])]);
996
899
  }), r(n.VuePortalTarget, { attrs: { name: `${n.chartID}-${n.computedType}-hovered-portal`, slim: "" } })], 2) : t._e();
997
- }, Sn = [], Cn = /* @__PURE__ */ w(
998
- kn,
999
- wn,
1000
- Sn,
900
+ }, Tn = [], An = /* @__PURE__ */ w(
901
+ yn,
902
+ bn,
903
+ Tn,
1001
904
  !1,
1002
905
  null,
1003
- "44f74829",
906
+ "d1a0065e",
1004
907
  null,
1005
908
  null
1006
909
  );
1007
- const In = Cn.exports;
1008
- function Rn() {
910
+ const On = An.exports;
911
+ function kn() {
1009
912
  const e = L(), t = it({
1010
913
  dimensions: {}
1011
914
  }), r = new ResizeObserver((n) => {
@@ -1013,13 +916,13 @@ function Rn() {
1013
916
  t.dimensions = a.contentRect;
1014
917
  });
1015
918
  });
1016
- return H(() => {
919
+ return G(() => {
1017
920
  r.observe(e.value);
1018
921
  }), Jt(() => {
1019
922
  r.unobserve(e.value);
1020
923
  }), { resizeState: t, resizeRef: e };
1021
924
  }
1022
- const Pn = /* @__PURE__ */ k({
925
+ const xn = /* @__PURE__ */ $({
1023
926
  __name: "lume-chart-container",
1024
927
  props: {
1025
928
  margins: {
@@ -1046,7 +949,7 @@ const Pn = /* @__PURE__ */ k({
1046
949
  right: 0,
1047
950
  top: 0,
1048
951
  bottom: 0
1049
- }, { margins: a, containerSize: o } = S(r), s = L(null), { resizeRef: i, resizeState: l } = Rn(), u = d(() => ({
952
+ }, { margins: a, containerSize: o } = I(r), s = L(null), { resizeRef: i, resizeState: l } = kn(), u = d(() => ({
1050
953
  ...n,
1051
954
  ...a.value
1052
955
  })), c = d(
@@ -1055,20 +958,20 @@ const Pn = /* @__PURE__ */ k({
1055
958
  return Qt(() => {
1056
959
  if (!s.value)
1057
960
  return;
1058
- const { width: f } = l.dimensions, { height: _ } = s.value.getBoundingClientRect();
1059
- if (!f || !_)
961
+ const { width: p } = l.dimensions, { height: v } = s.value.getBoundingClientRect();
962
+ if (!p || !v)
1060
963
  return;
1061
- const m = f - u.value.left - u.value.right, p = _ - u.value.top - u.value.bottom, h = {
1062
- width: m > 0 ? m : 0,
1063
- height: p > 0 ? p : 0,
1064
- outerWidth: f,
1065
- outerHeight: _
964
+ const g = p - u.value.left - u.value.right, f = v - u.value.top - u.value.bottom, _ = {
965
+ width: g > 0 ? g : 0,
966
+ height: f > 0 ? f : 0,
967
+ outerWidth: p,
968
+ outerHeight: v
1066
969
  };
1067
- t("resize", h);
970
+ t("resize", _);
1068
971
  }), { __sfc: !0, BASE_MARGINS: n, props: r, emit: t, margins: a, containerSize: o, root: s, resizeRef: i, resizeState: l, computedMargins: u, svgHeight: c };
1069
972
  }
1070
973
  });
1071
- var Dn = function() {
974
+ var Ln = function() {
1072
975
  var t = this, r = t._self._c, n = t._self._setupProxy;
1073
976
  return r("div", { ref: "resizeRef", staticClass: "lume-chart-container", class: {
1074
977
  "lume-chart-container--minimum": !t.noMinSize
@@ -1077,17 +980,17 @@ var Dn = function() {
1077
980
  }, attrs: { height: n.svgHeight, "data-j-chart-container__root": "" }, on: { mouseleave: function(a) {
1078
981
  return t.$emit("mouseleave", a);
1079
982
  } } }, [r("g", { staticClass: "lume-chart-container__group", attrs: { transform: `translate(${n.computedMargins.left}, ${n.computedMargins.top})`, "data-j-chart-container__group": "" } }, [t._t("default")], 2)]), t._t("footer"), t._t("extra")], 2);
1080
- }, En = [], Nn = /* @__PURE__ */ w(
1081
- Pn,
1082
- Dn,
1083
- En,
983
+ }, $n = [], wn = /* @__PURE__ */ w(
984
+ xn,
985
+ Ln,
986
+ $n,
1084
987
  !1,
1085
988
  null,
1086
989
  "136a2456",
1087
990
  null,
1088
991
  null
1089
992
  );
1090
- const Bn = Nn.exports, Hn = /* @__PURE__ */ k({
993
+ const In = wn.exports, Sn = /* @__PURE__ */ $({
1091
994
  __name: "lume-chart-legend",
1092
995
  props: {
1093
996
  data: {
@@ -1101,24 +1004,24 @@ const Bn = Nn.exports, Hn = /* @__PURE__ */ k({
1101
1004
  return { __sfc: !0, emit: t };
1102
1005
  }
1103
1006
  });
1104
- var jn = function() {
1007
+ var Dn = function() {
1105
1008
  var t = this, r = t._self._c, n = t._self._setupProxy;
1106
1009
  return r("div", { staticClass: "lume-chart-legend", attrs: { "data-j-chart-legend": "" } }, t._l(t.data, function(a, o) {
1107
1010
  return r("div", { key: `legend-item-${o}`, staticClass: "lume-chart-legend__item lume-typography--body", attrs: { tabindex: "0", "data-j-chart-legend__symbol-wrapper": "" }, on: { click: function(s) {
1108
1011
  return n.emit("click", o);
1109
1012
  } } }, [r("span", { staticClass: "lume-chart-legend__symbol", class: `lume-background-color--${a.color}`, attrs: { "data-j-chart-legend__symbol": "" } }), t._v(" " + t._s(a.label) + " ")]);
1110
1013
  }), 0);
1111
- }, Vn = [], Fn = /* @__PURE__ */ w(
1112
- Hn,
1113
- jn,
1114
- Vn,
1014
+ }, Rn = [], Pn = /* @__PURE__ */ w(
1015
+ Sn,
1016
+ Dn,
1017
+ Rn,
1115
1018
  !1,
1116
1019
  null,
1117
1020
  "0cbb8403",
1118
1021
  null,
1119
1022
  null
1120
1023
  );
1121
- const Gn = Fn.exports, Mn = /* @__PURE__ */ k({
1024
+ const En = Pn.exports, Cn = /* @__PURE__ */ $({
1122
1025
  __name: "lume-tooltip",
1123
1026
  props: {
1124
1027
  targetElement: {
@@ -1132,7 +1035,7 @@ const Gn = Fn.exports, Mn = /* @__PURE__ */ k({
1132
1035
  position: {
1133
1036
  type: String,
1134
1037
  default: "auto",
1135
- validator: (e) => Ye.includes(e)
1038
+ validator: (e) => ln.includes(e)
1136
1039
  },
1137
1040
  fixedPositioning: {
1138
1041
  type: Boolean,
@@ -1150,13 +1053,13 @@ const Gn = Fn.exports, Mn = /* @__PURE__ */ k({
1150
1053
  type: String,
1151
1054
  default: null
1152
1055
  },
1153
- ...dt()
1056
+ ...lt()
1154
1057
  },
1155
1058
  setup(e) {
1156
- const t = e, r = L(null), { items: n, options: a } = S(t), o = L(null), { allOptions: s } = N(a), i = d(
1059
+ const t = e, r = L(null), { items: n, options: a } = I(t), o = L(null), { allOptions: s } = B(a), i = d(
1157
1060
  () => {
1158
- var g;
1159
- return (g = s.value.fixedPositioning) != null ? g : t.fixedPositioning;
1061
+ var h;
1062
+ return (h = s.value.fixedPositioning) != null ? h : t.fixedPositioning;
1160
1063
  }
1161
1064
  ), l = d(
1162
1065
  () => i.value ? "fixed" : "absolute"
@@ -1174,54 +1077,54 @@ const Gn = Fn.exports, Mn = /* @__PURE__ */ k({
1174
1077
  ...t.modifiers || []
1175
1078
  ]), c = d(
1176
1079
  () => s.value.showTitle !== !1 && t.title != null
1177
- ), f = d(() => It(s.value.valueFormat)), _ = d(
1080
+ ), p = d(() => Lt(s.value.valueFormat)), v = d(
1178
1081
  () => {
1179
- var g, v;
1180
- return ((g = n.value) == null ? void 0 : g.find((y) => y.isSummary)) || {
1181
- label: (v = s.value.summary) != null ? v : t.summary
1082
+ var h, y;
1083
+ return ((h = n.value) == null ? void 0 : h.find((b) => b.isSummary)) || {
1084
+ label: (y = s.value.summary) != null ? y : t.summary
1182
1085
  };
1183
1086
  }
1184
1087
  );
1185
- function m() {
1186
- t.targetElement && r.value && (o.value = Ce(t.targetElement, r.value, {
1088
+ function g() {
1089
+ t.targetElement && r.value && (o.value = Re(t.targetElement, r.value, {
1187
1090
  placement: t.position,
1188
1091
  strategy: l.value,
1189
1092
  modifiers: u.value
1190
1093
  }));
1191
1094
  }
1192
- function p() {
1095
+ function f() {
1193
1096
  o.value && o.value.destroy();
1194
1097
  }
1195
- function h() {
1098
+ function _() {
1196
1099
  !o.value || (r.value.classList.add("lume-tooltip--animated"), t.targetElement ? function() {
1197
1100
  o.value.state.elements.reference = t.targetElement, o.value.update();
1198
- }() : p());
1101
+ }() : f());
1199
1102
  }
1200
- return R(() => t.targetElement, h), H(m), Jt(p), { __sfc: !0, props: t, root: r, items: n, options: a, popper: o, allOptions: s, computedFixedPositioning: i, strategy: l, allModifiers: u, showTitle: c, formatValue: f, summaryItem: _, initPopper: m, destroyPopper: p, updatePopper: h };
1103
+ return C(() => t.targetElement, _), G(g), Jt(f), { __sfc: !0, props: t, root: r, items: n, options: a, popper: o, allOptions: s, computedFixedPositioning: i, strategy: l, allModifiers: u, showTitle: c, formatValue: p, summaryItem: v, initPopper: g, destroyPopper: f, updatePopper: _ };
1201
1104
  }
1202
1105
  });
1203
- var zn = function() {
1106
+ var Nn = function() {
1204
1107
  var t = this, r = t._self._c, n = t._self._setupProxy;
1205
1108
  return r("div", { ref: "root", staticClass: "lume-tooltip lume-typography--caption", attrs: { "data-j-tooltip": "" } }, [t._t("default", function() {
1206
1109
  return [n.showTitle ? r("div", { staticClass: "lume-tooltip__title", attrs: { "data-j-tooltip__title": "" } }, [t._v(" " + t._s(t.title) + " ")]) : t._e(), r("ul", { staticClass: "lume-tooltip__items" }, [n.summaryItem.label ? [r("li", { staticClass: "lume-tooltip__item", attrs: { "data-j-tooltip__summary-item": "" } }, [r("span", [t._v(" " + t._s(n.summaryItem.label) + " ")]), n.summaryItem.value ? r("strong", { staticClass: "lume-tooltip__value" }, [t._v(" " + t._s(n.formatValue(n.summaryItem.value)) + " ")]) : t._e()]), t._m(0)] : t._e(), t._l(n.items, function(a) {
1207
1110
  return r("li", { key: a.label, staticClass: "lume-tooltip__item", attrs: { "data-j-tooltip__item": "" } }, [r("span", { staticClass: "lume-tooltip__symbol", class: [`lume-background-color--${a.color}`], attrs: { "data-j-tooltip__item__symbol": "" } }), r("span", { attrs: { "data-j-tooltip__item__label": "" } }, [t._v(" " + t._s(a.label) + " ")]), r("strong", { staticClass: "lume-tooltip__value", attrs: { "data-j-tooltip__item__value": "" } }, [t._v(" " + t._s(n.formatValue(a.value)) + " ")])]);
1208
1111
  })], 2)];
1209
1112
  })], 2);
1210
- }, Wn = [function() {
1113
+ }, Bn = [function() {
1211
1114
  var e = this, t = e._self._c;
1212
1115
  return e._self._setupProxy, t("li", { staticClass: "lume-tooltip__break" }, [t("hr")]);
1213
- }], Zn = /* @__PURE__ */ w(
1214
- Mn,
1215
- zn,
1216
- Wn,
1116
+ }], Gn = /* @__PURE__ */ w(
1117
+ Cn,
1118
+ Nn,
1119
+ Bn,
1217
1120
  !1,
1218
1121
  null,
1219
1122
  "f861f1d1",
1220
1123
  null,
1221
1124
  null
1222
1125
  );
1223
- const Xn = Zn.exports;
1224
- function Un(e, t, r, n) {
1126
+ const Hn = Gn.exports;
1127
+ function Vn(e, t, r, n) {
1225
1128
  const a = d(() => r.value > 0 && r.value < 1), o = d(
1226
1129
  () => n.value > 0 && n.value < 1
1227
1130
  ), s = d(
@@ -1231,13 +1134,13 @@ function Un(e, t, r, n) {
1231
1134
  );
1232
1135
  return { computedX: s, computedY: i, shouldHaveMinWidth: a, shouldHaveMinHeight: o };
1233
1136
  }
1234
- function qn(e, t, r, n) {
1137
+ function jn(e, t, r, n) {
1235
1138
  const a = L(0), o = L(0), s = d(() => `${e.value + r.value / 2}px ${t.value + n.value / 2}px`);
1236
- return H(() => {
1139
+ return G(() => {
1237
1140
  a.value = r.value, o.value = n.value;
1238
- }), R(r, (i) => a.value = i), R(n, (i) => o.value = i), { computedWidth: a, computedHeight: o, transformOrigin: s };
1141
+ }), C(r, (i) => a.value = i), C(n, (i) => o.value = i), { computedWidth: a, computedHeight: o, transformOrigin: s };
1239
1142
  }
1240
- const Yn = /* @__PURE__ */ k({
1143
+ const Fn = /* @__PURE__ */ $({
1241
1144
  __name: "lume-bar",
1242
1145
  props: {
1243
1146
  x: {
@@ -1274,13 +1177,13 @@ const Yn = /* @__PURE__ */ k({
1274
1177
  }
1275
1178
  },
1276
1179
  setup(e) {
1277
- const t = e, { x: r, y: n, width: a, height: o, transition: s, classList: i } = S(t), l = L(null), u = d(
1180
+ const t = e, { x: r, y: n, width: a, height: o, transition: s, classList: i } = I(t), l = L(null), u = d(
1278
1181
  () => typeof i.value == "string" ? [i.value] : i.value
1279
- ), c = d(() => s.value === "width"), f = d(() => s.value === "height"), _ = qn(r, n, a, o), { computedX: m, computedY: p, shouldHaveMinWidth: h, shouldHaveMinHeight: g } = Un(r, n, a, o), v = d(() => h.value ? 1 : (c.value ? _.computedWidth : a).value), y = d(() => g.value ? 1 : (f.value ? _.computedHeight : o).value), O = c.value || f.value ? _.transformOrigin : null;
1280
- return H(() => pt(l.value)), { __sfc: !0, props: t, x: r, y: n, width: a, height: o, transition: s, classList: i, root: l, computedClasses: u, shouldTransitionWidth: c, shouldTransitionHeight: f, transitionProps: _, computedX: m, computedY: p, shouldHaveMinWidth: h, shouldHaveMinHeight: g, computedWidth: v, computedHeight: y, transformOrigin: O };
1182
+ ), c = d(() => s.value === "width"), p = d(() => s.value === "height"), v = jn(r, n, a, o), { computedX: g, computedY: f, shouldHaveMinWidth: _, shouldHaveMinHeight: h } = Vn(r, n, a, o), y = d(() => _.value ? 1 : (c.value ? v.computedWidth : a).value), b = d(() => h.value ? 1 : (p.value ? v.computedHeight : o).value), m = c.value || p.value ? v.transformOrigin : null;
1183
+ return G(() => ct(l.value)), { __sfc: !0, props: t, x: r, y: n, width: a, height: o, transition: s, classList: i, root: l, computedClasses: u, shouldTransitionWidth: c, shouldTransitionHeight: p, transitionProps: v, computedX: g, computedY: f, shouldHaveMinWidth: _, shouldHaveMinHeight: h, computedWidth: y, computedHeight: b, transformOrigin: m };
1281
1184
  }
1282
1185
  });
1283
- var Kn = function() {
1186
+ var Mn = function() {
1284
1187
  var t = this, r = t._self._c, n = t._self._setupProxy;
1285
1188
  return r("rect", { ref: "root", staticClass: "lume-bar", class: [
1286
1189
  {
@@ -1291,17 +1194,17 @@ var Kn = function() {
1291
1194
  },
1292
1195
  ...n.computedClasses
1293
1196
  ], style: { transformOrigin: n.transformOrigin }, attrs: { x: n.computedX, y: n.computedY, width: n.computedWidth, height: n.computedHeight, "data-j-bar": "" } });
1294
- }, Jn = [], Qn = /* @__PURE__ */ w(
1295
- Yn,
1296
- Kn,
1297
- Jn,
1197
+ }, zn = [], Wn = /* @__PURE__ */ w(
1198
+ Fn,
1199
+ Mn,
1200
+ zn,
1298
1201
  !1,
1299
1202
  null,
1300
1203
  "08915152",
1301
1204
  null,
1302
1205
  null
1303
1206
  );
1304
- const Rt = Qn.exports, jt = 2, tr = /* @__PURE__ */ k({
1207
+ const It = Wn.exports, Nt = 2, Zn = /* @__PURE__ */ $({
1305
1208
  __name: "lume-line",
1306
1209
  props: {
1307
1210
  pathDefinition: {
@@ -1310,11 +1213,11 @@ const Rt = Qn.exports, jt = 2, tr = /* @__PURE__ */ k({
1310
1213
  },
1311
1214
  width: {
1312
1215
  type: Number,
1313
- default: jt
1216
+ default: Nt
1314
1217
  },
1315
1218
  color: {
1316
1219
  type: String,
1317
- default: E.Skyblue
1220
+ default: N.Skyblue
1318
1221
  },
1319
1222
  dashed: {
1320
1223
  type: Boolean,
@@ -1335,10 +1238,10 @@ const Rt = Qn.exports, jt = 2, tr = /* @__PURE__ */ k({
1335
1238
  },
1336
1239
  setup(e) {
1337
1240
  const t = L(null);
1338
- return H(() => pt(t.value)), { __sfc: !0, DEFAULT_LINE_WIDTH: jt, root: t };
1241
+ return G(() => ct(t.value)), { __sfc: !0, DEFAULT_LINE_WIDTH: Nt, root: t };
1339
1242
  }
1340
1243
  });
1341
- var er = function() {
1244
+ var Xn = function() {
1342
1245
  var t = this, r = t._self._c;
1343
1246
  return t._self._setupProxy, r("path", { ref: "root", staticClass: "lume-line", class: {
1344
1247
  [`lume-stroke--${t.color}`]: !0,
@@ -1348,28 +1251,28 @@ var er = function() {
1348
1251
  animationDelay: t.transition && t.animationDelay + "s",
1349
1252
  animationDuration: t.transition && t.animationDuration + "s"
1350
1253
  }, attrs: { d: t.pathDefinition, "stroke-width": t.width, "data-j-line": "" } });
1351
- }, nr = [], rr = /* @__PURE__ */ w(
1352
- tr,
1353
- er,
1354
- nr,
1254
+ }, Un = [], Yn = /* @__PURE__ */ w(
1255
+ Zn,
1256
+ Xn,
1257
+ Un,
1355
1258
  !1,
1356
1259
  null,
1357
1260
  "00afaa24",
1358
1261
  null,
1359
1262
  null
1360
1263
  );
1361
- const ar = rr.exports, Vt = 4, or = /* @__PURE__ */ k({
1264
+ const Kn = Yn.exports, Bt = 4, Jn = /* @__PURE__ */ $({
1362
1265
  __name: "lume-point",
1363
1266
  props: {
1364
1267
  x: { type: Number, required: !0 },
1365
1268
  y: { type: Number, required: !0 },
1366
1269
  color: {
1367
1270
  type: String,
1368
- default: E.Skyblue
1271
+ default: N.Skyblue
1369
1272
  },
1370
1273
  radius: {
1371
1274
  type: Number,
1372
- default: Vt
1275
+ default: Bt
1373
1276
  },
1374
1277
  active: {
1375
1278
  type: Boolean,
@@ -1378,23 +1281,124 @@ const ar = rr.exports, Vt = 4, or = /* @__PURE__ */ k({
1378
1281
  },
1379
1282
  setup(e) {
1380
1283
  const t = e, r = L(null), n = d(() => t.radius / 2);
1381
- return H(() => pt(r.value)), { __sfc: !0, DEFAULT_RADIUS: Vt, props: t, root: r, strokeWidth: n };
1284
+ return G(() => ct(r.value)), { __sfc: !0, DEFAULT_RADIUS: Bt, props: t, root: r, strokeWidth: n };
1382
1285
  }
1383
1286
  });
1384
- var sr = function() {
1287
+ var Qn = function() {
1385
1288
  var t = this, r = t._self._c, n = t._self._setupProxy;
1386
1289
  return r("circle", { ref: "root", staticClass: "lume-point", class: `lume-stroke--${t.color}`, attrs: { cx: t.x, cy: t.y, r: t.active ? t.radius : 0, "stroke-width": n.strokeWidth, "data-j-point": "" } });
1387
- }, ir = [], ur = /* @__PURE__ */ w(
1388
- or,
1389
- sr,
1390
- ir,
1290
+ }, qn = [], tr = /* @__PURE__ */ w(
1291
+ Jn,
1292
+ Qn,
1293
+ qn,
1391
1294
  !1,
1392
1295
  null,
1393
1296
  "5a728c02",
1394
1297
  null,
1395
1298
  null
1396
1299
  );
1397
- const lr = ur.exports, cr = () => ({
1300
+ const er = tr.exports;
1301
+ var V = /* @__PURE__ */ ((e) => (e.Categorical = "categorical", e.Sequential = "sequential", e.Divergent = "divergent", e))(V || {});
1302
+ const nr = V.Categorical, dt = N.Skyblue, rr = $t.SkyTeal;
1303
+ function ar(e) {
1304
+ return e === V.Divergent ? rr : dt;
1305
+ }
1306
+ function or(e) {
1307
+ return Object.values(wt).includes(e);
1308
+ }
1309
+ function Gt(e, t) {
1310
+ return t === V.Divergent ? Object.values($t).includes(e) : Object.values({
1311
+ ...N,
1312
+ ...oe,
1313
+ ...se,
1314
+ ...wt
1315
+ }).includes(e);
1316
+ }
1317
+ function sr(e, t) {
1318
+ const r = Object.values(N).indexOf(e);
1319
+ return Qe(Object.values(N), r > -1 ? r : 0)[t];
1320
+ }
1321
+ function ir(e, t) {
1322
+ const r = 50 + t * 10;
1323
+ return `${e}-${r}`;
1324
+ }
1325
+ function ur(e, t) {
1326
+ const r = (t + 1) * 10;
1327
+ return `${e}-${r}`;
1328
+ }
1329
+ function Ht(e, t, r) {
1330
+ switch (t) {
1331
+ default:
1332
+ case V.Categorical:
1333
+ return or(e) ? e : sr(e, r);
1334
+ case V.Sequential:
1335
+ return ir(e, r);
1336
+ case V.Divergent:
1337
+ return ur(e, r);
1338
+ }
1339
+ }
1340
+ function lr(e, t, r = nr, n) {
1341
+ return Gt(e, r) ? e : (n > 4 && (ut(tt.ColorLoop), n = n % 5), Gt(t, r) ? Ht(t, r, n) : Ht(ar(r), r, n));
1342
+ }
1343
+ function cr(e) {
1344
+ return e.map((t) => Xe(t) ? t : { value: t });
1345
+ }
1346
+ function dr(e) {
1347
+ return e.__internal === !0;
1348
+ }
1349
+ const le = (e = null) => ({
1350
+ data: {
1351
+ type: Array,
1352
+ required: !0,
1353
+ validator: e || void 0
1354
+ },
1355
+ labels: {
1356
+ type: Array,
1357
+ default: void 0
1358
+ },
1359
+ color: {
1360
+ type: String,
1361
+ default: N.Skyblue
1362
+ }
1363
+ });
1364
+ function St(e, t, r, n, a) {
1365
+ const o = it({
1366
+ width: 0,
1367
+ height: 0
1368
+ }), s = qe(12), i = d(() => {
1369
+ var c;
1370
+ return e.value.length > 5 && ut(tt.DatasetLength), (c = e.value) == null ? void 0 : c.map(
1371
+ (p, v) => {
1372
+ if (dr(p))
1373
+ return p;
1374
+ const g = cr(p.values), f = lr(
1375
+ p.color,
1376
+ r == null ? void 0 : r.value,
1377
+ n == null ? void 0 : n.value.colorPalette,
1378
+ v
1379
+ );
1380
+ return {
1381
+ ...p,
1382
+ values: g,
1383
+ color: f,
1384
+ __internal: !0
1385
+ };
1386
+ }
1387
+ );
1388
+ }), l = d(() => Array.isArray(t.value) ? t.value : mt(e.value).map((c, p) => p));
1389
+ function u(c) {
1390
+ const p = (a == null ? void 0 : a.value) === A.HORIZONTAL ? mt(e).length * (an * 2) : c.height;
1391
+ o.width = c.width, o.height = p;
1392
+ }
1393
+ return {
1394
+ chartID: s,
1395
+ computedLabels: l,
1396
+ containerSize: o,
1397
+ internalData: i,
1398
+ updateSize: u
1399
+ };
1400
+ }
1401
+ const pr = () => ({
1398
1402
  xScale: {
1399
1403
  type: Function,
1400
1404
  default: null
@@ -1404,16 +1408,16 @@ const lr = ur.exports, cr = () => ({
1404
1408
  default: null
1405
1409
  }
1406
1410
  });
1407
- function dr(e, t, r, n, a) {
1411
+ function fr(e, t, r, n, a) {
1408
1412
  const o = L(null), s = L(null);
1409
1413
  function i() {
1410
1414
  const { width: l, height: u } = r;
1411
- !l && !u || !t.value || !e.value || (n.value === b.HORIZONTAL ? (o.value = Gt(
1415
+ !l && !u || !t.value || !e.value || (n.value === A.HORIZONTAL ? (o.value = jt(
1412
1416
  e.value,
1413
1417
  l,
1414
1418
  n.value,
1415
1419
  a.value.startOnZero
1416
- ), s.value = Ft(t.value, u)) : (o.value = Ft(t.value, l), s.value = Gt(
1420
+ ), s.value = Vt(t.value, u)) : (o.value = Vt(t.value, l), s.value = jt(
1417
1421
  e.value,
1418
1422
  u,
1419
1423
  n.value,
@@ -1422,41 +1426,41 @@ function dr(e, t, r, n, a) {
1422
1426
  }
1423
1427
  return Qt(i), { xScale: o, yScale: s };
1424
1428
  }
1425
- function Ft(e, t) {
1429
+ function Vt(e, t) {
1426
1430
  const r = [0, t];
1427
1431
  return Object.assign(
1428
- J().range(r).domain(e.map((n, a) => a)),
1432
+ Q().range(r).domain(e.map((n, a) => a)),
1429
1433
  { labels: e }
1430
1434
  );
1431
1435
  }
1432
- function Gt(e, t, r, n) {
1433
- const a = ae(e).filter((c) => c != null), o = [0, t];
1436
+ function jt(e, t, r, n) {
1437
+ const a = re(e).filter((c) => c != null), o = [0, t];
1434
1438
  if (a.length === 0)
1435
- return Q().range(o).domain([0, 0]).nice();
1436
- const s = Math.min(...a), i = n && s > 0 ? 0 : s, l = Math.max(...a), u = r === b.HORIZONTAL ? [i, l] : [l, i];
1437
- return Q().range(o).domain(u).nice();
1439
+ return q().range(o).domain([0, 0]).nice();
1440
+ const s = Math.min(...a), i = n && s > 0 ? 0 : s, l = Math.max(...a), u = r === A.HORIZONTAL ? [i, l] : [l, i];
1441
+ return q().range(o).domain(u).nice();
1438
1442
  }
1439
- function Mt(e) {
1443
+ function Ft(e) {
1440
1444
  return (e == null ? void 0 : e.range) !== void 0 || (e == null ? void 0 : e.copy) !== void 0;
1441
1445
  }
1442
- function Tt(e, t) {
1443
- return M(e) ? e.bandwidth() / 2 + e(e.domain()[t]) : e(t);
1446
+ function bt(e, t) {
1447
+ return F(e) ? e.bandwidth() / 2 + e(e.domain()[t]) : e(t);
1444
1448
  }
1445
1449
  function ot(e, t, {
1446
1450
  padding: r,
1447
1451
  paddingInner: n,
1448
1452
  paddingOuter: a
1449
1453
  } = {}) {
1450
- const o = r != null ? r : t === b.HORIZONTAL ? Ue : Xe;
1454
+ const o = r != null ? r : t === A.HORIZONTAL ? sn : on;
1451
1455
  return e.copy().paddingInner(n != null ? n : o).paddingOuter(a != null ? a : o / 2);
1452
1456
  }
1453
- function ue(e) {
1454
- return Object.values(b).includes(e);
1457
+ function ce(e) {
1458
+ return Object.values(A).includes(e);
1455
1459
  }
1456
- const W = (e, t = !0, r = !0) => ({
1457
- ...se(e),
1458
- ...r ? cr() : {},
1459
- ...dt(),
1460
+ const z = (e, t = !0, r = !0) => ({
1461
+ ...le(e),
1462
+ ...r ? pr() : {},
1463
+ ...lt(),
1460
1464
  title: {
1461
1465
  type: String,
1462
1466
  default: null
@@ -1464,15 +1468,15 @@ const W = (e, t = !0, r = !0) => ({
1464
1468
  ...t ? {
1465
1469
  orientation: {
1466
1470
  type: String,
1467
- default: b.VERTICAL,
1468
- validator: ue
1471
+ default: A.VERTICAL,
1472
+ validator: ce
1469
1473
  }
1470
1474
  } : {},
1471
1475
  classList: {
1472
1476
  type: [String, Array],
1473
1477
  default: () => []
1474
1478
  }
1475
- }), ft = () => ({
1479
+ }), pt = () => ({
1476
1480
  data: {
1477
1481
  type: Array,
1478
1482
  required: !0
@@ -1487,8 +1491,8 @@ const W = (e, t = !0, r = !0) => ({
1487
1491
  },
1488
1492
  orientation: {
1489
1493
  type: String,
1490
- default: b.VERTICAL,
1491
- validator: ue
1494
+ default: A.VERTICAL,
1495
+ validator: ce
1492
1496
  },
1493
1497
  xScale: {
1494
1498
  type: Function,
@@ -1514,59 +1518,59 @@ const W = (e, t = !0, r = !0) => ({
1514
1518
  type: [String, Array],
1515
1519
  default: () => []
1516
1520
  }
1517
- }), pr = /* @__PURE__ */ k({
1521
+ }), vr = /* @__PURE__ */ $({
1518
1522
  __name: "lume-overlay-group",
1519
1523
  props: {
1520
- ...ft(),
1524
+ ...pt(),
1521
1525
  orientation: {
1522
1526
  type: String,
1523
- default: b.VERTICAL
1527
+ default: A.VERTICAL
1524
1528
  }
1525
1529
  },
1526
1530
  emits: ["mouseover"],
1527
1531
  setup(e, { emit: t }) {
1528
- const r = e, { data: n, orientation: a, xScale: o, yScale: s } = S(r), i = d(() => gt(n));
1532
+ const r = e, { data: n, orientation: a, xScale: o, yScale: s } = I(r), i = d(() => mt(n));
1529
1533
  function l(u) {
1530
- const c = a.value === b.HORIZONTAL ? s.value : o.value, f = c.domain(), _ = Ct(c), m = M(c) ? c(f[u]) : c(u) - _ / 2;
1531
- return a.value === b.HORIZONTAL ? {
1534
+ const c = a.value === A.HORIZONTAL ? s.value : o.value, p = c.domain(), v = xt(c), g = F(c) ? c(p[u]) : c(u) - v / 2;
1535
+ return a.value === A.HORIZONTAL ? {
1532
1536
  width: Math.max(...o.value.range()),
1533
- height: _,
1534
- transform: `translate(0, ${m})`
1537
+ height: v,
1538
+ transform: `translate(0, ${g})`
1535
1539
  } : {
1536
- width: _,
1540
+ width: v,
1537
1541
  height: Math.max(...s.value.range()),
1538
- transform: `translate(${m}, 0)`
1542
+ transform: `translate(${g}, 0)`
1539
1543
  };
1540
1544
  }
1541
- return { __sfc: !0, props: r, emit: t, data: n, orientation: a, xScale: o, yScale: s, overlayData: i, getOverlayBarAttributes: l, LumeBar: Rt };
1545
+ return { __sfc: !0, props: r, emit: t, data: n, orientation: a, xScale: o, yScale: s, overlayData: i, getOverlayBarAttributes: l, LumeBar: It };
1542
1546
  }
1543
1547
  });
1544
- var fr = function() {
1548
+ var _r = function() {
1545
1549
  var t = this, r = t._self._c, n = t._self._setupProxy;
1546
1550
  return r("g", { staticClass: "lume-overlay-group" }, t._l(n.overlayData, function(a, o) {
1547
1551
  return r(n.LumeBar, t._b({ key: `overlay-${o}`, attrs: { "data-j-lume-overlay-group": o, transition: !1, "class-list": "lume-fill--transparent" }, nativeOn: { mouseover: function(s) {
1548
1552
  return n.emit("mouseover", o);
1549
1553
  } } }, "lume-bar", n.getOverlayBarAttributes(o), !1));
1550
1554
  }), 1);
1551
- }, vr = [], _r = /* @__PURE__ */ w(
1552
- pr,
1553
- fr,
1555
+ }, hr = [], mr = /* @__PURE__ */ w(
1554
1556
  vr,
1557
+ _r,
1558
+ hr,
1555
1559
  !1,
1556
1560
  null,
1557
1561
  null,
1558
1562
  null,
1559
1563
  null
1560
1564
  );
1561
- const hr = _r.exports;
1562
- function mr(e) {
1565
+ const gr = mr.exports;
1566
+ function yr(e) {
1563
1567
  return { hasNegativeValues: d(
1564
- () => ae(e.value).some((r) => r < 0)
1568
+ () => re(e.value).some((r) => r < 0)
1565
1569
  ) };
1566
1570
  }
1567
- function gr(e, t, r, n) {
1571
+ function br(e, t, r, n) {
1568
1572
  const a = d(
1569
- () => n.value === b.HORIZONTAL
1573
+ () => n.value === A.HORIZONTAL
1570
1574
  ), o = d(
1571
1575
  () => {
1572
1576
  var u;
@@ -1589,38 +1593,44 @@ function gr(e, t, r, n) {
1589
1593
  transform: i.value
1590
1594
  })) };
1591
1595
  }
1592
- function yr(e) {
1596
+ function Tr(e) {
1593
1597
  return e.reduce((t, r) => r.values.map((n, a) => {
1594
1598
  var o;
1595
1599
  return t[a] ? n.value > t[a] ? n.value : t[a] : (o = n.value) != null ? o : 0;
1596
1600
  }), []);
1597
1601
  }
1598
- function br(e) {
1602
+ function Ar(e) {
1599
1603
  return e.reduce((t, r) => r.values.map((n, a) => {
1600
1604
  var o;
1601
1605
  return t[a] ? n.value + t[a] : (o = n.value) != null ? o : 0;
1602
1606
  }), []);
1603
1607
  }
1604
- const zt = {
1605
- "stacked-bar": br
1606
- }, Wt = L(null);
1607
- function le(e, t, r, n, a) {
1608
- function o(s) {
1609
- const i = (a == null ? void 0 : a.value) && zt[a.value] ? zt[a.value](s) : yr(s);
1610
- Wt.value = i.map((l, u) => ({
1611
- cx: (r == null ? void 0 : r.value) === b.HORIZONTAL ? e.value(l) : Tt(e.value, u),
1612
- cy: (r == null ? void 0 : r.value) === b.HORIZONTAL ? Tt(t.value, u) : t.value(l)
1608
+ const Mt = {
1609
+ "stacked-bar": Ar
1610
+ };
1611
+ function de(e, t, r, n, a, o, s) {
1612
+ const i = d(
1613
+ () => {
1614
+ var u;
1615
+ return t.value.withTooltip !== !1 && !((u = t.value.tooltipOptions) != null && u.targetElement);
1616
+ }
1617
+ );
1618
+ function l(u) {
1619
+ const c = (s == null ? void 0 : s.value) && Mt[s.value] ? Mt[s.value](u) : Tr(u);
1620
+ e.value = c.map((p, v) => ({
1621
+ cx: (a == null ? void 0 : a.value) === A.HORIZONTAL ? r.value(p) : bt(r.value, v),
1622
+ cy: (a == null ? void 0 : a.value) === A.HORIZONTAL ? bt(n.value, v) : n.value(p)
1613
1623
  }));
1614
1624
  }
1615
- return R(
1616
- [e, t],
1625
+ return C(
1626
+ [r, n],
1617
1627
  () => {
1618
- e.value && t.value && (n == null ? void 0 : n.value) && o(n.value);
1628
+ r.value && n.value && (o == null ? void 0 : o.value) && i.value && l(o.value);
1619
1629
  },
1620
1630
  { immediate: !0 }
1621
- ), { tooltipAnchorAttributes: Wt, updateTooltipAnchorAttributes: o };
1631
+ ), { shouldGenerateTooltipAnchors: i, updateTooltipAnchorAttributes: l };
1622
1632
  }
1623
- function Tr() {
1633
+ function Or() {
1624
1634
  const e = it({
1625
1635
  opened: !1,
1626
1636
  targetElement: null
@@ -1631,22 +1641,22 @@ function Tr() {
1631
1641
  e.opened = !1, e.targetElement = null;
1632
1642
  } };
1633
1643
  }
1634
- function Ar(e) {
1644
+ function kr(e) {
1635
1645
  return { getTooltipItems: d(
1636
1646
  () => (r) => e.value.map(({ color: n, label: a, values: o }) => {
1637
1647
  var s, i, l, u, c;
1638
1648
  return {
1639
1649
  color: ((s = o[r]) == null ? void 0 : s.color) || n,
1640
1650
  label: a,
1641
- value: (c = (u = (i = o[r]) == null ? void 0 : i.label) != null ? u : (l = o[r]) == null ? void 0 : l.value) != null ? c : ne
1651
+ value: (c = (u = (i = o[r]) == null ? void 0 : i.label) != null ? u : (l = o[r]) == null ? void 0 : l.value) != null ? c : ie
1642
1652
  };
1643
1653
  })
1644
1654
  ) };
1645
1655
  }
1646
- const Or = /* @__PURE__ */ k({
1656
+ const xr = /* @__PURE__ */ $({
1647
1657
  __name: "lume-chart",
1648
1658
  props: {
1649
- ...W(),
1659
+ ...z(),
1650
1660
  chartType: {
1651
1661
  type: String,
1652
1662
  default: null
@@ -1654,85 +1664,86 @@ const Or = /* @__PURE__ */ k({
1654
1664
  },
1655
1665
  emits: ["click"],
1656
1666
  setup(e, { emit: t }) {
1657
- const r = e, n = j(), a = qe, { data: o, labels: s, color: i, options: l, orientation: u, chartType: c } = S(r), f = L(-1), _ = L(null), m = L(null), { allOptions: p } = N(l), { internalData: h, computedLabels: g, containerSize: v, updateSize: y, chartID: O } = ct(o, s, i, p, u), { xScale: T, yScale: $ } = dr(
1667
+ const r = e, n = H(), a = un, { data: o, labels: s, color: i, options: l, orientation: u, chartType: c } = I(r), p = L(-1), v = L(null), g = L(null), f = L([]), { allOptions: _ } = B(l), { internalData: h, computedLabels: y, containerSize: b, updateSize: m, chartID: T } = St(o, s, i, _, u), { xScale: x, yScale: S } = fr(
1658
1668
  h,
1659
- g,
1660
- v,
1669
+ y,
1670
+ b,
1661
1671
  u,
1662
- p
1663
- ), P = d(() => {
1664
- var A;
1665
- return r.xScale ? Mt(r.xScale) ? r.xScale : (A = r.xScale) == null ? void 0 : A.call(r, h.value, s.value, v) : T.value;
1666
- }), D = d(() => {
1667
- var A;
1668
- return r.yScale ? Mt(r.yScale) ? r.yScale : (A = r.yScale) == null ? void 0 : A.call(r, h.value, s.value, v) : $.value;
1669
- }), B = d(() => ({
1670
- ...p.value.xAxisOptions,
1671
- withHover: u.value === b.VERTICAL
1672
+ _
1673
+ ), D = d(() => {
1674
+ var O;
1675
+ return r.xScale ? Ft(r.xScale) ? r.xScale : (O = r.xScale) == null ? void 0 : O.call(r, h.value, s.value, b) : x.value;
1676
+ }), P = d(() => {
1677
+ var O;
1678
+ return r.yScale ? Ft(r.yScale) ? r.yScale : (O = r.yScale) == null ? void 0 : O.call(r, h.value, s.value, b) : S.value;
1679
+ }), W = d(() => ({
1680
+ ..._.value.xAxisOptions,
1681
+ withHover: u.value === A.VERTICAL
1672
1682
  })), Z = d(() => ({
1673
- ...p.value.yAxisOptions,
1674
- withHover: u.value === b.HORIZONTAL
1675
- })), V = d(() => {
1676
- var A;
1677
- return (A = p.value.xAxisOptions) == null ? void 0 : A.title;
1678
- }), X = d(() => {
1679
- var A;
1680
- return (A = p.value.yAxisOptions) == null ? void 0 : A.title;
1681
- }), x = d(() => {
1682
- var A;
1683
- return ((A = p.value.xAxisOptions) == null ? void 0 : A.withTitle) !== !1 && V.value;
1684
- }), C = d(() => {
1685
- var A;
1686
- return ((A = p.value.yAxisOptions) == null ? void 0 : A.withTitle) !== !1 && X.value;
1687
- }), K = d(
1688
- () => {
1689
- var A;
1690
- return p.value.withTooltip !== !1 && !((A = p.value.tooltipOptions) != null && A.targetElement);
1691
- }
1692
- ), vt = d(() => {
1693
- const A = [], { noBaseScales: et } = p.value;
1694
- return et || A.push(() => !!(P.value && D.value)), A.every((_t) => _t() === !0);
1695
- }), { hasNegativeValues: _e } = mr(h), { negativeBarAttributes: he } = gr(
1696
- v,
1697
- P,
1683
+ ..._.value.yAxisOptions,
1684
+ withHover: u.value === A.HORIZONTAL
1685
+ })), X = d(() => {
1686
+ var O;
1687
+ return (O = _.value.xAxisOptions) == null ? void 0 : O.title;
1688
+ }), k = d(() => {
1689
+ var O;
1690
+ return (O = _.value.yAxisOptions) == null ? void 0 : O.title;
1691
+ }), R = d(() => {
1692
+ var O;
1693
+ return ((O = _.value.xAxisOptions) == null ? void 0 : O.withTitle) !== !1 && X.value;
1694
+ }), J = d(() => {
1695
+ var O;
1696
+ return ((O = _.value.yAxisOptions) == null ? void 0 : O.withTitle) !== !1 && k.value;
1697
+ }), ft = d(() => {
1698
+ const O = [], { noBaseScales: et } = _.value;
1699
+ return et || O.push(() => !!(D.value && P.value)), O.every((vt) => vt() === !0);
1700
+ }), { hasNegativeValues: me } = yr(h), { negativeBarAttributes: ge } = br(
1701
+ b,
1698
1702
  D,
1699
- u
1700
- ), { tooltipAnchorAttributes: me } = le(
1701
1703
  P,
1704
+ u
1705
+ ), { shouldGenerateTooltipAnchors: ye } = de(
1706
+ f,
1707
+ _,
1702
1708
  D,
1709
+ P,
1703
1710
  u,
1704
1711
  h,
1705
1712
  c
1706
- ), { tooltipConfig: ge, showTooltip: Dt, hideTooltip: Et } = Tr(), { getTooltipItems: ye } = Ar(h), be = d(
1713
+ ), { tooltipConfig: be, showTooltip: Rt, hideTooltip: Pt } = Or(), { getTooltipItems: Te } = kr(h), Ae = d(
1707
1714
  () => {
1708
- var A;
1709
- return ((A = p.value.tooltipOptions) == null ? void 0 : A.position) || "top";
1715
+ var O;
1716
+ return ((O = _.value.tooltipOptions) == null ? void 0 : O.position) || "top";
1710
1717
  }
1711
1718
  );
1712
- function Te(A) {
1719
+ function Oe(O) {
1713
1720
  var et;
1714
- if (p.value.withHover !== !1 && (f.value = A), p.value.withTooltip !== !1) {
1715
- const _t = (et = p.value.tooltipOptions) != null && et.targetElement ? p.value.tooltipOptions.targetElement === "self" ? m.value.$el : p.value.tooltipOptions.targetElement : _.value[A];
1716
- Dt(_t);
1721
+ if (_.value.withHover !== !1 && (p.value = O), _.value.withTooltip !== !1) {
1722
+ const vt = (et = _.value.tooltipOptions) != null && et.targetElement ? _.value.tooltipOptions.targetElement === "self" ? g.value.$el : _.value.tooltipOptions.targetElement : v.value[O];
1723
+ Rt(vt);
1717
1724
  }
1718
1725
  }
1719
- function Ae() {
1720
- Et(), f.value = -1;
1726
+ function ke() {
1727
+ Pt(), p.value = -1;
1721
1728
  }
1722
- return H(() => {
1723
- var A;
1724
- (A = n.groups) != null && A.call(n) || console.error('"groups" `<slot>` must have content.');
1725
- }), { __sfc: !0, props: r, slots: n, emit: t, tooltipAnchorRadius: a, data: o, labels: s, color: i, options: l, orientation: u, chartType: c, hoveredIndex: f, tooltipAnchor: _, chartContainer: m, allOptions: p, internalData: h, computedLabels: g, containerSize: v, updateSize: y, chartID: O, xScale: T, yScale: $, computedXScale: P, computedYScale: D, computedXAxisOptions: B, computedYAxisOptions: Z, xAxisTitle: V, yAxisTitle: X, showXAxisTitle: x, showYAxisTitle: C, shouldGenerateTooltipAnchors: K, isReady: vt, hasNegativeValues: _e, negativeBarAttributes: he, tooltipAnchorAttributes: me, tooltipConfig: ge, showTooltip: Dt, hideTooltip: Et, getTooltipItems: ye, tooltipPosition: be, mouseOverHandler: Te, handleMouseleave: Ae, VuePortal: Lt, VuePortalTarget: $t, LumeAxis: In, LumeBar: Rt, LumeChartContainer: Bn, LumeChartLegend: Gn, LumeTooltip: Xn, LumeOverlayGroup: hr };
1729
+ return Et("chartID", T), Et("tooltipAnchorAttributes", f), G(() => {
1730
+ var O;
1731
+ (O = n.groups) != null && O.call(n) || console.error('"groups" `<slot>` must have content.');
1732
+ }), { __sfc: !0, props: r, slots: n, emit: t, tooltipAnchorRadius: a, data: o, labels: s, color: i, options: l, orientation: u, chartType: c, hoveredIndex: p, tooltipAnchor: v, chartContainer: g, tooltipAnchorAttributes: f, allOptions: _, internalData: h, computedLabels: y, containerSize: b, updateSize: m, chartID: T, xScale: x, yScale: S, computedXScale: D, computedYScale: P, computedXAxisOptions: W, computedYAxisOptions: Z, xAxisTitle: X, yAxisTitle: k, showXAxisTitle: R, showYAxisTitle: J, isReady: ft, hasNegativeValues: me, negativeBarAttributes: ge, shouldGenerateTooltipAnchors: ye, tooltipConfig: be, showTooltip: Rt, hideTooltip: Pt, getTooltipItems: Te, tooltipPosition: Ae, mouseOverHandler: Oe, handleMouseleave: ke, LumeAxis: On, LumeBar: It, LumeChartContainer: In, LumeChartLegend: En, LumeTooltip: Hn, LumeOverlayGroup: gr };
1726
1733
  }
1727
1734
  });
1728
- var xr = function() {
1735
+ var Lr = function() {
1729
1736
  var t = this, r = t._self._c, n = t._self._setupProxy;
1730
- return r(n.LumeChartContainer, { ref: "chartContainer", attrs: { margins: n.allOptions.margins, "container-size": n.containerSize, "no-min-size": n.allOptions.noMinSize, "transparent-background": n.allOptions.transparentBackground, "data-j-lume-chart": "" }, on: { resize: n.updateSize, mouseleave: n.handleMouseleave }, scopedSlots: t._u([{ key: "header", fn: function() {
1731
- return [r("div", { staticClass: "lume-chart__header" }, [r("div", { staticClass: "lume-chart__header-section" }, [t.title ? r("h1", { staticClass: "lume-chart__title lume-chart-title lume-typography--display" }, [t._v(" " + t._s(t.title) + " ")]) : t._e(), r("div", { staticClass: "lume-chart__controls" }, [t._t("controls")], 2)]), r("div", { staticClass: "lume-chart__header-section" }, [n.showYAxisTitle ? r("h3", { staticClass: "lume-chart__axis-title lume-axis-title lume-typography--body" }, [t._v(" " + t._s(n.yAxisTitle) + " ")]) : t._e(), n.allOptions.withLegend !== !1 ? r(n.VuePortal, { attrs: { disabled: n.allOptions.legendPosition !== "bottom", to: `legend-bottom-${n.chartID}`, slim: "" } }, [r(n.LumeChartLegend, { staticClass: "lume-chart__legend", attrs: { data: n.internalData, "data-j-lume-chart__legend": "" }, on: { click: function(a) {
1732
- return n.emit("click", a);
1733
- } } })], 1) : t._e()], 1)])];
1737
+ return r(n.LumeChartContainer, { ref: "chartContainer", attrs: { id: `lume-chart_${n.chartID}`, margins: n.allOptions.margins, "container-size": n.containerSize, "no-min-size": n.allOptions.noMinSize, "transparent-background": n.allOptions.transparentBackground, "data-j-lume-chart": "" }, on: { resize: n.updateSize, mouseleave: n.handleMouseleave }, scopedSlots: t._u([{ key: "header", fn: function() {
1738
+ return [r("div", { staticClass: "lume-chart__header" }, [r("div", { staticClass: "lume-chart__header-section" }, [t.title ? r("h1", { staticClass: "lume-chart__title lume-chart-title lume-typography--display" }, [t._v(" " + t._s(t.title) + " ")]) : t._e(), r("div", { staticClass: "lume-chart__controls" }, [t._t("controls")], 2)]), r("div", { staticClass: "lume-chart__header-section" }, [n.showYAxisTitle ? r("h3", { staticClass: "lume-chart__axis-title lume-axis-title lume-typography--body" }, [t._v(" " + t._s(n.yAxisTitle) + " ")]) : t._e(), t._t("legend", function() {
1739
+ return [n.allOptions.withLegend !== !1 && n.allOptions.legendPosition !== "bottom" ? r(n.LumeChartLegend, { staticClass: "lume-chart__legend", attrs: { data: n.internalData, "data-j-lume-chart__legend": "" }, on: { click: function(a) {
1740
+ return n.emit("click", a);
1741
+ } } }) : t._e()];
1742
+ }, { data: n.internalData })], 2)])];
1734
1743
  }, proxy: !0 }, { key: "footer", fn: function() {
1735
- return [n.showXAxisTitle ? r("h3", { staticClass: "lume-chart__axis-title lume-chart__axis-title--centered lume-axis-title" }, [t._v(" " + t._s(n.xAxisTitle) + " ")]) : t._e(), r(n.VuePortalTarget, { attrs: { name: `legend-bottom-${n.chartID}`, slim: "" } })];
1744
+ return [n.showXAxisTitle ? r("h3", { staticClass: "lume-chart__axis-title lume-chart__axis-title--centered lume-axis-title" }, [t._v(" " + t._s(n.xAxisTitle) + " ")]) : t._e(), n.allOptions.withLegend !== !1 && n.allOptions.legendPosition == "bottom" ? r(n.LumeChartLegend, { staticClass: "lume-chart__legend lume-chart__legend--bottom", attrs: { data: n.internalData, "data-j-lume-chart__legend": "" }, on: { click: function(a) {
1745
+ return n.emit("click", a);
1746
+ } } }) : t._e()];
1736
1747
  }, proxy: !0 }, { key: "extra", fn: function() {
1737
1748
  return [t._t("tooltip", function() {
1738
1749
  return [n.allOptions.withTooltip !== !1 && n.tooltipConfig.opened ? r(n.LumeTooltip, t._b({ attrs: { position: n.tooltipPosition, title: n.computedLabels[n.hoveredIndex], items: n.getTooltipItems(n.hoveredIndex), options: n.allOptions.tooltipOptions, "data-j-lume-chart__tooltip": "" } }, "lume-tooltip", n.tooltipConfig, !1), [t._t("tooltip-content", null, { data: n.internalData, labels: n.computedLabels, hoveredIndex: n.hoveredIndex })], 2) : t._e()];
@@ -1743,21 +1754,21 @@ var xr = function() {
1743
1754
  } } }), r(n.LumeAxis, { attrs: { type: "y", scale: n.computedYScale, "container-size": n.containerSize, options: n.computedYAxisOptions, "hovered-index": n.hoveredIndex, orientation: n.orientation, "data-j-lume-chart__y-axis": "" }, on: { "tick-mouseover": function(a) {
1744
1755
  return n.mouseOverHandler(a);
1745
1756
  } } })];
1746
- }, { xScale: n.computedXScale, yScale: n.computedYScale, containerSize: n.containerSize, options: n.allOptions, hoveredIndex: n.hoveredIndex }) : t._e(), t._t("groups", null, { data: n.internalData, labels: n.computedLabels, options: n.allOptions, orientation: n.orientation, xScale: n.computedXScale, yScale: n.computedYScale, hoveredIndex: n.hoveredIndex, containerSize: n.containerSize, transition: n.allOptions.withTransition !== !1, classList: t.classList }), n.allOptions.withHover !== !1 ? r(n.LumeOverlayGroup, { attrs: { data: n.internalData, orientation: n.orientation, "x-scale": n.computedXScale, "y-scale": n.computedYScale, "data-j-lume-chart__overlay-group": "" }, on: { mouseover: n.mouseOverHandler } }) : t._e(), n.shouldGenerateTooltipAnchors ? r("g", t._l(n.tooltipAnchorAttributes, function(a) {
1747
- return r("circle", t._b({ key: `anchor-${a.cx}${a.cy}`, ref: "tooltipAnchor", refInFor: !0, staticClass: "lume-fill--transparent", attrs: { r: n.tooltipAnchorRadius } }, "circle", a, !1));
1757
+ }, { xScale: n.computedXScale, yScale: n.computedYScale, containerSize: n.containerSize, options: n.allOptions, hoveredIndex: n.hoveredIndex }) : t._e(), t._t("groups", null, { data: n.internalData, labels: n.computedLabels, options: n.allOptions, orientation: n.orientation, xScale: n.computedXScale, yScale: n.computedYScale, hoveredIndex: n.hoveredIndex, containerSize: n.containerSize, transition: n.allOptions.withTransition !== !1, classList: t.classList }), n.allOptions.withHover !== !1 ? r(n.LumeOverlayGroup, { attrs: { data: n.internalData, orientation: n.orientation, "x-scale": n.computedXScale, "y-scale": n.computedYScale, "data-j-lume-chart__overlay-group": "" }, on: { mouseover: n.mouseOverHandler } }) : t._e(), n.shouldGenerateTooltipAnchors ? r("g", t._l(n.tooltipAnchorAttributes, function(a, o) {
1758
+ return r("circle", t._b({ key: `anchor_${o}`, ref: "tooltipAnchor", refInFor: !0, staticClass: "lume-fill--transparent", attrs: { r: n.tooltipAnchorRadius } }, "circle", a, !1));
1748
1759
  }), 0) : t._e()] : t._e()], 2);
1749
- }, Lr = [], $r = /* @__PURE__ */ w(
1750
- Or,
1760
+ }, $r = [], wr = /* @__PURE__ */ w(
1751
1761
  xr,
1752
1762
  Lr,
1763
+ $r,
1753
1764
  !1,
1754
1765
  null,
1755
- "64922cd3",
1766
+ "0d2bef6f",
1756
1767
  null,
1757
1768
  null
1758
1769
  );
1759
- const Y = $r.exports;
1760
- function Zt(e, t) {
1770
+ const K = wr.exports;
1771
+ function zt(e, t) {
1761
1772
  return {
1762
1773
  x0: 0 + (t ? t.left : 0),
1763
1774
  y0: 0 + (t ? t.top : 0),
@@ -1765,19 +1776,19 @@ function Zt(e, t) {
1765
1776
  y1: e.height - (t ? t.bottom : 0)
1766
1777
  };
1767
1778
  }
1768
- function kr(e) {
1769
- const t = L(Zt(e));
1779
+ function Ir(e) {
1780
+ const t = L(zt(e));
1770
1781
  function r(n) {
1771
- t.value = Zt(e, n);
1782
+ t.value = zt(e, n);
1772
1783
  }
1773
1784
  return { extents: t, updateExtents: r };
1774
1785
  }
1775
- var ce = /* @__PURE__ */ ((e) => (e.GraphProblem = "There was an issue generating your alluvial graph.", e))(ce || {});
1776
- const wr = "[lume] ";
1777
- function Sr(e, t, r = !0) {
1778
- r && re() || console.error(wr + "Error: " + e, t);
1786
+ var pe = /* @__PURE__ */ ((e) => (e.GraphProblem = "There was an issue generating your alluvial graph.", e))(pe || {});
1787
+ const Sr = "[lume] ";
1788
+ function Dr(e, t, r = !0) {
1789
+ r && ne() || console.error(Sr + "Error: " + e, t);
1779
1790
  }
1780
- const Xt = 8, Cr = 8, Ir = 200;
1791
+ const Wt = 8, Rr = 8, Pr = 200;
1781
1792
  function U(e) {
1782
1793
  var t;
1783
1794
  return typeof e == "string" || typeof e == "number" ? e : (t = e.id) != null ? t : e.label;
@@ -1785,12 +1796,12 @@ function U(e) {
1785
1796
  function st(e) {
1786
1797
  return e.source.id + ":" + e.target.id;
1787
1798
  }
1788
- function de(e) {
1799
+ function fe(e) {
1789
1800
  return Boolean(
1790
1801
  e.sourceLinks && e.targetLinks
1791
1802
  );
1792
1803
  }
1793
- function Rr(e, t) {
1804
+ function Er(e, t) {
1794
1805
  if (!t)
1795
1806
  return;
1796
1807
  const r = e.nodes.filter((s) => s.targetLinks.length === 0).map((s) => `${s.id}`), n = e.nodes.filter((s) => s.sourceLinks.length === 0).map((s) => `${s.id}`), a = t.filter((s) => r.includes(s.dataset.id)).reduce(
@@ -1807,44 +1818,44 @@ function Rr(e, t) {
1807
1818
  bottom: 0
1808
1819
  };
1809
1820
  }
1810
- function Pr(e) {
1821
+ function Cr(e) {
1811
1822
  return e.map((t) => ({
1812
1823
  x: t.x0,
1813
1824
  y: t.y0,
1814
1825
  width: t.x1 - t.x0,
1815
1826
  height: t.y1 - t.y0,
1816
1827
  textTransform: {
1817
- x: t.depth > 0 ? t.x1 + Xt : t.x0 - Xt,
1828
+ x: t.depth > 0 ? t.x1 + Wt : t.x0 - Wt,
1818
1829
  y: (t.y1 + t.y0) / 2
1819
1830
  },
1820
1831
  node: t
1821
1832
  }));
1822
1833
  }
1823
- function Dr(e) {
1824
- const t = Oe();
1834
+ function Nr(e) {
1835
+ const t = xe();
1825
1836
  return e.map((r) => {
1826
1837
  var n;
1827
1838
  return {
1828
1839
  id: st(r),
1829
- color: r.color || ((n = r.source) == null ? void 0 : n.color) || lt,
1840
+ color: r.color || ((n = r.source) == null ? void 0 : n.color) || dt,
1830
1841
  d: t(r),
1831
1842
  strokeWidth: Math.max(1, r.width),
1832
1843
  link: r
1833
1844
  };
1834
1845
  });
1835
1846
  }
1836
- function Ut(e, t, r) {
1837
- const n = Date.now(), a = en(t, r), o = () => {
1838
- let i = (Date.now() - n) / Ir;
1839
- i > 1 && (i = 1), q.set(e.node, "transitionValue", a(i)), i < 1 && requestAnimationFrame(o);
1847
+ function Zt(e, t, r) {
1848
+ const n = Date.now(), a = Je(t, r), o = () => {
1849
+ let i = (Date.now() - n) / Pr;
1850
+ i > 1 && (i = 1), Y.set(e.node, "transitionValue", a(i)), i < 1 && requestAnimationFrame(o);
1840
1851
  };
1841
1852
  requestAnimationFrame(o);
1842
1853
  }
1843
- const Er = {
1854
+ const Br = {
1844
1855
  nodes: [],
1845
1856
  links: []
1846
1857
  };
1847
- function Nr(e, t, r) {
1858
+ function Gr(e, t, r) {
1848
1859
  const n = L(null), a = d(() => {
1849
1860
  var i;
1850
1861
  return (i = e.value) == null ? void 0 : i[0].values.map(({ label: l, color: u, value: c }) => ({
@@ -1857,19 +1868,19 @@ function Nr(e, t, r) {
1857
1868
  return (i = e.value) == null ? void 0 : i[0].values.map(
1858
1869
  (l) => {
1859
1870
  var u;
1860
- return (u = l.targets) == null ? void 0 : u.map(({ node: c, value: f, color: _ }) => {
1861
- var m;
1871
+ return (u = l.targets) == null ? void 0 : u.map(({ node: c, value: p, color: v }) => {
1872
+ var g;
1862
1873
  return {
1863
- color: _,
1864
- source: (m = l.value) != null ? m : l.label,
1874
+ color: v,
1875
+ source: (g = l.value) != null ? g : l.label,
1865
1876
  target: c,
1866
- value: f
1877
+ value: p
1867
1878
  };
1868
1879
  });
1869
1880
  }
1870
1881
  ).filter(Boolean).flat();
1871
- }), s = d(() => xe().nodeId(U).nodeAlign(t.value.nodeAlign).nodePadding(t.value.nodePadding).nodeSort(t.value.nodeSort).nodeWidth(t.value.nodeWidth));
1872
- return R([s, r], () => {
1882
+ }), s = d(() => Le().nodeId(U).nodeAlign(t.value.nodeAlign).nodePadding(t.value.nodePadding).nodeSort(t.value.nodeSort).nodeWidth(t.value.nodeWidth));
1883
+ return C([s, r], () => {
1873
1884
  try {
1874
1885
  const { x0: i, y0: l, x1: u, y1: c } = r.value;
1875
1886
  n.value = s.value.extent([
@@ -1877,39 +1888,39 @@ function Nr(e, t, r) {
1877
1888
  [u, c]
1878
1889
  ])({ nodes: a.value, links: o.value });
1879
1890
  } catch (i) {
1880
- Sr(ce.GraphProblem, i), n.value = Er;
1891
+ Dr(pe.GraphProblem, i), n.value = Br;
1881
1892
  }
1882
1893
  }), { graph: n };
1883
1894
  }
1884
- function At(e, t) {
1895
+ function Tt(e, t) {
1885
1896
  return t || (t = {}), e.targetLinks && e.targetLinks.forEach(({ source: r, value: n }) => {
1886
- t[r.id] = n, At(r, t);
1897
+ t[r.id] = n, Tt(r, t);
1887
1898
  }), t;
1888
1899
  }
1889
- function Ot(e, t) {
1900
+ function At(e, t) {
1890
1901
  return t || (t = {}), e.sourceLinks && e.sourceLinks.forEach(({ target: r, value: n }) => {
1891
- t[r.id] = n, Ot(r, t);
1902
+ t[r.id] = n, At(r, t);
1892
1903
  }), t;
1893
1904
  }
1894
- function Br(e, t) {
1905
+ function Hr(e, t) {
1895
1906
  return t.links.reduce((r, n) => (n.source.id in e && n.target.id in e && r.push(st(n)), r), []);
1896
1907
  }
1897
- const Hr = (e, t) => {
1908
+ const Vr = (e, t) => {
1898
1909
  let r;
1899
- de(e) ? r = {
1910
+ fe(e) ? r = {
1900
1911
  [e.id]: e.value,
1901
- ...At(e),
1902
- ...Ot(e)
1912
+ ...Tt(e),
1913
+ ...At(e)
1903
1914
  } : r = {
1904
1915
  [e.source.id]: e.source.value,
1905
1916
  [e.target.id]: e.target.value,
1906
- ...At(e.source),
1907
- ...Ot(e.target)
1917
+ ...Tt(e.source),
1918
+ ...At(e.target)
1908
1919
  };
1909
- const n = Br(r, t);
1920
+ const n = Hr(r, t);
1910
1921
  return { nodes: r, links: n };
1911
1922
  }, jr = (e) => {
1912
- if (de(e)) {
1923
+ if (fe(e)) {
1913
1924
  const t = [...e.sourceLinks, ...e.targetLinks];
1914
1925
  return {
1915
1926
  nodes: t.reduce(
@@ -1927,15 +1938,15 @@ const Hr = (e, t) => {
1927
1938
  links: [st(e)]
1928
1939
  };
1929
1940
  };
1930
- function Vr(e, t, r) {
1941
+ function Fr(e, t, r) {
1931
1942
  const n = L(null), a = d(() => n.value ? typeof t.value.highlightedElements == "function" ? t.value.highlightedElements(
1932
1943
  n.value,
1933
1944
  r.value
1934
- ) : t.value.highlightedElements === "closest" ? jr(n.value, r.value) : Hr(n.value, r.value) : { nodes: {}, links: [] });
1935
- return R(a, (o, s) => {
1945
+ ) : t.value.highlightedElements === "closest" ? jr(n.value, r.value) : Vr(n.value, r.value) : { nodes: {}, links: [] });
1946
+ return C(a, (o, s) => {
1936
1947
  if (o.links.length === 0 && Object.keys(o.nodes).length === 0) {
1937
1948
  e.value.forEach((i) => {
1938
- i.node.id in s.nodes && Ut(
1949
+ i.node.id in s.nodes && Zt(
1939
1950
  i,
1940
1951
  s.nodes[i.node.id],
1941
1952
  i.node.value
@@ -1944,7 +1955,7 @@ function Vr(e, t, r) {
1944
1955
  return;
1945
1956
  }
1946
1957
  e.value.forEach((i) => {
1947
- i.node.id in o.nodes && Ut(
1958
+ i.node.id in o.nodes && Zt(
1948
1959
  i,
1949
1960
  i.node.value,
1950
1961
  o.nodes[i.node.id]
@@ -1952,36 +1963,36 @@ function Vr(e, t, r) {
1952
1963
  });
1953
1964
  }), { highlightedElements: a, hoveredElement: n };
1954
1965
  }
1955
- const Fr = /* @__PURE__ */ k({
1966
+ const Mr = /* @__PURE__ */ $({
1956
1967
  __name: "lume-alluvial-group",
1957
1968
  props: {
1958
- ...ft()
1969
+ ...pt()
1959
1970
  },
1960
1971
  setup(e) {
1961
- const t = e, { data: r, options: n } = S(t), a = L([]), o = L([]), s = L(null), { extents: i, updateExtents: l } = kr(t.containerSize), { graph: u } = Nr(r, n, i), { hoveredElement: c, highlightedElements: f } = Vr(
1972
+ const t = e, { data: r, options: n } = I(t), a = L([]), o = L([]), s = L(null), { extents: i, updateExtents: l } = Ir(t.containerSize), { graph: u } = Gr(r, n, i), { hoveredElement: c, highlightedElements: p } = Fr(
1962
1973
  a,
1963
1974
  n,
1964
1975
  u
1965
- ), _ = d(() => It(n.value.valueFormat)), m = d(
1966
- () => Object.keys(f.value.nodes)
1976
+ ), v = d(() => Lt(n.value.valueFormat)), g = d(
1977
+ () => Object.keys(p.value.nodes)
1967
1978
  );
1968
- function p(g) {
1969
- return m.value.length > 0 && !m.value.includes(g.toString());
1979
+ function f(h) {
1980
+ return g.value.length > 0 && !g.value.includes(h.toString());
1970
1981
  }
1971
- function h(g) {
1972
- return f.value.links.length > 0 && !f.value.links.includes(g);
1982
+ function _(h) {
1983
+ return p.value.links.length > 0 && !p.value.links.includes(h);
1973
1984
  }
1974
- return R(u, (g) => {
1975
- a.value = Pr(g.nodes), o.value = Dr(g.links);
1976
- }), R([t.containerSize, s], () => {
1985
+ return C(u, (h) => {
1986
+ a.value = Cr(h.nodes), o.value = Nr(h.links);
1987
+ }), C([t.containerSize, s], () => {
1977
1988
  if (t.containerSize.width && t.containerSize.height) {
1978
- const g = Rr(u.value, s.value);
1979
- l(g);
1989
+ const h = Er(u.value, s.value);
1990
+ l(h);
1980
1991
  }
1981
- }), { __sfc: !0, props: t, data: r, options: n, nodeBlocks: a, linkPaths: o, nodeTextRefs: s, extents: i, updateExtents: l, graph: u, hoveredElement: c, highlightedElements: f, formatValue: _, hoveredNodeIds: m, isNodeFaded: p, isLinkFaded: h, GHOST_STROKE_WIDTH_OFFSET: Cr, DEFAULT_COLOR: lt };
1992
+ }), { __sfc: !0, props: t, data: r, options: n, nodeBlocks: a, linkPaths: o, nodeTextRefs: s, extents: i, updateExtents: l, graph: u, hoveredElement: c, highlightedElements: p, formatValue: v, hoveredNodeIds: g, isNodeFaded: f, isLinkFaded: _, GHOST_STROKE_WIDTH_OFFSET: Rr, DEFAULT_COLOR: dt };
1982
1993
  }
1983
1994
  });
1984
- var Gr = function() {
1995
+ var zr = function() {
1985
1996
  var t = this, r = t._self._c, n = t._self._setupProxy;
1986
1997
  return r("g", { staticClass: "lume-alluvial-group", attrs: { "data-j-alluvial-group": "" } }, [t._l(n.nodeBlocks, function(a, o) {
1987
1998
  return r("g", { key: `node-block_${o}`, staticClass: "lume-alluvial-group__node", class: {
@@ -2014,17 +2025,17 @@ var Gr = function() {
2014
2025
  n.hoveredElement = a.link;
2015
2026
  } } });
2016
2027
  })], 2)], 2);
2017
- }, Mr = [], zr = /* @__PURE__ */ w(
2018
- Fr,
2019
- Gr,
2028
+ }, Wr = [], Zr = /* @__PURE__ */ w(
2020
2029
  Mr,
2030
+ zr,
2031
+ Wr,
2021
2032
  !1,
2022
2033
  null,
2023
2034
  "5377a0bf",
2024
2035
  null,
2025
2036
  null
2026
2037
  );
2027
- const Wr = zr.exports, Zr = {
2038
+ const Xr = Zr.exports, Ur = {
2028
2039
  margins: {
2029
2040
  top: 0,
2030
2041
  right: 0,
@@ -2038,29 +2049,29 @@ const Wr = zr.exports, Zr = {
2038
2049
  highlightedElements: "full",
2039
2050
  nodePadding: 16,
2040
2051
  nodeWidth: 16,
2041
- nodeAlign: Le,
2052
+ nodeAlign: $e,
2042
2053
  valueFormat: (e) => String(e)
2043
- }, Xr = /* @__PURE__ */ k({
2054
+ }, Yr = /* @__PURE__ */ $({
2044
2055
  __name: "lume-alluvial-diagram",
2045
2056
  props: {
2046
- ...W(
2047
- St,
2057
+ ...z(
2058
+ kt,
2048
2059
  !1,
2049
2060
  !1
2050
2061
  )
2051
2062
  },
2052
2063
  setup(e) {
2053
- const t = e, r = z(j()), { options: n } = S(t), { allOptions: a } = N(n, Zr);
2064
+ const t = e, r = M(H()), { options: n } = I(t), { allOptions: a } = B(n, Ur);
2054
2065
  function o(s) {
2055
2066
  return {
2056
2067
  ...s,
2057
2068
  noBaseScales: !0
2058
2069
  };
2059
2070
  }
2060
- return { __sfc: !0, props: t, slots: r, options: n, allOptions: a, getAlluvialDiagramOptions: o, LumeChart: Y, LumeAlluvialGroup: Wr };
2071
+ return { __sfc: !0, props: t, slots: r, options: n, allOptions: a, getAlluvialDiagramOptions: o, LumeChart: K, LumeAlluvialGroup: Xr };
2061
2072
  }
2062
2073
  });
2063
- var Ur = function() {
2074
+ var Kr = function() {
2064
2075
  var t = this, r = t._self._c, n = t._self._setupProxy;
2065
2076
  return r(n.LumeChart, t._b({ attrs: { options: n.getAlluvialDiagramOptions(n.allOptions), "data-j-alluvial-diagram": "" }, scopedSlots: t._u([{ key: "groups", fn: function(a) {
2066
2077
  return [r(n.LumeAlluvialGroup, t._b({}, "lume-alluvial-group", a, !1))];
@@ -2069,101 +2080,101 @@ var Ur = function() {
2069
2080
  return [t._t(o, null, null, s || {})];
2070
2081
  } };
2071
2082
  })], null, !0) }, "lume-chart", n.props, !1));
2072
- }, qr = [], Yr = /* @__PURE__ */ w(
2073
- Xr,
2074
- Ur,
2075
- qr,
2083
+ }, Jr = [], Qr = /* @__PURE__ */ w(
2084
+ Yr,
2085
+ Kr,
2086
+ Jr,
2076
2087
  !1,
2077
2088
  null,
2078
2089
  null,
2079
2090
  null,
2080
2091
  null
2081
2092
  );
2082
- const Ka = Yr.exports;
2083
- var xt = /* @__PURE__ */ ((e) => (e.grouped = "grouped", e.stacked = "stacked", e))(xt || {});
2084
- const Kr = /* @__PURE__ */ k({
2093
+ const qa = Qr.exports;
2094
+ var Ot = /* @__PURE__ */ ((e) => (e.grouped = "grouped", e.stacked = "stacked", e))(Ot || {});
2095
+ const qr = /* @__PURE__ */ $({
2085
2096
  __name: "lume-bar-chart",
2086
2097
  props: {
2087
- ...W(),
2098
+ ...z(),
2088
2099
  type: {
2089
2100
  type: String,
2090
2101
  default: null,
2091
- validator: (e) => e in xt || e == null
2102
+ validator: (e) => e in Ot || e == null
2092
2103
  }
2093
2104
  },
2094
2105
  setup(e) {
2095
- const t = e, r = ht(
2096
- () => import("./5808bcb2.js")
2097
- ), n = ht(
2098
- () => import("./5b8dd513.js")
2099
- ), a = ht(
2100
- () => import("./9fc6a6b2.js")
2106
+ const t = e, r = _t(
2107
+ () => import("./afbaa446.js")
2108
+ ), n = _t(
2109
+ () => import("./6234a134.js")
2110
+ ), a = _t(
2111
+ () => import("./6323ec6e.js")
2101
2112
  ), o = /* @__PURE__ */ new Map([
2102
2113
  ["single", r],
2103
2114
  ["grouped", n],
2104
2115
  ["stacked", a]
2105
- ]), s = z(j());
2116
+ ]), s = M(H());
2106
2117
  function i(u) {
2107
2118
  return {
2108
2119
  ...u,
2109
2120
  startOnZero: !0,
2110
2121
  tooltipOptions: {
2111
2122
  ...(u == null ? void 0 : u.tooltipOptions) || {},
2112
- position: t.orientation === b.HORIZONTAL && "right"
2123
+ position: t.orientation === A.HORIZONTAL && "right"
2113
2124
  }
2114
2125
  };
2115
2126
  }
2116
2127
  const l = d(() => {
2117
2128
  if (!!t.data) {
2118
- if (St(t.data))
2129
+ if (kt(t.data))
2119
2130
  return o.get("single");
2120
2131
  if (!t.type)
2121
2132
  throw new Error("Bar chart needs a type when there's multiple datasets.");
2122
2133
  return o.get(t.type);
2123
2134
  }
2124
2135
  });
2125
- return { __sfc: !0, TYPES: xt, LumeSingleBarChart: r, LumeGroupedBarChart: n, LumeStackedBarChart: a, COMPONENT_MAP: o, props: t, slots: s, getBarChartOptions: i, component: l };
2136
+ return { __sfc: !0, TYPES: Ot, LumeSingleBarChart: r, LumeGroupedBarChart: n, LumeStackedBarChart: a, COMPONENT_MAP: o, props: t, slots: s, getBarChartOptions: i, component: l };
2126
2137
  }
2127
2138
  });
2128
- var Jr = function() {
2139
+ var ta = function() {
2129
2140
  var t = this, r = t._self._c, n = t._self._setupProxy;
2130
2141
  return r(n.component, t._b({ tag: "component", attrs: { options: n.getBarChartOptions(t.options) }, scopedSlots: t._u([t._l(n.slots, function(a, o) {
2131
2142
  return { key: o, fn: function(s) {
2132
2143
  return [t._t(o, null, null, s || {})];
2133
2144
  } };
2134
2145
  })], null, !0) }, "component", { ...n.props, ...t.$attrs }, !1));
2135
- }, Qr = [], ta = /* @__PURE__ */ w(
2136
- Kr,
2137
- Jr,
2138
- Qr,
2146
+ }, ea = [], na = /* @__PURE__ */ w(
2147
+ qr,
2148
+ ta,
2149
+ ea,
2139
2150
  !1,
2140
2151
  null,
2141
2152
  null,
2142
2153
  null,
2143
2154
  null
2144
2155
  );
2145
- const Ja = ta.exports;
2146
- function ea(e) {
2147
- return Object.values(We).includes(e) || e == null;
2156
+ const to = na.exports;
2157
+ function ra(e) {
2158
+ return Object.values(rn).includes(e) || e == null;
2148
2159
  }
2149
- function na(e) {
2150
- return Object.values(b).includes(e);
2160
+ function aa(e) {
2161
+ return Object.values(A).includes(e);
2151
2162
  }
2152
- const ra = (e = !1) => ({
2163
+ const oa = (e = !1) => ({
2153
2164
  type: {
2154
2165
  type: String,
2155
2166
  default: null,
2156
- validator: ea
2167
+ validator: ra
2157
2168
  },
2158
2169
  ...e ? {
2159
2170
  orientation: {
2160
2171
  type: String,
2161
- default: b.VERTICAL,
2162
- validator: na
2172
+ default: A.VERTICAL,
2173
+ validator: aa
2163
2174
  }
2164
2175
  } : {}
2165
2176
  });
2166
- function pe(e) {
2177
+ function ve(e) {
2167
2178
  const t = d(() => e.value.map((n) => ({
2168
2179
  ...n,
2169
2180
  values: n.values.map((a) => ({
@@ -2178,12 +2189,12 @@ function pe(e) {
2178
2189
  });
2179
2190
  return { multiBarData: t, groupedData: r };
2180
2191
  }
2181
- function aa(e, t) {
2192
+ function sa(e, t) {
2182
2193
  return e.value.length === 1 ? "single" : t.value;
2183
2194
  }
2184
- function oa(e, t, r, n) {
2195
+ function ia(e, t, r, n) {
2185
2196
  const a = d(
2186
- () => n.value === b.HORIZONTAL
2197
+ () => n.value === A.HORIZONTAL
2187
2198
  );
2188
2199
  function o(l) {
2189
2200
  Math.min(...l.domain()) > 0 && console.error("Bar linear scale domain cannot start above 0!");
@@ -2205,76 +2216,76 @@ function oa(e, t, r, n) {
2205
2216
  });
2206
2217
  return { barXScale: s, barYScale: i };
2207
2218
  }
2208
- function sa(e, t, r, n, a, o) {
2219
+ function ua(e, t, r, n, a, o) {
2209
2220
  const s = d(
2210
- () => n.value === b.HORIZONTAL
2221
+ () => n.value === A.HORIZONTAL
2211
2222
  );
2212
- function i(f, _) {
2213
- let m, p;
2214
- return s.value ? (m = f >= 0 ? t.value(0) : t.value(f), p = r.value(r.value.domain()[_])) : (m = t.value(t.value.domain()[_]), p = f < 0 ? r.value(0) : r.value(f)), { x: m, y: p };
2223
+ function i(p, v) {
2224
+ let g, f;
2225
+ return s.value ? (g = p >= 0 ? t.value(0) : t.value(p), f = r.value(r.value.domain()[v])) : (g = t.value(t.value.domain()[v]), f = p < 0 ? r.value(0) : r.value(p)), { x: g, y: f };
2215
2226
  }
2216
- function l(f) {
2217
- return s.value ? f < 0 ? t.value(0) - t.value(f) : t.value(f) - t.value(0) : t.value.bandwidth();
2227
+ function l(p) {
2228
+ return s.value ? p < 0 ? t.value(0) - t.value(p) : t.value(p) - t.value(0) : t.value.bandwidth();
2218
2229
  }
2219
- function u(f) {
2220
- return s.value ? r.value.bandwidth() : f < 0 ? r.value(f) - r.value(0) : r.value(0) - r.value(f);
2230
+ function u(p) {
2231
+ return s.value ? r.value.bandwidth() : p < 0 ? r.value(p) - r.value(0) : r.value(0) - r.value(p);
2221
2232
  }
2222
- function c(f, _, m) {
2223
- var $;
2224
- const { value: p, color: h } = f, g = ($ = h != null ? h : e.value[_].color) != null ? $ : lt, { x: v, y } = i(p, m), O = l(p), T = u(p);
2233
+ function c(p, v, g) {
2234
+ var x;
2235
+ const { value: f, color: _ } = p, h = (x = _ != null ? _ : e.value[v].color) != null ? x : dt, { x: y, y: b } = i(f, g), m = l(f), T = u(f);
2225
2236
  return {
2226
- classList: [`lume-fill--${g}`, ...o],
2227
- x: v,
2228
- y,
2229
- width: O,
2237
+ classList: [`lume-fill--${h}`, ...o],
2238
+ x: y,
2239
+ y: b,
2240
+ width: m,
2230
2241
  height: T,
2231
- isFaded: a.value !== -1 && a.value !== m,
2232
- isNegative: p < 0
2242
+ isFaded: a.value !== -1 && a.value !== g,
2243
+ isNegative: f < 0
2233
2244
  };
2234
2245
  }
2235
2246
  return { barAttributeGenerator: c };
2236
2247
  }
2237
- function ia(e, t, r, n, a, o) {
2248
+ function la(e, t, r, n, a, o) {
2238
2249
  const s = d(
2239
- () => n.value === b.HORIZONTAL
2240
- ), i = d(() => J().domain(e.value.map((p, h) => h)).range([0, t.value.bandwidth()]).padding(0)), l = d(() => J().domain(e.value.map((p, h) => h)).range([0, r.value.bandwidth()]).padding(0));
2241
- function u(p, h, g) {
2250
+ () => n.value === A.HORIZONTAL
2251
+ ), i = d(() => Q().domain(e.value.map((f, _) => _)).range([0, t.value.bandwidth()]).padding(0)), l = d(() => Q().domain(e.value.map((f, _) => _)).range([0, r.value.bandwidth()]).padding(0));
2252
+ function u(f, _, h) {
2242
2253
  if (s.value)
2243
- return p >= 0 ? t.value(0) : t.value(p);
2244
- const v = t.value.domain();
2245
- return t.value(v[h]) + i.value(g);
2254
+ return f >= 0 ? t.value(0) : t.value(f);
2255
+ const y = t.value.domain();
2256
+ return t.value(y[_]) + i.value(h);
2246
2257
  }
2247
- function c(p, h, g) {
2258
+ function c(f, _, h) {
2248
2259
  if (s.value) {
2249
- const v = r.value.domain();
2250
- return r.value(v[h]) + l.value(g);
2260
+ const y = r.value.domain();
2261
+ return r.value(y[_]) + l.value(h);
2251
2262
  }
2252
- return p < 0 ? r.value(0) : r.value(p);
2263
+ return f < 0 ? r.value(0) : r.value(f);
2253
2264
  }
2254
- function f(p) {
2255
- return s.value ? p < 0 ? t.value(0) - t.value(p) : t.value(p) - t.value(0) : i.value.bandwidth();
2265
+ function p(f) {
2266
+ return s.value ? f < 0 ? t.value(0) - t.value(f) : t.value(f) - t.value(0) : i.value.bandwidth();
2256
2267
  }
2257
- function _(p) {
2258
- return s.value ? l.value.bandwidth() : p < 0 ? r.value(p) - r.value(0) : r.value(0) - r.value(p);
2268
+ function v(f) {
2269
+ return s.value ? l.value.bandwidth() : f < 0 ? r.value(f) - r.value(0) : r.value(0) - r.value(f);
2259
2270
  }
2260
- function m(p, h, g) {
2261
- var B;
2262
- const { value: v, color: y } = p, O = (B = y != null ? y : e.value[h].color) != null ? B : Object.values(E)[h], T = u(v, g, h), $ = c(v, g, h), P = f(v), D = _(v);
2271
+ function g(f, _, h) {
2272
+ var P;
2273
+ const { value: y, color: b } = f, m = (P = b != null ? b : e.value[_].color) != null ? P : Object.values(N)[_], T = u(y, h, _), x = c(y, h, _), S = p(y), D = v(y);
2263
2274
  return {
2264
- classList: [`lume-fill--${O}`, ...o],
2275
+ classList: [`lume-fill--${m}`, ...o],
2265
2276
  x: T,
2266
- y: $,
2267
- width: P,
2277
+ y: x,
2278
+ width: S,
2268
2279
  height: D,
2269
- isFaded: a.value !== -1 && a.value !== g,
2270
- isNegative: v < 0
2280
+ isFaded: a.value !== -1 && a.value !== h,
2281
+ isNegative: y < 0
2271
2282
  };
2272
2283
  }
2273
- return { barAttributeGenerator: m };
2284
+ return { barAttributeGenerator: g };
2274
2285
  }
2275
- function ua(e, t) {
2286
+ function ca(e, t) {
2276
2287
  const r = d(
2277
- () => t.value === b.HORIZONTAL
2288
+ () => t.value === A.HORIZONTAL
2278
2289
  ), n = d(() => {
2279
2290
  const i = e.value.map(
2280
2291
  (l) => l.filter((u) => u.value < 0).reduce((u, c) => u + c.value, 0)
@@ -2290,9 +2301,9 @@ function ua(e, t) {
2290
2301
  return Math.max(...i);
2291
2302
  });
2292
2303
  function o(i, l, u) {
2293
- return r.value ? Q().domain([n.value, a.value]).range([0, u.width]) : Object.assign(
2304
+ return r.value ? q().domain([n.value, a.value]).range([0, u.width]) : Object.assign(
2294
2305
  ot(
2295
- J().domain(l.map((c, f) => f)).range([0, u.width])
2306
+ Q().domain(l.map((c, p) => p)).range([0, u.width])
2296
2307
  ),
2297
2308
  { labels: l }
2298
2309
  );
@@ -2300,71 +2311,71 @@ function ua(e, t) {
2300
2311
  function s(i, l, u) {
2301
2312
  return r.value ? Object.assign(
2302
2313
  ot(
2303
- J().domain(l.map((c, f) => f)).range([0, u.height])
2314
+ Q().domain(l.map((c, p) => p)).range([0, u.height])
2304
2315
  ),
2305
2316
  { labels: l }
2306
- ) : Q().domain([a.value, n.value]).range([0, u.height]);
2317
+ ) : q().domain([a.value, n.value]).range([0, u.height]);
2307
2318
  }
2308
2319
  return { stackedXScaleGenerator: o, stackedYScaleGenerator: s };
2309
2320
  }
2310
- function la(e, t, r, n, a, o) {
2321
+ function da(e, t, r, n, a, o) {
2311
2322
  const s = d(
2312
- () => n.value === b.HORIZONTAL
2323
+ () => n.value === A.HORIZONTAL
2313
2324
  ), i = d(
2314
2325
  () => s.value ? r.value.domain() : t.value.domain()
2315
2326
  ), l = d(
2316
- () => e.value.map((v) => v.values.map((y) => y == null ? void 0 : y.value))
2327
+ () => e.value.map((y) => y.values.map((b) => b == null ? void 0 : b.value))
2317
2328
  );
2318
- function u(v, y, O) {
2319
- let T, $;
2320
- return s.value ? (T = t.value(v >= 0 ? 0 + O : v + O), $ = r.value(i.value[y])) : (T = t.value(i.value[y]), $ = r.value(v >= 0 ? v + O : 0 + O)), { x: T, y: $ };
2329
+ function u(y, b, m) {
2330
+ let T, x;
2331
+ return s.value ? (T = t.value(y >= 0 ? 0 + m : y + m), x = r.value(i.value[b])) : (T = t.value(i.value[b]), x = r.value(y >= 0 ? y + m : 0 + m)), { x: T, y: x };
2321
2332
  }
2322
- function c(v) {
2323
- return s.value ? t.value(v) - t.value(0) : t.value.bandwidth();
2333
+ function c(y) {
2334
+ return s.value ? t.value(y) - t.value(0) : t.value.bandwidth();
2324
2335
  }
2325
- function f(v) {
2326
- return s.value ? t.value(0) - t.value(v) : t.value.bandwidth();
2336
+ function p(y) {
2337
+ return s.value ? t.value(0) - t.value(y) : t.value.bandwidth();
2327
2338
  }
2328
- function _(v) {
2329
- return s.value ? r.value.bandwidth() : r.value(0) - r.value(v);
2339
+ function v(y) {
2340
+ return s.value ? r.value.bandwidth() : r.value(0) - r.value(y);
2330
2341
  }
2331
- function m(v) {
2332
- return s.value ? r.value.bandwidth() : r.value(v) - r.value(0);
2342
+ function g(y) {
2343
+ return s.value ? r.value.bandwidth() : r.value(y) - r.value(0);
2333
2344
  }
2334
- function p(v, y) {
2335
- return v ? l.value.reduce((O, T, $) => ($ < v && T[y] >= 0 && (O += T[y]), O), 0) : 0;
2345
+ function f(y, b) {
2346
+ return y ? l.value.reduce((m, T, x) => (x < y && T[b] >= 0 && (m += T[b]), m), 0) : 0;
2336
2347
  }
2337
- function h(v, y) {
2338
- return v ? l.value.reduce((O, T, $) => ($ < v && T[y] < 0 && (O += T[y]), O), 0) : 0;
2348
+ function _(y, b) {
2349
+ return y ? l.value.reduce((m, T, x) => (x < y && T[b] < 0 && (m += T[b]), m), 0) : 0;
2339
2350
  }
2340
- function g(v, y, O) {
2341
- var x;
2342
- const { value: T, color: $ } = v, P = T >= 0 ? c(T) : f(T), D = T >= 0 ? _(T) : m(T), B = T >= 0 ? p(y, O) : h(y, O), { x: Z, y: V } = u(T, O, B);
2351
+ function h(y, b, m) {
2352
+ var k;
2353
+ const { value: T, color: x } = y, S = T >= 0 ? c(T) : p(T), D = T >= 0 ? v(T) : g(T), P = T >= 0 ? f(b, m) : _(b, m), { x: W, y: Z } = u(T, m, P);
2343
2354
  return {
2344
- classList: [`lume-fill--${(x = $ != null ? $ : e.value[y].color) != null ? x : Object.values(E)[y]}`, ...o],
2345
- width: P,
2355
+ classList: [`lume-fill--${(k = x != null ? x : e.value[b].color) != null ? k : Object.values(N)[b]}`, ...o],
2356
+ width: S,
2346
2357
  height: D,
2347
- x: Z,
2348
- y: V,
2349
- isFaded: a.value !== -1 && a.value !== O,
2358
+ x: W,
2359
+ y: Z,
2360
+ isFaded: a.value !== -1 && a.value !== m,
2350
2361
  isNegative: T < 0
2351
2362
  };
2352
2363
  }
2353
- return { barAttributeGenerator: g };
2364
+ return { barAttributeGenerator: h };
2354
2365
  }
2355
- const qt = {
2356
- single: sa,
2357
- grouped: ia,
2358
- stacked: la
2359
- }, ca = /* @__PURE__ */ k({
2366
+ const Xt = {
2367
+ single: ua,
2368
+ grouped: la,
2369
+ stacked: da
2370
+ }, pa = /* @__PURE__ */ $({
2360
2371
  __name: "lume-bar-group",
2361
2372
  props: {
2362
- ...ft(),
2373
+ ...pt(),
2363
2374
  classList: {
2364
2375
  type: [String, Array],
2365
2376
  default: () => []
2366
2377
  },
2367
- ...ra(!0),
2378
+ ...oa(!0),
2368
2379
  transition: {
2369
2380
  type: Boolean,
2370
2381
  default: !0
@@ -2381,71 +2392,71 @@ const qt = {
2381
2392
  xScale: l,
2382
2393
  yScale: u,
2383
2394
  classList: c
2384
- } = S(t), { groupedData: f } = pe(r), { barXScale: _, barYScale: m } = oa(
2395
+ } = I(t), { groupedData: p } = ve(r), { barXScale: v, barYScale: g } = ia(
2385
2396
  l,
2386
2397
  u,
2387
2398
  a,
2388
2399
  o
2389
- ), p = d(() => typeof c.value == "string" ? [c.value] : c.value), h = d(() => {
2390
- const v = aa(r, i), { barAttributeGenerator: y } = qt[v](
2400
+ ), f = d(() => typeof c.value == "string" ? [c.value] : c.value), _ = d(() => {
2401
+ const y = sa(r, i), { barAttributeGenerator: b } = Xt[y](
2391
2402
  r,
2392
- _,
2393
- m,
2403
+ v,
2404
+ g,
2394
2405
  o,
2395
2406
  n,
2396
- p.value
2407
+ f.value
2397
2408
  );
2398
- return y;
2399
- }), g = d(() => {
2409
+ return b;
2410
+ }), h = d(() => {
2400
2411
  if (!!s.value)
2401
- return o.value === b.HORIZONTAL ? "width" : "height";
2412
+ return o.value === A.HORIZONTAL ? "width" : "height";
2402
2413
  });
2403
- return { __sfc: !0, MIXIN_MAP: qt, props: t, data: r, hoveredIndex: n, options: a, orientation: o, transition: s, type: i, xScale: l, yScale: u, classList: c, groupedData: f, barXScale: _, barYScale: m, computedClasses: p, getBarAttributes: h, computedTransition: g, LumeBar: Rt };
2414
+ return { __sfc: !0, MIXIN_MAP: Xt, props: t, data: r, hoveredIndex: n, options: a, orientation: o, transition: s, type: i, xScale: l, yScale: u, classList: c, groupedData: p, barXScale: v, barYScale: g, computedClasses: f, getBarAttributes: _, computedTransition: h, LumeBar: It };
2404
2415
  }
2405
2416
  });
2406
- var da = function() {
2417
+ var fa = function() {
2407
2418
  var t = this, r = t._self._c, n = t._self._setupProxy;
2408
2419
  return r("g", { staticClass: "lume-bar-group", attrs: { "data-j-bars-group": "" } }, t._l(n.groupedData, function(a, o) {
2409
2420
  return r("g", { key: o }, t._l(a, function(s, i) {
2410
2421
  return r(n.LumeBar, t._b({ key: `bar-${i}`, attrs: { transition: n.computedTransition, "data-j-lume-bar": "" } }, "lume-bar", n.getBarAttributes(s, i, o, a), !1));
2411
2422
  }), 1);
2412
2423
  }), 0);
2413
- }, pa = [], fa = /* @__PURE__ */ w(
2414
- ca,
2415
- da,
2424
+ }, va = [], _a = /* @__PURE__ */ w(
2416
2425
  pa,
2426
+ fa,
2427
+ va,
2417
2428
  !1,
2418
2429
  null,
2419
2430
  null,
2420
2431
  null,
2421
2432
  null
2422
2433
  );
2423
- const Pt = fa.exports, va = {
2424
- [b.VERTICAL]: {
2434
+ const Dt = _a.exports, ha = {
2435
+ [A.VERTICAL]: {
2425
2436
  withTooltip: !0,
2426
2437
  xAxisOptions: {},
2427
2438
  yAxisOptions: { gridLines: !0 },
2428
- margins: G.VERTICAL
2439
+ margins: j.VERTICAL
2429
2440
  },
2430
- [b.HORIZONTAL]: {
2441
+ [A.HORIZONTAL]: {
2431
2442
  withTooltip: !0,
2432
2443
  xAxisOptions: { gridLines: !0 },
2433
2444
  yAxisOptions: { gridLines: !1 },
2434
- margins: G.HORIZONTAL
2445
+ margins: j.HORIZONTAL
2435
2446
  }
2436
- }, _a = /* @__PURE__ */ k({
2447
+ }, ma = /* @__PURE__ */ $({
2437
2448
  __name: "lume-single-bar-chart",
2438
2449
  props: {
2439
- ...W(St)
2450
+ ...z(kt)
2440
2451
  },
2441
2452
  setup(e) {
2442
- const t = e, r = z(j()), { orientation: n, options: a } = S(t), o = d(
2443
- () => va[n.value || b.VERTICAL]
2444
- ), { allOptions: s } = N(a, o);
2445
- return { __sfc: !0, props: t, slots: r, orientation: n, options: a, baseOptions: o, allOptions: s, LumeChart: Y, LumeBarGroup: Pt };
2453
+ const t = e, r = M(H()), { orientation: n, options: a } = I(t), o = d(
2454
+ () => ha[n.value || A.VERTICAL]
2455
+ ), { allOptions: s } = B(a, o);
2456
+ return { __sfc: !0, props: t, slots: r, orientation: n, options: a, baseOptions: o, allOptions: s, LumeChart: K, LumeBarGroup: Dt };
2446
2457
  }
2447
2458
  });
2448
- var ha = function() {
2459
+ var ga = function() {
2449
2460
  var t = this, r = t._self._c, n = t._self._setupProxy;
2450
2461
  return r(n.LumeChart, t._b({ attrs: { "chart-type": "single-bar", options: n.allOptions, "data-j-single-bar-chart": "" }, scopedSlots: t._u([{ key: "groups", fn: function(a) {
2451
2462
  return [r(n.LumeBarGroup, t._b({ attrs: { orientation: n.orientation } }, "lume-bar-group", a, !1))];
@@ -2454,43 +2465,43 @@ var ha = function() {
2454
2465
  return [t._t(o, null, null, s || {})];
2455
2466
  } };
2456
2467
  })], null, !0) }, "lume-chart", n.props, !1));
2457
- }, ma = [], ga = /* @__PURE__ */ w(
2458
- _a,
2459
- ha,
2468
+ }, ya = [], ba = /* @__PURE__ */ w(
2460
2469
  ma,
2470
+ ga,
2471
+ ya,
2461
2472
  !1,
2462
2473
  null,
2463
2474
  null,
2464
2475
  null,
2465
2476
  null
2466
2477
  );
2467
- const Qa = ga.exports, ya = {
2468
- [b.VERTICAL]: {
2478
+ const eo = ba.exports, Ta = {
2479
+ [A.VERTICAL]: {
2469
2480
  withTooltip: !0,
2470
2481
  xAxisOptions: {},
2471
2482
  yAxisOptions: { gridLines: !0 },
2472
- margins: G.VERTICAL
2483
+ margins: j.VERTICAL
2473
2484
  },
2474
- [b.HORIZONTAL]: {
2485
+ [A.HORIZONTAL]: {
2475
2486
  withTooltip: !0,
2476
2487
  xAxisOptions: { gridLines: !0 },
2477
2488
  yAxisOptions: { gridLines: !1 },
2478
- margins: G.HORIZONTAL,
2489
+ margins: j.HORIZONTAL,
2479
2490
  tooltipOptions: { position: "right" }
2480
2491
  }
2481
- }, ba = /* @__PURE__ */ k({
2492
+ }, Aa = /* @__PURE__ */ $({
2482
2493
  __name: "lume-grouped-bar-chart",
2483
2494
  props: {
2484
- ...W()
2495
+ ...z()
2485
2496
  },
2486
2497
  setup(e) {
2487
- const t = e, r = z(j()), { orientation: n, options: a } = S(t), o = d(
2488
- () => ya[n.value || b.VERTICAL]
2489
- ), { allOptions: s } = N(a, o);
2490
- return { __sfc: !0, props: t, slots: r, orientation: n, options: a, baseOptions: o, allOptions: s, LumeChart: Y, LumeBarGroup: Pt };
2498
+ const t = e, r = M(H()), { orientation: n, options: a } = I(t), o = d(
2499
+ () => Ta[n.value || A.VERTICAL]
2500
+ ), { allOptions: s } = B(a, o);
2501
+ return { __sfc: !0, props: t, slots: r, orientation: n, options: a, baseOptions: o, allOptions: s, LumeChart: K, LumeBarGroup: Dt };
2491
2502
  }
2492
2503
  });
2493
- var Ta = function() {
2504
+ var Oa = function() {
2494
2505
  var t = this, r = t._self._c, n = t._self._setupProxy;
2495
2506
  return r(n.LumeChart, t._b({ attrs: { "chart-type": "grouped-bar", options: n.allOptions, "data-j-grouped-bar-chart": "" }, scopedSlots: t._u([{ key: "groups", fn: function(a) {
2496
2507
  return [r(n.LumeBarGroup, t._b({ attrs: { type: "grouped" } }, "lume-bar-group", a, !1))];
@@ -2499,46 +2510,46 @@ var Ta = function() {
2499
2510
  return [t._t(o, null, null, s || {})];
2500
2511
  } };
2501
2512
  })], null, !0) }, "lume-chart", n.props, !1));
2502
- }, Aa = [], Oa = /* @__PURE__ */ w(
2503
- ba,
2504
- Ta,
2513
+ }, ka = [], xa = /* @__PURE__ */ w(
2505
2514
  Aa,
2515
+ Oa,
2516
+ ka,
2506
2517
  !1,
2507
2518
  null,
2508
2519
  null,
2509
2520
  null,
2510
2521
  null
2511
2522
  );
2512
- const to = Oa.exports, xa = {
2513
- [b.VERTICAL]: {
2523
+ const no = xa.exports, La = {
2524
+ [A.VERTICAL]: {
2514
2525
  withTooltip: !0,
2515
2526
  xAxisOptions: {},
2516
2527
  yAxisOptions: { gridLines: !0 },
2517
- margins: G.VERTICAL
2528
+ margins: j.VERTICAL
2518
2529
  },
2519
- [b.HORIZONTAL]: {
2530
+ [A.HORIZONTAL]: {
2520
2531
  withTooltip: !0,
2521
2532
  xAxisOptions: { gridLines: !0 },
2522
2533
  yAxisOptions: { gridLines: !1 },
2523
- margins: G.HORIZONTAL,
2534
+ margins: j.HORIZONTAL,
2524
2535
  tooltipOptions: { position: "right" }
2525
2536
  }
2526
- }, La = /* @__PURE__ */ k({
2537
+ }, $a = /* @__PURE__ */ $({
2527
2538
  __name: "lume-stacked-bar-chart",
2528
2539
  props: {
2529
- ...W()
2540
+ ...z()
2530
2541
  },
2531
2542
  setup(e) {
2532
- const t = e, r = z(j()), { data: n, orientation: a, options: o } = S(t), s = d(
2533
- () => xa[a.value || b.VERTICAL]
2534
- ), { allOptions: i } = N(o, s), { internalData: l } = ct(n), { groupedData: u } = pe(l), { stackedXScaleGenerator: c, stackedYScaleGenerator: f } = ua(
2543
+ const t = e, r = M(H()), { data: n, orientation: a, options: o } = I(t), s = d(
2544
+ () => La[a.value || A.VERTICAL]
2545
+ ), { allOptions: i } = B(o, s), { internalData: l } = St(n), { groupedData: u } = ve(l), { stackedXScaleGenerator: c, stackedYScaleGenerator: p } = ca(
2535
2546
  u,
2536
2547
  a
2537
2548
  );
2538
- return { __sfc: !0, props: t, slots: r, data: n, orientation: a, options: o, baseOptions: s, allOptions: i, internalData: l, groupedData: u, stackedXScaleGenerator: c, stackedYScaleGenerator: f, LumeChart: Y, LumeBarGroup: Pt };
2549
+ return { __sfc: !0, props: t, slots: r, data: n, orientation: a, options: o, baseOptions: s, allOptions: i, internalData: l, groupedData: u, stackedXScaleGenerator: c, stackedYScaleGenerator: p, LumeChart: K, LumeBarGroup: Dt };
2539
2550
  }
2540
2551
  });
2541
- var $a = function() {
2552
+ var wa = function() {
2542
2553
  var t = this, r = t._self._c, n = t._self._setupProxy;
2543
2554
  return r(n.LumeChart, t._b({ attrs: { "chart-type": "stacked-bar", options: n.allOptions, "x-scale": n.stackedXScaleGenerator, "y-scale": n.stackedYScaleGenerator, "data-j-stacked-bar-chart": "" }, scopedSlots: t._u([{ key: "groups", fn: function(a) {
2544
2555
  return [r(n.LumeBarGroup, t._b({ attrs: { type: "stacked" } }, "lume-bar-group", a, !1))];
@@ -2547,25 +2558,25 @@ var $a = function() {
2547
2558
  return [t._t(o, null, null, s || {})];
2548
2559
  } };
2549
2560
  })], null, !0) }, "lume-chart", n.props, !1));
2550
- }, ka = [], wa = /* @__PURE__ */ w(
2551
- La,
2561
+ }, Ia = [], Sa = /* @__PURE__ */ w(
2552
2562
  $a,
2553
- ka,
2563
+ wa,
2564
+ Ia,
2554
2565
  !1,
2555
2566
  null,
2556
2567
  null,
2557
2568
  null,
2558
2569
  null
2559
2570
  );
2560
- const eo = wa.exports;
2561
- function fe(e) {
2571
+ const ro = Sa.exports;
2572
+ function _e(e) {
2562
2573
  function t(o) {
2563
2574
  let s = null;
2564
2575
  return o == null ? void 0 : o.reduce((i, l, u) => (l == null || l.value == null ? (s ? s.push(u) : s = [u], u === (o == null ? void 0 : o.length) - 1 && i.push(s)) : s && (i.push(s), s = null), i), []);
2565
2576
  }
2566
2577
  function r(o, s, i, l) {
2567
- const f = Math.abs(o - s) / (i + 1) * (l + 1);
2568
- return o > s ? o - f : o + f;
2578
+ const p = Math.abs(o - s) / (i + 1) * (l + 1);
2579
+ return o > s ? o - p : o + p;
2569
2580
  }
2570
2581
  function n(o) {
2571
2582
  return function(i) {
@@ -2580,21 +2591,21 @@ function fe(e) {
2580
2591
  ...o,
2581
2592
  isDashed: n(s),
2582
2593
  values: o.values.map((i, l) => {
2583
- var c, f;
2594
+ var c, p;
2584
2595
  const u = s.find(
2585
- (_) => _.includes(l)
2596
+ (v) => v.includes(l)
2586
2597
  );
2587
2598
  if (u) {
2588
- const _ = u[0] - 1, m = u[u.length - 1] + 1;
2589
- let p = (c = o.values[_]) == null ? void 0 : c.value, h = (f = o.values[m]) == null ? void 0 : f.value;
2590
- return p == null && (p = h), h == null && (h = p), {
2599
+ const v = u[0] - 1, g = u[u.length - 1] + 1;
2600
+ let f = (c = o.values[v]) == null ? void 0 : c.value, _ = (p = o.values[g]) == null ? void 0 : p.value;
2601
+ return f == null && (f = _), _ == null && (_ = f), {
2591
2602
  value: r(
2592
- p,
2593
- h,
2603
+ f,
2604
+ _,
2594
2605
  u.length,
2595
2606
  u.indexOf(l)
2596
2607
  ),
2597
- label: ne
2608
+ label: ie
2598
2609
  };
2599
2610
  }
2600
2611
  return i;
@@ -2602,22 +2613,22 @@ function fe(e) {
2602
2613
  };
2603
2614
  })) };
2604
2615
  }
2605
- function Sa(e, t) {
2606
- const r = Ct(e) / 2;
2616
+ function Da(e, t) {
2617
+ const r = xt(e) / 2;
2607
2618
  return (n, a) => e(e.domain()[t + (a - 1)]) + r;
2608
2619
  }
2609
- function Ca(e, t) {
2620
+ function Ra(e, t) {
2610
2621
  return (r, n) => e(t + (n - 1));
2611
2622
  }
2612
- function Ia(e, t, r, n) {
2613
- return we().x(
2614
- M(r) ? Sa(r, e) : Ca(r, e)
2623
+ function Pa(e, t, r, n) {
2624
+ return Se().x(
2625
+ F(r) ? Da(r, e) : Ra(r, e)
2615
2626
  ).y((o) => n(o))(t);
2616
2627
  }
2617
- const Yt = 1, Ra = /* @__PURE__ */ k({
2628
+ const Ut = 1, Ea = /* @__PURE__ */ $({
2618
2629
  __name: "lume-line-group",
2619
2630
  props: {
2620
- ...ft(),
2631
+ ...pt(),
2621
2632
  withPoints: {
2622
2633
  type: Boolean,
2623
2634
  default: !0
@@ -2628,71 +2639,75 @@ const Yt = 1, Ra = /* @__PURE__ */ k({
2628
2639
  }
2629
2640
  },
2630
2641
  setup(e) {
2631
- const t = e, { data: r, options: n, xScale: a, yScale: o } = S(t), s = d(() => {
2632
- if (r.value.every((y) => y.isDashed))
2642
+ const t = e, { data: r, options: n, xScale: a, yScale: o } = I(t), s = Kt(
2643
+ "tooltipAnchorAttributes",
2644
+ null
2645
+ ), { updateTooltipAnchorAttributes: i } = de(
2646
+ s,
2647
+ n,
2648
+ a,
2649
+ o
2650
+ ), l = d(() => {
2651
+ if (r.value.every((T) => T.isDashed))
2633
2652
  return r.value;
2634
- const { computedLineData: v } = fe(r);
2635
- if (n.value.withTooltip !== !1) {
2636
- const { updateTooltipAnchorAttributes: y } = le(a, o);
2637
- y(v.value);
2638
- }
2639
- return v.value;
2640
- }), i = d(() => {
2653
+ const { computedLineData: m } = _e(r);
2654
+ return n.value.withTooltip !== !1 && (s == null ? void 0 : s.value) && i(m.value), m.value;
2655
+ }), u = d(() => {
2641
2656
  if (t.hoveredIndex === -1)
2642
2657
  return;
2643
- const v = Qe(
2644
- s.value,
2658
+ const m = Ye(
2659
+ l.value,
2645
2660
  t.hoveredIndex
2646
2661
  );
2647
2662
  return {
2648
- d: `M ${Tt(a.value, t.hoveredIndex)},${o.value.range()[1]}
2649
- V ${o.value(v)}`
2663
+ d: `M ${bt(a.value, t.hoveredIndex)},${o.value.range()[1]}
2664
+ V ${o.value(m)}`
2650
2665
  };
2651
- }), l = d(
2652
- () => a.value && Yt / (tn(a.value) - 1)
2653
- ), u = d(
2666
+ }), c = d(
2667
+ () => a.value && Ut / (Ke(a.value) - 1)
2668
+ ), p = d(
2654
2669
  () => {
2655
- var v;
2656
- return ((v = n.value) == null ? void 0 : v.lineWidth) * 2 || void 0;
2670
+ var m;
2671
+ return ((m = n.value) == null ? void 0 : m.lineWidth) * 2 || void 0;
2657
2672
  }
2658
- ), c = d(() => Ct(a.value) / 2), f = d(() => a.value.domain());
2659
- function _(v) {
2660
- return s.value[v].values;
2673
+ ), v = d(() => xt(a.value) / 2), g = d(() => a.value.domain());
2674
+ function f(m) {
2675
+ return l.value[m].values;
2661
2676
  }
2662
- function m(v, y) {
2663
- var T, $;
2664
- const O = v === 0 ? [] : [
2665
- (T = _(y)[v - 1]) == null ? void 0 : T.value,
2666
- ($ = _(y)[v]) == null ? void 0 : $.value
2677
+ function _(m, T) {
2678
+ var S, D;
2679
+ const x = m === 0 ? [] : [
2680
+ (S = f(T)[m - 1]) == null ? void 0 : S.value,
2681
+ (D = f(T)[m]) == null ? void 0 : D.value
2667
2682
  ];
2668
- return Ia(
2669
- v,
2670
- O,
2683
+ return Pa(
2684
+ m,
2685
+ x,
2671
2686
  a.value,
2672
2687
  o.value
2673
2688
  ) || "";
2674
2689
  }
2675
- function p(v) {
2690
+ function h(m) {
2676
2691
  return {
2677
- animationDelay: v < 2 ? 0 : (v - 1) * l.value,
2678
- animationDuration: l.value
2692
+ animationDelay: m < 2 ? 0 : (m - 1) * c.value,
2693
+ animationDuration: c.value
2679
2694
  };
2680
2695
  }
2681
- function h(v, y) {
2682
- var T;
2683
- const O = (T = _(y)[v]) == null ? void 0 : T.value;
2696
+ function y(m, T) {
2697
+ var S;
2698
+ const x = (S = f(T)[m]) == null ? void 0 : S.value;
2684
2699
  return {
2685
- x: M(a.value) ? t.xScale(f.value[v]) + c.value : t.xScale(v),
2686
- y: o.value(O)
2700
+ x: F(a.value) ? t.xScale(g.value[m]) + v.value : t.xScale(m),
2701
+ y: o.value(x)
2687
2702
  };
2688
2703
  }
2689
- function g(v) {
2690
- return t.hoveredIndex === v;
2704
+ function b(m) {
2705
+ return t.hoveredIndex === m;
2691
2706
  }
2692
- return { __sfc: !0, LUME_TRANSITION_TIME_FULL: Yt, props: t, data: r, options: n, xScale: a, yScale: o, computedGroupData: s, overlayLineAttributes: i, animationDuration: l, pointRadius: u, xAxisOffset: c, domain: f, getValuesFromDataset: _, getPathDefinition: m, getLineTransitionParams: p, getPointPosition: h, isPointActive: g, LumeLine: ar, LumePoint: lr };
2707
+ return { __sfc: !0, LUME_TRANSITION_TIME_FULL: Ut, props: t, data: r, options: n, xScale: a, yScale: o, tooltipAnchorAttributes: s, updateTooltipAnchorAttributes: i, computedGroupData: l, overlayLineAttributes: u, animationDuration: c, pointRadius: p, xAxisOffset: v, domain: g, getValuesFromDataset: f, getPathDefinition: _, getLineTransitionParams: h, getPointPosition: y, isPointActive: b, LumeLine: Kn, LumePoint: er };
2693
2708
  }
2694
2709
  });
2695
- var Pa = function() {
2710
+ var Ca = function() {
2696
2711
  var t = this, r = t._self._c, n = t._self._setupProxy;
2697
2712
  return r("g", { staticClass: "lume-line-group", attrs: { "data-j-lume-line-group": "" } }, [r("path", t._b({ staticClass: "lume-line-group__overlay-line", attrs: { "data-j-lume-line-group__overlay-line": "" } }, "path", n.overlayLineAttributes, !1)), t._l(n.computedGroupData, function(a, o) {
2698
2713
  return r("g", { key: a.label, staticClass: "lume-line-group__group" }, [r("g", { staticClass: "lume-line-group__lines" }, t._l(a.values, function(s, i) {
@@ -2701,33 +2716,33 @@ var Pa = function() {
2701
2716
  return r(n.LumePoint, t._b({ key: `point-${i}`, attrs: { active: n.isPointActive(i), color: a.color, index: i, radius: n.pointRadius } }, "lume-point", n.getPointPosition(i, o), !1));
2702
2717
  }), 1) : t._e()]);
2703
2718
  })], 2);
2704
- }, Da = [], Ea = /* @__PURE__ */ w(
2705
- Ra,
2706
- Pa,
2707
- Da,
2719
+ }, Na = [], Ba = /* @__PURE__ */ w(
2720
+ Ea,
2721
+ Ca,
2722
+ Na,
2708
2723
  !1,
2709
2724
  null,
2710
- "d5c53b3e",
2725
+ "cacd2403",
2711
2726
  null,
2712
2727
  null
2713
2728
  );
2714
- const ve = Ea.exports, Na = {
2715
- margins: G.VERTICAL,
2729
+ const he = Ba.exports, Ga = {
2730
+ margins: j.VERTICAL,
2716
2731
  startOnZero: !0,
2717
2732
  withTooltip: !0,
2718
2733
  xAxisOptions: {},
2719
2734
  yAxisOptions: { gridLines: !0 }
2720
- }, Ba = /* @__PURE__ */ k({
2735
+ }, Ha = /* @__PURE__ */ $({
2721
2736
  __name: "lume-line-chart",
2722
2737
  props: {
2723
- ...W(null, !1)
2738
+ ...z(null, !1)
2724
2739
  },
2725
2740
  setup(e) {
2726
- const t = e, r = z(j()), { options: n } = S(t), { allOptions: a } = N(n, Na);
2727
- return { __sfc: !0, props: t, slots: r, options: n, allOptions: a, LumeChart: Y, LumeLineGroup: ve };
2741
+ const t = e, r = M(H()), { options: n } = I(t), { allOptions: a } = B(n, Ga);
2742
+ return { __sfc: !0, props: t, slots: r, options: n, allOptions: a, LumeChart: K, LumeLineGroup: he };
2728
2743
  }
2729
2744
  });
2730
- var Ha = function() {
2745
+ var Va = function() {
2731
2746
  var t = this, r = t._self._c, n = t._self._setupProxy;
2732
2747
  return r(n.LumeChart, t._b({ attrs: { "chart-type": "line", options: n.allOptions, "data-j-lume-line-chart": "" }, scopedSlots: t._u([{ key: "groups", fn: function(a) {
2733
2748
  return [r(n.LumeLineGroup, t._b({}, "lume-line-group", a, !1))];
@@ -2736,9 +2751,9 @@ var Ha = function() {
2736
2751
  return [t._t(o, null, null, s || {})];
2737
2752
  } };
2738
2753
  })], null, !0) }, "lume-chart", n.props, !1));
2739
- }, ja = [], Va = /* @__PURE__ */ w(
2740
- Ba,
2754
+ }, ja = [], Fa = /* @__PURE__ */ w(
2741
2755
  Ha,
2756
+ Va,
2742
2757
  ja,
2743
2758
  !1,
2744
2759
  null,
@@ -2746,18 +2761,18 @@ var Ha = function() {
2746
2761
  null,
2747
2762
  null
2748
2763
  );
2749
- const no = Va.exports;
2750
- function Fa(e) {
2764
+ const ao = Fa.exports;
2765
+ function Ma(e) {
2751
2766
  return { areaPathDefinition: d(
2752
2767
  () => function(r, n) {
2753
2768
  if (!r || !n)
2754
2769
  return;
2755
2770
  const a = e.value[0].values;
2756
- return Se().x((o, s) => r(s)).y0(n(Math.min(...n.domain()))).y1((o) => n(o.value))(a);
2771
+ return De().x((o, s) => r(s)).y0(n(Math.min(...n.domain()))).y1((o) => n(o.value))(a);
2757
2772
  }
2758
2773
  ) };
2759
2774
  }
2760
- const Ga = {
2775
+ const za = {
2761
2776
  margins: {
2762
2777
  top: 0,
2763
2778
  right: 0,
@@ -2771,31 +2786,31 @@ const Ga = {
2771
2786
  tooltipOptions: {
2772
2787
  showTitle: !1
2773
2788
  }
2774
- }, Ma = /* @__PURE__ */ k({
2789
+ }, Wa = /* @__PURE__ */ $({
2775
2790
  __name: "lume-sparkline-chart",
2776
2791
  props: {
2777
- ...se(null),
2778
- ...dt()
2792
+ ...le(null),
2793
+ ...lt()
2779
2794
  },
2780
2795
  setup(e, { expose: t }) {
2781
- const r = e, n = z(j()), { data: a, options: o } = S(r), { internalData: s } = ct(a), { allOptions: i } = N(o, Ga), { computedLineData: l } = fe(s), { areaPathDefinition: u } = Fa(l), c = d(() => s.value[0].color), f = d(
2796
+ const r = e, n = M(H()), { data: a, options: o } = I(r), { internalData: s } = St(a), { allOptions: i } = B(o, za), { computedLineData: l } = _e(s), { areaPathDefinition: u } = Ma(l), c = d(() => s.value[0].color), p = d(
2782
2797
  () => a.value[0].areaColor || c.value
2783
2798
  );
2784
- function _(p) {
2799
+ function v(f) {
2785
2800
  return {
2786
- ...p,
2801
+ ...f,
2787
2802
  noMinSize: !0
2788
2803
  };
2789
2804
  }
2790
- function m(p, h, g) {
2791
- return Q().range([0, g.width]).domain([0, p[0].values.length - 1]);
2805
+ function g(f, _, h) {
2806
+ return q().range([0, h.width]).domain([0, f[0].values.length - 1]);
2792
2807
  }
2793
2808
  return t({
2794
2809
  areaPathDefinition: u
2795
- }), { __sfc: !0, props: r, slots: n, data: a, options: o, internalData: s, allOptions: i, computedLineData: l, areaPathDefinition: u, computedColor: c, areaColor: f, getSparklineOptions: _, xScaleGenerator: m, LumeChart: Y, LumeLineGroup: ve };
2810
+ }), { __sfc: !0, props: r, slots: n, data: a, options: o, internalData: s, allOptions: i, computedLineData: l, areaPathDefinition: u, computedColor: c, areaColor: p, getSparklineOptions: v, xScaleGenerator: g, LumeChart: K, LumeLineGroup: he };
2796
2811
  }
2797
2812
  });
2798
- var za = function() {
2813
+ var Za = function() {
2799
2814
  var t = this, r = t._self._c, n = t._self._setupProxy;
2800
2815
  return r(n.LumeChart, t._b({ attrs: { "chart-type": "line", options: n.getSparklineOptions(n.allOptions), "x-scale": n.xScaleGenerator }, scopedSlots: t._u([{ key: "groups", fn: function(a) {
2801
2816
  return [n.allOptions.showArea ? r("path", { class: [
@@ -2808,36 +2823,36 @@ var za = function() {
2808
2823
  return [t._t(o, null, null, s || {})];
2809
2824
  } };
2810
2825
  })], null, !0) }, "lume-chart", n.props, !1));
2811
- }, Wa = [], Za = /* @__PURE__ */ w(
2812
- Ma,
2813
- za,
2826
+ }, Xa = [], Ua = /* @__PURE__ */ w(
2814
2827
  Wa,
2828
+ Za,
2829
+ Xa,
2815
2830
  !1,
2816
2831
  null,
2817
2832
  "6d7c407a",
2818
2833
  null,
2819
2834
  null
2820
2835
  );
2821
- const ro = Za.exports;
2836
+ const oo = Ua.exports;
2822
2837
  export {
2823
- In as L,
2824
- Ja as a,
2825
- Qa as b,
2826
- to as c,
2827
- eo as d,
2828
- no as e,
2829
- ro as f,
2830
- Y as g,
2831
- Bn as h,
2832
- Gn as i,
2833
- Xn as j,
2834
- Rt as k,
2835
- Ka as l,
2836
- ar as m,
2837
- lr as n,
2838
- Wr as o,
2839
- Pt as p,
2840
- ve as q,
2841
- hr as r
2838
+ On as L,
2839
+ to as a,
2840
+ eo as b,
2841
+ no as c,
2842
+ ro as d,
2843
+ ao as e,
2844
+ oo as f,
2845
+ K as g,
2846
+ In as h,
2847
+ En as i,
2848
+ Hn as j,
2849
+ It as k,
2850
+ qa as l,
2851
+ Kn as m,
2852
+ er as n,
2853
+ Xr as o,
2854
+ Dt as p,
2855
+ he as q,
2856
+ gr as r
2842
2857
  };
2843
- //# sourceMappingURL=26830389.js.map
2858
+ //# sourceMappingURL=6c47b7a9.js.map