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