@a_ng_d/utils-ui-color-palette 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1403 @@
1
+ const F = (e, t = 0, n = 1) => ve(Ae(t, e), n), Me = (e) => {
2
+ e._clipped = !1, e._unclipped = e.slice(0);
3
+ for (let t = 0; t <= 3; t++)
4
+ t < 3 ? ((e[t] < 0 || e[t] > 255) && (e._clipped = !0), e[t] = F(e[t], 0, 255)) : t === 3 && (e[t] = F(e[t], 0, 1));
5
+ return e;
6
+ }, Se = {};
7
+ for (let e of [
8
+ "Boolean",
9
+ "Number",
10
+ "String",
11
+ "Function",
12
+ "Array",
13
+ "Date",
14
+ "RegExp",
15
+ "Undefined",
16
+ "Null"
17
+ ])
18
+ Se[`[object ${e}]`] = e.toLowerCase();
19
+ function N(e) {
20
+ return Se[Object.prototype.toString.call(e)] || "object";
21
+ }
22
+ const x = (e, t = null) => e.length >= 3 ? Array.prototype.slice.call(e) : N(e[0]) == "object" && t ? t.split("").filter((n) => e[0][n] !== void 0).map((n) => e[0][n]) : e[0], ce = (e) => {
23
+ if (e.length < 2) return null;
24
+ const t = e.length - 1;
25
+ return N(e[t]) == "string" ? e[t].toLowerCase() : null;
26
+ }, { PI: oe, min: ve, max: Ae } = Math, O = oe * 2, le = oe / 3, bt = oe / 180, dt = 180 / oe, m = {
27
+ format: {},
28
+ autodetect: []
29
+ };
30
+ class i {
31
+ constructor(...t) {
32
+ const n = this;
33
+ if (N(t[0]) === "object" && t[0].constructor && t[0].constructor === this.constructor)
34
+ return t[0];
35
+ let r = ce(t), f = !1;
36
+ if (!r) {
37
+ f = !0, m.sorted || (m.autodetect = m.autodetect.sort((c, o) => o.p - c.p), m.sorted = !0);
38
+ for (let c of m.autodetect)
39
+ if (r = c.test(...t), r) break;
40
+ }
41
+ if (m.format[r]) {
42
+ const c = m.format[r].apply(
43
+ null,
44
+ f ? t : t.slice(0, -1)
45
+ );
46
+ n._rgb = Me(c);
47
+ } else
48
+ throw new Error("unknown format: " + t);
49
+ n._rgb.length === 3 && n._rgb.push(1);
50
+ }
51
+ toString() {
52
+ return N(this.hex) == "function" ? this.hex() : `[${this._rgb.join(",")}]`;
53
+ }
54
+ }
55
+ const ht = "2.6.0", _ = (...e) => new _.Color(...e);
56
+ _.Color = i;
57
+ _.version = ht;
58
+ const pt = (...e) => {
59
+ e = x(e, "cmyk");
60
+ const [t, n, r, f] = e, c = e.length > 4 ? e[4] : 1;
61
+ return f === 1 ? [0, 0, 0, c] : [
62
+ t >= 1 ? 0 : 255 * (1 - t) * (1 - f),
63
+ // r
64
+ n >= 1 ? 0 : 255 * (1 - n) * (1 - f),
65
+ // g
66
+ r >= 1 ? 0 : 255 * (1 - r) * (1 - f),
67
+ // b
68
+ c
69
+ ];
70
+ }, { max: Le } = Math, gt = (...e) => {
71
+ let [t, n, r] = x(e, "rgb");
72
+ t = t / 255, n = n / 255, r = r / 255;
73
+ const f = 1 - Le(t, Le(n, r)), c = f < 1 ? 1 / (1 - f) : 0, o = (1 - t - f) * c, s = (1 - n - f) * c, l = (1 - r - f) * c;
74
+ return [o, s, l, f];
75
+ };
76
+ i.prototype.cmyk = function() {
77
+ return gt(this._rgb);
78
+ };
79
+ _.cmyk = (...e) => new i(...e, "cmyk");
80
+ m.format.cmyk = pt;
81
+ m.autodetect.push({
82
+ p: 2,
83
+ test: (...e) => {
84
+ if (e = x(e, "cmyk"), N(e) === "array" && e.length === 4)
85
+ return "cmyk";
86
+ }
87
+ });
88
+ const ae = (e) => Math.round(e * 100) / 100, mt = (...e) => {
89
+ const t = x(e, "hsla");
90
+ let n = ce(e) || "lsa";
91
+ return t[0] = ae(t[0] || 0), t[1] = ae(t[1] * 100) + "%", t[2] = ae(t[2] * 100) + "%", n === "hsla" || t.length > 3 && t[3] < 1 ? (t[3] = t.length > 3 ? t[3] : 1, n = "hsla") : t.length = 3, `${n}(${t.join(",")})`;
92
+ }, Te = (...e) => {
93
+ e = x(e, "rgba");
94
+ let [t, n, r] = e;
95
+ t /= 255, n /= 255, r /= 255;
96
+ const f = ve(t, n, r), c = Ae(t, n, r), o = (c + f) / 2;
97
+ let s, l;
98
+ return c === f ? (s = 0, l = Number.NaN) : s = o < 0.5 ? (c - f) / (c + f) : (c - f) / (2 - c - f), t == c ? l = (n - r) / (c - f) : n == c ? l = 2 + (r - t) / (c - f) : r == c && (l = 4 + (t - n) / (c - f)), l *= 60, l < 0 && (l += 360), e.length > 3 && e[3] !== void 0 ? [l, s, o, e[3]] : [l, s, o];
99
+ }, { round: ie } = Math, yt = (...e) => {
100
+ const t = x(e, "rgba");
101
+ let n = ce(e) || "rgb";
102
+ return n.substr(0, 3) == "hsl" ? mt(Te(t), n) : (t[0] = ie(t[0]), t[1] = ie(t[1]), t[2] = ie(t[2]), (n === "rgba" || t.length > 3 && t[3] < 1) && (t[3] = t.length > 3 ? t[3] : 1, n = "rgba"), `${n}(${t.slice(0, n === "rgb" ? 3 : 4).join(",")})`);
103
+ }, { round: ue } = Math, xe = (...e) => {
104
+ e = x(e, "hsl");
105
+ const [t, n, r] = e;
106
+ let f, c, o;
107
+ if (n === 0)
108
+ f = c = o = r * 255;
109
+ else {
110
+ const s = [0, 0, 0], l = [0, 0, 0], u = r < 0.5 ? r * (1 + n) : r + n - r * n, h = 2 * r - u, b = t / 360;
111
+ s[0] = b + 1 / 3, s[1] = b, s[2] = b - 1 / 3;
112
+ for (let d = 0; d < 3; d++)
113
+ s[d] < 0 && (s[d] += 1), s[d] > 1 && (s[d] -= 1), 6 * s[d] < 1 ? l[d] = h + (u - h) * 6 * s[d] : 2 * s[d] < 1 ? l[d] = u : 3 * s[d] < 2 ? l[d] = h + (u - h) * (2 / 3 - s[d]) * 6 : l[d] = h;
114
+ [f, c, o] = [ue(l[0] * 255), ue(l[1] * 255), ue(l[2] * 255)];
115
+ }
116
+ return e.length > 3 ? [f, c, o, e[3]] : [f, c, o, 1];
117
+ }, Ie = /^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/, Ye = /^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/, Xe = /^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/, De = /^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/, He = /^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/, Fe = /^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/, { round: ze } = Math, Ee = (e) => {
118
+ e = e.toLowerCase().trim();
119
+ let t;
120
+ if (m.format.named)
121
+ try {
122
+ return m.format.named(e);
123
+ } catch {
124
+ }
125
+ if (t = e.match(Ie)) {
126
+ const n = t.slice(1, 4);
127
+ for (let r = 0; r < 3; r++)
128
+ n[r] = +n[r];
129
+ return n[3] = 1, n;
130
+ }
131
+ if (t = e.match(Ye)) {
132
+ const n = t.slice(1, 5);
133
+ for (let r = 0; r < 4; r++)
134
+ n[r] = +n[r];
135
+ return n;
136
+ }
137
+ if (t = e.match(Xe)) {
138
+ const n = t.slice(1, 4);
139
+ for (let r = 0; r < 3; r++)
140
+ n[r] = ze(n[r] * 2.55);
141
+ return n[3] = 1, n;
142
+ }
143
+ if (t = e.match(De)) {
144
+ const n = t.slice(1, 5);
145
+ for (let r = 0; r < 3; r++)
146
+ n[r] = ze(n[r] * 2.55);
147
+ return n[3] = +n[3], n;
148
+ }
149
+ if (t = e.match(He)) {
150
+ const n = t.slice(1, 4);
151
+ n[1] *= 0.01, n[2] *= 0.01;
152
+ const r = xe(n);
153
+ return r[3] = 1, r;
154
+ }
155
+ if (t = e.match(Fe)) {
156
+ const n = t.slice(1, 4);
157
+ n[1] *= 0.01, n[2] *= 0.01;
158
+ const r = xe(n);
159
+ return r[3] = +t[4], r;
160
+ }
161
+ };
162
+ Ee.test = (e) => Ie.test(e) || Ye.test(e) || Xe.test(e) || De.test(e) || He.test(e) || Fe.test(e);
163
+ i.prototype.css = function(e) {
164
+ return yt(this._rgb, e);
165
+ };
166
+ _.css = (...e) => new i(...e, "css");
167
+ m.format.css = Ee;
168
+ m.autodetect.push({
169
+ p: 5,
170
+ test: (e, ...t) => {
171
+ if (!t.length && N(e) === "string" && Ee.test(e))
172
+ return "css";
173
+ }
174
+ });
175
+ m.format.gl = (...e) => {
176
+ const t = x(e, "rgba");
177
+ return t[0] *= 255, t[1] *= 255, t[2] *= 255, t;
178
+ };
179
+ _.gl = (...e) => new i(...e, "gl");
180
+ i.prototype.gl = function() {
181
+ const e = this._rgb;
182
+ return [e[0] / 255, e[1] / 255, e[2] / 255, e[3]];
183
+ };
184
+ const { floor: wt } = Math, kt = (...e) => {
185
+ e = x(e, "hcg");
186
+ let [t, n, r] = e, f, c, o;
187
+ r = r * 255;
188
+ const s = n * 255;
189
+ if (n === 0)
190
+ f = c = o = r;
191
+ else {
192
+ t === 360 && (t = 0), t > 360 && (t -= 360), t < 0 && (t += 360), t /= 60;
193
+ const l = wt(t), u = t - l, h = r * (1 - n), b = h + s * (1 - u), d = h + s * u, $ = h + s;
194
+ switch (l) {
195
+ case 0:
196
+ [f, c, o] = [$, d, h];
197
+ break;
198
+ case 1:
199
+ [f, c, o] = [b, $, h];
200
+ break;
201
+ case 2:
202
+ [f, c, o] = [h, $, d];
203
+ break;
204
+ case 3:
205
+ [f, c, o] = [h, b, $];
206
+ break;
207
+ case 4:
208
+ [f, c, o] = [d, h, $];
209
+ break;
210
+ case 5:
211
+ [f, c, o] = [$, h, b];
212
+ break;
213
+ }
214
+ }
215
+ return [f, c, o, e.length > 3 ? e[3] : 1];
216
+ }, _t = (...e) => {
217
+ const [t, n, r] = x(e, "rgb"), f = ve(t, n, r), c = Ae(t, n, r), o = c - f, s = o * 100 / 255, l = f / (255 - o) * 100;
218
+ let u;
219
+ return o === 0 ? u = Number.NaN : (t === c && (u = (n - r) / o), n === c && (u = 2 + (r - t) / o), r === c && (u = 4 + (t - n) / o), u *= 60, u < 0 && (u += 360)), [u, s, l];
220
+ };
221
+ i.prototype.hcg = function() {
222
+ return _t(this._rgb);
223
+ };
224
+ _.hcg = (...e) => new i(...e, "hcg");
225
+ m.format.hcg = kt;
226
+ m.autodetect.push({
227
+ p: 1,
228
+ test: (...e) => {
229
+ if (e = x(e, "hcg"), N(e) === "array" && e.length === 3)
230
+ return "hcg";
231
+ }
232
+ });
233
+ const $t = /^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/, Nt = /^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/, Ue = (e) => {
234
+ if (e.match($t)) {
235
+ (e.length === 4 || e.length === 7) && (e = e.substr(1)), e.length === 3 && (e = e.split(""), e = e[0] + e[0] + e[1] + e[1] + e[2] + e[2]);
236
+ const t = parseInt(e, 16), n = t >> 16, r = t >> 8 & 255, f = t & 255;
237
+ return [n, r, f, 1];
238
+ }
239
+ if (e.match(Nt)) {
240
+ (e.length === 5 || e.length === 9) && (e = e.substr(1)), e.length === 4 && (e = e.split(""), e = e[0] + e[0] + e[1] + e[1] + e[2] + e[2] + e[3] + e[3]);
241
+ const t = parseInt(e, 16), n = t >> 24 & 255, r = t >> 16 & 255, f = t >> 8 & 255, c = Math.round((t & 255) / 255 * 100) / 100;
242
+ return [n, r, f, c];
243
+ }
244
+ throw new Error(`unknown hex color: ${e}`);
245
+ }, { round: Q } = Math, Ve = (...e) => {
246
+ let [t, n, r, f] = x(e, "rgba"), c = ce(e) || "auto";
247
+ f === void 0 && (f = 1), c === "auto" && (c = f < 1 ? "rgba" : "rgb"), t = Q(t), n = Q(n), r = Q(r);
248
+ let s = "000000" + (t << 16 | n << 8 | r).toString(16);
249
+ s = s.substr(s.length - 6);
250
+ let l = "0" + Q(f * 255).toString(16);
251
+ switch (l = l.substr(l.length - 2), c.toLowerCase()) {
252
+ case "rgba":
253
+ return `#${s}${l}`;
254
+ case "argb":
255
+ return `#${l}${s}`;
256
+ default:
257
+ return `#${s}`;
258
+ }
259
+ };
260
+ i.prototype.hex = function(e) {
261
+ return Ve(this._rgb, e);
262
+ };
263
+ _.hex = (...e) => new i(...e, "hex");
264
+ m.format.hex = Ue;
265
+ m.autodetect.push({
266
+ p: 4,
267
+ test: (e, ...t) => {
268
+ if (!t.length && N(e) === "string" && [3, 4, 5, 6, 7, 8, 9].indexOf(e.length) >= 0)
269
+ return "hex";
270
+ }
271
+ });
272
+ const { cos: D } = Math, xt = (...e) => {
273
+ e = x(e, "hsi");
274
+ let [t, n, r] = e, f, c, o;
275
+ return isNaN(t) && (t = 0), isNaN(n) && (n = 0), t > 360 && (t -= 360), t < 0 && (t += 360), t /= 360, t < 1 / 3 ? (o = (1 - n) / 3, f = (1 + n * D(O * t) / D(le - O * t)) / 3, c = 1 - (o + f)) : t < 2 / 3 ? (t -= 1 / 3, f = (1 - n) / 3, c = (1 + n * D(O * t) / D(le - O * t)) / 3, o = 1 - (f + c)) : (t -= 2 / 3, c = (1 - n) / 3, o = (1 + n * D(O * t) / D(le - O * t)) / 3, f = 1 - (c + o)), f = F(r * f * 3), c = F(r * c * 3), o = F(r * o * 3), [f * 255, c * 255, o * 255, e.length > 3 ? e[3] : 1];
276
+ }, { min: Mt, sqrt: vt, acos: At } = Math, Et = (...e) => {
277
+ let [t, n, r] = x(e, "rgb");
278
+ t /= 255, n /= 255, r /= 255;
279
+ let f;
280
+ const c = Mt(t, n, r), o = (t + n + r) / 3, s = o > 0 ? 1 - c / o : 0;
281
+ return s === 0 ? f = NaN : (f = (t - n + (t - r)) / 2, f /= vt((t - n) * (t - n) + (t - r) * (n - r)), f = At(f), r > n && (f = O - f), f /= O), [f * 360, s, o];
282
+ };
283
+ i.prototype.hsi = function() {
284
+ return Et(this._rgb);
285
+ };
286
+ _.hsi = (...e) => new i(...e, "hsi");
287
+ m.format.hsi = xt;
288
+ m.autodetect.push({
289
+ p: 2,
290
+ test: (...e) => {
291
+ if (e = x(e, "hsi"), N(e) === "array" && e.length === 3)
292
+ return "hsi";
293
+ }
294
+ });
295
+ i.prototype.hsl = function() {
296
+ return Te(this._rgb);
297
+ };
298
+ _.hsl = (...e) => new i(...e, "hsl");
299
+ m.format.hsl = xe;
300
+ m.autodetect.push({
301
+ p: 2,
302
+ test: (...e) => {
303
+ if (e = x(e, "hsl"), N(e) === "array" && e.length === 3)
304
+ return "hsl";
305
+ }
306
+ });
307
+ const { floor: Rt } = Math, Lt = (...e) => {
308
+ e = x(e, "hsv");
309
+ let [t, n, r] = e, f, c, o;
310
+ if (r *= 255, n === 0)
311
+ f = c = o = r;
312
+ else {
313
+ t === 360 && (t = 0), t > 360 && (t -= 360), t < 0 && (t += 360), t /= 60;
314
+ const s = Rt(t), l = t - s, u = r * (1 - n), h = r * (1 - n * l), b = r * (1 - n * (1 - l));
315
+ switch (s) {
316
+ case 0:
317
+ [f, c, o] = [r, b, u];
318
+ break;
319
+ case 1:
320
+ [f, c, o] = [h, r, u];
321
+ break;
322
+ case 2:
323
+ [f, c, o] = [u, r, b];
324
+ break;
325
+ case 3:
326
+ [f, c, o] = [u, h, r];
327
+ break;
328
+ case 4:
329
+ [f, c, o] = [b, u, r];
330
+ break;
331
+ case 5:
332
+ [f, c, o] = [r, u, h];
333
+ break;
334
+ }
335
+ }
336
+ return [f, c, o, e.length > 3 ? e[3] : 1];
337
+ }, { min: zt, max: Ct } = Math, jt = (...e) => {
338
+ e = x(e, "rgb");
339
+ let [t, n, r] = e;
340
+ const f = zt(t, n, r), c = Ct(t, n, r), o = c - f;
341
+ let s, l, u;
342
+ return u = c / 255, c === 0 ? (s = Number.NaN, l = 0) : (l = o / c, t === c && (s = (n - r) / o), n === c && (s = 2 + (r - t) / o), r === c && (s = 4 + (t - n) / o), s *= 60, s < 0 && (s += 360)), [s, l, u];
343
+ };
344
+ i.prototype.hsv = function() {
345
+ return jt(this._rgb);
346
+ };
347
+ _.hsv = (...e) => new i(...e, "hsv");
348
+ m.format.hsv = Lt;
349
+ m.autodetect.push({
350
+ p: 2,
351
+ test: (...e) => {
352
+ if (e = x(e, "hsv"), N(e) === "array" && e.length === 3)
353
+ return "hsv";
354
+ }
355
+ });
356
+ const j = {
357
+ // Corresponds roughly to RGB brighter/darker
358
+ Kn: 18,
359
+ // D65 standard referent
360
+ Xn: 0.95047,
361
+ Yn: 1,
362
+ Zn: 1.08883,
363
+ t0: 0.137931034,
364
+ // 4 / 29
365
+ t1: 0.206896552,
366
+ // 6 / 29
367
+ t2: 0.12841855,
368
+ // 3 * t1 * t1
369
+ t3: 8856452e-9
370
+ // t1 * t1 * t1
371
+ }, { pow: qt } = Math, Ze = (...e) => {
372
+ e = x(e, "lab");
373
+ const [t, n, r] = e;
374
+ let f, c, o, s, l, u;
375
+ return c = (t + 16) / 116, f = isNaN(n) ? c : c + n / 500, o = isNaN(r) ? c : c - r / 200, c = j.Yn * de(c), f = j.Xn * de(f), o = j.Zn * de(o), s = be(3.2404542 * f - 1.5371385 * c - 0.4985314 * o), l = be(-0.969266 * f + 1.8760108 * c + 0.041556 * o), u = be(0.0556434 * f - 0.2040259 * c + 1.0572252 * o), [s, l, u, e.length > 3 ? e[3] : 1];
376
+ }, be = (e) => 255 * (e <= 304e-5 ? 12.92 * e : 1.055 * qt(e, 1 / 2.4) - 0.055), de = (e) => e > j.t1 ? e * e * e : j.t2 * (e - j.t0), { pow: Ke } = Math, We = (...e) => {
377
+ const [t, n, r] = x(e, "rgb"), [f, c, o] = Pt(t, n, r), s = 116 * c - 16;
378
+ return [s < 0 ? 0 : s, 500 * (f - c), 200 * (c - o)];
379
+ }, he = (e) => (e /= 255) <= 0.04045 ? e / 12.92 : Ke((e + 0.055) / 1.055, 2.4), pe = (e) => e > j.t3 ? Ke(e, 1 / 3) : e / j.t2 + j.t0, Pt = (e, t, n) => {
380
+ e = he(e), t = he(t), n = he(n);
381
+ const r = pe(
382
+ (0.4124564 * e + 0.3575761 * t + 0.1804375 * n) / j.Xn
383
+ ), f = pe(
384
+ (0.2126729 * e + 0.7151522 * t + 0.072175 * n) / j.Yn
385
+ ), c = pe(
386
+ (0.0193339 * e + 0.119192 * t + 0.9503041 * n) / j.Zn
387
+ );
388
+ return [r, f, c];
389
+ };
390
+ i.prototype.lab = function() {
391
+ return We(this._rgb);
392
+ };
393
+ _.lab = (...e) => new i(...e, "lab");
394
+ m.format.lab = Ze;
395
+ m.autodetect.push({
396
+ p: 2,
397
+ test: (...e) => {
398
+ if (e = x(e, "lab"), N(e) === "array" && e.length === 3)
399
+ return "lab";
400
+ }
401
+ });
402
+ const { sin: Gt, cos: Bt } = Math, Je = (...e) => {
403
+ let [t, n, r] = x(e, "lch");
404
+ return isNaN(r) && (r = 0), r = r * bt, [t, Bt(r) * n, Gt(r) * n];
405
+ }, Qe = (...e) => {
406
+ e = x(e, "lch");
407
+ const [t, n, r] = e, [f, c, o] = Je(t, n, r), [s, l, u] = Ze(f, c, o);
408
+ return [s, l, u, e.length > 3 ? e[3] : 1];
409
+ }, Ot = (...e) => {
410
+ const t = x(e, "hcl").reverse();
411
+ return Qe(...t);
412
+ }, { sqrt: St, atan2: Tt, round: It } = Math, et = (...e) => {
413
+ const [t, n, r] = x(e, "lab"), f = St(n * n + r * r);
414
+ let c = (Tt(r, n) * dt + 360) % 360;
415
+ return It(f * 1e4) === 0 && (c = Number.NaN), [t, f, c];
416
+ }, tt = (...e) => {
417
+ const [t, n, r] = x(e, "rgb"), [f, c, o] = We(t, n, r);
418
+ return et(f, c, o);
419
+ };
420
+ i.prototype.lch = function() {
421
+ return tt(this._rgb);
422
+ };
423
+ i.prototype.hcl = function() {
424
+ return tt(this._rgb).reverse();
425
+ };
426
+ _.lch = (...e) => new i(...e, "lch");
427
+ _.hcl = (...e) => new i(...e, "hcl");
428
+ m.format.lch = Qe;
429
+ m.format.hcl = Ot;
430
+ ["lch", "hcl"].forEach(
431
+ (e) => m.autodetect.push({
432
+ p: 2,
433
+ test: (...t) => {
434
+ if (t = x(t, e), N(t) === "array" && t.length === 3)
435
+ return e;
436
+ }
437
+ })
438
+ );
439
+ const U = {
440
+ aliceblue: "#f0f8ff",
441
+ antiquewhite: "#faebd7",
442
+ aqua: "#00ffff",
443
+ aquamarine: "#7fffd4",
444
+ azure: "#f0ffff",
445
+ beige: "#f5f5dc",
446
+ bisque: "#ffe4c4",
447
+ black: "#000000",
448
+ blanchedalmond: "#ffebcd",
449
+ blue: "#0000ff",
450
+ blueviolet: "#8a2be2",
451
+ brown: "#a52a2a",
452
+ burlywood: "#deb887",
453
+ cadetblue: "#5f9ea0",
454
+ chartreuse: "#7fff00",
455
+ chocolate: "#d2691e",
456
+ coral: "#ff7f50",
457
+ cornflowerblue: "#6495ed",
458
+ cornsilk: "#fff8dc",
459
+ crimson: "#dc143c",
460
+ cyan: "#00ffff",
461
+ darkblue: "#00008b",
462
+ darkcyan: "#008b8b",
463
+ darkgoldenrod: "#b8860b",
464
+ darkgray: "#a9a9a9",
465
+ darkgreen: "#006400",
466
+ darkgrey: "#a9a9a9",
467
+ darkkhaki: "#bdb76b",
468
+ darkmagenta: "#8b008b",
469
+ darkolivegreen: "#556b2f",
470
+ darkorange: "#ff8c00",
471
+ darkorchid: "#9932cc",
472
+ darkred: "#8b0000",
473
+ darksalmon: "#e9967a",
474
+ darkseagreen: "#8fbc8f",
475
+ darkslateblue: "#483d8b",
476
+ darkslategray: "#2f4f4f",
477
+ darkslategrey: "#2f4f4f",
478
+ darkturquoise: "#00ced1",
479
+ darkviolet: "#9400d3",
480
+ deeppink: "#ff1493",
481
+ deepskyblue: "#00bfff",
482
+ dimgray: "#696969",
483
+ dimgrey: "#696969",
484
+ dodgerblue: "#1e90ff",
485
+ firebrick: "#b22222",
486
+ floralwhite: "#fffaf0",
487
+ forestgreen: "#228b22",
488
+ fuchsia: "#ff00ff",
489
+ gainsboro: "#dcdcdc",
490
+ ghostwhite: "#f8f8ff",
491
+ gold: "#ffd700",
492
+ goldenrod: "#daa520",
493
+ gray: "#808080",
494
+ green: "#008000",
495
+ greenyellow: "#adff2f",
496
+ grey: "#808080",
497
+ honeydew: "#f0fff0",
498
+ hotpink: "#ff69b4",
499
+ indianred: "#cd5c5c",
500
+ indigo: "#4b0082",
501
+ ivory: "#fffff0",
502
+ khaki: "#f0e68c",
503
+ laserlemon: "#ffff54",
504
+ lavender: "#e6e6fa",
505
+ lavenderblush: "#fff0f5",
506
+ lawngreen: "#7cfc00",
507
+ lemonchiffon: "#fffacd",
508
+ lightblue: "#add8e6",
509
+ lightcoral: "#f08080",
510
+ lightcyan: "#e0ffff",
511
+ lightgoldenrod: "#fafad2",
512
+ lightgoldenrodyellow: "#fafad2",
513
+ lightgray: "#d3d3d3",
514
+ lightgreen: "#90ee90",
515
+ lightgrey: "#d3d3d3",
516
+ lightpink: "#ffb6c1",
517
+ lightsalmon: "#ffa07a",
518
+ lightseagreen: "#20b2aa",
519
+ lightskyblue: "#87cefa",
520
+ lightslategray: "#778899",
521
+ lightslategrey: "#778899",
522
+ lightsteelblue: "#b0c4de",
523
+ lightyellow: "#ffffe0",
524
+ lime: "#00ff00",
525
+ limegreen: "#32cd32",
526
+ linen: "#faf0e6",
527
+ magenta: "#ff00ff",
528
+ maroon: "#800000",
529
+ maroon2: "#7f0000",
530
+ maroon3: "#b03060",
531
+ mediumaquamarine: "#66cdaa",
532
+ mediumblue: "#0000cd",
533
+ mediumorchid: "#ba55d3",
534
+ mediumpurple: "#9370db",
535
+ mediumseagreen: "#3cb371",
536
+ mediumslateblue: "#7b68ee",
537
+ mediumspringgreen: "#00fa9a",
538
+ mediumturquoise: "#48d1cc",
539
+ mediumvioletred: "#c71585",
540
+ midnightblue: "#191970",
541
+ mintcream: "#f5fffa",
542
+ mistyrose: "#ffe4e1",
543
+ moccasin: "#ffe4b5",
544
+ navajowhite: "#ffdead",
545
+ navy: "#000080",
546
+ oldlace: "#fdf5e6",
547
+ olive: "#808000",
548
+ olivedrab: "#6b8e23",
549
+ orange: "#ffa500",
550
+ orangered: "#ff4500",
551
+ orchid: "#da70d6",
552
+ palegoldenrod: "#eee8aa",
553
+ palegreen: "#98fb98",
554
+ paleturquoise: "#afeeee",
555
+ palevioletred: "#db7093",
556
+ papayawhip: "#ffefd5",
557
+ peachpuff: "#ffdab9",
558
+ peru: "#cd853f",
559
+ pink: "#ffc0cb",
560
+ plum: "#dda0dd",
561
+ powderblue: "#b0e0e6",
562
+ purple: "#800080",
563
+ purple2: "#7f007f",
564
+ purple3: "#a020f0",
565
+ rebeccapurple: "#663399",
566
+ red: "#ff0000",
567
+ rosybrown: "#bc8f8f",
568
+ royalblue: "#4169e1",
569
+ saddlebrown: "#8b4513",
570
+ salmon: "#fa8072",
571
+ sandybrown: "#f4a460",
572
+ seagreen: "#2e8b57",
573
+ seashell: "#fff5ee",
574
+ sienna: "#a0522d",
575
+ silver: "#c0c0c0",
576
+ skyblue: "#87ceeb",
577
+ slateblue: "#6a5acd",
578
+ slategray: "#708090",
579
+ slategrey: "#708090",
580
+ snow: "#fffafa",
581
+ springgreen: "#00ff7f",
582
+ steelblue: "#4682b4",
583
+ tan: "#d2b48c",
584
+ teal: "#008080",
585
+ thistle: "#d8bfd8",
586
+ tomato: "#ff6347",
587
+ turquoise: "#40e0d0",
588
+ violet: "#ee82ee",
589
+ wheat: "#f5deb3",
590
+ white: "#ffffff",
591
+ whitesmoke: "#f5f5f5",
592
+ yellow: "#ffff00",
593
+ yellowgreen: "#9acd32"
594
+ };
595
+ i.prototype.name = function() {
596
+ const e = Ve(this._rgb, "rgb");
597
+ for (let t of Object.keys(U))
598
+ if (U[t] === e) return t.toLowerCase();
599
+ return e;
600
+ };
601
+ m.format.named = (e) => {
602
+ if (e = e.toLowerCase(), U[e]) return Ue(U[e]);
603
+ throw new Error("unknown color name: " + e);
604
+ };
605
+ m.autodetect.push({
606
+ p: 5,
607
+ test: (e, ...t) => {
608
+ if (!t.length && N(e) === "string" && U[e.toLowerCase()])
609
+ return "named";
610
+ }
611
+ });
612
+ const Yt = (e) => {
613
+ if (N(e) == "number" && e >= 0 && e <= 16777215) {
614
+ const t = e >> 16, n = e >> 8 & 255, r = e & 255;
615
+ return [t, n, r, 1];
616
+ }
617
+ throw new Error("unknown num color: " + e);
618
+ }, Xt = (...e) => {
619
+ const [t, n, r] = x(e, "rgb");
620
+ return (t << 16) + (n << 8) + r;
621
+ };
622
+ i.prototype.num = function() {
623
+ return Xt(this._rgb);
624
+ };
625
+ _.num = (...e) => new i(...e, "num");
626
+ m.format.num = Yt;
627
+ m.autodetect.push({
628
+ p: 5,
629
+ test: (...e) => {
630
+ if (e.length === 1 && N(e[0]) === "number" && e[0] >= 0 && e[0] <= 16777215)
631
+ return "num";
632
+ }
633
+ });
634
+ const { round: nt } = Math;
635
+ i.prototype.rgb = function(e = !0) {
636
+ return e === !1 ? this._rgb.slice(0, 3) : this._rgb.slice(0, 3).map(nt);
637
+ };
638
+ i.prototype.rgba = function(e = !0) {
639
+ return this._rgb.slice(0, 4).map((t, n) => n < 3 ? e === !1 ? t : nt(t) : t);
640
+ };
641
+ _.rgb = (...e) => new i(...e, "rgb");
642
+ m.format.rgb = (...e) => {
643
+ const t = x(e, "rgba");
644
+ return t[3] === void 0 && (t[3] = 1), t;
645
+ };
646
+ m.autodetect.push({
647
+ p: 3,
648
+ test: (...e) => {
649
+ if (e = x(e, "rgba"), N(e) === "array" && (e.length === 3 || e.length === 4 && N(e[3]) == "number" && e[3] >= 0 && e[3] <= 1))
650
+ return "rgb";
651
+ }
652
+ });
653
+ const { log: ee } = Math, rt = (e) => {
654
+ const t = e / 100;
655
+ let n, r, f;
656
+ return t < 66 ? (n = 255, r = t < 6 ? 0 : -155.25485562709179 - 0.44596950469579133 * (r = t - 2) + 104.49216199393888 * ee(r), f = t < 20 ? 0 : -254.76935184120902 + 0.8274096064007395 * (f = t - 10) + 115.67994401066147 * ee(f)) : (n = 351.97690566805693 + 0.114206453784165 * (n = t - 55) - 40.25366309332127 * ee(n), r = 325.4494125711974 + 0.07943456536662342 * (r = t - 50) - 28.0852963507957 * ee(r), f = 255), [n, r, f, 1];
657
+ }, { round: Dt } = Math, Ht = (...e) => {
658
+ const t = x(e, "rgb"), n = t[0], r = t[2];
659
+ let f = 1e3, c = 4e4;
660
+ const o = 0.4;
661
+ let s;
662
+ for (; c - f > o; ) {
663
+ s = (c + f) * 0.5;
664
+ const l = rt(s);
665
+ l[2] / l[0] >= r / n ? c = s : f = s;
666
+ }
667
+ return Dt(s);
668
+ };
669
+ i.prototype.temp = i.prototype.kelvin = i.prototype.temperature = function() {
670
+ return Ht(this._rgb);
671
+ };
672
+ _.temp = _.kelvin = _.temperature = (...e) => new i(...e, "temp");
673
+ m.format.temp = m.format.kelvin = m.format.temperature = rt;
674
+ const { pow: ne, sign: Ft } = Math, ft = (...e) => {
675
+ e = x(e, "lab");
676
+ const [t, n, r] = e, f = ne(t + 0.3963377774 * n + 0.2158037573 * r, 3), c = ne(t - 0.1055613458 * n - 0.0638541728 * r, 3), o = ne(t - 0.0894841775 * n - 1.291485548 * r, 3);
677
+ return [
678
+ 255 * ge(4.0767416621 * f - 3.3077115913 * c + 0.2309699292 * o),
679
+ 255 * ge(-1.2684380046 * f + 2.6097574011 * c - 0.3413193965 * o),
680
+ 255 * ge(-0.0041960863 * f - 0.7034186147 * c + 1.707614701 * o),
681
+ e.length > 3 ? e[3] : 1
682
+ ];
683
+ };
684
+ function ge(e) {
685
+ const t = Math.abs(e);
686
+ return t > 31308e-7 ? (Ft(e) || 1) * (1.055 * ne(t, 1 / 2.4) - 0.055) : e * 12.92;
687
+ }
688
+ const { cbrt: me, pow: Ut, sign: Vt } = Math, ct = (...e) => {
689
+ const [t, n, r] = x(e, "rgb"), [f, c, o] = [
690
+ ye(t / 255),
691
+ ye(n / 255),
692
+ ye(r / 255)
693
+ ], s = me(0.4122214708 * f + 0.5363325363 * c + 0.0514459929 * o), l = me(0.2119034982 * f + 0.6806995451 * c + 0.1073969566 * o), u = me(0.0883024619 * f + 0.2817188376 * c + 0.6299787005 * o);
694
+ return [
695
+ 0.2104542553 * s + 0.793617785 * l - 0.0040720468 * u,
696
+ 1.9779984951 * s - 2.428592205 * l + 0.4505937099 * u,
697
+ 0.0259040371 * s + 0.7827717662 * l - 0.808675766 * u
698
+ ];
699
+ };
700
+ function ye(e) {
701
+ const t = Math.abs(e);
702
+ return t < 0.04045 ? e / 12.92 : (Vt(e) || 1) * Ut((t + 0.055) / 1.055, 2.4);
703
+ }
704
+ i.prototype.oklab = function() {
705
+ return ct(this._rgb);
706
+ };
707
+ _.oklab = (...e) => new i(...e, "oklab");
708
+ m.format.oklab = ft;
709
+ m.autodetect.push({
710
+ p: 3,
711
+ test: (...e) => {
712
+ if (e = x(e, "oklab"), N(e) === "array" && e.length === 3)
713
+ return "oklab";
714
+ }
715
+ });
716
+ const Zt = (...e) => {
717
+ e = x(e, "lch");
718
+ const [t, n, r] = e, [f, c, o] = Je(t, n, r), [s, l, u] = ft(f, c, o);
719
+ return [s, l, u, e.length > 3 ? e[3] : 1];
720
+ }, Kt = (...e) => {
721
+ const [t, n, r] = x(e, "rgb"), [f, c, o] = ct(t, n, r);
722
+ return et(f, c, o);
723
+ };
724
+ i.prototype.oklch = function() {
725
+ return Kt(this._rgb);
726
+ };
727
+ _.oklch = (...e) => new i(...e, "oklch");
728
+ m.format.oklch = Zt;
729
+ m.autodetect.push({
730
+ p: 3,
731
+ test: (...e) => {
732
+ if (e = x(e, "oklch"), N(e) === "array" && e.length === 3)
733
+ return "oklch";
734
+ }
735
+ });
736
+ i.prototype.alpha = function(e, t = !1) {
737
+ return e !== void 0 && N(e) === "number" ? t ? (this._rgb[3] = e, this) : new i([this._rgb[0], this._rgb[1], this._rgb[2], e], "rgb") : this._rgb[3];
738
+ };
739
+ i.prototype.clipped = function() {
740
+ return this._rgb._clipped || !1;
741
+ };
742
+ i.prototype.darken = function(e = 1) {
743
+ const t = this, n = t.lab();
744
+ return n[0] -= j.Kn * e, new i(n, "lab").alpha(t.alpha(), !0);
745
+ };
746
+ i.prototype.brighten = function(e = 1) {
747
+ return this.darken(-e);
748
+ };
749
+ i.prototype.darker = i.prototype.darken;
750
+ i.prototype.brighter = i.prototype.brighten;
751
+ i.prototype.get = function(e) {
752
+ const [t, n] = e.split("."), r = this[t]();
753
+ if (n) {
754
+ const f = t.indexOf(n) - (t.substr(0, 2) === "ok" ? 2 : 0);
755
+ if (f > -1) return r[f];
756
+ throw new Error(`unknown channel ${n} in mode ${t}`);
757
+ } else
758
+ return r;
759
+ };
760
+ const { pow: Wt } = Math, Jt = 1e-7, Qt = 20;
761
+ i.prototype.luminance = function(e, t = "rgb") {
762
+ if (e !== void 0 && N(e) === "number") {
763
+ if (e === 0)
764
+ return new i([0, 0, 0, this._rgb[3]], "rgb");
765
+ if (e === 1)
766
+ return new i([255, 255, 255, this._rgb[3]], "rgb");
767
+ let n = this.luminance(), r = Qt;
768
+ const f = (o, s) => {
769
+ const l = o.interpolate(s, 0.5, t), u = l.luminance();
770
+ return Math.abs(e - u) < Jt || !r-- ? l : u > e ? f(o, l) : f(l, s);
771
+ }, c = (n > e ? f(new i([0, 0, 0]), this) : f(this, new i([255, 255, 255]))).rgb();
772
+ return new i([...c, this._rgb[3]]);
773
+ }
774
+ return en(...this._rgb.slice(0, 3));
775
+ };
776
+ const en = (e, t, n) => (e = we(e), t = we(t), n = we(n), 0.2126 * e + 0.7152 * t + 0.0722 * n), we = (e) => (e /= 255, e <= 0.03928 ? e / 12.92 : Wt((e + 0.055) / 1.055, 2.4)), C = {}, K = (e, t, n = 0.5, ...r) => {
777
+ let f = r[0] || "lrgb";
778
+ if (!C[f] && !r.length && (f = Object.keys(C)[0]), !C[f])
779
+ throw new Error(`interpolation mode ${f} is not defined`);
780
+ return N(e) !== "object" && (e = new i(e)), N(t) !== "object" && (t = new i(t)), C[f](e, t, n).alpha(
781
+ e.alpha() + n * (t.alpha() - e.alpha())
782
+ );
783
+ };
784
+ i.prototype.mix = i.prototype.interpolate = function(e, t = 0.5, ...n) {
785
+ return K(this, e, t, ...n);
786
+ };
787
+ i.prototype.premultiply = function(e = !1) {
788
+ const t = this._rgb, n = t[3];
789
+ return e ? (this._rgb = [t[0] * n, t[1] * n, t[2] * n, n], this) : new i([t[0] * n, t[1] * n, t[2] * n, n], "rgb");
790
+ };
791
+ i.prototype.saturate = function(e = 1) {
792
+ const t = this, n = t.lch();
793
+ return n[1] += j.Kn * e, n[1] < 0 && (n[1] = 0), new i(n, "lch").alpha(t.alpha(), !0);
794
+ };
795
+ i.prototype.desaturate = function(e = 1) {
796
+ return this.saturate(-e);
797
+ };
798
+ i.prototype.set = function(e, t, n = !1) {
799
+ const [r, f] = e.split("."), c = this[r]();
800
+ if (f) {
801
+ const o = r.indexOf(f) - (r.substr(0, 2) === "ok" ? 2 : 0);
802
+ if (o > -1) {
803
+ if (N(t) == "string")
804
+ switch (t.charAt(0)) {
805
+ case "+":
806
+ c[o] += +t;
807
+ break;
808
+ case "-":
809
+ c[o] += +t;
810
+ break;
811
+ case "*":
812
+ c[o] *= +t.substr(1);
813
+ break;
814
+ case "/":
815
+ c[o] /= +t.substr(1);
816
+ break;
817
+ default:
818
+ c[o] = +t;
819
+ }
820
+ else if (N(t) === "number")
821
+ c[o] = t;
822
+ else
823
+ throw new Error("unsupported value for Color.set");
824
+ const s = new i(c, r);
825
+ return n ? (this._rgb = s._rgb, this) : s;
826
+ }
827
+ throw new Error(`unknown channel ${f} in mode ${r}`);
828
+ } else
829
+ return c;
830
+ };
831
+ i.prototype.tint = function(e = 0.5, ...t) {
832
+ return K(this, "white", e, ...t);
833
+ };
834
+ i.prototype.shade = function(e = 0.5, ...t) {
835
+ return K(this, "black", e, ...t);
836
+ };
837
+ const tn = (e, t, n) => {
838
+ const r = e._rgb, f = t._rgb;
839
+ return new i(
840
+ r[0] + n * (f[0] - r[0]),
841
+ r[1] + n * (f[1] - r[1]),
842
+ r[2] + n * (f[2] - r[2]),
843
+ "rgb"
844
+ );
845
+ };
846
+ C.rgb = tn;
847
+ const { sqrt: ke, pow: H } = Math, nn = (e, t, n) => {
848
+ const [r, f, c] = e._rgb, [o, s, l] = t._rgb;
849
+ return new i(
850
+ ke(H(r, 2) * (1 - n) + H(o, 2) * n),
851
+ ke(H(f, 2) * (1 - n) + H(s, 2) * n),
852
+ ke(H(c, 2) * (1 - n) + H(l, 2) * n),
853
+ "rgb"
854
+ );
855
+ };
856
+ C.lrgb = nn;
857
+ const rn = (e, t, n) => {
858
+ const r = e.lab(), f = t.lab();
859
+ return new i(
860
+ r[0] + n * (f[0] - r[0]),
861
+ r[1] + n * (f[1] - r[1]),
862
+ r[2] + n * (f[2] - r[2]),
863
+ "lab"
864
+ );
865
+ };
866
+ C.lab = rn;
867
+ const V = (e, t, n, r) => {
868
+ let f, c;
869
+ r === "hsl" ? (f = e.hsl(), c = t.hsl()) : r === "hsv" ? (f = e.hsv(), c = t.hsv()) : r === "hcg" ? (f = e.hcg(), c = t.hcg()) : r === "hsi" ? (f = e.hsi(), c = t.hsi()) : r === "lch" || r === "hcl" ? (r = "hcl", f = e.hcl(), c = t.hcl()) : r === "oklch" && (f = e.oklch().reverse(), c = t.oklch().reverse());
870
+ let o, s, l, u, h, b;
871
+ (r.substr(0, 1) === "h" || r === "oklch") && ([o, l, h] = f, [s, u, b] = c);
872
+ let d, $, E, R;
873
+ return !isNaN(o) && !isNaN(s) ? (s > o && s - o > 180 ? R = s - (o + 360) : s < o && o - s > 180 ? R = s + 360 - o : R = s - o, $ = o + n * R) : isNaN(o) ? isNaN(s) ? $ = Number.NaN : ($ = s, (h == 1 || h == 0) && r != "hsv" && (d = u)) : ($ = o, (b == 1 || b == 0) && r != "hsv" && (d = l)), d === void 0 && (d = l + n * (u - l)), E = h + n * (b - h), r === "oklch" ? new i([E, d, $], r) : new i([$, d, E], r);
874
+ }, ot = (e, t, n) => V(e, t, n, "lch");
875
+ C.lch = ot;
876
+ C.hcl = ot;
877
+ const fn = (e, t, n) => {
878
+ const r = e.num(), f = t.num();
879
+ return new i(r + n * (f - r), "num");
880
+ };
881
+ C.num = fn;
882
+ const cn = (e, t, n) => V(e, t, n, "hcg");
883
+ C.hcg = cn;
884
+ const on = (e, t, n) => V(e, t, n, "hsi");
885
+ C.hsi = on;
886
+ const sn = (e, t, n) => V(e, t, n, "hsl");
887
+ C.hsl = sn;
888
+ const ln = (e, t, n) => V(e, t, n, "hsv");
889
+ C.hsv = ln;
890
+ const an = (e, t, n) => {
891
+ const r = e.oklab(), f = t.oklab();
892
+ return new i(
893
+ r[0] + n * (f[0] - r[0]),
894
+ r[1] + n * (f[1] - r[1]),
895
+ r[2] + n * (f[2] - r[2]),
896
+ "oklab"
897
+ );
898
+ };
899
+ C.oklab = an;
900
+ const un = (e, t, n) => V(e, t, n, "oklch");
901
+ C.oklch = un;
902
+ const { pow: _e, sqrt: $e, PI: Ne, cos: Ce, sin: je, atan2: bn } = Math, dn = (e, t = "lrgb", n = null) => {
903
+ const r = e.length;
904
+ n || (n = Array.from(new Array(r)).map(() => 1));
905
+ const f = r / n.reduce(function(b, d) {
906
+ return b + d;
907
+ });
908
+ if (n.forEach((b, d) => {
909
+ n[d] *= f;
910
+ }), e = e.map((b) => new i(b)), t === "lrgb")
911
+ return hn(e, n);
912
+ const c = e.shift(), o = c.get(t), s = [];
913
+ let l = 0, u = 0;
914
+ for (let b = 0; b < o.length; b++)
915
+ if (o[b] = (o[b] || 0) * n[0], s.push(isNaN(o[b]) ? 0 : n[0]), t.charAt(b) === "h" && !isNaN(o[b])) {
916
+ const d = o[b] / 180 * Ne;
917
+ l += Ce(d) * n[0], u += je(d) * n[0];
918
+ }
919
+ let h = c.alpha() * n[0];
920
+ e.forEach((b, d) => {
921
+ const $ = b.get(t);
922
+ h += b.alpha() * n[d + 1];
923
+ for (let E = 0; E < o.length; E++)
924
+ if (!isNaN($[E]))
925
+ if (s[E] += n[d + 1], t.charAt(E) === "h") {
926
+ const R = $[E] / 180 * Ne;
927
+ l += Ce(R) * n[d + 1], u += je(R) * n[d + 1];
928
+ } else
929
+ o[E] += $[E] * n[d + 1];
930
+ });
931
+ for (let b = 0; b < o.length; b++)
932
+ if (t.charAt(b) === "h") {
933
+ let d = bn(u / s[b], l / s[b]) / Ne * 180;
934
+ for (; d < 0; ) d += 360;
935
+ for (; d >= 360; ) d -= 360;
936
+ o[b] = d;
937
+ } else
938
+ o[b] = o[b] / s[b];
939
+ return h /= r, new i(o, t).alpha(h > 0.99999 ? 1 : h, !0);
940
+ }, hn = (e, t) => {
941
+ const n = e.length, r = [0, 0, 0, 0];
942
+ for (let f = 0; f < e.length; f++) {
943
+ const c = e[f], o = t[f] / n, s = c._rgb;
944
+ r[0] += _e(s[0], 2) * o, r[1] += _e(s[1], 2) * o, r[2] += _e(s[2], 2) * o, r[3] += s[3] * o;
945
+ }
946
+ return r[0] = $e(r[0]), r[1] = $e(r[1]), r[2] = $e(r[2]), r[3] > 0.9999999 && (r[3] = 1), new i(Me(r));
947
+ }, { pow: pn } = Math;
948
+ function fe(e) {
949
+ let t = "rgb", n = _("#ccc"), r = 0, f = [0, 1], c = [], o = [0, 0], s = !1, l = [], u = !1, h = 0, b = 1, d = !1, $ = {}, E = !0, R = 1;
950
+ const k = function(a) {
951
+ if (a = a || ["#fff", "#000"], a && N(a) === "string" && _.brewer && _.brewer[a.toLowerCase()] && (a = _.brewer[a.toLowerCase()]), N(a) === "array") {
952
+ a.length === 1 && (a = [a[0], a[0]]), a = a.slice(0);
953
+ for (let p = 0; p < a.length; p++)
954
+ a[p] = _(a[p]);
955
+ c.length = 0;
956
+ for (let p = 0; p < a.length; p++)
957
+ c.push(p / (a.length - 1));
958
+ }
959
+ return P(), l = a;
960
+ }, y = function(a) {
961
+ if (s != null) {
962
+ const p = s.length - 1;
963
+ let w = 0;
964
+ for (; w < p && a >= s[w]; )
965
+ w++;
966
+ return w - 1;
967
+ }
968
+ return 0;
969
+ };
970
+ let S = (a) => a, T = (a) => a;
971
+ const q = function(a, p) {
972
+ let w, g;
973
+ if (p == null && (p = !1), isNaN(a) || a === null)
974
+ return n;
975
+ p ? g = a : s && s.length > 2 ? g = y(a) / (s.length - 2) : b !== h ? g = (a - h) / (b - h) : g = 1, g = T(g), p || (g = S(g)), R !== 1 && (g = pn(g, R)), g = o[0] + g * (1 - o[0] - o[1]), g = F(g, 0, 1);
976
+ const A = Math.floor(g * 1e4);
977
+ if (E && $[A])
978
+ w = $[A];
979
+ else {
980
+ if (N(l) === "array")
981
+ for (let M = 0; M < c.length; M++) {
982
+ const L = c[M];
983
+ if (g <= L) {
984
+ w = l[M];
985
+ break;
986
+ }
987
+ if (g >= L && M === c.length - 1) {
988
+ w = l[M];
989
+ break;
990
+ }
991
+ if (g > L && g < c[M + 1]) {
992
+ g = (g - L) / (c[M + 1] - L), w = _.interpolate(
993
+ l[M],
994
+ l[M + 1],
995
+ g,
996
+ t
997
+ );
998
+ break;
999
+ }
1000
+ }
1001
+ else N(l) === "function" && (w = l(g));
1002
+ E && ($[A] = w);
1003
+ }
1004
+ return w;
1005
+ };
1006
+ var P = () => $ = {};
1007
+ k(e);
1008
+ const v = function(a) {
1009
+ const p = _(q(a));
1010
+ return u && p[u] ? p[u]() : p;
1011
+ };
1012
+ return v.classes = function(a) {
1013
+ if (a != null) {
1014
+ if (N(a) === "array")
1015
+ s = a, f = [a[0], a[a.length - 1]];
1016
+ else {
1017
+ const p = _.analyze(f);
1018
+ a === 0 ? s = [p.min, p.max] : s = _.limits(p, "e", a);
1019
+ }
1020
+ return v;
1021
+ }
1022
+ return s;
1023
+ }, v.domain = function(a) {
1024
+ if (!arguments.length)
1025
+ return f;
1026
+ h = a[0], b = a[a.length - 1], c = [];
1027
+ const p = l.length;
1028
+ if (a.length === p && h !== b)
1029
+ for (let w of Array.from(a))
1030
+ c.push((w - h) / (b - h));
1031
+ else {
1032
+ for (let w = 0; w < p; w++)
1033
+ c.push(w / (p - 1));
1034
+ if (a.length > 2) {
1035
+ const w = a.map((A, M) => M / (a.length - 1)), g = a.map((A) => (A - h) / (b - h));
1036
+ g.every((A, M) => w[M] === A) || (T = (A) => {
1037
+ if (A <= 0 || A >= 1) return A;
1038
+ let M = 0;
1039
+ for (; A >= g[M + 1]; ) M++;
1040
+ const L = (A - g[M]) / (g[M + 1] - g[M]);
1041
+ return w[M] + L * (w[M + 1] - w[M]);
1042
+ });
1043
+ }
1044
+ }
1045
+ return f = [h, b], v;
1046
+ }, v.mode = function(a) {
1047
+ return arguments.length ? (t = a, P(), v) : t;
1048
+ }, v.range = function(a, p) {
1049
+ return k(a), v;
1050
+ }, v.out = function(a) {
1051
+ return u = a, v;
1052
+ }, v.spread = function(a) {
1053
+ return arguments.length ? (r = a, v) : r;
1054
+ }, v.correctLightness = function(a) {
1055
+ return a == null && (a = !0), d = a, P(), d ? S = function(p) {
1056
+ const w = q(0, !0).lab()[0], g = q(1, !0).lab()[0], A = w > g;
1057
+ let M = q(p, !0).lab()[0];
1058
+ const L = w + (g - w) * p;
1059
+ let X = M - L, Z = 0, W = 1, J = 20;
1060
+ for (; Math.abs(X) > 0.01 && J-- > 0; )
1061
+ (function() {
1062
+ return A && (X *= -1), X < 0 ? (Z = p, p += (W - p) * 0.5) : (W = p, p += (Z - p) * 0.5), M = q(p, !0).lab()[0], X = M - L;
1063
+ })();
1064
+ return p;
1065
+ } : S = (p) => p, v;
1066
+ }, v.padding = function(a) {
1067
+ return a != null ? (N(a) === "number" && (a = [a, a]), o = a, v) : o;
1068
+ }, v.colors = function(a, p) {
1069
+ arguments.length < 2 && (p = "hex");
1070
+ let w = [];
1071
+ if (arguments.length === 0)
1072
+ w = l.slice(0);
1073
+ else if (a === 1)
1074
+ w = [v(0.5)];
1075
+ else if (a > 1) {
1076
+ const g = f[0], A = f[1] - g;
1077
+ w = gn(0, a).map(
1078
+ (M) => v(g + M / (a - 1) * A)
1079
+ );
1080
+ } else {
1081
+ e = [];
1082
+ let g = [];
1083
+ if (s && s.length > 2)
1084
+ for (let A = 1, M = s.length, L = 1 <= M; L ? A < M : A > M; L ? A++ : A--)
1085
+ g.push((s[A - 1] + s[A]) * 0.5);
1086
+ else
1087
+ g = f;
1088
+ w = g.map((A) => v(A));
1089
+ }
1090
+ return _[p] && (w = w.map((g) => g[p]())), w;
1091
+ }, v.cache = function(a) {
1092
+ return a != null ? (E = a, v) : E;
1093
+ }, v.gamma = function(a) {
1094
+ return a != null ? (R = a, v) : R;
1095
+ }, v.nodata = function(a) {
1096
+ return a != null ? (n = _(a), v) : n;
1097
+ }, v;
1098
+ }
1099
+ function gn(e, t, n) {
1100
+ let r = [], f = e < t, c = t;
1101
+ for (let o = e; f ? o < c : o > c; f ? o++ : o--)
1102
+ r.push(o);
1103
+ return r;
1104
+ }
1105
+ const mn = function(e) {
1106
+ let t = [1, 1];
1107
+ for (let n = 1; n < e; n++) {
1108
+ let r = [1];
1109
+ for (let f = 1; f <= t.length; f++)
1110
+ r[f] = (t[f] || 0) + t[f - 1];
1111
+ t = r;
1112
+ }
1113
+ return t;
1114
+ }, yn = function(e) {
1115
+ let t, n, r, f;
1116
+ if (e = e.map((c) => new i(c)), e.length === 2)
1117
+ [n, r] = e.map((c) => c.lab()), t = function(c) {
1118
+ const o = [0, 1, 2].map((s) => n[s] + c * (r[s] - n[s]));
1119
+ return new i(o, "lab");
1120
+ };
1121
+ else if (e.length === 3)
1122
+ [n, r, f] = e.map((c) => c.lab()), t = function(c) {
1123
+ const o = [0, 1, 2].map(
1124
+ (s) => (1 - c) * (1 - c) * n[s] + 2 * (1 - c) * c * r[s] + c * c * f[s]
1125
+ );
1126
+ return new i(o, "lab");
1127
+ };
1128
+ else if (e.length === 4) {
1129
+ let c;
1130
+ [n, r, f, c] = e.map((o) => o.lab()), t = function(o) {
1131
+ const s = [0, 1, 2].map(
1132
+ (l) => (1 - o) * (1 - o) * (1 - o) * n[l] + 3 * (1 - o) * (1 - o) * o * r[l] + 3 * (1 - o) * o * o * f[l] + o * o * o * c[l]
1133
+ );
1134
+ return new i(s, "lab");
1135
+ };
1136
+ } else if (e.length >= 5) {
1137
+ let c, o, s;
1138
+ c = e.map((l) => l.lab()), s = e.length - 1, o = mn(s), t = function(l) {
1139
+ const u = 1 - l, h = [0, 1, 2].map(
1140
+ (b) => c.reduce(
1141
+ (d, $, E) => d + o[E] * u ** (s - E) * l ** E * $[b],
1142
+ 0
1143
+ )
1144
+ );
1145
+ return new i(h, "lab");
1146
+ };
1147
+ } else
1148
+ throw new RangeError("No point in running bezier with only one color.");
1149
+ return t;
1150
+ }, wn = (e) => {
1151
+ const t = yn(e);
1152
+ return t.scale = () => fe(t), t;
1153
+ }, G = (e, t, n) => {
1154
+ if (!G[n])
1155
+ throw new Error("unknown blend mode " + n);
1156
+ return G[n](e, t);
1157
+ }, I = (e) => (t, n) => {
1158
+ const r = _(n).rgb(), f = _(t).rgb();
1159
+ return _.rgb(e(r, f));
1160
+ }, Y = (e) => (t, n) => {
1161
+ const r = [];
1162
+ return r[0] = e(t[0], n[0]), r[1] = e(t[1], n[1]), r[2] = e(t[2], n[2]), r;
1163
+ }, kn = (e) => e, _n = (e, t) => e * t / 255, $n = (e, t) => e > t ? t : e, Nn = (e, t) => e > t ? e : t, xn = (e, t) => 255 * (1 - (1 - e / 255) * (1 - t / 255)), Mn = (e, t) => t < 128 ? 2 * e * t / 255 : 255 * (1 - 2 * (1 - e / 255) * (1 - t / 255)), vn = (e, t) => 255 * (1 - (1 - t / 255) / (e / 255)), An = (e, t) => e === 255 ? 255 : (e = 255 * (t / 255) / (1 - e / 255), e > 255 ? 255 : e);
1164
+ G.normal = I(Y(kn));
1165
+ G.multiply = I(Y(_n));
1166
+ G.screen = I(Y(xn));
1167
+ G.overlay = I(Y(Mn));
1168
+ G.darken = I(Y($n));
1169
+ G.lighten = I(Y(Nn));
1170
+ G.dodge = I(Y(An));
1171
+ G.burn = I(Y(vn));
1172
+ const { pow: En, sin: Rn, cos: Ln } = Math;
1173
+ function zn(e = 300, t = -1.5, n = 1, r = 1, f = [0, 1]) {
1174
+ let c = 0, o;
1175
+ N(f) === "array" ? o = f[1] - f[0] : (o = 0, f = [f, f]);
1176
+ const s = function(l) {
1177
+ const u = O * ((e + 120) / 360 + t * l), h = En(f[0] + o * l, r), d = (c !== 0 ? n[0] + l * c : n) * h * (1 - h) / 2, $ = Ln(u), E = Rn(u), R = h + d * (-0.14861 * $ + 1.78277 * E), k = h + d * (-0.29227 * $ - 0.90649 * E), y = h + d * (1.97294 * $);
1178
+ return _(Me([R * 255, k * 255, y * 255, 1]));
1179
+ };
1180
+ return s.start = function(l) {
1181
+ return l == null ? e : (e = l, s);
1182
+ }, s.rotations = function(l) {
1183
+ return l == null ? t : (t = l, s);
1184
+ }, s.gamma = function(l) {
1185
+ return l == null ? r : (r = l, s);
1186
+ }, s.hue = function(l) {
1187
+ return l == null ? n : (n = l, N(n) === "array" ? (c = n[1] - n[0], c === 0 && (n = n[1])) : c = 0, s);
1188
+ }, s.lightness = function(l) {
1189
+ return l == null ? f : (N(l) === "array" ? (f = l, o = l[1] - l[0]) : (f = [l, l], o = 0), s);
1190
+ }, s.scale = () => _.scale(s), s.hue(n), s;
1191
+ }
1192
+ const Cn = "0123456789abcdef", { floor: jn, random: qn } = Math, Pn = () => {
1193
+ let e = "#";
1194
+ for (let t = 0; t < 6; t++)
1195
+ e += Cn.charAt(jn(qn() * 16));
1196
+ return new i(e, "hex");
1197
+ }, { log: qe, pow: Gn, floor: Bn, abs: On } = Math;
1198
+ function st(e, t = null) {
1199
+ const n = {
1200
+ min: Number.MAX_VALUE,
1201
+ max: Number.MAX_VALUE * -1,
1202
+ sum: 0,
1203
+ values: [],
1204
+ count: 0
1205
+ };
1206
+ return N(e) === "object" && (e = Object.values(e)), e.forEach((r) => {
1207
+ t && N(r) === "object" && (r = r[t]), r != null && !isNaN(r) && (n.values.push(r), n.sum += r, r < n.min && (n.min = r), r > n.max && (n.max = r), n.count += 1);
1208
+ }), n.domain = [n.min, n.max], n.limits = (r, f) => lt(n, r, f), n;
1209
+ }
1210
+ function lt(e, t = "equal", n = 7) {
1211
+ N(e) == "array" && (e = st(e));
1212
+ const { min: r, max: f } = e, c = e.values.sort((s, l) => s - l);
1213
+ if (n === 1)
1214
+ return [r, f];
1215
+ const o = [];
1216
+ if (t.substr(0, 1) === "c" && (o.push(r), o.push(f)), t.substr(0, 1) === "e") {
1217
+ o.push(r);
1218
+ for (let s = 1; s < n; s++)
1219
+ o.push(r + s / n * (f - r));
1220
+ o.push(f);
1221
+ } else if (t.substr(0, 1) === "l") {
1222
+ if (r <= 0)
1223
+ throw new Error(
1224
+ "Logarithmic scales are only possible for values > 0"
1225
+ );
1226
+ const s = Math.LOG10E * qe(r), l = Math.LOG10E * qe(f);
1227
+ o.push(r);
1228
+ for (let u = 1; u < n; u++)
1229
+ o.push(Gn(10, s + u / n * (l - s)));
1230
+ o.push(f);
1231
+ } else if (t.substr(0, 1) === "q") {
1232
+ o.push(r);
1233
+ for (let s = 1; s < n; s++) {
1234
+ const l = (c.length - 1) * s / n, u = Bn(l);
1235
+ if (u === l)
1236
+ o.push(c[u]);
1237
+ else {
1238
+ const h = l - u;
1239
+ o.push(c[u] * (1 - h) + c[u + 1] * h);
1240
+ }
1241
+ }
1242
+ o.push(f);
1243
+ } else if (t.substr(0, 1) === "k") {
1244
+ let s;
1245
+ const l = c.length, u = new Array(l), h = new Array(n);
1246
+ let b = !0, d = 0, $ = null;
1247
+ $ = [], $.push(r);
1248
+ for (let k = 1; k < n; k++)
1249
+ $.push(r + k / n * (f - r));
1250
+ for ($.push(f); b; ) {
1251
+ for (let y = 0; y < n; y++)
1252
+ h[y] = 0;
1253
+ for (let y = 0; y < l; y++) {
1254
+ const S = c[y];
1255
+ let T = Number.MAX_VALUE, q;
1256
+ for (let P = 0; P < n; P++) {
1257
+ const v = On($[P] - S);
1258
+ v < T && (T = v, q = P), h[q]++, u[y] = q;
1259
+ }
1260
+ }
1261
+ const k = new Array(n);
1262
+ for (let y = 0; y < n; y++)
1263
+ k[y] = null;
1264
+ for (let y = 0; y < l; y++)
1265
+ s = u[y], k[s] === null ? k[s] = c[y] : k[s] += c[y];
1266
+ for (let y = 0; y < n; y++)
1267
+ k[y] *= 1 / h[y];
1268
+ b = !1;
1269
+ for (let y = 0; y < n; y++)
1270
+ if (k[y] !== $[y]) {
1271
+ b = !0;
1272
+ break;
1273
+ }
1274
+ $ = k, d++, d > 200 && (b = !1);
1275
+ }
1276
+ const E = {};
1277
+ for (let k = 0; k < n; k++)
1278
+ E[k] = [];
1279
+ for (let k = 0; k < l; k++)
1280
+ s = u[k], E[s].push(c[k]);
1281
+ let R = [];
1282
+ for (let k = 0; k < n; k++)
1283
+ R.push(E[k][0]), R.push(E[k][E[k].length - 1]);
1284
+ R = R.sort((k, y) => k - y), o.push(R[0]);
1285
+ for (let k = 1; k < R.length; k += 2) {
1286
+ const y = R[k];
1287
+ !isNaN(y) && o.indexOf(y) === -1 && o.push(y);
1288
+ }
1289
+ }
1290
+ return o;
1291
+ }
1292
+ const Sn = (e, t) => {
1293
+ e = new i(e), t = new i(t);
1294
+ const n = e.luminance(), r = t.luminance();
1295
+ return n > r ? (n + 0.05) / (r + 0.05) : (r + 0.05) / (n + 0.05);
1296
+ }, { sqrt: B, pow: z, min: Tn, max: In, atan2: Pe, abs: Ge, cos: te, sin: Be, exp: Yn, PI: Oe } = Math;
1297
+ function Xn(e, t, n = 1, r = 1, f = 1) {
1298
+ var c = function(se) {
1299
+ return 360 * se / (2 * Oe);
1300
+ }, o = function(se) {
1301
+ return 2 * Oe * se / 360;
1302
+ };
1303
+ e = new i(e), t = new i(t);
1304
+ const [s, l, u] = Array.from(e.lab()), [h, b, d] = Array.from(t.lab()), $ = (s + h) / 2, E = B(z(l, 2) + z(u, 2)), R = B(z(b, 2) + z(d, 2)), k = (E + R) / 2, y = 0.5 * (1 - B(z(k, 7) / (z(k, 7) + z(25, 7)))), S = l * (1 + y), T = b * (1 + y), q = B(z(S, 2) + z(u, 2)), P = B(z(T, 2) + z(d, 2)), v = (q + P) / 2, a = c(Pe(u, S)), p = c(Pe(d, T)), w = a >= 0 ? a : a + 360, g = p >= 0 ? p : p + 360, A = Ge(w - g) > 180 ? (w + g + 360) / 2 : (w + g) / 2, M = 1 - 0.17 * te(o(A - 30)) + 0.24 * te(o(2 * A)) + 0.32 * te(o(3 * A + 6)) - 0.2 * te(o(4 * A - 63));
1305
+ let L = g - w;
1306
+ L = Ge(L) <= 180 ? L : g <= w ? L + 360 : L - 360, L = 2 * B(q * P) * Be(o(L) / 2);
1307
+ const X = h - s, Z = P - q, W = 1 + 0.015 * z($ - 50, 2) / B(20 + z($ - 50, 2)), J = 1 + 0.045 * v, Re = 1 + 0.015 * v * M, at = 30 * Yn(-z((A - 275) / 25, 2)), it = -(2 * B(z(v, 7) / (z(v, 7) + z(25, 7)))) * Be(2 * o(at)), ut = B(
1308
+ z(X / (n * W), 2) + z(Z / (r * J), 2) + z(L / (f * Re), 2) + it * (Z / (r * J)) * (L / (f * Re))
1309
+ );
1310
+ return In(0, Tn(100, ut));
1311
+ }
1312
+ function Dn(e, t, n = "lab") {
1313
+ e = new i(e), t = new i(t);
1314
+ const r = e.get(n), f = t.get(n);
1315
+ let c = 0;
1316
+ for (let o in r) {
1317
+ const s = (r[o] || 0) - (f[o] || 0);
1318
+ c += s * s;
1319
+ }
1320
+ return Math.sqrt(c);
1321
+ }
1322
+ const Hn = (...e) => {
1323
+ try {
1324
+ return new i(...e), !0;
1325
+ } catch {
1326
+ return !1;
1327
+ }
1328
+ }, Fn = {
1329
+ cool() {
1330
+ return fe([_.hsl(180, 1, 0.9), _.hsl(250, 0.7, 0.4)]);
1331
+ },
1332
+ hot() {
1333
+ return fe(["#000", "#f00", "#ff0", "#fff"]).mode(
1334
+ "rgb"
1335
+ );
1336
+ }
1337
+ }, re = {
1338
+ // sequential
1339
+ OrRd: ["#fff7ec", "#fee8c8", "#fdd49e", "#fdbb84", "#fc8d59", "#ef6548", "#d7301f", "#b30000", "#7f0000"],
1340
+ PuBu: ["#fff7fb", "#ece7f2", "#d0d1e6", "#a6bddb", "#74a9cf", "#3690c0", "#0570b0", "#045a8d", "#023858"],
1341
+ BuPu: ["#f7fcfd", "#e0ecf4", "#bfd3e6", "#9ebcda", "#8c96c6", "#8c6bb1", "#88419d", "#810f7c", "#4d004b"],
1342
+ Oranges: ["#fff5eb", "#fee6ce", "#fdd0a2", "#fdae6b", "#fd8d3c", "#f16913", "#d94801", "#a63603", "#7f2704"],
1343
+ BuGn: ["#f7fcfd", "#e5f5f9", "#ccece6", "#99d8c9", "#66c2a4", "#41ae76", "#238b45", "#006d2c", "#00441b"],
1344
+ YlOrBr: ["#ffffe5", "#fff7bc", "#fee391", "#fec44f", "#fe9929", "#ec7014", "#cc4c02", "#993404", "#662506"],
1345
+ YlGn: ["#ffffe5", "#f7fcb9", "#d9f0a3", "#addd8e", "#78c679", "#41ab5d", "#238443", "#006837", "#004529"],
1346
+ Reds: ["#fff5f0", "#fee0d2", "#fcbba1", "#fc9272", "#fb6a4a", "#ef3b2c", "#cb181d", "#a50f15", "#67000d"],
1347
+ RdPu: ["#fff7f3", "#fde0dd", "#fcc5c0", "#fa9fb5", "#f768a1", "#dd3497", "#ae017e", "#7a0177", "#49006a"],
1348
+ Greens: ["#f7fcf5", "#e5f5e0", "#c7e9c0", "#a1d99b", "#74c476", "#41ab5d", "#238b45", "#006d2c", "#00441b"],
1349
+ YlGnBu: ["#ffffd9", "#edf8b1", "#c7e9b4", "#7fcdbb", "#41b6c4", "#1d91c0", "#225ea8", "#253494", "#081d58"],
1350
+ Purples: ["#fcfbfd", "#efedf5", "#dadaeb", "#bcbddc", "#9e9ac8", "#807dba", "#6a51a3", "#54278f", "#3f007d"],
1351
+ GnBu: ["#f7fcf0", "#e0f3db", "#ccebc5", "#a8ddb5", "#7bccc4", "#4eb3d3", "#2b8cbe", "#0868ac", "#084081"],
1352
+ Greys: ["#ffffff", "#f0f0f0", "#d9d9d9", "#bdbdbd", "#969696", "#737373", "#525252", "#252525", "#000000"],
1353
+ YlOrRd: ["#ffffcc", "#ffeda0", "#fed976", "#feb24c", "#fd8d3c", "#fc4e2a", "#e31a1c", "#bd0026", "#800026"],
1354
+ PuRd: ["#f7f4f9", "#e7e1ef", "#d4b9da", "#c994c7", "#df65b0", "#e7298a", "#ce1256", "#980043", "#67001f"],
1355
+ Blues: ["#f7fbff", "#deebf7", "#c6dbef", "#9ecae1", "#6baed6", "#4292c6", "#2171b5", "#08519c", "#08306b"],
1356
+ PuBuGn: ["#fff7fb", "#ece2f0", "#d0d1e6", "#a6bddb", "#67a9cf", "#3690c0", "#02818a", "#016c59", "#014636"],
1357
+ Viridis: ["#440154", "#482777", "#3f4a8a", "#31678e", "#26838f", "#1f9d8a", "#6cce5a", "#b6de2b", "#fee825"],
1358
+ // diverging
1359
+ Spectral: ["#9e0142", "#d53e4f", "#f46d43", "#fdae61", "#fee08b", "#ffffbf", "#e6f598", "#abdda4", "#66c2a5", "#3288bd", "#5e4fa2"],
1360
+ RdYlGn: ["#a50026", "#d73027", "#f46d43", "#fdae61", "#fee08b", "#ffffbf", "#d9ef8b", "#a6d96a", "#66bd63", "#1a9850", "#006837"],
1361
+ RdBu: ["#67001f", "#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#f7f7f7", "#d1e5f0", "#92c5de", "#4393c3", "#2166ac", "#053061"],
1362
+ PiYG: ["#8e0152", "#c51b7d", "#de77ae", "#f1b6da", "#fde0ef", "#f7f7f7", "#e6f5d0", "#b8e186", "#7fbc41", "#4d9221", "#276419"],
1363
+ PRGn: ["#40004b", "#762a83", "#9970ab", "#c2a5cf", "#e7d4e8", "#f7f7f7", "#d9f0d3", "#a6dba0", "#5aae61", "#1b7837", "#00441b"],
1364
+ RdYlBu: ["#a50026", "#d73027", "#f46d43", "#fdae61", "#fee090", "#ffffbf", "#e0f3f8", "#abd9e9", "#74add1", "#4575b4", "#313695"],
1365
+ BrBG: ["#543005", "#8c510a", "#bf812d", "#dfc27d", "#f6e8c3", "#f5f5f5", "#c7eae5", "#80cdc1", "#35978f", "#01665e", "#003c30"],
1366
+ RdGy: ["#67001f", "#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#ffffff", "#e0e0e0", "#bababa", "#878787", "#4d4d4d", "#1a1a1a"],
1367
+ PuOr: ["#7f3b08", "#b35806", "#e08214", "#fdb863", "#fee0b6", "#f7f7f7", "#d8daeb", "#b2abd2", "#8073ac", "#542788", "#2d004b"],
1368
+ // qualitative
1369
+ Set2: ["#66c2a5", "#fc8d62", "#8da0cb", "#e78ac3", "#a6d854", "#ffd92f", "#e5c494", "#b3b3b3"],
1370
+ Accent: ["#7fc97f", "#beaed4", "#fdc086", "#ffff99", "#386cb0", "#f0027f", "#bf5b17", "#666666"],
1371
+ Set1: ["#e41a1c", "#377eb8", "#4daf4a", "#984ea3", "#ff7f00", "#ffff33", "#a65628", "#f781bf", "#999999"],
1372
+ Set3: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", "#d9d9d9", "#bc80bd", "#ccebc5", "#ffed6f"],
1373
+ Dark2: ["#1b9e77", "#d95f02", "#7570b3", "#e7298a", "#66a61e", "#e6ab02", "#a6761d", "#666666"],
1374
+ Paired: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c", "#fdbf6f", "#ff7f00", "#cab2d6", "#6a3d9a", "#ffff99", "#b15928"],
1375
+ Pastel2: ["#b3e2cd", "#fdcdac", "#cbd5e8", "#f4cae4", "#e6f5c9", "#fff2ae", "#f1e2cc", "#cccccc"],
1376
+ Pastel1: ["#fbb4ae", "#b3cde3", "#ccebc5", "#decbe4", "#fed9a6", "#ffffcc", "#e5d8bd", "#fddaec", "#f2f2f2"]
1377
+ };
1378
+ for (let e of Object.keys(re))
1379
+ re[e.toLowerCase()] = re[e];
1380
+ Object.assign(_, {
1381
+ average: dn,
1382
+ bezier: wn,
1383
+ blend: G,
1384
+ cubehelix: zn,
1385
+ mix: K,
1386
+ interpolate: K,
1387
+ random: Pn,
1388
+ scale: fe,
1389
+ analyze: st,
1390
+ contrast: Sn,
1391
+ deltaE: Xn,
1392
+ distance: Dn,
1393
+ limits: lt,
1394
+ valid: Hn,
1395
+ scales: Fn,
1396
+ input: m,
1397
+ colors: U,
1398
+ brewer: re
1399
+ });
1400
+ export {
1401
+ _ as c
1402
+ };
1403
+ //# sourceMappingURL=index-Beb8qoyd.js.map