@cfasim-ui/charts 0.8.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ChoroplethMap/ChoroplethMap.d.ts +14 -1
- package/dist/ChoroplethMap/cityLayout.d.ts +3 -2
- package/dist/ChoroplethMap/mixedGeo.d.ts +74 -0
- package/dist/ChoroplethMap/mixedGeo.test.d.ts +1 -0
- package/dist/index.css +1 -1
- package/dist/index.js +1234 -1119
- package/docs/ChoroplethMap.md +130 -3
- package/docs/index.json +1 -1
- package/package.json +2 -2
- package/src/ChoroplethMap/ChoroplethMap.md +130 -3
- package/src/ChoroplethMap/ChoroplethMap.vue +183 -81
- package/src/ChoroplethMap/cityLayout.ts +3 -2
- package/src/ChoroplethMap/mixedGeo.ts +201 -0
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Fragment as e, Teleport as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, guardReactiveProps as u, mergeProps as d, nextTick as f, normalizeClass as p, normalizeProps as m, normalizeStyle as h, onMounted as g, onUnmounted as ee, openBlock as _, ref as v, renderList as y, renderSlot as
|
|
1
|
+
import { Fragment as e, Teleport as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, guardReactiveProps as u, mergeProps as d, nextTick as f, normalizeClass as p, normalizeProps as m, normalizeStyle as h, onMounted as g, onUnmounted as ee, openBlock as _, ref as v, renderList as y, renderSlot as b, toDisplayString as x, toHandlers as te, toRaw as S, unref as C, useSlots as w, useTemplateRef as T, watch as E, withCtx as D } from "vue";
|
|
2
2
|
import { formatNumber as ne } from "@cfasim-ui/shared";
|
|
3
3
|
import { DropdownMenuContent as O, DropdownMenuItem as k, DropdownMenuPortal as re, DropdownMenuRoot as ie, DropdownMenuTrigger as A, PopoverAnchor as j, PopoverContent as ae, PopoverPortal as oe, PopoverRoot as se } from "reka-ui";
|
|
4
4
|
import { geoAlbersUsa as M, geoMercator as ce, geoPath as le } from "d3-geo";
|
|
@@ -81,7 +81,7 @@ var ge = ["aria-label"], _e = /*@__PURE__*/ l({
|
|
|
81
81
|
"aria-pressed": e.ariaPressed,
|
|
82
82
|
onSelect: e.action
|
|
83
83
|
}, {
|
|
84
|
-
default: D(() => [s(
|
|
84
|
+
default: D(() => [s(x(e.label), 1)]),
|
|
85
85
|
_: 2
|
|
86
86
|
}, 1032, ["aria-pressed", "onSelect"]))), 128))]),
|
|
87
87
|
_: 1
|
|
@@ -173,7 +173,7 @@ function I(e) {
|
|
|
173
173
|
}
|
|
174
174
|
//#endregion
|
|
175
175
|
//#region src/_shared/useChartSize.ts
|
|
176
|
-
function
|
|
176
|
+
function Ee(e = {}) {
|
|
177
177
|
let t = v(null), n = v(0), r = v(0), i = null, a = null;
|
|
178
178
|
return g(() => {
|
|
179
179
|
t.value && (n.value = t.value.clientWidth, r.value = t.value.clientHeight, i = new ResizeObserver((t) => {
|
|
@@ -192,8 +192,8 @@ function L(e = {}) {
|
|
|
192
192
|
measuredHeight: r
|
|
193
193
|
};
|
|
194
194
|
}
|
|
195
|
-
var
|
|
196
|
-
function
|
|
195
|
+
var De = .6, L = 8;
|
|
196
|
+
function Oe(e, t) {
|
|
197
197
|
return {
|
|
198
198
|
fontSize: e?.fontSize ?? t.fontSize,
|
|
199
199
|
fill: e?.color ?? "currentColor",
|
|
@@ -201,8 +201,8 @@ function De(e, t) {
|
|
|
201
201
|
fillOpacity: e?.color == null ? t.fillOpacity : void 0
|
|
202
202
|
};
|
|
203
203
|
}
|
|
204
|
-
var
|
|
205
|
-
function
|
|
204
|
+
var R = 7, ke = 18, Ae = 16;
|
|
205
|
+
function z(e) {
|
|
206
206
|
return e == null ? {
|
|
207
207
|
top: 0,
|
|
208
208
|
right: 0,
|
|
@@ -220,12 +220,12 @@ function B(e) {
|
|
|
220
220
|
left: e.left ?? 0
|
|
221
221
|
};
|
|
222
222
|
}
|
|
223
|
-
function Ae(e) {
|
|
224
|
-
return Oe + e.length * z;
|
|
225
|
-
}
|
|
226
223
|
function je(e) {
|
|
224
|
+
return ke + e.length * R;
|
|
225
|
+
}
|
|
226
|
+
function Me(e) {
|
|
227
227
|
let t = n(() => {
|
|
228
|
-
let t =
|
|
228
|
+
let t = z(e.extraPadding?.());
|
|
229
229
|
return {
|
|
230
230
|
left: (e.yLabel() ? 56 : 50) + t.left,
|
|
231
231
|
right: 10 + t.right
|
|
@@ -238,11 +238,11 @@ function je(e) {
|
|
|
238
238
|
};
|
|
239
239
|
let n = Math.max(0, r.value), i = [], a = 0, o = 0;
|
|
240
240
|
for (let e of t) {
|
|
241
|
-
let t =
|
|
241
|
+
let t = je(e);
|
|
242
242
|
o > 0 && o + t > n && (a++, o = 0), i.push({
|
|
243
243
|
x: o,
|
|
244
244
|
row: a
|
|
245
|
-
}), o += t +
|
|
245
|
+
}), o += t + Ae;
|
|
246
246
|
}
|
|
247
247
|
return {
|
|
248
248
|
positions: i,
|
|
@@ -252,9 +252,9 @@ function je(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 + L;
|
|
256
256
|
}), o = n(() => {
|
|
257
|
-
let n =
|
|
257
|
+
let n = z(e.extraPadding?.()), r = i.value.rowCount;
|
|
258
258
|
return {
|
|
259
259
|
top: a.value + r * 20 + n.top,
|
|
260
260
|
bottom: (e.xLabel() ? 38 : 30) + n.bottom,
|
|
@@ -283,10 +283,10 @@ function je(e) {
|
|
|
283
283
|
}
|
|
284
284
|
//#endregion
|
|
285
285
|
//#region src/tooltip-position.ts
|
|
286
|
-
var
|
|
287
|
-
function
|
|
286
|
+
var Ne = 16, Pe = 8;
|
|
287
|
+
function B(e, t, n, r, i, a) {
|
|
288
288
|
if (i === "none") return {
|
|
289
|
-
left: e +
|
|
289
|
+
left: e + Ne,
|
|
290
290
|
top: t
|
|
291
291
|
};
|
|
292
292
|
let o = i === "chart" && a ? {
|
|
@@ -299,15 +299,15 @@ function V(e, t, n, r, i, a) {
|
|
|
299
299
|
right: window.innerWidth,
|
|
300
300
|
top: 0,
|
|
301
301
|
bottom: window.innerHeight
|
|
302
|
-
}, s = e +
|
|
302
|
+
}, s = e + Ne + n > o.right - Pe ? e - Ne - n : e + Ne, c = Math.max(o.left + Pe, o.right - Pe - n), l = Math.min(Math.max(s, o.left + Pe), c), u = r / 2;
|
|
303
303
|
return {
|
|
304
304
|
left: l,
|
|
305
|
-
top: Math.min(Math.max(t, o.top +
|
|
305
|
+
top: Math.min(Math.max(t, o.top + Pe + u), o.bottom - Pe - u)
|
|
306
306
|
};
|
|
307
307
|
}
|
|
308
308
|
//#endregion
|
|
309
309
|
//#region src/_shared/useChartTooltip.ts
|
|
310
|
-
function
|
|
310
|
+
function Fe(e) {
|
|
311
311
|
let t = e.touchYOffset ?? 50, n = v(null), r = v(!1), i = v(null), a = v(null), o = v(null), s = null, c = "pending";
|
|
312
312
|
function l(e) {
|
|
313
313
|
return "touches" in e ? e.touches[0] ?? null : e;
|
|
@@ -328,7 +328,7 @@ function Pe(e) {
|
|
|
328
328
|
}
|
|
329
329
|
let s = i.value, c = e.containerRef.value;
|
|
330
330
|
if (!s || !c) return;
|
|
331
|
-
let l = c.getBoundingClientRect(), u = r.value ? t : 0, d = e.clamp?.() ?? "window", { left: f, top: p } =
|
|
331
|
+
let l = c.getBoundingClientRect(), u = r.value ? t : 0, d = e.clamp?.() ?? "window", { left: f, top: p } = B(a.value.clientX, a.value.clientY - u, s.offsetWidth, s.offsetHeight, d, l);
|
|
332
332
|
o.value = {
|
|
333
333
|
left: f - l.left,
|
|
334
334
|
top: p - l.top
|
|
@@ -395,98 +395,98 @@ function Pe(e) {
|
|
|
395
395
|
}
|
|
396
396
|
//#endregion
|
|
397
397
|
//#region src/ChartMenu/download.ts
|
|
398
|
-
function
|
|
398
|
+
function Ie(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 V = [
|
|
403
403
|
"color",
|
|
404
404
|
"font-family",
|
|
405
405
|
"font-size",
|
|
406
406
|
"font-weight"
|
|
407
|
-
],
|
|
408
|
-
function
|
|
407
|
+
], H = ["fill", "stroke"];
|
|
408
|
+
function Le(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 U(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 V) {
|
|
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 H) {
|
|
425
425
|
let n = e.getAttribute(t);
|
|
426
|
-
!n || !n.includes("var(") || e.setAttribute(t,
|
|
426
|
+
!n || !n.includes("var(") || e.setAttribute(t, Le(n));
|
|
427
427
|
}
|
|
428
428
|
return t;
|
|
429
429
|
}
|
|
430
|
-
function
|
|
431
|
-
let n =
|
|
432
|
-
|
|
430
|
+
function W(e, t) {
|
|
431
|
+
let n = U(e), r = new XMLSerializer().serializeToString(n);
|
|
432
|
+
Ie(new Blob([r], { type: "image/svg+xml" }), `${t}.svg`);
|
|
433
433
|
}
|
|
434
|
-
function
|
|
435
|
-
let n =
|
|
434
|
+
function Re(e, t) {
|
|
435
|
+
let n = U(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 && Ie(e, `${t}.png`);
|
|
442
442
|
}), URL.revokeObjectURL(a);
|
|
443
443
|
}, o.src = a;
|
|
444
444
|
}
|
|
445
|
-
function
|
|
445
|
+
function ze(e, t) {
|
|
446
446
|
e.toBlob((e) => {
|
|
447
|
-
e &&
|
|
447
|
+
e && Ie(e, `${t}.png`);
|
|
448
448
|
}, "image/png");
|
|
449
449
|
}
|
|
450
|
-
function
|
|
451
|
-
|
|
450
|
+
function Be(e, t) {
|
|
451
|
+
Ie(new Blob([e], { type: "text/csv" }), `${t}.csv`);
|
|
452
452
|
}
|
|
453
453
|
//#endregion
|
|
454
454
|
//#region src/_shared/touch.ts
|
|
455
|
-
function
|
|
455
|
+
function G() {
|
|
456
456
|
return typeof window < "u" && "ontouchstart" in window;
|
|
457
457
|
}
|
|
458
458
|
//#endregion
|
|
459
459
|
//#region src/_shared/useChartFullscreen.ts
|
|
460
|
-
var
|
|
461
|
-
function Ve() {
|
|
462
|
-
typeof document > "u" || (q === 0 && (Be = document.body.style.overflow, document.body.style.overflow = "hidden"), q++);
|
|
463
|
-
}
|
|
460
|
+
var K = 0, Ve = "";
|
|
464
461
|
function He() {
|
|
465
|
-
typeof document > "u" ||
|
|
462
|
+
typeof document > "u" || (K === 0 && (Ve = document.body.style.overflow, document.body.style.overflow = "hidden"), K++);
|
|
466
463
|
}
|
|
467
|
-
var J = 0, Y = null;
|
|
468
464
|
function Ue() {
|
|
469
|
-
|
|
465
|
+
typeof document > "u" || K !== 0 && (K--, K === 0 && (document.body.style.overflow = Ve));
|
|
470
466
|
}
|
|
467
|
+
var q = 0, J = null;
|
|
471
468
|
function We() {
|
|
472
|
-
|
|
473
|
-
|
|
469
|
+
return document.querySelector("meta[name=\"viewport\"]");
|
|
470
|
+
}
|
|
471
|
+
function Ge() {
|
|
472
|
+
if (typeof document > "u" || !G()) return;
|
|
473
|
+
let e = We();
|
|
474
474
|
if (e) {
|
|
475
|
-
if (
|
|
476
|
-
|
|
477
|
-
let t =
|
|
475
|
+
if (q === 0) {
|
|
476
|
+
J = e.getAttribute("content");
|
|
477
|
+
let t = J || "width=device-width, initial-scale=1";
|
|
478
478
|
e.setAttribute("content", `${t}, maximum-scale=1`);
|
|
479
479
|
}
|
|
480
|
-
|
|
480
|
+
q++;
|
|
481
481
|
}
|
|
482
482
|
}
|
|
483
|
-
function
|
|
484
|
-
if (!(typeof document > "u") &&
|
|
485
|
-
let e =
|
|
486
|
-
e &&
|
|
483
|
+
function Ke() {
|
|
484
|
+
if (!(typeof document > "u") && q !== 0 && (q--, q === 0)) {
|
|
485
|
+
let e = We();
|
|
486
|
+
e && J != null && e.setAttribute("content", J), J = null;
|
|
487
487
|
}
|
|
488
488
|
}
|
|
489
|
-
function
|
|
489
|
+
function Y(e = {}) {
|
|
490
490
|
let t = v(!1), r = !1, i = v(null);
|
|
491
491
|
function a() {
|
|
492
492
|
let e = typeof window < "u" ? window.visualViewport : null;
|
|
@@ -502,7 +502,7 @@ function X(e = {}) {
|
|
|
502
502
|
t && (e ? (t.addEventListener("resize", a), t.addEventListener("scroll", a), a()) : (t.removeEventListener("resize", a), t.removeEventListener("scroll", a), i.value = null));
|
|
503
503
|
}
|
|
504
504
|
function s(e) {
|
|
505
|
-
e !== t.value && (t.value = e, e && !r ? (
|
|
505
|
+
e !== t.value && (t.value = e, e && !r ? (He(), Ge(), o(!0), r = !0) : !e && r && (Ue(), Ke(), o(!1), r = !1));
|
|
506
506
|
}
|
|
507
507
|
function c(e) {
|
|
508
508
|
if (e.key !== "Escape" || !t.value) return;
|
|
@@ -521,7 +521,7 @@ function X(e = {}) {
|
|
|
521
521
|
return g(() => {
|
|
522
522
|
typeof document > "u" || document.addEventListener("keydown", c);
|
|
523
523
|
}), ee(() => {
|
|
524
|
-
typeof document > "u" || (document.removeEventListener("keydown", c), r &&= (
|
|
524
|
+
typeof document > "u" || (document.removeEventListener("keydown", c), r &&= (Ue(), Ke(), o(!1), !1));
|
|
525
525
|
}), {
|
|
526
526
|
isFullscreen: t,
|
|
527
527
|
toggle: d,
|
|
@@ -538,7 +538,7 @@ function X(e = {}) {
|
|
|
538
538
|
"z-index": "var(--cfasim-z-fullscreen, 1000)",
|
|
539
539
|
background: "var(--color-bg-0, #fff)",
|
|
540
540
|
color: "var(--color-text, inherit)",
|
|
541
|
-
padding:
|
|
541
|
+
padding: G() ? "0" : "2em",
|
|
542
542
|
"box-sizing": "border-box",
|
|
543
543
|
display: "flex",
|
|
544
544
|
"flex-direction": "column",
|
|
@@ -549,7 +549,7 @@ function X(e = {}) {
|
|
|
549
549
|
}
|
|
550
550
|
//#endregion
|
|
551
551
|
//#region src/_shared/useChartMenu.ts
|
|
552
|
-
function
|
|
552
|
+
function qe(e) {
|
|
553
553
|
let t = v(null);
|
|
554
554
|
function r() {
|
|
555
555
|
let t = e.filename();
|
|
@@ -557,23 +557,23 @@ function Ke(e) {
|
|
|
557
557
|
let n = e.legacyMenuLabel();
|
|
558
558
|
return typeof n == "string" ? n : "chart";
|
|
559
559
|
}
|
|
560
|
-
let i = e.fullscreen ?
|
|
560
|
+
let i = e.fullscreen ? Y({ target: e.fullscreenTarget }) : null, a = n(() => {
|
|
561
561
|
let n = r(), a = [];
|
|
562
562
|
i && a.push(i.menuItem.value), a.push({
|
|
563
563
|
label: "Save as SVG",
|
|
564
564
|
action: () => {
|
|
565
|
-
t.value &&
|
|
565
|
+
t.value && W(t.value, n);
|
|
566
566
|
}
|
|
567
567
|
}, {
|
|
568
568
|
label: "Save as PNG",
|
|
569
569
|
action: () => {
|
|
570
|
-
t.value &&
|
|
570
|
+
t.value && Re(t.value, n);
|
|
571
571
|
}
|
|
572
572
|
});
|
|
573
573
|
let o = e.downloadButton?.();
|
|
574
574
|
return !e.downloadLink() && !o && a.push({
|
|
575
575
|
label: "Download CSV",
|
|
576
|
-
action: () =>
|
|
576
|
+
action: () => Be(e.getCsv(), n)
|
|
577
577
|
}), a;
|
|
578
578
|
}), o = n(() => {
|
|
579
579
|
if (e.downloadButton?.()) return null;
|
|
@@ -584,7 +584,7 @@ function Ke(e) {
|
|
|
584
584
|
return t ? typeof t == "string" ? t : "Download data (CSV)" : null;
|
|
585
585
|
});
|
|
586
586
|
function l() {
|
|
587
|
-
|
|
587
|
+
Be(e.getCsv(), r());
|
|
588
588
|
}
|
|
589
589
|
return {
|
|
590
590
|
svgRef: t,
|
|
@@ -602,7 +602,7 @@ function Ke(e) {
|
|
|
602
602
|
}
|
|
603
603
|
//#endregion
|
|
604
604
|
//#region src/_shared/ChartZoomControls.vue?vue&type=script&setup=true&lang.ts
|
|
605
|
-
var
|
|
605
|
+
var Je = ["disabled"], X = ["disabled"], Ye = ["disabled"], Xe = /*#__PURE__*/ P(/* @__PURE__ */ l({
|
|
606
606
|
__name: "ChartZoomControls",
|
|
607
607
|
props: {
|
|
608
608
|
canZoomIn: {
|
|
@@ -645,7 +645,7 @@ var qe = ["disabled"], Z = ["disabled"], Je = ["disabled"], Ye = /*#__PURE__*/ P
|
|
|
645
645
|
"stroke-width": "1.5",
|
|
646
646
|
"stroke-linecap": "round",
|
|
647
647
|
"aria-hidden": "true"
|
|
648
|
-
}, [o("path", { d: "M7 2v10M2 7h10" })], -1)]], 8,
|
|
648
|
+
}, [o("path", { d: "M7 2v10M2 7h10" })], -1)]], 8, Je),
|
|
649
649
|
o("button", {
|
|
650
650
|
type: "button",
|
|
651
651
|
class: "chart-zoom-button",
|
|
@@ -661,7 +661,7 @@ var qe = ["disabled"], Z = ["disabled"], Je = ["disabled"], Ye = /*#__PURE__*/ P
|
|
|
661
661
|
"stroke-width": "1.5",
|
|
662
662
|
"stroke-linecap": "round",
|
|
663
663
|
"aria-hidden": "true"
|
|
664
|
-
}, [o("path", { d: "M2 7h10" })], -1)]], 8,
|
|
664
|
+
}, [o("path", { d: "M2 7h10" })], -1)]], 8, X),
|
|
665
665
|
o("button", {
|
|
666
666
|
type: "button",
|
|
667
667
|
class: "chart-zoom-button",
|
|
@@ -678,13 +678,13 @@ var qe = ["disabled"], Z = ["disabled"], Je = ["disabled"], Ye = /*#__PURE__*/ P
|
|
|
678
678
|
"stroke-linecap": "round",
|
|
679
679
|
"stroke-linejoin": "round",
|
|
680
680
|
"aria-hidden": "true"
|
|
681
|
-
}, [o("path", { d: "M1.75 7a5.25 5.25 0 1 0 5.25-5.25c-1.48 0-2.9.6-3.94 1.6L1.75 4.7" }), o("path", { d: "M1.75 1.75v2.95h2.95" })], -1)]], 8,
|
|
681
|
+
}, [o("path", { d: "M1.75 7a5.25 5.25 0 1 0 5.25-5.25c-1.48 0-2.9.6-3.94 1.6L1.75 4.7" }), o("path", { d: "M1.75 1.75v2.95h2.95" })], -1)]], 8, Ye)
|
|
682
682
|
], 2));
|
|
683
683
|
}
|
|
684
684
|
}), [["__scopeId", "data-v-87ceeada"]]);
|
|
685
685
|
//#endregion
|
|
686
686
|
//#region src/_shared/seriesCsv.ts
|
|
687
|
-
function
|
|
687
|
+
function Ze(e) {
|
|
688
688
|
if (e.length === 0) return "";
|
|
689
689
|
let t = 0;
|
|
690
690
|
for (let n of e) n.data.length > t && (t = n.data.length);
|
|
@@ -696,43 +696,43 @@ function Xe(e) {
|
|
|
696
696
|
}
|
|
697
697
|
return i.join("\n");
|
|
698
698
|
}
|
|
699
|
-
function
|
|
699
|
+
function Qe(e, t, n = "category") {
|
|
700
700
|
if (t.length === 0 || e.length === 0) return "";
|
|
701
701
|
let r = [(t.length === 1 ? [n, t[0].label || "value"] : [n, ...t.map((e, t) => e.label || `series_${t}`)]).join(",")];
|
|
702
702
|
for (let n = 0; n < e.length; n++) {
|
|
703
|
-
let i = [
|
|
703
|
+
let i = [$e(e[n])];
|
|
704
704
|
for (let e of t) i.push(n < e.data.length ? String(e.data[n]) : "");
|
|
705
705
|
r.push(i.join(","));
|
|
706
706
|
}
|
|
707
707
|
return r.join("\n");
|
|
708
708
|
}
|
|
709
|
-
function
|
|
709
|
+
function $e(e) {
|
|
710
710
|
return e.includes(",") || e.includes("\"") || e.includes("\n") ? `"${e.replace(/"/g, "\"\"")}"` : e;
|
|
711
711
|
}
|
|
712
712
|
//#endregion
|
|
713
713
|
//#region src/_shared/ChartAnnotations.vue?vue&type=script&setup=true&lang.ts
|
|
714
|
-
var
|
|
714
|
+
var et = {
|
|
715
715
|
class: "chart-annotations",
|
|
716
716
|
"pointer-events": "none"
|
|
717
|
-
},
|
|
717
|
+
}, tt = ["stroke", "stroke-width"], nt = [
|
|
718
718
|
"d",
|
|
719
719
|
"stroke",
|
|
720
720
|
"stroke-width"
|
|
721
|
-
],
|
|
721
|
+
], rt = [
|
|
722
722
|
"fill",
|
|
723
723
|
"stroke",
|
|
724
724
|
"stroke-width",
|
|
725
725
|
"transform"
|
|
726
|
-
],
|
|
726
|
+
], it = [
|
|
727
727
|
"stroke",
|
|
728
728
|
"stroke-width",
|
|
729
729
|
"stroke-dasharray"
|
|
730
|
-
],
|
|
730
|
+
], at = [
|
|
731
731
|
"d",
|
|
732
732
|
"stroke",
|
|
733
733
|
"stroke-width",
|
|
734
734
|
"stroke-dasharray"
|
|
735
|
-
],
|
|
735
|
+
], ot = ["fill", "transform"], st = [
|
|
736
736
|
"x",
|
|
737
737
|
"y",
|
|
738
738
|
"text-anchor",
|
|
@@ -741,7 +741,7 @@ var $e = {
|
|
|
741
741
|
"fill",
|
|
742
742
|
"stroke",
|
|
743
743
|
"stroke-width"
|
|
744
|
-
],
|
|
744
|
+
], ct = ["x", "dy"], lt = ["font-weight", "font-style"], ut = 13, dt = "normal", ft = 700, pt = "var(--color-bg-0, #fff)", mt = 3, ht = 1, gt = 4, _t = 6, vt = 1.2, yt = .35, bt = /* @__PURE__ */ l({
|
|
745
745
|
__name: "ChartAnnotations",
|
|
746
746
|
props: {
|
|
747
747
|
annotations: { default: () => [] },
|
|
@@ -778,22 +778,22 @@ var $e = {
|
|
|
778
778
|
if (!n || !isFinite(n.x) || !isFinite(n.y)) continue;
|
|
779
779
|
let i = t.pointer ?? "curved", a = i.startsWith("rule");
|
|
780
780
|
if (a && !r.bounds) continue;
|
|
781
|
-
let { x: o, y: l } = t.offset, d = n.x + o, p = n.y + l, m = t.color ?? "currentColor", h = t.fontSize ??
|
|
781
|
+
let { x: o, y: l } = t.offset, d = n.x + o, p = n.y + l, m = t.color ?? "currentColor", h = t.fontSize ?? ut, g = t.fontWeight ?? dt, ee = t.outlineColor ?? pt, _ = t.outlineWidth ?? mt, v = t.lineColor ?? m, y = t.lineWidth ?? ht, b = s(t.lineDash), x = {
|
|
782
782
|
left: "start",
|
|
783
783
|
center: "middle",
|
|
784
784
|
right: "end"
|
|
785
|
-
}[t.align ?? (o > 0 ? "left" : o < 0 ? "right" : "center")],
|
|
785
|
+
}[t.align ?? (o > 0 ? "left" : o < 0 ? "right" : "center")], te = t.text.split("\n").map(c), S, C = "", w, T = !a && (t.arrow ?? !0);
|
|
786
786
|
if (a && r.bounds) S = u(i, n.x, n.y, r.bounds);
|
|
787
787
|
else {
|
|
788
|
-
let e = f(n.x, n.y, d, p, h,
|
|
788
|
+
let e = f(n.x, n.y, d, p, h, te.length, i);
|
|
789
789
|
C = e.path, T && e.arrow && (w = e.arrow);
|
|
790
790
|
}
|
|
791
791
|
e.push({
|
|
792
|
-
lines:
|
|
792
|
+
lines: te,
|
|
793
793
|
textX: d,
|
|
794
794
|
textY: p,
|
|
795
|
-
textAnchor:
|
|
796
|
-
dy: h *
|
|
795
|
+
textAnchor: x,
|
|
796
|
+
dy: h * vt,
|
|
797
797
|
fontSize: h,
|
|
798
798
|
fontWeight: g,
|
|
799
799
|
color: m,
|
|
@@ -802,7 +802,7 @@ var $e = {
|
|
|
802
802
|
pointerPath: C,
|
|
803
803
|
lineColor: v,
|
|
804
804
|
lineWidth: y,
|
|
805
|
-
lineDash:
|
|
805
|
+
lineDash: b,
|
|
806
806
|
arrow: T,
|
|
807
807
|
arrowTip: w,
|
|
808
808
|
arrowTransform: w ? `translate(${w.x} ${w.y}) rotate(${w.angle})` : "",
|
|
@@ -859,11 +859,11 @@ var $e = {
|
|
|
859
859
|
}
|
|
860
860
|
function f(e, t, n, r, i, a, o) {
|
|
861
861
|
if (o === "none") return { path: "" };
|
|
862
|
-
let s = n - e, c = r - t, l = i *
|
|
862
|
+
let s = n - e, c = r - t, l = i * vt, u = (c < 0 ? r + (a - 1) * l : r) - i * yt;
|
|
863
863
|
if (s === 0 || c === 0 || o === "straight") {
|
|
864
864
|
let i = c === 0 ? r : u, a = n - e, o = i - t, s = Math.hypot(a, o);
|
|
865
865
|
if (s <= 10) return { path: "" };
|
|
866
|
-
let l = a / s, d = o / s, f = e + l *
|
|
866
|
+
let l = a / s, d = o / s, f = e + l * gt, p = t + d * gt, m = n - l * _t, h = i - d * _t, g = Math.atan2(-d, -l) * 180 / Math.PI;
|
|
867
867
|
return {
|
|
868
868
|
path: `M${f},${p} L${m},${h}`,
|
|
869
869
|
arrow: {
|
|
@@ -874,8 +874,8 @@ var $e = {
|
|
|
874
874
|
};
|
|
875
875
|
}
|
|
876
876
|
let d = u - t;
|
|
877
|
-
if (Math.abs(d) <=
|
|
878
|
-
let f = Math.sign(s), p = Math.sign(d), m = e, h = t + p *
|
|
877
|
+
if (Math.abs(d) <= gt || Math.abs(s) <= _t) return { path: "" };
|
|
878
|
+
let f = Math.sign(s), p = Math.sign(d), m = e, h = t + p * gt, g = n - f * _t, ee = u, _ = p > 0 ? -90 : 90;
|
|
879
879
|
return {
|
|
880
880
|
path: `M${m},${h} Q${m},${u} ${g},${ee}`,
|
|
881
881
|
arrow: {
|
|
@@ -885,7 +885,7 @@ var $e = {
|
|
|
885
885
|
}
|
|
886
886
|
};
|
|
887
887
|
}
|
|
888
|
-
return (t, n) => (_(), a("g",
|
|
888
|
+
return (t, n) => (_(), a("g", et, [(_(!0), a(e, null, y(l.value, (t, n) => (_(), a(e, { key: n }, [
|
|
889
889
|
t.rule && t.outlineWidth > 0 ? (_(), a("line", d({
|
|
890
890
|
key: 0,
|
|
891
891
|
ref_for: !0
|
|
@@ -894,7 +894,7 @@ var $e = {
|
|
|
894
894
|
stroke: t.outlineColor,
|
|
895
895
|
"stroke-width": t.lineWidth + t.outlineWidth,
|
|
896
896
|
"stroke-linecap": "round"
|
|
897
|
-
}), null, 16,
|
|
897
|
+
}), null, 16, tt)) : i("", !0),
|
|
898
898
|
t.pointerPath && t.outlineWidth > 0 ? (_(), a("path", {
|
|
899
899
|
key: 1,
|
|
900
900
|
d: t.pointerPath,
|
|
@@ -903,7 +903,7 @@ var $e = {
|
|
|
903
903
|
stroke: t.outlineColor,
|
|
904
904
|
"stroke-width": t.lineWidth + t.outlineWidth,
|
|
905
905
|
"stroke-linecap": "round"
|
|
906
|
-
}, null, 8,
|
|
906
|
+
}, null, 8, nt)) : i("", !0),
|
|
907
907
|
t.arrowTip && t.outlineWidth > 0 ? (_(), a("polygon", {
|
|
908
908
|
key: 2,
|
|
909
909
|
points: "0,0 -6,-3 -6,3",
|
|
@@ -913,7 +913,7 @@ var $e = {
|
|
|
913
913
|
"stroke-width": t.outlineWidth,
|
|
914
914
|
"stroke-linejoin": "round",
|
|
915
915
|
transform: t.arrowTransform
|
|
916
|
-
}, null, 8,
|
|
916
|
+
}, null, 8, rt)) : i("", !0),
|
|
917
917
|
t.rule ? (_(), a("line", d({
|
|
918
918
|
key: 3,
|
|
919
919
|
ref_for: !0
|
|
@@ -922,7 +922,7 @@ var $e = {
|
|
|
922
922
|
"stroke-width": t.lineWidth,
|
|
923
923
|
"stroke-dasharray": t.lineDash,
|
|
924
924
|
"stroke-linecap": "round"
|
|
925
|
-
}), null, 16,
|
|
925
|
+
}), null, 16, it)) : i("", !0),
|
|
926
926
|
t.pointerPath ? (_(), a("path", {
|
|
927
927
|
key: 4,
|
|
928
928
|
d: t.pointerPath,
|
|
@@ -931,13 +931,13 @@ var $e = {
|
|
|
931
931
|
"stroke-width": t.lineWidth,
|
|
932
932
|
"stroke-dasharray": t.lineDash,
|
|
933
933
|
"stroke-linecap": "round"
|
|
934
|
-
}, null, 8,
|
|
934
|
+
}, null, 8, at)) : i("", !0),
|
|
935
935
|
t.arrowTip ? (_(), a("polygon", {
|
|
936
936
|
key: 5,
|
|
937
937
|
points: "0,0 -6,-3 -6,3",
|
|
938
938
|
fill: t.lineColor,
|
|
939
939
|
transform: t.arrowTransform
|
|
940
|
-
}, null, 8,
|
|
940
|
+
}, null, 8, ot)) : i("", !0),
|
|
941
941
|
o("text", {
|
|
942
942
|
x: t.textX,
|
|
943
943
|
y: t.textY,
|
|
@@ -955,14 +955,14 @@ var $e = {
|
|
|
955
955
|
dy: r === 0 ? 0 : t.dy
|
|
956
956
|
}, [(_(!0), a(e, null, y(n, (e, t) => (_(), a("tspan", {
|
|
957
957
|
key: t,
|
|
958
|
-
"font-weight": e.bold ?
|
|
958
|
+
"font-weight": e.bold ? ft : void 0,
|
|
959
959
|
"font-style": e.italic ? "italic" : void 0
|
|
960
|
-
},
|
|
960
|
+
}, x(e.text), 9, lt))), 128))], 8, ct))), 128))], 8, st)
|
|
961
961
|
], 64))), 128))]));
|
|
962
962
|
}
|
|
963
|
-
}),
|
|
964
|
-
function
|
|
965
|
-
let { containerRef: t, measuredWidth: r, measuredHeight: i } =
|
|
963
|
+
}), xt = 400, St = 200;
|
|
964
|
+
function Ct(e) {
|
|
965
|
+
let { containerRef: t, measuredWidth: r, measuredHeight: i } = Ee({ debounce: e.debounce }), { svgRef: a, items: o, downloadLinkText: s, csvHref: c, downloadButtonText: l, triggerCsvDownload: u, resolvedFilename: d, isFullscreen: f, fullscreenStyle: p, teleportTarget: m, exitFullscreen: h } = qe({
|
|
966
966
|
filename: e.filename,
|
|
967
967
|
legacyMenuLabel: e.menu,
|
|
968
968
|
getCsv: e.getCsv,
|
|
@@ -970,13 +970,13 @@ function St(e) {
|
|
|
970
970
|
downloadButton: e.downloadButton,
|
|
971
971
|
fullscreen: !0,
|
|
972
972
|
fullscreenTarget: e.fullscreenTarget
|
|
973
|
-
}), g = n(() => f.value && r.value > 0 ? r.value : e.width() ?? (r.value ||
|
|
973
|
+
}), g = n(() => f.value && r.value > 0 ? r.value : e.width() ?? (r.value || xt)), ee = n(() => {
|
|
974
974
|
if (f.value && i.value > 0) {
|
|
975
975
|
let t = e.extraBelowHeight?.() ?? 0;
|
|
976
976
|
return i.value - t;
|
|
977
977
|
}
|
|
978
|
-
return e.height() ??
|
|
979
|
-
}), { padding: _, legendY: v, inlineLegendLayout: y, innerW:
|
|
978
|
+
return e.height() ?? St;
|
|
979
|
+
}), { padding: _, legendY: v, inlineLegendLayout: y, innerW: b, innerH: x, bounds: te } = Me({
|
|
980
980
|
title: e.title,
|
|
981
981
|
titleStyle: e.titleStyle,
|
|
982
982
|
xLabel: e.xLabel,
|
|
@@ -985,7 +985,7 @@ function St(e) {
|
|
|
985
985
|
width: () => g.value,
|
|
986
986
|
height: () => ee.value,
|
|
987
987
|
extraPadding: e.chartPadding
|
|
988
|
-
}), { hoverIndex: S, tooltipRef: C, tooltipPos: w, handlers: T } =
|
|
988
|
+
}), { hoverIndex: S, tooltipRef: C, tooltipPos: w, handlers: T } = Fe({
|
|
989
989
|
enabled: e.hasTooltipSlot,
|
|
990
990
|
trigger: e.tooltipTrigger,
|
|
991
991
|
clamp: () => e.tooltipClamp() ?? "window",
|
|
@@ -1002,9 +1002,9 @@ function St(e) {
|
|
|
1002
1002
|
padding: _,
|
|
1003
1003
|
legendY: v,
|
|
1004
1004
|
inlineLegendLayout: y,
|
|
1005
|
-
innerW:
|
|
1006
|
-
innerH:
|
|
1007
|
-
bounds:
|
|
1005
|
+
innerW: b,
|
|
1006
|
+
innerH: x,
|
|
1007
|
+
bounds: te,
|
|
1008
1008
|
hoverIndex: S,
|
|
1009
1009
|
tooltipRef: C,
|
|
1010
1010
|
tooltipPos: w,
|
|
@@ -1021,7 +1021,7 @@ function St(e) {
|
|
|
1021
1021
|
exitFullscreen: h
|
|
1022
1022
|
};
|
|
1023
1023
|
}
|
|
1024
|
-
function
|
|
1024
|
+
function wt(e, t) {
|
|
1025
1025
|
return (n) => {
|
|
1026
1026
|
let r = e();
|
|
1027
1027
|
if (r !== void 0) return ne(n, r);
|
|
@@ -1031,7 +1031,7 @@ function Ct(e, t) {
|
|
|
1031
1031
|
}
|
|
1032
1032
|
//#endregion
|
|
1033
1033
|
//#region src/_shared/contrast.ts
|
|
1034
|
-
function
|
|
1034
|
+
function Tt(e) {
|
|
1035
1035
|
let t = e.trim();
|
|
1036
1036
|
if (t.startsWith("#")) {
|
|
1037
1037
|
let e = t.slice(1);
|
|
@@ -1058,52 +1058,52 @@ function wt(e) {
|
|
|
1058
1058
|
}
|
|
1059
1059
|
return null;
|
|
1060
1060
|
}
|
|
1061
|
-
function
|
|
1061
|
+
function Et([e, t, n]) {
|
|
1062
1062
|
let r = (e) => {
|
|
1063
1063
|
let t = e / 255;
|
|
1064
1064
|
return t <= .03928 ? t / 12.92 : ((t + .055) / 1.055) ** 2.4;
|
|
1065
1065
|
};
|
|
1066
1066
|
return .2126 * r(e) + .7152 * r(t) + .0722 * r(n);
|
|
1067
1067
|
}
|
|
1068
|
-
var
|
|
1069
|
-
function
|
|
1070
|
-
let t =
|
|
1068
|
+
var Dt = null, Ot = /* @__PURE__ */ new Map();
|
|
1069
|
+
function kt(e) {
|
|
1070
|
+
let t = Tt(e);
|
|
1071
1071
|
if (t) return t;
|
|
1072
|
-
if (
|
|
1072
|
+
if (Ot.has(e)) return Ot.get(e) ?? null;
|
|
1073
1073
|
if (typeof document > "u") return null;
|
|
1074
|
-
|
|
1075
|
-
let n = getComputedStyle(
|
|
1076
|
-
return
|
|
1074
|
+
Dt || (Dt = document.createElement("span"), Dt.style.cssText = "position:absolute;width:0;height:0;visibility:hidden;pointer-events:none", document.body.appendChild(Dt)), Dt.style.color = "", Dt.style.color = e;
|
|
1075
|
+
let n = getComputedStyle(Dt).color, r = Tt(n);
|
|
1076
|
+
return Ot.set(e, r), r;
|
|
1077
1077
|
}
|
|
1078
|
-
function
|
|
1079
|
-
let r =
|
|
1080
|
-
return r &&
|
|
1078
|
+
function At(e, t = "#ffffff", n = "#1a1a1a") {
|
|
1079
|
+
let r = kt(e);
|
|
1080
|
+
return r && Et(r) > .179 ? n : t;
|
|
1081
1081
|
}
|
|
1082
1082
|
//#endregion
|
|
1083
1083
|
//#region src/_shared/mapTheme.ts
|
|
1084
|
-
var
|
|
1085
|
-
fill: `var(--choropleth-fill, light-dark(${
|
|
1086
|
-
stroke: `var(--choropleth-stroke, light-dark(${
|
|
1084
|
+
var jt = "#ddd", Mt = "#3f3f46", Nt = "#fff", Pt = "#18181b", Ft = "#000", It = {
|
|
1085
|
+
fill: `var(--choropleth-fill, light-dark(${jt}, ${Mt}))`,
|
|
1086
|
+
stroke: `var(--choropleth-stroke, light-dark(${Nt}, ${Pt}))`,
|
|
1087
1087
|
borders: "var(--choropleth-borders, transparent)",
|
|
1088
1088
|
outline: "var(--choropleth-outline, transparent)",
|
|
1089
1089
|
background: "var(--choropleth-background, transparent)",
|
|
1090
|
-
highlight: `var(--choropleth-highlight, light-dark(${
|
|
1090
|
+
highlight: `var(--choropleth-highlight, light-dark(${Ft}, #fff))`
|
|
1091
1091
|
};
|
|
1092
|
-
function
|
|
1092
|
+
function Lt(e, t) {
|
|
1093
1093
|
return Object.is(e?.fill, t?.fill) && Object.is(e?.stroke, t?.stroke) && Object.is(e?.strokeWidth, t?.strokeWidth) && Object.is(e?.borders, t?.borders) && Object.is(e?.bordersWidth, t?.bordersWidth) && Object.is(e?.outline, t?.outline) && Object.is(e?.outlineWidth, t?.outlineWidth) && Object.is(e?.background, t?.background) && Object.is(e?.highlight, t?.highlight) && Object.is(e?.markerColor, t?.markerColor) && Object.is(e?.markerHalo, t?.markerHalo) && Object.is(e?.markerHaloWidth, t?.markerHaloWidth) && Object.is(e?.markerOpacity, t?.markerOpacity);
|
|
1094
1094
|
}
|
|
1095
|
-
var
|
|
1096
|
-
function
|
|
1095
|
+
var Rt = /^(?:rgba|hsla)\(.*,\s*0(?:\.0+)?\s*\)$|\/\s*0(?:\.0+)?\s*\)$/, zt = (e) => e && e !== "transparent" && !Rt.test(e) ? e : void 0, Bt = (e) => e && Tt(e) ? e : void 0;
|
|
1096
|
+
function Vt(e, t) {
|
|
1097
1097
|
return e.replace(/var\((\s*--[\w-]+\s*)\)/g, `var($1, ${t})`);
|
|
1098
1098
|
}
|
|
1099
|
-
function
|
|
1099
|
+
function Ht(e, t) {
|
|
1100
1100
|
let n = e.ownerDocument, r = n.defaultView, i = typeof r.CSS?.supports == "function" && r.CSS.supports("color", "light-dark(#fff, #000)"), a = {
|
|
1101
|
-
fill: i ?
|
|
1102
|
-
stroke: i ?
|
|
1103
|
-
highlight: i ?
|
|
1104
|
-
borders:
|
|
1105
|
-
outline:
|
|
1106
|
-
background:
|
|
1101
|
+
fill: i ? It.fill : `var(--choropleth-fill, ${jt})`,
|
|
1102
|
+
stroke: i ? It.stroke : `var(--choropleth-stroke, ${Nt})`,
|
|
1103
|
+
highlight: i ? It.highlight : `var(--choropleth-highlight, ${Ft})`,
|
|
1104
|
+
borders: It.borders,
|
|
1105
|
+
outline: It.outline,
|
|
1106
|
+
background: It.background
|
|
1107
1107
|
}, o = n.createElement("div");
|
|
1108
1108
|
o.dataset.cfasimMapProbe = "1", o.setAttribute("aria-hidden", "true"), o.style.cssText = "position:absolute;width:0;height:0;overflow:hidden;visibility:hidden;pointer-events:none";
|
|
1109
1109
|
let s = () => {
|
|
@@ -1111,19 +1111,19 @@ function Vt(e, t) {
|
|
|
1111
1111
|
return e.style.setProperty("transition", "color 1ms step-start", "important"), o.appendChild(e), e;
|
|
1112
1112
|
}, c = s(), l = s(), u = s(), d = s(), f = s(), p = s();
|
|
1113
1113
|
e.appendChild(o);
|
|
1114
|
-
let m = !1, h, g = "", ee = "", _ = "", v = [], y = 0,
|
|
1115
|
-
fill:
|
|
1116
|
-
stroke:
|
|
1114
|
+
let m = !1, h, g = "", ee = "", _ = "", v = [], y = 0, b = !1, x = [], te = [], S = [], C = {
|
|
1115
|
+
fill: jt,
|
|
1116
|
+
stroke: Nt,
|
|
1117
1117
|
strokeWidth: void 0,
|
|
1118
|
-
borders:
|
|
1118
|
+
borders: Nt,
|
|
1119
1119
|
bordersWidth: void 0,
|
|
1120
1120
|
outline: void 0,
|
|
1121
1121
|
outlineWidth: void 0,
|
|
1122
1122
|
background: void 0,
|
|
1123
|
-
highlight:
|
|
1123
|
+
highlight: Ft
|
|
1124
1124
|
};
|
|
1125
1125
|
function w(e, t, n) {
|
|
1126
|
-
!i && t.includes("light-dark(") && (t = n), e.style.color = "", e.style.color =
|
|
1126
|
+
!i && t.includes("light-dark(") && (t = n), e.style.color = "", e.style.color = Vt(t, n), t && e.style.color === "" && (e.style.color = n);
|
|
1127
1127
|
}
|
|
1128
1128
|
let T = (e) => r.getComputedStyle(e).color;
|
|
1129
1129
|
function E(e) {
|
|
@@ -1134,19 +1134,19 @@ function Vt(e, t) {
|
|
|
1134
1134
|
};
|
|
1135
1135
|
}
|
|
1136
1136
|
function D(e) {
|
|
1137
|
-
if (m &&
|
|
1137
|
+
if (m && Lt(e, h)) return C;
|
|
1138
1138
|
h = e && { ...e }, w(c, e?.fill || a.fill, a.fill), w(l, e?.stroke || a.stroke, a.stroke), w(u, e?.borders || a.borders, a.borders), w(d, e?.outline || a.outline, a.outline), w(f, e?.background || a.background, a.background), w(p, e?.highlight || a.highlight, a.highlight);
|
|
1139
1139
|
let t = T(c);
|
|
1140
1140
|
if (t === "") {
|
|
1141
1141
|
m = !1;
|
|
1142
|
-
let t =
|
|
1142
|
+
let t = Bt(e?.stroke) ?? "#fff";
|
|
1143
1143
|
return C = {
|
|
1144
|
-
fill:
|
|
1144
|
+
fill: Bt(e?.fill) ?? "#ddd",
|
|
1145
1145
|
stroke: t,
|
|
1146
|
-
borders:
|
|
1147
|
-
outline:
|
|
1148
|
-
background:
|
|
1149
|
-
highlight:
|
|
1146
|
+
borders: Bt(e?.borders) ?? t,
|
|
1147
|
+
outline: Bt(e?.outline),
|
|
1148
|
+
background: Bt(e?.background),
|
|
1149
|
+
highlight: Bt(e?.highlight) ?? "#000",
|
|
1150
1150
|
...E(e)
|
|
1151
1151
|
}, C;
|
|
1152
1152
|
}
|
|
@@ -1154,22 +1154,22 @@ function Vt(e, t) {
|
|
|
1154
1154
|
return g = T(u), ee = T(d), _ = T(f), C = {
|
|
1155
1155
|
fill: t,
|
|
1156
1156
|
stroke: n,
|
|
1157
|
-
borders:
|
|
1158
|
-
outline:
|
|
1159
|
-
background:
|
|
1157
|
+
borders: zt(g) ?? n,
|
|
1158
|
+
outline: zt(ee),
|
|
1159
|
+
background: zt(_),
|
|
1160
1160
|
highlight: T(p),
|
|
1161
1161
|
...E(e)
|
|
1162
1162
|
}, m = !0, C;
|
|
1163
1163
|
}
|
|
1164
1164
|
function ne(e, t) {
|
|
1165
|
-
if (
|
|
1166
|
-
for (
|
|
1165
|
+
if (b && e.length === x.length && e.every((e, t) => e === x[t])) return S;
|
|
1166
|
+
for (x = [...e]; v.length < e.length;) {
|
|
1167
1167
|
let e = s();
|
|
1168
1168
|
e.dataset.cfasimMapSwatch = String(v.length), v.push(e);
|
|
1169
1169
|
}
|
|
1170
1170
|
y = e.length;
|
|
1171
1171
|
for (let n = 0; n < y; n++) w(v[n], e[n], t[n] ?? "");
|
|
1172
|
-
return
|
|
1172
|
+
return te = v.slice(0, y).map(T), te.includes("") ? (b = !1, S = te.map((e, n) => e || t[n] || ""), S) : (S = [...te], b = !0, S);
|
|
1173
1173
|
}
|
|
1174
1174
|
function O() {
|
|
1175
1175
|
let e = T(c);
|
|
@@ -1181,19 +1181,19 @@ function Vt(e, t) {
|
|
|
1181
1181
|
...C,
|
|
1182
1182
|
fill: e,
|
|
1183
1183
|
stroke: t,
|
|
1184
|
-
borders:
|
|
1185
|
-
outline:
|
|
1186
|
-
background:
|
|
1184
|
+
borders: zt(r) ?? t,
|
|
1185
|
+
outline: zt(i),
|
|
1186
|
+
background: zt(a),
|
|
1187
1187
|
highlight: o
|
|
1188
1188
|
}, n = !0);
|
|
1189
1189
|
}
|
|
1190
|
-
if (
|
|
1190
|
+
if (b && y) {
|
|
1191
1191
|
let e = !1;
|
|
1192
1192
|
for (let t = 0; t < y; t++) {
|
|
1193
1193
|
let n = T(v[t]);
|
|
1194
|
-
n !==
|
|
1194
|
+
n !== te[t] && (te[t] = n, e = !0);
|
|
1195
1195
|
}
|
|
1196
|
-
e && (S = [...
|
|
1196
|
+
e && (S = [...te], n = !0);
|
|
1197
1197
|
}
|
|
1198
1198
|
n && t();
|
|
1199
1199
|
}
|
|
@@ -1206,7 +1206,7 @@ function Vt(e, t) {
|
|
|
1206
1206
|
resolve: D,
|
|
1207
1207
|
resolvePalette: ne,
|
|
1208
1208
|
invalidate() {
|
|
1209
|
-
m = !1,
|
|
1209
|
+
m = !1, b = !1;
|
|
1210
1210
|
},
|
|
1211
1211
|
recheck: O,
|
|
1212
1212
|
unresolved() {
|
|
@@ -1217,30 +1217,30 @@ function Vt(e, t) {
|
|
|
1217
1217
|
}
|
|
1218
1218
|
};
|
|
1219
1219
|
}
|
|
1220
|
-
function
|
|
1221
|
-
let t =
|
|
1220
|
+
function Ut(e) {
|
|
1221
|
+
let t = Bt(e?.stroke) ?? "#fff";
|
|
1222
1222
|
return {
|
|
1223
|
-
fill:
|
|
1223
|
+
fill: Bt(e?.fill) ?? "#ddd",
|
|
1224
1224
|
stroke: t,
|
|
1225
1225
|
strokeWidth: e?.strokeWidth,
|
|
1226
|
-
borders:
|
|
1226
|
+
borders: Bt(e?.borders) ?? t,
|
|
1227
1227
|
bordersWidth: e?.bordersWidth,
|
|
1228
|
-
outline:
|
|
1228
|
+
outline: Bt(e?.outline),
|
|
1229
1229
|
outlineWidth: e?.outlineWidth,
|
|
1230
|
-
background:
|
|
1231
|
-
highlight:
|
|
1230
|
+
background: Bt(e?.background),
|
|
1231
|
+
highlight: Bt(e?.highlight) ?? "#000"
|
|
1232
1232
|
};
|
|
1233
1233
|
}
|
|
1234
|
-
function
|
|
1234
|
+
function Wt(e, t) {
|
|
1235
1235
|
let r = v(0), i = null;
|
|
1236
1236
|
g(() => {
|
|
1237
|
-
e.value && (i =
|
|
1237
|
+
e.value && (i = Ht(e.value, () => {
|
|
1238
1238
|
r.value++;
|
|
1239
1239
|
}), r.value++);
|
|
1240
1240
|
}), ee(() => {
|
|
1241
1241
|
i?.destroy(), i = null;
|
|
1242
1242
|
});
|
|
1243
|
-
let a = n(() => (r.value, i ? i.resolve(t()) :
|
|
1243
|
+
let a = n(() => (r.value, i ? i.resolve(t()) : Ut(t())));
|
|
1244
1244
|
function o(e, t) {
|
|
1245
1245
|
return r.value, i ? i.resolvePalette(e, t) : [...e];
|
|
1246
1246
|
}
|
|
@@ -1255,178 +1255,178 @@ function Ut(e, t) {
|
|
|
1255
1255
|
}
|
|
1256
1256
|
//#endregion
|
|
1257
1257
|
//#region src/_shared/dateAxis.ts
|
|
1258
|
-
var
|
|
1258
|
+
var Gt = /^(\d{4})-(\d{2})-(\d{2})$/, Kt = /^(\d{4})-(\d{2})-(\d{2})[Tt ](\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?(Z|[+-]\d{2}:?\d{2})?$/, qt = 1e3, Jt = 60 * qt, Yt = 60 * Jt, Xt = 24 * Yt, Zt = 7 * Xt, Qt = 30 * Xt, $t = 365 * Xt, en = [
|
|
1259
1259
|
{
|
|
1260
1260
|
unit: "second",
|
|
1261
1261
|
step: 1,
|
|
1262
|
-
ms: 1 *
|
|
1262
|
+
ms: 1 * qt
|
|
1263
1263
|
},
|
|
1264
1264
|
{
|
|
1265
1265
|
unit: "second",
|
|
1266
1266
|
step: 5,
|
|
1267
|
-
ms: 5 *
|
|
1267
|
+
ms: 5 * qt
|
|
1268
1268
|
},
|
|
1269
1269
|
{
|
|
1270
1270
|
unit: "second",
|
|
1271
1271
|
step: 15,
|
|
1272
|
-
ms: 15 *
|
|
1272
|
+
ms: 15 * qt
|
|
1273
1273
|
},
|
|
1274
1274
|
{
|
|
1275
1275
|
unit: "second",
|
|
1276
1276
|
step: 30,
|
|
1277
|
-
ms: 30 *
|
|
1277
|
+
ms: 30 * qt
|
|
1278
1278
|
},
|
|
1279
1279
|
{
|
|
1280
1280
|
unit: "minute",
|
|
1281
1281
|
step: 1,
|
|
1282
|
-
ms: 1 *
|
|
1282
|
+
ms: 1 * Jt
|
|
1283
1283
|
},
|
|
1284
1284
|
{
|
|
1285
1285
|
unit: "minute",
|
|
1286
1286
|
step: 5,
|
|
1287
|
-
ms: 5 *
|
|
1287
|
+
ms: 5 * Jt
|
|
1288
1288
|
},
|
|
1289
1289
|
{
|
|
1290
1290
|
unit: "minute",
|
|
1291
1291
|
step: 15,
|
|
1292
|
-
ms: 15 *
|
|
1292
|
+
ms: 15 * Jt
|
|
1293
1293
|
},
|
|
1294
1294
|
{
|
|
1295
1295
|
unit: "minute",
|
|
1296
1296
|
step: 30,
|
|
1297
|
-
ms: 30 *
|
|
1297
|
+
ms: 30 * Jt
|
|
1298
1298
|
},
|
|
1299
1299
|
{
|
|
1300
1300
|
unit: "hour",
|
|
1301
1301
|
step: 1,
|
|
1302
|
-
ms: 1 *
|
|
1302
|
+
ms: 1 * Yt
|
|
1303
1303
|
},
|
|
1304
1304
|
{
|
|
1305
1305
|
unit: "hour",
|
|
1306
1306
|
step: 3,
|
|
1307
|
-
ms: 3 *
|
|
1307
|
+
ms: 3 * Yt
|
|
1308
1308
|
},
|
|
1309
1309
|
{
|
|
1310
1310
|
unit: "hour",
|
|
1311
1311
|
step: 6,
|
|
1312
|
-
ms: 6 *
|
|
1312
|
+
ms: 6 * Yt
|
|
1313
1313
|
},
|
|
1314
1314
|
{
|
|
1315
1315
|
unit: "hour",
|
|
1316
1316
|
step: 12,
|
|
1317
|
-
ms: 12 *
|
|
1317
|
+
ms: 12 * Yt
|
|
1318
1318
|
},
|
|
1319
1319
|
{
|
|
1320
1320
|
unit: "day",
|
|
1321
1321
|
step: 1,
|
|
1322
|
-
ms: 1 *
|
|
1322
|
+
ms: 1 * Xt
|
|
1323
1323
|
},
|
|
1324
1324
|
{
|
|
1325
1325
|
unit: "day",
|
|
1326
1326
|
step: 2,
|
|
1327
|
-
ms: 2 *
|
|
1327
|
+
ms: 2 * Xt
|
|
1328
1328
|
},
|
|
1329
1329
|
{
|
|
1330
1330
|
unit: "week",
|
|
1331
1331
|
step: 1,
|
|
1332
|
-
ms: 1 *
|
|
1332
|
+
ms: 1 * Zt
|
|
1333
1333
|
},
|
|
1334
1334
|
{
|
|
1335
1335
|
unit: "month",
|
|
1336
1336
|
step: 1,
|
|
1337
|
-
ms: 1 *
|
|
1337
|
+
ms: 1 * Qt
|
|
1338
1338
|
},
|
|
1339
1339
|
{
|
|
1340
1340
|
unit: "month",
|
|
1341
1341
|
step: 3,
|
|
1342
|
-
ms: 3 *
|
|
1342
|
+
ms: 3 * Qt
|
|
1343
1343
|
},
|
|
1344
1344
|
{
|
|
1345
1345
|
unit: "month",
|
|
1346
1346
|
step: 6,
|
|
1347
|
-
ms: 6 *
|
|
1347
|
+
ms: 6 * Qt
|
|
1348
1348
|
},
|
|
1349
1349
|
{
|
|
1350
1350
|
unit: "year",
|
|
1351
1351
|
step: 1,
|
|
1352
|
-
ms: 1 *
|
|
1352
|
+
ms: 1 * $t
|
|
1353
1353
|
},
|
|
1354
1354
|
{
|
|
1355
1355
|
unit: "year",
|
|
1356
1356
|
step: 2,
|
|
1357
|
-
ms: 2 *
|
|
1357
|
+
ms: 2 * $t
|
|
1358
1358
|
},
|
|
1359
1359
|
{
|
|
1360
1360
|
unit: "year",
|
|
1361
1361
|
step: 5,
|
|
1362
|
-
ms: 5 *
|
|
1362
|
+
ms: 5 * $t
|
|
1363
1363
|
},
|
|
1364
1364
|
{
|
|
1365
1365
|
unit: "year",
|
|
1366
1366
|
step: 10,
|
|
1367
|
-
ms: 10 *
|
|
1367
|
+
ms: 10 * $t
|
|
1368
1368
|
},
|
|
1369
1369
|
{
|
|
1370
1370
|
unit: "year",
|
|
1371
1371
|
step: 25,
|
|
1372
|
-
ms: 25 *
|
|
1372
|
+
ms: 25 * $t
|
|
1373
1373
|
},
|
|
1374
1374
|
{
|
|
1375
1375
|
unit: "year",
|
|
1376
1376
|
step: 50,
|
|
1377
|
-
ms: 50 *
|
|
1377
|
+
ms: 50 * $t
|
|
1378
1378
|
},
|
|
1379
1379
|
{
|
|
1380
1380
|
unit: "year",
|
|
1381
1381
|
step: 100,
|
|
1382
|
-
ms: 100 *
|
|
1382
|
+
ms: 100 * $t
|
|
1383
1383
|
}
|
|
1384
|
-
],
|
|
1385
|
-
function
|
|
1384
|
+
], tn = 1e3;
|
|
1385
|
+
function nn(e, t) {
|
|
1386
1386
|
if (e instanceof Date) {
|
|
1387
1387
|
let t = e.getTime();
|
|
1388
1388
|
return Number.isFinite(t) ? t : null;
|
|
1389
1389
|
}
|
|
1390
1390
|
if (typeof e != "string") return null;
|
|
1391
|
-
let n =
|
|
1391
|
+
let n = Gt.exec(e);
|
|
1392
1392
|
if (n) {
|
|
1393
1393
|
let e = +n[1], r = n[2] - 1, i = +n[3];
|
|
1394
1394
|
return t === "utc" ? Date.UTC(e, r, i) : new Date(e, r, i).getTime();
|
|
1395
1395
|
}
|
|
1396
|
-
let r =
|
|
1396
|
+
let r = Kt.exec(e);
|
|
1397
1397
|
if (r) {
|
|
1398
1398
|
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];
|
|
1399
1399
|
if (l) {
|
|
1400
1400
|
if (l === "Z" || l === "z") return Date.UTC(e, n, i, a, o, s, c);
|
|
1401
|
-
let t = l[0] === "+" ? 1 : -1, r = +l.slice(1, 3), u = +l.slice(-2), d = t * (r * 60 + u) *
|
|
1401
|
+
let t = l[0] === "+" ? 1 : -1, r = +l.slice(1, 3), u = +l.slice(-2), d = t * (r * 60 + u) * Jt;
|
|
1402
1402
|
return Date.UTC(e, n, i, a, o, s, c) - d;
|
|
1403
1403
|
}
|
|
1404
1404
|
return t === "utc" ? Date.UTC(e, n, i, a, o, s, c) : new Date(e, n, i, a, o, s, c).getTime();
|
|
1405
1405
|
}
|
|
1406
1406
|
return null;
|
|
1407
1407
|
}
|
|
1408
|
-
function
|
|
1409
|
-
return e instanceof Date ? Number.isFinite(e.getTime()) : typeof e == "string" ?
|
|
1408
|
+
function rn(e) {
|
|
1409
|
+
return e instanceof Date ? Number.isFinite(e.getTime()) : typeof e == "string" ? Gt.test(e) || Kt.test(e) : !1;
|
|
1410
1410
|
}
|
|
1411
|
-
function
|
|
1411
|
+
function an(e, t) {
|
|
1412
1412
|
if (e.length === 0) return !1;
|
|
1413
1413
|
for (let n = 0; n < e.length; n++) {
|
|
1414
1414
|
let r = e[n];
|
|
1415
|
-
if (!
|
|
1415
|
+
if (!rn(r) || nn(r, t) === null) return !1;
|
|
1416
1416
|
}
|
|
1417
1417
|
return !0;
|
|
1418
1418
|
}
|
|
1419
|
-
function
|
|
1419
|
+
function on(e, t) {
|
|
1420
1420
|
let n = e / Math.max(1, t);
|
|
1421
|
-
for (let e of
|
|
1422
|
-
return
|
|
1421
|
+
for (let e of en) if (n <= e.ms) return e;
|
|
1422
|
+
return en[en.length - 1];
|
|
1423
1423
|
}
|
|
1424
|
-
function
|
|
1424
|
+
function sn(e, t, n) {
|
|
1425
1425
|
let r = new Date(e);
|
|
1426
1426
|
if (n === "utc") switch (t) {
|
|
1427
|
-
case "second": return Math.floor(e /
|
|
1428
|
-
case "minute": return Math.floor(e /
|
|
1429
|
-
case "hour": return Math.floor(e /
|
|
1427
|
+
case "second": return Math.floor(e / qt) * qt;
|
|
1428
|
+
case "minute": return Math.floor(e / Jt) * Jt;
|
|
1429
|
+
case "hour": return Math.floor(e / Yt) * Yt;
|
|
1430
1430
|
case "day": return Date.UTC(r.getUTCFullYear(), r.getUTCMonth(), r.getUTCDate());
|
|
1431
1431
|
case "week": {
|
|
1432
1432
|
let e = (r.getUTCDay() + 6) % 7;
|
|
@@ -1436,8 +1436,8 @@ function on(e, t, n) {
|
|
|
1436
1436
|
case "year": return Date.UTC(r.getUTCFullYear(), 0, 1);
|
|
1437
1437
|
}
|
|
1438
1438
|
switch (t) {
|
|
1439
|
-
case "second": return Math.floor(e /
|
|
1440
|
-
case "minute": return Math.floor(e /
|
|
1439
|
+
case "second": return Math.floor(e / qt) * qt;
|
|
1440
|
+
case "minute": return Math.floor(e / Jt) * Jt;
|
|
1441
1441
|
case "hour": return new Date(r.getFullYear(), r.getMonth(), r.getDate(), r.getHours()).getTime();
|
|
1442
1442
|
case "day": return new Date(r.getFullYear(), r.getMonth(), r.getDate()).getTime();
|
|
1443
1443
|
case "week": {
|
|
@@ -1448,11 +1448,11 @@ function on(e, t, n) {
|
|
|
1448
1448
|
case "year": return new Date(r.getFullYear(), 0, 1).getTime();
|
|
1449
1449
|
}
|
|
1450
1450
|
}
|
|
1451
|
-
function
|
|
1452
|
-
if (t === "second") return e + n *
|
|
1453
|
-
if (t === "minute") return e + n *
|
|
1454
|
-
if (t === "hour" && r === "utc") return e + n *
|
|
1455
|
-
if (t === "week" && r === "utc") return e + n *
|
|
1451
|
+
function cn(e, t, n, r) {
|
|
1452
|
+
if (t === "second") return e + n * qt;
|
|
1453
|
+
if (t === "minute") return e + n * Jt;
|
|
1454
|
+
if (t === "hour" && r === "utc") return e + n * Yt;
|
|
1455
|
+
if (t === "week" && r === "utc") return e + n * Zt;
|
|
1456
1456
|
let i = new Date(e);
|
|
1457
1457
|
if (r === "utc") switch (t) {
|
|
1458
1458
|
case "day": return Date.UTC(i.getUTCFullYear(), i.getUTCMonth(), i.getUTCDate() + n, i.getUTCHours(), i.getUTCMinutes(), i.getUTCSeconds(), i.getUTCMilliseconds());
|
|
@@ -1468,21 +1468,21 @@ function sn(e, t, n, r) {
|
|
|
1468
1468
|
}
|
|
1469
1469
|
return e;
|
|
1470
1470
|
}
|
|
1471
|
-
function
|
|
1471
|
+
function ln(e, t, n, r) {
|
|
1472
1472
|
if (!Number.isFinite(e) || !Number.isFinite(t) || e >= t || n < 1) return {
|
|
1473
1473
|
values: [],
|
|
1474
1474
|
unit: "day"
|
|
1475
1475
|
};
|
|
1476
|
-
let { unit: i, step: a } =
|
|
1477
|
-
for (; o < e && s <
|
|
1476
|
+
let { unit: i, step: a } = on(t - e, n), o = sn(e, i, r), s = 0;
|
|
1477
|
+
for (; o < e && s < tn;) o = cn(o, i, a, r), s++;
|
|
1478
1478
|
let c = [];
|
|
1479
|
-
for (let e = 0; e <
|
|
1479
|
+
for (let e = 0; e < tn && o <= t; e++) c.push(o), o = cn(o, i, a, r);
|
|
1480
1480
|
return {
|
|
1481
1481
|
values: c,
|
|
1482
1482
|
unit: i
|
|
1483
1483
|
};
|
|
1484
1484
|
}
|
|
1485
|
-
var
|
|
1485
|
+
var un = {
|
|
1486
1486
|
iso: {
|
|
1487
1487
|
year: "numeric",
|
|
1488
1488
|
month: "2-digit",
|
|
@@ -1520,7 +1520,7 @@ var ln = {
|
|
|
1520
1520
|
hourCycle: "h23"
|
|
1521
1521
|
},
|
|
1522
1522
|
medium: { dateStyle: "medium" }
|
|
1523
|
-
},
|
|
1523
|
+
}, dn = {
|
|
1524
1524
|
year: "year",
|
|
1525
1525
|
month: "month-year",
|
|
1526
1526
|
week: "month-day",
|
|
@@ -1529,28 +1529,28 @@ var ln = {
|
|
|
1529
1529
|
minute: "time",
|
|
1530
1530
|
second: "time"
|
|
1531
1531
|
};
|
|
1532
|
-
Object.keys(
|
|
1533
|
-
function
|
|
1532
|
+
Object.keys(un);
|
|
1533
|
+
function Z(e) {
|
|
1534
1534
|
return e < 10 ? "0" + e : String(e);
|
|
1535
1535
|
}
|
|
1536
1536
|
function fn(e, t) {
|
|
1537
1537
|
let n = new Date(e);
|
|
1538
|
-
return t === "utc" ? `${n.getUTCFullYear()}-${
|
|
1538
|
+
return t === "utc" ? `${n.getUTCFullYear()}-${Z(n.getUTCMonth() + 1)}-${Z(n.getUTCDate())}` : `${n.getFullYear()}-${Z(n.getMonth() + 1)}-${Z(n.getDate())}`;
|
|
1539
1539
|
}
|
|
1540
1540
|
function pn(e, t) {
|
|
1541
1541
|
let n = new Date(e);
|
|
1542
|
-
return t === "utc" ? `${n.getUTCFullYear()}-${
|
|
1542
|
+
return t === "utc" ? `${n.getUTCFullYear()}-${Z(n.getUTCMonth() + 1)}-${Z(n.getUTCDate())}T${Z(n.getUTCHours())}:${Z(n.getUTCMinutes())}:${Z(n.getUTCSeconds())}Z` : `${n.getFullYear()}-${Z(n.getMonth() + 1)}-${Z(n.getDate())}T${Z(n.getHours())}:${Z(n.getMinutes())}:${Z(n.getSeconds())}`;
|
|
1543
1543
|
}
|
|
1544
1544
|
function mn(e) {
|
|
1545
|
-
return e in
|
|
1545
|
+
return e in un;
|
|
1546
1546
|
}
|
|
1547
1547
|
function hn(e, t, n, r) {
|
|
1548
1548
|
if (typeof t == "function") return t(e, r);
|
|
1549
1549
|
let i = null, a;
|
|
1550
|
-
if (t === void 0) i = r ?
|
|
1550
|
+
if (t === void 0) i = r ? dn[r] : "iso", a = un[i];
|
|
1551
1551
|
else if (typeof t == "string") {
|
|
1552
1552
|
if (!mn(t)) throw Error(`Unknown date format preset: "${t}"`);
|
|
1553
|
-
i = t, a =
|
|
1553
|
+
i = t, a = un[i];
|
|
1554
1554
|
} else a = t;
|
|
1555
1555
|
if (i === "iso") return fn(e, n);
|
|
1556
1556
|
if (i === "iso-datetime") return pn(e, n);
|
|
@@ -1642,43 +1642,43 @@ var gn = {
|
|
|
1642
1642
|
"fill",
|
|
1643
1643
|
"font-weight",
|
|
1644
1644
|
"fill-opacity"
|
|
1645
|
-
],
|
|
1645
|
+
], Mn = [
|
|
1646
1646
|
"x",
|
|
1647
1647
|
"y",
|
|
1648
1648
|
"font-size",
|
|
1649
1649
|
"fill",
|
|
1650
1650
|
"font-weight"
|
|
1651
|
-
],
|
|
1651
|
+
], Nn = [
|
|
1652
1652
|
"d",
|
|
1653
1653
|
"fill",
|
|
1654
1654
|
"fill-opacity"
|
|
1655
|
-
],
|
|
1655
|
+
], Pn = [
|
|
1656
1656
|
"d",
|
|
1657
1657
|
"stroke",
|
|
1658
1658
|
"stroke-width"
|
|
1659
|
-
],
|
|
1659
|
+
], Fn = [
|
|
1660
1660
|
"d",
|
|
1661
1661
|
"stroke",
|
|
1662
1662
|
"stroke-width",
|
|
1663
1663
|
"stroke-opacity",
|
|
1664
1664
|
"stroke-dasharray"
|
|
1665
|
-
],
|
|
1665
|
+
], In = [
|
|
1666
1666
|
"cx",
|
|
1667
1667
|
"cy",
|
|
1668
1668
|
"r",
|
|
1669
1669
|
"fill",
|
|
1670
1670
|
"fill-opacity",
|
|
1671
1671
|
"stroke"
|
|
1672
|
-
],
|
|
1672
|
+
], Ln = [
|
|
1673
1673
|
"d",
|
|
1674
1674
|
"fill",
|
|
1675
1675
|
"fill-opacity"
|
|
1676
|
-
],
|
|
1676
|
+
], Rn = [
|
|
1677
1677
|
"d",
|
|
1678
1678
|
"stroke",
|
|
1679
1679
|
"stroke-width",
|
|
1680
1680
|
"stroke-dasharray"
|
|
1681
|
-
],
|
|
1681
|
+
], zn = [
|
|
1682
1682
|
"x1",
|
|
1683
1683
|
"y1",
|
|
1684
1684
|
"x2",
|
|
@@ -1686,7 +1686,7 @@ var gn = {
|
|
|
1686
1686
|
"stroke",
|
|
1687
1687
|
"stroke-width",
|
|
1688
1688
|
"stroke-dasharray"
|
|
1689
|
-
],
|
|
1689
|
+
], Bn = [
|
|
1690
1690
|
"x1",
|
|
1691
1691
|
"y1",
|
|
1692
1692
|
"x2",
|
|
@@ -1694,17 +1694,17 @@ var gn = {
|
|
|
1694
1694
|
"stroke",
|
|
1695
1695
|
"stroke-width",
|
|
1696
1696
|
"stroke-dasharray"
|
|
1697
|
-
],
|
|
1697
|
+
], Vn = [
|
|
1698
1698
|
"x1",
|
|
1699
1699
|
"y1",
|
|
1700
1700
|
"x2",
|
|
1701
1701
|
"y2"
|
|
1702
|
-
],
|
|
1702
|
+
], Hn = [
|
|
1703
1703
|
"x1",
|
|
1704
1704
|
"y1",
|
|
1705
1705
|
"x2",
|
|
1706
1706
|
"y2"
|
|
1707
|
-
],
|
|
1707
|
+
], Q = [
|
|
1708
1708
|
"x1",
|
|
1709
1709
|
"y1",
|
|
1710
1710
|
"x2",
|
|
@@ -1801,13 +1801,13 @@ var gn = {
|
|
|
1801
1801
|
if (!e) return;
|
|
1802
1802
|
if (!t) return e;
|
|
1803
1803
|
let r = new Float64Array(e.length);
|
|
1804
|
-
for (let t = 0; t < e.length; t++) r[t] =
|
|
1804
|
+
for (let t = 0; t < e.length; t++) r[t] = nn(e[t], n) ?? NaN;
|
|
1805
1805
|
return r;
|
|
1806
1806
|
}
|
|
1807
|
-
let T =
|
|
1807
|
+
let T = wt(() => f.tooltipValueFormat, () => f.yTickFormat), E = n(() => f.timezone ?? "utc"), D = n(() => {
|
|
1808
1808
|
let e = E.value, t = !1, n = !1;
|
|
1809
1809
|
for (let r of S(f)) {
|
|
1810
|
-
if (n = !0, !
|
|
1810
|
+
if (n = !0, !an(r, e)) {
|
|
1811
1811
|
t = !1;
|
|
1812
1812
|
break;
|
|
1813
1813
|
}
|
|
@@ -1868,7 +1868,7 @@ var gn = {
|
|
|
1868
1868
|
});
|
|
1869
1869
|
function M(e) {
|
|
1870
1870
|
let { min: t, max: n } = se.value, r = n - t || 1;
|
|
1871
|
-
return
|
|
1871
|
+
return V.value.left + (e - t) / r * U.value;
|
|
1872
1872
|
}
|
|
1873
1873
|
let ce = n(() => {
|
|
1874
1874
|
let e = Infinity, t = -Infinity, n = Infinity, r = (r) => {
|
|
@@ -1894,7 +1894,7 @@ var gn = {
|
|
|
1894
1894
|
});
|
|
1895
1895
|
function le(e) {
|
|
1896
1896
|
let { min: t, max: n } = ce.value;
|
|
1897
|
-
return
|
|
1897
|
+
return V.value.top + W.value - we(e, t, n, f.yScaleType) * W.value;
|
|
1898
1898
|
}
|
|
1899
1899
|
function ue(e) {
|
|
1900
1900
|
let t = e.data;
|
|
@@ -1942,10 +1942,10 @@ var gn = {
|
|
|
1942
1942
|
return M(r ? j(r, n) : n);
|
|
1943
1943
|
}
|
|
1944
1944
|
function pe(e, t = !0) {
|
|
1945
|
-
let n =
|
|
1945
|
+
let n = V.value.top + W.value;
|
|
1946
1946
|
if (e.seriesIndex == null) {
|
|
1947
1947
|
let t = N(e, "start"), r = N(e, "end");
|
|
1948
|
-
return t > r ? "" : `M${t},${
|
|
1948
|
+
return t > r ? "" : `M${t},${V.value.top}L${r},${V.value.top}L${r},${n}L${t},${n}Z`;
|
|
1949
1949
|
}
|
|
1950
1950
|
let r = k.value[e.seriesIndex];
|
|
1951
1951
|
if (!r) return "";
|
|
@@ -1961,14 +1961,14 @@ var gn = {
|
|
|
1961
1961
|
labels: [],
|
|
1962
1962
|
extraHeight: 0
|
|
1963
1963
|
};
|
|
1964
|
-
let t = [], n =
|
|
1964
|
+
let t = [], n = V.value.left + U.value;
|
|
1965
1965
|
for (let r of e) {
|
|
1966
1966
|
if (!r.label && !r.description || r.legend === "inline" || r.legend === !1) continue;
|
|
1967
|
-
let e = r.label ?? "", i = r.description ?? "", a = Math.max(e.length, i.length) * $n, o = N(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 =
|
|
1967
|
+
let e = r.label ?? "", i = r.description ?? "", a = Math.max(e.length, i.length) * $n, o = N(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 = Oe({
|
|
1968
1968
|
color: l,
|
|
1969
1969
|
fontWeight: 600,
|
|
1970
1970
|
...r.inlineLabelStyle
|
|
1971
|
-
}, { fontSize: 11 }), d =
|
|
1971
|
+
}, { fontSize: 11 }), d = Oe(r.inlineDescriptionStyle, {
|
|
1972
1972
|
fontSize: 11,
|
|
1973
1973
|
fillOpacity: .6
|
|
1974
1974
|
});
|
|
@@ -2026,11 +2026,11 @@ var gn = {
|
|
|
2026
2026
|
});
|
|
2027
2027
|
}
|
|
2028
2028
|
return e;
|
|
2029
|
-
}), ge = n(() => he.value.map((e) => e.label)), _e = n(() =>
|
|
2029
|
+
}), ge = n(() => he.value.map((e) => e.label)), _e = n(() => Ie.value + me.value.extraHeight), P = n(() => V.value.top + W.value + V.value.bottom + Qn), ye = n(() => {
|
|
2030
2030
|
let { min: e, max: t } = ce.value, n = (e) => f.yTickFormat === void 0 ? Se(e) : ne(e, f.yTickFormat);
|
|
2031
2031
|
return e === t ? [{
|
|
2032
2032
|
value: n(e),
|
|
2033
|
-
y: F(
|
|
2033
|
+
y: F(V.value.top + W.value / 2)
|
|
2034
2034
|
}] : (f.yScaleType === "log" ? I({
|
|
2035
2035
|
min: e,
|
|
2036
2036
|
max: t,
|
|
@@ -2039,7 +2039,7 @@ var gn = {
|
|
|
2039
2039
|
min: e,
|
|
2040
2040
|
max: t,
|
|
2041
2041
|
ticks: f.yTicks,
|
|
2042
|
-
targetTickCount:
|
|
2042
|
+
targetTickCount: W.value / 50
|
|
2043
2043
|
})).map((e) => ({
|
|
2044
2044
|
value: n(e),
|
|
2045
2045
|
y: F(le(e))
|
|
@@ -2054,9 +2054,9 @@ var gn = {
|
|
|
2054
2054
|
let xe = n(() => {
|
|
2055
2055
|
let { min: e, max: t } = se.value;
|
|
2056
2056
|
if (e === t) return [];
|
|
2057
|
-
let n = O.value, r = n ? 0 : oe.value, i = ie.value, a =
|
|
2057
|
+
let n = O.value, r = n ? 0 : oe.value, i = ie.value, a = U.value / 80, o, s;
|
|
2058
2058
|
if (n) {
|
|
2059
|
-
let n =
|
|
2059
|
+
let n = ln(e, t, a, E.value);
|
|
2060
2060
|
s = n.unit, o = Ce({
|
|
2061
2061
|
min: e,
|
|
2062
2062
|
max: t,
|
|
@@ -2073,7 +2073,7 @@ var gn = {
|
|
|
2073
2073
|
targetTickCount: a,
|
|
2074
2074
|
displayOffset: r
|
|
2075
2075
|
});
|
|
2076
|
-
let c =
|
|
2076
|
+
let c = V.value.left, l = V.value.left + U.value;
|
|
2077
2077
|
return o.map((e, t) => {
|
|
2078
2078
|
let n = F(M(e)), r = "middle";
|
|
2079
2079
|
return n - c <= 1 ? r = "start" : l - n <= 1 && (r = "end"), {
|
|
@@ -2083,14 +2083,14 @@ var gn = {
|
|
|
2083
2083
|
};
|
|
2084
2084
|
});
|
|
2085
2085
|
});
|
|
2086
|
-
function
|
|
2087
|
-
return typeof f.csv == "function" ? f.csv() : typeof f.csv == "string" ? f.csv :
|
|
2086
|
+
function Ee() {
|
|
2087
|
+
return typeof f.csv == "function" ? f.csv() : typeof f.csv == "string" ? f.csv : Ze(k.value);
|
|
2088
2088
|
}
|
|
2089
|
-
let
|
|
2090
|
-
let e =
|
|
2089
|
+
let L = n(() => !!f.tooltipData || !!f.tooltipTrigger), R = n(() => {
|
|
2090
|
+
let e = ze.value, t = k.value[0];
|
|
2091
2091
|
return e === null || !t ? null : j(t, e);
|
|
2092
|
-
}),
|
|
2093
|
-
function
|
|
2092
|
+
}), ke = n(() => R.value === null ? 0 : M(R.value));
|
|
2093
|
+
function Ae(e, t) {
|
|
2094
2094
|
let n = e.data.length;
|
|
2095
2095
|
if (n === 0) return null;
|
|
2096
2096
|
let r = 0, i = Infinity;
|
|
@@ -2102,13 +2102,13 @@ var gn = {
|
|
|
2102
2102
|
}
|
|
2103
2103
|
return i === Infinity ? null : r;
|
|
2104
2104
|
}
|
|
2105
|
-
let
|
|
2106
|
-
let e =
|
|
2105
|
+
let z = n(() => {
|
|
2106
|
+
let e = R.value;
|
|
2107
2107
|
if (e === null) return [];
|
|
2108
2108
|
let t = [];
|
|
2109
2109
|
for (let n of k.value) {
|
|
2110
2110
|
if (n.showInTooltip === !1) continue;
|
|
2111
|
-
let r =
|
|
2111
|
+
let r = Ae(n, e);
|
|
2112
2112
|
if (r === null) continue;
|
|
2113
2113
|
let i = n.data[r];
|
|
2114
2114
|
isFinite(i) && t.push({
|
|
@@ -2118,14 +2118,14 @@ var gn = {
|
|
|
2118
2118
|
});
|
|
2119
2119
|
}
|
|
2120
2120
|
return t;
|
|
2121
|
-
}),
|
|
2122
|
-
let e =
|
|
2121
|
+
}), je = n(() => {
|
|
2122
|
+
let e = ze.value, t = R.value;
|
|
2123
2123
|
if (e === null || t === null) return null;
|
|
2124
2124
|
let n = be(t, e), r = k.value, i = [];
|
|
2125
2125
|
for (let e = 0; e < r.length; e++) {
|
|
2126
2126
|
let n = r[e];
|
|
2127
2127
|
if (n.showInTooltip === !1) continue;
|
|
2128
|
-
let a =
|
|
2128
|
+
let a = Ae(n, t);
|
|
2129
2129
|
i.push({
|
|
2130
2130
|
value: a === null ? NaN : Number(n.data[a]),
|
|
2131
2131
|
color: n.color ?? "currentColor",
|
|
@@ -2139,21 +2139,21 @@ var gn = {
|
|
|
2139
2139
|
data: f.tooltipData?.[e] ?? null
|
|
2140
2140
|
};
|
|
2141
2141
|
});
|
|
2142
|
-
function
|
|
2142
|
+
function Me(e, t) {
|
|
2143
2143
|
return !isFinite(e) || !isFinite(t) ? null : {
|
|
2144
2144
|
x: M(e - oe.value),
|
|
2145
2145
|
y: le(t)
|
|
2146
2146
|
};
|
|
2147
2147
|
}
|
|
2148
|
-
function
|
|
2149
|
-
let t =
|
|
2148
|
+
function Ne(e) {
|
|
2149
|
+
let t = Pe.value?.getBoundingClientRect();
|
|
2150
2150
|
if (!t) return null;
|
|
2151
2151
|
let n = k.value[0];
|
|
2152
2152
|
if (!n || n.data.length === 0) return null;
|
|
2153
2153
|
let { min: r, max: i } = se.value, a = i - r || 1;
|
|
2154
|
-
return
|
|
2154
|
+
return Ae(n, r + (e - t.left - V.value.left) / U.value * a);
|
|
2155
2155
|
}
|
|
2156
|
-
let { containerRef:
|
|
2156
|
+
let { containerRef: Pe, svgRef: B, width: Fe, height: Ie, padding: V, legendY: H, inlineLegendLayout: Le, innerW: U, innerH: W, bounds: Re, hoverIndex: ze, tooltipRef: Be, tooltipPos: G, tooltipHandlers: K, menuItems: Ve, downloadLinkText: He, csvHref: Ue, downloadButtonText: q, triggerCsvDownload: J, menuFilename: We, isFullscreen: Ge, fullscreenStyle: Ke, teleportTarget: Y, exitFullscreen: qe } = Ct({
|
|
2157
2157
|
width: () => f.width,
|
|
2158
2158
|
height: () => f.height,
|
|
2159
2159
|
title: () => f.title,
|
|
@@ -2170,16 +2170,16 @@ var gn = {
|
|
|
2170
2170
|
fullscreenTarget: () => f.fullscreenTarget,
|
|
2171
2171
|
chartPadding: () => f.chartPadding,
|
|
2172
2172
|
inlineLegendLabels: () => ge.value,
|
|
2173
|
-
hasTooltipSlot: () =>
|
|
2174
|
-
getCsv:
|
|
2175
|
-
pointerToIndex:
|
|
2173
|
+
hasTooltipSlot: () => L.value,
|
|
2174
|
+
getCsv: Ee,
|
|
2175
|
+
pointerToIndex: Ne,
|
|
2176
2176
|
onHover: (e) => ee("hover", e),
|
|
2177
2177
|
extraBelowHeight: () => me.value.extraHeight
|
|
2178
|
-
}),
|
|
2178
|
+
}), Je = n(() => Oe(f.axisLabelStyle, { fontSize: 13 })), X = n(() => Oe(f.tickLabelStyle, {
|
|
2179
2179
|
fontSize: 10,
|
|
2180
|
-
fillOpacity:
|
|
2181
|
-
})),
|
|
2182
|
-
let e = f.titleStyle, t = e?.align ?? "left", n =
|
|
2180
|
+
fillOpacity: De
|
|
2181
|
+
})), Ye = n(() => Oe(f.legendStyle, { fontSize: 11 })), Xe = n(() => {
|
|
2182
|
+
let e = f.titleStyle, t = e?.align ?? "left", n = Re.value, r = t === "left" ? n.left : t === "right" ? n.right : n.left + n.width / 2, i = t === "left" ? "start" : t === "right" ? "end" : "middle";
|
|
2183
2183
|
return {
|
|
2184
2184
|
lines: (f.title ?? "").split("\n"),
|
|
2185
2185
|
fontSize: e?.fontSize ?? 14,
|
|
@@ -2189,8 +2189,8 @@ var gn = {
|
|
|
2189
2189
|
x: r,
|
|
2190
2190
|
anchor: i
|
|
2191
2191
|
};
|
|
2192
|
-
}),
|
|
2193
|
-
let e =
|
|
2192
|
+
}), Qe = n(() => {
|
|
2193
|
+
let e = Le.value.positions, t = V.value.left, n = H.value;
|
|
2194
2194
|
return he.value.map((r, i) => {
|
|
2195
2195
|
let a = e[i];
|
|
2196
2196
|
return {
|
|
@@ -2201,48 +2201,48 @@ var gn = {
|
|
|
2201
2201
|
});
|
|
2202
2202
|
});
|
|
2203
2203
|
return (n, l) => (_(), r(t, {
|
|
2204
|
-
to: C(
|
|
2205
|
-
disabled: !C(
|
|
2204
|
+
to: C(Y),
|
|
2205
|
+
disabled: !C(Ge)
|
|
2206
2206
|
}, [o("div", d({
|
|
2207
2207
|
ref_key: "containerRef",
|
|
2208
|
-
ref:
|
|
2208
|
+
ref: Pe
|
|
2209
2209
|
}, n.$attrs, {
|
|
2210
|
-
class: ["line-chart-wrapper", { "is-fullscreen": C(
|
|
2211
|
-
style: C(
|
|
2210
|
+
class: ["line-chart-wrapper", { "is-fullscreen": C(Ge) }],
|
|
2211
|
+
style: C(Ke)
|
|
2212
2212
|
}), [
|
|
2213
2213
|
c.menu ? (_(), r(ve, {
|
|
2214
2214
|
key: 0,
|
|
2215
|
-
items: C(
|
|
2216
|
-
"is-fullscreen": C(
|
|
2217
|
-
onClose: C(
|
|
2215
|
+
items: C(Ve),
|
|
2216
|
+
"is-fullscreen": C(Ge),
|
|
2217
|
+
onClose: C(qe)
|
|
2218
2218
|
}, null, 8, [
|
|
2219
2219
|
"items",
|
|
2220
2220
|
"is-fullscreen",
|
|
2221
2221
|
"onClose"
|
|
2222
2222
|
])) : i("", !0),
|
|
2223
|
-
o("div", gn,
|
|
2223
|
+
o("div", gn, x(C(Ge) ? "Chart expanded to fill window" : ""), 1),
|
|
2224
2224
|
(_(), a("svg", {
|
|
2225
2225
|
ref_key: "svgRef",
|
|
2226
|
-
ref:
|
|
2227
|
-
width: C(
|
|
2226
|
+
ref: B,
|
|
2227
|
+
width: C(Fe),
|
|
2228
2228
|
height: _e.value,
|
|
2229
2229
|
role: g.value || void 0,
|
|
2230
2230
|
"aria-label": p.value || void 0
|
|
2231
2231
|
}, [
|
|
2232
2232
|
c.title ? (_(), a("text", {
|
|
2233
2233
|
key: 0,
|
|
2234
|
-
x:
|
|
2235
|
-
y:
|
|
2236
|
-
"text-anchor":
|
|
2237
|
-
"font-size":
|
|
2238
|
-
"font-weight":
|
|
2239
|
-
fill:
|
|
2240
|
-
}, [(_(!0), a(e, null, y(
|
|
2234
|
+
x: Xe.value.x,
|
|
2235
|
+
y: Xe.value.lineHeight,
|
|
2236
|
+
"text-anchor": Xe.value.anchor,
|
|
2237
|
+
"font-size": Xe.value.fontSize,
|
|
2238
|
+
"font-weight": Xe.value.fontWeight,
|
|
2239
|
+
fill: Xe.value.color
|
|
2240
|
+
}, [(_(!0), a(e, null, y(Xe.value.lines, (e, t) => (_(), a("tspan", {
|
|
2241
2241
|
key: t,
|
|
2242
|
-
x:
|
|
2243
|
-
dy: t === 0 ? 0 :
|
|
2244
|
-
},
|
|
2245
|
-
|
|
2242
|
+
x: Xe.value.x,
|
|
2243
|
+
dy: t === 0 ? 0 : Xe.value.lineHeight
|
|
2244
|
+
}, x(e), 9, yn))), 128))], 8, vn)) : i("", !0),
|
|
2245
|
+
Qe.value.length > 0 ? (_(), a("g", bn, [(_(!0), a(e, null, y(Qe.value, (t, n) => (_(), a(e, { key: "ileg" + n }, [t.type === "series" ? (_(), a("line", {
|
|
2246
2246
|
key: 0,
|
|
2247
2247
|
x1: t.x,
|
|
2248
2248
|
y1: t.y,
|
|
@@ -2273,31 +2273,31 @@ var gn = {
|
|
|
2273
2273
|
}, null, 8, Cn)), o("text", {
|
|
2274
2274
|
x: t.x + 18,
|
|
2275
2275
|
y: t.y + 4,
|
|
2276
|
-
"font-size":
|
|
2277
|
-
fill:
|
|
2278
|
-
"font-weight":
|
|
2279
|
-
},
|
|
2276
|
+
"font-size": Ye.value.fontSize,
|
|
2277
|
+
fill: Ye.value.fill,
|
|
2278
|
+
"font-weight": Ye.value.fontWeight
|
|
2279
|
+
}, x(t.label), 9, wn)], 64))), 128))])) : i("", !0),
|
|
2280
2280
|
o("line", {
|
|
2281
|
-
x1: C(F)(C(
|
|
2282
|
-
y1: C(F)(C(
|
|
2283
|
-
x2: C(F)(C(
|
|
2284
|
-
y2: C(F)(C(
|
|
2281
|
+
x1: C(F)(C(V).left),
|
|
2282
|
+
y1: C(F)(C(V).top),
|
|
2283
|
+
x2: C(F)(C(V).left),
|
|
2284
|
+
y2: C(F)(C(V).top + C(W)),
|
|
2285
2285
|
stroke: "currentColor",
|
|
2286
2286
|
"stroke-opacity": "0.3"
|
|
2287
2287
|
}, null, 8, Tn),
|
|
2288
2288
|
o("line", {
|
|
2289
|
-
x1: C(F)(C(
|
|
2290
|
-
y1: C(F)(C(
|
|
2291
|
-
x2: C(F)(C(
|
|
2292
|
-
y2: C(F)(C(
|
|
2289
|
+
x1: C(F)(C(V).left),
|
|
2290
|
+
y1: C(F)(C(V).top + C(W)),
|
|
2291
|
+
x2: C(F)(C(V).left + C(U)),
|
|
2292
|
+
y2: C(F)(C(V).top + C(W)),
|
|
2293
2293
|
stroke: "currentColor",
|
|
2294
2294
|
"stroke-opacity": "0.3"
|
|
2295
2295
|
}, null, 8, En),
|
|
2296
2296
|
c.yGrid ? (_(!0), a(e, { key: 2 }, y(ye.value, (e, t) => (_(), a("line", {
|
|
2297
2297
|
key: "yg" + t,
|
|
2298
|
-
x1: C(
|
|
2298
|
+
x1: C(V).left,
|
|
2299
2299
|
y1: e.y,
|
|
2300
|
-
x2: C(
|
|
2300
|
+
x2: C(V).left + C(U),
|
|
2301
2301
|
y2: e.y,
|
|
2302
2302
|
stroke: "currentColor",
|
|
2303
2303
|
"stroke-opacity": "0.1"
|
|
@@ -2305,54 +2305,54 @@ var gn = {
|
|
|
2305
2305
|
c.xGrid ? (_(!0), a(e, { key: 3 }, y(xe.value, (e, t) => (_(), a("line", {
|
|
2306
2306
|
key: "xg" + t,
|
|
2307
2307
|
x1: e.x,
|
|
2308
|
-
y1: C(
|
|
2308
|
+
y1: C(V).top,
|
|
2309
2309
|
x2: e.x,
|
|
2310
|
-
y2: C(
|
|
2310
|
+
y2: C(V).top + C(W),
|
|
2311
2311
|
stroke: "currentColor",
|
|
2312
2312
|
"stroke-opacity": "0.1"
|
|
2313
2313
|
}, null, 8, On))), 128)) : i("", !0),
|
|
2314
2314
|
(_(!0), a(e, null, y(ye.value, (e, t) => (_(), a("text", {
|
|
2315
2315
|
key: "y" + t,
|
|
2316
2316
|
"data-testid": "y-tick",
|
|
2317
|
-
x: C(
|
|
2317
|
+
x: C(V).left - 6,
|
|
2318
2318
|
y: e.y,
|
|
2319
2319
|
"text-anchor": "end",
|
|
2320
2320
|
"dominant-baseline": "middle",
|
|
2321
|
-
"font-size":
|
|
2322
|
-
fill:
|
|
2323
|
-
"font-weight":
|
|
2324
|
-
"fill-opacity":
|
|
2325
|
-
},
|
|
2321
|
+
"font-size": X.value.fontSize,
|
|
2322
|
+
fill: X.value.fill,
|
|
2323
|
+
"font-weight": X.value.fontWeight,
|
|
2324
|
+
"fill-opacity": X.value.fillOpacity
|
|
2325
|
+
}, x(e.value), 9, kn))), 128)),
|
|
2326
2326
|
c.yLabel ? (_(), a("text", {
|
|
2327
2327
|
key: 4,
|
|
2328
2328
|
x: 0,
|
|
2329
2329
|
y: 0,
|
|
2330
|
-
transform: `translate(14, ${C(
|
|
2330
|
+
transform: `translate(14, ${C(V).top + C(W) / 2}) rotate(-90)`,
|
|
2331
2331
|
"text-anchor": "middle",
|
|
2332
|
-
"font-size":
|
|
2333
|
-
fill:
|
|
2334
|
-
"font-weight":
|
|
2335
|
-
},
|
|
2332
|
+
"font-size": Je.value.fontSize,
|
|
2333
|
+
fill: Je.value.fill,
|
|
2334
|
+
"font-weight": Je.value.fontWeight
|
|
2335
|
+
}, x(c.yLabel), 9, An)) : i("", !0),
|
|
2336
2336
|
(_(!0), a(e, null, y(xe.value, (e, t) => (_(), a("text", {
|
|
2337
2337
|
key: "x" + t,
|
|
2338
2338
|
"data-testid": "x-tick",
|
|
2339
2339
|
x: e.x,
|
|
2340
|
-
y: C(
|
|
2340
|
+
y: C(V).top + C(W) + 16,
|
|
2341
2341
|
"text-anchor": e.anchor,
|
|
2342
|
-
"font-size":
|
|
2343
|
-
fill:
|
|
2344
|
-
"font-weight":
|
|
2345
|
-
"fill-opacity":
|
|
2346
|
-
},
|
|
2342
|
+
"font-size": X.value.fontSize,
|
|
2343
|
+
fill: X.value.fill,
|
|
2344
|
+
"font-weight": X.value.fontWeight,
|
|
2345
|
+
"fill-opacity": X.value.fillOpacity
|
|
2346
|
+
}, x(e.value), 9, jn))), 128)),
|
|
2347
2347
|
c.xLabel ? (_(), a("text", {
|
|
2348
2348
|
key: 5,
|
|
2349
|
-
x: C(
|
|
2350
|
-
y: C(
|
|
2349
|
+
x: C(V).left + C(U) / 2,
|
|
2350
|
+
y: C(Ie) - 4,
|
|
2351
2351
|
"text-anchor": "middle",
|
|
2352
|
-
"font-size":
|
|
2353
|
-
fill:
|
|
2354
|
-
"font-weight":
|
|
2355
|
-
},
|
|
2352
|
+
"font-size": Je.value.fontSize,
|
|
2353
|
+
fill: Je.value.fill,
|
|
2354
|
+
"font-weight": Je.value.fontWeight
|
|
2355
|
+
}, x(c.xLabel), 9, Mn)) : i("", !0),
|
|
2356
2356
|
(_(!0), a(e, null, y(re.value, (e, t) => (_(), a("path", {
|
|
2357
2357
|
key: "area" + t,
|
|
2358
2358
|
d: fe(e),
|
|
@@ -2360,7 +2360,7 @@ var gn = {
|
|
|
2360
2360
|
"fill-opacity": e.opacity ?? .2,
|
|
2361
2361
|
stroke: "none",
|
|
2362
2362
|
style: h(e.blendMode ? { mixBlendMode: e.blendMode } : void 0)
|
|
2363
|
-
}, null, 12,
|
|
2363
|
+
}, null, 12, Nn))), 128)),
|
|
2364
2364
|
(_(!0), a(e, null, y(k.value, (t, n) => (_(), a(e, { key: n }, [
|
|
2365
2365
|
t.line !== !1 && t.outline ? (_(), a("path", {
|
|
2366
2366
|
key: 0,
|
|
@@ -2371,7 +2371,7 @@ var gn = {
|
|
|
2371
2371
|
"stroke-linecap": "round",
|
|
2372
2372
|
"stroke-linejoin": "round",
|
|
2373
2373
|
"data-testid": "line-outline"
|
|
2374
|
-
}, null, 8,
|
|
2374
|
+
}, null, 8, Pn)) : i("", !0),
|
|
2375
2375
|
t.line === !1 ? i("", !0) : (_(), a("path", {
|
|
2376
2376
|
key: 1,
|
|
2377
2377
|
d: ue(t),
|
|
@@ -2381,7 +2381,7 @@ var gn = {
|
|
|
2381
2381
|
"stroke-opacity": t.lineOpacity ?? t.opacity ?? c.lineOpacity,
|
|
2382
2382
|
"stroke-dasharray": t.dashed ? "6 3" : void 0,
|
|
2383
2383
|
style: h(t.blendMode ? { mixBlendMode: t.blendMode } : void 0)
|
|
2384
|
-
}, null, 12,
|
|
2384
|
+
}, null, 12, Fn)),
|
|
2385
2385
|
t.dots ? (_(!0), a(e, { key: 2 }, y(de(t), (e, n) => (_(), a("circle", {
|
|
2386
2386
|
key: n,
|
|
2387
2387
|
cx: e.x,
|
|
@@ -2391,7 +2391,7 @@ var gn = {
|
|
|
2391
2391
|
"fill-opacity": t.dotOpacity ?? t.opacity ?? c.lineOpacity,
|
|
2392
2392
|
stroke: t.dotStroke ?? "none",
|
|
2393
2393
|
style: h(t.blendMode ? { mixBlendMode: t.blendMode } : void 0)
|
|
2394
|
-
}, null, 12,
|
|
2394
|
+
}, null, 12, In))), 128)) : i("", !0)
|
|
2395
2395
|
], 64))), 128)),
|
|
2396
2396
|
(_(!0), a(e, null, y(c.areaSections ?? [], (t, n) => (_(), a(e, { key: "areasec" + n }, [
|
|
2397
2397
|
o("path", {
|
|
@@ -2399,7 +2399,7 @@ var gn = {
|
|
|
2399
2399
|
fill: t.color ?? (t.seriesIndex == null ? "#999" : k.value[t.seriesIndex]?.color ?? "currentColor"),
|
|
2400
2400
|
"fill-opacity": t.opacity ?? .15,
|
|
2401
2401
|
stroke: "none"
|
|
2402
|
-
}, null, 8,
|
|
2402
|
+
}, null, 8, Ln),
|
|
2403
2403
|
t.seriesIndex == null ? i("", !0) : (_(), a("path", {
|
|
2404
2404
|
key: 0,
|
|
2405
2405
|
d: pe(t, !1),
|
|
@@ -2407,53 +2407,53 @@ var gn = {
|
|
|
2407
2407
|
stroke: t.color ?? k.value[t.seriesIndex]?.color ?? "currentColor",
|
|
2408
2408
|
"stroke-width": t.strokeWidth ?? 2,
|
|
2409
2409
|
"stroke-dasharray": t.dashed ? "6 3" : void 0
|
|
2410
|
-
}, null, 8,
|
|
2410
|
+
}, null, 8, Rn)),
|
|
2411
2411
|
t.seriesIndex == null ? (_(), a(e, { key: 1 }, [o("line", {
|
|
2412
2412
|
x1: C(F)(N(t, "start")),
|
|
2413
|
-
y1: C(
|
|
2413
|
+
y1: C(V).top,
|
|
2414
2414
|
x2: C(F)(N(t, "start")),
|
|
2415
|
-
y2: C(
|
|
2415
|
+
y2: C(V).top + C(W),
|
|
2416
2416
|
stroke: t.color ?? "#999",
|
|
2417
2417
|
"stroke-width": t.strokeWidth ?? 2,
|
|
2418
2418
|
"stroke-dasharray": t.dashed ? "6 3" : void 0
|
|
2419
|
-
}, null, 8,
|
|
2419
|
+
}, null, 8, zn), o("line", {
|
|
2420
2420
|
x1: C(F)(N(t, "end")),
|
|
2421
|
-
y1: C(
|
|
2421
|
+
y1: C(V).top,
|
|
2422
2422
|
x2: C(F)(N(t, "end")),
|
|
2423
|
-
y2: C(
|
|
2423
|
+
y2: C(V).top + C(W),
|
|
2424
2424
|
stroke: t.color ?? "#999",
|
|
2425
2425
|
"stroke-width": t.strokeWidth ?? 2,
|
|
2426
2426
|
"stroke-dasharray": t.dashed ? "6 3" : void 0
|
|
2427
|
-
}, null, 8,
|
|
2427
|
+
}, null, 8, Bn)], 64)) : i("", !0),
|
|
2428
2428
|
o("line", {
|
|
2429
2429
|
x1: C(F)(N(t, "start")),
|
|
2430
|
-
y1: C(
|
|
2430
|
+
y1: C(V).top + C(W) - 4,
|
|
2431
2431
|
x2: C(F)(N(t, "start")),
|
|
2432
|
-
y2: C(
|
|
2432
|
+
y2: C(V).top + C(W) + 4,
|
|
2433
2433
|
stroke: "currentColor",
|
|
2434
2434
|
"stroke-opacity": "0.4"
|
|
2435
|
-
}, null, 8,
|
|
2435
|
+
}, null, 8, Vn),
|
|
2436
2436
|
o("line", {
|
|
2437
2437
|
x1: C(F)(N(t, "end")),
|
|
2438
|
-
y1: C(
|
|
2438
|
+
y1: C(V).top + C(W) - 4,
|
|
2439
2439
|
x2: C(F)(N(t, "end")),
|
|
2440
|
-
y2: C(
|
|
2440
|
+
y2: C(V).top + C(W) + 4,
|
|
2441
2441
|
stroke: "currentColor",
|
|
2442
2442
|
"stroke-opacity": "0.4"
|
|
2443
|
-
}, null, 8,
|
|
2443
|
+
}, null, 8, Hn)
|
|
2444
2444
|
], 64))), 128)),
|
|
2445
|
-
|
|
2445
|
+
L.value && C(ze) !== null ? (_(), a("line", {
|
|
2446
2446
|
key: 6,
|
|
2447
|
-
x1: C(F)(
|
|
2448
|
-
y1: C(
|
|
2449
|
-
x2: C(F)(
|
|
2450
|
-
y2: C(
|
|
2447
|
+
x1: C(F)(ke.value),
|
|
2448
|
+
y1: C(V).top,
|
|
2449
|
+
x2: C(F)(ke.value),
|
|
2450
|
+
y2: C(V).top + C(W),
|
|
2451
2451
|
stroke: "currentColor",
|
|
2452
2452
|
"stroke-opacity": "0.3",
|
|
2453
2453
|
"stroke-dasharray": "4 2",
|
|
2454
2454
|
"pointer-events": "none"
|
|
2455
|
-
}, null, 8,
|
|
2456
|
-
(_(!0), a(e, null, y(
|
|
2455
|
+
}, null, 8, Q)) : i("", !0),
|
|
2456
|
+
(_(!0), a(e, null, y(z.value, (e, t) => (_(), a("circle", {
|
|
2457
2457
|
key: "hd" + t,
|
|
2458
2458
|
cx: e.x,
|
|
2459
2459
|
cy: e.y,
|
|
@@ -2463,23 +2463,23 @@ var gn = {
|
|
|
2463
2463
|
"stroke-width": "2",
|
|
2464
2464
|
"pointer-events": "none"
|
|
2465
2465
|
}, null, 8, Un))), 128)),
|
|
2466
|
-
|
|
2466
|
+
L.value ? (_(), a("rect", d({
|
|
2467
2467
|
key: 7,
|
|
2468
|
-
x: C(
|
|
2469
|
-
y: C(
|
|
2470
|
-
width: C(
|
|
2471
|
-
height: C(
|
|
2468
|
+
x: C(V).left,
|
|
2469
|
+
y: C(V).top,
|
|
2470
|
+
width: C(U),
|
|
2471
|
+
height: C(W),
|
|
2472
2472
|
fill: "transparent",
|
|
2473
2473
|
style: {
|
|
2474
2474
|
cursor: "crosshair",
|
|
2475
2475
|
"touch-action": "pan-y"
|
|
2476
2476
|
}
|
|
2477
|
-
},
|
|
2478
|
-
c.annotations && c.annotations.length > 0 ? (_(), r(C(
|
|
2477
|
+
}, te(C(K), !0)), null, 16, Wn)) : i("", !0),
|
|
2478
|
+
c.annotations && c.annotations.length > 0 ? (_(), r(C(bt), {
|
|
2479
2479
|
key: 8,
|
|
2480
2480
|
annotations: c.annotations,
|
|
2481
|
-
project:
|
|
2482
|
-
bounds: C(
|
|
2481
|
+
project: Me,
|
|
2482
|
+
bounds: C(Re)
|
|
2483
2483
|
}, null, 8, ["annotations", "bounds"])) : i("", !0),
|
|
2484
2484
|
(_(!0), a(e, null, y(me.value.labels, (e, t) => (_(), a("g", { key: "seclab" + t }, [
|
|
2485
2485
|
o("circle", {
|
|
@@ -2498,7 +2498,7 @@ var gn = {
|
|
|
2498
2498
|
"font-size": e.labelStyle.fontSize,
|
|
2499
2499
|
"font-weight": e.labelStyle.fontWeight,
|
|
2500
2500
|
fill: e.labelStyle.fill
|
|
2501
|
-
},
|
|
2501
|
+
}, x(e.labelText), 9, Kn)) : i("", !0),
|
|
2502
2502
|
e.descText ? (_(), a("text", {
|
|
2503
2503
|
key: 1,
|
|
2504
2504
|
x: e.cx - e.textWidth / 2 + 8,
|
|
@@ -2507,41 +2507,41 @@ var gn = {
|
|
|
2507
2507
|
"font-weight": e.descStyle.fontWeight,
|
|
2508
2508
|
fill: e.descStyle.fill,
|
|
2509
2509
|
"fill-opacity": e.descStyle.fillOpacity
|
|
2510
|
-
},
|
|
2510
|
+
}, x(e.descText), 9, qn)) : i("", !0)
|
|
2511
2511
|
]))), 128))
|
|
2512
2512
|
], 8, _n)),
|
|
2513
|
-
|
|
2513
|
+
L.value && C(ze) !== null && je.value ? (_(), a("div", {
|
|
2514
2514
|
key: 1,
|
|
2515
2515
|
ref_key: "tooltipRef",
|
|
2516
|
-
ref:
|
|
2516
|
+
ref: Be,
|
|
2517
2517
|
class: "chart-tooltip-content",
|
|
2518
2518
|
style: h({
|
|
2519
2519
|
position: "absolute",
|
|
2520
2520
|
top: "0",
|
|
2521
2521
|
left: "0",
|
|
2522
2522
|
willChange: "transform",
|
|
2523
|
-
transform: C(
|
|
2524
|
-
visibility: C(
|
|
2523
|
+
transform: C(G) ? `translate3d(${C(G).left}px, ${C(G).top}px, 0) translateY(-50%)` : "translateY(-50%)",
|
|
2524
|
+
visibility: C(G) ? "visible" : "hidden"
|
|
2525
2525
|
})
|
|
2526
|
-
}, [
|
|
2526
|
+
}, [b(n.$slots, "tooltip", m(u(je.value)), () => [o("div", Jn, [je.value.xLabel ? (_(), a("div", Yn, x(je.value.xLabel), 1)) : i("", !0), (_(!0), a(e, null, y(je.value.values, (e) => (_(), a("div", {
|
|
2527
2527
|
key: e.seriesIndex,
|
|
2528
2528
|
class: "line-chart-tooltip-row"
|
|
2529
2529
|
}, [o("span", {
|
|
2530
2530
|
class: "line-chart-tooltip-swatch",
|
|
2531
2531
|
style: h({ background: e.color })
|
|
2532
|
-
}, null, 4), s(" " +
|
|
2533
|
-
C(
|
|
2532
|
+
}, null, 4), s(" " + x(isFinite(e.value) ? C(T)(e.value) : "—"), 1)]))), 128))])], !0)], 4)) : i("", !0),
|
|
2533
|
+
C(He) ? (_(), a("a", {
|
|
2534
2534
|
key: 2,
|
|
2535
2535
|
class: "line-chart-download-link",
|
|
2536
|
-
href: C(
|
|
2537
|
-
download: `${C(
|
|
2538
|
-
},
|
|
2539
|
-
C(
|
|
2536
|
+
href: C(Ue),
|
|
2537
|
+
download: `${C(We)()}.csv`
|
|
2538
|
+
}, x(C(He)), 9, Xn)) : i("", !0),
|
|
2539
|
+
C(q) ? (_(), a("button", {
|
|
2540
2540
|
key: 3,
|
|
2541
2541
|
type: "button",
|
|
2542
2542
|
class: "line-chart-download-button",
|
|
2543
|
-
onClick: l[0] ||= (...e) => C(
|
|
2544
|
-
},
|
|
2543
|
+
onClick: l[0] ||= (...e) => C(J) && C(J)(...e)
|
|
2544
|
+
}, x(C(q)), 1)) : i("", !0)
|
|
2545
2545
|
], 16)], 8, ["to", "disabled"]));
|
|
2546
2546
|
}
|
|
2547
2547
|
}), [["__scopeId", "data-v-7e41f1cc"]]), nr = {
|
|
@@ -2680,7 +2680,7 @@ var gn = {
|
|
|
2680
2680
|
], Er = { class: "bar-chart-tooltip" }, Dr = {
|
|
2681
2681
|
key: 0,
|
|
2682
2682
|
class: "bar-chart-tooltip-label"
|
|
2683
|
-
},
|
|
2683
|
+
}, Or = ["href", "download"], kr = 22, Ar = 2, jr = 11, Mr = .6, Nr = 4, Pr = 4, Fr = /*#__PURE__*/ P(/* @__PURE__ */ l({
|
|
2684
2684
|
inheritAttrs: !1,
|
|
2685
2685
|
__name: "BarChart",
|
|
2686
2686
|
props: {
|
|
@@ -2770,9 +2770,9 @@ var gn = {
|
|
|
2770
2770
|
return t;
|
|
2771
2771
|
}), D = n(() => {
|
|
2772
2772
|
let e = f.categories;
|
|
2773
|
-
if (!e || e.length === 0 || !
|
|
2773
|
+
if (!e || e.length === 0 || !an(e, "utc")) return null;
|
|
2774
2774
|
let t = Array(e.length);
|
|
2775
|
-
for (let n = 0; n < e.length; n++) t[n] =
|
|
2775
|
+
for (let n = 0; n < e.length; n++) t[n] = nn(e[n], "utc") ?? NaN;
|
|
2776
2776
|
return t;
|
|
2777
2777
|
}), O = n(() => f.orientation === "vertical"), k = n(() => {
|
|
2778
2778
|
let e = Infinity, t = -Infinity, n = Infinity, r = (e) => {
|
|
@@ -2802,7 +2802,7 @@ var gn = {
|
|
|
2802
2802
|
max: a.max,
|
|
2803
2803
|
range: a.max - a.min || 1
|
|
2804
2804
|
};
|
|
2805
|
-
}), re = n(() => O.value ?
|
|
2805
|
+
}), re = n(() => O.value ? V.value : H.value), ie = n(() => O.value ? H.value : V.value), A = n(() => {
|
|
2806
2806
|
let e = T.value;
|
|
2807
2807
|
return e > 0 ? re.value / e : 0;
|
|
2808
2808
|
}), j = n(() => A.value * (1 - f.barPadding)), ae = n(() => {
|
|
@@ -2813,7 +2813,7 @@ var gn = {
|
|
|
2813
2813
|
return Math.max(1, (j.value - t) / e);
|
|
2814
2814
|
});
|
|
2815
2815
|
function oe(e) {
|
|
2816
|
-
return (O.value ?
|
|
2816
|
+
return (O.value ? B.value.left : B.value.top) + e * A.value;
|
|
2817
2817
|
}
|
|
2818
2818
|
let se = n(() => {
|
|
2819
2819
|
let { min: e, max: t } = k.value, n = f.valueMin ?? 0;
|
|
@@ -2821,7 +2821,7 @@ var gn = {
|
|
|
2821
2821
|
});
|
|
2822
2822
|
function M(e) {
|
|
2823
2823
|
let { min: t, max: n } = k.value, r = we(e, t, n, f.valueScaleType);
|
|
2824
|
-
return O.value ?
|
|
2824
|
+
return O.value ? B.value.top + H.value - r * H.value : B.value.left + r * V.value;
|
|
2825
2825
|
}
|
|
2826
2826
|
function ce(e, t, n, r, i, a, o, s, c, l) {
|
|
2827
2827
|
let u = Math.min(e, t), d = Math.abs(e - t);
|
|
@@ -2888,12 +2888,12 @@ var gn = {
|
|
|
2888
2888
|
};
|
|
2889
2889
|
}
|
|
2890
2890
|
function de(e, t, n) {
|
|
2891
|
-
let r = (O.value ?
|
|
2891
|
+
let r = (O.value ? B.value.left : B.value.top) + (e + .5) * A.value, i = n.max - n.min || 1, a = (t - n.min) / i;
|
|
2892
2892
|
return O.value ? {
|
|
2893
2893
|
x: r,
|
|
2894
|
-
y:
|
|
2894
|
+
y: B.value.top + H.value - a * H.value
|
|
2895
2895
|
} : {
|
|
2896
|
-
x:
|
|
2896
|
+
x: B.value.left + a * V.value,
|
|
2897
2897
|
y: r
|
|
2898
2898
|
};
|
|
2899
2899
|
}
|
|
@@ -2949,7 +2949,7 @@ var gn = {
|
|
|
2949
2949
|
function ge(e) {
|
|
2950
2950
|
return he[e % he.length];
|
|
2951
2951
|
}
|
|
2952
|
-
let _e =
|
|
2952
|
+
let _e = wt(() => f.tooltipValueFormat, () => f.valueTickFormat), P = n(() => {
|
|
2953
2953
|
let { min: e, max: t } = k.value, n = (e) => f.valueTickFormat === void 0 ? Se(e) : ne(e, f.valueTickFormat);
|
|
2954
2954
|
if (e === t) return [{
|
|
2955
2955
|
value: n(e),
|
|
@@ -2975,7 +2975,7 @@ var gn = {
|
|
|
2975
2975
|
let e = Infinity, n = -Infinity;
|
|
2976
2976
|
for (let r of t) Number.isFinite(r) && (r < e && (e = r), r > n && (n = r));
|
|
2977
2977
|
if (!Number.isFinite(e) || e === n) return [];
|
|
2978
|
-
let r = O.value ?
|
|
2978
|
+
let r = O.value ? V.value : H.value, i = Math.max(2, Math.floor(r / 80)), a = ln(e, n, i, "utc"), o = a.unit, s = [], c = /* @__PURE__ */ new Set();
|
|
2979
2979
|
for (let e of a.values) {
|
|
2980
2980
|
let n = -1, r = Infinity;
|
|
2981
2981
|
for (let i = 0; i < t.length; i++) {
|
|
@@ -3022,19 +3022,19 @@ var gn = {
|
|
|
3022
3022
|
});
|
|
3023
3023
|
}), e;
|
|
3024
3024
|
}), xe = n(() => be.value.map((e) => e.label));
|
|
3025
|
-
function
|
|
3025
|
+
function Ee() {
|
|
3026
3026
|
if (typeof f.csv == "function") return f.csv();
|
|
3027
3027
|
if (typeof f.csv == "string") return f.csv;
|
|
3028
3028
|
let e = w.value.map((e) => ({
|
|
3029
3029
|
label: e.legend,
|
|
3030
3030
|
data: e.data
|
|
3031
3031
|
}));
|
|
3032
|
-
return
|
|
3032
|
+
return Qe(E.value, e);
|
|
3033
3033
|
}
|
|
3034
|
-
let
|
|
3035
|
-
function
|
|
3034
|
+
let L = n(() => !!f.tooltipData || !!f.tooltipTrigger);
|
|
3035
|
+
function R(e, t) {
|
|
3036
3036
|
if (!isFinite(e) || !isFinite(t) || A.value === 0) return null;
|
|
3037
|
-
let n = (O.value ?
|
|
3037
|
+
let n = (O.value ? B.value.left : B.value.top) + (e + .5) * A.value, r = M(t);
|
|
3038
3038
|
return O.value ? {
|
|
3039
3039
|
x: n,
|
|
3040
3040
|
y: r
|
|
@@ -3043,16 +3043,16 @@ var gn = {
|
|
|
3043
3043
|
y: n
|
|
3044
3044
|
};
|
|
3045
3045
|
}
|
|
3046
|
-
function
|
|
3047
|
-
let n =
|
|
3046
|
+
function ke(e, t) {
|
|
3047
|
+
let n = je.value?.getBoundingClientRect();
|
|
3048
3048
|
if (!n) return null;
|
|
3049
3049
|
let r = T.value;
|
|
3050
3050
|
if (r === 0 || A.value === 0) return null;
|
|
3051
|
-
let i = O.value ? e - n.left -
|
|
3051
|
+
let i = O.value ? e - n.left - B.value.left : t - n.top - B.value.top;
|
|
3052
3052
|
return Math.max(0, Math.min(r - 1, Math.floor(i / A.value)));
|
|
3053
3053
|
}
|
|
3054
|
-
let
|
|
3055
|
-
let e =
|
|
3054
|
+
let Ae = n(() => !!(f.categoryHeader || f.valueHeader)), z = n(() => {
|
|
3055
|
+
let e = Ae.value ? kr : 0, t = f.chartPadding;
|
|
3056
3056
|
return e ? t == null ? { top: e } : typeof t == "number" ? {
|
|
3057
3057
|
top: t + e,
|
|
3058
3058
|
right: t,
|
|
@@ -3062,7 +3062,7 @@ var gn = {
|
|
|
3062
3062
|
...t,
|
|
3063
3063
|
top: (t.top ?? 0) + e
|
|
3064
3064
|
} : t;
|
|
3065
|
-
}), { containerRef:
|
|
3065
|
+
}), { containerRef: je, svgRef: Me, width: Ne, height: Pe, padding: B, legendY: Fe, inlineLegendLayout: Ie, innerW: V, innerH: H, bounds: Le, hoverIndex: U, tooltipRef: W, tooltipPos: Re, tooltipHandlers: ze, menuItems: Be, downloadLinkText: G, csvHref: K, downloadButtonText: Ve, triggerCsvDownload: He, menuFilename: Ue, isFullscreen: q, fullscreenStyle: J, teleportTarget: We, exitFullscreen: Ge } = Ct({
|
|
3066
3066
|
width: () => f.width,
|
|
3067
3067
|
height: () => f.height,
|
|
3068
3068
|
title: () => f.title,
|
|
@@ -3077,18 +3077,18 @@ var gn = {
|
|
|
3077
3077
|
downloadLink: () => f.downloadLink,
|
|
3078
3078
|
downloadButton: () => f.downloadButton,
|
|
3079
3079
|
fullscreenTarget: () => f.fullscreenTarget,
|
|
3080
|
-
chartPadding: () =>
|
|
3080
|
+
chartPadding: () => z.value,
|
|
3081
3081
|
inlineLegendLabels: () => xe.value,
|
|
3082
|
-
hasTooltipSlot: () =>
|
|
3083
|
-
getCsv:
|
|
3084
|
-
pointerToIndex:
|
|
3082
|
+
hasTooltipSlot: () => L.value,
|
|
3083
|
+
getCsv: Ee,
|
|
3084
|
+
pointerToIndex: ke,
|
|
3085
3085
|
scrubAxis: () => O.value ? "x" : "y",
|
|
3086
3086
|
onHover: (e) => ee("hover", e)
|
|
3087
|
-
}),
|
|
3087
|
+
}), Ke = n(() => Oe(f.axisLabelStyle, { fontSize: 13 })), Y = n(() => Oe(f.tickLabelStyle, {
|
|
3088
3088
|
fontSize: 10,
|
|
3089
|
-
fillOpacity:
|
|
3090
|
-
})),
|
|
3091
|
-
let e = f.titleStyle, t = e?.align ?? "left", n =
|
|
3089
|
+
fillOpacity: De
|
|
3090
|
+
})), qe = n(() => Oe(f.legendStyle, { fontSize: 11 })), Je = n(() => f.categoryAlign === "start" && !O.value ? Ar : B.value.left), X = n(() => {
|
|
3091
|
+
let e = f.titleStyle, t = e?.align ?? "left", n = Le.value, r = t === "left" ? Je.value : t === "right" ? n.right : n.left + n.width / 2, i = t === "left" ? "start" : t === "right" ? "end" : "middle";
|
|
3092
3092
|
return {
|
|
3093
3093
|
lines: (f.title ?? "").split("\n"),
|
|
3094
3094
|
fontSize: e?.fontSize ?? 14,
|
|
@@ -3098,13 +3098,13 @@ var gn = {
|
|
|
3098
3098
|
x: r,
|
|
3099
3099
|
anchor: i
|
|
3100
3100
|
};
|
|
3101
|
-
}),
|
|
3102
|
-
let e =
|
|
3101
|
+
}), Ye = n(() => {
|
|
3102
|
+
let e = U.value;
|
|
3103
3103
|
if (e === null) return;
|
|
3104
3104
|
let t = D.value;
|
|
3105
3105
|
return t && Number.isFinite(t[e]) ? hn(t[e], f.dateFormat, "utc") : E.value[e];
|
|
3106
|
-
}),
|
|
3107
|
-
let e =
|
|
3106
|
+
}), Xe = n(() => {
|
|
3107
|
+
let e = U.value;
|
|
3108
3108
|
if (e === null) return null;
|
|
3109
3109
|
let t = w.value, n = [];
|
|
3110
3110
|
for (let r = 0; r < t.length; r++) {
|
|
@@ -3121,23 +3121,23 @@ var gn = {
|
|
|
3121
3121
|
values: n,
|
|
3122
3122
|
data: f.tooltipData?.[e] ?? null
|
|
3123
3123
|
};
|
|
3124
|
-
}),
|
|
3125
|
-
let e =
|
|
3124
|
+
}), Ze = n(() => {
|
|
3125
|
+
let e = U.value;
|
|
3126
3126
|
if (e === null) return null;
|
|
3127
3127
|
let t = oe(e);
|
|
3128
3128
|
return O.value ? {
|
|
3129
3129
|
x: t,
|
|
3130
|
-
y:
|
|
3130
|
+
y: B.value.top,
|
|
3131
3131
|
w: A.value,
|
|
3132
|
-
h:
|
|
3132
|
+
h: H.value
|
|
3133
3133
|
} : {
|
|
3134
|
-
x:
|
|
3134
|
+
x: B.value.left,
|
|
3135
3135
|
y: t,
|
|
3136
|
-
w:
|
|
3136
|
+
w: V.value,
|
|
3137
3137
|
h: A.value
|
|
3138
3138
|
};
|
|
3139
|
-
}),
|
|
3140
|
-
let e =
|
|
3139
|
+
}), $e = n(() => {
|
|
3140
|
+
let e = Ie.value.positions, t = Je.value, n = Fe.value;
|
|
3141
3141
|
return be.value.map((r, i) => {
|
|
3142
3142
|
let a = e[i];
|
|
3143
3143
|
return {
|
|
@@ -3146,7 +3146,7 @@ var gn = {
|
|
|
3146
3146
|
y: n + a.row * 20
|
|
3147
3147
|
};
|
|
3148
3148
|
});
|
|
3149
|
-
}),
|
|
3149
|
+
}), et = n(() => {
|
|
3150
3150
|
let e = f.barLabels;
|
|
3151
3151
|
if (!e) return null;
|
|
3152
3152
|
let t = e === !0 ? {} : e;
|
|
@@ -3157,37 +3157,37 @@ var gn = {
|
|
|
3157
3157
|
align: t.align ?? "center",
|
|
3158
3158
|
overlap: t.overlap ?? "shift",
|
|
3159
3159
|
minSize: t.minSize ?? 0,
|
|
3160
|
-
fontSize: t.fontSize ??
|
|
3160
|
+
fontSize: t.fontSize ?? jr,
|
|
3161
3161
|
fontWeight: t.fontWeight
|
|
3162
3162
|
};
|
|
3163
3163
|
});
|
|
3164
|
-
function
|
|
3165
|
-
let n =
|
|
3164
|
+
function tt(e, t) {
|
|
3165
|
+
let n = et.value?.format;
|
|
3166
3166
|
return typeof n == "function" ? n(e, t) : n === void 0 ? f.valueTickFormat === void 0 ? Se(e) : ne(e, f.valueTickFormat) : ne(e, n);
|
|
3167
3167
|
}
|
|
3168
|
-
function
|
|
3168
|
+
function nt(e, t, n) {
|
|
3169
3169
|
for (let r = le.value.length - 1; r >= 0; r--) {
|
|
3170
3170
|
let i = le.value[r];
|
|
3171
3171
|
if (i.categoryIndex === e && t >= i.x && t <= i.x + i.w && n >= i.y && n <= i.y + i.h) return i.color;
|
|
3172
3172
|
}
|
|
3173
3173
|
return null;
|
|
3174
3174
|
}
|
|
3175
|
-
let
|
|
3176
|
-
let e =
|
|
3175
|
+
let rt = n(() => {
|
|
3176
|
+
let e = et.value;
|
|
3177
3177
|
if (!e) return [];
|
|
3178
3178
|
let t = O.value, n = e.fontSize, r = [];
|
|
3179
3179
|
for (let i of le.value) {
|
|
3180
|
-
let a =
|
|
3180
|
+
let a = tt(i.value, {
|
|
3181
3181
|
value: i.value,
|
|
3182
3182
|
categoryIndex: i.categoryIndex,
|
|
3183
3183
|
seriesIndex: i.seriesIndex,
|
|
3184
3184
|
category: E.value[i.categoryIndex] ?? String(i.categoryIndex)
|
|
3185
3185
|
});
|
|
3186
3186
|
if (!a) continue;
|
|
3187
|
-
let o = t ? i.h : i.w, s = a.length * n *
|
|
3188
|
-
if (f = t ? i.x + i.w / 2 : i.y + i.h / 2, !l) u = m +
|
|
3189
|
-
else if (e.align === "start") u = h +
|
|
3190
|
-
else if (e.align === "end") d = m -
|
|
3187
|
+
let o = t ? i.h : i.w, s = a.length * n * Mr, c = o >= s + 2 * Nr && o >= e.minSize, l = e.placement === "inside" || e.placement !== "outside" && 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;
|
|
3188
|
+
if (f = t ? i.x + i.w / 2 : i.y + i.h / 2, !l) u = m + Nr, d = u + g, p = "start";
|
|
3189
|
+
else if (e.align === "start") u = h + Nr, d = u + g, p = "start";
|
|
3190
|
+
else if (e.align === "end") d = m - Nr, u = d - g, p = "end";
|
|
3191
3191
|
else {
|
|
3192
3192
|
let e = (m + h) / 2;
|
|
3193
3193
|
u = e - g / 2, d = e + g / 2, p = "middle";
|
|
@@ -3204,7 +3204,7 @@ var gn = {
|
|
|
3204
3204
|
hidden: !1
|
|
3205
3205
|
});
|
|
3206
3206
|
}
|
|
3207
|
-
let i = t ? -
|
|
3207
|
+
let i = t ? -B.value.top : Ne.value - 2, a = /* @__PURE__ */ new Map();
|
|
3208
3208
|
for (let e of r) {
|
|
3209
3209
|
let t = a.get(e.bar.categoryIndex);
|
|
3210
3210
|
t ? t.push(e) : a.set(e.bar.categoryIndex, [e]);
|
|
@@ -3213,12 +3213,12 @@ var gn = {
|
|
|
3213
3213
|
t.sort((e, t) => e.lo - t.lo);
|
|
3214
3214
|
let n = -Infinity;
|
|
3215
3215
|
for (let r of t) {
|
|
3216
|
-
if (r.lo < n +
|
|
3216
|
+
if (r.lo < n + Pr) {
|
|
3217
3217
|
if (e.overlap === "hide") {
|
|
3218
3218
|
r.hidden = !0;
|
|
3219
3219
|
continue;
|
|
3220
3220
|
}
|
|
3221
|
-
let t = n +
|
|
3221
|
+
let t = n + Pr - r.lo;
|
|
3222
3222
|
r.lo += t, r.hi += t, r.inside = !1, r.svgAnchor = "start";
|
|
3223
3223
|
}
|
|
3224
3224
|
if (r.hi > i) {
|
|
@@ -3235,10 +3235,10 @@ var gn = {
|
|
|
3235
3235
|
t ? (r = i.cross, a = -((i.lo + i.hi) / 2), c = "middle") : (c = i.svgAnchor, r = c === "start" ? i.lo : c === "end" ? i.hi : (i.lo + i.hi) / 2, a = i.cross);
|
|
3236
3236
|
let l;
|
|
3237
3237
|
if (!o) l = e.color;
|
|
3238
|
-
else if (i.inside) l =
|
|
3238
|
+
else if (i.inside) l = At(i.bar.color);
|
|
3239
3239
|
else {
|
|
3240
|
-
let e = t ? i.cross : (i.lo + i.hi) / 2, n = t ? -((i.lo + i.hi) / 2) : i.cross, r =
|
|
3241
|
-
l = r ?
|
|
3240
|
+
let e = t ? i.cross : (i.lo + i.hi) / 2, n = t ? -((i.lo + i.hi) / 2) : i.cross, r = nt(i.bar.categoryIndex, e, n);
|
|
3241
|
+
l = r ? At(r) : "currentColor";
|
|
3242
3242
|
}
|
|
3243
3243
|
s.push({
|
|
3244
3244
|
key: `${i.bar.categoryIndex}-${i.bar.seriesIndex}`,
|
|
@@ -3252,36 +3252,36 @@ var gn = {
|
|
|
3252
3252
|
});
|
|
3253
3253
|
}
|
|
3254
3254
|
return s;
|
|
3255
|
-
}),
|
|
3256
|
-
let e =
|
|
3255
|
+
}), it = n(() => {
|
|
3256
|
+
let e = B.value.left - 6;
|
|
3257
3257
|
switch (f.categoryAlign ?? "end") {
|
|
3258
3258
|
case "start": return {
|
|
3259
3259
|
anchor: "start",
|
|
3260
|
-
x:
|
|
3260
|
+
x: Ar
|
|
3261
3261
|
};
|
|
3262
3262
|
case "center": return {
|
|
3263
3263
|
anchor: "middle",
|
|
3264
|
-
x: (
|
|
3264
|
+
x: (Ar + e) / 2
|
|
3265
3265
|
};
|
|
3266
3266
|
default: return {
|
|
3267
3267
|
anchor: "end",
|
|
3268
3268
|
x: e
|
|
3269
3269
|
};
|
|
3270
3270
|
}
|
|
3271
|
-
}),
|
|
3272
|
-
let e = [], t =
|
|
3271
|
+
}), at = n(() => {
|
|
3272
|
+
let e = [], t = B.value.top - 7;
|
|
3273
3273
|
if (f.valueHeader && e.push({
|
|
3274
3274
|
key: "vh",
|
|
3275
3275
|
text: f.valueHeader,
|
|
3276
|
-
x:
|
|
3276
|
+
x: B.value.left,
|
|
3277
3277
|
y: t,
|
|
3278
3278
|
anchor: "start"
|
|
3279
3279
|
}), f.categoryHeader) {
|
|
3280
|
-
let n = !O.value, r =
|
|
3280
|
+
let n = !O.value, r = it.value;
|
|
3281
3281
|
e.push({
|
|
3282
3282
|
key: "ch",
|
|
3283
3283
|
text: f.categoryHeader,
|
|
3284
|
-
x: n ? r.x :
|
|
3284
|
+
x: n ? r.x : B.value.left,
|
|
3285
3285
|
y: t,
|
|
3286
3286
|
anchor: n ? r.anchor : "start"
|
|
3287
3287
|
});
|
|
@@ -3289,58 +3289,58 @@ var gn = {
|
|
|
3289
3289
|
return e;
|
|
3290
3290
|
});
|
|
3291
3291
|
return (n, l) => (_(), r(t, {
|
|
3292
|
-
to: C(
|
|
3293
|
-
disabled: !C(
|
|
3292
|
+
to: C(We),
|
|
3293
|
+
disabled: !C(q)
|
|
3294
3294
|
}, [o("div", d({
|
|
3295
3295
|
ref_key: "containerRef",
|
|
3296
|
-
ref:
|
|
3296
|
+
ref: je
|
|
3297
3297
|
}, n.$attrs, {
|
|
3298
|
-
class: ["bar-chart-wrapper", { "is-fullscreen": C(
|
|
3299
|
-
style: C(
|
|
3298
|
+
class: ["bar-chart-wrapper", { "is-fullscreen": C(q) }],
|
|
3299
|
+
style: C(J)
|
|
3300
3300
|
}), [
|
|
3301
3301
|
c.menu ? (_(), r(ve, {
|
|
3302
3302
|
key: 0,
|
|
3303
|
-
items: C(
|
|
3304
|
-
"is-fullscreen": C(
|
|
3305
|
-
onClose: C(
|
|
3303
|
+
items: C(Be),
|
|
3304
|
+
"is-fullscreen": C(q),
|
|
3305
|
+
onClose: C(Ge)
|
|
3306
3306
|
}, null, 8, [
|
|
3307
3307
|
"items",
|
|
3308
3308
|
"is-fullscreen",
|
|
3309
3309
|
"onClose"
|
|
3310
3310
|
])) : i("", !0),
|
|
3311
|
-
o("div", nr,
|
|
3311
|
+
o("div", nr, x(C(q) ? "Chart expanded to fill window" : ""), 1),
|
|
3312
3312
|
(_(), a("svg", {
|
|
3313
3313
|
ref_key: "svgRef",
|
|
3314
|
-
ref:
|
|
3315
|
-
width: C(
|
|
3316
|
-
height: C(
|
|
3314
|
+
ref: Me,
|
|
3315
|
+
width: C(Ne),
|
|
3316
|
+
height: C(Pe),
|
|
3317
3317
|
role: g.value || void 0,
|
|
3318
3318
|
"aria-label": p.value || void 0
|
|
3319
3319
|
}, [
|
|
3320
3320
|
c.title ? (_(), a("text", {
|
|
3321
3321
|
key: 0,
|
|
3322
|
-
x:
|
|
3323
|
-
y:
|
|
3324
|
-
"text-anchor":
|
|
3325
|
-
"font-size":
|
|
3326
|
-
"font-weight":
|
|
3327
|
-
fill:
|
|
3328
|
-
}, [(_(!0), a(e, null, y(
|
|
3322
|
+
x: X.value.x,
|
|
3323
|
+
y: X.value.lineHeight,
|
|
3324
|
+
"text-anchor": X.value.anchor,
|
|
3325
|
+
"font-size": X.value.fontSize,
|
|
3326
|
+
"font-weight": X.value.fontWeight,
|
|
3327
|
+
fill: X.value.color
|
|
3328
|
+
}, [(_(!0), a(e, null, y(X.value.lines, (e, t) => (_(), a("tspan", {
|
|
3329
3329
|
key: t,
|
|
3330
|
-
x:
|
|
3331
|
-
dy: t === 0 ? 0 :
|
|
3332
|
-
},
|
|
3333
|
-
(_(!0), a(e, null, y(
|
|
3330
|
+
x: X.value.x,
|
|
3331
|
+
dy: t === 0 ? 0 : X.value.lineHeight
|
|
3332
|
+
}, x(e), 9, ar))), 128))], 8, ir)) : i("", !0),
|
|
3333
|
+
(_(!0), a(e, null, y(at.value, (e) => (_(), a("text", {
|
|
3334
3334
|
key: e.key,
|
|
3335
3335
|
"data-testid": e.key === "ch" ? "category-header" : "value-header",
|
|
3336
3336
|
x: e.x,
|
|
3337
3337
|
y: e.y,
|
|
3338
3338
|
"text-anchor": e.anchor,
|
|
3339
|
-
"font-size":
|
|
3340
|
-
fill:
|
|
3339
|
+
"font-size": Ke.value.fontSize,
|
|
3340
|
+
fill: Ke.value.fill,
|
|
3341
3341
|
"font-weight": "600"
|
|
3342
|
-
},
|
|
3343
|
-
|
|
3342
|
+
}, x(e.text), 9, or))), 128)),
|
|
3343
|
+
$e.value.length > 0 ? (_(), a("g", sr, [(_(!0), a(e, null, y($e.value, (t, n) => (_(), a(e, { key: "ileg" + n }, [t.kind === "bar" ? (_(), a("rect", {
|
|
3344
3344
|
key: 0,
|
|
3345
3345
|
x: t.x,
|
|
3346
3346
|
y: t.y - 5,
|
|
@@ -3359,43 +3359,43 @@ var gn = {
|
|
|
3359
3359
|
}, null, 8, lr)), o("text", {
|
|
3360
3360
|
x: t.x + 18,
|
|
3361
3361
|
y: t.y + 4,
|
|
3362
|
-
"font-size":
|
|
3363
|
-
fill:
|
|
3364
|
-
"font-weight":
|
|
3365
|
-
},
|
|
3362
|
+
"font-size": qe.value.fontSize,
|
|
3363
|
+
fill: qe.value.fill,
|
|
3364
|
+
"font-weight": qe.value.fontWeight
|
|
3365
|
+
}, x(t.label), 9, ur)], 64))), 128))])) : i("", !0),
|
|
3366
3366
|
!O.value || c.valueAxis ? (_(), a("line", {
|
|
3367
3367
|
key: 2,
|
|
3368
|
-
x1: C(F)(C(
|
|
3369
|
-
y1: C(F)(C(
|
|
3370
|
-
x2: C(F)(C(
|
|
3371
|
-
y2: C(F)(C(
|
|
3368
|
+
x1: C(F)(C(B).left),
|
|
3369
|
+
y1: C(F)(C(B).top),
|
|
3370
|
+
x2: C(F)(C(B).left),
|
|
3371
|
+
y2: C(F)(C(B).top + C(H)),
|
|
3372
3372
|
stroke: "currentColor",
|
|
3373
3373
|
"stroke-opacity": "0.3"
|
|
3374
3374
|
}, null, 8, dr)) : i("", !0),
|
|
3375
3375
|
O.value || c.valueAxis ? (_(), a("line", {
|
|
3376
3376
|
key: 3,
|
|
3377
|
-
x1: C(F)(C(
|
|
3378
|
-
y1: C(F)(C(
|
|
3379
|
-
x2: C(F)(C(
|
|
3380
|
-
y2: C(F)(C(
|
|
3377
|
+
x1: C(F)(C(B).left),
|
|
3378
|
+
y1: C(F)(C(B).top + C(H)),
|
|
3379
|
+
x2: C(F)(C(B).left + C(V)),
|
|
3380
|
+
y2: C(F)(C(B).top + C(H)),
|
|
3381
3381
|
stroke: "currentColor",
|
|
3382
3382
|
"stroke-opacity": "0.3"
|
|
3383
3383
|
}, null, 8, fr)) : i("", !0),
|
|
3384
3384
|
c.valueGrid && c.valueAxis ? (_(!0), a(e, { key: 4 }, y(P.value, (e, t) => (_(), a("line", {
|
|
3385
3385
|
key: "vg" + t,
|
|
3386
|
-
x1: O.value ? C(
|
|
3387
|
-
y1: O.value ? e.pos : C(
|
|
3388
|
-
x2: O.value ? C(
|
|
3389
|
-
y2: O.value ? e.pos : C(
|
|
3386
|
+
x1: O.value ? C(B).left : e.pos,
|
|
3387
|
+
y1: O.value ? e.pos : C(B).top,
|
|
3388
|
+
x2: O.value ? C(B).left + C(V) : e.pos,
|
|
3389
|
+
y2: O.value ? e.pos : C(B).top + C(H),
|
|
3390
3390
|
stroke: "currentColor",
|
|
3391
3391
|
"stroke-opacity": "0.1"
|
|
3392
3392
|
}, null, 8, pr))), 128)) : i("", !0),
|
|
3393
|
-
|
|
3393
|
+
Ze.value && L.value ? (_(), a("rect", {
|
|
3394
3394
|
key: 5,
|
|
3395
|
-
x:
|
|
3396
|
-
y:
|
|
3397
|
-
width:
|
|
3398
|
-
height:
|
|
3395
|
+
x: Ze.value.x,
|
|
3396
|
+
y: Ze.value.y,
|
|
3397
|
+
width: Ze.value.w,
|
|
3398
|
+
height: Ze.value.h,
|
|
3399
3399
|
fill: "currentColor",
|
|
3400
3400
|
"fill-opacity": "0.06",
|
|
3401
3401
|
"pointer-events": "none"
|
|
@@ -3403,66 +3403,66 @@ var gn = {
|
|
|
3403
3403
|
c.valueAxis && O.value ? (_(!0), a(e, { key: 6 }, y(P.value, (e, t) => (_(), a("text", {
|
|
3404
3404
|
key: "vt" + t,
|
|
3405
3405
|
"data-testid": "value-tick",
|
|
3406
|
-
x: C(
|
|
3406
|
+
x: C(B).left - 6,
|
|
3407
3407
|
y: e.pos,
|
|
3408
3408
|
"text-anchor": "end",
|
|
3409
3409
|
"dominant-baseline": "middle",
|
|
3410
|
-
"font-size":
|
|
3411
|
-
fill:
|
|
3412
|
-
"font-weight":
|
|
3413
|
-
"fill-opacity":
|
|
3414
|
-
},
|
|
3410
|
+
"font-size": Y.value.fontSize,
|
|
3411
|
+
fill: Y.value.fill,
|
|
3412
|
+
"font-weight": Y.value.fontWeight,
|
|
3413
|
+
"fill-opacity": Y.value.fillOpacity
|
|
3414
|
+
}, x(e.value), 9, hr))), 128)) : c.valueAxis ? (_(!0), a(e, { key: 7 }, y(P.value, (e, t) => (_(), a("text", {
|
|
3415
3415
|
key: "vt" + t,
|
|
3416
3416
|
"data-testid": "value-tick",
|
|
3417
3417
|
x: e.pos,
|
|
3418
|
-
y: C(
|
|
3418
|
+
y: C(B).top + C(H) + 16,
|
|
3419
3419
|
"text-anchor": "middle",
|
|
3420
|
-
"font-size":
|
|
3421
|
-
fill:
|
|
3422
|
-
"font-weight":
|
|
3423
|
-
"fill-opacity":
|
|
3424
|
-
},
|
|
3420
|
+
"font-size": Y.value.fontSize,
|
|
3421
|
+
fill: Y.value.fill,
|
|
3422
|
+
"font-weight": Y.value.fontWeight,
|
|
3423
|
+
"fill-opacity": Y.value.fillOpacity
|
|
3424
|
+
}, x(e.value), 9, gr))), 128)) : i("", !0),
|
|
3425
3425
|
c.yLabel ? (_(), a("text", {
|
|
3426
3426
|
key: 8,
|
|
3427
3427
|
x: 0,
|
|
3428
3428
|
y: 0,
|
|
3429
|
-
transform: `translate(14, ${C(
|
|
3429
|
+
transform: `translate(14, ${C(B).top + C(H) / 2}) rotate(-90)`,
|
|
3430
3430
|
"text-anchor": "middle",
|
|
3431
|
-
"font-size":
|
|
3432
|
-
fill:
|
|
3433
|
-
"font-weight":
|
|
3434
|
-
},
|
|
3431
|
+
"font-size": Ke.value.fontSize,
|
|
3432
|
+
fill: Ke.value.fill,
|
|
3433
|
+
"font-weight": Ke.value.fontWeight
|
|
3434
|
+
}, x(c.yLabel), 9, _r)) : i("", !0),
|
|
3435
3435
|
O.value ? (_(!0), a(e, { key: 9 }, y(ye.value, (e, t) => (_(), a("text", {
|
|
3436
3436
|
key: "ct" + t,
|
|
3437
3437
|
"data-testid": "category-tick",
|
|
3438
3438
|
x: e.pos,
|
|
3439
|
-
y: C(
|
|
3439
|
+
y: C(B).top + C(H) + 16,
|
|
3440
3440
|
"text-anchor": e.anchor,
|
|
3441
|
-
"font-size":
|
|
3442
|
-
fill:
|
|
3443
|
-
"font-weight":
|
|
3444
|
-
"fill-opacity":
|
|
3445
|
-
},
|
|
3441
|
+
"font-size": Y.value.fontSize,
|
|
3442
|
+
fill: Y.value.fill,
|
|
3443
|
+
"font-weight": Y.value.fontWeight,
|
|
3444
|
+
"fill-opacity": Y.value.fillOpacity
|
|
3445
|
+
}, x(e.label), 9, vr))), 128)) : (_(!0), a(e, { key: 10 }, y(ye.value, (e, t) => (_(), a("text", {
|
|
3446
3446
|
key: "ct" + t,
|
|
3447
3447
|
"data-testid": "category-tick",
|
|
3448
|
-
x:
|
|
3448
|
+
x: it.value.x,
|
|
3449
3449
|
y: e.pos,
|
|
3450
|
-
"text-anchor":
|
|
3450
|
+
"text-anchor": it.value.anchor,
|
|
3451
3451
|
"dominant-baseline": "middle",
|
|
3452
|
-
"font-size":
|
|
3453
|
-
fill:
|
|
3454
|
-
"font-weight":
|
|
3455
|
-
"fill-opacity":
|
|
3456
|
-
},
|
|
3452
|
+
"font-size": Y.value.fontSize,
|
|
3453
|
+
fill: Y.value.fill,
|
|
3454
|
+
"font-weight": Y.value.fontWeight,
|
|
3455
|
+
"fill-opacity": Y.value.fillOpacity
|
|
3456
|
+
}, x(e.label), 9, yr))), 128)),
|
|
3457
3457
|
c.xLabel ? (_(), a("text", {
|
|
3458
3458
|
key: 11,
|
|
3459
|
-
x: C(
|
|
3460
|
-
y: C(
|
|
3459
|
+
x: C(B).left + C(V) / 2,
|
|
3460
|
+
y: C(Pe) - 4,
|
|
3461
3461
|
"text-anchor": "middle",
|
|
3462
|
-
"font-size":
|
|
3463
|
-
fill:
|
|
3464
|
-
"font-weight":
|
|
3465
|
-
},
|
|
3462
|
+
"font-size": Ke.value.fontSize,
|
|
3463
|
+
fill: Ke.value.fill,
|
|
3464
|
+
"font-weight": Ke.value.fontWeight
|
|
3465
|
+
}, x(c.xLabel), 9, br)) : i("", !0),
|
|
3466
3466
|
(_(!0), a(e, null, y(le.value, (e, t) => (_(), a("rect", {
|
|
3467
3467
|
key: "bar" + t,
|
|
3468
3468
|
"data-testid": "bar",
|
|
@@ -3476,7 +3476,7 @@ var gn = {
|
|
|
3476
3476
|
"fill-opacity": e.opacity,
|
|
3477
3477
|
style: h(e.blendMode ? { mixBlendMode: e.blendMode } : void 0)
|
|
3478
3478
|
}, null, 12, xr))), 128)),
|
|
3479
|
-
(_(!0), a(e, null, y(
|
|
3479
|
+
(_(!0), a(e, null, y(rt.value, (e) => (_(), a("text", {
|
|
3480
3480
|
key: "blbl" + e.key,
|
|
3481
3481
|
"data-testid": "bar-label",
|
|
3482
3482
|
x: e.x,
|
|
@@ -3487,7 +3487,7 @@ var gn = {
|
|
|
3487
3487
|
"font-weight": e.fontWeight,
|
|
3488
3488
|
fill: e.fill,
|
|
3489
3489
|
"pointer-events": "none"
|
|
3490
|
-
},
|
|
3490
|
+
}, x(e.text), 9, Sr))), 128)),
|
|
3491
3491
|
(_(!0), a(e, null, y(N.value, (t, n) => (_(), a(e, { key: "sl" + n }, [t.pathD ? (_(), a("path", {
|
|
3492
3492
|
key: 0,
|
|
3493
3493
|
"data-testid": "summary-line",
|
|
@@ -3509,70 +3509,70 @@ var gn = {
|
|
|
3509
3509
|
"fill-opacity": t.opacity,
|
|
3510
3510
|
style: h(t.blendMode ? { mixBlendMode: t.blendMode } : void 0)
|
|
3511
3511
|
}, null, 12, wr))), 128)) : i("", !0)], 64))), 128)),
|
|
3512
|
-
|
|
3512
|
+
L.value ? (_(), a("rect", d({
|
|
3513
3513
|
key: 12,
|
|
3514
|
-
x: C(
|
|
3515
|
-
y: C(
|
|
3516
|
-
width: C(
|
|
3517
|
-
height: C(
|
|
3514
|
+
x: C(B).left,
|
|
3515
|
+
y: C(B).top,
|
|
3516
|
+
width: C(V),
|
|
3517
|
+
height: C(H),
|
|
3518
3518
|
fill: "transparent",
|
|
3519
3519
|
style: `cursor: crosshair; touch-action: ${O.value ? "pan-y" : "pan-x"}`
|
|
3520
|
-
},
|
|
3521
|
-
c.annotations && c.annotations.length > 0 ? (_(), r(C(
|
|
3520
|
+
}, te(C(ze), !0)), null, 16, Tr)) : i("", !0),
|
|
3521
|
+
c.annotations && c.annotations.length > 0 ? (_(), r(C(bt), {
|
|
3522
3522
|
key: 13,
|
|
3523
3523
|
annotations: c.annotations,
|
|
3524
|
-
project:
|
|
3525
|
-
bounds: C(
|
|
3524
|
+
project: R,
|
|
3525
|
+
bounds: C(Le)
|
|
3526
3526
|
}, null, 8, ["annotations", "bounds"])) : i("", !0)
|
|
3527
3527
|
], 8, rr)),
|
|
3528
|
-
|
|
3528
|
+
L.value && C(U) !== null && Xe.value ? (_(), a("div", {
|
|
3529
3529
|
key: 1,
|
|
3530
3530
|
ref_key: "tooltipRef",
|
|
3531
|
-
ref:
|
|
3531
|
+
ref: W,
|
|
3532
3532
|
class: "chart-tooltip-content",
|
|
3533
3533
|
style: h({
|
|
3534
3534
|
position: "absolute",
|
|
3535
3535
|
top: "0",
|
|
3536
3536
|
left: "0",
|
|
3537
3537
|
willChange: "transform",
|
|
3538
|
-
transform: C(
|
|
3539
|
-
visibility: C(
|
|
3538
|
+
transform: C(Re) ? `translate3d(${C(Re).left}px, ${C(Re).top}px, 0) translateY(-50%)` : "translateY(-50%)",
|
|
3539
|
+
visibility: C(Re) ? "visible" : "hidden"
|
|
3540
3540
|
})
|
|
3541
|
-
}, [
|
|
3541
|
+
}, [b(n.$slots, "tooltip", m(u(Xe.value)), () => [o("div", Er, [Ye.value ? (_(), a("div", Dr, x(Ye.value), 1)) : i("", !0), (_(!0), a(e, null, y(Xe.value.values, (e) => (_(), a("div", {
|
|
3542
3542
|
key: e.seriesIndex,
|
|
3543
3543
|
class: "bar-chart-tooltip-row"
|
|
3544
3544
|
}, [o("span", {
|
|
3545
3545
|
class: "bar-chart-tooltip-swatch",
|
|
3546
3546
|
style: h({ background: e.color })
|
|
3547
|
-
}, null, 4), s(" " +
|
|
3548
|
-
C(
|
|
3547
|
+
}, null, 4), s(" " + x(isFinite(e.value) ? C(_e)(e.value) : "—"), 1)]))), 128))])], !0)], 4)) : i("", !0),
|
|
3548
|
+
C(G) ? (_(), a("a", {
|
|
3549
3549
|
key: 2,
|
|
3550
3550
|
class: "bar-chart-download-link",
|
|
3551
|
-
href: C(
|
|
3552
|
-
download: `${C(
|
|
3553
|
-
},
|
|
3554
|
-
C(
|
|
3551
|
+
href: C(K),
|
|
3552
|
+
download: `${C(Ue)()}.csv`
|
|
3553
|
+
}, x(C(G)), 9, Or)) : i("", !0),
|
|
3554
|
+
C(Ve) ? (_(), a("button", {
|
|
3555
3555
|
key: 3,
|
|
3556
3556
|
type: "button",
|
|
3557
3557
|
class: "bar-chart-download-button",
|
|
3558
|
-
onClick: l[0] ||= (...e) => C(
|
|
3559
|
-
},
|
|
3558
|
+
onClick: l[0] ||= (...e) => C(He) && C(He)(...e)
|
|
3559
|
+
}, x(C(Ve)), 1)) : i("", !0)
|
|
3560
3560
|
], 16)], 8, ["to", "disabled"]));
|
|
3561
3561
|
}
|
|
3562
3562
|
}), [["__scopeId", "data-v-32872fa4"]]);
|
|
3563
3563
|
//#endregion
|
|
3564
3564
|
//#region src/ChoroplethMap/canvasLayer.ts
|
|
3565
|
-
function
|
|
3565
|
+
function Ir(e, t) {
|
|
3566
3566
|
let n = t.dpr * t.meetScale * t.zoom.k;
|
|
3567
3567
|
e.setTransform(n, 0, 0, n, t.dpr * (t.offsetX + t.meetScale * t.zoom.x), t.dpr * (t.offsetY + t.meetScale * t.zoom.y));
|
|
3568
3568
|
}
|
|
3569
|
-
function
|
|
3569
|
+
function Lr(e) {
|
|
3570
3570
|
return (t) => t / (e.meetScale * e.zoom.k || 1);
|
|
3571
3571
|
}
|
|
3572
|
-
function
|
|
3572
|
+
function Rr(e, t, n) {
|
|
3573
3573
|
n === "dashed" ? (e.setLineDash([t(8), t(4)]), e.lineCap = "butt") : n === "dotted" ? (e.setLineDash([0, t(5)]), e.lineCap = "round") : (e.setLineDash([]), e.lineCap = "butt");
|
|
3574
3574
|
}
|
|
3575
|
-
function
|
|
3575
|
+
function zr(e, t, n, r) {
|
|
3576
3576
|
let i = [], a = /* @__PURE__ */ new Map(), o = new Path2D(), s = 0;
|
|
3577
3577
|
for (let r of e) {
|
|
3578
3578
|
let e = t(r);
|
|
@@ -3592,14 +3592,14 @@ function Rr(e, t, n, r) {
|
|
|
3592
3592
|
exterior: null
|
|
3593
3593
|
};
|
|
3594
3594
|
}
|
|
3595
|
-
function
|
|
3595
|
+
function $(e, t, n, r, i, a) {
|
|
3596
3596
|
let o = t.indexById.get(i);
|
|
3597
3597
|
if (o == null) return;
|
|
3598
3598
|
let s = t.items[o];
|
|
3599
|
-
e.fillStyle = s.fill, e.fill(s.path), e.strokeStyle = a?.stroke ?? r.highlightStroke, e.lineWidth = n(a?.strokeWidth ?? r.strokeWidth + 1),
|
|
3599
|
+
e.fillStyle = s.fill, e.fill(s.path), e.strokeStyle = a?.stroke ?? r.highlightStroke, e.lineWidth = n(a?.strokeWidth ?? r.strokeWidth + 1), Rr(e, n, a?.style), e.stroke(s.path);
|
|
3600
3600
|
}
|
|
3601
3601
|
function Br(e, t, n) {
|
|
3602
|
-
e.setTransform(1, 0, 0, 1, 0, 0), e.clearRect(0, 0, e.canvas.width, e.canvas.height), n && (e.fillStyle = n, e.fillRect(0, 0, e.canvas.width, e.canvas.height)),
|
|
3602
|
+
e.setTransform(1, 0, 0, 1, 0, 0), e.clearRect(0, 0, e.canvas.width, e.canvas.height), n && (e.fillStyle = n, e.fillRect(0, 0, e.canvas.width, e.canvas.height)), Ir(e, t), e.lineJoin = "round", e.setLineDash([]);
|
|
3603
3603
|
}
|
|
3604
3604
|
function Vr(e, t, n, r) {
|
|
3605
3605
|
let i = Math.min(r, t.items.length);
|
|
@@ -3607,16 +3607,16 @@ function Vr(e, t, n, r) {
|
|
|
3607
3607
|
return i;
|
|
3608
3608
|
}
|
|
3609
3609
|
function Hr(e, t, n, r) {
|
|
3610
|
-
let i =
|
|
3610
|
+
let i = Lr(n);
|
|
3611
3611
|
if (e.setLineDash([]), r.strokeWidth > 0) if (e.lineWidth = i(r.strokeWidth), e.strokeStyle = r.strokeColor, t.featureStrokes) e.stroke(t.featureStrokes);
|
|
3612
3612
|
else for (let n of t.items) e.stroke(n.path);
|
|
3613
3613
|
t.borders && r.bordersWidth > 0 && (e.lineWidth = i(r.bordersWidth), e.strokeStyle = r.bordersColor, e.stroke(t.borders)), t.exterior && r.outlineColor && r.outlineWidth > 0 && (e.lineWidth = i(r.outlineWidth), e.strokeStyle = r.outlineColor, e.stroke(t.exterior));
|
|
3614
|
-
for (let [n, a] of r.focused)
|
|
3615
|
-
for (let t of r.overlays) e.strokeStyle = t.stroke, e.lineWidth = i(t.strokeWidth ?? r.strokeWidth + 1.5),
|
|
3614
|
+
for (let [n, a] of r.focused) $(e, t, i, r, n, a);
|
|
3615
|
+
for (let t of r.overlays) e.strokeStyle = t.stroke, e.lineWidth = i(t.strokeWidth ?? r.strokeWidth + 1.5), Rr(e, i, t.style), e.stroke(t.path);
|
|
3616
3616
|
e.setLineDash([]);
|
|
3617
3617
|
}
|
|
3618
3618
|
function Ur(e, t, n, r, i) {
|
|
3619
|
-
!i || r.focused.has(i) || (
|
|
3619
|
+
!i || r.focused.has(i) || (Ir(e, n), e.lineJoin = "round", $(e, t, Lr(n), r, i), e.setLineDash([]), e.setTransform(1, 0, 0, 1, 0, 0));
|
|
3620
3620
|
}
|
|
3621
3621
|
function Wr(e, t, n, r) {
|
|
3622
3622
|
Br(e, n, r.background), Vr(e, t, 0, t.items.length), Hr(e, t, n, r);
|
|
@@ -3674,10 +3674,10 @@ var Jr = {
|
|
|
3674
3674
|
getEl() {
|
|
3675
3675
|
return d.value;
|
|
3676
3676
|
}
|
|
3677
|
-
}), (s, d) => (_(), a(e, null, [(_(), r(t, { to: "body" }, [o("div", Jr, [c.value && n.mode === "float" ?
|
|
3677
|
+
}), (s, d) => (_(), a(e, null, [(_(), r(t, { to: "body" }, [o("div", Jr, [c.value && n.mode === "float" ? b(s.$slots, "default", m(u(c.value)), void 0, !0, 0) : i("", !0)], 512)])), n.mode === "sheet" ? (_(), a("div", {
|
|
3678
3678
|
key: 0,
|
|
3679
3679
|
class: p(["chart-tooltip-sheet", { "is-open": l.value }])
|
|
3680
|
-
}, [c.value ?
|
|
3680
|
+
}, [c.value ? b(s.$slots, "default", m(u(c.value)), void 0, !0, 0) : i("", !0)], 2)) : i("", !0)], 64));
|
|
3681
3681
|
}
|
|
3682
3682
|
}), [["__scopeId", "data-v-90392830"]]), Xr = {
|
|
3683
3683
|
k: 1,
|
|
@@ -3801,27 +3801,113 @@ function ii(e, t, n = Xr, r) {
|
|
|
3801
3801
|
return v;
|
|
3802
3802
|
}
|
|
3803
3803
|
//#endregion
|
|
3804
|
+
//#region src/ChoroplethMap/mixedGeo.ts
|
|
3805
|
+
var ai = {
|
|
3806
|
+
states: 2,
|
|
3807
|
+
counties: 5,
|
|
3808
|
+
hsas: 6
|
|
3809
|
+
};
|
|
3810
|
+
function oi(e, t, n) {
|
|
3811
|
+
if (e === "hsas") return n?.get(t) ?? null;
|
|
3812
|
+
let r = t.padStart(ai[e], "0");
|
|
3813
|
+
return /^\d{2}/.test(r) ? r.slice(0, 2) : null;
|
|
3814
|
+
}
|
|
3815
|
+
function si(e, t, n) {
|
|
3816
|
+
if (n.byId.has(e)) return e;
|
|
3817
|
+
let r = e.padStart(ai[t], "0");
|
|
3818
|
+
return n.byId.has(r) ? r : n.byName.get(e) ?? null;
|
|
3819
|
+
}
|
|
3820
|
+
function ci(e, t, n, r) {
|
|
3821
|
+
let i = /* @__PURE__ */ new Map(), a = [], o = [];
|
|
3822
|
+
if (!e) return {
|
|
3823
|
+
overrides: i,
|
|
3824
|
+
unresolved: a,
|
|
3825
|
+
conflicts: o
|
|
3826
|
+
};
|
|
3827
|
+
for (let s of e) {
|
|
3828
|
+
let e = s.geoType;
|
|
3829
|
+
if (!e || e === t) continue;
|
|
3830
|
+
let c = n(e);
|
|
3831
|
+
if (!c) {
|
|
3832
|
+
a.push(s.id);
|
|
3833
|
+
continue;
|
|
3834
|
+
}
|
|
3835
|
+
let l = si(s.id, e, c), u = l == null ? null : oi(e, l, r);
|
|
3836
|
+
if (!u) {
|
|
3837
|
+
a.push(s.id);
|
|
3838
|
+
continue;
|
|
3839
|
+
}
|
|
3840
|
+
let d = i.get(u);
|
|
3841
|
+
d == null ? i.set(u, e) : d !== e && o.push(s.id);
|
|
3842
|
+
}
|
|
3843
|
+
return {
|
|
3844
|
+
overrides: i,
|
|
3845
|
+
unresolved: a,
|
|
3846
|
+
conflicts: o
|
|
3847
|
+
};
|
|
3848
|
+
}
|
|
3849
|
+
function li(e) {
|
|
3850
|
+
return [...e].map(([e, t]) => `${e}:${t}`).sort().join(",");
|
|
3851
|
+
}
|
|
3852
|
+
function ui(e) {
|
|
3853
|
+
let t = /* @__PURE__ */ new Map();
|
|
3854
|
+
if (!e) return t;
|
|
3855
|
+
for (let n of e.split(",")) {
|
|
3856
|
+
let [e, r] = n.split(":");
|
|
3857
|
+
t.set(e, r);
|
|
3858
|
+
}
|
|
3859
|
+
return t;
|
|
3860
|
+
}
|
|
3861
|
+
function di(e, t, n, r, i, a) {
|
|
3862
|
+
let o = /* @__PURE__ */ new Map();
|
|
3863
|
+
if (n.size === 0) return {
|
|
3864
|
+
features: e,
|
|
3865
|
+
levelById: o
|
|
3866
|
+
};
|
|
3867
|
+
let s = [], c = /* @__PURE__ */ new Set();
|
|
3868
|
+
for (let [e, t] of n) {
|
|
3869
|
+
if (a && e !== a) continue;
|
|
3870
|
+
let n = r(t);
|
|
3871
|
+
if (!n) continue;
|
|
3872
|
+
let l = [];
|
|
3873
|
+
for (let [r, a] of n.byId) oi(t, r, i) === e && (l.push(a), o.set(r, t));
|
|
3874
|
+
l.length && (c.add(e), s.push(...l));
|
|
3875
|
+
}
|
|
3876
|
+
if (!c.size) return {
|
|
3877
|
+
features: e,
|
|
3878
|
+
levelById: o
|
|
3879
|
+
};
|
|
3880
|
+
let l = e.filter((e) => {
|
|
3881
|
+
let n = oi(t, String(e.id), i);
|
|
3882
|
+
return !(n && c.has(n));
|
|
3883
|
+
});
|
|
3884
|
+
return l.push(...s), {
|
|
3885
|
+
features: l,
|
|
3886
|
+
levelById: o
|
|
3887
|
+
};
|
|
3888
|
+
}
|
|
3889
|
+
//#endregion
|
|
3804
3890
|
//#region src/ChoroplethMap/ChoroplethMap.vue?vue&type=script&setup=true&lang.ts
|
|
3805
|
-
var
|
|
3891
|
+
var fi = ["role", "aria-label"], pi = {
|
|
3806
3892
|
class: "chart-sr-only",
|
|
3807
3893
|
"aria-live": "polite"
|
|
3808
|
-
},
|
|
3894
|
+
}, mi = {
|
|
3809
3895
|
key: 1,
|
|
3810
3896
|
class: "choropleth-header"
|
|
3811
|
-
},
|
|
3897
|
+
}, hi = {
|
|
3812
3898
|
key: 0,
|
|
3813
3899
|
class: "choropleth-legend-title"
|
|
3814
|
-
},
|
|
3900
|
+
}, gi = {
|
|
3815
3901
|
key: 2,
|
|
3816
3902
|
class: "choropleth-legend-continuous"
|
|
3817
|
-
},
|
|
3903
|
+
}, _i = { class: "choropleth-legend-ticks" }, vi = {
|
|
3818
3904
|
key: 2,
|
|
3819
3905
|
class: "choropleth-zoom-hint"
|
|
3820
|
-
},
|
|
3906
|
+
}, yi = ["viewBox"], bi = [
|
|
3821
3907
|
"width",
|
|
3822
3908
|
"height",
|
|
3823
3909
|
"fill"
|
|
3824
|
-
],
|
|
3910
|
+
], xi = ["viewBox"], Si = ["innerHTML"], Ci = "http://www.w3.org/2000/svg", wi = 10, Ti = 600, Ei = 250, Di = 30, Oi = 450, ki = 2, Ai = 2, ji = 1e3, Mi = 12, Ni = "#e5f0fa", Pi = "#08519c", Fi = 24, Ii = 350, Li = 120, Ri = 11, zi = 2.4, Bi = 3, Vi = .9, Hi = 2.6, Ui = /*#__PURE__*/ P(/* @__PURE__ */ l({
|
|
3825
3911
|
inheritAttrs: !1,
|
|
3826
3912
|
__name: "ChoroplethMap",
|
|
3827
3913
|
props: {
|
|
@@ -3886,7 +3972,7 @@ var ai = ["role", "aria-label"], oi = {
|
|
|
3886
3972
|
"update:focus"
|
|
3887
3973
|
],
|
|
3888
3974
|
setup(c, { emit: l }) {
|
|
3889
|
-
let p = c,
|
|
3975
|
+
let p = c, te = n(() => p.ariaLabel ?? p.title), T = n(() => p.role ?? (te.value ? "figure" : void 0)), O = l, k = (e) => e, re = v(null), ie = Wt(re, () => p.theme), A = ie.resolved, j = v(null), ae = v(null), oe = v(null), se = v(null), ge = v(null), _e = v(null), P = v(null), F = w(), ye = n(() => !!p.tooltipTrigger || !!p.tooltipFormat || !!F.tooltip), be = n(() => {
|
|
3890
3976
|
let e = p.legendStyle, t = {};
|
|
3891
3977
|
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;
|
|
3892
3978
|
}), xe = n(() => {
|
|
@@ -3898,79 +3984,79 @@ var ai = ["role", "aria-label"], oi = {
|
|
|
3898
3984
|
width: "100%"
|
|
3899
3985
|
};
|
|
3900
3986
|
return e?.color && (t.color = e.color), t;
|
|
3901
|
-
}), Se = /* @__PURE__ */ new Map(), Ce = /* @__PURE__ */ new Map(), we = null, Te = null, I = null,
|
|
3987
|
+
}), Se = /* @__PURE__ */ new Map(), Ce = /* @__PURE__ */ new Map(), we = null, Te = null, I = null, Ee = /* @__PURE__ */ new Map(), De = /* @__PURE__ */ new Map(), L = n(() => p.renderer === "canvas"), Oe = v(null), R = null, ke = null, Ae = null, z = null, je = /* @__PURE__ */ new Map(), Me = [], Ne = 0, Pe = 0, Fe = 0, Ie = 0, V = !1, H = null, Le = {
|
|
3902
3988
|
width: 0,
|
|
3903
3989
|
height: 0
|
|
3904
|
-
},
|
|
3905
|
-
function
|
|
3990
|
+
}, U = null, Be = !1, K = null, Ve = v(!1), He = v(1), Ue = v(1), q = v(!1), J = n(() => p.zoomMode === "scroll"), We = n(() => p.zoom && (J.value || !p.touchExpand && q.value)), Ge = 0, Ke = 0, qe = 0, Je = null, X = 0, Ye = null;
|
|
3991
|
+
function Ze() {
|
|
3906
3992
|
let e = j.value, t = ae.value;
|
|
3907
|
-
if (!(!e || !t) && (e.addEventListener("touchstart",
|
|
3908
|
-
if (
|
|
3909
|
-
e.addEventListener("click",
|
|
3993
|
+
if (!(!e || !t) && (e.addEventListener("touchstart", vr, { passive: !0 }), e.addEventListener("touchend", yr), e.addEventListener("touchcancel", xr, { passive: !0 }), !G())) {
|
|
3994
|
+
if (L.value) {
|
|
3995
|
+
e.addEventListener("click", fr), e.addEventListener("mousemove", hr), e.addEventListener("mouseleave", gr);
|
|
3910
3996
|
return;
|
|
3911
3997
|
}
|
|
3912
|
-
t.addEventListener("click",
|
|
3998
|
+
t.addEventListener("click", fr), t.addEventListener("mouseover", fr), t.addEventListener("mousemove", pr), t.addEventListener("mouseout", mr);
|
|
3913
3999
|
}
|
|
3914
4000
|
}
|
|
3915
|
-
function
|
|
4001
|
+
function Qe() {
|
|
3916
4002
|
let e = j.value, t = ae.value;
|
|
3917
|
-
e && (e.removeEventListener("touchstart",
|
|
4003
|
+
e && (e.removeEventListener("touchstart", vr), e.removeEventListener("touchend", yr), e.removeEventListener("touchcancel", xr), e.removeEventListener("click", fr), e.removeEventListener("mousemove", hr), e.removeEventListener("mouseleave", gr)), t && (t.removeEventListener("click", fr), t.removeEventListener("mouseover", fr), t.removeEventListener("mousemove", pr), t.removeEventListener("mouseout", mr));
|
|
3918
4004
|
}
|
|
3919
|
-
function
|
|
3920
|
-
|
|
4005
|
+
function $e() {
|
|
4006
|
+
lr();
|
|
3921
4007
|
}
|
|
3922
|
-
let
|
|
4008
|
+
let et = null;
|
|
3923
4009
|
g(() => {
|
|
3924
|
-
|
|
4010
|
+
Ze(), tt(), Dr(), ot(), Er(), wn(), j.value && typeof ResizeObserver < "u" && (et = new ResizeObserver((e) => {
|
|
3925
4011
|
let t = e[0]?.contentRect;
|
|
3926
4012
|
if (!t?.width) return;
|
|
3927
|
-
let n = t.height ? Math.min(t.width /
|
|
3928
|
-
|
|
3929
|
-
}),
|
|
4013
|
+
let n = t.height ? Math.min(t.width / St.value, t.height / Ct.value) : t.width / St.value;
|
|
4014
|
+
Ue.value = n, Fe = (t.width - n * St.value) / 2, Ie = t.height ? (t.height - n * Ct.value) / 2 : 0, ie.ensureResolved(), L.value ? tr(t.width, t.height) : ir();
|
|
4015
|
+
}), et.observe(j.value)), L.value && Vn(), window.addEventListener("scroll", $e, {
|
|
3930
4016
|
passive: !0,
|
|
3931
4017
|
capture: !0
|
|
3932
|
-
}), window.addEventListener("resize",
|
|
4018
|
+
}), window.addEventListener("resize", $e, { passive: !0 });
|
|
3933
4019
|
}), ee(() => {
|
|
3934
|
-
|
|
4020
|
+
H?.disconnect(), et?.disconnect(), Bn?.removeEventListener("change", Hn), qe && cancelAnimationFrame(qe), Ne && cancelAnimationFrame(Ne), Pe && cancelAnimationFrame(Pe), window.clearTimeout(X), Kn && window.clearTimeout(Kn), nt(), Qe(), window.removeEventListener("scroll", $e, { capture: !0 }), window.removeEventListener("resize", $e);
|
|
3935
4021
|
});
|
|
3936
|
-
function
|
|
4022
|
+
function tt() {
|
|
3937
4023
|
if (!j.value || !ae.value) return;
|
|
3938
4024
|
let e = N(j.value);
|
|
3939
|
-
|
|
3940
|
-
|
|
4025
|
+
K = ue().scaleExtent([1, lt.value]).clickDistance(6).on("start", () => {
|
|
4026
|
+
V = !0;
|
|
3941
4027
|
}).on("zoom", (e) => {
|
|
3942
|
-
|
|
4028
|
+
lr(), L.value ? Qn() : ae.value && ae.value.setAttribute("transform", e.transform);
|
|
3943
4029
|
let t = e.transform;
|
|
3944
|
-
|
|
4030
|
+
He.value = t.k, ir(), p.cities?.length && Er(), Ve.value = t.k !== 1 || t.x !== 0 || t.y !== 0, Ve.value && (q.value = !0);
|
|
3945
4031
|
}).on("end", () => {
|
|
3946
|
-
|
|
3947
|
-
}),
|
|
4032
|
+
V = !1, L.value && Qn();
|
|
4033
|
+
}), K.filter((e) => {
|
|
3948
4034
|
if (!p.zoom) return !1;
|
|
3949
|
-
if (!
|
|
4035
|
+
if (!J.value) {
|
|
3950
4036
|
let t = $.isFullscreen.value;
|
|
3951
4037
|
switch (e.type) {
|
|
3952
4038
|
case "wheel":
|
|
3953
4039
|
if (!t) return !1;
|
|
3954
4040
|
break;
|
|
3955
4041
|
case "dblclick":
|
|
3956
|
-
if (
|
|
4042
|
+
if (G()) return !1;
|
|
3957
4043
|
break;
|
|
3958
4044
|
case "mousedown":
|
|
3959
|
-
if (!t && !
|
|
4045
|
+
if (!t && !q.value) return !1;
|
|
3960
4046
|
break;
|
|
3961
4047
|
case "touchstart":
|
|
3962
|
-
if (!t && !
|
|
4048
|
+
if (!t && !We.value && !(!p.touchExpand && p.zoomMode !== "scroll" && e.touches.length >= 2)) return !1;
|
|
3963
4049
|
break;
|
|
3964
4050
|
}
|
|
3965
4051
|
}
|
|
3966
4052
|
return (!e.ctrlKey || e.type === "wheel") && !e.button;
|
|
3967
|
-
}), e.call(
|
|
4053
|
+
}), e.call(K);
|
|
3968
4054
|
}
|
|
3969
|
-
function
|
|
3970
|
-
j.value &&
|
|
4055
|
+
function nt() {
|
|
4056
|
+
j.value && K && (N(j.value).on(".zoom", null), K = null);
|
|
3971
4057
|
}
|
|
3972
|
-
function
|
|
3973
|
-
let t =
|
|
4058
|
+
function rt(e) {
|
|
4059
|
+
let t = cn.value, n = rn.value, r = [];
|
|
3974
4060
|
for (let i of e) {
|
|
3975
4061
|
let e = i.geoType ?? p.geoType, a = t.get(e);
|
|
3976
4062
|
if (!a) continue;
|
|
@@ -3988,20 +4074,20 @@ var ai = ["role", "aria-label"], oi = {
|
|
|
3988
4074
|
}
|
|
3989
4075
|
return r;
|
|
3990
4076
|
}
|
|
3991
|
-
function
|
|
4077
|
+
function it(e) {
|
|
3992
4078
|
let t = /* @__PURE__ */ new Set();
|
|
3993
|
-
for (let n of
|
|
4079
|
+
for (let n of rt(e)) n.geoType === p.geoType && t.add(String(n.feature.id));
|
|
3994
4080
|
return t;
|
|
3995
4081
|
}
|
|
3996
|
-
let
|
|
3997
|
-
function
|
|
3998
|
-
if (!j.value || !
|
|
3999
|
-
let e =
|
|
4000
|
-
if (
|
|
4001
|
-
|
|
4002
|
-
for (let e of t)
|
|
4003
|
-
let e =
|
|
4004
|
-
|
|
4082
|
+
let at = !1;
|
|
4083
|
+
function ot() {
|
|
4084
|
+
if (!j.value || !K) return;
|
|
4085
|
+
let e = rt(sn.value), t = e.filter((e) => e.geoType === p.geoType), n = e.filter((e) => e.geoType !== p.geoType);
|
|
4086
|
+
if (L.value) {
|
|
4087
|
+
je.clear();
|
|
4088
|
+
for (let e of t) je.set(String(e.feature.id), e.item);
|
|
4089
|
+
let e = $t.value;
|
|
4090
|
+
Me = n.flatMap((t) => {
|
|
4005
4091
|
let n = e(t.feature);
|
|
4006
4092
|
return n ? [{
|
|
4007
4093
|
path: new Path2D(n),
|
|
@@ -4009,88 +4095,88 @@ var ai = ["role", "aria-label"], oi = {
|
|
|
4009
4095
|
strokeWidth: t.item.strokeWidth,
|
|
4010
4096
|
style: t.item.style
|
|
4011
4097
|
}] : [];
|
|
4012
|
-
}),
|
|
4098
|
+
}), qn(), Qn();
|
|
4013
4099
|
} else {
|
|
4014
4100
|
let e = /* @__PURE__ */ new Map();
|
|
4015
4101
|
for (let n of t) {
|
|
4016
4102
|
let t = Se.get(String(n.feature.id));
|
|
4017
4103
|
t && e.set(t, n.item);
|
|
4018
4104
|
}
|
|
4019
|
-
for (let [t] of
|
|
4105
|
+
for (let [t] of Ee) e.has(t) || t === I || or(t);
|
|
4020
4106
|
for (let [t, n] of e) {
|
|
4021
|
-
let e =
|
|
4022
|
-
e != null && e.style === n.style && e.stroke === n.stroke && e.strokeWidth === n.strokeWidth && t !== I || t !== I &&
|
|
4107
|
+
let e = Ee.get(t);
|
|
4108
|
+
e != null && e.style === n.style && e.stroke === n.stroke && e.strokeWidth === n.strokeWidth && t !== I || t !== I && ar(t, n);
|
|
4023
4109
|
}
|
|
4024
|
-
|
|
4025
|
-
for (let [t, n] of e)
|
|
4026
|
-
|
|
4110
|
+
Ee.clear();
|
|
4111
|
+
for (let [t, n] of e) Ee.set(t, n);
|
|
4112
|
+
st(n);
|
|
4027
4113
|
}
|
|
4028
4114
|
if (e.length === 0) {
|
|
4029
|
-
|
|
4115
|
+
at = !0, lr();
|
|
4030
4116
|
return;
|
|
4031
4117
|
}
|
|
4032
4118
|
if (p.focusZoom === !1) {
|
|
4033
|
-
|
|
4119
|
+
at = !0;
|
|
4034
4120
|
return;
|
|
4035
4121
|
}
|
|
4036
4122
|
let r = N(j.value);
|
|
4037
4123
|
r.interrupt();
|
|
4038
|
-
let i =
|
|
4039
|
-
|
|
4040
|
-
let [[a, o], [s, c]] =
|
|
4124
|
+
let i = at;
|
|
4125
|
+
at = !0;
|
|
4126
|
+
let [[a, o], [s, c]] = $t.value.bounds({
|
|
4041
4127
|
type: "FeatureCollection",
|
|
4042
4128
|
features: e.map((e) => e.feature)
|
|
4043
|
-
}), l = (a + s) / 2, u = (o + c) / 2, d = p.focusZoomLevel, f = de.translate(
|
|
4129
|
+
}), l = (a + s) / 2, u = (o + c) / 2, d = p.focusZoomLevel, f = de.translate(St.value / 2 - d * l, Ct.value / 2 - d * u).scale(d), m = t[0]?.feature ?? null, h = () => {
|
|
4044
4130
|
if (!ye.value || !m) return;
|
|
4045
4131
|
let e = String(m.id);
|
|
4046
|
-
if (
|
|
4047
|
-
let t =
|
|
4048
|
-
t &&
|
|
4132
|
+
if (L.value) {
|
|
4133
|
+
let t = rr(e);
|
|
4134
|
+
t && Dn(e, t.x, t.y);
|
|
4049
4135
|
return;
|
|
4050
4136
|
}
|
|
4051
4137
|
let t = Se.get(e);
|
|
4052
4138
|
if (!t) return;
|
|
4053
4139
|
let n = t.getBoundingClientRect();
|
|
4054
|
-
|
|
4140
|
+
Dn(e, n.left + n.width / 2, n.top + n.height / 2);
|
|
4055
4141
|
};
|
|
4056
|
-
i ? (
|
|
4142
|
+
i ? (kn(), r.transition().duration(Oi).call(K.transform, f).on("end", h)) : (K.transform(r, f), h());
|
|
4057
4143
|
}
|
|
4058
|
-
function
|
|
4144
|
+
function st(e) {
|
|
4059
4145
|
let t = se.value;
|
|
4060
4146
|
if (!t) return;
|
|
4061
4147
|
let n = new Set(e.map((e) => e.key));
|
|
4062
|
-
for (let [e, t] of
|
|
4063
|
-
let r =
|
|
4148
|
+
for (let [e, t] of De) n.has(e) || (t.el.remove(), De.delete(e));
|
|
4149
|
+
let r = $t.value;
|
|
4064
4150
|
for (let { item: n, feature: i, key: a } of e) {
|
|
4065
|
-
let e =
|
|
4151
|
+
let e = De.get(a);
|
|
4066
4152
|
if (!e) {
|
|
4067
|
-
let n = document.createElementNS(
|
|
4068
|
-
n.setAttribute("d", r(i) ?? ""), n.setAttribute("fill", "none"), n.setAttribute("pointer-events", "none"), n.setAttribute("stroke-linejoin", "round"), n.setAttribute("class", "focus-overlay"), t.appendChild(n), e = { el: n },
|
|
4153
|
+
let n = document.createElementNS(Ci, "path");
|
|
4154
|
+
n.setAttribute("d", r(i) ?? ""), n.setAttribute("fill", "none"), n.setAttribute("pointer-events", "none"), n.setAttribute("stroke-linejoin", "round"), n.setAttribute("class", "focus-overlay"), t.appendChild(n), e = { el: n }, De.set(a, e);
|
|
4069
4155
|
}
|
|
4070
|
-
e.strokeWidth = n.strokeWidth, e.el.setAttribute("stroke", n.stroke ?? "#fff"),
|
|
4156
|
+
e.strokeWidth = n.strokeWidth, e.el.setAttribute("stroke", n.stroke ?? "#fff"), An(e.el, n.style);
|
|
4071
4157
|
}
|
|
4072
|
-
|
|
4158
|
+
ir();
|
|
4073
4159
|
}
|
|
4074
|
-
function
|
|
4075
|
-
if (!j.value || !
|
|
4076
|
-
|
|
4160
|
+
function ct() {
|
|
4161
|
+
if (!j.value || !K) return;
|
|
4162
|
+
sn.value.length > 0 && O("update:focus", null);
|
|
4077
4163
|
let e = N(j.value);
|
|
4078
|
-
e.interrupt(),
|
|
4079
|
-
let t =
|
|
4164
|
+
e.interrupt(), kn();
|
|
4165
|
+
let t = G() && !$.isFullscreen.value && !J.value, n = e.transition().duration(Oi).call(K.transform, de);
|
|
4080
4166
|
t && n.on("end", () => {
|
|
4081
|
-
|
|
4167
|
+
q.value = !1;
|
|
4082
4168
|
});
|
|
4083
4169
|
}
|
|
4084
|
-
let
|
|
4170
|
+
let lt = n(() => Math.max(12, p.focusZoomLevel)), ut = n(() => p.zoom && (!G() || $.isFullscreen.value || J.value || !p.touchExpand)), dt = n(() => p.zoom && !G() && (J.value || q.value || $.isFullscreen.value)), ft = n(() => p.zoom && p.zoomHint && !J.value && !$.isFullscreen.value && (G() && p.touchExpand || !q.value)), pt = n(() => G() ? "Double tap to zoom" : "Double click to zoom"), mt = n(() => {
|
|
4085
4171
|
let e = {};
|
|
4086
|
-
return $.isFullscreen.value ||
|
|
4172
|
+
return $.isFullscreen.value || We.value ? e["touch-action"] = "none" : p.zoom && !J.value && G() && (e["touch-action"] = p.touchExpand ? "manipulation" : "pan-x pan-y"), (q.value || $.isFullscreen.value || p.zoom && (J.value || G())) && (e["will-change"] = "transform"), Object.keys(e).length ? e : void 0;
|
|
4087
4173
|
});
|
|
4088
|
-
function
|
|
4089
|
-
if (!j.value || !
|
|
4174
|
+
function ht(e) {
|
|
4175
|
+
if (!j.value || !K) return;
|
|
4090
4176
|
let t = N(j.value);
|
|
4091
|
-
t.interrupt(),
|
|
4177
|
+
t.interrupt(), kn(), t.transition().duration(250).call(K.scaleBy, e);
|
|
4092
4178
|
}
|
|
4093
|
-
function
|
|
4179
|
+
function gt(e, t) {
|
|
4094
4180
|
let n = j.value;
|
|
4095
4181
|
if (!n) return null;
|
|
4096
4182
|
let r = null;
|
|
@@ -4103,69 +4189,74 @@ var ai = ["role", "aria-label"], oi = {
|
|
|
4103
4189
|
let n = r.inverse();
|
|
4104
4190
|
return [n.a * e + n.c * t + n.e, n.b * e + n.d * t + n.f];
|
|
4105
4191
|
}
|
|
4106
|
-
let i = n.getBoundingClientRect(), a = i.width ?
|
|
4192
|
+
let i = n.getBoundingClientRect(), a = i.width ? St.value / i.width : 1, o = i.height ? Ct.value / i.height : 1;
|
|
4107
4193
|
return [(e - i.left) * a, (t - i.top) * o];
|
|
4108
4194
|
}
|
|
4109
|
-
function
|
|
4110
|
-
let n = j.value, r =
|
|
4111
|
-
return o && ([i, a] = fe(n).invert(o)), de.translate(
|
|
4195
|
+
function _t(e, t) {
|
|
4196
|
+
let n = j.value, r = Ai, i = St.value / 2, a = Ct.value / 2, o = gt(e, t);
|
|
4197
|
+
return o && ([i, a] = fe(n).invert(o)), de.translate(St.value / 2 - r * i, Ct.value / 2 - r * a).scale(r);
|
|
4112
4198
|
}
|
|
4113
|
-
function
|
|
4114
|
-
if (!j.value || !
|
|
4199
|
+
function vt(e) {
|
|
4200
|
+
if (!j.value || !K) return;
|
|
4115
4201
|
let t = N(j.value);
|
|
4116
|
-
t.interrupt(), t.transition().duration(
|
|
4117
|
-
}
|
|
4118
|
-
function vt(e, t) {
|
|
4119
|
-
if (!j.value || !q) return;
|
|
4120
|
-
let n = gt(e, t);
|
|
4121
|
-
$.enter(), f(() => _t(n));
|
|
4202
|
+
t.interrupt(), t.transition().duration(Oi).call(K.transform, e);
|
|
4122
4203
|
}
|
|
4123
4204
|
function yt(e, t) {
|
|
4124
|
-
!j.value || !
|
|
4205
|
+
if (!j.value || !K) return;
|
|
4206
|
+
let n = _t(e, t);
|
|
4207
|
+
$.enter(), f(() => vt(n));
|
|
4208
|
+
}
|
|
4209
|
+
function bt(e, t) {
|
|
4210
|
+
!j.value || !K || vt(_t(e, t));
|
|
4125
4211
|
}
|
|
4126
4212
|
E(() => p.focusZoomLevel, () => {
|
|
4127
|
-
|
|
4213
|
+
K && K.scaleExtent([1, lt.value]), ot();
|
|
4128
4214
|
}), E(() => p.state, () => {
|
|
4129
|
-
if (!j.value || !
|
|
4215
|
+
if (!j.value || !K) return;
|
|
4130
4216
|
let e = N(j.value);
|
|
4131
|
-
e.interrupt(),
|
|
4217
|
+
e.interrupt(), K.transform(e, de);
|
|
4132
4218
|
});
|
|
4133
|
-
let
|
|
4219
|
+
let xt = n(() => p.width && p.height ? p.height / p.width : .625), St = n(() => ji), Ct = n(() => ji * xt.value), wt = n(() => {
|
|
4134
4220
|
let e = S(p.topology), t = e?.objects?.states;
|
|
4135
4221
|
if (!t) return [];
|
|
4136
4222
|
let n = pe(e, t);
|
|
4137
4223
|
return n.type === "FeatureCollection" ? n.features : [n];
|
|
4138
|
-
}),
|
|
4224
|
+
}), Et = n(() => {
|
|
4139
4225
|
let e = p.state?.trim();
|
|
4140
4226
|
if (!e) return null;
|
|
4141
4227
|
if (/^\d{1,2}$/.test(e)) return e.padStart(2, "0");
|
|
4142
|
-
let t =
|
|
4228
|
+
let t = wt.value.find((t) => t.properties?.name === e);
|
|
4143
4229
|
return t?.id == null ? null : String(t.id).padStart(2, "0");
|
|
4144
|
-
}),
|
|
4145
|
-
let e =
|
|
4146
|
-
return e ?
|
|
4230
|
+
}), Dt = n(() => {
|
|
4231
|
+
let e = Et.value;
|
|
4232
|
+
return e ? wt.value.find((t) => String(t.id).padStart(2, "0") === e) ?? null : null;
|
|
4147
4233
|
});
|
|
4148
|
-
E(() => [p.state,
|
|
4234
|
+
E(() => [p.state, Et.value], ([e, t]) => {
|
|
4149
4235
|
e && e.trim() && !t && console.warn(`[ChoroplethMap] state="${e}" matched no state name or FIPS code; rendering the full map.`);
|
|
4150
4236
|
}, { immediate: !0 });
|
|
4151
|
-
let
|
|
4152
|
-
function
|
|
4153
|
-
return
|
|
4237
|
+
let Ot = v(null), kt = null;
|
|
4238
|
+
function At() {
|
|
4239
|
+
return kt ||= import("./hsaMapping-BahYDmea.js").then((e) => e.n).then((e) => (Ot.value = e, e)), kt;
|
|
4154
4240
|
}
|
|
4155
4241
|
E(() => {
|
|
4156
|
-
if (p.geoType === "hsas" || p.dataGeoType === "hsas") return !0;
|
|
4242
|
+
if (p.geoType === "hsas" || p.dataGeoType === "hsas" || p.data?.some((e) => e.geoType === "hsas")) return !0;
|
|
4157
4243
|
let e = p.focus;
|
|
4158
4244
|
return e ? (Array.isArray(e) ? e : [e]).some((e) => typeof e != "string" && e.geoType === "hsas") : !1;
|
|
4159
4245
|
}, (e) => {
|
|
4160
|
-
e &&
|
|
4246
|
+
e && At();
|
|
4161
4247
|
}, { immediate: !0 });
|
|
4162
|
-
let
|
|
4163
|
-
let e =
|
|
4248
|
+
let jt = n(() => {
|
|
4249
|
+
let e = Ot.value;
|
|
4164
4250
|
if (!e) return {
|
|
4165
4251
|
type: "FeatureCollection",
|
|
4166
4252
|
features: []
|
|
4167
4253
|
};
|
|
4168
|
-
let { fipsToHsa: t, hsaNames: n } = e, r = S(p.topology), i = r.objects
|
|
4254
|
+
let { fipsToHsa: t, hsaNames: n } = e, r = S(p.topology), i = r.objects?.counties?.geometries;
|
|
4255
|
+
if (!i) return {
|
|
4256
|
+
type: "FeatureCollection",
|
|
4257
|
+
features: []
|
|
4258
|
+
};
|
|
4259
|
+
let a = Et.value, o = /* @__PURE__ */ new Map();
|
|
4169
4260
|
for (let e of i) {
|
|
4170
4261
|
let n = String(e.id).padStart(5, "0");
|
|
4171
4262
|
if (a && n.slice(0, 2) !== a) continue;
|
|
@@ -4183,127 +4274,150 @@ var ai = ["role", "aria-label"], oi = {
|
|
|
4183
4274
|
type: "FeatureCollection",
|
|
4184
4275
|
features: s
|
|
4185
4276
|
};
|
|
4186
|
-
}),
|
|
4187
|
-
|
|
4188
|
-
|
|
4277
|
+
}), Mt = n(() => {
|
|
4278
|
+
let e = S(p.topology), t = e?.objects?.counties;
|
|
4279
|
+
if (!t) return [];
|
|
4280
|
+
let n = pe(e, t);
|
|
4281
|
+
return n.type === "FeatureCollection" ? n.features : [n];
|
|
4282
|
+
}), Nt = n(() => {
|
|
4283
|
+
if (p.geoType === "hsas") return jt.value.features;
|
|
4284
|
+
let e = Et.value;
|
|
4189
4285
|
if (p.geoType === "counties") {
|
|
4190
|
-
let t =
|
|
4191
|
-
return e ?
|
|
4192
|
-
type: "FeatureCollection",
|
|
4193
|
-
features: n.features.filter((t) => String(t.id).padStart(5, "0").slice(0, 2) === e)
|
|
4194
|
-
} : n;
|
|
4286
|
+
let t = Mt.value;
|
|
4287
|
+
return e ? t.filter((t) => String(t.id).padStart(5, "0").slice(0, 2) === e) : t;
|
|
4195
4288
|
}
|
|
4196
|
-
let t =
|
|
4197
|
-
return e ?
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4289
|
+
let t = wt.value;
|
|
4290
|
+
return e ? t.filter((t) => String(t.id).padStart(2, "0") === e) : t;
|
|
4291
|
+
}), Pt = n(() => {
|
|
4292
|
+
let e = Ot.value;
|
|
4293
|
+
if (!e) return null;
|
|
4294
|
+
let t = /* @__PURE__ */ new Map();
|
|
4295
|
+
for (let n in e.fipsToHsa) t.set(e.fipsToHsa[n], n.slice(0, 2));
|
|
4296
|
+
return t;
|
|
4297
|
+
}), Lt = n(() => {
|
|
4298
|
+
let e = (e) => {
|
|
4299
|
+
let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
|
|
4300
|
+
for (let r of e) {
|
|
4301
|
+
if (r.id == null) continue;
|
|
4302
|
+
let e = String(r.id);
|
|
4303
|
+
t.set(e, r), r.properties?.name != null && n.set(r.properties.name, e);
|
|
4304
|
+
}
|
|
4305
|
+
return {
|
|
4306
|
+
byId: t,
|
|
4307
|
+
byName: n
|
|
4308
|
+
};
|
|
4309
|
+
};
|
|
4310
|
+
return {
|
|
4311
|
+
states: () => e(wt.value),
|
|
4312
|
+
counties: () => e(Mt.value),
|
|
4313
|
+
hsas: () => e(jt.value.features)
|
|
4314
|
+
};
|
|
4315
|
+
});
|
|
4316
|
+
function Rt(e) {
|
|
4317
|
+
let t = Lt.value[e]();
|
|
4318
|
+
return t.byId.size ? t : null;
|
|
4319
|
+
}
|
|
4320
|
+
let zt = n(() => ci(p.data, p.geoType, Rt, Pt.value)), Bt = n(() => li(zt.value.overrides)), Vt = n(() => ui(Bt.value)), Ht = n(() => di(Nt.value, p.geoType, Vt.value, Rt, Pt.value, Et.value)), Ut = n(() => Ht.value.levelById);
|
|
4321
|
+
function Gt(e) {
|
|
4322
|
+
return Ut.value.get(e) ?? p.geoType;
|
|
4323
|
+
}
|
|
4324
|
+
let Kt = n(() => ({
|
|
4325
|
+
type: "FeatureCollection",
|
|
4326
|
+
features: Ht.value.features
|
|
4327
|
+
}));
|
|
4328
|
+
E(() => zt.value, ({ unresolved: e, conflicts: t }) => {
|
|
4329
|
+
e.length && console.warn(`[ChoroplethMap] data rows with a geoType that resolved to no state: ${e.join(", ")}. Use a FIPS/HSA code or feature name available in that geoType.`), t.length && console.warn(`[ChoroplethMap] data rows claiming an already-mixed state at a different geoType: ${t.join(", ")}. A state renders at one level; the first row wins.`);
|
|
4330
|
+
}, { immediate: !0 });
|
|
4331
|
+
let qt = n(() => {
|
|
4202
4332
|
if (p.geoType !== "counties" && p.geoType !== "hsas") return null;
|
|
4203
|
-
if (
|
|
4333
|
+
if (Et.value) return Dt.value;
|
|
4204
4334
|
let e = S(p.topology);
|
|
4205
4335
|
return he(e, e.objects.states, (e, t) => e !== t);
|
|
4206
|
-
}),
|
|
4336
|
+
}), Jt = n(() => {
|
|
4207
4337
|
if (!A.value.outline) return null;
|
|
4208
4338
|
let e = S(p.topology), t = p.geoType === "counties" || p.geoType === "hsas", n = t ? e.objects?.counties : e.objects?.states;
|
|
4209
4339
|
if (!n) return null;
|
|
4210
|
-
let r =
|
|
4340
|
+
let r = Et.value;
|
|
4211
4341
|
if (!r) return he(e, n, (e, t) => e === t);
|
|
4212
4342
|
let i = t ? 5 : 2;
|
|
4213
4343
|
return he(e, {
|
|
4214
4344
|
type: "GeometryCollection",
|
|
4215
4345
|
geometries: n.geometries.filter((e) => String(e.id).padStart(i, "0").slice(0, 2) === r)
|
|
4216
4346
|
}, (e, t) => e === t);
|
|
4217
|
-
}),
|
|
4347
|
+
}), Yt = n(() => {
|
|
4218
4348
|
let e = p.tightFit;
|
|
4219
4349
|
return e === !0 ? 1 : e ? Math.max(0, Math.min(1, Number(e))) : 0;
|
|
4220
|
-
}),
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
let t = /* @__PURE__ */ new Set();
|
|
4225
|
-
for (let n in e.fipsToHsa) {
|
|
4226
|
-
let r = n.slice(0, 2);
|
|
4227
|
-
(r === "02" || r === "15") && t.add(e.fipsToHsa[n]);
|
|
4228
|
-
}
|
|
4229
|
-
return (e) => t.has(e);
|
|
4230
|
-
}
|
|
4231
|
-
let e = p.geoType === "counties" ? 5 : 2;
|
|
4232
|
-
return (t) => {
|
|
4233
|
-
let n = t.padStart(e, "0").slice(0, 2);
|
|
4350
|
+
}), Xt = n(() => {
|
|
4351
|
+
let e = Pt.value;
|
|
4352
|
+
return (p.geoType === "hsas" || [...Ut.value.values()].includes("hsas")) && !e ? null : (t) => {
|
|
4353
|
+
let n = oi(Gt(t), t, e);
|
|
4234
4354
|
return n === "02" || n === "15";
|
|
4235
4355
|
};
|
|
4236
|
-
}),
|
|
4237
|
-
if (
|
|
4238
|
-
let e =
|
|
4356
|
+
}), Zt = n(() => {
|
|
4357
|
+
if (Yt.value <= 0 || Et.value) return null;
|
|
4358
|
+
let e = Xt.value;
|
|
4239
4359
|
if (!e) return null;
|
|
4240
|
-
let t =
|
|
4360
|
+
let t = Kt.value, n = t.features.filter((t) => !e(String(t.id)));
|
|
4241
4361
|
return n.length === t.features.length ? null : {
|
|
4242
4362
|
type: "FeatureCollection",
|
|
4243
4363
|
features: n
|
|
4244
4364
|
};
|
|
4245
|
-
}),
|
|
4246
|
-
let e =
|
|
4247
|
-
if (
|
|
4248
|
-
let t = [[
|
|
4365
|
+
}), Qt = n(() => {
|
|
4366
|
+
let e = Dt.value;
|
|
4367
|
+
if (Et.value && e) {
|
|
4368
|
+
let t = [[Mi, Mi], [St.value - Mi, Ct.value - Mi]], n = M().fitExtent(t, e), r = le(n).centroid(e);
|
|
4249
4369
|
return Number.isFinite(r[0]) && Number.isFinite(r[1]) ? n : ce().fitExtent(t, e);
|
|
4250
4370
|
}
|
|
4251
|
-
let t = [[0, 0], [
|
|
4371
|
+
let t = [[0, 0], [St.value, Ct.value]], n = M().fitExtent(t, Kt.value), r = Zt.value;
|
|
4252
4372
|
if (!r) return n;
|
|
4253
|
-
let i = M().fitExtent(t, r), a =
|
|
4373
|
+
let i = M().fitExtent(t, r), a = Yt.value, o = (e, t) => e + (t - e) * a, [s, c] = n.translate(), [l, u] = i.translate();
|
|
4254
4374
|
return M().scale(o(n.scale(), i.scale())).translate([o(s, l), o(c, u)]);
|
|
4255
|
-
}),
|
|
4375
|
+
}), $t = n(() => le(Qt.value)), en = n(() => A.value.strokeWidth ?? (p.geoType === "counties" || p.geoType === "hsas" ? .25 : .5)), tn = n(() => A.value.bordersWidth ?? 1), nn = n(() => A.value.outlineWidth ?? 1), rn = n(() => {
|
|
4256
4376
|
let e = /* @__PURE__ */ new Map();
|
|
4257
|
-
for (let [t, n] of
|
|
4377
|
+
for (let [t, n] of cn.value) {
|
|
4258
4378
|
let r = /* @__PURE__ */ new Map();
|
|
4259
4379
|
for (let [e, t] of n) t.properties?.name != null && r.set(t.properties.name, e);
|
|
4260
4380
|
e.set(t, r);
|
|
4261
4381
|
}
|
|
4262
4382
|
return e;
|
|
4263
4383
|
});
|
|
4264
|
-
function
|
|
4384
|
+
function an(e) {
|
|
4265
4385
|
let t = p.dataGeoType;
|
|
4266
4386
|
if (!t || t === p.geoType) return e;
|
|
4267
|
-
if (p.geoType === "counties" && t === "hsas") return
|
|
4387
|
+
if (p.geoType === "counties" && t === "hsas") return Ot.value?.fipsToHsa[e];
|
|
4268
4388
|
if (p.geoType === "counties" && t === "states" || p.geoType === "hsas" && t === "states") return e.slice(0, 2);
|
|
4269
4389
|
}
|
|
4270
|
-
let
|
|
4390
|
+
let on = n(() => {
|
|
4271
4391
|
let e = /* @__PURE__ */ new Map();
|
|
4272
|
-
for (let t of
|
|
4392
|
+
for (let t of Kt.value.features) t.id != null && e.set(String(t.id), t);
|
|
4273
4393
|
return e;
|
|
4274
|
-
}),
|
|
4394
|
+
}), sn = n(() => {
|
|
4275
4395
|
let e = p.focus;
|
|
4276
4396
|
return e == null ? [] : (Array.isArray(e) ? e : [e]).map((e) => typeof e == "string" ? { id: e } : e);
|
|
4277
|
-
}),
|
|
4397
|
+
}), cn = n(() => {
|
|
4278
4398
|
let e = /* @__PURE__ */ new Map();
|
|
4279
|
-
e.set(p.geoType,
|
|
4280
|
-
let t
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
let i = pe(t, n.states);
|
|
4289
|
-
e.set("states", r(i.features));
|
|
4290
|
-
}
|
|
4291
|
-
if (!e.has("counties") && n.counties) {
|
|
4292
|
-
let i = pe(t, n.counties);
|
|
4293
|
-
e.set("counties", r(i.features));
|
|
4399
|
+
e.set(p.geoType, on.value);
|
|
4400
|
+
for (let t of [
|
|
4401
|
+
"states",
|
|
4402
|
+
"counties",
|
|
4403
|
+
"hsas"
|
|
4404
|
+
]) {
|
|
4405
|
+
if (e.has(t)) continue;
|
|
4406
|
+
let n = Rt(t);
|
|
4407
|
+
n && e.set(t, n.byId);
|
|
4294
4408
|
}
|
|
4295
|
-
return
|
|
4296
|
-
}),
|
|
4409
|
+
return e;
|
|
4410
|
+
}), ln = n(() => {
|
|
4297
4411
|
let e = /* @__PURE__ */ new Map();
|
|
4298
4412
|
if (!p.data) return e;
|
|
4299
|
-
let t = p.dataGeoType ?? p.geoType
|
|
4300
|
-
for (let
|
|
4301
|
-
e.set(
|
|
4302
|
-
let r = n?.get(
|
|
4303
|
-
r && e.set(r,
|
|
4413
|
+
let t = p.dataGeoType ?? p.geoType;
|
|
4414
|
+
for (let n of p.data) {
|
|
4415
|
+
e.set(n.id, n.value);
|
|
4416
|
+
let r = rn.value.get(n.geoType ?? t)?.get(n.id);
|
|
4417
|
+
r && e.set(r, n.value);
|
|
4304
4418
|
}
|
|
4305
4419
|
return e;
|
|
4306
|
-
}),
|
|
4420
|
+
}), un = n(() => {
|
|
4307
4421
|
if (!p.data || p.data.length === 0) return {
|
|
4308
4422
|
min: 0,
|
|
4309
4423
|
max: 1
|
|
@@ -4320,122 +4434,123 @@ var ai = ["role", "aria-label"], oi = {
|
|
|
4320
4434
|
min: 0,
|
|
4321
4435
|
max: 1
|
|
4322
4436
|
};
|
|
4323
|
-
}),
|
|
4324
|
-
if (
|
|
4325
|
-
let e =
|
|
4326
|
-
return e ? e.map((e) => e.color) : [
|
|
4327
|
-
}),
|
|
4328
|
-
let e =
|
|
4437
|
+
}), dn = n(() => Array.isArray(p.colorScale) && p.colorScale.length > 0 && "value" in p.colorScale[0]), Z = n(() => Array.isArray(p.colorScale) && !dn.value), fn = n(() => Z.value ? "" : p.colorScale?.min ?? Ni), pn = n(() => Z.value ? "" : p.colorScale?.max ?? Pi), mn = n(() => Z.value ? p.colorScale.slice().sort((e, t) => t.min - e.min) : null), hn = n(() => {
|
|
4438
|
+
if (dn.value) return p.colorScale.map((e) => e.color);
|
|
4439
|
+
let e = mn.value;
|
|
4440
|
+
return e ? e.map((e) => e.color) : [fn.value, pn.value];
|
|
4441
|
+
}), gn = n(() => {
|
|
4442
|
+
let e = hn.value;
|
|
4329
4443
|
return ie.resolvePalette(e, e);
|
|
4330
4444
|
});
|
|
4331
|
-
function
|
|
4332
|
-
let t =
|
|
4445
|
+
function _n(e) {
|
|
4446
|
+
let t = gn.value, [n, r, i] = Tt(t[0] ?? "") ?? [
|
|
4333
4447
|
229,
|
|
4334
4448
|
240,
|
|
4335
4449
|
250
|
|
4336
|
-
], [a, o, s] =
|
|
4450
|
+
], [a, o, s] = Tt(t[1] ?? "") ?? [
|
|
4337
4451
|
8,
|
|
4338
4452
|
81,
|
|
4339
4453
|
156
|
|
4340
4454
|
];
|
|
4341
4455
|
return `rgb(${Math.round(n + (a - n) * e)},${Math.round(r + (o - r) * e)},${Math.round(i + (s - i) * e)})`;
|
|
4342
4456
|
}
|
|
4343
|
-
let
|
|
4344
|
-
if (!
|
|
4345
|
-
let e =
|
|
4457
|
+
let vn = n(() => {
|
|
4458
|
+
if (!dn.value) return null;
|
|
4459
|
+
let e = gn.value, t = /* @__PURE__ */ new Map();
|
|
4346
4460
|
return p.colorScale.forEach((n, r) => t.set(n.value, e[r] ?? n.color)), t;
|
|
4347
4461
|
});
|
|
4348
|
-
function
|
|
4349
|
-
|
|
4350
|
-
|
|
4462
|
+
function yn(e) {
|
|
4463
|
+
if (Ut.value.has(e)) return ln.value.get(e);
|
|
4464
|
+
let t = an(e);
|
|
4465
|
+
return t == null ? void 0 : ln.value.get(t);
|
|
4351
4466
|
}
|
|
4352
|
-
function
|
|
4353
|
-
let t =
|
|
4467
|
+
function bn(e) {
|
|
4468
|
+
let t = yn(e), n = A.value.fill;
|
|
4354
4469
|
if (t == null) return n;
|
|
4355
|
-
let r =
|
|
4470
|
+
let r = vn.value;
|
|
4356
4471
|
if (r) return r.get(String(t)) ?? n;
|
|
4357
|
-
let i =
|
|
4472
|
+
let i = mn.value;
|
|
4358
4473
|
if (i) {
|
|
4359
|
-
let e =
|
|
4474
|
+
let e = gn.value, r = t;
|
|
4360
4475
|
for (let t = 0; t < i.length; t++) if (r >= i[t].min) return e[t] ?? i[t].color;
|
|
4361
4476
|
return n;
|
|
4362
4477
|
}
|
|
4363
|
-
let { min: a, max: o } =
|
|
4364
|
-
return
|
|
4478
|
+
let { min: a, max: o } = un.value;
|
|
4479
|
+
return _n((t - a) / (o - a));
|
|
4365
4480
|
}
|
|
4366
|
-
let
|
|
4367
|
-
function
|
|
4481
|
+
let xn = (e) => e.properties?.name ?? String(e.id);
|
|
4482
|
+
function Sn(e) {
|
|
4368
4483
|
return e == null ? "" : typeof e == "number" && p.tooltipValueFormat !== void 0 ? ne(e, p.tooltipValueFormat) : String(e);
|
|
4369
4484
|
}
|
|
4370
|
-
function
|
|
4371
|
-
return t == null ? e : `${e}: ${
|
|
4485
|
+
function Cn(e, t) {
|
|
4486
|
+
return t == null ? e : `${e}: ${Sn(t)}`;
|
|
4372
4487
|
}
|
|
4373
|
-
function
|
|
4488
|
+
function wn() {
|
|
4374
4489
|
let e = P.value?.getEl();
|
|
4375
|
-
e && (
|
|
4490
|
+
e && (H?.disconnect(), H = new ResizeObserver((e) => {
|
|
4376
4491
|
let t = e[0];
|
|
4377
4492
|
if (!t) return;
|
|
4378
4493
|
let n = t.borderBoxSize?.[0];
|
|
4379
|
-
|
|
4380
|
-
}),
|
|
4494
|
+
Le.width = n ? n.inlineSize : t.contentRect.width, Le.height = n ? n.blockSize : t.contentRect.height, Be && U && Tn(U.x, U.y);
|
|
4495
|
+
}), H.observe(e));
|
|
4381
4496
|
}
|
|
4382
|
-
function
|
|
4497
|
+
function Tn(e, t) {
|
|
4383
4498
|
let n = P.value?.getEl();
|
|
4384
4499
|
if (!n) return;
|
|
4385
|
-
let r = re.value?.getBoundingClientRect(), { left: i, top: a } =
|
|
4500
|
+
let r = re.value?.getBoundingClientRect(), { left: i, top: a } = B(e, t, Le.width, Le.height, p.tooltipClamp, r);
|
|
4386
4501
|
n.style.transform = `translate3d(${i}px, ${a}px, 0) translateY(-50%)`;
|
|
4387
4502
|
let o = typeof window < "u" ? window.visualViewport : null;
|
|
4388
4503
|
if (!o || o.scale <= 1.01 && o.offsetTop < 1 && o.offsetLeft < 1) return;
|
|
4389
4504
|
let s = n.getBoundingClientRect(), c = s.left - i, l = s.top + s.height / 2 - a;
|
|
4390
4505
|
(Math.abs(c) > 1 || Math.abs(l) > 1) && (n.style.transform = `translate3d(${i - c}px, ${a - l}px, 0) translateY(-50%)`);
|
|
4391
4506
|
}
|
|
4392
|
-
let
|
|
4393
|
-
function
|
|
4507
|
+
let En = n(() => $.isFullscreen.value && G() ? "sheet" : "float");
|
|
4508
|
+
function Dn(e, t, n) {
|
|
4394
4509
|
let r = Ce.get(e);
|
|
4395
4510
|
if (!r) return;
|
|
4396
4511
|
let i = P.value;
|
|
4397
4512
|
if (!i) return;
|
|
4398
|
-
if (i.setData(r),
|
|
4513
|
+
if (i.setData(r), Be = !0, En.value === "sheet") {
|
|
4399
4514
|
i.setOpen(!0);
|
|
4400
4515
|
return;
|
|
4401
4516
|
}
|
|
4402
4517
|
let a = i.getEl();
|
|
4403
|
-
a && (
|
|
4518
|
+
a && (U = {
|
|
4404
4519
|
x: t,
|
|
4405
4520
|
y: n
|
|
4406
|
-
},
|
|
4407
|
-
}
|
|
4408
|
-
function
|
|
4409
|
-
!
|
|
4410
|
-
|
|
4411
|
-
x:
|
|
4412
|
-
y:
|
|
4413
|
-
},
|
|
4521
|
+
}, Tn(t, n), a.style.visibility = "visible");
|
|
4522
|
+
}
|
|
4523
|
+
function On(e, t) {
|
|
4524
|
+
!Be || En.value === "sheet" || (Ge = e, Ke = t, !qe && (qe = requestAnimationFrame(() => {
|
|
4525
|
+
qe = 0, Be && (U = {
|
|
4526
|
+
x: Ge,
|
|
4527
|
+
y: Ke
|
|
4528
|
+
}, Tn(Ge, Ke));
|
|
4414
4529
|
})));
|
|
4415
4530
|
}
|
|
4416
|
-
function
|
|
4417
|
-
if (!
|
|
4418
|
-
|
|
4531
|
+
function kn() {
|
|
4532
|
+
if (!Be) return;
|
|
4533
|
+
Be = !1, U = null, P.value?.setOpen(!1);
|
|
4419
4534
|
let e = P.value?.getEl();
|
|
4420
4535
|
e && (e.style.visibility = "hidden");
|
|
4421
4536
|
}
|
|
4422
|
-
function
|
|
4537
|
+
function An(e, t) {
|
|
4423
4538
|
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"));
|
|
4424
4539
|
}
|
|
4425
|
-
function
|
|
4426
|
-
return
|
|
4540
|
+
function jn() {
|
|
4541
|
+
return He.value * Ue.value || 1;
|
|
4427
4542
|
}
|
|
4428
|
-
let
|
|
4429
|
-
function
|
|
4430
|
-
return e?.strokeWidth ??
|
|
4543
|
+
let Mn = typeof CSS < "u" && typeof CSS.supports == "function" && CSS.supports("color", "light-dark(#fff, #000)"), Nn = n(() => p.theme?.highlight ? p.theme.highlight : Mn ? It.highlight : `var(--choropleth-highlight, ${Ft})`);
|
|
4544
|
+
function Pn(e) {
|
|
4545
|
+
return e?.strokeWidth ?? en.value + 1;
|
|
4431
4546
|
}
|
|
4432
|
-
function
|
|
4547
|
+
function Fn() {
|
|
4433
4548
|
let e = fe(j.value);
|
|
4434
4549
|
return {
|
|
4435
4550
|
dpr: typeof window < "u" && window.devicePixelRatio || 1,
|
|
4436
|
-
meetScale:
|
|
4437
|
-
offsetX:
|
|
4438
|
-
offsetY:
|
|
4551
|
+
meetScale: Ue.value,
|
|
4552
|
+
offsetX: Fe,
|
|
4553
|
+
offsetY: Ie,
|
|
4439
4554
|
zoom: {
|
|
4440
4555
|
k: e.k,
|
|
4441
4556
|
x: e.x,
|
|
@@ -4443,121 +4558,121 @@ var ai = ["role", "aria-label"], oi = {
|
|
|
4443
4558
|
}
|
|
4444
4559
|
};
|
|
4445
4560
|
}
|
|
4446
|
-
function
|
|
4561
|
+
function In() {
|
|
4447
4562
|
let e = A.value;
|
|
4448
4563
|
return {
|
|
4449
4564
|
strokeColor: e.stroke,
|
|
4450
|
-
strokeWidth:
|
|
4565
|
+
strokeWidth: en.value,
|
|
4451
4566
|
bordersColor: e.borders,
|
|
4452
|
-
bordersWidth:
|
|
4567
|
+
bordersWidth: tn.value,
|
|
4453
4568
|
outlineColor: e.outline,
|
|
4454
|
-
outlineWidth:
|
|
4569
|
+
outlineWidth: nn.value,
|
|
4455
4570
|
background: e.background,
|
|
4456
4571
|
highlightStroke: e.highlight,
|
|
4457
|
-
hoveredId:
|
|
4458
|
-
focused:
|
|
4459
|
-
overlays:
|
|
4572
|
+
hoveredId: z,
|
|
4573
|
+
focused: je,
|
|
4574
|
+
overlays: Me
|
|
4460
4575
|
};
|
|
4461
4576
|
}
|
|
4462
|
-
let
|
|
4463
|
-
function
|
|
4464
|
-
typeof window > "u" || typeof window.matchMedia != "function" || (
|
|
4577
|
+
let Ln = 0, Rn = 0, zn = !1, Bn = null;
|
|
4578
|
+
function Vn() {
|
|
4579
|
+
typeof window > "u" || typeof window.matchMedia != "function" || (Bn?.removeEventListener("change", Hn), Bn = window.matchMedia(`(resolution: ${window.devicePixelRatio || 1}dppx)`), Bn.addEventListener("change", Hn));
|
|
4465
4580
|
}
|
|
4466
|
-
function
|
|
4467
|
-
|
|
4468
|
-
let e =
|
|
4469
|
-
if (!
|
|
4581
|
+
function Hn() {
|
|
4582
|
+
Vn();
|
|
4583
|
+
let e = Oe.value, t = j.value;
|
|
4584
|
+
if (!L.value || !e || !t) return;
|
|
4470
4585
|
let n = t.getBoundingClientRect();
|
|
4471
4586
|
if (n.width) {
|
|
4472
4587
|
let t = window.devicePixelRatio || 1;
|
|
4473
4588
|
e.width = Math.max(1, Math.round(n.width * t)), e.height = Math.max(1, Math.round(n.height * t));
|
|
4474
4589
|
}
|
|
4475
|
-
|
|
4590
|
+
$n();
|
|
4476
4591
|
}
|
|
4477
|
-
let Q = null,
|
|
4478
|
-
function
|
|
4479
|
-
|
|
4592
|
+
let Q = null, Un = null, Wn = 0, Gn = !0, Kn = 0;
|
|
4593
|
+
function qn() {
|
|
4594
|
+
Gn = !0;
|
|
4480
4595
|
}
|
|
4481
|
-
function
|
|
4596
|
+
function Jn(e, t) {
|
|
4482
4597
|
return e.dpr === t.dpr && e.meetScale === t.meetScale && e.offsetX === t.offsetX && e.offsetY === t.offsetY && e.zoom.k === t.zoom.k && e.zoom.x === t.zoom.x && e.zoom.y === t.zoom.y;
|
|
4483
4598
|
}
|
|
4484
|
-
function
|
|
4599
|
+
function Yn(e, t, n, r) {
|
|
4485
4600
|
let i = (e, t) => e.dpr * ((t === "x" ? e.offsetX : e.offsetY) + e.meetScale * (t === "x" ? e.zoom.x : e.zoom.y)), a = t.dpr * t.meetScale * t.zoom.k / (r.dpr * r.meetScale * r.zoom.k);
|
|
4486
4601
|
e.setTransform(a, 0, 0, a, i(t, "x") - a * i(r, "x"), i(t, "y") - a * i(r, "y")), e.drawImage(n, 0, 0), e.setTransform(1, 0, 0, 1, 0, 0);
|
|
4487
4602
|
}
|
|
4488
|
-
function
|
|
4603
|
+
function Xn(e, t) {
|
|
4489
4604
|
if (typeof document > "u") {
|
|
4490
|
-
|
|
4605
|
+
Un = null;
|
|
4491
4606
|
return;
|
|
4492
4607
|
}
|
|
4493
4608
|
Q ||= document.createElement("canvas"), Q.width !== e.width && (Q.width = e.width), Q.height !== e.height && (Q.height = e.height);
|
|
4494
4609
|
let n = Q.getContext("2d");
|
|
4495
|
-
n && typeof n.drawImage == "function" ? (n.setTransform(1, 0, 0, 1, 0, 0), n.clearRect(0, 0, Q.width, Q.height), n.drawImage(e, 0, 0),
|
|
4610
|
+
n && typeof n.drawImage == "function" ? (n.setTransform(1, 0, 0, 1, 0, 0), n.clearRect(0, 0, Q.width, Q.height), n.drawImage(e, 0, 0), Un = t) : Un = null;
|
|
4496
4611
|
}
|
|
4497
|
-
function
|
|
4498
|
-
let e =
|
|
4612
|
+
function Zn() {
|
|
4613
|
+
let e = Oe.value;
|
|
4499
4614
|
if (!e) return;
|
|
4500
4615
|
let t = e.getContext("2d");
|
|
4501
4616
|
if (!t) return;
|
|
4502
4617
|
let n = () => typeof performance < "u" ? performance.now() : 0;
|
|
4503
|
-
if (!
|
|
4618
|
+
if (!R) {
|
|
4504
4619
|
t.setTransform(1, 0, 0, 1, 0, 0), t.clearRect(0, 0, e.width, e.height);
|
|
4505
4620
|
return;
|
|
4506
4621
|
}
|
|
4507
|
-
let r =
|
|
4508
|
-
if (!
|
|
4509
|
-
t.setTransform(1, 0, 0, 1, 0, 0), t.clearRect(0, 0, e.width, e.height), t.drawImage(Q, 0, 0),
|
|
4622
|
+
let r = Fn(), i = typeof t.drawImage == "function";
|
|
4623
|
+
if (!Gn && i && Q && Un && Q.width === e.width && Q.height === e.height && Jn(r, Un)) {
|
|
4624
|
+
t.setTransform(1, 0, 0, 1, 0, 0), t.clearRect(0, 0, e.width, e.height), t.drawImage(Q, 0, 0), z && Ur(t, R, r, In(), z);
|
|
4510
4625
|
return;
|
|
4511
4626
|
}
|
|
4512
|
-
if (!
|
|
4513
|
-
t.setTransform(1, 0, 0, 1, 0, 0), t.clearRect(0, 0, e.width, e.height),
|
|
4627
|
+
if (!Gn && zn && V && i && Q && Un && n() - Wn < Ii) {
|
|
4628
|
+
t.setTransform(1, 0, 0, 1, 0, 0), t.clearRect(0, 0, e.width, e.height), Yn(t, r, Q, Un), z && Ur(t, R, r, In(), z);
|
|
4514
4629
|
return;
|
|
4515
4630
|
}
|
|
4516
4631
|
let a = n();
|
|
4517
|
-
Wr(t,
|
|
4632
|
+
Wr(t, R, r, In());
|
|
4518
4633
|
let o = n() - a;
|
|
4519
|
-
|
|
4634
|
+
Wn = a + o, Gn = !1, o > Fi ? (Rn = 0, ++Ln >= 2 && (zn = !0)) : (Ln = 0, ++Rn >= 2 && (zn = !1)), Xn(e, r), z && Ur(t, R, r, In(), z);
|
|
4520
4635
|
}
|
|
4521
|
-
function
|
|
4522
|
-
!
|
|
4523
|
-
|
|
4636
|
+
function Qn() {
|
|
4637
|
+
!L.value || Ne || (Ne = requestAnimationFrame(() => {
|
|
4638
|
+
Ne = 0, Zn();
|
|
4524
4639
|
}));
|
|
4525
4640
|
}
|
|
4526
|
-
function
|
|
4527
|
-
|
|
4641
|
+
function $n() {
|
|
4642
|
+
L.value && (Ne &&= (cancelAnimationFrame(Ne), 0), Zn());
|
|
4528
4643
|
}
|
|
4529
|
-
function
|
|
4530
|
-
typeof window > "u" || (
|
|
4531
|
-
|
|
4532
|
-
},
|
|
4644
|
+
function er() {
|
|
4645
|
+
typeof window > "u" || (Kn && window.clearTimeout(Kn), Kn = window.setTimeout(() => {
|
|
4646
|
+
Kn = 0, Qn();
|
|
4647
|
+
}, Li));
|
|
4533
4648
|
}
|
|
4534
|
-
function
|
|
4535
|
-
let n =
|
|
4649
|
+
function tr(e, t) {
|
|
4650
|
+
let n = Oe.value;
|
|
4536
4651
|
if (!n) return;
|
|
4537
|
-
|
|
4652
|
+
wr(n);
|
|
4538
4653
|
let r = typeof window < "u" && window.devicePixelRatio || 1;
|
|
4539
|
-
if (n.width = Math.max(1, Math.round(e * r)), n.height = Math.max(1, Math.round(t * r)),
|
|
4654
|
+
if (n.width = Math.max(1, Math.round(e * r)), n.height = Math.max(1, Math.round(t * r)), zn && !Gn && R && Q && Un && typeof document < "u") {
|
|
4540
4655
|
let e = n.getContext("2d");
|
|
4541
4656
|
if (e && typeof e.drawImage == "function") {
|
|
4542
|
-
let t =
|
|
4543
|
-
e.setTransform(1, 0, 0, 1, 0, 0), e.clearRect(0, 0, n.width, n.height),
|
|
4657
|
+
let t = Fn();
|
|
4658
|
+
e.setTransform(1, 0, 0, 1, 0, 0), e.clearRect(0, 0, n.width, n.height), Yn(e, t, Q, Un), z && Ur(e, R, t, In(), z), er();
|
|
4544
4659
|
return;
|
|
4545
4660
|
}
|
|
4546
4661
|
}
|
|
4547
|
-
|
|
4662
|
+
$n();
|
|
4548
4663
|
}
|
|
4549
|
-
function
|
|
4664
|
+
function nr(e, t) {
|
|
4550
4665
|
let n = j.value;
|
|
4551
|
-
if (!n || !
|
|
4552
|
-
let r =
|
|
4666
|
+
if (!n || !R || !Ae) return null;
|
|
4667
|
+
let r = gt(e, t);
|
|
4553
4668
|
if (!r) return null;
|
|
4554
|
-
let [i, a] = fe(n).invert(r), o = qr(
|
|
4555
|
-
return o == null ? null :
|
|
4669
|
+
let [i, a] = fe(n).invert(r), o = qr(Ae, R, i, a);
|
|
4670
|
+
return o == null ? null : R.items[o].id;
|
|
4556
4671
|
}
|
|
4557
|
-
function
|
|
4558
|
-
let t = j.value, n =
|
|
4672
|
+
function rr(e) {
|
|
4673
|
+
let t = j.value, n = on.value.get(e);
|
|
4559
4674
|
if (!t || !n) return null;
|
|
4560
|
-
let [[r, i], [a, o]] =
|
|
4675
|
+
let [[r, i], [a, o]] = $t.value.bounds(n), [s, c] = fe(t).apply([(r + a) / 2, (i + o) / 2]), l = null;
|
|
4561
4676
|
try {
|
|
4562
4677
|
l = t.getScreenCTM();
|
|
4563
4678
|
} catch {
|
|
@@ -4568,62 +4683,62 @@ var ai = ["role", "aria-label"], oi = {
|
|
|
4568
4683
|
y: l.b * s + l.d * c + l.f
|
|
4569
4684
|
} : null;
|
|
4570
4685
|
}
|
|
4571
|
-
function
|
|
4572
|
-
if (
|
|
4573
|
-
let e =
|
|
4574
|
-
oe.value?.setAttribute("stroke-width", String(t / e)), we?.setAttribute("stroke-width", String(
|
|
4575
|
-
for (let { el: t, strokeWidth: n } of
|
|
4576
|
-
for (let [t, n] of
|
|
4577
|
-
I && !
|
|
4686
|
+
function ir() {
|
|
4687
|
+
if (L.value) return;
|
|
4688
|
+
let e = jn(), t = en.value;
|
|
4689
|
+
oe.value?.setAttribute("stroke-width", String(t / e)), we?.setAttribute("stroke-width", String(tn.value / e)), Te?.setAttribute("stroke-width", String(nn.value / e)), se.value?.setAttribute("stroke-width", String((t + 1.5) / e));
|
|
4690
|
+
for (let { el: t, strokeWidth: n } of De.values()) n == null ? t.removeAttribute("stroke-width") : t.setAttribute("stroke-width", String(n / e));
|
|
4691
|
+
for (let [t, n] of Ee) t.setAttribute("stroke-width", String(Pn(n) / e));
|
|
4692
|
+
I && !Ee.has(I) && I.setAttribute("stroke-width", String(Pn() / e));
|
|
4578
4693
|
}
|
|
4579
|
-
function
|
|
4580
|
-
e.parentNode?.appendChild(e), e.setAttribute("stroke-width", String(
|
|
4694
|
+
function ar(e, t) {
|
|
4695
|
+
e.parentNode?.appendChild(e), e.setAttribute("stroke-width", String(Pn(t) / jn())), e.style.stroke = t?.stroke ?? Nn.value, An(e, t?.style);
|
|
4581
4696
|
}
|
|
4582
|
-
function
|
|
4697
|
+
function or(e) {
|
|
4583
4698
|
e.removeAttribute("stroke-width"), e.style.stroke = "", e.setAttribute("stroke", A.value.stroke), e.removeAttribute("stroke-dasharray"), e.removeAttribute("stroke-linecap");
|
|
4584
4699
|
let t = we ?? Te;
|
|
4585
4700
|
t?.parentNode && t.parentNode === e.parentNode && t.compareDocumentPosition(e) & Node.DOCUMENT_POSITION_FOLLOWING && t.parentNode.insertBefore(e, t);
|
|
4586
4701
|
}
|
|
4587
|
-
function
|
|
4588
|
-
I !== e && (I && !
|
|
4702
|
+
function sr(e) {
|
|
4703
|
+
I !== e && (I && !Ee.has(I) && or(I), I = e, ar(e, Ee.get(e)));
|
|
4589
4704
|
}
|
|
4590
|
-
function
|
|
4591
|
-
if (
|
|
4592
|
-
if (
|
|
4593
|
-
|
|
4705
|
+
function cr(e) {
|
|
4706
|
+
if (L.value) {
|
|
4707
|
+
if (z === e) return;
|
|
4708
|
+
z = e, Qn();
|
|
4594
4709
|
return;
|
|
4595
4710
|
}
|
|
4596
4711
|
let t = Se.get(e);
|
|
4597
|
-
t &&
|
|
4712
|
+
t && sr(t);
|
|
4598
4713
|
}
|
|
4599
|
-
function
|
|
4600
|
-
if (
|
|
4601
|
-
|
|
4714
|
+
function lr() {
|
|
4715
|
+
if (L.value) {
|
|
4716
|
+
z != null && (z = null, Qn(), O("stateHover", null)), kn();
|
|
4602
4717
|
return;
|
|
4603
4718
|
}
|
|
4604
4719
|
if (I) {
|
|
4605
|
-
let e =
|
|
4606
|
-
e == null ?
|
|
4720
|
+
let e = Ee.get(I);
|
|
4721
|
+
e == null ? or(I) : ar(I, e), I = null, O("stateHover", null);
|
|
4607
4722
|
}
|
|
4608
|
-
|
|
4723
|
+
kn();
|
|
4609
4724
|
}
|
|
4610
|
-
function
|
|
4725
|
+
function ur(e) {
|
|
4611
4726
|
let t = e;
|
|
4612
4727
|
for (; t && !t.dataset?.featId;) t = t.parentElement;
|
|
4613
4728
|
return t ? t.dataset.featId ?? null : null;
|
|
4614
4729
|
}
|
|
4615
|
-
function
|
|
4730
|
+
function dr(e) {
|
|
4616
4731
|
O("stateClick", {
|
|
4617
4732
|
id: e.id,
|
|
4618
4733
|
name: e.name,
|
|
4619
4734
|
value: e.value
|
|
4620
4735
|
});
|
|
4621
|
-
let t =
|
|
4736
|
+
let t = it(sn.value).has(e.id);
|
|
4622
4737
|
O("update:focus", t ? null : e.id);
|
|
4623
4738
|
}
|
|
4624
|
-
function
|
|
4625
|
-
if (e.type === "mouseover" &&
|
|
4626
|
-
let t = e, n =
|
|
4739
|
+
function fr(e) {
|
|
4740
|
+
if (e.type === "mouseover" && V) return;
|
|
4741
|
+
let t = e, n = _r(t.target, t.clientX, t.clientY);
|
|
4627
4742
|
if (!n) return;
|
|
4628
4743
|
let r = Ce.get(n);
|
|
4629
4744
|
if (!r) return;
|
|
@@ -4632,130 +4747,130 @@ var ai = ["role", "aria-label"], oi = {
|
|
|
4632
4747
|
name: r.name,
|
|
4633
4748
|
value: r.value
|
|
4634
4749
|
};
|
|
4635
|
-
e.type === "click" ? p.zoom ? (window.clearTimeout(
|
|
4636
|
-
|
|
4637
|
-
},
|
|
4750
|
+
e.type === "click" ? p.zoom ? (window.clearTimeout(X), X = 0, t.detail <= 1 && (X = window.setTimeout(() => {
|
|
4751
|
+
X = 0, dr(r);
|
|
4752
|
+
}, Ei))) : dr(r) : e.type === "mouseover" && (cr(n), ye.value && Dn(n, t.clientX, t.clientY), O("stateHover", i));
|
|
4638
4753
|
}
|
|
4639
|
-
function
|
|
4640
|
-
|
|
4754
|
+
function pr(e) {
|
|
4755
|
+
V || On(e.clientX, e.clientY);
|
|
4641
4756
|
}
|
|
4642
|
-
function
|
|
4757
|
+
function mr(e) {
|
|
4643
4758
|
let t = e.relatedTarget;
|
|
4644
|
-
t && ae.value?.contains(t) ||
|
|
4759
|
+
t && ae.value?.contains(t) || lr();
|
|
4645
4760
|
}
|
|
4646
|
-
function
|
|
4647
|
-
if (
|
|
4648
|
-
let t =
|
|
4649
|
-
if (t ===
|
|
4650
|
-
t &&
|
|
4761
|
+
function hr(e) {
|
|
4762
|
+
if (V) return;
|
|
4763
|
+
let t = nr(e.clientX, e.clientY);
|
|
4764
|
+
if (t === z) {
|
|
4765
|
+
t && On(e.clientX, e.clientY);
|
|
4651
4766
|
return;
|
|
4652
4767
|
}
|
|
4653
4768
|
if (!t) {
|
|
4654
|
-
|
|
4769
|
+
lr();
|
|
4655
4770
|
return;
|
|
4656
4771
|
}
|
|
4657
4772
|
let n = Ce.get(t);
|
|
4658
|
-
n && (
|
|
4773
|
+
n && (cr(t), O("stateHover", {
|
|
4659
4774
|
id: n.id,
|
|
4660
4775
|
name: n.name,
|
|
4661
4776
|
value: n.value
|
|
4662
|
-
}), ye.value &&
|
|
4777
|
+
}), ye.value && Dn(t, e.clientX, e.clientY));
|
|
4663
4778
|
}
|
|
4664
|
-
function
|
|
4665
|
-
|
|
4779
|
+
function gr() {
|
|
4780
|
+
lr();
|
|
4666
4781
|
}
|
|
4667
|
-
function
|
|
4668
|
-
return
|
|
4782
|
+
function _r(e, t, n) {
|
|
4783
|
+
return L.value ? nr(t, n) : ur(e);
|
|
4669
4784
|
}
|
|
4670
|
-
function
|
|
4785
|
+
function vr(e) {
|
|
4671
4786
|
if (e.touches.length !== 1) {
|
|
4672
|
-
|
|
4787
|
+
Je = null;
|
|
4673
4788
|
return;
|
|
4674
4789
|
}
|
|
4675
4790
|
let t = e.touches[0];
|
|
4676
|
-
|
|
4791
|
+
Je = {
|
|
4677
4792
|
x: t.clientX,
|
|
4678
4793
|
y: t.clientY,
|
|
4679
4794
|
time: e.timeStamp,
|
|
4680
|
-
featId:
|
|
4795
|
+
featId: _r(e.target, t.clientX, t.clientY)
|
|
4681
4796
|
};
|
|
4682
4797
|
}
|
|
4683
|
-
function
|
|
4684
|
-
let t =
|
|
4685
|
-
if (
|
|
4798
|
+
function yr(e) {
|
|
4799
|
+
let t = Je;
|
|
4800
|
+
if (Je = null, !t || e.touches.length > 0) return;
|
|
4686
4801
|
let n = e.changedTouches[0];
|
|
4687
|
-
if (!n || Math.abs(n.clientX - t.x) >
|
|
4688
|
-
if (p.zoom && !
|
|
4802
|
+
if (!n || Math.abs(n.clientX - t.x) > wi || Math.abs(n.clientY - t.y) > wi || e.timeStamp - t.time > Ti) return;
|
|
4803
|
+
if (p.zoom && !J.value && G() && !$.isFullscreen.value) {
|
|
4689
4804
|
e.cancelable && e.preventDefault();
|
|
4690
|
-
let r =
|
|
4691
|
-
if (
|
|
4805
|
+
let r = Ye;
|
|
4806
|
+
if (Ye = {
|
|
4692
4807
|
x: n.clientX,
|
|
4693
4808
|
y: n.clientY,
|
|
4694
4809
|
time: e.timeStamp
|
|
4695
|
-
}, r != null && e.timeStamp - r.time <=
|
|
4696
|
-
|
|
4810
|
+
}, r != null && e.timeStamp - r.time <= Ei && Math.abs(n.clientX - r.x) <= Di && Math.abs(n.clientY - r.y) <= Di) {
|
|
4811
|
+
Ye = null, window.clearTimeout(X), X = 0, p.touchExpand ? yt(n.clientX, n.clientY) : bt(n.clientX, n.clientY);
|
|
4697
4812
|
return;
|
|
4698
4813
|
}
|
|
4699
4814
|
let i = t.featId ? Ce.get(t.featId) : void 0;
|
|
4700
4815
|
if (!i) {
|
|
4701
|
-
|
|
4816
|
+
lr();
|
|
4702
4817
|
return;
|
|
4703
4818
|
}
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
},
|
|
4819
|
+
br(i, n.clientX, n.clientY), window.clearTimeout(X), X = window.setTimeout(() => {
|
|
4820
|
+
X = 0, dr(i);
|
|
4821
|
+
}, Ei);
|
|
4707
4822
|
return;
|
|
4708
4823
|
}
|
|
4709
4824
|
if (!t.featId) {
|
|
4710
|
-
|
|
4825
|
+
lr();
|
|
4711
4826
|
return;
|
|
4712
4827
|
}
|
|
4713
4828
|
let r = Ce.get(t.featId);
|
|
4714
|
-
r && (e.cancelable && e.preventDefault(),
|
|
4829
|
+
r && (e.cancelable && e.preventDefault(), br(r, n.clientX, n.clientY), dr(r));
|
|
4715
4830
|
}
|
|
4716
|
-
function
|
|
4717
|
-
if (
|
|
4831
|
+
function br(e, t, n) {
|
|
4832
|
+
if (cr(e.id), O("stateHover", {
|
|
4718
4833
|
id: e.id,
|
|
4719
4834
|
name: e.name,
|
|
4720
4835
|
value: e.value
|
|
4721
4836
|
}), !ye.value) return;
|
|
4722
|
-
if (
|
|
4723
|
-
let r =
|
|
4724
|
-
r ?
|
|
4837
|
+
if (L.value) {
|
|
4838
|
+
let r = rr(e.id);
|
|
4839
|
+
r ? Dn(e.id, r.x, r.y) : Dn(e.id, t, n);
|
|
4725
4840
|
return;
|
|
4726
4841
|
}
|
|
4727
4842
|
let r = Se.get(e.id);
|
|
4728
4843
|
if (r) {
|
|
4729
4844
|
let t = r.getBoundingClientRect();
|
|
4730
|
-
|
|
4731
|
-
} else
|
|
4845
|
+
Dn(e.id, t.left + t.width / 2, t.top + t.height / 2);
|
|
4846
|
+
} else Dn(e.id, t, n);
|
|
4732
4847
|
}
|
|
4733
|
-
function
|
|
4734
|
-
|
|
4848
|
+
function xr() {
|
|
4849
|
+
Je = null;
|
|
4735
4850
|
}
|
|
4736
|
-
function
|
|
4737
|
-
let t = document.createElementNS(
|
|
4851
|
+
function Sr(e) {
|
|
4852
|
+
let t = document.createElementNS(Ci, "path");
|
|
4738
4853
|
return e && t.setAttribute("d", e), t;
|
|
4739
4854
|
}
|
|
4740
|
-
let
|
|
4855
|
+
let Cr = n(() => {
|
|
4741
4856
|
let e = p.theme, t = {};
|
|
4742
4857
|
return e?.markerColor && (t["--choropleth-city-marker"] = e.markerColor, t["--choropleth-city-label-color"] = e.markerColor), e?.markerHalo && (t["--choropleth-city-halo"] = e.markerHalo), e?.markerOpacity != null && (t.opacity = String(e.markerOpacity)), t;
|
|
4743
4858
|
});
|
|
4744
|
-
function
|
|
4859
|
+
function wr(e) {
|
|
4745
4860
|
let t = j.value, n = re.value?.getBoundingClientRect();
|
|
4746
4861
|
if (!e || !t || !n) return;
|
|
4747
4862
|
let r = t.getBoundingClientRect();
|
|
4748
4863
|
e.style.top = `${r.top - n.top}px`, e.style.left = `${r.left - n.left}px`, e.style.width = `${r.width}px`, e.style.height = `${r.height}px`;
|
|
4749
4864
|
}
|
|
4750
|
-
function
|
|
4865
|
+
function Tr() {
|
|
4751
4866
|
let e = ge.value;
|
|
4752
4867
|
if (!e) return;
|
|
4753
|
-
let t = p.cities, n =
|
|
4868
|
+
let t = p.cities, n = Qt.value;
|
|
4754
4869
|
if (!t || t.length === 0 || !n) {
|
|
4755
4870
|
for (; e.firstChild;) e.removeChild(e.firstChild);
|
|
4756
4871
|
return;
|
|
4757
4872
|
}
|
|
4758
|
-
for (
|
|
4873
|
+
for (wr(_e.value); e.firstChild;) e.removeChild(e.firstChild);
|
|
4759
4874
|
let r = j.value ? fe(j.value) : {
|
|
4760
4875
|
k: 1,
|
|
4761
4876
|
x: 0,
|
|
@@ -4767,59 +4882,59 @@ var ai = ["role", "aria-label"], oi = {
|
|
|
4767
4882
|
x: r.x,
|
|
4768
4883
|
y: r.y
|
|
4769
4884
|
}, {
|
|
4770
|
-
width:
|
|
4771
|
-
height:
|
|
4772
|
-
viewScale:
|
|
4773
|
-
labelPx:
|
|
4774
|
-
dotPx:
|
|
4775
|
-
gapPx:
|
|
4885
|
+
width: St.value,
|
|
4886
|
+
height: Ct.value,
|
|
4887
|
+
viewScale: Ue.value,
|
|
4888
|
+
labelPx: Ri,
|
|
4889
|
+
dotPx: zi,
|
|
4890
|
+
gapPx: Bi,
|
|
4776
4891
|
margin: 4
|
|
4777
|
-
}), o =
|
|
4892
|
+
}), o = Ue.value || 1, s = Ri / o, c = (p.theme?.markerHaloWidth ?? Vi) / o, l = Hi / o, u = document.createDocumentFragment();
|
|
4778
4893
|
for (let e of a) {
|
|
4779
|
-
let t = document.createElementNS(
|
|
4894
|
+
let t = document.createElementNS(Ci, "circle");
|
|
4780
4895
|
if (t.setAttribute("cx", String(e.x)), t.setAttribute("cy", String(e.y)), t.setAttribute("r", String(e.radius)), t.setAttribute("class", "choropleth-city-dot"), t.setAttribute("stroke-width", String(c)), u.appendChild(t), e.label) {
|
|
4781
|
-
let t = document.createElementNS(
|
|
4896
|
+
let t = document.createElementNS(Ci, "text");
|
|
4782
4897
|
t.setAttribute("x", String(e.label.x)), t.setAttribute("y", String(e.label.y)), t.setAttribute("text-anchor", e.label.anchor), t.setAttribute("dominant-baseline", "central"), t.setAttribute("font-size", String(s)), t.setAttribute("stroke-width", String(l)), t.setAttribute("class", e.capital ? "choropleth-city-label choropleth-city-label-capital" : "choropleth-city-label"), t.textContent = e.name, u.appendChild(t);
|
|
4783
4898
|
}
|
|
4784
4899
|
}
|
|
4785
4900
|
e.appendChild(u);
|
|
4786
4901
|
}
|
|
4787
|
-
function
|
|
4788
|
-
|
|
4789
|
-
|
|
4902
|
+
function Er() {
|
|
4903
|
+
Pe ||= requestAnimationFrame(() => {
|
|
4904
|
+
Pe = 0, Tr();
|
|
4790
4905
|
});
|
|
4791
4906
|
}
|
|
4792
|
-
function
|
|
4907
|
+
function Dr() {
|
|
4793
4908
|
let e = oe.value, t = se.value;
|
|
4794
4909
|
if (!e || !t) return;
|
|
4795
4910
|
for (; e.firstChild;) e.removeChild(e.firstChild);
|
|
4796
4911
|
for (; t.firstChild;) t.removeChild(t.firstChild);
|
|
4797
|
-
Se.clear(), Ce.clear(), we = null, Te = null, I = null,
|
|
4798
|
-
let n =
|
|
4912
|
+
Se.clear(), Ce.clear(), we = null, Te = null, I = null, Ee.clear(), De.clear(), z = null, je.clear(), Me = [];
|
|
4913
|
+
let n = $t.value, r = Kt.value.features;
|
|
4799
4914
|
if (r.length === 0) {
|
|
4800
|
-
|
|
4915
|
+
R = null, Ae = null, Un = null, qn(), Qn();
|
|
4801
4916
|
return;
|
|
4802
4917
|
}
|
|
4803
|
-
if (
|
|
4918
|
+
if (L.value) {
|
|
4804
4919
|
for (let e of r) {
|
|
4805
4920
|
let t = String(e.id);
|
|
4806
4921
|
Ce.set(t, {
|
|
4807
4922
|
id: t,
|
|
4808
|
-
name:
|
|
4809
|
-
value:
|
|
4923
|
+
name: xn(e),
|
|
4924
|
+
value: yn(t),
|
|
4810
4925
|
feature: e
|
|
4811
4926
|
});
|
|
4812
4927
|
}
|
|
4813
|
-
let e =
|
|
4814
|
-
|
|
4928
|
+
let e = qt.value;
|
|
4929
|
+
R = zr(r, n, bn, e ? n(e) : null), Or(), !ke && typeof document < "u" && (ke = document.createElement("canvas")), Ae = ke ? Kr(R, St.value, Ct.value, ke) : null, qn(), Qn();
|
|
4815
4930
|
return;
|
|
4816
4931
|
}
|
|
4817
4932
|
let i = A.value.stroke, a = !ye.value, o = document.createDocumentFragment();
|
|
4818
4933
|
for (let e of r) {
|
|
4819
|
-
let t = String(e.id), r =
|
|
4820
|
-
if (c.setAttribute("class", "state-path"), c.setAttribute("data-feat-id", t), c.setAttribute("fill",
|
|
4821
|
-
let e = document.createElementNS(
|
|
4822
|
-
e.textContent =
|
|
4934
|
+
let t = String(e.id), r = xn(e), s = yn(t), c = Sr(n(e));
|
|
4935
|
+
if (c.setAttribute("class", "state-path"), c.setAttribute("data-feat-id", t), c.setAttribute("fill", bn(t)), c.setAttribute("stroke", i), a) {
|
|
4936
|
+
let e = document.createElementNS(Ci, "title");
|
|
4937
|
+
e.textContent = Cn(r, s), c.appendChild(e);
|
|
4823
4938
|
}
|
|
4824
4939
|
o.appendChild(c), Se.set(t, c), Ce.set(t, {
|
|
4825
4940
|
id: t,
|
|
@@ -4828,18 +4943,18 @@ var ai = ["role", "aria-label"], oi = {
|
|
|
4828
4943
|
feature: e
|
|
4829
4944
|
});
|
|
4830
4945
|
}
|
|
4831
|
-
let s =
|
|
4946
|
+
let s = qt.value;
|
|
4832
4947
|
if (s) {
|
|
4833
|
-
let e =
|
|
4948
|
+
let e = Sr(n(s));
|
|
4834
4949
|
e.setAttribute("fill", "none"), e.setAttribute("stroke", A.value.borders), e.setAttribute("stroke-linejoin", "round"), e.setAttribute("pointer-events", "none"), o.appendChild(e), we = e;
|
|
4835
4950
|
}
|
|
4836
|
-
e.appendChild(o),
|
|
4951
|
+
e.appendChild(o), Or(), ir();
|
|
4837
4952
|
}
|
|
4838
|
-
function
|
|
4839
|
-
let e =
|
|
4840
|
-
if (
|
|
4841
|
-
if (!
|
|
4842
|
-
|
|
4953
|
+
function Or() {
|
|
4954
|
+
let e = Kt.value.features.length ? Jt.value : null, t = e ? $t.value(e) : null;
|
|
4955
|
+
if (L.value) {
|
|
4956
|
+
if (!R) return;
|
|
4957
|
+
R.exterior = t ? new Path2D(t) : null, qn(), Qn();
|
|
4843
4958
|
return;
|
|
4844
4959
|
}
|
|
4845
4960
|
let n = oe.value;
|
|
@@ -4849,134 +4964,134 @@ var ai = ["role", "aria-label"], oi = {
|
|
|
4849
4964
|
return;
|
|
4850
4965
|
}
|
|
4851
4966
|
if (!Te) {
|
|
4852
|
-
let e = document.createElementNS(
|
|
4967
|
+
let e = document.createElementNS(Ci, "path");
|
|
4853
4968
|
e.setAttribute("fill", "none"), e.setAttribute("stroke-linejoin", "round"), e.setAttribute("pointer-events", "none"), e.setAttribute("class", "choropleth-outline"), n.appendChild(e), Te = e;
|
|
4854
4969
|
}
|
|
4855
|
-
Te.setAttribute("d", t), Te.setAttribute("stroke", A.value.outline),
|
|
4970
|
+
Te.setAttribute("d", t), Te.setAttribute("stroke", A.value.outline), ir();
|
|
4856
4971
|
}
|
|
4857
4972
|
}
|
|
4858
|
-
function
|
|
4859
|
-
if (
|
|
4860
|
-
if (
|
|
4861
|
-
for (let [e, t] of Ce) t.value =
|
|
4862
|
-
|
|
4973
|
+
function kr() {
|
|
4974
|
+
if (L.value) {
|
|
4975
|
+
if (R) for (let e of R.items) e.fill = bn(e.id);
|
|
4976
|
+
for (let [e, t] of Ce) t.value = yn(e);
|
|
4977
|
+
qn(), Qn();
|
|
4863
4978
|
return;
|
|
4864
4979
|
}
|
|
4865
4980
|
let e = !ye.value;
|
|
4866
4981
|
for (let [t, n] of Se) {
|
|
4867
|
-
let r =
|
|
4868
|
-
if (n.setAttribute("fill",
|
|
4982
|
+
let r = yn(t), i = Ce.get(t);
|
|
4983
|
+
if (n.setAttribute("fill", bn(t)), i && (i.value = r), e && i) {
|
|
4869
4984
|
let e = n.firstElementChild;
|
|
4870
|
-
e && (e.textContent =
|
|
4985
|
+
e && (e.textContent = Cn(i.name, r));
|
|
4871
4986
|
}
|
|
4872
4987
|
}
|
|
4873
4988
|
}
|
|
4874
|
-
function
|
|
4875
|
-
if (
|
|
4876
|
-
|
|
4989
|
+
function Ar() {
|
|
4990
|
+
if (L.value) {
|
|
4991
|
+
qn(), Qn();
|
|
4877
4992
|
return;
|
|
4878
4993
|
}
|
|
4879
|
-
for (let e of Se.values()) e === I ||
|
|
4880
|
-
for (let [e, t] of
|
|
4881
|
-
I && !
|
|
4994
|
+
for (let e of Se.values()) e === I || Ee.has(e) || or(e);
|
|
4995
|
+
for (let [e, t] of Ee) ar(e, t);
|
|
4996
|
+
I && !Ee.has(I) && ar(I), we && we.setAttribute("stroke", A.value.borders), ir();
|
|
4882
4997
|
}
|
|
4883
|
-
function
|
|
4998
|
+
function jr() {
|
|
4884
4999
|
return typeof p.menu == "string" ? p.menu : "choropleth";
|
|
4885
5000
|
}
|
|
4886
|
-
let
|
|
5001
|
+
let Mr = n(() => p.legend && (dn.value || Z.value || p.data)), Nr = n(() => p.colorScale.slice().sort((e, t) => e.min - t.min)), Pr = n(() => {
|
|
4887
5002
|
let e = [];
|
|
4888
5003
|
for (let t = 0; t <= 10; t++) {
|
|
4889
5004
|
let n = t / 10;
|
|
4890
5005
|
e.push({
|
|
4891
5006
|
offset: `${(n * 100).toFixed(0)}%`,
|
|
4892
|
-
color:
|
|
5007
|
+
color: _n(n)
|
|
4893
5008
|
});
|
|
4894
5009
|
}
|
|
4895
5010
|
return e;
|
|
4896
|
-
}),
|
|
5011
|
+
}), Fr = new Intl.NumberFormat("en-US", {
|
|
4897
5012
|
notation: "compact",
|
|
4898
5013
|
maximumFractionDigits: 1
|
|
4899
|
-
}),
|
|
4900
|
-
let { min: e, max: t } =
|
|
5014
|
+
}), Ir = n(() => {
|
|
5015
|
+
let { min: e, max: t } = un.value, n = t - e, r = [];
|
|
4901
5016
|
for (let t = 1; t <= 3; t++) {
|
|
4902
|
-
let i = t / 4, a = e + n * i, o = Math.abs(a) >= 1e3 ?
|
|
5017
|
+
let i = t / 4, a = e + n * i, o = Math.abs(a) >= 1e3 ? Fr.format(a) : Number.isInteger(a) ? String(a) : a.toFixed(1).replace(/\.0$/, "");
|
|
4903
5018
|
r.push({
|
|
4904
5019
|
value: o,
|
|
4905
5020
|
pct: i * 100
|
|
4906
5021
|
});
|
|
4907
5022
|
}
|
|
4908
5023
|
return r;
|
|
4909
|
-
}),
|
|
5024
|
+
}), Lr = n(() => {
|
|
4910
5025
|
let e = [];
|
|
4911
|
-
if (
|
|
5026
|
+
if (dn.value) for (let t of p.colorScale) e.push({
|
|
4912
5027
|
key: t.value,
|
|
4913
5028
|
color: t.color,
|
|
4914
5029
|
label: t.value
|
|
4915
5030
|
});
|
|
4916
|
-
else if (
|
|
5031
|
+
else if (Z.value) for (let t of Nr.value) e.push({
|
|
4917
5032
|
key: String(t.min),
|
|
4918
5033
|
color: t.color,
|
|
4919
5034
|
label: t.label ?? String(t.min)
|
|
4920
5035
|
});
|
|
4921
5036
|
return e;
|
|
4922
|
-
}),
|
|
4923
|
-
let e =
|
|
4924
|
-
return
|
|
5037
|
+
}), Rr = n(() => `linear-gradient(to right, ${Pr.value.map((e) => `${e.color} ${e.offset}`).join(", ")})`), $ = Y({ target: () => p.fullscreenTarget }), Br = n(() => {
|
|
5038
|
+
let e = jr();
|
|
5039
|
+
return L.value ? [$.menuItem.value, {
|
|
4925
5040
|
label: "Save as PNG",
|
|
4926
5041
|
action: () => {
|
|
4927
|
-
|
|
5042
|
+
Oe.value && ze(Oe.value, e);
|
|
4928
5043
|
}
|
|
4929
5044
|
}] : [
|
|
4930
5045
|
$.menuItem.value,
|
|
4931
5046
|
{
|
|
4932
5047
|
label: "Save as SVG",
|
|
4933
5048
|
action: () => {
|
|
4934
|
-
j.value &&
|
|
5049
|
+
j.value && W(j.value, e);
|
|
4935
5050
|
}
|
|
4936
5051
|
},
|
|
4937
5052
|
{
|
|
4938
5053
|
label: "Save as PNG",
|
|
4939
5054
|
action: () => {
|
|
4940
|
-
j.value &&
|
|
5055
|
+
j.value && Re(j.value, e);
|
|
4941
5056
|
}
|
|
4942
5057
|
}
|
|
4943
5058
|
];
|
|
4944
5059
|
});
|
|
4945
5060
|
return E(() => [
|
|
4946
|
-
|
|
4947
|
-
|
|
5061
|
+
Kt.value,
|
|
5062
|
+
$t.value,
|
|
4948
5063
|
ye.value
|
|
4949
|
-
], () =>
|
|
4950
|
-
|
|
5064
|
+
], () => Dr()), E(() => [
|
|
5065
|
+
ln.value,
|
|
4951
5066
|
p.colorScale,
|
|
4952
5067
|
p.dataGeoType,
|
|
4953
|
-
|
|
5068
|
+
gn.value,
|
|
4954
5069
|
A.value.fill
|
|
4955
|
-
], () =>
|
|
5070
|
+
], () => kr()), E(() => [
|
|
4956
5071
|
A.value.stroke,
|
|
4957
5072
|
A.value.borders,
|
|
4958
5073
|
A.value.highlight,
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
], () =>
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
], () =>
|
|
5074
|
+
en.value,
|
|
5075
|
+
tn.value,
|
|
5076
|
+
nn.value
|
|
5077
|
+
], () => Ar()), E(() => [Jt.value, A.value.outline], () => Or()), E(() => [
|
|
5078
|
+
sn.value,
|
|
5079
|
+
$t.value,
|
|
5080
|
+
Ot.value
|
|
5081
|
+
], () => ot(), { flush: "post" }), E(() => [
|
|
4967
5082
|
p.cities,
|
|
4968
|
-
|
|
4969
|
-
|
|
5083
|
+
Qt.value,
|
|
5084
|
+
Ue.value,
|
|
4970
5085
|
p.citiesMinZoom,
|
|
4971
5086
|
p.zoom,
|
|
4972
5087
|
p.theme?.markerHaloWidth,
|
|
4973
5088
|
p.title,
|
|
4974
5089
|
p.legend,
|
|
4975
5090
|
p.legendTitle
|
|
4976
|
-
], () =>
|
|
4977
|
-
if (
|
|
5091
|
+
], () => Er(), { flush: "post" }), E(() => $.isFullscreen.value, (e) => {
|
|
5092
|
+
if (kn(), e || !G() || !j.value || !K) return;
|
|
4978
5093
|
let t = N(j.value);
|
|
4979
|
-
t.interrupt(),
|
|
5094
|
+
t.interrupt(), K.transform(t, de);
|
|
4980
5095
|
}), (n, l) => (_(), r(t, {
|
|
4981
5096
|
to: C($).teleportTarget.value,
|
|
4982
5097
|
disabled: !C($).isFullscreen.value
|
|
@@ -4985,16 +5100,16 @@ var ai = ["role", "aria-label"], oi = {
|
|
|
4985
5100
|
ref: re
|
|
4986
5101
|
}, n.$attrs, {
|
|
4987
5102
|
class: ["choropleth-wrapper", {
|
|
4988
|
-
pannable:
|
|
5103
|
+
pannable: dt.value,
|
|
4989
5104
|
"is-fullscreen": C($).isFullscreen.value
|
|
4990
5105
|
}],
|
|
4991
5106
|
style: C($).fullscreenStyle.value,
|
|
4992
5107
|
role: T.value || void 0,
|
|
4993
|
-
"aria-label":
|
|
5108
|
+
"aria-label": te.value || void 0
|
|
4994
5109
|
}), [
|
|
4995
5110
|
c.menu || C($).isFullscreen.value ? (_(), r(ve, {
|
|
4996
5111
|
key: 0,
|
|
4997
|
-
items:
|
|
5112
|
+
items: Br.value,
|
|
4998
5113
|
"is-fullscreen": C($).isFullscreen.value,
|
|
4999
5114
|
onClose: C($).exit
|
|
5000
5115
|
}, null, 8, [
|
|
@@ -5002,50 +5117,50 @@ var ai = ["role", "aria-label"], oi = {
|
|
|
5002
5117
|
"is-fullscreen",
|
|
5003
5118
|
"onClose"
|
|
5004
5119
|
])) : i("", !0),
|
|
5005
|
-
o("div",
|
|
5006
|
-
c.title ||
|
|
5120
|
+
o("div", pi, x(C($).isFullscreen.value ? "Map expanded to fill window" : ""), 1),
|
|
5121
|
+
c.title || Mr.value ? (_(), a("div", mi, [c.title ? (_(), a("div", {
|
|
5007
5122
|
key: 0,
|
|
5008
5123
|
class: "choropleth-title",
|
|
5009
5124
|
style: h(xe.value)
|
|
5010
|
-
},
|
|
5125
|
+
}, x(c.title), 5)) : i("", !0), Mr.value ? (_(), a("div", {
|
|
5011
5126
|
key: 1,
|
|
5012
5127
|
class: "choropleth-legend",
|
|
5013
5128
|
style: h(be.value)
|
|
5014
|
-
}, [c.legendTitle ? (_(), a("span",
|
|
5129
|
+
}, [c.legendTitle ? (_(), a("span", hi, x(c.legendTitle), 1)) : i("", !0), dn.value || Z.value ? (_(!0), a(e, { key: 1 }, y(Lr.value, (e) => (_(), a("span", {
|
|
5015
5130
|
key: e.key,
|
|
5016
5131
|
class: "choropleth-legend-item"
|
|
5017
5132
|
}, [o("span", {
|
|
5018
5133
|
class: "choropleth-legend-swatch",
|
|
5019
5134
|
style: h({ background: e.color })
|
|
5020
|
-
}, null, 4), s(" " +
|
|
5135
|
+
}, null, 4), s(" " + x(e.label), 1)]))), 128)) : (_(), a("div", gi, [o("div", {
|
|
5021
5136
|
class: "choropleth-legend-gradient",
|
|
5022
|
-
style: h({ background:
|
|
5023
|
-
}, null, 4), o("div",
|
|
5137
|
+
style: h({ background: Rr.value })
|
|
5138
|
+
}, null, 4), o("div", _i, [(_(!0), a(e, null, y(Ir.value, (e) => (_(), a("span", {
|
|
5024
5139
|
key: e.value,
|
|
5025
5140
|
style: h({ left: e.pct + "%" })
|
|
5026
|
-
},
|
|
5027
|
-
|
|
5028
|
-
|
|
5141
|
+
}, x(e.value), 5))), 128))])]))], 4)) : i("", !0)])) : i("", !0),
|
|
5142
|
+
ft.value ? (_(), a("div", vi, x(pt.value), 1)) : i("", !0),
|
|
5143
|
+
L.value ? (_(), a("canvas", {
|
|
5029
5144
|
key: 3,
|
|
5030
5145
|
ref_key: "canvasRef",
|
|
5031
|
-
ref:
|
|
5146
|
+
ref: Oe,
|
|
5032
5147
|
class: "choropleth-canvas",
|
|
5033
5148
|
"aria-hidden": "true"
|
|
5034
5149
|
}, null, 512)) : i("", !0),
|
|
5035
5150
|
(_(), a("svg", {
|
|
5036
5151
|
ref_key: "svgRef",
|
|
5037
5152
|
ref: j,
|
|
5038
|
-
viewBox: `0 0 ${
|
|
5153
|
+
viewBox: `0 0 ${St.value} ${Ct.value}`,
|
|
5039
5154
|
preserveAspectRatio: "xMidYMid meet",
|
|
5040
|
-
style: h(
|
|
5041
|
-
}, [!
|
|
5155
|
+
style: h(mt.value)
|
|
5156
|
+
}, [!L.value && C(A).background ? (_(), a("rect", {
|
|
5042
5157
|
key: 0,
|
|
5043
5158
|
class: "choropleth-map-background",
|
|
5044
|
-
width:
|
|
5045
|
-
height:
|
|
5159
|
+
width: St.value,
|
|
5160
|
+
height: Ct.value,
|
|
5046
5161
|
fill: C(A).background,
|
|
5047
5162
|
"pointer-events": "none"
|
|
5048
|
-
}, null, 8,
|
|
5163
|
+
}, null, 8, bi)) : i("", !0), o("g", {
|
|
5049
5164
|
ref_key: "mapGroupRef",
|
|
5050
5165
|
ref: ae
|
|
5051
5166
|
}, [o("g", {
|
|
@@ -5054,30 +5169,30 @@ var ai = ["role", "aria-label"], oi = {
|
|
|
5054
5169
|
}, null, 512), o("g", {
|
|
5055
5170
|
ref_key: "overlayGroupRef",
|
|
5056
5171
|
ref: se
|
|
5057
|
-
}, null, 512)], 512)], 12,
|
|
5172
|
+
}, null, 512)], 512)], 12, yi)),
|
|
5058
5173
|
c.cities && c.cities.length ? (_(), a("svg", {
|
|
5059
5174
|
key: 4,
|
|
5060
5175
|
ref_key: "cityOverlayRef",
|
|
5061
5176
|
ref: _e,
|
|
5062
5177
|
class: "choropleth-city-overlay",
|
|
5063
|
-
viewBox: `0 0 ${
|
|
5178
|
+
viewBox: `0 0 ${St.value} ${Ct.value}`,
|
|
5064
5179
|
preserveAspectRatio: "xMidYMid meet",
|
|
5065
5180
|
"aria-hidden": "true"
|
|
5066
5181
|
}, [o("g", {
|
|
5067
5182
|
ref_key: "cityLayerRef",
|
|
5068
5183
|
ref: ge,
|
|
5069
5184
|
class: "choropleth-cities",
|
|
5070
|
-
style: h(
|
|
5071
|
-
}, null, 4)], 8,
|
|
5072
|
-
|
|
5185
|
+
style: h(Cr.value)
|
|
5186
|
+
}, null, 4)], 8, xi)) : i("", !0),
|
|
5187
|
+
ut.value ? (_(), r(C(Xe), {
|
|
5073
5188
|
key: 5,
|
|
5074
|
-
"can-zoom-in":
|
|
5075
|
-
"can-zoom-out":
|
|
5076
|
-
"can-reset":
|
|
5189
|
+
"can-zoom-in": He.value < lt.value,
|
|
5190
|
+
"can-zoom-out": He.value > 1,
|
|
5191
|
+
"can-reset": Ve.value,
|
|
5077
5192
|
"is-fullscreen": C($).isFullscreen.value,
|
|
5078
|
-
onZoomIn: l[0] ||= (e) =>
|
|
5079
|
-
onZoomOut: l[1] ||= (e) =>
|
|
5080
|
-
onReset:
|
|
5193
|
+
onZoomIn: l[0] ||= (e) => ht(ki),
|
|
5194
|
+
onZoomOut: l[1] ||= (e) => ht(1 / ki),
|
|
5195
|
+
onReset: ct
|
|
5081
5196
|
}, null, 8, [
|
|
5082
5197
|
"can-zoom-in",
|
|
5083
5198
|
"can-zoom-out",
|
|
@@ -5088,17 +5203,17 @@ var ai = ["role", "aria-label"], oi = {
|
|
|
5088
5203
|
key: 6,
|
|
5089
5204
|
ref_key: "tooltipChildRef",
|
|
5090
5205
|
ref: P,
|
|
5091
|
-
mode:
|
|
5206
|
+
mode: En.value
|
|
5092
5207
|
}, {
|
|
5093
|
-
default: D((t) => [
|
|
5208
|
+
default: D((t) => [b(n.$slots, "tooltip", m(u(k(t))), () => [c.tooltipFormat ? (_(), a("span", {
|
|
5094
5209
|
key: 0,
|
|
5095
5210
|
innerHTML: c.tooltipFormat(t)
|
|
5096
|
-
}, null, 8,
|
|
5211
|
+
}, null, 8, Si)) : t.value == null ? (_(), a(e, { key: 1 }, [s(x(t.name), 1)], 64)) : (_(), a(e, { key: 2 }, [s(x(t.name) + ": " + x(Sn(t.value)), 1)], 64))], !0)]),
|
|
5097
5212
|
_: 3
|
|
5098
5213
|
}, 8, ["mode"])) : i("", !0)
|
|
5099
|
-
], 16,
|
|
5214
|
+
], 16, fi)], 8, ["to", "disabled"]));
|
|
5100
5215
|
}
|
|
5101
|
-
}), [["__scopeId", "data-v-
|
|
5216
|
+
}), [["__scopeId", "data-v-ef6ce015"]]), Wi = /*#__PURE__*/ P(/* @__PURE__ */ l({
|
|
5102
5217
|
__name: "ChartTooltip",
|
|
5103
5218
|
props: {
|
|
5104
5219
|
x: {},
|
|
@@ -5118,7 +5233,7 @@ var ai = ["role", "aria-label"], oi = {
|
|
|
5118
5233
|
top: `${e.y}px`,
|
|
5119
5234
|
transform: "translateY(-50%)"
|
|
5120
5235
|
})
|
|
5121
|
-
}, [
|
|
5236
|
+
}, [b(t.$slots, "default", {}, void 0, !0)], 4)) : e.mode === "click" ? (_(), r(C(se), {
|
|
5122
5237
|
key: 1,
|
|
5123
5238
|
open: e.open
|
|
5124
5239
|
}, {
|
|
@@ -5141,7 +5256,7 @@ var ai = ["role", "aria-label"], oi = {
|
|
|
5141
5256
|
onPointerDownOutside: n[0] ||= (e) => t.$emit("close"),
|
|
5142
5257
|
onEscapeKeyDown: n[1] ||= (e) => t.$emit("close")
|
|
5143
5258
|
}, {
|
|
5144
|
-
default: D(() => [
|
|
5259
|
+
default: D(() => [b(t.$slots, "default", {}, void 0, !0)]),
|
|
5145
5260
|
_: 3
|
|
5146
5261
|
}, 8, ["side-offset"])) : i("", !0)]),
|
|
5147
5262
|
_: 3
|
|
@@ -5149,7 +5264,7 @@ var ai = ["role", "aria-label"], oi = {
|
|
|
5149
5264
|
_: 3
|
|
5150
5265
|
}, 8, ["open"])) : i("", !0);
|
|
5151
5266
|
}
|
|
5152
|
-
}), [["__scopeId", "data-v-44377f70"]]),
|
|
5267
|
+
}), [["__scopeId", "data-v-44377f70"]]), Gi = { class: "TableWrapper" }, Ki = ["href", "download"], qi = /*#__PURE__*/ P(/* @__PURE__ */ l({
|
|
5153
5268
|
__name: "DataTable",
|
|
5154
5269
|
props: {
|
|
5155
5270
|
data: {},
|
|
@@ -5220,14 +5335,14 @@ var ai = ["role", "aria-label"], oi = {
|
|
|
5220
5335
|
name: e,
|
|
5221
5336
|
values: t
|
|
5222
5337
|
}));
|
|
5223
|
-
}),
|
|
5338
|
+
}), b = n(() => {
|
|
5224
5339
|
let e = v.value;
|
|
5225
5340
|
if (e.length === 0) return 0;
|
|
5226
5341
|
let t = 0;
|
|
5227
5342
|
for (let n of e) t = Math.max(t, n.values.length);
|
|
5228
5343
|
return c.maxRows ? Math.min(t, c.maxRows) : t;
|
|
5229
5344
|
});
|
|
5230
|
-
function
|
|
5345
|
+
function te(e, t) {
|
|
5231
5346
|
let n = e.values[t];
|
|
5232
5347
|
if (n == null) return "";
|
|
5233
5348
|
let r = c.columnConfig?.[e.name]?.format;
|
|
@@ -5243,15 +5358,15 @@ var ai = ["role", "aria-label"], oi = {
|
|
|
5243
5358
|
function C() {
|
|
5244
5359
|
if (typeof c.csv == "function") return c.csv();
|
|
5245
5360
|
if (typeof c.csv == "string") return c.csv;
|
|
5246
|
-
let e = v.value, t =
|
|
5361
|
+
let e = v.value, t = b.value, n = [e.map((e) => $e(l(e.name))).join(",")];
|
|
5247
5362
|
for (let r = 0; r < t; r++) {
|
|
5248
|
-
let t = e.map((e) =>
|
|
5363
|
+
let t = e.map((e) => $e(te(e, r)));
|
|
5249
5364
|
n.push(t.join(","));
|
|
5250
5365
|
}
|
|
5251
5366
|
return n.join("\n");
|
|
5252
5367
|
}
|
|
5253
5368
|
function w() {
|
|
5254
|
-
|
|
5369
|
+
Be(C(), S());
|
|
5255
5370
|
}
|
|
5256
5371
|
let T = n(() => c.downloadButton || c.downloadLink ? [] : [{
|
|
5257
5372
|
label: c.downloadMenuLink,
|
|
@@ -5270,7 +5385,7 @@ var ai = ["role", "aria-label"], oi = {
|
|
|
5270
5385
|
items: T.value,
|
|
5271
5386
|
"force-dropdown": ""
|
|
5272
5387
|
}, null, 8, ["items"])) : i("", !0),
|
|
5273
|
-
o("div",
|
|
5388
|
+
o("div", Gi, [o("table", { class: p(["Table", { "full-width": t.fullWidth }]) }, [
|
|
5274
5389
|
o("colgroup", null, [(_(!0), a(e, null, y(v.value, (e) => (_(), a("col", {
|
|
5275
5390
|
key: e.name,
|
|
5276
5391
|
style: h(u(e.name))
|
|
@@ -5279,26 +5394,26 @@ var ai = ["role", "aria-label"], oi = {
|
|
|
5279
5394
|
key: e.name,
|
|
5280
5395
|
class: p(m(e.name)),
|
|
5281
5396
|
style: h(d(e.name))
|
|
5282
|
-
},
|
|
5283
|
-
o("tbody", null, [(_(!0), a(e, null, y(
|
|
5397
|
+
}, x(l(e.name)), 7))), 128))])]),
|
|
5398
|
+
o("tbody", null, [(_(!0), a(e, null, y(b.value, (t) => (_(), a("tr", { key: t }, [(_(!0), a(e, null, y(v.value, (e) => (_(), a("td", {
|
|
5284
5399
|
key: e.name,
|
|
5285
5400
|
class: p(g(e.name)),
|
|
5286
5401
|
style: h(d(e.name))
|
|
5287
|
-
},
|
|
5402
|
+
}, x(te(e, t - 1)), 7))), 128))]))), 128))])
|
|
5288
5403
|
], 2)]),
|
|
5289
5404
|
t.downloadButton ? (_(), a("button", {
|
|
5290
5405
|
key: 1,
|
|
5291
5406
|
type: "button",
|
|
5292
5407
|
class: "data-table-download-button",
|
|
5293
5408
|
onClick: w
|
|
5294
|
-
},
|
|
5409
|
+
}, x(t.downloadMenuLink), 1)) : E.value ? (_(), a("a", {
|
|
5295
5410
|
key: 2,
|
|
5296
5411
|
class: "data-table-download-link",
|
|
5297
5412
|
href: D.value,
|
|
5298
5413
|
download: `${S()}.csv`
|
|
5299
|
-
},
|
|
5414
|
+
}, x(E.value), 9, Ki)) : i("", !0)
|
|
5300
5415
|
], 2));
|
|
5301
5416
|
}
|
|
5302
5417
|
}), [["__scopeId", "data-v-9b1b6a76"]]);
|
|
5303
5418
|
//#endregion
|
|
5304
|
-
export {
|
|
5419
|
+
export { Fr as BarChart, Wi as ChartTooltip, Ui as ChoroplethMap, qi as DataTable, tr as LineChart, It as mapThemeDefaults };
|