@cfasim-ui/charts 0.7.5 → 0.7.6

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
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 re, unref as x, useSlots as S, useTemplateRef as ie, watch as C, withCtx as w } from "vue";
2
2
  import { formatNumber as ae } from "@cfasim-ui/shared";
3
- import { DropdownMenuContent as T, DropdownMenuItem as E, DropdownMenuPortal as oe, DropdownMenuRoot as D, DropdownMenuTrigger as O, PopoverAnchor as k, PopoverContent as se, PopoverPortal as A, PopoverRoot as ce } from "reka-ui";
4
- import { geoAlbersUsa as j, geoMercator as le, geoPath as M } from "d3-geo";
5
- import { zoom as ue, zoomIdentity as de, zoomTransform as fe } from "d3-zoom";
6
- import { select as N } from "d3-selection";
3
+ import { DropdownMenuContent as T, DropdownMenuItem as E, DropdownMenuPortal as oe, DropdownMenuRoot as D, DropdownMenuTrigger as O, PopoverAnchor as k, PopoverContent as se, PopoverPortal as ce, PopoverRoot as le } from "reka-ui";
4
+ import { geoAlbersUsa as A, geoMercator as ue, geoPath as j } from "d3-geo";
5
+ import { zoom as de, zoomIdentity as fe, zoomTransform as pe } from "d3-zoom";
6
+ import { select as M } from "d3-selection";
7
7
  import "d3-transition";
8
- import { feature as pe, merge as me, mesh as he } from "topojson-client";
8
+ import { feature as me, merge as he, mesh as ge } from "topojson-client";
9
9
  //#region src/ChartMenu/ChartMenu.vue?vue&type=script&setup=true&lang.ts
10
- var P = ["aria-label"], ge = /* @__PURE__ */ l({
10
+ var N = ["aria-label"], _e = /* @__PURE__ */ l({
11
11
  __name: "ChartMenu",
12
12
  props: {
13
13
  items: {},
@@ -104,13 +104,13 @@ var P = ["aria-label"], ge = /* @__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, P))], 2));
107
+ }, [o("path", { d: "M7 1v8M3 6l4 4 4-4M2 13h10" })], -1)]], 8, N))], 2));
108
108
  }
109
- }), _e = (e, t) => {
109
+ }), P = (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
- }, ve = /* @__PURE__ */ _e(ge, [["__scopeId", "data-v-f5743494"]]);
113
+ }, ve = /* @__PURE__ */ P(_e, [["__scopeId", "data-v-f5743494"]]);
114
114
  //#endregion
115
115
  //#region src/_shared/axes.ts
116
116
  function F(e) {
@@ -283,8 +283,8 @@ function Me(e) {
283
283
  }
284
284
  //#endregion
285
285
  //#region src/tooltip-position.ts
286
- var Ne = 16, Pe = 8;
287
- function B(e, t, n, r, i, a) {
286
+ var Ne = 16, B = 8;
287
+ function V(e, t, n, r, i, a) {
288
288
  if (i === "none") return {
289
289
  left: e + Ne,
290
290
  top: t
@@ -299,15 +299,15 @@ function B(e, t, n, r, i, a) {
299
299
  right: window.innerWidth,
300
300
  top: 0,
301
301
  bottom: window.innerHeight
302
- }, s = e + Ne + n > o.right - Pe ? e - Ne - n : e + Ne, c = r / 2;
302
+ }, s = e + Ne + n > o.right - B ? e - Ne - n : e + Ne, c = Math.max(o.left + B, o.right - B - n), l = Math.min(Math.max(s, o.left + B), c), u = r / 2;
303
303
  return {
304
- left: s,
305
- top: Math.min(Math.max(t, o.top + Pe + c), o.bottom - Pe - c)
304
+ left: l,
305
+ top: Math.min(Math.max(t, o.top + B + u), o.bottom - B - u)
306
306
  };
307
307
  }
308
308
  //#endregion
309
309
  //#region src/_shared/useChartTooltip.ts
310
- function Fe(e) {
310
+ function Pe(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 Fe(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 } = B(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 } = V(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,98 +395,98 @@ function Fe(e) {
395
395
  }
396
396
  //#endregion
397
397
  //#region src/ChartMenu/download.ts
398
- function V(e, t) {
398
+ function H(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 H = [
402
+ var U = [
403
403
  "color",
404
404
  "font-family",
405
405
  "font-size",
406
406
  "font-weight"
407
- ], U = ["fill", "stroke"];
408
- function Ie(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 H) {
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 U) {
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, Ie(n));
426
+ !n || !n.includes("var(") || e.setAttribute(t, Fe(n));
427
427
  }
428
428
  return t;
429
429
  }
430
- function G(e, t) {
431
- let n = W(e), r = new XMLSerializer().serializeToString(n);
432
- V(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
+ H(new Blob([r], { type: "image/svg+xml" }), `${t}.svg`);
433
433
  }
434
- function Le(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 && V(e, `${t}.png`);
441
+ e && H(e, `${t}.png`);
442
442
  }), URL.revokeObjectURL(a);
443
443
  }, o.src = a;
444
444
  }
445
- function Re(e, t) {
445
+ function Le(e, t) {
446
446
  e.toBlob((e) => {
447
- e && V(e, `${t}.png`);
447
+ e && H(e, `${t}.png`);
448
448
  }, "image/png");
449
449
  }
450
- function ze(e, t) {
451
- V(new Blob([e], { type: "text/csv" }), `${t}.csv`);
450
+ function Re(e, t) {
451
+ H(new Blob([e], { type: "text/csv" }), `${t}.csv`);
452
452
  }
453
453
  //#endregion
454
454
  //#region src/_shared/touch.ts
455
- function K() {
455
+ function q() {
456
456
  return typeof window < "u" && "ontouchstart" in window;
457
457
  }
458
458
  //#endregion
459
459
  //#region src/_shared/useChartFullscreen.ts
460
- var Be = 0, Ve = "";
460
+ var ze = 0, Be = "";
461
+ function Ve() {
462
+ typeof document > "u" || (ze === 0 && (Be = document.body.style.overflow, document.body.style.overflow = "hidden"), ze++);
463
+ }
461
464
  function He() {
462
- typeof document > "u" || (Be === 0 && (Ve = document.body.style.overflow, document.body.style.overflow = "hidden"), Be++);
465
+ typeof document > "u" || ze !== 0 && (ze--, ze === 0 && (document.body.style.overflow = Be));
463
466
  }
467
+ var J = 0, Y = null;
464
468
  function Ue() {
465
- typeof document > "u" || Be !== 0 && (Be--, Be === 0 && (document.body.style.overflow = Ve));
466
- }
467
- var q = 0, J = null;
468
- function We() {
469
469
  return document.querySelector("meta[name=\"viewport\"]");
470
470
  }
471
- function Ge() {
472
- if (typeof document > "u" || !K()) return;
473
- let e = We();
471
+ function We() {
472
+ if (typeof document > "u" || !q()) return;
473
+ let e = Ue();
474
474
  if (e) {
475
- if (q === 0) {
476
- J = e.getAttribute("content");
477
- let t = J || "width=device-width, initial-scale=1";
475
+ if (J === 0) {
476
+ Y = e.getAttribute("content");
477
+ let t = Y || "width=device-width, initial-scale=1";
478
478
  e.setAttribute("content", `${t}, maximum-scale=1`);
479
479
  }
480
- q++;
480
+ J++;
481
481
  }
482
482
  }
483
- function Ke() {
484
- if (!(typeof document > "u") && q !== 0 && (q--, q === 0)) {
485
- let e = We();
486
- e && J != null && e.setAttribute("content", J), J = null;
483
+ function Ge() {
484
+ if (!(typeof document > "u") && J !== 0 && (J--, J === 0)) {
485
+ let e = Ue();
486
+ e && Y != null && e.setAttribute("content", Y), Y = null;
487
487
  }
488
488
  }
489
- function Y(e = {}) {
489
+ function X(e = {}) {
490
490
  let t = v(!1), r = !1, i = v(null);
491
491
  function a() {
492
492
  let e = typeof window < "u" ? window.visualViewport : null;
@@ -502,7 +502,7 @@ function Y(e = {}) {
502
502
  t && (e ? (t.addEventListener("resize", a), t.addEventListener("scroll", a), a()) : (t.removeEventListener("resize", a), t.removeEventListener("scroll", a), i.value = null));
503
503
  }
504
504
  function s(e) {
505
- e !== t.value && (t.value = e, e && !r ? (He(), Ge(), o(!0), r = !0) : !e && r && (Ue(), Ke(), o(!1), r = !1));
505
+ e !== t.value && (t.value = e, e && !r ? (Ve(), We(), o(!0), r = !0) : !e && r && (He(), Ge(), o(!1), r = !1));
506
506
  }
507
507
  function c(e) {
508
508
  if (e.key !== "Escape" || !t.value) return;
@@ -521,7 +521,7 @@ function Y(e = {}) {
521
521
  return g(() => {
522
522
  typeof document > "u" || document.addEventListener("keydown", c);
523
523
  }), ee(() => {
524
- typeof document > "u" || (document.removeEventListener("keydown", c), r &&= (Ue(), Ke(), o(!1), !1));
524
+ typeof document > "u" || (document.removeEventListener("keydown", c), r &&= (He(), Ge(), o(!1), !1));
525
525
  }), {
526
526
  isFullscreen: t,
527
527
  toggle: d,
@@ -538,7 +538,7 @@ function Y(e = {}) {
538
538
  "z-index": "var(--cfasim-z-fullscreen, 1000)",
539
539
  background: "var(--color-bg-0, #fff)",
540
540
  color: "var(--color-text, inherit)",
541
- padding: K() ? "0" : "2em",
541
+ padding: q() ? "0" : "2em",
542
542
  "box-sizing": "border-box",
543
543
  display: "flex",
544
544
  "flex-direction": "column",
@@ -549,7 +549,7 @@ function Y(e = {}) {
549
549
  }
550
550
  //#endregion
551
551
  //#region src/_shared/useChartMenu.ts
552
- function qe(e) {
552
+ function Ke(e) {
553
553
  let t = v(null);
554
554
  function r() {
555
555
  let t = e.filename();
@@ -557,23 +557,23 @@ function qe(e) {
557
557
  let n = e.legacyMenuLabel();
558
558
  return typeof n == "string" ? n : "chart";
559
559
  }
560
- let i = e.fullscreen ? Y({ target: e.fullscreenTarget }) : null, a = n(() => {
560
+ let i = e.fullscreen ? X({ target: e.fullscreenTarget }) : null, a = n(() => {
561
561
  let n = r(), a = [];
562
562
  i && a.push(i.menuItem.value), a.push({
563
563
  label: "Save as SVG",
564
564
  action: () => {
565
- t.value && G(t.value, n);
565
+ t.value && K(t.value, n);
566
566
  }
567
567
  }, {
568
568
  label: "Save as PNG",
569
569
  action: () => {
570
- t.value && Le(t.value, n);
570
+ t.value && Ie(t.value, n);
571
571
  }
572
572
  });
573
573
  let o = e.downloadButton?.();
574
574
  return !e.downloadLink() && !o && a.push({
575
575
  label: "Download CSV",
576
- action: () => ze(e.getCsv(), n)
576
+ action: () => Re(e.getCsv(), n)
577
577
  }), a;
578
578
  }), o = n(() => {
579
579
  if (e.downloadButton?.()) return null;
@@ -584,7 +584,7 @@ function qe(e) {
584
584
  return t ? typeof t == "string" ? t : "Download data (CSV)" : null;
585
585
  });
586
586
  function l() {
587
- ze(e.getCsv(), r());
587
+ Re(e.getCsv(), r());
588
588
  }
589
589
  return {
590
590
  svgRef: t,
@@ -602,7 +602,7 @@ function qe(e) {
602
602
  }
603
603
  //#endregion
604
604
  //#region src/_shared/ChartZoomControls.vue?vue&type=script&setup=true&lang.ts
605
- var Je = ["disabled"], X = ["disabled"], Ye = ["disabled"], Xe = /* @__PURE__ */ _e(/* @__PURE__ */ l({
605
+ var qe = ["disabled"], Z = ["disabled"], Je = ["disabled"], Ye = /* @__PURE__ */ P(/* @__PURE__ */ l({
606
606
  __name: "ChartZoomControls",
607
607
  props: {
608
608
  canZoomIn: {
@@ -645,7 +645,7 @@ var Je = ["disabled"], X = ["disabled"], Ye = ["disabled"], Xe = /* @__PURE__ */
645
645
  "stroke-width": "1.5",
646
646
  "stroke-linecap": "round",
647
647
  "aria-hidden": "true"
648
- }, [o("path", { d: "M7 2v10M2 7h10" })], -1)]], 8, Je),
648
+ }, [o("path", { d: "M7 2v10M2 7h10" })], -1)]], 8, qe),
649
649
  o("button", {
650
650
  type: "button",
651
651
  class: "chart-zoom-button",
@@ -661,7 +661,7 @@ var Je = ["disabled"], X = ["disabled"], Ye = ["disabled"], Xe = /* @__PURE__ */
661
661
  "stroke-width": "1.5",
662
662
  "stroke-linecap": "round",
663
663
  "aria-hidden": "true"
664
- }, [o("path", { d: "M2 7h10" })], -1)]], 8, X),
664
+ }, [o("path", { d: "M2 7h10" })], -1)]], 8, Z),
665
665
  o("button", {
666
666
  type: "button",
667
667
  class: "chart-zoom-button",
@@ -678,13 +678,13 @@ var Je = ["disabled"], X = ["disabled"], Ye = ["disabled"], Xe = /* @__PURE__ */
678
678
  "stroke-linecap": "round",
679
679
  "stroke-linejoin": "round",
680
680
  "aria-hidden": "true"
681
- }, [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, Ye)
681
+ }, [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, Je)
682
682
  ], 2));
683
683
  }
684
684
  }), [["__scopeId", "data-v-87ceeada"]]);
685
685
  //#endregion
686
686
  //#region src/_shared/seriesCsv.ts
687
- function Ze(e) {
687
+ function Xe(e) {
688
688
  if (e.length === 0) return "";
689
689
  let t = 0;
690
690
  for (let n of e) n.data.length > t && (t = n.data.length);
@@ -696,43 +696,43 @@ function Ze(e) {
696
696
  }
697
697
  return i.join("\n");
698
698
  }
699
- function Qe(e, t, n = "category") {
699
+ function Ze(e, t, n = "category") {
700
700
  if (t.length === 0 || e.length === 0) return "";
701
701
  let r = [(t.length === 1 ? [n, t[0].label || "value"] : [n, ...t.map((e, t) => e.label || `series_${t}`)]).join(",")];
702
702
  for (let n = 0; n < e.length; n++) {
703
- let i = [$e(e[n])];
703
+ let i = [Qe(e[n])];
704
704
  for (let e of t) i.push(n < e.data.length ? String(e.data[n]) : "");
705
705
  r.push(i.join(","));
706
706
  }
707
707
  return r.join("\n");
708
708
  }
709
- function $e(e) {
709
+ function Qe(e) {
710
710
  return e.includes(",") || e.includes("\"") || e.includes("\n") ? `"${e.replace(/"/g, "\"\"")}"` : e;
711
711
  }
712
712
  //#endregion
713
713
  //#region src/_shared/ChartAnnotations.vue?vue&type=script&setup=true&lang.ts
714
- var et = {
714
+ var $e = {
715
715
  class: "chart-annotations",
716
716
  "pointer-events": "none"
717
- }, tt = ["stroke", "stroke-width"], nt = [
717
+ }, et = ["stroke", "stroke-width"], tt = [
718
718
  "d",
719
719
  "stroke",
720
720
  "stroke-width"
721
- ], rt = [
721
+ ], nt = [
722
722
  "fill",
723
723
  "stroke",
724
724
  "stroke-width",
725
725
  "transform"
726
- ], it = [
726
+ ], rt = [
727
727
  "stroke",
728
728
  "stroke-width",
729
729
  "stroke-dasharray"
730
- ], at = [
730
+ ], it = [
731
731
  "d",
732
732
  "stroke",
733
733
  "stroke-width",
734
734
  "stroke-dasharray"
735
- ], ot = ["fill", "transform"], st = [
735
+ ], at = ["fill", "transform"], ot = [
736
736
  "x",
737
737
  "y",
738
738
  "text-anchor",
@@ -741,7 +741,7 @@ var et = {
741
741
  "fill",
742
742
  "stroke",
743
743
  "stroke-width"
744
- ], ct = ["x", "dy"], lt = ["font-weight", "font-style"], ut = 13, dt = "normal", ft = 700, pt = "var(--color-bg-0, #fff)", mt = 3, ht = 1, Z = 4, gt = 6, _t = 1.2, vt = .35, yt = /* @__PURE__ */ l({
744
+ ], st = ["x", "dy"], ct = ["font-weight", "font-style"], lt = 13, ut = "normal", dt = 700, ft = "var(--color-bg-0, #fff)", pt = 3, mt = 1, ht = 4, gt = 6, _t = 1.2, vt = .35, yt = /* @__PURE__ */ l({
745
745
  __name: "ChartAnnotations",
746
746
  props: {
747
747
  annotations: { default: () => [] },
@@ -778,7 +778,7 @@ var et = {
778
778
  if (!n || !isFinite(n.x) || !isFinite(n.y)) continue;
779
779
  let i = t.pointer ?? "curved", a = i.startsWith("rule");
780
780
  if (a && !r.bounds) continue;
781
- let { x: o, y: l } = t.offset, d = n.x + o, p = n.y + l, m = t.color ?? "currentColor", h = t.fontSize ?? ut, g = t.fontWeight ?? dt, ee = t.outlineColor ?? pt, _ = t.outlineWidth ?? mt, v = t.lineColor ?? m, y = t.lineWidth ?? ht, te = s(t.lineDash), b = {
781
+ let { x: o, y: l } = t.offset, d = n.x + o, p = n.y + l, m = t.color ?? "currentColor", h = t.fontSize ?? lt, g = t.fontWeight ?? ut, ee = t.outlineColor ?? ft, _ = t.outlineWidth ?? pt, v = t.lineColor ?? m, y = t.lineWidth ?? mt, te = s(t.lineDash), b = {
782
782
  left: "start",
783
783
  center: "middle",
784
784
  right: "end"
@@ -863,7 +863,7 @@ var et = {
863
863
  if (s === 0 || c === 0 || o === "straight") {
864
864
  let i = c === 0 ? r : u, a = n - e, o = i - t, s = Math.hypot(a, o);
865
865
  if (s <= 10) return { path: "" };
866
- let l = a / s, d = o / s, f = e + l * Z, p = t + d * Z, m = n - l * gt, h = i - d * gt, g = Math.atan2(-d, -l) * 180 / Math.PI;
866
+ let l = a / s, d = o / s, f = e + l * ht, p = t + d * ht, m = n - l * gt, h = i - d * gt, g = Math.atan2(-d, -l) * 180 / Math.PI;
867
867
  return {
868
868
  path: `M${f},${p} L${m},${h}`,
869
869
  arrow: {
@@ -874,8 +874,8 @@ var et = {
874
874
  };
875
875
  }
876
876
  let d = u - t;
877
- if (Math.abs(d) <= Z || Math.abs(s) <= gt) return { path: "" };
878
- let f = Math.sign(s), p = Math.sign(d), m = e, h = t + p * Z, g = n - f * gt, ee = u, _ = p > 0 ? -90 : 90;
877
+ if (Math.abs(d) <= ht || Math.abs(s) <= gt) return { path: "" };
878
+ let f = Math.sign(s), p = Math.sign(d), m = e, h = t + p * ht, g = n - f * gt, ee = u, _ = p > 0 ? -90 : 90;
879
879
  return {
880
880
  path: `M${m},${h} Q${m},${u} ${g},${ee}`,
881
881
  arrow: {
@@ -885,7 +885,7 @@ var et = {
885
885
  }
886
886
  };
887
887
  }
888
- return (t, n) => (_(), a("g", et, [(_(!0), a(e, null, y(l.value, (t, n) => (_(), a(e, { key: n }, [
888
+ return (t, n) => (_(), a("g", $e, [(_(!0), a(e, null, y(l.value, (t, n) => (_(), a(e, { key: n }, [
889
889
  t.rule && t.outlineWidth > 0 ? (_(), a("line", d({
890
890
  key: 0,
891
891
  ref_for: !0
@@ -894,7 +894,7 @@ var et = {
894
894
  stroke: t.outlineColor,
895
895
  "stroke-width": t.lineWidth + t.outlineWidth,
896
896
  "stroke-linecap": "round"
897
- }), null, 16, tt)) : i("", !0),
897
+ }), null, 16, et)) : i("", !0),
898
898
  t.pointerPath && t.outlineWidth > 0 ? (_(), a("path", {
899
899
  key: 1,
900
900
  d: t.pointerPath,
@@ -903,7 +903,7 @@ var et = {
903
903
  stroke: t.outlineColor,
904
904
  "stroke-width": t.lineWidth + t.outlineWidth,
905
905
  "stroke-linecap": "round"
906
- }, null, 8, nt)) : i("", !0),
906
+ }, null, 8, tt)) : i("", !0),
907
907
  t.arrowTip && t.outlineWidth > 0 ? (_(), a("polygon", {
908
908
  key: 2,
909
909
  points: "0,0 -6,-3 -6,3",
@@ -913,7 +913,7 @@ var et = {
913
913
  "stroke-width": t.outlineWidth,
914
914
  "stroke-linejoin": "round",
915
915
  transform: t.arrowTransform
916
- }, null, 8, rt)) : i("", !0),
916
+ }, null, 8, nt)) : i("", !0),
917
917
  t.rule ? (_(), a("line", d({
918
918
  key: 3,
919
919
  ref_for: !0
@@ -922,7 +922,7 @@ var et = {
922
922
  "stroke-width": t.lineWidth,
923
923
  "stroke-dasharray": t.lineDash,
924
924
  "stroke-linecap": "round"
925
- }), null, 16, it)) : i("", !0),
925
+ }), null, 16, rt)) : i("", !0),
926
926
  t.pointerPath ? (_(), a("path", {
927
927
  key: 4,
928
928
  d: t.pointerPath,
@@ -931,13 +931,13 @@ var et = {
931
931
  "stroke-width": t.lineWidth,
932
932
  "stroke-dasharray": t.lineDash,
933
933
  "stroke-linecap": "round"
934
- }, null, 8, at)) : i("", !0),
934
+ }, null, 8, it)) : i("", !0),
935
935
  t.arrowTip ? (_(), a("polygon", {
936
936
  key: 5,
937
937
  points: "0,0 -6,-3 -6,3",
938
938
  fill: t.lineColor,
939
939
  transform: t.arrowTransform
940
- }, null, 8, ot)) : i("", !0),
940
+ }, null, 8, at)) : i("", !0),
941
941
  o("text", {
942
942
  x: t.textX,
943
943
  y: t.textY,
@@ -955,14 +955,14 @@ var et = {
955
955
  dy: r === 0 ? 0 : t.dy
956
956
  }, [(_(!0), a(e, null, y(n, (e, t) => (_(), a("tspan", {
957
957
  key: t,
958
- "font-weight": e.bold ? ft : void 0,
958
+ "font-weight": e.bold ? dt : void 0,
959
959
  "font-style": e.italic ? "italic" : void 0
960
- }, b(e.text), 9, lt))), 128))], 8, ct))), 128))], 8, st)
960
+ }, b(e.text), 9, ct))), 128))], 8, st))), 128))], 8, ot)
961
961
  ], 64))), 128))]));
962
962
  }
963
963
  }), bt = 400, xt = 200;
964
964
  function St(e) {
965
- let { containerRef: t, measuredWidth: r, measuredHeight: i } = we({ 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 } = qe({
965
+ let { containerRef: t, measuredWidth: r, measuredHeight: i } = we({ 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 } = Ke({
966
966
  filename: e.filename,
967
967
  legacyMenuLabel: e.menu,
968
968
  getCsv: e.getCsv,
@@ -985,7 +985,7 @@ function St(e) {
985
985
  width: () => g.value,
986
986
  height: () => ee.value,
987
987
  extraPadding: e.chartPadding
988
- }), { hoverIndex: re, tooltipRef: x, tooltipPos: S, handlers: ie } = Fe({
988
+ }), { hoverIndex: re, tooltipRef: x, tooltipPos: S, handlers: ie } = Pe({
989
989
  enabled: e.hasTooltipSlot,
990
990
  trigger: e.tooltipTrigger,
991
991
  clamp: () => e.tooltipClamp() ?? "chart",
@@ -1559,7 +1559,7 @@ var en = {
1559
1559
  ], Nn = { class: "line-chart-tooltip" }, Pn = {
1560
1560
  key: 0,
1561
1561
  class: "line-chart-tooltip-label"
1562
- }, Fn = ["href", "download"], In = 36, Ln = 12, Rn = 7, zn = 16, Bn = /* @__PURE__ */ _e(/* @__PURE__ */ l({
1562
+ }, Fn = ["href", "download"], In = 36, Ln = 12, Rn = 7, zn = 16, Bn = /* @__PURE__ */ P(/* @__PURE__ */ l({
1563
1563
  inheritAttrs: !1,
1564
1564
  __name: "LineChart",
1565
1565
  props: {
@@ -1664,7 +1664,7 @@ var en = {
1664
1664
  function se(e, t) {
1665
1665
  return e.x ? Number(e.x[t]) : t;
1666
1666
  }
1667
- let A = n(() => O.value ? 0 : f.xMin ?? 0), ce = n(() => {
1667
+ let ce = n(() => O.value ? 0 : f.xMin ?? 0), le = n(() => {
1668
1668
  let e = Infinity, t = -Infinity;
1669
1669
  for (let n of E.value) for (let r = 0; r < n.data.length; r++) {
1670
1670
  let i = k(n, r);
@@ -1685,11 +1685,11 @@ var en = {
1685
1685
  max: 0
1686
1686
  };
1687
1687
  });
1688
- function j(e) {
1689
- let { min: t, max: n } = ce.value, r = n - t || 1;
1690
- return H.value.left + (e - t) / r * W.value;
1688
+ function A(e) {
1689
+ let { min: t, max: n } = le.value, r = n - t || 1;
1690
+ return U.value.left + (e - t) / r * G.value;
1691
1691
  }
1692
- let le = n(() => {
1692
+ let ue = n(() => {
1693
1693
  let e = Infinity, t = -Infinity, n = Infinity, r = (r) => {
1694
1694
  isFinite(r) && (r < e && (e = r), r > t && (t = r), r > 0 && r < n && (n = r));
1695
1695
  };
@@ -1711,11 +1711,11 @@ var en = {
1711
1711
  range: i.max - i.min || 1
1712
1712
  };
1713
1713
  });
1714
- function M(e) {
1715
- let { min: t, max: n } = le.value;
1716
- return H.value.top + G.value - R(e, t, n, f.yScaleType) * G.value;
1714
+ function j(e) {
1715
+ let { min: t, max: n } = ue.value;
1716
+ return U.value.top + K.value - R(e, t, n, f.yScaleType) * K.value;
1717
1717
  }
1718
- function ue(e) {
1718
+ function de(e) {
1719
1719
  let t = e.data;
1720
1720
  if (t.length === 0) return "";
1721
1721
  let n = "", r = !1;
@@ -1725,23 +1725,23 @@ var en = {
1725
1725
  r = !1;
1726
1726
  continue;
1727
1727
  }
1728
- let o = j(a), s = M(t[i]);
1728
+ let o = A(a), s = j(t[i]);
1729
1729
  n += r ? `L${o},${s}` : `M${o},${s}`, r = !0;
1730
1730
  }
1731
1731
  return n;
1732
1732
  }
1733
- function de(e) {
1733
+ function fe(e) {
1734
1734
  let t = e.data, n = [];
1735
1735
  for (let r = 0; r < t.length; r++) {
1736
1736
  let i = k(e, r);
1737
1737
  !isFinite(t[r]) || !isFinite(i) || n.push({
1738
- x: j(i),
1739
- y: M(t[r])
1738
+ x: A(i),
1739
+ y: j(t[r])
1740
1740
  });
1741
1741
  }
1742
1742
  return n;
1743
1743
  }
1744
- function fe(e) {
1744
+ function pe(e) {
1745
1745
  let t = Math.min(e.upper.length, e.lower.length);
1746
1746
  if (t === 0) return "";
1747
1747
  let n = [], r = [];
@@ -1749,41 +1749,41 @@ var en = {
1749
1749
  r.length && n.push(r);
1750
1750
  let i = "";
1751
1751
  for (let t of n) {
1752
- i += `M${j(se(e, t[0]))},${M(e.upper[t[0]])}`;
1753
- for (let n = 1; n < t.length; n++) i += `L${j(se(e, t[n]))},${M(e.upper[t[n]])}`;
1754
- for (let n = t.length - 1; n >= 0; n--) i += `L${j(se(e, t[n]))},${M(e.lower[t[n]])}`;
1752
+ i += `M${A(se(e, t[0]))},${j(e.upper[t[0]])}`;
1753
+ for (let n = 1; n < t.length; n++) i += `L${A(se(e, t[n]))},${j(e.upper[t[n]])}`;
1754
+ for (let n = t.length - 1; n >= 0; n--) i += `L${A(se(e, t[n]))},${j(e.lower[t[n]])}`;
1755
1755
  i += "Z";
1756
1756
  }
1757
1757
  return i;
1758
1758
  }
1759
- function N(e, t) {
1759
+ function M(e, t) {
1760
1760
  let n = t === "start" ? e.startIndex : e.endIndex, r = e.seriesIndex != null && E.value[e.seriesIndex] || E.value[0];
1761
- return j(r ? k(r, n) : n);
1761
+ return A(r ? k(r, n) : n);
1762
1762
  }
1763
- function pe(e, t = !0) {
1764
- let n = H.value.top + G.value;
1763
+ function me(e, t = !0) {
1764
+ let n = U.value.top + K.value;
1765
1765
  if (e.seriesIndex == null) {
1766
- let t = N(e, "start"), r = N(e, "end");
1767
- return t > r ? "" : `M${t},${H.value.top}L${r},${H.value.top}L${r},${n}L${t},${n}Z`;
1766
+ let t = M(e, "start"), r = M(e, "end");
1767
+ return t > r ? "" : `M${t},${U.value.top}L${r},${U.value.top}L${r},${n}L${t},${n}Z`;
1768
1768
  }
1769
1769
  let r = E.value[e.seriesIndex];
1770
1770
  if (!r) return "";
1771
1771
  let i = Math.max(0, e.startIndex), a = Math.min(r.data.length - 1, e.endIndex);
1772
1772
  if (i > a) return "";
1773
- let o = `M${j(k(r, i))},${M(r.data[i])}`;
1774
- for (let e = i + 1; e <= a; e++) isFinite(r.data[e]) && (o += `L${j(k(r, e))},${M(r.data[e])}`);
1775
- return t && (o += `L${j(k(r, a))},${n}`, o += `L${j(k(r, i))},${n}`, o += "Z"), o;
1773
+ let o = `M${A(k(r, i))},${j(r.data[i])}`;
1774
+ for (let e = i + 1; e <= a; e++) isFinite(r.data[e]) && (o += `L${A(k(r, e))},${j(r.data[e])}`);
1775
+ return t && (o += `L${A(k(r, a))},${n}`, o += `L${A(k(r, i))},${n}`, o += "Z"), o;
1776
1776
  }
1777
- let me = n(() => {
1777
+ let he = n(() => {
1778
1778
  let e = f.areaSections;
1779
1779
  if (!e?.length) return {
1780
1780
  labels: [],
1781
1781
  extraHeight: 0
1782
1782
  };
1783
- let t = [], n = H.value.left + W.value;
1783
+ let t = [], n = U.value.left + G.value;
1784
1784
  for (let r of e) {
1785
1785
  if (!r.label && !r.description || r.legend === "inline" || r.legend === !1) continue;
1786
- let e = r.label ?? "", i = r.description ?? "", a = Math.max(e.length, i.length) * Rn, o = N(r, "start") + a / 2 + 2, s = n - a / 2 - 8, c = Math.min(o, s), l = r.color ?? (r.seriesIndex == null ? "#999" : E.value[r.seriesIndex]?.color ?? "currentColor"), u = Ee({
1786
+ let e = r.label ?? "", i = r.description ?? "", a = Math.max(e.length, i.length) * Rn, o = M(r, "start") + a / 2 + 2, s = n - a / 2 - 8, c = Math.min(o, s), l = r.color ?? (r.seriesIndex == null ? "#999" : E.value[r.seriesIndex]?.color ?? "currentColor"), u = Ee({
1787
1787
  color: l,
1788
1788
  fontWeight: 600,
1789
1789
  ...r.inlineLabelStyle
@@ -1819,7 +1819,7 @@ var en = {
1819
1819
  labels: t,
1820
1820
  extraHeight: (Math.max(...t.map((e) => e.row)) + 1) * In + Ln
1821
1821
  };
1822
- }), he = n(() => {
1822
+ }), ge = n(() => {
1823
1823
  let e = [];
1824
1824
  for (let t of E.value) !t.legend || t.showInLegend === !1 || e.push({
1825
1825
  label: t.legend,
@@ -1839,11 +1839,11 @@ var en = {
1839
1839
  });
1840
1840
  }
1841
1841
  return e;
1842
- }), P = n(() => he.value.map((e) => e.label)), ge = n(() => V.value + me.value.extraHeight), _e = n(() => H.value.top + G.value + H.value.bottom + Ln), ye = n(() => {
1843
- let { min: e, max: t } = le.value, n = (e) => f.yTickFormat === void 0 ? L(e) : ae(e, f.yTickFormat);
1842
+ }), N = n(() => ge.value.map((e) => e.label)), _e = n(() => H.value + he.value.extraHeight), P = n(() => U.value.top + K.value + U.value.bottom + Ln), ye = n(() => {
1843
+ let { min: e, max: t } = ue.value, n = (e) => f.yTickFormat === void 0 ? L(e) : ae(e, f.yTickFormat);
1844
1844
  return e === t ? [{
1845
1845
  value: n(e),
1846
- y: F(H.value.top + G.value / 2)
1846
+ y: F(U.value.top + K.value / 2)
1847
1847
  }] : (f.yScaleType === "log" ? Ce({
1848
1848
  min: e,
1849
1849
  max: t,
@@ -1852,22 +1852,22 @@ var en = {
1852
1852
  min: e,
1853
1853
  max: t,
1854
1854
  ticks: f.yTicks,
1855
- targetTickCount: G.value / 50
1855
+ targetTickCount: K.value / 50
1856
1856
  })).map((e) => ({
1857
1857
  value: n(e),
1858
- y: F(M(e))
1858
+ y: F(j(e))
1859
1859
  }));
1860
1860
  });
1861
1861
  function be(e, t, n) {
1862
1862
  let r = f.xTickFormat;
1863
1863
  if (T.value) return typeof r == "function" ? r(e, t) : $t(e, r, C.value, n);
1864
- let i = e + A.value;
1864
+ let i = e + ce.value;
1865
1865
  return r === void 0 ? !O.value && f.xLabels && Number.isInteger(e) && e >= 0 && e < f.xLabels.length ? f.xLabels[e] : L(i) : typeof r == "function" ? r(i, t) : ae(i, r);
1866
1866
  }
1867
1867
  let I = n(() => {
1868
- let { min: e, max: t } = ce.value;
1868
+ let { min: e, max: t } = le.value;
1869
1869
  if (e === t) return [];
1870
- let n = T.value, r = n ? 0 : A.value, i = D.value, a = W.value / 80, o, s;
1870
+ let n = T.value, r = n ? 0 : ce.value, i = D.value, a = G.value / 80, o, s;
1871
1871
  if (n) {
1872
1872
  let n = qt(e, t, a, C.value);
1873
1873
  s = n.unit, o = xe({
@@ -1886,9 +1886,9 @@ var en = {
1886
1886
  targetTickCount: a,
1887
1887
  displayOffset: r
1888
1888
  });
1889
- let c = H.value.left, l = H.value.left + W.value;
1889
+ let c = U.value.left, l = U.value.left + G.value;
1890
1890
  return o.map((e, t) => {
1891
- let n = F(j(e)), r = "middle";
1891
+ let n = F(A(e)), r = "middle";
1892
1892
  return n - c <= 1 ? r = "start" : l - n <= 1 && (r = "end"), {
1893
1893
  value: be(e, t, s),
1894
1894
  x: n,
@@ -1897,12 +1897,12 @@ var en = {
1897
1897
  });
1898
1898
  });
1899
1899
  function we() {
1900
- return typeof f.csv == "function" ? f.csv() : typeof f.csv == "string" ? f.csv : Ze(E.value);
1900
+ return typeof f.csv == "function" ? f.csv() : typeof f.csv == "string" ? f.csv : Xe(E.value);
1901
1901
  }
1902
1902
  let z = n(() => !!f.tooltipData || !!f.tooltipTrigger), De = n(() => {
1903
- let e = Re.value, t = E.value[0];
1903
+ let e = Le.value, t = E.value[0];
1904
1904
  return e === null || !t ? null : k(t, e);
1905
- }), Oe = n(() => De.value === null ? 0 : j(De.value));
1905
+ }), Oe = n(() => De.value === null ? 0 : A(De.value));
1906
1906
  function ke(e, t) {
1907
1907
  let n = e.data.length;
1908
1908
  if (n === 0) return null;
@@ -1925,14 +1925,14 @@ var en = {
1925
1925
  if (r === null) continue;
1926
1926
  let i = n.data[r];
1927
1927
  isFinite(i) && t.push({
1928
- x: j(k(n, r)),
1929
- y: M(i),
1928
+ x: A(k(n, r)),
1929
+ y: j(i),
1930
1930
  color: n.color ?? "currentColor"
1931
1931
  });
1932
1932
  }
1933
1933
  return t;
1934
1934
  }), je = n(() => {
1935
- let e = Re.value, t = De.value;
1935
+ let e = Le.value, t = De.value;
1936
1936
  if (e === null || t === null) return null;
1937
1937
  let n = be(t, e), r = E.value, i = [];
1938
1938
  for (let e = 0; e < r.length; e++) {
@@ -1954,19 +1954,19 @@ var en = {
1954
1954
  });
1955
1955
  function Me(e, t) {
1956
1956
  return !isFinite(e) || !isFinite(t) ? null : {
1957
- x: j(e - A.value),
1958
- y: M(t)
1957
+ x: A(e - ce.value),
1958
+ y: j(t)
1959
1959
  };
1960
1960
  }
1961
1961
  function Ne(e) {
1962
- let t = Pe.value?.getBoundingClientRect();
1962
+ let t = B.value?.getBoundingClientRect();
1963
1963
  if (!t) return null;
1964
1964
  let n = E.value[0];
1965
1965
  if (!n || n.data.length === 0) return null;
1966
- let { min: r, max: i } = ce.value, a = i - r || 1;
1967
- return ke(n, r + (e - t.left - H.value.left) / W.value * a);
1966
+ let { min: r, max: i } = le.value, a = i - r || 1;
1967
+ return ke(n, r + (e - t.left - U.value.left) / G.value * a);
1968
1968
  }
1969
- let { containerRef: Pe, svgRef: B, width: Fe, height: V, padding: H, legendY: U, inlineLegendLayout: Ie, innerW: W, innerH: G, bounds: Le, hoverIndex: Re, tooltipRef: ze, tooltipPos: K, tooltipHandlers: Be, menuItems: Ve, downloadLinkText: He, csvHref: Ue, downloadButtonText: q, triggerCsvDownload: J, menuFilename: We, isFullscreen: Ge, fullscreenStyle: Ke, teleportTarget: Y, exitFullscreen: qe } = St({
1969
+ let { containerRef: B, svgRef: V, width: Pe, height: H, padding: U, legendY: W, inlineLegendLayout: Fe, innerW: G, innerH: K, bounds: Ie, hoverIndex: Le, tooltipRef: Re, tooltipPos: q, tooltipHandlers: ze, menuItems: Be, downloadLinkText: Ve, csvHref: He, downloadButtonText: J, triggerCsvDownload: Y, menuFilename: Ue, isFullscreen: We, fullscreenStyle: Ge, teleportTarget: X, exitFullscreen: Ke } = St({
1970
1970
  width: () => f.width,
1971
1971
  height: () => f.height,
1972
1972
  title: () => f.title,
@@ -1982,17 +1982,17 @@ var en = {
1982
1982
  downloadButton: () => f.downloadButton,
1983
1983
  fullscreenTarget: () => f.fullscreenTarget,
1984
1984
  chartPadding: () => f.chartPadding,
1985
- inlineLegendLabels: () => P.value,
1985
+ inlineLegendLabels: () => N.value,
1986
1986
  hasTooltipSlot: () => z.value,
1987
1987
  getCsv: we,
1988
1988
  pointerToIndex: Ne,
1989
1989
  onHover: (e) => ee("hover", e),
1990
- extraBelowHeight: () => me.value.extraHeight
1991
- }), Je = n(() => Ee(f.axisLabelStyle, { fontSize: 13 })), X = n(() => Ee(f.tickLabelStyle, {
1990
+ extraBelowHeight: () => he.value.extraHeight
1991
+ }), qe = n(() => Ee(f.axisLabelStyle, { fontSize: 13 })), Z = n(() => Ee(f.tickLabelStyle, {
1992
1992
  fontSize: 10,
1993
1993
  fillOpacity: Te
1994
- })), Ye = n(() => Ee(f.legendStyle, { fontSize: 11 })), Xe = n(() => {
1995
- let e = f.titleStyle, t = e?.align ?? "left", n = Le.value, r = t === "left" ? n.left : t === "right" ? n.right : n.left + n.width / 2, i = t === "left" ? "start" : t === "right" ? "end" : "middle";
1994
+ })), Je = n(() => Ee(f.legendStyle, { fontSize: 11 })), Ye = n(() => {
1995
+ 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";
1996
1996
  return {
1997
1997
  lines: (f.title ?? "").split("\n"),
1998
1998
  fontSize: e?.fontSize ?? 14,
@@ -2002,9 +2002,9 @@ var en = {
2002
2002
  x: r,
2003
2003
  anchor: i
2004
2004
  };
2005
- }), Qe = n(() => {
2006
- let e = Ie.value.positions, t = H.value.left, n = U.value;
2007
- return he.value.map((r, i) => {
2005
+ }), Ze = n(() => {
2006
+ let e = Fe.value.positions, t = U.value.left, n = W.value;
2007
+ return ge.value.map((r, i) => {
2008
2008
  let a = e[i];
2009
2009
  return {
2010
2010
  ...r,
@@ -2014,48 +2014,48 @@ var en = {
2014
2014
  });
2015
2015
  });
2016
2016
  return (n, l) => (_(), r(t, {
2017
- to: x(Y),
2018
- disabled: !x(Ge)
2017
+ to: x(X),
2018
+ disabled: !x(We)
2019
2019
  }, [o("div", d({
2020
2020
  ref_key: "containerRef",
2021
- ref: Pe
2021
+ ref: B
2022
2022
  }, n.$attrs, {
2023
- class: ["line-chart-wrapper", { "is-fullscreen": x(Ge) }],
2024
- style: x(Ke)
2023
+ class: ["line-chart-wrapper", { "is-fullscreen": x(We) }],
2024
+ style: x(Ge)
2025
2025
  }), [
2026
2026
  c.menu ? (_(), r(ve, {
2027
2027
  key: 0,
2028
- items: x(Ve),
2029
- "is-fullscreen": x(Ge),
2030
- onClose: x(qe)
2028
+ items: x(Be),
2029
+ "is-fullscreen": x(We),
2030
+ onClose: x(Ke)
2031
2031
  }, null, 8, [
2032
2032
  "items",
2033
2033
  "is-fullscreen",
2034
2034
  "onClose"
2035
2035
  ])) : i("", !0),
2036
- o("div", en, b(x(Ge) ? "Chart expanded to fill window" : ""), 1),
2036
+ o("div", en, b(x(We) ? "Chart expanded to fill window" : ""), 1),
2037
2037
  (_(), a("svg", {
2038
2038
  ref_key: "svgRef",
2039
- ref: B,
2040
- width: x(Fe),
2041
- height: ge.value,
2039
+ ref: V,
2040
+ width: x(Pe),
2041
+ height: _e.value,
2042
2042
  role: g.value || void 0,
2043
2043
  "aria-label": p.value || void 0
2044
2044
  }, [
2045
2045
  c.title ? (_(), a("text", {
2046
2046
  key: 0,
2047
- x: Xe.value.x,
2048
- y: Xe.value.lineHeight,
2049
- "text-anchor": Xe.value.anchor,
2050
- "font-size": Xe.value.fontSize,
2051
- "font-weight": Xe.value.fontWeight,
2052
- fill: Xe.value.color
2053
- }, [(_(!0), a(e, null, y(Xe.value.lines, (e, t) => (_(), a("tspan", {
2047
+ x: Ye.value.x,
2048
+ y: Ye.value.lineHeight,
2049
+ "text-anchor": Ye.value.anchor,
2050
+ "font-size": Ye.value.fontSize,
2051
+ "font-weight": Ye.value.fontWeight,
2052
+ fill: Ye.value.color
2053
+ }, [(_(!0), a(e, null, y(Ye.value.lines, (e, t) => (_(), a("tspan", {
2054
2054
  key: t,
2055
- x: Xe.value.x,
2056
- dy: t === 0 ? 0 : Xe.value.lineHeight
2055
+ x: Ye.value.x,
2056
+ dy: t === 0 ? 0 : Ye.value.lineHeight
2057
2057
  }, b(e), 9, rn))), 128))], 8, nn)) : i("", !0),
2058
- Qe.value.length > 0 ? (_(), a("g", an, [(_(!0), a(e, null, y(Qe.value, (t, n) => (_(), a(e, { key: "ileg" + n }, [t.type === "series" ? (_(), a("line", {
2058
+ Ze.value.length > 0 ? (_(), a("g", an, [(_(!0), a(e, null, y(Ze.value, (t, n) => (_(), a(e, { key: "ileg" + n }, [t.type === "series" ? (_(), a("line", {
2059
2059
  key: 0,
2060
2060
  x1: t.x,
2061
2061
  y1: t.y,
@@ -2076,31 +2076,31 @@ var en = {
2076
2076
  }, null, 8, sn)), o("text", {
2077
2077
  x: t.x + 18,
2078
2078
  y: t.y + 4,
2079
- "font-size": Ye.value.fontSize,
2080
- fill: Ye.value.fill,
2081
- "font-weight": Ye.value.fontWeight
2079
+ "font-size": Je.value.fontSize,
2080
+ fill: Je.value.fill,
2081
+ "font-weight": Je.value.fontWeight
2082
2082
  }, b(t.label), 9, cn)], 64))), 128))])) : i("", !0),
2083
2083
  o("line", {
2084
- x1: x(F)(x(H).left),
2085
- y1: x(F)(x(H).top),
2086
- x2: x(F)(x(H).left),
2087
- y2: x(F)(x(H).top + x(G)),
2084
+ x1: x(F)(x(U).left),
2085
+ y1: x(F)(x(U).top),
2086
+ x2: x(F)(x(U).left),
2087
+ y2: x(F)(x(U).top + x(K)),
2088
2088
  stroke: "currentColor",
2089
2089
  "stroke-opacity": "0.3"
2090
2090
  }, null, 8, ln),
2091
2091
  o("line", {
2092
- x1: x(F)(x(H).left),
2093
- y1: x(F)(x(H).top + x(G)),
2094
- x2: x(F)(x(H).left + x(W)),
2095
- y2: x(F)(x(H).top + x(G)),
2092
+ x1: x(F)(x(U).left),
2093
+ y1: x(F)(x(U).top + x(K)),
2094
+ x2: x(F)(x(U).left + x(G)),
2095
+ y2: x(F)(x(U).top + x(K)),
2096
2096
  stroke: "currentColor",
2097
2097
  "stroke-opacity": "0.3"
2098
2098
  }, null, 8, un),
2099
2099
  c.yGrid ? (_(!0), a(e, { key: 2 }, y(ye.value, (e, t) => (_(), a("line", {
2100
2100
  key: "yg" + t,
2101
- x1: x(H).left,
2101
+ x1: x(U).left,
2102
2102
  y1: e.y,
2103
- x2: x(H).left + x(W),
2103
+ x2: x(U).left + x(G),
2104
2104
  y2: e.y,
2105
2105
  stroke: "currentColor",
2106
2106
  "stroke-opacity": "0.1"
@@ -2108,57 +2108,57 @@ var en = {
2108
2108
  c.xGrid ? (_(!0), a(e, { key: 3 }, y(I.value, (e, t) => (_(), a("line", {
2109
2109
  key: "xg" + t,
2110
2110
  x1: e.x,
2111
- y1: x(H).top,
2111
+ y1: x(U).top,
2112
2112
  x2: e.x,
2113
- y2: x(H).top + x(G),
2113
+ y2: x(U).top + x(K),
2114
2114
  stroke: "currentColor",
2115
2115
  "stroke-opacity": "0.1"
2116
2116
  }, null, 8, fn))), 128)) : i("", !0),
2117
2117
  (_(!0), a(e, null, y(ye.value, (e, t) => (_(), a("text", {
2118
2118
  key: "y" + t,
2119
2119
  "data-testid": "y-tick",
2120
- x: x(H).left - 6,
2120
+ x: x(U).left - 6,
2121
2121
  y: e.y,
2122
2122
  "text-anchor": "end",
2123
2123
  "dominant-baseline": "middle",
2124
- "font-size": X.value.fontSize,
2125
- fill: X.value.fill,
2126
- "font-weight": X.value.fontWeight,
2127
- "fill-opacity": X.value.fillOpacity
2124
+ "font-size": Z.value.fontSize,
2125
+ fill: Z.value.fill,
2126
+ "font-weight": Z.value.fontWeight,
2127
+ "fill-opacity": Z.value.fillOpacity
2128
2128
  }, b(e.value), 9, pn))), 128)),
2129
2129
  c.yLabel ? (_(), a("text", {
2130
2130
  key: 4,
2131
2131
  x: 0,
2132
2132
  y: 0,
2133
- transform: `translate(14, ${x(H).top + x(G) / 2}) rotate(-90)`,
2133
+ transform: `translate(14, ${x(U).top + x(K) / 2}) rotate(-90)`,
2134
2134
  "text-anchor": "middle",
2135
- "font-size": Je.value.fontSize,
2136
- fill: Je.value.fill,
2137
- "font-weight": Je.value.fontWeight
2135
+ "font-size": qe.value.fontSize,
2136
+ fill: qe.value.fill,
2137
+ "font-weight": qe.value.fontWeight
2138
2138
  }, b(c.yLabel), 9, mn)) : i("", !0),
2139
2139
  (_(!0), a(e, null, y(I.value, (e, t) => (_(), a("text", {
2140
2140
  key: "x" + t,
2141
2141
  "data-testid": "x-tick",
2142
2142
  x: e.x,
2143
- y: x(H).top + x(G) + 16,
2143
+ y: x(U).top + x(K) + 16,
2144
2144
  "text-anchor": e.anchor,
2145
- "font-size": X.value.fontSize,
2146
- fill: X.value.fill,
2147
- "font-weight": X.value.fontWeight,
2148
- "fill-opacity": X.value.fillOpacity
2145
+ "font-size": Z.value.fontSize,
2146
+ fill: Z.value.fill,
2147
+ "font-weight": Z.value.fontWeight,
2148
+ "fill-opacity": Z.value.fillOpacity
2149
2149
  }, b(e.value), 9, hn))), 128)),
2150
2150
  c.xLabel ? (_(), a("text", {
2151
2151
  key: 5,
2152
- x: x(H).left + x(W) / 2,
2153
- y: x(V) - 4,
2152
+ x: x(U).left + x(G) / 2,
2153
+ y: x(H) - 4,
2154
2154
  "text-anchor": "middle",
2155
- "font-size": Je.value.fontSize,
2156
- fill: Je.value.fill,
2157
- "font-weight": Je.value.fontWeight
2155
+ "font-size": qe.value.fontSize,
2156
+ fill: qe.value.fill,
2157
+ "font-weight": qe.value.fontWeight
2158
2158
  }, b(c.xLabel), 9, gn)) : i("", !0),
2159
2159
  (_(!0), a(e, null, y(oe.value, (e, t) => (_(), a("path", {
2160
2160
  key: "area" + t,
2161
- d: fe(e),
2161
+ d: pe(e),
2162
2162
  fill: e.color ?? "currentColor",
2163
2163
  "fill-opacity": e.opacity ?? .2,
2164
2164
  stroke: "none",
@@ -2167,7 +2167,7 @@ var en = {
2167
2167
  (_(!0), a(e, null, y(E.value, (t, n) => (_(), a(e, { key: n }, [
2168
2168
  t.line !== !1 && t.outline ? (_(), a("path", {
2169
2169
  key: 0,
2170
- d: ue(t),
2170
+ d: de(t),
2171
2171
  fill: "none",
2172
2172
  stroke: t.outlineColor ?? "var(--color-bg-0, #fff)",
2173
2173
  "stroke-width": (t.strokeWidth ?? 1.5) + (t.outlineWidth ?? 4),
@@ -2177,7 +2177,7 @@ var en = {
2177
2177
  }, null, 8, vn)) : i("", !0),
2178
2178
  t.line === !1 ? i("", !0) : (_(), a("path", {
2179
2179
  key: 1,
2180
- d: ue(t),
2180
+ d: de(t),
2181
2181
  fill: "none",
2182
2182
  stroke: t.color ?? "currentColor",
2183
2183
  "stroke-width": t.strokeWidth ?? 1.5,
@@ -2185,7 +2185,7 @@ var en = {
2185
2185
  "stroke-dasharray": t.dashed ? "6 3" : void 0,
2186
2186
  style: h(t.blendMode ? { mixBlendMode: t.blendMode } : void 0)
2187
2187
  }, null, 12, yn)),
2188
- t.dots ? (_(!0), a(e, { key: 2 }, y(de(t), (e, n) => (_(), a("circle", {
2188
+ t.dots ? (_(!0), a(e, { key: 2 }, y(fe(t), (e, n) => (_(), a("circle", {
2189
2189
  key: n,
2190
2190
  cx: e.x,
2191
2191
  cy: e.y,
@@ -2198,59 +2198,59 @@ var en = {
2198
2198
  ], 64))), 128)),
2199
2199
  (_(!0), a(e, null, y(c.areaSections ?? [], (t, n) => (_(), a(e, { key: "areasec" + n }, [
2200
2200
  o("path", {
2201
- d: pe(t),
2201
+ d: me(t),
2202
2202
  fill: t.color ?? (t.seriesIndex == null ? "#999" : E.value[t.seriesIndex]?.color ?? "currentColor"),
2203
2203
  "fill-opacity": t.opacity ?? .15,
2204
2204
  stroke: "none"
2205
2205
  }, null, 8, xn),
2206
2206
  t.seriesIndex == null ? i("", !0) : (_(), a("path", {
2207
2207
  key: 0,
2208
- d: pe(t, !1),
2208
+ d: me(t, !1),
2209
2209
  fill: "none",
2210
2210
  stroke: t.color ?? E.value[t.seriesIndex]?.color ?? "currentColor",
2211
2211
  "stroke-width": t.strokeWidth ?? 2,
2212
2212
  "stroke-dasharray": t.dashed ? "6 3" : void 0
2213
2213
  }, null, 8, Sn)),
2214
2214
  t.seriesIndex == null ? (_(), a(e, { key: 1 }, [o("line", {
2215
- x1: x(F)(N(t, "start")),
2216
- y1: x(H).top,
2217
- x2: x(F)(N(t, "start")),
2218
- y2: x(H).top + x(G),
2215
+ x1: x(F)(M(t, "start")),
2216
+ y1: x(U).top,
2217
+ x2: x(F)(M(t, "start")),
2218
+ y2: x(U).top + x(K),
2219
2219
  stroke: t.color ?? "#999",
2220
2220
  "stroke-width": t.strokeWidth ?? 2,
2221
2221
  "stroke-dasharray": t.dashed ? "6 3" : void 0
2222
2222
  }, null, 8, Cn), o("line", {
2223
- x1: x(F)(N(t, "end")),
2224
- y1: x(H).top,
2225
- x2: x(F)(N(t, "end")),
2226
- y2: x(H).top + x(G),
2223
+ x1: x(F)(M(t, "end")),
2224
+ y1: x(U).top,
2225
+ x2: x(F)(M(t, "end")),
2226
+ y2: x(U).top + x(K),
2227
2227
  stroke: t.color ?? "#999",
2228
2228
  "stroke-width": t.strokeWidth ?? 2,
2229
2229
  "stroke-dasharray": t.dashed ? "6 3" : void 0
2230
2230
  }, null, 8, wn)], 64)) : i("", !0),
2231
2231
  o("line", {
2232
- x1: x(F)(N(t, "start")),
2233
- y1: x(H).top + x(G) - 4,
2234
- x2: x(F)(N(t, "start")),
2235
- y2: x(H).top + x(G) + 4,
2232
+ x1: x(F)(M(t, "start")),
2233
+ y1: x(U).top + x(K) - 4,
2234
+ x2: x(F)(M(t, "start")),
2235
+ y2: x(U).top + x(K) + 4,
2236
2236
  stroke: "currentColor",
2237
2237
  "stroke-opacity": "0.4"
2238
2238
  }, null, 8, Tn),
2239
2239
  o("line", {
2240
- x1: x(F)(N(t, "end")),
2241
- y1: x(H).top + x(G) - 4,
2242
- x2: x(F)(N(t, "end")),
2243
- y2: x(H).top + x(G) + 4,
2240
+ x1: x(F)(M(t, "end")),
2241
+ y1: x(U).top + x(K) - 4,
2242
+ x2: x(F)(M(t, "end")),
2243
+ y2: x(U).top + x(K) + 4,
2244
2244
  stroke: "currentColor",
2245
2245
  "stroke-opacity": "0.4"
2246
2246
  }, null, 8, En)
2247
2247
  ], 64))), 128)),
2248
- z.value && x(Re) !== null ? (_(), a("line", {
2248
+ z.value && x(Le) !== null ? (_(), a("line", {
2249
2249
  key: 6,
2250
2250
  x1: x(F)(Oe.value),
2251
- y1: x(H).top,
2251
+ y1: x(U).top,
2252
2252
  x2: x(F)(Oe.value),
2253
- y2: x(H).top + x(G),
2253
+ y2: x(U).top + x(K),
2254
2254
  stroke: "currentColor",
2255
2255
  "stroke-opacity": "0.3",
2256
2256
  "stroke-dasharray": "4 2",
@@ -2268,26 +2268,26 @@ var en = {
2268
2268
  }, null, 8, On))), 128)),
2269
2269
  z.value ? (_(), a("rect", d({
2270
2270
  key: 7,
2271
- x: x(H).left,
2272
- y: x(H).top,
2273
- width: x(W),
2274
- height: x(G),
2271
+ x: x(U).left,
2272
+ y: x(U).top,
2273
+ width: x(G),
2274
+ height: x(K),
2275
2275
  fill: "transparent",
2276
2276
  style: {
2277
2277
  cursor: "crosshair",
2278
2278
  "touch-action": "pan-y"
2279
2279
  }
2280
- }, ne(x(Be), !0)), null, 16, kn)) : i("", !0),
2280
+ }, ne(x(ze), !0)), null, 16, kn)) : i("", !0),
2281
2281
  c.annotations && c.annotations.length > 0 ? (_(), r(x(yt), {
2282
2282
  key: 8,
2283
2283
  annotations: c.annotations,
2284
2284
  project: Me,
2285
- bounds: x(Le)
2285
+ bounds: x(Ie)
2286
2286
  }, null, 8, ["annotations", "bounds"])) : i("", !0),
2287
- (_(!0), a(e, null, y(me.value.labels, (e, t) => (_(), a("g", { key: "seclab" + t }, [
2287
+ (_(!0), a(e, null, y(he.value.labels, (e, t) => (_(), a("g", { key: "seclab" + t }, [
2288
2288
  o("circle", {
2289
2289
  cx: e.cx - e.textWidth / 2 - 2,
2290
- cy: _e.value + e.row * In + 4,
2290
+ cy: P.value + e.row * In + 4,
2291
2291
  r: "4",
2292
2292
  fill: e.color,
2293
2293
  "fill-opacity": e.fillOpacity,
@@ -2297,7 +2297,7 @@ var en = {
2297
2297
  e.labelText ? (_(), a("text", {
2298
2298
  key: 0,
2299
2299
  x: e.cx - e.textWidth / 2 + 8,
2300
- y: _e.value + e.row * In + 8,
2300
+ y: P.value + e.row * In + 8,
2301
2301
  "font-size": e.labelStyle.fontSize,
2302
2302
  "font-weight": e.labelStyle.fontWeight,
2303
2303
  fill: e.labelStyle.fill
@@ -2305,7 +2305,7 @@ var en = {
2305
2305
  e.descText ? (_(), a("text", {
2306
2306
  key: 1,
2307
2307
  x: e.cx - e.textWidth / 2 + 8,
2308
- y: _e.value + e.row * In + 22,
2308
+ y: P.value + e.row * In + 22,
2309
2309
  "font-size": e.descStyle.fontSize,
2310
2310
  "font-weight": e.descStyle.fontWeight,
2311
2311
  fill: e.descStyle.fill,
@@ -2313,18 +2313,18 @@ var en = {
2313
2313
  }, b(e.descText), 9, Mn)) : i("", !0)
2314
2314
  ]))), 128))
2315
2315
  ], 8, tn)),
2316
- z.value && x(Re) !== null && je.value ? (_(), a("div", {
2316
+ z.value && x(Le) !== null && je.value ? (_(), a("div", {
2317
2317
  key: 1,
2318
2318
  ref_key: "tooltipRef",
2319
- ref: ze,
2319
+ ref: Re,
2320
2320
  class: "chart-tooltip-content",
2321
2321
  style: h({
2322
2322
  position: "absolute",
2323
2323
  top: "0",
2324
2324
  left: "0",
2325
2325
  willChange: "transform",
2326
- transform: x(K) ? `translate3d(${x(K).left}px, ${x(K).top}px, 0) translateY(-50%)` : "translateY(-50%)",
2327
- visibility: x(K) ? "visible" : "hidden"
2326
+ transform: x(q) ? `translate3d(${x(q).left}px, ${x(q).top}px, 0) translateY(-50%)` : "translateY(-50%)",
2327
+ visibility: x(q) ? "visible" : "hidden"
2328
2328
  })
2329
2329
  }, [te(n.$slots, "tooltip", m(u(je.value)), () => [o("div", Nn, [je.value.xLabel ? (_(), a("div", Pn, b(je.value.xLabel), 1)) : i("", !0), (_(!0), a(e, null, y(je.value.values, (e) => (_(), a("div", {
2330
2330
  key: e.seriesIndex,
@@ -2333,18 +2333,18 @@ var en = {
2333
2333
  class: "line-chart-tooltip-swatch",
2334
2334
  style: h({ background: e.color })
2335
2335
  }, null, 4), s(" " + b(isFinite(e.value) ? x(ie)(e.value) : "—"), 1)]))), 128))])], !0)], 4)) : i("", !0),
2336
- x(He) ? (_(), a("a", {
2336
+ x(Ve) ? (_(), a("a", {
2337
2337
  key: 2,
2338
2338
  class: "line-chart-download-link",
2339
- href: x(Ue),
2340
- download: `${x(We)()}.csv`
2341
- }, b(x(He)), 9, Fn)) : i("", !0),
2342
- x(q) ? (_(), a("button", {
2339
+ href: x(He),
2340
+ download: `${x(Ue)()}.csv`
2341
+ }, b(x(Ve)), 9, Fn)) : i("", !0),
2342
+ x(J) ? (_(), a("button", {
2343
2343
  key: 3,
2344
2344
  type: "button",
2345
2345
  class: "line-chart-download-button",
2346
- onClick: l[0] ||= (...e) => x(J) && x(J)(...e)
2347
- }, b(x(q)), 1)) : i("", !0)
2346
+ onClick: l[0] ||= (...e) => x(Y) && x(Y)(...e)
2347
+ }, b(x(J)), 1)) : i("", !0)
2348
2348
  ], 16)], 8, ["to", "disabled"]));
2349
2349
  }
2350
2350
  }), [["__scopeId", "data-v-a3132bed"]]), Vn = {
@@ -2391,17 +2391,17 @@ var en = {
2391
2391
  "y1",
2392
2392
  "x2",
2393
2393
  "y2"
2394
- ], $ = [
2394
+ ], Zn = [
2395
2395
  "x1",
2396
2396
  "y1",
2397
2397
  "x2",
2398
2398
  "y2"
2399
- ], Zn = [
2399
+ ], Qn = [
2400
2400
  "x1",
2401
2401
  "y1",
2402
2402
  "x2",
2403
2403
  "y2"
2404
- ], Qn = [
2404
+ ], $ = [
2405
2405
  "x",
2406
2406
  "y",
2407
2407
  "width",
@@ -2483,7 +2483,7 @@ var en = {
2483
2483
  ], ur = { class: "bar-chart-tooltip" }, dr = {
2484
2484
  key: 0,
2485
2485
  class: "bar-chart-tooltip-label"
2486
- }, fr = ["href", "download"], pr = 22, mr = 2, hr = 11, gr = .6, _r = 4, vr = 4, yr = /* @__PURE__ */ _e(/* @__PURE__ */ l({
2486
+ }, fr = ["href", "download"], pr = 22, mr = 2, hr = 11, gr = .6, _r = 4, vr = 4, yr = /* @__PURE__ */ P(/* @__PURE__ */ l({
2487
2487
  inheritAttrs: !1,
2488
2488
  __name: "BarChart",
2489
2489
  props: {
@@ -2605,7 +2605,7 @@ var en = {
2605
2605
  max: a.max,
2606
2606
  range: a.max - a.min || 1
2607
2607
  };
2608
- }), oe = n(() => T.value ? H.value : U.value), D = n(() => T.value ? U.value : H.value), O = n(() => {
2608
+ }), oe = n(() => T.value ? U.value : W.value), D = n(() => T.value ? W.value : U.value), O = n(() => {
2609
2609
  let e = ie.value;
2610
2610
  return e > 0 ? oe.value / e : 0;
2611
2611
  }), k = n(() => O.value * (1 - f.barPadding)), se = n(() => {
@@ -2615,18 +2615,18 @@ var en = {
2615
2615
  let t = f.groupGap * (e - 1);
2616
2616
  return Math.max(1, (k.value - t) / e);
2617
2617
  });
2618
- function A(e) {
2619
- return (T.value ? B.value.left : B.value.top) + e * O.value;
2618
+ function ce(e) {
2619
+ return (T.value ? V.value.left : V.value.top) + e * O.value;
2620
2620
  }
2621
- let ce = n(() => {
2621
+ let le = n(() => {
2622
2622
  let { min: e, max: t } = E.value, n = f.valueMin ?? 0;
2623
- return j(Math.max(e, Math.min(t, n)));
2623
+ return A(Math.max(e, Math.min(t, n)));
2624
2624
  });
2625
- function j(e) {
2625
+ function A(e) {
2626
2626
  let { min: t, max: n } = E.value, r = R(e, t, n, f.valueScaleType);
2627
- return T.value ? B.value.top + U.value - r * U.value : B.value.left + r * H.value;
2627
+ return T.value ? V.value.top + W.value - r * W.value : V.value.left + r * U.value;
2628
2628
  }
2629
- function le(e, t, n, r, i, a, o, s, c, l) {
2629
+ function ue(e, t, n, r, i, a, o, s, c, l) {
2630
2630
  let u = Math.min(e, t), d = Math.abs(e - t);
2631
2631
  return T.value ? {
2632
2632
  x: n,
@@ -2652,34 +2652,34 @@ var en = {
2652
2652
  seriesIndex: l
2653
2653
  };
2654
2654
  }
2655
- let M = n(() => {
2655
+ let j = n(() => {
2656
2656
  let e = [], t = S.value, n = t.length;
2657
2657
  if (n === 0) return e;
2658
- let r = ie.value, i = O.value, a = k.value, o = se.value, s = (i - a) / 2, c = ce.value;
2658
+ let r = ie.value, i = O.value, a = k.value, o = se.value, s = (i - a) / 2, c = le.value;
2659
2659
  for (let i = 0; i < r; i++) {
2660
- let r = A(i) + s;
2660
+ let r = ce(i) + s;
2661
2661
  if (f.layout === "stacked") {
2662
2662
  let o = 0, s = 0;
2663
2663
  for (let c = 0; c < n; c++) {
2664
2664
  let n = t[c], l = Number(n.data[i] ?? NaN);
2665
2665
  if (!isFinite(l)) continue;
2666
2666
  let u = l >= 0 ? o : s, d = u + l;
2667
- e.push(le(j(u), j(d), r, a, n.color ?? P(c), n.opacity ?? 1, n.blendMode, l, i, c)), l >= 0 ? o = d : s = d;
2667
+ e.push(ue(A(u), A(d), r, a, n.color ?? N(c), n.opacity ?? 1, n.blendMode, l, i, c)), l >= 0 ? o = d : s = d;
2668
2668
  }
2669
2669
  } else if (f.layout === "overlay") for (let o = 0; o < n; o++) {
2670
2670
  let n = t[o], s = Number(n.data[i] ?? NaN);
2671
- isFinite(s) && e.push(le(c, j(s), r, a, n.color ?? P(o), n.opacity ?? 1, n.blendMode, s, i, o));
2671
+ isFinite(s) && e.push(ue(c, A(s), r, a, n.color ?? N(o), n.opacity ?? 1, n.blendMode, s, i, o));
2672
2672
  }
2673
2673
  else for (let a = 0; a < n; a++) {
2674
2674
  let s = t[a], l = Number(s.data[i] ?? NaN);
2675
2675
  if (!isFinite(l)) continue;
2676
2676
  let u = r + (n === 1 ? 0 : a * (o + f.groupGap));
2677
- e.push(le(c, j(l), u, o, s.color ?? P(a), s.opacity ?? 1, s.blendMode, l, i, a));
2677
+ e.push(ue(c, A(l), u, o, s.color ?? N(a), s.opacity ?? 1, s.blendMode, l, i, a));
2678
2678
  }
2679
2679
  }
2680
2680
  return e;
2681
2681
  });
2682
- function ue(e) {
2682
+ function de(e) {
2683
2683
  let t = Infinity, n = -Infinity;
2684
2684
  for (let r of e.data) {
2685
2685
  let e = Number(r);
@@ -2690,33 +2690,33 @@ var en = {
2690
2690
  max: n
2691
2691
  };
2692
2692
  }
2693
- function de(e, t, n) {
2694
- let r = (T.value ? B.value.left : B.value.top) + (e + .5) * O.value, i = n.max - n.min || 1, a = (t - n.min) / i;
2693
+ function fe(e, t, n) {
2694
+ let r = (T.value ? V.value.left : V.value.top) + (e + .5) * O.value, i = n.max - n.min || 1, a = (t - n.min) / i;
2695
2695
  return T.value ? {
2696
2696
  x: r,
2697
- y: B.value.top + U.value - a * U.value
2697
+ y: V.value.top + W.value - a * W.value
2698
2698
  } : {
2699
- x: B.value.left + a * H.value,
2699
+ x: V.value.left + a * U.value,
2700
2700
  y: r
2701
2701
  };
2702
2702
  }
2703
- let fe = n(() => {
2703
+ let pe = n(() => {
2704
2704
  let e = f.summaryLines;
2705
2705
  return !e || e.length === 0 ? [] : e.map((e, t) => ({
2706
2706
  data: e.data ?? v,
2707
2707
  x: e.x,
2708
- color: e.color ?? me(t),
2708
+ color: e.color ?? he(t),
2709
2709
  strokeWidth: e.strokeWidth ?? 2,
2710
2710
  dashed: e.dashed ?? !1,
2711
2711
  opacity: e.opacity ?? 1,
2712
2712
  blendMode: e.blendMode,
2713
2713
  dots: e.dots ?? !1,
2714
2714
  dotRadius: e.dotRadius ?? (e.strokeWidth ?? 2) + 1,
2715
- extent: ue(e),
2715
+ extent: de(e),
2716
2716
  legend: e.legend,
2717
2717
  showInLegend: e.showInLegend !== !1
2718
2718
  }));
2719
- }), N = n(() => O.value === 0 ? [] : fe.value.map((e) => {
2719
+ }), M = n(() => O.value === 0 ? [] : pe.value.map((e) => {
2720
2720
  let t = [], n = "", r = !1;
2721
2721
  for (let i = 0; i < e.data.length; i++) {
2722
2722
  let a = Number(e.data[i]), o = e.x ? Number(e.x[i]) : i;
@@ -2724,7 +2724,7 @@ var en = {
2724
2724
  r = !1;
2725
2725
  continue;
2726
2726
  }
2727
- let s = de(o, a, e.extent);
2727
+ let s = fe(o, a, e.extent);
2728
2728
  t.push(s), n += r ? `L${s.x},${s.y}` : `M${s.x},${s.y}`, r = !0;
2729
2729
  }
2730
2730
  return {
@@ -2732,16 +2732,16 @@ var en = {
2732
2732
  pathD: n,
2733
2733
  points: t
2734
2734
  };
2735
- })), pe = [
2735
+ })), me = [
2736
2736
  "var(--color-fg-1, #111)",
2737
2737
  "var(--color-danger, #ef4444)",
2738
2738
  "var(--color-success, #10b981)",
2739
2739
  "var(--color-info, #6366f1)"
2740
2740
  ];
2741
- function me(e) {
2742
- return pe[e % pe.length];
2741
+ function he(e) {
2742
+ return me[e % me.length];
2743
2743
  }
2744
- let he = [
2744
+ let ge = [
2745
2745
  "var(--color-primary, #3b82f6)",
2746
2746
  "var(--color-accent, #f59e0b)",
2747
2747
  "var(--color-success, #10b981)",
@@ -2749,14 +2749,14 @@ var en = {
2749
2749
  "var(--color-info, #6366f1)",
2750
2750
  "var(--color-warning, #d97706)"
2751
2751
  ];
2752
- function P(e) {
2753
- return he[e % he.length];
2752
+ function N(e) {
2753
+ return ge[e % ge.length];
2754
2754
  }
2755
- let ge = Ct(() => f.tooltipValueFormat, () => f.valueTickFormat), _e = n(() => {
2755
+ let _e = Ct(() => f.tooltipValueFormat, () => f.valueTickFormat), P = n(() => {
2756
2756
  let { min: e, max: t } = E.value, n = (e) => f.valueTickFormat === void 0 ? L(e) : ae(e, f.valueTickFormat);
2757
2757
  if (e === t) return [{
2758
2758
  value: n(e),
2759
- pos: F(j(e))
2759
+ pos: F(A(e))
2760
2760
  }];
2761
2761
  let r = T.value ? 50 : 80;
2762
2762
  return (f.valueScaleType === "log" ? Ce({
@@ -2770,7 +2770,7 @@ var en = {
2770
2770
  targetTickCount: D.value / r
2771
2771
  })).map((e) => ({
2772
2772
  value: n(e),
2773
- pos: F(j(e))
2773
+ pos: F(A(e))
2774
2774
  }));
2775
2775
  }), ye = n(() => {
2776
2776
  let e = ie.value, t = w.value;
@@ -2778,7 +2778,7 @@ var en = {
2778
2778
  let e = Infinity, n = -Infinity;
2779
2779
  for (let r of t) Number.isFinite(r) && (r < e && (e = r), r > n && (n = r));
2780
2780
  if (!Number.isFinite(e) || e === n) return [];
2781
- let r = T.value ? H.value : U.value, i = Math.max(2, Math.floor(r / 80)), a = qt(e, n, i, "utc"), o = a.unit, s = [], c = /* @__PURE__ */ new Set();
2781
+ let r = T.value ? U.value : W.value, i = Math.max(2, Math.floor(r / 80)), a = qt(e, n, i, "utc"), o = a.unit, s = [], c = /* @__PURE__ */ new Set();
2782
2782
  for (let e of a.values) {
2783
2783
  let n = -1, r = Infinity;
2784
2784
  for (let i = 0; i < t.length; i++) {
@@ -2787,7 +2787,7 @@ var en = {
2787
2787
  }
2788
2788
  if (n < 0 || c.has(n)) continue;
2789
2789
  c.add(n);
2790
- let i = A(n) + O.value / 2, a = f.categoryFormat ? f.categoryFormat(C.value[n], n) : $t(t[n], f.dateFormat, "utc", o);
2790
+ let i = ce(n) + O.value / 2, a = f.categoryFormat ? f.categoryFormat(C.value[n], n) : $t(t[n], f.dateFormat, "utc", o);
2791
2791
  s.push({
2792
2792
  label: a,
2793
2793
  pos: i,
@@ -2800,7 +2800,7 @@ var en = {
2800
2800
  for (let t = 0; t < e; t++) i[t] = r(C.value[t], t), i[t].length > a && (a = i[t].length);
2801
2801
  let o = f.tickLabelStyle?.fontSize ?? 10, s = T.value ? a * o * .6 + 8 : o * 1.2 + 8, c = O.value > 0 ? Math.max(1, Math.ceil(s / O.value)) : 1;
2802
2802
  for (let t = 0; t < e; t += c) {
2803
- let e = A(t) + O.value / 2;
2803
+ let e = ce(t) + O.value / 2;
2804
2804
  n.push({
2805
2805
  label: i[t],
2806
2806
  pos: e,
@@ -2813,10 +2813,10 @@ var en = {
2813
2813
  return S.value.forEach((t, n) => {
2814
2814
  !t.legend || t.showInLegend === !1 || e.push({
2815
2815
  label: t.legend,
2816
- color: t.color ?? P(n),
2816
+ color: t.color ?? N(n),
2817
2817
  kind: "bar"
2818
2818
  });
2819
- }), fe.value.forEach((t) => {
2819
+ }), pe.value.forEach((t) => {
2820
2820
  !t.legend || !t.showInLegend || e.push({
2821
2821
  label: t.legend,
2822
2822
  color: t.color,
@@ -2832,12 +2832,12 @@ var en = {
2832
2832
  label: e.legend,
2833
2833
  data: e.data
2834
2834
  }));
2835
- return Qe(C.value, e);
2835
+ return Ze(C.value, e);
2836
2836
  }
2837
2837
  let z = n(() => !!f.tooltipData || !!f.tooltipTrigger);
2838
2838
  function De(e, t) {
2839
2839
  if (!isFinite(e) || !isFinite(t) || O.value === 0) return null;
2840
- let n = (T.value ? B.value.left : B.value.top) + (e + .5) * O.value, r = j(t);
2840
+ let n = (T.value ? V.value.left : V.value.top) + (e + .5) * O.value, r = A(t);
2841
2841
  return T.value ? {
2842
2842
  x: n,
2843
2843
  y: r
@@ -2851,7 +2851,7 @@ var en = {
2851
2851
  if (!n) return null;
2852
2852
  let r = ie.value;
2853
2853
  if (r === 0 || O.value === 0) return null;
2854
- let i = T.value ? e - n.left - B.value.left : t - n.top - B.value.top;
2854
+ let i = T.value ? e - n.left - V.value.left : t - n.top - V.value.top;
2855
2855
  return Math.max(0, Math.min(r - 1, Math.floor(i / O.value)));
2856
2856
  }
2857
2857
  let ke = n(() => !!(f.categoryHeader || f.valueHeader)), Ae = n(() => {
@@ -2865,7 +2865,7 @@ var en = {
2865
2865
  ...t,
2866
2866
  top: (t.top ?? 0) + e
2867
2867
  } : t;
2868
- }), { containerRef: je, svgRef: Me, width: Ne, height: Pe, padding: B, legendY: Fe, inlineLegendLayout: V, innerW: H, innerH: U, bounds: Ie, hoverIndex: W, tooltipRef: G, tooltipPos: Le, tooltipHandlers: Re, menuItems: ze, downloadLinkText: K, csvHref: Be, downloadButtonText: Ve, triggerCsvDownload: He, menuFilename: Ue, isFullscreen: q, fullscreenStyle: J, teleportTarget: We, exitFullscreen: Ge } = St({
2868
+ }), { containerRef: je, svgRef: Me, width: Ne, height: B, padding: V, legendY: Pe, inlineLegendLayout: H, innerW: U, innerH: W, bounds: Fe, hoverIndex: G, tooltipRef: K, tooltipPos: Ie, tooltipHandlers: Le, menuItems: Re, downloadLinkText: q, csvHref: ze, downloadButtonText: Be, triggerCsvDownload: Ve, menuFilename: He, isFullscreen: J, fullscreenStyle: Y, teleportTarget: Ue, exitFullscreen: We } = St({
2869
2869
  width: () => f.width,
2870
2870
  height: () => f.height,
2871
2871
  title: () => f.title,
@@ -2887,11 +2887,11 @@ var en = {
2887
2887
  pointerToIndex: Oe,
2888
2888
  scrubAxis: () => T.value ? "x" : "y",
2889
2889
  onHover: (e) => ee("hover", e)
2890
- }), Ke = n(() => Ee(f.axisLabelStyle, { fontSize: 13 })), Y = n(() => Ee(f.tickLabelStyle, {
2890
+ }), Ge = n(() => Ee(f.axisLabelStyle, { fontSize: 13 })), X = n(() => Ee(f.tickLabelStyle, {
2891
2891
  fontSize: 10,
2892
2892
  fillOpacity: Te
2893
- })), qe = n(() => Ee(f.legendStyle, { fontSize: 11 })), Je = n(() => f.categoryAlign === "start" && !T.value ? mr : B.value.left), X = n(() => {
2894
- let e = f.titleStyle, t = e?.align ?? "left", n = Ie.value, r = t === "left" ? Je.value : t === "right" ? n.right : n.left + n.width / 2, i = t === "left" ? "start" : t === "right" ? "end" : "middle";
2893
+ })), Ke = n(() => Ee(f.legendStyle, { fontSize: 11 })), qe = n(() => f.categoryAlign === "start" && !T.value ? mr : V.value.left), Z = n(() => {
2894
+ let e = f.titleStyle, t = e?.align ?? "left", n = Fe.value, r = t === "left" ? qe.value : t === "right" ? n.right : n.left + n.width / 2, i = t === "left" ? "start" : t === "right" ? "end" : "middle";
2895
2895
  return {
2896
2896
  lines: (f.title ?? "").split("\n"),
2897
2897
  fontSize: e?.fontSize ?? 14,
@@ -2901,20 +2901,20 @@ var en = {
2901
2901
  x: r,
2902
2902
  anchor: i
2903
2903
  };
2904
- }), Ye = n(() => {
2905
- let e = W.value;
2904
+ }), Je = n(() => {
2905
+ let e = G.value;
2906
2906
  if (e === null) return;
2907
2907
  let t = w.value;
2908
2908
  return t && Number.isFinite(t[e]) ? $t(t[e], f.dateFormat, "utc") : C.value[e];
2909
- }), Xe = n(() => {
2910
- let e = W.value;
2909
+ }), Ye = n(() => {
2910
+ let e = G.value;
2911
2911
  if (e === null) return null;
2912
2912
  let t = S.value, n = [];
2913
2913
  for (let r = 0; r < t.length; r++) {
2914
2914
  let i = t[r];
2915
2915
  i.showInTooltip !== !1 && n.push({
2916
2916
  value: Number(i.data[e] ?? NaN),
2917
- color: i.color ?? P(r),
2917
+ color: i.color ?? N(r),
2918
2918
  seriesIndex: r
2919
2919
  });
2920
2920
  }
@@ -2924,23 +2924,23 @@ var en = {
2924
2924
  values: n,
2925
2925
  data: f.tooltipData?.[e] ?? null
2926
2926
  };
2927
- }), Ze = n(() => {
2928
- let e = W.value;
2927
+ }), Xe = n(() => {
2928
+ let e = G.value;
2929
2929
  if (e === null) return null;
2930
- let t = A(e);
2930
+ let t = ce(e);
2931
2931
  return T.value ? {
2932
2932
  x: t,
2933
- y: B.value.top,
2933
+ y: V.value.top,
2934
2934
  w: O.value,
2935
- h: U.value
2935
+ h: W.value
2936
2936
  } : {
2937
- x: B.value.left,
2937
+ x: V.value.left,
2938
2938
  y: t,
2939
- w: H.value,
2939
+ w: U.value,
2940
2940
  h: O.value
2941
2941
  };
2942
- }), $e = n(() => {
2943
- let e = V.value.positions, t = Je.value, n = Fe.value;
2942
+ }), Qe = n(() => {
2943
+ let e = H.value.positions, t = qe.value, n = Pe.value;
2944
2944
  return be.value.map((r, i) => {
2945
2945
  let a = e[i];
2946
2946
  return {
@@ -2949,7 +2949,7 @@ var en = {
2949
2949
  y: n + a.row * 20
2950
2950
  };
2951
2951
  });
2952
- }), et = n(() => {
2952
+ }), $e = n(() => {
2953
2953
  let e = f.barLabels;
2954
2954
  if (!e) return null;
2955
2955
  let t = e === !0 ? {} : e;
@@ -2964,23 +2964,23 @@ var en = {
2964
2964
  fontWeight: t.fontWeight
2965
2965
  };
2966
2966
  });
2967
- function tt(e, t) {
2968
- let n = et.value?.format;
2967
+ function et(e, t) {
2968
+ let n = $e.value?.format;
2969
2969
  return typeof n == "function" ? n(e, t) : n === void 0 ? f.valueTickFormat === void 0 ? L(e) : ae(e, f.valueTickFormat) : ae(e, n);
2970
2970
  }
2971
- function nt(e, t, n) {
2972
- for (let r = M.value.length - 1; r >= 0; r--) {
2973
- let i = M.value[r];
2971
+ function tt(e, t, n) {
2972
+ for (let r = j.value.length - 1; r >= 0; r--) {
2973
+ let i = j.value[r];
2974
2974
  if (i.categoryIndex === e && t >= i.x && t <= i.x + i.w && n >= i.y && n <= i.y + i.h) return i.color;
2975
2975
  }
2976
2976
  return null;
2977
2977
  }
2978
- let rt = n(() => {
2979
- let e = et.value;
2978
+ let nt = n(() => {
2979
+ let e = $e.value;
2980
2980
  if (!e) return [];
2981
2981
  let t = T.value, n = e.fontSize, r = [];
2982
- for (let i of M.value) {
2983
- let a = tt(i.value, {
2982
+ for (let i of j.value) {
2983
+ let a = et(i.value, {
2984
2984
  value: i.value,
2985
2985
  categoryIndex: i.categoryIndex,
2986
2986
  seriesIndex: i.seriesIndex,
@@ -3007,7 +3007,7 @@ var en = {
3007
3007
  hidden: !1
3008
3008
  });
3009
3009
  }
3010
- let i = t ? -B.value.top : Ne.value - 2, a = /* @__PURE__ */ new Map();
3010
+ let i = t ? -V.value.top : Ne.value - 2, a = /* @__PURE__ */ new Map();
3011
3011
  for (let e of r) {
3012
3012
  let t = a.get(e.bar.categoryIndex);
3013
3013
  t ? t.push(e) : a.set(e.bar.categoryIndex, [e]);
@@ -3040,7 +3040,7 @@ var en = {
3040
3040
  if (!o) l = e.color;
3041
3041
  else if (i.inside) l = kt(i.bar.color);
3042
3042
  else {
3043
- 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);
3043
+ 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);
3044
3044
  l = r ? kt(r) : "currentColor";
3045
3045
  }
3046
3046
  s.push({
@@ -3055,8 +3055,8 @@ var en = {
3055
3055
  });
3056
3056
  }
3057
3057
  return s;
3058
- }), it = n(() => {
3059
- let e = B.value.left - 6;
3058
+ }), rt = n(() => {
3059
+ let e = V.value.left - 6;
3060
3060
  switch (f.categoryAlign ?? "end") {
3061
3061
  case "start": return {
3062
3062
  anchor: "start",
@@ -3071,20 +3071,20 @@ var en = {
3071
3071
  x: e
3072
3072
  };
3073
3073
  }
3074
- }), at = n(() => {
3075
- let e = [], t = B.value.top - 7;
3074
+ }), it = n(() => {
3075
+ let e = [], t = V.value.top - 7;
3076
3076
  if (f.valueHeader && e.push({
3077
3077
  key: "vh",
3078
3078
  text: f.valueHeader,
3079
- x: B.value.left,
3079
+ x: V.value.left,
3080
3080
  y: t,
3081
3081
  anchor: "start"
3082
3082
  }), f.categoryHeader) {
3083
- let n = !T.value, r = it.value;
3083
+ let n = !T.value, r = rt.value;
3084
3084
  e.push({
3085
3085
  key: "ch",
3086
3086
  text: f.categoryHeader,
3087
- x: n ? r.x : B.value.left,
3087
+ x: n ? r.x : V.value.left,
3088
3088
  y: t,
3089
3089
  anchor: n ? r.anchor : "start"
3090
3090
  });
@@ -3092,58 +3092,58 @@ var en = {
3092
3092
  return e;
3093
3093
  });
3094
3094
  return (n, l) => (_(), r(t, {
3095
- to: x(We),
3096
- disabled: !x(q)
3095
+ to: x(Ue),
3096
+ disabled: !x(J)
3097
3097
  }, [o("div", d({
3098
3098
  ref_key: "containerRef",
3099
3099
  ref: je
3100
3100
  }, n.$attrs, {
3101
- class: ["bar-chart-wrapper", { "is-fullscreen": x(q) }],
3102
- style: x(J)
3101
+ class: ["bar-chart-wrapper", { "is-fullscreen": x(J) }],
3102
+ style: x(Y)
3103
3103
  }), [
3104
3104
  c.menu ? (_(), r(ve, {
3105
3105
  key: 0,
3106
- items: x(ze),
3107
- "is-fullscreen": x(q),
3108
- onClose: x(Ge)
3106
+ items: x(Re),
3107
+ "is-fullscreen": x(J),
3108
+ onClose: x(We)
3109
3109
  }, null, 8, [
3110
3110
  "items",
3111
3111
  "is-fullscreen",
3112
3112
  "onClose"
3113
3113
  ])) : i("", !0),
3114
- o("div", Vn, b(x(q) ? "Chart expanded to fill window" : ""), 1),
3114
+ o("div", Vn, b(x(J) ? "Chart expanded to fill window" : ""), 1),
3115
3115
  (_(), a("svg", {
3116
3116
  ref_key: "svgRef",
3117
3117
  ref: Me,
3118
3118
  width: x(Ne),
3119
- height: x(Pe),
3119
+ height: x(B),
3120
3120
  role: g.value || void 0,
3121
3121
  "aria-label": p.value || void 0
3122
3122
  }, [
3123
3123
  c.title ? (_(), a("text", {
3124
3124
  key: 0,
3125
- x: X.value.x,
3126
- y: X.value.lineHeight,
3127
- "text-anchor": X.value.anchor,
3128
- "font-size": X.value.fontSize,
3129
- "font-weight": X.value.fontWeight,
3130
- fill: X.value.color
3131
- }, [(_(!0), a(e, null, y(X.value.lines, (e, t) => (_(), a("tspan", {
3125
+ x: Z.value.x,
3126
+ y: Z.value.lineHeight,
3127
+ "text-anchor": Z.value.anchor,
3128
+ "font-size": Z.value.fontSize,
3129
+ "font-weight": Z.value.fontWeight,
3130
+ fill: Z.value.color
3131
+ }, [(_(!0), a(e, null, y(Z.value.lines, (e, t) => (_(), a("tspan", {
3132
3132
  key: t,
3133
- x: X.value.x,
3134
- dy: t === 0 ? 0 : X.value.lineHeight
3133
+ x: Z.value.x,
3134
+ dy: t === 0 ? 0 : Z.value.lineHeight
3135
3135
  }, b(e), 9, Wn))), 128))], 8, Un)) : i("", !0),
3136
- (_(!0), a(e, null, y(at.value, (e) => (_(), a("text", {
3136
+ (_(!0), a(e, null, y(it.value, (e) => (_(), a("text", {
3137
3137
  key: e.key,
3138
3138
  "data-testid": e.key === "ch" ? "category-header" : "value-header",
3139
3139
  x: e.x,
3140
3140
  y: e.y,
3141
3141
  "text-anchor": e.anchor,
3142
- "font-size": Ke.value.fontSize,
3143
- fill: Ke.value.fill,
3142
+ "font-size": Ge.value.fontSize,
3143
+ fill: Ge.value.fill,
3144
3144
  "font-weight": "600"
3145
3145
  }, b(e.text), 9, Gn))), 128)),
3146
- $e.value.length > 0 ? (_(), a("g", Kn, [(_(!0), a(e, null, y($e.value, (t, n) => (_(), a(e, { key: "ileg" + n }, [t.kind === "bar" ? (_(), a("rect", {
3146
+ Qe.value.length > 0 ? (_(), a("g", Kn, [(_(!0), a(e, null, y(Qe.value, (t, n) => (_(), a(e, { key: "ileg" + n }, [t.kind === "bar" ? (_(), a("rect", {
3147
3147
  key: 0,
3148
3148
  x: t.x,
3149
3149
  y: t.y - 5,
@@ -3162,111 +3162,111 @@ var en = {
3162
3162
  }, null, 8, Jn)), o("text", {
3163
3163
  x: t.x + 18,
3164
3164
  y: t.y + 4,
3165
- "font-size": qe.value.fontSize,
3166
- fill: qe.value.fill,
3167
- "font-weight": qe.value.fontWeight
3165
+ "font-size": Ke.value.fontSize,
3166
+ fill: Ke.value.fill,
3167
+ "font-weight": Ke.value.fontWeight
3168
3168
  }, b(t.label), 9, Yn)], 64))), 128))])) : i("", !0),
3169
3169
  !T.value || c.valueAxis ? (_(), a("line", {
3170
3170
  key: 2,
3171
- x1: x(F)(x(B).left),
3172
- y1: x(F)(x(B).top),
3173
- x2: x(F)(x(B).left),
3174
- y2: x(F)(x(B).top + x(U)),
3171
+ x1: x(F)(x(V).left),
3172
+ y1: x(F)(x(V).top),
3173
+ x2: x(F)(x(V).left),
3174
+ y2: x(F)(x(V).top + x(W)),
3175
3175
  stroke: "currentColor",
3176
3176
  "stroke-opacity": "0.3"
3177
3177
  }, null, 8, Xn)) : i("", !0),
3178
3178
  T.value || c.valueAxis ? (_(), a("line", {
3179
3179
  key: 3,
3180
- x1: x(F)(x(B).left),
3181
- y1: x(F)(x(B).top + x(U)),
3182
- x2: x(F)(x(B).left + x(H)),
3183
- y2: x(F)(x(B).top + x(U)),
3180
+ x1: x(F)(x(V).left),
3181
+ y1: x(F)(x(V).top + x(W)),
3182
+ x2: x(F)(x(V).left + x(U)),
3183
+ y2: x(F)(x(V).top + x(W)),
3184
3184
  stroke: "currentColor",
3185
3185
  "stroke-opacity": "0.3"
3186
- }, null, 8, $)) : i("", !0),
3187
- c.valueGrid && c.valueAxis ? (_(!0), a(e, { key: 4 }, y(_e.value, (e, t) => (_(), a("line", {
3186
+ }, null, 8, Zn)) : i("", !0),
3187
+ c.valueGrid && c.valueAxis ? (_(!0), a(e, { key: 4 }, y(P.value, (e, t) => (_(), a("line", {
3188
3188
  key: "vg" + t,
3189
- x1: T.value ? x(B).left : e.pos,
3190
- y1: T.value ? e.pos : x(B).top,
3191
- x2: T.value ? x(B).left + x(H) : e.pos,
3192
- y2: T.value ? e.pos : x(B).top + x(U),
3189
+ x1: T.value ? x(V).left : e.pos,
3190
+ y1: T.value ? e.pos : x(V).top,
3191
+ x2: T.value ? x(V).left + x(U) : e.pos,
3192
+ y2: T.value ? e.pos : x(V).top + x(W),
3193
3193
  stroke: "currentColor",
3194
3194
  "stroke-opacity": "0.1"
3195
- }, null, 8, Zn))), 128)) : i("", !0),
3196
- Ze.value && z.value ? (_(), a("rect", {
3195
+ }, null, 8, Qn))), 128)) : i("", !0),
3196
+ Xe.value && z.value ? (_(), a("rect", {
3197
3197
  key: 5,
3198
- x: Ze.value.x,
3199
- y: Ze.value.y,
3200
- width: Ze.value.w,
3201
- height: Ze.value.h,
3198
+ x: Xe.value.x,
3199
+ y: Xe.value.y,
3200
+ width: Xe.value.w,
3201
+ height: Xe.value.h,
3202
3202
  fill: "currentColor",
3203
3203
  "fill-opacity": "0.06",
3204
3204
  "pointer-events": "none"
3205
- }, null, 8, Qn)) : i("", !0),
3206
- c.valueAxis && T.value ? (_(!0), a(e, { key: 6 }, y(_e.value, (e, t) => (_(), a("text", {
3205
+ }, null, 8, $)) : i("", !0),
3206
+ c.valueAxis && T.value ? (_(!0), a(e, { key: 6 }, y(P.value, (e, t) => (_(), a("text", {
3207
3207
  key: "vt" + t,
3208
3208
  "data-testid": "value-tick",
3209
- x: x(B).left - 6,
3209
+ x: x(V).left - 6,
3210
3210
  y: e.pos,
3211
3211
  "text-anchor": "end",
3212
3212
  "dominant-baseline": "middle",
3213
- "font-size": Y.value.fontSize,
3214
- fill: Y.value.fill,
3215
- "font-weight": Y.value.fontWeight,
3216
- "fill-opacity": Y.value.fillOpacity
3217
- }, b(e.value), 9, $n))), 128)) : c.valueAxis ? (_(!0), a(e, { key: 7 }, y(_e.value, (e, t) => (_(), a("text", {
3213
+ "font-size": X.value.fontSize,
3214
+ fill: X.value.fill,
3215
+ "font-weight": X.value.fontWeight,
3216
+ "fill-opacity": X.value.fillOpacity
3217
+ }, b(e.value), 9, $n))), 128)) : c.valueAxis ? (_(!0), a(e, { key: 7 }, y(P.value, (e, t) => (_(), a("text", {
3218
3218
  key: "vt" + t,
3219
3219
  "data-testid": "value-tick",
3220
3220
  x: e.pos,
3221
- y: x(B).top + x(U) + 16,
3221
+ y: x(V).top + x(W) + 16,
3222
3222
  "text-anchor": "middle",
3223
- "font-size": Y.value.fontSize,
3224
- fill: Y.value.fill,
3225
- "font-weight": Y.value.fontWeight,
3226
- "fill-opacity": Y.value.fillOpacity
3223
+ "font-size": X.value.fontSize,
3224
+ fill: X.value.fill,
3225
+ "font-weight": X.value.fontWeight,
3226
+ "fill-opacity": X.value.fillOpacity
3227
3227
  }, b(e.value), 9, er))), 128)) : i("", !0),
3228
3228
  c.yLabel ? (_(), a("text", {
3229
3229
  key: 8,
3230
3230
  x: 0,
3231
3231
  y: 0,
3232
- transform: `translate(14, ${x(B).top + x(U) / 2}) rotate(-90)`,
3232
+ transform: `translate(14, ${x(V).top + x(W) / 2}) rotate(-90)`,
3233
3233
  "text-anchor": "middle",
3234
- "font-size": Ke.value.fontSize,
3235
- fill: Ke.value.fill,
3236
- "font-weight": Ke.value.fontWeight
3234
+ "font-size": Ge.value.fontSize,
3235
+ fill: Ge.value.fill,
3236
+ "font-weight": Ge.value.fontWeight
3237
3237
  }, b(c.yLabel), 9, tr)) : i("", !0),
3238
3238
  T.value ? (_(!0), a(e, { key: 9 }, y(ye.value, (e, t) => (_(), a("text", {
3239
3239
  key: "ct" + t,
3240
3240
  "data-testid": "category-tick",
3241
3241
  x: e.pos,
3242
- y: x(B).top + x(U) + 16,
3242
+ y: x(V).top + x(W) + 16,
3243
3243
  "text-anchor": e.anchor,
3244
- "font-size": Y.value.fontSize,
3245
- fill: Y.value.fill,
3246
- "font-weight": Y.value.fontWeight,
3247
- "fill-opacity": Y.value.fillOpacity
3244
+ "font-size": X.value.fontSize,
3245
+ fill: X.value.fill,
3246
+ "font-weight": X.value.fontWeight,
3247
+ "fill-opacity": X.value.fillOpacity
3248
3248
  }, b(e.label), 9, nr))), 128)) : (_(!0), a(e, { key: 10 }, y(ye.value, (e, t) => (_(), a("text", {
3249
3249
  key: "ct" + t,
3250
3250
  "data-testid": "category-tick",
3251
- x: it.value.x,
3251
+ x: rt.value.x,
3252
3252
  y: e.pos,
3253
- "text-anchor": it.value.anchor,
3253
+ "text-anchor": rt.value.anchor,
3254
3254
  "dominant-baseline": "middle",
3255
- "font-size": Y.value.fontSize,
3256
- fill: Y.value.fill,
3257
- "font-weight": Y.value.fontWeight,
3258
- "fill-opacity": Y.value.fillOpacity
3255
+ "font-size": X.value.fontSize,
3256
+ fill: X.value.fill,
3257
+ "font-weight": X.value.fontWeight,
3258
+ "fill-opacity": X.value.fillOpacity
3259
3259
  }, b(e.label), 9, rr))), 128)),
3260
3260
  c.xLabel ? (_(), a("text", {
3261
3261
  key: 11,
3262
- x: x(B).left + x(H) / 2,
3263
- y: x(Pe) - 4,
3262
+ x: x(V).left + x(U) / 2,
3263
+ y: x(B) - 4,
3264
3264
  "text-anchor": "middle",
3265
- "font-size": Ke.value.fontSize,
3266
- fill: Ke.value.fill,
3267
- "font-weight": Ke.value.fontWeight
3265
+ "font-size": Ge.value.fontSize,
3266
+ fill: Ge.value.fill,
3267
+ "font-weight": Ge.value.fontWeight
3268
3268
  }, b(c.xLabel), 9, ir)) : i("", !0),
3269
- (_(!0), a(e, null, y(M.value, (e, t) => (_(), a("rect", {
3269
+ (_(!0), a(e, null, y(j.value, (e, t) => (_(), a("rect", {
3270
3270
  key: "bar" + t,
3271
3271
  "data-testid": "bar",
3272
3272
  "data-category": e.categoryIndex,
@@ -3279,7 +3279,7 @@ var en = {
3279
3279
  "fill-opacity": e.opacity,
3280
3280
  style: h(e.blendMode ? { mixBlendMode: e.blendMode } : void 0)
3281
3281
  }, null, 12, ar))), 128)),
3282
- (_(!0), a(e, null, y(rt.value, (e) => (_(), a("text", {
3282
+ (_(!0), a(e, null, y(nt.value, (e) => (_(), a("text", {
3283
3283
  key: "blbl" + e.key,
3284
3284
  "data-testid": "bar-label",
3285
3285
  x: e.x,
@@ -3291,7 +3291,7 @@ var en = {
3291
3291
  fill: e.fill,
3292
3292
  "pointer-events": "none"
3293
3293
  }, b(e.text), 9, or))), 128)),
3294
- (_(!0), a(e, null, y(N.value, (t, n) => (_(), a(e, { key: "sl" + n }, [t.pathD ? (_(), a("path", {
3294
+ (_(!0), a(e, null, y(M.value, (t, n) => (_(), a(e, { key: "sl" + n }, [t.pathD ? (_(), a("path", {
3295
3295
  key: 0,
3296
3296
  "data-testid": "summary-line",
3297
3297
  d: t.pathD,
@@ -3314,52 +3314,52 @@ var en = {
3314
3314
  }, null, 12, cr))), 128)) : i("", !0)], 64))), 128)),
3315
3315
  z.value ? (_(), a("rect", d({
3316
3316
  key: 12,
3317
- x: x(B).left,
3318
- y: x(B).top,
3319
- width: x(H),
3320
- height: x(U),
3317
+ x: x(V).left,
3318
+ y: x(V).top,
3319
+ width: x(U),
3320
+ height: x(W),
3321
3321
  fill: "transparent",
3322
3322
  style: `cursor: crosshair; touch-action: ${T.value ? "pan-y" : "pan-x"}`
3323
- }, ne(x(Re), !0)), null, 16, lr)) : i("", !0),
3323
+ }, ne(x(Le), !0)), null, 16, lr)) : i("", !0),
3324
3324
  c.annotations && c.annotations.length > 0 ? (_(), r(x(yt), {
3325
3325
  key: 13,
3326
3326
  annotations: c.annotations,
3327
3327
  project: De,
3328
- bounds: x(Ie)
3328
+ bounds: x(Fe)
3329
3329
  }, null, 8, ["annotations", "bounds"])) : i("", !0)
3330
3330
  ], 8, Hn)),
3331
- z.value && x(W) !== null && Xe.value ? (_(), a("div", {
3331
+ z.value && x(G) !== null && Ye.value ? (_(), a("div", {
3332
3332
  key: 1,
3333
3333
  ref_key: "tooltipRef",
3334
- ref: G,
3334
+ ref: K,
3335
3335
  class: "chart-tooltip-content",
3336
3336
  style: h({
3337
3337
  position: "absolute",
3338
3338
  top: "0",
3339
3339
  left: "0",
3340
3340
  willChange: "transform",
3341
- transform: x(Le) ? `translate3d(${x(Le).left}px, ${x(Le).top}px, 0) translateY(-50%)` : "translateY(-50%)",
3342
- visibility: x(Le) ? "visible" : "hidden"
3341
+ transform: x(Ie) ? `translate3d(${x(Ie).left}px, ${x(Ie).top}px, 0) translateY(-50%)` : "translateY(-50%)",
3342
+ visibility: x(Ie) ? "visible" : "hidden"
3343
3343
  })
3344
- }, [te(n.$slots, "tooltip", m(u(Xe.value)), () => [o("div", ur, [Ye.value ? (_(), a("div", dr, b(Ye.value), 1)) : i("", !0), (_(!0), a(e, null, y(Xe.value.values, (e) => (_(), a("div", {
3344
+ }, [te(n.$slots, "tooltip", m(u(Ye.value)), () => [o("div", ur, [Je.value ? (_(), a("div", dr, b(Je.value), 1)) : i("", !0), (_(!0), a(e, null, y(Ye.value.values, (e) => (_(), a("div", {
3345
3345
  key: e.seriesIndex,
3346
3346
  class: "bar-chart-tooltip-row"
3347
3347
  }, [o("span", {
3348
3348
  class: "bar-chart-tooltip-swatch",
3349
3349
  style: h({ background: e.color })
3350
- }, null, 4), s(" " + b(isFinite(e.value) ? x(ge)(e.value) : "—"), 1)]))), 128))])], !0)], 4)) : i("", !0),
3351
- x(K) ? (_(), a("a", {
3350
+ }, null, 4), s(" " + b(isFinite(e.value) ? x(_e)(e.value) : "—"), 1)]))), 128))])], !0)], 4)) : i("", !0),
3351
+ x(q) ? (_(), a("a", {
3352
3352
  key: 2,
3353
3353
  class: "bar-chart-download-link",
3354
- href: x(Be),
3355
- download: `${x(Ue)()}.csv`
3356
- }, b(x(K)), 9, fr)) : i("", !0),
3357
- x(Ve) ? (_(), a("button", {
3354
+ href: x(ze),
3355
+ download: `${x(He)()}.csv`
3356
+ }, b(x(q)), 9, fr)) : i("", !0),
3357
+ x(Be) ? (_(), a("button", {
3358
3358
  key: 3,
3359
3359
  type: "button",
3360
3360
  class: "bar-chart-download-button",
3361
- onClick: l[0] ||= (...e) => x(He) && x(He)(...e)
3362
- }, b(x(Ve)), 1)) : i("", !0)
3361
+ onClick: l[0] ||= (...e) => x(Ve) && x(Ve)(...e)
3362
+ }, b(x(Be)), 1)) : i("", !0)
3363
3363
  ], 16)], 8, ["to", "disabled"]));
3364
3364
  }
3365
3365
  }), [["__scopeId", "data-v-251f7945"]]);
@@ -3461,7 +3461,7 @@ var Nr = {
3461
3461
  "pointer-events": "none",
3462
3462
  transform: "translateY(-50%)"
3463
3463
  }
3464
- }, Pr = /* @__PURE__ */ _e(/* @__PURE__ */ l({
3464
+ }, Pr = /* @__PURE__ */ P(/* @__PURE__ */ l({
3465
3465
  __name: "ChoroplethTooltip",
3466
3466
  props: { mode: { default: "float" } },
3467
3467
  setup(n, { expose: s }) {
@@ -3496,7 +3496,7 @@ var Nr = {
3496
3496
  }, Br = { class: "choropleth-legend-ticks" }, Vr = {
3497
3497
  key: 2,
3498
3498
  class: "choropleth-zoom-hint"
3499
- }, Hr = ["viewBox"], Ur = ["innerHTML"], Wr = "http://www.w3.org/2000/svg", Gr = 10, Kr = 600, qr = 250, Jr = 30, Yr = 450, Xr = 2, Zr = 2, Qr = 1e3, $r = 12, ei = "light-dark(#000, #fff)", ti = 24, ni = 350, ri = /* @__PURE__ */ _e(/* @__PURE__ */ l({
3499
+ }, Hr = ["viewBox"], Ur = ["innerHTML"], Wr = "http://www.w3.org/2000/svg", Gr = 10, Kr = 600, qr = 250, Jr = 30, Yr = 450, Xr = 2, Zr = 2, Qr = 1e3, $r = 12, ei = "light-dark(#000, #fff)", ti = 24, ni = 350, ri = /* @__PURE__ */ P(/* @__PURE__ */ l({
3500
3500
  inheritAttrs: !1,
3501
3501
  __name: "ChoroplethMap",
3502
3502
  props: {
@@ -3507,6 +3507,10 @@ var Nr = {
3507
3507
  state: {},
3508
3508
  width: {},
3509
3509
  height: {},
3510
+ tightFit: {
3511
+ type: [Boolean, Number],
3512
+ default: !1
3513
+ },
3510
3514
  colorScale: {},
3511
3515
  title: {},
3512
3516
  titleStyle: {},
@@ -3557,10 +3561,10 @@ var Nr = {
3557
3561
  "update:focus"
3558
3562
  ],
3559
3563
  setup(c, { emit: l }) {
3560
- let p = c, ne = n(() => p.ariaLabel ?? p.title), ie = n(() => p.role ?? (ne.value ? "figure" : void 0)), T = l, E = (e) => e, oe = v(null), D = v(null), O = v(null), k = v(null), se = v(null), A = v(null), ce = S(), P = n(() => !!p.tooltipTrigger || !!p.tooltipFormat || !!ce.tooltip), ge = n(() => {
3564
+ let p = c, ne = n(() => p.ariaLabel ?? p.title), ie = n(() => p.role ?? (ne.value ? "figure" : void 0)), T = l, E = (e) => e, oe = v(null), D = v(null), O = v(null), k = v(null), se = v(null), ce = v(null), le = S(), N = n(() => !!p.tooltipTrigger || !!p.tooltipFormat || !!le.tooltip), _e = n(() => {
3561
3565
  let e = p.legendStyle, t = {};
3562
3566
  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;
3563
- }), _e = n(() => {
3567
+ }), P = n(() => {
3564
3568
  let e = p.titleStyle, t = {
3565
3569
  "font-size": `${e?.fontSize ?? 14}px`,
3566
3570
  "line-height": `${e?.lineHeight ?? 18}px`,
@@ -3572,31 +3576,31 @@ var Nr = {
3572
3576
  }), F = /* @__PURE__ */ new Map(), ye = /* @__PURE__ */ new Map(), be = null, I = null, L = /* @__PURE__ */ new Map(), xe = /* @__PURE__ */ new Map(), R = n(() => p.renderer === "canvas"), Se = v(null), Ce = null, we = null, Te = null, z = null, Ee = /* @__PURE__ */ new Map(), De = [], Oe = 0, ke = 0, Ae = 0, je = !1, Me = null, Ne = {
3573
3577
  width: 0,
3574
3578
  height: 0
3575
- }, Pe = null, Fe = !1, V = null, H = v(!1), U = v(1), Ie = v(1), W = v(!1), ze = n(() => p.zoomMode === "scroll"), Be = n(() => p.zoom && (ze.value || !p.touchExpand && W.value)), Ve = 0, He = 0, Ue = 0, q = null, J = 0, We = null;
3576
- function Ge() {
3579
+ }, B = null, Pe = !1, H = null, U = v(!1), W = v(1), Fe = v(1), G = v(!1), Re = n(() => p.zoomMode === "scroll"), ze = n(() => p.zoom && (Re.value || !p.touchExpand && G.value)), Be = 0, Ve = 0, He = 0, J = null, Y = 0, Ue = null;
3580
+ function We() {
3577
3581
  let e = D.value, t = O.value;
3578
- if (!(!e || !t) && (e.addEventListener("touchstart", Fn, { passive: !0 }), e.addEventListener("touchend", In), e.addEventListener("touchcancel", Rn, { passive: !0 }), !K())) {
3582
+ if (!(!e || !t) && (e.addEventListener("touchstart", Ln, { passive: !0 }), e.addEventListener("touchend", Rn), e.addEventListener("touchcancel", Bn, { passive: !0 }), !q())) {
3579
3583
  if (R.value) {
3580
- e.addEventListener("click", kn), e.addEventListener("mousemove", Mn), e.addEventListener("mouseleave", Nn);
3584
+ e.addEventListener("click", jn), e.addEventListener("mousemove", Pn), e.addEventListener("mouseleave", Fn);
3581
3585
  return;
3582
3586
  }
3583
- t.addEventListener("click", kn), t.addEventListener("mouseover", kn), t.addEventListener("mousemove", An), t.addEventListener("mouseout", jn);
3587
+ t.addEventListener("click", jn), t.addEventListener("mouseover", jn), t.addEventListener("mousemove", Mn), t.addEventListener("mouseout", Nn);
3584
3588
  }
3585
3589
  }
3586
- function Ke() {
3590
+ function Ge() {
3587
3591
  let e = D.value, t = O.value;
3588
- e && (e.removeEventListener("touchstart", Fn), e.removeEventListener("touchend", In), e.removeEventListener("touchcancel", Rn), e.removeEventListener("click", kn), e.removeEventListener("mousemove", Mn), e.removeEventListener("mouseleave", Nn)), t && (t.removeEventListener("click", kn), t.removeEventListener("mouseover", kn), t.removeEventListener("mousemove", An), t.removeEventListener("mouseout", jn));
3592
+ e && (e.removeEventListener("touchstart", Ln), e.removeEventListener("touchend", Rn), e.removeEventListener("touchcancel", Bn), e.removeEventListener("click", jn), e.removeEventListener("mousemove", Pn), e.removeEventListener("mouseleave", Fn)), t && (t.removeEventListener("click", jn), t.removeEventListener("mouseover", jn), t.removeEventListener("mousemove", Mn), t.removeEventListener("mouseout", Nn));
3589
3593
  }
3590
- function qe() {
3591
- En();
3594
+ function Ke() {
3595
+ On();
3592
3596
  }
3593
- let Je = null;
3597
+ let qe = null;
3594
3598
  g(() => {
3595
- Ge(), X(), Bn(), et(), Yt(), D.value && typeof ResizeObserver < "u" && (Je = new ResizeObserver((e) => {
3599
+ We(), Z(), Hn(), $e(), Xt(), D.value && typeof ResizeObserver < "u" && (qe = new ResizeObserver((e) => {
3596
3600
  let t = e[0]?.contentRect;
3597
3601
  if (!t?.width) return;
3598
- let n = t.height ? Math.min(t.width / Z.value, t.height / gt.value) : t.width / Z.value;
3599
- if (Ie.value = n, ke = (t.width - n * Z.value) / 2, Ae = t.height ? (t.height - n * gt.value) / 2 : 0, R.value) {
3602
+ let n = t.height ? Math.min(t.width / ht.value, t.height / gt.value) : t.width / ht.value;
3603
+ if (Fe.value = n, ke = (t.width - n * ht.value) / 2, Ae = t.height ? (t.height - n * gt.value) / 2 : 0, R.value) {
3600
3604
  let e = Se.value, n = D.value;
3601
3605
  if (e && n) {
3602
3606
  let r = oe.value?.getBoundingClientRect(), i = n.getBoundingClientRect();
@@ -3604,53 +3608,53 @@ var Nr = {
3604
3608
  let a = typeof window < "u" && window.devicePixelRatio || 1;
3605
3609
  e.width = Math.max(1, Math.round(t.width * a)), e.height = Math.max(1, Math.round(t.height * a));
3606
3610
  }
3607
- vn();
3608
- } else xn();
3609
- }), Je.observe(D.value)), R.value && dn(), window.addEventListener("scroll", qe, {
3611
+ bn();
3612
+ } else Cn();
3613
+ }), qe.observe(D.value)), R.value && pn(), window.addEventListener("scroll", Ke, {
3610
3614
  passive: !0,
3611
3615
  capture: !0
3612
- }), window.addEventListener("resize", qe, { passive: !0 });
3616
+ }), window.addEventListener("resize", Ke, { passive: !0 });
3613
3617
  }), ee(() => {
3614
- Me?.disconnect(), Je?.disconnect(), un?.removeEventListener("change", fn), Ue && cancelAnimationFrame(Ue), Oe && cancelAnimationFrame(Oe), window.clearTimeout(J), Ye(), Ke(), window.removeEventListener("scroll", qe, { capture: !0 }), window.removeEventListener("resize", qe);
3618
+ Me?.disconnect(), qe?.disconnect(), fn?.removeEventListener("change", mn), He && cancelAnimationFrame(He), Oe && cancelAnimationFrame(Oe), window.clearTimeout(Y), Je(), Ge(), window.removeEventListener("scroll", Ke, { capture: !0 }), window.removeEventListener("resize", Ke);
3615
3619
  });
3616
- function X() {
3620
+ function Z() {
3617
3621
  if (!D.value || !O.value) return;
3618
- let e = N(D.value);
3619
- V = ue().scaleExtent([1, rt.value]).clickDistance(6).on("start", () => {
3622
+ let e = M(D.value);
3623
+ H = de().scaleExtent([1, nt.value]).clickDistance(6).on("start", () => {
3620
3624
  je = !0;
3621
3625
  }).on("zoom", (e) => {
3622
- En(), R.value ? vn() : O.value && O.value.setAttribute("transform", e.transform);
3626
+ On(), R.value ? bn() : O.value && O.value.setAttribute("transform", e.transform);
3623
3627
  let t = e.transform;
3624
- U.value = t.k, xn(), H.value = t.k !== 1 || t.x !== 0 || t.y !== 0, H.value && (W.value = !0);
3628
+ W.value = t.k, Cn(), U.value = t.k !== 1 || t.x !== 0 || t.y !== 0, U.value && (G.value = !0);
3625
3629
  }).on("end", () => {
3626
- je = !1, R.value && vn();
3627
- }), V.filter((e) => {
3630
+ je = !1, R.value && bn();
3631
+ }), H.filter((e) => {
3628
3632
  if (!p.zoom) return !1;
3629
- if (!ze.value) {
3633
+ if (!Re.value) {
3630
3634
  let t = $.isFullscreen.value;
3631
3635
  switch (e.type) {
3632
3636
  case "wheel":
3633
3637
  if (!t) return !1;
3634
3638
  break;
3635
3639
  case "dblclick":
3636
- if (K()) return !1;
3640
+ if (q()) return !1;
3637
3641
  break;
3638
3642
  case "mousedown":
3639
- if (!t && !W.value) return !1;
3643
+ if (!t && !G.value) return !1;
3640
3644
  break;
3641
3645
  case "touchstart":
3642
- if (!t && !Be.value && !(!p.touchExpand && p.zoomMode !== "scroll" && e.touches.length >= 2)) return !1;
3646
+ if (!t && !ze.value && !(!p.touchExpand && p.zoomMode !== "scroll" && e.touches.length >= 2)) return !1;
3643
3647
  break;
3644
3648
  }
3645
3649
  }
3646
3650
  return (!e.ctrlKey || e.type === "wheel") && !e.button;
3647
- }), e.call(V);
3651
+ }), e.call(H);
3648
3652
  }
3649
- function Ye() {
3650
- D.value && V && (N(D.value).on(".zoom", null), V = null);
3653
+ function Je() {
3654
+ D.value && H && (M(D.value).on(".zoom", null), H = null);
3651
3655
  }
3652
- function Ze(e) {
3653
- let t = Pt.value, n = At.value, r = [];
3656
+ function Xe(e) {
3657
+ let t = It.value, n = Mt.value, r = [];
3654
3658
  for (let i of e) {
3655
3659
  let e = i.geoType ?? p.geoType, a = t.get(e);
3656
3660
  if (!a) continue;
@@ -3668,19 +3672,19 @@ var Nr = {
3668
3672
  }
3669
3673
  return r;
3670
3674
  }
3671
- function Qe(e) {
3675
+ function Ze(e) {
3672
3676
  let t = /* @__PURE__ */ new Set();
3673
- for (let n of Ze(e)) n.geoType === p.geoType && t.add(String(n.feature.id));
3677
+ for (let n of Xe(e)) n.geoType === p.geoType && t.add(String(n.feature.id));
3674
3678
  return t;
3675
3679
  }
3676
- let $e = !1;
3677
- function et() {
3678
- if (!D.value || !V) return;
3679
- let e = Ze(Nt.value), t = e.filter((e) => e.geoType === p.geoType), n = e.filter((e) => e.geoType !== p.geoType);
3680
+ let Qe = !1;
3681
+ function $e() {
3682
+ if (!D.value || !H) return;
3683
+ let e = Xe(Ft.value), t = e.filter((e) => e.geoType === p.geoType), n = e.filter((e) => e.geoType !== p.geoType);
3680
3684
  if (R.value) {
3681
3685
  Ee.clear();
3682
3686
  for (let e of t) Ee.set(String(e.feature.id), e.item);
3683
- let e = Dt.value;
3687
+ let e = At.value;
3684
3688
  De = n.flatMap((t) => {
3685
3689
  let n = e(t.feature);
3686
3690
  return n ? [{
@@ -3689,88 +3693,88 @@ var Nr = {
3689
3693
  strokeWidth: t.item.strokeWidth,
3690
3694
  style: t.item.style
3691
3695
  }] : [];
3692
- }), vn();
3696
+ }), bn();
3693
3697
  } else {
3694
3698
  let e = /* @__PURE__ */ new Map();
3695
3699
  for (let n of t) {
3696
3700
  let t = F.get(String(n.feature.id));
3697
3701
  t && e.set(t, n.item);
3698
3702
  }
3699
- for (let [t] of L) e.has(t) || t === I || Cn(t);
3703
+ for (let [t] of L) e.has(t) || t === I || Tn(t);
3700
3704
  for (let [t, n] of e) {
3701
3705
  let e = L.get(t);
3702
- e != null && e.style === n.style && e.stroke === n.stroke && e.strokeWidth === n.strokeWidth && t !== I || t !== I && Sn(t, n);
3706
+ e != null && e.style === n.style && e.stroke === n.stroke && e.strokeWidth === n.strokeWidth && t !== I || t !== I && wn(t, n);
3703
3707
  }
3704
3708
  L.clear();
3705
3709
  for (let [t, n] of e) L.set(t, n);
3706
- tt(n);
3710
+ et(n);
3707
3711
  }
3708
3712
  if (e.length === 0) {
3709
- $e = !0, En();
3713
+ Qe = !0, On();
3710
3714
  return;
3711
3715
  }
3712
3716
  if (p.focusZoom === !1) {
3713
- $e = !0;
3717
+ Qe = !0;
3714
3718
  return;
3715
3719
  }
3716
- let r = N(D.value);
3720
+ let r = M(D.value);
3717
3721
  r.interrupt();
3718
- let i = $e;
3719
- $e = !0;
3720
- let [[a, o], [s, c]] = Dt.value.bounds({
3722
+ let i = Qe;
3723
+ Qe = !0;
3724
+ let [[a, o], [s, c]] = At.value.bounds({
3721
3725
  type: "FeatureCollection",
3722
3726
  features: e.map((e) => e.feature)
3723
- }), l = (a + s) / 2, u = (o + c) / 2, d = p.focusZoomLevel, f = de.translate(Z.value / 2 - d * l, gt.value / 2 - d * u).scale(d), m = t[0]?.feature ?? null, h = () => {
3724
- if (!P.value || !m) return;
3727
+ }), l = (a + s) / 2, u = (o + c) / 2, d = p.focusZoomLevel, f = fe.translate(ht.value / 2 - d * l, gt.value / 2 - d * u).scale(d), m = t[0]?.feature ?? null, h = () => {
3728
+ if (!N.value || !m) return;
3725
3729
  let e = String(m.id);
3726
3730
  if (R.value) {
3727
- let t = bn(e);
3728
- t && Zt(e, t.x, t.y);
3731
+ let t = Sn(e);
3732
+ t && $t(e, t.x, t.y);
3729
3733
  return;
3730
3734
  }
3731
3735
  let t = F.get(e);
3732
3736
  if (!t) return;
3733
3737
  let n = t.getBoundingClientRect();
3734
- Zt(e, n.left + n.width / 2, n.top + n.height / 2);
3738
+ $t(e, n.left + n.width / 2, n.top + n.height / 2);
3735
3739
  };
3736
- i ? ($t(), r.transition().duration(Yr).call(V.transform, f).on("end", h)) : (V.transform(r, f), h());
3740
+ i ? (tn(), r.transition().duration(Yr).call(H.transform, f).on("end", h)) : (H.transform(r, f), h());
3737
3741
  }
3738
- function tt(e) {
3742
+ function et(e) {
3739
3743
  let t = se.value;
3740
3744
  if (!t) return;
3741
3745
  let n = new Set(e.map((e) => e.key));
3742
3746
  for (let [e, t] of xe) n.has(e) || (t.el.remove(), xe.delete(e));
3743
- let r = Dt.value;
3747
+ let r = At.value;
3744
3748
  for (let { item: n, feature: i, key: a } of e) {
3745
3749
  let e = xe.get(a);
3746
3750
  if (!e) {
3747
3751
  let n = document.createElementNS(Wr, "path");
3748
3752
  n.setAttribute("d", r(i) ?? ""), n.setAttribute("fill", "none"), n.setAttribute("pointer-events", "none"), n.setAttribute("stroke-linejoin", "round"), n.setAttribute("class", "focus-overlay"), t.appendChild(n), e = { el: n }, xe.set(a, e);
3749
3753
  }
3750
- e.strokeWidth = n.strokeWidth, e.el.setAttribute("stroke", n.stroke ?? "#fff"), en(e.el, n.style);
3754
+ e.strokeWidth = n.strokeWidth, e.el.setAttribute("stroke", n.stroke ?? "#fff"), nn(e.el, n.style);
3751
3755
  }
3752
- xn();
3756
+ Cn();
3753
3757
  }
3754
- function nt() {
3755
- if (!D.value || !V) return;
3756
- Nt.value.length > 0 && T("update:focus", null);
3757
- let e = N(D.value);
3758
- e.interrupt(), $t();
3759
- let t = K() && !$.isFullscreen.value && !ze.value, n = e.transition().duration(Yr).call(V.transform, de);
3758
+ function tt() {
3759
+ if (!D.value || !H) return;
3760
+ Ft.value.length > 0 && T("update:focus", null);
3761
+ let e = M(D.value);
3762
+ e.interrupt(), tn();
3763
+ let t = q() && !$.isFullscreen.value && !Re.value, n = e.transition().duration(Yr).call(H.transform, fe);
3760
3764
  t && n.on("end", () => {
3761
- W.value = !1;
3765
+ G.value = !1;
3762
3766
  });
3763
3767
  }
3764
- let rt = n(() => Math.max(12, p.focusZoomLevel)), it = n(() => p.zoom && (K() ? $.isFullscreen.value || ze.value || !p.touchExpand : !0)), at = n(() => p.zoom && !K() && (ze.value || W.value || $.isFullscreen.value)), ot = n(() => p.zoom && p.zoomHint && !ze.value && !$.isFullscreen.value && (K() && p.touchExpand || !W.value)), st = n(() => K() ? "Double tap to zoom" : "Double click to zoom"), ct = n(() => {
3768
+ let nt = n(() => Math.max(12, p.focusZoomLevel)), rt = n(() => p.zoom && (q() ? $.isFullscreen.value || Re.value || !p.touchExpand : !0)), it = n(() => p.zoom && !q() && (Re.value || G.value || $.isFullscreen.value)), at = n(() => p.zoom && p.zoomHint && !Re.value && !$.isFullscreen.value && (q() && p.touchExpand || !G.value)), ot = n(() => q() ? "Double tap to zoom" : "Double click to zoom"), st = n(() => {
3765
3769
  let e = {};
3766
- return $.isFullscreen.value || Be.value ? e["touch-action"] = "none" : p.zoom && !ze.value && K() && (e["touch-action"] = p.touchExpand ? "manipulation" : "pan-x pan-y"), (W.value || $.isFullscreen.value || p.zoom && (ze.value || K())) && (e["will-change"] = "transform"), Object.keys(e).length ? e : void 0;
3770
+ return $.isFullscreen.value || ze.value ? e["touch-action"] = "none" : p.zoom && !Re.value && q() && (e["touch-action"] = p.touchExpand ? "manipulation" : "pan-x pan-y"), (G.value || $.isFullscreen.value || p.zoom && (Re.value || q())) && (e["will-change"] = "transform"), Object.keys(e).length ? e : void 0;
3767
3771
  });
3768
- function lt(e) {
3769
- if (!D.value || !V) return;
3770
- let t = N(D.value);
3771
- t.interrupt(), $t(), t.transition().duration(250).call(V.scaleBy, e);
3772
+ function ct(e) {
3773
+ if (!D.value || !H) return;
3774
+ let t = M(D.value);
3775
+ t.interrupt(), tn(), t.transition().duration(250).call(H.scaleBy, e);
3772
3776
  }
3773
- function ut(e, t) {
3777
+ function lt(e, t) {
3774
3778
  let n = D.value;
3775
3779
  if (!n) return null;
3776
3780
  let r = null;
@@ -3783,37 +3787,37 @@ var Nr = {
3783
3787
  let n = r.inverse();
3784
3788
  return [n.a * e + n.c * t + n.e, n.b * e + n.d * t + n.f];
3785
3789
  }
3786
- let i = n.getBoundingClientRect(), a = i.width ? Z.value / i.width : 1, o = i.height ? gt.value / i.height : 1;
3790
+ let i = n.getBoundingClientRect(), a = i.width ? ht.value / i.width : 1, o = i.height ? gt.value / i.height : 1;
3787
3791
  return [(e - i.left) * a, (t - i.top) * o];
3788
3792
  }
3789
- function dt(e, t) {
3790
- let n = D.value, r = Zr, i = Z.value / 2, a = gt.value / 2, o = ut(e, t);
3791
- return o && ([i, a] = fe(n).invert(o)), de.translate(Z.value / 2 - r * i, gt.value / 2 - r * a).scale(r);
3793
+ function ut(e, t) {
3794
+ let n = D.value, r = Zr, i = ht.value / 2, a = gt.value / 2, o = lt(e, t);
3795
+ return o && ([i, a] = pe(n).invert(o)), fe.translate(ht.value / 2 - r * i, gt.value / 2 - r * a).scale(r);
3792
3796
  }
3793
- function ft(e) {
3794
- if (!D.value || !V) return;
3795
- let t = N(D.value);
3796
- t.interrupt(), t.transition().duration(Yr).call(V.transform, e);
3797
+ function dt(e) {
3798
+ if (!D.value || !H) return;
3799
+ let t = M(D.value);
3800
+ t.interrupt(), t.transition().duration(Yr).call(H.transform, e);
3797
3801
  }
3798
- function pt(e, t) {
3799
- if (!D.value || !V) return;
3800
- let n = dt(e, t);
3801
- $.enter(), f(() => ft(n));
3802
+ function ft(e, t) {
3803
+ if (!D.value || !H) return;
3804
+ let n = ut(e, t);
3805
+ $.enter(), f(() => dt(n));
3802
3806
  }
3803
- function mt(e, t) {
3804
- !D.value || !V || ft(dt(e, t));
3807
+ function pt(e, t) {
3808
+ !D.value || !H || dt(ut(e, t));
3805
3809
  }
3806
3810
  C(() => p.focusZoomLevel, () => {
3807
- V && V.scaleExtent([1, rt.value]), et();
3811
+ H && H.scaleExtent([1, nt.value]), $e();
3808
3812
  }), C(() => p.state, () => {
3809
- if (!D.value || !V) return;
3810
- let e = N(D.value);
3811
- e.interrupt(), V.transform(e, de);
3813
+ if (!D.value || !H) return;
3814
+ let e = M(D.value);
3815
+ e.interrupt(), H.transform(e, fe);
3812
3816
  });
3813
- let ht = n(() => p.width && p.height ? p.height / p.width : .625), Z = n(() => Qr), gt = n(() => Qr * ht.value), _t = n(() => {
3817
+ let mt = n(() => p.width && p.height ? p.height / p.width : .625), ht = n(() => Qr), gt = n(() => Qr * mt.value), _t = n(() => {
3814
3818
  let e = re(p.topology), t = e?.objects?.states;
3815
3819
  if (!t) return [];
3816
- let n = pe(e, t);
3820
+ let n = me(e, t);
3817
3821
  return n.type === "FeatureCollection" ? n.features : [n];
3818
3822
  }), vt = n(() => {
3819
3823
  let e = p.state?.trim();
@@ -3857,7 +3861,7 @@ var Nr = {
3857
3861
  type: "Feature",
3858
3862
  id: e,
3859
3863
  properties: { name: n[e] ?? e },
3860
- geometry: me(r, t)
3864
+ geometry: he(r, t)
3861
3865
  });
3862
3866
  return {
3863
3867
  type: "FeatureCollection",
@@ -3867,13 +3871,13 @@ var Nr = {
3867
3871
  if (p.geoType === "hsas") return Ct.value;
3868
3872
  let e = vt.value;
3869
3873
  if (p.geoType === "counties") {
3870
- let t = re(p.topology), n = pe(t, t.objects.counties);
3874
+ let t = re(p.topology), n = me(t, t.objects.counties);
3871
3875
  return e ? {
3872
3876
  type: "FeatureCollection",
3873
3877
  features: n.features.filter((t) => String(t.id).padStart(5, "0").slice(0, 2) === e)
3874
3878
  } : n;
3875
3879
  }
3876
- let t = re(p.topology), n = pe(t, t.objects.states);
3880
+ let t = re(p.topology), n = me(t, t.objects.states);
3877
3881
  return e ? {
3878
3882
  type: "FeatureCollection",
3879
3883
  features: n.features.filter((t) => String(t.id).padStart(2, "0") === e)
@@ -3882,39 +3886,55 @@ var Nr = {
3882
3886
  if (p.geoType !== "counties" && p.geoType !== "hsas") return null;
3883
3887
  if (vt.value) return yt.value;
3884
3888
  let e = re(p.topology);
3885
- return he(e, e.objects.states, (e, t) => e !== t);
3889
+ return ge(e, e.objects.states, (e, t) => e !== t);
3886
3890
  }), Et = n(() => {
3891
+ let e = p.tightFit;
3892
+ return e === !0 ? 1 : e ? Math.max(0, Math.min(1, Number(e))) : 0;
3893
+ }), Dt = n(() => {
3894
+ if (Et.value <= 0 || vt.value || p.geoType === "hsas") return null;
3895
+ let e = wt.value, t = p.geoType === "counties" ? 5 : 2, n = e.features.filter((e) => {
3896
+ let n = String(e.id).padStart(t, "0").slice(0, 2);
3897
+ return n !== "02" && n !== "15";
3898
+ });
3899
+ return n.length === e.features.length ? null : {
3900
+ type: "FeatureCollection",
3901
+ features: n
3902
+ };
3903
+ }), kt = n(() => {
3887
3904
  let e = yt.value;
3888
3905
  if (vt.value && e) {
3889
- let t = [[$r, $r], [Z.value - $r, gt.value - $r]], n = j().fitExtent(t, e), r = M(n).centroid(e);
3890
- return Number.isFinite(r[0]) && Number.isFinite(r[1]) ? n : le().fitExtent(t, e);
3906
+ let t = [[$r, $r], [ht.value - $r, gt.value - $r]], n = A().fitExtent(t, e), r = j(n).centroid(e);
3907
+ return Number.isFinite(r[0]) && Number.isFinite(r[1]) ? n : ue().fitExtent(t, e);
3891
3908
  }
3892
- return j().fitExtent([[0, 0], [Z.value, gt.value]], wt.value);
3893
- }), Dt = n(() => M(Et.value)), kt = n(() => p.geoType === "counties" || p.geoType === "hsas" ? p.strokeWidth * .5 : p.strokeWidth), At = n(() => {
3909
+ let t = [[0, 0], [ht.value, gt.value]], n = A().fitExtent(t, wt.value), r = Dt.value;
3910
+ if (!r) return n;
3911
+ let i = A().fitExtent(t, r), a = Et.value, o = (e, t) => e + (t - e) * a, [s, c] = n.translate(), [l, u] = i.translate();
3912
+ return A().scale(o(n.scale(), i.scale())).translate([o(s, l), o(c, u)]);
3913
+ }), At = n(() => j(kt.value)), jt = n(() => p.geoType === "counties" || p.geoType === "hsas" ? p.strokeWidth * .5 : p.strokeWidth), Mt = n(() => {
3894
3914
  let e = /* @__PURE__ */ new Map();
3895
- for (let [t, n] of Pt.value) {
3915
+ for (let [t, n] of It.value) {
3896
3916
  let r = /* @__PURE__ */ new Map();
3897
3917
  for (let [e, t] of n) t.properties?.name != null && r.set(t.properties.name, e);
3898
3918
  e.set(t, r);
3899
3919
  }
3900
3920
  return e;
3901
3921
  });
3902
- function jt(e) {
3922
+ function Nt(e) {
3903
3923
  let t = p.dataGeoType;
3904
3924
  if (!t || t === p.geoType) return e;
3905
3925
  if (p.geoType === "counties" && t === "hsas") return bt.value?.fipsToHsa[e];
3906
3926
  if (p.geoType === "counties" && t === "states" || p.geoType === "hsas" && t === "states") return e.slice(0, 2);
3907
3927
  }
3908
- let Mt = n(() => {
3928
+ let Pt = n(() => {
3909
3929
  let e = /* @__PURE__ */ new Map();
3910
3930
  for (let t of wt.value.features) t.id != null && e.set(String(t.id), t);
3911
3931
  return e;
3912
- }), Nt = n(() => {
3932
+ }), Ft = n(() => {
3913
3933
  let e = p.focus;
3914
3934
  return e == null ? [] : (Array.isArray(e) ? e : [e]).map((e) => typeof e == "string" ? { id: e } : e);
3915
- }), Pt = n(() => {
3935
+ }), It = n(() => {
3916
3936
  let e = /* @__PURE__ */ new Map();
3917
- e.set(p.geoType, Mt.value);
3937
+ e.set(p.geoType, Pt.value);
3918
3938
  let t = re(p.topology), n = t?.objects;
3919
3939
  if (!n) return e;
3920
3940
  let r = (e) => {
@@ -3923,25 +3943,25 @@ var Nr = {
3923
3943
  return t;
3924
3944
  };
3925
3945
  if (!e.has("states") && n.states) {
3926
- let i = pe(t, n.states);
3946
+ let i = me(t, n.states);
3927
3947
  e.set("states", r(i.features));
3928
3948
  }
3929
3949
  if (!e.has("counties") && n.counties) {
3930
- let i = pe(t, n.counties);
3950
+ let i = me(t, n.counties);
3931
3951
  e.set("counties", r(i.features));
3932
3952
  }
3933
3953
  return !e.has("hsas") && n.counties && e.set("hsas", r(Ct.value.features)), e;
3934
- }), Ft = n(() => {
3954
+ }), Lt = n(() => {
3935
3955
  let e = /* @__PURE__ */ new Map();
3936
3956
  if (!p.data) return e;
3937
- let t = p.dataGeoType ?? p.geoType, n = At.value.get(t);
3957
+ let t = p.dataGeoType ?? p.geoType, n = Mt.value.get(t);
3938
3958
  for (let t of p.data) {
3939
3959
  e.set(t.id, t.value);
3940
3960
  let r = n?.get(t.id);
3941
3961
  r && e.set(r, t.value);
3942
3962
  }
3943
3963
  return e;
3944
- }), It = n(() => {
3964
+ }), Rt = n(() => {
3945
3965
  if (!p.data || p.data.length === 0) return {
3946
3966
  min: 0,
3947
3967
  max: 1
@@ -3958,120 +3978,118 @@ var Nr = {
3958
3978
  min: 0,
3959
3979
  max: 1
3960
3980
  };
3961
- }), Lt = n(() => Array.isArray(p.colorScale) && p.colorScale.length > 0 && "value" in p.colorScale[0]), Rt = n(() => Array.isArray(p.colorScale) && !Lt.value), zt = n(() => Rt.value ? "" : p.colorScale?.min ?? "#e5f0fa"), Bt = n(() => Rt.value ? "" : p.colorScale?.max ?? "#08519c");
3962
- function Vt(e) {
3963
- let [t, n, r] = Ot(zt.value) ?? [
3981
+ }), zt = n(() => Array.isArray(p.colorScale) && p.colorScale.length > 0 && "value" in p.colorScale[0]), Bt = n(() => Array.isArray(p.colorScale) && !zt.value), Vt = n(() => Bt.value ? "" : p.colorScale?.min ?? "#e5f0fa"), Ht = n(() => Bt.value ? "" : p.colorScale?.max ?? "#08519c");
3982
+ function Ut(e) {
3983
+ let [t, n, r] = Ot(Vt.value) ?? [
3964
3984
  229,
3965
3985
  240,
3966
3986
  250
3967
- ], [i, a, o] = Ot(Bt.value) ?? [
3987
+ ], [i, a, o] = Ot(Ht.value) ?? [
3968
3988
  8,
3969
3989
  81,
3970
3990
  156
3971
3991
  ];
3972
3992
  return `rgb(${Math.round(t + (i - t) * e)},${Math.round(n + (a - n) * e)},${Math.round(r + (o - r) * e)})`;
3973
3993
  }
3974
- let Ht = n(() => Rt.value ? p.colorScale.slice().sort((e, t) => t.min - e.min) : null), Ut = n(() => {
3975
- if (!Lt.value) return null;
3994
+ let Wt = n(() => Bt.value ? p.colorScale.slice().sort((e, t) => t.min - e.min) : null), Gt = n(() => {
3995
+ if (!zt.value) return null;
3976
3996
  let e = /* @__PURE__ */ new Map();
3977
3997
  for (let t of p.colorScale) e.set(t.value, t.color);
3978
3998
  return e;
3979
3999
  });
3980
- function Wt(e) {
3981
- let t = jt(e);
3982
- return t == null ? void 0 : Ft.value.get(t);
4000
+ function Kt(e) {
4001
+ let t = Nt(e);
4002
+ return t == null ? void 0 : Lt.value.get(t);
3983
4003
  }
3984
- function Gt(e) {
3985
- let t = Wt(e), n = p.noDataColor;
4004
+ function qt(e) {
4005
+ let t = Kt(e), n = p.noDataColor;
3986
4006
  if (t == null) return n;
3987
- let r = Ut.value;
4007
+ let r = Gt.value;
3988
4008
  if (r) return r.get(String(t)) ?? n;
3989
- let i = Ht.value;
4009
+ let i = Wt.value;
3990
4010
  if (i) {
3991
4011
  let e = t;
3992
4012
  for (let t of i) if (e >= t.min) return t.color;
3993
4013
  return n;
3994
4014
  }
3995
- let { min: a, max: o } = It.value;
3996
- return Vt((t - a) / (o - a));
4015
+ let { min: a, max: o } = Rt.value;
4016
+ return Ut((t - a) / (o - a));
3997
4017
  }
3998
- let Kt = (e) => e.properties?.name ?? String(e.id);
3999
- function qt(e) {
4018
+ let Jt = (e) => e.properties?.name ?? String(e.id);
4019
+ function Yt(e) {
4000
4020
  return e == null ? "" : typeof e == "number" && p.tooltipValueFormat !== void 0 ? ae(e, p.tooltipValueFormat) : String(e);
4001
4021
  }
4002
- function Jt(e, t) {
4003
- return t == null ? e : `${e}: ${qt(t)}`;
4022
+ function Q(e, t) {
4023
+ return t == null ? e : `${e}: ${Yt(t)}`;
4004
4024
  }
4005
- function Yt() {
4006
- let e = A.value?.getEl();
4025
+ function Xt() {
4026
+ let e = ce.value?.getEl();
4007
4027
  if (!e) return;
4008
4028
  Me?.disconnect();
4009
4029
  let t = !1;
4010
4030
  Me = new ResizeObserver((e) => {
4011
4031
  let n = e[0]?.contentRect;
4012
- n && (Ne.width = n.width, Ne.height = n.height, !t && Fe && Pe ? (t = !0, Q(Pe.x, Pe.y)) : t = !0);
4032
+ n && (Ne.width = n.width, Ne.height = n.height, !t && Pe && B ? (t = !0, Zt(B.x, B.y)) : t = !0);
4013
4033
  }), Me.observe(e);
4014
4034
  }
4015
- function Q(e, t) {
4016
- let n = A.value?.getEl();
4035
+ function Zt(e, t) {
4036
+ let n = ce.value?.getEl();
4017
4037
  if (!n) return;
4018
- let r = oe.value?.getBoundingClientRect(), { left: i, top: a } = B(e, t, Ne.width, Ne.height, p.tooltipClamp, r);
4038
+ let r = oe.value?.getBoundingClientRect(), { left: i, top: a } = V(e, t, Ne.width, Ne.height, p.tooltipClamp, r);
4019
4039
  n.style.transform = `translate3d(${i}px, ${a}px, 0) translateY(-50%)`;
4020
4040
  let o = typeof window < "u" ? window.visualViewport : null;
4021
4041
  if (!o || o.scale <= 1.01 && o.offsetTop < 1 && o.offsetLeft < 1) return;
4022
4042
  let s = n.getBoundingClientRect(), c = s.left - i, l = s.top + s.height / 2 - a;
4023
4043
  (Math.abs(c) > 1 || Math.abs(l) > 1) && (n.style.transform = `translate3d(${i - c}px, ${a - l}px, 0) translateY(-50%)`);
4024
4044
  }
4025
- let Xt = n(() => $.isFullscreen.value && K() ? "sheet" : "float");
4026
- function Zt(e, t, n) {
4045
+ let Qt = n(() => $.isFullscreen.value && q() ? "sheet" : "float");
4046
+ function $t(e, t, n) {
4027
4047
  let r = ye.get(e);
4028
4048
  if (!r) return;
4029
- let i = A.value;
4049
+ let i = ce.value;
4030
4050
  if (!i) return;
4031
- if (i.setData(r), Fe = !0, Xt.value === "sheet") {
4051
+ if (i.setData(r), Pe = !0, Qt.value === "sheet") {
4032
4052
  i.setOpen(!0);
4033
4053
  return;
4034
4054
  }
4035
4055
  let a = i.getEl();
4036
- a && (Pe = {
4056
+ a && (B = {
4037
4057
  x: t,
4038
4058
  y: n
4039
- }, Q(t, n), a.style.visibility = "visible");
4059
+ }, Zt(t, n), a.style.visibility = "visible");
4040
4060
  }
4041
- function Qt(e, t) {
4042
- !Fe || Xt.value === "sheet" || (Ve = e, He = t, !Ue && (Ue = requestAnimationFrame(() => {
4043
- Ue = 0;
4044
- let e = A.value?.getEl();
4045
- !e || !Fe || (Pe = {
4046
- x: Ve,
4047
- y: He
4048
- }, e.style.transform = `translate3d(${Ve + 16}px, ${He}px, 0) translateY(-50%)`);
4061
+ function en(e, t) {
4062
+ !Pe || Qt.value === "sheet" || (Be = e, Ve = t, !He && (He = requestAnimationFrame(() => {
4063
+ He = 0, Pe && (B = {
4064
+ x: Be,
4065
+ y: Ve
4066
+ }, Zt(Be, Ve));
4049
4067
  })));
4050
4068
  }
4051
- function $t() {
4052
- if (!Fe) return;
4053
- Fe = !1, Pe = null, A.value?.setOpen(!1);
4054
- let e = A.value?.getEl();
4069
+ function tn() {
4070
+ if (!Pe) return;
4071
+ Pe = !1, B = null, ce.value?.setOpen(!1);
4072
+ let e = ce.value?.getEl();
4055
4073
  e && (e.style.visibility = "hidden");
4056
4074
  }
4057
- function en(e, t) {
4075
+ function nn(e, t) {
4058
4076
  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"));
4059
4077
  }
4060
- function tn() {
4061
- return U.value * Ie.value || 1;
4078
+ function rn() {
4079
+ return W.value * Fe.value || 1;
4062
4080
  }
4063
- function nn(e) {
4064
- return e?.strokeWidth ?? kt.value + 1;
4081
+ function an(e) {
4082
+ return e?.strokeWidth ?? jt.value + 1;
4065
4083
  }
4066
- function rn() {
4084
+ function on() {
4067
4085
  let e = Ot(ei);
4068
4086
  return e ? `rgb(${e[0]},${e[1]},${e[2]})` : "#000";
4069
4087
  }
4070
- function an() {
4071
- let e = fe(D.value);
4088
+ function sn() {
4089
+ let e = pe(D.value);
4072
4090
  return {
4073
4091
  dpr: typeof window < "u" && window.devicePixelRatio || 1,
4074
- meetScale: Ie.value,
4092
+ meetScale: Fe.value,
4075
4093
  offsetX: ke,
4076
4094
  offsetY: Ae,
4077
4095
  zoom: {
@@ -4081,22 +4099,22 @@ var Nr = {
4081
4099
  }
4082
4100
  };
4083
4101
  }
4084
- function on() {
4102
+ function cn() {
4085
4103
  return {
4086
4104
  strokeColor: p.strokeColor,
4087
- strokeWidth: kt.value,
4088
- highlightStroke: rn(),
4105
+ strokeWidth: jt.value,
4106
+ highlightStroke: on(),
4089
4107
  hoveredId: z,
4090
4108
  focused: Ee,
4091
4109
  overlays: De
4092
4110
  };
4093
4111
  }
4094
- let sn = 0, cn = 0, ln = !1, un = null;
4095
- function dn() {
4096
- typeof window > "u" || typeof window.matchMedia != "function" || (un?.removeEventListener("change", fn), un = window.matchMedia(`(resolution: ${window.devicePixelRatio || 1}dppx)`), un.addEventListener("change", fn));
4112
+ let ln = 0, un = 0, dn = !1, fn = null;
4113
+ function pn() {
4114
+ typeof window > "u" || typeof window.matchMedia != "function" || (fn?.removeEventListener("change", mn), fn = window.matchMedia(`(resolution: ${window.devicePixelRatio || 1}dppx)`), fn.addEventListener("change", mn));
4097
4115
  }
4098
- function fn() {
4099
- dn();
4116
+ function mn() {
4117
+ pn();
4100
4118
  let e = Se.value, t = D.value;
4101
4119
  if (!R.value || !e || !t) return;
4102
4120
  let n = t.getBoundingClientRect();
@@ -4104,50 +4122,50 @@ var Nr = {
4104
4122
  let t = window.devicePixelRatio || 1;
4105
4123
  e.width = Math.max(1, Math.round(n.width * t)), e.height = Math.max(1, Math.round(n.height * t));
4106
4124
  }
4107
- vn();
4125
+ bn();
4108
4126
  }
4109
- let pn = null, mn = null, hn = 0;
4110
- function gn(e, t, n, r) {
4127
+ let hn = null, gn = null, _n = 0;
4128
+ function vn(e, t, n, r) {
4111
4129
  let i = (e, t) => e.dpr * ((t === "x" ? e.offsetX : e.offsetY) + e.meetScale * (t === "x" ? e.zoom.x : e.zoom.y)), a = t.dpr * t.meetScale * t.zoom.k / (r.dpr * r.meetScale * r.zoom.k);
4112
4130
  e.setTransform(a, 0, 0, a, i(t, "x") - a * i(r, "x"), i(t, "y") - a * i(r, "y")), e.drawImage(n, 0, 0), e.setTransform(1, 0, 0, 1, 0, 0);
4113
4131
  }
4114
- function _n() {
4132
+ function yn() {
4115
4133
  let e = Se.value;
4116
4134
  if (!e) return;
4117
4135
  let t = e.getContext("2d");
4118
4136
  if (!t) return;
4119
4137
  let n = () => typeof performance < "u" ? performance.now() : 0;
4120
4138
  if (t.setTransform(1, 0, 0, 1, 0, 0), t.clearRect(0, 0, e.width, e.height), !Ce) return;
4121
- let r = an();
4122
- if (ln && je && pn && mn && typeof t.drawImage == "function" && n() - hn < ni) {
4123
- gn(t, r, pn, mn), z && Or(t, Ce, r, on(), z);
4139
+ let r = sn();
4140
+ if (dn && je && hn && gn && typeof t.drawImage == "function" && n() - _n < ni) {
4141
+ vn(t, r, hn, gn), z && Or(t, Ce, r, cn(), z);
4124
4142
  return;
4125
4143
  }
4126
4144
  let i = n();
4127
- kr(t, Ce, r, on());
4145
+ kr(t, Ce, r, cn());
4128
4146
  let a = n() - i;
4129
- if (hn = i + a, a > ti ? (cn = 0, ++sn >= 2 && (ln = !0)) : (sn = 0, ++cn >= 2 && (ln = !1)), !ln || typeof document > "u") return;
4130
- pn ||= document.createElement("canvas"), pn.width !== e.width && (pn.width = e.width), pn.height !== e.height && (pn.height = e.height);
4131
- let o = pn.getContext("2d");
4132
- o && typeof o.drawImage == "function" ? (o.setTransform(1, 0, 0, 1, 0, 0), o.clearRect(0, 0, pn.width, pn.height), o.drawImage(e, 0, 0), mn = r) : mn = null;
4147
+ if (_n = i + a, a > ti ? (un = 0, ++ln >= 2 && (dn = !0)) : (ln = 0, ++un >= 2 && (dn = !1)), !dn || typeof document > "u") return;
4148
+ hn ||= document.createElement("canvas"), hn.width !== e.width && (hn.width = e.width), hn.height !== e.height && (hn.height = e.height);
4149
+ let o = hn.getContext("2d");
4150
+ o && typeof o.drawImage == "function" ? (o.setTransform(1, 0, 0, 1, 0, 0), o.clearRect(0, 0, hn.width, hn.height), o.drawImage(e, 0, 0), gn = r) : gn = null;
4133
4151
  }
4134
- function vn() {
4152
+ function bn() {
4135
4153
  !R.value || Oe || (Oe = requestAnimationFrame(() => {
4136
- Oe = 0, _n();
4154
+ Oe = 0, yn();
4137
4155
  }));
4138
4156
  }
4139
- function yn(e, t) {
4157
+ function xn(e, t) {
4140
4158
  let n = D.value;
4141
4159
  if (!n || !Ce || !Te) return null;
4142
- let r = ut(e, t);
4160
+ let r = lt(e, t);
4143
4161
  if (!r) return null;
4144
- let [i, a] = fe(n).invert(r), o = Mr(Te, Ce, i, a);
4162
+ let [i, a] = pe(n).invert(r), o = Mr(Te, Ce, i, a);
4145
4163
  return o == null ? null : Ce.items[o].id;
4146
4164
  }
4147
- function bn(e) {
4148
- let t = D.value, n = Mt.value.get(e);
4165
+ function Sn(e) {
4166
+ let t = D.value, n = Pt.value.get(e);
4149
4167
  if (!t || !n) return null;
4150
- let [[r, i], [a, o]] = Dt.value.bounds(n), [s, c] = fe(t).apply([(r + a) / 2, (i + o) / 2]), l = null;
4168
+ let [[r, i], [a, o]] = At.value.bounds(n), [s, c] = pe(t).apply([(r + a) / 2, (i + o) / 2]), l = null;
4151
4169
  try {
4152
4170
  l = t.getScreenCTM();
4153
4171
  } catch {
@@ -4158,58 +4176,58 @@ var Nr = {
4158
4176
  y: l.b * s + l.d * c + l.f
4159
4177
  } : null;
4160
4178
  }
4161
- function xn() {
4179
+ function Cn() {
4162
4180
  if (R.value) return;
4163
- let e = tn(), t = kt.value;
4181
+ let e = rn(), t = jt.value;
4164
4182
  k.value?.setAttribute("stroke-width", String(t / e)), be?.setAttribute("stroke-width", String(1 / e)), se.value?.setAttribute("stroke-width", String((t + 1.5) / e));
4165
4183
  for (let { el: t, strokeWidth: n } of xe.values()) n == null ? t.removeAttribute("stroke-width") : t.setAttribute("stroke-width", String(n / e));
4166
- for (let [t, n] of L) t.setAttribute("stroke-width", String(nn(n) / e));
4167
- I && !L.has(I) && I.setAttribute("stroke-width", String(nn() / e));
4184
+ for (let [t, n] of L) t.setAttribute("stroke-width", String(an(n) / e));
4185
+ I && !L.has(I) && I.setAttribute("stroke-width", String(an() / e));
4168
4186
  }
4169
- function Sn(e, t) {
4170
- e.parentNode?.appendChild(e), e.setAttribute("stroke-width", String(nn(t) / tn())), e.style.stroke = t?.stroke ?? ei, en(e, t?.style);
4187
+ function wn(e, t) {
4188
+ e.parentNode?.appendChild(e), e.setAttribute("stroke-width", String(an(t) / rn())), e.style.stroke = t?.stroke ?? ei, nn(e, t?.style);
4171
4189
  }
4172
- function Cn(e) {
4190
+ function Tn(e) {
4173
4191
  e.removeAttribute("stroke-width"), e.style.stroke = "", e.setAttribute("stroke", p.strokeColor), e.removeAttribute("stroke-dasharray"), e.removeAttribute("stroke-linecap");
4174
4192
  }
4175
- function wn(e) {
4176
- I !== e && (I && !L.has(I) && Cn(I), I = e, Sn(e, L.get(e)));
4193
+ function En(e) {
4194
+ I !== e && (I && !L.has(I) && Tn(I), I = e, wn(e, L.get(e)));
4177
4195
  }
4178
- function Tn(e) {
4196
+ function Dn(e) {
4179
4197
  if (R.value) {
4180
4198
  if (z === e) return;
4181
- z = e, vn();
4199
+ z = e, bn();
4182
4200
  return;
4183
4201
  }
4184
4202
  let t = F.get(e);
4185
- t && wn(t);
4203
+ t && En(t);
4186
4204
  }
4187
- function En() {
4205
+ function On() {
4188
4206
  if (R.value) {
4189
- z != null && (z = null, vn(), T("stateHover", null)), $t();
4207
+ z != null && (z = null, bn(), T("stateHover", null)), tn();
4190
4208
  return;
4191
4209
  }
4192
4210
  if (I) {
4193
4211
  let e = L.get(I);
4194
- e == null ? Cn(I) : Sn(I, e), I = null, T("stateHover", null);
4212
+ e == null ? Tn(I) : wn(I, e), I = null, T("stateHover", null);
4195
4213
  }
4196
- $t();
4214
+ tn();
4197
4215
  }
4198
- function Dn(e) {
4216
+ function kn(e) {
4199
4217
  let t = e;
4200
4218
  for (; t && !t.dataset?.featId;) t = t.parentElement;
4201
4219
  return t ? t.dataset.featId ?? null : null;
4202
4220
  }
4203
- function On(e) {
4221
+ function An(e) {
4204
4222
  T("stateClick", {
4205
4223
  id: e.id,
4206
4224
  name: e.name,
4207
4225
  value: e.value
4208
- }), T("update:focus", Qe(Nt.value).has(e.id) ? null : e.id);
4226
+ }), T("update:focus", Ze(Ft.value).has(e.id) ? null : e.id);
4209
4227
  }
4210
- function kn(e) {
4228
+ function jn(e) {
4211
4229
  if (e.type === "mouseover" && je) return;
4212
- let t = e, n = Pn(t.target, t.clientX, t.clientY);
4230
+ let t = e, n = In(t.target, t.clientX, t.clientY);
4213
4231
  if (!n) return;
4214
4232
  let r = ye.get(n);
4215
4233
  if (!r) return;
@@ -4218,120 +4236,120 @@ var Nr = {
4218
4236
  name: r.name,
4219
4237
  value: r.value
4220
4238
  };
4221
- e.type === "click" ? p.zoom ? (window.clearTimeout(J), J = 0, t.detail <= 1 && (J = window.setTimeout(() => {
4222
- J = 0, On(r);
4223
- }, qr))) : On(r) : e.type === "mouseover" && (Tn(n), P.value && Zt(n, t.clientX, t.clientY), T("stateHover", i));
4239
+ e.type === "click" ? p.zoom ? (window.clearTimeout(Y), Y = 0, t.detail <= 1 && (Y = window.setTimeout(() => {
4240
+ Y = 0, An(r);
4241
+ }, qr))) : An(r) : e.type === "mouseover" && (Dn(n), N.value && $t(n, t.clientX, t.clientY), T("stateHover", i));
4224
4242
  }
4225
- function An(e) {
4226
- je || Qt(e.clientX, e.clientY);
4243
+ function Mn(e) {
4244
+ je || en(e.clientX, e.clientY);
4227
4245
  }
4228
- function jn(e) {
4246
+ function Nn(e) {
4229
4247
  let t = e.relatedTarget;
4230
- t && O.value?.contains(t) || En();
4248
+ t && O.value?.contains(t) || On();
4231
4249
  }
4232
- function Mn(e) {
4250
+ function Pn(e) {
4233
4251
  if (je) return;
4234
- let t = yn(e.clientX, e.clientY);
4252
+ let t = xn(e.clientX, e.clientY);
4235
4253
  if (t === z) {
4236
- t && Qt(e.clientX, e.clientY);
4254
+ t && en(e.clientX, e.clientY);
4237
4255
  return;
4238
4256
  }
4239
4257
  if (!t) {
4240
- En();
4258
+ On();
4241
4259
  return;
4242
4260
  }
4243
4261
  let n = ye.get(t);
4244
- n && (Tn(t), T("stateHover", {
4262
+ n && (Dn(t), T("stateHover", {
4245
4263
  id: n.id,
4246
4264
  name: n.name,
4247
4265
  value: n.value
4248
- }), P.value && Zt(t, e.clientX, e.clientY));
4266
+ }), N.value && $t(t, e.clientX, e.clientY));
4249
4267
  }
4250
- function Nn() {
4251
- En();
4268
+ function Fn() {
4269
+ On();
4252
4270
  }
4253
- function Pn(e, t, n) {
4254
- return R.value ? yn(t, n) : Dn(e);
4271
+ function In(e, t, n) {
4272
+ return R.value ? xn(t, n) : kn(e);
4255
4273
  }
4256
- function Fn(e) {
4274
+ function Ln(e) {
4257
4275
  if (e.touches.length !== 1) {
4258
- q = null;
4276
+ J = null;
4259
4277
  return;
4260
4278
  }
4261
4279
  let t = e.touches[0];
4262
- q = {
4280
+ J = {
4263
4281
  x: t.clientX,
4264
4282
  y: t.clientY,
4265
4283
  time: e.timeStamp,
4266
- featId: Pn(e.target, t.clientX, t.clientY)
4284
+ featId: In(e.target, t.clientX, t.clientY)
4267
4285
  };
4268
4286
  }
4269
- function In(e) {
4270
- let t = q;
4271
- if (q = null, !t || e.touches.length > 0) return;
4287
+ function Rn(e) {
4288
+ let t = J;
4289
+ if (J = null, !t || e.touches.length > 0) return;
4272
4290
  let n = e.changedTouches[0];
4273
4291
  if (!n || Math.abs(n.clientX - t.x) > Gr || Math.abs(n.clientY - t.y) > Gr || e.timeStamp - t.time > Kr) return;
4274
- if (p.zoom && !ze.value && K() && !$.isFullscreen.value) {
4275
- e.preventDefault();
4276
- let r = We;
4277
- if (We = {
4292
+ if (p.zoom && !Re.value && q() && !$.isFullscreen.value) {
4293
+ e.cancelable && e.preventDefault();
4294
+ let r = Ue;
4295
+ if (Ue = {
4278
4296
  x: n.clientX,
4279
4297
  y: n.clientY,
4280
4298
  time: e.timeStamp
4281
4299
  }, r != null && e.timeStamp - r.time <= qr && Math.abs(n.clientX - r.x) <= Jr && Math.abs(n.clientY - r.y) <= Jr) {
4282
- We = null, window.clearTimeout(J), J = 0, p.touchExpand ? pt(n.clientX, n.clientY) : mt(n.clientX, n.clientY);
4300
+ Ue = null, window.clearTimeout(Y), Y = 0, p.touchExpand ? ft(n.clientX, n.clientY) : pt(n.clientX, n.clientY);
4283
4301
  return;
4284
4302
  }
4285
4303
  let i = t.featId ? ye.get(t.featId) : void 0;
4286
4304
  if (!i) {
4287
- En();
4305
+ On();
4288
4306
  return;
4289
4307
  }
4290
- Ln(i, n.clientX, n.clientY), window.clearTimeout(J), J = window.setTimeout(() => {
4291
- J = 0, On(i);
4308
+ zn(i, n.clientX, n.clientY), window.clearTimeout(Y), Y = window.setTimeout(() => {
4309
+ Y = 0, An(i);
4292
4310
  }, qr);
4293
4311
  return;
4294
4312
  }
4295
4313
  if (!t.featId) {
4296
- En();
4314
+ On();
4297
4315
  return;
4298
4316
  }
4299
4317
  let r = ye.get(t.featId);
4300
- r && (e.preventDefault(), Ln(r, n.clientX, n.clientY), On(r));
4318
+ r && (e.cancelable && e.preventDefault(), zn(r, n.clientX, n.clientY), An(r));
4301
4319
  }
4302
- function Ln(e, t, n) {
4303
- if (Tn(e.id), T("stateHover", {
4320
+ function zn(e, t, n) {
4321
+ if (Dn(e.id), T("stateHover", {
4304
4322
  id: e.id,
4305
4323
  name: e.name,
4306
4324
  value: e.value
4307
- }), !P.value) return;
4325
+ }), !N.value) return;
4308
4326
  if (R.value) {
4309
- let r = bn(e.id);
4310
- r ? Zt(e.id, r.x, r.y) : Zt(e.id, t, n);
4327
+ let r = Sn(e.id);
4328
+ r ? $t(e.id, r.x, r.y) : $t(e.id, t, n);
4311
4329
  return;
4312
4330
  }
4313
4331
  let r = F.get(e.id);
4314
4332
  if (r) {
4315
4333
  let t = r.getBoundingClientRect();
4316
- Zt(e.id, t.left + t.width / 2, t.top + t.height / 2);
4317
- } else Zt(e.id, t, n);
4334
+ $t(e.id, t.left + t.width / 2, t.top + t.height / 2);
4335
+ } else $t(e.id, t, n);
4318
4336
  }
4319
- function Rn() {
4320
- q = null;
4337
+ function Bn() {
4338
+ J = null;
4321
4339
  }
4322
- function zn(e) {
4340
+ function Vn(e) {
4323
4341
  let t = document.createElementNS(Wr, "path");
4324
4342
  return e && t.setAttribute("d", e), t;
4325
4343
  }
4326
- function Bn() {
4344
+ function Hn() {
4327
4345
  let e = k.value, t = se.value;
4328
4346
  if (!e || !t) return;
4329
4347
  for (; e.firstChild;) e.removeChild(e.firstChild);
4330
4348
  for (; t.firstChild;) t.removeChild(t.firstChild);
4331
4349
  F.clear(), ye.clear(), be = null, I = null, L.clear(), xe.clear(), z = null, Ee.clear(), De = [];
4332
- let n = Dt.value, r = wt.value.features;
4350
+ let n = At.value, r = wt.value.features;
4333
4351
  if (r.length === 0) {
4334
- Ce = null, Te = null, mn = null, vn();
4352
+ Ce = null, Te = null, gn = null, bn();
4335
4353
  return;
4336
4354
  }
4337
4355
  if (R.value) {
@@ -4339,21 +4357,21 @@ var Nr = {
4339
4357
  let t = String(e.id);
4340
4358
  ye.set(t, {
4341
4359
  id: t,
4342
- name: Kt(e),
4343
- value: Wt(t),
4360
+ name: Jt(e),
4361
+ value: Kt(t),
4344
4362
  feature: e
4345
4363
  });
4346
4364
  }
4347
4365
  let e = Tt.value;
4348
- Ce = Cr(r, n, Gt, e ? n(e) : null), !we && typeof document < "u" && (we = document.createElement("canvas")), Te = we ? jr(Ce, Z.value, gt.value, we) : null, vn();
4366
+ Ce = Cr(r, n, qt, e ? n(e) : null), !we && typeof document < "u" && (we = document.createElement("canvas")), Te = we ? jr(Ce, ht.value, gt.value, we) : null, bn();
4349
4367
  return;
4350
4368
  }
4351
- let i = p.strokeColor, a = !P.value, o = document.createDocumentFragment();
4369
+ let i = p.strokeColor, a = !N.value, o = document.createDocumentFragment();
4352
4370
  for (let e of r) {
4353
- let t = String(e.id), r = Kt(e), s = Wt(t), c = zn(n(e));
4354
- if (c.setAttribute("class", "state-path"), c.setAttribute("data-feat-id", t), c.setAttribute("fill", Gt(t)), c.setAttribute("stroke", i), a) {
4371
+ let t = String(e.id), r = Jt(e), s = Kt(t), c = Vn(n(e));
4372
+ if (c.setAttribute("class", "state-path"), c.setAttribute("data-feat-id", t), c.setAttribute("fill", qt(t)), c.setAttribute("stroke", i), a) {
4355
4373
  let e = document.createElementNS(Wr, "title");
4356
- e.textContent = Jt(r, s), c.appendChild(e);
4374
+ e.textContent = Q(r, s), c.appendChild(e);
4357
4375
  }
4358
4376
  o.appendChild(c), F.set(t, c), ye.set(t, {
4359
4377
  id: t,
@@ -4364,114 +4382,114 @@ var Nr = {
4364
4382
  }
4365
4383
  let s = Tt.value;
4366
4384
  if (s) {
4367
- let e = zn(n(s));
4385
+ let e = Vn(n(s));
4368
4386
  e.setAttribute("fill", "none"), e.setAttribute("stroke", i), e.setAttribute("stroke-linejoin", "round"), e.setAttribute("pointer-events", "none"), o.appendChild(e), be = e;
4369
4387
  }
4370
- e.appendChild(o), xn();
4388
+ e.appendChild(o), Cn();
4371
4389
  }
4372
- function Vn() {
4390
+ function Un() {
4373
4391
  if (R.value) {
4374
- if (Ce) for (let e of Ce.items) e.fill = Gt(e.id);
4375
- for (let [e, t] of ye) t.value = Wt(e);
4376
- vn();
4392
+ if (Ce) for (let e of Ce.items) e.fill = qt(e.id);
4393
+ for (let [e, t] of ye) t.value = Kt(e);
4394
+ bn();
4377
4395
  return;
4378
4396
  }
4379
- let e = !P.value;
4397
+ let e = !N.value;
4380
4398
  for (let [t, n] of F) {
4381
- let r = Wt(t), i = ye.get(t);
4382
- if (n.setAttribute("fill", Gt(t)), i && (i.value = r), e && i) {
4399
+ let r = Kt(t), i = ye.get(t);
4400
+ if (n.setAttribute("fill", qt(t)), i && (i.value = r), e && i) {
4383
4401
  let e = n.firstElementChild;
4384
- e && (e.textContent = Jt(i.name, r));
4402
+ e && (e.textContent = Q(i.name, r));
4385
4403
  }
4386
4404
  }
4387
4405
  }
4388
- function Hn() {
4406
+ function Wn() {
4389
4407
  if (R.value) {
4390
- vn();
4408
+ bn();
4391
4409
  return;
4392
4410
  }
4393
- for (let e of F.values()) e === I || L.has(e) || Cn(e);
4394
- be && be.setAttribute("stroke", p.strokeColor), xn();
4411
+ for (let e of F.values()) e === I || L.has(e) || Tn(e);
4412
+ be && be.setAttribute("stroke", p.strokeColor), Cn();
4395
4413
  }
4396
- function Un() {
4414
+ function Gn() {
4397
4415
  return typeof p.menu == "string" ? p.menu : "choropleth";
4398
4416
  }
4399
- let Wn = n(() => p.legend && (Lt.value || Rt.value || p.data)), Gn = n(() => p.colorScale.slice().sort((e, t) => e.min - t.min)), Kn = n(() => {
4417
+ let Kn = n(() => p.legend && (zt.value || Bt.value || p.data)), qn = n(() => p.colorScale.slice().sort((e, t) => e.min - t.min)), Jn = n(() => {
4400
4418
  let e = [];
4401
4419
  for (let t = 0; t <= 10; t++) {
4402
4420
  let n = t / 10;
4403
4421
  e.push({
4404
4422
  offset: `${(n * 100).toFixed(0)}%`,
4405
- color: Vt(n)
4423
+ color: Ut(n)
4406
4424
  });
4407
4425
  }
4408
4426
  return e;
4409
- }), qn = new Intl.NumberFormat("en-US", {
4427
+ }), Yn = new Intl.NumberFormat("en-US", {
4410
4428
  notation: "compact",
4411
4429
  maximumFractionDigits: 1
4412
- }), Jn = n(() => {
4413
- let { min: e, max: t } = It.value, n = t - e, r = [];
4430
+ }), Xn = n(() => {
4431
+ let { min: e, max: t } = Rt.value, n = t - e, r = [];
4414
4432
  for (let t = 1; t <= 3; t++) {
4415
- let i = t / 4, a = e + n * i, o = Math.abs(a) >= 1e3 ? qn.format(a) : Number.isInteger(a) ? String(a) : a.toFixed(1).replace(/\.0$/, "");
4433
+ let i = t / 4, a = e + n * i, o = Math.abs(a) >= 1e3 ? Yn.format(a) : Number.isInteger(a) ? String(a) : a.toFixed(1).replace(/\.0$/, "");
4416
4434
  r.push({
4417
4435
  value: o,
4418
4436
  pct: i * 100
4419
4437
  });
4420
4438
  }
4421
4439
  return r;
4422
- }), Yn = n(() => {
4440
+ }), Zn = n(() => {
4423
4441
  let e = [];
4424
- if (Lt.value) for (let t of p.colorScale) e.push({
4442
+ if (zt.value) for (let t of p.colorScale) e.push({
4425
4443
  key: t.value,
4426
4444
  color: t.color,
4427
4445
  label: t.value
4428
4446
  });
4429
- else if (Rt.value) for (let t of Gn.value) e.push({
4447
+ else if (Bt.value) for (let t of qn.value) e.push({
4430
4448
  key: String(t.min),
4431
4449
  color: t.color,
4432
4450
  label: t.label ?? String(t.min)
4433
4451
  });
4434
4452
  return e;
4435
- }), Xn = n(() => `linear-gradient(to right, ${Kn.value.map((e) => `${e.color} ${e.offset}`).join(", ")})`), $ = Y({ target: () => p.fullscreenTarget }), Zn = n(() => {
4436
- let e = Un();
4453
+ }), Qn = n(() => `linear-gradient(to right, ${Jn.value.map((e) => `${e.color} ${e.offset}`).join(", ")})`), $ = X({ target: () => p.fullscreenTarget }), $n = n(() => {
4454
+ let e = Gn();
4437
4455
  return R.value ? [$.menuItem.value, {
4438
4456
  label: "Save as PNG",
4439
4457
  action: () => {
4440
- Se.value && Re(Se.value, e);
4458
+ Se.value && Le(Se.value, e);
4441
4459
  }
4442
4460
  }] : [
4443
4461
  $.menuItem.value,
4444
4462
  {
4445
4463
  label: "Save as SVG",
4446
4464
  action: () => {
4447
- D.value && G(D.value, e);
4465
+ D.value && K(D.value, e);
4448
4466
  }
4449
4467
  },
4450
4468
  {
4451
4469
  label: "Save as PNG",
4452
4470
  action: () => {
4453
- D.value && Le(D.value, e);
4471
+ D.value && Ie(D.value, e);
4454
4472
  }
4455
4473
  }
4456
4474
  ];
4457
4475
  });
4458
4476
  return C(() => [
4459
4477
  wt.value,
4460
- Dt.value,
4461
- P.value
4462
- ], () => Bn()), C(() => [
4463
- Ft.value,
4478
+ At.value,
4479
+ N.value
4480
+ ], () => Hn()), C(() => [
4481
+ Lt.value,
4464
4482
  p.colorScale,
4465
4483
  p.noDataColor,
4466
4484
  p.dataGeoType
4467
- ], () => Vn()), C(() => [p.strokeColor, kt.value], () => Hn()), C(() => [
4468
- Nt.value,
4469
- Dt.value,
4485
+ ], () => Un()), C(() => [p.strokeColor, jt.value], () => Wn()), C(() => [
4486
+ Ft.value,
4487
+ At.value,
4470
4488
  bt.value
4471
- ], () => et(), { flush: "post" }), C(() => $.isFullscreen.value, (e) => {
4472
- if ($t(), e || !K() || !D.value || !V) return;
4473
- let t = N(D.value);
4474
- t.interrupt(), V.transform(t, de);
4489
+ ], () => $e(), { flush: "post" }), C(() => $.isFullscreen.value, (e) => {
4490
+ if (tn(), e || !q() || !D.value || !H) return;
4491
+ let t = M(D.value);
4492
+ t.interrupt(), H.transform(t, fe);
4475
4493
  }), (n, l) => (_(), r(t, {
4476
4494
  to: x($).teleportTarget.value,
4477
4495
  disabled: !x($).isFullscreen.value
@@ -4480,7 +4498,7 @@ var Nr = {
4480
4498
  ref: oe
4481
4499
  }, n.$attrs, {
4482
4500
  class: ["choropleth-wrapper", {
4483
- pannable: at.value,
4501
+ pannable: it.value,
4484
4502
  "is-fullscreen": x($).isFullscreen.value
4485
4503
  }],
4486
4504
  style: x($).fullscreenStyle.value,
@@ -4489,7 +4507,7 @@ var Nr = {
4489
4507
  }), [
4490
4508
  c.menu || x($).isFullscreen.value ? (_(), r(ve, {
4491
4509
  key: 0,
4492
- items: Zn.value,
4510
+ items: $n.value,
4493
4511
  "is-fullscreen": x($).isFullscreen.value,
4494
4512
  onClose: x($).exit
4495
4513
  }, null, 8, [
@@ -4498,15 +4516,15 @@ var Nr = {
4498
4516
  "onClose"
4499
4517
  ])) : i("", !0),
4500
4518
  o("div", Ir, b(x($).isFullscreen.value ? "Map expanded to fill window" : ""), 1),
4501
- c.title || Wn.value ? (_(), a("div", Lr, [c.title ? (_(), a("div", {
4519
+ c.title || Kn.value ? (_(), a("div", Lr, [c.title ? (_(), a("div", {
4502
4520
  key: 0,
4503
4521
  class: "choropleth-title",
4504
- style: h(_e.value)
4505
- }, b(c.title), 5)) : i("", !0), Wn.value ? (_(), a("div", {
4522
+ style: h(P.value)
4523
+ }, b(c.title), 5)) : i("", !0), Kn.value ? (_(), a("div", {
4506
4524
  key: 1,
4507
4525
  class: "choropleth-legend",
4508
- style: h(ge.value)
4509
- }, [c.legendTitle ? (_(), a("span", Rr, b(c.legendTitle), 1)) : i("", !0), Lt.value || Rt.value ? (_(!0), a(e, { key: 1 }, y(Yn.value, (e) => (_(), a("span", {
4526
+ style: h(_e.value)
4527
+ }, [c.legendTitle ? (_(), a("span", Rr, b(c.legendTitle), 1)) : i("", !0), zt.value || Bt.value ? (_(!0), a(e, { key: 1 }, y(Zn.value, (e) => (_(), a("span", {
4510
4528
  key: e.key,
4511
4529
  class: "choropleth-legend-item"
4512
4530
  }, [o("span", {
@@ -4514,12 +4532,12 @@ var Nr = {
4514
4532
  style: h({ background: e.color })
4515
4533
  }, null, 4), s(" " + b(e.label), 1)]))), 128)) : (_(), a("div", zr, [o("div", {
4516
4534
  class: "choropleth-legend-gradient",
4517
- style: h({ background: Xn.value })
4518
- }, null, 4), o("div", Br, [(_(!0), a(e, null, y(Jn.value, (e) => (_(), a("span", {
4535
+ style: h({ background: Qn.value })
4536
+ }, null, 4), o("div", Br, [(_(!0), a(e, null, y(Xn.value, (e) => (_(), a("span", {
4519
4537
  key: e.value,
4520
4538
  style: h({ left: e.pct + "%" })
4521
4539
  }, b(e.value), 5))), 128))])]))], 4)) : i("", !0)])) : i("", !0),
4522
- ot.value ? (_(), a("div", Vr, b(st.value), 1)) : i("", !0),
4540
+ at.value ? (_(), a("div", Vr, b(ot.value), 1)) : i("", !0),
4523
4541
  R.value ? (_(), a("canvas", {
4524
4542
  key: 3,
4525
4543
  ref_key: "canvasRef",
@@ -4530,9 +4548,9 @@ var Nr = {
4530
4548
  (_(), a("svg", {
4531
4549
  ref_key: "svgRef",
4532
4550
  ref: D,
4533
- viewBox: `0 0 ${Z.value} ${gt.value}`,
4551
+ viewBox: `0 0 ${ht.value} ${gt.value}`,
4534
4552
  preserveAspectRatio: "xMidYMid meet",
4535
- style: h(ct.value)
4553
+ style: h(st.value)
4536
4554
  }, [o("g", {
4537
4555
  ref_key: "mapGroupRef",
4538
4556
  ref: O
@@ -4543,36 +4561,36 @@ var Nr = {
4543
4561
  ref_key: "overlayGroupRef",
4544
4562
  ref: se
4545
4563
  }, null, 512)], 512)], 12, Hr)),
4546
- it.value ? (_(), r(x(Xe), {
4564
+ rt.value ? (_(), r(x(Ye), {
4547
4565
  key: 4,
4548
- "can-zoom-in": U.value < rt.value,
4549
- "can-zoom-out": U.value > 1,
4550
- "can-reset": H.value,
4566
+ "can-zoom-in": W.value < nt.value,
4567
+ "can-zoom-out": W.value > 1,
4568
+ "can-reset": U.value,
4551
4569
  "is-fullscreen": x($).isFullscreen.value,
4552
- onZoomIn: l[0] ||= (e) => lt(Xr),
4553
- onZoomOut: l[1] ||= (e) => lt(1 / Xr),
4554
- onReset: nt
4570
+ onZoomIn: l[0] ||= (e) => ct(Xr),
4571
+ onZoomOut: l[1] ||= (e) => ct(1 / Xr),
4572
+ onReset: tt
4555
4573
  }, null, 8, [
4556
4574
  "can-zoom-in",
4557
4575
  "can-zoom-out",
4558
4576
  "can-reset",
4559
4577
  "is-fullscreen"
4560
4578
  ])) : i("", !0),
4561
- P.value ? (_(), r(Pr, {
4579
+ N.value ? (_(), r(Pr, {
4562
4580
  key: 5,
4563
4581
  ref_key: "tooltipChildRef",
4564
- ref: A,
4565
- mode: Xt.value
4582
+ ref: ce,
4583
+ mode: Qt.value
4566
4584
  }, {
4567
4585
  default: w((t) => [te(n.$slots, "tooltip", m(u(E(t))), () => [c.tooltipFormat ? (_(), a("span", {
4568
4586
  key: 0,
4569
4587
  innerHTML: c.tooltipFormat(t)
4570
- }, null, 8, Ur)) : t.value == null ? (_(), a(e, { key: 1 }, [s(b(t.name), 1)], 64)) : (_(), a(e, { key: 2 }, [s(b(t.name) + ": " + b(qt(t.value)), 1)], 64))], !0)]),
4588
+ }, null, 8, Ur)) : t.value == null ? (_(), a(e, { key: 1 }, [s(b(t.name), 1)], 64)) : (_(), a(e, { key: 2 }, [s(b(t.name) + ": " + b(Yt(t.value)), 1)], 64))], !0)]),
4571
4589
  _: 3
4572
4590
  }, 8, ["mode"])) : i("", !0)
4573
4591
  ], 16, Fr)], 8, ["to", "disabled"]));
4574
4592
  }
4575
- }), [["__scopeId", "data-v-8366c5c6"]]), ii = /* @__PURE__ */ _e(/* @__PURE__ */ l({
4593
+ }), [["__scopeId", "data-v-4954204d"]]), ii = /* @__PURE__ */ P(/* @__PURE__ */ l({
4576
4594
  __name: "ChartTooltip",
4577
4595
  props: {
4578
4596
  x: {},
@@ -4592,7 +4610,7 @@ var Nr = {
4592
4610
  top: `${e.y}px`,
4593
4611
  transform: "translateY(-50%)"
4594
4612
  })
4595
- }, [te(t.$slots, "default", {}, void 0, !0)], 4)) : e.mode === "click" ? (_(), r(x(ce), {
4613
+ }, [te(t.$slots, "default", {}, void 0, !0)], 4)) : e.mode === "click" ? (_(), r(x(le), {
4596
4614
  key: 1,
4597
4615
  open: e.open
4598
4616
  }, {
@@ -4605,7 +4623,7 @@ var Nr = {
4605
4623
  })
4606
4624
  }, null, 4)]),
4607
4625
  _: 1
4608
- }), c(x(A), null, {
4626
+ }), c(x(ce), null, {
4609
4627
  default: w(() => [e.open ? (_(), r(x(se), {
4610
4628
  key: 0,
4611
4629
  class: "chart-tooltip-content",
@@ -4623,7 +4641,7 @@ var Nr = {
4623
4641
  _: 3
4624
4642
  }, 8, ["open"])) : i("", !0);
4625
4643
  }
4626
- }), [["__scopeId", "data-v-44377f70"]]), ai = { class: "TableWrapper" }, oi = ["href", "download"], si = /* @__PURE__ */ _e(/* @__PURE__ */ l({
4644
+ }), [["__scopeId", "data-v-44377f70"]]), ai = { class: "TableWrapper" }, oi = ["href", "download"], si = /* @__PURE__ */ P(/* @__PURE__ */ l({
4627
4645
  __name: "DataTable",
4628
4646
  props: {
4629
4647
  data: {},
@@ -4717,15 +4735,15 @@ var Nr = {
4717
4735
  function x() {
4718
4736
  if (typeof c.csv == "function") return c.csv();
4719
4737
  if (typeof c.csv == "string") return c.csv;
4720
- let e = v.value, t = te.value, n = [e.map((e) => $e(l(e.name))).join(",")];
4738
+ let e = v.value, t = te.value, n = [e.map((e) => Qe(l(e.name))).join(",")];
4721
4739
  for (let r = 0; r < t; r++) {
4722
- let t = e.map((e) => $e(ne(e, r)));
4740
+ let t = e.map((e) => Qe(ne(e, r)));
4723
4741
  n.push(t.join(","));
4724
4742
  }
4725
4743
  return n.join("\n");
4726
4744
  }
4727
4745
  function S() {
4728
- ze(x(), re());
4746
+ Re(x(), re());
4729
4747
  }
4730
4748
  let ie = n(() => c.downloadButton || c.downloadLink ? [] : [{
4731
4749
  label: c.downloadMenuLink,