@adyen/lume 1.1.0 → 1.2.1

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