UNPKG

@storybook/core

Version:

Storybook framework-agnostic API

1,624 lines (1,540 loc) • 1.11 MB
"use strict"; var Sy = Object.create; var Zi = Object.defineProperty; var Ay = Object.getOwnPropertyDescriptor; var Ry = Object.getOwnPropertyNames; var Fy = Object.getPrototypeOf, ky = Object.prototype.hasOwnProperty; var o = (e, t) => Zi(e, "name", { value: t, configurable: !0 }); var Be = (e, t) => () => (e && (t = e(e = 0)), t); var Y = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), To = (e, t) => { for (var r in t) Zi(e, r, { get: t[r], enumerable: !0 }); }, zh = (e, t, r, n) => { if (t && typeof t == "object" || typeof t == "function") for (let l of Ry(t)) !ky.call(e, l) && l !== r && Zi(e, l, { get: () => t[l], enumerable: !(n = Ay(t, l)) || n.enumerable }); return e; }; var $ = (e, t, r) => (r = e != null ? Sy(Fy(e)) : {}, zh( // 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 ? Zi(r, "default", { value: e, enumerable: !0 }) : r, e )), gr = (e) => zh(Zi({}, "__esModule", { value: !0 }), e); // ../node_modules/@babel/runtime/helpers/extends.js var vu = Y((BM, gn) => { function h1() { return gn.exports = h1 = 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; }, gn.exports.__esModule = !0, gn.exports.default = gn.exports, h1.apply(null, arguments); } o(h1, "_extends"); gn.exports = h1, gn.exports.__esModule = !0, gn.exports.default = gn.exports; }); // ../node_modules/@babel/runtime/helpers/assertThisInitialized.js var Nh = Y((PM, Ki) => { function Iy(e) { if (e === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; } o(Iy, "_assertThisInitialized"); Ki.exports = Iy, Ki.exports.__esModule = !0, Ki.exports.default = Ki.exports; }); // ../node_modules/@babel/runtime/helpers/setPrototypeOf.js var wu = Y((HM, vn) => { function m1(e, t) { return vn.exports = m1 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, n) { return r.__proto__ = n, r; }, vn.exports.__esModule = !0, vn.exports.default = vn.exports, m1(e, t); } o(m1, "_setPrototypeOf"); vn.exports = m1, vn.exports.__esModule = !0, vn.exports.default = vn.exports; }); // ../node_modules/@babel/runtime/helpers/inheritsLoose.js var qh = Y((NM, Ji) => { var _y = wu(); function Ly(e, t) { e.prototype = Object.create(t.prototype), e.prototype.constructor = e, _y(e, t); } o(Ly, "_inheritsLoose"); Ji.exports = Ly, Ji.exports.__esModule = !0, Ji.exports.default = Ji.exports; }); // ../node_modules/@babel/runtime/helpers/getPrototypeOf.js var jh = Y((jM, wn) => { function g1(e) { return wn.exports = g1 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, wn.exports.__esModule = !0, wn.exports.default = wn.exports, g1(e); } o(g1, "_getPrototypeOf"); wn.exports = g1, wn.exports.__esModule = !0, wn.exports.default = wn.exports; }); // ../node_modules/@babel/runtime/helpers/isNativeFunction.js var Vh = Y(($M, Qi) => { function Ty(e) { try { return Function.toString.call(e).indexOf("[native code]") !== -1; } catch { return typeof e == "function"; } } o(Ty, "_isNativeFunction"); Qi.exports = Ty, Qi.exports.__esModule = !0, Qi.exports.default = Qi.exports; }); // ../node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js var Wh = Y((UM, bn) => { function $h() { try { var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() { })); } catch { } return (bn.exports = $h = /* @__PURE__ */ o(function() { return !!e; }, "_isNativeReflectConstruct"), bn.exports.__esModule = !0, bn.exports.default = bn.exports)(); } o($h, "_isNativeReflectConstruct"); bn.exports = $h, bn.exports.__esModule = !0, bn.exports.default = bn.exports; }); // ../node_modules/@babel/runtime/helpers/construct.js var Uh = Y((YM, el) => { var By = Wh(), My = wu(); function Py(e, t, r) { if (By()) return Reflect.construct.apply(null, arguments); var n = [null]; n.push.apply(n, t); var l = new (e.bind.apply(e, n))(); return r && My(l, r.prototype), l; } o(Py, "_construct"); el.exports = Py, el.exports.__esModule = !0, el.exports.default = el.exports; }); // ../node_modules/@babel/runtime/helpers/wrapNativeSuper.js var Gh = Y((ZM, yn) => { var Oy = jh(), Hy = wu(), zy = Vh(), Ny = Uh(); function v1(e) { var t = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0; return yn.exports = v1 = /* @__PURE__ */ o(function(n) { if (n === null || !zy(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, l); } function l() { return Ny(n, arguments, Oy(this).constructor); } return o(l, "Wrapper"), l.prototype = Object.create(n.prototype, { constructor: { value: l, enumerable: !1, writable: !0, configurable: !0 } }), Hy(l, n); }, "_wrapNativeSuper"), yn.exports.__esModule = !0, yn.exports.default = yn.exports, v1(e); } o(v1, "_wrapNativeSuper"); yn.exports = v1, yn.exports.__esModule = !0, yn.exports.default = yn.exports; }); // ../node_modules/@babel/runtime/helpers/taggedTemplateLiteralLoose.js var Yh = Y((JM, tl) => { function qy(e, t) { return t || (t = e.slice(0)), e.raw = t, e; } o(qy, "_taggedTemplateLiteralLoose"); tl.exports = qy, tl.exports.__esModule = !0, tl.exports.default = tl.exports; }); // ../node_modules/polished/dist/polished.cjs.js var Ia = Y((ne) => { "use strict"; Object.defineProperty(ne, "__esModule", { value: !0 }); var jy = vu(), Vy = Nh(), $y = qh(), Wy = Gh(), Uy = Yh(); function al(e) { return e && typeof e == "object" && "default" in e ? e : { default: e }; } o(al, "_interopDefaultLegacy"); var Je = /* @__PURE__ */ al(jy), Gy = /* @__PURE__ */ al(Vy), Yy = /* @__PURE__ */ al($y), Xy = /* @__PURE__ */ al(Wy), s5 = /* @__PURE__ */ al( Uy); function Xh() { var e; return e = arguments.length - 1, e < 0 || arguments.length <= e ? void 0 : arguments[e]; } o(Xh, "last"); function Zy(e) { return -e; } o(Zy, "negation"); function Ky(e, t) { return e + t; } o(Ky, "addition"); function Jy(e, t) { return e - t; } o(Jy, "subtraction"); function Qy(e, t) { return e * t; } o(Qy, "multiplication"); function e6(e, t) { return e / t; } o(e6, "division"); function t6() { return Math.max.apply(Math, arguments); } o(t6, "max"); function r6() { return Math.min.apply(Math, arguments); } o(r6, "min"); function n6() { return Array.of.apply(Array, arguments); } o(n6, "comma"); var o6 = { symbols: { "*": { infix: { symbol: "*", f: Qy, notation: "infix", precedence: 4, rightToLeft: 0, argCount: 2 }, symbol: "*", regSymbol: "\\*" }, "/": { infix: { symbol: "/", f: e6, notation: "infix", precedence: 4, rightToLeft: 0, argCount: 2 }, symbol: "/", regSymbol: "/" }, "+": { infix: { symbol: "+", f: Ky, notation: "infix", precedence: 2, rightToLeft: 0, argCount: 2 }, prefix: { symbol: "+", f: Xh, notation: "prefix", precedence: 3, rightToLeft: 0, argCount: 1 }, symbol: "+", regSymbol: "\\+" }, "-": { infix: { symbol: "-", f: Jy, notation: "infix", precedence: 2, rightToLeft: 0, argCount: 2 }, prefix: { symbol: "-", f: Zy, notation: "prefix", precedence: 3, rightToLeft: 0, argCount: 1 }, symbol: "-", regSymbol: "-" }, ",": { infix: { symbol: ",", f: n6, notation: "infix", precedence: 1, rightToLeft: 0, argCount: 2 }, symbol: ",", regSymbol: "," }, "(": { prefix: { symbol: "(", f: Xh, 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: r6, notation: "func", precedence: 0, rightToLeft: 0, argCount: 1 }, symbol: "min", regSymbol: "min\\b" }, max: { func: { symbol: "max", f: t6, notation: "func", precedence: 0, rightToLeft: 0, argCount: 1 }, symbol: "max", regSymbol: "max\\b" } } }, Zh = o6, a6 = { 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 i6() { for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++) t[r] = arguments[r]; var n = t[0], l = [], u; for (u = 1; u < t.length; u += 1) l.push(t[u]); return l.forEach(function(m) { n = n.replace(/%[a-z]/, m); }), n; } o(i6, "format"); var de = /* @__PURE__ */ function(e) { Yy.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 l = arguments.length, u = new Array(l > 1 ? l - 1 : 0), m = 1; m < l; m++) u[m - 1] = arguments[m]; n = e.call(this, i6.apply(void 0, [a6[r]].concat(u))) || this; } return Gy.default(n); } return o(t, "PolishedError"), t; }(/* @__PURE__ */ Xy.default(Error)), Kh = /((?!\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 l6(e) { var t = {}; return t.symbols = e ? Je.default({}, Zh.symbols, e.symbols) : Je.default({}, Zh.symbols), t; } o(l6, "mergeSymbolMaps"); function Jh(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(Jh, "exec"); function s6(e, t) { var r = l6(t), n, l = [r.symbols["("].prefix], u = [], m = new RegExp( // Pattern for numbers "\\d+(?:\\.\\d+)?|" + // ...and patterns for individual operators/function names Object.keys(r.symbols).map(function(R) { return r.symbols[R]; }).sort(function(R, _) { return _.symbol.length - R.symbol.length; }).map(function(R) { return R.regSymbol; }).join("|") + "|(\\S)", "g" ); m.lastIndex = 0; var h = !1; do { n = m.exec(e); var b = n || [")", void 0], w = b[0], C = b[1], E = r.symbols[w], S = E && !E.prefix && !E.func, L = !E || !E.postfix && !E.infix; if (C || (h ? L : S)) throw new de(37, n ? n.index : e.length, e); if (h) { var H = E.postfix || E.infix; do { var k = l[l.length - 1]; if ((H.precedence - k.precedence || k.rightToLeft) > 0) break; } while (Jh(l, u)); h = H.notation === "postfix", H.symbol !== ")" && (l.push(H), h && Jh(l, u)); } else if (E) { if (l.push(E.prefix || E.func), E.func && (n = m.exec(e), !n || n[0] !== "(")) throw new de(38, n ? n.index : e.length, e); } else u.push(+w), h = !0; } while (n && l.length); if (l.length) throw new de(39, n ? n.index : e.length, e); if (n) throw new de(40, n ? n.index : e.length, e); return u.pop(); } o(s6, "calculate"); function w1(e) { return e.split("").reverse().join(""); } o(w1, "reverseString"); function u6(e, t) { var r = w1(e), n = r.match(Kh); if (n && !n.every(function(u) { return u === n[0]; })) throw new de(41); var l = w1(r.replace(Kh, "")); return "" + s6(l, t) + (n ? w1(n[0]) : ""); } o(u6, "math"); var c6 = /--[\S]*/g; function p6(e, t) { if (!e || !e.match(c6)) throw new de(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 de(74); } o(p6, "cssVar"); function rl(e) { return e.charAt(0).toUpperCase() + e.slice(1); } o(rl, "capitalizeString"); var d6 = ["Top", "Right", "Bottom", "Left"]; function f6(e, t) { if (!e) return t.toLowerCase(); var r = e.split("-"); if (r.length > 1) return r.splice(1, 0, t), r.reduce(function(l, u) { return "" + l + rl(u); }); var n = e.replace(/([a-z])([A-Z])/g, "$1" + t + "$2"); return e === n ? "" + e + t : n; } o(f6, "generateProperty"); function h6(e, t) { for (var r = {}, n = 0; n < t.length; n += 1) (t[n] || t[n] === 0) && (r[f6(e, d6[n])] = t[n]); return r; } o(h6, "generateStyles"); function Jn(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 l = r[0], u = r[1], m = u === void 0 ? l : u, h = r[2], b = h === void 0 ? l : h, w = r[3], C = w === void 0 ? m : w, E = [l, m, b, C]; return h6(e, E); } o(Jn, "directionalProperty"); function Qh(e, t) { return e.substr(-t.length) === t; } o(Qh, "endsWith"); var m6 = /^([+-]?(?:\d+|\d*\.\d+))([a-z]*|%)$/; function x1(e) { if (typeof e != "string") return e; var t = e.match(m6); return t ? parseFloat(e) : e; } o(x1, "stripUnit"); var g6 = /* @__PURE__ */ o(function(t) { return function(r, n) { n === void 0 && (n = "16px"); var l = r, u = n; if (typeof r == "string") { if (!Qh(r, "px")) throw new de(69, t, r); l = x1(r); } if (typeof n == "string") { if (!Qh(n, "px")) throw new de(70, t, n); u = x1(n); } if (typeof l == "string") throw new de(71, r, t); if (typeof u == "string") throw new de(72, n, t); return "" + l / u + t; }; }, "pxtoFactory"), u5 = g6, v6 = /* @__PURE__ */ u5("em"), w6 = v6, b6 = /^([+-]?(?:\d+|\d*\.\d+))([a-z]*|%)$/; function Yr(e) { if (typeof e != "string") return [e, ""]; var t = e.match(b6); return t ? [parseFloat(e), t[2]] : [e, void 0]; } o(Yr, "getValueAndUnit"); function c5(e, t) { if (typeof e != "object" || e === null) throw new de(75, typeof e); var r = {}; return Object.keys(e).forEach(function(n) { typeof e[n] == "object" && e[n] !== null ? r[n] = c5(e[n], t) : !t || t && (t === n || t.indexOf(n) >= 0) ? r[n] = e[n] + " !important" : r[n] = e[n]; }), r; } o(c5, "important"); var p5 = { 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 y6(e) { return p5[e]; } o(y6, "getRatio"); function D6(e, t, r) { if (t === void 0 && (t = "1em"), r === void 0 && (r = 1.333), typeof e != "number") throw new de(42); if (typeof r == "string" && !p5[r]) throw new de(43); var n = typeof t == "string" ? Yr(t) : [t, ""], l = n[0], u = n[1], m = typeof r == "string" ? y6(r) : r; if (typeof l == "string") throw new de(44, t); return "" + l * Math.pow(m, e) + (u || ""); } o(D6, "modularScale"); var x6 = /* @__PURE__ */ u5("rem"), C6 = x6, C1 = 16; function d5(e) { var t = Yr(e); if (t[1] === "px") return parseFloat(e); if (t[1] === "%") return parseFloat(e) / 100 * C1; throw new de(78, t[1]); } o(d5, "convertBase"); function E6() { if (typeof document < "u" && document.documentElement !== null) { var e = getComputedStyle(document.documentElement).fontSize; return e ? d5(e) : C1; } return C1; } o(E6, "getBaseFromDoc"); function S6(e, t) { var r = Yr(e); if (r[1] !== "rem" && r[1] !== "") throw new de(77, r[1]); var n = t ? d5(t) : E6(); return r[0] * n + "px"; } o(S6, "remToPx"); var A6 = { 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 R6(e) { return A6[e.toLowerCase().trim()]; } o(R6, "easeIn"); var F6 = { 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 k6(e) { return F6[e.toLowerCase().trim()]; } o(k6, "easeInOut"); var I6 = { 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 _6(e) { return I6[e.toLowerCase().trim()]; } o(_6, "easeOut"); function E1(e, t, r, n) { r === void 0 && (r = "320px"), n === void 0 && (n = "1200px"); var l = Yr(e), u = l[0], m = l[1], h = Yr(t), b = h[0], w = h[1], C = Yr(r), E = C[0], S = C[1], L = Yr(n), H = L[0], k = L[1]; if (typeof E != "number" || typeof H != "number" || !S || !k || S !== k) throw new de(47); if (typeof u != "number" || typeof b != "number" || m !== w) throw new de(48); if (m !== S || w !== k) throw new de(76); var R = (u - b) / (E - H), _ = b - R * H; return "calc(" + _.toFixed(2) + (m || "") + " + " + (100 * R).toFixed(2) + "vw)"; } o(E1, "between"); function L6(e) { var t; e === void 0 && (e = "&"); var r = e + "::after"; return t = {}, t[r] = { clear: "both", content: '""', display: "table" }, t; } o(L6, "clearFix"); function T6(e) { return e === void 0 && (e = 0), { position: "absolute", top: e, right: e, bottom: e, left: e }; } o(T6, "cover"); function B6(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 ? Je.default({}, r, { WebkitBoxOrient: "vertical", WebkitLineClamp: t, display: "-webkit-box", whiteSpace: "normal" }) : r; } o(B6, "ellipsis"); function M6(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 = P6(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(M6, "_createForOfIteratorHelperLoose"); function P6(e, t) { if (e) { if (typeof e == "string") return e5(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 e5(e, t); } } o(P6, "_unsupportedIterableToArray"); function e5(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(e5, "_arrayLikeToArray"); function O6(e, t, r) { if (t === void 0 && (t = "320px"), r === void 0 && (r = "1200px"), !Array.isArray(e) && typeof e != "object" || e === null) throw new de(49); if (Array.isArray(e)) { for (var n = {}, l = {}, u = M6(e), m; !(m = u()).done; ) { var h, b, w = m.value; if (!w.prop || !w.fromSize || !w.toSize) throw new de(50); l[w.prop] = w.fromSize, n["@media (min-width: " + t + ")"] = Je.default({}, n["@media (min-width: " + t + ")"], (h = {}, h[w.prop] = E1(w.fromSize, w.toSize, t, r), h)), n["@media (min-width: " + r + ")"] = Je.default({}, n["@media (min-width: " + r + ")"], (b = {}, b[w.prop] = w.toSize, b)); } return Je.default({}, l, n); } else { var C, E, S; if (!e.prop || !e.fromSize || !e.toSize) throw new de(51); return S = {}, S[e.prop] = e.fromSize, S["@media (min-width: " + t + ")"] = (C = {}, C[e.prop] = E1(e.fromSize, e.toSize, t, r), C), S["\ @media (min-width: " + r + ")"] = (E = {}, E[e.prop] = e.toSize, E), S; } } o(O6, "fluidRange"); var H6 = /^\s*data:([a-z]+\/[a-z-]+(;[a-z-]+=[a-z-]+)?)?(;charset=[a-z0-9-]+)?(;base64)?,[a-z0-9!$&',()*+,;=\-._~:@/?%\s]*\s*$/i, z6 = { woff: "woff", woff2: "woff2", ttf: "truetype", otf: "opentype", eot: "embedded-opentype", svg: "svg", svgz: "svg" }; function t5(e, t) { return t ? ' format("' + z6[e] + '")' : ""; } o(t5, "generateFormatHint"); function N6(e) { return !!e.replace(/\s+/g, " ").match(H6); } o(N6, "isDataURI"); function q6(e, t, r) { if (N6(e)) return 'url("' + e + '")' + t5(t[0], r); var n = t.map(function(l) { return 'url("' + e + "." + l + '")' + t5(l, r); }); return n.join(", "); } o(q6, "generateFileReferences"); function j6(e) { var t = e.map(function(r) { return 'local("' + r + '")'; }); return t.join(", "); } o(j6, "generateLocalReferences"); function V6(e, t, r, n) { var l = []; return t && l.push(j6(t)), e && l.push(q6(e, r, n)), l.join(", "); } o(V6, "generateSources"); function $6(e) { var t = e.fontFamily, r = e.fontFilePath, n = e.fontStretch, l = e.fontStyle, u = e.fontVariant, m = e.fontWeight, h = e.fileFormats, b = h === void 0 ? ["eot", "woff2", "woff", "ttf", "svg"] : h, w = e.formatHint, C = w === void 0 ? !1 : w, E = e.localFonts, S = E === void 0 ? [ t] : E, L = e.unicodeRange, H = e.fontDisplay, k = e.fontVariationSettings, R = e.fontFeatureSettings; if (!t) throw new de(55); if (!r && !S) throw new de(52); if (S && !Array.isArray(S)) throw new de(53); if (!Array.isArray(b)) throw new de(54); var _ = { "@font-face": { fontFamily: t, src: V6(r, S, b, C), unicodeRange: L, fontStretch: n, fontStyle: l, fontVariant: u, fontWeight: m, fontDisplay: H, fontVariationSettings: k, fontFeatureSettings: R } }; return JSON.parse(JSON.stringify(_)); } o($6, "fontFace"); function W6() { return { textIndent: "101%", overflow: "hidden", whiteSpace: "nowrap" }; } o(W6, "hideText"); function U6() { return { border: "0", clip: "rect(0 0 0 0)", height: "1px", margin: "-1px", overflow: "hidden", padding: "0", position: "absolute", whiteSpace: "nowrap", width: "1px" }; } o(U6, "hideVisually"); function f5(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(f5, "hiDPI"); function h5(e) { for (var t = "", r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), l = 1; l < r; l++) n[l - 1] = arguments[l]; for (var u = 0; u < e.length; u += 1) if (t += e[u], u === n.length - 1 && n[u]) { var m = n.filter(function(h) { return !!h; }); m.length > 1 ? (t = t.slice(0, -1), t += ", " + n[u]) : m.length === 1 && (t += "" + n[u]); } else n[u] && (t += n[u] + " "); return t.trim(); } o(h5, "constructGradientValue"); var r5; function G6(e) { var t = e.colorStops, r = e.fallback, n = e.toDirection, l = n === void 0 ? "" : n; if (!t || t.length < 2) throw new de(56); return { backgroundColor: r || t[0].replace(/,\s+/g, ",").split(" ")[0].replace(/,(?=\S)/g, ", "), backgroundImage: h5(r5 || (r5 = s5.default(["linear-gradient(", "", ")"])), l, t.join(", ").replace(/,(?=\S)/g, ", ")) }; } o(G6, "linearGradient"); function Y6() { 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(Y6, "normalize"); var n5; function X6(e) { var t = e.colorStops, r = e.extent, n = r === void 0 ? "" : r, l = e.fallback, u = e.position, m = u === void 0 ? "" : u, h = e.shape, b = h === void 0 ? "" : h; if (!t || t.length < 2) throw new de(57); return { backgroundColor: l || t[0].split(" ")[0], backgroundImage: h5(n5 || (n5 = s5.default(["radial-gradient(", "", "", "", ")"])), m, b, n, t.join(", ")) }; } o(X6, "radialGradient"); function Z6(e, t, r, n, l) { var u; if (r === void 0 && (r = "png"), l === void 0 && (l = "_2x"), !e) throw new de(58); var m = r.replace(/^\./, ""), h = n ? n + "." + m : "" + e + l + "." + m; return u = { backgroundImage: "url(" + e + "." + m + ")" }, u[f5()] = Je.default({ backgroundImage: "url(" + h + ")" }, t ? { backgroundSize: t } : {}), u; } o(Z6, "retinaImage"); var K6 = { 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 J6(e) { return K6[e]; } o(J6, "getTimingFunction"); function Q6(e) { return J6(e); } o(Q6, "timingFunctions"); var e8 = /* @__PURE__ */ o(function(t, r, n) { var l = "" + n[0] + (n[1] || ""), u = "" + n[0] / 2 + (n[1] || ""), m = "" + r[0] + (r[1] || ""), h = "" + r[0] / 2 + (r[1] || ""); switch (t) { case "top": return "0 " + u + " " + m + " " + u; case "topLeft": return l + " " + m + " 0 0"; case "left": return h + " " + l + " " + h + " 0"; case "bottomLeft": return l + " 0 0 " + m; case "bottom": return m + " " + u + " 0 " + u; case "bottomRight": return "0 0 " + l + " " + m; case "right": return h + " 0 " + h + " " + l; case "topRight": default: return "0 " + l + " " + m + " 0"; } }, "getBorderWidth"), t8 = /* @__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 de(59); } }, "getBorderColor"); function r8(e) { var t = e.pointingDirection, r = e.height, n = e.width, l = e.foregroundColor, u = e.backgroundColor, m = u === void 0 ? "transparent" : u, h = Yr(n), b = Yr(r); if (isNaN(b[0]) || isNaN(h[0])) throw new de(60); return Je.default({ width: "0", height: "0", borderColor: m }, t8(t, l), { borderStyle: "solid", borderWidth: e8(t, b, h) }); } o(r8, "triangle"); function n8(e) { e === void 0 && (e = "break-word"); var t = e === "break-word" ? "break-all" : e; return { overflowWrap: e, wordWrap: e, wordBreak: t }; } o(n8, "wordWrap"); function b1(e) { return Math.round(e * 255); } o(b1, "colorToInt"); function o8(e, t, r) { return b1(e) + "," + b1(t) + "," + b1(r); } o(o8, "convertToInt"); function nl(e, t, r, n) { if (n === void 0 && (n = o8), t === 0) return n(r, r, r); var l = (e % 360 + 360) % 360 / 60, u = (1 - Math.abs(2 * r - 1)) * t, m = u * (1 - Math.abs(l % 2 - 1)), h = 0, b = 0, w = 0; l >= 0 && l < 1 ? (h = u, b = m) : l >= 1 && l < 2 ? (h = m, b = u) : l >= 2 && l < 3 ? (b = u, w = m) : l >= 3 && l < 4 ? (b = m, w = u) : l >= 4 && l < 5 ? (h = m, w = u) : l >= 5 && l < 6 && (h = u, w = m); var C = r - u / 2, E = h + C, S = b + C, L = w + C; return n(E, S, L); } o(nl, "hslToRgb"); var o5 = { 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 a8(e) { if (typeof e != "string") return e; var t = e.toLowerCase(); return o5[t] ? "#" + o5[t] : e; } o(a8, "nameToHex"); var i8 = /^#[a-fA-F0-9]{6}$/, l8 = /^#[a-fA-F0-9]{8}$/, s8 = /^#[a-fA-F0-9]{3}$/, u8 = /^#[a-fA-F0-9]{4}$/, y1 = /^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i, c8 = /^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i, p8 = /^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i, d8 = /^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 Dn(e) { if (typeof e != "string") throw new de(3); var t = a8(e); if (t.match(i8)) 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(l8)) { 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(s8)) 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(u8)) { 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 l = y1.exec(t); if (l) return { red: parseInt("" + l[1], 10), green: parseInt("" + l[2], 10), blue: parseInt("" + l[3], 10) }; var u = c8.exec(t.substring(0, 50)); if (u) return { red: parseInt("" + u[1], 10), green: parseInt("" + u[2], 10), blue: parseInt("" + u[3], 10), alpha: parseFloat("" + u[4]) > 1 ? parseFloat("" + u[4]) / 100 : parseFloat("" + u[4]) }; var m = p8.exec(t); if (m) { var h = parseInt("" + m[1], 10), b = parseInt("" + m[2], 10) / 100, w = parseInt("" + m[3], 10) / 100, C = "rgb(" + nl(h, b, w) + ")", E = y1.exec(C); if (!E) throw new de(4, t, C); return { red: parseInt("" + E[1], 10), green: parseInt("" + E[2], 10), blue: parseInt("" + E[3], 10) }; } var S = d8.exec(t.substring(0, 50)); if (S) { var L = parseInt("" + S[1], 10), H = parseInt("" + S[2], 10) / 100, k = parseInt("" + S[3], 10) / 100, R = "rgb(" + nl(L, H, k) + ")", _ = y1.exec(R); if (!_) throw new de(4, t, R); return { red: parseInt("" + _[1], 10), green: parseInt("" + _[2], 10), blue: parseInt("" + _[3], 10), alpha: parseFloat("" + S[4]) > 1 ? parseFloat("" + S[4]) / 100 : parseFloat("" + S[4]) }; } throw new de(5); } o(Dn, "parseToRgb"); function f8(e) { var t = e.red / 255, r = e.green / 255, n = e.blue / 255, l = Math.max(t, r, n), u = Math.min(t, r, n), m = (l + u) / 2; if (l === u) return e.alpha !== void 0 ? { hue: 0, saturation: 0, lightness: m, alpha: e.alpha } : { hue: 0, saturation: 0, lightness: m }; var h, b = l - u, w = m > 0.5 ? b / (2 - l - u) : b / (l + u); switch (l) { case t: h = (r - n) / b + (r < n ? 6 : 0); break; case r: h = (n - t) / b + 2; break; default: h = (t - r) / b + 4; break; } return h *= 60, e.alpha !== void 0 ? { hue: h, saturation: w, lightness: