@adyen/lume-vue3 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,12 +1,12 @@
1
- import { defineComponent as Z, ref as C, openBlock as _, createElementBlock as L, mergeProps as M, createElementVNode as G, toDisplayString as ee, createCommentVNode as P, isRef as Lt, computed as p, watch as X, toRefs as q, inject as Be, reactive as Re, onMounted as pe, unref as l, Fragment as J, renderList as z, createBlock as W, normalizeClass as te, normalizeStyle as Ot, onBeforeUnmount as $t, watchEffect as xt, renderSlot as R, createTextVNode as de, useSlots as oe, withDirectives as Jt, withCtx as V, createSlots as ue, vShow as Qt, pushScopeId as qt, popScopeId as en, provide as Me, createVNode as ae, normalizeProps as ie, guardReactiveProps as se, defineAsyncComponent as Ge, resolveDynamicComponent as tn } from "vue";
2
- import { format as nn, ticks as on, scaleBand as $e, scaleLinear as xe, link as an, line as rn, area as ln } from "d3";
3
- import { createPopper as un } from "@popperjs/core";
4
- import { sankeyLinkHorizontal as sn, sankey as cn, sankeyJustify as dn } from "d3-sankey";
5
- const vn = {
1
+ import { defineComponent as Z, ref as R, openBlock as _, createElementBlock as L, mergeProps as C, createElementVNode as G, toDisplayString as te, createCommentVNode as F, isRef as Ot, computed as p, watch as X, toRefs as q, inject as Be, reactive as Re, onMounted as pe, unref as l, Fragment as J, renderList as z, createBlock as W, normalizeClass as ee, normalizeStyle as $t, onBeforeUnmount as xt, watchEffect as wt, renderSlot as M, createTextVNode as de, useSlots as oe, withDirectives as en, withCtx as V, createSlots as ue, vShow as tn, pushScopeId as nn, popScopeId as on, provide as Ge, createVNode as ae, normalizeProps as ie, guardReactiveProps as se, defineAsyncComponent as je, resolveDynamicComponent as an } from "vue";
2
+ import { format as rn, ticks as ln, scaleBand as $e, scaleLinear as xe, link as un, line as sn, area as cn } from "d3";
3
+ import { createPopper as dn } from "@popperjs/core";
4
+ import { sankeyLinkHorizontal as vn, sankey as pn, sankeyJustify as fn } from "d3-sankey";
5
+ const mn = {
6
6
  class: "axis__tick-label lume-typography--axis",
7
7
  "pointer-events": "all",
8
8
  "data-j-axis__tick-label": ""
9
- }, pn = /* @__PURE__ */ Z({
9
+ }, hn = /* @__PURE__ */ Z({
10
10
  __name: "lume-tick",
11
11
  props: {
12
12
  value: {
@@ -44,8 +44,8 @@ const vn = {
44
44
  },
45
45
  emits: ["click", "mouseenter"],
46
46
  setup(e, { expose: t, emit: n }) {
47
- const o = C(null);
48
- return t({ ref: o }), (r, a) => (_(), L("g", M(e.group, {
47
+ const o = R(null);
48
+ return t({ ref: o }), (r, a) => (_(), L("g", C(e.group, {
49
49
  class: ["axis__tick", {
50
50
  "axis__tick--hovered": e.isHovered,
51
51
  "axis__tick--hidden": e.isHidden
@@ -54,18 +54,18 @@ const vn = {
54
54
  onMouseenter: a[0] || (a[0] = (u) => n("mouseenter", u)),
55
55
  onClick: a[1] || (a[1] = (u) => n("click", u))
56
56
  }), [
57
- G("g", vn, [
58
- G("rect", M(e.ghost, {
57
+ G("g", mn, [
58
+ G("rect", C(e.ghost, {
59
59
  class: "axis__ghost",
60
60
  fill: "url(#lume-tick-gradient)"
61
61
  }), null, 16),
62
- G("text", M(e.label, {
62
+ G("text", C(e.label, {
63
63
  ref_key: "labelRef",
64
64
  ref: o,
65
65
  class: "axis__label"
66
- }), ee(e.value), 17)
66
+ }), te(e.value), 17)
67
67
  ]),
68
- e.withGridlines ? (_(), L("line", M({ key: 0 }, e.gridline, { class: "axis__grid-line" }), null, 16)) : P("", !0)
68
+ e.withGridlines ? (_(), L("line", C({ key: 0 }, e.gridline, { class: "axis__grid-line" }), null, 16)) : F("", !0)
69
69
  ], 16));
70
70
  }
71
71
  });
@@ -74,7 +74,7 @@ const Q = (e, t) => {
74
74
  for (const [o, r] of t)
75
75
  n[o] = r;
76
76
  return n;
77
- }, st = /* @__PURE__ */ Q(pn, [["__scopeId", "data-v-59ddc0a6"]]), fn = [
77
+ }, ct = /* @__PURE__ */ Q(hn, [["__scopeId", "data-v-59ddc0a6"]]), gn = [
78
78
  "controls",
79
79
  "legend",
80
80
  "axes",
@@ -82,41 +82,41 @@ const Q = (e, t) => {
82
82
  "tooltip",
83
83
  "tooltip-content"
84
84
  ];
85
- function wt() {
85
+ function It() {
86
86
  return process.env.NODE_ENV === "production";
87
87
  }
88
- function It(e) {
88
+ function Et(e) {
89
89
  return (e == null ? void 0 : e.map(
90
90
  (t) => t.values.map((n) => n == null ? void 0 : n.value).flat()
91
91
  ).flat()) || [];
92
92
  }
93
- function Ke(e) {
93
+ function Je(e) {
94
94
  return e.length === 1;
95
95
  }
96
- function hn(e) {
96
+ function _n(e) {
97
97
  return !!e && e.every(
98
98
  (t) => "color" in t
99
99
  );
100
100
  }
101
- function je(e) {
101
+ function Ve(e) {
102
102
  return !!e && typeof e == "object" && !Array.isArray(e);
103
103
  }
104
- function Et(e, t) {
104
+ function Nt(e, t) {
105
105
  const n = { ...e };
106
106
  return Object.entries(t).forEach(([o, r]) => {
107
- n[o] = je(e[o]) && je(r) ? Et(e[o], r) : r;
107
+ n[o] = Ve(e[o]) && Ve(r) ? Nt(e[o], r) : r;
108
108
  }), n;
109
109
  }
110
- function mn(e) {
111
- return e != null && je(e) && "value" in e;
110
+ function yn(e) {
111
+ return e != null && Ve(e) && "value" in e;
112
112
  }
113
- function ye(e) {
113
+ function _e(e) {
114
114
  return (e == null ? void 0 : e.bandwidth) !== void 0;
115
115
  }
116
- function gn(e) {
117
- return ye(e) ? e.step() : Math.max(...e.range()) / Math.max(...e.domain());
116
+ function kn(e) {
117
+ return _e(e) ? e.step() : Math.max(...e.range()) / Math.max(...e.domain());
118
118
  }
119
- const _n = (e, t) => {
119
+ const bn = (e, t) => {
120
120
  if (!e)
121
121
  throw new Error("Data is not a valid array");
122
122
  if (e.length === 0)
@@ -126,17 +126,17 @@ const _n = (e, t) => {
126
126
  throw new Error("Index exceeds length of at least one of the datasets");
127
127
  });
128
128
  };
129
- function yn(e, t) {
129
+ function An(e, t) {
130
130
  var n;
131
- return _n(e, t), ((n = e.reduce(
131
+ return bn(e, t), ((n = e.reduce(
132
132
  (o, r) => {
133
133
  var a, u;
134
134
  return (((a = o.values[t]) == null ? void 0 : a.value) ?? 0) > (((u = r.values[t]) == null ? void 0 : u.value) ?? 0) ? o : r;
135
135
  }
136
136
  ).values[t]) == null ? void 0 : n.value) || 0;
137
137
  }
138
- function Ve(e) {
139
- const t = Lt(e) ? e.value : e;
138
+ function Pe(e) {
139
+ const t = Ot(e) ? e.value : e;
140
140
  if (!t)
141
141
  throw new Error("No empty array can be created from specified data value");
142
142
  const n = Math.max(
@@ -145,17 +145,17 @@ function Ve(e) {
145
145
  );
146
146
  return Array(n).fill(null);
147
147
  }
148
- function kn(e) {
149
- return ye(e) ? e.domain().length : Math.max(...e.domain());
148
+ function Tn(e) {
149
+ return _e(e) ? e.domain().length : Math.max(...e.domain());
150
150
  }
151
- function bn(e, t) {
151
+ function Ln(e, t) {
152
152
  return (n) => Math.round(e * (1 - n) + t * n);
153
153
  }
154
- function An(e, t, n) {
154
+ function On(e, t, n) {
155
155
  const o = n ? e.length - t : t, r = e.slice(0, o);
156
156
  return e.slice(o).concat(r);
157
157
  }
158
- function ke(e) {
158
+ function ye(e) {
159
159
  if (e.groups) {
160
160
  const t = Object.keys(e);
161
161
  return Object.assign(
@@ -165,32 +165,32 @@ function ke(e) {
165
165
  }
166
166
  return e;
167
167
  }
168
- function Tn(e) {
168
+ function $n(e) {
169
169
  return Object.assign(
170
170
  {},
171
171
  ...Object.keys(e).map(
172
- (t) => fn.includes(t) ? {} : { [t]: e[t] }
172
+ (t) => gn.includes(t) ? {} : { [t]: e[t] }
173
173
  )
174
174
  );
175
175
  }
176
- const Ln = (e = 21) => crypto.getRandomValues(new Uint8Array(e)).reduce(
176
+ const xn = (e = 21) => crypto.getRandomValues(new Uint8Array(e)).reduce(
177
177
  (t, n) => t += (n &= 63) < 36 ? n.toString(36) : n < 62 ? (n - 26).toString(36).toUpperCase() : n > 62 ? "-" : "_",
178
178
  ""
179
179
  );
180
180
  var ve = /* @__PURE__ */ ((e) => (e.DatasetLength = `Our guidelines highly recommend not having more than 5 datasets in one chart.
181
181
  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.Empty = "The dataset(s) provided are empty.", 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.InvalidHoveredIndex = "The provided hovered index is not valid for the data of this chart.", e.InvalidHoveredElement = "The provided hovered element is not valid for the data of this diagram.", e))(ve || {});
182
- const On = "[lume] ";
183
- function ge(e, t = !0) {
184
- t && wt() || console.warn(On + "Warning: " + e);
182
+ const wn = "[lume] ";
183
+ function he(e, t = !0) {
184
+ t && It() || console.warn(wn + "Warning: " + e);
185
185
  }
186
186
  const He = (e) => {
187
187
  let t = null;
188
188
  switch (typeof e) {
189
189
  case "string":
190
190
  try {
191
- t = nn(e);
191
+ t = rn(e);
192
192
  } catch {
193
- ge(ve.InvalidFormat), t = null;
193
+ he(ve.InvalidFormat), t = null;
194
194
  }
195
195
  break;
196
196
  case "function":
@@ -211,13 +211,13 @@ const He = (e) => {
211
211
  });
212
212
  function ce(e, t) {
213
213
  return { allOptions: p(() => {
214
- const o = Lt(t) ? t == null ? void 0 : t.value : t;
215
- return o ? Et(o, e.value) : e.value;
214
+ const o = Ot(t) ? t == null ? void 0 : t.value : t;
215
+ return o ? Nt(o, e.value) : e.value;
216
216
  }) };
217
217
  }
218
- const $n = 0.15;
219
- function xn(e, t, n) {
220
- const o = C(), r = p(() => Math.max(...e.value.range())), a = p(() => t.value.length);
218
+ const In = 0.15;
219
+ function En(e, t, n) {
220
+ const o = R(), r = p(() => Math.max(...e.value.range())), a = p(() => t.value.length);
221
221
  function u() {
222
222
  if (!t.value)
223
223
  return;
@@ -225,7 +225,7 @@ function xn(e, t, n) {
225
225
  (v, d) => v + d.ref.getBoundingClientRect().width,
226
226
  0
227
227
  ), c = Math.ceil(i / a.value);
228
- o.value = c + c * $n;
228
+ o.value = c + c * In;
229
229
  }
230
230
  function s(i) {
231
231
  if (!t.value)
@@ -238,15 +238,15 @@ function xn(e, t, n) {
238
238
  }
239
239
  return X(t, u), { showTick: s };
240
240
  }
241
- var re = /* @__PURE__ */ ((e) => (e.Skyblue = "skyblue", e.Royalblue = "royalblue", e.Violet = "violet", e.Darkteal = "darkteal", e.Gold = "gold", e))(re || {}), Nt = /* @__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))(Nt || {}), Je = /* @__PURE__ */ ((e) => (e.SkyTeal = "skyblue-darkteal", e.VioletRoyal = "violet-royalblue", e.VioletTeal = "violet-darkteal", e.GoldTeal = "gold-darkteal", e.GoldRoyal = "gold-royalblue", e))(Je || {}), Dt = /* @__PURE__ */ ((e) => (e.Grey = "grey", e.Green = "green", e.Orange = "orange", e.Red = "red", e))(Dt || {}), Qe = /* @__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))(Qe || {});
242
- const D = {
241
+ var re = /* @__PURE__ */ ((e) => (e.Skyblue = "skyblue", e.Royalblue = "royalblue", e.Violet = "violet", e.Darkteal = "darkteal", e.Gold = "gold", e))(re || {}), Dt = /* @__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))(Dt || {}), Qe = /* @__PURE__ */ ((e) => (e.SkyTeal = "skyblue-darkteal", e.VioletRoyal = "violet-royalblue", e.VioletTeal = "violet-darkteal", e.GoldTeal = "gold-darkteal", e.GoldRoyal = "gold-royalblue", e))(Qe || {}), Ht = /* @__PURE__ */ ((e) => (e.Grey = "grey", e.Green = "green", e.Orange = "orange", e.Red = "red", e))(Ht || {}), qe = /* @__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))(qe || {});
242
+ const H = {
243
243
  HORIZONTAL: "horizontal",
244
244
  VERTICAL: "vertical"
245
- }, wn = {
245
+ }, Nn = {
246
246
  SINGLE: "single",
247
247
  GROUPED: "grouped",
248
248
  STACKED: "stacked"
249
- }, Ht = "No data", ct = 20, Bt = 0.33, Rt = 0.5, St = 12, Ie = 8, In = 1, En = [
249
+ }, Bt = "No data", dt = 20, Rt = 0.33, Mt = 0.5, St = 12, Ie = 8, Dn = 1, Hn = [
250
250
  "auto",
251
251
  "auto-start",
252
252
  "auto-end",
@@ -263,8 +263,8 @@ const D = {
263
263
  "left-start",
264
264
  "left-end"
265
265
  ];
266
- function Se(e) {
267
- e != null && e.closest("svg") || ge(ve.NotContainedInSvg);
266
+ function Me(e) {
267
+ e != null && e.closest("svg") || he(ve.NotContainedInSvg);
268
268
  }
269
269
  const Ct = {
270
270
  /** Displays a line for each tick. */
@@ -282,14 +282,14 @@ const Ct = {
282
282
  tickFormat: null,
283
283
  /** Space between the tick label and the axis line. */
284
284
  tickPadding: 8
285
- }, Nn = {
285
+ }, Bn = {
286
286
  ...Ct,
287
287
  withTitle: !1,
288
288
  skip: !0
289
- }, Dn = {
289
+ }, Rn = {
290
290
  ...Ct,
291
291
  gridLines: !0
292
- }, Hn = function(e, t, n) {
292
+ }, Mn = function(e, t, n) {
293
293
  const o = p(() => e.value.step() * e.value.paddingInner() / 2);
294
294
  function r(i, c) {
295
295
  return {
@@ -331,7 +331,7 @@ const Ct = {
331
331
  getTickGroupAttributes: r,
332
332
  getTickLabelAttributes: s
333
333
  };
334
- }, Bn = function(e, t, n) {
334
+ }, Sn = function(e, t, n) {
335
335
  const o = p(() => e.value.step() * e.value.paddingInner() / 2);
336
336
  function r(i, c) {
337
337
  return {
@@ -369,7 +369,7 @@ const Ct = {
369
369
  getTickGroupAttributes: r,
370
370
  getTickLabelAttributes: s
371
371
  };
372
- }, Rn = function(e, t, n) {
372
+ }, Cn = function(e, t, n) {
373
373
  const o = p(() => {
374
374
  const i = e.value.ticks();
375
375
  return i.length > 1 ? e.value(i[1]) - e.value(i[0]) : 0;
@@ -404,7 +404,7 @@ const Ct = {
404
404
  getTickGroupAttributes: r,
405
405
  getTickLabelAttributes: s
406
406
  };
407
- }, Sn = function(e, t, n) {
407
+ }, Gn = function(e, t, n) {
408
408
  const o = p(() => {
409
409
  const i = e.value.ticks();
410
410
  return i.length > 1 ? e.value(i[1]) - e.value(i[0]) : 0;
@@ -442,12 +442,12 @@ const Ct = {
442
442
  getTickGroupAttributes: r,
443
443
  getTickLabelAttributes: s
444
444
  };
445
- }, Cn = {
446
- "x-band-scale-axis": Hn,
447
- "y-band-scale-axis": Bn,
448
- "x-linear-scale-axis": Rn,
449
- "y-linear-scale-axis": Sn
450
- }, Mn = ["transform"], Gn = { key: 0 }, jn = /* @__PURE__ */ G("linearGradient", { id: "lume-tick-gradient" }, [
445
+ }, jn = {
446
+ "x-band-scale-axis": Mn,
447
+ "y-band-scale-axis": Sn,
448
+ "x-linear-scale-axis": Cn,
449
+ "y-linear-scale-axis": Gn
450
+ }, Vn = ["transform"], Pn = { key: 0 }, Fn = /* @__PURE__ */ G("linearGradient", { id: "lume-tick-gradient" }, [
451
451
  /* @__PURE__ */ G("stop", {
452
452
  offset: "0%",
453
453
  "stop-color": "rgba(255,255,255,0)"
@@ -464,11 +464,11 @@ const Ct = {
464
464
  offset: "100%",
465
465
  "stop-color": "rgba(255,255,255,0)"
466
466
  })
467
- ], -1), Vn = [
468
- jn
467
+ ], -1), zn = [
468
+ Fn
469
469
  ];
470
- var Mt = /* @__PURE__ */ ((e) => (e.bandScale = "band-scale-axis", e.linearScale = "linear-scale-axis", e))(Mt || {}), Gt = /* @__PURE__ */ ((e) => (e.left = "left", e.bottom = "bottom", e))(Gt || {}), Fe = /* @__PURE__ */ ((e) => (e.x = "bottom", e.y = "left", e))(Fe || {});
471
- const dt = /* @__PURE__ */ Z({
470
+ var Gt = /* @__PURE__ */ ((e) => (e.bandScale = "band-scale-axis", e.linearScale = "linear-scale-axis", e))(Gt || {}), jt = /* @__PURE__ */ ((e) => (e.left = "left", e.bottom = "bottom", e))(jt || {}), Fe = /* @__PURE__ */ ((e) => (e.x = "bottom", e.y = "left", e))(Fe || {});
471
+ const vt = /* @__PURE__ */ Z({
472
472
  __name: "lume-axis",
473
473
  props: {
474
474
  scale: {
@@ -483,7 +483,7 @@ const dt = /* @__PURE__ */ Z({
483
483
  position: {
484
484
  type: String,
485
485
  default: void 0,
486
- validator: (e) => e in Gt
486
+ validator: (e) => e in jt
487
487
  },
488
488
  containerSize: {
489
489
  type: Object,
@@ -495,43 +495,43 @@ const dt = /* @__PURE__ */ Z({
495
495
  },
496
496
  orientation: {
497
497
  type: String,
498
- default: D.VERTICAL
498
+ default: H.VERTICAL
499
499
  },
500
500
  ...we()
501
501
  },
502
502
  emits: ["mouseenter", "click", "mouseleave", "lume__internal--axis-size"],
503
503
  setup(e, { emit: t }) {
504
- const n = e, o = 16, { scale: r, containerSize: a, hoveredIndex: u, options: s, orientation: i } = q(n), c = Be("isEmpty", C(!1)), v = Re({}), d = C(null), h = C(null), k = C(null), m = p(
504
+ const n = e, o = 16, { scale: r, containerSize: a, hoveredIndex: u, options: s, orientation: i } = q(n), c = Be("isEmpty", R(!1)), v = Re({}), d = R(null), m = R(null), y = R(null), h = p(
505
505
  () => n.type ? Fe[n.type] : n.position
506
506
  ), A = p(
507
- () => n.type || (m.value === "left" ? "y" : "x")
508
- ), f = p(
509
- () => A.value === "x" && i.value === D.VERTICAL || A.value === "y" && i.value === D.HORIZONTAL
510
- ), { allOptions: y } = ce(
507
+ () => n.type || (h.value === "left" ? "y" : "x")
508
+ ), O = p(
509
+ () => A.value === "x" && i.value === H.VERTICAL || A.value === "y" && i.value === H.HORIZONTAL
510
+ ), { allOptions: f } = ce(
511
511
  s,
512
- A.value === "x" ? Nn : Dn
513
- ), { showTick: E } = xn(r, d, y.value.skip), w = p(() => {
514
- var B, b, I, g;
515
- return A.value === "y" && c.value ? `translate(0, ${((B = a.value) == null ? void 0 : B.height) / 2})` : A.value === "x" && c.value ? `translate(-${((b = a.value) == null ? void 0 : b.width) / 2}, ${(I = a.value) == null ? void 0 : I.height})` : `translate(0, ${A.value === "x" ? (g = a.value) == null ? void 0 : g.height : 0})`;
516
- }), N = p(() => {
517
- if (ye(r.value))
518
- return r.value.labels || r.value.domain();
519
- const { tickCount: B } = y.value, [b, I] = r.value.domain();
520
- return on(b, I, B);
512
+ A.value === "x" ? Bn : Rn
513
+ ), { showTick: x } = En(r, d, f.value.skip), N = p(() => {
514
+ var B, k, E, g;
515
+ return A.value === "y" && c.value ? `translate(0, ${((B = a.value) == null ? void 0 : B.height) / 2})` : A.value === "x" && c.value ? `translate(-${((k = a.value) == null ? void 0 : k.width) / 2}, ${(E = a.value) == null ? void 0 : E.height})` : `translate(0, ${A.value === "x" ? (g = a.value) == null ? void 0 : g.height : 0})`;
521
516
  }), $ = p(() => {
522
- const { tickFormat: B } = y.value;
517
+ if (_e(r.value))
518
+ return r.value.labels || r.value.domain();
519
+ const { tickCount: B } = f.value, [k, E] = r.value.domain();
520
+ return ln(k, E, B);
521
+ }), w = p(() => {
522
+ const { tickFormat: B } = f.value;
523
523
  return He(B);
524
- }), H = p(
525
- () => y.value.withHover && f.value && u.value > -1
524
+ }), D = p(
525
+ () => f.value.withHover && O.value && u.value > -1
526
526
  ), S = p(
527
- () => y.value.tickPadding + Ie || o
527
+ () => f.value.tickPadding + Ie || o
528
528
  ), Y = p(() => A.value === "x" ? (
529
529
  // If x axis, get the tick height
530
530
  Math.max(
531
531
  ...(d.value || []).map(
532
532
  (B) => {
533
- var b, I;
534
- return ((I = (b = B.ref).getBBox) == null ? void 0 : I.call(b).height) + S.value;
533
+ var k, E;
534
+ return ((E = (k = B.ref).getBBox) == null ? void 0 : E.call(k).height) + S.value;
535
535
  }
536
536
  )
537
537
  )
@@ -540,80 +540,80 @@ const dt = /* @__PURE__ */ Z({
540
540
  Math.max(
541
541
  ...(d.value || []).map(
542
542
  (B) => {
543
- var b, I;
544
- return ((I = (b = B.ref).getBBox) == null ? void 0 : I.call(b).width) + S.value;
543
+ var k, E;
544
+ return ((E = (k = B.ref).getBBox) == null ? void 0 : E.call(k).width) + S.value;
545
545
  }
546
546
  )
547
547
  )
548
548
  ));
549
- function K(B) {
550
- const { showTicks: b } = y.value;
551
- return b === !1 ? "" : $.value(B);
549
+ function ne(B) {
550
+ const { showTicks: k } = f.value;
551
+ return k === !1 ? "" : w.value(B);
552
552
  }
553
- function F(B, b, I) {
554
- t("mouseenter", { index: f.value ? B : null, value: b, event: I });
553
+ function P(B, k, E) {
554
+ t("mouseenter", { index: O.value ? B : null, value: k, event: E });
555
555
  }
556
- function ne(B, b, I) {
557
- t("click", { index: B, value: b, event: I });
556
+ function K(B, k, E) {
557
+ t("click", { index: B, value: k, event: E });
558
558
  }
559
- function be(B) {
560
- var b;
559
+ function ke(B) {
560
+ var k;
561
561
  if (!(!d.value || !d.value.length))
562
- return (b = d.value[B]) == null ? void 0 : b.ref;
562
+ return (k = d.value[B]) == null ? void 0 : k.ref;
563
563
  }
564
- function fe() {
565
- k.value = N.value.map(
566
- (B, b) => ({
567
- value: K(B),
568
- group: v.getTickGroupAttributes(B, b),
569
- ghost: v.getTickGhostAttributes(be(b)),
564
+ function be() {
565
+ y.value = $.value.map(
566
+ (B, k) => ({
567
+ value: ne(B),
568
+ group: v.getTickGroupAttributes(B, k),
569
+ ghost: v.getTickGhostAttributes(ke(k)),
570
570
  label: v.getTickLabelAttributes(),
571
571
  gridline: v.getGridLinesAttributes()
572
572
  })
573
573
  );
574
574
  }
575
- function he() {
576
- const B = r.value.step ? "bandScale" : "linearScale", b = Cn[`${A.value}-${Mt[B]}`];
577
- Object.entries(b(r, a, y) || []).forEach(
578
- ([I, g]) => {
579
- v[I] = g;
575
+ function fe() {
576
+ const B = r.value.step ? "bandScale" : "linearScale", k = jn[`${A.value}-${Gt[B]}`];
577
+ Object.entries(k(r, a, f) || []).forEach(
578
+ ([E, g]) => {
579
+ v[E] = g;
580
580
  }
581
581
  );
582
582
  }
583
- return X(r, he, { flush: "sync", immediate: !0 }), X(r, fe, { immediate: !0 }), X(d, fe), X(Y, (B) => t("lume__internal--axis-size", B)), pe(() => Se(h.value)), (B, b) => l(r) ? (_(), L("g", {
583
+ return X(r, fe, { flush: "sync", immediate: !0 }), X(r, be, { immediate: !0 }), X(d, be), X(Y, (B) => t("lume__internal--axis-size", B)), pe(() => Me(m.value)), (B, k) => l(r) ? (_(), L("g", {
584
584
  key: 0,
585
585
  ref_key: "root",
586
- ref: h,
586
+ ref: m,
587
587
  class: "axis",
588
- transform: l(w),
588
+ transform: l(N),
589
589
  "data-j-axis": "",
590
- onMouseleave: b[1] || (b[1] = (I) => t("mouseleave", I))
590
+ onMouseleave: k[1] || (k[1] = (E) => t("mouseleave", E))
591
591
  }, [
592
- l(A) === "x" ? (_(), L("defs", Gn, Vn)) : P("", !0),
593
- (_(!0), L(J, null, z(k.value, (I, g) => (_(), W(l(st), M({
594
- key: `${I.value}_${g}`,
592
+ l(A) === "x" ? (_(), L("defs", Pn, zn)) : F("", !0),
593
+ (_(!0), L(J, null, z(y.value, (E, g) => (_(), W(l(ct), C({
594
+ key: `${E.value}_${g}`,
595
595
  ref_for: !0,
596
596
  ref_key: "tickRefs",
597
597
  ref: d
598
- }, I, {
599
- "is-hidden": l(y).skip && !l(E)(g),
600
- "with-gridlines": l(y).gridLines,
601
- onMouseenter: (j) => F(g, I.value, j),
602
- onClick: (j) => ne(g, I.value, j)
598
+ }, E, {
599
+ "is-hidden": l(f).skip && !l(x)(g),
600
+ "with-gridlines": l(f).gridLines,
601
+ onMouseenter: (j) => P(g, E.value, j),
602
+ onClick: (j) => K(g, E.value, j)
603
603
  }), null, 16, ["is-hidden", "with-gridlines", "onMouseenter", "onClick"]))), 128)),
604
- l(H) ? (_(), W(l(st), M({ key: 1 }, k.value[l(u)], {
604
+ l(D) ? (_(), W(l(ct), C({ key: 1 }, y.value[l(u)], {
605
605
  "with-gridlines": !1,
606
606
  "is-hovered": "",
607
- onClick: b[0] || (b[0] = (I) => ne(
607
+ onClick: k[0] || (k[0] = (E) => K(
608
608
  l(u),
609
- k.value[l(u)].value,
610
- I
609
+ y.value[l(u)].value,
610
+ E
611
611
  ))
612
- }), null, 16)) : P("", !0)
613
- ], 40, Mn)) : P("", !0);
612
+ }), null, 16)) : F("", !0)
613
+ ], 40, Vn)) : F("", !0);
614
614
  }
615
615
  });
616
- function Fn(e, t, n, o) {
616
+ function Zn(e, t, n, o) {
617
617
  const r = p(() => n.value > 0 && n.value < 1), a = p(
618
618
  () => o.value > 0 && o.value < 1
619
619
  ), u = p(
@@ -625,13 +625,13 @@ function Fn(e, t, n, o) {
625
625
  );
626
626
  return { computedX: u, computedY: s, shouldHaveMinWidth: r, shouldHaveMinHeight: a };
627
627
  }
628
- function Pn(e, t, n, o) {
629
- const r = C(0), a = C(0), u = p(() => `${e.value + n.value / 2}px ${t.value + o.value / 2}px`);
628
+ function Wn(e, t, n, o) {
629
+ const r = R(0), a = R(0), u = p(() => `${e.value + n.value / 2}px ${t.value + o.value / 2}px`);
630
630
  return pe(() => {
631
631
  r.value = n.value, a.value = o.value;
632
632
  }), X(n, (s) => r.value = s), X(o, (s) => a.value = s), { computedWidth: r, computedHeight: a, transformOrigin: u };
633
633
  }
634
- const zn = ["x", "y", "width", "height"], Zn = /* @__PURE__ */ Z({
634
+ const Un = ["x", "y", "width", "height"], Xn = /* @__PURE__ */ Z({
635
635
  __name: "lume-bar",
636
636
  props: {
637
637
  x: {
@@ -669,36 +669,36 @@ const zn = ["x", "y", "width", "height"], Zn = /* @__PURE__ */ Z({
669
669
  },
670
670
  emits: ["click", "mouseover", "mouseleave"],
671
671
  setup(e, { emit: t }) {
672
- const n = e, { x: o, y: r, width: a, height: u, transition: s, classList: i } = q(n), c = C(null), v = p(
672
+ const n = e, { x: o, y: r, width: a, height: u, transition: s, classList: i } = q(n), c = R(null), v = p(
673
673
  () => typeof i.value == "string" ? [i.value] : i.value
674
- ), d = p(() => s.value === "width"), h = p(() => s.value === "height"), k = Pn(o, r, a, u), { computedX: m, computedY: A, shouldHaveMinWidth: f, shouldHaveMinHeight: y } = Fn(o, r, a, u), E = p(() => f.value ? 1 : (d.value ? k.computedWidth : a).value), w = p(() => y.value ? 1 : (h.value ? k.computedHeight : u).value), N = d.value || h.value ? k.transformOrigin : null;
675
- return pe(() => Se(c.value)), ($, H) => (_(), L("rect", {
674
+ ), d = p(() => s.value === "width"), m = p(() => s.value === "height"), y = Wn(o, r, a, u), { computedX: h, computedY: A, shouldHaveMinWidth: O, shouldHaveMinHeight: f } = Zn(o, r, a, u), x = p(() => O.value ? 1 : (d.value ? y.computedWidth : a).value), N = p(() => f.value ? 1 : (m.value ? y.computedHeight : u).value), $ = d.value || m.value ? y.transformOrigin : null;
675
+ return pe(() => Me(c.value)), (w, D) => (_(), L("rect", {
676
676
  ref_key: "root",
677
677
  ref: c,
678
- class: te(["lume-bar", [
678
+ class: ee(["lume-bar", [
679
679
  {
680
680
  "lume-fill--faded": e.isFaded,
681
681
  "lume-bar--negative": e.isNegative,
682
682
  "lume-bar--transition-width": l(d),
683
- "lume-bar--transition-height": l(h)
683
+ "lume-bar--transition-height": l(m)
684
684
  },
685
685
  ...l(v)
686
686
  ]]),
687
- style: Ot({ transformOrigin: l(N) }),
688
- x: l(m),
687
+ style: $t({ transformOrigin: l($) }),
688
+ x: l(h),
689
689
  y: l(A),
690
- width: l(E),
691
- height: l(w),
690
+ width: l(x),
691
+ height: l(N),
692
692
  "data-j-bar": "",
693
- onClick: H[0] || (H[0] = (S) => t("click", S)),
694
- onMouseover: H[1] || (H[1] = (S) => t("mouseover", S)),
695
- onMouseleave: H[2] || (H[2] = (S) => t("mouseleave", S))
696
- }, null, 46, zn));
693
+ onClick: D[0] || (D[0] = (S) => t("click", S)),
694
+ onMouseover: D[1] || (D[1] = (S) => t("mouseover", S)),
695
+ onMouseleave: D[2] || (D[2] = (S) => t("mouseleave", S))
696
+ }, null, 46, Un));
697
697
  }
698
698
  });
699
- const qe = /* @__PURE__ */ Q(Zn, [["__scopeId", "data-v-8e8f732a"]]);
700
- function Wn() {
701
- const e = C(), t = Re({
699
+ const et = /* @__PURE__ */ Q(Xn, [["__scopeId", "data-v-8e8f732a"]]);
700
+ function Yn() {
701
+ const e = R(), t = Re({
702
702
  dimensions: {}
703
703
  }), n = new ResizeObserver((o) => {
704
704
  o.forEach((r) => {
@@ -707,11 +707,11 @@ function Wn() {
707
707
  });
708
708
  return pe(() => {
709
709
  n.observe(e.value);
710
- }), $t(() => {
710
+ }), xt(() => {
711
711
  n.unobserve(e.value);
712
712
  }), { resizeState: t, resizeRef: e };
713
713
  }
714
- const Un = ["height"], Xn = ["transform"], Yn = /* @__PURE__ */ Z({
714
+ const Kn = ["height"], Jn = ["transform"], Qn = /* @__PURE__ */ Z({
715
715
  __name: "lume-chart-container",
716
716
  props: {
717
717
  margins: {
@@ -733,35 +733,35 @@ const Un = ["height"], Xn = ["transform"], Yn = /* @__PURE__ */ Z({
733
733
  },
734
734
  emits: ["click", "mouseenter", "mouseleave", "resize"],
735
735
  setup(e, { emit: t }) {
736
- const n = e, { margins: o, containerSize: r } = q(n), a = C(null), { resizeRef: u, resizeState: s } = Wn(), i = p(
736
+ const n = e, { margins: o, containerSize: r } = q(n), a = R(null), { resizeRef: u, resizeState: s } = Yn(), i = p(
737
737
  () => r.value.height + o.value.top + o.value.bottom
738
738
  );
739
- return xt(() => {
739
+ return wt(() => {
740
740
  if (!a.value)
741
741
  return;
742
742
  const { width: c } = s.dimensions, { height: v } = a.value.getBoundingClientRect();
743
743
  if (!c || !v)
744
744
  return;
745
- const d = c - o.value.left - o.value.right, h = v - o.value.top - o.value.bottom, k = {
745
+ const d = c - o.value.left - o.value.right, m = v - o.value.top - o.value.bottom, y = {
746
746
  width: d > 0 ? d : 0,
747
- height: h > 0 ? h : 0,
747
+ height: m > 0 ? m : 0,
748
748
  outerWidth: c,
749
749
  outerHeight: v
750
750
  };
751
- t("resize", k);
751
+ t("resize", y);
752
752
  }), (c, v) => (_(), L("div", {
753
753
  ref_key: "resizeRef",
754
754
  ref: u,
755
- class: te(["lume-chart-container", {
755
+ class: ee(["lume-chart-container", {
756
756
  "lume-chart-container--minimum": !e.noMinSize
757
757
  }]),
758
758
  "data-j-chart-container": ""
759
759
  }, [
760
- R(c.$slots, "header", {}, void 0, !0),
760
+ M(c.$slots, "header", {}, void 0, !0),
761
761
  (_(), L("svg", {
762
762
  ref_key: "root",
763
763
  ref: a,
764
- class: te(["lume-chart-container__svg", {
764
+ class: ee(["lume-chart-container__svg", {
765
765
  "lume-chart-container__svg--transparent": e.transparentBackground
766
766
  }]),
767
767
  height: l(i),
@@ -775,27 +775,27 @@ const Un = ["height"], Xn = ["transform"], Yn = /* @__PURE__ */ Z({
775
775
  class: "lume-chart-container__group",
776
776
  "data-j-chart-container__group": ""
777
777
  }, [
778
- R(c.$slots, "default", {}, void 0, !0)
779
- ], 8, Xn)
780
- ], 42, Un)),
781
- R(c.$slots, "footer", {}, void 0, !0),
782
- R(c.$slots, "extra", {}, void 0, !0)
778
+ M(c.$slots, "default", {}, void 0, !0)
779
+ ], 8, Jn)
780
+ ], 42, Kn)),
781
+ M(c.$slots, "footer", {}, void 0, !0),
782
+ M(c.$slots, "extra", {}, void 0, !0)
783
783
  ], 2));
784
784
  }
785
785
  });
786
- const Kn = /* @__PURE__ */ Q(Yn, [["__scopeId", "data-v-36870bc4"]]), Jn = ["onClick", "onMouseenter"], Qn = /* @__PURE__ */ Z({
786
+ const qn = /* @__PURE__ */ Q(Qn, [["__scopeId", "data-v-36870bc4"]]), eo = ["onClick", "onMouseenter"], to = /* @__PURE__ */ Z({
787
787
  __name: "lume-chart-legend",
788
788
  props: {
789
789
  data: {
790
790
  type: Array,
791
- validator: hn,
791
+ validator: _n,
792
792
  required: !0
793
793
  }
794
794
  },
795
795
  emits: ["click", "mouseenter", "mouseleave"],
796
796
  setup(e, { emit: t }) {
797
797
  const n = Be("isEmpty");
798
- return (o, r) => l(n) ? P("", !0) : (_(), L("div", {
798
+ return (o, r) => l(n) ? F("", !0) : (_(), L("div", {
799
799
  key: 0,
800
800
  class: "lume-chart-legend",
801
801
  "data-j-chart-legend": "",
@@ -810,46 +810,46 @@ const Kn = /* @__PURE__ */ Q(Yn, [["__scopeId", "data-v-36870bc4"]]), Jn = ["onC
810
810
  onMouseenter: (s) => t("mouseenter", { index: u, dataset: a, event: s })
811
811
  }, [
812
812
  G("span", {
813
- class: te(["lume-chart-legend__symbol", `lume-background-color--${a.color}`]),
813
+ class: ee(["lume-chart-legend__symbol", `lume-background-color--${a.color}`]),
814
814
  "data-j-chart-legend__symbol": ""
815
815
  }, null, 2),
816
- de(" " + ee(a.label || u), 1)
817
- ], 40, Jn))), 128))
816
+ de(" " + te(a.label || u), 1)
817
+ ], 40, eo))), 128))
818
818
  ], 32));
819
819
  }
820
820
  });
821
- const vt = /* @__PURE__ */ Q(Qn, [["__scopeId", "data-v-4710298b"]]);
822
- const qn = {}, eo = {
821
+ const pt = /* @__PURE__ */ Q(to, [["__scopeId", "data-v-4710298b"]]);
822
+ const no = {}, oo = {
823
823
  class: "lume-tooltip__title",
824
824
  "data-j-tooltip__title": ""
825
825
  };
826
- function to(e, t) {
827
- return _(), L("div", eo, [
828
- R(e.$slots, "default", {}, void 0, !0)
826
+ function ao(e, t) {
827
+ return _(), L("div", oo, [
828
+ M(e.$slots, "default", {}, void 0, !0)
829
829
  ]);
830
830
  }
831
- const no = /* @__PURE__ */ Q(qn, [["render", to], ["__scopeId", "data-v-8af3fac6"]]);
832
- const oo = {}, ao = {
831
+ const ro = /* @__PURE__ */ Q(no, [["render", ao], ["__scopeId", "data-v-8af3fac6"]]);
832
+ const lo = {}, uo = {
833
833
  class: "lume-tooltip__item",
834
834
  "data-j-tooltip__summary-item": ""
835
- }, ro = { class: "lume-tooltip__value" };
836
- function lo(e, t) {
837
- return _(), L("li", ao, [
835
+ }, io = { class: "lume-tooltip__value" };
836
+ function so(e, t) {
837
+ return _(), L("li", uo, [
838
838
  G("span", null, [
839
- R(e.$slots, "default", {}, void 0, !0)
839
+ M(e.$slots, "default", {}, void 0, !0)
840
840
  ]),
841
- G("strong", ro, [
842
- R(e.$slots, "value", {}, void 0, !0)
841
+ G("strong", io, [
842
+ M(e.$slots, "value", {}, void 0, !0)
843
843
  ])
844
844
  ]);
845
845
  }
846
- const uo = /* @__PURE__ */ Q(oo, [["render", lo], ["__scopeId", "data-v-4ed7ec1b"]]), io = {
846
+ const co = /* @__PURE__ */ Q(lo, [["render", so], ["__scopeId", "data-v-4ed7ec1b"]]), vo = {
847
847
  class: "lume-tooltip__item",
848
848
  "data-j-tooltip__item": ""
849
- }, so = { "data-j-tooltip__item__label": "" }, co = {
849
+ }, po = { "data-j-tooltip__item__label": "" }, fo = {
850
850
  class: "lume-tooltip__value",
851
851
  "data-j-tooltip__item__value": ""
852
- }, vo = /* @__PURE__ */ Z({
852
+ }, mo = /* @__PURE__ */ Z({
853
853
  __name: "lume-tooltip-item",
854
854
  props: {
855
855
  color: {
@@ -858,27 +858,27 @@ const uo = /* @__PURE__ */ Q(oo, [["render", lo], ["__scopeId", "data-v-4ed7ec1b
858
858
  }
859
859
  },
860
860
  setup(e) {
861
- return (t, n) => (_(), L("li", io, [
861
+ return (t, n) => (_(), L("li", vo, [
862
862
  e.color ? (_(), L("span", {
863
863
  key: 0,
864
- class: te([[`lume-background-color--${e.color}`], "lume-tooltip__symbol"]),
864
+ class: ee([[`lume-background-color--${e.color}`], "lume-tooltip__symbol"]),
865
865
  "data-j-tooltip__item__symbol": ""
866
- }, null, 2)) : P("", !0),
867
- G("span", so, [
868
- R(t.$slots, "label", {}, void 0, !0)
866
+ }, null, 2)) : F("", !0),
867
+ G("span", po, [
868
+ M(t.$slots, "label", {}, void 0, !0)
869
869
  ]),
870
- G("strong", co, [
871
- R(t.$slots, "value", {}, void 0, !0)
870
+ G("strong", fo, [
871
+ M(t.$slots, "value", {}, void 0, !0)
872
872
  ])
873
873
  ]));
874
874
  }
875
875
  });
876
- const po = /* @__PURE__ */ Q(vo, [["__scopeId", "data-v-4f995c3c"]]), fo = (e) => (qt("data-v-57f370fa"), e = e(), en(), e), ho = { class: "lume-tooltip__items" }, mo = {
876
+ const ho = /* @__PURE__ */ Q(mo, [["__scopeId", "data-v-4f995c3c"]]), go = (e) => (nn("data-v-8ec11304"), e = e(), on(), e), _o = { class: "lume-tooltip__items" }, yo = {
877
877
  key: 0,
878
878
  class: "lume-tooltip__break"
879
- }, go = /* @__PURE__ */ fo(() => /* @__PURE__ */ G("hr", null, null, -1)), _o = [
880
- go
881
- ], yo = /* @__PURE__ */ Z({
879
+ }, ko = /* @__PURE__ */ go(() => /* @__PURE__ */ G("hr", null, null, -1)), bo = [
880
+ ko
881
+ ], Ao = /* @__PURE__ */ Z({
882
882
  __name: "lume-tooltip",
883
883
  props: {
884
884
  targetElement: {
@@ -892,7 +892,7 @@ const po = /* @__PURE__ */ Q(vo, [["__scopeId", "data-v-4f995c3c"]]), fo = (e) =
892
892
  position: {
893
893
  type: String,
894
894
  default: "auto",
895
- validator: (e) => En.includes(e)
895
+ validator: (e) => Hn.includes(e)
896
896
  },
897
897
  fixedPositioning: {
898
898
  type: Boolean,
@@ -912,9 +912,9 @@ const po = /* @__PURE__ */ Q(vo, [["__scopeId", "data-v-4f995c3c"]]), fo = (e) =
912
912
  },
913
913
  ...we()
914
914
  },
915
- emits: ["opened", "moved", "closed"],
915
+ emits: ["opened", "moved", "closed", "tooltip-mouseenter", "tooltip-mouseleave"],
916
916
  setup(e, { emit: t }) {
917
- const n = e, o = C(null), { items: r, options: a } = q(n), u = oe(), s = C(null), { allOptions: i } = ce(a), c = p(
917
+ const n = e, o = R(null), { items: r, options: a } = q(n), u = oe(), s = R(null), { allOptions: i } = ce(a), c = p(
918
918
  () => i.value.fixedPositioning ?? n.fixedPositioning
919
919
  ), v = p(
920
920
  () => c.value ? "fixed" : "absolute"
@@ -931,140 +931,144 @@ const po = /* @__PURE__ */ Q(vo, [["__scopeId", "data-v-4f995c3c"]]), fo = (e) =
931
931
  options: { offset: [0, i.value.offset || 8] }
932
932
  },
933
933
  ...n.modifiers || []
934
- ]), h = p(
934
+ ]), m = p(
935
935
  () => i.value.showTitle !== !1 && n.title != null
936
- ), k = p(() => He(i.value.valueFormat)), m = p(() => He(i.value.titleFormat)), A = p(
936
+ ), y = p(() => He(i.value.valueFormat)), h = p(() => He(i.value.titleFormat)), A = p(
937
937
  () => {
938
- var N;
939
- return ((N = r.value) == null ? void 0 : N.find(($) => $.isSummary)) || {
938
+ var $;
939
+ return (($ = r.value) == null ? void 0 : $.find((w) => w.isSummary)) || {
940
940
  label: i.value.summary ?? n.summary
941
941
  };
942
942
  }
943
- ), f = p(() => u.summary || A.value.label);
944
- function y() {
945
- n.targetElement && o.value && (s.value = un(n.targetElement, o.value, {
943
+ ), O = p(() => u.summary || A.value.label);
944
+ function f() {
945
+ n.targetElement && o.value && (s.value = dn(n.targetElement, o.value, {
946
946
  placement: n.position,
947
947
  strategy: v.value,
948
948
  modifiers: d.value
949
949
  }), t("opened", n.targetElement));
950
950
  }
951
- function E() {
951
+ function x() {
952
952
  s.value && (s.value.destroy(), t("closed"));
953
953
  }
954
- function w() {
955
- s.value && (o.value.classList.add("lume-tooltip--animated"), n.targetElement ? function() {
954
+ function N() {
955
+ s.value && (i.value.withAnimation !== !1 && o.value.classList.add("lume-tooltip--animated"), n.targetElement ? function() {
956
956
  s.value.state.elements.reference = n.targetElement, s.value.update(), t("moved", n.targetElement);
957
- }() : E());
957
+ }() : x());
958
958
  }
959
959
  return X(
960
960
  () => n.targetElement,
961
- (N, $) => {
962
- !$ && N ? y() : w();
961
+ ($, w) => {
962
+ !w && $ ? f() : N();
963
963
  }
964
- ), pe(y), $t(E), (N, $) => Jt((_(), L("div", {
964
+ ), pe(f), xt(x), ($, w) => en((_(), L("div", {
965
965
  ref_key: "root",
966
966
  ref: o,
967
- class: "lume-tooltip lume-typography--caption",
968
- "data-j-tooltip": ""
967
+ class: ee(["lume-tooltip lume-typography--caption", {
968
+ "lume-tooltip--pointer-events": l(a).withPointerEvents
969
+ }]),
970
+ "data-j-tooltip": "",
971
+ onMouseenter: w[0] || (w[0] = (D) => t("tooltip-mouseenter")),
972
+ onMouseleave: w[1] || (w[1] = (D) => t("tooltip-mouseleave"))
969
973
  }, [
970
- R(N.$slots, "default", {}, () => [
971
- R(N.$slots, "title", {}, () => [
972
- l(h) ? (_(), W(l(no), { key: 0 }, {
974
+ M($.$slots, "default", {}, () => [
975
+ M($.$slots, "title", {}, () => [
976
+ l(m) ? (_(), W(l(ro), { key: 0 }, {
973
977
  default: V(() => [
974
- de(ee(l(m)(e.title)), 1)
978
+ de(te(l(h)(e.title)), 1)
975
979
  ]),
976
980
  _: 1
977
- })) : P("", !0)
981
+ })) : F("", !0)
978
982
  ], !0),
979
- G("ul", ho, [
980
- R(N.$slots, "summary", {}, () => [
981
- l(f) ? (_(), W(l(uo), { key: 0 }, ue({
983
+ G("ul", _o, [
984
+ M($.$slots, "summary", {}, () => [
985
+ l(O) ? (_(), W(l(co), { key: 0 }, ue({
982
986
  default: V(() => [
983
- de(ee(l(A).label) + " ", 1)
987
+ de(te(l(A).label) + " ", 1)
984
988
  ]),
985
989
  _: 2
986
990
  }, [
987
991
  l(A).value ? {
988
992
  name: "value",
989
993
  fn: V(() => [
990
- de(ee(l(k)(l(A).value)), 1)
994
+ de(te(l(y)(l(A).value)), 1)
991
995
  ]),
992
996
  key: "0"
993
997
  } : void 0
994
- ]), 1024)) : P("", !0)
998
+ ]), 1024)) : F("", !0)
995
999
  ], !0),
996
- l(f) ? (_(), L("li", mo, _o)) : P("", !0),
997
- R(N.$slots, "items", {}, () => [
998
- (_(!0), L(J, null, z(l(r), (H) => (_(), W(l(po), {
999
- key: H.label,
1000
- color: H.color
1000
+ l(O) ? (_(), L("li", yo, bo)) : F("", !0),
1001
+ M($.$slots, "items", {}, () => [
1002
+ (_(!0), L(J, null, z(l(r), (D) => (_(), W(l(ho), {
1003
+ key: D.label,
1004
+ color: D.color
1001
1005
  }, {
1002
1006
  label: V(() => [
1003
- de(ee(H.label), 1)
1007
+ de(te(D.label), 1)
1004
1008
  ]),
1005
1009
  value: V(() => [
1006
- de(ee(l(k)(H.value)), 1)
1010
+ de(te(l(y)(D.value)), 1)
1007
1011
  ]),
1008
1012
  _: 2
1009
1013
  }, 1032, ["color"]))), 128))
1010
1014
  ], !0)
1011
1015
  ])
1012
1016
  ], !0)
1013
- ], 512)), [
1014
- [Qt, e.targetElement]
1017
+ ], 34)), [
1018
+ [tn, e.targetElement]
1015
1019
  ]);
1016
1020
  }
1017
1021
  });
1018
- const ko = /* @__PURE__ */ Q(yo, [["__scopeId", "data-v-57f370fa"]]);
1022
+ const To = /* @__PURE__ */ Q(Ao, [["__scopeId", "data-v-8ec11304"]]);
1019
1023
  var me = /* @__PURE__ */ ((e) => (e.Categorical = "categorical", e.Sequential = "sequential", e.Divergent = "divergent", e))(me || {});
1020
- const bo = me.Categorical, Ee = re.Skyblue, Ao = Je.SkyTeal;
1021
- function To(e) {
1022
- return e === me.Divergent ? Ao : Ee;
1024
+ const Lo = me.Categorical, Ee = re.Skyblue, Oo = Qe.SkyTeal;
1025
+ function $o(e) {
1026
+ return e === me.Divergent ? Oo : Ee;
1023
1027
  }
1024
- function Lo(e) {
1025
- return Object.values(Qe).includes(e);
1028
+ function xo(e) {
1029
+ return Object.values(qe).includes(e);
1026
1030
  }
1027
- function pt(e, t) {
1028
- return t === me.Divergent ? Object.values(Je).includes(e) : Object.values({
1031
+ function ft(e, t) {
1032
+ return t === me.Divergent ? Object.values(Qe).includes(e) : Object.values({
1029
1033
  ...re,
1030
- ...Nt,
1031
1034
  ...Dt,
1032
- ...Qe
1035
+ ...Ht,
1036
+ ...qe
1033
1037
  }).includes(e);
1034
1038
  }
1035
- function Oo(e, t) {
1039
+ function wo(e, t) {
1036
1040
  const n = Object.values(re).indexOf(e);
1037
- return An(Object.values(re), n > -1 ? n : 0)[t];
1041
+ return On(Object.values(re), n > -1 ? n : 0)[t];
1038
1042
  }
1039
- function $o(e, t) {
1043
+ function Io(e, t) {
1040
1044
  const n = 50 + t * 10;
1041
1045
  return `${e}-${n}`;
1042
1046
  }
1043
- function xo(e, t) {
1047
+ function Eo(e, t) {
1044
1048
  const n = (t + 1) * 10;
1045
1049
  return `${e}-${n}`;
1046
1050
  }
1047
- function ft(e, t, n) {
1051
+ function mt(e, t, n) {
1048
1052
  switch (t) {
1049
1053
  default:
1050
1054
  case me.Categorical:
1051
- return Lo(e) ? e : Oo(e, n);
1055
+ return xo(e) ? e : wo(e, n);
1052
1056
  case me.Sequential:
1053
- return $o(e, n);
1057
+ return Io(e, n);
1054
1058
  case me.Divergent:
1055
- return xo(e, n);
1059
+ return Eo(e, n);
1056
1060
  }
1057
1061
  }
1058
- function wo(e, t, n = bo, o) {
1059
- return pt(e, n) ? e : (o > 4 && (ge(ve.ColorLoop), o = o % 5), pt(t, n) ? ft(t, n, o) : ft(To(n), n, o));
1062
+ function No(e, t, n = Lo, o) {
1063
+ return ft(e, n) ? e : (o > 4 && (he(ve.ColorLoop), o = o % 5), ft(t, n) ? mt(t, n, o) : mt($o(n), n, o));
1060
1064
  }
1061
- function Io(e) {
1062
- return e.map((t) => mn(t) ? t : { value: t });
1065
+ function Do(e) {
1066
+ return e.map((t) => yn(t) ? t : { value: t });
1063
1067
  }
1064
- function Eo(e) {
1068
+ function Ho(e) {
1065
1069
  return e.__internal === !0;
1066
1070
  }
1067
- const et = (e = null) => ({
1071
+ const tt = (e = null) => ({
1068
1072
  data: {
1069
1073
  type: Array,
1070
1074
  required: !0,
@@ -1083,33 +1087,33 @@ const et = (e = null) => ({
1083
1087
  default: null
1084
1088
  }
1085
1089
  });
1086
- function tt(e, t, n, o, r) {
1090
+ function nt(e, t, n, o, r) {
1087
1091
  const a = Re({
1088
1092
  width: 0,
1089
1093
  height: 0
1090
- }), u = Ln(12), s = p(() => {
1094
+ }), u = xn(12), s = p(() => {
1091
1095
  var v;
1092
- return e.value.length > 5 && ge(ve.DatasetLength), (v = e.value) == null ? void 0 : v.map(
1093
- (d, h) => {
1094
- if (Eo(d))
1096
+ return e.value.length > 5 && he(ve.DatasetLength), (v = e.value) == null ? void 0 : v.map(
1097
+ (d, m) => {
1098
+ if (Ho(d))
1095
1099
  return d;
1096
- const k = Io(d.values), m = wo(
1100
+ const y = Do(d.values), h = No(
1097
1101
  d.color,
1098
1102
  n == null ? void 0 : n.value,
1099
1103
  o == null ? void 0 : o.value.colorPalette,
1100
- h
1104
+ m
1101
1105
  );
1102
1106
  return {
1103
1107
  ...d,
1104
- values: k,
1105
- color: m,
1108
+ values: y,
1109
+ color: h,
1106
1110
  __internal: !0
1107
1111
  };
1108
1112
  }
1109
1113
  );
1110
- }), i = p(() => Array.isArray(t.value) ? t.value : Ve(e.value).map((v, d) => d));
1114
+ }), i = p(() => Array.isArray(t.value) ? t.value : Pe(e.value).map((v, d) => d));
1111
1115
  function c(v) {
1112
- const d = (r == null ? void 0 : r.value) === D.HORIZONTAL && Ve(e).length * (((o == null ? void 0 : o.value.barHeight) || ct) * 2) + ((o == null ? void 0 : o.value.barHeight) || ct) || v.height;
1116
+ const d = (r == null ? void 0 : r.value) === H.HORIZONTAL && Pe(e).length * (((o == null ? void 0 : o.value.barHeight) || dt) * 2) + ((o == null ? void 0 : o.value.barHeight) || dt) || v.height;
1113
1117
  a.width = v.width, a.height = d;
1114
1118
  }
1115
1119
  return {
@@ -1120,7 +1124,7 @@ function tt(e, t, n, o, r) {
1120
1124
  updateSize: c
1121
1125
  };
1122
1126
  }
1123
- const No = () => ({
1127
+ const Bo = () => ({
1124
1128
  xScale: {
1125
1129
  type: Function,
1126
1130
  default: null
@@ -1130,11 +1134,11 @@ const No = () => ({
1130
1134
  default: null
1131
1135
  }
1132
1136
  });
1133
- function Do(e, t, n, o, r) {
1134
- const a = C(null), u = C(null);
1137
+ function Ro(e, t, n, o, r) {
1138
+ const a = R(null), u = R(null);
1135
1139
  function s() {
1136
1140
  const { width: i, height: c } = n;
1137
- !i && !c || !t.value || !e.value || (o.value === D.HORIZONTAL ? (a.value = mt(
1141
+ !i && !c || !t.value || !e.value || (o.value === H.HORIZONTAL ? (a.value = gt(
1138
1142
  e.value,
1139
1143
  i,
1140
1144
  o.value,
@@ -1149,49 +1153,49 @@ function Do(e, t, n, o, r) {
1149
1153
  i,
1150
1154
  o.value,
1151
1155
  r.value
1152
- ), u.value = mt(
1156
+ ), u.value = gt(
1153
1157
  e.value,
1154
1158
  c,
1155
1159
  o.value,
1156
1160
  r.value.startOnZero
1157
1161
  )));
1158
1162
  }
1159
- return xt(s), { xScale: a, yScale: u };
1163
+ return wt(s), { xScale: a, yScale: u };
1160
1164
  }
1161
1165
  function ht(e, t, n, o) {
1162
- const r = [0, t], { padding: a, paddingInner: u, paddingOuter: s } = o, i = a ?? (n === D.HORIZONTAL ? Rt : Bt);
1166
+ const r = [0, t], { padding: a, paddingInner: u, paddingOuter: s } = o, i = a ?? (n === H.HORIZONTAL ? Mt : Rt);
1163
1167
  return Object.assign(
1164
1168
  $e().range(r).paddingInner(u ?? i).paddingOuter(s ?? i).domain(e.map((c, v) => v)),
1165
1169
  { labels: e }
1166
1170
  );
1167
1171
  }
1168
- function mt(e, t, n, o) {
1169
- const r = It(e).filter((v) => v != null), a = [0, t];
1172
+ function gt(e, t, n, o) {
1173
+ const r = Et(e).filter((v) => v != null), a = [0, t];
1170
1174
  if (r.length === 0)
1171
1175
  return xe().range(a).domain([0, 0]).nice();
1172
- const u = Math.min(...r), s = o && u > 0 ? 0 : u, i = Math.max(...r), c = n === D.HORIZONTAL ? [s, i] : [i, s];
1176
+ const u = Math.min(...r), s = o && u > 0 ? 0 : u, i = Math.max(...r), c = n === H.HORIZONTAL ? [s, i] : [i, s];
1173
1177
  return xe().range(a).domain(c).nice();
1174
1178
  }
1175
- function gt(e) {
1179
+ function _t(e) {
1176
1180
  return (e == null ? void 0 : e.range) !== void 0 || (e == null ? void 0 : e.copy) !== void 0;
1177
1181
  }
1178
- function Pe(e, t) {
1179
- return ye(e) ? e.bandwidth() / 2 + e(e.domain()[t]) : e(t);
1182
+ function ze(e, t) {
1183
+ return _e(e) ? e.bandwidth() / 2 + e(e.domain()[t]) : e(t);
1180
1184
  }
1181
- function _t(e, t, {
1185
+ function yt(e, t, {
1182
1186
  padding: n,
1183
1187
  paddingInner: o,
1184
1188
  paddingOuter: r
1185
1189
  } = {}) {
1186
- const a = n ?? (t === D.HORIZONTAL ? Rt : Bt);
1190
+ const a = n ?? (t === H.HORIZONTAL ? Mt : Rt);
1187
1191
  return e.copy().paddingInner(o ?? a).paddingOuter(r ?? a);
1188
1192
  }
1189
- function jt(e) {
1190
- return Object.values(D).includes(e);
1193
+ function Vt(e) {
1194
+ return Object.values(H).includes(e);
1191
1195
  }
1192
- const Te = (e, t = !0) => ({
1193
- ...et(e),
1194
- ...No(),
1196
+ const Le = (e, t = !0) => ({
1197
+ ...tt(e),
1198
+ ...Bo(),
1195
1199
  ...we(),
1196
1200
  classList: {
1197
1201
  type: [String, Array],
@@ -1204,18 +1208,18 @@ const Te = (e, t = !0) => ({
1204
1208
  ...t ? {
1205
1209
  orientation: {
1206
1210
  type: String,
1207
- default: D.VERTICAL,
1208
- validator: jt
1211
+ default: H.VERTICAL,
1212
+ validator: Vt
1209
1213
  }
1210
1214
  } : {}
1211
- }), Ho = (e) => ({
1212
- ...et(e),
1215
+ }), Mo = (e) => ({
1216
+ ...tt(e),
1213
1217
  ...we(),
1214
1218
  hoveredElement: {
1215
1219
  type: [Number, String],
1216
1220
  default: null
1217
1221
  }
1218
- }), Ce = () => ({
1222
+ }), Se = () => ({
1219
1223
  data: {
1220
1224
  type: Array,
1221
1225
  required: !0
@@ -1230,8 +1234,8 @@ const Te = (e, t = !0) => ({
1230
1234
  },
1231
1235
  orientation: {
1232
1236
  type: String,
1233
- default: D.VERTICAL,
1234
- validator: jt
1237
+ default: H.VERTICAL,
1238
+ validator: Vt
1235
1239
  },
1236
1240
  xScale: {
1237
1241
  type: Function,
@@ -1257,51 +1261,51 @@ const Te = (e, t = !0) => ({
1257
1261
  type: [String, Array],
1258
1262
  default: () => []
1259
1263
  }
1260
- }), Bo = { class: "lume-overlay-group" }, Ro = /* @__PURE__ */ Z({
1264
+ }), So = { class: "lume-overlay-group" }, Co = /* @__PURE__ */ Z({
1261
1265
  __name: "lume-overlay-group",
1262
1266
  props: {
1263
- ...Ce(),
1267
+ ...Se(),
1264
1268
  orientation: {
1265
1269
  type: String,
1266
- default: D.VERTICAL
1270
+ default: H.VERTICAL
1267
1271
  }
1268
1272
  },
1269
1273
  emits: ["click", "lume__internal--hover", "mouseover"],
1270
1274
  setup(e, { emit: t }) {
1271
- const n = e, { data: o, orientation: r, xScale: a, yScale: u } = q(n), s = p(() => Ve(o));
1275
+ const n = e, { data: o, orientation: r, xScale: a, yScale: u } = q(n), s = p(() => Pe(o));
1272
1276
  function i(c) {
1273
- var f;
1274
- const v = r.value === D.HORIZONTAL ? u.value : a.value, d = v.domain(), h = gn(v), k = ((f = v.paddingInner) == null ? void 0 : f.call(v)) ?? 0, m = h * k, A = ye(v) ? v(d[c]) - m / 2 : v(c) - h / 2;
1275
- return r.value === D.HORIZONTAL ? {
1277
+ var O;
1278
+ const v = r.value === H.HORIZONTAL ? u.value : a.value, d = v.domain(), m = kn(v), y = ((O = v.paddingInner) == null ? void 0 : O.call(v)) ?? 0, h = m * y, A = _e(v) ? v(d[c]) - h / 2 : v(c) - m / 2;
1279
+ return r.value === H.HORIZONTAL ? {
1276
1280
  width: Math.max(...a.value.range()),
1277
- height: h,
1281
+ height: m,
1278
1282
  transform: `translate(0, ${A})`
1279
1283
  } : {
1280
- width: h,
1284
+ width: m,
1281
1285
  height: Math.max(...u.value.range()),
1282
1286
  transform: `translate(${A}, 0)`
1283
1287
  };
1284
1288
  }
1285
- return (c, v) => (_(), L("g", Bo, [
1286
- (_(!0), L(J, null, z(l(s), (d, h) => (_(), W(l(qe), M(i(h), {
1287
- key: `overlay-${h}`,
1288
- "data-j-lume-overlay-group": h,
1289
+ return (c, v) => (_(), L("g", So, [
1290
+ (_(!0), L(J, null, z(l(s), (d, m) => (_(), W(l(et), C(i(m), {
1291
+ key: `overlay-${m}`,
1292
+ "data-j-lume-overlay-group": m,
1289
1293
  transition: !1,
1290
1294
  "class-list": "lume-fill--transparent",
1291
- onMouseover: (k) => t("lume__internal--hover", h),
1292
- onClick: (k) => t("click", { index: h, event: k })
1295
+ onMouseover: (y) => t("lume__internal--hover", m),
1296
+ onClick: (y) => t("click", { index: m, event: y })
1293
1297
  }), null, 16, ["data-j-lume-overlay-group", "onMouseover", "onClick"]))), 128))
1294
1298
  ]));
1295
1299
  }
1296
1300
  });
1297
- function So(e) {
1301
+ function Go(e) {
1298
1302
  return { hasNegativeValues: p(
1299
- () => It(e.value).some((n) => n < 0)
1303
+ () => Et(e.value).some((n) => n < 0)
1300
1304
  ) };
1301
1305
  }
1302
- function Co(e, t, n, o) {
1306
+ function jo(e, t, n, o) {
1303
1307
  const r = p(
1304
- () => o.value === D.HORIZONTAL
1308
+ () => o.value === H.HORIZONTAL
1305
1309
  ), a = p(
1306
1310
  () => {
1307
1311
  var c;
@@ -1324,19 +1328,19 @@ function Co(e, t, n, o) {
1324
1328
  transform: s.value
1325
1329
  })) };
1326
1330
  }
1327
- function Mo(e) {
1331
+ function Vo(e) {
1328
1332
  return e.reduce((t, n) => n.values.map((o, r) => t[r] ? o.value > t[r] ? o.value : t[r] : o.value ?? 0), []);
1329
1333
  }
1330
- function Go(e) {
1334
+ function Po(e) {
1331
1335
  return e.reduce((t, n) => n.values.map((o, r) => {
1332
1336
  const a = o.value == null || o.value < 0 ? 0 : o.value;
1333
1337
  return t[r] ? t[r] + a : a;
1334
1338
  }), []);
1335
1339
  }
1336
- const yt = {
1337
- "stacked-bar": Go
1340
+ const kt = {
1341
+ "stacked-bar": Po
1338
1342
  };
1339
- function Vt(e, t, n, o, r, a, u) {
1343
+ function Pt(e, t, n, o, r, a, u) {
1340
1344
  const s = p(
1341
1345
  () => {
1342
1346
  var c;
@@ -1344,10 +1348,10 @@ function Vt(e, t, n, o, r, a, u) {
1344
1348
  }
1345
1349
  );
1346
1350
  function i(c) {
1347
- const v = u != null && u.value && yt[u.value] ? yt[u.value](c) : Mo(c);
1348
- e.value = v.map((d, h) => ({
1349
- cx: (r == null ? void 0 : r.value) === D.HORIZONTAL ? n.value(d) : Pe(n.value, h),
1350
- cy: (r == null ? void 0 : r.value) === D.HORIZONTAL ? Pe(o.value, h) : o.value(d)
1351
+ const v = u != null && u.value && kt[u.value] ? kt[u.value](c) : Vo(c);
1352
+ e.value = v.map((d, m) => ({
1353
+ cx: (r == null ? void 0 : r.value) === H.HORIZONTAL ? n.value(d) : ze(n.value, m),
1354
+ cy: (r == null ? void 0 : r.value) === H.HORIZONTAL ? ze(o.value, m) : o.value(d)
1351
1355
  }));
1352
1356
  }
1353
1357
  return X(
@@ -1358,7 +1362,7 @@ function Vt(e, t, n, o, r, a, u) {
1358
1362
  { immediate: !0 }
1359
1363
  ), { shouldGenerateTooltipAnchors: s, updateTooltipAnchorAttributes: i };
1360
1364
  }
1361
- function jo() {
1365
+ function Fo() {
1362
1366
  const e = Re({
1363
1367
  opened: !1,
1364
1368
  targetElement: null
@@ -1369,339 +1373,354 @@ function jo() {
1369
1373
  e.opened = !1, e.targetElement = null;
1370
1374
  } };
1371
1375
  }
1372
- function Vo(e) {
1376
+ function zo(e) {
1373
1377
  return { getTooltipItems: p(
1374
1378
  () => (n) => e.value.map(({ color: o, label: r, values: a }) => {
1375
1379
  var u, s, i;
1376
1380
  return {
1377
1381
  color: ((u = a[n]) == null ? void 0 : u.color) || o,
1378
1382
  label: r,
1379
- value: ((s = a[n]) == null ? void 0 : s.label) ?? ((i = a[n]) == null ? void 0 : i.value) ?? Ht
1383
+ value: ((s = a[n]) == null ? void 0 : s.label) ?? ((i = a[n]) == null ? void 0 : i.value) ?? Bt
1380
1384
  };
1381
1385
  })
1382
1386
  ) };
1383
1387
  }
1384
- const ze = 16, Ze = 8, We = 28, Ue = 24, _e = {
1388
+ const Ze = 16, We = 8, Ue = 28, Xe = 24, ge = {
1385
1389
  VERTICAL: {
1386
- top: ze,
1387
- right: Ze,
1388
- bottom: We,
1389
- left: Ue
1390
+ top: Ze,
1391
+ right: We,
1392
+ bottom: Ue,
1393
+ left: Xe
1390
1394
  },
1391
1395
  HORIZONTAL: {
1392
- top: ze,
1393
- right: Ze,
1394
- bottom: We,
1395
- left: Ue
1396
+ top: Ze,
1397
+ right: We,
1398
+ bottom: Ue,
1399
+ left: Xe
1396
1400
  }
1397
1401
  };
1398
- function Fo(e) {
1399
- return !e || e === "auto" || e.top == null || e.top === "auto" ? ze : e.top;
1402
+ function Zo(e) {
1403
+ return !e || e === "auto" || e.top == null || e.top === "auto" ? Ze : e.top;
1400
1404
  }
1401
- function Po(e) {
1402
- return !e || e === "auto" || e.right == null || e.right === "auto" ? Ze : e.right;
1405
+ function Wo(e) {
1406
+ return !e || e === "auto" || e.right == null || e.right === "auto" ? We : e.right;
1403
1407
  }
1404
- function zo(e, t) {
1405
- return !e || e === "auto" || e.bottom == null || e.bottom === "auto" ? t || We : e.bottom;
1408
+ function Uo(e, t) {
1409
+ return !e || e === "auto" || e.bottom == null || e.bottom === "auto" ? t || Ue : e.bottom;
1406
1410
  }
1407
- function Zo(e, t) {
1408
- return !e || e === "auto" || e.left == null || e.left === "auto" ? t || Ue : e.left;
1411
+ function Xo(e, t) {
1412
+ return !e || e === "auto" || e.left == null || e.left === "auto" ? t || Xe : e.left;
1409
1413
  }
1410
- const Wo = { class: "lume-chart__header" }, Uo = { class: "lume-chart__header-section" }, Xo = {
1414
+ const Yo = { class: "lume-chart__header" }, Ko = { class: "lume-chart__header-section" }, Jo = {
1411
1415
  key: 0,
1412
1416
  class: "lume-chart__title lume-chart-title lume-typography--display"
1413
- }, Yo = { class: "lume-chart__controls" }, Ko = { class: "lume-chart__header-section" }, Jo = {
1417
+ }, Qo = { class: "lume-chart__controls" }, qo = { class: "lume-chart__header-section" }, ea = {
1414
1418
  key: 0,
1415
1419
  class: "lume-chart__axis-title lume-axis-title lume-typography--body"
1416
- }, Qo = { key: 3 }, qo = ["r"], ea = {
1420
+ }, ta = { key: 3 }, na = ["r"], oa = {
1417
1421
  key: 0,
1418
1422
  class: "lume-chart__axis-title lume-chart__axis-title--centered lume-axis-title lume-typography--body"
1419
- }, ta = /* @__PURE__ */ Z({
1423
+ }, aa = /* @__PURE__ */ Z({
1420
1424
  __name: "lume-chart",
1421
1425
  props: {
1422
- ...Te(),
1426
+ ...Le(),
1423
1427
  chartType: {
1424
1428
  type: String,
1425
1429
  default: null
1426
1430
  }
1427
1431
  },
1428
1432
  setup(e, { emit: t }) {
1429
- const n = e, o = oe(), { data: r, labels: a, color: u, options: s, orientation: i, chartType: c } = q(n), v = C(-1), d = C(null), h = C(null), k = C([]), m = C(0), A = C(0), { allOptions: f } = ce(s), { internalData: y, computedLabels: E, containerSize: w, updateSize: N, chartID: $ } = tt(r, a, u, f, i), { xScale: H, yScale: S } = Do(
1430
- y,
1431
- E,
1432
- w,
1433
+ const n = e, o = oe(), { data: r, labels: a, color: u, options: s, orientation: i, chartType: c } = q(n), v = R(-1), d = R(null), m = R(null), y = R([]), h = R(null), A = R(0), O = R(0), { allOptions: f } = ce(s), { internalData: x, computedLabels: N, containerSize: $, updateSize: w, chartID: D } = nt(r, a, u, f, i), { xScale: S, yScale: Y } = Ro(
1434
+ x,
1435
+ N,
1436
+ $,
1433
1437
  i,
1434
1438
  f
1435
- ), Y = p(() => ({
1436
- top: Fo(f.value.margins),
1437
- right: Po(f.value.margins),
1438
- bottom: zo(f.value.margins, m.value),
1439
- left: Zo(f.value.margins, A.value)
1440
- })), K = p(() => {
1441
- var O;
1442
- return n.xScale ? gt(n.xScale) ? n.xScale : (O = n.xScale) == null ? void 0 : O.call(n, y.value, a.value, w) : H.value;
1443
- }), F = p(() => {
1444
- var O;
1445
- return n.yScale ? gt(n.yScale) ? n.yScale : (O = n.yScale) == null ? void 0 : O.call(n, y.value, a.value, w) : S.value;
1446
- }), ne = p(() => ({
1439
+ ), ne = p(() => ({
1440
+ top: Zo(f.value.margins),
1441
+ right: Wo(f.value.margins),
1442
+ bottom: Uo(f.value.margins, A.value),
1443
+ left: Xo(f.value.margins, O.value)
1444
+ })), P = p(() => {
1445
+ var T;
1446
+ return n.xScale ? _t(n.xScale) ? n.xScale : (T = n.xScale) == null ? void 0 : T.call(n, x.value, a.value, $) : S.value;
1447
+ }), K = p(() => {
1448
+ var T;
1449
+ return n.yScale ? _t(n.yScale) ? n.yScale : (T = n.yScale) == null ? void 0 : T.call(n, x.value, a.value, $) : Y.value;
1450
+ }), ke = p(() => ({
1447
1451
  ...f.value.xAxisOptions,
1448
- withHover: i.value === D.VERTICAL
1452
+ withHover: i.value === H.VERTICAL
1449
1453
  })), be = p(() => ({
1450
1454
  ...f.value.yAxisOptions,
1451
- withHover: i.value === D.HORIZONTAL
1455
+ withHover: i.value === H.HORIZONTAL
1452
1456
  })), fe = p(() => {
1453
- var O;
1454
- return (O = f.value.xAxisOptions) == null ? void 0 : O.title;
1455
- }), he = p(() => {
1456
- var O;
1457
- return (O = f.value.yAxisOptions) == null ? void 0 : O.title;
1457
+ var T;
1458
+ return (T = f.value.xAxisOptions) == null ? void 0 : T.title;
1458
1459
  }), B = p(() => {
1459
- var O;
1460
- return ((O = f.value.xAxisOptions) == null ? void 0 : O.withTitle) !== !1 && fe.value;
1461
- }), b = p(() => {
1462
- var O;
1463
- return ((O = f.value.yAxisOptions) == null ? void 0 : O.withTitle) !== !1 && he.value;
1464
- }), I = p(
1465
- () => r.value.every((O) => !O.values.length)
1466
- ), g = p(() => {
1467
- const O = [], { noBaseScales: T } = f.value;
1468
- return T || O.push(() => !!(K.value && F.value)), O.every((x) => x() === !0);
1469
- }), { hasNegativeValues: j } = So(y), { negativeBarAttributes: U } = Co(
1470
- w,
1460
+ var T;
1461
+ return (T = f.value.yAxisOptions) == null ? void 0 : T.title;
1462
+ }), k = p(() => {
1463
+ var T;
1464
+ return ((T = f.value.xAxisOptions) == null ? void 0 : T.withTitle) !== !1 && fe.value;
1465
+ }), E = p(() => {
1466
+ var T;
1467
+ return ((T = f.value.yAxisOptions) == null ? void 0 : T.withTitle) !== !1 && B.value;
1468
+ }), g = p(
1469
+ () => r.value.every((T) => !T.values.length)
1470
+ ), j = p(() => {
1471
+ const T = [], { noBaseScales: b } = f.value;
1472
+ return b || T.push(() => !!(P.value && K.value)), T.every((I) => I() === !0);
1473
+ }), { hasNegativeValues: U } = Go(x), { negativeBarAttributes: le } = jo(
1474
+ $,
1475
+ P,
1471
1476
  K,
1472
- F,
1473
1477
  i
1474
- ), { shouldGenerateTooltipAnchors: le } = Vt(
1475
- k,
1478
+ ), { shouldGenerateTooltipAnchors: Ce } = Pt(
1479
+ y,
1476
1480
  f,
1481
+ P,
1477
1482
  K,
1478
- F,
1479
1483
  i,
1480
- y,
1484
+ x,
1481
1485
  c
1482
- ), { tooltipConfig: Oe, showTooltip: ot, hideTooltip: Ne } = jo(), { getTooltipItems: at } = Vo(y), Xt = p(
1483
- () => f.value.withTooltip !== !1 && Oe.opened
1486
+ ), { tooltipConfig: Ae, showTooltip: Ne, hideTooltip: Yt } = Fo(), { getTooltipItems: at } = zo(x), Kt = p(
1487
+ () => f.value.withTooltip !== !1 && Ae.opened
1484
1488
  ), rt = p(
1485
1489
  () => {
1486
- var O;
1487
- return ((O = f.value.tooltipOptions) == null ? void 0 : O.position) || "top";
1490
+ var T;
1491
+ return ((T = f.value.tooltipOptions) == null ? void 0 : T.position) || "top";
1488
1492
  }
1489
- );
1490
- function De(O) {
1491
- var T;
1492
- if (O !== v.value && (f.value.withHover !== !1 && (v.value = O), f.value.withTooltip !== !1)) {
1493
- const x = (T = f.value.tooltipOptions) != null && T.targetElement ? f.value.tooltipOptions.targetElement === "self" ? h.value.$el : f.value.tooltipOptions.targetElement : d.value[O];
1494
- ot(x);
1493
+ ), Jt = p(() => {
1494
+ var b;
1495
+ const T = (b = f.value.tooltipOptions) == null ? void 0 : b.withPointerEvents;
1496
+ return Ae.opened && (!T || T && h.value === !1);
1497
+ });
1498
+ function De(T) {
1499
+ var b;
1500
+ if (T !== v.value && (f.value.withHover !== !1 && (v.value = T), f.value.withTooltip !== !1)) {
1501
+ const I = (b = f.value.tooltipOptions) != null && b.targetElement ? f.value.tooltipOptions.targetElement === "self" ? m.value.$el : f.value.tooltipOptions.targetElement : d.value[T];
1502
+ Ne(I);
1495
1503
  }
1496
1504
  }
1497
- function lt(O) {
1498
- if (O > r.value[0].values.length - 1) {
1499
- ge(ve.InvalidHoveredIndex);
1505
+ function lt() {
1506
+ Yt(), v.value = -1;
1507
+ }
1508
+ function ut(T) {
1509
+ if (T > r.value[0].values.length - 1) {
1510
+ he(ve.InvalidHoveredIndex);
1500
1511
  return;
1501
1512
  }
1502
- De(O);
1513
+ De(T);
1503
1514
  }
1504
- function Yt() {
1505
- Ne(), v.value = -1, t("chart-mouseleave");
1515
+ function Qt() {
1516
+ setTimeout(() => {
1517
+ Jt.value && lt(), t("chart-mouseleave");
1518
+ }, 0);
1506
1519
  }
1507
- function ut({ index: O, value: T, event: x }) {
1508
- O !== null && De(O), t("axis-mouseenter", { index: O, value: T, event: x });
1520
+ function it({ index: T, value: b, event: I }) {
1521
+ T !== null && De(T), t("axis-mouseenter", { index: T, value: b, event: I });
1509
1522
  }
1510
- function it({ index: O, value: T, event: x }) {
1511
- t("axis-click", { index: O, value: T, event: x });
1523
+ function st({ index: T, value: b, event: I }) {
1524
+ t("axis-click", { index: T, value: b, event: I });
1512
1525
  }
1513
1526
  return X(
1514
1527
  r,
1515
- (O, T) => t("data-changed", { newValue: O, oldValue: T })
1528
+ (T, b) => t("data-changed", { newValue: T, oldValue: b })
1516
1529
  ), X(
1517
1530
  a,
1518
- (O, T) => t("labels-changed", { newValue: O, oldValue: T })
1519
- ), X(I, (O) => O && ge(ve.Empty), { immediate: !0 }), X(() => n.hoveredIndex, lt), X(
1520
- k,
1521
- (O) => {
1522
- O && n.hoveredIndex != null && v.value === -1 && lt(n.hoveredIndex);
1531
+ (T, b) => t("labels-changed", { newValue: T, oldValue: b })
1532
+ ), X(g, (T) => T && he(ve.Empty), { immediate: !0 }), X(() => n.hoveredIndex, ut), X(
1533
+ y,
1534
+ (T) => {
1535
+ T && n.hoveredIndex != null && v.value === -1 && ut(n.hoveredIndex);
1523
1536
  },
1524
1537
  { flush: "post" }
1525
- ), pe(() => {
1538
+ ), X(h, (T) => {
1539
+ T === !1 && Ae.opened && lt();
1540
+ }), pe(() => {
1526
1541
  t("rendered"), o.groups || console.error('"groups" `<slot>` must have content.');
1527
- }), Me("chartID", $), Me("isEmpty", I), Me("tooltipAnchorAttributes", k), (O, T) => (_(), W(l(Kn), {
1528
- id: `lume-chart_${l($)}`,
1542
+ }), Ge("chartID", D), Ge("isEmpty", g), Ge("tooltipAnchorAttributes", y), (T, b) => (_(), W(l(qn), {
1543
+ id: `lume-chart_${l(D)}`,
1529
1544
  ref_key: "chartContainer",
1530
- ref: h,
1531
- margins: l(Y),
1532
- "container-size": l(w),
1545
+ ref: m,
1546
+ margins: l(ne),
1547
+ "container-size": l($),
1533
1548
  "no-min-size": l(f).noMinSize,
1534
1549
  "transparent-background": l(f).transparentBackground,
1535
1550
  "data-j-lume-chart": "",
1536
- onResize: l(N),
1537
- onClick: T[22] || (T[22] = (x) => t("chart-click", x)),
1538
- onMouseenter: T[23] || (T[23] = (x) => t("chart-mouseenter", x)),
1539
- onMouseleave: Yt
1551
+ onResize: l(w),
1552
+ onClick: b[24] || (b[24] = (I) => t("chart-click", I)),
1553
+ onMouseenter: b[25] || (b[25] = (I) => t("chart-mouseenter", I)),
1554
+ onMouseleave: Qt
1540
1555
  }, {
1541
1556
  header: V(() => [
1542
- G("div", Wo, [
1543
- G("div", Uo, [
1544
- O.title ? (_(), L("h1", Xo, ee(O.title), 1)) : P("", !0),
1545
- G("div", Yo, [
1546
- R(O.$slots, "controls", {}, void 0, !0)
1557
+ G("div", Yo, [
1558
+ G("div", Ko, [
1559
+ T.title ? (_(), L("h1", Jo, te(T.title), 1)) : F("", !0),
1560
+ G("div", Qo, [
1561
+ M(T.$slots, "controls", {}, void 0, !0)
1547
1562
  ])
1548
1563
  ]),
1549
- G("div", Ko, [
1550
- l(b) ? (_(), L("h3", Jo, ee(l(he)), 1)) : P("", !0),
1551
- R(O.$slots, "legend", { data: l(y) }, () => [
1552
- l(f).withLegend !== !1 && l(f).legendPosition !== "bottom" ? (_(), W(l(vt), {
1564
+ G("div", qo, [
1565
+ l(E) ? (_(), L("h3", ea, te(l(B)), 1)) : F("", !0),
1566
+ M(T.$slots, "legend", { data: l(x) }, () => [
1567
+ l(f).withLegend !== !1 && l(f).legendPosition !== "bottom" ? (_(), W(l(pt), {
1553
1568
  key: 0,
1554
- data: l(y),
1569
+ data: l(x),
1555
1570
  class: "lume-chart__legend",
1556
1571
  "data-j-lume-chart__legend": "",
1557
- onClick: T[0] || (T[0] = (x) => t("legend-click", x)),
1558
- onMouseenter: T[1] || (T[1] = (x) => t("legend-mouseenter", x)),
1559
- onMouseleave: T[2] || (T[2] = (x) => t("legend-mouseleave"))
1560
- }, null, 8, ["data"])) : P("", !0)
1572
+ onClick: b[0] || (b[0] = (I) => t("legend-click", I)),
1573
+ onMouseenter: b[1] || (b[1] = (I) => t("legend-mouseenter", I)),
1574
+ onMouseleave: b[2] || (b[2] = (I) => t("legend-mouseleave"))
1575
+ }, null, 8, ["data"])) : F("", !0)
1561
1576
  ], !0)
1562
1577
  ])
1563
1578
  ])
1564
1579
  ]),
1565
1580
  footer: V(() => [
1566
- l(B) ? (_(), L("h3", ea, ee(l(fe)), 1)) : P("", !0),
1567
- l(f).withLegend !== !1 && l(f).legendPosition == "bottom" ? (_(), W(l(vt), {
1581
+ l(k) ? (_(), L("h3", oa, te(l(fe)), 1)) : F("", !0),
1582
+ l(f).withLegend !== !1 && l(f).legendPosition == "bottom" ? (_(), W(l(pt), {
1568
1583
  key: 1,
1569
- data: l(y),
1584
+ data: l(x),
1570
1585
  class: "lume-chart__legend lume-chart__legend--bottom",
1571
1586
  "data-j-lume-chart__legend": "",
1572
- onClick: T[16] || (T[16] = (x) => t("legend-click", x)),
1573
- onMouseenter: T[17] || (T[17] = (x) => t("legend-mouseenter", x)),
1574
- onMouseleave: T[18] || (T[18] = (x) => t("legend-mouseleave"))
1575
- }, null, 8, ["data"])) : P("", !0)
1587
+ onClick: b[16] || (b[16] = (I) => t("legend-click", I)),
1588
+ onMouseenter: b[17] || (b[17] = (I) => t("legend-mouseenter", I)),
1589
+ onMouseleave: b[18] || (b[18] = (I) => t("legend-mouseleave"))
1590
+ }, null, 8, ["data"])) : F("", !0)
1576
1591
  ]),
1577
1592
  extra: V(() => [
1578
- R(O.$slots, "tooltip", M(l(Oe), {
1579
- data: l(y),
1580
- labels: l(E),
1581
- title: l(E)[v.value],
1593
+ M(T.$slots, "tooltip", C(l(Ae), {
1594
+ data: l(x),
1595
+ labels: l(N),
1596
+ title: l(N)[v.value],
1582
1597
  items: l(at)(v.value),
1583
1598
  position: l(rt),
1584
1599
  withTooltip: l(f).withTooltip !== !1,
1585
1600
  hoveredIndex: v.value,
1601
+ handleMouseEnter: () => h.value = !0,
1602
+ handleMouseLeave: () => h.value = !1,
1586
1603
  options: l(f).tooltipOptions
1587
1604
  }), () => [
1588
- l(Xt) ? (_(), W(l(ko), M({ key: 0 }, l(Oe), {
1605
+ l(Kt) ? (_(), W(l(To), C({ key: 0 }, l(Ae), {
1589
1606
  position: l(rt),
1590
- title: l(E)[v.value],
1607
+ title: l(N)[v.value],
1591
1608
  items: l(at)(v.value),
1592
1609
  options: l(f).tooltipOptions,
1593
1610
  "data-j-lume-chart__tooltip": "",
1594
- onOpened: T[19] || (T[19] = (x) => t("tooltip-opened", {
1611
+ onOpened: b[19] || (b[19] = (I) => t("tooltip-opened", {
1595
1612
  index: v.value,
1596
- targetElement: x
1613
+ targetElement: I
1597
1614
  })),
1598
- onMoved: T[20] || (T[20] = (x) => t("tooltip-moved", {
1615
+ onMoved: b[20] || (b[20] = (I) => t("tooltip-moved", {
1599
1616
  index: v.value,
1600
- targetElement: x
1617
+ targetElement: I
1601
1618
  })),
1602
- onClosed: T[21] || (T[21] = (x) => t("tooltip-closed"))
1619
+ onClosed: b[21] || (b[21] = (I) => t("tooltip-closed")),
1620
+ onTooltipMouseenter: b[22] || (b[22] = (I) => h.value = !0),
1621
+ onTooltipMouseleave: b[23] || (b[23] = (I) => h.value = !1)
1603
1622
  }), {
1604
1623
  default: V(() => [
1605
- R(O.$slots, "tooltip-content", {
1606
- data: l(y),
1607
- labels: l(E),
1624
+ M(T.$slots, "tooltip-content", {
1625
+ data: l(x),
1626
+ labels: l(N),
1608
1627
  hoveredIndex: v.value
1609
1628
  }, void 0, !0)
1610
1629
  ]),
1611
1630
  _: 3
1612
- }, 16, ["position", "title", "items", "options"])) : P("", !0)
1631
+ }, 16, ["position", "title", "items", "options"])) : F("", !0)
1613
1632
  ], !0)
1614
1633
  ]),
1615
1634
  default: V(() => [
1616
- l(g) ? (_(), L(J, { key: 0 }, [
1617
- l(j) ? (_(), W(l(qe), M({ key: 0 }, l(U), {
1635
+ l(j) ? (_(), L(J, { key: 0 }, [
1636
+ l(U) ? (_(), W(l(et), C({ key: 0 }, l(le), {
1618
1637
  "class-list": "lume-fill--negative",
1619
1638
  transition: !1,
1620
1639
  "data-j-lume-chart__negative-values": ""
1621
- }), null, 16)) : P("", !0),
1622
- l(f).withAxes !== !1 ? R(O.$slots, "axes", {
1640
+ }), null, 16)) : F("", !0),
1641
+ l(f).withAxes !== !1 ? M(T.$slots, "axes", {
1623
1642
  key: 1,
1624
- xScale: l(K),
1625
- yScale: l(F),
1626
- containerSize: l(w),
1643
+ xScale: l(P),
1644
+ yScale: l(K),
1645
+ containerSize: l($),
1627
1646
  options: l(f),
1628
1647
  hoveredIndex: v.value
1629
1648
  }, () => [
1630
- ae(l(dt), {
1649
+ ae(l(vt), {
1631
1650
  type: "x",
1632
- scale: l(K),
1633
- "container-size": l(w),
1634
- options: l(ne),
1651
+ scale: l(P),
1652
+ "container-size": l($),
1653
+ options: l(ke),
1635
1654
  "hovered-index": v.value,
1636
1655
  orientation: l(i),
1637
1656
  "data-j-lume-chart__x-axis": "",
1638
- onClick: it,
1639
- onMouseenter: ut,
1640
- onMouseleave: T[3] || (T[3] = (x) => t("axis-mouseleave")),
1641
- "onLume__internal-AxisSize": T[4] || (T[4] = (x) => m.value = x)
1657
+ onClick: st,
1658
+ onMouseenter: it,
1659
+ onMouseleave: b[3] || (b[3] = (I) => t("axis-mouseleave")),
1660
+ "onLume__internal-AxisSize": b[4] || (b[4] = (I) => A.value = I)
1642
1661
  }, null, 8, ["scale", "container-size", "options", "hovered-index", "orientation"]),
1643
- ae(l(dt), {
1662
+ ae(l(vt), {
1644
1663
  type: "y",
1645
- scale: l(F),
1646
- "container-size": l(w),
1664
+ scale: l(K),
1665
+ "container-size": l($),
1647
1666
  options: l(be),
1648
1667
  "hovered-index": v.value,
1649
1668
  orientation: l(i),
1650
1669
  "data-j-lume-chart__y-axis": "",
1651
- onClick: it,
1652
- onMouseenter: ut,
1653
- onMouseleave: T[5] || (T[5] = (x) => t("axis-mouseleave")),
1654
- "onLume__internal-AxisSize": T[6] || (T[6] = (x) => A.value = x)
1670
+ onClick: st,
1671
+ onMouseenter: it,
1672
+ onMouseleave: b[5] || (b[5] = (I) => t("axis-mouseleave")),
1673
+ "onLume__internal-AxisSize": b[6] || (b[6] = (I) => O.value = I)
1655
1674
  }, null, 8, ["scale", "container-size", "options", "hovered-index", "orientation"])
1656
- ], !0) : P("", !0),
1657
- l(f).withHover !== !1 ? (_(), W(l(Ro), {
1675
+ ], !0) : F("", !0),
1676
+ l(f).withHover !== !1 ? (_(), W(l(Co), {
1658
1677
  key: 2,
1659
- data: l(y),
1678
+ data: l(x),
1660
1679
  orientation: l(i),
1661
- "x-scale": l(K),
1662
- "y-scale": l(F),
1680
+ "x-scale": l(P),
1681
+ "y-scale": l(K),
1663
1682
  "data-j-lume-chart__overlay-group": "",
1664
1683
  "onLume__internal-Hover": De
1665
- }, null, 8, ["data", "orientation", "x-scale", "y-scale"])) : P("", !0),
1666
- l(le) ? (_(), L("g", Qo, [
1667
- (_(!0), L(J, null, z(k.value, (x, Kt) => (_(), L("circle", M(x, {
1684
+ }, null, 8, ["data", "orientation", "x-scale", "y-scale"])) : F("", !0),
1685
+ l(Ce) ? (_(), L("g", ta, [
1686
+ (_(!0), L(J, null, z(y.value, (I, qt) => (_(), L("circle", C(I, {
1668
1687
  ref_for: !0,
1669
1688
  ref_key: "tooltipAnchor",
1670
1689
  ref: d,
1671
- key: `anchor_${Kt}`,
1672
- r: l(In),
1690
+ key: `anchor_${qt}`,
1691
+ r: l(Dn),
1673
1692
  class: "lume-fill--transparent"
1674
- }), null, 16, qo))), 128))
1675
- ])) : P("", !0),
1676
- R(O.$slots, "groups", {
1677
- data: l(y),
1678
- labels: l(E),
1693
+ }), null, 16, na))), 128))
1694
+ ])) : F("", !0),
1695
+ M(T.$slots, "groups", {
1696
+ data: l(x),
1697
+ labels: l(N),
1679
1698
  options: l(f),
1680
1699
  orientation: l(i),
1681
- xScale: l(K),
1682
- yScale: l(F),
1700
+ xScale: l(P),
1701
+ yScale: l(K),
1683
1702
  hoveredIndex: v.value,
1684
- containerSize: l(w),
1703
+ containerSize: l($),
1685
1704
  transition: l(f).withTransition !== !1,
1686
- classList: O.classList,
1687
- onNodeClick: T[7] || (T[7] = (x) => t("node-click", x)),
1688
- onNodeMouseenter: T[8] || (T[8] = (x) => t("node-mouseenter", x)),
1689
- onNodeMouseleave: T[9] || (T[9] = (x) => t("node-mouseleave", x)),
1690
- onLinkClick: T[10] || (T[10] = (x) => t("link-click", x)),
1691
- onLinkMouseenter: T[11] || (T[11] = (x) => t("link-mouseenter", x)),
1692
- onLinkMouseleave: T[12] || (T[12] = (x) => t("link-mouseleave", x)),
1693
- onBarClick: T[13] || (T[13] = (x) => t("bar-click", x)),
1694
- onLineClick: T[14] || (T[14] = (x) => t("line-click", x)),
1695
- onPointClick: T[15] || (T[15] = (x) => t("point-click", x)),
1705
+ classList: T.classList,
1706
+ onNodeClick: b[7] || (b[7] = (I) => t("node-click", I)),
1707
+ onNodeMouseenter: b[8] || (b[8] = (I) => t("node-mouseenter", I)),
1708
+ onNodeMouseleave: b[9] || (b[9] = (I) => t("node-mouseleave", I)),
1709
+ onLinkClick: b[10] || (b[10] = (I) => t("link-click", I)),
1710
+ onLinkMouseenter: b[11] || (b[11] = (I) => t("link-mouseenter", I)),
1711
+ onLinkMouseleave: b[12] || (b[12] = (I) => t("link-mouseleave", I)),
1712
+ onBarClick: b[13] || (b[13] = (I) => t("bar-click", I)),
1713
+ onLineClick: b[14] || (b[14] = (I) => t("line-click", I)),
1714
+ onPointClick: b[15] || (b[15] = (I) => t("point-click", I)),
1696
1715
  "onLume__internal-Hover": De
1697
1716
  }, void 0, !0)
1698
- ], 64)) : P("", !0)
1717
+ ], 64)) : F("", !0)
1699
1718
  ]),
1700
1719
  _: 3
1701
1720
  }, 8, ["id", "margins", "container-size", "no-min-size", "transparent-background", "onResize"]));
1702
1721
  }
1703
1722
  });
1704
- const Le = /* @__PURE__ */ Q(ta, [["__scopeId", "data-v-c4b73860"]]), na = ["dy"], oa = /* @__PURE__ */ Z({
1723
+ const Oe = /* @__PURE__ */ Q(aa, [["__scopeId", "data-v-71e133df"]]), ra = ["dy"], la = /* @__PURE__ */ Z({
1705
1724
  __name: "lume-alluvial-node-label",
1706
1725
  props: {
1707
1726
  bottom: { type: Boolean, default: !1 }
@@ -1711,11 +1730,11 @@ const Le = /* @__PURE__ */ Q(ta, [["__scopeId", "data-v-c4b73860"]]), na = ["dy"
1711
1730
  class: "lume-alluvial-group__node-label",
1712
1731
  dy: e.bottom ? "1.2em" : ""
1713
1732
  }, [
1714
- R(t.$slots, "default", {}, void 0, !0)
1715
- ], 8, na));
1733
+ M(t.$slots, "default", {}, void 0, !0)
1734
+ ], 8, ra));
1716
1735
  }
1717
1736
  });
1718
- const aa = /* @__PURE__ */ Q(oa, [["__scopeId", "data-v-d2a7cb8e"]]), ra = ["dy"], la = /* @__PURE__ */ Z({
1737
+ const ua = /* @__PURE__ */ Q(la, [["__scopeId", "data-v-d2a7cb8e"]]), ia = ["dy"], sa = /* @__PURE__ */ Z({
1719
1738
  __name: "lume-alluvial-node-value",
1720
1739
  props: {
1721
1740
  bottom: { type: Boolean, default: !0 }
@@ -1725,12 +1744,12 @@ const aa = /* @__PURE__ */ Q(oa, [["__scopeId", "data-v-d2a7cb8e"]]), ra = ["dy"
1725
1744
  class: "lume-alluvial-group__node-value",
1726
1745
  dy: e.bottom ? "1.2em" : ""
1727
1746
  }, [
1728
- R(t.$slots, "default", {}, void 0, !0)
1729
- ], 8, ra));
1747
+ M(t.$slots, "default", {}, void 0, !0)
1748
+ ], 8, ia));
1730
1749
  }
1731
1750
  });
1732
- const ua = /* @__PURE__ */ Q(la, [["__scopeId", "data-v-002e2887"]]);
1733
- function kt(e, t) {
1751
+ const ca = /* @__PURE__ */ Q(sa, [["__scopeId", "data-v-002e2887"]]);
1752
+ function bt(e, t) {
1734
1753
  return {
1735
1754
  x0: 0 + (t ? t.left : 0),
1736
1755
  y0: 0 + (t ? t.top : 0),
@@ -1738,32 +1757,32 @@ function kt(e, t) {
1738
1757
  y1: e.height - (t ? t.bottom : 0)
1739
1758
  };
1740
1759
  }
1741
- function ia(e) {
1742
- const t = C(kt(e));
1760
+ function da(e) {
1761
+ const t = R(bt(e));
1743
1762
  function n(o) {
1744
- t.value = kt(e, o);
1763
+ t.value = bt(e, o);
1745
1764
  }
1746
1765
  return { extents: t, updateExtents: n };
1747
1766
  }
1748
1767
  var Ft = /* @__PURE__ */ ((e) => (e.GraphProblem = "There was an issue generating your alluvial graph.", e))(Ft || {});
1749
- const sa = "[lume] ";
1750
- function ca(e, t, n = !0) {
1751
- n && wt() || console.error(sa + "Error: " + e, t);
1768
+ const va = "[lume] ";
1769
+ function pa(e, t, n = !0) {
1770
+ n && It() || console.error(va + "Error: " + e, t);
1752
1771
  }
1753
- const bt = 8, da = 8, va = 20, pa = 200;
1754
- function Ae(e) {
1772
+ const At = 8, fa = 8, ma = 20, ha = 200;
1773
+ function Te(e) {
1755
1774
  return typeof e == "string" || typeof e == "number" ? e : e.id ?? e.label;
1756
1775
  }
1757
- function fa(e, t) {
1776
+ function ga(e, t) {
1758
1777
  return t.nodes.find((n) => n.id === e);
1759
1778
  }
1760
- function ha(e, t) {
1779
+ function _a(e, t) {
1761
1780
  return t.links.find((n) => n.id === e);
1762
1781
  }
1763
- function Pt(e) {
1782
+ function zt(e) {
1764
1783
  return !!(e.sourceLinks && e.targetLinks);
1765
1784
  }
1766
- function ma(e, t) {
1785
+ function ya(e, t) {
1767
1786
  if (!t)
1768
1787
  return;
1769
1788
  const n = e.nodes.filter((u) => u.targetLinks.length === 0).map((u) => `${u.id}`), o = e.nodes.filter((u) => u.sourceLinks.length === 0).map((u) => `${u.id}`), r = t.filter((u) => n.includes(u.dataset.id)).reduce(
@@ -1780,41 +1799,41 @@ function ma(e, t) {
1780
1799
  bottom: 0
1781
1800
  };
1782
1801
  }
1783
- function ga(e) {
1802
+ function ka(e) {
1784
1803
  return e.map((t) => ({
1785
1804
  x: t.x0,
1786
1805
  y: t.y0,
1787
1806
  width: t.x1 - t.x0,
1788
1807
  height: t.y1 - t.y0,
1789
1808
  textTransform: {
1790
- x: t.depth > 0 ? t.x1 + bt : t.x0 - bt,
1809
+ x: t.depth > 0 ? t.x1 + At : t.x0 - At,
1791
1810
  y: (t.y1 + t.y0) / 2
1792
1811
  },
1793
1812
  node: t
1794
1813
  }));
1795
1814
  }
1796
- function _a(e) {
1815
+ function ba(e) {
1797
1816
  return [e.source.x1, e.y0];
1798
1817
  }
1799
- function ya(e) {
1818
+ function Aa(e) {
1800
1819
  return [e.target.x0, e.y1];
1801
1820
  }
1802
- function ka(e) {
1803
- return e.curveFunction ? an(e.curveFunction).source(_a).target(ya) : sn();
1821
+ function Ta(e) {
1822
+ return e.curveFunction ? un(e.curveFunction).source(ba).target(Aa) : vn();
1804
1823
  }
1805
- function ba(e) {
1824
+ function La(e) {
1806
1825
  return e.map((t) => {
1807
1826
  var n;
1808
1827
  return {
1809
1828
  id: t.id,
1810
1829
  color: t.color || ((n = t.source) == null ? void 0 : n.color) || Ee,
1811
- d: ka(t)(t),
1830
+ d: Ta(t)(t),
1812
1831
  strokeWidth: Math.max(1, t.width),
1813
1832
  link: t
1814
1833
  };
1815
1834
  });
1816
1835
  }
1817
- function At(e, t, n, o, r) {
1836
+ function Tt(e, t, n, o, r) {
1818
1837
  if (o === !1) {
1819
1838
  e.node = {
1820
1839
  ...e.node,
@@ -1822,8 +1841,8 @@ function At(e, t, n, o, r) {
1822
1841
  };
1823
1842
  return;
1824
1843
  }
1825
- const a = Date.now(), u = bn(t, n), s = () => {
1826
- let c = (Date.now() - a) / pa;
1844
+ const a = Date.now(), u = Ln(t, n), s = () => {
1845
+ let c = (Date.now() - a) / ha;
1827
1846
  c > 1 && (c = 1), e.node = {
1828
1847
  ...e.node,
1829
1848
  transitionValue: r && c === 1 ? void 0 : u(c)
@@ -1831,146 +1850,146 @@ function At(e, t, n, o, r) {
1831
1850
  };
1832
1851
  requestAnimationFrame(s);
1833
1852
  }
1834
- const Aa = {
1853
+ const Oa = {
1835
1854
  nodes: [],
1836
1855
  links: []
1837
1856
  };
1838
- function Tt(e, t) {
1857
+ function Lt(e, t) {
1839
1858
  return t.find((n) => n.every((o) => o.x0 === e.x0));
1840
1859
  }
1841
- function Ta(e, t, n) {
1842
- const o = C(null), r = p(() => {
1860
+ function $a(e, t, n) {
1861
+ const o = R(null), r = p(() => {
1843
1862
  var d;
1844
1863
  return (d = e.value) == null ? void 0 : d[0].values.map(
1845
- ({ label: h, color: k, value: m, deriveColorFromIncomingLinks: A, offset: f }) => ({
1846
- label: h || m.toString(),
1847
- color: k,
1848
- fallbackColor: k || Ee,
1849
- id: m,
1864
+ ({ label: m, color: y, value: h, deriveColorFromIncomingLinks: A, offset: O }) => ({
1865
+ label: m || h.toString(),
1866
+ color: y,
1867
+ fallbackColor: y || Ee,
1868
+ id: h,
1850
1869
  deriveColorFromIncomingLinks: A,
1851
- offset: f
1870
+ offset: O
1852
1871
  })
1853
1872
  );
1854
1873
  }), a = p(
1855
1874
  () => {
1856
1875
  var d;
1857
1876
  return (d = e.value) == null ? void 0 : d[0].values.map(
1858
- (h) => {
1859
- var k;
1860
- return (k = h.targets) == null ? void 0 : k.map(
1861
- ({ node: m, value: A, color: f, curveFunction: y }) => ({
1862
- id: `${h.value}:${m}`,
1863
- color: f,
1864
- curveFunction: y,
1865
- source: h.value ?? h.label,
1866
- target: m,
1877
+ (m) => {
1878
+ var y;
1879
+ return (y = m.targets) == null ? void 0 : y.map(
1880
+ ({ node: h, value: A, color: O, curveFunction: f }) => ({
1881
+ id: `${m.value}:${h}`,
1882
+ color: O,
1883
+ curveFunction: f,
1884
+ source: m.value ?? m.label,
1885
+ target: h,
1867
1886
  value: A
1868
1887
  })
1869
1888
  );
1870
1889
  }
1871
1890
  ).filter(Boolean).flat();
1872
1891
  }
1873
- ), u = p(() => cn().nodeId(Ae).nodeAlign(t.value.nodeAlign).nodePadding(t.value.nodePadding).nodeSort(t.value.nodeSort).nodeWidth(t.value.nodeWidth).linkSort(t.value.linkSort).iterations(t.value.iterations)), s = p(() => {
1892
+ ), u = p(() => pn().nodeId(Te).nodeAlign(t.value.nodeAlign).nodePadding(t.value.nodePadding).nodeSort(t.value.nodeSort).nodeWidth(t.value.nodeWidth).linkSort(t.value.linkSort).iterations(t.value.iterations)), s = p(() => {
1874
1893
  var d;
1875
1894
  return (d = o.value) == null ? void 0 : d.nodes.reduce(
1876
- (h, k) => {
1877
- const m = Tt(k, h);
1878
- return m ? (m.push(k), m.sort((A, f) => (A._y0 || A.y0) - (f._y0 || f.y0))) : h.push([k]), h;
1895
+ (m, y) => {
1896
+ const h = Lt(y, m);
1897
+ return h ? (h.push(y), h.sort((A, O) => (A._y0 || A.y0) - (O._y0 || O.y0))) : m.push([y]), m;
1879
1898
  },
1880
1899
  []
1881
1900
  );
1882
1901
  });
1883
1902
  function i(d) {
1884
- const { offset: h } = d, k = Tt(d, s.value);
1885
- if (!k)
1903
+ const { offset: m } = d, y = Lt(d, s.value);
1904
+ if (!y)
1886
1905
  return;
1887
- const m = k[k.findIndex((f) => f.id === d.id) - 1], A = m && k.length !== 1 ? m.y1 + h : h;
1906
+ const h = y[y.findIndex((O) => O.id === d.id) - 1], A = h && y.length !== 1 ? h.y1 + m : m;
1888
1907
  d._y0 = d.y0, d._y1 = d.y1, d.y0 = A, d.y1 = d.y0 + (d._y1 - d._y0);
1889
1908
  }
1890
- function c(d, h) {
1891
- const { id: k, _y0: m, y0: A } = d, f = h.links.filter(
1892
- (w) => w.source.id === k
1893
- ), y = h.links.filter(
1894
- (w) => w.target.id === k
1895
- ), E = A - m;
1896
- f.forEach((w) => w.y0 += E), y.forEach((w) => w.y1 += E);
1909
+ function c(d, m) {
1910
+ const { id: y, _y0: h, y0: A } = d, O = m.links.filter(
1911
+ (N) => N.source.id === y
1912
+ ), f = m.links.filter(
1913
+ (N) => N.target.id === y
1914
+ ), x = A - h;
1915
+ O.forEach((N) => N.y0 += x), f.forEach((N) => N.y1 += x);
1897
1916
  }
1898
1917
  const v = p(() => (o.value && r.value.forEach((d) => {
1899
1918
  typeof d.offset == "number" && (i(d), c(d, o.value));
1900
1919
  }), o.value));
1901
1920
  return X([u, n], () => {
1902
1921
  try {
1903
- const { x0: d, y0: h, x1: k, y1: m } = n.value;
1922
+ const { x0: d, y0: m, x1: y, y1: h } = n.value;
1904
1923
  o.value = u.value.extent([
1905
- [d, h],
1906
- [k, m]
1924
+ [d, m],
1925
+ [y, h]
1907
1926
  ])({ nodes: r.value, links: a.value });
1908
1927
  } catch (d) {
1909
- ca(Ft.GraphProblem, d), o.value = Aa;
1928
+ pa(Ft.GraphProblem, d), o.value = Oa;
1910
1929
  }
1911
1930
  }), { columns: s, graph: v };
1912
1931
  }
1913
- function Xe(e, t) {
1932
+ function Ye(e, t) {
1914
1933
  return t || (t = {}), e.targetLinks && e.targetLinks.forEach(({ source: n, value: o }) => {
1915
- t[n.id] = o, Xe(
1934
+ t[n.id] = o, Ye(
1916
1935
  n,
1917
1936
  t
1918
1937
  );
1919
1938
  }), t;
1920
1939
  }
1921
- function Ye(e, t) {
1940
+ function Ke(e, t) {
1922
1941
  return t || (t = {}), e.sourceLinks && e.sourceLinks.forEach(({ target: n, value: o }) => {
1923
- t[n.id] = o, Ye(
1942
+ t[n.id] = o, Ke(
1924
1943
  n,
1925
1944
  t
1926
1945
  );
1927
1946
  }), t;
1928
1947
  }
1929
- function La(e, t) {
1948
+ function xa(e, t) {
1930
1949
  return t.links.reduce((n, o) => (o.source.id in e && o.target.id in e && n.push(o.id), n), []);
1931
1950
  }
1932
- const Oa = (e, t) => {
1951
+ const wa = (e, t) => {
1933
1952
  let n;
1934
- Pt(e) ? n = {
1953
+ zt(e) ? n = {
1935
1954
  [e.id]: e.value,
1936
- ...Xe(e),
1937
- ...Ye(e)
1955
+ ...Ye(e),
1956
+ ...Ke(e)
1938
1957
  } : n = {
1939
1958
  [e.source.id]: e.source.value,
1940
1959
  [e.target.id]: e.target.value,
1941
- ...Xe(e.source),
1942
- ...Ye(e.target)
1960
+ ...Ye(e.source),
1961
+ ...Ke(e.target)
1943
1962
  };
1944
- const o = La(n, t);
1963
+ const o = xa(n, t);
1945
1964
  return { nodes: n, links: o };
1946
- }, $a = (e) => {
1947
- if (Pt(e)) {
1965
+ }, Ia = (e) => {
1966
+ if (zt(e)) {
1948
1967
  const t = [...e.sourceLinks, ...e.targetLinks];
1949
1968
  return {
1950
1969
  nodes: t.reduce(
1951
- (n, { source: o, target: r, value: a }) => o === e ? { ...n, [Ae(r)]: a } : { ...n, [Ae(o)]: a },
1952
- { [Ae(e)]: e.value }
1970
+ (n, { source: o, target: r, value: a }) => o === e ? { ...n, [Te(r)]: a } : { ...n, [Te(o)]: a },
1971
+ { [Te(e)]: e.value }
1953
1972
  ),
1954
1973
  links: t.map(({ id: n }) => n)
1955
1974
  };
1956
1975
  }
1957
1976
  return {
1958
1977
  nodes: {
1959
- [Ae(e.target)]: e.value,
1960
- [Ae(e.source)]: e.source.value
1978
+ [Te(e.target)]: e.value,
1979
+ [Te(e.source)]: e.source.value
1961
1980
  },
1962
1981
  links: [e.id]
1963
1982
  };
1964
1983
  };
1965
- function xa(e, t, n) {
1966
- const o = C(null), r = p(() => o.value ? typeof t.value.highlightedElements == "function" ? t.value.highlightedElements(
1984
+ function Ea(e, t, n) {
1985
+ const o = R(null), r = p(() => o.value ? typeof t.value.highlightedElements == "function" ? t.value.highlightedElements(
1967
1986
  o.value,
1968
1987
  n.value
1969
- ) : t.value.highlightedElements === "closest" ? $a(o.value, n.value) : Oa(o.value, n.value) : { nodes: {}, links: [] });
1988
+ ) : t.value.highlightedElements === "closest" ? Ia(o.value, n.value) : wa(o.value, n.value) : { nodes: {}, links: [] });
1970
1989
  return X(r, (a, u) => {
1971
1990
  if (a.links.length === 0 && Object.keys(a.nodes).length === 0) {
1972
1991
  e.value.forEach((s) => {
1973
- s.node.id in u.nodes && At(
1992
+ s.node.id in u.nodes && Tt(
1974
1993
  s,
1975
1994
  u.nodes[s.node.id],
1976
1995
  s.node.value,
@@ -1981,7 +2000,7 @@ function xa(e, t, n) {
1981
2000
  return;
1982
2001
  }
1983
2002
  e.value.forEach((s) => {
1984
- s.node.id in a.nodes && At(
2003
+ s.node.id in a.nodes && Tt(
1985
2004
  s,
1986
2005
  s.node.value,
1987
2006
  a.nodes[s.node.id],
@@ -1990,13 +2009,13 @@ function xa(e, t, n) {
1990
2009
  });
1991
2010
  }), { highlightedElements: r, hoveredElement: o };
1992
2011
  }
1993
- const wa = {
2012
+ const Na = {
1994
2013
  class: "lume-alluvial-group",
1995
2014
  "data-j-alluvial-group": ""
1996
- }, Ia = { key: 0 }, Ea = ["x", "y"], Na = { key: 0 }, Da = ["id", "x1", "x2"], Ha = ["stop-color"], Ba = ["stop-color"], Ra = ["d", "stroke-width", "onClick", "onMouseover"], Sa = ["d", "stroke", "stroke-dasharray", "stroke-dashoffset", "stroke-width", "data-id", "onClick", "onMouseover"], Ca = ["onClick", "onMouseenter", "onMouseleave", "onMouseover"], Ma = ["x", "y", "height", "width"], Ga = ["transform", "data-id"], ja = /* @__PURE__ */ Z({
2015
+ }, Da = { key: 0 }, Ha = ["x", "y"], Ba = { key: 0 }, Ra = ["id", "x1", "x2"], Ma = ["stop-color"], Sa = ["stop-color"], Ca = ["d", "stroke-width", "onClick", "onMouseover"], Ga = ["d", "stroke", "stroke-dasharray", "stroke-dashoffset", "stroke-width", "data-id", "onClick", "onMouseover"], ja = ["onClick", "onMouseenter", "onMouseleave", "onMouseover"], Va = ["x", "y", "height", "width"], Pa = ["transform", "data-id"], Fa = /* @__PURE__ */ Z({
1997
2016
  __name: "lume-alluvial-group",
1998
2017
  props: {
1999
- ...Ce(),
2018
+ ...Se(),
2000
2019
  hoveredElementId: {
2001
2020
  type: [Number, String],
2002
2021
  default: null
@@ -2004,41 +2023,41 @@ const wa = {
2004
2023
  },
2005
2024
  emits: ["node-click", "node-mouseenter", "node-mouseleave", "link-click", "link-mouseenter", "link-mouseleave"],
2006
2025
  setup(e, { emit: t }) {
2007
- const n = e, o = Be("chartID"), { data: r, options: a } = q(n), u = C([]), s = C([]), i = C(null), { extents: c, updateExtents: v } = ia(n.containerSize), { columns: d, graph: h } = Ta(r, a, c), { hoveredElement: k, highlightedElements: m } = xa(
2026
+ const n = e, o = Be("chartID"), { data: r, options: a } = q(n), u = R([]), s = R([]), i = R(null), { extents: c, updateExtents: v } = da(n.containerSize), { columns: d, graph: m } = $a(r, a, c), { hoveredElement: y, highlightedElements: h } = Ea(
2008
2027
  u,
2009
2028
  a,
2010
- h
2011
- ), A = p(() => He(a.value.valueFormat)), f = p(
2012
- () => Object.keys(m.value.nodes)
2013
- ), y = p(() => d.value ? d.value.map(
2014
- (b) => b[0].x0 + a.value.nodeWidth / 2
2015
- ) : []), E = p(() => {
2029
+ m
2030
+ ), A = p(() => He(a.value.valueFormat)), O = p(
2031
+ () => Object.keys(h.value.nodes)
2032
+ ), f = p(() => d.value ? d.value.map(
2033
+ (k) => k[0].x0 + a.value.nodeWidth / 2
2034
+ ) : []), x = p(() => {
2016
2035
  if (!(!a.value.nodeHeaders || !a.value.nodeHeaders.length))
2017
- return a.value.nodeHeaders.slice(0, y.value.length).map((b, I) => ({
2018
- label: b,
2019
- x: y.value[I]
2036
+ return a.value.nodeHeaders.slice(0, f.value.length).map((k, E) => ({
2037
+ label: k,
2038
+ x: f.value[E]
2020
2039
  }));
2021
- }), w = p(
2022
- () => a.value.nodeHeaderPadding ?? va
2023
- ), N = p(() => {
2024
- if (!(!a.value.gradient || !h.value))
2025
- return h.value.links.reduce((b, I) => {
2026
- const { source: g, target: j } = I, U = g.color || g.fallbackColor, le = j.deriveColorFromIncomingLinks ? U : j.color || j.fallbackColor;
2027
- return b[I.id] = {
2040
+ }), N = p(
2041
+ () => a.value.nodeHeaderPadding ?? ma
2042
+ ), $ = p(() => {
2043
+ if (!(!a.value.gradient || !m.value))
2044
+ return m.value.links.reduce((k, E) => {
2045
+ const { source: g, target: j } = E, U = g.color || g.fallbackColor, le = j.deriveColorFromIncomingLinks ? U : j.color || j.fallbackColor;
2046
+ return k[E.id] = {
2028
2047
  source: U,
2029
2048
  target: le,
2030
2049
  x1: g.x1,
2031
2050
  x2: j.x0
2032
- }, b;
2051
+ }, k;
2033
2052
  }, {});
2034
- }), $ = p(() => {
2035
- const b = u.value.filter(
2036
- (g) => ne(g)
2037
- ), I = [];
2038
- return b.forEach((g) => {
2053
+ }), w = p(() => {
2054
+ const k = u.value.filter(
2055
+ (g) => K(g)
2056
+ ), E = [];
2057
+ return k.forEach((g) => {
2039
2058
  const j = [];
2040
2059
  s.value.filter(({ link: U }) => U.target.id === g.node.id).reverse().reduce((U, le) => {
2041
- const Oe = le.link.target.y1 - le.link.target.y0, Ne = le.link.value / g.node.value * Oe;
2060
+ const Ce = le.link.target.y1 - le.link.target.y0, Ne = le.link.value / g.node.value * Ce;
2042
2061
  return j.push({
2043
2062
  x: g.x,
2044
2063
  y: g.y + U,
@@ -2047,75 +2066,75 @@ const wa = {
2047
2066
  key: `node-block-${g.node.id}-source-link-${le.link.source.id}`,
2048
2067
  class: `lume-alluvial-group__node-block lume-fill--${le.link.source.color || Ee}`
2049
2068
  }), U + Ne;
2050
- }, 0), I.push({
2069
+ }, 0), E.push({
2051
2070
  id: g.node.id,
2052
2071
  subNodes: j
2053
2072
  });
2054
- }), I;
2073
+ }), E;
2055
2074
  });
2056
- function H(b) {
2057
- return a.value.gradient && `url('#${o}_${b.id}')`;
2075
+ function D(k) {
2076
+ return a.value.gradient && `url('#${o}_${k.id}')`;
2058
2077
  }
2059
- function S(b) {
2060
- return f.value.length > 0 && !f.value.includes(b.toString());
2078
+ function S(k) {
2079
+ return O.value.length > 0 && !O.value.includes(k.toString());
2061
2080
  }
2062
- function Y(b) {
2063
- return f.value.length > 0 && f.value.includes(b.toString());
2081
+ function Y(k) {
2082
+ return O.value.length > 0 && O.value.includes(k.toString());
2064
2083
  }
2065
- function K(b) {
2066
- return m.value.links.length > 0 && !m.value.links.includes(b);
2084
+ function ne(k) {
2085
+ return h.value.links.length > 0 && !h.value.links.includes(k);
2067
2086
  }
2068
- function F(b) {
2069
- return m.value.links.length > 0 && m.value.links.includes(b);
2087
+ function P(k) {
2088
+ return h.value.links.length > 0 && h.value.links.includes(k);
2070
2089
  }
2071
- function ne(b) {
2072
- return !b.node.color && b.node.deriveColorFromIncomingLinks;
2090
+ function K(k) {
2091
+ return !k.node.color && k.node.deriveColorFromIncomingLinks;
2073
2092
  }
2074
- function be(b, I) {
2075
- b !== k.value && (k.value = b, t("link-mouseenter", { link: b, event: I }));
2093
+ function ke(k, E) {
2094
+ k !== y.value && (y.value = k, t("link-mouseenter", { link: k, event: E }));
2076
2095
  }
2077
- function fe(b) {
2078
- const I = k.value;
2079
- k.value = null, t("link-mouseleave", { link: I, event: b });
2096
+ function be(k) {
2097
+ const E = y.value;
2098
+ y.value = null, t("link-mouseleave", { link: E, event: k });
2080
2099
  }
2081
- function he(b) {
2082
- if (b == null) {
2083
- k.value = null;
2100
+ function fe(k) {
2101
+ if (k == null) {
2102
+ y.value = null;
2084
2103
  return;
2085
2104
  }
2086
- const I = fa(b, h.value) || ha(b, h.value);
2087
- if (!I) {
2088
- ge(ve.InvalidHoveredElement);
2105
+ const E = ga(k, m.value) || _a(k, m.value);
2106
+ if (!E) {
2107
+ he(ve.InvalidHoveredElement);
2089
2108
  return;
2090
2109
  }
2091
- k.value = I;
2110
+ y.value = E;
2092
2111
  }
2093
- function B(b) {
2094
- var I;
2095
- return ((I = $.value.find(({ id: g }) => b === g)) == null ? void 0 : I.subNodes) ?? [];
2112
+ function B(k) {
2113
+ var E;
2114
+ return ((E = w.value.find(({ id: g }) => k === g)) == null ? void 0 : E.subNodes) ?? [];
2096
2115
  }
2097
- return X(h, (b) => {
2098
- u.value = ga(b.nodes), s.value = ba(b.links).reverse(), k.value == null && n.hoveredElementId != null && he(n.hoveredElementId);
2116
+ return X(m, (k) => {
2117
+ u.value = ka(k.nodes), s.value = La(k.links).reverse(), y.value == null && n.hoveredElementId != null && fe(n.hoveredElementId);
2099
2118
  }), X([n.containerSize, i], () => {
2100
2119
  if (n.containerSize.width && n.containerSize.height) {
2101
- const b = ma(h.value, i.value);
2102
- v(b);
2120
+ const k = ya(m.value, i.value);
2121
+ v(k);
2103
2122
  }
2104
- }), X(() => n.hoveredElementId, he), (b, I) => (_(), L("g", wa, [
2105
- l(E) ? (_(), L("g", Ia, [
2106
- (_(!0), L(J, null, z(l(E), (g) => (_(), L("text", {
2123
+ }), X(() => n.hoveredElementId, fe), (k, E) => (_(), L("g", Na, [
2124
+ l(x) ? (_(), L("g", Da, [
2125
+ (_(!0), L(J, null, z(l(x), (g) => (_(), L("text", {
2107
2126
  key: `header_${g.x}`,
2108
2127
  x: g.x,
2109
- y: -l(w),
2128
+ y: -l(N),
2110
2129
  class: "lume-alluvial-group__node-header lume-typography--caption"
2111
- }, ee(g.label), 9, Ea))), 128))
2112
- ])) : P("", !0),
2130
+ }, te(g.label), 9, Ha))), 128))
2131
+ ])) : F("", !0),
2113
2132
  G("g", {
2114
2133
  class: "lume-alluvial-link-group",
2115
- onMouseleave: fe
2134
+ onMouseleave: be
2116
2135
  }, [
2117
- l(a).gradient ? (_(), L("defs", Na, [
2118
- (_(!0), L(J, null, z(l(N), (g, j) => (_(), L("linearGradient", {
2136
+ l(a).gradient ? (_(), L("defs", Ba, [
2137
+ (_(!0), L(J, null, z(l($), (g, j) => (_(), L("linearGradient", {
2119
2138
  id: `${l(o)}_${j}`,
2120
2139
  key: j,
2121
2140
  gradientUnits: "userSpaceOnUse",
@@ -2125,46 +2144,46 @@ const wa = {
2125
2144
  G("stop", {
2126
2145
  offset: "0%",
2127
2146
  "stop-color": `var(--lume-color--${g.source})`
2128
- }, null, 8, Ha),
2147
+ }, null, 8, Ma),
2129
2148
  G("stop", {
2130
2149
  offset: "100%",
2131
2150
  "stop-color": `var(--lume-color--${g.target})`
2132
- }, null, 8, Ba)
2133
- ], 8, Da))), 128))
2134
- ])) : P("", !0),
2151
+ }, null, 8, Sa)
2152
+ ], 8, Ra))), 128))
2153
+ ])) : F("", !0),
2135
2154
  (_(!0), L(J, null, z(s.value, (g) => (_(), L("path", {
2136
2155
  key: `link-ghost_${g.id}`,
2137
- class: te(["lume-alluvial-group__link", [
2156
+ class: ee(["lume-alluvial-group__link", [
2138
2157
  "lume-stroke--transparent",
2139
2158
  "lume-alluvial-group__link--ghost"
2140
2159
  ]]),
2141
2160
  d: g.d,
2142
- "stroke-width": g.strokeWidth + l(da),
2161
+ "stroke-width": g.strokeWidth + l(fa),
2143
2162
  "data-j-alluvial-ghost": "",
2144
2163
  onClick: (j) => t("link-click", { link: g.link, event: j }),
2145
- onMouseover: (j) => be(g.link, j)
2146
- }, null, 40, Ra))), 128)),
2164
+ onMouseover: (j) => ke(g.link, j)
2165
+ }, null, 40, Ca))), 128)),
2147
2166
  (_(!0), L(J, null, z(s.value, (g) => (_(), L("path", {
2148
2167
  key: `link_${g.id}`,
2149
- class: te(["lume-alluvial-group__link", {
2168
+ class: ee(["lume-alluvial-group__link", {
2150
2169
  [`lume-stroke--${g.color}`]: !l(a).gradient && g.color,
2151
- "lume-alluvial-group__link--faded": K(g.id),
2152
- "lume-alluvial-group__link--focused": F(g.id)
2170
+ "lume-alluvial-group__link--faded": ne(g.id),
2171
+ "lume-alluvial-group__link--focused": P(g.id)
2153
2172
  }]),
2154
2173
  d: g.d,
2155
- stroke: H(g.link),
2156
- "stroke-dasharray": b.containerSize.width,
2157
- "stroke-dashoffset": b.containerSize.width,
2174
+ stroke: D(g.link),
2175
+ "stroke-dasharray": k.containerSize.width,
2176
+ "stroke-dashoffset": k.containerSize.width,
2158
2177
  "stroke-width": g.strokeWidth,
2159
2178
  "data-j-alluvial-path": "",
2160
2179
  "data-id": g.id,
2161
2180
  onClick: (j) => t("link-click", { link: g.link, event: j }),
2162
- onMouseover: (j) => be(g.link, j)
2163
- }, null, 42, Sa))), 128))
2181
+ onMouseover: (j) => ke(g.link, j)
2182
+ }, null, 42, Ga))), 128))
2164
2183
  ], 32),
2165
2184
  (_(!0), L(J, null, z(u.value, (g, j) => (_(), L("g", {
2166
2185
  key: `node-block_${j}`,
2167
- class: te(["lume-alluvial-group__node", {
2186
+ class: ee(["lume-alluvial-group__node", {
2168
2187
  "lume-alluvial-group__node--faded": S(g.node.id),
2169
2188
  "lume-alluvial-group__node--focused": Y(g.node.id)
2170
2189
  }]),
@@ -2174,52 +2193,52 @@ const wa = {
2174
2193
  onClick: (U) => t("node-click", { node: g.node, event: U }),
2175
2194
  onMouseenter: (U) => t("node-mouseenter", { node: g.node, event: U }),
2176
2195
  onMouseleave: (U) => t("node-mouseleave", { node: g.node, event: U }),
2177
- onMouseover: (U) => k.value = g.node,
2178
- onMouseout: I[0] || (I[0] = (U) => k.value = null)
2196
+ onMouseover: (U) => y.value = g.node,
2197
+ onMouseout: E[0] || (E[0] = (U) => y.value = null)
2179
2198
  }, [
2180
- ne(g) ? (_(!0), L(J, { key: 0 }, z(B(
2199
+ K(g) ? (_(!0), L(J, { key: 0 }, z(B(
2181
2200
  g.node.id
2182
- ), (U) => (_(), L("rect", M(U, {
2201
+ ), (U) => (_(), L("rect", C(U, {
2183
2202
  key: U.key,
2184
2203
  "data-j-alluvial-sub-nodes": ""
2185
2204
  }), null, 16))), 128)) : (_(), L("rect", {
2186
2205
  key: 1,
2187
- class: te(["lume-alluvial-group__node-block", `lume-fill--${g.node.color || g.node.fallbackColor}`]),
2206
+ class: ee(["lume-alluvial-group__node-block", `lume-fill--${g.node.color || g.node.fallbackColor}`]),
2188
2207
  x: g.x,
2189
2208
  y: g.y,
2190
2209
  height: g.height,
2191
2210
  width: g.width
2192
- }, null, 10, Ma)),
2211
+ }, null, 10, Va)),
2193
2212
  G("g", {
2194
2213
  ref_for: !0,
2195
2214
  ref_key: "nodeTextRefs",
2196
2215
  ref: i,
2197
- class: te(["lume-alluvial-group__node-text lume-typography--caption", {
2216
+ class: ee(["lume-alluvial-group__node-text lume-typography--caption", {
2198
2217
  "lume-alluvial-group__node-text--left": g.node.depth === 0
2199
2218
  }]),
2200
2219
  transform: `translate(${g.textTransform.x},${g.textTransform.y})`,
2201
2220
  "data-id": g.node.id
2202
2221
  }, [
2203
- R(b.$slots, `node-text-${g.node.id}`, {
2222
+ M(k.$slots, `node-text-${g.node.id}`, {
2204
2223
  node: g.node,
2205
2224
  value: l(A)(
2206
2225
  g.node.transitionValue || g.node.value,
2207
2226
  g.node.value
2208
2227
  )
2209
2228
  }, () => [
2210
- ae(l(aa), {
2229
+ ae(l(ua), {
2211
2230
  bottom: l(a).switchText
2212
2231
  }, {
2213
2232
  default: V(() => [
2214
- de(ee(g.node.label), 1)
2233
+ de(te(g.node.label), 1)
2215
2234
  ]),
2216
2235
  _: 2
2217
2236
  }, 1032, ["bottom"]),
2218
- ae(l(ua), {
2237
+ ae(l(ca), {
2219
2238
  bottom: !l(a).switchText
2220
2239
  }, {
2221
2240
  default: V(() => [
2222
- de(ee(l(A)(
2241
+ de(te(l(A)(
2223
2242
  g.node.transitionValue || g.node.value,
2224
2243
  g.node.value
2225
2244
  )), 1)
@@ -2227,13 +2246,13 @@ const wa = {
2227
2246
  _: 2
2228
2247
  }, 1032, ["bottom"])
2229
2248
  ], !0)
2230
- ], 10, Ga)
2231
- ], 40, Ca)
2249
+ ], 10, Pa)
2250
+ ], 40, ja)
2232
2251
  ], 2))), 128))
2233
2252
  ]));
2234
2253
  }
2235
2254
  });
2236
- const Va = /* @__PURE__ */ Q(ja, [["__scopeId", "data-v-6fe8c153"]]), Fa = {
2255
+ const za = /* @__PURE__ */ Q(Fa, [["__scopeId", "data-v-6fe8c153"]]), Za = {
2237
2256
  margins: {
2238
2257
  top: 0,
2239
2258
  right: 0,
@@ -2249,16 +2268,16 @@ const Va = /* @__PURE__ */ Q(ja, [["__scopeId", "data-v-6fe8c153"]]), Fa = {
2249
2268
  highlightedElements: "closest",
2250
2269
  nodePadding: 16,
2251
2270
  nodeWidth: 16,
2252
- nodeAlign: dn,
2271
+ nodeAlign: fn,
2253
2272
  valueFormat: (e) => String(e),
2254
2273
  iterations: 6
2255
- }, Ir = /* @__PURE__ */ Z({
2274
+ }, Dr = /* @__PURE__ */ Z({
2256
2275
  __name: "lume-alluvial-diagram",
2257
2276
  props: {
2258
- ...Ho(Ke)
2277
+ ...Mo(Je)
2259
2278
  },
2260
2279
  setup(e) {
2261
- const t = e, n = ke(oe()), o = Tn(oe()), { options: r } = q(t), { allOptions: a } = ce(r, Fa);
2280
+ const t = e, n = ye(oe()), o = $n(oe()), { options: r } = q(t), { allOptions: a } = ce(r, Za);
2262
2281
  function u(s) {
2263
2282
  return {
2264
2283
  ...s,
@@ -2266,16 +2285,16 @@ const Va = /* @__PURE__ */ Q(ja, [["__scopeId", "data-v-6fe8c153"]]), Fa = {
2266
2285
  // Alluvial chart never uses base scales
2267
2286
  };
2268
2287
  }
2269
- return (s, i) => (_(), W(l(Le), M(t, {
2288
+ return (s, i) => (_(), W(l(Oe), C(t, {
2270
2289
  options: u(l(a)),
2271
2290
  "data-j-alluvial-diagram": ""
2272
2291
  }), ue({
2273
2292
  groups: V((c) => [
2274
- ae(l(Va), M(c, { "hovered-element-id": s.hoveredElement }), ue({ _: 2 }, [
2293
+ ae(l(za), C(c, { "hovered-element-id": s.hoveredElement }), ue({ _: 2 }, [
2275
2294
  z(l(o), (v, d) => ({
2276
2295
  name: d,
2277
- fn: V((h) => [
2278
- R(s.$slots, d, ie(se(h || {})))
2296
+ fn: V((m) => [
2297
+ M(s.$slots, d, ie(se(m || {})))
2279
2298
  ])
2280
2299
  }))
2281
2300
  ]), 1040, ["hovered-element-id"])
@@ -2285,35 +2304,35 @@ const Va = /* @__PURE__ */ Q(ja, [["__scopeId", "data-v-6fe8c153"]]), Fa = {
2285
2304
  z(l(n), (c, v) => ({
2286
2305
  name: v,
2287
2306
  fn: V((d) => [
2288
- R(s.$slots, v, ie(se(d || {})))
2307
+ M(s.$slots, v, ie(se(d || {})))
2289
2308
  ])
2290
2309
  }))
2291
2310
  ]), 1040, ["options"]));
2292
2311
  }
2293
2312
  });
2294
- var zt = /* @__PURE__ */ ((e) => (e.grouped = "grouped", e.stacked = "stacked", e))(zt || {});
2295
- const Er = /* @__PURE__ */ Z({
2313
+ var Zt = /* @__PURE__ */ ((e) => (e.grouped = "grouped", e.stacked = "stacked", e))(Zt || {});
2314
+ const Hr = /* @__PURE__ */ Z({
2296
2315
  __name: "lume-bar-chart",
2297
2316
  props: {
2298
- ...Te(),
2317
+ ...Le(),
2299
2318
  type: {
2300
2319
  type: String,
2301
2320
  default: null,
2302
- validator: (e) => e in zt || e == null
2321
+ validator: (e) => e in Zt || e == null
2303
2322
  }
2304
2323
  },
2305
2324
  setup(e) {
2306
- const t = e, n = Ge(
2325
+ const t = e, n = je(
2307
2326
  () => import("./common/42f5d2fc.js")
2308
- ), o = Ge(
2327
+ ), o = je(
2309
2328
  () => import("./common/abc9d23d.js")
2310
- ), r = Ge(
2329
+ ), r = je(
2311
2330
  () => import("./common/0664fd4d.js")
2312
2331
  ), a = /* @__PURE__ */ new Map([
2313
2332
  ["single", n],
2314
2333
  ["grouped", o],
2315
2334
  ["stacked", r]
2316
- ]), u = ke(oe());
2335
+ ]), u = ye(oe());
2317
2336
  function s(c) {
2318
2337
  return {
2319
2338
  ...c,
@@ -2321,52 +2340,52 @@ const Er = /* @__PURE__ */ Z({
2321
2340
  // Bar chart always starts on zero,
2322
2341
  tooltipOptions: {
2323
2342
  ...(c == null ? void 0 : c.tooltipOptions) || {},
2324
- position: t.orientation === D.HORIZONTAL && "right"
2343
+ position: t.orientation === H.HORIZONTAL && "right"
2325
2344
  }
2326
2345
  };
2327
2346
  }
2328
2347
  const i = p(() => {
2329
2348
  if (t.data) {
2330
- if (Ke(t.data))
2349
+ if (Je(t.data))
2331
2350
  return a.get("single");
2332
2351
  if (!t.type)
2333
2352
  throw new Error("Bar chart needs a type when there's multiple datasets.");
2334
2353
  return a.get(t.type);
2335
2354
  }
2336
2355
  });
2337
- return (c, v) => (_(), W(tn(l(i)), M({ ...t, ...c.$attrs }, {
2356
+ return (c, v) => (_(), W(an(l(i)), C({ ...t, ...c.$attrs }, {
2338
2357
  options: s(c.options)
2339
2358
  }), ue({ _: 2 }, [
2340
- z(l(u), (d, h) => ({
2341
- name: h,
2342
- fn: V((k) => [
2343
- R(c.$slots, h, ie(se(k || {})))
2359
+ z(l(u), (d, m) => ({
2360
+ name: m,
2361
+ fn: V((y) => [
2362
+ M(c.$slots, m, ie(se(y || {})))
2344
2363
  ])
2345
2364
  }))
2346
2365
  ]), 1040, ["options"]));
2347
2366
  }
2348
2367
  });
2349
- function Pa(e) {
2350
- return Object.values(wn).includes(e) || e == null;
2368
+ function Wa(e) {
2369
+ return Object.values(Nn).includes(e) || e == null;
2351
2370
  }
2352
- function za(e) {
2353
- return Object.values(D).includes(e);
2371
+ function Ua(e) {
2372
+ return Object.values(H).includes(e);
2354
2373
  }
2355
- const Za = (e = !1) => ({
2374
+ const Xa = (e = !1) => ({
2356
2375
  type: {
2357
2376
  type: String,
2358
2377
  default: null,
2359
- validator: Pa
2378
+ validator: Wa
2360
2379
  },
2361
2380
  ...e ? {
2362
2381
  orientation: {
2363
2382
  type: String,
2364
- default: D.VERTICAL,
2365
- validator: za
2383
+ default: H.VERTICAL,
2384
+ validator: Ua
2366
2385
  }
2367
2386
  } : {}
2368
2387
  });
2369
- function Zt(e) {
2388
+ function Wt(e) {
2370
2389
  const t = p(() => e.value.map((o) => ({
2371
2390
  ...o,
2372
2391
  values: o.values.map((r) => ({
@@ -2381,12 +2400,12 @@ function Zt(e) {
2381
2400
  });
2382
2401
  return { multiBarData: t, groupedData: n };
2383
2402
  }
2384
- function Wa(e, t) {
2403
+ function Ya(e, t) {
2385
2404
  return e.value.length === 1 ? "single" : t.value;
2386
2405
  }
2387
- function Ua(e, t, n) {
2406
+ function Ka(e, t, n) {
2388
2407
  const o = p(
2389
- () => n.value === D.HORIZONTAL
2408
+ () => n.value === H.HORIZONTAL
2390
2409
  );
2391
2410
  function r(s) {
2392
2411
  Math.min(...s.domain()) > 0 && console.error("Bar linear scale domain cannot start above 0!");
@@ -2394,13 +2413,13 @@ function Ua(e, t, n) {
2394
2413
  const a = p(() => o.value ? (() => (r(e.value), e.value))() : e.value), u = p(() => o.value ? t.value : (() => (r(t.value), t.value))());
2395
2414
  return { barXScale: a, barYScale: u };
2396
2415
  }
2397
- function Xa(e, t, n, o, r, a) {
2416
+ function Ja(e, t, n, o, r, a) {
2398
2417
  const u = p(
2399
- () => o.value === D.HORIZONTAL
2418
+ () => o.value === H.HORIZONTAL
2400
2419
  );
2401
- function s(d, h) {
2402
- let k, m;
2403
- return u.value ? (k = d >= 0 ? t.value(0) : t.value(d), m = n.value(n.value.domain()[h])) : (k = t.value(t.value.domain()[h]), m = d < 0 ? n.value(0) : n.value(d)), { x: k, y: m };
2420
+ function s(d, m) {
2421
+ let y, h;
2422
+ return u.value ? (y = d >= 0 ? t.value(0) : t.value(d), h = n.value(n.value.domain()[m])) : (y = t.value(t.value.domain()[m]), h = d < 0 ? n.value(0) : n.value(d)), { x: y, y: h };
2404
2423
  }
2405
2424
  function i(d) {
2406
2425
  return u.value ? d < 0 ? t.value(0) - t.value(d) : t.value(d) - t.value(0) : t.value.bandwidth();
@@ -2408,60 +2427,60 @@ function Xa(e, t, n, o, r, a) {
2408
2427
  function c(d) {
2409
2428
  return u.value ? n.value.bandwidth() : d < 0 ? n.value(d) - n.value(0) : n.value(0) - n.value(d);
2410
2429
  }
2411
- function v(d, h, k) {
2412
- const { value: m, color: A } = d, f = A ?? e.value[h].color ?? Ee, { x: y, y: E } = s(m, k), w = i(m), N = c(m);
2430
+ function v(d, m, y) {
2431
+ const { value: h, color: A } = d, O = A ?? e.value[m].color ?? Ee, { x: f, y: x } = s(h, y), N = i(h), $ = c(h);
2413
2432
  return {
2414
- classList: [`lume-fill--${f}`, ...a],
2415
- x: y,
2416
- y: E,
2417
- width: w,
2418
- height: N,
2419
- isFaded: r.value !== -1 && r.value !== k,
2420
- isNegative: m < 0
2433
+ classList: [`lume-fill--${O}`, ...a],
2434
+ x: f,
2435
+ y: x,
2436
+ width: N,
2437
+ height: $,
2438
+ isFaded: r.value !== -1 && r.value !== y,
2439
+ isNegative: h < 0
2421
2440
  };
2422
2441
  }
2423
2442
  return { barAttributeGenerator: v };
2424
2443
  }
2425
- function Ya(e, t, n, o, r, a) {
2444
+ function Qa(e, t, n, o, r, a) {
2426
2445
  const u = p(
2427
- () => o.value === D.HORIZONTAL
2428
- ), s = p(() => $e().domain(e.value.map((m, A) => A)).range([0, t.value.bandwidth()]).padding(0)), i = p(() => $e().domain(e.value.map((m, A) => A)).range([0, n.value.bandwidth()]).padding(0));
2429
- function c(m, A, f) {
2446
+ () => o.value === H.HORIZONTAL
2447
+ ), s = p(() => $e().domain(e.value.map((h, A) => A)).range([0, t.value.bandwidth()]).padding(0)), i = p(() => $e().domain(e.value.map((h, A) => A)).range([0, n.value.bandwidth()]).padding(0));
2448
+ function c(h, A, O) {
2430
2449
  if (u.value)
2431
- return m >= 0 ? t.value(0) : t.value(m);
2432
- const y = t.value.domain();
2433
- return t.value(y[A]) + s.value(f);
2450
+ return h >= 0 ? t.value(0) : t.value(h);
2451
+ const f = t.value.domain();
2452
+ return t.value(f[A]) + s.value(O);
2434
2453
  }
2435
- function v(m, A, f) {
2454
+ function v(h, A, O) {
2436
2455
  if (u.value) {
2437
- const y = n.value.domain();
2438
- return n.value(y[A]) + i.value(f);
2456
+ const f = n.value.domain();
2457
+ return n.value(f[A]) + i.value(O);
2439
2458
  }
2440
- return m < 0 ? n.value(0) : n.value(m);
2459
+ return h < 0 ? n.value(0) : n.value(h);
2441
2460
  }
2442
- function d(m) {
2443
- return u.value ? m < 0 ? t.value(0) - t.value(m) : t.value(m) - t.value(0) : s.value.bandwidth();
2461
+ function d(h) {
2462
+ return u.value ? h < 0 ? t.value(0) - t.value(h) : t.value(h) - t.value(0) : s.value.bandwidth();
2444
2463
  }
2445
- function h(m) {
2446
- return u.value ? i.value.bandwidth() : m < 0 ? n.value(m) - n.value(0) : n.value(0) - n.value(m);
2464
+ function m(h) {
2465
+ return u.value ? i.value.bandwidth() : h < 0 ? n.value(h) - n.value(0) : n.value(0) - n.value(h);
2447
2466
  }
2448
- function k(m, A, f) {
2449
- const { value: y, color: E } = m, w = E ?? e.value[A].color ?? Object.values(re)[A], N = c(y, f, A), $ = v(y, f, A), H = d(y), S = h(y);
2467
+ function y(h, A, O) {
2468
+ const { value: f, color: x } = h, N = x ?? e.value[A].color ?? Object.values(re)[A], $ = c(f, O, A), w = v(f, O, A), D = d(f), S = m(f);
2450
2469
  return {
2451
- classList: [`lume-fill--${w}`, ...a],
2452
- x: N,
2453
- y: $,
2454
- width: H,
2470
+ classList: [`lume-fill--${N}`, ...a],
2471
+ x: $,
2472
+ y: w,
2473
+ width: D,
2455
2474
  height: S,
2456
- isFaded: r.value !== -1 && r.value !== f,
2457
- isNegative: y < 0
2475
+ isFaded: r.value !== -1 && r.value !== O,
2476
+ isNegative: f < 0
2458
2477
  };
2459
2478
  }
2460
- return { barAttributeGenerator: k };
2479
+ return { barAttributeGenerator: y };
2461
2480
  }
2462
- function Ka(e, t, n) {
2481
+ function qa(e, t, n) {
2463
2482
  const o = p(
2464
- () => t.value === D.HORIZONTAL
2483
+ () => t.value === H.HORIZONTAL
2465
2484
  ), r = p(() => {
2466
2485
  const i = e.value.map(
2467
2486
  (c) => c.filter((v) => v.value < 0).reduce((v, d) => v + d.value, 0)
@@ -2478,8 +2497,8 @@ function Ka(e, t, n) {
2478
2497
  });
2479
2498
  function u(i, c, v) {
2480
2499
  return o.value ? xe().domain([r.value, a.value]).range([0, v.width]) : Object.assign(
2481
- _t(
2482
- $e().domain(c.map((d, h) => h)).range([0, v.width]),
2500
+ yt(
2501
+ $e().domain(c.map((d, m) => m)).range([0, v.width]),
2483
2502
  t.value,
2484
2503
  n.value
2485
2504
  ),
@@ -2488,8 +2507,8 @@ function Ka(e, t, n) {
2488
2507
  }
2489
2508
  function s(i, c, v) {
2490
2509
  return o.value ? Object.assign(
2491
- _t(
2492
- $e().domain(c.map((d, h) => h)).range([0, v.height]),
2510
+ yt(
2511
+ $e().domain(c.map((d, m) => m)).range([0, v.height]),
2493
2512
  t.value,
2494
2513
  n.value
2495
2514
  ),
@@ -2498,66 +2517,66 @@ function Ka(e, t, n) {
2498
2517
  }
2499
2518
  return { stackedXScaleGenerator: u, stackedYScaleGenerator: s };
2500
2519
  }
2501
- function Ja(e, t, n, o, r, a) {
2520
+ function er(e, t, n, o, r, a) {
2502
2521
  const u = p(
2503
- () => o.value === D.HORIZONTAL
2522
+ () => o.value === H.HORIZONTAL
2504
2523
  ), s = p(
2505
2524
  () => u.value ? n.value.domain() : t.value.domain()
2506
2525
  ), i = p(
2507
- () => e.value.map((y) => y.values.map((E) => E == null ? void 0 : E.value))
2526
+ () => e.value.map((f) => f.values.map((x) => x == null ? void 0 : x.value))
2508
2527
  );
2509
- function c(y, E, w) {
2510
- let N, $;
2511
- return u.value ? (N = t.value(y >= 0 ? 0 + w : y + w), $ = n.value(s.value[E])) : (N = t.value(s.value[E]), $ = n.value(y >= 0 ? y + w : 0 + w)), { x: N, y: $ };
2528
+ function c(f, x, N) {
2529
+ let $, w;
2530
+ return u.value ? ($ = t.value(f >= 0 ? 0 + N : f + N), w = n.value(s.value[x])) : ($ = t.value(s.value[x]), w = n.value(f >= 0 ? f + N : 0 + N)), { x: $, y: w };
2512
2531
  }
2513
- function v(y) {
2514
- return u.value ? t.value(y) - t.value(0) : t.value.bandwidth();
2532
+ function v(f) {
2533
+ return u.value ? t.value(f) - t.value(0) : t.value.bandwidth();
2515
2534
  }
2516
- function d(y) {
2517
- return u.value ? t.value(0) - t.value(y) : t.value.bandwidth();
2535
+ function d(f) {
2536
+ return u.value ? t.value(0) - t.value(f) : t.value.bandwidth();
2518
2537
  }
2519
- function h(y) {
2520
- return u.value ? n.value.bandwidth() : n.value(0) - n.value(y);
2538
+ function m(f) {
2539
+ return u.value ? n.value.bandwidth() : n.value(0) - n.value(f);
2521
2540
  }
2522
- function k(y) {
2523
- return u.value ? n.value.bandwidth() : n.value(y) - n.value(0);
2541
+ function y(f) {
2542
+ return u.value ? n.value.bandwidth() : n.value(f) - n.value(0);
2524
2543
  }
2525
- function m(y, E) {
2526
- return y ? i.value.reduce((w, N, $) => ($ < y && N[E] >= 0 && (w += N[E]), w), 0) : 0;
2544
+ function h(f, x) {
2545
+ return f ? i.value.reduce((N, $, w) => (w < f && $[x] >= 0 && (N += $[x]), N), 0) : 0;
2527
2546
  }
2528
- function A(y, E) {
2529
- return y ? i.value.reduce((w, N, $) => ($ < y && N[E] < 0 && (w += N[E]), w), 0) : 0;
2547
+ function A(f, x) {
2548
+ return f ? i.value.reduce((N, $, w) => (w < f && $[x] < 0 && (N += $[x]), N), 0) : 0;
2530
2549
  }
2531
- function f(y, E, w) {
2532
- const { value: N, color: $ } = y, H = N >= 0 ? v(N) : d(N), S = N >= 0 ? h(N) : k(N), Y = N >= 0 ? m(E, w) : A(E, w), { x: K, y: F } = c(N, w, Y);
2550
+ function O(f, x, N) {
2551
+ const { value: $, color: w } = f, D = $ >= 0 ? v($) : d($), S = $ >= 0 ? m($) : y($), Y = $ >= 0 ? h(x, N) : A(x, N), { x: ne, y: P } = c($, N, Y);
2533
2552
  return {
2534
- classList: [`lume-fill--${$ ?? e.value[E].color ?? Object.values(re)[E]}`, ...a],
2535
- width: H,
2553
+ classList: [`lume-fill--${w ?? e.value[x].color ?? Object.values(re)[x]}`, ...a],
2554
+ width: D,
2536
2555
  height: S,
2537
- x: K,
2538
- y: F,
2539
- isFaded: r.value !== -1 && r.value !== w,
2540
- isNegative: N < 0
2556
+ x: ne,
2557
+ y: P,
2558
+ isFaded: r.value !== -1 && r.value !== N,
2559
+ isNegative: $ < 0
2541
2560
  };
2542
2561
  }
2543
- return { barAttributeGenerator: f };
2562
+ return { barAttributeGenerator: O };
2544
2563
  }
2545
- const Qa = {
2564
+ const tr = {
2546
2565
  class: "lume-bar-group",
2547
2566
  "data-j-bars-group": ""
2548
- }, qa = ["onMouseenter"], er = {
2549
- single: Xa,
2550
- grouped: Ya,
2551
- stacked: Ja
2552
- }, nt = /* @__PURE__ */ Z({
2567
+ }, nr = ["onMouseenter"], or = {
2568
+ single: Ja,
2569
+ grouped: Qa,
2570
+ stacked: er
2571
+ }, ot = /* @__PURE__ */ Z({
2553
2572
  __name: "lume-bar-group",
2554
2573
  props: {
2555
- ...Ce(),
2574
+ ...Se(),
2556
2575
  classList: {
2557
2576
  type: [String, Array],
2558
2577
  default: () => []
2559
2578
  },
2560
- ...Za(!0),
2579
+ ...Xa(!0),
2561
2580
  transition: {
2562
2581
  type: Boolean,
2563
2582
  default: !0
@@ -2574,176 +2593,176 @@ const Qa = {
2574
2593
  xScale: i,
2575
2594
  yScale: c,
2576
2595
  classList: v
2577
- } = q(n), { groupedData: d } = Zt(o), { barXScale: h, barYScale: k } = Ua(i, c, a), m = p(() => typeof v.value == "string" ? [v.value] : v.value), A = p(() => {
2578
- const y = Wa(o, s), { barAttributeGenerator: E } = er[y](
2596
+ } = q(n), { groupedData: d } = Wt(o), { barXScale: m, barYScale: y } = Ka(i, c, a), h = p(() => typeof v.value == "string" ? [v.value] : v.value), A = p(() => {
2597
+ const f = Ya(o, s), { barAttributeGenerator: x } = or[f](
2579
2598
  o,
2580
- h,
2581
- k,
2599
+ m,
2600
+ y,
2582
2601
  a,
2583
2602
  r,
2584
- m.value
2603
+ h.value
2585
2604
  );
2586
- return E;
2587
- }), f = p(() => {
2605
+ return x;
2606
+ }), O = p(() => {
2588
2607
  if (u.value)
2589
- return a.value === D.HORIZONTAL ? "width" : "height";
2608
+ return a.value === H.HORIZONTAL ? "width" : "height";
2590
2609
  });
2591
- return (y, E) => (_(), L("g", Qa, [
2592
- (_(!0), L(J, null, z(l(d), (w, N) => (_(), L("g", {
2593
- key: N,
2594
- onMouseenter: ($) => t("lume__internal--hover", N)
2610
+ return (f, x) => (_(), L("g", tr, [
2611
+ (_(!0), L(J, null, z(l(d), (N, $) => (_(), L("g", {
2612
+ key: $,
2613
+ onMouseenter: (w) => t("lume__internal--hover", $)
2595
2614
  }, [
2596
- (_(!0), L(J, null, z(w, ($, H) => (_(), W(l(qe), M(l(A)($, H, N, w), {
2597
- key: `bar-${H}`,
2598
- transition: l(f),
2615
+ (_(!0), L(J, null, z(N, (w, D) => (_(), W(l(et), C(l(A)(w, D, $, N), {
2616
+ key: `bar-${D}`,
2617
+ transition: l(O),
2599
2618
  "data-j-lume-bar": "",
2600
2619
  onClick: (S) => t("bar-click", {
2601
- index: N,
2602
- datasetIndex: H,
2620
+ index: $,
2621
+ datasetIndex: D,
2603
2622
  event: S
2604
2623
  })
2605
2624
  }), null, 16, ["transition", "onClick"]))), 128))
2606
- ], 40, qa))), 128))
2625
+ ], 40, nr))), 128))
2607
2626
  ]));
2608
2627
  }
2609
- }), tr = {
2610
- [D.VERTICAL]: {
2628
+ }), ar = {
2629
+ [H.VERTICAL]: {
2611
2630
  withTooltip: !0,
2612
2631
  xAxisOptions: {},
2613
2632
  yAxisOptions: { gridLines: !0 },
2614
- margins: _e.VERTICAL
2633
+ margins: ge.VERTICAL
2615
2634
  },
2616
- [D.HORIZONTAL]: {
2635
+ [H.HORIZONTAL]: {
2617
2636
  withTooltip: !0,
2618
2637
  xAxisOptions: { gridLines: !0 },
2619
2638
  yAxisOptions: { gridLines: !1 },
2620
- margins: _e.HORIZONTAL
2639
+ margins: ge.HORIZONTAL
2621
2640
  }
2622
- }, Nr = /* @__PURE__ */ Z({
2641
+ }, Br = /* @__PURE__ */ Z({
2623
2642
  __name: "lume-single-bar-chart",
2624
2643
  props: {
2625
- ...Te(Ke)
2644
+ ...Le(Je)
2626
2645
  },
2627
2646
  setup(e) {
2628
- const t = e, n = ke(oe()), { orientation: o, options: r } = q(t), a = p(
2629
- () => tr[o.value || D.VERTICAL]
2647
+ const t = e, n = ye(oe()), { orientation: o, options: r } = q(t), a = p(
2648
+ () => ar[o.value || H.VERTICAL]
2630
2649
  // needs to be computed so that default options are reactive
2631
2650
  ), { allOptions: u } = ce(r, a);
2632
- return (s, i) => (_(), W(l(Le), M(t, {
2651
+ return (s, i) => (_(), W(l(Oe), C(t, {
2633
2652
  "chart-type": "single-bar",
2634
2653
  options: l(u),
2635
2654
  "data-j-single-bar-chart": ""
2636
2655
  }), ue({
2637
2656
  groups: V((c) => [
2638
- ae(l(nt), M(c, { orientation: l(o) }), null, 16, ["orientation"])
2657
+ ae(l(ot), C(c, { orientation: l(o) }), null, 16, ["orientation"])
2639
2658
  ]),
2640
2659
  _: 2
2641
2660
  }, [
2642
2661
  z(l(n), (c, v) => ({
2643
2662
  name: v,
2644
2663
  fn: V((d) => [
2645
- R(s.$slots, v, ie(se(d || {})))
2664
+ M(s.$slots, v, ie(se(d || {})))
2646
2665
  ])
2647
2666
  }))
2648
2667
  ]), 1040, ["options"]));
2649
2668
  }
2650
- }), nr = {
2651
- [D.VERTICAL]: {
2669
+ }), rr = {
2670
+ [H.VERTICAL]: {
2652
2671
  withTooltip: !0,
2653
2672
  xAxisOptions: {},
2654
2673
  yAxisOptions: { gridLines: !0 },
2655
- margins: _e.VERTICAL
2674
+ margins: ge.VERTICAL
2656
2675
  },
2657
- [D.HORIZONTAL]: {
2676
+ [H.HORIZONTAL]: {
2658
2677
  withTooltip: !0,
2659
2678
  xAxisOptions: { gridLines: !0 },
2660
2679
  yAxisOptions: { gridLines: !1 },
2661
- margins: _e.HORIZONTAL,
2680
+ margins: ge.HORIZONTAL,
2662
2681
  tooltipOptions: { position: "right" }
2663
2682
  }
2664
- }, Dr = /* @__PURE__ */ Z({
2683
+ }, Rr = /* @__PURE__ */ Z({
2665
2684
  __name: "lume-grouped-bar-chart",
2666
2685
  props: {
2667
- ...Te()
2686
+ ...Le()
2668
2687
  },
2669
2688
  setup(e) {
2670
- const t = e, n = ke(oe()), { orientation: o, options: r } = q(t), a = p(
2671
- () => nr[o.value || D.VERTICAL]
2689
+ const t = e, n = ye(oe()), { orientation: o, options: r } = q(t), a = p(
2690
+ () => rr[o.value || H.VERTICAL]
2672
2691
  // needs to be computed so that default options are reactive
2673
2692
  ), { allOptions: u } = ce(
2674
2693
  r,
2675
2694
  a
2676
2695
  );
2677
- return (s, i) => (_(), W(l(Le), M(t, {
2696
+ return (s, i) => (_(), W(l(Oe), C(t, {
2678
2697
  "chart-type": "grouped-bar",
2679
2698
  options: l(u),
2680
2699
  "data-j-grouped-bar-chart": ""
2681
2700
  }), ue({
2682
2701
  groups: V((c) => [
2683
- ae(l(nt), M(c, { type: "grouped" }), null, 16)
2702
+ ae(l(ot), C(c, { type: "grouped" }), null, 16)
2684
2703
  ]),
2685
2704
  _: 2
2686
2705
  }, [
2687
2706
  z(l(n), (c, v) => ({
2688
2707
  name: v,
2689
2708
  fn: V((d) => [
2690
- R(s.$slots, v, ie(se(d || {})))
2709
+ M(s.$slots, v, ie(se(d || {})))
2691
2710
  ])
2692
2711
  }))
2693
2712
  ]), 1040, ["options"]));
2694
2713
  }
2695
- }), or = {
2696
- [D.VERTICAL]: {
2714
+ }), lr = {
2715
+ [H.VERTICAL]: {
2697
2716
  withTooltip: !0,
2698
2717
  xAxisOptions: {},
2699
2718
  yAxisOptions: { gridLines: !0 },
2700
- margins: _e.VERTICAL
2719
+ margins: ge.VERTICAL
2701
2720
  },
2702
- [D.HORIZONTAL]: {
2721
+ [H.HORIZONTAL]: {
2703
2722
  withTooltip: !0,
2704
2723
  xAxisOptions: { gridLines: !0 },
2705
2724
  yAxisOptions: { gridLines: !1 },
2706
- margins: _e.HORIZONTAL,
2725
+ margins: ge.HORIZONTAL,
2707
2726
  tooltipOptions: { position: "right" }
2708
2727
  }
2709
- }, Hr = /* @__PURE__ */ Z({
2728
+ }, Mr = /* @__PURE__ */ Z({
2710
2729
  __name: "lume-stacked-bar-chart",
2711
2730
  props: {
2712
- ...Te()
2731
+ ...Le()
2713
2732
  },
2714
2733
  setup(e) {
2715
- const t = e, n = ke(oe()), { data: o, orientation: r, options: a } = q(t), u = p(
2716
- () => or[r.value || D.VERTICAL]
2734
+ const t = e, n = ye(oe()), { data: o, orientation: r, options: a } = q(t), u = p(
2735
+ () => lr[r.value || H.VERTICAL]
2717
2736
  // needs to be computed so that default options are reactive
2718
2737
  ), { allOptions: s } = ce(
2719
2738
  a,
2720
2739
  u
2721
- ), { internalData: i } = tt(o), { groupedData: c } = Zt(i), { stackedXScaleGenerator: v, stackedYScaleGenerator: d } = Ka(
2740
+ ), { internalData: i } = nt(o), { groupedData: c } = Wt(i), { stackedXScaleGenerator: v, stackedYScaleGenerator: d } = qa(
2722
2741
  c,
2723
2742
  r,
2724
2743
  a
2725
2744
  );
2726
- return (h, k) => (_(), W(l(Le), M(t, {
2745
+ return (m, y) => (_(), W(l(Oe), C(t, {
2727
2746
  "chart-type": "stacked-bar",
2728
2747
  options: l(s),
2729
2748
  "x-scale": l(v),
2730
2749
  "y-scale": l(d),
2731
2750
  "data-j-stacked-bar-chart": ""
2732
2751
  }), ue({
2733
- groups: V((m) => [
2734
- ae(l(nt), M(m, { type: "stacked" }), null, 16)
2752
+ groups: V((h) => [
2753
+ ae(l(ot), C(h, { type: "stacked" }), null, 16)
2735
2754
  ]),
2736
2755
  _: 2
2737
2756
  }, [
2738
- z(l(n), (m, A) => ({
2757
+ z(l(n), (h, A) => ({
2739
2758
  name: A,
2740
- fn: V((f) => [
2741
- R(h.$slots, A, ie(se(f || {})))
2759
+ fn: V((O) => [
2760
+ M(m.$slots, A, ie(se(O || {})))
2742
2761
  ])
2743
2762
  }))
2744
2763
  ]), 1040, ["options", "x-scale", "y-scale"]));
2745
2764
  }
2746
- }), ar = ["d", "stroke-width"], rr = 2, lr = /* @__PURE__ */ Z({
2765
+ }), ur = ["d", "stroke-width"], ir = 2, sr = /* @__PURE__ */ Z({
2747
2766
  __name: "lume-line",
2748
2767
  props: {
2749
2768
  pathDefinition: {
@@ -2752,7 +2771,7 @@ const Qa = {
2752
2771
  },
2753
2772
  width: {
2754
2773
  type: Number,
2755
- default: rr
2774
+ default: ir
2756
2775
  },
2757
2776
  color: {
2758
2777
  type: String,
@@ -2777,27 +2796,27 @@ const Qa = {
2777
2796
  },
2778
2797
  emits: ["click"],
2779
2798
  setup(e, { emit: t }) {
2780
- const n = C(null);
2781
- return pe(() => Se(n.value)), (o, r) => (_(), L("path", {
2799
+ const n = R(null);
2800
+ return pe(() => Me(n.value)), (o, r) => (_(), L("path", {
2782
2801
  ref_key: "root",
2783
2802
  ref: n,
2784
- class: te(["lume-line", {
2803
+ class: ee(["lume-line", {
2785
2804
  [`lume-stroke--${e.color}`]: !0,
2786
2805
  "lume-line--dashed": e.dashed,
2787
2806
  "lume-line--transition": e.transition
2788
2807
  }]),
2789
2808
  d: e.pathDefinition,
2790
2809
  "stroke-width": e.width,
2791
- style: Ot({
2810
+ style: $t({
2792
2811
  animationDelay: e.transition && e.animationDelay + "s",
2793
2812
  animationDuration: e.transition && e.animationDuration + "s"
2794
2813
  }),
2795
2814
  "data-j-line": "",
2796
2815
  onClick: r[0] || (r[0] = (a) => t("click", a))
2797
- }, null, 14, ar));
2816
+ }, null, 14, ur));
2798
2817
  }
2799
2818
  });
2800
- const ur = /* @__PURE__ */ Q(lr, [["__scopeId", "data-v-08896455"]]), ir = ["cx", "cy", "r", "stroke-width"], sr = 4, cr = /* @__PURE__ */ Z({
2819
+ const cr = /* @__PURE__ */ Q(sr, [["__scopeId", "data-v-08896455"]]), dr = ["cx", "cy", "r", "stroke-width"], vr = 4, pr = /* @__PURE__ */ Z({
2801
2820
  __name: "lume-point",
2802
2821
  props: {
2803
2822
  x: { type: Number, required: !0 },
@@ -2808,7 +2827,7 @@ const ur = /* @__PURE__ */ Q(lr, [["__scopeId", "data-v-08896455"]]), ir = ["cx"
2808
2827
  },
2809
2828
  radius: {
2810
2829
  type: Number,
2811
- default: sr
2830
+ default: vr
2812
2831
  },
2813
2832
  active: {
2814
2833
  type: Boolean,
@@ -2817,22 +2836,22 @@ const ur = /* @__PURE__ */ Q(lr, [["__scopeId", "data-v-08896455"]]), ir = ["cx"
2817
2836
  },
2818
2837
  emits: ["click"],
2819
2838
  setup(e, { emit: t }) {
2820
- const n = e, o = C(null), r = p(() => n.radius / 2);
2821
- return pe(() => Se(o.value)), (a, u) => (_(), L("circle", {
2839
+ const n = e, o = R(null), r = p(() => n.radius / 2);
2840
+ return pe(() => Me(o.value)), (a, u) => (_(), L("circle", {
2822
2841
  ref_key: "root",
2823
2842
  ref: o,
2824
- class: te(["lume-point", `lume-stroke--${e.color}`]),
2843
+ class: ee(["lume-point", `lume-stroke--${e.color}`]),
2825
2844
  cx: e.x,
2826
2845
  cy: e.y,
2827
2846
  r: e.active ? e.radius : 0,
2828
2847
  "stroke-width": l(r),
2829
2848
  "data-j-point": "",
2830
2849
  onClick: u[0] || (u[0] = (s) => t("click", s))
2831
- }, null, 10, ir));
2850
+ }, null, 10, dr));
2832
2851
  }
2833
2852
  });
2834
- const dr = /* @__PURE__ */ Q(cr, [["__scopeId", "data-v-9bacbd7d"]]);
2835
- function Wt(e) {
2853
+ const fr = /* @__PURE__ */ Q(pr, [["__scopeId", "data-v-9bacbd7d"]]);
2854
+ function Ut(e) {
2836
2855
  function t(a) {
2837
2856
  let u = null;
2838
2857
  return a == null ? void 0 : a.reduce((s, i, c) => (i == null || i.value == null ? (u ? u.push(c) : u = [c], c === (a == null ? void 0 : a.length) - 1 && s.push(u)) : u && (s.push(u), u = null), s), []);
@@ -2856,19 +2875,19 @@ function Wt(e) {
2856
2875
  values: a.values.map((s, i) => {
2857
2876
  var v, d;
2858
2877
  const c = u.find(
2859
- (h) => h.includes(i)
2878
+ (m) => m.includes(i)
2860
2879
  );
2861
2880
  if (c) {
2862
- const h = c[0] - 1, k = c[c.length - 1] + 1;
2863
- let m = (v = a.values[h]) == null ? void 0 : v.value, A = (d = a.values[k]) == null ? void 0 : d.value;
2864
- return m == null && (m = A), A == null && (A = m), {
2881
+ const m = c[0] - 1, y = c[c.length - 1] + 1;
2882
+ let h = (v = a.values[m]) == null ? void 0 : v.value, A = (d = a.values[y]) == null ? void 0 : d.value;
2883
+ return h == null && (h = A), A == null && (A = h), {
2865
2884
  value: n(
2866
- m,
2885
+ h,
2867
2886
  A,
2868
2887
  c.length,
2869
2888
  c.indexOf(i)
2870
2889
  ),
2871
- label: Ht
2890
+ label: Bt
2872
2891
  };
2873
2892
  }
2874
2893
  return s;
@@ -2876,29 +2895,29 @@ function Wt(e) {
2876
2895
  };
2877
2896
  })) };
2878
2897
  }
2879
- function vr(e, t) {
2898
+ function mr(e, t) {
2880
2899
  const n = e.bandwidth() / 2;
2881
2900
  return (o, r) => e(e.domain()[t + (r - 1)]) + n;
2882
2901
  }
2883
- function pr(e, t) {
2902
+ function hr(e, t) {
2884
2903
  return (n, o) => e(t + (o - 1));
2885
2904
  }
2886
- function fr(e, t, n, o) {
2887
- return rn().x(
2888
- ye(n) ? vr(n, e) : pr(n, e)
2905
+ function gr(e, t, n, o) {
2906
+ return sn().x(
2907
+ _e(n) ? mr(n, e) : hr(n, e)
2889
2908
  ).y((a) => o(a))(t);
2890
2909
  }
2891
- const hr = {
2910
+ const _r = {
2892
2911
  class: "lume-line-group",
2893
2912
  "data-j-lume-line-group": ""
2894
- }, mr = { class: "lume-line-group__lines" }, gr = {
2913
+ }, yr = { class: "lume-line-group__lines" }, kr = {
2895
2914
  key: 0,
2896
2915
  class: "lume-line-group__points",
2897
2916
  "data-j-lume-line-group__points": ""
2898
- }, _r = 1, yr = /* @__PURE__ */ Z({
2917
+ }, br = 1, Ar = /* @__PURE__ */ Z({
2899
2918
  __name: "lume-line-group",
2900
2919
  props: {
2901
- ...Ce(),
2920
+ ...Se(),
2902
2921
  withPoints: {
2903
2922
  type: Boolean,
2904
2923
  default: !0
@@ -2913,77 +2932,77 @@ const hr = {
2913
2932
  const n = e, { data: o, options: r, xScale: a, yScale: u } = q(n), s = Be(
2914
2933
  "tooltipAnchorAttributes",
2915
2934
  null
2916
- ), { updateTooltipAnchorAttributes: i } = Vt(
2935
+ ), { updateTooltipAnchorAttributes: i } = Pt(
2917
2936
  s,
2918
2937
  r,
2919
2938
  a,
2920
2939
  u
2921
2940
  ), c = p(() => {
2922
- if (o.value.every((H) => H.isDashed))
2941
+ if (o.value.every((D) => D.isDashed))
2923
2942
  return o.value;
2924
- const { computedLineData: $ } = Wt(o);
2925
- return r.value.withTooltip !== !1 && (s != null && s.value) && i($.value), $.value;
2943
+ const { computedLineData: w } = Ut(o);
2944
+ return r.value.withTooltip !== !1 && (s != null && s.value) && i(w.value), w.value;
2926
2945
  }), v = p(() => {
2927
2946
  if (n.hoveredIndex === -1)
2928
2947
  return;
2929
- const $ = yn(
2948
+ const w = An(
2930
2949
  c.value,
2931
2950
  n.hoveredIndex
2932
2951
  );
2933
2952
  return {
2934
- d: `M ${Pe(a.value, n.hoveredIndex)},${u.value.range()[1]}
2935
- V ${u.value($)}`
2953
+ d: `M ${ze(a.value, n.hoveredIndex)},${u.value.range()[1]}
2954
+ V ${u.value(w)}`
2936
2955
  // Move to X index, Vertical line to the highest point
2937
2956
  };
2938
2957
  }), d = p(
2939
- () => a.value && _r / (kn(a.value) - 1)
2958
+ () => a.value && br / (Tn(a.value) - 1)
2940
2959
  // Subtracting the first line (read below)
2941
- ), h = p(
2960
+ ), m = p(
2942
2961
  () => {
2943
- var $;
2944
- return (($ = r.value) == null ? void 0 : $.lineWidth) * 2 || void 0;
2962
+ var w;
2963
+ return ((w = r.value) == null ? void 0 : w.lineWidth) * 2 || void 0;
2945
2964
  }
2946
2965
  // If no `lineWidth`, returns NaN which needs to be undefined
2947
- ), k = p(
2966
+ ), y = p(
2948
2967
  () => a.value.bandwidth() / 2
2949
- ), m = p(() => a.value.domain()), A = p(
2968
+ ), h = p(() => a.value.domain()), A = p(
2950
2969
  () => r.value.withPoints ?? n.withPoints
2951
2970
  );
2952
- function f($) {
2953
- return c.value[$].values;
2971
+ function O(w) {
2972
+ return c.value[w].values;
2954
2973
  }
2955
- function y($, H) {
2956
- var Y, K;
2957
- const S = $ === 0 ? [] : [
2958
- (Y = f(H)[$ - 1]) == null ? void 0 : Y.value,
2959
- (K = f(H)[$]) == null ? void 0 : K.value
2974
+ function f(w, D) {
2975
+ var Y, ne;
2976
+ const S = w === 0 ? [] : [
2977
+ (Y = O(D)[w - 1]) == null ? void 0 : Y.value,
2978
+ (ne = O(D)[w]) == null ? void 0 : ne.value
2960
2979
  ];
2961
- return fr(
2962
- $,
2980
+ return gr(
2981
+ w,
2963
2982
  S,
2964
2983
  a.value,
2965
2984
  u.value
2966
2985
  ) || "";
2967
2986
  }
2968
- function E($) {
2987
+ function x(w) {
2969
2988
  return {
2970
- animationDelay: $ < 2 ? 0 : ($ - 1) * d.value,
2989
+ animationDelay: w < 2 ? 0 : (w - 1) * d.value,
2971
2990
  animationDuration: d.value
2972
2991
  };
2973
2992
  }
2974
- function w($, H) {
2993
+ function N(w, D) {
2975
2994
  var Y;
2976
- const S = (Y = f(H)[$]) == null ? void 0 : Y.value;
2995
+ const S = (Y = O(D)[w]) == null ? void 0 : Y.value;
2977
2996
  return {
2978
- x: ye(a.value) ? n.xScale(m.value[$]) + k.value : n.xScale($),
2997
+ x: _e(a.value) ? n.xScale(h.value[w]) + y.value : n.xScale(w),
2979
2998
  y: u.value(S)
2980
2999
  };
2981
3000
  }
2982
- function N($) {
2983
- return n.hoveredIndex === $;
3001
+ function $(w) {
3002
+ return n.hoveredIndex === w;
2984
3003
  }
2985
- return ($, H) => (_(), L("g", hr, [
2986
- G("path", M(l(v), {
3004
+ return (w, D) => (_(), L("g", _r, [
3005
+ G("path", C(l(v), {
2987
3006
  class: "lume-line-group__overlay-line",
2988
3007
  "data-j-lume-line-group__overlay-line": ""
2989
3008
  }), null, 16),
@@ -2991,74 +3010,74 @@ const hr = {
2991
3010
  key: S.label,
2992
3011
  class: "lume-line-group__group"
2993
3012
  }, [
2994
- G("g", mr, [
2995
- (_(!0), L(J, null, z(S.values, (K, F) => (_(), W(l(ur), M(E(F), {
2996
- key: `line-${F}`,
3013
+ G("g", yr, [
3014
+ (_(!0), L(J, null, z(S.values, (ne, P) => (_(), W(l(cr), C(x(P), {
3015
+ key: `line-${P}`,
2997
3016
  color: S.color,
2998
- dashed: S.isDashed(F),
2999
- "path-definition": y(F, Y),
3017
+ dashed: S.isDashed(P),
3018
+ "path-definition": f(P, Y),
3000
3019
  transition: e.transition,
3001
3020
  width: l(r).lineWidth,
3002
- onClick: (ne) => t("line-click", { index: F, datasetIndex: Y, event: ne })
3021
+ onClick: (K) => t("line-click", { index: P, datasetIndex: Y, event: K })
3003
3022
  }), null, 16, ["color", "dashed", "path-definition", "transition", "width", "onClick"]))), 128))
3004
3023
  ]),
3005
- l(A) ? (_(), L("g", gr, [
3006
- (_(!0), L(J, null, z(S.values, (K, F) => (_(), W(l(dr), M(w(F, Y), {
3007
- key: `point-${F}`,
3008
- active: N(F),
3024
+ l(A) ? (_(), L("g", kr, [
3025
+ (_(!0), L(J, null, z(S.values, (ne, P) => (_(), W(l(fr), C(N(P, Y), {
3026
+ key: `point-${P}`,
3027
+ active: $(P),
3009
3028
  color: S.color,
3010
- index: F,
3011
- radius: l(h),
3012
- onClick: (ne) => t("point-click", { index: F, datasetIndex: Y, event: ne })
3029
+ index: P,
3030
+ radius: l(m),
3031
+ onClick: (K) => t("point-click", { index: P, datasetIndex: Y, event: K })
3013
3032
  }), null, 16, ["active", "color", "index", "radius", "onClick"]))), 128))
3014
- ])) : P("", !0)
3033
+ ])) : F("", !0)
3015
3034
  ]))), 128))
3016
3035
  ]));
3017
3036
  }
3018
3037
  });
3019
- const Ut = /* @__PURE__ */ Q(yr, [["__scopeId", "data-v-c4d7f0ca"]]), kr = {
3020
- margins: _e.VERTICAL,
3038
+ const Xt = /* @__PURE__ */ Q(Ar, [["__scopeId", "data-v-c4d7f0ca"]]), Tr = {
3039
+ margins: ge.VERTICAL,
3021
3040
  startOnZero: !0,
3022
3041
  withTooltip: !0,
3023
3042
  xAxisOptions: {},
3024
3043
  yAxisOptions: { gridLines: !0 }
3025
- }, Br = /* @__PURE__ */ Z({
3044
+ }, Sr = /* @__PURE__ */ Z({
3026
3045
  __name: "lume-line-chart",
3027
3046
  props: {
3028
- ...Te(null, !1)
3047
+ ...Le(null, !1)
3029
3048
  },
3030
3049
  setup(e) {
3031
- const t = e, n = ke(oe()), { options: o } = q(t), { allOptions: r } = ce(o, kr);
3032
- return (a, u) => (_(), W(l(Le), M(t, {
3050
+ const t = e, n = ye(oe()), { options: o } = q(t), { allOptions: r } = ce(o, Tr);
3051
+ return (a, u) => (_(), W(l(Oe), C(t, {
3033
3052
  "chart-type": "line",
3034
3053
  options: l(r),
3035
3054
  "data-j-lume-line-chart": ""
3036
3055
  }), ue({
3037
3056
  groups: V((s) => [
3038
- ae(l(Ut), ie(se(s)), null, 16)
3057
+ ae(l(Xt), ie(se(s)), null, 16)
3039
3058
  ]),
3040
3059
  _: 2
3041
3060
  }, [
3042
3061
  z(l(n), (s, i) => ({
3043
3062
  name: i,
3044
3063
  fn: V((c) => [
3045
- R(a.$slots, i, ie(se(c || {})))
3064
+ M(a.$slots, i, ie(se(c || {})))
3046
3065
  ])
3047
3066
  }))
3048
3067
  ]), 1040, ["options"]));
3049
3068
  }
3050
3069
  });
3051
- function br(e) {
3070
+ function Lr(e) {
3052
3071
  return { areaPathDefinition: p(
3053
3072
  () => function(n, o) {
3054
3073
  if (!n || !o)
3055
3074
  return;
3056
3075
  const r = e.value[0].values;
3057
- return ln().x((a, u) => n(u)).y0(o(Math.min(...o.domain()))).y1((a) => o(a.value))(r);
3076
+ return cn().x((a, u) => n(u)).y0(o(Math.min(...o.domain()))).y1((a) => o(a.value))(r);
3058
3077
  }
3059
3078
  ) };
3060
3079
  }
3061
- const Ar = {
3080
+ const Or = {
3062
3081
  margins: {
3063
3082
  top: 0,
3064
3083
  right: 0,
@@ -3072,82 +3091,82 @@ const Ar = {
3072
3091
  tooltipOptions: {
3073
3092
  showTitle: !1
3074
3093
  }
3075
- }, Tr = ["d"], Lr = /* @__PURE__ */ Z({
3094
+ }, $r = ["d"], xr = /* @__PURE__ */ Z({
3076
3095
  __name: "lume-sparkline-chart",
3077
3096
  props: {
3078
- ...et(null),
3097
+ ...tt(null),
3079
3098
  ...we()
3080
3099
  },
3081
3100
  setup(e, { expose: t }) {
3082
- const n = e, o = ke(oe()), { data: r, options: a } = q(n), { internalData: u } = tt(r), { allOptions: s } = ce(a, Ar), { computedLineData: i } = Wt(u), { areaPathDefinition: c } = br(i), v = p(() => u.value[0].color), d = p(
3101
+ const n = e, o = ye(oe()), { data: r, options: a } = q(n), { internalData: u } = nt(r), { allOptions: s } = ce(a, Or), { computedLineData: i } = Ut(u), { areaPathDefinition: c } = Lr(i), v = p(() => u.value[0].color), d = p(
3083
3102
  () => r.value[0].areaColor || v.value
3084
3103
  );
3085
- function h(m) {
3104
+ function m(h) {
3086
3105
  return {
3087
- ...m,
3106
+ ...h,
3088
3107
  noMinSize: !0
3089
3108
  };
3090
3109
  }
3091
- function k(m, A, f) {
3092
- return xe().range([0, f.width]).domain([0, m[0].values.length - 1]);
3110
+ function y(h, A, O) {
3111
+ return xe().range([0, O.width]).domain([0, h[0].values.length - 1]);
3093
3112
  }
3094
3113
  return t({
3095
3114
  areaPathDefinition: c
3096
- }), (m, A) => (_(), W(l(Le), M(n, {
3115
+ }), (h, A) => (_(), W(l(Oe), C(n, {
3097
3116
  "chart-type": "line",
3098
- options: h(l(s)),
3099
- "x-scale": k
3117
+ options: m(l(s)),
3118
+ "x-scale": y
3100
3119
  }), ue({
3101
- groups: V((f) => [
3120
+ groups: V((O) => [
3102
3121
  l(s).showArea ? (_(), L("path", {
3103
3122
  key: 0,
3104
- class: te([
3123
+ class: ee([
3105
3124
  "sparkline-chart__area",
3106
3125
  l(a).withTransition !== !1 ? "sparkline-chart__area--transition" : "",
3107
3126
  `lume-fill--${l(d) || l(v)}`,
3108
3127
  "lume-fill--faded"
3109
3128
  ]),
3110
- d: l(c)(f.xScale, f.yScale),
3129
+ d: l(c)(O.xScale, O.yScale),
3111
3130
  "data-j-sparkline__area": ""
3112
- }, null, 10, Tr)) : P("", !0),
3113
- ae(l(Ut), M(f, { "with-points": !1 }), null, 16)
3131
+ }, null, 10, $r)) : F("", !0),
3132
+ ae(l(Xt), C(O, { "with-points": !1 }), null, 16)
3114
3133
  ]),
3115
3134
  _: 2
3116
3135
  }, [
3117
- z(l(o), (f, y) => ({
3118
- name: y,
3119
- fn: V((E) => [
3120
- R(m.$slots, y, ie(se(E || {})), void 0, !0)
3136
+ z(l(o), (O, f) => ({
3137
+ name: f,
3138
+ fn: V((x) => [
3139
+ M(h.$slots, f, ie(se(x || {})), void 0, !0)
3121
3140
  ])
3122
3141
  }))
3123
3142
  ]), 1040, ["options"]));
3124
3143
  }
3125
3144
  });
3126
- const Rr = /* @__PURE__ */ Q(Lr, [["__scopeId", "data-v-9fc2cb6e"]]);
3145
+ const Cr = /* @__PURE__ */ Q(xr, [["__scopeId", "data-v-9fc2cb6e"]]);
3127
3146
  export {
3128
- Ir as LumeAlluvialDiagram,
3129
- Va as LumeAlluvialGroup,
3130
- aa as LumeAlluvialNodeLabel,
3131
- ua as LumeAlluvialNodeValue,
3132
- dt as LumeAxis,
3133
- qe as LumeBar,
3134
- Er as LumeBarChart,
3135
- nt as LumeBarGroup,
3136
- Le as LumeChart,
3137
- Kn as LumeChartContainer,
3138
- vt as LumeChartLegend,
3139
- Dr as LumeGroupedBarChart,
3140
- ur as LumeLine,
3141
- Br as LumeLineChart,
3142
- Ut as LumeLineGroup,
3143
- Ro as LumeOverlayGroup,
3144
- dr as LumePoint,
3145
- Nr as LumeSingleBarChart,
3146
- Rr as LumeSparklineChart,
3147
- Hr as LumeStackedBarChart,
3148
- ko as LumeTooltip,
3149
- po as LumeTooltipItem,
3150
- uo as LumeTooltipSummary,
3151
- no as LumeTooltipTitle
3147
+ Dr as LumeAlluvialDiagram,
3148
+ za as LumeAlluvialGroup,
3149
+ ua as LumeAlluvialNodeLabel,
3150
+ ca as LumeAlluvialNodeValue,
3151
+ vt as LumeAxis,
3152
+ et as LumeBar,
3153
+ Hr as LumeBarChart,
3154
+ ot as LumeBarGroup,
3155
+ Oe as LumeChart,
3156
+ qn as LumeChartContainer,
3157
+ pt as LumeChartLegend,
3158
+ Rr as LumeGroupedBarChart,
3159
+ cr as LumeLine,
3160
+ Sr as LumeLineChart,
3161
+ Xt as LumeLineGroup,
3162
+ Co as LumeOverlayGroup,
3163
+ fr as LumePoint,
3164
+ Br as LumeSingleBarChart,
3165
+ Cr as LumeSparklineChart,
3166
+ Mr as LumeStackedBarChart,
3167
+ To as LumeTooltip,
3168
+ ho as LumeTooltipItem,
3169
+ co as LumeTooltipSummary,
3170
+ ro as LumeTooltipTitle
3152
3171
  };
3153
3172
  //# sourceMappingURL=index.js.map