@graphysdk/viz-engine 1.9.0-beta.1789643389031 → 1.9.0-beta.1789669748378
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/{config.types-DDxIWpI_.js → config.types-3oidCqxo.js} +187 -188
- package/dist/config.types-g8kiZV3a.cjs +1 -0
- package/dist/graph-config.cjs +1 -1
- package/dist/graph-config.d.ts +110 -113
- package/dist/graph-config.mjs +223 -223
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +628 -679
- package/dist/index.mjs +405 -408
- package/package.json +1 -1
- package/dist/config.types-DBSz4rJf.cjs +0 -1
|
@@ -1,18 +1,9 @@
|
|
|
1
1
|
import { differenceInDays as it, isBefore as lt, isValid as b, isWithinInterval as ct, parse as x } from "date-fns";
|
|
2
2
|
import { isEqual as dt, isInteger as ut } from "lodash-es";
|
|
3
|
-
var fa = (e) => e.
|
|
4
|
-
function Le(e) {
|
|
5
|
-
return e != null;
|
|
6
|
-
}
|
|
7
|
-
function ga(e) {
|
|
8
|
-
if (e === null || typeof e != "object") return !1;
|
|
9
|
-
const t = Object.getPrototypeOf(e);
|
|
10
|
-
return t === Object.prototype || t === null;
|
|
11
|
-
}
|
|
12
|
-
var ee = (e) => e instanceof Date && b(e), ma = (e) => ee(e) || e === null, pa = (e) => typeof e == "string", ft = (e) => typeof e == "number" && !Number.isNaN(e) && Number.isFinite(e), ya = (e) => ft(e) || e === null, Fe = "\0graphy\0_", p = (e) => `${Fe}${e}`, Se = { x: p("constantX") }, ha = {
|
|
3
|
+
var ee = (e) => e instanceof Date && b(e), fa = (e) => ee(e) || e === null, ga = (e) => typeof e == "string", ft = (e) => typeof e == "number" && !Number.isNaN(e) && Number.isFinite(e), ma = (e) => ft(e) || e === null, Le = "\0graphy\0_", p = (e) => `${Le}${e}`, Fe = { x: p("constantX") }, pa = {
|
|
13
4
|
bar: p("barSeriesLabel"),
|
|
14
5
|
line: p("lineSeriesLabel")
|
|
15
|
-
},
|
|
6
|
+
}, Se = {
|
|
16
7
|
count: p("count"),
|
|
17
8
|
mean: p("mean"),
|
|
18
9
|
sum: p("sum")
|
|
@@ -33,15 +24,23 @@ var ee = (e) => e instanceof Date && b(e), ma = (e) => ee(e) || e === null, pa =
|
|
|
33
24
|
}, ht = {
|
|
34
25
|
y: p("ruleY"),
|
|
35
26
|
x: p("ruleX")
|
|
36
|
-
},
|
|
27
|
+
}, ya = {
|
|
28
|
+
...Fe,
|
|
37
29
|
...Se,
|
|
38
|
-
...Oe,
|
|
39
30
|
...gt,
|
|
40
31
|
...mt,
|
|
41
32
|
...pt,
|
|
42
33
|
...yt,
|
|
43
34
|
...ht
|
|
44
|
-
}, bt = new Set(Object.values(
|
|
35
|
+
}, bt = new Set(Object.values(Se)), ha = (e) => p(`scaled_${e}`), ba = (e) => e.startsWith(Le), va = (e) => bt.has(e), Aa = (e) => e.length > 0;
|
|
36
|
+
function Oe(e) {
|
|
37
|
+
return e != null;
|
|
38
|
+
}
|
|
39
|
+
function Ea(e) {
|
|
40
|
+
if (e === null || typeof e != "object") return !1;
|
|
41
|
+
const t = Object.getPrototypeOf(e);
|
|
42
|
+
return t === Object.prototype || t === null;
|
|
43
|
+
}
|
|
45
44
|
function Ta(e) {
|
|
46
45
|
const { numeric: t, categorical: r, temporal: a } = e.groupVariableNamesByType();
|
|
47
46
|
return a[0] ?? r[0] ?? t[0] ?? "";
|
|
@@ -50,18 +49,18 @@ function Ma(e, t) {
|
|
|
50
49
|
const { categorical: r, temporal: a } = e.groupVariableNamesByType(), n = [...r, ...a];
|
|
51
50
|
return t === "" || n.includes(t) ? n : [t, ...n];
|
|
52
51
|
}
|
|
53
|
-
function
|
|
52
|
+
function _a(e) {
|
|
54
53
|
const t = Ne(e.x);
|
|
55
|
-
return t === null || t ===
|
|
54
|
+
return t === null || t === Fe.x ? "" : t;
|
|
56
55
|
}
|
|
57
56
|
function Ne(e) {
|
|
58
|
-
return
|
|
57
|
+
return Oe(e) ? typeof e == "string" ? e : "variable" in e ? e.variable : null : null;
|
|
59
58
|
}
|
|
60
59
|
function vt(e) {
|
|
61
|
-
if (!(!
|
|
60
|
+
if (!(!Oe(e) || typeof e == "string") && "value" in e)
|
|
62
61
|
return e.value;
|
|
63
62
|
}
|
|
64
|
-
function
|
|
63
|
+
function ka(e, t) {
|
|
65
64
|
return [.../* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)])].every((r) => ie(e[r]) === ie(t[r]));
|
|
66
65
|
}
|
|
67
66
|
function ie(e) {
|
|
@@ -83,28 +82,28 @@ var wa = [
|
|
|
83
82
|
function Da(e) {
|
|
84
83
|
return e === "stack" || e === "fill";
|
|
85
84
|
}
|
|
86
|
-
var ne = "en-GB",
|
|
85
|
+
var ne = "en-GB", Re = class extends Error {
|
|
87
86
|
constructor(e) {
|
|
88
87
|
super(e.message, e.cause !== void 0 ? { cause: e.cause } : void 0), this.name = new.target.name, this.code = e.code, this.context = e.context, this.suggestion = e.suggestion;
|
|
89
88
|
}
|
|
90
|
-
}, G = class extends
|
|
89
|
+
}, G = class extends Re {
|
|
91
90
|
constructor(e) {
|
|
92
91
|
super(e), this.kind = "user-input";
|
|
93
92
|
}
|
|
94
|
-
}, E = class extends
|
|
93
|
+
}, E = class extends Re {
|
|
95
94
|
constructor(e) {
|
|
96
95
|
super({
|
|
97
96
|
...e,
|
|
98
97
|
code: e.code ?? "INTERNAL_INVARIANT"
|
|
99
98
|
}), this.kind = "internal";
|
|
100
99
|
}
|
|
101
|
-
},
|
|
102
|
-
if (
|
|
100
|
+
}, Ie = (e) => e.type === "lookup", Et = (e) => e.type === "text", z = (e) => e.type === "date" || e.type === "datetime" || e.type === "year" || e.type === "month_year" || e.type === "month" || e.type === "day_month" || e.type === "weekly_date_range" || e.type === "weekly_date_range_with_year" || e.type === "quarter" || e.type === "time", Tt = (e) => e.type === "decimal" || e.type === "integer" || e.type === "percentage" || e.type === "duration" || e.type === "currency", La = (e) => e.type === "currency", Fa = (e) => e.type === "month" || e.type === "day_month" || e.type === "weekly_date_range", xe = (e) => {
|
|
101
|
+
if (Ie(e)) return xe(e.fallback);
|
|
103
102
|
if (z(e)) return "temporal";
|
|
104
103
|
if (Tt(e)) return "numeric";
|
|
105
104
|
if (Et(e)) return "categorical";
|
|
106
105
|
throw new E({ message: `No data type found for value format: ${e.type}` });
|
|
107
|
-
}, Sa = (e) =>
|
|
106
|
+
}, Sa = (e) => Ie(e) ? e.fallback : e, Mt = class {
|
|
108
107
|
constructor() {
|
|
109
108
|
this.currentYear = (/* @__PURE__ */ new Date()).getUTCFullYear(), this.previousDate = null, this.previousYear = null;
|
|
110
109
|
}
|
|
@@ -113,7 +112,7 @@ var ne = "en-GB", Ie = class extends Error {
|
|
|
113
112
|
const t = new Date(e.getTime());
|
|
114
113
|
return t.setUTCFullYear(this.previousYear), this.previousDate = t, t;
|
|
115
114
|
}
|
|
116
|
-
},
|
|
115
|
+
}, _t = {
|
|
117
116
|
k: 1e3,
|
|
118
117
|
m: 1e6,
|
|
119
118
|
b: 1e9,
|
|
@@ -123,7 +122,7 @@ var ne = "en-GB", Ie = class extends Error {
|
|
|
123
122
|
"m",
|
|
124
123
|
"b",
|
|
125
124
|
"t"
|
|
126
|
-
],
|
|
125
|
+
], kt = new RegExp(`^-?(\\d{1,3}(,\\d{3})*|\\d+)\\.?\\d*(${oe.join("|")})?$`, "i"), wt = /^-?\d{1,3}(?:,\d{3})*(?:\.\d+)?%?$/, C = (e) => e === null || e instanceof Date || Array.isArray(e) || typeof e == "boolean" ? !1 : typeof e == "string" ? kt.test(e) && !Number.isNaN(Number(e.replace(new RegExp(`[,${oe.join("")}]`, "gi"), ""))) : !Number.isNaN(Number(e)), Be = (e) => C(e) ? !0 : typeof e == "string" ? wt.test(e) : !1, Dt = /^\d{4}-\d{2}-\d{2}(T|\s)\d{1,2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|\+00:00)?$/, Lt = /^\s*(1[89]\d{2}|2[01]\d{2})\s*$/, Ft = [
|
|
127
126
|
[/\bJan\b/i, "January"],
|
|
128
127
|
[/\bFeb\b/i, "February"],
|
|
129
128
|
[/\bMar\b/i, "March"],
|
|
@@ -140,7 +139,7 @@ var ne = "en-GB", Ie = class extends Error {
|
|
|
140
139
|
"en-GB": "DMY",
|
|
141
140
|
"pt-PT": "DMY",
|
|
142
141
|
ar: "DMY"
|
|
143
|
-
},
|
|
142
|
+
}, Pe = [
|
|
144
143
|
"/",
|
|
145
144
|
"-",
|
|
146
145
|
".",
|
|
@@ -323,7 +322,7 @@ var ne = "en-GB", Ie = class extends Error {
|
|
|
323
322
|
"MMMM",
|
|
324
323
|
"do"
|
|
325
324
|
]
|
|
326
|
-
],
|
|
325
|
+
], Ve = [
|
|
327
326
|
["d", "MMMM"],
|
|
328
327
|
["dd", "MMMM"],
|
|
329
328
|
["do", "MMMM"],
|
|
@@ -347,7 +346,7 @@ var ne = "en-GB", Ie = class extends Error {
|
|
|
347
346
|
dateFormat: "yyyy-MM",
|
|
348
347
|
type: "month_year"
|
|
349
348
|
}
|
|
350
|
-
], je = 1800, We = 2199, Nt = 3, Ct = 6,
|
|
349
|
+
], je = 1800, We = 2199, Nt = 3, Ct = 6, Rt = 5, It = 1, xt = 28, Bt = /\s*[–—]\s*|\s-\s/, Pt = (e) => typeof e == "number" ? Number.isInteger(e) && e >= je && e <= We : typeof e == "string" ? Lt.test(e) : !1, ze = (e, t) => {
|
|
351
350
|
const r = j(e);
|
|
352
351
|
return !t && C(r) ? zt(r) : typeof r == "string" ? t ? b(x(r, t, /* @__PURE__ */ new Date())) : !!Ue(r) || H(r) && b(new Date(r)) : b(r);
|
|
353
352
|
}, j = (e) => {
|
|
@@ -358,7 +357,7 @@ var ne = "en-GB", Ie = class extends Error {
|
|
|
358
357
|
}, Ue = (e, t = ne) => {
|
|
359
358
|
const r = j(e);
|
|
360
359
|
return H(r) ? { type: "datetime" } : Ye(t).find((a) => !z(a) || a.type === "month" && r.length < Nt ? !1 : a.dateFormat && b(x(r, a.dateFormat, /* @__PURE__ */ new Date())));
|
|
361
|
-
}, H = (e) => Dt.test(e.trim()),
|
|
360
|
+
}, H = (e) => Dt.test(e.trim()), Vt = (e) => {
|
|
362
361
|
if (e instanceof Date) return b(e) ? e : null;
|
|
363
362
|
if (typeof e != "string" || !H(e)) return null;
|
|
364
363
|
const t = new Date(e.trim());
|
|
@@ -372,21 +371,21 @@ var ne = "en-GB", Ie = class extends Error {
|
|
|
372
371
|
const i = x(n, s.dateFormat, /* @__PURE__ */ new Date()), d = x(o, s.dateFormat, /* @__PURE__ */ new Date());
|
|
373
372
|
if (!b(i) || !b(d)) return !1;
|
|
374
373
|
const f = new Mt(), m = f.incrementYearIfNeeded(i), h = f.incrementYearIfNeeded(d), g = it(h, m);
|
|
375
|
-
return ct(new Date(m.getFullYear(),
|
|
374
|
+
return ct(new Date(m.getFullYear(), It, xt), {
|
|
376
375
|
start: m,
|
|
377
376
|
end: h
|
|
378
|
-
}) && g ===
|
|
377
|
+
}) && g === Rt ? !0 : g === Ct;
|
|
379
378
|
});
|
|
380
379
|
}, Ye = (e) => {
|
|
381
380
|
const t = {
|
|
382
381
|
date: $e(e),
|
|
383
382
|
year: [["yyyy"]],
|
|
384
|
-
day_month:
|
|
383
|
+
day_month: Ve,
|
|
385
384
|
month_year: [["MMMM", "yyyy"], ["yyyy", "MMMM"]],
|
|
386
385
|
month: [["MMMM"]],
|
|
387
386
|
quarter: [["QQQ", "yyyy"], ["yyyy", "QQQ"]]
|
|
388
387
|
};
|
|
389
|
-
return [...Ot, ...Object.entries(t).flatMap(([r, a]) => a.flatMap((n) =>
|
|
388
|
+
return [...Ot, ...Object.entries(t).flatMap(([r, a]) => a.flatMap((n) => Pe.map((o) => ({
|
|
390
389
|
dateFormat: n.join(o),
|
|
391
390
|
type: r
|
|
392
391
|
}))))];
|
|
@@ -400,10 +399,10 @@ var ne = "en-GB", Ie = class extends Error {
|
|
|
400
399
|
...de
|
|
401
400
|
], Wt = (e) => {
|
|
402
401
|
const t = {
|
|
403
|
-
weekly_date_range:
|
|
402
|
+
weekly_date_range: Ve,
|
|
404
403
|
weekly_date_range_with_year: $e(e)
|
|
405
404
|
};
|
|
406
|
-
return Object.entries(t).flatMap(([r, a]) => a.flatMap((n) =>
|
|
405
|
+
return Object.entries(t).flatMap(([r, a]) => a.flatMap((n) => Pe.map((o) => ({
|
|
407
406
|
dateFormat: n.join(o),
|
|
408
407
|
type: r
|
|
409
408
|
}))));
|
|
@@ -465,7 +464,7 @@ var ne = "en-GB", Ie = class extends Error {
|
|
|
465
464
|
}, Ke = (e) => Object.keys(Ge).sort((t, r) => r.length - t.length).find((t) => e.includes(t)), qe = (e) => {
|
|
466
465
|
const t = Object.entries(e);
|
|
467
466
|
return !t.length || !t.some(([, r]) => !B(r));
|
|
468
|
-
}, B = (e) => typeof e == "string" && e.trim() === "" || e === void 0 || e === null || e === "-", Yt = /\s*[–—]\s*|\s-\s/,
|
|
467
|
+
}, B = (e) => typeof e == "string" && e.trim() === "" || e === void 0 || e === null || e === "-", Yt = /\s*[–—]\s*|\s-\s/, Je = (e, t, r) => {
|
|
469
468
|
if (B(e)) return null;
|
|
470
469
|
switch (t.type) {
|
|
471
470
|
case "decimal":
|
|
@@ -484,7 +483,7 @@ var ne = "en-GB", Ie = class extends Error {
|
|
|
484
483
|
case "day_month":
|
|
485
484
|
case "quarter":
|
|
486
485
|
case "time":
|
|
487
|
-
return
|
|
486
|
+
return Qe(e, t.dateFormat, r);
|
|
488
487
|
case "weekly_date_range":
|
|
489
488
|
case "weekly_date_range_with_year":
|
|
490
489
|
return Ht(e, t.dateFormat, r);
|
|
@@ -495,7 +494,7 @@ var ne = "en-GB", Ie = class extends Error {
|
|
|
495
494
|
default:
|
|
496
495
|
throw new E({ message: `Unhandled value format: ${t.type}` });
|
|
497
496
|
}
|
|
498
|
-
},
|
|
497
|
+
}, Qe = (e, t, r) => {
|
|
499
498
|
if (e instanceof Date) return b(e) ? e : null;
|
|
500
499
|
const a = j(String(e).trim());
|
|
501
500
|
if (a.length === 0) return null;
|
|
@@ -518,7 +517,7 @@ var ne = "en-GB", Ie = class extends Error {
|
|
|
518
517
|
if (!C(t)) return null;
|
|
519
518
|
let r = 1;
|
|
520
519
|
for (const a of oe) if (new RegExp(`${a}$`, "i").test(t)) {
|
|
521
|
-
r =
|
|
520
|
+
r = _t[a], t = t.slice(0, -1);
|
|
522
521
|
break;
|
|
523
522
|
}
|
|
524
523
|
return Number(t.split(",").join("")) * r;
|
|
@@ -536,11 +535,11 @@ var ne = "en-GB", Ie = class extends Error {
|
|
|
536
535
|
return He(t) ? Ze(Xe(t)) : null;
|
|
537
536
|
}, Ht = (e, t, r) => {
|
|
538
537
|
const a = String(e).trim().split(Yt), [n, o] = [a[0]?.trim(), a[1]?.trim()];
|
|
539
|
-
return !n || !o ? null :
|
|
538
|
+
return !n || !o ? null : Qe(n, t, r);
|
|
540
539
|
}, Xt = (e) => String(e).trim(), K = (e) => new Date(Date.UTC(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds())), Kt = (e, t, r) => {
|
|
541
|
-
const a =
|
|
542
|
-
return a !== null || !z(t) ? a :
|
|
543
|
-
},
|
|
540
|
+
const a = Je(e, t, r);
|
|
541
|
+
return a !== null || !z(t) ? a : Vt(e);
|
|
542
|
+
}, I = process.env.NODE_ENV !== "production";
|
|
544
543
|
var X = !0, Oa = (e) => {
|
|
545
544
|
X = e;
|
|
546
545
|
}, Na = () => X, Ca = () => {
|
|
@@ -551,10 +550,10 @@ var X = !0, Oa = (e) => {
|
|
|
551
550
|
};
|
|
552
551
|
return Object.assign((a, n) => {
|
|
553
552
|
if (!X)
|
|
554
|
-
return
|
|
553
|
+
return I && (t.misses += 1), n();
|
|
555
554
|
if (e && et(e.args, a))
|
|
556
|
-
return
|
|
557
|
-
|
|
555
|
+
return I && (t.hits += 1), e.out;
|
|
556
|
+
I && (t.misses += 1);
|
|
558
557
|
const o = n();
|
|
559
558
|
return e = {
|
|
560
559
|
args: a,
|
|
@@ -573,14 +572,14 @@ var X = !0, Oa = (e) => {
|
|
|
573
572
|
};
|
|
574
573
|
return Object.assign((a, n, o) => {
|
|
575
574
|
if (!X)
|
|
576
|
-
return
|
|
575
|
+
return I && (t.misses += 1), o();
|
|
577
576
|
const s = e.get(a);
|
|
578
577
|
if (s) for (let d = 0; d < s.length; d += 1) {
|
|
579
578
|
const f = s[d];
|
|
580
579
|
if (f && et(f.args, n))
|
|
581
|
-
return
|
|
580
|
+
return I && (t.hits += 1), d > 0 && (s.splice(d, 1), s.unshift(f)), f.out;
|
|
582
581
|
}
|
|
583
|
-
|
|
582
|
+
I && (t.misses += 1);
|
|
584
583
|
const i = o();
|
|
585
584
|
return s ? (s.unshift({
|
|
586
585
|
args: n,
|
|
@@ -590,7 +589,7 @@ var X = !0, Oa = (e) => {
|
|
|
590
589
|
out: i
|
|
591
590
|
}]), i;
|
|
592
591
|
}, { stats: t });
|
|
593
|
-
},
|
|
592
|
+
}, Ra = (...e) => e.reduce((t, r) => ({
|
|
594
593
|
hits: t.hits + r.hits,
|
|
595
594
|
misses: t.misses + r.misses
|
|
596
595
|
}), {
|
|
@@ -600,7 +599,7 @@ var X = !0, Oa = (e) => {
|
|
|
600
599
|
if (e.length !== t.length) return !1;
|
|
601
600
|
for (let r = 0; r < e.length; r += 1) if (e[r] !== t[r]) return !1;
|
|
602
601
|
return !0;
|
|
603
|
-
},
|
|
602
|
+
}, Jt = class {
|
|
604
603
|
constructor() {
|
|
605
604
|
this.memo = qt(), this.singletonKey = {};
|
|
606
605
|
}
|
|
@@ -613,14 +612,14 @@ var X = !0, Oa = (e) => {
|
|
|
613
612
|
key(e) {
|
|
614
613
|
return this.singletonKey;
|
|
615
614
|
}
|
|
616
|
-
}, te = (e) => (Array.isArray(e) ? e : [e]).map((t) => t instanceof Date ? t.toISOString() : String(t ?? "<null>")).join("\0"),
|
|
615
|
+
}, te = (e) => (Array.isArray(e) ? e : [e]).map((t) => t instanceof Date ? t.toISOString() : String(t ?? "<null>")).join("\0"), Ia = (e, t) => e === t ? !0 : ee(e) && ee(t) ? e.getTime() === t.getTime() : !1, Qt = /* @__PURE__ */ new Set([
|
|
617
616
|
"count",
|
|
618
617
|
"sum",
|
|
619
618
|
"mean",
|
|
620
619
|
"median"
|
|
621
620
|
]);
|
|
622
621
|
function tt(e, t) {
|
|
623
|
-
return
|
|
622
|
+
return Qt.has(e) ? "numeric" : t;
|
|
624
623
|
}
|
|
625
624
|
function rt(e, t, r) {
|
|
626
625
|
const a = r?.length ?? t.length;
|
|
@@ -629,7 +628,7 @@ function rt(e, t, r) {
|
|
|
629
628
|
const s = [];
|
|
630
629
|
for (let i = 0; i < a; i++) {
|
|
631
630
|
const d = q(t, r, i);
|
|
632
|
-
|
|
631
|
+
J(d) && s.push(d);
|
|
633
632
|
}
|
|
634
633
|
return s.length === 0 ? null : e === "median" ? tr(s) : rr(s);
|
|
635
634
|
}
|
|
@@ -637,7 +636,7 @@ function rt(e, t, r) {
|
|
|
637
636
|
let s = 0, i = 0;
|
|
638
637
|
for (let d = 0; d < a; d++) {
|
|
639
638
|
const f = q(t, r, d);
|
|
640
|
-
|
|
639
|
+
J(f) && (s++, i += Number(f));
|
|
641
640
|
}
|
|
642
641
|
return s === 0 ? null : e === "sum" ? i : i / s;
|
|
643
642
|
}
|
|
@@ -645,11 +644,11 @@ function rt(e, t, r) {
|
|
|
645
644
|
let o = null;
|
|
646
645
|
for (let s = 0; s < a; s++) {
|
|
647
646
|
const i = q(t, r, s);
|
|
648
|
-
|
|
647
|
+
J(i) && (o === null || Zt(i, o) === n) && (o = i);
|
|
649
648
|
}
|
|
650
649
|
return o;
|
|
651
650
|
}
|
|
652
|
-
var q = (e, t, r) => e[t?.[r] ?? r] ?? null,
|
|
651
|
+
var q = (e, t, r) => e[t?.[r] ?? r] ?? null, J = (e) => e !== null && !(typeof e == "number" && Number.isNaN(e)), Zt = (e, t) => e === null || t === null ? 0 : e < t ? -1 : e > t ? 1 : 0, er = (e) => e instanceof Date ? e.getTime() : e ?? null;
|
|
653
652
|
function tr(e) {
|
|
654
653
|
const t = e.map(Number).sort((o, s) => o - s);
|
|
655
654
|
if (t.length === 1) return t[0] ?? 0;
|
|
@@ -768,7 +767,7 @@ var ar = (e) => e == null || typeof e == "number" && Number.isNaN(e), nr = (e) =
|
|
|
768
767
|
})), i = t.map((g) => this.values(g) ?? []), d = new Array(o), f = new Array(o);
|
|
769
768
|
let m = 0;
|
|
770
769
|
for (let g = 0; g < this.rowCount; g++) for (let M = 0; M < t.length; M++, m++) {
|
|
771
|
-
for (const
|
|
770
|
+
for (const R of s) R.repeated[m] = R.source[g] ?? null;
|
|
772
771
|
d[m] = t[M] ?? "", f[m] = i[M]?.[g] ?? null;
|
|
773
772
|
}
|
|
774
773
|
const h = /* @__PURE__ */ new Map();
|
|
@@ -802,7 +801,7 @@ var ar = (e) => e == null || typeof e == "number" && Number.isNaN(e), nr = (e) =
|
|
|
802
801
|
return new O(this.names, new Map(this.columns), this.rowCount);
|
|
803
802
|
}
|
|
804
803
|
};
|
|
805
|
-
var or = "value",
|
|
804
|
+
var or = "value", V = {
|
|
806
805
|
numeric: { type: "decimal" },
|
|
807
806
|
categorical: { type: "text" },
|
|
808
807
|
temporal: { type: "datetime" }
|
|
@@ -957,7 +956,7 @@ var or = "value", P = {
|
|
|
957
956
|
rollup(t) {
|
|
958
957
|
const r = re.from(Object.fromEntries(Object.entries(t).map(([n, { variableName: o, aggregation: s }]) => [n, [rt(s, nt(this.table, o, s))]]))), a = {};
|
|
959
958
|
for (const [n, { variableName: o, aggregation: s }] of Object.entries(t)) {
|
|
960
|
-
const i = this.variableMetadata[o], d = i?.type ?? "numeric", f = i?.valueFormat ??
|
|
959
|
+
const i = this.variableMetadata[o], d = i?.type ?? "numeric", f = i?.valueFormat ?? V[d];
|
|
961
960
|
a[n] = {
|
|
962
961
|
type: tt(s, d),
|
|
963
962
|
valueFormat: at(s, f)
|
|
@@ -974,11 +973,11 @@ var or = "value", P = {
|
|
|
974
973
|
if (f.length === 0) {
|
|
975
974
|
const g = {};
|
|
976
975
|
for (const M of d) {
|
|
977
|
-
const
|
|
978
|
-
|
|
979
|
-
type:
|
|
976
|
+
const R = this.variableMetadata[M];
|
|
977
|
+
R && (g[M] = {
|
|
978
|
+
type: R.type,
|
|
980
979
|
values: [],
|
|
981
|
-
valueFormat:
|
|
980
|
+
valueFormat: R.valueFormat
|
|
982
981
|
});
|
|
983
982
|
}
|
|
984
983
|
return g[a] = {
|
|
@@ -1022,14 +1021,14 @@ var or = "value", P = {
|
|
|
1022
1021
|
resolveAddedVariableFormat(t, r, a) {
|
|
1023
1022
|
if (a !== void 0) return a;
|
|
1024
1023
|
const n = this.variableMetadata[t];
|
|
1025
|
-
return n ? n.valueFormat :
|
|
1024
|
+
return n ? n.valueFormat : V[r];
|
|
1026
1025
|
}
|
|
1027
1026
|
parseVariableMap(t) {
|
|
1028
1027
|
const r = {}, a = {};
|
|
1029
1028
|
for (const [n, { type: o, values: s, valueFormat: i }] of Object.entries(t))
|
|
1030
1029
|
r[n] = s, a[n] = {
|
|
1031
1030
|
type: o,
|
|
1032
|
-
valueFormat: i ??
|
|
1031
|
+
valueFormat: i ?? V[o]
|
|
1033
1032
|
};
|
|
1034
1033
|
return {
|
|
1035
1034
|
table: re.from(r),
|
|
@@ -1078,13 +1077,13 @@ var or = "value", P = {
|
|
|
1078
1077
|
const o = this.variableMetadata[n], s = o?.type ?? "categorical";
|
|
1079
1078
|
return [n, {
|
|
1080
1079
|
type: s,
|
|
1081
|
-
valueFormat: o?.valueFormat ??
|
|
1080
|
+
valueFormat: o?.valueFormat ?? V[s]
|
|
1082
1081
|
}];
|
|
1083
1082
|
}));
|
|
1084
1083
|
for (const [n, { variableName: o, aggregation: s }] of Object.entries(e)) {
|
|
1085
1084
|
const i = nt(this.table, o, s);
|
|
1086
1085
|
r[n] = t.map(({ indices: h }) => rt(s, i, h));
|
|
1087
|
-
const d = this.variableMetadata[o], f = d?.type ?? "numeric", m = d?.valueFormat ??
|
|
1086
|
+
const d = this.variableMetadata[o], f = d?.type ?? "numeric", m = d?.valueFormat ?? V[f];
|
|
1088
1087
|
a[n] = {
|
|
1089
1088
|
type: tt(s, f),
|
|
1090
1089
|
valueFormat: at(s, m)
|
|
@@ -1165,7 +1164,7 @@ var lr = class {
|
|
|
1165
1164
|
r[i.key] = mr(i.key, e.rows, f, m, t);
|
|
1166
1165
|
}
|
|
1167
1166
|
return new ae(r);
|
|
1168
|
-
}, xa = class extends
|
|
1167
|
+
}, xa = class extends Jt {
|
|
1169
1168
|
dependencies(e) {
|
|
1170
1169
|
return [e];
|
|
1171
1170
|
}
|
|
@@ -1178,11 +1177,11 @@ var lr = class {
|
|
|
1178
1177
|
return e.columns.findIndex((r) => {
|
|
1179
1178
|
if (r.valueFormat) return !1;
|
|
1180
1179
|
const a = t.map((n) => n[r.key]).filter((n) => !B(n));
|
|
1181
|
-
return a.length >= 2 && a.every(
|
|
1180
|
+
return a.length >= 2 && a.every(Pt);
|
|
1182
1181
|
});
|
|
1183
1182
|
}, mr = (e, t, r, a, n) => ({
|
|
1184
1183
|
type: a,
|
|
1185
|
-
values: t.reduce((o, s) => (qe(s) || o.push(
|
|
1184
|
+
values: t.reduce((o, s) => (qe(s) || o.push(Je(s[e], r, n)), o), []),
|
|
1186
1185
|
valueFormat: r
|
|
1187
1186
|
}), pr = (e) => {
|
|
1188
1187
|
const t = /* @__PURE__ */ new Map(), r = new Set(e.columns.map((a) => a.key));
|
|
@@ -1215,7 +1214,7 @@ var lr = class {
|
|
|
1215
1214
|
rule: Tr,
|
|
1216
1215
|
tile: Mr
|
|
1217
1216
|
}, hr = (e) => typeof e == "string" && ot.includes(e);
|
|
1218
|
-
function
|
|
1217
|
+
function P(e, t) {
|
|
1219
1218
|
return {
|
|
1220
1219
|
type: "layer",
|
|
1221
1220
|
id: t.id,
|
|
@@ -1231,24 +1230,24 @@ function V(e, t) {
|
|
|
1231
1230
|
};
|
|
1232
1231
|
}
|
|
1233
1232
|
function br(e = {}) {
|
|
1234
|
-
return
|
|
1233
|
+
return P("point", e);
|
|
1235
1234
|
}
|
|
1236
1235
|
function vr(e = {}) {
|
|
1237
|
-
return
|
|
1236
|
+
return P("line", e);
|
|
1238
1237
|
}
|
|
1239
1238
|
function Ar(e = {}) {
|
|
1240
|
-
return
|
|
1239
|
+
return P("area", e);
|
|
1241
1240
|
}
|
|
1242
1241
|
function Er(e = {}) {
|
|
1243
|
-
return
|
|
1242
|
+
return P("bar", e);
|
|
1244
1243
|
}
|
|
1245
1244
|
function Tr(e = {}) {
|
|
1246
|
-
return
|
|
1245
|
+
return P("rule", e);
|
|
1247
1246
|
}
|
|
1248
1247
|
function Mr(e = {}) {
|
|
1249
|
-
return
|
|
1248
|
+
return P("tile", e);
|
|
1250
1249
|
}
|
|
1251
|
-
var
|
|
1250
|
+
var Pa = [
|
|
1252
1251
|
"color",
|
|
1253
1252
|
"alpha",
|
|
1254
1253
|
"saturation",
|
|
@@ -1275,7 +1274,7 @@ var Va = [
|
|
|
1275
1274
|
"padding",
|
|
1276
1275
|
"margin",
|
|
1277
1276
|
"shadow"
|
|
1278
|
-
], ge = 1, me = 1e3,
|
|
1277
|
+
], ge = 1, me = 1e3, _r = "'none' or a shadow object { offsetX, offsetY, blur, color }", pe = "a non-negative number of pixels, or an object of those per edge", kr = "a non-empty color string, a { light, dark } pair, or a token(...) reference", wr = [
|
|
1279
1278
|
"top",
|
|
1280
1279
|
"right",
|
|
1281
1280
|
"bottom",
|
|
@@ -1293,7 +1292,7 @@ var ye = (e, t) => {
|
|
|
1293
1292
|
}
|
|
1294
1293
|
const r = Object.entries(e).map(([a, n]) => [a, ye(n, t)]);
|
|
1295
1294
|
return r.every(([a, n]) => n === e[a]) ? e : Object.fromEntries(r);
|
|
1296
|
-
}, L = (e) => typeof e == "number" && Number.isFinite(e),
|
|
1295
|
+
}, L = (e) => typeof e == "number" && Number.isFinite(e), _ = (e, t) => ({
|
|
1297
1296
|
status: "rejected",
|
|
1298
1297
|
expected: e,
|
|
1299
1298
|
actual: t
|
|
@@ -1302,7 +1301,7 @@ var ye = (e, t) => {
|
|
|
1302
1301
|
return e.trim().length > 0 ? {
|
|
1303
1302
|
status: "accepted",
|
|
1304
1303
|
value: e
|
|
1305
|
-
} :
|
|
1304
|
+
} : _("a non-empty color string", e);
|
|
1306
1305
|
if (Dr(e)) {
|
|
1307
1306
|
const r = t[e.token];
|
|
1308
1307
|
return r === void 0 ? {
|
|
@@ -1322,7 +1321,7 @@ var ye = (e, t) => {
|
|
|
1322
1321
|
light: e.light,
|
|
1323
1322
|
dark: e.dark
|
|
1324
1323
|
}
|
|
1325
|
-
} :
|
|
1324
|
+
} : _(kr, e);
|
|
1326
1325
|
}, be = (e) => {
|
|
1327
1326
|
if (L(e) && e >= 0) return {
|
|
1328
1327
|
status: "accepted",
|
|
@@ -1333,12 +1332,12 @@ var ye = (e, t) => {
|
|
|
1333
1332
|
left: e
|
|
1334
1333
|
}
|
|
1335
1334
|
};
|
|
1336
|
-
if (typeof e != "object" || e === null) return
|
|
1335
|
+
if (typeof e != "object" || e === null) return _(pe, e);
|
|
1337
1336
|
const t = e, r = {};
|
|
1338
1337
|
for (const a of wr) {
|
|
1339
1338
|
const n = t[a];
|
|
1340
1339
|
if (n !== void 0) {
|
|
1341
|
-
if (!L(n) || n < 0) return
|
|
1340
|
+
if (!L(n) || n < 0) return _(pe, e);
|
|
1342
1341
|
r[a] = n;
|
|
1343
1342
|
}
|
|
1344
1343
|
}
|
|
@@ -1346,43 +1345,43 @@ var ye = (e, t) => {
|
|
|
1346
1345
|
status: "accepted",
|
|
1347
1346
|
value: r
|
|
1348
1347
|
};
|
|
1349
|
-
},
|
|
1348
|
+
}, Va = {
|
|
1350
1349
|
color: he,
|
|
1351
1350
|
unitInterval: (e) => L(e) && e >= 0 && e <= 1 ? {
|
|
1352
1351
|
status: "accepted",
|
|
1353
1352
|
value: e
|
|
1354
|
-
} :
|
|
1353
|
+
} : _("a number in [0, 1]", e),
|
|
1355
1354
|
pixels: (e) => L(e) && e >= 0 ? {
|
|
1356
1355
|
status: "accepted",
|
|
1357
1356
|
value: e
|
|
1358
|
-
} :
|
|
1357
|
+
} : _("a non-negative number of pixels", e),
|
|
1359
1358
|
radiusToken: (e) => hr(e) ? {
|
|
1360
1359
|
status: "accepted",
|
|
1361
1360
|
value: e
|
|
1362
|
-
} :
|
|
1361
|
+
} : _(`one of ${ot.map((t) => `'${t}'`).join(", ")}`, e),
|
|
1363
1362
|
lineType: (e) => At(e) ? {
|
|
1364
1363
|
status: "accepted",
|
|
1365
1364
|
value: e
|
|
1366
|
-
} :
|
|
1365
|
+
} : _(`one of ${Ce.map((t) => `'${t}'`).join(", ")}`, e),
|
|
1367
1366
|
fontFamily: (e) => typeof e == "string" && e.trim().length > 0 ? {
|
|
1368
1367
|
status: "accepted",
|
|
1369
1368
|
value: e
|
|
1370
|
-
} :
|
|
1369
|
+
} : _("a non-empty CSS font-family list", e),
|
|
1371
1370
|
fontWeight: (e) => L(e) && e >= ge && e <= me ? {
|
|
1372
1371
|
status: "accepted",
|
|
1373
1372
|
value: e
|
|
1374
|
-
} :
|
|
1373
|
+
} : _(`a number in [${ge}, ${me}]`, e),
|
|
1375
1374
|
multiplier: (e) => L(e) && e > 0 ? {
|
|
1376
1375
|
status: "accepted",
|
|
1377
1376
|
value: e
|
|
1378
|
-
} :
|
|
1377
|
+
} : _("a positive multiple of the font size", e),
|
|
1379
1378
|
shadow: (e, t) => {
|
|
1380
1379
|
if (e === "none") return {
|
|
1381
1380
|
status: "accepted",
|
|
1382
1381
|
value: e
|
|
1383
1382
|
};
|
|
1384
1383
|
const r = e;
|
|
1385
|
-
if (!L(r.offsetX) || !L(r.offsetY) || !L(r.blur) || r.blur < 0) return
|
|
1384
|
+
if (!L(r.offsetX) || !L(r.offsetY) || !L(r.blur) || r.blur < 0) return _(_r, e);
|
|
1386
1385
|
const a = he(r.color, t);
|
|
1387
1386
|
return a.status !== "accepted" ? a : {
|
|
1388
1387
|
status: "accepted",
|
|
@@ -1432,8 +1431,8 @@ var ye = (e, t) => {
|
|
|
1432
1431
|
differenceArrow: ["label"],
|
|
1433
1432
|
pinnedNumber: ["label"],
|
|
1434
1433
|
comment: ["label"]
|
|
1435
|
-
},
|
|
1436
|
-
function
|
|
1434
|
+
}, Ja = ["dimmed", "hovered"];
|
|
1435
|
+
function Qa(e) {
|
|
1437
1436
|
return {
|
|
1438
1437
|
type: "styles",
|
|
1439
1438
|
...e
|
|
@@ -1448,7 +1447,7 @@ var N = (e) => {
|
|
|
1448
1447
|
...e?.id === void 0 ? {} : { id: e.id },
|
|
1449
1448
|
...Object.keys(t).length === 0 ? {} : { when: t }
|
|
1450
1449
|
};
|
|
1451
|
-
}, F = (e) => e?.layer === void 0 ? {} : { layer: e.layer }, l = (e) => e?.id === void 0 ? {} : { id: e.id },
|
|
1450
|
+
}, F = (e) => e?.layer === void 0 ? {} : { layer: e.layer }, l = (e) => e?.id === void 0 ? {} : { id: e.id }, k = (e) => e?.annotation === void 0 ? {} : { annotation: e.annotation }, c = {
|
|
1452
1451
|
geom: Object.assign((e, t) => ({
|
|
1453
1452
|
...N(t),
|
|
1454
1453
|
select: {
|
|
@@ -2020,7 +2019,7 @@ var N = (e) => {
|
|
|
2020
2019
|
...l(t),
|
|
2021
2020
|
select: {
|
|
2022
2021
|
target: "annotation",
|
|
2023
|
-
...
|
|
2022
|
+
...k(t)
|
|
2024
2023
|
},
|
|
2025
2024
|
declarations: e
|
|
2026
2025
|
}), {
|
|
@@ -2029,7 +2028,7 @@ var N = (e) => {
|
|
|
2029
2028
|
select: {
|
|
2030
2029
|
target: "annotation",
|
|
2031
2030
|
kind: "shape",
|
|
2032
|
-
...
|
|
2031
|
+
...k(t)
|
|
2033
2032
|
},
|
|
2034
2033
|
declarations: e
|
|
2035
2034
|
}),
|
|
@@ -2038,7 +2037,7 @@ var N = (e) => {
|
|
|
2038
2037
|
select: {
|
|
2039
2038
|
target: "annotation",
|
|
2040
2039
|
kind: "arrow",
|
|
2041
|
-
...
|
|
2040
|
+
...k(t)
|
|
2042
2041
|
},
|
|
2043
2042
|
declarations: e
|
|
2044
2043
|
}),
|
|
@@ -2047,7 +2046,7 @@ var N = (e) => {
|
|
|
2047
2046
|
select: {
|
|
2048
2047
|
target: "annotation",
|
|
2049
2048
|
kind: "differenceArrow",
|
|
2050
|
-
...
|
|
2049
|
+
...k(t)
|
|
2051
2050
|
},
|
|
2052
2051
|
declarations: e
|
|
2053
2052
|
}), { label: (e, t) => ({
|
|
@@ -2056,7 +2055,7 @@ var N = (e) => {
|
|
|
2056
2055
|
target: "annotation",
|
|
2057
2056
|
kind: "differenceArrow",
|
|
2058
2057
|
part: "label",
|
|
2059
|
-
...
|
|
2058
|
+
...k(t)
|
|
2060
2059
|
},
|
|
2061
2060
|
declarations: e
|
|
2062
2061
|
}) }),
|
|
@@ -2065,7 +2064,7 @@ var N = (e) => {
|
|
|
2065
2064
|
select: {
|
|
2066
2065
|
target: "annotation",
|
|
2067
2066
|
kind: "text",
|
|
2068
|
-
...
|
|
2067
|
+
...k(t)
|
|
2069
2068
|
},
|
|
2070
2069
|
declarations: e
|
|
2071
2070
|
}),
|
|
@@ -2074,7 +2073,7 @@ var N = (e) => {
|
|
|
2074
2073
|
select: {
|
|
2075
2074
|
target: "annotation",
|
|
2076
2075
|
kind: "image",
|
|
2077
|
-
...
|
|
2076
|
+
...k(t)
|
|
2078
2077
|
},
|
|
2079
2078
|
declarations: e
|
|
2080
2079
|
}),
|
|
@@ -2083,7 +2082,7 @@ var N = (e) => {
|
|
|
2083
2082
|
select: {
|
|
2084
2083
|
target: "annotation",
|
|
2085
2084
|
kind: "pinnedNumber",
|
|
2086
|
-
...
|
|
2085
|
+
...k(t)
|
|
2087
2086
|
},
|
|
2088
2087
|
declarations: e
|
|
2089
2088
|
}), { label: (e, t) => ({
|
|
@@ -2092,7 +2091,7 @@ var N = (e) => {
|
|
|
2092
2091
|
target: "annotation",
|
|
2093
2092
|
kind: "pinnedNumber",
|
|
2094
2093
|
part: "label",
|
|
2095
|
-
...
|
|
2094
|
+
...k(t)
|
|
2096
2095
|
},
|
|
2097
2096
|
declarations: e
|
|
2098
2097
|
}) }),
|
|
@@ -2101,7 +2100,7 @@ var N = (e) => {
|
|
|
2101
2100
|
select: {
|
|
2102
2101
|
target: "annotation",
|
|
2103
2102
|
kind: "comment",
|
|
2104
|
-
...
|
|
2103
|
+
...k(t)
|
|
2105
2104
|
},
|
|
2106
2105
|
declarations: e
|
|
2107
2106
|
}), { label: (e, t) => ({
|
|
@@ -2110,7 +2109,7 @@ var N = (e) => {
|
|
|
2110
2109
|
target: "annotation",
|
|
2111
2110
|
kind: "comment",
|
|
2112
2111
|
part: "label",
|
|
2113
|
-
...
|
|
2112
|
+
...k(t)
|
|
2114
2113
|
},
|
|
2115
2114
|
declarations: e
|
|
2116
2115
|
}) })
|
|
@@ -2123,7 +2122,7 @@ var N = (e) => {
|
|
|
2123
2122
|
right: 24,
|
|
2124
2123
|
bottom: 24,
|
|
2125
2124
|
left: 24
|
|
2126
|
-
}, Ae = 1, Nr = 0.3, Cr = 10,
|
|
2125
|
+
}, Ae = 1, Nr = 0.3, Cr = 10, Rr = 24, Ir = 8, Ee = Object.freeze({
|
|
2127
2126
|
light: "#898373",
|
|
2128
2127
|
dark: "#9F9886"
|
|
2129
2128
|
}), y = {
|
|
@@ -2250,7 +2249,7 @@ var N = (e) => {
|
|
|
2250
2249
|
blur: 1.5,
|
|
2251
2250
|
color: "rgba(14, 14, 52, 0.18)"
|
|
2252
2251
|
}
|
|
2253
|
-
},
|
|
2252
|
+
}, _e = {
|
|
2254
2253
|
fontSize: 12,
|
|
2255
2254
|
fontWeight: 500,
|
|
2256
2255
|
lineHeight: 1.3,
|
|
@@ -2402,7 +2401,7 @@ var N = (e) => {
|
|
|
2402
2401
|
}),
|
|
2403
2402
|
c.tooltip.primaryRow({ background: u("tooltipPrimaryRow") }),
|
|
2404
2403
|
c.headline({
|
|
2405
|
-
gap:
|
|
2404
|
+
gap: Rr,
|
|
2406
2405
|
margin: { bottom: 4 }
|
|
2407
2406
|
}),
|
|
2408
2407
|
c.headlineItem.number({
|
|
@@ -2424,7 +2423,7 @@ var N = (e) => {
|
|
|
2424
2423
|
c.headlineItem.trend.up({ textColor: u("trendPositive") }),
|
|
2425
2424
|
c.headlineItem.trend.down({ textColor: u("trendNegative") }),
|
|
2426
2425
|
c.headlineItem.trend.flat({ textColor: u("trendNeutral") }),
|
|
2427
|
-
c.legend({ gap:
|
|
2426
|
+
c.legend({ gap: Ir }),
|
|
2428
2427
|
c.legend.popover({
|
|
2429
2428
|
background: u("tooltipBackground"),
|
|
2430
2429
|
borderColor: u("tooltipBorder"),
|
|
@@ -2508,9 +2507,9 @@ var N = (e) => {
|
|
|
2508
2507
|
borderRadius: 0
|
|
2509
2508
|
}),
|
|
2510
2509
|
c.annotation.pinnedNumber(Me),
|
|
2511
|
-
c.annotation.pinnedNumber.label(
|
|
2510
|
+
c.annotation.pinnedNumber.label(_e),
|
|
2512
2511
|
c.annotation.comment(Me),
|
|
2513
|
-
c.annotation.comment.label(
|
|
2512
|
+
c.annotation.comment.label(_e)
|
|
2514
2513
|
];
|
|
2515
2514
|
for (const e of st) {
|
|
2516
2515
|
Object.freeze(e.select);
|
|
@@ -2533,7 +2532,7 @@ var sn = Object.freeze({
|
|
|
2533
2532
|
};
|
|
2534
2533
|
return e.groupBy(...r.groupby).rollup(a);
|
|
2535
2534
|
}
|
|
2536
|
-
},
|
|
2535
|
+
}, Pr = class {
|
|
2537
2536
|
constructor() {
|
|
2538
2537
|
this.transformType = "constant";
|
|
2539
2538
|
}
|
|
@@ -2545,7 +2544,7 @@ var sn = Object.freeze({
|
|
|
2545
2544
|
const { options: t } = e;
|
|
2546
2545
|
return [t.variableName];
|
|
2547
2546
|
}
|
|
2548
|
-
},
|
|
2547
|
+
}, Vr = class {
|
|
2549
2548
|
constructor() {
|
|
2550
2549
|
this.transformType = "filter";
|
|
2551
2550
|
}
|
|
@@ -2580,8 +2579,8 @@ var sn = Object.freeze({
|
|
|
2580
2579
|
}
|
|
2581
2580
|
}, zr = [
|
|
2582
2581
|
new Br(),
|
|
2583
|
-
new Vr(),
|
|
2584
2582
|
new Pr(),
|
|
2583
|
+
new Vr(),
|
|
2585
2584
|
new jr(),
|
|
2586
2585
|
new Wr()
|
|
2587
2586
|
], ln = class extends lr {
|
|
@@ -2766,7 +2765,7 @@ var sn = Object.freeze({
|
|
|
2766
2765
|
w.green,
|
|
2767
2766
|
w.red,
|
|
2768
2767
|
W.gray200
|
|
2769
|
-
],
|
|
2768
|
+
], ke = {
|
|
2770
2769
|
dark: {
|
|
2771
2770
|
1: [500],
|
|
2772
2771
|
2: [600, 400],
|
|
@@ -2926,7 +2925,7 @@ var sn = Object.freeze({
|
|
|
2926
2925
|
reverse: !1
|
|
2927
2926
|
}, we = { palette: { type: "default" } };
|
|
2928
2927
|
function De(e, t = "light", r) {
|
|
2929
|
-
return ((r !== void 0 ?
|
|
2928
|
+
return ((r !== void 0 ? ke[t][r] : void 0) ?? ke[t].default).map((a) => W[`${e}${a}`]);
|
|
2930
2929
|
}
|
|
2931
2930
|
function qr(e) {
|
|
2932
2931
|
const t = U.indexOf(T[e]);
|
|
@@ -3028,7 +3027,7 @@ function v(e, t = {}) {
|
|
|
3028
3027
|
symmetric: r.symmetric
|
|
3029
3028
|
};
|
|
3030
3029
|
}
|
|
3031
|
-
function
|
|
3030
|
+
function Q(e, t = {}) {
|
|
3032
3031
|
return {
|
|
3033
3032
|
type: "scale",
|
|
3034
3033
|
scaledAesthetic: e,
|
|
@@ -3066,7 +3065,7 @@ function Z(e, t) {
|
|
|
3066
3065
|
options: t
|
|
3067
3066
|
};
|
|
3068
3067
|
}
|
|
3069
|
-
function
|
|
3068
|
+
function Jr(e, t = {}) {
|
|
3070
3069
|
return {
|
|
3071
3070
|
type: "scale",
|
|
3072
3071
|
scaledAesthetic: e,
|
|
@@ -3085,7 +3084,7 @@ var An = { labelCrossPosition: 0.5 }, En = {
|
|
|
3085
3084
|
x: 8,
|
|
3086
3085
|
y: 8,
|
|
3087
3086
|
unit: "px"
|
|
3088
|
-
},
|
|
3087
|
+
}, _n = { align: "center" }, kn = {
|
|
3089
3088
|
startArrowheadStyle: "none",
|
|
3090
3089
|
endArrowheadStyle: "line-arrow"
|
|
3091
3090
|
}, wn = {
|
|
@@ -3131,7 +3130,7 @@ var An = { labelCrossPosition: 0.5 }, En = {
|
|
|
3131
3130
|
borderWidth: 2
|
|
3132
3131
|
}
|
|
3133
3132
|
}
|
|
3134
|
-
},
|
|
3133
|
+
}, Qr = [
|
|
3135
3134
|
"grouped-bars",
|
|
3136
3135
|
"stacked-bars",
|
|
3137
3136
|
"lines"
|
|
@@ -3139,7 +3138,7 @@ var An = { labelCrossPosition: 0.5 }, En = {
|
|
|
3139
3138
|
"grouped-bars": "dodge",
|
|
3140
3139
|
"stacked-bars": "stack",
|
|
3141
3140
|
lines: null
|
|
3142
|
-
}, Sn = (e) => e === "identity" ? "grouped-bars" :
|
|
3141
|
+
}, Sn = (e) => e === "identity" ? "grouped-bars" : Qr.find((t) => Zr[t] === e) ?? null, On = {
|
|
3143
3142
|
cartesian: (e = {}) => ({
|
|
3144
3143
|
type: "coord",
|
|
3145
3144
|
coordType: "cartesian",
|
|
@@ -3159,7 +3158,7 @@ var An = { labelCrossPosition: 0.5 }, En = {
|
|
|
3159
3158
|
x: Object.assign((e) => Z("x", e), {
|
|
3160
3159
|
continuous: (e) => v("x", e),
|
|
3161
3160
|
discrete: (e) => S("x", e),
|
|
3162
|
-
datetime: (e) =>
|
|
3161
|
+
datetime: (e) => Q("x", e),
|
|
3163
3162
|
log: (e) => v("x", {
|
|
3164
3163
|
...e,
|
|
3165
3164
|
transform: "log"
|
|
@@ -3172,7 +3171,7 @@ var An = { labelCrossPosition: 0.5 }, En = {
|
|
|
3172
3171
|
y: Object.assign((e) => Z("y", e), {
|
|
3173
3172
|
continuous: (e) => v("y", e),
|
|
3174
3173
|
discrete: (e) => S("y", e),
|
|
3175
|
-
datetime: (e) =>
|
|
3174
|
+
datetime: (e) => Q("y", e),
|
|
3176
3175
|
log: (e) => v("y", {
|
|
3177
3176
|
...e,
|
|
3178
3177
|
transform: "log"
|
|
@@ -3185,7 +3184,7 @@ var An = { labelCrossPosition: 0.5 }, En = {
|
|
|
3185
3184
|
ySecondary: Object.assign((e) => Z("ySecondary", e), {
|
|
3186
3185
|
continuous: (e) => v("ySecondary", e),
|
|
3187
3186
|
discrete: (e) => S("ySecondary", e),
|
|
3188
|
-
datetime: (e) =>
|
|
3187
|
+
datetime: (e) => Q("ySecondary", e),
|
|
3189
3188
|
log: (e) => v("ySecondary", {
|
|
3190
3189
|
...e,
|
|
3191
3190
|
transform: "log"
|
|
@@ -3198,7 +3197,7 @@ var An = { labelCrossPosition: 0.5 }, En = {
|
|
|
3198
3197
|
color: {
|
|
3199
3198
|
continuous: (e) => v("color", e),
|
|
3200
3199
|
discrete: (e) => S("color", e),
|
|
3201
|
-
palette: (e) =>
|
|
3200
|
+
palette: (e) => Jr("color", e)
|
|
3202
3201
|
},
|
|
3203
3202
|
size: {
|
|
3204
3203
|
continuous: (e) => v("size", e),
|
|
@@ -3246,7 +3245,7 @@ function aa() {
|
|
|
3246
3245
|
function na() {
|
|
3247
3246
|
return { type: "sum" };
|
|
3248
3247
|
}
|
|
3249
|
-
var
|
|
3248
|
+
var Rn = {
|
|
3250
3249
|
reshape: oa,
|
|
3251
3250
|
filter: sa,
|
|
3252
3251
|
sort: ia,
|
|
@@ -3288,31 +3287,31 @@ function ca(e) {
|
|
|
3288
3287
|
options: e
|
|
3289
3288
|
};
|
|
3290
3289
|
}
|
|
3291
|
-
function
|
|
3290
|
+
function In(e) {
|
|
3292
3291
|
return {
|
|
3293
3292
|
type: "config",
|
|
3294
3293
|
config: e
|
|
3295
3294
|
};
|
|
3296
3295
|
}
|
|
3297
3296
|
export {
|
|
3298
|
-
|
|
3297
|
+
ja as $,
|
|
3299
3298
|
wa as $t,
|
|
3300
3299
|
mn as A,
|
|
3301
3300
|
qt as At,
|
|
3302
3301
|
Za as B,
|
|
3303
3302
|
Mt as Bt,
|
|
3304
|
-
|
|
3305
|
-
|
|
3303
|
+
Q as C,
|
|
3304
|
+
ma as Cn,
|
|
3306
3305
|
fr as Ct,
|
|
3307
3306
|
bn as D,
|
|
3308
|
-
|
|
3309
|
-
|
|
3307
|
+
fa as Dn,
|
|
3308
|
+
Ia as Dt,
|
|
3310
3309
|
vn as E,
|
|
3311
|
-
|
|
3310
|
+
ee as En,
|
|
3312
3311
|
ae as Et,
|
|
3313
3312
|
un as F,
|
|
3314
|
-
|
|
3315
|
-
|
|
3313
|
+
I as Ft,
|
|
3314
|
+
on as G,
|
|
3316
3315
|
Tt as Gt,
|
|
3317
3316
|
Fr as H,
|
|
3318
3317
|
La as Ht,
|
|
@@ -3320,10 +3319,10 @@ export {
|
|
|
3320
3319
|
Kt as It,
|
|
3321
3320
|
Or as J,
|
|
3322
3321
|
E as Jt,
|
|
3323
|
-
|
|
3322
|
+
nn as K,
|
|
3324
3323
|
z as Kt,
|
|
3325
3324
|
dn as L,
|
|
3326
|
-
|
|
3325
|
+
Je as Lt,
|
|
3327
3326
|
gn as M,
|
|
3328
3327
|
Na as Mt,
|
|
3329
3328
|
Ur as N,
|
|
@@ -3331,103 +3330,103 @@ export {
|
|
|
3331
3330
|
yn as O,
|
|
3332
3331
|
te as Ot,
|
|
3333
3332
|
Yr as P,
|
|
3334
|
-
|
|
3333
|
+
Ra as Pt,
|
|
3335
3334
|
Ka as Q,
|
|
3336
3335
|
Ce as Qt,
|
|
3337
3336
|
ln as R,
|
|
3338
|
-
|
|
3337
|
+
Vt as Rt,
|
|
3339
3338
|
S,
|
|
3340
|
-
|
|
3339
|
+
ha as Sn,
|
|
3341
3340
|
xa as St,
|
|
3342
3341
|
hn as T,
|
|
3343
|
-
|
|
3342
|
+
ft as Tn,
|
|
3344
3343
|
or as Tt,
|
|
3345
3344
|
ve as U,
|
|
3346
3345
|
Fa as Ut,
|
|
3347
3346
|
Sr as V,
|
|
3348
3347
|
Et as Vt,
|
|
3349
3348
|
an as W,
|
|
3350
|
-
|
|
3349
|
+
Ie as Wt,
|
|
3351
3350
|
en as X,
|
|
3352
|
-
|
|
3351
|
+
Re as Xt,
|
|
3353
3352
|
tn as Y,
|
|
3354
3353
|
G as Yt,
|
|
3355
3354
|
qa as Z,
|
|
3356
3355
|
ne as Zt,
|
|
3357
|
-
|
|
3358
|
-
|
|
3356
|
+
_n as _,
|
|
3357
|
+
Se as _n,
|
|
3359
3358
|
u as _t,
|
|
3360
3359
|
On as a,
|
|
3361
|
-
|
|
3362
|
-
|
|
3360
|
+
Ma as an,
|
|
3361
|
+
Wa as at,
|
|
3363
3362
|
Z as b,
|
|
3364
|
-
|
|
3363
|
+
va as bn,
|
|
3365
3364
|
Ba as bt,
|
|
3366
3365
|
Sn as c,
|
|
3367
|
-
|
|
3366
|
+
Oe as cn,
|
|
3368
3367
|
Ua as ct,
|
|
3369
3368
|
wn as d,
|
|
3370
|
-
|
|
3371
|
-
|
|
3369
|
+
Fe as dn,
|
|
3370
|
+
Va as dt,
|
|
3372
3371
|
At as en,
|
|
3373
|
-
|
|
3372
|
+
$a as et,
|
|
3374
3373
|
An as f,
|
|
3375
|
-
|
|
3376
|
-
|
|
3374
|
+
gt as fn,
|
|
3375
|
+
Pa as ft,
|
|
3377
3376
|
En as g,
|
|
3378
|
-
|
|
3377
|
+
pt as gn,
|
|
3379
3378
|
ye as gt,
|
|
3380
3379
|
Mn as h,
|
|
3381
|
-
|
|
3380
|
+
ht as hn,
|
|
3382
3381
|
Lr as ht,
|
|
3383
3382
|
Nn as i,
|
|
3384
|
-
|
|
3385
|
-
|
|
3383
|
+
vt as in,
|
|
3384
|
+
za as it,
|
|
3386
3385
|
pn as j,
|
|
3387
3386
|
Ca as jt,
|
|
3388
3387
|
fn as k,
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3388
|
+
Jt as kt,
|
|
3389
|
+
kn as l,
|
|
3390
|
+
Aa as ln,
|
|
3392
3391
|
c as lt,
|
|
3393
3392
|
Tn as m,
|
|
3394
|
-
|
|
3393
|
+
mt as mn,
|
|
3395
3394
|
Dr as mt,
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3395
|
+
Rn as n,
|
|
3396
|
+
ka as nn,
|
|
3397
|
+
Ha as nt,
|
|
3399
3398
|
Zr as o,
|
|
3400
|
-
|
|
3399
|
+
_a as on,
|
|
3401
3400
|
Ya as ot,
|
|
3402
3401
|
Fn as p,
|
|
3403
|
-
|
|
3402
|
+
pa as pn,
|
|
3404
3403
|
se as pt,
|
|
3405
3404
|
rn as q,
|
|
3406
3405
|
Sa as qt,
|
|
3407
3406
|
Cn as r,
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3407
|
+
Ta as rn,
|
|
3408
|
+
Xa as rt,
|
|
3409
|
+
Qr as s,
|
|
3410
|
+
Ne as sn,
|
|
3411
|
+
Ja as st,
|
|
3412
|
+
In as t,
|
|
3414
3413
|
Da as tn,
|
|
3415
|
-
|
|
3414
|
+
Ga as tt,
|
|
3416
3415
|
Ln as u,
|
|
3417
|
-
|
|
3418
|
-
|
|
3416
|
+
Ea as un,
|
|
3417
|
+
Qa as ut,
|
|
3419
3418
|
Dn as v,
|
|
3420
|
-
|
|
3419
|
+
yt as vn,
|
|
3421
3420
|
ot as vt,
|
|
3422
3421
|
v as w,
|
|
3423
|
-
|
|
3422
|
+
ga as wn,
|
|
3424
3423
|
lr as wt,
|
|
3425
3424
|
$ as x,
|
|
3426
|
-
|
|
3425
|
+
p as xn,
|
|
3427
3426
|
hr as xt,
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3427
|
+
Jr as y,
|
|
3428
|
+
ba as yn,
|
|
3429
|
+
P as yt,
|
|
3431
3430
|
sn as z,
|
|
3432
|
-
|
|
3431
|
+
_t as zt
|
|
3433
3432
|
};
|