@cfasim-ui/charts 0.6.2 → 0.6.3
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/ChoroplethMap/ChoroplethMap.d.ts +15 -0
- package/dist/_shared/chartProps.d.ts +15 -0
- package/dist/index.css +1 -1
- package/dist/index.js +812 -800
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Fragment as e, Teleport as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, guardReactiveProps as u, mergeProps as d, normalizeClass as f, normalizeProps as p, normalizeStyle as m, onMounted as h, onUnmounted as g, openBlock as _, ref as v, renderList as y, renderSlot as b, toDisplayString as x, toHandlers as ee, toRaw as S, unref as C, useSlots as
|
|
2
|
-
import { formatNumber as
|
|
3
|
-
import { DropdownMenuContent as
|
|
4
|
-
import { geoAlbersUsa as
|
|
5
|
-
import { zoom as
|
|
6
|
-
import { select as
|
|
1
|
+
import { Fragment as e, Teleport as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, guardReactiveProps as u, mergeProps as d, normalizeClass as f, normalizeProps as p, normalizeStyle as m, onMounted as h, onUnmounted as g, openBlock as _, ref as v, renderList as y, renderSlot as b, toDisplayString as x, toHandlers as ee, toRaw as S, unref as C, useSlots as te, useTemplateRef as w, watch as T, withCtx as E } from "vue";
|
|
2
|
+
import { formatNumber as ne } from "@cfasim-ui/shared";
|
|
3
|
+
import { DropdownMenuContent as D, DropdownMenuItem as O, DropdownMenuPortal as k, DropdownMenuRoot as A, DropdownMenuTrigger as re, PopoverAnchor as j, PopoverContent as M, PopoverPortal as N, PopoverRoot as ie } from "reka-ui";
|
|
4
|
+
import { geoAlbersUsa as ae, geoMercator as P, geoPath as oe } from "d3-geo";
|
|
5
|
+
import { zoom as F, zoomIdentity as se } from "d3-zoom";
|
|
6
|
+
import { select as ce } from "d3-selection";
|
|
7
7
|
import "d3-transition";
|
|
8
|
-
import { feature as
|
|
8
|
+
import { feature as le, merge as I, mesh as ue } from "topojson-client";
|
|
9
9
|
//#region src/ChartMenu/ChartMenu.vue?vue&type=script&setup=true&lang.ts
|
|
10
10
|
var de = ["aria-label"], fe = /* @__PURE__ */ l({
|
|
11
11
|
__name: "ChartMenu",
|
|
@@ -37,15 +37,15 @@ var de = ["aria-label"], fe = /* @__PURE__ */ l({
|
|
|
37
37
|
"stroke-width": "1.75",
|
|
38
38
|
"stroke-linecap": "round",
|
|
39
39
|
"aria-hidden": "true"
|
|
40
|
-
}, [o("path", { d: "M4 4l8 8M12 4l-8 8" })], -1)]])) : u() ? (_(), r(C(
|
|
40
|
+
}, [o("path", { d: "M4 4l8 8M12 4l-8 8" })], -1)]])) : u() ? (_(), r(C(A), {
|
|
41
41
|
key: 2,
|
|
42
42
|
modal: !1
|
|
43
43
|
}, {
|
|
44
|
-
default:
|
|
44
|
+
default: E(() => [c(C(re), {
|
|
45
45
|
class: "chart-menu-button",
|
|
46
46
|
"aria-label": "Chart options"
|
|
47
47
|
}, {
|
|
48
|
-
default:
|
|
48
|
+
default: E(() => [...i[4] ||= [o("svg", {
|
|
49
49
|
width: "16",
|
|
50
50
|
height: "16",
|
|
51
51
|
viewBox: "0 0 16 16",
|
|
@@ -69,19 +69,19 @@ var de = ["aria-label"], fe = /* @__PURE__ */ l({
|
|
|
69
69
|
})
|
|
70
70
|
], -1)]]),
|
|
71
71
|
_: 1
|
|
72
|
-
}), c(C(
|
|
73
|
-
default:
|
|
72
|
+
}), c(C(k), null, {
|
|
73
|
+
default: E(() => [c(C(D), {
|
|
74
74
|
class: "chart-menu-content",
|
|
75
75
|
"side-offset": 4,
|
|
76
76
|
align: "end"
|
|
77
77
|
}, {
|
|
78
|
-
default:
|
|
78
|
+
default: E(() => [(_(!0), a(e, null, y(t.items, (e) => (_(), r(C(O), {
|
|
79
79
|
key: e.label,
|
|
80
80
|
class: "chart-menu-item",
|
|
81
81
|
"aria-pressed": e.ariaPressed,
|
|
82
82
|
onSelect: e.action
|
|
83
83
|
}, {
|
|
84
|
-
default:
|
|
84
|
+
default: E(() => [s(x(e.label), 1)]),
|
|
85
85
|
_: 2
|
|
86
86
|
}, 1032, ["aria-pressed", "onSelect"]))), 128))]),
|
|
87
87
|
_: 1
|
|
@@ -116,19 +116,19 @@ var de = ["aria-label"], fe = /* @__PURE__ */ l({
|
|
|
116
116
|
function R(e) {
|
|
117
117
|
return Math.round(e) + .5;
|
|
118
118
|
}
|
|
119
|
-
function
|
|
119
|
+
function me(e, t) {
|
|
120
120
|
let n = e / t, r = 10 ** Math.floor(Math.log10(n)), i = n / r, a;
|
|
121
121
|
return a = i <= 1.5 ? 1 : i <= 3 ? 2 : i <= 7 ? 5 : 10, a * r;
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function he(e, t, n) {
|
|
124
124
|
if (!(n > 0) || !isFinite(n)) return [];
|
|
125
125
|
let r = [], i = Math.ceil(e / n) * n;
|
|
126
126
|
for (let e = 0, a = i; a <= t + 1e-9 && e < 1e3; e++, a = i + e * n) r.push(a);
|
|
127
127
|
return r;
|
|
128
128
|
}
|
|
129
|
-
var
|
|
130
|
-
function
|
|
131
|
-
return Math.abs(e) >= 1e3 ?
|
|
129
|
+
var z = new Intl.NumberFormat();
|
|
130
|
+
function B(e) {
|
|
131
|
+
return Math.abs(e) >= 1e3 ? z.format(e) : Number.isInteger(e) ? e.toString() : e.toFixed(1);
|
|
132
132
|
}
|
|
133
133
|
//#endregion
|
|
134
134
|
//#region src/_shared/computeTicks.ts
|
|
@@ -137,9 +137,9 @@ function ge(e) {
|
|
|
137
137
|
if (t === n) return [];
|
|
138
138
|
let i = e.displayOffset ?? 0;
|
|
139
139
|
if (Array.isArray(r)) return r.map((e) => e - i).filter((e) => e >= t && e <= n);
|
|
140
|
-
if (typeof r == "number") return
|
|
141
|
-
let a = Math.max(3, Math.floor(e.targetTickCount ?? 3)), o =
|
|
142
|
-
return
|
|
140
|
+
if (typeof r == "number") return he(t + i, n + i, r).map((e) => e - i);
|
|
141
|
+
let a = Math.max(3, Math.floor(e.targetTickCount ?? 3)), o = me(n - t, a);
|
|
142
|
+
return he(t + i, n + i, o).map((e) => e - i);
|
|
143
143
|
}
|
|
144
144
|
function _e(e, t, n, r) {
|
|
145
145
|
if (r === "log") {
|
|
@@ -192,8 +192,8 @@ function be(e = {}) {
|
|
|
192
192
|
measuredHeight: r
|
|
193
193
|
};
|
|
194
194
|
}
|
|
195
|
-
var
|
|
196
|
-
function
|
|
195
|
+
var xe = .6, Se = 8;
|
|
196
|
+
function V(e, t) {
|
|
197
197
|
return {
|
|
198
198
|
fontSize: e?.fontSize ?? t.fontSize,
|
|
199
199
|
fill: e?.color ?? "currentColor",
|
|
@@ -252,7 +252,7 @@ function Oe(e) {
|
|
|
252
252
|
let t = e.title();
|
|
253
253
|
if (!t) return 10;
|
|
254
254
|
let n = e.titleStyle?.()?.lineHeight ?? 18;
|
|
255
|
-
return t.split("\n").length * n +
|
|
255
|
+
return t.split("\n").length * n + Se;
|
|
256
256
|
}), o = n(() => {
|
|
257
257
|
let n = Ee(e.extraPadding?.()), r = i.value.rowCount;
|
|
258
258
|
return {
|
|
@@ -284,7 +284,7 @@ function Oe(e) {
|
|
|
284
284
|
//#endregion
|
|
285
285
|
//#region src/tooltip-position.ts
|
|
286
286
|
var ke = 16, Ae = 8;
|
|
287
|
-
function
|
|
287
|
+
function je(e, t, n, r, i, a) {
|
|
288
288
|
if (i === "none") return {
|
|
289
289
|
left: e + ke,
|
|
290
290
|
top: t
|
|
@@ -307,7 +307,7 @@ function H(e, t, n, r, i, a) {
|
|
|
307
307
|
}
|
|
308
308
|
//#endregion
|
|
309
309
|
//#region src/_shared/useChartTooltip.ts
|
|
310
|
-
function
|
|
310
|
+
function Me(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;
|
|
@@ -321,14 +321,14 @@ function je(e) {
|
|
|
321
321
|
clientY: r.clientY
|
|
322
322
|
}, e.onHover?.({ index: i }));
|
|
323
323
|
}
|
|
324
|
-
|
|
324
|
+
T([a, n], () => {
|
|
325
325
|
if (n.value === null || !a.value) {
|
|
326
326
|
o.value = null;
|
|
327
327
|
return;
|
|
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 } =
|
|
331
|
+
let l = c.getBoundingClientRect(), u = r.value ? t : 0, d = e.clamp?.() ?? "chart", { left: f, top: p } = je(a.value.clientX, a.value.clientY - u, s.offsetWidth, s.offsetHeight, d, l);
|
|
332
332
|
o.value = {
|
|
333
333
|
left: f - l.left,
|
|
334
334
|
top: p - l.top
|
|
@@ -395,55 +395,55 @@ function je(e) {
|
|
|
395
395
|
}
|
|
396
396
|
//#endregion
|
|
397
397
|
//#region src/ChartMenu/download.ts
|
|
398
|
-
function
|
|
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
|
|
402
|
+
var Ne = [
|
|
403
403
|
"color",
|
|
404
404
|
"font-family",
|
|
405
405
|
"font-size",
|
|
406
406
|
"font-weight"
|
|
407
|
-
],
|
|
408
|
-
function
|
|
407
|
+
], Pe = ["fill", "stroke"];
|
|
408
|
+
function U(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
|
|
414
|
+
function W(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
|
|
418
|
+
for (let e of Ne) {
|
|
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
|
|
424
|
+
for (let e of t.querySelectorAll("*")) for (let t of Pe) {
|
|
425
425
|
let n = e.getAttribute(t);
|
|
426
|
-
!n || !n.includes("var(") || e.setAttribute(t,
|
|
426
|
+
!n || !n.includes("var(") || e.setAttribute(t, U(n));
|
|
427
427
|
}
|
|
428
428
|
return t;
|
|
429
429
|
}
|
|
430
|
-
function
|
|
431
|
-
let n =
|
|
432
|
-
|
|
430
|
+
function Fe(e, t) {
|
|
431
|
+
let n = W(e), r = new XMLSerializer().serializeToString(n);
|
|
432
|
+
H(new Blob([r], { type: "image/svg+xml" }), `${t}.svg`);
|
|
433
433
|
}
|
|
434
|
-
function
|
|
435
|
-
let n =
|
|
434
|
+
function G(e, t) {
|
|
435
|
+
let n = W(e), r = new XMLSerializer().serializeToString(n), i = new Blob([r], { type: "image/svg+xml;charset=utf-8" }), a = URL.createObjectURL(i), o = new Image(), s = e.width.baseVal.value || e.clientWidth, c = e.height.baseVal.value || e.clientHeight;
|
|
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 &&
|
|
441
|
+
e && H(e, `${t}.png`);
|
|
442
442
|
}), URL.revokeObjectURL(a);
|
|
443
443
|
}, o.src = a;
|
|
444
444
|
}
|
|
445
|
-
function
|
|
446
|
-
|
|
445
|
+
function K(e, t) {
|
|
446
|
+
H(new Blob([e], { type: "text/csv" }), `${t}.csv`);
|
|
447
447
|
}
|
|
448
448
|
//#endregion
|
|
449
449
|
//#region src/_shared/useChartFullscreen.ts
|
|
@@ -517,18 +517,18 @@ function Ve(e) {
|
|
|
517
517
|
i && a.push(i.menuItem.value), a.push({
|
|
518
518
|
label: "Save as SVG",
|
|
519
519
|
action: () => {
|
|
520
|
-
t.value &&
|
|
520
|
+
t.value && Fe(t.value, n);
|
|
521
521
|
}
|
|
522
522
|
}, {
|
|
523
523
|
label: "Save as PNG",
|
|
524
524
|
action: () => {
|
|
525
|
-
t.value &&
|
|
525
|
+
t.value && G(t.value, n);
|
|
526
526
|
}
|
|
527
527
|
});
|
|
528
528
|
let o = e.downloadButton?.();
|
|
529
529
|
return !e.downloadLink() && !o && a.push({
|
|
530
530
|
label: "Download CSV",
|
|
531
|
-
action: () =>
|
|
531
|
+
action: () => K(e.getCsv(), n)
|
|
532
532
|
}), a;
|
|
533
533
|
}), o = n(() => {
|
|
534
534
|
if (e.downloadButton?.()) return null;
|
|
@@ -539,7 +539,7 @@ function Ve(e) {
|
|
|
539
539
|
return t ? typeof t == "string" ? t : "Download data (CSV)" : null;
|
|
540
540
|
});
|
|
541
541
|
function l() {
|
|
542
|
-
|
|
542
|
+
K(e.getCsv(), r());
|
|
543
543
|
}
|
|
544
544
|
return {
|
|
545
545
|
svgRef: t,
|
|
@@ -591,21 +591,21 @@ var Ge = {
|
|
|
591
591
|
"d",
|
|
592
592
|
"stroke",
|
|
593
593
|
"stroke-width"
|
|
594
|
-
],
|
|
594
|
+
], Je = [
|
|
595
595
|
"fill",
|
|
596
596
|
"stroke",
|
|
597
597
|
"stroke-width",
|
|
598
598
|
"transform"
|
|
599
|
-
],
|
|
599
|
+
], Ye = [
|
|
600
600
|
"stroke",
|
|
601
601
|
"stroke-width",
|
|
602
602
|
"stroke-dasharray"
|
|
603
|
-
],
|
|
603
|
+
], q = [
|
|
604
604
|
"d",
|
|
605
605
|
"stroke",
|
|
606
606
|
"stroke-width",
|
|
607
607
|
"stroke-dasharray"
|
|
608
|
-
],
|
|
608
|
+
], Xe = ["fill", "transform"], J = [
|
|
609
609
|
"x",
|
|
610
610
|
"y",
|
|
611
611
|
"text-anchor",
|
|
@@ -614,7 +614,7 @@ var Ge = {
|
|
|
614
614
|
"fill",
|
|
615
615
|
"stroke",
|
|
616
616
|
"stroke-width"
|
|
617
|
-
],
|
|
617
|
+
], Y = ["x", "dy"], Ze = ["font-weight", "font-style"], X = 13, Z = "normal", Qe = 700, $e = "var(--color-bg-0, #fff)", et = 3, tt = 1, nt = 4, rt = 6, it = 1.2, at = .35, ot = /* @__PURE__ */ l({
|
|
618
618
|
__name: "ChartAnnotations",
|
|
619
619
|
props: {
|
|
620
620
|
annotations: { default: () => [] },
|
|
@@ -651,18 +651,18 @@ var Ge = {
|
|
|
651
651
|
if (!n || !isFinite(n.x) || !isFinite(n.y)) continue;
|
|
652
652
|
let i = t.pointer ?? "curved", a = i.startsWith("rule");
|
|
653
653
|
if (a && !r.bounds) continue;
|
|
654
|
-
let { x: o, y: l } = t.offset, d = n.x + o, p = n.y + l, m = t.color ?? "currentColor", h = t.fontSize ??
|
|
654
|
+
let { x: o, y: l } = t.offset, d = n.x + o, p = n.y + l, m = t.color ?? "currentColor", h = t.fontSize ?? X, g = t.fontWeight ?? Z, _ = t.outlineColor ?? $e, v = t.outlineWidth ?? et, y = t.lineColor ?? m, b = t.lineWidth ?? tt, x = s(t.lineDash), ee = {
|
|
655
655
|
left: "start",
|
|
656
656
|
center: "middle",
|
|
657
657
|
right: "end"
|
|
658
|
-
}[t.align ?? (o > 0 ? "left" : o < 0 ? "right" : "center")], S, C = "", w, T = !a && (t.arrow ?? !0);
|
|
659
|
-
if (a && r.bounds)
|
|
658
|
+
}[t.align ?? (o > 0 ? "left" : o < 0 ? "right" : "center")], S = t.text.split("\n").map(c), C, te = "", w, T = !a && (t.arrow ?? !0);
|
|
659
|
+
if (a && r.bounds) C = u(i, n.x, n.y, r.bounds);
|
|
660
660
|
else {
|
|
661
|
-
let e = f(n.x, n.y, d, p, h, i);
|
|
662
|
-
|
|
661
|
+
let e = f(n.x, n.y, d, p, h, S.length, i);
|
|
662
|
+
te = e.path, T && e.arrow && (w = e.arrow);
|
|
663
663
|
}
|
|
664
664
|
e.push({
|
|
665
|
-
lines:
|
|
665
|
+
lines: S,
|
|
666
666
|
textX: d,
|
|
667
667
|
textY: p,
|
|
668
668
|
textAnchor: ee,
|
|
@@ -672,14 +672,14 @@ var Ge = {
|
|
|
672
672
|
color: m,
|
|
673
673
|
outlineColor: _,
|
|
674
674
|
outlineWidth: v,
|
|
675
|
-
pointerPath:
|
|
675
|
+
pointerPath: te,
|
|
676
676
|
lineColor: y,
|
|
677
677
|
lineWidth: b,
|
|
678
678
|
lineDash: x,
|
|
679
679
|
arrow: T,
|
|
680
680
|
arrowTip: w,
|
|
681
681
|
arrowTransform: w ? `translate(${w.x} ${w.y}) rotate(${w.angle})` : "",
|
|
682
|
-
rule:
|
|
682
|
+
rule: C
|
|
683
683
|
});
|
|
684
684
|
}
|
|
685
685
|
return e;
|
|
@@ -730,13 +730,13 @@ var Ge = {
|
|
|
730
730
|
};
|
|
731
731
|
}
|
|
732
732
|
}
|
|
733
|
-
function f(e, t, n, r, i, a) {
|
|
734
|
-
if (
|
|
735
|
-
let
|
|
736
|
-
if (
|
|
737
|
-
let i =
|
|
738
|
-
if (
|
|
739
|
-
let
|
|
733
|
+
function f(e, t, n, r, i, a, o) {
|
|
734
|
+
if (o === "none") return { path: "" };
|
|
735
|
+
let s = n - e, c = r - t, l = i * it, u = (c < 0 ? r + (a - 1) * l : r) - i * at;
|
|
736
|
+
if (s === 0 || c === 0 || o === "straight") {
|
|
737
|
+
let i = c === 0 ? r : u, a = n - e, o = i - t, s = Math.hypot(a, o);
|
|
738
|
+
if (s <= 10) return { path: "" };
|
|
739
|
+
let l = a / s, d = o / s, f = e + l * nt, p = t + d * nt, m = n - l * rt, h = i - d * rt, g = Math.atan2(-d, -l) * 180 / Math.PI;
|
|
740
740
|
return {
|
|
741
741
|
path: `M${f},${p} L${m},${h}`,
|
|
742
742
|
arrow: {
|
|
@@ -746,15 +746,15 @@ var Ge = {
|
|
|
746
746
|
}
|
|
747
747
|
};
|
|
748
748
|
}
|
|
749
|
-
let
|
|
750
|
-
if (Math.abs(
|
|
751
|
-
let
|
|
749
|
+
let d = u - t;
|
|
750
|
+
if (Math.abs(d) <= nt || Math.abs(s) <= rt) return { path: "" };
|
|
751
|
+
let f = Math.sign(s), p = Math.sign(d), m = e, h = t + p * nt, g = n - f * rt, _ = u, v = p > 0 ? -90 : 90;
|
|
752
752
|
return {
|
|
753
|
-
path: `M${
|
|
753
|
+
path: `M${m},${h} Q${m},${u} ${g},${_}`,
|
|
754
754
|
arrow: {
|
|
755
|
-
x:
|
|
756
|
-
y:
|
|
757
|
-
angle:
|
|
755
|
+
x: m,
|
|
756
|
+
y: h,
|
|
757
|
+
angle: v
|
|
758
758
|
}
|
|
759
759
|
};
|
|
760
760
|
}
|
|
@@ -786,7 +786,7 @@ var Ge = {
|
|
|
786
786
|
"stroke-width": t.outlineWidth,
|
|
787
787
|
"stroke-linejoin": "round",
|
|
788
788
|
transform: t.arrowTransform
|
|
789
|
-
}, null, 8,
|
|
789
|
+
}, null, 8, Je)) : i("", !0),
|
|
790
790
|
t.rule ? (_(), a("line", d({
|
|
791
791
|
key: 3,
|
|
792
792
|
ref_for: !0
|
|
@@ -795,7 +795,7 @@ var Ge = {
|
|
|
795
795
|
"stroke-width": t.lineWidth,
|
|
796
796
|
"stroke-dasharray": t.lineDash,
|
|
797
797
|
"stroke-linecap": "round"
|
|
798
|
-
}), null, 16,
|
|
798
|
+
}), null, 16, Ye)) : i("", !0),
|
|
799
799
|
t.pointerPath ? (_(), a("path", {
|
|
800
800
|
key: 4,
|
|
801
801
|
d: t.pointerPath,
|
|
@@ -804,13 +804,13 @@ var Ge = {
|
|
|
804
804
|
"stroke-width": t.lineWidth,
|
|
805
805
|
"stroke-dasharray": t.lineDash,
|
|
806
806
|
"stroke-linecap": "round"
|
|
807
|
-
}, null, 8,
|
|
807
|
+
}, null, 8, q)) : i("", !0),
|
|
808
808
|
t.arrowTip ? (_(), a("polygon", {
|
|
809
809
|
key: 5,
|
|
810
810
|
points: "0,0 -6,-3 -6,3",
|
|
811
811
|
fill: t.lineColor,
|
|
812
812
|
transform: t.arrowTransform
|
|
813
|
-
}, null, 8,
|
|
813
|
+
}, null, 8, Xe)) : i("", !0),
|
|
814
814
|
o("text", {
|
|
815
815
|
x: t.textX,
|
|
816
816
|
y: t.textY,
|
|
@@ -830,7 +830,7 @@ var Ge = {
|
|
|
830
830
|
key: t,
|
|
831
831
|
"font-weight": e.bold ? Qe : void 0,
|
|
832
832
|
"font-style": e.italic ? "italic" : void 0
|
|
833
|
-
}, x(e.text), 9,
|
|
833
|
+
}, x(e.text), 9, Ze))), 128))], 8, Y))), 128))], 8, J)
|
|
834
834
|
], 64))), 128))]));
|
|
835
835
|
}
|
|
836
836
|
}), st = 400, ct = 200;
|
|
@@ -858,7 +858,7 @@ function lt(e) {
|
|
|
858
858
|
width: () => g.value,
|
|
859
859
|
height: () => _.value,
|
|
860
860
|
extraPadding: e.chartPadding
|
|
861
|
-
}), { hoverIndex: C, tooltipRef:
|
|
861
|
+
}), { hoverIndex: C, tooltipRef: te, tooltipPos: w, handlers: T } = Me({
|
|
862
862
|
enabled: e.hasTooltipSlot,
|
|
863
863
|
trigger: e.tooltipTrigger,
|
|
864
864
|
clamp: () => e.tooltipClamp() ?? "chart",
|
|
@@ -879,9 +879,9 @@ function lt(e) {
|
|
|
879
879
|
innerH: ee,
|
|
880
880
|
bounds: S,
|
|
881
881
|
hoverIndex: C,
|
|
882
|
-
tooltipRef:
|
|
883
|
-
tooltipPos:
|
|
884
|
-
tooltipHandlers:
|
|
882
|
+
tooltipRef: te,
|
|
883
|
+
tooltipPos: w,
|
|
884
|
+
tooltipHandlers: T,
|
|
885
885
|
menuItems: o,
|
|
886
886
|
downloadLinkText: s,
|
|
887
887
|
csvHref: c,
|
|
@@ -898,9 +898,9 @@ function lt(e) {
|
|
|
898
898
|
function ut(e, t) {
|
|
899
899
|
return (n) => {
|
|
900
900
|
let r = e();
|
|
901
|
-
if (r !== void 0) return
|
|
901
|
+
if (r !== void 0) return ne(n, r);
|
|
902
902
|
let i = t();
|
|
903
|
-
return i === void 0 ?
|
|
903
|
+
return i === void 0 ? B(n) : ne(n, i);
|
|
904
904
|
};
|
|
905
905
|
}
|
|
906
906
|
//#endregion
|
|
@@ -955,46 +955,46 @@ function gt(e, t = "#ffffff", n = "#1a1a1a") {
|
|
|
955
955
|
}
|
|
956
956
|
//#endregion
|
|
957
957
|
//#region src/_shared/dateAxis.ts
|
|
958
|
-
var _t = /^(\d{4})-(\d{2})-(\d{2})$/, vt = /^(\d{4})-(\d{2})-(\d{2})[Tt ](\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?(Z|[+-]\d{2}:?\d{2})?$/,
|
|
958
|
+
var _t = /^(\d{4})-(\d{2})-(\d{2})$/, vt = /^(\d{4})-(\d{2})-(\d{2})[Tt ](\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?(Z|[+-]\d{2}:?\d{2})?$/, yt = 1e3, Q = 60 * yt, bt = 60 * Q, xt = 24 * bt, St = 7 * xt, Ct = 30 * xt, wt = 365 * xt, Tt = [
|
|
959
959
|
{
|
|
960
960
|
unit: "second",
|
|
961
961
|
step: 1,
|
|
962
|
-
ms: 1 *
|
|
962
|
+
ms: 1 * yt
|
|
963
963
|
},
|
|
964
964
|
{
|
|
965
965
|
unit: "second",
|
|
966
966
|
step: 5,
|
|
967
|
-
ms: 5 *
|
|
967
|
+
ms: 5 * yt
|
|
968
968
|
},
|
|
969
969
|
{
|
|
970
970
|
unit: "second",
|
|
971
971
|
step: 15,
|
|
972
|
-
ms: 15 *
|
|
972
|
+
ms: 15 * yt
|
|
973
973
|
},
|
|
974
974
|
{
|
|
975
975
|
unit: "second",
|
|
976
976
|
step: 30,
|
|
977
|
-
ms: 30 *
|
|
977
|
+
ms: 30 * yt
|
|
978
978
|
},
|
|
979
979
|
{
|
|
980
980
|
unit: "minute",
|
|
981
981
|
step: 1,
|
|
982
|
-
ms: 1 *
|
|
982
|
+
ms: 1 * Q
|
|
983
983
|
},
|
|
984
984
|
{
|
|
985
985
|
unit: "minute",
|
|
986
986
|
step: 5,
|
|
987
|
-
ms: 5 *
|
|
987
|
+
ms: 5 * Q
|
|
988
988
|
},
|
|
989
989
|
{
|
|
990
990
|
unit: "minute",
|
|
991
991
|
step: 15,
|
|
992
|
-
ms: 15 *
|
|
992
|
+
ms: 15 * Q
|
|
993
993
|
},
|
|
994
994
|
{
|
|
995
995
|
unit: "minute",
|
|
996
996
|
step: 30,
|
|
997
|
-
ms: 30 *
|
|
997
|
+
ms: 30 * Q
|
|
998
998
|
},
|
|
999
999
|
{
|
|
1000
1000
|
unit: "hour",
|
|
@@ -1098,7 +1098,7 @@ function Dt(e, t) {
|
|
|
1098
1098
|
let e = +r[1], n = r[2] - 1, i = +r[3], a = +r[4], o = +r[5], s = r[6] ? +r[6] : 0, c = r[7] ? Number("0." + r[7]) * 1e3 : 0, l = r[8];
|
|
1099
1099
|
if (l) {
|
|
1100
1100
|
if (l === "Z" || l === "z") return Date.UTC(e, n, i, a, o, s, c);
|
|
1101
|
-
let t = l[0] === "+" ? 1 : -1, r = +l.slice(1, 3), u = +l.slice(-2), d = t * (r * 60 + u) *
|
|
1101
|
+
let t = l[0] === "+" ? 1 : -1, r = +l.slice(1, 3), u = +l.slice(-2), d = t * (r * 60 + u) * Q;
|
|
1102
1102
|
return Date.UTC(e, n, i, a, o, s, c) - d;
|
|
1103
1103
|
}
|
|
1104
1104
|
return t === "utc" ? Date.UTC(e, n, i, a, o, s, c) : new Date(e, n, i, a, o, s, c).getTime();
|
|
@@ -1124,8 +1124,8 @@ function At(e, t) {
|
|
|
1124
1124
|
function jt(e, t, n) {
|
|
1125
1125
|
let r = new Date(e);
|
|
1126
1126
|
if (n === "utc") switch (t) {
|
|
1127
|
-
case "second": return Math.floor(e /
|
|
1128
|
-
case "minute": return Math.floor(e /
|
|
1127
|
+
case "second": return Math.floor(e / yt) * yt;
|
|
1128
|
+
case "minute": return Math.floor(e / Q) * Q;
|
|
1129
1129
|
case "hour": return Math.floor(e / bt) * bt;
|
|
1130
1130
|
case "day": return Date.UTC(r.getUTCFullYear(), r.getUTCMonth(), r.getUTCDate());
|
|
1131
1131
|
case "week": {
|
|
@@ -1136,8 +1136,8 @@ function jt(e, t, n) {
|
|
|
1136
1136
|
case "year": return Date.UTC(r.getUTCFullYear(), 0, 1);
|
|
1137
1137
|
}
|
|
1138
1138
|
switch (t) {
|
|
1139
|
-
case "second": return Math.floor(e /
|
|
1140
|
-
case "minute": return Math.floor(e /
|
|
1139
|
+
case "second": return Math.floor(e / yt) * yt;
|
|
1140
|
+
case "minute": return Math.floor(e / Q) * Q;
|
|
1141
1141
|
case "hour": return new Date(r.getFullYear(), r.getMonth(), r.getDate(), r.getHours()).getTime();
|
|
1142
1142
|
case "day": return new Date(r.getFullYear(), r.getMonth(), r.getDate()).getTime();
|
|
1143
1143
|
case "week": {
|
|
@@ -1149,8 +1149,8 @@ function jt(e, t, n) {
|
|
|
1149
1149
|
}
|
|
1150
1150
|
}
|
|
1151
1151
|
function Mt(e, t, n, r) {
|
|
1152
|
-
if (t === "second") return e + n *
|
|
1153
|
-
if (t === "minute") return e + n *
|
|
1152
|
+
if (t === "second") return e + n * yt;
|
|
1153
|
+
if (t === "minute") return e + n * Q;
|
|
1154
1154
|
if (t === "hour" && r === "utc") return e + n * bt;
|
|
1155
1155
|
if (t === "week" && r === "utc") return e + n * St;
|
|
1156
1156
|
let i = new Date(e);
|
|
@@ -1261,40 +1261,35 @@ function zt(e, t, n, r) {
|
|
|
1261
1261
|
}
|
|
1262
1262
|
//#endregion
|
|
1263
1263
|
//#region src/LineChart/LineChart.vue?vue&type=script&setup=true&lang.ts
|
|
1264
|
-
var Bt = {
|
|
1264
|
+
var Bt = ["role", "aria-label"], Vt = {
|
|
1265
1265
|
class: "chart-sr-only",
|
|
1266
1266
|
"aria-live": "polite"
|
|
1267
|
-
},
|
|
1267
|
+
}, Ht = ["width", "height"], Ut = [
|
|
1268
1268
|
"x",
|
|
1269
1269
|
"y",
|
|
1270
1270
|
"text-anchor",
|
|
1271
1271
|
"font-size",
|
|
1272
1272
|
"font-weight",
|
|
1273
1273
|
"fill"
|
|
1274
|
-
],
|
|
1274
|
+
], Wt = ["x", "dy"], Gt = { key: 1 }, Kt = [
|
|
1275
1275
|
"x1",
|
|
1276
1276
|
"y1",
|
|
1277
1277
|
"x2",
|
|
1278
1278
|
"y2",
|
|
1279
1279
|
"stroke",
|
|
1280
1280
|
"stroke-dasharray"
|
|
1281
|
-
],
|
|
1281
|
+
], qt = [
|
|
1282
1282
|
"cx",
|
|
1283
1283
|
"cy",
|
|
1284
1284
|
"fill",
|
|
1285
1285
|
"fill-opacity",
|
|
1286
1286
|
"stroke"
|
|
1287
|
-
],
|
|
1287
|
+
], Jt = [
|
|
1288
1288
|
"x",
|
|
1289
1289
|
"y",
|
|
1290
1290
|
"font-size",
|
|
1291
1291
|
"fill",
|
|
1292
1292
|
"font-weight"
|
|
1293
|
-
], Jt = [
|
|
1294
|
-
"x1",
|
|
1295
|
-
"y1",
|
|
1296
|
-
"x2",
|
|
1297
|
-
"y2"
|
|
1298
1293
|
], Yt = [
|
|
1299
1294
|
"x1",
|
|
1300
1295
|
"y1",
|
|
@@ -1311,18 +1306,23 @@ var Bt = {
|
|
|
1311
1306
|
"x2",
|
|
1312
1307
|
"y2"
|
|
1313
1308
|
], Qt = [
|
|
1309
|
+
"x1",
|
|
1310
|
+
"y1",
|
|
1311
|
+
"x2",
|
|
1312
|
+
"y2"
|
|
1313
|
+
], $t = [
|
|
1314
1314
|
"x",
|
|
1315
1315
|
"y",
|
|
1316
1316
|
"font-size",
|
|
1317
1317
|
"fill",
|
|
1318
1318
|
"font-weight",
|
|
1319
1319
|
"fill-opacity"
|
|
1320
|
-
],
|
|
1320
|
+
], en = [
|
|
1321
1321
|
"transform",
|
|
1322
1322
|
"font-size",
|
|
1323
1323
|
"fill",
|
|
1324
1324
|
"font-weight"
|
|
1325
|
-
],
|
|
1325
|
+
], tn = [
|
|
1326
1326
|
"x",
|
|
1327
1327
|
"y",
|
|
1328
1328
|
"text-anchor",
|
|
@@ -1330,43 +1330,43 @@ var Bt = {
|
|
|
1330
1330
|
"fill",
|
|
1331
1331
|
"font-weight",
|
|
1332
1332
|
"fill-opacity"
|
|
1333
|
-
],
|
|
1333
|
+
], nn = [
|
|
1334
1334
|
"x",
|
|
1335
1335
|
"y",
|
|
1336
1336
|
"font-size",
|
|
1337
1337
|
"fill",
|
|
1338
1338
|
"font-weight"
|
|
1339
|
-
],
|
|
1339
|
+
], rn = [
|
|
1340
1340
|
"d",
|
|
1341
1341
|
"fill",
|
|
1342
1342
|
"fill-opacity"
|
|
1343
|
-
],
|
|
1343
|
+
], an = [
|
|
1344
1344
|
"d",
|
|
1345
1345
|
"stroke",
|
|
1346
1346
|
"stroke-width"
|
|
1347
|
-
],
|
|
1347
|
+
], on = [
|
|
1348
1348
|
"d",
|
|
1349
1349
|
"stroke",
|
|
1350
1350
|
"stroke-width",
|
|
1351
1351
|
"stroke-opacity",
|
|
1352
1352
|
"stroke-dasharray"
|
|
1353
|
-
],
|
|
1353
|
+
], sn = [
|
|
1354
1354
|
"cx",
|
|
1355
1355
|
"cy",
|
|
1356
1356
|
"r",
|
|
1357
1357
|
"fill",
|
|
1358
1358
|
"fill-opacity",
|
|
1359
1359
|
"stroke"
|
|
1360
|
-
],
|
|
1360
|
+
], cn = [
|
|
1361
1361
|
"d",
|
|
1362
1362
|
"fill",
|
|
1363
1363
|
"fill-opacity"
|
|
1364
|
-
],
|
|
1364
|
+
], ln = [
|
|
1365
1365
|
"d",
|
|
1366
1366
|
"stroke",
|
|
1367
1367
|
"stroke-width",
|
|
1368
1368
|
"stroke-dasharray"
|
|
1369
|
-
],
|
|
1369
|
+
], un = [
|
|
1370
1370
|
"x1",
|
|
1371
1371
|
"y1",
|
|
1372
1372
|
"x2",
|
|
@@ -1374,7 +1374,7 @@ var Bt = {
|
|
|
1374
1374
|
"stroke",
|
|
1375
1375
|
"stroke-width",
|
|
1376
1376
|
"stroke-dasharray"
|
|
1377
|
-
],
|
|
1377
|
+
], dn = [
|
|
1378
1378
|
"x1",
|
|
1379
1379
|
"y1",
|
|
1380
1380
|
"x2",
|
|
@@ -1382,53 +1382,53 @@ var Bt = {
|
|
|
1382
1382
|
"stroke",
|
|
1383
1383
|
"stroke-width",
|
|
1384
1384
|
"stroke-dasharray"
|
|
1385
|
-
],
|
|
1385
|
+
], fn = [
|
|
1386
1386
|
"x1",
|
|
1387
1387
|
"y1",
|
|
1388
1388
|
"x2",
|
|
1389
1389
|
"y2"
|
|
1390
|
-
],
|
|
1390
|
+
], pn = [
|
|
1391
1391
|
"x1",
|
|
1392
1392
|
"y1",
|
|
1393
1393
|
"x2",
|
|
1394
1394
|
"y2"
|
|
1395
|
-
],
|
|
1395
|
+
], mn = [
|
|
1396
1396
|
"x1",
|
|
1397
1397
|
"y1",
|
|
1398
1398
|
"x2",
|
|
1399
1399
|
"y2"
|
|
1400
|
-
],
|
|
1400
|
+
], hn = [
|
|
1401
1401
|
"cx",
|
|
1402
1402
|
"cy",
|
|
1403
1403
|
"fill"
|
|
1404
|
-
],
|
|
1404
|
+
], gn = [
|
|
1405
1405
|
"x",
|
|
1406
1406
|
"y",
|
|
1407
1407
|
"width",
|
|
1408
1408
|
"height"
|
|
1409
|
-
],
|
|
1409
|
+
], _n = [
|
|
1410
1410
|
"cx",
|
|
1411
1411
|
"cy",
|
|
1412
1412
|
"fill",
|
|
1413
1413
|
"fill-opacity",
|
|
1414
1414
|
"stroke"
|
|
1415
|
-
],
|
|
1415
|
+
], vn = [
|
|
1416
1416
|
"x",
|
|
1417
1417
|
"y",
|
|
1418
1418
|
"font-size",
|
|
1419
1419
|
"font-weight",
|
|
1420
1420
|
"fill"
|
|
1421
|
-
],
|
|
1421
|
+
], yn = [
|
|
1422
1422
|
"x",
|
|
1423
1423
|
"y",
|
|
1424
1424
|
"font-size",
|
|
1425
1425
|
"font-weight",
|
|
1426
1426
|
"fill",
|
|
1427
1427
|
"fill-opacity"
|
|
1428
|
-
],
|
|
1428
|
+
], bn = { class: "line-chart-tooltip" }, xn = {
|
|
1429
1429
|
key: 0,
|
|
1430
1430
|
class: "line-chart-tooltip-label"
|
|
1431
|
-
},
|
|
1431
|
+
}, Sn = ["href", "download"], Cn = 36, wn = 12, Tn = 7, En = 16, Dn = /* @__PURE__ */ L(/* @__PURE__ */ l({
|
|
1432
1432
|
inheritAttrs: !1,
|
|
1433
1433
|
__name: "LineChart",
|
|
1434
1434
|
props: {
|
|
@@ -1454,6 +1454,8 @@ var Bt = {
|
|
|
1454
1454
|
height: {},
|
|
1455
1455
|
title: {},
|
|
1456
1456
|
titleStyle: {},
|
|
1457
|
+
role: {},
|
|
1458
|
+
ariaLabel: {},
|
|
1457
1459
|
axisLabelStyle: {},
|
|
1458
1460
|
tickLabelStyle: {},
|
|
1459
1461
|
legendStyle: {},
|
|
@@ -1478,21 +1480,21 @@ var Bt = {
|
|
|
1478
1480
|
},
|
|
1479
1481
|
emits: ["hover"],
|
|
1480
1482
|
setup(c, { emit: l }) {
|
|
1481
|
-
let f = c, h =
|
|
1482
|
-
function*
|
|
1483
|
+
let f = c, h = n(() => f.ariaLabel ?? f.title), g = n(() => f.role ?? (h.value ? "figure" : void 0)), v = l, S = [];
|
|
1484
|
+
function* te(e) {
|
|
1483
1485
|
if (e.x && e.x.length > 0 && (yield e.x), e.series) for (let t of e.series) t.x && t.x.length > 0 && (yield t.x);
|
|
1484
1486
|
if (e.areas) for (let t of e.areas) t.x && t.x.length > 0 && (yield t.x);
|
|
1485
1487
|
}
|
|
1486
|
-
function
|
|
1488
|
+
function w(e, t, n) {
|
|
1487
1489
|
if (!e) return;
|
|
1488
1490
|
if (!t) return e;
|
|
1489
1491
|
let r = new Float64Array(e.length);
|
|
1490
1492
|
for (let t = 0; t < e.length; t++) r[t] = Dt(e[t], n) ?? NaN;
|
|
1491
1493
|
return r;
|
|
1492
1494
|
}
|
|
1493
|
-
let
|
|
1494
|
-
let e =
|
|
1495
|
-
for (let r of
|
|
1495
|
+
let T = ut(() => f.tooltipValueFormat, () => f.yTickFormat), E = n(() => f.timezone ?? "utc"), D = n(() => {
|
|
1496
|
+
let e = E.value, t = !1, n = !1;
|
|
1497
|
+
for (let r of te(f)) {
|
|
1496
1498
|
if (n = !0, !kt(r, e)) {
|
|
1497
1499
|
t = !1;
|
|
1498
1500
|
break;
|
|
@@ -1502,42 +1504,42 @@ var Bt = {
|
|
|
1502
1504
|
n || (t = !1);
|
|
1503
1505
|
let r = f.series && f.series.length > 0 ? f.series.map((n) => ({
|
|
1504
1506
|
...n,
|
|
1505
|
-
data: n.y ?? n.data ??
|
|
1506
|
-
x:
|
|
1507
|
+
data: n.y ?? n.data ?? S,
|
|
1508
|
+
x: w(n.x, t, e)
|
|
1507
1509
|
})) : (() => {
|
|
1508
1510
|
let n = f.y ?? f.data;
|
|
1509
1511
|
return n ? [{
|
|
1510
1512
|
data: n,
|
|
1511
|
-
x:
|
|
1513
|
+
x: w(f.x, t, e)
|
|
1512
1514
|
}] : [];
|
|
1513
1515
|
})(), i = (f.areas ?? []).map((n) => ({
|
|
1514
1516
|
...n,
|
|
1515
|
-
x:
|
|
1517
|
+
x: w(n.x, t, e)
|
|
1516
1518
|
}));
|
|
1517
1519
|
return {
|
|
1518
1520
|
isDate: t,
|
|
1519
1521
|
series: r,
|
|
1520
1522
|
areas: i
|
|
1521
1523
|
};
|
|
1522
|
-
}),
|
|
1524
|
+
}), O = n(() => D.value.isDate), k = n(() => D.value.series), A = n(() => D.value.areas), re = n(() => {
|
|
1523
1525
|
let e = 0;
|
|
1524
|
-
for (let t of
|
|
1525
|
-
for (let t of
|
|
1526
|
+
for (let t of k.value) t.data.length > e && (e = t.data.length);
|
|
1527
|
+
for (let t of A.value) t.upper.length > e && (e = t.upper.length), t.lower.length > e && (e = t.lower.length);
|
|
1526
1528
|
return e;
|
|
1527
|
-
}), j = n(() =>
|
|
1529
|
+
}), j = n(() => k.value.some((e) => e.x != null) || A.value.some((e) => e.x != null));
|
|
1528
1530
|
function M(e, t) {
|
|
1529
1531
|
return e.x ? Number(e.x[t]) : t;
|
|
1530
1532
|
}
|
|
1531
1533
|
function N(e, t) {
|
|
1532
1534
|
return e.x ? Number(e.x[t]) : t;
|
|
1533
1535
|
}
|
|
1534
|
-
let
|
|
1536
|
+
let ie = n(() => j.value ? 0 : f.xMin ?? 0), ae = n(() => {
|
|
1535
1537
|
let e = Infinity, t = -Infinity;
|
|
1536
|
-
for (let n of
|
|
1538
|
+
for (let n of k.value) for (let r = 0; r < n.data.length; r++) {
|
|
1537
1539
|
let i = M(n, r);
|
|
1538
1540
|
isFinite(i) && (i < e && (e = i), i > t && (t = i));
|
|
1539
1541
|
}
|
|
1540
|
-
for (let n of
|
|
1542
|
+
for (let n of A.value) {
|
|
1541
1543
|
let r = Math.max(n.upper.length, n.lower.length);
|
|
1542
1544
|
for (let i = 0; i < r; i++) {
|
|
1543
1545
|
let r = N(n, i);
|
|
@@ -1553,15 +1555,15 @@ var Bt = {
|
|
|
1553
1555
|
};
|
|
1554
1556
|
});
|
|
1555
1557
|
function P(e) {
|
|
1556
|
-
let { min: t, max: n } =
|
|
1558
|
+
let { min: t, max: n } = ae.value, r = n - t || 1;
|
|
1557
1559
|
return U.value.left + (e - t) / r * G.value;
|
|
1558
1560
|
}
|
|
1559
|
-
let
|
|
1561
|
+
let oe = n(() => {
|
|
1560
1562
|
let e = Infinity, t = -Infinity, n = Infinity, r = (r) => {
|
|
1561
1563
|
isFinite(r) && (r < e && (e = r), r > t && (t = r), r > 0 && r < n && (n = r));
|
|
1562
1564
|
};
|
|
1563
|
-
for (let e of
|
|
1564
|
-
for (let e of
|
|
1565
|
+
for (let e of k.value) for (let t of e.data) r(t);
|
|
1566
|
+
for (let e of A.value) {
|
|
1565
1567
|
for (let t of e.upper) r(t);
|
|
1566
1568
|
for (let t of e.lower) r(t);
|
|
1567
1569
|
}
|
|
@@ -1579,10 +1581,10 @@ var Bt = {
|
|
|
1579
1581
|
};
|
|
1580
1582
|
});
|
|
1581
1583
|
function F(e) {
|
|
1582
|
-
let { min: t, max: n } =
|
|
1584
|
+
let { min: t, max: n } = oe.value;
|
|
1583
1585
|
return U.value.top + K.value - _e(e, t, n, f.yScaleType) * K.value;
|
|
1584
1586
|
}
|
|
1585
|
-
function
|
|
1587
|
+
function se(e) {
|
|
1586
1588
|
let t = e.data;
|
|
1587
1589
|
if (t.length === 0) return "";
|
|
1588
1590
|
let n = "", r = !1;
|
|
@@ -1597,7 +1599,7 @@ var Bt = {
|
|
|
1597
1599
|
}
|
|
1598
1600
|
return n;
|
|
1599
1601
|
}
|
|
1600
|
-
function
|
|
1602
|
+
function ce(e) {
|
|
1601
1603
|
let t = e.data, n = [];
|
|
1602
1604
|
for (let r = 0; r < t.length; r++) {
|
|
1603
1605
|
let i = M(e, r);
|
|
@@ -1608,7 +1610,7 @@ var Bt = {
|
|
|
1608
1610
|
}
|
|
1609
1611
|
return n;
|
|
1610
1612
|
}
|
|
1611
|
-
function
|
|
1613
|
+
function le(e) {
|
|
1612
1614
|
let t = Math.min(e.upper.length, e.lower.length);
|
|
1613
1615
|
if (t === 0) return "";
|
|
1614
1616
|
let n = [], r = [];
|
|
@@ -1624,16 +1626,16 @@ var Bt = {
|
|
|
1624
1626
|
return i;
|
|
1625
1627
|
}
|
|
1626
1628
|
function I(e, t) {
|
|
1627
|
-
let n = t === "start" ? e.startIndex : e.endIndex, r = e.seriesIndex != null &&
|
|
1629
|
+
let n = t === "start" ? e.startIndex : e.endIndex, r = e.seriesIndex != null && k.value[e.seriesIndex] || k.value[0];
|
|
1628
1630
|
return P(r ? M(r, n) : n);
|
|
1629
1631
|
}
|
|
1630
|
-
function
|
|
1632
|
+
function ue(e, t = !0) {
|
|
1631
1633
|
let n = U.value.top + K.value;
|
|
1632
1634
|
if (e.seriesIndex == null) {
|
|
1633
1635
|
let t = I(e, "start"), r = I(e, "end");
|
|
1634
1636
|
return t > r ? "" : `M${t},${U.value.top}L${r},${U.value.top}L${r},${n}L${t},${n}Z`;
|
|
1635
1637
|
}
|
|
1636
|
-
let r =
|
|
1638
|
+
let r = k.value[e.seriesIndex];
|
|
1637
1639
|
if (!r) return "";
|
|
1638
1640
|
let i = Math.max(0, e.startIndex), a = Math.min(r.data.length - 1, e.endIndex);
|
|
1639
1641
|
if (i > a) return "";
|
|
@@ -1641,7 +1643,7 @@ var Bt = {
|
|
|
1641
1643
|
for (let e = i + 1; e <= a; e++) isFinite(r.data[e]) && (o += `L${P(M(r, e))},${F(r.data[e])}`);
|
|
1642
1644
|
return t && (o += `L${P(M(r, a))},${n}`, o += `L${P(M(r, i))},${n}`, o += "Z"), o;
|
|
1643
1645
|
}
|
|
1644
|
-
let
|
|
1646
|
+
let de = n(() => {
|
|
1645
1647
|
let e = f.areaSections;
|
|
1646
1648
|
if (!e?.length) return {
|
|
1647
1649
|
labels: [],
|
|
@@ -1650,11 +1652,11 @@ var Bt = {
|
|
|
1650
1652
|
let t = [], n = U.value.left + G.value;
|
|
1651
1653
|
for (let r of e) {
|
|
1652
1654
|
if (!r.label && !r.description || r.legend === "inline" || r.legend === !1) continue;
|
|
1653
|
-
let e = r.label ?? "", i = r.description ?? "", a = Math.max(e.length, i.length) *
|
|
1655
|
+
let e = r.label ?? "", i = r.description ?? "", a = Math.max(e.length, i.length) * Tn, o = I(r, "start") + a / 2 + 2, s = n - a / 2 - 8, c = Math.min(o, s), l = r.color ?? (r.seriesIndex == null ? "#999" : k.value[r.seriesIndex]?.color ?? "currentColor"), u = V({
|
|
1654
1656
|
color: l,
|
|
1655
1657
|
fontWeight: 600,
|
|
1656
1658
|
...r.inlineLabelStyle
|
|
1657
|
-
}, { fontSize: 11 }), d =
|
|
1659
|
+
}, { fontSize: 11 }), d = V(r.inlineDescriptionStyle, {
|
|
1658
1660
|
fontSize: 11,
|
|
1659
1661
|
fillOpacity: .6
|
|
1660
1662
|
});
|
|
@@ -1674,7 +1676,7 @@ var Bt = {
|
|
|
1674
1676
|
let r = [];
|
|
1675
1677
|
for (let e of t) {
|
|
1676
1678
|
let t = e.cx - e.textWidth / 2, n = 0;
|
|
1677
|
-
for (; n < r.length && !(t >= r[n] +
|
|
1679
|
+
for (; n < r.length && !(t >= r[n] + En);) n++;
|
|
1678
1680
|
e.row = n;
|
|
1679
1681
|
let i = e.cx + e.textWidth / 2;
|
|
1680
1682
|
r[n] = Math.max(r[n] ?? -Infinity, i);
|
|
@@ -1684,11 +1686,11 @@ var Bt = {
|
|
|
1684
1686
|
extraHeight: 0
|
|
1685
1687
|
} : {
|
|
1686
1688
|
labels: t,
|
|
1687
|
-
extraHeight: (Math.max(...t.map((e) => e.row)) + 1) *
|
|
1689
|
+
extraHeight: (Math.max(...t.map((e) => e.row)) + 1) * Cn + wn
|
|
1688
1690
|
};
|
|
1689
|
-
}),
|
|
1691
|
+
}), fe = n(() => {
|
|
1690
1692
|
let e = [];
|
|
1691
|
-
for (let t of
|
|
1693
|
+
for (let t of k.value) !t.legend || t.showInLegend === !1 || e.push({
|
|
1692
1694
|
label: t.legend,
|
|
1693
1695
|
color: t.color ?? "currentColor",
|
|
1694
1696
|
type: "series",
|
|
@@ -1697,7 +1699,7 @@ var Bt = {
|
|
|
1697
1699
|
let t = f.areaSections;
|
|
1698
1700
|
if (t) for (let n of t) {
|
|
1699
1701
|
if (n.legend !== "inline" || !n.label && !n.description) continue;
|
|
1700
|
-
let t = [n.label, n.description].filter(Boolean).join(" "), r = n.color ?? (n.seriesIndex == null ? "#999" :
|
|
1702
|
+
let t = [n.label, n.description].filter(Boolean).join(" "), r = n.color ?? (n.seriesIndex == null ? "#999" : k.value[n.seriesIndex]?.color ?? "currentColor");
|
|
1701
1703
|
e.push({
|
|
1702
1704
|
label: t,
|
|
1703
1705
|
color: r,
|
|
@@ -1706,8 +1708,8 @@ var Bt = {
|
|
|
1706
1708
|
});
|
|
1707
1709
|
}
|
|
1708
1710
|
return e;
|
|
1709
|
-
}),
|
|
1710
|
-
let { min: e, max: t } =
|
|
1711
|
+
}), L = n(() => fe.value.map((e) => e.label)), me = n(() => Pe.value + de.value.extraHeight), he = n(() => U.value.top + K.value + U.value.bottom + wn), z = n(() => {
|
|
1712
|
+
let { min: e, max: t } = oe.value, n = (e) => f.yTickFormat === void 0 ? B(e) : ne(e, f.yTickFormat);
|
|
1711
1713
|
return e === t ? [{
|
|
1712
1714
|
value: n(e),
|
|
1713
1715
|
y: R(U.value.top + K.value / 2)
|
|
@@ -1725,18 +1727,18 @@ var Bt = {
|
|
|
1725
1727
|
y: R(F(e))
|
|
1726
1728
|
}));
|
|
1727
1729
|
});
|
|
1728
|
-
function
|
|
1730
|
+
function be(e, t, n) {
|
|
1729
1731
|
let r = f.xTickFormat;
|
|
1730
|
-
if (
|
|
1731
|
-
let i = e +
|
|
1732
|
-
return r === void 0 ? !j.value && f.xLabels && Number.isInteger(e) && e >= 0 && e < f.xLabels.length ? f.xLabels[e] :
|
|
1732
|
+
if (O.value) return typeof r == "function" ? r(e, t) : zt(e, r, E.value, n);
|
|
1733
|
+
let i = e + ie.value;
|
|
1734
|
+
return r === void 0 ? !j.value && f.xLabels && Number.isInteger(e) && e >= 0 && e < f.xLabels.length ? f.xLabels[e] : B(i) : typeof r == "function" ? r(i, t) : ne(i, r);
|
|
1733
1735
|
}
|
|
1734
|
-
let
|
|
1735
|
-
let { min: e, max: t } =
|
|
1736
|
+
let Se = n(() => {
|
|
1737
|
+
let { min: e, max: t } = ae.value;
|
|
1736
1738
|
if (e === t) return [];
|
|
1737
|
-
let n =
|
|
1739
|
+
let n = O.value, r = n ? 0 : ie.value, i = re.value, a = G.value / 80, o, s;
|
|
1738
1740
|
if (n) {
|
|
1739
|
-
let n = Nt(e, t, a,
|
|
1741
|
+
let n = Nt(e, t, a, E.value);
|
|
1740
1742
|
s = n.unit, o = ge({
|
|
1741
1743
|
min: e,
|
|
1742
1744
|
max: t,
|
|
@@ -1757,20 +1759,20 @@ var Bt = {
|
|
|
1757
1759
|
return o.map((e, t) => {
|
|
1758
1760
|
let n = R(P(e)), r = "middle";
|
|
1759
1761
|
return n - c <= 1 ? r = "start" : l - n <= 1 && (r = "end"), {
|
|
1760
|
-
value:
|
|
1762
|
+
value: be(e, t, s),
|
|
1761
1763
|
x: n,
|
|
1762
1764
|
anchor: r
|
|
1763
1765
|
};
|
|
1764
1766
|
});
|
|
1765
1767
|
});
|
|
1766
|
-
function
|
|
1767
|
-
return typeof f.csv == "function" ? f.csv() : typeof f.csv == "string" ? f.csv : He(
|
|
1768
|
+
function Ce() {
|
|
1769
|
+
return typeof f.csv == "function" ? f.csv() : typeof f.csv == "string" ? f.csv : He(k.value);
|
|
1768
1770
|
}
|
|
1769
|
-
let
|
|
1770
|
-
let e =
|
|
1771
|
+
let we = n(() => !!f.tooltipData || !!f.tooltipTrigger), Te = n(() => {
|
|
1772
|
+
let e = Le.value, t = k.value[0];
|
|
1771
1773
|
return e === null || !t ? null : M(t, e);
|
|
1772
|
-
}),
|
|
1773
|
-
function
|
|
1774
|
+
}), Ee = n(() => Te.value === null ? 0 : P(Te.value));
|
|
1775
|
+
function De(e, t) {
|
|
1774
1776
|
let n = e.data.length;
|
|
1775
1777
|
if (n === 0) return null;
|
|
1776
1778
|
let r = 0, i = Infinity;
|
|
@@ -1782,13 +1784,13 @@ var Bt = {
|
|
|
1782
1784
|
}
|
|
1783
1785
|
return i === Infinity ? null : r;
|
|
1784
1786
|
}
|
|
1785
|
-
let
|
|
1786
|
-
let e =
|
|
1787
|
+
let Oe = n(() => {
|
|
1788
|
+
let e = Te.value;
|
|
1787
1789
|
if (e === null) return [];
|
|
1788
1790
|
let t = [];
|
|
1789
|
-
for (let n of
|
|
1791
|
+
for (let n of k.value) {
|
|
1790
1792
|
if (n.showInTooltip === !1) continue;
|
|
1791
|
-
let r =
|
|
1793
|
+
let r = De(n, e);
|
|
1792
1794
|
if (r === null) continue;
|
|
1793
1795
|
let i = n.data[r];
|
|
1794
1796
|
isFinite(i) && t.push({
|
|
@@ -1798,14 +1800,14 @@ var Bt = {
|
|
|
1798
1800
|
});
|
|
1799
1801
|
}
|
|
1800
1802
|
return t;
|
|
1801
|
-
}),
|
|
1802
|
-
let e =
|
|
1803
|
+
}), ke = n(() => {
|
|
1804
|
+
let e = Le.value, t = Te.value;
|
|
1803
1805
|
if (e === null || t === null) return null;
|
|
1804
|
-
let n =
|
|
1806
|
+
let n = be(t, e), r = k.value, i = [];
|
|
1805
1807
|
for (let e = 0; e < r.length; e++) {
|
|
1806
1808
|
let n = r[e];
|
|
1807
1809
|
if (n.showInTooltip === !1) continue;
|
|
1808
|
-
let a =
|
|
1810
|
+
let a = De(n, t);
|
|
1809
1811
|
i.push({
|
|
1810
1812
|
value: a === null ? NaN : Number(n.data[a]),
|
|
1811
1813
|
color: n.color ?? "currentColor",
|
|
@@ -1819,21 +1821,21 @@ var Bt = {
|
|
|
1819
1821
|
data: f.tooltipData?.[e] ?? null
|
|
1820
1822
|
};
|
|
1821
1823
|
});
|
|
1822
|
-
function
|
|
1824
|
+
function Ae(e, t) {
|
|
1823
1825
|
return !isFinite(e) || !isFinite(t) ? null : {
|
|
1824
|
-
x: P(e -
|
|
1826
|
+
x: P(e - ie.value),
|
|
1825
1827
|
y: F(t)
|
|
1826
1828
|
};
|
|
1827
1829
|
}
|
|
1828
|
-
function
|
|
1829
|
-
let t =
|
|
1830
|
+
function je(e) {
|
|
1831
|
+
let t = Me.value?.getBoundingClientRect();
|
|
1830
1832
|
if (!t) return null;
|
|
1831
|
-
let n =
|
|
1833
|
+
let n = k.value[0];
|
|
1832
1834
|
if (!n || n.data.length === 0) return null;
|
|
1833
|
-
let { min: r, max: i } =
|
|
1834
|
-
return
|
|
1835
|
+
let { min: r, max: i } = ae.value, a = i - r || 1;
|
|
1836
|
+
return De(n, r + (e - t.left - U.value.left) / G.value * a);
|
|
1835
1837
|
}
|
|
1836
|
-
let { containerRef:
|
|
1838
|
+
let { containerRef: Me, svgRef: H, width: Ne, height: Pe, padding: U, legendY: W, inlineLegendLayout: Fe, innerW: G, innerH: K, bounds: Ie, hoverIndex: Le, tooltipRef: Re, tooltipPos: ze, tooltipHandlers: Be, menuItems: Ve, downloadLinkText: Ue, csvHref: We, downloadButtonText: Ge, triggerCsvDownload: Ke, menuFilename: qe, isFullscreen: Je, fullscreenStyle: Ye, teleportTarget: q, exitFullscreen: Xe } = lt({
|
|
1837
1839
|
width: () => f.width,
|
|
1838
1840
|
height: () => f.height,
|
|
1839
1841
|
title: () => f.title,
|
|
@@ -1849,17 +1851,17 @@ var Bt = {
|
|
|
1849
1851
|
downloadButton: () => f.downloadButton,
|
|
1850
1852
|
fullscreenTarget: () => f.fullscreenTarget,
|
|
1851
1853
|
chartPadding: () => f.chartPadding,
|
|
1852
|
-
inlineLegendLabels: () =>
|
|
1853
|
-
hasTooltipSlot: () =>
|
|
1854
|
-
getCsv:
|
|
1855
|
-
pointerToIndex:
|
|
1856
|
-
onHover: (e) =>
|
|
1857
|
-
extraBelowHeight: () =>
|
|
1858
|
-
}), J = n(() =>
|
|
1854
|
+
inlineLegendLabels: () => L.value,
|
|
1855
|
+
hasTooltipSlot: () => we.value,
|
|
1856
|
+
getCsv: Ce,
|
|
1857
|
+
pointerToIndex: je,
|
|
1858
|
+
onHover: (e) => v("hover", e),
|
|
1859
|
+
extraBelowHeight: () => de.value.extraHeight
|
|
1860
|
+
}), J = n(() => V(f.axisLabelStyle, { fontSize: 13 })), Y = n(() => V(f.tickLabelStyle, {
|
|
1859
1861
|
fontSize: 10,
|
|
1860
|
-
fillOpacity:
|
|
1861
|
-
})),
|
|
1862
|
-
let e = f.titleStyle, t = e?.align ?? "left", n =
|
|
1862
|
+
fillOpacity: xe
|
|
1863
|
+
})), Ze = n(() => V(f.legendStyle, { fontSize: 11 })), X = n(() => {
|
|
1864
|
+
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";
|
|
1863
1865
|
return {
|
|
1864
1866
|
lines: (f.title ?? "").split("\n"),
|
|
1865
1867
|
fontSize: e?.fontSize ?? 14,
|
|
@@ -1870,8 +1872,8 @@ var Bt = {
|
|
|
1870
1872
|
anchor: i
|
|
1871
1873
|
};
|
|
1872
1874
|
}), Z = n(() => {
|
|
1873
|
-
let e =
|
|
1874
|
-
return
|
|
1875
|
+
let e = Fe.value.positions, t = U.value.left, n = W.value;
|
|
1876
|
+
return fe.value.map((r, i) => {
|
|
1875
1877
|
let a = e[i];
|
|
1876
1878
|
return {
|
|
1877
1879
|
...r,
|
|
@@ -1882,30 +1884,32 @@ var Bt = {
|
|
|
1882
1884
|
});
|
|
1883
1885
|
return (n, l) => (_(), r(t, {
|
|
1884
1886
|
to: C(q),
|
|
1885
|
-
disabled: !C(
|
|
1887
|
+
disabled: !C(Je)
|
|
1886
1888
|
}, [o("div", d({
|
|
1887
1889
|
ref_key: "containerRef",
|
|
1888
|
-
ref:
|
|
1890
|
+
ref: Me
|
|
1889
1891
|
}, n.$attrs, {
|
|
1890
|
-
class: ["line-chart-wrapper", { "is-fullscreen": C(
|
|
1891
|
-
style: C(
|
|
1892
|
+
class: ["line-chart-wrapper", { "is-fullscreen": C(Je) }],
|
|
1893
|
+
style: C(Ye),
|
|
1894
|
+
role: g.value || void 0,
|
|
1895
|
+
"aria-label": h.value || void 0
|
|
1892
1896
|
}), [
|
|
1893
1897
|
c.menu ? (_(), r(pe, {
|
|
1894
1898
|
key: 0,
|
|
1895
|
-
items: C(
|
|
1896
|
-
"is-fullscreen": C(
|
|
1897
|
-
onClose: C(
|
|
1899
|
+
items: C(Ve),
|
|
1900
|
+
"is-fullscreen": C(Je),
|
|
1901
|
+
onClose: C(Xe)
|
|
1898
1902
|
}, null, 8, [
|
|
1899
1903
|
"items",
|
|
1900
1904
|
"is-fullscreen",
|
|
1901
1905
|
"onClose"
|
|
1902
1906
|
])) : i("", !0),
|
|
1903
|
-
o("div",
|
|
1907
|
+
o("div", Vt, x(C(Je) ? "Chart expanded to fill window" : ""), 1),
|
|
1904
1908
|
(_(), a("svg", {
|
|
1905
1909
|
ref_key: "svgRef",
|
|
1906
1910
|
ref: H,
|
|
1907
|
-
width: C(
|
|
1908
|
-
height:
|
|
1911
|
+
width: C(Ne),
|
|
1912
|
+
height: me.value
|
|
1909
1913
|
}, [
|
|
1910
1914
|
c.title ? (_(), a("text", {
|
|
1911
1915
|
key: 0,
|
|
@@ -1919,8 +1923,8 @@ var Bt = {
|
|
|
1919
1923
|
key: t,
|
|
1920
1924
|
x: X.value.x,
|
|
1921
1925
|
dy: t === 0 ? 0 : X.value.lineHeight
|
|
1922
|
-
}, x(e), 9,
|
|
1923
|
-
Z.value.length > 0 ? (_(), a("g",
|
|
1926
|
+
}, x(e), 9, Wt))), 128))], 8, Ut)) : i("", !0),
|
|
1927
|
+
Z.value.length > 0 ? (_(), a("g", Gt, [(_(!0), a(e, null, y(Z.value, (t, n) => (_(), a(e, { key: "ileg" + n }, [t.type === "series" ? (_(), a("line", {
|
|
1924
1928
|
key: 0,
|
|
1925
1929
|
x1: t.x,
|
|
1926
1930
|
y1: t.y,
|
|
@@ -1929,7 +1933,7 @@ var Bt = {
|
|
|
1929
1933
|
stroke: t.color,
|
|
1930
1934
|
"stroke-width": "2",
|
|
1931
1935
|
"stroke-dasharray": t.dashed ? "4 2" : void 0
|
|
1932
|
-
}, null, 8,
|
|
1936
|
+
}, null, 8, Kt)) : (_(), a("circle", {
|
|
1933
1937
|
key: 1,
|
|
1934
1938
|
cx: t.x + 4,
|
|
1935
1939
|
cy: t.y,
|
|
@@ -1938,13 +1942,13 @@ var Bt = {
|
|
|
1938
1942
|
"fill-opacity": t.fillOpacity,
|
|
1939
1943
|
stroke: t.color,
|
|
1940
1944
|
"stroke-width": "1.5"
|
|
1941
|
-
}, null, 8,
|
|
1945
|
+
}, null, 8, qt)), o("text", {
|
|
1942
1946
|
x: t.x + 18,
|
|
1943
1947
|
y: t.y + 4,
|
|
1944
|
-
"font-size":
|
|
1945
|
-
fill:
|
|
1946
|
-
"font-weight":
|
|
1947
|
-
}, x(t.label), 9,
|
|
1948
|
+
"font-size": Ze.value.fontSize,
|
|
1949
|
+
fill: Ze.value.fill,
|
|
1950
|
+
"font-weight": Ze.value.fontWeight
|
|
1951
|
+
}, x(t.label), 9, Jt)], 64))), 128))])) : i("", !0),
|
|
1948
1952
|
o("line", {
|
|
1949
1953
|
x1: C(R)(C(U).left),
|
|
1950
1954
|
y1: C(R)(C(U).top),
|
|
@@ -1952,7 +1956,7 @@ var Bt = {
|
|
|
1952
1956
|
y2: C(R)(C(U).top + C(K)),
|
|
1953
1957
|
stroke: "currentColor",
|
|
1954
1958
|
"stroke-opacity": "0.3"
|
|
1955
|
-
}, null, 8,
|
|
1959
|
+
}, null, 8, Yt),
|
|
1956
1960
|
o("line", {
|
|
1957
1961
|
x1: C(R)(C(U).left),
|
|
1958
1962
|
y1: C(R)(C(U).top + C(K)),
|
|
@@ -1960,7 +1964,7 @@ var Bt = {
|
|
|
1960
1964
|
y2: C(R)(C(U).top + C(K)),
|
|
1961
1965
|
stroke: "currentColor",
|
|
1962
1966
|
"stroke-opacity": "0.3"
|
|
1963
|
-
}, null, 8,
|
|
1967
|
+
}, null, 8, Xt),
|
|
1964
1968
|
c.yGrid ? (_(!0), a(e, { key: 2 }, y(z.value, (e, t) => (_(), a("line", {
|
|
1965
1969
|
key: "yg" + t,
|
|
1966
1970
|
x1: C(U).left,
|
|
@@ -1969,8 +1973,8 @@ var Bt = {
|
|
|
1969
1973
|
y2: e.y,
|
|
1970
1974
|
stroke: "currentColor",
|
|
1971
1975
|
"stroke-opacity": "0.1"
|
|
1972
|
-
}, null, 8,
|
|
1973
|
-
c.xGrid ? (_(!0), a(e, { key: 3 }, y(
|
|
1976
|
+
}, null, 8, Zt))), 128)) : i("", !0),
|
|
1977
|
+
c.xGrid ? (_(!0), a(e, { key: 3 }, y(Se.value, (e, t) => (_(), a("line", {
|
|
1974
1978
|
key: "xg" + t,
|
|
1975
1979
|
x1: e.x,
|
|
1976
1980
|
y1: C(U).top,
|
|
@@ -1978,7 +1982,7 @@ var Bt = {
|
|
|
1978
1982
|
y2: C(U).top + C(K),
|
|
1979
1983
|
stroke: "currentColor",
|
|
1980
1984
|
"stroke-opacity": "0.1"
|
|
1981
|
-
}, null, 8,
|
|
1985
|
+
}, null, 8, Qt))), 128)) : i("", !0),
|
|
1982
1986
|
(_(!0), a(e, null, y(z.value, (e, t) => (_(), a("text", {
|
|
1983
1987
|
key: "y" + t,
|
|
1984
1988
|
"data-testid": "y-tick",
|
|
@@ -1990,7 +1994,7 @@ var Bt = {
|
|
|
1990
1994
|
fill: Y.value.fill,
|
|
1991
1995
|
"font-weight": Y.value.fontWeight,
|
|
1992
1996
|
"fill-opacity": Y.value.fillOpacity
|
|
1993
|
-
}, x(e.value), 9,
|
|
1997
|
+
}, x(e.value), 9, $t))), 128)),
|
|
1994
1998
|
c.yLabel ? (_(), a("text", {
|
|
1995
1999
|
key: 4,
|
|
1996
2000
|
x: 0,
|
|
@@ -2000,8 +2004,8 @@ var Bt = {
|
|
|
2000
2004
|
"font-size": J.value.fontSize,
|
|
2001
2005
|
fill: J.value.fill,
|
|
2002
2006
|
"font-weight": J.value.fontWeight
|
|
2003
|
-
}, x(c.yLabel), 9,
|
|
2004
|
-
(_(!0), a(e, null, y(
|
|
2007
|
+
}, x(c.yLabel), 9, en)) : i("", !0),
|
|
2008
|
+
(_(!0), a(e, null, y(Se.value, (e, t) => (_(), a("text", {
|
|
2005
2009
|
key: "x" + t,
|
|
2006
2010
|
"data-testid": "x-tick",
|
|
2007
2011
|
x: e.x,
|
|
@@ -2011,46 +2015,46 @@ var Bt = {
|
|
|
2011
2015
|
fill: Y.value.fill,
|
|
2012
2016
|
"font-weight": Y.value.fontWeight,
|
|
2013
2017
|
"fill-opacity": Y.value.fillOpacity
|
|
2014
|
-
}, x(e.value), 9,
|
|
2018
|
+
}, x(e.value), 9, tn))), 128)),
|
|
2015
2019
|
c.xLabel ? (_(), a("text", {
|
|
2016
2020
|
key: 5,
|
|
2017
2021
|
x: C(U).left + C(G) / 2,
|
|
2018
|
-
y: C(
|
|
2022
|
+
y: C(Pe) - 4,
|
|
2019
2023
|
"text-anchor": "middle",
|
|
2020
2024
|
"font-size": J.value.fontSize,
|
|
2021
2025
|
fill: J.value.fill,
|
|
2022
2026
|
"font-weight": J.value.fontWeight
|
|
2023
|
-
}, x(c.xLabel), 9,
|
|
2024
|
-
(_(!0), a(e, null, y(
|
|
2027
|
+
}, x(c.xLabel), 9, nn)) : i("", !0),
|
|
2028
|
+
(_(!0), a(e, null, y(A.value, (e, t) => (_(), a("path", {
|
|
2025
2029
|
key: "area" + t,
|
|
2026
|
-
d:
|
|
2030
|
+
d: le(e),
|
|
2027
2031
|
fill: e.color ?? "currentColor",
|
|
2028
2032
|
"fill-opacity": e.opacity ?? .2,
|
|
2029
2033
|
stroke: "none",
|
|
2030
2034
|
style: m(e.blendMode ? { mixBlendMode: e.blendMode } : void 0)
|
|
2031
|
-
}, null, 12,
|
|
2032
|
-
(_(!0), a(e, null, y(
|
|
2035
|
+
}, null, 12, rn))), 128)),
|
|
2036
|
+
(_(!0), a(e, null, y(k.value, (t, n) => (_(), a(e, { key: n }, [
|
|
2033
2037
|
t.line !== !1 && t.outline ? (_(), a("path", {
|
|
2034
2038
|
key: 0,
|
|
2035
|
-
d:
|
|
2039
|
+
d: se(t),
|
|
2036
2040
|
fill: "none",
|
|
2037
2041
|
stroke: t.outlineColor ?? "var(--color-bg-0, #fff)",
|
|
2038
2042
|
"stroke-width": (t.strokeWidth ?? 1.5) + (t.outlineWidth ?? 4),
|
|
2039
2043
|
"stroke-linecap": "round",
|
|
2040
2044
|
"stroke-linejoin": "round",
|
|
2041
2045
|
"data-testid": "line-outline"
|
|
2042
|
-
}, null, 8,
|
|
2046
|
+
}, null, 8, an)) : i("", !0),
|
|
2043
2047
|
t.line === !1 ? i("", !0) : (_(), a("path", {
|
|
2044
2048
|
key: 1,
|
|
2045
|
-
d:
|
|
2049
|
+
d: se(t),
|
|
2046
2050
|
fill: "none",
|
|
2047
2051
|
stroke: t.color ?? "currentColor",
|
|
2048
2052
|
"stroke-width": t.strokeWidth ?? 1.5,
|
|
2049
2053
|
"stroke-opacity": t.lineOpacity ?? t.opacity ?? c.lineOpacity,
|
|
2050
2054
|
"stroke-dasharray": t.dashed ? "6 3" : void 0,
|
|
2051
2055
|
style: m(t.blendMode ? { mixBlendMode: t.blendMode } : void 0)
|
|
2052
|
-
}, null, 12,
|
|
2053
|
-
t.dots ? (_(!0), a(e, { key: 2 }, y(
|
|
2056
|
+
}, null, 12, on)),
|
|
2057
|
+
t.dots ? (_(!0), a(e, { key: 2 }, y(ce(t), (e, n) => (_(), a("circle", {
|
|
2054
2058
|
key: n,
|
|
2055
2059
|
cx: e.x,
|
|
2056
2060
|
cy: e.y,
|
|
@@ -2059,23 +2063,23 @@ var Bt = {
|
|
|
2059
2063
|
"fill-opacity": t.dotOpacity ?? t.opacity ?? c.lineOpacity,
|
|
2060
2064
|
stroke: t.dotStroke ?? "none",
|
|
2061
2065
|
style: m(t.blendMode ? { mixBlendMode: t.blendMode } : void 0)
|
|
2062
|
-
}, null, 12,
|
|
2066
|
+
}, null, 12, sn))), 128)) : i("", !0)
|
|
2063
2067
|
], 64))), 128)),
|
|
2064
2068
|
(_(!0), a(e, null, y(c.areaSections ?? [], (t, n) => (_(), a(e, { key: "areasec" + n }, [
|
|
2065
2069
|
o("path", {
|
|
2066
|
-
d:
|
|
2067
|
-
fill: t.color ?? (t.seriesIndex == null ? "#999" :
|
|
2070
|
+
d: ue(t),
|
|
2071
|
+
fill: t.color ?? (t.seriesIndex == null ? "#999" : k.value[t.seriesIndex]?.color ?? "currentColor"),
|
|
2068
2072
|
"fill-opacity": t.opacity ?? .15,
|
|
2069
2073
|
stroke: "none"
|
|
2070
|
-
}, null, 8,
|
|
2074
|
+
}, null, 8, cn),
|
|
2071
2075
|
t.seriesIndex == null ? i("", !0) : (_(), a("path", {
|
|
2072
2076
|
key: 0,
|
|
2073
|
-
d:
|
|
2077
|
+
d: ue(t, !1),
|
|
2074
2078
|
fill: "none",
|
|
2075
|
-
stroke: t.color ??
|
|
2079
|
+
stroke: t.color ?? k.value[t.seriesIndex]?.color ?? "currentColor",
|
|
2076
2080
|
"stroke-width": t.strokeWidth ?? 2,
|
|
2077
2081
|
"stroke-dasharray": t.dashed ? "6 3" : void 0
|
|
2078
|
-
}, null, 8,
|
|
2082
|
+
}, null, 8, ln)),
|
|
2079
2083
|
t.seriesIndex == null ? (_(), a(e, { key: 1 }, [o("line", {
|
|
2080
2084
|
x1: C(R)(I(t, "start")),
|
|
2081
2085
|
y1: C(U).top,
|
|
@@ -2084,7 +2088,7 @@ var Bt = {
|
|
|
2084
2088
|
stroke: t.color ?? "#999",
|
|
2085
2089
|
"stroke-width": t.strokeWidth ?? 2,
|
|
2086
2090
|
"stroke-dasharray": t.dashed ? "6 3" : void 0
|
|
2087
|
-
}, null, 8,
|
|
2091
|
+
}, null, 8, un), o("line", {
|
|
2088
2092
|
x1: C(R)(I(t, "end")),
|
|
2089
2093
|
y1: C(U).top,
|
|
2090
2094
|
x2: C(R)(I(t, "end")),
|
|
@@ -2092,7 +2096,7 @@ var Bt = {
|
|
|
2092
2096
|
stroke: t.color ?? "#999",
|
|
2093
2097
|
"stroke-width": t.strokeWidth ?? 2,
|
|
2094
2098
|
"stroke-dasharray": t.dashed ? "6 3" : void 0
|
|
2095
|
-
}, null, 8,
|
|
2099
|
+
}, null, 8, dn)], 64)) : i("", !0),
|
|
2096
2100
|
o("line", {
|
|
2097
2101
|
x1: C(R)(I(t, "start")),
|
|
2098
2102
|
y1: C(U).top + C(K) - 4,
|
|
@@ -2100,7 +2104,7 @@ var Bt = {
|
|
|
2100
2104
|
y2: C(U).top + C(K) + 4,
|
|
2101
2105
|
stroke: "currentColor",
|
|
2102
2106
|
"stroke-opacity": "0.4"
|
|
2103
|
-
}, null, 8,
|
|
2107
|
+
}, null, 8, fn),
|
|
2104
2108
|
o("line", {
|
|
2105
2109
|
x1: C(R)(I(t, "end")),
|
|
2106
2110
|
y1: C(U).top + C(K) - 4,
|
|
@@ -2108,20 +2112,20 @@ var Bt = {
|
|
|
2108
2112
|
y2: C(U).top + C(K) + 4,
|
|
2109
2113
|
stroke: "currentColor",
|
|
2110
2114
|
"stroke-opacity": "0.4"
|
|
2111
|
-
}, null, 8,
|
|
2115
|
+
}, null, 8, pn)
|
|
2112
2116
|
], 64))), 128)),
|
|
2113
|
-
|
|
2117
|
+
we.value && C(Le) !== null ? (_(), a("line", {
|
|
2114
2118
|
key: 6,
|
|
2115
|
-
x1: C(R)(
|
|
2119
|
+
x1: C(R)(Ee.value),
|
|
2116
2120
|
y1: C(U).top,
|
|
2117
|
-
x2: C(R)(
|
|
2121
|
+
x2: C(R)(Ee.value),
|
|
2118
2122
|
y2: C(U).top + C(K),
|
|
2119
2123
|
stroke: "currentColor",
|
|
2120
2124
|
"stroke-opacity": "0.3",
|
|
2121
2125
|
"stroke-dasharray": "4 2",
|
|
2122
2126
|
"pointer-events": "none"
|
|
2123
|
-
}, null, 8,
|
|
2124
|
-
(_(!0), a(e, null, y(
|
|
2127
|
+
}, null, 8, mn)) : i("", !0),
|
|
2128
|
+
(_(!0), a(e, null, y(Oe.value, (e, t) => (_(), a("circle", {
|
|
2125
2129
|
key: "hd" + t,
|
|
2126
2130
|
cx: e.x,
|
|
2127
2131
|
cy: e.y,
|
|
@@ -2130,8 +2134,8 @@ var Bt = {
|
|
|
2130
2134
|
stroke: "var(--color-bg-0, #fff)",
|
|
2131
2135
|
"stroke-width": "2",
|
|
2132
2136
|
"pointer-events": "none"
|
|
2133
|
-
}, null, 8,
|
|
2134
|
-
|
|
2137
|
+
}, null, 8, hn))), 128)),
|
|
2138
|
+
we.value ? (_(), a("rect", d({
|
|
2135
2139
|
key: 7,
|
|
2136
2140
|
x: C(U).left,
|
|
2137
2141
|
y: C(U).top,
|
|
@@ -2142,150 +2146,150 @@ var Bt = {
|
|
|
2142
2146
|
cursor: "crosshair",
|
|
2143
2147
|
"touch-action": "pan-y"
|
|
2144
2148
|
}
|
|
2145
|
-
}, ee(C(
|
|
2149
|
+
}, ee(C(Be), !0)), null, 16, gn)) : i("", !0),
|
|
2146
2150
|
c.annotations && c.annotations.length > 0 ? (_(), r(C(ot), {
|
|
2147
2151
|
key: 8,
|
|
2148
2152
|
annotations: c.annotations,
|
|
2149
|
-
project:
|
|
2150
|
-
bounds: C(
|
|
2153
|
+
project: Ae,
|
|
2154
|
+
bounds: C(Ie)
|
|
2151
2155
|
}, null, 8, ["annotations", "bounds"])) : i("", !0),
|
|
2152
|
-
(_(!0), a(e, null, y(
|
|
2156
|
+
(_(!0), a(e, null, y(de.value.labels, (e, t) => (_(), a("g", { key: "seclab" + t }, [
|
|
2153
2157
|
o("circle", {
|
|
2154
2158
|
cx: e.cx - e.textWidth / 2 - 2,
|
|
2155
|
-
cy:
|
|
2159
|
+
cy: he.value + e.row * Cn + 4,
|
|
2156
2160
|
r: "4",
|
|
2157
2161
|
fill: e.color,
|
|
2158
2162
|
"fill-opacity": e.fillOpacity,
|
|
2159
2163
|
stroke: e.color,
|
|
2160
2164
|
"stroke-width": "1.5"
|
|
2161
|
-
}, null, 8,
|
|
2165
|
+
}, null, 8, _n),
|
|
2162
2166
|
e.labelText ? (_(), a("text", {
|
|
2163
2167
|
key: 0,
|
|
2164
2168
|
x: e.cx - e.textWidth / 2 + 8,
|
|
2165
|
-
y:
|
|
2169
|
+
y: he.value + e.row * Cn + 8,
|
|
2166
2170
|
"font-size": e.labelStyle.fontSize,
|
|
2167
2171
|
"font-weight": e.labelStyle.fontWeight,
|
|
2168
2172
|
fill: e.labelStyle.fill
|
|
2169
|
-
}, x(e.labelText), 9,
|
|
2173
|
+
}, x(e.labelText), 9, vn)) : i("", !0),
|
|
2170
2174
|
e.descText ? (_(), a("text", {
|
|
2171
2175
|
key: 1,
|
|
2172
2176
|
x: e.cx - e.textWidth / 2 + 8,
|
|
2173
|
-
y:
|
|
2177
|
+
y: he.value + e.row * Cn + 22,
|
|
2174
2178
|
"font-size": e.descStyle.fontSize,
|
|
2175
2179
|
"font-weight": e.descStyle.fontWeight,
|
|
2176
2180
|
fill: e.descStyle.fill,
|
|
2177
2181
|
"fill-opacity": e.descStyle.fillOpacity
|
|
2178
|
-
}, x(e.descText), 9,
|
|
2182
|
+
}, x(e.descText), 9, yn)) : i("", !0)
|
|
2179
2183
|
]))), 128))
|
|
2180
|
-
], 8,
|
|
2181
|
-
|
|
2184
|
+
], 8, Ht)),
|
|
2185
|
+
we.value && C(Le) !== null && ke.value ? (_(), a("div", {
|
|
2182
2186
|
key: 1,
|
|
2183
2187
|
ref_key: "tooltipRef",
|
|
2184
|
-
ref:
|
|
2188
|
+
ref: Re,
|
|
2185
2189
|
class: "chart-tooltip-content",
|
|
2186
2190
|
style: m({
|
|
2187
2191
|
position: "absolute",
|
|
2188
2192
|
top: "0",
|
|
2189
2193
|
left: "0",
|
|
2190
2194
|
willChange: "transform",
|
|
2191
|
-
transform: C(
|
|
2192
|
-
visibility: C(
|
|
2195
|
+
transform: C(ze) ? `translate3d(${C(ze).left}px, ${C(ze).top}px, 0) translateY(-50%)` : "translateY(-50%)",
|
|
2196
|
+
visibility: C(ze) ? "visible" : "hidden"
|
|
2193
2197
|
})
|
|
2194
|
-
}, [b(n.$slots, "tooltip", p(u(
|
|
2198
|
+
}, [b(n.$slots, "tooltip", p(u(ke.value)), () => [o("div", bn, [ke.value.xLabel ? (_(), a("div", xn, x(ke.value.xLabel), 1)) : i("", !0), (_(!0), a(e, null, y(ke.value.values, (e) => (_(), a("div", {
|
|
2195
2199
|
key: e.seriesIndex,
|
|
2196
2200
|
class: "line-chart-tooltip-row"
|
|
2197
2201
|
}, [o("span", {
|
|
2198
2202
|
class: "line-chart-tooltip-swatch",
|
|
2199
2203
|
style: m({ background: e.color })
|
|
2200
|
-
}, null, 4), s(" " + x(isFinite(e.value) ? C(
|
|
2201
|
-
C(
|
|
2204
|
+
}, null, 4), s(" " + x(isFinite(e.value) ? C(T)(e.value) : "—"), 1)]))), 128))])], !0)], 4)) : i("", !0),
|
|
2205
|
+
C(Ue) ? (_(), a("a", {
|
|
2202
2206
|
key: 2,
|
|
2203
2207
|
class: "line-chart-download-link",
|
|
2204
|
-
href: C(
|
|
2205
|
-
download: `${C(
|
|
2206
|
-
}, x(C(
|
|
2207
|
-
C(
|
|
2208
|
+
href: C(We),
|
|
2209
|
+
download: `${C(qe)()}.csv`
|
|
2210
|
+
}, x(C(Ue)), 9, Sn)) : i("", !0),
|
|
2211
|
+
C(Ge) ? (_(), a("button", {
|
|
2208
2212
|
key: 3,
|
|
2209
2213
|
type: "button",
|
|
2210
2214
|
class: "line-chart-download-button",
|
|
2211
|
-
onClick: l[0] ||= (...e) => C(
|
|
2212
|
-
}, x(C(
|
|
2213
|
-
], 16)], 8, ["to", "disabled"]));
|
|
2215
|
+
onClick: l[0] ||= (...e) => C(Ke) && C(Ke)(...e)
|
|
2216
|
+
}, x(C(Ge)), 1)) : i("", !0)
|
|
2217
|
+
], 16, Bt)], 8, ["to", "disabled"]));
|
|
2214
2218
|
}
|
|
2215
|
-
}), [["__scopeId", "data-v-
|
|
2219
|
+
}), [["__scopeId", "data-v-0cf7b0c7"]]), On = ["role", "aria-label"], kn = {
|
|
2216
2220
|
class: "chart-sr-only",
|
|
2217
2221
|
"aria-live": "polite"
|
|
2218
|
-
},
|
|
2222
|
+
}, An = ["width", "height"], jn = [
|
|
2219
2223
|
"x",
|
|
2220
2224
|
"y",
|
|
2221
2225
|
"text-anchor",
|
|
2222
2226
|
"font-size",
|
|
2223
2227
|
"font-weight",
|
|
2224
2228
|
"fill"
|
|
2225
|
-
],
|
|
2229
|
+
], Mn = ["x", "dy"], Nn = [
|
|
2226
2230
|
"data-testid",
|
|
2227
2231
|
"x",
|
|
2228
2232
|
"y",
|
|
2229
2233
|
"text-anchor",
|
|
2230
2234
|
"font-size",
|
|
2231
2235
|
"fill"
|
|
2232
|
-
],
|
|
2236
|
+
], Pn = { key: 1 }, Fn = [
|
|
2233
2237
|
"x",
|
|
2234
2238
|
"y",
|
|
2235
2239
|
"fill"
|
|
2236
|
-
],
|
|
2240
|
+
], In = [
|
|
2237
2241
|
"x1",
|
|
2238
2242
|
"y1",
|
|
2239
2243
|
"x2",
|
|
2240
2244
|
"y2",
|
|
2241
2245
|
"stroke",
|
|
2242
2246
|
"stroke-dasharray"
|
|
2243
|
-
],
|
|
2247
|
+
], Ln = [
|
|
2244
2248
|
"x",
|
|
2245
2249
|
"y",
|
|
2246
2250
|
"font-size",
|
|
2247
2251
|
"fill",
|
|
2248
2252
|
"font-weight"
|
|
2249
|
-
],
|
|
2253
|
+
], Rn = [
|
|
2250
2254
|
"x1",
|
|
2251
2255
|
"y1",
|
|
2252
2256
|
"x2",
|
|
2253
2257
|
"y2"
|
|
2254
|
-
],
|
|
2258
|
+
], zn = [
|
|
2255
2259
|
"x1",
|
|
2256
2260
|
"y1",
|
|
2257
2261
|
"x2",
|
|
2258
2262
|
"y2"
|
|
2259
|
-
],
|
|
2263
|
+
], Bn = [
|
|
2260
2264
|
"x1",
|
|
2261
2265
|
"y1",
|
|
2262
2266
|
"x2",
|
|
2263
2267
|
"y2"
|
|
2264
|
-
],
|
|
2268
|
+
], Vn = [
|
|
2265
2269
|
"x",
|
|
2266
2270
|
"y",
|
|
2267
2271
|
"width",
|
|
2268
2272
|
"height"
|
|
2269
|
-
],
|
|
2273
|
+
], Hn = [
|
|
2270
2274
|
"x",
|
|
2271
2275
|
"y",
|
|
2272
2276
|
"font-size",
|
|
2273
2277
|
"fill",
|
|
2274
2278
|
"font-weight",
|
|
2275
2279
|
"fill-opacity"
|
|
2276
|
-
],
|
|
2280
|
+
], Un = [
|
|
2277
2281
|
"x",
|
|
2278
2282
|
"y",
|
|
2279
2283
|
"font-size",
|
|
2280
2284
|
"fill",
|
|
2281
2285
|
"font-weight",
|
|
2282
2286
|
"fill-opacity"
|
|
2283
|
-
],
|
|
2287
|
+
], Wn = [
|
|
2284
2288
|
"transform",
|
|
2285
2289
|
"font-size",
|
|
2286
2290
|
"fill",
|
|
2287
2291
|
"font-weight"
|
|
2288
|
-
],
|
|
2292
|
+
], Gn = [
|
|
2289
2293
|
"x",
|
|
2290
2294
|
"y",
|
|
2291
2295
|
"text-anchor",
|
|
@@ -2293,7 +2297,7 @@ var Bt = {
|
|
|
2293
2297
|
"fill",
|
|
2294
2298
|
"font-weight",
|
|
2295
2299
|
"fill-opacity"
|
|
2296
|
-
],
|
|
2300
|
+
], Kn = [
|
|
2297
2301
|
"x",
|
|
2298
2302
|
"y",
|
|
2299
2303
|
"text-anchor",
|
|
@@ -2301,13 +2305,13 @@ var Bt = {
|
|
|
2301
2305
|
"fill",
|
|
2302
2306
|
"font-weight",
|
|
2303
2307
|
"fill-opacity"
|
|
2304
|
-
],
|
|
2308
|
+
], qn = [
|
|
2305
2309
|
"x",
|
|
2306
2310
|
"y",
|
|
2307
2311
|
"font-size",
|
|
2308
2312
|
"fill",
|
|
2309
2313
|
"font-weight"
|
|
2310
|
-
],
|
|
2314
|
+
], Jn = [
|
|
2311
2315
|
"data-category",
|
|
2312
2316
|
"data-series",
|
|
2313
2317
|
"x",
|
|
@@ -2316,34 +2320,34 @@ var Bt = {
|
|
|
2316
2320
|
"height",
|
|
2317
2321
|
"fill",
|
|
2318
2322
|
"fill-opacity"
|
|
2319
|
-
],
|
|
2323
|
+
], Yn = [
|
|
2320
2324
|
"x",
|
|
2321
2325
|
"y",
|
|
2322
2326
|
"text-anchor",
|
|
2323
2327
|
"font-size",
|
|
2324
2328
|
"font-weight",
|
|
2325
2329
|
"fill"
|
|
2326
|
-
],
|
|
2330
|
+
], Xn = [
|
|
2327
2331
|
"d",
|
|
2328
2332
|
"stroke",
|
|
2329
2333
|
"stroke-width",
|
|
2330
2334
|
"stroke-opacity",
|
|
2331
2335
|
"stroke-dasharray"
|
|
2332
|
-
],
|
|
2336
|
+
], Zn = [
|
|
2333
2337
|
"cx",
|
|
2334
2338
|
"cy",
|
|
2335
2339
|
"r",
|
|
2336
2340
|
"fill",
|
|
2337
2341
|
"fill-opacity"
|
|
2338
|
-
],
|
|
2342
|
+
], Qn = [
|
|
2339
2343
|
"x",
|
|
2340
2344
|
"y",
|
|
2341
2345
|
"width",
|
|
2342
2346
|
"height"
|
|
2343
|
-
],
|
|
2347
|
+
], $n = { class: "bar-chart-tooltip" }, er = {
|
|
2344
2348
|
key: 0,
|
|
2345
2349
|
class: "bar-chart-tooltip-label"
|
|
2346
|
-
},
|
|
2350
|
+
}, tr = ["href", "download"], nr = 22, rr = 2, ir = 11, ar = .6, or = 4, sr = 4, cr = /* @__PURE__ */ L(/* @__PURE__ */ l({
|
|
2347
2351
|
inheritAttrs: !1,
|
|
2348
2352
|
__name: "BarChart",
|
|
2349
2353
|
props: {
|
|
@@ -2378,6 +2382,8 @@ var Bt = {
|
|
|
2378
2382
|
height: {},
|
|
2379
2383
|
title: {},
|
|
2380
2384
|
titleStyle: {},
|
|
2385
|
+
role: {},
|
|
2386
|
+
ariaLabel: {},
|
|
2381
2387
|
axisLabelStyle: {},
|
|
2382
2388
|
tickLabelStyle: {},
|
|
2383
2389
|
legendStyle: {},
|
|
@@ -2402,10 +2408,10 @@ var Bt = {
|
|
|
2402
2408
|
},
|
|
2403
2409
|
emits: ["hover"],
|
|
2404
2410
|
setup(c, { emit: l }) {
|
|
2405
|
-
let f = c, h =
|
|
2406
|
-
function
|
|
2411
|
+
let f = c, h = n(() => f.ariaLabel ?? f.title), g = n(() => f.role ?? (h.value ? "figure" : void 0)), v = l, S = [];
|
|
2412
|
+
function te(e) {
|
|
2407
2413
|
return {
|
|
2408
|
-
data: e.y ?? e.data ??
|
|
2414
|
+
data: e.y ?? e.data ?? S,
|
|
2409
2415
|
color: e.color,
|
|
2410
2416
|
opacity: e.opacity,
|
|
2411
2417
|
blendMode: e.blendMode,
|
|
@@ -2414,43 +2420,43 @@ var Bt = {
|
|
|
2414
2420
|
showInTooltip: e.showInTooltip
|
|
2415
2421
|
};
|
|
2416
2422
|
}
|
|
2417
|
-
let
|
|
2418
|
-
if (f.series && f.series.length > 0) return f.series.map(
|
|
2423
|
+
let w = n(() => {
|
|
2424
|
+
if (f.series && f.series.length > 0) return f.series.map(te);
|
|
2419
2425
|
let e = f.y ?? f.data;
|
|
2420
2426
|
return e ? [{ data: e }] : [];
|
|
2421
|
-
}),
|
|
2427
|
+
}), T = n(() => {
|
|
2422
2428
|
let e = f.categories?.length ?? 0;
|
|
2423
|
-
for (let t of
|
|
2429
|
+
for (let t of w.value) t.data.length > e && (e = t.data.length);
|
|
2424
2430
|
return e;
|
|
2425
|
-
}),
|
|
2426
|
-
let e =
|
|
2431
|
+
}), E = n(() => {
|
|
2432
|
+
let e = T.value, t = Array(e);
|
|
2427
2433
|
for (let n = 0; n < e; n++) {
|
|
2428
2434
|
let e = f.categories?.[n];
|
|
2429
2435
|
e instanceof Date ? t[n] = e.toISOString().slice(0, 10) : t[n] = e ?? String(n);
|
|
2430
2436
|
}
|
|
2431
2437
|
return t;
|
|
2432
|
-
}),
|
|
2438
|
+
}), D = n(() => {
|
|
2433
2439
|
let e = f.categories;
|
|
2434
2440
|
if (!e || e.length === 0 || !kt(e, "utc")) return null;
|
|
2435
2441
|
let t = Array(e.length);
|
|
2436
2442
|
for (let n = 0; n < e.length; n++) t[n] = Dt(e[n], "utc") ?? NaN;
|
|
2437
2443
|
return t;
|
|
2438
|
-
}),
|
|
2444
|
+
}), O = n(() => f.orientation === "vertical"), k = n(() => {
|
|
2439
2445
|
let e = Infinity, t = -Infinity, n = Infinity, r = (e) => {
|
|
2440
2446
|
e > 0 && e < n && (n = e);
|
|
2441
2447
|
};
|
|
2442
2448
|
if (f.layout === "stacked") {
|
|
2443
|
-
let n =
|
|
2449
|
+
let n = T.value;
|
|
2444
2450
|
for (let i = 0; i < n; i++) {
|
|
2445
2451
|
let n = 0, a = 0;
|
|
2446
|
-
for (let e of
|
|
2452
|
+
for (let e of w.value) {
|
|
2447
2453
|
if (i >= e.data.length) continue;
|
|
2448
2454
|
let t = Number(e.data[i]);
|
|
2449
2455
|
isFinite(t) && (r(t), t >= 0 ? n += t : a += t);
|
|
2450
2456
|
}
|
|
2451
2457
|
n > t && (t = n), a < e && (e = a);
|
|
2452
2458
|
}
|
|
2453
|
-
} else for (let n of
|
|
2459
|
+
} else for (let n of w.value) for (let i of n.data) {
|
|
2454
2460
|
let n = Number(i);
|
|
2455
2461
|
isFinite(n) && (r(n), n < e && (e = n), n > t && (t = n));
|
|
2456
2462
|
}
|
|
@@ -2463,30 +2469,30 @@ var Bt = {
|
|
|
2463
2469
|
max: a.max,
|
|
2464
2470
|
range: a.max - a.min || 1
|
|
2465
2471
|
};
|
|
2466
|
-
}),
|
|
2467
|
-
let e =
|
|
2468
|
-
return e > 0 ?
|
|
2472
|
+
}), A = n(() => O.value ? U.value : W.value), re = n(() => O.value ? W.value : U.value), j = n(() => {
|
|
2473
|
+
let e = T.value;
|
|
2474
|
+
return e > 0 ? A.value / e : 0;
|
|
2469
2475
|
}), M = n(() => j.value * (1 - f.barPadding)), N = n(() => {
|
|
2470
|
-
let e =
|
|
2476
|
+
let e = w.value.length;
|
|
2471
2477
|
if (e === 0) return 0;
|
|
2472
2478
|
if (f.layout === "stacked" || e === 1) return M.value;
|
|
2473
2479
|
let t = f.groupGap * (e - 1);
|
|
2474
2480
|
return Math.max(1, (M.value - t) / e);
|
|
2475
2481
|
});
|
|
2476
|
-
function
|
|
2477
|
-
return (
|
|
2482
|
+
function ie(e) {
|
|
2483
|
+
return (O.value ? H.value.left : H.value.top) + e * j.value;
|
|
2478
2484
|
}
|
|
2479
|
-
let
|
|
2480
|
-
let { min: e, max: t } =
|
|
2485
|
+
let ae = n(() => {
|
|
2486
|
+
let { min: e, max: t } = k.value, n = f.valueMin ?? 0;
|
|
2481
2487
|
return P(Math.max(e, Math.min(t, n)));
|
|
2482
2488
|
});
|
|
2483
2489
|
function P(e) {
|
|
2484
|
-
let { min: t, max: n } =
|
|
2485
|
-
return
|
|
2490
|
+
let { min: t, max: n } = k.value, r = _e(e, t, n, f.valueScaleType);
|
|
2491
|
+
return O.value ? H.value.top + W.value - r * W.value : H.value.left + r * U.value;
|
|
2486
2492
|
}
|
|
2487
|
-
function
|
|
2493
|
+
function oe(e, t, n, r, i, a, o, s, c, l) {
|
|
2488
2494
|
let u = Math.min(e, t), d = Math.abs(e - t);
|
|
2489
|
-
return
|
|
2495
|
+
return O.value ? {
|
|
2490
2496
|
x: n,
|
|
2491
2497
|
y: u,
|
|
2492
2498
|
w: r,
|
|
@@ -2511,33 +2517,33 @@ var Bt = {
|
|
|
2511
2517
|
};
|
|
2512
2518
|
}
|
|
2513
2519
|
let F = n(() => {
|
|
2514
|
-
let e = [], t =
|
|
2520
|
+
let e = [], t = w.value, n = t.length;
|
|
2515
2521
|
if (n === 0) return e;
|
|
2516
|
-
let r =
|
|
2522
|
+
let r = T.value, i = j.value, a = M.value, o = N.value, s = (i - a) / 2, c = ae.value;
|
|
2517
2523
|
for (let i = 0; i < r; i++) {
|
|
2518
|
-
let r =
|
|
2524
|
+
let r = ie(i) + s;
|
|
2519
2525
|
if (f.layout === "stacked") {
|
|
2520
2526
|
let o = 0, s = 0;
|
|
2521
2527
|
for (let c = 0; c < n; c++) {
|
|
2522
2528
|
let n = t[c], l = Number(n.data[i] ?? NaN);
|
|
2523
2529
|
if (!isFinite(l)) continue;
|
|
2524
2530
|
let u = l >= 0 ? o : s, d = u + l;
|
|
2525
|
-
e.push(
|
|
2531
|
+
e.push(oe(P(u), P(d), r, a, n.color ?? L(c), n.opacity ?? 1, n.blendMode, l, i, c)), l >= 0 ? o = d : s = d;
|
|
2526
2532
|
}
|
|
2527
2533
|
} else if (f.layout === "overlay") for (let o = 0; o < n; o++) {
|
|
2528
2534
|
let n = t[o], s = Number(n.data[i] ?? NaN);
|
|
2529
|
-
isFinite(s) && e.push(
|
|
2535
|
+
isFinite(s) && e.push(oe(c, P(s), r, a, n.color ?? L(o), n.opacity ?? 1, n.blendMode, s, i, o));
|
|
2530
2536
|
}
|
|
2531
2537
|
else for (let a = 0; a < n; a++) {
|
|
2532
2538
|
let s = t[a], l = Number(s.data[i] ?? NaN);
|
|
2533
2539
|
if (!isFinite(l)) continue;
|
|
2534
2540
|
let u = r + (n === 1 ? 0 : a * (o + f.groupGap));
|
|
2535
|
-
e.push(
|
|
2541
|
+
e.push(oe(c, P(l), u, o, s.color ?? L(a), s.opacity ?? 1, s.blendMode, l, i, a));
|
|
2536
2542
|
}
|
|
2537
2543
|
}
|
|
2538
2544
|
return e;
|
|
2539
2545
|
});
|
|
2540
|
-
function
|
|
2546
|
+
function se(e) {
|
|
2541
2547
|
let t = Infinity, n = -Infinity;
|
|
2542
2548
|
for (let r of e.data) {
|
|
2543
2549
|
let e = Number(r);
|
|
@@ -2548,9 +2554,9 @@ var Bt = {
|
|
|
2548
2554
|
max: n
|
|
2549
2555
|
};
|
|
2550
2556
|
}
|
|
2551
|
-
function
|
|
2552
|
-
let r = (
|
|
2553
|
-
return
|
|
2557
|
+
function ce(e, t, n) {
|
|
2558
|
+
let r = (O.value ? H.value.left : H.value.top) + (e + .5) * j.value, i = n.max - n.min || 1, a = (t - n.min) / i;
|
|
2559
|
+
return O.value ? {
|
|
2554
2560
|
x: r,
|
|
2555
2561
|
y: H.value.top + W.value - a * W.value
|
|
2556
2562
|
} : {
|
|
@@ -2558,23 +2564,23 @@ var Bt = {
|
|
|
2558
2564
|
y: r
|
|
2559
2565
|
};
|
|
2560
2566
|
}
|
|
2561
|
-
let
|
|
2567
|
+
let le = n(() => {
|
|
2562
2568
|
let e = f.summaryLines;
|
|
2563
2569
|
return !e || e.length === 0 ? [] : e.map((e, t) => ({
|
|
2564
|
-
data: e.data ??
|
|
2570
|
+
data: e.data ?? S,
|
|
2565
2571
|
x: e.x,
|
|
2566
|
-
color: e.color ??
|
|
2572
|
+
color: e.color ?? de(t),
|
|
2567
2573
|
strokeWidth: e.strokeWidth ?? 2,
|
|
2568
2574
|
dashed: e.dashed ?? !1,
|
|
2569
2575
|
opacity: e.opacity ?? 1,
|
|
2570
2576
|
blendMode: e.blendMode,
|
|
2571
2577
|
dots: e.dots ?? !1,
|
|
2572
2578
|
dotRadius: e.dotRadius ?? (e.strokeWidth ?? 2) + 1,
|
|
2573
|
-
extent:
|
|
2579
|
+
extent: se(e),
|
|
2574
2580
|
legend: e.legend,
|
|
2575
2581
|
showInLegend: e.showInLegend !== !1
|
|
2576
2582
|
}));
|
|
2577
|
-
}), I = n(() => j.value === 0 ? [] :
|
|
2583
|
+
}), I = n(() => j.value === 0 ? [] : le.value.map((e) => {
|
|
2578
2584
|
let t = [], n = "", r = !1;
|
|
2579
2585
|
for (let i = 0; i < e.data.length; i++) {
|
|
2580
2586
|
let a = Number(e.data[i]), o = e.x ? Number(e.x[i]) : i;
|
|
@@ -2582,7 +2588,7 @@ var Bt = {
|
|
|
2582
2588
|
r = !1;
|
|
2583
2589
|
continue;
|
|
2584
2590
|
}
|
|
2585
|
-
let s =
|
|
2591
|
+
let s = ce(o, a, e.extent);
|
|
2586
2592
|
t.push(s), n += r ? `L${s.x},${s.y}` : `M${s.x},${s.y}`, r = !0;
|
|
2587
2593
|
}
|
|
2588
2594
|
return {
|
|
@@ -2590,16 +2596,16 @@ var Bt = {
|
|
|
2590
2596
|
pathD: n,
|
|
2591
2597
|
points: t
|
|
2592
2598
|
};
|
|
2593
|
-
})),
|
|
2599
|
+
})), ue = [
|
|
2594
2600
|
"var(--color-fg-1, #111)",
|
|
2595
2601
|
"var(--color-danger, #ef4444)",
|
|
2596
2602
|
"var(--color-success, #10b981)",
|
|
2597
2603
|
"var(--color-info, #6366f1)"
|
|
2598
2604
|
];
|
|
2599
|
-
function
|
|
2600
|
-
return
|
|
2605
|
+
function de(e) {
|
|
2606
|
+
return ue[e % ue.length];
|
|
2601
2607
|
}
|
|
2602
|
-
let
|
|
2608
|
+
let fe = [
|
|
2603
2609
|
"var(--color-primary, #3b82f6)",
|
|
2604
2610
|
"var(--color-accent, #f59e0b)",
|
|
2605
2611
|
"var(--color-success, #10b981)",
|
|
@@ -2607,16 +2613,16 @@ var Bt = {
|
|
|
2607
2613
|
"var(--color-info, #6366f1)",
|
|
2608
2614
|
"var(--color-warning, #d97706)"
|
|
2609
2615
|
];
|
|
2610
|
-
function
|
|
2611
|
-
return
|
|
2616
|
+
function L(e) {
|
|
2617
|
+
return fe[e % fe.length];
|
|
2612
2618
|
}
|
|
2613
|
-
let
|
|
2614
|
-
let { min: e, max: t } =
|
|
2619
|
+
let me = ut(() => f.tooltipValueFormat, () => f.valueTickFormat), he = n(() => {
|
|
2620
|
+
let { min: e, max: t } = k.value, n = (e) => f.valueTickFormat === void 0 ? B(e) : ne(e, f.valueTickFormat);
|
|
2615
2621
|
if (e === t) return [{
|
|
2616
2622
|
value: n(e),
|
|
2617
2623
|
pos: R(P(e))
|
|
2618
2624
|
}];
|
|
2619
|
-
let r =
|
|
2625
|
+
let r = O.value ? 50 : 80;
|
|
2620
2626
|
return (f.valueScaleType === "log" ? ye({
|
|
2621
2627
|
min: e,
|
|
2622
2628
|
max: t,
|
|
@@ -2625,18 +2631,18 @@ var Bt = {
|
|
|
2625
2631
|
min: e,
|
|
2626
2632
|
max: t,
|
|
2627
2633
|
ticks: f.valueTicks,
|
|
2628
|
-
targetTickCount:
|
|
2634
|
+
targetTickCount: re.value / r
|
|
2629
2635
|
})).map((e) => ({
|
|
2630
2636
|
value: n(e),
|
|
2631
2637
|
pos: R(P(e))
|
|
2632
2638
|
}));
|
|
2633
2639
|
}), z = n(() => {
|
|
2634
|
-
let e =
|
|
2640
|
+
let e = T.value, t = D.value;
|
|
2635
2641
|
if (t && t.length > 0) {
|
|
2636
2642
|
let e = Infinity, n = -Infinity;
|
|
2637
2643
|
for (let r of t) Number.isFinite(r) && (r < e && (e = r), r > n && (n = r));
|
|
2638
2644
|
if (!Number.isFinite(e) || e === n) return [];
|
|
2639
|
-
let r =
|
|
2645
|
+
let r = O.value ? U.value : W.value, i = Math.max(2, Math.floor(r / 80)), a = Nt(e, n, i, "utc"), o = a.unit, s = [], c = /* @__PURE__ */ new Set();
|
|
2640
2646
|
for (let e of a.values) {
|
|
2641
2647
|
let n = -1, r = Infinity;
|
|
2642
2648
|
for (let i = 0; i < t.length; i++) {
|
|
@@ -2645,7 +2651,7 @@ var Bt = {
|
|
|
2645
2651
|
}
|
|
2646
2652
|
if (n < 0 || c.has(n)) continue;
|
|
2647
2653
|
c.add(n);
|
|
2648
|
-
let i =
|
|
2654
|
+
let i = ie(n) + j.value / 2, a = f.categoryFormat ? f.categoryFormat(E.value[n], n) : zt(t[n], f.dateFormat, "utc", o);
|
|
2649
2655
|
s.push({
|
|
2650
2656
|
label: a,
|
|
2651
2657
|
pos: i,
|
|
@@ -2655,10 +2661,10 @@ var Bt = {
|
|
|
2655
2661
|
return s;
|
|
2656
2662
|
}
|
|
2657
2663
|
let n = [], r = (e, t) => f.categoryFormat ? f.categoryFormat(e, t) : e, i = Array(e), a = 0;
|
|
2658
|
-
for (let t = 0; t < e; t++) i[t] = r(
|
|
2659
|
-
let o = f.tickLabelStyle?.fontSize ?? 10, s =
|
|
2664
|
+
for (let t = 0; t < e; t++) i[t] = r(E.value[t], t), i[t].length > a && (a = i[t].length);
|
|
2665
|
+
let o = f.tickLabelStyle?.fontSize ?? 10, s = O.value ? a * o * .6 + 8 : o * 1.2 + 8, c = j.value > 0 ? Math.max(1, Math.ceil(s / j.value)) : 1;
|
|
2660
2666
|
for (let t = 0; t < e; t += c) {
|
|
2661
|
-
let e =
|
|
2667
|
+
let e = ie(t) + j.value / 2;
|
|
2662
2668
|
n.push({
|
|
2663
2669
|
label: i[t],
|
|
2664
2670
|
pos: e,
|
|
@@ -2666,15 +2672,15 @@ var Bt = {
|
|
|
2666
2672
|
});
|
|
2667
2673
|
}
|
|
2668
2674
|
return n;
|
|
2669
|
-
}),
|
|
2675
|
+
}), be = n(() => {
|
|
2670
2676
|
let e = [];
|
|
2671
|
-
return
|
|
2677
|
+
return w.value.forEach((t, n) => {
|
|
2672
2678
|
!t.legend || t.showInLegend === !1 || e.push({
|
|
2673
2679
|
label: t.legend,
|
|
2674
|
-
color: t.color ??
|
|
2680
|
+
color: t.color ?? L(n),
|
|
2675
2681
|
kind: "bar"
|
|
2676
2682
|
});
|
|
2677
|
-
}),
|
|
2683
|
+
}), le.value.forEach((t) => {
|
|
2678
2684
|
!t.legend || !t.showInLegend || e.push({
|
|
2679
2685
|
label: t.legend,
|
|
2680
2686
|
color: t.color,
|
|
@@ -2682,21 +2688,21 @@ var Bt = {
|
|
|
2682
2688
|
dashed: t.dashed
|
|
2683
2689
|
});
|
|
2684
2690
|
}), e;
|
|
2685
|
-
}),
|
|
2686
|
-
function
|
|
2691
|
+
}), Se = n(() => be.value.map((e) => e.label));
|
|
2692
|
+
function Ce() {
|
|
2687
2693
|
if (typeof f.csv == "function") return f.csv();
|
|
2688
2694
|
if (typeof f.csv == "string") return f.csv;
|
|
2689
|
-
let e =
|
|
2695
|
+
let e = w.value.map((e) => ({
|
|
2690
2696
|
label: e.legend,
|
|
2691
2697
|
data: e.data
|
|
2692
2698
|
}));
|
|
2693
|
-
return Ue(
|
|
2699
|
+
return Ue(E.value, e);
|
|
2694
2700
|
}
|
|
2695
|
-
let
|
|
2696
|
-
function
|
|
2701
|
+
let we = n(() => !!f.tooltipData || !!f.tooltipTrigger);
|
|
2702
|
+
function Te(e, t) {
|
|
2697
2703
|
if (!isFinite(e) || !isFinite(t) || j.value === 0) return null;
|
|
2698
|
-
let n = (
|
|
2699
|
-
return
|
|
2704
|
+
let n = (O.value ? H.value.left : H.value.top) + (e + .5) * j.value, r = P(t);
|
|
2705
|
+
return O.value ? {
|
|
2700
2706
|
x: n,
|
|
2701
2707
|
y: r
|
|
2702
2708
|
} : {
|
|
@@ -2704,16 +2710,16 @@ var Bt = {
|
|
|
2704
2710
|
y: n
|
|
2705
2711
|
};
|
|
2706
2712
|
}
|
|
2707
|
-
function
|
|
2708
|
-
let n =
|
|
2713
|
+
function Ee(e, t) {
|
|
2714
|
+
let n = ke.value?.getBoundingClientRect();
|
|
2709
2715
|
if (!n) return null;
|
|
2710
|
-
let r =
|
|
2716
|
+
let r = T.value;
|
|
2711
2717
|
if (r === 0 || j.value === 0) return null;
|
|
2712
|
-
let i =
|
|
2718
|
+
let i = O.value ? e - n.left - H.value.left : t - n.top - H.value.top;
|
|
2713
2719
|
return Math.max(0, Math.min(r - 1, Math.floor(i / j.value)));
|
|
2714
2720
|
}
|
|
2715
|
-
let
|
|
2716
|
-
let e =
|
|
2721
|
+
let De = n(() => !!(f.categoryHeader || f.valueHeader)), Oe = n(() => {
|
|
2722
|
+
let e = De.value ? nr : 0, t = f.chartPadding;
|
|
2717
2723
|
return e ? t == null ? { top: e } : typeof t == "number" ? {
|
|
2718
2724
|
top: t + e,
|
|
2719
2725
|
right: t,
|
|
@@ -2723,7 +2729,7 @@ var Bt = {
|
|
|
2723
2729
|
...t,
|
|
2724
2730
|
top: (t.top ?? 0) + e
|
|
2725
2731
|
} : t;
|
|
2726
|
-
}), { containerRef:
|
|
2732
|
+
}), { containerRef: ke, svgRef: Ae, width: je, height: Me, padding: H, legendY: Ne, inlineLegendLayout: Pe, innerW: U, innerH: W, bounds: Fe, hoverIndex: G, tooltipRef: K, tooltipPos: Ie, tooltipHandlers: Le, menuItems: Re, downloadLinkText: ze, csvHref: Be, downloadButtonText: Ve, triggerCsvDownload: He, menuFilename: We, isFullscreen: Ge, fullscreenStyle: Ke, teleportTarget: qe, exitFullscreen: Je } = lt({
|
|
2727
2733
|
width: () => f.width,
|
|
2728
2734
|
height: () => f.height,
|
|
2729
2735
|
title: () => f.title,
|
|
@@ -2738,18 +2744,18 @@ var Bt = {
|
|
|
2738
2744
|
downloadLink: () => f.downloadLink,
|
|
2739
2745
|
downloadButton: () => f.downloadButton,
|
|
2740
2746
|
fullscreenTarget: () => f.fullscreenTarget,
|
|
2741
|
-
chartPadding: () =>
|
|
2742
|
-
inlineLegendLabels: () =>
|
|
2743
|
-
hasTooltipSlot: () =>
|
|
2744
|
-
getCsv:
|
|
2745
|
-
pointerToIndex:
|
|
2746
|
-
scrubAxis: () =>
|
|
2747
|
-
onHover: (e) =>
|
|
2748
|
-
}),
|
|
2747
|
+
chartPadding: () => Oe.value,
|
|
2748
|
+
inlineLegendLabels: () => Se.value,
|
|
2749
|
+
hasTooltipSlot: () => we.value,
|
|
2750
|
+
getCsv: Ce,
|
|
2751
|
+
pointerToIndex: Ee,
|
|
2752
|
+
scrubAxis: () => O.value ? "x" : "y",
|
|
2753
|
+
onHover: (e) => v("hover", e)
|
|
2754
|
+
}), Ye = n(() => V(f.axisLabelStyle, { fontSize: 13 })), q = n(() => V(f.tickLabelStyle, {
|
|
2749
2755
|
fontSize: 10,
|
|
2750
|
-
fillOpacity:
|
|
2751
|
-
})),
|
|
2752
|
-
let e = f.titleStyle, t = e?.align ?? "left", n =
|
|
2756
|
+
fillOpacity: xe
|
|
2757
|
+
})), Xe = n(() => V(f.legendStyle, { fontSize: 11 })), J = n(() => f.categoryAlign === "start" && !O.value ? rr : H.value.left), Y = n(() => {
|
|
2758
|
+
let e = f.titleStyle, t = e?.align ?? "left", n = Fe.value, r = t === "left" ? J.value : t === "right" ? n.right : n.left + n.width / 2, i = t === "left" ? "start" : t === "right" ? "end" : "middle";
|
|
2753
2759
|
return {
|
|
2754
2760
|
lines: (f.title ?? "").split("\n"),
|
|
2755
2761
|
fontSize: e?.fontSize ?? 14,
|
|
@@ -2759,34 +2765,34 @@ var Bt = {
|
|
|
2759
2765
|
x: r,
|
|
2760
2766
|
anchor: i
|
|
2761
2767
|
};
|
|
2762
|
-
}),
|
|
2768
|
+
}), Ze = n(() => {
|
|
2763
2769
|
let e = G.value;
|
|
2764
2770
|
if (e === null) return;
|
|
2765
|
-
let t =
|
|
2766
|
-
return t && Number.isFinite(t[e]) ? zt(t[e], f.dateFormat, "utc") :
|
|
2771
|
+
let t = D.value;
|
|
2772
|
+
return t && Number.isFinite(t[e]) ? zt(t[e], f.dateFormat, "utc") : E.value[e];
|
|
2767
2773
|
}), X = n(() => {
|
|
2768
2774
|
let e = G.value;
|
|
2769
2775
|
if (e === null) return null;
|
|
2770
|
-
let t =
|
|
2776
|
+
let t = w.value, n = [];
|
|
2771
2777
|
for (let r = 0; r < t.length; r++) {
|
|
2772
2778
|
let i = t[r];
|
|
2773
2779
|
i.showInTooltip !== !1 && n.push({
|
|
2774
2780
|
value: Number(i.data[e] ?? NaN),
|
|
2775
|
-
color: i.color ??
|
|
2781
|
+
color: i.color ?? L(r),
|
|
2776
2782
|
seriesIndex: r
|
|
2777
2783
|
});
|
|
2778
2784
|
}
|
|
2779
2785
|
return {
|
|
2780
2786
|
index: e,
|
|
2781
|
-
category:
|
|
2787
|
+
category: E.value[e] ?? String(e),
|
|
2782
2788
|
values: n,
|
|
2783
2789
|
data: f.tooltipData?.[e] ?? null
|
|
2784
2790
|
};
|
|
2785
2791
|
}), Z = n(() => {
|
|
2786
2792
|
let e = G.value;
|
|
2787
2793
|
if (e === null) return null;
|
|
2788
|
-
let t =
|
|
2789
|
-
return
|
|
2794
|
+
let t = ie(e);
|
|
2795
|
+
return O.value ? {
|
|
2790
2796
|
x: t,
|
|
2791
2797
|
y: H.value.top,
|
|
2792
2798
|
w: j.value,
|
|
@@ -2797,9 +2803,9 @@ var Bt = {
|
|
|
2797
2803
|
w: U.value,
|
|
2798
2804
|
h: j.value
|
|
2799
2805
|
};
|
|
2800
|
-
}),
|
|
2801
|
-
let e =
|
|
2802
|
-
return
|
|
2806
|
+
}), Qe = n(() => {
|
|
2807
|
+
let e = Pe.value.positions, t = J.value, n = Ne.value;
|
|
2808
|
+
return be.value.map((r, i) => {
|
|
2803
2809
|
let a = e[i];
|
|
2804
2810
|
return {
|
|
2805
2811
|
...r,
|
|
@@ -2807,7 +2813,7 @@ var Bt = {
|
|
|
2807
2813
|
y: n + a.row * 20
|
|
2808
2814
|
};
|
|
2809
2815
|
});
|
|
2810
|
-
}),
|
|
2816
|
+
}), $e = n(() => {
|
|
2811
2817
|
let e = f.barLabels;
|
|
2812
2818
|
if (!e) return null;
|
|
2813
2819
|
let t = e === !0 ? {} : e;
|
|
@@ -2818,37 +2824,37 @@ var Bt = {
|
|
|
2818
2824
|
align: t.align ?? "center",
|
|
2819
2825
|
overlap: t.overlap ?? "shift",
|
|
2820
2826
|
minSize: t.minSize ?? 0,
|
|
2821
|
-
fontSize: t.fontSize ??
|
|
2827
|
+
fontSize: t.fontSize ?? ir,
|
|
2822
2828
|
fontWeight: t.fontWeight
|
|
2823
2829
|
};
|
|
2824
2830
|
});
|
|
2825
|
-
function
|
|
2826
|
-
let n =
|
|
2827
|
-
return typeof n == "function" ? n(e, t) : n === void 0 ? f.valueTickFormat === void 0 ?
|
|
2831
|
+
function et(e, t) {
|
|
2832
|
+
let n = $e.value?.format;
|
|
2833
|
+
return typeof n == "function" ? n(e, t) : n === void 0 ? f.valueTickFormat === void 0 ? B(e) : ne(e, f.valueTickFormat) : ne(e, n);
|
|
2828
2834
|
}
|
|
2829
|
-
function
|
|
2835
|
+
function tt(e, t, n) {
|
|
2830
2836
|
for (let r = F.value.length - 1; r >= 0; r--) {
|
|
2831
2837
|
let i = F.value[r];
|
|
2832
2838
|
if (i.categoryIndex === e && t >= i.x && t <= i.x + i.w && n >= i.y && n <= i.y + i.h) return i.color;
|
|
2833
2839
|
}
|
|
2834
2840
|
return null;
|
|
2835
2841
|
}
|
|
2836
|
-
let
|
|
2837
|
-
let e =
|
|
2842
|
+
let nt = n(() => {
|
|
2843
|
+
let e = $e.value;
|
|
2838
2844
|
if (!e) return [];
|
|
2839
|
-
let t =
|
|
2845
|
+
let t = O.value, n = e.fontSize, r = [];
|
|
2840
2846
|
for (let i of F.value) {
|
|
2841
|
-
let a =
|
|
2847
|
+
let a = et(i.value, {
|
|
2842
2848
|
value: i.value,
|
|
2843
2849
|
categoryIndex: i.categoryIndex,
|
|
2844
2850
|
seriesIndex: i.seriesIndex,
|
|
2845
|
-
category:
|
|
2851
|
+
category: E.value[i.categoryIndex] ?? String(i.categoryIndex)
|
|
2846
2852
|
});
|
|
2847
2853
|
if (!a) continue;
|
|
2848
|
-
let o = t ? i.h : i.w, s = a.length * n *
|
|
2849
|
-
if (f = t ? i.x + i.w / 2 : i.y + i.h / 2, !l) u = m +
|
|
2850
|
-
else if (e.align === "start") u = h +
|
|
2851
|
-
else if (e.align === "end") d = m -
|
|
2854
|
+
let o = t ? i.h : i.w, s = a.length * n * ar, c = o >= s + 2 * or && o >= e.minSize, l = e.placement === "inside" ? !0 : e.placement === "outside" ? !1 : c, u, d, f, p = "middle", m = t ? -i.y : i.x + i.w, h = t ? -(i.y + i.h) : i.x, g = t ? n : s;
|
|
2855
|
+
if (f = t ? i.x + i.w / 2 : i.y + i.h / 2, !l) u = m + or, d = u + g, p = "start";
|
|
2856
|
+
else if (e.align === "start") u = h + or, d = u + g, p = "start";
|
|
2857
|
+
else if (e.align === "end") d = m - or, u = d - g, p = "end";
|
|
2852
2858
|
else {
|
|
2853
2859
|
let e = (m + h) / 2;
|
|
2854
2860
|
u = e - g / 2, d = e + g / 2, p = "middle";
|
|
@@ -2865,7 +2871,7 @@ var Bt = {
|
|
|
2865
2871
|
hidden: !1
|
|
2866
2872
|
});
|
|
2867
2873
|
}
|
|
2868
|
-
let i = t ? -H.value.top :
|
|
2874
|
+
let i = t ? -H.value.top : je.value - 2, a = /* @__PURE__ */ new Map();
|
|
2869
2875
|
for (let e of r) {
|
|
2870
2876
|
let t = a.get(e.bar.categoryIndex);
|
|
2871
2877
|
t ? t.push(e) : a.set(e.bar.categoryIndex, [e]);
|
|
@@ -2874,12 +2880,12 @@ var Bt = {
|
|
|
2874
2880
|
t.sort((e, t) => e.lo - t.lo);
|
|
2875
2881
|
let n = -Infinity;
|
|
2876
2882
|
for (let r of t) {
|
|
2877
|
-
if (r.lo < n +
|
|
2883
|
+
if (r.lo < n + sr) {
|
|
2878
2884
|
if (e.overlap === "hide") {
|
|
2879
2885
|
r.hidden = !0;
|
|
2880
2886
|
continue;
|
|
2881
2887
|
}
|
|
2882
|
-
let t = n +
|
|
2888
|
+
let t = n + sr - r.lo;
|
|
2883
2889
|
r.lo += t, r.hi += t, r.inside = !1, r.svgAnchor = "start";
|
|
2884
2890
|
}
|
|
2885
2891
|
if (r.hi > i) {
|
|
@@ -2898,7 +2904,7 @@ var Bt = {
|
|
|
2898
2904
|
if (!o) l = e.color;
|
|
2899
2905
|
else if (i.inside) l = gt(i.bar.color);
|
|
2900
2906
|
else {
|
|
2901
|
-
let e = t ? i.cross : (i.lo + i.hi) / 2, n = t ? -((i.lo + i.hi) / 2) : i.cross, r =
|
|
2907
|
+
let e = t ? i.cross : (i.lo + i.hi) / 2, n = t ? -((i.lo + i.hi) / 2) : i.cross, r = tt(i.bar.categoryIndex, e, n);
|
|
2902
2908
|
l = r ? gt(r) : "currentColor";
|
|
2903
2909
|
}
|
|
2904
2910
|
s.push({
|
|
@@ -2913,23 +2919,23 @@ var Bt = {
|
|
|
2913
2919
|
});
|
|
2914
2920
|
}
|
|
2915
2921
|
return s;
|
|
2916
|
-
}),
|
|
2922
|
+
}), rt = n(() => {
|
|
2917
2923
|
let e = H.value.left - 6;
|
|
2918
2924
|
switch (f.categoryAlign ?? "end") {
|
|
2919
2925
|
case "start": return {
|
|
2920
2926
|
anchor: "start",
|
|
2921
|
-
x:
|
|
2927
|
+
x: rr
|
|
2922
2928
|
};
|
|
2923
2929
|
case "center": return {
|
|
2924
2930
|
anchor: "middle",
|
|
2925
|
-
x: (
|
|
2931
|
+
x: (rr + e) / 2
|
|
2926
2932
|
};
|
|
2927
2933
|
default: return {
|
|
2928
2934
|
anchor: "end",
|
|
2929
2935
|
x: e
|
|
2930
2936
|
};
|
|
2931
2937
|
}
|
|
2932
|
-
}),
|
|
2938
|
+
}), it = n(() => {
|
|
2933
2939
|
let e = [], t = H.value.top - 7;
|
|
2934
2940
|
if (f.valueHeader && e.push({
|
|
2935
2941
|
key: "vh",
|
|
@@ -2938,7 +2944,7 @@ var Bt = {
|
|
|
2938
2944
|
y: t,
|
|
2939
2945
|
anchor: "start"
|
|
2940
2946
|
}), f.categoryHeader) {
|
|
2941
|
-
let n = !
|
|
2947
|
+
let n = !O.value, r = rt.value;
|
|
2942
2948
|
e.push({
|
|
2943
2949
|
key: "ch",
|
|
2944
2950
|
text: f.categoryHeader,
|
|
@@ -2950,31 +2956,33 @@ var Bt = {
|
|
|
2950
2956
|
return e;
|
|
2951
2957
|
});
|
|
2952
2958
|
return (n, l) => (_(), r(t, {
|
|
2953
|
-
to: C(
|
|
2954
|
-
disabled: !C(
|
|
2959
|
+
to: C(qe),
|
|
2960
|
+
disabled: !C(Ge)
|
|
2955
2961
|
}, [o("div", d({
|
|
2956
2962
|
ref_key: "containerRef",
|
|
2957
|
-
ref:
|
|
2963
|
+
ref: ke
|
|
2958
2964
|
}, n.$attrs, {
|
|
2959
|
-
class: ["bar-chart-wrapper", { "is-fullscreen": C(
|
|
2960
|
-
style: C(
|
|
2965
|
+
class: ["bar-chart-wrapper", { "is-fullscreen": C(Ge) }],
|
|
2966
|
+
style: C(Ke),
|
|
2967
|
+
role: g.value || void 0,
|
|
2968
|
+
"aria-label": h.value || void 0
|
|
2961
2969
|
}), [
|
|
2962
2970
|
c.menu ? (_(), r(pe, {
|
|
2963
2971
|
key: 0,
|
|
2964
|
-
items: C(
|
|
2965
|
-
"is-fullscreen": C(
|
|
2966
|
-
onClose: C(
|
|
2972
|
+
items: C(Re),
|
|
2973
|
+
"is-fullscreen": C(Ge),
|
|
2974
|
+
onClose: C(Je)
|
|
2967
2975
|
}, null, 8, [
|
|
2968
2976
|
"items",
|
|
2969
2977
|
"is-fullscreen",
|
|
2970
2978
|
"onClose"
|
|
2971
2979
|
])) : i("", !0),
|
|
2972
|
-
o("div",
|
|
2980
|
+
o("div", kn, x(C(Ge) ? "Chart expanded to fill window" : ""), 1),
|
|
2973
2981
|
(_(), a("svg", {
|
|
2974
2982
|
ref_key: "svgRef",
|
|
2975
|
-
ref:
|
|
2976
|
-
width: C(
|
|
2977
|
-
height: C(
|
|
2983
|
+
ref: Ae,
|
|
2984
|
+
width: C(je),
|
|
2985
|
+
height: C(Me)
|
|
2978
2986
|
}, [
|
|
2979
2987
|
c.title ? (_(), a("text", {
|
|
2980
2988
|
key: 0,
|
|
@@ -2988,25 +2996,25 @@ var Bt = {
|
|
|
2988
2996
|
key: t,
|
|
2989
2997
|
x: Y.value.x,
|
|
2990
2998
|
dy: t === 0 ? 0 : Y.value.lineHeight
|
|
2991
|
-
}, x(e), 9,
|
|
2992
|
-
(_(!0), a(e, null, y(
|
|
2999
|
+
}, x(e), 9, Mn))), 128))], 8, jn)) : i("", !0),
|
|
3000
|
+
(_(!0), a(e, null, y(it.value, (e) => (_(), a("text", {
|
|
2993
3001
|
key: e.key,
|
|
2994
3002
|
"data-testid": e.key === "ch" ? "category-header" : "value-header",
|
|
2995
3003
|
x: e.x,
|
|
2996
3004
|
y: e.y,
|
|
2997
3005
|
"text-anchor": e.anchor,
|
|
2998
|
-
"font-size":
|
|
2999
|
-
fill:
|
|
3006
|
+
"font-size": Ye.value.fontSize,
|
|
3007
|
+
fill: Ye.value.fill,
|
|
3000
3008
|
"font-weight": "600"
|
|
3001
|
-
}, x(e.text), 9,
|
|
3002
|
-
|
|
3009
|
+
}, x(e.text), 9, Nn))), 128)),
|
|
3010
|
+
Qe.value.length > 0 ? (_(), a("g", Pn, [(_(!0), a(e, null, y(Qe.value, (t, n) => (_(), a(e, { key: "ileg" + n }, [t.kind === "bar" ? (_(), a("rect", {
|
|
3003
3011
|
key: 0,
|
|
3004
3012
|
x: t.x,
|
|
3005
3013
|
y: t.y - 5,
|
|
3006
3014
|
width: "12",
|
|
3007
3015
|
height: "10",
|
|
3008
3016
|
fill: t.color
|
|
3009
|
-
}, null, 8,
|
|
3017
|
+
}, null, 8, Fn)) : (_(), a("line", {
|
|
3010
3018
|
key: 1,
|
|
3011
3019
|
x1: t.x,
|
|
3012
3020
|
y1: t.y,
|
|
@@ -3015,14 +3023,14 @@ var Bt = {
|
|
|
3015
3023
|
stroke: t.color,
|
|
3016
3024
|
"stroke-width": "2",
|
|
3017
3025
|
"stroke-dasharray": t.dashed ? "4 2" : void 0
|
|
3018
|
-
}, null, 8,
|
|
3026
|
+
}, null, 8, In)), o("text", {
|
|
3019
3027
|
x: t.x + 18,
|
|
3020
3028
|
y: t.y + 4,
|
|
3021
|
-
"font-size":
|
|
3022
|
-
fill:
|
|
3023
|
-
"font-weight":
|
|
3024
|
-
}, x(t.label), 9,
|
|
3025
|
-
!
|
|
3029
|
+
"font-size": Xe.value.fontSize,
|
|
3030
|
+
fill: Xe.value.fill,
|
|
3031
|
+
"font-weight": Xe.value.fontWeight
|
|
3032
|
+
}, x(t.label), 9, Ln)], 64))), 128))])) : i("", !0),
|
|
3033
|
+
!O.value || c.valueAxis ? (_(), a("line", {
|
|
3026
3034
|
key: 2,
|
|
3027
3035
|
x1: C(R)(C(H).left),
|
|
3028
3036
|
y1: C(R)(C(H).top),
|
|
@@ -3030,8 +3038,8 @@ var Bt = {
|
|
|
3030
3038
|
y2: C(R)(C(H).top + C(W)),
|
|
3031
3039
|
stroke: "currentColor",
|
|
3032
3040
|
"stroke-opacity": "0.3"
|
|
3033
|
-
}, null, 8,
|
|
3034
|
-
|
|
3041
|
+
}, null, 8, Rn)) : i("", !0),
|
|
3042
|
+
O.value || c.valueAxis ? (_(), a("line", {
|
|
3035
3043
|
key: 3,
|
|
3036
3044
|
x1: C(R)(C(H).left),
|
|
3037
3045
|
y1: C(R)(C(H).top + C(W)),
|
|
@@ -3039,17 +3047,17 @@ var Bt = {
|
|
|
3039
3047
|
y2: C(R)(C(H).top + C(W)),
|
|
3040
3048
|
stroke: "currentColor",
|
|
3041
3049
|
"stroke-opacity": "0.3"
|
|
3042
|
-
}, null, 8,
|
|
3043
|
-
c.valueGrid && c.valueAxis ? (_(!0), a(e, { key: 4 }, y(
|
|
3050
|
+
}, null, 8, zn)) : i("", !0),
|
|
3051
|
+
c.valueGrid && c.valueAxis ? (_(!0), a(e, { key: 4 }, y(he.value, (e, t) => (_(), a("line", {
|
|
3044
3052
|
key: "vg" + t,
|
|
3045
|
-
x1:
|
|
3046
|
-
y1:
|
|
3047
|
-
x2:
|
|
3048
|
-
y2:
|
|
3053
|
+
x1: O.value ? C(H).left : e.pos,
|
|
3054
|
+
y1: O.value ? e.pos : C(H).top,
|
|
3055
|
+
x2: O.value ? C(H).left + C(U) : e.pos,
|
|
3056
|
+
y2: O.value ? e.pos : C(H).top + C(W),
|
|
3049
3057
|
stroke: "currentColor",
|
|
3050
3058
|
"stroke-opacity": "0.1"
|
|
3051
|
-
}, null, 8,
|
|
3052
|
-
Z.value &&
|
|
3059
|
+
}, null, 8, Bn))), 128)) : i("", !0),
|
|
3060
|
+
Z.value && we.value ? (_(), a("rect", {
|
|
3053
3061
|
key: 5,
|
|
3054
3062
|
x: Z.value.x,
|
|
3055
3063
|
y: Z.value.y,
|
|
@@ -3058,8 +3066,8 @@ var Bt = {
|
|
|
3058
3066
|
fill: "currentColor",
|
|
3059
3067
|
"fill-opacity": "0.06",
|
|
3060
3068
|
"pointer-events": "none"
|
|
3061
|
-
}, null, 8,
|
|
3062
|
-
c.valueAxis &&
|
|
3069
|
+
}, null, 8, Vn)) : i("", !0),
|
|
3070
|
+
c.valueAxis && O.value ? (_(!0), a(e, { key: 6 }, y(he.value, (e, t) => (_(), a("text", {
|
|
3063
3071
|
key: "vt" + t,
|
|
3064
3072
|
"data-testid": "value-tick",
|
|
3065
3073
|
x: C(H).left - 6,
|
|
@@ -3070,7 +3078,7 @@ var Bt = {
|
|
|
3070
3078
|
fill: q.value.fill,
|
|
3071
3079
|
"font-weight": q.value.fontWeight,
|
|
3072
3080
|
"fill-opacity": q.value.fillOpacity
|
|
3073
|
-
}, x(e.value), 9,
|
|
3081
|
+
}, x(e.value), 9, Hn))), 128)) : c.valueAxis ? (_(!0), a(e, { key: 7 }, y(he.value, (e, t) => (_(), a("text", {
|
|
3074
3082
|
key: "vt" + t,
|
|
3075
3083
|
"data-testid": "value-tick",
|
|
3076
3084
|
x: e.pos,
|
|
@@ -3080,18 +3088,18 @@ var Bt = {
|
|
|
3080
3088
|
fill: q.value.fill,
|
|
3081
3089
|
"font-weight": q.value.fontWeight,
|
|
3082
3090
|
"fill-opacity": q.value.fillOpacity
|
|
3083
|
-
}, x(e.value), 9,
|
|
3091
|
+
}, x(e.value), 9, Un))), 128)) : i("", !0),
|
|
3084
3092
|
c.yLabel ? (_(), a("text", {
|
|
3085
3093
|
key: 8,
|
|
3086
3094
|
x: 0,
|
|
3087
3095
|
y: 0,
|
|
3088
3096
|
transform: `translate(14, ${C(H).top + C(W) / 2}) rotate(-90)`,
|
|
3089
3097
|
"text-anchor": "middle",
|
|
3090
|
-
"font-size":
|
|
3091
|
-
fill:
|
|
3092
|
-
"font-weight":
|
|
3093
|
-
}, x(c.yLabel), 9,
|
|
3094
|
-
|
|
3098
|
+
"font-size": Ye.value.fontSize,
|
|
3099
|
+
fill: Ye.value.fill,
|
|
3100
|
+
"font-weight": Ye.value.fontWeight
|
|
3101
|
+
}, x(c.yLabel), 9, Wn)) : i("", !0),
|
|
3102
|
+
O.value ? (_(!0), a(e, { key: 9 }, y(z.value, (e, t) => (_(), a("text", {
|
|
3095
3103
|
key: "ct" + t,
|
|
3096
3104
|
"data-testid": "category-tick",
|
|
3097
3105
|
x: e.pos,
|
|
@@ -3101,27 +3109,27 @@ var Bt = {
|
|
|
3101
3109
|
fill: q.value.fill,
|
|
3102
3110
|
"font-weight": q.value.fontWeight,
|
|
3103
3111
|
"fill-opacity": q.value.fillOpacity
|
|
3104
|
-
}, x(e.label), 9,
|
|
3112
|
+
}, x(e.label), 9, Gn))), 128)) : (_(!0), a(e, { key: 10 }, y(z.value, (e, t) => (_(), a("text", {
|
|
3105
3113
|
key: "ct" + t,
|
|
3106
3114
|
"data-testid": "category-tick",
|
|
3107
|
-
x:
|
|
3115
|
+
x: rt.value.x,
|
|
3108
3116
|
y: e.pos,
|
|
3109
|
-
"text-anchor":
|
|
3117
|
+
"text-anchor": rt.value.anchor,
|
|
3110
3118
|
"dominant-baseline": "middle",
|
|
3111
3119
|
"font-size": q.value.fontSize,
|
|
3112
3120
|
fill: q.value.fill,
|
|
3113
3121
|
"font-weight": q.value.fontWeight,
|
|
3114
3122
|
"fill-opacity": q.value.fillOpacity
|
|
3115
|
-
}, x(e.label), 9,
|
|
3123
|
+
}, x(e.label), 9, Kn))), 128)),
|
|
3116
3124
|
c.xLabel ? (_(), a("text", {
|
|
3117
3125
|
key: 11,
|
|
3118
3126
|
x: C(H).left + C(U) / 2,
|
|
3119
|
-
y: C(
|
|
3127
|
+
y: C(Me) - 4,
|
|
3120
3128
|
"text-anchor": "middle",
|
|
3121
|
-
"font-size":
|
|
3122
|
-
fill:
|
|
3123
|
-
"font-weight":
|
|
3124
|
-
}, x(c.xLabel), 9,
|
|
3129
|
+
"font-size": Ye.value.fontSize,
|
|
3130
|
+
fill: Ye.value.fill,
|
|
3131
|
+
"font-weight": Ye.value.fontWeight
|
|
3132
|
+
}, x(c.xLabel), 9, qn)) : i("", !0),
|
|
3125
3133
|
(_(!0), a(e, null, y(F.value, (e, t) => (_(), a("rect", {
|
|
3126
3134
|
key: "bar" + t,
|
|
3127
3135
|
"data-testid": "bar",
|
|
@@ -3134,8 +3142,8 @@ var Bt = {
|
|
|
3134
3142
|
fill: e.color,
|
|
3135
3143
|
"fill-opacity": e.opacity,
|
|
3136
3144
|
style: m(e.blendMode ? { mixBlendMode: e.blendMode } : void 0)
|
|
3137
|
-
}, null, 12,
|
|
3138
|
-
(_(!0), a(e, null, y(
|
|
3145
|
+
}, null, 12, Jn))), 128)),
|
|
3146
|
+
(_(!0), a(e, null, y(nt.value, (e) => (_(), a("text", {
|
|
3139
3147
|
key: "blbl" + e.key,
|
|
3140
3148
|
"data-testid": "bar-label",
|
|
3141
3149
|
x: e.x,
|
|
@@ -3146,7 +3154,7 @@ var Bt = {
|
|
|
3146
3154
|
"font-weight": e.fontWeight,
|
|
3147
3155
|
fill: e.fill,
|
|
3148
3156
|
"pointer-events": "none"
|
|
3149
|
-
}, x(e.text), 9,
|
|
3157
|
+
}, x(e.text), 9, Yn))), 128)),
|
|
3150
3158
|
(_(!0), a(e, null, y(I.value, (t, n) => (_(), a(e, { key: "sl" + n }, [t.pathD ? (_(), a("path", {
|
|
3151
3159
|
key: 0,
|
|
3152
3160
|
"data-testid": "summary-line",
|
|
@@ -3159,7 +3167,7 @@ var Bt = {
|
|
|
3159
3167
|
"stroke-linecap": "round",
|
|
3160
3168
|
"stroke-linejoin": "round",
|
|
3161
3169
|
style: m(t.blendMode ? { mixBlendMode: t.blendMode } : void 0)
|
|
3162
|
-
}, null, 12,
|
|
3170
|
+
}, null, 12, Xn)) : i("", !0), t.dots ? (_(!0), a(e, { key: 1 }, y(t.points, (e, r) => (_(), a("circle", {
|
|
3163
3171
|
key: "sld" + n + "-" + r,
|
|
3164
3172
|
cx: e.x,
|
|
3165
3173
|
cy: e.y,
|
|
@@ -3167,24 +3175,24 @@ var Bt = {
|
|
|
3167
3175
|
fill: t.color,
|
|
3168
3176
|
"fill-opacity": t.opacity,
|
|
3169
3177
|
style: m(t.blendMode ? { mixBlendMode: t.blendMode } : void 0)
|
|
3170
|
-
}, null, 12,
|
|
3171
|
-
|
|
3178
|
+
}, null, 12, Zn))), 128)) : i("", !0)], 64))), 128)),
|
|
3179
|
+
we.value ? (_(), a("rect", d({
|
|
3172
3180
|
key: 12,
|
|
3173
3181
|
x: C(H).left,
|
|
3174
3182
|
y: C(H).top,
|
|
3175
3183
|
width: C(U),
|
|
3176
3184
|
height: C(W),
|
|
3177
3185
|
fill: "transparent",
|
|
3178
|
-
style: `cursor: crosshair; touch-action: ${
|
|
3179
|
-
}, ee(C(
|
|
3186
|
+
style: `cursor: crosshair; touch-action: ${O.value ? "pan-y" : "pan-x"}`
|
|
3187
|
+
}, ee(C(Le), !0)), null, 16, Qn)) : i("", !0),
|
|
3180
3188
|
c.annotations && c.annotations.length > 0 ? (_(), r(C(ot), {
|
|
3181
3189
|
key: 13,
|
|
3182
3190
|
annotations: c.annotations,
|
|
3183
|
-
project:
|
|
3184
|
-
bounds: C(
|
|
3191
|
+
project: Te,
|
|
3192
|
+
bounds: C(Fe)
|
|
3185
3193
|
}, null, 8, ["annotations", "bounds"])) : i("", !0)
|
|
3186
|
-
], 8,
|
|
3187
|
-
|
|
3194
|
+
], 8, An)),
|
|
3195
|
+
we.value && C(G) !== null && X.value ? (_(), a("div", {
|
|
3188
3196
|
key: 1,
|
|
3189
3197
|
ref_key: "tooltipRef",
|
|
3190
3198
|
ref: K,
|
|
@@ -3194,31 +3202,31 @@ var Bt = {
|
|
|
3194
3202
|
top: "0",
|
|
3195
3203
|
left: "0",
|
|
3196
3204
|
willChange: "transform",
|
|
3197
|
-
transform: C(
|
|
3198
|
-
visibility: C(
|
|
3205
|
+
transform: C(Ie) ? `translate3d(${C(Ie).left}px, ${C(Ie).top}px, 0) translateY(-50%)` : "translateY(-50%)",
|
|
3206
|
+
visibility: C(Ie) ? "visible" : "hidden"
|
|
3199
3207
|
})
|
|
3200
|
-
}, [b(n.$slots, "tooltip", p(u(X.value)), () => [o("div",
|
|
3208
|
+
}, [b(n.$slots, "tooltip", p(u(X.value)), () => [o("div", $n, [Ze.value ? (_(), a("div", er, x(Ze.value), 1)) : i("", !0), (_(!0), a(e, null, y(X.value.values, (e) => (_(), a("div", {
|
|
3201
3209
|
key: e.seriesIndex,
|
|
3202
3210
|
class: "bar-chart-tooltip-row"
|
|
3203
3211
|
}, [o("span", {
|
|
3204
3212
|
class: "bar-chart-tooltip-swatch",
|
|
3205
3213
|
style: m({ background: e.color })
|
|
3206
|
-
}, null, 4), s(" " + x(isFinite(e.value) ? C(
|
|
3207
|
-
C(
|
|
3214
|
+
}, null, 4), s(" " + x(isFinite(e.value) ? C(me)(e.value) : "—"), 1)]))), 128))])], !0)], 4)) : i("", !0),
|
|
3215
|
+
C(ze) ? (_(), a("a", {
|
|
3208
3216
|
key: 2,
|
|
3209
3217
|
class: "bar-chart-download-link",
|
|
3210
|
-
href: C(
|
|
3211
|
-
download: `${C(
|
|
3212
|
-
}, x(C(
|
|
3213
|
-
C(
|
|
3218
|
+
href: C(Be),
|
|
3219
|
+
download: `${C(We)()}.csv`
|
|
3220
|
+
}, x(C(ze)), 9, tr)) : i("", !0),
|
|
3221
|
+
C(Ve) ? (_(), a("button", {
|
|
3214
3222
|
key: 3,
|
|
3215
3223
|
type: "button",
|
|
3216
3224
|
class: "bar-chart-download-button",
|
|
3217
|
-
onClick: l[0] ||= (...e) => C(
|
|
3218
|
-
}, x(C(
|
|
3219
|
-
], 16)], 8, ["to", "disabled"]));
|
|
3225
|
+
onClick: l[0] ||= (...e) => C(He) && C(He)(...e)
|
|
3226
|
+
}, x(C(Ve)), 1)) : i("", !0)
|
|
3227
|
+
], 16, On)], 8, ["to", "disabled"]));
|
|
3220
3228
|
}
|
|
3221
|
-
}), [["__scopeId", "data-v-
|
|
3229
|
+
}), [["__scopeId", "data-v-5f38ef02"]]), lr = {
|
|
3222
3230
|
ref: "root",
|
|
3223
3231
|
class: "chart-tooltip-content",
|
|
3224
3232
|
style: {
|
|
@@ -3230,10 +3238,10 @@ var Bt = {
|
|
|
3230
3238
|
"pointer-events": "none",
|
|
3231
3239
|
transform: "translateY(-50%)"
|
|
3232
3240
|
}
|
|
3233
|
-
},
|
|
3241
|
+
}, ur = /* @__PURE__ */ l({
|
|
3234
3242
|
__name: "ChoroplethTooltip",
|
|
3235
3243
|
setup(e, { expose: n }) {
|
|
3236
|
-
let a = v(null), s =
|
|
3244
|
+
let a = v(null), s = w("root");
|
|
3237
3245
|
return n({
|
|
3238
3246
|
setData(e) {
|
|
3239
3247
|
a.value = e;
|
|
@@ -3241,21 +3249,21 @@ var Bt = {
|
|
|
3241
3249
|
getEl() {
|
|
3242
3250
|
return s.value;
|
|
3243
3251
|
}
|
|
3244
|
-
}), (e, n) => (_(), r(t, { to: "body" }, [o("div",
|
|
3252
|
+
}), (e, n) => (_(), r(t, { to: "body" }, [o("div", lr, [a.value ? b(e.$slots, "default", p(d({ key: 0 }, a.value))) : i("", !0)], 512)]));
|
|
3245
3253
|
}
|
|
3246
|
-
}),
|
|
3254
|
+
}), dr = ["role", "aria-label"], fr = {
|
|
3247
3255
|
class: "chart-sr-only",
|
|
3248
3256
|
"aria-live": "polite"
|
|
3249
|
-
},
|
|
3257
|
+
}, pr = {
|
|
3250
3258
|
key: 1,
|
|
3251
3259
|
class: "choropleth-header"
|
|
3252
|
-
},
|
|
3260
|
+
}, mr = {
|
|
3253
3261
|
key: 0,
|
|
3254
3262
|
class: "choropleth-legend-title"
|
|
3255
|
-
},
|
|
3263
|
+
}, hr = {
|
|
3256
3264
|
key: 2,
|
|
3257
3265
|
class: "choropleth-legend-continuous"
|
|
3258
|
-
},
|
|
3266
|
+
}, gr = { class: "choropleth-legend-ticks" }, _r = ["viewBox"], vr = ["innerHTML"], yr = "http://www.w3.org/2000/svg", br = 10, xr = 600, Sr = 450, Cr = 1e3, wr = 12, Tr = /* @__PURE__ */ L(/* @__PURE__ */ l({
|
|
3259
3267
|
inheritAttrs: !1,
|
|
3260
3268
|
__name: "ChoroplethMap",
|
|
3261
3269
|
props: {
|
|
@@ -3269,6 +3277,8 @@ var Bt = {
|
|
|
3269
3277
|
colorScale: {},
|
|
3270
3278
|
title: {},
|
|
3271
3279
|
titleStyle: {},
|
|
3280
|
+
role: {},
|
|
3281
|
+
ariaLabel: {},
|
|
3272
3282
|
legendStyle: {},
|
|
3273
3283
|
noDataColor: { default: "#ddd" },
|
|
3274
3284
|
strokeColor: { default: "#fff" },
|
|
@@ -3312,10 +3322,10 @@ var Bt = {
|
|
|
3312
3322
|
"update:focus"
|
|
3313
3323
|
],
|
|
3314
3324
|
setup(c, { emit: l }) {
|
|
3315
|
-
let f = c, ee = l,
|
|
3325
|
+
let f = c, ee = n(() => f.ariaLabel ?? f.title), w = n(() => f.role ?? (ee.value ? "figure" : void 0)), D = l, O = (e) => e, k = v(null), A = v(null), re = v(null), j = v(null), M = v(null), N = v(null), ie = te(), de = n(() => !!f.tooltipTrigger || !!f.tooltipFormat || !!ie.tooltip), fe = n(() => {
|
|
3316
3326
|
let e = f.legendStyle, t = {};
|
|
3317
3327
|
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;
|
|
3318
|
-
}),
|
|
3328
|
+
}), L = n(() => {
|
|
3319
3329
|
let e = f.titleStyle, t = {
|
|
3320
3330
|
"font-size": `${e?.fontSize ?? 14}px`,
|
|
3321
3331
|
"line-height": `${e?.lineHeight ?? 18}px`,
|
|
@@ -3324,40 +3334,40 @@ var Bt = {
|
|
|
3324
3334
|
width: "100%"
|
|
3325
3335
|
};
|
|
3326
3336
|
return e?.color && (t.color = e.color), t;
|
|
3327
|
-
}),
|
|
3337
|
+
}), R = /* @__PURE__ */ new Map(), me = /* @__PURE__ */ new Map(), he = null, z = null, B = /* @__PURE__ */ new Map(), ge = /* @__PURE__ */ new Map(), _e = !1, ve = typeof window < "u" && "ontouchstart" in window, ye = null, be = {
|
|
3328
3338
|
width: 0,
|
|
3329
3339
|
height: 0
|
|
3330
|
-
},
|
|
3331
|
-
function
|
|
3332
|
-
let e =
|
|
3333
|
-
e && (e.addEventListener("touchstart",
|
|
3340
|
+
}, xe = null, Se = !1, V = null, Ce = v(!1), we = 0, Te = 0, Ee = 0, De = null;
|
|
3341
|
+
function Oe() {
|
|
3342
|
+
let e = re.value;
|
|
3343
|
+
e && (e.addEventListener("touchstart", Ot, { passive: !0 }), e.addEventListener("touchend", kt), e.addEventListener("touchcancel", At, { passive: !0 }), !ve && (e.addEventListener("click", Tt), e.addEventListener("mouseover", Tt), e.addEventListener("mousemove", Et), e.addEventListener("mouseout", Dt)));
|
|
3334
3344
|
}
|
|
3335
|
-
function
|
|
3336
|
-
let e =
|
|
3337
|
-
e && (e.removeEventListener("touchstart",
|
|
3345
|
+
function ke() {
|
|
3346
|
+
let e = re.value;
|
|
3347
|
+
e && (e.removeEventListener("touchstart", Ot), e.removeEventListener("touchend", kt), e.removeEventListener("touchcancel", At), e.removeEventListener("click", Tt), e.removeEventListener("mouseover", Tt), e.removeEventListener("mousemove", Et), e.removeEventListener("mouseout", Dt));
|
|
3338
3348
|
}
|
|
3339
|
-
function
|
|
3340
|
-
|
|
3349
|
+
function Ae() {
|
|
3350
|
+
St();
|
|
3341
3351
|
}
|
|
3342
3352
|
h(() => {
|
|
3343
|
-
|
|
3353
|
+
Me(), Oe(), Mt(), W(), mt(), window.addEventListener("scroll", Ae, {
|
|
3344
3354
|
passive: !0,
|
|
3345
3355
|
capture: !0
|
|
3346
|
-
}), window.addEventListener("resize",
|
|
3356
|
+
}), window.addEventListener("resize", Ae, { passive: !0 });
|
|
3347
3357
|
}), g(() => {
|
|
3348
|
-
|
|
3358
|
+
ye?.disconnect(), Ee && cancelAnimationFrame(Ee), H(), ke(), window.removeEventListener("scroll", Ae, { capture: !0 }), window.removeEventListener("resize", Ae);
|
|
3349
3359
|
});
|
|
3350
|
-
function
|
|
3351
|
-
if (!
|
|
3352
|
-
let e =
|
|
3353
|
-
V =
|
|
3354
|
-
|
|
3360
|
+
function Me() {
|
|
3361
|
+
if (!A.value || !re.value) return;
|
|
3362
|
+
let e = ce(A.value), t = Math.max(12, f.focusZoomLevel);
|
|
3363
|
+
V = F().scaleExtent([1, t]).on("start", () => {
|
|
3364
|
+
_e = !0, St();
|
|
3355
3365
|
}).on("zoom", (e) => {
|
|
3356
|
-
|
|
3366
|
+
re.value && re.value.setAttribute("transform", e.transform);
|
|
3357
3367
|
let t = e.transform;
|
|
3358
|
-
|
|
3368
|
+
Ce.value = t.k !== 1 || t.x !== 0 || t.y !== 0;
|
|
3359
3369
|
}).on("end", () => {
|
|
3360
|
-
|
|
3370
|
+
_e = !1;
|
|
3361
3371
|
}), V.filter((e) => {
|
|
3362
3372
|
let t = Z.value.length > 0 && f.focusZoom !== !1, n = !!f.zoom || t, r = !!f.pan || t;
|
|
3363
3373
|
if (e.type === "wheel" || e.type === "dblclick") {
|
|
@@ -3368,11 +3378,11 @@ var Bt = {
|
|
|
3368
3378
|
return (!e.ctrlKey || e.type === "wheel") && !e.button;
|
|
3369
3379
|
}), e.call(V);
|
|
3370
3380
|
}
|
|
3371
|
-
function
|
|
3372
|
-
|
|
3381
|
+
function H() {
|
|
3382
|
+
A.value && V && (ce(A.value).on(".zoom", null), V = null);
|
|
3373
3383
|
}
|
|
3374
|
-
function
|
|
3375
|
-
let t =
|
|
3384
|
+
function Ne(e) {
|
|
3385
|
+
let t = Qe.value, n = Y.value, r = [];
|
|
3376
3386
|
for (let i of e) {
|
|
3377
3387
|
let e = i.geoType ?? f.geoType, a = t.get(e);
|
|
3378
3388
|
if (!a) continue;
|
|
@@ -3390,107 +3400,107 @@ var Bt = {
|
|
|
3390
3400
|
}
|
|
3391
3401
|
return r;
|
|
3392
3402
|
}
|
|
3393
|
-
function
|
|
3403
|
+
function Pe(e) {
|
|
3394
3404
|
let t = /* @__PURE__ */ new Set();
|
|
3395
|
-
for (let n of
|
|
3405
|
+
for (let n of Ne(e)) n.geoType === f.geoType && t.add(String(n.feature.id));
|
|
3396
3406
|
return t;
|
|
3397
3407
|
}
|
|
3398
3408
|
let U = !1;
|
|
3399
3409
|
function W() {
|
|
3400
|
-
if (!
|
|
3401
|
-
let e =
|
|
3410
|
+
if (!A.value || !V) return;
|
|
3411
|
+
let e = Ne(Z.value), t = e.filter((e) => e.geoType === f.geoType), n = e.filter((e) => e.geoType !== f.geoType), r = /* @__PURE__ */ new Map();
|
|
3402
3412
|
for (let e of t) {
|
|
3403
|
-
let t =
|
|
3413
|
+
let t = R.get(String(e.feature.id));
|
|
3404
3414
|
t && r.set(t, e.item.style ?? "solid");
|
|
3405
3415
|
}
|
|
3406
|
-
for (let [e] of B) r.has(e) || e === z ||
|
|
3407
|
-
for (let [e, t] of r) B.get(e) === t && e !== z || e !== z &&
|
|
3416
|
+
for (let [e] of B) r.has(e) || e === z || bt(e);
|
|
3417
|
+
for (let [e, t] of r) B.get(e) === t && e !== z || e !== z && Q(e, t);
|
|
3408
3418
|
B.clear();
|
|
3409
3419
|
for (let [e, t] of r) B.set(e, t);
|
|
3410
|
-
if (
|
|
3411
|
-
U = !0,
|
|
3420
|
+
if (K(n), e.length === 0) {
|
|
3421
|
+
U = !0, St();
|
|
3412
3422
|
return;
|
|
3413
3423
|
}
|
|
3414
3424
|
if (f.focusZoom === !1) {
|
|
3415
3425
|
U = !0;
|
|
3416
3426
|
return;
|
|
3417
3427
|
}
|
|
3418
|
-
let i =
|
|
3428
|
+
let i = ce(A.value);
|
|
3419
3429
|
i.interrupt();
|
|
3420
3430
|
let a = U;
|
|
3421
3431
|
U = !0;
|
|
3422
|
-
let [[o, s], [c, l]] =
|
|
3432
|
+
let [[o, s], [c, l]] = Xe.value.bounds({
|
|
3423
3433
|
type: "FeatureCollection",
|
|
3424
3434
|
features: e.map((e) => e.feature)
|
|
3425
|
-
}), u = (o + c) / 2, d = (s + l) / 2, p = f.focusZoomLevel, m = se.translate(
|
|
3426
|
-
if (!
|
|
3427
|
-
let e = String(h.id), t =
|
|
3435
|
+
}), u = (o + c) / 2, d = (s + l) / 2, p = f.focusZoomLevel, m = se.translate(Re.value / 2 - p * u, ze.value / 2 - p * d).scale(p), h = t[0]?.feature ?? null, g = () => {
|
|
3436
|
+
if (!de.value || !h) return;
|
|
3437
|
+
let e = String(h.id), t = R.get(e);
|
|
3428
3438
|
if (!t) return;
|
|
3429
3439
|
let n = t.getBoundingClientRect();
|
|
3430
|
-
|
|
3440
|
+
gt(e, n.left + n.width / 2, n.top + n.height / 2);
|
|
3431
3441
|
};
|
|
3432
|
-
a ? (
|
|
3442
|
+
a ? (vt(), i.transition().duration(Sr).call(V.transform, m).on("end", g)) : (V.transform(i, m), g());
|
|
3433
3443
|
}
|
|
3434
|
-
function
|
|
3444
|
+
function K(e) {
|
|
3435
3445
|
let t = M.value;
|
|
3436
3446
|
if (!t) return;
|
|
3437
3447
|
let n = new Set(e.map((e) => e.key));
|
|
3438
|
-
for (let [e, t] of
|
|
3439
|
-
let r =
|
|
3448
|
+
for (let [e, t] of ge) n.has(e) || (t.remove(), ge.delete(e));
|
|
3449
|
+
let r = Xe.value, i = J.value + 1.5;
|
|
3440
3450
|
for (let { item: n, feature: a, key: o } of e) {
|
|
3441
|
-
let e =
|
|
3442
|
-
e || (e = document.createElementNS(
|
|
3451
|
+
let e = ge.get(o);
|
|
3452
|
+
e || (e = document.createElementNS(yr, "path"), e.setAttribute("d", r(a) ?? ""), e.setAttribute("fill", "none"), e.setAttribute("pointer-events", "none"), e.setAttribute("vector-effect", "non-scaling-stroke"), e.setAttribute("stroke-linejoin", "round"), e.setAttribute("class", "focus-overlay"), t.appendChild(e), ge.set(o, e)), e.setAttribute("stroke", n.stroke ?? "#fff"), e.setAttribute("stroke-width", String(i)), yt(e, n.style);
|
|
3443
3453
|
}
|
|
3444
3454
|
}
|
|
3445
|
-
function
|
|
3446
|
-
if (!
|
|
3447
|
-
Z.value.length > 0 &&
|
|
3448
|
-
let e =
|
|
3449
|
-
e.interrupt(),
|
|
3455
|
+
function Ie() {
|
|
3456
|
+
if (!A.value || !V) return;
|
|
3457
|
+
Z.value.length > 0 && D("update:focus", null);
|
|
3458
|
+
let e = ce(A.value);
|
|
3459
|
+
e.interrupt(), vt(), e.transition().duration(Sr).call(V.transform, se);
|
|
3450
3460
|
}
|
|
3451
|
-
|
|
3461
|
+
T(() => f.focusZoomLevel, () => {
|
|
3452
3462
|
V && V.scaleExtent([1, Math.max(12, f.focusZoomLevel)]), W();
|
|
3453
|
-
}),
|
|
3454
|
-
if (!
|
|
3455
|
-
let e =
|
|
3463
|
+
}), T(() => f.state, () => {
|
|
3464
|
+
if (!A.value || !V) return;
|
|
3465
|
+
let e = ce(A.value);
|
|
3456
3466
|
e.interrupt(), V.transform(e, se);
|
|
3457
3467
|
});
|
|
3458
|
-
let
|
|
3468
|
+
let Le = n(() => f.width && f.height ? f.height / f.width : .625), Re = n(() => Cr), ze = n(() => Cr * Le.value), Ve = n(() => {
|
|
3459
3469
|
let e = S(f.topology), t = e?.objects?.states;
|
|
3460
3470
|
if (!t) return [];
|
|
3461
|
-
let n =
|
|
3471
|
+
let n = le(e, t);
|
|
3462
3472
|
return n.type === "FeatureCollection" ? n.features : [n];
|
|
3463
|
-
}),
|
|
3473
|
+
}), He = n(() => {
|
|
3464
3474
|
let e = f.state?.trim();
|
|
3465
3475
|
if (!e) return null;
|
|
3466
3476
|
if (/^\d{1,2}$/.test(e)) return e.padStart(2, "0");
|
|
3467
|
-
let t =
|
|
3477
|
+
let t = Ve.value.find((t) => t.properties?.name === e);
|
|
3468
3478
|
return t?.id == null ? null : String(t.id).padStart(2, "0");
|
|
3469
|
-
}),
|
|
3470
|
-
let e =
|
|
3471
|
-
return e ?
|
|
3479
|
+
}), Ue = n(() => {
|
|
3480
|
+
let e = He.value;
|
|
3481
|
+
return e ? Ve.value.find((t) => String(t.id).padStart(2, "0") === e) ?? null : null;
|
|
3472
3482
|
});
|
|
3473
|
-
|
|
3483
|
+
T(() => [f.state, He.value], ([e, t]) => {
|
|
3474
3484
|
e && e.trim() && !t && console.warn(`[ChoroplethMap] state="${e}" matched no state name or FIPS code; rendering the full map.`);
|
|
3475
3485
|
}, { immediate: !0 });
|
|
3476
|
-
let
|
|
3477
|
-
function
|
|
3478
|
-
return
|
|
3486
|
+
let We = v(null), Ge = null;
|
|
3487
|
+
function Ke() {
|
|
3488
|
+
return Ge ||= import("./hsaMapping-BahYDmea.js").then((e) => e.n).then((e) => (We.value = e, e)), Ge;
|
|
3479
3489
|
}
|
|
3480
|
-
|
|
3490
|
+
T(() => {
|
|
3481
3491
|
if (f.geoType === "hsas" || f.dataGeoType === "hsas") return !0;
|
|
3482
3492
|
let e = f.focus;
|
|
3483
3493
|
return e ? (Array.isArray(e) ? e : [e]).some((e) => typeof e != "string" && e.geoType === "hsas") : !1;
|
|
3484
3494
|
}, (e) => {
|
|
3485
|
-
e &&
|
|
3495
|
+
e && Ke();
|
|
3486
3496
|
}, { immediate: !0 });
|
|
3487
|
-
let
|
|
3488
|
-
let e =
|
|
3497
|
+
let qe = n(() => {
|
|
3498
|
+
let e = We.value;
|
|
3489
3499
|
if (!e) return {
|
|
3490
3500
|
type: "FeatureCollection",
|
|
3491
3501
|
features: []
|
|
3492
3502
|
};
|
|
3493
|
-
let { fipsToHsa: t, hsaNames: n } = e, r = S(f.topology), i = r.objects.counties.geometries, a =
|
|
3503
|
+
let { fipsToHsa: t, hsaNames: n } = e, r = S(f.topology), i = r.objects.counties.geometries, a = He.value, o = /* @__PURE__ */ new Map();
|
|
3494
3504
|
for (let e of i) {
|
|
3495
3505
|
let n = String(e.id).padStart(5, "0");
|
|
3496
3506
|
if (a && n.slice(0, 2) !== a) continue;
|
|
@@ -3502,62 +3512,62 @@ var Bt = {
|
|
|
3502
3512
|
type: "Feature",
|
|
3503
3513
|
id: e,
|
|
3504
3514
|
properties: { name: n[e] ?? e },
|
|
3505
|
-
geometry:
|
|
3515
|
+
geometry: I(r, t)
|
|
3506
3516
|
});
|
|
3507
3517
|
return {
|
|
3508
3518
|
type: "FeatureCollection",
|
|
3509
3519
|
features: s
|
|
3510
3520
|
};
|
|
3511
|
-
}),
|
|
3512
|
-
if (f.geoType === "hsas") return
|
|
3513
|
-
let e =
|
|
3521
|
+
}), Je = n(() => {
|
|
3522
|
+
if (f.geoType === "hsas") return qe.value;
|
|
3523
|
+
let e = He.value;
|
|
3514
3524
|
if (f.geoType === "counties") {
|
|
3515
|
-
let t = S(f.topology), n =
|
|
3525
|
+
let t = S(f.topology), n = le(t, t.objects.counties);
|
|
3516
3526
|
return e ? {
|
|
3517
3527
|
type: "FeatureCollection",
|
|
3518
3528
|
features: n.features.filter((t) => String(t.id).padStart(5, "0").slice(0, 2) === e)
|
|
3519
3529
|
} : n;
|
|
3520
3530
|
}
|
|
3521
|
-
let t = S(f.topology), n =
|
|
3531
|
+
let t = S(f.topology), n = le(t, t.objects.states);
|
|
3522
3532
|
return e ? {
|
|
3523
3533
|
type: "FeatureCollection",
|
|
3524
3534
|
features: n.features.filter((t) => String(t.id).padStart(2, "0") === e)
|
|
3525
3535
|
} : n;
|
|
3526
|
-
}),
|
|
3536
|
+
}), Ye = n(() => {
|
|
3527
3537
|
if (f.geoType !== "counties" && f.geoType !== "hsas") return null;
|
|
3528
|
-
if (
|
|
3538
|
+
if (He.value) return Ue.value;
|
|
3529
3539
|
let e = S(f.topology);
|
|
3530
3540
|
return ue(e, e.objects.states, (e, t) => e !== t);
|
|
3531
3541
|
}), q = n(() => {
|
|
3532
|
-
let e =
|
|
3533
|
-
if (
|
|
3534
|
-
let t = [[
|
|
3535
|
-
return Number.isFinite(r[0]) && Number.isFinite(r[1]) ? n :
|
|
3542
|
+
let e = Ue.value;
|
|
3543
|
+
if (He.value && e) {
|
|
3544
|
+
let t = [[wr, wr], [Re.value - wr, ze.value - wr]], n = ae().fitExtent(t, e), r = oe(n).centroid(e);
|
|
3545
|
+
return Number.isFinite(r[0]) && Number.isFinite(r[1]) ? n : P().fitExtent(t, e);
|
|
3536
3546
|
}
|
|
3537
|
-
return
|
|
3538
|
-
}),
|
|
3547
|
+
return ae().fitExtent([[0, 0], [Re.value, ze.value]], Je.value);
|
|
3548
|
+
}), Xe = n(() => oe(q.value)), J = n(() => f.geoType === "counties" || f.geoType === "hsas" ? f.strokeWidth * .5 : f.strokeWidth), Y = n(() => {
|
|
3539
3549
|
let e = /* @__PURE__ */ new Map();
|
|
3540
|
-
for (let [t, n] of
|
|
3550
|
+
for (let [t, n] of Qe.value) {
|
|
3541
3551
|
let r = /* @__PURE__ */ new Map();
|
|
3542
3552
|
for (let [e, t] of n) t.properties?.name != null && r.set(t.properties.name, e);
|
|
3543
3553
|
e.set(t, r);
|
|
3544
3554
|
}
|
|
3545
3555
|
return e;
|
|
3546
3556
|
});
|
|
3547
|
-
function
|
|
3557
|
+
function Ze(e) {
|
|
3548
3558
|
let t = f.dataGeoType;
|
|
3549
3559
|
if (!t || t === f.geoType) return e;
|
|
3550
|
-
if (f.geoType === "counties" && t === "hsas") return
|
|
3560
|
+
if (f.geoType === "counties" && t === "hsas") return We.value?.fipsToHsa[e];
|
|
3551
3561
|
if (f.geoType === "counties" && t === "states" || f.geoType === "hsas" && t === "states") return e.slice(0, 2);
|
|
3552
3562
|
}
|
|
3553
3563
|
let X = n(() => {
|
|
3554
3564
|
let e = /* @__PURE__ */ new Map();
|
|
3555
|
-
for (let t of
|
|
3565
|
+
for (let t of Je.value.features) t.id != null && e.set(String(t.id), t);
|
|
3556
3566
|
return e;
|
|
3557
3567
|
}), Z = n(() => {
|
|
3558
3568
|
let e = f.focus;
|
|
3559
3569
|
return e == null ? [] : (Array.isArray(e) ? e : [e]).map((e) => typeof e == "string" ? { id: e } : e);
|
|
3560
|
-
}),
|
|
3570
|
+
}), Qe = n(() => {
|
|
3561
3571
|
let e = /* @__PURE__ */ new Map();
|
|
3562
3572
|
e.set(f.geoType, X.value);
|
|
3563
3573
|
let t = S(f.topology), n = t?.objects;
|
|
@@ -3568,15 +3578,15 @@ var Bt = {
|
|
|
3568
3578
|
return t;
|
|
3569
3579
|
};
|
|
3570
3580
|
if (!e.has("states") && n.states) {
|
|
3571
|
-
let i =
|
|
3581
|
+
let i = le(t, n.states);
|
|
3572
3582
|
e.set("states", r(i.features));
|
|
3573
3583
|
}
|
|
3574
3584
|
if (!e.has("counties") && n.counties) {
|
|
3575
|
-
let i =
|
|
3585
|
+
let i = le(t, n.counties);
|
|
3576
3586
|
e.set("counties", r(i.features));
|
|
3577
3587
|
}
|
|
3578
|
-
return !e.has("hsas") && n.counties && e.set("hsas", r(
|
|
3579
|
-
}),
|
|
3588
|
+
return !e.has("hsas") && n.counties && e.set("hsas", r(qe.value.features)), e;
|
|
3589
|
+
}), $e = n(() => {
|
|
3580
3590
|
let e = /* @__PURE__ */ new Map();
|
|
3581
3591
|
if (!f.data) return e;
|
|
3582
3592
|
let t = f.dataGeoType ?? f.geoType, n = Y.value.get(t);
|
|
@@ -3586,7 +3596,7 @@ var Bt = {
|
|
|
3586
3596
|
r && e.set(r, t.value);
|
|
3587
3597
|
}
|
|
3588
3598
|
return e;
|
|
3589
|
-
}),
|
|
3599
|
+
}), et = n(() => {
|
|
3590
3600
|
if (!f.data || f.data.length === 0) return {
|
|
3591
3601
|
min: 0,
|
|
3592
3602
|
max: 1
|
|
@@ -3603,8 +3613,8 @@ var Bt = {
|
|
|
3603
3613
|
min: 0,
|
|
3604
3614
|
max: 1
|
|
3605
3615
|
};
|
|
3606
|
-
}),
|
|
3607
|
-
function
|
|
3616
|
+
}), tt = n(() => Array.isArray(f.colorScale) && f.colorScale.length > 0 && "value" in f.colorScale[0]), nt = n(() => Array.isArray(f.colorScale) && !tt.value), rt = n(() => nt.value ? "" : f.colorScale?.min ?? "#e5f0fa"), it = n(() => nt.value ? "" : f.colorScale?.max ?? "#08519c");
|
|
3617
|
+
function at(e) {
|
|
3608
3618
|
let t = e.replace("#", "");
|
|
3609
3619
|
return [
|
|
3610
3620
|
parseInt(t.slice(0, 2), 16),
|
|
@@ -3612,354 +3622,356 @@ var Bt = {
|
|
|
3612
3622
|
parseInt(t.slice(4, 6), 16)
|
|
3613
3623
|
];
|
|
3614
3624
|
}
|
|
3615
|
-
function
|
|
3616
|
-
let [t, n, r] = rt
|
|
3625
|
+
function ot(e) {
|
|
3626
|
+
let [t, n, r] = at(rt.value), [i, a, o] = at(it.value);
|
|
3617
3627
|
return `rgb(${Math.round(t + (i - t) * e)},${Math.round(n + (a - n) * e)},${Math.round(r + (o - r) * e)})`;
|
|
3618
3628
|
}
|
|
3619
|
-
let
|
|
3620
|
-
if (
|
|
3629
|
+
let st = n(() => nt.value ? f.colorScale.slice().sort((e, t) => t.min - e.min) : null), ct = n(() => {
|
|
3630
|
+
if (!tt.value) return null;
|
|
3621
3631
|
let e = /* @__PURE__ */ new Map();
|
|
3622
3632
|
for (let t of f.colorScale) e.set(t.value, t.color);
|
|
3623
3633
|
return e;
|
|
3624
3634
|
});
|
|
3625
|
-
function
|
|
3626
|
-
let t =
|
|
3627
|
-
return t == null ? void 0 :
|
|
3635
|
+
function lt(e) {
|
|
3636
|
+
let t = Ze(e);
|
|
3637
|
+
return t == null ? void 0 : $e.value.get(t);
|
|
3628
3638
|
}
|
|
3629
|
-
function
|
|
3630
|
-
let t =
|
|
3639
|
+
function ut(e) {
|
|
3640
|
+
let t = lt(e), n = f.noDataColor;
|
|
3631
3641
|
if (t == null) return n;
|
|
3632
|
-
let r =
|
|
3642
|
+
let r = ct.value;
|
|
3633
3643
|
if (r) return r.get(String(t)) ?? n;
|
|
3634
|
-
let i =
|
|
3644
|
+
let i = st.value;
|
|
3635
3645
|
if (i) {
|
|
3636
3646
|
let e = t;
|
|
3637
3647
|
for (let t of i) if (e >= t.min) return t.color;
|
|
3638
3648
|
return n;
|
|
3639
3649
|
}
|
|
3640
|
-
let { min: a, max: o } =
|
|
3641
|
-
return
|
|
3650
|
+
let { min: a, max: o } = et.value;
|
|
3651
|
+
return ot((t - a) / (o - a));
|
|
3642
3652
|
}
|
|
3643
|
-
let
|
|
3644
|
-
function
|
|
3645
|
-
return e == null ? "" : typeof e == "number" && f.tooltipValueFormat !== void 0 ?
|
|
3653
|
+
let dt = (e) => e.properties?.name ?? String(e.id);
|
|
3654
|
+
function ft(e) {
|
|
3655
|
+
return e == null ? "" : typeof e == "number" && f.tooltipValueFormat !== void 0 ? ne(e, f.tooltipValueFormat) : String(e);
|
|
3646
3656
|
}
|
|
3647
|
-
function
|
|
3648
|
-
return t == null ? e : `${e}: ${
|
|
3657
|
+
function pt(e, t) {
|
|
3658
|
+
return t == null ? e : `${e}: ${ft(t)}`;
|
|
3649
3659
|
}
|
|
3650
|
-
function
|
|
3660
|
+
function mt() {
|
|
3651
3661
|
let e = N.value?.getEl();
|
|
3652
3662
|
if (!e) return;
|
|
3653
|
-
|
|
3663
|
+
ye?.disconnect();
|
|
3654
3664
|
let t = !1;
|
|
3655
|
-
|
|
3665
|
+
ye = new ResizeObserver((e) => {
|
|
3656
3666
|
let n = e[0]?.contentRect;
|
|
3657
|
-
n && (
|
|
3658
|
-
}),
|
|
3667
|
+
n && (be.width = n.width, be.height = n.height, !t && Se && xe ? (t = !0, ht(xe.x, xe.y)) : t = !0);
|
|
3668
|
+
}), ye.observe(e);
|
|
3659
3669
|
}
|
|
3660
|
-
function
|
|
3670
|
+
function ht(e, t) {
|
|
3661
3671
|
let n = N.value?.getEl();
|
|
3662
3672
|
if (!n) return;
|
|
3663
|
-
let r =
|
|
3673
|
+
let r = k.value?.getBoundingClientRect(), { left: i, top: a } = je(e, t, be.width, be.height, f.tooltipClamp, r);
|
|
3664
3674
|
n.style.transform = `translate3d(${i}px, ${a}px, 0) translateY(-50%)`;
|
|
3665
3675
|
}
|
|
3666
|
-
function
|
|
3667
|
-
let r =
|
|
3676
|
+
function gt(e, t, n) {
|
|
3677
|
+
let r = me.get(e);
|
|
3668
3678
|
if (!r) return;
|
|
3669
3679
|
let i = N.value, a = i?.getEl();
|
|
3670
|
-
!i || !a || (i.setData(r),
|
|
3680
|
+
!i || !a || (i.setData(r), xe = {
|
|
3671
3681
|
x: t,
|
|
3672
3682
|
y: n
|
|
3673
|
-
},
|
|
3683
|
+
}, Se = !0, ht(t, n), a.style.visibility = "visible");
|
|
3674
3684
|
}
|
|
3675
|
-
function
|
|
3676
|
-
|
|
3677
|
-
|
|
3685
|
+
function _t(e, t) {
|
|
3686
|
+
Se && (we = e, Te = t, !Ee && (Ee = requestAnimationFrame(() => {
|
|
3687
|
+
Ee = 0;
|
|
3678
3688
|
let e = N.value?.getEl();
|
|
3679
|
-
!e || !
|
|
3680
|
-
x:
|
|
3681
|
-
y:
|
|
3682
|
-
}, e.style.transform = `translate3d(${
|
|
3689
|
+
!e || !Se || (xe = {
|
|
3690
|
+
x: we,
|
|
3691
|
+
y: Te
|
|
3692
|
+
}, e.style.transform = `translate3d(${we + 16}px, ${Te}px, 0) translateY(-50%)`);
|
|
3683
3693
|
})));
|
|
3684
3694
|
}
|
|
3685
|
-
function
|
|
3686
|
-
if (!
|
|
3687
|
-
|
|
3695
|
+
function vt() {
|
|
3696
|
+
if (!Se) return;
|
|
3697
|
+
Se = !1, xe = null;
|
|
3688
3698
|
let e = N.value?.getEl();
|
|
3689
3699
|
e && (e.style.visibility = "hidden");
|
|
3690
3700
|
}
|
|
3691
|
-
function
|
|
3701
|
+
function yt(e, t) {
|
|
3692
3702
|
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"));
|
|
3693
3703
|
}
|
|
3694
|
-
function
|
|
3695
|
-
e.parentNode?.appendChild(e), e.setAttribute("stroke-width", String(J.value + 1)), e.setAttribute("stroke", "#555"),
|
|
3704
|
+
function Q(e, t = "solid") {
|
|
3705
|
+
e.parentNode?.appendChild(e), e.setAttribute("stroke-width", String(J.value + 1)), e.setAttribute("stroke", "#555"), yt(e, t);
|
|
3696
3706
|
}
|
|
3697
|
-
function
|
|
3707
|
+
function bt(e) {
|
|
3698
3708
|
e.setAttribute("stroke-width", String(J.value)), e.setAttribute("stroke", f.strokeColor), e.removeAttribute("stroke-dasharray"), e.removeAttribute("stroke-linecap");
|
|
3699
3709
|
}
|
|
3700
|
-
function
|
|
3701
|
-
z !== e && (z && !B.has(z) &&
|
|
3710
|
+
function xt(e) {
|
|
3711
|
+
z !== e && (z && !B.has(z) && bt(z), z = e, Q(e, B.get(e) ?? "solid"));
|
|
3702
3712
|
}
|
|
3703
|
-
function
|
|
3713
|
+
function St() {
|
|
3704
3714
|
if (z) {
|
|
3705
3715
|
let e = B.get(z);
|
|
3706
|
-
e == null ?
|
|
3716
|
+
e == null ? bt(z) : Q(z, e), z = null, D("stateHover", null);
|
|
3707
3717
|
}
|
|
3708
|
-
|
|
3718
|
+
vt();
|
|
3709
3719
|
}
|
|
3710
|
-
function
|
|
3720
|
+
function Ct(e) {
|
|
3711
3721
|
let t = e;
|
|
3712
3722
|
for (; t && !t.dataset?.featId;) t = t.parentElement;
|
|
3713
3723
|
return t ? t.dataset.featId ?? null : null;
|
|
3714
3724
|
}
|
|
3715
|
-
function
|
|
3716
|
-
|
|
3725
|
+
function wt(e) {
|
|
3726
|
+
D("stateClick", {
|
|
3717
3727
|
id: e.id,
|
|
3718
3728
|
name: e.name,
|
|
3719
3729
|
value: e.value
|
|
3720
|
-
}),
|
|
3730
|
+
}), D("update:focus", Pe(Z.value).has(e.id) ? null : e.id);
|
|
3721
3731
|
}
|
|
3722
|
-
function
|
|
3723
|
-
if (
|
|
3724
|
-
let t = e, n =
|
|
3732
|
+
function Tt(e) {
|
|
3733
|
+
if (_e) return;
|
|
3734
|
+
let t = e, n = Ct(t.target);
|
|
3725
3735
|
if (!n) return;
|
|
3726
|
-
let r =
|
|
3736
|
+
let r = me.get(n);
|
|
3727
3737
|
if (!r) return;
|
|
3728
3738
|
let i = {
|
|
3729
3739
|
id: r.id,
|
|
3730
3740
|
name: r.name,
|
|
3731
3741
|
value: r.value
|
|
3732
3742
|
};
|
|
3733
|
-
e.type === "click" ?
|
|
3743
|
+
e.type === "click" ? wt(r) : e.type === "mouseover" && (xt(R.get(n)), de.value && gt(n, t.clientX, t.clientY), D("stateHover", i));
|
|
3734
3744
|
}
|
|
3735
|
-
function
|
|
3736
|
-
|
|
3745
|
+
function Et(e) {
|
|
3746
|
+
_e || _t(e.clientX, e.clientY);
|
|
3737
3747
|
}
|
|
3738
|
-
function
|
|
3748
|
+
function Dt(e) {
|
|
3739
3749
|
let t = e.relatedTarget;
|
|
3740
|
-
t &&
|
|
3750
|
+
t && re.value?.contains(t) || St();
|
|
3741
3751
|
}
|
|
3742
|
-
function
|
|
3752
|
+
function Ot(e) {
|
|
3743
3753
|
if (e.touches.length !== 1) {
|
|
3744
|
-
|
|
3754
|
+
De = null;
|
|
3745
3755
|
return;
|
|
3746
3756
|
}
|
|
3747
3757
|
let t = e.touches[0];
|
|
3748
|
-
|
|
3758
|
+
De = {
|
|
3749
3759
|
x: t.clientX,
|
|
3750
3760
|
y: t.clientY,
|
|
3751
3761
|
time: e.timeStamp,
|
|
3752
|
-
featId:
|
|
3762
|
+
featId: Ct(e.target)
|
|
3753
3763
|
};
|
|
3754
3764
|
}
|
|
3755
|
-
function
|
|
3756
|
-
let t =
|
|
3757
|
-
if (
|
|
3765
|
+
function kt(e) {
|
|
3766
|
+
let t = De;
|
|
3767
|
+
if (De = null, !t || !t.featId || e.touches.length > 0) return;
|
|
3758
3768
|
let n = e.changedTouches[0];
|
|
3759
|
-
if (!n || Math.abs(n.clientX - t.x) >
|
|
3760
|
-
let r =
|
|
3761
|
-
r && (e.preventDefault(),
|
|
3769
|
+
if (!n || Math.abs(n.clientX - t.x) > br || Math.abs(n.clientY - t.y) > br || e.timeStamp - t.time > xr) return;
|
|
3770
|
+
let r = me.get(t.featId);
|
|
3771
|
+
r && (e.preventDefault(), wt(r));
|
|
3762
3772
|
}
|
|
3763
|
-
function
|
|
3764
|
-
|
|
3773
|
+
function At() {
|
|
3774
|
+
De = null;
|
|
3765
3775
|
}
|
|
3766
|
-
function
|
|
3767
|
-
let t = document.createElementNS(
|
|
3776
|
+
function jt(e) {
|
|
3777
|
+
let t = document.createElementNS(yr, "path");
|
|
3768
3778
|
return e && t.setAttribute("d", e), t;
|
|
3769
3779
|
}
|
|
3770
|
-
function
|
|
3780
|
+
function Mt() {
|
|
3771
3781
|
let e = j.value, t = M.value;
|
|
3772
3782
|
if (!e || !t) return;
|
|
3773
3783
|
for (; e.firstChild;) e.removeChild(e.firstChild);
|
|
3774
3784
|
for (; t.firstChild;) t.removeChild(t.firstChild);
|
|
3775
|
-
|
|
3776
|
-
let n =
|
|
3785
|
+
R.clear(), me.clear(), he = null, z = null, B.clear(), ge.clear();
|
|
3786
|
+
let n = Xe.value, r = Je.value.features, i = f.strokeColor, a = String(J.value), o = !de.value, s = document.createDocumentFragment();
|
|
3777
3787
|
for (let e of r) {
|
|
3778
|
-
let t = String(e.id), r =
|
|
3779
|
-
if (l.setAttribute("class", "state-path"), l.setAttribute("data-feat-id", t), l.setAttribute("fill",
|
|
3780
|
-
let e = document.createElementNS(
|
|
3781
|
-
e.textContent =
|
|
3788
|
+
let t = String(e.id), r = dt(e), c = lt(t), l = jt(n(e));
|
|
3789
|
+
if (l.setAttribute("class", "state-path"), l.setAttribute("data-feat-id", t), l.setAttribute("fill", ut(t)), l.setAttribute("stroke", i), l.setAttribute("stroke-width", a), l.setAttribute("vector-effect", "non-scaling-stroke"), o) {
|
|
3790
|
+
let e = document.createElementNS(yr, "title");
|
|
3791
|
+
e.textContent = pt(r, c), l.appendChild(e);
|
|
3782
3792
|
}
|
|
3783
|
-
s.appendChild(l),
|
|
3793
|
+
s.appendChild(l), R.set(t, l), me.set(t, {
|
|
3784
3794
|
id: t,
|
|
3785
3795
|
name: r,
|
|
3786
3796
|
value: c,
|
|
3787
3797
|
feature: e
|
|
3788
3798
|
});
|
|
3789
3799
|
}
|
|
3790
|
-
let c =
|
|
3800
|
+
let c = Ye.value;
|
|
3791
3801
|
if (c) {
|
|
3792
|
-
let e =
|
|
3793
|
-
e.setAttribute("fill", "none"), e.setAttribute("stroke", i), e.setAttribute("stroke-width", "1"), e.setAttribute("stroke-linejoin", "round"), e.setAttribute("pointer-events", "none"), e.setAttribute("vector-effect", "non-scaling-stroke"), s.appendChild(e),
|
|
3802
|
+
let e = jt(n(c));
|
|
3803
|
+
e.setAttribute("fill", "none"), e.setAttribute("stroke", i), e.setAttribute("stroke-width", "1"), e.setAttribute("stroke-linejoin", "round"), e.setAttribute("pointer-events", "none"), e.setAttribute("vector-effect", "non-scaling-stroke"), s.appendChild(e), he = e;
|
|
3794
3804
|
}
|
|
3795
3805
|
e.appendChild(s);
|
|
3796
3806
|
}
|
|
3797
|
-
function
|
|
3798
|
-
let e = !
|
|
3799
|
-
for (let [t, n] of
|
|
3800
|
-
let r =
|
|
3801
|
-
if (n.setAttribute("fill",
|
|
3807
|
+
function Nt() {
|
|
3808
|
+
let e = !de.value;
|
|
3809
|
+
for (let [t, n] of R) {
|
|
3810
|
+
let r = lt(t), i = me.get(t);
|
|
3811
|
+
if (n.setAttribute("fill", ut(t)), i && (i.value = r), e && i) {
|
|
3802
3812
|
let e = n.firstElementChild;
|
|
3803
|
-
e && (e.textContent =
|
|
3813
|
+
e && (e.textContent = pt(i.name, r));
|
|
3804
3814
|
}
|
|
3805
3815
|
}
|
|
3806
3816
|
}
|
|
3807
|
-
function
|
|
3808
|
-
for (let e of
|
|
3809
|
-
|
|
3817
|
+
function Pt() {
|
|
3818
|
+
for (let e of R.values()) e === z || B.has(e) || bt(e);
|
|
3819
|
+
he && he.setAttribute("stroke", f.strokeColor);
|
|
3810
3820
|
}
|
|
3811
|
-
function
|
|
3821
|
+
function Ft() {
|
|
3812
3822
|
return typeof f.menu == "string" ? f.menu : "choropleth";
|
|
3813
3823
|
}
|
|
3814
|
-
let
|
|
3824
|
+
let $ = n(() => f.legend && (tt.value || nt.value || f.data)), It = n(() => f.colorScale.slice().sort((e, t) => e.min - t.min)), Lt = n(() => {
|
|
3815
3825
|
let e = [];
|
|
3816
3826
|
for (let t = 0; t <= 10; t++) {
|
|
3817
3827
|
let n = t / 10;
|
|
3818
3828
|
e.push({
|
|
3819
3829
|
offset: `${(n * 100).toFixed(0)}%`,
|
|
3820
|
-
color:
|
|
3830
|
+
color: ot(n)
|
|
3821
3831
|
});
|
|
3822
3832
|
}
|
|
3823
3833
|
return e;
|
|
3824
|
-
}),
|
|
3834
|
+
}), Rt = new Intl.NumberFormat("en-US", {
|
|
3825
3835
|
notation: "compact",
|
|
3826
3836
|
maximumFractionDigits: 1
|
|
3827
|
-
}),
|
|
3828
|
-
let { min: e, max: t } =
|
|
3837
|
+
}), zt = n(() => {
|
|
3838
|
+
let { min: e, max: t } = et.value, n = t - e, r = [];
|
|
3829
3839
|
for (let t = 1; t <= 3; t++) {
|
|
3830
|
-
let i = t / 4, a = e + n * i, o = Math.abs(a) >= 1e3 ?
|
|
3840
|
+
let i = t / 4, a = e + n * i, o = Math.abs(a) >= 1e3 ? Rt.format(a) : Number.isInteger(a) ? String(a) : a.toFixed(1).replace(/\.0$/, "");
|
|
3831
3841
|
r.push({
|
|
3832
3842
|
value: o,
|
|
3833
3843
|
pct: i * 100
|
|
3834
3844
|
});
|
|
3835
3845
|
}
|
|
3836
3846
|
return r;
|
|
3837
|
-
}),
|
|
3847
|
+
}), Bt = n(() => {
|
|
3838
3848
|
let e = [];
|
|
3839
|
-
if (
|
|
3849
|
+
if (tt.value) for (let t of f.colorScale) e.push({
|
|
3840
3850
|
key: t.value,
|
|
3841
3851
|
color: t.color,
|
|
3842
3852
|
label: t.value
|
|
3843
3853
|
});
|
|
3844
|
-
else if (
|
|
3854
|
+
else if (nt.value) for (let t of It.value) e.push({
|
|
3845
3855
|
key: String(t.min),
|
|
3846
3856
|
color: t.color,
|
|
3847
3857
|
label: t.label ?? String(t.min)
|
|
3848
3858
|
});
|
|
3849
3859
|
return e;
|
|
3850
|
-
}),
|
|
3851
|
-
let e =
|
|
3860
|
+
}), Vt = n(() => `linear-gradient(to right, ${Lt.value.map((e) => `${e.color} ${e.offset}`).join(", ")})`), Ht = Be({ target: () => f.fullscreenTarget }), Ut = n(() => {
|
|
3861
|
+
let e = Ft();
|
|
3852
3862
|
return [
|
|
3853
|
-
|
|
3863
|
+
Ht.menuItem.value,
|
|
3854
3864
|
{
|
|
3855
3865
|
label: "Save as SVG",
|
|
3856
3866
|
action: () => {
|
|
3857
|
-
|
|
3867
|
+
A.value && Fe(A.value, e);
|
|
3858
3868
|
}
|
|
3859
3869
|
},
|
|
3860
3870
|
{
|
|
3861
3871
|
label: "Save as PNG",
|
|
3862
3872
|
action: () => {
|
|
3863
|
-
|
|
3873
|
+
A.value && G(A.value, e);
|
|
3864
3874
|
}
|
|
3865
3875
|
}
|
|
3866
3876
|
];
|
|
3867
3877
|
});
|
|
3868
|
-
return
|
|
3869
|
-
Ke.value,
|
|
3878
|
+
return T(() => [
|
|
3870
3879
|
Je.value,
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3880
|
+
Xe.value,
|
|
3881
|
+
de.value
|
|
3882
|
+
], () => Mt()), T(() => [
|
|
3883
|
+
$e.value,
|
|
3874
3884
|
f.colorScale,
|
|
3875
3885
|
f.noDataColor,
|
|
3876
3886
|
f.dataGeoType
|
|
3877
|
-
], () =>
|
|
3887
|
+
], () => Nt()), T(() => [f.strokeColor, J.value], () => Pt()), T(() => [
|
|
3878
3888
|
Z.value,
|
|
3879
|
-
|
|
3880
|
-
|
|
3889
|
+
Xe.value,
|
|
3890
|
+
We.value
|
|
3881
3891
|
], () => W(), { flush: "post" }), (n, l) => (_(), r(t, {
|
|
3882
|
-
to: C(
|
|
3883
|
-
disabled: !C(
|
|
3892
|
+
to: C(Ht).teleportTarget.value,
|
|
3893
|
+
disabled: !C(Ht).isFullscreen.value
|
|
3884
3894
|
}, [o("div", d({
|
|
3885
3895
|
ref_key: "containerRef",
|
|
3886
|
-
ref:
|
|
3896
|
+
ref: k
|
|
3887
3897
|
}, n.$attrs, {
|
|
3888
3898
|
class: ["choropleth-wrapper", {
|
|
3889
3899
|
pannable: c.pan,
|
|
3890
|
-
"is-fullscreen": C(
|
|
3900
|
+
"is-fullscreen": C(Ht).isFullscreen.value
|
|
3891
3901
|
}],
|
|
3892
|
-
style: C(
|
|
3902
|
+
style: C(Ht).fullscreenStyle.value,
|
|
3903
|
+
role: w.value || void 0,
|
|
3904
|
+
"aria-label": ee.value || void 0
|
|
3893
3905
|
}), [
|
|
3894
3906
|
c.menu ? (_(), r(pe, {
|
|
3895
3907
|
key: 0,
|
|
3896
|
-
items:
|
|
3897
|
-
"is-fullscreen": C(
|
|
3898
|
-
onClose: C(
|
|
3908
|
+
items: Ut.value,
|
|
3909
|
+
"is-fullscreen": C(Ht).isFullscreen.value,
|
|
3910
|
+
onClose: C(Ht).exit
|
|
3899
3911
|
}, null, 8, [
|
|
3900
3912
|
"items",
|
|
3901
3913
|
"is-fullscreen",
|
|
3902
3914
|
"onClose"
|
|
3903
3915
|
])) : i("", !0),
|
|
3904
|
-
o("div",
|
|
3905
|
-
c.title ||
|
|
3916
|
+
o("div", fr, x(C(Ht).isFullscreen.value ? "Map expanded to fill window" : ""), 1),
|
|
3917
|
+
c.title || $.value ? (_(), a("div", pr, [c.title ? (_(), a("div", {
|
|
3906
3918
|
key: 0,
|
|
3907
3919
|
class: "choropleth-title",
|
|
3908
|
-
style: m(
|
|
3909
|
-
}, x(c.title), 5)) : i("", !0),
|
|
3920
|
+
style: m(L.value)
|
|
3921
|
+
}, x(c.title), 5)) : i("", !0), $.value ? (_(), a("div", {
|
|
3910
3922
|
key: 1,
|
|
3911
3923
|
class: "choropleth-legend",
|
|
3912
|
-
style: m(
|
|
3913
|
-
}, [c.legendTitle ? (_(), a("span",
|
|
3924
|
+
style: m(fe.value)
|
|
3925
|
+
}, [c.legendTitle ? (_(), a("span", mr, x(c.legendTitle), 1)) : i("", !0), tt.value || nt.value ? (_(!0), a(e, { key: 1 }, y(Bt.value, (e) => (_(), a("span", {
|
|
3914
3926
|
key: e.key,
|
|
3915
3927
|
class: "choropleth-legend-item"
|
|
3916
3928
|
}, [o("span", {
|
|
3917
3929
|
class: "choropleth-legend-swatch",
|
|
3918
3930
|
style: m({ background: e.color })
|
|
3919
|
-
}, null, 4), s(" " + x(e.label), 1)]))), 128)) : (_(), a("div",
|
|
3931
|
+
}, null, 4), s(" " + x(e.label), 1)]))), 128)) : (_(), a("div", hr, [o("div", {
|
|
3920
3932
|
class: "choropleth-legend-gradient",
|
|
3921
|
-
style: m({ background:
|
|
3922
|
-
}, null, 4), o("div",
|
|
3933
|
+
style: m({ background: Vt.value })
|
|
3934
|
+
}, null, 4), o("div", gr, [(_(!0), a(e, null, y(zt.value, (e) => (_(), a("span", {
|
|
3923
3935
|
key: e.value,
|
|
3924
3936
|
style: m({ left: e.pct + "%" })
|
|
3925
3937
|
}, x(e.value), 5))), 128))])]))], 4)) : i("", !0)])) : i("", !0),
|
|
3926
3938
|
(_(), a("svg", {
|
|
3927
3939
|
ref_key: "svgRef",
|
|
3928
|
-
ref:
|
|
3929
|
-
viewBox: `0 0 ${
|
|
3940
|
+
ref: A,
|
|
3941
|
+
viewBox: `0 0 ${Re.value} ${ze.value}`,
|
|
3930
3942
|
preserveAspectRatio: "xMidYMid meet",
|
|
3931
3943
|
style: m(c.twoFingerPan ? { touchAction: "pan-y" } : void 0)
|
|
3932
3944
|
}, [o("g", {
|
|
3933
3945
|
ref_key: "mapGroupRef",
|
|
3934
|
-
ref:
|
|
3946
|
+
ref: re
|
|
3935
3947
|
}, [o("g", {
|
|
3936
3948
|
ref_key: "baseGroupRef",
|
|
3937
3949
|
ref: j
|
|
3938
3950
|
}, null, 512), o("g", {
|
|
3939
3951
|
ref_key: "overlayGroupRef",
|
|
3940
3952
|
ref: M
|
|
3941
|
-
}, null, 512)], 512)], 12,
|
|
3942
|
-
|
|
3953
|
+
}, null, 512)], 512)], 12, _r)),
|
|
3954
|
+
Ce.value ? (_(), a("button", {
|
|
3943
3955
|
key: 2,
|
|
3944
3956
|
type: "button",
|
|
3945
3957
|
class: "choropleth-reset",
|
|
3946
3958
|
"aria-label": "Reset zoom",
|
|
3947
|
-
onClick:
|
|
3959
|
+
onClick: Ie
|
|
3948
3960
|
}, " Reset ")) : i("", !0),
|
|
3949
|
-
|
|
3961
|
+
de.value ? (_(), r(ur, {
|
|
3950
3962
|
key: 3,
|
|
3951
3963
|
ref_key: "tooltipChildRef",
|
|
3952
3964
|
ref: N
|
|
3953
3965
|
}, {
|
|
3954
|
-
default:
|
|
3966
|
+
default: E((t) => [b(n.$slots, "tooltip", p(u(O(t))), () => [c.tooltipFormat ? (_(), a("span", {
|
|
3955
3967
|
key: 0,
|
|
3956
3968
|
innerHTML: c.tooltipFormat(t)
|
|
3957
|
-
}, null, 8,
|
|
3969
|
+
}, null, 8, vr)) : t.value == null ? (_(), a(e, { key: 1 }, [s(x(t.name), 1)], 64)) : (_(), a(e, { key: 2 }, [s(x(t.name) + ": " + x(ft(t.value)), 1)], 64))], !0)]),
|
|
3958
3970
|
_: 3
|
|
3959
3971
|
}, 512)) : i("", !0)
|
|
3960
|
-
], 16)], 8, ["to", "disabled"]));
|
|
3972
|
+
], 16, dr)], 8, ["to", "disabled"]));
|
|
3961
3973
|
}
|
|
3962
|
-
}), [["__scopeId", "data-v-
|
|
3974
|
+
}), [["__scopeId", "data-v-7bd9e073"]]), Er = /* @__PURE__ */ L(/* @__PURE__ */ l({
|
|
3963
3975
|
__name: "ChartTooltip",
|
|
3964
3976
|
props: {
|
|
3965
3977
|
x: {},
|
|
@@ -3979,12 +3991,12 @@ var Bt = {
|
|
|
3979
3991
|
top: `${e.y}px`,
|
|
3980
3992
|
transform: "translateY(-50%)"
|
|
3981
3993
|
})
|
|
3982
|
-
}, [b(t.$slots, "default", {}, void 0, !0)], 4)) : e.mode === "click" ? (_(), r(C(
|
|
3994
|
+
}, [b(t.$slots, "default", {}, void 0, !0)], 4)) : e.mode === "click" ? (_(), r(C(ie), {
|
|
3983
3995
|
key: 1,
|
|
3984
3996
|
open: e.open
|
|
3985
3997
|
}, {
|
|
3986
|
-
default:
|
|
3987
|
-
default:
|
|
3998
|
+
default: E(() => [c(C(j), { "as-child": "" }, {
|
|
3999
|
+
default: E(() => [o("div", {
|
|
3988
4000
|
class: "chart-tooltip-anchor",
|
|
3989
4001
|
style: m({
|
|
3990
4002
|
left: `${e.x}px`,
|
|
@@ -3992,8 +4004,8 @@ var Bt = {
|
|
|
3992
4004
|
})
|
|
3993
4005
|
}, null, 4)]),
|
|
3994
4006
|
_: 1
|
|
3995
|
-
}), c(C(
|
|
3996
|
-
default:
|
|
4007
|
+
}), c(C(N), null, {
|
|
4008
|
+
default: E(() => [e.open ? (_(), r(C(M), {
|
|
3997
4009
|
key: 0,
|
|
3998
4010
|
class: "chart-tooltip-content",
|
|
3999
4011
|
side: "right",
|
|
@@ -4002,7 +4014,7 @@ var Bt = {
|
|
|
4002
4014
|
onPointerDownOutside: n[0] ||= (e) => t.$emit("close"),
|
|
4003
4015
|
onEscapeKeyDown: n[1] ||= (e) => t.$emit("close")
|
|
4004
4016
|
}, {
|
|
4005
|
-
default:
|
|
4017
|
+
default: E(() => [b(t.$slots, "default", {}, void 0, !0)]),
|
|
4006
4018
|
_: 3
|
|
4007
4019
|
}, 8, ["side-offset"])) : i("", !0)]),
|
|
4008
4020
|
_: 3
|
|
@@ -4010,7 +4022,7 @@ var Bt = {
|
|
|
4010
4022
|
_: 3
|
|
4011
4023
|
}, 8, ["open"])) : i("", !0);
|
|
4012
4024
|
}
|
|
4013
|
-
}), [["__scopeId", "data-v-44377f70"]]),
|
|
4025
|
+
}), [["__scopeId", "data-v-44377f70"]]), Dr = { class: "TableWrapper" }, Or = ["href", "download"], kr = /* @__PURE__ */ L(/* @__PURE__ */ l({
|
|
4014
4026
|
__name: "DataTable",
|
|
4015
4027
|
props: {
|
|
4016
4028
|
data: {},
|
|
@@ -4094,47 +4106,47 @@ var Bt = {
|
|
|
4094
4106
|
let r = c.columnConfig?.[e.name]?.format;
|
|
4095
4107
|
if (r !== void 0) {
|
|
4096
4108
|
if (typeof r == "function") return r(n, t);
|
|
4097
|
-
if (typeof n == "number") return
|
|
4109
|
+
if (typeof n == "number") return ne(n, r);
|
|
4098
4110
|
}
|
|
4099
4111
|
return e.enumLabels && typeof n == "number" ? e.enumLabels[n] ?? String(n) : typeof n == "number" ? Number.isInteger(n) ? n.toString() : n.toFixed(4) : typeof n == "boolean" ? n ? "true" : "false" : String(n);
|
|
4100
4112
|
}
|
|
4101
4113
|
function C() {
|
|
4102
4114
|
return c.filename ? c.filename : typeof c.menu == "string" ? c.menu : "data";
|
|
4103
4115
|
}
|
|
4104
|
-
function
|
|
4116
|
+
function te(e) {
|
|
4105
4117
|
return e.includes(",") || e.includes("\"") || e.includes("\n") ? `"${e.replace(/"/g, "\"\"")}"` : e;
|
|
4106
4118
|
}
|
|
4107
|
-
function
|
|
4119
|
+
function w() {
|
|
4108
4120
|
if (typeof c.csv == "function") return c.csv();
|
|
4109
4121
|
if (typeof c.csv == "string") return c.csv;
|
|
4110
|
-
let e = b.value, t = ee.value, n = [e.map((e) =>
|
|
4122
|
+
let e = b.value, t = ee.value, n = [e.map((e) => te(l(e.name))).join(",")];
|
|
4111
4123
|
for (let r = 0; r < t; r++) {
|
|
4112
|
-
let t = e.map((e) =>
|
|
4124
|
+
let t = e.map((e) => te(S(e, r)));
|
|
4113
4125
|
n.push(t.join(","));
|
|
4114
4126
|
}
|
|
4115
4127
|
return n.join("\n");
|
|
4116
4128
|
}
|
|
4117
|
-
function
|
|
4118
|
-
|
|
4129
|
+
function T() {
|
|
4130
|
+
K(w(), C());
|
|
4119
4131
|
}
|
|
4120
|
-
let
|
|
4132
|
+
let E = n(() => c.downloadButton || c.downloadLink ? [] : [{
|
|
4121
4133
|
label: c.downloadMenuLink,
|
|
4122
|
-
action:
|
|
4123
|
-
}]),
|
|
4134
|
+
action: T
|
|
4135
|
+
}]), D = n(() => {
|
|
4124
4136
|
if (c.downloadButton) return null;
|
|
4125
4137
|
let e = c.downloadLink;
|
|
4126
4138
|
return e ? typeof e == "string" ? e : "Download data (CSV)" : null;
|
|
4127
|
-
}),
|
|
4139
|
+
}), O = n(() => D.value ? `data:text/csv;charset=utf-8,${encodeURIComponent(w())}` : null), k = n(() => !!c.menu && E.value.length > 0);
|
|
4128
4140
|
return (n, s) => (_(), a("div", { class: f(["TableOuter", {
|
|
4129
4141
|
"full-width": t.fullWidth,
|
|
4130
|
-
"has-menu":
|
|
4142
|
+
"has-menu": k.value
|
|
4131
4143
|
}]) }, [
|
|
4132
|
-
|
|
4144
|
+
k.value ? (_(), r(pe, {
|
|
4133
4145
|
key: 0,
|
|
4134
|
-
items:
|
|
4146
|
+
items: E.value,
|
|
4135
4147
|
"force-dropdown": ""
|
|
4136
4148
|
}, null, 8, ["items"])) : i("", !0),
|
|
4137
|
-
o("div",
|
|
4149
|
+
o("div", Dr, [o("table", { class: f(["Table", { "full-width": t.fullWidth }]) }, [
|
|
4138
4150
|
o("colgroup", null, [(_(!0), a(e, null, y(b.value, (e) => (_(), a("col", {
|
|
4139
4151
|
key: e.name,
|
|
4140
4152
|
style: m(u(e.name))
|
|
@@ -4154,15 +4166,15 @@ var Bt = {
|
|
|
4154
4166
|
key: 1,
|
|
4155
4167
|
type: "button",
|
|
4156
4168
|
class: "data-table-download-button",
|
|
4157
|
-
onClick:
|
|
4158
|
-
}, x(t.downloadMenuLink), 1)) :
|
|
4169
|
+
onClick: T
|
|
4170
|
+
}, x(t.downloadMenuLink), 1)) : D.value ? (_(), a("a", {
|
|
4159
4171
|
key: 2,
|
|
4160
4172
|
class: "data-table-download-link",
|
|
4161
|
-
href:
|
|
4173
|
+
href: O.value,
|
|
4162
4174
|
download: `${C()}.csv`
|
|
4163
|
-
}, x(
|
|
4175
|
+
}, x(D.value), 9, Or)) : i("", !0)
|
|
4164
4176
|
], 2));
|
|
4165
4177
|
}
|
|
4166
4178
|
}), [["__scopeId", "data-v-21721f41"]]);
|
|
4167
4179
|
//#endregion
|
|
4168
|
-
export {
|
|
4180
|
+
export { cr as BarChart, Er as ChartTooltip, Tr as ChoroplethMap, kr as DataTable, Dn as LineChart };
|