@astrato-io/visualizations 0.0.0-stage → 0.6.4
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/CHANGELOG.md +23 -0
- package/LICENSE +93 -0
- package/README.md +843 -2
- package/THIRD_PARTY_NOTICES.md +8387 -0
- package/VISUALIZATION_DEFINITIONS.md +2378 -0
- package/chunks/LinearProgress-CUZ0D8_t.js +253 -0
- package/chunks/Radio-Ciu-F4CU.js +957 -0
- package/chunks/ToggleButton-BCJc3Jlc.js +153 -0
- package/chunks/_baseFlatten-DPXPOrea.js +7076 -0
- package/chunks/accessors-DemrDevR.js +128 -0
- package/chunks/app-filter-bar.compiler-j_CVoWTa.js +55 -0
- package/chunks/bar.compiler-oqaPzIut.js +370 -0
- package/chunks/color-settings-ZIvgNTq1.js +10 -0
- package/chunks/coloring-C16AUZEi.js +663 -0
- package/chunks/data-item-resolution-1lvYB5ln.js +53 -0
- package/chunks/debounce-fn-CUixuz45.js +7 -0
- package/chunks/escobar-BGqT1EsE.js +34580 -0
- package/chunks/event-bus-KiSiCJrC.js +2683 -0
- package/chunks/events-WZut5Ow6.js +4 -0
- package/chunks/extend-BKUkc4_i.js +37 -0
- package/chunks/filter.compiler-CuLtc_02.js +60 -0
- package/chunks/filtering-Yq4DEa0t.js +953 -0
- package/chunks/gauge-target-type-BkKXAqkX.js +4 -0
- package/chunks/grouping-type-BX_9Ix5q.js +3 -0
- package/chunks/interfaces-VUY4_yVO.js +8742 -0
- package/chunks/line-settings-DfYTUyPz.js +4 -0
- package/chunks/line.compiler-BpA_6Tc7.js +188 -0
- package/chunks/metadata-CPXdYoln.js +28 -0
- package/chunks/number.compiler-DbkWcG4S.js +44 -0
- package/chunks/pie-uv42Eqal.js +10 -0
- package/chunks/range-DrzdfBX4.js +22 -0
- package/chunks/registry-CExpGJ1N.js +920 -0
- package/chunks/requirements-DNhuShLS.js +6 -0
- package/chunks/rolldown-runtime-DleVn1XH.js +28 -0
- package/chunks/set-coloring-datafield-B3uIS1Pe.js +8 -0
- package/chunks/shared-CKDL4hx9.js +1171 -0
- package/chunks/src-BC7cGcJ-.js +2024 -0
- package/chunks/src-BOS6SqkZ.js +67 -0
- package/chunks/src-C0LgoUWY.js +26105 -0
- package/chunks/src-Cum_2NLV.js +12145 -0
- package/chunks/src-D9XogOrc.js +422 -0
- package/chunks/src-Dun_jXtz.js +10295 -0
- package/chunks/src-DvX5LU9T.js +14742 -0
- package/chunks/standalone-87YV_m9n.js +687 -0
- package/chunks/standalone-BDCwI6Hn.js +4619 -0
- package/chunks/standalone-BH5NqDwp.js +1763 -0
- package/chunks/standalone-BLVAWLNJ.js +385 -0
- package/chunks/standalone-BPomtAVs.js +2 -0
- package/chunks/standalone-BXyBcUOQ.js +2 -0
- package/chunks/standalone-BYm1UjLr.js +140 -0
- package/chunks/standalone-BllF4rDp.js +383 -0
- package/chunks/standalone-BmfMt74U.js +726 -0
- package/chunks/standalone-BqWyrnZI.js +281 -0
- package/chunks/standalone-C85u7U6I.js +340 -0
- package/chunks/standalone-CCNtaJ7s.js +741 -0
- package/chunks/standalone-CDQnr6qT.js +345 -0
- package/chunks/standalone-CNyNHKVx.js +674 -0
- package/chunks/standalone-CY57qwZ-.js +1129 -0
- package/chunks/standalone-CZynjFG7.js +12979 -0
- package/chunks/standalone-D5vnf-9y.js +3943 -0
- package/chunks/standalone-DFPva_ku.js +299 -0
- package/chunks/standalone-DQxxNwF8.js +675 -0
- package/chunks/standalone-DS9T0FZ-.js +830 -0
- package/chunks/standalone-Dx3MLlrO.js +512 -0
- package/chunks/standalone-DzixzZAL.js +411 -0
- package/chunks/standalone-QJ1kKMnO.js +6 -0
- package/chunks/standalone-jiz0L2Dg.js +3855 -0
- package/chunks/standalone-lBm9hQ-q.js +179 -0
- package/chunks/standalone-rJ45Zfl1.js +68 -0
- package/chunks/stroke-dash-UgMEcCS4.js +6 -0
- package/chunks/table.compiler-BrXkm4Fz.js +213 -0
- package/chunks/toInteger-DVZr-D1j.js +11 -0
- package/chunks/treemap-x_zmJoG7.js +23 -0
- package/chunks/typeof-CJDtcySz.js +13 -0
- package/chunks/types-dVVCsDWD.js +4 -0
- package/chunks/ui-D1HQNIBy.js +54039 -0
- package/chunks/url-utils-B17gj_mr.js +5501 -0
- package/chunks/useFieldName-oqQ3bvnO.js +7 -0
- package/chunks/utils-Ba9T0TqC.js +31097 -0
- package/chunks/view-CLqWMV7Z.js +156 -0
- package/definitions.js +3 -0
- package/docs/operations/astrato-app-filter-bar.md +161 -0
- package/docs/operations/bar.md +7050 -0
- package/docs/operations/combo.md +5825 -0
- package/docs/operations/date-picker.md +644 -0
- package/docs/operations/distribution-gauge.md +3218 -0
- package/docs/operations/dot.md +5662 -0
- package/docs/operations/filter.md +1507 -0
- package/docs/operations/gauge.md +3452 -0
- package/docs/operations/heatMap.md +6026 -0
- package/docs/operations/histogram.md +1870 -0
- package/docs/operations/iframe.md +56 -0
- package/docs/operations/image.md +177 -0
- package/docs/operations/index.md +46 -0
- package/docs/operations/line.md +6468 -0
- package/docs/operations/number.md +3969 -0
- package/docs/operations/pie.md +6089 -0
- package/docs/operations/radar.md +4646 -0
- package/docs/operations/sankey.md +3210 -0
- package/docs/operations/scatter.md +6075 -0
- package/docs/operations/shape.md +315 -0
- package/docs/operations/simpleTextObject.md +706 -0
- package/docs/operations/slider.md +230 -0
- package/docs/operations/table.md +8790 -0
- package/docs/operations/tree.md +2874 -0
- package/docs/operations/treemap.md +3619 -0
- package/docs/operations/waterfall.md +2938 -0
- package/docs/operations/word-cloud.md +3071 -0
- package/getters.js +18 -0
- package/index.js +1183 -0
- package/metadata.js +20 -0
- package/operations.js +64 -0
- package/package.json +191 -4
- package/src/definitions/index.d.ts +2 -0
- package/src/definitions/shared/index.d.ts +5 -0
- package/src/definitions/shared/lib/available-fields.d.ts +36 -0
- package/src/definitions/shared/lib/compilers/index.d.ts +7 -0
- package/src/definitions/shared/lib/registry/compile.d.ts +2 -0
- package/src/definitions/shared/lib/registry/descriptor-registry.d.ts +587 -0
- package/src/definitions/shared/lib/registry/index.d.ts +3 -0
- package/src/definitions/shared/lib/registry/validation.d.ts +3 -0
- package/src/definitions/shared/lib/schemas/app-filter-bar.schema.d.ts +22 -0
- package/src/definitions/shared/lib/schemas/bar.schema.d.ts +73 -0
- package/src/definitions/shared/lib/schemas/broad-chart.schema.d.ts +68 -0
- package/src/definitions/shared/lib/schemas/common.schema.d.ts +304 -0
- package/src/definitions/shared/lib/schemas/filter.schema.d.ts +22 -0
- package/src/definitions/shared/lib/schemas/index.d.ts +9 -0
- package/src/definitions/shared/lib/schemas/line.schema.d.ts +72 -0
- package/src/definitions/shared/lib/schemas/number.schema.d.ts +21 -0
- package/src/definitions/shared/lib/schemas/object.schema.d.ts +215 -0
- package/src/definitions/shared/lib/schemas/table.schema.d.ts +458 -0
- package/src/definitions/shared/lib/types/compilation.types.d.ts +36 -0
- package/src/definitions/shared/lib/types/definition.types.d.ts +2 -0
- package/src/definitions/shared/lib/types/descriptor.types.d.ts +39 -0
- package/src/definitions/shared/lib/types/index.d.ts +3 -0
- package/src/getters/index.d.ts +30 -0
- package/src/index.d.ts +4 -0
- package/src/metadata/index.d.ts +4 -0
- package/src/operations/index.d.ts +30 -0
- package/src/registry/index.d.ts +6 -0
- package/src/runtime/index.d.ts +2 -0
- package/src/types.d.ts +307 -0
- package/src/visualization-catalog.d.ts +82 -0
- package/src/web-components/index.d.ts +12 -0
- package/styles.css +2 -0
|
@@ -0,0 +1,663 @@
|
|
|
1
|
+
import { n as e, o as t, t as n } from "./rolldown-runtime-DleVn1XH.js";
|
|
2
|
+
import { Oa as r, Xs as i, cc as a, ls as o, ui as s, yn as c } from "./interfaces-VUY4_yVO.js";
|
|
3
|
+
import { Kn as ee } from "./utils-Ba9T0TqC.js";
|
|
4
|
+
import { i as l, r as u } from "./color-settings-ZIvgNTq1.js";
|
|
5
|
+
function d(e, t, n) {
|
|
6
|
+
e.prototype = t.prototype = n, n.constructor = e;
|
|
7
|
+
}
|
|
8
|
+
function f(e, t) {
|
|
9
|
+
var n = Object.create(e.prototype);
|
|
10
|
+
for (var r in t) n[r] = t[r];
|
|
11
|
+
return n;
|
|
12
|
+
}
|
|
13
|
+
var p = e((() => {}));
|
|
14
|
+
function m() {}
|
|
15
|
+
function te() {
|
|
16
|
+
return this.rgb().formatHex();
|
|
17
|
+
}
|
|
18
|
+
function ne() {
|
|
19
|
+
return this.rgb().formatHex8();
|
|
20
|
+
}
|
|
21
|
+
function re() {
|
|
22
|
+
return ue(this).formatHsl();
|
|
23
|
+
}
|
|
24
|
+
function ie() {
|
|
25
|
+
return this.rgb().formatRgb();
|
|
26
|
+
}
|
|
27
|
+
function h(e) {
|
|
28
|
+
var t, n;
|
|
29
|
+
return e = (e + "").trim().toLowerCase(), (t = pe.exec(e)) ? (n = t[1].length, t = parseInt(t[1], 16), n === 6 ? ae(t) : n === 3 ? new y(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : n === 8 ? g(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : n === 4 ? g(t >> 12 & 15 | t >> 8 & 240, t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, ((t & 15) << 4 | t & 15) / 255) : null) : (t = me.exec(e)) ? new y(t[1], t[2], t[3], 1) : (t = he.exec(e)) ? new y(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = ge.exec(e)) ? g(t[1], t[2], t[3], t[4]) : (t = _e.exec(e)) ? g(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = ve.exec(e)) ? le(t[1], t[2] / 100, t[3] / 100, 1) : (t = ye.exec(e)) ? le(t[1], t[2] / 100, t[3] / 100, t[4]) : j.hasOwnProperty(e) ? ae(j[e]) : e === "transparent" ? new y(NaN, NaN, NaN, 0) : null;
|
|
30
|
+
}
|
|
31
|
+
function ae(e) {
|
|
32
|
+
return new y(e >> 16 & 255, e >> 8 & 255, e & 255, 1);
|
|
33
|
+
}
|
|
34
|
+
function g(e, t, n, r) {
|
|
35
|
+
return r <= 0 && (e = t = n = NaN), new y(e, t, n, r);
|
|
36
|
+
}
|
|
37
|
+
function _(e) {
|
|
38
|
+
return e instanceof m || (e = h(e)), e ? (e = e.rgb(), new y(e.r, e.g, e.b, e.opacity)) : new y();
|
|
39
|
+
}
|
|
40
|
+
function v(e, t, n, r) {
|
|
41
|
+
return arguments.length === 1 ? _(e) : new y(e, t, n, r ?? 1);
|
|
42
|
+
}
|
|
43
|
+
function y(e, t, n, r) {
|
|
44
|
+
this.r = +e, this.g = +t, this.b = +n, this.opacity = +r;
|
|
45
|
+
}
|
|
46
|
+
function oe() {
|
|
47
|
+
return `#${S(this.r)}${S(this.g)}${S(this.b)}`;
|
|
48
|
+
}
|
|
49
|
+
function se() {
|
|
50
|
+
return `#${S(this.r)}${S(this.g)}${S(this.b)}${S((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
|
|
51
|
+
}
|
|
52
|
+
function ce() {
|
|
53
|
+
let e = b(this.opacity);
|
|
54
|
+
return `${e === 1 ? "rgb(" : "rgba("}${x(this.r)}, ${x(this.g)}, ${x(this.b)}${e === 1 ? ")" : `, ${e})`}`;
|
|
55
|
+
}
|
|
56
|
+
function b(e) {
|
|
57
|
+
return isNaN(e) ? 1 : Math.max(0, Math.min(1, e));
|
|
58
|
+
}
|
|
59
|
+
function x(e) {
|
|
60
|
+
return Math.max(0, Math.min(255, Math.round(e) || 0));
|
|
61
|
+
}
|
|
62
|
+
function S(e) {
|
|
63
|
+
return e = x(e), (e < 16 ? "0" : "") + e.toString(16);
|
|
64
|
+
}
|
|
65
|
+
function le(e, t, n, r) {
|
|
66
|
+
return r <= 0 ? e = t = n = NaN : n <= 0 || n >= 1 ? e = t = NaN : t <= 0 && (e = NaN), new C(e, t, n, r);
|
|
67
|
+
}
|
|
68
|
+
function ue(e) {
|
|
69
|
+
if (e instanceof C) return new C(e.h, e.s, e.l, e.opacity);
|
|
70
|
+
if (e instanceof m || (e = h(e)), !e) return new C();
|
|
71
|
+
if (e instanceof C) return e;
|
|
72
|
+
e = e.rgb();
|
|
73
|
+
var t = e.r / 255, n = e.g / 255, r = e.b / 255, i = Math.min(t, n, r), a = Math.max(t, n, r), o = NaN, s = a - i, c = (a + i) / 2;
|
|
74
|
+
return s ? (o = t === a ? (n - r) / s + (n < r) * 6 : n === a ? (r - t) / s + 2 : (t - n) / s + 4, s /= c < .5 ? a + i : 2 - a - i, o *= 60) : s = c > 0 && c < 1 ? 0 : o, new C(o, s, c, e.opacity);
|
|
75
|
+
}
|
|
76
|
+
function de(e, t, n, r) {
|
|
77
|
+
return arguments.length === 1 ? ue(e) : new C(e, t, n, r ?? 1);
|
|
78
|
+
}
|
|
79
|
+
function C(e, t, n, r) {
|
|
80
|
+
this.h = +e, this.s = +t, this.l = +n, this.opacity = +r;
|
|
81
|
+
}
|
|
82
|
+
function fe(e) {
|
|
83
|
+
return e = (e || 0) % 360, e < 0 ? e + 360 : e;
|
|
84
|
+
}
|
|
85
|
+
function w(e) {
|
|
86
|
+
return Math.max(0, Math.min(1, e || 0));
|
|
87
|
+
}
|
|
88
|
+
function T(e, t, n) {
|
|
89
|
+
return (e < 60 ? t + (n - t) * e / 60 : e < 180 ? n : e < 240 ? t + (n - t) * (240 - e) / 60 : t) * 255;
|
|
90
|
+
}
|
|
91
|
+
var E, D, O, k, A, pe, me, he, ge, _e, ve, ye, j, M = e((() => {
|
|
92
|
+
p(), E = .7, D = 1 / E, O = "\\s*([+-]?\\d+)\\s*", k = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", A = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", pe = /^#([0-9a-f]{3,8})$/, me = RegExp(`^rgb\\(${O},${O},${O}\\)$`), he = RegExp(`^rgb\\(${A},${A},${A}\\)$`), ge = RegExp(`^rgba\\(${O},${O},${O},${k}\\)$`), _e = RegExp(`^rgba\\(${A},${A},${A},${k}\\)$`), ve = RegExp(`^hsl\\(${k},${A},${A}\\)$`), ye = RegExp(`^hsla\\(${k},${A},${A},${k}\\)$`), j = {
|
|
93
|
+
aliceblue: 15792383,
|
|
94
|
+
antiquewhite: 16444375,
|
|
95
|
+
aqua: 65535,
|
|
96
|
+
aquamarine: 8388564,
|
|
97
|
+
azure: 15794175,
|
|
98
|
+
beige: 16119260,
|
|
99
|
+
bisque: 16770244,
|
|
100
|
+
black: 0,
|
|
101
|
+
blanchedalmond: 16772045,
|
|
102
|
+
blue: 255,
|
|
103
|
+
blueviolet: 9055202,
|
|
104
|
+
brown: 10824234,
|
|
105
|
+
burlywood: 14596231,
|
|
106
|
+
cadetblue: 6266528,
|
|
107
|
+
chartreuse: 8388352,
|
|
108
|
+
chocolate: 13789470,
|
|
109
|
+
coral: 16744272,
|
|
110
|
+
cornflowerblue: 6591981,
|
|
111
|
+
cornsilk: 16775388,
|
|
112
|
+
crimson: 14423100,
|
|
113
|
+
cyan: 65535,
|
|
114
|
+
darkblue: 139,
|
|
115
|
+
darkcyan: 35723,
|
|
116
|
+
darkgoldenrod: 12092939,
|
|
117
|
+
darkgray: 11119017,
|
|
118
|
+
darkgreen: 25600,
|
|
119
|
+
darkgrey: 11119017,
|
|
120
|
+
darkkhaki: 12433259,
|
|
121
|
+
darkmagenta: 9109643,
|
|
122
|
+
darkolivegreen: 5597999,
|
|
123
|
+
darkorange: 16747520,
|
|
124
|
+
darkorchid: 10040012,
|
|
125
|
+
darkred: 9109504,
|
|
126
|
+
darksalmon: 15308410,
|
|
127
|
+
darkseagreen: 9419919,
|
|
128
|
+
darkslateblue: 4734347,
|
|
129
|
+
darkslategray: 3100495,
|
|
130
|
+
darkslategrey: 3100495,
|
|
131
|
+
darkturquoise: 52945,
|
|
132
|
+
darkviolet: 9699539,
|
|
133
|
+
deeppink: 16716947,
|
|
134
|
+
deepskyblue: 49151,
|
|
135
|
+
dimgray: 6908265,
|
|
136
|
+
dimgrey: 6908265,
|
|
137
|
+
dodgerblue: 2003199,
|
|
138
|
+
firebrick: 11674146,
|
|
139
|
+
floralwhite: 16775920,
|
|
140
|
+
forestgreen: 2263842,
|
|
141
|
+
fuchsia: 16711935,
|
|
142
|
+
gainsboro: 14474460,
|
|
143
|
+
ghostwhite: 16316671,
|
|
144
|
+
gold: 16766720,
|
|
145
|
+
goldenrod: 14329120,
|
|
146
|
+
gray: 8421504,
|
|
147
|
+
green: 32768,
|
|
148
|
+
greenyellow: 11403055,
|
|
149
|
+
grey: 8421504,
|
|
150
|
+
honeydew: 15794160,
|
|
151
|
+
hotpink: 16738740,
|
|
152
|
+
indianred: 13458524,
|
|
153
|
+
indigo: 4915330,
|
|
154
|
+
ivory: 16777200,
|
|
155
|
+
khaki: 15787660,
|
|
156
|
+
lavender: 15132410,
|
|
157
|
+
lavenderblush: 16773365,
|
|
158
|
+
lawngreen: 8190976,
|
|
159
|
+
lemonchiffon: 16775885,
|
|
160
|
+
lightblue: 11393254,
|
|
161
|
+
lightcoral: 15761536,
|
|
162
|
+
lightcyan: 14745599,
|
|
163
|
+
lightgoldenrodyellow: 16448210,
|
|
164
|
+
lightgray: 13882323,
|
|
165
|
+
lightgreen: 9498256,
|
|
166
|
+
lightgrey: 13882323,
|
|
167
|
+
lightpink: 16758465,
|
|
168
|
+
lightsalmon: 16752762,
|
|
169
|
+
lightseagreen: 2142890,
|
|
170
|
+
lightskyblue: 8900346,
|
|
171
|
+
lightslategray: 7833753,
|
|
172
|
+
lightslategrey: 7833753,
|
|
173
|
+
lightsteelblue: 11584734,
|
|
174
|
+
lightyellow: 16777184,
|
|
175
|
+
lime: 65280,
|
|
176
|
+
limegreen: 3329330,
|
|
177
|
+
linen: 16445670,
|
|
178
|
+
magenta: 16711935,
|
|
179
|
+
maroon: 8388608,
|
|
180
|
+
mediumaquamarine: 6737322,
|
|
181
|
+
mediumblue: 205,
|
|
182
|
+
mediumorchid: 12211667,
|
|
183
|
+
mediumpurple: 9662683,
|
|
184
|
+
mediumseagreen: 3978097,
|
|
185
|
+
mediumslateblue: 8087790,
|
|
186
|
+
mediumspringgreen: 64154,
|
|
187
|
+
mediumturquoise: 4772300,
|
|
188
|
+
mediumvioletred: 13047173,
|
|
189
|
+
midnightblue: 1644912,
|
|
190
|
+
mintcream: 16121850,
|
|
191
|
+
mistyrose: 16770273,
|
|
192
|
+
moccasin: 16770229,
|
|
193
|
+
navajowhite: 16768685,
|
|
194
|
+
navy: 128,
|
|
195
|
+
oldlace: 16643558,
|
|
196
|
+
olive: 8421376,
|
|
197
|
+
olivedrab: 7048739,
|
|
198
|
+
orange: 16753920,
|
|
199
|
+
orangered: 16729344,
|
|
200
|
+
orchid: 14315734,
|
|
201
|
+
palegoldenrod: 15657130,
|
|
202
|
+
palegreen: 10025880,
|
|
203
|
+
paleturquoise: 11529966,
|
|
204
|
+
palevioletred: 14381203,
|
|
205
|
+
papayawhip: 16773077,
|
|
206
|
+
peachpuff: 16767673,
|
|
207
|
+
peru: 13468991,
|
|
208
|
+
pink: 16761035,
|
|
209
|
+
plum: 14524637,
|
|
210
|
+
powderblue: 11591910,
|
|
211
|
+
purple: 8388736,
|
|
212
|
+
rebeccapurple: 6697881,
|
|
213
|
+
red: 16711680,
|
|
214
|
+
rosybrown: 12357519,
|
|
215
|
+
royalblue: 4286945,
|
|
216
|
+
saddlebrown: 9127187,
|
|
217
|
+
salmon: 16416882,
|
|
218
|
+
sandybrown: 16032864,
|
|
219
|
+
seagreen: 3050327,
|
|
220
|
+
seashell: 16774638,
|
|
221
|
+
sienna: 10506797,
|
|
222
|
+
silver: 12632256,
|
|
223
|
+
skyblue: 8900331,
|
|
224
|
+
slateblue: 6970061,
|
|
225
|
+
slategray: 7372944,
|
|
226
|
+
slategrey: 7372944,
|
|
227
|
+
snow: 16775930,
|
|
228
|
+
springgreen: 65407,
|
|
229
|
+
steelblue: 4620980,
|
|
230
|
+
tan: 13808780,
|
|
231
|
+
teal: 32896,
|
|
232
|
+
thistle: 14204888,
|
|
233
|
+
tomato: 16737095,
|
|
234
|
+
turquoise: 4251856,
|
|
235
|
+
violet: 15631086,
|
|
236
|
+
wheat: 16113331,
|
|
237
|
+
white: 16777215,
|
|
238
|
+
whitesmoke: 16119285,
|
|
239
|
+
yellow: 16776960,
|
|
240
|
+
yellowgreen: 10145074
|
|
241
|
+
}, d(m, h, {
|
|
242
|
+
copy(e) {
|
|
243
|
+
return Object.assign(new this.constructor(), this, e);
|
|
244
|
+
},
|
|
245
|
+
displayable() {
|
|
246
|
+
return this.rgb().displayable();
|
|
247
|
+
},
|
|
248
|
+
hex: te,
|
|
249
|
+
formatHex: te,
|
|
250
|
+
formatHex8: ne,
|
|
251
|
+
formatHsl: re,
|
|
252
|
+
formatRgb: ie,
|
|
253
|
+
toString: ie
|
|
254
|
+
}), d(y, v, f(m, {
|
|
255
|
+
brighter(e) {
|
|
256
|
+
return e = e == null ? D : D ** +e, new y(this.r * e, this.g * e, this.b * e, this.opacity);
|
|
257
|
+
},
|
|
258
|
+
darker(e) {
|
|
259
|
+
return e = e == null ? E : E ** +e, new y(this.r * e, this.g * e, this.b * e, this.opacity);
|
|
260
|
+
},
|
|
261
|
+
rgb() {
|
|
262
|
+
return this;
|
|
263
|
+
},
|
|
264
|
+
clamp() {
|
|
265
|
+
return new y(x(this.r), x(this.g), x(this.b), b(this.opacity));
|
|
266
|
+
},
|
|
267
|
+
displayable() {
|
|
268
|
+
return -.5 <= this.r && this.r < 255.5 && -.5 <= this.g && this.g < 255.5 && -.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
|
|
269
|
+
},
|
|
270
|
+
hex: oe,
|
|
271
|
+
formatHex: oe,
|
|
272
|
+
formatHex8: se,
|
|
273
|
+
formatRgb: ce,
|
|
274
|
+
toString: ce
|
|
275
|
+
})), d(C, de, f(m, {
|
|
276
|
+
brighter(e) {
|
|
277
|
+
return e = e == null ? D : D ** +e, new C(this.h, this.s, this.l * e, this.opacity);
|
|
278
|
+
},
|
|
279
|
+
darker(e) {
|
|
280
|
+
return e = e == null ? E : E ** +e, new C(this.h, this.s, this.l * e, this.opacity);
|
|
281
|
+
},
|
|
282
|
+
rgb() {
|
|
283
|
+
var e = this.h % 360 + (this.h < 0) * 360, t = isNaN(e) || isNaN(this.s) ? 0 : this.s, n = this.l, r = n + (n < .5 ? n : 1 - n) * t, i = 2 * n - r;
|
|
284
|
+
return new y(T(e >= 240 ? e - 240 : e + 120, i, r), T(e, i, r), T(e < 120 ? e + 240 : e - 120, i, r), this.opacity);
|
|
285
|
+
},
|
|
286
|
+
clamp() {
|
|
287
|
+
return new C(fe(this.h), w(this.s), w(this.l), b(this.opacity));
|
|
288
|
+
},
|
|
289
|
+
displayable() {
|
|
290
|
+
return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
|
|
291
|
+
},
|
|
292
|
+
formatHsl() {
|
|
293
|
+
let e = b(this.opacity);
|
|
294
|
+
return `${e === 1 ? "hsl(" : "hsla("}${fe(this.h)}, ${w(this.s) * 100}%, ${w(this.l) * 100}%${e === 1 ? ")" : `, ${e})`}`;
|
|
295
|
+
}
|
|
296
|
+
}));
|
|
297
|
+
})), N, P, be = e((() => {
|
|
298
|
+
N = Math.PI / 180, P = 180 / Math.PI;
|
|
299
|
+
}));
|
|
300
|
+
function xe(e) {
|
|
301
|
+
if (e instanceof F) return new F(e.l, e.a, e.b, e.opacity);
|
|
302
|
+
if (e instanceof R) return De(e);
|
|
303
|
+
e instanceof y || (e = _(e));
|
|
304
|
+
var t = we(e.r), n = we(e.g), r = we(e.b), i = I((.2225045 * t + .7168786 * n + .0606169 * r) / V), a, o;
|
|
305
|
+
return t === n && n === r ? a = o = i : (a = I((.4360747 * t + .3850649 * n + .1430804 * r) / B), o = I((.0139322 * t + .0971045 * n + .7141733 * r) / H)), new F(116 * i - 16, 500 * (a - i), 200 * (i - o), e.opacity);
|
|
306
|
+
}
|
|
307
|
+
function Se(e, t, n, r) {
|
|
308
|
+
return arguments.length === 1 ? xe(e) : new F(e, t, n, r ?? 1);
|
|
309
|
+
}
|
|
310
|
+
function F(e, t, n, r) {
|
|
311
|
+
this.l = +e, this.a = +t, this.b = +n, this.opacity = +r;
|
|
312
|
+
}
|
|
313
|
+
function I(e) {
|
|
314
|
+
return e > Oe ? e ** (1 / 3) : e / G + U;
|
|
315
|
+
}
|
|
316
|
+
function L(e) {
|
|
317
|
+
return e > W ? e * e * e : G * (e - U);
|
|
318
|
+
}
|
|
319
|
+
function Ce(e) {
|
|
320
|
+
return 255 * (e <= .0031308 ? 12.92 * e : 1.055 * e ** (1 / 2.4) - .055);
|
|
321
|
+
}
|
|
322
|
+
function we(e) {
|
|
323
|
+
return (e /= 255) <= .04045 ? e / 12.92 : ((e + .055) / 1.055) ** 2.4;
|
|
324
|
+
}
|
|
325
|
+
function Te(e) {
|
|
326
|
+
if (e instanceof R) return new R(e.h, e.c, e.l, e.opacity);
|
|
327
|
+
if (e instanceof F || (e = xe(e)), e.a === 0 && e.b === 0) return new R(NaN, 0 < e.l && e.l < 100 ? 0 : NaN, e.l, e.opacity);
|
|
328
|
+
var t = Math.atan2(e.b, e.a) * P;
|
|
329
|
+
return new R(t < 0 ? t + 360 : t, Math.sqrt(e.a * e.a + e.b * e.b), e.l, e.opacity);
|
|
330
|
+
}
|
|
331
|
+
function Ee(e, t, n, r) {
|
|
332
|
+
return arguments.length === 1 ? Te(e) : new R(e, t, n, r ?? 1);
|
|
333
|
+
}
|
|
334
|
+
function R(e, t, n, r) {
|
|
335
|
+
this.h = +e, this.c = +t, this.l = +n, this.opacity = +r;
|
|
336
|
+
}
|
|
337
|
+
function De(e) {
|
|
338
|
+
if (isNaN(e.h)) return new F(e.l, 0, 0, e.opacity);
|
|
339
|
+
var t = e.h * N;
|
|
340
|
+
return new F(e.l, Math.cos(t) * e.c, Math.sin(t) * e.c, e.opacity);
|
|
341
|
+
}
|
|
342
|
+
var z, B, V, H, U, W, G, Oe, ke = e((() => {
|
|
343
|
+
p(), M(), be(), z = 18, B = .96422, V = 1, H = .82521, U = 4 / 29, W = 6 / 29, G = 3 * W * W, Oe = W * W * W, d(F, Se, f(m, {
|
|
344
|
+
brighter(e) {
|
|
345
|
+
return new F(this.l + z * (e ?? 1), this.a, this.b, this.opacity);
|
|
346
|
+
},
|
|
347
|
+
darker(e) {
|
|
348
|
+
return new F(this.l - z * (e ?? 1), this.a, this.b, this.opacity);
|
|
349
|
+
},
|
|
350
|
+
rgb() {
|
|
351
|
+
var e = (this.l + 16) / 116, t = isNaN(this.a) ? e : e + this.a / 500, n = isNaN(this.b) ? e : e - this.b / 200;
|
|
352
|
+
return t = B * L(t), e = V * L(e), n = H * L(n), new y(Ce(3.1338561 * t - 1.6168667 * e - .4906146 * n), Ce(-.9787684 * t + 1.9161415 * e + .033454 * n), Ce(.0719453 * t - .2289914 * e + 1.4052427 * n), this.opacity);
|
|
353
|
+
}
|
|
354
|
+
})), d(R, Ee, f(m, {
|
|
355
|
+
brighter(e) {
|
|
356
|
+
return new R(this.h, this.c, this.l + z * (e ?? 1), this.opacity);
|
|
357
|
+
},
|
|
358
|
+
darker(e) {
|
|
359
|
+
return new R(this.h, this.c, this.l - z * (e ?? 1), this.opacity);
|
|
360
|
+
},
|
|
361
|
+
rgb() {
|
|
362
|
+
return De(this).rgb();
|
|
363
|
+
}
|
|
364
|
+
}));
|
|
365
|
+
}));
|
|
366
|
+
function Ae(e) {
|
|
367
|
+
if (e instanceof K) return new K(e.h, e.s, e.l, e.opacity);
|
|
368
|
+
e instanceof y || (e = _(e));
|
|
369
|
+
var t = e.r / 255, n = e.g / 255, r = e.b / 255, i = (Pe * r + Me * t - Ne * n) / (Pe + Me - Ne), a = r - i, o = (Z * (n - i) - Y * a) / X, s = Math.sqrt(o * o + a * a) / (Z * i * (1 - i)), c = s ? Math.atan2(o, a) * P - 120 : NaN;
|
|
370
|
+
return new K(c < 0 ? c + 360 : c, s, i, e.opacity);
|
|
371
|
+
}
|
|
372
|
+
function je(e, t, n, r) {
|
|
373
|
+
return arguments.length === 1 ? Ae(e) : new K(e, t, n, r ?? 1);
|
|
374
|
+
}
|
|
375
|
+
function K(e, t, n, r) {
|
|
376
|
+
this.h = +e, this.s = +t, this.l = +n, this.opacity = +r;
|
|
377
|
+
}
|
|
378
|
+
var q, J, Y, X, Z, Me, Ne, Pe, Fe = e((() => {
|
|
379
|
+
p(), M(), be(), q = -.14861, J = 1.78277, Y = -.29227, X = -.90649, Z = 1.97294, Me = Z * X, Ne = Z * J, Pe = J * Y - X * q, d(K, je, f(m, {
|
|
380
|
+
brighter(e) {
|
|
381
|
+
return e = e == null ? D : D ** +e, new K(this.h, this.s, this.l * e, this.opacity);
|
|
382
|
+
},
|
|
383
|
+
darker(e) {
|
|
384
|
+
return e = e == null ? E : E ** +e, new K(this.h, this.s, this.l * e, this.opacity);
|
|
385
|
+
},
|
|
386
|
+
rgb() {
|
|
387
|
+
var e = isNaN(this.h) ? 0 : (this.h + 120) * N, t = +this.l, n = isNaN(this.s) ? 0 : this.s * t * (1 - t), r = Math.cos(e), i = Math.sin(e);
|
|
388
|
+
return new y(255 * (t + n * (q * r + J * i)), 255 * (t + n * (Y * r + X * i)), 255 * (t + Z * r * n), this.opacity);
|
|
389
|
+
}
|
|
390
|
+
}));
|
|
391
|
+
})), Ie = e((() => {
|
|
392
|
+
M(), ke(), Fe();
|
|
393
|
+
})), Le = (e, t, n) => e?.type === i.Single ? Re(t, e.color ?? void 0) : e?.type === i.Categorical ? {
|
|
394
|
+
ref: n || void 0,
|
|
395
|
+
scale: i.Categorical
|
|
396
|
+
} : e?.type === i.Gradient ? {
|
|
397
|
+
ref: n || void 0,
|
|
398
|
+
scale: i.Gradient
|
|
399
|
+
} : Re(t), Re = (e, t) => t ?? e.colors.brandColors[0], ze = (e, t, n, r, a, o = !1) => {
|
|
400
|
+
let s = e?.coloring?.type;
|
|
401
|
+
if ((s === i.Single || s === i.PerEachMeasure) && t.scales[s]?.range) {
|
|
402
|
+
if (o) return {
|
|
403
|
+
scale: s,
|
|
404
|
+
ref: a || "color"
|
|
405
|
+
};
|
|
406
|
+
let n = e.measures.findIndex((e) => r?.dataItem === e.dataItem), i = t.scales[s].range?.[n];
|
|
407
|
+
if (typeof i == "string") return i;
|
|
408
|
+
}
|
|
409
|
+
return e?.coloring?.type === i.Single ? r?.graphColor ?? e?.coloring?.color ?? n.colors.brandColors[0] : Le(e.coloring, n, a);
|
|
410
|
+
}, Be = (e, t) => {
|
|
411
|
+
let n = null;
|
|
412
|
+
if (t?.pattern) {
|
|
413
|
+
let i = e.datum, a = Object.keys(i).reduce((e, t) => {
|
|
414
|
+
let n = i[t];
|
|
415
|
+
return n?.source?.field && n.source.key !== void 0 && (e[n.source.field] = n), e;
|
|
416
|
+
}, {}), o = t.pattern.reduce((e, t) => a[t] ? `${e}-${a[t].value}` : `${e}-${i.value}`, `${i.source?.key ?? ""}`);
|
|
417
|
+
t.itemsMap?.[o] || (n = r.grey3);
|
|
418
|
+
}
|
|
419
|
+
return n;
|
|
420
|
+
}, Ve = /* @__PURE__ */ n(((e, t) => {
|
|
421
|
+
var n = Math.max, r = Math.min;
|
|
422
|
+
function i(e, t, i) {
|
|
423
|
+
return e >= r(t, i) && e < n(t, i);
|
|
424
|
+
}
|
|
425
|
+
t.exports = i;
|
|
426
|
+
})), He = /* @__PURE__ */ n(((e, t) => {
|
|
427
|
+
var n = ee(), r = Infinity, i = 17976931348623157e292;
|
|
428
|
+
function a(e) {
|
|
429
|
+
return e ? (e = n(e), e === r || e === -r ? (e < 0 ? -1 : 1) * i : e === e ? e : 0) : e === 0 ? e : 0;
|
|
430
|
+
}
|
|
431
|
+
t.exports = a;
|
|
432
|
+
})), Ue = /* @__PURE__ */ t((/* @__PURE__ */ n(((e, t) => {
|
|
433
|
+
var n = Ve(), r = He(), i = ee();
|
|
434
|
+
function a(e, t, a) {
|
|
435
|
+
return t = r(t), a === void 0 ? (a = t, t = 0) : a = r(a), e = i(e), n(e, t, a);
|
|
436
|
+
}
|
|
437
|
+
t.exports = a;
|
|
438
|
+
})))()), Q = /* @__PURE__ */ t(c()), $ = (e) => typeof e == "string" ? e : `${e}`, We = [
|
|
439
|
+
"equals",
|
|
440
|
+
"contains",
|
|
441
|
+
"startsWith",
|
|
442
|
+
"endsWith"
|
|
443
|
+
], Ge = [
|
|
444
|
+
"greater",
|
|
445
|
+
"less",
|
|
446
|
+
"greater-equals",
|
|
447
|
+
"less-equals",
|
|
448
|
+
"between",
|
|
449
|
+
"not-equals"
|
|
450
|
+
], Ke = ["inList", "notInList"], qe = (e) => o(e) || typeof e != "string" || e.length === 0 ? "," : e, Je = (e, t) => {
|
|
451
|
+
if (o(e.value)) return !1;
|
|
452
|
+
let n = e.operator || "equals";
|
|
453
|
+
return We.includes(n) ? Xe(e, t) : Ge.includes(n) ? Ze(e, t) : Ke.includes(n) ? Ye(e, t) : !1;
|
|
454
|
+
};
|
|
455
|
+
function Ye(e, t) {
|
|
456
|
+
let n = e.operator;
|
|
457
|
+
if (t == null || e?.value === null || e?.value === void 0) return !1;
|
|
458
|
+
let r = $(t), i = $(e.value), a = qe(e.delimiter), o = new Set(i.split(a).map((e) => e.trim()).filter((e) => e.length > 0));
|
|
459
|
+
if (o.size === 0) return !1;
|
|
460
|
+
let s = o.has(r);
|
|
461
|
+
return n === "notInList" ? !s : s;
|
|
462
|
+
}
|
|
463
|
+
function Xe(e, t) {
|
|
464
|
+
let n = $(t), r = e?.value, i = e.operator || "equals";
|
|
465
|
+
if (i === "equals") return r === n;
|
|
466
|
+
if (t == null || r == null || r === "") return !1;
|
|
467
|
+
let a = $(r);
|
|
468
|
+
switch (i) {
|
|
469
|
+
case "contains": return n.includes(a);
|
|
470
|
+
case "startsWith": return n.startsWith(a);
|
|
471
|
+
case "endsWith": return n.endsWith(a);
|
|
472
|
+
default: return !1;
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
function Ze(e, t) {
|
|
476
|
+
let n = Number(t), r = Number(e?.value), i = e.operator || "equals";
|
|
477
|
+
if (i === "equals") return r === n;
|
|
478
|
+
if ((0, Q.default)(t) || (0, Q.default)(r) || Number.isNaN(n) || Number.isNaN(r)) return !1;
|
|
479
|
+
switch (i) {
|
|
480
|
+
case "greater": return n > r;
|
|
481
|
+
case "less": return n < r;
|
|
482
|
+
case "greater-equals": return n >= r;
|
|
483
|
+
case "less-equals": return n <= r;
|
|
484
|
+
case "between": {
|
|
485
|
+
let t = Number(e.secondValue);
|
|
486
|
+
return (0, Q.default)(t) || Number.isNaN(t) ? !1 : (0, Ue.default)(n, r, t);
|
|
487
|
+
}
|
|
488
|
+
case "not-equals": return n !== r;
|
|
489
|
+
default: return !1;
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
Ie();
|
|
493
|
+
var Qe = s("color-manager", "#3f6212"), $e = (e, t) => {
|
|
494
|
+
if (t === "null") return null;
|
|
495
|
+
switch (typeof e) {
|
|
496
|
+
case "boolean": return typeof t == "boolean" ? t : String(t).toLowerCase() === "true";
|
|
497
|
+
case "string": return String(t);
|
|
498
|
+
case "number": return typeof t == "string" ? parseFloat(t) : Number(t);
|
|
499
|
+
default: return t;
|
|
500
|
+
}
|
|
501
|
+
}, et = (e) => o(e) || typeof e != "string" || e.length === 0 ? "," : e, tt = (e) => {
|
|
502
|
+
if (typeof e.value != "string" && typeof e.value != "number") return [];
|
|
503
|
+
let t = et(typeof e.delimiter == "string" ? e.delimiter : void 0);
|
|
504
|
+
return String(e.value).split(t).map((e) => e.trim()).filter((e) => e.length > 0);
|
|
505
|
+
}, nt = (e, t) => {
|
|
506
|
+
let n = String(e);
|
|
507
|
+
if (t[n]) return t[n];
|
|
508
|
+
let r = n.split("").reverse().reduce((e, t, n) => e + t.charCodeAt(0) * (1 + n), 0);
|
|
509
|
+
return t[n] = r, r;
|
|
510
|
+
}, rt = (e, t) => {
|
|
511
|
+
if ((0, Q.default)(e.value)) return !1;
|
|
512
|
+
if (o(e.value) || u(e.value)) return Qe.warn("Color rule not preprocessed correctly - ignoring", e), !1;
|
|
513
|
+
let n = $e(t, e.value);
|
|
514
|
+
if ([l.InList, l.NotInList].includes(e.operator)) {
|
|
515
|
+
let n = tt(e);
|
|
516
|
+
if (n.length === 0) return !1;
|
|
517
|
+
let r = new Set(n.map((e) => $e(t, e))).has(t);
|
|
518
|
+
return e.operator === l.NotInList ? !r : r;
|
|
519
|
+
}
|
|
520
|
+
if (typeof t != "number") switch (e.operator) {
|
|
521
|
+
case l.Equals: return t === n;
|
|
522
|
+
case l.NotEquals: return t !== n;
|
|
523
|
+
default: return !1;
|
|
524
|
+
}
|
|
525
|
+
switch (e.operator) {
|
|
526
|
+
case l.Equals: return t === n;
|
|
527
|
+
case l.Greater: return t > n;
|
|
528
|
+
case l.Less: return t < n;
|
|
529
|
+
case l.GreaterEquals: return t >= n;
|
|
530
|
+
case l.LessEquals: return t <= n;
|
|
531
|
+
case l.Between: {
|
|
532
|
+
if ((0, Q.default)(e.secondValue)) return !1;
|
|
533
|
+
if (o(e.secondValue) || u(e.secondValue)) return Qe.warn("Color rule not preprocessed correctly - ignoring", e), !1;
|
|
534
|
+
let r = $e(t, e.secondValue);
|
|
535
|
+
return n <= t && t <= r;
|
|
536
|
+
}
|
|
537
|
+
case l.NotEquals: return t !== n;
|
|
538
|
+
default: return !1;
|
|
539
|
+
}
|
|
540
|
+
}, it = (e) => typeof e == "string" ? parseFloat(e) : e, at = {}, ot = class {
|
|
541
|
+
vSpec;
|
|
542
|
+
vTheme;
|
|
543
|
+
notAffectedItems;
|
|
544
|
+
MAIN_FIELD = "__main_field__";
|
|
545
|
+
constructor(e, t, n) {
|
|
546
|
+
this.vSpec = e, this.vTheme = t, this.notAffectedItems = n;
|
|
547
|
+
}
|
|
548
|
+
isColorOverwriteActive() {
|
|
549
|
+
return !!this.vSpec.coloring?.overwrites?.length;
|
|
550
|
+
}
|
|
551
|
+
isColorRulesActive() {
|
|
552
|
+
return !!this.vSpec.coloring?.rules?.length;
|
|
553
|
+
}
|
|
554
|
+
getSimpleColor() {
|
|
555
|
+
return this.vSpec.coloring?.color || this.vTheme.colors.brandColors[0];
|
|
556
|
+
}
|
|
557
|
+
getColorFromOverwriteSources(e, t, n) {
|
|
558
|
+
for (let r = 0; r < e.length; r++) {
|
|
559
|
+
let i = e[r], a = this.resolveColorOverwriteValues(i, n);
|
|
560
|
+
if (!this.hasUnresolvedSupportingMeasureValue(i, n)) for (let e = 0; e < t.length; e++) {
|
|
561
|
+
let r = t[e];
|
|
562
|
+
if (Je(a, this.getValueFromProp(n, r))) return a?.color;
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
return null;
|
|
566
|
+
}
|
|
567
|
+
getColorByOverwrite(e, t = {}) {
|
|
568
|
+
let { ref: n, overwriteSources: r } = t, i = this.vSpec.coloring?.overwrites ?? [], a = r ?? [];
|
|
569
|
+
if (a.length > 0) {
|
|
570
|
+
let t = this.getColorFromOverwriteSources(i, a, e);
|
|
571
|
+
if (t) return t;
|
|
572
|
+
}
|
|
573
|
+
for (let t = 0; t < i.length; t++) {
|
|
574
|
+
let r = i[t], a = this.resolveColorOverwriteValues(r, e);
|
|
575
|
+
if (this.hasUnresolvedSupportingMeasureValue(r, e)) continue;
|
|
576
|
+
let o = this.getValueFromProp(e, n || this.MAIN_FIELD);
|
|
577
|
+
if ((a.operator || "equals") === "equals" && (a?.value === o || a?.value === $(o)) || Je(a, o)) return a?.color;
|
|
578
|
+
}
|
|
579
|
+
return null;
|
|
580
|
+
}
|
|
581
|
+
getColorByColorRules(e) {
|
|
582
|
+
return this.vSpec.coloring?.rules?.find((t) => {
|
|
583
|
+
if (e.datum.series && !e.datum.series.source && e.datum.series.value !== t.dataItemId) return !1;
|
|
584
|
+
let n = e.datum[t.dataItemId]?.value;
|
|
585
|
+
return n !== void 0 && rt(this.resolveColorRuleValues(t, e), it(n));
|
|
586
|
+
})?.color || null;
|
|
587
|
+
}
|
|
588
|
+
getHash(e) {
|
|
589
|
+
return nt(e, at);
|
|
590
|
+
}
|
|
591
|
+
getValueFromProp(e, t, n) {
|
|
592
|
+
return t === this.MAIN_FIELD ? e.datum?.value : e.datum[t || n || ""]?.value;
|
|
593
|
+
}
|
|
594
|
+
resolveColoringConditionValue(e, t) {
|
|
595
|
+
return u(e) ? t.datum[e.dataItemId]?.value : e;
|
|
596
|
+
}
|
|
597
|
+
resolveColorRuleValues(e, t) {
|
|
598
|
+
return {
|
|
599
|
+
...e,
|
|
600
|
+
value: this.resolveColoringConditionValue(e.value, t),
|
|
601
|
+
secondValue: this.resolveColoringConditionValue(e.secondValue, t)
|
|
602
|
+
};
|
|
603
|
+
}
|
|
604
|
+
resolveColorOverwriteValues(e, t) {
|
|
605
|
+
return {
|
|
606
|
+
...e,
|
|
607
|
+
value: this.resolveColoringConditionValue(e.value, t),
|
|
608
|
+
secondValue: this.resolveColoringConditionValue(e.secondValue, t)
|
|
609
|
+
};
|
|
610
|
+
}
|
|
611
|
+
hasUnresolvedSupportingMeasureValue(e, t) {
|
|
612
|
+
return [e.value, e.secondValue].some((e) => u(e) && this.resolveColoringConditionValue(e, t) === void 0);
|
|
613
|
+
}
|
|
614
|
+
getColorByScale(e, t = {}) {
|
|
615
|
+
let { ref: n, dataItemId: r } = t;
|
|
616
|
+
switch (this.vSpec.coloring?.type) {
|
|
617
|
+
case i.Categorical: {
|
|
618
|
+
let t = e.resources.scale(i.Categorical), a = r || this.getValueFromProp(e, n, "color");
|
|
619
|
+
if (this.vSpec.coloring.persistentColors === !1) return t(a);
|
|
620
|
+
let o = t.range();
|
|
621
|
+
return o[this.getHash(a) % o.length];
|
|
622
|
+
}
|
|
623
|
+
case i.Gradient: {
|
|
624
|
+
let t = e.resources.scale(i.Gradient)(r || this.getValueFromProp(e, n, "end"));
|
|
625
|
+
return Number.isNaN(t) ? "#000000" : t;
|
|
626
|
+
}
|
|
627
|
+
case i.PerEachMeasure: return e.resources.scale(i.PerEachMeasure)(r || this.getValueFromProp(e, n, "color"));
|
|
628
|
+
case i.Single: return e.resources.scale(i.Single)(r || this.getValueFromProp(e, n, "color"));
|
|
629
|
+
default: return this.getSimpleColor();
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
overrideColorOpacity(e, t) {
|
|
633
|
+
return !e || !t ? e : v(e).copy({ opacity: t }).toString();
|
|
634
|
+
}
|
|
635
|
+
getFilteredColor(e, t) {
|
|
636
|
+
return Be(e, t);
|
|
637
|
+
}
|
|
638
|
+
getColorDefinition(e, t) {
|
|
639
|
+
return (n) => {
|
|
640
|
+
if (this.notAffectedItems?.pattern?.length && this.vSpec.staticFilters.ignoreGlobalFilters && this.vSpec.staticFilters.showGlobalFiltersEffect) {
|
|
641
|
+
let e = this.getFilteredColor(n, this.notAffectedItems);
|
|
642
|
+
if (e) return e;
|
|
643
|
+
}
|
|
644
|
+
if (this.isColorOverwriteActive()) {
|
|
645
|
+
let r = this.getColorByOverwrite(n, e);
|
|
646
|
+
if (r) return this.overrideColorOpacity(r, t);
|
|
647
|
+
}
|
|
648
|
+
if (this.isColorRulesActive()) {
|
|
649
|
+
let e = this.getColorByColorRules(n);
|
|
650
|
+
if (e) return this.overrideColorOpacity(e, t);
|
|
651
|
+
}
|
|
652
|
+
return this.overrideColorOpacity(this.getColorByScale(n, e), t);
|
|
653
|
+
};
|
|
654
|
+
}
|
|
655
|
+
getMeasureColor(e, t) {
|
|
656
|
+
let n = this.vSpec?.coloring?.type, r = this.vSpec.measures.findIndex((e) => a(t?.dataItem, e.dataItem)), i = n ? e.scales[n]?.range?.[r] : void 0;
|
|
657
|
+
return typeof i == "string" ? i : t?.graphColor ?? this.vSpec?.coloring?.color ?? this.vTheme.colors.brandColors[0];
|
|
658
|
+
}
|
|
659
|
+
static getColorWithCallback(e, t) {
|
|
660
|
+
return (n) => t(typeof e == "function" ? e(n) : e, n);
|
|
661
|
+
}
|
|
662
|
+
};
|
|
663
|
+
export { v as _, Be as a, Ie as c, Ee as d, ke as f, M as g, de as h, He as i, je as l, h as m, rt as n, ze as o, Se as p, Je as r, Re as s, ot as t, Fe as u };
|