@adyen/lume 0.1.3 → 0.1.4

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