@doenet/v06-to-v07 0.7.21-dev.354 → 0.7.21-dev.357

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.
@@ -38637,178 +38637,246 @@ function requireColorName() {
38637
38637
  }
38638
38638
  var colorNameExports = requireColorName();
38639
38639
  const colorName = /* @__PURE__ */ getDefaultExportFromCjs(colorNameExports);
38640
- var nearestColor$2 = { exports: {} };
38641
- var nearestColor$1 = nearestColor$2.exports;
38642
- var hasRequiredNearestColor;
38643
- function requireNearestColor() {
38644
- if (hasRequiredNearestColor) return nearestColor$2.exports;
38645
- hasRequiredNearestColor = 1;
38646
- (function(module) {
38647
- (function(context) {
38648
- function nearestColor2(needle, colors) {
38649
- needle = parseColor(needle);
38650
- if (!needle) {
38651
- return null;
38652
- }
38653
- var distanceSq, minDistanceSq = Infinity, rgb, value;
38654
- colors || (colors = nearestColor2.DEFAULT_COLORS);
38655
- for (var i2 = 0; i2 < colors.length; ++i2) {
38656
- rgb = colors[i2].rgb;
38657
- distanceSq = Math.pow(needle.r - rgb.r, 2) + Math.pow(needle.g - rgb.g, 2) + Math.pow(needle.b - rgb.b, 2);
38658
- if (distanceSq < minDistanceSq) {
38659
- minDistanceSq = distanceSq;
38660
- value = colors[i2];
38661
- }
38662
- }
38663
- if (value.name) {
38664
- return {
38665
- name: value.name,
38666
- value: value.source,
38667
- rgb: value.rgb,
38668
- distance: Math.sqrt(minDistanceSq)
38669
- };
38670
- }
38671
- return value.source;
38672
- }
38673
- nearestColor2.from = function from(availableColors) {
38674
- var colors = mapColors(availableColors), nearestColorBase = nearestColor2;
38675
- var matcher2 = function nearestColor3(hex) {
38676
- return nearestColorBase(hex, colors);
38677
- };
38678
- matcher2.from = from;
38679
- matcher2.or = function or2(alternateColors) {
38680
- var extendedColors = colors.concat(mapColors(alternateColors));
38681
- return nearestColor2.from(extendedColors);
38682
- };
38683
- return matcher2;
38684
- };
38685
- function mapColors(colors) {
38686
- if (colors instanceof Array) {
38687
- return colors.map(function(color) {
38688
- return createColorSpec(color);
38689
- });
38690
- }
38691
- return Object.keys(colors).map(function(name2) {
38692
- return createColorSpec(colors[name2], name2);
38693
- });
38694
- }
38695
- function parseColor(source) {
38696
- var red, green, blue;
38697
- if (typeof source === "object") {
38698
- return source;
38699
- }
38700
- if (source in nearestColor2.STANDARD_COLORS) {
38701
- return parseColor(nearestColor2.STANDARD_COLORS[source]);
38702
- }
38703
- var hexMatch = source.match(/^#?((?:[0-9a-f]{3}){1,2})$/i);
38704
- if (hexMatch) {
38705
- hexMatch = hexMatch[1];
38706
- if (hexMatch.length === 3) {
38707
- hexMatch = [
38708
- hexMatch.charAt(0) + hexMatch.charAt(0),
38709
- hexMatch.charAt(1) + hexMatch.charAt(1),
38710
- hexMatch.charAt(2) + hexMatch.charAt(2)
38711
- ];
38712
- } else {
38713
- hexMatch = [
38714
- hexMatch.substring(0, 2),
38715
- hexMatch.substring(2, 4),
38716
- hexMatch.substring(4, 6)
38717
- ];
38718
- }
38719
- red = parseInt(hexMatch[0], 16);
38720
- green = parseInt(hexMatch[1], 16);
38721
- blue = parseInt(hexMatch[2], 16);
38722
- return { r: red, g: green, b: blue };
38723
- }
38724
- var rgbMatch = source.match(/^rgb\(\s*(\d{1,3}%?),\s*(\d{1,3}%?),\s*(\d{1,3}%?)\s*\)$/i);
38725
- if (rgbMatch) {
38726
- red = parseComponentValue(rgbMatch[1]);
38727
- green = parseComponentValue(rgbMatch[2]);
38728
- blue = parseComponentValue(rgbMatch[3]);
38729
- return { r: red, g: green, b: blue };
38730
- }
38731
- throw Error('"' + source + '" is not a valid color');
38732
- }
38733
- function createColorSpec(input, name2) {
38734
- var color = {};
38735
- if (name2) {
38736
- color.name = name2;
38737
- }
38738
- if (typeof input === "string") {
38739
- color.source = input;
38740
- color.rgb = parseColor(input);
38741
- } else if (typeof input === "object") {
38742
- if (input.source) {
38743
- return createColorSpec(input.source, input.name);
38744
- }
38745
- color.rgb = input;
38746
- color.source = rgbToHex(input);
38747
- }
38748
- return color;
38749
- }
38750
- function parseComponentValue(string) {
38751
- if (string.charAt(string.length - 1) === "%") {
38752
- return Math.round(parseInt(string, 10) * 255 / 100);
38753
- }
38754
- return Number(string);
38755
- }
38756
- function rgbToHex(rgb) {
38757
- return "#" + leadingZero(rgb.r.toString(16)) + leadingZero(rgb.g.toString(16)) + leadingZero(rgb.b.toString(16));
38758
- }
38759
- function leadingZero(value) {
38760
- if (value.length === 1) {
38761
- value = "0" + value;
38762
- }
38763
- return value;
38764
- }
38765
- nearestColor2.STANDARD_COLORS = {
38766
- aqua: "#0ff",
38767
- black: "#000",
38768
- blue: "#00f",
38769
- fuchsia: "#f0f",
38770
- gray: "#808080",
38771
- green: "#008000",
38772
- lime: "#0f0",
38773
- maroon: "#800000",
38774
- navy: "#000080",
38775
- olive: "#808000",
38776
- orange: "#ffa500",
38777
- purple: "#800080",
38778
- red: "#f00",
38779
- silver: "#c0c0c0",
38780
- teal: "#008080",
38781
- white: "#fff",
38782
- yellow: "#ff0"
38783
- };
38784
- nearestColor2.DEFAULT_COLORS = mapColors([
38785
- "#f00",
38786
- // r
38787
- "#f80",
38788
- // o
38789
- "#ff0",
38790
- // y
38791
- "#0f0",
38792
- // g
38793
- "#00f",
38794
- // b
38795
- "#008",
38796
- // i
38797
- "#808"
38798
- // v
38799
- ]);
38800
- nearestColor2.VERSION = "0.4.4";
38801
- if (module && module.exports) {
38802
- module.exports = nearestColor2;
38803
- } else {
38804
- context.nearestColor = nearestColor2;
38805
- }
38806
- })(nearestColor$1);
38807
- })(nearestColor$2);
38808
- return nearestColor$2.exports;
38809
- }
38810
- var nearestColorExports = requireNearestColor();
38811
- const nearestColor = /* @__PURE__ */ getDefaultExportFromCjs(nearestColorExports);
38640
+ var r$2 = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, t$3 = function(r2) {
38641
+ return "string" == typeof r2 ? r2.length > 0 : "number" == typeof r2;
38642
+ }, n$2 = function(r2, t22, n2) {
38643
+ return void 0 === t22 && (t22 = 0), void 0 === n2 && (n2 = Math.pow(10, t22)), Math.round(n2 * r2) / n2 + 0;
38644
+ }, e$2 = function(r2, t22, n2) {
38645
+ return void 0 === t22 && (t22 = 0), void 0 === n2 && (n2 = 1), r2 > n2 ? n2 : r2 > t22 ? r2 : t22;
38646
+ }, u$2 = function(r2) {
38647
+ return (r2 = isFinite(r2) ? r2 % 360 : 0) > 0 ? r2 : r2 + 360;
38648
+ }, a$2 = function(r2) {
38649
+ return { r: e$2(r2.r, 0, 255), g: e$2(r2.g, 0, 255), b: e$2(r2.b, 0, 255), a: e$2(r2.a) };
38650
+ }, o$3 = function(r2) {
38651
+ return { r: n$2(r2.r), g: n$2(r2.g), b: n$2(r2.b), a: n$2(r2.a, 3) };
38652
+ }, i$2 = /^#([0-9a-f]{3,8})$/i, s$1$1 = function(r2) {
38653
+ var t22 = r2.toString(16);
38654
+ return t22.length < 2 ? "0" + t22 : t22;
38655
+ }, h$2 = function(r2) {
38656
+ var t22 = r2.r, n2 = r2.g, e22 = r2.b, u2 = r2.a, a2 = Math.max(t22, n2, e22), o2 = a2 - Math.min(t22, n2, e22), i2 = o2 ? a2 === t22 ? (n2 - e22) / o2 : a2 === n2 ? 2 + (e22 - t22) / o2 : 4 + (t22 - n2) / o2 : 0;
38657
+ return { h: 60 * (i2 < 0 ? i2 + 6 : i2), s: a2 ? o2 / a2 * 100 : 0, v: a2 / 255 * 100, a: u2 };
38658
+ }, b$2 = function(r2) {
38659
+ var t22 = r2.h, n2 = r2.s, e22 = r2.v, u2 = r2.a;
38660
+ t22 = t22 / 360 * 6, n2 /= 100, e22 /= 100;
38661
+ var a2 = Math.floor(t22), o2 = e22 * (1 - n2), i2 = e22 * (1 - (t22 - a2) * n2), s2 = e22 * (1 - (1 - t22 + a2) * n2), h2 = a2 % 6;
38662
+ return { r: 255 * [e22, i2, o2, o2, s2, e22][h2], g: 255 * [s2, e22, e22, i2, o2, o2][h2], b: 255 * [o2, o2, s2, e22, e22, i2][h2], a: u2 };
38663
+ }, g$2 = function(r2) {
38664
+ return { h: u$2(r2.h), s: e$2(r2.s, 0, 100), l: e$2(r2.l, 0, 100), a: e$2(r2.a) };
38665
+ }, d$1$1 = function(r2) {
38666
+ return { h: n$2(r2.h), s: n$2(r2.s), l: n$2(r2.l), a: n$2(r2.a, 3) };
38667
+ }, f$1$1 = function(r2) {
38668
+ return b$2((n2 = (t22 = r2).s, { h: t22.h, s: (n2 *= ((e22 = t22.l) < 50 ? e22 : 100 - e22) / 100) > 0 ? 2 * n2 / (e22 + n2) * 100 : 0, v: e22 + n2, a: t22.a }));
38669
+ var t22, n2, e22;
38670
+ }, c$1$1 = function(r2) {
38671
+ return { h: (t22 = h$2(r2)).h, s: (u2 = (200 - (n2 = t22.s)) * (e22 = t22.v) / 100) > 0 && u2 < 200 ? n2 * e22 / 100 / (u2 <= 100 ? u2 : 200 - u2) * 100 : 0, l: u2 / 2, a: t22.a };
38672
+ var t22, n2, e22, u2;
38673
+ }, l$2 = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, p$2 = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, v$1$1 = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, m$2 = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, y$1$1 = { string: [[function(r2) {
38674
+ var t22 = i$2.exec(r2);
38675
+ return t22 ? (r2 = t22[1]).length <= 4 ? { r: parseInt(r2[0] + r2[0], 16), g: parseInt(r2[1] + r2[1], 16), b: parseInt(r2[2] + r2[2], 16), a: 4 === r2.length ? n$2(parseInt(r2[3] + r2[3], 16) / 255, 2) : 1 } : 6 === r2.length || 8 === r2.length ? { r: parseInt(r2.substr(0, 2), 16), g: parseInt(r2.substr(2, 2), 16), b: parseInt(r2.substr(4, 2), 16), a: 8 === r2.length ? n$2(parseInt(r2.substr(6, 2), 16) / 255, 2) : 1 } : null : null;
38676
+ }, "hex"], [function(r2) {
38677
+ var t22 = v$1$1.exec(r2) || m$2.exec(r2);
38678
+ return t22 ? t22[2] !== t22[4] || t22[4] !== t22[6] ? null : a$2({ r: Number(t22[1]) / (t22[2] ? 100 / 255 : 1), g: Number(t22[3]) / (t22[4] ? 100 / 255 : 1), b: Number(t22[5]) / (t22[6] ? 100 / 255 : 1), a: void 0 === t22[7] ? 1 : Number(t22[7]) / (t22[8] ? 100 : 1) }) : null;
38679
+ }, "rgb"], [function(t22) {
38680
+ var n2 = l$2.exec(t22) || p$2.exec(t22);
38681
+ if (!n2) return null;
38682
+ var e22, u2, a2 = g$2({ h: (e22 = n2[1], u2 = n2[2], void 0 === u2 && (u2 = "deg"), Number(e22) * (r$2[u2] || 1)), s: Number(n2[3]), l: Number(n2[4]), a: void 0 === n2[5] ? 1 : Number(n2[5]) / (n2[6] ? 100 : 1) });
38683
+ return f$1$1(a2);
38684
+ }, "hsl"]], object: [[function(r2) {
38685
+ var n2 = r2.r, e22 = r2.g, u2 = r2.b, o2 = r2.a, i2 = void 0 === o2 ? 1 : o2;
38686
+ return t$3(n2) && t$3(e22) && t$3(u2) ? a$2({ r: Number(n2), g: Number(e22), b: Number(u2), a: Number(i2) }) : null;
38687
+ }, "rgb"], [function(r2) {
38688
+ var n2 = r2.h, e22 = r2.s, u2 = r2.l, a2 = r2.a, o2 = void 0 === a2 ? 1 : a2;
38689
+ if (!t$3(n2) || !t$3(e22) || !t$3(u2)) return null;
38690
+ var i2 = g$2({ h: Number(n2), s: Number(e22), l: Number(u2), a: Number(o2) });
38691
+ return f$1$1(i2);
38692
+ }, "hsl"], [function(r2) {
38693
+ var n2 = r2.h, a2 = r2.s, o2 = r2.v, i2 = r2.a, s2 = void 0 === i2 ? 1 : i2;
38694
+ if (!t$3(n2) || !t$3(a2) || !t$3(o2)) return null;
38695
+ var h2 = (function(r3) {
38696
+ return { h: u$2(r3.h), s: e$2(r3.s, 0, 100), v: e$2(r3.v, 0, 100), a: e$2(r3.a) };
38697
+ })({ h: Number(n2), s: Number(a2), v: Number(o2), a: Number(s2) });
38698
+ return b$2(h2);
38699
+ }, "hsv"]] }, N$2 = function(r2, t22) {
38700
+ for (var n2 = 0; n2 < t22.length; n2++) {
38701
+ var e22 = t22[n2][0](r2);
38702
+ if (e22) return [e22, t22[n2][1]];
38703
+ }
38704
+ return [null, void 0];
38705
+ }, x$1$1 = function(r2) {
38706
+ return "string" == typeof r2 ? N$2(r2.trim(), y$1$1.string) : "object" == typeof r2 && null !== r2 ? N$2(r2, y$1$1.object) : [null, void 0];
38707
+ }, M$2$1 = function(r2, t22) {
38708
+ var n2 = c$1$1(r2);
38709
+ return { h: n2.h, s: e$2(n2.s + 100 * t22, 0, 100), l: n2.l, a: n2.a };
38710
+ }, H$3 = function(r2) {
38711
+ return (299 * r2.r + 587 * r2.g + 114 * r2.b) / 1e3 / 255;
38712
+ }, $$2 = function(r2, t22) {
38713
+ var n2 = c$1$1(r2);
38714
+ return { h: n2.h, s: n2.s, l: e$2(n2.l + 100 * t22, 0, 100), a: n2.a };
38715
+ }, j$2 = (function() {
38716
+ function r2(r3) {
38717
+ this.parsed = x$1$1(r3)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
38718
+ }
38719
+ return r2.prototype.isValid = function() {
38720
+ return null !== this.parsed;
38721
+ }, r2.prototype.brightness = function() {
38722
+ return n$2(H$3(this.rgba), 2);
38723
+ }, r2.prototype.isDark = function() {
38724
+ return H$3(this.rgba) < 0.5;
38725
+ }, r2.prototype.isLight = function() {
38726
+ return H$3(this.rgba) >= 0.5;
38727
+ }, r2.prototype.toHex = function() {
38728
+ return r3 = o$3(this.rgba), t22 = r3.r, e22 = r3.g, u2 = r3.b, i2 = (a2 = r3.a) < 1 ? s$1$1(n$2(255 * a2)) : "", "#" + s$1$1(t22) + s$1$1(e22) + s$1$1(u2) + i2;
38729
+ var r3, t22, e22, u2, a2, i2;
38730
+ }, r2.prototype.toRgb = function() {
38731
+ return o$3(this.rgba);
38732
+ }, r2.prototype.toRgbString = function() {
38733
+ return r3 = o$3(this.rgba), t22 = r3.r, n2 = r3.g, e22 = r3.b, (u2 = r3.a) < 1 ? "rgba(" + t22 + ", " + n2 + ", " + e22 + ", " + u2 + ")" : "rgb(" + t22 + ", " + n2 + ", " + e22 + ")";
38734
+ var r3, t22, n2, e22, u2;
38735
+ }, r2.prototype.toHsl = function() {
38736
+ return d$1$1(c$1$1(this.rgba));
38737
+ }, r2.prototype.toHslString = function() {
38738
+ return r3 = d$1$1(c$1$1(this.rgba)), t22 = r3.h, n2 = r3.s, e22 = r3.l, (u2 = r3.a) < 1 ? "hsla(" + t22 + ", " + n2 + "%, " + e22 + "%, " + u2 + ")" : "hsl(" + t22 + ", " + n2 + "%, " + e22 + "%)";
38739
+ var r3, t22, n2, e22, u2;
38740
+ }, r2.prototype.toHsv = function() {
38741
+ return r3 = h$2(this.rgba), { h: n$2(r3.h), s: n$2(r3.s), v: n$2(r3.v), a: n$2(r3.a, 3) };
38742
+ var r3;
38743
+ }, r2.prototype.invert = function() {
38744
+ return w$1$1({ r: 255 - (r3 = this.rgba).r, g: 255 - r3.g, b: 255 - r3.b, a: r3.a });
38745
+ var r3;
38746
+ }, r2.prototype.saturate = function(r3) {
38747
+ return void 0 === r3 && (r3 = 0.1), w$1$1(M$2$1(this.rgba, r3));
38748
+ }, r2.prototype.desaturate = function(r3) {
38749
+ return void 0 === r3 && (r3 = 0.1), w$1$1(M$2$1(this.rgba, -r3));
38750
+ }, r2.prototype.grayscale = function() {
38751
+ return w$1$1(M$2$1(this.rgba, -1));
38752
+ }, r2.prototype.lighten = function(r3) {
38753
+ return void 0 === r3 && (r3 = 0.1), w$1$1($$2(this.rgba, r3));
38754
+ }, r2.prototype.darken = function(r3) {
38755
+ return void 0 === r3 && (r3 = 0.1), w$1$1($$2(this.rgba, -r3));
38756
+ }, r2.prototype.rotate = function(r3) {
38757
+ return void 0 === r3 && (r3 = 15), this.hue(this.hue() + r3);
38758
+ }, r2.prototype.alpha = function(r3) {
38759
+ return "number" == typeof r3 ? w$1$1({ r: (t22 = this.rgba).r, g: t22.g, b: t22.b, a: r3 }) : n$2(this.rgba.a, 3);
38760
+ var t22;
38761
+ }, r2.prototype.hue = function(r3) {
38762
+ var t22 = c$1$1(this.rgba);
38763
+ return "number" == typeof r3 ? w$1$1({ h: r3, s: t22.s, l: t22.l, a: t22.a }) : n$2(t22.h);
38764
+ }, r2.prototype.isEqual = function(r3) {
38765
+ return this.toHex() === w$1$1(r3).toHex();
38766
+ }, r2;
38767
+ })(), w$1$1 = function(r2) {
38768
+ return r2 instanceof j$2 ? r2 : new j$2(r2);
38769
+ }, S$2 = [], k$2 = function(r2) {
38770
+ r2.forEach(function(r3) {
38771
+ S$2.indexOf(r3) < 0 && (r3(j$2, y$1$1), S$2.push(r3));
38772
+ });
38773
+ };
38774
+ var a$1$1 = function(a2) {
38775
+ return "string" == typeof a2 ? a2.length > 0 : "number" == typeof a2;
38776
+ }, t$2 = function(a2, t22, o2) {
38777
+ return void 0 === t22 && (t22 = 0), void 0 === o2 && (o2 = Math.pow(10, t22)), Math.round(o2 * a2) / o2 + 0;
38778
+ }, o$2 = function(a2, t22, o2) {
38779
+ return void 0 === t22 && (t22 = 0), void 0 === o2 && (o2 = 1), a2 > o2 ? o2 : a2 > t22 ? a2 : t22;
38780
+ }, r$1$1 = function(a2) {
38781
+ var t22 = a2 / 255;
38782
+ return t22 < 0.04045 ? t22 / 12.92 : Math.pow((t22 + 0.055) / 1.055, 2.4);
38783
+ }, h$1$1 = function(a2) {
38784
+ return 255 * (a2 > 31308e-7 ? 1.055 * Math.pow(a2, 1 / 2.4) - 0.055 : 12.92 * a2);
38785
+ }, n$1$1 = 96.422, p$1$1 = 100, M$1$1 = 82.521, u$1$1 = function(a2) {
38786
+ var t22, r2, n2 = { x: 0.9555766 * (t22 = a2).x + -0.0230393 * t22.y + 0.0631636 * t22.z, y: -0.0282895 * t22.x + 1.0099416 * t22.y + 0.0210077 * t22.z, z: 0.0122982 * t22.x + -0.020483 * t22.y + 1.3299098 * t22.z };
38787
+ return r2 = { r: h$1$1(0.032404542 * n2.x - 0.015371385 * n2.y - 4985314e-9 * n2.z), g: h$1$1(-969266e-8 * n2.x + 0.018760108 * n2.y + 41556e-8 * n2.z), b: h$1$1(556434e-9 * n2.x - 2040259e-9 * n2.y + 0.010572252 * n2.z), a: a2.a }, { r: o$2(r2.r, 0, 255), g: o$2(r2.g, 0, 255), b: o$2(r2.b, 0, 255), a: o$2(r2.a) };
38788
+ }, e$1$1 = function(a2) {
38789
+ var t22 = r$1$1(a2.r), h2 = r$1$1(a2.g), u2 = r$1$1(a2.b);
38790
+ return (function(a3) {
38791
+ return { x: o$2(a3.x, 0, n$1$1), y: o$2(a3.y, 0, p$1$1), z: o$2(a3.z, 0, M$1$1), a: o$2(a3.a) };
38792
+ })((function(a3) {
38793
+ return { x: 1.0478112 * a3.x + 0.0228866 * a3.y + -0.050127 * a3.z, y: 0.0295424 * a3.x + 0.9904844 * a3.y + -0.0170491 * a3.z, z: -92345e-7 * a3.x + 0.0150436 * a3.y + 0.7521316 * a3.z, a: a3.a };
38794
+ })({ x: 100 * (0.4124564 * t22 + 0.3575761 * h2 + 0.1804375 * u2), y: 100 * (0.2126729 * t22 + 0.7151522 * h2 + 0.072175 * u2), z: 100 * (0.0193339 * t22 + 0.119192 * h2 + 0.9503041 * u2), a: a2.a }));
38795
+ }, w$2 = 216 / 24389, b$1$1 = 24389 / 27, i$1$1 = function(t22) {
38796
+ var r2 = t22.l, h2 = t22.a, n2 = t22.b, p2 = t22.alpha, M22 = void 0 === p2 ? 1 : p2;
38797
+ if (!a$1$1(r2) || !a$1$1(h2) || !a$1$1(n2)) return null;
38798
+ var u2 = (function(a2) {
38799
+ return { l: o$2(a2.l, 0, 400), a: a2.a, b: a2.b, alpha: o$2(a2.alpha) };
38800
+ })({ l: Number(r2), a: Number(h2), b: Number(n2), alpha: Number(M22) });
38801
+ return l$1$1(u2);
38802
+ }, l$1$1 = function(a2) {
38803
+ var t22 = (a2.l + 16) / 116, o2 = a2.a / 500 + t22, r2 = t22 - a2.b / 200;
38804
+ return u$1$1({ x: (Math.pow(o2, 3) > w$2 ? Math.pow(o2, 3) : (116 * o2 - 16) / b$1$1) * n$1$1, y: (a2.l > 8 ? Math.pow((a2.l + 16) / 116, 3) : a2.l / b$1$1) * p$1$1, z: (Math.pow(r2, 3) > w$2 ? Math.pow(r2, 3) : (116 * r2 - 16) / b$1$1) * M$1$1, a: a2.alpha });
38805
+ };
38806
+ function labPlugin(a2, r2) {
38807
+ a2.prototype.toLab = function() {
38808
+ return o2 = e$1$1(this.rgba), h2 = o2.y / p$1$1, u2 = o2.z / M$1$1, r3 = (r3 = o2.x / n$1$1) > w$2 ? Math.cbrt(r3) : (b$1$1 * r3 + 16) / 116, a3 = { l: 116 * (h2 = h2 > w$2 ? Math.cbrt(h2) : (b$1$1 * h2 + 16) / 116) - 16, a: 500 * (r3 - h2), b: 200 * (h2 - (u2 = u2 > w$2 ? Math.cbrt(u2) : (b$1$1 * u2 + 16) / 116)), alpha: o2.a }, { l: t$2(a3.l, 2), a: t$2(a3.a, 2), b: t$2(a3.b, 2), alpha: t$2(a3.alpha, 3) };
38809
+ var a3, o2, r3, h2, u2;
38810
+ }, a2.prototype.delta = function(r3) {
38811
+ void 0 === r3 && (r3 = "#FFF");
38812
+ var h2 = r3 instanceof a2 ? r3 : new a2(r3), n2 = (function(a3, t22) {
38813
+ var o2 = a3.l, r4 = a3.a, h3 = a3.b, n3 = t22.l, p2 = t22.a, M22 = t22.b, u2 = 180 / Math.PI, e22 = Math.PI / 180, w2 = Math.pow(Math.pow(r4, 2) + Math.pow(h3, 2), 0.5), b2 = Math.pow(Math.pow(p2, 2) + Math.pow(M22, 2), 0.5), i2 = (o2 + n3) / 2, l2 = Math.pow((w2 + b2) / 2, 7), c2 = 0.5 * (1 - Math.pow(l2 / (l2 + Math.pow(25, 7)), 0.5)), f2 = r4 * (1 + c2), y2 = p2 * (1 + c2), v2 = Math.pow(Math.pow(f2, 2) + Math.pow(h3, 2), 0.5), x2 = Math.pow(Math.pow(y2, 2) + Math.pow(M22, 2), 0.5), z2 = (v2 + x2) / 2, s2 = 0 === f2 && 0 === h3 ? 0 : Math.atan2(h3, f2) * u2, d2 = 0 === y2 && 0 === M22 ? 0 : Math.atan2(M22, y2) * u2;
38814
+ s2 < 0 && (s2 += 360), d2 < 0 && (d2 += 360);
38815
+ var g2 = d2 - s2, m2 = Math.abs(d2 - s2);
38816
+ m2 > 180 && d2 <= s2 ? g2 += 360 : m2 > 180 && d2 > s2 && (g2 -= 360);
38817
+ var N2 = s2 + d2;
38818
+ m2 <= 180 ? N2 /= 2 : N2 = (s2 + d2 < 360 ? N2 + 360 : N2 - 360) / 2;
38819
+ var F2 = 1 - 0.17 * Math.cos(e22 * (N2 - 30)) + 0.24 * Math.cos(2 * e22 * N2) + 0.32 * Math.cos(e22 * (3 * N2 + 6)) - 0.2 * Math.cos(e22 * (4 * N2 - 63)), L2 = n3 - o2, I2 = x2 - v2, P32 = 2 * Math.sin(e22 * g2 / 2) * Math.pow(v2 * x2, 0.5), j2 = 1 + 0.015 * Math.pow(i2 - 50, 2) / Math.pow(20 + Math.pow(i2 - 50, 2), 0.5), k2 = 1 + 0.045 * z2, q2 = 1 + 0.015 * z2 * F2, A2 = 30 * Math.exp(-1 * Math.pow((N2 - 275) / 25, 2)), B2 = -2 * Math.pow(l2 / (l2 + Math.pow(25, 7)), 0.5) * Math.sin(2 * e22 * A2);
38820
+ return Math.pow(Math.pow(L2 / 1 / j2, 2) + Math.pow(I2 / 1 / k2, 2) + Math.pow(P32 / 1 / q2, 2) + B2 * I2 * P32 / (1 * k2 * 1 * q2), 0.5);
38821
+ })(this.toLab(), h2.toLab()) / 100;
38822
+ return o$2(t$2(n2, 3));
38823
+ }, r2.object.push([i$1$1, "lab"]);
38824
+ }
38825
+ var r$3 = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, t$1$1 = function(r2) {
38826
+ return "string" == typeof r2 ? r2.length > 0 : "number" == typeof r2;
38827
+ }, a$3 = function(r2, t22, a2) {
38828
+ return void 0 === t22 && (t22 = 0), void 0 === a2 && (a2 = Math.pow(10, t22)), Math.round(a2 * r2) / a2 + 0;
38829
+ }, n$3 = function(r2, t22, a2) {
38830
+ return void 0 === t22 && (t22 = 0), void 0 === a2 && (a2 = 1), r2 > a2 ? a2 : r2 > t22 ? r2 : t22;
38831
+ }, u$3 = function(r2) {
38832
+ var t22 = r2 / 255;
38833
+ return t22 < 0.04045 ? t22 / 12.92 : Math.pow((t22 + 0.055) / 1.055, 2.4);
38834
+ }, h$3 = function(r2) {
38835
+ return 255 * (r2 > 31308e-7 ? 1.055 * Math.pow(r2, 1 / 2.4) - 0.055 : 12.92 * r2);
38836
+ }, o$1$1 = 96.422, e$3 = 100, c$2 = 82.521, i$3 = function(r2) {
38837
+ var t22, a2, u2 = { x: 0.9555766 * (t22 = r2).x + -0.0230393 * t22.y + 0.0631636 * t22.z, y: -0.0282895 * t22.x + 1.0099416 * t22.y + 0.0210077 * t22.z, z: 0.0122982 * t22.x + -0.020483 * t22.y + 1.3299098 * t22.z };
38838
+ return a2 = { r: h$3(0.032404542 * u2.x - 0.015371385 * u2.y - 4985314e-9 * u2.z), g: h$3(-969266e-8 * u2.x + 0.018760108 * u2.y + 41556e-8 * u2.z), b: h$3(556434e-9 * u2.x - 2040259e-9 * u2.y + 0.010572252 * u2.z), a: r2.a }, { r: n$3(a2.r, 0, 255), g: n$3(a2.g, 0, 255), b: n$3(a2.b, 0, 255), a: n$3(a2.a) };
38839
+ }, l$3 = function(r2) {
38840
+ var t22 = u$3(r2.r), a2 = u$3(r2.g), h2 = u$3(r2.b);
38841
+ return (function(r3) {
38842
+ return { x: n$3(r3.x, 0, o$1$1), y: n$3(r3.y, 0, e$3), z: n$3(r3.z, 0, c$2), a: n$3(r3.a) };
38843
+ })((function(r3) {
38844
+ return { x: 1.0478112 * r3.x + 0.0228866 * r3.y + -0.050127 * r3.z, y: 0.0295424 * r3.x + 0.9904844 * r3.y + -0.0170491 * r3.z, z: -92345e-7 * r3.x + 0.0150436 * r3.y + 0.7521316 * r3.z, a: r3.a };
38845
+ })({ x: 100 * (0.4124564 * t22 + 0.3575761 * a2 + 0.1804375 * h2), y: 100 * (0.2126729 * t22 + 0.7151522 * a2 + 0.072175 * h2), z: 100 * (0.0193339 * t22 + 0.119192 * a2 + 0.9503041 * h2), a: r2.a }));
38846
+ }, f$2 = 216 / 24389, b$3 = 24389 / 27, d$2 = function(r2) {
38847
+ return { l: n$3(r2.l, 0, 100), c: r2.c, h: (t22 = r2.h, (t22 = isFinite(t22) ? t22 % 360 : 0) > 0 ? t22 : t22 + 360), a: r2.a };
38848
+ var t22;
38849
+ }, p$3 = function(r2) {
38850
+ return { l: a$3(r2.l, 2), c: a$3(r2.c, 2), h: a$3(r2.h, 2), a: a$3(r2.a, 3) };
38851
+ }, v$2 = function(r2) {
38852
+ var a2 = r2.l, n2 = r2.c, u2 = r2.h, h2 = r2.a, o2 = void 0 === h2 ? 1 : h2;
38853
+ if (!t$1$1(a2) || !t$1$1(n2) || !t$1$1(u2)) return null;
38854
+ var e22 = d$2({ l: Number(a2), c: Number(n2), h: Number(u2), a: Number(o2) });
38855
+ return M$4(e22);
38856
+ }, y$2 = function(r2) {
38857
+ var t22 = (function(r3) {
38858
+ var t32 = l$3(r3), a2 = t32.x / o$1$1, n3 = t32.y / e$3, u3 = t32.z / c$2;
38859
+ return a2 = a2 > f$2 ? Math.cbrt(a2) : (b$3 * a2 + 16) / 116, { l: 116 * (n3 = n3 > f$2 ? Math.cbrt(n3) : (b$3 * n3 + 16) / 116) - 16, a: 500 * (a2 - n3), b: 200 * (n3 - (u3 = u3 > f$2 ? Math.cbrt(u3) : (b$3 * u3 + 16) / 116)), alpha: t32.a };
38860
+ })(r2), n2 = a$3(t22.a, 3), u2 = a$3(t22.b, 3), h2 = Math.atan2(u2, n2) / Math.PI * 180;
38861
+ return { l: t22.l, c: Math.sqrt(n2 * n2 + u2 * u2), h: h2 < 0 ? h2 + 360 : h2, a: t22.alpha };
38862
+ }, M$4 = function(r2) {
38863
+ return t22 = { l: r2.l, a: r2.c * Math.cos(r2.h * Math.PI / 180), b: r2.c * Math.sin(r2.h * Math.PI / 180), alpha: r2.a }, n2 = t22.a / 500 + (a2 = (t22.l + 16) / 116), u2 = a2 - t22.b / 200, i$3({ x: (Math.pow(n2, 3) > f$2 ? Math.pow(n2, 3) : (116 * n2 - 16) / b$3) * o$1$1, y: (t22.l > 8 ? Math.pow((t22.l + 16) / 116, 3) : t22.l / b$3) * e$3, z: (Math.pow(u2, 3) > f$2 ? Math.pow(u2, 3) : (116 * u2 - 16) / b$3) * c$2, a: t22.alpha });
38864
+ var t22, a2, n2, u2;
38865
+ }, x$2 = /^lch\(\s*([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)\s+([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, s$2 = function(t22) {
38866
+ var a2 = x$2.exec(t22);
38867
+ if (!a2) return null;
38868
+ var n2, u2, h2 = d$2({ l: Number(a2[1]), c: Number(a2[2]), h: (n2 = a2[3], u2 = a2[4], void 0 === u2 && (u2 = "deg"), Number(n2) * (r$3[u2] || 1)), a: void 0 === a2[5] ? 1 : Number(a2[5]) / (a2[6] ? 100 : 1) });
38869
+ return M$4(h2);
38870
+ };
38871
+ function lchPlugin(r2, t22) {
38872
+ r2.prototype.toLch = function() {
38873
+ return p$3(y$2(this.rgba));
38874
+ }, r2.prototype.toLchString = function() {
38875
+ return r3 = p$3(y$2(this.rgba)), t32 = r3.l, a2 = r3.c, n2 = r3.h, (u2 = r3.a) < 1 ? "lch(" + t32 + "% " + a2 + " " + n2 + " / " + u2 + ")" : "lch(" + t32 + "% " + a2 + " " + n2 + ")";
38876
+ var r3, t32, a2, n2, u2;
38877
+ }, t22.string.push([s$2, "lch"]), t22.object.push([v$2, "lch"]);
38878
+ }
38879
+ k$2([labPlugin, lchPlugin]);
38812
38880
  const canonicalColorHexByKey = {
38813
38881
  black: "#000000",
38814
38882
  white: "#ffffff",
@@ -38839,6 +38907,8 @@ const extraAnchorDefinitions = {
38839
38907
  redLight: { hex: "#f08080", canonical: "red" },
38840
38908
  redCustom: { hex: "#D4042D", canonical: "red" },
38841
38909
  redDark: { hex: "#8b0000", canonical: "red" },
38910
+ crimson: { hex: "#dc143c", canonical: "red" },
38911
+ wine: { hex: "#993355", canonical: "red" },
38842
38912
  orangeLight: { hex: "#ffa07a", canonical: "orange" },
38843
38913
  orangeCustom: { hex: "#F19143", canonical: "orange" },
38844
38914
  orangePresetAccessible: { hex: "#a6510c", canonical: "orange" },
@@ -38854,14 +38924,18 @@ const extraAnchorDefinitions = {
38854
38924
  teal: { hex: "#008080", canonical: "green" },
38855
38925
  aqua: { hex: "#00ffff", canonical: "cyan" },
38856
38926
  cyanLight: { hex: "#e0ffff", canonical: "cyan" },
38927
+ cyanMid: { hex: "#25b0c0", canonical: "cyan" },
38857
38928
  cyanDark: { hex: "#008b8b", canonical: "cyan" },
38858
38929
  navy: { hex: "#000080", canonical: "blue" },
38930
+ blueMid: { hex: "#4477aa", canonical: "blue" },
38931
+ blueSky: { hex: "#56b4e9", canonical: "blue" },
38859
38932
  blueCustom: { hex: "#648FFF", canonical: "blue" },
38860
38933
  bluePresetAccessible: { hex: "#1f5dff", canonical: "blue" },
38861
38934
  blueLight: { hex: "#add8e6", canonical: "blue" },
38862
38935
  blueDark: { hex: "#00008b", canonical: "blue" },
38863
38936
  fuchsia: { hex: "#ff00ff", canonical: "purple" },
38864
38937
  purpleCustom: { hex: "#644CD6", canonical: "purple" },
38938
+ purpleMuted: { hex: "#9c5686", canonical: "purple" },
38865
38939
  purpleLight: { hex: "#dda0dd", canonical: "purple" },
38866
38940
  purpleDark: { hex: "#8b008b", canonical: "purple" },
38867
38941
  hotpink: { hex: "#ff69b4", canonical: "pink" },
@@ -38873,19 +38947,38 @@ const anchorDefinitions = {
38873
38947
  ...canonicalAnchorDefinitions,
38874
38948
  ...extraAnchorDefinitions
38875
38949
  };
38876
- const matchColorHexByName = Object.fromEntries(
38877
- Object.entries(anchorDefinitions).map(([name2, definition]) => [
38878
- name2,
38879
- definition.hex
38880
- ])
38881
- );
38882
- const canonicalKeyByMatchName = Object.fromEntries(
38883
- Object.entries(anchorDefinitions).map(([name2, definition]) => [
38884
- name2,
38885
- definition.canonical
38886
- ])
38887
- );
38888
- const nearestCanonicalColor = nearestColor.from(matchColorHexByName);
38950
+ const anchorColordList = Object.values(anchorDefinitions).map((definition) => ({
38951
+ color: w$1$1(definition.hex),
38952
+ canonical: definition.canonical
38953
+ }));
38954
+ const NEUTRAL_CHROMA_THRESHOLD = 8;
38955
+ const NEUTRAL_BLACK_MAX_LIGHTNESS = 14;
38956
+ const NEUTRAL_WHITE_MIN_LIGHTNESS = 92;
38957
+ function classifyNeutral(color) {
38958
+ const { c: c2, l: l2 } = color.toLch();
38959
+ if (c2 >= NEUTRAL_CHROMA_THRESHOLD) {
38960
+ return void 0;
38961
+ }
38962
+ if (l2 <= NEUTRAL_BLACK_MAX_LIGHTNESS) {
38963
+ return "black";
38964
+ }
38965
+ if (l2 >= NEUTRAL_WHITE_MIN_LIGHTNESS) {
38966
+ return "white";
38967
+ }
38968
+ return "gray";
38969
+ }
38970
+ function nearestCanonicalFamily(color) {
38971
+ let bestCanonical;
38972
+ let bestDelta = Infinity;
38973
+ for (const anchor of anchorColordList) {
38974
+ const delta = color.delta(anchor.color);
38975
+ if (delta < bestDelta) {
38976
+ bestDelta = delta;
38977
+ bestCanonical = anchor.canonical;
38978
+ }
38979
+ }
38980
+ return bestCanonical;
38981
+ }
38889
38982
  const cssNamedColorSet = /* @__PURE__ */ new Set([
38890
38983
  ...Object.keys(colorName),
38891
38984
  "transparent",
@@ -38918,8 +39011,11 @@ function resolveColorWord(colorValue, options = {}) {
38918
39011
  };
38919
39012
  }
38920
39013
  try {
38921
- const nearest = nearestCanonicalColor(trimmedColorValue);
38922
- const canonicalName = nearest ? canonicalKeyByMatchName[nearest.name] : void 0;
39014
+ const parsedColor = w$1$1(trimmedColorValue);
39015
+ if (!parsedColor.isValid()) {
39016
+ throw Error("Unparseable color value");
39017
+ }
39018
+ const canonicalName = classifyNeutral(parsedColor) ?? nearestCanonicalFamily(parsedColor);
38923
39019
  if (!canonicalName) {
38924
39020
  throw Error("No nearest canonical color resolved");
38925
39021
  }
@@ -39206,17 +39302,9 @@ const okabeItoPalette = {
39206
39302
  markerColor: "#0072b2",
39207
39303
  fillColor: "#0072b2",
39208
39304
  highContrastColor: "#0072b2",
39209
- lineColorWord: "blue",
39210
- markerColorWord: "blue",
39211
- fillColorWord: "blue",
39212
- highContrastColorWord: "blue",
39213
39305
  lineColorDarkMode: "#0072b2",
39214
39306
  markerColorDarkMode: "#0072b2",
39215
39307
  fillColorDarkMode: "#0072b2",
39216
- lineColorWordDarkMode: "blue",
39217
- markerColorWordDarkMode: "blue",
39218
- fillColorWordDarkMode: "blue",
39219
- highContrastColorWordDarkMode: "blue",
39220
39308
  lineWidth: 4,
39221
39309
  markerStyle: "circle"
39222
39310
  },
@@ -39241,20 +39329,10 @@ const okabeItoPalette = {
39241
39329
  fillColor: "#009e73",
39242
39330
  textColor: "#008561",
39243
39331
  highContrastColor: "#008561",
39244
- lineColorWord: "green",
39245
- markerColorWord: "green",
39246
- fillColorWord: "green",
39247
- textColorWord: "green",
39248
- highContrastColorWord: "green",
39249
39332
  lineColorDarkMode: "#009e73",
39250
39333
  markerColorDarkMode: "#009e73",
39251
39334
  fillColorDarkMode: "#009e73",
39252
39335
  textColorDarkMode: "#009e73",
39253
- lineColorWordDarkMode: "green",
39254
- markerColorWordDarkMode: "green",
39255
- fillColorWordDarkMode: "green",
39256
- textColorWordDarkMode: "green",
39257
- highContrastColorWordDarkMode: "green",
39258
39336
  lineWidth: 3,
39259
39337
  markerStyle: "triangle"
39260
39338
  },
@@ -39268,8 +39346,6 @@ const okabeItoPalette = {
39268
39346
  lineColorWord: "purple",
39269
39347
  markerColorWord: "purple",
39270
39348
  fillColorWord: "purple",
39271
- textColorWord: "purple",
39272
- highContrastColorWord: "purple",
39273
39349
  lineColorDarkMode: "#cc79a7",
39274
39350
  markerColorDarkMode: "#cc79a7",
39275
39351
  fillColorDarkMode: "#cc79a7",
@@ -39376,17 +39452,9 @@ const tolBrightPalette = {
39376
39452
  markerColor: "#4477aa",
39377
39453
  fillColor: "#4477aa",
39378
39454
  highContrastColor: "#4477aa",
39379
- lineColorWord: "blue",
39380
- markerColorWord: "blue",
39381
- fillColorWord: "blue",
39382
- highContrastColorWord: "blue",
39383
39455
  lineColorDarkMode: "#4477aa",
39384
39456
  markerColorDarkMode: "#4477aa",
39385
39457
  fillColorDarkMode: "#4477aa",
39386
- lineColorWordDarkMode: "blue",
39387
- markerColorWordDarkMode: "blue",
39388
- fillColorWordDarkMode: "blue",
39389
- highContrastColorWordDarkMode: "blue",
39390
39458
  lineWidth: 4,
39391
39459
  markerStyle: "circle"
39392
39460
  },
@@ -39396,20 +39464,10 @@ const tolBrightPalette = {
39396
39464
  fillColor: "#ee6677",
39397
39465
  textColor: "#bf515e",
39398
39466
  highContrastColor: "#bf515e",
39399
- lineColorWord: "red",
39400
- markerColorWord: "red",
39401
- fillColorWord: "red",
39402
- textColorWord: "red",
39403
- highContrastColorWord: "red",
39404
39467
  lineColorDarkMode: "#ee6677",
39405
39468
  markerColorDarkMode: "#ee6677",
39406
39469
  fillColorDarkMode: "#ee6677",
39407
39470
  textColorDarkMode: "#ee6677",
39408
- lineColorWordDarkMode: "red",
39409
- markerColorWordDarkMode: "red",
39410
- fillColorWordDarkMode: "red",
39411
- textColorWordDarkMode: "red",
39412
- highContrastColorWordDarkMode: "red",
39413
39471
  lineWidth: 2,
39414
39472
  markerStyle: "square"
39415
39473
  },
@@ -39450,9 +39508,6 @@ const tolBrightPalette = {
39450
39508
  fillColor: "#4d9db8",
39451
39509
  textColor: "#3c7d94",
39452
39510
  highContrastColor: "#3c7d94",
39453
- lineColorWord: "cyan",
39454
- markerColorWord: "cyan",
39455
- fillColorWord: "cyan",
39456
39511
  textColorWord: "cyan",
39457
39512
  highContrastColorWord: "cyan",
39458
39513
  lineColorDarkMode: "#66ccee",
@@ -39477,11 +39532,6 @@ const tolBrightPalette = {
39477
39532
  markerColorDarkMode: "#aa3377",
39478
39533
  fillColorDarkMode: "#aa3377",
39479
39534
  textColorDarkMode: "#b5648c",
39480
- lineColorWordDarkMode: "purple",
39481
- markerColorWordDarkMode: "purple",
39482
- fillColorWordDarkMode: "purple",
39483
- textColorWordDarkMode: "purple",
39484
- highContrastColorWordDarkMode: "purple",
39485
39535
  lineWidth: 2,
39486
39536
  markerStyle: "triangleLeft"
39487
39537
  },
@@ -39530,20 +39580,10 @@ const tolMutedPalette = {
39530
39580
  fillColor: "#669ab5",
39531
39581
  textColor: "#507a90",
39532
39582
  highContrastColor: "#507a90",
39533
- lineColorWord: "blue",
39534
- markerColorWord: "blue",
39535
- fillColorWord: "blue",
39536
- textColorWord: "blue",
39537
- highContrastColorWord: "blue",
39538
39583
  lineColorDarkMode: "#88ccee",
39539
39584
  markerColorDarkMode: "#88ccee",
39540
39585
  fillColorDarkMode: "#88ccee",
39541
39586
  textColorDarkMode: "#88ccee",
39542
- lineColorWordDarkMode: "blue",
39543
- markerColorWordDarkMode: "blue",
39544
- fillColorWordDarkMode: "blue",
39545
- textColorWordDarkMode: "blue",
39546
- highContrastColorWordDarkMode: "blue",
39547
39587
  lineWidth: 2,
39548
39588
  markerStyle: "square"
39549
39589
  },
@@ -39580,8 +39620,6 @@ const tolMutedPalette = {
39580
39620
  markerColorDarkMode: "#117733",
39581
39621
  fillColorDarkMode: "#117733",
39582
39622
  textColorDarkMode: "#548a5f",
39583
- textColorWordDarkMode: "green",
39584
- highContrastColorWordDarkMode: "green",
39585
39623
  lineWidth: 2,
39586
39624
  markerStyle: "diamond"
39587
39625
  },
@@ -39689,11 +39727,6 @@ const tolMutedPalette = {
39689
39727
  markerColorDarkMode: "#aa4499",
39690
39728
  fillColorDarkMode: "#aa4499",
39691
39729
  textColorDarkMode: "#b262a3",
39692
- lineColorWordDarkMode: "purple",
39693
- markerColorWordDarkMode: "purple",
39694
- fillColorWordDarkMode: "purple",
39695
- textColorWordDarkMode: "purple",
39696
- highContrastColorWordDarkMode: "purple",
39697
39730
  lineWidth: 2,
39698
39731
  lineStyle: "dashed",
39699
39732
  markerStyle: "square"
@@ -39709,17 +39742,9 @@ const tolHighContrastPalette = {
39709
39742
  markerColor: "#004488",
39710
39743
  fillColor: "#004488",
39711
39744
  highContrastColor: "#004488",
39712
- lineColorWord: "blue",
39713
- markerColorWord: "blue",
39714
- fillColorWord: "blue",
39715
- highContrastColorWord: "blue",
39716
39745
  lineColorDarkMode: "#496194",
39717
39746
  markerColorDarkMode: "#496194",
39718
39747
  fillColorDarkMode: "#496194",
39719
- lineColorWordDarkMode: "blue",
39720
- markerColorWordDarkMode: "blue",
39721
- fillColorWordDarkMode: "blue",
39722
- highContrastColorWordDarkMode: "blue",
39723
39748
  lineWidth: 4,
39724
39749
  markerStyle: "circle"
39725
39750
  },
@@ -39756,11 +39781,6 @@ const tolHighContrastPalette = {
39756
39781
  markerColorDarkMode: "#c06976",
39757
39782
  fillColorDarkMode: "#c06976",
39758
39783
  textColorDarkMode: "#c06976",
39759
- lineColorWordDarkMode: "red",
39760
- markerColorWordDarkMode: "red",
39761
- fillColorWordDarkMode: "red",
39762
- textColorWordDarkMode: "red",
39763
- highContrastColorWordDarkMode: "red",
39764
39784
  lineWidth: 3,
39765
39785
  markerStyle: "triangle"
39766
39786
  },
@@ -39788,17 +39808,9 @@ const ibmPalette = {
39788
39808
  markerColor: "#648fff",
39789
39809
  fillColor: "#648fff",
39790
39810
  highContrastColor: "#4f71cb",
39791
- lineColorWord: "blue",
39792
- markerColorWord: "blue",
39793
- fillColorWord: "blue",
39794
- highContrastColorWord: "blue",
39795
39811
  lineColorDarkMode: "#648fff",
39796
39812
  markerColorDarkMode: "#648fff",
39797
39813
  fillColorDarkMode: "#648fff",
39798
- lineColorWordDarkMode: "blue",
39799
- markerColorWordDarkMode: "blue",
39800
- fillColorWordDarkMode: "blue",
39801
- highContrastColorWordDarkMode: "blue",
39802
39814
  lineWidth: 4,
39803
39815
  markerStyle: "circle"
39804
39816
  },
@@ -39885,18 +39897,10 @@ const grayscalePalette = {
39885
39897
  markerColor: "#000000",
39886
39898
  fillColor: "#000000",
39887
39899
  highContrastColor: "#000000",
39888
- lineColorWord: "black",
39889
- markerColorWord: "black",
39890
- fillColorWord: "black",
39891
- highContrastColorWord: "black",
39892
39900
  lineColorDarkMode: "#ffffff",
39893
39901
  markerColorDarkMode: "#ffffff",
39894
39902
  fillColorDarkMode: "#ffffff",
39895
39903
  highContrastColorDarkMode: "#ffffff",
39896
- lineColorWordDarkMode: "white",
39897
- markerColorWordDarkMode: "white",
39898
- fillColorWordDarkMode: "white",
39899
- highContrastColorWordDarkMode: "white",
39900
39904
  lineWidth: 4,
39901
39905
  markerStyle: "circle"
39902
39906
  },
@@ -39930,21 +39934,11 @@ const grayscalePalette = {
39930
39934
  fillColor: "#616161",
39931
39935
  textColor: "#616161",
39932
39936
  highContrastColor: "#616161",
39933
- lineColorWord: "gray",
39934
- markerColorWord: "gray",
39935
- fillColorWord: "gray",
39936
- textColorWord: "gray",
39937
- highContrastColorWord: "gray",
39938
39937
  lineColorDarkMode: "#929292",
39939
39938
  markerColorDarkMode: "#929292",
39940
39939
  fillColorDarkMode: "#929292",
39941
39940
  textColorDarkMode: "#929292",
39942
39941
  highContrastColorDarkMode: "#929292",
39943
- lineColorWordDarkMode: "gray",
39944
- markerColorWordDarkMode: "gray",
39945
- fillColorWordDarkMode: "gray",
39946
- textColorWordDarkMode: "gray",
39947
- highContrastColorWordDarkMode: "gray",
39948
39942
  lineWidth: 3,
39949
39943
  markerStyle: "triangle"
39950
39944
  },
@@ -39983,17 +39977,9 @@ const categoricalPalette = {
39983
39977
  markerColor: "#1f77b4",
39984
39978
  fillColor: "#1f77b4",
39985
39979
  highContrastColor: "#1f77b4",
39986
- lineColorWord: "blue",
39987
- markerColorWord: "blue",
39988
- fillColorWord: "blue",
39989
- highContrastColorWord: "blue",
39990
39980
  lineColorDarkMode: "#5ba3dd",
39991
39981
  markerColorDarkMode: "#5ba3dd",
39992
39982
  fillColorDarkMode: "#5ba3dd",
39993
- lineColorWordDarkMode: "blue",
39994
- markerColorWordDarkMode: "blue",
39995
- fillColorWordDarkMode: "blue",
39996
- highContrastColorWordDarkMode: "blue",
39997
39983
  lineWidth: 4,
39998
39984
  markerStyle: "circle"
39999
39985
  },
@@ -40003,20 +39989,10 @@ const categoricalPalette = {
40003
39989
  fillColor: "#e7730c",
40004
39990
  textColor: "#b95b07",
40005
39991
  highContrastColor: "#b95b07",
40006
- lineColorWord: "orange",
40007
- markerColorWord: "orange",
40008
- fillColorWord: "orange",
40009
- textColorWord: "orange",
40010
- highContrastColorWord: "orange",
40011
39992
  lineColorDarkMode: "#ff9d3c",
40012
39993
  markerColorDarkMode: "#ff9d3c",
40013
39994
  fillColorDarkMode: "#ff9d3c",
40014
39995
  textColorDarkMode: "#ff9d3c",
40015
- lineColorWordDarkMode: "orange",
40016
- markerColorWordDarkMode: "orange",
40017
- fillColorWordDarkMode: "orange",
40018
- textColorWordDarkMode: "orange",
40019
- highContrastColorWordDarkMode: "orange",
40020
39996
  lineWidth: 2,
40021
39997
  markerStyle: "square"
40022
39998
  },
@@ -40026,20 +40002,10 @@ const categoricalPalette = {
40026
40002
  fillColor: "#217a21",
40027
40003
  textColor: "#217a21",
40028
40004
  highContrastColor: "#217a21",
40029
- lineColorWord: "green",
40030
- markerColorWord: "green",
40031
- fillColorWord: "green",
40032
- textColorWord: "green",
40033
- highContrastColorWord: "green",
40034
40005
  lineColorDarkMode: "#2ca02c",
40035
40006
  markerColorDarkMode: "#2ca02c",
40036
40007
  fillColorDarkMode: "#2ca02c",
40037
40008
  textColorDarkMode: "#2ca02c",
40038
- lineColorWordDarkMode: "green",
40039
- markerColorWordDarkMode: "green",
40040
- fillColorWordDarkMode: "green",
40041
- textColorWordDarkMode: "green",
40042
- highContrastColorWordDarkMode: "green",
40043
40009
  lineWidth: 3,
40044
40010
  markerStyle: "triangle"
40045
40011
  },
@@ -40049,20 +40015,10 @@ const categoricalPalette = {
40049
40015
  fillColor: "#d62728",
40050
40016
  textColor: "#d62728",
40051
40017
  highContrastColor: "#d62728",
40052
- lineColorWord: "red",
40053
- markerColorWord: "red",
40054
- fillColorWord: "red",
40055
- textColorWord: "red",
40056
- highContrastColorWord: "red",
40057
40018
  lineColorDarkMode: "#e2494a",
40058
40019
  markerColorDarkMode: "#e2494a",
40059
40020
  fillColorDarkMode: "#e2494a",
40060
40021
  textColorDarkMode: "#e2494a",
40061
- lineColorWordDarkMode: "red",
40062
- markerColorWordDarkMode: "red",
40063
- fillColorWordDarkMode: "red",
40064
- textColorWordDarkMode: "red",
40065
- highContrastColorWordDarkMode: "red",
40066
40022
  lineWidth: 2,
40067
40023
  markerStyle: "diamond"
40068
40024
  },
@@ -40072,20 +40028,10 @@ const categoricalPalette = {
40072
40028
  fillColor: "#9467bd",
40073
40029
  textColor: "#8e62b5",
40074
40030
  highContrastColor: "#8e62b5",
40075
- lineColorWord: "purple",
40076
- markerColorWord: "purple",
40077
- fillColorWord: "purple",
40078
- textColorWord: "purple",
40079
- highContrastColorWord: "purple",
40080
40031
  lineColorDarkMode: "#b48fd6",
40081
40032
  markerColorDarkMode: "#b48fd6",
40082
40033
  fillColorDarkMode: "#b48fd6",
40083
40034
  textColorDarkMode: "#b48fd6",
40084
- lineColorWordDarkMode: "purple",
40085
- markerColorWordDarkMode: "purple",
40086
- fillColorWordDarkMode: "purple",
40087
- textColorWordDarkMode: "purple",
40088
- highContrastColorWordDarkMode: "purple",
40089
40035
  lineWidth: 2,
40090
40036
  markerStyle: "triangleDown"
40091
40037
  },
@@ -40095,11 +40041,6 @@ const categoricalPalette = {
40095
40041
  fillColor: "#7a4a41",
40096
40042
  textColor: "#7a4a41",
40097
40043
  highContrastColor: "#7a4a41",
40098
- lineColorWord: "brown",
40099
- markerColorWord: "brown",
40100
- fillColorWord: "brown",
40101
- textColorWord: "brown",
40102
- highContrastColorWord: "brown",
40103
40044
  lineColorDarkMode: "#a9705f",
40104
40045
  markerColorDarkMode: "#a9705f",
40105
40046
  fillColorDarkMode: "#a9705f",
@@ -40118,20 +40059,12 @@ const categoricalPalette = {
40118
40059
  fillColor: "#d670b7",
40119
40060
  textColor: "#ab5892",
40120
40061
  highContrastColor: "#ab5892",
40121
- lineColorWord: "pink",
40122
- markerColorWord: "pink",
40123
- fillColorWord: "pink",
40124
40062
  textColorWord: "pink",
40125
40063
  highContrastColorWord: "pink",
40126
40064
  lineColorDarkMode: "#e377c2",
40127
40065
  markerColorDarkMode: "#e377c2",
40128
40066
  fillColorDarkMode: "#e377c2",
40129
40067
  textColorDarkMode: "#e377c2",
40130
- lineColorWordDarkMode: "pink",
40131
- markerColorWordDarkMode: "pink",
40132
- fillColorWordDarkMode: "pink",
40133
- textColorWordDarkMode: "pink",
40134
- highContrastColorWordDarkMode: "pink",
40135
40068
  lineWidth: 3,
40136
40069
  lineStyle: "dashed",
40137
40070
  markerStyle: "triangleRight"
@@ -40142,20 +40075,10 @@ const categoricalPalette = {
40142
40075
  fillColor: "#7f7f7f",
40143
40076
  textColor: "#757575",
40144
40077
  highContrastColor: "#757575",
40145
- lineColorWord: "gray",
40146
- markerColorWord: "gray",
40147
- fillColorWord: "gray",
40148
- textColorWord: "gray",
40149
- highContrastColorWord: "gray",
40150
40078
  lineColorDarkMode: "#a8a8a8",
40151
40079
  markerColorDarkMode: "#a8a8a8",
40152
40080
  fillColorDarkMode: "#a8a8a8",
40153
40081
  textColorDarkMode: "#a8a8a8",
40154
- lineColorWordDarkMode: "gray",
40155
- markerColorWordDarkMode: "gray",
40156
- fillColorWordDarkMode: "gray",
40157
- textColorWordDarkMode: "gray",
40158
- highContrastColorWordDarkMode: "gray",
40159
40082
  lineWidth: 1,
40160
40083
  lineStyle: "dotted",
40161
40084
  markerStyle: "circle"
@@ -40190,20 +40113,12 @@ const categoricalPalette = {
40190
40113
  fillColor: "#12a2b1",
40191
40114
  textColor: "#0c818e",
40192
40115
  highContrastColor: "#0c818e",
40193
- lineColorWord: "cyan",
40194
- markerColorWord: "cyan",
40195
- fillColorWord: "cyan",
40196
40116
  textColorWord: "cyan",
40197
40117
  highContrastColorWord: "cyan",
40198
40118
  lineColorDarkMode: "#17becf",
40199
40119
  markerColorDarkMode: "#17becf",
40200
40120
  fillColorDarkMode: "#17becf",
40201
40121
  textColorDarkMode: "#17becf",
40202
- lineColorWordDarkMode: "cyan",
40203
- markerColorWordDarkMode: "cyan",
40204
- fillColorWordDarkMode: "cyan",
40205
- textColorWordDarkMode: "cyan",
40206
- highContrastColorWordDarkMode: "cyan",
40207
40122
  lineWidth: 2,
40208
40123
  lineStyle: "dotted",
40209
40124
  markerStyle: "diamond"
@@ -40219,17 +40134,12 @@ const grumpyNarwhalPalette = {
40219
40134
  markerColor: "#b34700",
40220
40135
  fillColor: "#b34700",
40221
40136
  highContrastColor: "#b34700",
40222
- lineColorWord: "orange",
40223
- markerColorWord: "orange",
40224
- fillColorWord: "orange",
40225
- highContrastColorWord: "orange",
40226
40137
  lineColorDarkMode: "#ff5f00",
40227
40138
  markerColorDarkMode: "#ff5f00",
40228
40139
  fillColorDarkMode: "#ff5f00",
40229
40140
  lineColorWordDarkMode: "orange",
40230
40141
  markerColorWordDarkMode: "orange",
40231
40142
  fillColorWordDarkMode: "orange",
40232
- highContrastColorWordDarkMode: "orange",
40233
40143
  lineWidth: 4,
40234
40144
  markerStyle: "circle"
40235
40145
  },
@@ -40239,20 +40149,10 @@ const grumpyNarwhalPalette = {
40239
40149
  fillColor: "#1b7a1b",
40240
40150
  textColor: "#1b7a1b",
40241
40151
  highContrastColor: "#1b7a1b",
40242
- lineColorWord: "green",
40243
- markerColorWord: "green",
40244
- fillColorWord: "green",
40245
- textColorWord: "green",
40246
- highContrastColorWord: "green",
40247
40152
  lineColorDarkMode: "#39ff14",
40248
40153
  markerColorDarkMode: "#39ff14",
40249
40154
  fillColorDarkMode: "#39ff14",
40250
40155
  textColorDarkMode: "#39ff14",
40251
- lineColorWordDarkMode: "green",
40252
- markerColorWordDarkMode: "green",
40253
- fillColorWordDarkMode: "green",
40254
- textColorWordDarkMode: "green",
40255
- highContrastColorWordDarkMode: "green",
40256
40156
  lineWidth: 2,
40257
40157
  markerStyle: "square"
40258
40158
  },
@@ -40271,11 +40171,6 @@ const grumpyNarwhalPalette = {
40271
40171
  markerColorDarkMode: "#ff1493",
40272
40172
  fillColorDarkMode: "#ff1493",
40273
40173
  textColorDarkMode: "#ff1493",
40274
- lineColorWordDarkMode: "pink",
40275
- markerColorWordDarkMode: "pink",
40276
- fillColorWordDarkMode: "pink",
40277
- textColorWordDarkMode: "pink",
40278
- highContrastColorWordDarkMode: "pink",
40279
40174
  lineWidth: 3,
40280
40175
  markerStyle: "triangle"
40281
40176
  },
@@ -40294,11 +40189,6 @@ const grumpyNarwhalPalette = {
40294
40189
  markerColorDarkMode: "#00e5ff",
40295
40190
  fillColorDarkMode: "#00e5ff",
40296
40191
  textColorDarkMode: "#00e5ff",
40297
- lineColorWordDarkMode: "cyan",
40298
- markerColorWordDarkMode: "cyan",
40299
- fillColorWordDarkMode: "cyan",
40300
- textColorWordDarkMode: "cyan",
40301
- highContrastColorWordDarkMode: "cyan",
40302
40192
  lineWidth: 2,
40303
40193
  markerStyle: "diamond"
40304
40194
  },
@@ -40317,11 +40207,6 @@ const grumpyNarwhalPalette = {
40317
40207
  markerColorDarkMode: "#ffea00",
40318
40208
  fillColorDarkMode: "#ffea00",
40319
40209
  textColorDarkMode: "#ffea00",
40320
- lineColorWordDarkMode: "yellow",
40321
- markerColorWordDarkMode: "yellow",
40322
- fillColorWordDarkMode: "yellow",
40323
- textColorWordDarkMode: "yellow",
40324
- highContrastColorWordDarkMode: "yellow",
40325
40210
  lineWidth: 2,
40326
40211
  markerStyle: "triangleDown"
40327
40212
  },
@@ -40335,21 +40220,11 @@ const grumpyNarwhalPalette = {
40335
40220
  fillColor: "#b026ff",
40336
40221
  textColor: "#b026ff",
40337
40222
  highContrastColor: "#b026ff",
40338
- lineColorWord: "purple",
40339
- markerColorWord: "purple",
40340
- fillColorWord: "purple",
40341
- textColorWord: "purple",
40342
- highContrastColorWord: "purple",
40343
40223
  lineColorDarkMode: "#b026ff",
40344
40224
  markerColorDarkMode: "#b026ff",
40345
40225
  fillColorDarkMode: "#b026ff",
40346
40226
  textColorDarkMode: "#b445ff",
40347
40227
  highContrastColorDarkMode: "#b445ff",
40348
- lineColorWordDarkMode: "purple",
40349
- markerColorWordDarkMode: "purple",
40350
- fillColorWordDarkMode: "purple",
40351
- textColorWordDarkMode: "purple",
40352
- highContrastColorWordDarkMode: "purple",
40353
40228
  lineWidth: 2,
40354
40229
  markerStyle: "triangleLeft"
40355
40230
  }
@@ -40402,154 +40277,20 @@ function cycleStyleNumberForPalette(styleNumber, paletteName) {
40402
40277
  }
40403
40278
  return (styleNumber - 1) % size2 + 1;
40404
40279
  }
40405
- var r$2 = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, t$1$1 = function(r2) {
40406
- return "string" == typeof r2 ? r2.length > 0 : "number" == typeof r2;
40407
- }, n$2 = function(r2, t22, n2) {
40408
- return void 0 === t22 && (t22 = 0), void 0 === n2 && (n2 = Math.pow(10, t22)), Math.round(n2 * r2) / n2 + 0;
40409
- }, e$2 = function(r2, t22, n2) {
40410
- return void 0 === t22 && (t22 = 0), void 0 === n2 && (n2 = 1), r2 > n2 ? n2 : r2 > t22 ? r2 : t22;
40411
- }, u$2 = function(r2) {
40412
- return (r2 = isFinite(r2) ? r2 % 360 : 0) > 0 ? r2 : r2 + 360;
40413
- }, a$2 = function(r2) {
40414
- return { r: e$2(r2.r, 0, 255), g: e$2(r2.g, 0, 255), b: e$2(r2.b, 0, 255), a: e$2(r2.a) };
40415
- }, o$1$1 = function(r2) {
40416
- return { r: n$2(r2.r), g: n$2(r2.g), b: n$2(r2.b), a: n$2(r2.a, 3) };
40417
- }, i$2 = /^#([0-9a-f]{3,8})$/i, s$2 = function(r2) {
40418
- var t22 = r2.toString(16);
40419
- return t22.length < 2 ? "0" + t22 : t22;
40420
- }, h$2 = function(r2) {
40421
- var t22 = r2.r, n2 = r2.g, e22 = r2.b, u2 = r2.a, a2 = Math.max(t22, n2, e22), o2 = a2 - Math.min(t22, n2, e22), i2 = o2 ? a2 === t22 ? (n2 - e22) / o2 : a2 === n2 ? 2 + (e22 - t22) / o2 : 4 + (t22 - n2) / o2 : 0;
40422
- return { h: 60 * (i2 < 0 ? i2 + 6 : i2), s: a2 ? o2 / a2 * 100 : 0, v: a2 / 255 * 100, a: u2 };
40423
- }, b$2 = function(r2) {
40424
- var t22 = r2.h, n2 = r2.s, e22 = r2.v, u2 = r2.a;
40425
- t22 = t22 / 360 * 6, n2 /= 100, e22 /= 100;
40426
- var a2 = Math.floor(t22), o2 = e22 * (1 - n2), i2 = e22 * (1 - (t22 - a2) * n2), s2 = e22 * (1 - (1 - t22 + a2) * n2), h2 = a2 % 6;
40427
- return { r: 255 * [e22, i2, o2, o2, s2, e22][h2], g: 255 * [s2, e22, e22, i2, o2, o2][h2], b: 255 * [o2, o2, s2, e22, e22, i2][h2], a: u2 };
40428
- }, g$2 = function(r2) {
40429
- return { h: u$2(r2.h), s: e$2(r2.s, 0, 100), l: e$2(r2.l, 0, 100), a: e$2(r2.a) };
40430
- }, d$2 = function(r2) {
40431
- return { h: n$2(r2.h), s: n$2(r2.s), l: n$2(r2.l), a: n$2(r2.a, 3) };
40432
- }, f$2 = function(r2) {
40433
- return b$2((n2 = (t22 = r2).s, { h: t22.h, s: (n2 *= ((e22 = t22.l) < 50 ? e22 : 100 - e22) / 100) > 0 ? 2 * n2 / (e22 + n2) * 100 : 0, v: e22 + n2, a: t22.a }));
40434
- var t22, n2, e22;
40435
- }, c$2 = function(r2) {
40436
- return { h: (t22 = h$2(r2)).h, s: (u2 = (200 - (n2 = t22.s)) * (e22 = t22.v) / 100) > 0 && u2 < 200 ? n2 * e22 / 100 / (u2 <= 100 ? u2 : 200 - u2) * 100 : 0, l: u2 / 2, a: t22.a };
40437
- var t22, n2, e22, u2;
40438
- }, l$2 = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, p$2 = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, v$2 = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, m$2 = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, y$2 = { string: [[function(r2) {
40439
- var t22 = i$2.exec(r2);
40440
- return t22 ? (r2 = t22[1]).length <= 4 ? { r: parseInt(r2[0] + r2[0], 16), g: parseInt(r2[1] + r2[1], 16), b: parseInt(r2[2] + r2[2], 16), a: 4 === r2.length ? n$2(parseInt(r2[3] + r2[3], 16) / 255, 2) : 1 } : 6 === r2.length || 8 === r2.length ? { r: parseInt(r2.substr(0, 2), 16), g: parseInt(r2.substr(2, 2), 16), b: parseInt(r2.substr(4, 2), 16), a: 8 === r2.length ? n$2(parseInt(r2.substr(6, 2), 16) / 255, 2) : 1 } : null : null;
40441
- }, "hex"], [function(r2) {
40442
- var t22 = v$2.exec(r2) || m$2.exec(r2);
40443
- return t22 ? t22[2] !== t22[4] || t22[4] !== t22[6] ? null : a$2({ r: Number(t22[1]) / (t22[2] ? 100 / 255 : 1), g: Number(t22[3]) / (t22[4] ? 100 / 255 : 1), b: Number(t22[5]) / (t22[6] ? 100 / 255 : 1), a: void 0 === t22[7] ? 1 : Number(t22[7]) / (t22[8] ? 100 : 1) }) : null;
40444
- }, "rgb"], [function(t22) {
40445
- var n2 = l$2.exec(t22) || p$2.exec(t22);
40446
- if (!n2) return null;
40447
- var e22, u2, a2 = g$2({ h: (e22 = n2[1], u2 = n2[2], void 0 === u2 && (u2 = "deg"), Number(e22) * (r$2[u2] || 1)), s: Number(n2[3]), l: Number(n2[4]), a: void 0 === n2[5] ? 1 : Number(n2[5]) / (n2[6] ? 100 : 1) });
40448
- return f$2(a2);
40449
- }, "hsl"]], object: [[function(r2) {
40450
- var n2 = r2.r, e22 = r2.g, u2 = r2.b, o2 = r2.a, i2 = void 0 === o2 ? 1 : o2;
40451
- return t$1$1(n2) && t$1$1(e22) && t$1$1(u2) ? a$2({ r: Number(n2), g: Number(e22), b: Number(u2), a: Number(i2) }) : null;
40452
- }, "rgb"], [function(r2) {
40453
- var n2 = r2.h, e22 = r2.s, u2 = r2.l, a2 = r2.a, o2 = void 0 === a2 ? 1 : a2;
40454
- if (!t$1$1(n2) || !t$1$1(e22) || !t$1$1(u2)) return null;
40455
- var i2 = g$2({ h: Number(n2), s: Number(e22), l: Number(u2), a: Number(o2) });
40456
- return f$2(i2);
40457
- }, "hsl"], [function(r2) {
40458
- var n2 = r2.h, a2 = r2.s, o2 = r2.v, i2 = r2.a, s2 = void 0 === i2 ? 1 : i2;
40459
- if (!t$1$1(n2) || !t$1$1(a2) || !t$1$1(o2)) return null;
40460
- var h2 = (function(r3) {
40461
- return { h: u$2(r3.h), s: e$2(r3.s, 0, 100), v: e$2(r3.v, 0, 100), a: e$2(r3.a) };
40462
- })({ h: Number(n2), s: Number(a2), v: Number(o2), a: Number(s2) });
40463
- return b$2(h2);
40464
- }, "hsv"]] }, N$2 = function(r2, t22) {
40465
- for (var n2 = 0; n2 < t22.length; n2++) {
40466
- var e22 = t22[n2][0](r2);
40467
- if (e22) return [e22, t22[n2][1]];
40468
- }
40469
- return [null, void 0];
40470
- }, x$2 = function(r2) {
40471
- return "string" == typeof r2 ? N$2(r2.trim(), y$2.string) : "object" == typeof r2 && null !== r2 ? N$2(r2, y$2.object) : [null, void 0];
40472
- }, M$4 = function(r2, t22) {
40473
- var n2 = c$2(r2);
40474
- return { h: n2.h, s: e$2(n2.s + 100 * t22, 0, 100), l: n2.l, a: n2.a };
40475
- }, H$3 = function(r2) {
40476
- return (299 * r2.r + 587 * r2.g + 114 * r2.b) / 1e3 / 255;
40477
- }, $$2 = function(r2, t22) {
40478
- var n2 = c$2(r2);
40479
- return { h: n2.h, s: n2.s, l: e$2(n2.l + 100 * t22, 0, 100), a: n2.a };
40480
- }, j$2 = (function() {
40481
- function r2(r3) {
40482
- this.parsed = x$2(r3)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
40483
- }
40484
- return r2.prototype.isValid = function() {
40485
- return null !== this.parsed;
40486
- }, r2.prototype.brightness = function() {
40487
- return n$2(H$3(this.rgba), 2);
40488
- }, r2.prototype.isDark = function() {
40489
- return H$3(this.rgba) < 0.5;
40490
- }, r2.prototype.isLight = function() {
40491
- return H$3(this.rgba) >= 0.5;
40492
- }, r2.prototype.toHex = function() {
40493
- return r3 = o$1$1(this.rgba), t22 = r3.r, e22 = r3.g, u2 = r3.b, i2 = (a2 = r3.a) < 1 ? s$2(n$2(255 * a2)) : "", "#" + s$2(t22) + s$2(e22) + s$2(u2) + i2;
40494
- var r3, t22, e22, u2, a2, i2;
40495
- }, r2.prototype.toRgb = function() {
40496
- return o$1$1(this.rgba);
40497
- }, r2.prototype.toRgbString = function() {
40498
- return r3 = o$1$1(this.rgba), t22 = r3.r, n2 = r3.g, e22 = r3.b, (u2 = r3.a) < 1 ? "rgba(" + t22 + ", " + n2 + ", " + e22 + ", " + u2 + ")" : "rgb(" + t22 + ", " + n2 + ", " + e22 + ")";
40499
- var r3, t22, n2, e22, u2;
40500
- }, r2.prototype.toHsl = function() {
40501
- return d$2(c$2(this.rgba));
40502
- }, r2.prototype.toHslString = function() {
40503
- return r3 = d$2(c$2(this.rgba)), t22 = r3.h, n2 = r3.s, e22 = r3.l, (u2 = r3.a) < 1 ? "hsla(" + t22 + ", " + n2 + "%, " + e22 + "%, " + u2 + ")" : "hsl(" + t22 + ", " + n2 + "%, " + e22 + "%)";
40504
- var r3, t22, n2, e22, u2;
40505
- }, r2.prototype.toHsv = function() {
40506
- return r3 = h$2(this.rgba), { h: n$2(r3.h), s: n$2(r3.s), v: n$2(r3.v), a: n$2(r3.a, 3) };
40507
- var r3;
40508
- }, r2.prototype.invert = function() {
40509
- return w$2({ r: 255 - (r3 = this.rgba).r, g: 255 - r3.g, b: 255 - r3.b, a: r3.a });
40510
- var r3;
40511
- }, r2.prototype.saturate = function(r3) {
40512
- return void 0 === r3 && (r3 = 0.1), w$2(M$4(this.rgba, r3));
40513
- }, r2.prototype.desaturate = function(r3) {
40514
- return void 0 === r3 && (r3 = 0.1), w$2(M$4(this.rgba, -r3));
40515
- }, r2.prototype.grayscale = function() {
40516
- return w$2(M$4(this.rgba, -1));
40517
- }, r2.prototype.lighten = function(r3) {
40518
- return void 0 === r3 && (r3 = 0.1), w$2($$2(this.rgba, r3));
40519
- }, r2.prototype.darken = function(r3) {
40520
- return void 0 === r3 && (r3 = 0.1), w$2($$2(this.rgba, -r3));
40521
- }, r2.prototype.rotate = function(r3) {
40522
- return void 0 === r3 && (r3 = 15), this.hue(this.hue() + r3);
40523
- }, r2.prototype.alpha = function(r3) {
40524
- return "number" == typeof r3 ? w$2({ r: (t22 = this.rgba).r, g: t22.g, b: t22.b, a: r3 }) : n$2(this.rgba.a, 3);
40525
- var t22;
40526
- }, r2.prototype.hue = function(r3) {
40527
- var t22 = c$2(this.rgba);
40528
- return "number" == typeof r3 ? w$2({ h: r3, s: t22.s, l: t22.l, a: t22.a }) : n$2(t22.h);
40529
- }, r2.prototype.isEqual = function(r3) {
40530
- return this.toHex() === w$2(r3).toHex();
40531
- }, r2;
40532
- })(), w$2 = function(r2) {
40533
- return r2 instanceof j$2 ? r2 : new j$2(r2);
40534
- }, S$2 = [], k$2 = function(r2) {
40535
- r2.forEach(function(r3) {
40536
- S$2.indexOf(r3) < 0 && (r3(j$2, y$2), S$2.push(r3));
40537
- });
40538
- };
40539
- var o$2 = function(o2) {
40280
+ var o$4 = function(o2) {
40540
40281
  var t22 = o2 / 255;
40541
40282
  return t22 < 0.04045 ? t22 / 12.92 : Math.pow((t22 + 0.055) / 1.055, 2.4);
40542
- }, t$2 = function(t22) {
40543
- return 0.2126 * o$2(t22.r) + 0.7152 * o$2(t22.g) + 0.0722 * o$2(t22.b);
40283
+ }, t$4 = function(t22) {
40284
+ return 0.2126 * o$4(t22.r) + 0.7152 * o$4(t22.g) + 0.0722 * o$4(t22.b);
40544
40285
  };
40545
40286
  function a11yPlugin(o2) {
40546
40287
  o2.prototype.luminance = function() {
40547
- return o3 = t$2(this.rgba), void 0 === (r2 = 2) && (r2 = 0), void 0 === n2 && (n2 = Math.pow(10, r2)), Math.round(n2 * o3) / n2 + 0;
40288
+ return o3 = t$4(this.rgba), void 0 === (r2 = 2) && (r2 = 0), void 0 === n2 && (n2 = Math.pow(10, r2)), Math.round(n2 * o3) / n2 + 0;
40548
40289
  var o3, r2, n2;
40549
40290
  }, o2.prototype.contrast = function(r2) {
40550
40291
  void 0 === r2 && (r2 = "#FFF");
40551
40292
  var n2, a2, i2, e22, v2, u2, d2, c2 = r2 instanceof o2 ? r2 : new o2(r2);
40552
- return e22 = this.rgba, v2 = c2.toRgb(), u2 = t$2(e22), d2 = t$2(v2), n2 = u2 > d2 ? (u2 + 0.05) / (d2 + 0.05) : (d2 + 0.05) / (u2 + 0.05), void 0 === (a2 = 2) && (a2 = 0), void 0 === i2 && (i2 = Math.pow(10, a2)), Math.floor(i2 * n2) / i2 + 0;
40293
+ return e22 = this.rgba, v2 = c2.toRgb(), u2 = t$4(e22), d2 = t$4(v2), n2 = u2 > d2 ? (u2 + 0.05) / (d2 + 0.05) : (d2 + 0.05) / (u2 + 0.05), void 0 === (a2 = 2) && (a2 = 0), void 0 === i2 && (i2 = Math.pow(10, a2)), Math.floor(i2 * n2) / i2 + 0;
40553
40294
  }, o2.prototype.isReadable = function(o3, t22) {
40554
40295
  return void 0 === o3 && (o3 = "#FFF"), void 0 === t22 && (t22 = {}), this.contrast(o3) >= (e22 = void 0 === (i2 = (r2 = t22).size) ? "normal" : i2, "AAA" === (a2 = void 0 === (n2 = r2.level) ? "AA" : n2) && "normal" === e22 ? 7 : "AA" === a2 && "large" === e22 ? 3 : 4.5);
40555
40296
  var r2, n2, a2, i2, e22;
@@ -40600,7 +40341,7 @@ function compositeOver(foreground, background) {
40600
40341
  };
40601
40342
  }
40602
40343
  function hexWithLightness(color, lightness) {
40603
- return w$2({ ...color, l: lightness }).toHex();
40344
+ return w$1$1({ ...color, l: lightness }).toHex();
40604
40345
  }
40605
40346
  function compositedContrastRatio({
40606
40347
  foreground,
@@ -40608,8 +40349,8 @@ function compositedContrastRatio({
40608
40349
  background,
40609
40350
  opacityMultiplier = 1
40610
40351
  }) {
40611
- const fg = w$2(foreground);
40612
- const canvasColor = w$2(canvas);
40352
+ const fg = w$1$1(foreground);
40353
+ const canvasColor = w$1$1(canvas);
40613
40354
  if (!fg.isValid() || !canvasColor.isValid()) {
40614
40355
  return null;
40615
40356
  }
@@ -40621,7 +40362,7 @@ function compositedContrastRatio({
40621
40362
  };
40622
40363
  let backgroundOpaque = canvasOpaque;
40623
40364
  if (background !== void 0) {
40624
- const bg = w$2(background);
40365
+ const bg = w$1$1(background);
40625
40366
  if (!bg.isValid()) {
40626
40367
  return null;
40627
40368
  }
@@ -40632,14 +40373,14 @@ function compositedContrastRatio({
40632
40373
  { ...fgRgba, a: clamp01$1(fgRgba.a * opacityMultiplier) },
40633
40374
  backgroundOpaque
40634
40375
  );
40635
- return w$2(effectiveForeground).contrast(w$2(backgroundOpaque));
40376
+ return w$1$1(effectiveForeground).contrast(w$1$1(backgroundOpaque));
40636
40377
  }
40637
40378
  function deriveAccessibleDarkModeColor({
40638
40379
  lightColor,
40639
40380
  threshold,
40640
40381
  opacityMultiplier = 1
40641
40382
  }) {
40642
- const base = w$2(lightColor);
40383
+ const base = w$1$1(lightColor);
40643
40384
  if (!base.isValid()) {
40644
40385
  return lightColor;
40645
40386
  }
@@ -40666,12 +40407,12 @@ function deriveAccessibleDarkModeColor({
40666
40407
  return hexWithLightness({ h: h2, s: s2, a: a2 }, 100);
40667
40408
  }
40668
40409
  function invertLightness(color) {
40669
- const c2 = w$2(color);
40410
+ const c2 = w$1$1(color);
40670
40411
  if (!c2.isValid()) {
40671
40412
  return color;
40672
40413
  }
40673
40414
  const { h: h2, s: s2, l: l2, a: a2 } = c2.toHsl();
40674
- return w$2({ h: h2, s: s2, l: 100 - l2, a: a2 }).toHex();
40415
+ return w$1$1({ h: h2, s: s2, l: 100 - l2, a: a2 }).toHex();
40675
40416
  }
40676
40417
  function deriveAccessibleDarkModeBackground(lightColor) {
40677
40418
  return invertLightness(lightColor);
@@ -40682,7 +40423,7 @@ function suggestAccessibleDarkModeColorAgainst({
40682
40423
  channelRole,
40683
40424
  threshold
40684
40425
  }) {
40685
- const base = w$2(startColor);
40426
+ const base = w$1$1(startColor);
40686
40427
  if (!base.isValid()) {
40687
40428
  return null;
40688
40429
  }
@@ -42508,7 +42249,7 @@ async function cidFromArrayBuffer(data) {
42508
42249
  await crypto.subtle.digest("SHA-256", new Uint8Array());
42509
42250
  digest = (data2) => crypto.subtle.digest("SHA-256", data2);
42510
42251
  } catch (e22) {
42511
- const sha256 = (await import("./sha256-Cxv3Uyb4-C5gGBpTd-Boegkz-M.js").then((n2) => n2.s)).default;
42252
+ const sha256 = (await import("./sha256-J35x7uWS-24B4oOm4-FFN99q-x.js").then((n2) => n2.s)).default;
42512
42253
  digest = (data2) => sha256(data2, {
42513
42254
  asBytes: true
42514
42255
  });
@@ -232120,4 +231861,4 @@ export {
232120
231861
  getDefaultExportFromCjs as g,
232121
231862
  updateSyntaxFromV06toV07 as u
232122
231863
  };
232123
- //# sourceMappingURL=index-X6YkPOgr.js.map
231864
+ //# sourceMappingURL=index-BKiwK1il.js.map