@cfasim-ui/charts 0.6.3 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,13 +1,13 @@
1
- import { Fragment as e, Teleport as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, guardReactiveProps as u, mergeProps as d, normalizeClass as f, normalizeProps as p, normalizeStyle as m, onMounted as h, onUnmounted as g, openBlock as _, ref as v, renderList as y, renderSlot as b, toDisplayString as x, toHandlers as ee, toRaw as S, unref as C, useSlots as te, useTemplateRef as w, watch as T, withCtx as E } from "vue";
2
- import { formatNumber as ne } from "@cfasim-ui/shared";
3
- import { DropdownMenuContent as D, DropdownMenuItem as O, DropdownMenuPortal as k, DropdownMenuRoot as A, DropdownMenuTrigger as re, PopoverAnchor as j, PopoverContent as M, PopoverPortal as N, PopoverRoot as ie } from "reka-ui";
4
- import { geoAlbersUsa as ae, geoMercator as P, geoPath as oe } from "d3-geo";
5
- import { zoom as F, zoomIdentity as se } from "d3-zoom";
6
- import { select as ce } from "d3-selection";
1
+ import { Fragment as e, Teleport as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, guardReactiveProps as u, mergeProps as d, nextTick as f, normalizeClass as p, normalizeProps as m, normalizeStyle as h, onMounted as g, onUnmounted as ee, openBlock as _, ref as v, renderList as y, renderSlot as te, toDisplayString as b, toHandlers as ne, toRaw as x, unref as S, useSlots as C, useTemplateRef as w, watch as T, withCtx as E } from "vue";
2
+ import { formatNumber as re } from "@cfasim-ui/shared";
3
+ import { DropdownMenuContent as D, DropdownMenuItem as O, DropdownMenuPortal as ie, DropdownMenuRoot as k, DropdownMenuTrigger as A, PopoverAnchor as j, PopoverContent as ae, PopoverPortal as M, PopoverRoot as oe } from "reka-ui";
4
+ import { geoAlbersUsa as N, geoMercator as se, geoPath as P } from "d3-geo";
5
+ import { zoom as ce, zoomIdentity as le, zoomTransform as ue } from "d3-zoom";
6
+ import { select as F } from "d3-selection";
7
7
  import "d3-transition";
8
- import { feature as le, merge as I, mesh as ue } from "topojson-client";
8
+ import { feature as de, merge as fe, mesh as pe } from "topojson-client";
9
9
  //#region src/ChartMenu/ChartMenu.vue?vue&type=script&setup=true&lang.ts
10
- var de = ["aria-label"], fe = /* @__PURE__ */ l({
10
+ var me = ["aria-label"], he = /* @__PURE__ */ l({
11
11
  __name: "ChartMenu",
12
12
  props: {
13
13
  items: {},
@@ -23,7 +23,7 @@ var de = ["aria-label"], fe = /* @__PURE__ */ l({
23
23
  emits: ["close"],
24
24
  setup(t, { emit: n }) {
25
25
  let i = t, l = n, u = () => i.forceDropdown || i.items.length > 1;
26
- return (n, i) => (_(), a("div", { class: f(["chart-menu-trigger-area", { "chart-menu-trigger-area--expanded": t.isFullscreen }]) }, [t.isFullscreen ? (_(), a("button", {
26
+ return (n, i) => (_(), a("div", { class: p(["chart-menu-trigger-area", { "chart-menu-trigger-area--expanded": t.isFullscreen }]) }, [t.isFullscreen ? (_(), a("button", {
27
27
  key: 0,
28
28
  class: "chart-menu-button chart-close-button",
29
29
  "aria-label": "Collapse",
@@ -37,11 +37,11 @@ var de = ["aria-label"], fe = /* @__PURE__ */ l({
37
37
  "stroke-width": "1.75",
38
38
  "stroke-linecap": "round",
39
39
  "aria-hidden": "true"
40
- }, [o("path", { d: "M4 4l8 8M12 4l-8 8" })], -1)]])) : u() ? (_(), r(C(A), {
40
+ }, [o("path", { d: "M4 4l8 8M12 4l-8 8" })], -1)]])) : u() ? (_(), r(S(k), {
41
41
  key: 2,
42
42
  modal: !1
43
43
  }, {
44
- default: E(() => [c(C(re), {
44
+ default: E(() => [c(S(A), {
45
45
  class: "chart-menu-button",
46
46
  "aria-label": "Chart options"
47
47
  }, {
@@ -69,19 +69,19 @@ var de = ["aria-label"], fe = /* @__PURE__ */ l({
69
69
  })
70
70
  ], -1)]]),
71
71
  _: 1
72
- }), c(C(k), null, {
73
- default: E(() => [c(C(D), {
72
+ }), c(S(ie), null, {
73
+ default: E(() => [c(S(D), {
74
74
  class: "chart-menu-content",
75
75
  "side-offset": 4,
76
76
  align: "end"
77
77
  }, {
78
- default: E(() => [(_(!0), a(e, null, y(t.items, (e) => (_(), r(C(O), {
78
+ default: E(() => [(_(!0), a(e, null, y(t.items, (e) => (_(), r(S(O), {
79
79
  key: e.label,
80
80
  class: "chart-menu-item",
81
81
  "aria-pressed": e.ariaPressed,
82
82
  onSelect: e.action
83
83
  }, {
84
- default: E(() => [s(x(e.label), 1)]),
84
+ default: E(() => [s(b(e.label), 1)]),
85
85
  _: 2
86
86
  }, 1032, ["aria-pressed", "onSelect"]))), 128))]),
87
87
  _: 1
@@ -104,44 +104,44 @@ var de = ["aria-label"], fe = /* @__PURE__ */ l({
104
104
  "stroke-linecap": "round",
105
105
  "stroke-linejoin": "round",
106
106
  "aria-hidden": "true"
107
- }, [o("path", { d: "M7 1v8M3 6l4 4 4-4M2 13h10" })], -1)]], 8, de))], 2));
107
+ }, [o("path", { d: "M7 1v8M3 6l4 4 4-4M2 13h10" })], -1)]], 8, me))], 2));
108
108
  }
109
- }), L = (e, t) => {
109
+ }), I = (e, t) => {
110
110
  let n = e.__vccOpts || e;
111
111
  for (let [e, r] of t) n[e] = r;
112
112
  return n;
113
- }, pe = /* @__PURE__ */ L(fe, [["__scopeId", "data-v-f5743494"]]);
113
+ }, ge = /* @__PURE__ */ I(he, [["__scopeId", "data-v-f5743494"]]);
114
114
  //#endregion
115
115
  //#region src/_shared/axes.ts
116
- function R(e) {
116
+ function L(e) {
117
117
  return Math.round(e) + .5;
118
118
  }
119
- function me(e, t) {
119
+ function _e(e, t) {
120
120
  let n = e / t, r = 10 ** Math.floor(Math.log10(n)), i = n / r, a;
121
121
  return a = i <= 1.5 ? 1 : i <= 3 ? 2 : i <= 7 ? 5 : 10, a * r;
122
122
  }
123
- function he(e, t, n) {
123
+ function ve(e, t, n) {
124
124
  if (!(n > 0) || !isFinite(n)) return [];
125
125
  let r = [], i = Math.ceil(e / n) * n;
126
126
  for (let e = 0, a = i; a <= t + 1e-9 && e < 1e3; e++, a = i + e * n) r.push(a);
127
127
  return r;
128
128
  }
129
- var z = new Intl.NumberFormat();
130
- function B(e) {
131
- return Math.abs(e) >= 1e3 ? z.format(e) : Number.isInteger(e) ? e.toString() : e.toFixed(1);
129
+ var R = new Intl.NumberFormat();
130
+ function z(e) {
131
+ return Math.abs(e) >= 1e3 ? R.format(e) : Number.isInteger(e) ? e.toString() : e.toFixed(1);
132
132
  }
133
133
  //#endregion
134
134
  //#region src/_shared/computeTicks.ts
135
- function ge(e) {
135
+ function ye(e) {
136
136
  let { min: t, max: n, ticks: r } = e;
137
137
  if (t === n) return [];
138
138
  let i = e.displayOffset ?? 0;
139
139
  if (Array.isArray(r)) return r.map((e) => e - i).filter((e) => e >= t && e <= n);
140
- if (typeof r == "number") return he(t + i, n + i, r).map((e) => e - i);
141
- let a = Math.max(3, Math.floor(e.targetTickCount ?? 3)), o = me(n - t, a);
142
- return he(t + i, n + i, o).map((e) => e - i);
140
+ if (typeof r == "number") return ve(t + i, n + i, r).map((e) => e - i);
141
+ let a = Math.max(3, Math.floor(e.targetTickCount ?? 3)), o = _e(n - t, a);
142
+ return ve(t + i, n + i, o).map((e) => e - i);
143
143
  }
144
- function _e(e, t, n, r) {
144
+ function be(e, t, n, r) {
145
145
  if (r === "log") {
146
146
  let r = Math.log10(t), i = Math.log10(n) - r || 1;
147
147
  return (Math.log10(e > 0 ? e : t) - r) / i;
@@ -149,7 +149,7 @@ function _e(e, t, n, r) {
149
149
  let i = n - t || 1;
150
150
  return (e - t) / i;
151
151
  }
152
- function ve(e, t, n, r) {
152
+ function xe(e, t, n, r) {
153
153
  if (n !== "log") return {
154
154
  min: e,
155
155
  max: t
@@ -160,7 +160,7 @@ function ve(e, t, n, r) {
160
160
  max: t > 0 ? Math.max(t, i) : i
161
161
  };
162
162
  }
163
- function ye(e) {
163
+ function Se(e) {
164
164
  let { min: t, max: n, ticks: r } = e;
165
165
  if (!(t > 0) || !(n > 0) || t === n) return [];
166
166
  if (Array.isArray(r)) return r.filter((e) => e > 0 && e >= t && e <= n);
@@ -173,9 +173,9 @@ function ye(e) {
173
173
  }
174
174
  //#endregion
175
175
  //#region src/_shared/useChartSize.ts
176
- function be(e = {}) {
176
+ function Ce(e = {}) {
177
177
  let t = v(null), n = v(0), r = v(0), i = null, a = null;
178
- return h(() => {
178
+ return g(() => {
179
179
  t.value && (n.value = t.value.clientWidth, r.value = t.value.clientHeight, i = new ResizeObserver((t) => {
180
180
  let i = t[0];
181
181
  if (!i) return;
@@ -184,7 +184,7 @@ function be(e = {}) {
184
184
  }, s = e.debounce?.();
185
185
  s ? (a && clearTimeout(a), a = setTimeout(o, s)) : o();
186
186
  }), i.observe(t.value));
187
- }), g(() => {
187
+ }), ee(() => {
188
188
  i?.disconnect(), a && clearTimeout(a);
189
189
  }), {
190
190
  containerRef: t,
@@ -192,8 +192,8 @@ function be(e = {}) {
192
192
  measuredHeight: r
193
193
  };
194
194
  }
195
- var xe = .6, Se = 8;
196
- function V(e, t) {
195
+ var we = .6, B = 8;
196
+ function Te(e, t) {
197
197
  return {
198
198
  fontSize: e?.fontSize ?? t.fontSize,
199
199
  fill: e?.color ?? "currentColor",
@@ -201,8 +201,8 @@ function V(e, t) {
201
201
  fillOpacity: e?.color == null ? t.fillOpacity : void 0
202
202
  };
203
203
  }
204
- var Ce = 7, we = 18, Te = 16;
205
- function Ee(e) {
204
+ var Ee = 7, De = 18, Oe = 16;
205
+ function ke(e) {
206
206
  return e == null ? {
207
207
  top: 0,
208
208
  right: 0,
@@ -220,12 +220,12 @@ function Ee(e) {
220
220
  left: e.left ?? 0
221
221
  };
222
222
  }
223
- function De(e) {
224
- return we + e.length * Ce;
223
+ function V(e) {
224
+ return De + e.length * Ee;
225
225
  }
226
- function Oe(e) {
226
+ function Ae(e) {
227
227
  let t = n(() => {
228
- let t = Ee(e.extraPadding?.());
228
+ let t = ke(e.extraPadding?.());
229
229
  return {
230
230
  left: (e.yLabel() ? 56 : 50) + t.left,
231
231
  right: 10 + t.right
@@ -238,11 +238,11 @@ function Oe(e) {
238
238
  };
239
239
  let n = Math.max(0, r.value), i = [], a = 0, o = 0;
240
240
  for (let e of t) {
241
- let t = De(e);
241
+ let t = V(e);
242
242
  o > 0 && o + t > n && (a++, o = 0), i.push({
243
243
  x: o,
244
244
  row: a
245
- }), o += t + Te;
245
+ }), o += t + Oe;
246
246
  }
247
247
  return {
248
248
  positions: i,
@@ -252,9 +252,9 @@ function Oe(e) {
252
252
  let t = e.title();
253
253
  if (!t) return 10;
254
254
  let n = e.titleStyle?.()?.lineHeight ?? 18;
255
- return t.split("\n").length * n + Se;
255
+ return t.split("\n").length * n + B;
256
256
  }), o = n(() => {
257
- let n = Ee(e.extraPadding?.()), r = i.value.rowCount;
257
+ let n = ke(e.extraPadding?.()), r = i.value.rowCount;
258
258
  return {
259
259
  top: a.value + r * 20 + n.top,
260
260
  bottom: (e.xLabel() ? 38 : 30) + n.bottom,
@@ -283,10 +283,10 @@ function Oe(e) {
283
283
  }
284
284
  //#endregion
285
285
  //#region src/tooltip-position.ts
286
- var ke = 16, Ae = 8;
287
- function je(e, t, n, r, i, a) {
286
+ var je = 16, Me = 8;
287
+ function H(e, t, n, r, i, a) {
288
288
  if (i === "none") return {
289
- left: e + ke,
289
+ left: e + je,
290
290
  top: t
291
291
  };
292
292
  let o = i === "chart" && a ? {
@@ -299,15 +299,15 @@ function je(e, t, n, r, i, a) {
299
299
  right: window.innerWidth,
300
300
  top: 0,
301
301
  bottom: window.innerHeight
302
- }, s = e + ke + n > o.right - Ae ? e - ke - n : e + ke, c = r / 2;
302
+ }, s = e + je + n > o.right - Me ? e - je - n : e + je, c = r / 2;
303
303
  return {
304
304
  left: s,
305
- top: Math.min(Math.max(t, o.top + Ae + c), o.bottom - Ae - c)
305
+ top: Math.min(Math.max(t, o.top + Me + c), o.bottom - Me - c)
306
306
  };
307
307
  }
308
308
  //#endregion
309
309
  //#region src/_shared/useChartTooltip.ts
310
- function Me(e) {
310
+ function Ne(e) {
311
311
  let t = e.touchYOffset ?? 50, n = v(null), r = v(!1), i = v(null), a = v(null), o = v(null), s = null, c = "pending";
312
312
  function l(e) {
313
313
  return "touches" in e ? e.touches[0] ?? null : e;
@@ -328,7 +328,7 @@ function Me(e) {
328
328
  }
329
329
  let s = i.value, c = e.containerRef.value;
330
330
  if (!s || !c) return;
331
- let l = c.getBoundingClientRect(), u = r.value ? t : 0, d = e.clamp?.() ?? "chart", { left: f, top: p } = je(a.value.clientX, a.value.clientY - u, s.offsetWidth, s.offsetHeight, d, l);
331
+ let l = c.getBoundingClientRect(), u = r.value ? t : 0, d = e.clamp?.() ?? "chart", { left: f, top: p } = H(a.value.clientX, a.value.clientY - u, s.offsetWidth, s.offsetHeight, d, l);
332
332
  o.value = {
333
333
  left: f - l.left,
334
334
  top: p - l.top
@@ -395,69 +395,69 @@ function Me(e) {
395
395
  }
396
396
  //#endregion
397
397
  //#region src/ChartMenu/download.ts
398
- function H(e, t) {
398
+ function Pe(e, t) {
399
399
  let n = URL.createObjectURL(e), r = document.createElement("a");
400
400
  r.href = n, r.download = t, r.click(), URL.revokeObjectURL(n);
401
401
  }
402
- var Ne = [
402
+ var U = [
403
403
  "color",
404
404
  "font-family",
405
405
  "font-size",
406
406
  "font-weight"
407
- ], Pe = ["fill", "stroke"];
408
- function U(e) {
407
+ ], W = ["fill", "stroke"];
408
+ function Fe(e) {
409
409
  let t = e.match(/^\s*var\(\s*(--[\w-]+)\s*(?:,\s*([^)]*?)\s*)?\)\s*$/);
410
410
  if (!t) return e;
411
411
  let [, n, r] = t;
412
412
  return window.getComputedStyle(document.documentElement).getPropertyValue(n).trim() || (r ? r.trim() : e);
413
413
  }
414
- function W(e) {
414
+ function G(e) {
415
415
  let t = e.cloneNode(!0);
416
416
  t.setAttribute("xmlns", "http://www.w3.org/2000/svg");
417
417
  let n = window.getComputedStyle(e), r = [];
418
- for (let e of Ne) {
418
+ for (let e of U) {
419
419
  let t = n.getPropertyValue(e);
420
420
  t && r.push(`${e}: ${t}`);
421
421
  }
422
422
  let i = t.getAttribute("style") ?? "";
423
423
  t.setAttribute("style", [i, ...r].filter(Boolean).join("; "));
424
- for (let e of t.querySelectorAll("*")) for (let t of Pe) {
424
+ for (let e of t.querySelectorAll("*")) for (let t of W) {
425
425
  let n = e.getAttribute(t);
426
- !n || !n.includes("var(") || e.setAttribute(t, U(n));
426
+ !n || !n.includes("var(") || e.setAttribute(t, Fe(n));
427
427
  }
428
428
  return t;
429
429
  }
430
- function Fe(e, t) {
431
- let n = W(e), r = new XMLSerializer().serializeToString(n);
432
- H(new Blob([r], { type: "image/svg+xml" }), `${t}.svg`);
430
+ function K(e, t) {
431
+ let n = G(e), r = new XMLSerializer().serializeToString(n);
432
+ Pe(new Blob([r], { type: "image/svg+xml" }), `${t}.svg`);
433
433
  }
434
- function G(e, t) {
435
- let n = W(e), r = new XMLSerializer().serializeToString(n), i = new Blob([r], { type: "image/svg+xml;charset=utf-8" }), a = URL.createObjectURL(i), o = new Image(), s = e.width.baseVal.value || e.clientWidth, c = e.height.baseVal.value || e.clientHeight;
434
+ function Ie(e, t) {
435
+ let n = G(e), r = new XMLSerializer().serializeToString(n), i = new Blob([r], { type: "image/svg+xml;charset=utf-8" }), a = URL.createObjectURL(i), o = new Image(), s = e.width.baseVal.value || e.clientWidth, c = e.height.baseVal.value || e.clientHeight;
436
436
  o.onload = () => {
437
437
  let e = document.createElement("canvas");
438
438
  e.width = s * 2, e.height = c * 2;
439
439
  let n = e.getContext("2d");
440
440
  n.scale(2, 2), n.drawImage(o, 0, 0, s, c), e.toBlob((e) => {
441
- e && H(e, `${t}.png`);
441
+ e && Pe(e, `${t}.png`);
442
442
  }), URL.revokeObjectURL(a);
443
443
  }, o.src = a;
444
444
  }
445
- function K(e, t) {
446
- H(new Blob([e], { type: "text/csv" }), `${t}.csv`);
445
+ function Le(e, t) {
446
+ Pe(new Blob([e], { type: "text/csv" }), `${t}.csv`);
447
447
  }
448
448
  //#endregion
449
449
  //#region src/_shared/useChartFullscreen.ts
450
- var Ie = 0, Le = "";
451
- function Re() {
452
- typeof document > "u" || (Ie === 0 && (Le = document.body.style.overflow, document.body.style.overflow = "hidden"), Ie++);
450
+ var Re = 0, ze = "";
451
+ function Be() {
452
+ typeof document > "u" || (Re === 0 && (ze = document.body.style.overflow, document.body.style.overflow = "hidden"), Re++);
453
453
  }
454
- function ze() {
455
- typeof document > "u" || Ie !== 0 && (Ie--, Ie === 0 && (document.body.style.overflow = Le));
454
+ function Ve() {
455
+ typeof document > "u" || Re !== 0 && (Re--, Re === 0 && (document.body.style.overflow = ze));
456
456
  }
457
- function Be(e = {}) {
457
+ function He(e = {}) {
458
458
  let t = v(!1), r = !1;
459
459
  function i(e) {
460
- e !== t.value && (t.value = e, e && !r ? (Re(), r = !0) : !e && r && (ze(), r = !1));
460
+ e !== t.value && (t.value = e, e && !r ? (Be(), r = !0) : !e && r && (Ve(), r = !1));
461
461
  }
462
462
  function a(e) {
463
463
  if (e.key !== "Escape" || !t.value) return;
@@ -473,10 +473,10 @@ function Be(e = {}) {
473
473
  function c() {
474
474
  i(!t.value);
475
475
  }
476
- return h(() => {
476
+ return g(() => {
477
477
  typeof document > "u" || document.addEventListener("keydown", a);
478
- }), g(() => {
479
- typeof document > "u" || (document.removeEventListener("keydown", a), r &&= (ze(), !1));
478
+ }), ee(() => {
479
+ typeof document > "u" || (document.removeEventListener("keydown", a), r &&= (Ve(), !1));
480
480
  }), {
481
481
  isFullscreen: t,
482
482
  toggle: c,
@@ -504,7 +504,7 @@ function Be(e = {}) {
504
504
  }
505
505
  //#endregion
506
506
  //#region src/_shared/useChartMenu.ts
507
- function Ve(e) {
507
+ function Ue(e) {
508
508
  let t = v(null);
509
509
  function r() {
510
510
  let t = e.filename();
@@ -512,23 +512,23 @@ function Ve(e) {
512
512
  let n = e.legacyMenuLabel();
513
513
  return typeof n == "string" ? n : "chart";
514
514
  }
515
- let i = e.fullscreen ? Be({ target: e.fullscreenTarget }) : null, a = n(() => {
515
+ let i = e.fullscreen ? He({ target: e.fullscreenTarget }) : null, a = n(() => {
516
516
  let n = r(), a = [];
517
517
  i && a.push(i.menuItem.value), a.push({
518
518
  label: "Save as SVG",
519
519
  action: () => {
520
- t.value && Fe(t.value, n);
520
+ t.value && K(t.value, n);
521
521
  }
522
522
  }, {
523
523
  label: "Save as PNG",
524
524
  action: () => {
525
- t.value && G(t.value, n);
525
+ t.value && Ie(t.value, n);
526
526
  }
527
527
  });
528
528
  let o = e.downloadButton?.();
529
529
  return !e.downloadLink() && !o && a.push({
530
530
  label: "Download CSV",
531
- action: () => K(e.getCsv(), n)
531
+ action: () => Le(e.getCsv(), n)
532
532
  }), a;
533
533
  }), o = n(() => {
534
534
  if (e.downloadButton?.()) return null;
@@ -539,7 +539,7 @@ function Ve(e) {
539
539
  return t ? typeof t == "string" ? t : "Download data (CSV)" : null;
540
540
  });
541
541
  function l() {
542
- K(e.getCsv(), r());
542
+ Le(e.getCsv(), r());
543
543
  }
544
544
  return {
545
545
  svgRef: t,
@@ -556,8 +556,95 @@ function Ve(e) {
556
556
  };
557
557
  }
558
558
  //#endregion
559
+ //#region src/_shared/touch.ts
560
+ function q() {
561
+ return typeof window < "u" && "ontouchstart" in window;
562
+ }
563
+ //#endregion
564
+ //#region src/_shared/ChartZoomControls.vue?vue&type=script&setup=true&lang.ts
565
+ var We = ["disabled"], Ge = ["disabled"], Ke = ["disabled"], qe = /* @__PURE__ */ I(/* @__PURE__ */ l({
566
+ __name: "ChartZoomControls",
567
+ props: {
568
+ canZoomIn: {
569
+ type: Boolean,
570
+ default: !0
571
+ },
572
+ canZoomOut: {
573
+ type: Boolean,
574
+ default: !0
575
+ },
576
+ canReset: {
577
+ type: Boolean,
578
+ default: !0
579
+ },
580
+ isFullscreen: {
581
+ type: Boolean,
582
+ default: !1
583
+ }
584
+ },
585
+ emits: [
586
+ "zoomIn",
587
+ "zoomOut",
588
+ "reset"
589
+ ],
590
+ setup(e, { emit: t }) {
591
+ let n = t;
592
+ return (t, r) => (_(), a("div", { class: p(["chart-zoom-controls", { "chart-zoom-controls--expanded": e.isFullscreen }]) }, [
593
+ o("button", {
594
+ type: "button",
595
+ class: "chart-zoom-button",
596
+ "aria-label": "Zoom in",
597
+ disabled: !e.canZoomIn,
598
+ onClick: r[0] ||= (e) => n("zoomIn")
599
+ }, [...r[3] ||= [o("svg", {
600
+ width: "14",
601
+ height: "14",
602
+ viewBox: "0 0 14 14",
603
+ fill: "none",
604
+ stroke: "currentColor",
605
+ "stroke-width": "1.5",
606
+ "stroke-linecap": "round",
607
+ "aria-hidden": "true"
608
+ }, [o("path", { d: "M7 2v10M2 7h10" })], -1)]], 8, We),
609
+ o("button", {
610
+ type: "button",
611
+ class: "chart-zoom-button",
612
+ "aria-label": "Zoom out",
613
+ disabled: !e.canZoomOut,
614
+ onClick: r[1] ||= (e) => n("zoomOut")
615
+ }, [...r[4] ||= [o("svg", {
616
+ width: "14",
617
+ height: "14",
618
+ viewBox: "0 0 14 14",
619
+ fill: "none",
620
+ stroke: "currentColor",
621
+ "stroke-width": "1.5",
622
+ "stroke-linecap": "round",
623
+ "aria-hidden": "true"
624
+ }, [o("path", { d: "M2 7h10" })], -1)]], 8, Ge),
625
+ o("button", {
626
+ type: "button",
627
+ class: "chart-zoom-button",
628
+ "aria-label": "Reset view",
629
+ disabled: !e.canReset,
630
+ onClick: r[2] ||= (e) => n("reset")
631
+ }, [...r[5] ||= [o("svg", {
632
+ width: "14",
633
+ height: "14",
634
+ viewBox: "0 0 14 14",
635
+ fill: "none",
636
+ stroke: "currentColor",
637
+ "stroke-width": "1.5",
638
+ "stroke-linecap": "round",
639
+ "stroke-linejoin": "round",
640
+ "aria-hidden": "true"
641
+ }, [o("path", { d: "M1.75 7a5.25 5.25 0 1 0 5.25-5.25c-1.48 0-2.9.6-3.94 1.6L1.75 4.7" }), o("path", { d: "M1.75 1.75v2.95h2.95" })], -1)]], 8, Ke)
642
+ ], 2));
643
+ }
644
+ }), [["__scopeId", "data-v-87ceeada"]]);
645
+ //#endregion
559
646
  //#region src/_shared/seriesCsv.ts
560
- function He(e) {
647
+ function J(e) {
561
648
  if (e.length === 0) return "";
562
649
  let t = 0;
563
650
  for (let n of e) n.data.length > t && (t = n.data.length);
@@ -569,43 +656,43 @@ function He(e) {
569
656
  }
570
657
  return i.join("\n");
571
658
  }
572
- function Ue(e, t, n = "category") {
659
+ function Je(e, t, n = "category") {
573
660
  if (t.length === 0 || e.length === 0) return "";
574
661
  let r = [(t.length === 1 ? [n, t[0].label || "value"] : [n, ...t.map((e, t) => e.label || `series_${t}`)]).join(",")];
575
662
  for (let n = 0; n < e.length; n++) {
576
- let i = [We(e[n])];
663
+ let i = [Ye(e[n])];
577
664
  for (let e of t) i.push(n < e.data.length ? String(e.data[n]) : "");
578
665
  r.push(i.join(","));
579
666
  }
580
667
  return r.join("\n");
581
668
  }
582
- function We(e) {
669
+ function Ye(e) {
583
670
  return e.includes(",") || e.includes("\"") || e.includes("\n") ? `"${e.replace(/"/g, "\"\"")}"` : e;
584
671
  }
585
672
  //#endregion
586
673
  //#region src/_shared/ChartAnnotations.vue?vue&type=script&setup=true&lang.ts
587
- var Ge = {
674
+ var Xe = {
588
675
  class: "chart-annotations",
589
676
  "pointer-events": "none"
590
- }, Ke = ["stroke", "stroke-width"], qe = [
677
+ }, Y = ["stroke", "stroke-width"], Ze = [
591
678
  "d",
592
679
  "stroke",
593
680
  "stroke-width"
594
- ], Je = [
681
+ ], X = [
595
682
  "fill",
596
683
  "stroke",
597
684
  "stroke-width",
598
685
  "transform"
599
- ], Ye = [
686
+ ], Qe = [
600
687
  "stroke",
601
688
  "stroke-width",
602
689
  "stroke-dasharray"
603
- ], q = [
690
+ ], $e = [
604
691
  "d",
605
692
  "stroke",
606
693
  "stroke-width",
607
694
  "stroke-dasharray"
608
- ], Xe = ["fill", "transform"], J = [
695
+ ], et = ["fill", "transform"], tt = [
609
696
  "x",
610
697
  "y",
611
698
  "text-anchor",
@@ -614,7 +701,7 @@ var Ge = {
614
701
  "fill",
615
702
  "stroke",
616
703
  "stroke-width"
617
- ], Y = ["x", "dy"], Ze = ["font-weight", "font-style"], X = 13, Z = "normal", Qe = 700, $e = "var(--color-bg-0, #fff)", et = 3, tt = 1, nt = 4, rt = 6, it = 1.2, at = .35, ot = /* @__PURE__ */ l({
704
+ ], nt = ["x", "dy"], rt = ["font-weight", "font-style"], it = 13, at = "normal", ot = 700, st = "var(--color-bg-0, #fff)", ct = 3, lt = 1, ut = 4, dt = 6, ft = 1.2, pt = .35, mt = /* @__PURE__ */ l({
618
705
  __name: "ChartAnnotations",
619
706
  props: {
620
707
  annotations: { default: () => [] },
@@ -651,35 +738,35 @@ var Ge = {
651
738
  if (!n || !isFinite(n.x) || !isFinite(n.y)) continue;
652
739
  let i = t.pointer ?? "curved", a = i.startsWith("rule");
653
740
  if (a && !r.bounds) continue;
654
- let { x: o, y: l } = t.offset, d = n.x + o, p = n.y + l, m = t.color ?? "currentColor", h = t.fontSize ?? X, g = t.fontWeight ?? Z, _ = t.outlineColor ?? $e, v = t.outlineWidth ?? et, y = t.lineColor ?? m, b = t.lineWidth ?? tt, x = s(t.lineDash), ee = {
741
+ let { x: o, y: l } = t.offset, d = n.x + o, p = n.y + l, m = t.color ?? "currentColor", h = t.fontSize ?? it, g = t.fontWeight ?? at, ee = t.outlineColor ?? st, _ = t.outlineWidth ?? ct, v = t.lineColor ?? m, y = t.lineWidth ?? lt, te = s(t.lineDash), b = {
655
742
  left: "start",
656
743
  center: "middle",
657
744
  right: "end"
658
- }[t.align ?? (o > 0 ? "left" : o < 0 ? "right" : "center")], S = t.text.split("\n").map(c), C, te = "", w, T = !a && (t.arrow ?? !0);
659
- if (a && r.bounds) C = u(i, n.x, n.y, r.bounds);
745
+ }[t.align ?? (o > 0 ? "left" : o < 0 ? "right" : "center")], ne = t.text.split("\n").map(c), x, S = "", C, w = !a && (t.arrow ?? !0);
746
+ if (a && r.bounds) x = u(i, n.x, n.y, r.bounds);
660
747
  else {
661
- let e = f(n.x, n.y, d, p, h, S.length, i);
662
- te = e.path, T && e.arrow && (w = e.arrow);
748
+ let e = f(n.x, n.y, d, p, h, ne.length, i);
749
+ S = e.path, w && e.arrow && (C = e.arrow);
663
750
  }
664
751
  e.push({
665
- lines: S,
752
+ lines: ne,
666
753
  textX: d,
667
754
  textY: p,
668
- textAnchor: ee,
669
- dy: h * it,
755
+ textAnchor: b,
756
+ dy: h * ft,
670
757
  fontSize: h,
671
758
  fontWeight: g,
672
759
  color: m,
673
- outlineColor: _,
674
- outlineWidth: v,
675
- pointerPath: te,
676
- lineColor: y,
677
- lineWidth: b,
678
- lineDash: x,
679
- arrow: T,
680
- arrowTip: w,
681
- arrowTransform: w ? `translate(${w.x} ${w.y}) rotate(${w.angle})` : "",
682
- rule: C
760
+ outlineColor: ee,
761
+ outlineWidth: _,
762
+ pointerPath: S,
763
+ lineColor: v,
764
+ lineWidth: y,
765
+ lineDash: te,
766
+ arrow: w,
767
+ arrowTip: C,
768
+ arrowTransform: C ? `translate(${C.x} ${C.y}) rotate(${C.angle})` : "",
769
+ rule: x
683
770
  });
684
771
  }
685
772
  return e;
@@ -732,11 +819,11 @@ var Ge = {
732
819
  }
733
820
  function f(e, t, n, r, i, a, o) {
734
821
  if (o === "none") return { path: "" };
735
- let s = n - e, c = r - t, l = i * it, u = (c < 0 ? r + (a - 1) * l : r) - i * at;
822
+ let s = n - e, c = r - t, l = i * ft, u = (c < 0 ? r + (a - 1) * l : r) - i * pt;
736
823
  if (s === 0 || c === 0 || o === "straight") {
737
824
  let i = c === 0 ? r : u, a = n - e, o = i - t, s = Math.hypot(a, o);
738
825
  if (s <= 10) return { path: "" };
739
- let l = a / s, d = o / s, f = e + l * nt, p = t + d * nt, m = n - l * rt, h = i - d * rt, g = Math.atan2(-d, -l) * 180 / Math.PI;
826
+ let l = a / s, d = o / s, f = e + l * ut, p = t + d * ut, m = n - l * dt, h = i - d * dt, g = Math.atan2(-d, -l) * 180 / Math.PI;
740
827
  return {
741
828
  path: `M${f},${p} L${m},${h}`,
742
829
  arrow: {
@@ -747,18 +834,18 @@ var Ge = {
747
834
  };
748
835
  }
749
836
  let d = u - t;
750
- if (Math.abs(d) <= nt || Math.abs(s) <= rt) return { path: "" };
751
- let f = Math.sign(s), p = Math.sign(d), m = e, h = t + p * nt, g = n - f * rt, _ = u, v = p > 0 ? -90 : 90;
837
+ if (Math.abs(d) <= ut || Math.abs(s) <= dt) return { path: "" };
838
+ let f = Math.sign(s), p = Math.sign(d), m = e, h = t + p * ut, g = n - f * dt, ee = u, _ = p > 0 ? -90 : 90;
752
839
  return {
753
- path: `M${m},${h} Q${m},${u} ${g},${_}`,
840
+ path: `M${m},${h} Q${m},${u} ${g},${ee}`,
754
841
  arrow: {
755
842
  x: m,
756
843
  y: h,
757
- angle: v
844
+ angle: _
758
845
  }
759
846
  };
760
847
  }
761
- return (t, n) => (_(), a("g", Ge, [(_(!0), a(e, null, y(l.value, (t, n) => (_(), a(e, { key: n }, [
848
+ return (t, n) => (_(), a("g", Xe, [(_(!0), a(e, null, y(l.value, (t, n) => (_(), a(e, { key: n }, [
762
849
  t.rule && t.outlineWidth > 0 ? (_(), a("line", d({
763
850
  key: 0,
764
851
  ref_for: !0
@@ -767,7 +854,7 @@ var Ge = {
767
854
  stroke: t.outlineColor,
768
855
  "stroke-width": t.lineWidth + t.outlineWidth,
769
856
  "stroke-linecap": "round"
770
- }), null, 16, Ke)) : i("", !0),
857
+ }), null, 16, Y)) : i("", !0),
771
858
  t.pointerPath && t.outlineWidth > 0 ? (_(), a("path", {
772
859
  key: 1,
773
860
  d: t.pointerPath,
@@ -776,7 +863,7 @@ var Ge = {
776
863
  stroke: t.outlineColor,
777
864
  "stroke-width": t.lineWidth + t.outlineWidth,
778
865
  "stroke-linecap": "round"
779
- }, null, 8, qe)) : i("", !0),
866
+ }, null, 8, Ze)) : i("", !0),
780
867
  t.arrowTip && t.outlineWidth > 0 ? (_(), a("polygon", {
781
868
  key: 2,
782
869
  points: "0,0 -6,-3 -6,3",
@@ -786,7 +873,7 @@ var Ge = {
786
873
  "stroke-width": t.outlineWidth,
787
874
  "stroke-linejoin": "round",
788
875
  transform: t.arrowTransform
789
- }, null, 8, Je)) : i("", !0),
876
+ }, null, 8, X)) : i("", !0),
790
877
  t.rule ? (_(), a("line", d({
791
878
  key: 3,
792
879
  ref_for: !0
@@ -795,7 +882,7 @@ var Ge = {
795
882
  "stroke-width": t.lineWidth,
796
883
  "stroke-dasharray": t.lineDash,
797
884
  "stroke-linecap": "round"
798
- }), null, 16, Ye)) : i("", !0),
885
+ }), null, 16, Qe)) : i("", !0),
799
886
  t.pointerPath ? (_(), a("path", {
800
887
  key: 4,
801
888
  d: t.pointerPath,
@@ -804,13 +891,13 @@ var Ge = {
804
891
  "stroke-width": t.lineWidth,
805
892
  "stroke-dasharray": t.lineDash,
806
893
  "stroke-linecap": "round"
807
- }, null, 8, q)) : i("", !0),
894
+ }, null, 8, $e)) : i("", !0),
808
895
  t.arrowTip ? (_(), a("polygon", {
809
896
  key: 5,
810
897
  points: "0,0 -6,-3 -6,3",
811
898
  fill: t.lineColor,
812
899
  transform: t.arrowTransform
813
- }, null, 8, Xe)) : i("", !0),
900
+ }, null, 8, et)) : i("", !0),
814
901
  o("text", {
815
902
  x: t.textX,
816
903
  y: t.textY,
@@ -828,14 +915,14 @@ var Ge = {
828
915
  dy: r === 0 ? 0 : t.dy
829
916
  }, [(_(!0), a(e, null, y(n, (e, t) => (_(), a("tspan", {
830
917
  key: t,
831
- "font-weight": e.bold ? Qe : void 0,
918
+ "font-weight": e.bold ? ot : void 0,
832
919
  "font-style": e.italic ? "italic" : void 0
833
- }, x(e.text), 9, Ze))), 128))], 8, Y))), 128))], 8, J)
920
+ }, b(e.text), 9, rt))), 128))], 8, nt))), 128))], 8, tt)
834
921
  ], 64))), 128))]));
835
922
  }
836
- }), st = 400, ct = 200;
837
- function lt(e) {
838
- let { containerRef: t, measuredWidth: r, measuredHeight: i } = be({ debounce: e.debounce }), { svgRef: a, items: o, downloadLinkText: s, csvHref: c, downloadButtonText: l, triggerCsvDownload: u, resolvedFilename: d, isFullscreen: f, fullscreenStyle: p, teleportTarget: m, exitFullscreen: h } = Ve({
923
+ }), ht = 400, gt = 200;
924
+ function _t(e) {
925
+ let { containerRef: t, measuredWidth: r, measuredHeight: i } = Ce({ debounce: e.debounce }), { svgRef: a, items: o, downloadLinkText: s, csvHref: c, downloadButtonText: l, triggerCsvDownload: u, resolvedFilename: d, isFullscreen: f, fullscreenStyle: p, teleportTarget: m, exitFullscreen: h } = Ue({
839
926
  filename: e.filename,
840
927
  legacyMenuLabel: e.menu,
841
928
  getCsv: e.getCsv,
@@ -843,22 +930,22 @@ function lt(e) {
843
930
  downloadButton: e.downloadButton,
844
931
  fullscreen: !0,
845
932
  fullscreenTarget: e.fullscreenTarget
846
- }), g = n(() => f.value && r.value > 0 ? r.value : e.width() ?? (r.value || st)), _ = n(() => {
933
+ }), g = n(() => f.value && r.value > 0 ? r.value : e.width() ?? (r.value || ht)), ee = n(() => {
847
934
  if (f.value && i.value > 0) {
848
935
  let t = e.extraBelowHeight?.() ?? 0;
849
936
  return i.value - t;
850
937
  }
851
- return e.height() ?? ct;
852
- }), { padding: v, legendY: y, inlineLegendLayout: b, innerW: x, innerH: ee, bounds: S } = Oe({
938
+ return e.height() ?? gt;
939
+ }), { padding: _, legendY: v, inlineLegendLayout: y, innerW: te, innerH: b, bounds: ne } = Ae({
853
940
  title: e.title,
854
941
  titleStyle: e.titleStyle,
855
942
  xLabel: e.xLabel,
856
943
  yLabel: e.yLabel,
857
944
  inlineLegendLabels: e.inlineLegendLabels,
858
945
  width: () => g.value,
859
- height: () => _.value,
946
+ height: () => ee.value,
860
947
  extraPadding: e.chartPadding
861
- }), { hoverIndex: C, tooltipRef: te, tooltipPos: w, handlers: T } = Me({
948
+ }), { hoverIndex: x, tooltipRef: S, tooltipPos: C, handlers: w } = Ne({
862
949
  enabled: e.hasTooltipSlot,
863
950
  trigger: e.tooltipTrigger,
864
951
  clamp: () => e.tooltipClamp() ?? "chart",
@@ -871,17 +958,17 @@ function lt(e) {
871
958
  containerRef: t,
872
959
  svgRef: a,
873
960
  width: g,
874
- height: _,
875
- padding: v,
876
- legendY: y,
877
- inlineLegendLayout: b,
878
- innerW: x,
879
- innerH: ee,
880
- bounds: S,
881
- hoverIndex: C,
882
- tooltipRef: te,
883
- tooltipPos: w,
884
- tooltipHandlers: T,
961
+ height: ee,
962
+ padding: _,
963
+ legendY: v,
964
+ inlineLegendLayout: y,
965
+ innerW: te,
966
+ innerH: b,
967
+ bounds: ne,
968
+ hoverIndex: x,
969
+ tooltipRef: S,
970
+ tooltipPos: C,
971
+ tooltipHandlers: w,
885
972
  menuItems: o,
886
973
  downloadLinkText: s,
887
974
  csvHref: c,
@@ -891,21 +978,20 @@ function lt(e) {
891
978
  isFullscreen: f,
892
979
  fullscreenStyle: p,
893
980
  teleportTarget: m,
894
- exitFullscreen: h,
895
- measuredHeight: i
981
+ exitFullscreen: h
896
982
  };
897
983
  }
898
- function ut(e, t) {
984
+ function vt(e, t) {
899
985
  return (n) => {
900
986
  let r = e();
901
- if (r !== void 0) return ne(n, r);
987
+ if (r !== void 0) return re(n, r);
902
988
  let i = t();
903
- return i === void 0 ? B(n) : ne(n, i);
989
+ return i === void 0 ? z(n) : re(n, i);
904
990
  };
905
991
  }
906
992
  //#endregion
907
993
  //#region src/_shared/contrast.ts
908
- function dt(e) {
994
+ function yt(e) {
909
995
  let t = e.trim();
910
996
  if (t.startsWith("#")) {
911
997
  let e = t.slice(1);
@@ -932,201 +1018,201 @@ function dt(e) {
932
1018
  }
933
1019
  return null;
934
1020
  }
935
- function ft([e, t, n]) {
1021
+ function bt([e, t, n]) {
936
1022
  let r = (e) => {
937
1023
  let t = e / 255;
938
1024
  return t <= .03928 ? t / 12.92 : ((t + .055) / 1.055) ** 2.4;
939
1025
  };
940
1026
  return .2126 * r(e) + .7152 * r(t) + .0722 * r(n);
941
1027
  }
942
- var pt = null, mt = /* @__PURE__ */ new Map();
943
- function ht(e) {
944
- let t = dt(e);
1028
+ var xt = null, St = /* @__PURE__ */ new Map();
1029
+ function Ct(e) {
1030
+ let t = yt(e);
945
1031
  if (t) return t;
946
- if (mt.has(e)) return mt.get(e) ?? null;
1032
+ if (St.has(e)) return St.get(e) ?? null;
947
1033
  if (typeof document > "u") return null;
948
- pt || (pt = document.createElement("span"), pt.style.cssText = "position:absolute;width:0;height:0;visibility:hidden;pointer-events:none", document.body.appendChild(pt)), pt.style.color = "", pt.style.color = e;
949
- let n = getComputedStyle(pt).color, r = dt(n);
950
- return mt.set(e, r), r;
1034
+ xt || (xt = document.createElement("span"), xt.style.cssText = "position:absolute;width:0;height:0;visibility:hidden;pointer-events:none", document.body.appendChild(xt)), xt.style.color = "", xt.style.color = e;
1035
+ let n = getComputedStyle(xt).color, r = yt(n);
1036
+ return St.set(e, r), r;
951
1037
  }
952
- function gt(e, t = "#ffffff", n = "#1a1a1a") {
953
- let r = ht(e);
954
- return r && ft(r) > .179 ? n : t;
1038
+ function wt(e, t = "#ffffff", n = "#1a1a1a") {
1039
+ let r = Ct(e);
1040
+ return r && bt(r) > .179 ? n : t;
955
1041
  }
956
1042
  //#endregion
957
1043
  //#region src/_shared/dateAxis.ts
958
- var _t = /^(\d{4})-(\d{2})-(\d{2})$/, vt = /^(\d{4})-(\d{2})-(\d{2})[Tt ](\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?(Z|[+-]\d{2}:?\d{2})?$/, yt = 1e3, Q = 60 * yt, bt = 60 * Q, xt = 24 * bt, St = 7 * xt, Ct = 30 * xt, wt = 365 * xt, Tt = [
1044
+ var Tt = /^(\d{4})-(\d{2})-(\d{2})$/, Et = /^(\d{4})-(\d{2})-(\d{2})[Tt ](\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?(Z|[+-]\d{2}:?\d{2})?$/, Z = 1e3, Dt = 60 * Z, Ot = 60 * Dt, kt = 24 * Ot, At = 7 * kt, jt = 30 * kt, Mt = 365 * kt, Nt = [
959
1045
  {
960
1046
  unit: "second",
961
1047
  step: 1,
962
- ms: 1 * yt
1048
+ ms: 1 * Z
963
1049
  },
964
1050
  {
965
1051
  unit: "second",
966
1052
  step: 5,
967
- ms: 5 * yt
1053
+ ms: 5 * Z
968
1054
  },
969
1055
  {
970
1056
  unit: "second",
971
1057
  step: 15,
972
- ms: 15 * yt
1058
+ ms: 15 * Z
973
1059
  },
974
1060
  {
975
1061
  unit: "second",
976
1062
  step: 30,
977
- ms: 30 * yt
1063
+ ms: 30 * Z
978
1064
  },
979
1065
  {
980
1066
  unit: "minute",
981
1067
  step: 1,
982
- ms: 1 * Q
1068
+ ms: 1 * Dt
983
1069
  },
984
1070
  {
985
1071
  unit: "minute",
986
1072
  step: 5,
987
- ms: 5 * Q
1073
+ ms: 5 * Dt
988
1074
  },
989
1075
  {
990
1076
  unit: "minute",
991
1077
  step: 15,
992
- ms: 15 * Q
1078
+ ms: 15 * Dt
993
1079
  },
994
1080
  {
995
1081
  unit: "minute",
996
1082
  step: 30,
997
- ms: 30 * Q
1083
+ ms: 30 * Dt
998
1084
  },
999
1085
  {
1000
1086
  unit: "hour",
1001
1087
  step: 1,
1002
- ms: 1 * bt
1088
+ ms: 1 * Ot
1003
1089
  },
1004
1090
  {
1005
1091
  unit: "hour",
1006
1092
  step: 3,
1007
- ms: 3 * bt
1093
+ ms: 3 * Ot
1008
1094
  },
1009
1095
  {
1010
1096
  unit: "hour",
1011
1097
  step: 6,
1012
- ms: 6 * bt
1098
+ ms: 6 * Ot
1013
1099
  },
1014
1100
  {
1015
1101
  unit: "hour",
1016
1102
  step: 12,
1017
- ms: 12 * bt
1103
+ ms: 12 * Ot
1018
1104
  },
1019
1105
  {
1020
1106
  unit: "day",
1021
1107
  step: 1,
1022
- ms: 1 * xt
1108
+ ms: 1 * kt
1023
1109
  },
1024
1110
  {
1025
1111
  unit: "day",
1026
1112
  step: 2,
1027
- ms: 2 * xt
1113
+ ms: 2 * kt
1028
1114
  },
1029
1115
  {
1030
1116
  unit: "week",
1031
1117
  step: 1,
1032
- ms: 1 * St
1118
+ ms: 1 * At
1033
1119
  },
1034
1120
  {
1035
1121
  unit: "month",
1036
1122
  step: 1,
1037
- ms: 1 * Ct
1123
+ ms: 1 * jt
1038
1124
  },
1039
1125
  {
1040
1126
  unit: "month",
1041
1127
  step: 3,
1042
- ms: 3 * Ct
1128
+ ms: 3 * jt
1043
1129
  },
1044
1130
  {
1045
1131
  unit: "month",
1046
1132
  step: 6,
1047
- ms: 6 * Ct
1133
+ ms: 6 * jt
1048
1134
  },
1049
1135
  {
1050
1136
  unit: "year",
1051
1137
  step: 1,
1052
- ms: 1 * wt
1138
+ ms: 1 * Mt
1053
1139
  },
1054
1140
  {
1055
1141
  unit: "year",
1056
1142
  step: 2,
1057
- ms: 2 * wt
1143
+ ms: 2 * Mt
1058
1144
  },
1059
1145
  {
1060
1146
  unit: "year",
1061
1147
  step: 5,
1062
- ms: 5 * wt
1148
+ ms: 5 * Mt
1063
1149
  },
1064
1150
  {
1065
1151
  unit: "year",
1066
1152
  step: 10,
1067
- ms: 10 * wt
1153
+ ms: 10 * Mt
1068
1154
  },
1069
1155
  {
1070
1156
  unit: "year",
1071
1157
  step: 25,
1072
- ms: 25 * wt
1158
+ ms: 25 * Mt
1073
1159
  },
1074
1160
  {
1075
1161
  unit: "year",
1076
1162
  step: 50,
1077
- ms: 50 * wt
1163
+ ms: 50 * Mt
1078
1164
  },
1079
1165
  {
1080
1166
  unit: "year",
1081
1167
  step: 100,
1082
- ms: 100 * wt
1168
+ ms: 100 * Mt
1083
1169
  }
1084
- ], Et = 1e3;
1085
- function Dt(e, t) {
1170
+ ], Pt = 1e3;
1171
+ function Ft(e, t) {
1086
1172
  if (e instanceof Date) {
1087
1173
  let t = e.getTime();
1088
1174
  return Number.isFinite(t) ? t : null;
1089
1175
  }
1090
1176
  if (typeof e != "string") return null;
1091
- let n = _t.exec(e);
1177
+ let n = Tt.exec(e);
1092
1178
  if (n) {
1093
1179
  let e = +n[1], r = n[2] - 1, i = +n[3];
1094
1180
  return t === "utc" ? Date.UTC(e, r, i) : new Date(e, r, i).getTime();
1095
1181
  }
1096
- let r = vt.exec(e);
1182
+ let r = Et.exec(e);
1097
1183
  if (r) {
1098
1184
  let e = +r[1], n = r[2] - 1, i = +r[3], a = +r[4], o = +r[5], s = r[6] ? +r[6] : 0, c = r[7] ? Number("0." + r[7]) * 1e3 : 0, l = r[8];
1099
1185
  if (l) {
1100
1186
  if (l === "Z" || l === "z") return Date.UTC(e, n, i, a, o, s, c);
1101
- let t = l[0] === "+" ? 1 : -1, r = +l.slice(1, 3), u = +l.slice(-2), d = t * (r * 60 + u) * Q;
1187
+ let t = l[0] === "+" ? 1 : -1, r = +l.slice(1, 3), u = +l.slice(-2), d = t * (r * 60 + u) * Dt;
1102
1188
  return Date.UTC(e, n, i, a, o, s, c) - d;
1103
1189
  }
1104
1190
  return t === "utc" ? Date.UTC(e, n, i, a, o, s, c) : new Date(e, n, i, a, o, s, c).getTime();
1105
1191
  }
1106
1192
  return null;
1107
1193
  }
1108
- function Ot(e) {
1109
- return e instanceof Date ? Number.isFinite(e.getTime()) : typeof e == "string" ? _t.test(e) || vt.test(e) : !1;
1194
+ function It(e) {
1195
+ return e instanceof Date ? Number.isFinite(e.getTime()) : typeof e == "string" ? Tt.test(e) || Et.test(e) : !1;
1110
1196
  }
1111
- function kt(e, t) {
1197
+ function Lt(e, t) {
1112
1198
  if (e.length === 0) return !1;
1113
1199
  for (let n = 0; n < e.length; n++) {
1114
1200
  let r = e[n];
1115
- if (!Ot(r) || Dt(r, t) === null) return !1;
1201
+ if (!It(r) || Ft(r, t) === null) return !1;
1116
1202
  }
1117
1203
  return !0;
1118
1204
  }
1119
- function At(e, t) {
1205
+ function Rt(e, t) {
1120
1206
  let n = e / Math.max(1, t);
1121
- for (let e of Tt) if (n <= e.ms) return e;
1122
- return Tt[Tt.length - 1];
1207
+ for (let e of Nt) if (n <= e.ms) return e;
1208
+ return Nt[Nt.length - 1];
1123
1209
  }
1124
- function jt(e, t, n) {
1210
+ function zt(e, t, n) {
1125
1211
  let r = new Date(e);
1126
1212
  if (n === "utc") switch (t) {
1127
- case "second": return Math.floor(e / yt) * yt;
1128
- case "minute": return Math.floor(e / Q) * Q;
1129
- case "hour": return Math.floor(e / bt) * bt;
1213
+ case "second": return Math.floor(e / Z) * Z;
1214
+ case "minute": return Math.floor(e / Dt) * Dt;
1215
+ case "hour": return Math.floor(e / Ot) * Ot;
1130
1216
  case "day": return Date.UTC(r.getUTCFullYear(), r.getUTCMonth(), r.getUTCDate());
1131
1217
  case "week": {
1132
1218
  let e = (r.getUTCDay() + 6) % 7;
@@ -1136,8 +1222,8 @@ function jt(e, t, n) {
1136
1222
  case "year": return Date.UTC(r.getUTCFullYear(), 0, 1);
1137
1223
  }
1138
1224
  switch (t) {
1139
- case "second": return Math.floor(e / yt) * yt;
1140
- case "minute": return Math.floor(e / Q) * Q;
1225
+ case "second": return Math.floor(e / Z) * Z;
1226
+ case "minute": return Math.floor(e / Dt) * Dt;
1141
1227
  case "hour": return new Date(r.getFullYear(), r.getMonth(), r.getDate(), r.getHours()).getTime();
1142
1228
  case "day": return new Date(r.getFullYear(), r.getMonth(), r.getDate()).getTime();
1143
1229
  case "week": {
@@ -1148,11 +1234,11 @@ function jt(e, t, n) {
1148
1234
  case "year": return new Date(r.getFullYear(), 0, 1).getTime();
1149
1235
  }
1150
1236
  }
1151
- function Mt(e, t, n, r) {
1152
- if (t === "second") return e + n * yt;
1153
- if (t === "minute") return e + n * Q;
1154
- if (t === "hour" && r === "utc") return e + n * bt;
1155
- if (t === "week" && r === "utc") return e + n * St;
1237
+ function Bt(e, t, n, r) {
1238
+ if (t === "second") return e + n * Z;
1239
+ if (t === "minute") return e + n * Dt;
1240
+ if (t === "hour" && r === "utc") return e + n * Ot;
1241
+ if (t === "week" && r === "utc") return e + n * At;
1156
1242
  let i = new Date(e);
1157
1243
  if (r === "utc") switch (t) {
1158
1244
  case "day": return Date.UTC(i.getUTCFullYear(), i.getUTCMonth(), i.getUTCDate() + n, i.getUTCHours(), i.getUTCMinutes(), i.getUTCSeconds(), i.getUTCMilliseconds());
@@ -1168,21 +1254,21 @@ function Mt(e, t, n, r) {
1168
1254
  }
1169
1255
  return e;
1170
1256
  }
1171
- function Nt(e, t, n, r) {
1257
+ function Vt(e, t, n, r) {
1172
1258
  if (!Number.isFinite(e) || !Number.isFinite(t) || e >= t || n < 1) return {
1173
1259
  values: [],
1174
1260
  unit: "day"
1175
1261
  };
1176
- let { unit: i, step: a } = At(t - e, n), o = jt(e, i, r), s = 0;
1177
- for (; o < e && s < Et;) o = Mt(o, i, a, r), s++;
1262
+ let { unit: i, step: a } = Rt(t - e, n), o = zt(e, i, r), s = 0;
1263
+ for (; o < e && s < Pt;) o = Bt(o, i, a, r), s++;
1178
1264
  let c = [];
1179
- for (let e = 0; e < Et && o <= t; e++) c.push(o), o = Mt(o, i, a, r);
1265
+ for (let e = 0; e < Pt && o <= t; e++) c.push(o), o = Bt(o, i, a, r);
1180
1266
  return {
1181
1267
  values: c,
1182
1268
  unit: i
1183
1269
  };
1184
1270
  }
1185
- var Pt = {
1271
+ var Ht = {
1186
1272
  iso: {
1187
1273
  year: "numeric",
1188
1274
  month: "2-digit",
@@ -1220,7 +1306,7 @@ var Pt = {
1220
1306
  hourCycle: "h23"
1221
1307
  },
1222
1308
  medium: { dateStyle: "medium" }
1223
- }, Ft = {
1309
+ }, Ut = {
1224
1310
  year: "year",
1225
1311
  month: "month-year",
1226
1312
  week: "month-day",
@@ -1229,30 +1315,30 @@ var Pt = {
1229
1315
  minute: "time",
1230
1316
  second: "time"
1231
1317
  };
1232
- function $(e) {
1318
+ function Q(e) {
1233
1319
  return e < 10 ? "0" + e : String(e);
1234
1320
  }
1235
- function It(e, t) {
1321
+ function Wt(e, t) {
1236
1322
  let n = new Date(e);
1237
- return t === "utc" ? `${n.getUTCFullYear()}-${$(n.getUTCMonth() + 1)}-${$(n.getUTCDate())}` : `${n.getFullYear()}-${$(n.getMonth() + 1)}-${$(n.getDate())}`;
1323
+ return t === "utc" ? `${n.getUTCFullYear()}-${Q(n.getUTCMonth() + 1)}-${Q(n.getUTCDate())}` : `${n.getFullYear()}-${Q(n.getMonth() + 1)}-${Q(n.getDate())}`;
1238
1324
  }
1239
- function Lt(e, t) {
1325
+ function Gt(e, t) {
1240
1326
  let n = new Date(e);
1241
- return t === "utc" ? `${n.getUTCFullYear()}-${$(n.getUTCMonth() + 1)}-${$(n.getUTCDate())}T${$(n.getUTCHours())}:${$(n.getUTCMinutes())}:${$(n.getUTCSeconds())}Z` : `${n.getFullYear()}-${$(n.getMonth() + 1)}-${$(n.getDate())}T${$(n.getHours())}:${$(n.getMinutes())}:${$(n.getSeconds())}`;
1327
+ return t === "utc" ? `${n.getUTCFullYear()}-${Q(n.getUTCMonth() + 1)}-${Q(n.getUTCDate())}T${Q(n.getUTCHours())}:${Q(n.getUTCMinutes())}:${Q(n.getUTCSeconds())}Z` : `${n.getFullYear()}-${Q(n.getMonth() + 1)}-${Q(n.getDate())}T${Q(n.getHours())}:${Q(n.getMinutes())}:${Q(n.getSeconds())}`;
1242
1328
  }
1243
- function Rt(e) {
1244
- return e in Pt;
1329
+ function Kt(e) {
1330
+ return e in Ht;
1245
1331
  }
1246
- function zt(e, t, n, r) {
1332
+ function qt(e, t, n, r) {
1247
1333
  if (typeof t == "function") return t(e, r);
1248
1334
  let i = null, a;
1249
- if (t === void 0) i = r ? Ft[r] : "iso", a = Pt[i];
1335
+ if (t === void 0) i = r ? Ut[r] : "iso", a = Ht[i];
1250
1336
  else if (typeof t == "string") {
1251
- if (!Rt(t)) throw Error(`Unknown date format preset: "${t}"`);
1252
- i = t, a = Pt[i];
1337
+ if (!Kt(t)) throw Error(`Unknown date format preset: "${t}"`);
1338
+ i = t, a = Ht[i];
1253
1339
  } else a = t;
1254
- if (i === "iso") return It(e, n);
1255
- if (i === "iso-datetime") return Lt(e, n);
1340
+ if (i === "iso") return Wt(e, n);
1341
+ if (i === "iso-datetime") return Gt(e, n);
1256
1342
  let o = n === "utc" ? {
1257
1343
  ...a,
1258
1344
  timeZone: "UTC"
@@ -1261,68 +1347,73 @@ function zt(e, t, n, r) {
1261
1347
  }
1262
1348
  //#endregion
1263
1349
  //#region src/LineChart/LineChart.vue?vue&type=script&setup=true&lang.ts
1264
- var Bt = ["role", "aria-label"], Vt = {
1350
+ var Jt = {
1265
1351
  class: "chart-sr-only",
1266
1352
  "aria-live": "polite"
1267
- }, Ht = ["width", "height"], Ut = [
1353
+ }, Yt = [
1354
+ "width",
1355
+ "height",
1356
+ "role",
1357
+ "aria-label"
1358
+ ], Xt = [
1268
1359
  "x",
1269
1360
  "y",
1270
1361
  "text-anchor",
1271
1362
  "font-size",
1272
1363
  "font-weight",
1273
1364
  "fill"
1274
- ], Wt = ["x", "dy"], Gt = { key: 1 }, Kt = [
1365
+ ], Zt = ["x", "dy"], Qt = { key: 1 }, $t = [
1275
1366
  "x1",
1276
1367
  "y1",
1277
1368
  "x2",
1278
1369
  "y2",
1279
1370
  "stroke",
1280
1371
  "stroke-dasharray"
1281
- ], qt = [
1372
+ ], en = [
1282
1373
  "cx",
1283
1374
  "cy",
1284
1375
  "fill",
1285
1376
  "fill-opacity",
1286
1377
  "stroke"
1287
- ], Jt = [
1378
+ ], tn = [
1288
1379
  "x",
1289
1380
  "y",
1290
1381
  "font-size",
1291
1382
  "fill",
1292
1383
  "font-weight"
1293
- ], Yt = [
1384
+ ], nn = [
1294
1385
  "x1",
1295
1386
  "y1",
1296
1387
  "x2",
1297
1388
  "y2"
1298
- ], Xt = [
1389
+ ], rn = [
1299
1390
  "x1",
1300
1391
  "y1",
1301
1392
  "x2",
1302
1393
  "y2"
1303
- ], Zt = [
1394
+ ], an = [
1304
1395
  "x1",
1305
1396
  "y1",
1306
1397
  "x2",
1307
1398
  "y2"
1308
- ], Qt = [
1399
+ ], on = [
1309
1400
  "x1",
1310
1401
  "y1",
1311
1402
  "x2",
1312
1403
  "y2"
1313
- ], $t = [
1404
+ ], sn = [
1314
1405
  "x",
1315
1406
  "y",
1316
1407
  "font-size",
1317
1408
  "fill",
1318
1409
  "font-weight",
1319
1410
  "fill-opacity"
1320
- ], en = [
1411
+ ], cn = [
1321
1412
  "transform",
1322
1413
  "font-size",
1323
1414
  "fill",
1324
1415
  "font-weight"
1325
- ], tn = [
1416
+ ], ln = [
1326
1417
  "x",
1327
1418
  "y",
1328
1419
  "text-anchor",
@@ -1330,43 +1421,43 @@ var Bt = ["role", "aria-label"], Vt = {
1330
1421
  "fill",
1331
1422
  "font-weight",
1332
1423
  "fill-opacity"
1333
- ], nn = [
1424
+ ], un = [
1334
1425
  "x",
1335
1426
  "y",
1336
1427
  "font-size",
1337
1428
  "fill",
1338
1429
  "font-weight"
1339
- ], rn = [
1430
+ ], dn = [
1340
1431
  "d",
1341
1432
  "fill",
1342
1433
  "fill-opacity"
1343
- ], an = [
1434
+ ], fn = [
1344
1435
  "d",
1345
1436
  "stroke",
1346
1437
  "stroke-width"
1347
- ], on = [
1438
+ ], pn = [
1348
1439
  "d",
1349
1440
  "stroke",
1350
1441
  "stroke-width",
1351
1442
  "stroke-opacity",
1352
1443
  "stroke-dasharray"
1353
- ], sn = [
1444
+ ], mn = [
1354
1445
  "cx",
1355
1446
  "cy",
1356
1447
  "r",
1357
1448
  "fill",
1358
1449
  "fill-opacity",
1359
1450
  "stroke"
1360
- ], cn = [
1451
+ ], $ = [
1361
1452
  "d",
1362
1453
  "fill",
1363
1454
  "fill-opacity"
1364
- ], ln = [
1455
+ ], hn = [
1365
1456
  "d",
1366
1457
  "stroke",
1367
1458
  "stroke-width",
1368
1459
  "stroke-dasharray"
1369
- ], un = [
1460
+ ], gn = [
1370
1461
  "x1",
1371
1462
  "y1",
1372
1463
  "x2",
@@ -1374,7 +1465,7 @@ var Bt = ["role", "aria-label"], Vt = {
1374
1465
  "stroke",
1375
1466
  "stroke-width",
1376
1467
  "stroke-dasharray"
1377
- ], dn = [
1468
+ ], _n = [
1378
1469
  "x1",
1379
1470
  "y1",
1380
1471
  "x2",
@@ -1382,53 +1473,53 @@ var Bt = ["role", "aria-label"], Vt = {
1382
1473
  "stroke",
1383
1474
  "stroke-width",
1384
1475
  "stroke-dasharray"
1385
- ], fn = [
1476
+ ], vn = [
1386
1477
  "x1",
1387
1478
  "y1",
1388
1479
  "x2",
1389
1480
  "y2"
1390
- ], pn = [
1481
+ ], yn = [
1391
1482
  "x1",
1392
1483
  "y1",
1393
1484
  "x2",
1394
1485
  "y2"
1395
- ], mn = [
1486
+ ], bn = [
1396
1487
  "x1",
1397
1488
  "y1",
1398
1489
  "x2",
1399
1490
  "y2"
1400
- ], hn = [
1491
+ ], xn = [
1401
1492
  "cx",
1402
1493
  "cy",
1403
1494
  "fill"
1404
- ], gn = [
1495
+ ], Sn = [
1405
1496
  "x",
1406
1497
  "y",
1407
1498
  "width",
1408
1499
  "height"
1409
- ], _n = [
1500
+ ], Cn = [
1410
1501
  "cx",
1411
1502
  "cy",
1412
1503
  "fill",
1413
1504
  "fill-opacity",
1414
1505
  "stroke"
1415
- ], vn = [
1506
+ ], wn = [
1416
1507
  "x",
1417
1508
  "y",
1418
1509
  "font-size",
1419
1510
  "font-weight",
1420
1511
  "fill"
1421
- ], yn = [
1512
+ ], Tn = [
1422
1513
  "x",
1423
1514
  "y",
1424
1515
  "font-size",
1425
1516
  "font-weight",
1426
1517
  "fill",
1427
1518
  "fill-opacity"
1428
- ], bn = { class: "line-chart-tooltip" }, xn = {
1519
+ ], En = { class: "line-chart-tooltip" }, Dn = {
1429
1520
  key: 0,
1430
1521
  class: "line-chart-tooltip-label"
1431
- }, Sn = ["href", "download"], Cn = 36, wn = 12, Tn = 7, En = 16, Dn = /* @__PURE__ */ L(/* @__PURE__ */ l({
1522
+ }, On = ["href", "download"], kn = 36, An = 12, jn = 7, Mn = 16, Nn = /* @__PURE__ */ I(/* @__PURE__ */ l({
1432
1523
  inheritAttrs: !1,
1433
1524
  __name: "LineChart",
1434
1525
  props: {
@@ -1480,22 +1571,22 @@ var Bt = ["role", "aria-label"], Vt = {
1480
1571
  },
1481
1572
  emits: ["hover"],
1482
1573
  setup(c, { emit: l }) {
1483
- let f = c, h = n(() => f.ariaLabel ?? f.title), g = n(() => f.role ?? (h.value ? "figure" : void 0)), v = l, S = [];
1484
- function* te(e) {
1574
+ let f = c, p = n(() => f.ariaLabel ?? f.title), g = n(() => f.role ?? (p.value ? "img" : void 0)), ee = l, v = [];
1575
+ function* x(e) {
1485
1576
  if (e.x && e.x.length > 0 && (yield e.x), e.series) for (let t of e.series) t.x && t.x.length > 0 && (yield t.x);
1486
1577
  if (e.areas) for (let t of e.areas) t.x && t.x.length > 0 && (yield t.x);
1487
1578
  }
1488
- function w(e, t, n) {
1579
+ function C(e, t, n) {
1489
1580
  if (!e) return;
1490
1581
  if (!t) return e;
1491
1582
  let r = new Float64Array(e.length);
1492
- for (let t = 0; t < e.length; t++) r[t] = Dt(e[t], n) ?? NaN;
1583
+ for (let t = 0; t < e.length; t++) r[t] = Ft(e[t], n) ?? NaN;
1493
1584
  return r;
1494
1585
  }
1495
- let T = ut(() => f.tooltipValueFormat, () => f.yTickFormat), E = n(() => f.timezone ?? "utc"), D = n(() => {
1496
- let e = E.value, t = !1, n = !1;
1497
- for (let r of te(f)) {
1498
- if (n = !0, !kt(r, e)) {
1586
+ let w = vt(() => f.tooltipValueFormat, () => f.yTickFormat), T = n(() => f.timezone ?? "utc"), E = n(() => {
1587
+ let e = T.value, t = !1, n = !1;
1588
+ for (let r of x(f)) {
1589
+ if (n = !0, !Lt(r, e)) {
1499
1590
  t = !1;
1500
1591
  break;
1501
1592
  }
@@ -1504,45 +1595,45 @@ var Bt = ["role", "aria-label"], Vt = {
1504
1595
  n || (t = !1);
1505
1596
  let r = f.series && f.series.length > 0 ? f.series.map((n) => ({
1506
1597
  ...n,
1507
- data: n.y ?? n.data ?? S,
1508
- x: w(n.x, t, e)
1598
+ data: n.y ?? n.data ?? v,
1599
+ x: C(n.x, t, e)
1509
1600
  })) : (() => {
1510
1601
  let n = f.y ?? f.data;
1511
1602
  return n ? [{
1512
1603
  data: n,
1513
- x: w(f.x, t, e)
1604
+ x: C(f.x, t, e)
1514
1605
  }] : [];
1515
1606
  })(), i = (f.areas ?? []).map((n) => ({
1516
1607
  ...n,
1517
- x: w(n.x, t, e)
1608
+ x: C(n.x, t, e)
1518
1609
  }));
1519
1610
  return {
1520
1611
  isDate: t,
1521
1612
  series: r,
1522
1613
  areas: i
1523
1614
  };
1524
- }), O = n(() => D.value.isDate), k = n(() => D.value.series), A = n(() => D.value.areas), re = n(() => {
1615
+ }), D = n(() => E.value.isDate), O = n(() => E.value.series), ie = n(() => E.value.areas), k = n(() => {
1525
1616
  let e = 0;
1526
- for (let t of k.value) t.data.length > e && (e = t.data.length);
1527
- for (let t of A.value) t.upper.length > e && (e = t.upper.length), t.lower.length > e && (e = t.lower.length);
1617
+ for (let t of O.value) t.data.length > e && (e = t.data.length);
1618
+ for (let t of ie.value) t.upper.length > e && (e = t.upper.length), t.lower.length > e && (e = t.lower.length);
1528
1619
  return e;
1529
- }), j = n(() => k.value.some((e) => e.x != null) || A.value.some((e) => e.x != null));
1530
- function M(e, t) {
1620
+ }), A = n(() => O.value.some((e) => e.x != null) || ie.value.some((e) => e.x != null));
1621
+ function j(e, t) {
1531
1622
  return e.x ? Number(e.x[t]) : t;
1532
1623
  }
1533
- function N(e, t) {
1624
+ function ae(e, t) {
1534
1625
  return e.x ? Number(e.x[t]) : t;
1535
1626
  }
1536
- let ie = n(() => j.value ? 0 : f.xMin ?? 0), ae = n(() => {
1627
+ let M = n(() => A.value ? 0 : f.xMin ?? 0), oe = n(() => {
1537
1628
  let e = Infinity, t = -Infinity;
1538
- for (let n of k.value) for (let r = 0; r < n.data.length; r++) {
1539
- let i = M(n, r);
1629
+ for (let n of O.value) for (let r = 0; r < n.data.length; r++) {
1630
+ let i = j(n, r);
1540
1631
  isFinite(i) && (i < e && (e = i), i > t && (t = i));
1541
1632
  }
1542
- for (let n of A.value) {
1633
+ for (let n of ie.value) {
1543
1634
  let r = Math.max(n.upper.length, n.lower.length);
1544
1635
  for (let i = 0; i < r; i++) {
1545
- let r = N(n, i);
1636
+ let r = ae(n, i);
1546
1637
  isFinite(r) && (r < e && (e = r), r > t && (t = r));
1547
1638
  }
1548
1639
  }
@@ -1554,16 +1645,16 @@ var Bt = ["role", "aria-label"], Vt = {
1554
1645
  max: 0
1555
1646
  };
1556
1647
  });
1557
- function P(e) {
1558
- let { min: t, max: n } = ae.value, r = n - t || 1;
1648
+ function N(e) {
1649
+ let { min: t, max: n } = oe.value, r = n - t || 1;
1559
1650
  return U.value.left + (e - t) / r * G.value;
1560
1651
  }
1561
- let oe = n(() => {
1652
+ let se = n(() => {
1562
1653
  let e = Infinity, t = -Infinity, n = Infinity, r = (r) => {
1563
1654
  isFinite(r) && (r < e && (e = r), r > t && (t = r), r > 0 && r < n && (n = r));
1564
1655
  };
1565
- for (let e of k.value) for (let t of e.data) r(t);
1566
- for (let e of A.value) {
1656
+ for (let e of O.value) for (let t of e.data) r(t);
1657
+ for (let e of ie.value) {
1567
1658
  for (let t of e.upper) r(t);
1568
1659
  for (let t of e.lower) r(t);
1569
1660
  }
@@ -1573,77 +1664,77 @@ var Bt = ["role", "aria-label"], Vt = {
1573
1664
  range: 1
1574
1665
  };
1575
1666
  f.yMin != null && f.yMin < e && (e = f.yMin);
1576
- let i = ve(e, t, f.yScaleType, n);
1667
+ let i = xe(e, t, f.yScaleType, n);
1577
1668
  return {
1578
1669
  min: i.min,
1579
1670
  max: i.max,
1580
1671
  range: i.max - i.min || 1
1581
1672
  };
1582
1673
  });
1583
- function F(e) {
1584
- let { min: t, max: n } = oe.value;
1585
- return U.value.top + K.value - _e(e, t, n, f.yScaleType) * K.value;
1674
+ function P(e) {
1675
+ let { min: t, max: n } = se.value;
1676
+ return U.value.top + K.value - be(e, t, n, f.yScaleType) * K.value;
1586
1677
  }
1587
- function se(e) {
1678
+ function ce(e) {
1588
1679
  let t = e.data;
1589
1680
  if (t.length === 0) return "";
1590
1681
  let n = "", r = !1;
1591
1682
  for (let i = 0; i < t.length; i++) {
1592
- let a = M(e, i);
1683
+ let a = j(e, i);
1593
1684
  if (!isFinite(t[i]) || !isFinite(a)) {
1594
1685
  r = !1;
1595
1686
  continue;
1596
1687
  }
1597
- let o = P(a), s = F(t[i]);
1688
+ let o = N(a), s = P(t[i]);
1598
1689
  n += r ? `L${o},${s}` : `M${o},${s}`, r = !0;
1599
1690
  }
1600
1691
  return n;
1601
1692
  }
1602
- function ce(e) {
1693
+ function le(e) {
1603
1694
  let t = e.data, n = [];
1604
1695
  for (let r = 0; r < t.length; r++) {
1605
- let i = M(e, r);
1696
+ let i = j(e, r);
1606
1697
  !isFinite(t[r]) || !isFinite(i) || n.push({
1607
- x: P(i),
1608
- y: F(t[r])
1698
+ x: N(i),
1699
+ y: P(t[r])
1609
1700
  });
1610
1701
  }
1611
1702
  return n;
1612
1703
  }
1613
- function le(e) {
1704
+ function ue(e) {
1614
1705
  let t = Math.min(e.upper.length, e.lower.length);
1615
1706
  if (t === 0) return "";
1616
1707
  let n = [], r = [];
1617
- for (let i = 0; i < t; i++) isFinite(e.upper[i]) && isFinite(e.lower[i]) && isFinite(N(e, i)) ? r.push(i) : r.length && (n.push(r), r = []);
1708
+ for (let i = 0; i < t; i++) isFinite(e.upper[i]) && isFinite(e.lower[i]) && isFinite(ae(e, i)) ? r.push(i) : r.length && (n.push(r), r = []);
1618
1709
  r.length && n.push(r);
1619
1710
  let i = "";
1620
1711
  for (let t of n) {
1621
- i += `M${P(N(e, t[0]))},${F(e.upper[t[0]])}`;
1622
- for (let n = 1; n < t.length; n++) i += `L${P(N(e, t[n]))},${F(e.upper[t[n]])}`;
1623
- for (let n = t.length - 1; n >= 0; n--) i += `L${P(N(e, t[n]))},${F(e.lower[t[n]])}`;
1712
+ i += `M${N(ae(e, t[0]))},${P(e.upper[t[0]])}`;
1713
+ for (let n = 1; n < t.length; n++) i += `L${N(ae(e, t[n]))},${P(e.upper[t[n]])}`;
1714
+ for (let n = t.length - 1; n >= 0; n--) i += `L${N(ae(e, t[n]))},${P(e.lower[t[n]])}`;
1624
1715
  i += "Z";
1625
1716
  }
1626
1717
  return i;
1627
1718
  }
1628
- function I(e, t) {
1629
- let n = t === "start" ? e.startIndex : e.endIndex, r = e.seriesIndex != null && k.value[e.seriesIndex] || k.value[0];
1630
- return P(r ? M(r, n) : n);
1719
+ function F(e, t) {
1720
+ let n = t === "start" ? e.startIndex : e.endIndex, r = e.seriesIndex != null && O.value[e.seriesIndex] || O.value[0];
1721
+ return N(r ? j(r, n) : n);
1631
1722
  }
1632
- function ue(e, t = !0) {
1723
+ function de(e, t = !0) {
1633
1724
  let n = U.value.top + K.value;
1634
1725
  if (e.seriesIndex == null) {
1635
- let t = I(e, "start"), r = I(e, "end");
1726
+ let t = F(e, "start"), r = F(e, "end");
1636
1727
  return t > r ? "" : `M${t},${U.value.top}L${r},${U.value.top}L${r},${n}L${t},${n}Z`;
1637
1728
  }
1638
- let r = k.value[e.seriesIndex];
1729
+ let r = O.value[e.seriesIndex];
1639
1730
  if (!r) return "";
1640
1731
  let i = Math.max(0, e.startIndex), a = Math.min(r.data.length - 1, e.endIndex);
1641
1732
  if (i > a) return "";
1642
- let o = `M${P(M(r, i))},${F(r.data[i])}`;
1643
- for (let e = i + 1; e <= a; e++) isFinite(r.data[e]) && (o += `L${P(M(r, e))},${F(r.data[e])}`);
1644
- return t && (o += `L${P(M(r, a))},${n}`, o += `L${P(M(r, i))},${n}`, o += "Z"), o;
1733
+ let o = `M${N(j(r, i))},${P(r.data[i])}`;
1734
+ for (let e = i + 1; e <= a; e++) isFinite(r.data[e]) && (o += `L${N(j(r, e))},${P(r.data[e])}`);
1735
+ return t && (o += `L${N(j(r, a))},${n}`, o += `L${N(j(r, i))},${n}`, o += "Z"), o;
1645
1736
  }
1646
- let de = n(() => {
1737
+ let fe = n(() => {
1647
1738
  let e = f.areaSections;
1648
1739
  if (!e?.length) return {
1649
1740
  labels: [],
@@ -1652,11 +1743,11 @@ var Bt = ["role", "aria-label"], Vt = {
1652
1743
  let t = [], n = U.value.left + G.value;
1653
1744
  for (let r of e) {
1654
1745
  if (!r.label && !r.description || r.legend === "inline" || r.legend === !1) continue;
1655
- let e = r.label ?? "", i = r.description ?? "", a = Math.max(e.length, i.length) * Tn, o = I(r, "start") + a / 2 + 2, s = n - a / 2 - 8, c = Math.min(o, s), l = r.color ?? (r.seriesIndex == null ? "#999" : k.value[r.seriesIndex]?.color ?? "currentColor"), u = V({
1746
+ let e = r.label ?? "", i = r.description ?? "", a = Math.max(e.length, i.length) * jn, o = F(r, "start") + a / 2 + 2, s = n - a / 2 - 8, c = Math.min(o, s), l = r.color ?? (r.seriesIndex == null ? "#999" : O.value[r.seriesIndex]?.color ?? "currentColor"), u = Te({
1656
1747
  color: l,
1657
1748
  fontWeight: 600,
1658
1749
  ...r.inlineLabelStyle
1659
- }, { fontSize: 11 }), d = V(r.inlineDescriptionStyle, {
1750
+ }, { fontSize: 11 }), d = Te(r.inlineDescriptionStyle, {
1660
1751
  fontSize: 11,
1661
1752
  fillOpacity: .6
1662
1753
  });
@@ -1676,7 +1767,7 @@ var Bt = ["role", "aria-label"], Vt = {
1676
1767
  let r = [];
1677
1768
  for (let e of t) {
1678
1769
  let t = e.cx - e.textWidth / 2, n = 0;
1679
- for (; n < r.length && !(t >= r[n] + En);) n++;
1770
+ for (; n < r.length && !(t >= r[n] + Mn);) n++;
1680
1771
  e.row = n;
1681
1772
  let i = e.cx + e.textWidth / 2;
1682
1773
  r[n] = Math.max(r[n] ?? -Infinity, i);
@@ -1686,11 +1777,11 @@ var Bt = ["role", "aria-label"], Vt = {
1686
1777
  extraHeight: 0
1687
1778
  } : {
1688
1779
  labels: t,
1689
- extraHeight: (Math.max(...t.map((e) => e.row)) + 1) * Cn + wn
1780
+ extraHeight: (Math.max(...t.map((e) => e.row)) + 1) * kn + An
1690
1781
  };
1691
- }), fe = n(() => {
1782
+ }), pe = n(() => {
1692
1783
  let e = [];
1693
- for (let t of k.value) !t.legend || t.showInLegend === !1 || e.push({
1784
+ for (let t of O.value) !t.legend || t.showInLegend === !1 || e.push({
1694
1785
  label: t.legend,
1695
1786
  color: t.color ?? "currentColor",
1696
1787
  type: "series",
@@ -1699,7 +1790,7 @@ var Bt = ["role", "aria-label"], Vt = {
1699
1790
  let t = f.areaSections;
1700
1791
  if (t) for (let n of t) {
1701
1792
  if (n.legend !== "inline" || !n.label && !n.description) continue;
1702
- let t = [n.label, n.description].filter(Boolean).join(" "), r = n.color ?? (n.seriesIndex == null ? "#999" : k.value[n.seriesIndex]?.color ?? "currentColor");
1793
+ let t = [n.label, n.description].filter(Boolean).join(" "), r = n.color ?? (n.seriesIndex == null ? "#999" : O.value[n.seriesIndex]?.color ?? "currentColor");
1703
1794
  e.push({
1704
1795
  label: t,
1705
1796
  color: r,
@@ -1708,47 +1799,47 @@ var Bt = ["role", "aria-label"], Vt = {
1708
1799
  });
1709
1800
  }
1710
1801
  return e;
1711
- }), L = n(() => fe.value.map((e) => e.label)), me = n(() => Pe.value + de.value.extraHeight), he = n(() => U.value.top + K.value + U.value.bottom + wn), z = n(() => {
1712
- let { min: e, max: t } = oe.value, n = (e) => f.yTickFormat === void 0 ? B(e) : ne(e, f.yTickFormat);
1802
+ }), me = n(() => pe.value.map((e) => e.label)), he = n(() => Pe.value + fe.value.extraHeight), I = n(() => U.value.top + K.value + U.value.bottom + An), _e = n(() => {
1803
+ let { min: e, max: t } = se.value, n = (e) => f.yTickFormat === void 0 ? z(e) : re(e, f.yTickFormat);
1713
1804
  return e === t ? [{
1714
1805
  value: n(e),
1715
- y: R(U.value.top + K.value / 2)
1716
- }] : (f.yScaleType === "log" ? ye({
1806
+ y: L(U.value.top + K.value / 2)
1807
+ }] : (f.yScaleType === "log" ? Se({
1717
1808
  min: e,
1718
1809
  max: t,
1719
1810
  ticks: f.yTicks
1720
- }) : ge({
1811
+ }) : ye({
1721
1812
  min: e,
1722
1813
  max: t,
1723
1814
  ticks: f.yTicks,
1724
1815
  targetTickCount: K.value / 50
1725
1816
  })).map((e) => ({
1726
1817
  value: n(e),
1727
- y: R(F(e))
1818
+ y: L(P(e))
1728
1819
  }));
1729
1820
  });
1730
- function be(e, t, n) {
1821
+ function ve(e, t, n) {
1731
1822
  let r = f.xTickFormat;
1732
- if (O.value) return typeof r == "function" ? r(e, t) : zt(e, r, E.value, n);
1733
- let i = e + ie.value;
1734
- return r === void 0 ? !j.value && f.xLabels && Number.isInteger(e) && e >= 0 && e < f.xLabels.length ? f.xLabels[e] : B(i) : typeof r == "function" ? r(i, t) : ne(i, r);
1823
+ if (D.value) return typeof r == "function" ? r(e, t) : qt(e, r, T.value, n);
1824
+ let i = e + M.value;
1825
+ return r === void 0 ? !A.value && f.xLabels && Number.isInteger(e) && e >= 0 && e < f.xLabels.length ? f.xLabels[e] : z(i) : typeof r == "function" ? r(i, t) : re(i, r);
1735
1826
  }
1736
- let Se = n(() => {
1737
- let { min: e, max: t } = ae.value;
1827
+ let R = n(() => {
1828
+ let { min: e, max: t } = oe.value;
1738
1829
  if (e === t) return [];
1739
- let n = O.value, r = n ? 0 : ie.value, i = re.value, a = G.value / 80, o, s;
1830
+ let n = D.value, r = n ? 0 : M.value, i = k.value, a = G.value / 80, o, s;
1740
1831
  if (n) {
1741
- let n = Nt(e, t, a, E.value);
1742
- s = n.unit, o = ge({
1832
+ let n = Vt(e, t, a, T.value);
1833
+ s = n.unit, o = ye({
1743
1834
  min: e,
1744
1835
  max: t,
1745
1836
  ticks: n.values
1746
1837
  });
1747
- } else if (f.xTicks == null && !j.value && f.xLabels && f.xLabels.length === i) {
1838
+ } else if (f.xTicks == null && !A.value && f.xLabels && f.xLabels.length === i) {
1748
1839
  let e = Math.max(3, Math.floor(a)), t = Math.max(1, Math.round((i - 1) / e));
1749
1840
  o = [];
1750
1841
  for (let e = 0; e < i; e += t) o.push(e);
1751
- } else o = ge({
1842
+ } else o = ye({
1752
1843
  min: e,
1753
1844
  max: t,
1754
1845
  ticks: f.xTicks,
@@ -1757,57 +1848,57 @@ var Bt = ["role", "aria-label"], Vt = {
1757
1848
  });
1758
1849
  let c = U.value.left, l = U.value.left + G.value;
1759
1850
  return o.map((e, t) => {
1760
- let n = R(P(e)), r = "middle";
1851
+ let n = L(N(e)), r = "middle";
1761
1852
  return n - c <= 1 ? r = "start" : l - n <= 1 && (r = "end"), {
1762
- value: be(e, t, s),
1853
+ value: ve(e, t, s),
1763
1854
  x: n,
1764
1855
  anchor: r
1765
1856
  };
1766
1857
  });
1767
1858
  });
1768
1859
  function Ce() {
1769
- return typeof f.csv == "function" ? f.csv() : typeof f.csv == "string" ? f.csv : He(k.value);
1860
+ return typeof f.csv == "function" ? f.csv() : typeof f.csv == "string" ? f.csv : J(O.value);
1770
1861
  }
1771
- let we = n(() => !!f.tooltipData || !!f.tooltipTrigger), Te = n(() => {
1772
- let e = Le.value, t = k.value[0];
1773
- return e === null || !t ? null : M(t, e);
1774
- }), Ee = n(() => Te.value === null ? 0 : P(Te.value));
1775
- function De(e, t) {
1862
+ let B = n(() => !!f.tooltipData || !!f.tooltipTrigger), Ee = n(() => {
1863
+ let e = Le.value, t = O.value[0];
1864
+ return e === null || !t ? null : j(t, e);
1865
+ }), De = n(() => Ee.value === null ? 0 : N(Ee.value));
1866
+ function Oe(e, t) {
1776
1867
  let n = e.data.length;
1777
1868
  if (n === 0) return null;
1778
1869
  let r = 0, i = Infinity;
1779
1870
  for (let a = 0; a < n; a++) {
1780
- let n = M(e, a);
1871
+ let n = j(e, a);
1781
1872
  if (!isFinite(n)) continue;
1782
1873
  let o = Math.abs(n - t);
1783
1874
  o < i && (i = o, r = a);
1784
1875
  }
1785
1876
  return i === Infinity ? null : r;
1786
1877
  }
1787
- let Oe = n(() => {
1788
- let e = Te.value;
1878
+ let ke = n(() => {
1879
+ let e = Ee.value;
1789
1880
  if (e === null) return [];
1790
1881
  let t = [];
1791
- for (let n of k.value) {
1882
+ for (let n of O.value) {
1792
1883
  if (n.showInTooltip === !1) continue;
1793
- let r = De(n, e);
1884
+ let r = Oe(n, e);
1794
1885
  if (r === null) continue;
1795
1886
  let i = n.data[r];
1796
1887
  isFinite(i) && t.push({
1797
- x: P(M(n, r)),
1798
- y: F(i),
1888
+ x: N(j(n, r)),
1889
+ y: P(i),
1799
1890
  color: n.color ?? "currentColor"
1800
1891
  });
1801
1892
  }
1802
1893
  return t;
1803
- }), ke = n(() => {
1804
- let e = Le.value, t = Te.value;
1894
+ }), V = n(() => {
1895
+ let e = Le.value, t = Ee.value;
1805
1896
  if (e === null || t === null) return null;
1806
- let n = be(t, e), r = k.value, i = [];
1897
+ let n = ve(t, e), r = O.value, i = [];
1807
1898
  for (let e = 0; e < r.length; e++) {
1808
1899
  let n = r[e];
1809
1900
  if (n.showInTooltip === !1) continue;
1810
- let a = De(n, t);
1901
+ let a = Oe(n, t);
1811
1902
  i.push({
1812
1903
  value: a === null ? NaN : Number(n.data[a]),
1813
1904
  color: n.color ?? "currentColor",
@@ -1823,19 +1914,19 @@ var Bt = ["role", "aria-label"], Vt = {
1823
1914
  });
1824
1915
  function Ae(e, t) {
1825
1916
  return !isFinite(e) || !isFinite(t) ? null : {
1826
- x: P(e - ie.value),
1827
- y: F(t)
1917
+ x: N(e - M.value),
1918
+ y: P(t)
1828
1919
  };
1829
1920
  }
1830
1921
  function je(e) {
1831
1922
  let t = Me.value?.getBoundingClientRect();
1832
1923
  if (!t) return null;
1833
- let n = k.value[0];
1924
+ let n = O.value[0];
1834
1925
  if (!n || n.data.length === 0) return null;
1835
- let { min: r, max: i } = ae.value, a = i - r || 1;
1836
- return De(n, r + (e - t.left - U.value.left) / G.value * a);
1926
+ let { min: r, max: i } = oe.value, a = i - r || 1;
1927
+ return Oe(n, r + (e - t.left - U.value.left) / G.value * a);
1837
1928
  }
1838
- let { containerRef: Me, svgRef: H, width: Ne, height: Pe, padding: U, legendY: W, inlineLegendLayout: Fe, innerW: G, innerH: K, bounds: Ie, hoverIndex: Le, tooltipRef: Re, tooltipPos: ze, tooltipHandlers: Be, menuItems: Ve, downloadLinkText: Ue, csvHref: We, downloadButtonText: Ge, triggerCsvDownload: Ke, menuFilename: qe, isFullscreen: Je, fullscreenStyle: Ye, teleportTarget: q, exitFullscreen: Xe } = lt({
1929
+ let { containerRef: Me, svgRef: H, width: Ne, height: Pe, padding: U, legendY: W, inlineLegendLayout: Fe, innerW: G, innerH: K, bounds: Ie, hoverIndex: Le, tooltipRef: Re, tooltipPos: ze, tooltipHandlers: Be, menuItems: Ve, downloadLinkText: He, csvHref: Ue, downloadButtonText: q, triggerCsvDownload: We, menuFilename: Ge, isFullscreen: Ke, fullscreenStyle: qe, teleportTarget: Je, exitFullscreen: Ye } = _t({
1839
1930
  width: () => f.width,
1840
1931
  height: () => f.height,
1841
1932
  title: () => f.title,
@@ -1851,16 +1942,16 @@ var Bt = ["role", "aria-label"], Vt = {
1851
1942
  downloadButton: () => f.downloadButton,
1852
1943
  fullscreenTarget: () => f.fullscreenTarget,
1853
1944
  chartPadding: () => f.chartPadding,
1854
- inlineLegendLabels: () => L.value,
1855
- hasTooltipSlot: () => we.value,
1945
+ inlineLegendLabels: () => me.value,
1946
+ hasTooltipSlot: () => B.value,
1856
1947
  getCsv: Ce,
1857
1948
  pointerToIndex: je,
1858
- onHover: (e) => v("hover", e),
1859
- extraBelowHeight: () => de.value.extraHeight
1860
- }), J = n(() => V(f.axisLabelStyle, { fontSize: 13 })), Y = n(() => V(f.tickLabelStyle, {
1949
+ onHover: (e) => ee("hover", e),
1950
+ extraBelowHeight: () => fe.value.extraHeight
1951
+ }), Xe = n(() => Te(f.axisLabelStyle, { fontSize: 13 })), Y = n(() => Te(f.tickLabelStyle, {
1861
1952
  fontSize: 10,
1862
- fillOpacity: xe
1863
- })), Ze = n(() => V(f.legendStyle, { fontSize: 11 })), X = n(() => {
1953
+ fillOpacity: we
1954
+ })), Ze = n(() => Te(f.legendStyle, { fontSize: 11 })), X = n(() => {
1864
1955
  let e = f.titleStyle, t = e?.align ?? "left", n = Ie.value, r = t === "left" ? n.left : t === "right" ? n.right : n.left + n.width / 2, i = t === "left" ? "start" : t === "right" ? "end" : "middle";
1865
1956
  return {
1866
1957
  lines: (f.title ?? "").split("\n"),
@@ -1871,9 +1962,9 @@ var Bt = ["role", "aria-label"], Vt = {
1871
1962
  x: r,
1872
1963
  anchor: i
1873
1964
  };
1874
- }), Z = n(() => {
1965
+ }), Qe = n(() => {
1875
1966
  let e = Fe.value.positions, t = U.value.left, n = W.value;
1876
- return fe.value.map((r, i) => {
1967
+ return pe.value.map((r, i) => {
1877
1968
  let a = e[i];
1878
1969
  return {
1879
1970
  ...r,
@@ -1883,33 +1974,33 @@ var Bt = ["role", "aria-label"], Vt = {
1883
1974
  });
1884
1975
  });
1885
1976
  return (n, l) => (_(), r(t, {
1886
- to: C(q),
1887
- disabled: !C(Je)
1977
+ to: S(Je),
1978
+ disabled: !S(Ke)
1888
1979
  }, [o("div", d({
1889
1980
  ref_key: "containerRef",
1890
1981
  ref: Me
1891
1982
  }, n.$attrs, {
1892
- class: ["line-chart-wrapper", { "is-fullscreen": C(Je) }],
1893
- style: C(Ye),
1894
- role: g.value || void 0,
1895
- "aria-label": h.value || void 0
1983
+ class: ["line-chart-wrapper", { "is-fullscreen": S(Ke) }],
1984
+ style: S(qe)
1896
1985
  }), [
1897
- c.menu ? (_(), r(pe, {
1986
+ c.menu ? (_(), r(ge, {
1898
1987
  key: 0,
1899
- items: C(Ve),
1900
- "is-fullscreen": C(Je),
1901
- onClose: C(Xe)
1988
+ items: S(Ve),
1989
+ "is-fullscreen": S(Ke),
1990
+ onClose: S(Ye)
1902
1991
  }, null, 8, [
1903
1992
  "items",
1904
1993
  "is-fullscreen",
1905
1994
  "onClose"
1906
1995
  ])) : i("", !0),
1907
- o("div", Vt, x(C(Je) ? "Chart expanded to fill window" : ""), 1),
1996
+ o("div", Jt, b(S(Ke) ? "Chart expanded to fill window" : ""), 1),
1908
1997
  (_(), a("svg", {
1909
1998
  ref_key: "svgRef",
1910
1999
  ref: H,
1911
- width: C(Ne),
1912
- height: me.value
2000
+ width: S(Ne),
2001
+ height: he.value,
2002
+ role: g.value || void 0,
2003
+ "aria-label": p.value || void 0
1913
2004
  }, [
1914
2005
  c.title ? (_(), a("text", {
1915
2006
  key: 0,
@@ -1923,8 +2014,8 @@ var Bt = ["role", "aria-label"], Vt = {
1923
2014
  key: t,
1924
2015
  x: X.value.x,
1925
2016
  dy: t === 0 ? 0 : X.value.lineHeight
1926
- }, x(e), 9, Wt))), 128))], 8, Ut)) : i("", !0),
1927
- Z.value.length > 0 ? (_(), a("g", Gt, [(_(!0), a(e, null, y(Z.value, (t, n) => (_(), a(e, { key: "ileg" + n }, [t.type === "series" ? (_(), a("line", {
2017
+ }, b(e), 9, Zt))), 128))], 8, Xt)) : i("", !0),
2018
+ Qe.value.length > 0 ? (_(), a("g", Qt, [(_(!0), a(e, null, y(Qe.value, (t, n) => (_(), a(e, { key: "ileg" + n }, [t.type === "series" ? (_(), a("line", {
1928
2019
  key: 0,
1929
2020
  x1: t.x,
1930
2021
  y1: t.y,
@@ -1933,7 +2024,7 @@ var Bt = ["role", "aria-label"], Vt = {
1933
2024
  stroke: t.color,
1934
2025
  "stroke-width": "2",
1935
2026
  "stroke-dasharray": t.dashed ? "4 2" : void 0
1936
- }, null, 8, Kt)) : (_(), a("circle", {
2027
+ }, null, 8, $t)) : (_(), a("circle", {
1937
2028
  key: 1,
1938
2029
  cx: t.x + 4,
1939
2030
  cy: t.y,
@@ -1942,51 +2033,51 @@ var Bt = ["role", "aria-label"], Vt = {
1942
2033
  "fill-opacity": t.fillOpacity,
1943
2034
  stroke: t.color,
1944
2035
  "stroke-width": "1.5"
1945
- }, null, 8, qt)), o("text", {
2036
+ }, null, 8, en)), o("text", {
1946
2037
  x: t.x + 18,
1947
2038
  y: t.y + 4,
1948
2039
  "font-size": Ze.value.fontSize,
1949
2040
  fill: Ze.value.fill,
1950
2041
  "font-weight": Ze.value.fontWeight
1951
- }, x(t.label), 9, Jt)], 64))), 128))])) : i("", !0),
2042
+ }, b(t.label), 9, tn)], 64))), 128))])) : i("", !0),
1952
2043
  o("line", {
1953
- x1: C(R)(C(U).left),
1954
- y1: C(R)(C(U).top),
1955
- x2: C(R)(C(U).left),
1956
- y2: C(R)(C(U).top + C(K)),
2044
+ x1: S(L)(S(U).left),
2045
+ y1: S(L)(S(U).top),
2046
+ x2: S(L)(S(U).left),
2047
+ y2: S(L)(S(U).top + S(K)),
1957
2048
  stroke: "currentColor",
1958
2049
  "stroke-opacity": "0.3"
1959
- }, null, 8, Yt),
2050
+ }, null, 8, nn),
1960
2051
  o("line", {
1961
- x1: C(R)(C(U).left),
1962
- y1: C(R)(C(U).top + C(K)),
1963
- x2: C(R)(C(U).left + C(G)),
1964
- y2: C(R)(C(U).top + C(K)),
2052
+ x1: S(L)(S(U).left),
2053
+ y1: S(L)(S(U).top + S(K)),
2054
+ x2: S(L)(S(U).left + S(G)),
2055
+ y2: S(L)(S(U).top + S(K)),
1965
2056
  stroke: "currentColor",
1966
2057
  "stroke-opacity": "0.3"
1967
- }, null, 8, Xt),
1968
- c.yGrid ? (_(!0), a(e, { key: 2 }, y(z.value, (e, t) => (_(), a("line", {
2058
+ }, null, 8, rn),
2059
+ c.yGrid ? (_(!0), a(e, { key: 2 }, y(_e.value, (e, t) => (_(), a("line", {
1969
2060
  key: "yg" + t,
1970
- x1: C(U).left,
2061
+ x1: S(U).left,
1971
2062
  y1: e.y,
1972
- x2: C(U).left + C(G),
2063
+ x2: S(U).left + S(G),
1973
2064
  y2: e.y,
1974
2065
  stroke: "currentColor",
1975
2066
  "stroke-opacity": "0.1"
1976
- }, null, 8, Zt))), 128)) : i("", !0),
1977
- c.xGrid ? (_(!0), a(e, { key: 3 }, y(Se.value, (e, t) => (_(), a("line", {
2067
+ }, null, 8, an))), 128)) : i("", !0),
2068
+ c.xGrid ? (_(!0), a(e, { key: 3 }, y(R.value, (e, t) => (_(), a("line", {
1978
2069
  key: "xg" + t,
1979
2070
  x1: e.x,
1980
- y1: C(U).top,
2071
+ y1: S(U).top,
1981
2072
  x2: e.x,
1982
- y2: C(U).top + C(K),
2073
+ y2: S(U).top + S(K),
1983
2074
  stroke: "currentColor",
1984
2075
  "stroke-opacity": "0.1"
1985
- }, null, 8, Qt))), 128)) : i("", !0),
1986
- (_(!0), a(e, null, y(z.value, (e, t) => (_(), a("text", {
2076
+ }, null, 8, on))), 128)) : i("", !0),
2077
+ (_(!0), a(e, null, y(_e.value, (e, t) => (_(), a("text", {
1987
2078
  key: "y" + t,
1988
2079
  "data-testid": "y-tick",
1989
- x: C(U).left - 6,
2080
+ x: S(U).left - 6,
1990
2081
  y: e.y,
1991
2082
  "text-anchor": "end",
1992
2083
  "dominant-baseline": "middle",
@@ -1994,67 +2085,67 @@ var Bt = ["role", "aria-label"], Vt = {
1994
2085
  fill: Y.value.fill,
1995
2086
  "font-weight": Y.value.fontWeight,
1996
2087
  "fill-opacity": Y.value.fillOpacity
1997
- }, x(e.value), 9, $t))), 128)),
2088
+ }, b(e.value), 9, sn))), 128)),
1998
2089
  c.yLabel ? (_(), a("text", {
1999
2090
  key: 4,
2000
2091
  x: 0,
2001
2092
  y: 0,
2002
- transform: `translate(14, ${C(U).top + C(K) / 2}) rotate(-90)`,
2093
+ transform: `translate(14, ${S(U).top + S(K) / 2}) rotate(-90)`,
2003
2094
  "text-anchor": "middle",
2004
- "font-size": J.value.fontSize,
2005
- fill: J.value.fill,
2006
- "font-weight": J.value.fontWeight
2007
- }, x(c.yLabel), 9, en)) : i("", !0),
2008
- (_(!0), a(e, null, y(Se.value, (e, t) => (_(), a("text", {
2095
+ "font-size": Xe.value.fontSize,
2096
+ fill: Xe.value.fill,
2097
+ "font-weight": Xe.value.fontWeight
2098
+ }, b(c.yLabel), 9, cn)) : i("", !0),
2099
+ (_(!0), a(e, null, y(R.value, (e, t) => (_(), a("text", {
2009
2100
  key: "x" + t,
2010
2101
  "data-testid": "x-tick",
2011
2102
  x: e.x,
2012
- y: C(U).top + C(K) + 16,
2103
+ y: S(U).top + S(K) + 16,
2013
2104
  "text-anchor": e.anchor,
2014
2105
  "font-size": Y.value.fontSize,
2015
2106
  fill: Y.value.fill,
2016
2107
  "font-weight": Y.value.fontWeight,
2017
2108
  "fill-opacity": Y.value.fillOpacity
2018
- }, x(e.value), 9, tn))), 128)),
2109
+ }, b(e.value), 9, ln))), 128)),
2019
2110
  c.xLabel ? (_(), a("text", {
2020
2111
  key: 5,
2021
- x: C(U).left + C(G) / 2,
2022
- y: C(Pe) - 4,
2112
+ x: S(U).left + S(G) / 2,
2113
+ y: S(Pe) - 4,
2023
2114
  "text-anchor": "middle",
2024
- "font-size": J.value.fontSize,
2025
- fill: J.value.fill,
2026
- "font-weight": J.value.fontWeight
2027
- }, x(c.xLabel), 9, nn)) : i("", !0),
2028
- (_(!0), a(e, null, y(A.value, (e, t) => (_(), a("path", {
2115
+ "font-size": Xe.value.fontSize,
2116
+ fill: Xe.value.fill,
2117
+ "font-weight": Xe.value.fontWeight
2118
+ }, b(c.xLabel), 9, un)) : i("", !0),
2119
+ (_(!0), a(e, null, y(ie.value, (e, t) => (_(), a("path", {
2029
2120
  key: "area" + t,
2030
- d: le(e),
2121
+ d: ue(e),
2031
2122
  fill: e.color ?? "currentColor",
2032
2123
  "fill-opacity": e.opacity ?? .2,
2033
2124
  stroke: "none",
2034
- style: m(e.blendMode ? { mixBlendMode: e.blendMode } : void 0)
2035
- }, null, 12, rn))), 128)),
2036
- (_(!0), a(e, null, y(k.value, (t, n) => (_(), a(e, { key: n }, [
2125
+ style: h(e.blendMode ? { mixBlendMode: e.blendMode } : void 0)
2126
+ }, null, 12, dn))), 128)),
2127
+ (_(!0), a(e, null, y(O.value, (t, n) => (_(), a(e, { key: n }, [
2037
2128
  t.line !== !1 && t.outline ? (_(), a("path", {
2038
2129
  key: 0,
2039
- d: se(t),
2130
+ d: ce(t),
2040
2131
  fill: "none",
2041
2132
  stroke: t.outlineColor ?? "var(--color-bg-0, #fff)",
2042
2133
  "stroke-width": (t.strokeWidth ?? 1.5) + (t.outlineWidth ?? 4),
2043
2134
  "stroke-linecap": "round",
2044
2135
  "stroke-linejoin": "round",
2045
2136
  "data-testid": "line-outline"
2046
- }, null, 8, an)) : i("", !0),
2137
+ }, null, 8, fn)) : i("", !0),
2047
2138
  t.line === !1 ? i("", !0) : (_(), a("path", {
2048
2139
  key: 1,
2049
- d: se(t),
2140
+ d: ce(t),
2050
2141
  fill: "none",
2051
2142
  stroke: t.color ?? "currentColor",
2052
2143
  "stroke-width": t.strokeWidth ?? 1.5,
2053
2144
  "stroke-opacity": t.lineOpacity ?? t.opacity ?? c.lineOpacity,
2054
2145
  "stroke-dasharray": t.dashed ? "6 3" : void 0,
2055
- style: m(t.blendMode ? { mixBlendMode: t.blendMode } : void 0)
2056
- }, null, 12, on)),
2057
- t.dots ? (_(!0), a(e, { key: 2 }, y(ce(t), (e, n) => (_(), a("circle", {
2146
+ style: h(t.blendMode ? { mixBlendMode: t.blendMode } : void 0)
2147
+ }, null, 12, pn)),
2148
+ t.dots ? (_(!0), a(e, { key: 2 }, y(le(t), (e, n) => (_(), a("circle", {
2058
2149
  key: n,
2059
2150
  cx: e.x,
2060
2151
  cy: e.y,
@@ -2062,70 +2153,70 @@ var Bt = ["role", "aria-label"], Vt = {
2062
2153
  fill: t.dotFill ?? t.color ?? "currentColor",
2063
2154
  "fill-opacity": t.dotOpacity ?? t.opacity ?? c.lineOpacity,
2064
2155
  stroke: t.dotStroke ?? "none",
2065
- style: m(t.blendMode ? { mixBlendMode: t.blendMode } : void 0)
2066
- }, null, 12, sn))), 128)) : i("", !0)
2156
+ style: h(t.blendMode ? { mixBlendMode: t.blendMode } : void 0)
2157
+ }, null, 12, mn))), 128)) : i("", !0)
2067
2158
  ], 64))), 128)),
2068
2159
  (_(!0), a(e, null, y(c.areaSections ?? [], (t, n) => (_(), a(e, { key: "areasec" + n }, [
2069
2160
  o("path", {
2070
- d: ue(t),
2071
- fill: t.color ?? (t.seriesIndex == null ? "#999" : k.value[t.seriesIndex]?.color ?? "currentColor"),
2161
+ d: de(t),
2162
+ fill: t.color ?? (t.seriesIndex == null ? "#999" : O.value[t.seriesIndex]?.color ?? "currentColor"),
2072
2163
  "fill-opacity": t.opacity ?? .15,
2073
2164
  stroke: "none"
2074
- }, null, 8, cn),
2165
+ }, null, 8, $),
2075
2166
  t.seriesIndex == null ? i("", !0) : (_(), a("path", {
2076
2167
  key: 0,
2077
- d: ue(t, !1),
2168
+ d: de(t, !1),
2078
2169
  fill: "none",
2079
- stroke: t.color ?? k.value[t.seriesIndex]?.color ?? "currentColor",
2170
+ stroke: t.color ?? O.value[t.seriesIndex]?.color ?? "currentColor",
2080
2171
  "stroke-width": t.strokeWidth ?? 2,
2081
2172
  "stroke-dasharray": t.dashed ? "6 3" : void 0
2082
- }, null, 8, ln)),
2173
+ }, null, 8, hn)),
2083
2174
  t.seriesIndex == null ? (_(), a(e, { key: 1 }, [o("line", {
2084
- x1: C(R)(I(t, "start")),
2085
- y1: C(U).top,
2086
- x2: C(R)(I(t, "start")),
2087
- y2: C(U).top + C(K),
2175
+ x1: S(L)(F(t, "start")),
2176
+ y1: S(U).top,
2177
+ x2: S(L)(F(t, "start")),
2178
+ y2: S(U).top + S(K),
2088
2179
  stroke: t.color ?? "#999",
2089
2180
  "stroke-width": t.strokeWidth ?? 2,
2090
2181
  "stroke-dasharray": t.dashed ? "6 3" : void 0
2091
- }, null, 8, un), o("line", {
2092
- x1: C(R)(I(t, "end")),
2093
- y1: C(U).top,
2094
- x2: C(R)(I(t, "end")),
2095
- y2: C(U).top + C(K),
2182
+ }, null, 8, gn), o("line", {
2183
+ x1: S(L)(F(t, "end")),
2184
+ y1: S(U).top,
2185
+ x2: S(L)(F(t, "end")),
2186
+ y2: S(U).top + S(K),
2096
2187
  stroke: t.color ?? "#999",
2097
2188
  "stroke-width": t.strokeWidth ?? 2,
2098
2189
  "stroke-dasharray": t.dashed ? "6 3" : void 0
2099
- }, null, 8, dn)], 64)) : i("", !0),
2190
+ }, null, 8, _n)], 64)) : i("", !0),
2100
2191
  o("line", {
2101
- x1: C(R)(I(t, "start")),
2102
- y1: C(U).top + C(K) - 4,
2103
- x2: C(R)(I(t, "start")),
2104
- y2: C(U).top + C(K) + 4,
2192
+ x1: S(L)(F(t, "start")),
2193
+ y1: S(U).top + S(K) - 4,
2194
+ x2: S(L)(F(t, "start")),
2195
+ y2: S(U).top + S(K) + 4,
2105
2196
  stroke: "currentColor",
2106
2197
  "stroke-opacity": "0.4"
2107
- }, null, 8, fn),
2198
+ }, null, 8, vn),
2108
2199
  o("line", {
2109
- x1: C(R)(I(t, "end")),
2110
- y1: C(U).top + C(K) - 4,
2111
- x2: C(R)(I(t, "end")),
2112
- y2: C(U).top + C(K) + 4,
2200
+ x1: S(L)(F(t, "end")),
2201
+ y1: S(U).top + S(K) - 4,
2202
+ x2: S(L)(F(t, "end")),
2203
+ y2: S(U).top + S(K) + 4,
2113
2204
  stroke: "currentColor",
2114
2205
  "stroke-opacity": "0.4"
2115
- }, null, 8, pn)
2206
+ }, null, 8, yn)
2116
2207
  ], 64))), 128)),
2117
- we.value && C(Le) !== null ? (_(), a("line", {
2208
+ B.value && S(Le) !== null ? (_(), a("line", {
2118
2209
  key: 6,
2119
- x1: C(R)(Ee.value),
2120
- y1: C(U).top,
2121
- x2: C(R)(Ee.value),
2122
- y2: C(U).top + C(K),
2210
+ x1: S(L)(De.value),
2211
+ y1: S(U).top,
2212
+ x2: S(L)(De.value),
2213
+ y2: S(U).top + S(K),
2123
2214
  stroke: "currentColor",
2124
2215
  "stroke-opacity": "0.3",
2125
2216
  "stroke-dasharray": "4 2",
2126
2217
  "pointer-events": "none"
2127
- }, null, 8, mn)) : i("", !0),
2128
- (_(!0), a(e, null, y(Oe.value, (e, t) => (_(), a("circle", {
2218
+ }, null, 8, bn)) : i("", !0),
2219
+ (_(!0), a(e, null, y(ke.value, (e, t) => (_(), a("circle", {
2129
2220
  key: "hd" + t,
2130
2221
  cx: e.x,
2131
2222
  cy: e.y,
@@ -2134,162 +2225,167 @@ var Bt = ["role", "aria-label"], Vt = {
2134
2225
  stroke: "var(--color-bg-0, #fff)",
2135
2226
  "stroke-width": "2",
2136
2227
  "pointer-events": "none"
2137
- }, null, 8, hn))), 128)),
2138
- we.value ? (_(), a("rect", d({
2228
+ }, null, 8, xn))), 128)),
2229
+ B.value ? (_(), a("rect", d({
2139
2230
  key: 7,
2140
- x: C(U).left,
2141
- y: C(U).top,
2142
- width: C(G),
2143
- height: C(K),
2231
+ x: S(U).left,
2232
+ y: S(U).top,
2233
+ width: S(G),
2234
+ height: S(K),
2144
2235
  fill: "transparent",
2145
2236
  style: {
2146
2237
  cursor: "crosshair",
2147
2238
  "touch-action": "pan-y"
2148
2239
  }
2149
- }, ee(C(Be), !0)), null, 16, gn)) : i("", !0),
2150
- c.annotations && c.annotations.length > 0 ? (_(), r(C(ot), {
2240
+ }, ne(S(Be), !0)), null, 16, Sn)) : i("", !0),
2241
+ c.annotations && c.annotations.length > 0 ? (_(), r(S(mt), {
2151
2242
  key: 8,
2152
2243
  annotations: c.annotations,
2153
2244
  project: Ae,
2154
- bounds: C(Ie)
2245
+ bounds: S(Ie)
2155
2246
  }, null, 8, ["annotations", "bounds"])) : i("", !0),
2156
- (_(!0), a(e, null, y(de.value.labels, (e, t) => (_(), a("g", { key: "seclab" + t }, [
2247
+ (_(!0), a(e, null, y(fe.value.labels, (e, t) => (_(), a("g", { key: "seclab" + t }, [
2157
2248
  o("circle", {
2158
2249
  cx: e.cx - e.textWidth / 2 - 2,
2159
- cy: he.value + e.row * Cn + 4,
2250
+ cy: I.value + e.row * kn + 4,
2160
2251
  r: "4",
2161
2252
  fill: e.color,
2162
2253
  "fill-opacity": e.fillOpacity,
2163
2254
  stroke: e.color,
2164
2255
  "stroke-width": "1.5"
2165
- }, null, 8, _n),
2256
+ }, null, 8, Cn),
2166
2257
  e.labelText ? (_(), a("text", {
2167
2258
  key: 0,
2168
2259
  x: e.cx - e.textWidth / 2 + 8,
2169
- y: he.value + e.row * Cn + 8,
2260
+ y: I.value + e.row * kn + 8,
2170
2261
  "font-size": e.labelStyle.fontSize,
2171
2262
  "font-weight": e.labelStyle.fontWeight,
2172
2263
  fill: e.labelStyle.fill
2173
- }, x(e.labelText), 9, vn)) : i("", !0),
2264
+ }, b(e.labelText), 9, wn)) : i("", !0),
2174
2265
  e.descText ? (_(), a("text", {
2175
2266
  key: 1,
2176
2267
  x: e.cx - e.textWidth / 2 + 8,
2177
- y: he.value + e.row * Cn + 22,
2268
+ y: I.value + e.row * kn + 22,
2178
2269
  "font-size": e.descStyle.fontSize,
2179
2270
  "font-weight": e.descStyle.fontWeight,
2180
2271
  fill: e.descStyle.fill,
2181
2272
  "fill-opacity": e.descStyle.fillOpacity
2182
- }, x(e.descText), 9, yn)) : i("", !0)
2273
+ }, b(e.descText), 9, Tn)) : i("", !0)
2183
2274
  ]))), 128))
2184
- ], 8, Ht)),
2185
- we.value && C(Le) !== null && ke.value ? (_(), a("div", {
2275
+ ], 8, Yt)),
2276
+ B.value && S(Le) !== null && V.value ? (_(), a("div", {
2186
2277
  key: 1,
2187
2278
  ref_key: "tooltipRef",
2188
2279
  ref: Re,
2189
2280
  class: "chart-tooltip-content",
2190
- style: m({
2281
+ style: h({
2191
2282
  position: "absolute",
2192
2283
  top: "0",
2193
2284
  left: "0",
2194
2285
  willChange: "transform",
2195
- transform: C(ze) ? `translate3d(${C(ze).left}px, ${C(ze).top}px, 0) translateY(-50%)` : "translateY(-50%)",
2196
- visibility: C(ze) ? "visible" : "hidden"
2286
+ transform: S(ze) ? `translate3d(${S(ze).left}px, ${S(ze).top}px, 0) translateY(-50%)` : "translateY(-50%)",
2287
+ visibility: S(ze) ? "visible" : "hidden"
2197
2288
  })
2198
- }, [b(n.$slots, "tooltip", p(u(ke.value)), () => [o("div", bn, [ke.value.xLabel ? (_(), a("div", xn, x(ke.value.xLabel), 1)) : i("", !0), (_(!0), a(e, null, y(ke.value.values, (e) => (_(), a("div", {
2289
+ }, [te(n.$slots, "tooltip", m(u(V.value)), () => [o("div", En, [V.value.xLabel ? (_(), a("div", Dn, b(V.value.xLabel), 1)) : i("", !0), (_(!0), a(e, null, y(V.value.values, (e) => (_(), a("div", {
2199
2290
  key: e.seriesIndex,
2200
2291
  class: "line-chart-tooltip-row"
2201
2292
  }, [o("span", {
2202
2293
  class: "line-chart-tooltip-swatch",
2203
- style: m({ background: e.color })
2204
- }, null, 4), s(" " + x(isFinite(e.value) ? C(T)(e.value) : "—"), 1)]))), 128))])], !0)], 4)) : i("", !0),
2205
- C(Ue) ? (_(), a("a", {
2294
+ style: h({ background: e.color })
2295
+ }, null, 4), s(" " + b(isFinite(e.value) ? S(w)(e.value) : "—"), 1)]))), 128))])], !0)], 4)) : i("", !0),
2296
+ S(He) ? (_(), a("a", {
2206
2297
  key: 2,
2207
2298
  class: "line-chart-download-link",
2208
- href: C(We),
2209
- download: `${C(qe)()}.csv`
2210
- }, x(C(Ue)), 9, Sn)) : i("", !0),
2211
- C(Ge) ? (_(), a("button", {
2299
+ href: S(Ue),
2300
+ download: `${S(Ge)()}.csv`
2301
+ }, b(S(He)), 9, On)) : i("", !0),
2302
+ S(q) ? (_(), a("button", {
2212
2303
  key: 3,
2213
2304
  type: "button",
2214
2305
  class: "line-chart-download-button",
2215
- onClick: l[0] ||= (...e) => C(Ke) && C(Ke)(...e)
2216
- }, x(C(Ge)), 1)) : i("", !0)
2217
- ], 16, Bt)], 8, ["to", "disabled"]));
2306
+ onClick: l[0] ||= (...e) => S(We) && S(We)(...e)
2307
+ }, b(S(q)), 1)) : i("", !0)
2308
+ ], 16)], 8, ["to", "disabled"]));
2218
2309
  }
2219
- }), [["__scopeId", "data-v-0cf7b0c7"]]), On = ["role", "aria-label"], kn = {
2310
+ }), [["__scopeId", "data-v-a3132bed"]]), Pn = {
2220
2311
  class: "chart-sr-only",
2221
2312
  "aria-live": "polite"
2222
- }, An = ["width", "height"], jn = [
2313
+ }, Fn = [
2314
+ "width",
2315
+ "height",
2316
+ "role",
2317
+ "aria-label"
2318
+ ], In = [
2223
2319
  "x",
2224
2320
  "y",
2225
2321
  "text-anchor",
2226
2322
  "font-size",
2227
2323
  "font-weight",
2228
2324
  "fill"
2229
- ], Mn = ["x", "dy"], Nn = [
2325
+ ], Ln = ["x", "dy"], Rn = [
2230
2326
  "data-testid",
2231
2327
  "x",
2232
2328
  "y",
2233
2329
  "text-anchor",
2234
2330
  "font-size",
2235
2331
  "fill"
2236
- ], Pn = { key: 1 }, Fn = [
2332
+ ], zn = { key: 1 }, Bn = [
2237
2333
  "x",
2238
2334
  "y",
2239
2335
  "fill"
2240
- ], In = [
2336
+ ], Vn = [
2241
2337
  "x1",
2242
2338
  "y1",
2243
2339
  "x2",
2244
2340
  "y2",
2245
2341
  "stroke",
2246
2342
  "stroke-dasharray"
2247
- ], Ln = [
2343
+ ], Hn = [
2248
2344
  "x",
2249
2345
  "y",
2250
2346
  "font-size",
2251
2347
  "fill",
2252
2348
  "font-weight"
2253
- ], Rn = [
2349
+ ], Un = [
2254
2350
  "x1",
2255
2351
  "y1",
2256
2352
  "x2",
2257
2353
  "y2"
2258
- ], zn = [
2354
+ ], Wn = [
2259
2355
  "x1",
2260
2356
  "y1",
2261
2357
  "x2",
2262
2358
  "y2"
2263
- ], Bn = [
2359
+ ], Gn = [
2264
2360
  "x1",
2265
2361
  "y1",
2266
2362
  "x2",
2267
2363
  "y2"
2268
- ], Vn = [
2364
+ ], Kn = [
2269
2365
  "x",
2270
2366
  "y",
2271
2367
  "width",
2272
2368
  "height"
2273
- ], Hn = [
2369
+ ], qn = [
2274
2370
  "x",
2275
2371
  "y",
2276
2372
  "font-size",
2277
2373
  "fill",
2278
2374
  "font-weight",
2279
2375
  "fill-opacity"
2280
- ], Un = [
2376
+ ], Jn = [
2281
2377
  "x",
2282
2378
  "y",
2283
2379
  "font-size",
2284
2380
  "fill",
2285
2381
  "font-weight",
2286
2382
  "fill-opacity"
2287
- ], Wn = [
2383
+ ], Yn = [
2288
2384
  "transform",
2289
2385
  "font-size",
2290
2386
  "fill",
2291
2387
  "font-weight"
2292
- ], Gn = [
2388
+ ], Xn = [
2293
2389
  "x",
2294
2390
  "y",
2295
2391
  "text-anchor",
@@ -2297,7 +2393,7 @@ var Bt = ["role", "aria-label"], Vt = {
2297
2393
  "fill",
2298
2394
  "font-weight",
2299
2395
  "fill-opacity"
2300
- ], Kn = [
2396
+ ], Zn = [
2301
2397
  "x",
2302
2398
  "y",
2303
2399
  "text-anchor",
@@ -2305,13 +2401,13 @@ var Bt = ["role", "aria-label"], Vt = {
2305
2401
  "fill",
2306
2402
  "font-weight",
2307
2403
  "fill-opacity"
2308
- ], qn = [
2404
+ ], Qn = [
2309
2405
  "x",
2310
2406
  "y",
2311
2407
  "font-size",
2312
2408
  "fill",
2313
2409
  "font-weight"
2314
- ], Jn = [
2410
+ ], $n = [
2315
2411
  "data-category",
2316
2412
  "data-series",
2317
2413
  "x",
@@ -2320,34 +2416,34 @@ var Bt = ["role", "aria-label"], Vt = {
2320
2416
  "height",
2321
2417
  "fill",
2322
2418
  "fill-opacity"
2323
- ], Yn = [
2419
+ ], er = [
2324
2420
  "x",
2325
2421
  "y",
2326
2422
  "text-anchor",
2327
2423
  "font-size",
2328
2424
  "font-weight",
2329
2425
  "fill"
2330
- ], Xn = [
2426
+ ], tr = [
2331
2427
  "d",
2332
2428
  "stroke",
2333
2429
  "stroke-width",
2334
2430
  "stroke-opacity",
2335
2431
  "stroke-dasharray"
2336
- ], Zn = [
2432
+ ], nr = [
2337
2433
  "cx",
2338
2434
  "cy",
2339
2435
  "r",
2340
2436
  "fill",
2341
2437
  "fill-opacity"
2342
- ], Qn = [
2438
+ ], rr = [
2343
2439
  "x",
2344
2440
  "y",
2345
2441
  "width",
2346
2442
  "height"
2347
- ], $n = { class: "bar-chart-tooltip" }, er = {
2443
+ ], ir = { class: "bar-chart-tooltip" }, ar = {
2348
2444
  key: 0,
2349
2445
  class: "bar-chart-tooltip-label"
2350
- }, tr = ["href", "download"], nr = 22, rr = 2, ir = 11, ar = .6, or = 4, sr = 4, cr = /* @__PURE__ */ L(/* @__PURE__ */ l({
2446
+ }, or = ["href", "download"], sr = 22, cr = 2, lr = 11, ur = .6, dr = 4, fr = 4, pr = /* @__PURE__ */ I(/* @__PURE__ */ l({
2351
2447
  inheritAttrs: !1,
2352
2448
  __name: "BarChart",
2353
2449
  props: {
@@ -2408,10 +2504,10 @@ var Bt = ["role", "aria-label"], Vt = {
2408
2504
  },
2409
2505
  emits: ["hover"],
2410
2506
  setup(c, { emit: l }) {
2411
- let f = c, h = n(() => f.ariaLabel ?? f.title), g = n(() => f.role ?? (h.value ? "figure" : void 0)), v = l, S = [];
2412
- function te(e) {
2507
+ let f = c, p = n(() => f.ariaLabel ?? f.title), g = n(() => f.role ?? (p.value ? "img" : void 0)), ee = l, v = [];
2508
+ function x(e) {
2413
2509
  return {
2414
- data: e.y ?? e.data ?? S,
2510
+ data: e.y ?? e.data ?? v,
2415
2511
  color: e.color,
2416
2512
  opacity: e.opacity,
2417
2513
  blendMode: e.blendMode,
@@ -2420,79 +2516,79 @@ var Bt = ["role", "aria-label"], Vt = {
2420
2516
  showInTooltip: e.showInTooltip
2421
2517
  };
2422
2518
  }
2423
- let w = n(() => {
2424
- if (f.series && f.series.length > 0) return f.series.map(te);
2519
+ let C = n(() => {
2520
+ if (f.series && f.series.length > 0) return f.series.map(x);
2425
2521
  let e = f.y ?? f.data;
2426
2522
  return e ? [{ data: e }] : [];
2427
- }), T = n(() => {
2523
+ }), w = n(() => {
2428
2524
  let e = f.categories?.length ?? 0;
2429
- for (let t of w.value) t.data.length > e && (e = t.data.length);
2525
+ for (let t of C.value) t.data.length > e && (e = t.data.length);
2430
2526
  return e;
2431
- }), E = n(() => {
2432
- let e = T.value, t = Array(e);
2527
+ }), T = n(() => {
2528
+ let e = w.value, t = Array(e);
2433
2529
  for (let n = 0; n < e; n++) {
2434
2530
  let e = f.categories?.[n];
2435
2531
  e instanceof Date ? t[n] = e.toISOString().slice(0, 10) : t[n] = e ?? String(n);
2436
2532
  }
2437
2533
  return t;
2438
- }), D = n(() => {
2534
+ }), E = n(() => {
2439
2535
  let e = f.categories;
2440
- if (!e || e.length === 0 || !kt(e, "utc")) return null;
2536
+ if (!e || e.length === 0 || !Lt(e, "utc")) return null;
2441
2537
  let t = Array(e.length);
2442
- for (let n = 0; n < e.length; n++) t[n] = Dt(e[n], "utc") ?? NaN;
2538
+ for (let n = 0; n < e.length; n++) t[n] = Ft(e[n], "utc") ?? NaN;
2443
2539
  return t;
2444
- }), O = n(() => f.orientation === "vertical"), k = n(() => {
2540
+ }), D = n(() => f.orientation === "vertical"), O = n(() => {
2445
2541
  let e = Infinity, t = -Infinity, n = Infinity, r = (e) => {
2446
2542
  e > 0 && e < n && (n = e);
2447
2543
  };
2448
2544
  if (f.layout === "stacked") {
2449
- let n = T.value;
2545
+ let n = w.value;
2450
2546
  for (let i = 0; i < n; i++) {
2451
2547
  let n = 0, a = 0;
2452
- for (let e of w.value) {
2548
+ for (let e of C.value) {
2453
2549
  if (i >= e.data.length) continue;
2454
2550
  let t = Number(e.data[i]);
2455
2551
  isFinite(t) && (r(t), t >= 0 ? n += t : a += t);
2456
2552
  }
2457
2553
  n > t && (t = n), a < e && (e = a);
2458
2554
  }
2459
- } else for (let n of w.value) for (let i of n.data) {
2555
+ } else for (let n of C.value) for (let i of n.data) {
2460
2556
  let n = Number(i);
2461
2557
  isFinite(n) && (r(n), n < e && (e = n), n > t && (t = n));
2462
2558
  }
2463
2559
  isFinite(e) || (e = 0), isFinite(t) || (t = 0);
2464
2560
  let i = f.valueMin ?? 0;
2465
2561
  f.valueScaleType === "log" ? i > 0 && i < e && (e = i) : i < e && (e = i);
2466
- let a = ve(e, t, f.valueScaleType, n);
2562
+ let a = xe(e, t, f.valueScaleType, n);
2467
2563
  return {
2468
2564
  min: a.min,
2469
2565
  max: a.max,
2470
2566
  range: a.max - a.min || 1
2471
2567
  };
2472
- }), A = n(() => O.value ? U.value : W.value), re = n(() => O.value ? W.value : U.value), j = n(() => {
2473
- let e = T.value;
2474
- return e > 0 ? A.value / e : 0;
2475
- }), M = n(() => j.value * (1 - f.barPadding)), N = n(() => {
2476
- let e = w.value.length;
2568
+ }), ie = n(() => D.value ? U.value : W.value), k = n(() => D.value ? W.value : U.value), A = n(() => {
2569
+ let e = w.value;
2570
+ return e > 0 ? ie.value / e : 0;
2571
+ }), j = n(() => A.value * (1 - f.barPadding)), ae = n(() => {
2572
+ let e = C.value.length;
2477
2573
  if (e === 0) return 0;
2478
- if (f.layout === "stacked" || e === 1) return M.value;
2574
+ if (f.layout === "stacked" || e === 1) return j.value;
2479
2575
  let t = f.groupGap * (e - 1);
2480
- return Math.max(1, (M.value - t) / e);
2576
+ return Math.max(1, (j.value - t) / e);
2481
2577
  });
2482
- function ie(e) {
2483
- return (O.value ? H.value.left : H.value.top) + e * j.value;
2578
+ function M(e) {
2579
+ return (D.value ? H.value.left : H.value.top) + e * A.value;
2484
2580
  }
2485
- let ae = n(() => {
2486
- let { min: e, max: t } = k.value, n = f.valueMin ?? 0;
2487
- return P(Math.max(e, Math.min(t, n)));
2581
+ let oe = n(() => {
2582
+ let { min: e, max: t } = O.value, n = f.valueMin ?? 0;
2583
+ return N(Math.max(e, Math.min(t, n)));
2488
2584
  });
2489
- function P(e) {
2490
- let { min: t, max: n } = k.value, r = _e(e, t, n, f.valueScaleType);
2491
- return O.value ? H.value.top + W.value - r * W.value : H.value.left + r * U.value;
2585
+ function N(e) {
2586
+ let { min: t, max: n } = O.value, r = be(e, t, n, f.valueScaleType);
2587
+ return D.value ? H.value.top + W.value - r * W.value : H.value.left + r * U.value;
2492
2588
  }
2493
- function oe(e, t, n, r, i, a, o, s, c, l) {
2589
+ function se(e, t, n, r, i, a, o, s, c, l) {
2494
2590
  let u = Math.min(e, t), d = Math.abs(e - t);
2495
- return O.value ? {
2591
+ return D.value ? {
2496
2592
  x: n,
2497
2593
  y: u,
2498
2594
  w: r,
@@ -2516,34 +2612,34 @@ var Bt = ["role", "aria-label"], Vt = {
2516
2612
  seriesIndex: l
2517
2613
  };
2518
2614
  }
2519
- let F = n(() => {
2520
- let e = [], t = w.value, n = t.length;
2615
+ let P = n(() => {
2616
+ let e = [], t = C.value, n = t.length;
2521
2617
  if (n === 0) return e;
2522
- let r = T.value, i = j.value, a = M.value, o = N.value, s = (i - a) / 2, c = ae.value;
2618
+ let r = w.value, i = A.value, a = j.value, o = ae.value, s = (i - a) / 2, c = oe.value;
2523
2619
  for (let i = 0; i < r; i++) {
2524
- let r = ie(i) + s;
2620
+ let r = M(i) + s;
2525
2621
  if (f.layout === "stacked") {
2526
2622
  let o = 0, s = 0;
2527
2623
  for (let c = 0; c < n; c++) {
2528
2624
  let n = t[c], l = Number(n.data[i] ?? NaN);
2529
2625
  if (!isFinite(l)) continue;
2530
2626
  let u = l >= 0 ? o : s, d = u + l;
2531
- e.push(oe(P(u), P(d), r, a, n.color ?? L(c), n.opacity ?? 1, n.blendMode, l, i, c)), l >= 0 ? o = d : s = d;
2627
+ e.push(se(N(u), N(d), r, a, n.color ?? me(c), n.opacity ?? 1, n.blendMode, l, i, c)), l >= 0 ? o = d : s = d;
2532
2628
  }
2533
2629
  } else if (f.layout === "overlay") for (let o = 0; o < n; o++) {
2534
2630
  let n = t[o], s = Number(n.data[i] ?? NaN);
2535
- isFinite(s) && e.push(oe(c, P(s), r, a, n.color ?? L(o), n.opacity ?? 1, n.blendMode, s, i, o));
2631
+ isFinite(s) && e.push(se(c, N(s), r, a, n.color ?? me(o), n.opacity ?? 1, n.blendMode, s, i, o));
2536
2632
  }
2537
2633
  else for (let a = 0; a < n; a++) {
2538
2634
  let s = t[a], l = Number(s.data[i] ?? NaN);
2539
2635
  if (!isFinite(l)) continue;
2540
2636
  let u = r + (n === 1 ? 0 : a * (o + f.groupGap));
2541
- e.push(oe(c, P(l), u, o, s.color ?? L(a), s.opacity ?? 1, s.blendMode, l, i, a));
2637
+ e.push(se(c, N(l), u, o, s.color ?? me(a), s.opacity ?? 1, s.blendMode, l, i, a));
2542
2638
  }
2543
2639
  }
2544
2640
  return e;
2545
2641
  });
2546
- function se(e) {
2642
+ function ce(e) {
2547
2643
  let t = Infinity, n = -Infinity;
2548
2644
  for (let r of e.data) {
2549
2645
  let e = Number(r);
@@ -2554,9 +2650,9 @@ var Bt = ["role", "aria-label"], Vt = {
2554
2650
  max: n
2555
2651
  };
2556
2652
  }
2557
- function ce(e, t, n) {
2558
- let r = (O.value ? H.value.left : H.value.top) + (e + .5) * j.value, i = n.max - n.min || 1, a = (t - n.min) / i;
2559
- return O.value ? {
2653
+ function le(e, t, n) {
2654
+ let r = (D.value ? H.value.left : H.value.top) + (e + .5) * A.value, i = n.max - n.min || 1, a = (t - n.min) / i;
2655
+ return D.value ? {
2560
2656
  x: r,
2561
2657
  y: H.value.top + W.value - a * W.value
2562
2658
  } : {
@@ -2564,23 +2660,23 @@ var Bt = ["role", "aria-label"], Vt = {
2564
2660
  y: r
2565
2661
  };
2566
2662
  }
2567
- let le = n(() => {
2663
+ let ue = n(() => {
2568
2664
  let e = f.summaryLines;
2569
2665
  return !e || e.length === 0 ? [] : e.map((e, t) => ({
2570
- data: e.data ?? S,
2666
+ data: e.data ?? v,
2571
2667
  x: e.x,
2572
- color: e.color ?? de(t),
2668
+ color: e.color ?? fe(t),
2573
2669
  strokeWidth: e.strokeWidth ?? 2,
2574
2670
  dashed: e.dashed ?? !1,
2575
2671
  opacity: e.opacity ?? 1,
2576
2672
  blendMode: e.blendMode,
2577
2673
  dots: e.dots ?? !1,
2578
2674
  dotRadius: e.dotRadius ?? (e.strokeWidth ?? 2) + 1,
2579
- extent: se(e),
2675
+ extent: ce(e),
2580
2676
  legend: e.legend,
2581
2677
  showInLegend: e.showInLegend !== !1
2582
2678
  }));
2583
- }), I = n(() => j.value === 0 ? [] : le.value.map((e) => {
2679
+ }), F = n(() => A.value === 0 ? [] : ue.value.map((e) => {
2584
2680
  let t = [], n = "", r = !1;
2585
2681
  for (let i = 0; i < e.data.length; i++) {
2586
2682
  let a = Number(e.data[i]), o = e.x ? Number(e.x[i]) : i;
@@ -2588,7 +2684,7 @@ var Bt = ["role", "aria-label"], Vt = {
2588
2684
  r = !1;
2589
2685
  continue;
2590
2686
  }
2591
- let s = ce(o, a, e.extent);
2687
+ let s = le(o, a, e.extent);
2592
2688
  t.push(s), n += r ? `L${s.x},${s.y}` : `M${s.x},${s.y}`, r = !0;
2593
2689
  }
2594
2690
  return {
@@ -2596,16 +2692,16 @@ var Bt = ["role", "aria-label"], Vt = {
2596
2692
  pathD: n,
2597
2693
  points: t
2598
2694
  };
2599
- })), ue = [
2695
+ })), de = [
2600
2696
  "var(--color-fg-1, #111)",
2601
2697
  "var(--color-danger, #ef4444)",
2602
2698
  "var(--color-success, #10b981)",
2603
2699
  "var(--color-info, #6366f1)"
2604
2700
  ];
2605
- function de(e) {
2606
- return ue[e % ue.length];
2701
+ function fe(e) {
2702
+ return de[e % de.length];
2607
2703
  }
2608
- let fe = [
2704
+ let pe = [
2609
2705
  "var(--color-primary, #3b82f6)",
2610
2706
  "var(--color-accent, #f59e0b)",
2611
2707
  "var(--color-success, #10b981)",
@@ -2613,36 +2709,36 @@ var Bt = ["role", "aria-label"], Vt = {
2613
2709
  "var(--color-info, #6366f1)",
2614
2710
  "var(--color-warning, #d97706)"
2615
2711
  ];
2616
- function L(e) {
2617
- return fe[e % fe.length];
2712
+ function me(e) {
2713
+ return pe[e % pe.length];
2618
2714
  }
2619
- let me = ut(() => f.tooltipValueFormat, () => f.valueTickFormat), he = n(() => {
2620
- let { min: e, max: t } = k.value, n = (e) => f.valueTickFormat === void 0 ? B(e) : ne(e, f.valueTickFormat);
2715
+ let he = vt(() => f.tooltipValueFormat, () => f.valueTickFormat), I = n(() => {
2716
+ let { min: e, max: t } = O.value, n = (e) => f.valueTickFormat === void 0 ? z(e) : re(e, f.valueTickFormat);
2621
2717
  if (e === t) return [{
2622
2718
  value: n(e),
2623
- pos: R(P(e))
2719
+ pos: L(N(e))
2624
2720
  }];
2625
- let r = O.value ? 50 : 80;
2626
- return (f.valueScaleType === "log" ? ye({
2721
+ let r = D.value ? 50 : 80;
2722
+ return (f.valueScaleType === "log" ? Se({
2627
2723
  min: e,
2628
2724
  max: t,
2629
2725
  ticks: f.valueTicks
2630
- }) : ge({
2726
+ }) : ye({
2631
2727
  min: e,
2632
2728
  max: t,
2633
2729
  ticks: f.valueTicks,
2634
- targetTickCount: re.value / r
2730
+ targetTickCount: k.value / r
2635
2731
  })).map((e) => ({
2636
2732
  value: n(e),
2637
- pos: R(P(e))
2733
+ pos: L(N(e))
2638
2734
  }));
2639
- }), z = n(() => {
2640
- let e = T.value, t = D.value;
2735
+ }), _e = n(() => {
2736
+ let e = w.value, t = E.value;
2641
2737
  if (t && t.length > 0) {
2642
2738
  let e = Infinity, n = -Infinity;
2643
2739
  for (let r of t) Number.isFinite(r) && (r < e && (e = r), r > n && (n = r));
2644
2740
  if (!Number.isFinite(e) || e === n) return [];
2645
- let r = O.value ? U.value : W.value, i = Math.max(2, Math.floor(r / 80)), a = Nt(e, n, i, "utc"), o = a.unit, s = [], c = /* @__PURE__ */ new Set();
2741
+ let r = D.value ? U.value : W.value, i = Math.max(2, Math.floor(r / 80)), a = Vt(e, n, i, "utc"), o = a.unit, s = [], c = /* @__PURE__ */ new Set();
2646
2742
  for (let e of a.values) {
2647
2743
  let n = -1, r = Infinity;
2648
2744
  for (let i = 0; i < t.length; i++) {
@@ -2651,7 +2747,7 @@ var Bt = ["role", "aria-label"], Vt = {
2651
2747
  }
2652
2748
  if (n < 0 || c.has(n)) continue;
2653
2749
  c.add(n);
2654
- let i = ie(n) + j.value / 2, a = f.categoryFormat ? f.categoryFormat(E.value[n], n) : zt(t[n], f.dateFormat, "utc", o);
2750
+ let i = M(n) + A.value / 2, a = f.categoryFormat ? f.categoryFormat(T.value[n], n) : qt(t[n], f.dateFormat, "utc", o);
2655
2751
  s.push({
2656
2752
  label: a,
2657
2753
  pos: i,
@@ -2661,10 +2757,10 @@ var Bt = ["role", "aria-label"], Vt = {
2661
2757
  return s;
2662
2758
  }
2663
2759
  let n = [], r = (e, t) => f.categoryFormat ? f.categoryFormat(e, t) : e, i = Array(e), a = 0;
2664
- for (let t = 0; t < e; t++) i[t] = r(E.value[t], t), i[t].length > a && (a = i[t].length);
2665
- let o = f.tickLabelStyle?.fontSize ?? 10, s = O.value ? a * o * .6 + 8 : o * 1.2 + 8, c = j.value > 0 ? Math.max(1, Math.ceil(s / j.value)) : 1;
2760
+ for (let t = 0; t < e; t++) i[t] = r(T.value[t], t), i[t].length > a && (a = i[t].length);
2761
+ let o = f.tickLabelStyle?.fontSize ?? 10, s = D.value ? a * o * .6 + 8 : o * 1.2 + 8, c = A.value > 0 ? Math.max(1, Math.ceil(s / A.value)) : 1;
2666
2762
  for (let t = 0; t < e; t += c) {
2667
- let e = ie(t) + j.value / 2;
2763
+ let e = M(t) + A.value / 2;
2668
2764
  n.push({
2669
2765
  label: i[t],
2670
2766
  pos: e,
@@ -2672,15 +2768,15 @@ var Bt = ["role", "aria-label"], Vt = {
2672
2768
  });
2673
2769
  }
2674
2770
  return n;
2675
- }), be = n(() => {
2771
+ }), ve = n(() => {
2676
2772
  let e = [];
2677
- return w.value.forEach((t, n) => {
2773
+ return C.value.forEach((t, n) => {
2678
2774
  !t.legend || t.showInLegend === !1 || e.push({
2679
2775
  label: t.legend,
2680
- color: t.color ?? L(n),
2776
+ color: t.color ?? me(n),
2681
2777
  kind: "bar"
2682
2778
  });
2683
- }), le.value.forEach((t) => {
2779
+ }), ue.value.forEach((t) => {
2684
2780
  !t.legend || !t.showInLegend || e.push({
2685
2781
  label: t.legend,
2686
2782
  color: t.color,
@@ -2688,21 +2784,21 @@ var Bt = ["role", "aria-label"], Vt = {
2688
2784
  dashed: t.dashed
2689
2785
  });
2690
2786
  }), e;
2691
- }), Se = n(() => be.value.map((e) => e.label));
2787
+ }), R = n(() => ve.value.map((e) => e.label));
2692
2788
  function Ce() {
2693
2789
  if (typeof f.csv == "function") return f.csv();
2694
2790
  if (typeof f.csv == "string") return f.csv;
2695
- let e = w.value.map((e) => ({
2791
+ let e = C.value.map((e) => ({
2696
2792
  label: e.legend,
2697
2793
  data: e.data
2698
2794
  }));
2699
- return Ue(E.value, e);
2795
+ return Je(T.value, e);
2700
2796
  }
2701
- let we = n(() => !!f.tooltipData || !!f.tooltipTrigger);
2702
- function Te(e, t) {
2703
- if (!isFinite(e) || !isFinite(t) || j.value === 0) return null;
2704
- let n = (O.value ? H.value.left : H.value.top) + (e + .5) * j.value, r = P(t);
2705
- return O.value ? {
2797
+ let B = n(() => !!f.tooltipData || !!f.tooltipTrigger);
2798
+ function Ee(e, t) {
2799
+ if (!isFinite(e) || !isFinite(t) || A.value === 0) return null;
2800
+ let n = (D.value ? H.value.left : H.value.top) + (e + .5) * A.value, r = N(t);
2801
+ return D.value ? {
2706
2802
  x: n,
2707
2803
  y: r
2708
2804
  } : {
@@ -2710,16 +2806,16 @@ var Bt = ["role", "aria-label"], Vt = {
2710
2806
  y: n
2711
2807
  };
2712
2808
  }
2713
- function Ee(e, t) {
2714
- let n = ke.value?.getBoundingClientRect();
2809
+ function De(e, t) {
2810
+ let n = V.value?.getBoundingClientRect();
2715
2811
  if (!n) return null;
2716
- let r = T.value;
2717
- if (r === 0 || j.value === 0) return null;
2718
- let i = O.value ? e - n.left - H.value.left : t - n.top - H.value.top;
2719
- return Math.max(0, Math.min(r - 1, Math.floor(i / j.value)));
2812
+ let r = w.value;
2813
+ if (r === 0 || A.value === 0) return null;
2814
+ let i = D.value ? e - n.left - H.value.left : t - n.top - H.value.top;
2815
+ return Math.max(0, Math.min(r - 1, Math.floor(i / A.value)));
2720
2816
  }
2721
- let De = n(() => !!(f.categoryHeader || f.valueHeader)), Oe = n(() => {
2722
- let e = De.value ? nr : 0, t = f.chartPadding;
2817
+ let Oe = n(() => !!(f.categoryHeader || f.valueHeader)), ke = n(() => {
2818
+ let e = Oe.value ? sr : 0, t = f.chartPadding;
2723
2819
  return e ? t == null ? { top: e } : typeof t == "number" ? {
2724
2820
  top: t + e,
2725
2821
  right: t,
@@ -2729,7 +2825,7 @@ var Bt = ["role", "aria-label"], Vt = {
2729
2825
  ...t,
2730
2826
  top: (t.top ?? 0) + e
2731
2827
  } : t;
2732
- }), { containerRef: ke, svgRef: Ae, width: je, height: Me, padding: H, legendY: Ne, inlineLegendLayout: Pe, innerW: U, innerH: W, bounds: Fe, hoverIndex: G, tooltipRef: K, tooltipPos: Ie, tooltipHandlers: Le, menuItems: Re, downloadLinkText: ze, csvHref: Be, downloadButtonText: Ve, triggerCsvDownload: He, menuFilename: We, isFullscreen: Ge, fullscreenStyle: Ke, teleportTarget: qe, exitFullscreen: Je } = lt({
2828
+ }), { containerRef: V, svgRef: Ae, width: je, height: Me, padding: H, legendY: Ne, inlineLegendLayout: Pe, innerW: U, innerH: W, bounds: Fe, hoverIndex: G, tooltipRef: K, tooltipPos: Ie, tooltipHandlers: Le, menuItems: Re, downloadLinkText: ze, csvHref: Be, downloadButtonText: Ve, triggerCsvDownload: He, menuFilename: Ue, isFullscreen: q, fullscreenStyle: We, teleportTarget: Ge, exitFullscreen: Ke } = _t({
2733
2829
  width: () => f.width,
2734
2830
  height: () => f.height,
2735
2831
  title: () => f.title,
@@ -2744,18 +2840,18 @@ var Bt = ["role", "aria-label"], Vt = {
2744
2840
  downloadLink: () => f.downloadLink,
2745
2841
  downloadButton: () => f.downloadButton,
2746
2842
  fullscreenTarget: () => f.fullscreenTarget,
2747
- chartPadding: () => Oe.value,
2748
- inlineLegendLabels: () => Se.value,
2749
- hasTooltipSlot: () => we.value,
2843
+ chartPadding: () => ke.value,
2844
+ inlineLegendLabels: () => R.value,
2845
+ hasTooltipSlot: () => B.value,
2750
2846
  getCsv: Ce,
2751
- pointerToIndex: Ee,
2752
- scrubAxis: () => O.value ? "x" : "y",
2753
- onHover: (e) => v("hover", e)
2754
- }), Ye = n(() => V(f.axisLabelStyle, { fontSize: 13 })), q = n(() => V(f.tickLabelStyle, {
2847
+ pointerToIndex: De,
2848
+ scrubAxis: () => D.value ? "x" : "y",
2849
+ onHover: (e) => ee("hover", e)
2850
+ }), qe = n(() => Te(f.axisLabelStyle, { fontSize: 13 })), J = n(() => Te(f.tickLabelStyle, {
2755
2851
  fontSize: 10,
2756
- fillOpacity: xe
2757
- })), Xe = n(() => V(f.legendStyle, { fontSize: 11 })), J = n(() => f.categoryAlign === "start" && !O.value ? rr : H.value.left), Y = n(() => {
2758
- let e = f.titleStyle, t = e?.align ?? "left", n = Fe.value, r = t === "left" ? J.value : t === "right" ? n.right : n.left + n.width / 2, i = t === "left" ? "start" : t === "right" ? "end" : "middle";
2852
+ fillOpacity: we
2853
+ })), Ye = n(() => Te(f.legendStyle, { fontSize: 11 })), Xe = n(() => f.categoryAlign === "start" && !D.value ? cr : H.value.left), Y = n(() => {
2854
+ let e = f.titleStyle, t = e?.align ?? "left", n = Fe.value, r = t === "left" ? Xe.value : t === "right" ? n.right : n.left + n.width / 2, i = t === "left" ? "start" : t === "right" ? "end" : "middle";
2759
2855
  return {
2760
2856
  lines: (f.title ?? "").split("\n"),
2761
2857
  fontSize: e?.fontSize ?? 14,
@@ -2768,44 +2864,44 @@ var Bt = ["role", "aria-label"], Vt = {
2768
2864
  }), Ze = n(() => {
2769
2865
  let e = G.value;
2770
2866
  if (e === null) return;
2771
- let t = D.value;
2772
- return t && Number.isFinite(t[e]) ? zt(t[e], f.dateFormat, "utc") : E.value[e];
2867
+ let t = E.value;
2868
+ return t && Number.isFinite(t[e]) ? qt(t[e], f.dateFormat, "utc") : T.value[e];
2773
2869
  }), X = n(() => {
2774
2870
  let e = G.value;
2775
2871
  if (e === null) return null;
2776
- let t = w.value, n = [];
2872
+ let t = C.value, n = [];
2777
2873
  for (let r = 0; r < t.length; r++) {
2778
2874
  let i = t[r];
2779
2875
  i.showInTooltip !== !1 && n.push({
2780
2876
  value: Number(i.data[e] ?? NaN),
2781
- color: i.color ?? L(r),
2877
+ color: i.color ?? me(r),
2782
2878
  seriesIndex: r
2783
2879
  });
2784
2880
  }
2785
2881
  return {
2786
2882
  index: e,
2787
- category: E.value[e] ?? String(e),
2883
+ category: T.value[e] ?? String(e),
2788
2884
  values: n,
2789
2885
  data: f.tooltipData?.[e] ?? null
2790
2886
  };
2791
- }), Z = n(() => {
2887
+ }), Qe = n(() => {
2792
2888
  let e = G.value;
2793
2889
  if (e === null) return null;
2794
- let t = ie(e);
2795
- return O.value ? {
2890
+ let t = M(e);
2891
+ return D.value ? {
2796
2892
  x: t,
2797
2893
  y: H.value.top,
2798
- w: j.value,
2894
+ w: A.value,
2799
2895
  h: W.value
2800
2896
  } : {
2801
2897
  x: H.value.left,
2802
2898
  y: t,
2803
2899
  w: U.value,
2804
- h: j.value
2900
+ h: A.value
2805
2901
  };
2806
- }), Qe = n(() => {
2807
- let e = Pe.value.positions, t = J.value, n = Ne.value;
2808
- return be.value.map((r, i) => {
2902
+ }), $e = n(() => {
2903
+ let e = Pe.value.positions, t = Xe.value, n = Ne.value;
2904
+ return ve.value.map((r, i) => {
2809
2905
  let a = e[i];
2810
2906
  return {
2811
2907
  ...r,
@@ -2813,7 +2909,7 @@ var Bt = ["role", "aria-label"], Vt = {
2813
2909
  y: n + a.row * 20
2814
2910
  };
2815
2911
  });
2816
- }), $e = n(() => {
2912
+ }), et = n(() => {
2817
2913
  let e = f.barLabels;
2818
2914
  if (!e) return null;
2819
2915
  let t = e === !0 ? {} : e;
@@ -2824,37 +2920,37 @@ var Bt = ["role", "aria-label"], Vt = {
2824
2920
  align: t.align ?? "center",
2825
2921
  overlap: t.overlap ?? "shift",
2826
2922
  minSize: t.minSize ?? 0,
2827
- fontSize: t.fontSize ?? ir,
2923
+ fontSize: t.fontSize ?? lr,
2828
2924
  fontWeight: t.fontWeight
2829
2925
  };
2830
2926
  });
2831
- function et(e, t) {
2832
- let n = $e.value?.format;
2833
- return typeof n == "function" ? n(e, t) : n === void 0 ? f.valueTickFormat === void 0 ? B(e) : ne(e, f.valueTickFormat) : ne(e, n);
2927
+ function tt(e, t) {
2928
+ let n = et.value?.format;
2929
+ return typeof n == "function" ? n(e, t) : n === void 0 ? f.valueTickFormat === void 0 ? z(e) : re(e, f.valueTickFormat) : re(e, n);
2834
2930
  }
2835
- function tt(e, t, n) {
2836
- for (let r = F.value.length - 1; r >= 0; r--) {
2837
- let i = F.value[r];
2931
+ function nt(e, t, n) {
2932
+ for (let r = P.value.length - 1; r >= 0; r--) {
2933
+ let i = P.value[r];
2838
2934
  if (i.categoryIndex === e && t >= i.x && t <= i.x + i.w && n >= i.y && n <= i.y + i.h) return i.color;
2839
2935
  }
2840
2936
  return null;
2841
2937
  }
2842
- let nt = n(() => {
2843
- let e = $e.value;
2938
+ let rt = n(() => {
2939
+ let e = et.value;
2844
2940
  if (!e) return [];
2845
- let t = O.value, n = e.fontSize, r = [];
2846
- for (let i of F.value) {
2847
- let a = et(i.value, {
2941
+ let t = D.value, n = e.fontSize, r = [];
2942
+ for (let i of P.value) {
2943
+ let a = tt(i.value, {
2848
2944
  value: i.value,
2849
2945
  categoryIndex: i.categoryIndex,
2850
2946
  seriesIndex: i.seriesIndex,
2851
- category: E.value[i.categoryIndex] ?? String(i.categoryIndex)
2947
+ category: T.value[i.categoryIndex] ?? String(i.categoryIndex)
2852
2948
  });
2853
2949
  if (!a) continue;
2854
- let o = t ? i.h : i.w, s = a.length * n * ar, c = o >= s + 2 * or && o >= e.minSize, l = e.placement === "inside" ? !0 : e.placement === "outside" ? !1 : c, u, d, f, p = "middle", m = t ? -i.y : i.x + i.w, h = t ? -(i.y + i.h) : i.x, g = t ? n : s;
2855
- if (f = t ? i.x + i.w / 2 : i.y + i.h / 2, !l) u = m + or, d = u + g, p = "start";
2856
- else if (e.align === "start") u = h + or, d = u + g, p = "start";
2857
- else if (e.align === "end") d = m - or, u = d - g, p = "end";
2950
+ let o = t ? i.h : i.w, s = a.length * n * ur, c = o >= s + 2 * dr && o >= e.minSize, l = e.placement === "inside" ? !0 : e.placement === "outside" ? !1 : c, u, d, f, p = "middle", m = t ? -i.y : i.x + i.w, h = t ? -(i.y + i.h) : i.x, g = t ? n : s;
2951
+ if (f = t ? i.x + i.w / 2 : i.y + i.h / 2, !l) u = m + dr, d = u + g, p = "start";
2952
+ else if (e.align === "start") u = h + dr, d = u + g, p = "start";
2953
+ else if (e.align === "end") d = m - dr, u = d - g, p = "end";
2858
2954
  else {
2859
2955
  let e = (m + h) / 2;
2860
2956
  u = e - g / 2, d = e + g / 2, p = "middle";
@@ -2880,12 +2976,12 @@ var Bt = ["role", "aria-label"], Vt = {
2880
2976
  t.sort((e, t) => e.lo - t.lo);
2881
2977
  let n = -Infinity;
2882
2978
  for (let r of t) {
2883
- if (r.lo < n + sr) {
2979
+ if (r.lo < n + fr) {
2884
2980
  if (e.overlap === "hide") {
2885
2981
  r.hidden = !0;
2886
2982
  continue;
2887
2983
  }
2888
- let t = n + sr - r.lo;
2984
+ let t = n + fr - r.lo;
2889
2985
  r.lo += t, r.hi += t, r.inside = !1, r.svgAnchor = "start";
2890
2986
  }
2891
2987
  if (r.hi > i) {
@@ -2902,10 +2998,10 @@ var Bt = ["role", "aria-label"], Vt = {
2902
2998
  t ? (r = i.cross, a = -((i.lo + i.hi) / 2), c = "middle") : (c = i.svgAnchor, r = c === "start" ? i.lo : c === "end" ? i.hi : (i.lo + i.hi) / 2, a = i.cross);
2903
2999
  let l;
2904
3000
  if (!o) l = e.color;
2905
- else if (i.inside) l = gt(i.bar.color);
3001
+ else if (i.inside) l = wt(i.bar.color);
2906
3002
  else {
2907
- let e = t ? i.cross : (i.lo + i.hi) / 2, n = t ? -((i.lo + i.hi) / 2) : i.cross, r = tt(i.bar.categoryIndex, e, n);
2908
- l = r ? gt(r) : "currentColor";
3003
+ let e = t ? i.cross : (i.lo + i.hi) / 2, n = t ? -((i.lo + i.hi) / 2) : i.cross, r = nt(i.bar.categoryIndex, e, n);
3004
+ l = r ? wt(r) : "currentColor";
2909
3005
  }
2910
3006
  s.push({
2911
3007
  key: `${i.bar.categoryIndex}-${i.bar.seriesIndex}`,
@@ -2919,23 +3015,23 @@ var Bt = ["role", "aria-label"], Vt = {
2919
3015
  });
2920
3016
  }
2921
3017
  return s;
2922
- }), rt = n(() => {
3018
+ }), it = n(() => {
2923
3019
  let e = H.value.left - 6;
2924
3020
  switch (f.categoryAlign ?? "end") {
2925
3021
  case "start": return {
2926
3022
  anchor: "start",
2927
- x: rr
3023
+ x: cr
2928
3024
  };
2929
3025
  case "center": return {
2930
3026
  anchor: "middle",
2931
- x: (rr + e) / 2
3027
+ x: (cr + e) / 2
2932
3028
  };
2933
3029
  default: return {
2934
3030
  anchor: "end",
2935
3031
  x: e
2936
3032
  };
2937
3033
  }
2938
- }), it = n(() => {
3034
+ }), at = n(() => {
2939
3035
  let e = [], t = H.value.top - 7;
2940
3036
  if (f.valueHeader && e.push({
2941
3037
  key: "vh",
@@ -2944,7 +3040,7 @@ var Bt = ["role", "aria-label"], Vt = {
2944
3040
  y: t,
2945
3041
  anchor: "start"
2946
3042
  }), f.categoryHeader) {
2947
- let n = !O.value, r = rt.value;
3043
+ let n = !D.value, r = it.value;
2948
3044
  e.push({
2949
3045
  key: "ch",
2950
3046
  text: f.categoryHeader,
@@ -2956,33 +3052,33 @@ var Bt = ["role", "aria-label"], Vt = {
2956
3052
  return e;
2957
3053
  });
2958
3054
  return (n, l) => (_(), r(t, {
2959
- to: C(qe),
2960
- disabled: !C(Ge)
3055
+ to: S(Ge),
3056
+ disabled: !S(q)
2961
3057
  }, [o("div", d({
2962
3058
  ref_key: "containerRef",
2963
- ref: ke
3059
+ ref: V
2964
3060
  }, n.$attrs, {
2965
- class: ["bar-chart-wrapper", { "is-fullscreen": C(Ge) }],
2966
- style: C(Ke),
2967
- role: g.value || void 0,
2968
- "aria-label": h.value || void 0
3061
+ class: ["bar-chart-wrapper", { "is-fullscreen": S(q) }],
3062
+ style: S(We)
2969
3063
  }), [
2970
- c.menu ? (_(), r(pe, {
3064
+ c.menu ? (_(), r(ge, {
2971
3065
  key: 0,
2972
- items: C(Re),
2973
- "is-fullscreen": C(Ge),
2974
- onClose: C(Je)
3066
+ items: S(Re),
3067
+ "is-fullscreen": S(q),
3068
+ onClose: S(Ke)
2975
3069
  }, null, 8, [
2976
3070
  "items",
2977
3071
  "is-fullscreen",
2978
3072
  "onClose"
2979
3073
  ])) : i("", !0),
2980
- o("div", kn, x(C(Ge) ? "Chart expanded to fill window" : ""), 1),
3074
+ o("div", Pn, b(S(q) ? "Chart expanded to fill window" : ""), 1),
2981
3075
  (_(), a("svg", {
2982
3076
  ref_key: "svgRef",
2983
3077
  ref: Ae,
2984
- width: C(je),
2985
- height: C(Me)
3078
+ width: S(je),
3079
+ height: S(Me),
3080
+ role: g.value || void 0,
3081
+ "aria-label": p.value || void 0
2986
3082
  }, [
2987
3083
  c.title ? (_(), a("text", {
2988
3084
  key: 0,
@@ -2996,25 +3092,25 @@ var Bt = ["role", "aria-label"], Vt = {
2996
3092
  key: t,
2997
3093
  x: Y.value.x,
2998
3094
  dy: t === 0 ? 0 : Y.value.lineHeight
2999
- }, x(e), 9, Mn))), 128))], 8, jn)) : i("", !0),
3000
- (_(!0), a(e, null, y(it.value, (e) => (_(), a("text", {
3095
+ }, b(e), 9, Ln))), 128))], 8, In)) : i("", !0),
3096
+ (_(!0), a(e, null, y(at.value, (e) => (_(), a("text", {
3001
3097
  key: e.key,
3002
3098
  "data-testid": e.key === "ch" ? "category-header" : "value-header",
3003
3099
  x: e.x,
3004
3100
  y: e.y,
3005
3101
  "text-anchor": e.anchor,
3006
- "font-size": Ye.value.fontSize,
3007
- fill: Ye.value.fill,
3102
+ "font-size": qe.value.fontSize,
3103
+ fill: qe.value.fill,
3008
3104
  "font-weight": "600"
3009
- }, x(e.text), 9, Nn))), 128)),
3010
- Qe.value.length > 0 ? (_(), a("g", Pn, [(_(!0), a(e, null, y(Qe.value, (t, n) => (_(), a(e, { key: "ileg" + n }, [t.kind === "bar" ? (_(), a("rect", {
3105
+ }, b(e.text), 9, Rn))), 128)),
3106
+ $e.value.length > 0 ? (_(), a("g", zn, [(_(!0), a(e, null, y($e.value, (t, n) => (_(), a(e, { key: "ileg" + n }, [t.kind === "bar" ? (_(), a("rect", {
3011
3107
  key: 0,
3012
3108
  x: t.x,
3013
3109
  y: t.y - 5,
3014
3110
  width: "12",
3015
3111
  height: "10",
3016
3112
  fill: t.color
3017
- }, null, 8, Fn)) : (_(), a("line", {
3113
+ }, null, 8, Bn)) : (_(), a("line", {
3018
3114
  key: 1,
3019
3115
  x1: t.x,
3020
3116
  y1: t.y,
@@ -3023,114 +3119,114 @@ var Bt = ["role", "aria-label"], Vt = {
3023
3119
  stroke: t.color,
3024
3120
  "stroke-width": "2",
3025
3121
  "stroke-dasharray": t.dashed ? "4 2" : void 0
3026
- }, null, 8, In)), o("text", {
3122
+ }, null, 8, Vn)), o("text", {
3027
3123
  x: t.x + 18,
3028
3124
  y: t.y + 4,
3029
- "font-size": Xe.value.fontSize,
3030
- fill: Xe.value.fill,
3031
- "font-weight": Xe.value.fontWeight
3032
- }, x(t.label), 9, Ln)], 64))), 128))])) : i("", !0),
3033
- !O.value || c.valueAxis ? (_(), a("line", {
3125
+ "font-size": Ye.value.fontSize,
3126
+ fill: Ye.value.fill,
3127
+ "font-weight": Ye.value.fontWeight
3128
+ }, b(t.label), 9, Hn)], 64))), 128))])) : i("", !0),
3129
+ !D.value || c.valueAxis ? (_(), a("line", {
3034
3130
  key: 2,
3035
- x1: C(R)(C(H).left),
3036
- y1: C(R)(C(H).top),
3037
- x2: C(R)(C(H).left),
3038
- y2: C(R)(C(H).top + C(W)),
3131
+ x1: S(L)(S(H).left),
3132
+ y1: S(L)(S(H).top),
3133
+ x2: S(L)(S(H).left),
3134
+ y2: S(L)(S(H).top + S(W)),
3039
3135
  stroke: "currentColor",
3040
3136
  "stroke-opacity": "0.3"
3041
- }, null, 8, Rn)) : i("", !0),
3042
- O.value || c.valueAxis ? (_(), a("line", {
3137
+ }, null, 8, Un)) : i("", !0),
3138
+ D.value || c.valueAxis ? (_(), a("line", {
3043
3139
  key: 3,
3044
- x1: C(R)(C(H).left),
3045
- y1: C(R)(C(H).top + C(W)),
3046
- x2: C(R)(C(H).left + C(U)),
3047
- y2: C(R)(C(H).top + C(W)),
3140
+ x1: S(L)(S(H).left),
3141
+ y1: S(L)(S(H).top + S(W)),
3142
+ x2: S(L)(S(H).left + S(U)),
3143
+ y2: S(L)(S(H).top + S(W)),
3048
3144
  stroke: "currentColor",
3049
3145
  "stroke-opacity": "0.3"
3050
- }, null, 8, zn)) : i("", !0),
3051
- c.valueGrid && c.valueAxis ? (_(!0), a(e, { key: 4 }, y(he.value, (e, t) => (_(), a("line", {
3146
+ }, null, 8, Wn)) : i("", !0),
3147
+ c.valueGrid && c.valueAxis ? (_(!0), a(e, { key: 4 }, y(I.value, (e, t) => (_(), a("line", {
3052
3148
  key: "vg" + t,
3053
- x1: O.value ? C(H).left : e.pos,
3054
- y1: O.value ? e.pos : C(H).top,
3055
- x2: O.value ? C(H).left + C(U) : e.pos,
3056
- y2: O.value ? e.pos : C(H).top + C(W),
3149
+ x1: D.value ? S(H).left : e.pos,
3150
+ y1: D.value ? e.pos : S(H).top,
3151
+ x2: D.value ? S(H).left + S(U) : e.pos,
3152
+ y2: D.value ? e.pos : S(H).top + S(W),
3057
3153
  stroke: "currentColor",
3058
3154
  "stroke-opacity": "0.1"
3059
- }, null, 8, Bn))), 128)) : i("", !0),
3060
- Z.value && we.value ? (_(), a("rect", {
3155
+ }, null, 8, Gn))), 128)) : i("", !0),
3156
+ Qe.value && B.value ? (_(), a("rect", {
3061
3157
  key: 5,
3062
- x: Z.value.x,
3063
- y: Z.value.y,
3064
- width: Z.value.w,
3065
- height: Z.value.h,
3158
+ x: Qe.value.x,
3159
+ y: Qe.value.y,
3160
+ width: Qe.value.w,
3161
+ height: Qe.value.h,
3066
3162
  fill: "currentColor",
3067
3163
  "fill-opacity": "0.06",
3068
3164
  "pointer-events": "none"
3069
- }, null, 8, Vn)) : i("", !0),
3070
- c.valueAxis && O.value ? (_(!0), a(e, { key: 6 }, y(he.value, (e, t) => (_(), a("text", {
3165
+ }, null, 8, Kn)) : i("", !0),
3166
+ c.valueAxis && D.value ? (_(!0), a(e, { key: 6 }, y(I.value, (e, t) => (_(), a("text", {
3071
3167
  key: "vt" + t,
3072
3168
  "data-testid": "value-tick",
3073
- x: C(H).left - 6,
3169
+ x: S(H).left - 6,
3074
3170
  y: e.pos,
3075
3171
  "text-anchor": "end",
3076
3172
  "dominant-baseline": "middle",
3077
- "font-size": q.value.fontSize,
3078
- fill: q.value.fill,
3079
- "font-weight": q.value.fontWeight,
3080
- "fill-opacity": q.value.fillOpacity
3081
- }, x(e.value), 9, Hn))), 128)) : c.valueAxis ? (_(!0), a(e, { key: 7 }, y(he.value, (e, t) => (_(), a("text", {
3173
+ "font-size": J.value.fontSize,
3174
+ fill: J.value.fill,
3175
+ "font-weight": J.value.fontWeight,
3176
+ "fill-opacity": J.value.fillOpacity
3177
+ }, b(e.value), 9, qn))), 128)) : c.valueAxis ? (_(!0), a(e, { key: 7 }, y(I.value, (e, t) => (_(), a("text", {
3082
3178
  key: "vt" + t,
3083
3179
  "data-testid": "value-tick",
3084
3180
  x: e.pos,
3085
- y: C(H).top + C(W) + 16,
3181
+ y: S(H).top + S(W) + 16,
3086
3182
  "text-anchor": "middle",
3087
- "font-size": q.value.fontSize,
3088
- fill: q.value.fill,
3089
- "font-weight": q.value.fontWeight,
3090
- "fill-opacity": q.value.fillOpacity
3091
- }, x(e.value), 9, Un))), 128)) : i("", !0),
3183
+ "font-size": J.value.fontSize,
3184
+ fill: J.value.fill,
3185
+ "font-weight": J.value.fontWeight,
3186
+ "fill-opacity": J.value.fillOpacity
3187
+ }, b(e.value), 9, Jn))), 128)) : i("", !0),
3092
3188
  c.yLabel ? (_(), a("text", {
3093
3189
  key: 8,
3094
3190
  x: 0,
3095
3191
  y: 0,
3096
- transform: `translate(14, ${C(H).top + C(W) / 2}) rotate(-90)`,
3192
+ transform: `translate(14, ${S(H).top + S(W) / 2}) rotate(-90)`,
3097
3193
  "text-anchor": "middle",
3098
- "font-size": Ye.value.fontSize,
3099
- fill: Ye.value.fill,
3100
- "font-weight": Ye.value.fontWeight
3101
- }, x(c.yLabel), 9, Wn)) : i("", !0),
3102
- O.value ? (_(!0), a(e, { key: 9 }, y(z.value, (e, t) => (_(), a("text", {
3194
+ "font-size": qe.value.fontSize,
3195
+ fill: qe.value.fill,
3196
+ "font-weight": qe.value.fontWeight
3197
+ }, b(c.yLabel), 9, Yn)) : i("", !0),
3198
+ D.value ? (_(!0), a(e, { key: 9 }, y(_e.value, (e, t) => (_(), a("text", {
3103
3199
  key: "ct" + t,
3104
3200
  "data-testid": "category-tick",
3105
3201
  x: e.pos,
3106
- y: C(H).top + C(W) + 16,
3202
+ y: S(H).top + S(W) + 16,
3107
3203
  "text-anchor": e.anchor,
3108
- "font-size": q.value.fontSize,
3109
- fill: q.value.fill,
3110
- "font-weight": q.value.fontWeight,
3111
- "fill-opacity": q.value.fillOpacity
3112
- }, x(e.label), 9, Gn))), 128)) : (_(!0), a(e, { key: 10 }, y(z.value, (e, t) => (_(), a("text", {
3204
+ "font-size": J.value.fontSize,
3205
+ fill: J.value.fill,
3206
+ "font-weight": J.value.fontWeight,
3207
+ "fill-opacity": J.value.fillOpacity
3208
+ }, b(e.label), 9, Xn))), 128)) : (_(!0), a(e, { key: 10 }, y(_e.value, (e, t) => (_(), a("text", {
3113
3209
  key: "ct" + t,
3114
3210
  "data-testid": "category-tick",
3115
- x: rt.value.x,
3211
+ x: it.value.x,
3116
3212
  y: e.pos,
3117
- "text-anchor": rt.value.anchor,
3213
+ "text-anchor": it.value.anchor,
3118
3214
  "dominant-baseline": "middle",
3119
- "font-size": q.value.fontSize,
3120
- fill: q.value.fill,
3121
- "font-weight": q.value.fontWeight,
3122
- "fill-opacity": q.value.fillOpacity
3123
- }, x(e.label), 9, Kn))), 128)),
3215
+ "font-size": J.value.fontSize,
3216
+ fill: J.value.fill,
3217
+ "font-weight": J.value.fontWeight,
3218
+ "fill-opacity": J.value.fillOpacity
3219
+ }, b(e.label), 9, Zn))), 128)),
3124
3220
  c.xLabel ? (_(), a("text", {
3125
3221
  key: 11,
3126
- x: C(H).left + C(U) / 2,
3127
- y: C(Me) - 4,
3222
+ x: S(H).left + S(U) / 2,
3223
+ y: S(Me) - 4,
3128
3224
  "text-anchor": "middle",
3129
- "font-size": Ye.value.fontSize,
3130
- fill: Ye.value.fill,
3131
- "font-weight": Ye.value.fontWeight
3132
- }, x(c.xLabel), 9, qn)) : i("", !0),
3133
- (_(!0), a(e, null, y(F.value, (e, t) => (_(), a("rect", {
3225
+ "font-size": qe.value.fontSize,
3226
+ fill: qe.value.fill,
3227
+ "font-weight": qe.value.fontWeight
3228
+ }, b(c.xLabel), 9, Qn)) : i("", !0),
3229
+ (_(!0), a(e, null, y(P.value, (e, t) => (_(), a("rect", {
3134
3230
  key: "bar" + t,
3135
3231
  "data-testid": "bar",
3136
3232
  "data-category": e.categoryIndex,
@@ -3141,9 +3237,9 @@ var Bt = ["role", "aria-label"], Vt = {
3141
3237
  height: e.h,
3142
3238
  fill: e.color,
3143
3239
  "fill-opacity": e.opacity,
3144
- style: m(e.blendMode ? { mixBlendMode: e.blendMode } : void 0)
3145
- }, null, 12, Jn))), 128)),
3146
- (_(!0), a(e, null, y(nt.value, (e) => (_(), a("text", {
3240
+ style: h(e.blendMode ? { mixBlendMode: e.blendMode } : void 0)
3241
+ }, null, 12, $n))), 128)),
3242
+ (_(!0), a(e, null, y(rt.value, (e) => (_(), a("text", {
3147
3243
  key: "blbl" + e.key,
3148
3244
  "data-testid": "bar-label",
3149
3245
  x: e.x,
@@ -3154,8 +3250,8 @@ var Bt = ["role", "aria-label"], Vt = {
3154
3250
  "font-weight": e.fontWeight,
3155
3251
  fill: e.fill,
3156
3252
  "pointer-events": "none"
3157
- }, x(e.text), 9, Yn))), 128)),
3158
- (_(!0), a(e, null, y(I.value, (t, n) => (_(), a(e, { key: "sl" + n }, [t.pathD ? (_(), a("path", {
3253
+ }, b(e.text), 9, er))), 128)),
3254
+ (_(!0), a(e, null, y(F.value, (t, n) => (_(), a(e, { key: "sl" + n }, [t.pathD ? (_(), a("path", {
3159
3255
  key: 0,
3160
3256
  "data-testid": "summary-line",
3161
3257
  d: t.pathD,
@@ -3166,67 +3262,67 @@ var Bt = ["role", "aria-label"], Vt = {
3166
3262
  "stroke-dasharray": t.dashed ? "6 3" : void 0,
3167
3263
  "stroke-linecap": "round",
3168
3264
  "stroke-linejoin": "round",
3169
- style: m(t.blendMode ? { mixBlendMode: t.blendMode } : void 0)
3170
- }, null, 12, Xn)) : i("", !0), t.dots ? (_(!0), a(e, { key: 1 }, y(t.points, (e, r) => (_(), a("circle", {
3265
+ style: h(t.blendMode ? { mixBlendMode: t.blendMode } : void 0)
3266
+ }, null, 12, tr)) : i("", !0), t.dots ? (_(!0), a(e, { key: 1 }, y(t.points, (e, r) => (_(), a("circle", {
3171
3267
  key: "sld" + n + "-" + r,
3172
3268
  cx: e.x,
3173
3269
  cy: e.y,
3174
3270
  r: t.dotRadius,
3175
3271
  fill: t.color,
3176
3272
  "fill-opacity": t.opacity,
3177
- style: m(t.blendMode ? { mixBlendMode: t.blendMode } : void 0)
3178
- }, null, 12, Zn))), 128)) : i("", !0)], 64))), 128)),
3179
- we.value ? (_(), a("rect", d({
3273
+ style: h(t.blendMode ? { mixBlendMode: t.blendMode } : void 0)
3274
+ }, null, 12, nr))), 128)) : i("", !0)], 64))), 128)),
3275
+ B.value ? (_(), a("rect", d({
3180
3276
  key: 12,
3181
- x: C(H).left,
3182
- y: C(H).top,
3183
- width: C(U),
3184
- height: C(W),
3277
+ x: S(H).left,
3278
+ y: S(H).top,
3279
+ width: S(U),
3280
+ height: S(W),
3185
3281
  fill: "transparent",
3186
- style: `cursor: crosshair; touch-action: ${O.value ? "pan-y" : "pan-x"}`
3187
- }, ee(C(Le), !0)), null, 16, Qn)) : i("", !0),
3188
- c.annotations && c.annotations.length > 0 ? (_(), r(C(ot), {
3282
+ style: `cursor: crosshair; touch-action: ${D.value ? "pan-y" : "pan-x"}`
3283
+ }, ne(S(Le), !0)), null, 16, rr)) : i("", !0),
3284
+ c.annotations && c.annotations.length > 0 ? (_(), r(S(mt), {
3189
3285
  key: 13,
3190
3286
  annotations: c.annotations,
3191
- project: Te,
3192
- bounds: C(Fe)
3287
+ project: Ee,
3288
+ bounds: S(Fe)
3193
3289
  }, null, 8, ["annotations", "bounds"])) : i("", !0)
3194
- ], 8, An)),
3195
- we.value && C(G) !== null && X.value ? (_(), a("div", {
3290
+ ], 8, Fn)),
3291
+ B.value && S(G) !== null && X.value ? (_(), a("div", {
3196
3292
  key: 1,
3197
3293
  ref_key: "tooltipRef",
3198
3294
  ref: K,
3199
3295
  class: "chart-tooltip-content",
3200
- style: m({
3296
+ style: h({
3201
3297
  position: "absolute",
3202
3298
  top: "0",
3203
3299
  left: "0",
3204
3300
  willChange: "transform",
3205
- transform: C(Ie) ? `translate3d(${C(Ie).left}px, ${C(Ie).top}px, 0) translateY(-50%)` : "translateY(-50%)",
3206
- visibility: C(Ie) ? "visible" : "hidden"
3301
+ transform: S(Ie) ? `translate3d(${S(Ie).left}px, ${S(Ie).top}px, 0) translateY(-50%)` : "translateY(-50%)",
3302
+ visibility: S(Ie) ? "visible" : "hidden"
3207
3303
  })
3208
- }, [b(n.$slots, "tooltip", p(u(X.value)), () => [o("div", $n, [Ze.value ? (_(), a("div", er, x(Ze.value), 1)) : i("", !0), (_(!0), a(e, null, y(X.value.values, (e) => (_(), a("div", {
3304
+ }, [te(n.$slots, "tooltip", m(u(X.value)), () => [o("div", ir, [Ze.value ? (_(), a("div", ar, b(Ze.value), 1)) : i("", !0), (_(!0), a(e, null, y(X.value.values, (e) => (_(), a("div", {
3209
3305
  key: e.seriesIndex,
3210
3306
  class: "bar-chart-tooltip-row"
3211
3307
  }, [o("span", {
3212
3308
  class: "bar-chart-tooltip-swatch",
3213
- style: m({ background: e.color })
3214
- }, null, 4), s(" " + x(isFinite(e.value) ? C(me)(e.value) : "—"), 1)]))), 128))])], !0)], 4)) : i("", !0),
3215
- C(ze) ? (_(), a("a", {
3309
+ style: h({ background: e.color })
3310
+ }, null, 4), s(" " + b(isFinite(e.value) ? S(he)(e.value) : "—"), 1)]))), 128))])], !0)], 4)) : i("", !0),
3311
+ S(ze) ? (_(), a("a", {
3216
3312
  key: 2,
3217
3313
  class: "bar-chart-download-link",
3218
- href: C(Be),
3219
- download: `${C(We)()}.csv`
3220
- }, x(C(ze)), 9, tr)) : i("", !0),
3221
- C(Ve) ? (_(), a("button", {
3314
+ href: S(Be),
3315
+ download: `${S(Ue)()}.csv`
3316
+ }, b(S(ze)), 9, or)) : i("", !0),
3317
+ S(Ve) ? (_(), a("button", {
3222
3318
  key: 3,
3223
3319
  type: "button",
3224
3320
  class: "bar-chart-download-button",
3225
- onClick: l[0] ||= (...e) => C(He) && C(He)(...e)
3226
- }, x(C(Ve)), 1)) : i("", !0)
3227
- ], 16, On)], 8, ["to", "disabled"]));
3321
+ onClick: l[0] ||= (...e) => S(He) && S(He)(...e)
3322
+ }, b(S(Ve)), 1)) : i("", !0)
3323
+ ], 16)], 8, ["to", "disabled"]));
3228
3324
  }
3229
- }), [["__scopeId", "data-v-5f38ef02"]]), lr = {
3325
+ }), [["__scopeId", "data-v-251f7945"]]), mr = {
3230
3326
  ref: "root",
3231
3327
  class: "chart-tooltip-content",
3232
3328
  style: {
@@ -3238,7 +3334,7 @@ var Bt = ["role", "aria-label"], Vt = {
3238
3334
  "pointer-events": "none",
3239
3335
  transform: "translateY(-50%)"
3240
3336
  }
3241
- }, ur = /* @__PURE__ */ l({
3337
+ }, hr = /* @__PURE__ */ l({
3242
3338
  __name: "ChoroplethTooltip",
3243
3339
  setup(e, { expose: n }) {
3244
3340
  let a = v(null), s = w("root");
@@ -3249,21 +3345,24 @@ var Bt = ["role", "aria-label"], Vt = {
3249
3345
  getEl() {
3250
3346
  return s.value;
3251
3347
  }
3252
- }), (e, n) => (_(), r(t, { to: "body" }, [o("div", lr, [a.value ? b(e.$slots, "default", p(d({ key: 0 }, a.value))) : i("", !0)], 512)]));
3348
+ }), (e, n) => (_(), r(t, { to: "body" }, [o("div", mr, [a.value ? te(e.$slots, "default", m(d({ key: 0 }, a.value))) : i("", !0)], 512)]));
3253
3349
  }
3254
- }), dr = ["role", "aria-label"], fr = {
3350
+ }), gr = ["role", "aria-label"], _r = {
3255
3351
  class: "chart-sr-only",
3256
3352
  "aria-live": "polite"
3257
- }, pr = {
3353
+ }, vr = {
3258
3354
  key: 1,
3259
3355
  class: "choropleth-header"
3260
- }, mr = {
3356
+ }, yr = {
3261
3357
  key: 0,
3262
3358
  class: "choropleth-legend-title"
3263
- }, hr = {
3359
+ }, br = {
3264
3360
  key: 2,
3265
3361
  class: "choropleth-legend-continuous"
3266
- }, gr = { class: "choropleth-legend-ticks" }, _r = ["viewBox"], vr = ["innerHTML"], yr = "http://www.w3.org/2000/svg", br = 10, xr = 600, Sr = 450, Cr = 1e3, wr = 12, Tr = /* @__PURE__ */ L(/* @__PURE__ */ l({
3362
+ }, xr = { class: "choropleth-legend-ticks" }, Sr = {
3363
+ key: 2,
3364
+ class: "choropleth-zoom-hint"
3365
+ }, Cr = ["viewBox"], wr = ["innerHTML"], Tr = "http://www.w3.org/2000/svg", Er = 10, Dr = 600, Or = 250, kr = 450, Ar = 2, jr = 2, Mr = 1e3, Nr = 12, Pr = /* @__PURE__ */ I(/* @__PURE__ */ l({
3267
3366
  inheritAttrs: !1,
3268
3367
  __name: "ChoroplethMap",
3269
3368
  props: {
@@ -3296,13 +3395,14 @@ var Bt = ["role", "aria-label"], Vt = {
3296
3395
  type: Boolean,
3297
3396
  default: !1
3298
3397
  },
3299
- pan: {
3398
+ zoomMode: { default: "activate" },
3399
+ touchExpand: {
3300
3400
  type: Boolean,
3301
- default: !1
3401
+ default: !0
3302
3402
  },
3303
- twoFingerPan: {
3403
+ zoomHint: {
3304
3404
  type: Boolean,
3305
- default: !1
3405
+ default: !0
3306
3406
  },
3307
3407
  tooltipTrigger: {},
3308
3408
  tooltipFormat: {},
@@ -3322,11 +3422,11 @@ var Bt = ["role", "aria-label"], Vt = {
3322
3422
  "update:focus"
3323
3423
  ],
3324
3424
  setup(c, { emit: l }) {
3325
- let f = c, ee = n(() => f.ariaLabel ?? f.title), w = n(() => f.role ?? (ee.value ? "figure" : void 0)), D = l, O = (e) => e, k = v(null), A = v(null), re = v(null), j = v(null), M = v(null), N = v(null), ie = te(), de = n(() => !!f.tooltipTrigger || !!f.tooltipFormat || !!ie.tooltip), fe = n(() => {
3326
- let e = f.legendStyle, t = {};
3425
+ let p = c, ne = n(() => p.ariaLabel ?? p.title), w = n(() => p.role ?? (ne.value ? "figure" : void 0)), D = l, O = (e) => e, ie = v(null), k = v(null), A = v(null), j = v(null), ae = v(null), M = v(null), oe = C(), me = n(() => !!p.tooltipTrigger || !!p.tooltipFormat || !!oe.tooltip), he = n(() => {
3426
+ let e = p.legendStyle, t = {};
3327
3427
  return e?.fontSize != null && (t["font-size"] = `${e.fontSize}px`), e?.fontWeight != null && (t["font-weight"] = String(e.fontWeight)), e?.color != null && (t.color = e.color), t;
3328
- }), L = n(() => {
3329
- let e = f.titleStyle, t = {
3428
+ }), I = n(() => {
3429
+ let e = p.titleStyle, t = {
3330
3430
  "font-size": `${e?.fontSize ?? 14}px`,
3331
3431
  "line-height": `${e?.lineHeight ?? 18}px`,
3332
3432
  "font-weight": String(e?.fontWeight ?? 600),
@@ -3334,57 +3434,73 @@ var Bt = ["role", "aria-label"], Vt = {
3334
3434
  width: "100%"
3335
3435
  };
3336
3436
  return e?.color && (t.color = e.color), t;
3337
- }), R = /* @__PURE__ */ new Map(), me = /* @__PURE__ */ new Map(), he = null, z = null, B = /* @__PURE__ */ new Map(), ge = /* @__PURE__ */ new Map(), _e = !1, ve = typeof window < "u" && "ontouchstart" in window, ye = null, be = {
3437
+ }), L = /* @__PURE__ */ new Map(), _e = /* @__PURE__ */ new Map(), ve = null, R = null, z = /* @__PURE__ */ new Map(), ye = /* @__PURE__ */ new Map(), be = !1, xe = null, Se = {
3338
3438
  width: 0,
3339
3439
  height: 0
3340
- }, xe = null, Se = !1, V = null, Ce = v(!1), we = 0, Te = 0, Ee = 0, De = null;
3341
- function Oe() {
3342
- let e = re.value;
3343
- e && (e.addEventListener("touchstart", Ot, { passive: !0 }), e.addEventListener("touchend", kt), e.addEventListener("touchcancel", At, { passive: !0 }), !ve && (e.addEventListener("click", Tt), e.addEventListener("mouseover", Tt), e.addEventListener("mousemove", Et), e.addEventListener("mouseout", Dt)));
3440
+ }, Ce = null, we = !1, B = null, Te = v(!1), Ee = v(1), De = v(1), Oe = v(!1), ke = v(!1), V = n(() => Oe.value || ke.value), Ae = n(() => p.zoomMode === "scroll"), je = n(() => p.zoom && (Ae.value || !p.touchExpand && V.value)), Me = 0, Ne = 0, Pe = 0, U = null, W = 0;
3441
+ function Fe() {
3442
+ let e = k.value, t = A.value;
3443
+ !e || !t || (e.addEventListener("touchstart", $t, { passive: !0 }), e.addEventListener("touchend", en), e.addEventListener("touchcancel", tn, { passive: !0 }), !q() && (t.addEventListener("click", Xt), t.addEventListener("mouseover", Xt), t.addEventListener("mousemove", Zt), t.addEventListener("mouseout", Qt)));
3344
3444
  }
3345
- function ke() {
3346
- let e = re.value;
3347
- e && (e.removeEventListener("touchstart", Ot), e.removeEventListener("touchend", kt), e.removeEventListener("touchcancel", At), e.removeEventListener("click", Tt), e.removeEventListener("mouseover", Tt), e.removeEventListener("mousemove", Et), e.removeEventListener("mouseout", Dt));
3445
+ function G() {
3446
+ let e = k.value, t = A.value;
3447
+ e && (e.removeEventListener("touchstart", $t), e.removeEventListener("touchend", en), e.removeEventListener("touchcancel", tn)), t && (t.removeEventListener("click", Xt), t.removeEventListener("mouseover", Xt), t.removeEventListener("mousemove", Zt), t.removeEventListener("mouseout", Qt));
3348
3448
  }
3349
- function Ae() {
3350
- St();
3449
+ function Le() {
3450
+ qt();
3351
3451
  }
3352
- h(() => {
3353
- Me(), Oe(), Mt(), W(), mt(), window.addEventListener("scroll", Ae, {
3452
+ let Re = null;
3453
+ g(() => {
3454
+ ze(), Fe(), rn(), Ge(), Lt(), k.value && typeof ResizeObserver < "u" && (Re = new ResizeObserver((e) => {
3455
+ let t = e[0]?.contentRect.width;
3456
+ t && (De.value = t / Mr, Q());
3457
+ }), Re.observe(k.value)), window.addEventListener("scroll", Le, {
3354
3458
  passive: !0,
3355
3459
  capture: !0
3356
- }), window.addEventListener("resize", Ae, { passive: !0 });
3357
- }), g(() => {
3358
- ye?.disconnect(), Ee && cancelAnimationFrame(Ee), H(), ke(), window.removeEventListener("scroll", Ae, { capture: !0 }), window.removeEventListener("resize", Ae);
3460
+ }), window.addEventListener("resize", Le, { passive: !0 });
3461
+ }), ee(() => {
3462
+ xe?.disconnect(), Re?.disconnect(), Pe && cancelAnimationFrame(Pe), window.clearTimeout(W), Be(), G(), window.removeEventListener("scroll", Le, { capture: !0 }), window.removeEventListener("resize", Le);
3359
3463
  });
3360
- function Me() {
3361
- if (!A.value || !re.value) return;
3362
- let e = ce(A.value), t = Math.max(12, f.focusZoomLevel);
3363
- V = F().scaleExtent([1, t]).on("start", () => {
3364
- _e = !0, St();
3464
+ function ze() {
3465
+ if (!k.value || !A.value) return;
3466
+ let e = F(k.value);
3467
+ B = ce().scaleExtent([1, Je.value]).on("start", () => {
3468
+ be = !0, qt();
3365
3469
  }).on("zoom", (e) => {
3366
- re.value && re.value.setAttribute("transform", e.transform);
3470
+ A.value && A.value.setAttribute("transform", e.transform);
3367
3471
  let t = e.transform;
3368
- Ce.value = t.k !== 1 || t.x !== 0 || t.y !== 0;
3472
+ Ee.value = t.k, Q(), Te.value = t.k !== 1 || t.x !== 0 || t.y !== 0, Te.value && (Oe.value = !0);
3369
3473
  }).on("end", () => {
3370
- _e = !1;
3371
- }), V.filter((e) => {
3372
- let t = Z.value.length > 0 && f.focusZoom !== !1, n = !!f.zoom || t, r = !!f.pan || t;
3373
- if (e.type === "wheel" || e.type === "dblclick") {
3374
- if (!n) return !1;
3375
- } else if (e.type === "mousedown" || e.type === "touchstart") {
3376
- if (!r || f.twoFingerPan && e.type === "touchstart" && e.touches.length < 2) return !1;
3377
- } else if (!n && !r) return !1;
3474
+ be = !1;
3475
+ }), B.filter((e) => {
3476
+ if (!p.zoom) return !1;
3477
+ if (!Ae.value) {
3478
+ let t = $.isFullscreen.value;
3479
+ switch (e.type) {
3480
+ case "wheel":
3481
+ if (!t) return !1;
3482
+ break;
3483
+ case "dblclick":
3484
+ if (q()) return !1;
3485
+ break;
3486
+ case "mousedown":
3487
+ if (!t && !V.value) return !1;
3488
+ break;
3489
+ case "touchstart":
3490
+ if (!t && !je.value) return !1;
3491
+ break;
3492
+ }
3493
+ }
3378
3494
  return (!e.ctrlKey || e.type === "wheel") && !e.button;
3379
- }), e.call(V);
3495
+ }), e.call(B);
3380
3496
  }
3381
- function H() {
3382
- A.value && V && (ce(A.value).on(".zoom", null), V = null);
3497
+ function Be() {
3498
+ k.value && B && (F(k.value).on(".zoom", null), B = null);
3383
3499
  }
3384
- function Ne(e) {
3385
- let t = Qe.value, n = Y.value, r = [];
3500
+ function Ve(e) {
3501
+ let t = St.value, n = vt.value, r = [];
3386
3502
  for (let i of e) {
3387
- let e = i.geoType ?? f.geoType, a = t.get(e);
3503
+ let e = i.geoType ?? p.geoType, a = t.get(e);
3388
3504
  if (!a) continue;
3389
3505
  let o = a.get(i.id);
3390
3506
  if (!o) {
@@ -3400,107 +3516,146 @@ var Bt = ["role", "aria-label"], Vt = {
3400
3516
  }
3401
3517
  return r;
3402
3518
  }
3403
- function Pe(e) {
3519
+ function Ue(e) {
3404
3520
  let t = /* @__PURE__ */ new Set();
3405
- for (let n of Ne(e)) n.geoType === f.geoType && t.add(String(n.feature.id));
3521
+ for (let n of Ve(e)) n.geoType === p.geoType && t.add(String(n.feature.id));
3406
3522
  return t;
3407
3523
  }
3408
- let U = !1;
3409
- function W() {
3410
- if (!A.value || !V) return;
3411
- let e = Ne(Z.value), t = e.filter((e) => e.geoType === f.geoType), n = e.filter((e) => e.geoType !== f.geoType), r = /* @__PURE__ */ new Map();
3524
+ let We = !1;
3525
+ function Ge() {
3526
+ if (!k.value || !B) return;
3527
+ let e = Ve(xt.value), t = e.filter((e) => e.geoType === p.geoType), n = e.filter((e) => e.geoType !== p.geoType), r = /* @__PURE__ */ new Map();
3412
3528
  for (let e of t) {
3413
- let t = R.get(String(e.feature.id));
3529
+ let t = L.get(String(e.feature.id));
3414
3530
  t && r.set(t, e.item.style ?? "solid");
3415
3531
  }
3416
- for (let [e] of B) r.has(e) || e === z || bt(e);
3417
- for (let [e, t] of r) B.get(e) === t && e !== z || e !== z && Q(e, t);
3418
- B.clear();
3419
- for (let [e, t] of r) B.set(e, t);
3420
- if (K(n), e.length === 0) {
3421
- U = !0, St();
3532
+ for (let [e] of z) r.has(e) || e === R || Gt(e);
3533
+ for (let [e, t] of r) z.get(e) === t && e !== R || e !== R && Wt(e, t);
3534
+ z.clear();
3535
+ for (let [e, t] of r) z.set(e, t);
3536
+ if (Ke(n), e.length === 0) {
3537
+ We = !0, qt();
3422
3538
  return;
3423
3539
  }
3424
- if (f.focusZoom === !1) {
3425
- U = !0;
3540
+ if (p.focusZoom === !1) {
3541
+ We = !0;
3426
3542
  return;
3427
3543
  }
3428
- let i = ce(A.value);
3544
+ let i = F(k.value);
3429
3545
  i.interrupt();
3430
- let a = U;
3431
- U = !0;
3432
- let [[o, s], [c, l]] = Xe.value.bounds({
3546
+ let a = We;
3547
+ We = !0;
3548
+ let [[o, s], [c, l]] = gt.value.bounds({
3433
3549
  type: "FeatureCollection",
3434
3550
  features: e.map((e) => e.feature)
3435
- }), u = (o + c) / 2, d = (s + l) / 2, p = f.focusZoomLevel, m = se.translate(Re.value / 2 - p * u, ze.value / 2 - p * d).scale(p), h = t[0]?.feature ?? null, g = () => {
3436
- if (!de.value || !h) return;
3437
- let e = String(h.id), t = R.get(e);
3551
+ }), u = (o + c) / 2, d = (s + l) / 2, f = p.focusZoomLevel, m = le.translate(it.value / 2 - f * u, at.value / 2 - f * d).scale(f), h = t[0]?.feature ?? null, g = () => {
3552
+ if (!me.value || !h) return;
3553
+ let e = String(h.id), t = L.get(e);
3438
3554
  if (!t) return;
3439
3555
  let n = t.getBoundingClientRect();
3440
- gt(e, n.left + n.width / 2, n.top + n.height / 2);
3556
+ zt(e, n.left + n.width / 2, n.top + n.height / 2);
3441
3557
  };
3442
- a ? (vt(), i.transition().duration(Sr).call(V.transform, m).on("end", g)) : (V.transform(i, m), g());
3558
+ a ? (Vt(), i.transition().duration(kr).call(B.transform, m).on("end", g)) : (B.transform(i, m), g());
3443
3559
  }
3444
- function K(e) {
3445
- let t = M.value;
3560
+ function Ke(e) {
3561
+ let t = ae.value;
3446
3562
  if (!t) return;
3447
3563
  let n = new Set(e.map((e) => e.key));
3448
- for (let [e, t] of ge) n.has(e) || (t.remove(), ge.delete(e));
3449
- let r = Xe.value, i = J.value + 1.5;
3450
- for (let { item: n, feature: a, key: o } of e) {
3451
- let e = ge.get(o);
3452
- e || (e = document.createElementNS(yr, "path"), e.setAttribute("d", r(a) ?? ""), e.setAttribute("fill", "none"), e.setAttribute("pointer-events", "none"), e.setAttribute("vector-effect", "non-scaling-stroke"), e.setAttribute("stroke-linejoin", "round"), e.setAttribute("class", "focus-overlay"), t.appendChild(e), ge.set(o, e)), e.setAttribute("stroke", n.stroke ?? "#fff"), e.setAttribute("stroke-width", String(i)), yt(e, n.style);
3564
+ for (let [e, t] of ye) n.has(e) || (t.remove(), ye.delete(e));
3565
+ let r = gt.value;
3566
+ for (let { item: n, feature: i, key: a } of e) {
3567
+ let e = ye.get(a);
3568
+ e || (e = document.createElementNS(Tr, "path"), e.setAttribute("d", r(i) ?? ""), e.setAttribute("fill", "none"), e.setAttribute("pointer-events", "none"), e.setAttribute("stroke-linejoin", "round"), e.setAttribute("class", "focus-overlay"), t.appendChild(e), ye.set(a, e)), e.setAttribute("stroke", n.stroke ?? "#fff"), Ht(e, n.style);
3569
+ }
3570
+ }
3571
+ function J() {
3572
+ if (!k.value || !B) return;
3573
+ xt.value.length > 0 && D("update:focus", null);
3574
+ let e = F(k.value);
3575
+ e.interrupt(), Vt();
3576
+ let t = q() && !$.isFullscreen.value && !Ae.value, n = e.transition().duration(kr).call(B.transform, le);
3577
+ t && n.on("end", () => {
3578
+ Oe.value = !1, ke.value = !1;
3579
+ });
3580
+ }
3581
+ let Je = n(() => Math.max(12, p.focusZoomLevel)), Ye = n(() => p.zoom && (q() ? $.isFullscreen.value || Ae.value || !p.touchExpand : !0)), Xe = n(() => p.zoom && !q() && (Ae.value || V.value || $.isFullscreen.value)), Y = n(() => p.zoom && p.zoomHint && !Ae.value && !$.isFullscreen.value && (q() && p.touchExpand || !V.value)), Ze = n(() => q() ? "Tap to zoom" : "Double click to zoom"), X = n(() => {
3582
+ let e = {};
3583
+ return ($.isFullscreen.value || je.value) && (e["touch-action"] = "none"), (V.value || $.isFullscreen.value || p.zoom && Ae.value) && (e["will-change"] = "transform"), Object.keys(e).length ? e : void 0;
3584
+ });
3585
+ function Qe(e) {
3586
+ if (!k.value || !B) return;
3587
+ let t = F(k.value);
3588
+ t.interrupt(), Vt(), t.transition().duration(250).call(B.scaleBy, e);
3589
+ }
3590
+ function $e(e, t) {
3591
+ let n = k.value, r = jr, i = it.value / 2, a = at.value / 2, o = null;
3592
+ try {
3593
+ o = n.getScreenCTM();
3594
+ } catch {
3595
+ o = null;
3596
+ }
3597
+ if (o) {
3598
+ let r = o.inverse(), s = r.a * e + r.c * t + r.e, c = r.b * e + r.d * t + r.f;
3599
+ [i, a] = ue(n).invert([s, c]);
3453
3600
  }
3601
+ return le.translate(it.value / 2 - r * i, at.value / 2 - r * a).scale(r);
3602
+ }
3603
+ function et(e) {
3604
+ if (!k.value || !B) return;
3605
+ let t = F(k.value);
3606
+ t.interrupt(), t.transition().duration(kr).call(B.transform, e);
3454
3607
  }
3455
- function Ie() {
3456
- if (!A.value || !V) return;
3457
- Z.value.length > 0 && D("update:focus", null);
3458
- let e = ce(A.value);
3459
- e.interrupt(), vt(), e.transition().duration(Sr).call(V.transform, se);
3608
+ function tt(e, t) {
3609
+ if (!k.value || !B) return;
3610
+ let n = $e(e, t);
3611
+ $.enter(), f(() => et(n));
3460
3612
  }
3461
- T(() => f.focusZoomLevel, () => {
3462
- V && V.scaleExtent([1, Math.max(12, f.focusZoomLevel)]), W();
3463
- }), T(() => f.state, () => {
3464
- if (!A.value || !V) return;
3465
- let e = ce(A.value);
3466
- e.interrupt(), V.transform(e, se);
3613
+ function nt(e, t) {
3614
+ !k.value || !B || et($e(e, t));
3615
+ }
3616
+ T(() => p.focusZoomLevel, () => {
3617
+ B && B.scaleExtent([1, Je.value]), Ge();
3618
+ }), T(() => p.state, () => {
3619
+ if (!k.value || !B) return;
3620
+ let e = F(k.value);
3621
+ e.interrupt(), B.transform(e, le);
3467
3622
  });
3468
- let Le = n(() => f.width && f.height ? f.height / f.width : .625), Re = n(() => Cr), ze = n(() => Cr * Le.value), Ve = n(() => {
3469
- let e = S(f.topology), t = e?.objects?.states;
3623
+ let rt = n(() => p.width && p.height ? p.height / p.width : .625), it = n(() => Mr), at = n(() => Mr * rt.value), ot = n(() => {
3624
+ let e = x(p.topology), t = e?.objects?.states;
3470
3625
  if (!t) return [];
3471
- let n = le(e, t);
3626
+ let n = de(e, t);
3472
3627
  return n.type === "FeatureCollection" ? n.features : [n];
3473
- }), He = n(() => {
3474
- let e = f.state?.trim();
3628
+ }), st = n(() => {
3629
+ let e = p.state?.trim();
3475
3630
  if (!e) return null;
3476
3631
  if (/^\d{1,2}$/.test(e)) return e.padStart(2, "0");
3477
- let t = Ve.value.find((t) => t.properties?.name === e);
3632
+ let t = ot.value.find((t) => t.properties?.name === e);
3478
3633
  return t?.id == null ? null : String(t.id).padStart(2, "0");
3479
- }), Ue = n(() => {
3480
- let e = He.value;
3481
- return e ? Ve.value.find((t) => String(t.id).padStart(2, "0") === e) ?? null : null;
3634
+ }), ct = n(() => {
3635
+ let e = st.value;
3636
+ return e ? ot.value.find((t) => String(t.id).padStart(2, "0") === e) ?? null : null;
3482
3637
  });
3483
- T(() => [f.state, He.value], ([e, t]) => {
3638
+ T(() => [p.state, st.value], ([e, t]) => {
3484
3639
  e && e.trim() && !t && console.warn(`[ChoroplethMap] state="${e}" matched no state name or FIPS code; rendering the full map.`);
3485
3640
  }, { immediate: !0 });
3486
- let We = v(null), Ge = null;
3487
- function Ke() {
3488
- return Ge ||= import("./hsaMapping-BahYDmea.js").then((e) => e.n).then((e) => (We.value = e, e)), Ge;
3641
+ let lt = v(null), ut = null;
3642
+ function dt() {
3643
+ return ut ||= import("./hsaMapping-BahYDmea.js").then((e) => e.n).then((e) => (lt.value = e, e)), ut;
3489
3644
  }
3490
3645
  T(() => {
3491
- if (f.geoType === "hsas" || f.dataGeoType === "hsas") return !0;
3492
- let e = f.focus;
3646
+ if (p.geoType === "hsas" || p.dataGeoType === "hsas") return !0;
3647
+ let e = p.focus;
3493
3648
  return e ? (Array.isArray(e) ? e : [e]).some((e) => typeof e != "string" && e.geoType === "hsas") : !1;
3494
3649
  }, (e) => {
3495
- e && Ke();
3650
+ e && dt();
3496
3651
  }, { immediate: !0 });
3497
- let qe = n(() => {
3498
- let e = We.value;
3652
+ let ft = n(() => {
3653
+ let e = lt.value;
3499
3654
  if (!e) return {
3500
3655
  type: "FeatureCollection",
3501
3656
  features: []
3502
3657
  };
3503
- let { fipsToHsa: t, hsaNames: n } = e, r = S(f.topology), i = r.objects.counties.geometries, a = He.value, o = /* @__PURE__ */ new Map();
3658
+ let { fipsToHsa: t, hsaNames: n } = e, r = x(p.topology), i = r.objects.counties.geometries, a = st.value, o = /* @__PURE__ */ new Map();
3504
3659
  for (let e of i) {
3505
3660
  let n = String(e.id).padStart(5, "0");
3506
3661
  if (a && n.slice(0, 2) !== a) continue;
@@ -3512,65 +3667,65 @@ var Bt = ["role", "aria-label"], Vt = {
3512
3667
  type: "Feature",
3513
3668
  id: e,
3514
3669
  properties: { name: n[e] ?? e },
3515
- geometry: I(r, t)
3670
+ geometry: fe(r, t)
3516
3671
  });
3517
3672
  return {
3518
3673
  type: "FeatureCollection",
3519
3674
  features: s
3520
3675
  };
3521
- }), Je = n(() => {
3522
- if (f.geoType === "hsas") return qe.value;
3523
- let e = He.value;
3524
- if (f.geoType === "counties") {
3525
- let t = S(f.topology), n = le(t, t.objects.counties);
3676
+ }), pt = n(() => {
3677
+ if (p.geoType === "hsas") return ft.value;
3678
+ let e = st.value;
3679
+ if (p.geoType === "counties") {
3680
+ let t = x(p.topology), n = de(t, t.objects.counties);
3526
3681
  return e ? {
3527
3682
  type: "FeatureCollection",
3528
3683
  features: n.features.filter((t) => String(t.id).padStart(5, "0").slice(0, 2) === e)
3529
3684
  } : n;
3530
3685
  }
3531
- let t = S(f.topology), n = le(t, t.objects.states);
3686
+ let t = x(p.topology), n = de(t, t.objects.states);
3532
3687
  return e ? {
3533
3688
  type: "FeatureCollection",
3534
3689
  features: n.features.filter((t) => String(t.id).padStart(2, "0") === e)
3535
3690
  } : n;
3536
- }), Ye = n(() => {
3537
- if (f.geoType !== "counties" && f.geoType !== "hsas") return null;
3538
- if (He.value) return Ue.value;
3539
- let e = S(f.topology);
3540
- return ue(e, e.objects.states, (e, t) => e !== t);
3541
- }), q = n(() => {
3542
- let e = Ue.value;
3543
- if (He.value && e) {
3544
- let t = [[wr, wr], [Re.value - wr, ze.value - wr]], n = ae().fitExtent(t, e), r = oe(n).centroid(e);
3545
- return Number.isFinite(r[0]) && Number.isFinite(r[1]) ? n : P().fitExtent(t, e);
3691
+ }), mt = n(() => {
3692
+ if (p.geoType !== "counties" && p.geoType !== "hsas") return null;
3693
+ if (st.value) return ct.value;
3694
+ let e = x(p.topology);
3695
+ return pe(e, e.objects.states, (e, t) => e !== t);
3696
+ }), ht = n(() => {
3697
+ let e = ct.value;
3698
+ if (st.value && e) {
3699
+ let t = [[Nr, Nr], [it.value - Nr, at.value - Nr]], n = N().fitExtent(t, e), r = P(n).centroid(e);
3700
+ return Number.isFinite(r[0]) && Number.isFinite(r[1]) ? n : se().fitExtent(t, e);
3546
3701
  }
3547
- return ae().fitExtent([[0, 0], [Re.value, ze.value]], Je.value);
3548
- }), Xe = n(() => oe(q.value)), J = n(() => f.geoType === "counties" || f.geoType === "hsas" ? f.strokeWidth * .5 : f.strokeWidth), Y = n(() => {
3702
+ return N().fitExtent([[0, 0], [it.value, at.value]], pt.value);
3703
+ }), gt = n(() => P(ht.value)), _t = n(() => p.geoType === "counties" || p.geoType === "hsas" ? p.strokeWidth * .5 : p.strokeWidth), vt = n(() => {
3549
3704
  let e = /* @__PURE__ */ new Map();
3550
- for (let [t, n] of Qe.value) {
3705
+ for (let [t, n] of St.value) {
3551
3706
  let r = /* @__PURE__ */ new Map();
3552
3707
  for (let [e, t] of n) t.properties?.name != null && r.set(t.properties.name, e);
3553
3708
  e.set(t, r);
3554
3709
  }
3555
3710
  return e;
3556
3711
  });
3557
- function Ze(e) {
3558
- let t = f.dataGeoType;
3559
- if (!t || t === f.geoType) return e;
3560
- if (f.geoType === "counties" && t === "hsas") return We.value?.fipsToHsa[e];
3561
- if (f.geoType === "counties" && t === "states" || f.geoType === "hsas" && t === "states") return e.slice(0, 2);
3712
+ function yt(e) {
3713
+ let t = p.dataGeoType;
3714
+ if (!t || t === p.geoType) return e;
3715
+ if (p.geoType === "counties" && t === "hsas") return lt.value?.fipsToHsa[e];
3716
+ if (p.geoType === "counties" && t === "states" || p.geoType === "hsas" && t === "states") return e.slice(0, 2);
3562
3717
  }
3563
- let X = n(() => {
3718
+ let bt = n(() => {
3564
3719
  let e = /* @__PURE__ */ new Map();
3565
- for (let t of Je.value.features) t.id != null && e.set(String(t.id), t);
3720
+ for (let t of pt.value.features) t.id != null && e.set(String(t.id), t);
3566
3721
  return e;
3567
- }), Z = n(() => {
3568
- let e = f.focus;
3722
+ }), xt = n(() => {
3723
+ let e = p.focus;
3569
3724
  return e == null ? [] : (Array.isArray(e) ? e : [e]).map((e) => typeof e == "string" ? { id: e } : e);
3570
- }), Qe = n(() => {
3725
+ }), St = n(() => {
3571
3726
  let e = /* @__PURE__ */ new Map();
3572
- e.set(f.geoType, X.value);
3573
- let t = S(f.topology), n = t?.objects;
3727
+ e.set(p.geoType, bt.value);
3728
+ let t = x(p.topology), n = t?.objects;
3574
3729
  if (!n) return e;
3575
3730
  let r = (e) => {
3576
3731
  let t = /* @__PURE__ */ new Map();
@@ -3578,31 +3733,31 @@ var Bt = ["role", "aria-label"], Vt = {
3578
3733
  return t;
3579
3734
  };
3580
3735
  if (!e.has("states") && n.states) {
3581
- let i = le(t, n.states);
3736
+ let i = de(t, n.states);
3582
3737
  e.set("states", r(i.features));
3583
3738
  }
3584
3739
  if (!e.has("counties") && n.counties) {
3585
- let i = le(t, n.counties);
3740
+ let i = de(t, n.counties);
3586
3741
  e.set("counties", r(i.features));
3587
3742
  }
3588
- return !e.has("hsas") && n.counties && e.set("hsas", r(qe.value.features)), e;
3589
- }), $e = n(() => {
3743
+ return !e.has("hsas") && n.counties && e.set("hsas", r(ft.value.features)), e;
3744
+ }), wt = n(() => {
3590
3745
  let e = /* @__PURE__ */ new Map();
3591
- if (!f.data) return e;
3592
- let t = f.dataGeoType ?? f.geoType, n = Y.value.get(t);
3593
- for (let t of f.data) {
3746
+ if (!p.data) return e;
3747
+ let t = p.dataGeoType ?? p.geoType, n = vt.value.get(t);
3748
+ for (let t of p.data) {
3594
3749
  e.set(t.id, t.value);
3595
3750
  let r = n?.get(t.id);
3596
3751
  r && e.set(r, t.value);
3597
3752
  }
3598
3753
  return e;
3599
- }), et = n(() => {
3600
- if (!f.data || f.data.length === 0) return {
3754
+ }), Tt = n(() => {
3755
+ if (!p.data || p.data.length === 0) return {
3601
3756
  min: 0,
3602
3757
  max: 1
3603
3758
  };
3604
3759
  let e = Infinity, t = -Infinity;
3605
- for (let n of f.data) typeof n.value == "number" && (n.value < e && (e = n.value), n.value > t && (t = n.value));
3760
+ for (let n of p.data) typeof n.value == "number" && (n.value < e && (e = n.value), n.value > t && (t = n.value));
3606
3761
  return isFinite(e) ? e === t ? {
3607
3762
  min: e,
3608
3763
  max: e + 1
@@ -3613,365 +3768,403 @@ var Bt = ["role", "aria-label"], Vt = {
3613
3768
  min: 0,
3614
3769
  max: 1
3615
3770
  };
3616
- }), tt = n(() => Array.isArray(f.colorScale) && f.colorScale.length > 0 && "value" in f.colorScale[0]), nt = n(() => Array.isArray(f.colorScale) && !tt.value), rt = n(() => nt.value ? "" : f.colorScale?.min ?? "#e5f0fa"), it = n(() => nt.value ? "" : f.colorScale?.max ?? "#08519c");
3617
- function at(e) {
3618
- let t = e.replace("#", "");
3619
- return [
3620
- parseInt(t.slice(0, 2), 16),
3621
- parseInt(t.slice(2, 4), 16),
3622
- parseInt(t.slice(4, 6), 16)
3771
+ }), Et = n(() => Array.isArray(p.colorScale) && p.colorScale.length > 0 && "value" in p.colorScale[0]), Z = n(() => Array.isArray(p.colorScale) && !Et.value), Dt = n(() => Z.value ? "" : p.colorScale?.min ?? "#e5f0fa"), Ot = n(() => Z.value ? "" : p.colorScale?.max ?? "#08519c");
3772
+ function kt(e) {
3773
+ let [t, n, r] = Ct(Dt.value) ?? [
3774
+ 229,
3775
+ 240,
3776
+ 250
3777
+ ], [i, a, o] = Ct(Ot.value) ?? [
3778
+ 8,
3779
+ 81,
3780
+ 156
3623
3781
  ];
3624
- }
3625
- function ot(e) {
3626
- let [t, n, r] = at(rt.value), [i, a, o] = at(it.value);
3627
3782
  return `rgb(${Math.round(t + (i - t) * e)},${Math.round(n + (a - n) * e)},${Math.round(r + (o - r) * e)})`;
3628
3783
  }
3629
- let st = n(() => nt.value ? f.colorScale.slice().sort((e, t) => t.min - e.min) : null), ct = n(() => {
3630
- if (!tt.value) return null;
3784
+ let At = n(() => Z.value ? p.colorScale.slice().sort((e, t) => t.min - e.min) : null), jt = n(() => {
3785
+ if (!Et.value) return null;
3631
3786
  let e = /* @__PURE__ */ new Map();
3632
- for (let t of f.colorScale) e.set(t.value, t.color);
3787
+ for (let t of p.colorScale) e.set(t.value, t.color);
3633
3788
  return e;
3634
3789
  });
3635
- function lt(e) {
3636
- let t = Ze(e);
3637
- return t == null ? void 0 : $e.value.get(t);
3790
+ function Mt(e) {
3791
+ let t = yt(e);
3792
+ return t == null ? void 0 : wt.value.get(t);
3638
3793
  }
3639
- function ut(e) {
3640
- let t = lt(e), n = f.noDataColor;
3794
+ function Nt(e) {
3795
+ let t = Mt(e), n = p.noDataColor;
3641
3796
  if (t == null) return n;
3642
- let r = ct.value;
3797
+ let r = jt.value;
3643
3798
  if (r) return r.get(String(t)) ?? n;
3644
- let i = st.value;
3799
+ let i = At.value;
3645
3800
  if (i) {
3646
3801
  let e = t;
3647
3802
  for (let t of i) if (e >= t.min) return t.color;
3648
3803
  return n;
3649
3804
  }
3650
- let { min: a, max: o } = et.value;
3651
- return ot((t - a) / (o - a));
3805
+ let { min: a, max: o } = Tt.value;
3806
+ return kt((t - a) / (o - a));
3652
3807
  }
3653
- let dt = (e) => e.properties?.name ?? String(e.id);
3654
- function ft(e) {
3655
- return e == null ? "" : typeof e == "number" && f.tooltipValueFormat !== void 0 ? ne(e, f.tooltipValueFormat) : String(e);
3808
+ let Pt = (e) => e.properties?.name ?? String(e.id);
3809
+ function Ft(e) {
3810
+ return e == null ? "" : typeof e == "number" && p.tooltipValueFormat !== void 0 ? re(e, p.tooltipValueFormat) : String(e);
3656
3811
  }
3657
- function pt(e, t) {
3658
- return t == null ? e : `${e}: ${ft(t)}`;
3812
+ function It(e, t) {
3813
+ return t == null ? e : `${e}: ${Ft(t)}`;
3659
3814
  }
3660
- function mt() {
3661
- let e = N.value?.getEl();
3815
+ function Lt() {
3816
+ let e = M.value?.getEl();
3662
3817
  if (!e) return;
3663
- ye?.disconnect();
3818
+ xe?.disconnect();
3664
3819
  let t = !1;
3665
- ye = new ResizeObserver((e) => {
3820
+ xe = new ResizeObserver((e) => {
3666
3821
  let n = e[0]?.contentRect;
3667
- n && (be.width = n.width, be.height = n.height, !t && Se && xe ? (t = !0, ht(xe.x, xe.y)) : t = !0);
3668
- }), ye.observe(e);
3822
+ n && (Se.width = n.width, Se.height = n.height, !t && we && Ce ? (t = !0, Rt(Ce.x, Ce.y)) : t = !0);
3823
+ }), xe.observe(e);
3669
3824
  }
3670
- function ht(e, t) {
3671
- let n = N.value?.getEl();
3825
+ function Rt(e, t) {
3826
+ let n = M.value?.getEl();
3672
3827
  if (!n) return;
3673
- let r = k.value?.getBoundingClientRect(), { left: i, top: a } = je(e, t, be.width, be.height, f.tooltipClamp, r);
3828
+ let r = ie.value?.getBoundingClientRect(), { left: i, top: a } = H(e, t, Se.width, Se.height, p.tooltipClamp, r);
3674
3829
  n.style.transform = `translate3d(${i}px, ${a}px, 0) translateY(-50%)`;
3675
3830
  }
3676
- function gt(e, t, n) {
3677
- let r = me.get(e);
3831
+ function zt(e, t, n) {
3832
+ let r = _e.get(e);
3678
3833
  if (!r) return;
3679
- let i = N.value, a = i?.getEl();
3680
- !i || !a || (i.setData(r), xe = {
3834
+ let i = M.value, a = i?.getEl();
3835
+ !i || !a || (i.setData(r), Ce = {
3681
3836
  x: t,
3682
3837
  y: n
3683
- }, Se = !0, ht(t, n), a.style.visibility = "visible");
3838
+ }, we = !0, Rt(t, n), a.style.visibility = "visible");
3684
3839
  }
3685
- function _t(e, t) {
3686
- Se && (we = e, Te = t, !Ee && (Ee = requestAnimationFrame(() => {
3687
- Ee = 0;
3688
- let e = N.value?.getEl();
3689
- !e || !Se || (xe = {
3690
- x: we,
3691
- y: Te
3692
- }, e.style.transform = `translate3d(${we + 16}px, ${Te}px, 0) translateY(-50%)`);
3840
+ function Bt(e, t) {
3841
+ we && (Me = e, Ne = t, !Pe && (Pe = requestAnimationFrame(() => {
3842
+ Pe = 0;
3843
+ let e = M.value?.getEl();
3844
+ !e || !we || (Ce = {
3845
+ x: Me,
3846
+ y: Ne
3847
+ }, e.style.transform = `translate3d(${Me + 16}px, ${Ne}px, 0) translateY(-50%)`);
3693
3848
  })));
3694
3849
  }
3695
- function vt() {
3696
- if (!Se) return;
3697
- Se = !1, xe = null;
3698
- let e = N.value?.getEl();
3850
+ function Vt() {
3851
+ if (!we) return;
3852
+ we = !1, Ce = null;
3853
+ let e = M.value?.getEl();
3699
3854
  e && (e.style.visibility = "hidden");
3700
3855
  }
3701
- function yt(e, t) {
3856
+ function Ht(e, t) {
3702
3857
  t === "dashed" ? (e.setAttribute("stroke-dasharray", "8 4"), e.removeAttribute("stroke-linecap")) : t === "dotted" ? (e.setAttribute("stroke-dasharray", "0 5"), e.setAttribute("stroke-linecap", "round")) : (e.removeAttribute("stroke-dasharray"), e.removeAttribute("stroke-linecap"));
3703
3858
  }
3704
- function Q(e, t = "solid") {
3705
- e.parentNode?.appendChild(e), e.setAttribute("stroke-width", String(J.value + 1)), e.setAttribute("stroke", "#555"), yt(e, t);
3859
+ function Ut() {
3860
+ return Ee.value * De.value || 1;
3706
3861
  }
3707
- function bt(e) {
3708
- e.setAttribute("stroke-width", String(J.value)), e.setAttribute("stroke", f.strokeColor), e.removeAttribute("stroke-dasharray"), e.removeAttribute("stroke-linecap");
3862
+ function Q() {
3863
+ let e = Ut(), t = _t.value;
3864
+ j.value?.setAttribute("stroke-width", String(t / e)), ve?.setAttribute("stroke-width", String(1 / e)), ae.value?.setAttribute("stroke-width", String((t + 1.5) / e));
3865
+ let n = String((t + 1) / e);
3866
+ for (let [e] of z) e.setAttribute("stroke-width", n);
3867
+ R && R.setAttribute("stroke-width", n);
3709
3868
  }
3710
- function xt(e) {
3711
- z !== e && (z && !B.has(z) && bt(z), z = e, Q(e, B.get(e) ?? "solid"));
3869
+ function Wt(e, t = "solid") {
3870
+ e.parentNode?.appendChild(e), e.setAttribute("stroke-width", String((_t.value + 1) / Ut())), e.setAttribute("stroke", "#555"), Ht(e, t);
3712
3871
  }
3713
- function St() {
3714
- if (z) {
3715
- let e = B.get(z);
3716
- e == null ? bt(z) : Q(z, e), z = null, D("stateHover", null);
3872
+ function Gt(e) {
3873
+ e.removeAttribute("stroke-width"), e.setAttribute("stroke", p.strokeColor), e.removeAttribute("stroke-dasharray"), e.removeAttribute("stroke-linecap");
3874
+ }
3875
+ function Kt(e) {
3876
+ R !== e && (R && !z.has(R) && Gt(R), R = e, Wt(e, z.get(e) ?? "solid"));
3877
+ }
3878
+ function qt() {
3879
+ if (R) {
3880
+ let e = z.get(R);
3881
+ e == null ? Gt(R) : Wt(R, e), R = null, D("stateHover", null);
3717
3882
  }
3718
- vt();
3883
+ Vt();
3719
3884
  }
3720
- function Ct(e) {
3885
+ function Jt(e) {
3721
3886
  let t = e;
3722
3887
  for (; t && !t.dataset?.featId;) t = t.parentElement;
3723
3888
  return t ? t.dataset.featId ?? null : null;
3724
3889
  }
3725
- function wt(e) {
3726
- D("stateClick", {
3890
+ function Yt(e) {
3891
+ p.zoom && (ke.value = !0), D("stateClick", {
3727
3892
  id: e.id,
3728
3893
  name: e.name,
3729
3894
  value: e.value
3730
- }), D("update:focus", Pe(Z.value).has(e.id) ? null : e.id);
3895
+ }), D("update:focus", Ue(xt.value).has(e.id) ? null : e.id);
3731
3896
  }
3732
- function Tt(e) {
3733
- if (_e) return;
3734
- let t = e, n = Ct(t.target);
3897
+ function Xt(e) {
3898
+ if (be) return;
3899
+ let t = e, n = Jt(t.target);
3735
3900
  if (!n) return;
3736
- let r = me.get(n);
3901
+ let r = _e.get(n);
3737
3902
  if (!r) return;
3738
3903
  let i = {
3739
3904
  id: r.id,
3740
3905
  name: r.name,
3741
3906
  value: r.value
3742
3907
  };
3743
- e.type === "click" ? wt(r) : e.type === "mouseover" && (xt(R.get(n)), de.value && gt(n, t.clientX, t.clientY), D("stateHover", i));
3908
+ e.type === "click" ? p.zoom ? (window.clearTimeout(W), W = 0, t.detail <= 1 && (W = window.setTimeout(() => {
3909
+ W = 0, Yt(r);
3910
+ }, Or))) : Yt(r) : e.type === "mouseover" && (Kt(L.get(n)), me.value && zt(n, t.clientX, t.clientY), D("stateHover", i));
3744
3911
  }
3745
- function Et(e) {
3746
- _e || _t(e.clientX, e.clientY);
3912
+ function Zt(e) {
3913
+ be || Bt(e.clientX, e.clientY);
3747
3914
  }
3748
- function Dt(e) {
3915
+ function Qt(e) {
3749
3916
  let t = e.relatedTarget;
3750
- t && re.value?.contains(t) || St();
3917
+ t && A.value?.contains(t) || qt();
3751
3918
  }
3752
- function Ot(e) {
3919
+ function $t(e) {
3753
3920
  if (e.touches.length !== 1) {
3754
- De = null;
3921
+ U = null;
3755
3922
  return;
3756
3923
  }
3757
3924
  let t = e.touches[0];
3758
- De = {
3925
+ U = {
3759
3926
  x: t.clientX,
3760
3927
  y: t.clientY,
3761
3928
  time: e.timeStamp,
3762
- featId: Ct(e.target)
3929
+ featId: Jt(e.target)
3763
3930
  };
3764
3931
  }
3765
- function kt(e) {
3766
- let t = De;
3767
- if (De = null, !t || !t.featId || e.touches.length > 0) return;
3932
+ function en(e) {
3933
+ let t = U;
3934
+ if (U = null, !t || e.touches.length > 0) return;
3768
3935
  let n = e.changedTouches[0];
3769
- if (!n || Math.abs(n.clientX - t.x) > br || Math.abs(n.clientY - t.y) > br || e.timeStamp - t.time > xr) return;
3770
- let r = me.get(t.featId);
3771
- r && (e.preventDefault(), wt(r));
3936
+ if (!n || Math.abs(n.clientX - t.x) > Er || Math.abs(n.clientY - t.y) > Er || e.timeStamp - t.time > Dr) return;
3937
+ if (p.zoom && !Ae.value && q() && !$.isFullscreen.value) {
3938
+ if (p.touchExpand) {
3939
+ e.preventDefault(), tt(n.clientX, n.clientY);
3940
+ return;
3941
+ }
3942
+ if (!V.value) {
3943
+ e.preventDefault(), nt(n.clientX, n.clientY);
3944
+ return;
3945
+ }
3946
+ }
3947
+ if (!t.featId) return;
3948
+ let r = _e.get(t.featId);
3949
+ r && (e.preventDefault(), Yt(r));
3772
3950
  }
3773
- function At() {
3774
- De = null;
3951
+ function tn() {
3952
+ U = null;
3775
3953
  }
3776
- function jt(e) {
3777
- let t = document.createElementNS(yr, "path");
3954
+ function nn(e) {
3955
+ let t = document.createElementNS(Tr, "path");
3778
3956
  return e && t.setAttribute("d", e), t;
3779
3957
  }
3780
- function Mt() {
3781
- let e = j.value, t = M.value;
3958
+ function rn() {
3959
+ let e = j.value, t = ae.value;
3782
3960
  if (!e || !t) return;
3783
3961
  for (; e.firstChild;) e.removeChild(e.firstChild);
3784
3962
  for (; t.firstChild;) t.removeChild(t.firstChild);
3785
- R.clear(), me.clear(), he = null, z = null, B.clear(), ge.clear();
3786
- let n = Xe.value, r = Je.value.features, i = f.strokeColor, a = String(J.value), o = !de.value, s = document.createDocumentFragment();
3963
+ L.clear(), _e.clear(), ve = null, R = null, z.clear(), ye.clear();
3964
+ let n = gt.value, r = pt.value.features;
3965
+ if (r.length === 0) return;
3966
+ let i = p.strokeColor, a = !me.value, o = document.createDocumentFragment();
3787
3967
  for (let e of r) {
3788
- let t = String(e.id), r = dt(e), c = lt(t), l = jt(n(e));
3789
- if (l.setAttribute("class", "state-path"), l.setAttribute("data-feat-id", t), l.setAttribute("fill", ut(t)), l.setAttribute("stroke", i), l.setAttribute("stroke-width", a), l.setAttribute("vector-effect", "non-scaling-stroke"), o) {
3790
- let e = document.createElementNS(yr, "title");
3791
- e.textContent = pt(r, c), l.appendChild(e);
3968
+ let t = String(e.id), r = Pt(e), s = Mt(t), c = nn(n(e));
3969
+ if (c.setAttribute("class", "state-path"), c.setAttribute("data-feat-id", t), c.setAttribute("fill", Nt(t)), c.setAttribute("stroke", i), a) {
3970
+ let e = document.createElementNS(Tr, "title");
3971
+ e.textContent = It(r, s), c.appendChild(e);
3792
3972
  }
3793
- s.appendChild(l), R.set(t, l), me.set(t, {
3973
+ o.appendChild(c), L.set(t, c), _e.set(t, {
3794
3974
  id: t,
3795
3975
  name: r,
3796
- value: c,
3976
+ value: s,
3797
3977
  feature: e
3798
3978
  });
3799
3979
  }
3800
- let c = Ye.value;
3801
- if (c) {
3802
- let e = jt(n(c));
3803
- e.setAttribute("fill", "none"), e.setAttribute("stroke", i), e.setAttribute("stroke-width", "1"), e.setAttribute("stroke-linejoin", "round"), e.setAttribute("pointer-events", "none"), e.setAttribute("vector-effect", "non-scaling-stroke"), s.appendChild(e), he = e;
3980
+ let s = mt.value;
3981
+ if (s) {
3982
+ let e = nn(n(s));
3983
+ e.setAttribute("fill", "none"), e.setAttribute("stroke", i), e.setAttribute("stroke-linejoin", "round"), e.setAttribute("pointer-events", "none"), o.appendChild(e), ve = e;
3804
3984
  }
3805
- e.appendChild(s);
3985
+ e.appendChild(o), Q();
3806
3986
  }
3807
- function Nt() {
3808
- let e = !de.value;
3809
- for (let [t, n] of R) {
3810
- let r = lt(t), i = me.get(t);
3811
- if (n.setAttribute("fill", ut(t)), i && (i.value = r), e && i) {
3987
+ function an() {
3988
+ let e = !me.value;
3989
+ for (let [t, n] of L) {
3990
+ let r = Mt(t), i = _e.get(t);
3991
+ if (n.setAttribute("fill", Nt(t)), i && (i.value = r), e && i) {
3812
3992
  let e = n.firstElementChild;
3813
- e && (e.textContent = pt(i.name, r));
3993
+ e && (e.textContent = It(i.name, r));
3814
3994
  }
3815
3995
  }
3816
3996
  }
3817
- function Pt() {
3818
- for (let e of R.values()) e === z || B.has(e) || bt(e);
3819
- he && he.setAttribute("stroke", f.strokeColor);
3997
+ function on() {
3998
+ for (let e of L.values()) e === R || z.has(e) || Gt(e);
3999
+ ve && ve.setAttribute("stroke", p.strokeColor), Q();
3820
4000
  }
3821
- function Ft() {
3822
- return typeof f.menu == "string" ? f.menu : "choropleth";
4001
+ function sn() {
4002
+ return typeof p.menu == "string" ? p.menu : "choropleth";
3823
4003
  }
3824
- let $ = n(() => f.legend && (tt.value || nt.value || f.data)), It = n(() => f.colorScale.slice().sort((e, t) => e.min - t.min)), Lt = n(() => {
4004
+ let cn = n(() => p.legend && (Et.value || Z.value || p.data)), ln = n(() => p.colorScale.slice().sort((e, t) => e.min - t.min)), un = n(() => {
3825
4005
  let e = [];
3826
4006
  for (let t = 0; t <= 10; t++) {
3827
4007
  let n = t / 10;
3828
4008
  e.push({
3829
4009
  offset: `${(n * 100).toFixed(0)}%`,
3830
- color: ot(n)
4010
+ color: kt(n)
3831
4011
  });
3832
4012
  }
3833
4013
  return e;
3834
- }), Rt = new Intl.NumberFormat("en-US", {
4014
+ }), dn = new Intl.NumberFormat("en-US", {
3835
4015
  notation: "compact",
3836
4016
  maximumFractionDigits: 1
3837
- }), zt = n(() => {
3838
- let { min: e, max: t } = et.value, n = t - e, r = [];
4017
+ }), fn = n(() => {
4018
+ let { min: e, max: t } = Tt.value, n = t - e, r = [];
3839
4019
  for (let t = 1; t <= 3; t++) {
3840
- let i = t / 4, a = e + n * i, o = Math.abs(a) >= 1e3 ? Rt.format(a) : Number.isInteger(a) ? String(a) : a.toFixed(1).replace(/\.0$/, "");
4020
+ let i = t / 4, a = e + n * i, o = Math.abs(a) >= 1e3 ? dn.format(a) : Number.isInteger(a) ? String(a) : a.toFixed(1).replace(/\.0$/, "");
3841
4021
  r.push({
3842
4022
  value: o,
3843
4023
  pct: i * 100
3844
4024
  });
3845
4025
  }
3846
4026
  return r;
3847
- }), Bt = n(() => {
4027
+ }), pn = n(() => {
3848
4028
  let e = [];
3849
- if (tt.value) for (let t of f.colorScale) e.push({
4029
+ if (Et.value) for (let t of p.colorScale) e.push({
3850
4030
  key: t.value,
3851
4031
  color: t.color,
3852
4032
  label: t.value
3853
4033
  });
3854
- else if (nt.value) for (let t of It.value) e.push({
4034
+ else if (Z.value) for (let t of ln.value) e.push({
3855
4035
  key: String(t.min),
3856
4036
  color: t.color,
3857
4037
  label: t.label ?? String(t.min)
3858
4038
  });
3859
4039
  return e;
3860
- }), Vt = n(() => `linear-gradient(to right, ${Lt.value.map((e) => `${e.color} ${e.offset}`).join(", ")})`), Ht = Be({ target: () => f.fullscreenTarget }), Ut = n(() => {
3861
- let e = Ft();
4040
+ }), mn = n(() => `linear-gradient(to right, ${un.value.map((e) => `${e.color} ${e.offset}`).join(", ")})`), $ = He({ target: () => p.fullscreenTarget }), hn = n(() => {
4041
+ let e = sn();
3862
4042
  return [
3863
- Ht.menuItem.value,
4043
+ $.menuItem.value,
3864
4044
  {
3865
4045
  label: "Save as SVG",
3866
4046
  action: () => {
3867
- A.value && Fe(A.value, e);
4047
+ k.value && K(k.value, e);
3868
4048
  }
3869
4049
  },
3870
4050
  {
3871
4051
  label: "Save as PNG",
3872
4052
  action: () => {
3873
- A.value && G(A.value, e);
4053
+ k.value && Ie(k.value, e);
3874
4054
  }
3875
4055
  }
3876
4056
  ];
3877
4057
  });
3878
4058
  return T(() => [
3879
- Je.value,
3880
- Xe.value,
3881
- de.value
3882
- ], () => Mt()), T(() => [
3883
- $e.value,
3884
- f.colorScale,
3885
- f.noDataColor,
3886
- f.dataGeoType
3887
- ], () => Nt()), T(() => [f.strokeColor, J.value], () => Pt()), T(() => [
3888
- Z.value,
3889
- Xe.value,
3890
- We.value
3891
- ], () => W(), { flush: "post" }), (n, l) => (_(), r(t, {
3892
- to: C(Ht).teleportTarget.value,
3893
- disabled: !C(Ht).isFullscreen.value
4059
+ pt.value,
4060
+ gt.value,
4061
+ me.value
4062
+ ], () => rn()), T(() => [
4063
+ wt.value,
4064
+ p.colorScale,
4065
+ p.noDataColor,
4066
+ p.dataGeoType
4067
+ ], () => an()), T(() => [p.strokeColor, _t.value], () => on()), T(() => [
4068
+ xt.value,
4069
+ gt.value,
4070
+ lt.value
4071
+ ], () => Ge(), { flush: "post" }), T(() => $.isFullscreen.value, (e) => {
4072
+ if (e || !q() || !k.value || !B) return;
4073
+ let t = F(k.value);
4074
+ t.interrupt(), B.transform(t, le);
4075
+ }), (n, l) => (_(), r(t, {
4076
+ to: S($).teleportTarget.value,
4077
+ disabled: !S($).isFullscreen.value
3894
4078
  }, [o("div", d({
3895
4079
  ref_key: "containerRef",
3896
- ref: k
4080
+ ref: ie
3897
4081
  }, n.$attrs, {
3898
4082
  class: ["choropleth-wrapper", {
3899
- pannable: c.pan,
3900
- "is-fullscreen": C(Ht).isFullscreen.value
4083
+ pannable: Xe.value,
4084
+ "is-fullscreen": S($).isFullscreen.value
3901
4085
  }],
3902
- style: C(Ht).fullscreenStyle.value,
4086
+ style: S($).fullscreenStyle.value,
3903
4087
  role: w.value || void 0,
3904
- "aria-label": ee.value || void 0
4088
+ "aria-label": ne.value || void 0
3905
4089
  }), [
3906
- c.menu ? (_(), r(pe, {
4090
+ c.menu || S($).isFullscreen.value ? (_(), r(ge, {
3907
4091
  key: 0,
3908
- items: Ut.value,
3909
- "is-fullscreen": C(Ht).isFullscreen.value,
3910
- onClose: C(Ht).exit
4092
+ items: hn.value,
4093
+ "is-fullscreen": S($).isFullscreen.value,
4094
+ onClose: S($).exit
3911
4095
  }, null, 8, [
3912
4096
  "items",
3913
4097
  "is-fullscreen",
3914
4098
  "onClose"
3915
4099
  ])) : i("", !0),
3916
- o("div", fr, x(C(Ht).isFullscreen.value ? "Map expanded to fill window" : ""), 1),
3917
- c.title || $.value ? (_(), a("div", pr, [c.title ? (_(), a("div", {
4100
+ o("div", _r, b(S($).isFullscreen.value ? "Map expanded to fill window" : ""), 1),
4101
+ c.title || cn.value ? (_(), a("div", vr, [c.title ? (_(), a("div", {
3918
4102
  key: 0,
3919
4103
  class: "choropleth-title",
3920
- style: m(L.value)
3921
- }, x(c.title), 5)) : i("", !0), $.value ? (_(), a("div", {
4104
+ style: h(I.value)
4105
+ }, b(c.title), 5)) : i("", !0), cn.value ? (_(), a("div", {
3922
4106
  key: 1,
3923
4107
  class: "choropleth-legend",
3924
- style: m(fe.value)
3925
- }, [c.legendTitle ? (_(), a("span", mr, x(c.legendTitle), 1)) : i("", !0), tt.value || nt.value ? (_(!0), a(e, { key: 1 }, y(Bt.value, (e) => (_(), a("span", {
4108
+ style: h(he.value)
4109
+ }, [c.legendTitle ? (_(), a("span", yr, b(c.legendTitle), 1)) : i("", !0), Et.value || Z.value ? (_(!0), a(e, { key: 1 }, y(pn.value, (e) => (_(), a("span", {
3926
4110
  key: e.key,
3927
4111
  class: "choropleth-legend-item"
3928
4112
  }, [o("span", {
3929
4113
  class: "choropleth-legend-swatch",
3930
- style: m({ background: e.color })
3931
- }, null, 4), s(" " + x(e.label), 1)]))), 128)) : (_(), a("div", hr, [o("div", {
4114
+ style: h({ background: e.color })
4115
+ }, null, 4), s(" " + b(e.label), 1)]))), 128)) : (_(), a("div", br, [o("div", {
3932
4116
  class: "choropleth-legend-gradient",
3933
- style: m({ background: Vt.value })
3934
- }, null, 4), o("div", gr, [(_(!0), a(e, null, y(zt.value, (e) => (_(), a("span", {
4117
+ style: h({ background: mn.value })
4118
+ }, null, 4), o("div", xr, [(_(!0), a(e, null, y(fn.value, (e) => (_(), a("span", {
3935
4119
  key: e.value,
3936
- style: m({ left: e.pct + "%" })
3937
- }, x(e.value), 5))), 128))])]))], 4)) : i("", !0)])) : i("", !0),
4120
+ style: h({ left: e.pct + "%" })
4121
+ }, b(e.value), 5))), 128))])]))], 4)) : i("", !0)])) : i("", !0),
4122
+ Y.value ? (_(), a("div", Sr, b(Ze.value), 1)) : i("", !0),
3938
4123
  (_(), a("svg", {
3939
4124
  ref_key: "svgRef",
3940
- ref: A,
3941
- viewBox: `0 0 ${Re.value} ${ze.value}`,
4125
+ ref: k,
4126
+ viewBox: `0 0 ${it.value} ${at.value}`,
3942
4127
  preserveAspectRatio: "xMidYMid meet",
3943
- style: m(c.twoFingerPan ? { touchAction: "pan-y" } : void 0)
4128
+ style: h(X.value)
3944
4129
  }, [o("g", {
3945
4130
  ref_key: "mapGroupRef",
3946
- ref: re
4131
+ ref: A
3947
4132
  }, [o("g", {
3948
4133
  ref_key: "baseGroupRef",
3949
4134
  ref: j
3950
4135
  }, null, 512), o("g", {
3951
4136
  ref_key: "overlayGroupRef",
3952
- ref: M
3953
- }, null, 512)], 512)], 12, _r)),
3954
- Ce.value ? (_(), a("button", {
3955
- key: 2,
3956
- type: "button",
3957
- class: "choropleth-reset",
3958
- "aria-label": "Reset zoom",
3959
- onClick: Ie
3960
- }, " Reset ")) : i("", !0),
3961
- de.value ? (_(), r(ur, {
4137
+ ref: ae
4138
+ }, null, 512)], 512)], 12, Cr)),
4139
+ Ye.value ? (_(), r(S(qe), {
3962
4140
  key: 3,
4141
+ "can-zoom-in": Ee.value < Je.value,
4142
+ "can-zoom-out": Ee.value > 1,
4143
+ "can-reset": Te.value,
4144
+ "is-fullscreen": S($).isFullscreen.value,
4145
+ onZoomIn: l[0] ||= (e) => Qe(Ar),
4146
+ onZoomOut: l[1] ||= (e) => Qe(1 / Ar),
4147
+ onReset: J
4148
+ }, null, 8, [
4149
+ "can-zoom-in",
4150
+ "can-zoom-out",
4151
+ "can-reset",
4152
+ "is-fullscreen"
4153
+ ])) : i("", !0),
4154
+ me.value ? (_(), r(hr, {
4155
+ key: 4,
3963
4156
  ref_key: "tooltipChildRef",
3964
- ref: N
4157
+ ref: M
3965
4158
  }, {
3966
- default: E((t) => [b(n.$slots, "tooltip", p(u(O(t))), () => [c.tooltipFormat ? (_(), a("span", {
4159
+ default: E((t) => [te(n.$slots, "tooltip", m(u(O(t))), () => [c.tooltipFormat ? (_(), a("span", {
3967
4160
  key: 0,
3968
4161
  innerHTML: c.tooltipFormat(t)
3969
- }, null, 8, vr)) : t.value == null ? (_(), a(e, { key: 1 }, [s(x(t.name), 1)], 64)) : (_(), a(e, { key: 2 }, [s(x(t.name) + ": " + x(ft(t.value)), 1)], 64))], !0)]),
4162
+ }, null, 8, wr)) : t.value == null ? (_(), a(e, { key: 1 }, [s(b(t.name), 1)], 64)) : (_(), a(e, { key: 2 }, [s(b(t.name) + ": " + b(Ft(t.value)), 1)], 64))], !0)]),
3970
4163
  _: 3
3971
4164
  }, 512)) : i("", !0)
3972
- ], 16, dr)], 8, ["to", "disabled"]));
4165
+ ], 16, gr)], 8, ["to", "disabled"]));
3973
4166
  }
3974
- }), [["__scopeId", "data-v-7bd9e073"]]), Er = /* @__PURE__ */ L(/* @__PURE__ */ l({
4167
+ }), [["__scopeId", "data-v-1fc9b944"]]), Fr = /* @__PURE__ */ I(/* @__PURE__ */ l({
3975
4168
  __name: "ChartTooltip",
3976
4169
  props: {
3977
4170
  x: {},
@@ -3985,27 +4178,27 @@ var Bt = ["role", "aria-label"], Vt = {
3985
4178
  return (t, n) => e.mode === "hover" && e.open ? (_(), a("div", {
3986
4179
  key: 0,
3987
4180
  class: "chart-tooltip-content",
3988
- style: m({
4181
+ style: h({
3989
4182
  position: "absolute",
3990
4183
  left: `${e.x + e.sideOffset}px`,
3991
4184
  top: `${e.y}px`,
3992
4185
  transform: "translateY(-50%)"
3993
4186
  })
3994
- }, [b(t.$slots, "default", {}, void 0, !0)], 4)) : e.mode === "click" ? (_(), r(C(ie), {
4187
+ }, [te(t.$slots, "default", {}, void 0, !0)], 4)) : e.mode === "click" ? (_(), r(S(oe), {
3995
4188
  key: 1,
3996
4189
  open: e.open
3997
4190
  }, {
3998
- default: E(() => [c(C(j), { "as-child": "" }, {
4191
+ default: E(() => [c(S(j), { "as-child": "" }, {
3999
4192
  default: E(() => [o("div", {
4000
4193
  class: "chart-tooltip-anchor",
4001
- style: m({
4194
+ style: h({
4002
4195
  left: `${e.x}px`,
4003
4196
  top: `${e.y}px`
4004
4197
  })
4005
4198
  }, null, 4)]),
4006
4199
  _: 1
4007
- }), c(C(N), null, {
4008
- default: E(() => [e.open ? (_(), r(C(M), {
4200
+ }), c(S(M), null, {
4201
+ default: E(() => [e.open ? (_(), r(S(ae), {
4009
4202
  key: 0,
4010
4203
  class: "chart-tooltip-content",
4011
4204
  side: "right",
@@ -4014,7 +4207,7 @@ var Bt = ["role", "aria-label"], Vt = {
4014
4207
  onPointerDownOutside: n[0] ||= (e) => t.$emit("close"),
4015
4208
  onEscapeKeyDown: n[1] ||= (e) => t.$emit("close")
4016
4209
  }, {
4017
- default: E(() => [b(t.$slots, "default", {}, void 0, !0)]),
4210
+ default: E(() => [te(t.$slots, "default", {}, void 0, !0)]),
4018
4211
  _: 3
4019
4212
  }, 8, ["side-offset"])) : i("", !0)]),
4020
4213
  _: 3
@@ -4022,7 +4215,7 @@ var Bt = ["role", "aria-label"], Vt = {
4022
4215
  _: 3
4023
4216
  }, 8, ["open"])) : i("", !0);
4024
4217
  }
4025
- }), [["__scopeId", "data-v-44377f70"]]), Dr = { class: "TableWrapper" }, Or = ["href", "download"], kr = /* @__PURE__ */ L(/* @__PURE__ */ l({
4218
+ }), [["__scopeId", "data-v-44377f70"]]), Ir = { class: "TableWrapper" }, Lr = ["href", "download"], Rr = /* @__PURE__ */ I(/* @__PURE__ */ l({
4026
4219
  __name: "DataTable",
4027
4220
  props: {
4028
4221
  data: {},
@@ -4070,22 +4263,22 @@ var Bt = ["role", "aria-label"], Vt = {
4070
4263
  let t = c.columnConfig?.[e]?.align;
4071
4264
  if (t) return { textAlign: t };
4072
4265
  }
4073
- function p(e) {
4266
+ function f(e) {
4074
4267
  let t = c.columnConfig?.[e];
4075
4268
  return [t?.columnClass, t?.wrap ? "cell-wrap" : void 0];
4076
4269
  }
4077
- function h(e) {
4078
- return p(e);
4270
+ function m(e) {
4271
+ return f(e);
4079
4272
  }
4080
4273
  function g(e) {
4081
- return [...p(e), c.columnConfig?.[e]?.cellClass];
4274
+ return [...f(e), c.columnConfig?.[e]?.cellClass];
4082
4275
  }
4083
- function v(e) {
4276
+ function ee(e) {
4084
4277
  return typeof e.column == "function";
4085
4278
  }
4086
- let b = n(() => {
4279
+ let v = n(() => {
4087
4280
  let e = c.data;
4088
- return v(e) ? e.columns.map((t) => ({
4281
+ return ee(e) ? e.columns.map((t) => ({
4089
4282
  name: t.name,
4090
4283
  values: e.column(t.name),
4091
4284
  enumLabels: t.enumLabels
@@ -4093,88 +4286,85 @@ var Bt = ["role", "aria-label"], Vt = {
4093
4286
  name: e,
4094
4287
  values: t
4095
4288
  }));
4096
- }), ee = n(() => {
4097
- let e = b.value;
4289
+ }), te = n(() => {
4290
+ let e = v.value;
4098
4291
  if (e.length === 0) return 0;
4099
4292
  let t = 0;
4100
4293
  for (let n of e) t = Math.max(t, n.values.length);
4101
4294
  return c.maxRows ? Math.min(t, c.maxRows) : t;
4102
4295
  });
4103
- function S(e, t) {
4296
+ function ne(e, t) {
4104
4297
  let n = e.values[t];
4105
4298
  if (n == null) return "";
4106
4299
  let r = c.columnConfig?.[e.name]?.format;
4107
4300
  if (r !== void 0) {
4108
4301
  if (typeof r == "function") return r(n, t);
4109
- if (typeof n == "number") return ne(n, r);
4302
+ if (typeof n == "number") return re(n, r);
4110
4303
  }
4111
4304
  return e.enumLabels && typeof n == "number" ? e.enumLabels[n] ?? String(n) : typeof n == "number" ? Number.isInteger(n) ? n.toString() : n.toFixed(4) : typeof n == "boolean" ? n ? "true" : "false" : String(n);
4112
4305
  }
4113
- function C() {
4306
+ function x() {
4114
4307
  return c.filename ? c.filename : typeof c.menu == "string" ? c.menu : "data";
4115
4308
  }
4116
- function te(e) {
4117
- return e.includes(",") || e.includes("\"") || e.includes("\n") ? `"${e.replace(/"/g, "\"\"")}"` : e;
4118
- }
4119
- function w() {
4309
+ function S() {
4120
4310
  if (typeof c.csv == "function") return c.csv();
4121
4311
  if (typeof c.csv == "string") return c.csv;
4122
- let e = b.value, t = ee.value, n = [e.map((e) => te(l(e.name))).join(",")];
4312
+ let e = v.value, t = te.value, n = [e.map((e) => Ye(l(e.name))).join(",")];
4123
4313
  for (let r = 0; r < t; r++) {
4124
- let t = e.map((e) => te(S(e, r)));
4314
+ let t = e.map((e) => Ye(ne(e, r)));
4125
4315
  n.push(t.join(","));
4126
4316
  }
4127
4317
  return n.join("\n");
4128
4318
  }
4129
- function T() {
4130
- K(w(), C());
4319
+ function C() {
4320
+ Le(S(), x());
4131
4321
  }
4132
- let E = n(() => c.downloadButton || c.downloadLink ? [] : [{
4322
+ let w = n(() => c.downloadButton || c.downloadLink ? [] : [{
4133
4323
  label: c.downloadMenuLink,
4134
- action: T
4135
- }]), D = n(() => {
4324
+ action: C
4325
+ }]), T = n(() => {
4136
4326
  if (c.downloadButton) return null;
4137
4327
  let e = c.downloadLink;
4138
4328
  return e ? typeof e == "string" ? e : "Download data (CSV)" : null;
4139
- }), O = n(() => D.value ? `data:text/csv;charset=utf-8,${encodeURIComponent(w())}` : null), k = n(() => !!c.menu && E.value.length > 0);
4140
- return (n, s) => (_(), a("div", { class: f(["TableOuter", {
4329
+ }), E = n(() => T.value ? `data:text/csv;charset=utf-8,${encodeURIComponent(S())}` : null), D = n(() => !!c.menu && w.value.length > 0);
4330
+ return (n, s) => (_(), a("div", { class: p(["TableOuter", {
4141
4331
  "full-width": t.fullWidth,
4142
- "has-menu": k.value
4332
+ "has-menu": D.value
4143
4333
  }]) }, [
4144
- k.value ? (_(), r(pe, {
4334
+ D.value ? (_(), r(ge, {
4145
4335
  key: 0,
4146
- items: E.value,
4336
+ items: w.value,
4147
4337
  "force-dropdown": ""
4148
4338
  }, null, 8, ["items"])) : i("", !0),
4149
- o("div", Dr, [o("table", { class: f(["Table", { "full-width": t.fullWidth }]) }, [
4150
- o("colgroup", null, [(_(!0), a(e, null, y(b.value, (e) => (_(), a("col", {
4339
+ o("div", Ir, [o("table", { class: p(["Table", { "full-width": t.fullWidth }]) }, [
4340
+ o("colgroup", null, [(_(!0), a(e, null, y(v.value, (e) => (_(), a("col", {
4151
4341
  key: e.name,
4152
- style: m(u(e.name))
4342
+ style: h(u(e.name))
4153
4343
  }, null, 4))), 128))]),
4154
- o("thead", null, [o("tr", null, [(_(!0), a(e, null, y(b.value, (e) => (_(), a("th", {
4344
+ o("thead", null, [o("tr", null, [(_(!0), a(e, null, y(v.value, (e) => (_(), a("th", {
4155
4345
  key: e.name,
4156
- class: f(h(e.name)),
4157
- style: m(d(e.name))
4158
- }, x(l(e.name)), 7))), 128))])]),
4159
- o("tbody", null, [(_(!0), a(e, null, y(ee.value, (t) => (_(), a("tr", { key: t }, [(_(!0), a(e, null, y(b.value, (e) => (_(), a("td", {
4346
+ class: p(m(e.name)),
4347
+ style: h(d(e.name))
4348
+ }, b(l(e.name)), 7))), 128))])]),
4349
+ o("tbody", null, [(_(!0), a(e, null, y(te.value, (t) => (_(), a("tr", { key: t }, [(_(!0), a(e, null, y(v.value, (e) => (_(), a("td", {
4160
4350
  key: e.name,
4161
- class: f(g(e.name)),
4162
- style: m(d(e.name))
4163
- }, x(S(e, t - 1)), 7))), 128))]))), 128))])
4351
+ class: p(g(e.name)),
4352
+ style: h(d(e.name))
4353
+ }, b(ne(e, t - 1)), 7))), 128))]))), 128))])
4164
4354
  ], 2)]),
4165
4355
  t.downloadButton ? (_(), a("button", {
4166
4356
  key: 1,
4167
4357
  type: "button",
4168
4358
  class: "data-table-download-button",
4169
- onClick: T
4170
- }, x(t.downloadMenuLink), 1)) : D.value ? (_(), a("a", {
4359
+ onClick: C
4360
+ }, b(t.downloadMenuLink), 1)) : T.value ? (_(), a("a", {
4171
4361
  key: 2,
4172
4362
  class: "data-table-download-link",
4173
- href: O.value,
4174
- download: `${C()}.csv`
4175
- }, x(D.value), 9, Or)) : i("", !0)
4363
+ href: E.value,
4364
+ download: `${x()}.csv`
4365
+ }, b(T.value), 9, Lr)) : i("", !0)
4176
4366
  ], 2));
4177
4367
  }
4178
- }), [["__scopeId", "data-v-21721f41"]]);
4368
+ }), [["__scopeId", "data-v-9b1b6a76"]]);
4179
4369
  //#endregion
4180
- export { cr as BarChart, Er as ChartTooltip, Tr as ChoroplethMap, kr as DataTable, Dn as LineChart };
4370
+ export { pr as BarChart, Fr as ChartTooltip, Pr as ChoroplethMap, Rr as DataTable, Nn as LineChart };