storybook
Version:
Storybook framework-agnostic API
1,628 lines (1,544 loc) • 769 kB
JavaScript
"use strict";
var Yg = Object.create;
var un = Object.defineProperty;
var Xg = Object.getOwnPropertyDescriptor;
var Zg = Object.getOwnPropertyNames;
var Kg = Object.getPrototypeOf, Jg = Object.prototype.hasOwnProperty;
var o = (e, t) => un(e, "name", { value: t, configurable: !0 });
var j = (e, t) => () => (e && (t = e(e = 0)), t);
var I = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), ir = (e, t) => {
for (var r in t)
un(e, r, { get: t[r], enumerable: !0 });
}, Ws = (e, t, r, n) => {
if (t && typeof t == "object" || typeof t == "function")
for (let a of Zg(t))
!Jg.call(e, a) && a !== r && un(e, a, { get: () => t[a], enumerable: !(n = Xg(t, a)) || n.enumerable });
return e;
};
var A = (e, t, r) => (r = e != null ? Yg(Kg(e)) : {}, Ws(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
t || !e || !e.__esModule ? un(r, "default", { value: e, enumerable: !0 }) : r,
e
)), qe = (e) => Ws(un({}, "__esModule", { value: !0 }), e);
// ../node_modules/@babel/runtime/helpers/extends.js
var ho = I((RM, Rt) => {
function Li() {
return Rt.exports = Li = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t];
for (var n in r) ({}).hasOwnProperty.call(r, n) && (e[n] = r[n]);
}
return e;
}, Rt.exports.__esModule = !0, Rt.exports.default = Rt.exports, Li.apply(null, arguments);
}
o(Li, "_extends");
Rt.exports = Li, Rt.exports.__esModule = !0, Rt.exports.default = Rt.exports;
});
// ../node_modules/@babel/runtime/helpers/assertThisInitialized.js
var Us = I((SM, fn) => {
function Qg(e) {
if (e === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return e;
}
o(Qg, "_assertThisInitialized");
fn.exports = Qg, fn.exports.__esModule = !0, fn.exports.default = fn.exports;
});
// ../node_modules/@babel/runtime/helpers/setPrototypeOf.js
var mo = I((IM, Et) => {
function Ti(e, t) {
return Et.exports = Ti = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, n) {
return r.__proto__ = n, r;
}, Et.exports.__esModule = !0, Et.exports.default = Et.exports, Ti(e, t);
}
o(Ti, "_setPrototypeOf");
Et.exports = Ti, Et.exports.__esModule = !0, Et.exports.default = Et.exports;
});
// ../node_modules/@babel/runtime/helpers/inheritsLoose.js
var Gs = I((AM, dn) => {
var ev = mo();
function tv(e, t) {
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, ev(e, t);
}
o(tv, "_inheritsLoose");
dn.exports = tv, dn.exports.__esModule = !0, dn.exports.default = dn.exports;
});
// ../node_modules/@babel/runtime/helpers/getPrototypeOf.js
var Ys = I((TM, St) => {
function Pi(e) {
return St.exports = Pi = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
return t.__proto__ || Object.getPrototypeOf(t);
}, St.exports.__esModule = !0, St.exports.default = St.exports, Pi(e);
}
o(Pi, "_getPrototypeOf");
St.exports = Pi, St.exports.__esModule = !0, St.exports.default = St.exports;
});
// ../node_modules/@babel/runtime/helpers/isNativeFunction.js
var Xs = I((zM, pn) => {
function rv(e) {
try {
return Function.toString.call(e).indexOf("[native code]") !== -1;
} catch {
return typeof e == "function";
}
}
o(rv, "_isNativeFunction");
pn.exports = rv, pn.exports.__esModule = !0, pn.exports.default = pn.exports;
});
// ../node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js
var Ks = I((kM, Ct) => {
function Zs() {
try {
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
}));
} catch {
}
return (Ct.exports = Zs = /* @__PURE__ */ o(function() {
return !!e;
}, "_isNativeReflectConstruct"), Ct.exports.__esModule = !0, Ct.exports.default = Ct.exports)();
}
o(Zs, "_isNativeReflectConstruct");
Ct.exports = Zs, Ct.exports.__esModule = !0, Ct.exports.default = Ct.exports;
});
// ../node_modules/@babel/runtime/helpers/construct.js
var Js = I((BM, hn) => {
var nv = Ks(), ov = mo();
function av(e, t, r) {
if (nv()) return Reflect.construct.apply(null, arguments);
var n = [null];
n.push.apply(n, t);
var a = new (e.bind.apply(e, n))();
return r && ov(a, r.prototype), a;
}
o(av, "_construct");
hn.exports = av, hn.exports.__esModule = !0, hn.exports.default = hn.exports;
});
// ../node_modules/@babel/runtime/helpers/wrapNativeSuper.js
var Qs = I((DM, It) => {
var iv = Ys(), lv = mo(), sv = Xs(), cv = Js();
function zi(e) {
var t = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
return It.exports = zi = /* @__PURE__ */ o(function(n) {
if (n === null || !sv(n)) return n;
if (typeof n != "function") throw new TypeError("Super expression must either be null or a function");
if (t !== void 0) {
if (t.has(n)) return t.get(n);
t.set(n, a);
}
function a() {
return cv(n, arguments, iv(this).constructor);
}
return o(a, "Wrapper"), a.prototype = Object.create(n.prototype, {
constructor: {
value: a,
enumerable: !1,
writable: !0,
configurable: !0
}
}), lv(a, n);
}, "_wrapNativeSuper"), It.exports.__esModule = !0, It.exports.default = It.exports, zi(e);
}
o(zi, "_wrapNativeSuper");
It.exports = zi, It.exports.__esModule = !0, It.exports.default = It.exports;
});
// ../node_modules/@babel/runtime/helpers/taggedTemplateLiteralLoose.js
var ec = I((FM, mn) => {
function uv(e, t) {
return t || (t = e.slice(0)), e.raw = t, e;
}
o(uv, "_taggedTemplateLiteralLoose");
mn.exports = uv, mn.exports.__esModule = !0, mn.exports.default = mn.exports;
});
// ../node_modules/polished/dist/polished.cjs.js
var Lr = I((P) => {
"use strict";
Object.defineProperty(P, "__esModule", { value: !0 });
var fv = ho(), dv = Us(), pv = Gs(), hv = Qs(), mv = ec();
function bn(e) {
return e && typeof e == "object" && "default" in e ? e : { default: e };
}
o(bn, "_interopDefaultLegacy");
var ee = /* @__PURE__ */ bn(fv), gv = /* @__PURE__ */ bn(dv), vv = /* @__PURE__ */ bn(pv), wv = /* @__PURE__ */ bn(hv), hc = /* @__PURE__ */ bn(
mv);
function tc() {
var e;
return e = arguments.length - 1, e < 0 || arguments.length <= e ? void 0 : arguments[e];
}
o(tc, "last");
function bv(e) {
return -e;
}
o(bv, "negation");
function yv(e, t) {
return e + t;
}
o(yv, "addition");
function xv(e, t) {
return e - t;
}
o(xv, "subtraction");
function Rv(e, t) {
return e * t;
}
o(Rv, "multiplication");
function Ev(e, t) {
return e / t;
}
o(Ev, "division");
function Sv() {
return Math.max.apply(Math, arguments);
}
o(Sv, "max");
function Cv() {
return Math.min.apply(Math, arguments);
}
o(Cv, "min");
function Iv() {
return Array.of.apply(Array, arguments);
}
o(Iv, "comma");
var Mv = {
symbols: {
"*": {
infix: {
symbol: "*",
f: Rv,
notation: "infix",
precedence: 4,
rightToLeft: 0,
argCount: 2
},
symbol: "*",
regSymbol: "\\*"
},
"/": {
infix: {
symbol: "/",
f: Ev,
notation: "infix",
precedence: 4,
rightToLeft: 0,
argCount: 2
},
symbol: "/",
regSymbol: "/"
},
"+": {
infix: {
symbol: "+",
f: yv,
notation: "infix",
precedence: 2,
rightToLeft: 0,
argCount: 2
},
prefix: {
symbol: "+",
f: tc,
notation: "prefix",
precedence: 3,
rightToLeft: 0,
argCount: 1
},
symbol: "+",
regSymbol: "\\+"
},
"-": {
infix: {
symbol: "-",
f: xv,
notation: "infix",
precedence: 2,
rightToLeft: 0,
argCount: 2
},
prefix: {
symbol: "-",
f: bv,
notation: "prefix",
precedence: 3,
rightToLeft: 0,
argCount: 1
},
symbol: "-",
regSymbol: "-"
},
",": {
infix: {
symbol: ",",
f: Iv,
notation: "infix",
precedence: 1,
rightToLeft: 0,
argCount: 2
},
symbol: ",",
regSymbol: ","
},
"(": {
prefix: {
symbol: "(",
f: tc,
notation: "prefix",
precedence: 0,
rightToLeft: 0,
argCount: 1
},
symbol: "(",
regSymbol: "\\("
},
")": {
postfix: {
symbol: ")",
f: void 0,
notation: "postfix",
precedence: 0,
rightToLeft: 0,
argCount: 1
},
symbol: ")",
regSymbol: "\\)"
},
min: {
func: {
symbol: "min",
f: Cv,
notation: "func",
precedence: 0,
rightToLeft: 0,
argCount: 1
},
symbol: "min",
regSymbol: "min\\b"
},
max: {
func: {
symbol: "max",
f: Sv,
notation: "func",
precedence: 0,
rightToLeft: 0,
argCount: 1
},
symbol: "max",
regSymbol: "max\\b"
}
}
}, rc = Mv, Av = {
1: `Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation:\
0.4, lightness: 0.75 }).
`,
2: `Passed invalid arguments to hsla, please pass multiple numbers e.g. hsla(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, satu\
ration: 0.4, lightness: 0.75, alpha: 0.7 }).
`,
3: `Passed an incorrect argument to a color function, please pass a string representation of a color.
`,
4: `Couldn't generate valid rgb string from %s, it returned %s.
`,
5: `Couldn't parse the color string. Please provide the color as a string in hex, rgb, rgba, hsl or hsla notation.
`,
6: `Passed invalid arguments to rgb, please pass multiple numbers e.g. rgb(255, 205, 100) or an object e.g. rgb({ red: 255, green: 205, \
blue: 100 }).
`,
7: `Passed invalid arguments to rgba, please pass multiple numbers e.g. rgb(255, 205, 100, 0.75) or an object e.g. rgb({ red: 255, green\
: 205, blue: 100, alpha: 0.75 }).
`,
8: `Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object.
`,
9: `Please provide a number of steps to the modularScale helper.
`,
10: `Please pass a number or one of the predefined scales to the modularScale helper as the ratio.
`,
11: `Invalid value passed as base to modularScale, expected number or em string but got "%s"
`,
12: `Expected a string ending in "px" or a number passed as the first argument to %s(), got "%s" instead.
`,
13: `Expected a string ending in "px" or a number passed as the second argument to %s(), got "%s" instead.
`,
14: `Passed invalid pixel value ("%s") to %s(), please pass a value like "12px" or 12.
`,
15: `Passed invalid base value ("%s") to %s(), please pass a value like "12px" or 12.
`,
16: `You must provide a template to this method.
`,
17: `You passed an unsupported selector state to this method.
`,
18: `minScreen and maxScreen must be provided as stringified numbers with the same units.
`,
19: `fromSize and toSize must be provided as stringified numbers with the same units.
`,
20: `expects either an array of objects or a single object with the properties prop, fromSize, and toSize.
`,
21: "expects the objects in the first argument array to have the properties `prop`, `fromSize`, and `toSize`.\n\n",
22: "expects the first argument object to have the properties `prop`, `fromSize`, and `toSize`.\n\n",
23: `fontFace expects a name of a font-family.
`,
24: `fontFace expects either the path to the font file(s) or a name of a local copy.
`,
25: `fontFace expects localFonts to be an array.
`,
26: `fontFace expects fileFormats to be an array.
`,
27: `radialGradient requries at least 2 color-stops to properly render.
`,
28: `Please supply a filename to retinaImage() as the first argument.
`,
29: `Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.
`,
30: "Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",
31: `The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation
`,
32: `To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])
To pass a single animation please supply them in simple values, e.g. animation('rotate', '2s')
`,
33: `The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation
`,
34: `borderRadius expects a radius value as a string or number as the second argument.
`,
35: `borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.
`,
36: `Property must be a string value.
`,
37: `Syntax Error at %s.
`,
38: `Formula contains a function that needs parentheses at %s.
`,
39: `Formula is missing closing parenthesis at %s.
`,
40: `Formula has too many closing parentheses at %s.
`,
41: `All values in a formula must have the same unit or be unitless.
`,
42: `Please provide a number of steps to the modularScale helper.
`,
43: `Please pass a number or one of the predefined scales to the modularScale helper as the ratio.
`,
44: `Invalid value passed as base to modularScale, expected number or em/rem string but got %s.
`,
45: `Passed invalid argument to hslToColorString, please pass a HslColor or HslaColor object.
`,
46: `Passed invalid argument to rgbToColorString, please pass a RgbColor or RgbaColor object.
`,
47: `minScreen and maxScreen must be provided as stringified numbers with the same units.
`,
48: `fromSize and toSize must be provided as stringified numbers with the same units.
`,
49: `Expects either an array of objects or a single object with the properties prop, fromSize, and toSize.
`,
50: `Expects the objects in the first argument array to have the properties prop, fromSize, and toSize.
`,
51: `Expects the first argument object to have the properties prop, fromSize, and toSize.
`,
52: `fontFace expects either the path to the font file(s) or a name of a local copy.
`,
53: `fontFace expects localFonts to be an array.
`,
54: `fontFace expects fileFormats to be an array.
`,
55: `fontFace expects a name of a font-family.
`,
56: `linearGradient requries at least 2 color-stops to properly render.
`,
57: `radialGradient requries at least 2 color-stops to properly render.
`,
58: `Please supply a filename to retinaImage() as the first argument.
`,
59: `Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.
`,
60: "Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",
61: `Property must be a string value.
`,
62: `borderRadius expects a radius value as a string or number as the second argument.
`,
63: `borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.
`,
64: `The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation.
`,
65: `To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\nTo pass a single animat\
ion please supply them in simple values, e.g. animation('rotate', '2s').
`,
66: `The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation.
`,
67: `You must provide a template to this method.
`,
68: `You passed an unsupported selector state to this method.
`,
69: `Expected a string ending in "px" or a number passed as the first argument to %s(), got %s instead.
`,
70: `Expected a string ending in "px" or a number passed as the second argument to %s(), got %s instead.
`,
71: `Passed invalid pixel value %s to %s(), please pass a value like "12px" or 12.
`,
72: `Passed invalid base value %s to %s(), please pass a value like "12px" or 12.
`,
73: `Please provide a valid CSS variable.
`,
74: `CSS variable not found and no default was provided.
`,
75: `important requires a valid style object, got a %s instead.
`,
76: `fromSize and toSize must be provided as stringified numbers with the same units as minScreen and maxScreen.
`,
77: `remToPx expects a value in "rem" but you provided it in "%s".
`,
78: `base must be set in "px" or "%" but you set it in "%s".
`
};
function Lv() {
for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
t[r] = arguments[r];
var n = t[0], a = [], l;
for (l = 1; l < t.length; l += 1)
a.push(t[l]);
return a.forEach(function(c) {
n = n.replace(/%[a-z]/, c);
}), n;
}
o(Lv, "format");
var B = /* @__PURE__ */ function(e) {
vv.default(t, e);
function t(r) {
var n;
if (process.env.NODE_ENV === "production")
n = e.call(this, "An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#" + r +
" for more information.") || this;
else {
for (var a = arguments.length, l = new Array(a > 1 ? a - 1 : 0), c = 1; c < a; c++)
l[c - 1] = arguments[c];
n = e.call(this, Lv.apply(void 0, [Av[r]].concat(l))) || this;
}
return gv.default(n);
}
return o(t, "PolishedError"), t;
}(/* @__PURE__ */ wv.default(Error)), nc = /((?!\w)a|na|hc|mc|dg|me[r]?|xe|ni(?![a-zA-Z])|mm|cp|tp|xp|q(?!s)|hv|xamv|nimv|wv|sm|s(?!\D|$)|ged|darg?|nrut)/g;
function Tv(e) {
var t = {};
return t.symbols = e ? ee.default({}, rc.symbols, e.symbols) : ee.default({}, rc.symbols), t;
}
o(Tv, "mergeSymbolMaps");
function oc(e, t) {
var r, n = e.pop();
return t.push(n.f.apply(n, (r = []).concat.apply(r, t.splice(-n.argCount)))), n.precedence;
}
o(oc, "exec");
function Pv(e, t) {
var r = Tv(t), n, a = [r.symbols["("].prefix], l = [], c = new RegExp(
// Pattern for numbers
"\\d+(?:\\.\\d+)?|" + // ...and patterns for individual operators/function names
Object.keys(r.symbols).map(function(m) {
return r.symbols[m];
}).sort(function(m, b) {
return b.symbol.length - m.symbol.length;
}).map(function(m) {
return m.regSymbol;
}).join("|") + "|(\\S)",
"g"
);
c.lastIndex = 0;
var s = !1;
do {
n = c.exec(e);
var f = n || [")", void 0], u = f[0], d = f[1], p = r.symbols[u], h = p && !p.prefix && !p.func, w = !p || !p.postfix && !p.infix;
if (d || (s ? w : h))
throw new B(37, n ? n.index : e.length, e);
if (s) {
var R = p.postfix || p.infix;
do {
var g = a[a.length - 1];
if ((R.precedence - g.precedence || g.rightToLeft) > 0) break;
} while (oc(a, l));
s = R.notation === "postfix", R.symbol !== ")" && (a.push(R), s && oc(a, l));
} else if (p) {
if (a.push(p.prefix || p.func), p.func && (n = c.exec(e), !n || n[0] !== "("))
throw new B(38, n ? n.index : e.length, e);
} else
l.push(+u), s = !0;
} while (n && a.length);
if (a.length)
throw new B(39, n ? n.index : e.length, e);
if (n)
throw new B(40, n ? n.index : e.length, e);
return l.pop();
}
o(Pv, "calculate");
function Hi(e) {
return e.split("").reverse().join("");
}
o(Hi, "reverseString");
function zv(e, t) {
var r = Hi(e), n = r.match(nc);
if (n && !n.every(function(l) {
return l === n[0];
}))
throw new B(41);
var a = Hi(r.replace(nc, ""));
return "" + Pv(a, t) + (n ? Hi(n[0]) : "");
}
o(zv, "math");
var Hv = /--[\S]*/g;
function kv(e, t) {
if (!e || !e.match(Hv))
throw new B(73);
var r;
if (typeof document < "u" && document.documentElement !== null && (r = getComputedStyle(document.documentElement).getPropertyValue(e)), r)
return r.trim();
if (t)
return t;
throw new B(74);
}
o(kv, "cssVar");
function gn(e) {
return e.charAt(0).toUpperCase() + e.slice(1);
}
o(gn, "capitalizeString");
var Ov = ["Top", "Right", "Bottom", "Left"];
function Bv(e, t) {
if (!e) return t.toLowerCase();
var r = e.split("-");
if (r.length > 1)
return r.splice(1, 0, t), r.reduce(function(a, l) {
return "" + a + gn(l);
});
var n = e.replace(/([a-z])([A-Z])/g, "$1" + t + "$2");
return e === n ? "" + e + t : n;
}
o(Bv, "generateProperty");
function _v(e, t) {
for (var r = {}, n = 0; n < t.length; n += 1)
(t[n] || t[n] === 0) && (r[Bv(e, Ov[n])] = t[n]);
return r;
}
o(_v, "generateStyles");
function Dt(e) {
for (var t = arguments.length, r = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++)
r[n - 1] = arguments[n];
var a = r[0], l = r[1], c = l === void 0 ? a : l, s = r[2], f = s === void 0 ? a : s, u = r[3], d = u === void 0 ? c : u, p = [a, c, f, d];
return _v(e, p);
}
o(Dt, "directionalProperty");
function ac(e, t) {
return e.substr(-t.length) === t;
}
o(ac, "endsWith");
var Dv = /^([+-]?(?:\d+|\d*\.\d+))([a-z]*|%)$/;
function _i(e) {
if (typeof e != "string") return e;
var t = e.match(Dv);
return t ? parseFloat(e) : e;
}
o(_i, "stripUnit");
var Nv = /* @__PURE__ */ o(function(t) {
return function(r, n) {
n === void 0 && (n = "16px");
var a = r, l = n;
if (typeof r == "string") {
if (!ac(r, "px"))
throw new B(69, t, r);
a = _i(r);
}
if (typeof n == "string") {
if (!ac(n, "px"))
throw new B(70, t, n);
l = _i(n);
}
if (typeof a == "string")
throw new B(71, r, t);
if (typeof l == "string")
throw new B(72, n, t);
return "" + a / l + t;
};
}, "pxtoFactory"), mc = Nv, Fv = mc("em"), qv = Fv, Vv = /^([+-]?(?:\d+|\d*\.\d+))([a-z]*|%)$/;
function dt(e) {
if (typeof e != "string") return [e, ""];
var t = e.match(Vv);
return t ? [parseFloat(e), t[2]] : [e, void 0];
}
o(dt, "getValueAndUnit");
function gc(e, t) {
if (typeof e != "object" || e === null)
throw new B(75, typeof e);
var r = {};
return Object.keys(e).forEach(function(n) {
typeof e[n] == "object" && e[n] !== null ? r[n] = gc(e[n], t) : !t || t && (t === n || t.indexOf(n) >= 0) ? r[n] = e[n] + " !important" :
r[n] = e[n];
}), r;
}
o(gc, "important");
var vc = {
minorSecond: 1.067,
majorSecond: 1.125,
minorThird: 1.2,
majorThird: 1.25,
perfectFourth: 1.333,
augFourth: 1.414,
perfectFifth: 1.5,
minorSixth: 1.6,
goldenSection: 1.618,
majorSixth: 1.667,
minorSeventh: 1.778,
majorSeventh: 1.875,
octave: 2,
majorTenth: 2.5,
majorEleventh: 2.667,
majorTwelfth: 3,
doubleOctave: 4
};
function jv(e) {
return vc[e];
}
o(jv, "getRatio");
function $v(e, t, r) {
if (t === void 0 && (t = "1em"), r === void 0 && (r = 1.333), typeof e != "number")
throw new B(42);
if (typeof r == "string" && !vc[r])
throw new B(43);
var n = typeof t == "string" ? dt(t) : [t, ""], a = n[0], l = n[1], c = typeof r == "string" ? jv(r) : r;
if (typeof a == "string")
throw new B(44, t);
return "" + a * Math.pow(c, e) + (l || "");
}
o($v, "modularScale");
var Wv = mc("rem"), Uv = Wv, Di = 16;
function wc(e) {
var t = dt(e);
if (t[1] === "px")
return parseFloat(e);
if (t[1] === "%")
return parseFloat(e) / 100 * Di;
throw new B(78, t[1]);
}
o(wc, "convertBase");
function Gv() {
if (typeof document < "u" && document.documentElement !== null) {
var e = getComputedStyle(document.documentElement).fontSize;
return e ? wc(e) : Di;
}
return Di;
}
o(Gv, "getBaseFromDoc");
function Yv(e, t) {
var r = dt(e);
if (r[1] !== "rem" && r[1] !== "")
throw new B(77, r[1]);
var n = t ? wc(t) : Gv();
return r[0] * n + "px";
}
o(Yv, "remToPx");
var Xv = {
back: "cubic-bezier(0.600, -0.280, 0.735, 0.045)",
circ: "cubic-bezier(0.600, 0.040, 0.980, 0.335)",
cubic: "cubic-bezier(0.550, 0.055, 0.675, 0.190)",
expo: "cubic-bezier(0.950, 0.050, 0.795, 0.035)",
quad: "cubic-bezier(0.550, 0.085, 0.680, 0.530)",
quart: "cubic-bezier(0.895, 0.030, 0.685, 0.220)",
quint: "cubic-bezier(0.755, 0.050, 0.855, 0.060)",
sine: "cubic-bezier(0.470, 0.000, 0.745, 0.715)"
};
function Zv(e) {
return Xv[e.toLowerCase().trim()];
}
o(Zv, "easeIn");
var Kv = {
back: "cubic-bezier(0.680, -0.550, 0.265, 1.550)",
circ: "cubic-bezier(0.785, 0.135, 0.150, 0.860)",
cubic: "cubic-bezier(0.645, 0.045, 0.355, 1.000)",
expo: "cubic-bezier(1.000, 0.000, 0.000, 1.000)",
quad: "cubic-bezier(0.455, 0.030, 0.515, 0.955)",
quart: "cubic-bezier(0.770, 0.000, 0.175, 1.000)",
quint: "cubic-bezier(0.860, 0.000, 0.070, 1.000)",
sine: "cubic-bezier(0.445, 0.050, 0.550, 0.950)"
};
function Jv(e) {
return Kv[e.toLowerCase().trim()];
}
o(Jv, "easeInOut");
var Qv = {
back: "cubic-bezier(0.175, 0.885, 0.320, 1.275)",
cubic: "cubic-bezier(0.215, 0.610, 0.355, 1.000)",
circ: "cubic-bezier(0.075, 0.820, 0.165, 1.000)",
expo: "cubic-bezier(0.190, 1.000, 0.220, 1.000)",
quad: "cubic-bezier(0.250, 0.460, 0.450, 0.940)",
quart: "cubic-bezier(0.165, 0.840, 0.440, 1.000)",
quint: "cubic-bezier(0.230, 1.000, 0.320, 1.000)",
sine: "cubic-bezier(0.390, 0.575, 0.565, 1.000)"
};
function e2(e) {
return Qv[e.toLowerCase().trim()];
}
o(e2, "easeOut");
function Ni(e, t, r, n) {
r === void 0 && (r = "320px"), n === void 0 && (n = "1200px");
var a = dt(e), l = a[0], c = a[1], s = dt(t), f = s[0], u = s[1], d = dt(r), p = d[0], h = d[1], w = dt(n), R = w[0], g = w[1];
if (typeof p != "number" || typeof R != "number" || !h || !g || h !== g)
throw new B(47);
if (typeof l != "number" || typeof f != "number" || c !== u)
throw new B(48);
if (c !== h || u !== g)
throw new B(76);
var m = (l - f) / (p - R), b = f - m * R;
return "calc(" + b.toFixed(2) + (c || "") + " + " + (100 * m).toFixed(2) + "vw)";
}
o(Ni, "between");
function t2(e) {
var t;
e === void 0 && (e = "&");
var r = e + "::after";
return t = {}, t[r] = {
clear: "both",
content: '""',
display: "table"
}, t;
}
o(t2, "clearFix");
function r2(e) {
return e === void 0 && (e = 0), {
position: "absolute",
top: e,
right: e,
bottom: e,
left: e
};
}
o(r2, "cover");
function n2(e, t) {
t === void 0 && (t = 1);
var r = {
display: "inline-block",
maxWidth: e || "100%",
overflow: "hidden",
textOverflow: "ellipsis",
whiteSpace: "nowrap",
wordWrap: "normal"
};
return t > 1 ? ee.default({}, r, {
WebkitBoxOrient: "vertical",
WebkitLineClamp: t,
display: "-webkit-box",
whiteSpace: "normal"
}) : r;
}
o(n2, "ellipsis");
function o2(e, t) {
var r = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
if (r) return (r = r.call(e)).next.bind(r);
if (Array.isArray(e) || (r = a2(e)) || t && e && typeof e.length == "number") {
r && (e = r);
var n = 0;
return function() {
return n >= e.length ? { done: !0 } : { done: !1, value: e[n++] };
};
}
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
o(o2, "_createForOfIteratorHelperLoose");
function a2(e, t) {
if (e) {
if (typeof e == "string") return ic(e, t);
var r = Object.prototype.toString.call(e).slice(8, -1);
if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set") return Array.from(e);
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return ic(e, t);
}
}
o(a2, "_unsupportedIterableToArray");
function ic(e, t) {
(t == null || t > e.length) && (t = e.length);
for (var r = 0, n = new Array(t); r < t; r++) n[r] = e[r];
return n;
}
o(ic, "_arrayLikeToArray");
function i2(e, t, r) {
if (t === void 0 && (t = "320px"), r === void 0 && (r = "1200px"), !Array.isArray(e) && typeof e != "object" || e === null)
throw new B(49);
if (Array.isArray(e)) {
for (var n = {}, a = {}, l = o2(e), c; !(c = l()).done; ) {
var s, f, u = c.value;
if (!u.prop || !u.fromSize || !u.toSize)
throw new B(50);
a[u.prop] = u.fromSize, n["@media (min-width: " + t + ")"] = ee.default({}, n["@media (min-width: " + t + ")"], (s = {}, s[u.prop] =
Ni(u.fromSize, u.toSize, t, r), s)), n["@media (min-width: " + r + ")"] = ee.default({}, n["@media (min-width: " + r + ")"], (f = {},
f[u.prop] = u.toSize, f));
}
return ee.default({}, a, n);
} else {
var d, p, h;
if (!e.prop || !e.fromSize || !e.toSize)
throw new B(51);
return h = {}, h[e.prop] = e.fromSize, h["@media (min-width: " + t + ")"] = (d = {}, d[e.prop] = Ni(e.fromSize, e.toSize, t, r), d), h["\
@media (min-width: " + r + ")"] = (p = {}, p[e.prop] = e.toSize, p), h;
}
}
o(i2, "fluidRange");
var l2 = /^\s*data:([a-z]+\/[a-z-]+(;[a-z-]+=[a-z-]+)?)?(;charset=[a-z0-9-]+)?(;base64)?,[a-z0-9!$&',()*+,;=\-._~:@/?%\s]*\s*$/i, s2 = {
woff: "woff",
woff2: "woff2",
ttf: "truetype",
otf: "opentype",
eot: "embedded-opentype",
svg: "svg",
svgz: "svg"
};
function lc(e, t) {
return t ? ' format("' + s2[e] + '")' : "";
}
o(lc, "generateFormatHint");
function c2(e) {
return !!e.replace(/\s+/g, " ").match(l2);
}
o(c2, "isDataURI");
function u2(e, t, r) {
if (c2(e))
return 'url("' + e + '")' + lc(t[0], r);
var n = t.map(function(a) {
return 'url("' + e + "." + a + '")' + lc(a, r);
});
return n.join(", ");
}
o(u2, "generateFileReferences");
function f2(e) {
var t = e.map(function(r) {
return 'local("' + r + '")';
});
return t.join(", ");
}
o(f2, "generateLocalReferences");
function d2(e, t, r, n) {
var a = [];
return t && a.push(f2(t)), e && a.push(u2(e, r, n)), a.join(", ");
}
o(d2, "generateSources");
function p2(e) {
var t = e.fontFamily, r = e.fontFilePath, n = e.fontStretch, a = e.fontStyle, l = e.fontVariant, c = e.fontWeight, s = e.fileFormats, f = s ===
void 0 ? ["eot", "woff2", "woff", "ttf", "svg"] : s, u = e.formatHint, d = u === void 0 ? !1 : u, p = e.localFonts, h = p === void 0 ? [
t] : p, w = e.unicodeRange, R = e.fontDisplay, g = e.fontVariationSettings, m = e.fontFeatureSettings;
if (!t) throw new B(55);
if (!r && !h)
throw new B(52);
if (h && !Array.isArray(h))
throw new B(53);
if (!Array.isArray(f))
throw new B(54);
var b = {
"@font-face": {
fontFamily: t,
src: d2(r, h, f, d),
unicodeRange: w,
fontStretch: n,
fontStyle: a,
fontVariant: l,
fontWeight: c,
fontDisplay: R,
fontVariationSettings: g,
fontFeatureSettings: m
}
};
return JSON.parse(JSON.stringify(b));
}
o(p2, "fontFace");
function h2() {
return {
textIndent: "101%",
overflow: "hidden",
whiteSpace: "nowrap"
};
}
o(h2, "hideText");
function m2() {
return {
border: "0",
clip: "rect(0 0 0 0)",
height: "1px",
margin: "-1px",
overflow: "hidden",
padding: "0",
position: "absolute",
whiteSpace: "nowrap",
width: "1px"
};
}
o(m2, "hideVisually");
function bc(e) {
return e === void 0 && (e = 1.3), `
@media only screen and (-webkit-min-device-pixel-ratio: ` + e + `),
only screen and (min--moz-device-pixel-ratio: ` + e + `),
only screen and (-o-min-device-pixel-ratio: ` + e + `/1),
only screen and (min-resolution: ` + Math.round(e * 96) + `dpi),
only screen and (min-resolution: ` + e + `dppx)
`;
}
o(bc, "hiDPI");
function yc(e) {
for (var t = "", r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), a = 1; a < r; a++)
n[a - 1] = arguments[a];
for (var l = 0; l < e.length; l += 1)
if (t += e[l], l === n.length - 1 && n[l]) {
var c = n.filter(function(s) {
return !!s;
});
c.length > 1 ? (t = t.slice(0, -1), t += ", " + n[l]) : c.length === 1 && (t += "" + n[l]);
} else n[l] && (t += n[l] + " ");
return t.trim();
}
o(yc, "constructGradientValue");
var sc;
function g2(e) {
var t = e.colorStops, r = e.fallback, n = e.toDirection, a = n === void 0 ? "" : n;
if (!t || t.length < 2)
throw new B(56);
return {
backgroundColor: r || t[0].replace(/,\s+/g, ",").split(" ")[0].replace(/,(?=\S)/g, ", "),
backgroundImage: yc(sc || (sc = hc.default(["linear-gradient(", "", ")"])), a, t.join(", ").replace(/,(?=\S)/g, ", "))
};
}
o(g2, "linearGradient");
function v2() {
var e;
return [(e = {
html: {
lineHeight: "1.15",
textSizeAdjust: "100%"
},
body: {
margin: "0"
},
main: {
display: "block"
},
h1: {
fontSize: "2em",
margin: "0.67em 0"
},
hr: {
boxSizing: "content-box",
height: "0",
overflow: "visible"
},
pre: {
fontFamily: "monospace, monospace",
fontSize: "1em"
},
a: {
backgroundColor: "transparent"
},
"abbr[title]": {
borderBottom: "none",
textDecoration: "underline"
}
}, e[`b,
strong`] = {
fontWeight: "bolder"
}, e[`code,
kbd,
samp`] = {
fontFamily: "monospace, monospace",
fontSize: "1em"
}, e.small = {
fontSize: "80%"
}, e[`sub,
sup`] = {
fontSize: "75%",
lineHeight: "0",
position: "relative",
verticalAlign: "baseline"
}, e.sub = {
bottom: "-0.25em"
}, e.sup = {
top: "-0.5em"
}, e.img = {
borderStyle: "none"
}, e[`button,
input,
optgroup,
select,
textarea`] = {
fontFamily: "inherit",
fontSize: "100%",
lineHeight: "1.15",
margin: "0"
}, e[`button,
input`] = {
overflow: "visible"
}, e[`button,
select`] = {
textTransform: "none"
}, e[`button,
html [type="button"],
[type="reset"],
[type="submit"]`] = {
WebkitAppearance: "button"
}, e[`button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner`] = {
borderStyle: "none",
padding: "0"
}, e[`button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring`] = {
outline: "1px dotted ButtonText"
}, e.fieldset = {
padding: "0.35em 0.625em 0.75em"
}, e.legend = {
boxSizing: "border-box",
color: "inherit",
display: "table",
maxWidth: "100%",
padding: "0",
whiteSpace: "normal"
}, e.progress = {
verticalAlign: "baseline"
}, e.textarea = {
overflow: "auto"
}, e[`[type="checkbox"],
[type="radio"]`] = {
boxSizing: "border-box",
padding: "0"
}, e[`[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button`] = {
height: "auto"
}, e['[type="search"]'] = {
WebkitAppearance: "textfield",
outlineOffset: "-2px"
}, e['[type="search"]::-webkit-search-decoration'] = {
WebkitAppearance: "none"
}, e["::-webkit-file-upload-button"] = {
WebkitAppearance: "button",
font: "inherit"
}, e.details = {
display: "block"
}, e.summary = {
display: "list-item"
}, e.template = {
display: "none"
}, e["[hidden]"] = {
display: "none"
}, e), {
"abbr[title]": {
textDecoration: "underline dotted"
}
}];
}
o(v2, "normalize");
var cc;
function w2(e) {
var t = e.colorStops, r = e.extent, n = r === void 0 ? "" : r, a = e.fallback, l = e.position, c = l === void 0 ? "" : l, s = e.shape, f = s ===
void 0 ? "" : s;
if (!t || t.length < 2)
throw new B(57);
return {
backgroundColor: a || t[0].split(" ")[0],
backgroundImage: yc(cc || (cc = hc.default(["radial-gradient(", "", "", "", ")"])), c, f, n, t.join(", "))
};
}
o(w2, "radialGradient");
function b2(e, t, r, n, a) {
var l;
if (r === void 0 && (r = "png"), a === void 0 && (a = "_2x"), !e)
throw new B(58);
var c = r.replace(/^\./, ""), s = n ? n + "." + c : "" + e + a + "." + c;
return l = {
backgroundImage: "url(" + e + "." + c + ")"
}, l[bc()] = ee.default({
backgroundImage: "url(" + s + ")"
}, t ? {
backgroundSize: t
} : {}), l;
}
o(b2, "retinaImage");
var y2 = {
easeInBack: "cubic-bezier(0.600, -0.280, 0.735, 0.045)",
easeInCirc: "cubic-bezier(0.600, 0.040, 0.980, 0.335)",
easeInCubic: "cubic-bezier(0.550, 0.055, 0.675, 0.190)",
easeInExpo: "cubic-bezier(0.950, 0.050, 0.795, 0.035)",
easeInQuad: "cubic-bezier(0.550, 0.085, 0.680, 0.530)",
easeInQuart: "cubic-bezier(0.895, 0.030, 0.685, 0.220)",
easeInQuint: "cubic-bezier(0.755, 0.050, 0.855, 0.060)",
easeInSine: "cubic-bezier(0.470, 0.000, 0.745, 0.715)",
easeOutBack: "cubic-bezier(0.175, 0.885, 0.320, 1.275)",
easeOutCubic: "cubic-bezier(0.215, 0.610, 0.355, 1.000)",
easeOutCirc: "cubic-bezier(0.075, 0.820, 0.165, 1.000)",
easeOutExpo: "cubic-bezier(0.190, 1.000, 0.220, 1.000)",
easeOutQuad: "cubic-bezier(0.250, 0.460, 0.450, 0.940)",
easeOutQuart: "cubic-bezier(0.165, 0.840, 0.440, 1.000)",
easeOutQuint: "cubic-bezier(0.230, 1.000, 0.320, 1.000)",
easeOutSine: "cubic-bezier(0.390, 0.575, 0.565, 1.000)",
easeInOutBack: "cubic-bezier(0.680, -0.550, 0.265, 1.550)",
easeInOutCirc: "cubic-bezier(0.785, 0.135, 0.150, 0.860)",
easeInOutCubic: "cubic-bezier(0.645, 0.045, 0.355, 1.000)",
easeInOutExpo: "cubic-bezier(1.000, 0.000, 0.000, 1.000)",
easeInOutQuad: "cubic-bezier(0.455, 0.030, 0.515, 0.955)",
easeInOutQuart: "cubic-bezier(0.770, 0.000, 0.175, 1.000)",
easeInOutQuint: "cubic-bezier(0.860, 0.000, 0.070, 1.000)",
easeInOutSine: "cubic-bezier(0.445, 0.050, 0.550, 0.950)"
};
function x2(e) {
return y2[e];
}
o(x2, "getTimingFunction");
function R2(e) {
return x2(e);
}
o(R2, "timingFunctions");
var E2 = /* @__PURE__ */ o(function(t, r, n) {
var a = "" + n[0] + (n[1] || ""), l = "" + n[0] / 2 + (n[1] || ""), c = "" + r[0] + (r[1] || ""), s = "" + r[0] / 2 + (r[1] || "");
switch (t) {
case "top":
return "0 " + l + " " + c + " " + l;
case "topLeft":
return a + " " + c + " 0 0";
case "left":
return s + " " + a + " " + s + " 0";
case "bottomLeft":
return a + " 0 0 " + c;
case "bottom":
return c + " " + l + " 0 " + l;
case "bottomRight":
return "0 0 " + a + " " + c;
case "right":
return s + " 0 " + s + " " + a;
case "topRight":
default:
return "0 " + a + " " + c + " 0";
}
}, "getBorderWidth"), S2 = /* @__PURE__ */ o(function(t, r) {
switch (t) {
case "top":
case "bottomRight":
return {
borderBottomColor: r
};
case "right":
case "bottomLeft":
return {
borderLeftColor: r
};
case "bottom":
case "topLeft":
return {
borderTopColor: r
};
case "left":
case "topRight":
return {
borderRightColor: r
};
default:
throw new B(59);
}
}, "getBorderColor");
function C2(e) {
var t = e.pointingDirection, r = e.height, n = e.width, a = e.foregroundColor, l = e.backgroundColor, c = l === void 0 ? "transparent" :
l, s = dt(n), f = dt(r);
if (isNaN(f[0]) || isNaN(s[0]))
throw new B(60);
return ee.default({
width: "0",
height: "0",
borderColor: c
}, S2(t, a), {
borderStyle: "solid",
borderWidth: E2(t, f, s)
});
}
o(C2, "triangle");
function I2(e) {
e === void 0 && (e = "break-word");
var t = e === "break-word" ? "break-all" : e;
return {
overflowWrap: e,
wordWrap: e,
wordBreak: t
};
}
o(I2, "wordWrap");
function ki(e) {
return Math.round(e * 255);
}
o(ki, "colorToInt");
function M2(e, t, r) {
return ki(e) + "," + ki(t) + "," + ki(r);
}
o(M2, "convertToInt");
function vn(e, t, r, n) {
if (n === void 0 && (n = M2), t === 0)
return n(r, r, r);
var a = (e % 360 + 360) % 360 / 60, l = (1 - Math.abs(2 * r - 1)) * t, c = l * (1 - Math.abs(a % 2 - 1)), s = 0, f = 0, u = 0;
a >= 0 && a < 1 ? (s = l, f = c) : a >= 1 && a < 2 ? (s = c, f = l) : a >= 2 && a < 3 ? (f = l, u = c) : a >= 3 && a < 4 ? (f = c, u = l) :
a >= 4 && a < 5 ? (s = c, u = l) : a >= 5 && a < 6 && (s = l, u = c);
var d = r - l / 2, p = s + d, h = f + d, w = u + d;
return n(p, h, w);
}
o(vn, "hslToRgb");
var uc = {
aliceblue: "f0f8ff",
antiquewhite: "faebd7",
aqua: "00ffff",
aquamarine: "7fffd4",
azure: "f0ffff",
beige: "f5f5dc",
bisque: "ffe4c4",
black: "000",
blanchedalmond: "ffebcd",
blue: "0000ff",
blueviolet: "8a2be2",
brown: "a52a2a",
burlywood: "deb887",
cadetblue: "5f9ea0",
chartreuse: "7fff00",
chocolate: "d2691e",
coral: "ff7f50",
cornflowerblue: "6495ed",
cornsilk: "fff8dc",
crimson: "dc143c",
cyan: "00ffff",
darkblue: "00008b",
darkcyan: "008b8b",
darkgoldenrod: "b8860b",
darkgray: "a9a9a9",
darkgreen: "006400",
darkgrey: "a9a9a9",
darkkhaki: "bdb76b",
darkmagenta: "8b008b",
darkolivegreen: "556b2f",
darkorange: "ff8c00",
darkorchid: "9932cc",
darkred: "8b0000",
darksalmon: "e9967a",
darkseagreen: "8fbc8f",
darkslateblue: "483d8b",
darkslategray: "2f4f4f",
darkslategrey: "2f4f4f",
darkturquoise: "00ced1",
darkviolet: "9400d3",
deeppink: "ff1493",
deepskyblue: "00bfff",
dimgray: "696969",
dimgrey: "696969",
dodgerblue: "1e90ff",
firebrick: "b22222",
floralwhite: "fffaf0",
forestgreen: "228b22",
fuchsia: "ff00ff",
gainsboro: "dcdcdc",
ghostwhite: "f8f8ff",
gold: "ffd700",
goldenrod: "daa520",
gray: "808080",
green: "008000",
greenyellow: "adff2f",
grey: "808080",
honeydew: "f0fff0",
hotpink: "ff69b4",
indianred: "cd5c5c",
indigo: "4b0082",
ivory: "fffff0",
khaki: "f0e68c",
lavender: "e6e6fa",
lavenderblush: "fff0f5",
lawngreen: "7cfc00",
lemonchiffon: "fffacd",
lightblue: "add8e6",
lightcoral: "f08080",
lightcyan: "e0ffff",
lightgoldenrodyellow: "fafad2",
lightgray: "d3d3d3",
lightgreen: "90ee90",
lightgrey: "d3d3d3",
lightpink: "ffb6c1",
lightsalmon: "ffa07a",
lightseagreen: "20b2aa",
lightskyblue: "87cefa",
lightslategray: "789",
lightslategrey: "789",
lightsteelblue: "b0c4de",
lightyellow: "ffffe0",
lime: "0f0",
limegreen: "32cd32",
linen: "faf0e6",
magenta: "f0f",
maroon: "800000",
mediumaquamarine: "66cdaa",
mediumblue: "0000cd",
mediumorchid: "ba55d3",
mediumpurple: "9370db",
mediumseagreen: "3cb371",
mediumslateblue: "7b68ee",
mediumspringgreen: "00fa9a",
mediumturquoise: "48d1cc",
mediumvioletred: "c71585",
midnightblue: "191970",
mintcream: "f5fffa",
mistyrose: "ffe4e1",
moccasin: "ffe4b5",
navajowhite: "ffdead",
navy: "000080",
oldlace: "fdf5e6",
olive: "808000",
olivedrab: "6b8e23",
orange: "ffa500",
orangered: "ff4500",
orchid: "da70d6",
palegoldenrod: "eee8aa",
palegreen: "98fb98",
paleturquoise: "afeeee",
palevioletred: "db7093",
papayawhip: "ffefd5",
peachpuff: "ffdab9",
peru: "cd853f",
pink: "ffc0cb",
plum: "dda0dd",
powderblue: "b0e0e6",
purple: "800080",
rebeccapurple: "639",
red: "f00",
rosybrown: "bc8f8f",
royalblue: "4169e1",
saddlebrown: "8b4513",
salmon: "fa8072",
sandybrown: "f4a460",
seagreen: "2e8b57",
seashell: "fff5ee",
sienna: "a0522d",
silver: "c0c0c0",
skyblue: "87ceeb",
slateblue: "6a5acd",
slategray: "708090",
slategrey: "708090",
snow: "fffafa",
springgreen: "00ff7f",
steelblue: "4682b4",
tan: "d2b48c",
teal: "008080",
thistle: "d8bfd8",
tomato: "ff6347",
turquoise: "40e0d0",
violet: "ee82ee",
wheat: "f5deb3",
white: "fff",
whitesmoke: "f5f5f5",
yellow: "ff0",
yellowgreen: "9acd32"
};
function A2(e) {
if (typeof e != "string") return e;
var t = e.toLowerCase();
return uc[t] ? "#" + uc[t] : e;
}
o(A2, "nameToHex");
var L2 = /^#[a-fA-F0-9]{6}$/, T2 = /^#[a-fA-F0-9]{8}$/, P2 = /^#[a-fA-F0-9]{3}$/, z2 = /^#[a-fA-F0-9]{4}$/, Oi = /^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i,
H2 = /^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i, k2 = /^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,
O2 = /^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
function Mt(e) {
if (typeof e != "string")
throw new B(3);
var t = A2(e);
if (t.match(L2))
return {
red: parseInt("" + t[1] + t[2], 16),
green: parseInt("" + t[3] + t[4], 16),
blue: parseInt("" + t[5] + t[6], 16)
};
if (t.match(T2)) {
var r = parseFloat((parseInt("" + t[7] + t[8], 16) / 255).toFixed(2));
return {
red: parseInt("" + t[1] + t[2], 16),
green: parseInt("" + t[3] + t[4], 16),
blue: parseInt("" + t[5] + t[6], 16),
alpha: r
};
}
if (t.match(P2))
return {
red: parseInt("" + t[1] + t[1], 16),
green: parseInt("" + t[2] + t[2], 16),
blue: parseInt("" + t[3] + t[3], 16)
};
if (t.match(z2)) {
var n = parseFloat((parseInt("" + t[4] + t[4], 16) / 255).toFixed(2));
return {
red: parseInt("" + t[1] + t[1], 16),
green: parseInt("" + t[2] + t[2], 16),
blue: parseInt("" + t[3] + t[3], 16),
alpha: n
};
}
var a = Oi.exec(t);
if (a)
return {
red: parseInt("" + a[1], 10),
green: parseInt("" + a[2], 10),
blue: parseInt("" + a[3], 10)
};
var l = H2.exec(t.substring(0, 50));
if (l)
return {
red: parseInt("" + l[1], 10),
green: parseInt("" + l[2], 10),
blue: parseInt("" + l[3], 10),
alpha: parseFloat("" + l[4]) > 1 ? parseFloat("" + l[4]) / 100 : parseFloat("" + l[4])
};
var c = k2.exec(t);
if (c) {
var s = parseInt("" + c[1], 10), f = parseInt("" + c[2], 10) / 100, u = parseInt("" + c[3], 10) / 100, d = "rgb(" + vn(s, f, u) + ")",
p = Oi.exec(d);
if (!p)
throw new B(4, t, d);
return {
red: parseInt("" + p[1], 10),
green: parseInt("" + p[2], 10),
blue: parseInt("" + p[3], 10)
};
}
var h = O2.exec(t.substring(0, 50));
if (h) {
var w = parseInt("" + h[1], 10), R = parseInt("" + h[2], 10) / 100, g = parseInt("" + h[3], 10) / 100, m = "rgb(" + vn(w, R, g) + ")",
b = Oi.exec(m);
if (!b)
throw new B(4, t, m);
return {
red: parseInt("" + b[1], 10),
green: parseInt("" + b[2], 10),
blue: parseInt("" + b[3], 10),
alpha: parseFloat("" + h[4]) > 1 ? parseFloat("" + h[4]) / 100 : parseFloat("" + h[4])
};
}
throw new B(5);
}
o(Mt, "parseToRgb");
function B2(e) {
var t = e.red / 255, r = e.green / 255, n = e.blue / 255, a = Math.max(t, r, n), l = Math.min(t, r, n), c = (a + l) / 2;
if (a === l)
return e.alpha !== void 0 ? {
hue: 0,
saturation: 0,
lightness: c,
alpha: e.alpha
} : {
hue: 0,
saturation: 0,
lightness: c
};
var s, f = a - l, u = c > 0.5 ? f / (2 - a - l) : f / (a + l);
switch (a) {
case t:
s = (r - n) / f + (r < n ? 6 : 0);
break;
case r:
s = (n - t) / f + 2;
break;
default:
s = (t - r) / f + 4;
break;
}
return s *= 60, e.alpha !== void 0 ? {
hue: s,
saturation: u,
lightness: c,
alpha: e.alpha
} : {
hue: s,
saturation: u,
lig