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MJ,GAC5CI,EAAKP,GAAWG,GAAQW,CAC1B,OAXA,IAFAA,EAAWP,EAAKP,aAGPc,EAASX,IACX1mB,OAAOqU,KAAKgT,GAAUhmB,QAAQ,OAAOma,EAAIrb,KAAK2mB,eAN9CA,EAAKP,GAkBd,OAAOO,CAKT,CA6CA,SAASF,EAAaE,EAAMJ,EAAMY,GAChC,IAAIA,GAAaR,EAAKP,GAAtB,CACA,IAAIW,EAAYJ,EAAKP,KAAeO,EAAKP,GAAa,CAAC,GACvD,OAAOW,EAAUR,KAAUQ,EAAUR,GAAQ,GAFL,CAG1C,CA3IAU,EAAMd,EAAUrmB,WAEhBqmB,EAAUc,MAAQA,CA0InB,CAzJD,EAJA,SAASd,IACP,KAAMzkB,gBAAgBykB,GAAY,OAAO,IAAIA,CAC/C","sources":["../node_modules/@ctrl/tinycolor/dist/module/conversion.js","../node_modules/@ctrl/tinycolor/dist/module/css-color-names.js","../node_modules/@ctrl/tinycolor/dist/module/format-input.js","../node_modules/@ctrl/tinycolor/dist/module/index.js","../node_modules/@ctrl/tinycolor/dist/module/readability.js","../node_modules/@ctrl/tinycolor/dist/module/to-ms-filter.js","../node_modules/@ctrl/tinycolor/dist/module/from-ratio.js","../node_modules/@ctrl/tinycolor/dist/module/random.js","../node_modules/@ctrl/tinycolor/dist/module/public_api.js","../node_modules/@ctrl/tinycolor/dist/module/util.js","../node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js","../node_modules/@emotion/memoize/dist/emotion-memoize.esm.js","../node_modules/@emotion/stylis/dist/stylis.browser.esm.js","../node_modules/@emotion/unitless/dist/unitless.browser.esm.js","../node_modules/classnames/index.js","../node_modules/deepmerge/dist/cjs.js","../node_modules/dom-align/dist-web/index.js","../node_modules/event-lite/event-lite.js"],"sourcesContent":["import { bound01, pad2 } from './util'; // `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:\n// <http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript>\n\n/**\n * Handle bounds / percentage checking to conform to CSS color spec\n * <http://www.w3.org/TR/css3-color/>\n * *Assumes:* r, g, b in [0, 255] or [0, 1]\n * *Returns:* { r, g, b } in [0, 255]\n */\n\nexport function rgbToRgb(r, g, b) {\n  return {\n    r: bound01(r, 255) * 255,\n    g: bound01(g, 255) * 255,\n    b: bound01(b, 255) * 255\n  };\n}\n/**\n * Converts an RGB color value to HSL.\n * *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]\n * *Returns:* { h, s, l } in [0,1]\n */\n\nexport function rgbToHsl(r, g, b) {\n  r = bound01(r, 255);\n  g = bound01(g, 255);\n  b = bound01(b, 255);\n  var max = Math.max(r, g, b);\n  var min = Math.min(r, g, b);\n  var h = 0;\n  var s = 0;\n  var l = (max + min) / 2;\n\n  if (max === min) {\n    s = 0;\n    h = 0; // achromatic\n  } else {\n    var d = max - min;\n    s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n\n    switch (max) {\n      case r:\n        h = (g - b) / d + (g < b ? 6 : 0);\n        break;\n\n      case g:\n        h = (b - r) / d + 2;\n        break;\n\n      case b:\n        h = (r - g) / d + 4;\n        break;\n\n      default:\n        break;\n    }\n\n    h /= 6;\n  }\n\n  return {\n    h: h,\n    s: s,\n    l: l\n  };\n}\n\nfunction hue2rgb(p, q, t) {\n  if (t < 0) {\n    t += 1;\n  }\n\n  if (t > 1) {\n    t -= 1;\n  }\n\n  if (t < 1 / 6) {\n    return p + (q - p) * (6 * t);\n  }\n\n  if (t < 1 / 2) {\n    return q;\n  }\n\n  if (t < 2 / 3) {\n    return p + (q - p) * (2 / 3 - t) * 6;\n  }\n\n  return p;\n}\n/**\n * Converts an HSL color value to RGB.\n *\n * *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]\n * *Returns:* { r, g, b } in the set [0, 255]\n */\n\n\nexport function hslToRgb(h, s, l) {\n  var r;\n  var g;\n  var b;\n  h = bound01(h, 360);\n  s = bound01(s, 100);\n  l = bound01(l, 100);\n\n  if (s === 0) {\n    // achromatic\n    g = l;\n    b = l;\n    r = l;\n  } else {\n    var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n    var p = 2 * l - q;\n    r = hue2rgb(p, q, h + 1 / 3);\n    g = hue2rgb(p, q, h);\n    b = hue2rgb(p, q, h - 1 / 3);\n  }\n\n  return {\n    r: r * 255,\n    g: g * 255,\n    b: b * 255\n  };\n}\n/**\n * Converts an RGB color value to HSV\n *\n * *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]\n * *Returns:* { h, s, v } in [0,1]\n */\n\nexport function rgbToHsv(r, g, b) {\n  r = bound01(r, 255);\n  g = bound01(g, 255);\n  b = bound01(b, 255);\n  var max = Math.max(r, g, b);\n  var min = Math.min(r, g, b);\n  var h = 0;\n  var v = max;\n  var d = max - min;\n  var s = max === 0 ? 0 : d / max;\n\n  if (max === min) {\n    h = 0; // achromatic\n  } else {\n    switch (max) {\n      case r:\n        h = (g - b) / d + (g < b ? 6 : 0);\n        break;\n\n      case g:\n        h = (b - r) / d + 2;\n        break;\n\n      case b:\n        h = (r - g) / d + 4;\n        break;\n\n      default:\n        break;\n    }\n\n    h /= 6;\n  }\n\n  return {\n    h: h,\n    s: s,\n    v: v\n  };\n}\n/**\n * Converts an HSV color value to RGB.\n *\n * *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]\n * *Returns:* { r, g, b } in the set [0, 255]\n */\n\nexport function hsvToRgb(h, s, v) {\n  h = bound01(h, 360) * 6;\n  s = bound01(s, 100);\n  v = bound01(v, 100);\n  var i = Math.floor(h);\n  var f = h - i;\n  var p = v * (1 - s);\n  var q = v * (1 - f * s);\n  var t = v * (1 - (1 - f) * s);\n  var mod = i % 6;\n  var r = [v, q, p, p, t, v][mod];\n  var g = [t, v, v, q, p, p][mod];\n  var b = [p, p, t, v, v, q][mod];\n  return {\n    r: r * 255,\n    g: g * 255,\n    b: b * 255\n  };\n}\n/**\n * Converts an RGB color to hex\n *\n * Assumes r, g, and b are contained in the set [0, 255]\n * Returns a 3 or 6 character hex\n */\n\nexport function rgbToHex(r, g, b, allow3Char) {\n  var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))]; // Return a 3 character hex if possible\n\n  if (allow3Char && hex[0].startsWith(hex[0].charAt(1)) && hex[1].startsWith(hex[1].charAt(1)) && hex[2].startsWith(hex[2].charAt(1))) {\n    return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);\n  }\n\n  return hex.join('');\n}\n/**\n * Converts an RGBA color plus alpha transparency to hex\n *\n * Assumes r, g, b are contained in the set [0, 255] and\n * a in [0, 1]. Returns a 4 or 8 character rgba hex\n */\n// eslint-disable-next-line max-params\n\nexport function rgbaToHex(r, g, b, a, allow4Char) {\n  var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16)), pad2(convertDecimalToHex(a))]; // Return a 4 character hex if possible\n\n  if (allow4Char && hex[0].startsWith(hex[0].charAt(1)) && hex[1].startsWith(hex[1].charAt(1)) && hex[2].startsWith(hex[2].charAt(1)) && hex[3].startsWith(hex[3].charAt(1))) {\n    return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);\n  }\n\n  return hex.join('');\n}\n/**\n * Converts an RGBA color to an ARGB Hex8 string\n * Rarely used, but required for \"toFilter()\"\n */\n\nexport function rgbaToArgbHex(r, g, b, a) {\n  var hex = [pad2(convertDecimalToHex(a)), pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))];\n  return hex.join('');\n}\n/** Converts a decimal to a hex value */\n\nexport function convertDecimalToHex(d) {\n  return Math.round(parseFloat(d) * 255).toString(16);\n}\n/** Converts a hex value to a decimal */\n\nexport function convertHexToDecimal(h) {\n  return parseIntFromHex(h) / 255;\n}\n/** Parse a base-16 hex value into a base-10 integer */\n\nexport function parseIntFromHex(val) {\n  return parseInt(val, 16);\n}\nexport function numberInputToObject(color) {\n  return {\n    r: color >> 16,\n    g: (color & 0xff00) >> 8,\n    b: color & 0xff\n  };\n}","// https://github.com/bahamas10/css-color-names/blob/master/css-color-names.json\n\n/**\n * @hidden\n */\nexport var names = {\n  aliceblue: '#f0f8ff',\n  antiquewhite: '#faebd7',\n  aqua: '#00ffff',\n  aquamarine: '#7fffd4',\n  azure: '#f0ffff',\n  beige: '#f5f5dc',\n  bisque: '#ffe4c4',\n  black: '#000000',\n  blanchedalmond: '#ffebcd',\n  blue: '#0000ff',\n  blueviolet: '#8a2be2',\n  brown: '#a52a2a',\n  burlywood: '#deb887',\n  cadetblue: '#5f9ea0',\n  chartreuse: '#7fff00',\n  chocolate: '#d2691e',\n  coral: '#ff7f50',\n  cornflowerblue: '#6495ed',\n  cornsilk: '#fff8dc',\n  crimson: '#dc143c',\n  cyan: '#00ffff',\n  darkblue: '#00008b',\n  darkcyan: '#008b8b',\n  darkgoldenrod: '#b8860b',\n  darkgray: '#a9a9a9',\n  darkgreen: '#006400',\n  darkgrey: '#a9a9a9',\n  darkkhaki: '#bdb76b',\n  darkmagenta: '#8b008b',\n  darkolivegreen: '#556b2f',\n  darkorange: '#ff8c00',\n  darkorchid: '#9932cc',\n  darkred: '#8b0000',\n  darksalmon: '#e9967a',\n  darkseagreen: '#8fbc8f',\n  darkslateblue: '#483d8b',\n  darkslategray: '#2f4f4f',\n  darkslategrey: '#2f4f4f',\n  darkturquoise: '#00ced1',\n  darkviolet: '#9400d3',\n  deeppink: '#ff1493',\n  deepskyblue: '#00bfff',\n  dimgray: '#696969',\n  dimgrey: '#696969',\n  dodgerblue: '#1e90ff',\n  firebrick: '#b22222',\n  floralwhite: '#fffaf0',\n  forestgreen: '#228b22',\n  fuchsia: '#ff00ff',\n  gainsboro: '#dcdcdc',\n  ghostwhite: '#f8f8ff',\n  goldenrod: '#daa520',\n  gold: '#ffd700',\n  gray: '#808080',\n  green: '#008000',\n  greenyellow: '#adff2f',\n  grey: '#808080',\n  honeydew: '#f0fff0',\n  hotpink: '#ff69b4',\n  indianred: '#cd5c5c',\n  indigo: '#4b0082',\n  ivory: '#fffff0',\n  khaki: '#f0e68c',\n  lavenderblush: '#fff0f5',\n  lavender: '#e6e6fa',\n  lawngreen: '#7cfc00',\n  lemonchiffon: '#fffacd',\n  lightblue: '#add8e6',\n  lightcoral: '#f08080',\n  lightcyan: '#e0ffff',\n  lightgoldenrodyellow: '#fafad2',\n  lightgray: '#d3d3d3',\n  lightgreen: '#90ee90',\n  lightgrey: '#d3d3d3',\n  lightpink: '#ffb6c1',\n  lightsalmon: '#ffa07a',\n  lightseagreen: '#20b2aa',\n  lightskyblue: '#87cefa',\n  lightslategray: '#778899',\n  lightslategrey: '#778899',\n  lightsteelblue: '#b0c4de',\n  lightyellow: '#ffffe0',\n  lime: '#00ff00',\n  limegreen: '#32cd32',\n  linen: '#faf0e6',\n  magenta: '#ff00ff',\n  maroon: '#800000',\n  mediumaquamarine: '#66cdaa',\n  mediumblue: '#0000cd',\n  mediumorchid: '#ba55d3',\n  mediumpurple: '#9370db',\n  mediumseagreen: '#3cb371',\n  mediumslateblue: '#7b68ee',\n  mediumspringgreen: '#00fa9a',\n  mediumturquoise: '#48d1cc',\n  mediumvioletred: '#c71585',\n  midnightblue: '#191970',\n  mintcream: '#f5fffa',\n  mistyrose: '#ffe4e1',\n  moccasin: '#ffe4b5',\n  navajowhite: '#ffdead',\n  navy: '#000080',\n  oldlace: '#fdf5e6',\n  olive: '#808000',\n  olivedrab: '#6b8e23',\n  orange: '#ffa500',\n  orangered: '#ff4500',\n  orchid: '#da70d6',\n  palegoldenrod: '#eee8aa',\n  palegreen: '#98fb98',\n  paleturquoise: '#afeeee',\n  palevioletred: '#db7093',\n  papayawhip: '#ffefd5',\n  peachpuff: '#ffdab9',\n  peru: '#cd853f',\n  pink: '#ffc0cb',\n  plum: '#dda0dd',\n  powderblue: '#b0e0e6',\n  purple: '#800080',\n  rebeccapurple: '#663399',\n  red: '#ff0000',\n  rosybrown: '#bc8f8f',\n  royalblue: '#4169e1',\n  saddlebrown: '#8b4513',\n  salmon: '#fa8072',\n  sandybrown: '#f4a460',\n  seagreen: '#2e8b57',\n  seashell: '#fff5ee',\n  sienna: '#a0522d',\n  silver: '#c0c0c0',\n  skyblue: '#87ceeb',\n  slateblue: '#6a5acd',\n  slategray: '#708090',\n  slategrey: '#708090',\n  snow: '#fffafa',\n  springgreen: '#00ff7f',\n  steelblue: '#4682b4',\n  tan: '#d2b48c',\n  teal: '#008080',\n  thistle: '#d8bfd8',\n  tomato: '#ff6347',\n  turquoise: '#40e0d0',\n  violet: '#ee82ee',\n  wheat: '#f5deb3',\n  white: '#ffffff',\n  whitesmoke: '#f5f5f5',\n  yellow: '#ffff00',\n  yellowgreen: '#9acd32'\n};","import { convertHexToDecimal, hslToRgb, hsvToRgb, parseIntFromHex, rgbToRgb } from './conversion';\nimport { names } from './css-color-names';\nimport { boundAlpha, convertToPercentage } from './util';\n/**\n * Given a string or object, convert that input to RGB\n *\n * Possible string inputs:\n * ```\n * \"red\"\n * \"#f00\" or \"f00\"\n * \"#ff0000\" or \"ff0000\"\n * \"#ff000000\" or \"ff000000\"\n * \"rgb 255 0 0\" or \"rgb (255, 0, 0)\"\n * \"rgb 1.0 0 0\" or \"rgb (1, 0, 0)\"\n * \"rgba (255, 0, 0, 1)\" or \"rgba 255, 0, 0, 1\"\n * \"rgba (1.0, 0, 0, 1)\" or \"rgba 1.0, 0, 0, 1\"\n * \"hsl(0, 100%, 50%)\" or \"hsl 0 100% 50%\"\n * \"hsla(0, 100%, 50%, 1)\" or \"hsla 0 100% 50%, 1\"\n * \"hsv(0, 100%, 100%)\" or \"hsv 0 100% 100%\"\n * ```\n */\n\nexport function inputToRGB(color) {\n  var rgb = {\n    r: 0,\n    g: 0,\n    b: 0\n  };\n  var a = 1;\n  var s = null;\n  var v = null;\n  var l = null;\n  var ok = false;\n  var format = false;\n\n  if (typeof color === 'string') {\n    color = stringInputToObject(color);\n  }\n\n  if (typeof color === 'object') {\n    if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {\n      rgb = rgbToRgb(color.r, color.g, color.b);\n      ok = true;\n      format = String(color.r).substr(-1) === '%' ? 'prgb' : 'rgb';\n    } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {\n      s = convertToPercentage(color.s);\n      v = convertToPercentage(color.v);\n      rgb = hsvToRgb(color.h, s, v);\n      ok = true;\n      format = 'hsv';\n    } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {\n      s = convertToPercentage(color.s);\n      l = convertToPercentage(color.l);\n      rgb = hslToRgb(color.h, s, l);\n      ok = true;\n      format = 'hsl';\n    }\n\n    if (Object.prototype.hasOwnProperty.call(color, 'a')) {\n      a = color.a;\n    }\n  }\n\n  a = boundAlpha(a);\n  return {\n    ok: ok,\n    format: color.format || format,\n    r: Math.min(255, Math.max(rgb.r, 0)),\n    g: Math.min(255, Math.max(rgb.g, 0)),\n    b: Math.min(255, Math.max(rgb.b, 0)),\n    a: a\n  };\n} // <http://www.w3.org/TR/css3-values/#integers>\n\nvar CSS_INTEGER = '[-\\\\+]?\\\\d+%?'; // <http://www.w3.org/TR/css3-values/#number-value>\n\nvar CSS_NUMBER = '[-\\\\+]?\\\\d*\\\\.\\\\d+%?'; // Allow positive/negative integer/number.  Don't capture the either/or, just the entire outcome.\n\nvar CSS_UNIT = \"(?:\".concat(CSS_NUMBER, \")|(?:\").concat(CSS_INTEGER, \")\"); // Actual matching.\n// Parentheses and commas are optional, but not required.\n// Whitespace can take the place of commas or opening paren\n\nvar PERMISSIVE_MATCH3 = \"[\\\\s|\\\\(]+(\".concat(CSS_UNIT, \")[,|\\\\s]+(\").concat(CSS_UNIT, \")[,|\\\\s]+(\").concat(CSS_UNIT, \")\\\\s*\\\\)?\");\nvar PERMISSIVE_MATCH4 = \"[\\\\s|\\\\(]+(\".concat(CSS_UNIT, \")[,|\\\\s]+(\").concat(CSS_UNIT, \")[,|\\\\s]+(\").concat(CSS_UNIT, \")[,|\\\\s]+(\").concat(CSS_UNIT, \")\\\\s*\\\\)?\");\nvar matchers = {\n  CSS_UNIT: new RegExp(CSS_UNIT),\n  rgb: new RegExp('rgb' + PERMISSIVE_MATCH3),\n  rgba: new RegExp('rgba' + PERMISSIVE_MATCH4),\n  hsl: new RegExp('hsl' + PERMISSIVE_MATCH3),\n  hsla: new RegExp('hsla' + PERMISSIVE_MATCH4),\n  hsv: new RegExp('hsv' + PERMISSIVE_MATCH3),\n  hsva: new RegExp('hsva' + PERMISSIVE_MATCH4),\n  hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n  hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n  hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n  hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/\n};\n/**\n * Permissive string parsing.  Take in a number of formats, and output an object\n * based on detected format.  Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`\n */\n\nexport function stringInputToObject(color) {\n  color = color.trim().toLowerCase();\n\n  if (color.length === 0) {\n    return false;\n  }\n\n  var named = false;\n\n  if (names[color]) {\n    color = names[color];\n    named = true;\n  } else if (color === 'transparent') {\n    return {\n      r: 0,\n      g: 0,\n      b: 0,\n      a: 0,\n      format: 'name'\n    };\n  } // Try to match string input using regular expressions.\n  // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]\n  // Just return an object and let the conversion functions handle that.\n  // This way the result will be the same whether the tinycolor is initialized with string or object.\n\n\n  var match = matchers.rgb.exec(color);\n\n  if (match) {\n    return {\n      r: match[1],\n      g: match[2],\n      b: match[3]\n    };\n  }\n\n  match = matchers.rgba.exec(color);\n\n  if (match) {\n    return {\n      r: match[1],\n      g: match[2],\n      b: match[3],\n      a: match[4]\n    };\n  }\n\n  match = matchers.hsl.exec(color);\n\n  if (match) {\n    return {\n      h: match[1],\n      s: match[2],\n      l: match[3]\n    };\n  }\n\n  match = matchers.hsla.exec(color);\n\n  if (match) {\n    return {\n      h: match[1],\n      s: match[2],\n      l: match[3],\n      a: match[4]\n    };\n  }\n\n  match = matchers.hsv.exec(color);\n\n  if (match) {\n    return {\n      h: match[1],\n      s: match[2],\n      v: match[3]\n    };\n  }\n\n  match = matchers.hsva.exec(color);\n\n  if (match) {\n    return {\n      h: match[1],\n      s: match[2],\n      v: match[3],\n      a: match[4]\n    };\n  }\n\n  match = matchers.hex8.exec(color);\n\n  if (match) {\n    return {\n      r: parseIntFromHex(match[1]),\n      g: parseIntFromHex(match[2]),\n      b: parseIntFromHex(match[3]),\n      a: convertHexToDecimal(match[4]),\n      format: named ? 'name' : 'hex8'\n    };\n  }\n\n  match = matchers.hex6.exec(color);\n\n  if (match) {\n    return {\n      r: parseIntFromHex(match[1]),\n      g: parseIntFromHex(match[2]),\n      b: parseIntFromHex(match[3]),\n      format: named ? 'name' : 'hex'\n    };\n  }\n\n  match = matchers.hex4.exec(color);\n\n  if (match) {\n    return {\n      r: parseIntFromHex(match[1] + match[1]),\n      g: parseIntFromHex(match[2] + match[2]),\n      b: parseIntFromHex(match[3] + match[3]),\n      a: convertHexToDecimal(match[4] + match[4]),\n      format: named ? 'name' : 'hex8'\n    };\n  }\n\n  match = matchers.hex3.exec(color);\n\n  if (match) {\n    return {\n      r: parseIntFromHex(match[1] + match[1]),\n      g: parseIntFromHex(match[2] + match[2]),\n      b: parseIntFromHex(match[3] + match[3]),\n      format: named ? 'name' : 'hex'\n    };\n  }\n\n  return false;\n}\n/**\n * Check to see if it looks like a CSS unit\n * (see `matchers` above for definition).\n */\n\nexport function isValidCSSUnit(color) {\n  return Boolean(matchers.CSS_UNIT.exec(String(color)));\n}","import { numberInputToObject, rgbaToHex, rgbToHex, rgbToHsl, rgbToHsv } from './conversion';\nimport { names } from './css-color-names';\nimport { inputToRGB } from './format-input';\nimport { bound01, boundAlpha, clamp01 } from './util';\n\nvar TinyColor =\n/** @class */\nfunction () {\n  function TinyColor(color, opts) {\n    if (color === void 0) {\n      color = '';\n    }\n\n    if (opts === void 0) {\n      opts = {};\n    }\n\n    var _a; // If input is already a tinycolor, return itself\n\n\n    if (color instanceof TinyColor) {\n      // eslint-disable-next-line no-constructor-return\n      return color;\n    }\n\n    if (typeof color === 'number') {\n      color = numberInputToObject(color);\n    }\n\n    this.originalInput = color;\n    var rgb = inputToRGB(color);\n    this.originalInput = color;\n    this.r = rgb.r;\n    this.g = rgb.g;\n    this.b = rgb.b;\n    this.a = rgb.a;\n    this.roundA = Math.round(100 * this.a) / 100;\n    this.format = (_a = opts.format) !== null && _a !== void 0 ? _a : rgb.format;\n    this.gradientType = opts.gradientType; // Don't let the range of [0,255] come back in [0,1].\n    // Potentially lose a little bit of precision here, but will fix issues where\n    // .5 gets interpreted as half of the total, instead of half of 1\n    // If it was supposed to be 128, this was already taken care of by `inputToRgb`\n\n    if (this.r < 1) {\n      this.r = Math.round(this.r);\n    }\n\n    if (this.g < 1) {\n      this.g = Math.round(this.g);\n    }\n\n    if (this.b < 1) {\n      this.b = Math.round(this.b);\n    }\n\n    this.isValid = rgb.ok;\n  }\n\n  TinyColor.prototype.isDark = function () {\n    return this.getBrightness() < 128;\n  };\n\n  TinyColor.prototype.isLight = function () {\n    return !this.isDark();\n  };\n  /**\n   * Returns the perceived brightness of the color, from 0-255.\n   */\n\n\n  TinyColor.prototype.getBrightness = function () {\n    // http://www.w3.org/TR/AERT#color-contrast\n    var rgb = this.toRgb();\n    return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;\n  };\n  /**\n   * Returns the perceived luminance of a color, from 0-1.\n   */\n\n\n  TinyColor.prototype.getLuminance = function () {\n    // http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef\n    var rgb = this.toRgb();\n    var R;\n    var G;\n    var B;\n    var RsRGB = rgb.r / 255;\n    var GsRGB = rgb.g / 255;\n    var BsRGB = rgb.b / 255;\n\n    if (RsRGB <= 0.03928) {\n      R = RsRGB / 12.92;\n    } else {\n      // eslint-disable-next-line prefer-exponentiation-operator\n      R = Math.pow((RsRGB + 0.055) / 1.055, 2.4);\n    }\n\n    if (GsRGB <= 0.03928) {\n      G = GsRGB / 12.92;\n    } else {\n      // eslint-disable-next-line prefer-exponentiation-operator\n      G = Math.pow((GsRGB + 0.055) / 1.055, 2.4);\n    }\n\n    if (BsRGB <= 0.03928) {\n      B = BsRGB / 12.92;\n    } else {\n      // eslint-disable-next-line prefer-exponentiation-operator\n      B = Math.pow((BsRGB + 0.055) / 1.055, 2.4);\n    }\n\n    return 0.2126 * R + 0.7152 * G + 0.0722 * B;\n  };\n  /**\n   * Returns the alpha value of a color, from 0-1.\n   */\n\n\n  TinyColor.prototype.getAlpha = function () {\n    return this.a;\n  };\n  /**\n   * Sets the alpha value on the current color.\n   *\n   * @param alpha - The new alpha value. The accepted range is 0-1.\n   */\n\n\n  TinyColor.prototype.setAlpha = function (alpha) {\n    this.a = boundAlpha(alpha);\n    this.roundA = Math.round(100 * this.a) / 100;\n    return this;\n  };\n  /**\n   * Returns the object as a HSVA object.\n   */\n\n\n  TinyColor.prototype.toHsv = function () {\n    var hsv = rgbToHsv(this.r, this.g, this.b);\n    return {\n      h: hsv.h * 360,\n      s: hsv.s,\n      v: hsv.v,\n      a: this.a\n    };\n  };\n  /**\n   * Returns the hsva values interpolated into a string with the following format:\n   * \"hsva(xxx, xxx, xxx, xx)\".\n   */\n\n\n  TinyColor.prototype.toHsvString = function () {\n    var hsv = rgbToHsv(this.r, this.g, this.b);\n    var h = Math.round(hsv.h * 360);\n    var s = Math.round(hsv.s * 100);\n    var v = Math.round(hsv.v * 100);\n    return this.a === 1 ? \"hsv(\".concat(h, \", \").concat(s, \"%, \").concat(v, \"%)\") : \"hsva(\".concat(h, \", \").concat(s, \"%, \").concat(v, \"%, \").concat(this.roundA, \")\");\n  };\n  /**\n   * Returns the object as a HSLA object.\n   */\n\n\n  TinyColor.prototype.toHsl = function () {\n    var hsl = rgbToHsl(this.r, this.g, this.b);\n    return {\n      h: hsl.h * 360,\n      s: hsl.s,\n      l: hsl.l,\n      a: this.a\n    };\n  };\n  /**\n   * Returns the hsla values interpolated into a string with the following format:\n   * \"hsla(xxx, xxx, xxx, xx)\".\n   */\n\n\n  TinyColor.prototype.toHslString = function () {\n    var hsl = rgbToHsl(this.r, this.g, this.b);\n    var h = Math.round(hsl.h * 360);\n    var s = Math.round(hsl.s * 100);\n    var l = Math.round(hsl.l * 100);\n    return this.a === 1 ? \"hsl(\".concat(h, \", \").concat(s, \"%, \").concat(l, \"%)\") : \"hsla(\".concat(h, \", \").concat(s, \"%, \").concat(l, \"%, \").concat(this.roundA, \")\");\n  };\n  /**\n   * Returns the hex value of the color.\n   * @param allow3Char will shorten hex value to 3 char if possible\n   */\n\n\n  TinyColor.prototype.toHex = function (allow3Char) {\n    if (allow3Char === void 0) {\n      allow3Char = false;\n    }\n\n    return rgbToHex(this.r, this.g, this.b, allow3Char);\n  };\n  /**\n   * Returns the hex value of the color -with a # appened.\n   * @param allow3Char will shorten hex value to 3 char if possible\n   */\n\n\n  TinyColor.prototype.toHexString = function (allow3Char) {\n    if (allow3Char === void 0) {\n      allow3Char = false;\n    }\n\n    return '#' + this.toHex(allow3Char);\n  };\n  /**\n   * Returns the hex 8 value of the color.\n   * @param allow4Char will shorten hex value to 4 char if possible\n   */\n\n\n  TinyColor.prototype.toHex8 = function (allow4Char) {\n    if (allow4Char === void 0) {\n      allow4Char = false;\n    }\n\n    return rgbaToHex(this.r, this.g, this.b, this.a, allow4Char);\n  };\n  /**\n   * Returns the hex 8 value of the color -with a # appened.\n   * @param allow4Char will shorten hex value to 4 char if possible\n   */\n\n\n  TinyColor.prototype.toHex8String = function (allow4Char) {\n    if (allow4Char === void 0) {\n      allow4Char = false;\n    }\n\n    return '#' + this.toHex8(allow4Char);\n  };\n  /**\n   * Returns the object as a RGBA object.\n   */\n\n\n  TinyColor.prototype.toRgb = function () {\n    return {\n      r: Math.round(this.r),\n      g: Math.round(this.g),\n      b: Math.round(this.b),\n      a: this.a\n    };\n  };\n  /**\n   * Returns the RGBA values interpolated into a string with the following format:\n   * \"RGBA(xxx, xxx, xxx, xx)\".\n   */\n\n\n  TinyColor.prototype.toRgbString = function () {\n    var r = Math.round(this.r);\n    var g = Math.round(this.g);\n    var b = Math.round(this.b);\n    return this.a === 1 ? \"rgb(\".concat(r, \", \").concat(g, \", \").concat(b, \")\") : \"rgba(\".concat(r, \", \").concat(g, \", \").concat(b, \", \").concat(this.roundA, \")\");\n  };\n  /**\n   * Returns the object as a RGBA object.\n   */\n\n\n  TinyColor.prototype.toPercentageRgb = function () {\n    var fmt = function fmt(x) {\n      return \"\".concat(Math.round(bound01(x, 255) * 100), \"%\");\n    };\n\n    return {\n      r: fmt(this.r),\n      g: fmt(this.g),\n      b: fmt(this.b),\n      a: this.a\n    };\n  };\n  /**\n   * Returns the RGBA relative values interpolated into a string\n   */\n\n\n  TinyColor.prototype.toPercentageRgbString = function () {\n    var rnd = function rnd(x) {\n      return Math.round(bound01(x, 255) * 100);\n    };\n\n    return this.a === 1 ? \"rgb(\".concat(rnd(this.r), \"%, \").concat(rnd(this.g), \"%, \").concat(rnd(this.b), \"%)\") : \"rgba(\".concat(rnd(this.r), \"%, \").concat(rnd(this.g), \"%, \").concat(rnd(this.b), \"%, \").concat(this.roundA, \")\");\n  };\n  /**\n   * The 'real' name of the color -if there is one.\n   */\n\n\n  TinyColor.prototype.toName = function () {\n    if (this.a === 0) {\n      return 'transparent';\n    }\n\n    if (this.a < 1) {\n      return false;\n    }\n\n    var hex = '#' + rgbToHex(this.r, this.g, this.b, false);\n\n    for (var _i = 0, _a = Object.entries(names); _i < _a.length; _i++) {\n      var _b = _a[_i],\n          key = _b[0],\n          value = _b[1];\n\n      if (hex === value) {\n        return key;\n      }\n    }\n\n    return false;\n  };\n\n  TinyColor.prototype.toString = function (format) {\n    var formatSet = Boolean(format);\n    format = format !== null && format !== void 0 ? format : this.format;\n    var formattedString = false;\n    var hasAlpha = this.a < 1 && this.a >= 0;\n    var needsAlphaFormat = !formatSet && hasAlpha && (format.startsWith('hex') || format === 'name');\n\n    if (needsAlphaFormat) {\n      // Special case for \"transparent\", all other non-alpha formats\n      // will return rgba when there is transparency.\n      if (format === 'name' && this.a === 0) {\n        return this.toName();\n      }\n\n      return this.toRgbString();\n    }\n\n    if (format === 'rgb') {\n      formattedString = this.toRgbString();\n    }\n\n    if (format === 'prgb') {\n      formattedString = this.toPercentageRgbString();\n    }\n\n    if (format === 'hex' || format === 'hex6') {\n      formattedString = this.toHexString();\n    }\n\n    if (format === 'hex3') {\n      formattedString = this.toHexString(true);\n    }\n\n    if (format === 'hex4') {\n      formattedString = this.toHex8String(true);\n    }\n\n    if (format === 'hex8') {\n      formattedString = this.toHex8String();\n    }\n\n    if (format === 'name') {\n      formattedString = this.toName();\n    }\n\n    if (format === 'hsl') {\n      formattedString = this.toHslString();\n    }\n\n    if (format === 'hsv') {\n      formattedString = this.toHsvString();\n    }\n\n    return formattedString || this.toHexString();\n  };\n\n  TinyColor.prototype.toNumber = function () {\n    return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);\n  };\n\n  TinyColor.prototype.clone = function () {\n    return new TinyColor(this.toString());\n  };\n  /**\n   * Lighten the color a given amount. Providing 100 will always return white.\n   * @param amount - valid between 1-100\n   */\n\n\n  TinyColor.prototype.lighten = function (amount) {\n    if (amount === void 0) {\n      amount = 10;\n    }\n\n    var hsl = this.toHsl();\n    hsl.l += amount / 100;\n    hsl.l = clamp01(hsl.l);\n    return new TinyColor(hsl);\n  };\n  /**\n   * Brighten the color a given amount, from 0 to 100.\n   * @param amount - valid between 1-100\n   */\n\n\n  TinyColor.prototype.brighten = function (amount) {\n    if (amount === void 0) {\n      amount = 10;\n    }\n\n    var rgb = this.toRgb();\n    rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100))));\n    rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100))));\n    rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100))));\n    return new TinyColor(rgb);\n  };\n  /**\n   * Darken the color a given amount, from 0 to 100.\n   * Providing 100 will always return black.\n   * @param amount - valid between 1-100\n   */\n\n\n  TinyColor.prototype.darken = function (amount) {\n    if (amount === void 0) {\n      amount = 10;\n    }\n\n    var hsl = this.toHsl();\n    hsl.l -= amount / 100;\n    hsl.l = clamp01(hsl.l);\n    return new TinyColor(hsl);\n  };\n  /**\n   * Mix the color with pure white, from 0 to 100.\n   * Providing 0 will do nothing, providing 100 will always return white.\n   * @param amount - valid between 1-100\n   */\n\n\n  TinyColor.prototype.tint = function (amount) {\n    if (amount === void 0) {\n      amount = 10;\n    }\n\n    return this.mix('white', amount);\n  };\n  /**\n   * Mix the color with pure black, from 0 to 100.\n   * Providing 0 will do nothing, providing 100 will always return black.\n   * @param amount - valid between 1-100\n   */\n\n\n  TinyColor.prototype.shade = function (amount) {\n    if (amount === void 0) {\n      amount = 10;\n    }\n\n    return this.mix('black', amount);\n  };\n  /**\n   * Desaturate the color a given amount, from 0 to 100.\n   * Providing 100 will is the same as calling greyscale\n   * @param amount - valid between 1-100\n   */\n\n\n  TinyColor.prototype.desaturate = function (amount) {\n    if (amount === void 0) {\n      amount = 10;\n    }\n\n    var hsl = this.toHsl();\n    hsl.s -= amount / 100;\n    hsl.s = clamp01(hsl.s);\n    return new TinyColor(hsl);\n  };\n  /**\n   * Saturate the color a given amount, from 0 to 100.\n   * @param amount - valid between 1-100\n   */\n\n\n  TinyColor.prototype.saturate = function (amount) {\n    if (amount === void 0) {\n      amount = 10;\n    }\n\n    var hsl = this.toHsl();\n    hsl.s += amount / 100;\n    hsl.s = clamp01(hsl.s);\n    return new TinyColor(hsl);\n  };\n  /**\n   * Completely desaturates a color into greyscale.\n   * Same as calling `desaturate(100)`\n   */\n\n\n  TinyColor.prototype.greyscale = function () {\n    return this.desaturate(100);\n  };\n  /**\n   * Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.\n   * Values outside of this range will be wrapped into this range.\n   */\n\n\n  TinyColor.prototype.spin = function (amount) {\n    var hsl = this.toHsl();\n    var hue = (hsl.h + amount) % 360;\n    hsl.h = hue < 0 ? 360 + hue : hue;\n    return new TinyColor(hsl);\n  };\n  /**\n   * Mix the current color a given amount with another color, from 0 to 100.\n   * 0 means no mixing (return current color).\n   */\n\n\n  TinyColor.prototype.mix = function (color, amount) {\n    if (amount === void 0) {\n      amount = 50;\n    }\n\n    var rgb1 = this.toRgb();\n    var rgb2 = new TinyColor(color).toRgb();\n    var p = amount / 100;\n    var rgba = {\n      r: (rgb2.r - rgb1.r) * p + rgb1.r,\n      g: (rgb2.g - rgb1.g) * p + rgb1.g,\n      b: (rgb2.b - rgb1.b) * p + rgb1.b,\n      a: (rgb2.a - rgb1.a) * p + rgb1.a\n    };\n    return new TinyColor(rgba);\n  };\n\n  TinyColor.prototype.analogous = function (results, slices) {\n    if (results === void 0) {\n      results = 6;\n    }\n\n    if (slices === void 0) {\n      slices = 30;\n    }\n\n    var hsl = this.toHsl();\n    var part = 360 / slices;\n    var ret = [this];\n\n    for (hsl.h = (hsl.h - (part * results >> 1) + 720) % 360; --results;) {\n      hsl.h = (hsl.h + part) % 360;\n      ret.push(new TinyColor(hsl));\n    }\n\n    return ret;\n  };\n  /**\n   * taken from https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js\n   */\n\n\n  TinyColor.prototype.complement = function () {\n    var hsl = this.toHsl();\n    hsl.h = (hsl.h + 180) % 360;\n    return new TinyColor(hsl);\n  };\n\n  TinyColor.prototype.monochromatic = function (results) {\n    if (results === void 0) {\n      results = 6;\n    }\n\n    var hsv = this.toHsv();\n    var h = hsv.h;\n    var s = hsv.s;\n    var v = hsv.v;\n    var res = [];\n    var modification = 1 / results;\n\n    while (results--) {\n      res.push(new TinyColor({\n        h: h,\n        s: s,\n        v: v\n      }));\n      v = (v + modification) % 1;\n    }\n\n    return res;\n  };\n\n  TinyColor.prototype.splitcomplement = function () {\n    var hsl = this.toHsl();\n    var h = hsl.h;\n    return [this, new TinyColor({\n      h: (h + 72) % 360,\n      s: hsl.s,\n      l: hsl.l\n    }), new TinyColor({\n      h: (h + 216) % 360,\n      s: hsl.s,\n      l: hsl.l\n    })];\n  };\n  /**\n   * Compute how the color would appear on a background\n   */\n\n\n  TinyColor.prototype.onBackground = function (background) {\n    var fg = this.toRgb();\n    var bg = new TinyColor(background).toRgb();\n    return new TinyColor({\n      r: bg.r + (fg.r - bg.r) * fg.a,\n      g: bg.g + (fg.g - bg.g) * fg.a,\n      b: bg.b + (fg.b - bg.b) * fg.a\n    });\n  };\n  /**\n   * Alias for `polyad(3)`\n   */\n\n\n  TinyColor.prototype.triad = function () {\n    return this.polyad(3);\n  };\n  /**\n   * Alias for `polyad(4)`\n   */\n\n\n  TinyColor.prototype.tetrad = function () {\n    return this.polyad(4);\n  };\n  /**\n   * Get polyad colors, like (for 1, 2, 3, 4, 5, 6, 7, 8, etc...)\n   * monad, dyad, triad, tetrad, pentad, hexad, heptad, octad, etc...\n   */\n\n\n  TinyColor.prototype.polyad = function (n) {\n    var hsl = this.toHsl();\n    var h = hsl.h;\n    var result = [this];\n    var increment = 360 / n;\n\n    for (var i = 1; i < n; i++) {\n      result.push(new TinyColor({\n        h: (h + i * increment) % 360,\n        s: hsl.s,\n        l: hsl.l\n      }));\n    }\n\n    return result;\n  };\n  /**\n   * compare color vs current color\n   */\n\n\n  TinyColor.prototype.equals = function (color) {\n    return this.toRgbString() === new TinyColor(color).toRgbString();\n  };\n\n  return TinyColor;\n}();\n\nexport { TinyColor }; // kept for backwards compatability with v1\n\nexport function tinycolor(color, opts) {\n  if (color === void 0) {\n    color = '';\n  }\n\n  if (opts === void 0) {\n    opts = {};\n  }\n\n  return new TinyColor(color, opts);\n}","import { TinyColor } from './index'; // Readability Functions\n// ---------------------\n// <http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef (WCAG Version 2)\n\n/**\n * AKA `contrast`\n *\n * Analyze the 2 colors and returns the color contrast defined by (WCAG Version 2)\n */\n\nexport function readability(color1, color2) {\n  var c1 = new TinyColor(color1);\n  var c2 = new TinyColor(color2);\n  return (Math.max(c1.getLuminance(), c2.getLuminance()) + 0.05) / (Math.min(c1.getLuminance(), c2.getLuminance()) + 0.05);\n}\n/**\n * Ensure that foreground and background color combinations meet WCAG2 guidelines.\n * The third argument is an object.\n *      the 'level' property states 'AA' or 'AAA' - if missing or invalid, it defaults to 'AA';\n *      the 'size' property states 'large' or 'small' - if missing or invalid, it defaults to 'small'.\n * If the entire object is absent, isReadable defaults to {level:\"AA\",size:\"small\"}.\n *\n * Example\n * ```ts\n * new TinyColor().isReadable('#000', '#111') => false\n * new TinyColor().isReadable('#000', '#111', { level: 'AA', size: 'large' }) => false\n * ```\n */\n\nexport function isReadable(color1, color2, wcag2) {\n  var _a, _b;\n\n  if (wcag2 === void 0) {\n    wcag2 = {\n      level: 'AA',\n      size: 'small'\n    };\n  }\n\n  var readabilityLevel = readability(color1, color2);\n\n  switch (((_a = wcag2.level) !== null && _a !== void 0 ? _a : 'AA') + ((_b = wcag2.size) !== null && _b !== void 0 ? _b : 'small')) {\n    case 'AAsmall':\n    case 'AAAlarge':\n      return readabilityLevel >= 4.5;\n\n    case 'AAlarge':\n      return readabilityLevel >= 3;\n\n    case 'AAAsmall':\n      return readabilityLevel >= 7;\n\n    default:\n      return false;\n  }\n}\n/**\n * Given a base color and a list of possible foreground or background\n * colors for that base, returns the most readable color.\n * Optionally returns Black or White if the most readable color is unreadable.\n *\n * @param baseColor - the base color.\n * @param colorList - array of colors to pick the most readable one from.\n * @param args - and object with extra arguments\n *\n * Example\n * ```ts\n * new TinyColor().mostReadable('#123', ['#124\", \"#125'], { includeFallbackColors: false }).toHexString(); // \"#112255\"\n * new TinyColor().mostReadable('#123', ['#124\", \"#125'],{ includeFallbackColors: true }).toHexString();  // \"#ffffff\"\n * new TinyColor().mostReadable('#a8015a', [\"#faf3f3\"], { includeFallbackColors:true, level: 'AAA', size: 'large' }).toHexString(); // \"#faf3f3\"\n * new TinyColor().mostReadable('#a8015a', [\"#faf3f3\"], { includeFallbackColors:true, level: 'AAA', size: 'small' }).toHexString(); // \"#ffffff\"\n * ```\n */\n\nexport function mostReadable(baseColor, colorList, args) {\n  if (args === void 0) {\n    args = {\n      includeFallbackColors: false,\n      level: 'AA',\n      size: 'small'\n    };\n  }\n\n  var bestColor = null;\n  var bestScore = 0;\n  var includeFallbackColors = args.includeFallbackColors,\n      level = args.level,\n      size = args.size;\n\n  for (var _i = 0, colorList_1 = colorList; _i < colorList_1.length; _i++) {\n    var color = colorList_1[_i];\n    var score = readability(baseColor, color);\n\n    if (score > bestScore) {\n      bestScore = score;\n      bestColor = new TinyColor(color);\n    }\n  }\n\n  if (isReadable(baseColor, bestColor, {\n    level: level,\n    size: size\n  }) || !includeFallbackColors) {\n    return bestColor;\n  }\n\n  args.includeFallbackColors = false;\n  return mostReadable(baseColor, ['#fff', '#000'], args);\n}","import { rgbaToArgbHex } from './conversion';\nimport { TinyColor } from './index';\n/**\n * Returns the color represented as a Microsoft filter for use in old versions of IE.\n */\n\nexport function toMsFilter(firstColor, secondColor) {\n  var color = new TinyColor(firstColor);\n  var hex8String = '#' + rgbaToArgbHex(color.r, color.g, color.b, color.a);\n  var secondHex8String = hex8String;\n  var gradientType = color.gradientType ? 'GradientType = 1, ' : '';\n\n  if (secondColor) {\n    var s = new TinyColor(secondColor);\n    secondHex8String = '#' + rgbaToArgbHex(s.r, s.g, s.b, s.a);\n  }\n\n  return \"progid:DXImageTransform.Microsoft.gradient(\".concat(gradientType, \"startColorstr=\").concat(hex8String, \",endColorstr=\").concat(secondHex8String, \")\");\n}","import { TinyColor } from './index';\nimport { convertToPercentage } from './util';\n/**\n * If input is an object, force 1 into \"1.0\" to handle ratios properly\n * String input requires \"1.0\" as input, so 1 will be treated as 1\n */\n\nexport function fromRatio(ratio, opts) {\n  var newColor = {\n    r: convertToPercentage(ratio.r),\n    g: convertToPercentage(ratio.g),\n    b: convertToPercentage(ratio.b)\n  };\n\n  if (ratio.a !== undefined) {\n    newColor.a = Number(ratio.a);\n  }\n\n  return new TinyColor(newColor, opts);\n}\n/** old random function */\n\nexport function legacyRandom() {\n  return new TinyColor({\n    r: Math.random(),\n    g: Math.random(),\n    b: Math.random()\n  });\n}","// randomColor by David Merfield under the CC0 license\n// https://github.com/davidmerfield/randomColor/\nimport { TinyColor } from './index';\nexport function random(options) {\n  if (options === void 0) {\n    options = {};\n  } // Check if we need to generate multiple colors\n\n\n  if (options.count !== undefined && options.count !== null) {\n    var totalColors = options.count;\n    var colors = [];\n    options.count = undefined;\n\n    while (totalColors > colors.length) {\n      // Since we're generating multiple colors,\n      // incremement the seed. Otherwise we'd just\n      // generate the same color each time...\n      options.count = null;\n\n      if (options.seed) {\n        options.seed += 1;\n      }\n\n      colors.push(random(options));\n    }\n\n    options.count = totalColors;\n    return colors;\n  } // First we pick a hue (H)\n\n\n  var h = pickHue(options.hue, options.seed); // Then use H to determine saturation (S)\n\n  var s = pickSaturation(h, options); // Then use S and H to determine brightness (B).\n\n  var v = pickBrightness(h, s, options);\n  var res = {\n    h: h,\n    s: s,\n    v: v\n  };\n\n  if (options.alpha !== undefined) {\n    res.a = options.alpha;\n  } // Then we return the HSB color in the desired format\n\n\n  return new TinyColor(res);\n}\n\nfunction pickHue(hue, seed) {\n  var hueRange = getHueRange(hue);\n  var res = randomWithin(hueRange, seed); // Instead of storing red as two seperate ranges,\n  // we group them, using negative numbers\n\n  if (res < 0) {\n    res = 360 + res;\n  }\n\n  return res;\n}\n\nfunction pickSaturation(hue, options) {\n  if (options.hue === 'monochrome') {\n    return 0;\n  }\n\n  if (options.luminosity === 'random') {\n    return randomWithin([0, 100], options.seed);\n  }\n\n  var saturationRange = getColorInfo(hue).saturationRange;\n  var sMin = saturationRange[0];\n  var sMax = saturationRange[1];\n\n  switch (options.luminosity) {\n    case 'bright':\n      sMin = 55;\n      break;\n\n    case 'dark':\n      sMin = sMax - 10;\n      break;\n\n    case 'light':\n      sMax = 55;\n      break;\n\n    default:\n      break;\n  }\n\n  return randomWithin([sMin, sMax], options.seed);\n}\n\nfunction pickBrightness(H, S, options) {\n  var bMin = getMinimumBrightness(H, S);\n  var bMax = 100;\n\n  switch (options.luminosity) {\n    case 'dark':\n      bMax = bMin + 20;\n      break;\n\n    case 'light':\n      bMin = (bMax + bMin) / 2;\n      break;\n\n    case 'random':\n      bMin = 0;\n      bMax = 100;\n      break;\n\n    default:\n      break;\n  }\n\n  return randomWithin([bMin, bMax], options.seed);\n}\n\nfunction getMinimumBrightness(H, S) {\n  var lowerBounds = getColorInfo(H).lowerBounds;\n\n  for (var i = 0; i < lowerBounds.length - 1; i++) {\n    var s1 = lowerBounds[i][0];\n    var v1 = lowerBounds[i][1];\n    var s2 = lowerBounds[i + 1][0];\n    var v2 = lowerBounds[i + 1][1];\n\n    if (S >= s1 && S <= s2) {\n      var m = (v2 - v1) / (s2 - s1);\n      var b = v1 - m * s1;\n      return m * S + b;\n    }\n  }\n\n  return 0;\n}\n\nfunction getHueRange(colorInput) {\n  var num = parseInt(colorInput, 10);\n\n  if (!Number.isNaN(num) && num < 360 && num > 0) {\n    return [num, num];\n  }\n\n  if (typeof colorInput === 'string') {\n    var namedColor = bounds.find(function (n) {\n      return n.name === colorInput;\n    });\n\n    if (namedColor) {\n      var color = defineColor(namedColor);\n\n      if (color.hueRange) {\n        return color.hueRange;\n      }\n    }\n\n    var parsed = new TinyColor(colorInput);\n\n    if (parsed.isValid) {\n      var hue = parsed.toHsv().h;\n      return [hue, hue];\n    }\n  }\n\n  return [0, 360];\n}\n\nfunction getColorInfo(hue) {\n  // Maps red colors to make picking hue easier\n  if (hue >= 334 && hue <= 360) {\n    hue -= 360;\n  }\n\n  for (var _i = 0, bounds_1 = bounds; _i < bounds_1.length; _i++) {\n    var bound = bounds_1[_i];\n    var color = defineColor(bound);\n\n    if (color.hueRange && hue >= color.hueRange[0] && hue <= color.hueRange[1]) {\n      return color;\n    }\n  }\n\n  throw Error('Color not found');\n}\n\nfunction randomWithin(range, seed) {\n  if (seed === undefined) {\n    return Math.floor(range[0] + Math.random() * (range[1] + 1 - range[0]));\n  } // Seeded random algorithm from http://indiegamr.com/generate-repeatable-random-numbers-in-js/\n\n\n  var max = range[1] || 1;\n  var min = range[0] || 0;\n  seed = (seed * 9301 + 49297) % 233280;\n  var rnd = seed / 233280.0;\n  return Math.floor(min + rnd * (max - min));\n}\n\nfunction defineColor(bound) {\n  var sMin = bound.lowerBounds[0][0];\n  var sMax = bound.lowerBounds[bound.lowerBounds.length - 1][0];\n  var bMin = bound.lowerBounds[bound.lowerBounds.length - 1][1];\n  var bMax = bound.lowerBounds[0][1];\n  return {\n    name: bound.name,\n    hueRange: bound.hueRange,\n    lowerBounds: bound.lowerBounds,\n    saturationRange: [sMin, sMax],\n    brightnessRange: [bMin, bMax]\n  };\n}\n/**\n * @hidden\n */\n\n\nexport var bounds = [{\n  name: 'monochrome',\n  hueRange: null,\n  lowerBounds: [[0, 0], [100, 0]]\n}, {\n  name: 'red',\n  hueRange: [-26, 18],\n  lowerBounds: [[20, 100], [30, 92], [40, 89], [50, 85], [60, 78], [70, 70], [80, 60], [90, 55], [100, 50]]\n}, {\n  name: 'orange',\n  hueRange: [19, 46],\n  lowerBounds: [[20, 100], [30, 93], [40, 88], [50, 86], [60, 85], [70, 70], [100, 70]]\n}, {\n  name: 'yellow',\n  hueRange: [47, 62],\n  lowerBounds: [[25, 100], [40, 94], [50, 89], [60, 86], [70, 84], [80, 82], [90, 80], [100, 75]]\n}, {\n  name: 'green',\n  hueRange: [63, 178],\n  lowerBounds: [[30, 100], [40, 90], [50, 85], [60, 81], [70, 74], [80, 64], [90, 50], [100, 40]]\n}, {\n  name: 'blue',\n  hueRange: [179, 257],\n  lowerBounds: [[20, 100], [30, 86], [40, 80], [50, 74], [60, 60], [70, 52], [80, 44], [90, 39], [100, 35]]\n}, {\n  name: 'purple',\n  hueRange: [258, 282],\n  lowerBounds: [[20, 100], [30, 87], [40, 79], [50, 70], [60, 65], [70, 59], [80, 52], [90, 45], [100, 42]]\n}, {\n  name: 'pink',\n  hueRange: [283, 334],\n  lowerBounds: [[20, 100], [30, 90], [40, 86], [60, 84], [80, 80], [90, 75], [100, 73]]\n}];","import { tinycolor } from './index';\nexport * from './index';\nexport * from './css-color-names';\nexport * from './readability';\nexport * from './to-ms-filter';\nexport * from './from-ratio';\nexport * from './format-input';\nexport * from './random';\nexport * from './interfaces';\nexport * from './conversion'; // kept for backwards compatability with v1\n\nexport default tinycolor;","/**\n * Take input from [0, n] and return it as [0, 1]\n * @hidden\n */\nexport function bound01(n, max) {\n  if (isOnePointZero(n)) {\n    n = '100%';\n  }\n\n  var isPercent = isPercentage(n);\n  n = max === 360 ? n : Math.min(max, Math.max(0, parseFloat(n))); // Automatically convert percentage into number\n\n  if (isPercent) {\n    n = parseInt(String(n * max), 10) / 100;\n  } // Handle floating point rounding errors\n\n\n  if (Math.abs(n - max) < 0.000001) {\n    return 1;\n  } // Convert into [0, 1] range if it isn't already\n\n\n  if (max === 360) {\n    // If n is a hue given in degrees,\n    // wrap around out-of-range values into [0, 360] range\n    // then convert into [0, 1].\n    n = (n < 0 ? n % max + max : n % max) / parseFloat(String(max));\n  } else {\n    // If n not a hue given in degrees\n    // Convert into [0, 1] range if it isn't already.\n    n = n % max / parseFloat(String(max));\n  }\n\n  return n;\n}\n/**\n * Force a number between 0 and 1\n * @hidden\n */\n\nexport function clamp01(val) {\n  return Math.min(1, Math.max(0, val));\n}\n/**\n * Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1\n * <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0>\n * @hidden\n */\n\nexport function isOnePointZero(n) {\n  return typeof n === 'string' && n.indexOf('.') !== -1 && parseFloat(n) === 1;\n}\n/**\n * Check to see if string passed in is a percentage\n * @hidden\n */\n\nexport function isPercentage(n) {\n  return typeof n === 'string' && n.indexOf('%') !== -1;\n}\n/**\n * Return a valid alpha value [0,1] with all invalid values being set to 1\n * @hidden\n */\n\nexport function boundAlpha(a) {\n  a = parseFloat(a);\n\n  if (isNaN(a) || a < 0 || a > 1) {\n    a = 1;\n  }\n\n  return a;\n}\n/**\n * Replace a decimal with it's percentage value\n * @hidden\n */\n\nexport function convertToPercentage(n) {\n  if (n <= 1) {\n    return \"\".concat(Number(n) * 100, \"%\");\n  }\n\n  return n;\n}\n/**\n * Force a hex value to have 2 characters\n * @hidden\n */\n\nexport function pad2(c) {\n  return c.length === 1 ? '0' + c : String(c);\n}","import memoize from '@emotion/memoize'; // eslint-disable-next-line no-undef\n\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar isPropValid = /* #__PURE__ */memoize(function (prop) {\n  return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n  /* o */\n  && prop.charCodeAt(1) === 110\n  /* n */\n  && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\nexport { isPropValid as default };","function memoize(fn) {\n  var cache = Object.create(null);\n  return function (arg) {\n    if (cache[arg] === undefined) cache[arg] = fn(arg);\n    return cache[arg];\n  };\n}\n\nexport { memoize as default };","function stylis_min(W) {\n  function M(d, c, e, h, a) {\n    for (var m = 0, b = 0, v = 0, n = 0, q, g, x = 0, K = 0, k, u = k = q = 0, l = 0, r = 0, I = 0, t = 0, B = e.length, J = B - 1, y, f = '', p = '', F = '', G = '', C; l < B;) {\n      g = e.charCodeAt(l);\n      l === J && 0 !== b + n + v + m && (0 !== b && (g = 47 === b ? 10 : 47), n = v = m = 0, B++, J++);\n\n      if (0 === b + n + v + m) {\n        if (l === J && (0 < r && (f = f.replace(N, '')), 0 < f.trim().length)) {\n          switch (g) {\n            case 32:\n            case 9:\n            case 59:\n            case 13:\n            case 10:\n              break;\n\n            default:\n              f += e.charAt(l);\n          }\n\n          g = 59;\n        }\n\n        switch (g) {\n          case 123:\n            f = f.trim();\n            q = f.charCodeAt(0);\n            k = 1;\n\n            for (t = ++l; l < B;) {\n              switch (g = e.charCodeAt(l)) {\n                case 123:\n                  k++;\n                  break;\n\n                case 125:\n                  k--;\n                  break;\n\n                case 47:\n                  switch (g = e.charCodeAt(l + 1)) {\n                    case 42:\n                    case 47:\n                      a: {\n                        for (u = l + 1; u < J; ++u) {\n                          switch (e.charCodeAt(u)) {\n                            case 47:\n                              if (42 === g && 42 === e.charCodeAt(u - 1) && l + 2 !== u) {\n                                l = u + 1;\n                                break a;\n                              }\n\n                              break;\n\n                            case 10:\n                              if (47 === g) {\n                                l = u + 1;\n                                break a;\n                              }\n\n                          }\n                        }\n\n                        l = u;\n                      }\n\n                  }\n\n                  break;\n\n                case 91:\n                  g++;\n\n                case 40:\n                  g++;\n\n                case 34:\n                case 39:\n                  for (; l++ < J && e.charCodeAt(l) !== g;) {}\n\n              }\n\n              if (0 === k) break;\n              l++;\n            }\n\n            k = e.substring(t, l);\n            0 === q && (q = (f = f.replace(ca, '').trim()).charCodeAt(0));\n\n            switch (q) {\n              case 64:\n                0 < r && (f = f.replace(N, ''));\n                g = f.charCodeAt(1);\n\n                switch (g) {\n                  case 100:\n                  case 109:\n                  case 115:\n                  case 45:\n                    r = c;\n                    break;\n\n                  default:\n                    r = O;\n                }\n\n                k = M(c, r, k, g, a + 1);\n                t = k.length;\n                0 < A && (r = X(O, f, I), C = H(3, k, r, c, D, z, t, g, a, h), f = r.join(''), void 0 !== C && 0 === (t = (k = C.trim()).length) && (g = 0, k = ''));\n                if (0 < t) switch (g) {\n                  case 115:\n                    f = f.replace(da, ea);\n\n                  case 100:\n                  case 109:\n                  case 45:\n                    k = f + '{' + k + '}';\n                    break;\n\n                  case 107:\n                    f = f.replace(fa, '$1 $2');\n                    k = f + '{' + k + '}';\n                    k = 1 === w || 2 === w && L('@' + k, 3) ? '@-webkit-' + k + '@' + k : '@' + k;\n                    break;\n\n                  default:\n                    k = f + k, 112 === h && (k = (p += k, ''));\n                } else k = '';\n                break;\n\n              default:\n                k = M(c, X(c, f, I), k, h, a + 1);\n            }\n\n            F += k;\n            k = I = r = u = q = 0;\n            f = '';\n            g = e.charCodeAt(++l);\n            break;\n\n          case 125:\n          case 59:\n            f = (0 < r ? f.replace(N, '') : f).trim();\n            if (1 < (t = f.length)) switch (0 === u && (q = f.charCodeAt(0), 45 === q || 96 < q && 123 > q) && (t = (f = f.replace(' ', ':')).length), 0 < A && void 0 !== (C = H(1, f, c, d, D, z, p.length, h, a, h)) && 0 === (t = (f = C.trim()).length) && (f = '\\x00\\x00'), q = f.charCodeAt(0), g = f.charCodeAt(1), q) {\n              case 0:\n                break;\n\n              case 64:\n                if (105 === g || 99 === g) {\n                  G += f + e.charAt(l);\n                  break;\n                }\n\n              default:\n                58 !== f.charCodeAt(t - 1) && (p += P(f, q, g, f.charCodeAt(2)));\n            }\n            I = r = u = q = 0;\n            f = '';\n            g = e.charCodeAt(++l);\n        }\n      }\n\n      switch (g) {\n        case 13:\n        case 10:\n          47 === b ? b = 0 : 0 === 1 + q && 107 !== h && 0 < f.length && (r = 1, f += '\\x00');\n          0 < A * Y && H(0, f, c, d, D, z, p.length, h, a, h);\n          z = 1;\n          D++;\n          break;\n\n        case 59:\n        case 125:\n          if (0 === b + n + v + m) {\n            z++;\n            break;\n          }\n\n        default:\n          z++;\n          y = e.charAt(l);\n\n          switch (g) {\n            case 9:\n            case 32:\n              if (0 === n + m + b) switch (x) {\n                case 44:\n                case 58:\n                case 9:\n                case 32:\n                  y = '';\n                  break;\n\n                default:\n                  32 !== g && (y = ' ');\n              }\n              break;\n\n            case 0:\n              y = '\\\\0';\n              break;\n\n            case 12:\n              y = '\\\\f';\n              break;\n\n            case 11:\n              y = '\\\\v';\n              break;\n\n            case 38:\n              0 === n + b + m && (r = I = 1, y = '\\f' + y);\n              break;\n\n            case 108:\n              if (0 === n + b + m + E && 0 < u) switch (l - u) {\n                case 2:\n                  112 === x && 58 === e.charCodeAt(l - 3) && (E = x);\n\n                case 8:\n                  111 === K && (E = K);\n              }\n              break;\n\n            case 58:\n              0 === n + b + m && (u = l);\n              break;\n\n            case 44:\n              0 === b + v + n + m && (r = 1, y += '\\r');\n              break;\n\n            case 34:\n            case 39:\n              0 === b && (n = n === g ? 0 : 0 === n ? g : n);\n              break;\n\n            case 91:\n              0 === n + b + v && m++;\n              break;\n\n            case 93:\n              0 === n + b + v && m--;\n              break;\n\n            case 41:\n              0 === n + b + m && v--;\n              break;\n\n            case 40:\n              if (0 === n + b + m) {\n                if (0 === q) switch (2 * x + 3 * K) {\n                  case 533:\n                    break;\n\n                  default:\n                    q = 1;\n                }\n                v++;\n              }\n\n              break;\n\n            case 64:\n              0 === b + v + n + m + u + k && (k = 1);\n              break;\n\n            case 42:\n            case 47:\n              if (!(0 < n + m + v)) switch (b) {\n                case 0:\n                  switch (2 * g + 3 * e.charCodeAt(l + 1)) {\n                    case 235:\n                      b = 47;\n                      break;\n\n                    case 220:\n                      t = l, b = 42;\n                  }\n\n                  break;\n\n                case 42:\n                  47 === g && 42 === x && t + 2 !== l && (33 === e.charCodeAt(t + 2) && (p += e.substring(t, l + 1)), y = '', b = 0);\n              }\n          }\n\n          0 === b && (f += y);\n      }\n\n      K = x;\n      x = g;\n      l++;\n    }\n\n    t = p.length;\n\n    if (0 < t) {\n      r = c;\n      if (0 < A && (C = H(2, p, r, d, D, z, t, h, a, h), void 0 !== C && 0 === (p = C).length)) return G + p + F;\n      p = r.join(',') + '{' + p + '}';\n\n      if (0 !== w * E) {\n        2 !== w || L(p, 2) || (E = 0);\n\n        switch (E) {\n          case 111:\n            p = p.replace(ha, ':-moz-$1') + p;\n            break;\n\n          case 112:\n            p = p.replace(Q, '::-webkit-input-$1') + p.replace(Q, '::-moz-$1') + p.replace(Q, ':-ms-input-$1') + p;\n        }\n\n        E = 0;\n      }\n    }\n\n    return G + p + F;\n  }\n\n  function X(d, c, e) {\n    var h = c.trim().split(ia);\n    c = h;\n    var a = h.length,\n        m = d.length;\n\n    switch (m) {\n      case 0:\n      case 1:\n        var b = 0;\n\n        for (d = 0 === m ? '' : d[0] + ' '; b < a; ++b) {\n          c[b] = Z(d, c[b], e).trim();\n        }\n\n        break;\n\n      default:\n        var v = b = 0;\n\n        for (c = []; b < a; ++b) {\n          for (var n = 0; n < m; ++n) {\n            c[v++] = Z(d[n] + ' ', h[b], e).trim();\n          }\n        }\n\n    }\n\n    return c;\n  }\n\n  function Z(d, c, e) {\n    var h = c.charCodeAt(0);\n    33 > h && (h = (c = c.trim()).charCodeAt(0));\n\n    switch (h) {\n      case 38:\n        return c.replace(F, '$1' + d.trim());\n\n      case 58:\n        return d.trim() + c.replace(F, '$1' + d.trim());\n\n      default:\n        if (0 < 1 * e && 0 < c.indexOf('\\f')) return c.replace(F, (58 === d.charCodeAt(0) ? '' : '$1') + d.trim());\n    }\n\n    return d + c;\n  }\n\n  function P(d, c, e, h) {\n    var a = d + ';',\n        m = 2 * c + 3 * e + 4 * h;\n\n    if (944 === m) {\n      d = a.indexOf(':', 9) + 1;\n      var b = a.substring(d, a.length - 1).trim();\n      b = a.substring(0, d).trim() + b + ';';\n      return 1 === w || 2 === w && L(b, 1) ? '-webkit-' + b + b : b;\n    }\n\n    if (0 === w || 2 === w && !L(a, 1)) return a;\n\n    switch (m) {\n      case 1015:\n        return 97 === a.charCodeAt(10) ? '-webkit-' + a + a : a;\n\n      case 951:\n        return 116 === a.charCodeAt(3) ? '-webkit-' + a + a : a;\n\n      case 963:\n        return 110 === a.charCodeAt(5) ? '-webkit-' + a + a : a;\n\n      case 1009:\n        if (100 !== a.charCodeAt(4)) break;\n\n      case 969:\n      case 942:\n        return '-webkit-' + a + a;\n\n      case 978:\n        return '-webkit-' + a + '-moz-' + a + a;\n\n      case 1019:\n      case 983:\n        return '-webkit-' + a + '-moz-' + a + '-ms-' + a + a;\n\n      case 883:\n        if (45 === a.charCodeAt(8)) return '-webkit-' + a + a;\n        if (0 < a.indexOf('image-set(', 11)) return a.replace(ja, '$1-webkit-$2') + a;\n        break;\n\n      case 932:\n        if (45 === a.charCodeAt(4)) switch (a.charCodeAt(5)) {\n          case 103:\n            return '-webkit-box-' + a.replace('-grow', '') + '-webkit-' + a + '-ms-' + a.replace('grow', 'positive') + a;\n\n          case 115:\n            return '-webkit-' + a + '-ms-' + a.replace('shrink', 'negative') + a;\n\n          case 98:\n            return '-webkit-' + a + '-ms-' + a.replace('basis', 'preferred-size') + a;\n        }\n        return '-webkit-' + a + '-ms-' + a + a;\n\n      case 964:\n        return '-webkit-' + a + '-ms-flex-' + a + a;\n\n      case 1023:\n        if (99 !== a.charCodeAt(8)) break;\n        b = a.substring(a.indexOf(':', 15)).replace('flex-', '').replace('space-between', 'justify');\n        return '-webkit-box-pack' + b + '-webkit-' + a + '-ms-flex-pack' + b + a;\n\n      case 1005:\n        return ka.test(a) ? a.replace(aa, ':-webkit-') + a.replace(aa, ':-moz-') + a : a;\n\n      case 1e3:\n        b = a.substring(13).trim();\n        c = b.indexOf('-') + 1;\n\n        switch (b.charCodeAt(0) + b.charCodeAt(c)) {\n          case 226:\n            b = a.replace(G, 'tb');\n            break;\n\n          case 232:\n            b = a.replace(G, 'tb-rl');\n            break;\n\n          case 220:\n            b = a.replace(G, 'lr');\n            break;\n\n          default:\n            return a;\n        }\n\n        return '-webkit-' + a + '-ms-' + b + a;\n\n      case 1017:\n        if (-1 === a.indexOf('sticky', 9)) break;\n\n      case 975:\n        c = (a = d).length - 10;\n        b = (33 === a.charCodeAt(c) ? a.substring(0, c) : a).substring(d.indexOf(':', 7) + 1).trim();\n\n        switch (m = b.charCodeAt(0) + (b.charCodeAt(7) | 0)) {\n          case 203:\n            if (111 > b.charCodeAt(8)) break;\n\n          case 115:\n            a = a.replace(b, '-webkit-' + b) + ';' + a;\n            break;\n\n          case 207:\n          case 102:\n            a = a.replace(b, '-webkit-' + (102 < m ? 'inline-' : '') + 'box') + ';' + a.replace(b, '-webkit-' + b) + ';' + a.replace(b, '-ms-' + b + 'box') + ';' + a;\n        }\n\n        return a + ';';\n\n      case 938:\n        if (45 === a.charCodeAt(5)) switch (a.charCodeAt(6)) {\n          case 105:\n            return b = a.replace('-items', ''), '-webkit-' + a + '-webkit-box-' + b + '-ms-flex-' + b + a;\n\n          case 115:\n            return '-webkit-' + a + '-ms-flex-item-' + a.replace(ba, '') + a;\n\n          default:\n            return '-webkit-' + a + '-ms-flex-line-pack' + a.replace('align-content', '').replace(ba, '') + a;\n        }\n        break;\n\n      case 973:\n      case 989:\n        if (45 !== a.charCodeAt(3) || 122 === a.charCodeAt(4)) break;\n\n      case 931:\n      case 953:\n        if (!0 === la.test(d)) return 115 === (b = d.substring(d.indexOf(':') + 1)).charCodeAt(0) ? P(d.replace('stretch', 'fill-available'), c, e, h).replace(':fill-available', ':stretch') : a.replace(b, '-webkit-' + b) + a.replace(b, '-moz-' + b.replace('fill-', '')) + a;\n        break;\n\n      case 962:\n        if (a = '-webkit-' + a + (102 === a.charCodeAt(5) ? '-ms-' + a : '') + a, 211 === e + h && 105 === a.charCodeAt(13) && 0 < a.indexOf('transform', 10)) return a.substring(0, a.indexOf(';', 27) + 1).replace(ma, '$1-webkit-$2') + a;\n    }\n\n    return a;\n  }\n\n  function L(d, c) {\n    var e = d.indexOf(1 === c ? ':' : '{'),\n        h = d.substring(0, 3 !== c ? e : 10);\n    e = d.substring(e + 1, d.length - 1);\n    return R(2 !== c ? h : h.replace(na, '$1'), e, c);\n  }\n\n  function ea(d, c) {\n    var e = P(c, c.charCodeAt(0), c.charCodeAt(1), c.charCodeAt(2));\n    return e !== c + ';' ? e.replace(oa, ' or ($1)').substring(4) : '(' + c + ')';\n  }\n\n  function H(d, c, e, h, a, m, b, v, n, q) {\n    for (var g = 0, x = c, w; g < A; ++g) {\n      switch (w = S[g].call(B, d, x, e, h, a, m, b, v, n, q)) {\n        case void 0:\n        case !1:\n        case !0:\n        case null:\n          break;\n\n        default:\n          x = w;\n      }\n    }\n\n    if (x !== c) return x;\n  }\n\n  function T(d) {\n    switch (d) {\n      case void 0:\n      case null:\n        A = S.length = 0;\n        break;\n\n      default:\n        if ('function' === typeof d) S[A++] = d;else if ('object' === typeof d) for (var c = 0, e = d.length; c < e; ++c) {\n          T(d[c]);\n        } else Y = !!d | 0;\n    }\n\n    return T;\n  }\n\n  function U(d) {\n    d = d.prefix;\n    void 0 !== d && (R = null, d ? 'function' !== typeof d ? w = 1 : (w = 2, R = d) : w = 0);\n    return U;\n  }\n\n  function B(d, c) {\n    var e = d;\n    33 > e.charCodeAt(0) && (e = e.trim());\n    V = e;\n    e = [V];\n\n    if (0 < A) {\n      var h = H(-1, c, e, e, D, z, 0, 0, 0, 0);\n      void 0 !== h && 'string' === typeof h && (c = h);\n    }\n\n    var a = M(O, e, c, 0, 0);\n    0 < A && (h = H(-2, a, e, e, D, z, a.length, 0, 0, 0), void 0 !== h && (a = h));\n    V = '';\n    E = 0;\n    z = D = 1;\n    return a;\n  }\n\n  var ca = /^\\0+/g,\n      N = /[\\0\\r\\f]/g,\n      aa = /: */g,\n      ka = /zoo|gra/,\n      ma = /([,: ])(transform)/g,\n      ia = /,\\r+?/g,\n      F = /([\\t\\r\\n ])*\\f?&/g,\n      fa = /@(k\\w+)\\s*(\\S*)\\s*/,\n      Q = /::(place)/g,\n      ha = /:(read-only)/g,\n      G = /[svh]\\w+-[tblr]{2}/,\n      da = /\\(\\s*(.*)\\s*\\)/g,\n      oa = /([\\s\\S]*?);/g,\n      ba = /-self|flex-/g,\n      na = /[^]*?(:[rp][el]a[\\w-]+)[^]*/,\n      la = /stretch|:\\s*\\w+\\-(?:conte|avail)/,\n      ja = /([^-])(image-set\\()/,\n      z = 1,\n      D = 1,\n      E = 0,\n      w = 1,\n      O = [],\n      S = [],\n      A = 0,\n      R = null,\n      Y = 0,\n      V = '';\n  B.use = T;\n  B.set = U;\n  void 0 !== W && U(W);\n  return B;\n}\n\nexport default stylis_min;","var unitlessKeys = {\n  animationIterationCount: 1,\n  borderImageOutset: 1,\n  borderImageSlice: 1,\n  borderImageWidth: 1,\n  boxFlex: 1,\n  boxFlexGroup: 1,\n  boxOrdinalGroup: 1,\n  columnCount: 1,\n  columns: 1,\n  flex: 1,\n  flexGrow: 1,\n  flexPositive: 1,\n  flexShrink: 1,\n  flexNegative: 1,\n  flexOrder: 1,\n  gridRow: 1,\n  gridRowEnd: 1,\n  gridRowSpan: 1,\n  gridRowStart: 1,\n  gridColumn: 1,\n  gridColumnEnd: 1,\n  gridColumnSpan: 1,\n  gridColumnStart: 1,\n  msGridRow: 1,\n  msGridRowSpan: 1,\n  msGridColumn: 1,\n  msGridColumnSpan: 1,\n  fontWeight: 1,\n  lineHeight: 1,\n  opacity: 1,\n  order: 1,\n  orphans: 1,\n  tabSize: 1,\n  widows: 1,\n  zIndex: 1,\n  zoom: 1,\n  WebkitLineClamp: 1,\n  // SVG-related properties\n  fillOpacity: 1,\n  floodOpacity: 1,\n  stopOpacity: 1,\n  strokeDasharray: 1,\n  strokeDashoffset: 1,\n  strokeMiterlimit: 1,\n  strokeOpacity: 1,\n  strokeWidth: 1\n};\nexport default unitlessKeys;","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n\n/* global define */\n(function () {\n  'use strict';\n\n  var hasOwn = {}.hasOwnProperty;\n  var nativeCodeString = '[native code]';\n\n  function classNames() {\n    var classes = [];\n\n    for (var i = 0; i < arguments.length; i++) {\n      var arg = arguments[i];\n      if (!arg) continue;\n      var argType = typeof arg;\n\n      if (argType === 'string' || argType === 'number') {\n        classes.push(arg);\n      } else if (Array.isArray(arg)) {\n        if (arg.length) {\n          var inner = classNames.apply(null, arg);\n\n          if (inner) {\n            classes.push(inner);\n          }\n        }\n      } else if (argType === 'object') {\n        if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n          classes.push(arg.toString());\n          continue;\n        }\n\n        for (var key in arg) {\n          if (hasOwn.call(arg, key) && arg[key]) {\n            classes.push(key);\n          }\n        }\n      }\n    }\n\n    return classes.join(' ');\n  }\n\n  if (typeof module !== 'undefined' && module.exports) {\n    classNames.default = classNames;\n    module.exports = classNames;\n  } else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n    // register as 'classnames', consistent with npm package name\n    define('classnames', [], function () {\n      return classNames;\n    });\n  } else {\n    window.classNames = classNames;\n  }\n})();","'use strict';\n\nvar isMergeableObject = function isMergeableObject(value) {\n  return isNonNullObject(value) && !isSpecial(value);\n};\n\nfunction isNonNullObject(value) {\n  return !!value && typeof value === 'object';\n}\n\nfunction isSpecial(value) {\n  var stringValue = Object.prototype.toString.call(value);\n  return stringValue === '[object RegExp]' || stringValue === '[object Date]' || isReactElement(value);\n} // see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25\n\n\nvar canUseSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;\n\nfunction isReactElement(value) {\n  return value.$$typeof === REACT_ELEMENT_TYPE;\n}\n\nfunction emptyTarget(val) {\n  return Array.isArray(val) ? [] : {};\n}\n\nfunction cloneUnlessOtherwiseSpecified(value, options) {\n  return options.clone !== false && options.isMergeableObject(value) ? deepmerge(emptyTarget(value), value, options) : value;\n}\n\nfunction defaultArrayMerge(target, source, options) {\n  return target.concat(source).map(function (element) {\n    return cloneUnlessOtherwiseSpecified(element, options);\n  });\n}\n\nfunction getMergeFunction(key, options) {\n  if (!options.customMerge) {\n    return deepmerge;\n  }\n\n  var customMerge = options.customMerge(key);\n  return typeof customMerge === 'function' ? customMerge : deepmerge;\n}\n\nfunction getEnumerableOwnPropertySymbols(target) {\n  return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function (symbol) {\n    return target.propertyIsEnumerable(symbol);\n  }) : [];\n}\n\nfunction getKeys(target) {\n  return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));\n}\n\nfunction propertyIsOnObject(object, property) {\n  try {\n    return property in object;\n  } catch (_) {\n    return false;\n  }\n} // Protects from prototype poisoning and unexpected merging up the prototype chain.\n\n\nfunction propertyIsUnsafe(target, key) {\n  return propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,\n  && !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,\n  && Object.propertyIsEnumerable.call(target, key)); // and also unsafe if they're nonenumerable.\n}\n\nfunction mergeObject(target, source, options) {\n  var destination = {};\n\n  if (options.isMergeableObject(target)) {\n    getKeys(target).forEach(function (key) {\n      destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n    });\n  }\n\n  getKeys(source).forEach(function (key) {\n    if (propertyIsUnsafe(target, key)) {\n      return;\n    }\n\n    if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {\n      destination[key] = getMergeFunction(key, options)(target[key], source[key], options);\n    } else {\n      destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n    }\n  });\n  return destination;\n}\n\nfunction deepmerge(target, source, options) {\n  options = options || {};\n  options.arrayMerge = options.arrayMerge || defaultArrayMerge;\n  options.isMergeableObject = options.isMergeableObject || isMergeableObject; // cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()\n  // implementations can use it. The caller may not replace it.\n\n  options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;\n  var sourceIsArray = Array.isArray(source);\n  var targetIsArray = Array.isArray(target);\n  var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n\n  if (!sourceAndTargetTypesMatch) {\n    return cloneUnlessOtherwiseSpecified(source, options);\n  } else if (sourceIsArray) {\n    return options.arrayMerge(target, source, options);\n  } else {\n    return mergeObject(target, source, options);\n  }\n}\n\ndeepmerge.all = function deepmergeAll(array, options) {\n  if (!Array.isArray(array)) {\n    throw new Error('first argument should be an array');\n  }\n\n  return array.reduce(function (prev, next) {\n    return deepmerge(prev, next, options);\n  }, {});\n};\n\nvar deepmerge_1 = deepmerge;\nmodule.exports = deepmerge_1;","function ownKeys(object, enumerableOnly) {\n  var keys = Object.keys(object);\n\n  if (Object.getOwnPropertySymbols) {\n    var symbols = Object.getOwnPropertySymbols(object);\n\n    if (enumerableOnly) {\n      symbols = symbols.filter(function (sym) {\n        return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n      });\n    }\n\n    keys.push.apply(keys, symbols);\n  }\n\n  return keys;\n}\n\nfunction _objectSpread2(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i] != null ? arguments[i] : {};\n\n    if (i % 2) {\n      ownKeys(Object(source), true).forEach(function (key) {\n        _defineProperty(target, key, source[key]);\n      });\n    } else if (Object.getOwnPropertyDescriptors) {\n      Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n    } else {\n      ownKeys(Object(source)).forEach(function (key) {\n        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n      });\n    }\n  }\n\n  return target;\n}\n\nfunction _typeof(obj) {\n  \"@babel/helpers - typeof\";\n\n  if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n    _typeof = function _typeof(obj) {\n      return typeof obj;\n    };\n  } else {\n    _typeof = function _typeof(obj) {\n      return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n    };\n  }\n\n  return _typeof(obj);\n}\n\nfunction _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nvar vendorPrefix;\nvar jsCssMap = {\n  Webkit: '-webkit-',\n  Moz: '-moz-',\n  // IE did it wrong again ...\n  ms: '-ms-',\n  O: '-o-'\n};\n\nfunction getVendorPrefix() {\n  if (vendorPrefix !== undefined) {\n    return vendorPrefix;\n  }\n\n  vendorPrefix = '';\n  var style = document.createElement('p').style;\n  var testProp = 'Transform';\n\n  for (var key in jsCssMap) {\n    if (key + testProp in style) {\n      vendorPrefix = key;\n    }\n  }\n\n  return vendorPrefix;\n}\n\nfunction getTransitionName() {\n  return getVendorPrefix() ? \"\".concat(getVendorPrefix(), \"TransitionProperty\") : 'transitionProperty';\n}\n\nfunction getTransformName() {\n  return getVendorPrefix() ? \"\".concat(getVendorPrefix(), \"Transform\") : 'transform';\n}\n\nfunction setTransitionProperty(node, value) {\n  var name = getTransitionName();\n\n  if (name) {\n    node.style[name] = value;\n\n    if (name !== 'transitionProperty') {\n      node.style.transitionProperty = value;\n    }\n  }\n}\n\nfunction setTransform(node, value) {\n  var name = getTransformName();\n\n  if (name) {\n    node.style[name] = value;\n\n    if (name !== 'transform') {\n      node.style.transform = value;\n    }\n  }\n}\n\nfunction getTransitionProperty(node) {\n  return node.style.transitionProperty || node.style[getTransitionName()];\n}\n\nfunction getTransformXY(node) {\n  var style = window.getComputedStyle(node, null);\n  var transform = style.getPropertyValue('transform') || style.getPropertyValue(getTransformName());\n\n  if (transform && transform !== 'none') {\n    var matrix = transform.replace(/[^0-9\\-.,]/g, '').split(',');\n    return {\n      x: parseFloat(matrix[12] || matrix[4], 0),\n      y: parseFloat(matrix[13] || matrix[5], 0)\n    };\n  }\n\n  return {\n    x: 0,\n    y: 0\n  };\n}\n\nvar matrix2d = /matrix\\((.*)\\)/;\nvar matrix3d = /matrix3d\\((.*)\\)/;\n\nfunction setTransformXY(node, xy) {\n  var style = window.getComputedStyle(node, null);\n  var transform = style.getPropertyValue('transform') || style.getPropertyValue(getTransformName());\n\n  if (transform && transform !== 'none') {\n    var arr;\n    var match2d = transform.match(matrix2d);\n\n    if (match2d) {\n      match2d = match2d[1];\n      arr = match2d.split(',').map(function (item) {\n        return parseFloat(item, 10);\n      });\n      arr[4] = xy.x;\n      arr[5] = xy.y;\n      setTransform(node, \"matrix(\".concat(arr.join(','), \")\"));\n    } else {\n      var match3d = transform.match(matrix3d)[1];\n      arr = match3d.split(',').map(function (item) {\n        return parseFloat(item, 10);\n      });\n      arr[12] = xy.x;\n      arr[13] = xy.y;\n      setTransform(node, \"matrix3d(\".concat(arr.join(','), \")\"));\n    }\n  } else {\n    setTransform(node, \"translateX(\".concat(xy.x, \"px) translateY(\").concat(xy.y, \"px) translateZ(0)\"));\n  }\n}\n\nvar RE_NUM = /[\\-+]?(?:\\d*\\.|)\\d+(?:[eE][\\-+]?\\d+|)/.source;\nvar getComputedStyleX; // https://stackoverflow.com/a/3485654/3040605\n\nfunction forceRelayout(elem) {\n  var originalStyle = elem.style.display;\n  elem.style.display = 'none';\n  elem.offsetHeight; // eslint-disable-line\n\n  elem.style.display = originalStyle;\n}\n\nfunction css(el, name, v) {\n  var value = v;\n\n  if (_typeof(name) === 'object') {\n    for (var i in name) {\n      if (name.hasOwnProperty(i)) {\n        css(el, i, name[i]);\n      }\n    }\n\n    return undefined;\n  }\n\n  if (typeof value !== 'undefined') {\n    if (typeof value === 'number') {\n      value = \"\".concat(value, \"px\");\n    }\n\n    el.style[name] = value;\n    return undefined;\n  }\n\n  return getComputedStyleX(el, name);\n}\n\nfunction getClientPosition(elem) {\n  var box;\n  var x;\n  var y;\n  var doc = elem.ownerDocument;\n  var body = doc.body;\n  var docElem = doc && doc.documentElement; // 根据 GBS 最新数据,A-Grade Browsers 都已支持 getBoundingClientRect 方法,不用再考虑传统的实现方式\n\n  box = elem.getBoundingClientRect(); // 注:jQuery 还考虑减去 docElem.clientLeft/clientTop\n  // 但测试发现,这样反而会导致当 html 和 body 有边距/边框样式时,获取的值不正确\n  // 此外,ie6 会忽略 html 的 margin 值,幸运地是没有谁会去设置 html 的 margin\n\n  x = Math.floor(box.left);\n  y = Math.floor(box.top); // In IE, most of the time, 2 extra pixels are added to the top and left\n  // due to the implicit 2-pixel inset border.  In IE6/7 quirks mode and\n  // IE6 standards mode, this border can be overridden by setting the\n  // document element's border to zero -- thus, we cannot rely on the\n  // offset always being 2 pixels.\n  // In quirks mode, the offset can be determined by querying the body's\n  // clientLeft/clientTop, but in standards mode, it is found by querying\n  // the document element's clientLeft/clientTop.  Since we already called\n  // getClientBoundingRect we have already forced a reflow, so it is not\n  // too expensive just to query them all.\n  // ie 下应该减去窗口的边框吧,毕竟默认 absolute 都是相对窗口定位的\n  // 窗口边框标准是设 documentElement ,quirks 时设置 body\n  // 最好禁止在 body 和 html 上边框 ,但 ie < 9 html 默认有 2px ,减去\n  // 但是非 ie 不可能设置窗口边框,body html 也不是窗口 ,ie 可以通过 html,body 设置\n  // 标准 ie 下 docElem.clientTop 就是 border-top\n  // ie7 html 即窗口边框改变不了。永远为 2\n  // 但标准 firefox/chrome/ie9 下 docElem.clientTop 是窗口边框,即使设了 border-top 也为 0\n\n  x -= docElem.clientLeft || body.clientLeft || 0;\n  y -= docElem.clientTop || body.clientTop || 0;\n  return {\n    left: x,\n    top: y\n  };\n}\n\nfunction getScroll(w, top) {\n  var ret = w[\"page\".concat(top ? 'Y' : 'X', \"Offset\")];\n  var method = \"scroll\".concat(top ? 'Top' : 'Left');\n\n  if (typeof ret !== 'number') {\n    var d = w.document; // ie6,7,8 standard mode\n\n    ret = d.documentElement[method];\n\n    if (typeof ret !== 'number') {\n      // quirks mode\n      ret = d.body[method];\n    }\n  }\n\n  return ret;\n}\n\nfunction getScrollLeft(w) {\n  return getScroll(w);\n}\n\nfunction getScrollTop(w) {\n  return getScroll(w, true);\n}\n\nfunction getOffset(el) {\n  var pos = getClientPosition(el);\n  var doc = el.ownerDocument;\n  var w = doc.defaultView || doc.parentWindow;\n  pos.left += getScrollLeft(w);\n  pos.top += getScrollTop(w);\n  return pos;\n}\n/**\n * A crude way of determining if an object is a window\n * @member util\n */\n\n\nfunction isWindow(obj) {\n  // must use == for ie8\n\n  /* eslint eqeqeq:0 */\n  return obj !== null && obj !== undefined && obj == obj.window;\n}\n\nfunction getDocument(node) {\n  if (isWindow(node)) {\n    return node.document;\n  }\n\n  if (node.nodeType === 9) {\n    return node;\n  }\n\n  return node.ownerDocument;\n}\n\nfunction _getComputedStyle(elem, name, cs) {\n  var computedStyle = cs;\n  var val = '';\n  var d = getDocument(elem);\n  computedStyle = computedStyle || d.defaultView.getComputedStyle(elem, null); // https://github.com/kissyteam/kissy/issues/61\n\n  if (computedStyle) {\n    val = computedStyle.getPropertyValue(name) || computedStyle[name];\n  }\n\n  return val;\n}\n\nvar _RE_NUM_NO_PX = new RegExp(\"^(\".concat(RE_NUM, \")(?!px)[a-z%]+$\"), 'i');\n\nvar RE_POS = /^(top|right|bottom|left)$/;\nvar CURRENT_STYLE = 'currentStyle';\nvar RUNTIME_STYLE = 'runtimeStyle';\nvar LEFT = 'left';\nvar PX = 'px';\n\nfunction _getComputedStyleIE(elem, name) {\n  // currentStyle maybe null\n  // http://msdn.microsoft.com/en-us/library/ms535231.aspx\n  var ret = elem[CURRENT_STYLE] && elem[CURRENT_STYLE][name]; // 当 width/height 设置为百分比时,通过 pixelLeft 方式转换的 width/height 值\n  // 一开始就处理了! CUSTOM_STYLE.height,CUSTOM_STYLE.width ,cssHook 解决@2011-08-19\n  // 在 ie 下不对,需要直接用 offset 方式\n  // borderWidth 等值也有问题,但考虑到 borderWidth 设为百分比的概率很小,这里就不考虑了\n  // From the awesome hack by Dean Edwards\n  // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291\n  // If we're not dealing with a regular pixel number\n  // but a number that has a weird ending, we need to convert it to pixels\n  // exclude left right for relativity\n\n  if (_RE_NUM_NO_PX.test(ret) && !RE_POS.test(name)) {\n    // Remember the original values\n    var style = elem.style;\n    var left = style[LEFT];\n    var rsLeft = elem[RUNTIME_STYLE][LEFT]; // prevent flashing of content\n\n    elem[RUNTIME_STYLE][LEFT] = elem[CURRENT_STYLE][LEFT]; // Put in the new values to get a computed value out\n\n    style[LEFT] = name === 'fontSize' ? '1em' : ret || 0;\n    ret = style.pixelLeft + PX; // Revert the changed values\n\n    style[LEFT] = left;\n    elem[RUNTIME_STYLE][LEFT] = rsLeft;\n  }\n\n  return ret === '' ? 'auto' : ret;\n}\n\nif (typeof window !== 'undefined') {\n  getComputedStyleX = window.getComputedStyle ? _getComputedStyle : _getComputedStyleIE;\n}\n\nfunction getOffsetDirection(dir, option) {\n  if (dir === 'left') {\n    return option.useCssRight ? 'right' : dir;\n  }\n\n  return option.useCssBottom ? 'bottom' : dir;\n}\n\nfunction oppositeOffsetDirection(dir) {\n  if (dir === 'left') {\n    return 'right';\n  } else if (dir === 'right') {\n    return 'left';\n  } else if (dir === 'top') {\n    return 'bottom';\n  } else if (dir === 'bottom') {\n    return 'top';\n  }\n} // 设置 elem 相对 elem.ownerDocument 的坐标\n\n\nfunction setLeftTop(elem, offset, option) {\n  // set position first, in-case top/left are set even on static elem\n  if (css(elem, 'position') === 'static') {\n    elem.style.position = 'relative';\n  }\n\n  var presetH = -999;\n  var presetV = -999;\n  var horizontalProperty = getOffsetDirection('left', option);\n  var verticalProperty = getOffsetDirection('top', option);\n  var oppositeHorizontalProperty = oppositeOffsetDirection(horizontalProperty);\n  var oppositeVerticalProperty = oppositeOffsetDirection(verticalProperty);\n\n  if (horizontalProperty !== 'left') {\n    presetH = 999;\n  }\n\n  if (verticalProperty !== 'top') {\n    presetV = 999;\n  }\n\n  var originalTransition = '';\n  var originalOffset = getOffset(elem);\n\n  if ('left' in offset || 'top' in offset) {\n    originalTransition = getTransitionProperty(elem) || '';\n    setTransitionProperty(elem, 'none');\n  }\n\n  if ('left' in offset) {\n    elem.style[oppositeHorizontalProperty] = '';\n    elem.style[horizontalProperty] = \"\".concat(presetH, \"px\");\n  }\n\n  if ('top' in offset) {\n    elem.style[oppositeVerticalProperty] = '';\n    elem.style[verticalProperty] = \"\".concat(presetV, \"px\");\n  } // force relayout\n\n\n  forceRelayout(elem);\n  var old = getOffset(elem);\n  var originalStyle = {};\n\n  for (var key in offset) {\n    if (offset.hasOwnProperty(key)) {\n      var dir = getOffsetDirection(key, option);\n      var preset = key === 'left' ? presetH : presetV;\n      var off = originalOffset[key] - old[key];\n\n      if (dir === key) {\n        originalStyle[dir] = preset + off;\n      } else {\n        originalStyle[dir] = preset - off;\n      }\n    }\n  }\n\n  css(elem, originalStyle); // force relayout\n\n  forceRelayout(elem);\n\n  if ('left' in offset || 'top' in offset) {\n    setTransitionProperty(elem, originalTransition);\n  }\n\n  var ret = {};\n\n  for (var _key in offset) {\n    if (offset.hasOwnProperty(_key)) {\n      var _dir = getOffsetDirection(_key, option);\n\n      var _off = offset[_key] - originalOffset[_key];\n\n      if (_key === _dir) {\n        ret[_dir] = originalStyle[_dir] + _off;\n      } else {\n        ret[_dir] = originalStyle[_dir] - _off;\n      }\n    }\n  }\n\n  css(elem, ret);\n}\n\nfunction setTransform$1(elem, offset) {\n  var originalOffset = getOffset(elem);\n  var originalXY = getTransformXY(elem);\n  var resultXY = {\n    x: originalXY.x,\n    y: originalXY.y\n  };\n\n  if ('left' in offset) {\n    resultXY.x = originalXY.x + offset.left - originalOffset.left;\n  }\n\n  if ('top' in offset) {\n    resultXY.y = originalXY.y + offset.top - originalOffset.top;\n  }\n\n  setTransformXY(elem, resultXY);\n}\n\nfunction setOffset(elem, offset, option) {\n  if (option.ignoreShake) {\n    var oriOffset = getOffset(elem);\n    var oLeft = oriOffset.left.toFixed(0);\n    var oTop = oriOffset.top.toFixed(0);\n    var tLeft = offset.left.toFixed(0);\n    var tTop = offset.top.toFixed(0);\n\n    if (oLeft === tLeft && oTop === tTop) {\n      return;\n    }\n  }\n\n  if (option.useCssRight || option.useCssBottom) {\n    setLeftTop(elem, offset, option);\n  } else if (option.useCssTransform && getTransformName() in document.body.style) {\n    setTransform$1(elem, offset);\n  } else {\n    setLeftTop(elem, offset, option);\n  }\n}\n\nfunction each(arr, fn) {\n  for (var i = 0; i < arr.length; i++) {\n    fn(arr[i]);\n  }\n}\n\nfunction isBorderBoxFn(elem) {\n  return getComputedStyleX(elem, 'boxSizing') === 'border-box';\n}\n\nvar BOX_MODELS = ['margin', 'border', 'padding'];\nvar CONTENT_INDEX = -1;\nvar PADDING_INDEX = 2;\nvar BORDER_INDEX = 1;\nvar MARGIN_INDEX = 0;\n\nfunction swap(elem, options, callback) {\n  var old = {};\n  var style = elem.style;\n  var name; // Remember the old values, and insert the new ones\n\n  for (name in options) {\n    if (options.hasOwnProperty(name)) {\n      old[name] = style[name];\n      style[name] = options[name];\n    }\n  }\n\n  callback.call(elem); // Revert the old values\n\n  for (name in options) {\n    if (options.hasOwnProperty(name)) {\n      style[name] = old[name];\n    }\n  }\n}\n\nfunction getPBMWidth(elem, props, which) {\n  var value = 0;\n  var prop;\n  var j;\n  var i;\n\n  for (j = 0; j < props.length; j++) {\n    prop = props[j];\n\n    if (prop) {\n      for (i = 0; i < which.length; i++) {\n        var cssProp = void 0;\n\n        if (prop === 'border') {\n          cssProp = \"\".concat(prop).concat(which[i], \"Width\");\n        } else {\n          cssProp = prop + which[i];\n        }\n\n        value += parseFloat(getComputedStyleX(elem, cssProp)) || 0;\n      }\n    }\n  }\n\n  return value;\n}\n\nvar domUtils = {\n  getParent: function getParent(element) {\n    var parent = element;\n\n    do {\n      if (parent.nodeType === 11 && parent.host) {\n        parent = parent.host;\n      } else {\n        parent = parent.parentNode;\n      }\n    } while (parent && parent.nodeType !== 1 && parent.nodeType !== 9);\n\n    return parent;\n  }\n};\neach(['Width', 'Height'], function (name) {\n  domUtils[\"doc\".concat(name)] = function (refWin) {\n    var d = refWin.document;\n    return Math.max( // firefox chrome documentElement.scrollHeight< body.scrollHeight\n    // ie standard mode : documentElement.scrollHeight> body.scrollHeight\n    d.documentElement[\"scroll\".concat(name)], // quirks : documentElement.scrollHeight 最大等于可视窗口多一点?\n    d.body[\"scroll\".concat(name)], domUtils[\"viewport\".concat(name)](d));\n  };\n\n  domUtils[\"viewport\".concat(name)] = function (win) {\n    // pc browser includes scrollbar in window.innerWidth\n    var prop = \"client\".concat(name);\n    var doc = win.document;\n    var body = doc.body;\n    var documentElement = doc.documentElement;\n    var documentElementProp = documentElement[prop]; // 标准模式取 documentElement\n    // backcompat 取 body\n\n    return doc.compatMode === 'CSS1Compat' && documentElementProp || body && body[prop] || documentElementProp;\n  };\n});\n/*\n 得到元素的大小信息\n @param elem\n @param name\n @param {String} [extra]  'padding' : (css width) + padding\n 'border' : (css width) + padding + border\n 'margin' : (css width) + padding + border + margin\n */\n\nfunction getWH(elem, name, ex) {\n  var extra = ex;\n\n  if (isWindow(elem)) {\n    return name === 'width' ? domUtils.viewportWidth(elem) : domUtils.viewportHeight(elem);\n  } else if (elem.nodeType === 9) {\n    return name === 'width' ? domUtils.docWidth(elem) : domUtils.docHeight(elem);\n  }\n\n  var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom'];\n  var borderBoxValue = name === 'width' ? Math.floor(elem.getBoundingClientRect().width) : Math.floor(elem.getBoundingClientRect().height);\n  var isBorderBox = isBorderBoxFn(elem);\n  var cssBoxValue = 0;\n\n  if (borderBoxValue === null || borderBoxValue === undefined || borderBoxValue <= 0) {\n    borderBoxValue = undefined; // Fall back to computed then un computed css if necessary\n\n    cssBoxValue = getComputedStyleX(elem, name);\n\n    if (cssBoxValue === null || cssBoxValue === undefined || Number(cssBoxValue) < 0) {\n      cssBoxValue = elem.style[name] || 0;\n    } // Normalize '', auto, and prepare for extra\n\n\n    cssBoxValue = parseFloat(cssBoxValue) || 0;\n  }\n\n  if (extra === undefined) {\n    extra = isBorderBox ? BORDER_INDEX : CONTENT_INDEX;\n  }\n\n  var borderBoxValueOrIsBorderBox = borderBoxValue !== undefined || isBorderBox;\n  var val = borderBoxValue || cssBoxValue;\n\n  if (extra === CONTENT_INDEX) {\n    if (borderBoxValueOrIsBorderBox) {\n      return val - getPBMWidth(elem, ['border', 'padding'], which);\n    }\n\n    return cssBoxValue;\n  } else if (borderBoxValueOrIsBorderBox) {\n    if (extra === BORDER_INDEX) {\n      return val;\n    }\n\n    return val + (extra === PADDING_INDEX ? -getPBMWidth(elem, ['border'], which) : getPBMWidth(elem, ['margin'], which));\n  }\n\n  return cssBoxValue + getPBMWidth(elem, BOX_MODELS.slice(extra), which);\n}\n\nvar cssShow = {\n  position: 'absolute',\n  visibility: 'hidden',\n  display: 'block'\n}; // fix #119 : https://github.com/kissyteam/kissy/issues/119\n\nfunction getWHIgnoreDisplay() {\n  for (var _len = arguments.length, args = new Array(_len), _key2 = 0; _key2 < _len; _key2++) {\n    args[_key2] = arguments[_key2];\n  }\n\n  var val;\n  var elem = args[0]; // in case elem is window\n  // elem.offsetWidth === undefined\n\n  if (elem.offsetWidth !== 0) {\n    val = getWH.apply(undefined, args);\n  } else {\n    swap(elem, cssShow, function () {\n      val = getWH.apply(undefined, args);\n    });\n  }\n\n  return val;\n}\n\neach(['width', 'height'], function (name) {\n  var first = name.charAt(0).toUpperCase() + name.slice(1);\n\n  domUtils[\"outer\".concat(first)] = function (el, includeMargin) {\n    return el && getWHIgnoreDisplay(el, name, includeMargin ? MARGIN_INDEX : BORDER_INDEX);\n  };\n\n  var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom'];\n\n  domUtils[name] = function (elem, v) {\n    var val = v;\n\n    if (val !== undefined) {\n      if (elem) {\n        var isBorderBox = isBorderBoxFn(elem);\n\n        if (isBorderBox) {\n          val += getPBMWidth(elem, ['padding', 'border'], which);\n        }\n\n        return css(elem, name, val);\n      }\n\n      return undefined;\n    }\n\n    return elem && getWHIgnoreDisplay(elem, name, CONTENT_INDEX);\n  };\n});\n\nfunction mix(to, from) {\n  for (var i in from) {\n    if (from.hasOwnProperty(i)) {\n      to[i] = from[i];\n    }\n  }\n\n  return to;\n}\n\nvar utils = {\n  getWindow: function getWindow(node) {\n    if (node && node.document && node.setTimeout) {\n      return node;\n    }\n\n    var doc = node.ownerDocument || node;\n    return doc.defaultView || doc.parentWindow;\n  },\n  getDocument: getDocument,\n  offset: function offset(el, value, option) {\n    if (typeof value !== 'undefined') {\n      setOffset(el, value, option || {});\n    } else {\n      return getOffset(el);\n    }\n  },\n  isWindow: isWindow,\n  each: each,\n  css: css,\n  clone: function clone(obj) {\n    var i;\n    var ret = {};\n\n    for (i in obj) {\n      if (obj.hasOwnProperty(i)) {\n        ret[i] = obj[i];\n      }\n    }\n\n    var overflow = obj.overflow;\n\n    if (overflow) {\n      for (i in obj) {\n        if (obj.hasOwnProperty(i)) {\n          ret.overflow[i] = obj.overflow[i];\n        }\n      }\n    }\n\n    return ret;\n  },\n  mix: mix,\n  getWindowScrollLeft: function getWindowScrollLeft(w) {\n    return getScrollLeft(w);\n  },\n  getWindowScrollTop: function getWindowScrollTop(w) {\n    return getScrollTop(w);\n  },\n  merge: function merge() {\n    var ret = {};\n\n    for (var i = 0; i < arguments.length; i++) {\n      utils.mix(ret, i < 0 || arguments.length <= i ? undefined : arguments[i]);\n    }\n\n    return ret;\n  },\n  viewportWidth: 0,\n  viewportHeight: 0\n};\nmix(utils, domUtils);\n/**\n * 得到会导致元素显示不全的祖先元素\n */\n\nvar getParent = utils.getParent;\n\nfunction getOffsetParent(element) {\n  if (utils.isWindow(element) || element.nodeType === 9) {\n    return null;\n  } // ie 这个也不是完全可行\n\n  /*\n   <div style=\"width: 50px;height: 100px;overflow: hidden\">\n   <div style=\"width: 50px;height: 100px;position: relative;\" id=\"d6\">\n   元素 6 高 100px 宽 50px<br/>\n   </div>\n   </div>\n   */\n  // element.offsetParent does the right thing in ie7 and below. Return parent with layout!\n  //  In other browsers it only includes elements with position absolute, relative or\n  // fixed, not elements with overflow set to auto or scroll.\n  //        if (UA.ie && ieMode < 8) {\n  //            return element.offsetParent;\n  //        }\n  // 统一的 offsetParent 方法\n\n\n  var doc = utils.getDocument(element);\n  var body = doc.body;\n  var parent;\n  var positionStyle = utils.css(element, 'position');\n  var skipStatic = positionStyle === 'fixed' || positionStyle === 'absolute';\n\n  if (!skipStatic) {\n    return element.nodeName.toLowerCase() === 'html' ? null : getParent(element);\n  }\n\n  for (parent = getParent(element); parent && parent !== body && parent.nodeType !== 9; parent = getParent(parent)) {\n    positionStyle = utils.css(parent, 'position');\n\n    if (positionStyle !== 'static') {\n      return parent;\n    }\n  }\n\n  return null;\n}\n\nvar getParent$1 = utils.getParent;\n\nfunction isAncestorFixed(element) {\n  if (utils.isWindow(element) || element.nodeType === 9) {\n    return false;\n  }\n\n  var doc = utils.getDocument(element);\n  var body = doc.body;\n  var parent = null;\n\n  for (parent = getParent$1(element); // 修复元素位于 document.documentElement 下导致崩溃问题\n  parent && parent !== body && parent !== doc; parent = getParent$1(parent)) {\n    var positionStyle = utils.css(parent, 'position');\n\n    if (positionStyle === 'fixed') {\n      return true;\n    }\n  }\n\n  return false;\n}\n/**\n * 获得元素的显示部分的区域\n */\n\n\nfunction getVisibleRectForElement(element, alwaysByViewport) {\n  var visibleRect = {\n    left: 0,\n    right: Infinity,\n    top: 0,\n    bottom: Infinity\n  };\n  var el = getOffsetParent(element);\n  var doc = utils.getDocument(element);\n  var win = doc.defaultView || doc.parentWindow;\n  var body = doc.body;\n  var documentElement = doc.documentElement; // Determine the size of the visible rect by climbing the dom accounting for\n  // all scrollable containers.\n\n  while (el) {\n    // clientWidth is zero for inline block elements in ie.\n    if ((navigator.userAgent.indexOf('MSIE') === -1 || el.clientWidth !== 0) && // body may have overflow set on it, yet we still get the entire\n    // viewport. In some browsers, el.offsetParent may be\n    // document.documentElement, so check for that too.\n    el !== body && el !== documentElement && utils.css(el, 'overflow') !== 'visible') {\n      var pos = utils.offset(el); // add border\n\n      pos.left += el.clientLeft;\n      pos.top += el.clientTop;\n      visibleRect.top = Math.max(visibleRect.top, pos.top);\n      visibleRect.right = Math.min(visibleRect.right, // consider area without scrollBar\n      pos.left + el.clientWidth);\n      visibleRect.bottom = Math.min(visibleRect.bottom, pos.top + el.clientHeight);\n      visibleRect.left = Math.max(visibleRect.left, pos.left);\n    } else if (el === body || el === documentElement) {\n      break;\n    }\n\n    el = getOffsetParent(el);\n  } // Set element position to fixed\n  // make sure absolute element itself don't affect it's visible area\n  // https://github.com/ant-design/ant-design/issues/7601\n\n\n  var originalPosition = null;\n\n  if (!utils.isWindow(element) && element.nodeType !== 9) {\n    originalPosition = element.style.position;\n    var position = utils.css(element, 'position');\n\n    if (position === 'absolute') {\n      element.style.position = 'fixed';\n    }\n  }\n\n  var scrollX = utils.getWindowScrollLeft(win);\n  var scrollY = utils.getWindowScrollTop(win);\n  var viewportWidth = utils.viewportWidth(win);\n  var viewportHeight = utils.viewportHeight(win);\n  var documentWidth = documentElement.scrollWidth;\n  var documentHeight = documentElement.scrollHeight; // scrollXXX on html is sync with body which means overflow: hidden on body gets wrong scrollXXX.\n  // We should cut this ourself.\n\n  var bodyStyle = window.getComputedStyle(body);\n\n  if (bodyStyle.overflowX === 'hidden') {\n    documentWidth = win.innerWidth;\n  }\n\n  if (bodyStyle.overflowY === 'hidden') {\n    documentHeight = win.innerHeight;\n  } // Reset element position after calculate the visible area\n\n\n  if (element.style) {\n    element.style.position = originalPosition;\n  }\n\n  if (alwaysByViewport || isAncestorFixed(element)) {\n    // Clip by viewport's size.\n    visibleRect.left = Math.max(visibleRect.left, scrollX);\n    visibleRect.top = Math.max(visibleRect.top, scrollY);\n    visibleRect.right = Math.min(visibleRect.right, scrollX + viewportWidth);\n    visibleRect.bottom = Math.min(visibleRect.bottom, scrollY + viewportHeight);\n  } else {\n    // Clip by document's size.\n    var maxVisibleWidth = Math.max(documentWidth, scrollX + viewportWidth);\n    visibleRect.right = Math.min(visibleRect.right, maxVisibleWidth);\n    var maxVisibleHeight = Math.max(documentHeight, scrollY + viewportHeight);\n    visibleRect.bottom = Math.min(visibleRect.bottom, maxVisibleHeight);\n  }\n\n  return visibleRect.top >= 0 && visibleRect.left >= 0 && visibleRect.bottom > visibleRect.top && visibleRect.right > visibleRect.left ? visibleRect : null;\n}\n\nfunction adjustForViewport(elFuturePos, elRegion, visibleRect, overflow) {\n  var pos = utils.clone(elFuturePos);\n  var size = {\n    width: elRegion.width,\n    height: elRegion.height\n  };\n\n  if (overflow.adjustX && pos.left < visibleRect.left) {\n    pos.left = visibleRect.left;\n  } // Left edge inside and right edge outside viewport, try to resize it.\n\n\n  if (overflow.resizeWidth && pos.left >= visibleRect.left && pos.left + size.width > visibleRect.right) {\n    size.width -= pos.left + size.width - visibleRect.right;\n  } // Right edge outside viewport, try to move it.\n\n\n  if (overflow.adjustX && pos.left + size.width > visibleRect.right) {\n    // 保证左边界和可视区域左边界对齐\n    pos.left = Math.max(visibleRect.right - size.width, visibleRect.left);\n  } // Top edge outside viewport, try to move it.\n\n\n  if (overflow.adjustY && pos.top < visibleRect.top) {\n    pos.top = visibleRect.top;\n  } // Top edge inside and bottom edge outside viewport, try to resize it.\n\n\n  if (overflow.resizeHeight && pos.top >= visibleRect.top && pos.top + size.height > visibleRect.bottom) {\n    size.height -= pos.top + size.height - visibleRect.bottom;\n  } // Bottom edge outside viewport, try to move it.\n\n\n  if (overflow.adjustY && pos.top + size.height > visibleRect.bottom) {\n    // 保证上边界和可视区域上边界对齐\n    pos.top = Math.max(visibleRect.bottom - size.height, visibleRect.top);\n  }\n\n  return utils.mix(pos, size);\n}\n\nfunction getRegion(node) {\n  var offset;\n  var w;\n  var h;\n\n  if (!utils.isWindow(node) && node.nodeType !== 9) {\n    offset = utils.offset(node);\n    w = utils.outerWidth(node);\n    h = utils.outerHeight(node);\n  } else {\n    var win = utils.getWindow(node);\n    offset = {\n      left: utils.getWindowScrollLeft(win),\n      top: utils.getWindowScrollTop(win)\n    };\n    w = utils.viewportWidth(win);\n    h = utils.viewportHeight(win);\n  }\n\n  offset.width = w;\n  offset.height = h;\n  return offset;\n}\n/**\n * 获取 node 上的 align 对齐点 相对于页面的坐标\n */\n\n\nfunction getAlignOffset(region, align) {\n  var V = align.charAt(0);\n  var H = align.charAt(1);\n  var w = region.width;\n  var h = region.height;\n  var x = region.left;\n  var y = region.top;\n\n  if (V === 'c') {\n    y += h / 2;\n  } else if (V === 'b') {\n    y += h;\n  }\n\n  if (H === 'c') {\n    x += w / 2;\n  } else if (H === 'r') {\n    x += w;\n  }\n\n  return {\n    left: x,\n    top: y\n  };\n}\n\nfunction getElFuturePos(elRegion, refNodeRegion, points, offset, targetOffset) {\n  var p1 = getAlignOffset(refNodeRegion, points[1]);\n  var p2 = getAlignOffset(elRegion, points[0]);\n  var diff = [p2.left - p1.left, p2.top - p1.top];\n  return {\n    left: Math.round(elRegion.left - diff[0] + offset[0] - targetOffset[0]),\n    top: Math.round(elRegion.top - diff[1] + offset[1] - targetOffset[1])\n  };\n}\n/**\n * align dom node flexibly\n * @author yiminghe@gmail.com\n */\n\n\nfunction isFailX(elFuturePos, elRegion, visibleRect) {\n  return elFuturePos.left < visibleRect.left || elFuturePos.left + elRegion.width > visibleRect.right;\n}\n\nfunction isFailY(elFuturePos, elRegion, visibleRect) {\n  return elFuturePos.top < visibleRect.top || elFuturePos.top + elRegion.height > visibleRect.bottom;\n}\n\nfunction isCompleteFailX(elFuturePos, elRegion, visibleRect) {\n  return elFuturePos.left > visibleRect.right || elFuturePos.left + elRegion.width < visibleRect.left;\n}\n\nfunction isCompleteFailY(elFuturePos, elRegion, visibleRect) {\n  return elFuturePos.top > visibleRect.bottom || elFuturePos.top + elRegion.height < visibleRect.top;\n}\n\nfunction flip(points, reg, map) {\n  var ret = [];\n  utils.each(points, function (p) {\n    ret.push(p.replace(reg, function (m) {\n      return map[m];\n    }));\n  });\n  return ret;\n}\n\nfunction flipOffset(offset, index) {\n  offset[index] = -offset[index];\n  return offset;\n}\n\nfunction convertOffset(str, offsetLen) {\n  var n;\n\n  if (/%$/.test(str)) {\n    n = parseInt(str.substring(0, str.length - 1), 10) / 100 * offsetLen;\n  } else {\n    n = parseInt(str, 10);\n  }\n\n  return n || 0;\n}\n\nfunction normalizeOffset(offset, el) {\n  offset[0] = convertOffset(offset[0], el.width);\n  offset[1] = convertOffset(offset[1], el.height);\n}\n/**\n * @param el\n * @param tgtRegion 参照节点所占的区域: { left, top, width, height }\n * @param align\n */\n\n\nfunction doAlign(el, tgtRegion, align, isTgtRegionVisible) {\n  var points = align.points;\n  var offset = align.offset || [0, 0];\n  var targetOffset = align.targetOffset || [0, 0];\n  var overflow = align.overflow;\n  var source = align.source || el;\n  offset = [].concat(offset);\n  targetOffset = [].concat(targetOffset);\n  overflow = overflow || {};\n  var newOverflowCfg = {};\n  var fail = 0;\n  var alwaysByViewport = !!(overflow && overflow.alwaysByViewport); // 当前节点可以被放置的显示区域\n\n  var visibleRect = getVisibleRectForElement(source, alwaysByViewport); // 当前节点所占的区域, left/top/width/height\n\n  var elRegion = getRegion(source); // 将 offset 转换成数值,支持百分比\n\n  normalizeOffset(offset, elRegion);\n  normalizeOffset(targetOffset, tgtRegion); // 当前节点将要被放置的位置\n\n  var elFuturePos = getElFuturePos(elRegion, tgtRegion, points, offset, targetOffset); // 当前节点将要所处的区域\n\n  var newElRegion = utils.merge(elRegion, elFuturePos); // 如果可视区域不能完全放置当前节点时允许调整\n\n  if (visibleRect && (overflow.adjustX || overflow.adjustY) && isTgtRegionVisible) {\n    if (overflow.adjustX) {\n      // 如果横向不能放下\n      if (isFailX(elFuturePos, elRegion, visibleRect)) {\n        // 对齐位置反下\n        var newPoints = flip(points, /[lr]/gi, {\n          l: 'r',\n          r: 'l'\n        }); // 偏移量也反下\n\n        var newOffset = flipOffset(offset, 0);\n        var newTargetOffset = flipOffset(targetOffset, 0);\n        var newElFuturePos = getElFuturePos(elRegion, tgtRegion, newPoints, newOffset, newTargetOffset);\n\n        if (!isCompleteFailX(newElFuturePos, elRegion, visibleRect)) {\n          fail = 1;\n          points = newPoints;\n          offset = newOffset;\n          targetOffset = newTargetOffset;\n        }\n      }\n    }\n\n    if (overflow.adjustY) {\n      // 如果纵向不能放下\n      if (isFailY(elFuturePos, elRegion, visibleRect)) {\n        // 对齐位置反下\n        var _newPoints = flip(points, /[tb]/gi, {\n          t: 'b',\n          b: 't'\n        }); // 偏移量也反下\n\n\n        var _newOffset = flipOffset(offset, 1);\n\n        var _newTargetOffset = flipOffset(targetOffset, 1);\n\n        var _newElFuturePos = getElFuturePos(elRegion, tgtRegion, _newPoints, _newOffset, _newTargetOffset);\n\n        if (!isCompleteFailY(_newElFuturePos, elRegion, visibleRect)) {\n          fail = 1;\n          points = _newPoints;\n          offset = _newOffset;\n          targetOffset = _newTargetOffset;\n        }\n      }\n    } // 如果失败,重新计算当前节点将要被放置的位置\n\n\n    if (fail) {\n      elFuturePos = getElFuturePos(elRegion, tgtRegion, points, offset, targetOffset);\n      utils.mix(newElRegion, elFuturePos);\n    }\n\n    var isStillFailX = isFailX(elFuturePos, elRegion, visibleRect);\n    var isStillFailY = isFailY(elFuturePos, elRegion, visibleRect); // 检查反下后的位置是否可以放下了,如果仍然放不下:\n    // 1. 复原修改过的定位参数\n\n    if (isStillFailX || isStillFailY) {\n      var _newPoints2 = points; // 重置对应部分的翻转逻辑\n\n      if (isStillFailX) {\n        _newPoints2 = flip(points, /[lr]/gi, {\n          l: 'r',\n          r: 'l'\n        });\n      }\n\n      if (isStillFailY) {\n        _newPoints2 = flip(points, /[tb]/gi, {\n          t: 'b',\n          b: 't'\n        });\n      }\n\n      points = _newPoints2;\n      offset = align.offset || [0, 0];\n      targetOffset = align.targetOffset || [0, 0];\n    } // 2. 只有指定了可以调整当前方向才调整\n\n\n    newOverflowCfg.adjustX = overflow.adjustX && isStillFailX;\n    newOverflowCfg.adjustY = overflow.adjustY && isStillFailY; // 确实要调整,甚至可能会调整高度宽度\n\n    if (newOverflowCfg.adjustX || newOverflowCfg.adjustY) {\n      newElRegion = adjustForViewport(elFuturePos, elRegion, visibleRect, newOverflowCfg);\n    }\n  } // need judge to in case set fixed with in css on height auto element\n\n\n  if (newElRegion.width !== elRegion.width) {\n    utils.css(source, 'width', utils.width(source) + newElRegion.width - elRegion.width);\n  }\n\n  if (newElRegion.height !== elRegion.height) {\n    utils.css(source, 'height', utils.height(source) + newElRegion.height - elRegion.height);\n  } // https://github.com/kissyteam/kissy/issues/190\n  // 相对于屏幕位置没变,而 left/top 变了\n  // 例如 <div 'relative'><el absolute></div>\n\n\n  utils.offset(source, {\n    left: newElRegion.left,\n    top: newElRegion.top\n  }, {\n    useCssRight: align.useCssRight,\n    useCssBottom: align.useCssBottom,\n    useCssTransform: align.useCssTransform,\n    ignoreShake: align.ignoreShake\n  });\n  return {\n    points: points,\n    offset: offset,\n    targetOffset: targetOffset,\n    overflow: newOverflowCfg\n  };\n}\n/**\n *  2012-04-26 yiminghe@gmail.com\n *   - 优化智能对齐算法\n *   - 慎用 resizeXX\n *\n *  2011-07-13 yiminghe@gmail.com note:\n *   - 增加智能对齐,以及大小调整选项\n **/\n\n\nfunction isOutOfVisibleRect(target, alwaysByViewport) {\n  var visibleRect = getVisibleRectForElement(target, alwaysByViewport);\n  var targetRegion = getRegion(target);\n  return !visibleRect || targetRegion.left + targetRegion.width <= visibleRect.left || targetRegion.top + targetRegion.height <= visibleRect.top || targetRegion.left >= visibleRect.right || targetRegion.top >= visibleRect.bottom;\n}\n\nfunction alignElement(el, refNode, align) {\n  var target = align.target || refNode;\n  var refNodeRegion = getRegion(target);\n  var isTargetNotOutOfVisible = !isOutOfVisibleRect(target, align.overflow && align.overflow.alwaysByViewport);\n  return doAlign(el, refNodeRegion, align, isTargetNotOutOfVisible);\n}\n\nalignElement.__getOffsetParent = getOffsetParent;\nalignElement.__getVisibleRectForElement = getVisibleRectForElement;\n/**\n * `tgtPoint`: { pageX, pageY } or { clientX, clientY }.\n * If client position provided, will internal convert to page position.\n */\n\nfunction alignPoint(el, tgtPoint, align) {\n  var pageX;\n  var pageY;\n  var doc = utils.getDocument(el);\n  var win = doc.defaultView || doc.parentWindow;\n  var scrollX = utils.getWindowScrollLeft(win);\n  var scrollY = utils.getWindowScrollTop(win);\n  var viewportWidth = utils.viewportWidth(win);\n  var viewportHeight = utils.viewportHeight(win);\n\n  if ('pageX' in tgtPoint) {\n    pageX = tgtPoint.pageX;\n  } else {\n    pageX = scrollX + tgtPoint.clientX;\n  }\n\n  if ('pageY' in tgtPoint) {\n    pageY = tgtPoint.pageY;\n  } else {\n    pageY = scrollY + tgtPoint.clientY;\n  }\n\n  var tgtRegion = {\n    left: pageX,\n    top: pageY,\n    width: 0,\n    height: 0\n  };\n  var pointInView = pageX >= 0 && pageX <= scrollX + viewportWidth && pageY >= 0 && pageY <= scrollY + viewportHeight; // Provide default target point\n\n  var points = [align.points[0], 'cc'];\n  return doAlign(el, tgtRegion, _objectSpread2(_objectSpread2({}, align), {}, {\n    points: points\n  }), pointInView);\n}\n\nexport default alignElement;\nexport { alignElement, alignPoint };","/**\n * event-lite.js - Light-weight EventEmitter (less than 1KB when gzipped)\n *\n * @copyright Yusuke Kawasaki\n * @license MIT\n * @constructor\n * @see https://github.com/kawanet/event-lite\n * @see http://kawanet.github.io/event-lite/EventLite.html\n * @example\n * var EventLite = require(\"event-lite\");\n *\n * function MyClass() {...}             // your class\n *\n * EventLite.mixin(MyClass.prototype);  // import event methods\n *\n * var obj = new MyClass();\n * obj.on(\"foo\", function() {...});     // add event listener\n * obj.once(\"bar\", function() {...});   // add one-time event listener\n * obj.emit(\"foo\");                     // dispatch event\n * obj.emit(\"bar\");                     // dispatch another event\n * obj.off(\"foo\");                      // remove event listener\n */\nfunction EventLite() {\n  if (!(this instanceof EventLite)) return new EventLite();\n}\n\n(function (EventLite) {\n  // export the class for node.js\n  if (\"undefined\" !== typeof module) module.exports = EventLite; // property name to hold listeners\n\n  var LISTENERS = \"listeners\"; // methods to export\n\n  var methods = {\n    on: on,\n    once: once,\n    off: off,\n    emit: emit\n  }; // mixin to self\n\n  mixin(EventLite.prototype); // export mixin function\n\n  EventLite.mixin = mixin;\n  /**\n   * Import on(), once(), off() and emit() methods into target object.\n   *\n   * @function EventLite.mixin\n   * @param target {Prototype}\n   */\n\n  function mixin(target) {\n    for (var key in methods) {\n      target[key] = methods[key];\n    }\n\n    return target;\n  }\n  /**\n   * Add an event listener.\n   *\n   * @function EventLite.prototype.on\n   * @param type {string}\n   * @param func {Function}\n   * @returns {EventLite} Self for method chaining\n   */\n\n\n  function on(type, func) {\n    getListeners(this, type).push(func);\n    return this;\n  }\n  /**\n   * Add one-time event listener.\n   *\n   * @function EventLite.prototype.once\n   * @param type {string}\n   * @param func {Function}\n   * @returns {EventLite} Self for method chaining\n   */\n\n\n  function once(type, func) {\n    var that = this;\n    wrap.originalListener = func;\n    getListeners(that, type).push(wrap);\n    return that;\n\n    function wrap() {\n      off.call(that, type, wrap);\n      func.apply(this, arguments);\n    }\n  }\n  /**\n   * Remove an event listener.\n   *\n   * @function EventLite.prototype.off\n   * @param [type] {string}\n   * @param [func] {Function}\n   * @returns {EventLite} Self for method chaining\n   */\n\n\n  function off(type, func) {\n    var that = this;\n    var listners;\n\n    if (!arguments.length) {\n      delete that[LISTENERS];\n    } else if (!func) {\n      listners = that[LISTENERS];\n\n      if (listners) {\n        delete listners[type];\n        if (!Object.keys(listners).length) return off.call(that);\n      }\n    } else {\n      listners = getListeners(that, type, true);\n\n      if (listners) {\n        listners = listners.filter(ne);\n        if (!listners.length) return off.call(that, type);\n        that[LISTENERS][type] = listners;\n      }\n    }\n\n    return that;\n\n    function ne(test) {\n      return test !== func && test.originalListener !== func;\n    }\n  }\n  /**\n   * Dispatch (trigger) an event.\n   *\n   * @function EventLite.prototype.emit\n   * @param type {string}\n   * @param [value] {*}\n   * @returns {boolean} True when a listener received the event\n   */\n\n\n  function emit(type, value) {\n    var that = this;\n    var listeners = getListeners(that, type, true);\n    if (!listeners) return false;\n    var arglen = arguments.length;\n\n    if (arglen === 1) {\n      listeners.forEach(zeroarg);\n    } else if (arglen === 2) {\n      listeners.forEach(onearg);\n    } else {\n      var args = Array.prototype.slice.call(arguments, 1);\n      listeners.forEach(moreargs);\n    }\n\n    return !!listeners.length;\n\n    function zeroarg(func) {\n      func.call(that);\n    }\n\n    function onearg(func) {\n      func.call(that, value);\n    }\n\n    function moreargs(func) {\n      func.apply(that, args);\n    }\n  }\n  /**\n   * @ignore\n   */\n\n\n  function getListeners(that, type, readonly) {\n    if (readonly && !that[LISTENERS]) return;\n    var listeners = that[LISTENERS] || (that[LISTENERS] = {});\n    return listeners[type] || (listeners[type] = []);\n  }\n})(EventLite);"],"names":["rgbToRgb","r","g","b","rgbToHsl","max","Math","min","h","s","l","d","hue2rgb","p","q","t","hslToRgb","rgbToHsv","v","hsvToRgb","i","floor","f","mod","rgbToHex","allow3Char","hex","round","toString","startsWith","charAt","join","rgbaToHex","a","allow4Char","convertDecimalToHex","rgbaToArgbHex","parseFloat","convertHexToDecimal","parseIntFromHex","val","parseInt","numberInputToObject","color","names","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","goldenrod","gold","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavenderblush","lavender","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","inputToRGB","rgb","ok","format","stringInputToObject","isValidCSSUnit","String","substr","Object","prototype","hasOwnProperty","call","CSS_UNIT","concat","PERMISSIVE_MATCH3","PERMISSIVE_MATCH4","matchers","RegExp","rgba","hsl","hsla","hsv","hsva","hex3","hex6","hex4","hex8","trim","toLowerCase","length","named","match","exec","Boolean","TinyColor","opts","_a","this","originalInput","roundA","gradientType","isValid","isDark","getBrightness","isLight","toRgb","getLuminance","RsRGB","GsRGB","BsRGB","pow","getAlpha","setAlpha","alpha","toHsv","toHsvString","toHsl","toHslString","toHex","toHexString","toHex8","toHex8String","toRgbString","toPercentageRgb","fmt","x","toPercentageRgbString","rnd","toName","_i","entries","_b","key","formatSet","formattedString","hasAlpha","toNumber","clone","lighten","amount","brighten","darken","tint","mix","shade","desaturate","saturate","greyscale","spin","hue","rgb1","rgb2","analogous","results","slices","part","ret","push","complement","monochromatic","res","modification","splitcomplement","onBackground","background","fg","bg","triad","polyad","tetrad","n","result","increment","equals","tinycolor","readability","color1","color2","c1","c2","isReadable","wcag2","level","size","readabilityLevel","mostReadable","baseColor","colorList","args","includeFallbackColors","bestColor","bestScore","colorList_1","score","toMsFilter","firstColor","secondColor","hex8String","secondHex8String","fromRatio","ratio","newColor","undefined","Number","legacyRandom","random","options","count","totalColors","colors","seed","randomWithin","colorInput","num","isNaN","namedColor","bounds","find","name","defineColor","hueRange","parsed","getHueRange","pickHue","luminosity","saturationRange","getColorInfo","sMin","sMax","pickSaturation","H","S","bMin","lowerBounds","s1","v1","s2","v2","m","getMinimumBrightness","bMax","pickBrightness","bounds_1","Error","range","bound","brightnessRange","bound01","indexOf","isOnePointZero","isPercent","isPercentage","abs","clamp01","boundAlpha","convertToPercentage","pad2","c","reactPropsRegex","isPropValid","prop","test","charCodeAt","memoize","fn","cache","create","arg","W","M","e","k","y","C","K","u","I","B","J","F","G","replace","N","substring","ca","O","A","X","D","z","da","ea","fa","w","L","P","Y","E","ha","Q","split","ia","Z","ja","ka","aa","ba","la","ma","R","na","oa","U","prefix","use","T","set","animationIterationCount","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","columns","flex","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridRow","gridRowEnd","gridRowSpan","gridRowStart","gridColumn","gridColumnEnd","gridColumnSpan","gridColumnStart","msGridRow","msGridRowSpan","msGridColumn","msGridColumnSpan","fontWeight","lineHeight","opacity","order","orphans","tabSize","widows","zIndex","zoom","WebkitLineClamp","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","hasOwn","classNames","classes","arguments","argType","Array","isArray","inner","apply","includes","module","exports","default","isMergeableObject","value","isNonNullObject","stringValue","$$typeof","REACT_ELEMENT_TYPE","isReactElement","isSpecial","Symbol","for","cloneUnlessOtherwiseSpecified","deepmerge","defaultArrayMerge","target","source","map","element","getKeys","keys","getOwnPropertySymbols","filter","symbol","propertyIsEnumerable","getEnumerableOwnPropertySymbols","propertyIsOnObject","object","property","_","mergeObject","destination","forEach","propertyIsUnsafe","customMerge","getMergeFunction","arrayMerge","sourceIsArray","all","array","reduce","prev","next","deepmerge_1","ownKeys","enumerableOnly","symbols","sym","getOwnPropertyDescriptor","enumerable","_objectSpread2","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_typeof","obj","iterator","constructor","configurable","writable","vendorPrefix","jsCssMap","Webkit","Moz","ms","getVendorPrefix","style","document","createElement","getTransitionName","getTransformName","setTransitionProperty","node","transitionProperty","setTransform","transform","getComputedStyleX","matrix2d","matrix3d","forceRelayout","elem","originalStyle","display","offsetHeight","css","el","getScroll","top","method","documentElement","body","getScrollLeft","getScrollTop","getOffset","pos","box","doc","ownerDocument","docElem","getBoundingClientRect","left","clientLeft","clientTop","getClientPosition","defaultView","parentWindow","isWindow","window","getDocument","nodeType","_RE_NUM_NO_PX","RE_POS","CURRENT_STYLE","RUNTIME_STYLE","LEFT","getOffsetDirection","dir","option","useCssRight","useCssBottom","oppositeOffsetDirection","setLeftTop","offset","position","presetH","presetV","horizontalProperty","verticalProperty","oppositeHorizontalProperty","oppositeVerticalProperty","originalTransition","originalOffset","old","preset","off","_key","_dir","_off","setTransform$1","originalXY","getComputedStyle","getPropertyValue","matrix","getTransformXY","resultXY","xy","arr","match2d","item","setTransformXY","each","isBorderBoxFn","cs","computedStyle","rsLeft","pixelLeft","BOX_MODELS","CONTENT_INDEX","PADDING_INDEX","BORDER_INDEX","getPBMWidth","props","which","j","cssProp","domUtils","getParent","parent","host","parentNode","getWH","ex","extra","viewportWidth","viewportHeight","docWidth","docHeight","borderBoxValue","width","height","isBorderBox","cssBoxValue","borderBoxValueOrIsBorderBox","slice","refWin","win","documentElementProp","compatMode","cssShow","visibility","getWHIgnoreDisplay","_len","_key2","offsetWidth","callback","swap","to","from","first","toUpperCase","includeMargin","utils","getWindow","setTimeout","ignoreShake","oriOffset","oLeft","toFixed","oTop","tLeft","tTop","useCssTransform","setOffset","overflow","getWindowScrollLeft","getWindowScrollTop","merge","getOffsetParent","positionStyle","nodeName","getParent$1","getVisibleRectForElement","alwaysByViewport","visibleRect","right","Infinity","bottom","navigator","userAgent","clientWidth","clientHeight","originalPosition","scrollX","scrollY","documentWidth","scrollWidth","documentHeight","scrollHeight","bodyStyle","overflowX","innerWidth","overflowY","innerHeight","isAncestorFixed","maxVisibleWidth","maxVisibleHeight","getRegion","outerWidth","outerHeight","getAlignOffset","region","align","V","getElFuturePos","elRegion","refNodeRegion","points","targetOffset","p1","p2","diff","isFailX","elFuturePos","isFailY","flip","reg","flipOffset","index","convertOffset","str","offsetLen","normalizeOffset","doAlign","tgtRegion","isTgtRegionVisible","newOverflowCfg","fail","newElRegion","adjustX","adjustY","newPoints","newOffset","newTargetOffset","isCompleteFailX","_newPoints","_newOffset","_newTargetOffset","isCompleteFailY","isStillFailX","isStillFailY","_newPoints2","resizeWidth","resizeHeight","adjustForViewport","alignElement","refNode","isTargetNotOutOfVisible","targetRegion","isOutOfVisibleRect","alignPoint","tgtPoint","pageX","pageY","clientX","clientY","pointInView","__getOffsetParent","__getVisibleRectForElement","EventLite","LISTENERS","methods","on","type","func","getListeners","once","that","wrap","originalListener","emit","listeners","arglen","mixin","listners","readonly"],"sourceRoot":""}