bangonit 0.5.5 → 0.5.8

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.
Files changed (70) hide show
  1. package/README.md +22 -0
  2. package/app/webapp/.next/standalone/app/webapp/.next/BUILD_ID +1 -1
  3. package/app/webapp/.next/standalone/app/webapp/.next/build-manifest.json +2 -2
  4. package/app/webapp/.next/standalone/app/webapp/.next/prerender-manifest.json +1 -1
  5. package/app/webapp/.next/standalone/app/webapp/.next/server/app/_not-found.html +1 -1
  6. package/app/webapp/.next/standalone/app/webapp/.next/server/app/_not-found.rsc +1 -1
  7. package/app/webapp/.next/standalone/app/webapp/.next/server/app/app.html +1 -1
  8. package/app/webapp/.next/standalone/app/webapp/.next/server/app/app.rsc +1 -1
  9. package/app/webapp/.next/standalone/app/webapp/.next/server/app/index.html +1 -1
  10. package/app/webapp/.next/standalone/app/webapp/.next/server/app/index.rsc +1 -1
  11. package/app/webapp/.next/standalone/app/webapp/.next/server/pages/404.html +1 -1
  12. package/app/webapp/.next/standalone/app/webapp/.next/server/pages/500.html +1 -1
  13. package/app/webapp/.next/standalone/app/webapp/.next/server/server-reference-manifest.json +1 -1
  14. package/app/webapp/.next/standalone/node_modules/@img/colour/color.cjs +1596 -0
  15. package/app/webapp/.next/standalone/node_modules/@img/colour/index.cjs +1 -0
  16. package/app/webapp/.next/standalone/node_modules/@img/colour/package.json +58 -0
  17. package/app/webapp/.next/standalone/node_modules/@img/sharp-darwin-arm64/LICENSE +191 -0
  18. package/app/webapp/.next/standalone/node_modules/@img/sharp-darwin-arm64/lib/sharp-darwin-arm64.node +0 -0
  19. package/app/webapp/.next/standalone/node_modules/@img/sharp-darwin-arm64/package.json +40 -0
  20. package/app/webapp/.next/standalone/node_modules/@img/sharp-libvips-darwin-arm64/lib/index.js +1 -0
  21. package/app/webapp/.next/standalone/node_modules/@img/sharp-libvips-darwin-arm64/lib/libvips-cpp.8.17.3.dylib +0 -0
  22. package/app/webapp/.next/standalone/node_modules/@img/sharp-libvips-darwin-arm64/package.json +36 -0
  23. package/app/webapp/.next/standalone/node_modules/@img/sharp-libvips-darwin-arm64/versions.json +30 -0
  24. package/app/webapp/.next/standalone/node_modules/detect-libc/lib/detect-libc.js +313 -0
  25. package/app/webapp/.next/standalone/node_modules/detect-libc/lib/elf.js +39 -0
  26. package/app/webapp/.next/standalone/node_modules/detect-libc/lib/filesystem.js +51 -0
  27. package/app/webapp/.next/standalone/node_modules/detect-libc/lib/process.js +24 -0
  28. package/app/webapp/.next/standalone/node_modules/detect-libc/package.json +44 -0
  29. package/app/webapp/.next/standalone/node_modules/sharp/lib/channel.js +177 -0
  30. package/app/webapp/.next/standalone/node_modules/sharp/lib/colour.js +195 -0
  31. package/app/webapp/.next/standalone/node_modules/sharp/lib/composite.js +212 -0
  32. package/app/webapp/.next/standalone/node_modules/sharp/lib/constructor.js +499 -0
  33. package/app/webapp/.next/standalone/node_modules/sharp/lib/index.js +16 -0
  34. package/app/webapp/.next/standalone/node_modules/sharp/lib/input.js +809 -0
  35. package/app/webapp/.next/standalone/node_modules/sharp/lib/is.js +143 -0
  36. package/app/webapp/.next/standalone/node_modules/sharp/lib/libvips.js +207 -0
  37. package/app/webapp/.next/standalone/node_modules/sharp/lib/operation.js +1016 -0
  38. package/app/webapp/.next/standalone/node_modules/sharp/lib/output.js +1666 -0
  39. package/app/webapp/.next/standalone/node_modules/sharp/lib/resize.js +595 -0
  40. package/app/webapp/.next/standalone/node_modules/sharp/lib/sharp.js +121 -0
  41. package/app/webapp/.next/standalone/node_modules/sharp/lib/utility.js +291 -0
  42. package/app/webapp/.next/standalone/node_modules/sharp/node_modules/semver/classes/comparator.js +143 -0
  43. package/app/webapp/.next/standalone/node_modules/sharp/node_modules/semver/classes/range.js +557 -0
  44. package/app/webapp/.next/standalone/node_modules/sharp/node_modules/semver/classes/semver.js +333 -0
  45. package/app/webapp/.next/standalone/node_modules/sharp/node_modules/semver/functions/cmp.js +54 -0
  46. package/app/webapp/.next/standalone/node_modules/sharp/node_modules/semver/functions/coerce.js +62 -0
  47. package/app/webapp/.next/standalone/node_modules/sharp/node_modules/semver/functions/compare.js +7 -0
  48. package/app/webapp/.next/standalone/node_modules/sharp/node_modules/semver/functions/eq.js +5 -0
  49. package/app/webapp/.next/standalone/node_modules/sharp/node_modules/semver/functions/gt.js +5 -0
  50. package/app/webapp/.next/standalone/node_modules/sharp/node_modules/semver/functions/gte.js +5 -0
  51. package/app/webapp/.next/standalone/node_modules/sharp/node_modules/semver/functions/lt.js +5 -0
  52. package/app/webapp/.next/standalone/node_modules/sharp/node_modules/semver/functions/lte.js +5 -0
  53. package/app/webapp/.next/standalone/node_modules/sharp/node_modules/semver/functions/neq.js +5 -0
  54. package/app/webapp/.next/standalone/node_modules/sharp/node_modules/semver/functions/parse.js +18 -0
  55. package/app/webapp/.next/standalone/node_modules/sharp/node_modules/semver/functions/satisfies.js +12 -0
  56. package/app/webapp/.next/standalone/node_modules/sharp/node_modules/semver/internal/constants.js +37 -0
  57. package/app/webapp/.next/standalone/node_modules/sharp/node_modules/semver/internal/debug.js +11 -0
  58. package/app/webapp/.next/standalone/node_modules/sharp/node_modules/semver/internal/identifiers.js +29 -0
  59. package/app/webapp/.next/standalone/node_modules/sharp/node_modules/semver/internal/lrucache.js +42 -0
  60. package/app/webapp/.next/standalone/node_modules/sharp/node_modules/semver/internal/parse-options.js +17 -0
  61. package/app/webapp/.next/standalone/node_modules/sharp/node_modules/semver/internal/re.js +223 -0
  62. package/app/webapp/.next/standalone/node_modules/sharp/node_modules/semver/package.json +78 -0
  63. package/app/webapp/.next/standalone/node_modules/sharp/package.json +202 -0
  64. package/app/webapp/.next/standalone/package.json +6 -4
  65. package/bin/src/cli/bangonit.js +495 -79
  66. package/package.json +6 -4
  67. /package/app/webapp/.next/standalone/app/webapp/.next/static/{v4eeWwVGjBsQUZdT156fT → QoPxkNUQxw6VoKyWIUhlL}/_buildManifest.js +0 -0
  68. /package/app/webapp/.next/standalone/app/webapp/.next/static/{v4eeWwVGjBsQUZdT156fT → QoPxkNUQxw6VoKyWIUhlL}/_ssgManifest.js +0 -0
  69. /package/app/webapp/.next/static/{v4eeWwVGjBsQUZdT156fT → QoPxkNUQxw6VoKyWIUhlL}/_buildManifest.js +0 -0
  70. /package/app/webapp/.next/static/{v4eeWwVGjBsQUZdT156fT → QoPxkNUQxw6VoKyWIUhlL}/_ssgManifest.js +0 -0
@@ -0,0 +1,1596 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // node_modules/color/index.js
20
+ var index_exports = {};
21
+ __export(index_exports, {
22
+ default: () => index_default
23
+ });
24
+ module.exports = __toCommonJS(index_exports);
25
+
26
+ // node_modules/color-name/index.js
27
+ var colors = {
28
+ aliceblue: [240, 248, 255],
29
+ antiquewhite: [250, 235, 215],
30
+ aqua: [0, 255, 255],
31
+ aquamarine: [127, 255, 212],
32
+ azure: [240, 255, 255],
33
+ beige: [245, 245, 220],
34
+ bisque: [255, 228, 196],
35
+ black: [0, 0, 0],
36
+ blanchedalmond: [255, 235, 205],
37
+ blue: [0, 0, 255],
38
+ blueviolet: [138, 43, 226],
39
+ brown: [165, 42, 42],
40
+ burlywood: [222, 184, 135],
41
+ cadetblue: [95, 158, 160],
42
+ chartreuse: [127, 255, 0],
43
+ chocolate: [210, 105, 30],
44
+ coral: [255, 127, 80],
45
+ cornflowerblue: [100, 149, 237],
46
+ cornsilk: [255, 248, 220],
47
+ crimson: [220, 20, 60],
48
+ cyan: [0, 255, 255],
49
+ darkblue: [0, 0, 139],
50
+ darkcyan: [0, 139, 139],
51
+ darkgoldenrod: [184, 134, 11],
52
+ darkgray: [169, 169, 169],
53
+ darkgreen: [0, 100, 0],
54
+ darkgrey: [169, 169, 169],
55
+ darkkhaki: [189, 183, 107],
56
+ darkmagenta: [139, 0, 139],
57
+ darkolivegreen: [85, 107, 47],
58
+ darkorange: [255, 140, 0],
59
+ darkorchid: [153, 50, 204],
60
+ darkred: [139, 0, 0],
61
+ darksalmon: [233, 150, 122],
62
+ darkseagreen: [143, 188, 143],
63
+ darkslateblue: [72, 61, 139],
64
+ darkslategray: [47, 79, 79],
65
+ darkslategrey: [47, 79, 79],
66
+ darkturquoise: [0, 206, 209],
67
+ darkviolet: [148, 0, 211],
68
+ deeppink: [255, 20, 147],
69
+ deepskyblue: [0, 191, 255],
70
+ dimgray: [105, 105, 105],
71
+ dimgrey: [105, 105, 105],
72
+ dodgerblue: [30, 144, 255],
73
+ firebrick: [178, 34, 34],
74
+ floralwhite: [255, 250, 240],
75
+ forestgreen: [34, 139, 34],
76
+ fuchsia: [255, 0, 255],
77
+ gainsboro: [220, 220, 220],
78
+ ghostwhite: [248, 248, 255],
79
+ gold: [255, 215, 0],
80
+ goldenrod: [218, 165, 32],
81
+ gray: [128, 128, 128],
82
+ green: [0, 128, 0],
83
+ greenyellow: [173, 255, 47],
84
+ grey: [128, 128, 128],
85
+ honeydew: [240, 255, 240],
86
+ hotpink: [255, 105, 180],
87
+ indianred: [205, 92, 92],
88
+ indigo: [75, 0, 130],
89
+ ivory: [255, 255, 240],
90
+ khaki: [240, 230, 140],
91
+ lavender: [230, 230, 250],
92
+ lavenderblush: [255, 240, 245],
93
+ lawngreen: [124, 252, 0],
94
+ lemonchiffon: [255, 250, 205],
95
+ lightblue: [173, 216, 230],
96
+ lightcoral: [240, 128, 128],
97
+ lightcyan: [224, 255, 255],
98
+ lightgoldenrodyellow: [250, 250, 210],
99
+ lightgray: [211, 211, 211],
100
+ lightgreen: [144, 238, 144],
101
+ lightgrey: [211, 211, 211],
102
+ lightpink: [255, 182, 193],
103
+ lightsalmon: [255, 160, 122],
104
+ lightseagreen: [32, 178, 170],
105
+ lightskyblue: [135, 206, 250],
106
+ lightslategray: [119, 136, 153],
107
+ lightslategrey: [119, 136, 153],
108
+ lightsteelblue: [176, 196, 222],
109
+ lightyellow: [255, 255, 224],
110
+ lime: [0, 255, 0],
111
+ limegreen: [50, 205, 50],
112
+ linen: [250, 240, 230],
113
+ magenta: [255, 0, 255],
114
+ maroon: [128, 0, 0],
115
+ mediumaquamarine: [102, 205, 170],
116
+ mediumblue: [0, 0, 205],
117
+ mediumorchid: [186, 85, 211],
118
+ mediumpurple: [147, 112, 219],
119
+ mediumseagreen: [60, 179, 113],
120
+ mediumslateblue: [123, 104, 238],
121
+ mediumspringgreen: [0, 250, 154],
122
+ mediumturquoise: [72, 209, 204],
123
+ mediumvioletred: [199, 21, 133],
124
+ midnightblue: [25, 25, 112],
125
+ mintcream: [245, 255, 250],
126
+ mistyrose: [255, 228, 225],
127
+ moccasin: [255, 228, 181],
128
+ navajowhite: [255, 222, 173],
129
+ navy: [0, 0, 128],
130
+ oldlace: [253, 245, 230],
131
+ olive: [128, 128, 0],
132
+ olivedrab: [107, 142, 35],
133
+ orange: [255, 165, 0],
134
+ orangered: [255, 69, 0],
135
+ orchid: [218, 112, 214],
136
+ palegoldenrod: [238, 232, 170],
137
+ palegreen: [152, 251, 152],
138
+ paleturquoise: [175, 238, 238],
139
+ palevioletred: [219, 112, 147],
140
+ papayawhip: [255, 239, 213],
141
+ peachpuff: [255, 218, 185],
142
+ peru: [205, 133, 63],
143
+ pink: [255, 192, 203],
144
+ plum: [221, 160, 221],
145
+ powderblue: [176, 224, 230],
146
+ purple: [128, 0, 128],
147
+ rebeccapurple: [102, 51, 153],
148
+ red: [255, 0, 0],
149
+ rosybrown: [188, 143, 143],
150
+ royalblue: [65, 105, 225],
151
+ saddlebrown: [139, 69, 19],
152
+ salmon: [250, 128, 114],
153
+ sandybrown: [244, 164, 96],
154
+ seagreen: [46, 139, 87],
155
+ seashell: [255, 245, 238],
156
+ sienna: [160, 82, 45],
157
+ silver: [192, 192, 192],
158
+ skyblue: [135, 206, 235],
159
+ slateblue: [106, 90, 205],
160
+ slategray: [112, 128, 144],
161
+ slategrey: [112, 128, 144],
162
+ snow: [255, 250, 250],
163
+ springgreen: [0, 255, 127],
164
+ steelblue: [70, 130, 180],
165
+ tan: [210, 180, 140],
166
+ teal: [0, 128, 128],
167
+ thistle: [216, 191, 216],
168
+ tomato: [255, 99, 71],
169
+ turquoise: [64, 224, 208],
170
+ violet: [238, 130, 238],
171
+ wheat: [245, 222, 179],
172
+ white: [255, 255, 255],
173
+ whitesmoke: [245, 245, 245],
174
+ yellow: [255, 255, 0],
175
+ yellowgreen: [154, 205, 50]
176
+ };
177
+ for (const key in colors) Object.freeze(colors[key]);
178
+ var color_name_default = Object.freeze(colors);
179
+
180
+ // node_modules/color-string/index.js
181
+ var reverseNames = /* @__PURE__ */ Object.create(null);
182
+ for (const name in color_name_default) {
183
+ if (Object.hasOwn(color_name_default, name)) {
184
+ reverseNames[color_name_default[name]] = name;
185
+ }
186
+ }
187
+ var cs = {
188
+ to: {},
189
+ get: {}
190
+ };
191
+ cs.get = function(string) {
192
+ const prefix = string.slice(0, 3).toLowerCase();
193
+ let value;
194
+ let model;
195
+ switch (prefix) {
196
+ case "hsl": {
197
+ value = cs.get.hsl(string);
198
+ model = "hsl";
199
+ break;
200
+ }
201
+ case "hwb": {
202
+ value = cs.get.hwb(string);
203
+ model = "hwb";
204
+ break;
205
+ }
206
+ default: {
207
+ value = cs.get.rgb(string);
208
+ model = "rgb";
209
+ break;
210
+ }
211
+ }
212
+ if (!value) {
213
+ return null;
214
+ }
215
+ return { model, value };
216
+ };
217
+ cs.get.rgb = function(string) {
218
+ if (!string) {
219
+ return null;
220
+ }
221
+ const abbr = /^#([a-f\d]{3,4})$/i;
222
+ const hex = /^#([a-f\d]{6})([a-f\d]{2})?$/i;
223
+ const rgba = /^rgba?\(\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)\s*(?:[\s,|/]\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(%?)\s*)?\)$/i;
224
+ const per = /^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/i;
225
+ const keyword = /^(\w+)$/;
226
+ let rgb = [0, 0, 0, 1];
227
+ let match;
228
+ let i;
229
+ let hexAlpha;
230
+ if (match = string.match(hex)) {
231
+ hexAlpha = match[2];
232
+ match = match[1];
233
+ for (i = 0; i < 3; i++) {
234
+ const i2 = i * 2;
235
+ rgb[i] = Number.parseInt(match.slice(i2, i2 + 2), 16);
236
+ }
237
+ if (hexAlpha) {
238
+ rgb[3] = Number.parseInt(hexAlpha, 16) / 255;
239
+ }
240
+ } else if (match = string.match(abbr)) {
241
+ match = match[1];
242
+ hexAlpha = match[3];
243
+ for (i = 0; i < 3; i++) {
244
+ rgb[i] = Number.parseInt(match[i] + match[i], 16);
245
+ }
246
+ if (hexAlpha) {
247
+ rgb[3] = Number.parseInt(hexAlpha + hexAlpha, 16) / 255;
248
+ }
249
+ } else if (match = string.match(rgba)) {
250
+ for (i = 0; i < 3; i++) {
251
+ rgb[i] = Number.parseFloat(match[i + 1]);
252
+ }
253
+ if (match[4]) {
254
+ rgb[3] = match[5] ? Number.parseFloat(match[4]) * 0.01 : Number.parseFloat(match[4]);
255
+ }
256
+ } else if (match = string.match(per)) {
257
+ for (i = 0; i < 3; i++) {
258
+ rgb[i] = Math.round(Number.parseFloat(match[i + 1]) * 2.55);
259
+ }
260
+ if (match[4]) {
261
+ rgb[3] = match[5] ? Number.parseFloat(match[4]) * 0.01 : Number.parseFloat(match[4]);
262
+ }
263
+ } else if (match = string.toLowerCase().match(keyword)) {
264
+ if (match[1] === "transparent") {
265
+ return [0, 0, 0, 0];
266
+ }
267
+ if (!Object.hasOwn(color_name_default, match[1])) {
268
+ return null;
269
+ }
270
+ rgb = color_name_default[match[1]].slice();
271
+ rgb[3] = 1;
272
+ return rgb;
273
+ } else {
274
+ return null;
275
+ }
276
+ for (i = 0; i < 3; i++) {
277
+ rgb[i] = clamp(rgb[i], 0, 255);
278
+ }
279
+ rgb[3] = clamp(rgb[3], 0, 1);
280
+ return rgb;
281
+ };
282
+ cs.get.hsl = function(string) {
283
+ if (!string) {
284
+ return null;
285
+ }
286
+ const hsl = /^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:e[+-]?\d+)?)\s*)?\)$/i;
287
+ const match = string.match(hsl);
288
+ if (match) {
289
+ const alpha = Number.parseFloat(match[4]);
290
+ const h = (Number.parseFloat(match[1]) % 360 + 360) % 360;
291
+ const s = clamp(Number.parseFloat(match[2]), 0, 100);
292
+ const l = clamp(Number.parseFloat(match[3]), 0, 100);
293
+ const a = clamp(Number.isNaN(alpha) ? 1 : alpha, 0, 1);
294
+ return [h, s, l, a];
295
+ }
296
+ return null;
297
+ };
298
+ cs.get.hwb = function(string) {
299
+ if (!string) {
300
+ return null;
301
+ }
302
+ const hwb = /^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:e[+-]?\d+)?)\s*)?\)$/i;
303
+ const match = string.match(hwb);
304
+ if (match) {
305
+ const alpha = Number.parseFloat(match[4]);
306
+ const h = (Number.parseFloat(match[1]) % 360 + 360) % 360;
307
+ const w = clamp(Number.parseFloat(match[2]), 0, 100);
308
+ const b = clamp(Number.parseFloat(match[3]), 0, 100);
309
+ const a = clamp(Number.isNaN(alpha) ? 1 : alpha, 0, 1);
310
+ return [h, w, b, a];
311
+ }
312
+ return null;
313
+ };
314
+ cs.to.hex = function(...rgba) {
315
+ return "#" + hexDouble(rgba[0]) + hexDouble(rgba[1]) + hexDouble(rgba[2]) + (rgba[3] < 1 ? hexDouble(Math.round(rgba[3] * 255)) : "");
316
+ };
317
+ cs.to.rgb = function(...rgba) {
318
+ return rgba.length < 4 || rgba[3] === 1 ? "rgb(" + Math.round(rgba[0]) + ", " + Math.round(rgba[1]) + ", " + Math.round(rgba[2]) + ")" : "rgba(" + Math.round(rgba[0]) + ", " + Math.round(rgba[1]) + ", " + Math.round(rgba[2]) + ", " + rgba[3] + ")";
319
+ };
320
+ cs.to.rgb.percent = function(...rgba) {
321
+ const r = Math.round(rgba[0] / 255 * 100);
322
+ const g = Math.round(rgba[1] / 255 * 100);
323
+ const b = Math.round(rgba[2] / 255 * 100);
324
+ return rgba.length < 4 || rgba[3] === 1 ? "rgb(" + r + "%, " + g + "%, " + b + "%)" : "rgba(" + r + "%, " + g + "%, " + b + "%, " + rgba[3] + ")";
325
+ };
326
+ cs.to.hsl = function(...hsla) {
327
+ return hsla.length < 4 || hsla[3] === 1 ? "hsl(" + hsla[0] + ", " + hsla[1] + "%, " + hsla[2] + "%)" : "hsla(" + hsla[0] + ", " + hsla[1] + "%, " + hsla[2] + "%, " + hsla[3] + ")";
328
+ };
329
+ cs.to.hwb = function(...hwba) {
330
+ let a = "";
331
+ if (hwba.length >= 4 && hwba[3] !== 1) {
332
+ a = ", " + hwba[3];
333
+ }
334
+ return "hwb(" + hwba[0] + ", " + hwba[1] + "%, " + hwba[2] + "%" + a + ")";
335
+ };
336
+ cs.to.keyword = function(...rgb) {
337
+ return reverseNames[rgb.slice(0, 3)];
338
+ };
339
+ function clamp(number_, min, max) {
340
+ return Math.min(Math.max(min, number_), max);
341
+ }
342
+ function hexDouble(number_) {
343
+ const string_ = Math.round(number_).toString(16).toUpperCase();
344
+ return string_.length < 2 ? "0" + string_ : string_;
345
+ }
346
+ var color_string_default = cs;
347
+
348
+ // node_modules/color-convert/conversions.js
349
+ var reverseKeywords = {};
350
+ for (const key of Object.keys(color_name_default)) {
351
+ reverseKeywords[color_name_default[key]] = key;
352
+ }
353
+ var convert = {
354
+ rgb: { channels: 3, labels: "rgb" },
355
+ hsl: { channels: 3, labels: "hsl" },
356
+ hsv: { channels: 3, labels: "hsv" },
357
+ hwb: { channels: 3, labels: "hwb" },
358
+ cmyk: { channels: 4, labels: "cmyk" },
359
+ xyz: { channels: 3, labels: "xyz" },
360
+ lab: { channels: 3, labels: "lab" },
361
+ oklab: { channels: 3, labels: ["okl", "oka", "okb"] },
362
+ lch: { channels: 3, labels: "lch" },
363
+ oklch: { channels: 3, labels: ["okl", "okc", "okh"] },
364
+ hex: { channels: 1, labels: ["hex"] },
365
+ keyword: { channels: 1, labels: ["keyword"] },
366
+ ansi16: { channels: 1, labels: ["ansi16"] },
367
+ ansi256: { channels: 1, labels: ["ansi256"] },
368
+ hcg: { channels: 3, labels: ["h", "c", "g"] },
369
+ apple: { channels: 3, labels: ["r16", "g16", "b16"] },
370
+ gray: { channels: 1, labels: ["gray"] }
371
+ };
372
+ var conversions_default = convert;
373
+ var LAB_FT = (6 / 29) ** 3;
374
+ function srgbNonlinearTransform(c) {
375
+ const cc = c > 31308e-7 ? 1.055 * c ** (1 / 2.4) - 0.055 : c * 12.92;
376
+ return Math.min(Math.max(0, cc), 1);
377
+ }
378
+ function srgbNonlinearTransformInv(c) {
379
+ return c > 0.04045 ? ((c + 0.055) / 1.055) ** 2.4 : c / 12.92;
380
+ }
381
+ for (const model of Object.keys(convert)) {
382
+ if (!("channels" in convert[model])) {
383
+ throw new Error("missing channels property: " + model);
384
+ }
385
+ if (!("labels" in convert[model])) {
386
+ throw new Error("missing channel labels property: " + model);
387
+ }
388
+ if (convert[model].labels.length !== convert[model].channels) {
389
+ throw new Error("channel and label counts mismatch: " + model);
390
+ }
391
+ const { channels, labels } = convert[model];
392
+ delete convert[model].channels;
393
+ delete convert[model].labels;
394
+ Object.defineProperty(convert[model], "channels", { value: channels });
395
+ Object.defineProperty(convert[model], "labels", { value: labels });
396
+ }
397
+ convert.rgb.hsl = function(rgb) {
398
+ const r = rgb[0] / 255;
399
+ const g = rgb[1] / 255;
400
+ const b = rgb[2] / 255;
401
+ const min = Math.min(r, g, b);
402
+ const max = Math.max(r, g, b);
403
+ const delta = max - min;
404
+ let h;
405
+ let s;
406
+ switch (max) {
407
+ case min: {
408
+ h = 0;
409
+ break;
410
+ }
411
+ case r: {
412
+ h = (g - b) / delta;
413
+ break;
414
+ }
415
+ case g: {
416
+ h = 2 + (b - r) / delta;
417
+ break;
418
+ }
419
+ case b: {
420
+ h = 4 + (r - g) / delta;
421
+ break;
422
+ }
423
+ }
424
+ h = Math.min(h * 60, 360);
425
+ if (h < 0) {
426
+ h += 360;
427
+ }
428
+ const l = (min + max) / 2;
429
+ if (max === min) {
430
+ s = 0;
431
+ } else if (l <= 0.5) {
432
+ s = delta / (max + min);
433
+ } else {
434
+ s = delta / (2 - max - min);
435
+ }
436
+ return [h, s * 100, l * 100];
437
+ };
438
+ convert.rgb.hsv = function(rgb) {
439
+ let rdif;
440
+ let gdif;
441
+ let bdif;
442
+ let h;
443
+ let s;
444
+ const r = rgb[0] / 255;
445
+ const g = rgb[1] / 255;
446
+ const b = rgb[2] / 255;
447
+ const v = Math.max(r, g, b);
448
+ const diff = v - Math.min(r, g, b);
449
+ const diffc = function(c) {
450
+ return (v - c) / 6 / diff + 1 / 2;
451
+ };
452
+ if (diff === 0) {
453
+ h = 0;
454
+ s = 0;
455
+ } else {
456
+ s = diff / v;
457
+ rdif = diffc(r);
458
+ gdif = diffc(g);
459
+ bdif = diffc(b);
460
+ switch (v) {
461
+ case r: {
462
+ h = bdif - gdif;
463
+ break;
464
+ }
465
+ case g: {
466
+ h = 1 / 3 + rdif - bdif;
467
+ break;
468
+ }
469
+ case b: {
470
+ h = 2 / 3 + gdif - rdif;
471
+ break;
472
+ }
473
+ }
474
+ if (h < 0) {
475
+ h += 1;
476
+ } else if (h > 1) {
477
+ h -= 1;
478
+ }
479
+ }
480
+ return [
481
+ h * 360,
482
+ s * 100,
483
+ v * 100
484
+ ];
485
+ };
486
+ convert.rgb.hwb = function(rgb) {
487
+ const r = rgb[0];
488
+ const g = rgb[1];
489
+ let b = rgb[2];
490
+ const h = convert.rgb.hsl(rgb)[0];
491
+ const w = 1 / 255 * Math.min(r, Math.min(g, b));
492
+ b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
493
+ return [h, w * 100, b * 100];
494
+ };
495
+ convert.rgb.oklab = function(rgb) {
496
+ const r = srgbNonlinearTransformInv(rgb[0] / 255);
497
+ const g = srgbNonlinearTransformInv(rgb[1] / 255);
498
+ const b = srgbNonlinearTransformInv(rgb[2] / 255);
499
+ const lp = Math.cbrt(0.4122214708 * r + 0.5363325363 * g + 0.0514459929 * b);
500
+ const mp = Math.cbrt(0.2119034982 * r + 0.6806995451 * g + 0.1073969566 * b);
501
+ const sp = Math.cbrt(0.0883024619 * r + 0.2817188376 * g + 0.6299787005 * b);
502
+ const l = 0.2104542553 * lp + 0.793617785 * mp - 0.0040720468 * sp;
503
+ const aa = 1.9779984951 * lp - 2.428592205 * mp + 0.4505937099 * sp;
504
+ const bb = 0.0259040371 * lp + 0.7827717662 * mp - 0.808675766 * sp;
505
+ return [l * 100, aa * 100, bb * 100];
506
+ };
507
+ convert.rgb.cmyk = function(rgb) {
508
+ const r = rgb[0] / 255;
509
+ const g = rgb[1] / 255;
510
+ const b = rgb[2] / 255;
511
+ const k = Math.min(1 - r, 1 - g, 1 - b);
512
+ const c = (1 - r - k) / (1 - k) || 0;
513
+ const m = (1 - g - k) / (1 - k) || 0;
514
+ const y = (1 - b - k) / (1 - k) || 0;
515
+ return [c * 100, m * 100, y * 100, k * 100];
516
+ };
517
+ function comparativeDistance(x, y) {
518
+ return (x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2 + (x[2] - y[2]) ** 2;
519
+ }
520
+ convert.rgb.keyword = function(rgb) {
521
+ const reversed = reverseKeywords[rgb];
522
+ if (reversed) {
523
+ return reversed;
524
+ }
525
+ let currentClosestDistance = Number.POSITIVE_INFINITY;
526
+ let currentClosestKeyword;
527
+ for (const keyword of Object.keys(color_name_default)) {
528
+ const value = color_name_default[keyword];
529
+ const distance = comparativeDistance(rgb, value);
530
+ if (distance < currentClosestDistance) {
531
+ currentClosestDistance = distance;
532
+ currentClosestKeyword = keyword;
533
+ }
534
+ }
535
+ return currentClosestKeyword;
536
+ };
537
+ convert.keyword.rgb = function(keyword) {
538
+ return [...color_name_default[keyword]];
539
+ };
540
+ convert.rgb.xyz = function(rgb) {
541
+ const r = srgbNonlinearTransformInv(rgb[0] / 255);
542
+ const g = srgbNonlinearTransformInv(rgb[1] / 255);
543
+ const b = srgbNonlinearTransformInv(rgb[2] / 255);
544
+ const x = r * 0.4124564 + g * 0.3575761 + b * 0.1804375;
545
+ const y = r * 0.2126729 + g * 0.7151522 + b * 0.072175;
546
+ const z = r * 0.0193339 + g * 0.119192 + b * 0.9503041;
547
+ return [x * 100, y * 100, z * 100];
548
+ };
549
+ convert.rgb.lab = function(rgb) {
550
+ const xyz = convert.rgb.xyz(rgb);
551
+ let x = xyz[0];
552
+ let y = xyz[1];
553
+ let z = xyz[2];
554
+ x /= 95.047;
555
+ y /= 100;
556
+ z /= 108.883;
557
+ x = x > LAB_FT ? x ** (1 / 3) : 7.787 * x + 16 / 116;
558
+ y = y > LAB_FT ? y ** (1 / 3) : 7.787 * y + 16 / 116;
559
+ z = z > LAB_FT ? z ** (1 / 3) : 7.787 * z + 16 / 116;
560
+ const l = 116 * y - 16;
561
+ const a = 500 * (x - y);
562
+ const b = 200 * (y - z);
563
+ return [l, a, b];
564
+ };
565
+ convert.hsl.rgb = function(hsl) {
566
+ const h = hsl[0] / 360;
567
+ const s = hsl[1] / 100;
568
+ const l = hsl[2] / 100;
569
+ let t3;
570
+ let value;
571
+ if (s === 0) {
572
+ value = l * 255;
573
+ return [value, value, value];
574
+ }
575
+ const t2 = l < 0.5 ? l * (1 + s) : l + s - l * s;
576
+ const t1 = 2 * l - t2;
577
+ const rgb = [0, 0, 0];
578
+ for (let i = 0; i < 3; i++) {
579
+ t3 = h + 1 / 3 * -(i - 1);
580
+ if (t3 < 0) {
581
+ t3++;
582
+ }
583
+ if (t3 > 1) {
584
+ t3--;
585
+ }
586
+ if (6 * t3 < 1) {
587
+ value = t1 + (t2 - t1) * 6 * t3;
588
+ } else if (2 * t3 < 1) {
589
+ value = t2;
590
+ } else if (3 * t3 < 2) {
591
+ value = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
592
+ } else {
593
+ value = t1;
594
+ }
595
+ rgb[i] = value * 255;
596
+ }
597
+ return rgb;
598
+ };
599
+ convert.hsl.hsv = function(hsl) {
600
+ const h = hsl[0];
601
+ let s = hsl[1] / 100;
602
+ let l = hsl[2] / 100;
603
+ let smin = s;
604
+ const lmin = Math.max(l, 0.01);
605
+ l *= 2;
606
+ s *= l <= 1 ? l : 2 - l;
607
+ smin *= lmin <= 1 ? lmin : 2 - lmin;
608
+ const v = (l + s) / 2;
609
+ const sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s);
610
+ return [h, sv * 100, v * 100];
611
+ };
612
+ convert.hsv.rgb = function(hsv) {
613
+ const h = hsv[0] / 60;
614
+ const s = hsv[1] / 100;
615
+ let v = hsv[2] / 100;
616
+ const hi = Math.floor(h) % 6;
617
+ const f = h - Math.floor(h);
618
+ const p = 255 * v * (1 - s);
619
+ const q = 255 * v * (1 - s * f);
620
+ const t = 255 * v * (1 - s * (1 - f));
621
+ v *= 255;
622
+ switch (hi) {
623
+ case 0: {
624
+ return [v, t, p];
625
+ }
626
+ case 1: {
627
+ return [q, v, p];
628
+ }
629
+ case 2: {
630
+ return [p, v, t];
631
+ }
632
+ case 3: {
633
+ return [p, q, v];
634
+ }
635
+ case 4: {
636
+ return [t, p, v];
637
+ }
638
+ case 5: {
639
+ return [v, p, q];
640
+ }
641
+ }
642
+ };
643
+ convert.hsv.hsl = function(hsv) {
644
+ const h = hsv[0];
645
+ const s = hsv[1] / 100;
646
+ const v = hsv[2] / 100;
647
+ const vmin = Math.max(v, 0.01);
648
+ let sl;
649
+ let l;
650
+ l = (2 - s) * v;
651
+ const lmin = (2 - s) * vmin;
652
+ sl = s * vmin;
653
+ sl /= lmin <= 1 ? lmin : 2 - lmin;
654
+ sl = sl || 0;
655
+ l /= 2;
656
+ return [h, sl * 100, l * 100];
657
+ };
658
+ convert.hwb.rgb = function(hwb) {
659
+ const h = hwb[0] / 360;
660
+ let wh = hwb[1] / 100;
661
+ let bl = hwb[2] / 100;
662
+ const ratio = wh + bl;
663
+ let f;
664
+ if (ratio > 1) {
665
+ wh /= ratio;
666
+ bl /= ratio;
667
+ }
668
+ const i = Math.floor(6 * h);
669
+ const v = 1 - bl;
670
+ f = 6 * h - i;
671
+ if ((i & 1) !== 0) {
672
+ f = 1 - f;
673
+ }
674
+ const n = wh + f * (v - wh);
675
+ let r;
676
+ let g;
677
+ let b;
678
+ switch (i) {
679
+ default:
680
+ case 6:
681
+ case 0: {
682
+ r = v;
683
+ g = n;
684
+ b = wh;
685
+ break;
686
+ }
687
+ case 1: {
688
+ r = n;
689
+ g = v;
690
+ b = wh;
691
+ break;
692
+ }
693
+ case 2: {
694
+ r = wh;
695
+ g = v;
696
+ b = n;
697
+ break;
698
+ }
699
+ case 3: {
700
+ r = wh;
701
+ g = n;
702
+ b = v;
703
+ break;
704
+ }
705
+ case 4: {
706
+ r = n;
707
+ g = wh;
708
+ b = v;
709
+ break;
710
+ }
711
+ case 5: {
712
+ r = v;
713
+ g = wh;
714
+ b = n;
715
+ break;
716
+ }
717
+ }
718
+ return [r * 255, g * 255, b * 255];
719
+ };
720
+ convert.cmyk.rgb = function(cmyk) {
721
+ const c = cmyk[0] / 100;
722
+ const m = cmyk[1] / 100;
723
+ const y = cmyk[2] / 100;
724
+ const k = cmyk[3] / 100;
725
+ const r = 1 - Math.min(1, c * (1 - k) + k);
726
+ const g = 1 - Math.min(1, m * (1 - k) + k);
727
+ const b = 1 - Math.min(1, y * (1 - k) + k);
728
+ return [r * 255, g * 255, b * 255];
729
+ };
730
+ convert.xyz.rgb = function(xyz) {
731
+ const x = xyz[0] / 100;
732
+ const y = xyz[1] / 100;
733
+ const z = xyz[2] / 100;
734
+ let r;
735
+ let g;
736
+ let b;
737
+ r = x * 3.2404542 + y * -1.5371385 + z * -0.4985314;
738
+ g = x * -0.969266 + y * 1.8760108 + z * 0.041556;
739
+ b = x * 0.0556434 + y * -0.2040259 + z * 1.0572252;
740
+ r = srgbNonlinearTransform(r);
741
+ g = srgbNonlinearTransform(g);
742
+ b = srgbNonlinearTransform(b);
743
+ return [r * 255, g * 255, b * 255];
744
+ };
745
+ convert.xyz.lab = function(xyz) {
746
+ let x = xyz[0];
747
+ let y = xyz[1];
748
+ let z = xyz[2];
749
+ x /= 95.047;
750
+ y /= 100;
751
+ z /= 108.883;
752
+ x = x > LAB_FT ? x ** (1 / 3) : 7.787 * x + 16 / 116;
753
+ y = y > LAB_FT ? y ** (1 / 3) : 7.787 * y + 16 / 116;
754
+ z = z > LAB_FT ? z ** (1 / 3) : 7.787 * z + 16 / 116;
755
+ const l = 116 * y - 16;
756
+ const a = 500 * (x - y);
757
+ const b = 200 * (y - z);
758
+ return [l, a, b];
759
+ };
760
+ convert.xyz.oklab = function(xyz) {
761
+ const x = xyz[0] / 100;
762
+ const y = xyz[1] / 100;
763
+ const z = xyz[2] / 100;
764
+ const lp = Math.cbrt(0.8189330101 * x + 0.3618667424 * y - 0.1288597137 * z);
765
+ const mp = Math.cbrt(0.0329845436 * x + 0.9293118715 * y + 0.0361456387 * z);
766
+ const sp = Math.cbrt(0.0482003018 * x + 0.2643662691 * y + 0.633851707 * z);
767
+ const l = 0.2104542553 * lp + 0.793617785 * mp - 0.0040720468 * sp;
768
+ const a = 1.9779984951 * lp - 2.428592205 * mp + 0.4505937099 * sp;
769
+ const b = 0.0259040371 * lp + 0.7827717662 * mp - 0.808675766 * sp;
770
+ return [l * 100, a * 100, b * 100];
771
+ };
772
+ convert.oklab.oklch = function(oklab) {
773
+ return convert.lab.lch(oklab);
774
+ };
775
+ convert.oklab.xyz = function(oklab) {
776
+ const ll = oklab[0] / 100;
777
+ const a = oklab[1] / 100;
778
+ const b = oklab[2] / 100;
779
+ const l = (0.999999998 * ll + 0.396337792 * a + 0.215803758 * b) ** 3;
780
+ const m = (1.000000008 * ll - 0.105561342 * a - 0.063854175 * b) ** 3;
781
+ const s = (1.000000055 * ll - 0.089484182 * a - 1.291485538 * b) ** 3;
782
+ const x = 1.227013851 * l - 0.55779998 * m + 0.281256149 * s;
783
+ const y = -0.040580178 * l + 1.11225687 * m - 0.071676679 * s;
784
+ const z = -0.076381285 * l - 0.421481978 * m + 1.58616322 * s;
785
+ return [x * 100, y * 100, z * 100];
786
+ };
787
+ convert.oklab.rgb = function(oklab) {
788
+ const ll = oklab[0] / 100;
789
+ const aa = oklab[1] / 100;
790
+ const bb = oklab[2] / 100;
791
+ const l = (ll + 0.3963377774 * aa + 0.2158037573 * bb) ** 3;
792
+ const m = (ll - 0.1055613458 * aa - 0.0638541728 * bb) ** 3;
793
+ const s = (ll - 0.0894841775 * aa - 1.291485548 * bb) ** 3;
794
+ const r = srgbNonlinearTransform(4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s);
795
+ const g = srgbNonlinearTransform(-1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s);
796
+ const b = srgbNonlinearTransform(-0.0041960863 * l - 0.7034186147 * m + 1.707614701 * s);
797
+ return [r * 255, g * 255, b * 255];
798
+ };
799
+ convert.oklch.oklab = function(oklch) {
800
+ return convert.lch.lab(oklch);
801
+ };
802
+ convert.lab.xyz = function(lab) {
803
+ const l = lab[0];
804
+ const a = lab[1];
805
+ const b = lab[2];
806
+ let x;
807
+ let y;
808
+ let z;
809
+ y = (l + 16) / 116;
810
+ x = a / 500 + y;
811
+ z = y - b / 200;
812
+ const y2 = y ** 3;
813
+ const x2 = x ** 3;
814
+ const z2 = z ** 3;
815
+ y = y2 > LAB_FT ? y2 : (y - 16 / 116) / 7.787;
816
+ x = x2 > LAB_FT ? x2 : (x - 16 / 116) / 7.787;
817
+ z = z2 > LAB_FT ? z2 : (z - 16 / 116) / 7.787;
818
+ x *= 95.047;
819
+ y *= 100;
820
+ z *= 108.883;
821
+ return [x, y, z];
822
+ };
823
+ convert.lab.lch = function(lab) {
824
+ const l = lab[0];
825
+ const a = lab[1];
826
+ const b = lab[2];
827
+ let h;
828
+ const hr = Math.atan2(b, a);
829
+ h = hr * 360 / 2 / Math.PI;
830
+ if (h < 0) {
831
+ h += 360;
832
+ }
833
+ const c = Math.sqrt(a * a + b * b);
834
+ return [l, c, h];
835
+ };
836
+ convert.lch.lab = function(lch) {
837
+ const l = lch[0];
838
+ const c = lch[1];
839
+ const h = lch[2];
840
+ const hr = h / 360 * 2 * Math.PI;
841
+ const a = c * Math.cos(hr);
842
+ const b = c * Math.sin(hr);
843
+ return [l, a, b];
844
+ };
845
+ convert.rgb.ansi16 = function(args, saturation = null) {
846
+ const [r, g, b] = args;
847
+ let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation;
848
+ value = Math.round(value / 50);
849
+ if (value === 0) {
850
+ return 30;
851
+ }
852
+ let ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
853
+ if (value === 2) {
854
+ ansi += 60;
855
+ }
856
+ return ansi;
857
+ };
858
+ convert.hsv.ansi16 = function(args) {
859
+ return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
860
+ };
861
+ convert.rgb.ansi256 = function(args) {
862
+ const r = args[0];
863
+ const g = args[1];
864
+ const b = args[2];
865
+ if (r >> 4 === g >> 4 && g >> 4 === b >> 4) {
866
+ if (r < 8) {
867
+ return 16;
868
+ }
869
+ if (r > 248) {
870
+ return 231;
871
+ }
872
+ return Math.round((r - 8) / 247 * 24) + 232;
873
+ }
874
+ const ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
875
+ return ansi;
876
+ };
877
+ convert.ansi16.rgb = function(args) {
878
+ args = args[0];
879
+ let color = args % 10;
880
+ if (color === 0 || color === 7) {
881
+ if (args > 50) {
882
+ color += 3.5;
883
+ }
884
+ color = color / 10.5 * 255;
885
+ return [color, color, color];
886
+ }
887
+ const mult = (Math.trunc(args > 50) + 1) * 0.5;
888
+ const r = (color & 1) * mult * 255;
889
+ const g = (color >> 1 & 1) * mult * 255;
890
+ const b = (color >> 2 & 1) * mult * 255;
891
+ return [r, g, b];
892
+ };
893
+ convert.ansi256.rgb = function(args) {
894
+ args = args[0];
895
+ if (args >= 232) {
896
+ const c = (args - 232) * 10 + 8;
897
+ return [c, c, c];
898
+ }
899
+ args -= 16;
900
+ let rem;
901
+ const r = Math.floor(args / 36) / 5 * 255;
902
+ const g = Math.floor((rem = args % 36) / 6) / 5 * 255;
903
+ const b = rem % 6 / 5 * 255;
904
+ return [r, g, b];
905
+ };
906
+ convert.rgb.hex = function(args) {
907
+ const integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
908
+ const string = integer.toString(16).toUpperCase();
909
+ return "000000".slice(string.length) + string;
910
+ };
911
+ convert.hex.rgb = function(args) {
912
+ const match = args.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);
913
+ if (!match) {
914
+ return [0, 0, 0];
915
+ }
916
+ let colorString = match[0];
917
+ if (match[0].length === 3) {
918
+ colorString = [...colorString].map((char) => char + char).join("");
919
+ }
920
+ const integer = Number.parseInt(colorString, 16);
921
+ const r = integer >> 16 & 255;
922
+ const g = integer >> 8 & 255;
923
+ const b = integer & 255;
924
+ return [r, g, b];
925
+ };
926
+ convert.rgb.hcg = function(rgb) {
927
+ const r = rgb[0] / 255;
928
+ const g = rgb[1] / 255;
929
+ const b = rgb[2] / 255;
930
+ const max = Math.max(Math.max(r, g), b);
931
+ const min = Math.min(Math.min(r, g), b);
932
+ const chroma = max - min;
933
+ let hue;
934
+ const grayscale = chroma < 1 ? min / (1 - chroma) : 0;
935
+ if (chroma <= 0) {
936
+ hue = 0;
937
+ } else if (max === r) {
938
+ hue = (g - b) / chroma % 6;
939
+ } else if (max === g) {
940
+ hue = 2 + (b - r) / chroma;
941
+ } else {
942
+ hue = 4 + (r - g) / chroma;
943
+ }
944
+ hue /= 6;
945
+ hue %= 1;
946
+ return [hue * 360, chroma * 100, grayscale * 100];
947
+ };
948
+ convert.hsl.hcg = function(hsl) {
949
+ const s = hsl[1] / 100;
950
+ const l = hsl[2] / 100;
951
+ const c = l < 0.5 ? 2 * s * l : 2 * s * (1 - l);
952
+ let f = 0;
953
+ if (c < 1) {
954
+ f = (l - 0.5 * c) / (1 - c);
955
+ }
956
+ return [hsl[0], c * 100, f * 100];
957
+ };
958
+ convert.hsv.hcg = function(hsv) {
959
+ const s = hsv[1] / 100;
960
+ const v = hsv[2] / 100;
961
+ const c = s * v;
962
+ let f = 0;
963
+ if (c < 1) {
964
+ f = (v - c) / (1 - c);
965
+ }
966
+ return [hsv[0], c * 100, f * 100];
967
+ };
968
+ convert.hcg.rgb = function(hcg) {
969
+ const h = hcg[0] / 360;
970
+ const c = hcg[1] / 100;
971
+ const g = hcg[2] / 100;
972
+ if (c === 0) {
973
+ return [g * 255, g * 255, g * 255];
974
+ }
975
+ const pure = [0, 0, 0];
976
+ const hi = h % 1 * 6;
977
+ const v = hi % 1;
978
+ const w = 1 - v;
979
+ let mg = 0;
980
+ switch (Math.floor(hi)) {
981
+ case 0: {
982
+ pure[0] = 1;
983
+ pure[1] = v;
984
+ pure[2] = 0;
985
+ break;
986
+ }
987
+ case 1: {
988
+ pure[0] = w;
989
+ pure[1] = 1;
990
+ pure[2] = 0;
991
+ break;
992
+ }
993
+ case 2: {
994
+ pure[0] = 0;
995
+ pure[1] = 1;
996
+ pure[2] = v;
997
+ break;
998
+ }
999
+ case 3: {
1000
+ pure[0] = 0;
1001
+ pure[1] = w;
1002
+ pure[2] = 1;
1003
+ break;
1004
+ }
1005
+ case 4: {
1006
+ pure[0] = v;
1007
+ pure[1] = 0;
1008
+ pure[2] = 1;
1009
+ break;
1010
+ }
1011
+ default: {
1012
+ pure[0] = 1;
1013
+ pure[1] = 0;
1014
+ pure[2] = w;
1015
+ }
1016
+ }
1017
+ mg = (1 - c) * g;
1018
+ return [
1019
+ (c * pure[0] + mg) * 255,
1020
+ (c * pure[1] + mg) * 255,
1021
+ (c * pure[2] + mg) * 255
1022
+ ];
1023
+ };
1024
+ convert.hcg.hsv = function(hcg) {
1025
+ const c = hcg[1] / 100;
1026
+ const g = hcg[2] / 100;
1027
+ const v = c + g * (1 - c);
1028
+ let f = 0;
1029
+ if (v > 0) {
1030
+ f = c / v;
1031
+ }
1032
+ return [hcg[0], f * 100, v * 100];
1033
+ };
1034
+ convert.hcg.hsl = function(hcg) {
1035
+ const c = hcg[1] / 100;
1036
+ const g = hcg[2] / 100;
1037
+ const l = g * (1 - c) + 0.5 * c;
1038
+ let s = 0;
1039
+ if (l > 0 && l < 0.5) {
1040
+ s = c / (2 * l);
1041
+ } else if (l >= 0.5 && l < 1) {
1042
+ s = c / (2 * (1 - l));
1043
+ }
1044
+ return [hcg[0], s * 100, l * 100];
1045
+ };
1046
+ convert.hcg.hwb = function(hcg) {
1047
+ const c = hcg[1] / 100;
1048
+ const g = hcg[2] / 100;
1049
+ const v = c + g * (1 - c);
1050
+ return [hcg[0], (v - c) * 100, (1 - v) * 100];
1051
+ };
1052
+ convert.hwb.hcg = function(hwb) {
1053
+ const w = hwb[1] / 100;
1054
+ const b = hwb[2] / 100;
1055
+ const v = 1 - b;
1056
+ const c = v - w;
1057
+ let g = 0;
1058
+ if (c < 1) {
1059
+ g = (v - c) / (1 - c);
1060
+ }
1061
+ return [hwb[0], c * 100, g * 100];
1062
+ };
1063
+ convert.apple.rgb = function(apple) {
1064
+ return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
1065
+ };
1066
+ convert.rgb.apple = function(rgb) {
1067
+ return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];
1068
+ };
1069
+ convert.gray.rgb = function(args) {
1070
+ return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
1071
+ };
1072
+ convert.gray.hsl = function(args) {
1073
+ return [0, 0, args[0]];
1074
+ };
1075
+ convert.gray.hsv = convert.gray.hsl;
1076
+ convert.gray.hwb = function(gray) {
1077
+ return [0, 100, gray[0]];
1078
+ };
1079
+ convert.gray.cmyk = function(gray) {
1080
+ return [0, 0, 0, gray[0]];
1081
+ };
1082
+ convert.gray.lab = function(gray) {
1083
+ return [gray[0], 0, 0];
1084
+ };
1085
+ convert.gray.hex = function(gray) {
1086
+ const value = Math.round(gray[0] / 100 * 255) & 255;
1087
+ const integer = (value << 16) + (value << 8) + value;
1088
+ const string = integer.toString(16).toUpperCase();
1089
+ return "000000".slice(string.length) + string;
1090
+ };
1091
+ convert.rgb.gray = function(rgb) {
1092
+ const value = (rgb[0] + rgb[1] + rgb[2]) / 3;
1093
+ return [value / 255 * 100];
1094
+ };
1095
+
1096
+ // node_modules/color-convert/route.js
1097
+ function buildGraph() {
1098
+ const graph = {};
1099
+ const models2 = Object.keys(conversions_default);
1100
+ for (let { length } = models2, i = 0; i < length; i++) {
1101
+ graph[models2[i]] = {
1102
+ // http://jsperf.com/1-vs-infinity
1103
+ // micro-opt, but this is simple.
1104
+ distance: -1,
1105
+ parent: null
1106
+ };
1107
+ }
1108
+ return graph;
1109
+ }
1110
+ function deriveBFS(fromModel) {
1111
+ const graph = buildGraph();
1112
+ const queue = [fromModel];
1113
+ graph[fromModel].distance = 0;
1114
+ while (queue.length > 0) {
1115
+ const current = queue.pop();
1116
+ const adjacents = Object.keys(conversions_default[current]);
1117
+ for (let { length } = adjacents, i = 0; i < length; i++) {
1118
+ const adjacent = adjacents[i];
1119
+ const node = graph[adjacent];
1120
+ if (node.distance === -1) {
1121
+ node.distance = graph[current].distance + 1;
1122
+ node.parent = current;
1123
+ queue.unshift(adjacent);
1124
+ }
1125
+ }
1126
+ }
1127
+ return graph;
1128
+ }
1129
+ function link(from, to) {
1130
+ return function(args) {
1131
+ return to(from(args));
1132
+ };
1133
+ }
1134
+ function wrapConversion(toModel, graph) {
1135
+ const path = [graph[toModel].parent, toModel];
1136
+ let fn = conversions_default[graph[toModel].parent][toModel];
1137
+ let cur = graph[toModel].parent;
1138
+ while (graph[cur].parent) {
1139
+ path.unshift(graph[cur].parent);
1140
+ fn = link(conversions_default[graph[cur].parent][cur], fn);
1141
+ cur = graph[cur].parent;
1142
+ }
1143
+ fn.conversion = path;
1144
+ return fn;
1145
+ }
1146
+ function route(fromModel) {
1147
+ const graph = deriveBFS(fromModel);
1148
+ const conversion = {};
1149
+ const models2 = Object.keys(graph);
1150
+ for (let { length } = models2, i = 0; i < length; i++) {
1151
+ const toModel = models2[i];
1152
+ const node = graph[toModel];
1153
+ if (node.parent === null) {
1154
+ continue;
1155
+ }
1156
+ conversion[toModel] = wrapConversion(toModel, graph);
1157
+ }
1158
+ return conversion;
1159
+ }
1160
+ var route_default = route;
1161
+
1162
+ // node_modules/color-convert/index.js
1163
+ var convert2 = {};
1164
+ var models = Object.keys(conversions_default);
1165
+ function wrapRaw(fn) {
1166
+ const wrappedFn = function(...args) {
1167
+ const arg0 = args[0];
1168
+ if (arg0 === void 0 || arg0 === null) {
1169
+ return arg0;
1170
+ }
1171
+ if (arg0.length > 1) {
1172
+ args = arg0;
1173
+ }
1174
+ return fn(args);
1175
+ };
1176
+ if ("conversion" in fn) {
1177
+ wrappedFn.conversion = fn.conversion;
1178
+ }
1179
+ return wrappedFn;
1180
+ }
1181
+ function wrapRounded(fn) {
1182
+ const wrappedFn = function(...args) {
1183
+ const arg0 = args[0];
1184
+ if (arg0 === void 0 || arg0 === null) {
1185
+ return arg0;
1186
+ }
1187
+ if (arg0.length > 1) {
1188
+ args = arg0;
1189
+ }
1190
+ const result = fn(args);
1191
+ if (typeof result === "object") {
1192
+ for (let { length } = result, i = 0; i < length; i++) {
1193
+ result[i] = Math.round(result[i]);
1194
+ }
1195
+ }
1196
+ return result;
1197
+ };
1198
+ if ("conversion" in fn) {
1199
+ wrappedFn.conversion = fn.conversion;
1200
+ }
1201
+ return wrappedFn;
1202
+ }
1203
+ for (const fromModel of models) {
1204
+ convert2[fromModel] = {};
1205
+ Object.defineProperty(convert2[fromModel], "channels", { value: conversions_default[fromModel].channels });
1206
+ Object.defineProperty(convert2[fromModel], "labels", { value: conversions_default[fromModel].labels });
1207
+ const routes = route_default(fromModel);
1208
+ const routeModels = Object.keys(routes);
1209
+ for (const toModel of routeModels) {
1210
+ const fn = routes[toModel];
1211
+ convert2[fromModel][toModel] = wrapRounded(fn);
1212
+ convert2[fromModel][toModel].raw = wrapRaw(fn);
1213
+ }
1214
+ }
1215
+ var color_convert_default = convert2;
1216
+
1217
+ // node_modules/color/index.js
1218
+ var skippedModels = [
1219
+ // To be honest, I don't really feel like keyword belongs in color convert, but eh.
1220
+ "keyword",
1221
+ // Gray conflicts with some method names, and has its own method defined.
1222
+ "gray",
1223
+ // Shouldn't really be in color-convert either...
1224
+ "hex"
1225
+ ];
1226
+ var hashedModelKeys = {};
1227
+ for (const model of Object.keys(color_convert_default)) {
1228
+ hashedModelKeys[[...color_convert_default[model].labels].sort().join("")] = model;
1229
+ }
1230
+ var limiters = {};
1231
+ function Color(object, model) {
1232
+ if (!(this instanceof Color)) {
1233
+ return new Color(object, model);
1234
+ }
1235
+ if (model && model in skippedModels) {
1236
+ model = null;
1237
+ }
1238
+ if (model && !(model in color_convert_default)) {
1239
+ throw new Error("Unknown model: " + model);
1240
+ }
1241
+ let i;
1242
+ let channels;
1243
+ if (object == null) {
1244
+ this.model = "rgb";
1245
+ this.color = [0, 0, 0];
1246
+ this.valpha = 1;
1247
+ } else if (object instanceof Color) {
1248
+ this.model = object.model;
1249
+ this.color = [...object.color];
1250
+ this.valpha = object.valpha;
1251
+ } else if (typeof object === "string") {
1252
+ const result = color_string_default.get(object);
1253
+ if (result === null) {
1254
+ throw new Error("Unable to parse color from string: " + object);
1255
+ }
1256
+ this.model = result.model;
1257
+ channels = color_convert_default[this.model].channels;
1258
+ this.color = result.value.slice(0, channels);
1259
+ this.valpha = typeof result.value[channels] === "number" ? result.value[channels] : 1;
1260
+ } else if (object.length > 0) {
1261
+ this.model = model || "rgb";
1262
+ channels = color_convert_default[this.model].channels;
1263
+ const newArray = Array.prototype.slice.call(object, 0, channels);
1264
+ this.color = zeroArray(newArray, channels);
1265
+ this.valpha = typeof object[channels] === "number" ? object[channels] : 1;
1266
+ } else if (typeof object === "number") {
1267
+ this.model = "rgb";
1268
+ this.color = [
1269
+ object >> 16 & 255,
1270
+ object >> 8 & 255,
1271
+ object & 255
1272
+ ];
1273
+ this.valpha = 1;
1274
+ } else {
1275
+ this.valpha = 1;
1276
+ const keys = Object.keys(object);
1277
+ if ("alpha" in object) {
1278
+ keys.splice(keys.indexOf("alpha"), 1);
1279
+ this.valpha = typeof object.alpha === "number" ? object.alpha : 0;
1280
+ }
1281
+ const hashedKeys = keys.sort().join("");
1282
+ if (!(hashedKeys in hashedModelKeys)) {
1283
+ throw new Error("Unable to parse color from object: " + JSON.stringify(object));
1284
+ }
1285
+ this.model = hashedModelKeys[hashedKeys];
1286
+ const { labels } = color_convert_default[this.model];
1287
+ const color = [];
1288
+ for (i = 0; i < labels.length; i++) {
1289
+ color.push(object[labels[i]]);
1290
+ }
1291
+ this.color = zeroArray(color);
1292
+ }
1293
+ if (limiters[this.model]) {
1294
+ channels = color_convert_default[this.model].channels;
1295
+ for (i = 0; i < channels; i++) {
1296
+ const limit = limiters[this.model][i];
1297
+ if (limit) {
1298
+ this.color[i] = limit(this.color[i]);
1299
+ }
1300
+ }
1301
+ }
1302
+ this.valpha = Math.max(0, Math.min(1, this.valpha));
1303
+ if (Object.freeze) {
1304
+ Object.freeze(this);
1305
+ }
1306
+ }
1307
+ Color.prototype = {
1308
+ toString() {
1309
+ return this.string();
1310
+ },
1311
+ toJSON() {
1312
+ return this[this.model]();
1313
+ },
1314
+ string(places) {
1315
+ let self = this.model in color_string_default.to ? this : this.rgb();
1316
+ self = self.round(typeof places === "number" ? places : 1);
1317
+ const arguments_ = self.valpha === 1 ? self.color : [...self.color, this.valpha];
1318
+ return color_string_default.to[self.model](...arguments_);
1319
+ },
1320
+ percentString(places) {
1321
+ const self = this.rgb().round(typeof places === "number" ? places : 1);
1322
+ const arguments_ = self.valpha === 1 ? self.color : [...self.color, this.valpha];
1323
+ return color_string_default.to.rgb.percent(...arguments_);
1324
+ },
1325
+ array() {
1326
+ return this.valpha === 1 ? [...this.color] : [...this.color, this.valpha];
1327
+ },
1328
+ object() {
1329
+ const result = {};
1330
+ const { channels } = color_convert_default[this.model];
1331
+ const { labels } = color_convert_default[this.model];
1332
+ for (let i = 0; i < channels; i++) {
1333
+ result[labels[i]] = this.color[i];
1334
+ }
1335
+ if (this.valpha !== 1) {
1336
+ result.alpha = this.valpha;
1337
+ }
1338
+ return result;
1339
+ },
1340
+ unitArray() {
1341
+ const rgb = this.rgb().color;
1342
+ rgb[0] /= 255;
1343
+ rgb[1] /= 255;
1344
+ rgb[2] /= 255;
1345
+ if (this.valpha !== 1) {
1346
+ rgb.push(this.valpha);
1347
+ }
1348
+ return rgb;
1349
+ },
1350
+ unitObject() {
1351
+ const rgb = this.rgb().object();
1352
+ rgb.r /= 255;
1353
+ rgb.g /= 255;
1354
+ rgb.b /= 255;
1355
+ if (this.valpha !== 1) {
1356
+ rgb.alpha = this.valpha;
1357
+ }
1358
+ return rgb;
1359
+ },
1360
+ round(places) {
1361
+ places = Math.max(places || 0, 0);
1362
+ return new Color([...this.color.map(roundToPlace(places)), this.valpha], this.model);
1363
+ },
1364
+ alpha(value) {
1365
+ if (value !== void 0) {
1366
+ return new Color([...this.color, Math.max(0, Math.min(1, value))], this.model);
1367
+ }
1368
+ return this.valpha;
1369
+ },
1370
+ // Rgb
1371
+ red: getset("rgb", 0, maxfn(255)),
1372
+ green: getset("rgb", 1, maxfn(255)),
1373
+ blue: getset("rgb", 2, maxfn(255)),
1374
+ hue: getset(["hsl", "hsv", "hsl", "hwb", "hcg"], 0, (value) => (value % 360 + 360) % 360),
1375
+ saturationl: getset("hsl", 1, maxfn(100)),
1376
+ lightness: getset("hsl", 2, maxfn(100)),
1377
+ saturationv: getset("hsv", 1, maxfn(100)),
1378
+ value: getset("hsv", 2, maxfn(100)),
1379
+ chroma: getset("hcg", 1, maxfn(100)),
1380
+ gray: getset("hcg", 2, maxfn(100)),
1381
+ white: getset("hwb", 1, maxfn(100)),
1382
+ wblack: getset("hwb", 2, maxfn(100)),
1383
+ cyan: getset("cmyk", 0, maxfn(100)),
1384
+ magenta: getset("cmyk", 1, maxfn(100)),
1385
+ yellow: getset("cmyk", 2, maxfn(100)),
1386
+ black: getset("cmyk", 3, maxfn(100)),
1387
+ x: getset("xyz", 0, maxfn(95.047)),
1388
+ y: getset("xyz", 1, maxfn(100)),
1389
+ z: getset("xyz", 2, maxfn(108.833)),
1390
+ l: getset("lab", 0, maxfn(100)),
1391
+ a: getset("lab", 1),
1392
+ b: getset("lab", 2),
1393
+ keyword(value) {
1394
+ if (value !== void 0) {
1395
+ return new Color(value);
1396
+ }
1397
+ return color_convert_default[this.model].keyword(this.color);
1398
+ },
1399
+ hex(value) {
1400
+ if (value !== void 0) {
1401
+ return new Color(value);
1402
+ }
1403
+ return color_string_default.to.hex(...this.rgb().round().color);
1404
+ },
1405
+ hexa(value) {
1406
+ if (value !== void 0) {
1407
+ return new Color(value);
1408
+ }
1409
+ const rgbArray = this.rgb().round().color;
1410
+ let alphaHex = Math.round(this.valpha * 255).toString(16).toUpperCase();
1411
+ if (alphaHex.length === 1) {
1412
+ alphaHex = "0" + alphaHex;
1413
+ }
1414
+ return color_string_default.to.hex(...rgbArray) + alphaHex;
1415
+ },
1416
+ rgbNumber() {
1417
+ const rgb = this.rgb().color;
1418
+ return (rgb[0] & 255) << 16 | (rgb[1] & 255) << 8 | rgb[2] & 255;
1419
+ },
1420
+ luminosity() {
1421
+ const rgb = this.rgb().color;
1422
+ const lum = [];
1423
+ for (const [i, element] of rgb.entries()) {
1424
+ const chan = element / 255;
1425
+ lum[i] = chan <= 0.04045 ? chan / 12.92 : ((chan + 0.055) / 1.055) ** 2.4;
1426
+ }
1427
+ return 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];
1428
+ },
1429
+ contrast(color2) {
1430
+ const lum1 = this.luminosity();
1431
+ const lum2 = color2.luminosity();
1432
+ if (lum1 > lum2) {
1433
+ return (lum1 + 0.05) / (lum2 + 0.05);
1434
+ }
1435
+ return (lum2 + 0.05) / (lum1 + 0.05);
1436
+ },
1437
+ level(color2) {
1438
+ const contrastRatio = this.contrast(color2);
1439
+ if (contrastRatio >= 7) {
1440
+ return "AAA";
1441
+ }
1442
+ return contrastRatio >= 4.5 ? "AA" : "";
1443
+ },
1444
+ isDark() {
1445
+ const rgb = this.rgb().color;
1446
+ const yiq = (rgb[0] * 2126 + rgb[1] * 7152 + rgb[2] * 722) / 1e4;
1447
+ return yiq < 128;
1448
+ },
1449
+ isLight() {
1450
+ return !this.isDark();
1451
+ },
1452
+ negate() {
1453
+ const rgb = this.rgb();
1454
+ for (let i = 0; i < 3; i++) {
1455
+ rgb.color[i] = 255 - rgb.color[i];
1456
+ }
1457
+ return rgb;
1458
+ },
1459
+ lighten(ratio) {
1460
+ const hsl = this.hsl();
1461
+ hsl.color[2] += hsl.color[2] * ratio;
1462
+ return hsl;
1463
+ },
1464
+ darken(ratio) {
1465
+ const hsl = this.hsl();
1466
+ hsl.color[2] -= hsl.color[2] * ratio;
1467
+ return hsl;
1468
+ },
1469
+ saturate(ratio) {
1470
+ const hsl = this.hsl();
1471
+ hsl.color[1] += hsl.color[1] * ratio;
1472
+ return hsl;
1473
+ },
1474
+ desaturate(ratio) {
1475
+ const hsl = this.hsl();
1476
+ hsl.color[1] -= hsl.color[1] * ratio;
1477
+ return hsl;
1478
+ },
1479
+ whiten(ratio) {
1480
+ const hwb = this.hwb();
1481
+ hwb.color[1] += hwb.color[1] * ratio;
1482
+ return hwb;
1483
+ },
1484
+ blacken(ratio) {
1485
+ const hwb = this.hwb();
1486
+ hwb.color[2] += hwb.color[2] * ratio;
1487
+ return hwb;
1488
+ },
1489
+ grayscale() {
1490
+ const rgb = this.rgb().color;
1491
+ const value = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11;
1492
+ return Color.rgb(value, value, value);
1493
+ },
1494
+ fade(ratio) {
1495
+ return this.alpha(this.valpha - this.valpha * ratio);
1496
+ },
1497
+ opaquer(ratio) {
1498
+ return this.alpha(this.valpha + this.valpha * ratio);
1499
+ },
1500
+ rotate(degrees) {
1501
+ const hsl = this.hsl();
1502
+ let hue = hsl.color[0];
1503
+ hue = (hue + degrees) % 360;
1504
+ hue = hue < 0 ? 360 + hue : hue;
1505
+ hsl.color[0] = hue;
1506
+ return hsl;
1507
+ },
1508
+ mix(mixinColor, weight) {
1509
+ if (!mixinColor || !mixinColor.rgb) {
1510
+ throw new Error('Argument to "mix" was not a Color instance, but rather an instance of ' + typeof mixinColor);
1511
+ }
1512
+ const color1 = mixinColor.rgb();
1513
+ const color2 = this.rgb();
1514
+ const p = weight === void 0 ? 0.5 : weight;
1515
+ const w = 2 * p - 1;
1516
+ const a = color1.alpha() - color2.alpha();
1517
+ const w1 = ((w * a === -1 ? w : (w + a) / (1 + w * a)) + 1) / 2;
1518
+ const w2 = 1 - w1;
1519
+ return Color.rgb(
1520
+ w1 * color1.red() + w2 * color2.red(),
1521
+ w1 * color1.green() + w2 * color2.green(),
1522
+ w1 * color1.blue() + w2 * color2.blue(),
1523
+ color1.alpha() * p + color2.alpha() * (1 - p)
1524
+ );
1525
+ }
1526
+ };
1527
+ for (const model of Object.keys(color_convert_default)) {
1528
+ if (skippedModels.includes(model)) {
1529
+ continue;
1530
+ }
1531
+ const { channels } = color_convert_default[model];
1532
+ Color.prototype[model] = function(...arguments_) {
1533
+ if (this.model === model) {
1534
+ return new Color(this);
1535
+ }
1536
+ if (arguments_.length > 0) {
1537
+ return new Color(arguments_, model);
1538
+ }
1539
+ return new Color([...assertArray(color_convert_default[this.model][model].raw(this.color)), this.valpha], model);
1540
+ };
1541
+ Color[model] = function(...arguments_) {
1542
+ let color = arguments_[0];
1543
+ if (typeof color === "number") {
1544
+ color = zeroArray(arguments_, channels);
1545
+ }
1546
+ return new Color(color, model);
1547
+ };
1548
+ }
1549
+ function roundTo(number, places) {
1550
+ return Number(number.toFixed(places));
1551
+ }
1552
+ function roundToPlace(places) {
1553
+ return function(number) {
1554
+ return roundTo(number, places);
1555
+ };
1556
+ }
1557
+ function getset(model, channel, modifier) {
1558
+ model = Array.isArray(model) ? model : [model];
1559
+ for (const m of model) {
1560
+ (limiters[m] ||= [])[channel] = modifier;
1561
+ }
1562
+ model = model[0];
1563
+ return function(value) {
1564
+ let result;
1565
+ if (value !== void 0) {
1566
+ if (modifier) {
1567
+ value = modifier(value);
1568
+ }
1569
+ result = this[model]();
1570
+ result.color[channel] = value;
1571
+ return result;
1572
+ }
1573
+ result = this[model]().color[channel];
1574
+ if (modifier) {
1575
+ result = modifier(result);
1576
+ }
1577
+ return result;
1578
+ };
1579
+ }
1580
+ function maxfn(max) {
1581
+ return function(v) {
1582
+ return Math.max(0, Math.min(max, v));
1583
+ };
1584
+ }
1585
+ function assertArray(value) {
1586
+ return Array.isArray(value) ? value : [value];
1587
+ }
1588
+ function zeroArray(array, length) {
1589
+ for (let i = 0; i < length; i++) {
1590
+ if (typeof array[i] !== "number") {
1591
+ array[i] = 0;
1592
+ }
1593
+ }
1594
+ return array;
1595
+ }
1596
+ var index_default = Color;