@graphysdk/theme-gamma 0.0.0-stage → 0.1.1-beta.1791459323341
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/LICENSE.md +17 -0
- package/README.md +64 -2
- package/dist/fonts.d.ts +2 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.mjs +1872 -0
- package/dist/mushroom/mushroom.d.ts +15 -0
- package/dist/mushroom/renderer/area.d.ts +5 -0
- package/dist/mushroom/renderer/bar.d.ts +7 -0
- package/dist/mushroom/renderer/cap.d.ts +19 -0
- package/dist/mushroom/renderer/line.d.ts +5 -0
- package/dist/mushroom/renderer/plugins.d.ts +8 -0
- package/dist/mushroom/renderer/point.d.ts +5 -0
- package/dist/mushroom/renderer/slice.d.ts +6 -0
- package/dist/mushroom/renderer/texture.d.ts +39 -0
- package/dist/mushroom/styles.d.ts +31 -0
- package/dist/night/night.d.ts +14 -0
- package/dist/night/renderer/area.d.ts +5 -0
- package/dist/night/renderer/bar.d.ts +3 -0
- package/dist/night/renderer/corner.d.ts +2 -0
- package/dist/night/renderer/glass.d.ts +18 -0
- package/dist/night/renderer/line.d.ts +5 -0
- package/dist/night/renderer/plugins.d.ts +8 -0
- package/dist/night/renderer/point.d.ts +5 -0
- package/dist/night/renderer/slice.d.ts +3 -0
- package/dist/night/renderer/star.d.ts +12 -0
- package/dist/night/sky.d.ts +5 -0
- package/dist/night/styles.d.ts +30 -0
- package/dist/shared/bar-frame.d.ts +22 -0
- package/dist/shared/ink.d.ts +10 -0
- package/dist/shared/intro.d.ts +20 -0
- package/dist/shared/paint.d.ts +21 -0
- package/dist/shared/slice-extent.d.ts +12 -0
- package/dist/shared/trace.d.ts +19 -0
- package/dist/shared/utils/paths.d.ts +7 -0
- package/dist/shared/utils/projections.d.ts +16 -0
- package/fonts.css +2 -0
- package/licenses/PolyForm-Free-Trial-1.0.0.md +93 -0
- package/licenses/PolyForm-NonCommercial-1.0.0.md +131 -0
- package/licenses/PolyForm-Small-Business-1.0.0.md +121 -0
- package/package.json +79 -3
- package/src/fonts.css.d.ts +2 -0
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,1872 @@
|
|
|
1
|
+
import { useCallback as ee, useEffect as re, useId as ne, useMemo as C, useState as oe } from "react";
|
|
2
|
+
import { GROUP_VARIABLES as ae, IntroFade as ie, IntroWipeClip as se, buildPolarBarArcPath as Ht, createAreaPathGenerators as Et, createLinePathGenerator as bt, createStableKeyGenerator as _, defineGeomRenderer as W, getAngleExtent as de, getBarRectBounds as le, getRadiusExtent as pt, getStackRole as Ot, getX as V, getXMax as he, getXMin as ce, getY as X, getYMax as Pt, getYMin as ue, polarToUnit as Mt, prepareAreaObservations as Lt, prepareLineObservations as _t, readMainAxis as et, style as l, toPaintColor as ge, toStrokeDasharray as pe, toViewBoxX as fe, toViewBoxY as me, useGeomStyleReader as ot } from "@graphysdk/react";
|
|
3
|
+
import { jsx as i, jsxs as k } from "react/jsx-runtime";
|
|
4
|
+
var ve = /^#([0-9a-f]{6})$/iu, Ae = /^rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)/iu, At = (t) => {
|
|
5
|
+
const r = ve.exec(t);
|
|
6
|
+
if (r?.[1] !== void 0) {
|
|
7
|
+
const n = Number.parseInt(r[1], 16);
|
|
8
|
+
return [
|
|
9
|
+
n >> 16 & 255,
|
|
10
|
+
n >> 8 & 255,
|
|
11
|
+
n & 255
|
|
12
|
+
];
|
|
13
|
+
}
|
|
14
|
+
const e = Ae.exec(t);
|
|
15
|
+
return e?.[1] !== void 0 && e[2] !== void 0 && e[3] !== void 0 ? [
|
|
16
|
+
Number(e[1]),
|
|
17
|
+
Number(e[2]),
|
|
18
|
+
Number(e[3])
|
|
19
|
+
] : null;
|
|
20
|
+
}, M = (t, r, e) => {
|
|
21
|
+
const n = At(t), o = At(r);
|
|
22
|
+
if (n === null || o === null) return t;
|
|
23
|
+
const [a, s, h] = n.map((c, d) => Math.round(c + ((o[d] ?? 0) - c) * e));
|
|
24
|
+
return `rgb(${a}, ${s}, ${h})`;
|
|
25
|
+
}, H = (t) => `${t}-${ne().replace(/[^a-zA-Z0-9]/gu, "")}`, Y = (t) => {
|
|
26
|
+
const r = H(t);
|
|
27
|
+
return (e) => `${r}-${e.replace(/[^a-zA-Z0-9]/gu, "")}`;
|
|
28
|
+
}, It = (t) => {
|
|
29
|
+
let r = t || 1;
|
|
30
|
+
return () => {
|
|
31
|
+
r = r + 1831565813 | 0;
|
|
32
|
+
let e = Math.imul(r ^ r >>> 15, 1 | r);
|
|
33
|
+
return e = e + Math.imul(e ^ e >>> 7, 61 | e) ^ e, ((e ^ e >>> 14) >>> 0) / 4294967296;
|
|
34
|
+
};
|
|
35
|
+
}, ke = 1.70158, Se = (t) => 1 + 2.70158 * (t - 1) ** 3 + ke * (t - 1) ** 2, $e = (t) => Math.sqrt(1 - (t - 1) ** 2), ye = (t) => t.type === "grow" ? Math.max(0, ...Object.values(t.delayByKey)) : 0, Re = (t) => {
|
|
36
|
+
const [r, e] = oe({
|
|
37
|
+
intro: t,
|
|
38
|
+
seconds: 0
|
|
39
|
+
});
|
|
40
|
+
return re(() => {
|
|
41
|
+
if (!t) return;
|
|
42
|
+
const n = ye(t) + t.durationSeconds;
|
|
43
|
+
let o = null, a = 0;
|
|
44
|
+
const s = (h) => {
|
|
45
|
+
o ??= h;
|
|
46
|
+
const c = Math.max(0, (h - o) / 1e3), d = c >= n;
|
|
47
|
+
e({
|
|
48
|
+
intro: t,
|
|
49
|
+
seconds: d ? 1 / 0 : c
|
|
50
|
+
}), d || (a = requestAnimationFrame(s));
|
|
51
|
+
};
|
|
52
|
+
return a = requestAnimationFrame(s), () => cancelAnimationFrame(a);
|
|
53
|
+
}, [t]), t ? r.intro === t ? r.seconds : 0 : 1 / 0;
|
|
54
|
+
}, K = (t) => {
|
|
55
|
+
const r = t?.type === "grow" ? t : null, e = Re(r), n = ee((o) => {
|
|
56
|
+
if (r === null || e === 1 / 0) return 1;
|
|
57
|
+
const a = r.delayByKey[o] ?? 0, s = Math.min(1, Math.max(0, (e - a) / r.durationSeconds));
|
|
58
|
+
return r.growAxis === "angle" ? $e(s) : Se(s);
|
|
59
|
+
}, [r, e]);
|
|
60
|
+
return {
|
|
61
|
+
plan: e === 1 / 0 ? null : r,
|
|
62
|
+
readGrowth: n
|
|
63
|
+
};
|
|
64
|
+
}, z = (t, r, e) => t + (r - t) * e, U = ({ intro: t, children: r }) => t?.type === "wipe" ? /* @__PURE__ */ i(se, {
|
|
65
|
+
intro: t,
|
|
66
|
+
children: r
|
|
67
|
+
}) : t?.type === "fade" ? /* @__PURE__ */ i(ie, {
|
|
68
|
+
intro: t,
|
|
69
|
+
children: r
|
|
70
|
+
}) : r, E = (t) => {
|
|
71
|
+
const r = ot(t);
|
|
72
|
+
return (e, n) => ({
|
|
73
|
+
color: ge(r.get("fill", e, n)),
|
|
74
|
+
opacity: r.get("alpha", e, n),
|
|
75
|
+
fillOpacity: r.get("fillAlpha", e, n),
|
|
76
|
+
edge: r.get("stroke", e, n),
|
|
77
|
+
edgeWidth: r.get("strokeWidth", e, n)
|
|
78
|
+
});
|
|
79
|
+
}, at = (t) => {
|
|
80
|
+
const r = ot(t);
|
|
81
|
+
return (e, n) => {
|
|
82
|
+
const o = r.get("strokeWidth", e, n);
|
|
83
|
+
return {
|
|
84
|
+
color: r.get("stroke", e, n),
|
|
85
|
+
opacity: r.get("alpha", e, n) * r.get("strokeAlpha", e, n),
|
|
86
|
+
width: o,
|
|
87
|
+
dashArray: pe(r.get("dashArray", e, n), o)
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
}, j = (t, r) => {
|
|
91
|
+
const e = V(t), n = X(t) ?? Pt(t);
|
|
92
|
+
return e === null || n === null ? null : {
|
|
93
|
+
x: fe(e) * r.width,
|
|
94
|
+
y: me(n) * r.height
|
|
95
|
+
};
|
|
96
|
+
}, T = (t, r) => {
|
|
97
|
+
const e = V(t), n = X(t) ?? pt(t).outerRadius;
|
|
98
|
+
if (e === null || n === null) return null;
|
|
99
|
+
const o = Mt(e, n), a = Math.min(r.width, r.height) / 2;
|
|
100
|
+
return {
|
|
101
|
+
x: r.width / 2 + o.x * a,
|
|
102
|
+
y: r.height / 2 - o.y * a
|
|
103
|
+
};
|
|
104
|
+
}, we = (t) => `${t.map((r, e) => `${e === 0 ? "M" : "L"}${r.x},${r.y}`).join(" ")} Z`, L = (t, r) => {
|
|
105
|
+
const e = _(t.data, t.mapping, t.id), n = [];
|
|
106
|
+
return t.data.groupBy(ae.group).forEach((o) => {
|
|
107
|
+
const a = [...o], [s] = a, h = r(a);
|
|
108
|
+
s === void 0 || h === null || n.push({
|
|
109
|
+
key: e(s),
|
|
110
|
+
observation: s,
|
|
111
|
+
path: h
|
|
112
|
+
});
|
|
113
|
+
}), n;
|
|
114
|
+
}, xe = (t, r) => t.flatMap((e) => {
|
|
115
|
+
const n = V(e), o = T(e, r);
|
|
116
|
+
return n === null || o === null ? [] : [{
|
|
117
|
+
angle: n,
|
|
118
|
+
point: o
|
|
119
|
+
}];
|
|
120
|
+
}).sort((e, n) => e.angle - n.angle).map(({ point: e }) => e), it = (t, r) => {
|
|
121
|
+
const e = xe(t, r);
|
|
122
|
+
return e.length === 0 ? null : we(e);
|
|
123
|
+
}, Tt = (t, r, e) => {
|
|
124
|
+
const n = _(t.data, t.mapping, t.id);
|
|
125
|
+
return Array.from(t.data, (o) => ({
|
|
126
|
+
observation: o,
|
|
127
|
+
point: e(o, r)
|
|
128
|
+
})).flatMap(({ observation: o, point: a }) => a === null ? [] : [{
|
|
129
|
+
key: n(o),
|
|
130
|
+
observation: o,
|
|
131
|
+
point: a
|
|
132
|
+
}]);
|
|
133
|
+
}, Ce = /[a-df-zA-DF-Z]|[-+]?(?:\d+\.?\d*|\.\d+)(?:[eE][-+]?\d+)?/gu, We = /^[a-zA-Z]$/u, Fe = (t, r) => t === "H" ? "x" : t === "V" ? "y" : r % 2 === 0 ? "x" : "y", N = (t, r) => {
|
|
134
|
+
let e = "", n = 0;
|
|
135
|
+
return (t.match(Ce) ?? []).map((o) => {
|
|
136
|
+
if (We.test(o))
|
|
137
|
+
return e = o.toUpperCase(), n = 0, o;
|
|
138
|
+
const a = Fe(e, n);
|
|
139
|
+
return n += 1, String(Number(o) * (a === "x" ? r.width : r.height));
|
|
140
|
+
}).join(" ");
|
|
141
|
+
}, Z = 26, tt = {
|
|
142
|
+
shade: "#138F6E",
|
|
143
|
+
body: "#2FB27A",
|
|
144
|
+
sunlit: "#C2DC5E",
|
|
145
|
+
stipple: "#0B6B50"
|
|
146
|
+
}, rt = {
|
|
147
|
+
underside: "#F8CCD8",
|
|
148
|
+
gill: "#DE8FAA"
|
|
149
|
+
}, He = "#6A4BD8", Bt = "#FFFFFF", Gt = ({ id: t, color: r, opacity: e, count: n, seed: o, largest: a }) => {
|
|
150
|
+
const s = It(o);
|
|
151
|
+
return /* @__PURE__ */ i("pattern", {
|
|
152
|
+
id: t,
|
|
153
|
+
patternUnits: "userSpaceOnUse",
|
|
154
|
+
width: Z,
|
|
155
|
+
height: Z,
|
|
156
|
+
children: Array.from({ length: n }, (h, c) => /* @__PURE__ */ i("circle", {
|
|
157
|
+
cx: s() * Z,
|
|
158
|
+
cy: s() * Z,
|
|
159
|
+
r: 0.35 + s() ** 2 * (a - 0.35),
|
|
160
|
+
fill: r,
|
|
161
|
+
fillOpacity: e * (0.5 + s() * 0.5)
|
|
162
|
+
}, c))
|
|
163
|
+
});
|
|
164
|
+
}, zt = ({ id: t }) => /* @__PURE__ */ i(Gt, {
|
|
165
|
+
id: t,
|
|
166
|
+
color: Bt,
|
|
167
|
+
opacity: 0.75,
|
|
168
|
+
count: 16,
|
|
169
|
+
seed: 5,
|
|
170
|
+
largest: 1.1
|
|
171
|
+
}), Dt = ({ id: t }) => /* @__PURE__ */ i(Gt, {
|
|
172
|
+
id: t,
|
|
173
|
+
color: tt.stipple,
|
|
174
|
+
opacity: 0.55,
|
|
175
|
+
count: 34,
|
|
176
|
+
seed: 9,
|
|
177
|
+
largest: 1.4
|
|
178
|
+
}), Ee = ({ id: t, color: r }) => /* @__PURE__ */ k("linearGradient", {
|
|
179
|
+
id: t,
|
|
180
|
+
x1: 0,
|
|
181
|
+
y1: 0,
|
|
182
|
+
x2: 0.35,
|
|
183
|
+
y2: 1,
|
|
184
|
+
children: [
|
|
185
|
+
/* @__PURE__ */ i("stop", {
|
|
186
|
+
offset: 0,
|
|
187
|
+
stopColor: M(r, Bt, 0.18)
|
|
188
|
+
}),
|
|
189
|
+
/* @__PURE__ */ i("stop", {
|
|
190
|
+
offset: 0.55,
|
|
191
|
+
stopColor: r
|
|
192
|
+
}),
|
|
193
|
+
/* @__PURE__ */ i("stop", {
|
|
194
|
+
offset: 1,
|
|
195
|
+
stopColor: M(r, He, 0.4)
|
|
196
|
+
})
|
|
197
|
+
]
|
|
198
|
+
}), Nt = ({ id: t }) => /* @__PURE__ */ k("linearGradient", {
|
|
199
|
+
id: t,
|
|
200
|
+
x1: 0,
|
|
201
|
+
y1: 0,
|
|
202
|
+
x2: 1,
|
|
203
|
+
y2: 0.2,
|
|
204
|
+
children: [
|
|
205
|
+
/* @__PURE__ */ i("stop", {
|
|
206
|
+
offset: 0,
|
|
207
|
+
stopColor: tt.shade
|
|
208
|
+
}),
|
|
209
|
+
/* @__PURE__ */ i("stop", {
|
|
210
|
+
offset: 0.55,
|
|
211
|
+
stopColor: tt.body
|
|
212
|
+
}),
|
|
213
|
+
/* @__PURE__ */ i("stop", {
|
|
214
|
+
offset: 1,
|
|
215
|
+
stopColor: tt.sunlit
|
|
216
|
+
})
|
|
217
|
+
]
|
|
218
|
+
}), be = "#6A4BD8", Oe = "#FFFFFF", st = ({ cx: t, cy: r, width: e, color: n, opacity: o = 1, edge: a }) => {
|
|
219
|
+
const s = e / 2, h = e * 0.55, c = r + h / 2, d = r - h / 2, u = `M${t - s},${c} C${t - s},${d + h * 0.4} ${t - s * 0.56},${d} ${t},${d} C${t + s * 0.56},${d} ${t + s},${d + h * 0.4} ${t + s},${c} Q${t},${c + h * 0.22} ${t - s},${c} Z`;
|
|
220
|
+
return /* @__PURE__ */ k("g", {
|
|
221
|
+
opacity: o,
|
|
222
|
+
children: [
|
|
223
|
+
/* @__PURE__ */ i("path", {
|
|
224
|
+
d: `M${t - s * 0.92},${c + h * 0.04} Q${t},${c + h * 0.22} ${t + s * 0.92},${c + h * 0.04} Q${t},${c + h * 0.55} ${t - s * 0.92},${c + h * 0.04} Z`,
|
|
225
|
+
fill: rt.underside,
|
|
226
|
+
stroke: rt.gill,
|
|
227
|
+
strokeWidth: 0.5
|
|
228
|
+
}),
|
|
229
|
+
/* @__PURE__ */ i("path", {
|
|
230
|
+
d: u,
|
|
231
|
+
fill: n,
|
|
232
|
+
...a
|
|
233
|
+
}),
|
|
234
|
+
/* @__PURE__ */ i("path", {
|
|
235
|
+
d: `M${t - s * 0.55},${d + h * 0.3} Q${t - s * 0.2},${d + h * 0.08} ${t + s * 0.1},${d + h * 0.12}`,
|
|
236
|
+
fill: "none",
|
|
237
|
+
stroke: M(n, Oe, 0.55),
|
|
238
|
+
strokeWidth: Math.max(0.8, e * 0.07),
|
|
239
|
+
strokeLinecap: "round"
|
|
240
|
+
}),
|
|
241
|
+
/* @__PURE__ */ i("path", {
|
|
242
|
+
d: u,
|
|
243
|
+
fill: "none",
|
|
244
|
+
stroke: M(n, be, 0.35),
|
|
245
|
+
strokeWidth: 0.6
|
|
246
|
+
})
|
|
247
|
+
]
|
|
248
|
+
});
|
|
249
|
+
}, Pe = 2, Me = 24, Le = "#6A4BD8", Kt = ({ layer: t, coordSystem: r, panel: e }) => {
|
|
250
|
+
const n = E(t), o = H("speckle"), a = C(() => {
|
|
251
|
+
if (r === void 0) return L(t, (d) => it(d, e)).map((d) => ({
|
|
252
|
+
...d,
|
|
253
|
+
fill: d.path,
|
|
254
|
+
edge: d.path
|
|
255
|
+
}));
|
|
256
|
+
const { areaGenerator: s, lineGenerator: h } = Et(r, t.params), c = /* @__PURE__ */ new Map();
|
|
257
|
+
return L(t, (d) => {
|
|
258
|
+
const u = Lt(d, t.params.missingValues), g = s(u), p = h(u);
|
|
259
|
+
if (!g) return null;
|
|
260
|
+
const f = N(g, e);
|
|
261
|
+
return p && c.set(f, N(p, e)), f;
|
|
262
|
+
}).map((d) => ({
|
|
263
|
+
...d,
|
|
264
|
+
fill: d.path,
|
|
265
|
+
edge: c.get(d.path) ?? ""
|
|
266
|
+
}));
|
|
267
|
+
}, [
|
|
268
|
+
t,
|
|
269
|
+
r,
|
|
270
|
+
e
|
|
271
|
+
]);
|
|
272
|
+
return e.width <= 0 || e.height <= 0 ? null : /* @__PURE__ */ k("g", {
|
|
273
|
+
"data-geom": "area",
|
|
274
|
+
children: [/* @__PURE__ */ i("defs", { children: /* @__PURE__ */ i(zt, { id: o }) }), a.map(({ key: s, observation: h, fill: c, edge: d }) => {
|
|
275
|
+
const u = n(h);
|
|
276
|
+
return /* @__PURE__ */ k("g", {
|
|
277
|
+
opacity: u.opacity,
|
|
278
|
+
children: [
|
|
279
|
+
/* @__PURE__ */ i("path", {
|
|
280
|
+
d: c,
|
|
281
|
+
fill: u.color,
|
|
282
|
+
fillOpacity: u.fillOpacity
|
|
283
|
+
}),
|
|
284
|
+
/* @__PURE__ */ i("path", {
|
|
285
|
+
d: c,
|
|
286
|
+
fill: `url(#${o})`
|
|
287
|
+
}),
|
|
288
|
+
/* @__PURE__ */ i("path", {
|
|
289
|
+
d,
|
|
290
|
+
fill: "none",
|
|
291
|
+
stroke: M(u.color, Le, 0.3),
|
|
292
|
+
strokeWidth: Pe,
|
|
293
|
+
strokeLinejoin: "round"
|
|
294
|
+
})
|
|
295
|
+
]
|
|
296
|
+
}, s);
|
|
297
|
+
})]
|
|
298
|
+
});
|
|
299
|
+
}, Ut = ({ layer: t, observation: r, panel: e, project: n }) => {
|
|
300
|
+
const o = E(t)(r, "hovered"), a = n(r, e);
|
|
301
|
+
return a === null ? null : /* @__PURE__ */ i("g", {
|
|
302
|
+
"data-geom": "area",
|
|
303
|
+
children: /* @__PURE__ */ i(st, {
|
|
304
|
+
cx: a.x,
|
|
305
|
+
cy: a.y,
|
|
306
|
+
width: Me,
|
|
307
|
+
color: o.color,
|
|
308
|
+
opacity: o.opacity
|
|
309
|
+
})
|
|
310
|
+
});
|
|
311
|
+
}, _e = W("area", {
|
|
312
|
+
coord: "cartesian",
|
|
313
|
+
guideMode: "crosshair",
|
|
314
|
+
swatchShape: "area",
|
|
315
|
+
render: ({ layer: t, coordSystem: r, panelRect: e, intro: n }) => r.type !== "cartesian" ? null : /* @__PURE__ */ i(U, {
|
|
316
|
+
intro: n,
|
|
317
|
+
children: /* @__PURE__ */ i(Kt, {
|
|
318
|
+
layer: t,
|
|
319
|
+
coordSystem: r,
|
|
320
|
+
panel: e
|
|
321
|
+
})
|
|
322
|
+
}),
|
|
323
|
+
renderHover: ({ layer: t, primary: r, panelRect: e }) => /* @__PURE__ */ i(Ut, {
|
|
324
|
+
layer: t,
|
|
325
|
+
observation: r.observation,
|
|
326
|
+
panel: e,
|
|
327
|
+
project: j
|
|
328
|
+
}),
|
|
329
|
+
renderHoverCompanions: () => null
|
|
330
|
+
}), Ie = W("area", {
|
|
331
|
+
coord: "polar",
|
|
332
|
+
guideMode: "crosshair",
|
|
333
|
+
swatchShape: "area",
|
|
334
|
+
render: ({ layer: t, panelRect: r, intro: e }) => /* @__PURE__ */ i(U, {
|
|
335
|
+
intro: e,
|
|
336
|
+
children: /* @__PURE__ */ i(Kt, {
|
|
337
|
+
layer: t,
|
|
338
|
+
panel: r
|
|
339
|
+
})
|
|
340
|
+
}),
|
|
341
|
+
renderHover: ({ layer: t, primary: r, panelRect: e }) => /* @__PURE__ */ i(Ut, {
|
|
342
|
+
layer: t,
|
|
343
|
+
observation: r.observation,
|
|
344
|
+
panel: e,
|
|
345
|
+
project: T
|
|
346
|
+
}),
|
|
347
|
+
renderHoverCompanions: () => null
|
|
348
|
+
}), Te = {
|
|
349
|
+
solo: {
|
|
350
|
+
base: !0,
|
|
351
|
+
value: !0
|
|
352
|
+
},
|
|
353
|
+
floor: {
|
|
354
|
+
base: !0,
|
|
355
|
+
value: !1
|
|
356
|
+
},
|
|
357
|
+
ceiling: {
|
|
358
|
+
base: !1,
|
|
359
|
+
value: !0
|
|
360
|
+
},
|
|
361
|
+
middle: {
|
|
362
|
+
base: !1,
|
|
363
|
+
value: !1
|
|
364
|
+
}
|
|
365
|
+
}, Be = {
|
|
366
|
+
top: "bottom",
|
|
367
|
+
bottom: "top",
|
|
368
|
+
left: "right",
|
|
369
|
+
right: "left"
|
|
370
|
+
}, Ge = (t, r) => r === "x" ? (Pt(t) ?? X(t) ?? 0) >= (ue(t) ?? 0) ? "top" : "bottom" : (he(t) ?? 0) >= (ce(t) ?? 0) ? "right" : "left", ze = (t, r, e) => {
|
|
371
|
+
const n = Math.max(0, t.width - e), o = Math.max(0, t.height - e);
|
|
372
|
+
return r === "top" ? {
|
|
373
|
+
...t,
|
|
374
|
+
y: t.y + t.height - o,
|
|
375
|
+
height: o
|
|
376
|
+
} : r === "bottom" ? {
|
|
377
|
+
...t,
|
|
378
|
+
height: o
|
|
379
|
+
} : r === "left" ? {
|
|
380
|
+
...t,
|
|
381
|
+
x: t.x + t.width - n,
|
|
382
|
+
width: n
|
|
383
|
+
} : {
|
|
384
|
+
...t,
|
|
385
|
+
width: n
|
|
386
|
+
};
|
|
387
|
+
}, De = (t, r, { baseline: e, growth: n }) => {
|
|
388
|
+
const o = r === "x", a = o ? t.y : t.x, s = o ? t.height : t.width, h = z(e, a, n), c = z(e, a + s, n), d = {
|
|
389
|
+
start: Math.min(h, c),
|
|
390
|
+
span: Math.abs(c - h)
|
|
391
|
+
};
|
|
392
|
+
return o ? {
|
|
393
|
+
...t,
|
|
394
|
+
y: d.start,
|
|
395
|
+
height: d.span
|
|
396
|
+
} : {
|
|
397
|
+
...t,
|
|
398
|
+
x: d.start,
|
|
399
|
+
width: d.span
|
|
400
|
+
};
|
|
401
|
+
}, jt = (t, r, e, n, o) => {
|
|
402
|
+
const a = le(r, t);
|
|
403
|
+
if (!a) return null;
|
|
404
|
+
const s = o === void 0 ? a : De(a, r, o);
|
|
405
|
+
if (s.width <= 0 || s.height <= 0) return null;
|
|
406
|
+
const h = Te[Ot(t)], c = Ge(t, r), d = {
|
|
407
|
+
x: s.x * e.width,
|
|
408
|
+
y: s.y * e.height,
|
|
409
|
+
width: s.width * e.width,
|
|
410
|
+
height: s.height * e.height
|
|
411
|
+
}, u = [h.value ? [] : [c], h.base ? [] : [Be[c]]].flat().reduce((R, b) => ze(R, b, n / 2), d), g = c === "top" || c === "bottom", p = g ? u.width : u.height, f = g ? u.height : u.width;
|
|
412
|
+
if (p <= 0 || f <= 0) return null;
|
|
413
|
+
const { x: S, y: w, width: v, height: y } = u, $ = (R, b) => c === "top" ? {
|
|
414
|
+
x: S + R,
|
|
415
|
+
y: w + y - b
|
|
416
|
+
} : c === "bottom" ? {
|
|
417
|
+
x: S + R,
|
|
418
|
+
y: w + b
|
|
419
|
+
} : c === "right" ? {
|
|
420
|
+
x: S + b,
|
|
421
|
+
y: w + R
|
|
422
|
+
} : {
|
|
423
|
+
x: S + v - b,
|
|
424
|
+
y: w + R
|
|
425
|
+
};
|
|
426
|
+
return {
|
|
427
|
+
breadth: p,
|
|
428
|
+
length: f,
|
|
429
|
+
endsStack: h.value,
|
|
430
|
+
at: $
|
|
431
|
+
};
|
|
432
|
+
}, Ne = ({ x: t, y: r }) => `${Math.round(t * 100) / 100},${Math.round(r * 100) / 100}`, D = (t, r) => `${r.map((e, n) => {
|
|
433
|
+
const o = e.map(([a, s]) => Ne(t.at(a, s)));
|
|
434
|
+
return n === 0 ? `M${o.join(" ")}` : e.length === 3 ? `C${o.join(" ")}` : `L${o.join(" ")}`;
|
|
435
|
+
}).join(" ")} Z`, Ke = 3, Ue = 0.62, je = 0.6, Ve = 0.22, Q = 0.48, q = 0.34, Xe = 3.2, Ye = 4, Ze = (t, r) => {
|
|
436
|
+
const { breadth: e, length: n } = t, o = Math.min(e * Ue, n * je), a = n - o, s = o * Ve, h = e / 2, c = D(t, [
|
|
437
|
+
[[0, a]],
|
|
438
|
+
[
|
|
439
|
+
[0, a + o * 0.62],
|
|
440
|
+
[e * 0.2, n],
|
|
441
|
+
[h, n]
|
|
442
|
+
],
|
|
443
|
+
[
|
|
444
|
+
[e * 0.8, n],
|
|
445
|
+
[e, a + o * 0.62],
|
|
446
|
+
[e, a]
|
|
447
|
+
],
|
|
448
|
+
[
|
|
449
|
+
[e * 0.75, a - s * 0.5],
|
|
450
|
+
[e * 0.25, a - s * 0.5],
|
|
451
|
+
[0, a]
|
|
452
|
+
]
|
|
453
|
+
]), d = D(t, [
|
|
454
|
+
[[0, a]],
|
|
455
|
+
[
|
|
456
|
+
[e * 0.25, a - s * 0.5],
|
|
457
|
+
[e * 0.75, a - s * 0.5],
|
|
458
|
+
[e, a]
|
|
459
|
+
],
|
|
460
|
+
[
|
|
461
|
+
[e * 0.85, a - s * 1.9],
|
|
462
|
+
[e * 0.15, a - s * 1.9],
|
|
463
|
+
[0, a]
|
|
464
|
+
]
|
|
465
|
+
]), u = t.at(h, a - s * 1.3), g = Math.max(6, Math.floor(e / Xe)), p = Array.from({ length: g + 1 }, (S, w) => {
|
|
466
|
+
const v = t.at(e * w / g, a);
|
|
467
|
+
return `M${u.x},${u.y} L${v.x},${v.y}`;
|
|
468
|
+
}).join(" "), f = a - s * 1.1;
|
|
469
|
+
return {
|
|
470
|
+
rim: a,
|
|
471
|
+
cap: c,
|
|
472
|
+
underside: d,
|
|
473
|
+
gills: p,
|
|
474
|
+
stalk: r && f > 0 ? D(t, [
|
|
475
|
+
[[h - e * Q / 2, 0]],
|
|
476
|
+
[
|
|
477
|
+
[h - e * Q / 2, f * 0.4],
|
|
478
|
+
[h - e * q / 2, f * 0.7],
|
|
479
|
+
[h - e * q / 2, f]
|
|
480
|
+
],
|
|
481
|
+
[[h + e * q / 2, f]],
|
|
482
|
+
[
|
|
483
|
+
[h + e * q / 2, f * 0.7],
|
|
484
|
+
[h + e * Q / 2, f * 0.4],
|
|
485
|
+
[h + e * Q / 2, 0]
|
|
486
|
+
]
|
|
487
|
+
]) : null
|
|
488
|
+
};
|
|
489
|
+
}, Qe = (t, r) => {
|
|
490
|
+
const { breadth: e } = t, n = Math.min(Ye, e / 2, r / 2);
|
|
491
|
+
return D(t, [
|
|
492
|
+
[[0, n]],
|
|
493
|
+
[[0, r - n]],
|
|
494
|
+
[
|
|
495
|
+
[0, r],
|
|
496
|
+
[0, r],
|
|
497
|
+
[n, r]
|
|
498
|
+
],
|
|
499
|
+
[[e - n, r]],
|
|
500
|
+
[
|
|
501
|
+
[e, r],
|
|
502
|
+
[e, r],
|
|
503
|
+
[e, r - n]
|
|
504
|
+
],
|
|
505
|
+
[[e, n]],
|
|
506
|
+
[
|
|
507
|
+
[e, 0],
|
|
508
|
+
[e, 0],
|
|
509
|
+
[e - n, 0]
|
|
510
|
+
],
|
|
511
|
+
[[n, 0]],
|
|
512
|
+
[
|
|
513
|
+
[0, 0],
|
|
514
|
+
[0, 0],
|
|
515
|
+
[0, n]
|
|
516
|
+
]
|
|
517
|
+
]);
|
|
518
|
+
}, kt = ({ layer: t, observations: r, mainAxis: e, panel: n, state: o, intro: a }) => {
|
|
519
|
+
const s = E(t), h = Y("cap"), c = H("speckle"), d = H("stipple"), u = H("stalk"), g = H("gills"), p = C(() => _(t.data, t.mapping, t.id), [
|
|
520
|
+
t.data,
|
|
521
|
+
t.mapping,
|
|
522
|
+
t.id
|
|
523
|
+
]), { plan: f, readGrowth: S } = K(a);
|
|
524
|
+
if (n.width <= 0 || n.height <= 0) return null;
|
|
525
|
+
const w = [...r].map((v, y) => ({
|
|
526
|
+
key: p(v),
|
|
527
|
+
index: y,
|
|
528
|
+
paint: s(v, o),
|
|
529
|
+
frame: jt(v, e, n, Ke, f === null ? void 0 : {
|
|
530
|
+
baseline: f.baseline,
|
|
531
|
+
growth: S(p(v))
|
|
532
|
+
}),
|
|
533
|
+
isSolo: Ot(v) === "solo"
|
|
534
|
+
}));
|
|
535
|
+
return /* @__PURE__ */ k("g", {
|
|
536
|
+
"data-geom": "bar",
|
|
537
|
+
children: [/* @__PURE__ */ k("defs", { children: [
|
|
538
|
+
/* @__PURE__ */ i(zt, { id: c }),
|
|
539
|
+
/* @__PURE__ */ i(Dt, { id: d }),
|
|
540
|
+
/* @__PURE__ */ i(Nt, { id: u }),
|
|
541
|
+
[...new Set(w.map(({ paint: v }) => v.color))].map((v) => /* @__PURE__ */ i(Ee, {
|
|
542
|
+
id: h(v),
|
|
543
|
+
color: v
|
|
544
|
+
}, v))
|
|
545
|
+
] }), w.map(({ key: v, index: y, paint: $, frame: R, isSolo: b }) => {
|
|
546
|
+
if (R === null) return null;
|
|
547
|
+
const ft = `url(#${h($.color)})`, mt = o === "hovered" ? {
|
|
548
|
+
stroke: $.edge,
|
|
549
|
+
strokeWidth: $.edgeWidth
|
|
550
|
+
} : {}, x = R.endsStack ? Ze(R, b) : null, ht = b ? null : Qe(R, x === null ? R.length : x.rim), vt = `${g}-${y}`;
|
|
551
|
+
return /* @__PURE__ */ k("g", {
|
|
552
|
+
opacity: $.opacity,
|
|
553
|
+
children: [
|
|
554
|
+
ht !== null && /* @__PURE__ */ k("g", { children: [/* @__PURE__ */ i("path", {
|
|
555
|
+
d: ht,
|
|
556
|
+
fill: ft,
|
|
557
|
+
fillOpacity: $.fillOpacity,
|
|
558
|
+
...mt
|
|
559
|
+
}), /* @__PURE__ */ i("path", {
|
|
560
|
+
d: ht,
|
|
561
|
+
fill: `url(#${c})`
|
|
562
|
+
})] }),
|
|
563
|
+
x !== null && x.stalk !== null && /* @__PURE__ */ k("g", { children: [/* @__PURE__ */ i("path", {
|
|
564
|
+
d: x.stalk,
|
|
565
|
+
fill: `url(#${u})`
|
|
566
|
+
}), /* @__PURE__ */ i("path", {
|
|
567
|
+
d: x.stalk,
|
|
568
|
+
fill: `url(#${d})`
|
|
569
|
+
})] }),
|
|
570
|
+
x !== null && /* @__PURE__ */ k("g", { children: [
|
|
571
|
+
/* @__PURE__ */ i("clipPath", {
|
|
572
|
+
id: vt,
|
|
573
|
+
children: /* @__PURE__ */ i("path", { d: x.underside })
|
|
574
|
+
}),
|
|
575
|
+
/* @__PURE__ */ i("path", {
|
|
576
|
+
d: x.underside,
|
|
577
|
+
fill: rt.underside
|
|
578
|
+
}),
|
|
579
|
+
/* @__PURE__ */ i("path", {
|
|
580
|
+
d: x.gills,
|
|
581
|
+
stroke: rt.gill,
|
|
582
|
+
strokeWidth: 0.6,
|
|
583
|
+
clipPath: `url(#${vt})`
|
|
584
|
+
}),
|
|
585
|
+
/* @__PURE__ */ i("path", {
|
|
586
|
+
d: x.cap,
|
|
587
|
+
fill: ft,
|
|
588
|
+
fillOpacity: $.fillOpacity,
|
|
589
|
+
...mt
|
|
590
|
+
}),
|
|
591
|
+
/* @__PURE__ */ i("path", {
|
|
592
|
+
d: x.cap,
|
|
593
|
+
fill: `url(#${c})`
|
|
594
|
+
})
|
|
595
|
+
] })
|
|
596
|
+
]
|
|
597
|
+
}, v);
|
|
598
|
+
})]
|
|
599
|
+
});
|
|
600
|
+
}, qe = W("bar", {
|
|
601
|
+
coord: "cartesian",
|
|
602
|
+
guideMode: "band",
|
|
603
|
+
swatchShape: "square",
|
|
604
|
+
render: ({ layer: t, coordSystem: r, panelRect: e, intro: n }) => /* @__PURE__ */ i(kt, {
|
|
605
|
+
layer: t,
|
|
606
|
+
observations: t.data,
|
|
607
|
+
mainAxis: et(r),
|
|
608
|
+
panel: e,
|
|
609
|
+
intro: n
|
|
610
|
+
}),
|
|
611
|
+
renderHover: ({ layer: t, coordSystem: r, primary: e, panelRect: n }) => /* @__PURE__ */ i(kt, {
|
|
612
|
+
layer: t,
|
|
613
|
+
observations: [e.observation],
|
|
614
|
+
mainAxis: et(r),
|
|
615
|
+
panel: n,
|
|
616
|
+
state: "hovered"
|
|
617
|
+
}),
|
|
618
|
+
renderHoverCompanions: () => null
|
|
619
|
+
}), Je = 15, tr = 18, er = 24, rr = ({ layer: t, panel: r, coord: e, project: n }) => {
|
|
620
|
+
const o = at(t), a = C(() => {
|
|
621
|
+
if (e === "polar") return L(t, (u) => it(u, r));
|
|
622
|
+
const d = bt(t.params);
|
|
623
|
+
return L(t, (u) => {
|
|
624
|
+
const g = d(_t(u, t.params.missingValues));
|
|
625
|
+
return g ? N(g, r) : null;
|
|
626
|
+
});
|
|
627
|
+
}, [
|
|
628
|
+
t,
|
|
629
|
+
r,
|
|
630
|
+
e
|
|
631
|
+
]), s = C(() => Tt(t, r, n), [
|
|
632
|
+
t,
|
|
633
|
+
r,
|
|
634
|
+
n
|
|
635
|
+
]), h = s.length / Math.max(1, a.length), c = r.width / Math.max(1, h) >= tr;
|
|
636
|
+
return r.width <= 0 || r.height <= 0 ? null : /* @__PURE__ */ k("g", {
|
|
637
|
+
"data-geom": "line",
|
|
638
|
+
children: [a.map(({ key: d, path: u, observation: g }) => {
|
|
639
|
+
const p = o(g);
|
|
640
|
+
return /* @__PURE__ */ i("path", {
|
|
641
|
+
d: u,
|
|
642
|
+
fill: "none",
|
|
643
|
+
stroke: p.color,
|
|
644
|
+
strokeWidth: p.width,
|
|
645
|
+
strokeDasharray: p.dashArray,
|
|
646
|
+
strokeLinecap: "round",
|
|
647
|
+
strokeLinejoin: "round",
|
|
648
|
+
opacity: p.opacity
|
|
649
|
+
}, d);
|
|
650
|
+
}), c && s.map(({ key: d, observation: u, point: g }) => /* @__PURE__ */ i(st, {
|
|
651
|
+
cx: g.x,
|
|
652
|
+
cy: g.y,
|
|
653
|
+
width: Je,
|
|
654
|
+
color: o(u).color
|
|
655
|
+
}, d))]
|
|
656
|
+
});
|
|
657
|
+
}, nr = ({ layer: t, observation: r, panel: e, project: n }) => {
|
|
658
|
+
const o = at(t)(r, "hovered"), a = n(r, e);
|
|
659
|
+
return a === null ? null : /* @__PURE__ */ i("g", {
|
|
660
|
+
"data-geom": "line",
|
|
661
|
+
children: /* @__PURE__ */ i(st, {
|
|
662
|
+
cx: a.x,
|
|
663
|
+
cy: a.y,
|
|
664
|
+
width: er,
|
|
665
|
+
color: o.color,
|
|
666
|
+
opacity: o.opacity
|
|
667
|
+
})
|
|
668
|
+
});
|
|
669
|
+
}, Vt = (t, r) => W("line", {
|
|
670
|
+
coord: t,
|
|
671
|
+
guideMode: "crosshair",
|
|
672
|
+
swatchShape: "line",
|
|
673
|
+
render: ({ layer: e, panelRect: n, intro: o }) => /* @__PURE__ */ i(U, {
|
|
674
|
+
intro: o,
|
|
675
|
+
children: /* @__PURE__ */ i(rr, {
|
|
676
|
+
layer: e,
|
|
677
|
+
panel: n,
|
|
678
|
+
coord: t,
|
|
679
|
+
project: r
|
|
680
|
+
})
|
|
681
|
+
}),
|
|
682
|
+
renderHover: ({ layer: e, primary: n, panelRect: o }) => /* @__PURE__ */ i(nr, {
|
|
683
|
+
layer: e,
|
|
684
|
+
observation: n.observation,
|
|
685
|
+
panel: o,
|
|
686
|
+
project: r
|
|
687
|
+
}),
|
|
688
|
+
renderHoverCompanions: () => null,
|
|
689
|
+
getOverlayAnchor: ({ observation: e }) => {
|
|
690
|
+
const n = V(e), o = X(e);
|
|
691
|
+
return n === null || o === null ? null : {
|
|
692
|
+
x: n,
|
|
693
|
+
y: o
|
|
694
|
+
};
|
|
695
|
+
}
|
|
696
|
+
}), or = Vt("cartesian", j), ar = Vt("polar", T), ir = 2.6, sr = 5, St = ({ layer: t, observations: r, panel: e, project: n, state: o, intro: a }) => {
|
|
697
|
+
const s = ot(t), h = E(t), c = C(() => _(t.data, t.mapping, t.id), [
|
|
698
|
+
t.data,
|
|
699
|
+
t.mapping,
|
|
700
|
+
t.id
|
|
701
|
+
]), d = o === "hovered" ? sr : 0, { readGrowth: u } = K(a);
|
|
702
|
+
return /* @__PURE__ */ i("g", {
|
|
703
|
+
"data-geom": "point",
|
|
704
|
+
children: Array.from(r, (g) => {
|
|
705
|
+
const p = n(g, e);
|
|
706
|
+
if (p === null) return null;
|
|
707
|
+
const f = h(g, o), S = c(g);
|
|
708
|
+
return /* @__PURE__ */ i(st, {
|
|
709
|
+
cx: p.x,
|
|
710
|
+
cy: p.y,
|
|
711
|
+
width: (s.get("size", g, o) + d) * u(S) * ir,
|
|
712
|
+
color: f.color,
|
|
713
|
+
opacity: f.opacity,
|
|
714
|
+
edge: o === "hovered" ? {
|
|
715
|
+
stroke: f.edge,
|
|
716
|
+
strokeWidth: f.edgeWidth
|
|
717
|
+
} : void 0
|
|
718
|
+
}, S);
|
|
719
|
+
})
|
|
720
|
+
});
|
|
721
|
+
}, Xt = (t, r) => W("point", {
|
|
722
|
+
coord: t,
|
|
723
|
+
swatchShape: "circle",
|
|
724
|
+
render: ({ layer: e, panelRect: n, intro: o }) => /* @__PURE__ */ i(St, {
|
|
725
|
+
layer: e,
|
|
726
|
+
observations: e.data,
|
|
727
|
+
panel: n,
|
|
728
|
+
project: r,
|
|
729
|
+
intro: o
|
|
730
|
+
}),
|
|
731
|
+
renderHover: ({ layer: e, primary: n, panelRect: o }) => /* @__PURE__ */ i(St, {
|
|
732
|
+
layer: e,
|
|
733
|
+
observations: [n.observation],
|
|
734
|
+
panel: o,
|
|
735
|
+
project: r,
|
|
736
|
+
state: "hovered"
|
|
737
|
+
}),
|
|
738
|
+
renderHoverCompanions: () => null
|
|
739
|
+
}), dr = Xt("cartesian", j), lr = Xt("polar", T), Yt = (t, r, e) => {
|
|
740
|
+
const { startAngle: n, endAngle: o } = de(t), { innerRadius: a, outerRadius: s } = pt(t);
|
|
741
|
+
return n === null || o === null || a === null || s === null ? null : r?.growAxis === "angle" ? {
|
|
742
|
+
startAngle: z(r.baseline, n, e),
|
|
743
|
+
endAngle: z(r.baseline, o, e),
|
|
744
|
+
innerRadius: a,
|
|
745
|
+
outerRadius: s
|
|
746
|
+
} : r?.growAxis === "radius" ? {
|
|
747
|
+
startAngle: n,
|
|
748
|
+
endAngle: o,
|
|
749
|
+
innerRadius: z(r.baseline, a, e),
|
|
750
|
+
outerRadius: z(r.baseline, s, e)
|
|
751
|
+
} : {
|
|
752
|
+
startAngle: n,
|
|
753
|
+
endAngle: o,
|
|
754
|
+
innerRadius: a,
|
|
755
|
+
outerRadius: s
|
|
756
|
+
};
|
|
757
|
+
}, hr = 2, cr = 3, ct = Math.PI / 80, ur = 0.2, $t = 0.17, yt = "#FFFFFF", gr = "#3A2466", Rt = (t, r, e) => {
|
|
758
|
+
const n = Mt(r, 1);
|
|
759
|
+
return `${(t.width / 2 + n.x * e).toFixed(2)},${(t.height / 2 - n.y * e).toFixed(2)}`;
|
|
760
|
+
}, pr = (t, r) => {
|
|
761
|
+
if (t === null) return null;
|
|
762
|
+
const { startAngle: e, endAngle: n, innerRadius: o, outerRadius: a } = t, s = Math.min(r.width, r.height) / 2, h = a * s, c = o * s;
|
|
763
|
+
if (h <= 0) return null;
|
|
764
|
+
const d = Math.max(0, n - e), u = d >= 2 * Math.PI - 1e-6 ? 0 : Math.min(hr / 2 / h, d / 4), g = e + u, p = n - u, f = Ht({
|
|
765
|
+
startAngle: g,
|
|
766
|
+
endAngle: p,
|
|
767
|
+
innerRadius: o,
|
|
768
|
+
outerRadius: a
|
|
769
|
+
}, {
|
|
770
|
+
centerX: r.width / 2,
|
|
771
|
+
centerY: r.height / 2,
|
|
772
|
+
radius: s,
|
|
773
|
+
digits: cr
|
|
774
|
+
});
|
|
775
|
+
if (f === void 0) return null;
|
|
776
|
+
const S = Math.max(c, s * ur * a) + 1, w = h - 1, v = [];
|
|
777
|
+
for (let y = Math.ceil(g / ct); y * ct < p; y += 1) {
|
|
778
|
+
const $ = y * ct;
|
|
779
|
+
$ > g && w > S && v.push(`M${Rt(r, $, S)} L${Rt(r, $, w)}`);
|
|
780
|
+
}
|
|
781
|
+
return {
|
|
782
|
+
path: f,
|
|
783
|
+
gills: v.join(" ")
|
|
784
|
+
};
|
|
785
|
+
}, wt = ({ layer: t, observations: r, panel: e, state: n, intro: o }) => {
|
|
786
|
+
const a = E(t), s = H("underside"), h = H("stalk"), c = H("stipple"), d = C(() => _(t.data, t.mapping, t.id), [
|
|
787
|
+
t.data,
|
|
788
|
+
t.mapping,
|
|
789
|
+
t.id
|
|
790
|
+
]), { plan: u, readGrowth: g } = K(o);
|
|
791
|
+
if (e.width <= 0 || e.height <= 0) return null;
|
|
792
|
+
const p = Math.min(e.width, e.height) / 2, f = [...r].map((v, y) => {
|
|
793
|
+
const $ = d(v);
|
|
794
|
+
return {
|
|
795
|
+
key: $,
|
|
796
|
+
index: y,
|
|
797
|
+
observation: v,
|
|
798
|
+
paint: a(v, n),
|
|
799
|
+
slice: pr(Yt(v, u, g($)), e)
|
|
800
|
+
};
|
|
801
|
+
}), S = f.map(({ observation: v }) => pt(v)), w = n === void 0 && f.length > 1 && S.every(({ innerRadius: v, outerRadius: y }) => v === 0 && y === S[0]?.outerRadius);
|
|
802
|
+
return /* @__PURE__ */ k("g", {
|
|
803
|
+
"data-geom": "bar",
|
|
804
|
+
children: [
|
|
805
|
+
/* @__PURE__ */ k("defs", { children: [
|
|
806
|
+
/* @__PURE__ */ i(Nt, { id: h }),
|
|
807
|
+
/* @__PURE__ */ i(Dt, { id: c }),
|
|
808
|
+
f.map(({ index: v, paint: y }) => /* @__PURE__ */ k("radialGradient", {
|
|
809
|
+
id: `${s}-${v}`,
|
|
810
|
+
gradientUnits: "userSpaceOnUse",
|
|
811
|
+
cx: e.width / 2,
|
|
812
|
+
cy: e.height / 2,
|
|
813
|
+
r: p,
|
|
814
|
+
children: [
|
|
815
|
+
/* @__PURE__ */ i("stop", {
|
|
816
|
+
offset: 0,
|
|
817
|
+
stopColor: M(y.color, yt, 0.5)
|
|
818
|
+
}),
|
|
819
|
+
/* @__PURE__ */ i("stop", {
|
|
820
|
+
offset: 0.75,
|
|
821
|
+
stopColor: y.color
|
|
822
|
+
}),
|
|
823
|
+
/* @__PURE__ */ i("stop", {
|
|
824
|
+
offset: 1,
|
|
825
|
+
stopColor: M(y.color, gr, 0.25)
|
|
826
|
+
})
|
|
827
|
+
]
|
|
828
|
+
}, v))
|
|
829
|
+
] }),
|
|
830
|
+
f.map(({ key: v, index: y, paint: $, slice: R }) => R === null ? null : /* @__PURE__ */ k("g", {
|
|
831
|
+
opacity: $.opacity,
|
|
832
|
+
children: [/* @__PURE__ */ i("path", {
|
|
833
|
+
d: R.path,
|
|
834
|
+
fill: `url(#${s}-${y})`,
|
|
835
|
+
fillOpacity: $.fillOpacity,
|
|
836
|
+
stroke: n === "hovered" ? $.edge : "none",
|
|
837
|
+
strokeWidth: $.edgeWidth
|
|
838
|
+
}), /* @__PURE__ */ i("path", {
|
|
839
|
+
d: R.gills,
|
|
840
|
+
stroke: M($.color, yt, 0.6),
|
|
841
|
+
strokeWidth: 0.7,
|
|
842
|
+
strokeOpacity: 0.85
|
|
843
|
+
})]
|
|
844
|
+
}, v)),
|
|
845
|
+
w && /* @__PURE__ */ k("g", { children: [/* @__PURE__ */ i("circle", {
|
|
846
|
+
cx: e.width / 2,
|
|
847
|
+
cy: e.height / 2,
|
|
848
|
+
r: p * $t,
|
|
849
|
+
fill: `url(#${h})`
|
|
850
|
+
}), /* @__PURE__ */ i("circle", {
|
|
851
|
+
cx: e.width / 2,
|
|
852
|
+
cy: e.height / 2,
|
|
853
|
+
r: p * $t,
|
|
854
|
+
fill: `url(#${c})`
|
|
855
|
+
})] })
|
|
856
|
+
]
|
|
857
|
+
});
|
|
858
|
+
}, fr = W("bar", {
|
|
859
|
+
coord: "polar",
|
|
860
|
+
guideMode: "band",
|
|
861
|
+
swatchShape: "slice",
|
|
862
|
+
render: ({ layer: t, panelRect: r, intro: e }) => /* @__PURE__ */ i(wt, {
|
|
863
|
+
layer: t,
|
|
864
|
+
observations: t.data,
|
|
865
|
+
panel: r,
|
|
866
|
+
intro: e
|
|
867
|
+
}),
|
|
868
|
+
renderHover: ({ layer: t, primary: r, panelRect: e }) => /* @__PURE__ */ i(wt, {
|
|
869
|
+
layer: t,
|
|
870
|
+
observations: [r.observation],
|
|
871
|
+
panel: e,
|
|
872
|
+
state: "hovered"
|
|
873
|
+
}),
|
|
874
|
+
renderHoverCompanions: () => null
|
|
875
|
+
}), mr = [
|
|
876
|
+
qe,
|
|
877
|
+
fr,
|
|
878
|
+
or,
|
|
879
|
+
ar,
|
|
880
|
+
_e,
|
|
881
|
+
Ie,
|
|
882
|
+
dr,
|
|
883
|
+
lr
|
|
884
|
+
], Zt = "'ESBuild', 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif", nt = "'PPMori', 'Inter', ui-sans-serif, system-ui, sans-serif", A = {
|
|
885
|
+
sky: "#84C1FA",
|
|
886
|
+
haze: "#AFE7FC",
|
|
887
|
+
mist: "#E8EEFC",
|
|
888
|
+
ground: "#FFFFFF",
|
|
889
|
+
raised: "#FFFFFF",
|
|
890
|
+
text: "#002253",
|
|
891
|
+
secondary: "#4B5A78",
|
|
892
|
+
accent: "#0540AD",
|
|
893
|
+
rule: "rgba(0, 34, 83, 0.55)",
|
|
894
|
+
grid: "rgba(255, 255, 255, 0.75)"
|
|
895
|
+
}, I = {
|
|
896
|
+
coral: "#FF5D73",
|
|
897
|
+
violet: "#6B5BE2",
|
|
898
|
+
pink: "#F26DB5",
|
|
899
|
+
orange: "#FF9A3C",
|
|
900
|
+
purple: "#B05CE0",
|
|
901
|
+
teal: "#1FA88A"
|
|
902
|
+
}, vr = [
|
|
903
|
+
I.coral,
|
|
904
|
+
I.violet,
|
|
905
|
+
I.pink,
|
|
906
|
+
I.orange,
|
|
907
|
+
I.purple,
|
|
908
|
+
I.teal
|
|
909
|
+
], Ar = [
|
|
910
|
+
"#FBD7E1",
|
|
911
|
+
"#FF5D73",
|
|
912
|
+
"#6B5BE2"
|
|
913
|
+
], O = { textColor: A.text }, B = { textColor: A.secondary }, ut = { fontFamily: Zt }, kr = {
|
|
914
|
+
tokens: {
|
|
915
|
+
graphBackground: A.mist,
|
|
916
|
+
graphBorder: A.rule,
|
|
917
|
+
geom: I.coral,
|
|
918
|
+
geomBorder: A.secondary,
|
|
919
|
+
textPrimary: A.text,
|
|
920
|
+
textSecondary: A.secondary,
|
|
921
|
+
ruleLine: A.text,
|
|
922
|
+
gridLine: A.grid,
|
|
923
|
+
hoverAffordance: A.text,
|
|
924
|
+
hoverGuideFill: "rgba(255, 255, 255, 0.35)",
|
|
925
|
+
hoverGuideLine: A.rule,
|
|
926
|
+
tooltipBackground: A.raised,
|
|
927
|
+
tooltipBorder: "rgba(0, 34, 83, 0.15)",
|
|
928
|
+
tooltipPrimaryRow: "rgba(5, 64, 173, 0.08)",
|
|
929
|
+
annotationShape: A.accent,
|
|
930
|
+
annotationArrow: A.text,
|
|
931
|
+
differenceLabelBackground: A.raised
|
|
932
|
+
},
|
|
933
|
+
defaults: [
|
|
934
|
+
l.graph({
|
|
935
|
+
fill: {
|
|
936
|
+
gradient: "linear",
|
|
937
|
+
angle: 180,
|
|
938
|
+
stops: [
|
|
939
|
+
{
|
|
940
|
+
offset: 0,
|
|
941
|
+
color: A.sky
|
|
942
|
+
},
|
|
943
|
+
{
|
|
944
|
+
offset: 0.45,
|
|
945
|
+
color: A.haze
|
|
946
|
+
},
|
|
947
|
+
{
|
|
948
|
+
offset: 0.85,
|
|
949
|
+
color: A.mist
|
|
950
|
+
},
|
|
951
|
+
{
|
|
952
|
+
offset: 1,
|
|
953
|
+
color: A.ground
|
|
954
|
+
}
|
|
955
|
+
]
|
|
956
|
+
},
|
|
957
|
+
strokeWidth: 0,
|
|
958
|
+
cornerRadius: 16,
|
|
959
|
+
fontFamily: nt,
|
|
960
|
+
padding: 28
|
|
961
|
+
}),
|
|
962
|
+
l.geom({ shadow: "none" }, { state: "hovered" }),
|
|
963
|
+
l.geom.bar({
|
|
964
|
+
stroke: A.text,
|
|
965
|
+
strokeWidth: 0
|
|
966
|
+
}),
|
|
967
|
+
l.geom.bar({ strokeWidth: 1.5 }, { state: "hovered" }),
|
|
968
|
+
l.geom.line({
|
|
969
|
+
strokeWidth: 3,
|
|
970
|
+
dashArray: [],
|
|
971
|
+
lineCap: "round",
|
|
972
|
+
lineJoin: "round"
|
|
973
|
+
}),
|
|
974
|
+
l.geom.area({
|
|
975
|
+
fillAlpha: 0.8,
|
|
976
|
+
strokeWidth: 2,
|
|
977
|
+
dashArray: []
|
|
978
|
+
}),
|
|
979
|
+
l.geom.point({
|
|
980
|
+
size: 10,
|
|
981
|
+
stroke: A.text
|
|
982
|
+
}),
|
|
983
|
+
l.geom.tile({
|
|
984
|
+
cornerRadius: 8,
|
|
985
|
+
stroke: A.ground,
|
|
986
|
+
strokeWidth: 2
|
|
987
|
+
}),
|
|
988
|
+
l.geom.tile({
|
|
989
|
+
stroke: A.text,
|
|
990
|
+
strokeWidth: 1.5
|
|
991
|
+
}, { state: "hovered" }),
|
|
992
|
+
l.geom.rule({
|
|
993
|
+
strokeWidth: 1.5,
|
|
994
|
+
dashArray: [5, 4]
|
|
995
|
+
}),
|
|
996
|
+
l.geom.rule.label({
|
|
997
|
+
...O,
|
|
998
|
+
fontWeight: 600,
|
|
999
|
+
fontSize: 13
|
|
1000
|
+
}),
|
|
1001
|
+
l.gridLine({ dashArray: [] }),
|
|
1002
|
+
l.gridLine.x({ strokeWidth: 0 }),
|
|
1003
|
+
l.gridLine.y({ strokeWidth: 1.5 }),
|
|
1004
|
+
l.panelBorder({ strokeWidth: 0 }),
|
|
1005
|
+
l.panelBorder.bottom({
|
|
1006
|
+
stroke: A.text,
|
|
1007
|
+
strokeWidth: 1.5,
|
|
1008
|
+
dashArray: []
|
|
1009
|
+
}),
|
|
1010
|
+
l.tickLine({ strokeWidth: 0 }),
|
|
1011
|
+
l.tickLabel({
|
|
1012
|
+
...B,
|
|
1013
|
+
fontWeight: 500,
|
|
1014
|
+
fontSize: 13,
|
|
1015
|
+
lineHeight: 1
|
|
1016
|
+
}),
|
|
1017
|
+
l.axisLabel({
|
|
1018
|
+
...B,
|
|
1019
|
+
fontWeight: 600,
|
|
1020
|
+
fontSize: 13,
|
|
1021
|
+
lineHeight: 1
|
|
1022
|
+
}),
|
|
1023
|
+
l.heading({
|
|
1024
|
+
...O,
|
|
1025
|
+
...ut
|
|
1026
|
+
}),
|
|
1027
|
+
l.heading.h1({
|
|
1028
|
+
fontWeight: 800,
|
|
1029
|
+
fontSize: 30,
|
|
1030
|
+
lineHeight: 1.1,
|
|
1031
|
+
letterSpacing: -0.8
|
|
1032
|
+
}),
|
|
1033
|
+
l.heading.h2({
|
|
1034
|
+
...B,
|
|
1035
|
+
fontFamily: nt,
|
|
1036
|
+
fontWeight: 400,
|
|
1037
|
+
fontSize: 16,
|
|
1038
|
+
lineHeight: 1.35
|
|
1039
|
+
}),
|
|
1040
|
+
l.caption({
|
|
1041
|
+
...B,
|
|
1042
|
+
fontWeight: 400,
|
|
1043
|
+
fontSize: 13
|
|
1044
|
+
}),
|
|
1045
|
+
l.source({
|
|
1046
|
+
...B,
|
|
1047
|
+
fontWeight: 400,
|
|
1048
|
+
fontSize: 12
|
|
1049
|
+
}),
|
|
1050
|
+
l.dataLabel({
|
|
1051
|
+
...O,
|
|
1052
|
+
fontWeight: 600,
|
|
1053
|
+
fontSize: 13,
|
|
1054
|
+
fill: "transparent"
|
|
1055
|
+
}),
|
|
1056
|
+
l.legendItem({
|
|
1057
|
+
...O,
|
|
1058
|
+
fontWeight: 500,
|
|
1059
|
+
fontSize: 13,
|
|
1060
|
+
fill: "transparent",
|
|
1061
|
+
stroke: "transparent"
|
|
1062
|
+
}),
|
|
1063
|
+
l.directLabel({
|
|
1064
|
+
fontWeight: 600,
|
|
1065
|
+
fontSize: 13
|
|
1066
|
+
}),
|
|
1067
|
+
l.headlineItem.number({
|
|
1068
|
+
...ut,
|
|
1069
|
+
fontWeight: 800,
|
|
1070
|
+
fontSize: 32,
|
|
1071
|
+
lineHeight: 1.1
|
|
1072
|
+
}),
|
|
1073
|
+
l.tooltip({
|
|
1074
|
+
strokeWidth: 1,
|
|
1075
|
+
cornerRadius: 12,
|
|
1076
|
+
paddingInline: 12,
|
|
1077
|
+
paddingBlock: 9
|
|
1078
|
+
}),
|
|
1079
|
+
l.tooltip.heading({
|
|
1080
|
+
...O,
|
|
1081
|
+
...ut,
|
|
1082
|
+
fontWeight: 700,
|
|
1083
|
+
fontSize: 14,
|
|
1084
|
+
lineHeight: 1.3
|
|
1085
|
+
}),
|
|
1086
|
+
l.tooltip.label({
|
|
1087
|
+
...B,
|
|
1088
|
+
fontWeight: 400,
|
|
1089
|
+
fontSize: 13,
|
|
1090
|
+
lineHeight: 1.35
|
|
1091
|
+
}),
|
|
1092
|
+
l.tooltip.value({
|
|
1093
|
+
...O,
|
|
1094
|
+
fontWeight: 600,
|
|
1095
|
+
fontSize: 13,
|
|
1096
|
+
lineHeight: 1.35
|
|
1097
|
+
}),
|
|
1098
|
+
l.legend.popover({ cornerRadius: 12 }),
|
|
1099
|
+
l.annotation.text({
|
|
1100
|
+
...O,
|
|
1101
|
+
fill: A.raised,
|
|
1102
|
+
stroke: "rgba(0, 34, 83, 0.15)",
|
|
1103
|
+
strokeWidth: 1,
|
|
1104
|
+
cornerRadius: 10,
|
|
1105
|
+
paddingInline: 10,
|
|
1106
|
+
paddingBlock: 5,
|
|
1107
|
+
fontSize: 13,
|
|
1108
|
+
lineHeight: 1.3
|
|
1109
|
+
}),
|
|
1110
|
+
l.annotation.shape({
|
|
1111
|
+
fillAlpha: 0.12,
|
|
1112
|
+
stroke: A.accent,
|
|
1113
|
+
strokeWidth: 1
|
|
1114
|
+
}),
|
|
1115
|
+
l.annotation.arrow({
|
|
1116
|
+
strokeWidth: 1.5,
|
|
1117
|
+
dashArray: []
|
|
1118
|
+
}),
|
|
1119
|
+
l.annotation.differenceArrow({
|
|
1120
|
+
stroke: A.accent,
|
|
1121
|
+
strokeWidth: 1.5
|
|
1122
|
+
}),
|
|
1123
|
+
l.annotation.differenceArrow.label({
|
|
1124
|
+
...O,
|
|
1125
|
+
fill: A.raised,
|
|
1126
|
+
stroke: "rgba(0, 34, 83, 0.15)",
|
|
1127
|
+
strokeWidth: 1,
|
|
1128
|
+
cornerRadius: 10,
|
|
1129
|
+
fontWeight: 600,
|
|
1130
|
+
fontSize: 13
|
|
1131
|
+
}),
|
|
1132
|
+
l.panelBorder.bottom({ strokeWidth: 0 }, { coord: "polar" }),
|
|
1133
|
+
l.tickLabel({
|
|
1134
|
+
...O,
|
|
1135
|
+
fontWeight: 700,
|
|
1136
|
+
textOutlineColor: A.ground,
|
|
1137
|
+
textOutlineWidth: 3
|
|
1138
|
+
}, { coord: "polar" })
|
|
1139
|
+
]
|
|
1140
|
+
}, on = {
|
|
1141
|
+
name: "gamma-mushroom",
|
|
1142
|
+
styles: kr,
|
|
1143
|
+
palette: vr,
|
|
1144
|
+
colormap: Ar,
|
|
1145
|
+
colorScheme: "light",
|
|
1146
|
+
plugins: mr
|
|
1147
|
+
}, Sr = 0.92, $r = 0.38, dt = ({ idFor: t, colors: r, panel: e, fall: n, strength: o = 1 }) => /* @__PURE__ */ i("defs", { children: [...new Set(r)].map((a) => /* @__PURE__ */ k("linearGradient", {
|
|
1148
|
+
id: t(a),
|
|
1149
|
+
gradientUnits: "userSpaceOnUse",
|
|
1150
|
+
x1: n === "left" ? e.width : 0,
|
|
1151
|
+
y1: 0,
|
|
1152
|
+
x2: 0,
|
|
1153
|
+
y2: n === "down" ? e.height : 0,
|
|
1154
|
+
children: [/* @__PURE__ */ i("stop", {
|
|
1155
|
+
offset: 0,
|
|
1156
|
+
stopColor: a,
|
|
1157
|
+
stopOpacity: Sr * o
|
|
1158
|
+
}), /* @__PURE__ */ i("stop", {
|
|
1159
|
+
offset: 1,
|
|
1160
|
+
stopColor: a,
|
|
1161
|
+
stopOpacity: $r * o
|
|
1162
|
+
})]
|
|
1163
|
+
}, a)) }), yr = 0.18, Rr = 2.2, wr = 0.35, xt = "#FFFFFF", xr = (t, r, e) => {
|
|
1164
|
+
const n = e * yr;
|
|
1165
|
+
return [
|
|
1166
|
+
`M${t},${r - e}`,
|
|
1167
|
+
`Q${t + n},${r - n} ${t + e},${r}`,
|
|
1168
|
+
`Q${t + n},${r + n} ${t},${r + e}`,
|
|
1169
|
+
`Q${t - n},${r + n} ${t - e},${r}`,
|
|
1170
|
+
`Q${t - n},${r - n} ${t},${r - e}`,
|
|
1171
|
+
"Z"
|
|
1172
|
+
].join(" ");
|
|
1173
|
+
}, lt = ({ cx: t, cy: r, reach: e, color: n, opacity: o = 1 }) => {
|
|
1174
|
+
const a = H("halo");
|
|
1175
|
+
return /* @__PURE__ */ k("g", {
|
|
1176
|
+
opacity: o,
|
|
1177
|
+
children: [
|
|
1178
|
+
/* @__PURE__ */ i("defs", { children: /* @__PURE__ */ k("radialGradient", {
|
|
1179
|
+
id: a,
|
|
1180
|
+
children: [/* @__PURE__ */ i("stop", {
|
|
1181
|
+
offset: 0,
|
|
1182
|
+
stopColor: n,
|
|
1183
|
+
stopOpacity: wr
|
|
1184
|
+
}), /* @__PURE__ */ i("stop", {
|
|
1185
|
+
offset: 1,
|
|
1186
|
+
stopColor: n,
|
|
1187
|
+
stopOpacity: 0
|
|
1188
|
+
})]
|
|
1189
|
+
}) }),
|
|
1190
|
+
/* @__PURE__ */ i("circle", {
|
|
1191
|
+
cx: t,
|
|
1192
|
+
cy: r,
|
|
1193
|
+
r: e * Rr,
|
|
1194
|
+
fill: `url(#${a})`
|
|
1195
|
+
}),
|
|
1196
|
+
/* @__PURE__ */ i("path", {
|
|
1197
|
+
d: xr(t, r, e),
|
|
1198
|
+
fill: M(n, xt, 0.55)
|
|
1199
|
+
}),
|
|
1200
|
+
/* @__PURE__ */ i("circle", {
|
|
1201
|
+
cx: t,
|
|
1202
|
+
cy: r,
|
|
1203
|
+
r: Math.max(0.8, e * 0.16),
|
|
1204
|
+
fill: xt
|
|
1205
|
+
})
|
|
1206
|
+
]
|
|
1207
|
+
});
|
|
1208
|
+
}, Cr = 1.5, Wr = 10, Qt = ({ layer: t, coordSystem: r, panel: e }) => {
|
|
1209
|
+
const n = E(t), o = Y("night-area"), a = C(() => {
|
|
1210
|
+
if (r === void 0) return L(t, (d) => it(d, e)).map((d) => ({
|
|
1211
|
+
...d,
|
|
1212
|
+
fill: d.path,
|
|
1213
|
+
edge: d.path
|
|
1214
|
+
}));
|
|
1215
|
+
const { areaGenerator: s, lineGenerator: h } = Et(r, t.params), c = /* @__PURE__ */ new Map();
|
|
1216
|
+
return L(t, (d) => {
|
|
1217
|
+
const u = Lt(d, t.params.missingValues), g = s(u), p = h(u);
|
|
1218
|
+
if (!g) return null;
|
|
1219
|
+
const f = N(g, e);
|
|
1220
|
+
return p && c.set(f, N(p, e)), f;
|
|
1221
|
+
}).map((d) => ({
|
|
1222
|
+
...d,
|
|
1223
|
+
fill: d.path,
|
|
1224
|
+
edge: c.get(d.path) ?? ""
|
|
1225
|
+
}));
|
|
1226
|
+
}, [
|
|
1227
|
+
t,
|
|
1228
|
+
r,
|
|
1229
|
+
e
|
|
1230
|
+
]);
|
|
1231
|
+
return e.width <= 0 || e.height <= 0 ? null : /* @__PURE__ */ k("g", {
|
|
1232
|
+
"data-geom": "area",
|
|
1233
|
+
children: [/* @__PURE__ */ i(dt, {
|
|
1234
|
+
idFor: o,
|
|
1235
|
+
colors: a.map(({ observation: s }) => n(s).color),
|
|
1236
|
+
panel: e,
|
|
1237
|
+
fall: r?.mainAxis === "y" ? "left" : "down"
|
|
1238
|
+
}), a.map(({ key: s, observation: h, fill: c, edge: d }) => {
|
|
1239
|
+
const u = n(h);
|
|
1240
|
+
return /* @__PURE__ */ k("g", {
|
|
1241
|
+
opacity: u.opacity,
|
|
1242
|
+
children: [/* @__PURE__ */ i("path", {
|
|
1243
|
+
d: c,
|
|
1244
|
+
fill: `url(#${o(u.color)})`,
|
|
1245
|
+
fillOpacity: u.fillOpacity
|
|
1246
|
+
}), /* @__PURE__ */ i("path", {
|
|
1247
|
+
d,
|
|
1248
|
+
fill: "none",
|
|
1249
|
+
stroke: u.color,
|
|
1250
|
+
strokeWidth: Cr,
|
|
1251
|
+
strokeLinejoin: "round"
|
|
1252
|
+
})]
|
|
1253
|
+
}, s);
|
|
1254
|
+
})]
|
|
1255
|
+
});
|
|
1256
|
+
}, qt = ({ layer: t, observation: r, panel: e, project: n }) => {
|
|
1257
|
+
const o = E(t)(r, "hovered"), a = n(r, e);
|
|
1258
|
+
return a === null ? null : /* @__PURE__ */ i("g", {
|
|
1259
|
+
"data-geom": "area",
|
|
1260
|
+
children: /* @__PURE__ */ i(lt, {
|
|
1261
|
+
cx: a.x,
|
|
1262
|
+
cy: a.y,
|
|
1263
|
+
reach: Wr,
|
|
1264
|
+
color: o.color,
|
|
1265
|
+
opacity: o.opacity
|
|
1266
|
+
})
|
|
1267
|
+
});
|
|
1268
|
+
}, Fr = W("area", {
|
|
1269
|
+
coord: "cartesian",
|
|
1270
|
+
guideMode: "crosshair",
|
|
1271
|
+
swatchShape: "area",
|
|
1272
|
+
render: ({ layer: t, coordSystem: r, panelRect: e, intro: n }) => r.type !== "cartesian" ? null : /* @__PURE__ */ i(U, {
|
|
1273
|
+
intro: n,
|
|
1274
|
+
children: /* @__PURE__ */ i(Qt, {
|
|
1275
|
+
layer: t,
|
|
1276
|
+
coordSystem: r,
|
|
1277
|
+
panel: e
|
|
1278
|
+
})
|
|
1279
|
+
}),
|
|
1280
|
+
renderHover: ({ layer: t, primary: r, panelRect: e }) => /* @__PURE__ */ i(qt, {
|
|
1281
|
+
layer: t,
|
|
1282
|
+
observation: r.observation,
|
|
1283
|
+
panel: e,
|
|
1284
|
+
project: j
|
|
1285
|
+
}),
|
|
1286
|
+
renderHoverCompanions: () => null
|
|
1287
|
+
}), Hr = W("area", {
|
|
1288
|
+
coord: "polar",
|
|
1289
|
+
guideMode: "crosshair",
|
|
1290
|
+
swatchShape: "area",
|
|
1291
|
+
render: ({ layer: t, panelRect: r, intro: e }) => /* @__PURE__ */ i(U, {
|
|
1292
|
+
intro: e,
|
|
1293
|
+
children: /* @__PURE__ */ i(Qt, {
|
|
1294
|
+
layer: t,
|
|
1295
|
+
panel: r
|
|
1296
|
+
})
|
|
1297
|
+
}),
|
|
1298
|
+
renderHover: ({ layer: t, primary: r, panelRect: e }) => /* @__PURE__ */ i(qt, {
|
|
1299
|
+
layer: t,
|
|
1300
|
+
observation: r.observation,
|
|
1301
|
+
panel: e,
|
|
1302
|
+
project: T
|
|
1303
|
+
}),
|
|
1304
|
+
renderHoverCompanions: () => null
|
|
1305
|
+
}), Er = 3, J = 0.5523, br = (t) => {
|
|
1306
|
+
const { breadth: r, length: e, endsStack: n } = t, o = n ? Math.min(6, r / 2, e) : 0;
|
|
1307
|
+
return o === 0 ? D(t, [
|
|
1308
|
+
[[0, 0]],
|
|
1309
|
+
[[0, e]],
|
|
1310
|
+
[[r, e]],
|
|
1311
|
+
[[r, 0]]
|
|
1312
|
+
]) : D(t, [
|
|
1313
|
+
[[0, 0]],
|
|
1314
|
+
[[0, e - o]],
|
|
1315
|
+
[
|
|
1316
|
+
[0, e - o + o * J],
|
|
1317
|
+
[o - o * J, e],
|
|
1318
|
+
[o, e]
|
|
1319
|
+
],
|
|
1320
|
+
[[r - o, e]],
|
|
1321
|
+
[
|
|
1322
|
+
[r - o + o * J, e],
|
|
1323
|
+
[r, e - o + o * J],
|
|
1324
|
+
[r, e - o]
|
|
1325
|
+
],
|
|
1326
|
+
[[r, 0]]
|
|
1327
|
+
]);
|
|
1328
|
+
}, Ct = ({ layer: t, observations: r, mainAxis: e, panel: n, state: o, intro: a }) => {
|
|
1329
|
+
const s = E(t), h = Y("night-bar"), c = C(() => _(t.data, t.mapping, t.id), [
|
|
1330
|
+
t.data,
|
|
1331
|
+
t.mapping,
|
|
1332
|
+
t.id
|
|
1333
|
+
]), { plan: d, readGrowth: u } = K(a);
|
|
1334
|
+
if (n.width <= 0 || n.height <= 0) return null;
|
|
1335
|
+
const g = [...r].map((p) => ({
|
|
1336
|
+
key: c(p),
|
|
1337
|
+
paint: s(p, o),
|
|
1338
|
+
frame: jt(p, e, n, Er, d === null ? void 0 : {
|
|
1339
|
+
baseline: d.baseline,
|
|
1340
|
+
growth: u(c(p))
|
|
1341
|
+
})
|
|
1342
|
+
}));
|
|
1343
|
+
return /* @__PURE__ */ k("g", {
|
|
1344
|
+
"data-geom": "bar",
|
|
1345
|
+
children: [/* @__PURE__ */ i(dt, {
|
|
1346
|
+
idFor: h,
|
|
1347
|
+
colors: g.map(({ paint: p }) => p.color),
|
|
1348
|
+
panel: n,
|
|
1349
|
+
fall: e === "x" ? "down" : "left"
|
|
1350
|
+
}), g.map(({ key: p, paint: f, frame: S }) => S === null ? null : /* @__PURE__ */ i("path", {
|
|
1351
|
+
d: br(S),
|
|
1352
|
+
fill: `url(#${h(f.color)})`,
|
|
1353
|
+
fillOpacity: f.fillOpacity,
|
|
1354
|
+
opacity: f.opacity,
|
|
1355
|
+
stroke: o === "hovered" ? f.edge : "none",
|
|
1356
|
+
strokeWidth: f.edgeWidth
|
|
1357
|
+
}, p))]
|
|
1358
|
+
});
|
|
1359
|
+
}, Or = W("bar", {
|
|
1360
|
+
coord: "cartesian",
|
|
1361
|
+
guideMode: "band",
|
|
1362
|
+
swatchShape: "square",
|
|
1363
|
+
render: ({ layer: t, coordSystem: r, panelRect: e, intro: n }) => /* @__PURE__ */ i(Ct, {
|
|
1364
|
+
layer: t,
|
|
1365
|
+
observations: t.data,
|
|
1366
|
+
mainAxis: et(r),
|
|
1367
|
+
panel: e,
|
|
1368
|
+
intro: n
|
|
1369
|
+
}),
|
|
1370
|
+
renderHover: ({ layer: t, coordSystem: r, primary: e, panelRect: n }) => /* @__PURE__ */ i(Ct, {
|
|
1371
|
+
layer: t,
|
|
1372
|
+
observations: [e.observation],
|
|
1373
|
+
mainAxis: et(r),
|
|
1374
|
+
panel: n,
|
|
1375
|
+
state: "hovered"
|
|
1376
|
+
}),
|
|
1377
|
+
renderHoverCompanions: () => null
|
|
1378
|
+
}), Pr = 4, Mr = 6, Lr = 10, _r = ({ layer: t, panel: r, coord: e, project: n }) => {
|
|
1379
|
+
const o = at(t), a = Y("night-line"), s = C(() => {
|
|
1380
|
+
if (e === "polar") return L(t, (d) => it(d, r));
|
|
1381
|
+
const c = bt(t.params);
|
|
1382
|
+
return L(t, (d) => {
|
|
1383
|
+
const u = c(_t(d, t.params.missingValues));
|
|
1384
|
+
return u ? N(u, r) : null;
|
|
1385
|
+
});
|
|
1386
|
+
}, [
|
|
1387
|
+
t,
|
|
1388
|
+
r,
|
|
1389
|
+
e
|
|
1390
|
+
]), h = C(() => Tt(t, r, n), [
|
|
1391
|
+
t,
|
|
1392
|
+
r,
|
|
1393
|
+
n
|
|
1394
|
+
]);
|
|
1395
|
+
return r.width <= 0 || r.height <= 0 ? null : /* @__PURE__ */ k("g", {
|
|
1396
|
+
"data-geom": "line",
|
|
1397
|
+
children: [
|
|
1398
|
+
/* @__PURE__ */ i(dt, {
|
|
1399
|
+
idFor: a,
|
|
1400
|
+
colors: s.map(({ observation: c }) => o(c).color),
|
|
1401
|
+
panel: r,
|
|
1402
|
+
fall: "down",
|
|
1403
|
+
strength: 0.75
|
|
1404
|
+
}),
|
|
1405
|
+
s.map(({ key: c, path: d, observation: u }) => {
|
|
1406
|
+
const g = o(u);
|
|
1407
|
+
return /* @__PURE__ */ k("g", {
|
|
1408
|
+
opacity: g.opacity,
|
|
1409
|
+
fill: "none",
|
|
1410
|
+
strokeLinecap: "round",
|
|
1411
|
+
strokeLinejoin: "round",
|
|
1412
|
+
children: [/* @__PURE__ */ i("path", {
|
|
1413
|
+
d,
|
|
1414
|
+
stroke: `url(#${a(g.color)})`,
|
|
1415
|
+
strokeWidth: g.width * Pr
|
|
1416
|
+
}), /* @__PURE__ */ i("path", {
|
|
1417
|
+
d,
|
|
1418
|
+
stroke: g.color,
|
|
1419
|
+
strokeWidth: g.width * 0.6,
|
|
1420
|
+
strokeDasharray: g.dashArray
|
|
1421
|
+
})]
|
|
1422
|
+
}, c);
|
|
1423
|
+
}),
|
|
1424
|
+
h.map(({ key: c, observation: d, point: u }) => /* @__PURE__ */ i(lt, {
|
|
1425
|
+
cx: u.x,
|
|
1426
|
+
cy: u.y,
|
|
1427
|
+
reach: Mr,
|
|
1428
|
+
color: o(d).color
|
|
1429
|
+
}, c))
|
|
1430
|
+
]
|
|
1431
|
+
});
|
|
1432
|
+
}, Ir = ({ layer: t, observation: r, panel: e, project: n }) => {
|
|
1433
|
+
const o = at(t)(r, "hovered"), a = n(r, e);
|
|
1434
|
+
return a === null ? null : /* @__PURE__ */ i("g", {
|
|
1435
|
+
"data-geom": "line",
|
|
1436
|
+
children: /* @__PURE__ */ i(lt, {
|
|
1437
|
+
cx: a.x,
|
|
1438
|
+
cy: a.y,
|
|
1439
|
+
reach: Lr,
|
|
1440
|
+
color: o.color,
|
|
1441
|
+
opacity: o.opacity
|
|
1442
|
+
})
|
|
1443
|
+
});
|
|
1444
|
+
}, Jt = (t, r) => W("line", {
|
|
1445
|
+
coord: t,
|
|
1446
|
+
guideMode: "crosshair",
|
|
1447
|
+
swatchShape: "line",
|
|
1448
|
+
render: ({ layer: e, panelRect: n, intro: o }) => /* @__PURE__ */ i(U, {
|
|
1449
|
+
intro: o,
|
|
1450
|
+
children: /* @__PURE__ */ i(_r, {
|
|
1451
|
+
layer: e,
|
|
1452
|
+
panel: n,
|
|
1453
|
+
coord: t,
|
|
1454
|
+
project: r
|
|
1455
|
+
})
|
|
1456
|
+
}),
|
|
1457
|
+
renderHover: ({ layer: e, primary: n, panelRect: o }) => /* @__PURE__ */ i(Ir, {
|
|
1458
|
+
layer: e,
|
|
1459
|
+
observation: n.observation,
|
|
1460
|
+
panel: o,
|
|
1461
|
+
project: r
|
|
1462
|
+
}),
|
|
1463
|
+
renderHoverCompanions: () => null,
|
|
1464
|
+
getOverlayAnchor: ({ observation: e }) => {
|
|
1465
|
+
const n = V(e), o = X(e);
|
|
1466
|
+
return n === null || o === null ? null : {
|
|
1467
|
+
x: n,
|
|
1468
|
+
y: o
|
|
1469
|
+
};
|
|
1470
|
+
}
|
|
1471
|
+
}), Tr = Jt("cartesian", j), Br = Jt("polar", T), Gr = 0.85, zr = 5, Wt = ({ layer: t, observations: r, panel: e, project: n, state: o, intro: a }) => {
|
|
1472
|
+
const s = ot(t), h = E(t), c = C(() => _(t.data, t.mapping, t.id), [
|
|
1473
|
+
t.data,
|
|
1474
|
+
t.mapping,
|
|
1475
|
+
t.id
|
|
1476
|
+
]), d = o === "hovered" ? zr : 0, { readGrowth: u } = K(a);
|
|
1477
|
+
return /* @__PURE__ */ i("g", {
|
|
1478
|
+
"data-geom": "point",
|
|
1479
|
+
children: Array.from(r, (g) => {
|
|
1480
|
+
const p = n(g, e);
|
|
1481
|
+
if (p === null) return null;
|
|
1482
|
+
const f = h(g, o), S = c(g);
|
|
1483
|
+
return /* @__PURE__ */ i(lt, {
|
|
1484
|
+
cx: p.x,
|
|
1485
|
+
cy: p.y,
|
|
1486
|
+
reach: (s.get("size", g, o) + d) * u(S) * Gr,
|
|
1487
|
+
color: f.color,
|
|
1488
|
+
opacity: f.opacity
|
|
1489
|
+
}, S);
|
|
1490
|
+
})
|
|
1491
|
+
});
|
|
1492
|
+
}, te = (t, r) => W("point", {
|
|
1493
|
+
coord: t,
|
|
1494
|
+
swatchShape: "circle",
|
|
1495
|
+
render: ({ layer: e, panelRect: n, intro: o }) => /* @__PURE__ */ i(Wt, {
|
|
1496
|
+
layer: e,
|
|
1497
|
+
observations: e.data,
|
|
1498
|
+
panel: n,
|
|
1499
|
+
project: r,
|
|
1500
|
+
intro: o
|
|
1501
|
+
}),
|
|
1502
|
+
renderHover: ({ layer: e, primary: n, panelRect: o }) => /* @__PURE__ */ i(Wt, {
|
|
1503
|
+
layer: e,
|
|
1504
|
+
observations: [n.observation],
|
|
1505
|
+
panel: o,
|
|
1506
|
+
project: r,
|
|
1507
|
+
state: "hovered"
|
|
1508
|
+
}),
|
|
1509
|
+
renderHoverCompanions: () => null
|
|
1510
|
+
}), Dr = te("cartesian", j), Nr = te("polar", T), Kr = 4, Ur = 2, jr = 3, Vr = (t, r) => {
|
|
1511
|
+
if (t === null) return null;
|
|
1512
|
+
const { startAngle: e, endAngle: n, innerRadius: o, outerRadius: a } = t, s = Math.min(r.width, r.height) / 2, h = a * s;
|
|
1513
|
+
if (h <= 0 || s <= 0) return null;
|
|
1514
|
+
const c = Math.max(0, n - e), d = c >= 2 * Math.PI - 1e-6 ? 0 : Math.min(Kr / 2 / h, c / 4), u = o > 0 ? Math.min(a, o + Ur / s) : 0;
|
|
1515
|
+
return Ht({
|
|
1516
|
+
startAngle: e + d,
|
|
1517
|
+
endAngle: n - d,
|
|
1518
|
+
innerRadius: u,
|
|
1519
|
+
outerRadius: a
|
|
1520
|
+
}, {
|
|
1521
|
+
centerX: r.width / 2,
|
|
1522
|
+
centerY: r.height / 2,
|
|
1523
|
+
radius: s,
|
|
1524
|
+
digits: jr
|
|
1525
|
+
}) ?? null;
|
|
1526
|
+
}, Ft = ({ layer: t, observations: r, panel: e, state: n, intro: o }) => {
|
|
1527
|
+
const a = E(t), s = Y("night-slice"), h = C(() => _(t.data, t.mapping, t.id), [
|
|
1528
|
+
t.data,
|
|
1529
|
+
t.mapping,
|
|
1530
|
+
t.id
|
|
1531
|
+
]), { plan: c, readGrowth: d } = K(o);
|
|
1532
|
+
if (e.width <= 0 || e.height <= 0) return null;
|
|
1533
|
+
const u = [...r].map((g) => {
|
|
1534
|
+
const p = h(g);
|
|
1535
|
+
return {
|
|
1536
|
+
key: p,
|
|
1537
|
+
paint: a(g, n),
|
|
1538
|
+
path: Vr(Yt(g, c, d(p)), e)
|
|
1539
|
+
};
|
|
1540
|
+
});
|
|
1541
|
+
return /* @__PURE__ */ k("g", {
|
|
1542
|
+
"data-geom": "bar",
|
|
1543
|
+
children: [/* @__PURE__ */ i(dt, {
|
|
1544
|
+
idFor: s,
|
|
1545
|
+
colors: u.map(({ paint: g }) => g.color),
|
|
1546
|
+
panel: e,
|
|
1547
|
+
fall: "down"
|
|
1548
|
+
}), u.map(({ key: g, paint: p, path: f }) => f === null ? null : /* @__PURE__ */ i("path", {
|
|
1549
|
+
d: f,
|
|
1550
|
+
fill: `url(#${s(p.color)})`,
|
|
1551
|
+
fillOpacity: p.fillOpacity,
|
|
1552
|
+
opacity: p.opacity
|
|
1553
|
+
}, g))]
|
|
1554
|
+
});
|
|
1555
|
+
}, Xr = W("bar", {
|
|
1556
|
+
coord: "polar",
|
|
1557
|
+
guideMode: "band",
|
|
1558
|
+
swatchShape: "slice",
|
|
1559
|
+
render: ({ layer: t, panelRect: r, intro: e }) => /* @__PURE__ */ i(Ft, {
|
|
1560
|
+
layer: t,
|
|
1561
|
+
observations: t.data,
|
|
1562
|
+
panel: r,
|
|
1563
|
+
intro: e
|
|
1564
|
+
}),
|
|
1565
|
+
renderHover: ({ layer: t, primary: r, panelRect: e }) => /* @__PURE__ */ i(Ft, {
|
|
1566
|
+
layer: t,
|
|
1567
|
+
observations: [r.observation],
|
|
1568
|
+
panel: e,
|
|
1569
|
+
state: "hovered"
|
|
1570
|
+
}),
|
|
1571
|
+
renderHoverCompanions: () => null
|
|
1572
|
+
}), Yr = [
|
|
1573
|
+
Or,
|
|
1574
|
+
Xr,
|
|
1575
|
+
Tr,
|
|
1576
|
+
Br,
|
|
1577
|
+
Fr,
|
|
1578
|
+
Hr,
|
|
1579
|
+
Dr,
|
|
1580
|
+
Nr
|
|
1581
|
+
], Zr = 150, Qr = (t, r) => {
|
|
1582
|
+
const e = It(23), n = Array.from({ length: Zr }, () => {
|
|
1583
|
+
const a = e() * 100, s = e() ** 1.7 * 100, h = 0.35 + e() ** 3 * 1.1, c = (0.3 + e() * 0.65) * (1 - s / 140);
|
|
1584
|
+
return `<circle cx="${a.toFixed(2)}%" cy="${s.toFixed(2)}%" r="${h.toFixed(2)}" fill="${r}" fill-opacity="${c.toFixed(2)}"/>`;
|
|
1585
|
+
}), o = '<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><defs><linearGradient id="s" x1="0" y1="0" x2="0" y2="1">' + t.map(({ offset: a, color: s }) => `<stop offset="${a}" stop-color="${s}"/>`).join("") + '</linearGradient></defs><rect width="100%" height="100%" fill="url(#s)"/>' + n.join("") + "</svg>";
|
|
1586
|
+
return `data:image/svg+xml,${encodeURIComponent(o)}`;
|
|
1587
|
+
}, m = {
|
|
1588
|
+
zenith: "#122547",
|
|
1589
|
+
dusk: "#31347A",
|
|
1590
|
+
horizon: "#405199",
|
|
1591
|
+
raised: "#1B2A5C",
|
|
1592
|
+
text: "#EEF2FE",
|
|
1593
|
+
secondary: "#AAB5E6",
|
|
1594
|
+
rule: "rgba(170, 181, 230, 0.6)",
|
|
1595
|
+
grid: "rgba(170, 181, 230, 0.13)",
|
|
1596
|
+
star: "#FFFFFF"
|
|
1597
|
+
}, P = {
|
|
1598
|
+
wordmark: "#B9C3FF",
|
|
1599
|
+
sky: "#6CAEEE",
|
|
1600
|
+
petal: "#FF8FB8",
|
|
1601
|
+
mint: "#5FE0C1",
|
|
1602
|
+
gold: "#FFD66B",
|
|
1603
|
+
coral: "#FF8A65"
|
|
1604
|
+
}, qr = [
|
|
1605
|
+
P.wordmark,
|
|
1606
|
+
P.petal,
|
|
1607
|
+
P.mint,
|
|
1608
|
+
P.gold,
|
|
1609
|
+
P.sky,
|
|
1610
|
+
P.coral
|
|
1611
|
+
], Jr = [
|
|
1612
|
+
"#3A4A9C",
|
|
1613
|
+
"#6CAEEE",
|
|
1614
|
+
"#E8EEFC"
|
|
1615
|
+
], F = { textColor: m.text }, G = { textColor: m.secondary }, gt = { fontFamily: Zt }, tn = {
|
|
1616
|
+
tokens: {
|
|
1617
|
+
graphBackground: m.dusk,
|
|
1618
|
+
graphBorder: m.rule,
|
|
1619
|
+
geom: P.wordmark,
|
|
1620
|
+
geomBorder: m.secondary,
|
|
1621
|
+
textPrimary: m.text,
|
|
1622
|
+
textSecondary: m.secondary,
|
|
1623
|
+
ruleLine: m.rule,
|
|
1624
|
+
gridLine: m.grid,
|
|
1625
|
+
hoverAffordance: m.text,
|
|
1626
|
+
hoverGuideFill: "rgba(185, 195, 255, 0.08)",
|
|
1627
|
+
hoverGuideLine: m.rule,
|
|
1628
|
+
tooltipBackground: m.raised,
|
|
1629
|
+
tooltipBorder: m.rule,
|
|
1630
|
+
tooltipPrimaryRow: "rgba(185, 195, 255, 0.12)",
|
|
1631
|
+
annotationShape: P.gold,
|
|
1632
|
+
annotationArrow: m.text,
|
|
1633
|
+
differenceLabelBackground: m.raised
|
|
1634
|
+
},
|
|
1635
|
+
defaults: [
|
|
1636
|
+
l.graph({
|
|
1637
|
+
fill: {
|
|
1638
|
+
image: Qr([
|
|
1639
|
+
{
|
|
1640
|
+
offset: 0,
|
|
1641
|
+
color: m.zenith
|
|
1642
|
+
},
|
|
1643
|
+
{
|
|
1644
|
+
offset: 0.55,
|
|
1645
|
+
color: m.dusk
|
|
1646
|
+
},
|
|
1647
|
+
{
|
|
1648
|
+
offset: 1,
|
|
1649
|
+
color: m.horizon
|
|
1650
|
+
}
|
|
1651
|
+
], m.star),
|
|
1652
|
+
fit: "stretch",
|
|
1653
|
+
fallback: m.dusk
|
|
1654
|
+
},
|
|
1655
|
+
strokeWidth: 0,
|
|
1656
|
+
cornerRadius: 16,
|
|
1657
|
+
fontFamily: nt,
|
|
1658
|
+
padding: 28
|
|
1659
|
+
}),
|
|
1660
|
+
l.geom({ shadow: "none" }, { state: "hovered" }),
|
|
1661
|
+
l.geom.bar({
|
|
1662
|
+
stroke: m.text,
|
|
1663
|
+
strokeWidth: 0
|
|
1664
|
+
}),
|
|
1665
|
+
l.geom.bar({ strokeWidth: 1.5 }, { state: "hovered" }),
|
|
1666
|
+
l.geom.line({
|
|
1667
|
+
strokeWidth: 2.5,
|
|
1668
|
+
dashArray: [],
|
|
1669
|
+
lineCap: "round",
|
|
1670
|
+
lineJoin: "round"
|
|
1671
|
+
}),
|
|
1672
|
+
l.geom.area({
|
|
1673
|
+
fillAlpha: 0.75,
|
|
1674
|
+
strokeWidth: 1.5,
|
|
1675
|
+
dashArray: []
|
|
1676
|
+
}),
|
|
1677
|
+
l.geom.point({ size: 10 }),
|
|
1678
|
+
l.geom.tile({
|
|
1679
|
+
cornerRadius: 6,
|
|
1680
|
+
stroke: m.dusk,
|
|
1681
|
+
strokeWidth: 2
|
|
1682
|
+
}),
|
|
1683
|
+
l.geom.tile({
|
|
1684
|
+
stroke: m.text,
|
|
1685
|
+
strokeWidth: 1.5
|
|
1686
|
+
}, { state: "hovered" }),
|
|
1687
|
+
l.geom.rule({
|
|
1688
|
+
strokeWidth: 1,
|
|
1689
|
+
dashArray: [4, 4]
|
|
1690
|
+
}),
|
|
1691
|
+
l.geom.rule.label({
|
|
1692
|
+
...F,
|
|
1693
|
+
fontWeight: 500,
|
|
1694
|
+
fontSize: 13
|
|
1695
|
+
}),
|
|
1696
|
+
l.gridLine({ dashArray: [] }),
|
|
1697
|
+
l.gridLine.x({ strokeWidth: 0 }),
|
|
1698
|
+
l.gridLine.y({ strokeWidth: 1 }),
|
|
1699
|
+
l.panelBorder({ strokeWidth: 0 }),
|
|
1700
|
+
l.panelBorder.bottom({
|
|
1701
|
+
stroke: m.rule,
|
|
1702
|
+
strokeWidth: 1,
|
|
1703
|
+
dashArray: []
|
|
1704
|
+
}),
|
|
1705
|
+
l.tickLine({ strokeWidth: 0 }),
|
|
1706
|
+
l.tickLabel({
|
|
1707
|
+
...G,
|
|
1708
|
+
fontWeight: 400,
|
|
1709
|
+
fontSize: 13,
|
|
1710
|
+
lineHeight: 1
|
|
1711
|
+
}),
|
|
1712
|
+
l.axisLabel({
|
|
1713
|
+
...G,
|
|
1714
|
+
fontWeight: 500,
|
|
1715
|
+
fontSize: 13,
|
|
1716
|
+
lineHeight: 1
|
|
1717
|
+
}),
|
|
1718
|
+
l.heading({
|
|
1719
|
+
...F,
|
|
1720
|
+
...gt
|
|
1721
|
+
}),
|
|
1722
|
+
l.heading.h1({
|
|
1723
|
+
fontWeight: 800,
|
|
1724
|
+
fontSize: 28,
|
|
1725
|
+
lineHeight: 1.15,
|
|
1726
|
+
letterSpacing: -0.6
|
|
1727
|
+
}),
|
|
1728
|
+
l.heading.h2({
|
|
1729
|
+
...G,
|
|
1730
|
+
fontFamily: nt,
|
|
1731
|
+
fontWeight: 400,
|
|
1732
|
+
fontSize: 16,
|
|
1733
|
+
lineHeight: 1.35
|
|
1734
|
+
}),
|
|
1735
|
+
l.caption({
|
|
1736
|
+
...G,
|
|
1737
|
+
fontWeight: 400,
|
|
1738
|
+
fontSize: 13
|
|
1739
|
+
}),
|
|
1740
|
+
l.source({
|
|
1741
|
+
...G,
|
|
1742
|
+
fontWeight: 400,
|
|
1743
|
+
fontSize: 12
|
|
1744
|
+
}),
|
|
1745
|
+
l.dataLabel({
|
|
1746
|
+
...F,
|
|
1747
|
+
fontWeight: 600,
|
|
1748
|
+
fontSize: 13,
|
|
1749
|
+
fill: "transparent"
|
|
1750
|
+
}),
|
|
1751
|
+
l.legendItem({
|
|
1752
|
+
...F,
|
|
1753
|
+
fontWeight: 500,
|
|
1754
|
+
fontSize: 13,
|
|
1755
|
+
fill: "transparent",
|
|
1756
|
+
stroke: "transparent"
|
|
1757
|
+
}),
|
|
1758
|
+
l.directLabel({
|
|
1759
|
+
fontWeight: 600,
|
|
1760
|
+
fontSize: 13
|
|
1761
|
+
}),
|
|
1762
|
+
l.headlineItem.number({
|
|
1763
|
+
...gt,
|
|
1764
|
+
fontWeight: 800,
|
|
1765
|
+
fontSize: 32,
|
|
1766
|
+
lineHeight: 1.1
|
|
1767
|
+
}),
|
|
1768
|
+
l.tooltip({
|
|
1769
|
+
strokeWidth: 1,
|
|
1770
|
+
cornerRadius: 12,
|
|
1771
|
+
paddingInline: 12,
|
|
1772
|
+
paddingBlock: 9,
|
|
1773
|
+
shadow: "none"
|
|
1774
|
+
}),
|
|
1775
|
+
l.tooltip.heading({
|
|
1776
|
+
...F,
|
|
1777
|
+
...gt,
|
|
1778
|
+
fontWeight: 700,
|
|
1779
|
+
fontSize: 14,
|
|
1780
|
+
lineHeight: 1.3
|
|
1781
|
+
}),
|
|
1782
|
+
l.tooltip.label({
|
|
1783
|
+
...G,
|
|
1784
|
+
fontWeight: 400,
|
|
1785
|
+
fontSize: 13,
|
|
1786
|
+
lineHeight: 1.35
|
|
1787
|
+
}),
|
|
1788
|
+
l.tooltip.value({
|
|
1789
|
+
...F,
|
|
1790
|
+
fontWeight: 600,
|
|
1791
|
+
fontSize: 13,
|
|
1792
|
+
lineHeight: 1.35
|
|
1793
|
+
}),
|
|
1794
|
+
l.legend.popover({
|
|
1795
|
+
cornerRadius: 12,
|
|
1796
|
+
shadow: "none"
|
|
1797
|
+
}),
|
|
1798
|
+
l.annotation.text({
|
|
1799
|
+
...F,
|
|
1800
|
+
fill: m.raised,
|
|
1801
|
+
stroke: m.rule,
|
|
1802
|
+
strokeWidth: 1,
|
|
1803
|
+
cornerRadius: 10,
|
|
1804
|
+
paddingInline: 10,
|
|
1805
|
+
paddingBlock: 5,
|
|
1806
|
+
fontSize: 13,
|
|
1807
|
+
lineHeight: 1.3
|
|
1808
|
+
}),
|
|
1809
|
+
l.annotation.shape({
|
|
1810
|
+
fillAlpha: 0.14,
|
|
1811
|
+
stroke: P.gold,
|
|
1812
|
+
strokeWidth: 1
|
|
1813
|
+
}),
|
|
1814
|
+
l.annotation.arrow({
|
|
1815
|
+
strokeWidth: 1.5,
|
|
1816
|
+
dashArray: []
|
|
1817
|
+
}),
|
|
1818
|
+
l.annotation.pinnedNumber({
|
|
1819
|
+
stroke: m.dusk,
|
|
1820
|
+
shadow: "none"
|
|
1821
|
+
}),
|
|
1822
|
+
l.annotation.pinnedNumber.label({
|
|
1823
|
+
...F,
|
|
1824
|
+
fill: m.raised,
|
|
1825
|
+
stroke: m.rule,
|
|
1826
|
+
cornerRadius: 10,
|
|
1827
|
+
shadow: "none"
|
|
1828
|
+
}),
|
|
1829
|
+
l.annotation.comment({
|
|
1830
|
+
stroke: m.dusk,
|
|
1831
|
+
shadow: "none"
|
|
1832
|
+
}),
|
|
1833
|
+
l.annotation.comment.label({
|
|
1834
|
+
...F,
|
|
1835
|
+
fill: m.raised,
|
|
1836
|
+
stroke: m.rule,
|
|
1837
|
+
cornerRadius: 10,
|
|
1838
|
+
shadow: "none"
|
|
1839
|
+
}),
|
|
1840
|
+
l.annotation.differenceArrow({
|
|
1841
|
+
stroke: m.text,
|
|
1842
|
+
strokeWidth: 1.5
|
|
1843
|
+
}),
|
|
1844
|
+
l.annotation.differenceArrow.label({
|
|
1845
|
+
...F,
|
|
1846
|
+
fill: m.raised,
|
|
1847
|
+
stroke: m.rule,
|
|
1848
|
+
strokeWidth: 1,
|
|
1849
|
+
cornerRadius: 10,
|
|
1850
|
+
fontWeight: 600,
|
|
1851
|
+
fontSize: 13
|
|
1852
|
+
}),
|
|
1853
|
+
l.panelBorder.bottom({ strokeWidth: 0 }, { coord: "polar" }),
|
|
1854
|
+
l.tickLabel({
|
|
1855
|
+
...F,
|
|
1856
|
+
fontWeight: 600,
|
|
1857
|
+
textOutlineColor: m.dusk,
|
|
1858
|
+
textOutlineWidth: 3
|
|
1859
|
+
}, { coord: "polar" })
|
|
1860
|
+
]
|
|
1861
|
+
}, an = {
|
|
1862
|
+
name: "gamma-night",
|
|
1863
|
+
styles: tn,
|
|
1864
|
+
palette: qr,
|
|
1865
|
+
colormap: Jr,
|
|
1866
|
+
colorScheme: "dark",
|
|
1867
|
+
plugins: Yr
|
|
1868
|
+
};
|
|
1869
|
+
export {
|
|
1870
|
+
on as gammaMushroom,
|
|
1871
|
+
an as gammaNight
|
|
1872
|
+
};
|